summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Dickow <jjdickow@gmail.com>2014-05-09 11:36:41 -0400
committerJustin Dickow <jjdickow@gmail.com>2014-05-09 11:36:41 -0400
commit83407d8ea24e7a121ae73e87cd064f1032499b5e (patch)
tree962226578a1ba082b8f7f7ae4e926ec7da447ead
parent016007fe1d43ca3e271b94f296d2aa4065b2778f (diff)
downloadsmartdevicelink-release_3.0.tar.gz
deleted files weren't added to last commitrelease_3.0
-rw-r--r--SDL_Android/LivioSdlUtilities/.classpath9
-rw-r--r--SDL_Android/LivioSdlUtilities/.project33
-rw-r--r--SDL_Android/LivioSdlUtilities/AndroidManifest.xml16
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/AndroidManifest.xml16
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/R.txt72
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/jarlist.cache3
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-hdpi/ic_launcher.pngbin9193 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-mdpi/ic_launcher.pngbin5057 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-xhdpi/ic_launcher.pngbin14068 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_left.pngbin2679 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_right.pngbin2695 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/BuildConfig.java6
-rw-r--r--SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/R.java149
-rw-r--r--SDL_Android/LivioSdlUtilities/proguard-project.txt20
-rw-r--r--SDL_Android/LivioSdlUtilities/project.properties16
-rw-r--r--SDL_Android/LivioSdlUtilities/res/drawable-hdpi/ic_launcher.pngbin9397 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/res/drawable-mdpi/ic_launcher.pngbin5237 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/res/drawable-xhdpi/ic_launcher.pngbin14383 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/res/drawable/arrow_left.pngbin3201 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/res/drawable/arrow_right.pngbin3238 -> 0 bytes
-rw-r--r--SDL_Android/LivioSdlUtilities/res/layout/json_flipper_dialog.xml36
-rw-r--r--SDL_Android/LivioSdlUtilities/res/layout/listview.xml8
-rw-r--r--SDL_Android/LivioSdlUtilities/res/layout/sdl_message_listview_row.xml28
-rw-r--r--SDL_Android/LivioSdlUtilities/res/layout/simple_listview_with_image.xml20
-rw-r--r--SDL_Android/LivioSdlUtilities/res/layout/textview.xml13
-rw-r--r--SDL_Android/LivioSdlUtilities/res/values-v11/styles.xml11
-rw-r--r--SDL_Android/LivioSdlUtilities/res/values-v14/styles.xml12
-rw-r--r--SDL_Android/LivioSdlUtilities/res/values/strings.xml86
-rw-r--r--SDL_Android/LivioSdlUtilities/res/values/styles.xml20
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/IpAddress.java36
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlConstants.java101
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlImageItem.java68
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlLogMessage.java124
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlRequestFactory.java609
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseFactory.java206
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseTracker.java109
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlService.java1131
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlImageAdapter.java59
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlMessageAdapter.java94
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseAlertDialog.java156
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseImageListDialog.java22
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseMultipleListViewDialog.java66
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseOkCancelDialog.java61
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseSingleListViewDialog.java49
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ImageListDialog.java35
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/IndeterminateProgressDialog.java16
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/JsonFlipperDialog.java95
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ListViewDialog.java21
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/MultipleListViewDialog.java32
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/SingleJsonDialog.java23
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewAlertDialog.java31
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewOkCancelDialog.java48
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumClickListener.java11
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumComparator.java20
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlButton.java234
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlCommand.java224
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlImageType.java92
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlInteractionMode.java78
-rwxr-xr-xSDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlLanguage.java165
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlSpeechCapability.java97
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTextAlignment.java81
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTransportType.java36
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlUpdateMode.java93
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlVehicleData.java54
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/CommandButton.java89
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuItem.java85
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuManager.java334
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/SubmenuButton.java109
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/AndroidUtils.java158
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/ApplicationPreferences.java188
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Counter.java47
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/DownCounter.java26
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/MathUtils.java21
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/SdlUtils.java254
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/StringUtils.java66
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Timeout.java120
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/UpCounter.java26
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/WifiUtils.java61
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/MinMaxInputFilter.java53
-rw-r--r--SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/SeekBarCalculator.java104
-rw-r--r--SDL_Android/LivioTesterApp/.classpath9
-rw-r--r--SDL_Android/LivioTesterApp/.project33
-rw-r--r--SDL_Android/LivioTesterApp/AndroidManifest.xml49
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/css/style.css9
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/AddCommand.html50
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/AddSubmenu.html33
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/Alert.html46
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/ChangeRegistration.html167
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/CreateInteractionChoiceSet.html43
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteCommand.html29
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteFile.html28
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteInteractionChoiceSet.html29
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteSubmenu.html28
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/GetDTCs.html28
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/ListFiles.html22
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/PerformInteraction.html85
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/PutFile.html80
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/ReadDIDs.html35
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/ScrollableMessage.html43
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/SetAppIcon.html29
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/SetMediaClockTimer.html71
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/Show.html71
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/Slider.html54
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/Speak.html66
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/SubscribeToButtons.html72
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/UnsubscribeFromButtons.html72
-rw-r--r--SDL_Android/LivioTesterApp/assets/help_docs/html/index.html43
-rw-r--r--SDL_Android/LivioTesterApp/bin/AndroidManifest.xml49
-rw-r--r--SDL_Android/LivioTesterApp/bin/R.txt224
-rw-r--r--SDL_Android/LivioTesterApp/bin/jarlist.cache3
-rw-r--r--SDL_Android/LivioTesterApp/gen/com/livio/sdl/R.java92
-rw-r--r--SDL_Android/LivioTesterApp/gen/com/livio/sdltester/BuildConfig.java6
-rw-r--r--SDL_Android/LivioTesterApp/gen/com/livio/sdltester/R.java350
-rw-r--r--SDL_Android/LivioTesterApp/proguard-project.txt20
-rw-r--r--SDL_Android/LivioTesterApp/project.properties15
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable-hdpi/ic_launcher.pngbin7004 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable-ldpi/ic_launcher.pngbin3314 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable-mdpi/ic_launcher.pngbin4769 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable-xhdpi/ic_launcher.pngbin11603 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/add.pngbin1375 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/add_to_favorites.pngbin9704 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/anchor.pngbin13779 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/game_pad.pngbin3626 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/ic_close.pngbin1469 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/ic_launcher.pngbin3314 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/remove.pngbin517 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/remove_from_favorites.pngbin9498 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/rocket.pngbin12514 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/select_an_image.pngbin2665 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/undo.pngbin6599 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/zoom_in.pngbin9860 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/drawable/zoom_out.pngbin9036 -> 0 bytes
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/activity_help.xml6
-rwxr-xr-xSDL_Android/LivioTesterApp/res/layout/add_command.xml57
-rwxr-xr-xSDL_Android/LivioTesterApp/res/layout/add_submenu.xml17
-rwxr-xr-xSDL_Android/LivioTesterApp/res/layout/alert.xml61
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/change_registration.xml34
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/choice_set_item.xml50
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/create_choice_interaction_set.xml23
-rwxr-xr-xSDL_Android/LivioTesterApp/res/layout/get_dtcs.xml17
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/main.xml21
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/offline_mode.xml8
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/perform_interaction.xml58
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/put_file.xml40
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/read_dids.xml23
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/scrollable_message.xml40
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/sdl_connection.xml26
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/set_media_clock_timer.xml64
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/show.xml167
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/slider.xml58
-rw-r--r--SDL_Android/LivioTesterApp/res/layout/speak.xml22
-rw-r--r--SDL_Android/LivioTesterApp/res/menu/menu_help.xml6
-rw-r--r--SDL_Android/LivioTesterApp/res/menu/menu_main.xml9
-rw-r--r--SDL_Android/LivioTesterApp/res/values-sw600dp/dimens.xml8
-rw-r--r--SDL_Android/LivioTesterApp/res/values-sw720dp-land/dimens.xml9
-rw-r--r--SDL_Android/LivioTesterApp/res/values-v11/styles.xml11
-rw-r--r--SDL_Android/LivioTesterApp/res/values-v14/styles.xml12
-rw-r--r--SDL_Android/LivioTesterApp/res/values/dimens.xml7
-rw-r--r--SDL_Android/LivioTesterApp/res/values/strings.xml55
-rw-r--r--SDL_Android/LivioTesterApp/res/values/styles.xml27
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/HelpActivity.java133
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/LivioSdlTesterPreferences.java79
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/MainActivity.java1276
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/SdlTesterImageResource.java56
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddCommandDialog.java121
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddSubMenuDialog.java55
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonSubscriptionDialog.java60
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonUnsubscriptionDialog.java60
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChangeRegistrationDialog.java55
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChoiceItemDialog.java105
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/CreateInteractionChoiceSetDialog.java136
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteCommandDialog.java51
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteFileDialog.java65
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteInteractionDialog.java45
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteSubmenuDialog.java48
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/GetDtcsDialog.java54
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PerformInteractionDialog.java181
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PutFileDialog.java172
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ReadDidsDialog.java60
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ScrollableMessageDialog.java103
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlAlertDialog.java137
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlConnectionDialog.java61
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetAppIconDialog.java45
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetMediaClockTimerDialog.java112
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ShowDialog.java186
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SliderDialog.java155
-rw-r--r--SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SpeakDialog.java67
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/.classpath9
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/.project33
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/.settings/org.eclipse.jdt.core.prefs11
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/AndroidManifest.xml2
-rw-r--r--SDL_Android/SmartDeviceLinkProxyAndroid/bin/AndroidManifest.xml2
-rw-r--r--SDL_Android/SmartDeviceLinkProxyAndroid/gen/com/smartdevicelink/BuildConfig.java6
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/project.properties12
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkException.java47
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkExceptionCause.java18
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/marshal/JsonRPCMarshaller.java155
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IDispatchingStrategy.java9
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IncomingProtocolMessageComparitor.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/InternalProxyMessageComparitor.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/OutgoingProtocolMessageComparitor.java15
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/ProxyMessageDispatcher.java65
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/AbstractProtocol.java103
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/BinaryFrameHeader.java107
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/IProtocolListener.java22
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeader.java159
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeaderFactory.java119
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolMessage.java105
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/SmartDeviceLinkProtocol.java418
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameData.java39
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java33
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameType.java34
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FunctionID.java87
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/MessageType.java11
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/SessionType.java31
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/IProxyListener.java19
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCMessage.java71
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCNotification.java21
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequest.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequestFactory.java990
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCResponse.java178
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCStruct.java69
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxy.java373
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyALM.java1145
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyBase.java3931
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyConfigurationResources.java34
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyFactory.java17
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/TTSChunkFactory.java39
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/Version.java5
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnError.java27
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java27
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java10
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Jingles.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Names.java408
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java48
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java291
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommand.java217
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java22
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java121
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java19
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Alert.java310
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java124
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertResponse.java43
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java155
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BeltStatus.java347
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BodyInformation.java72
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java136
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java114
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Choice.java157
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java100
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java21
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DIDResult.java47
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DTC.java86
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java64
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFile.java59
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java31
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java60
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java54
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java356
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumber.java26
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java15
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java186
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EVInfo.java69
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPData.java38
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPDataResponse.java15
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java37
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java23
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/FuelEconomyInformation.java54
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GPSData.java524
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GenericResponse.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCs.java73
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java45
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java381
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java550
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java147
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java48
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Image.java106
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFiles.java33
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java54
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/MenuParams.java143
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java86
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java67
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java176
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java175
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnCommand.java114
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java85
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnEncodedSyncPData.java63
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java179
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java134
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java95
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSmartDeviceLinkChoiceChosen.java170
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSyncPData.java48
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java86
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java550
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ParameterPermissions.java119
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java315
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java360
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java80
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PermissionItem.java65
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java62
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFile.java140
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java43
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDID.java106
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java49
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java490
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java460
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java94
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java133
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java58
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java15
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java60
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java209
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java109
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Show.java465
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBT.java298
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBTResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java77
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Slider.java177
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SliderResponse.java51
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButton.java111
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java146
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Speak.java137
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/StartTime.java104
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java106
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java919
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java1018
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPData.java25
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPDataResponse.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TTSChunk.java98
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TextField.java166
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TireStatus.java159
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Turn.java97
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java41
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java75
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java916
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java1017
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java122
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java62
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleType.java155
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VrHelpItem.java55
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java54
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java83
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java37
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioType.java18
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java41
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java31
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonName.java172
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java31
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java49
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java41
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java41
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Dimension.java46
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DisplayType.java32
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java28
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FileType.java37
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FunctionID.java59
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GearShiftAdviceStatus.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java27
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HMILevel.java66
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java24
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java26
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java41
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ImageType.java25
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java54
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Language.java63
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/LightSwitchStatus.java12
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MaintenanceModeStatus.java12
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java122
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MessageType.java11
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PRNDL.java62
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PermissionStatus.java21
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java45
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Result.java130
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java54
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkConnectionState.java6
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkDisconnectedReason.java51
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkInterfaceAvailability.java6
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java28
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java22
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemAction.java11
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemContext.java63
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TBTState.java30
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java29
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java112
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TirePressureTellTale.java11
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java41
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java38
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataActiveStatus.java13
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java28
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java16
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java24
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java26
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java23
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java29
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java23
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/smartdevicelinkMsgVersion.java104
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/IsmartDeviceLinkConnectionListener.java20
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/smartDeviceLinkConnection.java178
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/DiagLevel.java52
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/ISTListener.java5
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/Mime.java185
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/OpenRPCMessage.java85
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/SmartDeviceLinkTrace.java469
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/TraceDeviceInfo.java124
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/DetailLevel.java12
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/InterfaceActivityDirection.java7
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/Mod.java14
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransport.java368
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransportConfig.java18
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BaseTransportConfig.java15
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/ITransportListener.java15
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SiphonServer.java361
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SmartDeviceLinkTransport.java117
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransport.java500
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransportConfig.java82
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TransportType.java17
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Base64.java111
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/BitConverter.java72
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/ByteEnumer.java52
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/DebugTool.java262
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/IConsole.java10
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Mime.java182
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/NativeLogTool.java100
-rwxr-xr-xSDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/StringEnumer.java47
-rw-r--r--SDL_Core/CMakeLists.txt265
-rw-r--r--SDL_Core/Doxyfile1917
-rwxr-xr-xSDL_Core/FindQt.sh174
-rwxr-xr-xSDL_Core/Lint289
-rw-r--r--SDL_Core/README.md1
-rw-r--r--SDL_Core/changes0
-rw-r--r--SDL_Core/cmake/Modules/FindDBus.cmake20
-rw-r--r--SDL_Core/cmake/Modules/FindGlib-2.0.cmake43
-rw-r--r--SDL_Core/cmake/Modules/FindGstreamer-1.0.cmake136
-rw-r--r--SDL_Core/cmake/Modules/FindLibXML2.cmake20
-rw-r--r--SDL_Core/cmake/Modules/FindLibavahi.cmake25
-rw-r--r--SDL_Core/cmake/Modules/FindQt5Core.cmake10
-rw-r--r--SDL_Core/cmake/Modules/FindQt5DBus.cmake10
-rw-r--r--SDL_Core/cmake/Modules/FindQt5Qml.cmake10
-rw-r--r--SDL_Core/cmake/Modules/FindQt5Quick.cmake10
-rw-r--r--SDL_Core/doc/change_log.txt9
-rw-r--r--SDL_Core/doc/doxygen/components/AppMgr/index.txt5
-rw-r--r--SDL_Core/doc/doxygen/components/HMI/index.txt5
-rw-r--r--SDL_Core/doc/doxygen/components/JSONHandler/Formatters/index.txt9
-rw-r--r--SDL_Core/doc/doxygen/components/JSONHandler/index.txt8
-rw-r--r--SDL_Core/doc/doxygen/components/ProtocolHandler/index.txt5
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Type casts.txt204
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt25
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/index.txt9
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt101
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt9
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/index.txt10
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/Use of Smart Objects/index.txt6
-rw-r--r--SDL_Core/doc/doxygen/components/SmartObjects/index.txt11
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt11
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt11
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt14
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Client Specification/index.txt18
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt19
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt20
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt89
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Interaction.txt7
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt9
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt15
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Internal Design/index.txt15
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase1.txt74
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase2.txt96
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase3.txt131
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/Use Cases/index.txt11
-rw-r--r--SDL_Core/doc/doxygen/components/TransportManager/index.txt9
-rw-r--r--SDL_Core/doc/doxygen/components/index.txt9
-rw-r--r--SDL_Core/doc/doxygen/info.txt5
-rw-r--r--SDL_Core/doc/doxygen/mainpage.txt19
-rw-r--r--SDL_Core/doc/doxygen/tools/InterfaceGenerator/Arhitecture.txt5
-rw-r--r--SDL_Core/doc/doxygen/tools/InterfaceGenerator/CMake Integration.txt13
-rw-r--r--SDL_Core/doc/doxygen/tools/InterfaceGenerator/How To Use.txt31
-rw-r--r--SDL_Core/doc/doxygen/tools/InterfaceGenerator/Use of Output.txt11
-rw-r--r--SDL_Core/doc/doxygen/tools/InterfaceGenerator/index.txt11
-rw-r--r--SDL_Core/doc/doxygen/tools/index.txt5
-rw-r--r--SDL_Core/doc/grc/conf.smartDeviceLinkCore34
-rw-r--r--SDL_Core/doc/grc/grc.conf3
-rw-r--r--SDL_Core/doc/install.txt91
-rw-r--r--SDL_Core/doc/qnx_build.txt28
-rw-r--r--SDL_Core/doc/readme.txt67
-rw-r--r--SDL_Core/src/appMain/CMakeLists.txt151
-rw-r--r--SDL_Core/src/appMain/audio.8bit.wavbin88244 -> 0 bytes
-rw-r--r--SDL_Core/src/appMain/btinclude.h45
-rw-r--r--SDL_Core/src/appMain/hmi_capabilities.json174
-rw-r--r--SDL_Core/src/appMain/life_cycle.cc321
-rw-r--r--SDL_Core/src/appMain/life_cycle.h109
-rw-r--r--SDL_Core/src/appMain/log4cxx.properties62
-rw-r--r--SDL_Core/src/appMain/main.cc277
-rw-r--r--SDL_Core/src/appMain/policy_table.json393
-rw-r--r--SDL_Core/src/appMain/smartDeviceLink.ini77
-rwxr-xr-xSDL_Core/src/appMain/start-qml.sh33
-rw-r--r--SDL_Core/src/appMain/test.txt3
-rw-r--r--SDL_Core/src/appMain/wp1_policy_table.json198
-rw-r--r--SDL_Core/src/components/CMakeLists.txt82
-rw-r--r--SDL_Core/src/components/HMI/app/AppViews.js85
-rw-r--r--SDL_Core/src/components/HMI/app/Flags.js48
-rw-r--r--SDL_Core/src/components/HMI/app/SDLApp.js80
-rw-r--r--SDL_Core/src/components/HMI/app/StateManager.js222
-rw-r--r--SDL_Core/src/components/HMI/app/controller/AppController.js36
-rw-r--r--SDL_Core/src/components/HMI/app/controller/InfoController.js79
-rw-r--r--SDL_Core/src/components/HMI/app/controller/MediaController.js82
-rw-r--r--SDL_Core/src/components/HMI/app/controller/PhoneController.js56
-rw-r--r--SDL_Core/src/components/HMI/app/controller/sdl/AppController.js170
-rw-r--r--SDL_Core/src/components/HMI/app/controller/sdl/Controller.js747
-rw-r--r--SDL_Core/src/components/HMI/app/controller/sdl/MediaController.js140
-rw-r--r--SDL_Core/src/components/HMI/app/controller/sdl/NonMediaController.js112
-rw-r--r--SDL_Core/src/components/HMI/app/controller/sdl/RPCController.js2898
-rwxr-xr-xSDL_Core/src/components/HMI/app/controlls/AZERTYLayout.js264
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/Button.js169
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/Indicator.js134
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/Label.js55
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/List.js186
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/MenuList.js204
-rwxr-xr-xSDL_Core/src/components/HMI/app/controlls/QWERTYLayout.js264
-rwxr-xr-xSDL_Core/src/components/HMI/app/controlls/QWERTZLayout.js264
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/ScrollBar.js167
-rw-r--r--SDL_Core/src/components/HMI/app/controlls/ScrollableText.js209
-rw-r--r--SDL_Core/src/components/HMI/app/mixins/PresetEventCustom.js57
-rw-r--r--SDL_Core/src/components/HMI/app/mixins/PresetEvents.js44
-rw-r--r--SDL_Core/src/components/HMI/app/model/PhoneModel.js88
-rw-r--r--SDL_Core/src/components/HMI/app/model/abstract/RangedValue.js137
-rw-r--r--SDL_Core/src/components/HMI/app/model/media/CDModel.js43
-rw-r--r--SDL_Core/src/components/HMI/app/model/sdl/AppModel.js356
-rw-r--r--SDL_Core/src/components/HMI/app/model/sdl/MediaModel.js353
-rw-r--r--SDL_Core/src/components/HMI/app/model/sdl/Model.js1022
-rw-r--r--SDL_Core/src/components/HMI/app/model/sdl/NonMediaModel.js210
-rw-r--r--SDL_Core/src/components/HMI/app/model/sdl/VehicleInfoModel.js464
-rw-r--r--SDL_Core/src/components/HMI/app/util/Audio.js43
-rw-r--r--SDL_Core/src/components/HMI/app/util/StreamAudio.js49
-rw-r--r--SDL_Core/src/components/HMI/app/view/WarningView.js118
-rw-r--r--SDL_Core/src/components/HMI/app/view/climateView.js56
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/bottomControls.js90
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/controlButtons.js530
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/statusClimateView.js66
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/statusInfoView.js60
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/statusMediaView.js99
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/statusNavigationView.js59
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/statusPhoneView.js68
-rw-r--r--SDL_Core/src/components/HMI/app/view/home/topControls.js57
-rw-r--r--SDL_Core/src/components/HMI/app/view/homeView.js40
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/alertsView.js118
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/appsView.js148
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/calendarView.js104
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/devicelistView.js142
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/nonMediaView.js244
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/servicesView.js54
-rw-r--r--SDL_Core/src/components/HMI/app/view/info/travelLinkView.js164
-rw-r--r--SDL_Core/src/components/HMI/app/view/infoView.js180
-rw-r--r--SDL_Core/src/components/HMI/app/view/media/common/LeftMenuView.js82
-rw-r--r--SDL_Core/src/components/HMI/app/view/media/playerView.js43
-rw-r--r--SDL_Core/src/components/HMI/app/view/media/sdl/controllsView.js226
-rw-r--r--SDL_Core/src/components/HMI/app/view/media/sdlmediaView.js110
-rw-r--r--SDL_Core/src/components/HMI/app/view/mediaView.js49
-rw-r--r--SDL_Core/src/components/HMI/app/view/navigationApp/baseNavigationView.js173
-rw-r--r--SDL_Core/src/components/HMI/app/view/navigationAppView.js76
-rw-r--r--SDL_Core/src/components/HMI/app/view/navigationView.js54
-rw-r--r--SDL_Core/src/components/HMI/app/view/phone/dialpadView.js214
-rw-r--r--SDL_Core/src/components/HMI/app/view/phoneView.js97
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/AlertPopUp.js242
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/AudioPassThruPopUp.js178
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/ExitAppView.js114
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/TTSPopUp.js105
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/VRHelpListView.js104
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/VRPopUp.js174
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/VehicleInfoView.js180
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/driverDistraction.js84
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/AbstractView.js95
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js381
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/keyboard.js290
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/optionsView.js132
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/scrollableMessage.js150
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/sliderView.js201
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/tbtTurnList.js127
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/shared/turnByTurnView.js238
-rw-r--r--SDL_Core/src/components/HMI/app/view/sdl/tbtClientStateView.js114
-rw-r--r--SDL_Core/src/components/HMI/app/view/settingsView.js53
-rw-r--r--SDL_Core/src/components/HMI/audio/alert.wavbin37428 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/audio/initial.wavbin46834 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/audio/listen.wavbin11070 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/audio/positive.wavbin20302 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/audio/say.wavbin47292 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/css/buttonControls.css524
-rw-r--r--SDL_Core/src/components/HMI/css/general.css1516
-rw-r--r--SDL_Core/src/components/HMI/css/info.css671
-rw-r--r--SDL_Core/src/components/HMI/css/mcs.css3703
-rw-r--r--SDL_Core/src/components/HMI/css/media.css528
-rw-r--r--SDL_Core/src/components/HMI/css/navigation.css102
-rw-r--r--SDL_Core/src/components/HMI/css/phone.css1549
-rw-r--r--SDL_Core/src/components/HMI/css/sdl.css1114
-rw-r--r--SDL_Core/src/components/HMI/ffw/BasicCommunicationRPC.js595
-rw-r--r--SDL_Core/src/components/HMI/ffw/ButtonsRPC.js338
-rw-r--r--SDL_Core/src/components/HMI/ffw/Framework.js40
-rw-r--r--SDL_Core/src/components/HMI/ffw/NavigationRPC.js319
-rw-r--r--SDL_Core/src/components/HMI/ffw/RPCClient.js290
-rw-r--r--SDL_Core/src/components/HMI/ffw/RPCObserver.js116
-rw-r--r--SDL_Core/src/components/HMI/ffw/TTSRPC.js407
-rw-r--r--SDL_Core/src/components/HMI/ffw/UIRPC.js1345
-rw-r--r--SDL_Core/src/components/HMI/ffw/VRRPC.js407
-rw-r--r--SDL_Core/src/components/HMI/ffw/VehicleInfoRPC.js474
-rw-r--r--SDL_Core/src/components/HMI/ffw/WebSocket.js77
-rw-r--r--SDL_Core/src/components/HMI/images/common/arr-r-disable.pngbin1268 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/arr-r.pngbin1467 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/arrow_ico.pngbin1194 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/bt_bg.pngbin1204 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/bt_bg_pressed.pngbin1211 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-28h-gray-active.pngbin957 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-28h.pngbin1080 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-48h-active-gray.pngbin952 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-48h-active.pngbin972 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-48h-pressed.pngbin3011 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-48h.pngbin1141 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/btn-98h.pngbin1266 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/button.pngbin655 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/button_active_blue.pngbin170 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/button_large.pngbin1192 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/button_small.pngbin487 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/center-button-150.pngbin1390 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/center-button.pngbin1300 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/climate-status-bg.pngbin2315 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/delim.pngbin1120 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/divider.pngbin1157 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/header_bg.pngbin6743 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/ico_back.pngbin1123 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/ind_vert_active.pngbin2346 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/ind_vert_def.pngbin1066 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/ls_border.pngbin3403 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/media-status-bg.pngbin2048 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/minus-ico.pngbin934 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/nav-status-bg.pngbin2971 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/okbut.pngbin3102 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/okbut_pressed.pngbin3155 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/page-back-button.pngbin1112 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/phone-statusbar-bg.pngbin2910 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/plus-ico.pngbin958 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/scroll_down.pngbin1072 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/scroll_down_active.pngbin1070 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/scroll_down_inactive.pngbin1033 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/scroll_up.pngbin1186 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/scroll_up_inactive.pngbin1108 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/seat-act-led.pngbin1383 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/seat-inact-led.pngbin967 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/skipbuttonbg.pngbin1562 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/skippbuttonbg_pressed.pngbin1544 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/system_settings_btn_bg.pngbin962 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/system_settings_btn_bg_active.pngbin970 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/system_settings_btn_h54.pngbin966 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/common/toggle.pngbin3596 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/bottom_controlls_full.pngbin28638 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/DownButton.pngbin6391 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/DownButton_pressed.pngbin6278 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton.pngbin6547 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton_pressed.pngbin6630 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/OkButton.pngbin4939 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/OkButton_pressed.pngbin4809 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/RightButton.pngbin6550 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/RightButton_pressed.pngbin6549 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/UpButton.pngbin6397 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/UpButton_pressed.pngbin6536 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/backGroundControllButtons.pngbin3157 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/vr.pngbin5429 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/vrImage.pngbin2461 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/controlButtons/vr_pressed.pngbin6165 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/home_main_image.pngbin39085 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/home/home_phone.pngbin2774 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/callendar-btn.pngbin1366 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/ico_assist.pngbin1553 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/ico_info_install.pngbin2022 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/ico_vehicle.pngbin1614 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/info_leftMenu_apps_ico.pngbin1632 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/info_leftMenu_calendar_ico.pngbin1868 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/info_leftMenu_services_ico.pngbin2493 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/info_leftMenu_travelLink_ico.pngbin3646 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/info_services_bg.pngbin11109 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/info_travelLink_sirius_logo.pngbin3627 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/menu_active.pngbin973 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/info/view_info_calendar.pngbin5924 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/list/list_item_bg.pngbin1099 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/list/list_item_pressed.pngbin1091 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/list/scrollbar/button-down-active.pngbin1407 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/list/scrollbar/button-up-active.pngbin1406 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/bcs-item_bgL.pngbin1472 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/bcs-item_bgL_pressed.png0
-rw-r--r--SDL_Core/src/components/HMI/images/media/bcs-item_bgR.pngbin1423 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/bcs-item_bgR_pressed.pngbin1407 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/bcs-item_bgS.pngbin1542 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/bcs-item_bgS_pressed.pngbin1541 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/bg.pngbin4614 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/btn_bg.pngbin1286 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/cd-next-btn.pngbin1744 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/cd-next-btn_pressed.pngbin1752 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/cd-prev-btn.pngbin1845 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/cd-prev-btn_pressed.pngbin1872 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/cd_play_btn.pngbin1999 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/divider_o.pngbin1136 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico-play.pngbin1162 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_arrow_down.pngbin1723 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_arrow_up.pngbin1726 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_back.pngbin1123 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_cd.pngbin2479 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_next.pngbin1423 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_pause.pngbin1134 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ico_prew.pngbin1435 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ls-item_bg.pngbin1481 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/ls-item_bg_act.pngbin1219 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/media/player_view.pngbin62443 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/bg.pngbin13851 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/del.pngbin207 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/dial.pngbin510 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/end.pngbin499 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/ico_phone.pngbin1204 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/keypad/center_btn.pngbin706 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/keypad/center_btn_pressed.pngbin699 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/keypad/left_btn.pngbin636 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/keypad/left_btn_pressed.pngbin624 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/keypad/right_btn.pngbin571 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/keypad/right_btn_pressed.pngbin563 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/menu_active.pngbin172 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/phone/menu_bg.pngbin555 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/sdl/Warning.pngbin7546 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/sdl/audio_icon.jpgbin5560 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/sdl/devices.pngbin632 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/sdl/new_apps.pngbin1424 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/sdl/progress.gifbin2327 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/images/sdl/progressindicator.gifbin7703 -> 0 bytes
-rw-r--r--SDL_Core/src/components/HMI/index.html174
-rw-r--r--SDL_Core/src/components/HMI/lib/ember-1.0.pre.js20709
-rw-r--r--SDL_Core/src/components/HMI/lib/ember-1.0.pre.min.js18
-rw-r--r--SDL_Core/src/components/HMI/lib/handlebars-1.0.0.beta.6.js1550
-rw-r--r--SDL_Core/src/components/HMI/lib/iscroll-lite.js594
-rw-r--r--SDL_Core/src/components/HMI/lib/jquery-1.7.2.js9404
-rw-r--r--SDL_Core/src/components/HMI/lib/jquery-1.7.2.min.js4
-rw-r--r--SDL_Core/src/components/HMI/locale/eng.js62
-rw-r--r--SDL_Core/src/components/HMI/locale/locale.js42
-rw-r--r--SDL_Core/src/components/application_manager/CMakeLists.txt347
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/application.h438
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/application_data_impl.h323
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/application_impl.h176
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/application_manager.h79
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/application_manager_impl.h610
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/command.h81
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/command_impl.h94
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/command_notification_impl.h64
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/command_request_impl.h178
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/command_response_impl.h68
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_response.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_request.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_response.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h69
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h58
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h78
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h78
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h78
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_show_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h77
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h77
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h75
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h85
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h71
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h141
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h88
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h87
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h129
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h124
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h163
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h97
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h82
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h99
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h80
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_request.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_response.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h80
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h70
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h80
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h94
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h74
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h86
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h85
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h75
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h77
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_encoded_sync_pdata_notification.h90
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h75
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_sync_pdata_notification.h91
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h82
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h87
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h220
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h80
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h183
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h149
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h89
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h68
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h80
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h113
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h88
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h81
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h85
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_request.h91
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_response.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h84
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h86
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h96
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_request.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_response.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_request.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h76
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h72
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h95
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h92
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/commands/pending.h75
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/event_engine/event.h147
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h117
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_observer.h116
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/hmi_capabilities.h515
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/hmi_command_factory.h65
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/message.h121
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/message_helper.h351
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/mobile_command_factory.h63
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/mobile_message_handler.h67
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h73
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/request_controller.h148
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/resume_ctrl.h221
-rw-r--r--SDL_Core/src/components/application_manager/include/application_manager/smart_object_keys.h312
-rw-r--r--SDL_Core/src/components/application_manager/src/application_data_impl.cc477
-rw-r--r--SDL_Core/src/components/application_manager/src/application_impl.cc359
-rw-r--r--SDL_Core/src/components/application_manager/src/application_manager_impl.cc1661
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/command_impl.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/command_notification_impl.cc74
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/command_request_impl.cc211
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/command_response_impl.cc88
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_request.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_response.cc72
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_response.cc65
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_request.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_response.cc52
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_request.cc23
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_response.cc52
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_response.cc53
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc73
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc23
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc52
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc100
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc66
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc113
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc62
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc65
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc60
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc85
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc88
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_find_applications.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_ready_notification.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_show_notification.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc95
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc91
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc62
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc93
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_update_device_list.cc52
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc108
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc91
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/request_to_hmi.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/response_from_hmi.cc105
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc66
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc62
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_response.cc52
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc75
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc60
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc66
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc54
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_response.cc54
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_request.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_response.cc54
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc91
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc62
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc66
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc62
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/add_command_request.cc364
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/add_command_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc145
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc198
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/alert_request.cc303
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/alert_response.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_request.cc288
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc244
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc68
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_request.cc180
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_request.cc96
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_response.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc115
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc77
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc178
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc81
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/dial_number_request.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_request.cc113
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_response.cc65
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc88
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/generic_response.cc65
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc104
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc294
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/list_files_request.cc90
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/list_files_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc120
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc120
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_command_notification.cc76
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc73
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_encoded_sync_pdata_notification.cc105
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc74
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc60
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc73
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc61
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_sync_pdata_notification.cc105
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc60
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc72
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc72
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc88
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc193
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc763
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/put_file_request.cc188
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/put_file_response.cc69
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/read_did_request.cc111
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/read_did_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc573
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc72
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc339
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc159
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc55
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc109
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc350
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_request.cc139
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc149
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc192
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/show_request.cc261
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/show_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/slider_request.cc148
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/slider_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/speak_request.cc120
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/speak_response.cc58
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc80
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc66
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc276
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_request.cc103
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_response.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/system_request.cc72
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/system_response.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc59
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc47
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc79
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc69
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc272
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc66
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc172
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc57
-rw-r--r--SDL_Core/src/components/application_manager/src/commands/pending.cc67
-rw-r--r--SDL_Core/src/components/application_manager/src/event_engine/event.cc56
-rw-r--r--SDL_Core/src/components/application_manager/src/event_engine/event_dispatcher.cc123
-rw-r--r--SDL_Core/src/components/application_manager/src/event_engine/event_observer.cc63
-rw-r--r--SDL_Core/src/components/application_manager/src/hmi_capabilities.cc691
-rw-r--r--SDL_Core/src/components/application_manager/src/hmi_command_factory.cc1880
-rw-r--r--SDL_Core/src/components/application_manager/src/message.cc186
-rw-r--r--SDL_Core/src/components/application_manager/src/message_helper.cc1593
-rw-r--r--SDL_Core/src/components/application_manager/src/mobile_command_factory.cc570
-rw-r--r--SDL_Core/src/components/application_manager/src/mobile_message_handler.cc218
-rw-r--r--SDL_Core/src/components/application_manager/src/policies_manager/policies_manager.cc201
-rw-r--r--SDL_Core/src/components/application_manager/src/request_controller.cc206
-rw-r--r--SDL_Core/src/components/application_manager/src/resume_ctrl.cpp529
-rw-r--r--SDL_Core/src/components/config_profile/CMakeLists.txt14
-rw-r--r--SDL_Core/src/components/config_profile/include/config_profile/ini_file.h133
-rw-r--r--SDL_Core/src/components/config_profile/include/config_profile/profile.h393
-rw-r--r--SDL_Core/src/components/config_profile/src/ini_file.cc411
-rw-r--r--SDL_Core/src/components/config_profile/src/profile.cc666
-rw-r--r--SDL_Core/src/components/connection_handler/CMakeLists.txt20
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/connection.h208
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler.h91
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_impl.h319
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_observer.h106
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/device.h123
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/devices_discovery_starter.h75
-rw-r--r--SDL_Core/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h75
-rw-r--r--SDL_Core/src/components/connection_handler/src/connection.cc174
-rw-r--r--SDL_Core/src/components/connection_handler/src/connection_handler_impl.cc580
-rw-r--r--SDL_Core/src/components/connection_handler/src/device.cc69
-rw-r--r--SDL_Core/src/components/connection_handler/src/heartbeat_monitor.cc85
-rw-r--r--SDL_Core/src/components/dbus/CMakeLists.txt42
-rw-r--r--SDL_Core/src/components/dbus/codegen/code_formatter.py57
-rw-r--r--SDL_Core/src/components/dbus/codegen/ford_xml_parser.py211
-rwxr-xr-xSDL_Core/src/components/dbus/codegen/make_introspection_c.py126
-rwxr-xr-xSDL_Core/src/components/dbus/codegen/make_message_descriptions.py273
-rwxr-xr-xSDL_Core/src/components/dbus/codegen/make_qml_dbus_cpp.py734
-rwxr-xr-xSDL_Core/src/components/dbus/codegen/make_qml_dbus_qml.py217
-rw-r--r--SDL_Core/src/components/dbus/include/dbus/dbus_adapter.h351
-rw-r--r--SDL_Core/src/components/dbus/include/dbus/dbus_message_controller.h85
-rw-r--r--SDL_Core/src/components/dbus/include/dbus/message_descriptions.h73
-rw-r--r--SDL_Core/src/components/dbus/include/dbus/schema.h98
-rw-r--r--SDL_Core/src/components/dbus/src/dbus_adapter.cc782
-rw-r--r--SDL_Core/src/components/dbus/src/dbus_message_controller.cc73
-rw-r--r--SDL_Core/src/components/dbus/src/schema.cc136
-rw-r--r--SDL_Core/src/components/formatters/CMakeLists.txt25
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/CFormatterJsonBase.hpp122
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.hpp238
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.hpp176
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/CSmartFactory.hpp422
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/formatter_json_rpc.h497
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/generic_json_formatter.h71
-rw-r--r--SDL_Core/src/components/formatters/include/formatters/meta_formatter.h78
-rw-r--r--SDL_Core/src/components/formatters/src/CFormatterJsonBase.cpp118
-rw-r--r--SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv1.cpp157
-rw-r--r--SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv2.cpp106
-rw-r--r--SDL_Core/src/components/formatters/src/CSmartFactory.cpp46
-rw-r--r--SDL_Core/src/components/formatters/src/formatter_json_rpc.cc204
-rw-r--r--SDL_Core/src/components/formatters/src/generic_json_formatter.cc63
-rw-r--r--SDL_Core/src/components/formatters/src/meta_formatter.cc60
-rw-r--r--SDL_Core/src/components/hmi_message_handler/CMakeLists.txt37
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h101
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h81
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h56
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h124
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h47
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h48
-rw-r--r--SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h90
-rw-r--r--SDL_Core/src/components/hmi_message_handler/src/dbus_message_adapter.cc196
-rw-r--r--SDL_Core/src/components/hmi_message_handler/src/hmi_message_adapter.cc44
-rw-r--r--SDL_Core/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc122
-rw-r--r--SDL_Core/src/components/hmi_message_handler/src/messagebroker_adapter.cc165
-rw-r--r--SDL_Core/src/components/interfaces/CMakeLists.txt50
-rw-r--r--SDL_Core/src/components/interfaces/HMI_API.xml3347
-rw-r--r--SDL_Core/src/components/interfaces/Json_HMI_message_specification.txt317
-rw-r--r--SDL_Core/src/components/interfaces/Json_Mobile_side_message_spec.txt62
-rw-r--r--SDL_Core/src/components/interfaces/MOBILE_API.xml4889
-rw-r--r--SDL_Core/src/components/interfaces/QT_HMI_API.xml3756
-rwxr-xr-xSDL_Core/src/components/interfaces/v4_protocol_v1_2_no_extra.xml1153
-rw-r--r--SDL_Core/src/components/media_manager/CMakeLists.txt75
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h67
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h135
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h67
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h67
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h100
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h51
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h50
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/media_adapter.h51
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/media_adapter_impl.h65
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/media_adapter_listener.h55
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/media_manager.h55
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/media_manager_impl.h92
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h114
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/socket_streamer_adapter.h136
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/streamer_listener.h61
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h51
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h51
-rw-r--r--SDL_Core/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h111
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc284
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/audio_stream_sender_thread.cc152
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc107
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_listener.cc99
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc272
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc54
-rw-r--r--SDL_Core/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc55
-rw-r--r--SDL_Core/src/components/media_manager/src/media_adapter_impl.cc58
-rw-r--r--SDL_Core/src/components/media_manager/src/media_manager_impl.cc323
-rw-r--r--SDL_Core/src/components/media_manager/src/pipe_streamer_adapter.cc225
-rw-r--r--SDL_Core/src/components/media_manager/src/socket_streamer_adapter.cc316
-rw-r--r--SDL_Core/src/components/media_manager/src/streamer_listener.cc80
-rw-r--r--SDL_Core/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc54
-rw-r--r--SDL_Core/src/components/media_manager/src/video/socket_video_streamer_adapter.cc54
-rw-r--r--SDL_Core/src/components/media_manager/src/video/video_stream_to_file_adapter.cc201
-rw-r--r--SDL_Core/src/components/policies/CMakeLists.txt22
-rw-r--r--SDL_Core/src/components/policies/include/policies/permissions_calculator.h140
-rw-r--r--SDL_Core/src/components/policies/include/policies/policy_configuration.h96
-rw-r--r--SDL_Core/src/components/policies/include/policies/policy_manager.h197
-rw-r--r--SDL_Core/src/components/policies/include/policies/policy_manager_impl.h126
-rw-r--r--SDL_Core/src/components/policies/include/policies/policy_table.h129
-rw-r--r--SDL_Core/src/components/policies/include/policies/policy_table_schema.h202
-rw-r--r--SDL_Core/src/components/policies/include/policies/preloaded_pt_schema.h75
-rw-r--r--SDL_Core/src/components/policies/src/permissions_calculator.cc234
-rw-r--r--SDL_Core/src/components/policies/src/policy_configuration.cc68
-rw-r--r--SDL_Core/src/components/policies/src/policy_manager_impl.cc175
-rw-r--r--SDL_Core/src/components/policies/src/policy_table.cc113
-rw-r--r--SDL_Core/src/components/policies/src/policy_table_schema.cc272
-rw-r--r--SDL_Core/src/components/policies/src/preloaded_pt_schema.cc92
-rw-r--r--SDL_Core/src/components/protocol_handler/CMakeLists.txt20
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/applink_protocol.h77
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/message_priority.h37
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler.h95
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h455
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_observer.h76
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_packet.h498
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_payload.h77
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/raw_message.h164
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/rpc_type.h60
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/service_type.h32
-rw-r--r--SDL_Core/src/components/protocol_handler/include/protocol_handler/session_observer.h145
-rw-r--r--SDL_Core/src/components/protocol_handler/src/applink_protocol.cc1
-rw-r--r--SDL_Core/src/components/protocol_handler/src/message_priority.cc26
-rw-r--r--SDL_Core/src/components/protocol_handler/src/protocol_handler_impl.cc781
-rw-r--r--SDL_Core/src/components/protocol_handler/src/protocol_packet.cc304
-rw-r--r--SDL_Core/src/components/protocol_handler/src/protocol_payload.cc97
-rw-r--r--SDL_Core/src/components/protocol_handler/src/raw_message.cc100
-rw-r--r--SDL_Core/src/components/protocol_handler/src/rpc_type.cc86
-rw-r--r--SDL_Core/src/components/protocol_handler/src/service_type.cc43
-rw-r--r--SDL_Core/src/components/qt_hmi/CMakeLists.txt38
-rw-r--r--SDL_Core/src/components/qt_hmi/Readme.txt7
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/EVALUATION USE LICENSE AGREEMENT.docbin41472 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Bold.ttfbin380840 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Md.ttfbin314564 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Roman.ttfbin332128 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-Lt.ttfbin246000 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-LtCn.ttfbin246040 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-ThCn.ttfbin260780 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Bold.ttfbin380840 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Md.ttfbin314564 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Roman.ttfbin332128 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/ImageHardkey.qml52
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/AlphaSortLayout.qml378
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/BlankLayout.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/ChromeLayout.qml69
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/ClimatePCALayout.qml111
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/ControlMirrorLayout.qml57
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayout.qml217
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayoutPCA.qml152
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/HomeLayout.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/ListLayout.qml59
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavInRouteLayout.qml130
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavKeyboardLayout.qml547
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavNoRouteLayout.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/OffLayout.qml71
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/PCAstatusBarLayout.qml123
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/PhoneContactsLayout.qml40
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/SiriusLayout.qml195
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/StartLayout.qml30
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/TC1_B1_Grid.qml37
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackImgLayoutPCA.qml76
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayout.qml107
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayoutPCA.qml73
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayout.qml132
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayoutPCA.qml155
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qml373
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qmlproject20
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/CButton.pngbin4607 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Ford-HMI-PCA-phone_contacts.psdbin1111637 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/HierarchicalListBG.pngbin40425 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Map.pngbin335952 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsInActive.pngbin5760 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsPressed_9_9.pngbin10538 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Options_9_9.pngbin10625 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/compass.pngbin3528 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/current street.pngbin5491 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIcon.pngbin2892 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIconBlack.pngbin2898 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIcon.pngbin3097 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIconBlack.pngbin3000 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/turnArrow.pngbin2894 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/OButton.pngbin5287 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonCenter_0_8.pngbin2861 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonEnd_8_8.pngbin3859 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonOtherEnd_8_8.pngbin3911 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/Ford-HMI-PCA-audio_fm_sirius.pngbin42473 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo.pngbin3609 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo1.pngbin3543 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HDBtn_8_8.pngbin5292 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/SourceBtn_8_8.pngbin5251 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/TuneBtn_8_8.pngbin5059 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/blueBall.pngbin2874 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/menuIcon_2_2.pngbin2850 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/perlJamIcon_0_0.pngbin13194 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/whiteBall.pngbin2866 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/NextPressed_9_9.pngbin11177 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Next_9_9.pngbin11472 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/PrevPressed_9_9.pngbin11089 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Prev_9_9.pngbin11325 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/albumArt.pngbin45068 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause.pngbin3276 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pausePressed_9_9.pngbin12559 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause_9_9.pngbin13816 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/playPressed_9_9.pngbin12335 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/play_9_9.pngbin13219 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/Ambient Lighti Icon.pngbin3744 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/EV Icon.pngbin4227 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/MCS Icon.pngbin4054 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/SYNC Services.pngbin3578 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/cal.pngbin3699 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/folders.pngbin3337 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/key_car.pngbin4426 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/sun.pngbin4773 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/album artRazorFish.pngbin95149 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keyPressed_9_9.pngbin10154 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keySelected.pngbin4396 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/key_9_9.pngbin9590 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteActive.pngbin5614 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteInActive.pngbin4903 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mutePressed_9_9.pngbin10510 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mute_9_9.pngbin11248 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetPressed_9_9.pngbin8915 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetSelected.pngbin4017 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/preset_9_9.pngbin8401 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomPressed_9_9.pngbin8107 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomSelected.pngbin3611 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoom_9_9.pngbin8490 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C icon.pngbin3566 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C iconBlack.pngbin3871 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonActive_0_0.pngbin5166 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonInActive_0_0.pngbin4264 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonPressed_9_9.pngbin13064 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/Button_9_9.pngbin12252 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost icon.pngbin3509 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost iconBlue.pngbin3887 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face icon.pngbin3593 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face iconBlack.pngbin3931 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet icon.pngbin3568 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet iconBlack.pngbin3878 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dash.pngbin3326 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dashBlue.pngbin3638 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat icon.pngbin3967 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat iconBlack.pngbin4406 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ring.pngbin10987 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel icon.pngbin3807 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel iconBlack.pngbin4272 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/dn-arrow.pngbin1097 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/g136p.pngbin274 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/g137p.pngbin357 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/arrow.pngbin3745 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/car.pngbin4114 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/gear.pngbin4806 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/notes.pngbin1962 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/phone.pngbin2528 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/snow.pngbin3976 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDoff.pngbin7073 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDon.pngbin5564 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/contacts.pngbin4036 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/keypad.pngbin3200 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/messages.pngbin2576 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/more.pngbin3447 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/recent.pngbin3104 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/texts.pngbin3917 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/scrollbar.pngbin1008 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/slider.pngbin1017 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Resources/up-arrow.pngbin1101 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/TextHardkey.qml52
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/AM.qml86
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/AMPCA.qml122
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/AlphaSortPCA.qml151
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/AuxPCA.qml41
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/BT_AudioPCA.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/CDPCA.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/Chrome.qml55
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/ClimatePCA.qml74
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/ControlMirror.qml55
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/FM.qml94
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/FMPCA.qml175
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/GenListHandling.qml14
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/GridMenuPCA.qml87
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/Home.qml50
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/List.qml74
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/MenuTopLevelGrid.qml85
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/MyVehiclePCA.qml85
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/NavInRoute.qml38
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/NavKeyboardPCA.qml159
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/NavMenu.qml85
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/NavNoRoute.qml35
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/Off.qml34
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/On.qml38
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/PCAstatusBar.qml37
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/PhoneContactsListView.qml104
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/PhonePCA.qml85
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandling.qml37
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandlingPCA.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/SDL_MusicPCA.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/Sirius.qml71
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/SiriusPCA.qml115
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChange.qml73
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChangePCA.qml105
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/Start.qml43
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/USB.qml59
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/USBPCA.qml49
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Views/iPodPCA.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/FocusListViewLayout.qml34
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewImgItemLayout.qml25
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewItemLayout.qml24
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewLayout.qml56
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetItemLayout.qml22
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetLayout.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PhoneListWdgtLayout.qml50
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetGridLayoutPCA.qml40
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetPCALayout.qml40
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/SimpleItemWdgLayout.qml24
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TGListItemLayout.qml50
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonBackGroundPCALayout.qml97
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonClimatePCALayout.qml143
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCALayout.qml95
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCASpecialLayout.qml325
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/BaseText.qml50
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/CondText.qml14
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/FocusListViewWidget.qml45
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewImgItemWidget.qml31
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewItemWidget.qml32
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetItemWidget.qml41
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetWidget.qml35
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewWidget.qml31
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuListItemWidget.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuSubmenuListItemWidget.qml60
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/PhoneContactListItemWdgt.qml28
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetPCA.qml27
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetsGridPCA.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/ScrollBar.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton.qml77
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton2.qml32
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonBackGround_PCA.qml27
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonClimatePCA.qml38
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonSpecial_PCA.qml34
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton_PCA.qml27
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/Widgets/VerySimpleListItemWidget.qml18
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/QtHMIFrameworkd.pdbbin5516288 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/plugin.qmltypes682
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml40
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtContainer.qml8
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtGridView.qml35
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtImage.qml43
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtListView.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtPathView.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollbar.qml104
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollview.qml7
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtText.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtTouchAreaEnums.js12
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActScriptCall.qml13
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActSystemModelCall.qml14
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActTimer.qml25
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetCall.qml13
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetProperty.qml13
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimViewHide.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimationEnums.js7
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FConditionPool.qml5
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FDataPool.qml5
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FEventPool.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FGaugeValue.qml51
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FHardwareKeyEnums.js9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.js132
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.qml28
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyle.qml56
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyler.qml41
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimer.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimerEnums.js5
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTrgTimer.qml19
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCase.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseGroup.qml7
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseSimple.qml15
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseTransition.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qmldir35
-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.pngbin3400 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas80.pngbin4945 -> 0 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.pngbin4369 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BackIcon.pngbin2975 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BluetoothIcon.pngbin6876 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CMaxCal.pngbin10475 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeBottom.pngbin16926 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeTop.pngbin13849 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Cloud.pngbin4471 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CloudNight.pngbin3848 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/FunArtwork.pngbin49513 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/MapMich.pngbin1035032 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/SiriusArtwork.pngbin16044 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Crosshairs.pngbin5932 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DeleteIcon.pngbin2890 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DndIcon.pngbin8217 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/EvIcon.pngbin7355 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/FavoritesIcon.pngbin6218 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Forward.pngbin3072 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/HomeIcon.pngbin5305 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeyboardIcon.pngbin4473 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadEntryIcon.pngbin5374 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadIcon.pngbin5073 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/LightingIcon.pngbin6456 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Loop.pngbin3115 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MediaTab.pngbin3992 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MessagesIcon.pngbin4974 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MissingArtwork.pngbin55017 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/NavigationTab.pngbin4821 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PandoraIcon.pngbin6918 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Pause.pngbin2826 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneCornerIcons.pngbin4156 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneIcons.pngbin7277 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneTab.pngbin4759 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhonebookIcon.pngbin5748 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Play.pngbin3020 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PoiIcon.pngbin4517 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RadioIcon.pngbin9198 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentCallsIcon.pngbin5831 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentDestinationsIcon.pngbin5807 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Rewind.pngbin3092 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RightTurn.pngbin8684 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ScoutIcon.pngbin6611 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SearchIcon.pngbin395 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SeatsIcon.pngbin7897 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ServicesIcon.pngbin5832 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Shuffle.pngbin3149 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SiriusIcon.pngbin6570 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SpeedDialIcon.pngbin5976 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/UsbIcon.pngbin3592 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleCornerIcon.pngbin31003 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleTab.pngbin4741 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VhrIcon.pngbin7070 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VoicemailIcon.pngbin7500 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WallpaperIcon.pngbin4767 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WifiIcon.pngbin8214 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WorkIcon.pngbin4698 -> 0 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.swpbin12288 -> 0 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.swpbin12288 -> 0 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
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/.gitignore9
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/CMakeLists.txt87
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/MainWindow.qml356
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ArrowKeys.qml68
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/BackButton.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CheckBox.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CircleButton.qml87
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableImage.qml66
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableText.qml77
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClimateControlBtn.qml93
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ComboBox.qml143
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GradientRectangle.qml125
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GridItem.qml53
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HardwareButton.qml108
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HeaderMenu.qml134
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Icon.qml65
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ListItem.qml70
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MaskedButton.qml64
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MultiTouchArea.qml77
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/OvalButton.qml240
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PagedFlickable.qml105
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Pager.qml53
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PlayPauseButton.qml77
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PowerSwitchButton.qml75
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PresetRow.qml106
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PushButton.qml136
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableListView.qml49
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableText.qml70
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.js39
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.qml104
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/StatusBar.qml42
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js7
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml88
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml127
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml115
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml449
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml93
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml749
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/log4cxx.properties41
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationData.qml57
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationModel.qml91
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/CarMenuModel.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Constants.js249
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ContactsListModel.qml98
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/DataStorage.qml510
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/InteractionModel.qml58
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Internal.js163
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MainMenuListModel.qml79
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MediaClockModel.qml112
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MusicSourceModel.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationMenuModel.qml72
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationModel.qml52
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PerformAudioPassThruModel.qml43
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PhoneMenuModel.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PlayerState.qml51
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ScrollableMessageModel.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SettingsStorage.qml125
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SliderModel.qml45
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/models/VehicleInfoModel.qml234
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml285
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml56
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml81
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml103
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml149
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml94
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml214
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml71
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml79
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml92
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml92
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml111
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/qml_model.qmlproject20
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/AMPlayerView.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ApplicationListView.qml123
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/BTPlayerView.qml62
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CDPlayerView.qml63
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CarMenuGridView.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ChangeDeviceView.qml102
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ClimateControlView.qml94
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ContactsListView.qml118
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/FMPlayerView.qml121
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GeneralView.qml45
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GridMenu.qml86
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/HardwareButtonsView.qml173
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/IPodPlayerView.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/LineInPlayerView.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MainMenuView.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaClockView.qml73
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaPlayer.qml325
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MusicSourceView.qml75
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationInRouteGridView.qml250
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationKeyboardView.qml221
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationMenuView.qml75
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationNoRouteGridView.qml205
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneKeyboardView.qml171
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneMenuGridView.qml55
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/RadioPlayer.qml160
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNavi.qml223
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNonMediaView.qml194
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerOptionsListView.qml120
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerView.qml79
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ScrollableMessageView.qml216
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SimulationView.qml284
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SiriusPlayerView.qml46
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnByTurnView.qml201
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnListView.qml103
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/UsbPlayerView.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/views/WarningInfo.qml135
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/.gitignore9
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/CMakeLists.txt87
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/MainWindow.qml409
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml68
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml87
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml66
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml77
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml93
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml125
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml53
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml108
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml134
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml65
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml70
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml64
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml103
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml246
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml105
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml53
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml77
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml75
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml106
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml136
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml49
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js39
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml97
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml42
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Async.js7
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/BasicCommunication.qml139
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Buttons.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Navigation.qml246
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/TTS.qml203
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml721
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml114
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VehicleInfo.qml761
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/log4cxx.properties41
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationData.qml57
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationModel.qml103
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/CarMenuModel.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Constants.js250
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ContactsListModel.qml98
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml651
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Internal.js176
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MainMenuListModel.qml79
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml112
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MusicSourceModel.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationMenuModel.qml72
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationModel.qml50
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PerformAudioPassThruModel.qml43
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PhoneMenuModel.qml78
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PlayerState.qml51
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ScrollableMessageModel.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SettingsStorage.qml125
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SliderModel.qml45
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VehicleInfoModel.qml234
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VrHelpItemsDefault.qml66
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/AlertWindow.qml290
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ContextPopup.qml56
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ExitAllApplicationsPopup.qml82
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml157
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PerformAudioPassThruPopup.qml150
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PopUp.qml94
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/SliderPopup.qml217
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TBTClientStatePopUp.qml71
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml104
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRHelpPopup.qml113
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml92
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VehicleInfoPopUp.qml112
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/qml_model.qmlproject20
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/AMPlayerView.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ApplicationListView.qml125
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/BTPlayerView.qml62
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CDPlayerView.qml63
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CarMenuGridView.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ChangeDeviceView.qml102
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ClimateControlView.qml94
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ContactsListView.qml118
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/FMPlayerView.qml121
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GeneralView.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GridMenu.qml86
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/HardwareButtonsView.qml175
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/IPodPlayerView.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/LineInPlayerView.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MainMenuView.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaClockView.qml73
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaPlayer.qml312
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MusicSourceView.qml75
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationInRouteGridView.qml250
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationKeyboardView.qml221
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationMenuView.qml75
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationNoRouteGridView.qml205
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneKeyboardView.qml171
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneMenuGridView.qml55
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/RadioPlayer.qml160
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNavi.qml223
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNonMediaView.qml179
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml120
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerView.qml79
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml173
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SimulationView.qml293
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SiriusPlayerView.qml46
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnByTurnView.qml202
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnListView.qml103
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/UsbPlayerView.qml61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt5/views/WarningInfo.qml135
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/CMakeLists.txt41
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/CMakeLists.txt116
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc89
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h64
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc93
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h68
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc46
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h64
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h61
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h83
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h232
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h47
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.cc110
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.h76
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc68
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h42
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/CMakeLists.txt85
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc39
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h64
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc58
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h59
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc155
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h89
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h47
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/CMakeLists.txt83
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc108
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h77
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/CMakeLists.txt84
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc59
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h65
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc52
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h59
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qmldir2
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h47
-rw-r--r--SDL_Core/src/components/qt_hmi/res/SPT.pngbin11718 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/album_art.pngbin45068 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/app_911_assist.pngbin6982 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/app_vehicle_info.pngbin4842 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/apps.pngbin5957 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/arrow.pngbin3745 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/blue_ball.pngbin2874 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/long_oval_btn.pngbin5251 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/long_oval_pressed_btn.pngbin5042 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn.pngbin5292 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn_pressed.pngbin4977 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_bottom.pngbin2817 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_left.pngbin3893 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_left.pngbin3735 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_right.pngbin3755 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_right.pngbin3881 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_top.pngbin2814 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_next_btn.pngbin11472 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_next_pressed_btn.pngbin11177 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_pause_btn.pngbin6666 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_pause_pressed_btn.pngbin6268 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_play_btn.pngbin13219 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_play_pressed_btn.pngbin12335 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_prev_btn.pngbin11325 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/player_prev_pressed_btn.pngbin11089 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/preset_btn.pngbin8401 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/preset_pressed_btn.pngbin8915 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/round_btn.pngbin9590 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/round_pressed_btn.pngbin10154 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn.pngbin5059 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn_pressed.pngbin4733 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/zoom.pngbin8490 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/buttons/zoom_pressed.pngbin8107 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/car.pngbin4114 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/change_devices.pngbin5188 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/AC_off.pngbin3566 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/AC_on.pngbin3871 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/climate_round_off_btn.pngbin12252 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/climate_round_on_btn.pngbin13064 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/defrost_off.pngbin3887 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/defrost_on.pngbin3509 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/face_off.pngbin3593 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/face_on.pngbin3931 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/feet_off.pngbin3568 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/feet_on.pngbin3878 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/headed_dash_off.pngbin3638 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/headed_dash_on.pngbin3326 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/heated_seat_off.pngbin3967 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/heated_seat_on.pngbin4406 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_off.pngbin3807 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_on.pngbin4272 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton.pngbin4688 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton_pressed.pngbin4612 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton.pngbin5170 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton_pressed.pngbin5269 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton.pngbin4497 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton_pressed.pngbin4622 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton.pngbin5242 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton_pressed.pngbin5138 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton.pngbin4553 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton_pressed.pngbin4681 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/backGroundControllButtons.pngbin3157 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton.pngbin5429 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton_pressed.pngbin6165 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/controlButtons/vrImage.pngbin2461 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/find_apps.pngbin4085 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/gear.pngbin4806 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/hd_logo_off.pngbin3543 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/hd_logo_on.pngbin3609 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/initial.wavbin46834 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/install_apps.pngbin6517 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/compass.pngbin3552 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/current_street.pngbin5491 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/delete_icon.pngbin2892 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/delete_icon_black.pngbin2898 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/dest_icon.pngbin3097 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/dest_icon_black.pngbin3000 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/map.pngbin332637 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/mute_off.pngbin11248 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/mute_on.pngbin4334 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/options.pngbin10625 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/options_in_active.pngbin5760 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/options_pressed.pngbin10538 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/nav/turnArrow.pngbin2894 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/notes.pngbin1962 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/contacts.pngbin4036 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/dnd_off.pngbin7073 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/dnd_on.pngbin5564 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/keypad.pngbin3200 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/messages.pngbin2576 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/more.pngbin3447 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/phone.pngbin2528 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/recent.pngbin3104 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/phone/texts.pngbin3917 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/snow.pngbin3976 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/Ambient Lighti Icon.pngbin3744 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/EV Icon.pngbin4227 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/MCS Icon.pngbin4054 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/SYNC Services.pngbin3578 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/cal.pngbin3699 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/folders.pngbin3337 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/key_car.pngbin4426 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/vehicle/sun.pngbin4773 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/warning.pngbin7546 -> 0 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/res/white_ball.pngbin2866 -> 0 bytes
-rw-r--r--SDL_Core/src/components/request_watchdog/CMakeLists.txt15
-rw-r--r--SDL_Core/src/components/request_watchdog/include/request_watchdog/request_info.h62
-rw-r--r--SDL_Core/src/components/request_watchdog/include/request_watchdog/request_watchdog.h227
-rw-r--r--SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog.h134
-rw-r--r--SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog_subscriber.h58
-rw-r--r--SDL_Core/src/components/request_watchdog/src/request_info.cc64
-rw-r--r--SDL_Core/src/components/request_watchdog/src/request_watchdog.cc371
-rw-r--r--SDL_Core/src/components/request_watchdog/src/watchdog.cc48
-rw-r--r--SDL_Core/src/components/resumption/CMakeLists.txt11
-rw-r--r--SDL_Core/src/components/resumption/include/resumption/last_state.h101
-rw-r--r--SDL_Core/src/components/resumption/src/last_state.cc112
-rw-r--r--SDL_Core/src/components/rpc_base/CMakeLists.txt18
-rw-r--r--SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base.h297
-rw-r--r--SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_inl.h407
-rw-r--r--SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h245
-rw-r--r--SDL_Core/src/components/rpc_base/include/rpc_base/rpc_message.h95
-rw-r--r--SDL_Core/src/components/rpc_base/src/rpc_base/rpc_base.cc36
-rw-r--r--SDL_Core/src/components/rpc_base/src/rpc_base/rpc_message.cc39
-rw-r--r--SDL_Core/src/components/smart_objects/CMakeLists.txt22
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/always_false_schema_item.h92
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/always_true_schema_item.h92
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/array_schema_item.h151
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/bool_schema_item.h124
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/enum_schema_item.h302
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/errors.h80
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/number_schema_item.h282
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/object_optional_schema_item.h170
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/object_schema_item.h164
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/schema_item.h96
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/schema_item_parameter.h115
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/smart_object.h942
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/smart_schema.h116
-rw-r--r--SDL_Core/src/components/smart_objects/include/smart_objects/string_schema_item.h145
-rw-r--r--SDL_Core/src/components/smart_objects/src/always_false_schema_item.cc48
-rw-r--r--SDL_Core/src/components/smart_objects/src/always_true_schema_item.cc48
-rw-r--r--SDL_Core/src/components/smart_objects/src/array_schema_item.cc121
-rw-r--r--SDL_Core/src/components/smart_objects/src/bool_schema_item.cc79
-rw-r--r--SDL_Core/src/components/smart_objects/src/enum_schema_item.cc31
-rw-r--r--SDL_Core/src/components/smart_objects/src/number_schema_item.cc49
-rw-r--r--SDL_Core/src/components/smart_objects/src/object_optional_schema_item.cc186
-rw-r--r--SDL_Core/src/components/smart_objects/src/object_schema_item.cc151
-rw-r--r--SDL_Core/src/components/smart_objects/src/schema_item.cc55
-rw-r--r--SDL_Core/src/components/smart_objects/src/smart_object.cc1015
-rw-r--r--SDL_Core/src/components/smart_objects/src/smart_schema.cc66
-rw-r--r--SDL_Core/src/components/smart_objects/src/string_schema_item.cc107
-rw-r--r--SDL_Core/src/components/transport_manager/CMakeLists.txt81
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h98
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h128
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h178
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h83
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h81
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/common.h86
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/error.h147
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/info.h161
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h133
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h117
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h99
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h149
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h112
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h88
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h91
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h84
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device.h128
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h86
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h89
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h165
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter.h251
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h192
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_event.h163
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h498
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h252
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h303
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager.h166
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_default.h71
-rwxr-xr-xSDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_impl.h495
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener.h170
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener_empty.h189
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/common.h82
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h78
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h100
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h100
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h78
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h101
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h85
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h64
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h67
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h105
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device.h74
-rw-r--r--SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h78
-rw-r--r--SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc77
-rw-r--r--SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device.cc98
-rw-r--r--SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc487
-rw-r--r--SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc132
-rw-r--r--SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc144
-rw-r--r--SDL_Core/src/components/transport_manager/src/tcp/dnssd_service_browser.cc326
-rw-r--r--SDL_Core/src/components/transport_manager/src/tcp/tcp_client_listener.cc261
-rw-r--r--SDL_Core/src/components/transport_manager/src/tcp/tcp_connection_factory.cc72
-rw-r--r--SDL_Core/src/components/transport_manager/src/tcp/tcp_device.cc113
-rw-r--r--SDL_Core/src/components/transport_manager/src/tcp/tcp_socket_connection.cc117
-rw-r--r--SDL_Core/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc146
-rw-r--r--SDL_Core/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc357
-rw-r--r--SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_event.cc93
-rw-r--r--SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc614
-rw-r--r--SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc241
-rw-r--r--SDL_Core/src/components/transport_manager/src/transport_manager_default.cc71
-rw-r--r--SDL_Core/src/components/transport_manager/src/transport_manager_impl.cc966
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc79
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/libusb/usb_connection.cc313
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/libusb/usb_handler.cc418
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc75
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/qnx/usb_connection.cc399
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/qnx/usb_handler.cc296
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/usb_aoa_adapter.cc80
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/usb_connection_factory.cc91
-rw-r--r--SDL_Core/src/components/transport_manager/src/usb/usb_device_scanner.cc213
-rw-r--r--SDL_Core/src/components/utils/CMakeLists.txt34
-rw-r--r--SDL_Core/src/components/utils/include/utils/atomic.h69
-rw-r--r--SDL_Core/src/components/utils/include/utils/back_trace.h75
-rw-r--r--SDL_Core/src/components/utils/include/utils/bitstream.h170
-rw-r--r--SDL_Core/src/components/utils/include/utils/conditional_variable.h94
-rw-r--r--SDL_Core/src/components/utils/include/utils/date_time.h56
-rw-r--r--SDL_Core/src/components/utils/include/utils/dict.h225
-rw-r--r--SDL_Core/src/components/utils/include/utils/file_system.h207
-rw-r--r--SDL_Core/src/components/utils/include/utils/lock.h132
-rw-r--r--SDL_Core/src/components/utils/include/utils/logger.h72
-rw-r--r--SDL_Core/src/components/utils/include/utils/macro.h77
-rw-r--r--SDL_Core/src/components/utils/include/utils/memory_barrier.h54
-rw-r--r--SDL_Core/src/components/utils/include/utils/message_queue.h181
-rw-r--r--SDL_Core/src/components/utils/include/utils/prioritized_queue.h89
-rw-r--r--SDL_Core/src/components/utils/include/utils/shared_ptr.h342
-rw-r--r--SDL_Core/src/components/utils/include/utils/signals.h44
-rw-r--r--SDL_Core/src/components/utils/include/utils/singleton.h179
-rw-r--r--SDL_Core/src/components/utils/include/utils/stl_utils.h81
-rw-r--r--SDL_Core/src/components/utils/include/utils/threads/message_loop_thread.h136
-rw-r--r--SDL_Core/src/components/utils/include/utils/threads/thread.h237
-rw-r--r--SDL_Core/src/components/utils/include/utils/threads/thread_delegate.h71
-rw-r--r--SDL_Core/src/components/utils/include/utils/threads/thread_manager.h117
-rw-r--r--SDL_Core/src/components/utils/include/utils/threads/thread_options.h107
-rw-r--r--SDL_Core/src/components/utils/include/utils/threads/thread_validator.h105
-rw-r--r--SDL_Core/src/components/utils/include/utils/timer_thread.h336
-rw-r--r--SDL_Core/src/components/utils/src/back_trace.cc107
-rw-r--r--SDL_Core/src/components/utils/src/bitstream.cc134
-rw-r--r--SDL_Core/src/components/utils/src/conditional_variable_posix.cc154
-rw-r--r--SDL_Core/src/components/utils/src/date_time.cc74
-rw-r--r--SDL_Core/src/components/utils/src/file_system.cc404
-rw-r--r--SDL_Core/src/components/utils/src/lock_posix.cc126
-rw-r--r--SDL_Core/src/components/utils/src/signals_linux.cc57
-rw-r--r--SDL_Core/src/components/utils/src/threads/posix_thread.cc189
-rw-r--r--SDL_Core/src/components/utils/src/threads/thread_manager.cc120
-rw-r--r--SDL_Core/src/components/utils/src/threads/thread_validator.cc95
-rw-r--r--SDL_Core/src/thirdPartyLibs/CMakeLists.txt14
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/CMakeLists.txt32
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBroker.hpp102
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBrokerRegistry.hpp98
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/CSender.hpp53
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/MBDebugHelper.h40
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_client.hpp135
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_controller.hpp236
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_server.hpp121
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpclient.hpp58
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpserver.hpp150
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/networking.h139
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/system.h320
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/include/websocket_handler.hpp226
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_client.cpp73
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_controller.cpp342
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_tcpclient.cpp58
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.cpp59
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.hpp68
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.cpp125
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.hpp96
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.cpp191
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.hpp117
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.cpp245
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.hpp19
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBroker.cpp778
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp139
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/libMBDebugHelper.h43
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.cpp373
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.h93
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/system.cpp258
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/websocket_handler.cpp655
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_server.cpp55
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_tcpserver.cpp333
-rw-r--r--SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/networking.cpp202
-rw-r--r--SDL_Core/src/thirdPartyLibs/encryption/CMakeLists.txt9
-rw-r--r--SDL_Core/src/thirdPartyLibs/encryption/include/encryption/Base64.h9
-rw-r--r--SDL_Core/src/thirdPartyLibs/encryption/src/Base64.cpp123
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CHANGES92
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CMakeLists.txt151
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CONTRIBUTORS40
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/COPYING28
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.am209
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.in1321
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/README354
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/aclocal.m49139
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.guess1533
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.h.in69
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.sub1693
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/depcomp630
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/install-sh520
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/ltmain.sh8413
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/missing376
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure17795
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure.ac146
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock-gtest-all.cc10554
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock/gmock.h12822
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock_main.cc54
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gtest/gtest.h19537
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CHANGES130
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CMakeLists.txt240
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CONTRIBUTORS37
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/COPYING28
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.am302
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.in1329
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/README424
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/aclocal.m41178
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.guess1533
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.h.in69
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.sub1693
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/depcomp630
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/install-sh520
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/ltmain.sh8413
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/missing376
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/cmake/internal_utils.cmake216
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.cbproj138
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.groupproj54
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_all.cc38
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_link.cc40
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_main.cbproj82
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_unittest.cbproj88
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure17482
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure.ac68
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest-all.cc9118
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest.h19537
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest_main.cc39
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-death-test.h283
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-message.h230
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h1421
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h.pump487
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-printers.h796
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-spi.h232
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-test-part.h176
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-typed-test.h259
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest.h2155
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_pred_impl.h358
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_prod.h58
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-death-test-internal.h308
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-filepath.h210
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-internal.h1226
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-linked_ptr.h233
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h4822
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h.pump301
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util.h619
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-port.h1775
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-string.h350
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h968
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h.pump336
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h3330
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h.pump296
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/acx_pthread.m4363
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/gtest.m474
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/libtool.m47377
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltoptions.m4368
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltsugar.m4123
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltversion.m423
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/lt~obsolete.m492
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.sln45
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.vcproj126
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.sln45
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.vcproj126
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main-md.vcproj129
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main.vcproj129
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test-md.vcproj164
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test.vcproj164
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest-md.vcproj147
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest.vcproj147
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/prime_tables.h123
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.cc68
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.h43
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample10_unittest.cc145
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1_unittest.cc153
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.cc56
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.h86
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2_unittest.cc109
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3-inl.h173
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3_unittest.cc151
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.cc46
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.h53
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4_unittest.cc45
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample5_unittest.cc199
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample6_unittest.cc224
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample7_unittest.cc130
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample8_unittest.cc173
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample9_unittest.cc160
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/fuse_gtest_files.py250
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gen_gtest_pred_impl.py730
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gtest-config.in274
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/pump.py847
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-all.cc48
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-death-test.cc1234
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-filepath.cc380
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-internal-inl.h1038
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-port.cc746
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-printers.cc356
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-test-part.cc110
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-typed-test.cc110
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest.cc4898
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest_main.cc39
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_ex_test.cc93
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_test.cc1296
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-filepath_test.cc696
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-linked_ptr_test.cc155
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-listener_test.cc313
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-message_test.cc166
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-options_test.cc212
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test2_test.cc65
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.cc895
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.h55
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-port_test.cc1206
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-printers_test.cc1307
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-test-part_test.cc208
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-tuple_test.cc320
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test2_test.cc45
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.cc360
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.h66
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-unittest-api_test.cc341
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_all_test.cc47
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest.py218
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest_.cc88
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test.py220
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test_.cc308
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test.py130
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test_.cc71
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test.py103
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test_.cc126
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_environment_test.cc191
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest.py633
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest_.cc140
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test.py172
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test_.cc46
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest.py177
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest_.cc85
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_main_unittest.cc45
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_no_test_unittest.cc57
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test.py335
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_.cc1020
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_golden_lin.txt711
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_pred_impl_unittest.cc2427
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_prod_test.cc57
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_repeat_test.cc253
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test.py325
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test_.cc104
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_sole_header_test.cc57
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_stress_test.cc257
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_test_utils.py305
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_ex_test.cc92
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test.py171
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test_.cc56
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test.py70
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test_.cc43
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_unittest.cc7337
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile1_test_.cc49
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile2_test_.cc49
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfiles_test.py132
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest.py242
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest_.cc174
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_test_utils.py179
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.cc36
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.h55
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/DebugProject.xcconfig30
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/FrameworkTarget.xcconfig17
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/General.xcconfig41
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/ReleaseProject.xcconfig32
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/StaticLibraryTarget.xcconfig18
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/TestTarget.xcconfig8
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Resources/Info.plist30
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/Info.plist28
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj457
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/runtests.sh62
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.cc63
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.h59
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget_test.cc68
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/runtests.sh65
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/versiongenerate.py100
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/gtest.xcodeproj/project.pbxproj1084
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-actions.h1076
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-cardinalities.h146
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h2419
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h.pump825
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h929
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h.pump258
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h2054
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h.pump651
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h274
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h.pump160
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-matchers.h3066
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-more-actions.h233
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-spec-builders.h1749
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock.h93
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h277
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h.pump136
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-internal-utils.h463
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-port.h78
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.sln32
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.vcproj191
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_config.vsprops15
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_main.vcproj187
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_test.vcproj201
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.sln32
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.vcxproj82
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_config.props19
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_main.vcxproj88
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_test.vcxproj101
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/fuse_gmock_files.py240
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/COPYING203
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README35
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README.cppclean115
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/__init__.py0
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/ast.py1723
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/gmock_class.py192
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/keywords.py59
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/tokenize.py287
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/utils.py41
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/gmock_gen.py31
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/gmock-config.in303
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-all.cc47
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-cardinalities.cc155
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-internal-utils.cc173
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-matchers.cc101
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-spec-builders.cc797
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock.cc182
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock_main.cc54
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-actions_test.cc1305
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-cardinalities_test.cc428
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-actions_test.cc1212
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-function-mockers_test.cc540
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-internal-utils_test.cc127
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-matchers_test.cc1127
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-internal-utils_test.cc655
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-matchers_test.cc4040
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-more-actions_test.cc704
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-nice-strict_test.cc284
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-port_test.cc43
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-spec-builders_test.cc2484
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_all_test.cc48
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test.py90
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test_.cc100
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link2_test.cc40
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.cc40
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.h669
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test.py180
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_.cc290
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_golden.txt310
-rw-r--r--SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test.cc255
-rwxr-xr-xSDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test_utils.py111
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/AUTHORS1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/CMakeLists.txt11
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/LICENSE55
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/NEWS.txt101
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/README.txt172
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/SConstruct248
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/amalgamate.py147
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/__init__.py1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/antglob.py201
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/fixeol.py63
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/licenseupdater.py93
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/tarball.py53
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doc/doxyfile.in1534
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doc/footer.html23
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doc/header.html24
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doc/jsoncpp.dox126
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doc/readme.txt1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doc/roadmap.dox37
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/doxybuild.py169
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/autolink.h24
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/config.h96
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/features.h49
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/forwards.h44
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/json.h15
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/reader.h214
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/value.h1103
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/writer.h185
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsoncpp.sln46
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsontest.vcproj119
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/lib_json.vcproj214
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/test_lib_json.vcproj130
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/makerelease.py380
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/globtool.py53
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/srcdist.py179
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/substinfile.py79
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/targz.py82
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/main.cpp269
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/sconscript9
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_batchallocator.h130
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalarray.inl456
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalmap.inl615
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_reader.cpp884
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_tool.h93
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_value.cpp1830
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_valueiterator.inl299
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_writer.cpp838
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/sconscript8
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.cpp608
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.h259
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/main.cpp430
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/sconscript10
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/cleantests.py10
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/fail_test_array_01.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.expected6
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.expected5
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.expected100
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.expected5
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.json4
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.expected3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.json4
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.expected8
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.json8
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.expected20
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.json17
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.expected2122
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.expected4
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.json5
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.expected3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.json14
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.expected3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.expected3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.expected3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.json3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.expected1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.expected2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/generate_expected.py11
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail1.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail10.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail11.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail12.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail13.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail14.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail15.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail16.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail17.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail18.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail19.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail2.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail20.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail21.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail22.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail23.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail24.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail25.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail26.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail27.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail28.json2
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail29.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail3.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail30.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail31.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail32.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail33.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail4.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail5.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail6.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail7.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail8.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail9.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass1.json58
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass2.json1
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass3.json6
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/readme.txt3
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/pyjsontestrunner.py64
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/runjsontests.py134
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/test/rununittests.py73
-rw-r--r--SDL_Core/src/thirdPartyLibs/jsoncpp/version1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/CMakeLists.txt24
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/config.h135
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-core.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-darwin_usb.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-descriptor.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-hotplug.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-io.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_netlink.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_udev.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_usbfs.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-openbsd_usb.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_posix.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_windows.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-strerror.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-sync.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_posix.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_windows.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-windows_usb.Plo1
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.am68
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.in860
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/core.c2228
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/descriptor.c1197
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.c320
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.h82
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/io.c2566
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.def158
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.rc61
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb.h1941
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusbi.h1004
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.c1903
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.h162
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_netlink.c254
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_udev.c273
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.c2568
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.h181
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/openbsd_usb.c734
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.c51
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.h11
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.c726
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.h125
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.c80
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.h50
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.c212
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.h87
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.c1015
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.h131
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_common.h108
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.c4393
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.h918
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/strerror.c184
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/sync.c307
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version.h18
-rw-r--r--SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version_nano.h1
-rw-r--r--SDL_Core/tools/CMakeLists.txt22
-rw-r--r--SDL_Core/tools/InterfaceGenerator/.gitignore9
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/Generator.py116
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/Model.py312
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/__init__.py2
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py1664
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py166
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py92
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/generators/__init__.py3
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/parsers/JSONRPC.py89
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/parsers/RPCBase.py745
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV1.py14
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV2.py88
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/generator/parsers/__init__.py3
-rw-r--r--SDL_Core/tools/InterfaceGenerator/pylint.cfg264
-rw-r--r--SDL_Core/tools/InterfaceGenerator/requirements.txt6
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/runAllTests.sh1
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/__init__.py0
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/__init__.py0
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/generators/__init__.py0
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryBase.py283
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py482
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py325
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc385
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h326
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc366
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h321
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/parsers/__init__.py0
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_JSONRPC.py595
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV1.py404
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV2.py417
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_JSONRPC.xml100
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV1.xml64
-rw-r--r--SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV2.xml85
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/generator/test_Model.py27
-rwxr-xr-xSDL_Core/tools/InterfaceGenerator/test/test_CodeFormatAndQuality.py59
-rw-r--r--SDL_Core/tools/OtrosLogViewer/README.txt32
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/classpath.txt41
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/apache-commons/LICENSE.txt202
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/forms/LICENSE.txt24
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jakarta-oro/LICENSE56
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jcifs/LICENSE.txt504
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jsch/LICENSE.txt30
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/log4j/LICENSE202
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/looks/LICENSE.txt24
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/miglayout/LICENSE.txt30
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/vfsjfliechooser/LICENSE.txt202
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/logging.properties33
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.bat20
-rwxr-xr-xSDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.sh24
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.bat42
-rwxr-xr-xSDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.sh46
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/forDeveloperTests.txt1
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/log4j-1.pattern5
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/selenium.pattern4
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-regex.marker16
-rw-r--r--SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-string.marker14
-rwxr-xr-xSDL_Core/tools/coding-style/cpplint.py4023
-rwxr-xr-xSDL_Core/tools/coding-style/old-branch-nagger.sh38
-rw-r--r--SDL_Core/tools/intergen/CMakeLists.txt12
-rw-r--r--SDL_Core/tools/intergen/GenerateInterfaceLibrary.cmake54
-rw-r--r--SDL_Core/tools/intergen/cppgen/CMakeLists.txt66
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/comment.h61
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_api_code_generator.h66
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_class.h114
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_file.h121
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_function.h174
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_interface_code_generator.h77
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/declaration_generator.h105
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/definition_generator.h70
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/enum_from_json_value_function.h57
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/enum_to_json_value_function.h54
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/function_id_method.h77
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/generator_preferences.h51
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/handler_interface.h85
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/is_valid_enum_function.h56
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/literal_generator.h66
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/message_factory_function.h70
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/message_handle_with_method.h60
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/message_interface.h81
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/module_manager.h98
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/namespace.h152
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/naming_convention.h90
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_constructor.h67
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_from_json_method.h71
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_initialized_method.h57
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_valid_method.h72
-rw-r--r--SDL_Core/tools/intergen/cppgen/include/cppgen/type_name_code_generator.h156
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/comment.cc84
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_api_code_generator.cc86
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_class.cc194
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_file.cc220
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_function.cc209
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc194
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/declaration_generator.cc356
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/definition_generator.cc162
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/enum_from_json_value_function.cc83
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/enum_to_json_value_function.cc72
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/function_id_method.cc82
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/generator_preferences.cc49
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/handler_interface.cc107
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/is_valid_enum_function.cc73
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/literal_generator.cc77
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/message_factory_function.cc94
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/message_handle_with_method.cc53
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/message_interface.cc72
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/module_manager.cc187
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/namespace.cc213
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/naming_convention.cc225
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_constructor.cc76
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_from_json_method.cc87
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_initialized_method.cc68
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_valid_method.cc84
-rw-r--r--SDL_Core/tools/intergen/cppgen/src/cppgen/type_name_code_generator.cc301
-rw-r--r--SDL_Core/tools/intergen/model/CMakeLists.txt37
-rw-r--r--SDL_Core/tools/intergen/model/include/model/api.h89
-rw-r--r--SDL_Core/tools/intergen/model/include/model/builtin_type.h150
-rw-r--r--SDL_Core/tools/intergen/model/include/model/builtin_type_registry.h91
-rw-r--r--SDL_Core/tools/intergen/model/include/model/composite_type.h237
-rw-r--r--SDL_Core/tools/intergen/model/include/model/constant.h164
-rw-r--r--SDL_Core/tools/intergen/model/include/model/constants_creator.h56
-rw-r--r--SDL_Core/tools/intergen/model/include/model/function.h126
-rw-r--r--SDL_Core/tools/intergen/model/include/model/interface.h145
-rw-r--r--SDL_Core/tools/intergen/model/include/model/model_filter.h57
-rw-r--r--SDL_Core/tools/intergen/model/include/model/scope.h52
-rw-r--r--SDL_Core/tools/intergen/model/include/model/type.h90
-rw-r--r--SDL_Core/tools/intergen/model/include/model/type_registry.h145
-rw-r--r--SDL_Core/tools/intergen/model/src/model/api.cc106
-rw-r--r--SDL_Core/tools/intergen/model/src/model/builtin_type.cc162
-rw-r--r--SDL_Core/tools/intergen/model/src/model/builtin_type_registry.cc144
-rw-r--r--SDL_Core/tools/intergen/model/src/model/composite_type.cc353
-rw-r--r--SDL_Core/tools/intergen/model/src/model/constant.cc219
-rw-r--r--SDL_Core/tools/intergen/model/src/model/function.cc116
-rw-r--r--SDL_Core/tools/intergen/model/src/model/interface.cc352
-rw-r--r--SDL_Core/tools/intergen/model/src/model/model_filter.cc46
-rw-r--r--SDL_Core/tools/intergen/model/src/model/scope.cc51
-rw-r--r--SDL_Core/tools/intergen/model/src/model/type.cc74
-rw-r--r--SDL_Core/tools/intergen/model/src/model/type_registry.cc420
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/contrib/foreach.hpp64
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/caution.pngbin426 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree.pngbin8182 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree_thumb.pngbin3127 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/home.pngbin217 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/next.pngbin204 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/note.pngbin357 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/prev.pngbin198 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/up.pngbin224 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1.pngbin25698 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1_thumb.pngbin2531 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2.pngbin18063 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2_thumb.pngbin1901 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1.pngbin27693 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1_thumb.pngbin4511 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2.pngbin14895 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2_thumb.pngbin1579 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3.pngbin15931 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3_thumb.pngbin1944 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4.pngbin15117 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4_thumb.pngbin1632 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1.pngbin19609 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1_thumb.pngbin1765 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2.pngbin17206 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2_thumb.pngbin1820 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual.html205
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/access.html892
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/apiref.html1554
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/changes.html879
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/dom.html732
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/install.html498
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/loading.html873
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/modify.html632
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/saving.html543
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/toc.html160
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/manual/xpath.html746
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/pugixml.css598
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/quickstart.html879
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/character.xml8
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/custom_memory_management.cpp27
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/include.cpp64
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_error_handling.cpp31
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_file.cpp16
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_memory.cpp64
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_options.cpp30
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_stream.cpp97
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_add.cpp29
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_base.cpp43
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_remove.cpp27
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_custom_writer.cpp116
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_declaration.cpp27
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_file.cpp17
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_options.cpp48
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_stream.cpp18
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_subtree.cpp26
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/text.cpp35
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/transitions.xml7
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_base.cpp51
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_iter.cpp27
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_predicate.cpp48
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_rangefor.cpp32
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_walker.cpp35
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/tree.xml12
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-shift_jis.xml78
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-16.xmlbin3186 -> 0 bytes
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-8.xml78
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xgconsole.xml12
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_error.cpp43
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_query.cpp36
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_select.cpp27
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_variables.cpp38
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/readme.txt52
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/CMakeLists.txt18
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/premake4.lua92
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml.xcodeproj/project.pbxproj212
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_airplay.mkf13
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codeblocks.cbp44
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codelite.project56
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005.vcproj343
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005_static.vcproj343
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008.vcproj339
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008_static.vcproj339
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010.vcxproj191
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010_static.vcxproj191
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/src/pugiconfig.hpp69
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.cpp10250
-rw-r--r--SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.hpp1265
-rw-r--r--SDL_Core/tools/intergen/tool/CMakeLists.txt10
-rw-r--r--SDL_Core/tools/intergen/tool/intergen.cc142
-rw-r--r--SDL_Core/tools/intergen/utils/CMakeLists.txt22
-rw-r--r--SDL_Core/tools/intergen/utils/include/utils/common_types.h132
-rw-r--r--SDL_Core/tools/intergen/utils/include/utils/macro.h48
-rw-r--r--SDL_Core/tools/intergen/utils/include/utils/safeformat.h579
-rw-r--r--SDL_Core/tools/intergen/utils/include/utils/stl_utils.h101
-rw-r--r--SDL_Core/tools/intergen/utils/include/utils/string_utils.h161
-rw-r--r--SDL_Core/tools/intergen/utils/include/utils/xml_utils.h54
-rw-r--r--SDL_Core/tools/intergen/utils/src/utils/common_types.cc77
-rw-r--r--SDL_Core/tools/intergen/utils/src/utils/safeformat.cc107
-rw-r--r--SDL_Core/tools/intergen/utils/src/utils/xml_utils.cc52
3173 files changed, 0 insertions, 625464 deletions
diff --git a/SDL_Android/LivioSdlUtilities/.classpath b/SDL_Android/LivioSdlUtilities/.classpath
deleted file mode 100644
index 0461652ec..000000000
--- a/SDL_Android/LivioSdlUtilities/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
diff --git a/SDL_Android/LivioSdlUtilities/.project b/SDL_Android/LivioSdlUtilities/.project
deleted file mode 100644
index b26cca7c3..000000000
--- a/SDL_Android/LivioSdlUtilities/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>LivioSdlUtilities</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/SDL_Android/LivioSdlUtilities/AndroidManifest.xml b/SDL_Android/LivioSdlUtilities/AndroidManifest.xml
deleted file mode 100644
index cc4968ff5..000000000
--- a/SDL_Android/LivioSdlUtilities/AndroidManifest.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.livio.sdl"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-sdk
- android:minSdkVersion="9"
- android:targetSdkVersion="18" />
-
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:theme="@style/AppTheme" >
- </application>
-
-</manifest>
diff --git a/SDL_Android/LivioSdlUtilities/bin/AndroidManifest.xml b/SDL_Android/LivioSdlUtilities/bin/AndroidManifest.xml
deleted file mode 100644
index cc4968ff5..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/AndroidManifest.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.livio.sdl"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-sdk
- android:minSdkVersion="9"
- android:targetSdkVersion="18" />
-
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:theme="@style/AppTheme" >
- </application>
-
-</manifest>
diff --git a/SDL_Android/LivioSdlUtilities/bin/R.txt b/SDL_Android/LivioSdlUtilities/bin/R.txt
deleted file mode 100644
index 959f22ce0..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/R.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-int drawable arrow_left 0x7f020000
-int drawable arrow_right 0x7f020001
-int drawable ic_launcher 0x7f020002
-int id ib_moveLeft 0x7f060001
-int id ib_moveRight 0x7f060002
-int id iv_rowImage 0x7f060007
-int id listView 0x7f060003
-int id textview 0x7f060000
-int id tv_messageDetail 0x7f060006
-int id tv_messageName 0x7f060004
-int id tv_rowText 0x7f060008
-int id tv_timestamp 0x7f060005
-int layout json_flipper_dialog 0x7f030000
-int layout listview 0x7f030001
-int layout sdl_message_listview_row 0x7f030002
-int layout simple_listview_with_image 0x7f030003
-int layout textview 0x7f030004
-int string add_command_command_name 0x7f040004
-int string add_command_image_type 0x7f040007
-int string add_command_parent_menu 0x7f040006
-int string add_command_vr_keyword 0x7f040005
-int string alert_duration_ms 0x7f040023
-int string alert_duration_s 0x7f040022
-int string alert_line1 0x7f04001e
-int string alert_line2 0x7f04001f
-int string alert_line3 0x7f040020
-int string alert_sound_enabled 0x7f040021
-int string app_name 0x7f040000
-int string choice_name 0x7f040018
-int string clock 0x7f04002d
-int string clock_hrs 0x7f04002e
-int string clock_mins 0x7f04002f
-int string clock_secs 0x7f040030
-int string colon 0x7f040031
-int string did_location 0x7f04000c
-int string ecu_name 0x7f04000b
-int string hmi_language 0x7f04001c
-int string item_number 0x7f040016
-int string item_number1 0x7f040017
-int string language 0x7f04001b
-int string max_choices 0x7f040015
-int string media 0x7f04002c
-int string media_clock_timer_mode 0x7f040032
-int string media_track 0x7f04002b
-int string metadata_line1 0x7f040025
-int string metadata_line2 0x7f040026
-int string metadata_line3 0x7f040027
-int string metadata_line4 0x7f040028
-int string metadata_lines 0x7f040024
-int string negative_button 0x7f040003
-int string no_commands_to_delete 0x7f040008
-int string no_submenus_to_delete 0x7f040009
-int string positive_button 0x7f040002
-int string scrollable_message_clear 0x7f040014
-int string scrollable_message_hint 0x7f040013
-int string scrollable_message_text 0x7f040012
-int string sdl_disconnected 0x7f040001
-int string slider_footer 0x7f04000e
-int string slider_start_position 0x7f040010
-int string slider_ticks 0x7f04000f
-int string slider_title 0x7f04000d
-int string status_bar 0x7f04002a
-int string submenu_name 0x7f04000a
-int string text_alignment 0x7f040029
-int string text_to_speak 0x7f04001d
-int string timeout 0x7f040011
-int string units_milliseconds 0x7f040034
-int string units_seconds 0x7f040033
-int string use_artwork 0x7f04001a
-int string voice_keyword 0x7f040019
-int style AppBaseTheme 0x7f050000
-int style AppTheme 0x7f050001
diff --git a/SDL_Android/LivioSdlUtilities/bin/jarlist.cache b/SDL_Android/LivioSdlUtilities/bin/jarlist.cache
deleted file mode 100644
index 0565465f2..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/jarlist.cache
+++ /dev/null
@@ -1,3 +0,0 @@
-# cache for current jar dependency. DO NOT EDIT.
-# format is <lastModified> <length> <SHA-1> <path>
-# Encoding is UTF-8
diff --git a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-hdpi/ic_launcher.png b/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index bcfa0581f..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-mdpi/ic_launcher.png b/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 85848ff49..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-xhdpi/ic_launcher.png b/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 916901e98..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_left.png b/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_left.png
deleted file mode 100644
index b7d5b599f..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_right.png b/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_right.png
deleted file mode 100644
index 36cf6b805..000000000
--- a/SDL_Android/LivioSdlUtilities/bin/res/crunch/drawable/arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/BuildConfig.java b/SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/BuildConfig.java
deleted file mode 100644
index 040b48001..000000000
--- a/SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/BuildConfig.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Automatically generated file. DO NOT MODIFY */
-package com.livio.sdl;
-
-public final class BuildConfig {
- public final static boolean DEBUG = true;
-} \ No newline at end of file
diff --git a/SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/R.java b/SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/R.java
deleted file mode 100644
index c882fa172..000000000
--- a/SDL_Android/LivioSdlUtilities/gen/com/livio/sdl/R.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/* AUTO-GENERATED FILE. DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found. It
- * should not be modified by hand.
- */
-
-package com.livio.sdl;
-
-public final class R {
- public static final class attr {
- }
- public static final class drawable {
- public static int arrow_left=0x7f020000;
- public static int arrow_right=0x7f020001;
- public static int ic_launcher=0x7f020002;
- }
- public static final class id {
- public static int ib_moveLeft=0x7f060001;
- public static int ib_moveRight=0x7f060002;
- public static int iv_rowImage=0x7f060007;
- public static int listView=0x7f060003;
- public static int textview=0x7f060000;
- public static int tv_messageDetail=0x7f060006;
- public static int tv_messageName=0x7f060004;
- public static int tv_rowText=0x7f060008;
- public static int tv_timestamp=0x7f060005;
- }
- public static final class layout {
- public static int json_flipper_dialog=0x7f030000;
- public static int listview=0x7f030001;
- public static int sdl_message_listview_row=0x7f030002;
- public static int simple_listview_with_image=0x7f030003;
- public static int textview=0x7f030004;
- }
- public static final class string {
- /** Add Command
- */
- public static int add_command_command_name=0x7f040004;
- public static int add_command_image_type=0x7f040007;
- public static int add_command_parent_menu=0x7f040006;
- public static int add_command_vr_keyword=0x7f040005;
- public static int alert_duration_ms=0x7f040023;
- public static int alert_duration_s=0x7f040022;
- public static int alert_line1=0x7f04001e;
- public static int alert_line2=0x7f04001f;
- public static int alert_line3=0x7f040020;
- public static int alert_sound_enabled=0x7f040021;
- /** General Strings
- */
- public static int app_name=0x7f040000;
- public static int choice_name=0x7f040018;
- public static int clock=0x7f04002d;
- public static int clock_hrs=0x7f04002e;
- public static int clock_mins=0x7f04002f;
- public static int clock_secs=0x7f040030;
- public static int colon=0x7f040031;
- public static int did_location=0x7f04000c;
- /** Get DTCs and Read DIDs
- */
- public static int ecu_name=0x7f04000b;
- public static int hmi_language=0x7f04001c;
- public static int item_number=0x7f040016;
- /** Choice Set Item
- */
- public static int item_number1=0x7f040017;
- /** Change Registration
- */
- public static int language=0x7f04001b;
- /** Create Interaction Choice Set
- */
- public static int max_choices=0x7f040015;
- public static int media=0x7f04002c;
- public static int media_clock_timer_mode=0x7f040032;
- public static int media_track=0x7f04002b;
- public static int metadata_line1=0x7f040025;
- public static int metadata_line2=0x7f040026;
- public static int metadata_line3=0x7f040027;
- public static int metadata_line4=0x7f040028;
- /** Show Dialog
- */
- public static int metadata_lines=0x7f040024;
- public static int negative_button=0x7f040003;
- /** Delete Command
- */
- public static int no_commands_to_delete=0x7f040008;
- /** Delete Submenu
- */
- public static int no_submenus_to_delete=0x7f040009;
- /** Dialog Strings
- */
- public static int positive_button=0x7f040002;
- public static int scrollable_message_clear=0x7f040014;
- public static int scrollable_message_hint=0x7f040013;
- /** Scrollable Message
- */
- public static int scrollable_message_text=0x7f040012;
- public static int sdl_disconnected=0x7f040001;
- public static int slider_footer=0x7f04000e;
- public static int slider_start_position=0x7f040010;
- public static int slider_ticks=0x7f04000f;
- /** Slider
- */
- public static int slider_title=0x7f04000d;
- public static int status_bar=0x7f04002a;
- /** Add Submenu
- */
- public static int submenu_name=0x7f04000a;
- public static int text_alignment=0x7f040029;
- /** Alert Dialog
- */
- public static int text_to_speak=0x7f04001d;
- public static int timeout=0x7f040011;
- public static int units_milliseconds=0x7f040034;
- /** Unit Suffixes
- */
- public static int units_seconds=0x7f040033;
- public static int use_artwork=0x7f04001a;
- public static int voice_keyword=0x7f040019;
- }
- public static final class style {
- /**
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-
-
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
-
-
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
-
- API 11 theme customizations can go here.
-
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
-
- API 14 theme customizations can go here.
- */
- public static int AppBaseTheme=0x7f050000;
- /** Application theme.
- All customizations that are NOT specific to a particular API-level can go here.
- */
- public static int AppTheme=0x7f050001;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/proguard-project.txt b/SDL_Android/LivioSdlUtilities/proguard-project.txt
deleted file mode 100644
index f2fe1559a..000000000
--- a/SDL_Android/LivioSdlUtilities/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/SDL_Android/LivioSdlUtilities/project.properties b/SDL_Android/LivioSdlUtilities/project.properties
deleted file mode 100644
index 4ba671a94..000000000
--- a/SDL_Android/LivioSdlUtilities/project.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=Google Inc.:Google APIs:19
-android.library=true
-android.library.reference.1=../SmartDeviceLinkProxyAndroid
diff --git a/SDL_Android/LivioSdlUtilities/res/drawable-hdpi/ic_launcher.png b/SDL_Android/LivioSdlUtilities/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 96a442e5b..000000000
--- a/SDL_Android/LivioSdlUtilities/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/res/drawable-mdpi/ic_launcher.png b/SDL_Android/LivioSdlUtilities/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 359047dfa..000000000
--- a/SDL_Android/LivioSdlUtilities/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/res/drawable-xhdpi/ic_launcher.png b/SDL_Android/LivioSdlUtilities/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 71c6d760f..000000000
--- a/SDL_Android/LivioSdlUtilities/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/res/drawable/arrow_left.png b/SDL_Android/LivioSdlUtilities/res/drawable/arrow_left.png
deleted file mode 100644
index 1810182d1..000000000
--- a/SDL_Android/LivioSdlUtilities/res/drawable/arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/res/drawable/arrow_right.png b/SDL_Android/LivioSdlUtilities/res/drawable/arrow_right.png
deleted file mode 100644
index 3775bf55e..000000000
--- a/SDL_Android/LivioSdlUtilities/res/drawable/arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioSdlUtilities/res/layout/json_flipper_dialog.xml b/SDL_Android/LivioSdlUtilities/res/layout/json_flipper_dialog.xml
deleted file mode 100644
index 3d600d42c..000000000
--- a/SDL_Android/LivioSdlUtilities/res/layout/json_flipper_dialog.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/textview"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- android:textSize="16sp"
- android:padding="10dip"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <ImageButton android:id="@+id/ib_moveLeft"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:src="@drawable/arrow_left"
- android:background="#00FFFFFF"/>
-
- <ImageButton android:id="@+id/ib_moveRight"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:src="@drawable/arrow_right"
- android:background="#00FFFFFF"/>
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/SDL_Android/LivioSdlUtilities/res/layout/listview.xml b/SDL_Android/LivioSdlUtilities/res/layout/listview.xml
deleted file mode 100644
index 0382fd455..000000000
--- a/SDL_Android/LivioSdlUtilities/res/layout/listview.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ListView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/listView"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
-
-</ListView>
diff --git a/SDL_Android/LivioSdlUtilities/res/layout/sdl_message_listview_row.xml b/SDL_Android/LivioSdlUtilities/res/layout/sdl_message_listview_row.xml
deleted file mode 100644
index 052235281..000000000
--- a/SDL_Android/LivioSdlUtilities/res/layout/sdl_message_listview_row.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <TextView
- android:id="@+id/tv_messageName"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:textStyle="bold"/>
-
- <TextView
- android:id="@+id/tv_timestamp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"/>
-
- <TextView
- android:id="@+id/tv_messageDetail"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@+id/tv_messageName"/>
-
-</RelativeLayout>
diff --git a/SDL_Android/LivioSdlUtilities/res/layout/simple_listview_with_image.xml b/SDL_Android/LivioSdlUtilities/res/layout/simple_listview_with_image.xml
deleted file mode 100644
index 64bec19e2..000000000
--- a/SDL_Android/LivioSdlUtilities/res/layout/simple_listview_with_image.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip">
-
- <ImageView android:id="@+id/iv_rowImage"
- android:layout_width="100dip"
- android:layout_height="100dip" />
-
- <TextView android:id="@+id/tv_rowText"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:gravity="center_vertical|center_horizontal"/>
-
-</LinearLayout>
diff --git a/SDL_Android/LivioSdlUtilities/res/layout/textview.xml b/SDL_Android/LivioSdlUtilities/res/layout/textview.xml
deleted file mode 100644
index 70a52ea9a..000000000
--- a/SDL_Android/LivioSdlUtilities/res/layout/textview.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
- android:id="@+id/textview"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="16sp"
- android:padding="10dip"/>
-
-</ScrollView> \ No newline at end of file
diff --git a/SDL_Android/LivioSdlUtilities/res/values-v11/styles.xml b/SDL_Android/LivioSdlUtilities/res/values-v11/styles.xml
deleted file mode 100644
index 3c02242ad..000000000
--- a/SDL_Android/LivioSdlUtilities/res/values-v11/styles.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<resources>
-
- <!--
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
- <!-- API 11 theme customizations can go here. -->
- </style>
-
-</resources>
diff --git a/SDL_Android/LivioSdlUtilities/res/values-v14/styles.xml b/SDL_Android/LivioSdlUtilities/res/values-v14/styles.xml
deleted file mode 100644
index a91fd0372..000000000
--- a/SDL_Android/LivioSdlUtilities/res/values-v14/styles.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<resources>
-
- <!--
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
- <!-- API 14 theme customizations can go here. -->
- </style>
-
-</resources>
diff --git a/SDL_Android/LivioSdlUtilities/res/values/strings.xml b/SDL_Android/LivioSdlUtilities/res/values/strings.xml
deleted file mode 100644
index 362a8fd9d..000000000
--- a/SDL_Android/LivioSdlUtilities/res/values/strings.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<resources>
-
-<!-- General Strings -->
- <string name="app_name">Livio SDL Tester</string>
- <string name="sdl_disconnected">SDL has been disconnected</string>
-
-<!-- Dialog Strings -->
- <string name="positive_button">OK</string>
- <string name="negative_button">Cancel</string>
-
-<!-- Add Command -->
- <string name="add_command_command_name">Command Name</string>
- <string name="add_command_vr_keyword">Voice Recognition Keyword</string>
- <string name="add_command_parent_menu">Parent Menu:</string>
- <string name="add_command_image_type">Image Type:</string>
-
-<!-- Delete Command -->
- <string name="no_commands_to_delete">There are no commands to delete.</string>
-
-<!-- Delete Submenu -->
- <string name="no_submenus_to_delete">There are no submenus to delete.</string>
-
-<!-- Add Submenu -->
- <string name="submenu_name">Submenu Name</string>
-
-<!-- Get DTCs and Read DIDs -->
- <string name="ecu_name">ECU Name (0&#8211;65535)</string>
- <string name="did_location">DID Location (0&#8211;65535)</string>
-
-<!-- Slider -->
- <string name="slider_title">Slider Title</string>
- <string name="slider_footer">Slider Footer</string>
- <string name="slider_ticks">Number of slider ticks: </string>
- <string name="slider_start_position">Start position: </string>
- <string name="timeout">Timeout: </string>
-
-<!-- Scrollable Message -->
- <string name="scrollable_message_text">"\"\'My mind,\' he said, \'rebels at stagnation. Give me problems, give me work, give me the most abstruse cryptogram or the most intricate analysis, and I am in my own proper atmosphere. I can dispense then with artificial stimulants. But I abhor the dull routine of existence. I crave for mental exaltation. That is why I have chosen my own particular profession,&#8211;or rather created it, for I am the only one in the world.\'\"\n\n&#8211; Sherlock Holmes by Sir Arthur Conan Doyle"</string>
- <string name="scrollable_message_hint">Enter a long message (500 chars max)</string>
- <string name="scrollable_message_clear">Clear Text</string>
-
-<!-- Create Interaction Choice Set -->
- <string name="max_choices">You have reached the max number of choices.</string>
- <string name="item_number">Item #</string>
-
-<!-- Choice Set Item -->
- <string name="item_number1">Item #1</string>
- <string name="choice_name">Choice Name</string>
- <string name="voice_keyword">Voice Recognition Keyword</string>
- <string name="use_artwork">Use artwork?</string>
-
-<!-- Change Registration -->
- <string name="language">Language</string>
- <string name="hmi_language">HMI Display Language</string>
-
-<!-- Alert Dialog -->
- <string name="text_to_speak">Text to Speak</string>
- <string name="alert_line1">Alert Line #1</string>
- <string name="alert_line2">Alert Line #2</string>
- <string name="alert_line3">Alert Line #3</string>
- <string name="alert_sound_enabled">Alert sound enabled</string>
- <string name="alert_duration_s">Alert Duration (in seconds)</string>
- <string name="alert_duration_ms">Alert Duration (in milliseconds)</string>
-
-<!-- Show Dialog -->
- <string name="metadata_lines">Metadata Lines</string>
- <string name="metadata_line1">Metadata Line #1</string>
- <string name="metadata_line2">Metadata Line #2</string>
- <string name="metadata_line3">Metadata Line #3</string>
- <string name="metadata_line4">Metadata Line #4</string>
- <string name="text_alignment">Text Alignment</string>
- <string name="status_bar">Status Bar</string>
- <string name="media_track">Media Track</string>
- <string name="media">Media</string>
- <string name="clock">Clock</string>
- <string name="clock_hrs">HH</string>
- <string name="clock_mins">MM</string>
- <string name="clock_secs">SS</string>
- <string name="colon">:</string>
-
- <string name="media_clock_timer_mode">Timer Mode</string>
-
-<!-- Unit Suffixes -->
- <string name="units_seconds"> s</string>
- <string name="units_milliseconds"> ms</string>
-</resources>
diff --git a/SDL_Android/LivioSdlUtilities/res/values/styles.xml b/SDL_Android/LivioSdlUtilities/res/values/styles.xml
deleted file mode 100644
index 6ce89c7ba..000000000
--- a/SDL_Android/LivioSdlUtilities/res/values/styles.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<resources>
-
- <!--
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Light">
- <!--
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
- -->
- </style>
-
- <!-- Application theme. -->
- <style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
- </style>
-
-</resources>
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/IpAddress.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/IpAddress.java
deleted file mode 100644
index 2e123dec7..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/IpAddress.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.livio.sdl;
-
-/**
- * Represents an IP address and port number as 2 strings - one string for the address
- * itself and another string for the associated TCP port number.
- *
- * @author Mike Burke
- *
- */
-public class IpAddress {
-
- private String ipAddress, tcpPort;
-
- public IpAddress(String ipAddress, String tcpPort) {
- this.ipAddress = ipAddress;
- this.tcpPort = tcpPort;
- }
-
- public IpAddress(String ipAddress, int tcpPort){
- this(ipAddress, String.valueOf(tcpPort));
- }
-
- public String getIpAddress() {
- return ipAddress;
- }
-
- public String getTcpPort() {
- return tcpPort;
- }
-
- @Override
- public String toString(){
- return new StringBuilder().append(ipAddress).append(":").append(tcpPort).toString();
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlConstants.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlConstants.java
deleted file mode 100644
index 805eaf2d6..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlConstants.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.livio.sdl;
-
-public final class SdlConstants {
-
- private SdlConstants() {}
-
- public static final class AddCommandConstants{
- private AddCommandConstants(){}
-
- public static final int INVALID_PARENT_ID = -1;
- public static final int ROOT_PARENT_ID = 0;
- public static final int DEFAULT_POSITION = 0;
- public static final int MINIMUM_COMMAND_ID = 0x00;
- public static final int MAXIMUM_COMMAND_ID = 2000000000;
- }
-
- public static final class AddSubmenuConstants{
- private AddSubmenuConstants(){}
-
- public static final int DEFAULT_POSITION = 0;
- }
-
- public static final class InteractionChoiceSetConstants{
- private InteractionChoiceSetConstants(){}
-
- public static final int MINIMUM_CHOICE_SET_ID = 0x00;
- public static final int MAXIMUM_CHOICE_SET_ID = 2000000000;
- }
-
- public static final class GetDtcsConstants{
- private GetDtcsConstants(){}
-
- public static final int MINIMUM_ECU_ID = 0x00;
- public static final int MAXIMUM_ECU_ID = 0xFFFF;
- }
-
- public static final class PerformInteractionConstants{
- private PerformInteractionConstants(){}
-
- public static final int MINIMUM_TIMEOUT = 5; // seconds
- public static final int MAXIMUM_TIMEOUT = 100; // seconds
- public static final int INVALID_TIMEOUT = -1;
-
- public static final int EXPECTED_REPSONSE_TIME_OFFSET = 2000; // ms, or 2 s
- }
-
- public static final class ReadDidsConstants{
- private ReadDidsConstants(){}
-
- public static final int MINIMUM_ECU_ID = 0x00;
- public static final int MAXIMUM_ECU_ID = 0xFFFF;
-
- public static final int MINIMUM_DID_LOCATION = 0x00;
- public static final int MAXIMUM_DID_LOCATION = 0xFFFF;
- }
-
- public static final class ScrollableMessageConstants{
- private ScrollableMessageConstants(){}
-
- public static final int TIMEOUT_MINIMUM = 1; // seconds
- public static final int TIMEOUT_MAXIMUM = 65; // seconds
-
- public static final int MESSAGE_LENGTH_MAX = 500; // characters
-
- public static final int EXPECTED_REPSONSE_TIME_OFFSET = 2000; // ms, or 2 s
- }
-
- public static final class AlertConstants{
- private AlertConstants(){}
-
- public static final int ALERT_TIME_MINIMUM = 3; // seconds
- public static final int ALERT_TIME_MAXIMUM = 10; // seconds
-
- public static final int EXPECTED_REPSONSE_TIME_OFFSET = 2000; // ms, or 2 s
- }
-
- public static final class SetMediaClockTimerConstants{
- private SetMediaClockTimerConstants(){}
-
- public static final int HOURS_MINIMUM = 0; // hours
- public static final int HOURS_MAXIMUM = 59; // hours
- public static final int MINUTES_MINIMUM = 0; // minutes
- public static final int MINUTES_MAXIMUM = 59; // minutes
- public static final int SECONDS_MINIMUM = 0; // seconds
- public static final int SECONDS_MAXIMUM = 59; // seconds
- }
-
- public static final class SliderConstants{
- private SliderConstants(){}
-
- public static final int NUM_OF_TICKS_MIN = 2; // ticks
- public static final int NUM_OF_TICKS_MAX = 26; // ticks
- public static final int START_POSITION_MIN = 1;
- public static final int START_POSITION_MAX = NUM_OF_TICKS_MAX;
- public static final int TIMEOUT_MIN = 1; // second
- public static final int TIMEOUT_MAX = 65; // seconds
-
- public static final int EXPECTED_REPSONSE_TIME_OFFSET = 2000; // ms, or 2 s
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlImageItem.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlImageItem.java
deleted file mode 100644
index 516799faf..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlImageItem.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.livio.sdl;
-
-import java.util.Comparator;
-
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.CompressFormat;
-
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdl.utils.SdlUtils;
-import com.smartdevicelink.proxy.rpc.Image;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.ImageType;
-
-/**
- * Represents an SDL image object. This includes the bitmap object itself,
- * a filename to be used on SDL and an ImageType representing the type of image
- * we're looking at.
- *
- * @author Mike Burke
- *
- */
-public class SdlImageItem {
-
- public static class SdlImageItemComparator implements Comparator<SdlImageItem>{
- @Override
- public int compare(SdlImageItem lhs, SdlImageItem rhs) {
- return lhs.getImageName().compareTo(rhs.getImageName());
- }
- }
-
- private Bitmap bitmap;
- private String imageName;
- private FileType imageType;
-
- public SdlImageItem(Bitmap bitmap, String imageName, FileType imageType) {
- this.bitmap = bitmap;
- this.imageName = imageName;
- this.imageType = imageType;
- }
-
- public Bitmap getBitmap() {
- return bitmap;
- }
-
- public String getImageName() {
- return imageName;
- }
-
- public FileType getImageType(){
- return imageType;
- }
-
- public Image toImage(){
- CompressFormat format = SdlUtils.convertImageTypeToCompressFormat(imageType);
-
- Image image = new Image();
- image.setImageType(ImageType.DYNAMIC);
- image.setValue(imageName);
- image.setBulkData(AndroidUtils.bitmapToRawBytes(bitmap, format));
-
- return image;
- }
-
- public static Image toImage(SdlImageItem item){
- return item.toImage();
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlLogMessage.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlLogMessage.java
deleted file mode 100644
index 4fa1cf367..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlLogMessage.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.livio.sdl;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-import com.livio.sdl.utils.SdlUtils;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * The SdlLogMessage class holds applicable data to be used for logging an RPC message so that
- * we don't have to keep a strong reference to the large RPC message object sitting around just
- * to show a log message for it.
- *
- * @author Mike Burke
- *
- */
-public class SdlLogMessage {
-
- public static final String REQUEST = "request";
- public static final String RESPONSE = "response";
- public static final String NOTIFICATION = "notification";
-
- private static final String DATE_FORMAT = "hh:mm:ss";
- private static final String POSITIVE_RESPONSE = "(positive response)";
- private static final String NEGATIVE_RESPONSE = "(negative response)";
- private static final String POSITIVE_REQUEST = "(request)";
- private static final String POSITIVE_NOTIFICATION = "(notification)";
-
- private String timeStamp;
- private String details;
- private String functionName;
- private boolean success = true;
- private String messageType;
- private String jsonData;
- private int correlationId = -1;
-
- public SdlLogMessage(RPCMessage rpcm) {
- setFields(rpcm);
- }
-
- // read information from the input RPC Message and fills in the appropriate fields for this class.
- private void setFields(RPCMessage rpcm){
- // get what type of message this is - request, response or notification
- messageType = rpcm.getMessageType();
-
- // apply a timestamp
- SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT, Locale.US);
- timeStamp = sdf.format(new Date());
-
- details = "";
-
- if(messageType.equals(RESPONSE)){
- // input message was a response, which is slightly more detailed than requests or notifications, so we'll have a separate method for responses.
- setResponseFields((RPCResponse) rpcm);
- }
- else if(messageType.equals(REQUEST)){
- // requests need to append "(request)" to the input function name.
- functionName = new StringBuilder().append(rpcm.getFunctionName()).append(" ").append(POSITIVE_REQUEST).toString();
- correlationId = ((RPCRequest) rpcm).getCorrelationID();
- }
- else if(messageType.equals(NOTIFICATION)){
- // notifications need to append "(notification)" to the input function name.
- functionName = new StringBuilder().append(rpcm.getFunctionName()).append(" ").append(POSITIVE_NOTIFICATION).toString();
- }
-
- // set the JSON string
- jsonData = SdlUtils.getJsonString(rpcm);
- }
-
- // set data for a response type message
- private void setResponseFields(RPCResponse response){
- success = response.getSuccess();
- correlationId = response.getCorrelationID();
-
- if(success){
- // if the response was successful, set the details to success and show the function name as a positive response
- details = response.getResultCode().name();
- functionName = new StringBuilder().append(response.getFunctionName()).append(" ").append(POSITIVE_RESPONSE).toString();
- }
- else{
- // if the response was unsuccessful, show a detailed explanation in details and set function name as a negative response
- functionName = new StringBuilder().append(response.getFunctionName()).append(" ").append(NEGATIVE_RESPONSE).toString();
-
- // if the response has extra info, we'll append it after the negative response.
- String info = response.getInfo();
- StringBuilder builder = new StringBuilder().append(response.getResultCode().name());
- if(info != null){
- builder.append(": ").append(info);
- }
- details = builder.toString();
- }
- }
-
- public String getTimeStamp() {
- return timeStamp;
- }
-
- public String getDetails() {
- return details;
- }
-
- public String getFunctionName() {
- return functionName;
- }
-
- public boolean getSuccess(){
- return success;
- }
-
- public String getMessageType(){
- return messageType;
- }
-
- public String getJsonData(){
- return jsonData;
- }
-
- public int getCorrelationId(){
- return correlationId;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlRequestFactory.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlRequestFactory.java
deleted file mode 100644
index 53de4f6e9..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlRequestFactory.java
+++ /dev/null
@@ -1,609 +0,0 @@
-package com.livio.sdl;
-
-import java.util.Vector;
-
-import com.livio.sdl.utils.MathUtils;
-import com.livio.sdl.utils.SdlUtils;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.TTSChunkFactory;
-import com.smartdevicelink.proxy.rpc.AddCommand;
-import com.smartdevicelink.proxy.rpc.AddSubMenu;
-import com.smartdevicelink.proxy.rpc.Alert;
-import com.smartdevicelink.proxy.rpc.ChangeRegistration;
-import com.smartdevicelink.proxy.rpc.Choice;
-import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.DeleteCommand;
-import com.smartdevicelink.proxy.rpc.DeleteFile;
-import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.DeleteSubMenu;
-import com.smartdevicelink.proxy.rpc.GetDTCs;
-import com.smartdevicelink.proxy.rpc.Image;
-import com.smartdevicelink.proxy.rpc.PerformInteraction;
-import com.smartdevicelink.proxy.rpc.PutFile;
-import com.smartdevicelink.proxy.rpc.ReadDID;
-import com.smartdevicelink.proxy.rpc.ScrollableMessage;
-import com.smartdevicelink.proxy.rpc.SetAppIcon;
-import com.smartdevicelink.proxy.rpc.SetMediaClockTimer;
-import com.smartdevicelink.proxy.rpc.Show;
-import com.smartdevicelink.proxy.rpc.Slider;
-import com.smartdevicelink.proxy.rpc.Speak;
-import com.smartdevicelink.proxy.rpc.StartTime;
-import com.smartdevicelink.proxy.rpc.SubscribeButton;
-import com.smartdevicelink.proxy.rpc.TTSChunk;
-import com.smartdevicelink.proxy.rpc.UnsubscribeButton;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-
-/**
- * A static factory class that instantiates various types of RPCRequest subclasses based on the
- * input parameters.
- *
- * @author Mike Burke
- *
- */
-public final class SdlRequestFactory {
-
- private SdlRequestFactory() {}
-
- /**
- * Creates an AddCommand RPCRequest.
- *
- * @param name The name of the command. Cannot be null or empty string
- * @param position The position in the menu list
- * @param parentId The command's parent id
- * @param vrCommands A CSV string input that is parsed into voice-rec strings
- * @param imageName The image name of any image associated with the command
- * @return The created AddCommand request
- */
- public static RPCRequest addCommand(String name, int position, int parentId, String vrCommands, String imageName){
- if(name == null){
- throw new NullPointerException();
- }
- if(name.length() <= 0){
- throw new IllegalArgumentException();
- }
-
- AddCommand result = new AddCommand();
- result.setMenuParams(SdlUtils.menuParams(name, position, parentId));
- if(vrCommands != null && vrCommands.length() > 0){
- result.setVrCommands(SdlUtils.voiceRecognitionVector(vrCommands));
- }
- if(imageName != null){
- result.setCmdIcon(SdlUtils.dynamicImage(imageName));
- }
- return result;
- }
-
- /**
- * Creates an AddSubmenu RPCRequest.
- *
- * @param submenuName The name of the submenu. Cannot be null or empty string
- * @param position The position in the menu list
- * @return The created AddSubMenu request
- */
- public static RPCRequest addSubmenu(String submenuName, int position){
- if(submenuName == null){
- throw new NullPointerException();
- }
- if(submenuName.length() <= 0){
- throw new IllegalArgumentException();
- }
-
- AddSubMenu result = new AddSubMenu();
- result.setMenuName(submenuName);
- result.setPosition(position);
- return result;
- }
-
- /**
- * Creates a SubscribeButton RPCRequest.
- *
- * @param name The ButtonName that is being subscribed to
- * @return The created SubscribeButton request
- */
- public static RPCRequest subscribeButton(ButtonName name){
- if(name == null){
- throw new NullPointerException();
- }
-
- SubscribeButton result = new SubscribeButton();
- result.setButtonName(name);
- return result;
- }
-
- /**
- * Creates a UnsubscribeButton RPCRequest
- *
- * @param name The ButtonName that is being unsubscribed from
- * @return The created UnsubscribeButton request
- */
- public static RPCRequest unsubscribeButton(ButtonName name){
- if(name == null){
- throw new NullPointerException();
- }
-
- UnsubscribeButton result = new UnsubscribeButton();
- result.setButtonName(name);
- return result;
- }
-
- /**
- * Creates a ChangeRegistration request
- *
- * @param mainLang Main language to set. Cannot be null
- * @param hmiLang HMI language to set. Cannot be null
- * @return The ChangeRegistration request
- */
- public static RPCRequest changeRegistration(Language mainLang, Language hmiLang){
- if(mainLang == null || hmiLang == null){
- throw new NullPointerException();
- }
-
- ChangeRegistration result = new ChangeRegistration();
- result.setLanguage(mainLang);
- result.setHmiDisplayLanguage(hmiLang);
- return result;
- }
-
- /**
- * Creates a CreateInteractionChoiceSet request.
- *
- * @param choiceSet The choices contained within the CreateInteractionChoiceSet. Cannot be null or empty vector.
- * @return The created CreateInteractionChoiceSet request
- */
- public static RPCRequest createInteractionChoiceSet(Vector<Choice> choiceSet){
- if(choiceSet == null){
- throw new NullPointerException();
- }
- if(choiceSet.size() <= 0){
- throw new IllegalArgumentException();
- }
-
- CreateInteractionChoiceSet result = new CreateInteractionChoiceSet();
- result.setChoiceSet(choiceSet);
- return result;
- }
-
- /**
- * Creates a DeleteCommand request.
- *
- * @param commandId The id of the command to delete. Must be a valid ID value.
- * @return The created DeleteCommand request
- */
- public static RPCRequest deleteCommand(int commandId){
- if(commandId < SdlConstants.AddCommandConstants.MINIMUM_COMMAND_ID ||
- commandId > SdlConstants.AddCommandConstants.MAXIMUM_COMMAND_ID){
- throw new IllegalArgumentException();
- }
-
- DeleteCommand result = new DeleteCommand();
- result.setCmdID(commandId);
- return result;
- }
-
- /**
- * Creates a DeleteSubMenu request.
- *
- * @param menuId The id of the command to delete. Must be a valid ID value.
- * @return The created DeleteSubMenu request
- */
- public static RPCRequest deleteSubmenu(int menuId){
- if(menuId < SdlConstants.AddCommandConstants.MINIMUM_COMMAND_ID ||
- menuId > SdlConstants.AddCommandConstants.MAXIMUM_COMMAND_ID){
- throw new IllegalArgumentException();
- }
-
- DeleteSubMenu result = new DeleteSubMenu();
- result.setMenuID(menuId);
- return result;
- }
-
- /**
- * Creates a DeleteFile request.
- *
- * @param fileName The file name of the image to delete. Cannot be null.
- * @return The created DeleteFile request
- */
- public static RPCRequest deleteFile(String fileName){
- if(fileName == null){
- throw new NullPointerException();
- }
-
- DeleteFile result = new DeleteFile();
- result.setSmartDeviceLinkFileName(fileName);
- return result;
- }
-
- /**
- * Creates a DeleteInteracionChoiceSet request.
- *
- * @param id The id of the choice set to delete. Must be a valid id value.
- * @return
- */
- public static RPCRequest deleteInteractionChoiceSet(int id){
- if(id < SdlConstants.InteractionChoiceSetConstants.MINIMUM_CHOICE_SET_ID || id > SdlConstants.InteractionChoiceSetConstants.MAXIMUM_CHOICE_SET_ID){
- throw new IllegalArgumentException();
- }
-
- DeleteInteractionChoiceSet result = new DeleteInteractionChoiceSet();
- result.setInteractionChoiceSetID(id);
- return result;
- }
-
-
- /**
- * Creates a GetDTCs request.
- *
- * @param ecuId The ECU id to get DTCs for. Must be a valid ECU id value.
- * @return The created GetDTCs request
- */
- public static RPCRequest getDtcs(int ecuId){
- if(ecuId < SdlConstants.GetDtcsConstants.MINIMUM_ECU_ID || ecuId > SdlConstants.GetDtcsConstants.MAXIMUM_ECU_ID){
- throw new IllegalArgumentException();
- }
-
- GetDTCs result = new GetDTCs();
- result.setEcuName(ecuId);
- return result;
- }
-
- /**
- * Creates a GetDTCs request.
- *
- * @param ecuId
- * @return
- */
- public static RPCRequest getDtcs(String ecuId){
- try{
- return getDtcs(Integer.parseInt(ecuId));
- }
- catch(NumberFormatException e){
- throw new IllegalArgumentException();
- }
- }
-
- /**
- * Creates a PerformInteraction request.
- *
- * @param title The title of the interaction
- * @param voicePrompt The CSV string representing the vector of voice-rec inputs
- * @param choiceIds The ids of the choices to present to the user. Cannot be null or empty.
- * @param mode The interaction mode for this interaction
- * @param timeout The timeout for the interaction. Must be within timeout range.
- * @return The created PerformInteraction request
- */
- public static RPCRequest performInteraction(String title, String voicePrompt, Vector<Integer> choiceIds, InteractionMode mode, int timeout){
- if(choiceIds == null || choiceIds.size() <= 0){
- throw new IllegalArgumentException();
- }
-
- if( (timeout < MathUtils.convertSecsToMillisecs(SdlConstants.PerformInteractionConstants.MINIMUM_TIMEOUT) ||
- timeout > MathUtils.convertSecsToMillisecs(SdlConstants.PerformInteractionConstants.MAXIMUM_TIMEOUT) ) &&
- (timeout != SdlConstants.PerformInteractionConstants.INVALID_TIMEOUT) ){
- throw new IllegalArgumentException();
- }
-
- PerformInteraction result = new PerformInteraction();
-
- // set the title
- if(title == null || title.length() <= 0){
- title = " ";
- }
- result.setInitialText(title);
-
- // set the voice prompt
- if(voicePrompt == null || voicePrompt.length() <= 0){
- voicePrompt = " ";
- }
- Vector<TTSChunk> ttsChunks = TTSChunkFactory.createSimpleTTSChunks(voicePrompt);
- result.setInitialPrompt(ttsChunks);
-
- // set the interaction mode
- result.setInteractionMode(mode);
-
- // set the choice set ids
- result.setInteractionChoiceSetIDList(choiceIds);
-
- // set the timeout
- if(timeout != SdlConstants.PerformInteractionConstants.INVALID_TIMEOUT){
- result.setTimeout(timeout);
- }
-
- return result;
- }
-
- /**
- * Creates a PerformInteraction request.
- *
- * @param title The title of the interaction
- * @param voicePrompt The CSV string representing the vector of voice-rec inputs
- * @param choiceIds The ids of the choices to present to the user. Cannot be null or empty.
- * @param mode The interaction mode for this interaction
- * @return The created PerformInteraction request
- */
- public static RPCRequest performInteraction(String title, String voicePrompt, Vector<Integer> choiceIds, InteractionMode mode){
- return performInteraction(title, voicePrompt, choiceIds, mode, SdlConstants.PerformInteractionConstants.INVALID_TIMEOUT);
- }
-
- /**
- * Creates a PutFile request.
- *
- * @param fileName The file name for the file. Cannot be null or empty.
- * @param type Type of file this request will contain. Cannot be null.
- * @param persistent Whether or not the file is persistent on the head-unit
- * @param rawBytes The raw bytes of the file to send. Cannot be null or empty.
- * @return The created PutFile request
- */
- public static RPCRequest putFile(String fileName, FileType type, boolean persistent, byte[] rawBytes){
- if(fileName == null || type == null || rawBytes == null){
- throw new NullPointerException();
- }
- if(fileName.length() <= 0 || rawBytes.length <= 0){
- throw new IllegalArgumentException();
- }
-
- PutFile result = new PutFile();
- result.setSmartDeviceLinkFileName(fileName);
- result.setBulkData(rawBytes);
- result.setPersistentFile(persistent);
- result.setFileType(type);
- return result;
- }
-
- /**
- * Creates a ReadDID request
- *
- * @param ecu The ECU id. Must be a valid ECU id value.
- * @param did The DID id. Must be a valid DID id value.
- * @return The created ReadDid request
- */
- public static RPCRequest readDid(int ecu, int did){
- Vector<Integer> dids = new Vector<Integer>(1);
- dids.add(did);
- return readDid(ecu, dids);
- }
-
- /**
- * Creates a ReadDID request.
- *
- * @param ecu The ECU id. Must be a valid ECU id value.
- * @param dids A vector of DID ids. Cannot be null or empty and all values must be valid DID id values.
- * @return The created ReadDID request
- */
- public static RPCRequest readDid(int ecu, Vector<Integer> dids){
- if(dids == null){
- throw new NullPointerException();
- }
-
- if(ecu < SdlConstants.ReadDidsConstants.MINIMUM_ECU_ID || ecu > SdlConstants.ReadDidsConstants.MAXIMUM_ECU_ID ||
- dids.size() <= 0){
- throw new IllegalArgumentException();
- }
-
- for(Integer did : dids){
- if(did < SdlConstants.ReadDidsConstants.MINIMUM_DID_LOCATION || did > SdlConstants.ReadDidsConstants.MAXIMUM_DID_LOCATION){
- throw new IllegalArgumentException();
- }
- }
-
- ReadDID result = new ReadDID();
- result.setEcuName(ecu);
- result.setDidLocation(dids);
- return result;
- }
-
- /**
- * Creates a ScrollableMessage request
- *
- * @param msg The message to show on the head-unit. Cannot be null and max length is 500 chars.
- * @param timeoutInMs The timeout for the request in milliseconds. Must be within timeout range for ScrollableMessage.
- * @return The created ScrollableMessage request
- */
- public static RPCRequest scrollableMessage(String msg, int timeoutInMs){
- if(msg == null){
- throw new NullPointerException();
- }
- if(msg.length() > SdlConstants.ScrollableMessageConstants.MESSAGE_LENGTH_MAX ||
- timeoutInMs < MathUtils.convertSecsToMillisecs(SdlConstants.ScrollableMessageConstants.TIMEOUT_MINIMUM) ||
- timeoutInMs > MathUtils.convertSecsToMillisecs(SdlConstants.ScrollableMessageConstants.TIMEOUT_MAXIMUM) ){
- throw new IllegalArgumentException();
- }
-
- ScrollableMessage result = new ScrollableMessage();
- result.setScrollableMessageBody(msg);
- result.setTimeout(timeoutInMs);
- return result;
- }
-
- /**
- * Creates an Alert request
- *
- * @param textToSpeak The text that should be spoken on the vehicle sound system
- * @param line1 The first line in the alert
- * @param line2 The second line in the alert
- * @param line3 The third line in the alert
- * @param playTone Whether or not to play a tone
- * @param toneDuration The length time to show the alert. Must be within timeout range for Alert.
- * @return The created Alert request
- */
- public static RPCRequest alert(String textToSpeak, String line1, String line2, String line3, boolean playTone, int toneDuration){
- if(toneDuration < MathUtils.convertSecsToMillisecs(SdlConstants.AlertConstants.ALERT_TIME_MINIMUM) ||
- toneDuration > MathUtils.convertSecsToMillisecs(SdlConstants.AlertConstants.ALERT_TIME_MAXIMUM) ){
- throw new IllegalArgumentException();
- }
-
- Alert result = new Alert();
- if(textToSpeak != null && textToSpeak.length() > 0){
- result.setTtsChunks(SdlUtils.createTextToSpeechVector(textToSpeak));
- }
- if(line1 != null && line1.length() > 0){
- result.setAlertText1(line1);
- }
- if(line2 != null && line2.length() > 0){
- result.setAlertText2(line2);
- }
- if(line3 != null && line3.length() > 0){
- result.setAlertText3(line3);
- }
-
- result.setPlayTone(playTone);
- result.setDuration(toneDuration);
-
- return result;
- }
-
- /**
- * Creates a SetAppIcon request.
- *
- * @param iconName The name of the image to show as the app icon. Cannot be null or empty.
- * @return The created SetAppIcon request
- */
- public static RPCRequest setAppIcon(String iconName){
- if(iconName == null){
- throw new NullPointerException();
- }
- if(iconName.length() <= 0){
- throw new IllegalArgumentException();
- }
-
- SetAppIcon result = new SetAppIcon();
- result.setSmartDeviceLinkFileName(iconName);
- return result;
- }
-
- /**
- * Creates a SetMediaClockTimer request.
- *
- * @param mode The UpdateMode for the clock timer. Cannot be null.
- * @param startTime The start time for the clock timer
- * @return The created SetMediaClockTimer request
- */
- public static RPCRequest setMediaClockTimer(UpdateMode mode, StartTime startTime){
- if(mode == null){
- throw new NullPointerException();
- }
-
- SetMediaClockTimer result = new SetMediaClockTimer();
- result.setUpdateMode(mode);
- if(startTime != null){
- result.setStartTime(startTime);
- }
- return result;
- }
-
-
- /**
- * Creates a SetMediaClockTimer request.
- *
- * @param mode The UpdateMode for the clock timer. Cannot be null.
- * @param hours The hours place of the clock
- * @param minutes The minutes place of the clock
- * @param seconds The seconds place of the clock
- * @return The created SetMediaClockTimer request
- */
- public static RPCRequest setMediaClockTimer(UpdateMode mode, int hours, int minutes, int seconds){
- return setMediaClockTimer(mode, SdlUtils.createStartTime(hours, minutes, seconds));
- }
-
- /**
- * Creates a SetMediaClockTimer request.
- *
- * @param mode The UpdateMode for the clock timer. Cannot be null.
- * @return
- */
- public static RPCRequest setMediaClockTimer(UpdateMode mode){
- return setMediaClockTimer(mode, null);
- }
-
- /**
- * Creates a Show request.
- *
- * @param line1 The first line of text on the HMI
- * @param line2 The second line of text on the HMI
- * @param line3 The third line of text on the HMI
- * @param line4 The fourth line of text on the HMI (not available for media apps)
- * @param statusBar The text of the status bar
- * @param alignment The TextAlignment of the text
- * @param imageName The name of the image to show on the HMI
- * @return The created Show request
- */
- public static RPCRequest show(String line1, String line2, String line3, String line4, String statusBar, TextAlignment alignment, String imageName){
- Show result = new Show();
- if(line1 != null && line1.length() > 0){
- result.setMainField1(line1);
- }
- if(line2 != null && line2.length() > 0){
- result.setMainField2(line2);
- }
- if(line3 != null && line3.length() > 0){
- result.setMainField3(line3);
- }
- if(line4 != null && line4.length() > 0){
- result.setMainField4(line4);
- }
- if(statusBar != null && statusBar.length() > 0){
- result.setStatusBar(statusBar);
- }
- if(alignment != null){
- result.setAlignment(alignment);
- }
- if(imageName != null){
- Image image = SdlUtils.dynamicImage(imageName);
- result.setGraphic(image);
- }
-
- return result;
- }
-
- /**
- * Creates a Slider request.
- *
- * @param header The header/title text for the slider. Cannot be null.
- * @param footer The footer text for the slider
- * @param numOfTicks The total number of ticks available in the slider. Must be a valid ticks value.
- * @param startPosition The initial position of the slider. Must be a valid start position value.
- * @param timeout The timeout of the slider. Must be a valid slider timeout value.
- * @return The created Slider request
- */
- public static RPCRequest slider(String header, String footer, int numOfTicks, int startPosition, int timeout){
- if(header == null){
- throw new NullPointerException();
- }
- if(numOfTicks < SdlConstants.SliderConstants.NUM_OF_TICKS_MIN || numOfTicks > SdlConstants.SliderConstants.NUM_OF_TICKS_MAX ||
- startPosition < SdlConstants.SliderConstants.START_POSITION_MIN || startPosition > numOfTicks ||
- timeout < MathUtils.convertSecsToMillisecs(SdlConstants.SliderConstants.TIMEOUT_MIN) ||
- timeout > MathUtils.convertSecsToMillisecs(SdlConstants.SliderConstants.TIMEOUT_MAX) ){
- throw new IllegalArgumentException();
- }
-
- Slider result = new Slider();
- result.setSliderHeader(header);
- result.setSliderFooter(SdlUtils.voiceRecognitionVector(footer));
- result.setNumTicks(numOfTicks);
- result.setPosition(startPosition);
- result.setTimeout(timeout);
- return result;
- }
-
- /**
- * Creates a Speak request.
- *
- * @param text The text to speak. Cannot be null.
- * @param speechCapabilities The type of input - either text, phoneme type or silence. Cannot be null.
- * @return The created Speak request
- */
- public static RPCRequest speak(String text, SpeechCapabilities speechCapabilities){
- if(text == null || speechCapabilities == null){
- throw new NullPointerException();
- }
-
- Speak result = new Speak();
- result.setTtsChunks(SdlUtils.createTextToSpeechVector(text, speechCapabilities));
- return result;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseFactory.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseFactory.java
deleted file mode 100644
index b6ee7c2c3..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseFactory.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package com.livio.sdl;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
-import com.smartdevicelink.proxy.rpc.AddCommandResponse;
-import com.smartdevicelink.proxy.rpc.AddSubMenuResponse;
-import com.smartdevicelink.proxy.rpc.AlertResponse;
-import com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse;
-import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse;
-import com.smartdevicelink.proxy.rpc.DeleteCommandResponse;
-import com.smartdevicelink.proxy.rpc.DeleteFileResponse;
-import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse;
-import com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse;
-import com.smartdevicelink.proxy.rpc.GetDTCsResponse;
-import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.ListFilesResponse;
-import com.smartdevicelink.proxy.rpc.PerformInteractionResponse;
-import com.smartdevicelink.proxy.rpc.PutFileResponse;
-import com.smartdevicelink.proxy.rpc.ReadDIDResponse;
-import com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse;
-import com.smartdevicelink.proxy.rpc.ScrollableMessageResponse;
-import com.smartdevicelink.proxy.rpc.SetAppIconResponse;
-import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse;
-import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse;
-import com.smartdevicelink.proxy.rpc.ShowResponse;
-import com.smartdevicelink.proxy.rpc.SliderResponse;
-import com.smartdevicelink.proxy.rpc.SpeakResponse;
-import com.smartdevicelink.proxy.rpc.SubscribeButtonResponse;
-import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.UnsubscribeButtonResponse;
-import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.enums.Result;
-
-/**
- * A factory class to generate responses based on the input requests.
- *
- * @author Mike Burke
- *
- */
-public final class SdlResponseFactory {
-
- private SdlResponseFactory() {}
-
- /**
- * Creates a generic "Success" response for the input request with no input checking. The created
- * response is sent back to the appropriate method of the input listener.
- *
- * @param request The request to respond to
- * @param listener The listener to inform when the response is complete
- */
- public static void sendGenericResponseForRequest(RPCRequest request, IProxyListenerALM listener){
- if(listener == null){
- throw new NullPointerException();
- }
-
- final String reqName = request.getFunctionName();
- final int correlationId = request.getCorrelationID();
-
- // this is really bad
- if(reqName == Names.Alert){
- AlertResponse result = new AlertResponse();
- setSuccessParams(result, correlationId);
- listener.onAlertResponse(result);
- }
- else if(reqName == Names.Speak){
- SpeakResponse result = new SpeakResponse();
- setSuccessParams(result, correlationId);
- listener.onSpeakResponse(result);
- }
- else if(reqName == Names.Show){
- ShowResponse result = new ShowResponse();
- setSuccessParams(result, correlationId);
- listener.onShowResponse(result);
- }
- else if(reqName == Names.SubscribeButton){
- SubscribeButtonResponse result = new SubscribeButtonResponse();
- setSuccessParams(result, correlationId);
- listener.onSubscribeButtonResponse(result);
-
- }
- else if(reqName == Names.UnsubscribeButton){
- UnsubscribeButtonResponse result = new UnsubscribeButtonResponse();
- setSuccessParams(result, correlationId);
- listener.onUnsubscribeButtonResponse(result);
- }
- else if(reqName == Names.AddCommand){
- AddCommandResponse result = new AddCommandResponse();
- setSuccessParams(result, correlationId);
- listener.onAddCommandResponse(result);
- }
- else if(reqName == Names.DeleteCommand){
- DeleteCommandResponse result = new DeleteCommandResponse();
- setSuccessParams(result, correlationId);
- listener.onDeleteCommandResponse(result);
- }
- else if(reqName == Names.AddSubMenu){
- AddSubMenuResponse result = new AddSubMenuResponse();
- setSuccessParams(result, correlationId);
- listener.onAddSubMenuResponse(result);
- }
- else if(reqName == Names.DeleteSubMenu){
- DeleteSubMenuResponse result = new DeleteSubMenuResponse();
- setSuccessParams(result, correlationId);
- listener.onDeleteSubMenuResponse(result);
- }
- else if(reqName == Names.SetGlobalProperties){
- SetGlobalPropertiesResponse result = new SetGlobalPropertiesResponse();
- setSuccessParams(result, correlationId);
- listener.onSetGlobalPropertiesResponse(result);
- }
- else if(reqName == Names.ResetGlobalProperties){
- ResetGlobalPropertiesResponse result = new ResetGlobalPropertiesResponse();
- setSuccessParams(result, correlationId);
- listener.onResetGlobalPropertiesResponse(result);
- }
- else if(reqName == Names.SetMediaClockTimer){
- SetMediaClockTimerResponse result = new SetMediaClockTimerResponse();
- setSuccessParams(result, correlationId);
- listener.onSetMediaClockTimerResponse(result);
- }
- else if(reqName == Names.CreateInteractionChoiceSet){
- CreateInteractionChoiceSetResponse result = new CreateInteractionChoiceSetResponse();
- setSuccessParams(result, correlationId);
- listener.onCreateInteractionChoiceSetResponse(result);
- }
- else if(reqName == Names.DeleteInteractionChoiceSet){
- DeleteInteractionChoiceSetResponse result = new DeleteInteractionChoiceSetResponse();
- setSuccessParams(result, correlationId);
- listener.onDeleteInteractionChoiceSetResponse(result);
- }
- else if(reqName == Names.PerformInteraction){
- PerformInteractionResponse result = new PerformInteractionResponse();
- setSuccessParams(result, correlationId);
- listener.onPerformInteractionResponse(result);
- }
- else if(reqName == Names.Slider){
- SliderResponse result = new SliderResponse();
- setSuccessParams(result, correlationId);
- listener.onSliderResponse(result);
- }
- else if(reqName == Names.ScrollableMessage){
- ScrollableMessageResponse result = new ScrollableMessageResponse();
- setSuccessParams(result, correlationId);
- listener.onScrollableMessageResponse(result);
- }
- else if(reqName == Names.ChangeRegistration){
- ChangeRegistrationResponse result = new ChangeRegistrationResponse();
- setSuccessParams(result, correlationId);
- listener.onChangeRegistrationResponse(result);
- }
- else if(reqName == Names.PutFile){
- PutFileResponse result = new PutFileResponse();
- setSuccessParams(result, correlationId);
- listener.onPutFileResponse(result);
- }
- else if(reqName == Names.DeleteFile){
- DeleteFileResponse result = new DeleteFileResponse();
- setSuccessParams(result, correlationId);
- listener.onDeleteFileResponse(result);
- }
- else if(reqName == Names.ListFiles){
- ListFilesResponse result = new ListFilesResponse();
- setSuccessParams(result, correlationId);
- listener.onListFilesResponse(result);
- }
- else if(reqName == Names.SetAppIcon){
- SetAppIconResponse result = new SetAppIconResponse();
- setSuccessParams(result, correlationId);
- listener.onSetAppIconResponse(result);
- }
- else if(reqName == Names.SubscribeVehicleData){
- SubscribeVehicleDataResponse result = new SubscribeVehicleDataResponse();
- setSuccessParams(result, correlationId);
- listener.onSubscribeVehicleDataResponse(result);
- }
- else if(reqName == Names.UnsubscribeVehicleData){
- UnsubscribeVehicleDataResponse result = new UnsubscribeVehicleDataResponse();
- setSuccessParams(result, correlationId);
- listener.onUnsubscribeVehicleDataResponse(result);
- }
- else if(reqName == Names.GetVehicleData){
- GetVehicleDataResponse result = new GetVehicleDataResponse();
- setSuccessParams(result, correlationId);
- listener.onGetVehicleDataResponse(result);
- }
- else if(reqName == Names.ReadDID){
- ReadDIDResponse result = new ReadDIDResponse();
- setSuccessParams(result, correlationId);
- listener.onReadDIDResponse(result);
- }
- else if(reqName == Names.GetDTCs){
- GetDTCsResponse result = new GetDTCsResponse();
- setSuccessParams(result, correlationId);
- listener.onGetDTCsResponse(result);
- }
- }
-
- private static void setSuccessParams(RPCResponse response, int correlationId){
- response.setSuccess(true);
- response.setCorrelationID(correlationId);
- response.setResultCode(Result.SUCCESS);
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseTracker.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseTracker.java
deleted file mode 100644
index e7e6fa3bf..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlResponseTracker.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package com.livio.sdl;
-
-import android.util.SparseArray;
-
-import com.livio.sdl.utils.Timeout;
-import com.smartdevicelink.proxy.RPCRequest;
-
-/**
- * Tracks outgoing requests to core and sets a timeout for when the response
- * should come back from core. If a request isn't received by the time
- * the timeout expires, it should be assumed that SDL core disconnected.
- *
- * @author Mike Burke
- *
- */
-public class SdlResponseTracker {
-
- /**
- * Listener interface for SdlResponseTracker. Contains callback method
- * for when any request times out.
- *
- * @author Mike Burke
- *
- */
- public interface Listener{
- public void onRequestTimedOut();
- }
-
- /**
- * Default timeout to receive a response for a typical request.
- */
- public static final int DEFAULT_TIMEOUT = 5000; // 5 seconds
-
- private SparseArray<RPCRequest> requests = new SparseArray<RPCRequest>();
- private SparseArray<Timeout> timeouts = new SparseArray<Timeout>();
-
- private Listener listener;
-
- public SdlResponseTracker(Listener l) {
- this.listener = l;
- }
-
- /**
- * Adds a request to the tracker with a default timeout.
- *
- * @param request The request to track
- */
- public void add(RPCRequest request){
- add(request, DEFAULT_TIMEOUT);
- }
-
- /**
- * Adds a request to the tracker with a specified timeout.
- *
- * @param request The request to track
- * @param duration The timeout duration (in ms)
- */
- public void add(RPCRequest request, int duration){
- int corrId = request.getCorrelationID();
- requests.put(corrId, request);
-
- Timeout timeout = new Timeout(duration, new Timeout.Listener() {
- @Override public void onTimeoutCancelled() {}
-
- @Override
- public void onTimeoutCompleted() {
- notifyRequestTimedOut();
- }
- });
- timeout.start();
- timeouts.put(corrId, timeout);
- }
-
- /**
- * Removes the specified correlation id from the tracker. Also automatically
- * cancels the associated timer for the specified correlation id.
- *
- * @param corrId The correlation id to stop tracking
- * @return The request that was removed
- */
- public RPCRequest remove(int corrId){
- timeouts.get(corrId).cancel();
- timeouts.remove(corrId);
-
- RPCRequest result = requests.get(corrId);
- requests.remove(corrId);
- return result;
- }
-
- /**
- * Clears all requests being tracked and cancels their associated timeouts.
- */
- public void clear(){
- if(requests != null){
- // loop through requests and remove each one
- for(int numItems = requests.size()-1; numItems >= 0; numItems--){
- RPCRequest request = requests.valueAt(numItems);
- remove(request.getCorrelationID());
- }
- }
- }
-
- private void notifyRequestTimedOut(){
- if(listener != null){
- listener.onRequestTimedOut();
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlService.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlService.java
deleted file mode 100644
index 72f3d78b4..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/SdlService.java
+++ /dev/null
@@ -1,1131 +0,0 @@
-package com.livio.sdl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Vector;
-
-import android.annotation.SuppressLint;
-import android.app.Service;
-import android.content.Intent;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.RemoteException;
-import android.util.Log;
-import android.widget.Toast;
-
-import com.livio.sdl.enums.SdlButton;
-import com.livio.sdl.menu.CommandButton;
-import com.livio.sdl.menu.CommandButton.OnClickListener;
-import com.livio.sdl.menu.MenuItem;
-import com.livio.sdl.menu.MenuManager;
-import com.livio.sdl.menu.SubmenuButton;
-import com.livio.sdl.utils.UpCounter;
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.SmartDeviceLinkProxyALM;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
-import com.smartdevicelink.proxy.rpc.AddCommand;
-import com.smartdevicelink.proxy.rpc.AddCommandResponse;
-import com.smartdevicelink.proxy.rpc.AddSubMenu;
-import com.smartdevicelink.proxy.rpc.AddSubMenuResponse;
-import com.smartdevicelink.proxy.rpc.Alert;
-import com.smartdevicelink.proxy.rpc.AlertManeuverResponse;
-import com.smartdevicelink.proxy.rpc.AlertResponse;
-import com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse;
-import com.smartdevicelink.proxy.rpc.Choice;
-import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse;
-import com.smartdevicelink.proxy.rpc.DeleteCommand;
-import com.smartdevicelink.proxy.rpc.DeleteCommandResponse;
-import com.smartdevicelink.proxy.rpc.DeleteFile;
-import com.smartdevicelink.proxy.rpc.DeleteFileResponse;
-import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse;
-import com.smartdevicelink.proxy.rpc.DeleteSubMenu;
-import com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse;
-import com.smartdevicelink.proxy.rpc.DialNumberResponse;
-import com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse;
-import com.smartdevicelink.proxy.rpc.GenericResponse;
-import com.smartdevicelink.proxy.rpc.GetDTCsResponse;
-import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.ListFilesResponse;
-import com.smartdevicelink.proxy.rpc.OnAudioPassThru;
-import com.smartdevicelink.proxy.rpc.OnButtonEvent;
-import com.smartdevicelink.proxy.rpc.OnButtonPress;
-import com.smartdevicelink.proxy.rpc.OnCommand;
-import com.smartdevicelink.proxy.rpc.OnDriverDistraction;
-import com.smartdevicelink.proxy.rpc.OnHMIStatus;
-import com.smartdevicelink.proxy.rpc.OnLanguageChange;
-import com.smartdevicelink.proxy.rpc.OnPermissionsChange;
-import com.smartdevicelink.proxy.rpc.OnTBTClientState;
-import com.smartdevicelink.proxy.rpc.OnVehicleData;
-import com.smartdevicelink.proxy.rpc.PerformAudioPassThruResponse;
-import com.smartdevicelink.proxy.rpc.PerformInteraction;
-import com.smartdevicelink.proxy.rpc.PerformInteractionResponse;
-import com.smartdevicelink.proxy.rpc.PutFile;
-import com.smartdevicelink.proxy.rpc.PutFileResponse;
-import com.smartdevicelink.proxy.rpc.ReadDIDResponse;
-import com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse;
-import com.smartdevicelink.proxy.rpc.ScrollableMessage;
-import com.smartdevicelink.proxy.rpc.ScrollableMessageResponse;
-import com.smartdevicelink.proxy.rpc.SetAppIconResponse;
-import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse;
-import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse;
-import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse;
-import com.smartdevicelink.proxy.rpc.ShowConstantTBTResponse;
-import com.smartdevicelink.proxy.rpc.ShowResponse;
-import com.smartdevicelink.proxy.rpc.Slider;
-import com.smartdevicelink.proxy.rpc.SliderResponse;
-import com.smartdevicelink.proxy.rpc.SpeakResponse;
-import com.smartdevicelink.proxy.rpc.SubscribeButton;
-import com.smartdevicelink.proxy.rpc.SubscribeButtonResponse;
-import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.UnsubscribeButton;
-import com.smartdevicelink.proxy.rpc.UnsubscribeButtonResponse;
-import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.UpdateTurnListResponse;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.transport.TCPTransportConfig;
-
-/**
- * Performs all interactions with Smart Device Link in a long-running service that
- * clients can bind to in order to send information to the vehicle.
- *
- * @author Mike Burke
- *
- */
-public class SdlService extends Service implements IProxyListenerALM{
-
- /* ********** Nested Classes ********** */
-
- /**
- * Messages that can be received by a bound client.
- *
- * @author Mike Burke
- *
- */
- public static class ClientMessages{
- /**
- * Message.what integer called when SDL has successfully created a connection.
- */
- public static final int SDL_CONNECTED = 0;
- /**
- * Message.what integer called when SDL has disconnected.
- */
- public static final int SDL_DISCONNECTED = 1;
- /**
- * Message.what integer called when the main HMI is first displayed.
- */
- public static final int SDL_HMI_FIRST_DISPLAYED = 2;
- /**
- * Message.what integer called when a RPCResponse result has been received.
- */
- public static final int ON_MESSAGE_RESULT = 3;
- /**
- * Message.what integer called when a ServiceMessages.REQUEST_SUBMENU_LIST message has been received.
- */
- public static final int SUBMENU_LIST_RECEIVED = 4;
- /**
- * Message.what integer called when a ServiceMessages.REQUEST_COMMAND_LIST message has been received.
- */
- public static final int COMMAND_LIST_RECEIVED = 5;
- /**
- * Message.what integer called when a ServiceMessages.REQUEST_BUTTON_SUBSCRIPTIONS message has been received.
- */
- public static final int BUTTON_SUBSCRIPTIONS_RECEIVED = 6;
- /**
- * Message.what integer called when a ServiceMessages.REQUEST_INTERACTION_SETS message has been received.
- */
- public static final int INTERACTION_SETS_RECEIVED = 7;
- /**
- * Message.what integer called when a ServiceMessages.REQUEST_PUT_FILES message has been received.
- */
- public static final int PUT_FILES_RECEIVED = 8;
- }
-
- /**
- * Messages that can be sent to the service by a bound client.
- *
- * @author Mike Burke
- *
- */
- public static class ServiceMessages{
- /**
- * Message.what integer used to register your activity as a client bound to this service.
- */
- public static final int REGISTER_CLIENT = 0;
- /**
- * Message.what integer used to unregister your activity as a client bound to this service.
- */
- public static final int UNREGISTER_CLIENT = 1;
- /**
- * Message.what integer commanding the service to attempt an SDL connection.
- */
- public static final int CONNECT = 2;
- /**
- * Message.what integer commanding the service to disconnect an existing SDL connection.
- */
- public static final int DISCONNECT = 3;
- /**
- * Message.what integer commanding the service to reset the SDL connection.
- */
- public static final int RESET = 4;
- /**
- * Message.what integer setting the service to Offline mode.
- */
- public static final int OFFLINE_MODE = 5;
- /**
- * Message.what integer commanding the service to send an RPCRequest.
- */
- public static final int SEND_MESSAGE = 6;
- /**
- * Message.what integer commanding the service to respond with a list of existing submenus that have been added.
- */
- public static final int REQUEST_SUBMENU_LIST = 7;
- /**
- * Message.what integer commanding the service to respond with a list of existing commands that have been added.
- */
- public static final int REQUEST_COMMAND_LIST = 8;
- /**
- * Message.what integer commanding the service to respond with a list of buttons that have been subscribed to.
- */
- public static final int REQUEST_BUTTON_SUBSCRIPTIONS = 9;
- /**
- * Message.what integer commanding the service to respond with a list of interaction sets created so far.
- */
- public static final int REQUEST_INTERACTION_SETS = 10;
- /**
- * Message.what integer commanding the service to respond with a list of put file images added so far.
- */
- public static final int REQUEST_PUT_FILES = 11;
- }
-
- /**
- * Messages that can be shown on the vehicle head-unit. Any static
- * text that your app would like to show on the head-unit can be defined
- * in this class.
- *
- * @author Mike Burke
- *
- */
- protected static class MetadataMessages{
- public static final String BLANK = " ";
- public static final String APP_NAME = "Livio SDL Tester";
- public static final String APP_SLOGAN = "More Music, Less Work";
- }
-
- /* ********** Static variables ********** */
- protected IpAddress currentIp; // keeps track of the current ip address in case we need to reset
- private static final boolean IS_MEDIA_APP = true; /* All of these variables */
- private static final Language DEFAULT_LANGUAGE = Language.EN_US; /* are needed to start up */
- private static final String APP_ID = "appId"; /* the SDL proxy object */
- private static final boolean WIFI_AUTO_RECONNECT = true; /* */
-
- protected static boolean debug = false;
-
- /* ********** Instance variables ********** */
- protected List<Messenger> clients = null; // list of bound clients
-
- protected UpCounter correlationIdGenerator = new UpCounter(100); // id generator for correlation ids
- protected UpCounter commandIdGenerator = new UpCounter(100); // id generator for commands & submenus
-
- protected MenuManager menuManager = new MenuManager();
- protected MenuManager choiceSetManager = new MenuManager();
- protected SdlResponseTracker responseTracker;
- protected List<SdlButton> buttonSubscriptions = new ArrayList<SdlButton>();
- protected List<String> addedImageNames = new ArrayList<String>();
- protected Handler serviceHandler = new Handler();
-
- protected SmartDeviceLinkProxyALM sdlProxy = null; // the proxy object which sends our requests and receives responses
- protected boolean isConnected = false;
- protected boolean offlineMode = false;
- protected boolean alreadyDisplayed = false;
-
- protected Toast toast = null;
-
- /* ********** Messenger methods to & from the client ********** */
-
- protected final Messenger messenger = new Messenger(new IncomingHandler());
-
- @SuppressLint("HandlerLeak")
- protected class IncomingHandler extends Handler{
- @Override
- public void handleMessage(Message msg){
- switch(msg.what){
- case ServiceMessages.REGISTER_CLIENT:
- registerClient(msg.replyTo);
- break;
- case ServiceMessages.UNREGISTER_CLIENT:
- unregisterClient(msg.replyTo);
- break;
- case ServiceMessages.CONNECT:
- offlineMode = false;
- initialize();
- IpAddress inputIp = (IpAddress) msg.obj;
- startSdlProxy(inputIp);
- break;
- case ServiceMessages.DISCONNECT:
- offlineMode = true;
- initialize();
- stopSdlProxy();
- sendMessageToRegisteredClients(Message.obtain(null, ClientMessages.SDL_DISCONNECTED));
- break;
- case ServiceMessages.RESET:
- initialize();
- resetProxy();
- break;
- case ServiceMessages.OFFLINE_MODE:
- offlineMode = true;
- initialize();
- stopSdlProxy();
- break;
- case ServiceMessages.SEND_MESSAGE:
- onSendMessageReceived((RPCRequest) msg.obj);
- break;
- case ServiceMessages.REQUEST_SUBMENU_LIST:
- submenuListRequested(msg.replyTo, msg.arg1);
- break;
- case ServiceMessages.REQUEST_COMMAND_LIST:
- commandListRequested(msg.replyTo, msg.arg1);
- break;
- case ServiceMessages.REQUEST_BUTTON_SUBSCRIPTIONS:
- buttonSubscriptionsRequested(msg.replyTo, msg.arg1);
- break;
- case ServiceMessages.REQUEST_INTERACTION_SETS:
- interactionSetsRequested(msg.replyTo, msg.arg1);
- break;
- case ServiceMessages.REQUEST_PUT_FILES:
- putFilesRequested(msg.replyTo, msg.arg1);
- break;
- default:
- break;
- }
- }
- }
-
- /**
- * Registers a client to receive all communication from this service.
- *
- * @param client The client to register
- */
- protected void registerClient(Messenger client){
- if(clients == null){
- clients = new ArrayList<Messenger>();
- }
-
- clients.add(client);
- }
-
- /**
- * Removes a client from receiving all communication from this service.
- *
- * @param client The client to remove
- */
- protected void unregisterClient(Messenger client){
- if(clients != null && clients.size() > 0){
- clients.remove(client);
- }
- }
-
- /**
- * Sends a message to all registered clients.
- *
- * @param msg The message to send
- */
- protected void sendMessageToRegisteredClients(Message msg){
- if(clients != null){
- for(Messenger client : clients){
- sendMessageToClient(client, msg);
- }
- }
- }
-
- /**
- * Sends a message to a single client.
- *
- * @param client The client to reply to
- * @param msg The message to send
- */
- protected void sendMessageToClient(Messenger client, Message msg){
- try {
- client.send(msg);
- } catch (RemoteException e) {
- // if we can't send to this client, let's remove it
- unregisterClient(client);
- }
- }
-
- /**
- * Sends an RPCResponse message to all registered clients.
- *
- * @param response The response to send
- */
- protected void sendMessageResponse(RPCMessage response){
- Message msg = Message.obtain(null, ClientMessages.ON_MESSAGE_RESULT);
- msg.obj = response;
- sendMessageToRegisteredClients(msg);
- }
-
- /**
- * Sends the list of available sub-menus to the listening messenger client.
- *
- * @param listener The client to reply to
- * @param reqCode The request code sent with the initial request
- */
- protected void submenuListRequested(Messenger listener, int reqCode){
- Message msg = Message.obtain(null, ClientMessages.SUBMENU_LIST_RECEIVED);
- msg.obj = getSubmenuList();
- msg.arg1 = reqCode;
- sendMessageToClient(listener, msg);
- }
-
- /**
- * Sends the list of available commands to the listening messenger client.
- *
- * @param listener The client to reply to
- * @param reqCode The request code sent with the initial request
- */
- protected void commandListRequested(Messenger listener, int reqCode){
- Message msg = Message.obtain(null, ClientMessages.COMMAND_LIST_RECEIVED);
- msg.obj = getCommandList();
- msg.arg1 = reqCode;
- sendMessageToClient(listener, msg);
- }
-
- /**
- * Sends the list of button subscriptions to the listening messenger client.
- *
- * @param listener The client to reply to
- * @param reqCode The request code sent with the initial request
- */
- protected void buttonSubscriptionsRequested(Messenger listener, int reqCode){
- Message msg = Message.obtain(null, ClientMessages.BUTTON_SUBSCRIPTIONS_RECEIVED);
- msg.obj = getButtonSubscriptions();
- msg.arg1 = reqCode;
- sendMessageToClient(listener, msg);
- }
-
- /**
- * Sends the list of interaction sets to the listening messenger client.
- *
- * @param listener The client to reply to
- * @param reqCode The request code sent with the initial request
- */
- protected void interactionSetsRequested(Messenger listener, int reqCode){
- Message msg = Message.obtain(null, ClientMessages.INTERACTION_SETS_RECEIVED);
- msg.obj = getInteractionSets();
- msg.arg1 = reqCode;
- sendMessageToClient(listener, msg);
- }
-
- /**
- * Sends the list of put files to the listening messenger client.
- *
- * @param listener The client to reply to
- * @param reqCode The request code sent with the initial request
- */
- protected void putFilesRequested(Messenger listener, int reqCode){
- Message msg = Message.obtain(null, ClientMessages.PUT_FILES_RECEIVED);
- msg.obj = getPutFiles();
- msg.arg1 = reqCode;
- sendMessageToClient(listener, msg);
- }
-
- /* ********** Android service life cycle methods ********** */
- @Override
- public void onCreate() {
- log("onCreate called");
- initialize();
- super.onCreate();
- }
-
- private void initialize(){
- isConnected = false;
- alreadyDisplayed = false;
-
- if(responseTracker == null){
- responseTracker = new SdlResponseTracker(new SdlResponseTracker.Listener() {
- @Override
- public void onRequestTimedOut() {
- if(isConnected && !offlineMode){
- // if any sdl request times out, we will assume we disconnected.
- showToast("A request timed out. You may need to re-start SDL core.");
- Message msg = Message.obtain(null, ClientMessages.SDL_DISCONNECTED);
- sendMessageToRegisteredClients(msg);
- }
- }
- });
- }
- else{
- responseTracker.clear();
- }
-
- correlationIdGenerator.reset();
- commandIdGenerator.reset();
-
- menuManager.clear();
- choiceSetManager.clear();
- buttonSubscriptions.clear();
- addedImageNames.clear();
- }
-
- @Override
- public IBinder onBind(Intent arg0) {
- return messenger.getBinder();
- }
-
-
- /* ********** Proxy life cycle methods ********** */
- /**
- * Starts up SDL if it isn't already started. If SDL is already started, this method does nothing.
- * To reset the proxy, use the resetProxy method.
- *
- * @param inputIp The IP address to attempt a connection on
- */
- protected void startSdlProxy(final IpAddress inputIp){
- if(sdlProxy == null){
- sdlProxy = createSdlProxyObject(inputIp);
- }
- }
-
- /**
- * Creates a SmartDeviceLinkProxyALM object and automatically attempts a connection
- * to the input IP address.
- *
- * @param inputIp The IP address to attempt a connection on
- * @return The created SmartDeviceLinkProxyALM object
- */
- protected SmartDeviceLinkProxyALM createSdlProxyObject(IpAddress inputIp){
- int tcpPort = Integer.parseInt(inputIp.getTcpPort());
- String ipAddress = inputIp.getIpAddress();
- String appName = getResources().getString(R.string.app_name);
-
- SmartDeviceLinkProxyALM result = null;
- try {
- result = new SmartDeviceLinkProxyALM((IProxyListenerALM)this, null, appName, null, null,
- null, IS_MEDIA_APP, null, DEFAULT_LANGUAGE, DEFAULT_LANGUAGE, APP_ID,
- null, false, false, new TCPTransportConfig(tcpPort, ipAddress, WIFI_AUTO_RECONNECT));
- currentIp = inputIp;
- } catch (SmartDeviceLinkException e) {
- e.printStackTrace();
- }
-
- return result;
- }
-
- /**
- * Disposes of any current proxy object if it exists and automatically creates a new
- * proxy connection to the previously connected IP address.
- */
- protected void resetProxy(){
- stopSdlProxy();
- startSdlProxy(currentIp);
- }
-
- /**
- * Disposes of any current proxy object and sets the object to null so it cannot be
- * used again.
- */
- protected void stopSdlProxy(){
- if(sdlProxy != null && sdlProxy.getIsConnected() && sdlProxy.getAppInterfaceRegistered()){
- try {
- sdlProxy.dispose();
- } catch (SmartDeviceLinkException e) {
- e.printStackTrace();
- }
- }
-
- sdlProxy = null;
- }
-
- /* ********** Proxy communication methods ********** */
- /**
- * Called when a message to send is received, adds parameters where appropriate (correlation id,
- * command id, other command-specific parameters, etc).
- *
- * @param command The request to send
- */
- protected void onSendMessageReceived(RPCRequest command){
- if(command == null){
- throw new NullPointerException("Cannot send a null command.");
- }
-
- if(!offlineMode && sdlProxy == null){
- throw new IllegalStateException("Proxy object is null, so no commands can be sent.");
- }
-
- // set any request-specific parameters if needed
- setRequestSpecificParameters(command);
-
- // after setting appropriate parameters, send the full, completed response back to the clients
- sendMessageResponse(command);
-
- if(!offlineMode){
- // send the request through SmartDeviceLink
- sendRpcRequest(command);
- }
- else{
- // in offline mode, we'll just send a "fake" success response.
- SdlResponseFactory.sendGenericResponseForRequest(command, this);
- }
- }
-
- /**
- * Sends the input request to the connected SDL proxy instance.
- *
- * @param request
- */
- protected void sendRpcRequest(RPCRequest request){
- try {
- sdlProxy.sendRPCRequest(request);
- } catch (SmartDeviceLinkException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Sets any command-specific parameters that need to be set. For example, add command and add submenu commands
- * need to be assigned an ID at this point.
- *
- * @param command The RPC command to edit
- */
- protected void setRequestSpecificParameters(RPCRequest command){
- String name = command.getFunctionName();
-
- // give the command a correlation id
- command.setCorrelationID(correlationIdGenerator.next());
-
- if(name.equals(Names.AddCommand)){
- ((AddCommand) command).setCmdID(commandIdGenerator.next());
- addToRequestQueue(command);
- }
- else if(name.equals(Names.AddSubMenu)){
- ((AddSubMenu) command).setMenuID(commandIdGenerator.next());
- addToRequestQueue(command);
- }
- else if(name.equals(Names.CreateInteractionChoiceSet)){
- CreateInteractionChoiceSet choiceSet = (CreateInteractionChoiceSet) command;
- choiceSet.setInteractionChoiceSetID(commandIdGenerator.next());
-
- Vector<Choice> choices = choiceSet.getChoiceSet();
- for(Choice choice : choices){
- choice.setChoiceID(commandIdGenerator.next());
- }
-
- addToRequestQueue(command);
- }
- else if(name.equals(Names.Alert)){
- int timeout = ((Alert) command).getDuration();
- addToRequestQueue(command, (timeout + SdlConstants.AlertConstants.EXPECTED_REPSONSE_TIME_OFFSET));
- }
- else if(name.equals(Names.PerformInteraction)){
- int timeout = ((PerformInteraction) command).getTimeout();
- addToRequestQueue(command, (timeout + SdlConstants.PerformInteractionConstants.EXPECTED_REPSONSE_TIME_OFFSET));
- }
- else if(name.equals(Names.ScrollableMessage)){
- int timeout = ((ScrollableMessage) command).getTimeout();
- addToRequestQueue(command, (timeout + SdlConstants.ScrollableMessageConstants.EXPECTED_REPSONSE_TIME_OFFSET));
- }
- else if(name.equals(Names.Slider)){
- int timeout = ((Slider) command).getTimeout();
- addToRequestQueue(command, (timeout + SdlConstants.SliderConstants.EXPECTED_REPSONSE_TIME_OFFSET));
- }
- else if( name.equals(Names.PutFile) || name.equals(Names.SubscribeButton) || name.equals(Names.SubscribeVehicleData) ||
- name.equals(Names.UnsubscribeVehicleData) || name.equals(Names.DeleteCommand) ||
- name.equals(Names.UnsubscribeButton) || name.equals(Names.DeleteInteractionChoiceSet) || name.equals(Names.DeleteSubMenu) ||
- name.equals(Names.DeleteFile)){
- addToRequestQueue(command);
- }
-
- }
-
- /**
- * Adds the input request to the queue of requests that are awaiting responses.
- *
- * @param request The request to add
- */
- protected void addToRequestQueue(RPCRequest request){
- responseTracker.add(request);
- }
-
- /**
- * Adds the input request to the queue of requests that are awaiting responses.
- *
- * @param request The request to add
- * @param timeout A timeout that exceeds the expected timeout of the request
- */
- protected void addToRequestQueue(RPCRequest request, int timeout){
- responseTracker.add(request, timeout);
- }
-
- /**
- * Removes the input request from the queue of requests that are awaiting responses.
- *
- * @param request The request to remove
- */
- protected RPCRequest removeFromRequestQueue(int key){
- return responseTracker.remove(key);
- }
-
- /**
- * Translates the AddCommand object into a MenuItem object, complete with a click listener.
- *
- * @param command The command to translate
- * @return The translated MenuItem object
- */
- protected MenuItem createMenuItem(AddCommand command){
- final String name = command.getMenuParams().getMenuName();
- final int id = command.getCmdID();
- int parentId;
- final Integer parentInteger = command.getMenuParams().getParentID();
- if(parentInteger == null){
- parentId = -1;
- }
- else{
- parentId = parentInteger;
- }
-
- final MenuItem result = new CommandButton(name, id, parentId, new OnClickListener(){
- @Override
- public void onClick(CommandButton button) {
- showToast(new StringBuilder().append(name).append(" clicked!").toString());
- }
- });
-
- return result;
- }
-
- /**
- * Translates the AddSubMenu object into a MenuItem object.
- *
- * @param command The command to translate
- * @return The translated MenuItem object
- */
- protected MenuItem createMenuItem(AddSubMenu command){
- final String name = command.getMenuName();
- final MenuItem result = new SubmenuButton(name, command.getMenuID());
- return result;
- }
-
- /**
- * Translates the CreateInteractionChoiceSet object into a MenuItem object.
- *
- * @param command The command to translate
- * @return The translated MenuItem object
- */
- protected MenuItem createMenuItem(CreateInteractionChoiceSet command){
- final String name = "Choice Set";
- final MenuItem result = new SubmenuButton(name, command.getInteractionChoiceSetID());
- return result;
- }
-
- /**
- * Translates the CreateInteractionChoiceSet object into a MenuItem object, complete with a click listener.
- *
- * @param choice The command to translate
- * @param parentId The parent id of the input choice command
- * @return The translated MenuItem object
- */
- protected MenuItem createMenuItem(Choice choice, final int parentId){
- final String name = choice.getMenuName();
- final int id = choice.getChoiceID();
- final MenuItem result = new CommandButton(name, id, parentId, new OnClickListener(){
- @Override
- public void onClick(CommandButton button) {
- showToast(new StringBuilder().append(name).append(" clicked!").toString());
- }
- });
-
- return result;
- }
-
- /**
- * Creates a copy of the list of submenus added so far.
- *
- * @return The copied list of submenu items
- */
- protected List<MenuItem> getSubmenuList(){
- return menuManager.getSubmenus();
- }
-
- /**
- * Creates a copy of the list of commands added so far.
- *
- * @return The copied list of command items
- */
- protected List<MenuItem> getCommandList(){
- return menuManager.getCommands();
- }
-
- /**
- * Creates a copy of the choice set menus added so far.
- *
- * @return The copied list of choice set items
- */
- protected List<MenuItem> getChoiceSetList(){
- return choiceSetManager.getSubmenus();
- }
-
- /**
- * Creates a copy of the list of button subscriptions added so far.
- *
- * @return The copied list of button subscriptions
- */
- protected List<SdlButton> getButtonSubscriptions(){
- if(buttonSubscriptions == null || buttonSubscriptions.size() <= 0){
- return Collections.emptyList();
- }
-
- return new ArrayList<SdlButton>(buttonSubscriptions);
- }
-
- /**
- * Creates a copy of the list of interaction sets added so far.
- *
- * @return The copied list of interaction sets
- */
- protected List<MenuItem> getInteractionSets(){
- List<MenuItem> result = choiceSetManager.getSubmenus();
- if(result == null || result.size() <= 0){
- return Collections.emptyList();
- }
-
- return result;
- }
-
- /**
- * Creates a copy of the list of image names added so far.
- *
- * @return The copied list of image names
- */
- protected List<String> getPutFiles(){
- if(addedImageNames == null || addedImageNames.size() <= 0){
- return Collections.emptyList();
- }
-
- return new ArrayList<String>(addedImageNames);
- }
-
- /**
- * Posts the input runnable to the Service thread.
- *
- * @param runnable The runnable to run
- */
- protected void runOnServiceThread(Runnable runnable){
- serviceHandler.post(runnable);
- }
-
- /* ********** IProxyListenerALM interface methods ********** */
-
- /* Most useful callbacks */
- @Override
- public void onOnHMIStatus(OnHMIStatus newStatus) {
- if(!isConnected){
- Message msg = Message.obtain(null, ClientMessages.SDL_CONNECTED);
- sendMessageToRegisteredClients(msg);
- isConnected = true;
- }
-
- if(newStatus.getHmiLevel() == HMILevel.HMI_FULL && !alreadyDisplayed){
- Message msg = Message.obtain(null, ClientMessages.SDL_HMI_FIRST_DISPLAYED);
- sendMessageToRegisteredClients(msg);
- alreadyDisplayed = true;
- }
-
- sendMessageResponse(newStatus);
- }
-
- @Override
- public void onProxyClosed(String info, Exception e) {
- Message msg = Message.obtain(null, ClientMessages.SDL_DISCONNECTED);
- sendMessageToRegisteredClients(msg);
- stopSdlProxy();
- initialize();
- }
-
- @Override
- public void onOnCommand(final OnCommand notification) {
- runOnServiceThread(new Runnable() {
- @Override
- public void run() {
- sendMessageResponse(notification);
-
- int buttonId = notification.getCmdID();
- menuManager.dispatchClick(buttonId);
- }
- });
- }
-
- @Override public void onOnButtonPress(final OnButtonPress notification) {
- runOnServiceThread(new Runnable() {
- @Override
- public void run() {
- sendMessageResponse(notification);
-
- ButtonName button = notification.getButtonName();
- SdlButton sdlButton = SdlButton.translateFromLegacy(button);
- String text = new StringBuilder().append(sdlButton.toString()).append(" clicked!").toString();
- showToast(text);
- }
- });
- }
-
- /* Not very useful callbacks */
- @Override public void onOnPermissionsChange(OnPermissionsChange notification) {sendMessageResponse(notification);}
- @Override public void onOnVehicleData(OnVehicleData notification) {sendMessageResponse(notification);}
- @Override public void onOnAudioPassThru(OnAudioPassThru notification) {sendMessageResponse(notification);}
- @Override public void onOnLanguageChange(OnLanguageChange notification) {sendMessageResponse(notification);}
- @Override public void onOnDriverDistraction(OnDriverDistraction notification) {sendMessageResponse(notification);}
- @Override public void onOnTBTClientState(OnTBTClientState notification) {sendMessageResponse(notification);}
- @Override public void onError(String info, Exception e) {}
- @Override public void onOnButtonEvent(OnButtonEvent notification) {sendMessageResponse(notification);}
-
- /* Message responses */
- @Override
- public void onAddCommandResponse(AddCommandResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- MenuItem button = createMenuItem((AddCommand) original);
- if(button != null){
- menuManager.addItem(button);
- }
- }
- }
-
- @Override
- public void onDeleteCommandResponse(DeleteCommandResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- if(response.getSuccess()){
- int idToRemove = ((DeleteCommand) original).getCmdID();
- menuManager.removeItem(idToRemove);
- }
- }
- }
-
- @Override
- public void onAddSubMenuResponse(AddSubMenuResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- MenuItem button = createMenuItem((AddSubMenu) original);
- if(button != null){
- menuManager.addItem(button);
- }
- }
- }
-
- @Override
- public void onDeleteSubMenuResponse(DeleteSubMenuResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- int idToRemove = ((DeleteSubMenu) original).getMenuID();
- menuManager.removeItem(idToRemove);
- }
- }
- @Override
- public void onSubscribeButtonResponse(SubscribeButtonResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- SdlButton button = SdlButton.translateFromLegacy(((SubscribeButton) original).getButtonName());
- buttonSubscriptions.add(button);
- }
- }
-
- @Override
- public void onUnsubscribeButtonResponse(UnsubscribeButtonResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- SdlButton button = SdlButton.translateFromLegacy(((UnsubscribeButton) original).getButtonName());
- buttonSubscriptions.remove(button);
- }
- }
-
- @Override
- public void onCreateInteractionChoiceSetResponse(CreateInteractionChoiceSetResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- // add the parent (choice set) item to the choice set manager
- CreateInteractionChoiceSet choiceSet = (CreateInteractionChoiceSet) original;
- MenuItem item = createMenuItem(choiceSet);
- choiceSetManager.addItem(item);
-
- // then, add all the parent's children to the choice set manager
- final int parentId = choiceSet.getInteractionChoiceSetID();
- Vector<Choice> children = choiceSet.getChoiceSet();
- for(Choice child : children){
- item = createMenuItem(child, parentId);
- choiceSetManager.addItem(item);
- }
- }
- }
-
- @Override
- public void onDeleteInteractionChoiceSetResponse(DeleteInteractionChoiceSetResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- // get the choice set ID from the original request and remove it from the choice set manager
- DeleteInteractionChoiceSet choiceSet = (DeleteInteractionChoiceSet) original;
- int choiceId = choiceSet.getInteractionChoiceSetID();
- choiceSetManager.removeItem(choiceId);
- }
- }
-
- @Override
- public void onPutFileResponse(PutFileResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- // get the choice set ID from the original request and remove it from the choice set manager
- PutFile putFile = (PutFile) original;
- String putFileName = putFile.getSmartDeviceLinkFileName();
- addedImageNames.add(putFileName);
- }
- }
-
- @Override
- public void onDeleteFileResponse(DeleteFileResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- RPCRequest original = removeFromRequestQueue(correlationId);
-
- if(response.getSuccess() && original != null){
- // get the choice set ID from the original request and remove it from the choice set manager
- DeleteFile deleteFile = (DeleteFile) original;
- String deleteFileName = deleteFile.getSmartDeviceLinkFileName();
- addedImageNames.remove(deleteFileName);
- }
- }
- @Override
- public void onAlertResponse(AlertResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- removeFromRequestQueue(correlationId);
- }
-
- @Override
- public void onPerformInteractionResponse(final PerformInteractionResponse response) {
- runOnServiceThread(new Runnable() {
- @Override
- public void run() {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- removeFromRequestQueue(correlationId);
-
- if(response.getSuccess()){
- int interactionId = response.getChoiceID();
- choiceSetManager.dispatchClick(interactionId);
- }
- }
- });
- }
-
- @Override
- public void onSliderResponse(SliderResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- removeFromRequestQueue(correlationId);
- }
-
- @Override
- public void onScrollableMessageResponse(ScrollableMessageResponse response) {
- sendMessageResponse(response);
-
- int correlationId = response.getCorrelationID();
- removeFromRequestQueue(correlationId);
- }
-
- @Override public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response) {sendMessageResponse(response);}
- @Override public void onUnsubscribeVehicleDataResponse(UnsubscribeVehicleDataResponse response) {sendMessageResponse(response);}
- @Override public void onGenericResponse(GenericResponse response) {sendMessageResponse(response);}
- @Override public void onResetGlobalPropertiesResponse(ResetGlobalPropertiesResponse response) {sendMessageResponse(response);}
- @Override public void onSetGlobalPropertiesResponse(SetGlobalPropertiesResponse response) {sendMessageResponse(response);}
- @Override public void onSetMediaClockTimerResponse(SetMediaClockTimerResponse response) {sendMessageResponse(response);}
- @Override public void onShowResponse(ShowResponse response) {sendMessageResponse(response);}
- @Override public void onSpeakResponse(SpeakResponse response) {sendMessageResponse(response);}
- @Override public void onGetVehicleDataResponse(GetVehicleDataResponse response) {sendMessageResponse(response);}
- @Override public void onReadDIDResponse(ReadDIDResponse response) {sendMessageResponse(response);}
- @Override public void onGetDTCsResponse(GetDTCsResponse response) {sendMessageResponse(response);}
- @Override public void onPerformAudioPassThruResponse(PerformAudioPassThruResponse response) {sendMessageResponse(response);}
- @Override public void onEndAudioPassThruResponse(EndAudioPassThruResponse response) {sendMessageResponse(response);}
- @Override public void onListFilesResponse(ListFilesResponse response) {sendMessageResponse(response);}
- @Override public void onSetAppIconResponse(SetAppIconResponse response) {sendMessageResponse(response);}
- @Override public void onChangeRegistrationResponse(ChangeRegistrationResponse response) {sendMessageResponse(response);}
- @Override public void onSetDisplayLayoutResponse(SetDisplayLayoutResponse response) {sendMessageResponse(response);}
- @Override public void onAlertManeuverResponse(AlertManeuverResponse response) {sendMessageResponse(response);}
- @Override public void onShowConstantTBTResponse(ShowConstantTBTResponse response) {sendMessageResponse(response);}
- @Override public void onUpdateTurnListResponse(UpdateTurnListResponse response) {sendMessageResponse(response);}
- @Override public void onDialNumberResponse(DialNumberResponse response) {sendMessageResponse(response);}
-
-
- private void showToast(String msg){
- if(toast == null){
- toast = Toast.makeText(SdlService.this, "", Toast.LENGTH_LONG);
- }
-
- toast.setText(msg);
- toast.show();
- }
-
- /* ********** Debug & log methods ********** */
- /**
- * Enables debug mode for this class and any classes used in this class.
- *
- * @param enable Enable flag for debug mode
- */
- public static void setDebug(boolean enable){
- debug = enable;
- MenuManager.setDebug(enable);
- }
-
- private static void log(String msg){
- if(debug){
- Log.d("SdlService", msg);
- }
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlImageAdapter.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlImageAdapter.java
deleted file mode 100644
index 2a3ec3ca7..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlImageAdapter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.livio.sdl.adapters;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.SdlImageItem;
-
-public class SdlImageAdapter extends ArrayAdapter<SdlImageItem> {
-
-
- public SdlImageAdapter(Context context, List<SdlImageItem> objects) {
- super(context, R.layout.simple_listview_with_image, objects);
- }
-
- public SdlImageAdapter(Context context) {
- super(context, R.layout.simple_listview_with_image);
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View view = convertView;
-
- if(convertView == null){
- LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- view = inflater.inflate(R.layout.simple_listview_with_image, null);
- }
-
- SdlImageItem item = getItem(position);
-
- if(item != null){
- populateView(view, item);
- }
-
-
- return view;
- }
-
- /**
- * Populate the input parent view with information from the SDL log message.
- *
- * @param view The view to populate
- * @param item The data with which to populate the view
- */
- private void populateView(View view, SdlImageItem item){
- ImageView iv_image = (ImageView) view.findViewById(R.id.iv_rowImage);
- TextView tv_text = (TextView) view.findViewById(R.id.tv_rowText);
-
- iv_image.setImageBitmap(item.getBitmap());
- tv_text.setText(item.getImageName());
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlMessageAdapter.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlMessageAdapter.java
deleted file mode 100644
index f1ead1ed1..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/adapters/SdlMessageAdapter.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.livio.sdl.adapters;
-
-import java.util.List;
-
-import android.content.Context;
-import android.graphics.Color;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.TextView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.SdlLogMessage;
-
-/**
- * A custom adapter class for showing SDL log messages in a listview. The adapter shows the message
- * name, details and a timestamp of when the message was first logged.
- *
- * @author Mike Burke
- *
- */
-public class SdlMessageAdapter extends ArrayAdapter<SdlLogMessage> {
-
- private static final int REQUEST_COLOR = Color.BLUE;
- private static final int RESPONSE_SUCCESS_COLOR = 0xFF2D9C08; // dark green
- private static final int RESPONSE_FAILURE_COLOR = Color.RED;
- private static final int NOTIFICATION_COLOR = Color.BLACK;
-
- public SdlMessageAdapter(Context context, List<SdlLogMessage> objects) {
- super(context, R.layout.sdl_message_listview_row, objects);
- }
-
- public SdlMessageAdapter(Context context) {
- super(context, R.layout.sdl_message_listview_row);
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View view = convertView;
-
- if(convertView == null){
- LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- view = inflater.inflate(R.layout.sdl_message_listview_row, null);
- }
-
- SdlLogMessage item = getItem(position);
-
- if(item != null){
- populateView(view, item);
- }
-
-
- return view;
- }
-
- /**
- * Populate the input parent view with information from the SDL log message.
- *
- * @param view The view to populate
- * @param item The data with which to populate the view
- */
- private void populateView(View view, SdlLogMessage item){
- TextView tv_messageName = (TextView) view.findViewById(R.id.tv_messageName);
- TextView tv_messageDetails = (TextView) view.findViewById(R.id.tv_messageDetail);
- TextView tv_timestamp = (TextView) view.findViewById(R.id.tv_timestamp);
-
- // set text values based on input message
- tv_messageName.setText(item.getFunctionName());
- tv_messageDetails.setText(item.getDetails());
- tv_timestamp.setText(item.getTimeStamp());
-
- String messageType = item.getMessageType();
-
- // set the text colors based on the inputs
- if(messageType.equals(SdlLogMessage.REQUEST)){
- tv_messageName.setTextColor(REQUEST_COLOR);
- }
- else if(messageType.equals(SdlLogMessage.RESPONSE)){
- if(item.getSuccess()){
- tv_messageName.setTextColor(RESPONSE_SUCCESS_COLOR);
- tv_messageDetails.setTextColor(RESPONSE_SUCCESS_COLOR);
- }
- else{
- tv_messageName.setTextColor(RESPONSE_FAILURE_COLOR);
- tv_messageDetails.setTextColor(RESPONSE_FAILURE_COLOR);
- }
- }
- else if(messageType.equals(SdlLogMessage.NOTIFICATION)){
- tv_messageName.setTextColor(NOTIFICATION_COLOR);
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseAlertDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseAlertDialog.java
deleted file mode 100644
index cb776b764..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseAlertDialog.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-
-/**
- * An abstract base class for custom alert dialogs. The class is basically
- * just a wrapper using Android's AlertDialog.Builder class to create
- * relatively simple custom dialogs.
- *
- * @author Mike Burke
- *
- */
-public abstract class BaseAlertDialog {
-
- /**
- * Allows another class to listen for the result of the subclass dialog. Results
- * are returned as an object.
- *
- * @author Mike Burke
- *
- */
- public interface Listener{
- /**
- * Should be called when data from the dialog is ready to return.
- *
- * @param resultData The data results for the dialog
- */
- void onResult(Object resultData);
- }
-
- /**
- * Called after views have been inflated, allowing the subclass an opportunity
- * to find their custom views using view.findViewById(id).
- *
- * @param parent The parent view which was inflated from input resource id.
- */
- protected abstract void findViews(View parent);
-
- // since this is an abstract class, we'll set all variables to protected scope in case subclasses want to use them directly
- protected Context context;
- protected AlertDialog dialog;
- protected Listener listener;
- protected String title;
- protected View view;
- protected boolean cancelable = true;
-
- /**
- * Creates a BaseDialog object with context, title and resource id.
- *
- * @param context The context of the dialog
- * @param title The title of the dialog
- * @param resource The resource id used for inflating the main view of the dialog
- */
- public BaseAlertDialog(Context context, String title, int resource) {
- this.context = context;
- this.title = title;
-
- // inflate the view and allow the subclass to locate its views
- inflateView(resource);
- findViews(view);
- }
-
- /**
- * Creates the dialog object using the input data.
- */
- protected void createDialog(){
- AlertDialog.Builder builder = new AlertDialog.Builder(context);
- builder.setTitle(title)
- .setView(view)
- .setCancelable(cancelable);
- dialog = builder.create();
- }
-
- /**
- * Creates the main dialog view from the input resource id.
- *
- * @param resourceId The id of the XML view to inflate
- */
- protected void inflateView(int resourceId){
- //grab the system inflater to build views from XML for us
- LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- view = inflater.inflate(resourceId, null);
- }
-
- //public methods
- /**
- * Creates the dialog object if necessary and shows it.
- */
- public void show(){
- if(dialog == null){
- createDialog();
- }
-
- if(!dialog.isShowing()){
- dialog.show();
- }
- }
-
- /**
- * If the dialog exists and is currently showing, dismisses it.
- */
- public void dismiss(){
- if(dialog != null && dialog.isShowing()){
- dialog.dismiss();
- }
- }
-
- /**
- * Returns whether the dialog is currently showing or not.
- *
- * @return True if the dialog is showing, false otherwise
- */
- public boolean isShowing(){
- if(dialog == null){
- return false;
- }
-
- return dialog.isShowing();
- }
-
- /**
- * Sets a listener for any subclasses of BaseDialog.
- *
- * @param l The listener to set
- */
- public void setListener(Listener l){
- listener = l;
- }
-
- /**
- * Sets whether or not the dialog is allowed to be cancelled.
- *
- * @param cancelable True if this dialog is cancelable, false if not
- */
- public void setCancelable(boolean cancelable){
- this.cancelable = cancelable;
- if(dialog != null){
- dialog.setCancelable(cancelable);
- }
- }
-
- /**
- * Notifies an existing dialog listener that results are ready.
- *
- * @param resultData Object containing dialog results
- */
- public void notifyListener(Object resultData){
- if(listener != null){
- listener.onResult(resultData);
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseImageListDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseImageListDialog.java
deleted file mode 100644
index 1ff6519d4..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseImageListDialog.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.widget.ListView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.adapters.SdlImageAdapter;
-
-public abstract class BaseImageListDialog extends BaseAlertDialog {
-
- protected ListView listview;
-
- public BaseImageListDialog(Context context, String title, List<SdlImageItem> imagesNotAdded) {
- super(context, title, R.layout.listview);
- SdlImageAdapter adapter = new SdlImageAdapter(context, imagesNotAdded);
- listview.setAdapter(adapter);
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseMultipleListViewDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseMultipleListViewDialog.java
deleted file mode 100644
index 592f6f1b3..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseMultipleListViewDialog.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.utils.AndroidUtils;
-
-/**
- * A generic, abstract class representing a ListView dialog that allows the user to select
- * multiple listview items. Selected items are stored in a protected List<E> object
- * called selectedItems, which can be used by subclasses of this class.
- *
- * @author Mike Burke
- *
- * @param <E>
- */
-public abstract class BaseMultipleListViewDialog<E> extends BaseOkCancelDialog {
-
- protected ListView listView;
- protected List<E> selectedItems = new ArrayList<E>();
-
- public BaseMultipleListViewDialog(Context context, String title, List<E> items) {
- super(context, title, R.layout.listview);
- listView.setAdapter(AndroidUtils.createMultipleListViewAdapter(context, items));
- }
-
- @Override
- protected void findViews(View parent) {
- listView = (ListView) parent.findViewById(R.id.listView);
- listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
- listView.setOnItemClickListener(new OnItemClickListener() {
- @SuppressWarnings("unchecked")
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- toggleItem(((ArrayAdapter<E>) parent.getAdapter()).getItem(position));
- }
- });
- }
-
- /**
- * Toggles the input item in the list of selected items. So, if the current item
- * was not selected, it is added to the list; if the current item was selected,
- * it is removed from the list.
- *
- * @param item
- */
- protected void toggleItem(E item){
- final boolean alreadyInList = selectedItems.contains(item);
-
- if(alreadyInList){
- selectedItems.remove(item);
- }
- else{
- selectedItems.add(item);
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseOkCancelDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseOkCancelDialog.java
deleted file mode 100644
index 8b5b1afb2..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseOkCancelDialog.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-
-import com.livio.sdl.R;
-
-/**
- * An abstract class that represents a dialog with an OK button and a cancel button. Subclasses
- * can extend this class to create different types of OK/Cancel dialogs. Subclasses
- * must set positive / negative buttons in their constructor and call createDialog() as the last
- * line of the constructor.
- *
- * @author Mike Burke
- *
- */
-public abstract class BaseOkCancelDialog extends BaseAlertDialog {
-
- protected DialogInterface.OnClickListener okButton, cancelButton;
-
- public BaseOkCancelDialog(Context context, String title, int resource) {
- super(context, title, resource);
- }
-
- @Override
- protected void createDialog() {
- AlertDialog.Builder builder = new AlertDialog.Builder(context);
- builder.setTitle(title)
- .setView(view)
- .setPositiveButton(context.getResources().getString(R.string.positive_button), okButton)
- .setNegativeButton(context.getResources().getString(R.string.negative_button), cancelButton)
- .setCancelable(cancelable);
- dialog = builder.create();
- }
-
- /**
- * Sets the positive button click listener for the dialog.
- *
- * @param okButton The button click listener for the positive button
- */
- protected void setPositiveButton(DialogInterface.OnClickListener okButton){
- this.okButton = okButton;
- if(dialog != null){
- dialog.setButton(DialogInterface.BUTTON_POSITIVE, context.getResources().getString(R.string.positive_button), okButton);
- }
- }
-
- /**
- * Sets the negative button click listener for the dialog.
- *
- * @param cancelButton The button click listener for the negative button
- */
- protected void setNegativeButton(DialogInterface.OnClickListener cancelButton){
- this.cancelButton = cancelButton;
- if(dialog != null){
- dialog.setButton(DialogInterface.BUTTON_NEGATIVE, context.getResources().getString(R.string.negative_button), cancelButton);
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseSingleListViewDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseSingleListViewDialog.java
deleted file mode 100644
index 206c2eea9..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/BaseSingleListViewDialog.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-import com.livio.sdl.R;
-
-/**
- * A generic, abstract class representing a ListView dialog that allows the user to select
- * a single listview item. The selected item is returned to the listener as a generic object.
- *
- * @author Mike Burke
- *
- * @param <E>
- */
-public abstract class BaseSingleListViewDialog<E> extends BaseAlertDialog {
-
- // since this class is abstract, we'll keep these variables protected so subclasses can access them directly
- protected ListView listView;
- protected ArrayAdapter<E> adapter;
- protected E selectedItem;
-
- public BaseSingleListViewDialog(Context context, String title, List<E> items) {
- super(context, title, R.layout.listview);
- adapter = new ArrayAdapter<E>(context, android.R.layout.simple_list_item_1, items);
- listView.setAdapter(adapter);
- }
-
- @Override
- protected void findViews(View parent) {
- listView = (ListView) parent.findViewById(R.id.listView);
- listView.setOnItemClickListener(new OnItemClickListener() {
- @SuppressWarnings("unchecked")
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- selectedItem = ((ArrayAdapter<E>) parent.getAdapter()).getItem(position);
- notifyListener(selectedItem);
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ImageListDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ImageListDialog.java
deleted file mode 100644
index 28ee7ef94..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ImageListDialog.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.adapters.SdlImageAdapter;
-
-public class ImageListDialog extends BaseImageListDialog {
-
- public ImageListDialog(Context context, List<SdlImageItem> imagesNotAdded) {
- super(context, "Select an Image", imagesNotAdded);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- listview = (ListView) parent.findViewById(R.id.listView);
- listview.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- SdlImageItem selectedItem = ((SdlImageAdapter) parent.getAdapter()).getItem(position);
- notifyListener(selectedItem);
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/IndeterminateProgressDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/IndeterminateProgressDialog.java
deleted file mode 100644
index 947567e97..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/IndeterminateProgressDialog.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import android.app.ProgressDialog;
-import android.content.Context;
-
-public class IndeterminateProgressDialog extends ProgressDialog{
-
- public IndeterminateProgressDialog(Context context, String title) {
- super(context);
- setCancelable(false);
- setMessage(title);
- setIndeterminate(true);
- setTitle(null);
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/JsonFlipperDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/JsonFlipperDialog.java
deleted file mode 100644
index cdaef739e..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/JsonFlipperDialog.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.ImageButton;
-import android.widget.TextView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.SdlLogMessage;
-import com.livio.sdl.utils.SdlUtils;
-
-/**
- * This dialog shows a single JSON message, but allows the ability to flip back and forth between
- * all available messages via the arrow buttons at the bottom of the dialog. This dialog will not
- * be updated when new messages are sent with this dialog open. The dialog must be closed and re-opened
- * in order to refresh with new values.
- *
- * @author Mike Burke
- *
- */
-public class JsonFlipperDialog extends BaseAlertDialog {
-
- private List<SdlLogMessage> jsonMessages;
- private int currentPosition;
-
- private TextView text;
- private ImageButton leftButton, rightButton;
-
- public JsonFlipperDialog(Context context, List<SdlLogMessage> jsonMessages, int startPosition) {
- super(context, SdlUtils.makeJsonTitle(jsonMessages.get(startPosition).getCorrelationId()), R.layout.json_flipper_dialog);
- this.jsonMessages = jsonMessages;
- this.currentPosition = startPosition;
- createDialog();
-
- // since refresh updates the dialog's title, this must be after createDialog() so the dialog isn't null
- refresh();
- }
-
- @Override
- protected void findViews(View parent) {
- text = (TextView) parent.findViewById(R.id.textview);
-
- // set up left button
- leftButton = (ImageButton) parent.findViewById(R.id.ib_moveLeft);
- leftButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- // if we can move left, do it. if not, do nothing
- if(currentPosition > 0){
- currentPosition--;
- refresh();
- }
- }
- });
-
- // set up right button
- rightButton = (ImageButton) parent.findViewById(R.id.ib_moveRight);
- rightButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- // if we can move right, do it. if not, do nothing
- if(currentPosition < (jsonMessages.size()-1) ){
- currentPosition++;
- refresh();
- }
- }
- });
- }
-
- // refresh the buttons & the text for this dialog
- private void refresh(){
- refreshButtons();
- refreshText();
- }
-
- // refreshes the buttons with new position. disables the buttons when we're at the edges of the list.
- private void refreshButtons(){
- boolean atStart = (currentPosition == 0);
- boolean atEnd = (currentPosition == jsonMessages.size()-1);
-
- leftButton.setEnabled(!atStart);
- rightButton.setEnabled(!atEnd);
- }
-
- // refreshes the text of the dialog - both the title and the main text.
- private void refreshText(){
- SdlLogMessage currentMessage = jsonMessages.get(currentPosition);
- dialog.setTitle(SdlUtils.makeJsonTitle(currentMessage.getCorrelationId()));
- text.setText(currentMessage.getJsonData());
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ListViewDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ListViewDialog.java
deleted file mode 100644
index 3bdcb55ae..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/ListViewDialog.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-/**
- * A generic class representing a ListView dialog that allows the user to select
- * a single listview item. The selected item is returned to the listener as a generic object.
- *
- * @author Mike Burke
- *
- * @param <E>
- */
-public class ListViewDialog<E> extends BaseSingleListViewDialog<E> {
-
- public ListViewDialog(Context context, String title, List<E> items) {
- super(context, title, items);
- createDialog();
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/MultipleListViewDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/MultipleListViewDialog.java
deleted file mode 100644
index 4f5b91027..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/MultipleListViewDialog.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.content.DialogInterface;
-/**
- * A generic class representing a ListView dialog that allows the user to select
- * multiple listview items. Selected items are stored in a protected List<E> object
- * called selectedItems, which can be used by subclasses of this class.
- *
- * @author Mike Burke
- *
- * @param <E>
- */
-public class MultipleListViewDialog<E> extends BaseMultipleListViewDialog<E> {
-
- public MultipleListViewDialog(Context context, String title, List<E> items) {
- super(context, title, items);
- setPositiveButton(positiveButton);
- createDialog();
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener positiveButton = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- notifyListener(selectedItems);
- }
- };
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/SingleJsonDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/SingleJsonDialog.java
deleted file mode 100644
index ac32ae4a2..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/SingleJsonDialog.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import android.content.Context;
-import android.view.View;
-import android.view.View.OnClickListener;
-
-import com.livio.sdl.SdlLogMessage;
-import com.livio.sdl.utils.SdlUtils;
-
-public class SingleJsonDialog extends TextViewAlertDialog {
- public SingleJsonDialog(Context context, SdlLogMessage logMessage) {
- super(context, SdlUtils.makeJsonTitle(logMessage.getCorrelationId()), logMessage.getJsonData());
-
- // click listener to close dialog when the text is clicked
- tv.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewAlertDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewAlertDialog.java
deleted file mode 100644
index 0a19ce26a..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewAlertDialog.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.TextView;
-
-import com.livio.sdl.R;
-
-/**
- * A simple dialog that contains a single, scrollable TextView. The textview
- * is initialized with a the title and message in the constructor.
- *
- * @author Mike Burke
- *
- */
-public class TextViewAlertDialog extends BaseAlertDialog {
-
- protected TextView tv;
-
- public TextViewAlertDialog(Context context, String dialogTitle, String message){
- super(context, dialogTitle, R.layout.textview);
- tv.setText(message);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- tv = (TextView) parent.findViewById(R.id.textview);
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewOkCancelDialog.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewOkCancelDialog.java
deleted file mode 100644
index 8d4fadc15..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/dialogs/TextViewOkCancelDialog.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.livio.sdl.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.TextView;
-
-import com.livio.sdl.R;
-
-/**
- * A simple dialog that contains a single, scrollable TextView. The textview
- * is initialized with a the title and message in the constructor.
- *
- * @author Mike Burke
- *
- */
-public class TextViewOkCancelDialog extends BaseOkCancelDialog {
-
- protected TextView tv;
-
- public TextViewOkCancelDialog(Context context, String dialogTitle, String message){
- super(context, dialogTitle, R.layout.textview);
- tv.setText(message);
- setPositiveButton(okListener);
- setNegativeButton(cancelListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- tv = (TextView) parent.findViewById(R.id.textview);
- }
-
- private DialogInterface.OnClickListener okListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- notifyListener(true);
- }
- };
-
- private DialogInterface.OnClickListener cancelListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- notifyListener(false);
- }
- };
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumClickListener.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumClickListener.java
deleted file mode 100644
index f32a89f91..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumClickListener.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.livio.sdl.enums;
-
-/**
- * Defines a callback for click events that occur on an enumerated type.
- *
- * @author Mike Burke
- *
- */
-public interface EnumClickListener {
- <E extends Enum<E>> void OnEnumItemClicked(E selection);
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumComparator.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumComparator.java
deleted file mode 100644
index 7d98a69a9..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/EnumComparator.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.livio.sdl.enums;
-
-import java.util.Comparator;
-
-/**
- * This class is simply a comparator for enum values using their toString()
- * method instead of the standard name() method.
- *
- * This allows you to sort your enums by their friendly names, which is much
- * more useful than sorting by the enum name.
- *
- * @author Mike Burke
- *
- */
-public class EnumComparator<E extends Enum<E>> implements Comparator<E> {
- @Override
- public int compare(E lhs, E rhs) {
- return lhs.toString().compareTo(rhs.toString());
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlButton.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlButton.java
deleted file mode 100644
index bf25318b6..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlButton.java
+++ /dev/null
@@ -1,234 +0,0 @@
-package com.livio.sdl.enums;
-
-import java.util.Arrays;
-
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-
-/**
- * <p>
- * Defines logical buttons which, on a given SDL unit, would correspond to
- * either physical or soft (touchscreen) buttons. These logical buttons present
- * a standard functional abstraction which the developer can rely upon,
- * independent of the SYNC unit. For example, the developer can rely upon the OK
- * button having the same meaning to the user across SDL platforms.
- * </p>
- * <p>
- * The preset buttons (0-9) can typically be interpreted by the application as
- * corresponding to some user-configured choices, though the application is free
- * to interpret these button presses as it sees fit.
- * </p>
- * <p>
- * The application can discover which buttons a given SDL unit implements by
- * interrogating the ButtonCapabilities parameter of the
- * RegisterAppInterface response.
- * </p>
- *
- * @since SmartDeviceLink 1.0
- */
-public enum SdlButton {
-
- /**
- * Represents the button usually labeled "OK". A typical use of this button
- * is for the user to press it to make a selection.
- *
- * @since SmartDeviceLink 1.0
- */
- OK ("Ok"),
- /**
- * Represents the seek-left button. A typical use of this button is for the
- * user to scroll to the left through menu choices one menu item per press.
- *
- * @since SmartDeviceLink 1.0
- */
- SEEK_LEFT ("Seek Left"),
- /**
- * Represents the seek-right button. A typical use of this button is for the
- * user to scroll to the right through menu choices one menu item per press.
- *
- * @since SmartDeviceLink 1.0
- */
- SEEK_RIGHT ("Seek Right"),
- /**
- * Represents a turn of the tuner knob in the clockwise direction one tick.
- *
- * @since SmartDeviceLink 1.0
- */
- TUNE_UP ("Tune Up"),
- /**
- * Represents a turn of the tuner knob in the counter-clockwise direction
- * one tick.
- *
- * @since SmartDeviceLink 1.0
- */
- TUNE_DOWN ("Tune Down"),
- /**
- * Represents the preset 0 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_0 ("Preset #0"),
- /**
- * Represents the preset 1 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_1 ("Preset #1"),
- /**
- * Represents the preset 2 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_2 ("Preset #2"),
- /**
- * Represents the preset 3 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_3 ("Preset #3"),
- /**
- * Represents the preset 4 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_4 ("Preset #4"),
- /**
- * Represents the preset 5 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_5 ("Preset #5"),
- /**
- * Represents the preset 6 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_6 ("Preset #6"),
- /**
- * Represents the preset 7 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_7 ("Preset #7"),
- /**
- * Represents the preset 8 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_8 ("Preset #8"),
- /**
- * Represents the preset 9 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_9 ("Preset #9"),
-
- ;
-
- private final String READABLE_NAME;
-
- private SdlButton(String readableName){
- this.READABLE_NAME = readableName;
- }
-
- /**
- * Returns an array of the objects in this enum sorted in alphabetical order.
- *
- * @return The sorted array
- */
- public static SdlButton[] getSortedArray(){
- SdlButton[] result = values();
- Arrays.sort(result, new EnumComparator<SdlButton>());
- return result;
- }
-
- /**
- * Translates a legacy button (ButtonName) to this type of button (SdlButton).
- *
- * @param legacyButton The legacy button to translate
- * @return The appropriate SdlButton for the input
- */
- public static SdlButton translateFromLegacy(ButtonName legacyButton){
- switch(legacyButton){
- case OK:
- return OK;
- case SEEKLEFT:
- return SEEK_LEFT;
- case SEEKRIGHT:
- return SEEK_RIGHT;
- case TUNEDOWN:
- return TUNE_DOWN;
- case TUNEUP:
- return TUNE_UP;
- case PRESET_0:
- return PRESET_0;
- case PRESET_1:
- return PRESET_1;
- case PRESET_2:
- return PRESET_2;
- case PRESET_3:
- return PRESET_3;
- case PRESET_4:
- return PRESET_4;
- case PRESET_5:
- return PRESET_5;
- case PRESET_6:
- return PRESET_6;
- case PRESET_7:
- return PRESET_7;
- case PRESET_8:
- return PRESET_8;
- case PRESET_9:
- return PRESET_9;
- default:
- return null;
- }
- }
-
- /**
- * Translates this type of button (SdlButton) to a legacy button (ButtonName).
- *
- * @param sdlButton The new button to translate
- * @return The appropriate legacy button for the input
- */
- public static ButtonName translateToLegacy(SdlButton sdlButton){
- switch(sdlButton){
- case OK:
- return ButtonName.OK;
- case SEEK_LEFT:
- return ButtonName.SEEKLEFT;
- case SEEK_RIGHT:
- return ButtonName.SEEKRIGHT;
- case TUNE_DOWN:
- return ButtonName.TUNEDOWN;
- case TUNE_UP:
- return ButtonName.TUNEUP;
- case PRESET_0:
- return ButtonName.PRESET_0;
- case PRESET_1:
- return ButtonName.PRESET_1;
- case PRESET_2:
- return ButtonName.PRESET_2;
- case PRESET_3:
- return ButtonName.PRESET_3;
- case PRESET_4:
- return ButtonName.PRESET_4;
- case PRESET_5:
- return ButtonName.PRESET_5;
- case PRESET_6:
- return ButtonName.PRESET_6;
- case PRESET_7:
- return ButtonName.PRESET_7;
- case PRESET_8:
- return ButtonName.PRESET_8;
- case PRESET_9:
- return ButtonName.PRESET_9;
- default:
- return null;
- }
- }
-
- @Override
- public String toString(){
- return this.READABLE_NAME;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlCommand.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlCommand.java
deleted file mode 100644
index a9c687c78..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlCommand.java
+++ /dev/null
@@ -1,224 +0,0 @@
-package com.livio.sdl.enums;
-
-
-/**
- * This is an enumerated list of SDL commands, complete with world-readable names that can be used
- * in dialogs and menus.
- *
- * @author Mike Burke
- *
- */
-public enum SdlCommand{
- /**
- * SDL Alert command shows a pop-up text and/or voice alert on the head-unit.
- * @see Alert
- */
- ALERT ("Alert"),
- /**
- * SDL Speak command performs a Text-to-Speech action on the input text and speaks the input to the user over the vehicle speakers.
- * @see Speak
- */
- SPEAK ("Speak"),
- /**
- * SDL Show command updates the main HMI template used for the application. Show is capable of showing up to 4 lines of text.
- * @see Show
- */
- SHOW ("Show"),
- /**
- * SDL SubscribeButton command subscribes your application to receive hardware button-presses. For example, when the application is in-use on the head-unit,
- * and the user presses the PRESET_0 button, your app can intercept that button press and take action on it.
- * @see SubscribeButton
- * @see UnsubscribeButton
- * @see SdlButton
- * @see ButtonName
- */
- SUBSCRIBE_BUTTON ("Subscribe to Buttons"),
- /**
- * SDL UnsubscribeButton command unsubscribes your application from any buttons that have been subscribed to.
- * @see UnsubscribeButton
- * @see SdlButton
- * @see ButtonName
- */
- UNSUBSCRIBE_BUTTON ("Unsubscribe from Buttons"),
- /**
- * SDL AddCommand command creates a software button that will be added into the app's menu on the head-unit. Commands can be added to the root-level
- * menu or to submenus that have been added by the application.
- * @see AddCommand
- * @see DeleteCommand
- * @see MenuItem
- * @see CommandButton
- */
- ADD_COMMAND ("Add a Command"),
- /**
- * SDL DeleteCommand command deletes a command menu item that has been added by the application.
- * @see DeleteCommand
- * @see AddCommand
- */
- DELETE_COMMAND ("Delete a Command"),
- /**
- * SDL AddSubmenu command creates a menu object inside the application's main root-level menu on the head-unit. Submenus can only be added to the
- * root-level menu, they cannot be nested.
- * @see AddSubmenu
- * @see DeleteSubmenu
- * @see MenuItem
- * @see SubmenuButton
- */
- ADD_SUBMENU ("Add a Submenu"),
- /**
- * SDL DeleteSubmenu command deletes a submenu menu item that has been added by the application.
- * @see DeleteSubmenu
- * @see AddSubmenu
- */
- DELETE_SUB_MENU ("Delete a Submenu"),
- /**
- * SDL SetGlobalProperties command manually sets global voice properties for your application. For example,
- * this command allows the application to change voice prompts for when the user needs help or when a timeout occurs.
- * @see SetGlobalProperties
- * @see ResetGlobalProperties
- */
-// SET_GLOBAL_PROPERTIES ("Set Global Properties"),
- /**
- * SDL ResetGlobalProperties command resets global voice properties for your application to the vehicle's default settings.
- * @see ResetGlobalProperties
- * @see SetGlobalProperties
- */
-// RESET_GLOBAL_PROPERTIES ("Reset Global Properties"),
- /**
- * SDL SetMediaClockTimer command allows media applications to set a counter that automatically counts up or counts down on the head-unit. The command
- * also allows the application to pause, resume or clear a previously-existing counter.
- * @see SetMediaClockTimer
- */
- SET_MEDIA_CLOCK_TIMER ("Set Media Clock Timer"),
- /**
- * SDL CreateInteractionChoiceSet command allows the application to create a pop-up menu on the head-unit. The set must add the various choices
- * available for the pop-up menu, including text and an image.
- * @see CreateInteractionChoiceSet
- * @see PerformInteraction
- * @see DeleteInteractionChoiceSet
- */
- CREATE_INTERACTION_CHOICE_SET ("Create Interaction Choice Set"),
- /**
- * SDL DeleteInteractionChoiceSet command allows the application to delete a choice set that has previously been added through the CreateInteractionChoiceSet command.
- * @see DeleteInteractionChoiceSet
- * @see CreateInteractionChoiceSet
- */
- DELETE_INTERACTION_CHOICE_SET ("Delete Interaction Choice Set"),
- /**
- * SDL PerformInteraction command allows the application to show 1 or more choice sets that have been added through the CreateInteractionChoiceSet command.
- * @see PerformInteraction
- * @see CreateInteractionChoiceSet
- */
- PERFORM_INTERACTION ("Perform Interaction"),
- /**
- * SDL Slider command allows an application to show a volume-style slider element on the head-unit. The application can select how many ticks the slider should have,
- * the default selection for the timer and a timeout.
- * @see Slider
- */
- SLIDER ("Slider"),
- /**
- * SDL ScrollableMessage command allows an application to show a long message that the user may need to scroll through. The message has the ability to show soft buttons
- * alongside the message.
- * @see ScrollableMessage
- */
- SCROLLABLE_MESSAGE ("Scrollable Message"),
- /**
- * SDL ChangeRegistration command allows the application to change the default language for the application on the head-unit.
- * @see ChangeRegistration
- */
- CHANGE_REGISTRATION ("Change Registration"),
- /**
- * SDL PutFile command allows the application to send files to be stored on the head-unit. Bitmap, JPEG and PNG images can be sent, in addition to WAV or MP3 formatted audio.
- * @see PutFile
- * @see DeleteFile
- * @see ListFiles
- * @see SetAppIcon
- */
- PUT_FILE ("Put File"),
- /**
- * SDL DeleteFile command allows the application to delete files from the head-unit that were previously added to the head-unit through the PutFile command.
- * @see DeleteFile
- * @see PutFile
- * @see ListFiles
- */
- DELETE_FILE ("Delete File"),
- /**
- * SDL ListFiles command allows the application to retreive a list of files that have been added to the head-unit through the PutFile command.
- * @see ListFiles
- * @see PutFile
- * @see DeleteFile
- */
- LIST_FILES ("List Files"),
- /**
- * SDL SetAppIcon command allows the application to set an image to be associated with the application. Desired image must first be sent through the PutFile command.
- * @see SetAppIcon
- * @see PutFile
- */
- SET_APP_ICON ("Set App Icon"),
- /**
- * SDL PerformAudioPassThru command allows vehicle voice-inputs from the user to be forwarded to the application. This is useful if the application wants to perform
- * its own voice-rec implementation to decode user voice-inputs.
- * @see PerformAudioPassThru
- * @see EndAudioPassThru
- */
- //PERFORM_AUDIO_PASSTHRU ("Perform Audio Pass-through"),
- /**
- * SDL EndAudioPassThru command ends a voice-input session previously started through the PerformAudioPassThru command.
- */
- //END_AUDIO_PASSTHRU ("End Audio Pass-through"),
- /**
- * SDL SubscribeVehicleData command allows the application to subscribe for updates about various vehicle data. For example, fuel state, tire pressure, airbag status and much
- * more information can be retrieved from the vehicle head-unit and used in the application.
- * @see SubscribeVehicleData
- * @see UnsubscribeVehicleData
- * @see GetVehicleData
- */
-// SUBSCRIBE_VEHICLE_DATA ("Subscribe to Vehicle Data"),
- /**
- * SDL UnsubscribeVehicleData command allows the application to unsubscribe from any vehicle data that has been subscribed to through the SubscribeVehicleData command.
- * @see UnsubscribeVehicleData
- * @see SubscribeVehicleData
- * @see GetVehicleData
- */
-// UNSUBSCRIBE_VEHICLE_DATA ("Unsubscribe from Vehicle Data"),
- /**
- * SDL GetVehicleData command allows the application to retrieve vehicle data from the head-unit. Prior to sending this command, the application must first subscribe
- * for vehicle data through the SubscribeVehicleData command.
- * @see GetVehicleData
- * @see SubscribeVehicleData
- * @see UnsubcribeVehicleData
- */
-// GET_VEHICLE_DATA ("Get Vehicle Data"),
- /**
- * SDL ReadDID command allows the application to query DIDs for a particular module. DIDs contain useful information for each module, such as part numbers.
- * @see ReadDID
- */
- READ_DIDS ("Read DIDs"),
- /**
- * SDL GetDTCs command allows the application to query DTCs for a particular module. DTCs contain diagnostic trouble codes that are set when something
- * goes wrong in a module.
- * @see GetDTCs
- */
- GET_DTCS ("Get DTCs"),
- //SHOW_CONSTANT_TBT ("Show Constant TBT"), //TODO - this command doesn't work on SDL core as of 1/23/2014
- //ALERT_MANEUVER ("Alert Maneuver"), //TODO - this command doesn't work on SDL core as of 1/23/2014
- //UPDATE_TURN_LIST ("Update Turn List"), //TODO - this command doesn't work on SDL core as of 1/23/2014
- //DIAL_NUMBER ("Dial Number"), //TODO - this command doesn't work on SDL core as of 1/23/2014
-
- //Future commands go here.
-
- ;
-
- // THIS IS AN ENUM, SO BASICALLY EVERYTHING SHOULD BE FINAL.
- private final String friendlyName;
-
- //constructor
- private SdlCommand(String readableName){
- this.friendlyName = readableName;
- }
-
- @Override
- public String toString(){
- return this.friendlyName;
- }
-}
-
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlImageType.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlImageType.java
deleted file mode 100644
index e24828dda..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlImageType.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.livio.sdl.enums;
-
-import java.util.EnumSet;
-
-import com.smartdevicelink.proxy.rpc.enums.ImageType;
-
-
-/**
- * An enumerated class representing image types on the head-unit. Images can be either
- * static or dynamic. Static images are contained solely on the head-unit and cannot be
- * updated or deleted. Dynamic images are contained in the application and sent to the
- * head-unit through the PutFile command.
- *
- * @see ImageType
- *
- * @author Mike Burke
- *
- */
-public enum SdlImageType {
-
- /**
- * Represents a dynamic image. Dynamic images are sent from the application to the head-unit
- * through the PutFile command and can be referenced by the name sent with PutFile.
- */
- DYNAMIC("Dynamic"),
- /**
- * Represents a static image. Static images are stored exclusively on the head-unit and cannot
- * be changed or deleted by applications.
- */
- STATIC("Static"),
-
- ;
-
- private final String READABLE_NAME;
- private SdlImageType(String name){
- this.READABLE_NAME = name;
- }
-
- /**
- * Translates an SdlImageType object to it's associated ImageType object.
- *
- * @param input The SdlImageType to convert
- * @return The associated ImageType
- */
- public static ImageType translateToLegacy(SdlImageType input){
- switch(input){
- case STATIC:
- return ImageType.STATIC;
- case DYNAMIC:
- return ImageType.DYNAMIC;
- default:
- return null;
- }
- }
-
- /**
- * Translates an SdlImageType object to it's associated ImageType object.
- *
- * @param input The SdlImageType to convert
- * @return The associated ImageType
- */
- public static SdlImageType translateFromLegacy(ImageType input){
- switch(input){
- case STATIC:
- return STATIC;
- case DYNAMIC:
- return DYNAMIC;
- default:
- return null;
- }
- }
-
- /**
- * Allows a reverse-lookup based on the items readable name.
- *
- * @param readableName The item's readable name
- * @return The item with the input readable name if found, null otherwise
- */
- public static SdlImageType lookupByReadableName(String readableName) {
- for (SdlImageType anEnum : EnumSet.allOf(SdlImageType.class)) {
- if (anEnum.toString().equals(readableName)) {
- return anEnum;
- }
- }
- return null;
- }
-
- @Override
- public String toString(){
- return this.READABLE_NAME;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlInteractionMode.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlInteractionMode.java
deleted file mode 100644
index cc9825ebc..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlInteractionMode.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.livio.sdl.enums;
-
-import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
-
-/**
- * Represents different types of interaction modes that the user can utilize
- * when performing an interaction on a choice set list.
- *
- * @see InteractionMode
- *
- * @author Mike Burke
- *
- */
-public enum SdlInteractionMode {
-
- /**
- * Represents perform interactions that can only be controlled manually by button click events.
- */
- MANUAL_ONLY("Click events"),
- /**
- * Represents perform interactions that can only be controlled by voice-rec events.
- */
- VOICE_REC_ONLY("Voice-rec events"),
- /**
- * Represents perform interactions that can be controlled by click events and voice-rec events.
- */
- BOTH("Click and voice-rec events"),
- ;
-
- private final String friendlyName;
-
- private SdlInteractionMode(String str){
- this.friendlyName = str;
- }
-
- /**
- * Translates an input SdlInteractionMode to its associated InteractionMode object.
- *
- * @param from The SdlInteractionMode to translate
- * @return The InteractionMode object associated with the input SdlInteractionMode object
- */
- public static InteractionMode translateToLegacy(SdlInteractionMode from){
- switch(from){
- case MANUAL_ONLY:
- return InteractionMode.MANUAL_ONLY;
- case VOICE_REC_ONLY:
- return InteractionMode.VR_ONLY;
- case BOTH:
- return InteractionMode.BOTH;
- default:
- return null;
- }
- }
-
- /**
- * Translates an input InteractionMode to its associated SdlInteractionMode object.
- *
- * @param from The InteractionMode to translate
- * @return The SdlInteractionMode object associated with the input InteractionMode object
- */
- public static SdlInteractionMode translateFromLegacy(InteractionMode from){
- switch(from){
- case MANUAL_ONLY:
- return MANUAL_ONLY;
- case VR_ONLY:
- return VOICE_REC_ONLY;
- case BOTH:
- return BOTH;
- default:
- return null;
- }
- }
-
- @Override
- public String toString(){
- return friendlyName;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlLanguage.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlLanguage.java
deleted file mode 100755
index c88d90dfb..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlLanguage.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package com.livio.sdl.enums;
-
-import java.util.EnumSet;
-
-/**
- * Specifies the language to be used for TTS, VR, displayed messages/menus
- * <p>
- *
- * @since SmartDeviceLink 1.0
- *
- */
-public enum SdlLanguage {
- /**
- * American English
- */
- EN_US("EN-US"),
- /**
- * Australian English
- */
- EN_AU("EN-AU"),
- /**
- * British English
- */
- EN_GB("EN-GB"),
-
- /**
- * Mexico Spanish
- */
- ES_MX("ES-MX"),
- /**
- * Spain Spanish
- */
- ES_ES("ES-ES"),
-
- /**
- * France French
- */
- FR_FR("FR-FR"),
- /**
- * Canadian French
- */
- FR_CA("FR-CA"),
-
- /**
- * German
- */
- DE_DE("DE-DE"),
-
- /**
- * Russian
- */
- RU_RU("RU-RU"),
-
- /**
- * Turkish
- */
- TR_TR("TR-TR"),
-
- /**
- * Polish
- */
- PL_PL("PL-PL"),
-
- /**
- * Italian
- */
- IT_IT("IT-IT"),
-
- /**
- * Swedish
- */
- SV_SE("SV-SE"),
-
- /**
- * Portuguese
- */
- PT_PT("PT-PT"),
- /**
- * Brazilian Portuguese
- */
- PT_BR("PT-BR"),
-
- /**
- * Dutch
- */
- NL_NL("NL-NL"),
-
- /**
- * Traditional Chinese
- */
- ZH_CN("ZH-CN"),
- /**
- * Thai Chinese
- */
- ZH_TW("ZH-TW"),
-
- /**
- * Japanese
- */
- JA_JP("JA-JP"),
-
- /**
- * Arabic
- */
- AR_SA("AR-SA"),
-
- /**
- * Korean
- */
- KO_KR("KO-KR"),
-
- /**
- * Czech
- */
- CS_CZ("CS-CZ"),
-
- /**
- * Danish
- */
- DA_DK("DA-DK"),
-
- /**
- * Norwegian
- */
- NO_NO("NO-NO"),
-
- // future languages go here
-
- ;
-
- private final String READABLE_NAME;
-
- private SdlLanguage(String readableName) {
- this.READABLE_NAME = readableName;
- }
-
- //public member methods
- public String getReadableName(){
- return this.READABLE_NAME;
- }
-
- /**
- * Returns a Language's name. This method iterates through every enum in the list,
- * but it won't be used as often as SyncCommand, so we'll sacrifice the reverse look-up
- * HashMap in this case. Without the HashMap, this method will certainly take longer
- * to run, but it isn't worth the memory hit since languages will be used
- * much less often than SyncCommand.
- *
- * @param value a String
- * @return Language -EN-US, ES-MX or FR-CA
- */
- public static SdlLanguage lookupByReadableName(String readableName) {
- for (SdlLanguage anEnum : EnumSet.allOf(SdlLanguage.class)) {
- if (anEnum.getReadableName().equals(readableName)) {
- return anEnum;
- }
- }
- return null;
- }
-
- @Override
- public String toString(){
- return this.READABLE_NAME;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlSpeechCapability.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlSpeechCapability.java
deleted file mode 100644
index f99379b3e..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlSpeechCapability.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.livio.sdl.enums;
-
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-
-
-/**
- * Specifies different types of text-to-speech capabilities available through SmartDeviceLink. When
- * an application wants the vehicle to speak something to the user, the application can deliver
- * any of the input strings formatted according to the options in this enumerated class.
- *
- * @see SpeechCapabilities
- *
- * @author Mike Burke
- */
-public enum SdlSpeechCapability {
- /**
- * Represents a standard text-to-speech translation.
- */
- TEXT("Text"),
- /**
- * Represents a SAPI phoneme text string.
- */
- SAPI_PHONEMES("SAPI Phonemes"),
- /**
- * Represents a LHPLUS phoneme text string.
- */
- LHPLUS_PHONEMES("LHPLUS Phonemes"),
- /**
- * Represents a pre-recorded text entry stored exclusively on the head-unit.
- */
- PRE_RECORDED("Pre-recorded"),
- /**
- * Represents a period of silence, for example, a pause between sentences.
- */
- SILENCE("Silence"),
-
- // future languages go here
-
- ;
-
- private final String READABLE_NAME;
-
- private SdlSpeechCapability(String readableName) {
- this.READABLE_NAME = readableName;
- }
-
- /**
- * Translates the input SpeechCapabilities object into an SdlSpeechCapability object.
- *
- * @param input The SpeechCapabilities object to translate
- * @return The translated SdlSpeechCapability object
- */
- public static SdlSpeechCapability translateFromLegacy(SpeechCapabilities input){
- switch(input){
- case TEXT:
- return TEXT;
- case LHPLUS_PHONEMES:
- return LHPLUS_PHONEMES;
- case SAPI_PHONEMES:
- return SAPI_PHONEMES;
- case SILENCE:
- return SILENCE;
- case PRE_RECORDED:
- return PRE_RECORDED;
- default:
- return null;
- }
- }
-
- /**
- * Translates the input SdlSpeechCapabilities object into a SpeechCapability object.
- *
- * @param input The SdlSpeechCapabilities object to translate
- * @return The translated SpeechCapability object
- */
- public static SpeechCapabilities translateToLegacy(SdlSpeechCapability input){
- switch(input){
- case TEXT:
- return SpeechCapabilities.TEXT;
- case LHPLUS_PHONEMES:
- return SpeechCapabilities.LHPLUS_PHONEMES;
- case SAPI_PHONEMES:
- return SpeechCapabilities.SAPI_PHONEMES;
- case SILENCE:
- return SpeechCapabilities.SILENCE;
- case PRE_RECORDED:
- return SpeechCapabilities.PRE_RECORDED;
- default:
- return null;
- }
- }
-
- @Override
- public String toString(){
- return this.READABLE_NAME;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTextAlignment.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTextAlignment.java
deleted file mode 100644
index 43830fbe6..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTextAlignment.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.livio.sdl.enums;
-
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-
-/**
- * Used in the Show command, the text alignment input tells the head-unit how
- * to align the text that is being updated in the Show command.
- *
- * @see TextAlignment
- *
- * @author Mike Burke
- *
- */
-public enum SdlTextAlignment {
- /**
- * No change in alignment.
- */
- NO_SELECTION("No selection"),
- /**
- * Text aligned left.
- */
- LEFT_ALIGNED("Left-align"),
- /**
- * Text aligned right.
- */
- RIGHT_ALIGNED("Right-align"),
- /**
- * Text aligned centered.
- */
- CENTERED("Center"),
-
- ;
-
- private final String READABLE_NAME;
- private SdlTextAlignment(String readableName){
- this.READABLE_NAME = readableName;
- }
-
- /**
- * Translates the input TextAlignment object into an SdlTextAlignment object.
- *
- * @param input The TextAlignment object to translate
- * @return The associated SdlTextAlignment object
- */
- public static SdlTextAlignment translateFromLegacy(TextAlignment input){
- switch(input){
- case LEFT_ALIGNED:
- return LEFT_ALIGNED;
- case RIGHT_ALIGNED:
- return RIGHT_ALIGNED;
- case CENTERED:
- return CENTERED;
- default:
- return null;
- }
- }
-
- /**
- * Translates the input SdlTextAlignment object into a TextAlignment object.
- *
- * @param input The SdlTextAlignment object to translate
- * @return The associated TextAlignment object
- */
- public static TextAlignment translateToLegacy(SdlTextAlignment input){
- switch(input){
- case LEFT_ALIGNED:
- return TextAlignment.LEFT_ALIGNED;
- case RIGHT_ALIGNED:
- return TextAlignment.RIGHT_ALIGNED;
- case CENTERED:
- return TextAlignment.CENTERED;
- default:
- return null;
- }
- }
-
- @Override
- public String toString(){
- return this.READABLE_NAME;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTransportType.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTransportType.java
deleted file mode 100644
index 45e57761b..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlTransportType.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.livio.sdl.enums;
-
-
-/**
- * Represents the different types of connections that are available through SmartDeviceLink.
- *
- * @author Mike Burke
- *
- */
-public enum SdlTransportType {
- /**
- * Represents a BlueTooth connection with SmartDeviceLink.
- */
- BLUETOOTH("Bluetooth"),
- /**
- * Represents a WiFi connection with SmartDeviceLink.
- */
- WIFI("WiFi"),
- /**
- * Represents a USB connection with SmartDeviceLink.
- */
- USB("USB"),
-
- ;
-
- private final String name;
-
- private SdlTransportType(String friendlyName){
- this.name = friendlyName;
- }
-
- @Override
- public String toString(){
- return name;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlUpdateMode.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlUpdateMode.java
deleted file mode 100644
index c1ef7ed62..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlUpdateMode.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.livio.sdl.enums;
-
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-
-/**
- * Represents various different types of actions on the media clock
- * counter for media applications.
- *
- * @see UpdateMode
- * @see SetMediaClockTimer
- *
- * @author Mike Burke
- *
- */
-public enum SdlUpdateMode {
- /**
- * Indicates that the timer should start counting up from the input time.
- */
- COUNT_UP("Count up"),
- /**
- * Indicates that the timer should start counting down from the input time.
- */
- COUNT_DOWN("Count down"),
- /**
- * Indicates that the timer should be paused.
- */
- PAUSE("Pause"),
- /**
- * Indicates that the timer should be resumed.
- */
- RESUME("Resume"),
- /**
- * Indicates that the timer should be cleared.
- */
- CLEAR("Clear"),
- ;
-
- private final String friendlyName;
- private SdlUpdateMode(String friendlyName){
- this.friendlyName = friendlyName;
- }
-
- @Override
- public String toString(){
- return this.friendlyName;
- }
-
- /**
- * Translates the input SdlUpdateMode to the associated UpdateMode object.
- *
- * @param input The SdlUpdateMode object to translate
- * @return The translated UpdateMode object
- */
- public static UpdateMode translateToLegacy(SdlUpdateMode input){
- switch(input){
- case COUNT_UP:
- return UpdateMode.COUNTUP;
- case COUNT_DOWN:
- return UpdateMode.COUNTDOWN;
- case PAUSE:
- return UpdateMode.PAUSE;
- case RESUME:
- return UpdateMode.RESUME;
- case CLEAR:
- return UpdateMode.CLEAR;
- default:
- return null;
- }
- }
-
- /**
- * Translates the input UpdateMode to the associated SdlUpdateMode object.
- *
- * @param input The UpdateMode object to translate
- * @return The translated SdlUpdateMode object
- */
- public static SdlUpdateMode translateFromLegacy(UpdateMode input){
- switch(input){
- case COUNTUP:
- return COUNT_UP;
- case COUNTDOWN:
- return COUNT_DOWN;
- case PAUSE:
- return PAUSE;
- case RESUME:
- return RESUME;
- case CLEAR:
- return CLEAR;
- default:
- return null;
- }
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlVehicleData.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlVehicleData.java
deleted file mode 100644
index 4bc0a8689..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/enums/SdlVehicleData.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.livio.sdl.enums;
-
-public enum SdlVehicleData {
-
- GPS("GPS Data"),
- SPEED("Speed"),
- RPM("Engine RPM"),
- FUEL_LEVEL("Fuel Level"),
- FUEL_LEVEL_STATE("Fuel Level State"),
- FUEL_ECONOMY_INST("Fuel Economy (instant)"),
- EXTERNAL_TEMP("External Temperature"),
- VEHICLE_GEAR("Vehicle Gear State"),
- TIRE_PRESSURE("Tire Pressure"),
- ODOMETER("Odometer"),
- SEAT_BELT_STATUS("Seat Belt Status"),
- BODY_INFO("Body Information"),
- DEVICE_STATUS("Device Status"),
- DRIVER_BRAKING("Brake Status"),
- WIPER_STATUS("Windshield Wiper Status"),
- FUEL_ECONOMY_OVR("Fuel Economy (overall)"),
- ENGINE_OIL_LIFE("Engine Oil Life"),
- HEADLIGHT_STATUS("Headlight Status"),
- BATTERY_VOLTAGE("Battery Voltage"),
- BRAKE_TORQUE("Brake Torque"),
- ENGINE_TORQUE("Engine Torque"),
- TURBO_BOOST("Turbo Boost"),
- COOLANT_TEMP("Coolant Temp"),
- AIR_FUEL_RATIO("Air-Fuel Ratio"),
- COOLING_HEAD_TEMP("Cooling Head Temp"),
- ENGINE_OIL_TEMP("Engine Oil Temp"),
- AIR_INTAKE_TEMP("Air Intake Temp"),
- GEAR_SHIFT_ADVICE("Gear Shift Advice"),
- ACCELERATION("Acceleration"),
- ACC_PEDAL_POSITION("Acceleration Pedal Position"),
- CLUTCH_PEDAL_POSITION("Clutch Pedal Position"),
- REVERSE_GEAR_STATUS("Reverse Gear Status"),
- ACCELERATION_TORQUE("Acceleration Torque"),
- EV_INFO("EV Info"),
- AMBIENT_LIGHT_STATUS("Ambient Light Status"),
-
-
- ;
-
- private final String friendlyName;
- private SdlVehicleData(String friendlyName) {
- this.friendlyName = friendlyName;
- }
-
- @Override
- public String toString(){
- return this.friendlyName;
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/CommandButton.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/CommandButton.java
deleted file mode 100644
index fadc9a6b2..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/CommandButton.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.livio.sdl.menu;
-
-/**
- * Represents a command button that can be clicked on the SDL-connected head-unit. A command
- * button contains all the fields contained in the MenuItem parent class, as well as a parent id,
- * a string representing an image on the head-unit and an OnClickListener.
- *
- * @author Mike Burke
- *
- */
-public class CommandButton extends MenuItem {
-
- /**
- * An interface that defines a click event listener for a command button.
- *
- * @author Mike Burke
- *
- */
- public interface OnClickListener{
- void onClick(CommandButton button);
- }
-
- private int parentId = -1;
- private OnClickListener listener;
- private String imageName;
-
- public CommandButton(CommandButton copy){
- super(copy.getName(), copy.getId(), false);
- this.parentId = copy.getParentId();
- this.listener = copy.getOnClickListener();
- this.imageName = copy.getImageName();
- }
-
- public CommandButton(String name, int id) {
- super(name, id, false);
- }
-
- public CommandButton(String name, int id, int parentId) {
- super(name, id, false);
- this.parentId = parentId;
- }
-
- public CommandButton(String name, int id, OnClickListener listener) {
- super(name, id, false);
- this.listener = listener;
- }
-
- public CommandButton(String name, int id, int parentId, OnClickListener listener) {
- this(name, id, parentId, null, listener);
- }
-
- public CommandButton(String name, int id, String imageName) {
- super(name, id, false);
- this.imageName = imageName;
- }
-
- public CommandButton(String name, int id, int parentId, String imageName) {
- this(name, id, parentId, imageName, null);
- }
-
- public CommandButton(String name, int id, int parentId, String imageName, OnClickListener listener) {
- super(name, id, false);
- this.parentId = parentId;
- this.imageName = imageName;
- this.listener = listener;
- }
-
- public int getParentId() {
- return parentId;
- }
-
- public OnClickListener getOnClickListener() {
- return listener;
- }
-
- public String getImageName() {
- return imageName;
- }
-
- /**
- * Executes the code in the click listener, if it exists.
- */
- public void dispatchClickEvent(){
- if(listener != null){
- listener.onClick(this);
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuItem.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuItem.java
deleted file mode 100644
index 07bd2be42..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuItem.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.livio.sdl.menu;
-
-import java.util.Comparator;
-
-/**
- * Represents a generic menu item - either a submenu or a command. All menu items
- * have similar fields, for example, a name and an id.
- *
- * @see CommandButton, SubmenuButton
- *
- * @author Mike Burke
- *
- */
-public class MenuItem {
- /**
- * Comparator for sorting MenuItem objects based on their id.
- *
- * @author Mike Burke
- *
- */
- public static class IdComparator implements Comparator<MenuItem>{
- @Override
- public int compare(MenuItem lhs, MenuItem rhs) {
- final int lId = lhs.getId();
- final int rId = rhs.getId();
-
- if(lId > rId){
- return 1;
- }
- else if(lId < rId){
- return -1;
- }
- else{
- return 0;
- }
- }
- }
-
- /**
- * Comparator for sorting MenuItem objects based on their name.
- *
- * @author Mike Burke
- *
- */
- public static class NameComparator implements Comparator<MenuItem> {
- @Override
- public int compare(MenuItem lhs, MenuItem rhs) {
- return lhs.getName().compareTo(rhs.getName());
- }
- }
-
- private String name;
- private int id;
- private boolean isMenu;
-
- public MenuItem(MenuItem copy){
- this.name = copy.getName();
- this.id = copy.getId();
- this.isMenu = copy.isMenu();
- }
-
- public MenuItem(String name, int id, boolean isMenu) {
- this.name = name;
- this.id = id;
- this.isMenu = isMenu;
- }
-
- public String getName() {
- return name;
- }
-
- public int getId() {
- return id;
- }
-
- public boolean isMenu() {
- return isMenu;
- }
-
- @Override
- public String toString(){
- return new StringBuilder().append(name).append(" (").append(id).append(")").toString();
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuManager.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuManager.java
deleted file mode 100644
index b6fef256f..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/MenuManager.java
+++ /dev/null
@@ -1,334 +0,0 @@
-package com.livio.sdl.menu;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import android.util.Log;
-import android.util.SparseArray;
-
-/**
- * Manages SDL menu items (commands and submenus), keeping an up-to-date list of available
- * menu items.
- *
- * @author Mike Burke
- *
- */
-public class MenuManager {
- /**
- * Allows iterating over the items in a menu manager object.
- *
- * @author Mike Burke
- *
- */
- public static class MenuIterator implements Iterator<MenuItem>{
-
- private final MenuManager items;
- private int currentIndex = 0;
-
- private MenuIterator(MenuManager items){
- this.items = items;
- }
-
- @Override
- public boolean hasNext() {
- return (currentIndex < (items.size()));
- }
-
- @Override
- public MenuItem next() {
- return items.getItemAt(currentIndex++);
- }
-
- @Override
- public void remove() {
- // don't allow removing items through the iterator
- throw new UnsupportedOperationException();
- }
- }
-
- private static boolean debug = false;
- private SparseArray<MenuItem> menuItems;
-
- // constructors
- public MenuManager() {
- menuItems = new SparseArray<MenuItem>();
- }
-
- public MenuManager(int startSize){
- menuItems = new SparseArray<MenuItem>(startSize);
- }
-
- /**
- * Adds the input menu item to the list. If the input item is the child of a submenu,
- * also adds the item to the parent's list of children.
- *
- * @param item The item to add
- */
- public void addItem(MenuItem item){
- log(new StringBuilder().append("Adding item: ").append(item.toString()).toString());
- menuItems.put(item.getId(), item);
-
- // if not a top-level menu, let's check if it needs to be added to a submenu as well
- if(!item.isMenu()){
- CommandButton button = (CommandButton) item;
- int parentId = button.getParentId();
- if(parentId != -1){
- // button has a valid parent. let's find it and add it to the list
- addCommandToParent(button, parentId);
- }
- }
- }
-
- /**
- * Adds the input command button to the parent represented by the parent id.
- *
- * @param button The button to add
- * @param parentId The id of the button's parent
- */
- private void addCommandToParent(CommandButton button, int parentId){
- MenuItem parent = menuItems.get(parentId);
- log(new StringBuilder().append("Adding command: ").append(button.toString()).append(" to parent: ").append(parent.toString()).toString());
-
- if(parent.isMenu()){
- SubmenuButton parentButton = (SubmenuButton) parent;
- parentButton.addChild(button);
- }
- }
-
- /**
- * Removes the item with the input id. If the item to remove is a submenu which contains children,
- * this method removes the children commands from the menu manager as well. If the item to remove is
- * a command which belongs to a registered submenu, this method will also remove the child from its
- * parent's list of children.
- *
- * @param id The id of the item to remove
- */
- public void removeItem(int id){
- MenuItem itemToRemove = menuItems.get(id);
- if(itemToRemove == null){
- return;
- }
-
- log(new StringBuilder().append("Removing item: ").append(itemToRemove.toString()).toString());
-
- if(!itemToRemove.isMenu()){
- // command button
- final int parentId = ((CommandButton)itemToRemove).getParentId();
- if(parentId != -1){
- // we have a command button with a valid parent - let's remove it from the parent list
- SubmenuButton parent = (SubmenuButton) menuItems.get(parentId);
- if(parent != null){
- log(new StringBuilder().append("Removing child: ").append(itemToRemove.toString()).append(" from parent: ").append(parent.toString()).toString());
- parent.removeChild(itemToRemove.getId());
- }
- }
- }
- else{
- // submenu button is being deleted - remove all children as well
- removeChildren((SubmenuButton) itemToRemove);
- }
- menuItems.remove(id);
- }
-
- /**
- * Removes any children that belong to the input submenu.
- *
- * @param parent The parent whose children should be removed
- */
- private void removeChildren(SubmenuButton parent){
- List<MenuItem> children = parent.getChildren();
- if(children != null && children.size() > 0){
- for(MenuItem child : children){
- removeItem(child.getId());
- }
- }
- }
-
- /**
- * Makes a copy of all registered submenus and returns it.
- *
- * @return A list of all registered submenus
- */
- public List<MenuItem> getSubmenus(){
- if(size() == 0){
- return Collections.emptyList();
- }
-
- log("Making a copy of all submenus");
-
- List<MenuItem> result = new ArrayList<MenuItem>();
-
- // iterate through all items
- Iterator<MenuItem> iterator = iterator();
- while(iterator.hasNext()){
- MenuItem current = iterator.next();
- if(current.isMenu()){
- // if this item is a submenu, make a copy of the item and add it to the result list
- result.add(new SubmenuButton((SubmenuButton) current));
- }
- }
-
- return result;
- }
-
- /**
- * Makes a copy of all registered commands and returns it.
- *
- * @return A list of all registered commands
- */
- public List<MenuItem> getCommands(){
- if(size() == 0){
- return Collections.emptyList();
- }
-
- log("Making a copy of all commands");
-
- List<MenuItem> result = new ArrayList<MenuItem>();
-
- // iterate through all items
- Iterator<MenuItem> iterator = iterator();
- while(iterator.hasNext()){
- MenuItem current = iterator.next();
- if(!current.isMenu()){
- // if this item is a command, make a copy of the item and add it to the result list
- result.add(new CommandButton((CommandButton) current));
- }
- }
-
- return result;
- }
-
- /**
- * Makes a copy of all items and returns it.
- *
- * @return A list of all registered menu items
- */
- public List<MenuItem> getAllItems(){
- if(size() == 0){
- return Collections.emptyList();
- }
-
- log("Making a copy of all menu items");
-
- List<MenuItem> result = new ArrayList<MenuItem>(size());
-
- // iterate through all items
- Iterator<MenuItem> iterator = iterator();
- while(iterator.hasNext()){
- MenuItem current = iterator.next();
-
- // make a copy of the item and add it to the list
- if(current.isMenu()){
- result.add(new SubmenuButton((SubmenuButton) current));
- }
- else{
- result.add(new CommandButton((CommandButton) current));
- }
- }
-
- return result;
- }
-
- /**
- * Returns the item with the given id.
- *
- * @param id The id of the item to return
- * @return The item with the input id, or null if the id doesn't exist
- */
- public MenuItem get(int id){
- return menuItems.get(id);
- }
-
- /**
- * Returns the item at the input index.
- *
- * @param index The index of the item to return
- * @return The item at the given index
- */
- public MenuItem getItemAt(int index){
- return menuItems.valueAt(index);
- }
-
- /**
- * Returns the item with the given name.
- *
- * @param name The name of the item to return
- * @return The item with the given name, or null if the name doesn't exist
- */
- public MenuItem get(String name){
- // iterate through all items
- Iterator<MenuItem> iterator = iterator();
- while(iterator.hasNext()){
- MenuItem current = iterator.next();
-
- // if the current item matches the input name, return it
- if(name.equals(current.getName())){
- return current;
- }
- }
-
- return null;
- }
-
- /**
- * Returns the number of items being managed by the menu manager.
- *
- * @return The number of items being managed by the menu manager
- */
- public int size(){
- return menuItems.size();
- }
-
- /**
- * Removes all menu items from the menu manager.
- */
- public void clear(){
- menuItems.clear();
- }
-
- /**
- * Dispatches a click event to the button with the input id. If the button with the
- * input id isn't found in the menu manager, this method does nothing.
- *
- * @param buttonId The id of the button that was clicked
- */
- public void dispatchClick(int buttonId){
- MenuItem item = menuItems.get(buttonId);
-
- if(item == null || item.isMenu()){
- log("Button with selected ID hasn't been added to this menu manager.");
- }
- else{
- CommandButton itemCmd = (CommandButton) item;
- itemCmd.dispatchClickEvent();
- }
- }
-
- /**
- * Creates a new iterator object for this MenuManager object.
- *
- * @return The new iterator instance
- */
- public Iterator<MenuItem> iterator(){
- log("Creating new iterator object");
- Iterator<MenuItem> iterator = new MenuIterator(this);
- return iterator;
- }
-
- /**
- * Enables or disables debug mode for log messages.
- *
- * @param enable True to enable debug logs, false to disable
- */
- public static void setDebug(boolean enable){
- debug = enable;
- }
-
- private static void log(String msg){
- if(debug){
- Log.d("MenuManager", msg);
- }
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/SubmenuButton.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/SubmenuButton.java
deleted file mode 100644
index 7e2ebbe90..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/menu/SubmenuButton.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package com.livio.sdl.menu;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Represents a submenu button that can be clicked on the SDL-connected head-unit. A submenu
- * contains all the fields contained in the MenuItem parent class, as well as maintaining a list
- * of children commands.
- *
- * @author Mike Burke
- *
- */
-public class SubmenuButton extends MenuItem {
-
- private List<MenuItem> children;
-
- public SubmenuButton(SubmenuButton copy){
- super(copy.getName(), copy.getId(), true);
- copyChildren(copy.getChildren());
- }
-
- public SubmenuButton(String name, int id) {
- super(name, id, true);
- }
-
- /**
- * Creates a copy of the children to ensure there are no leaked references to the
- * children of the object we're copying.
- *
- * @param children
- */
- private void copyChildren(List<MenuItem> children){
- if(children == null || children.size() <= 0){
- return;
- }
-
- if(this.children == null){
- this.children = new ArrayList<MenuItem>(children.size());
- }
-
- for(MenuItem child : children){
- if(child.isMenu()){
- this.children.add(new SubmenuButton((SubmenuButton) child));
- }
- else{
- this.children.add(new CommandButton((CommandButton) child));
- }
- }
- }
-
- /**
- * Returns a copy of the list of all children associated with this menu item. If there
- * are no children associated with this menu item, this method will return an empty list.
- *
- * @return A copy of the list of children
- */
- public List<MenuItem> getChildren(){
- if(children == null || children.size() <= 0){
- return Collections.emptyList();
- }
-
- return new ArrayList<MenuItem>(children);
- }
-
- /**
- * Adds a child to this submenu object.
- *
- * @param item The item to add
- */
- public void addChild(MenuItem item){
- if(children == null){
- children = new ArrayList<MenuItem>();
- }
-
- children.add(item);
- }
-
- /**
- * Removes a child from this submenu object.
- *
- * @param childId The id of the child to remove
- */
- public void removeChild(int childId){
- if(children == null || children.size() <= 0){
- return;
- }
-
- for(MenuItem child : children){
- if(childId == child.getId()){
- children.remove(child);
- return;
- }
- }
- }
-
- /**
- * Removes all children from this submenu object.
- */
- public void removeAllChildren(){
- if(children == null || children.size() <= 0){
- return;
- }
-
- children.clear();
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/AndroidUtils.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/AndroidUtils.java
deleted file mode 100644
index 87f9a24c8..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/AndroidUtils.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.livio.sdl.utils;
-
-import java.io.ByteArrayOutputStream;
-import java.util.Arrays;
-import java.util.List;
-
-import android.content.Context;
-import android.content.ContextWrapper;
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.CompressFormat;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.net.wifi.WifiManager;
-import android.widget.ArrayAdapter;
-
-/**
- * Contains static methods that will help with typical Android tasks. For example,
- * there are methods to determine internet connectivity, creating adapters for spinners
- * and lists, etc.
- *
- * @author Mike Burke
- *
- */
-public final class AndroidUtils {
-
- private AndroidUtils(){} // don't allow instantiation of static classes
-
- /**
- * Determines if the network is currently available or not.
- *
- * @param context The context with which to access the system connectivity service
- * @return True if the network is available, false if not
- */
- public static boolean isNetworkAvailable(ContextWrapper context){
- ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo network = cm.getActiveNetworkInfo();
- return ( (network != null) && (network.isConnected()) );
- }
-
- /**
- * Creates a standard Android spinner adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param items List of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createSpinnerAdapter(Context context, List<E> items){
- ArrayAdapter<E> adapter = createAdapter(context, android.R.layout.select_dialog_item, items);
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- return adapter;
- }
-
- /**
- * Creates a standard Android spinner adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param items Array of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createSpinnerAdapter(Context context, E[] items){
- return createSpinnerAdapter(context, Arrays.asList(items));
- }
-
- /**
- * Creates a standard Android ListView adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param items List of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createListViewAdapter(Context context, List<E> items){
- return createAdapter(context, android.R.layout.simple_list_item_1, items);
- }
-
- /**
- * Creates a standard Android ListView adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param items Array of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createListViewAdapter(Context context, E[] items){
- return createListViewAdapter(context, Arrays.asList(items));
- }
-
- /**
- * Creates a standard Android ListView multiple-choice adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param items List of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createMultipleListViewAdapter(Context context, List<E> items){
- return createAdapter(context, android.R.layout.simple_list_item_multiple_choice, items);
- }
-
- /**
- * Creates a standard Android ListView multiple-choice adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param items Array of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createMultipleListViewAdapter(Context context, E[] items){
- return createMultipleListViewAdapter(context, Arrays.asList(items));
- }
-
- /**
- * Creates a standard Android adapter. Input items can be of any type.
- *
- * @param context Context with which to create the adapter
- * @param layoutId Android resource id to be used for a list row
- * @param items List of items to populate the adapter with
- * @return The created adapter
- */
- public static <E> ArrayAdapter<E> createAdapter(Context context, int layoutId, List<E> items){
- return new ArrayAdapter<E>(context, layoutId, items);
- }
-
- /**
- * Converts and Android bitmap file to an array of raw bytes that are ready to be sent over bluetooth,
- * wifi, usb, etc.
- *
- * @param bitmap The bitmap to translate
- * @param format The format of the bitmap
- * @return The raw byte representation of the bitmap
- */
- public static byte[] bitmapToRawBytes(Bitmap bitmap, CompressFormat format){
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- bitmap.compress(format, 100, baos);
- byte[] result = baos.toByteArray();
- return result;
- }
-
- /**
- * Enables or disables wifi. Requires CHANGE_WIFI_STATE permission.
- *
- * @param context A context with which to access wifi system service
- * @param enable True if wifi should be enabled, false if it should be disabled
- */
- public static void enableWifi(ContextWrapper context, boolean enable){
- WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
- wifiManager.setWifiEnabled(enable);
- }
-
- /**
- * Determines if the device's wifi is currently enabled or not.
- *
- * @param context A context with which to access wifi system service
- * @return True if wifi is enabled or enabling, false otherwise
- */
- public static boolean wifiIsEnabled(ContextWrapper context){
- WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
- int wifiState = wifiManager.getWifiState();
- return (wifiState == WifiManager.WIFI_STATE_ENABLED || wifiState == WifiManager.WIFI_STATE_ENABLING);
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/ApplicationPreferences.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/ApplicationPreferences.java
deleted file mode 100644
index 713759307..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/ApplicationPreferences.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package com.livio.sdl.utils;
-
-import java.util.Map;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-
-/**
- * Contains static methods for saving and restoring data from Android SharedPreferences.
- *
- * @author Mike Burke
- *
- */
-public final class ApplicationPreferences {
-
- private ApplicationPreferences(){} // don't allow instantiation of static classes
-
- /**
- * Determines if the input key exists as part of the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to look up
- * @return True if the key exists, false otherwise
- */
- public static boolean exists(Context context, String fileName, String key){
- SharedPreferences prefs = getSharedPreferences(context, fileName);
- if(prefs == null){
- return false;
- }
-
- Map<String, ?> mapping = prefs.getAll();
- if(mapping == null || mapping.size() == 0){
- return false;
- }
-
- return (mapping.get(key) != null);
- }
-
- /**
- * Retrieves the string with the input key from the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to look up
- * @return The string if it was found, null otherwise
- */
- public static String getString(Context context, String fileName, String key){
- SharedPreferences prefs = getSharedPreferences(context, fileName);
- String result = prefs.getString(key, null);
- return result;
- }
-
- /**
- * Retrieves the boolean with the input key from the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to look up
- * @return The boolean if it was found, null otherwise
- */
- public static boolean getBoolean(Context context, String fileName, String key){
- SharedPreferences prefs = getSharedPreferences(context, fileName);
- boolean result = prefs.getBoolean(key, false);
- return result;
- }
-
- /**
- * Retrieves the integer with the input key from the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to look up
- * @return The integer if it was found, null otherwise
- */
- public static int getInt(Context context, String fileName, String key){
- SharedPreferences prefs = getSharedPreferences(context, fileName);
- int result = prefs.getInt(key, -1);
- return result;
- }
-
- /**
- * Retrieves the float with the input key from the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to look up
- * @return The float if it was found, null otherwise
- */
- public static float getFloat(Context context, String fileName, String key){
- SharedPreferences prefs = getSharedPreferences(context, fileName);
- float result = prefs.getFloat(key, -1f);
- return result;
- }
-
- /**
- * Retrieves the long with the input key from the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to look up
- * @return The long if it was found, null otherwise
- */
- public static long getLong(Context context, String fileName, String key){
- SharedPreferences prefs = getSharedPreferences(context, fileName);
- long result = prefs.getLong(key, -1);
- return result;
- }
-
- /**
- * Saves the input value at the input key in the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to save
- * @param value Value of the object to save
- */
- public static void putString(Context context, String fileName, String key, String value){
- SharedPreferences.Editor editor = getEditor(context, fileName);
- editor.putString(key, value);
- editor.apply();
- }
-
- /**
- * Saves the input value at the input key in the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to save
- * @param value Value of the object to save
- */
- public static void putBoolean(Context context, String fileName, String key, boolean value){
- SharedPreferences.Editor editor = getEditor(context, fileName);
- editor.putBoolean(key, value);
- editor.apply();
- }
-
- /**
- * Saves the input value at the input key in the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to save
- * @param value Value of the object to save
- */
- public static void putInt(Context context, String fileName, String key, int value){
- SharedPreferences.Editor editor = getEditor(context, fileName);
- editor.putInt(key, value);
- editor.apply();
- }
-
- /**
- * Saves the input value at the input key in the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to save
- * @param value Value of the object to save
- */
- public static void putFloat(Context context, String fileName, String key, float value){
- SharedPreferences.Editor editor = getEditor(context, fileName);
- editor.putFloat(key, value);
- editor.apply();
- }
-
- /**
- * Saves the input value at the input key in the input filename.
- *
- * @param context Context with which to retrieve shared preferences
- * @param fileName File name for shared preferences
- * @param key Key of the object to save
- * @param value Value of the object to save
- */
- public static void putLong(Context context, String fileName, String key, long value){
- SharedPreferences.Editor editor = getEditor(context, fileName);
- editor.putLong(key, value);
- editor.apply();
- }
-
- private static SharedPreferences getSharedPreferences(Context context, String fileName){
- return context.getSharedPreferences(fileName, Context.MODE_PRIVATE);
- }
-
- private static SharedPreferences.Editor getEditor(Context context, String fileName){
- return getSharedPreferences(context, fileName).edit();
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Counter.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Counter.java
deleted file mode 100644
index b48690721..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Counter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.livio.sdl.utils;
-
-/**
- * Represents an abstract integer counter.
- *
- * @author Mike Burke
- *
- */
-public abstract class Counter {
-
- /**
- * Returns the current value of the counter and moves to the next one.
- *
- * @return Current value of the counter
- */
- abstract public int next();
-
- private final int START;
- protected int current;
-
- public Counter(){
- this.START = 0;
- this.current = START;
- }
-
- public Counter(int start){
- this.START = start;
- this.current = start;
- }
-
- /**
- * Resets the counter to its original starting point.
- */
- public void reset(){
- this.current = START;
- }
-
- /**
- * Returns the current value of the counter.
- *
- * @return The current value of the counter
- */
- public int current(){
- return current;
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/DownCounter.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/DownCounter.java
deleted file mode 100644
index 036261c62..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/DownCounter.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.livio.sdl.utils;
-
-/**
- * Represents a simple down-counter. The down-counter can be initialized with
- * a seed value to start counting from. If initialized with no seed, the counter
- * will start from 0.
- *
- * @author Mike Burke
- *
- */
-public class DownCounter extends Counter{
-
- public DownCounter() {
- super();
- }
-
- public DownCounter(int start){
- super(start);
- }
-
- @Override
- public int next() {
- return current--;
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/MathUtils.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/MathUtils.java
deleted file mode 100644
index 0642ef2df..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/MathUtils.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.livio.sdl.utils;
-
-public final class MathUtils {
-
- private MathUtils() {}
-
- public static final class Conversions{
- private Conversions(){}
-
- public static final int S_TO_MS = 1000;
- }
-
- public static int convertSecsToMillisecs(int seconds){
- return seconds * Conversions.S_TO_MS;
- }
-
- public static float convertSecsToMillisecs(float seconds){
- return seconds * Conversions.S_TO_MS;
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/SdlUtils.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/SdlUtils.java
deleted file mode 100644
index 6393882d6..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/SdlUtils.java
+++ /dev/null
@@ -1,254 +0,0 @@
-package com.livio.sdl.utils;
-
-import java.util.Vector;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.CompressFormat;
-
-import com.livio.sdl.SdlConstants;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.TTSChunkFactory;
-import com.smartdevicelink.proxy.rpc.Choice;
-import com.smartdevicelink.proxy.rpc.Image;
-import com.smartdevicelink.proxy.rpc.MenuParams;
-import com.smartdevicelink.proxy.rpc.StartTime;
-import com.smartdevicelink.proxy.rpc.TTSChunk;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.ImageType;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-
-/**
- * Contains static methods that are useful in working with SmartDeviceLink.
- *
- * @author Mike Burke
- *
- */
-public final class SdlUtils {
- private static final int NUMBER_OF_INDENTS = 4;
-
- private SdlUtils(){}
-
- /**
- * Creates and returns the raw JSON string associated with the
- * input RPC message object.
- *
- * @param msg The message to retrieve raw JSON for
- * @return The raw JSON string
- */
- public static String getJsonString(RPCMessage msg){
- return getJsonString(msg, NUMBER_OF_INDENTS);
- }
-
- /**
- * Creates and returns the raw JSON string associated with the input
- * RPC message object. Allows a custom number of indent spaces.
- *
- * @param msg The message to retrieve raw JSON for
- * @param numOfIndents Number of indents to be used in raw JSON
- * @return The raw JSON string
- */
- public static String getJsonString(RPCMessage msg, int numOfIndents){
- String result = "";
- try {
- JSONObject json = msg.serializeJSON();
- result = json.toString(numOfIndents);
- } catch (JSONException e) {
- e.printStackTrace();
- }
-
- return result;
- }
-
- /**
- * Creates a JSON title that can be used in JSON dialogs. Input correlation ID
- * is allowed to be null or -1 if there is no correlation ID associated with the
- * particular message.
- *
- * @param correlationId The associated correlation ID for the message
- * @return The JSON title with associated correlation ID.
- */
- public static String makeJsonTitle(Integer correlationId){
- if(correlationId == null || correlationId == -1){
- return "Raw JSON";
- }
-
- return new StringBuilder().append("Raw JSON (").append(correlationId).append(")").toString();
- }
-
- /**
- * Converts an SDL file type to its associated CompressFormat.
- *
- * @param type The file type to convert
- * @return The associated CompressFormat
- */
- public static CompressFormat convertImageTypeToCompressFormat(FileType type){
- switch(type){
- case GRAPHIC_JPEG:
- return CompressFormat.JPEG;
- case GRAPHIC_PNG:
- return CompressFormat.PNG;
- case GRAPHIC_BMP:
- return null; // TODO what's the compression format for a bitmap object?
- default:
- return null;
- }
- }
-
- /**
- * Converts the input bitmap to a byte array based on the input File Type.
- *
- * @param image The image to convert
- * @param type The file type of the image
- * @return The byte array of the input bitmap
- */
- public static byte[] bitmapToByteArray(Bitmap image, FileType type){
- CompressFormat format = convertImageTypeToCompressFormat(type);
- byte[] bitmapData = AndroidUtils.bitmapToRawBytes(image, format);
- return bitmapData;
- }
-
- /**
- * Creates a Choice object to be used in Choice Interaction Sets.
- *
- * @param name The name of the choice
- * @param vrCommands CSV list of voice-rec options
- * @param imageName Image name of any associated image
- * @return The created Choice object
- */
- public static Choice createChoice(String name, String vrCommands, String imageName){
- if(name == null){
- throw new NullPointerException();
- }
-
- Choice choice = new Choice();
- choice.setMenuName(name);
-
- if(vrCommands != null){
- choice.setVrCommands(voiceRecognitionVector(vrCommands));
- }
-
- if(imageName != null){
- choice.setImage(dynamicImage(imageName));
- }
-
- return choice;
- }
-
- /**
- * Creates a vector of voice-rec commands based on a CSV input string.
- *
- * @param input CSV list of voice-rec options
- * @return A vector of voice-rec strings
- */
- public static Vector<String> voiceRecognitionVector(String input){
- if(input.trim().equals("")){
- return null;
- }
-
- return StringUtils.toVector(input);
- }
-
- /**
- * Creates a dynamic image object with the input image name.
- *
- * @param imageName The name of the image this object represents
- * @return The created Image object
- */
- public static Image dynamicImage(String imageName){
- if(imageName == null){
- throw new NullPointerException();
- }
-
- Image result = new Image();
- result.setImageType(ImageType.DYNAMIC);
- result.setValue(imageName);
- return result;
- }
-
- /**
- * Creates a MenuParams object that can be used in other SDL requests, such as AddCommand.
- * If there is no parent id, send -1 as the parent id.
- *
- * @param name The name of the menu item
- * @param position The position of the menu item
- * @param parentId The item's parent id
- * @return The created MenuParams object
- */
- public static MenuParams menuParams(String name, int position, int parentId){
- if(name == null){
- throw new NullPointerException();
- }
- if(name.length() <= 0){
- throw new IllegalArgumentException();
- }
-
- MenuParams result = new MenuParams();
- result.setMenuName(name);
- result.setPosition(position);
-
- if(parentId != SdlConstants.AddCommandConstants.INVALID_PARENT_ID &&
- parentId != SdlConstants.AddCommandConstants.ROOT_PARENT_ID){
- result.setParentID(parentId);
- }
-
- return result;
- }
-
- /**
- * Creates a vector of text-to-speech "chunks" that will be used to speak the input
- * message through the vehicle's speaker system. This method assumes the input format
- * is a normal text string (as opposed to some type of phonemes).
- *
- * @param input The text to create "chunks" from
- * @return The created vector of TTSChunk objects
- */
- public static Vector<TTSChunk> createTextToSpeechVector(String input){
- return createTextToSpeechVector(input, SpeechCapabilities.TEXT);
- }
-
- /**
- * Creates a vector of text-to-speech "chunks" that will be used to speak the input
- * message through the vehicle's speaker system. This method requires an input parameter
- * detailing the format of the input string.
- *
- * @param input The text to create "chunks" from
- * @param speechCapabilities The format of the input string
- * @return The created vector of TTSChunk objects
- */
- public static Vector<TTSChunk> createTextToSpeechVector(String input, SpeechCapabilities speechCapabilities){
- Vector<String> inputStrings = StringUtils.toVector(input);
- Vector<TTSChunk> result = new Vector<TTSChunk>(inputStrings.size());
-
- for(String str : inputStrings){
- result.add(TTSChunkFactory.createChunk(speechCapabilities, str));
- }
-
- return result;
- }
-
- /**
- * Creates a StartTime object from the input time in hours, minutes & seconds.
- *
- * @param hours Hours value for StartTime object
- * @param minutes Minutes value for StartTime object
- * @param seconds Seconds value for the StartTime object
- * @return The created StartTime object
- */
- public static StartTime createStartTime(int hours, int minutes, int seconds){
- if(hours < SdlConstants.SetMediaClockTimerConstants.HOURS_MINIMUM || hours > SdlConstants.SetMediaClockTimerConstants.HOURS_MAXIMUM ||
- minutes < SdlConstants.SetMediaClockTimerConstants.MINUTES_MINIMUM || minutes > SdlConstants.SetMediaClockTimerConstants.MINUTES_MAXIMUM ||
- seconds < SdlConstants.SetMediaClockTimerConstants.SECONDS_MINIMUM || seconds > SdlConstants.SetMediaClockTimerConstants.SECONDS_MAXIMUM ){
- throw new IllegalArgumentException();
- }
-
- StartTime result = new StartTime();
- result.setHours(hours);
- result.setMinutes(minutes);
- result.setSeconds(seconds);
- return result;
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/StringUtils.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/StringUtils.java
deleted file mode 100644
index 9e413ce92..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/StringUtils.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.livio.sdl.utils;
-
-import java.util.Vector;
-
-/**
- * Contains static methods useful in dealing with String objects.
- *
- * @author Mike Burke
- *
- */
-public final class StringUtils {
-
- private static final String DEFAULT_DELIMITER = ",";
-
- private StringUtils(){}
-
- /**
- * Determines if the input string is an integer or not.
- *
- * @param input String to analyze
- * @return True if the string is an integer, false if not
- */
- public static boolean isInteger(String input){
- try{
- Integer.parseInt(input);
- return true;
- }catch(NumberFormatException e){
- // if the string can't be parsed as an integer, it isn't a number.
- return false;
- }
- }
-
- /**
- * Splits up a CSV string into a vector of strings.
- *
- * @param input The CSV string to process
- * @return The created vector of strings
- */
- public static Vector<String> toVector(String input){
- return toVector(input, DEFAULT_DELIMITER);
- }
-
- /**
- * Splits up a string into a vector of strings based on the input delimiter.
- *
- * @param input The raw string to process
- * @param delim The delimiter on which to split the string
- * @return The created vector of strings
- */
- public static Vector<String> toVector(String input, String delim){
- if(input == null){
- throw new NullPointerException();
- }
- if(delim == null){
- delim = DEFAULT_DELIMITER;
- }
- String[] inputArray = input.split(delim);
- Vector<String> result = new Vector<String>(inputArray.length);
-
- for(String splitStr : inputArray){
- result.add(splitStr.trim());
- }
-
- return result;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Timeout.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Timeout.java
deleted file mode 100644
index 91b5abf55..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/Timeout.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package com.livio.sdl.utils;
-
-import android.os.Handler;
-
-/**
- * Runs a simple thread that sleeps for the duration set in the constructor. When the thread
- * is completed or interrupted, it informs the listener that the timeout has been completed.
- *
- * @author Mike Burke
- *
- */
-public class Timeout {
-
- /**
- * Listener interface for the Timeout class. Contains callbacks for timeout completed
- * and timeout cancelled.
- *
- * @author Mike Burke
- *
- */
- public interface Listener{
- /**
- * Called when the thread has successfully ran for the input time.
- */
- public void onTimeoutCompleted();
- /**
- * Called when the thread has been cancelled or interrupted.
- */
- public void onTimeoutCancelled();
- }
-
- protected int timeout;
- protected Listener listener;
- protected Thread thread;
- protected Handler handler;
-
- /**
- * Creates a Timeout object.
- *
- * @param timeout The time to wait for (in ms)
- * @param l A listener for when the thread completes
- */
- public Timeout(int timeout, Listener l) {
- this.timeout = timeout;
- this.listener = l;
- handler = new Handler();
- }
-
- public int getTimeout() {
- return timeout;
- }
-
- public void setTimeout(int timeout) {
- this.timeout = timeout;
- }
-
- public Listener getListener() {
- return listener;
- }
-
- public void setListener(Listener listener) {
- this.listener = listener;
- }
-
- /**
- * Starts a new thread with the timeout that was set in the constructor.
- */
- public void start(){
- thread = new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- Thread.sleep(timeout);
- onTimeoutCompleted();
- } catch (InterruptedException e) {
- onTimeoutCancelled();
- }
- }
- });
- thread.start();
- }
-
- /**
- * Cancels the currently running thread.
- */
- public void cancel(){
- if(thread != null && thread.isAlive()){
- thread.interrupt();
- }
- }
-
- /**
- * Called by the timeout thread to inform that it has successfully completed.
- */
- protected void onTimeoutCompleted(){
- if(listener != null){
- handler.post(new Runnable() {
- @Override
- public void run() {
- listener.onTimeoutCompleted();
- }
- });
- }
- }
-
- /**
- * Called by the timeout thread to inform that it has be cancelled or interrupted.
- */
- protected void onTimeoutCancelled(){
- if(listener != null){
- handler.post(new Runnable() {
- @Override
- public void run() {
- listener.onTimeoutCancelled();
- }
- });
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/UpCounter.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/UpCounter.java
deleted file mode 100644
index e1b72e026..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/UpCounter.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.livio.sdl.utils;
-
-/**
- * Represents a simple up-counter. The up-counter can be initialized with
- * a seed value to start counting from. If initialized with no seed, the counter
- * will start from 0.
- *
- * @author Mike Burke
- *
- */
-public class UpCounter extends Counter{
-
- public UpCounter(){
- super();
- }
-
- public UpCounter(int start){
- super(start);
- }
-
- @Override
- public int next(){
- return current++;
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/WifiUtils.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/WifiUtils.java
deleted file mode 100644
index ceaadbef0..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/utils/WifiUtils.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.livio.sdl.utils;
-
-public final class WifiUtils {
-
- private static final int IP_ADDRESS_MIN_LENGTH = 7;
- private static final int IP_ADDRESS_MAX_LENGTH = 15;
-
- private static final int TCP_PORT_MIN_VALUE = 0;
- private static final int TCP_PORT_MAX_VALUE = 65535;
-
- private WifiUtils(){}
-
- /**
- * Validates the input IP address string.
- *
- * @param address The IP address string to analyze
- * @return True if this is a valid IP address, false if not
- */
- public static boolean validateIpAddress(String address){
- // address should be in the form of x.x.x.x, so at least 7 characters
- // address maximum is 255.255.255.255, so at most 15 characters
- if(address == null || address.length() < IP_ADDRESS_MIN_LENGTH || address.length() > IP_ADDRESS_MAX_LENGTH){
- return false;
- }
-
- // split the string into pieces separated by a .
- String[] pieces = address.split("\\.");
- // must have 4 numbers separated by .
- if(pieces.length != 4){
- return false;
- }
-
- // check each piece
- for(String piece : pieces){
- if(!StringUtils.isInteger(piece)){
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Validates the input TCP port string.
- *
- * @param tcpPort The TCP port string to analyze
- * @return True if this is a valid TCP port, false if not
- */
- public static boolean validateTcpPort(String tcpPort){
- try{
- int portNumber = Integer.parseInt(tcpPort);
- if(portNumber < TCP_PORT_MIN_VALUE || portNumber > TCP_PORT_MAX_VALUE){
- return false;
- }
- }catch(NumberFormatException e){
- return false;
- }
-
- return true;
- }
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/MinMaxInputFilter.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/MinMaxInputFilter.java
deleted file mode 100644
index 7b0d86138..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/MinMaxInputFilter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.livio.sdl.viewhelpers;
-
-import android.text.InputFilter;
-import android.text.Spanned;
-
-/**
- * An input filter for number-based text inputs. The filter allows the user
- * to enter any values between the min and max values used in the constructor,
- * but will not allow any letters or numbers outside that range to be entered into
- * the text field. For best results, set inputType to number for any text inputs
- * using this input filter.
- *
- * @author Mike Burke
- *
- */
-public class MinMaxInputFilter implements InputFilter {
-
- private int min, max;
-
- public MinMaxInputFilter(int min, int max){
- this.min = min;
- this.max = max;
- }
-
- public MinMaxInputFilter(String min, String max){
- this.min = Integer.parseInt(min);
- this.max = Integer.parseInt(max);
- }
-
- @Override
- public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
- try{
- int input = Integer.parseInt(dest.toString() + source.toString());
- if(isInRange(min, max, input)){
- return null;
- }
- }catch(NumberFormatException e){
- // do nothing
- }
- return "";
- }
-
- // determines if the input is in range or not
- private static boolean isInRange(int min, int max, int input){
- if(max > min){
- return (input >= min && input <= max);
- }
- else{
- return (input >= max && input <= min);
- }
- }
-
-}
diff --git a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/SeekBarCalculator.java b/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/SeekBarCalculator.java
deleted file mode 100644
index f26701146..000000000
--- a/SDL_Android/LivioSdlUtilities/src/com/livio/sdl/viewhelpers/SeekBarCalculator.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.livio.sdl.viewhelpers;
-
-/**
- * Performs math operations commonly used with SeekBar views. Performs calculations
- * to translate a progress value to a real-world value and vice-versa.
- *
- * @author Mike Burke
- *
- */
-public class SeekBarCalculator {
-
- private static final int PROGRESS_MIN = 0; // standard Android seekbars start from 0
-
- private int min, max;
- private float divisor;
-
- public SeekBarCalculator(int min, int max){
- this(min, max, 1.0f);
- }
-
- public SeekBarCalculator(int min, int max, float divisor) {
- this.min = min;
- this.max = max;
- this.divisor = divisor;
- }
-
- public int getMinValue() {
- return min;
- }
-
- public void setMinValue(int min){
- this.min = min;
- }
-
- public int getMaxValue() {
- return max;
- }
-
- public void setMaxValue(int max){
- this.max = max;
- }
-
- public float getDivisor() {
- return divisor;
- }
-
- public void setDivisor(float divisor){
- this.divisor = divisor;
- }
-
- /**
- * Determines the maximum progress value based on the min and max values.
- *
- * @return The max value of the progress bar
- */
- public int getMaxProgress(){
- return (max - min);
- }
-
- /**
- * Determines the minimum progress value. A typical Android SeekBar, this value is always 0.
- *
- * @return The min value of the progress bar
- */
- public int getMinProgress(){
- return PROGRESS_MIN;
- }
-
- /**
- * Calculates the SeekBar progress value for the input real-world value.
- *
- * @param value Real-world value to calculate progress for
- * @return The progress value of the input real-world value
- */
- public int calculateProgress(float value){
- value *= divisor;
-
- if(value < getMinValue() || value > getMaxValue()){
- throw new IllegalArgumentException("Value out of seekbar range");
- }
-
- int result = (int) (value - getMinValue());
-
- return result;
- }
-
- /**
- * Calculates the real-world value for the input progress value.
- *
- * @param progress Progress value to calculate real-world value for
- * @return The real-world value of the input progress value
- */
- public float calculateValue(int progress){
- if(progress < getMinProgress() || progress > getMaxProgress()){
- throw new IllegalArgumentException("Progress out of seekbar range");
- }
-
- float result = (progress + getMinValue()) / divisor;
-
- return result;
- }
-
-
-}
diff --git a/SDL_Android/LivioTesterApp/.classpath b/SDL_Android/LivioTesterApp/.classpath
deleted file mode 100644
index 0461652ec..000000000
--- a/SDL_Android/LivioTesterApp/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
diff --git a/SDL_Android/LivioTesterApp/.project b/SDL_Android/LivioTesterApp/.project
deleted file mode 100644
index 418cfd5f2..000000000
--- a/SDL_Android/LivioTesterApp/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>LivioSdlTester</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/SDL_Android/LivioTesterApp/AndroidManifest.xml b/SDL_Android/LivioTesterApp/AndroidManifest.xml
deleted file mode 100644
index 2fb7ec17a..000000000
--- a/SDL_Android/LivioTesterApp/AndroidManifest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.livio.sdltester"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-permission android:name="android.permission.BLUETOOTH" />
- <!-- Required to pair Bluetooth devices -->
- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
- <uses-permission android:name="android.permission.INTERNET" />
- <!-- Required to check if WiFi is enabled -->
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <!-- Required to make the device stay awake while doing XML tests -->
- <uses-permission android:name="android.permission.WAKE_LOCK" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <!-- Required to determine WiFi state and enable it if necessary -->
- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
-
- <uses-sdk
- android:minSdkVersion="11"
- android:targetSdkVersion="19" />
-
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
- <activity
- android:name="com.livio.sdltester.MainActivity"
- android:label="@string/app_name"
- android:launchMode="singleInstance"
- android:screenOrientation="portrait" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
-
- <service android:name="com.livio.sdl.SdlService" />
-
- <activity
- android:name="com.livio.sdltester.HelpActivity"
- android:label="@string/title_activity_help" >
- </activity>
- </application>
-
-</manifest>
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/css/style.css b/SDL_Android/LivioTesterApp/assets/help_docs/css/style.css
deleted file mode 100644
index 147ac09ab..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/css/style.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.big {font-size: 30px; line-height:50px;}
-
-h1 {font-size: 40px; text-align:center;}
-h2 {font-size: 30px; text-align:center;}
-h3 {font-size: 20px; text-align:center; font-weight:bold;}
-
-table {border:1px solid black; text-align:center; margin-left:auto; margin-right:auto;}
-td {border:1px solid black;}
-th {border:1px solid black; font-weight:bold;} \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/AddCommand.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/AddCommand.html
deleted file mode 100644
index 422961e7e..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/AddCommand.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Add Command</h1>
-
-The AddCommand command allows developers to add a command object into the head-unit's main menu. When the item on the head-unit is clicked,
-the click event is dispatched through the onOnCommand callback in the SDLService. From there, it can be dispatched to the appropriate click-listener
-based on the clicked item's ID.
-
-<p>
-There are 4 available settings to create a command in the head-unit's main menu:
-
-<p>
-<h2>Command Name (required)</h2>
-<h3>Type: String</h3>
-</br>
-The command name represents the text to display within the body of this command on the head-unit's main menu. This text should be a short description of what this button will do when clicked.
-
-<p>
-<h2>Voice Recognition Keyword(s) (optional)</h2>
-<h3>Type: Comma-separated String</h3>
-</br>
-The voice recognition keyword input tells the vehicle what keywords are linked to this particular command when spoken through the vehicle's voice system.
-
-<p>
-<h2>Parent ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The parent id represents where this command should be added. Commands can be added to the root-level of the head-unit's main menu, or, if a submenu has been added to the head-unit's main menu,
-commands can be added into the submenu as well. For more information, see <a href="AddSubmenu.html">AddSubmenu</a>.
-
-<p>
-<h2>Image (optional)</h2>
-<h3>Type: Image</h3>
-</br>
-The image for a particular command represents an image to be displayed alongside the command name within the body of this command on the head-unit's main menu. Images must have been added
-to the system through the <a href="PutFile.html">PutFile</a> command before they can be referenced for an AddCommand.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/AddSubmenu.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/AddSubmenu.html
deleted file mode 100644
index 8e325ab43..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/AddSubmenu.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Add Submenu</h1>
-
-The AddSubmenu command allows developers to add a submenu object into the head-unit's main menu. When the item on the head-unit is clicked,
-the submenu's contents are displayed. As of SDL 2.0, only 1 level of submenus are permitted. In other words, submenus can only be added to
-the root-level main menu and only commands can be added to existing submenus.
-
-<p>
-Submenus that have been added to the system's main menu can be removed through the <a href="DeleteSubmenu.html">DeleteSubmenu</a> command.
-
-<p>
-An AddSubmenu command only requires a single input to create a submenu on the head-unit's main menu:
-
-<p>
-<h2>Submenu Name (required)</h2>
-<h3>Type: String</h3>
-</br>
-The submenu name represents the text to display within the body of this submenu on the head-unit's main menu. This text should be a short description of what this menu will display when clicked.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/Alert.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/Alert.html
deleted file mode 100644
index d4679ebee..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/Alert.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Alert</h1>
-
-The Alert command allows developers to display a pop-up alert object on the head-unit UI. The alert command has the ability to display 3 lines of text as well as speak a message to the driver. Alerts are also able to play an alert sound as the pop-up appears.
-
-<p>
-To create an alert on the head-unit, 6 inputs are available:
-
-<p>
-<h2>Text to Speak (optional)</h2>
-<h3>Type: String</h3>
-</br>
-The text to speak for an alert message will be spoken to the driver by the vehicle's text to speech engine. This text should be a concise message telling the user what the alert is about.
-
-<p>
-<h2>Alert Lines (at least 1 required)</h2>
-<h3>Type: String</h3>
-</br>
-Alert messages are permitted to have up to 3 lines of text to alert the user. Alert messages should be concise and relevant to what the user is doing.
-
-<p>
-<h2>Alert Sound Enable (required)</h2>
-<h3>Type: Boolean</h3>
-</br>
-If your alert desires the vehicle's speakers to play an alert sound, set this value to true. If no sound is desired, set this value to false.
-
-<p>
-<h2>Alert Duration (required)</h2>
-<h3>Type: Integer</h3>
-</br>
-This value represents how long the alert should be displayed to the user. The duration parameter is an integer representing how many milliseconds the alert should be displayed for.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/ChangeRegistration.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/ChangeRegistration.html
deleted file mode 100644
index 0f39e30ef..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/ChangeRegistration.html
+++ /dev/null
@@ -1,167 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Change Registration</h1>
-
-The ChangeRegistration command allows developers to change the language options on the connected head-unit. There are two different types of language options available.
-The "Language" input option changes the spoken language being used on the head-unit to speak to the driver while the "HMI Display Language" changes the textual display
-language being displayed on the head-unit's HMI.
-
-<p>
-If the input fields match what is already being used by the head-unit, the request will be rejected.
-
-<p>
-To create an alert on the head-unit, 2 inputs are available:
-
-<p>
-<h2>Language (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-Represents the language being spoken to the driver through the vehicle's text-to-speech engine.
-
-<p>
-<h2>HMI Display Language (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-Represents the language being displayed on the head-unit's HMI.
-
-<h3>Available Language Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Language</th>
-</tr>
-
-<tr>
-<td>EN-US</td>
-<td>English (USA)</td>
-</tr>
-
-<tr>
-<td>EN-AU</td>
-<td>English (Australia)</td>
-</tr>
-
-<tr>
-<td>EN-GB</td>
-<td>English (Great Britain)</td>
-</tr>
-
-<tr>
-<td>ES-MX</td>
-<td>Spanish (Mexico)</td>
-</tr>
-
-<tr>
-<td>ES-ES</td>
-<td>Spanish (Spain)</td>
-</tr>
-
-<tr>
-<td>FR-FR</td>
-<td>French (France)</td>
-</tr>
-
-<tr>
-<td>FR-CA</td>
-<td>French (Canada)</td>
-</tr>
-
-<tr>
-<td>DE-DE</td>
-<td>German</td>
-</tr>
-
-<tr>
-<td>RU-RU</td>
-<td>Russian</td>
-</tr>
-
-<tr>
-<td>TR-TR</td>
-<td>Turkish</td>
-</tr>
-
-<tr>
-<td>PL-PL</td>
-<td>Polish</td>
-</tr>
-
-<tr>
-<td>IT-IT</td>
-<td>Italian</td>
-</tr>
-
-<tr>
-<td>SV-SE</td>
-<td>Swedish</td>
-</tr>
-
-<tr>
-<td>PT-PT</td>
-<td>Portuguese</td>
-</tr>
-
-<tr>
-<td>PT-BR</td>
-<td>Portuguese (Brazil)</td>
-</tr>
-
-<tr>
-<td>NL-NL</td>
-<td>Dutch</td>
-</tr>
-
-<tr>
-<td>ZH-CN</td>
-<td>Chinese (Traditional)</td>
-</tr>
-
-<tr>
-<td>ZH-TW</td>
-<td>Chinese (Thai)</td>
-</tr>
-
-<tr>
-<td>JA-JP</td>
-<td>Japanese</td>
-</tr>
-
-<tr>
-<td>AR-SA</td>
-<td>Arabic</td>
-</tr>
-
-<tr>
-<td>KO-KR</td>
-<td>Korean</td>
-</tr>
-
-<tr>
-<td>CS-CZ</td>
-<td>Czech</td>
-</tr>
-
-<tr>
-<td>DA-DK</td>
-<td>Danish</td>
-</tr>
-
-<tr>
-<td>NO-NO</td>
-<td>Norwegian</td>
-</tr>
-
-</table>
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/CreateInteractionChoiceSet.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/CreateInteractionChoiceSet.html
deleted file mode 100644
index 4ef19c387..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/CreateInteractionChoiceSet.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Create Interaction Choice Set</h1>
-
-The Create Interaction Choice Set command allows developers to display a pop-up list of options for the user to select from on the head-unit. Interaction choice
-sets are created by creating the list of choices for the user to select from. To display the interaction choice set, developers can utilize the <a href="PerformInteraction.html">PerformInteraction</a>
- command.
-
-<p>
-A choice can contain 3 parameters:
-
-<p>
-<h2>Choice Name (required)</h2>
-<h3>Type: String</h3>
-</br>
-The choice name represents the text to display within the body of this choice on the pop-up list. This text should be a short description of what this button will do when clicked.
-
-<p>
-<h2>Voice Recognition Keyword(s) (required)</h2>
-<h3>Type: Comma-separated String</h3>
-</br>
-The voice recognition keyword input tells the vehicle what keywords are linked to this particular choice when spoken through the vehicle's voice system.
-
-<p>
-<h2>Image (optional)</h2>
-<h3>Type: Image</h3>
-</br>
-The image for a particular choice represents an image to be displayed alongside the choice name within the body of this choice on the pop-up menu. Images must have been added to the system
-through the <a href="PutFile.html">PutFile</a> command before they can be referenced for a choice.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteCommand.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteCommand.html
deleted file mode 100644
index 9eace8bab..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteCommand.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Delete Command</h1>
-
-The DeleteCommand command allows developers to remove commands that have been added to the system through the
-<a href="AddCommand.html">AddCommand</a> command.
-
-<p>
-In order to delete a command that has been added to the system, you simply need to supply 1 parameter:
-
-<p>
-<h2>Command ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The ID that was assigned to the command set when it was added to the system.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteFile.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteFile.html
deleted file mode 100644
index 7acd3739d..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteFile.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Delete File</h1>
-
-The DeleteFile command allows developers to remove files that have been added to the system through the <a href="PutFile.html">PutFile</a> command.
-
-<p>
-In order to delete a file that has been added to the system, you simply need to supply 1 parameter:
-
-<p>
-<h2>File Name (required)</h2>
-<h3>Type: String</h3>
-</br>
-The file name for a file that has been added to the system is used whenever the application needs to reference that particular file.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteInteractionChoiceSet.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteInteractionChoiceSet.html
deleted file mode 100644
index 706454910..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteInteractionChoiceSet.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Delete Interaction Choice Set</h1>
-
-The DeleteInteractionChoiceSet command allows developers to remove choice sets that have been added to the system through the
-<a href="CreateInteractionChoiceSet.html">CreateInteractionChoiceSet</a> command.
-
-<p>
-In order to delete a choice set that has been added to the system, you simply need to supply 1 parameter:
-
-<p>
-<h2>Choice Set ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The ID that was assigned to the interaction choice set when it was added to the system.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteSubmenu.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteSubmenu.html
deleted file mode 100644
index 3ac8bd3ca..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/DeleteSubmenu.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Delete Submenu</h1>
-
-The DeleteSubmenu command allows developers to remove root-level submenus that have been added through the <a href="AddSubmenu.html">AddSubmenu</a> command.
-
-<p>
-A DeleteSubmenu command only requires a single input to create a submenu on the head-unit's main menu:
-
-<p>
-<h2>Submenu ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The submenu ID that was assigned to the submenu when it was added to the system.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/GetDTCs.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/GetDTCs.html
deleted file mode 100644
index 1f784f80f..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/GetDTCs.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Get DTCs</h1>
-
-The GetDTCs command allows developers to read diagnostic trouble codes (DTCs) from various modules in the vehicle.
-
-<p>
-In order to retrieve DTCs from a particular module, the application must know the module's specific CAN bus ID and input this ID as a parameter.
-
-<p>
-<h2>ECU ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The CAN bus ID of the module to read DTCs from. Valid ECU IDs range from 0 to 65535.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/ListFiles.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/ListFiles.html
deleted file mode 100644
index a69eeb416..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/ListFiles.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>List Files</h1>
-
-The ListFiles command allows developers to read a list of files that have been added to the head-unit through SDL. This command shows any dynamic files that have been
-added through the <a href="PutFile.html">PutFile</a> command as well as any static images that are permanently stored on the head-unit.
-
-<p>
-The ListFiles command does not accept any parameters.
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/PerformInteraction.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/PerformInteraction.html
deleted file mode 100644
index 2ebca73e2..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/PerformInteraction.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Perform Interaction</h1>
-
-The PerformInteraction command allows developers to show a pop-up list dialog that has been added through the <a href="CreateInteractionChoiceSet.html">CreateInteractionChoiceSet</a> command.
-If the user selects one of the items in the interaction choice set, the result will be returned to the onPerformInteractionResponse method in the SDL Service. From there, the click can be
-dispatched to the appropriate click-listener based on the id that was selected. The user also has the option to back out of the menu, in which case the response will show an ABORTED message.
-
-<p>
-The PerformInteraction command has capabilities for the following parameters:
-
-<p>
-<h2>Interaction Title (required)</h2>
-<h3>Type: String</h3>
-</br>
-The interaction title will show above the choices in the pop-up dialog. This should be a concise description of what the pop-up is asking for.
-
-<p>
-<h2>Interaction Voice Prompt (optional)</h2>
-<h3>Type: Comma-separated string</h3>
-</br>
-The interaction voice prompt parameter will speak the input text to the user when the pop-up dialog shows.
-
-<p>
-<h2>Choice Set Ids (required)</h2>
-<h3>Type: Vector of IDs (integers)</h3>
-</br>
-In order to perform an interaction with the user, the developer must select a set of choice set IDs that have been added to the system using the
-<a href="CreateInteractionChoiceSet.html">CreateInteractionChoiceSet</a> command.
-
-<p>
-<h2>Interaction Mode (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-The interaction mode parameter specifies how the user can perform the interaction.
-
-<h3>Available Interaction Mode Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Interaction Mode</th>
-</tr>
-
-<tr>
-<td>MANUAL_ONLY</td>
-<td>Only click events are permitted</td>
-</tr>
-
-<tr>
-<td>VOICE_REC_ONLY</td>
-<td>Only voice events are permitted</td>
-</tr>
-
-<tr>
-<td>BOTH</td>
-<td>Both click & voice events are permitted</td>
-</tr>
-
-</table>
-
-<p>
-<h2>Interaction Timeout Enable (required)</h2>
-<h3>Type: Boolean</h3>
-</br>
-Specifies whether or not the pop-up dialog should time-out after a certain number of time or not. If this value is set to false, the pop-up will remain on the screen
-indefinitely - until the app is disconnected or until the user navigates away from it.
-
-<p>
-<h2>Interaction Timeout (optional)</h2>
-<h3>Type: Integer</h3>
-</br>
-This value represents how long the pop-up should be displayed to the user. The duration parameter is an integer representing how many milliseconds the pop-up should be displayed for.
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/PutFile.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/PutFile.html
deleted file mode 100644
index 09b9e6e67..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/PutFile.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Put File</h1>
-
-The PutFile command allows developers to send various types of files that can be dynamically stored on the head-unit. Any files that are added through this command
-can be referenced by the associated filename.
-
-<p>
-In order to add a file to the head-unit system, your application needs to specify the following parameters:
-
-<p>
-<h2>SDL File Name (required)</h2>
-<h3>Type: String</h3>
-</br>
-This is the filename that the file will be stored as on the head-unit. This name must be unique and must be between 1-500 characters in length.
-
-<p>
-<h2>SDL File Type (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-This parameter represents what type of file is being sent to the head-unit system through SDL.
-
-<h3>Available File Type Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>File Type</th>
-</tr>
-
-<tr>
-<td>GRAPHIC_BMP</td>
-<td>A bitmap image</td>
-</tr>
-
-<tr>
-<td>GRAPHIC_JPEG</td>
-<td>A JPEG image</td>
-</tr>
-
-<tr>
-<td>GRAPHIC_PNG</td>
-<td>A PNG image</td>
-</tr>
-
-<tr>
-<td>AUDIO_WAVE</td>
-<td>A WAVE audio file</td>
-</tr>
-
-<tr>
-<td>AUDIO_MP3</td>
-<td>An MP3 audio file</td>
-</tr>
-
-</table>
-
-<p>
-<h2>Persistent (optional)</h2>
-<h3>Type: Boolean</h3>
-</br>
-If this parameter is set to true, the head-unit system will attempt to save the file across ignition cycles. If the system requires storage for higher priority files, this file may be deleted.
-When this parameter is false (or null), the application will need to send the files each session.
-
-<p>
-<h2>Bulk Data (required)</h2>
-<h3>Type: byte[]</h3>
-</br>
-The final, and most important parameter for the PutFile command is the raw byte array of the file to be sent to the system.
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/ReadDIDs.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/ReadDIDs.html
deleted file mode 100644
index 319da7e40..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/ReadDIDs.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Read DIDs</h1>
-
-The ReadDIDs command allows developers to read specific data (DIDs) from various modules in the vehicle.
-
-<p>
-In order to retrieve DTCs from a particular module, the application must know the module's specific CAN bus ID and the ID of the DID to
-retrieve.
-
-<p>
-<h2>ECU ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The CAN bus ID of the module to read DIDs from. Valid ECU IDs range from 0 to 65535.
-
-<p>
-<h2>DID ID (required)</h2>
-<h3>Type: ID (integer)</h3>
-</br>
-The DID ID for the module to read DIDs from. Valid DID IDs range from 0 to 65535.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/ScrollableMessage.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/ScrollableMessage.html
deleted file mode 100644
index a857a2a90..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/ScrollableMessage.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Scrollable Message</h1>
-
-The ScrollableMessage command allows developers to display a large portion of text to the user.
-
-<p>
-The following parameters are available to display a long, scrollable message to the user.
-
-<p>
-<h2>Message Body (required)</h2>
-<h3>Type: String</h3>
-</br>
-The body of the message to display. The message can contain line breaks and tab characters, but must be no more than 500 characters in length.
-
-<p>
-<h2>Timeout (required)</h2>
-<h3>Type: Integer</h3>
-</br>
-This parameter represents the timeout for the scrollable message in milliseconds. When the timeout expires, the scrollable message will be dismissed.
-Timeout can be anywhere from 1 to 65535 milliseconds.
-
-<p>
-<h2>Soft Buttons (optional)</h2>
-<h3>Type: Vector&#60;SoftButton&#62;</h3>
-</br>
-This parameter allows your application to add custom soft buttons to the scrollable message interface. Soft buttons represent additional user actions
-that are available for the scrollable message. Depending on the HMI, soft buttons could be along-side the scrollable message or in a separate menu available
-to the user.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/SetAppIcon.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/SetAppIcon.html
deleted file mode 100644
index e0ffdb550..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/SetAppIcon.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Set App Icon</h1>
-
-The SetAppIcon command allows developers to set a custom icon that will be associated with their application. Before setting the app icon through
-this message, the image must first be added through the <a href="PutFile.html">PutFile</a> command.
-
-<p>
-In order to set the app icon for your application, only one parameter is needed:
-
-<p>
-<h2>Filename (required)</h2>
-<h3>Type: String</h3>
-</br>
-The filename associated with the image that was added to the system through the <a href="PutFile.html">PutFile</a> command.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/SetMediaClockTimer.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/SetMediaClockTimer.html
deleted file mode 100644
index 9a842bf09..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/SetMediaClockTimer.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Set Media Clock Timer</h1>
-
-The SetMediaClockTimer command allows developers to manage a clock timer on the head-unit. This command is only applicable for media applications,
-such as music players or radio applications. If the connected application is not a media application, the line of text that contains the timer text
-will be replaced with the 4th line of text in the <a href="Show.html">Show</a> command. Therefore, if the connected application is a media application,
-the 4th line of text in the <a href="Show.html">Show</a> command will be inaccessible and replaced with the clock timer.
-
-<p>
-In order for a media application to manage the clock timer, 2 parameters are needed:
-
-<p>
-<h2>Timer Mode (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-The timer mode represents what the timer should do when this command is received.
-
-<h3>Available Timer Mode Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Timer Mode</th>
-</tr>
-
-<tr>
-<td>COUNT_UP</td>
-<td>The timer should count-up from the input start time.</td>
-</tr>
-
-<tr>
-<td>COUNT_DOWN</td>
-<td>The timer should count-down from the input start time.</td>
-</tr>
-
-<tr>
-<td>PAUSE</td>
-<td>The timer should pause. Input start time will be ignored.</td>
-</tr>
-
-<tr>
-<td>RESUME</td>
-<td>The timer should resume. Input start time will be ignored.</td>
-</tr>
-
-<tr>
-<td>CLEAR</td>
-<td>The timer should pause and reset to 00:00:00. Input start time will be ignored.</td>
-</tr>
-
-</table>
-
-<p>
-<h2>Start Time (optional)</h2>
-<h3>Type: StartTime</h3>
-</br>
-This object represents a start time with hours, minutes and seconds as parameters. The start time is mandatory for
-COUNT_UP and COUNT_DOWN timer modes, but optional for other timer modes.
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/Show.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/Show.html
deleted file mode 100644
index b3c77d8a4..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/Show.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Show</h1>
-
-The Show command allows developers to set lines of text on the main HMI display. For non-media applications, 4 lines of text are available. For media applications,
-the 4th line of text is replaced with a media clock that can be manipulated through the <a href="SetMediaClockTimer.html">SetMediaClockTimer</a> command. In addition,
-an image can also be displayed on the main HMI display.
-
-<p>
-The Show command useful for all applications to keep users informed as to what is happening inside the application. For example, when a music player application
-starts to play a new song, the first line of text could display the song name, the second line could display the artist name, the third line could display
-which album the song is from while the last line would show the current clock timer for the song in progress. The album art for the playing song could be
-displayed as the main artwork.
-
-<p>
-In order to make a change to the main HMI display through the show command, the following parameters are available:
-
-<p>
-<h2>Lines of Text (optional)</h2>
-<h3>Type: String</h3>
-</br>
-Each line of metadata can be represented as its own string object.
-
-<p>
-<h2>Text Alignment (optional)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-The text alignment input tells the head-unit how the lines of text should be aligned.
-
-<h3>Available Text Alignment Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Text Alignment</th>
-</tr>
-
-<tr>
-<td>ALIGN_LEFT</td>
-<td>All lines of text should be left-aligned.</td>
-</tr>
-
-<tr>
-<td>ALIGN_RIGHT</td>
-<td>All lines of text should be right-aligned.</td>
-</tr>
-
-<tr>
-<td>ALIGN_CENTER</td>
-<td>All lines of text should be centered.</td>
-</tr>
-
-</table>
-
-<p>
-<h2>Image (optional)</h2>
-<h3>Type: Image</h3>
-</br>
-The image object represents an image to be displayed on the head-unit's main HMI display. Images must have been added
-to the system through the <a href="PutFile.html">PutFile</a> command before they can be referenced for a Show command.
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/Slider.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/Slider.html
deleted file mode 100644
index 0cf5cccb3..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/Slider.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Slider</h1>
-
-The Slider command allows developers to display a slider widget on the head-unit's display. This could be useful for various tasks, such as
-changing the phone's ringer volume through SDL.
-
-<p>
-In order to show a slider for your application, the following parameters are available:
-
-<p>
-<h2>Slider Header (optional)</h2>
-<h3>Type: String</h3>
-</br>
-This text will be displayed above the slider widget and should be a concise description of what the slider input will change in the application.
-
-<p>
-<h2>Slider Footer (optional)</h2>
-<h3>Type: Vector&#60;String&#62;</h3>
-</br>
-This text will be displayed below the slider widget.
-
-<p>
-<h2>Number of Ticks (required)</h2>
-<h3>Type: Integer</h3>
-</br>
-This represents the maximum number of selections that will be available on the slider widget. This number must be at least 2 and cannot be greater than 26.
-
-<p>
-<h2>Start Position (required)</h2>
-<h3>Type: Integer</h3>
-</br>
-This represents the initial selection on the slider widget. This number must be at least 1 and cannot be greater than the number of ticks.
-
-<p>
-<h2>Timeout (required)</h2>
-<h3>Type: Integer</h3>
-</br>
-This represents the number of milliseconds to display the widget before it times out. The current selection of the widget will be returned through the response
-message when the timeout occurs or when the user exits the slider widget. This number must be between 0 and 65535 milliseconds.
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/Speak.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/Speak.html
deleted file mode 100644
index 49e075b77..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/Speak.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Speak</h1>
-
-The Speak command allows developers to prompt the vehicle's text-to-speech engine to speak text or phonemes to the head-unit.
-
-<p>
-In order to speak to the driver from your application, the following parameters are needed:
-
-<p>
-<h2>Text to Speak (required)</h2>
-<h3>Type: String</h3>
-</br>
-This string represents the text (or phonemes) that should be spoken to the driver.
-
-<p>
-<h2>Speech Capability (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-This string represents the text (or phonemes) that should be spoken to the driver.
-
-<h3>Available Speech Capability Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Speech Capability</th>
-</tr>
-
-<tr>
-<td>TEXT</td>
-<td>The input string should be interpreted as raw text.</td>
-</tr>
-
-<tr>
-<td>SAPI_PHONEMES</td>
-<td>The input string should be interpreted as phonemes from Microsoft's Speech API.</td>
-</tr>
-
-<tr>
-<td>LHPLUS_PHONEMES</td>
-<td>The input string should be interpreted as phonemes from Nuance's API.</td>
-</tr>
-
-<tr>
-<td>PRE_RECORDED</td>
-<td>The input string should be interpreted as a reference to a pre-recorded message that is supported by the head-unit. This option will vary per vehicle.</td>
-</tr>
-
-<tr>
-<td>SILENCE</td>
-<td>The input text will be ignored and any speech that is in progress will be suspended.</td>
-</tr>
-
-</table>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/SubscribeToButtons.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/SubscribeToButtons.html
deleted file mode 100644
index 980da03a1..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/SubscribeToButtons.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Subscribe to Buttons</h1>
-
-The ButtonSubscribe command allows the developer to subscribe to hardware buttons that are contained in the vehicle. When one of the subscribed buttons
-is pressed, the event is dispatched to the onOnButtonPress method in the SDL service.
-
-<p>
-Button subscriptions are currently handled one at a time, so if the application would like to subscribe to multiple buttons, a separate message must be
-sent for each button.
-
-<p>
-In order to subscribe the application to hardware buttons, only one parameter is required:
-
-<p>
-<h2>ButtonName (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-Represents the button to subscribe to.
-
-<h3>Available Button Name Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Button Name</th>
-</tr>
-
-<tr>
-<td>OK</td>
-<td>Represents the OK and PLAY buttons.</td>
-</tr>
-
-<tr>
-<td>PRESET0 - PRESET9</td>
-<td>Represents the preset buttons.</td>
-</tr>
-
-<tr>
-<td>SEEK_LEFT</td>
-<td>Represents the left seek button.</td>
-</tr>
-
-<tr>
-<td>SEEK_RIGHT</td>
-<td>Represents the right seek button.</td>
-</tr>
-
-<tr>
-<td>TUNE_UP</td>
-<td>Represents the up tune button.</td>
-</tr>
-
-<tr>
-<td>TUNE_DOWN</td>
-<td>Represents the down tune button.</td>
-</tr>
-
-</table>
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/UnsubscribeFromButtons.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/UnsubscribeFromButtons.html
deleted file mode 100644
index 2d83dc8bd..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/UnsubscribeFromButtons.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<h1>Unsubscribe from Buttons</h1>
-
-The ButtonUnsubscribe command allows the developer to unsubscribe from hardware buttons that have been subscribed to through the
-<a href="SubscribeToButtons.html">ButtonSubscribe</a> command.
-
-<p>
-Button unsubscriptions are currently handled one at a time, so if the application would like to unsubscribe from multiple buttons, a separate message must be
-sent for each button.
-
-<p>
-In order to unsubscribe the application from hardware buttons, only one parameter is required:
-
-<p>
-<h2>ButtonName (required)</h2>
-<h3>Type: Enumerated Value</h3>
-</br>
-Represents the button to subscribe to.
-
-<h3>Available Button Name Options</h3>
-<table>
-<tr>
-<th>Enumerated Value</th>
-<th>Button Name</th>
-</tr>
-
-<tr>
-<td>OK</td>
-<td>Represents the OK and PLAY buttons.</td>
-</tr>
-
-<tr>
-<td>PRESET0 - PRESET9</td>
-<td>Represents the preset buttons.</td>
-</tr>
-
-<tr>
-<td>SEEK_LEFT</td>
-<td>Represents the left seek button.</td>
-</tr>
-
-<tr>
-<td>SEEK_RIGHT</td>
-<td>Represents the right seek button.</td>
-</tr>
-
-<tr>
-<td>TUNE_UP</td>
-<td>Represents the up tune button.</td>
-</tr>
-
-<tr>
-<td>TUNE_DOWN</td>
-<td>Represents the down tune button.</td>
-</tr>
-
-</table>
-
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/assets/help_docs/html/index.html b/SDL_Android/LivioTesterApp/assets/help_docs/html/index.html
deleted file mode 100644
index 65633ed42..000000000
--- a/SDL_Android/LivioTesterApp/assets/help_docs/html/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-
-<head>
-
-<link rel="stylesheet" type="text/css" href="../css/style.css">
-
-</head>
-
-<body>
-
-<center><h1>Help</h1></center>
-
-<div class="big"><ul>
-
-<li><a href="AddCommand.html">Add Command</a></li>
-<li><a href="AddSubmenu.html">Add Submenu</a></li>
-<li><a href="Alert.html">Alert</a></li>
-<li><a href="ChangeRegistration.html">Change Registration</a></li>
-<li><a href="CreateInteractionChoiceSet.html">Create Interaction Choice Set</a></li>
-<li><a href="DeleteFile.html">Delete File</a></li>
-<li><a href="DeleteInteractionChoiceSet.html">Delete Interaction Choice Set</a></li>
-<li><a href="DeleteCommand.html">Delete Command</a></li>
-<li><a href="DeleteSubmenu.html">Delete Submenu</a></li>
-<li><a href="GetDTCs.html">Get DTCs</a></li>
-<li><a href="ListFiles.html">List Files</a></li>
-<li><a href="PerformInteraction.html">Perform Interaction</a></li>
-<li><a href="PutFile.html">Put File</a></li>
-<li><a href="ReadDIDs.html">Read DIDs</a></li>
-<li><a href="ScrollableMessage.html">Scrollable Message</a></li>
-<li><a href="SetAppIcon.html">Set App Icon</a></li>
-<li><a href="SetMediaClockTimer.html">Set Media Clock Timer</a></li>
-<li><a href="Show.html">Show</a></li>
-<li><a href="Slider.html">Slider</a></li>
-<li><a href="Speak.html">Speak</a></li>
-<li><a href="SubscribeToButtons.html">Subscribe to Buttons</a></li>
-<li><a href="UnsubscribeFromButtons.html">Unsubscribe from Buttons</a></li>
-
-</ul></div>
-
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/bin/AndroidManifest.xml b/SDL_Android/LivioTesterApp/bin/AndroidManifest.xml
deleted file mode 100644
index 2fb7ec17a..000000000
--- a/SDL_Android/LivioTesterApp/bin/AndroidManifest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.livio.sdltester"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-permission android:name="android.permission.BLUETOOTH" />
- <!-- Required to pair Bluetooth devices -->
- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
- <uses-permission android:name="android.permission.INTERNET" />
- <!-- Required to check if WiFi is enabled -->
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <!-- Required to make the device stay awake while doing XML tests -->
- <uses-permission android:name="android.permission.WAKE_LOCK" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <!-- Required to determine WiFi state and enable it if necessary -->
- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
-
- <uses-sdk
- android:minSdkVersion="11"
- android:targetSdkVersion="19" />
-
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
- <activity
- android:name="com.livio.sdltester.MainActivity"
- android:label="@string/app_name"
- android:launchMode="singleInstance"
- android:screenOrientation="portrait" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
-
- <service android:name="com.livio.sdl.SdlService" />
-
- <activity
- android:name="com.livio.sdltester.HelpActivity"
- android:label="@string/title_activity_help" >
- </activity>
- </application>
-
-</manifest>
diff --git a/SDL_Android/LivioTesterApp/bin/R.txt b/SDL_Android/LivioTesterApp/bin/R.txt
deleted file mode 100644
index 0ba56404c..000000000
--- a/SDL_Android/LivioTesterApp/bin/R.txt
+++ /dev/null
@@ -1,224 +0,0 @@
-int dimen activity_horizontal_margin 0x7f060000
-int dimen activity_vertical_margin 0x7f060001
-int drawable add 0x7f020000
-int drawable add_to_favorites 0x7f020001
-int drawable anchor 0x7f020002
-int drawable arrow_left 0x7f020003
-int drawable arrow_right 0x7f020004
-int drawable game_pad 0x7f020005
-int drawable ic_close 0x7f020006
-int drawable ic_launcher 0x7f020007
-int drawable remove 0x7f020008
-int drawable remove_from_favorites 0x7f020009
-int drawable rocket 0x7f02000a
-int drawable select_an_image 0x7f02000b
-int drawable undo 0x7f02000c
-int drawable zoom_in 0x7f02000d
-int drawable zoom_out 0x7f02000e
-int id btn_main_sendMessage 0x7f08001c
-int id but_addItem 0x7f080014
-int id but_performInteraction_selectChoiceSets 0x7f080020
-int id but_scrollableMessage_clear 0x7f08002e
-int id cb_putFile_addAll 0x7f080027
-int id cb_putFile_isPersistent 0x7f08002a
-int id check_alert_playTone 0x7f08000b
-int id check_enable_image 0x7f080004
-int id check_performInteraction_timeoutEnabled 0x7f080023
-int id check_show1 0x7f08003e
-int id check_show2 0x7f080040
-int id check_show3 0x7f080042
-int id check_show4 0x7f080044
-int id check_statusBar 0x7f080048
-int id et_addCommand_commandName 0x7f080001
-int id et_addCommand_voiceRecKeyword 0x7f080002
-int id et_addSubMenu_subMenuName 0x7f080006
-int id et_alert_line1 0x7f080008
-int id et_alert_line2 0x7f080009
-int id et_alert_line3 0x7f08000a
-int id et_alert_textToSpeak 0x7f080007
-int id et_choice_imageName 0x7f080013
-int id et_choice_name 0x7f080011
-int id et_choice_vr_text 0x7f080012
-int id et_getDtcs_ecuName 0x7f080016
-int id et_imageName 0x7f080005
-int id et_ipAddress 0x7f080031
-int id et_ipPort 0x7f080032
-int id et_mediaClockHours 0x7f080039
-int id et_mediaClockMins 0x7f08003a
-int id et_mediaClockSecs 0x7f08003b
-int id et_performInteraction_title 0x7f08001e
-int id et_performInteraction_voicePrompt 0x7f08001f
-int id et_putFile_imageName 0x7f080029
-int id et_readDids_didLocation 0x7f08002c
-int id et_readDids_ecuName 0x7f08002b
-int id et_scrollableMessage_text 0x7f08002d
-int id et_show1 0x7f08003d
-int id et_show2 0x7f08003f
-int id et_show3 0x7f080041
-int id et_show4 0x7f080043
-int id et_show_image 0x7f08004a
-int id et_slider_footer 0x7f08004e
-int id et_slider_title 0x7f08004d
-int id et_statusBar 0x7f080049
-int id et_textToSpeak 0x7f080055
-int id ib_moveLeft 0x7f080018
-int id ib_moveRight 0x7f080019
-int id ib_putFile_selectAnImage 0x7f080028
-int id iv_rowImage 0x7f08004b
-int id listView 0x7f08001a
-int id list_main_commandList 0x7f08001d
-int id ll_clock 0x7f080038
-int id lv_choices 0x7f080015
-int id menu_clear_list 0x7f08005c
-int id menu_connect 0x7f080059
-int id menu_disconnect 0x7f08005a
-int id menu_help 0x7f08005d
-int id menu_help_close 0x7f080058
-int id menu_help_home 0x7f080057
-int id menu_reset 0x7f08005b
-int id seek_alert_toneDuration 0x7f08000e
-int id seek_performInteraction_timeoutDuration 0x7f080026
-int id seek_scrollableMessage_timeout 0x7f080030
-int id seek_slider_numOfTicks 0x7f080050
-int id seek_slider_startPosition 0x7f080052
-int id seek_slider_timeout 0x7f080054
-int id spin_addCommand_submenus 0x7f080003
-int id spin_changeRegistration_hmiLanguage 0x7f080010
-int id spin_changeRegistration_language 0x7f08000f
-int id spin_mediaClock_updateMode 0x7f080036
-int id spin_performInteraction_interactionMode 0x7f080022
-int id spin_speechCapabilities 0x7f080056
-int id spin_textAlignment 0x7f080046
-int id textview 0x7f080017
-int id tv_alert_toneDuration 0x7f08000d
-int id tv_alert_toneDurationHeader 0x7f08000c
-int id tv_connectionStatus 0x7f08001b
-int id tv_mediaClock_clock 0x7f080037
-int id tv_messageDetail 0x7f080035
-int id tv_messageName 0x7f080033
-int id tv_metadataLines 0x7f08003c
-int id tv_performInteraction_interactionMode 0x7f080021
-int id tv_performInteraction_timeoutDuration 0x7f080025
-int id tv_performInteraction_timeoutTitle 0x7f080024
-int id tv_rowText 0x7f08004c
-int id tv_scrollableMessage_timeout 0x7f08002f
-int id tv_slider_numOfTicks 0x7f08004f
-int id tv_slider_startPosition 0x7f080051
-int id tv_slider_timeout 0x7f080053
-int id tv_statusBar 0x7f080047
-int id tv_textAlignment 0x7f080045
-int id tv_timestamp 0x7f080034
-int id wv_help 0x7f080000
-int layout activity_help 0x7f030000
-int layout add_command 0x7f030001
-int layout add_submenu 0x7f030002
-int layout alert 0x7f030003
-int layout change_registration 0x7f030004
-int layout choice_set_item 0x7f030005
-int layout create_choice_interaction_set 0x7f030006
-int layout get_dtcs 0x7f030007
-int layout json_flipper_dialog 0x7f030008
-int layout listview 0x7f030009
-int layout main 0x7f03000a
-int layout offline_mode 0x7f03000b
-int layout perform_interaction 0x7f03000c
-int layout put_file 0x7f03000d
-int layout read_dids 0x7f03000e
-int layout scrollable_message 0x7f03000f
-int layout sdl_connection 0x7f030010
-int layout sdl_message_listview_row 0x7f030011
-int layout set_media_clock_timer 0x7f030012
-int layout show 0x7f030013
-int layout simple_listview_with_image 0x7f030014
-int layout slider 0x7f030015
-int layout speak 0x7f030016
-int layout textview 0x7f030017
-int menu menu_help 0x7f070000
-int menu menu_main 0x7f070001
-int string action_settings 0x7f040052
-int string add_command_command_name 0x7f040004
-int string add_command_image_type 0x7f040007
-int string add_command_parent_menu 0x7f040006
-int string add_command_vr_keyword 0x7f040005
-int string add_image 0x7f040050
-int string alert_duration_ms 0x7f040023
-int string alert_duration_s 0x7f040022
-int string alert_line1 0x7f04001e
-int string alert_line2 0x7f04001f
-int string alert_line3 0x7f040020
-int string alert_sound_enabled 0x7f040021
-int string app_name 0x7f040000
-int string button_subscriptions_already_subscribed 0x7f040045
-int string button_subscriptions_none_subscribed 0x7f040046
-int string choice_name 0x7f040018
-int string clock 0x7f04002d
-int string clock_hrs 0x7f04002e
-int string clock_mins 0x7f04002f
-int string clock_secs 0x7f040030
-int string colon 0x7f040031
-int string connection_status_format 0x7f040040
-int string did_location 0x7f04000c
-int string ecu_name 0x7f04000b
-int string function_bank_root_name 0x7f040044
-int string hello_world 0x7f040053
-int string hmi_language 0x7f04001c
-int string interaction_list_none_added 0x7f04004d
-int string ip_address 0x7f040041
-int string ip_port 0x7f040042
-int string item_number 0x7f040016
-int string item_number1 0x7f040017
-int string language 0x7f04001b
-int string max_choices 0x7f040015
-int string media 0x7f04002c
-int string media_clock_timer_mode 0x7f040032
-int string media_track 0x7f04002b
-int string menu_clear_list 0x7f04003b
-int string menu_connect 0x7f040038
-int string menu_disconnect 0x7f040039
-int string menu_help 0x7f04003c
-int string menu_help_close 0x7f04003e
-int string menu_help_home 0x7f04003d
-int string menu_reset 0x7f04003a
-int string metadata_line1 0x7f040025
-int string metadata_line2 0x7f040026
-int string metadata_line3 0x7f040027
-int string metadata_line4 0x7f040028
-int string metadata_lines 0x7f040024
-int string negative_button 0x7f040003
-int string no_commands_to_delete 0x7f040008
-int string no_selection 0x7f040035
-int string no_submenus_to_delete 0x7f040009
-int string not_an_sdl_command 0x7f040037
-int string not_implemented 0x7f040036
-int string offline_mode_text 0x7f040043
-int string perform_interaction_mode 0x7f04004a
-int string perform_interaction_select_choice_set 0x7f040049
-int string perform_interaction_timeout 0x7f04004b
-int string perform_interaction_timeout_enabled 0x7f04004c
-int string perform_interaction_title 0x7f040047
-int string perform_interaction_voice_prompt 0x7f040048
-int string positive_button 0x7f040002
-int string put_file_persistent_file 0x7f04004e
-int string scrollable_message_clear 0x7f040014
-int string scrollable_message_hint 0x7f040013
-int string scrollable_message_text 0x7f040012
-int string sdl_command_dialog_title 0x7f04003f
-int string sdl_disconnected 0x7f040001
-int string sdl_image_name 0x7f04004f
-int string slider_footer 0x7f04000e
-int string slider_start_position 0x7f040010
-int string slider_ticks 0x7f04000f
-int string slider_title 0x7f04000d
-int string status_bar 0x7f04002a
-int string submenu_name 0x7f04000a
-int string text_alignment 0x7f040029
-int string text_to_speak 0x7f04001d
-int string timeout 0x7f040011
-int string title_activity_help 0x7f040051
-int string units_milliseconds 0x7f040034
-int string units_seconds 0x7f040033
-int string use_artwork 0x7f04001a
-int string voice_keyword 0x7f040019
-int style AppBaseTheme 0x7f050000
-int style AppTheme 0x7f050001
-int style small_header_text 0x7f050002
diff --git a/SDL_Android/LivioTesterApp/bin/jarlist.cache b/SDL_Android/LivioTesterApp/bin/jarlist.cache
deleted file mode 100644
index 0565465f2..000000000
--- a/SDL_Android/LivioTesterApp/bin/jarlist.cache
+++ /dev/null
@@ -1,3 +0,0 @@
-# cache for current jar dependency. DO NOT EDIT.
-# format is <lastModified> <length> <SHA-1> <path>
-# Encoding is UTF-8
diff --git a/SDL_Android/LivioTesterApp/gen/com/livio/sdl/R.java b/SDL_Android/LivioTesterApp/gen/com/livio/sdl/R.java
deleted file mode 100644
index 8c96d73b9..000000000
--- a/SDL_Android/LivioTesterApp/gen/com/livio/sdl/R.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/* AUTO-GENERATED FILE. DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found. It
- * should not be modified by hand.
- */
-package com.livio.sdl;
-
-public final class R {
- public static final class drawable {
- public static final int arrow_left = 0x7f020003;
- public static final int arrow_right = 0x7f020004;
- public static final int ic_launcher = 0x7f020007;
- }
- public static final class id {
- public static final int ib_moveLeft = 0x7f080018;
- public static final int ib_moveRight = 0x7f080019;
- public static final int iv_rowImage = 0x7f08004b;
- public static final int listView = 0x7f08001a;
- public static final int textview = 0x7f080017;
- public static final int tv_messageDetail = 0x7f080035;
- public static final int tv_messageName = 0x7f080033;
- public static final int tv_rowText = 0x7f08004c;
- public static final int tv_timestamp = 0x7f080034;
- }
- public static final class layout {
- public static final int json_flipper_dialog = 0x7f030008;
- public static final int listview = 0x7f030009;
- public static final int sdl_message_listview_row = 0x7f030011;
- public static final int simple_listview_with_image = 0x7f030014;
- public static final int textview = 0x7f030017;
- }
- public static final class string {
- public static final int add_command_command_name = 0x7f040004;
- public static final int add_command_image_type = 0x7f040007;
- public static final int add_command_parent_menu = 0x7f040006;
- public static final int add_command_vr_keyword = 0x7f040005;
- public static final int alert_duration_ms = 0x7f040023;
- public static final int alert_duration_s = 0x7f040022;
- public static final int alert_line1 = 0x7f04001e;
- public static final int alert_line2 = 0x7f04001f;
- public static final int alert_line3 = 0x7f040020;
- public static final int alert_sound_enabled = 0x7f040021;
- public static final int app_name = 0x7f040000;
- public static final int choice_name = 0x7f040018;
- public static final int clock = 0x7f04002d;
- public static final int clock_hrs = 0x7f04002e;
- public static final int clock_mins = 0x7f04002f;
- public static final int clock_secs = 0x7f040030;
- public static final int colon = 0x7f040031;
- public static final int did_location = 0x7f04000c;
- public static final int ecu_name = 0x7f04000b;
- public static final int hmi_language = 0x7f04001c;
- public static final int item_number = 0x7f040016;
- public static final int item_number1 = 0x7f040017;
- public static final int language = 0x7f04001b;
- public static final int max_choices = 0x7f040015;
- public static final int media = 0x7f04002c;
- public static final int media_clock_timer_mode = 0x7f040032;
- public static final int media_track = 0x7f04002b;
- public static final int metadata_line1 = 0x7f040025;
- public static final int metadata_line2 = 0x7f040026;
- public static final int metadata_line3 = 0x7f040027;
- public static final int metadata_line4 = 0x7f040028;
- public static final int metadata_lines = 0x7f040024;
- public static final int negative_button = 0x7f040003;
- public static final int no_commands_to_delete = 0x7f040008;
- public static final int no_submenus_to_delete = 0x7f040009;
- public static final int positive_button = 0x7f040002;
- public static final int scrollable_message_clear = 0x7f040014;
- public static final int scrollable_message_hint = 0x7f040013;
- public static final int scrollable_message_text = 0x7f040012;
- public static final int sdl_disconnected = 0x7f040001;
- public static final int slider_footer = 0x7f04000e;
- public static final int slider_start_position = 0x7f040010;
- public static final int slider_ticks = 0x7f04000f;
- public static final int slider_title = 0x7f04000d;
- public static final int status_bar = 0x7f04002a;
- public static final int submenu_name = 0x7f04000a;
- public static final int text_alignment = 0x7f040029;
- public static final int text_to_speak = 0x7f04001d;
- public static final int timeout = 0x7f040011;
- public static final int units_milliseconds = 0x7f040034;
- public static final int units_seconds = 0x7f040033;
- public static final int use_artwork = 0x7f04001a;
- public static final int voice_keyword = 0x7f040019;
- }
- public static final class style {
- public static final int AppBaseTheme = 0x7f050000;
- public static final int AppTheme = 0x7f050001;
- }
-}
diff --git a/SDL_Android/LivioTesterApp/gen/com/livio/sdltester/BuildConfig.java b/SDL_Android/LivioTesterApp/gen/com/livio/sdltester/BuildConfig.java
deleted file mode 100644
index dc3cc9902..000000000
--- a/SDL_Android/LivioTesterApp/gen/com/livio/sdltester/BuildConfig.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Automatically generated file. DO NOT MODIFY */
-package com.livio.sdltester;
-
-public final class BuildConfig {
- public final static boolean DEBUG = true;
-} \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/gen/com/livio/sdltester/R.java b/SDL_Android/LivioTesterApp/gen/com/livio/sdltester/R.java
deleted file mode 100644
index 005fb8c2b..000000000
--- a/SDL_Android/LivioTesterApp/gen/com/livio/sdltester/R.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/* AUTO-GENERATED FILE. DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found. It
- * should not be modified by hand.
- */
-
-package com.livio.sdltester;
-
-public final class R {
- public static final class attr {
- }
- public static final class dimen {
- /** Default screen margins, per the Android Design guidelines.
-
- Customize dimensions originally defined in res/values/dimens.xml (such as
- screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-
- */
- public static final int activity_horizontal_margin=0x7f060000;
- public static final int activity_vertical_margin=0x7f060001;
- }
- public static final class drawable {
- public static final int add=0x7f020000;
- public static final int add_to_favorites=0x7f020001;
- public static final int anchor=0x7f020002;
- public static final int arrow_left=0x7f020003;
- public static final int arrow_right=0x7f020004;
- public static final int game_pad=0x7f020005;
- public static final int ic_close=0x7f020006;
- public static final int ic_launcher=0x7f020007;
- public static final int remove=0x7f020008;
- public static final int remove_from_favorites=0x7f020009;
- public static final int rocket=0x7f02000a;
- public static final int select_an_image=0x7f02000b;
- public static final int undo=0x7f02000c;
- public static final int zoom_in=0x7f02000d;
- public static final int zoom_out=0x7f02000e;
- }
- public static final class id {
- public static final int btn_main_sendMessage=0x7f08001c;
- public static final int but_addItem=0x7f080014;
- public static final int but_performInteraction_selectChoiceSets=0x7f080020;
- public static final int but_scrollableMessage_clear=0x7f08002e;
- public static final int cb_putFile_addAll=0x7f080027;
- public static final int cb_putFile_isPersistent=0x7f08002a;
- public static final int check_alert_playTone=0x7f08000b;
- public static final int check_enable_image=0x7f080004;
- public static final int check_performInteraction_timeoutEnabled=0x7f080023;
- public static final int check_show1=0x7f08003e;
- public static final int check_show2=0x7f080040;
- public static final int check_show3=0x7f080042;
- public static final int check_show4=0x7f080044;
- public static final int check_statusBar=0x7f080048;
- public static final int et_addCommand_commandName=0x7f080001;
- public static final int et_addCommand_voiceRecKeyword=0x7f080002;
- public static final int et_addSubMenu_subMenuName=0x7f080006;
- public static final int et_alert_line1=0x7f080008;
- public static final int et_alert_line2=0x7f080009;
- public static final int et_alert_line3=0x7f08000a;
- public static final int et_alert_textToSpeak=0x7f080007;
- public static final int et_choice_imageName=0x7f080013;
- public static final int et_choice_name=0x7f080011;
- public static final int et_choice_vr_text=0x7f080012;
- public static final int et_getDtcs_ecuName=0x7f080016;
- public static final int et_imageName=0x7f080005;
- public static final int et_ipAddress=0x7f080031;
- public static final int et_ipPort=0x7f080032;
- public static final int et_mediaClockHours=0x7f080039;
- public static final int et_mediaClockMins=0x7f08003a;
- public static final int et_mediaClockSecs=0x7f08003b;
- public static final int et_performInteraction_title=0x7f08001e;
- public static final int et_performInteraction_voicePrompt=0x7f08001f;
- public static final int et_putFile_imageName=0x7f080029;
- public static final int et_readDids_didLocation=0x7f08002c;
- public static final int et_readDids_ecuName=0x7f08002b;
- public static final int et_scrollableMessage_text=0x7f08002d;
- public static final int et_show1=0x7f08003d;
- public static final int et_show2=0x7f08003f;
- public static final int et_show3=0x7f080041;
- public static final int et_show4=0x7f080043;
- public static final int et_show_image=0x7f08004a;
- public static final int et_slider_footer=0x7f08004e;
- public static final int et_slider_title=0x7f08004d;
- public static final int et_statusBar=0x7f080049;
- public static final int et_textToSpeak=0x7f080055;
- public static final int ib_moveLeft=0x7f080018;
- public static final int ib_moveRight=0x7f080019;
- public static final int ib_putFile_selectAnImage=0x7f080028;
- public static final int iv_rowImage=0x7f08004b;
- public static final int listView=0x7f08001a;
- public static final int list_main_commandList=0x7f08001d;
- public static final int ll_clock=0x7f080038;
- public static final int lv_choices=0x7f080015;
- public static final int menu_clear_list=0x7f08005c;
- public static final int menu_connect=0x7f080059;
- public static final int menu_disconnect=0x7f08005a;
- public static final int menu_help=0x7f08005d;
- public static final int menu_help_close=0x7f080058;
- public static final int menu_help_home=0x7f080057;
- public static final int menu_reset=0x7f08005b;
- public static final int seek_alert_toneDuration=0x7f08000e;
- public static final int seek_performInteraction_timeoutDuration=0x7f080026;
- public static final int seek_scrollableMessage_timeout=0x7f080030;
- public static final int seek_slider_numOfTicks=0x7f080050;
- public static final int seek_slider_startPosition=0x7f080052;
- public static final int seek_slider_timeout=0x7f080054;
- public static final int spin_addCommand_submenus=0x7f080003;
- public static final int spin_changeRegistration_hmiLanguage=0x7f080010;
- public static final int spin_changeRegistration_language=0x7f08000f;
- public static final int spin_mediaClock_updateMode=0x7f080036;
- public static final int spin_performInteraction_interactionMode=0x7f080022;
- public static final int spin_speechCapabilities=0x7f080056;
- public static final int spin_textAlignment=0x7f080046;
- public static final int textview=0x7f080017;
- public static final int tv_alert_toneDuration=0x7f08000d;
- public static final int tv_alert_toneDurationHeader=0x7f08000c;
- public static final int tv_connectionStatus=0x7f08001b;
- public static final int tv_mediaClock_clock=0x7f080037;
- public static final int tv_messageDetail=0x7f080035;
- public static final int tv_messageName=0x7f080033;
- public static final int tv_metadataLines=0x7f08003c;
- public static final int tv_performInteraction_interactionMode=0x7f080021;
- public static final int tv_performInteraction_timeoutDuration=0x7f080025;
- public static final int tv_performInteraction_timeoutTitle=0x7f080024;
- public static final int tv_rowText=0x7f08004c;
- public static final int tv_scrollableMessage_timeout=0x7f08002f;
- public static final int tv_slider_numOfTicks=0x7f08004f;
- public static final int tv_slider_startPosition=0x7f080051;
- public static final int tv_slider_timeout=0x7f080053;
- public static final int tv_statusBar=0x7f080047;
- public static final int tv_textAlignment=0x7f080045;
- public static final int tv_timestamp=0x7f080034;
- public static final int wv_help=0x7f080000;
- }
- public static final class layout {
- public static final int activity_help=0x7f030000;
- public static final int add_command=0x7f030001;
- public static final int add_submenu=0x7f030002;
- public static final int alert=0x7f030003;
- public static final int change_registration=0x7f030004;
- public static final int choice_set_item=0x7f030005;
- public static final int create_choice_interaction_set=0x7f030006;
- public static final int get_dtcs=0x7f030007;
- public static final int json_flipper_dialog=0x7f030008;
- public static final int listview=0x7f030009;
- public static final int main=0x7f03000a;
- public static final int offline_mode=0x7f03000b;
- public static final int perform_interaction=0x7f03000c;
- public static final int put_file=0x7f03000d;
- public static final int read_dids=0x7f03000e;
- public static final int scrollable_message=0x7f03000f;
- public static final int sdl_connection=0x7f030010;
- public static final int sdl_message_listview_row=0x7f030011;
- public static final int set_media_clock_timer=0x7f030012;
- public static final int show=0x7f030013;
- public static final int simple_listview_with_image=0x7f030014;
- public static final int slider=0x7f030015;
- public static final int speak=0x7f030016;
- public static final int textview=0x7f030017;
- }
- public static final class menu {
- public static final int menu_help=0x7f070000;
- public static final int menu_main=0x7f070001;
- }
- public static final class string {
- public static final int action_settings=0x7f040052;
- /** Add Command
- */
- public static final int add_command_command_name=0x7f040004;
- public static final int add_command_image_type=0x7f040007;
- public static final int add_command_parent_menu=0x7f040006;
- public static final int add_command_vr_keyword=0x7f040005;
- public static final int add_image=0x7f040050;
- public static final int alert_duration_ms=0x7f040023;
- public static final int alert_duration_s=0x7f040022;
- public static final int alert_line1=0x7f04001e;
- public static final int alert_line2=0x7f04001f;
- public static final int alert_line3=0x7f040020;
- public static final int alert_sound_enabled=0x7f040021;
- /** General Strings
- General Strings
- */
- public static final int app_name=0x7f040000;
- /** Button Subscriptions
- */
- public static final int button_subscriptions_already_subscribed=0x7f040045;
- public static final int button_subscriptions_none_subscribed=0x7f040046;
- public static final int choice_name=0x7f040018;
- public static final int clock=0x7f04002d;
- public static final int clock_hrs=0x7f04002e;
- public static final int clock_mins=0x7f04002f;
- public static final int clock_secs=0x7f040030;
- public static final int colon=0x7f040031;
- /** SDL Connection
- */
- public static final int connection_status_format=0x7f040040;
- public static final int did_location=0x7f04000c;
- /** Get DTCs and Read DIDs
- */
- public static final int ecu_name=0x7f04000b;
- /** Function Banks
- */
- public static final int function_bank_root_name=0x7f040044;
- public static final int hello_world=0x7f040053;
- public static final int hmi_language=0x7f04001c;
- public static final int interaction_list_none_added=0x7f04004d;
- public static final int ip_address=0x7f040041;
- public static final int ip_port=0x7f040042;
- public static final int item_number=0x7f040016;
- /** Choice Set Item
- */
- public static final int item_number1=0x7f040017;
- /** Change Registration
- */
- public static final int language=0x7f04001b;
- /** Create Interaction Choice Set
- */
- public static final int max_choices=0x7f040015;
- public static final int media=0x7f04002c;
- public static final int media_clock_timer_mode=0x7f040032;
- public static final int media_track=0x7f04002b;
- public static final int menu_clear_list=0x7f04003b;
- /** Menu Strings
- */
- public static final int menu_connect=0x7f040038;
- public static final int menu_disconnect=0x7f040039;
- public static final int menu_help=0x7f04003c;
- public static final int menu_help_close=0x7f04003e;
- public static final int menu_help_home=0x7f04003d;
- public static final int menu_reset=0x7f04003a;
- public static final int metadata_line1=0x7f040025;
- public static final int metadata_line2=0x7f040026;
- public static final int metadata_line3=0x7f040027;
- public static final int metadata_line4=0x7f040028;
- /** Show Dialog
- */
- public static final int metadata_lines=0x7f040024;
- public static final int negative_button=0x7f040003;
- /** Delete Command
- */
- public static final int no_commands_to_delete=0x7f040008;
- public static final int no_selection=0x7f040035;
- /** Delete Submenu
- */
- public static final int no_submenus_to_delete=0x7f040009;
- public static final int not_an_sdl_command=0x7f040037;
- public static final int not_implemented=0x7f040036;
- /** Offline Mode
- */
- public static final int offline_mode_text=0x7f040043;
- public static final int perform_interaction_mode=0x7f04004a;
- public static final int perform_interaction_select_choice_set=0x7f040049;
- public static final int perform_interaction_timeout=0x7f04004b;
- public static final int perform_interaction_timeout_enabled=0x7f04004c;
- /** Perform Interaction
- */
- public static final int perform_interaction_title=0x7f040047;
- public static final int perform_interaction_voice_prompt=0x7f040048;
- /** Dialog Strings
- */
- public static final int positive_button=0x7f040002;
- /** Put File
- */
- public static final int put_file_persistent_file=0x7f04004e;
- public static final int scrollable_message_clear=0x7f040014;
- public static final int scrollable_message_hint=0x7f040013;
- /** Scrollable Message
- */
- public static final int scrollable_message_text=0x7f040012;
- /** Dialog Strings
- */
- public static final int sdl_command_dialog_title=0x7f04003f;
- public static final int sdl_disconnected=0x7f040001;
- public static final int sdl_image_name=0x7f04004f;
- public static final int slider_footer=0x7f04000e;
- public static final int slider_start_position=0x7f040010;
- public static final int slider_ticks=0x7f04000f;
- /** Slider
- */
- public static final int slider_title=0x7f04000d;
- public static final int status_bar=0x7f04002a;
- /** Add Submenu
- */
- public static final int submenu_name=0x7f04000a;
- public static final int text_alignment=0x7f040029;
- /** Alert Dialog
- */
- public static final int text_to_speak=0x7f04001d;
- public static final int timeout=0x7f040011;
- public static final int title_activity_help=0x7f040051;
- public static final int units_milliseconds=0x7f040034;
- /** Unit Suffixes
- */
- public static final int units_seconds=0x7f040033;
- public static final int use_artwork=0x7f04001a;
- public static final int voice_keyword=0x7f040019;
- }
- public static final class style {
- /**
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-
-
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
-
-
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
-
- API 11 theme customizations can go here.
-
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
-
- API 14 theme customizations can go here.
-
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-
-
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
-
-
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
-
- API 11 theme customizations can go here.
-
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
-
- API 14 theme customizations can go here.
- */
- public static final int AppBaseTheme=0x7f050000;
- /** Application theme.
- All customizations that are NOT specific to a particular API-level can go here.
- Application theme.
- All customizations that are NOT specific to a particular API-level can go here.
- */
- public static final int AppTheme=0x7f050001;
- public static final int small_header_text=0x7f050002;
- }
-}
diff --git a/SDL_Android/LivioTesterApp/proguard-project.txt b/SDL_Android/LivioTesterApp/proguard-project.txt
deleted file mode 100644
index f2fe1559a..000000000
--- a/SDL_Android/LivioTesterApp/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/SDL_Android/LivioTesterApp/project.properties b/SDL_Android/LivioTesterApp/project.properties
deleted file mode 100644
index 86bc14be4..000000000
--- a/SDL_Android/LivioTesterApp/project.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-18
-android.library.reference.1=../LivioSdlUtilities
diff --git a/SDL_Android/LivioTesterApp/res/drawable-hdpi/ic_launcher.png b/SDL_Android/LivioTesterApp/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 60c1227aa..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable-ldpi/ic_launcher.png b/SDL_Android/LivioTesterApp/res/drawable-ldpi/ic_launcher.png
deleted file mode 100644
index 2308f49e3..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable-ldpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable-mdpi/ic_launcher.png b/SDL_Android/LivioTesterApp/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 1dc3a7735..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable-xhdpi/ic_launcher.png b/SDL_Android/LivioTesterApp/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 05949c460..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/add.png b/SDL_Android/LivioTesterApp/res/drawable/add.png
deleted file mode 100644
index de2049056..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/add.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/add_to_favorites.png b/SDL_Android/LivioTesterApp/res/drawable/add_to_favorites.png
deleted file mode 100644
index 47743b515..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/add_to_favorites.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/anchor.png b/SDL_Android/LivioTesterApp/res/drawable/anchor.png
deleted file mode 100644
index d680110df..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/anchor.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/game_pad.png b/SDL_Android/LivioTesterApp/res/drawable/game_pad.png
deleted file mode 100644
index d07876268..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/game_pad.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/ic_close.png b/SDL_Android/LivioTesterApp/res/drawable/ic_close.png
deleted file mode 100644
index 2cb447347..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/ic_close.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/ic_launcher.png b/SDL_Android/LivioTesterApp/res/drawable/ic_launcher.png
deleted file mode 100644
index 2308f49e3..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/remove.png b/SDL_Android/LivioTesterApp/res/drawable/remove.png
deleted file mode 100644
index c45bade5b..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/remove.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/remove_from_favorites.png b/SDL_Android/LivioTesterApp/res/drawable/remove_from_favorites.png
deleted file mode 100644
index e4c3d63cc..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/remove_from_favorites.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/rocket.png b/SDL_Android/LivioTesterApp/res/drawable/rocket.png
deleted file mode 100644
index 05d47869c..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/rocket.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/select_an_image.png b/SDL_Android/LivioTesterApp/res/drawable/select_an_image.png
deleted file mode 100644
index f382f04cc..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/select_an_image.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/undo.png b/SDL_Android/LivioTesterApp/res/drawable/undo.png
deleted file mode 100644
index 8455136f9..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/undo.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/zoom_in.png b/SDL_Android/LivioTesterApp/res/drawable/zoom_in.png
deleted file mode 100644
index cb66fc29d..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/zoom_in.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/drawable/zoom_out.png b/SDL_Android/LivioTesterApp/res/drawable/zoom_out.png
deleted file mode 100644
index e72b0f436..000000000
--- a/SDL_Android/LivioTesterApp/res/drawable/zoom_out.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Android/LivioTesterApp/res/layout/activity_help.xml b/SDL_Android/LivioTesterApp/res/layout/activity_help.xml
deleted file mode 100644
index bcf229d77..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/activity_help.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<WebView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/wv_help"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".HelpActivity" />
diff --git a/SDL_Android/LivioTesterApp/res/layout/add_command.xml b/SDL_Android/LivioTesterApp/res/layout/add_command.xml
deleted file mode 100755
index a2f3400af..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/add_command.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
-
- <EditText
- android:id="@+id/et_addCommand_commandName"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/add_command_command_name"/>
-
- <EditText android:id="@+id/et_addCommand_voiceRecKeyword"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapSentences"
- android:hint="@string/add_command_vr_keyword"/>
-
- <TextView
- style="@style/small_header_text"
- android:text="@string/add_command_parent_menu"/>
-
- <Spinner
- android:id="@+id/spin_addCommand_submenus"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- </Spinner>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <CheckBox
- android:id="@+id/check_enable_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
- <EditText
- android:id="@+id/et_imageName"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:inputType="textPersonName"
- android:hint="@string/sdl_image_name"
- android:enabled="false" />
-
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/res/layout/add_submenu.xml b/SDL_Android/LivioTesterApp/res/layout/add_submenu.xml
deleted file mode 100755
index 7d55626a7..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/add_submenu.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip">
-
- <EditText android:id="@+id/et_addSubMenu_subMenuName"
- android:hint="@string/submenu_name"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:inputType="textCapWords" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/res/layout/alert.xml b/SDL_Android/LivioTesterApp/res/layout/alert.xml
deleted file mode 100755
index 621b9f7a1..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/alert.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
-
- <EditText android:id="@+id/et_alert_textToSpeak"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/text_to_speak"/>
-
- <EditText android:id="@+id/et_alert_line1"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/alert_line1"/>
-
- <EditText android:id="@+id/et_alert_line2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/alert_line2"/>
-
- <EditText android:id="@+id/et_alert_line3"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/alert_line3"/>
-
- <CheckBox android:id="@+id/check_alert_playTone"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="left"
- android:text="@string/alert_sound_enabled"
- android:checked="true"
- />
-
- <TextView android:id="@+id/tv_alert_toneDurationHeader"
- style="@style/small_header_text"
- android:text="@string/alert_duration_s"/>
-
- <TextView android:id="@+id/tv_alert_toneDuration"
- style="@style/small_header_text"/>
-
- <SeekBar android:id="@+id/seek_alert_toneDuration"
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:max="50"
- android:progress="50"
- />
-
-</LinearLayout> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/res/layout/change_registration.xml b/SDL_Android/LivioTesterApp/res/layout/change_registration.xml
deleted file mode 100644
index 4fc1ca17c..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/change_registration.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
-
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- android:gravity="center"
- android:text="@string/language"/>
-
- <Spinner android:id="@+id/spin_changeRegistration_language"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:textStyle="bold"
- android:gravity="center"
- android:text="@string/hmi_language"/>
-
- <Spinner android:id="@+id/spin_changeRegistration_hmiLanguage"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-
-</LinearLayout> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/res/layout/choice_set_item.xml b/SDL_Android/LivioTesterApp/res/layout/choice_set_item.xml
deleted file mode 100644
index 21a25d059..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/choice_set_item.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <EditText
- android:id="@+id/et_choice_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:ems="10"
- android:inputType="textCapWords"
- android:hint="@string/choice_name" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/et_choice_vr_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/et_choice_name"
- android:ems="10"
- android:inputType="textCapWords"
- android:hint="@string/voice_keyword" />
-
- <CheckBox
- android:id="@+id/check_enable_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@+id/et_choice_vr_text"/>
-
- <EditText
- android:id="@+id/et_choice_imageName"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/et_choice_vr_text"
- android:layout_toRightOf="@+id/check_enable_image"
- android:ems="10"
- android:enabled="false"
- android:inputType="textPersonName"
- android:hint="@string/sdl_image_name" />
-
-</RelativeLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/create_choice_interaction_set.xml b/SDL_Android/LivioTesterApp/res/layout/create_choice_interaction_set.xml
deleted file mode 100644
index 83b8d626f..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/create_choice_interaction_set.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip">
-
- <Button
- android:id="@+id/but_addItem"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Add an item" />
-
- <ListView android:id="@+id/lv_choices"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/get_dtcs.xml b/SDL_Android/LivioTesterApp/res/layout/get_dtcs.xml
deleted file mode 100755
index 76d580153..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/get_dtcs.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip">
-
- <EditText android:id="@+id/et_getDtcs_ecuName"
- android:hint="@string/ecu_name"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:inputType="number" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/res/layout/main.xml b/SDL_Android/LivioTesterApp/res/layout/main.xml
deleted file mode 100644
index 465ebe719..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/main.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
- android:orientation="vertical">
-
- <TextView android:id="@+id/tv_connectionStatus"
- style="@style/small_header_text"
- android:text="@string/connection_status_format" />
-
- <Button android:id="@+id/btn_main_sendMessage"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Send Message"/>
-
- <ListView android:id="@+id/list_main_commandList"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_width="fill_parent"
- />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/offline_mode.xml b/SDL_Android/LivioTesterApp/res/layout/offline_mode.xml
deleted file mode 100644
index bd34dda13..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/offline_mode.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:text="@string/offline_mode_text" >
-
-
-</TextView>
diff --git a/SDL_Android/LivioTesterApp/res/layout/perform_interaction.xml b/SDL_Android/LivioTesterApp/res/layout/perform_interaction.xml
deleted file mode 100644
index f1ce25a8d..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/perform_interaction.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <EditText android:id="@+id/et_performInteraction_title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:inputType="textCapSentences"
- android:hint="@string/perform_interaction_title">
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/et_performInteraction_voicePrompt"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:inputType="textCapSentences"
- android:hint="@string/perform_interaction_voice_prompt"/>
-
- <Button
- android:id="@+id/but_performInteraction_selectChoiceSets"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/perform_interaction_select_choice_set"
- />
-
- <TextView android:id="@+id/tv_performInteraction_interactionMode"
- style="@style/small_header_text"
- android:text="@string/perform_interaction_mode" />
-
- <Spinner android:id="@+id/spin_performInteraction_interactionMode"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <CheckBox android:id="@+id/check_performInteraction_timeoutEnabled"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/perform_interaction_timeout_enabled"
- android:checked="true" />
-
- <TextView android:id="@+id/tv_performInteraction_timeoutTitle"
- style="@style/small_header_text"
- android:text="@string/perform_interaction_timeout" />
-
- <TextView android:id="@+id/tv_performInteraction_timeoutDuration"
- style="@style/small_header_text" />
-
- <SeekBar android:id="@+id/seek_performInteraction_timeoutDuration"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:max="95"
- android:progress="95"
- />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/put_file.xml b/SDL_Android/LivioTesterApp/res/layout/put_file.xml
deleted file mode 100644
index 8e0b7bb43..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/put_file.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip">
-
- <CheckBox
- android:id="@+id/cb_putFile_addAll"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Add all images" />
-
- <ImageButton android:id="@+id/ib_putFile_selectAnImage"
- android:layout_width="match_parent"
- android:layout_height="240dp"
- android:src="@drawable/select_an_image"
- android:background="#00FFFFFF" />
-
- <EditText android:id="@+id/et_putFile_imageName"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapSentences"
- android:enabled="false"
- android:hint="@string/sdl_image_name">
-
- <requestFocus />
- </EditText>
-
- <CheckBox
- android:id="@+id/cb_putFile_isPersistent"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/put_file_persistent_file" />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/read_dids.xml b/SDL_Android/LivioTesterApp/res/layout/read_dids.xml
deleted file mode 100644
index 00efee4a8..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/read_dids.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip">
-
- <EditText android:id="@+id/et_readDids_ecuName"
- android:hint="@string/ecu_name"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:inputType="number" />
-
- <EditText android:id="@+id/et_readDids_didLocation"
- android:hint="@string/did_location"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:inputType="number" />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/scrollable_message.xml b/SDL_Android/LivioTesterApp/res/layout/scrollable_message.xml
deleted file mode 100644
index d93a5d535..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/scrollable_message.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
-
- <EditText
- android:id="@+id/et_scrollableMessage_text"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- android:inputType="textMultiLine"
- android:singleLine="false"
- android:hint="@string/scrollable_message_hint"
- android:text="@string/scrollable_message_text">
-
- <requestFocus />
- </EditText>
-
- <Button android:id="@+id/but_scrollableMessage_clear"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/scrollable_message_clear"/>
-
- <TextView android:id="@+id/tv_scrollableMessage_timeout"
- style="@style/small_header_text"
- android:text="@string/timeout"/>
-
- <SeekBar android:id="@+id/seek_scrollableMessage_timeout"
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:max="64"
- android:progress="29"
- />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/sdl_connection.xml b/SDL_Android/LivioTesterApp/res/layout/sdl_connection.xml
deleted file mode 100644
index 89d002ed7..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/sdl_connection.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <EditText
- android:id="@+id/et_ipAddress"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/ip_address"
- android:inputType="number|text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/et_ipPort"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/ip_port"
- android:inputType="number|text" />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/set_media_clock_timer.xml b/SDL_Android/LivioTesterApp/res/layout/set_media_clock_timer.xml
deleted file mode 100644
index ea60a7e1c..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/set_media_clock_timer.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
-
- <TextView
- style="@style/small_header_text"
- android:text="@string/media_clock_timer_mode" />
-
- <Spinner android:id="@+id/spin_mediaClock_updateMode"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
-
- <TextView android:id="@+id/tv_mediaClock_clock"
- style="@style/small_header_text"
- android:text="@string/clock" />
-
- <LinearLayout android:id="@+id/ll_clock"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:gravity="center_horizontal">
-
- <EditText android:id="@+id/et_mediaClockHours"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="number"
- android:hint="@string/clock_hrs"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- android:text="@string/colon" />
-
- <EditText android:id="@+id/et_mediaClockMins"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="number"
- android:hint="@string/clock_mins"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- android:text="@string/colon" />
-
- <EditText android:id="@+id/et_mediaClockSecs"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="number"
- android:hint="@string/clock_secs"/>
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/show.xml b/SDL_Android/LivioTesterApp/res/layout/show.xml
deleted file mode 100644
index acd4a955b..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/show.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="0dip" >
-
-
- <TextView
- android:id="@+id/tv_metadataLines"
- style="@style/small_header_text"
- android:layout_alignParentRight="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:text="@string/metadata_lines"
- />
-
- <EditText
- android:id="@+id/et_show1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/tv_metadataLines"
- android:layout_toRightOf="@+id/check_show1"
- android:hint="@string/metadata_line1"
- android:inputType="textCapWords"
- android:ems="10" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/et_show2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/et_show1"
- android:layout_toRightOf="@+id/check_show2"
- android:hint="@string/metadata_line2"
- android:inputType="textCapWords"
- android:ems="10"/>
-
- <EditText
- android:id="@+id/et_show3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/et_show2"
- android:layout_toRightOf="@+id/check_show3"
- android:hint="@string/metadata_line3"
- android:inputType="textCapWords"
- android:ems="10"/>
-
- <EditText
- android:id="@+id/et_show4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/et_show3"
- android:layout_toRightOf="@+id/check_show4"
- android:hint="@string/metadata_line4"
- android:inputType="textCapWords"
- android:ems="10"/>
-
- <CheckBox
- android:id="@+id/check_show1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@+id/et_show1"
- android:layout_alignParentLeft="true"
- android:checked="true" />
-
- <CheckBox
- android:id="@+id/check_show2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBaseline="@+id/et_show2"
- android:layout_alignBottom="@+id/et_show2"
- android:layout_toLeftOf="@+id/et_show1"
- android:checked="true" />
-
- <CheckBox
- android:id="@+id/check_show3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@+id/et_show3"
- android:layout_alignParentLeft="true"
- android:checked="false" />
-
- <CheckBox
- android:id="@+id/check_show4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@+id/et_show4"
- android:layout_alignParentLeft="true"
- android:checked="false" />
-
- <TextView
- android:id="@+id/tv_textAlignment"
- style="@style/small_header_text"
- android:layout_alignParentRight="true"
- android:layout_alignParentLeft="true"
- android:layout_below="@+id/et_show4"
- android:text="@string/text_alignment"
- />
-
- <Spinner
- android:id="@+id/spin_textAlignment"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/tv_textAlignment"
- android:layout_below="@+id/tv_textAlignment" />
-
- <TextView
- android:id="@+id/tv_statusBar"
- style="@style/small_header_text"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/spin_textAlignment"
- android:text="@string/status_bar"
- android:visibility="gone" />
-
- <CheckBox
- android:id="@+id/check_statusBar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@+id/et_statusBar"
- android:layout_alignParentLeft="true"
- android:checked="false"
- android:visibility="gone" />
-
- <EditText
- android:id="@+id/et_statusBar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/tv_statusBar"
- android:layout_toRightOf="@+id/check_statusBar"
- android:ems="10"
- android:hint="@string/status_bar"
- android:inputType="textCapWords"
- android:visibility="gone" />
-
- <CheckBox
- android:id="@+id/check_enable_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/spin_textAlignment"
- android:layout_alignParentLeft="true"/>
-
- <EditText
- android:id="@+id/et_show_image"
- android:layout_below="@+id/spin_textAlignment"
- android:layout_toRightOf="@+id/check_enable_image"
- android:layout_alignParentRight="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapSentences"
- android:enabled="false"
- android:hint="@string/sdl_image_name" />
-
- </RelativeLayout>
-
-</ScrollView>
diff --git a/SDL_Android/LivioTesterApp/res/layout/slider.xml b/SDL_Android/LivioTesterApp/res/layout/slider.xml
deleted file mode 100644
index 93dcd6bdf..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/slider.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="vertical"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
-
- <EditText android:id="@+id/et_slider_title"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/slider_title"/>
-
- <EditText android:id="@+id/et_slider_footer"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:freezesText="true"
- android:inputType="textCapWords"
- android:hint="@string/slider_footer"/>
-
- <TextView android:id="@+id/tv_slider_numOfTicks"
- style="@style/small_header_text"
- android:text="@string/slider_ticks"/>
-
- <SeekBar android:id="@+id/seek_slider_numOfTicks"
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:max="24"
- android:progress="0"
- />
-
- <TextView android:id="@+id/tv_slider_startPosition"
- style="@style/small_header_text"
- android:text="@string/slider_start_position"/>
-
- <SeekBar android:id="@+id/seek_slider_startPosition"
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:max="25"
- android:progress="0"
- />
-
- <TextView android:id="@+id/tv_slider_timeout"
- style="@style/small_header_text"
- android:text="@string/timeout"/>
-
- <SeekBar android:id="@+id/seek_slider_timeout"
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:max="64"
- android:progress="10"
- />
-
-</LinearLayout>
diff --git a/SDL_Android/LivioTesterApp/res/layout/speak.xml b/SDL_Android/LivioTesterApp/res/layout/speak.xml
deleted file mode 100644
index 307603f2e..000000000
--- a/SDL_Android/LivioTesterApp/res/layout/speak.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
-
- <EditText
- android:id="@+id/et_textToSpeak"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:singleLine="true"
- android:hint="@string/text_to_speak">
-
- <requestFocus />
- </EditText>
-
- <Spinner
- android:id="@+id/spin_speechCapabilities"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/SDL_Android/LivioTesterApp/res/menu/menu_help.xml b/SDL_Android/LivioTesterApp/res/menu/menu_help.xml
deleted file mode 100644
index cbc4e94b9..000000000
--- a/SDL_Android/LivioTesterApp/res/menu/menu_help.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/menu_help_home" android:title="@string/menu_help_home"></item>
- <item android:id="@+id/menu_help_close" android:title="@string/menu_help_close"></item>
-
-</menu>
diff --git a/SDL_Android/LivioTesterApp/res/menu/menu_main.xml b/SDL_Android/LivioTesterApp/res/menu/menu_main.xml
deleted file mode 100644
index 1bd82b6e4..000000000
--- a/SDL_Android/LivioTesterApp/res/menu/menu_main.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/menu_connect" android:title="@string/menu_connect"></item>
- <item android:id="@+id/menu_disconnect" android:title="@string/menu_disconnect"></item>
- <item android:id="@+id/menu_reset" android:title="@string/menu_reset"></item>
- <item android:id="@+id/menu_clear_list" android:title="@string/menu_clear_list"></item>
- <item android:id="@+id/menu_help" android:title="@string/menu_help"></item>
-
-</menu>
diff --git a/SDL_Android/LivioTesterApp/res/values-sw600dp/dimens.xml b/SDL_Android/LivioTesterApp/res/values-sw600dp/dimens.xml
deleted file mode 100644
index 44f01db75..000000000
--- a/SDL_Android/LivioTesterApp/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<resources>
-
- <!--
- Customize dimensions originally defined in res/values/dimens.xml (such as
- screen margins) for sw600dp devices (e.g. 7" tablets) here.
- -->
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/res/values-sw720dp-land/dimens.xml b/SDL_Android/LivioTesterApp/res/values-sw720dp-land/dimens.xml
deleted file mode 100644
index 61e3fa8fb..000000000
--- a/SDL_Android/LivioTesterApp/res/values-sw720dp-land/dimens.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<resources>
-
- <!--
- Customize dimensions originally defined in res/values/dimens.xml (such as
- screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
- -->
- <dimen name="activity_horizontal_margin">128dp</dimen>
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/res/values-v11/styles.xml b/SDL_Android/LivioTesterApp/res/values-v11/styles.xml
deleted file mode 100644
index 3c02242ad..000000000
--- a/SDL_Android/LivioTesterApp/res/values-v11/styles.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<resources>
-
- <!--
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
- <!-- API 11 theme customizations can go here. -->
- </style>
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/res/values-v14/styles.xml b/SDL_Android/LivioTesterApp/res/values-v14/styles.xml
deleted file mode 100644
index a91fd0372..000000000
--- a/SDL_Android/LivioTesterApp/res/values-v14/styles.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<resources>
-
- <!--
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
- <!-- API 14 theme customizations can go here. -->
- </style>
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/res/values/dimens.xml b/SDL_Android/LivioTesterApp/res/values/dimens.xml
deleted file mode 100644
index 55c1e5908..000000000
--- a/SDL_Android/LivioTesterApp/res/values/dimens.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<resources>
-
- <!-- Default screen margins, per the Android Design guidelines. -->
- <dimen name="activity_horizontal_margin">16dp</dimen>
- <dimen name="activity_vertical_margin">16dp</dimen>
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/res/values/strings.xml b/SDL_Android/LivioTesterApp/res/values/strings.xml
deleted file mode 100644
index 8fb1c32df..000000000
--- a/SDL_Android/LivioTesterApp/res/values/strings.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <!-- General Strings -->
- <string name="app_name">Livio SDL Tester</string>
- <string name="no_selection">No selection</string>
- <string name="not_implemented">This feature is not yet implemented.</string>
- <string name="not_an_sdl_command">The input argument is not an SDL command.</string>
-
- <!-- Menu Strings -->
- <string name="menu_connect">Connect to SDL</string>
- <string name="menu_disconnect">Disconnect from SDL</string>
- <string name="menu_reset">Reset SDL Connection</string>
- <string name="menu_clear_list">Clear ListView</string>
- <string name="menu_help">Help</string>
-
- <string name="menu_help_home">Help Home</string>
- <string name="menu_help_close">Close Help</string>
-
- <!-- Dialog Strings -->
- <string name="sdl_command_dialog_title">Select an SDL Command:</string>
-
- <!-- SDL Connection -->
- <string name="connection_status_format">Connection Status:</string>
- <string name="ip_address">IP Address</string>
- <string name="ip_port">IP Port</string>
-
- <!-- Offline Mode -->
- <string name="offline_mode_text">Would you like to enter offline mode?</string>
-
- <!-- Function Banks -->
- <string name="function_bank_root_name">Root-level Menu</string>
-
- <!-- Button Subscriptions -->
- <string name="button_subscriptions_already_subscribed">Already subscribed to all buttons!</string>
- <string name="button_subscriptions_none_subscribed">App hasn\'t subscribed to buttons yet!</string>
-
- <!-- Perform Interaction -->
- <string name="perform_interaction_title">Interaction Title</string>
- <string name="perform_interaction_voice_prompt">Interaction Voice Prompt</string>
- <string name="perform_interaction_select_choice_set">Select Choice Sets</string>
- <string name="perform_interaction_mode">Interaction Mode</string>
- <string name="perform_interaction_timeout">Interaction Timeout (in seconds)</string>
- <string name="perform_interaction_timeout_enabled">Interaction Timeout Enabled</string>
- <string name="interaction_list_none_added">No choice interaction sets have been added yet!</string>
-
- <!-- Put File -->
- <string name="put_file_persistent_file">Persistent File</string>
- <string name="sdl_image_name">SDL Image Name</string>
- <string name="add_image">Add Image</string>
- <string name="title_activity_help">HelpActivity</string>
- <string name="action_settings">Settings</string>
- <string name="hello_world">Hello world!</string>
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/res/values/styles.xml b/SDL_Android/LivioTesterApp/res/values/styles.xml
deleted file mode 100644
index 7f314d2b7..000000000
--- a/SDL_Android/LivioTesterApp/res/values/styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<resources>
-
- <!--
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Light">
- <!--
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
- -->
- </style>
-
- <!-- Application theme. -->
- <style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
- </style>
- <style name="small_header_text">
- <item name="android:layout_width">fill_parent</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:gravity">center</item>
- <item name="android:textStyle">bold</item>
- <item name="android:layout_margin">10dip</item>
- </style>
-
-</resources>
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/HelpActivity.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/HelpActivity.java
deleted file mode 100644
index 3748c90ab..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/HelpActivity.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package com.livio.sdltester;
-
-import java.util.Stack;
-
-import android.app.ActionBar;
-import android.app.Activity;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-import android.widget.Toast;
-
-public class HelpActivity extends Activity {
-
- public static final String EXTRA_ASSET_FILENAME = "com.livio.sdltester.HelpActivity.extraAssetFilename";
-
- private static final String ASSET_URL_FORMAT = "file:///android_asset/help_docs/html/";
- private static final String INDEX_FILENAME = "index.html";
-
- private WebView webView;
- private Stack<String> urlStack;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_help);
-
- ActionBar actionBar = getActionBar();
- if(actionBar != null){
- actionBar.setTitle("SDL Help");
- }
-
- urlStack = new Stack<String>();
-
- webView = (WebView) findViewById(R.id.wv_help);
- webView.setWebViewClient(new WebViewClient(){
- @Override
- public void onPageStarted(WebView view, String url, Bitmap favicon) {
- super.onPageStarted(view, url, favicon);
- urlStack.push(url);
- }
-
- @Override
- public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
- Toast.makeText(HelpActivity.this, "An error occurred.", Toast.LENGTH_LONG).show();
-
- // the current URL didn't work, so remove it from the url stack
- urlStack.pop();
- }
-
- });
-
- Intent incomingIntent = getIntent();
- if(incomingIntent.hasExtra(EXTRA_ASSET_FILENAME)){
- String fileName = incomingIntent.getStringExtra(EXTRA_ASSET_FILENAME);
- if(fileName != null && fileName.length() > 0){
- navigateToFileName(fileName);
- }
- else{
- navigateToIndex();
- }
- }
- else{
- navigateToIndex();
- }
- }
-
- private void navigateToFileName(String fileName){
- webView.loadUrl(makeUrl(fileName));
- }
-
- private void navigateToIndex(){
- webView.loadUrl(makeUrl(INDEX_FILENAME));
- }
-
- @Override
- public void onBackPressed() {
- if(urlStack == null || urlStack.size() <= 1){
- // if something went awry with the stack or if we're back at index when back is pressed, we'll just finish the activity
- finish();
- }
- else{
- // since we are going back, we don't need the current URL anymore
- urlStack.pop();
-
- // retrieve the last-visited page (it will be added back to the stack automatically when the page loads)
- String urlToLoad = urlStack.pop();
- webView.loadUrl(urlToLoad);
- }
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.menu_help, menu);
- return true;
- }
-
- @Override
- public boolean onPrepareOptionsMenu(Menu menu) {
- android.view.MenuItem helpHome = (android.view.MenuItem) menu.findItem(R.id.menu_help_home);
-
- // show/hide connect/disconnect menu items
- boolean atIndex = (urlStack == null || urlStack.size() <= 1);
- helpHome.setVisible(!atIndex); // if we're not at the index, show the home button
-
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(android.view.MenuItem item) {
- int menuItemId = item.getItemId();
- switch(menuItemId){
- case R.id.menu_help_home:
- urlStack.clear();
- navigateToIndex();
- return true;
- case R.id.menu_help_close:
- finish();
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
- private static String makeUrl(String fileName){
- return new StringBuilder().append(ASSET_URL_FORMAT).append(fileName).toString();
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/LivioSdlTesterPreferences.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/LivioSdlTesterPreferences.java
deleted file mode 100644
index 6a3add0cf..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/LivioSdlTesterPreferences.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.livio.sdltester;
-
-import android.content.Context;
-
-import com.livio.sdl.utils.ApplicationPreferences;
-
-/**
- * A static, uninstantiable class that allows saving application-specific information to
- * Android's SharedPreferences. This class is a wrapper around ApplicationPreferences,
- * allowing specific method names for the various types of data that need to be saved
- * as part of this application.
- *
- * @see ApplicationPreferences
- *
- * @author Mike Burke
- *
- */
-public final class LivioSdlTesterPreferences {
-
- private LivioSdlTesterPreferences(){}
-
- private static final String FILENAME = "com.livio.sdltester";
-
- private static final class Keys{
- public static final String IP_ADDRESS = "ip_address";
- public static final String TCP_PORT = "tcp_port";
- }
-
- /**
- * Looks up the IP_ADDRESS key in Android SharedPreferences and returns the
- * IP address if it's found.
- *
- * @param context Context to use for SharedPreferences
- * @return The IP address string if it was found, null otherwise
- */
- public static String restoreIpAddress(Context context){
- if(ApplicationPreferences.exists(context, FILENAME, Keys.IP_ADDRESS)){
- return ApplicationPreferences.getString(context, FILENAME, Keys.IP_ADDRESS);
- }
-
- return null;
- }
-
- /**
- * Saves the input IP address to Android SharedPreferences.
- *
- * @param context Context to use for SharedPreferences
- * @param value The IP address string to save
- */
- public static void saveIpAddress(Context context, String value){
- ApplicationPreferences.putString(context, FILENAME, Keys.IP_ADDRESS, value);
- }
-
- /**
- * Looks up the TCP_PORT key in Android SharedPreferences and returns the
- * TCP port if it's found.
- *
- * @param context Context to use for SharedPreferences
- * @param value The TCP port string if it was found, null otherwise
- */
- public static String restoreTcpPort(Context context){
- if(ApplicationPreferences.exists(context, FILENAME, Keys.TCP_PORT)){
- return ApplicationPreferences.getString(context, FILENAME, Keys.TCP_PORT);
- }
-
- return null;
- }
-
- /**
- * Saves the input TCP port to Android SharedPreferences.
- *
- * @param context Context to use for SharedPreferences
- * @param value The TCP port string to save
- */
- public static void saveTcpPort(Context context, String value){
- ApplicationPreferences.putString(context, FILENAME, Keys.TCP_PORT, value);
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/MainActivity.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/MainActivity.java
deleted file mode 100644
index 0e35a27e6..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/MainActivity.java
+++ /dev/null
@@ -1,1276 +0,0 @@
-package com.livio.sdltester;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import android.annotation.SuppressLint;
-import android.app.Activity;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.RemoteException;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.livio.sdl.IpAddress;
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlImageItem.SdlImageItemComparator;
-import com.livio.sdl.SdlLogMessage;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.SdlService;
-import com.livio.sdl.adapters.SdlMessageAdapter;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.IndeterminateProgressDialog;
-import com.livio.sdl.dialogs.JsonFlipperDialog;
-import com.livio.sdl.dialogs.ListViewDialog;
-import com.livio.sdl.enums.EnumComparator;
-import com.livio.sdl.enums.SdlButton;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.menu.MenuItem;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdl.utils.Timeout;
-import com.livio.sdl.utils.WifiUtils;
-import com.livio.sdltester.dialogs.AddCommandDialog;
-import com.livio.sdltester.dialogs.AddSubMenuDialog;
-import com.livio.sdltester.dialogs.ButtonSubscriptionDialog;
-import com.livio.sdltester.dialogs.ButtonUnsubscriptionDialog;
-import com.livio.sdltester.dialogs.ChangeRegistrationDialog;
-import com.livio.sdltester.dialogs.CreateInteractionChoiceSetDialog;
-import com.livio.sdltester.dialogs.DeleteCommandDialog;
-import com.livio.sdltester.dialogs.DeleteFileDialog;
-import com.livio.sdltester.dialogs.DeleteInteractionDialog;
-import com.livio.sdltester.dialogs.DeleteSubmenuDialog;
-import com.livio.sdltester.dialogs.GetDtcsDialog;
-import com.livio.sdltester.dialogs.PerformInteractionDialog;
-import com.livio.sdltester.dialogs.PutFileDialog;
-import com.livio.sdltester.dialogs.ReadDidsDialog;
-import com.livio.sdltester.dialogs.ScrollableMessageDialog;
-import com.livio.sdltester.dialogs.SdlAlertDialog;
-import com.livio.sdltester.dialogs.SdlConnectionDialog;
-import com.livio.sdltester.dialogs.SetAppIconDialog;
-import com.livio.sdltester.dialogs.SetMediaClockTimerDialog;
-import com.livio.sdltester.dialogs.ShowDialog;
-import com.livio.sdltester.dialogs.SliderDialog;
-import com.livio.sdltester.dialogs.SpeakDialog;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.ListFiles;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-
-
-public class MainActivity extends Activity{
- /**
- * Used when requesting information from the SDL service, these constants can be used
- * to perform different tasks when the information is asynchronously returned by the service.
- *
- * @author Mike Burke
- *
- */
- private static final class ResultCodes{
- private static final class SubmenuResult{
- private static final int ADD_COMMAND_DIALOG = 0;
- private static final int DELETE_SUBMENU_DIALOG = 1;
- }
- private static final class CommandResult{
- private static final int DELETE_COMMAND_DIALOG = 0;
- }
- private static final class ButtonSubscriptionResult{
- private static final int BUTTON_SUBSCRIBE = 0;
- private static final int BUTTON_UNSUBSCRIBE = 1;
- }
- private static final class InteractionSetResult{
- private static final int PERFORM_INTERACTION = 0;
- private static final int DELETE_INTERACTION_SET = 1;
- }
- private static final class PutFileResult{
- private static final int PUT_FILE = 0;
- private static final int ADD_COMMAND = 1;
- private static final int CHOICE_INTERACTION_SET = 2;
- private static final int DELETE_FILE = 3;
- private static final int SET_APP_ICON = 4;
- private static final int SHOW = 5;
- }
- }
-
- private static enum ConnectionStatus{
- CONNECTED("Connected"),
- OFFLINE_MODE("Offline Mode"),
- ;
-
- private final String friendlyName;
- private ConnectionStatus(String friendlyName){
- this.friendlyName = friendlyName;
- }
-
- @Override
- public String toString(){
- return friendlyName;
- }
- }
-
- private static final int CONNECTING_DIALOG_TIMEOUT = 10000; // duration to attempt a connection (10s)
-
- private String connectionStatusFormat;
-
- private ListView lv_messageLog;
- private TextView tv_connectionStatus;
- private SdlMessageAdapter listViewAdapter;
-
- /* Messenger for communicating with service. */
- private Messenger serviceMsgr = null;
-
- private boolean isBound = false;
-
- private BaseAlertDialog connectionDialog;
- private IndeterminateProgressDialog connectingDialog;
- private Timeout connectionTimeout;
-
- // cache for all images available to send to SDL service
- private HashMap<String, SdlImageItem> imageCache;
- private List<MenuItem> submenuCache = null;
-
- private List<SdlCommand> commandList = null;
-
- /*
- * Target we publish for clients to send messages to IncomingHandler.
- */
- final Messenger mMessenger = new Messenger(new IncomingHandler());
-
- @SuppressLint("HandlerLeak")
- private class IncomingHandler extends Handler{
- @SuppressWarnings("unchecked")
- @Override
- public void handleMessage(Message msg) {
- // see SdlService.java in the com.livio.sdl package for details on these incoming messages
-
- switch(msg.what){
- case SdlService.ClientMessages.SDL_CONNECTED:
- updateConnectionStatus(ConnectionStatus.CONNECTED);
-
- // clear the command log since we're starting fresh from here
- clearSdlLog();
-
- // dismiss the connecting dialog if it's showing
- if(connectingDialog != null && connectingDialog.isShowing()){
- connectingDialog.dismiss();
- }
- if(connectionTimeout != null){
- connectionTimeout.cancel();
- }
-
- // set up the app icon once we're connected
- setAppIcon();
- break;
- case SdlService.ClientMessages.SDL_DISCONNECTED:
- resetService();
- updateConnectionStatus(ConnectionStatus.OFFLINE_MODE);
- clearSdlLog();
- break;
- case SdlService.ClientMessages.SDL_HMI_FIRST_DISPLAYED:
- setInitialHmi();
- break;
- case SdlService.ClientMessages.ON_MESSAGE_RESULT:
- onMessageResponseReceived((RPCMessage) msg.obj);
- break;
- case SdlService.ClientMessages.SUBMENU_LIST_RECEIVED:
- onSubmenuListReceived((List<MenuItem>) msg.obj, msg.arg1);
- break;
- case SdlService.ClientMessages.COMMAND_LIST_RECEIVED:
- onCommandListReceived((List<MenuItem>) msg.obj, msg.arg1);
- break;
- case SdlService.ClientMessages.BUTTON_SUBSCRIPTIONS_RECEIVED:
- onButtonSubscriptionsReceived((List<SdlButton>) msg.obj, msg.arg1);
- break;
- case SdlService.ClientMessages.INTERACTION_SETS_RECEIVED:
- onInteractionListReceived((List<MenuItem>) msg.obj, msg.arg1);
- break;
- case SdlService.ClientMessages.PUT_FILES_RECEIVED:
- onPutFileListReceived((List<String>) msg.obj, msg.arg1);
- break;
- default:
- break;
- }
- super.handleMessage(msg);
- }
- }
-
- /**
- * Sends the input message to the SDL service through the service messenger.
- *
- * @param msg The message to send
- */
- private void sendMessageToService(Message msg){
- try {
- serviceMsgr.send(msg);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Sends an RPCRequest to the SDL service through the service messenger and adds the request to the list view.
- *
- * @param request The request to send
- */
- private void sendSdlMessageToService(RPCRequest request){
- Message msg = Message.obtain(null, SdlService.ServiceMessages.SEND_MESSAGE);
- msg.obj = request;
- sendMessageToService(msg);
- }
-
- /**
- * Sends a request for the most up-to-date submenu list with a request code so this activity knows
- * what to do when the response comes back.
- *
- * @param reqCode The request code to associate with the request
- */
- private void sendSubmenuListRequest(int reqCode){
- Message msg = Message.obtain(null, SdlService.ServiceMessages.REQUEST_SUBMENU_LIST);
- msg.replyTo = mMessenger;
- msg.arg1 = reqCode;
- sendMessageToService(msg);
- }
-
- /**
- * Sends a request for the most up-to-date command list with a request code so this activity knows
- * what to do when the response comes back.
- *
- * @param reqCode The request code to associate with the request
- */
- private void sendCommandListRequest(int reqCode){
- Message msg = Message.obtain(null, SdlService.ServiceMessages.REQUEST_COMMAND_LIST);
- msg.replyTo = mMessenger;
- msg.arg1 = reqCode;
- sendMessageToService(msg);
- }
-
- /**
- * Sends a request for the most up-to-date list of button subscriptions with a request code so this
- * activity knows what to do when the response comes back.
- *
- * @param reqCode The request code to associate with the request
- */
- private void sendButtonSubscriptionRequest(int reqCode){
- Message msg = Message.obtain(null, SdlService.ServiceMessages.REQUEST_BUTTON_SUBSCRIPTIONS);
- msg.replyTo = mMessenger;
- msg.arg1 = reqCode;
- sendMessageToService(msg);
- }
-
- /**
- * Sends a request for the most up-to-date list of button subscriptions with a request code so this
- * activity knows what to do when the response comes back.
- *
- * @param reqCode The request code to associate with the request
- */
- private void sendInteractionSetRequest(int reqCode){
- Message msg = Message.obtain(null, SdlService.ServiceMessages.REQUEST_INTERACTION_SETS);
- msg.replyTo = mMessenger;
- msg.arg1 = reqCode;
- sendMessageToService(msg);
- }
-
- /**
- * Sends a request for the most up-to-date list of images added so far with a request code so this
- * activity knows what to do when the response comes back.
- *
- * @param reqCode The request code to associate with the request
- */
- private void sendPutFileRequest(int reqCode){
- Message msg = Message.obtain(null, SdlService.ServiceMessages.REQUEST_PUT_FILES);
- msg.replyTo = mMessenger;
- msg.arg1 = reqCode;
- sendMessageToService(msg);
- }
-
- /**
- * Resets the SDL service.
- */
- private void resetService(){
- Intent sdlService = new Intent(MainActivity.this, SdlService.class);
- stopService(sdlService);
- startService(sdlService);
- }
-
- /**
- * Adds the input RPCMessage to the list view.
- *
- * @param request The message to log
- */
- private void logSdlMessage(RPCMessage request){
- listViewAdapter.add(new SdlLogMessage(request));
- listViewAdapter.notifyDataSetChanged();
-
- // after adding a new item, auto-scroll to the bottom of the list
- lv_messageLog.setSelection(listViewAdapter.getCount() - 1);
- }
-
- private void clearSdlLog(){
- listViewAdapter.clear();
- listViewAdapter.notifyDataSetChanged();
- }
-
- /*
- * Sets up the App's icon using PutFile & SetAppIcon commands
- */
- private void setAppIcon(){
- // first, let's send our app icon image through the PutFile command
- SdlTesterImageResource appIcon = SdlTesterImageResource.IC_APP_ICON;
- String appIconName = appIcon.toString();
- FileType appIconFileType = appIcon.getFileType();
- Bitmap appIconBitmap = imageCache.get(appIconName).getBitmap();
- // create the image as raw bytes to send over
- byte[] appIconBytes = AndroidUtils.bitmapToRawBytes(appIconBitmap, Bitmap.CompressFormat.PNG);
-
- // create & send the PutFile command
- RPCRequest putFileMsg = SdlRequestFactory.putFile(appIconName, appIconFileType, false, appIconBytes);
- sendSdlMessageToService(putFileMsg);
-
- // create & send the SetAppIcon command
- RPCRequest setAppIconMsg = SdlRequestFactory.setAppIcon(appIconName);
- sendSdlMessageToService(setAppIconMsg);
- }
-
- /*
- * Sets up the initial HMI through the Show command.
- */
- private void setInitialHmi(){
- // set up the main lines of text
- String showText1 = "Livio SDL Tester";
- String showText2 = "Send SDL Commands";
- String showText3 = " ";
- // showText4 is not applicable since this is set up as a media application
-
- // set up the image to show
- String appIconName = SdlTesterImageResource.IC_APP_ICON.toString();
-
- // create & send the Show command
- RPCRequest showMsg = SdlRequestFactory.show(showText1, showText2, showText3, null, null, TextAlignment.LEFT_ALIGNED, appIconName);
- sendSdlMessageToService(showMsg);
-
- // since this is a media app, we have to clear out the 4th line of text through the SetMediaClockTimer command
- RPCRequest clockMsg = SdlRequestFactory.setMediaClockTimer(UpdateMode.CLEAR);
- sendSdlMessageToService(clockMsg);
- }
-
- /*
- * Class for interacting with the main interface of the service.
- */
- private final ServiceConnection mConnection = new ServiceConnection() {
- public void onServiceConnected(ComponentName className, IBinder service) {
- serviceMsgr = new Messenger(service);
-
- Message msg = Message.obtain(null, SdlService.ServiceMessages.REGISTER_CLIENT);
- msg.replyTo = mMessenger;
- sendMessageToService(msg);
- }
-
- public void onServiceDisconnected(ComponentName className) {
- // process crashed - make sure nobody can use messenger instance.
- serviceMsgr = null;
- }
- };
-
- /**
- * Binds this activity to the SDL service, using the service connection as a messenger between the two.
- */
- private void doBindService() {
- if(!isBound){
- bindService(new Intent(MainActivity.this, SdlService.class), mConnection, Context.BIND_AUTO_CREATE);
- isBound = true;
- }
- }
-
- /**
- * Unbinds this activity from the SDL service.
- */
- private void doUnbindService() {
- if (isBound) {
- if (serviceMsgr != null) {
- Message msg = Message.obtain(null, SdlService.ServiceMessages.UNREGISTER_CLIENT);
- msg.replyTo = mMessenger;
- sendMessageToService(msg);
- }
-
- // Detach our existing connection.
- unbindService(mConnection);
- stopService(new Intent(MainActivity.this, SdlService.class));
- isBound = false;
- }
- }
-
- /* ********** Android Life-Cycle ********** */
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- SdlService.setDebug(true);
-
- createImageCache();
- init();
- doBindService();
- showSdlConnectionDialog();
- }
-
- // create an image cache for the images that are available to send to the head-unit. this allows easy image look-up
- // based on the filename of the image. We'll do this on a thread since processing images can be CPU intensive.
- private void createImageCache(){
- new Thread(new Runnable() {
- @Override
- public void run() {
- // grab information from the image resources enum
- SdlTesterImageResource[] values = SdlTesterImageResource.values();
- imageCache = new HashMap<String, SdlImageItem>(values.length);
-
- for(SdlTesterImageResource img : values){
- // create an SdlImageItem object for each image
- Bitmap bitmap = BitmapFactory.decodeResource(getResources(), img.getImageId());
- String imageName = img.toString();
- FileType imageType = img.getFileType();
- SdlImageItem item = new SdlImageItem(bitmap, imageName, imageType);
-
- // map the image name to its associated SdlImageItem object
- imageCache.put(imageName, item);
- }
- }
- }).start();
- }
-
- // initializes views in the main activity
- private void init(){
- // set up the "Send Message" button
- findViewById(R.id.btn_main_sendMessage).setOnClickListener(
- new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Context context = MainActivity.this;
- String dialogTitle = context.getResources().getString(R.string.sdl_command_dialog_title);
-
- // lazily instantiate the list of commands in alphabetical order
- if(commandList == null){
- // grab the command list and sort the commands by name
- commandList = Arrays.asList(SdlCommand.values());
- Collections.sort(commandList, new EnumComparator<SdlCommand>());
- }
-
- // show the dialog with the commandList we created above
- BaseAlertDialog commandDialog = new ListViewDialog<SdlCommand>(context, dialogTitle, commandList);
- commandDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- // when a list item is clicked, dispatch the click to the showCommandDialog method
- showCommandDialog((SdlCommand) resultData);
- }
- });
- commandDialog.show();
- }
- });
-
- // set up the command log
- lv_messageLog = (ListView) findViewById(R.id.list_main_commandList);
- listViewAdapter = new SdlMessageAdapter(this);
- lv_messageLog.setAdapter(listViewAdapter);
- lv_messageLog.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- // when an item is clicked, show it in the JSON flipper dialog.
- // first, we must copy over all the messages that have been created so far.
- int size = listViewAdapter.getCount();
- List<SdlLogMessage> allLogs = new ArrayList<SdlLogMessage>(size);
- for(int i=0; i<size; i++){
- allLogs.add(listViewAdapter.getItem(i));
- }
-
- BaseAlertDialog jsonDialog = new JsonFlipperDialog(MainActivity.this, allLogs, position);
- jsonDialog.show();
- }
- });
-
- tv_connectionStatus = (TextView) findViewById(R.id.tv_connectionStatus);
- }
-
- // updates the connection status TextView
- private void updateConnectionStatus(ConnectionStatus status){
- if(connectionStatusFormat == null){
- connectionStatusFormat = getResources().getString(R.string.connection_status_format);
- }
-
- if(status == ConnectionStatus.OFFLINE_MODE){
- sendMessageToService(Message.obtain(null, SdlService.ServiceMessages.OFFLINE_MODE));
- }
-
- String text = new StringBuilder().append(connectionStatusFormat).append(" ").append(status.toString()).toString();
- tv_connectionStatus.setText(text);
- }
-
- @Override
- protected void onResume() {
- // enable wifi if it isn't already enabled.
- if(!AndroidUtils.wifiIsEnabled(this)){
- Toast.makeText(this, "Enabling wifi", Toast.LENGTH_LONG).show();
- AndroidUtils.enableWifi(this, true);
- }
-
- super.onResume();
- }
-
- @Override
- protected void onDestroy() {
- sendMessageToService(Message.obtain(null, SdlService.ServiceMessages.DISCONNECT));
- doUnbindService();
- super.onDestroy();
- }
-
- /**
- * Called when a message has been received from the head-unit.
- *
- * @param response The response that was received
- */
- private void onMessageResponseReceived(RPCMessage response){
- logSdlMessage(response);
- }
-
- /**
- * Called when the up-to-date list of submenus is received. The request code can be used
- * to perform different operations based on the request code that is sent with the initial request.
- *
- * @param submenuList The list of submenu items
- * @param reqCode The request code that was sent with the request
- */
- private void onSubmenuListReceived(List<MenuItem> submenuList, int reqCode){
- Collections.sort(submenuList, new MenuItem.NameComparator()); // sort submenu list by name. you can also sort by id with the MenuItem.IdComparator object
-
- switch(reqCode){
- case ResultCodes.SubmenuResult.ADD_COMMAND_DIALOG:
- submenuCache = submenuList;
- sendPutFileRequest(ResultCodes.PutFileResult.ADD_COMMAND);
- break;
- case ResultCodes.SubmenuResult.DELETE_SUBMENU_DIALOG:
- if(submenuList.size() > 0){
- createDeleteSubmenuDialog(submenuList);
- }
- else{
- Toast.makeText(MainActivity.this, getResources().getString(R.string.no_submenus_to_delete), Toast.LENGTH_SHORT).show();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * Called when the up-to-date list of commands is received. The request code can be used
- * to perform different operations based on the request code that is sent with the initial request.
- *
- * @param commandList The list of command items
- * @param reqCode The request code that was sent with the request
- */
- private void onCommandListReceived(List<MenuItem> commandList, int reqCode){
- Collections.sort(commandList, new MenuItem.NameComparator()); // sort command list by name
- switch(reqCode){
- case ResultCodes.CommandResult.DELETE_COMMAND_DIALOG:
- if(commandList.size() > 0){
- createDeleteCommandDialog(commandList);
- }
- else{
- Toast.makeText(MainActivity.this, getResources().getString(R.string.no_commands_to_delete), Toast.LENGTH_SHORT).show();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * Called when the up-to-date list of button subscriptions is received. The request code can be used
- * to perform different operations based on the request code that is sent with the initial request.
- *
- * @param buttonSubscriptionList The list of button subscriptions
- * @param reqCode The request code that was sent with the request
- */
- private void onButtonSubscriptionsReceived(List<SdlButton> buttonSubscriptionList, int reqCode){
- switch(reqCode){
- case ResultCodes.ButtonSubscriptionResult.BUTTON_SUBSCRIBE:
- if(buttonSubscriptionList.size() == SdlButton.values().length){
- Toast.makeText(MainActivity.this, getResources().getString(R.string.button_subscriptions_already_subscribed), Toast.LENGTH_LONG).show();
- }
- else{
- List<SdlButton> buttonsNotSubscribedTo = filterSubscribedButtons(buttonSubscriptionList);
- Collections.sort(buttonsNotSubscribedTo, new EnumComparator<SdlButton>());
- createButtonSubscribeDialog(buttonsNotSubscribedTo);
- }
- break;
- case ResultCodes.ButtonSubscriptionResult.BUTTON_UNSUBSCRIBE:
- if(buttonSubscriptionList.size() == 0){
- Toast.makeText(MainActivity.this, getResources().getString(R.string.button_subscriptions_none_subscribed), Toast.LENGTH_LONG).show();
- }
- else{
- Collections.sort(buttonSubscriptionList, new EnumComparator<SdlButton>());
- createButtonUnsubscribeDialog(buttonSubscriptionList);
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * Called when the up-to-date list of interaction sets is received. The request code can be used
- * to perform different operations based on the request code that is sent with the initial request.
- *
- * @param interactionSetList The list of interaction sets
- * @param reqCode The request code that was sent with the request
- */
- private void onInteractionListReceived(List<MenuItem> interactionSetList, int reqCode){
- switch(reqCode){
- case ResultCodes.InteractionSetResult.PERFORM_INTERACTION:
- if(interactionSetList.size() == 0){
- Toast.makeText(MainActivity.this, getResources().getString(R.string.interaction_list_none_added), Toast.LENGTH_LONG).show();
- }
- else{
- Collections.sort(interactionSetList, new MenuItem.IdComparator());
- createPerformInteractionDialog(interactionSetList);
- }
- break;
- case ResultCodes.InteractionSetResult.DELETE_INTERACTION_SET:
- if(interactionSetList.size() == 0){
- Toast.makeText(MainActivity.this, getResources().getString(R.string.interaction_list_none_added), Toast.LENGTH_LONG).show();
- }
- else{
- Collections.sort(interactionSetList, new MenuItem.IdComparator());
- createDeleteInteractionDialog(interactionSetList);
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * Called when the up-to-date list of put file images have been received. The request code can be used
- * to perform different operations based on the request code that is sent with the initial request.
- *
- * @param putFileList The list of put file image names
- * @param reqCode The request code that was sent with the request
- */
- private void onPutFileListReceived(List<String> putFileList, int reqCode){
- List<SdlImageItem> availableItems;
-
- switch(reqCode){
- case ResultCodes.PutFileResult.PUT_FILE:
- availableItems = filterAddedItems(putFileList);
-
- if(availableItems.size() > 0){
- createPutFileDialog(availableItems);
- }
- else{
- Toast.makeText(this, "All images have been added!", Toast.LENGTH_LONG).show();
- }
- break;
- case ResultCodes.PutFileResult.DELETE_FILE:
- availableItems = filterUnaddedItems(putFileList);
-
- if(availableItems.size() > 0){
- createDeleteFileDialog(availableItems);
- }
- else{
- Toast.makeText(this, "No images have been added!", Toast.LENGTH_LONG).show();
- }
- break;
- case ResultCodes.PutFileResult.SET_APP_ICON:
- availableItems = filterUnaddedItems(putFileList);
-
- if(availableItems.size() > 0){
- createSetAppIconDialog(availableItems);
- }
- else{
- Toast.makeText(this, "No images have been added!", Toast.LENGTH_LONG).show();
- }
- break;
- case ResultCodes.PutFileResult.ADD_COMMAND:
- availableItems = filterUnaddedItems(putFileList);
- createAddCommandDialog(submenuCache, availableItems);
- break;
- case ResultCodes.PutFileResult.SHOW:
- availableItems = filterUnaddedItems(putFileList);
- createShowDialog(availableItems);
- break;
- case ResultCodes.PutFileResult.CHOICE_INTERACTION_SET:
- availableItems = filterUnaddedItems(putFileList);
- createInteractionChoiceSetDialog(availableItems);
- break;
- default:
- break;
- }
- }
-
- /**
- * Filters out any images that have already been added through the PutFile command.
- *
- * @param putFileList The list of images that have been added through the PutFile command
- * @return The list of images that have <b>not</b> been added through the PutFile command
- */
- private List<SdlImageItem> filterAddedItems(List<String> putFileList){
- int itemsInFilteredList = imageCache.size() - putFileList.size();
- if(itemsInFilteredList == 0){
- return Collections.emptyList();
- }
-
- // first, we'll grab all image cache keys (aka image names) into a copy
- Set<String> cacheKeys = new TreeSet<String>(imageCache.keySet());
- // then, we'll remove all images that have been added
- cacheKeys.removeAll(putFileList);
-
-
- List<SdlImageItem> result = new ArrayList<SdlImageItem>(itemsInFilteredList);
-
- // now, we'll loop through the remaining image names and create a list from them
- for(String name : cacheKeys){
- result.add(imageCache.get(name));
- }
-
- Collections.sort(result, new SdlImageItemComparator());
-
- return result;
- }
-
- /**
- * Filters out any images that have <b>not</b> been added through the PutFile command.
- *
- * @param putFileList The list of images that have been added through the PutFile command
- * @return The list of images that have been added through the PutFile command
- */
- private List<SdlImageItem> filterUnaddedItems(List<String> putFileList){
- List<SdlImageItem> result = new ArrayList<SdlImageItem>(putFileList.size());
- for(String name : putFileList){
- result.add(imageCache.get(name));
- }
-
- Collections.sort(result, new SdlImageItemComparator());
- return result;
- }
-
- /**
- * Finds any buttons that are <b>not</b> in the input list of button subscriptions
- * and adds them to the listview adapter.
- *
- * @param buttonSubscriptions A list of buttons that have been subscribed to
- */
- private List<SdlButton> filterSubscribedButtons(List<SdlButton> buttonSubscriptions){
- final SdlButton[] buttonValues = SdlButton.values();
- final int numItems = buttonValues.length - buttonSubscriptions.size();
- List<SdlButton> result = new ArrayList<SdlButton>(numItems);
-
- for(SdlButton button : buttonValues){
- if(!buttonSubscriptions.contains(button)){
- result.add(button);
- }
- }
-
- return result;
- }
-
- /**
- * Shows the SDL connection dialog, which allows the user to enter the IP address for the core component they would like to connect to.
- */
- private void showSdlConnectionDialog(){
- // restore any old IP address from preferences
- String savedIpAddress = LivioSdlTesterPreferences.restoreIpAddress(MainActivity.this);
- String savedTcpPort = LivioSdlTesterPreferences.restoreTcpPort(MainActivity.this);
-
- if(savedIpAddress != null && savedTcpPort != null){
- // if there was an old IP stored in preferences, initialize the dialog with those values
- connectionDialog = new SdlConnectionDialog(this, savedIpAddress, savedTcpPort);
- }
- else{
- // if no IP address was in preferences, initialize the dialog with no input strings
- connectionDialog = new SdlConnectionDialog(this, "", "12345");
- }
-
- // set us up the dialog
- connectionDialog.setCancelable(false);
- connectionDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- IpAddress result = (IpAddress) resultData;
- if(result == null){
- updateConnectionStatus(ConnectionStatus.OFFLINE_MODE);
- return;
- }
-
- String addressString = result.getIpAddress();
- String portString = result.getTcpPort();
-
- boolean ipAddressValid = WifiUtils.validateIpAddress(addressString);
- boolean ipPortValid = WifiUtils.validateTcpPort(portString);
-
- if(ipAddressValid && ipPortValid){
- // if the user entered valid IP settings, save them to preferences so they don't have to re-enter them next time
- LivioSdlTesterPreferences.saveIpAddress(MainActivity.this, addressString);
- LivioSdlTesterPreferences.saveTcpPort(MainActivity.this, portString);
-
- // show an indeterminate connecting dialog
- connectingDialog = new IndeterminateProgressDialog(MainActivity.this, "Connecting");
- connectingDialog.show();
-
- // and start a timeout thread in case the connection isn't successful
- if(connectionTimeout == null){
- connectionTimeout = new Timeout(CONNECTING_DIALOG_TIMEOUT, new Timeout.Listener() {
- @Override public void onTimeoutCancelled() {}
-
- @Override
- public void onTimeoutCompleted() {
- if(connectingDialog != null && connectingDialog.isShowing()){
- // if we made it here without being interrupted, the connection was unsuccessful - dismiss the dialog and enter offline mode
- connectingDialog.dismiss();
- }
-
- Toast.makeText(MainActivity.this, "Connection timed out", Toast.LENGTH_SHORT).show();
- sendMessageToService(Message.obtain(null, SdlService.ServiceMessages.OFFLINE_MODE));
- updateConnectionStatus(ConnectionStatus.OFFLINE_MODE);
- }
- });
- }
- connectionTimeout.start();
-
- // message the SDL service, telling it to attempt a connection with the input IP address
- Message msg = Message.obtain(null, SdlService.ServiceMessages.CONNECT);
- msg.obj = resultData;
- sendMessageToService(msg);
- }
- else{
- // user input was invalid
- Toast.makeText(MainActivity.this, "Input was invalid - please try again", Toast.LENGTH_SHORT).show();
- showSdlConnectionDialog();
- }
- }
- });
- connectionDialog.show();
- }
-
- /**
- * Launches the appropriate dialog for whichever command item was clicked.
- *
- * @param command The command that was clicked
- */
- private void showCommandDialog(SdlCommand command){
- if(command == null){
- // shouldn't happen, but if an invalid command gets here, let's throw an exception.
- throw new IllegalArgumentException(getResources().getString(R.string.not_an_sdl_command));
- }
-
- switch(command){
- case PUT_FILE:
- // the put file dialog needs a list of images that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onPutFileListReceived().
- sendPutFileRequest(ResultCodes.PutFileResult.PUT_FILE);
- break;
- case DELETE_FILE:
- // the delete file dialog needs a list of images that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onPutFileListReceived().
- sendPutFileRequest(ResultCodes.PutFileResult.DELETE_FILE);
- break;
- case ALERT:
- createAlertDialog();
- break;
- case SPEAK:
- createSpeakDialog();
- break;
- case SHOW:
- // the put file dialog needs a list of images that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onPutFileListReceived().
- sendPutFileRequest(ResultCodes.PutFileResult.SHOW);
- break;
- case SUBSCRIBE_BUTTON:
- // the subscribe button dialog needs a list of buttons that have been subscribed to so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onButtonSubscriptionsReceived().
- sendButtonSubscriptionRequest(ResultCodes.ButtonSubscriptionResult.BUTTON_SUBSCRIBE);
- break;
- case UNSUBSCRIBE_BUTTON:
- // the unsubscribe button dialog needs a list of buttons that have been subscribed to so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onButtonSubscriptionsReceived().
- sendButtonSubscriptionRequest(ResultCodes.ButtonSubscriptionResult.BUTTON_UNSUBSCRIBE);
- break;
- case ADD_COMMAND:
- // the add command dialog needs a list of submenus that the command could be added to, so let's request that list here and
- // we'll actually show the dialog when the list gets returned by the service. See onSubmenuListReceived().
- sendSubmenuListRequest(ResultCodes.SubmenuResult.ADD_COMMAND_DIALOG);
- break;
- case DELETE_COMMAND:
- // the delete command dialog needs a list of commands that have been added so far so the user can select which command to delete,
- // so let's request the list here and we'll show the dialog when it's returned by the service. See onCommandListReceived().
- sendCommandListRequest(ResultCodes.CommandResult.DELETE_COMMAND_DIALOG);
- break;
- case ADD_SUBMENU:
- createAddSubmenuDialog();
- break;
- case DELETE_SUB_MENU:
- // the delete submenu dialog needs a list of commands that have been added so far so the user can select which submenu to delete,
- // so let's request the list here and we'll show the dialog when it's returned by the service. See onSubmenuListReceived().
- sendSubmenuListRequest(ResultCodes.SubmenuResult.DELETE_SUBMENU_DIALOG);
- break;
- case CREATE_INTERACTION_CHOICE_SET:
- // the CreateInteractionChoiceSet dialog needs a list of images that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onPutFileListReceived().
- sendPutFileRequest(ResultCodes.PutFileResult.CHOICE_INTERACTION_SET);
- break;
- case PERFORM_INTERACTION:
- // the perform interaction dialog needs a list of interaction sets that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onInteractionListReceived().
- sendInteractionSetRequest(ResultCodes.InteractionSetResult.PERFORM_INTERACTION);
- break;
- case DELETE_INTERACTION_CHOICE_SET:
- // the delete interaction dialog needs a list of interaction sets that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onInteractionListReceived().
- sendInteractionSetRequest(ResultCodes.InteractionSetResult.DELETE_INTERACTION_SET);
- break;
- case CHANGE_REGISTRATION:
- createChangeRegistrationDialog();
- break;
- case GET_DTCS:
- createGetDtcsDialog();
- break;
- case READ_DIDS:
- createReadDidsDialog();
- break;
- case SLIDER:
- createSliderDialog();
- break;
- case SCROLLABLE_MESSAGE:
- createScrollableMessageDialog();
- break;
- case SET_MEDIA_CLOCK_TIMER:
- createSetMediaClockTimerDialog();
- break;
- case LIST_FILES:
- // list files command doesn't accept any parameters, so we can send it directly.
- sendSdlMessageToService(new ListFiles());
- break;
- case SET_APP_ICON:
- // the set app icon dialog needs a list of images that have been added so far, so let's request
- // that list here and we'll actually show the dialog when it gets returned by the service. See onPutFileListReceived().
- sendPutFileRequest(ResultCodes.PutFileResult.SET_APP_ICON);
- break;
- default:
- break;
- }
- }
-
- // listener to be used when receiving a single RPCRequest from a dialog.
- private final BaseAlertDialog.Listener singleMessageListener = new BaseAlertDialog.Listener() {
- @Override
- public void onResult(final Object resultData) {
- if(resultData != null){
- new Thread(new Runnable() {
- @Override
- public void run() {
- sendSdlMessageToService((RPCRequest) resultData);
- }
- }).start();
- }
- }
- };
-
- // listener to be used when receiving a list of RPCRequests from a dialog.
- private final BaseAlertDialog.Listener multipleMessageListener = new BaseAlertDialog.Listener() {
- @Override
- public void onResult(final Object resultData) {
- if(resultData != null){
- new Thread(new Runnable() {
- @Override
- public void run() {
- @SuppressWarnings("unchecked")
- List<RPCRequest> msgList = (List<RPCRequest>) resultData;
- for(RPCRequest request : msgList){
- sendSdlMessageToService(request);
- }
- }
- }).start();
- }
- }
- };
-
- /**
- * Creates an alert dialog, allowing the user to manually send an alert command.
- */
- private void createAlertDialog(){
- BaseAlertDialog alertDialog = new SdlAlertDialog(this);
- alertDialog.setListener(singleMessageListener);
- alertDialog.show();
- }
-
- /**
- * Creates a speak dialog, allowing the user to manually send a speak command.
- */
- private void createSpeakDialog(){
- BaseAlertDialog speakDialog = new SpeakDialog(this);
- speakDialog.setListener(singleMessageListener);
- speakDialog.show();
- }
-
- /**
- * Creates a show dialog, allowing the user to manually send a show command.
- */
- private void createShowDialog(List<SdlImageItem> images){
- BaseAlertDialog showDialog = new ShowDialog(this, images);
- showDialog.setListener(singleMessageListener);
- showDialog.show();
- }
-
- /**
- * Creates a button subscribe dialog, allowing the user to manually send a button subscribe command.
- *
- * @param buttonSubscriptions The list used to populate the dialog
- */
- private void createButtonSubscribeDialog(List<SdlButton> buttonSubscriptions){
- BaseAlertDialog buttonSubscribeDialog = new ButtonSubscriptionDialog(this, buttonSubscriptions);
- buttonSubscribeDialog.setListener(multipleMessageListener);
- buttonSubscribeDialog.show();
- }
-
- /**
- * Creates a button unsubscribe dialog, allowing the user to manually send a button unsubscribe command.
- *
- * @param buttonSubscriptions The list used to populate the dialog
- */
- private void createButtonUnsubscribeDialog(List<SdlButton> buttonSubscriptions){
- BaseAlertDialog buttonUnsubscribeDialog = new ButtonUnsubscriptionDialog(this, buttonSubscriptions);
- buttonUnsubscribeDialog.setListener(multipleMessageListener);
- buttonUnsubscribeDialog.show();
- }
-
- /**
- * Creates an add command dialog, allowing the user to manually send an add command command.
- *
- * @param allBanks The list used to populate the dialog
- */
- private void createAddCommandDialog(List<MenuItem> allBanks, List<SdlImageItem> availableItems){
- BaseAlertDialog addCommandDialog = new AddCommandDialog(this, allBanks, availableItems);
- addCommandDialog.setListener(singleMessageListener);
- addCommandDialog.show();
- }
-
- /**
- * Creates an add submenu dialog, allowing the user to manually send an add submenu command.
- */
- private void createAddSubmenuDialog(){
- BaseAlertDialog submenuDialog = new AddSubMenuDialog(this);
- submenuDialog.setListener(singleMessageListener);
- submenuDialog.show();
- }
-
- /**
- * Creates a create interaction choice set dialog, allowing the user to manually send a create interaction choice set command.
- */
- private void createInteractionChoiceSetDialog(List<SdlImageItem> addedImages){
- BaseAlertDialog createInteractionChoiceSetDialog = new CreateInteractionChoiceSetDialog(this, addedImages);
- createInteractionChoiceSetDialog.setListener(singleMessageListener);
- createInteractionChoiceSetDialog.show();
- }
-
- /**
- * Creates a change registration dialog, allowing the user to manually send a change registration command.
- */
- private void createChangeRegistrationDialog(){
- BaseAlertDialog changeRegistrationDialog = new ChangeRegistrationDialog(this);
- changeRegistrationDialog.setListener(singleMessageListener);
- changeRegistrationDialog.show();
- }
-
- /**
- * Creates a delete command dialog, allowing the user to manually send a delete command command.
- *
- * @param commandList The list used to populate the dialog
- */
- private void createDeleteCommandDialog(List<MenuItem> commandList){
- BaseAlertDialog deleteCommandDialog = new DeleteCommandDialog(this, commandList);
- deleteCommandDialog.setListener(singleMessageListener);
- deleteCommandDialog.show();
- }
-
- /**
- * Creates a delete submenu dialog, allowing the user to manually send a delete submenu command.
- *
- * @param submenuList The list used to populate the dialog
- */
- private void createDeleteSubmenuDialog(List<MenuItem> submenuList){
- BaseAlertDialog deleteCommandDialog = new DeleteSubmenuDialog(this, submenuList);
- deleteCommandDialog.setListener(singleMessageListener);
- deleteCommandDialog.show();
- }
-
- /**
- * Creates a perform interaction dialog, allowing the user to manually send a PerformInteraction command.
- *
- * @param interactionList The list used to populate the dialog
- */
- private void createPerformInteractionDialog(List<MenuItem> interactionList){
- BaseAlertDialog performInteractionDialog = new PerformInteractionDialog(this, interactionList);
- performInteractionDialog.setListener(singleMessageListener);
- performInteractionDialog.show();
- }
-
- /**
- * Creates a delete interaction dialog, allowing the user to manually send a DeleteInteractionChoiceSet command.
- *
- * @param interactionList The list used to populate the dialog
- */
- private void createDeleteInteractionDialog(List<MenuItem> interactionList){
- BaseAlertDialog deleteInteractionDialog = new DeleteInteractionDialog(this, interactionList);
- deleteInteractionDialog.setListener(singleMessageListener);
- deleteInteractionDialog.show();
- }
-
- /**
- * Creates a get DTCs dialog, allowing the user to manually send a GetDTCs command.
- */
- private void createGetDtcsDialog(){
- BaseAlertDialog getDtcsDialog = new GetDtcsDialog(this);
- getDtcsDialog.setListener(singleMessageListener);
- getDtcsDialog.show();
- }
-
- /**
- * Creates a read DIDs dialog, allowing the user to manually send a ReadDID command.
- */
- private void createReadDidsDialog(){
- BaseAlertDialog getDtcsDialog = new ReadDidsDialog(this);
- getDtcsDialog.setListener(singleMessageListener);
- getDtcsDialog.show();
- }
-
- /**
- * Creates a slider dialog, allowing the user to manually send a Slider command.
- */
- private void createSliderDialog(){
- BaseAlertDialog getDtcsDialog = new SliderDialog(this);
- getDtcsDialog.setListener(singleMessageListener);
- getDtcsDialog.show();
- }
-
- /**
- * Creates a scrollable message dialog, allowing the user to manually send a ScrollableMessage command.
- */
- private void createScrollableMessageDialog(){
- BaseAlertDialog scrollableMessageDialog = new ScrollableMessageDialog(this);
- scrollableMessageDialog.setListener(singleMessageListener);
- scrollableMessageDialog.show();
- }
-
- /**
- * Creates a set media clock timer dialog, allowing the user to manually send a SetMediaClockTimer command.
- */
- private void createSetMediaClockTimerDialog(){
- BaseAlertDialog setMediaClockTimerDialog = new SetMediaClockTimerDialog(this);
- setMediaClockTimerDialog.setListener(singleMessageListener);
- setMediaClockTimerDialog.show();
- }
-
- /**
- * Creates a put file dialog, allowing the user to manually send images through the PutFile command.
- *
- * @param imagesAddedSoFar Images that have <b>not</b> already been added
- */
- private void createPutFileDialog(List<SdlImageItem> imagesAddedSoFar){
- BaseAlertDialog putFileDialog = new PutFileDialog(this, imagesAddedSoFar);
- putFileDialog.setListener(multipleMessageListener);
- putFileDialog.show();
- }
-
- /**
- * Creates a delete file dialog, allowing the user to manually delete files that have been added through the PutFile command.
- *
- * @param imagesAddedSoFar The list of images that have been added so far
- */
- private void createDeleteFileDialog(List<SdlImageItem> imagesAddedSoFar){
- BaseAlertDialog deleteFileDialog = new DeleteFileDialog(this, imagesAddedSoFar);
- deleteFileDialog.setListener(multipleMessageListener);
- deleteFileDialog.show();
- }
-
- /**
- * Creates a set app icon dialog, allowing the user to manually set their app icon based on images that have been added through the PutFile command.
- *
- * @param imagesAddedSoFar The list of images that have been added so far
- */
- private void createSetAppIconDialog(List<SdlImageItem> imagesAddedSoFar){
- BaseAlertDialog setAppIconDialog = new SetAppIconDialog(this, imagesAddedSoFar);
- setAppIconDialog.setListener(singleMessageListener);
- setAppIconDialog.show();
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.menu_main, menu);
- return true;
- }
-
- @Override
- public boolean onPrepareOptionsMenu(Menu menu) {
- android.view.MenuItem connectToSdl = (android.view.MenuItem) menu.findItem(R.id.menu_connect);
- android.view.MenuItem disconnectFromSdl = (android.view.MenuItem) menu.findItem(R.id.menu_disconnect);
- android.view.MenuItem resetSdl = (android.view.MenuItem) menu.findItem(R.id.menu_reset);
- android.view.MenuItem clearListView = (android.view.MenuItem) menu.findItem(R.id.menu_clear_list);
-
- // show/hide connect/disconnect menu items
- boolean connected = tv_connectionStatus.getText().toString().contains(ConnectionStatus.CONNECTED.friendlyName);
- connectToSdl.setVisible(!connected); // if we are not connected, show the connect item
- disconnectFromSdl.setVisible(connected); // if we are connected, show the disconnect item
- resetSdl.setVisible(connected); // if we are connected, show reset SDL item
-
- boolean listHasItems = (listViewAdapter != null && listViewAdapter.getCount() > 0);
- clearListView.setVisible(listHasItems); // if the list has items, show the clear list item
-
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(android.view.MenuItem item) {
- int menuItemId = item.getItemId();
- switch(menuItemId){
- case R.id.menu_connect:
- showSdlConnectionDialog();
- return true;
- case R.id.menu_disconnect:
- sendMessageToService(Message.obtain(null, SdlService.ServiceMessages.DISCONNECT));
- return true;
- case R.id.menu_reset:
- sendMessageToService(Message.obtain(null, SdlService.ServiceMessages.RESET));
- return true;
- case R.id.menu_clear_list:
- clearSdlLog();
- return true;
- case R.id.menu_help:
- Intent helpIntent = new Intent(MainActivity.this, HelpActivity.class);
- startActivity(helpIntent);
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/SdlTesterImageResource.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/SdlTesterImageResource.java
deleted file mode 100644
index b88b73415..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/SdlTesterImageResource.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.livio.sdltester;
-
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-
-public enum SdlTesterImageResource {
- IC_APP_ICON("App Icon", FileType.GRAPHIC_PNG, R.drawable.ic_launcher),
- IC_ADD("Add Item", FileType.GRAPHIC_PNG, R.drawable.add),
- IC_ADD_TO_FAVORITES("Add to Favorites", FileType.GRAPHIC_PNG, R.drawable.add_to_favorites),
- IC_ANCHOR("Anchor", FileType.GRAPHIC_PNG, R.drawable.anchor),
- IC_GAME_PAD("Game Pad", FileType.GRAPHIC_PNG, R.drawable.game_pad),
- IC_REMOVE_FROM_FAVORITES("Remove from Favorites", FileType.GRAPHIC_PNG, R.drawable.remove_from_favorites),
- IC_REMOVE("Remove Item", FileType.GRAPHIC_PNG, R.drawable.remove),
- IC_ROCKET("Rocket", FileType.GRAPHIC_PNG, R.drawable.rocket),
- IC_UNDO("Undo", FileType.GRAPHIC_PNG, R.drawable.undo),
- IC_ZOOM_IN("Zoom In", FileType.GRAPHIC_PNG, R.drawable.zoom_in),
- IC_ZOOM_OUT("Zoom Out", FileType.GRAPHIC_PNG, R.drawable.zoom_out),
-
- ;
-
- private String friendlyName;
- private int imageId;
- private FileType fileType;
- private SdlTesterImageResource(String friendlyName, FileType type, int imageId){
- this.friendlyName = friendlyName;
- this.imageId = imageId;
- this.fileType = type;
- }
-
- @Override
- public String toString(){
- return friendlyName;
- }
-
- public int getImageId(){
- return imageId;
- }
- public FileType getFileType() {
- return fileType;
- }
-
- public Bitmap getBitmap(Resources res){
- Bitmap result = BitmapFactory.decodeResource(res, imageId);
- return result;
- }
-
- public static Bitmap getBitmap(Resources res, SdlTesterImageResource image){
- int resId = image.getImageId();
- Bitmap result = BitmapFactory.decodeResource(res, resId);
- return result;
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddCommandDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddCommandDialog.java
deleted file mode 100644
index 5c2302bbb..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddCommandDialog.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-import android.widget.Spinner;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.dialogs.ImageListDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.menu.MenuItem;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class AddCommandDialog extends BaseOkCancelDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.ADD_COMMAND;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private EditText et_newCommand;
- private EditText et_voiceRecKeyword;
- private EditText et_imageName;
-
- private Spinner spin_addCommand_submenus;
- private CheckBox cb_image;
-
- private SdlImageItem selectedImage;
-
- public AddCommandDialog(Context context, List<MenuItem> availableBanks, List<SdlImageItem> images) {
- super(context, DIALOG_TITLE, R.layout.add_command);
- setupViews(availableBanks, images);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- private void setupViews(List<MenuItem> availableSubmenus, final List<SdlImageItem> images){
- List<MenuItem> submenuList = new ArrayList<MenuItem>(availableSubmenus);
- submenuList.add(0, new MenuItem("Root-level menu", SdlConstants.AddCommandConstants.ROOT_PARENT_ID, true));
- spin_addCommand_submenus.setAdapter(AndroidUtils.createSpinnerAdapter(context, submenuList));
-
- if(images == null || images.size() <= 0){
- cb_image.setVisibility(View.GONE);
- et_imageName.setVisibility(View.GONE);
- }
-
- cb_image.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- if(isChecked){
- if(images == null || images.size() <= 0){
- Toast.makeText(context, "No images have been added to the system yet.", Toast.LENGTH_LONG).show();
- }
- else{
- BaseAlertDialog selectImageDialog = new ImageListDialog(context, images);
- selectImageDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- selectedImage = (SdlImageItem) resultData;
- et_imageName.setText(selectedImage.getImageName());
- }
- });
- selectImageDialog.show();
- }
- }
- else{
- et_imageName.setText("");
- }
- }
- });
- }
-
- @Override
- protected void findViews(View parent) {
- et_newCommand = (EditText) parent.findViewById(R.id.et_addCommand_commandName);
- et_voiceRecKeyword = (EditText) parent.findViewById(R.id.et_addCommand_voiceRecKeyword);
- et_imageName = (EditText) parent.findViewById(R.id.et_imageName);
- spin_addCommand_submenus = (Spinner) parent.findViewById(R.id.spin_addCommand_submenus);
- cb_image = (CheckBox) parent.findViewById(R.id.check_enable_image);
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if(listener != null){
- // grab the data from the views
- final String commandName = et_newCommand.getText().toString();
- final int position = SdlConstants.AddCommandConstants.DEFAULT_POSITION;
- final String voiceRecKeyword = et_voiceRecKeyword.getText().toString();
- final MenuItem parentBank = (MenuItem) spin_addCommand_submenus.getSelectedItem();
- final int parentId = (parentBank != null) ? parentBank.getId() : SdlConstants.AddCommandConstants.INVALID_PARENT_ID;
- final String imageName = (selectedImage != null) ? selectedImage.getImageName() : null;
-
- // all we really need is a valid name
- if(commandName.length() > 0){
- // if we have it, let's create our RPC object
- RPCRequest result = SdlRequestFactory.addCommand(commandName, position, parentId, voiceRecKeyword, imageName);
- notifyListener(result);
- }
- else{
- // if we don't have a valid name, inform the user.
- Toast.makeText(context, "Must enter command name.", Toast.LENGTH_LONG).show();
- }
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddSubMenuDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddSubMenuDialog.java
deleted file mode 100644
index adbc297d5..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/AddSubMenuDialog.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class AddSubMenuDialog extends BaseOkCancelDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.ADD_SUBMENU;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private EditText et_submenuName;
-
- public AddSubMenuDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.add_submenu);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- et_submenuName = (EditText) view.findViewById(R.id.et_addSubMenu_subMenuName);
- }
-
- //dialog button click listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- final String submenuName = et_submenuName.getText().toString();
- final int position = SdlConstants.AddSubmenuConstants.DEFAULT_POSITION;
-
- // all we need is a valid name
- if(submenuName.length() > 0){
- // if we have it, create the request and send it to the listener
- RPCRequest rpcCommand = SdlRequestFactory.addSubmenu(submenuName, position);
- notifyListener(rpcCommand);
- }
- else{
- // if we don't have a valid name, inform the user
- Toast.makeText(context, "Must enter a submenu name.", Toast.LENGTH_LONG).show();
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonSubscriptionDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonSubscriptionDialog.java
deleted file mode 100644
index 8e526dd23..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonSubscriptionDialog.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import android.content.Context;
-import android.content.DialogInterface;
-
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseMultipleListViewDialog;
-import com.livio.sdl.enums.SdlButton;
-import com.livio.sdl.enums.SdlCommand;
-import com.smartdevicelink.proxy.RPCRequest;
-
-/**
- * Shows a dialog allowing the user to subscribe to buttons that haven't been subscribed to yet. This class
- * requires an input list of SDL buttons that have been subscribed to so far. Button subscriptions should
- * be queried from the SDL service prior to showing this dialog to be sure information is up to date.
- *
- * The result of this dialog is a list of RPC requests, one request per selected item since SDL can't do
- * these as a batch as of version 2.0.
- *
- * @author Mike Burke
- *
- */
-public class ButtonSubscriptionDialog extends BaseMultipleListViewDialog<SdlButton>{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SUBSCRIBE_BUTTON;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- public ButtonSubscriptionDialog(Context context, List<SdlButton> buttonSubscriptions) {
- super(context, DIALOG_TITLE, buttonSubscriptions);
- setPositiveButton(positiveButton);
- createDialog();
- }
-
- //dialog button click listeners
- private final DialogInterface.OnClickListener positiveButton = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- // called when the OK button is clicked.
-
- if(selectedItems == null || selectedItems.size() == 0){
- // if no items were selected, send an empty list as the result
- notifyListener(Collections.emptyList());
- }
- else{
- List<RPCRequest> buttonSubscribeMessages = new ArrayList<RPCRequest>(selectedItems.size());
-
- // loop through the selected items and create RPC requests for each one since they can't be done in a batch.
- for(SdlButton button : selectedItems){
- RPCRequest temp = SdlRequestFactory.subscribeButton(SdlButton.translateToLegacy(button));
- buttonSubscribeMessages.add(temp);
- }
- notifyListener(buttonSubscribeMessages);
- }
- }
- };
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonUnsubscriptionDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonUnsubscriptionDialog.java
deleted file mode 100644
index 1824dc032..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ButtonUnsubscriptionDialog.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import android.content.Context;
-import android.content.DialogInterface;
-
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseMultipleListViewDialog;
-import com.livio.sdl.enums.SdlButton;
-import com.livio.sdl.enums.SdlCommand;
-import com.smartdevicelink.proxy.RPCRequest;
-
-/**
- * Shows a dialog allowing the user to unsubscribe from buttons that have been subscribed to. This class
- * requires an input list of SDL buttons that have been subscribed to so far. Button subscriptions should
- * be queried from the SDL service prior to showing this dialog to be sure information is up to date.
- *
- * The result of this dialog is a list of RPC requests, one request per selected item since SDL can't do
- * these as a batch as of version 2.0.
- *
- * @author Mike Burke
- *
- */
-public class ButtonUnsubscriptionDialog extends BaseMultipleListViewDialog<SdlButton> {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.UNSUBSCRIBE_BUTTON;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- public ButtonUnsubscriptionDialog(Context context, List<SdlButton> buttonSubscriptions) {
- super(context, DIALOG_TITLE, buttonSubscriptions);
- setPositiveButton(positiveButton);
- createDialog();
- }
-
- //dialog button click listeners
- private final DialogInterface.OnClickListener positiveButton = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- // called when the OK button is clicked.
-
- if(selectedItems == null || selectedItems.size() == 0){
- // if no items were selected, send an empty list as the result
- notifyListener(Collections.emptyList());
- }
- else{
- List<RPCRequest> buttonUnsubscribeMessages = new ArrayList<RPCRequest>(selectedItems.size());
-
- // loop through the selected items and create RPC requests for each one since they can't be done in a batch.
- for(SdlButton button : selectedItems){
- RPCRequest temp = SdlRequestFactory.unsubscribeButton(SdlButton.translateToLegacy(button));
- buttonUnsubscribeMessages.add(temp);
- }
- notifyListener(buttonUnsubscribeMessages);
- }
- }
- };
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChangeRegistrationDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChangeRegistrationDialog.java
deleted file mode 100644
index bc328a608..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChangeRegistrationDialog.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.ArrayAdapter;
-import android.widget.Spinner;
-
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.enums.SdlLanguage;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-
-public class ChangeRegistrationDialog extends BaseOkCancelDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.CHANGE_REGISTRATION;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private Spinner spin_changeRegistration_language;
- private Spinner spin_changeRegistration_hmiLanguage;
-
- public ChangeRegistrationDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.change_registration);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- ArrayAdapter<SdlLanguage> adapter = AndroidUtils.createSpinnerAdapter(context, SdlLanguage.values());
-
- spin_changeRegistration_language = (Spinner) view.findViewById(R.id.spin_changeRegistration_language);
- spin_changeRegistration_language.setAdapter(adapter);
- spin_changeRegistration_hmiLanguage = (Spinner) view.findViewById(R.id.spin_changeRegistration_hmiLanguage);
- spin_changeRegistration_hmiLanguage.setAdapter(adapter);
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- final String language = spin_changeRegistration_language.getSelectedItem().toString();
- final String hmiLanguage = spin_changeRegistration_hmiLanguage.getSelectedItem().toString();
-
- RPCRequest result = SdlRequestFactory.changeRegistration(Language.valueForString(language), Language.valueForString(hmiLanguage));
- notifyListener(result);
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChoiceItemDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChoiceItemDialog.java
deleted file mode 100644
index 1c18c2edb..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ChoiceItemDialog.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.Toast;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.dialogs.ImageListDialog;
-import com.livio.sdl.utils.SdlUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.rpc.Choice;
-
-public class ChoiceItemDialog extends BaseOkCancelDialog {
-
- private static final String DIALOG_TITLE = "Create a Choice";
- private List<SdlImageItem> availableImages;
-
- private EditText et_choiceName, et_choiceVr, et_imageName;
- private CheckBox cb_hasImage;
- private BaseAlertDialog imagesDialog;
-
- public ChoiceItemDialog(Context context, List<SdlImageItem> availableImages) {
- super(context, DIALOG_TITLE, R.layout.choice_set_item);
- setPositiveButton(okButton);
- this.availableImages = availableImages;
- if(availableImages == null || availableImages.size() <= 0){
- cb_hasImage.setVisibility(View.GONE);
- et_imageName.setVisibility(View.GONE);
- }
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- et_choiceName = (EditText) parent.findViewById(R.id.et_choice_name);
- et_choiceVr = (EditText) parent.findViewById(R.id.et_choice_vr_text);
- et_imageName = (EditText) parent.findViewById(R.id.et_choice_imageName);
- cb_hasImage = (CheckBox) parent.findViewById(R.id.check_enable_image);
- cb_hasImage.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- if(isChecked){
- showImagesDialog();
- }
- else{
- et_imageName.setText("");
- }
- }
- });
- }
-
- private void showImagesDialog(){
- if(imagesDialog == null){
- imagesDialog = new ImageListDialog(context, availableImages);
- imagesDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- SdlImageItem selectedItem = (SdlImageItem) resultData;
- if(selectedItem != null){
- et_imageName.setText(selectedItem.getImageName());
- }
- }
- });
- }
-
- imagesDialog.show();
- }
-
- private DialogInterface.OnClickListener okButton = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- String choiceName = et_choiceName.getText().toString();
- String choiceVr = et_choiceVr.getText().toString();
- String imageName = et_imageName.getText().toString();
-
- if(choiceName.length() > 0){
- if(imageName.length() <= 0){
- imageName = null;
- }
-
- if(choiceVr.length() > 0){
- Choice choice = SdlUtils.createChoice(choiceName, choiceVr, imageName);
- notifyListener(choice);
- }
- else{
- Toast.makeText(context, "Choice must have a voice-rec keyword.", Toast.LENGTH_LONG).show();
- }
-
- }
- else{
- Toast.makeText(context, "Choice must have a name.", Toast.LENGTH_LONG).show();
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/CreateInteractionChoiceSetDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/CreateInteractionChoiceSetDialog.java
deleted file mode 100644
index 6ba95b95b..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/CreateInteractionChoiceSetDialog.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Vector;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.graphics.Bitmap;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.ListView;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlImageItem.SdlImageItemComparator;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.adapters.SdlImageAdapter;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.dialogs.TextViewOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.Choice;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-
-public class CreateInteractionChoiceSetDialog extends BaseOkCancelDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.CREATE_INTERACTION_CHOICE_SET;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private static final int MAX_CHOICES = 10;
-
- private List<Choice> choiceItemList = new ArrayList<Choice>(MAX_CHOICES);
-
- private Button but_addItem;
- private ListView lv_choiceItems;
- private ArrayAdapter<SdlImageItem> adapter;
- private List<SdlImageItem> adapterList = new ArrayList<SdlImageItem>(MAX_CHOICES);
-
- private BaseAlertDialog choiceDialog = null;
- private List<SdlImageItem> allImages;
-
- public CreateInteractionChoiceSetDialog(Context context, List<SdlImageItem> images){
- super(context, DIALOG_TITLE, R.layout.create_choice_interaction_set);
- setPositiveButton(okButtonListener);
- adapter = new SdlImageAdapter(context, adapterList);
- lv_choiceItems.setAdapter(adapter);
- this.allImages = images;
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- lv_choiceItems = (ListView) view.findViewById(R.id.lv_choices);
- lv_choiceItems.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
- BaseAlertDialog deleteDialog = new TextViewOkCancelDialog(context, "Delete", "Do you want to delete this item?");
- deleteDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- boolean delete = (Boolean) resultData;
- if(delete){
- adapterList.remove(position);
- adapter.notifyDataSetChanged();
- }
- }
- });
- deleteDialog.show();
- }
- });
- but_addItem = (Button) view.findViewById(R.id.but_addItem);
- but_addItem.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- showChoiceDialog();
- }
- });
- }
-
- private void showChoiceDialog(){
- choiceDialog = new ChoiceItemDialog(context, allImages);
- choiceDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- Choice choice = (Choice) resultData;
- addChoiceToList(choice);
- }
- });
- choiceDialog.show();
- }
-
- private void addChoiceToList(Choice choice){
- choiceItemList.add(choice);
-
- if(choice.getImage() != null){
- // if user selected an image, figure out which one they selected
- int imageIndex = Collections.binarySearch(allImages, new SdlImageItem(null, choice.getImage().getValue(), null), new SdlImageItemComparator());
- if(imageIndex >= 0 && imageIndex < allImages.size()){
- SdlImageItem item = allImages.get(imageIndex);
- adapter.add(new SdlImageItem(item.getBitmap(), choice.getMenuName(), FileType.GRAPHIC_JPEG));
- adapter.notifyDataSetChanged();
- }
- }
- else{
- // if the user didn't select an image, we'll create an empty one to display in the adapter
- Bitmap image = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
- adapter.add(new SdlImageItem(image, choice.getMenuName(), FileType.GRAPHIC_JPEG));
- adapter.notifyDataSetChanged();
- }
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- Vector<Choice> choiceItems = new Vector<Choice>(choiceItemList);
-
- if(choiceItems.size() > 0){
- RPCRequest result = SdlRequestFactory.createInteractionChoiceSet(choiceItems);
- notifyListener(result);
- }
- else{
- Toast.makeText(context, "Must enter at least 1 choice name.", Toast.LENGTH_LONG).show();
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteCommandDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteCommandDialog.java
deleted file mode 100644
index de4e7086b..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteCommandDialog.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.menu.MenuItem;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class DeleteCommandDialog extends BaseAlertDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.DELETE_COMMAND;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private ListView listView;
-
- public DeleteCommandDialog(Context context, List<MenuItem> commandList) {
- super(context, DIALOG_TITLE, R.layout.listview);
- listView.setAdapter(AndroidUtils.createListViewAdapter(context, commandList));
- setCancelable(true);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- listView = (ListView) parent.findViewById(R.id.listView);
- listView.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- @SuppressWarnings("unchecked")
- final MenuItem selectedButton = ((ArrayAdapter<MenuItem>) parent.getAdapter()).getItem(position);
- final int commandId = selectedButton.getId();
-
- RPCRequest result = SdlRequestFactory.deleteCommand(commandId);
- notifyListener(result);
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteFileDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteFileDialog.java
deleted file mode 100644
index e182c69f1..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteFileDialog.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.adapters.SdlImageAdapter;
-import com.livio.sdl.dialogs.BaseImageListDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class DeleteFileDialog extends BaseImageListDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.DELETE_FILE;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private static final String DELETE_ALL = "Delete All";
- private List<SdlImageItem> imageList;
-
- public DeleteFileDialog(Context context, List<SdlImageItem> imageList) {
- super(context, DIALOG_TITLE, imageList);
- this.imageList = new ArrayList<SdlImageItem>(imageList);
- Bitmap deleteAllImage = BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_close);
- ((SdlImageAdapter)listview.getAdapter()).insert(new SdlImageItem(deleteAllImage, DELETE_ALL, null), 0);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- listview = (ListView) parent.findViewById(R.id.listView);
- listview.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- List<RPCRequest> messages = new ArrayList<RPCRequest>(imageList.size());
- SdlImageItem selectedItem = ((SdlImageAdapter) parent.getAdapter()).getItem(position);
- String selectedName = selectedItem.getImageName();
-
- if(selectedName.equals(DELETE_ALL)){
- for(SdlImageItem item : imageList){
- RPCRequest request = SdlRequestFactory.deleteFile(item.getImageName());
- messages.add(request);
- }
- }
- else{
- RPCRequest request = SdlRequestFactory.deleteFile(selectedItem.getImageName());
- messages.add(request);
- }
-
- notifyListener(messages);
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteInteractionDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteInteractionDialog.java
deleted file mode 100644
index 66f2ae7f7..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteInteractionDialog.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-import com.livio.sdl.R;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseSingleListViewDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.menu.MenuItem;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class DeleteInteractionDialog extends BaseSingleListViewDialog<MenuItem> {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.DELETE_INTERACTION_CHOICE_SET;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- public DeleteInteractionDialog(Context context, List<MenuItem> items) {
- super(context, DIALOG_TITLE, items);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- listView = (ListView) parent.findViewById(R.id.listView);
- listView.setOnItemClickListener(new OnItemClickListener() {
- @SuppressWarnings("unchecked")
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- selectedItem = ((ArrayAdapter<MenuItem>) parent.getAdapter()).getItem(position);
-
- RPCRequest result = SdlRequestFactory.deleteInteractionChoiceSet(selectedItem.getId());
- notifyListener(result);
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteSubmenuDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteSubmenuDialog.java
deleted file mode 100644
index fad53a528..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/DeleteSubmenuDialog.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseSingleListViewDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.menu.MenuItem;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class DeleteSubmenuDialog extends BaseSingleListViewDialog<MenuItem>{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.DELETE_SUB_MENU;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- public DeleteSubmenuDialog(Context context, List<MenuItem> submenuList) {
- super(context, DIALOG_TITLE, submenuList);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- listView = (ListView) parent.findViewById(R.id.listView);
- listView.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- @SuppressWarnings("unchecked")
- final MenuItem selectedButton = ((ArrayAdapter<MenuItem>) parent.getAdapter()).getItem(position);
- final int menuId = selectedButton.getId();
-
- RPCRequest request = SdlRequestFactory.deleteSubmenu(menuId);
- notifyListener(request);
-
- // since this isn't an ok/cancel dialog, we must dismiss the dialog when an item is selected
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/GetDtcsDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/GetDtcsDialog.java
deleted file mode 100644
index 05cb15f2f..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/GetDtcsDialog.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.text.InputFilter;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.viewhelpers.MinMaxInputFilter;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class GetDtcsDialog extends BaseOkCancelDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.GET_DTCS;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private EditText et_ecuName;
-
- public GetDtcsDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.get_dtcs);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- et_ecuName = (EditText) parent.findViewById(R.id.et_getDtcs_ecuName);
-
- // set an input filter on the edit text so the user can only enter a valid input
- et_ecuName.setFilters(new InputFilter[]{new MinMaxInputFilter(SdlConstants.GetDtcsConstants.MINIMUM_ECU_ID, SdlConstants.GetDtcsConstants.MAXIMUM_ECU_ID)});
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- final String ecuName = et_ecuName.getText().toString();
- if(ecuName.length() > 0){
- RPCRequest result = SdlRequestFactory.getDtcs(ecuName);
- notifyListener(result);
- }
- else{
- Toast.makeText(context, "Must enter an ECU name.", Toast.LENGTH_LONG).show();
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PerformInteractionDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PerformInteractionDialog.java
deleted file mode 100644
index 241fda8c8..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PerformInteractionDialog.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-import java.util.Vector;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-import android.widget.SeekBar;
-import android.widget.SeekBar.OnSeekBarChangeListener;
-import android.widget.Spinner;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.dialogs.MultipleListViewDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.enums.SdlInteractionMode;
-import com.livio.sdl.menu.MenuItem;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdl.utils.MathUtils;
-import com.livio.sdl.viewhelpers.SeekBarCalculator;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
-
-public class PerformInteractionDialog extends BaseOkCancelDialog implements OnCheckedChangeListener, OnSeekBarChangeListener{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.PERFORM_INTERACTION;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- //set up your min & max time allowed here.
- private static final int MINIMUM_TIMEOUT = SdlConstants.PerformInteractionConstants.MINIMUM_TIMEOUT;
- private static final int MAXIMUM_TIMEOUT = SdlConstants.PerformInteractionConstants.MAXIMUM_TIMEOUT;
-
- //this is your default selection for tone duration. again, divide by 10 for the actual time in seconds.
- private static final int DEFAULT_TIMEOUT = 30; // 30.0 seconds
-
- private EditText et_title, et_voicePrompt;
- private Button but_choiceSet;
- private Spinner spin_interactionMode;
- private TextView tv_interactionTimeout, tv_interactionTimeoutDuration;
- private CheckBox check_timeoutEnabled;
- private SeekBar seek_timeoutDuration;
- private SeekBarCalculator progressCalculator;
- private String secondsStr;
-
- private List<MenuItem> selectedChoiceSets;
-
- //TODO - leaving these out for now - MRB
- //private CheckBox check_alert_includeSoftButtons;
- //private Button but_alert_includeSoftButtons;
-
- public PerformInteractionDialog(Context context, List<MenuItem> interactionSets) {
- super(context, DIALOG_TITLE, R.layout.perform_interaction);
- setPositiveButton(okButtonListener);
- setupViews(interactionSets);
- createDialog();
- }
-
- private void setupViews(final List<MenuItem> interactionSets){
- // setup the button click event, which shows another dialog to select which choice sets to show
- but_choiceSet.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- MultipleListViewDialog<MenuItem> dialog = new MultipleListViewDialog<MenuItem>(context, "Select Choice Sets to show", interactionSets);
- dialog.setListener(new BaseAlertDialog.Listener() {
- @SuppressWarnings("unchecked")
- @Override
- public void onResult(Object resultData) {
- selectedChoiceSets = (List<MenuItem>) resultData;
- }
- });
- dialog.show();
- }
- });
-
- // setup the spinner
- spin_interactionMode.setAdapter(AndroidUtils.createSpinnerAdapter(context, SdlInteractionMode.values()));
-
- check_timeoutEnabled.setOnCheckedChangeListener(this);
-
- seek_timeoutDuration.setOnSeekBarChangeListener(this);
- seek_timeoutDuration.setProgress(progressCalculator.calculateProgress(DEFAULT_TIMEOUT));
- }
-
- @Override
- protected void findViews(View parent) {
- progressCalculator = new SeekBarCalculator(MINIMUM_TIMEOUT, MAXIMUM_TIMEOUT);
- secondsStr = context.getResources().getString(R.string.units_seconds);
-
- et_title = (EditText) parent.findViewById(R.id.et_performInteraction_title);
- et_voicePrompt = (EditText) parent.findViewById(R.id.et_performInteraction_voicePrompt);
- tv_interactionTimeout = (TextView) parent.findViewById(R.id.tv_performInteraction_timeoutTitle);
- tv_interactionTimeoutDuration = (TextView) parent.findViewById(R.id.tv_performInteraction_timeoutDuration);
-
- but_choiceSet = (Button) parent.findViewById(R.id.but_performInteraction_selectChoiceSets);
- spin_interactionMode = (Spinner) parent.findViewById(R.id.spin_performInteraction_interactionMode);
- check_timeoutEnabled = (CheckBox) parent.findViewById(R.id.check_performInteraction_timeoutEnabled);
- seek_timeoutDuration = (SeekBar) parent.findViewById(R.id.seek_performInteraction_timeoutDuration);
-
- //make initial updates to the UI using default values
- updateProgressText(DEFAULT_TIMEOUT);
- enableDuration(check_timeoutEnabled.isChecked());
- }
-
- private void updateProgressText(float progress){
- StringBuilder strBuilder = new StringBuilder();
- strBuilder.append(progress);
- strBuilder.append(secondsStr);
- tv_interactionTimeoutDuration.setText(strBuilder.toString());
- }
-
- private void enableDuration(boolean enabled){
- int visibility = (enabled) ? View.VISIBLE : View.GONE;
- tv_interactionTimeout.setVisibility(visibility);
- tv_interactionTimeoutDuration.setVisibility(visibility);
- seek_timeoutDuration.setVisibility(visibility);
- }
-
- // dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if(selectedChoiceSets == null || selectedChoiceSets.size() == 0){
- Toast.makeText(context, "Must select an interaction set in order to perform an interaction", Toast.LENGTH_LONG).show();
- }
- else{
- String title = et_title.getText().toString();
- String voicePrompt = et_voicePrompt.getText().toString();
-
- boolean timeoutEnabled = check_timeoutEnabled.isChecked();
- int timeout = SdlConstants.PerformInteractionConstants.INVALID_TIMEOUT;
- if(timeoutEnabled){
- timeout = progressCalculator.calculateProgress(seek_timeoutDuration.getProgress());
- timeout = MathUtils.convertSecsToMillisecs(timeout);
- }
-
- SdlInteractionMode sdlInteractionMode = (SdlInteractionMode) spin_interactionMode.getAdapter().getItem(spin_interactionMode.getSelectedItemPosition());
- InteractionMode interactionMode = SdlInteractionMode.translateToLegacy(sdlInteractionMode);
-
- Vector<Integer> choiceSetIds = new Vector<Integer>(selectedChoiceSets.size());
- for(MenuItem item : selectedChoiceSets){
- choiceSetIds.add(item.getId());
- }
-
- RPCRequest result = SdlRequestFactory.performInteraction(title, voicePrompt, choiceSetIds, interactionMode, timeout);
- notifyListener(result);
- }
- }
- };
-
- /*
- * On Check Changed Listener Methods
- */
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- enableDuration(isChecked);
- }
-
- /*
- * On Seek Bar Changed Listener Methods
- */
- @Override public void onStartTrackingTouch(SeekBar seekBar) {}
- @Override public void onStopTrackingTouch(SeekBar seekBar) {}
-
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- updateProgressText(progressCalculator.calculateValue(progress));
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PutFileDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PutFileDialog.java
deleted file mode 100644
index 5cb54555d..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/PutFileDialog.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlImageItem.SdlImageItemComparator;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.dialogs.ImageListDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.utils.SdlUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class PutFileDialog extends BaseOkCancelDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.PUT_FILE;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private ImageButton ib_putFile_selectAnImage;
- private EditText et_putFile_imageName;
- private CheckBox cb_putFile_isPersistent;
- private CheckBox cb_putFile_addAll;
-
- private SdlImageItem selectedImage = null;
- private List<SdlImageItem> availableImages;
-
- private HashMap<SdlImageItem, byte[]> bitmapRawByteMap;
-
- public PutFileDialog(Context context, List<SdlImageItem> availableImages) {
- super(context, DIALOG_TITLE, R.layout.put_file);
- this.availableImages = availableImages;
- Collections.sort(this.availableImages, new SdlImageItemComparator());
- startImageProcessing();
- setupViews();
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- /**
- * Preemptively processes all available images in the background so the calculations
- * don't have to be done when the user makes a selection. By the time the user
- * clicks on something, the calculations should be complete.
- */
- private void startImageProcessing(){
- final int size = availableImages.size();
- bitmapRawByteMap = new HashMap<SdlImageItem, byte[]>(size);
-
- // loop through all images and start a thread to process them
- for(final SdlImageItem item : availableImages){
- new Thread(new Runnable() {
- @Override
- public void run() {
- byte[] bitmapData = SdlUtils.bitmapToByteArray(item.getBitmap(), item.getImageType());
- addDataToMap(item, bitmapData);
- }
- }).start();
- }
- }
-
- /**
- * Allows synchronized editting of the raw byte hash map. HashMaps are not thread safe,
- * so we must protect the data structure through a synchronized method.
- *
- * @param key The key to add
- * @param value The value to add
- */
- private synchronized void addDataToMap(SdlImageItem key, byte[] value){
- bitmapRawByteMap.put(key, value);
- }
-
- private void setupViews(){
- ib_putFile_selectAnImage.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- BaseAlertDialog selectImageDialog = new ImageListDialog(context, availableImages);
- selectImageDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- selectedImage = (SdlImageItem) resultData;
- onItemSelected(selectedImage);
- }
- });
- selectImageDialog.show();
- }
- });
- }
-
- private void onItemSelected(SdlImageItem item){
- ib_putFile_selectAnImage.setImageBitmap(item.getBitmap());
- et_putFile_imageName.setText(item.getImageName());
- }
-
- @Override
- protected void findViews(View parent) {
- et_putFile_imageName = (EditText) parent.findViewById(R.id.et_putFile_imageName);
- cb_putFile_isPersistent = (CheckBox) parent.findViewById(R.id.cb_putFile_isPersistent);
- ib_putFile_selectAnImage = (ImageButton) parent.findViewById(R.id.ib_putFile_selectAnImage);
-
- cb_putFile_addAll = (CheckBox) parent.findViewById(R.id.cb_putFile_addAll);
- cb_putFile_addAll.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- enableViews(!isChecked);
- }
- });
- }
-
- private void enableViews(boolean enable){
- int visibility = (enable) ? View.VISIBLE : View.GONE;
- et_putFile_imageName.setVisibility(visibility);
- cb_putFile_isPersistent.setVisibility(visibility);
- ib_putFile_selectAnImage.setVisibility(visibility);
- }
-
- //dialog button click listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- List<RPCMessage> messages = new ArrayList<RPCMessage>(availableImages.size());
- boolean persistentFile = cb_putFile_isPersistent.isChecked();
-
- if(cb_putFile_addAll.isChecked()){
- Set<SdlImageItem> keySet = bitmapRawByteMap.keySet();
- Iterator<SdlImageItem> iterator = keySet.iterator();
-
- while(iterator.hasNext()){
- SdlImageItem item = iterator.next();
- RPCRequest result = SdlRequestFactory.putFile(item.getImageName(), item.getImageType(), persistentFile, bitmapRawByteMap.get(item));
- messages.add(result);
- }
-
- notifyListener(messages);
- }
- else if(selectedImage != null){
- String name = et_putFile_imageName.getText().toString();
- if(name.length() > 0){
- RPCRequest result = SdlRequestFactory.putFile(name, selectedImage.getImageType(), persistentFile, bitmapRawByteMap.get(selectedImage));
- messages.add(result);
-
- notifyListener(messages);
- }
- else{
- Toast.makeText(context, "Must enter a name for the image.", Toast.LENGTH_LONG).show();
- }
- }
- else{
- Toast.makeText(context, "Must select an image to add.", Toast.LENGTH_LONG).show();
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ReadDidsDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ReadDidsDialog.java
deleted file mode 100644
index 3a9fb33be..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ReadDidsDialog.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.text.InputFilter;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.viewhelpers.MinMaxInputFilter;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class ReadDidsDialog extends BaseOkCancelDialog {
-
- // TODO didLocation should be comma-separated.
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.READ_DIDS;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private static final int MIN_ECU_NUMBER = SdlConstants.ReadDidsConstants.MINIMUM_ECU_ID;
- private static final int MAX_ECU_NUMBER = SdlConstants.ReadDidsConstants.MAXIMUM_ECU_ID;
-
- private EditText et_ecuName, et_didLocation;
-
- public ReadDidsDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.read_dids);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- et_ecuName = (EditText) parent.findViewById(R.id.et_readDids_ecuName);
- et_ecuName.setFilters(new InputFilter[]{new MinMaxInputFilter(MIN_ECU_NUMBER, MAX_ECU_NUMBER)});
- et_didLocation = (EditText) parent.findViewById(R.id.et_readDids_didLocation);
- et_didLocation.setFilters(new InputFilter[]{new MinMaxInputFilter(MIN_ECU_NUMBER, MAX_ECU_NUMBER)});
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- final String ecuName = et_ecuName.getText().toString();
- final String didLocation = et_didLocation.getText().toString();
- if(ecuName.length() > 0 && didLocation.length() > 0){
- RPCRequest result = SdlRequestFactory.readDid(Integer.parseInt(ecuName), Integer.parseInt(didLocation));
- notifyListener(result);
- }
- else{
- Toast.makeText(context, "Must enter ECU name & DID location.", Toast.LENGTH_LONG).show();
- }
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ScrollableMessageDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ScrollableMessageDialog.java
deleted file mode 100644
index f15c00251..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ScrollableMessageDialog.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.SeekBar;
-import android.widget.SeekBar.OnSeekBarChangeListener;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.utils.MathUtils;
-import com.livio.sdl.viewhelpers.SeekBarCalculator;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class ScrollableMessageDialog extends BaseOkCancelDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SCROLLABLE_MESSAGE;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private static final int TIMEOUT_DEFAULT = 30;
- private static final int TIMEOUT_MIN = SdlConstants.ScrollableMessageConstants.TIMEOUT_MINIMUM;
- private static final int TIMEOUT_MAX = SdlConstants.ScrollableMessageConstants.TIMEOUT_MAXIMUM;
- private static final int LENGTH_MAX = SdlConstants.ScrollableMessageConstants.MESSAGE_LENGTH_MAX;
-
- private EditText et_scrollableMessage_text;
- private TextView tv_timeout;
- private SeekBar seek_timeout;
- private String timeoutBaseStr;
- private SeekBarCalculator progressCalculator;
-
- public ScrollableMessageDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.scrollable_message);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- timeoutBaseStr = context.getResources().getString(R.string.timeout);
- progressCalculator = new SeekBarCalculator(TIMEOUT_MIN, TIMEOUT_MAX);
-
- et_scrollableMessage_text = (EditText) parent.findViewById(R.id.et_scrollableMessage_text);
-
- Button clearButton = (Button) parent.findViewById(R.id.but_scrollableMessage_clear);
- clearButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- et_scrollableMessage_text.setText("");
- }
- });
-
- tv_timeout = (TextView) parent.findViewById(R.id.tv_scrollableMessage_timeout);
- updateTimeoutText(TIMEOUT_DEFAULT);
-
- seek_timeout = (SeekBar) parent.findViewById(R.id.seek_scrollableMessage_timeout);
- seek_timeout.setMax(progressCalculator.getMaxProgress());
- seek_timeout.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
- @Override public void onStopTrackingTouch(SeekBar seekBar) {}
- @Override public void onStartTrackingTouch(SeekBar seekBar) {}
-
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- updateTimeoutText((int) progressCalculator.calculateValue(progress));
- }
- });
- seek_timeout.setProgress(progressCalculator.calculateProgress(TIMEOUT_DEFAULT));
- }
-
- private void updateTimeoutText(int timeout){
- tv_timeout.setText(new StringBuilder().append(timeoutBaseStr).append(timeout).append(" s").toString());
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- String message = et_scrollableMessage_text.getText().toString();
- int timeout = (int) progressCalculator.calculateValue(seek_timeout.getProgress());
- timeout = MathUtils.convertSecsToMillisecs(timeout);
-
- if(message.length() <= 0){
- message = " ";
- }
- // if the message is too long, we'll just chop off the end
- else if(message.length() > LENGTH_MAX){
- Toast.makeText(context, "Text was too long, extra characters are being dropped.", Toast.LENGTH_LONG).show();
- message = message.substring(0, LENGTH_MAX);
- }
-
- RPCRequest result = SdlRequestFactory.scrollableMessage(message, timeout);
- notifyListener(result);
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlAlertDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlAlertDialog.java
deleted file mode 100644
index d341c7a99..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlAlertDialog.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.SeekBar;
-import android.widget.SeekBar.OnSeekBarChangeListener;
-import android.widget.TextView;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.utils.MathUtils;
-import com.livio.sdl.viewhelpers.SeekBarCalculator;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class SdlAlertDialog extends BaseOkCancelDialog implements OnSeekBarChangeListener{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.ALERT;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- // a seekbar cannot do decimal points, so it currently ranges 0-50, which is then
- // divided by 10.0f to give us a number of seconds, rounded to 1/10 of a second.
- private static final float TENS_PLACE_DENOMINATOR = 10.0f;
-
- //set up your min & max time allowed here. we multiply by 10 since we're allowing 1/10th of a second selections
- private static final int MINIMUM_ALERT_TONE_TIME = (int) (SdlConstants.AlertConstants.ALERT_TIME_MINIMUM * TENS_PLACE_DENOMINATOR);
- private static final int MAXIMUM_ALERT_TONE_TIME = (int) (SdlConstants.AlertConstants.ALERT_TIME_MAXIMUM * TENS_PLACE_DENOMINATOR);
-
- //this is your default selection for tone duration. again, divide by 10 for the actual time in seconds.
- private static final float DEFAULT_TONE_DURATION = 5.0f; // 5.0 seconds
-
- private EditText et_alert_textToSpeak;
- private EditText et_alert_line1;
- private EditText et_alert_line2;
- private EditText et_alert_line3;
-
- private TextView tv_alert_toneDuration;
-
- private CheckBox check_alert_playTone;
-
- private SeekBar seek_alert_toneDuration;
- private SeekBarCalculator progressCalculator;
-
- private String secondsStr;
-
- //TODO - leaving these out for now - MRB
- //private CheckBox check_alert_includeSoftButtons;
- //private Button but_alert_includeSoftButtons;
-
- public SdlAlertDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.alert);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- secondsStr = context.getResources().getString(R.string.units_seconds);
- progressCalculator = new SeekBarCalculator(MINIMUM_ALERT_TONE_TIME, MAXIMUM_ALERT_TONE_TIME, TENS_PLACE_DENOMINATOR);
-
- et_alert_textToSpeak = (EditText) view.findViewById(R.id.et_alert_textToSpeak);
- et_alert_line1 = (EditText) view.findViewById(R.id.et_alert_line1);
- et_alert_line2 = (EditText) view.findViewById(R.id.et_alert_line2);
- et_alert_line3 = (EditText) view.findViewById(R.id.et_alert_line3);
-
- tv_alert_toneDuration = (TextView) view.findViewById(R.id.tv_alert_toneDuration);
-
- seek_alert_toneDuration = (SeekBar) view.findViewById(R.id.seek_alert_toneDuration);
- seek_alert_toneDuration.setMax(progressCalculator.getMaxProgress());
- seek_alert_toneDuration.setProgress(progressCalculator.calculateProgress(DEFAULT_TONE_DURATION));
- seek_alert_toneDuration.setOnSeekBarChangeListener(this);
-
- check_alert_playTone = (CheckBox) view.findViewById(R.id.check_alert_playTone);
-
- //make initial updates to the UI using default values
- updateProgressText(DEFAULT_TONE_DURATION);
-
- //TODO - leaving these out for now - MRB
- //check_alert_includeSoftButtons = (CheckBox) view.findViewById(R.id.check_alert_includeSoftButtons);
- //
- //but_alert_includeSoftButtons = (Button) view.findViewById(R.id.but_alert_includeSoftButtons);
- //TODO - add on click listener to this button.
- }
-
- private void updateProgressText(float progress){
- StringBuilder strBuilder = new StringBuilder();
- strBuilder.append(progress);
- strBuilder.append(secondsStr);
- tv_alert_toneDuration.setText(strBuilder.toString());
- }
-
- // dialog button listsners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- String textToSpeak = et_alert_textToSpeak.getText().toString();
- String line1 = et_alert_line1.getText().toString();
- String line2 = et_alert_line2.getText().toString();
- String line3 = et_alert_line3.getText().toString();
- int toneDurationInS = (int) progressCalculator.calculateValue(seek_alert_toneDuration.getProgress());
- int toneDurationInMs = MathUtils.convertSecsToMillisecs(toneDurationInS);
- boolean playTone = check_alert_playTone.isChecked();
-
- if(textToSpeak.equals("")){
- textToSpeak = null;
- }
- if(line1.equals("")){
- line1 = " ";
- }
- if(line2.equals("")){
- line2 = " ";
- }
- if(line3.equals("")){
- line3 = " ";
- }
-
- RPCRequest result = SdlRequestFactory.alert(textToSpeak, line1, line2, line3, playTone, toneDurationInMs);
- notifyListener(result);
- }
- };
-
- /*
- * On Seek Bar Changed Listener Methods
- */
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- updateProgressText(progressCalculator.calculateValue(progress));
- }
-
- @Override public void onStartTrackingTouch(SeekBar seekBar) {}
- @Override public void onStopTrackingTouch(SeekBar seekBar) {}
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlConnectionDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlConnectionDialog.java
deleted file mode 100644
index 56ad25d59..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SdlConnectionDialog.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.EditText;
-
-import com.livio.sdl.IpAddress;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdltester.R;
-
-public class SdlConnectionDialog extends BaseOkCancelDialog {
-
- private static final String DIALOG_TITLE = "SDL Connection";
-
- private EditText et_ipAddress, et_ipPort;
-
- public SdlConnectionDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.sdl_connection);
- setPositiveButton(okButtonListener);
- setNegativeButton(cancelListener);
- createDialog();
- }
-
- public SdlConnectionDialog(Context context, String initIpAddress, String initPort){
- this(context);
- setEditTextStrings(initIpAddress, initPort);
- }
-
- private void setEditTextStrings(String ipAddress, String ipPort){
- et_ipAddress.setText(ipAddress);
- et_ipPort.setText(ipPort);
- }
-
- @Override
- protected void findViews(View parent) {
- et_ipAddress = (EditText) parent.findViewById(R.id.et_ipAddress);
- et_ipPort = (EditText) parent.findViewById(R.id.et_ipPort);
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- final String ipAddress = et_ipAddress.getText().toString();
- final String ipPort = et_ipPort.getText().toString();
-
- IpAddress result = new IpAddress(ipAddress, ipPort);
- notifyListener(result);
- }
- };
-
- private final DialogInterface.OnClickListener cancelListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- notifyListener(null);
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetAppIconDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetAppIconDialog.java
deleted file mode 100644
index e0937b097..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetAppIconDialog.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.adapters.SdlImageAdapter;
-import com.livio.sdl.dialogs.BaseImageListDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class SetAppIconDialog extends BaseImageListDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SET_APP_ICON;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- public SetAppIconDialog(Context context, List<SdlImageItem> imageList) {
- super(context, DIALOG_TITLE, imageList);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- listview = (ListView) parent.findViewById(R.id.listView);
- listview.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- SdlImageItem selectedItem = ((SdlImageAdapter) parent.getAdapter()).getItem(position);
-
- RPCRequest result = SdlRequestFactory.setAppIcon(selectedItem.getImageName());
- notifyListener(result);
-
- dismiss();
- }
- });
- }
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetMediaClockTimerDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetMediaClockTimerDialog.java
deleted file mode 100644
index 63c245fb4..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SetMediaClockTimerDialog.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.text.InputFilter;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemSelectedListener;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.Spinner;
-import android.widget.TextView;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.enums.SdlUpdateMode;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdl.viewhelpers.MinMaxInputFilter;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-
-public class SetMediaClockTimerDialog extends BaseOkCancelDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SET_MEDIA_CLOCK_TIMER;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private static final int HOURS_MIN = SdlConstants.SetMediaClockTimerConstants.HOURS_MINIMUM;
- private static final int HOURS_MAX = SdlConstants.SetMediaClockTimerConstants.HOURS_MAXIMUM;
- private static final int MINS_MIN = SdlConstants.SetMediaClockTimerConstants.MINUTES_MINIMUM;
- private static final int MINS_MAX = SdlConstants.SetMediaClockTimerConstants.MINUTES_MAXIMUM;
- private static final int SECS_MIN = SdlConstants.SetMediaClockTimerConstants.SECONDS_MINIMUM;
- private static final int SECS_MAX = SdlConstants.SetMediaClockTimerConstants.SECONDS_MAXIMUM;
-
- private Spinner spin_mediaClock_type;
- private EditText et_mediaClock_hrs, et_mediaClock_mins, et_mediaClock_secs;
- private TextView tv_mediaClock_clock;
- private LinearLayout ll_mediaClock_clockContainer;
-
- public SetMediaClockTimerDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.set_media_clock_timer);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- spin_mediaClock_type = (Spinner) parent.findViewById(R.id.spin_mediaClock_updateMode);
- spin_mediaClock_type.setAdapter(AndroidUtils.createSpinnerAdapter(context, SdlUpdateMode.values()));
- spin_mediaClock_type.setOnItemSelectedListener(new OnItemSelectedListener() {
- @Override public void onNothingSelected(AdapterView<?> arg0) {}
-
- @Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- SdlUpdateMode mode = (SdlUpdateMode) parent.getAdapter().getItem(position);
- onModeUpdated(mode);
- }
- });
-
- et_mediaClock_hrs = (EditText) parent.findViewById(R.id.et_mediaClockHours);
- et_mediaClock_hrs.setFilters(new InputFilter[]{new MinMaxInputFilter(HOURS_MIN, HOURS_MAX)});
- et_mediaClock_mins = (EditText) parent.findViewById(R.id.et_mediaClockMins);
- et_mediaClock_mins.setFilters(new InputFilter[]{new MinMaxInputFilter(MINS_MIN, MINS_MAX)});
- et_mediaClock_secs = (EditText) parent.findViewById(R.id.et_mediaClockSecs);
- et_mediaClock_secs.setFilters(new InputFilter[]{new MinMaxInputFilter(SECS_MIN, SECS_MAX)});
-
- tv_mediaClock_clock = (TextView) parent.findViewById(R.id.tv_mediaClock_clock);
-
- ll_mediaClock_clockContainer = (LinearLayout) parent.findViewById(R.id.ll_clock);
- }
-
- private void onModeUpdated(SdlUpdateMode mode){
- enableClockView( (mode == SdlUpdateMode.COUNT_DOWN || mode == SdlUpdateMode.COUNT_UP) );
- }
-
- private void enableClockView(boolean enable){
- int visibility = (enable) ? View.VISIBLE : View.GONE;
- tv_mediaClock_clock.setVisibility(visibility);
- ll_mediaClock_clockContainer.setVisibility(visibility);
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- SdlUpdateMode mode = (SdlUpdateMode) spin_mediaClock_type.getSelectedItem();
- UpdateMode legacyMode = SdlUpdateMode.translateToLegacy(mode);
- RPCRequest result;
-
- if(mode == SdlUpdateMode.COUNT_UP || mode == SdlUpdateMode.COUNT_DOWN){
- String hours = et_mediaClock_hrs.getText().toString();
- String mins = et_mediaClock_mins.getText().toString();
- String secs = et_mediaClock_secs.getText().toString();
-
- // if user left a field blank, let's assume it's a 0
- hours = (hours.length() > 0) ? hours : "0";
- mins = (mins.length() > 0) ? mins : "0";
- secs = (secs.length() > 0) ? secs : "0";
-
- result = SdlRequestFactory.setMediaClockTimer(legacyMode, Integer.parseInt(hours), Integer.parseInt(mins), Integer.parseInt(secs));
- }
- else{
- result = SdlRequestFactory.setMediaClockTimer(legacyMode);
- }
-
- notifyListener(result);
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ShowDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ShowDialog.java
deleted file mode 100644
index cf0964cbe..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/ShowDialog.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import java.util.List;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-import android.widget.Spinner;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlImageItem;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseAlertDialog;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.dialogs.ImageListDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.enums.SdlTextAlignment;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-
-public class ShowDialog extends BaseOkCancelDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SHOW;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private CheckBox check_show1, check_show2, check_show3, check_show4, check_statusBar, check_imageName;
- private EditText et_show1, et_show2, et_show3, et_show4, et_statusBar, et_imageName;
- private Spinner spin_textAlignment;
- private SdlImageItem selectedImage;
-
- public ShowDialog(final Context context, final List<SdlImageItem> images){
- super(context, DIALOG_TITLE, R.layout.show);
- setPositiveButton(okButtonListener);
-
- if(images == null || images.size() <= 0){
- check_imageName.setVisibility(View.GONE);
- et_imageName.setVisibility(View.GONE);
- }
-
- check_imageName.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- if(isChecked){
- if(images == null || images.size() <= 0){
- Toast.makeText(context, "No images have been added to the system yet.", Toast.LENGTH_LONG).show();
- }
- else{
- BaseAlertDialog selectImageDialog = new ImageListDialog(context, images);
- selectImageDialog.setListener(new BaseAlertDialog.Listener() {
- @Override
- public void onResult(Object resultData) {
- selectedImage = (SdlImageItem) resultData;
- et_imageName.setText(selectedImage.getImageName());
- }
- });
- selectImageDialog.show();
- }
- }
- else{
- et_imageName.setText("");
- }
- }
- });
- createDialog();
- }
-
- @Override
- protected void findViews(View view){
- check_show1 = (CheckBox) view.findViewById(R.id.check_show1);
- check_show1.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- et_show1.setEnabled(isChecked);
- }
- });
- check_show2 = (CheckBox) view.findViewById(R.id.check_show2);
- check_show2.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- et_show2.setEnabled(isChecked);
- }
- });
- check_show3 = (CheckBox) view.findViewById(R.id.check_show3);
- check_show3.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- et_show3.setEnabled(isChecked);
- }
- });
- check_show4 = (CheckBox) view.findViewById(R.id.check_show4);
- check_show4.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- et_show4.setEnabled(isChecked);
- }
- });
- check_statusBar = (CheckBox) view.findViewById(R.id.check_statusBar);
- check_statusBar.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- et_statusBar.setEnabled(isChecked);
- }
- });
- check_imageName = (CheckBox) view.findViewById(R.id.check_enable_image);
-
- et_show1 = (EditText) view.findViewById(R.id.et_show1);
- et_show1.setEnabled(check_show1.isChecked());
- et_show2 = (EditText) view.findViewById(R.id.et_show2);
- et_show2.setEnabled(check_show2.isChecked());
- et_show3 = (EditText) view.findViewById(R.id.et_show3);
- et_show3.setEnabled(check_show3.isChecked());
- et_show4 = (EditText) view.findViewById(R.id.et_show4);
- et_show4.setEnabled(check_show4.isChecked());
- et_statusBar = (EditText) view.findViewById(R.id.et_statusBar);
- et_statusBar.setEnabled(check_statusBar.isChecked());
- et_imageName = (EditText) view.findViewById(R.id.et_show_image);
-
-
- spin_textAlignment = (Spinner) view.findViewById(R.id.spin_textAlignment);
- spin_textAlignment.setAdapter(AndroidUtils.createSpinnerAdapter(context, SdlTextAlignment.values()));
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- String line1 = null, line2 = null, line3 = null, line4 = null, statusBar = null, imageName = null;
- TextAlignment alignment = null;
-
- if(et_show1.isEnabled()){
- line1 = et_show1.getText().toString();
- if(line1.length() <= 0){
- line1 = " ";
- }
- }
-
- if(et_show2.isEnabled()){
- line2 = et_show2.getText().toString();
- if(line2.length() <= 0){
- line2 = " ";
- }
- }
-
- if(et_show3.isEnabled()){
- line3 = et_show3.getText().toString();
- if(line3.length() <= 0){
- line3 = " ";
- }
- }
-
- if(et_show4.isEnabled()){
- line4 = et_show4.getText().toString();
- if(line4.length() <= 0){
- line4 = " ";
- }
- }
-
- if(et_statusBar.isEnabled()){
- statusBar = et_statusBar.getText().toString();
- if(statusBar.length() <= 0){
- statusBar = " ";
- }
- }
-
- if(spin_textAlignment.getSelectedItemPosition() != 0){
- SdlTextAlignment sdlAlignment = (SdlTextAlignment) spin_textAlignment.getSelectedItem();
- alignment = SdlTextAlignment.translateToLegacy(sdlAlignment);
- }
-
- if(selectedImage != null){
- imageName = selectedImage.getImageName();
- }
-
- RPCRequest result = SdlRequestFactory.show(line1, line2, line3, line4, statusBar, alignment, imageName);
- notifyListener(result);
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SliderDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SliderDialog.java
deleted file mode 100644
index 981379dbb..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SliderDialog.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.res.Resources;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.SeekBar;
-import android.widget.SeekBar.OnSeekBarChangeListener;
-import android.widget.TextView;
-
-import com.livio.sdl.SdlConstants;
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.utils.MathUtils;
-import com.livio.sdl.viewhelpers.SeekBarCalculator;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-
-public class SliderDialog extends BaseOkCancelDialog {
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SLIDER;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private static final int NUM_OF_TICKS_MIN = SdlConstants.SliderConstants.NUM_OF_TICKS_MIN;
- private static final int NUM_OF_TICKS_MAX = SdlConstants.SliderConstants.NUM_OF_TICKS_MAX;
- private static final int START_POSITION_MIN = SdlConstants.SliderConstants.START_POSITION_MIN;
- private static final int TIMEOUT_MIN = SdlConstants.SliderConstants.TIMEOUT_MIN;
- private static final int TIMEOUT_MAX = SdlConstants.SliderConstants.TIMEOUT_MAX;
-
- private static final int NUM_OF_TICKS_DEFAULT = 10;
- private static final int START_POSITION_DEFAULT = 1;
- private static final int TIMEOUT_DEFAULT = 10;
-
- private EditText et_slider_title, et_slider_footer;
- private SeekBar seek_slider_numOfTicks, seek_slider_startPosition, seek_slider_timeout;
- private TextView tv_slider_numOfTicks, tv_slider_startPosition, tv_slider_timeout;
- private SeekBarCalculator numOfTicksCalculator, startPositionCalculator, timeoutCalculator;
-
- private String numOfTicks, startPosition, timeout;
-
- public SliderDialog(Context context) {
- super(context, DIALOG_TITLE, R.layout.slider);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View parent) {
- numOfTicksCalculator = new SeekBarCalculator(NUM_OF_TICKS_MIN, NUM_OF_TICKS_MAX);
- startPositionCalculator = new SeekBarCalculator(START_POSITION_MIN, NUM_OF_TICKS_MAX);
- timeoutCalculator = new SeekBarCalculator(TIMEOUT_MIN, TIMEOUT_MAX);
-
- Resources res = context.getResources();
- numOfTicks = res.getString(R.string.slider_ticks);
- startPosition= res.getString(R.string.slider_start_position);
- timeout = res.getString(R.string.timeout);
-
- et_slider_title = (EditText) parent.findViewById(R.id.et_slider_title);
- et_slider_footer = (EditText) parent.findViewById(R.id.et_slider_footer);
- tv_slider_numOfTicks = (TextView) parent.findViewById(R.id.tv_slider_numOfTicks);
- tv_slider_startPosition = (TextView) parent.findViewById(R.id.tv_slider_startPosition);
- tv_slider_timeout = (TextView) parent.findViewById(R.id.tv_slider_timeout);
-
- updateTicks(NUM_OF_TICKS_DEFAULT);
- updateStartPosition(START_POSITION_DEFAULT);
- updateTimeout(TIMEOUT_DEFAULT);
-
- seek_slider_numOfTicks = (SeekBar) parent.findViewById(R.id.seek_slider_numOfTicks);
- seek_slider_numOfTicks.setMax(numOfTicksCalculator.getMaxProgress());
- seek_slider_numOfTicks.setProgress(numOfTicksCalculator.calculateProgress(NUM_OF_TICKS_DEFAULT));
- seek_slider_numOfTicks.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
- @Override public void onStopTrackingTouch(SeekBar seekBar) {}
- @Override public void onStartTrackingTouch(SeekBar seekBar) {}
-
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- int adjustedProgress = (int) numOfTicksCalculator.calculateValue(progress);
- updateTicks(adjustedProgress);
- updateStartPositionMax(adjustedProgress);
- }
- });
-
- seek_slider_startPosition = (SeekBar) parent.findViewById(R.id.seek_slider_startPosition);
- seek_slider_startPosition.setProgress(startPositionCalculator.calculateProgress(START_POSITION_DEFAULT));
- seek_slider_startPosition.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
- @Override public void onStopTrackingTouch(SeekBar seekBar) {}
- @Override public void onStartTrackingTouch(SeekBar seekBar) {}
-
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- updateStartPosition((int) startPositionCalculator.calculateValue(progress));
- }
- });
-
- seek_slider_timeout = (SeekBar) parent.findViewById(R.id.seek_slider_timeout);
- seek_slider_timeout.setMax(timeoutCalculator.getMaxProgress());
- seek_slider_timeout.setProgress(timeoutCalculator.calculateProgress(TIMEOUT_DEFAULT));
- seek_slider_timeout.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
- @Override public void onStopTrackingTouch(SeekBar seekBar) {}
- @Override public void onStartTrackingTouch(SeekBar seekBar) {}
-
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- updateTimeout((int) timeoutCalculator.calculateValue(progress));
- }
- });
-
- updateStartPositionMax(NUM_OF_TICKS_DEFAULT);
- }
-
- private void updateTicks(int ticks){
- tv_slider_numOfTicks.setText(new StringBuilder().append(numOfTicks).append(ticks).toString());
- }
-
- private void updateStartPosition(int start){
- tv_slider_startPosition.setText(new StringBuilder().append(startPosition).append(start).toString());
- }
-
- private void updateStartPositionMax(int numOfTicks){
- startPositionCalculator.setMaxValue(numOfTicks);
- seek_slider_startPosition.setMax(startPositionCalculator.getMaxProgress());
- }
-
- private void updateTimeout(int newTimeout){
- tv_slider_timeout.setText(new StringBuilder().append(timeout).append(newTimeout).append(" s").toString());
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- String sliderTitle = et_slider_title.getText().toString();
- String sliderFooter = et_slider_footer.getText().toString();
-
- int numOfTicks = (int) numOfTicksCalculator.calculateValue(seek_slider_numOfTicks.getProgress());
- int startPosition = (int) startPositionCalculator.calculateValue(seek_slider_startPosition.getProgress());
-
- int timeout = (int) timeoutCalculator.calculateValue(seek_slider_timeout.getProgress());
- timeout = MathUtils.convertSecsToMillisecs(timeout);
-
- if(sliderTitle.length() <= 0){
- sliderTitle = " ";
- }
- if(sliderFooter.length() <= 0){
- sliderFooter = " ";
- }
-
- RPCRequest result = SdlRequestFactory.slider(sliderTitle, sliderFooter, numOfTicks, startPosition, timeout);
- notifyListener(result);
- }
- };
-
-}
diff --git a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SpeakDialog.java b/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SpeakDialog.java
deleted file mode 100644
index 0aa44fb03..000000000
--- a/SDL_Android/LivioTesterApp/src/com/livio/sdltester/dialogs/SpeakDialog.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.livio.sdltester.dialogs;
-
-import android.content.Context;
-import android.content.DialogInterface;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.Spinner;
-import android.widget.Toast;
-
-import com.livio.sdl.SdlRequestFactory;
-import com.livio.sdl.dialogs.BaseOkCancelDialog;
-import com.livio.sdl.enums.SdlCommand;
-import com.livio.sdl.enums.SdlSpeechCapability;
-import com.livio.sdl.utils.AndroidUtils;
-import com.livio.sdltester.R;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-
-public class SpeakDialog extends BaseOkCancelDialog{
-
- private static final SdlCommand SYNC_COMMAND = SdlCommand.SPEAK;
- private static final String DIALOG_TITLE = SYNC_COMMAND.toString();
-
- private EditText et_textToSpeak;
- private Spinner spin_speechCapabilities;
-
- public SpeakDialog(Context context){
- super(context, DIALOG_TITLE, R.layout.speak);
- setPositiveButton(okButtonListener);
- createDialog();
- }
-
- @Override
- protected void findViews(View view){
- et_textToSpeak = (EditText) view.findViewById(R.id.et_textToSpeak);
- spin_speechCapabilities = (Spinner) view.findViewById(R.id.spin_speechCapabilities);
- spin_speechCapabilities.setAdapter(AndroidUtils.createSpinnerAdapter(context, SdlSpeechCapability.values()));
- }
-
- //dialog button listeners
- private final DialogInterface.OnClickListener okButtonListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- final String ttsText = et_textToSpeak.getText().toString();
- final SdlSpeechCapability sdlSpeechCapabilities = (SdlSpeechCapability) spin_speechCapabilities.getSelectedItem();
- final SpeechCapabilities speechCapabilities = SdlSpeechCapability.translateToLegacy(sdlSpeechCapabilities);
-
- if(speechCapabilities != SpeechCapabilities.SILENCE){
- if(ttsText.length() > 0){
- RPCRequest result = SdlRequestFactory.speak(ttsText, speechCapabilities);
- notifyListener(result);
- }
- else{
- Toast.makeText(context, "Must enter text to speak.", Toast.LENGTH_LONG).show();
- }
- }
- else{
- RPCRequest result = SdlRequestFactory.speak(ttsText, speechCapabilities);
- notifyListener(result);
- }
-
-
-
- }
- };
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/.classpath b/SDL_Android/SmartDeviceLinkProxyAndroid/.classpath
deleted file mode 100755
index 0461652ec..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/.project b/SDL_Android/SmartDeviceLinkProxyAndroid/.project
deleted file mode 100755
index adf596944..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>SmartDeviceLinkProxyAndroid</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/.settings/org.eclipse.jdt.core.prefs b/SDL_Android/SmartDeviceLinkProxyAndroid/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100755
index 54e493c07..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/AndroidManifest.xml b/SDL_Android/SmartDeviceLinkProxyAndroid/AndroidManifest.xml
deleted file mode 100755
index 429b64f7e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<manifest package="com.smartdevicelink" xmlns:android="http://schemas.android.com/apk/res/android"><application android:debuggable="true"></application>
-</manifest>
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/bin/AndroidManifest.xml b/SDL_Android/SmartDeviceLinkProxyAndroid/bin/AndroidManifest.xml
deleted file mode 100644
index 429b64f7e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/bin/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<manifest package="com.smartdevicelink" xmlns:android="http://schemas.android.com/apk/res/android"><application android:debuggable="true"></application>
-</manifest>
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/gen/com/smartdevicelink/BuildConfig.java b/SDL_Android/SmartDeviceLinkProxyAndroid/gen/com/smartdevicelink/BuildConfig.java
deleted file mode 100644
index cdc900f72..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/gen/com/smartdevicelink/BuildConfig.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Automatically generated file. DO NOT MODIFY */
-package com.smartdevicelink;
-
-public final class BuildConfig {
- public final static boolean DEBUG = true;
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/project.properties b/SDL_Android/SmartDeviceLinkProxyAndroid/project.properties
deleted file mode 100755
index 8e4bc5fdc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/project.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-
-# Project target.
-target=android-19
-android.library=true
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkException.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkException.java
deleted file mode 100755
index d31e1f384..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.smartdevicelink.exception;
-
-
-public class SmartDeviceLinkException extends Exception {
-
- private static final long serialVersionUID = 5922492291870772815L;
-
- protected Throwable detail = null;
- private SmartDeviceLinkExceptionCause _SmartDeviceLinkExceptionCause = null;
-
- public SmartDeviceLinkException(String msg, SmartDeviceLinkExceptionCause exceptionCause) {
- super(msg);
- _SmartDeviceLinkExceptionCause = exceptionCause;
- }
-
- public SmartDeviceLinkException(String msg, Throwable ex, SmartDeviceLinkExceptionCause exceptionCause) {
- super(msg + " --- Check inner exception for diagnostic details");
- detail = ex;
- _SmartDeviceLinkExceptionCause = exceptionCause;
- }
-
- public SmartDeviceLinkException(Throwable ex) {
- super(ex.getMessage());
- detail = ex;
- }
-
- public SmartDeviceLinkExceptionCause getSmartDeviceLinkExceptionCause() {
- return _SmartDeviceLinkExceptionCause;
- }
-
- public Throwable getInnerException() {
- return detail;
- }
-
- public String toString() {
- String ret = this.getClass().getName();
- ret += ": " + this.getMessage();
- if(this.getSmartDeviceLinkExceptionCause() != null){
- ret += "\nSmartDeviceLinkExceptionCause: " + this.getSmartDeviceLinkExceptionCause().name();
- }
- if (detail != null) {
- ret += "\nnested: " + detail.toString();
- detail.printStackTrace();
- }
- return ret;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkExceptionCause.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkExceptionCause.java
deleted file mode 100755
index d83926f12..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/exception/SmartDeviceLinkExceptionCause.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.smartdevicelink.exception;
-
-public enum SmartDeviceLinkExceptionCause {
- BLUETOOTH_ADAPTER_NULL,
- BLUETOOTH_DISABLED,
- INCORRECT_LIFECYCLE_MODEL,
- INVALID_ARGUMENT,
- INVALID_RPC_PARAMETER,
- PERMISSION_DENIED,
- RESERVED_CORRELATION_ID,
- SMARTDEVICELINK_CONNECTION_FAILED,
- SMARTDEVICELINK_PROXY_CYCLED,
- SMARTDEVICELINK_PROXY_DISPOSED,
- SMARTDEVICELINK_PROXY_OBSOLETE,
- SMARTDEVICELINK_REGISTRATION_ERROR,
- SMARTDEVICELINK_UNAVAILALBE,
- INVALID_HEADER;
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/marshal/JsonRPCMarshaller.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/marshal/JsonRPCMarshaller.java
deleted file mode 100755
index dd2039da6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/marshal/JsonRPCMarshaller.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.smartdevicelink.marshal;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.trace.*;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.util.DebugTool;
-
-/*
- * Responsible for marshalling and unmarshing between RPC Objects and byte streams that are sent
- * over transmission
- */
-
-public class JsonRPCMarshaller {
-
- private static final String SMARTDEVICELINK_LIB_PRIVATE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- public static byte[] marshall(RPCMessage msg, byte version) {
- byte[] jsonBytes = null;
- try {
- JSONObject jsonObject = msg.serializeJSON(version);
- jsonBytes = jsonObject.toString().getBytes();
-
- SmartDeviceLinkTrace.logMarshallingEvent(InterfaceActivityDirection.Transmit, jsonBytes, SMARTDEVICELINK_LIB_PRIVATE_KEY);
- } catch (JSONException e) {
- DebugTool.logError("Failed to encode messages to JSON.", e);
- }
- return jsonBytes;
- }
-
- public static Hashtable<String, Object> unmarshall(byte[] message) {
- SmartDeviceLinkTrace.logMarshallingEvent(InterfaceActivityDirection.Receive, message, SMARTDEVICELINK_LIB_PRIVATE_KEY);
- Hashtable<String, Object> ret = null;
- try {
- String jsonString = new String(message);
- JSONObject jsonObject = new JSONObject(jsonString);
- ret = deserializeJSONObject(jsonObject);
- } catch (JSONException e) {
- DebugTool.logError("Failed to parse JSON", e);
- }
- return ret;
- }
-
- public static Hashtable<String, Object> deserializeJSONObject(JSONObject jsonObject)
- throws JSONException {
- Hashtable<String, Object> ret = new Hashtable<String, Object>();
- Iterator it = jsonObject.keys();
- String key = null;
- while (it.hasNext()) {
- key = (String) it.next();
- Object value = jsonObject.get(key);
- if (value instanceof JSONObject) {
- ret.put(key, deserializeJSONObject((JSONObject)value));
- } else if (value instanceof JSONArray) {
- JSONArray arrayValue = (JSONArray) value;
- Vector<Object> putList = new Vector<Object>(arrayValue.length());
- for (int i = 0; i < arrayValue.length(); i++) {
- Object anObject = arrayValue.get(i);
- if (anObject instanceof JSONObject) {
- Hashtable<String, Object> deserializedObject = deserializeJSONObject((JSONObject)anObject);
- putList.add(deserializedObject);
- } else {
- putList.add(anObject);
- }
- }
- ret.put(key, putList);
- } else {
- ret.put(key, value);
- }
- }
- return ret;
- }
-
- private static JSONArray serializeVector(Vector vector) throws JSONException{
- JSONArray toPut = new JSONArray();
- Iterator<Object> valueIterator = (vector).iterator();
- while(valueIterator.hasNext()){
- Object anObject = valueIterator.next();
- if (anObject instanceof RPCStruct) {
- RPCStruct toSerialize = (RPCStruct) anObject;
- toPut.put(toSerialize.serializeJSON());
- } else if(anObject instanceof Hashtable){
- Hashtable toSerialize = (Hashtable)anObject;
- toPut.put(serializeHashtable(toSerialize));
- } else {
- toPut.put(anObject);
- }
- }
- return toPut;
- }
-
- public static JSONObject serializeHashtable(Hashtable<String, Object> hash) throws JSONException{
- JSONObject obj = new JSONObject();
- Iterator<String> hashKeyIterator = hash.keySet().iterator();
- while (hashKeyIterator.hasNext()){
- String key = (String) hashKeyIterator.next();
- Object value = hash.get(key);
- if (value instanceof RPCStruct) {
- obj.put(key, ((RPCStruct) value).serializeJSON());
- } else if (value instanceof Vector<?>) {
- obj.put(key, serializeVector((Vector) value));
- } else if (value instanceof Hashtable) {
- obj.put(key, serializeHashtable((Hashtable)value));
- } else {
- obj.put(key, value);
- }
- }
- return obj;
- }
-
- /*
- public static JSONObject serializeHashtable(Hashtable<String, Object> hash)
- throws JSONException {
- JSONObject obj = new JSONObject();
- Iterator<String> hashKeyIterator = hash.keySet().iterator();
- while (hashKeyIterator.hasNext()) {
- String key = (String) hashKeyIterator.next();
- Object value = hash.get(key);
- if (value instanceof RPCStruct) {
- obj.put(key, ((RPCStruct) value).serializeJSON());
- } else if (value instanceof Vector<?>) {
- JSONArray toPut = new JSONArray();
- Iterator<Object> valueIterator = ((Vector) value).iterator();
- while (valueIterator.hasNext()) {
- Object anObject = valueIterator.next();
- if (anObject instanceof RPCStruct) {
- RPCStruct toSerialize = (RPCStruct) anObject;
- toPut.put(toSerialize.serializeJSON());
- } else if (anObject instanceof Hashtable) {
- Hashtable hashtable = (Hashtable) anObject;
- RPCStruct toSerialize = new RPCStruct(hashtable);
- toPut.put(toSerialize.serializeJSON());
- } else {
- toPut.put(anObject);
- }
- }
- obj.put(key, toPut);
- } else if (value instanceof Hashtable) {
- obj.put(key, serializeHashtable((Hashtable)value));
- } else {
- obj.put(key, value);
- }
- }
- return obj;
- }
- */
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IDispatchingStrategy.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IDispatchingStrategy.java
deleted file mode 100755
index 732496a2b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IDispatchingStrategy.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.smartdevicelink.messageDispatcher;
-
-public interface IDispatchingStrategy<messageType> {
- public void dispatch(messageType message);
-
- public void handleDispatchingError(String info, Exception ex);
-
- public void handleQueueingError(String info, Exception ex);
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IncomingProtocolMessageComparitor.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IncomingProtocolMessageComparitor.java
deleted file mode 100755
index 54ce90158..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/IncomingProtocolMessageComparitor.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.messageDispatcher;
-
-import java.util.Comparator;
-
-import com.smartdevicelink.protocol.ProtocolMessage;
-
-public class IncomingProtocolMessageComparitor implements Comparator<ProtocolMessage> {
-
- @Override
- public int compare(ProtocolMessage arg0, ProtocolMessage arg1) {
- // Always return 0, turning the priority queue into a FIFO queue.
- return 0;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/InternalProxyMessageComparitor.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/InternalProxyMessageComparitor.java
deleted file mode 100755
index 56aa5cadb..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/InternalProxyMessageComparitor.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.messageDispatcher;
-
-import java.util.Comparator;
-
-import com.smartdevicelink.proxy.callbacks.InternalProxyMessage;
-
-public class InternalProxyMessageComparitor implements Comparator<InternalProxyMessage> {
-
- @Override
- public int compare(InternalProxyMessage arg0, InternalProxyMessage arg1) {
- // Always return 0, turning the priority queue into a FIFO queue.
- return 0;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/OutgoingProtocolMessageComparitor.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/OutgoingProtocolMessageComparitor.java
deleted file mode 100755
index 73cc7ed69..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/OutgoingProtocolMessageComparitor.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.smartdevicelink.messageDispatcher;
-
-import java.util.Comparator;
-
-import com.smartdevicelink.protocol.ProtocolMessage;
-
-public class OutgoingProtocolMessageComparitor implements Comparator<ProtocolMessage> {
-
- @Override
- public int compare(ProtocolMessage arg0, ProtocolMessage arg1) {
- // Always return 0, turning the priority queue into a FIFO queue.
- return 0;
- }
-}
-
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/ProxyMessageDispatcher.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/ProxyMessageDispatcher.java
deleted file mode 100755
index ca73b3ff1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/messageDispatcher/ProxyMessageDispatcher.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.smartdevicelink.messageDispatcher;
-
-import java.util.Comparator;
-import java.util.concurrent.PriorityBlockingQueue;
-
-import com.smartdevicelink.util.DebugTool;
-
-public class ProxyMessageDispatcher<messageType> {
- PriorityBlockingQueue<messageType> _queue = null;
- private Thread _messageDispatchingThread = null;
- IDispatchingStrategy<messageType> _strategy = null;
-
- // Boolean to track if disposed
- private Boolean dispatcherDisposed = false;
-
- public ProxyMessageDispatcher(String THREAD_NAME, Comparator<messageType> messageComparator,
- IDispatchingStrategy<messageType> strategy) {
- _queue = new PriorityBlockingQueue<messageType>(10, messageComparator);
-
- _strategy = strategy;
-
- // Create dispatching thread
- _messageDispatchingThread = new Thread(new Runnable() {public void run(){handleMessages();}});
- _messageDispatchingThread.setName(THREAD_NAME);
- _messageDispatchingThread.setDaemon(true);
- _messageDispatchingThread.start();
- }
-
- public void dispose() {
- dispatcherDisposed = true;
-
- if(_messageDispatchingThread != null) {
- _messageDispatchingThread.interrupt();
- _messageDispatchingThread = null;
- }
- }
-
- private void handleMessages() {
-
- try {
- messageType thisMessage;
-
- while(dispatcherDisposed == false) {
- thisMessage = _queue.take();
- _strategy.dispatch(thisMessage);
- }
- } catch (InterruptedException e) {
- // Thread was interrupted by dispose() method, no action required
- return;
- } catch (Exception e) {
- DebugTool.logError("Error occurred dispating message.", e);
- _strategy.handleDispatchingError("Error occurred dispating message.", e);
- }
- }
-
- public void queueMessage(messageType message) {
- try {
- _queue.put(message);
- } catch(ClassCastException e) {
- _strategy.handleQueueingError("ClassCastException encountered when queueing message.", e);
- } catch(Exception e) {
- _strategy.handleQueueingError("Exception encountered when queueing message.", e);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/AbstractProtocol.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/AbstractProtocol.java
deleted file mode 100755
index fde67d636..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/AbstractProtocol.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import com.smartdevicelink.protocol.SmartDeviceLinkProtocol.MessageFrameAssembler;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.trace.SmartDeviceLinkTrace;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-
-public abstract class AbstractProtocol {
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- private IProtocolListener _protocolListener = null;
- //protected IProtocolListener ProtocolListener() { return _protocolListener; }
-
- // Lock to ensure all frames are sent uninterupted
- private Object _frameLock = new Object();
-
- // Caller must provide a non-null IProtocolListener interface reference.
- public AbstractProtocol(IProtocolListener protocolListener) {
- if (protocolListener == null) {
- throw new IllegalArgumentException("Provided protocol listener interface reference is null");
- } // end-if
-
- _protocolListener = protocolListener;
- } // end-ctor
-
- // This method receives raw bytes as they arrive from transport. Those bytes
- // are then collected by the protocol and assembled into complete messages and
- // handled internally by the protocol or propagated to the protocol listener.
- public abstract void HandleReceivedBytes(byte[] receivedBytes, int length);
-
- // This method receives a protocol message (e.g. RPC, BULK, etc.) and processes
- // it for transmission over the transport. The results of this processing will
- // be sent to the onProtocolMessageBytesToSend() method on protocol listener
- // interface. Note that the ProtocolMessage itself contains information
- // about the type of message (e.g. RPC, BULK, etc.) and the protocol session
- // over which to send the message, etc.
- public abstract void SendMessage(ProtocolMessage msg);
-
- // This method starts a protocol session. A corresponding call to the protocol
- // listener onProtocolSessionStarted() method will be made when the protocol
- // session has been established.
- public abstract void StartProtocolSession(SessionType sessionType);
-
- // This method ends a protocol session. A corresponding call to the protocol
- // listener onProtocolSessionEnded() method will be made when the protocol
- // session has ended.
- public abstract void EndProtocolSession(SessionType sessionType, byte sessionID);
-
- // This method is called whenever the protocol receives a complete frame
- protected void handleProtocolFrameReceived(ProtocolFrameHeader header, byte[] data, MessageFrameAssembler assembler) {
- SmartDeviceLinkTrace.logProtocolEvent(InterfaceActivityDirection.Receive, header, data,
- 0, data.length, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- assembler.handleFrame(header, data);
- }
-
- // This method is called whenever a protocol has an entire frame to send
- protected void handleProtocolFrameToSend(ProtocolFrameHeader header, byte[] data, int offset, int length) {
- SmartDeviceLinkTrace.logProtocolEvent(InterfaceActivityDirection.Transmit, header, data,
- offset, length, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- synchronized(_frameLock) {
- byte[] frameHeader = header.assembleHeaderBytes();
- handleProtocolMessageBytesToSend(frameHeader, 0, frameHeader.length);
-
- if (data != null) {
- handleProtocolMessageBytesToSend(data, offset, length);
- } // end-if
- }
- }
-
- // This method handles protocol message bytes that are ready to send.
- // A callback is sent to the protocol listener.
- protected void handleProtocolMessageBytesToSend(byte[] bytesToSend,
- int offset, int length) {
- _protocolListener.onProtocolMessageBytesToSend(bytesToSend, offset, length);
- }
-
- // This method handles received protocol messages.
- protected void handleProtocolMessageReceived(ProtocolMessage message) {
- _protocolListener.onProtocolMessageReceived(message);
- }
-
- // This method handles the end of a protocol session. A callback is
- // sent to the protocol listener.
- protected void handleProtocolSessionEnded(SessionType sessionType,
- byte sessionID, String correlationID) {
- _protocolListener.onProtocolSessionEnded(sessionType, sessionID, correlationID);
- }
-
- // This method handles the startup of a protocol session. A callback is sent
- // to the protocol listener.
- protected void handleProtocolSessionStarted(SessionType sessionType,
- byte sessionID, byte version, String correlationID) {
- _protocolListener.onProtocolSessionStarted(sessionType, sessionID, version, correlationID);
- }
-
- // This method handles protocol errors. A callback is sent to the protocol
- // listener.
- protected void handleProtocolError(String string, Exception ex) {
- _protocolListener.onProtocolError(string, ex);
- }
-} // end-class
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/BinaryFrameHeader.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/BinaryFrameHeader.java
deleted file mode 100755
index e5bc9d7be..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/BinaryFrameHeader.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import com.smartdevicelink.util.BitConverter;
-
-public class BinaryFrameHeader {
- private byte _rpcType;
- private int _functionID;
- private int _correlationID;
- private int _jsonSize;
-
- private byte[] _jsonData;
- private byte[] _bulkData;
-
- public BinaryFrameHeader() {}
-
- public static BinaryFrameHeader parseBinaryHeader(byte[] binHeader) {
- BinaryFrameHeader msg = new BinaryFrameHeader();
-
- byte RPC_Type = (byte) (binHeader[0] >>> 4);
- msg.setRPCType(RPC_Type);
-
- int _functionID = (BitConverter.intFromByteArray(binHeader, 0) & 0x0FFFFFFF);
- msg.setFunctionID(_functionID);
-
- int corrID = BitConverter.intFromByteArray(binHeader, 4);
- msg.setCorrID(corrID);
-
- int _jsonSize = BitConverter.intFromByteArray(binHeader, 8);
- msg.setJsonSize(_jsonSize);
-
- if (_jsonSize > 0) {
- byte[] _jsonData = new byte[_jsonSize];
- System.arraycopy(binHeader, 12, _jsonData, 0, _jsonSize);
- msg.setJsonData(_jsonData);
- }
-
- if (binHeader.length - _jsonSize - 12 > 0) {
- byte[] _bulkData = new byte[binHeader.length - _jsonSize - 12];
- System.arraycopy(binHeader, 12 + _jsonSize, _bulkData, 0, _bulkData.length);
- msg.setBulkData(_bulkData);
- }
-
- return msg;
- }
-
- protected byte[] assembleHeaderBytes() {
- int binHeader = _functionID;
- binHeader |= (_rpcType << 28);
-
- byte[] ret = new byte[12];
- System.arraycopy(BitConverter.intToByteArray(binHeader), 0, ret, 0, 4);
- System.arraycopy(BitConverter.intToByteArray(_correlationID), 0, ret, 4, 4);
- System.arraycopy(BitConverter.intToByteArray(_jsonSize), 0, ret, 8, 4);
-
- return ret;
- }
-
- public byte getRPCType() {
- return _rpcType;
- }
-
- public void setRPCType(byte _rpcType) {
- this._rpcType = _rpcType;
- }
-
- public int getFunctionID() {
- return _functionID;
- }
-
- public void setFunctionID(int _functionID) {
- this._functionID = _functionID;
- }
-
- public int getCorrID() {
- return _correlationID;
- }
-
- public void setCorrID(int _correlationID) {
- this._correlationID = _correlationID;
- }
-
- public int getJsonSize() {
- return _jsonSize;
- }
-
- public void setJsonSize(int _jsonSize) {
- this._jsonSize = _jsonSize;
- }
-
- public byte[] getJsonData() {
- return _jsonData;
- }
-
- public void setJsonData(byte[] _jsonData) {
- this._jsonData = new byte[this._jsonSize];
- System.arraycopy(_jsonData, 0, this._jsonData, 0, _jsonSize);
- //this._jsonData = _jsonData;
- }
-
- public byte[] getBulkData() {
- return _bulkData;
- }
-
- public void setBulkData(byte[] _bulkData) {
- this._bulkData = _bulkData;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/IProtocolListener.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/IProtocolListener.java
deleted file mode 100755
index b031d0a34..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/IProtocolListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import com.smartdevicelink.protocol.enums.*;
-
-public interface IProtocolListener {
- // Called to indicate that these bytes are to be sent as part of a message.
- // This call includes the part of the message.
- void onProtocolMessageBytesToSend(byte[] msgBytes, int offset, int length);
-
- // Called to indicate that a complete message (RPC, BULK, etc.) has been
- // received. This call includes the message.
- void onProtocolMessageReceived(ProtocolMessage msg);
-
- // Called to indicate that a protocol session has been started (from either side)
- void onProtocolSessionStarted(SessionType sessionType, byte sessionID, byte version, String correlationID);
-
- // Called to indicate that a protocol session has ended (from either side)
- void onProtocolSessionEnded(SessionType sessionType, byte sessionID, String correlationID /*, String info, Exception ex*/);
-
- // Called to indicate that a protocol error was detected in received data.
- void onProtocolError(String info, Exception e);
-} // end-interfCe \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeader.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeader.java
deleted file mode 100755
index 134e7cdea..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeader.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import com.smartdevicelink.protocol.enums.FrameType;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.util.BitConverter;
-
-public class ProtocolFrameHeader {
- private byte version = 1;
- private boolean compressed = false;
- private FrameType frameType = FrameType.Control;
- private SessionType sessionType = SessionType.RPC;
- private byte frameData = 0;
- private byte sessionID;
- private int dataSize;
- private int messageID;
-
- public static final byte FrameDataSingleFrame = 0x00;
- public static final byte FrameDataFirstFrame = 0x00;
- public static final byte FrameDataFinalConsecutiveFrame = 0x00;
-
- public ProtocolFrameHeader() {}
-
- public static ProtocolFrameHeader parseSmartDeviceLinkProHeader(byte[] header) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
-
- byte version = (byte) (header[0] >>> 4);
- msg.setVersion(version);
-
- boolean compressed = 1 == ((header[0] & 0x08) >>> 3);
- msg.setCompressed(compressed);
-
- byte frameType = (byte) (header[0] & 0x07);
- msg.setFrameType(FrameType.valueOf(frameType));
-
- byte serviceType = header[1];
- msg.setSessionType(SessionType.valueOf(serviceType));
-
- byte frameData = header[2];
- msg.setFrameData(frameData);
-
- byte sessionID = header[3];
- msg.setSessionID(sessionID);
-
- int dataSize = BitConverter.intFromByteArray(header, 4);
- msg.setDataSize(dataSize);
-
- if (version == 2) {
- int messageID = BitConverter.intFromByteArray(header, 8);
- msg.setMessageID(messageID);
- } else msg.setMessageID(0);
-
- return msg;
- }
-
- protected byte[] assembleHeaderBytes() {
- int header = 0;
- header |= (version & 0x0F);
- header <<= 1;
- header |= (compressed ? 1 : 0);
- header <<= 3;
- header |= (frameType.value() & 0x07);
- header <<= 8;
- header |= (sessionType.value() & 0xFF);
- header <<= 8;
- header |= (frameData & 0xFF);
- header <<= 8;
- header |= (sessionID & 0xFF);
-
- if (version == 1) {
- byte[] ret = new byte[8];
- System.arraycopy(BitConverter.intToByteArray(header), 0, ret, 0, 4);
- System.arraycopy(BitConverter.intToByteArray(dataSize), 0, ret, 4, 4);
-
- return ret;
- } else if (version == 2) {
- byte[] ret = new byte[12];
- System.arraycopy(BitConverter.intToByteArray(header), 0, ret, 0, 4);
- System.arraycopy(BitConverter.intToByteArray(dataSize), 0, ret, 4, 4);
- System.arraycopy(BitConverter.intToByteArray(messageID), 0, ret, 8, 4);
-
- return ret;
- } else return null;
- }
-
- public String toString() {
- String ret = "";
- ret += "version " + version + ", " + (compressed ? "compressed" : "uncompressed") + "\n";
- ret += "frameType " + frameType + ", serviceType " + sessionType;
- ret += "\nframeData " + frameData;
- ret += ", sessionID " + sessionID;
- ret += ", dataSize " + dataSize;
- ret += ", messageID " + messageID;
- return ret;
- }
-
- public byte getVersion() {
- return version;
- }
-
- public void setVersion(byte version) {
- this.version = version;
- }
-
- public boolean isCompressed() {
- return compressed;
- }
-
- public void setCompressed(boolean compressed) {
- this.compressed = compressed;
- }
-
- public byte getFrameData() {
- return frameData;
- }
-
- public void setFrameData(byte frameData) {
- this.frameData = frameData;
- }
-
- public byte getSessionID() {
- return sessionID;
- }
-
- public void setSessionID(byte sessionID) {
- this.sessionID = sessionID;
- }
-
- public int getDataSize() {
- return dataSize;
- }
-
- public void setDataSize(int dataSize) {
- this.dataSize = dataSize;
- }
-
- public int getMessageID() {
- return messageID;
- }
-
- public void setMessageID(int messageID) {
- this.messageID = messageID;
- }
-
- public FrameType getFrameType() {
- return frameType;
- }
-
- public void setFrameType(FrameType frameType) {
- this.frameType = frameType;
- }
-
- public SessionType getSessionType() {
- return sessionType;
- }
-
- public void setSessionType(SessionType sessionType) {
- this.sessionType = sessionType;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeaderFactory.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeaderFactory.java
deleted file mode 100755
index 3a1e0d8c5..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolFrameHeaderFactory.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import com.smartdevicelink.protocol.enums.*;
-
-public class ProtocolFrameHeaderFactory {
-
- public static ProtocolFrameHeader createStartSession(SessionType serviceType, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Control);
- msg.setSessionType(serviceType);
- msg.setFrameData(FrameDataControlFrameType.StartSession.value());
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createStartSessionACK(SessionType serviceType, byte sessionID, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Control);
- msg.setSessionType(serviceType);
- msg.setSessionID(sessionID);
- msg.setFrameData(FrameDataControlFrameType.StartSessionACK.value());
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createStartSessionNACK(SessionType serviceType, byte sessionID, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Control);
- msg.setSessionType(serviceType);
- msg.setSessionID(sessionID);
- msg.setFrameData(FrameDataControlFrameType.StartSessionNACK.value());
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createEndSession(SessionType serviceType, byte sessionID, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Control);
- msg.setSessionType(serviceType);
- msg.setSessionID(sessionID);
- msg.setFrameData(FrameDataControlFrameType.EndSession.value());
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createSingleSendData(SessionType serviceType, byte sessionID,
- int dataLength, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Single);
- msg.setSessionType(serviceType);
- msg.setFrameData(ProtocolFrameHeader.FrameDataSingleFrame);
- msg.setSessionID(sessionID);
- msg.setDataSize(dataLength);
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createMultiSendDataFirst(SessionType serviceType, byte sessionID,
- int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.First);
- msg.setSessionType(serviceType);
- msg.setFrameData(ProtocolFrameHeader.FrameDataFirstFrame);
- msg.setSessionID(sessionID);
- msg.setDataSize(8);
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createMultiSendDataRest(SessionType serviceType, byte sessionID,
- int dataLength, byte frameSequenceNumber, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Consecutive);
- msg.setSessionType(serviceType);
- msg.setFrameData(frameSequenceNumber/*FrameData.ConsecutiveFrame.value()*/);
- msg.setSessionID(sessionID);
- msg.setDataSize(dataLength);
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static ProtocolFrameHeader createMultiSendDataRest(SessionType serviceType, byte sessionID,
- int dataLength, int messageID, byte version) {
- ProtocolFrameHeader msg = new ProtocolFrameHeader();
- msg.setVersion(version);
- msg.setFrameType(FrameType.Consecutive);
- msg.setSessionType(serviceType);
- msg.setFrameData(FrameData.ConsecutiveFrame.value());
- msg.setSessionID(sessionID);
- msg.setDataSize(dataLength);
- msg.setMessageID(messageID);
-
- return msg;
- }
-
- public static BinaryFrameHeader createBinaryFrameHeader(byte rpcType, int functionID, int corrID, int jsonSize) {
- BinaryFrameHeader msg = new BinaryFrameHeader();
- msg.setRPCType(rpcType);
- msg.setFunctionID(functionID);
- msg.setCorrID(corrID);
- msg.setJsonSize(jsonSize);
-
- return msg;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolMessage.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolMessage.java
deleted file mode 100755
index 945c683dc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/ProtocolMessage.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import com.smartdevicelink.protocol.enums.MessageType;
-import com.smartdevicelink.protocol.enums.SessionType;
-
-public class ProtocolMessage {
- private byte version = 1;
- private SessionType _sessionType = SessionType.RPC;
- private MessageType _messageType = MessageType.UNDEFINED;
- private byte _sessionID = 0;
- private byte _rpcType;
- private int _functionID;
- private int _correlationID;
- private int _jsonSize;
-
- private byte[] _data = null;
- private byte[] _bulkData = null;
-
- public ProtocolMessage() {}
-
- public byte getVersion() {
- return version;
- }
-
- public void setVersion(byte version) {
- this.version = version;
- }
-
- public byte getSessionID() {
- return _sessionID;
- }
-
- public void setSessionID(byte sessionID) {
- this._sessionID = sessionID;
- }
-
- public byte[] getData() {
- return _data;
- }
-
- public void setData(byte[] data) {
- this._data = data;
- this._jsonSize = data.length;
- }
-
- public byte[] getBulkData() {
- return _bulkData;
- }
-
- public void setBulkData(byte[] bulkData) {
- if (this._bulkData != null)
- this._bulkData = null;
- this._bulkData = new byte[bulkData.length];
- System.arraycopy(bulkData, 0, this._bulkData, 0, bulkData.length);
- //this._bulkData = bulkData;
- }
-
- public SessionType getSessionType() {
- return _sessionType;
- }
-
- public void setSessionType(SessionType sessionType) {
- this._sessionType = sessionType;
- }
-
- public MessageType getMessageType() {
- return _messageType;
- }
-
- public void setMessageType(MessageType messageType) {
- this._messageType = messageType;
- }
-
- public byte getRPCType() {
- return _rpcType;
- }
-
- public void setRPCType(byte _rpcType) {
- this._rpcType = _rpcType;
- }
-
- public int getFunctionID() {
- return _functionID;
- }
-
- public void setFunctionID(int _functionID) {
- this._functionID = _functionID;
- }
-
- public int getCorrID() {
- return _correlationID;
- }
-
- public void setCorrID(int _correlationID) {
- this._correlationID = _correlationID;
- }
-
- public int getJsonSize() {
- return _jsonSize;
- }
-
- public void setJsonSize(int _jsonSize) {
- this._jsonSize = _jsonSize;
- }
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/SmartDeviceLinkProtocol.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/SmartDeviceLinkProtocol.java
deleted file mode 100755
index 286debed8..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/SmartDeviceLinkProtocol.java
+++ /dev/null
@@ -1,418 +0,0 @@
-package com.smartdevicelink.protocol;
-
-import java.io.ByteArrayOutputStream;
-import java.util.Hashtable;
-
-import android.util.Log;
-
-import com.smartdevicelink.exception.*;
-import com.smartdevicelink.protocol.enums.*;
-import com.smartdevicelink.util.BitConverter;
-import com.smartdevicelink.util.DebugTool;
-
-public class SmartDeviceLinkProtocol extends AbstractProtocol {
- byte _version = 1;
- private final static String FailurePropagating_Msg = "Failure propagating ";
-
- private static final int MTU_SIZE = 1500;
- private static int HEADER_SIZE = 8;
- private static int MAX_DATA_SIZE = MTU_SIZE - HEADER_SIZE;
-
- boolean _haveHeader = false;
- byte[] _headerBuf = new byte[HEADER_SIZE];
- int _headerBufWritePos = 0;
- ProtocolFrameHeader _currentHeader = null;
- byte[] _dataBuf = null;
- int _dataBufWritePos = 0;
-
- int hashID = 0;
- int messageID = 0;
-
- Hashtable<Integer, MessageFrameAssembler> _assemblerForMessageID = new Hashtable<Integer, MessageFrameAssembler>();
- Hashtable<Byte, Hashtable<Integer, MessageFrameAssembler>> _assemblerForSessionID = new Hashtable<Byte, Hashtable<Integer, MessageFrameAssembler>>();
- Hashtable<Byte, Object> _messageLocks = new Hashtable<Byte, Object>();
-
- // Hide no-arg ctor
- private SmartDeviceLinkProtocol() {
- super(null);
- } // end-ctor
-
- public SmartDeviceLinkProtocol(IProtocolListener protocolListener) {
- super(protocolListener);
- } // end-ctor
-
- public byte getVersion() {
- return this._version;
- }
-
- public void setVersion(byte version) {
- this._version = version;
- if (version == 2) {
- HEADER_SIZE = 12;
- MAX_DATA_SIZE = MTU_SIZE - HEADER_SIZE;
- _headerBuf = new byte[HEADER_SIZE];
- }
- }
-
- public void StartProtocolSession(SessionType sessionType) {
- ProtocolFrameHeader header = ProtocolFrameHeaderFactory.createStartSession(sessionType, 0x00, _version);
- sendFrameToTransport(header);
- } // end-method
-
- private void sendStartProtocolSessionACK(SessionType sessionType, byte sessionID) {
- ProtocolFrameHeader header = ProtocolFrameHeaderFactory.createStartSessionACK(sessionType, sessionID, 0x00, _version);
- sendFrameToTransport(header);
- } // end-method
-
- public void EndProtocolSession(SessionType sessionType, byte sessionID) {
- ProtocolFrameHeader header = ProtocolFrameHeaderFactory.createEndSession(sessionType, sessionID, hashID, _version);
- //byte[] data = new byte[4];
- //data = BitConverter.intToByteArray(hashID);
- //handleProtocolFrameToSend(header, data, 0, data.length);
- sendFrameToTransport(header);
- } // end-method
-
- public void SendMessage(ProtocolMessage protocolMsg) {
- protocolMsg.setRPCType((byte) 0x00); //always sending a request
- SessionType sessionType = protocolMsg.getSessionType();
- byte sessionID = protocolMsg.getSessionID();
-
- byte[] data = null;
- if (_version == 2) {
- if (protocolMsg.getBulkData() != null) {
- data = new byte[12 + protocolMsg.getJsonSize() + protocolMsg.getBulkData().length];
- sessionType = SessionType.Bulk_Data;
- } else data = new byte[12 + protocolMsg.getJsonSize()];
- BinaryFrameHeader binFrameHeader = new BinaryFrameHeader();
- binFrameHeader = ProtocolFrameHeaderFactory.createBinaryFrameHeader(protocolMsg.getRPCType(), protocolMsg.getFunctionID(), protocolMsg.getCorrID(), protocolMsg.getJsonSize());
- System.arraycopy(binFrameHeader.assembleHeaderBytes(), 0, data, 0, 12);
- System.arraycopy(protocolMsg.getData(), 0, data, 12, protocolMsg.getJsonSize());
- if (protocolMsg.getBulkData() != null) {
- System.arraycopy(protocolMsg.getBulkData(), 0, data, 12 + protocolMsg.getJsonSize(), protocolMsg.getBulkData().length);
- }
- } else {
- data = protocolMsg.getData();
- }
-
- // Get the message lock for this protocol session
- Object messageLock = _messageLocks.get(sessionID);
- if (messageLock == null) {
- handleProtocolError("Error sending protocol message to SMARTDEVICELINK.",
- new SmartDeviceLinkException("Attempt to send protocol message prior to startSession ACK.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE));
- return;
- }
-
- synchronized(messageLock) {
- if (data.length > MAX_DATA_SIZE) {
-
- messageID++;
- ProtocolFrameHeader firstHeader = ProtocolFrameHeaderFactory.createMultiSendDataFirst(sessionType, sessionID, messageID, _version);
-
- // Assemble first frame.
- int frameCount = data.length / MAX_DATA_SIZE;
- if (data.length % MAX_DATA_SIZE > 0) {
- frameCount++;
- }
- //byte[] firstFrameData = new byte[HEADER_SIZE];
- byte[] firstFrameData = new byte[8];
- // First four bytes are data size.
- System.arraycopy(BitConverter.intToByteArray(data.length), 0, firstFrameData, 0, 4);
- // Second four bytes are frame count.
- System.arraycopy(BitConverter.intToByteArray(frameCount), 0, firstFrameData, 4, 4);
-
- handleProtocolFrameToSend(firstHeader, firstFrameData, 0, firstFrameData.length);
-
- int currentOffset = 0;
- byte frameSequenceNumber = 0;
-
- for (int i = 0; i < frameCount; i++) {
- if (i < (frameCount - 1)) {
- frameSequenceNumber = (byte)(i + 1);
- } else {
- frameSequenceNumber = ProtocolFrameHeader.FrameDataFinalConsecutiveFrame;
- } // end-if
-
- int bytesToWrite = data.length - currentOffset;
- if (bytesToWrite > MAX_DATA_SIZE) {
- bytesToWrite = MAX_DATA_SIZE;
- }
-
- ProtocolFrameHeader consecHeader = ProtocolFrameHeaderFactory.createMultiSendDataRest(sessionType, sessionID, bytesToWrite, frameSequenceNumber , messageID, _version);
- handleProtocolFrameToSend(consecHeader, data, currentOffset, bytesToWrite);
- currentOffset += bytesToWrite;
- }
- } else {
- messageID++;
- ProtocolFrameHeader header = ProtocolFrameHeaderFactory.createSingleSendData(sessionType, sessionID, data.length, messageID, _version);
- handleProtocolFrameToSend(header, data, 0, data.length);
- }
- }
- }
-
- private void sendFrameToTransport(ProtocolFrameHeader header) {
- handleProtocolFrameToSend(header, null, 0, 0);
- }
-
- public void HandleReceivedBytes(byte[] receivedBytes, int receivedBytesLength) {
- int receivedBytesReadPos = 0;
-
- //Check for a version difference
- if (_version == 1) {
- //Nothing has been read into the buffer and version is 2
- if (_headerBufWritePos == 0 && (byte) (receivedBytes[0] >>> 4) == 2) {
- setVersion((byte) (receivedBytes[0] >>> 4));
- //Buffer has something in it and version is 2
- } else if ((byte) (_headerBuf[0] >>> 4) == 2) {
- //safe current state of the buffer and also set the new version
- byte[] tempHeader = new byte[_headerBufWritePos];
- tempHeader = _headerBuf;
- setVersion((byte) (_headerBuf[0] >>> 4));
- _headerBuf = tempHeader;
- }
- }
-
- // If I don't yet know the message size, grab those bytes.
- if (!_haveHeader) {
- // If I can't get the size, just get the bytes that are there.
- int headerBytesNeeded = _headerBuf.length - _headerBufWritePos;
- if (receivedBytesLength < headerBytesNeeded) {
- System.arraycopy(receivedBytes, receivedBytesReadPos,
- _headerBuf, _headerBufWritePos, receivedBytesLength);
- _headerBufWritePos += receivedBytesLength;
- return;
- } else {
- // If I got the size, allocate the buffer
- System.arraycopy(receivedBytes, receivedBytesReadPos,
- _headerBuf, _headerBufWritePos, headerBytesNeeded);
- _headerBufWritePos += headerBytesNeeded;
- receivedBytesReadPos += headerBytesNeeded;
- _haveHeader = true;
- _currentHeader = ProtocolFrameHeader.parseSmartDeviceLinkProHeader(_headerBuf);
-
-
- int iDataSize = _currentHeader.getDataSize();
-
- if (iDataSize <= 4000)
- {
- _dataBuf = new byte[iDataSize];
- }
- else
- {
- //something is wrong with the header
- Log.e("HandleReceivedBytes", "Corrupt header found, request to allocate a byte array of size: " + iDataSize);
- Log.e("HandleReceivedBytes", "_headerBuf: " + _headerBuf.toString());
- Log.e("HandleReceivedBytes", "_currentHeader: " + _currentHeader.toString());
- Log.e("HandleReceivedBytes", "receivedBytes: " + receivedBytes.toString());
- Log.e("HandleReceivedBytes", "receivedBytesReadPos: " + receivedBytesReadPos);
- Log.e("HandleReceivedBytes", "_headerBufWritePos: " + _headerBufWritePos);
- Log.e("HandleReceivedBytes", "headerBytesNeeded: " + headerBytesNeeded);
- handleProtocolError("Error handling protocol message from SMARTDEVICELINK, header invalid.",
- new SmartDeviceLinkException("Error handling protocol message from SMARTDEVICELINK, header invalid.", SmartDeviceLinkExceptionCause.INVALID_HEADER));
- return;
- }
- _dataBufWritePos = 0;
- }
- }
-
- int bytesLeft = receivedBytesLength - receivedBytesReadPos;
- int bytesNeeded = _dataBuf.length - _dataBufWritePos;
- // If I don't have enough bytes for the message, just grab what's there.
- if (bytesLeft < bytesNeeded) {
- System.arraycopy(receivedBytes, receivedBytesReadPos, _dataBuf,
- _dataBufWritePos, bytesLeft);
- _dataBufWritePos += bytesLeft;
- return;
- } else {
- // Fill the buffer and call the handler!
- System.arraycopy(receivedBytes, receivedBytesReadPos, _dataBuf, _dataBufWritePos, bytesNeeded);
- receivedBytesReadPos += bytesNeeded;
-
- MessageFrameAssembler assembler = getFrameAssemblerForFrame(_currentHeader);
- handleProtocolFrameReceived(_currentHeader, _dataBuf, assembler);
-
- // Reset all class member variables for next frame
- _dataBuf = null;
- _dataBufWritePos = 0;
- _haveHeader = false;
- _headerBuf = new byte[HEADER_SIZE];
- _currentHeader = null;
- _headerBufWritePos = 0;
-
- // If there are any bytes left, recurse.
- int moreBytesLeft = receivedBytesLength - receivedBytesReadPos;
- if (moreBytesLeft > 0) {
- byte[] moreBytes = new byte[moreBytesLeft];
- System.arraycopy(receivedBytes, receivedBytesReadPos,
- moreBytes, 0, moreBytesLeft);
- HandleReceivedBytes(moreBytes, moreBytesLeft);
- }
- }
- }
-
- protected MessageFrameAssembler getFrameAssemblerForFrame(ProtocolFrameHeader header) {
- Hashtable<Integer, MessageFrameAssembler> hashSessionID = _assemblerForSessionID.get(new Byte(header.getSessionID()));
- if (hashSessionID == null) {
- hashSessionID = new Hashtable<Integer, MessageFrameAssembler>();
- _assemblerForSessionID.put(new Byte(header.getSessionID()), hashSessionID);
- } // end-if
-
- MessageFrameAssembler ret = (MessageFrameAssembler) _assemblerForMessageID.get(new Integer(header.getMessageID()));
- if (ret == null) {
- ret = new MessageFrameAssembler();
- _assemblerForMessageID.put(new Integer(header.getMessageID()), ret);
- } // end-if
-
- return ret;
- } // end-method
-
- protected class MessageFrameAssembler {
- protected boolean hasFirstFrame = false;
- protected boolean hasSecondFrame = false;
- protected ByteArrayOutputStream accumulator = null;
- protected int totalSize = 0;
- protected int framesRemaining = 0;
-
- protected void handleFirstDataFrame(ProtocolFrameHeader header, byte[] data) {
- //The message is new, so let's figure out how big it is.
- hasFirstFrame = true;
- totalSize = BitConverter.intFromByteArray(data, 0) - HEADER_SIZE;
- framesRemaining = BitConverter.intFromByteArray(data, 4);
- accumulator = new ByteArrayOutputStream(totalSize);
- }
-
- protected void handleSecondFrame(ProtocolFrameHeader header, byte[] data) {
- handleRemainingFrame(header, data);
- }
-
- protected void handleRemainingFrame(ProtocolFrameHeader header, byte[] data) {
- accumulator.write(data, 0, header.getDataSize());
- notifyIfFinished(header);
- }
-
- protected void notifyIfFinished(ProtocolFrameHeader header) {
- //if (framesRemaining == 0) {
- if (header.getFrameType() == FrameType.Consecutive && header.getFrameData() == 0x0)
- {
- ProtocolMessage message = new ProtocolMessage();
- message.setSessionType(header.getSessionType());
- message.setSessionID(header.getSessionID());
- //If it is SmartDeviceLinkPro 2.0 it must have binary header
- if (_version == 2) {
- BinaryFrameHeader binFrameHeader = BinaryFrameHeader.
- parseBinaryHeader(accumulator.toByteArray());
- message.setVersion(_version);
- message.setRPCType(binFrameHeader.getRPCType());
- message.setFunctionID(binFrameHeader.getFunctionID());
- message.setCorrID(binFrameHeader.getCorrID());
- if (binFrameHeader.getJsonSize() > 0) message.setData(binFrameHeader.getJsonData());
- if (binFrameHeader.getBulkData() != null) message.setBulkData(binFrameHeader.getBulkData());
- } else message.setData(accumulator.toByteArray());
-
- _assemblerForMessageID.remove(header.getMessageID());
-
- try {
- handleProtocolMessageReceived(message);
- } catch (Exception excp) {
- DebugTool.logError(FailurePropagating_Msg + "onProtocolMessageReceived: " + excp.toString(), excp);
- } // end-catch
-
- hasFirstFrame = false;
- hasSecondFrame = false;
- accumulator = null;
- } // end-if
- } // end-method
-
- protected void handleMultiFrameMessageFrame(ProtocolFrameHeader header, byte[] data) {
- //if (!hasFirstFrame) {
- // hasFirstFrame = true;
- if (header.getFrameType() == FrameType.First)
- {
- handleFirstDataFrame(header, data);
- }
-
- //} else if (!hasSecondFrame) {
- // hasSecondFrame = true;
- // framesRemaining--;
- // handleSecondFrame(header, data);
- //} else {
- // framesRemaining--;
- else
- {
- handleRemainingFrame(header, data);
- }
-
- //}
- } // end-method
-
- protected void handleFrame(ProtocolFrameHeader header, byte[] data) {
- if (header.getFrameType().equals(FrameType.Control)) {
- handleControlFrame(header, data);
- } else {
- // Must be a form of data frame (single, first, consecutive, etc.)
- if ( header.getFrameType() == FrameType.First
- || header.getFrameType() == FrameType.Consecutive
- ) {
- handleMultiFrameMessageFrame(header, data);
- } else {
- handleSingleFrameMessageFrame(header, data);
- }
- } // end-if
- } // end-method
-
-
- private void handleControlFrame(ProtocolFrameHeader header, byte[] data) {
- if (header.getFrameData() == FrameDataControlFrameType.StartSession.getValue()) {
- sendStartProtocolSessionACK(header.getSessionType(), header.getSessionID());
- } else if (header.getFrameData() == FrameDataControlFrameType.StartSessionACK.getValue()) {
- // Use this sessionID to create a message lock
- Object messageLock = _messageLocks.get(header.getSessionID());
- if (messageLock == null) {
- messageLock = new Object();
- _messageLocks.put(header.getSessionID(), messageLock);
- }
- //hashID = BitConverter.intFromByteArray(data, 0);
- if (_version == 2) hashID = header.getMessageID();
- handleProtocolSessionStarted(header.getSessionType(), header.getSessionID(), _version, "");
- } else if (header.getFrameData() == FrameDataControlFrameType.StartSessionNACK.getValue()) {
- handleProtocolError("Got StartSessionNACK for protocol sessionID=" + header.getSessionID(), null);
- } else if (header.getFrameData() == FrameDataControlFrameType.EndSession.getValue()) {
- //if (hashID == BitConverter.intFromByteArray(data, 0))
- if (_version == 2) {
- if (hashID == header.getMessageID())
- handleProtocolSessionEnded(header.getSessionType(), header.getSessionID(), "");
- } else handleProtocolSessionEnded(header.getSessionType(), header.getSessionID(), "");
- }
- } // end-method
-
- private void handleSingleFrameMessageFrame(ProtocolFrameHeader header, byte[] data) {
- ProtocolMessage message = new ProtocolMessage();
- if (header.getSessionType() == SessionType.RPC) {
- message.setMessageType(MessageType.RPC);
- } else if (header.getSessionType() == SessionType.Bulk_Data) {
- message.setMessageType(MessageType.BULK);
- } // end-if
- message.setSessionType(header.getSessionType());
- message.setSessionID(header.getSessionID());
- //If it is SmartDeviceLinkPro 2.0 it must have binary header
- if (_version == 2) {
- BinaryFrameHeader binFrameHeader = BinaryFrameHeader.
- parseBinaryHeader(data);
- message.setVersion(_version);
- message.setRPCType(binFrameHeader.getRPCType());
- message.setFunctionID(binFrameHeader.getFunctionID());
- message.setCorrID(binFrameHeader.getCorrID());
- if (binFrameHeader.getJsonSize() > 0) message.setData(binFrameHeader.getJsonData());
- if (binFrameHeader.getBulkData() != null) message.setBulkData(binFrameHeader.getBulkData());
- } else message.setData(data);
-
- _assemblerForMessageID.remove(header.getMessageID());
-
- try {
- handleProtocolMessageReceived(message);
- } catch (Exception ex) {
- DebugTool.logError(FailurePropagating_Msg + "onProtocolMessageReceived: " + ex.toString(), ex);
- handleProtocolError(FailurePropagating_Msg + "onProtocolMessageReceived: ", ex);
- } // end-catch
- } // end-method
- } // end-class
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameData.java
deleted file mode 100755
index 56d5b035d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameData.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.smartdevicelink.protocol.enums;
-
-import java.util.Vector;
-
-import com.smartdevicelink.util.ByteEnumer;
-
-public class FrameData extends ByteEnumer {
-
- private static Vector theList = new Vector();
- public static Vector getList() { return theList; }
-
- byte i = 0x00;
-
- protected FrameData(byte value, String name) {super(value, name);}
- public final static FrameData StartSession = new FrameData((byte)0x01, "StartSession");
- public final static FrameData StartSessionACK = new FrameData((byte)0x02, "StartSessionACK");
- public final static FrameData StartSessionNACK = new FrameData((byte)0x03, "StartSessionNACK");
- public final static FrameData EndSession = new FrameData((byte)0x04, "EndSession");
-
- public final static FrameData SingleFrame = new FrameData((byte)0x00, "SingleFrame");
- public final static FrameData FirstFrame = new FrameData((byte)0x00, "FirstFrame");
- public final static FrameData ConsecutiveFrame = new FrameData((byte)0x00, "ConsecutiveFrame");
- public final static byte LastFrame = (byte)0x00;
-
- static {
- theList.addElement(StartSession);
- theList.addElement(StartSessionACK);
- theList.addElement(StartSessionNACK);
- theList.addElement(EndSession);
- }
-
- public static FrameData valueOf(String passedButton) {
- return (FrameData) get(theList, passedButton);
- }
-
- public static FrameData[] values() {
- return (FrameData[]) theList.toArray();
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java
deleted file mode 100755
index 49860e186..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.smartdevicelink.protocol.enums;
-
-import java.util.Vector;
-
-import com.smartdevicelink.util.ByteEnumer;
-
-public class FrameDataControlFrameType extends ByteEnumer {
- private static Vector theList = new Vector();
- public static Vector getList() { return theList; }
-
- private byte _i = 0x00;
-
- protected FrameDataControlFrameType(byte value, String name) {super(value, name);}
- public final static FrameDataControlFrameType StartSession = new FrameDataControlFrameType((byte)0x01, "StartSession");
- public final static FrameDataControlFrameType StartSessionACK = new FrameDataControlFrameType((byte)0x02, "StartSessionACK");
- public final static FrameDataControlFrameType StartSessionNACK = new FrameDataControlFrameType((byte)0x03, "StartSessionNACK");
- public final static FrameDataControlFrameType EndSession = new FrameDataControlFrameType((byte)0x04, "EndSession");
-
- static {
- theList.addElement(StartSession);
- theList.addElement(StartSessionACK);
- theList.addElement(StartSessionNACK);
- theList.addElement(EndSession);
- }
-
- public static FrameDataControlFrameType valueOf(String passedButton) {
- return (FrameDataControlFrameType) get(theList, passedButton);
- } // end-method
-
- public static FrameDataControlFrameType[] values() {
- return (FrameDataControlFrameType[]) theList.toArray();
- } // end-method
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameType.java
deleted file mode 100755
index 34f9867a6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FrameType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.smartdevicelink.protocol.enums;
-
-import java.util.Vector;
-
-import com.smartdevicelink.util.ByteEnumer;
-
-public class FrameType extends ByteEnumer {
-
- private static Vector theList = new Vector();
- public static Vector getList() { return theList; }
-
- byte i = 0x00;
-
- protected FrameType(byte value, String name) {super(value, name);}
- public final static FrameType Control = new FrameType((byte)0x00, "Control");
- public final static FrameType Single = new FrameType((byte)0x01, "Single");
- public final static FrameType First = new FrameType((byte)0x02, "First");
- public final static FrameType Consecutive = new FrameType((byte)0x03, "Consecutive");
-
- static {
- theList.addElement(Control);
- theList.addElement(Single);
- theList.addElement(First);
- theList.addElement(Consecutive);
- }
-
- public static FrameType valueOf(byte passed) {
- return (FrameType) get(theList, passed);
- }
-
- public static FrameType[] values() {
- return (FrameType[]) theList.toArray();
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FunctionID.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FunctionID.java
deleted file mode 100755
index de92548df..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/FunctionID.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.smartdevicelink.protocol.enums;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import com.smartdevicelink.proxy.constants.Names;
-
-public class FunctionID {
- static ArrayList<String> functionID = null;
-
- public FunctionID() {
- }
-
- static public String getFunctionName(int i) {
- if (functionID == null) {
- initFunctionIds();
- }
- return functionID.get(i);
- }
-
- static public void initFunctionIds() {
- String [] functionIds = new String[98306];
- functionIds[1] = Names.RegisterAppInterface;
- functionIds[2] = Names.UnregisterAppInterface;
- functionIds[3] = Names.SetGlobalProperties;
- functionIds[4] = Names.ResetGlobalProperties;
- functionIds[5] = Names.AddCommand;
- functionIds[6] = Names.DeleteCommand;
- functionIds[7] = Names.AddSubMenu;
- functionIds[8] = Names.DeleteSubMenu;
- functionIds[9] = Names.CreateInteractionChoiceSet;
- functionIds[10] = Names.PerformInteraction;
- functionIds[11] = Names.DeleteInteractionChoiceSet;
- functionIds[12] = Names.Alert;
- functionIds[13] = Names.Show;
- functionIds[14] = Names.Speak;
- functionIds[15] = Names.SetMediaClockTimer;
- functionIds[16] = Names.PerformAudioPassThru;
- functionIds[17] = Names.EndAudioPassThru;
- functionIds[18] = Names.SubscribeButton;
- functionIds[19] = Names.UnsubscribeButton;
- functionIds[20] = Names.SubscribeVehicleData;
- functionIds[21] = Names.UnsubscribeVehicleData;
- functionIds[22] = Names.GetVehicleData;
- functionIds[23] = Names.ReadDID;
- functionIds[24] = Names.GetDTCs;
- functionIds[25] = Names.ScrollableMessage;
- functionIds[26] = Names.Slider;
- functionIds[27] = Names.ShowConstantTBT;
- functionIds[28] = Names.AlertManeuver;
- functionIds[29] = Names.UpdateTurnList;
- functionIds[30] = Names.ChangeRegistration;
- functionIds[31] = Names.GenericResponse;
- functionIds[32] = Names.PutFile;
- functionIds[33] = Names.DeleteFile;
- functionIds[34] = Names.ListFiles;
- functionIds[35] = Names.SetAppIcon;
- functionIds[36] = Names.SetDisplayLayout;
-
- functionIds[32768] = Names.OnHMIStatus;
- functionIds[32769] = Names.OnAppInterfaceUnregistered;
- functionIds[32770] = Names.OnButtonEvent;
- functionIds[32771] = Names.OnButtonPress;
- functionIds[32772] = Names.OnVehicleData;
- functionIds[32773] = Names.OnCommand;
- functionIds[32774] = Names.OnTBTClientState;
- functionIds[32775] = Names.OnDriverDistraction;
- functionIds[32776] = Names.OnPermissionsChange;
- functionIds[32777] = Names.OnAudioPassThru;
- functionIds[32778] = Names.OnLanguageChange;
-
- functionIds[65536] = Names.EncodedSyncPData;
- functionIds[65537] = Names.SyncPData;
-
- functionIds[98304] = Names.OnEncodedSyncPData;
- functionIds[98305] = Names.OnSyncPData;
-
- functionID = new ArrayList<String>(Arrays.asList(functionIds));
- }
-
- static public int getFunctionID(String functionName) {
- if (functionID == null) {
- initFunctionIds();
- }
- return functionID.indexOf(functionName);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/MessageType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/MessageType.java
deleted file mode 100755
index a4fed0f5d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/MessageType.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.smartdevicelink.protocol.enums;
-
-public enum MessageType {
-// START_SESSION,
-// START_SESSION_ACK,
-// START_SESSION_NACK,
-// END_SESSION,
- UNDEFINED,
- BULK,
- RPC
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/SessionType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/SessionType.java
deleted file mode 100755
index 04d9abe97..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/protocol/enums/SessionType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.smartdevicelink.protocol.enums;
-
-import java.util.Vector;
-
-import com.smartdevicelink.util.ByteEnumer;
-
-
-public class SessionType extends ByteEnumer {
-
- private static Vector theList = new Vector();
- public static Vector getList() { return theList; }
-
- byte i = 0x00;
-
- protected SessionType(byte value, String name) {super(value, name);}
- public final static SessionType RPC = new SessionType((byte)0x07, "RPC");
- public final static SessionType Bulk_Data = new SessionType((byte)0xF, "Bulk_Data");
-
- static {
- theList.addElement(RPC);
- theList.addElement(Bulk_Data);
- }
-
- public static SessionType valueOf(byte passedButton) {
- return (SessionType) get(theList, passedButton);
- }
-
- public static SessionType[] values() {
- return (SessionType[]) theList.toArray();
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/IProxyListener.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/IProxyListener.java
deleted file mode 100755
index 2ef06c3b9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/IProxyListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import com.smartdevicelink.proxy.interfaces.IProxyListenerBase;
-import com.smartdevicelink.proxy.rpc.OnAppInterfaceUnregistered;
-import com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse;
-import com.smartdevicelink.proxy.rpc.UnregisterAppInterfaceResponse;
-
-public interface IProxyListener extends IProxyListenerBase{
- // Adds Legacy Life-cycle Management call-backs to the IProxyListenerAbstract interface
-
- public void onProxyOpened();
-
- public void onRegisterAppInterfaceResponse(RegisterAppInterfaceResponse response);
-
- public void onOnAppInterfaceUnregistered(OnAppInterfaceUnregistered notification);
-
- public void onUnregisterAppInterfaceResponse(UnregisterAppInterfaceResponse response);
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCMessage.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCMessage.java
deleted file mode 100755
index 8df1f93da..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCMessage.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import com.smartdevicelink.proxy.constants.Names;
-
-public class RPCMessage extends RPCStruct {
-
- public RPCMessage(String functionName) {
- this(functionName, "request");
- }
-
- protected RPCMessage(RPCMessage rpcm) {
- this(rpcm.store);
- }
-
- protected RPCMessage(RPCStruct rpcs) {
- this("", "");
- this.parameters = rpcs.store;
- }
-
- public RPCMessage(String functionName, String messageType) {
- function = new Hashtable();
- this.messageType = messageType;
- store.put(messageType, function);
- parameters = new Hashtable();
- function.put(Names.parameters, parameters);
- function.put(Names.function_name, functionName);
- }
-
- public RPCMessage(Hashtable hash) {
- store = hash;
- Iterator it = hash.keySet().iterator();
- String key;
- while (it.hasNext()) {
- key = (String)it.next().toString();
- if (key != Names.bulkData) messageType = key;
- }
- function = (Hashtable)hash.get(messageType);
- parameters = (Hashtable)function.get(Names.parameters);
- }
-
- protected String messageType;
- protected Hashtable parameters;
- protected Hashtable function;
-
- public String getFunctionName() {
- return (String)function.get(Names.function_name);
- }
-
- protected void setFunctionName(String functionName) {
- function.put(Names.function_name, functionName);
- }
-
- public String getMessageType() {
- return messageType;
- }
-
- public void setParameters(String functionName, Object value) {
- if (value != null) {
- parameters.put(functionName, value);
- } else {
- parameters.remove(functionName);
- }
- }
-
- public Object getParameters(String functionName) {
- return parameters.get(functionName);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCNotification.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCNotification.java
deleted file mode 100755
index e3562b6d0..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCNotification.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- *
- */
-package com.smartdevicelink.proxy;
-
-import java.util.Hashtable;
-
-public class RPCNotification extends RPCMessage {
-
- public RPCNotification(String functionName) {
- super(functionName, "notification");
- }
-
- public RPCNotification(Hashtable hash) {
- super(hash);
- }
-
- public RPCNotification(RPCMessage rpcMsg) {
- super(rpcMsg);
- }
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequest.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequest.java
deleted file mode 100755
index 67478795f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- */
-package com.smartdevicelink.proxy;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.constants.Names;
-
-public class RPCRequest extends RPCMessage {
-
- public RPCRequest(String functionName) {
- super(functionName, "request");
- messageType = Names.request;
- }
-
- public RPCRequest(Hashtable hash) {
- super(hash);
- }
-
- public Integer getCorrelationID() {
- return (Integer)function.get(Names.correlationID);
- }
-
- public void setCorrelationID(Integer correlationID) {
- if (correlationID != null) {
- function.put(Names.correlationID, correlationID );
- } else if (parameters.contains(Names.correlationID)) {
- function.remove(Names.correlationID);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequestFactory.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequestFactory.java
deleted file mode 100755
index 63d90eecb..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCRequestFactory.java
+++ /dev/null
@@ -1,990 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.rpc.AddCommand;
-import com.smartdevicelink.proxy.rpc.AddSubMenu;
-import com.smartdevicelink.proxy.rpc.Alert;
-import com.smartdevicelink.proxy.rpc.AlertManeuver;
-import com.smartdevicelink.proxy.rpc.ChangeRegistration;
-import com.smartdevicelink.proxy.rpc.Choice;
-import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.DeleteCommand;
-import com.smartdevicelink.proxy.rpc.DeleteFile;
-import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.DeleteSubMenu;
-import com.smartdevicelink.proxy.rpc.EncodedSyncPData;
-import com.smartdevicelink.proxy.rpc.EndAudioPassThru;
-import com.smartdevicelink.proxy.rpc.GetDTCs;
-import com.smartdevicelink.proxy.rpc.GetVehicleData;
-import com.smartdevicelink.proxy.rpc.Image;
-import com.smartdevicelink.proxy.rpc.ListFiles;
-import com.smartdevicelink.proxy.rpc.MenuParams;
-import com.smartdevicelink.proxy.rpc.PerformAudioPassThru;
-import com.smartdevicelink.proxy.rpc.PerformInteraction;
-import com.smartdevicelink.proxy.rpc.PutFile;
-import com.smartdevicelink.proxy.rpc.ReadDID;
-import com.smartdevicelink.proxy.rpc.RegisterAppInterface;
-import com.smartdevicelink.proxy.rpc.ScrollableMessage;
-import com.smartdevicelink.proxy.rpc.SetAppIcon;
-import com.smartdevicelink.proxy.rpc.SetDisplayLayout;
-import com.smartdevicelink.proxy.rpc.SetGlobalProperties;
-import com.smartdevicelink.proxy.rpc.SetMediaClockTimer;
-import com.smartdevicelink.proxy.rpc.Show;
-import com.smartdevicelink.proxy.rpc.ShowConstantTBT;
-import com.smartdevicelink.proxy.rpc.Slider;
-import com.smartdevicelink.proxy.rpc.SoftButton;
-import com.smartdevicelink.proxy.rpc.Speak;
-import com.smartdevicelink.proxy.rpc.StartTime;
-import com.smartdevicelink.proxy.rpc.SubscribeButton;
-import com.smartdevicelink.proxy.rpc.SubscribeVehicleData;
-import com.smartdevicelink.proxy.rpc.smartdevicelinkMsgVersion;
-import com.smartdevicelink.proxy.rpc.SyncPData;
-import com.smartdevicelink.proxy.rpc.TTSChunk;
-import com.smartdevicelink.proxy.rpc.Turn;
-import com.smartdevicelink.proxy.rpc.UnregisterAppInterface;
-import com.smartdevicelink.proxy.rpc.UnsubscribeButton;
-import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleData;
-import com.smartdevicelink.proxy.rpc.UpdateTurnList;
-import com.smartdevicelink.proxy.rpc.VrHelpItem;
-import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
-import com.smartdevicelink.proxy.rpc.enums.AudioType;
-import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.ImageType;
-import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-
-public class RPCRequestFactory {
-
- public static final int NGN_MEDIA_SCREEN_APP_NAME_MAX_LENGTH = 5;
- public static final int SMARTDEVICELINK_MSG_MAJOR_VERSION = 1;
- public static final int SMARTDEVICELINK_MSG_MINOR_VERSION = 0;
-
- public static EncodedSyncPData buildEncodedSyncPData(
- Vector<String> data, Integer correlationID) {
-
- if(data == null) return null;
-
- EncodedSyncPData msg = new EncodedSyncPData();
- msg.setCorrelationID(correlationID);
- msg.setData(data);
- return msg;
- }
-
- public static SyncPData buildSyncPData(
- byte[] data, Integer correlationID) {
-
- if(data == null) return null;
-
- SyncPData msg = new SyncPData();
- msg.setCorrelationID(correlationID);
- msg.setSyncPData(data);
- return msg;
- }
-
-
- public static AddCommand buildAddCommand(Integer commandID,
- String menuText, Integer parentID, Integer position,
- Vector<String> vrCommands, Image cmdIcon, Integer correlationID) {
- AddCommand msg = new AddCommand();
- msg.setCorrelationID(correlationID);
- msg.setCmdID(commandID);
- msg.setVrCommands(vrCommands);
-
- if (cmdIcon != null) msg.setCmdIcon(cmdIcon);
-
- if(menuText != null || parentID != null || position != null) {
- MenuParams menuParams = new MenuParams();
- menuParams.setMenuName(menuText);
- menuParams.setPosition(position);
- menuParams.setParentID(parentID);
- msg.setMenuParams(menuParams);
- }
-
- return msg;
- }
-
- public static AddCommand buildAddCommand(Integer commandID,
- String menuText, Integer parentID, Integer position,
- Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID) {
- AddCommand msg = new AddCommand();
- msg.setCorrelationID(correlationID);
- msg.setCmdID(commandID);
-
- if (vrCommands != null) msg.setVrCommands(vrCommands);
-
- Image cmdIcon = null;
-
- if (IconValue != null && IconType != null)
- {
- cmdIcon = new Image();
- cmdIcon.setValue(IconValue);
- cmdIcon.setImageType(IconType);
- }
-
- if (cmdIcon != null) msg.setCmdIcon(cmdIcon);
-
- if(menuText != null || parentID != null || position != null) {
- MenuParams menuParams = new MenuParams();
- menuParams.setMenuName(menuText);
- menuParams.setPosition(position);
- menuParams.setParentID(parentID);
- msg.setMenuParams(menuParams);
- }
-
- return msg;
- }
-
-
- public static AddCommand buildAddCommand(Integer commandID,
- String menuText, Integer parentID, Integer position,
- Vector<String> vrCommands, Integer correlationID) {
- AddCommand msg = new AddCommand();
- msg.setCorrelationID(correlationID);
- msg.setCmdID(commandID);
- msg.setVrCommands(vrCommands);
-
- if(menuText != null || parentID != null || position != null) {
- MenuParams menuParams = new MenuParams();
- menuParams.setMenuName(menuText);
- menuParams.setPosition(position);
- menuParams.setParentID(parentID);
- msg.setMenuParams(menuParams);
- }
-
- return msg;
- }
-
- public static AddCommand buildAddCommand(Integer commandID,
- String menuText, Vector<String> vrCommands, Integer correlationID) {
- AddCommand msg = buildAddCommand(commandID, menuText, null, null,
- vrCommands, correlationID);
- return msg;
- }
-
- public static AddCommand buildAddCommand(Integer commandID,
- Vector<String> vrCommands, Integer correlationID) {
- AddCommand msg = new AddCommand();
- msg.setCorrelationID(correlationID);
- msg.setCmdID(commandID);
- msg.setVrCommands(vrCommands);
-
- return msg;
- }
-
- public static AddSubMenu buildAddSubMenu(Integer menuID, String menuName,
- Integer correlationID) {
- AddSubMenu msg = buildAddSubMenu(menuID, menuName, null, correlationID);
- return msg;
- }
-
- public static AddSubMenu buildAddSubMenu(Integer menuID, String menuName,
- Integer position, Integer correlationID) {
- AddSubMenu msg = new AddSubMenu();
- msg.setCorrelationID(correlationID);
- msg.setMenuName(menuName);
- msg.setMenuID(menuID);
- msg.setPosition(position);
-
- return msg;
- }
-
-
- public static Alert buildAlert(String ttsText, Boolean playTone, Vector<SoftButton> softButtons,
- Integer correlationID) {
- Vector<TTSChunk> chunks = TTSChunkFactory
- .createSimpleTTSChunks(ttsText);
- Alert msg = buildAlert(chunks, null, null, null, playTone, null, softButtons,
- correlationID);
- return msg;
- }
-
- public static Alert buildAlert(String alertText1, String alertText2, String alertText3,
- Integer duration, Vector<SoftButton> softButtons, Integer correlationID) {
- Alert msg = buildAlert((Vector<TTSChunk>) null, alertText1, alertText2, alertText3,
- null, duration, softButtons, correlationID);
- return msg;
- }
-
- public static Alert buildAlert(String ttsText, String alertText1,
- String alertText2, String alertText3, Boolean playTone, Integer duration, Vector<SoftButton> softButtons,
- Integer correlationID) {
- Vector<TTSChunk> chunks = TTSChunkFactory
- .createSimpleTTSChunks(ttsText);
- Alert msg = buildAlert(chunks, alertText1, alertText2, alertText3, playTone,
- duration, softButtons, correlationID);
- return msg;
- }
-
- public static Alert buildAlert(Vector<TTSChunk> chunks, Boolean playTone, Vector<SoftButton> softButtons,
- Integer correlationID) {
- Alert msg = buildAlert(chunks, null, null, null, playTone, null, softButtons, correlationID);
- return msg;
- }
-
- public static Alert buildAlert(Vector<TTSChunk> ttsChunks,
- String alertText1, String alertText2, String alertText3, Boolean playTone,
- Integer duration, Vector<SoftButton> softButtons, Integer correlationID) {
- Alert msg = new Alert();
- msg.setCorrelationID(correlationID);
- msg.setAlertText1(alertText1);
- msg.setAlertText2(alertText2);
- msg.setDuration(duration);
- msg.setPlayTone(playTone);
- msg.setTtsChunks(ttsChunks);
- msg.setSoftButtons(softButtons);
-
- return msg;
- }
-
-
-
- public static Alert buildAlert(String ttsText, Boolean playTone,
- Integer correlationID) {
- Vector<TTSChunk> chunks = TTSChunkFactory
- .createSimpleTTSChunks(ttsText);
- Alert msg = buildAlert(chunks, null, null, playTone, null,
- correlationID);
- return msg;
- }
-
- public static Alert buildAlert(String alertText1, String alertText2,
- Integer duration, Integer correlationID) {
- Alert msg = buildAlert((Vector<TTSChunk>) null, alertText1, alertText2,
- null, duration, correlationID);
- return msg;
- }
-
- public static Alert buildAlert(String ttsText, String alertText1,
- String alertText2, Boolean playTone, Integer duration,
- Integer correlationID) {
- Vector<TTSChunk> chunks = TTSChunkFactory
- .createSimpleTTSChunks(ttsText);
- Alert msg = buildAlert(chunks, alertText1, alertText2, playTone,
- duration, correlationID);
- return msg;
- }
-
- public static Alert buildAlert(Vector<TTSChunk> chunks, Boolean playTone,
- Integer correlationID) {
- Alert msg = buildAlert(chunks, null, null, playTone, null,
- correlationID);
- return msg;
- }
-
- public static Alert buildAlert(Vector<TTSChunk> ttsChunks,
- String alertText1, String alertText2, Boolean playTone,
- Integer duration, Integer correlationID) {
- Alert msg = new Alert();
- msg.setCorrelationID(correlationID);
- msg.setAlertText1(alertText1);
- msg.setAlertText2(alertText2);
- msg.setDuration(duration);
- msg.setPlayTone(playTone);
- msg.setTtsChunks(ttsChunks);
-
- return msg;
- }
-
- public static CreateInteractionChoiceSet buildCreateInteractionChoiceSet(
- Vector<Choice> choiceSet, Integer interactionChoiceSetID,
- Integer correlationID) {
- CreateInteractionChoiceSet msg = new CreateInteractionChoiceSet();
- msg.setChoiceSet(choiceSet);
- msg.setInteractionChoiceSetID(interactionChoiceSetID);
- msg.setCorrelationID(correlationID);
- return msg;
- }
-
- public static DeleteCommand buildDeleteCommand(Integer commandID,
- Integer correlationID) {
- DeleteCommand msg = new DeleteCommand();
- msg.setCmdID(commandID);
- msg.setCorrelationID(correlationID);
- return msg;
- }
-
- public static DeleteFile buildDeleteFile(String smartDeviceLinkFileName,
- Integer correlationID) {
- DeleteFile deleteFile = new DeleteFile();
- deleteFile.setCorrelationID(correlationID);
- deleteFile.setSmartDeviceLinkFileName(smartDeviceLinkFileName);
- return deleteFile;
- }
-
- public static DeleteInteractionChoiceSet buildDeleteInteractionChoiceSet(
- Integer interactionChoiceSetID, Integer correlationID) {
- DeleteInteractionChoiceSet msg = new DeleteInteractionChoiceSet();
- msg.setInteractionChoiceSetID(interactionChoiceSetID);
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- public static DeleteSubMenu buildDeleteSubMenu(Integer menuID,
- Integer correlationID) {
- DeleteSubMenu msg = new DeleteSubMenu();
- msg.setCorrelationID(correlationID);
- msg.setMenuID(menuID);
-
- return msg;
- }
-
- public static ListFiles buildListFiles(Integer correlationID) {
- ListFiles listFiles = new ListFiles();
- listFiles.setCorrelationID(correlationID);
- return listFiles;
- }
-
-
- public static PerformInteraction buildPerformInteraction(
- Vector<TTSChunk> initChunks, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
- Integer correlationID) {
- PerformInteraction msg = new PerformInteraction();
- msg.setInitialPrompt(initChunks);
- msg.setInitialText(displayText);
- msg.setInteractionChoiceSetIDList(interactionChoiceSetIDList);
- msg.setInteractionMode(interactionMode);
- msg.setTimeout(timeout);
- msg.setHelpPrompt(helpChunks);
- msg.setTimeoutPrompt(timeoutChunks);
- msg.setVrHelp(vrHelp);
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- public static PerformInteraction buildPerformInteraction(
- String initPrompt, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
- Integer correlationID) {
- Vector<TTSChunk> initChunks = TTSChunkFactory
- .createSimpleTTSChunks(initPrompt);
- Vector<TTSChunk> helpChunks = TTSChunkFactory
- .createSimpleTTSChunks(helpPrompt);
- Vector<TTSChunk> timeoutChunks = TTSChunkFactory
- .createSimpleTTSChunks(timeoutPrompt);
- return buildPerformInteraction(initChunks,
- displayText, interactionChoiceSetIDList, helpChunks,
- timeoutChunks, interactionMode, timeout, vrHelp, correlationID);
- }
-
- public static PerformInteraction buildPerformInteraction(
- String initPrompt, String displayText,
- Integer interactionChoiceSetID,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
- Integer correlationID) {
- Vector<Integer> interactionChoiceSetIDs = new Vector<Integer>();
- interactionChoiceSetIDs.add(interactionChoiceSetID);
-
- return buildPerformInteraction(
- initPrompt, displayText, interactionChoiceSetIDs,
- helpPrompt, timeoutPrompt, interactionMode,
- timeout, vrHelp, correlationID);
- }
-
- public static PerformInteraction buildPerformInteraction(String initPrompt,
- String displayText, Integer interactionChoiceSetID, Vector<VrHelpItem> vrHelp,
- Integer correlationID) {
-
- return buildPerformInteraction(initPrompt, displayText,
- interactionChoiceSetID, null, null,
- InteractionMode.BOTH, null, vrHelp, correlationID);
- }
-
-
- public static PerformInteraction buildPerformInteraction(
- Vector<TTSChunk> initChunks, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- InteractionMode interactionMode, Integer timeout,
- Integer correlationID) {
- PerformInteraction msg = new PerformInteraction();
- msg.setInitialPrompt(initChunks);
- msg.setInitialText(displayText);
- msg.setInteractionChoiceSetIDList(interactionChoiceSetIDList);
- msg.setInteractionMode(interactionMode);
- msg.setTimeout(timeout);
- msg.setHelpPrompt(helpChunks);
- msg.setTimeoutPrompt(timeoutChunks);
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- public static PerformInteraction buildPerformInteraction(
- String initPrompt, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout,
- Integer correlationID) {
- Vector<TTSChunk> initChunks = TTSChunkFactory
- .createSimpleTTSChunks(initPrompt);
- Vector<TTSChunk> helpChunks = TTSChunkFactory
- .createSimpleTTSChunks(helpPrompt);
- Vector<TTSChunk> timeoutChunks = TTSChunkFactory
- .createSimpleTTSChunks(timeoutPrompt);
- return buildPerformInteraction(initChunks,
- displayText, interactionChoiceSetIDList, helpChunks,
- timeoutChunks, interactionMode, timeout, correlationID);
- }
-
- public static PerformInteraction buildPerformInteraction(
- String initPrompt, String displayText,
- Integer interactionChoiceSetID,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout,
- Integer correlationID) {
- Vector<Integer> interactionChoiceSetIDs = new Vector<Integer>();
- interactionChoiceSetIDs.add(interactionChoiceSetID);
-
- return buildPerformInteraction(
- initPrompt, displayText, interactionChoiceSetIDs,
- helpPrompt, timeoutPrompt, interactionMode,
- timeout, correlationID);
- }
-
- public static PerformInteraction buildPerformInteraction(String initPrompt,
- String displayText, Integer interactionChoiceSetID,
- Integer correlationID) {
-
- return buildPerformInteraction(initPrompt, displayText,
- interactionChoiceSetID, null, null,
- InteractionMode.BOTH, null, correlationID);
- }
-
- @Deprecated
- public static PerformInteraction buildPerformInteraction(
- Vector<TTSChunk> initChunks, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- Vector<TTSChunk> helpChunks, InteractionMode interactionMode,
- Integer timeout, Integer correlationID) {
- PerformInteraction msg = new PerformInteraction();
- msg.setInitialPrompt(initChunks);
- msg.setInitialText(displayText);
- msg.setInteractionChoiceSetIDList(interactionChoiceSetIDList);
- msg.setInteractionMode(interactionMode);
- msg.setTimeout(timeout);
- msg.setHelpPrompt(helpChunks);
- msg.setCorrelationID(correlationID);
- return msg;
- }
-
- @Deprecated
- public static PerformInteraction buildPerformInteraction(String initPrompt,
- String displayText, Vector<Integer> interactionChoiceSetIDList,
- String helpPrompt, InteractionMode interactionMode,
- Integer timeout, Integer correlationID) {
- Vector<TTSChunk> initChunks = TTSChunkFactory
- .createSimpleTTSChunks(initPrompt);
- Vector<TTSChunk> helpChunks = TTSChunkFactory
- .createSimpleTTSChunks(helpPrompt);
- PerformInteraction msg = buildPerformInteraction(initChunks,
- displayText, interactionChoiceSetIDList, helpChunks,
- interactionMode, timeout, correlationID);
- return msg;
- }
-
- public static PutFile buildPutFile(String smartDeviceLinkFileName, FileType fileType,
- Boolean persistentFile, byte[] fileData, Integer correlationID) {
- PutFile putFile = new PutFile();
- putFile.setCorrelationID(correlationID);
- putFile.setSmartDeviceLinkFileName(smartDeviceLinkFileName);
- putFile.setFileType(fileType);
- putFile.setPersistentFile(persistentFile);
- putFile.setBulkData(fileData);
- return putFile;
- }
-
- public static RegisterAppInterface buildRegisterAppInterface(String appName, String appID) {
- return buildRegisterAppInterface(appName, false, appID);
- }
-
- public static RegisterAppInterface buildRegisterAppInterface(
- String appName, Boolean isMediaApp, String appID) {
-
- return buildRegisterAppInterface(null, appName, null, null, null, isMediaApp,
- null, null, null, appID, null);
- }
-
- public static RegisterAppInterface buildRegisterAppInterface(
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, String appName, Vector<TTSChunk> ttsName,
- String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
- String appID, Integer correlationID) {
- RegisterAppInterface msg = new RegisterAppInterface();
-
- if (correlationID == null) {
- correlationID = 1;
- }
- msg.setCorrelationID(correlationID);
-
- if (smartDeviceLinkMsgVersion == null) {
- smartDeviceLinkMsgVersion = new smartdevicelinkMsgVersion();
- smartDeviceLinkMsgVersion.setMajorVersion(new Integer(SMARTDEVICELINK_MSG_MAJOR_VERSION));
- smartDeviceLinkMsgVersion.setMinorVersion(new Integer(SMARTDEVICELINK_MSG_MINOR_VERSION));
- }
- msg.setsmartdevicelinkMsgVersion(smartDeviceLinkMsgVersion);
-
- msg.setAppName(appName);
-
- msg.setTtsName(ttsName);
-
- if (ngnMediaScreenAppName == null) {
- ngnMediaScreenAppName = appName;
- }
-
- if (ngnMediaScreenAppName.length() > NGN_MEDIA_SCREEN_APP_NAME_MAX_LENGTH) {
- ngnMediaScreenAppName = ngnMediaScreenAppName.substring(0,
- NGN_MEDIA_SCREEN_APP_NAME_MAX_LENGTH);
- }
- msg.setNgnMediaScreenAppName(ngnMediaScreenAppName);
-
- if (vrSynonyms == null) {
- vrSynonyms = new Vector<String>();
- vrSynonyms.add(appName);
- }
- msg.setVrSynonyms(vrSynonyms);
-
- msg.setIsMediaApplication(isMediaApp);
-
- if (languageDesired == null) {
- languageDesired = Language.EN_US;
- }
- msg.setLanguageDesired(languageDesired);
-
- if (hmiDisplayLanguageDesired == null) {
- hmiDisplayLanguageDesired = Language.EN_US;
- }
-
- msg.setHmiDisplayLanguageDesired(hmiDisplayLanguageDesired);
-
- msg.setAppHMIType(appType);
-
- msg.setAppID(appID);
-
- return msg;
- }
-
- public static SetAppIcon buildSetAppIcon(String smartDeviceLinkFileName,
- Integer correlationID) {
- SetAppIcon setAppIcon = new SetAppIcon();
- setAppIcon.setCorrelationID(correlationID);
- setAppIcon.setSmartDeviceLinkFileName(smartDeviceLinkFileName);
- return setAppIcon;
- }
-
- public static SetGlobalProperties buildSetGlobalProperties(
- String helpPrompt, String timeoutPrompt, Integer correlationID) {
- return buildSetGlobalProperties(TTSChunkFactory
- .createSimpleTTSChunks(helpPrompt), TTSChunkFactory
- .createSimpleTTSChunks(timeoutPrompt), correlationID);
- }
-
- public static SetGlobalProperties buildSetGlobalProperties(
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- Integer correlationID) {
- SetGlobalProperties req = new SetGlobalProperties();
- req.setCorrelationID(correlationID);
-
- req.setHelpPrompt(helpChunks);
- req.setTimeoutPrompt(timeoutChunks);
-
- return req;
- }
-
-
- public static SetGlobalProperties buildSetGlobalProperties(
- String helpPrompt, String timeoutPrompt, String vrHelpTitle,
- Vector<VrHelpItem> vrHelp, Integer correlationID) {
- return buildSetGlobalProperties(TTSChunkFactory
- .createSimpleTTSChunks(helpPrompt), TTSChunkFactory
- .createSimpleTTSChunks(timeoutPrompt), vrHelpTitle, vrHelp, correlationID);
- }
-
-
- public static SetGlobalProperties buildSetGlobalProperties(
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- String vrHelpTitle, Vector<VrHelpItem> vrHelp,
- Integer correlationID) {
- SetGlobalProperties req = new SetGlobalProperties();
- req.setCorrelationID(correlationID);
-
- req.setHelpPrompt(helpChunks);
- req.setTimeoutPrompt(timeoutChunks);
-
- req.setVrHelpTitle(vrHelpTitle);
- req.setVrHelp(vrHelp);
-
- return req;
- }
-
-
-
-
- public static SetMediaClockTimer buildSetMediaClockTimer(Integer hours,
- Integer minutes, Integer seconds, UpdateMode updateMode,
- Integer correlationID) {
-
- SetMediaClockTimer msg = new SetMediaClockTimer();
- if (hours != null || minutes != null || seconds != null) {
- StartTime startTime = new StartTime();
- msg.setStartTime(startTime);
- startTime.setHours(hours);
- startTime.setMinutes(minutes);
- startTime.setSeconds(seconds);
- }
-
- msg.setUpdateMode(updateMode);
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- @Deprecated
- public static SetMediaClockTimer buildSetMediaClockTimer(
- UpdateMode updateMode, Integer correlationID) {
- Integer hours = null;
- Integer minutes = null;
- Integer seconds = null;
-
- SetMediaClockTimer msg = buildSetMediaClockTimer(hours, minutes,
- seconds, updateMode, correlationID);
- return msg;
- }
-
- public static Show buildShow(String mainText1, String mainText2,
- String mainText3, String mainText4,
- String statusBar, String mediaClock, String mediaTrack,
- Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets,
- TextAlignment alignment, Integer correlationID) {
- Show msg = new Show();
- msg.setCorrelationID(correlationID);
- msg.setMainField1(mainText1);
- msg.setMainField2(mainText2);
- msg.setStatusBar(statusBar);
- msg.setMediaClock(mediaClock);
- msg.setMediaTrack(mediaTrack);
- msg.setAlignment(alignment);
- msg.setMainField3(mainText3);
- msg.setMainField4(mainText4);
- msg.setGraphic(graphic);
- msg.setSoftButtons(softButtons);
- msg.setCustomPresets(customPresets);
-
- return msg;
- }
-
- public static Show buildShow(String mainText1, String mainText2, String mainText3, String mainText4,
- TextAlignment alignment, Integer correlationID) {
- Show msg = buildShow(mainText1, mainText2, mainText3, mainText4, null, null, null, null, null, null, alignment,
- correlationID);
- return msg;
- }
-
- public static Show buildShow(String mainText1, String mainText2,
- String statusBar, String mediaClock, String mediaTrack,
- TextAlignment alignment, Integer correlationID) {
- Show msg = new Show();
- msg.setCorrelationID(correlationID);
- msg.setMainField1(mainText1);
- msg.setMainField2(mainText2);
- msg.setStatusBar(statusBar);
- msg.setMediaClock(mediaClock);
- msg.setMediaTrack(mediaTrack);
- msg.setAlignment(alignment);
-
- return msg;
- }
-
- public static Show buildShow(String mainText1, String mainText2,
- TextAlignment alignment, Integer correlationID) {
- Show msg = buildShow(mainText1, mainText2, null, null, null, alignment,
- correlationID);
- return msg;
- }
-
- public static Speak buildSpeak(String ttsText, Integer correlationID) {
- Speak msg = buildSpeak(TTSChunkFactory.createSimpleTTSChunks(ttsText),
- correlationID);
- return msg;
- }
-
- public static Speak buildSpeak(Vector<TTSChunk> ttsChunks,
- Integer correlationID) {
-
- Speak msg = new Speak();
- msg.setCorrelationID(correlationID);
-
- msg.setTtsChunks(ttsChunks);
-
- return msg;
- }
-
- public static SubscribeButton buildSubscribeButton(ButtonName buttonName,
- Integer correlationID) {
-
- SubscribeButton msg = new SubscribeButton();
- msg.setCorrelationID(correlationID);
- msg.setButtonName(buttonName);
-
- return msg;
- }
-
- public static UnregisterAppInterface buildUnregisterAppInterface(
- Integer correlationID) {
- UnregisterAppInterface msg = new UnregisterAppInterface();
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- public static UnsubscribeButton buildUnsubscribeButton(
- ButtonName buttonName, Integer correlationID) {
-
- UnsubscribeButton msg = new UnsubscribeButton();
- msg.setCorrelationID(correlationID);
- msg.setButtonName(buttonName);
-
- return msg;
- }
-
- public static SubscribeVehicleData BuildSubscribeVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
- boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
- boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
- boolean driverBraking, Integer correlationID)
- {
- SubscribeVehicleData msg = new SubscribeVehicleData();
- msg.setGps(gps);
- msg.setSpeed(speed);
- msg.setRpm(rpm);
- msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
- msg.setInstantFuelConsumption(instantFuelConsumption);
- msg.setExternalTemperature(externalTemperature);
- msg.setPrndl(prndl);
- msg.setTirePressure(tirePressure);
- msg.setOdometer(odometer);
- msg.setBeltStatus(beltStatus);
- msg.setBodyInformation(bodyInformation);
- msg.setDeviceStatus(deviceStatus);
- msg.setDriverBraking(driverBraking);
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- public static UnsubscribeVehicleData BuildUnsubscribeVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
- boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
- boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
- boolean driverBraking, Integer correlationID)
- {
- UnsubscribeVehicleData msg = new UnsubscribeVehicleData();
- msg.setGps(gps);
- msg.setSpeed(speed);
- msg.setRpm(rpm);
- msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
- msg.setInstantFuelConsumption(instantFuelConsumption);
- msg.setExternalTemperature(externalTemperature);
- msg.setPrndl(prndl);
- msg.setTirePressure(tirePressure);
- msg.setOdometer(odometer);
- msg.setBeltStatus(beltStatus);
- msg.setBodyInformation(bodyInformation);
- msg.setDeviceStatus(deviceStatus);
- msg.setDriverBraking(driverBraking);
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
- public static GetVehicleData BuildGetVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
- boolean instantFuelConsumption, boolean externalTemperature, boolean vin, boolean prndl, boolean tirePressure,
- boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
- boolean driverBraking, Integer correlationID)
- {
- GetVehicleData msg = new GetVehicleData();
- msg.setGps(gps);
- msg.setSpeed(speed);
- msg.setRpm(rpm);
- msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
- msg.setInstantFuelConsumption(instantFuelConsumption);
- msg.setExternalTemperature(externalTemperature);
- msg.setVin(vin);
- msg.setPrndl(prndl);
- msg.setTirePressure(tirePressure);
- msg.setOdometer(odometer);
- msg.setBeltStatus(beltStatus);
- msg.setBodyInformation(bodyInformation);
- msg.setDeviceStatus(deviceStatus);
- msg.setDriverBraking(driverBraking);
- msg.setCorrelationID(correlationID);
-
-
- return msg;
- }
-
- public static ReadDID BuildReadDID(Integer ecuName, Vector<Integer> didLocation, Integer correlationID)
- {
- ReadDID msg = new ReadDID();
- msg.setCorrelationID(correlationID);
- msg.setEcuName(ecuName);
- msg.setDidLocation(didLocation);
- return msg;
- }
-
- public static GetDTCs BuildGetDTCs(Integer ecuName, Integer correlationID)
- {
- GetDTCs msg = new GetDTCs();
- msg.setCorrelationID(correlationID);
- msg.setEcuName(ecuName);
-
- return msg;
- }
-
- public static ScrollableMessage BuildScrollableMessage(String scrollableMessageBody, Integer timeout, Vector<SoftButton> softButtons, Integer correlationID)
- {
- ScrollableMessage msg = new ScrollableMessage();
- msg.setCorrelationID(correlationID);
- msg.setScrollableMessageBody(scrollableMessageBody);
- msg.setTimeout(timeout);
- msg.setSoftButtons(softButtons);
-
- return msg;
- }
-
- public static Slider BuildSlider(Integer numTicks, Integer position, String sliderHeader, Vector<String> sliderFooter, Integer timeout, Integer correlationID)
- {
- Slider msg = new Slider();
- msg.setCorrelationID(correlationID);
- msg.setNumTicks(numTicks);
- msg.setPosition(position);
- msg.setSliderHeader(sliderHeader);
- msg.setSliderFooter(sliderFooter);
- msg.setTimeout(timeout);
-
- return msg;
- }
-
- public static ShowConstantTBT BuildShowConstantTBT(String navigationText1, String navigationText2, String eta,
- String totalDistance, Image turnIcon, Double distanceToManeuver,
- Double distanceToManeuverScale, boolean maneuverComplete,
- Vector <SoftButton> softButtons, Integer correlationID)
- {
- ShowConstantTBT msg = new ShowConstantTBT();
- msg.setCorrelationID(correlationID);
- msg.setNavigationText1(navigationText1);
- msg.setNavigationText2(navigationText2);
- msg.setEta(eta);
- msg.setTotalDistance(totalDistance);
- msg.setTurnIcon(turnIcon);
- msg.setDistanceToManeuver(distanceToManeuverScale);
- msg.setDistanceToManeuverScale(distanceToManeuverScale);
- msg.setManeuverComplete(maneuverComplete);
- msg.setSoftButtons(softButtons);
-
- return msg;
- }
-
- public static AlertManeuver BuildAlertManeuver(String ttsText, Vector<SoftButton> softButtons, Integer correlationID)
- {
- Vector<TTSChunk> ttsChunks = TTSChunkFactory
- .createSimpleTTSChunks(ttsText);
-
- AlertManeuver msg = BuildAlertManeuver(ttsChunks, softButtons, correlationID);
-
- return msg;
- }
-
- public static AlertManeuver BuildAlertManeuver(Vector<TTSChunk> ttsChunks, Vector<SoftButton> softButtons, Integer correlationID)
- {
- AlertManeuver msg = new AlertManeuver();
- msg.setCorrelationID(correlationID);
- msg.setTtsChunks(ttsChunks);
- msg.setSoftButtons(softButtons);
-
- return msg;
- }
-
- public static UpdateTurnList BuildUpdateTurnList(Vector<Turn> turnList, Vector<SoftButton> softButtons, Integer correlationID)
- {
- UpdateTurnList msg = new UpdateTurnList();
- msg.setCorrelationID(correlationID);
- msg.setTurnList(turnList);
- msg.setSoftButtons(softButtons);
-
- return msg;
- }
-
- public static ChangeRegistration BuildChangeRegistration(Language language, Language hmiDisplayLanguage, Integer correlationID)
- {
- ChangeRegistration msg = new ChangeRegistration();
- msg.setCorrelationID(correlationID);
- msg.setLanguage(language);
- msg.setHmiDisplayLanguage(hmiDisplayLanguage);
-
- return msg;
- }
-
- public static SetDisplayLayout BuildSetDisplayLayout(String displayLayout, Integer correlationID)
- {
- SetDisplayLayout msg = new SetDisplayLayout();
- msg.setCorrelationID(correlationID);
- msg.setDisplayLayout(displayLayout);
-
- return msg;
- }
-
- public static PerformAudioPassThru BuildPerformAudioPassThru(String ttsText, String audioPassThruDisplayText1, String audioPassThruDisplayText2,
- SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample,
- AudioType audioType, Boolean muteAudio, Integer correlationID)
- {
- Vector<TTSChunk> chunks = TTSChunkFactory
- .createSimpleTTSChunks(ttsText);
-
- PerformAudioPassThru msg = BuildPerformAudioPassThru(chunks, audioPassThruDisplayText1, audioPassThruDisplayText2,
- samplingRate, maxDuration, bitsPerSample,audioType, muteAudio, correlationID);
-
- return msg;
- }
-
- public static PerformAudioPassThru BuildPerformAudioPassThru(Vector<TTSChunk> initialPrompt, String audioPassThruDisplayText1, String audioPassThruDisplayText2,
- SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample,
- AudioType audioType, Boolean muteAudio, Integer correlationID)
- {
- PerformAudioPassThru msg = new PerformAudioPassThru();
- msg.setCorrelationID(correlationID);
- msg.setInitialPrompt(initialPrompt);
- msg.setAudioPassThruDisplayText1(audioPassThruDisplayText1);
- msg.setAudioPassThruDisplayText2(audioPassThruDisplayText2);
- msg.setSamplingRate(samplingRate);
- msg.setMaxDuration(maxDuration);
- msg.setBitsPerSample(bitsPerSample);
- msg.setAudioType(audioType);
- msg.setMuteAudio(muteAudio);
-
- return msg;
- }
-
- public static EndAudioPassThru BuildEndAudioPassThru(Integer correlationID)
- {
- EndAudioPassThru msg = new EndAudioPassThru();
- msg.setCorrelationID(correlationID);
-
- return msg;
- }
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCResponse.java
deleted file mode 100755
index b99bd6044..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCResponse.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- *
- */
-package com.smartdevicelink.proxy;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.Result;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Result sent by SMARTDEVICELINK after an RPC is processed, consists of four parts:
- * <ul>
- * <li>
- * CorrelationID:
- * <ul>
- * An integer value correlating the response to the corresponding request.
- * </ul>
- * </li> <li>Success:
- * <ul>
- * A Boolean indicating whether the original request was successfully processed.
- * </ul>
- * </li> <li>ResultCode:
- * <ul>
- *
- * The result code provides additional information about a response returning a
- * failed outcome.
- * <br>
- *
- * Any response can have at least one, or possibly more, of the following result
- * code values: SUCCESS, INVALID_DATA, OUT_OF_MEMORY, TOO_MANY_PENDING_REQUESTS,
- * APPLICATION_NOT_REGISTERED, GENERIC_ERROR,REJECTED.
- * <br>
- *
- * Any additional result codes for a given operation can be found in related
- * RPCs
- * <br>
- * </ul>
- * </li> <li>Info:
- * <ul>
- * A string of text representing additional information returned from SMARTDEVICELINK. This
- * could be useful in debugging.
- * </ul>
- * </li>
- * </ul>
- */
-public class RPCResponse extends RPCMessage {
- /**
- *<p>Constructs a newly allocated RPCResponse object using function name</p>
- *@param functionName a string that indicates the function's name
- */
- public RPCResponse(String functionName) {
- super(functionName, "response");
- }
- /**
- *<p>Constructs a newly allocated RPCResponse object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public RPCResponse(Hashtable hash) {
- super(hash);
- }
- /**
- *<p>Constructs a newly allocated RPCResponse object using a RPCMessage object</p>
- *@param rpcMsg The {@linkplain RPCMessage} to use
- */
- public RPCResponse(RPCMessage rpcMsg) {
- super(rpcMsg);
- }
-
- /**
- * <p>
- * Returns correlationID the ID of the request
- * </p>
- *
- * @return int the ID of the request
- */
- public Integer getCorrelationID() {
- return (Integer)function.get(Names.correlationID);
- }
-
- /**
- * <p>
- * Set the correlationID
- * </p>
- *
- * @param correlationID
- * the ID of the response
- */
- public void setCorrelationID(Integer correlationID) {
- if (correlationID != null) {
- function.put(Names.correlationID, correlationID );
- } else if (parameters.contains(Names.correlationID)){
- function.remove(Names.correlationID);
- }
- }
- /**
- * <p>
- * Returns Success whether the request is successfully processed
- * </p>
- *
- * @return Boolean the status of whether the request is successfully done
- */
- public Boolean getSuccess() {
- return (Boolean) parameters.get( Names.success );
- }
- /**
- * <p>
- * Set the Success status
- * </p>
- *
- * @param success
- * whether the request is successfully processed
- */
- public void setSuccess( Boolean success ) {
- if (success != null) {
- parameters.put(Names.success, success );
- }
- }
- /**
- * <p>
- * Returns ResultCode additional information about a response returning a failed outcome
- * </p>
- *
- * @return {@linkplain Result} the status of whether the request is successfully done
- */
- public Result getResultCode() {
- Object obj = parameters.get(Names.resultCode);
- if (obj instanceof Result) {
- return (Result) obj;
- } else if (obj instanceof String) {
- Result theCode = null;
- try {
- theCode = Result.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.resultCode, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>
- * Set the additional information about a response returning a failed outcome
- * </p>
- *
- * @param resultCode
- * whether the request is successfully processed
- */
- public void setResultCode( Result resultCode ) {
- if (resultCode != null) {
- parameters.put(Names.resultCode, resultCode );
- }
- }
- /**
- * <p>
- * Returns a string of text representing additional information returned from SMARTDEVICELINK
- * </p>
- *
- * @return String A string of text representing additional information returned from SMARTDEVICELINK
- */
- public String getInfo() {
- return (String) parameters.get( Names.info );
- }
- /**
- * <p>
- * Set a string of text representing additional information returned from SMARTDEVICELINK
- * </p>
- *
- * @param info
- * a string of text representing additional information returned from SMARTDEVICELINK
- */
- public void setInfo( String info ) {
- if (info != null) {
- parameters.put(Names.info, info );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCStruct.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCStruct.java
deleted file mode 100755
index f6c4516ac..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/RPCStruct.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.util.Hashtable;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import com.smartdevicelink.marshal.JsonRPCMarshaller;
-import com.smartdevicelink.proxy.constants.Names;
-
-public class RPCStruct {
-
- private byte[] _bulkData = null;
-
- protected Hashtable<String, Object> store = null;
-
- public RPCStruct() {
- store = new Hashtable<String, Object>();
- }
-
- protected RPCStruct(RPCStruct rpcs) {
- this.store = rpcs.store;
- }
-
- public RPCStruct(Hashtable<String, Object> hashtable) {
- store = hashtable;
- //store = (Hashtable<String, Object>) ObjectCopier.copy(hashtable);
- }
-
- public void deserializeJSON(JSONObject jsonObject) throws JSONException {
- store = JsonRPCMarshaller.deserializeJSONObject(jsonObject);
- }
-
- // deserializeJSONObject method moved to JsonRPCMarshaller for consistency
- // Keep reference here for backwards compatibility
- @Deprecated
- public static Hashtable<String, Object> deserializeJSONObject(JSONObject jsonObject)
- throws JSONException {
- return JsonRPCMarshaller.deserializeJSONObject(jsonObject);
- }
-
- public JSONObject serializeJSON() throws JSONException {
- return JsonRPCMarshaller.serializeHashtable(store);
- }
-
- public JSONObject serializeJSON(byte version) throws JSONException {
- if (version == 2) {
- String messageType = (String)store.keys().nextElement();
- Hashtable function = (Hashtable)store.get(messageType);
- Hashtable parameters = (Hashtable)function.get(Names.parameters);
- return JsonRPCMarshaller.serializeHashtable(parameters);
- //Hashtable hashToSend = new Hashtable();
- //hashToSend.put(Names.parameters, parameters);
- //return JsonRPCMarshaller.serializeHashtable(hashToSend);
- } else return JsonRPCMarshaller.serializeHashtable(store);
- }
-
- public byte[] getBulkData() {
- return this._bulkData;
- }
-
- public void setBulkData(byte[] bulkData) {
- if (bulkData != null) {
- this._bulkData = new byte[bulkData.length];
- System.arraycopy(bulkData, 0, _bulkData, 0, bulkData.length);
- //this._bulkData = bulkData;
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxy.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxy.java
deleted file mode 100755
index dc1918042..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxy.java
+++ /dev/null
@@ -1,373 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.util.Vector;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.exception.SmartDeviceLinkExceptionCause;
-import com.smartdevicelink.proxy.rpc.smartdevicelinkMsgVersion;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.trace.SmartDeviceLinkTrace;
-import com.smartdevicelink.transport.BTTransportConfig;
-import com.smartdevicelink.transport.BaseTransportConfig;
-import com.smartdevicelink.transport.TransportType;
-@Deprecated
-public class SmartDeviceLinkProxy extends SmartDeviceLinkProxyBase<IProxyListener> {
-
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
- private static final String SMARTDEVICELINK_LIB_PRIVATE_TOKEN = "{DAE1A88C-6C16-4768-ACA5-6F1247EA01C2}";
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener) throws SmartDeviceLinkException {
- super( listener,
- /*application context*/null,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- /*callbackToUIThread*/ true,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources)
- throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- /*callbackToUIThread*/ true,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener, SmartDeviceLinkProxyConfigurationResources.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, boolean callbackToUIThread) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- callbackToUIThread,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener, callBackToUIThread.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources
- * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- boolean callbackToUIThread) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- callbackToUIThread,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener, callBackToUIThread.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /********************************************** TRANSPORT SWITCHING SUPPORT *****************************************/
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- /*application context*/null,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- /*callbackToUIThread*/ true,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- BaseTransportConfig transportConfig)
- throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- /*callbackToUIThread*/ true,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener, SmartDeviceLinkProxyConfigurationResources.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- callbackToUIThread,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener, callBackToUIThread.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources
- * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public SmartDeviceLinkProxy(IProxyListener listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/false,
- /*app name*/ null,
- /*TTS Name*/null,
- /*ngn media screen app name*/null,
- /*vr synonyms*/null,
- /*is media app*/ null,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/null,
- /*HMI Display Language Desired*/null,
- /*App Type*/null,
- /*App ID*/null,
- /*autoActivateID*/null,
- callbackToUIThread,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxy instance passing in: IProxyListener, callBackToUIThread.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /******************** Public Helper Methods *************************/
-
-
- /**
- * Sends a RegisterAppInterface RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param smartDeviceLinkMsgVersion
- * @param appName
- * @param ngnMediaScreenAppName
- * @param vrSynonyms
- * @param isMediaApp
- * @param languageDesired
- * @param autoActivateID
- * @param correlationID
- *
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public void registerAppInterface(
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, String appName, String ngnMediaScreenAppName,
- Vector<String> vrSynonyms, Boolean isMediaApp, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID, Integer correlationID)
- throws SmartDeviceLinkException {
-
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This SmartDeviceLinkProxy object has been disposed, it is no long capable of sending requests.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- registerAppInterfacePrivate(
- smartDeviceLinkMsgVersion,
- appName,
- null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- languageDesired,
- hmiDisplayLanguageDesired,
- null,
- appID,
- autoActivateID,
- correlationID);
- }
-
- /**
- * Sends a RegisterAppInterface RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param appName
- * @param isMediaApp
- * @param autoActivateID
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public void registerAppInterface(
- String appName, Boolean isMediaApp, String appID, String autoActivateID, Integer correlationID)
- throws SmartDeviceLinkException {
-
- registerAppInterface(
- /*smartDeviceLinkMsgVersion*/null,
- appName,
- /*ngnMediaScreenAppName*/null,
- /*vrSynonyms*/null,
- isMediaApp,
- /*languageDesired*/null,
- /*hmiDisplayLanguageDesired*/null,
- appID,
- autoActivateID,
- correlationID);
- }
-
- /**
- * Sends a RegisterAppInterface RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param appName
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public void registerAppInterface(String appName, String appID, Integer correlationID)
- throws SmartDeviceLinkException {
-
- registerAppInterface(appName, false, appID, "", correlationID);
- }
-
- /**
- * Sends an UnregisterAppInterface RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- @Deprecated
- public void unregisterAppInterface(Integer correlationID)
- throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This SmartDeviceLinkProxy object has been disposed, it is no long capable of executing methods.",
- SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- unregisterAppInterfacePrivate(correlationID);
- }
-
- /**
- * Returns is isConnected state of the SMARTDEVICELINK transport.
- *
- * @return Boolean isConnected
- */
- @Deprecated
- public Boolean getIsConnected() {
- return super.getIsConnected();
- }
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyALM.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyALM.java
deleted file mode 100755
index cc4a19a13..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyALM.java
+++ /dev/null
@@ -1,1145 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.util.Vector;
-
-import android.app.Service;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.exception.SmartDeviceLinkExceptionCause;
-import com.smartdevicelink.proxy.Version;
-import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
-import com.smartdevicelink.proxy.rpc.ButtonCapabilities;
-import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
-import com.smartdevicelink.proxy.rpc.PresetBankCapabilities;
-import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
-import com.smartdevicelink.proxy.rpc.smartdevicelinkMsgVersion;
-import com.smartdevicelink.proxy.rpc.TTSChunk;
-import com.smartdevicelink.proxy.rpc.VehicleType;
-import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
-import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.SmartDeviceLinkDisconnectedReason;
-import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
-import com.smartdevicelink.trace.SmartDeviceLinkTrace;
-import com.smartdevicelink.transport.BTTransportConfig;
-import com.smartdevicelink.transport.BaseTransportConfig;
-import com.smartdevicelink.transport.TransportType;
-
-public class SmartDeviceLinkProxyALM extends SmartDeviceLinkProxyBase<IProxyListenerALM> {
-
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
- private static final String SMARTDEVICELINK_LIB_PRIVATE_TOKEN = "{DAE1A88C-6C16-4768-ACA5-6F1247EA01C2}";
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK
- *
- * Takes advantage of the advanced lifecycle management.
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName - Name of the application displayed on SMARTDEVICELINK.
- * @param isMediaApp - Indicates if the app is a media application.
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,
- Language languageDesired, Language hmiDisplayLanguageDesired, String appID) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- /*ngn media app*/null,
- /*vr synonyms*/null,
- /*is media app*/isMediaApp,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- /*autoActivateID*/null,
- /*callbackToUIThread*/ false,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, and isMediaApp.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName - Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp - Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID - ID used to re-register previously registered application.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
- Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion,
- Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
- String autoActivateID) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- /*callbackToUIThread*/ false,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +
- "vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName - Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp - Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID - ID used to re-register previously registered application.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms,
- Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired,
- Language hmiDisplayLanguageDesired, String appID, String autoActivateID) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- /*callbackToUIThread*/ false,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName - Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp - Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID - ID used to re-register previously registered application.
- * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
- Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion,
- Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
- String autoActivateID, boolean callbackToUIThread) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName - Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp - Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID - ID used to re-register previously registered application.
- * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID,
- boolean callbackToUIThread) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /********************************************** TRANSPORT SWITCHING SUPPORT *****************************************/
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param isMediaApp Indicates if the app is a media application.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,
- Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
- BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- /*ngn media app*/null,
- /*vr synonyms*/null,
- /*is media app*/isMediaApp,
- /*smartDeviceLinkMsgVersion*/null,
- /*language desired*/languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- /*autoActivateID*/null,
- /*callbackToUIThread*/ false,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, appName, and isMediaApp.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
- Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion,
- Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
- String autoActivateID, TransportType transportType, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- /*callbackToUIThread*/ false,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +
- "vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms,
- Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired,
- Language hmiDisplayLanguageDesired, String appID, String autoActivateID,
- BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- /*callbackToUIThread*/ false,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands to
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
- Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion,
- Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
- String autoActivateID, boolean callbackToUIThread,
- BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLink proxy configuration resources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID,
- boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appID Identifier of the client application.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
- BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- /*TTS Name*/null,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param isMediaApp Indicates if the app is a media application.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appID Identifier of the client application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException
- {
- super( listener,
- /*smartDeviceLinkProxyConfigurationResources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*ttsName*/null,
- /*ngnMediaScreenAppName*/null,
- /*vrSynonyms*/null,
- isMediaApp,
- /*smartDeviceLinkMsgVersion*/null,
- languageDesired,
- hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- /*autoActivateID*/null,
- callbackToUIThread,
- preRegister,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
- "appName, isMediaApp, languageDesired, hmiDisplayLanguageDesired" + "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param isMediaApp Indicates if the app is a media application.
- * @param appID Identifier of the client application.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLinkProxyConfigurationResources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*ttsName*/null,
- /*ngnMediaScreenAppName*/null,
- /*vrSynonyms*/null,
- isMediaApp,
- /*smartDeviceLinkMsgVersion*/null,
- /*languageDesired*/null,
- /*hmiDisplayLanguageDesired*/null,
- /*App Type*/null,
- /*App ID*/appID,
- /*autoActivateID*/null,
- false,
- false,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
- "appName, isMediaApp, appID", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
-
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param isMediaApp Indicates if the app is a media application.
- * @param appID Identifier of the client application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID,
- boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {
- super( listener,
- /*smartDeviceLinkProxyConfigurationResources*/null,
- /*enable advanced lifecycle management*/true,
- appName,
- /*ttsName*/null,
- /*ngnMediaScreenAppName*/null,
- /*vrSynonyms*/null,
- isMediaApp,
- /*smartDeviceLinkMsgVersion*/null,
- /*languageDesired*/null,
- /*hmiDisplayLanguageDesired*/null,
- /*App Type*/null,
- /*App ID*/appID,
- /*autoActivateID*/null,
- callbackToUIThread,
- preRegister,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
- "appName, isMediaApp, " + "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- * @param appService Reference to the apps service object.
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appID Identifier of the client application.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(Service appService, IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- ttsName,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- new BTTransportConfig());
-
- this.setAppService(appService);
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
-
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appID Identifier of the client application.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- ttsName,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appID Identifier of the client application.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
- BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- ttsName,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/null,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appType Type of application.
- * @param appID Identifier of the client application.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
- Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- ttsName,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/appType,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- new BTTransportConfig());
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, appType, appID, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.
- *
- * Takes advantage of the advanced lifecycle management.
- *
- * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.
- * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.
- * @param appName Name of the application displayed on SMARTDEVICELINK.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped
- * vehicles. Limited to five characters.
- * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
- * @param isMediaApp Indicates if the app is a media application.
- * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than
- * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.
- * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.
- * @param hmiDisplayLanguageDesired Desired language in HMI.
- * @param appType Type of application.
- * @param appID Identifier of the client application.
- * @param autoActivateID ID used to re-register previously registered application.
- * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
- * @param preRegister Flag that indicates that client should be pre-registred or not
- * @param transportConfig Initial configuration for transport.
- * @throws SmartDeviceLinkException
- */
- public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
- String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
- BaseTransportConfig transportConfig) throws SmartDeviceLinkException {
- super( listener,
- smartDeviceLinkProxyConfigurationResources,
- /*enable advanced lifecycle management*/true,
- appName,
- ttsName,
- ngnMediaScreenAppName,
- vrSynonyms,
- isMediaApp,
- smartDeviceLinkMsgVersion,
- languageDesired,
- /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
- /*App Type*/appType,
- /*App ID*/appID,
- autoActivateID,
- callbackToUIThread,
- preRegister,
- transportConfig);
-
- SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +
- "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, appType, appID, autoActivateID, " +
- "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
- /***************************************** END OF TRANSPORT SWITCHING SUPPORT ***************************************/
-
- // Allow applications using ALM to reset the proxy (dispose and reinstantiate)
- /**
- * Disconnects the application from SMARTDEVICELINK, then recreates the transport such that
- * the next time a SMARTDEVICELINK unit discovers applications, this application will be
- * available.
- */
- public void resetProxy() throws SmartDeviceLinkException {
- super.cycleProxy(SmartDeviceLinkDisconnectedReason.APPLICATION_REQUESTED_DISCONNECT);
- }
-
- /********* Getters for values returned by RegisterAppInterfaceResponse **********/
-
- /**
- * Gets buttonCapabilities set when application interface is registered.
- *
- * @return buttonCapabilities
- * @throws SmartDeviceLinkException
- */
- public Vector<ButtonCapabilities> getButtonCapabilities() throws SmartDeviceLinkException{
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the buttonCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _buttonCapabilities;
- }
-
- /**
- * Gets getSoftButtonCapabilities set when application interface is registered.
- *
- * @return softButtonCapabilities
- * @throws SmartDeviceLinkException
- */
- public Vector<SoftButtonCapabilities> getSoftButtonCapabilities() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the softButtonCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _softButtonCapabilities;
- }
-
- /**
- * Gets getPresetBankCapabilities set when application interface is registered.
- *
- * @return presetBankCapabilities
- * @throws SmartDeviceLinkException
- */
- public PresetBankCapabilities getPresetBankCapabilities() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the presetBankCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _presetBankCapabilities;
- }
-
- /**
- * Gets the current version information of the proxy.
- *
- * @return String
- * @throws SmartDeviceLinkException
- */
- public String getProxyVersionInfo() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- if (Version.VERSION != null)
- return Version.VERSION;
-
- return null;
- }
-
-
-
- /**
- * Gets displayCapabilities set when application interface is registered.
- *
- * @return displayCapabilities
- * @throws SmartDeviceLinkException
- */
- public DisplayCapabilities getDisplayCapabilities() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the displayCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _displayCapabilities;
- }
-
- /**
- * Gets hmiZoneCapabilities set when application interface is registered.
- *
- * @return hmiZoneCapabilities
- * @throws SmartDeviceLinkException
- */
- public Vector<HmiZoneCapabilities> getHmiZoneCapabilities() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the hmiZoneCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _hmiZoneCapabilities;
- }
-
- /**
- * Gets speechCapabilities set when application interface is registered.
- *
- * @return speechCapabilities
- * @throws SmartDeviceLinkException
- */
- public Vector<SpeechCapabilities> getSpeechCapabilities() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the speechCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
-
- return _speechCapabilities;
- }
-
- /**
- * Gets smartDeviceLinkLanguage set when application interface is registered.
- *
- * @return smartDeviceLinkLanguage
- * @throws SmartDeviceLinkException
- */
- public Language getSmartDeviceLinkLanguage() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the smartDeviceLinkLanguage.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _smartDeviceLinkLanguage;
- }
-
- /**
- * Gets getHmiDisplayLanguage set when application interface is registered.
- *
- * @return hmiDisplayLanguage
- * @throws SmartDeviceLinkException
- */
- public Language getHmiDisplayLanguage() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the hmiDisplayLanguage.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _hmiDisplayLanguage;
- }
-
- /**
- * Gets smartDeviceLinkMsgVersion set when application interface is registered.
- *
- * @return smartDeviceLinkMsgVersion
- * @throws SmartDeviceLinkException
- */
- public smartdevicelinkMsgVersion getsmartdevicelinkMsgVersion() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the smartDeviceLinkMsgVersion.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _smartDeviceLinkMsgVersion;
- }
-
- /**
- * Gets vrCapabilities set when application interface is registered.
- *
- * @return vrCapabilities
- * @throws SmartDeviceLinkException
- */
- public Vector<VrCapabilities> getVrCapabilities() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the vrCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _vrCapabilities;
- }
-
- /**
- * Gets getVehicleType set when application interface is registered.
- *
- * @return vehicleType
- * @throws SmartDeviceLinkException
- */
- public VehicleType getVehicleType() throws SmartDeviceLinkException {
- // Test if proxy has been disposed
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test SMARTDEVICELINK availability
- if (!_appInterfaceRegisterd) {
- throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the vehicleType.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- return _vehicleType;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyBase.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyBase.java
deleted file mode 100755
index 40b4d3b9f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyBase.java
+++ /dev/null
@@ -1,3931 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import android.app.Service;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Handler;
-import android.os.Looper;
-import android.telephony.TelephonyManager;
-import android.util.Log;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.exception.SmartDeviceLinkExceptionCause;
-import com.smartdevicelink.marshal.JsonRPCMarshaller;
-import com.smartdevicelink.messageDispatcher.IDispatchingStrategy;
-import com.smartdevicelink.messageDispatcher.IncomingProtocolMessageComparitor;
-import com.smartdevicelink.messageDispatcher.InternalProxyMessageComparitor;
-import com.smartdevicelink.messageDispatcher.OutgoingProtocolMessageComparitor;
-import com.smartdevicelink.messageDispatcher.ProxyMessageDispatcher;
-import com.smartdevicelink.protocol.ProtocolMessage;
-import com.smartdevicelink.protocol.SmartDeviceLinkProtocol;
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.protocol.enums.MessageType;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.proxy.callbacks.InternalProxyMessage;
-import com.smartdevicelink.proxy.callbacks.OnError;
-import com.smartdevicelink.proxy.callbacks.OnProxyClosed;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
-import com.smartdevicelink.proxy.interfaces.IProxyListenerBase;
-import com.smartdevicelink.proxy.rpc.*;
-import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
-import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
-import com.smartdevicelink.proxy.rpc.enums.AudioType;
-import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.ImageType;
-import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.SmartDeviceLinkConnectionState;
-import com.smartdevicelink.proxy.rpc.enums.SmartDeviceLinkDisconnectedReason;
-import com.smartdevicelink.proxy.rpc.enums.SmartDeviceLinkInterfaceAvailability;
-import com.smartdevicelink.proxy.rpc.enums.SystemContext;
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
-import com.smartdevicelink.smartDeviceLinkConnection.IsmartDeviceLinkConnectionListener;
-import com.smartdevicelink.smartDeviceLinkConnection.smartDeviceLinkConnection;
-import com.smartdevicelink.trace.SmartDeviceLinkTrace;
-import com.smartdevicelink.trace.TraceDeviceInfo;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.transport.BaseTransportConfig;
-import com.smartdevicelink.transport.SiphonServer;
-import com.smartdevicelink.transport.TransportType;
-import com.smartdevicelink.util.DebugTool;
-
-public abstract class SmartDeviceLinkProxyBase<proxyListenerType extends IProxyListenerBase> {
- // Used for calls to Android Log class.
- public static final String TAG = "SmartDeviceLinkProxy";
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
- private static final int PROX_PROT_VER_ONE = 1;
-
- private smartDeviceLinkConnection _smartDeviceLinkConnection;
- private proxyListenerType _proxyListener = null;
-
- protected Service _appService = null;
-
- // Protected Correlation IDs
- private final int REGISTER_APP_INTERFACE_CORRELATION_ID = 65529,
- UNREGISTER_APP_INTERFACE_CORRELATION_ID = 65530,
- POLICIES_CORRELATION_ID = 65535;
-
- // SmartDeviceLinkhronization Objects
- private static final Object CONNECTION_REFERENCE_LOCK = new Object(),
- INCOMING_MESSAGE_QUEUE_THREAD_LOCK = new Object(),
- OUTGOING_MESSAGE_QUEUE_THREAD_LOCK = new Object(),
- INTERNAL_MESSAGE_QUEUE_THREAD_LOCK = new Object(),
- APP_INTERFACE_REGISTERED_LOCK = new Object();
-
- // RPC Session ID
- private byte _rpcSessionID = 0;
-
- private int iFileCount = 0;
-
- // Device Info for logging
- private TraceDeviceInfo _traceDeviceInterrogator = null;
-
- // Declare Queuing Threads
- private ProxyMessageDispatcher<ProtocolMessage> _incomingProxyMessageDispatcher;
- private ProxyMessageDispatcher<ProtocolMessage> _outgoingProxyMessageDispatcher;
- private ProxyMessageDispatcher<InternalProxyMessage> _internalProxyMessageDispatcher;
-
- // Flag indicating if callbacks should be called from UIThread
- private Boolean _callbackToUIThread = false;
- // UI Handler
- private Handler _mainUIHandler = null;
-
- // SmartDeviceLinkProxy Advanced Lifecycle Management
- protected Boolean _advancedLifecycleManagementEnabled = false;
- // Parameters passed to the constructor from the app to register an app interface
- private String _applicationName = null;
- private Vector<TTSChunk> _ttsName = null;
- private String _ngnMediaScreenAppName = null;
- private Boolean _isMediaApp = null;
- private Language _smartDeviceLinkLanguageDesired = null;
- private Language _hmiDisplayLanguageDesired = null;
- private Vector<AppHMIType> _appType = null;
- private String _appID = null;
- private String _autoActivateIdDesired = null;
- private smartdevicelinkMsgVersion _smartDeviceLinkMsgVersionRequest = null;
- private Vector<String> _vrSynonyms = null;
-
- /**
- * Contains current configuration for the transport that was selected during
- * construction of this object
- */
- private BaseTransportConfig _transportConfig = null;
- // Proxy State Variables
- protected Boolean _appInterfaceRegisterd = false;
- private Boolean _haveReceivedFirstNonNoneHMILevel = false;
- protected Boolean _haveReceivedFirstFocusLevel = false;
- protected Boolean _haveReceivedFirstFocusLevelFull = false;
- protected Boolean _proxyDisposed = false;
- protected SmartDeviceLinkConnectionState _smartDeviceLinkConnectionState = null;
- protected SmartDeviceLinkInterfaceAvailability _smartDeviceLinkIntefaceAvailablity = null;
- protected HMILevel _hmiLevel = null;
- private HMILevel _priorHmiLevel = null;
- protected AudioStreamingState _audioStreamingState = null;
- private AudioStreamingState _priorAudioStreamingState = null;
- protected SystemContext _systemContext = null;
- // Variables set by RegisterAppInterfaceResponse
- protected smartdevicelinkMsgVersion _smartDeviceLinkMsgVersion = null;
- protected String _autoActivateIdReturned = null;
- protected Language _smartDeviceLinkLanguage = null;
- protected Language _hmiDisplayLanguage = null;
- protected DisplayCapabilities _displayCapabilities = null;
- protected Vector<ButtonCapabilities> _buttonCapabilities = null;
- protected Vector<SoftButtonCapabilities> _softButtonCapabilities = null;
- protected PresetBankCapabilities _presetBankCapabilities = null;
- protected Vector<HmiZoneCapabilities> _hmiZoneCapabilities = null;
- protected Vector<SpeechCapabilities> _speechCapabilities = null;
- protected Vector<VrCapabilities> _vrCapabilities = null;
- protected VehicleType _vehicleType = null;
- protected Boolean firstTimeFull = true;
- protected String _proxyVersionInfo = null;
-
- protected byte _sdlproVersion = 1;
-
- // Interface broker
- private SmartDeviceLinkInterfaceBroker _interfaceBroker = null;
-
- // Private Class to Interface with smartDeviceLinkConnection
- private class SmartDeviceLinkInterfaceBroker implements IsmartDeviceLinkConnectionListener {
-
- @Override
- public void onTransportDisconnected(String info) {
- // proxyOnTransportDisconnect is called to alert the proxy that a requested
- // disconnect has completed
-
- if (_advancedLifecycleManagementEnabled) {
- // If ALM, nothing is required to be done here
- } else {
- // If original model, notify app the proxy is closed so it will delete and reinstanciate
- notifyProxyClosed(info, new SmartDeviceLinkException("Transport disconnected.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE));
- }
- }
-
- @Override
- public void onTransportError(String info, Exception e) {
- DebugTool.logError("Transport failure: " + info, e);
-
- if (_advancedLifecycleManagementEnabled) {
- // Cycle the proxy
- cycleProxy(SmartDeviceLinkDisconnectedReason.TRANSPORT_ERROR);
- } else {
- notifyProxyClosed(info, e);
- }
- }
-
- @Override
- public void onProtocolMessageReceived(ProtocolMessage msg) {
-
- try {if (msg.getData().length > 0) queueIncomingMessage(msg);}
- catch (Exception e) {}
- try {if (msg.getBulkData().length > 0) queueIncomingMessage(msg);}
- catch (Exception e) {}
- }
-
- @Override
- public void onProtocolSessionStarted(SessionType sessionType,
- byte sessionID, byte version, String correlationID) {
- if (_sdlproVersion == 1) {
- if (version == 2) setsdlproVersion(version);
- }
- if (sessionType.eq(SessionType.RPC)) {
- startRPCProtocolSession(sessionID, correlationID);
- } else if (_sdlproVersion == 2) {
- //If version 2 then don't need to specify a Session Type
- startRPCProtocolSession(sessionID, correlationID);
- } else {
- // Handle other protocol session types here
- }
- }
-
- @Override
- public void onProtocolSessionEnded(SessionType sessionType,
- byte sessionID, String correlationID) {
- // How to handle protocol session ended?
- // How should protocol session management occur?
- }
-
- @Override
- public void onProtocolError(String info, Exception e) {
- passErrorToProxyListener(info, e);
- }
- }
-
- /**
- * Constructor.
- *
- * @param listener Type of listener for this proxy base.
- * @param smartDeviceLinkProxyConfigurationResources Configuration resources for this proxy.
- * @param enableAdvancedLifecycleManagement Flag that ALM should be enabled or not.
- * @param appName Client application name.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Media Screen Application name.
- * @param vrSynonyms List of synonyms.
- * @param isMediaApp Flag that indicates that client application if media application or not.
- * @param smartDeviceLinkMsgVersion Version of SmartDeviceLink Message.
- * @param languageDesired Desired language.
- * @param hmiDisplayLanguageDesired Desired language for HMI.
- * @param appType Type of application.
- * @param appID Application identifier.
- * @param autoActivateID Auto activation identifier.
- * @param callbackToUIThread Flag that indicates that this proxy should send callback to UI thread or not.
- * @param transportConfig Configuration of transport to be used by underlying connection.
- * @throws SmartDeviceLinkException
- */
- protected SmartDeviceLinkProxyBase(proxyListenerType listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- boolean enableAdvancedLifecycleManagement, String appName, Vector<TTSChunk> ttsName,
- String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion,
- Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID,
- String autoActivateID, boolean callbackToUIThread, BaseTransportConfig transportConfig)
- throws SmartDeviceLinkException {
-
- setsdlproVersion((byte)PROX_PROT_VER_ONE);
-
- _interfaceBroker = new SmartDeviceLinkInterfaceBroker();
-
- _callbackToUIThread = callbackToUIThread;
-
- if (_callbackToUIThread) {
- _mainUIHandler = new Handler(Looper.getMainLooper());
- }
-
- // Set variables for Advanced Lifecycle Management
- _advancedLifecycleManagementEnabled = enableAdvancedLifecycleManagement;
- _applicationName = appName;
- _ttsName = ttsName;
- _ngnMediaScreenAppName = ngnMediaScreenAppName;
- _isMediaApp = isMediaApp;
- _smartDeviceLinkMsgVersionRequest = smartDeviceLinkMsgVersion;
- _vrSynonyms = vrSynonyms;
- _smartDeviceLinkLanguageDesired = languageDesired;
- _hmiDisplayLanguageDesired = hmiDisplayLanguageDesired;
- _appType = appType;
- _appID = appID;
- _autoActivateIdDesired = autoActivateID;
- _transportConfig = transportConfig;
-
- // Test conditions to invalidate the proxy
- if (listener == null) {
- throw new IllegalArgumentException("IProxyListener listener must be provided to instantiate SmartDeviceLinkProxy object.");
- }
- if (_advancedLifecycleManagementEnabled) {
- if (_applicationName == null ) {
- throw new IllegalArgumentException("To use SmartDeviceLinkProxyALM, an application name, appName, must be provided");
- }
- if (_applicationName.length() < 1 || _applicationName.length() > 100) {
- throw new IllegalArgumentException("A provided application name, appName, must be between 1 and 100 characters in length.");
- }
- if (_isMediaApp == null) {
- throw new IllegalArgumentException("isMediaApp must not be null when using SmartDeviceLinkProxyALM.");
- }
- }
-
- _proxyListener = listener;
-
- // Get information from smartDeviceLinkProxyConfigurationResources
- TelephonyManager telephonyManager = null;
- if (smartDeviceLinkProxyConfigurationResources != null) {
- telephonyManager = smartDeviceLinkProxyConfigurationResources.getTelephonyManager();
- }
-
- // Use the telephonyManager to get and log phone info
- if (telephonyManager != null) {
- // Following is not quite thread-safe (because m_traceLogger could test null twice),
- // so we need to fix this, but vulnerability (i.e. two instances of listener) is
- // likely harmless.
- if (_traceDeviceInterrogator == null) {
- _traceDeviceInterrogator = new TraceDeviceInfo(smartDeviceLinkProxyConfigurationResources.getTelephonyManager());
- } // end-if
- } // end-if
-
- // Setup Internal ProxyMessage Dispatcher
- synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
- // Ensure internalProxyMessageDispatcher is null
- if (_internalProxyMessageDispatcher != null) {
- _internalProxyMessageDispatcher.dispose();
- _internalProxyMessageDispatcher = null;
- }
-
- _internalProxyMessageDispatcher = new ProxyMessageDispatcher<InternalProxyMessage>("INTERNAL_MESSAGE_DISPATCHER",
- new InternalProxyMessageComparitor(),
- new IDispatchingStrategy<InternalProxyMessage>() {
-
- @Override
- public void dispatch(InternalProxyMessage message) {
- dispatchInternalMessage((InternalProxyMessage)message);
- }
-
- @Override
- public void handleDispatchingError(String info, Exception ex) {
- handleErrorsFromInternalMessageDispatcher(info, ex);
- }
-
- @Override
- public void handleQueueingError(String info, Exception ex) {
- handleErrorsFromInternalMessageDispatcher(info, ex);
- }
- });
- }
-
- // Setup Incoming ProxyMessage Dispatcher
- synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
- // Ensure incomingProxyMessageDispatcher is null
- if (_incomingProxyMessageDispatcher != null) {
- _incomingProxyMessageDispatcher.dispose();
- _incomingProxyMessageDispatcher = null;
- }
-
- _incomingProxyMessageDispatcher = new ProxyMessageDispatcher<ProtocolMessage>("INCOMING_MESSAGE_DISPATCHER",
- new IncomingProtocolMessageComparitor(),
- new IDispatchingStrategy<ProtocolMessage>() {
- @Override
- public void dispatch(ProtocolMessage message) {
- dispatchIncomingMessage((ProtocolMessage)message);
- }
-
- @Override
- public void handleDispatchingError(String info, Exception ex) {
- handleErrorsFromIncomingMessageDispatcher(info, ex);
- }
-
- @Override
- public void handleQueueingError(String info, Exception ex) {
- handleErrorsFromIncomingMessageDispatcher(info, ex);
- }
- });
- }
-
- // Setup Outgoing ProxyMessage Dispatcher
- synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
- // Ensure outgoingProxyMessageDispatcher is null
- if (_outgoingProxyMessageDispatcher != null) {
- _outgoingProxyMessageDispatcher.dispose();
- _outgoingProxyMessageDispatcher = null;
- }
-
- _outgoingProxyMessageDispatcher = new ProxyMessageDispatcher<ProtocolMessage>("OUTGOING_MESSAGE_DISPATCHER",
- new OutgoingProtocolMessageComparitor(),
- new IDispatchingStrategy<ProtocolMessage>() {
- @Override
- public void dispatch(ProtocolMessage message) {
- dispatchOutgoingMessage((ProtocolMessage)message);
- }
-
- @Override
- public void handleDispatchingError(String info, Exception ex) {
- handleErrorsFromOutgoingMessageDispatcher(info, ex);
- }
-
- @Override
- public void handleQueueingError(String info, Exception ex) {
- handleErrorsFromOutgoingMessageDispatcher(info, ex);
- }
- });
- }
-
- // Initialize the proxy
- try {
- initializeProxy();
- } catch (SmartDeviceLinkException e) {
- // Couldn't initialize the proxy
- // Dispose threads and then rethrow exception
-
- if (_internalProxyMessageDispatcher != null) {
- _internalProxyMessageDispatcher.dispose();
- _internalProxyMessageDispatcher = null;
- }
- if (_incomingProxyMessageDispatcher != null) {
- _incomingProxyMessageDispatcher.dispose();
- _incomingProxyMessageDispatcher = null;
- }
- if (_outgoingProxyMessageDispatcher != null) {
- _outgoingProxyMessageDispatcher.dispose();
- _outgoingProxyMessageDispatcher = null;
- }
- throw e;
- }
-
- // Trace that ctor has fired
- SmartDeviceLinkTrace.logProxyEvent("SmartDeviceLinkProxy Created, instanceID=" + this.toString(), SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Constructor.
- *
- * @param listener Type of listener for this proxy base.
- * @param smartDeviceLinkProxyConfigurationResources Configuration resources for this proxy.
- * @param enableAdvancedLifecycleManagement Flag that ALM should be enabled or not.
- * @param appName Client application name.
- * @param ttsName TTS name.
- * @param ngnMediaScreenAppName Media Screen Application name.
- * @param vrSynonyms List of synonyms.
- * @param isMediaApp Flag that indicates that client application if media application or not.
- * @param smartDeviceLinkMsgVersion Version of SmartDeviceLink Message.
- * @param languageDesired Desired language.
- * @param hmiDisplayLanguageDesired Desired language for HMI.
- * @param appType Type of application.
- * @param appID Application identifier.
- * @param autoActivateID Auto activation identifier.
- * @param callbackToUIThread Flag that indicates that this proxy should send callback to UI thread or not.
- * @param preRegister Flag that indicates that this proxy should be pre-registerd or not.
- * @param transportConfig Configuration of transport to be used by underlying connection.
- * @throws SmartDeviceLinkException
- */
- protected SmartDeviceLinkProxyBase(proxyListenerType listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources,
- boolean enableAdvancedLifecycleManagement, String appName, Vector<TTSChunk> ttsName,
- String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion,
- Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID,
- String autoActivateID, boolean callbackToUIThread, boolean preRegister,
- BaseTransportConfig transportConfig)
- throws SmartDeviceLinkException {
-
- setsdlproVersion((byte)PROX_PROT_VER_ONE);
-
- if (preRegister) _appInterfaceRegisterd = preRegister;
-
- _interfaceBroker = new SmartDeviceLinkInterfaceBroker();
-
- _callbackToUIThread = callbackToUIThread;
-
- if (_callbackToUIThread) {
- _mainUIHandler = new Handler(Looper.getMainLooper());
- }
-
- // Set variables for Advanced Lifecycle Management
- _advancedLifecycleManagementEnabled = enableAdvancedLifecycleManagement;
- _applicationName = appName;
- _ttsName = ttsName;
- _ngnMediaScreenAppName = ngnMediaScreenAppName;
- _isMediaApp = isMediaApp;
- _smartDeviceLinkMsgVersionRequest = smartDeviceLinkMsgVersion;
- _vrSynonyms = vrSynonyms;
- _smartDeviceLinkLanguageDesired = languageDesired;
- _hmiDisplayLanguageDesired = hmiDisplayLanguageDesired;
- _appType = appType;
- _appID = appID;
- _autoActivateIdDesired = autoActivateID;
- _transportConfig = transportConfig;
-
- // Test conditions to invalidate the proxy
- if (listener == null) {
- throw new IllegalArgumentException("IProxyListener listener must be provided to instantiate SmartDeviceLinkProxy object.");
- }
- if (_advancedLifecycleManagementEnabled) {
- if (_applicationName == null ) {
- throw new IllegalArgumentException("To use SmartDeviceLinkProxyALM, an application name, appName, must be provided");
- }
- if (_applicationName.length() < 1 || _applicationName.length() > 100) {
- throw new IllegalArgumentException("A provided application name, appName, must be between 1 and 100 characters in length.");
- }
- if (_isMediaApp == null) {
- throw new IllegalArgumentException("isMediaApp must not be null when using SmartDeviceLinkProxyALM.");
- }
- }
-
- _proxyListener = listener;
-
- // Get information from smartDeviceLinkProxyConfigurationResources
- TelephonyManager telephonyManager = null;
- if (smartDeviceLinkProxyConfigurationResources != null) {
- telephonyManager = smartDeviceLinkProxyConfigurationResources.getTelephonyManager();
- }
-
- // Use the telephonyManager to get and log phone info
- if (telephonyManager != null) {
- // Following is not quite thread-safe (because m_traceLogger could test null twice),
- // so we need to fix this, but vulnerability (i.e. two instances of listener) is
- // likely harmless.
- if (_traceDeviceInterrogator == null) {
- _traceDeviceInterrogator = new TraceDeviceInfo(smartDeviceLinkProxyConfigurationResources.getTelephonyManager());
- } // end-if
- } // end-if
-
- // Setup Internal ProxyMessage Dispatcher
- synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
- // Ensure internalProxyMessageDispatcher is null
- if (_internalProxyMessageDispatcher != null) {
- _internalProxyMessageDispatcher.dispose();
- _internalProxyMessageDispatcher = null;
- }
-
- _internalProxyMessageDispatcher = new ProxyMessageDispatcher<InternalProxyMessage>("INTERNAL_MESSAGE_DISPATCHER",
- new InternalProxyMessageComparitor(),
- new IDispatchingStrategy<InternalProxyMessage>() {
-
- @Override
- public void dispatch(InternalProxyMessage message) {
- dispatchInternalMessage((InternalProxyMessage)message);
- }
-
- @Override
- public void handleDispatchingError(String info, Exception ex) {
- handleErrorsFromInternalMessageDispatcher(info, ex);
- }
-
- @Override
- public void handleQueueingError(String info, Exception ex) {
- handleErrorsFromInternalMessageDispatcher(info, ex);
- }
- });
- }
-
- // Setup Incoming ProxyMessage Dispatcher
- synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
- // Ensure incomingProxyMessageDispatcher is null
- if (_incomingProxyMessageDispatcher != null) {
- _incomingProxyMessageDispatcher.dispose();
- _incomingProxyMessageDispatcher = null;
- }
-
- _incomingProxyMessageDispatcher = new ProxyMessageDispatcher<ProtocolMessage>("INCOMING_MESSAGE_DISPATCHER",
- new IncomingProtocolMessageComparitor(),
- new IDispatchingStrategy<ProtocolMessage>() {
- @Override
- public void dispatch(ProtocolMessage message) {
- dispatchIncomingMessage((ProtocolMessage)message);
- }
-
- @Override
- public void handleDispatchingError(String info, Exception ex) {
- handleErrorsFromIncomingMessageDispatcher(info, ex);
- }
-
- @Override
- public void handleQueueingError(String info, Exception ex) {
- handleErrorsFromIncomingMessageDispatcher(info, ex);
- }
- });
- }
-
- // Setup Outgoing ProxyMessage Dispatcher
- synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
- // Ensure outgoingProxyMessageDispatcher is null
- if (_outgoingProxyMessageDispatcher != null) {
- _outgoingProxyMessageDispatcher.dispose();
- _outgoingProxyMessageDispatcher = null;
- }
-
- _outgoingProxyMessageDispatcher = new ProxyMessageDispatcher<ProtocolMessage>("OUTGOING_MESSAGE_DISPATCHER",
- new OutgoingProtocolMessageComparitor(),
- new IDispatchingStrategy<ProtocolMessage>() {
- @Override
- public void dispatch(ProtocolMessage message) {
- dispatchOutgoingMessage((ProtocolMessage)message);
- }
-
- @Override
- public void handleDispatchingError(String info, Exception ex) {
- handleErrorsFromOutgoingMessageDispatcher(info, ex);
- }
-
- @Override
- public void handleQueueingError(String info, Exception ex) {
- handleErrorsFromOutgoingMessageDispatcher(info, ex);
- }
- });
- }
-
- // Initialize the proxy
- try {
- initializeProxy();
- } catch (SmartDeviceLinkException e) {
- // Couldn't initialize the proxy
- // Dispose threads and then rethrow exception
-
- if (_internalProxyMessageDispatcher != null) {
- _internalProxyMessageDispatcher.dispose();
- _internalProxyMessageDispatcher = null;
- }
- if (_incomingProxyMessageDispatcher != null) {
- _incomingProxyMessageDispatcher.dispose();
- _incomingProxyMessageDispatcher = null;
- }
- if (_outgoingProxyMessageDispatcher != null) {
- _outgoingProxyMessageDispatcher.dispose();
- _outgoingProxyMessageDispatcher = null;
- }
- throw e;
- }
-
- // Trace that ctor has fired
- SmartDeviceLinkTrace.logProxyEvent("SmartDeviceLinkProxy Created, instanceID=" + this.toString(), SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- private Intent createBroadcastIntent()
- {
- Intent sendIntent = new Intent();
- sendIntent.setAction("com.smartdevicelink.broadcast");
- sendIntent.putExtra("APP_NAME", this._applicationName);
- sendIntent.putExtra("APP_ID", this._appID);
- sendIntent.putExtra("RPC_NAME", "");
- sendIntent.putExtra("TYPE", "");
- sendIntent.putExtra("SUCCESS", true);
- sendIntent.putExtra("CORRID", 0);
- sendIntent.putExtra("FUNCTION_NAME", "");
- sendIntent.putExtra("COMMENT1", "");
- sendIntent.putExtra("COMMENT2", "");
- sendIntent.putExtra("COMMENT3", "");
- sendIntent.putExtra("COMMENT4", "");
- sendIntent.putExtra("COMMENT5", "");
- sendIntent.putExtra("COMMENT6", "");
- sendIntent.putExtra("COMMENT7", "");
- sendIntent.putExtra("COMMENT8", "");
- sendIntent.putExtra("COMMENT9", "");
- sendIntent.putExtra("COMMENT10", "");
- sendIntent.putExtra("DATA", "");
- sendIntent.putExtra("SHOW_ON_UI", true);
- return sendIntent;
- }
- private void updateBroadcastIntent(Intent sendIntent, String sKey, String sValue)
- {
- sendIntent.putExtra(sKey, sValue);
- }
- private void updateBroadcastIntent(Intent sendIntent, String sKey, boolean bValue)
- {
- sendIntent.putExtra(sKey, bValue);
- }
- private void updateBroadcastIntent(Intent sendIntent, String sKey, int iValue)
- {
- sendIntent.putExtra(sKey, iValue);
- }
-
- private void sendBroadcastIntent(Intent sendIntent)
- {
- Service myService = null;
- if (_proxyListener != null && _proxyListener instanceof Service)
- {
- myService = (Service) _proxyListener;
- }
- else if (_appService != null)
- {
- myService = _appService;
- }
- else
- {
- return;
- }
- Context myContext = myService.getApplicationContext();
- if (myContext != null) myContext.sendBroadcast(sendIntent);
- }
-
- /**
- * send encoded SmartDeviceLink data to Url
- * @param urlString
- * @param encodedSyncPData
- * @param timeout
- */
- private void sendEncodedSyncPDataToUrl(String urlString, Vector<String> encodedSyncPData, Integer timeout) {
-
- }
-
- /**
- * send encoded SmartDeviceLink data to Url
- * @param urlString
- * @param bs
- * @param timeout
- */
- private void sendSyncPDataToUrl(String urlString, byte[] bs, Integer timeout) {
-
- }
-
- // Test correlationID
- private boolean isCorrelationIDProtected(Integer correlationID) {
- if (correlationID != null &&
- (REGISTER_APP_INTERFACE_CORRELATION_ID == correlationID
- || UNREGISTER_APP_INTERFACE_CORRELATION_ID == correlationID
- || POLICIES_CORRELATION_ID == correlationID)) {
- return true;
- }
-
- return false;
- }
-
- // Protected isConnected method to allow legacy proxy to poll isConnected state
- public Boolean getIsConnected() {
- return _smartDeviceLinkConnection.getIsConnected();
- }
-
- /**
- * Returns whether the application is registered in SMARTDEVICELINK. Note: for testing
- * purposes, it's possible that the connection is established, but the
- * application is not registered.
- *
- * @return true if the application is registered in SMARTDEVICELINK
- */
- public Boolean getAppInterfaceRegistered() {
- return _appInterfaceRegisterd;
- }
-
- // Function to initialize new proxy connection
- private void initializeProxy() throws SmartDeviceLinkException {
- // Reset all of the flags and state variables
- _haveReceivedFirstNonNoneHMILevel = false;
- _haveReceivedFirstFocusLevel = false;
- _haveReceivedFirstFocusLevelFull = false;
- _smartDeviceLinkIntefaceAvailablity = SmartDeviceLinkInterfaceAvailability.SMARTDEVICELINK_INTERFACE_UNAVAILABLE;
-
- // Setup smartDeviceLinkConnection
- synchronized(CONNECTION_REFERENCE_LOCK) {
- if (_smartDeviceLinkConnection != null) {
- _smartDeviceLinkConnection.closeConnection(_rpcSessionID);
- _smartDeviceLinkConnection = null;
- }
- _smartDeviceLinkConnection = new smartDeviceLinkConnection(_interfaceBroker, _transportConfig);
- SmartDeviceLinkProtocol protocol = (SmartDeviceLinkProtocol)_smartDeviceLinkConnection.getSmartDeviceLinkProtocolProtocol();
- protocol.setVersion(_sdlproVersion);
- }
-
- synchronized(CONNECTION_REFERENCE_LOCK) {
- if (_smartDeviceLinkConnection != null) {
- _smartDeviceLinkConnection.startTransport();
- }
- }
- }
-
- /**
- * Public method to enable the siphon transport
- */
- public static void enableSiphonDebug() {
- SiphonServer.enableSiphonServer();
- }
-
- /**
- * Public method to disable the Siphon Trace Server
- */
- public static void disableSiphonDebug() {
- SiphonServer.disableSiphonServer();
- }
-
- /**
- * Public method to enable the Debug Tool
- */
- public static void enableDebugTool() {
- DebugTool.enableDebugTool();
- }
-
- /**
- * Public method to disable the Debug Tool
- */
- public static void disableDebugTool() {
- DebugTool.disableDebugTool();
- }
-
- /**
- * Public method to determine Debug Tool enabled
- */
- public static boolean isDebugEnabled() {
- return DebugTool.isDebugEnabled();
- }
-
-
- @Deprecated
- public void close() throws SmartDeviceLinkException {
- dispose();
- }
-
- private void cleanProxy(SmartDeviceLinkDisconnectedReason disconnectedReason) throws SmartDeviceLinkException {
- try {
-
- // ALM Specific Cleanup
- if (_advancedLifecycleManagementEnabled) {
- _smartDeviceLinkConnectionState = SmartDeviceLinkConnectionState.SMARTDEVICELINK_DISCONNECTED;
-
- firstTimeFull = true;
-
- // Should we wait for the interface to be unregistered?
- Boolean waitForInterfaceUnregistered = false;
- // Unregister app interface
- synchronized(CONNECTION_REFERENCE_LOCK) {
- if (_appInterfaceRegisterd == true && _smartDeviceLinkConnection != null && _smartDeviceLinkConnection.getIsConnected()) {
- waitForInterfaceUnregistered = true;
- unregisterAppInterfacePrivate(UNREGISTER_APP_INTERFACE_CORRELATION_ID);
- }
- }
-
- // Wait for the app interface to be unregistered
- if (waitForInterfaceUnregistered) {
- synchronized(APP_INTERFACE_REGISTERED_LOCK) {
- try {
- APP_INTERFACE_REGISTERED_LOCK.wait(1000);
- } catch (InterruptedException e) {
- // Do nothing
- }
- }
- }
- }
-
- // Clean up SMARTDEVICELINK Connection
- synchronized(CONNECTION_REFERENCE_LOCK) {
- if (_smartDeviceLinkConnection != null) {
- _smartDeviceLinkConnection.closeConnection(_rpcSessionID);
- _smartDeviceLinkConnection = null;
- }
- }
- } catch (SmartDeviceLinkException e) {
- throw e;
- } finally {
- SmartDeviceLinkTrace.logProxyEvent("SmartDeviceLinkProxy cleaned.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
- }
-
- /**
- * Terminates the App's Interface Registration, closes the transport connection, ends the protocol session, and frees any resources used by the proxy.
- */
- public void dispose() throws SmartDeviceLinkException
- {
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- _proxyDisposed = true;
-
- SmartDeviceLinkTrace.logProxyEvent("Application called dispose() method.", SMARTDEVICELINK_LIB_TRACE_KEY);
-
- try{
- // Clean the proxy
- cleanProxy(SmartDeviceLinkDisconnectedReason.APPLICATION_REQUESTED_DISCONNECT);
-
- // Close IncomingProxyMessageDispatcher thread
- synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
- if (_incomingProxyMessageDispatcher != null) {
- _incomingProxyMessageDispatcher.dispose();
- _incomingProxyMessageDispatcher = null;
- }
- }
-
- // Close OutgoingProxyMessageDispatcher thread
- synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
- if (_outgoingProxyMessageDispatcher != null) {
- _outgoingProxyMessageDispatcher.dispose();
- _outgoingProxyMessageDispatcher = null;
- }
- }
-
- // Close InternalProxyMessageDispatcher thread
- synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
- if (_internalProxyMessageDispatcher != null) {
- _internalProxyMessageDispatcher.dispose();
- _internalProxyMessageDispatcher = null;
- }
- }
-
- _traceDeviceInterrogator = null;
- } catch (SmartDeviceLinkException e) {
- throw e;
- } finally {
- SmartDeviceLinkTrace.logProxyEvent("SmartDeviceLinkProxy disposed.", SMARTDEVICELINK_LIB_TRACE_KEY);
- }
- } // end-method
-
- // Method to cycle the proxy, only called in ALM
- protected void cycleProxy(SmartDeviceLinkDisconnectedReason disconnectedReason) {
- try{
- cleanProxy(disconnectedReason);
- initializeProxy();
- notifyProxyClosed("SMARTDEVICELINK Proxy Cycled", new SmartDeviceLinkException("SMARTDEVICELINK Proxy Cycled", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_CYCLED));
- } catch (SmartDeviceLinkException e) {
- switch(e.getSmartDeviceLinkExceptionCause()) {
- case BLUETOOTH_DISABLED:
- notifyProxyClosed("Bluetooth is disabled. Bluetooth must be enabled to connect to SMARTDEVICELINK. Reattempt a connection once Bluetooth is enabled.",
- new SmartDeviceLinkException("Bluetooth is disabled. Bluetooth must be enabled to connect to SMARTDEVICELINK. Reattempt a connection once Bluetooth is enabled.", SmartDeviceLinkExceptionCause.BLUETOOTH_DISABLED));
- break;
- case BLUETOOTH_ADAPTER_NULL:
- notifyProxyClosed("Cannot locate a Bluetooth adapater. A SMARTDEVICELINK connection is impossible on this device until a Bluetooth adapter is added.",
- new SmartDeviceLinkException("Cannot locate a Bluetooth adapater. A SMARTDEVICELINK connection is impossible on this device until a Bluetooth adapter is added.", SmartDeviceLinkExceptionCause.BLUETOOTH_ADAPTER_NULL));
- break;
- default :
- notifyProxyClosed("Cycling the proxy failed.", e);
- break;
- }
- } catch (Exception e) {
- notifyProxyClosed("Cycling the proxy failed.", e);
- }
- }
-
-
-
- /************* Functions used by the Message Dispatching Queues ****************/
- private void dispatchIncomingMessage(ProtocolMessage message) {
- try{
- // Dispatching logic
- if (message.getSessionType().equals(SessionType.RPC)) {
- try {
- if (_sdlproVersion == 1) {
- if (message.getVersion() == 2) setsdlproVersion(message.getVersion());
- }
-
- Hashtable hash = new Hashtable();
- if (_sdlproVersion == 2) {
- Hashtable hashTemp = new Hashtable();
- hashTemp.put(Names.correlationID, message.getCorrID());
- if (message.getJsonSize() > 0) {
- final Hashtable<String, Object> mhash = JsonRPCMarshaller.unmarshall(message.getData());
- //hashTemp.put(Names.parameters, mhash.get(Names.parameters));
- hashTemp.put(Names.parameters, mhash);
- }
- FunctionID functionID = new FunctionID();
- hashTemp.put(Names.function_name, functionID.getFunctionName(message.getFunctionID()));
- if (message.getRPCType() == 0x00) {
- hash.put(Names.request, hashTemp);
- } else if (message.getRPCType() == 0x01) {
- hash.put(Names.response, hashTemp);
- } else if (message.getRPCType() == 0x02) {
- hash.put(Names.notification, hashTemp);
- }
- if (message.getBulkData() != null) hash.put(Names.bulkData, message.getBulkData());
- } else {
- final Hashtable<String, Object> mhash = JsonRPCMarshaller.unmarshall(message.getData());
- hash = mhash;
- }
- handleRPCMessage(hash);
- } catch (final Exception excp) {
- DebugTool.logError("Failure handling protocol message: " + excp.toString(), excp);
- passErrorToProxyListener("Error handing incoming protocol message.", excp);
- } // end-catch
- } else {
- // Handle other protocol message types here
- }
- } catch (final Exception e) {
- // Pass error to application through listener
- DebugTool.logError("Error handing proxy event.", e);
- passErrorToProxyListener("Error handing incoming protocol message.", e);
- }
- }
-
- private byte getsdlproVersion() {
- return this._sdlproVersion;
- }
-
- private void setsdlproVersion(byte version) {
- this._sdlproVersion = version;
- }
-
- public String serializeJSON(RPCMessage msg)
- {
- String sReturn = null;
- try
- {
- sReturn = msg.serializeJSON(getsdlproVersion()).toString(2);
- }
- catch (final Exception e)
- {
- DebugTool.logError("Error handing proxy event.", e);
- passErrorToProxyListener("Error serializing message.", e);
- return null;
- }
- return sReturn;
- }
-
- private void handleErrorsFromIncomingMessageDispatcher(String info, Exception e) {
- passErrorToProxyListener(info, e);
- }
-
- private void dispatchOutgoingMessage(ProtocolMessage message) {
- synchronized(CONNECTION_REFERENCE_LOCK) {
- if (_smartDeviceLinkConnection != null) {
- _smartDeviceLinkConnection.sendMessage(message);
- }
- }
- SmartDeviceLinkTrace.logProxyEvent("SmartDeviceLinkProxy sending Protocol Message: " + message.toString(), SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- private void handleErrorsFromOutgoingMessageDispatcher(String info, Exception e) {
- passErrorToProxyListener(info, e);
- }
-
- void dispatchInternalMessage(final InternalProxyMessage message) {
- try{
- if (message.getFunctionName().equals(Names.OnProxyError)) {
- final OnError msg = (OnError)message;
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onError(msg.getInfo(), msg.getException());
- }
- });
- } else {
- _proxyListener.onError(msg.getInfo(), msg.getException());
- }
- /**************Start Legacy Specific Call-backs************/
- } else if (message.getFunctionName().equals(Names.OnProxyOpened)) {
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- ((IProxyListener)_proxyListener).onProxyOpened();
- }
- });
- } else {
- ((IProxyListener)_proxyListener).onProxyOpened();
- }
- } else if (message.getFunctionName().equals(Names.OnProxyClosed)) {
- final OnProxyClosed msg = (OnProxyClosed)message;
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onProxyClosed(msg.getInfo(), msg.getException());
- }
- });
- } else {
- _proxyListener.onProxyClosed(msg.getInfo(), msg.getException());
- }
- /****************End Legacy Specific Call-backs************/
- } else {
- // Diagnostics
- SmartDeviceLinkTrace.logProxyEvent("Unknown RPC Message encountered. Check for an updated version of the SMARTDEVICELINK Proxy.", SMARTDEVICELINK_LIB_TRACE_KEY);
- DebugTool.logError("Unknown RPC Message encountered. Check for an updated version of the SMARTDEVICELINK Proxy.");
- }
-
- SmartDeviceLinkTrace.logProxyEvent("Proxy fired callback: " + message.getFunctionName(), SMARTDEVICELINK_LIB_TRACE_KEY);
- } catch(final Exception e) {
- // Pass error to application through listener
- DebugTool.logError("Error handing proxy event.", e);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onError("Error handing proxy event.", e);
- }
- });
- } else {
- _proxyListener.onError("Error handing proxy event.", e);
- }
- }
- }
-
- private void handleErrorsFromInternalMessageDispatcher(String info, Exception e) {
- DebugTool.logError(info, e);
- // This error cannot be passed to the user, as it indicates an error
- // in the communication between the proxy and the application.
-
- DebugTool.logError("InternalMessageDispatcher failed.", e);
-
- // Note, this is the only place where the _proxyListener should be referenced asmartDeviceLinkhronously,
- // with an error on the internalMessageDispatcher, we have no other reliable way of
- // communicating with the application.
- notifyProxyClosed("Proxy callback dispatcher is down. Proxy instance is invalid.", e);
- _proxyListener.onError("Proxy callback dispatcher is down. Proxy instance is invalid.", e);
- }
- /************* END Functions used by the Message Dispatching Queues ****************/
-
- // Private sendPRCRequest method. All RPCRequests are funneled through this method after
- // error checking.
- private void sendRPCRequestPrivate(RPCRequest request) throws SmartDeviceLinkException {
- try {
- SmartDeviceLinkTrace.logRPCEvent(InterfaceActivityDirection.Transmit, request, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- byte[] msgBytes = JsonRPCMarshaller.marshall(request, _sdlproVersion);
-
- ProtocolMessage pm = new ProtocolMessage();
- pm.setData(msgBytes);
- pm.setSessionID(_rpcSessionID);
- pm.setMessageType(MessageType.RPC);
- pm.setSessionType(SessionType.RPC);
- pm.setFunctionID(FunctionID.getFunctionID(request.getFunctionName()));
- pm.setCorrID(request.getCorrelationID());
- if (request.getBulkData() != null)
- pm.setBulkData(request.getBulkData());
-
- // Queue this outgoing message
- synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
- if (_outgoingProxyMessageDispatcher != null) {
- _outgoingProxyMessageDispatcher.queueMessage(pm);
- }
- }
- } catch (OutOfMemoryError e) {
- SmartDeviceLinkTrace.logProxyEvent("OutOfMemory exception while sending request " + request.getFunctionName(), SMARTDEVICELINK_LIB_TRACE_KEY);
- throw new SmartDeviceLinkException("OutOfMemory exception while sending request " + request.getFunctionName(), e, SmartDeviceLinkExceptionCause.INVALID_ARGUMENT);
- }
- }
-
- private void handleRPCMessage(Hashtable hash) {
- RPCMessage rpcMsg = new RPCMessage(hash);
- String functionName = rpcMsg.getFunctionName();
- String messageType = rpcMsg.getMessageType();
-
- if (messageType.equals(Names.response)) {
- SmartDeviceLinkTrace.logRPCEvent(InterfaceActivityDirection.Receive, new RPCResponse(rpcMsg), SMARTDEVICELINK_LIB_TRACE_KEY);
-
- // Check to ensure response is not from an internal message (reserved correlation ID)
- if (isCorrelationIDProtected((new RPCResponse(hash)).getCorrelationID())) {
- // This is a response generated from an internal message, it can be trapped here
- // The app should not receive a response for a request it did not send
- if ((new RPCResponse(hash)).getCorrelationID() == REGISTER_APP_INTERFACE_CORRELATION_ID
- && _advancedLifecycleManagementEnabled
- && functionName.equals(Names.RegisterAppInterface)) {
- final RegisterAppInterfaceResponse msg = new RegisterAppInterfaceResponse(hash);
- if (msg.getSuccess()) {
- _appInterfaceRegisterd = true;
- }
-
- //_autoActivateIdReturned = msg.getAutoActivateID();
- /*Place holder for legacy support*/ _autoActivateIdReturned = "8675309";
- _buttonCapabilities = msg.getButtonCapabilities();
- _displayCapabilities = msg.getDisplayCapabilities();
- _softButtonCapabilities = msg.getSoftButtonCapabilities();
- _presetBankCapabilities = msg.getPresetBankCapabilities();
- _hmiZoneCapabilities = msg.getHmiZoneCapabilities();
- _speechCapabilities = msg.getSpeechCapabilities();
- _smartDeviceLinkLanguage = msg.getLanguage();
- _hmiDisplayLanguage = msg.getHmiDisplayLanguage();
- _smartDeviceLinkMsgVersion = msg.getsmartdevicelinkMsgVersion();
- _vrCapabilities = msg.getVrCapabilities();
- _vehicleType = msg.getVehicleType();
- _proxyVersionInfo = msg.getProxyVersionInfo();
-
- String sVersionInfo = "SMARTDEVICELINK Proxy Version: " + _proxyVersionInfo;
-
- Class<?> cls = null;
- try
- {
- cls = Class.forName(Names.VersionExtend);
- Object t = cls.newInstance();
- Method meth = cls.getDeclaredMethod("getVersionInfo", null);
- final Object ver = meth.invoke(t, null);
- String sValue = ver.toString();
- sVersionInfo += "\r\n" + "ExtendedLib Version: " + sValue;
- }
- catch (Exception e)
- {
- //Extended info does not exist
- }
-
- if (!isDebugEnabled())
- {
- enableDebugTool();
- DebugTool.logInfo(sVersionInfo, false);
- disableDebugTool();
- }
- else
- DebugTool.logInfo(sVersionInfo, false);
-
- // Send onSmartDeviceLinkConnected message in ALM
- _smartDeviceLinkConnectionState = SmartDeviceLinkConnectionState.SMARTDEVICELINK_CONNECTED;
-
- // If registerAppInterface failed, exit with OnProxyUnusable
- if (!msg.getSuccess()) {
- notifyProxyClosed("Unable to register app interface. Review values passed to the SMARTDEVICELINK Proxy constructor. RegisterAppInterface result code: ",
- new SmartDeviceLinkException("Unable to register app interface. Review values passed to the SmartDeviceLinkProxy constructor. RegisterAppInterface result code: " + msg.getResultCode(), SmartDeviceLinkExceptionCause.SMARTDEVICELINK_REGISTRATION_ERROR));
- }
-
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- if (_proxyListener instanceof IProxyListener) {
- ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
- } else if (_proxyListener instanceof IProxyListenerALM) {
- //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
- }
- }
- });
- } else {
- if (_proxyListener instanceof IProxyListener) {
- ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
- } else if (_proxyListener instanceof IProxyListenerALM) {
- //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
- }
- }
- } else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
- && functionName.equals(Names.OnEncodedSyncPData)) {
- // OnEncodedSyncPData
- final OnEncodedSyncPData msg = new OnEncodedSyncPData(hash);
-
- // If url is not null, then send to URL
- if (msg.getUrl() != null) {
- // URL has data, attempt to post request to external server
- Thread handleOffboardSmartDeviceLinkTransmissionTread = new Thread() {
- @Override
- public void run() {
- sendEncodedSyncPDataToUrl(msg.getUrl(), msg.getData(), msg.getTimeout());
- }
- };
-
- handleOffboardSmartDeviceLinkTransmissionTread.start();
- }
-
- } else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
- && functionName.equals(Names.OnSyncPData)) {
- // OnSyncPData
- final OnSyncPData msg = new OnSyncPData(hash);
-
- // If url is not null, then send to URL
- if (msg.getUrl() != null) {
- // URL has data, attempt to post request to external server
- Thread handleOffboardSmartDeviceLinkTransmissionTread = new Thread() {
- @Override
- public void run() {
- sendSyncPDataToUrl(msg.getUrl(), msg.getSyncPData(), msg.getTimeout());
- }
- };
-
- handleOffboardSmartDeviceLinkTransmissionTread.start();
- }
- }
- else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
- && functionName.equals(Names.EncodedSyncPData)) {
- // EncodedSyncPData
- final EncodedSyncPDataResponse msg = new EncodedSyncPDataResponse(hash);
-
- Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", Names.EncodedSyncPData);
- updateBroadcastIntent(sendIntent, "TYPE", Names.response);
- updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
- updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
- updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
- updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
- sendBroadcastIntent(sendIntent);
- }
- return;
- }
-
- if (functionName.equals(Names.RegisterAppInterface)) {
- final RegisterAppInterfaceResponse msg = new RegisterAppInterfaceResponse(hash);
- if (msg.getSuccess()) {
- _appInterfaceRegisterd = true;
- }
-
- //_autoActivateIdReturned = msg.getAutoActivateID();
- /*Place holder for legacy support*/ _autoActivateIdReturned = "8675309";
- _buttonCapabilities = msg.getButtonCapabilities();
- _displayCapabilities = msg.getDisplayCapabilities();
- _softButtonCapabilities = msg.getSoftButtonCapabilities();
- _presetBankCapabilities = msg.getPresetBankCapabilities();
- _hmiZoneCapabilities = msg.getHmiZoneCapabilities();
- _speechCapabilities = msg.getSpeechCapabilities();
- _smartDeviceLinkLanguage = msg.getLanguage();
- _hmiDisplayLanguage = msg.getHmiDisplayLanguage();
- _smartDeviceLinkMsgVersion = msg.getsmartdevicelinkMsgVersion();
- _vrCapabilities = msg.getVrCapabilities();
- _vehicleType = msg.getVehicleType();
- _proxyVersionInfo = msg.getProxyVersionInfo();
-
- if (!isDebugEnabled())
- {
- enableDebugTool();
- DebugTool.logInfo("SMARTDEVICELINK Proxy Version: " + _proxyVersionInfo);
- disableDebugTool();
- }
- else
- DebugTool.logInfo("SMARTDEVICELINK Proxy Version: " + _proxyVersionInfo);
-
- // RegisterAppInterface
- if (_advancedLifecycleManagementEnabled) {
-
- // Send onSmartDeviceLinkConnected message in ALM
- _smartDeviceLinkConnectionState = SmartDeviceLinkConnectionState.SMARTDEVICELINK_CONNECTED;
-
- // If registerAppInterface failed, exit with OnProxyUnusable
- if (!msg.getSuccess()) {
- notifyProxyClosed("Unable to register app interface. Review values passed to the SmartDeviceLinkProxy constructor. RegisterAppInterface result code: ",
- new SmartDeviceLinkException("Unable to register app interface. Review values passed to the SmartDeviceLinkProxy constructor. RegisterAppInterface result code: " + msg.getResultCode(), SmartDeviceLinkExceptionCause.SMARTDEVICELINK_REGISTRATION_ERROR));
- }
- } else {
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- if (_proxyListener instanceof IProxyListener) {
- ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
- } else if (_proxyListener instanceof IProxyListenerALM) {
- //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
- }
- }
- });
- } else {
- if (_proxyListener instanceof IProxyListener) {
- ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
- } else if (_proxyListener instanceof IProxyListenerALM) {
- //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
- }
- }
- }
- } else if (functionName.equals(Names.Speak)) {
- // SpeakResponse
-
- final SpeakResponse msg = new SpeakResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSpeakResponse(msg);
- }
- });
- } else {
- _proxyListener.onSpeakResponse(msg);
- }
- } else if (functionName.equals(Names.Alert)) {
- // AlertResponse
-
- final AlertResponse msg = new AlertResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onAlertResponse(msg);
- }
- });
- } else {
- _proxyListener.onAlertResponse(msg);
- }
- } else if (functionName.equals(Names.Show)) {
- // ShowResponse
-
- final ShowResponse msg = new ShowResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onShowResponse((ShowResponse)msg);
- }
- });
- } else {
- _proxyListener.onShowResponse((ShowResponse)msg);
- }
- } else if (functionName.equals(Names.AddCommand)) {
- // AddCommand
-
- final AddCommandResponse msg = new AddCommandResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onAddCommandResponse((AddCommandResponse)msg);
- }
- });
- } else {
- _proxyListener.onAddCommandResponse((AddCommandResponse)msg);
- }
- } else if (functionName.equals(Names.DeleteCommand)) {
- // DeleteCommandResponse
-
- final DeleteCommandResponse msg = new DeleteCommandResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onDeleteCommandResponse((DeleteCommandResponse)msg);
- }
- });
- } else {
- _proxyListener.onDeleteCommandResponse((DeleteCommandResponse)msg);
- }
- } else if (functionName.equals(Names.AddSubMenu)) {
- // AddSubMenu
-
- final AddSubMenuResponse msg = new AddSubMenuResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onAddSubMenuResponse((AddSubMenuResponse)msg);
- }
- });
- } else {
- _proxyListener.onAddSubMenuResponse((AddSubMenuResponse)msg);
- }
- } else if (functionName.equals(Names.DeleteSubMenu)) {
- // DeleteSubMenu
-
- final DeleteSubMenuResponse msg = new DeleteSubMenuResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onDeleteSubMenuResponse((DeleteSubMenuResponse)msg);
- }
- });
- } else {
- _proxyListener.onDeleteSubMenuResponse((DeleteSubMenuResponse)msg);
- }
- } else if (functionName.equals(Names.SubscribeButton)) {
- // SubscribeButton
-
- final SubscribeButtonResponse msg = new SubscribeButtonResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSubscribeButtonResponse((SubscribeButtonResponse)msg);
- }
- });
- } else {
- _proxyListener.onSubscribeButtonResponse((SubscribeButtonResponse)msg);
- }
- } else if (functionName.equals(Names.UnsubscribeButton)) {
- // UnsubscribeButton
-
- final UnsubscribeButtonResponse msg = new UnsubscribeButtonResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onUnsubscribeButtonResponse((UnsubscribeButtonResponse)msg);
- }
- });
- } else {
- _proxyListener.onUnsubscribeButtonResponse((UnsubscribeButtonResponse)msg);
- }
- } else if (functionName.equals(Names.SetMediaClockTimer)) {
- // SetMediaClockTimer
-
- final SetMediaClockTimerResponse msg = new SetMediaClockTimerResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSetMediaClockTimerResponse((SetMediaClockTimerResponse)msg);
- }
- });
- } else {
- _proxyListener.onSetMediaClockTimerResponse((SetMediaClockTimerResponse)msg);
- }
- } else if (functionName.equals(Names.EncodedSyncPData)) {
- // EncodedSyncPData
-
- final EncodedSyncPDataResponse msg = new EncodedSyncPDataResponse(hash);
-
- Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", Names.EncodedSyncPData);
- updateBroadcastIntent(sendIntent, "TYPE", Names.response);
- updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
- updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
- updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
- updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
- sendBroadcastIntent(sendIntent);
-
- try
- {
- Class<?> cls = Class.forName(Names.ListenerExtend);
- if (cls.isInstance(_proxyListener))
- {
- final Object t = cls.cast(_proxyListener);
- final Method meth = cls.getDeclaredMethod(Names.onEncodedSyncPDataResponse, new Class[]{EncodedSyncPDataResponse.class});
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- try {
- meth.invoke(t, msg);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- } else {
- meth.invoke(t, msg);
- }
- }
- }
- catch (Exception e)
- {
- //private lib not present
- }
- } else if (functionName.equals(Names.SyncPData)) {
- // SyncPData
-
- final SyncPDataResponse msg = new SyncPDataResponse(hash);
-
- Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", Names.SyncPData);
- updateBroadcastIntent(sendIntent, "TYPE", Names.response);
- updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
- updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
- updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
- updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
- sendBroadcastIntent(sendIntent);
- try
- {
- Class<?> cls = Class.forName(Names.ListenerExtend);
- if (cls.isInstance(_proxyListener))
- {
- final Object t = cls.cast(_proxyListener);
- final Method meth = cls.getDeclaredMethod(Names.onSyncPDataResponse, new Class[]{SyncPDataResponse.class});
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- try {
- meth.invoke(t, msg);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- } else {
- meth.invoke(t, msg);
- }
- }
- }
- catch (Exception e)
- {
- //private lib not present
- }
- } else if (functionName.equals(Names.CreateInteractionChoiceSet)) {
- // CreateInteractionChoiceSet
-
- final CreateInteractionChoiceSetResponse msg = new CreateInteractionChoiceSetResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onCreateInteractionChoiceSetResponse((CreateInteractionChoiceSetResponse)msg);
- }
- });
- } else {
- _proxyListener.onCreateInteractionChoiceSetResponse((CreateInteractionChoiceSetResponse)msg);
- }
- } else if (functionName.equals(Names.DeleteInteractionChoiceSet)) {
- // DeleteInteractionChoiceSet
-
- final DeleteInteractionChoiceSetResponse msg = new DeleteInteractionChoiceSetResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onDeleteInteractionChoiceSetResponse((DeleteInteractionChoiceSetResponse)msg);
- }
- });
- } else {
- _proxyListener.onDeleteInteractionChoiceSetResponse((DeleteInteractionChoiceSetResponse)msg);
- }
- } else if (functionName.equals(Names.PerformInteraction)) {
- // PerformInteraction
-
- final PerformInteractionResponse msg = new PerformInteractionResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onPerformInteractionResponse((PerformInteractionResponse)msg);
- }
- });
- } else {
- _proxyListener.onPerformInteractionResponse((PerformInteractionResponse)msg);
- }
- } else if (functionName.equals(Names.SetGlobalProperties)) {
- // SetGlobalPropertiesResponse
-
- final SetGlobalPropertiesResponse msg = new SetGlobalPropertiesResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSetGlobalPropertiesResponse((SetGlobalPropertiesResponse)msg);
- }
- });
- } else {
- _proxyListener.onSetGlobalPropertiesResponse((SetGlobalPropertiesResponse)msg);
- }
- } else if (functionName.equals(Names.ResetGlobalProperties)) {
- // ResetGlobalProperties
-
- final ResetGlobalPropertiesResponse msg = new ResetGlobalPropertiesResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onResetGlobalPropertiesResponse((ResetGlobalPropertiesResponse)msg);
- }
- });
- } else {
- _proxyListener.onResetGlobalPropertiesResponse((ResetGlobalPropertiesResponse)msg);
- }
- } else if (functionName.equals(Names.UnregisterAppInterface)) {
- // UnregisterAppInterface
-
- _appInterfaceRegisterd = false;
- synchronized(APP_INTERFACE_REGISTERED_LOCK) {
- APP_INTERFACE_REGISTERED_LOCK.notify();
- }
-
- final UnregisterAppInterfaceResponse msg = new UnregisterAppInterfaceResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- if (_proxyListener instanceof IProxyListener) {
- ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
- } else if (_proxyListener instanceof IProxyListenerALM) {
- //((IProxyListenerALM)_proxyListener).onUnregisterAppInterfaceResponse(msg);
- }
- }
- });
- } else {
- if (_proxyListener instanceof IProxyListener) {
- ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
- } else if (_proxyListener instanceof IProxyListenerALM) {
- //((IProxyListenerALM)_proxyListener).onUnregisterAppInterfaceResponse(msg);
- }
- }
-
- notifyProxyClosed("UnregisterAppInterfaceResponse", null);
- } else if (functionName.equals(Names.GenericResponse)) {
- // GenericResponse (Usually and error)
- final GenericResponse msg = new GenericResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onGenericResponse((GenericResponse)msg);
- }
- });
- } else {
- _proxyListener.onGenericResponse((GenericResponse)msg);
- }
- } else if (functionName.equals(Names.Slider)) {
- // Slider
- final SliderResponse msg = new SliderResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSliderResponse((SliderResponse)msg);
- }
- });
- } else {
- _proxyListener.onSliderResponse((SliderResponse)msg);
- }
- } else if (functionName.equals(Names.PutFile)) {
- // PutFile
- final PutFileResponse msg = new PutFileResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onPutFileResponse((PutFileResponse)msg);
- }
- });
- } else {
- _proxyListener.onPutFileResponse((PutFileResponse)msg);
- }
- } else if (functionName.equals(Names.DeleteFile)) {
- // DeleteFile
- final DeleteFileResponse msg = new DeleteFileResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onDeleteFileResponse((DeleteFileResponse)msg);
- }
- });
- } else {
- _proxyListener.onDeleteFileResponse((DeleteFileResponse)msg);
- }
- } else if (functionName.equals(Names.ListFiles)) {
- // ListFiles
- final ListFilesResponse msg = new ListFilesResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onListFilesResponse((ListFilesResponse)msg);
- }
- });
- } else {
- _proxyListener.onListFilesResponse((ListFilesResponse)msg);
- }
- } else if (functionName.equals(Names.SetAppIcon)) {
- // SetAppIcon
- final SetAppIconResponse msg = new SetAppIconResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSetAppIconResponse((SetAppIconResponse)msg);
- }
- });
- } else {
- _proxyListener.onSetAppIconResponse((SetAppIconResponse)msg);
- }
- } else if (functionName.equals(Names.ScrollableMessage)) {
- // ScrollableMessage
- final ScrollableMessageResponse msg = new ScrollableMessageResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onScrollableMessageResponse((ScrollableMessageResponse)msg);
- }
- });
- } else {
- _proxyListener.onScrollableMessageResponse((ScrollableMessageResponse)msg);
- }
- } else if (functionName.equals(Names.ChangeRegistration)) {
- // ChangeLanguageRegistration
- final ChangeRegistrationResponse msg = new ChangeRegistrationResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onChangeRegistrationResponse((ChangeRegistrationResponse)msg);
- }
- });
- } else {
- _proxyListener.onChangeRegistrationResponse((ChangeRegistrationResponse)msg);
- }
- } else if (functionName.equals(Names.SetDisplayLayout)) {
- // SetDisplayLayout
- final SetDisplayLayoutResponse msg = new SetDisplayLayoutResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSetDisplayLayoutResponse((SetDisplayLayoutResponse)msg);
- }
- });
- } else {
- _proxyListener.onSetDisplayLayoutResponse((SetDisplayLayoutResponse)msg);
- }
- } else if (functionName.equals(Names.PerformAudioPassThru)) {
- // PerformAudioPassThru
- final PerformAudioPassThruResponse msg = new PerformAudioPassThruResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onPerformAudioPassThruResponse((PerformAudioPassThruResponse)msg);
- }
- });
- } else {
- _proxyListener.onPerformAudioPassThruResponse((PerformAudioPassThruResponse)msg);
- }
- } else if (functionName.equals(Names.EndAudioPassThru)) {
- // EndAudioPassThru
- final EndAudioPassThruResponse msg = new EndAudioPassThruResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onEndAudioPassThruResponse((EndAudioPassThruResponse)msg);
- }
- });
- } else {
- _proxyListener.onEndAudioPassThruResponse((EndAudioPassThruResponse)msg);
- }
- } else if (functionName.equals(Names.SubscribeVehicleData)) {
- try {
- Class<?> cls = Class.forName(Names.SubscribeVehicleDataExtend);
- Constructor con = cls.getConstructor(new Class[]{Hashtable.class});
- final Object msg = con.newInstance(hash);
- // SubscribeVehicleDataExtend
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
- }
- });
- } else {
- _proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
- }
- }
- catch(Exception e) {
- // SubscribeVehicleData
- final SubscribeVehicleDataResponse msg = new SubscribeVehicleDataResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
- }
- });
- } else {
- _proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
- }
- }
- } else if (functionName.equals(Names.UnsubscribeVehicleData)) {
- try {
- Class<?> cls = Class.forName(Names.UnsubscribeVehicleDataExtend);
- Constructor con = cls.getConstructor(new Class[]{Hashtable.class});
- final Object msg = con.newInstance(hash);
- // UnsubscribeVehicleDataExtend
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
- }
- });
- } else {
- _proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
- }
- }
- catch(Exception e) {
- // UnsubscribeVehicleData
- final UnsubscribeVehicleDataResponse msg = new UnsubscribeVehicleDataResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
- }
- });
- } else {
- _proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
- }
- }
- } else if (functionName.equals(Names.GetVehicleData)) {
- try {
- Class<?> cls = Class.forName(Names.GetVehicleDataExtend);
- Constructor con = cls.getConstructor(new Class[]{Hashtable.class});
- final Object msg = con.newInstance(hash);
- // GetVehicleDataExtend
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
- }
- });
- } else {
- _proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
- }
- }
- catch(Exception e) {
- // GetVehicleData
- final GetVehicleDataResponse msg = new GetVehicleDataResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
- }
- });
- } else {
- _proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
- }
- }
- } else if (functionName.equals(Names.ReadDID)) {
- // ReadDID
- final ReadDIDResponse msg = new ReadDIDResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onReadDIDResponse((ReadDIDResponse)msg);
- }
- });
- } else {
- _proxyListener.onReadDIDResponse((ReadDIDResponse)msg);
- }
- } else if (functionName.equals(Names.GetDTCs)) {
- // GetDTCs
- final GetDTCsResponse msg = new GetDTCsResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onGetDTCsResponse((GetDTCsResponse)msg);
- }
- });
- } else {
- _proxyListener.onGetDTCsResponse((GetDTCsResponse)msg);
- }
- } else if (functionName.equals(Names.AlertManeuver)) {
- // AlertManeuver
- final AlertManeuverResponse msg = new AlertManeuverResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onAlertManeuverResponse((AlertManeuverResponse)msg);
- }
- });
- } else {
- _proxyListener.onAlertManeuverResponse((AlertManeuverResponse)msg);
- }
- } else if (functionName.equals(Names.ShowConstantTBT)) {
- // ShowConstantTBT
- final ShowConstantTBTResponse msg = new ShowConstantTBTResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onShowConstantTBTResponse((ShowConstantTBTResponse)msg);
- }
- });
- } else {
- _proxyListener.onShowConstantTBTResponse((ShowConstantTBTResponse)msg);
- }
- } else if (functionName.equals(Names.UpdateTurnList)) {
- // UpdateTurnList
- final UpdateTurnListResponse msg = new UpdateTurnListResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onUpdateTurnListResponse((UpdateTurnListResponse)msg);
- }
- });
- } else {
- _proxyListener.onUpdateTurnListResponse((UpdateTurnListResponse)msg);
- }
- } else if (functionName.equals(Names.DialNumber)) {
- // DialNumber
- final DialNumberResponse msg = new DialNumberResponse(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onDialNumberResponse((DialNumberResponse)msg);
- }
- });
- } else {
- _proxyListener.onDialNumberResponse((DialNumberResponse)msg);
- }
- } else {
- if (_smartDeviceLinkMsgVersion != null) {
- DebugTool.logError("Unrecognized response Message: " + functionName.toString() +
- "SMARTDEVICELINK Message Version = " + _smartDeviceLinkMsgVersion);
- } else {
- DebugTool.logError("Unrecognized response Message: " + functionName.toString());
- }
- } // end-if
- } else if (messageType.equals(Names.notification)) {
- SmartDeviceLinkTrace.logRPCEvent(InterfaceActivityDirection.Receive, new RPCNotification(rpcMsg), SMARTDEVICELINK_LIB_TRACE_KEY);
- if (functionName.equals(Names.OnHMIStatus)) {
- // OnHMIStatus
-
- final OnHMIStatus msg = new OnHMIStatus(hash);
- msg.setFirstRun(new Boolean(firstTimeFull));
- if (msg.getHmiLevel() == HMILevel.HMI_FULL) firstTimeFull = false;
-
- if (msg.getHmiLevel() != _priorHmiLevel && msg.getAudioStreamingState() != _priorAudioStreamingState) {
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnHMIStatus((OnHMIStatus)msg);
- }
- });
- } else {
- _proxyListener.onOnHMIStatus((OnHMIStatus)msg);
- }
- }
- } else if (functionName.equals(Names.OnCommand)) {
- // OnCommand
-
- final OnCommand msg = new OnCommand(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnCommand((OnCommand)msg);
- }
- });
- } else {
- _proxyListener.onOnCommand((OnCommand)msg);
- }
- } else if (functionName.equals(Names.OnDriverDistraction)) {
- // OnDriverDistration
-
- final OnDriverDistraction msg = new OnDriverDistraction(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnDriverDistraction(msg);
- }
- });
- } else {
- _proxyListener.onOnDriverDistraction(msg);
- }
- } else if (functionName.equals(Names.OnEncodedSyncPData)) {
- // OnEncodedSyncPData;
- final OnEncodedSyncPData msg = new OnEncodedSyncPData(hash);
-
-
- Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", Names.OnEncodedSyncPData);
- updateBroadcastIntent(sendIntent, "TYPE", Names.notification);
-
- // If url is null, then send notification to the app, otherwise, send to URL
- if (msg.getUrl() == null) {
- updateBroadcastIntent(sendIntent, "COMMENT1", "URL is a null value (received)");
- sendBroadcastIntent(sendIntent);
- try
- {
- Class<?> cls = Class.forName(Names.ListenerExtend);
- if (cls.isInstance(_proxyListener))
- {
- final Object t = cls.cast(_proxyListener);
- final Method meth = cls.getDeclaredMethod(Names.onOnEncodedSyncPData, new Class[]{OnEncodedSyncPData.class});
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- try {
- meth.invoke(t, msg);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- } else {
- meth.invoke(t, msg);
- }
- }
- }
- catch (Exception e)
- {
- //private lib not present
- }
- } else {
- updateBroadcastIntent(sendIntent, "COMMENT1", "Sending smartDeviceLinkp to cloud: " + msg.getUrl());
- sendBroadcastIntent(sendIntent);
-
- // URL has data, attempt to post request to external server
- Thread handleOffboardSmartDeviceLinkTransmissionTread = new Thread() {
- @Override
- public void run() {
- sendEncodedSyncPDataToUrl(msg.getUrl(), msg.getData(), msg.getTimeout());
- }
- };
-
- handleOffboardSmartDeviceLinkTransmissionTread.start();
- }
- } else if (functionName.equals(Names.OnSyncPData)) {
- // OnSyncPData
- final OnSyncPData msg = new OnSyncPData(hash);
- Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", Names.OnSyncPData);
- updateBroadcastIntent(sendIntent, "TYPE", Names.notification);
-
- // If url is null, then send notification to the app, otherwise, send to URL
- if (msg.getUrl() == null) {
- updateBroadcastIntent(sendIntent, "COMMENT1", "URL is a null value (received)");
- sendBroadcastIntent(sendIntent);
- try
- {
- Class<?> cls = Class.forName(Names.ListenerExtend);
- if (cls.isInstance(_proxyListener))
- {
- final Object t = cls.cast(_proxyListener);
- final Method meth = cls.getDeclaredMethod(Names.onOnSyncPData, new Class[]{OnSyncPData.class});
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- try {
- meth.invoke(t, msg);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- } else {
- meth.invoke(t, msg);
- }
- }
- }
- catch (Exception e)
- {
- //private lib not present
- }
- } else { //url not null, send to url
- updateBroadcastIntent(sendIntent, "COMMENT1", "Sending smartDeviceLinkp to cloud: " + msg.getUrl());
- sendBroadcastIntent(sendIntent);
- Log.i("pt", "send smartDeviceLinkp to url");
- // URL has data, attempt to post request to external server
- Thread handleOffboardSmartDeviceLinkTransmissionTread = new Thread() {
- @Override
- public void run() {
- sendSyncPDataToUrl(msg.getUrl(), msg.getSyncPData(), msg.getTimeout());
- }
- };
-
- handleOffboardSmartDeviceLinkTransmissionTread.start();
- }
- } else if (functionName.equals(Names.OnPermissionsChange)) {
- //OnPermissionsChange
-
- final OnPermissionsChange msg = new OnPermissionsChange(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnPermissionsChange(msg);
- }
- });
- } else {
- _proxyListener.onOnPermissionsChange(msg);
- }
- } else if (functionName.equals(Names.OnTBTClientState)) {
- // OnTBTClientState
-
- final OnTBTClientState msg = new OnTBTClientState(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnTBTClientState(msg);
- }
- });
- } else {
- _proxyListener.onOnTBTClientState(msg);
- }
- } else if (functionName.equals(Names.OnButtonPress)) {
- // OnButtonPress
-
- final OnButtonPress msg = new OnButtonPress(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnButtonPress((OnButtonPress)msg);
- }
- });
- } else {
- _proxyListener.onOnButtonPress((OnButtonPress)msg);
- }
- } else if (functionName.equals(Names.OnButtonEvent)) {
- // OnButtonEvent
-
- final OnButtonEvent msg = new OnButtonEvent(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnButtonEvent((OnButtonEvent)msg);
- }
- });
- } else {
- _proxyListener.onOnButtonEvent((OnButtonEvent)msg);
- }
- } else if (functionName.equals(Names.OnLanguageChange)) {
- // OnLanguageChange
-
- final OnLanguageChange msg = new OnLanguageChange(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnLanguageChange((OnLanguageChange)msg);
- }
- });
- } else {
- _proxyListener.onOnLanguageChange((OnLanguageChange)msg);
- }
- } else if (functionName.equals(Names.OnAudioPassThru)) {
- // OnAudioPassThru
- final OnAudioPassThru msg = new OnAudioPassThru(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnAudioPassThru((OnAudioPassThru)msg);
- }
- });
- } else {
- _proxyListener.onOnAudioPassThru((OnAudioPassThru)msg);
- }
- } else if (functionName.equals(Names.OnVehicleData)) {
- try {
- Class<?> cls = Class.forName(Names.OnVehicleDataExtend);
- Constructor con = cls.getConstructor(new Class[]{Hashtable.class});
- final Object msg = con.newInstance(hash);
- // OnVehicleDataExtend
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnVehicleData((OnVehicleData)msg);
- }
- });
- } else {
- _proxyListener.onOnVehicleData((OnVehicleData)msg);
- }
- }
- catch(Exception e) {
- // OnVehicleData
- final OnVehicleData msg = new OnVehicleData(hash);
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- _proxyListener.onOnVehicleData((OnVehicleData)msg);
- }
- });
- } else {
- _proxyListener.onOnVehicleData((OnVehicleData)msg);
- }
- }
- }
- else if (functionName.equals(Names.OnAppInterfaceUnregistered)) {
- // OnAppInterfaceUnregistered
-
- _appInterfaceRegisterd = false;
- synchronized(APP_INTERFACE_REGISTERED_LOCK) {
- APP_INTERFACE_REGISTERED_LOCK.notify();
- }
-
- final OnAppInterfaceUnregistered msg = new OnAppInterfaceUnregistered(hash);
-
- if (_advancedLifecycleManagementEnabled) {
- // This requires the proxy to be cycled
- if (this.getCurrentTransportType() == TransportType.BLUETOOTH) {
- cycleProxy(SmartDeviceLinkDisconnectedReason.convertAppInterfaceUnregisteredReason(msg.getReason()));
- } else {
- Log.e(this.getClass().getName(), "HandleRPCMessage. No cycle required if transport is TCP");
- }
- } else {
- if (_callbackToUIThread) {
- // Run in UI thread
- _mainUIHandler.post(new Runnable() {
- @Override
- public void run() {
- ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
- }
- });
- } else {
- ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
- }
-
- notifyProxyClosed("OnAppInterfaceUnregistered", null);
- }
- } else {
- if (_smartDeviceLinkMsgVersion != null) {
- DebugTool.logInfo("Unrecognized notification Message: " + functionName.toString() +
- " connected to SMARTDEVICELINK using message version: " + _smartDeviceLinkMsgVersion.getMajorVersion() + "." + _smartDeviceLinkMsgVersion.getMinorVersion());
- } else {
- DebugTool.logInfo("Unrecognized notification Message: " + functionName.toString());
- }
- } // end-if
- } // end-if notification
-
- SmartDeviceLinkTrace.logProxyEvent("Proxy received RPC Message: " + functionName, SMARTDEVICELINK_LIB_TRACE_KEY);
- }
-
- /**
- * Takes an RPCRequest and sends it to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param request
- * @throws SmartDeviceLinkException
- */
- public void sendRPCRequest(RPCRequest request) throws SmartDeviceLinkException {
- if (_proxyDisposed) {
- throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);
- }
-
- // Test if request is null
- if (request == null) {
- SmartDeviceLinkTrace.logProxyEvent("Application called sendRPCRequest method with a null RPCRequest.", SMARTDEVICELINK_LIB_TRACE_KEY);
- throw new IllegalArgumentException("sendRPCRequest cannot be called with a null request.");
- }
-
- SmartDeviceLinkTrace.logProxyEvent("Application called sendRPCRequest method for RPCRequest: ." + request.getFunctionName(), SMARTDEVICELINK_LIB_TRACE_KEY);
-
- // Test if smartDeviceLinkConnection is null
- synchronized(CONNECTION_REFERENCE_LOCK) {
- if (_smartDeviceLinkConnection == null || !_smartDeviceLinkConnection.getIsConnected()) {
- SmartDeviceLinkTrace.logProxyEvent("Application attempted to send and RPCRequest without a connected transport.", SMARTDEVICELINK_LIB_TRACE_KEY);
- throw new SmartDeviceLinkException("There is no valid connection to SMARTDEVICELINK. sendRPCRequest cannot be called until SMARTDEVICELINK has been connected.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
- }
-
- // Test for illegal correlation ID
- if (isCorrelationIDProtected(request.getCorrelationID())) {
-
- SmartDeviceLinkTrace.logProxyEvent("Application attempted to use the reserved correlation ID, " + request.getCorrelationID(), SMARTDEVICELINK_LIB_TRACE_KEY);
- throw new SmartDeviceLinkException("Invalid correlation ID. The correlation ID, " + request.getCorrelationID()
- + " , is a reserved correlation ID.", SmartDeviceLinkExceptionCause.RESERVED_CORRELATION_ID);
- }
-
- // Throw exception if RPCRequest is sent when SMARTDEVICELINK is unavailable
- if (!_appInterfaceRegisterd && request.getFunctionName() != Names.RegisterAppInterface) {
-
- SmartDeviceLinkTrace.logProxyEvent("Application attempted to send an RPCRequest (non-registerAppInterface), before the interface was registerd.", SMARTDEVICELINK_LIB_TRACE_KEY);
- throw new SmartDeviceLinkException("SMARTDEVICELINK is currently unavailable. RPC Requests cannot be sent.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);
- }
-
- if (_advancedLifecycleManagementEnabled) {
- if ( request.getFunctionName() == Names.RegisterAppInterface
- || request.getFunctionName() == Names.UnregisterAppInterface) {
-
- SmartDeviceLinkTrace.logProxyEvent("Application attempted to send a RegisterAppInterface or UnregisterAppInterface while using ALM.", SMARTDEVICELINK_LIB_TRACE_KEY);
- throw new SmartDeviceLinkException("The RPCRequest, " + request.getFunctionName() +
- ", is unnallowed using the Advanced Lifecycle Management Model.", SmartDeviceLinkExceptionCause.INCORRECT_LIFECYCLE_MODEL);
- }
- }
-
- sendRPCRequestPrivate(request);
- } // end-method
-
- protected void notifyProxyClosed(final String info, final Exception e) {
- SmartDeviceLinkTrace.logProxyEvent("NotifyProxyClose", SMARTDEVICELINK_LIB_TRACE_KEY);
-
- OnProxyClosed message = new OnProxyClosed(info, e);
- queueInternalMessage(message);
- }
-
- private void passErrorToProxyListener(final String info, final Exception e) {
-
- OnError message = new OnError(info, e);
- queueInternalMessage(message);
- }
-
- private void startRPCProtocolSession(byte sessionID, String correlationID) {
- _rpcSessionID = sessionID;
-
- // Set Proxy Lifecyclek Available
- if (_advancedLifecycleManagementEnabled) {
-
- try {
- registerAppInterfacePrivate(
- _smartDeviceLinkMsgVersionRequest,
- _applicationName,
- _ttsName,
- _ngnMediaScreenAppName,
- _vrSynonyms,
- _isMediaApp,
- _smartDeviceLinkLanguageDesired,
- _hmiDisplayLanguageDesired,
- _appType,
- _appID,
- _autoActivateIdDesired,
- REGISTER_APP_INTERFACE_CORRELATION_ID);
-
- } catch (Exception e) {
- notifyProxyClosed("Failed to register application interface with SMARTDEVICELINK. Check parameter values given to SmartDeviceLinkProxy constructor.", e);
- }
- } else {
- InternalProxyMessage message = new InternalProxyMessage(Names.OnProxyOpened);
- queueInternalMessage(message);
- }
- }
-
- // Queue internal callback message
- private void queueInternalMessage(InternalProxyMessage message) {
- synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
- if (_internalProxyMessageDispatcher != null) {
- _internalProxyMessageDispatcher.queueMessage(message);
- }
- }
- }
-
- // Queue incoming ProtocolMessage
- private void queueIncomingMessage(ProtocolMessage message) {
- synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
- if (_incomingProxyMessageDispatcher != null) {
- _incomingProxyMessageDispatcher.queueMessage(message);
- }
- }
- }
-
- public void setAppService(Service mService)
- {
- _appService = mService;
- }
-
- /******************** Public Helper Methods *************************/
-
- /*Begin V1 Enhanced helper*/
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param parentID -Menu parent ID for optional sub value containing menu parameters.
- *@param position -Menu position for optional sub value containing menu parameters.
- *@param vrCommands -VR synonyms for this AddCommand.
- *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
- *@param IconType -Describes whether the image is static or dynamic
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer parentID, Integer position,
- Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
- throws SmartDeviceLinkException {
-
- AddCommand msg = RPCRequestFactory.buildAddCommand(commandID, menuText, parentID, position,
- vrCommands, IconValue, IconType, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param position -Menu position for optional sub value containing menu parameters.
- *@param vrCommands -VR synonyms for this AddCommand.
- *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
- *@param IconType -Describes whether the image is static or dynamic
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer position,
- Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, position, vrCommands, IconValue, IconType, correlationID);
- }
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param position -Menu position for optional sub value containing menu parameters.
- *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
- *@param IconType -Describes whether the image is static or dynamic
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer position, String IconValue, ImageType IconType,
- Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, position, null, IconValue, IconType, correlationID);
- }
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
- *@param IconType -Describes whether the image is static or dynamic
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, String IconValue, ImageType IconType, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, null, null, IconValue, IconType, correlationID);
- }
-
- /**
- * Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param commandID -Unique command ID of the command to add.
- * @param menuText -Menu text for optional sub value containing menu parameters.
- * @param vrCommands -VR synonyms for this AddCommand.
- * @param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
- * @param IconType -Describes whether the image is static or dynamic
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, null, vrCommands, IconValue, IconType, correlationID);
- }
-
- /**
- * Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param commandID -Unique command ID of the command to add.
- * @param vrCommands -VR synonyms for this AddCommand.
- * @param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
- * @param IconType -Describes whether the image is static or dynamic
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, null, null, null, vrCommands, IconValue, IconType, correlationID);
- }
-
- /*End V1 Enhanced helper*/
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param parentID -Menu parent ID for optional sub value containing menu parameters.
- *@param position -Menu position for optional sub value containing menu parameters.
- *@param vrCommands -VR synonyms for this AddCommand.
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer parentID, Integer position,
- Vector<String> vrCommands, Integer correlationID)
- throws SmartDeviceLinkException {
-
- AddCommand msg = RPCRequestFactory.buildAddCommand(commandID, menuText, parentID, position,
- vrCommands, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param position -Menu position for optional sub value containing menu parameters.
- *@param vrCommands -VR synonyms for this AddCommand.
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer position,
- Vector<String> vrCommands, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, position, vrCommands, correlationID);
- }
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param position -Menu position for optional sub value containing menu parameters.
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer position,
- Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, position, null, correlationID);
- }
-
- /**
- *Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Integer correlationID)
- throws SmartDeviceLinkException {
- Vector<String> vrCommands = null;
-
- addCommand(commandID, menuText, null, null, vrCommands, correlationID);
- }
-
- /**
- * Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param menuText -Menu text for optional sub value containing menu parameters.
- *@param vrCommands -VR synonyms for this AddCommand.
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- String menuText, Vector<String> vrCommands, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, menuText, null, null, vrCommands, correlationID);
- }
-
- /**
- * Sends an AddCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- *@param commandID -Unique command ID of the command to add.
- *@param vrCommands -VR synonyms for this AddCommand.
- *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- *@throws SmartDeviceLinkException
- */
- public void addCommand(Integer commandID,
- Vector<String> vrCommands, Integer correlationID)
- throws SmartDeviceLinkException {
-
- addCommand(commandID, null, null, null, vrCommands, correlationID);
- }
-
-
- /**
- * Sends an AddSubMenu RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param menuID -Unique ID of the sub menu to add.
- * @param menuName -Text to show in the menu for this sub menu.
- * @param position -Position within the items that are are at top level of the in application menu.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void addSubMenu(Integer menuID, String menuName,
- Integer position, Integer correlationID)
- throws SmartDeviceLinkException {
-
- AddSubMenu msg = RPCRequestFactory.buildAddSubMenu(menuID, menuName,
- position, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends an AddSubMenu RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param menuID -Unique ID of the sub menu to add.
- * @param menuName -Text to show in the menu for this sub menu.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void addSubMenu(Integer menuID, String menuName,
- Integer correlationID) throws SmartDeviceLinkException {
-
- addSubMenu(menuID, menuName, null, correlationID);
- }
-
- /**
- * Sends an EncodedData RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param data -Contains base64 encoded string of SmartDeviceLinkP packets.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void encodedSyncPData(Vector<String> data, Integer correlationID)
- throws SmartDeviceLinkException {
-
- Log.i("pt", "encodedSyncPData() giving to smartDeviceLink");
- EncodedSyncPData msg = RPCRequestFactory.buildEncodedSyncPData(data, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a Data RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param data
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void SyncPData(byte[] data, Integer correlationID)
- throws SmartDeviceLinkException {
-
- Log.i("pt", "SyncPData() giving to smartDeviceLink");
- SyncPData msg = RPCRequestFactory.buildSyncPData(data, correlationID);
- sendRPCRequest(msg);
- }
-
- /*Begin V1 Enhanced helper*/
-
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsText -The text to speech message in the form of a string.
- * @param alertText1 -The first line of the alert text field.
- * @param alertText2 -The second line of the alert text field.
- * @param alertText3 -The optional third line of the alert text field.
- * @param playTone -Defines if tone should be played.
- * @param duration -Timeout in milliseconds.
- * @param softButtons -A list of App defined SoftButtons.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(String ttsText, String alertText1,
- String alertText2, String alertText3, Boolean playTone, Integer duration, Vector<SoftButton> softButtons,
- Integer correlationID) throws SmartDeviceLinkException {
-
- Alert msg = RPCRequestFactory.buildAlert(ttsText, alertText1, alertText2, alertText3, playTone, duration, softButtons, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsChunks -Text/phonemes to speak in the form of ttsChunks.
- * @param alertText1 -The first line of the alert text field.
- * @param alertText2 -The second line of the alert text field.
- * @param alertText3 -The optional third line of the alert text field.
- * @param playTone -Defines if tone should be played.
- * @param duration -Timeout in milliseconds.
- * @param softButtons -A list of App defined SoftButtons.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(Vector<TTSChunk> ttsChunks,
- String alertText1, String alertText2, String alertText3, Boolean playTone,
- Integer duration, Vector<SoftButton> softButtons, Integer correlationID) throws SmartDeviceLinkException {
-
- Alert msg = RPCRequestFactory.buildAlert(ttsChunks, alertText1, alertText2, alertText3, playTone, duration, softButtons, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsText -The text to speech message in the form of a string.
- * @param playTone -Defines if tone should be played.
- * @param softButtons -A list of App defined SoftButtons.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(String ttsText, Boolean playTone, Vector<SoftButton> softButtons,
- Integer correlationID) throws SmartDeviceLinkException {
-
- alert(ttsText, null, null, null, playTone, null, softButtons, correlationID);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param chunks -A list of text/phonemes to speak in the form of ttsChunks.
- * @param playTone -Defines if tone should be played.
- * @param softButtons -A list of App defined SoftButtons.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(Vector<TTSChunk> chunks, Boolean playTone, Vector<SoftButton> softButtons,
- Integer correlationID) throws SmartDeviceLinkException {
-
- alert(chunks, null, null, null, playTone, null, softButtons, correlationID);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param alertText1 -The first line of the alert text field.
- * @param alertText2 -The second line of the alert text field.
- * @param alertText3 -The optional third line of the alert text field.
- * @param playTone -Defines if tone should be played.
- * @param duration -Timeout in milliseconds.
- * @param softButtons -A list of App defined SoftButtons.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(String alertText1, String alertText2, String alertText3,
- Boolean playTone, Integer duration, Vector<SoftButton> softButtons, Integer correlationID)
- throws SmartDeviceLinkException {
-
- alert((Vector<TTSChunk>)null, alertText1, alertText2, alertText3, playTone, duration, softButtons, correlationID);
- }
-
- /*End V1 Enhanced helper*/
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsText -The text to speech message in the form of a string.
- * @param alertText1 -The first line of the alert text field.
- * @param alertText2 -The second line of the alert text field.
- * @param playTone -Defines if tone should be played.
- * @param duration -Timeout in milliseconds.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(String ttsText, String alertText1,
- String alertText2, Boolean playTone, Integer duration,
- Integer correlationID) throws SmartDeviceLinkException {
-
- Alert msg = RPCRequestFactory.buildAlert(ttsText, alertText1, alertText2,
- playTone, duration, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsChunks -A list of text/phonemes to speak in the form of ttsChunks.
- * @param alertText1 -The first line of the alert text field.
- * @param alertText2 -The second line of the alert text field.
- * @param playTone -Defines if tone should be played.
- * @param duration -Timeout in milliseconds.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(Vector<TTSChunk> ttsChunks,
- String alertText1, String alertText2, Boolean playTone,
- Integer duration, Integer correlationID) throws SmartDeviceLinkException {
-
- Alert msg = RPCRequestFactory.buildAlert(ttsChunks, alertText1, alertText2, playTone,
- duration, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsText -The text to speech message in the form of a string.
- * @param playTone -Defines if tone should be played.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(String ttsText, Boolean playTone,
- Integer correlationID) throws SmartDeviceLinkException {
-
- alert(ttsText, null, null, playTone, null, correlationID);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param chunks -A list of text/phonemes to speak in the form of ttsChunks.
- * @param playTone -Defines if tone should be played.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(Vector<TTSChunk> chunks, Boolean playTone,
- Integer correlationID) throws SmartDeviceLinkException {
-
- alert(chunks, null, null, playTone, null, correlationID);
- }
-
- /**
- * Sends an Alert RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param alertText1 -The first line of the alert text field.
- * @param alertText2 -The second line of the alert text field.
- * @param playTone -Defines if tone should be played.
- * @param duration -Timeout in milliseconds.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void alert(String alertText1, String alertText2,
- Boolean playTone, Integer duration, Integer correlationID)
- throws SmartDeviceLinkException {
-
- alert((Vector<TTSChunk>)null, alertText1, alertText2, playTone, duration, correlationID);
- }
-
- /**
- * Sends a CreateInteractionChoiceSet RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param choiceSet
- * @param interactionChoiceSetID
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void createInteractionChoiceSet(
- Vector<Choice> choiceSet, Integer interactionChoiceSetID,
- Integer correlationID) throws SmartDeviceLinkException {
-
- CreateInteractionChoiceSet msg = RPCRequestFactory.buildCreateInteractionChoiceSet(
- choiceSet, interactionChoiceSetID, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a DeleteCommand RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param commandID -ID of the command(s) to delete.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void deleteCommand(Integer commandID,
- Integer correlationID) throws SmartDeviceLinkException {
-
- DeleteCommand msg = RPCRequestFactory.buildDeleteCommand(commandID, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a DeleteInteractionChoiceSet RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param interactionChoiceSetID -ID of the interaction choice set to delete.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void deleteInteractionChoiceSet(
- Integer interactionChoiceSetID, Integer correlationID)
- throws SmartDeviceLinkException {
-
- DeleteInteractionChoiceSet msg = RPCRequestFactory.buildDeleteInteractionChoiceSet(
- interactionChoiceSetID, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a DeleteSubMenu RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param menuID -The menuID of the submenu to delete.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
- * @throws SmartDeviceLinkException
- */
- public void deleteSubMenu(Integer menuID,
- Integer correlationID) throws SmartDeviceLinkException {
-
- DeleteSubMenu msg = RPCRequestFactory.buildDeleteSubMenu(menuID, correlationID);
-
- sendRPCRequest(msg);
- }
-
-
-
- /*Begin V1 Enhanced helper*/
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
- * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(String initPrompt,
- String displayText, Integer interactionChoiceSetID, Vector<VrHelpItem> vrHelp,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
- displayText, interactionChoiceSetID, vrHelp, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
- * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
- * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
- * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
- * @param timeout -Timeout in milliseconds.
- * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(String initPrompt,
- String displayText, Integer interactionChoiceSetID,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
- initPrompt, displayText, interactionChoiceSetID,
- helpPrompt, timeoutPrompt, interactionMode,
- timeout, vrHelp, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
- * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
- * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
- * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
- * @param timeout -Timeout in milliseconds.
- * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(String initPrompt,
- String displayText, Vector<Integer> interactionChoiceSetIDList,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
- displayText, interactionChoiceSetIDList,
- helpPrompt, timeoutPrompt, interactionMode, timeout, vrHelp,
- correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initChunks -A list of text/phonemes to speak for the initial prompt in the form of ttsChunks.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
- * @param helpChunks -A list of text/phonemes to speak for the help text that is spoken when a user speaks "help" during the interaction.
- * @param timeoutChunks A list of text/phonems to speak for the timeout text that is spoken when a VR interaction times out.
- * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
- * @param timeout -Timeout in milliseconds.
- * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(
- Vector<TTSChunk> initChunks, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
- initChunks, displayText, interactionChoiceSetIDList,
- helpChunks, timeoutChunks, interactionMode, timeout,vrHelp,
- correlationID);
-
- sendRPCRequest(msg);
- }
-
- /*End V1 Enhanced*/
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(String initPrompt,
- String displayText, Integer interactionChoiceSetID,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
- displayText, interactionChoiceSetID, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
- * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
- * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
- * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
- * @param timeout -Timeout in milliseconds.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(String initPrompt,
- String displayText, Integer interactionChoiceSetID,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
- initPrompt, displayText, interactionChoiceSetID,
- helpPrompt, timeoutPrompt, interactionMode,
- timeout, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
- * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
- * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
- * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
- * @param timeout -Timeout in milliseconds.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(String initPrompt,
- String displayText, Vector<Integer> interactionChoiceSetIDList,
- String helpPrompt, String timeoutPrompt,
- InteractionMode interactionMode, Integer timeout,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
- displayText, interactionChoiceSetIDList,
- helpPrompt, timeoutPrompt, interactionMode, timeout,
- correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a PerformInteraction RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param initChunks -A list of text/phonemes to speak for the initial prompt in the form of ttsChunks.
- * @param displayText -Text to be displayed first.
- * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
- * @param helpChunks -A list of text/phonemes to speak for the help text that is spoken when a user speaks "help" during the interaction.
- * @param timeoutChunks A list of text/phonems to speak for the timeout text that is spoken when a VR interaction times out.
- * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
- * @param timeout -Timeout in milliseconds.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performInteraction(
- Vector<TTSChunk> initChunks, String displayText,
- Vector<Integer> interactionChoiceSetIDList,
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- InteractionMode interactionMode, Integer timeout,
- Integer correlationID) throws SmartDeviceLinkException {
-
- PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
- initChunks, displayText, interactionChoiceSetIDList,
- helpChunks, timeoutChunks, interactionMode, timeout,
- correlationID);
-
- sendRPCRequest(msg);
- }
-
- // Protected registerAppInterface used to ensure only non-ALM applications call
- // reqisterAppInterface
- protected void registerAppInterfacePrivate(
- smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, String appName, Vector<TTSChunk> ttsName,
- String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
- Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
- String appID, String autoActivateID, Integer correlationID)
- throws SmartDeviceLinkException {
-
- RegisterAppInterface msg = RPCRequestFactory.buildRegisterAppInterface(
- smartDeviceLinkMsgVersion, appName, ttsName, ngnMediaScreenAppName, vrSynonyms, isMediaApp,
- languageDesired, hmiDisplayLanguageDesired, appType, appID, correlationID);
-
- sendRPCRequestPrivate(msg);
- }
-
- /*Begin V1 Enhanced helper function*/
-
- /**
- * Sends a SetGlobalProperties RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param helpPrompt
- * @param timeoutPrompt
- * @param vrHelpTitle
- * @param vrHelp
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void setGlobalProperties(
- String helpPrompt, String timeoutPrompt, String vrHelpTitle, Vector<VrHelpItem> vrHelp, Integer correlationID)
- throws SmartDeviceLinkException {
-
- SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(helpPrompt,
- timeoutPrompt, vrHelpTitle, vrHelp, correlationID);
-
- sendRPCRequest(req);
- }
-
- /**
- * Sends a SetGlobalProperties RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param helpChunks
- * @param timeoutChunks
- * @param vrHelpTitle
- * @param vrHelp
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void setGlobalProperties(
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks, String vrHelpTitle, Vector<VrHelpItem> vrHelp,
- Integer correlationID) throws SmartDeviceLinkException {
-
- SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(
- helpChunks, timeoutChunks, vrHelpTitle, vrHelp, correlationID);
-
- sendRPCRequest(req);
- }
-
- /*End V1 Enhanced helper function*/
-
- /**
- * Sends a SetGlobalProperties RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param helpPrompt
- * @param timeoutPrompt
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void setGlobalProperties(
- String helpPrompt, String timeoutPrompt, Integer correlationID)
- throws SmartDeviceLinkException {
-
- SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(helpPrompt,
- timeoutPrompt, correlationID);
-
- sendRPCRequest(req);
- }
-
- /**
- * Sends a SetGlobalProperties RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param helpChunks
- * @param timeoutChunks
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void setGlobalProperties(
- Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
- Integer correlationID) throws SmartDeviceLinkException {
-
- SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(
- helpChunks, timeoutChunks, correlationID);
-
- sendRPCRequest(req);
- }
-
- public void resetGlobalProperties(Vector<GlobalProperty> properties,
- Integer correlationID) throws SmartDeviceLinkException {
-
- ResetGlobalProperties req = new ResetGlobalProperties();
-
- req.setCorrelationID(correlationID);
- req.setProperties(properties);
-
- sendRPCRequest(req);
- }
-
-
- /**
- * Sends a SetMediaClockTimer RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param hours
- * @param minutes
- * @param seconds
- * @param updateMode
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void setMediaClockTimer(Integer hours,
- Integer minutes, Integer seconds, UpdateMode updateMode,
- Integer correlationID) throws SmartDeviceLinkException {
-
- SetMediaClockTimer msg = RPCRequestFactory.buildSetMediaClockTimer(hours,
- minutes, seconds, updateMode, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Pauses the media clock. Responses are captured through callback on IProxyListener.
- *
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void pauseMediaClockTimer(Integer correlationID)
- throws SmartDeviceLinkException {
-
- SetMediaClockTimer msg = RPCRequestFactory.buildSetMediaClockTimer(0,
- 0, 0, UpdateMode.PAUSE, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Resumes the media clock. Responses are captured through callback on IProxyListener.
- *
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void resumeMediaClockTimer(Integer correlationID)
- throws SmartDeviceLinkException {
-
- SetMediaClockTimer msg = RPCRequestFactory.buildSetMediaClockTimer(0,
- 0, 0, UpdateMode.RESUME, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Clears the media clock. Responses are captured through callback on IProxyListener.
- *
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void clearMediaClockTimer(Integer correlationID)
- throws SmartDeviceLinkException {
-
- Show msg = RPCRequestFactory.buildShow(null, null, null, " ", null, null, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /*Begin V1 Enhanced helper*/
- /**
- * Sends a Show RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param mainText1 -Text displayed in a single or upper display line.
- * @param mainText2 -Text displayed on the second display line.
- * @param mainText3 -Text displayed on the second "page" first display line.
- * @param mainText4 -Text displayed on the second "page" second display line.
- * @param statusBar
- * @param mediaClock -Text value for MediaClock field.
- * @param mediaTrack -Text displayed in the track field.
- * @param graphic -Image struct determining whether static or dynamic image to display in app.
- * @param softButtons -App defined SoftButtons.
- * @param customPresets -App labeled on-screen presets.
- * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void show(String mainText1, String mainText2, String mainText3, String mainText4,
- String statusBar, String mediaClock, String mediaTrack,
- Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets,
- TextAlignment alignment, Integer correlationID)
- throws SmartDeviceLinkException {
-
- Show msg = RPCRequestFactory.buildShow(mainText1, mainText2, mainText3, mainText4,
- statusBar, mediaClock, mediaTrack, graphic, softButtons, customPresets,
- alignment, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a Show RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param mainText1 -Text displayed in a single or upper display line.
- * @param mainText2 -Text displayed on the second display line.
- * @param mainText3 -Text displayed on the second "page" first display line.
- * @param mainText4 -Text displayed on the second "page" second display line.
- * @param graphic -Image struct determining whether static or dynamic image to display in app.
- * @param softButtons -App defined SoftButtons.
- * @param customPresets -App labeled on-screen presets.
- * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void show(String mainText1, String mainText2, String mainText3, String mainText4,
- Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets,
- TextAlignment alignment, Integer correlationID)
- throws SmartDeviceLinkException {
-
- show(mainText1, mainText2, mainText3, mainText4, null, null, null, graphic, softButtons, customPresets, alignment, correlationID);
- }
- /*End V1 Enhanced helper*/
-
- /**
- * Sends a Show RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param mainText1 -Text displayed in a single or upper display line.
- * @param mainText2 -Text displayed on the second display line.
- * @param statusBar
- * @param mediaClock -Text value for MediaClock field.
- * @param mediaTrack -Text displayed in the track field.
- * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void show(String mainText1, String mainText2,
- String statusBar, String mediaClock, String mediaTrack,
- TextAlignment alignment, Integer correlationID)
- throws SmartDeviceLinkException {
-
- Show msg = RPCRequestFactory.buildShow(mainText1, mainText2,
- statusBar, mediaClock, mediaTrack,
- alignment, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a Show RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param mainText1 -Text displayed in a single or upper display line.
- * @param mainText2 -Text displayed on the second display line.
- * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void show(String mainText1, String mainText2,
- TextAlignment alignment, Integer correlationID)
- throws SmartDeviceLinkException {
-
- show(mainText1, mainText2, null, null, null, alignment, correlationID);
- }
-
- /**
- * Sends a Speak RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsText -The text to speech message in the form of a string.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void speak(String ttsText, Integer correlationID)
- throws SmartDeviceLinkException {
-
- Speak msg = RPCRequestFactory.buildSpeak(TTSChunkFactory.createSimpleTTSChunks(ttsText),
- correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a Speak RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param ttsChunks -Text/phonemes to speak in the form of ttsChunks.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void speak(Vector<TTSChunk> ttsChunks,
- Integer correlationID) throws SmartDeviceLinkException {
-
- Speak msg = RPCRequestFactory.buildSpeak(ttsChunks, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Sends a SubscribeButton RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param buttonName -Name of the button to subscribe.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void subscribeButton(ButtonName buttonName,
- Integer correlationID) throws SmartDeviceLinkException {
-
- SubscribeButton msg = RPCRequestFactory.buildSubscribeButton(buttonName,
- correlationID);
-
- sendRPCRequest(msg);
- }
-
- // Protected unregisterAppInterface used to ensure no non-ALM app calls
- // unregisterAppInterface.
- protected void unregisterAppInterfacePrivate(Integer correlationID)
- throws SmartDeviceLinkException {
-
- UnregisterAppInterface msg =
- RPCRequestFactory.buildUnregisterAppInterface(correlationID);
-
- sendRPCRequestPrivate(msg);
- }
-
- /**
- * Sends an UnsubscribeButton RPCRequest to SMARTDEVICELINK. Responses are captured through callback on IProxyListener.
- *
- * @param buttonName -Name of the button to unsubscribe.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void unsubscribeButton(ButtonName buttonName,
- Integer correlationID) throws SmartDeviceLinkException {
-
- UnsubscribeButton msg = RPCRequestFactory.buildUnsubscribeButton(
- buttonName, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Creates a choice to be added to a choiceset. Choice has both a voice and a visual menu component.
- *
- * @param choiceID -Unique ID used to identify this choice (returned in callback).
- * @param choiceMenuName -Text name displayed for this choice.
- * @param choiceVrCommands -Vector of vrCommands used to select this choice by voice. Must contain
- * at least one non-empty element.
- * @return Choice created.
- * @throws SmartDeviceLinkException
- */
- public Choice createChoiceSetChoice(Integer choiceID, String choiceMenuName,
- Vector<String> choiceVrCommands) {
- Choice returnChoice = new Choice();
-
- returnChoice.setChoiceID(choiceID);
- returnChoice.setMenuName(choiceMenuName);
- returnChoice.setVrCommands(choiceVrCommands);
-
- return returnChoice;
- }
-
- /**
- * Starts audio pass thru session. Responses are captured through callback on IProxyListener.
- *
- * @param initialPrompt -SMARTDEVICELINK will speak this prompt before opening the audio pass thru session.
- * @param audioPassThruDisplayText1 -First line of text displayed during audio capture.
- * @param audioPassThruDisplayText2 -Second line of text displayed during audio capture.
- * @param samplingRate -Allowable values of 8 khz or 16 or 22 or 44 khz.
- * @param maxDuration -The maximum duration of audio recording in milliseconds.
- * @param bitsPerSample -Specifies the quality the audio is recorded. Currently 8 bit or 16 bit.
- * @param audioType -Specifies the type of audio data being requested.
- * @param muteAudio -Defines if the current audio source should be muted during the APT session.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void performaudiopassthru(String initialPrompt, String audioPassThruDisplayText1, String audioPassThruDisplayText2,
- SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample,
- AudioType audioType, Boolean muteAudio, Integer correlationID) throws SmartDeviceLinkException {
-
- PerformAudioPassThru msg = RPCRequestFactory.BuildPerformAudioPassThru(initialPrompt, audioPassThruDisplayText1, audioPassThruDisplayText2,
- samplingRate, maxDuration, bitsPerSample, audioType, muteAudio, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Ends audio pass thru session. Responses are captured through callback on IProxyListener.
- *
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void endaudiopassthru(Integer correlationID) throws SmartDeviceLinkException
- {
- EndAudioPassThru msg = RPCRequestFactory.BuildEndAudioPassThru(correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Subscribes for specific published data items. The data will be only sent if it has changed.
- * Responses are captured through callback on IProxyListener.
- *
- * @param gps -Subscribes to GPS data.
- * @param speed -Subscribes to vehicle speed data in kilometers per hour.
- * @param rpm -Subscribes to number of revolutions per minute of the engine.
- * @param fuelLevel -Subscribes to fuel level in the tank (percentage).
- * @param fuelLevel_State -Subscribes to fuel level state.
- * @param instantFuelConsumption -Subscribes to instantaneous fuel consumption in microlitres.
- * @param externalTemperature -Subscribes to the external temperature in degrees celsius.
- * @param prndl -Subscribes to PRNDL data that houses the selected gear.
- * @param tirePressure -Subscribes to the TireStatus data containing status and pressure of tires.
- * @param odometer -Subscribes to Odometer data in km.
- * @param beltStatus -Subscribes to status of the seat belts.
- * @param bodyInformation -Subscribes to body information including power modes.
- * @param deviceStatus -Subscribes to device status including signal and battery strength.
- * @param driverBraking -Subscribes to the status of the brake pedal.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void subscribevehicledata(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
- boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
- boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
- boolean driverBraking, Integer correlationID) throws SmartDeviceLinkException
- {
- SubscribeVehicleData msg = RPCRequestFactory.BuildSubscribeVehicleData(gps, speed, rpm, fuelLevel, fuelLevel_State, instantFuelConsumption, externalTemperature, prndl, tirePressure,
- odometer, beltStatus, bodyInformation, deviceStatus, driverBraking, correlationID);
-
- sendRPCRequest(msg);
- }
-
- /**
- * Unsubscribes for specific published data items.
- * Responses are captured through callback on IProxyListener.
- *
- * @param gps -Unsubscribes to GPS data.
- * @param speed -Unsubscribes to vehicle speed data in kilometers per hour.
- * @param rpm -Unsubscribes to number of revolutions per minute of the engine.
- * @param fuelLevel -Unsubscribes to fuel level in the tank (percentage).
- * @param fuelLevel_State -Unsubscribes to fuel level state.
- * @param instantFuelConsumption -Unsubscribes to instantaneous fuel consumption in microlitres.
- * @param externalTemperature -Unsubscribes to the external temperature in degrees celsius.
- * @param prndl -Unsubscribes to PRNDL data that houses the selected gear.
- * @param tirePressure -Unsubscribes to the TireStatus data containing status and pressure of tires.
- * @param odometer -Unsubscribes to Odometer data in km.
- * @param beltStatus -Unsubscribes to status of the seat belts.
- * @param bodyInformation -Unsubscribes to body information including power modes.
- * @param deviceStatus -Unsubscribes to device status including signal and battery strength.
- * @param driverBraking -Unsubscribes to the status of the brake pedal.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
-
- public void unsubscribevehicledata(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
- boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
- boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
- boolean driverBraking, Integer correlationID) throws SmartDeviceLinkException
- {
- UnsubscribeVehicleData msg = RPCRequestFactory.BuildUnsubscribeVehicleData(gps, speed, rpm, fuelLevel, fuelLevel_State, instantFuelConsumption, externalTemperature, prndl, tirePressure,
- odometer, beltStatus, bodyInformation, deviceStatus, driverBraking, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Performs a Non periodic vehicle data read request.
- * Responses are captured through callback on IProxyListener.
- *
- * @param gps -Performs an ad-hoc request for GPS data.
- * @param speed -Performs an ad-hoc request for vehicle speed data in kilometers per hour.
- * @param rpm -Performs an ad-hoc request for number of revolutions per minute of the engine.
- * @param fuelLevel -Performs an ad-hoc request for fuel level in the tank (percentage).
- * @param fuelLevel_State -Performs an ad-hoc request for fuel level state.
- * @param instantFuelConsumption -Performs an ad-hoc request for instantaneous fuel consumption in microlitres.
- * @param externalTemperature -Performs an ad-hoc request for the external temperature in degrees celsius.
- * @param vin -Performs an ad-hoc request for the Vehicle identification number
- * @param prndl -Performs an ad-hoc request for PRNDL data that houses the selected gear.
- * @param tirePressure -Performs an ad-hoc request for the TireStatus data containing status and pressure of tires.
- * @param odometer -Performs an ad-hoc request for Odometer data in km.
- * @param beltStatus -Performs an ad-hoc request for status of the seat belts.
- * @param bodyInformation -Performs an ad-hoc request for body information including power modes.
- * @param deviceStatus -Performs an ad-hoc request for device status including signal and battery strength.
- * @param driverBraking -Performs an ad-hoc request for the status of the brake pedal.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void getvehicledata(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
- boolean instantFuelConsumption, boolean externalTemperature, boolean vin, boolean prndl, boolean tirePressure,
- boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
- boolean driverBraking, Integer correlationID) throws SmartDeviceLinkException
- {
-
- GetVehicleData msg = RPCRequestFactory.BuildGetVehicleData(gps, speed, rpm, fuelLevel, fuelLevel_State, instantFuelConsumption, externalTemperature, vin, prndl, tirePressure, odometer,
- beltStatus, bodyInformation, deviceStatus, driverBraking, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Non periodic vehicle data read request
- * Responses are captured through callback on IProxyListener.
- *
- * @param ecuName -Name of ECU.
- * @param didLocation -Raw data from vehicle data DID location(s)
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
-
- public void readdid(Integer ecuName, Vector<Integer> didLocation, Integer correlationID) throws SmartDeviceLinkException
- {
- ReadDID msg = RPCRequestFactory.BuildReadDID(ecuName, didLocation, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Vehicle module diagnostic trouble code request.
- * Responses are captured through callback on IProxyListener.
- *
- * @param ecuName -Name of ECU.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void getdtcs(Integer ecuName, Integer correlationID) throws SmartDeviceLinkException
- {
- GetDTCs msg = RPCRequestFactory.BuildGetDTCs(ecuName, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Creates a full screen overlay containing a large block of formatted text that can be scrolled with up to 8 SoftButtons defined.
- * Responses are captured through callback on IProxyListener.
- *
- * @param scrollableMessageBody -Body of text that can include newlines and tabs.
- * @param timeout -App defined timeout. Indicates how long of a timeout from the last action.
- * @param softButtons -App defined SoftButtons.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void scrollablemessage(String scrollableMessageBody, Integer timeout, Vector<SoftButton> softButtons, Integer correlationID) throws SmartDeviceLinkException
- {
- ScrollableMessage msg = RPCRequestFactory.BuildScrollableMessage(scrollableMessageBody, timeout, softButtons, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.
- * Responses are captured through callback on IProxyListener.
- *
- * @param numTicks -Number of selectable items on a horizontal axis.
- * @param position -Initial position of slider control (cannot exceed numTicks).
- * @param sliderHeader -Text header to display.
- * @param sliderFooter - Text footer to display (meant to display min/max threshold descriptors).
- * @param timeout -App defined timeout. Indicates how long of a timeout from the last action.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void slider(Integer numTicks, Integer position, String sliderHeader, Vector<String> sliderFooter, Integer timeout, Integer correlationID) throws SmartDeviceLinkException
- {
- Slider msg = RPCRequestFactory.BuildSlider(numTicks, position, sliderHeader, sliderFooter, timeout, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Responses are captured through callback on IProxyListener.
- *
- * @param navigationText1
- * @param navigationText2
- * @param eta
- * @param totalDistance
- * @param turnIcon
- * @param distanceToManeuver
- * @param distanceToManeuverScale
- * @param maneuverComplete
- * @param softButtons
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void showconstanttbt(String navigationText1, String navigationText2, String eta, String totalDistance, Image turnIcon, Double distanceToManeuver,
- Double distanceToManeuverScale, boolean maneuverComplete, Vector <SoftButton> softButtons, Integer correlationID) throws SmartDeviceLinkException
- {
- ShowConstantTBT msg = RPCRequestFactory.BuildShowConstantTBT(navigationText1, navigationText2, eta, totalDistance, turnIcon, distanceToManeuver,
- distanceToManeuverScale, maneuverComplete, softButtons, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Responses are captured through callback on IProxyListener.
- *
- * @param ttsText
- * @param softButtons
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void alertmaneuver(String ttsText, Vector<SoftButton> softButtons, Integer correlationID) throws SmartDeviceLinkException
- {
- AlertManeuver msg = RPCRequestFactory.BuildAlertManeuver(ttsText, softButtons, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Responses are captured through callback on IProxyListener.
- *
- * @param turnList
- * @param softButtons
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void updateturnlist(Vector<Turn> turnList, Vector<SoftButton> softButtons, Integer correlationID) throws SmartDeviceLinkException
- {
- UpdateTurnList msg = RPCRequestFactory.BuildUpdateTurnList(turnList, softButtons, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Responses are captured through callback on IProxyListener.
- *
- * @param language
- * @param hmiDisplayLanguage
- * @param correlationID
- * @throws SmartDeviceLinkException
- */
- public void changeregistration(Language language, Language hmiDisplayLanguage, Integer correlationID) throws SmartDeviceLinkException
- {
- ChangeRegistration msg = RPCRequestFactory.BuildChangeRegistration(language, hmiDisplayLanguage, correlationID);
- sendRPCRequest(msg);
- }
-
-
- /**
- * Used to push a binary data onto the SMARTDEVICELINK module from a mobile device, such as icons and album art. Not supported on first generation SMARTDEVICELINK vehicles.
- * Responses are captured through callback on IProxyListener.
- *
- * @param smartDeviceLinkFileName -File reference name.
- * @param fileType -Selected file type.
- * @param persistentFile -Indicates if the file is meant to persist between sessions / ignition cycles.
- * @param fileData
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void putfile(String smartDeviceLinkFileName, FileType fileType, Boolean persistentFile, byte[] fileData, Integer correlationID) throws SmartDeviceLinkException
- {
- PutFile msg = RPCRequestFactory.buildPutFile(smartDeviceLinkFileName, fileType, persistentFile, fileData, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Used to delete a file resident on the SMARTDEVICELINK module in the app's local cache. Not supported on first generation SMARTDEVICELINK vehicles.
- * Responses are captured through callback on IProxyListener.
- *
- * @param smartDeviceLinkFileName -File reference name.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void deletefile(String smartDeviceLinkFileName, Integer correlationID) throws SmartDeviceLinkException
- {
- DeleteFile msg = RPCRequestFactory.buildDeleteFile(smartDeviceLinkFileName, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Requests the current list of resident filenames for the registered app. Not supported on first generation SMARTDEVICELINK vehicles.
- * Responses are captured through callback on IProxyListener.
- *
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void listfiles(Integer correlationID) throws SmartDeviceLinkException
- {
- ListFiles msg = RPCRequestFactory.buildListFiles(correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Used to set existing local file on SMARTDEVICELINK as the app's icon. Not supported on first generation SMARTDEVICELINK vehicles.
- * Responses are captured through callback on IProxyListener.
- *
- * @param smartDeviceLinkFileName -File reference name.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void setappicon(String smartDeviceLinkFileName, Integer correlationID) throws SmartDeviceLinkException
- {
- SetAppIcon msg = RPCRequestFactory.buildSetAppIcon(smartDeviceLinkFileName, correlationID);
- sendRPCRequest(msg);
- }
-
- /**
- * Set an alternate display layout. If not sent, default screen for given platform will be shown.
- * Responses are captured through callback on IProxyListener.
- *
- * @param displayLayout -Predefined or dynamically created screen layout.
- * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
- * @throws SmartDeviceLinkException
- */
- public void setdisplaylayout(String displayLayout, Integer correlationID) throws SmartDeviceLinkException
- {
- SetDisplayLayout msg = RPCRequestFactory.BuildSetDisplayLayout(displayLayout, correlationID);
- sendRPCRequest(msg);
- }
-
- /******************** END Public Helper Methods *************************/
-
- /**
- * Gets type of transport currently used by this SmartDeviceLinkProxy.
- *
- * @return One of TransportType enumeration values.
- *
- * @see TransportType
- */
- public TransportType getCurrentTransportType() throws IllegalStateException {
- if (_smartDeviceLinkConnection == null) {
- throw new IllegalStateException("Incorrect state of SmartDeviceLinkProxyBase: Calling for getCurrentTransportType() while connection is not initialized");
- }
-
- return _smartDeviceLinkConnection.getCurrentTransportType();
- }
-
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyConfigurationResources.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyConfigurationResources.java
deleted file mode 100755
index 12396639c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyConfigurationResources.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import android.telephony.TelephonyManager;
-
-public class SmartDeviceLinkProxyConfigurationResources {
- private String _smartDeviceLinkConfigurationFilePath;
- private TelephonyManager _telephonyManager;
-
- public SmartDeviceLinkProxyConfigurationResources() {
- this(null, null);
- }
-
- public SmartDeviceLinkProxyConfigurationResources(String smartDeviceLinkConfigurationFilePath,
- TelephonyManager telephonyManager) {
- _smartDeviceLinkConfigurationFilePath = smartDeviceLinkConfigurationFilePath;
- _telephonyManager = telephonyManager;
- }
-
- public void setSmartDeviceLinkConfigurationFilePath(String smartDeviceLinkConfigurationFilePath) {
- _smartDeviceLinkConfigurationFilePath = smartDeviceLinkConfigurationFilePath;
- }
-
- public String getSmartDeviceLinkConfigurationFilePath() {
- return _smartDeviceLinkConfigurationFilePath;
- }
-
- public void setTelephonyManager(TelephonyManager telephonyManager) {
- _telephonyManager = telephonyManager;
- }
-
- public TelephonyManager getTelephonyManager() {
- return _telephonyManager;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyFactory.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyFactory.java
deleted file mode 100755
index 10b7eaf8c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/SmartDeviceLinkProxyFactory.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-@Deprecated
-public class SmartDeviceLinkProxyFactory {
-
- @Deprecated
- public static SmartDeviceLinkProxy buildSmartDeviceLinkProxy(IProxyListener listener) {
- SmartDeviceLinkProxy ret = null;
- try {
- ret = new SmartDeviceLinkProxy(listener);
- } catch (SmartDeviceLinkException e) {
- e.printStackTrace();
- }
- return ret;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/TTSChunkFactory.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/TTSChunkFactory.java
deleted file mode 100755
index b8b847261..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/TTSChunkFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.smartdevicelink.proxy;
-
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.rpc.TTSChunk;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-
-public class TTSChunkFactory {
-
- public static TTSChunk createChunk(SpeechCapabilities type, String text) {
- TTSChunk ret = new TTSChunk();
- ret.setType(type);
- ret.setText(text);
- return ret;
- }
-
- public static Vector<TTSChunk> createSimpleTTSChunks(String simple) {
- if (simple == null) {
- return null;
- }
-
- Vector<TTSChunk> chunks = new Vector<TTSChunk>();
-
- TTSChunk chunk = createChunk(SpeechCapabilities.TEXT, simple);
- chunks.add(chunk);
- return chunks;
- }
-
- public static Vector<TTSChunk> createPrerecordedTTSChunks(String prerecorded) {
- if (prerecorded == null) {
- return null;
- }
-
- Vector<TTSChunk> chunks = new Vector<TTSChunk>();
- TTSChunk chunk = createChunk(SpeechCapabilities.PRE_RECORDED, prerecorded);
- chunks.add(chunk);
- return chunks;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/Version.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/Version.java
deleted file mode 100755
index 214792f85..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/Version.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.smartdevicelink.proxy;
-
-public class Version {
- public static final String VERSION = "VERSION-INFO";
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java
deleted file mode 100755
index f0638deb9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.proxy.callbacks;
-
-public class InternalProxyMessage {
- private String _functionName;
-
- public InternalProxyMessage(String functionName) {
- //this(functionName, null, null);
- this._functionName = functionName;
- }
-
- public String getFunctionName() {
- return _functionName;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnError.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnError.java
deleted file mode 100755
index 38696e29d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnError.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.smartdevicelink.proxy.callbacks;
-
-import com.smartdevicelink.proxy.constants.Names;
-
-public class OnError extends InternalProxyMessage {
-
- private String _info;
- private Exception _e;
-
- public OnError() {
- super(Names.OnProxyError);
- }
-
- public OnError(String info, Exception e) {
- super(Names.OnProxyError);
- this._info = info;
- this._e = e;
- }
-
- public String getInfo() {
- return _info;
- }
-
- public Exception getException() {
- return _e;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java
deleted file mode 100755
index 323b74a19..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.smartdevicelink.proxy.callbacks;
-
-import com.smartdevicelink.proxy.constants.Names;
-
-public class OnProxyClosed extends InternalProxyMessage {
-
- private String _info;
- private Exception _e;
-
- public OnProxyClosed() {
- super(Names.OnProxyClosed);
- }
-
- public OnProxyClosed(String info, Exception e) {
- super(Names.OnProxyClosed);
- this._info = info;
- this._e = e;
- }
-
- public String getInfo() {
- return _info;
- }
-
- public Exception getException() {
- return _e;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java
deleted file mode 100755
index 6d2131681..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.smartdevicelink.proxy.callbacks;
-
-import com.smartdevicelink.proxy.constants.Names;
-
-public class OnProxyOpened extends InternalProxyMessage {
-
- public OnProxyOpened() {
- super(Names.OnProxyOpened);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Jingles.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Jingles.java
deleted file mode 100755
index 0ea371b62..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Jingles.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.proxy.constants;
-
-public class Jingles {
- public static final String POSITIVE_JINGLE = "POSITIVE_JINGLE";
-
- public static final String NEGATIVE_JINGLE = "NEGATIVE_JINGLE";
-
- public static final String INITIAL_JINGLE = "INITIAL_JINGLE";
-
- public static final String LISTEN_JINGLE = "LISTEN_JINGLE";
-
- public static final String HELP_JINGLE = "HELP_JINGLE";
-
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Names.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Names.java
deleted file mode 100755
index cf594a3df..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/constants/Names.java
+++ /dev/null
@@ -1,408 +0,0 @@
-package com.smartdevicelink.proxy.constants;
-
-import java.lang.reflect.Field;
-import java.util.Hashtable;
-
-public class Names {
- public static final String request = "request";
- public static final String response = "response";
- public static final String notification = "notification";
- public static final String function_name = "name";
- public static final String parameters = "parameters";
- public static final String bulkData = "bulkData";
-
- public static final String RegisterAppInterface = "RegisterAppInterface";
- public static final String UnregisterAppInterface = "UnregisterAppInterface";
- public static final String Alert = "Alert";
- public static final String Show = "Show";
- public static final String Speak = "Speak";
- public static final String AddCommand = "AddCommand";
- public static final String DeleteCommand = "DeleteCommand";
- public static final String AddSubMenu = "AddSubMenu";
- public static final String DeleteSubMenu = "DeleteSubMenu";
- public static final String CreateInteractionChoiceSet = "CreateInteractionChoiceSet";
- public static final String DeleteInteractionChoiceSet = "DeleteInteractionChoiceSet";
- public static final String PerformInteraction = "PerformInteraction";
- public static final String DialNumber = "DialNumber";
- public static final String EncodedSyncPData = "EncodedSyncPData";
- public static final String SyncPData = "SyncPData";
- public static final String SubscribeButton = "SubscribeButton";
- public static final String UnsubscribeButton = "UnsubscribeButton";
- public static final String SubscribeVehicleData = "SubscribeVehicleData";
- public static final String UnsubscribeVehicleData = "UnsubscribeVehicleData";
- public static final String SetMediaClockTimer = "SetMediaClockTimer";
- public static final String SetGlobalProperties = "SetGlobalProperties";
- public static final String GenericResponse = "GenericResponse";
- public static final String ScrollableMessage = "ScrollableMessage";
- public static final String GetDID = "GetDID";
- public static final String GetDTCs = "GetDTCs";
- public static final String ReadDID = "ReadDID";
- public static final String OnVehicleData = "OnVehicleData";
- public static final String GetFile = "GetFile";
- public static final String PutFile = "PutFile";
- public static final String DeleteFile = "DeleteFile";
- public static final String ListFiles = "ListFiles";
- public static final String EndAudioCapture = "EndAudioCapture";
- public static final String GetVehicleData = "GetVehicleData";
- public static final String ResetGlobalProperties = "ResetGlobalProperties";
- public static final String PerformAudioCapture = "PerformAudioCapture";
- public static final String SetAppIcon = "SetAppIcon";
- public static final String ChangeRegistration = "ChangeRegistration";
- public static final String SetDisplayLayout = "SetDisplayLayout";
- public static final String OnLanguageChange = "OnLanguageChange";
- public static final String hmiDisplayLanguage = "hmiDisplayLanguage";
- public static final String displayLayout = "displayLayout";
- public static final String ttsName = "ttsName";
- public static final String hmiDisplayLanguageDesired = "hmiDisplayLanguageDesired";
- public static final String appHMIType = "appHMIType";
- public static final String appID = "appID";
- public static final String vrHelpTitle = "vrHelpTitle";
- public static final String graphic = "graphic";
- public static final String customPresets = "customPresets";
- public static final String softButtonCapabilities = "softButtonCapabilities";
- public static final String presetBankCapabilities = "presetBankCapabilities";
- public static final String vehicleType = "vehicleType";
- public static final String make = "make";
- public static final String model = "model";
- public static final String modelYear = "modelYear";
- public static final String trim = "trim";
- public static final String allowed = "allowed";
- public static final String userDisallowed = "userDisallowed";
- public static final String rpcName = "rpcName";
- public static final String hmiPermissions = "hmiPermissions";
- public static final String parameterPermissions = "parameterPermissions";
- public static final String permissionItem = "permissionItem";
- public static final String numTicks = "numTicks";
- public static final String sliderHeader = "sliderHeader";
- public static final String sliderFooter = "sliderFooter";
- public static final String PerformAudioPassThru = "PerformAudioPassThru";
- public static final String PerformAudioPassThruResponse = "PerformAudioPassThruResponse";
- public static final String EndAudioPassThru = "EndAudioPassThru";
- public static final String EndAudioPassThruResponse = "EndAudioPassThruResponse";
- public static final String OnAudioPassThru = "OnAudioPassThru";
- public static final String ShowConstantTBT = "ShowConstantTBT";
- public static final String AlertManeuver = "AlertManeuver";
- public static final String UpdateTurnList = "UpdateTurnList";
-
- public static final String OnCommand = "OnCommand";
- public static final String OnDataPublished = "OnDataPublished";
- public static final String OnButtonPress = "OnButtonPress";
- public static final String OnButtonEvent = "OnButtonEvent";
- public static final String OnHMIStatus = "OnHMIStatus";
- public static final String OnTBTClientState = "OnTBTClientState";
- public static final String OnEncodedSyncPData = "OnEncodedSyncPData";
- public static final String onEncodedSyncPDataResponse = "onEncodedSyncPDataResponse";
- public static final String OnSyncPData = "OnSyncPData";
- public static final String onOnSyncPData = "onOnSyncPData";
- public static final String onSyncPDataResponse = "onSyncPDataResponse";
- public static final String onOnEncodedSyncPData = "onOnEncodedSyncPData";
- public static final String OnDriverDistraction = "OnDriverDistraction";
- public static final String OnAppInterfaceUnregistered = "OnAppInterfaceUnregistered";
- public static final String OnProxyClosed = "OnProxyClosed";
- public static final String OnProxyError = "OnProxyError";
- public static final String OnProxyOpened = "OnProxyOpened";
- public static final String OnProxyUnusable = "OnProxyUnusable";
- public static final String OnHMILevelChange = "OnHMILevelChange";
- public static final String OnSmartDeviceLinkChoiceChosen = "OnSmartDeviceLinkChoiceChosen";
- public static final String OnPermissionsChange = "OnPermissionsChange";
- public static final String OnScreenPresetsAvailable = "OnScreenPresetsAvailable";
- public static final String isHighlighted = "isHighlighted";
- public static final String softButtonID = "softButtonID";
- public static final String fileType = "fileType";
- public static final String persistentFile = "persistentFile";
- public static final String spaceAvailable = "spaceAvailable";
- public static final String filenames = "filenames";
- public static final String cmdIcon = "cmdIcon";
- public static final String Slider = "Slider";
- public static final String sliderPosition = "sliderPosition";
- public static final String samplingRate = "samplingRate";
- public static final String audioType = "audioType";
- public static final String satRadioESN = "satRadioESN";
- public static final String dtc = "dtc";
- public static final String tryAgainTime = "tryAgainTime";
-
- public static final String success = "success";
- public static final String resultCode = "resultCode";
- public static final String info = "info";
-
- public static final String fordURL = "fordURL";
- public static final String payload = "payload";
- public static final String reason = "reason";
- public static final String state = "state";
- public static final String cmdID = "cmdID";
- public static final String menuParams = "menuParams";
- public static final String parentID = "parentID";
- public static final String position = "position";
- public static final String menuName = "menuName";
- public static final String vrCommands = "vrCommands";
- public static final String language = "language";
- public static final String languageDesired = "languageDesired";
- public static final String triggerSource = "triggerSource";
- public static final String subscriptionType = "subscriptionType";
- public static final String data = "data";
- public static final String correlationID = "correlationID";
- public static final String smartDeviceLinkMsgVersion = "syncMsgVersion";
- public static final String majorVersion = "majorVersion";
- public static final String minorVersion = "minorVersion";
- public static final String appName = "appName";
- public static final String ngnMediaScreenAppName = "ngnMediaScreenAppName";
- public static final String isMediaApplication = "isMediaApplication";
- public static final String vrSynonyms = "vrSynonyms";
- public static final String usesVehicleData = "usesVehicleData";
- public static final String text = "text";
- public static final String type = "type";
- public static final String ttsChunks = "ttsChunks";
- public static final String playTone = "playTone";
- public static final String duration = "duration";
- public static final String mainField1 = "mainField1";
- public static final String mainField2 = "mainField2";
- public static final String mainField3 = "mainField3";
- public static final String mainField4 = "mainField4";
- public static final String statusBar = "statusBar";
- public static final String name = "name";
- public static final String menuID = "menuID";
- public static final String longPress = "longPress";
- public static final String shortPress = "shortPress";
- public static final String buttonName = "buttonName";
- public static final String buttonPressMode = "buttonPressMode";
- public static final String buttonEventMode = "buttonEventMode";
- public static final String minutes = "minutes";
- public static final String seconds = "seconds";
- public static final String startTime = "startTime";
- public static final String updateMode = "updateMode";
- public static final String mediaClock = "mediaClock";
- public static final String initialText = "initialText";
- public static final String initialPrompt = "initialPrompt";
- public static final String helpPrompt = "helpPrompt";
- public static final String timeoutPrompt = "timeoutPrompt";
- public static final String timeout = "timeout";
- public static final String choiceSet = "choiceSet";
- public static final String interactionMode = "interactionMode";
- public static final String result = "result";
- public static final String alertText1 = "alertText1";
- public static final String alertText2 = "alertText2";
- public static final String alertText3 = "alertText3";
- public static final String shortPressAvailable = "shortPressAvailable";
- public static final String longPressAvailable = "longPressAvailable";
- public static final String upDownAvailable = "upDownAvailable";
- public static final String width = "width";
- public static final String height = "height";
- public static final String characterSet = "characterSet";
- public static final String displayType = "displayType";
- public static final String mediaClockFormats = "mediaClockFormats";
- public static final String textFields = "textFields";
- public static final String autoActivateID = "autoActivateID";
- public static final String vehicleDataCapabilities = "vehicleDataCapabilities";
- public static final String speechCapabilities = "speechCapabilities";
- public static final String vrCapabilities = "vrCapabilities";
- public static final String audioPassThruCapabilities = "audioPassThruCapabilities";
- public static final String buttonCapabilities = "buttonCapabilities";
- public static final String displayCapabilities = "displayCapabilities";
- public static final String hmiZoneCapabilities = "hmiZoneCapabilities";
- public static final String interactionChoiceSetID = "interactionChoiceSetID";
- public static final String interactionChoiceSetIDList = "interactionChoiceSetIDList";
- public static final String audioFileName = "audioFileName";
- public static final String gpsPositionValid = "gpsPositionValid";
- public static final String longitudeDegrees = "longitudeDegrees";
- public static final String latitudeDegrees = "latitudeDegrees";
- public static final String utcYear = "utcYear";
- public static final String utcMonth = "utcMonth";
- public static final String utcDay = "utcDay";
- public static final String utcHours = "utcHours";
- public static final String utcMinutes = "utcMinutes";
- public static final String utcSeconds = "utcSeconds";
- public static final String compassDirection = "compassDirection";
- public static final String pdop = "pdop";
- public static final String vdop = "vdop";
- public static final String hdop = "hdop";
- public static final String actual = "actual";
- public static final String satellites = "satellites";
- public static final String dimension = "dimension";
- public static final String altitude = "altitude";
- public static final String heading = "heading";
- public static final String speed = "speed";
- public static final String number = "number";
- public static final String smartDeviceLinkFileName = "syncFileName";
- public static final String localFileName = "localFileName";
- public static final String maxDuration = "maxDuration";
- public static final String timerMode = "timerMode";
- public static final String status = "status";
- public static final String pressure = "pressure";
- public static final String hours = "hours";
- public static final String rows = "rows";
- public static final String pressureTellTale = "pressureTellTale";
- public static final String leftFront = "leftFront";
- public static final String rightFront = "rightFront";
- public static final String leftRear = "leftRear";
- public static final String rightRear = "rightRear";
- public static final String innerLeftRear = "innerLeftRear";
- public static final String innerRightRear = "innerRightRear";
- public static final String VehicleData = "VehicleData";
- public static final String alignment = "alignment";
- public static final String mediaTrack = "mediaTrack";
- public static final String properties = "properties";
- public static final String choiceID = "choiceID";
- public static final String bitsPerSample = "bitsPerSample";
- public static final String hmiLevel = "hmiLevel";
- public static final String audioStreamingState = "audioStreamingState";
- public static final String systemContext = "systemContext";
- public static final String smartDeviceLinkChoice = "smartDeviceLinkChoice";
- public static final String smartDeviceLinkCommand = "smartDeviceLinkCommand";
- public static final String URL = "URL";
- public static final String Timeout = "Timeout";
- public static final String PermissionGroupName = "PermissionGroupName";
- public static final String PermissionGroupStatus = "PermissionGroupStatus";
- public static final String PermissionGroupItems = "PermissionGroupItems";
- public static final String audioPacket = "audioPacket";
- public static final String audioPassThruDisplayText1 = "audioPassThruDisplayText1";
- public static final String audioPassThruDisplayText2 = "audioPassThruDisplayText2";
- public static final String bitRate = "bitRate";
- public static final String rpm = "rpm";
- public static final String fuelLevel = "fuelLevel";
- public static final String avgFuelEconomy = "avgFuelEconomy";
- public static final String batteryVoltage = "batteryVoltage";
- public static final String externalTemperature = "externalTemperature";
- public static final String vin = "vin";
- public static final String prndl = "prndl";
- public static final String tirePressure = "tirePressure";
- public static final String batteryPackVoltage = "batteryPackVoltage";
- public static final String batteryPackCurrent = "batteryPackCurrent";
- public static final String batteryPackTemperature = "batteryPackTemperature";
- public static final String engineTorque = "engineTorque";
- public static final String odometer = "odometer";
- public static final String tripOdometer = "tripOdometer";
- public static final String genericbinary = "genericbinary";
- public static final String GPSData = "GPSData";
- public static final String gps = "gps";
- public static final String fuelLevel_State = "fuelLevel_State";
- public static final String instantFuelConsumption = "instantFuelConsumption";
- public static final String beltStatus = "beltStatus";
- public static final String bodyInformation = "bodyInformation";
- public static final String deviceStatus = "deviceStatus";
- public static final String driverBraking = "driverBraking";
- public static final String wiperStatus = "wiperStatus";
- public static final String fuelEconomy = "fuelEconomy";
- public static final String engineOilLife = "engineOilLife";
- public static final String headLampStatus = "headLampStatus";
- public static final String brakeTorque = "brakeTorque";
- public static final String turboBoost = "turboBoost";
- public static final String coolantTemp = "coolantTemp";
- public static final String airFuelRatio = "airFuelRatio";
- public static final String coolingHeadTemp = "coolingHeadTemp";
- public static final String oilTemp = "oilTemp";
- public static final String intakeAirTemp = "intakeAirTemp";
- public static final String gearShiftAdvice = "gearShiftAdvice";
- public static final String acceleration = "acceleration";
- public static final String accPedalPosition = "accPedalPosition";
- public static final String clutchPedalPosition = "clutchPedalPosition";
- public static final String reverseGearStatus = "reverseGearStatus";
- public static final String accTorque = "accTorque";
- public static final String evInfo = "evInfo";
- public static final String ambientLightStatus = "ambientLightStatus";
- public static final String dataType = "dataType";
- public static final String identifier = "identifier";
- public static final String statusByte = "statusByte";
- public static final String didResult = "didResult";
- public static final String ecuName = "ecuName";
- public static final String didLocation = "didLocation";
- public static final String value = "value";
- public static final String softButtonName = "softButtonName";
- public static final String imageSupported = "imageSupported";
- public static final String systemAction = "systemAction";
- public static final String image = "image";
- public static final String imageType = "imageType";
- public static final String fileData = "fileData";
- public static final String scrollableMessageBody = "scrollableMessageBody";
- public static final String softButtons = "softButtons";
- public static final String customButtonID = "customButtonID";
- public static final String vrHelp = "vrHelp";
- public static final String customButtonName = "customButtonName";
- public static final String navigationText = "navigationText";
- public static final String turnIcon = "turnIcon";
- public static final String navigationText1 = "navigationText1";
- public static final String navigationText2 = "navigationText2";
- public static final String eta = "eta";
- public static final String totalDistance = "totalDistance";
- public static final String distanceToManeuver = "distanceToManeuver";
- public static final String distanceToManeuverScale = "distanceToManeuverScale";
- public static final String maneuverComplete = "maneuverComplete";
- public static final String turnList = "turnList";
-
- public static final String driverBeltDeployed = "driverBeltDeployed";
- public static final String passengerBeltDeployed = "passengerBeltDeployed";
- public static final String passengerBuckleBelted = "passengerBuckleBelted";
- public static final String driverBuckleBelted = "driverBuckleBelted";
- public static final String leftRow2BuckleBelted = "leftRow2BuckleBelted";
- public static final String passengerChildDetected = "passengerChildDetected";
- public static final String rightRow2BuckleBelted = "rightRow2BuckleBelted";
- public static final String middleRow2BuckleBelted = "middleRow2BuckleBelted";
- public static final String middleRow3BuckleBelted = "middleRow3BuckleBelted";
- public static final String leftRow3BuckleBelted = "leftRow3BuckleBelted";
- public static final String rightRow3BuckleBelted = "rightRow3BuckleBelted";
- public static final String rearInflatableBelted = "rearInflatableBelted";
- public static final String leftRearInflatableBelted = "leftRearInflatableBelted";
- public static final String rightRearInflatableBelted = "rightRearInflatableBelted";
- public static final String middleRow1BeltDeployed = "middleRow1BeltDeployed";
- public static final String middleRow1BuckleBelted = "middleRow1BuckleBelted";
-
- public static final String graphicSupported = "graphicSupported";
- public static final String muteAudio = "muteAudio";
- public static final String parkBrakeActive = "parkBrakeActive";
- public static final String ignitionStableStatus = "ignitionStableStatus";
- public static final String ignitionStatus = "ignitionStatus";
-
- public static final String voiceRecOn = "voiceRecOn";
- public static final String btIconOn = "btIconOn";
- public static final String callActive = "callActive";
- public static final String phoneRoaming = "phoneRoaming";
- public static final String textMsgAvailable = "textMsgAvailable";
- public static final String battLevelStatus = "battLevelStatus";
- public static final String stereoAudioOutputMuted = "stereoAudioOutputMuted";
- public static final String monoAudioOutputMuted = "monoAudioOutputMuted";
- public static final String signalLevelStatus = "signalLevelStatus";
- public static final String primaryAudioSource = "primaryAudioSource";
- public static final String eCallEventActive = "eCallEventActive";
-
- public static final String fuelEconomySinceLastReset = "fuelEconomySinceLastReset";
- public static final String currentTripFuelEconomy = "currentTripFuelEconomy";
- public static final String averageTripFuelEconomy = "averageTripFuelEconomy";
- public static final String currentCycleFuelEconomy = "currentCycleFuelEconomy";
-
- public static final String lightSwitchStatus = "lightSwitchStatus";
- public static final String highBeamsOn = "highBeamsOn";
-
- public static final String electricFuelConsumption = "electricFuelConsumption";
- public static final String stateOfCharge = "stateOfCharge";
- public static final String fuelMaintenanceMode = "fuelMaintenanceMode";
- public static final String distanceToEmpty = "distanceToEmpty";
-
- public static final String dtcMask = "dtcMask";
-
- public static final String GetVehicleDataExtend = "com.smartdevicelink.proxy.extend.rpc.GetVehicleDataResponseExtend";
- public static final String SubscribeVehicleDataExtend = "com.smartdevicelink.proxy.extend.rpc.SubscribeVehicleDataResponseExtend";
- public static final String UnsubscribeVehicleDataExtend = "com.smartdevicelink.proxy.extend.rpc.UnsubscribeVehicleDataResponseExtend";
- public static final String OnVehicleDataExtend = "com.smartdevicelink.proxy.extend.rpc.OnVehicleDataExtend";
- public static final String VersionExtend = "com.smartdevicelink.proxy.extend.proxy.VersionExtend";
- public static final String ListenerExtend = "com.smartdevicelink.proxy.extend.interfaces.IProxyListenerExtend";
-
- public static final Hashtable<String, Object> getNamesList()
- {
- Hashtable <String, Object> returnHash = new Hashtable<String, Object>();
- for (Field field : Names.class.getDeclaredFields())
- {
- String sName = field.getName();
- try {
- Object oValue = field.get(sName);
- returnHash.put(sName, oValue);
-
- } catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return returnHash;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java
deleted file mode 100755
index 7ba574ffd..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.smartdevicelink.proxy.interfaces;
-
-public interface IProxyListenerALM extends IProxyListenerBase {
- // Adds Advanced Life-cycle Management call-backs to the IProxyListenerAbstract interface
-
- /**
- * **MOVED TO IProxyListenerBase** - onOnHMIStatus() being called indicates that the proxy has entered a state in which the
- * application may create SMARTDEVICELINK related resources (addCommands, ChoiceSets).
- */
- //public void onOnHMIStatus(OnHMIStatus notification);
-
- /**
- * **MOVED TO IProxyListenerBase** - onProxyClosed() being called indicates that the app is no longer registered with SMARTDEVICELINK
- * All resources on SMARTDEVICELINK (addCommands and ChoiceSets) have been deleted and will have to be
- * recreated upon the next onReadyForInitialization() call-back.
- */
- //public void onProxyClosed(String info, Exception e);
-
- /**
- * **MOVED TO IProxyListenerBase** - onError() being called indicates that the proxy has experienced an unrecoverable error.
- * A new proxy object must be initiated to reestablish connection with SMARTDEVICELINK.
- *
- * @param info - Any info present about the error that occurred.
- * @param e - Any exception thrown by the error.
- */
- //public void onError(String info, Exception e);
-
- /**
- * **Deprecated** - onSmartDeviceLinkInterfaceAvailable() being called indicates that the proxy now has access to SMARTDEVICELINK's HMI.
- * Monitor the onFocusChange call-back to determine which level of HMI is available to the proxy.
- *
- * @param isFirstAvailability - Indicates this is the first onSmartDeviceLinkInterfaceAvailable in this lifecycle.
- */
- // HMI (Background, Limited, Full) from Unavailable = onSmartDeviceLinkInterfaceAvailable(Boolean isFirstAvailability);
-
- /**
- * **Deprecated** - onSmartDeviceLinkInterfaceUnavailable() being called indicates that the proxy does NOT have access to SMARTDEVICELINK's HIM.
- */
- // HMI None onSmartDeviceLinkInterfaceUnavailable();
-
- /**
- * **Deprecated** - ALM HMI states converted back to HMI Levels
- *
- * HMI Full = onSmartDeviceLinkInFocus(Boolean isFirstSmartDeviceLinkInFocus);
- * HMI Limited = onSmartDeviceLinkInFocusLimited();
- * HMI Background = onSmartDeviceLinkLostFocus();
- */
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
deleted file mode 100755
index 2be639c07..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
+++ /dev/null
@@ -1,291 +0,0 @@
-package com.smartdevicelink.proxy.interfaces;
-
-import com.smartdevicelink.proxy.rpc.AddCommandResponse;
-import com.smartdevicelink.proxy.rpc.AddSubMenuResponse;
-import com.smartdevicelink.proxy.rpc.AlertManeuverResponse;
-import com.smartdevicelink.proxy.rpc.AlertResponse;
-import com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse;
-import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse;
-import com.smartdevicelink.proxy.rpc.DeleteCommandResponse;
-import com.smartdevicelink.proxy.rpc.DeleteFileResponse;
-import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse;
-import com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse;
-import com.smartdevicelink.proxy.rpc.DialNumberResponse;
-import com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse;
-import com.smartdevicelink.proxy.rpc.GenericResponse;
-import com.smartdevicelink.proxy.rpc.GetDTCsResponse;
-import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.ListFilesResponse;
-import com.smartdevicelink.proxy.rpc.OnAudioPassThru;
-import com.smartdevicelink.proxy.rpc.OnButtonEvent;
-import com.smartdevicelink.proxy.rpc.OnButtonPress;
-import com.smartdevicelink.proxy.rpc.OnCommand;
-import com.smartdevicelink.proxy.rpc.OnDriverDistraction;
-import com.smartdevicelink.proxy.rpc.OnHMIStatus;
-import com.smartdevicelink.proxy.rpc.OnLanguageChange;
-import com.smartdevicelink.proxy.rpc.OnPermissionsChange;
-import com.smartdevicelink.proxy.rpc.OnTBTClientState;
-import com.smartdevicelink.proxy.rpc.OnVehicleData;
-import com.smartdevicelink.proxy.rpc.PerformAudioPassThruResponse;
-import com.smartdevicelink.proxy.rpc.PerformInteractionResponse;
-import com.smartdevicelink.proxy.rpc.PutFileResponse;
-import com.smartdevicelink.proxy.rpc.ReadDIDResponse;
-import com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse;
-import com.smartdevicelink.proxy.rpc.ScrollableMessageResponse;
-import com.smartdevicelink.proxy.rpc.SetAppIconResponse;
-import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse;
-import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse;
-import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse;
-import com.smartdevicelink.proxy.rpc.ShowConstantTBTResponse;
-import com.smartdevicelink.proxy.rpc.ShowResponse;
-import com.smartdevicelink.proxy.rpc.SliderResponse;
-import com.smartdevicelink.proxy.rpc.SpeakResponse;
-import com.smartdevicelink.proxy.rpc.SubscribeButtonResponse;
-import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.UnsubscribeButtonResponse;
-import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse;
-import com.smartdevicelink.proxy.rpc.UpdateTurnListResponse;
-
-
-public interface IProxyListenerBase {
-
- /**
- * onOnHMIStatus being called indicates that there has been an HMI Level change,
- * system context change or audio streaming state change.
- *
- * @param notification - Contains information about the HMI Level,
- * system context and audio streaming state.
- */
- public void onOnHMIStatus(OnHMIStatus notification);
-
- /**
- * onProxyClosed has different functionality for the different models.
- * In the non-ALM model this indicates that the proxy has experienced an unrecoverable error.
- * A new proxy object must be initiated to reestablish connection with SMARTDEVICELINK.
- * In the ALM model this indicates that the app is no longer registered with SMARTDEVICELINK
- * All resources on SMARTDEVICELINK (addCommands and ChoiceSets) have been deleted and will have to be
- * recreated upon the next onReadyForInitialization() call-back.
- *
- * @param info - Includes information about the reason the proxy has been closed.
- * @param e - The exception that occurred.
- */
- public void onProxyClosed(String info, Exception e);
-
- /**
- * onProxyError() being called indicates that the SMARTDEVICELINK Proxy experenced an error.
- *
- * @param info - Includes information about the Exception that occurred.
- * @param e - The exception that occurred.
- */
- public void onError(String info, Exception e);
-
-
- /**
- * onGenericResponse() being called indicates that SMARTDEVICELINK could not determine the
- * type of request it is responding to. This is usually result of an unknown RPC Request
- * being sent.
- *
- * @param response - Includes detailed information about the response.
- */
- public void onGenericResponse(GenericResponse response);
-
- /**
- * onOnCommand() being called indicates that the user selected a command on SMARTDEVICELINK.
- *
- * @param notification - Contains information about the command chosen.
- */
- public void onOnCommand(OnCommand notification);
-
- /**
- * onAddCommandResponse() being called indicates that SMARTDEVICELINK has responded to
- * a request to add a command.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onAddCommandResponse(AddCommandResponse response);
-
- /**
- * onAddSubMenuResponse() being called indicates that SMARTDEVICELINK has responded to
- * a request to add a command.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onAddSubMenuResponse(AddSubMenuResponse response);
-
- /**
- * onCreateInteractionChoiceSetResponse() being called indicates that SMARTDEVICELINK has
- * responded to a request to add an interactionChoiceSet.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onCreateInteractionChoiceSetResponse(CreateInteractionChoiceSetResponse response);
-
- /**
- * onAlertResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to alert the user.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onAlertResponse(AlertResponse response);
-
- /**
- * onDeleteCommandResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to delete a command.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onDeleteCommandResponse(DeleteCommandResponse response);
-
- /**
- * onDeleteCommandResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to delete an interaction choice set.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onDeleteInteractionChoiceSetResponse(DeleteInteractionChoiceSetResponse response);
-
- /**
- * onDeleteCommandResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to delete a submenu.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onDeleteSubMenuResponse(DeleteSubMenuResponse response);
-
- /**
- * onPerformInteractionResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to perform an interaction.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onPerformInteractionResponse(PerformInteractionResponse response);
-
- /**
- * onResetGlobalPropertiesResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to reset global properties.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onResetGlobalPropertiesResponse(ResetGlobalPropertiesResponse response);
-
- /**
- * onSetGlobalPropertiesResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to set global properties.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onSetGlobalPropertiesResponse(SetGlobalPropertiesResponse response);
-
- /**
- * onSetMediaClockTimerResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to set the media clock timer.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onSetMediaClockTimerResponse(SetMediaClockTimerResponse response);
-
- /**
- * onShowResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to display information to the user.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onShowResponse(ShowResponse response);
-
- /**
- * onSpeakResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to speak information to the user.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onSpeakResponse(SpeakResponse response);
-
- /**
- * onButtonEvent being called indicates that a button event has occurred.
- *
- * @param notification - Contains information about the notification sent from SMARTDEVICELINK.
- */
- public void onOnButtonEvent(OnButtonEvent notification);
-
- /**
- * onButtonPress being called indicates that SMARTDEVICELINK has a button has
- * been pressed by the user.
- *
- * @param notification - Contains information about the notification sent from SMARTDEVICELINK.
- */
- public void onOnButtonPress(OnButtonPress notification);
-
- /**
- * onSubscribeButtonResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to subscribe to button events and button presses.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onSubscribeButtonResponse(SubscribeButtonResponse response);
-
- /**
- * onUnsubscribeButtonResponse being called indicates that SMARTDEVICELINK has
- * responded to a request to unsubscribe from button events and button presses.
- *
- * @param response - Contains information about the response sent from SMARTDEVICELINK.
- */
- public void onUnsubscribeButtonResponse(UnsubscribeButtonResponse response);
-
- /**
- * onOnPermissionsChange being called indicates that your app permissions have
- * changed due to a policy table change. This can mean your app has received additional
- * permissions OR lost permissions.
- *
- * @param notification - Contains information about the changed permissions.
- */
- public void onOnPermissionsChange(OnPermissionsChange notification);
-
- public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response);
-
- public void onUnsubscribeVehicleDataResponse(UnsubscribeVehicleDataResponse response);
-
- public void onGetVehicleDataResponse(GetVehicleDataResponse response);
-
- public void onReadDIDResponse(ReadDIDResponse response);
-
- public void onGetDTCsResponse(GetDTCsResponse response);
-
- public void onOnVehicleData(OnVehicleData notification);
-
- public void onPerformAudioPassThruResponse(PerformAudioPassThruResponse response);
-
- public void onEndAudioPassThruResponse(EndAudioPassThruResponse response);
-
- public void onOnAudioPassThru(OnAudioPassThru notification);
-
- public void onPutFileResponse(PutFileResponse response);
-
- public void onDeleteFileResponse(DeleteFileResponse response);
-
- public void onListFilesResponse(ListFilesResponse response);
-
- public void onSetAppIconResponse(SetAppIconResponse response);
-
- public void onScrollableMessageResponse(ScrollableMessageResponse response);
-
- public void onChangeRegistrationResponse(ChangeRegistrationResponse response);
-
- public void onSetDisplayLayoutResponse(SetDisplayLayoutResponse response);
-
- public void onOnLanguageChange(OnLanguageChange notification);
-
- public void onSliderResponse(SliderResponse response);
-
- public void onAlertManeuverResponse(AlertManeuverResponse response);
-
- public void onShowConstantTBTResponse(ShowConstantTBTResponse response);
-
- public void onUpdateTurnListResponse(UpdateTurnListResponse response);
-
- public void onDialNumberResponse(DialNumberResponse response);
-
- public void onOnDriverDistraction(OnDriverDistraction notification);
-
- public void onOnTBTClientState(OnTBTClientState notification);
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommand.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommand.java
deleted file mode 100755
index 70f54450e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommand.java
+++ /dev/null
@@ -1,217 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.util.DebugTool;
-
-/**
-* <p>
-* This class will add a command to the application's Command Menu
-* </p>
-* <p>
-* <b>Note:</b> A command will be added to the end of the list of elements in
-* the Command Menu under the following conditions:
-* </p>
-* <ul>
-* <li>When a Command is added with no MenuParams value provided</li>
-* <li>When a MenuParams value is provided with a MenuParam.position value
-* greater than or equal to the number of menu items currently defined in the
-* menu specified by the MenuParam.parentID value</li>
-* </ul>
-* <br/>
-* <p>
-* The set of choices which the application builds using AddCommand can be a
-* mixture of:
-* </p>
-* <ul>
-* <li>Choices having only VR synonym definitions, but no MenuParams definitions
-* </li>
-* <li>Choices having only MenuParams definitions, but no VR synonym definitions
-* </li>
-* <li>Choices having both MenuParams and VR synonym definitions</li>
-* </ul>
-* <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b>
-* </p>
-*
-* @since SmartDeviceLink 1.0
-* @see DeleteCommand
-* @see AddSubMenu
-* @see DeleteSubMenu
-*/
-
-public class AddCommand extends RPCRequest {
-
- /**
- * Constructs a new AddCommand object
- */
- public AddCommand() {
- super("AddCommand");
- }
-
- /**
- * <p>
- * Constructs a new AddCommand object indicated by the Hashtable
- * parameter
- * </p>
- *
- * @param hash
- * The Hashtable to use
- */
- public AddCommand(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>
- * Returns an <i>Integer</i> object representing the Command ID that you want to add
- * </p>
- *
- * @return Integer -an integer representation a Unique Command ID
- */
- public Integer getCmdID() {
- return (Integer) parameters.get(Names.cmdID);
- }
- /**
- * Sets an Unique Command ID that identifies the command. Is returned in an
- * <i>{@linkplain OnCommand}</i> notification to identify the command
- * selected by the user
- * <p>
- *
- * @param cmdID
- * an integer object representing a Command ID
- * <p>
- * <b>Notes:</b> Min Value: 0; Max Value: 2000000000
- */
- public void setCmdID(Integer cmdID) {
- if (cmdID != null) {
- parameters.put(Names.cmdID, cmdID);
- } else {
- parameters.remove(Names.cmdID);
- }
- }
- /**
- * <p>
- * Returns a <I>MenuParams</I> object which will defined the command and how
- * it is added to the Command Menu
- * </p>
- *
- * @return MenuParams -a MenuParams object
- */
- public MenuParams getMenuParams() {
- Object obj = parameters.get(Names.menuParams);
- if (obj instanceof MenuParams) {
- return (MenuParams) obj;
- }
- else if (obj instanceof Hashtable) {
- try {
- return new MenuParams((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.menuParams, e);
- }
- }
- return null;
- }
- /**
- * <p>
- * Sets Menu parameters<br/>
- * If provided, this will define the command and how it is added to the
- * Command Menu<br/>
- * If null, commands will not be accessible through the HMI application menu
- * </p>
- *
- * @param menuParams
- * a menuParams object
- */
- public void setMenuParams(MenuParams menuParams) {
- if (menuParams != null) {
- parameters.put(Names.menuParams, menuParams);
- } else {
- parameters.remove(Names.menuParams);
- }
- }
- /**
- * <p>
- * Gets Voice Recognition Commands
- * </p>
- *
- * @return Vector<String> -(Vector<String>) indicating one or more VR phrases
- */
- public Vector<String> getVrCommands() {
- if (parameters.get(Names.vrCommands) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.vrCommands);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>)list;
- }
- }
- }
- return null;
- }
- /**
- * <p>
- * Sets Voice Recognition Commands <br/>
- * If provided, defines one or more VR phrases the recognition of any of
- * which triggers the <i>{@linkplain OnCommand}</i> notification with this
- * cmdID<br/>
- * If null, commands will not be accessible by voice commands (when the user
- * hits push-to-talk)
- * </p>
- *
- * @param vrCommands
- * Vector<String> indicating one or more VR phrases
- * <p>
- * <b>Notes: </b>Optional only if menuParams is provided. If
- * provided, array must contain at least one non-empty (not null,
- * not zero-length, not whitespace only) element
- */
- public void setVrCommands( Vector<String> vrCommands ) {
- if (vrCommands != null) {
- parameters.put(Names.vrCommands, vrCommands );
- } else {
- parameters.remove(Names.vrCommands);
- }
- }
-
- /**
- * Gets the image to be shown along with a command </p>
- *
- * @return Image -an Image object
- * @since SmartDeviceLink 2.0
- */
- public Image getCmdIcon() {
- Object obj = parameters.get(Names.cmdIcon);
- if (obj instanceof Image) {
- return (Image) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new Image((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.cmdIcon, e);
- }
- }
- return null;
- }
-
- /**
- * Sets the Image<br/>
- * If provided, defines the image to be be shown along with a command
- * @param cmdIcon
- * an Image obj representing the Image obj shown along with a
- * command
- * <p>
- * <b>Notes: </b>If omitted on supported displays, no (or the
- * default if applicable) icon will be displayed
- * @since SmartDeviceLink 2.0
- */
- public void setCmdIcon(Image cmdIcon) {
- if (cmdIcon != null) {
- parameters.put(Names.cmdIcon, cmdIcon);
- } else {
- parameters.remove(Names.cmdIcon);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
deleted file mode 100755
index b607ff118..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Add Command Response is sent, when AddCommand has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class AddCommandResponse extends RPCResponse {
-
- public AddCommandResponse() {
- super("AddCommand");
- }
-
- public AddCommandResponse(Hashtable hash) {
- super(hash);
- }
-}
-
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java
deleted file mode 100755
index 4b437cc96..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Add a SubMenu to the Command Menu
- * <p>
- * A SubMenu can only be added to the Top Level Menu (i.e.a SunMenu cannot be
- * added to a SubMenu), and may only contain commands as children
- * <p>
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see DeleteSubMenu
- * @see AddCommand
- * @see DeleteCommand
- */
-public class AddSubMenu extends RPCRequest {
-
- /**
- * Constructs a new AddSubMenu object
- */
- public AddSubMenu() {
- super("AddSubMenu");
- }
- /**
- * Constructs a new AddSubMenu object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public AddSubMenu(Hashtable hash) {
- super(hash);
- }
- /**
- * Returns an <i>Integer</i> object representing the Menu ID that identifies
- * a sub menu
- * <p>
- *
- * @return Integer -an integer representing the Menu ID that identifies a sub
- * menu
- */
- public Integer getMenuID() {
- return (Integer) parameters.get( Names.menuID );
- }
- /**
- * Sets a Menu ID that identifies a sub menu. This value is used in
- * {@linkplain AddCommand} to which SubMenu is the parent of the command
- * being added
- * <p>
- *
- * @param menuID
- * an integer object representing a Menu ID
- * <p>
- * <b>Notes:</b> Min Value: 0; Max Value: 2000000000
- */
- public void setMenuID( Integer menuID ) {
- if (menuID != null) {
- parameters.put(Names.menuID, menuID );
- }
- }
- /**
- * Returns an <i>Integer</i> object representing the position of menu
- * <p>
- *
- * @return Integer -the value representing the relative position of menus
- */
- public Integer getPosition() {
- return (Integer) parameters.get( Names.position );
- }
- /**
- * Sets a position of menu
- *
- * @param position
- * An Integer object representing the position within the items
- * of the top level Command Menu. 0 will insert at the front, 1
- * will insert after the first existing element, etc. Position of
- * any submenu will always be located before the return and exit
- * options
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>
- * Min Value: 0; Max Value: 1000</li>
- * <li>If position is greater or equal than the number of items
- * on top level, the sub menu will be appended by the end</li>
- * <li>If this parameter is omitted, the entry will be added at
- * the end of the list</li>
- * </ul>
- */
- public void setPosition( Integer position ) {
- if (position != null) {
- parameters.put(Names.position, position );
- }
- }
- /**
- * Returns String which is displayed representing this submenu item
- *
- * @return String -a Submenu item's name
- */
- public String getMenuName() {
- return (String) parameters.get( Names.menuName );
- }
- /**
- * Sets a menuName which is displayed representing this submenu item
- *
- * @param menuName
- * String which will be displayed representing this submenu item
- */
- public void setMenuName( String menuName ) {
- if (menuName != null) {
- parameters.put(Names.menuName, menuName );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
deleted file mode 100755
index ba5ef52bb..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Add SubMenu Response is sent, when AddSubMenu has been called
- * @since SmartDeviceLink 1.0
- */
-public class AddSubMenuResponse extends RPCResponse {
-
- public AddSubMenuResponse() {
- super("AddSubMenu");
- }
- public AddSubMenuResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Alert.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Alert.java
deleted file mode 100755
index f8737e72d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Alert.java
+++ /dev/null
@@ -1,310 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Provides information to the user using either TTS, the Display or both and
- * can include a system-generated alert tone
- * <p>
- * <ul>
- * <li>The displayed portion of the Alert, if any, will persist until the
- * specified timeout has elapsed, or the Alert is preempted</li>
- * <li>An Alert will preempt (abort) any SmartDeviceLink Operation that is in-progress,
- * except an already-in-progress Alert</li>
- * <li>An Alert cannot be preempted by any SmartDeviceLink Operation</li>
- * <li>An Alert can be preempted by a user action (button push)</li>
- * <li>An Alert will fail if it is issued while another Alert is in progress</li>
- * <li>Although each Alert parameter is optional, in fact each Alert request
- * must supply at least one of the following parameters:<br/>
- * <ul>
- * <li>alertText1</li>
- * <li>alertText2</li>
- * <li>alertText3</li>
- * <li>ttsChunks</li>
- * </ul>
- * </li>
- * </ul>
- * <br/>
- * <b>HMILevel needs to be FULL or LIMITED.</b><br/>
- * <b>If the app has been granted function group Notification the HMILevel can
- * also be BACKGROUND</b><br/>
- *
- * @since SmartDeviceLink 1.0
- * @see Show
- * @see Speak
- */
-public class Alert extends RPCRequest {
-
- /**
- * Constructs a new Alert object
- */
- public Alert() {
- super("Alert");
- }
- /**
- * Constructs a new Alert object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public Alert(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the text which is displayed in the first field of the display during
- * the Alert
- *
- * @return String - a String value representing the text which is displayed
- * in the first field during the Alert
- */
- public String getAlertText1() {
- return (String) parameters.get(Names.alertText1);
- }
- /**
- * Sets the String to be displayed in the first field of the display during
- * the Alert
- *
- * @param alertText1
- * String Value
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>Length is limited to what is indicated in <i>
- * {@linkplain RegisterAppInterface}</i> response</li>
- * <li>If omitted, top display line will be cleared</li>
- * <li>Text is always centered</li>
- * </ul>
- */
- public void setAlertText1(String alertText1) {
- if (alertText1 != null) {
- parameters.put(Names.alertText1, alertText1);
- } else {
- parameters.remove(Names.alertText1);
- }
- }
- /**
- * Gets the text which is displayed in the second field of the display
- * during the Alert
- *
- * @return String -a String value representing the text which is displayed
- * in the second field during the Alert
- */
- public String getAlertText2() {
- return (String) parameters.get(Names.alertText2);
- }
- /**
- * Sets the String to be displayed in the second field of the display during
- * the Alert
- *
- * @param alertText2
- * String Value
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>Only permitted if HMI supports a second display line</li>
- * <li>Length is limited to what is indicated in <i>
- * {@linkplain RegisterAppInterface}</i> response</li>
- * <li>If omitted, second display line will be cleared</li>
- * <li>Text is always centered</li>
- * </ul>
- */
- public void setAlertText2(String alertText2) {
- if (alertText2 != null) {
- parameters.put(Names.alertText2, alertText2);
- } else {
- parameters.remove(Names.alertText2);
- }
- }
-
- /**
- * Gets the text which is displayed in the third field of the display during
- * the Alert
- *
- * @return String -a String value representing the text which is displayed
- * in the third field during the Alert
- *
- * @since SmartDeviceLink 2.0
- */
- public String getAlertText3() {
- return (String) parameters.get(Names.alertText3);
- }
-
- /**
- * Sets the String to be displayed in the third field of the display during
- * the Alert
- *
- * @param alertText3
- * String Value
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>Only permitted if HMI supports a third display line</li>
- * <li>Length is limited to what is indicated in <i>
- * {@linkplain RegisterAppInterface}</i> response</li>
- * <li>If omitted, third display line will be cleared</li>
- * <li>Text is always centered</li>
- * </ul>
- *
- * @since SmartDeviceLink 2.0
- */
- public void setAlertText3(String alertText3) {
- if (alertText3 != null) {
- parameters.put(Names.alertText3, alertText3);
- } else {
- parameters.remove(Names.alertText3);
- }
- }
- /**
- * Gets TTSChunk[], the Array of type TTSChunk which, taken together,
- * specify what is to be spoken to the user
- *
- * @return Vector -a Vector<TTSChunk> value specify what is to be spoken to
- * the user
- */
- public Vector<TTSChunk> getTtsChunks() {
- if (parameters.get(Names.ttsChunks) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.ttsChunks);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets array of type TTSChunk which, taken together, specify what is to be
- * spoken to the user
- *
- * @param ttsChunks
- * <p>
- * <b>Notes: </b>Array must have a least one element
- */
- public void setTtsChunks(Vector<TTSChunk> ttsChunks) {
- if (ttsChunks != null) {
- parameters.put(Names.ttsChunks, ttsChunks);
- } else {
- parameters.remove(Names.ttsChunks);
- }
- }
- /**
- * Gets the duration of the displayed portion of the alert, in milliseconds
- *
- * @return Integer -an Integer value representing the duration of the
- * displayed portion of the alert, in milliseconds
- */
- public Integer getDuration() {
- return (Integer) parameters.get(Names.duration);
- }
- /**
- * Sets the duration of the displayed portion of the alert, in milliseconds.
- * After this amount of time has passed, the display fields alertText1 and
- * alertText2 will revert to what was displayed in those fields before the
- * alert began
- * <p>
- *
- * @param duration
- * the Integer values representing the duration time, in
- * milliseconds
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>Min Value: 3000; Max Value: 10000</li>
- * <li>If omitted, the default is 5000 milliseconds</li>
- * </ul>
- */
- public void setDuration(Integer duration) {
- if (duration != null) {
- parameters.put(Names.duration, duration);
- } else {
- parameters.remove(Names.duration);
- }
- }
- /**
- * Gets a Boolean value representing the alert tone
- *
- * @return Boolean -If TRUE, means an alert tone will be played before the
- * TTS (if any) is spoken
- */
- public Boolean getPlayTone() {
- return (Boolean) parameters.get(Names.playTone);
- }
- /**
- * Sets whether the alert tone should be played before the TTS (if any) is
- * spoken
- *
- * @param playTone
- * a Boolean value which specifies whether the alert tone should
- * be played before the TTS (if any) is spoken
- * <p>
- * <b>Notes: </b>If omitted, default is true
- */
- public void setPlayTone(Boolean playTone) {
- if (playTone != null) {
- parameters.put(Names.playTone, playTone);
- } else {
- parameters.remove(Names.playTone);
- }
- }
-
- /**
- * Gets the SoftButton Vector object
- *
- * @return Vector<SoftButton> -a Vector<SoftButton> representing the Vector
- * object
- * @since SmartDeviceLink 2.0
- */
- public Vector<SoftButton> getSoftButtons() {
- if (parameters.get(Names.softButtons) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtons);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButton) {
- return (Vector<SoftButton>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButton> newList = new Vector<SoftButton>();
- for (Object hashObj : list) {
- newList.add(new SoftButton((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets the SoftButtons
- *
- * @param softButtons
- * a Vector<SoftButton> value
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>If omitted on supported displays, the alert will not have
- * any SoftButton</li>
- * <li>ArrayMin: 0</li>
- * <li>ArrayMax: 4</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setSoftButtons(Vector<SoftButton> softButtons) {
- if (softButtons != null) {
- parameters.put(Names.softButtons, softButtons);
- } else {
- parameters.remove(Names.softButtons);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java
deleted file mode 100755
index a6b9e55d0..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * This will bring up an alert with information related to the next navigation
- * maneuver including potential voice navigation instructions. Shown information
- * will be taken from the ShowConstantTBT function
- * <p>
- * Function Group: Navigation
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * <p>
- *
- * @since SmartDeviceLink 2.0
- * @see ShowConstantTBT
- */
-public class AlertManeuver extends RPCRequest {
-
- /**
- * Constructs a new AlertManeuver object
- */
- public AlertManeuver() {
- super("AlertManeuver");
- }
-
- /**
- * Constructs a new AlertManeuver object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public AlertManeuver(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets an array of text chunks of type TTSChunk
- *
- * @param ttsChunks
- * a Vector<TTSChunk> value representing an array of text chunks
- * of type TTSChunk
- * <p>
- * <b>Notes: </b>Minsize=1; Maxsize=100
- */
- public void setTtsChunks(Vector<TTSChunk> ttsChunks) {
- if (ttsChunks != null) {
- parameters.put(Names.ttsChunks, ttsChunks);
- } else {
- parameters.remove(Names.ttsChunks);
- }
- }
-
- /**
- * Gets an array of text chunks of type TTSChunk
- *
- * @return Vector<TTSChunk> -a Vector<TTSChunk> value representing an array
- * of text chunks of type TTSChunk
- */
- public Vector<TTSChunk> getTtsChunks() {
- if (parameters.get(Names.ttsChunks) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.ttsChunks);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets soft buttons. If omitted on supported displays, only the system
- * defined "Close" SoftButton will be displayed
- *
- * @param softButtons
- * a Vector<SoftButton> value
- * <p>
- * <b>Notes: </b>Minsize=0; Maxsize=3
- */
- public void setSoftButtons(Vector<SoftButton> softButtons) {
- if (softButtons != null) {
- parameters.put(Names.softButtons, softButtons);
- } else {
- parameters.remove(Names.softButtons);
- }
- }
-
- /**
- * Gets a Vector<SoftButton>
- * @return Vector<SoftButton> -a Vector<SoftButton> value
- */
- public Vector<SoftButton> getSoftButtons() {
- if (parameters.get(Names.softButtons) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtons);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButton) {
- return (Vector<SoftButton>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButton> newList = new Vector<SoftButton>();
- for (Object hashObj : list) {
- newList.add(new SoftButton((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
deleted file mode 100755
index e710e324f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Alert Maneuver Response is sent, when AlertManeuver has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class AlertManeuverResponse extends RPCResponse {
-
- public AlertManeuverResponse() {
- super("AlertManeuver");
- }
- public AlertManeuverResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertResponse.java
deleted file mode 100755
index 4559dd97b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AlertResponse.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Alert Response is sent, when Alert has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class AlertResponse extends RPCResponse {
-
- /**
- * Constructs a new AlertResponse object
- */
- public AlertResponse() {
- super("Alert");
- }
-
- /**
- * Constructs a new AlertResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public AlertResponse(Hashtable hash) {
- super(hash);
- }
- public Integer getTryAgainTime() {
- return (Integer) parameters.get(Names.tryAgainTime);
- }
- public void setTryAgainTime(Integer tryAgainTime) {
- if (tryAgainTime != null) {
- parameters.put(Names.tryAgainTime, tryAgainTime);
- } else {
- parameters.remove(Names.tryAgainTime);
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
deleted file mode 100755
index c820446bd..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AudioType;
-import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
-import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Describes different audio type configurations for PerformAudioPassThru, e.g. {8kHz,8-bit,PCM}
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>samplingRate</td>
- * <td>SamplingRate</td>
- * <td>Describes the sampling rate for AudioPassThru
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>bitsPerSample</td>
- * <td>BitsPerSample</td>
- * <td>Describes the sample depth in bit for AudioPassThru
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>audioType</td>
- * <td>AudioType</td>
- * <td>Describes the audiotype for AudioPassThru
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class AudioPassThruCapabilities extends RPCStruct {
-
- /**
- * Constructs a newly allocated AudioPassThruCapabilities object
- */
- public AudioPassThruCapabilities() {}
-
- /**
- * Constructs a newly allocated AudioPassThruCapabilities object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public AudioPassThruCapabilities(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set the sampling rate for AudioPassThru
- * @param samplingRate the sampling rate for AudioPassThru
- */
- public void setSamplingRate(SamplingRate samplingRate) {
- if (samplingRate != null) {
- store.put(Names.samplingRate, samplingRate);
- } else {
- store.remove(Names.samplingRate);
- }
- }
-
- /**
- * get the sampling rate for AudioPassThru
- * @return the sampling rate for AudioPassThru
- */
- public SamplingRate getSamplingRate() {
- Object obj = store.get(Names.samplingRate);
- if (obj instanceof SamplingRate) {
- return (SamplingRate) obj;
- } else if (obj instanceof String) {
- SamplingRate theCode = null;
- try {
- theCode = SamplingRate.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.samplingRate, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * set the sample depth in bit for AudioPassThru
- * @param bitsPerSample the sample depth in bit for AudioPassThru
- */
- public void setBitsPerSample(BitsPerSample bitsPerSample) {
- if (bitsPerSample != null) {
- store.put(Names.bitsPerSample, bitsPerSample);
- } else {
- store.remove(Names.bitsPerSample);
- }
- }
-
- /**
- * get the sample depth in bit for AudioPassThru
- * @return the sample depth in bit for AudioPassThru
- */
- public BitsPerSample getBitsPerSample() {
- Object obj = store.get(Names.bitsPerSample);
- if (obj instanceof BitsPerSample) {
- return (BitsPerSample) obj;
- } else if (obj instanceof String) {
- BitsPerSample theCode = null;
- try {
- theCode = BitsPerSample.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.bitsPerSample, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * set the audiotype for AudioPassThru
- * @param audioType the audiotype for AudioPassThru
- */
- public void setAudioType(AudioType audioType) {
- if (audioType != null) {
- store.put(Names.audioType, audioType);
- } else {
- store.remove(Names.audioType);
- }
- }
-
- /**
- * get the audiotype for AudioPassThru
- * @return the audiotype for AudioPassThru
- */
- public AudioType getAudioType() {
- Object obj = store.get(Names.audioType);
- if (obj instanceof AudioType) {
- return (AudioType) obj;
- } else if (obj instanceof String) {
- AudioType theCode = null;
- try {
- theCode = AudioType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.audioType, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BeltStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BeltStatus.java
deleted file mode 100755
index 5ac0cef04..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BeltStatus.java
+++ /dev/null
@@ -1,347 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class BeltStatus extends RPCStruct {
-
- public BeltStatus() { }
- public BeltStatus(Hashtable hash) {
- super(hash);
- }
-
- public void setDriverBeltDeployed(VehicleDataEventStatus driverBeltDeployed) {
- if (driverBeltDeployed != null) {
- store.put(Names.driverBeltDeployed, driverBeltDeployed);
- } else {
- store.remove(Names.driverBeltDeployed);
- }
- }
- public VehicleDataEventStatus getDriverBeltDeployed() {
- Object obj = store.get(Names.driverBeltDeployed);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.driverBeltDeployed, e);
- }
- return theCode;
- }
- return null;
- }
- public void setPassengerBeltDeployed(VehicleDataEventStatus passengerBeltDeployed) {
- if (passengerBeltDeployed != null) {
- store.put(Names.passengerBeltDeployed, passengerBeltDeployed);
- } else {
- store.remove(Names.passengerBeltDeployed);
- }
- }
- public VehicleDataEventStatus getPassengerBeltDeployed() {
- Object obj = store.get(Names.passengerBeltDeployed);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.passengerBeltDeployed, e);
- }
- return theCode;
- }
- return null;
- }
- public void setPassengerBuckleBelted(VehicleDataEventStatus passengerBuckleBelted) {
- if (passengerBuckleBelted != null) {
- store.put(Names.passengerBuckleBelted, passengerBuckleBelted);
- } else {
- store.remove(Names.passengerBuckleBelted);
- }
- }
- public VehicleDataEventStatus getPassengerBuckleBelted() {
- Object obj = store.get(Names.passengerBuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.passengerBuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setDriverBuckleBelted(VehicleDataEventStatus driverBuckleBelted) {
- if (driverBuckleBelted != null) {
- store.put(Names.driverBuckleBelted, driverBuckleBelted);
- } else {
- store.remove(Names.driverBuckleBelted);
- }
- }
- public VehicleDataEventStatus getDriverBuckleBelted() {
- Object obj = store.get(Names.driverBuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.driverBuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setLeftRow2BuckleBelted(VehicleDataEventStatus leftRow2BuckleBelted) {
- if (leftRow2BuckleBelted != null) {
- store.put(Names.leftRow2BuckleBelted, leftRow2BuckleBelted);
- } else {
- store.remove(Names.leftRow2BuckleBelted);
- }
- }
- public VehicleDataEventStatus getLeftRow2BuckleBelted() {
- Object obj = store.get(Names.leftRow2BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.leftRow2BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setPassengerChildDetected(VehicleDataEventStatus passengerChildDetected) {
- if (passengerChildDetected != null) {
- store.put(Names.passengerChildDetected, passengerChildDetected);
- } else {
- store.remove(Names.passengerChildDetected);
- }
- }
- public VehicleDataEventStatus getPassengerChildDetected() {
- Object obj = store.get(Names.passengerChildDetected);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.passengerChildDetected, e);
- }
- return theCode;
- }
- return null;
- }
- public void setRightRow2BuckleBelted(VehicleDataEventStatus rightRow2BuckleBelted) {
- if (rightRow2BuckleBelted != null) {
- store.put(Names.rightRow2BuckleBelted, rightRow2BuckleBelted);
- } else {
- store.remove(Names.rightRow2BuckleBelted);
- }
- }
- public VehicleDataEventStatus getRightRow2BuckleBelted() {
- Object obj = store.get(Names.rightRow2BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rightRow2BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setMiddleRow2BuckleBelted(VehicleDataEventStatus middleRow2BuckleBelted) {
- if (middleRow2BuckleBelted != null) {
- store.put(Names.middleRow2BuckleBelted, middleRow2BuckleBelted);
- } else {
- store.remove(Names.middleRow2BuckleBelted);
- }
- }
- public VehicleDataEventStatus getMiddleRow2BuckleBelted() {
- Object obj = store.get(Names.middleRow2BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.middleRow2BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setMiddleRow3BuckleBelted(VehicleDataEventStatus middleRow3BuckleBelted) {
- if (middleRow3BuckleBelted != null) {
- store.put(Names.middleRow3BuckleBelted, middleRow3BuckleBelted);
- } else {
- store.remove(Names.middleRow3BuckleBelted);
- }
- }
- public VehicleDataEventStatus getMiddleRow3BuckleBelted() {
- Object obj = store.get(Names.middleRow3BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.middleRow3BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setLeftRow3BuckleBelted(VehicleDataEventStatus leftRow3BuckleBelted) {
- if (leftRow3BuckleBelted != null) {
- store.put(Names.leftRow3BuckleBelted, leftRow3BuckleBelted);
- } else {
- store.remove(Names.leftRow3BuckleBelted);
- }
- }
- public VehicleDataEventStatus getLeftRow3BuckleBelted() {
- Object obj = store.get(Names.leftRow3BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.leftRow3BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setRightRow3BuckleBelted(VehicleDataEventStatus rightRow3BuckleBelted) {
- if (rightRow3BuckleBelted != null) {
- store.put(Names.rightRow3BuckleBelted, rightRow3BuckleBelted);
- } else {
- store.remove(Names.rightRow3BuckleBelted);
- }
- }
- public VehicleDataEventStatus getRightRow3BuckleBelted() {
- Object obj = store.get(Names.rightRow3BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rightRow3BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setLeftRearInflatableBelted(VehicleDataEventStatus rearInflatableBelted) {
- if (rearInflatableBelted != null) {
- store.put(Names.rearInflatableBelted, rearInflatableBelted);
- } else {
- store.remove(Names.rearInflatableBelted);
- }
- }
- public VehicleDataEventStatus getLeftRearInflatableBelted() {
- Object obj = store.get(Names.rearInflatableBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rearInflatableBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setRightRearInflatableBelted(VehicleDataEventStatus rightRearInflatableBelted) {
- if (rightRearInflatableBelted != null) {
- store.put(Names.rightRearInflatableBelted, rightRearInflatableBelted);
- } else {
- store.remove(Names.rightRearInflatableBelted);
- }
- }
- public VehicleDataEventStatus getRightRearInflatableBelted() {
- Object obj = store.get(Names.rightRearInflatableBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rightRearInflatableBelted, e);
- }
- return theCode;
- }
- return null;
- }
- public void setMiddleRow1BeltDeployed(VehicleDataEventStatus middleRow1BeltDeployed) {
- if (middleRow1BeltDeployed != null) {
- store.put(Names.middleRow1BeltDeployed, middleRow1BeltDeployed);
- } else {
- store.remove(Names.middleRow1BeltDeployed);
- }
- }
- public VehicleDataEventStatus getMiddleRow1BeltDeployed() {
- Object obj = store.get(Names.middleRow1BeltDeployed);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.middleRow1BeltDeployed, e);
- }
- return theCode;
- }
- return null;
- }
- public void setMiddleRow1BuckleBelted(VehicleDataEventStatus middleRow1BuckleBelted) {
- if (middleRow1BuckleBelted != null) {
- store.put(Names.middleRow1BuckleBelted, middleRow1BuckleBelted);
- } else {
- store.remove(Names.middleRow1BuckleBelted);
- }
- }
- public VehicleDataEventStatus getMiddleRow1BuckleBelted() {
- Object obj = store.get(Names.middleRow1BuckleBelted);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.middleRow1BuckleBelted, e);
- }
- return theCode;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BodyInformation.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BodyInformation.java
deleted file mode 100755
index 475fc7c09..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/BodyInformation.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.IgnitionStableStatus;
-import com.smartdevicelink.proxy.rpc.enums.IgnitionStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class BodyInformation extends RPCStruct {
-
- public BodyInformation() { }
- public BodyInformation(Hashtable hash) {
- super(hash);
- }
-
- public void setParkBrakeActive(Boolean parkBrakeActive) {
- if (parkBrakeActive != null) {
- store.put(Names.parkBrakeActive, parkBrakeActive);
- } else {
- store.remove(Names.parkBrakeActive);
- }
- }
- public Boolean getParkBrakeActive() {
- return (Boolean) store.get(Names.parkBrakeActive);
- }
- public void setIgnitionStableStatus(IgnitionStableStatus ignitionStableStatus) {
- if (ignitionStableStatus != null) {
- store.put(Names.ignitionStableStatus, ignitionStableStatus);
- } else {
- store.remove(Names.ignitionStableStatus);
- }
- }
- public IgnitionStableStatus getIgnitionStableStatus() {
- Object obj = store.get(Names.ignitionStableStatus);
- if (obj instanceof IgnitionStableStatus) {
- return (IgnitionStableStatus) obj;
- } else if (obj instanceof String) {
- IgnitionStableStatus theCode = null;
- try {
- theCode = IgnitionStableStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.ignitionStableStatus, e);
- }
- return theCode;
- }
- return null;
- }
- public void setIgnitionStatus(IgnitionStatus ignitionStatus) {
- if (ignitionStatus != null) {
- store.put(Names.ignitionStatus, ignitionStatus);
- } else {
- store.remove(Names.ignitionStatus);
- }
- }
- public IgnitionStatus getIgnitionStatus() {
- Object obj = store.get(Names.ignitionStatus);
- if (obj instanceof IgnitionStatus) {
- return (IgnitionStatus) obj;
- } else if (obj instanceof String) {
- IgnitionStatus theCode = null;
- try {
- theCode = IgnitionStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.ignitionStatus, e);
- }
- return theCode;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
deleted file mode 100755
index 0c4906e08..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Provides information about the capabilities of a SMARTDEVICELINK HMI button.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>name</td>
- * <td>ButtonName</td>
- * <td>The name of theSMARTDEVICELINK HMI button.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>shortPressAvailable</td>
- * <td>Boolean</td>
- * <td>The button supports a SHORT press. See ButtonPressMode for more information.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>longPressAvailable</td>
- * <td>Boolean</td>
- * <td>The button supports a LONG press. See ButtonPressMode for more information.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>upDownAvailable</td>
- * <td>Boolean</td>
- * <td>The button supports "button down" and "button up". When the button is depressed, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONDOWN.
- * <p> When the button is released, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONUP.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class ButtonCapabilities extends RPCStruct {
- /**
- * Constructs a newly allocated ButtonCapabilities object
- */
- public ButtonCapabilities() { }
- /**
- * Constructs a newly allocated ButtonCapabilities object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public ButtonCapabilities(Hashtable hash) {
- super(hash);
- }
- /**
- * Get the name of theSMARTDEVICELINK HMI button.
- * @return ButtonName the name of the Button
- */
- public ButtonName getName() {
- Object obj = store.get(Names.name);
- if (obj instanceof ButtonName) {
- return (ButtonName) obj;
- } else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.name, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Set the name of theSMARTDEVICELINK HMI button.
- * @param name the name of button
- */
- public void setName( ButtonName name ) {
- if (name != null) {
- store.put(Names.name, name );
- }
- }
- /**
- * Whether the button supports a SHORT press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
- * @return True if support otherwise False.
- */
- public Boolean getShortPressAvailable() {
- return (Boolean) store.get( Names.shortPressAvailable );
- }
- /**
- * Set the button supports a SHORT press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
- * @param shortPressAvailable True if support otherwise False.
- */
- public void setShortPressAvailable( Boolean shortPressAvailable ) {
- if (shortPressAvailable != null) {
- store.put(Names.shortPressAvailable, shortPressAvailable );
- }
- }
- /**
- * Whether the button supports a LONG press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
- * @return True if support otherwise False.
- */
- public Boolean getLongPressAvailable() {
- return (Boolean) store.get( Names.longPressAvailable );
- }
- /**
- * Set the button supports a LONG press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
- * @param longPressAvailable True if support otherwise False.
- */
- public void setLongPressAvailable( Boolean longPressAvailable ) {
- if (longPressAvailable != null) {
- store.put(Names.longPressAvailable, longPressAvailable );
- }
- }
- /**
- * Whether the button supports "button down" and "button up". When the button is depressed, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONDOWN.
- * @return True if support otherwise False.
- */
- public Boolean getUpDownAvailable() {
- return (Boolean) store.get( Names.upDownAvailable );
- }
- /**
- * Set the button supports "button down" and "button up". When the button is depressed, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONDOWN.
- * @param upDownAvailable True if support otherwise False.
- */
- public void setUpDownAvailable( Boolean upDownAvailable ) {
- if (upDownAvailable != null) {
- store.put(Names.upDownAvailable, upDownAvailable );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
deleted file mode 100755
index 243ec2bea..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * If the app recognizes during the app registration that the SmartDeviceLink HMI language
- * (voice/TTS and/or display) does not match the app language, the app will be
- * able (but does not need) to change this registration with changeRegistration
- * prior to app being brought into focus
- * <p>
- * Function Group: Base
- * <p>
- * <b>HMILevel can by any</b>
- * <p>
- *
- * @since SmartDeviceLink 2.0
- * @see RegisterAppInterface
- */
-public class ChangeRegistration extends RPCRequest {
-
- /**
- * Constructs a new ChangeRegistration object
- */
- public ChangeRegistration() {
- super("ChangeRegistration");
- }
-
- /**
- * Constructs a new ChangeRegistration object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ChangeRegistration(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets language
- *
- * @param language
- * a language value
- */
- public void setLanguage(Language language) {
- if (language != null) {
- parameters.put(Names.language, language);
- } else {
- parameters.remove(Names.language);
- }
- }
-
- /**
- * Gets language
- *
- * @return Language -a Language value
- */
- public Language getLanguage() {
- Object obj = parameters.get(Names.language);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.language, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets HMI display language
- *
- * @param hmiDisplayLanguage
- * a Language value
- */
- public void setHmiDisplayLanguage(Language hmiDisplayLanguage) {
- if (hmiDisplayLanguage != null) {
- parameters.put(Names.hmiDisplayLanguage, hmiDisplayLanguage);
- } else {
- parameters.remove(Names.hmiDisplayLanguage);
- }
- }
-
- /**
- * Gets HMI display language
- *
- * @return Language -a Language value
- */
- public Language getHmiDisplayLanguage() {
- Object obj = parameters.get(Names.hmiDisplayLanguage);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiDisplayLanguage, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
deleted file mode 100755
index 097c3bfbe..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Change Registration Response is sent, when ChangeRegistration has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class ChangeRegistrationResponse extends RPCResponse {
-
- /**
- * Constructs a new ChangeRegistrationResponse object
- */
- public ChangeRegistrationResponse() {
- super("ChangeLanguageRegistration");
- }
-
- /**
- * Constructs a new ChangeRegistrationResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ChangeRegistrationResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Choice.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Choice.java
deleted file mode 100755
index a48610a7c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Choice.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * A choice is an option which a user can select either via the menu or via voice recognition (VR) during an application initiated interaction.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>choiceID</td>
- * <td>Int16</td>
- * <td>Application-scoped identifier that uniquely identifies this choice.
- * <br/>Min: 0
- * <br/>Max: 65535
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>menuName</td>
- * <td>String</td>
- * <td>Text which appears in menu, representing this choice.
- * <br/>Min: 1
- * <br/>Max: 100
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>vrCommands</td>
- * <td>String[]</td>
- * <td>An array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>image</td>
- * <td>Image</td>
- * <td>Either a static hex icon value or a binary image file name identifier (sent by PutFile).</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- *
- * @since SmartDeviceLink 1.0
- */
-public class Choice extends RPCStruct {
- /**
- * Constructs a newly allocated Choice object
- */
- public Choice() { }
- /**
- * Constructs a newly allocated Choice object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public Choice(Hashtable hash) {
- super(hash);
- }
- /**
- * Get the application-scoped identifier that uniquely identifies this choice.
- * @return choiceID Min: 0 Max: 65535
- */
- public Integer getChoiceID() {
- return (Integer) store.get(Names.choiceID);
- }
- /**
- * Set the application-scoped identifier that uniquely identifies this choice.
- * @param choiceID Min: 0 Max: 65535
- */
- public void setChoiceID(Integer choiceID) {
- if (choiceID != null) {
- store.put(Names.choiceID, choiceID);
- }
- }
- /**
- * Text which appears in menu, representing this choice.
- * <br/>Min: 1
- * <br/>Max: 100
- * @return menuName the menu name
- */
- public String getMenuName() {
- return (String) store.get(Names.menuName);
- }
- /**
- * Text which appears in menu, representing this choice.
- * <br/>Min: 1
- * <br/>Max: 100
- * @param menuName the menu name
- */
- public void setMenuName(String menuName) {
- if (menuName != null) {
- store.put(Names.menuName, menuName);
- }
- }
- /**
- * Get an array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element
- * @return vrCommands Vector
- * @since SmartDeviceLink 2.0
- */
- public Vector<String> getVrCommands() {
- if (store.get(Names.vrCommands) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get( Names.vrCommands);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
- /**
- * Set an array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element
- * @param vrCommands the Vector of vrCommands
- * @since SmartDeviceLink 2.0
- */
- public void setVrCommands(Vector<String> vrCommands) {
- if (vrCommands != null) {
- store.put(Names.vrCommands, vrCommands);
- }
- }
- /**
- * Set the image
- * @param image the image of the choice
- */
- public void setImage(Image image) {
- if (image != null) {
- store.put(Names.image, image);
- } else {
- store.remove(Names.image);
- }
- }
- /**
- * Get the image
- * @return the image of the choice
- */
- public Image getImage() {
- Object obj = store.get(Names.image);
- if (obj instanceof Image) {
- return (Image) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new Image((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.image, e);
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
deleted file mode 100755
index d86095d37..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Creates a Choice Set which can be used in subsequent <i>
- * {@linkplain PerformInteraction}</i> Operations.
- * <p>
- * Function Group: Base
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see DeleteInteractionChoiceSet
- * @see PerformInteraction
- */
-public class CreateInteractionChoiceSet extends RPCRequest {
-
- /**
- * Constructs a new CreateInteractionChoiceSet object
- */
- public CreateInteractionChoiceSet() {
- super("CreateInteractionChoiceSet");
- }
- /**
- * Constructs a new CreateInteractionChoiceSet object indicated by the
- * Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public CreateInteractionChoiceSet(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the Choice Set unique ID
- *
- * @return Integer -an Integer representing the Choice Set ID
- */
- public Integer getInteractionChoiceSetID() {
- return (Integer) parameters.get( Names.interactionChoiceSetID );
- }
- /**
- * Sets a unique ID that identifies the Choice Set
- *
- * @param interactionChoiceSetID
- * an Integer value representing the Choice Set ID
- * <p>
- * <b>Notes: </b>Min Value: 0; Max Value: 2000000000
- */
- public void setInteractionChoiceSetID( Integer interactionChoiceSetID ) {
- if (interactionChoiceSetID != null) {
- parameters.put(Names.interactionChoiceSetID, interactionChoiceSetID );
- }
- }
- /**
- * Gets Choice Set Array of one or more elements
- *
- * @return Vector<Choice> -a Vector<Choice> representing the array of one or
- * more elements
- */
- public Vector<Choice> getChoiceSet() {
- if (parameters.get(Names.choiceSet) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.choiceSet);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof Choice) {
- return (Vector<Choice>) list;
- } else if (obj instanceof Hashtable) {
- Vector<Choice> newList = new Vector<Choice>();
- for (Object hashObj : list) {
- newList.add(new Choice((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets a Choice Set that is an Array of one or more elements
- *
- * @param choiceSet
- * a Vector<Choice> representing the array of one or more
- * elements
- * <p>
- * <b>Notes: </b>Min Value: 1; Max Value: 100
- */
- public void setChoiceSet( Vector<Choice> choiceSet ) {
- if (choiceSet != null) {
- parameters.put(Names.choiceSet, choiceSet );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
deleted file mode 100755
index bca2d1b57..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Create Interaction ChoiceSet Response is sent, when CreateInteractionChoiceSet
- * has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class CreateInteractionChoiceSetResponse extends RPCResponse {
-
- public CreateInteractionChoiceSetResponse() {
- super("CreateInteractionChoiceSet");
- }
- public CreateInteractionChoiceSetResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DIDResult.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DIDResult.java
deleted file mode 100755
index 303f2e2b5..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DIDResult.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
-import com.smartdevicelink.util.DebugTool;
-
-public class DIDResult extends RPCStruct {
-
- public DIDResult() {}
- public DIDResult(Hashtable hash) {
- super(hash);
- }
- public void setResultCode(VehicleDataResultCode resultCode) {
- if (resultCode != null) {
- store.put(Names.resultCode, resultCode);
- } else {
- store.remove(Names.resultCode);
- }
- }
- public VehicleDataResultCode getResultCode() {
- Object obj = store.get(Names.resultCode);
- if (obj instanceof VehicleDataResultCode) {
- return (VehicleDataResultCode) obj;
- } else if (obj instanceof String) {
- VehicleDataResultCode theCode = null;
- try {
- theCode = VehicleDataResultCode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.resultCode, e);
- }
- return theCode;
- }
- return null;
- }
- public void setData(String data) {
- if (data != null) {
- store.put(Names.data, data);
- } else {
- store.remove(Names.data);
- }
- }
- public String getData() {
- return (String) store.get(Names.data);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DTC.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DTC.java
deleted file mode 100755
index 488a24e51..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DTC.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * String containing hexadecimal identifier as well as other common names.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>statusByte</td>
- * <td>String</td>
- * <td>Hexadecimal byte string
- * <ul>
- * <li>Maxlength = 500</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class DTC extends RPCStruct {
-
- /**
- * Constructs a newly allocated DTC object
- */
- public DTC() { }
-
- /**
- * Constructs a newly allocated DTC object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public DTC(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set identifier
- * @param identifier
- */
- public void setIdentifier(String identifier) {
- if (identifier != null) {
- store.put(Names.identifier, identifier);
- } else {
- store.remove(Names.identifier);
- }
- }
-
- /**
- * get identifier
- * @return identifier
- */
- public String getIdentifier() {
- return (String) store.get(Names.identifier);
- }
-
- /**
- * set Hexadecimal byte string
- * @param statusByte Hexadecimal byte string
- */
- public void setStatusByte(String statusByte) {
- if (statusByte != null) {
- store.put(Names.statusByte, statusByte);
- } else {
- store.remove(Names.statusByte);
- }
- }
-
- /**
- * get Hexadecimal byte string
- * @return Hexadecimal byte string
- */
- public String getStatusByte() {
- return (String) store.get(Names.statusByte);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java
deleted file mode 100755
index 631648d40..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Removes a command from the Command Menu
- * <p>
- * <b>HMI Status Requirements:</b><br/>
- * HMILevel: FULL, LIMITED or BACKGROUND<br/>
- * AudioStreamingState: N/A<br/>
- * SystemContext: Should not be attempted when VRSESSION or MENU
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see AddCommand
- * @see AddSubMenu
- * @see DeleteSubMenu
- */
-public class DeleteCommand extends RPCRequest {
-
- /**
- * Constructs a new DeleteCommand object
- */
- public DeleteCommand() {
- super("DeleteCommand");
- }
- /**
- * Constructs a new DeleteCommand object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public DeleteCommand(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the Command ID that identifies the Command to be deleted from
- * Command Menu
- *
- * @return Integer - Integer value representing Command ID that identifies
- * the Command to be deleted from Command Menu
- */
- public Integer getCmdID() {
- return (Integer) parameters.get( Names.cmdID );
- }
- /**
- * Sets the Command ID that identifies the Command to be deleted from Command Menu
- *
- * @param cmdID
- * an Integer value representing Command ID
- * <p>
- * <b>Notes: </b>Min Value: 0; Max Value: 2000000000
- */
- public void setCmdID( Integer cmdID ) {
- if (cmdID != null) {
- parameters.put(Names.cmdID, cmdID );
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
deleted file mode 100755
index 34e8bf1b9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Delete Command Response is sent, when DeleteCommand has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class DeleteCommandResponse extends RPCResponse {
-
- public DeleteCommandResponse() {
- super("DeleteCommand");
- }
- public DeleteCommandResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFile.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFile.java
deleted file mode 100755
index 9ddc93f00..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFile.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Used to delete a file resident on the SMARTDEVICELINK module in the app's local cache.
- * Not supported on first generation SMARTDEVICELINK vehicles
- * <p>
- *
- * @since SmartDeviceLink 2.0
- * @see PutFile
- * @see ListFiles
- */
-public class DeleteFile extends RPCRequest {
-
- /**
- * Constructs a new DeleteFile object
- */
- public DeleteFile() {
- super("DeleteFile");
- }
-
- /**
- * Constructs a new DeleteFile object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public DeleteFile(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a file reference name
- *
- * @param smartDeviceLinkFileName
- * a String value representing a file reference name
- */
- public void setSmartDeviceLinkFileName(String smartDeviceLinkFileName) {
- if (smartDeviceLinkFileName != null) {
- parameters.put(Names.smartDeviceLinkFileName, smartDeviceLinkFileName);
- } else {
- parameters.remove(Names.smartDeviceLinkFileName);
- }
- }
-
- /**
- * Gets a file reference name
- *
- * @return String -a String value representing a file reference name
- */
- public String getSmartDeviceLinkFileName() {
- return (String) parameters.get(Names.smartDeviceLinkFileName);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
deleted file mode 100755
index 8fbb4d017..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Delete File Response is sent, when DeleteFile has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class DeleteFileResponse extends RPCResponse {
-
- public DeleteFileResponse() {
- super("DeleteFile");
- }
- public DeleteFileResponse(Hashtable hash) {
- super(hash);
- }
- public void setSpaceAvailable(Integer spaceAvailable) {
- if (spaceAvailable != null) {
- parameters.put(Names.spaceAvailable, spaceAvailable);
- } else {
- parameters.remove(Names.spaceAvailable);
- }
- }
- public Integer getSpaceAvailable() {
- return (Integer) parameters.get(Names.spaceAvailable);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
deleted file mode 100755
index 51f74c5ff..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Deletes an existing Choice Set identified by the parameter
- * interactionChoiceSetID. If the specified interactionChoiceSetID is currently
- * in use by an active <i> {@linkplain PerformInteraction}</i> this call to
- * delete the Choice Set will fail returning an IN_USE resultCode
- * <p>
- * Function Group: Base
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b><br/>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see CreateInteractionChoiceSet
- * @see PerformInteraction
- */
-public class DeleteInteractionChoiceSet extends RPCRequest {
-
- /**
- * Constructs a new DeleteInteractionChoiceSet object
- */
- public DeleteInteractionChoiceSet() {
- super("DeleteInteractionChoiceSet");
- }
- /**
- * Constructs a new DeleteInteractionChoiceSet object indicated by the
- * Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public DeleteInteractionChoiceSet(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets a unique ID that identifies the Choice Set
- * @return Integer -an Integer value representing the unique Choice Set ID
- */
- public Integer getInteractionChoiceSetID() {
- return (Integer) parameters.get( Names.interactionChoiceSetID );
- }
- /**
- * Sets a unique ID that identifies the Choice Set
- * @param interactionChoiceSetID a unique ID that identifies the Choice Set
- * <p>
- * <b>Notes: </b>Min Value: 0; Max Value: 2000000000
- */
- public void setInteractionChoiceSetID( Integer interactionChoiceSetID ) {
- if (interactionChoiceSetID != null) {
- parameters.put(Names.interactionChoiceSetID, interactionChoiceSetID );
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
deleted file mode 100755
index ea0d8a905..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Delete Interaction ChoiceSet Response is sent, when DeleteInteractionChoiceSet has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class DeleteInteractionChoiceSetResponse extends RPCResponse {
-
- public DeleteInteractionChoiceSetResponse() {
- super("DeleteInteractionChoiceSet");
- }
- public DeleteInteractionChoiceSetResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
deleted file mode 100755
index ba86fc310..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Deletes a submenu from the Command Menu
- * <p>
- * <b>Notes: </b>When an app deletes a submenu that has child commands, those
- * child commands are also deleted
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see AddCommand
- * @see AddSubMenu
- * @see DeleteCommand
- */
-public class DeleteSubMenu extends RPCRequest {
- /**
- * Constructs a new DeleteSubMenu object
- */
- public DeleteSubMenu() {
- super("DeleteSubMenu");
- }
- /**
- * Constructs a new DeleteSubMenu object indicated by the Hashtable parameter<p>
- * @param hash The Hashtable to use
- */
- public DeleteSubMenu(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the Menu ID that identifies the SubMenu to be delete
- * @return Integer -an Integer value representing menuID that identifies the SubMenu to be delete
- */
- public Integer getMenuID() {
- return (Integer) parameters.get( Names.menuID );
- }
- /**
- * Sets the MenuID that identifies the SubMenu to be delete
- * @param menuID an Integer value representing menuID that identifies the SubMenu to be delete
- * <p>
- * <b>Notes: </b>Min Value: 0; Max Value: 2000000000
- */
- public void setMenuID( Integer menuID ) {
- if (menuID != null) {
- parameters.put(Names.menuID, menuID );
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
deleted file mode 100755
index d8f90e7f2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Delete SubMenu Response is sent, when DeleteSubMenu has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class DeleteSubMenuResponse extends RPCResponse {
-
- public DeleteSubMenuResponse() {
- super("DeleteSubMenu");
- }
- public DeleteSubMenuResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java
deleted file mode 100755
index 1587fafa1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java
+++ /dev/null
@@ -1,356 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.DeviceLevelStatus;
-import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Describes the status related to a connected mobile device or SMARTDEVICELINK and if or how it is represented in the vehicle.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>voiceRecOn</td>
- * <td>Boolean</td>
- * <td>Voice recognition is on
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>btIconOn</td>
- * <td>Boolean</td>
- * <td>Bluetooth connection established
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>callActive</td>
- * <td>Boolean</td>
- * <td>A call is being active
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>phoneRoaming</td>
- * <td>Boolean</td>
- * <td>The phone is in roaming mode
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>textMsgAvailable</td>
- * <td>Boolean</td>
- * <td>A textmessage is available
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>battLevelStatus</td>
- * <td>DeviceLevelStatus</td>
- * <td>Battery level status
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>stereoAudioOutputMuted</td>
- * <td>Boolean</td>
- * <td>Status of the stereo audio output channel
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>monoAudioOutputMuted</td>
- * <td>Boolean</td>
- * <td>Status of the mono audio output channel
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>signalLevelStatus</td>
- * <td>DeviceLevelStatus</td>
- * <td>Signal level status
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>primaryAudioSource</td>
- * <td>PrimaryAudioSource</td>
- * <td>Reflects the current primary audio source of SMARTDEVICELINK (if selected).
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>eCallEventActive</td>
- * <td>Boolean</td>
- * <td>Reflects, if an eCall event is active
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class DeviceStatus extends RPCStruct {
-
- /**
- * Constructs a newly allocated DeviceStatus object
- */
- public DeviceStatus() {}
-
- /**
- * Constructs a newly allocated DeviceStatus object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public DeviceStatus(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set the voice recognition on or off
- * @param voiceRecOn
- */
- public void setVoiceRecOn(Boolean voiceRecOn) {
- if (voiceRecOn != null) {
- store.put(Names.voiceRecOn, voiceRecOn);
- } else {
- store.remove(Names.voiceRecOn);
- }
- }
-
- /**
- * get whether the voice recognition is on
- * @return whether the voice recognition is on
- */
- public Boolean getVoiceRecOn() {
- return (Boolean) store.get(Names.voiceRecOn);
- }
-
- /**
- * set the bluetooth connection established
- * @param btIconOn the bluetooth connection established
- */
- public void setBtIconOn(Boolean btIconOn) {
- if (btIconOn != null) {
- store.put(Names.btIconOn, btIconOn);
- } else {
- store.remove(Names.btIconOn);
- }
- }
-
- /**
- * get the bluetooth connection established
- * @return the bluetooth connection established
- */
- public Boolean getBtIconOn() {
- return (Boolean) store.get(Names.btIconOn);
- }
-
- /**
- * set a call is being active
- * @param callActive a call is being active
- */
- public void setCallActive(Boolean callActive) {
- if (callActive != null) {
- store.put(Names.callActive, callActive);
- } else {
- store.remove(Names.callActive);
- }
- }
-
- /**
- * get a call is being active
- * @return a call is being active
- */
- public Boolean getCallActive() {
- return (Boolean) store.get(Names.callActive);
- }
-
- /**
- * set the phone is in roaming mode
- * @param phoneRoaming the phone is in roaming mode
- */
- public void setPhoneRoaming(Boolean phoneRoaming) {
- if (phoneRoaming != null) {
- store.put(Names.phoneRoaming, phoneRoaming);
- } else {
- store.remove(Names.phoneRoaming);
- }
- }
-
- /**
- * get the phone is in roaming mode
- * @return the phone is in roaming mode
- */
- public Boolean getPhoneRoaming() {
- return (Boolean) store.get(Names.phoneRoaming);
- }
- public void setTextMsgAvailable(Boolean textMsgAvailable) {
- if (textMsgAvailable != null) {
- store.put(Names.textMsgAvailable, textMsgAvailable);
- } else {
- store.remove(Names.textMsgAvailable);
- }
- }
-
- /**
- * get a textmessage is available
- * @return a textmessage is available
- */
- public Boolean getTextMsgAvailable() {
- return (Boolean) store.get(Names.textMsgAvailable);
- }
-
- /**
- * set battery level status
- * @param battLevelStatus battery level status
- */
- public void setBattLevelStatus(DeviceLevelStatus battLevelStatus) {
- if (battLevelStatus != null) {
- store.put(Names.battLevelStatus, battLevelStatus);
- } else {
- store.remove(Names.battLevelStatus);
- }
- }
-
- /**
- * get battery level status
- * @return battery level status
- */
- public DeviceLevelStatus getBattLevelStatus() {
- Object obj = store.get(Names.battLevelStatus);
- if (obj instanceof DeviceLevelStatus) {
- return (DeviceLevelStatus) obj;
- } else if (obj instanceof String) {
- DeviceLevelStatus theCode = null;
- try {
- theCode = DeviceLevelStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.battLevelStatus, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * set the status of the stereo audio output channel
- * @param stereoAudioOutputMuted the status of the stereo audio output channel
- */
- public void setStereoAudioOutputMuted(Boolean stereoAudioOutputMuted) {
- if (stereoAudioOutputMuted != null) {
- store.put(Names.stereoAudioOutputMuted, stereoAudioOutputMuted);
- } else {
- store.remove(Names.stereoAudioOutputMuted);
- }
- }
-
- /**
- * get the status of the stereo audio output channel
- * @return the status of the stereo audio output channel
- */
- public Boolean getStereoAudioOutputMuted() {
- return (Boolean) store.get(Names.stereoAudioOutputMuted);
- }
-
- /**
- * set the status of the mono audio output channel
- * @param monoAudioOutputMuted the status of the mono audio output channel
- */
- public void setMonoAudioOutputMuted(Boolean monoAudioOutputMuted) {
- if (monoAudioOutputMuted != null) {
- store.put(Names.monoAudioOutputMuted, monoAudioOutputMuted);
- } else {
- store.remove(Names.monoAudioOutputMuted);
- }
- }
-
- /**
- * get the status of the mono audio output channel
- * @return the status of the mono audio output channel
- */
- public Boolean getMonoAudioOutputMuted() {
- return (Boolean) store.get(Names.monoAudioOutputMuted);
- }
-
- /**
- * set signal level status
- * @param signalLevelStatus signal level status
- */
- public void setSignalLevelStatus(DeviceLevelStatus signalLevelStatus) {
- if (signalLevelStatus != null) {
- store.put(Names.signalLevelStatus, signalLevelStatus);
- } else {
- store.remove(Names.signalLevelStatus);
- }
- }
-
- /**
- * get signal level status
- * @return signal level status
- */
- public DeviceLevelStatus getSignalLevelStatus() {
- Object obj = store.get(Names.signalLevelStatus);
- if (obj instanceof DeviceLevelStatus) {
- return (DeviceLevelStatus) obj;
- } else if (obj instanceof String) {
- DeviceLevelStatus theCode = null;
- try {
- theCode = DeviceLevelStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.signalLevelStatus, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * set the current primary audio source of SMARTDEVICELINK (if selected).
- * @param primaryAudioSource the current primary audio source of SMARTDEVICELINK (if selected).
- */
- public void setPrimaryAudioSource(PrimaryAudioSource primaryAudioSource) {
- if (primaryAudioSource != null) {
- store.put(Names.primaryAudioSource, primaryAudioSource);
- } else {
- store.remove(Names.primaryAudioSource);
- }
- }
-
- /**
- * get the current primary audio source of SMARTDEVICELINK (if selected).
- * @return the current primary audio source of SMARTDEVICELINK (if selected).
- */
- public PrimaryAudioSource getPrimaryAudioSource() {
- Object obj = store.get(Names.primaryAudioSource);
- if (obj instanceof PrimaryAudioSource) {
- return (PrimaryAudioSource) obj;
- } else if (obj instanceof String) {
- PrimaryAudioSource theCode = null;
- try {
- theCode = PrimaryAudioSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.primaryAudioSource, e);
- }
- return theCode;
- }
- return null;
- }
- public void setECallEventActive(Boolean eCallEventActive) {
- if (eCallEventActive != null) {
- store.put(Names.eCallEventActive, eCallEventActive);
- } else {
- store.remove(Names.eCallEventActive);
- }
- }
- public Boolean getECallEventActive() {
- return (Boolean) store.get(Names.eCallEventActive);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumber.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumber.java
deleted file mode 100755
index 594da2df6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumber.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-public class DialNumber extends RPCRequest {
-
- public DialNumber() {
- super("DialNumber");
- }
- public DialNumber(Hashtable hash) {
- super(hash);
- }
- public String getNumber() {
- return (String) parameters.get(Names.number);
- }
- public void setNumber(String number) {
- if (number != null) {
- parameters.put(Names.number, number);
- } else {
- parameters.remove(Names.number);
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java
deleted file mode 100755
index bc0b5a298..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-public class DialNumberResponse extends RPCResponse {
-
- public DialNumberResponse() {
- super("DialNumber");
- }
- public DialNumberResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
deleted file mode 100755
index a098c8837..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.DisplayType;
-import com.smartdevicelink.proxy.rpc.enums.MediaClockFormat;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Contains information about the display for the SMARTDEVICELINK system to which the application is currently connected.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>displayType</td>
- * <td>DisplayType</td>
- * <td>The type of display
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>textField</td>
- * <td>TextField[]</td>
- * <td>An array of TextField structures, each of which describes a field in the HMI which the application can write to using operations such as <i>{@linkplain Show}</i>, <i>{@linkplain SetMediaClockTimer}</i>, etc.
- * This array of TextField structures identify all the text fields to which the application can write on the current display (identified by DisplayType ).
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>mediaClockFormats</td>
- * <td>MediaClockFormat[]</td>
- * <td>An array of MediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>graphicSupported</td>
- * <td>Boolean</td>
- * <td>The display's persistent screen supports referencing a static or dynamic image.</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class DisplayCapabilities extends RPCStruct {
- /**
- * Constructs a newly allocated DisplayCapabilities object
- */
- public DisplayCapabilities() { }
- /**
- * Constructs a newly allocated DisplayCapabilities object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public DisplayCapabilities(Hashtable hash) {
- super(hash);
- }
- /**
- * Get the type of display
- * @return the type of display
- */
- public DisplayType getDisplayType() {
- Object obj = store.get(Names.displayType);
- if (obj instanceof DisplayType) {
- return (DisplayType) obj;
- } else if (obj instanceof String) {
- DisplayType theCode = null;
- try {
- theCode = DisplayType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.displayType, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Set the type of display
- * @param displayType the display type
- */
- public void setDisplayType( DisplayType displayType ) {
- if (displayType != null) {
- store.put(Names.displayType, displayType );
- }
- }
- /**
- *Get an array of TextField structures, each of which describes a field in the HMI which the application can write to using operations such as <i>{@linkplain Show}</i>, <i>{@linkplain SetMediaClockTimer}</i>, etc.
- * This array of TextField structures identify all the text fields to which the application can write on the current display (identified by DisplayType ).
- * @return the Vector of textFields
- */
- public Vector<TextField> getTextFields() {
- if (store.get(Names.textFields) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get(Names.textFields);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TextField) {
- return (Vector<TextField>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TextField> newList = new Vector<TextField>();
- for (Object hashObj : list) {
- newList.add(new TextField((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Set an array of TextField structures, each of which describes a field in the HMI which the application can write to using operations such as <i>{@linkplain Show}</i>, <i>{@linkplain SetMediaClockTimer}</i>, etc.
- * This array of TextField structures identify all the text fields to which the application can write on the current display (identified by DisplayType ).
- * @param textFields the Vector of textFields
- */
- public void setTextFields( Vector<TextField> textFields ) {
- if (textFields != null) {
- store.put(Names.textFields, textFields );
- }
- }
- /**
- * Get an array of MediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field
- * @return the Veotor of mediaClockFormat
- */
- public Vector<MediaClockFormat> getMediaClockFormats() {
- if (store.get(Names.mediaClockFormats) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get(Names.mediaClockFormats);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof MediaClockFormat) {
- return (Vector<MediaClockFormat>) list;
- } else if (obj instanceof String) {
- Vector<MediaClockFormat> newList = new Vector<MediaClockFormat>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- MediaClockFormat toAdd = null;
- try {
- toAdd = MediaClockFormat.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse MediaClockFormat from " + getClass().getSimpleName() + "." + Names.mediaClockFormats, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Set an array of MediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field
- * @param mediaClockFormats the Vector of MediaClockFormat
- */
- public void setMediaClockFormats( Vector<MediaClockFormat> mediaClockFormats ) {
- if (mediaClockFormats != null) {
- store.put(Names.mediaClockFormats, mediaClockFormats );
- }
- }
-
- /**
- * set the display's persistent screen supports.
- * @param graphicSupported
- * @since SmartDeviceLink 2.0
- */
- public void setGraphicSupported(Boolean graphicSupported) {
- if (graphicSupported != null) {
- store.put(Names.graphicSupported, graphicSupported);
- } else {
- store.remove(Names.graphicSupported);
- }
- }
-
- /**
- * Get the display's persistent screen supports.
- * @return Boolean get the value of graphicSupported
- * @since SmartDeviceLink 2.0
- */
- public Boolean getGraphicSupported() {
- return (Boolean) store.get(Names.graphicSupported);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EVInfo.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EVInfo.java
deleted file mode 100755
index ae09e0f7a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EVInfo.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.MaintenanceModeStatus;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataActiveStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class EVInfo extends RPCStruct {
-
- public EVInfo() {}
- public EVInfo(Hashtable hash) {
- super(hash);
- }
- public void setElectricFuelConsumption(Double electricFuelConsumption) {
- if (electricFuelConsumption != null) {
- store.put(Names.electricFuelConsumption, electricFuelConsumption);
- } else {
- store.remove(Names.electricFuelConsumption);
- }
- }
- public Double getElectricFuelConsumption() {
- return (Double) store.get(Names.electricFuelConsumption);
- }
- public void setStateOfCharge(Double stateOfCharge) {
- if (stateOfCharge != null) {
- store.put(Names.stateOfCharge, stateOfCharge);
- } else {
- store.remove(Names.stateOfCharge);
- }
- }
- public Double getStateOfCharge() {
- return (Double) store.get(Names.stateOfCharge);
- }
- public void setFuelMaintenanceMode(MaintenanceModeStatus fuelMaintenanceMode) {
- if (fuelMaintenanceMode != null) {
- store.put(Names.fuelMaintenanceMode, fuelMaintenanceMode);
- } else {
- store.remove(Names.fuelMaintenanceMode);
- }
- }
- public MaintenanceModeStatus getFuelMaintenanceMode() {
- Object obj = store.get(Names.fuelMaintenanceMode);
- if (obj instanceof MaintenanceModeStatus) {
- return (MaintenanceModeStatus) obj;
- } else if (obj instanceof String) {
- MaintenanceModeStatus theCode = null;
- try {
- theCode = MaintenanceModeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelMaintenanceMode, e);
- }
- return theCode;
- }
- return null;
- }
- public void setDistanceToEmpty(Double distanceToEmpty) {
- if (distanceToEmpty != null) {
- store.put(Names.distanceToEmpty, distanceToEmpty);
- } else {
- store.remove(Names.distanceToEmpty);
- }
- }
- public Double getDistanceToEmpty() {
- return (Double) store.get(Names.distanceToEmpty);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPData.java
deleted file mode 100755
index ee3ffa8f2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPData.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-
-public class EncodedSyncPData extends RPCRequest {
-
- public EncodedSyncPData() {
- super("EncodedSyncPData");
- }
-
- public EncodedSyncPData(Hashtable hash) {
- super(hash);
- }
-
- public Vector<String> getData() {
- if (parameters.get(Names.data) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.data);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
-
- public void setData( Vector<String> data ) {
- if ( data!= null) {
- parameters.put(Names.data, data );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPDataResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPDataResponse.java
deleted file mode 100755
index 6d173f49b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EncodedSyncPDataResponse.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-
-public class EncodedSyncPDataResponse extends RPCResponse {
- public EncodedSyncPDataResponse() {
- super("EncodedSyncPData");
- }
- public EncodedSyncPDataResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
deleted file mode 100755
index a317c477b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-
-/**
- * When this request is invoked, the audio capture stops
- * <p>
- * Function Group: AudioPassThru
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- * @since SmartDeviceLink 2.0
- * @see PerformAudioPassThru
- */
-public class EndAudioPassThru extends RPCRequest {
-
- /**
- * Constructs a new EndAudioPassThru object
- */
- public EndAudioPassThru() {
- super("EndAudioPassThru");
- }
-
- /**
- * Constructs a new EndAudioPassThru object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public EndAudioPassThru(Hashtable hash) {
- super(hash);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
deleted file mode 100755
index 4cb1010a8..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * End Audio Pass Thru Response is sent, when EndAudioPassThru has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class EndAudioPassThruResponse extends RPCResponse {
-
- /**
- * Constructs a new EndAudioPassThruResponse object
- */
- public EndAudioPassThruResponse() {
- super("EndAudioPassThru");
- }
- public EndAudioPassThruResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/FuelEconomyInformation.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/FuelEconomyInformation.java
deleted file mode 100755
index c36f8b7bd..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/FuelEconomyInformation.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-public class FuelEconomyInformation extends RPCStruct {
-
- public FuelEconomyInformation() { }
- public FuelEconomyInformation(Hashtable hash) {
- super(hash);
- }
- public void setFuelEconomySinceLastReset(Double fuelEconomySinceLastReset) {
- if (fuelEconomySinceLastReset != null) {
- store.put(Names.fuelEconomySinceLastReset, fuelEconomySinceLastReset);
- } else {
- store.remove(Names.fuelEconomySinceLastReset);
- }
- }
- public Double getFuelEconomySinceLastReset() {
- return (Double) store.get(Names.fuelEconomySinceLastReset);
- }
- public void setCurrentTripFuelEconomy(Double currentTripFuelEconomy) {
- if (currentTripFuelEconomy != null) {
- store.put(Names.currentTripFuelEconomy, currentTripFuelEconomy);
- } else {
- store.remove(Names.currentTripFuelEconomy);
- }
- }
- public Double getCurrentTripFuelEconomy() {
- return (Double) store.get(Names.currentTripFuelEconomy);
- }
- public void setAverageTripFuelEconomy(Double averageTripFuelEconomy) {
- if (averageTripFuelEconomy != null) {
- store.put(Names.averageTripFuelEconomy, averageTripFuelEconomy);
- } else {
- store.remove(Names.averageTripFuelEconomy);
- }
- }
- public Double getAverageTripFuelEconomy() {
- return (Double) store.get(Names.averageTripFuelEconomy);
- }
- public void setCurrentCycleFuelEconomy(Double currentCycleFuelEconomy) {
- if (currentCycleFuelEconomy != null) {
- store.put(Names.currentCycleFuelEconomy, currentCycleFuelEconomy);
- } else {
- store.remove(Names.currentCycleFuelEconomy);
- }
- }
- public Double getCurrentCycleFuelEconomy() {
- return (Double) store.get(Names.currentCycleFuelEconomy);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GPSData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GPSData.java
deleted file mode 100755
index 1865a7e15..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GPSData.java
+++ /dev/null
@@ -1,524 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.CompassDirection;
-import com.smartdevicelink.proxy.rpc.enums.Dimension;
-import com.smartdevicelink.proxy.rpc.enums.DisplayType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Describes the GPS data. Not all data will be available on all carlines.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>longitudeDegrees</td>
- * <td>Double</td>
- * <td>Minvalue: - 180
- * <b>Maxvalue: 180
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>latitudeDegrees</td>
- * <td>Double</td>
- * <td>Minvalue: - 90<b>Maxvalue: 90
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>utcYear</td>
- * <td>Integer</td>
- * <td>Minvalue: 2010<b>Maxvalue: 2100
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>utcMonth</td>
- * <td>Integer</td>
- * <td>Minvalue: 1<b>Maxvalue: 12
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>utcDay</td>
- * <td>Integer</td>
- * <td>Minvalue: 1<b>Maxvalue: 31
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>utcHours</td>
- * <td>Integer</td>
- * <td>Minvalue: 1<b>Maxvalue: 23
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>utcMinutes</td>
- * <td>Integer</td>
- * <td>Minvalue: 1<b>Maxvalue: 59
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>utcSeconds</td>
- * <td>Integer</td>
- * <td>Minvalue: 1<b>Maxvalue: 59
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>pdop</td>
- * <td>Integer</td>
- * <td>Positional Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>hdop</td>
- * <td>Integer</td>
- * <td>Horizontal Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>vdop</td>
- * <td>Integer</td>
- * <td>Vertical Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>actual</td>
- * <td>Boolean</td>
- * <td>True, if coordinates are based on satellites.
- * False, if based on dead reckoning
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>satellites</td>
- * <td>Integer</td>
- * <td>Number of satellites in view
- * <b>Minvalue: 0
- * <b>Maxvalue: 31
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>altitude</td>
- * <td>Integer</td>
- * <td>Altitude in meters
- * <b>Minvalue: -10000
- * <b>Maxvalue: 10000
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>heading</td>
- * <td>Double</td>
- * <td>The heading. North is 0, East is 90, etc.
- * <b>Minvalue: 0
- * <b>Maxvalue: 359.99
- * <b>Resolution is 0.01
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>speed</td>
- * <td>Integer</td>
- * <td>The speed in KPH
- * <b>Minvalue: 0
- * <b>Maxvalue: 400
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class GPSData extends RPCStruct {
-
- /**
- * Constructs a newly allocated GPSData object
- */
- public GPSData() { }
-
- /**
- * Constructs a newly allocated GPSData object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public GPSData(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set longitude degrees
- * @param longitudeDegrees
- */
- public void setLongitudeDegrees(Double longitudeDegrees) {
- if (longitudeDegrees != null) {
- store.put(Names.longitudeDegrees, longitudeDegrees);
- } else {
- store.remove(Names.longitudeDegrees);
- }
- }
-
- /**
- * get longitude degrees
- * @return longitude degrees
- */
- public Double getLongitudeDegrees() {
- return (Double) store.get(Names.longitudeDegrees);
- }
-
- /**
- * set latitude degrees
- * @param latitudeDegrees latitude degrees
- */
- public void setLatitudeDegrees(Double latitudeDegrees) {
- if (latitudeDegrees != null) {
- store.put(Names.latitudeDegrees, latitudeDegrees);
- } else {
- store.remove(Names.latitudeDegrees);
- }
- }
-
- /**
- * get latitude degrees
- * @return latitude degrees
- */
- public Double getLatitudeDegrees() {
- return (Double) store.get(Names.latitudeDegrees);
- }
-
- /**
- * set utc year
- * @param utcYear utc year
- */
- public void setUtcYear(Integer utcYear) {
- if (utcYear != null) {
- store.put(Names.utcYear, utcYear);
- } else {
- store.remove(Names.utcYear);
- }
- }
-
- /**
- * get utc year
- * @return utc year
- */
- public Integer getUtcYear() {
- return (Integer) store.get(Names.utcYear);
- }
-
- /**
- * set utc month
- * @param utcMonth utc month
- */
- public void setUtcMonth(Integer utcMonth) {
- if (utcMonth != null) {
- store.put(Names.utcMonth, utcMonth);
- } else {
- store.remove(Names.utcMonth);
- }
- }
-
- /**
- * get utc month
- * @return utc month
- */
- public Integer getUtcMonth() {
- return (Integer) store.get(Names.utcMonth);
- }
-
- /**
- * set utc day
- * @param utcDay utc day
- */
- public void setUtcDay(Integer utcDay) {
- if (utcDay != null) {
- store.put(Names.utcDay, utcDay);
- } else {
- store.remove(Names.utcDay);
- }
- }
-
- /**
- * get utc day
- * @return utc day
- */
- public Integer getUtcDay() {
- return (Integer) store.get(Names.utcDay);
- }
-
- /**
- * set utc hours
- * @param utcHours utc hours
- */
- public void setUtcHours(Integer utcHours) {
- if (utcHours != null) {
- store.put(Names.utcHours, utcHours);
- } else {
- store.remove(Names.utcHours);
- }
- }
-
- /**
- * get utc hours
- * @return utc hours
- */
- public Integer getUtcHours() {
- return (Integer) store.get(Names.utcHours);
- }
-
- /**
- * set utc minutes
- * @param utcMinutes utc minutes
- */
- public void setUtcMinutes(Integer utcMinutes) {
- if (utcMinutes != null) {
- store.put(Names.utcMinutes, utcMinutes);
- } else {
- store.remove(Names.utcMinutes);
- }
- }
-
- /**
- * get utc minutes
- * @return utc minutes
- */
- public Integer getUtcMinutes() {
- return (Integer) store.get(Names.utcMinutes);
- }
-
- /**
- * set utc seconds
- * @param utcSeconds utc seconds
- */
- public void setUtcSeconds(Integer utcSeconds) {
- if (utcSeconds != null) {
- store.put(Names.utcSeconds, utcSeconds);
- } else {
- store.remove(Names.utcSeconds);
- }
- }
-
- /**
- * get utc seconds
- * @return utc seconds
- */
- public Integer getUtcSeconds() {
- return (Integer) store.get(Names.utcSeconds);
- }
- public void setCompassDirection(CompassDirection compassDirection) {
- if (compassDirection != null) {
- store.put(Names.compassDirection, compassDirection);
- } else {
- store.remove(Names.compassDirection);
- }
- }
- public CompassDirection getCompassDirection() {
- Object obj = store.get(Names.compassDirection);
- if (obj instanceof CompassDirection) {
- return (CompassDirection) obj;
- } else if (obj instanceof String) {
- CompassDirection theCode = null;
- try {
- theCode = CompassDirection.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.compassDirection, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * set the positional dilution of precision
- * @param pdop the positional dilution of precision
- */
- public void setPdop(Double pdop) {
- if (pdop != null) {
- store.put(Names.pdop, pdop);
- } else {
- store.remove(Names.pdop);
- }
- }
-
- /**
- * get the positional dilution of precision
- */
- public Double getPdop() {
- return (Double) store.get(Names.pdop);
- }
-
- /**
- * set the horizontal dilution of precision
- * @param hdop the horizontal dilution of precision
- */
- public void setHdop(Double hdop) {
- if (hdop != null) {
- store.put(Names.hdop, hdop);
- } else {
- store.remove(Names.hdop);
- }
- }
-
- /**
- * get the horizontal dilution of precision
- * @return the horizontal dilution of precision
- */
- public Double getHdop() {
- return (Double) store.get(Names.hdop);
- }
-
- /**
- * set the vertical dilution of precision
- * @param vdop the vertical dilution of precision
- */
- public void setVdop(Double vdop) {
- if (vdop != null) {
- store.put(Names.vdop, vdop);
- } else {
- store.remove(Names.vdop);
- }
- }
-
- /**
- * get the vertical dilution of precision
- * @return the vertical dilution of precision
- */
- public Double getVdop() {
- return (Double) store.get(Names.vdop);
- }
-
- /**
- * set what coordinates based on
- * @param actual True, if coordinates are based on satellites.False, if based on dead reckoning
- */
- public void setActual(Boolean actual) {
- if (actual != null) {
- store.put(Names.actual, actual);
- } else {
- store.remove(Names.actual);
- }
- }
-
- /**
- * get what coordinates based on
- * @return True, if coordinates are based on satellites.False, if based on dead reckoning
- */
- public Boolean getActual() {
- return (Boolean) store.get(Names.actual);
- }
-
- /**
- * set the number of satellites in view
- * @param satellites the number of satellites in view
- */
- public void setSatellites(Integer satellites) {
- if (satellites != null) {
- store.put(Names.satellites, satellites);
- } else {
- store.remove(Names.satellites);
- }
- }
-
- /**
- * get the number of satellites in view
- * @return the number of satellites in view
- */
- public Integer getSatellites() {
- return (Integer) store.get(Names.satellites);
- }
- public void setDimension(Dimension dimension) {
- if (dimension != null) {
- store.put(Names.dimension, dimension);
- } else {
- store.remove(Names.dimension);
- }
- }
- public Dimension getDimension() {
- Object obj = store.get(Names.dimension);
- if (obj instanceof Dimension) {
- return (Dimension) obj;
- } else if (obj instanceof String) {
- Dimension theCode = null;
- try {
- theCode = Dimension.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.dimension, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * set altitude in meters
- * @param altitude altitude in meters
- */
- public void setAltitude(Double altitude) {
- if (altitude != null) {
- store.put(Names.altitude, altitude);
- } else {
- store.remove(Names.altitude);
- }
- }
-
- /**
- * get altitude in meters
- * @return altitude in meters
- */
- public Double getAltitude() {
- return (Double) store.get(Names.altitude);
- }
-
- /**
- * set the heading.North is 0, East is 90, etc.
- * @param heading the heading.
- */
- public void setHeading(Double heading) {
- if (heading != null) {
- store.put(Names.heading, heading);
- } else {
- store.remove(Names.heading);
- }
- }
-
- /**
- * get the heading
- */
- public Double getHeading() {
- return (Double) store.get(Names.heading);
- }
-
- /**
- * set speed in KPH
- * @param speed the speed
- */
- public void setSpeed(Double speed) {
- if (speed != null) {
- store.put(Names.speed, speed);
- } else {
- store.remove(Names.speed);
- }
- }
-
- /**
- * get the speed in KPH
- * @return the speed in KPH
- */
- public Double getSpeed() {
- return (Double) store.get(Names.speed);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GenericResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GenericResponse.java
deleted file mode 100755
index 55c29f822..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GenericResponse.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Generic Response is sent, when the name of a received msg cannot be
- * retrieved. Only used in case of an error. Currently, only resultCode
- * INVALID_DATA is used.
-*/
-public class GenericResponse extends RPCResponse {
-
- public GenericResponse() {
- super("GenericResponse");
- }
- public GenericResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCs.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCs.java
deleted file mode 100755
index 7b7b1a27b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCs.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * This RPC allows to request diagnostic module trouble codes from a certain
- * vehicle module
- * <p>
- * Function Group: ProprietaryData
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * <p>
- */
-public class GetDTCs extends RPCRequest {
-
- /**
- * Constructs a new GetDTCs object
- */
- public GetDTCs() {
- super("GetDTCs");
- }
-
- /**
- * Constructs a new GetDTCs object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public GetDTCs(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a name of the module to receive the DTC form
- *
- * @param ecuName
- * an Integer value representing a name of the module to receive
- * the DTC form
- * <p>
- * <b>Notes: </b>Minvalue:0; Maxvalue:65535
- */
- public void setEcuName(Integer ecuName) {
- if (ecuName != null) {
- parameters.put(Names.ecuName, ecuName);
- } else {
- parameters.remove(Names.ecuName);
- }
- }
-
- /**
- * Gets a name of the module to receive the DTC form
- *
- * @return Integer -an Integer value representing a name of the module to
- * receive the DTC form
- */
- public Integer getEcuName() {
- return (Integer) parameters.get(Names.ecuName);
- }
- public void setDtcMask(Integer dtcMask) {
- if (dtcMask != null) {
- parameters.put(Names.dtcMask, dtcMask);
- } else {
- parameters.remove(Names.dtcMask);
- }
- }
- public Integer getDtcMask() {
- return (Integer) parameters.get(Names.dtcMask);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
deleted file mode 100755
index 98e116e06..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.MediaClockFormat;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Get DTCs Response is sent, when GetDTCs has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class GetDTCsResponse extends RPCResponse {
-
- public GetDTCsResponse() {
- super("GetDTCs");
- }
- public GetDTCsResponse(Hashtable hash) {
- super(hash);
- }
- public Vector<String> getDtc() {
- if(parameters.get(Names.dtc) instanceof Vector<?>){
- Vector<?> list = (Vector<?>)parameters.get(Names.dtc);
- if(list != null && list.size()>0){
- Object obj = list.get(0);
- if(obj instanceof String){
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
- public void setDtc(Vector<String> dtc) {
- if (dtc != null) {
- parameters.put(Names.dtc, dtc);
- } else {
- parameters.remove(Names.dtc);
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java
deleted file mode 100755
index 7d8668cb4..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java
+++ /dev/null
@@ -1,381 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
-
-public class GetVehicleData extends RPCRequest {
-
- public GetVehicleData() {
- super("GetVehicleData");
- }
- public GetVehicleData(Hashtable hash) {
- super(hash);
- }
- public void setGps(Boolean gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
- public Boolean getGps() {
- return (Boolean) parameters.get(Names.gps);
- }
- public void setSpeed(Boolean speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
- public Boolean getSpeed() {
- return (Boolean) parameters.get(Names.speed);
- }
- public void setRpm(Boolean rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
- public Boolean getRpm() {
- return (Boolean) parameters.get(Names.rpm);
- }
- public void setFuelLevel(Boolean fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
- public Boolean getFuelLevel() {
- return (Boolean) parameters.get(Names.fuelLevel);
- }
- public void setFuelLevel_State(Boolean fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
- public Boolean getFuelLevel_State() {
- return (Boolean) parameters.get(Names.fuelLevel_State);
- }
- public void setInstantFuelConsumption(Boolean instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
- public Boolean getInstantFuelConsumption() {
- return (Boolean) parameters.get(Names.instantFuelConsumption);
- }
- public void setExternalTemperature(Boolean externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
- public Boolean getExternalTemperature() {
- return (Boolean) parameters.get(Names.externalTemperature);
- }
-
- public void setVin(Boolean vin) {
- if (vin != null) {
- parameters.put(Names.vin, vin);
- } else {
- parameters.remove(Names.vin);
- }
- }
- public Boolean getVin() {
- return (Boolean) parameters.get(Names.vin);
- }
-
- public void setPrndl(Boolean prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
- public Boolean getPrndl() {
- return (Boolean) parameters.get(Names.prndl);
- }
- public void setTirePressure(Boolean tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
- public Boolean getTirePressure() {
- return (Boolean) parameters.get(Names.tirePressure);
- }
- public void setOdometer(Boolean odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
- public Boolean getOdometer() {
- return (Boolean) parameters.get(Names.odometer);
- }
- public void setBeltStatus(Boolean beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
- public Boolean getBeltStatus() {
- return (Boolean) parameters.get(Names.beltStatus);
- }
- public void setBodyInformation(Boolean bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
- public Boolean getBodyInformation() {
- return (Boolean) parameters.get(Names.bodyInformation);
- }
- public void setDeviceStatus(Boolean deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
- public Boolean getDeviceStatus() {
- return (Boolean) parameters.get(Names.deviceStatus);
- }
- public void setDriverBraking(Boolean driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
- public Boolean getDriverBraking() {
- return (Boolean) parameters.get(Names.driverBraking);
- }
- public void setWiperStatus(Boolean wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
- public Boolean getWiperStatus() {
- return (Boolean) parameters.get(Names.wiperStatus);
- }
- public void setFuelEconomy(Boolean fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
- public Boolean getFuelEconomy() {
- return (Boolean) parameters.get(Names.fuelEconomy);
- }
- public void setEngineOilLife(Boolean engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
- public Boolean getEngineOilLife() {
- return (Boolean) parameters.get(Names.engineOilLife);
- }
- public void setHeadLampStatus(Boolean headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
- public Boolean getHeadLampStatus() {
- return (Boolean) parameters.get(Names.headLampStatus);
- }
- public void setBatteryVoltage(Boolean batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
- public Boolean getBatteryVoltage() {
- return (Boolean) parameters.get(Names.batteryVoltage);
- }
- public void setBrakeTorque(Boolean brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
- public Boolean getBrakeTorque() {
- return (Boolean) parameters.get(Names.brakeTorque);
- }
- public void setEngineTorque(Boolean engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
- public Boolean getEngineTorque() {
- return (Boolean) parameters.get(Names.engineTorque);
- }
- public void setTurboBoost(Boolean turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
- public Boolean getTurboBoost() {
- return (Boolean) parameters.get(Names.turboBoost);
- }
- public void setCoolantTemp(Boolean coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
- public Boolean getCoolantTemp() {
- return (Boolean) parameters.get(Names.coolantTemp);
- }
- public void setAirFuelRatio(Boolean airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
- public Boolean getAirFuelRatio() {
- return (Boolean) parameters.get(Names.airFuelRatio);
- }
- public void setCoolingHeadTemp(Boolean coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
- public Boolean getCoolingHeadTemp() {
- return (Boolean) parameters.get(Names.coolingHeadTemp);
- }
- public void setOilTemp(Boolean oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
- public Boolean getOilTemp() {
- return (Boolean) parameters.get(Names.oilTemp);
- }
- public void setIntakeAirTemp(Boolean intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
- public Boolean getIntakeAirTemp() {
- return (Boolean) parameters.get(Names.intakeAirTemp);
- }
- public void setGearShiftAdvice(Boolean gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
- public Boolean getGearShiftAdvice() {
- return (Boolean) parameters.get(Names.gearShiftAdvice);
- }
- public void setAcceleration(Boolean acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
- public Boolean getAcceleration() {
- return (Boolean) parameters.get(Names.acceleration);
- }
- public void setAccPedalPosition(Boolean accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
- public Boolean getAccPedalPosition() {
- return (Boolean) parameters.get(Names.accPedalPosition);
- }
- public void setClutchPedalPosition(Boolean clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
- public Boolean getClutchPedalPosition() {
- return (Boolean) parameters.get(Names.clutchPedalPosition);
- }
- public void setReverseGearStatus(Boolean reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
- public Boolean getReverseGearStatus() {
- return (Boolean) parameters.get(Names.reverseGearStatus);
- }
- public void setAccTorque(Boolean accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
- public Boolean getAccTorque() {
- return (Boolean) parameters.get(Names.accTorque);
- }
- public void setEvInfo(Boolean evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
- public Boolean getEvInfo() {
- return (Boolean) parameters.get(Names.evInfo);
- }
- public void setAmbientLightStatus(Boolean ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
- public Boolean getAmbientLightStatus() {
- return (Boolean) parameters.get(Names.ambientLightStatus);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
deleted file mode 100755
index 13341bac1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
+++ /dev/null
@@ -1,550 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AmbientLightStatus;
-import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
-import com.smartdevicelink.proxy.rpc.enums.GearShiftAdviceStatus;
-import com.smartdevicelink.proxy.rpc.enums.PRNDL;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataActiveStatus;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
-import com.smartdevicelink.proxy.rpc.enums.WiperStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class GetVehicleDataResponse extends RPCResponse {
-
- public GetVehicleDataResponse() {
- super("GetVehicleData");
- }
- public GetVehicleDataResponse(Hashtable hash) {
- super(hash);
- }
- public void setGps(GPSData gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
- public GPSData getGps() {
- Object obj = parameters.get(Names.gps);
- if (obj instanceof GPSData) {
- return (GPSData) obj;
- } else {
- GPSData theCode = null;
- try {
- theCode = new GPSData((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gps, e);
- }
- return theCode;
- }
- }
- public void setSpeed(Double speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
- public Double getSpeed() {
- return (Double) parameters.get(Names.speed);
- }
- public void setRpm(Integer rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
- public Integer getRpm() {
- return (Integer) parameters.get(Names.rpm);
- }
- public void setFuelLevel(Double fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
- public Double getFuelLevel() {
- return (Double) parameters.get(Names.fuelLevel);
- }
- public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
- public ComponentVolumeStatus getFuelLevel_State() {
- Object obj = parameters.get(Names.fuelLevel_State);
- if (obj instanceof ComponentVolumeStatus) {
- return (ComponentVolumeStatus) obj;
- } else if (obj instanceof String) {
- ComponentVolumeStatus theCode = null;
- try {
- theCode = ComponentVolumeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelLevel_State, e);
- }
- return theCode;
- }
- return null;
- }
- public void setInstantFuelConsumption(Double instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
- public Double getInstantFuelConsumption() {
- return (Double) parameters.get(Names.instantFuelConsumption);
- }
- public void setExternalTemperature(Double externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
- public Double getExternalTemperature() {
- return (Double) parameters.get(Names.externalTemperature);
- }
- public void setVin(String vin) {
- if (vin != null) {
- parameters.put(Names.vin, vin);
- } else {
- parameters.remove(Names.vin);
- }
- }
- public String getVin() {
- return (String) parameters.get(Names.vin);
- }
- public void setPrndl(PRNDL prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
- public PRNDL getPrndl() {
- Object obj = parameters.get(Names.prndl);
- if (obj instanceof PRNDL) {
- return (PRNDL) obj;
- } else if (obj instanceof String) {
- PRNDL theCode = null;
- try {
- theCode = PRNDL.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.prndl, e);
- }
- return theCode;
- }
- return null;
- }
- public void setTirePressure(TireStatus tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
- public TireStatus getTirePressure() {
- Object obj = parameters.get(Names.tirePressure);
- if (obj instanceof TireStatus) {
- return (TireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new TireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.tirePressure, e);
- }
- }
- return null;
- }
- public void setOdometer(Integer odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
- public Integer getOdometer() {
- return (Integer) parameters.get(Names.odometer);
- }
- public void setBeltStatus(BeltStatus beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
- public BeltStatus getBeltStatus() {
- Object obj = parameters.get(Names.beltStatus);
- if (obj instanceof BeltStatus) {
- return (BeltStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new BeltStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.beltStatus, e);
- }
- }
- return null;
- }
- public void setBodyInformation(BodyInformation bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
- public BodyInformation getBodyInformation() {
- Object obj = parameters.get(Names.bodyInformation);
- if (obj instanceof BodyInformation) {
- return (BodyInformation) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new BodyInformation((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.bodyInformation, e);
- }
- }
- return null;
- }
- public void setDeviceStatus(DeviceStatus deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
- public DeviceStatus getDeviceStatus() {
- Object obj = parameters.get(Names.deviceStatus);
- if (obj instanceof DeviceStatus) {
- return (DeviceStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new DeviceStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.deviceStatus, e);
- }
- }
- return null;
- }
- public void setDriverBraking(VehicleDataEventStatus driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
- public VehicleDataEventStatus getDriverBraking() {
- Object obj = parameters.get(Names.driverBraking);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.driverBraking, e);
- }
- return theCode;
- }
- return null;
- }
- public void setWiperStatus(WiperStatus wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
- public WiperStatus getWiperStatus() {
- Object obj = parameters.get(Names.wiperStatus);
- if (obj instanceof WiperStatus) {
- return (WiperStatus) obj;
- } else if (obj instanceof String) {
- WiperStatus theCode = null;
- try {
- theCode = WiperStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.wiperStatus, e);
- }
- return theCode;
- }
- return null;
- }
- public void setFuelEconomy(FuelEconomyInformation fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
- public FuelEconomyInformation getFuelEconomy() {
- Object obj = parameters.get(Names.fuelEconomy);
- if (obj instanceof FuelEconomyInformation) {
- return (FuelEconomyInformation) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new FuelEconomyInformation((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelEconomy, e);
- }
- }
- return null;
- }
- public void setEngineOilLife(Integer engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
- public Integer getEngineOilLife() {
- return (Integer) parameters.get(Names.engineOilLife);
- }
- public void setHeadLampStatus(HeadLampStatus headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
- public HeadLampStatus getHeadLampStatus() {
- Object obj = parameters.get(Names.headLampStatus);
- if (obj instanceof HeadLampStatus) {
- return (HeadLampStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new HeadLampStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.headLampStatus, e);
- }
- }
- return null;
- }
- public void setBatteryVoltage(Double batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
- public Double getBatteryVoltage() {
- return (Double) parameters.get(Names.batteryVoltage);
- }
- public void setBrakeTorque(Double brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
- public Double getBrakeTorque() {
- return (Double) parameters.get(Names.brakeTorque);
- }
- public void setEngineTorque(Double engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
- public Double getEngineTorque() {
- return (Double) parameters.get(Names.engineTorque);
- }
- public void setTurboBoost(Double turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
- public Double getTurboBoost() {
- return (Double) parameters.get(Names.turboBoost);
- }
- public void setCoolantTemp(Double coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
- public Double getCoolantTemp() {
- return (Double) parameters.get(Names.coolantTemp);
- }
- public void setAirFuelRatio(Double airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
- public Double getAirFuelRatio() {
- return (Double) parameters.get(Names.airFuelRatio);
- }
- public void setCoolingHeadTemp(Double coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
- public Double getCoolingHeadTemp() {
- return (Double) parameters.get(Names.coolingHeadTemp);
- }
- public void setOilTemp(Double oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
- public Double getOilTemp() {
- return (Double) parameters.get(Names.oilTemp);
- }
- public void setIntakeAirTemp(Double intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
- public Double getIntakeAirTemp() {
- return (Double) parameters.get(Names.intakeAirTemp);
- }
- public void setGearShiftAdvice(GearShiftAdviceStatus gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
- public GearShiftAdviceStatus getGearShiftAdvice() {
- Object obj = parameters.get(Names.gearShiftAdvice);
- if (obj instanceof GearShiftAdviceStatus) {
- return (GearShiftAdviceStatus) obj;
- } else if (obj instanceof String) {
- GearShiftAdviceStatus theCode = null;
- try {
- theCode = GearShiftAdviceStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gearShiftAdvice, e);
- }
- return theCode;
- }
- return null;
- }
- public void setAcceleration(Double acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
- public Double getAcceleration() {
- return (Double) parameters.get(Names.acceleration);
- }
- public void setAccPedalPosition(Double accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
- public Double getAccPedalPosition() {
- return (Double) parameters.get(Names.accPedalPosition);
- }
- public void setClutchPedalPosition(Double clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
- public Double getClutchPedalPosition() {
- return (Double) parameters.get(Names.clutchPedalPosition);
- }
- public void setReverseGearStatus(VehicleDataActiveStatus reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
- public VehicleDataActiveStatus getReverseGearStatus() {
- Object obj = parameters.get(Names.reverseGearStatus);
- if (obj instanceof VehicleDataActiveStatus) {
- return (VehicleDataActiveStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataActiveStatus theCode = null;
- try {
- theCode = VehicleDataActiveStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.reverseGearStatus, e);
- }
- return theCode;
- }
- return null;
- }
- public void setAccTorque(Double accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
- public Double getAccTorque() {
- return (Double) parameters.get(Names.accTorque);
- }
- public void setEvInfo(EVInfo evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
- public EVInfo getEvInfo() {
- Object obj = parameters.get(Names.evInfo);
- if (obj instanceof EVInfo) {
- return (EVInfo) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new EVInfo((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.evInfo, e);
- }
- }
- return null;
- }
- public void setAmbientLightStatus(AmbientLightStatus ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
- public AmbientLightStatus getAmbientLightStatus() {
- Object obj = parameters.get(Names.ambientLightStatus);
- if (obj instanceof AmbientLightStatus) {
- return (AmbientLightStatus) obj;
- } else if (obj instanceof String) {
- AmbientLightStatus theCode = null;
- try {
- theCode = AmbientLightStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.ambientLightStatus, e);
- }
- return theCode;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java
deleted file mode 100755
index 3f9a73471..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java
+++ /dev/null
@@ -1,147 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Defining sets of HMI levels, which are permitted or prohibited for a given RPC.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>allowed</td>
- * <td>HMILevel</td>
- * <td>A set of all HMI levels that are permitted for this given RPC.
- * <ul>
- * <li>Min: 0</li>
- * <li>Max: 100</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>userDisallowed</td>
- * <td>HMILevel</td>
- * <td>A set of all HMI levels that are prohibated for this given RPC.
- * <ul>
- * <li>Min: 0</li>
- * <li>Max: 100</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class HMIPermissions extends RPCStruct {
-
- /**
- * Constructs a newly allocated HMIPermissions object
- */
- public HMIPermissions() { }
-
- /**
- * Constructs a newly allocated HMIPermissions object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public HMIPermissions(Hashtable hash) {
- super(hash);
- }
-
- /**
- * get a set of all HMI levels that are permitted for this given RPC.
- * @return a set of all HMI levels that are permitted for this given RPC
- */
- public Vector<HMILevel> getAllowed() {
- if (store.get(Names.allowed) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get(Names.allowed);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof HMILevel) {
- return (Vector<HMILevel>) list;
- } else if (obj instanceof String) {
- Vector<HMILevel> newList = new Vector<HMILevel>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- HMILevel toAdd = null;
- try {
- toAdd = HMILevel.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.allowed, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * set HMI level that is permitted for this given RPC.
- * @param allowed HMI level that is permitted for this given RPC
- */
- public void setAllowed(HMILevel allowed) {
- if (allowed != null) {
- store.put(Names.allowed, allowed);
- } else {
- store.remove(Names.allowed);
- }
- }
-
- /**
- * get a set of all HMI levels that are prohibited for this given RPC
- * @return a set of all HMI levels that are prohibited for this given RPC
- */
- public Vector<HMILevel> getUserDisallowed() {
- if (store.get(Names.userDisallowed) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get(Names.userDisallowed);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof HMILevel) {
- return (Vector<HMILevel>) list;
- } else if (obj instanceof String) {
- Vector<HMILevel> newList = new Vector<HMILevel>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- HMILevel toAdd = null;
- try {
- toAdd = HMILevel.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.userDisallowed, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * set a set of all HMI levels that are prohibited for this given RPC
- * @param userDisallowed HMI level that is prohibited for this given RPC
- */
- public void setUserDisallowed(HMILevel userDisallowed) {
- if (userDisallowed != null) {
- store.put(Names.userDisallowed, userDisallowed);
- } else {
- store.remove(Names.userDisallowed);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
deleted file mode 100755
index ab2860458..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.LightSwitchStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class HeadLampStatus extends RPCStruct {
-
- public HeadLampStatus() {}
- public HeadLampStatus(Hashtable hash) {
- super(hash);
- }
- public void setLightSwitchStatus(LightSwitchStatus lightSwitchStatus) {
- if (lightSwitchStatus != null) {
- store.put(Names.lightSwitchStatus, lightSwitchStatus);
- } else {
- store.remove(Names.lightSwitchStatus);
- }
- }
- public LightSwitchStatus getLightSwitchStatus() {
- Object obj = store.get(Names.lightSwitchStatus);
- if (obj instanceof LightSwitchStatus) {
- return (LightSwitchStatus) obj;
- } else if (obj instanceof String) {
- LightSwitchStatus theCode = null;
- try {
- theCode = LightSwitchStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.lightSwitchStatus, e);
- }
- return theCode;
- }
- return null;
- }
- public void setHighBeamsOn(Boolean highBeamsOn) {
- if (highBeamsOn != null) {
- store.put(Names.highBeamsOn, highBeamsOn);
- } else {
- store.remove(Names.highBeamsOn);
- }
- }
- public Boolean getHighBeamsOn() {
- return (Boolean) store.get(Names.highBeamsOn);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Image.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Image.java
deleted file mode 100755
index 22ea8a8f9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Image.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ImageType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- *Specifies, which image shall be used, e.g. in Alerts or on Softbuttons provided the display supports it.
- *<p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>value</td>
- * <td>String</td>
- * <td>Either the static hex icon value or the binary image file name identifier (sent by PutFile).
- * <ul>
- * <li>Min: 0</li>
- * <li>Max: 65535</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>imageType</td>
- * <td>ImageType</td>
- * <td>Describes, whether it is a static or dynamic image.</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class Image extends RPCStruct {
-
- /**
- * Constructs a newly allocated Image object
- */
- public Image() { }
-
- /**
- * Constructs a newly allocated Image object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public Image(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set either the static hex icon value or the binary image file name identifier (sent by PutFile)
- * @param value either the static hex icon value or the binary image file name identifier (sent by PutFile)
- */
- public void setValue(String value) {
- if (value != null) {
- store.put(Names.value, value);
- } else {
- store.remove(Names.value);
- }
- }
-
- /**
- * get either the static hex icon value or the binary image file name identifier (sent by PutFile)
- * @return either the static hex icon value or the binary image file name identifier (sent by PutFile)
- */
- public String getValue() {
- return (String) store.get(Names.value);
- }
-
- /**
- * set the image type
- * @param imageType whether it is a static or dynamic image
- */
- public void setImageType(ImageType imageType) {
- if (imageType != null) {
- store.put(Names.imageType, imageType);
- } else {
- store.remove(Names.imageType);
- }
- }
-
- /**
- * get image type
- * @return the image type
- */
- public ImageType getImageType() {
- Object obj = store.get(Names.imageType);
- if (obj instanceof ImageType) {
- return (ImageType) obj;
- } else if (obj instanceof String) {
- ImageType theCode = null;
- try {
- theCode = ImageType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.imageType, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFiles.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFiles.java
deleted file mode 100755
index 514bfddea..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFiles.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-
-/**
- * Requests the current list of resident filenames for the registered app. Not
- * supported on First generation SMARTDEVICELINK vehicles
- * <p>
- *
- * @since SmartDeviceLink 2.0
- */
-public class ListFiles extends RPCRequest {
-
- /**
- * Constructs a new ListFiles object
- */
- public ListFiles() {
- super("ListFiles");
- }
-
- /**
- * Constructs a new ListFiles object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ListFiles(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
deleted file mode 100755
index 6dfc5aaa4..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * List Files Response is sent, when ListFiles has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class ListFilesResponse extends RPCResponse {
-
- /**
- * Constructs a new ListFilesResponse object
- */
- public ListFilesResponse() {
- super("ListFiles");
- }
- public ListFilesResponse(Hashtable hash) {
- super(hash);
- }
- public void setFilenames(Vector<String> filenames) {
- if (filenames != null) {
- parameters.put(Names.filenames, filenames);
- } else {
- parameters.remove(Names.filenames);
- }
- }
- public Vector<String> getFilenames() {
- if (parameters.get(Names.filenames) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.filenames);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
- public void setSpaceAvailable(Integer spaceAvailable) {
- if (spaceAvailable != null) {
- parameters.put(Names.spaceAvailable, spaceAvailable);
- } else {
- parameters.remove(Names.spaceAvailable);
- }
- }
- public Integer getSpaceAvailable() {
- return (Integer) parameters.get(Names.spaceAvailable);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/MenuParams.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/MenuParams.java
deleted file mode 100755
index 2d4235a45..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/MenuParams.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-/**
- * Used when adding a sub menu to an application menu or existing sub menu.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>parentID</td>
- * <td>Int32</td>
- * <td>The unique ID of an existing submenu to which a command will be added.
- * If this element is not provided, the command will be added to the top level of the Command Menu.
- * <ul>
- * <li>Min: 0</li>
- * <li>Max: 2000000000</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>position</td>
- * <td>Int16</td>
- * <td>Position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
- * Position of any submenu will always be located before the return and exit options.
- * <ul>
- * <li>Min Value: 0</li>
- * <li>Max Value: 1000</li>
- * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
- * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>menuName</td>
- * <td>String</td>
- * <td>Text which appears in menu, representing this command.
- * <ul>
- * <li>Min: 1</li>
- * <li>Max: 100</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class MenuParams extends RPCStruct {
- /**
- * Constructs a newly allocated MenuParams object
- */
- public MenuParams() { }
- /**
- * Constructs a newly allocated MenuParams object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public MenuParams(Hashtable hash) {
- super(hash);
- }
- /**
- * Get the unique ID of an existing submenu to which a command will be added.
- * If this element is not provided, the command will be added to the top level of the Command Menu.
- * @return parentID Min: 0 Max: 2000000000
- */
- public Integer getParentID() {
- return (Integer) store.get( Names.parentID );
- }
- /**
- * Set the unique ID of an existing submenu to which a command will be added.
- * If this element is not provided, the command will be added to the top level of the Command Menu.
- * @param parentID Min: 0; Max: 2000000000
- */
- public void setParentID( Integer parentID ) {
- if (parentID != null) {
- store.put(Names.parentID, parentID );
- }
- }
- /**
- * Get the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
- * Position of any submenu will always be located before the return and exit options.
- * <ul>
- * <li>Min Value: 0</li>
- * <li>Max Value: 1000</li>
- * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
- * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
- * </ul>
- * @return the position within the items of the parent Command Menu
- */
- public Integer getPosition() {
- return (Integer) store.get( Names.position );
- }
- /**
- * Set the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
- * Position of any submenu will always be located before the return and exit options.
- * <ul>
- * <li>Min Value: 0</li>
- * <li>Max Value: 1000</li>
- * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
- * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
- * </ul>
- * @param position Mix: 0 Max: 1000
- */
- public void setPosition( Integer position ) {
- if (position != null) {
- store.put(Names.position, position );
- }
- }
- /**
- * Get the text which appears in menu, representing this command.
- * <ul>
- * <li>Min: 1</li>
- * <li>Max: 100</li>
- * </ul>
- * @return menuName the menu name
- */
-
- public String getMenuName() {
- return (String) store.get( Names.menuName );
- }
- /**
- * Set text which appears in menu, representing this command.
- * <ul>
- * <li>Min: 1</li>
- * <li>Max: 100</li>
- * </ul>
- * @param menuName the menu name
- */
-
- public void setMenuName( String menuName ) {
- if (menuName != null) {
- store.put(Names.menuName, menuName );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
deleted file mode 100755
index a1cb45d3f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AppInterfaceUnregisteredReason;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * <p>Notifies an application that its interface registration has been terminated. This means that all SMARTDEVICELINK resources
- * associated with the application are discarded, including the Command Menu, Choice Sets, button subscriptions, etc.</p>
- * For more information about SMARTDEVICELINK resources related to an interface registration, see {@linkplain RegisterAppInterface}.
- * <p></p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul><li>Any</li></ul>
- * AudioStreamingState:
- * <ul><li>Any</li></ul>
- * SystemContext:
- * <ul><li>Any</li></ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>reason</td>
- * <td>{@linkplain AppInterfaceUnregisteredReason}</td>
- * <td>The reason the application's interface registration was terminated</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * </p>
- * @since SmartDeviceLink 1.0
- * @see RegisterAppInterface
- */
-public class OnAppInterfaceUnregistered extends RPCNotification {
- /**
- *Constructs a newly allocated OnAppInterfaceUnregistered object
- */
- public OnAppInterfaceUnregistered() {
- super("OnAppInterfaceUnregistered");
- }
- /**
- *<p>Constructs a newly allocated OnAppInterfaceUnregistered object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnAppInterfaceUnregistered(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Get the reason the registration was terminated</p>
- * @return {@linkplain AppInterfaceUnregisteredReason} the reason the application's interface registration was terminated
- */
- public AppInterfaceUnregisteredReason getReason() {
- Object obj = parameters.get(Names.reason);
- if (obj instanceof AppInterfaceUnregisteredReason) {
- return (AppInterfaceUnregisteredReason) obj;
- } else if (obj instanceof String) {
- AppInterfaceUnregisteredReason theCode = null;
- try {
- theCode = AppInterfaceUnregisteredReason.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.reason, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the reason application's interface was terminated</p>
- * @param reason The reason application's interface registration was terminated
- */
- public void setReason( AppInterfaceUnregisteredReason reason ) {
- if (reason != null) {
- parameters.put(Names.reason, reason );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
deleted file mode 100755
index 776f43770..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Binary data is in binary part of hybrid msg.
- * <p>
- * </p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul>
- * <li>BACKGROUND, FULL, LIMITED</li>
- * </ul>
- * AudioStreamingState:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * SystemContext:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Req</th>
- * <th>Notes</th>
- * <th>Applink Ver Available</th>
- * </tr>
-
- * </table>
- * </p>
- *
- */
-public class OnAudioPassThru extends RPCNotification {
- /**
- *Constructs a newly allocated OnCommand object
- */
- public OnAudioPassThru() {
- super("OnAudioPassThru");
- }
- /**
- *<p>Constructs a newly allocated OnAudioPassThru object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnAudioPassThru(Hashtable hash) {
- super(hash);
- }
- public void setAPTData(byte[] aptData) {
- if (aptData != null) {
- store.put(Names.bulkData, aptData);
- } else {
- store.remove(Names.bulkData);
- }
- }
- public byte[] getAPTData() {
- return (byte[]) store.get(Names.bulkData);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
deleted file mode 100755
index 026e1e6ea..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ButtonEventMode;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Notifies application that user has depressed or released a button to which
- * the application has subscribed.</br> Further information about button events
- * and button-presses can be found at {@linkplain SubscribeButton}.
- * <p>
- * </p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul>
- * <li>The application will receive OnButtonEvent notifications for all
- * subscribed buttons when HMILevel is FULL.</li>
- * <li>The application will receive OnButtonEvent notifications for subscribed
- * media buttons when HMILevel is LIMITED.</li>
- * <li>Media buttons include SEEKLEFT, SEEKRIGHT, TUNEUP, TUNEDOWN, and
- * PRESET_0-PRESET_9.</li>
- * <li>The application will not receive OnButtonEvent notification when HMILevel
- * is BACKGROUND.</li>
- * </ul>
- * AudioStreamingState:
- * <ul>
- * <li> Any </li>
- * </ul>
- * SystemContext:
- * <ul>
- * <li>MAIN, VR. In MENU, only PRESET buttons. In VR, pressing any subscribable
- * button will cancel VR.</li>
- * </ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Req</th>
- * <th>Notes</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>buttonName</td>
- * <td>{@linkplain ButtonName}</td>
- * <td>Name of the button which triggered this event</td>
- * <td></td>
- * <td></td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>buttonEventMode</td>
- * <td>{@linkplain ButtonEventMode}</td>
- * <td>Indicats button was depressed (DOWN) or released (UP)</td>
- * <td></td>
- * <td></td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>customButtonID</td>
- * <td>Integer</td>
- * <td>If ButtonName is ¡°CUSTOM_BUTTON", this references the integer ID passed
- * by a custom button. (e.g. softButton ID)</td>
- * <td>N</td>
- * <td>Minvalue=0 Maxvalue=65536</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- *
- * @see SubscribeButton
- * @see UnsubscribeButton
- *
- *
- */
-public class OnButtonEvent extends RPCNotification {
- /**
- *Constructs a newly allocated OnButtonEvent object
- */
- public OnButtonEvent() {
- super("OnButtonEvent");
- }
- /**
- * <p>
- * Constructs a newly allocated OnButtonEvent object indicated by the
- * Hashtable parameter
- * </p>
- *
- * @param hash
- * The Hashtable to use
- */
- public OnButtonEvent(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Returns <i>{@linkplain ButtonName}</i> the button's name</p>
- * @return ButtonName Name of the button
- */
- public ButtonName getButtonName() {
- Object obj = parameters.get(Names.buttonName);
- if (obj instanceof ButtonName) {
- return (ButtonName) obj;
- } else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.buttonName, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the button's name</p>
- * @param buttonName name of the button
- */
- public void setButtonName(ButtonName buttonName) {
- if (buttonName != null) {
- parameters.put(Names.buttonName, buttonName);
- } else {
- parameters.remove(Names.buttonName);
- }
- }
- /**
- * <p>Return <i>{@linkplain ButtonEventMode} indicates the button was depressed or released</i></p>
- * @return ButtonEventMode the button depressed or released
- */
- public ButtonEventMode getButtonEventMode() {
- Object obj = parameters.get(Names.buttonEventMode);
- if (obj instanceof ButtonEventMode) {
- return (ButtonEventMode) obj;
- } else if (obj instanceof String) {
- ButtonEventMode theCode = null;
- try {
- theCode = ButtonEventMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.buttonEventMode, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p> Set the event mode of the button,pressed or released
- * @param buttonEventMode indicates the button is pressed or released
- * @see ButtonEventMode
- */
- public void setButtonEventMode(ButtonEventMode buttonEventMode) {
- if (buttonEventMode != null) {
- parameters.put(Names.buttonEventMode, buttonEventMode);
- } else {
- parameters.remove(Names.buttonEventMode);
- }
- }
- public void setCustomButtonID(Integer customButtonID) {
- if (customButtonID != null) {
- parameters.put(Names.customButtonID, customButtonID);
- } else {
- parameters.remove(Names.customButtonID);
- }
- }
- public Integer getCustomButtonID() {
- return (Integer) parameters.get(Names.customButtonID);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java
deleted file mode 100755
index db80d8e3c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.proxy.rpc.enums.ButtonPressMode;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * <p>
- * Notifies application of button press events for buttons to which the
- * application is subscribed. SMARTDEVICELINK supports two button press events defined as
- * follows:
- * </p>
- * <ul>
- * <li>SHORT - Occurs when a button is depressed, then released within two
- * seconds. The event is considered to occur immediately after the button is
- * released.</li>
- * <li>LONG - Occurs when a button is depressed and held for two seconds or
- * more. The event is considered to occur immediately after the two second
- * threshold has been crossed, before the button is released</li>
- * </ul>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul>
- * <li>The application will receive OnButtonPress notifications for all
- * subscribed buttons when HMILevel is FULL.</li>
- * <li>The application will receive OnButtonPress notifications for subscribed
- * media buttons when HMILevel is LIMITED.</li>
- * <li>Media buttons include SEEKLEFT, SEEKRIGHT, TUNEUP, TUNEDOWN, and
- * PRESET_0-PRESET_9.</li>
- * <li>The application will not receive OnButtonPress notification when HMILevel
- * is BACKGROUND or NONE.</li>
- * </ul>
- * AudioStreamingState:
- * <ul>
- * <li> Any </li>
- * </ul>
- * SystemContext:
- * <ul>
- * <li>MAIN, VR. In MENU, only PRESET buttons. In VR, pressing any subscribable
- * button will cancel VR.</li>
- * </ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Req</th>
- * <th>Notes</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>buttonName</td>
- * <td>{@linkplain ButtonName}</td>
- * <td>Name of the button which triggered this event</td>
- * <td></td>
- * <td></td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>buttonPressMode</td>
- * <td>{@linkplain ButtonPressMode}</td>
- * <td>Indicates whether this is an SHORT or LONG button press event.</td>
- * <td></td>
- * <td></td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>customButtonID</td>
- * <td>Integer</td>
- * <td>If ButtonName is ¡°CUSTOM_BUTTON", this references the integer ID passed
- * by a custom button. (e.g. softButton ID)</td>
- * <td>N</td>
- * <td>Minvalue=0 Maxvalue=65536</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see SubscribeButton
- * @see UnsubscribeButton
- */
-public class OnButtonPress extends RPCNotification {
- /**
- *Constructs a newly allocated OnButtonPress object
- */
- public OnButtonPress() {
- super("OnButtonPress");
- }
- /**
- * <p>
- * Constructs a newly allocated OnButtonPress object indicated by the
- * Hashtable parameter
- * </p>
- *
- * @param hash
- * The Hashtable to use
- */
- public OnButtonPress(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Returns an <i>{@linkplain ButtonName}</i> the button's name</p>
- * @return ButtonName Name of the button
- */
- public ButtonName getButtonName() {
- Object obj = parameters.get(Names.buttonName);
- if (obj instanceof ButtonName) {
- return (ButtonName) obj;
- } else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.buttonName, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the button's name</p>
- * @param buttonName name of the button
- */
- public void setButtonName( ButtonName buttonName ) {
- if (buttonName != null) {
- parameters.put(Names.buttonName, buttonName );
- }
- }
- /**<p>Returns <i>{@linkplain ButtonPressMode}</i></p>
- * @return ButtonPressMode whether this is a long or short button press event
- */
- public ButtonPressMode getButtonPressMode() {
- Object obj = parameters.get(Names.buttonPressMode);
- if (obj instanceof ButtonPressMode) {
- return (ButtonPressMode) obj;
- } else if (obj instanceof String) {
- ButtonPressMode theCode = null;
- try {
- theCode = ButtonPressMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.buttonPressMode, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the button press mode of the event</p>
- * @param buttonPressMode indicates whether this is a short or long press
- */
- public void setButtonPressMode( ButtonPressMode buttonPressMode ) {
- if (buttonPressMode != null) {
- parameters.put(Names.buttonPressMode, buttonPressMode );
- }
- }
- public void setCustomButtonName(Integer customButtonID) {
- if (customButtonID != null) {
- parameters.put(Names.customButtonID, customButtonID);
- } else {
- parameters.remove(Names.customButtonID);
- }
- }
- public Integer getCustomButtonName() {
- return (Integer) parameters.get(Names.customButtonID);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnCommand.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnCommand.java
deleted file mode 100755
index 94ab19f01..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnCommand.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * This is called when a command was selected via VR after pressing the PTT button, or selected from the menu after
- * pressing the MENU button. <p>
- * <b>Note: </b>Sequence of OnHMIStatus and OnCommand notifications for user-initiated interactions is indeterminate.
- * <p></p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul><li>FULL,LIMITED</li></ul>
- * AudioStreamingState:
- * <ul><li>Any</li></ul>
- * SystemContext:
- * <ul><li>Any</li></ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Notes</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>cmdID</td>
- * <td>Int32</td>
- * <td>The cmdID of the command the user selected. This is the cmdID value provided by the application in the AddCommand operation that created the command.</td>
- * <td></td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>triggerSource</td>
- * <td>{@linkplain TriggerSource}</td>
- * <td>Indicates whether command was selected via VR or via a menu selection (using the OKbutton).</td>
- * <td></td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * </p>
- * @since SmartDeviceLink 1.0
- * @see AddCommand
- * @see DeleteCommand
- * @see DeleteSubMenu
- */
-public class OnCommand extends RPCNotification {
- /**
- *Constructs a newly allocated OnCommand object
- */
- public OnCommand() {
- super("OnCommand");
- }
- /**
- *<p>Constructs a newly allocated OnCommand object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnCommand(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Returns an <i>Integer</i> object representing the Command ID</p>
- * @return Integer an integer representation of this object
- */
- public Integer getCmdID() {
- return (Integer) parameters.get( Names.cmdID );
- }
- /**
- * <p>Sets a Command ID</p>
- * @param cmdID an integer object representing a Command ID
- */
- public void setCmdID( Integer cmdID ) {
- if (cmdID != null) {
- parameters.put(Names.cmdID, cmdID );
- }
- }
- /**
- * <p>Returns a <I>TriggerSource</I> object which will be shown in the HMI</p>
- * @return TriggerSource a TriggerSource object
- */
- public TriggerSource getTriggerSource() {
- Object obj = parameters.get(Names.triggerSource);
- if (obj instanceof TriggerSource) {
- return (TriggerSource) obj;
- } else if (obj instanceof String) {
- TriggerSource theCode = null;
- try {
- theCode = TriggerSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.triggerSource, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Sets TriggerSource<br/>
- * Indicates whether command was selected via VR or via a menu selection (using the OK button).</p>
- * @param triggerSource a TriggerSource object
- */
- public void setTriggerSource( TriggerSource triggerSource ) {
- if (triggerSource != null) {
- parameters.put(Names.triggerSource, triggerSource );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
deleted file mode 100755
index 62ff68e9a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.DriverDistractionState;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * <p>Notifies the application of the current driver distraction state (whether driver distraction rules are in effect, or
- * not).</p>
- *
- * <p></p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul><li>Can be sent with FULL, LIMITED or BACKGROUND</li></ul>
- * AudioStreamingState:
- * <ul><li>Any</li></ul>
- * SystemContext:
- * <ul><li>Any</li></ul>
- * </ul>
- * <p></p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>state</td>
- * <td>{@linkplain DriverDistractionState}</td>
- * <td>Current driver distraction state (i.e. whether driver distraction rules are in effect, or not). </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class OnDriverDistraction extends RPCNotification {
- /**
- *Constructs a newly allocated OnDriverDistraction object
- */
- public OnDriverDistraction() {
- super("OnDriverDistraction");
- }
- /**
- *<p>Constructs a newly allocated OnDriverDistraction object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnDriverDistraction(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Called to get the current driver distraction state(i.e. whether driver distraction rules are in effect, or not)</p>
- * @return {@linkplain DriverDistractionState} the Current driver distraction state.
- */
- public DriverDistractionState getState() {
- Object obj = parameters.get(Names.state);
- if (obj instanceof DriverDistractionState) {
- return (DriverDistractionState)obj;
- } else if(obj instanceof String) {
- DriverDistractionState theCode = null;
- try {
- theCode = DriverDistractionState.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.state, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Called to set the driver distraction state(i.e. whether driver distraction rules are in effect, or not)</p>
- * @param state the current driver distraction state
- */
- public void setState( DriverDistractionState state ) {
- if (state != null) {
- parameters.put(Names.state, state );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnEncodedSyncPData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnEncodedSyncPData.java
deleted file mode 100755
index 6d8143674..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnEncodedSyncPData.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-
-
-public class OnEncodedSyncPData extends RPCNotification {
-
- public OnEncodedSyncPData() {
- super("OnEncodedSyncPData");
- }
-
- public OnEncodedSyncPData(Hashtable hash) {
- super(hash);
- }
-
- public Vector<String> getData() {
- if (parameters.get(Names.data) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.data);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>)list;
- }
- }
- }
- return null;
- }
-
- public void setData(Vector<String> data) {
- if (data != null) {
- parameters.put(Names.data, data);
- } else {
- parameters.remove(Names.data);
- }
- }
- public String getUrl(){
- return (String) parameters.get(Names.URL);
- }
- public void setUrl(String url) {
- if (url != null) {
- parameters.put(Names.URL, url);
- } else {
- parameters.remove(Names.URL);
- }
- }
- public Integer getTimeout(){
- if (parameters.get(Names.Timeout) instanceof Integer) {
- return (Integer)parameters.get(Names.Timeout);
- }
- return null;
- }
- public void setTimeout(Integer timeout) {
- if (timeout != null) {
- parameters.put(Names.timeout, timeout);
- } else {
- parameters.remove(Names.timeout);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
deleted file mode 100755
index 3e8d36b68..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.SystemContext;
-import com.smartdevicelink.util.DebugTool;
-/**
- * <p>Notifies an application that HMI conditions have changed for the application. This indicates whether the application
- * can speak phrases, display text, perform interactions, receive button presses and events, stream audio, etc. This
- * notification will be sent to the application when there has been a change in any one or several of the indicated
- * states ({@linkplain HMILevel}, {@linkplain AudioStreamingState} or {@linkplain SystemContext}) for the application</p>
- * <p>All three values are, in principle, independent of each other (though there may be some relationships). A value for
- * one parameter should not be interpreted from the value of another parameter.</p>
- * <p>There are no guarantees about the timeliness or latency of the OnHMIStatus notification. Therefore, for example,
- * information such as {@linkplain AudioStreamingState} may not indicate that the audio stream became inaudible to the user
- * exactly when the OnHMIStatus notification was received.</p>
- *
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>hmiLevel</td>
- * <td>{@linkplain HMILevel}</td>
- * <td>The current HMI Level in effect for the application.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>audioStreamingState</td>
- * <td>{@linkplain AudioStreamingState}</td>
- * <td>Current state of audio streaming for the application.
- * When this parameter has a value of NOT_AUDIBLE,
- * the application must stop streaming audio to SMARTDEVICELINK.
- * Informs app whether any currently streaming audio is
- * audible to user (AUDIBLE) or not (NOT_AUDIBLE). A
- * value of NOT_AUDIBLE means that either the
- * application's audio will not be audible to the user, or
- * that the application's audio should not be audible to
- * the user (i.e. some other application on the mobile
- * device may be streaming audio and the application's
- * audio would be blended with that other audio). </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>systemContext</td>
- * <td>{@linkplain SystemContext}</td>
- * <td>Indicates that a user-initiated interaction is in-progress
- * (VRSESSION or MENU), or not (MAIN)</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * </p>
- * @since SmartDeviceLink 1.0
- * @see RegisterAppInterface
- */
-public class OnHMIStatus extends RPCNotification {
- private Boolean firstRun;
- /**
- *Constructs a newly allocated OnHMIStatus object
- */
- public OnHMIStatus() {
- super("OnHMIStatus");
- }
- /**
- *<p>Constructs a newly allocated OnHMIStatus object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnHMIStatus(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Get HMILevel in effect for the application</p>
- * @return {@linkplain HMILevel} the current HMI Level in effect for the application
- */
- public HMILevel getHmiLevel() {
- Object obj = parameters.get(Names.hmiLevel);
- if (obj instanceof HMILevel) {
- return (HMILevel) obj;
- } else if (obj instanceof String) {
- HMILevel theCode = null;
- try {
- theCode = HMILevel.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiLevel, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the HMILevel of OnHMIStatus</p>
- * @param hmiLevel the HMILevel to set
- */
- public void setHmiLevel( HMILevel hmiLevel ) {
- if (hmiLevel != null) {
- parameters.put(Names.hmiLevel, hmiLevel );
- }
- }
- /**
- * <p>Get current state of audio streaming for the application</p>
- * @return {@linkplain AudioStreamingState} Returns current state of audio streaming for the application
- */
- public AudioStreamingState getAudioStreamingState() {
- Object obj = parameters.get(Names.audioStreamingState);
- if (obj instanceof AudioStreamingState) {
- return (AudioStreamingState) obj;
- } else if (obj instanceof String) {
- AudioStreamingState theCode = null;
- try {
- theCode = AudioStreamingState.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.audioStreamingState, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the audio streaming state</p>
- * @param audioStreamingState the state of audio streaming of the application
- */
- public void setAudioStreamingState( AudioStreamingState audioStreamingState ) {
- if (audioStreamingState != null) {
- parameters.put(Names.audioStreamingState, audioStreamingState );
- }
- }
- /**
- * <p>Get the System Context</p>
- * @return {@linkplain SystemContext} whether a user-initiated interaction is in-progress (VRSESSION or MENU), or not (MAIN).
- */
- public SystemContext getSystemContext() {
- Object obj = parameters.get(Names.systemContext);
- if (obj instanceof SystemContext) {
- return (SystemContext) obj;
- } else if (obj instanceof String) {
- SystemContext theCode = null;
- try {
- theCode = SystemContext.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.systemContext, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Set the System Context of OnHMIStatus</p>
- * @param systemContext Indicates that a user-initiated interaction is in-progress
- * (VRSESSION or MENU), or not (MAIN)
- */
- public void setSystemContext( SystemContext systemContext ) {
- if (systemContext != null) {
- parameters.put(Names.systemContext, systemContext );
- }
- }
- /**
- * <p>Query whether it's the first run</p>
- * @return boolean whether it's the first run
- */
- public Boolean getFirstRun() {
- return this.firstRun;
- }
- /**
- * <p>Set the firstRun value</p>
- * @param firstRun True if it is the first run, False or not
- */
- public void setFirstRun(Boolean firstRun) {
- this.firstRun = firstRun;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
deleted file mode 100755
index 21095287e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Provides information to what language the SmartDeviceLink HMI language was changed
- * <p>
- * </p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * AudioStreamingState:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * SystemContext:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Req</th>
- * <th>Notes</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>language</td>
- * <td>{@linkplain Language}</td>
- * <td>Current SMARTDEVICELINK voice engine (VR+TTS) language</td>
- * <td>Y</td>
- * <td></td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>hmiDisplayLanguage</td>
- * <td>{@linkplain Language}</td>
- * <td>Current display language</td>
- * <td>Y</td>
- * <td></td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * </p>
- *
- */
-public class OnLanguageChange extends RPCNotification {
- /**
- *Constructs a newly allocated OnCommand object
- */
- public OnLanguageChange() {
- super("OnLanguageChange");
- }
- /**
- *<p>Constructs a newly allocated OnLanguageChange object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnLanguageChange(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Sets language that current SMARTDEVICELINK voice engine(VR+TTS) use</p>
- * @param language language that current SMARTDEVICELINK voice engine(VR+TTS) use
- */
- public void setLanguage(Language language) {
- if (language != null) {
- parameters.put(Names.language, language);
- } else {
- parameters.remove(Names.language);
- }
- }
- /**
- * <p>Returns language that current SMARTDEVICELINK voice engine(VR+TTS) use</p>
- * @return {@linkplain Language} language that current SMARTDEVICELINK voice engine(VR+TTS) use
- */
- public Language getLanguage() {
- Object obj = parameters.get(Names.language);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.language, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Sets language that current display use</p>
- * @param hmiDisplayLanguage language that current SMARTDEVICELINK voice engine(VR+TTS) use
- */
- public void setHmiDisplayLanguage(Language hmiDisplayLanguage) {
- if (hmiDisplayLanguage != null) {
- parameters.put(Names.hmiDisplayLanguage, hmiDisplayLanguage);
- } else {
- parameters.remove(Names.hmiDisplayLanguage);
- }
- }
- /**
- * <p>Returns language that current display use</p>
- * @return {@linkplain Language} language that current display use
- */
- public Language getHmiDisplayLanguage() {
- Object obj = parameters.get(Names.hmiDisplayLanguage);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiDisplayLanguage, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
deleted file mode 100755
index 3cec57ae2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Provides update to app of which sets of functions are available
- * <p>
- * </p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul>
- * <li>Any</li>
- * </ul>
- * AudioStreamingState:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * SystemContext:
- * <ul>
- * <li>TBD</li>
- * </ul>
- * </ul>
- * <p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Req</th>
- * <th>Notes</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>permissionItem</td>
- * <td>PermissionItem[]</td>
- * <td>Change in permissions for a given set of RPCs</td>
- * <td>Y</td>
- * <td>Minsize=1 Maxsize=100</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * </p>
- */
-public class OnPermissionsChange extends RPCNotification {
- /**
- *Constructs a newly allocated OnCommand object
- */
- public OnPermissionsChange() {
- super("OnPermissionsChange");
- }
- /**
- *<p>Constructs a newly allocated OnPermissionsChange object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnPermissionsChange(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Returns Vector<PermissionItem> object describing change in permissions for a given set of RPCs</p>
- * @return Vector<{@linkplain PermissionItem}> an object describing describing change in permissions for a given set of RPCs
- */
- public Vector<PermissionItem> getPermissionItem() {
- Vector<?> list = (Vector<?>)parameters.get(Names.permissionItem);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if(obj instanceof PermissionItem){
- return (Vector<PermissionItem>) list;
- } else if(obj instanceof Hashtable) {
- Vector<PermissionItem> newList = new Vector<PermissionItem>();
- for (Object hash:list) {
- newList.add(new PermissionItem((Hashtable)hash));
- }
- return newList;
- }
- }
- return null;
- }
- /**
- * <p>Sets PermissionItems describing change in permissions for a given set of RPCs</p>
- * @param permissionItem an vector of PermissionItem describing change in permissions for a given set of RPCs
- */
- public void setPermissionItem(Vector<PermissionItem> permissionItem) {
- if (permissionItem != null) {
- parameters.put(Names.permissionItem, permissionItem);
- } else {
- parameters.remove(Names.permissionItem);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSmartDeviceLinkChoiceChosen.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSmartDeviceLinkChoiceChosen.java
deleted file mode 100755
index b919a95ee..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSmartDeviceLinkChoiceChosen.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.util.DebugTool;
-
-public class OnSmartDeviceLinkChoiceChosen extends RPCNotification {
-
-
- public class SmartDeviceLinkSubMenu {
- private Integer _menuID = null;
- private Integer _position = null;
- private String _menuName = null;
-
- // Constructor
- SmartDeviceLinkSubMenu(Integer menuID, Integer position, String menuName) {
- _menuID = menuID;
- _position = position;
- _menuName = menuName;
- }
-
- // Restrict no-arg constructor
- private SmartDeviceLinkSubMenu() {}
-
- // Public Getters
- public Integer getMenuID() {
- return _menuID;
- }
-
- public String getMenuName() {
- return _menuName;
- }
-
- public String toString() {
- return _menuName;
- }
- }
-
- public class SmartDeviceLinkCommand {
- private Integer _commandID = null;
- private SmartDeviceLinkSubMenu _parentSubMenu = null;
- private Integer _position = null;
- private String _menuName = null;
- private Vector<String> _vrCommands = null;
-
- // Constructor
- SmartDeviceLinkCommand(Integer commandID, SmartDeviceLinkSubMenu parentSubMenu, Integer position, String menuName, Vector<String> vrCommands) {
- _commandID = commandID;
- _parentSubMenu = parentSubMenu;
- _position = position;
- _menuName = menuName;
- _vrCommands = vrCommands;
- }
-
- // Restrict no-arg constructor
- private SmartDeviceLinkCommand() {}
-
- // Public Getters
- public Integer getCommandID() {
- return _commandID;
- }
-
- public SmartDeviceLinkSubMenu getParentSubMenu() {
- return _parentSubMenu;
- }
-
- public String getMenuName() {
- return _menuName;
- }
-
- public Vector<String> getVrCommands() {
- return _vrCommands;
- }
-
- public String toString() {
- return _menuName;
- }
- }
-
- public class SmartDeviceLinkChoice {
-
- private Choice _choice = null;
-
- // Constructor
- SmartDeviceLinkChoice(Choice choice) {
- _choice = choice;
- }
-
- public Choice getChoice() {
- return _choice;
- }
-
- public Integer getChoiceID() {
- return _choice.getChoiceID();
- }
-
- public String getMenuName() {
- return _choice.getMenuName();
- }
-
- public Vector<String> getVrCommands() {
- return _choice.getVrCommands();
- }
-
- public String toString() {
- return _choice.getMenuName();
- }
- }
-
- public class SmartDeviceLinkChoiceSet {
- private Integer _choiceSetID = null;
- private Vector<SmartDeviceLinkChoice> _choiceSet = null;
-
- // Constructor
- SmartDeviceLinkChoiceSet(Integer choiceSetID, Vector<SmartDeviceLinkChoice> choiceSet) {
- _choiceSetID = choiceSetID;
- _choiceSet = choiceSet;
- }
-
- public Integer getChoiceSetID() {
- return _choiceSetID;
- }
-
- public Vector<SmartDeviceLinkChoice> getChoiceSet() {
- return _choiceSet;
- }
- }
-
-
-
-
- public OnSmartDeviceLinkChoiceChosen() {
- super(Names.OnSmartDeviceLinkChoiceChosen);
- }
- public OnSmartDeviceLinkChoiceChosen(Hashtable hash){
- super(hash);
- }
- public SmartDeviceLinkChoice getSmartDeviceLinkChoice() {
- return (SmartDeviceLinkChoice) parameters.get(Names.smartDeviceLinkChoice);
- }
- public void setSmartDeviceLinkChoice(SmartDeviceLinkChoice smartDeviceLinkChoice) {
- if (smartDeviceLinkChoice != null) {
- parameters.put(Names.smartDeviceLinkChoice, smartDeviceLinkChoice);
- }
- }
- public TriggerSource getTriggerSource() {
- Object obj = parameters.get(Names.triggerSource);
- if (obj instanceof TriggerSource) {
- return (TriggerSource) obj;
- } else if (obj instanceof String) {
- TriggerSource theCode = null;
- try {
- theCode = TriggerSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.triggerSource, e);
- }
- return theCode;
- }
- return null;
- }
- public void setTriggerSource( TriggerSource triggerSource ) {
- if (triggerSource != null) {
- parameters.put(Names.triggerSource, triggerSource );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSyncPData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSyncPData.java
deleted file mode 100755
index 4e2bd2f84..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnSyncPData.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-
-public class OnSyncPData extends RPCNotification {
- public OnSyncPData() {
- super("OnSyncPData");
- }
- public OnSyncPData(Hashtable hash) {
- super(hash);
- }
- public String getUrl(){
- return (String) parameters.get(Names.URL);
- }
- public void setUrl(String url) {
- if (url != null) {
- parameters.put(Names.URL, url);
- } else {
- parameters.remove(Names.URL);
- }
- }
- public Integer getTimeout(){
- if (parameters.get(Names.Timeout) instanceof Integer) {
- return (Integer)parameters.get(Names.Timeout);
- }
- return null;
- }
- public void setTimeout(Integer timeout) {
- if (timeout != null) {
- parameters.put(Names.timeout, timeout);
- } else {
- parameters.remove(Names.timeout);
- }
- }
- public void setSyncPData(byte[] syncPData) {
- if (syncPData != null) {
- store.put(Names.bulkData, syncPData);
- } else {
- store.remove(Names.bulkData);
- }
- }
- public byte[] getSyncPData() {
- return (byte[]) store.get(Names.bulkData);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
deleted file mode 100755
index 11a79dd57..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.TBTState;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * <p>Notifies the application of the current TBT client status on the module.</p>
- *
- * <p></p>
- * <b>HMI Status Requirements:</b>
- * <ul>
- * HMILevel:
- * <ul><li>Can be sent with FULL, LIMITED or BACKGROUND</li></ul>
- * AudioStreamingState:
- * <ul><li>Any</li></ul>
- * SystemContext:
- * <ul><li>Any</li></ul>
- * </ul>
- * <p></p>
- * <b>Parameter List:</b>
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>Applink Ver Available</th>
- * </tr>
- * <tr>
- * <td>state</td>
- * <td>{@linkplain TBTState}</td>
- * <td>Current state of TBT client.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- *
- */
-public class OnTBTClientState extends RPCNotification {
- /**
- *Constructs a newly allocated OnTBTClientState object
- */
- public OnTBTClientState() {
- super("OnTBTClientState");
- }
- /**
- *<p>Constructs a newly allocated OnTBTClientState object indicated by the Hashtable parameter</p>
- *@param hash The Hashtable to use
- */
- public OnTBTClientState(Hashtable hash) {
- super(hash);
- }
- /**
- * <p>Called to get the current state of TBT client</p>
- * @return {@linkplain TBTState} the current state of TBT client
- */
- public TBTState getState() {
- Object obj = parameters.get(Names.state);
- if (obj instanceof TBTState) {
- return (TBTState)obj;
- } else if(obj instanceof String) {
- TBTState theCode = null;
- try{
- theCode = TBTState.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.state, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Called to set the current state of TBT client</p>
- * @param state current state of TBT client
- */
- public void setState( TBTState state ) {
- if (state != null) {
- parameters.put(Names.state, state );
- } else {
- parameters.remove(Names.state);
- }
- }
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java
deleted file mode 100755
index 68873b555..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java
+++ /dev/null
@@ -1,550 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AmbientLightStatus;
-import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
-import com.smartdevicelink.proxy.rpc.enums.GearShiftAdviceStatus;
-import com.smartdevicelink.proxy.rpc.enums.PRNDL;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataActiveStatus;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
-import com.smartdevicelink.proxy.rpc.enums.WiperStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class OnVehicleData extends RPCNotification {
-
- public OnVehicleData() {
- super("OnVehicleData");
- }
- public OnVehicleData(Hashtable hash) {
- super(hash);
- }
- public void setGps(GPSData gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
- public GPSData getGps() {
- Object obj = parameters.get(Names.gps);
- if (obj instanceof GPSData) {
- return (GPSData) obj;
- } else {
- GPSData theCode = null;
- try {
- theCode = new GPSData((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gps, e);
- }
- return theCode;
- }
- }
- public void setSpeed(Double speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
- public Double getSpeed() {
- return (Double) parameters.get(Names.speed);
- }
- public void setRpm(Integer rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
- public Integer getRpm() {
- return (Integer) parameters.get(Names.rpm);
- }
- public void setFuelLevel(Double fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
- public Double getFuelLevel() {
- return (Double) parameters.get(Names.fuelLevel);
- }
- public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
- public ComponentVolumeStatus getFuelLevel_State() {
- Object obj = parameters.get(Names.fuelLevel_State);
- if (obj instanceof ComponentVolumeStatus) {
- return (ComponentVolumeStatus) obj;
- } else if (obj instanceof String) {
- ComponentVolumeStatus theCode = null;
- try {
- theCode = ComponentVolumeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelLevel_State, e);
- }
- return theCode;
- }
- return null;
- }
- public void setInstantFuelConsumption(Double instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
- public Double getInstantFuelConsumption() {
- return (Double) parameters.get(Names.instantFuelConsumption);
- }
- public void setExternalTemperature(Double externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
- public Double getExternalTemperature() {
- return (Double) parameters.get(Names.externalTemperature);
- }
- public void setVin(String vin) {
- if (vin != null) {
- parameters.put(Names.vin, vin);
- } else {
- parameters.remove(Names.vin);
- }
- }
- public String getVin() {
- return (String) parameters.get(Names.vin);
- }
- public void setPrndl(PRNDL prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
- public PRNDL getPrndl() {
- Object obj = parameters.get(Names.prndl);
- if (obj instanceof PRNDL) {
- return (PRNDL) obj;
- } else if (obj instanceof String) {
- PRNDL theCode = null;
- try {
- theCode = PRNDL.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.prndl, e);
- }
- return theCode;
- }
- return null;
- }
- public void setTirePressure(TireStatus tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
- public TireStatus getTirePressure() {
- Object obj = parameters.get(Names.tirePressure);
- if (obj instanceof TireStatus) {
- return (TireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new TireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.tirePressure, e);
- }
- }
- return null;
- }
- public void setOdometer(Integer odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
- public Integer getOdometer() {
- return (Integer) parameters.get(Names.odometer);
- }
- public void setBeltStatus(BeltStatus beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
- public BeltStatus getBeltStatus() {
- Object obj = parameters.get(Names.beltStatus);
- if (obj instanceof BeltStatus) {
- return (BeltStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new BeltStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.beltStatus, e);
- }
- }
- return null;
- }
- public void setBodyInformation(BodyInformation bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
- public BodyInformation getBodyInformation() {
- Object obj = parameters.get(Names.bodyInformation);
- if (obj instanceof BodyInformation) {
- return (BodyInformation) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new BodyInformation((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.bodyInformation, e);
- }
- }
- return null;
- }
- public void setDeviceStatus(DeviceStatus deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
- public DeviceStatus getDeviceStatus() {
- Object obj = parameters.get(Names.deviceStatus);
- if (obj instanceof DeviceStatus) {
- return (DeviceStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new DeviceStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.deviceStatus, e);
- }
- }
- return null;
- }
- public void setDriverBraking(VehicleDataEventStatus driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
- public VehicleDataEventStatus getDriverBraking() {
- Object obj = parameters.get(Names.driverBraking);
- if (obj instanceof VehicleDataEventStatus) {
- return (VehicleDataEventStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.driverBraking, e);
- }
- return theCode;
- }
- return null;
- }
- public void setWiperStatus(WiperStatus wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
- public WiperStatus getWiperStatus() {
- Object obj = parameters.get(Names.wiperStatus);
- if (obj instanceof WiperStatus) {
- return (WiperStatus) obj;
- } else if (obj instanceof String) {
- WiperStatus theCode = null;
- try {
- theCode = WiperStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.wiperStatus, e);
- }
- return theCode;
- }
- return null;
- }
- public void setFuelEconomy(FuelEconomyInformation fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
- public FuelEconomyInformation getFuelEconomy() {
- Object obj = parameters.get(Names.fuelEconomy);
- if (obj instanceof FuelEconomyInformation) {
- return (FuelEconomyInformation) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new FuelEconomyInformation((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelEconomy, e);
- }
- }
- return null;
- }
- public void setEngineOilLife(Integer engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
- public Integer getEngineOilLife() {
- return (Integer) parameters.get(Names.engineOilLife);
- }
- public void setHeadLampStatus(HeadLampStatus headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
- public HeadLampStatus getHeadLampStatus() {
- Object obj = parameters.get(Names.headLampStatus);
- if (obj instanceof HeadLampStatus) {
- return (HeadLampStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new HeadLampStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.headLampStatus, e);
- }
- }
- return null;
- }
- public void setBatteryVoltage(Double batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
- public Double getBatteryVoltage() {
- return (Double) parameters.get(Names.batteryVoltage);
- }
- public void setBrakeTorque(Double brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
- public Double getBrakeTorque() {
- return (Double) parameters.get(Names.brakeTorque);
- }
- public void setEngineTorque(Double engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
- public Double getEngineTorque() {
- return (Double) parameters.get(Names.engineTorque);
- }
- public void setTurboBoost(Double turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
- public Double getTurboBoost() {
- return (Double) parameters.get(Names.turboBoost);
- }
- public void setCoolantTemp(Double coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
- public Double getCoolantTemp() {
- return (Double) parameters.get(Names.coolantTemp);
- }
- public void setAirFuelRatio(Double airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
- public Double getAirFuelRatio() {
- return (Double) parameters.get(Names.airFuelRatio);
- }
- public void setCoolingHeadTemp(Double coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
- public Double getCoolingHeadTemp() {
- return (Double) parameters.get(Names.coolingHeadTemp);
- }
- public void setOilTemp(Double oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
- public Double getOilTemp() {
- return (Double) parameters.get(Names.oilTemp);
- }
- public void setIntakeAirTemp(Double intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
- public Double getIntakeAirTemp() {
- return (Double) parameters.get(Names.intakeAirTemp);
- }
- public void setGearShiftAdvice(GearShiftAdviceStatus gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
- public GearShiftAdviceStatus getGearShiftAdvice() {
- Object obj = parameters.get(Names.gearShiftAdvice);
- if (obj instanceof GearShiftAdviceStatus) {
- return (GearShiftAdviceStatus) obj;
- } else if (obj instanceof String) {
- GearShiftAdviceStatus theCode = null;
- try {
- theCode = GearShiftAdviceStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gearShiftAdvice, e);
- }
- return theCode;
- }
- return null;
- }
- public void setAcceleration(Double acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
- public Double getAcceleration() {
- return (Double) parameters.get(Names.acceleration);
- }
- public void setAccPedalPosition(Double accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
- public Double getAccPedalPosition() {
- return (Double) parameters.get(Names.accPedalPosition);
- }
- public void setClutchPedalPosition(Double clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
- public Double getClutchPedalPosition() {
- return (Double) parameters.get(Names.clutchPedalPosition);
- }
- public void setReverseGearStatus(VehicleDataActiveStatus reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
- public VehicleDataActiveStatus getReverseGearStatus() {
- Object obj = parameters.get(Names.reverseGearStatus);
- if (obj instanceof VehicleDataActiveStatus) {
- return (VehicleDataActiveStatus) obj;
- } else if (obj instanceof String) {
- VehicleDataActiveStatus theCode = null;
- try {
- theCode = VehicleDataActiveStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.reverseGearStatus, e);
- }
- return theCode;
- }
- return null;
- }
- public void setAccTorque(Double accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
- public Double getAccTorque() {
- return (Double) parameters.get(Names.accTorque);
- }
- public void setEvInfo(EVInfo evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
- public EVInfo getEvInfo() {
- Object obj = parameters.get(Names.evInfo);
- if (obj instanceof EVInfo) {
- return (EVInfo) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new EVInfo((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.evInfo, e);
- }
- }
- return null;
- }
- public void setAmbientLightStatus(AmbientLightStatus ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
- public AmbientLightStatus getAmbientLightStatus() {
- Object obj = parameters.get(Names.ambientLightStatus);
- if (obj instanceof AmbientLightStatus) {
- return (AmbientLightStatus) obj;
- } else if (obj instanceof String) {
- AmbientLightStatus theCode = null;
- try {
- theCode = AmbientLightStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.ambientLightStatus, e);
- }
- return theCode;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ParameterPermissions.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ParameterPermissions.java
deleted file mode 100755
index 7ff2ffce2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ParameterPermissions.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-
-/**
- * Defining sets of parameters, which are permitted or prohibited for a given RPC.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>allowed</td>
- * <td>String</td>
- * <td>A set of all parameters that are permitted for this given RPC.
- * <ul>
- * <li>Min size: 0</li>
- * <li>Max size: 100</li>
- * <li>Max length: 100</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>userDisallowed</td>
- * <td>String</td>
- * <td>A set of all parameters that are prohibated for this given RPC.
- * <ul>
- * <li>Min size: 0</li>
- * <li>Max size: 100</li>
- * <li>Max length: 100</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class ParameterPermissions extends RPCStruct {
-
- /**
- * Constructs a newly allocated ParameterPermissions object
- */
- public ParameterPermissions() { }
-
- /**
- * Constructs a newly allocated ParameterPermissions object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public ParameterPermissions(Hashtable hash) {
- super(hash);
- }
-
- /**
- * get a set of all parameters that are permitted for this given RPC.
- * @return a set of all parameters that are permitted for this given RPC.
- */
- public Vector<String> getAllowed() {
- if (store.get(Names.allowed) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get( Names.allowed);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
-
- /**
- * set a set of all parameters that are permitted for this given RPC.
- * @param allowed parameter that is permitted for this given RPC
- */
- public void setAllowed(HMILevel allowed) {
- if (allowed != null) {
- store.put(Names.allowed, allowed);
- } else {
- store.remove(Names.allowed);
- }
- }
-
- /**
- * get a set of all parameters that are prohibited for this given RPC.
- * @return a set of all parameters that are prohibited for this given RPC
- */
- public Vector<String> getUserDisallowed() {
- if (store.get(Names.userDisallowed) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)store.get( Names.userDisallowed);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
-
- /**
- * set a set of all parameters that are prohibited for this given RPC.
- * @param userDisallowed paramter that is prohibited for this given RPC
- */
- public void setUserDisallowed(HMILevel userDisallowed) {
- if (userDisallowed != null) {
- store.put(Names.userDisallowed, userDisallowed);
- } else {
- store.remove(Names.userDisallowed);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
deleted file mode 100755
index 9871044f6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
+++ /dev/null
@@ -1,315 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AudioType;
-import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
-import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * This will open an audio pass thru session. By doing so the app can receive
- * audio data through the vehicle’s microphone
- * <p>
- * Function Group: AudioPassThru
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 2.0
- * @see EndAudioPassThru
- */
-public class PerformAudioPassThru extends RPCRequest {
-
- /**
- * Constructs a new PerformAudioPassThru object
- */
- public PerformAudioPassThru() {
- super("PerformAudioPassThru");
- }
-
- /**
- * Constructs a new PerformAudioPassThru object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public PerformAudioPassThru(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets initial prompt which will be spoken before opening the audio pass
- * thru session by SMARTDEVICELINK
- *
- * @param initialPrompt
- * a Vector<TTSChunk> value represents the initial prompt which
- * will be spoken before opening the audio pass thru session by
- * SMARTDEVICELINK
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>This is an array of text chunks of type TTSChunk</li>
- * <li>The array must have at least one item</li>
- * <li>If omitted, then no initial prompt is spoken</li>
- * <li>Array Minsize: 1</li>
- * <li>Array Maxsize: 100</li>
- * </ul>
- */
- public void setInitialPrompt(Vector<TTSChunk> initialPrompt) {
- if (initialPrompt != null) {
- parameters.put(Names.initialPrompt, initialPrompt);
- } else {
- parameters.remove(Names.initialPrompt);
- }
- }
-
- /**
- * Gets a Vector value representing an initial prompt which will be spoken
- * before opening the audio pass thru session by SMARTDEVICELINK
- *
- * @return Vector<TTSChunk> -a Vector value representing an initial prompt
- * which will be spoken before opening the audio pass thru session
- * by SMARTDEVICELINK
- */
- public Vector<TTSChunk> getInitialPrompt() {
- if (parameters.get(Names.initialPrompt) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.initialPrompt);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets a line of text displayed during audio capture
- *
- * @param audioPassThruDisplayText1
- * a String value representing the line of text displayed during
- * audio capture
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setAudioPassThruDisplayText1(String audioPassThruDisplayText1) {
- if (audioPassThruDisplayText1 != null) {
- parameters.put(Names.audioPassThruDisplayText1, audioPassThruDisplayText1);
- } else {
- parameters.remove(Names.audioPassThruDisplayText1);
- }
- }
-
- /**
- * Gets a first line of text displayed during audio capture
- *
- * @return String -a String value representing a first line of text
- * displayed during audio capture
- */
- public String getAudioPassThruDisplayText1() {
- return (String) parameters.get(Names.audioPassThruDisplayText1);
- }
-
- /**
- * Sets a line of text displayed during audio capture
- *
- * @param audioPassThruDisplayText2
- * a String value representing the line of text displayed during
- * audio capture
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setAudioPassThruDisplayText2(String audioPassThruDisplayText2) {
- if (audioPassThruDisplayText2 != null) {
- parameters.put(Names.audioPassThruDisplayText2, audioPassThruDisplayText2);
- } else {
- parameters.remove(Names.audioPassThruDisplayText2);
- }
- }
-
- /**
- * Gets a second line of text displayed during audio capture
- *
- * @return String -a String value representing a first line of text
- * displayed during audio capture
- */
- public String getAudioPassThruDisplayText2() {
- return (String) parameters.get(Names.audioPassThruDisplayText2);
- }
-
- /**
- * Sets a samplingRate
- *
- * @param samplingRate
- * a SamplingRate value representing a 8 or 16 or 22 or 24 khz
- */
- public void setSamplingRate(SamplingRate samplingRate) {
- if (samplingRate != null) {
- parameters.put(Names.samplingRate, samplingRate);
- } else {
- parameters.remove(Names.samplingRate);
- }
- }
-
- /**
- * Gets a samplingRate
- *
- * @return SamplingRate -a SamplingRate value
- */
- public SamplingRate getSamplingRate() {
- Object obj = parameters.get(Names.samplingRate);
- if (obj instanceof SamplingRate) {
- return (SamplingRate) obj;
- } else if (obj instanceof String) {
- SamplingRate theCode = null;
- try {
- theCode = SamplingRate.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.samplingRate, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets the maximum duration of audio recording in milliseconds
- *
- * @param maxDuration
- * an Integer value representing the maximum duration of audio
- * recording in millisecond
- * <p>
- * <b>Notes: </b>Minvalue:1; Maxvalue:1000000
- */
- public void setMaxDuration(Integer maxDuration) {
- if (maxDuration != null) {
- parameters.put(Names.maxDuration, maxDuration);
- } else {
- parameters.remove(Names.maxDuration);
- }
- }
-
- /**
- * Gets a max duration of audio recording in milliseconds
- *
- * @return int -an int value representing the maximum duration of audio
- * recording in milliseconds
- */
- public int getMaxDuration() {
- return (Integer) parameters.get(Names.maxDuration);
- }
-
- /**
- * Sets the quality the audio is recorded - 8 bit or 16 bit
- *
- * @param audioQuality
- * a BitsPerSample value representing 8 bit or 16 bit
- */
- public void setBitsPerSample(BitsPerSample audioQuality) {
- if (audioQuality != null) {
- parameters.put(Names.bitsPerSample, audioQuality);
- } else {
- parameters.remove(Names.bitsPerSample);
- }
- }
-
- /**
- * Gets a BitsPerSample value, 8 bit or 16 bit
- *
- * @return BitsPerSample -a BitsPerSample value
- */
- public BitsPerSample getBitsPerSample() {
- Object obj = parameters.get(Names.bitsPerSample);
- if (obj instanceof BitsPerSample) {
- return (BitsPerSample) obj;
- } else if (obj instanceof String) {
- BitsPerSample theCode = null;
- try {
- theCode = BitsPerSample.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.bitsPerSample, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets an audioType
- *
- * @param audioType
- * an audioType
- */
- public void setAudioType(AudioType audioType) {
- if (audioType != null) {
- parameters.put(Names.audioType, audioType);
- } else {
- parameters.remove(Names.audioType);
- }
- }
-
- /**
- * Gets a type of audio data
- *
- * @return AudioType -an AudioType
- */
- public AudioType getAudioType() {
- Object obj = parameters.get(Names.audioType);
- if (obj instanceof AudioType) {
- return (AudioType) obj;
- } else if (obj instanceof String) {
- AudioType theCode = null;
- try {
- theCode = AudioType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.audioType, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Gets a Boolean value representing if the current audio source should be
- * muted during the APT session<br/>
- *
- *
- * @return Boolean -a Boolean value representing if the current audio source
- * should be muted during the APT session
- */
- public Boolean getMuteAudio() {
- return (Boolean) parameters.get(Names.muteAudio);
- }
-
- /**
- * Sets a muteAudio value representing if the current audio source should be
- * muted during the APT session<br/>
- * If not, the audio source will play without interruption. If omitted, the
- * value is set to true
- * <p>
- *
- * @param muteAudio
- * a Boolean value representing if the current audio source
- * should be muted during the APT session
- */
- public void setMuteAudio(Boolean muteAudio) {
- if (muteAudio != null) {
- parameters.put(Names.muteAudio, muteAudio);
- } else {
- parameters.remove(Names.muteAudio);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
deleted file mode 100755
index 719131c0a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Perform Audio Pass Thru Response is sent, when PerformAudioPassThru has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class PerformAudioPassThruResponse extends RPCResponse {
-
- /**
- * Constructs a new PerformAudioPassThruResponse object
- */
- public PerformAudioPassThruResponse() {
- super("PerformAudioPassThru");
- }
-
- /**
- * Constructs a new PerformAudioPassThruResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public PerformAudioPassThruResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java
deleted file mode 100755
index 55a068355..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java
+++ /dev/null
@@ -1,360 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Performs an application-initiated interaction in which the user can select a
- * {@linkplain Choice} from among the specified Choice Sets. For instance, an
- * application may use a PerformInteraction to ask a user to say the name of a
- * song to play. The user's response is only valid if it appears in the
- * specified Choice Sets and is recognized by SMARTDEVICELINK
- * <p>
- * Function Group: Base
- * <p>
- * <b>HMILevel needs to be FULL</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see CreateInteractionChoiceSet
- * @see DeleteInteractionChoiceSet
- */
-public class PerformInteraction extends RPCRequest {
- /**
- * Constructs a new PerformInteraction object
- */
- public PerformInteraction() {
- super("PerformInteraction");
- }
- /**
- * Constructs a new PerformInteraction object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public PerformInteraction(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the Text that Displayed when the interaction begins. This text may
- * be overlaid by the "Listening" prompt during the interaction. Text is
- * displayed on first line of multiline display, and is centered. If text
- * does not fit on line, it will be truncated
- *
- * @return String -the text displayed when the interaction begins
- */
- public String getInitialText() {
- return (String) parameters.get(Names.initialText);
- }
- /**
- * Sets the Text that Displayed when the interaction begins. This text may
- * be overlaid by the "Listening" prompt during the interaction. Text is
- * displayed on first line of multiline display, and is centered. If text
- * does not fit on line, it will be truncated
- *
- * @param initialText
- * a String value that Displayed when the interaction begins
- */
- public void setInitialText(String initialText) {
- if (initialText != null) {
- parameters.put(Names.initialText, initialText);
- } else {
- parameters.remove(Names.initialText);
- }
- }
- /**
- * Gets an An array of one or more TTSChunks that, taken together, specify
- * what is to be spoken to the user at the start of an interaction
- *
- * @return Vector<TTSChunk> -a Vector<TTSChunk> value, specify what is to be
- * spoken to the user at the start of an interaction
- */
- public Vector<TTSChunk> getInitialPrompt() {
- if (parameters.get(Names.initialPrompt) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.initialPrompt);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets An array of one or more TTSChunks that, taken together, specify what
- * is to be spoken to the user at the start of an interaction
- *
- * @param initialPrompt
- * a Vector<TTSChunk> value, specify what is to be spoken to the
- * user at the start of an interaction
- */
- public void setInitialPrompt(Vector<TTSChunk> initialPrompt) {
- if (initialPrompt != null) {
- parameters.put(Names.initialPrompt, initialPrompt);
- } else {
- parameters.remove(Names.initialPrompt);
- }
- }
- /**
- * Gets the Indicates mode that indicate how user selects interaction
- * choice. User can choose either by voice (VR_ONLY), by visual selection
- * from the menu (MANUAL_ONLY), or by either mode (BOTH)
- *
- * @return InteractionMode -indicate how user selects interaction choice
- * (VR_ONLY, MANUAL_ONLY or BOTH)
- */
- public InteractionMode getInteractionMode() {
- Object obj = parameters.get(Names.interactionMode);
- if (obj instanceof InteractionMode) {
- return (InteractionMode) obj;
- } else if (obj instanceof String) {
- InteractionMode theCode = null;
- try {
- theCode = InteractionMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.interactionMode, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Sets the Indicates mode that indicate how user selects interaction
- * choice. User can choose either by voice (VR_ONLY), by visual selection
- * from the menu (MANUAL_ONLY), or by either mode (BOTH)
- *
- * @param interactionMode
- * indicate how user selects interaction choice (VR_ONLY,
- * MANUAL_ONLY or BOTH)
- */
- public void setInteractionMode(InteractionMode interactionMode) {
- if (interactionMode != null) {
- parameters.put(Names.interactionMode, interactionMode);
- } else {
- parameters.remove(Names.interactionMode);
- }
- }
- /**
- * Gets a Vector<Integer> value representing an Array of one or more Choice
- * Set IDs
- *
- * @return Vector<Integer> -a Vector<Integer> value representing an Array of
- * one or more Choice Set IDs. User can select any choice from any
- * of the specified Choice Sets
- */
- public Vector<Integer> getInteractionChoiceSetIDList() {
- if(parameters.get(Names.interactionChoiceSetIDList) instanceof Vector<?>){
- Vector<?> list = (Vector<?>)parameters.get(Names.interactionChoiceSetIDList);
- if(list != null && list.size()>0){
- Object obj = list.get(0);
- if(obj instanceof Integer){
- return (Vector<Integer>) list;
- }
- }
- }
- return null;
- }
- /**
- * Sets a Vector<Integer> representing an Array of one or more Choice Set
- * IDs. User can select any choice from any of the specified Choice Sets
- *
- * @param interactionChoiceSetIDList
- * -a Vector<Integer> representing an Array of one or more Choice
- * Set IDs. User can select any choice from any of the specified
- * Choice Sets
- * <p>
- * <b>Notes: </b>Min Value: 0; Max Vlaue: 2000000000
- */
- public void setInteractionChoiceSetIDList(Vector<Integer> interactionChoiceSetIDList) {
- if (interactionChoiceSetIDList != null) {
- parameters.put(Names.interactionChoiceSetIDList, interactionChoiceSetIDList);
- } else {
- parameters.remove(Names.interactionChoiceSetIDList);
- }
- }
- /**
- * Gets a Vector<TTSChunk> which taken together, specify the help phrase to
- * be spoken when the user says "help" during the VR session
- *
- * @return Vector<TTSChunk> -a Vector<TTSChunk> which taken together,
- * specify the help phrase to be spoken when the user says "help"
- * during the VR session
- */
- public Vector<TTSChunk> getHelpPrompt() {
- if(parameters.get(Names.helpPrompt) instanceof Vector<?>){
- Vector<?> list = (Vector<?>)parameters.get(Names.helpPrompt);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets An array of TTSChunks which, taken together, specify the help phrase
- * to be spoken when the user says "help" during the VR session
- * <p>
- * If this parameter is omitted, the help prompt will be constructed by SMARTDEVICELINK
- * from the first vrCommand of each choice of all the Choice Sets specified
- * in the interactionChoiceSetIDList parameter
- * <P>
- * <b>Notes: </b>The helpPrompt specified in
- * {@linkplain SetGlobalProperties} is not used by PerformInteraction
- *
- * @param helpPrompt
- * a Vector<TTSChunk> which taken together, specify the help
- * phrase to be spoken when the user says "help" during the VR
- * session
- */
- public void setHelpPrompt(Vector<TTSChunk> helpPrompt) {
- if (helpPrompt != null) {
- parameters.put(Names.helpPrompt, helpPrompt);
- } else {
- parameters.remove(Names.helpPrompt);
- }
- }
- /**
- * Gets An array of TTSChunks which, taken together, specify the phrase to
- * be spoken when the listen times out during the VR session
- *
- * @return Vector<TTSChunk> -a Vector<TTSChunk> specify the phrase to be
- * spoken when the listen times out during the VR session
- */
- public Vector<TTSChunk> getTimeoutPrompt() {
- if (parameters.get(Names.timeoutPrompt) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.timeoutPrompt);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets An array of TTSChunks which, taken together, specify the phrase to
- * be spoken when the listen times out during the VR session
- * <p>
- * <b>Notes: </b>The timeoutPrompt specified in
- * {@linkplain SetGlobalProperties} is not used by PerformInteraction
- *
- * @param timeoutPrompt
- * a Vector<TTSChunk> specify the phrase to be spoken when the
- * listen times out during the VR session
- */
- public void setTimeoutPrompt(Vector<TTSChunk> timeoutPrompt) {
- if (timeoutPrompt != null) {
- parameters.put(Names.timeoutPrompt, timeoutPrompt);
- } else {
- parameters.remove(Names.timeoutPrompt);
- }
- }
- /**
- * Gets a Integer value representing the amount of time, in milliseconds,
- * SMARTDEVICELINK will wait for the user to make a choice (VR or Menu)
- *
- * @return Integer -a Integer representing the amount of time, in
- * milliseconds, SMARTDEVICELINK will wait for the user to make a choice (VR or
- * Menu)
- */
- public Integer getTimeout() {
- return (Integer) parameters.get(Names.timeout);
- }
- /**
- * Sets the amount of time, in milliseconds, SMARTDEVICELINK will wait for the user to
- * make a choice (VR or Menu). If this time elapses without the user making
- * a choice, the timeoutPrompt will be spoken. After this timeout value has
- * been reached, the interaction will stop and a subsequent interaction will
- * take place after SMARTDEVICELINK speaks the timeout prompt. If that times out as
- * well, the interaction will end completely. If omitted, the default is
- * 10000ms
- *
- * @param timeout
- * an Integer value representing the amount of time, in
- * milliseconds, SMARTDEVICELINK will wait for the user to make a choice (VR
- * or Menu)
- * <p>
- * <b>Notes: </b>Min Value: 5000; Max Value: 100000
- */
- public void setTimeout(Integer timeout) {
- if (timeout != null) {
- parameters.put(Names.timeout, timeout);
- } else {
- parameters.remove(Names.timeout);
- }
- }
-
- /**
- * Gets a Voice recognition Help, which is a suggested VR Help Items to
- * display on-screen during Perform Interaction
- *
- * @return Vector<VrHelpItem> -a Vector value representing a suggested VR
- * Help Items to display on-screen during Perform Interaction
- * @since SmartDeviceLink 2.0
- */
- public Vector<VrHelpItem> getVrHelp() {
- if (parameters.get(Names.vrHelp) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.vrHelp);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof VrHelpItem) {
- return (Vector<VrHelpItem>) list;
- } else if (obj instanceof Hashtable) {
- Vector<VrHelpItem> newList = new Vector<VrHelpItem>();
- for (Object hashObj : list) {
- newList.add(new VrHelpItem((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- *
- * @param vrHelp
- * a Vector representing a suggested VR Help Items to display
- * on-screen during Perform Interaction<br/>
- * If omitted on supported displays, the default SMARTDEVICELINK generated
- * list of suggested choices will be displayed
- * <p>
- * <b>Notes: </b>Min=1; Max=100
- * @since SmartDeviceLink 2.0
- */
- public void setVrHelp(Vector<VrHelpItem> vrHelp) {
- if (vrHelp != null) {
- parameters.put(Names.vrHelp, vrHelp);
- } else {
- parameters.remove(Names.vrHelp);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
deleted file mode 100755
index 0c263ba9b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * PerformInteraction Response is sent, when PerformInteraction has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class PerformInteractionResponse extends RPCResponse {
-
- /**
- * Constructs a new PerformInteractionResponse object
- */
- public PerformInteractionResponse() {
- super("PerformInteraction");
- }
-
- /**
- * Constructs a new PerformInteractionResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public PerformInteractionResponse(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the application-scoped identifier that uniquely identifies this choice.
- * @return choiceID Min: 0 Max: 65535
- */
- public Integer getChoiceID() {
- return (Integer) parameters.get( Names.choiceID );
- }
- /**
- * Sets the application-scoped identifier that uniquely identifies this choice.
- * @param choiceID Min: 0 Max: 65535
- */
- public void setChoiceID( Integer choiceID ) {
- if (choiceID != null) {
- parameters.put(Names.choiceID, choiceID );
- }
- }
- /**
- * <p>Returns a <I>TriggerSource</I> object which will be shown in the HMI</p>
- * @return TriggerSource a TriggerSource object
- */
- public TriggerSource getTriggerSource() {
- Object obj = parameters.get(Names.triggerSource);
- if (obj instanceof TriggerSource) {
- return (TriggerSource) obj;
- } else if (obj instanceof String) {
- TriggerSource theCode = null;
- try {
- theCode = TriggerSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.triggerSource, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * <p>Sets TriggerSource<br/>
- * Indicates whether command was selected via VR or via a menu selection (using the OK button).</p>
- * @param triggerSource a TriggerSource object
- */
- public void setTriggerSource( TriggerSource triggerSource ) {
- if (triggerSource != null) {
- parameters.put(Names.triggerSource, triggerSource );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PermissionItem.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PermissionItem.java
deleted file mode 100755
index 75563e12e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PermissionItem.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.util.DebugTool;
-
-public class PermissionItem extends RPCStruct {
-
- public PermissionItem() { }
- public PermissionItem(Hashtable hash) {
- super(hash);
- }
- public String getRpcName() {
- return (String) store.get(Names.rpcName);
- }
- public void setRpcName(String rpcName) {
- if (rpcName != null) {
- store.put(Names.rpcName, rpcName);
- } else {
- store.remove(Names.rpcName);
- }
- }
- public HMIPermissions getHMIPermissions() {
- Object obj = store.get(Names.hmiPermissions);
- if (obj instanceof HMIPermissions) {
- return (HMIPermissions) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new HMIPermissions((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiPermissions, e);
- }
- }
- return null;
- }
- public void setHMIPermissions(HMIPermissions hmiPermissions) {
- if (hmiPermissions != null) {
- store.put(Names.hmiPermissions, hmiPermissions);
- } else {
- store.remove(Names.hmiPermissions);
- }
- }
- public ParameterPermissions getParameterPermissions() {
- Object obj = store.get(Names.parameterPermissions);
- if (obj instanceof ParameterPermissions) {
- return (ParameterPermissions) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new ParameterPermissions((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.parameterPermissions, e);
- }
- }
- return null;
- }
- public void setParameterPermissions(ParameterPermissions parameterPermissions) {
- if (parameterPermissions != null) {
- store.put(Names.parameterPermissions, parameterPermissions);
- } else {
- store.remove(Names.parameterPermissions);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java
deleted file mode 100755
index 2cdf15489..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Contains information about on-screen preset capabilities.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>onScreenPresetsAvailable</td>
- * <td>Boolean</td>
- * <td>Defines, if Onscreen custom presets are available.
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class PresetBankCapabilities extends RPCStruct {
-
- /**
- * Constructs a newly allocated PresetBankCapabilities object
- */
- public PresetBankCapabilities() { }
-
- /**
- * Constructs a newly allocated PresetBankCapabilities object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public PresetBankCapabilities(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set if Onscreen custom presets are available.
- * @param onScreenPresetsAvailable if Onscreen custom presets are available.
- */
- public void setOnScreenPresetsAvailable(Boolean onScreenPresetsAvailable) {
- if (onScreenPresetsAvailable != null) {
- store.put(Names.OnScreenPresetsAvailable, onScreenPresetsAvailable);
- } else {
- store.remove(Names.OnScreenPresetsAvailable);
- }
- }
-
- /**
- * Defines, if Onscreen custom presets are available.
- * @return if Onscreen custom presets are available
- */
- public Boolean onScreenPresetsAvailable() {
- return (Boolean) store.get(Names.OnScreenPresetsAvailable);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFile.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFile.java
deleted file mode 100755
index 14c388ca6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFile.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Used to push a binary data onto the SMARTDEVICELINK module from a mobile device, such as
- * icons and album art
- * <p>
- *
- * @since SmartDeviceLink 2.0
- * @see DeleteFile
- * @see ListFiles
- */
-public class PutFile extends RPCRequest {
-
- /**
- * Constructs a new PutFile object
- */
- public PutFile() {
- super("PutFile");
- }
-
- /**
- * Constructs a new PutFile object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public PutFile(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a file reference name
- *
- * @param smartDeviceLinkFileName
- * a String value representing a file reference name
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setSmartDeviceLinkFileName(String smartDeviceLinkFileName) {
- if (smartDeviceLinkFileName != null) {
- parameters.put(Names.smartDeviceLinkFileName, smartDeviceLinkFileName);
- } else {
- parameters.remove(Names.smartDeviceLinkFileName);
- }
- }
-
- /**
- * Gets a file reference name
- *
- * @return String - a String value representing a file reference name
- */
- public String getSmartDeviceLinkFileName() {
- return (String) parameters.get(Names.smartDeviceLinkFileName);
- }
-
- /**
- * Sets file type
- *
- * @param fileType
- * a FileType value representing a selected file type
- */
- public void setFileType(FileType fileType) {
- if (fileType != null) {
- parameters.put(Names.fileType, fileType);
- } else {
- parameters.remove(Names.fileType);
- }
- }
-
- /**
- * Gets a file type
- *
- * @return FileType -a FileType value representing a selected file type
- */
- public FileType getFileType() {
- Object obj = parameters.get(Names.fileType);
- if (obj instanceof FileType) {
- return (FileType) obj;
- } else if (obj instanceof String) {
- FileType theCode = null;
- try {
- theCode = FileType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fileType, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets a value to indicates if the file is meant to persist between
- * sessions / ignition cycles. If set to TRUE, then the system will aim to
- * persist this file through session / cycles. While files with this
- * designation will have priority over others, they are subject to deletion
- * by the system at any time. In the event of automatic deletion by the
- * system, the app will receive a rejection and have to resend the file. If
- * omitted, the value will be set to false
- * <p>
- *
- * @param persistentFile
- * a Boolean value
- */
- public void setPersistentFile(Boolean persistentFile) {
- if (persistentFile != null) {
- parameters.put(Names.persistentFile, persistentFile);
- } else {
- parameters.remove(Names.persistentFile);
- }
- }
-
- /**
- * Gets a value to Indicates if the file is meant to persist between
- * sessions / ignition cycles
- *
- * @return Boolean -a Boolean value to indicates if the file is meant to
- * persist between sessions / ignition cycles
- */
- public Boolean getPersistentFile() {
- return (Boolean) parameters.get(Names.persistentFile);
- }
- public void setFileData(byte[] fileData) {
- if (fileData != null) {
- parameters.put(Names.bulkData, fileData);
- } else {
- parameters.remove(Names.bulkData);
- }
- }
- public byte[] getFileData() {
- return (byte[]) parameters.get(Names.bulkData);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java
deleted file mode 100755
index a1285ee98..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Put File Response is sent, when PutFile has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class PutFileResponse extends RPCResponse {
-
- /**
- * Constructs a new PutFileResponse object
- */
- public PutFileResponse() {
- super("PutFile");
- }
-
- /**
- * Constructs a new PutFileResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public PutFileResponse(Hashtable hash) {
- super(hash);
- }
- public void setSpaceAvailable(Integer spaceAvailable) {
- if (spaceAvailable != null) {
- parameters.put(Names.spaceAvailable, spaceAvailable);
- } else {
- parameters.remove(Names.spaceAvailable);
- }
- }
- public Integer getSpaceAvailable() {
- return (Integer) parameters.get(Names.spaceAvailable);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDID.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDID.java
deleted file mode 100755
index a8d73bfdd..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDID.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Non periodic vehicle data read request. This is an RPC to get diagnostics
- * data from certain vehicle modules. DIDs of a certain module might differ from
- * vehicle type to vehicle type
- * <p>
- * Function Group: ProprietaryData
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * <p>
- *
- * @since SmartDeviceLink 2.0
- */
-public class ReadDID extends RPCRequest {
-
- /**
- * Constructs a new ReadDID object
- */
- public ReadDID() {
- super("ReadDID");
- }
-
- /**
- * Constructs a new ReadDID object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ReadDID(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets an ID of the vehicle module
- *
- * @param ecuName
- * an Integer value representing the ID of the vehicle module
- * <p>
- * <b>Notes: </b>Minvalue:0; Maxvalue:65535
- */
- public void setEcuName(Integer ecuName) {
- if (ecuName != null) {
- parameters.put(Names.ecuName, ecuName);
- } else {
- parameters.remove(Names.ecuName);
- }
- }
-
- /**
- * Gets the ID of the vehicle module
- *
- * @return Integer -an Integer value representing the ID of the vehicle
- * module
- */
- public Integer getEcuName() {
- return (Integer) parameters.get(Names.ecuName);
- }
-
- /**
- * Sets raw data from vehicle data DID location(s)
- *
- * @param didLocation
- * a Vector<Integer> value representing raw data from vehicle
- * data DID location(s)
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Minvalue:0; Maxvalue:65535</li>
- * <li>ArrayMin:0; ArrayMax:1000</li>
- * </ul>
- */
- public void setDidLocation(Vector<Integer> didLocation) {
- if (didLocation != null) {
- parameters.put(Names.didLocation, didLocation);
- } else {
- parameters.remove(Names.didLocation);
- }
- }
-
- /**
- * Gets raw data from vehicle data DID location(s)
- *
- * @return Vector<Integer> -a Vector<Integer> value representing raw data
- * from vehicle data DID location(s)
- */
- public Vector<Integer> getDidLocation() {
- if (parameters.get(Names.didLocation) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.didLocation);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof Integer) {
- return (Vector<Integer>) list;
- }
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
deleted file mode 100755
index 023e1dbec..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Read DID Response is sent, when ReadDID has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class ReadDIDResponse extends RPCResponse {
-
- public ReadDIDResponse() {
- super("ReadDID");
- }
- public ReadDIDResponse(Hashtable hash) {
- super(hash);
- }
- public void setDidResult(Vector<DIDResult> didResult) {
- if (didResult != null) {
- parameters.put(Names.didResult, didResult);
- } else {
- parameters.remove(Names.didResult);
- }
- }
- public Vector<DIDResult> getDidResult() {
- if (parameters.get(Names.didResult) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.didResult);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof DIDResult) {
- return (Vector<DIDResult>) list;
- } else if (obj instanceof Hashtable) {
- Vector<DIDResult> newList = new Vector<DIDResult>();
- for (Object hashObj : list) {
- newList.add(new DIDResult((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
deleted file mode 100755
index cf51b7303..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
+++ /dev/null
@@ -1,490 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Registers the application's interface with SMARTDEVICELINK&reg;, declaring properties of
- * the registration, including the messaging interface version, the app name,
- * etc. The mobile application must establish its interface registration with
- * SMARTDEVICELINK&reg; before any other interaction with SMARTDEVICELINK&reg; can take place. The
- * registration lasts until it is terminated either by the application calling
- * the <i> {@linkplain UnregisterAppInterface}</i> method, or by SMARTDEVICELINK&reg;
- * sending an <i> {@linkplain OnAppInterfaceUnregistered}</i> notification, or
- * by loss of the underlying transport connection, or closing of the underlying
- * message transmission protocol RPC session
- * <p>
- * Until the application receives its first <i>{@linkplain OnHMIStatus}</i>
- * Notification, its HMI Status is assumed to be: <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}</i>=NONE, <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.AudioStreamingState}
- * </i>=NOT_AUDIBLE, <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.SystemContext}</i>=MAIN
- * <p>
- * All SMARTDEVICELINK&reg; resources which the application creates or uses (e.g. Choice
- * Sets, Command Menu, etc.) are associated with the application's interface
- * registration. Therefore, when the interface registration ends, the SMARTDEVICELINK&reg;
- * resources associated with the application are disposed of. As a result, even
- * though the application itself may continue to run on its host platform (e.g.
- * mobile device) after the interface registration terminates, the application
- * will not be able to use the SMARTDEVICELINK&reg; HMI without first establishing a new
- * interface registration and re-creating its required SMARTDEVICELINK&reg; resources. That
- * is, SMARTDEVICELINK&reg; resources created by (or on behalf of) an application do not
- * persist beyond the life-span of the interface registration
- * <p>
- * Resources and settings whose lifespan is tied to the duration of an
- * application's interface registration:<br/>
- * <ul>
- * <li>Choice Sets</li>
- * <li>Command Menus (built by successive calls to <i>{@linkplain AddCommand}
- * </i>)</li>
- * <li>Media clock timer display value</li>
- * <li>Media clock timer display value</li>
- * <li>Media clock timer display value</li>
- * </ul>
- * <p>
- * The autoActivateID is used to grant an application the HMILevel and
- * AudioStreamingState it had when it last disconnected
- * <p>
- * <b>Notes: </b>The autoActivateID parameter, and associated behavior, is
- * currently ignored by SMARTDEVICELINK&reg;
- * <p>
- * When first calling this method (i.e. first time within life cycle of mobile
- * app), an autoActivateID should not be included. After successfully
- * registering an interface, an autoActivateID is returned to the mobile
- * application for it to use in subsequent connections. If the connection
- * between SMARTDEVICELINK&reg; and the mobile application is lost, such as the vehicle is
- * turned off while the application is running, the autoActivateID can then be
- * passed in another call to RegisterAppInterface to re-acquire <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}</i>=FULL
- * <p>
- * If the application intends to stream audio it is important to indicate so via
- * the isMediaApp parameter. When set to true, audio will reliably stream
- * without any configuration required by the user. When not set, audio may
- * stream, depending on what the user might have manually configured as a media
- * source on SMARTDEVICELINK&reg;
- * <p>
- * There is no time limit for how long the autoActivateID is "valid" (i.e. would
- * confer focus and opt-in)
- * <p>
- * <b>HMILevel is not defined before registering</b><br/>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see UnregisterAppInterface
- * @see OnAppInterfaceUnregistered
- */
-public class RegisterAppInterface extends RPCRequest {
- /**
- * Constructs a new RegisterAppInterface object
- */
- public RegisterAppInterface() {
- super("RegisterAppInterface");
- }
- /**
- * Constructs a new RegisterAppInterface object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public RegisterAppInterface(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the version of the SMARTDEVICELINK&reg; SmartDeviceLink interface
- *
- * @return smartdevicelinkMsgVersion -a smartdevicelinkMsgVersion object representing version of
- * the SMARTDEVICELINK&reg; SmartDeviceLink interface
- */
- public smartdevicelinkMsgVersion getsmartdevicelinkMsgVersion() {
- Object obj = parameters.get(Names.smartDeviceLinkMsgVersion);
- if (obj instanceof smartdevicelinkMsgVersion) {
- return (smartdevicelinkMsgVersion) obj;
- } else if (obj instanceof Hashtable) {
- return new smartdevicelinkMsgVersion((Hashtable) obj);
- }
- return null;
- }
- /**
- * Sets the version of the SMARTDEVICELINK&reg; SmartDeviceLink interface
- *
- * @param smartDeviceLinkMsgVersion
- * a smartdevicelinkMsgVersion object representing version of the SMARTDEVICELINK&reg;
- * SmartDeviceLink interface
- * <p>
- * <b>Notes: </b>To be compatible, app msg major version number
- * must be less than or equal to SMARTDEVICELINK&reg; major version number.
- * If msg versions are incompatible, app has 20 seconds to
- * attempt successful RegisterAppInterface (w.r.t. msg version)
- * on underlying protocol session, else will be terminated. Major
- * version number is a compatibility declaration. Minor version
- * number indicates minor functional variations (e.g. features,
- * capabilities, bug fixes) when sent from SMARTDEVICELINK&reg; to app (in
- * RegisterAppInterface response). However, the minor version
- * number sent from the app to SMARTDEVICELINK&reg; (in RegisterAppInterface
- * request) is ignored by SMARTDEVICELINK&reg;
- */
- public void setsmartdevicelinkMsgVersion(smartdevicelinkMsgVersion smartDeviceLinkMsgVersion) {
- if (smartDeviceLinkMsgVersion != null) {
- parameters.put(Names.smartDeviceLinkMsgVersion, smartDeviceLinkMsgVersion);
- } else {
- parameters.remove(Names.smartDeviceLinkMsgVersion);
- }
- }
- /**
- * Gets Mobile Application's Name
- *
- * @return String -a String representing the Mobile Application's Name
- */
- public String getAppName() {
- return (String) parameters.get(Names.appName);
- }
- /**
- * Sets Mobile Application's Name, This name is displayed in the SMARTDEVICELINK&reg;
- * Mobile Applications menu. It also serves as the unique identifier of the
- * application for SmartDeviceLink
- *
- * @param appName
- * a String value representing the Mobile Application's Name
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Must be 1-100 characters in length</li>
- * <li>May not be the same (by case insensitive comparison) as
- * the name or any synonym of any currently-registered
- * application</li>
- * </ul>
- */
- public void setAppName(String appName) {
- if (appName != null) {
- parameters.put(Names.appName, appName);
- } else {
- parameters.remove(Names.appName);
- }
- }
-
- /**
- * Gets TTS string for VR recognition of the mobile application name
- *
- * @return Vector<TTSChunk> -Vector value representing the TTS string
- * @since SmartDeviceLink 2.0
- */
- public Vector<TTSChunk> getTtsName() {
- if (parameters.get(Names.ttsName) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.ttsName);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable) hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- *
- * @param ttsName
- * a Vector<TTSChunk> value represeting the TTS Name
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>Size must be 1-100</li>
- * <li>Needs to be unique over all applications</li>
- * <li>May not be empty</li>
- * <li>May not start with a new line character</li>
- * <li>May not interfere with any name or synonym of previously
- * registered applications and the following list of words</li>
- * <li>Needs to be unique over all applications. Applications
- * with the same name will be rejected</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setTtsName(Vector<TTSChunk> ttsName) {
- if (ttsName != null) {
- parameters.put(Names.ttsName, ttsName);
- } else {
- parameters.remove(Names.ttsName);
- }
- }
- /**
- * Gets a String representing an abbreviated version of the mobile
- * applincation's name (if necessary) that will be displayed on the NGN
- * media screen
- *
- * @return String -a String value representing an abbreviated version of the
- * mobile applincation's name
- */
- public String getNgnMediaScreenAppName() {
- return (String) parameters.get(Names.ngnMediaScreenAppName);
- }
- /**
- * Sets a String representing an abbreviated version of the mobile
- * applincation's name (if necessary) that will be displayed on the NGN
- * media screen
- *
- * @param ngnMediaScreenAppName
- * a String value representing an abbreviated version of the
- * mobile applincation's name
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Must be 1-5 characters</li>
- * <li>If not provided, value will be derived from appName
- * truncated to 5 characters</li>
- * </ul>
- */
- public void setNgnMediaScreenAppName(String ngnMediaScreenAppName) {
- if (ngnMediaScreenAppName != null) {
- parameters.put(Names.ngnMediaScreenAppName, ngnMediaScreenAppName);
- } else {
- parameters.remove(Names.ngnMediaScreenAppName);
- }
- }
- /**
- * Gets the Vector<String> representing the an array of 1-100 elements, each
- * element containing a voice-recognition synonym
- *
- * @return Vector<String> -a Vector value representing the an array of
- * 1-100 elements, each element containing a voice-recognition
- * synonym
- */
- public Vector<String> getVrSynonyms() {
- if (parameters.get(Names.vrSynonyms) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.vrSynonyms);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
- /**
- * Sets a vrSynonyms representing the an array of 1-100 elements, each
- * element containing a voice-recognition synonym
- *
- * @param vrSynonyms
- * a Vector<String> value representing the an array of 1-100
- * elements
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Each vr synonym is limited to 40 characters, and there can
- * be 1-100 synonyms in array</li>
- * <li>May not be the same (by case insensitive comparison) as
- * the name or any synonym of any currently-registered
- * application</li>
- * </ul>
- */
- public void setVrSynonyms(Vector<String> vrSynonyms) {
- if (vrSynonyms != null) {
- parameters.put(Names.vrSynonyms, vrSynonyms);
- } else {
- parameters.remove(Names.vrSynonyms);
- }
- }
- /**
- * Gets a Boolean representing MediaApplication
- *
- * @return Boolean -a Boolean value representing a mobile application that is
- * a media application or not
- */
- public Boolean getIsMediaApplication() {
- return (Boolean) parameters.get(Names.isMediaApplication);
- }
- /**
- * Sets a Boolean to indicate a mobile application that is a media
- * application or not
- *
- * @param isMediaApplication
- * a Boolean value
- */
- public void setIsMediaApplication(Boolean isMediaApplication) {
- if (isMediaApplication != null) {
- parameters.put(Names.isMediaApplication, isMediaApplication);
- } else {
- parameters.remove(Names.isMediaApplication);
- }
- }
- /**
- * Gets a Language enumeration indicating what language the application
- * intends to use for user interaction (Display, TTS and VR)
- *
- * @return Enumeration -a language enumeration
- */
- public Language getLanguageDesired() {
- Object obj = parameters.get(Names.languageDesired);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.languageDesired, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Sets an enumeration indicating what language the application intends to
- * use for user interaction (Display, TTS and VR)
- *
- * @param languageDesired
- * a Language Enumeration
- * <p>
- *
- */
- public void setLanguageDesired(Language languageDesired) {
- if (languageDesired != null) {
- parameters.put(Names.languageDesired, languageDesired);
- } else {
- parameters.remove(Names.languageDesired);
- }
- }
-
- /**
- * Gets an enumeration indicating what language the application intends to
- * use for user interaction ( Display)
- *
- * @return Language - a Language value representing an enumeration
- * indicating what language the application intends to use for user
- * interaction ( Display)
- * @since SmartDeviceLink 2.0
- */
- public Language getHmiDisplayLanguageDesired() {
- Object obj = parameters.get(Names.hmiDisplayLanguageDesired);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiDisplayLanguageDesired, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets an enumeration indicating what language the application intends to
- * use for user interaction ( Display)
- *
- * @param hmiDisplayLanguageDesired
- * @since SmartDeviceLink 2.0
- */
- public void setHmiDisplayLanguageDesired(Language hmiDisplayLanguageDesired) {
- if (hmiDisplayLanguageDesired != null) {
- parameters.put(Names.hmiDisplayLanguageDesired, hmiDisplayLanguageDesired);
- } else {
- parameters.remove(Names.hmiDisplayLanguageDesired);
- }
- }
-
- /**
- * Gets a list of all applicable app types stating which classifications to
- * be given to the app.e.g. for platforms , like GEN2, this will determine
- * which "corner(s)" the app can populate
- *
- * @return Vector<AppHMIType> - a Vector value representing a list of all
- * applicable app types stating which classifications to be given to
- * the app
- * @since SmartDeviceLinke 2.0
- */
- public Vector<AppHMIType> getAppHMIType() {
- if (parameters.get(Names.appHMIType) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.appHMIType);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof AppHMIType) {
- return (Vector<AppHMIType>) list;
- } else if (obj instanceof String) {
- Vector<AppHMIType> newList = new Vector<AppHMIType>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- AppHMIType toAdd = null;
- try {
- toAdd = AppHMIType.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.appHMIType, e); }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets a a list of all applicable app types stating which classifications
- * to be given to the app. e.g. for platforms , like GEN2, this will
- * determine which "corner(s)" the app can populate
- *
- * @param appHMIType
- * a Vector<AppHMIType>
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Array Minsize: = 1</li>
- * <li>Array Maxsize = 100</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setAppHMIType(Vector<AppHMIType> appHMIType) {
- if (appHMIType != null) {
- parameters.put(Names.appHMIType, appHMIType);
- } else {
- parameters.remove(Names.appHMIType);
- }
- }
-
- /**
- * Gets the unique ID, which an app will be given when approved by Ford
- *
- * @return String - a String value representing the unique ID, which an app
- * will be given when approved by Ford
- * @since SmartDeviceLink 2.0
- */
- public String getAppID() {
- return (String) parameters.get(Names.appID);
- }
-
- /**
- * Sets a unique ID, which an app will be given when approved by Ford
- *
- * @param appID
- * a String value representing a unique ID, which an app will be
- * given when approved by Ford
- * <p>
- * <b>Notes: </b>Maxlength = 100
- * @since SmartDeviceLink 2.0
- */
- public void setAppID(String appID) {
- if (appID != null) {
- parameters.put(Names.appID, appID);
- } else {
- parameters.remove(Names.appID);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
deleted file mode 100755
index 9a99e8ffb..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
+++ /dev/null
@@ -1,460 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.Version;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Register AppInterface Response is sent, when RegisterAppInterface has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class RegisterAppInterfaceResponse extends RPCResponse {
- /**
- * Constructs a new RegisterAppInterfaceResponse object
- */
- public RegisterAppInterfaceResponse() {
- super("RegisterAppInterface");
- }
-
- /**
- * Constructs a new RegisterAppInterfaceResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public RegisterAppInterfaceResponse(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Gets the version of the SMARTDEVICELINK&reg; SmartDeviceLink interface
- *
- * @return smartdevicelinkMsgVersion -a smartdevicelinkMsgVersion object representing version of
- * the SMARTDEVICELINK&reg; SmartDeviceLink interface
- */
- public smartdevicelinkMsgVersion getsmartdevicelinkMsgVersion() {
- Object obj = parameters.get(Names.smartDeviceLinkMsgVersion);
- if (obj instanceof smartdevicelinkMsgVersion) {
- return (smartdevicelinkMsgVersion)obj;
- } else if (obj instanceof Hashtable) {
- return new smartdevicelinkMsgVersion((Hashtable)obj);
- }
- return null;
- }
-
- /**
- * Sets the version of the SMARTDEVICELINK&reg; SmartDeviceLink interface
- *
- * @param smartDeviceLinkMsgVersion
- * a smartdevicelinkMsgVersion object representing version of the SMARTDEVICELINK&reg;
- * SmartDeviceLink interface
- * <p>
- * <b>Notes: </b>To be compatible, app msg major version number
- * must be less than or equal to SMARTDEVICELINK&reg; major version number.
- * If msg versions are incompatible, app has 20 seconds to
- * attempt successful RegisterAppInterface (w.r.t. msg version)
- * on underlying protocol session, else will be terminated. Major
- * version number is a compatibility declaration. Minor version
- * number indicates minor functional variations (e.g. features,
- * capabilities, bug fixes) when sent from SMARTDEVICELINK&reg; to app (in
- * RegisterAppInterface response). However, the minor version
- * number sent from the app to SMARTDEVICELINK&reg; (in RegisterAppInterface
- * request) is ignored by SMARTDEVICELINK&reg;
- */
- public void setsmartdevicelinkMsgVersion(smartdevicelinkMsgVersion smartDeviceLinkMsgVersion) {
- if (smartDeviceLinkMsgVersion != null) {
- parameters.put(Names.smartDeviceLinkMsgVersion, smartDeviceLinkMsgVersion);
- }
- }
-
- /**
- * Gets a Language enumeration indicating what language the application
- * intends to use for user interaction (Display, TTS and VR)
- *
- * @return Enumeration -a language enumeration
- */
- public Language getLanguage() {
- Object obj = parameters.get(Names.language);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.language, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets an enumeration indicating what language the application intends to
- * use for user interaction (Display, TTS and VR)
- *
- * @param language
- * a Language Enumeration
- * <p>
- *
- */
- public void setLanguage(Language language) {
- if (language != null) {
- parameters.put(Names.language, language);
- }
- }
-
- /**
- * Gets an enumeration indicating what language the application intends to
- * use for user interaction ( Display)
- *
- * @return Language - a Language value representing an enumeration
- * indicating what language the application intends to use for user
- * interaction ( Display)
- * @since SmartDeviceLink 2.0
- */
- public Language getHmiDisplayLanguage() {
- Object obj = parameters.get(Names.hmiDisplayLanguage);
- if (obj instanceof Language) {
- return (Language) obj;
- } else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiDisplayLanguage, e);
- }
- return theCode;
- }
- return null;
- }
-
- /**
- * Sets an enumeration indicating what language the application intends to
- * use for user interaction ( Display)
- *
- * @param hmiDisplayLanguage
- * @since SmartDeviceLink 2.0
- */
- public void setHmiDisplayLanguage(Language hmiDisplayLanguage) {
- if (hmiDisplayLanguage != null) {
- parameters.put(Names.hmiDisplayLanguage, hmiDisplayLanguage);
- } else {
- parameters.remove(Names.hmiDisplayLanguage);
- }
- }
-
- /**
- * Gets getDisplayCapabilities set when application interface is registered.
- *
- * @return DisplayCapabilities
- */
- public DisplayCapabilities getDisplayCapabilities() {
- Object obj = parameters.get(Names.displayCapabilities);
- if (obj instanceof DisplayCapabilities) {
- return (DisplayCapabilities)obj;
- } else if (obj instanceof Hashtable) {
- return new DisplayCapabilities((Hashtable)obj);
- }
- return null;
- }
- /**
- * Sets Display Capabilities
- * @param displayCapabilities
- */
- public void setDisplayCapabilities(DisplayCapabilities displayCapabilities) {
- if (displayCapabilities != null) {
- parameters.put(Names.displayCapabilities, displayCapabilities);
- }
- }
-
- /**
- * Gets buttonCapabilities set when application interface is registered.
- *
- * @return buttonCapabilities
- */
- public Vector<ButtonCapabilities> getButtonCapabilities() {
- if (parameters.get(Names.buttonCapabilities) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.buttonCapabilities);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof ButtonCapabilities) {
- return (Vector<ButtonCapabilities>) list;
- } else if (obj instanceof Hashtable) {
- Vector<ButtonCapabilities> newList = new Vector<ButtonCapabilities>();
- for (Object hashObj : list) {
- newList.add(new ButtonCapabilities((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets Button Capabilities
- * @param buttonCapabilities
- */
- public void setButtonCapabilities(Vector<ButtonCapabilities> buttonCapabilities) {
- if (buttonCapabilities != null) {
- parameters.put(Names.buttonCapabilities, buttonCapabilities);
- }
- }
- /**
- * Gets getSoftButtonCapabilities set when application interface is registered.
- *
- * @return SoftButtonCapabilities
- */
- public Vector<SoftButtonCapabilities> getSoftButtonCapabilities() {
- if (parameters.get(Names.softButtonCapabilities) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtonCapabilities);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButtonCapabilities) {
- return (Vector<SoftButtonCapabilities>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButtonCapabilities> newList = new Vector<SoftButtonCapabilities>();
- for (Object hashObj : list) {
- newList.add(new SoftButtonCapabilities((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets softButtonCapabilities
- * @param softButtonCapabilities
- */
- public void setSoftButtonCapabilities(Vector<SoftButtonCapabilities> softButtonCapabilities) {
- if (softButtonCapabilities != null) {
- parameters.put(Names.softButtonCapabilities, softButtonCapabilities);
- }
- }
-
- /**
- * Gets getPresetBankCapabilities set when application interface is registered.
- *
- * @return PresetBankCapabilities
- */
- public PresetBankCapabilities getPresetBankCapabilities() {
- Object obj = parameters.get(Names.presetBankCapabilities);
- if (obj instanceof PresetBankCapabilities) {
- return (PresetBankCapabilities)obj;
- } else if (obj instanceof Hashtable) {
- return new PresetBankCapabilities((Hashtable)obj);
- }
- return null;
- }
- /**
- * Sets presetBankCapabilities
- * @param presetBankCapabilities
- */
- public void setPresetBankCapabilities(PresetBankCapabilities presetBankCapabilities) {
- if (presetBankCapabilities != null) {
- parameters.put(Names.presetBankCapabilities, presetBankCapabilities);
- }
- }
-
- /**
- * Gets hmiZoneCapabilities set when application interface is registered.
- *
- * @return HmiZoneCapabilities
- */
- public Vector<HmiZoneCapabilities> getHmiZoneCapabilities() {
- if (parameters.get(Names.hmiZoneCapabilities) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.hmiZoneCapabilities);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof HmiZoneCapabilities) {
- return (Vector<HmiZoneCapabilities>) list;
- } else if (obj instanceof String) {
- Vector<HmiZoneCapabilities> newList = new Vector<HmiZoneCapabilities>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- HmiZoneCapabilities toAdd = null;
- try {
- toAdd = HmiZoneCapabilities.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.hmiZoneCapabilities, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets hmiZoneCapabilities
- * @param hmiZoneCapabilities
- */
- public void setHmiZoneCapabilities(Vector<HmiZoneCapabilities> hmiZoneCapabilities) {
- if (hmiZoneCapabilities != null) {
- parameters.put(Names.hmiZoneCapabilities, hmiZoneCapabilities);
- }
- }
-
- /**
- * Gets speechCapabilities set when application interface is registered.
- *
- * @return SpeechCapabilities
- */
- public Vector<SpeechCapabilities> getSpeechCapabilities() {
- if (parameters.get(Names.speechCapabilities) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.speechCapabilities);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SpeechCapabilities) {
- return (Vector<SpeechCapabilities>) list;
- } else if (obj instanceof String) {
- Vector<SpeechCapabilities> newList = new Vector<SpeechCapabilities>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- SpeechCapabilities toAdd = null;
- try {
- toAdd = SpeechCapabilities.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.speechCapabilities, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets speechCapabilities
- * @param speechCapabilities
- */
- public void setSpeechCapabilities(Vector<SpeechCapabilities> speechCapabilities) {
- if (speechCapabilities != null) {
- parameters.put(Names.speechCapabilities, speechCapabilities);
- }
- }
-
- /**
- * Gets vrCapabilities set when application interface is registered.
- *
- * @return VrCapabilities
- */
- public Vector<VrCapabilities> getVrCapabilities() {
- if (parameters.get(Names.vrCapabilities) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.vrCapabilities);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof VrCapabilities) {
- return (Vector<VrCapabilities>) list;
- } else if (obj instanceof String) {
- Vector<VrCapabilities> newList = new Vector<VrCapabilities>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- VrCapabilities toAdd = null;
- try {
- toAdd = VrCapabilities.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.vrCapabilities, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets VrCapabilities
- * @param vrCapabilities
- */
- public void setVrCapabilities(Vector<VrCapabilities> vrCapabilities) {
- if (vrCapabilities != null) {
- parameters.put(Names.vrCapabilities, vrCapabilities);
- }
- }
-
- /**
- * Gets getVehicleType set when application interface is registered.
- *
- * @return vehicleType
- */
- public VehicleType getVehicleType() {
- Object obj = parameters.get(Names.vehicleType);
- if (obj instanceof VehicleType) {
- return (VehicleType)obj;
- } else if (obj instanceof Hashtable) {
- return new VehicleType((Hashtable)obj);
- }
- return null;
- }
- /**
- * Sets vehicleType
- * @param vehicleType
- */
- public void setVehicleType(VehicleType vehicleType) {
- if (vehicleType != null) {
- parameters.put(Names.vehicleType, vehicleType);
- }
- }
-
- /**
- * Gets AudioPassThruCapabilities set when application interface is registered.
- *
- * @return AudioPassThruCapabilities
- */
- public Vector<AudioPassThruCapabilities> getAudioPassThruCapabilities() {
- if (parameters.get(Names.audioPassThruCapabilities) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.audioPassThruCapabilities);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof AudioPassThruCapabilities) {
- return (Vector<AudioPassThruCapabilities>) list;
- } else if (obj instanceof Hashtable) {
- Vector<AudioPassThruCapabilities> newList = new Vector<AudioPassThruCapabilities>();
- for (Object hashObj : list) {
- newList.add(new AudioPassThruCapabilities((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets AudioPassThruCapabilities
- * @param audioPassThruCapabilities
- */
- public void setAudioPassThruCapabilities(Vector<AudioPassThruCapabilities> audioPassThruCapabilities) {
- if (audioPassThruCapabilities != null) {
- parameters.put(Names.audioPassThruCapabilities, audioPassThruCapabilities);
- }
- }
- public String getProxyVersionInfo() {
- if (Version.VERSION != null)
- return Version.VERSION;
-
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
deleted file mode 100755
index 096e5ec38..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Resets the passed global properties to their default values as defined by
- * SMARTDEVICELINK
- * <p>
- * The HELPPROMPT global property default value is generated by SMARTDEVICELINK consists of
- * the first vrCommand of each Command Menu item defined at the moment PTT is
- * pressed<br/>
- * The TIMEOUTPROMPT global property default value is the same as the HELPPROMPT
- * global property default value
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see SetGlobalProperties
- */
-public class ResetGlobalProperties extends RPCRequest {
- /**
- * Constructs a new ResetGlobalProperties object
- */
- public ResetGlobalProperties() {
- super("ResetGlobalProperties");
- }
- /**
- * Constructs a new ResetGlobalProperties object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ResetGlobalProperties(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets an array of one or more GlobalProperty enumeration elements
- * indicating which global properties to reset to their default value
- *
- * @return Vector<GlobalProperty> -an array of one or more GlobalProperty
- * enumeration elements
- */
- public Vector<GlobalProperty> getProperties() {
- if (parameters.get(Names.properties) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.properties);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof GlobalProperty) {
- return (Vector<GlobalProperty>) list;
- } else if (obj instanceof String) {
- Vector<GlobalProperty> newList = new Vector<GlobalProperty>();
- for (Object hashObj : list) {
- String strFormat = (String)hashObj;
- GlobalProperty toAdd = null;
- try {
- toAdd = GlobalProperty.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.properties, e);
- }
- if (toAdd != null) {
- newList.add(toAdd);
- }
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets an array of one or more GlobalProperty enumeration elements
- * indicating which global properties to reset to their default value
- *
- * @param properties
- * a Vector<GlobalProperty> An array of one or more
- * GlobalProperty enumeration elements indicating which global
- * properties to reset to their default value
- * <p>
- * <b>Notes: </b>Array must have at least one element
- */
- public void setProperties( Vector<GlobalProperty> properties ) {
- if (properties != null) {
- parameters.put(Names.properties, properties );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
deleted file mode 100755
index 0c4570a3b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Reset Global Properties Response is sent, when ResetGlobalProperties has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class ResetGlobalPropertiesResponse extends RPCResponse {
-
- /**
- * Constructs a new ResetGlobalPropertiesResponse object
- */
- public ResetGlobalPropertiesResponse() {
- super("ResetGlobalProperties");
- }
-
- /**
- * Constructs a new ResetGlobalPropertiesResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ResetGlobalPropertiesResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
deleted file mode 100755
index 203655914..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.SystemAction;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Creates a full screen overlay containing a large block of formatted text that
- * can be scrolled with up to 8 SoftButtons defined
- * <p>
- * Function Group: ScrollableMessage
- * <p>
- * <b>HMILevel needs to be FULL</b>
- * <p>
- */
-public class ScrollableMessage extends RPCRequest {
-
- /**
- * Constructs a new ScrollableMessage object
- */
- public ScrollableMessage() {
- super("ScrollableMessage");
- }
-
- /**
- * Constructs a new ScrollableMessage object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ScrollableMessage(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a Body of text that can include newlines and tabs
- *
- * @param scrollableMessageBody
- * a String value representing the Body of text that can include
- * newlines and tabs
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setScrollableMessageBody(String scrollableMessageBody) {
- if (scrollableMessageBody != null) {
- parameters.put(Names.scrollableMessageBody, scrollableMessageBody);
- } else {
- parameters.remove(Names.scrollableMessageBody);
- }
- }
-
- /**
- * Gets a Body of text that can include newlines and tabs
- *
- * @return String -a String value
- */
- public String getScrollableMessageBody() {
- return (String) parameters.get(Names.scrollableMessageBody);
- }
-
- /**
- * Sets an App defined timeout. Indicates how long of a timeout from the
- * last action
- *
- * @param timeout
- * an Integer value representing an App defined timeout
- * <p>
- * <b>Notes</b>:Minval=0; Maxval=65535;Default=30000
- */
- public void setTimeout(Integer timeout) {
- if (timeout != null) {
- parameters.put(Names.timeout, timeout);
- } else {
- parameters.remove(Names.timeout);
- }
- }
-
- /**
- * Gets an App defined timeout
- *
- * @return Integer -an Integer value representing an App defined timeout
- */
- public Integer getTimeout() {
- return (Integer) parameters.get(Names.timeout);
- }
-
- /**
- * Sets App defined SoftButtons.If omitted on supported displays, only the
- * system defined "Close" SoftButton will be displayed
- *
- * @param softButtons
- * a Vector<SoftButton> value representing App defined
- * SoftButtons
- * <p>
- * <b>Notes: </b>Minsize=0, Maxsize=8
- */
- public void setSoftButtons(Vector<SoftButton> softButtons) {
- if (softButtons != null) {
- parameters.put(Names.softButtons, softButtons);
- } else {
- parameters.remove(Names.softButtons);
- }
- }
-
- /**
- * Gets App defined soft button
- * @return Vector -Vector<SoftButton> value
- */
- public Vector<SoftButton> getSoftButtons() {
- if (parameters.get(Names.softButtons) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtons);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButton) {
- return (Vector<SoftButton>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButton> newList = new Vector<SoftButton>();
- for (Object hashObj : list) {
- newList.add(new SoftButton((Hashtable) hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
deleted file mode 100755
index 8be227730..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Scrollable Message Response is sent, when ScrollableMessage has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class ScrollableMessageResponse extends RPCResponse {
-
- /**
- * Constructs a new ScrollableMessageResponse object
- */
- public ScrollableMessageResponse() {
- super("ScrollableMessage");
- }
-
- /**
- * Constructs a new ScrollableMessageResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ScrollableMessageResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java
deleted file mode 100755
index c234f4dde..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Used to set existing local file on SMARTDEVICELINK as the app's icon. Not supported on
- * first generation SMARTDEVICELINK vehicles
- * <p>
- *
- * @since SmartDeviceLink 2.0
- */
-public class SetAppIcon extends RPCRequest {
-
- /**
- * Constructs a new SetAppIcon object
- */
- public SetAppIcon() {
- super("SetAppIcon");
- }
-
- /**
- * Constructs a new SetAppIcon object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetAppIcon(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a file reference name
- *
- * @param smartDeviceLinkFileName
- * a String value representing a file reference name
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setSmartDeviceLinkFileName(String smartDeviceLinkFileName) {
- if (smartDeviceLinkFileName != null) {
- parameters.put(Names.smartDeviceLinkFileName, smartDeviceLinkFileName);
- } else {
- parameters.remove(Names.smartDeviceLinkFileName);
- }
- }
-
- /**
- * Gets a file reference name
- * @return String -a String value
- */
- public String getSmartDeviceLinkFileName() {
- return (String) parameters.get(Names.smartDeviceLinkFileName);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
deleted file mode 100755
index 8ee16aeb6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-public class SetAppIconResponse extends RPCResponse {
-
- public SetAppIconResponse() {
- super("SetAppIcon");
- }
- public SetAppIconResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
deleted file mode 100755
index b72860ce5..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Used to set an alternate display layout. If not sent, default screen for
- * given platform will be shown
- * <p>
- *
- * @since SmartDeviceLink 2.0
- */
-public class SetDisplayLayout extends RPCRequest {
-
- /**
- * Constructs a new SetDisplayLayout object
- */
- public SetDisplayLayout() {
- super("SetDisplayLayout");
- }
-
- /**
- * Constructs a new SetDisplayLayout object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetDisplayLayout(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a display layout. Predefined or dynamically created screen layout.
- * Currently only predefined screen layouts are defined. Predefined layouts
- * include: "ONSCREEN_PRESETS" Custom screen containing app-defined onscreen
- * presets. Currently defined for GEN2
- *
- * @param displayLayout
- * a String value representing a diaply layout
- */
- public void setDisplayLayout(String displayLayout) {
- if (displayLayout != null) {
- parameters.put(Names.displayLayout, displayLayout);
- } else {
- parameters.remove(Names.displayLayout);
- }
- }
-
- /**
- * Gets a display layout.
- */
- public String getDisplayLayout() {
- return (String) parameters.get(Names.displayLayout);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
deleted file mode 100755
index 5f869fa5e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Set Display Layout Response is sent, when SetDisplayLayout has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class SetDisplayLayoutResponse extends RPCResponse {
-
- /**
- * Constructs a new SetDisplayLayoutResponse object
- */
- public SetDisplayLayoutResponse() {
- super("SetDisplayLayout");
- }
-
- /**
- * Constructs a new SetDisplayLayoutResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetDisplayLayoutResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
deleted file mode 100755
index f1178d47d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-/**
- * Sets value(s) for the specified global property(ies)
- * <p>
- * Function Group: Base <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see ResetGlobalProperties
- */
-public class SetGlobalProperties extends RPCRequest {
- /**
- * Constructs a new SetGlobalProperties object
- */
- public SetGlobalProperties() {
- super("SetGlobalProperties");
- }
- /**
- * Constructs a new SetGlobalProperties object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetGlobalProperties(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets a Vector<TTSChunk> for Help Prompt representing Array of one or more
- * TTSChunk elements specifying the help prompt used in an interaction
- * started by PTT
- *
- * @return Vector<TTSChunk> -an Array of one or more TTSChunk elements
- * specifying the help prompt used in an interaction started by PTT
- */
- public Vector<TTSChunk> getHelpPrompt() {
- if (parameters.get(Names.helpPrompt) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.helpPrompt);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets a Vector<TTSChunk> for Help Prompt that Array of one or more
- * TTSChunk elements specifying the help prompt used in an interaction
- * started by PTT
- *
- * @param helpPrompt
- * a Vector<TTSChunk> of one or more TTSChunk elements
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Array must have at least one element</li>
- * <li>Only optional it timeoutPrompt has been specified</li>
- * </ul>
- */
- public void setHelpPrompt(Vector<TTSChunk> helpPrompt) {
- if (helpPrompt != null) {
- parameters.put(Names.helpPrompt, helpPrompt);
- }
- }
- /**
- * Gets a Vector<TTSChunk> for Timeout Prompt representing Array of one or
- * more TTSChunk elements specifying the help prompt used in an interaction
- * started by PTT
- *
- * @return Vector<TTSChunk> -an Array of one or more TTSChunk elements
- * specifying the help prompt used in an interaction started by PTT
- */
- public Vector<TTSChunk> getTimeoutPrompt() {
- if (parameters.get(Names.timeoutPrompt) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.timeoutPrompt);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets a Vector<TTSChunk> for Timeout Prompt representing Array of one or
- * more TTSChunk elements specifying the help prompt used in an interaction
- * started by PTT
- *
- */
- public void setTimeoutPrompt(Vector<TTSChunk> timeoutPrompt) {
- if (timeoutPrompt != null) {
- parameters.put(Names.timeoutPrompt, timeoutPrompt);
- }
- }
-
- /**
- * Gets a voice recognition Help Title
- *
- * @return String - a String value representing the text, which is shown as
- * title of the VR help screen used in an interaction started by PTT
- * @since SmartDeviceLink 2.0
- */
- public String getVrHelpTitle() {
- return (String) parameters.get(Names.vrHelpTitle);
- }
-
- /**
- * Sets a voice recognition Help Title
- *
- * @param vrHelpTitle
- * a String value representing a voice recognition Help Title
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>If omitted on supported displays, the default SMARTDEVICELINK help
- * title will be used</li>
- * <li>If omitted and one or more vrHelp items are provided, the
- * request will be rejected.</li>
- * <li>String Maxlength = 500</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setVrHelpTitle(String vrHelpTitle) {
- if (vrHelpTitle != null) {
- parameters.put(Names.vrHelpTitle, vrHelpTitle);
- } else {
- parameters.remove(Names.vrHelpTitle);
- }
- }
-
- /**
- * Gets items listed in the VR help screen used in an interaction started by
- * PTT
- *
- * @return Vector<VrHelpItem> - a Vector value representing items listed in
- * the VR help screen used in an interaction started by PTT
- * @since SmartDeviceLink 2.0
- */
- public Vector<VrHelpItem> getVrHelp() {
- if (parameters.get(Names.vrHelp) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.vrHelp);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof VrHelpItem) {
- return (Vector<VrHelpItem>) list;
- } else if (obj instanceof Hashtable) {
- Vector<VrHelpItem> newList = new Vector<VrHelpItem>();
- for (Object hashObj : list) {
- newList.add(new VrHelpItem((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets the items listed in the VR help screen used in an interaction
- * started by PTT
- *
- * @param vrHelp
- * a Vector value representing items listed in the VR help screen
- * used in an interaction started by PTT
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>If omitted on supported displays, the default SmartDeviceLink VR
- * help / What Can I Say? screen will be used</li>
- * <li>If the list of VR Help Items contains nonsequential
- * positions (e.g. [1,2,4]), the RPC will be rejected</li>
- * <li>If omitted and a vrHelpTitle is provided, the request
- * will be rejected</li>
- * <li>Array Minsize: = 1</li>
- * <li>Array Maxsize = 100</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setVrHelp(Vector<VrHelpItem> vrHelp) {
- if (vrHelp != null) {
- parameters.put(Names.vrHelp, vrHelp);
- } else {
- parameters.remove(Names.vrHelp);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
deleted file mode 100755
index ad16c466d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Set Global Properties Response is sent, when SetGlobalProperties has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class SetGlobalPropertiesResponse extends RPCResponse {
-
- /**
- * Constructs a new SetGlobalPropertiesResponse object
- */
- public SetGlobalPropertiesResponse() {
- super("SetGlobalProperties");
- }
-
- /**
- * Constructs a new SetGlobalPropertiesResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetGlobalPropertiesResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
deleted file mode 100755
index 299771ce6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Sets the media clock/timer value and the update method (e.g.count-up,
- * count-down, etc.)
- * <p>
- * Function Group: Base <p>
- * <b>HMILevel needs to be FULL, LIMITIED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- */
-public class SetMediaClockTimer extends RPCRequest {
- /**
- * Constructs a new SetMediaClockTimer object
- */
- public SetMediaClockTimer() {
- super("SetMediaClockTimer");
- }
- /**
- * Constructs a new SetMediaClockTimer object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetMediaClockTimer(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the Start Time which media clock timer is set
- *
- * @return StartTime -a StartTime object specifying hour, minute, second
- * values
- */
- public StartTime getStartTime() {
- Object obj = parameters.get(Names.startTime);
- if (obj instanceof StartTime) {
- return (StartTime)obj;
- } else if (obj instanceof Hashtable) {
- return new StartTime((Hashtable)obj);
- }
- return null;
- }
- /**
- * Sets a Start Time with specifying hour, minute, second values
- *
- * @param startTime
- * a startTime object with specifying hour, minute, second values
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>If "updateMode" is COUNTUP or COUNTDOWN, this parameter
- * must be provided</li>
- * <li>Will be ignored for PAUSE/RESUME and CLEAR</li>
- * </ul>
- */
- public void setStartTime( StartTime startTime ) {
- if (startTime != null) {
- parameters.put(Names.startTime, startTime );
- }
- }
- /**
- * Gets the media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)
- *
- * @return UpdateMode -a Enumeration value (COUNTUP/COUNTDOWN/PAUSE/RESUME)
- */
- public UpdateMode getUpdateMode() {
- Object obj = parameters.get(Names.updateMode);
- if (obj instanceof UpdateMode) {
- return (UpdateMode) obj;
- } else if (obj instanceof String) {
- UpdateMode theCode = null;
- try {
- theCode = UpdateMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.updateMode, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Sets the media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)
- *
- * @param updateMode
- * a Enumeration value (COUNTUP/COUNTDOWN/PAUSE/RESUME)
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>When updateMode is PAUSE, RESUME or CLEAR, the start time value
- * is ignored</li>
- * <li>When updateMode is RESUME, the timer resumes counting from
- * the timer's value when it was paused</li>
- * </ul>
- */
- public void setUpdateMode( UpdateMode updateMode ) {
- if (updateMode != null) {
- parameters.put(Names.updateMode, updateMode );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
deleted file mode 100755
index 59551564e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Set Media Clock Timer Response is sent, when SetMediaClockTimer has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class SetMediaClockTimerResponse extends RPCResponse {
-
- /**
- * Constructs a new SetMediaClockTimerResponse object
- */
- public SetMediaClockTimerResponse() {
- super("SetMediaClockTimer");
- }
-
- /**
- * Constructs a new SetMediaClockTimerResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SetMediaClockTimerResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Show.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Show.java
deleted file mode 100755
index f2e7cc251..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Show.java
+++ /dev/null
@@ -1,465 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Updates the application's display text area, regardless of whether or not
- * this text area is visible to the user at the time of the request. The
- * application's display text area remains unchanged until updated by subsequent
- * calls to Show
- * <p>
- * The content of the application's display text area is visible to the user
- * when the application's {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}
- * is FULL or LIMITED, and the
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.SystemContext}=MAIN and no
- * {@linkplain Alert} is in progress
- * <p>
- * The Show operation cannot be used to create an animated scrolling screen. To
- * avoid distracting the driver, Show commands cannot be issued more than once
- * every 4 seconds. Requests made more frequently than this will be rejected
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see Alert
- * @see SetMediaClockTimer
- */
-public class Show extends RPCRequest {
-
- /**
- * Constructs a new Show object
- */
- public Show() {
- super("Show");
- }
- /**
- * Constructs a new Show object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public Show(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the text displayed in a single-line display, or in the upper display
- * line in a two-line display
- *
- * @return String -a String value representing the text displayed in a
- * single-line display, or in the upper display line in a two-line
- * display
- */
- public String getMainField1() {
- return (String) parameters.get(Names.mainField1);
- }
- /**
- * Sets the text displayed in a single-line display, or in the upper display
- * line in a two-line display
- *
- * @param mainField1
- * the String value representing the text displayed in a
- * single-line display, or in the upper display line in a
- * two-line display
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>If this parameter is omitted, the text of mainField1 does
- * not change</li>
- * <li>If this parameter is an empty string, the field will be
- * cleared</li>
- * </ul>
- */
- public void setMainField1(String mainField1) {
- if (mainField1 != null) {
- parameters.put(Names.mainField1, mainField1);
- } else {
- parameters.remove(Names.mainField1);
- }
- }
- /**
- * Gets the text displayed on the second display line of a two-line display
- *
- * @return String -a String value representing the text displayed on the
- * second display line of a two-line display
- */
- public String getMainField2() {
- return (String) parameters.get(Names.mainField2);
- }
- /**
- * Sets the text displayed on the second display line of a two-line display
- *
- * @param mainField2
- * the String value representing the text displayed on the second
- * display line of a two-line display
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>If this parameter is omitted, the text of mainField2 does
- * not change</li>
- * <li>If this parameter is an empty string, the field will be
- * cleared</li>
- * <li>If provided and the display is a single-line display, the
- * parameter is ignored</li>
- * <li>Maxlength = 500</li>
- * </ul>
- */
- public void setMainField2(String mainField2) {
- if (mainField2 != null) {
- parameters.put(Names.mainField2, mainField2);
- } else {
- parameters.remove(Names.mainField2);
- }
- }
-
- /**
- * Gets the text displayed on the first display line of the second page
- *
- * @return String -a String value representing the text displayed on the
- * first display line of the second page
- * @since SmartDeviceLink 2.0
- */
- public String getMainField3() {
- return (String) parameters.get(Names.mainField3);
- }
-
- /**
- * Sets the text displayed on the first display line of the second page
- *
- * @param mainField3
- * the String value representing the text displayed on the first
- * display line of the second page
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>If this parameter is omitted, the text of mainField3 does
- * not change</li>
- * <li>If this parameter is an empty string, the field will be
- * cleared</li>
- * <li>If provided and the display is a single-line display, the
- * parameter is ignored</li>
- * <li>Maxlength = 500</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setMainField3(String mainField3) {
- if (mainField3 != null) {
- parameters.put(Names.mainField3, mainField3);
- } else {
- parameters.remove(Names.mainField3);
- }
- }
-
- /**
- * Gets the text displayed on the second display line of the second page
- *
- * @return String -a String value representing the text displayed on the
- * first display line of the second page
- * @since SmartDeviceLink 2.0
- */
- public String getMainField4() {
- return (String) parameters.get(Names.mainField4);
- }
-
- /**
- * Sets the text displayed on the second display line of the second page
- *
- * @param mainField4
- * the String value representing the text displayed on the second
- * display line of the second page
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>If this parameter is omitted, the text of mainField4 does
- * not change</li>
- * <li>If this parameter is an empty string, the field will be
- * cleared</li>
- * <li>If provided and the display is a single-line display, the
- * parameter is ignored</li>
- * <li>Maxlength = 500</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setMainField4(String mainField4) {
- if (mainField4 != null) {
- parameters.put(Names.mainField4, mainField4);
- } else {
- parameters.remove(Names.mainField4);
- }
- }
- /**
- * Gets the alignment that Specifies how mainField1 and mainField2 text
- * should be aligned on display
- *
- * @return TextAlignment -an Enumeration value
- */
- public TextAlignment getAlignment() {
- Object obj = parameters.get(Names.alignment);
- if (obj instanceof TextAlignment) {
- return (TextAlignment) obj;
- } else if (obj instanceof String) {
- TextAlignment theCode = null;
- try {
- theCode = TextAlignment.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.alignment, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Sets the alignment that Specifies how mainField1 and mainField2 text
- * should be aligned on display
- *
- * @param alignment
- * an Enumeration value
- * <p>
- * <b>Notes: </b>
- * <ul>
- * <li>Applies only to mainField1 and mainField2 provided on this
- * call, not to what is already showing in display</li>
- * <li>If this parameter is omitted, text in both mainField1 and
- * mainField2 will be centered</li>
- * <li>Has no effect with navigation display</li>
- * </ul>
- */
- public void setAlignment(TextAlignment alignment) {
- if (alignment != null) {
- parameters.put(Names.alignment, alignment);
- } else {
- parameters.remove(Names.alignment);
- }
- }
- /**
- * Gets text in the Status Bar
- *
- * @return String -the value in the Status Bar
- */
- public String getStatusBar() {
- return (String) parameters.get(Names.statusBar);
- }
- /**
- * Sets text in the Status Bar
- *
- * @param statusBar
- * a String representing the text you want to add in the Status
- * Bar
- * <p>
- * <b>Notes: </b><i>The status bar only exists on navigation
- * displays</i><br/>
- * <ul>
- * <li>If this parameter is omitted, the status bar text will
- * remain unchanged</li>
- * <li>If this parameter is an empty string, the field will be
- * cleared</li>
- * <li>If provided and the display has no status bar, this
- * parameter is ignored</li>
- * </ul>
- */
- public void setStatusBar(String statusBar) {
- if (statusBar != null) {
- parameters.put(Names.statusBar, statusBar);
- } else {
- parameters.remove(Names.statusBar);
- }
- }
- /**
- * Gets the String value of the MediaClock
- *
- * @return String -a String value of the MediaClock
- */
- public String getMediaClock() {
- return (String) parameters.get(Names.mediaClock);
- }
- /**
- * Sets the value for the MediaClock field using a format described in the
- * MediaClockFormat enumeration
- *
- * @param mediaClock
- * a String value for the MdaiaClock
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>Must be properly formatted as described in the
- * MediaClockFormat enumeration</li>
- * <li>If a value of five spaces is provided, this will clear
- * that field on the display (i.e. the media clock timer field
- * will not display anything)</li>
- * </ul>
- */
- public void setMediaClock(String mediaClock) {
- if (mediaClock != null) {
- parameters.put(Names.mediaClock, mediaClock);
- } else {
- parameters.remove(Names.mediaClock);
- }
- }
- /**
- * Gets the text in the track field
- *
- * @return String -a String displayed in the track field
- */
- public String getMediaTrack() {
- return (String) parameters.get(Names.mediaTrack);
- }
- /**
- * Sets the text in the track field
- *
- * @param mediaTrack
- * a String value disaplayed in the track field
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>If parameter is omitted, the track field remains unchanged</li>
- * <li>If an empty string is provided, the field will be cleared</li>
- * <li>This field is only valid for media applications on navigation displays</li>
- * </ul>
- */
- public void setMediaTrack(String mediaTrack) {
- if (mediaTrack != null) {
- parameters.put(Names.mediaTrack, mediaTrack);
- } else {
- parameters.remove(Names.mediaTrack);
- }
- }
-
- /**
- * Sets an image to be shown on supported displays
- *
- * @param graphic
- * the value representing the image shown on supported displays
- * <p>
- * <b>Notes: </b>If omitted on supported displays, the displayed
- * graphic shall not change<br/>
- * @since SmartDeviceLink 2.0
- */
- public void setGraphic(Image graphic) {
- if (graphic != null) {
- parameters.put(Names.graphic, graphic);
- } else {
- parameters.remove(Names.graphic);
- }
- }
-
- /**
- * Gets an image to be shown on supported displays
- *
- * @return Image -the value representing the image shown on supported
- * displays
- * @since SmartDeviceLink 2.0
- */
- public Image getGraphic() {
- Object obj = parameters.get(Names.graphic);
- if (obj instanceof Image) {
- return (Image) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new Image((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.graphic, e);
- }
- }
- return null;
- }
-
- /**
- * Gets the Soft buttons defined by the App
- *
- * @return Vector<SoftButton> -a Vector value representing the Soft buttons
- * defined by the App
- * @since SmartDeviceLink 2.0
- */
- public Vector<SoftButton> getSoftButtons() {
- if (parameters.get(Names.softButtons) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtons);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButton) {
- return (Vector<SoftButton>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButton> newList = new Vector<SoftButton>();
- for (Object hashObj : list) {
- newList.add(new SoftButton((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets the the Soft buttons defined by the App
- *
- * @param softButtons
- * a Vector value represemting the Soft buttons defined by the
- * App
- * <p>
- * <b>Notes: </b><br/>
- * <ul>
- * <li>If omitted on supported displays, the currently displayed
- * SoftButton values will not change</li>
- * <li>Array Minsize: 0</li>
- * <li>Array Maxsize: 8</li>
- * </ul>
- *
- * @since SmartDeviceLink 2.0
- */
- public void setSoftButtons(Vector<SoftButton> softButtons) {
- if (softButtons != null) {
- parameters.put(Names.softButtons, softButtons);
- } else {
- parameters.remove(Names.softButtons);
- }
- }
-
- /**
- * Gets the Custom Presets defined by the App
- *
- * @return Vector<String> - a Vector value representing the Custom presets
- * defined by the App
- * @since SmartDeviceLink 2.0
- */
- public Vector<String> getCustomPresets() {
- if (parameters.get(Names.customPresets) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.customPresets);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets the Custom Presets defined by the App
- *
- * @param customPresets
- * a Vector value representing the Custom Presets defined by the
- * App
- * <p>
- * <ul>
- * <li>If omitted on supported displays, the presets will be shown as not defined</li>
- * <li>Array Minsize: 0</li>
- * <li>Array Maxsize: 6</li>
- * </ul>
- * @since SmartDeviceLink 2.0
- */
- public void setCustomPresets(Vector<String> customPresets) {
- if (customPresets != null) {
- parameters.put(Names.customPresets, customPresets);
- } else {
- parameters.remove(Names.customPresets);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBT.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBT.java
deleted file mode 100755
index e21afd212..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBT.java
+++ /dev/null
@@ -1,298 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * This RPC is used to update the user with navigation information for the
- * constantly shown screen (base screen), but also for the alert type screen
- * <p>
- * Function Group: Navigation
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * <p>
- *
- * @since SmartDeviceLink 2.0
- * @see AlertManeuver
- * @see UpdateTurnList
- */
-public class ShowConstantTBT extends RPCRequest {
-
- /**
- * Constructs a new ShowConstantTBT object
- */
- public ShowConstantTBT() {
- super("ShowConstantTBT");
- }
-
- /**
- * Constructs a new ShowConstantTBT object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ShowConstantTBT(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a text for navigation text field 1
- *
- * @param navigationText1
- * a String value representing a text for navigation text field 1
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setNavigationText1(String navigationText1) {
- if (navigationText1 != null) {
- parameters.put(Names.navigationText1, navigationText1);
- } else {
- parameters.remove(Names.navigationText1);
- }
- }
-
- /**
- * Gets a text for navigation text field 1
- *
- * @return String -a String value representing a text for navigation text
- * field 1
- */
- public String getNavigationText1() {
- return (String) parameters.get(Names.navigationText1);
- }
-
- /**
- * Sets a text for navigation text field 2
- *
- * @param navigationText2
- * a String value representing a text for navigation text field 2
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setNavigationText2(String navigationText2) {
- if (navigationText2 != null) {
- parameters.put(Names.navigationText2, navigationText2);
- } else {
- parameters.remove(Names.navigationText2);
- }
- }
-
- /**
- * Gets a text for navigation text field 2
- *
- * @return String -a String value representing a text for navigation text
- * field 2
- */
- public String getNavigationText2() {
- return (String) parameters.get(Names.navigationText2);
- }
-
- /**
- * Sets a text field for estimated time of arrival
- *
- * @param eta
- * a String value representing a text field for estimated time of
- * arrival
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setEta(String eta) {
- if (eta != null) {
- parameters.put(Names.eta, eta);
- } else {
- parameters.remove(Names.eta);
- }
- }
-
- /**
- * Gets a text field for estimated time of arrival
- *
- * @return String -a String value representing a text field for estimated
- * time of arrival
- */
- public String getEta() {
- return (String) parameters.get(Names.eta);
- }
-
- /**
- * Sets a text field for total distance
- *
- * @param totalDistance
- * a String value representing a text field for total distance
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setTotalDistance(String totalDistance) {
- if (totalDistance != null) {
- parameters.put(Names.totalDistance, totalDistance);
- } else {
- parameters.remove(Names.totalDistance);
- }
- }
-
- /**
- * Gets a text field for total distance
- *
- * @return String -a String value representing a text field for total
- * distance
- */
- public String getTotalDistance() {
- return (String) parameters.get(Names.totalDistance);
- }
-
- /**
- * Sets an Image for turnicon
- *
- * @param turnIcon
- * an Image value
- */
- public void setTurnIcon(Image turnIcon) {
- if (turnIcon != null) {
- parameters.put(Names.turnIcon, turnIcon);
- } else {
- parameters.remove(Names.turnIcon);
- }
- }
-
- /**
- * Gets an Image for turnicon
- *
- * @return Image -an Image value representing an Image for turnicon
- */
- public Image getTurnIcon() {
- Object obj = parameters.get(Names.turnIcon);
- if (obj instanceof Image) {
- return (Image) obj;
- } else {
- return new Image((Hashtable) obj);
- }
- }
-
- /**
- * Sets a Fraction of distance till next maneuver
- *
- * @param distanceToManeuver
- * a Double value representing a Fraction of distance till next
- * maneuver
- * <p>
- * <b>Notes: </b>Minvalue=0; Maxvalue=1000000000
- */
- public void setDistanceToManeuver(Double distanceToManeuver) {
- if (distanceToManeuver != null) {
- parameters.put(Names.distanceToManeuver, distanceToManeuver);
- } else {
- parameters.remove(Names.distanceToManeuver);
- }
- }
-
- /**
- * Gets a Fraction of distance till next maneuver
- *
- * @return Double -a Double value representing a Fraction of distance till
- * next maneuver
- */
- public Double getDistanceToManeuver() {
- return (Double) parameters.get(Names.distanceToManeuver);
- }
-
- /**
- * Sets a Distance till next maneuver (starting from) from previous maneuver
- *
- * @param distanceToManeuverScale
- * a Double value representing a Distance till next maneuver
- * (starting from) from previous maneuver
- * <p>
- * <b>Notes: </b>Minvalue=0; Maxvalue=1000000000
- */
- public void setDistanceToManeuverScale(Double distanceToManeuverScale) {
- if (distanceToManeuverScale != null) {
- parameters.put(Names.distanceToManeuverScale, distanceToManeuverScale);
- } else {
- parameters.remove(Names.distanceToManeuverScale);
- }
- }
-
- /**
- * Gets a Distance till next maneuver (starting from) from previous maneuver
- *
- * @return Double -a Double value representing a Distance till next maneuver
- * (starting from) from previous maneuver
- */
- public Double getDistanceToManeuverScale() {
- return (Double) parameters.get(Names.distanceToManeuverScale);
- }
-
- /**
- * Sets a maneuver complete flag. If and when a maneuver has completed while
- * an AlertManeuver is active, the app must send this value set to TRUE in
- * order to clear the AlertManeuver overlay<br/>
- * If omitted the value will be assumed as FALSE
- * <p>
- *
- * @param maneuverComplete
- * a Boolean value
- */
- public void setManeuverComplete(Boolean maneuverComplete) {
- if (maneuverComplete != null) {
- parameters.put(Names.maneuverComplete, maneuverComplete);
- } else {
- parameters.remove(Names.maneuverComplete);
- }
- }
-
- /**
- * Gets a maneuver complete flag
- *
- * @return Boolean -a Boolean value
- */
- public Boolean getManeuverComplete() {
- return (Boolean) parameters.get(Names.maneuverComplete);
- }
-
- /**
- * Sets Three dynamic SoftButtons available (first SoftButton is fixed to
- * "Turns"). If omitted on supported displays, the currently displayed
- * SoftButton values will not change
- * <p>
- * <b>Notes: </b>Minsize=0; Maxsize=3
- *
- * @param softButtons a Vector<SoftButton> value
- */
- public void setSoftButtons(Vector<SoftButton> softButtons) {
- if (softButtons != null) {
- parameters.put(Names.softButtons, softButtons);
- } else {
- parameters.remove(Names.softButtons);
- }
- }
-
- /**
- * Gets Three dynamic SoftButtons available (first SoftButton is fixed to
- * "Turns"). If omitted on supported displays, the currently displayed
- * SoftButton values will not change
- * @return Vector<SoftButton> -a Vector<SoftButton> value
- */
- public Vector<SoftButton> getSoftButtons() {
- if (parameters.get(Names.softButtons) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtons);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButton) {
- return (Vector<SoftButton>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButton> newList = new Vector<SoftButton>();
- for (Object hashObj : list) {
- newList.add(new SoftButton((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBTResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBTResponse.java
deleted file mode 100755
index a9ddae411..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBTResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Show Constant TBT Response is sent, when ShowConstantTBT has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class ShowConstantTBTResponse extends RPCResponse {
-
- /**
- * Constructs a new ShowConstantTBTResponse object
- */
- public ShowConstantTBTResponse() {
- super("ShowConstantTBT");
- }
-
- /**
- * Constructs a new ShowConstantTBTResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ShowConstantTBTResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowResponse.java
deleted file mode 100755
index e6f8feb65..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Show Response is sent, when Show has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class ShowResponse extends RPCResponse {
-
- /**
- * Constructs a new ShowResponse object
- */
- public ShowResponse() {
- super("Show");
- }
-
- /**
- * Constructs a new ShowResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public ShowResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
deleted file mode 100755
index 8234d64fc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Tire pressure status of a single tire.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>status</td>
- * <td>ComponentVolumeStatus</td>
- * <td>Describes the volume status of a single tire
- * See ComponentVolumeStatus
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class SingleTireStatus extends RPCStruct {
-
- /**
- * Constructs a newly allocated SingleTireStatus object
- */
- public SingleTireStatus() { }
-
- /**
- * Constructs a newly allocated SingleTireStatus object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public SingleTireStatus(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set the volume status of a single tire
- * @param status the volume status of a single tire
- */
- public void setStatus(ComponentVolumeStatus status) {
- if (status != null) {
- store.put(Names.status, status);
- } else {
- store.remove(Names.status);
- }
- }
-
- /**
- * get the volume status of a single tire
- * @return the volume status of a single tire
- */
- public ComponentVolumeStatus getStatus() {
- Object obj = store.get(Names.status);
- if (obj instanceof ComponentVolumeStatus) {
- return (ComponentVolumeStatus) obj;
- } else if (obj instanceof String) {
- ComponentVolumeStatus theCode = null;
- try {
- theCode = ComponentVolumeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.status, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Slider.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Slider.java
deleted file mode 100755
index f1cd804f5..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Slider.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Creates a full screen or pop-up overlay (depending on platform) with a single
- * user controlled slider
- * <p>
- * Function Group: Base
- * <p>
- * <b>HMILevel needs to be FULL</b>
- * <p>
- *
- * @since SmartDeviceLink 2.0
- *
- */
-public class Slider extends RPCRequest {
-
- /**
- * Constructs a new Slider object
- */
- public Slider() {
- super("Slider");
- }
-
- /**
- * Constructs a new Slider object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public Slider(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a number of selectable items on a horizontal axis
- *
- * @param numTicks
- * an Integer value representing a number of selectable items on
- * a horizontal axis
- * <p>
- * <b>Notes: </b>Minvalue=2; Maxvalue=26
- */
- public void setNumTicks(Integer numTicks) {
- if (numTicks != null) {
- parameters.put(Names.numTicks, numTicks);
- } else {
- parameters.remove(Names.numTicks);
- }
- }
-
- /**
- * Gets a number of selectable items on a horizontal axis
- *
- * @return Integer -an Integer value representing a number of selectable
- * items on a horizontal axis
- */
- public Integer getNumTicks() {
- return (Integer) parameters.get(Names.numTicks);
- }
-
- /**
- * Sets an Initial position of slider control
- *
- * @param position
- * an Integer value representing an Initial position of slider
- * control
- * <p>
- * <b>Notes: </b>Minvalue=1; Maxvalue=26
- */
- public void setPosition(Integer position) {
- if (position != null) {
- parameters.put(Names.position, position);
- } else {
- parameters.remove(Names.position);
- }
- }
-
- /**
- * Gets an Initial position of slider control
- *
- * @return Integer -an Integer value representing an Initial position of
- * slider control
- */
- public Integer getPosition() {
- return (Integer) parameters.get(Names.position);
- }
-
- /**
- * Sets a text header to display
- *
- * @param sliderHeader
- * a String value
- * <p>
- * <b>Notes: </b>Maxlength=500
- */
- public void setSliderHeader(String sliderHeader) {
- if (sliderHeader != null) {
- parameters.put(Names.sliderHeader, sliderHeader);
- } else {
- parameters.remove(Names.sliderHeader);
- }
- }
-
- /**
- * Gets a text header to display
- *
- * @return String -a String value representing a text header to display
- */
- public String getSliderHeader() {
- return (String) parameters.get(Names.sliderHeader);
- }
-
- /**
- * Sets a text footer to display
- *
- * @param sliderFooter
- * a Vector<String> value representing a text footer to display
- * <p>
- * <b>Notes: </b>Maxlength=500; Minvalue=1; Maxvalue=26
- */
- public void setSliderFooter(Vector<String> sliderFooter) {
- if (sliderFooter != null) {
- parameters.put(Names.sliderFooter, sliderFooter);
- } else {
- parameters.remove(Names.sliderFooter);
- }
- }
-
- /**
- * Gets a text footer to display
- *
- * @return String -a String value representing a text footer to display
- */
- public Vector<String> getSliderFooter() {
- if (parameters.get(Names.sliderFooter) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.sliderFooter);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>) list;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets an App defined timeout
- *
- * @param timeout
- * an Integer value representing an App defined timeout
- * <p>
- * <b>Notes: </b>Minvalue=0; Maxvalue=65535; Defvalue=10000
- */
- public void setTimeout(Integer timeout) {
- if (timeout != null) {
- parameters.put(Names.timeout, timeout);
- } else {
- parameters.remove(Names.timeout);
- }
- }
-
- /**
- * Gets an App defined timeout
- * @return Integer -an Integer value representing an App defined timeout
- */
- public Integer getTimeout() {
- return (Integer) parameters.get(Names.timeout);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SliderResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SliderResponse.java
deleted file mode 100755
index 3d44ff447..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SliderResponse.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Slider Response is sent, when Slider has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class SliderResponse extends RPCResponse {
-
- /**
- * Constructs a new SliderResponse object
- */
- public SliderResponse() {
- super("Slider");
- }
-
- /**
- * Constructs a new SliderResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SliderResponse(Hashtable hash) {
- super(hash);
- }
- /**
- * Sets an Initial position of slider control
- * @param sliderPosition
- */
- public void setSliderPosition(Integer sliderPosition) {
- if (sliderPosition != null) {
- parameters.put(Names.sliderPosition, sliderPosition);
- } else {
- parameters.remove(Names.sliderPosition);
- }
- }
- /**
- * Gets an Initial position of slider control
- * @return Integer
- */
- public Integer getSliderPosition() {
- return (Integer) parameters.get(Names.sliderPosition);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButton.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButton.java
deleted file mode 100755
index d0f46de06..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButton.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.SoftButtonType;
-import com.smartdevicelink.proxy.rpc.enums.SystemAction;
-import com.smartdevicelink.util.DebugTool;
-
-public class SoftButton extends RPCStruct {
-
- public SoftButton() { }
- public SoftButton(Hashtable hash) {
- super(hash);
- }
- public void setType(SoftButtonType type) {
- if (type != null) {
- store.put(Names.type, type);
- } else {
- store.remove(Names.type);
- }
- }
- public SoftButtonType getType() {
- Object obj = store.get(Names.type);
- if (obj instanceof SoftButtonType) {
- return (SoftButtonType) obj;
- } else if (obj instanceof String) {
- SoftButtonType theCode = null;
- try {
- theCode = SoftButtonType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.type, e);
- }
- return theCode;
- }
- return null;
- }
- public void setText(String text) {
- if (text != null) {
- store.put(Names.text, text);
- } else {
- store.remove(Names.text);
- }
- }
- public String getText() {
- return (String) store.get(Names.text);
- }
- public void setImage(Image image) {
- if (image != null) {
- store.put(Names.image, image);
- } else {
- store.remove(Names.image);
- }
- }
- public Image getImage() {
- Object obj = store.get(Names.image);
- if (obj instanceof Image) {
- return (Image) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new Image((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.image, e);
- }
- }
- return null;
- }
- public void setIsHighlighted(Boolean isHighlighted) {
- if (isHighlighted != null) {
- store.put(Names.isHighlighted, isHighlighted);
- } else {
- store.remove(Names.isHighlighted);
- }
- }
- public Boolean getIsHighlighted() {
- return (Boolean) store.get(Names.isHighlighted);
- }
- public void setSoftButtonID(Integer softButtonID) {
- if (softButtonID != null) {
- store.put(Names.softButtonID, softButtonID);
- } else {
- store.remove(Names.softButtonID);
- }
- }
- public Integer getSoftButtonID() {
- return (Integer) store.get(Names.softButtonID);
- }
- public void setSystemAction(SystemAction systemAction) {
- if (systemAction != null) {
- store.put(Names.systemAction, systemAction);
- } else {
- store.remove(Names.systemAction);
- }
- }
- public SystemAction getSystemAction() {
- Object obj = store.get(Names.systemAction);
- if (obj instanceof SystemAction) {
- return (SystemAction) obj;
- } else if (obj instanceof String) {
- SystemAction theCode = null;
- try {
- theCode = SystemAction.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.systemAction, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java
deleted file mode 100755
index 59b8291c1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Contains information about a SoftButton's capabilities.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>shortPressAvailable</td>
- * <td>Boolean</td>
- * <td>The button supports a short press.
- * Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>longPressAvailable</td>
- * <td>Boolean</td>
- * <td>The button supports a LONG press.
- * Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>upDownAvailable</td>
- * <td>Boolean</td>
- * <td>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.
- * Whenever the button is released, onButtonEvent( UP) will be invoked. *
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>imageSupported</td>
- * <td>Boolean</td>
- * <td>The button supports referencing a static or dynamic image.
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class SoftButtonCapabilities extends RPCStruct {
-
- /**
- * Constructs a newly allocated SoftButtonCapabilities object
- */
- public SoftButtonCapabilities() { }
-
- /**
- * Constructs a newly allocated SoftButtonCapabilities object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public SoftButtonCapabilities(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set the button supports a short press.
- * @param shortPressAvailable whether the button supports a short press.
- */
- public void setShortPressAvailable(Boolean shortPressAvailable) {
- if (shortPressAvailable != null) {
- store.put(Names.shortPressAvailable, shortPressAvailable);
- } else {
- store.remove(Names.shortPressAvailable);
- }
- }
-
- /**
- * get whether the button supports a short press.
- * @return whether the button supports a short press
- */
- public Boolean getShortPressAvailable() {
- return (Boolean) store.get( Names.shortPressAvailable);
- }
-
- /**
- * set the button supports a LONG press.
- * @param longPressAvailable whether the button supports a long press
- */
- public void setLongPressAvailable(Boolean longPressAvailable) {
- if (longPressAvailable != null) {
- store.put(Names.longPressAvailable, longPressAvailable);
- } else {
- store.remove(Names.longPressAvailable);
- }
- }
-
- /**
- * get whether the button supports a LONG press.
- * @return whether the button supports a LONG press
- */
- public Boolean getLongPressAvailable() {
- return (Boolean) store.get( Names.longPressAvailable);
- }
-
- /**
- * set the button supports "button down" and "button up".
- * @param upDownAvailable the button supports "button down" and "button up".
- */
- public void setUpDownAvailable(Boolean upDownAvailable) {
- if (upDownAvailable != null) {
- store.put(Names.upDownAvailable, upDownAvailable);
- } else {
- store.remove(Names.upDownAvailable);
- }
- }
-
- /**
- * get the button supports "button down" and "button up".
- * @return the button supports "button down" and "button up".
- */
- public Boolean getUpDownAvailable() {
- return (Boolean) store.get( Names.upDownAvailable);
- }
-
- /**
- * set the button supports referencing a static or dynamic image.
- * @param imageSupported whether the button supports referencing a static or dynamic image.
- */
- public void setImageSupported(Boolean imageSupported) {
- if (imageSupported != null) {
- store.put(Names.imageSupported, imageSupported);
- } else {
- store.remove(Names.imageSupported);
- }
- }
-
- /**
- * get the button supports referencing a static or dynamic image.
- * @return the button supports referencing a static or dynamic image.
- */
- public Boolean getImageSupported() {
- return (Boolean) store.get( Names.imageSupported);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Speak.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Speak.java
deleted file mode 100755
index 3a099ee68..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Speak.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Speaks a phrase over the vehicle audio system using SMARTDEVICELINK's TTS
- * (text-to-speech) engine. The provided text to be spoken can be simply a text
- * phrase, or it can consist of phoneme specifications to direct SMARTDEVICELINK's TTS
- * engine to speak a "speech-sculpted" phrase
- * <p>
- * Receipt of the Response indicates the completion of the Speak operation,
- * regardless of how the Speak operation may have completed (i.e. successfully,
- * interrupted, terminated, etc.)
- * <p>
- * Requesting a new Speak operation while the application has another Speak
- * operation already in progress (i.e. no corresponding Response for that
- * in-progress Speak operation has been received yet) will terminate the
- * in-progress Speak operation (causing its corresponding Response to be sent by
- * SMARTDEVICELINK) and begin the requested Speak operation
- * <p>
- * Requesting a new Speak operation while the application has an <i>
- * {@linkplain Alert}</i> operation already in progress (i.e. no corresponding
- * Response for that in-progress <i>{@linkplain Alert}</i> operation has been
- * received yet) will result in the Speak operation request being rejected
- * (indicated in the Response to the Request)
- * <p>
- * Requesting a new <i>{@linkplain Alert}</i> operation while the application
- * has a Speak operation already in progress (i.e. no corresponding Response for
- * that in-progress Speak operation has been received yet) will terminate the
- * in-progress Speak operation (causing its corresponding Response to be sent by
- * SMARTDEVICELINK) and begin the requested <i>{@linkplain Alert}</i> operation
- * <p>
- * Requesting a new Speak operation while the application has a <i>
- * {@linkplain PerformInteraction}</i> operation already in progress (i.e. no
- * corresponding Response for that in-progress <i>
- * {@linkplain PerformInteraction}</i> operation has been received yet) will
- * result in the Speak operation request being rejected (indicated in the
- * Response to the Request)
- * <p>
- * Requesting a <i> {@linkplain PerformInteraction}</i> operation while the
- * application has a Speak operation already in progress (i.e. no corresponding
- * Response for that in-progress Speak operation has been received yet) will
- * terminate the in-progress Speak operation (causing its corresponding Response
- * to be sent by SMARTDEVICELINK) and begin the requested <i>
- * {@linkplain PerformInteraction}</i> operation
- * <p>
- *
- * <b>HMI Status Requirements:</b><br/>
- * HMILevel: FULL, Limited<br/>
- * AudioStreamingState: Any<br/>
- * SystemContext: MAIN, MENU, VR
- * </p>
- * <b>Notes: </b>
- * <ul>
- * <li>When <i>{@linkplain Alert}</i> is issued with MENU in effect, <i>
- * {@linkplain Alert}</i> is queued and "played" when MENU interaction is
- * completed (i.e. SystemContext reverts to MAIN). When <i>{@linkplain Alert}
- * </i> is issued with VR in effect, <i>{@linkplain Alert}</i> is queued and
- * "played" when VR interaction is completed (i.e. SystemContext reverts to
- * MAIN)</li>
- * <li>When both <i>{@linkplain Alert}</i> and Speak are queued during MENU or
- * VR, they are "played" back in the order in which they were queued, with all
- * existing rules for "collisions" still in effect</li>
- * </ul>
- * <p>
- *
- * @since SmartDeviceLink 1.0
- * @see Alert
- */
-public class Speak extends RPCRequest {
-
- /**
- * Constructs a new Speak object
- */
- public Speak() {
- super("Speak");
- }
- /**
- * Constructs a new Speak object indicated by the Hashtable parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public Speak(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets a Vector<TTSChunk> representing an array of 1-100 TTSChunk structs
- * which, taken together, specify the phrase to be spoken
- *
- * @return Vector<TTSChunk> -an Array of 1-100 TTSChunk specify the phrase to be spoken
- */
- public Vector<TTSChunk> getTtsChunks() {
- if (parameters.get(Names.ttsChunks) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.ttsChunks);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof TTSChunk) {
- return (Vector<TTSChunk>) list;
- } else if (obj instanceof Hashtable) {
- Vector<TTSChunk> newList = new Vector<TTSChunk>();
- for (Object hashObj : list) {
- newList.add(new TTSChunk((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
- /**
- * Sets a Vector<TTSChunk> representing an array of 1-100 TTSChunk structs
- * which, taken together, specify the phrase to be spoken
- *
- * @param ttsChunks
- * a Vector<TTSChunk> value representing an array of 1-100 TTSChunk structs
- * which specify the phrase to be spoken
- * <p>
- * <ul>
- * <li>The array must have 1-100 elements</li>
- * <li>The total length of the phrase composed from the ttsChunks
- * provided must be less than 500 characters or the request will
- * be rejected</li>
- * <li>Each chunk can be no more than 500 characters</li>
- * </ul>
- */
- public void setTtsChunks( Vector<TTSChunk> ttsChunks ) {
- if (ttsChunks != null) {
- parameters.put(Names.ttsChunks, ttsChunks );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java
deleted file mode 100755
index 681feec24..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Speak Response is sent, when Speak has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class SpeakResponse extends RPCResponse {
-
- /**
- * Constructs a new SpeakResponse object
- */
- public SpeakResponse() {
- super("Speak");
- }
-
- /**
- * Constructs a new SpeakResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SpeakResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/StartTime.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/StartTime.java
deleted file mode 100755
index 404dc30ac..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/StartTime.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Describes the hour, minute and second values used to set the media clock.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>hours</td>
- * <td>Int16</td>
- * <td>The hour. Minvalue="0", maxvalue="59"
- * <p><b>Note:</b>Some display types only support a max value of 19. If out of range, it will be rejected.
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>minutes</td>
- * <td>Int16</td>
- * <td>The minute. Minvalue="0", maxvalue="59".</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>seconds</td>
- * <td>Int16</td>
- * <td>The second. Minvalue="0", maxvalue="59".</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class StartTime extends RPCStruct {
-
- /**
- * Constructs a newly allocated StartTime object
- */
- public StartTime() { }
- /**
- * Constructs a newly allocated StartTime object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public StartTime(Hashtable hash) {
- super(hash);
- }
- /**
- * Get the hour. Minvalue="0", maxvalue="59"
- * <p><b>Note:</b>Some display types only support a max value of 19. If out of range, it will be rejected.
- * @return hours Minvalue="0", maxvalue="59"
- */
- public Integer getHours() {
- return (Integer) store.get( Names.hours );
- }
- /**
- * Set the hour. Minvalue="0", maxvalue="59"
- * <p><b>Note:</b>Some display types only support a max value of 19. If out of range, it will be rejected.
- * @param hours min: 0; max: 59
- */
- public void setHours( Integer hours ) {
- if (hours != null) {
- store.put(Names.hours, hours );
- }
- }
- /**
- * Get the minute. Minvalue="0", maxvalue="59".
- * @return minutes Minvalue="0", maxvalue="59"
- */
- public Integer getMinutes() {
- return (Integer) store.get( Names.minutes );
- }
- /**
- * Set the minute. Minvalue="0", maxvalue="59".
- * @param minutes min: 0; max: 59
- */
- public void setMinutes( Integer minutes ) {
- if (minutes != null) {
- store.put(Names.minutes, minutes );
- }
- }
- /**
- * Get the second. Minvalue="0", maxvalue="59".
- * @return seconds. Minvalue="0", maxvalue="59".
- */
- public Integer getSeconds() {
- return (Integer) store.get( Names.seconds );
- }
- /**
- * Set the second. Minvalue="0", maxvalue="59".
- * @param seconds min: 0 max: 59
- */
- public void setSeconds( Integer seconds ) {
- if (seconds != null) {
- store.put(Names.seconds, seconds );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java
deleted file mode 100755
index 426cf12b1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
-/**
- * Establishes a subscription to button notifications for HMI buttons. Buttons
- * are not necessarily physical buttons, but can also be "soft" buttons on a
- * touch screen, depending on the display in the vehicle. Once subscribed to a
- * particular button, an application will receive both
- * {@linkplain OnButtonEvent} and {@linkplain OnButtonPress} notifications
- * whenever that button is pressed. The application may also unsubscribe from
- * notifications for a button by invoking the {@linkplain UnsubscribeButton}
- * operation
- * <p>
- * When a button is depressed, an {@linkplain OnButtonEvent} notification is
- * sent to the application with a ButtonEventMode of BUTTONDOWN. When that same
- * button is released, an {@linkplain OnButtonEvent} notification is sent to the
- * application with a ButtonEventMode of BUTTONUP
- * <p>
- * When the duration of a button depression (that is, time between depression
- * and release) is less than two seconds, an {@linkplain OnButtonPress}
- * notification is sent to the application (at the moment the button is
- * released) with a ButtonPressMode of SHORT. When the duration is two or more
- * seconds, an {@linkplain OnButtonPress} notification is sent to the
- * application (at the moment the two seconds have elapsed) with a
- * ButtonPressMode of LONG
- * <p>
- * The purpose of {@linkplain OnButtonPress} notifications is to allow for
- * programmatic detection of long button presses similar to those used to store
- * presets while listening to the radio, for example
- * <p>
- * When a button is depressed and released, the sequence in which notifications
- * will be sent to the application is as follows:
- * <p>
- * For short presses:<br/>
- * <ul>
- * <li>OnButtonEvent (ButtonEventMode = BUTTONDOWN)</li>
- * <li>OnButtonEvent (ButtonEventMode = BUTTONUP)</li>
- * <li>OnButtonPress (ButtonPressMode = SHORT)</li>
- * </ul>
- * <p>
- * For long presses:<br/>
- * <ul>
- * <li>OnButtonEvent (ButtonEventMode = BUTTONDOWN)</li>
- * <li>OnButtonEvent (ButtonEventMode = BUTTONUP)</li>
- * <li>OnButtonPress (ButtonPressMode = LONG)</li>
- * </ul>
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 1.0
- * @see UnsubscribeButton
- */
-public class SubscribeButton extends RPCRequest {
-
- /**
- * Constructs a new SubscribeButton object
- */
- public SubscribeButton() {
- super("SubscribeButton");
- }
- /**
- * Constructs a new SubscribeButton object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SubscribeButton(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets the name of the button to subscribe to
- * @return ButtonName -an enum value, see <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i>
- */
- public ButtonName getButtonName() {
- Object obj = parameters.get(Names.buttonName);
- if (obj instanceof ButtonName) {
- return (ButtonName) obj;
- } else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.buttonName, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Sets a name of the button to subscribe to
- * @param buttonName a <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i> value
- */
- public void setButtonName( ButtonName buttonName ) {
- if (buttonName != null) {
- parameters.put(Names.buttonName, buttonName );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
deleted file mode 100755
index 48acf55aa..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Sub scribeButton Response is sent, when SubscribeButton has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class SubscribeButtonResponse extends RPCResponse {
-
- /**
- * Constructs a new SubscribeButtonResponse object
- */
- public SubscribeButtonResponse() {
- super("SubscribeButton");
- }
-
- /**
- * Constructs a new SubscribeButtonResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SubscribeButtonResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
deleted file mode 100755
index 09f829e55..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
+++ /dev/null
@@ -1,919 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Subscribes for specific published vehicle data items. The data will be only
- * sent, if it has changed. The application will be notified by the
- * onVehicleData notification whenever new data is available. The update rate is
- * very much dependent on sensors, vehicle architecture and vehicle type. Be
- * also prepared for the situation that a signal is not available on a vehicle
- * <p>
- * Function Group: Location, VehicleInfo and DrivingChara
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 2.0
- * @see UnsubscribeVehicleData
- * @see GetVehicleData
- */
-public class SubscribeVehicleData extends RPCRequest {
-
- /**
- * Constructs a new SubscribeVehicleData object
- */
- public SubscribeVehicleData() {
- super("SubscribeVehicleData");
- }
-
- /**
- * Constructs a new SubscribeVehicleData object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SubscribeVehicleData(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Gps data
- *
- * @param gps
- * a boolean value
- */
- public void setGps(Boolean gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Gps data has been subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Gps data has been
- * subscribed.
- */
- public Boolean getGps() {
- return (Boolean) parameters.get(Names.gps);
- }
-
- /**
- * Sets a boolean value. If true, subscribes speed data
- *
- * @param speed
- * a boolean value
- */
- public void setSpeed(Boolean speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Speed data has been subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Speed data has been
- * subscribed.
- */
- public Boolean getSpeed() {
- return (Boolean) parameters.get(Names.speed);
- }
-
- /**
- * Sets a boolean value. If true, subscribes rpm data
- *
- * @param rpm
- * a boolean value
- */
- public void setRpm(Boolean rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the rpm data has been subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the rpm data has been
- * subscribed.
- */
- public Boolean getRpm() {
- return (Boolean) parameters.get(Names.rpm);
- }
-
- /**
- * Sets a boolean value. If true, subscribes FuelLevel data
- *
- * @param fuelLevel
- * a boolean value
- */
- public void setFuelLevel(Boolean fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the FuelLevel data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the FuelLevel data has
- * been subscribed.
- */
- public Boolean getFuelLevel() {
- return (Boolean) parameters.get(Names.fuelLevel);
- }
-
- /**
- * Sets a boolean value. If true, subscribes fuelLevel_State data
- *
- * @param fuelLevel_State
- * a boolean value
- */
- public void setFuelLevel_State(Boolean fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the fuelLevel_State data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the fuelLevel_State data
- * has been subscribed.
- */
- public Boolean getFuelLevel_State() {
- return (Boolean) parameters.get(Names.fuelLevel_State);
- }
-
- /**
- * Sets a boolean value. If true, subscribes instantFuelConsumption data
- *
- * @param instantFuelConsumption
- * a boolean value
- */
- public void setInstantFuelConsumption(Boolean instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the getInstantFuelConsumption data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the getInstantFuelConsumption data
- * has been subscribed.
- */
- public Boolean getInstantFuelConsumption() {
- return (Boolean) parameters.get(Names.instantFuelConsumption);
- }
-
- /**
- * Sets a boolean value. If true, subscribes externalTemperature data
- *
- * @param externalTemperature
- * a boolean value
- */
- public void setExternalTemperature(Boolean externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the externalTemperature data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the externalTemperature data
- * has been subscribed.
- */
- public Boolean getExternalTemperature() {
- return (Boolean) parameters.get(Names.externalTemperature);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Currently selected gear data
- *
- * @param prndl
- * a boolean value
- */
- public void setPrndl(Boolean prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Currently selected gear data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Currently selected gear data
- * has been subscribed.
- */
- public Boolean getPrndl() {
- return (Boolean) parameters.get(Names.prndl);
- }
-
- /**
- * Sets a boolean value. If true, subscribes tire pressure status data
- *
- * @param tirePressure
- * a boolean value
- */
- public void setTirePressure(Boolean tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the tire pressure status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the tire pressure status data
- * has been subscribed.
- */
- public Boolean getTirePressure() {
- return (Boolean) parameters.get(Names.tirePressure);
- }
-
- /**
- * Sets a boolean value. If true, subscribes odometer data
- *
- * @param odometer
- * a boolean value
- */
- public void setOdometer(Boolean odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the odometer data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the odometer data
- * has been subscribed.
- */
- public Boolean getOdometer() {
- return (Boolean) parameters.get(Names.odometer);
- }
-
- /**
- * Sets a boolean value. If true, subscribes belt Status data
- *
- * @param beltStatus
- * a boolean value
- */
- public void setBeltStatus(Boolean beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the belt Status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the belt Status data
- * has been subscribed.
- */
- public Boolean getBeltStatus() {
- return (Boolean) parameters.get(Names.beltStatus);
- }
-
- /**
- * Sets a boolean value. If true, subscribes body Information data
- *
- * @param bodyInformation
- * a boolean value
- */
- public void setBodyInformation(Boolean bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the body Information data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the body Information data
- * has been subscribed.
- */
- public Boolean getBodyInformation() {
- return (Boolean) parameters.get(Names.bodyInformation);
- }
-
- /**
- * Sets a boolean value. If true, subscribes device Status data
- *
- * @param deviceStatus
- * a boolean value
- */
- public void setDeviceStatus(Boolean deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the device Status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the device Status data
- * has been subscribed.
- */
- public Boolean getDeviceStatus() {
- return (Boolean) parameters.get(Names.deviceStatus);
- }
-
- /**
- * Sets a boolean value. If true, subscribes driver Braking data
- *
- * @param driverBraking
- * a boolean value
- */
- public void setDriverBraking(Boolean driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the driver Braking data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the driver Braking data
- * has been subscribed.
- */
- public Boolean getDriverBraking() {
- return (Boolean) parameters.get(Names.driverBraking);
- }
-
- /**
- * Sets a boolean value. If true, subscribes wiper Status data
- *
- * @param wiperStatus
- * a boolean value
- */
- public void setWiperStatus(Boolean wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the wiper Status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the wiper Status data
- * has been subscribed.
- */
- public Boolean getWiperStatus() {
- return (Boolean) parameters.get(Names.wiperStatus);
- }
-
- /**
- * Sets a boolean value. If true, subscribes fuel Economy data
- *
- * @param fuelEconomy
- * a boolean value
- */
- public void setFuelEconomy(Boolean fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the fuel Economy data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the fuel Economy data
- * has been subscribed.
- */
- public Boolean getFuelEconomy() {
- return (Boolean) parameters.get(Names.fuelEconomy);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Engine Oil Life data
- *
- * @param engineOilLife
- * a boolean value
- */
- public void setEngineOilLife(Boolean engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Engine Oil Life data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Engine Oil Life data
- * has been subscribed.
- */
- public Boolean getEngineOilLife() {
- return (Boolean) parameters.get(Names.engineOilLife);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Head Lamp Status data
- *
- * @param headLampStatus
- * a boolean value
- */
- public void setHeadLampStatus(Boolean headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Head Lamp Status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Head Lamp Status data
- * has been subscribed.
- */
- public Boolean getHeadLampStatus() {
- return (Boolean) parameters.get(Names.headLampStatus);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Battery Voltage data
- *
- * @param batteryVoltage
- * a boolean value
- */
- public void setBatteryVoltage(Boolean batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Battery Voltage data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Battery Voltage data
- * has been subscribed.
- */
- public Boolean getBatteryVoltage() {
- return (Boolean) parameters.get(Names.batteryVoltage);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Brake Torque data
- *
- * @param brakeTorque
- * a boolean value
- */
- public void setBrakeTorque(Boolean brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Brake Torque data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Brake Torque data
- * has been subscribed.
- */
- public Boolean getBrakeTorque() {
- return (Boolean) parameters.get(Names.brakeTorque);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Engine Torque data
- *
- * @param engineTorque
- * a boolean value
- */
- public void setEngineTorque(Boolean engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Engine Torque data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Engine Torque data
- * has been subscribed.
- */
- public Boolean getEngineTorque() {
- return (Boolean) parameters.get(Names.engineTorque);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Turbo Boost data
- *
- * @param turboBoost
- * a boolean value
- */
- public void setTurboBoost(Boolean turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Turbo Boost data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Turbo Boost data
- * has been subscribed.
- */
- public Boolean getTurboBoost() {
- return (Boolean) parameters.get(Names.turboBoost);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Coolant Temp data
- *
- * @param coolantTemp
- * a boolean value
- */
- public void setCoolantTemp(Boolean coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Coolant Temp data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Coolant Temp data
- * has been subscribed.
- */
- public Boolean getCoolantTemp() {
- return (Boolean) parameters.get(Names.coolantTemp);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Air Fuel Ratio data
- *
- * @param airFuelRatio
- * a boolean value
- */
- public void setAirFuelRatio(Boolean airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Air Fuel Ratio data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Air Fuel Ratio data
- * has been subscribed.
- */
- public Boolean getAirFuelRatio() {
- return (Boolean) parameters.get(Names.airFuelRatio);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Cooling Head Temp data
- *
- * @param coolingHeadTemp
- * a boolean value
- */
- public void setCoolingHeadTemp(Boolean coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Cooling Head Temp data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Cooling Head Temp data
- * has been subscribed.
- */
- public Boolean getCoolingHeadTemp() {
- return (Boolean) parameters.get(Names.coolingHeadTemp);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Cooling Oil Temp data
- *
- * @param oilTemp
- * a boolean value
- */
- public void setOilTemp(Boolean oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Oil Temp data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Oil Temp data
- * has been subscribed.
- */
- public Boolean getOilTemp() {
- return (Boolean) parameters.get(Names.oilTemp);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Intake Air Temp data
- *
- * @param intakeAirTemp
- * a boolean value
- */
- public void setIntakeAirTemp(Boolean intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Intake Air Temp data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Intake Air Temp data
- * has been subscribed.
- */
- public Boolean getIntakeAirTemp() {
- return (Boolean) parameters.get(Names.intakeAirTemp);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Gear Shift Advice data
- *
- * @param gearShiftAdvice
- * a boolean value
- */
- public void setGearShiftAdvice(Boolean gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Gear Shift Advice data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Gear Shift Advice data
- * has been subscribed.
- */
- public Boolean getGearShiftAdvice() {
- return (Boolean) parameters.get(Names.gearShiftAdvice);
- }
-
- /**
- * Sets a boolean value. If true, subscribes acceleration data
- *
- * @param acceleration
- * a boolean value
- */
- public void setAcceleration(Boolean acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the acceleration data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the acceleration data
- * has been subscribed.
- */
- public Boolean getAcceleration() {
- return (Boolean) parameters.get(Names.acceleration);
- }
-
- /**
- * Sets a boolean value. If true, subscribes accPedalPosition data
- *
- * @param accPedalPosition
- * a boolean value
- */
- public void setAccPedalPosition(Boolean accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the accPedalPosition data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the accPedalPosition data
- * has been subscribed.
- */
- public Boolean getAccPedalPosition() {
- return (Boolean) parameters.get(Names.accPedalPosition);
- }
-
- /**
- * Sets a boolean value. If true, subscribes ClutchPedal Position data
- *
- * @param clutchPedalPosition
- * a boolean value
- */
- public void setClutchPedalPosition(Boolean clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the ClutchPedal Position data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the ClutchPedal Position data
- * has been subscribed.
- */
- public Boolean getClutchPedalPosition() {
- return (Boolean) parameters.get(Names.clutchPedalPosition);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Reverse Gear Status data
- *
- * @param reverseGearStatus
- * a boolean value
- */
- public void setReverseGearStatus(Boolean reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Reverse Gear Status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Reverse Gear Status data
- * has been subscribed.
- */
- public Boolean getReverseGearStatus() {
- return (Boolean) parameters.get(Names.reverseGearStatus);
- }
-
- /**
- * Sets a boolean value. If true, subscribes accTorque data
- *
- * @param accTorque
- * a boolean value
- */
- public void setAccTorque(Boolean accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the accTorque data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the accTorque data
- * has been subscribed.
- */
- public Boolean getAccTorque() {
- return (Boolean) parameters.get(Names.accTorque);
- }
-
- /**
- * Sets a boolean value. If true, subscribes evInfo data
- *
- * @param evInfo
- * a boolean value
- */
- public void setEvInfo(Boolean evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the evInfo data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the evInfo data
- * has been subscribed.
- */
- public Boolean getEvInfo() {
- return (Boolean) parameters.get(Names.evInfo);
- }
-
- /**
- * Sets a boolean value. If true, subscribes Ambient Light Status data
- *
- * @param ambientLightStatus
- * a boolean value
- */
- public void setAmbientLightStatus(Boolean ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Ambient Light Status data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Ambient Light Status data
- * has been subscribed.
- */
- public Boolean getAmbientLightStatus() {
- return (Boolean) parameters.get(Names.ambientLightStatus);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
deleted file mode 100755
index 568ef9f3f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
+++ /dev/null
@@ -1,1018 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Subscribe Vehicle Data Response is sent, when SubscribeVehicleData has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class SubscribeVehicleDataResponse extends RPCResponse {
-
- /**
- * Constructs a new SubscribeVehicleDataResponse object
- */
- public SubscribeVehicleDataResponse() {
- super("SubscribeVehicleData");
- }
-
- /**
- * Constructs a new SubscribeVehicleDataResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public SubscribeVehicleDataResponse(Hashtable hash) {
- super(hash);
- }
- /**
- * Sets gps
- * @param gps
- */
- public void setGps(VehicleDataResult gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
- /**
- * Gets gps
- * @return VehicleDataResult
- */
- public VehicleDataResult getGps() {
- Object obj = parameters.get(Names.gps);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gps, e);
- }
- }
- return null;
- }
- /**
- * Sets speed
- * @param speed
- */
- public void setSpeed(VehicleDataResult speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
- /**
- * Gets speed
- * @return VehicleDataResult
- */
- public VehicleDataResult getSpeed() {
- Object obj = parameters.get(Names.speed);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.speed, e);
- }
- }
- return null;
- }
- /**
- * Sets rpm
- * @param rpm
- */
- public void setRpm(VehicleDataResult rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
- /**
- * Gets rpm
- * @return VehicleDataResult
- */
- public VehicleDataResult getRpm() {
- Object obj = parameters.get(Names.rpm);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rpm, e);
- }
- }
- return null;
- }
- /**
- * Sets Fuel Level
- * @param fuelLevel
- */
- public void setFuelLevel(VehicleDataResult fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
- /**
- * Gets Fuel Level
- * @return VehicleDataResult
- */
- public VehicleDataResult getFuelLevel() {
- Object obj = parameters.get(Names.fuelLevel);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelLevel, e);
- }
- }
- return null;
- }
- /**
- * Sets Fuel Level State
- * @param fuelLevel_State
- */
- public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
- /**
- * Gets Fuel Level State
- * @return VehicleDataResult
- */
- public VehicleDataResult getFuelLevel_State() {
- Object obj = parameters.get(Names.fuelLevel_State);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelLevel_State, e);
- }
- }
- return null;
- }
- /**
- * Sets Instant Fuel Comsumption
- * @param instantFuelConsumption
- */
- public void setInstantFuelConsumption(VehicleDataResult instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
- /**
- * Gets Instant Fuel Consumption
- * @return VehicleDataResult
- */
- public VehicleDataResult getInstantFuelConsumption() {
- Object obj = parameters.get(Names.instantFuelConsumption);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.instantFuelConsumption, e);
- }
- }
- return null;
- }
- /**
- * Sets External Temperature
- * @param externalTemperature
- */
- public void setExternalTemperature(VehicleDataResult externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
- /**
- * Gets External Temperature
- * @return VehicleDataResult
- */
- public VehicleDataResult getExternalTemperature() {
- Object obj = parameters.get(Names.externalTemperature);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.externalTemperature, e);
- }
- }
- return null;
- }
- /**
- * Sets currently selected gear data
- * @param prndl
- */
- public void setPrndl(VehicleDataResult prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
- /**
- * Gets currently selected gear data
- * @return VehicleDataResult
- */
- public VehicleDataResult getPrndl() {
- Object obj = parameters.get(Names.prndl);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.prndl, e);
- }
- }
- return null;
- }
- /**
- * Sets Tire Pressure
- * @param tirePressure
- */
- public void setTirePressure(VehicleDataResult tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
- /**
- * Gets Tire Pressure
- * @return VehicleDataResult
- */
- public VehicleDataResult getTirePressure() {
- Object obj = parameters.get(Names.tirePressure);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.tirePressure, e);
- }
- }
- return null;
- }
- /**
- * Sets Odometer
- * @param odometer
- */
- public void setOdometer(VehicleDataResult odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
- /**
- * Gets Odometer
- * @return VehicleDataResult
- */
- public VehicleDataResult getOdometer() {
- Object obj = parameters.get(Names.odometer);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.odometer, e);
- }
- }
- return null;
- }
- /**
- * Sets Belt Status
- * @param beltStatus
- */
- public void setBeltStatus(VehicleDataResult beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
- /**
- * Gets Belt Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getBeltStatus() {
- Object obj = parameters.get(Names.beltStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.beltStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Body Information
- * @param bodyInformation
- */
- public void setBodyInformation(VehicleDataResult bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
- /**
- * Gets Body Information
- * @return VehicleDataResult
- */
- public VehicleDataResult getBodyInformation() {
- Object obj = parameters.get(Names.bodyInformation);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.bodyInformation, e);
- }
- }
- return null;
- }
- /**
- * Sets Device Status
- * @param deviceStatus
- */
- public void setDeviceStatus(VehicleDataResult deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
- /**
- * Gets Device Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getDeviceStatus() {
- Object obj = parameters.get(Names.deviceStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.deviceStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Driver Barking
- * @param driverBraking
- */
- public void setDriverBraking(VehicleDataResult driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
- /**
- * Gets Driver Barking
- * @return VehicleDataResult
- */
- public VehicleDataResult getDriverBraking() {
- Object obj = parameters.get(Names.driverBraking);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.driverBraking, e);
- }
- }
- return null;
- }
- /**
- * Sets wiper Status
- * @param wiperStatus
- */
- public void setWiperStatus(VehicleDataResult wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
- /**
- * Gets Wiper Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getWiperStatus() {
- Object obj = parameters.get(Names.wiperStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.wiperStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Fuel Economy
- * @param fuelEconomy
- */
- public void setFuelEconomy(VehicleDataResult fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
- /**
- * Gets Fuel Economy
- * @return VehicleDataResult
- */
- public VehicleDataResult getFuelEconomy() {
- Object obj = parameters.get(Names.fuelEconomy);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelEconomy, e);
- }
- }
- return null;
- }
- /**
- * Sets Engine Oil Life
- * @param engineOilLife
- */
- public void setEngineOilLife(VehicleDataResult engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
- /**
- * Gets Engine Oil Lift
- * @return VehicleDataResult
- */
- public VehicleDataResult getEngineOilLife() {
- Object obj = parameters.get(Names.engineOilLife);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.engineOilLife, e);
- }
- }
- return null;
- }
- /**
- * Sets Head Lamp Status
- * @param headLampStatus
- */
- public void setHeadLampStatus(VehicleDataResult headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
- /**
- * Gets Head Lamp Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getHeadLampStatus() {
- Object obj = parameters.get(Names.headLampStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.headLampStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Battery Voltage
- * @param batteryVoltage
- */
- public void setBatteryVoltage(VehicleDataResult batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
- /**
- * Gets Battery Voltage
- * @return VehicleDataResult
- */
- public VehicleDataResult getBatteryVoltage() {
- Object obj = parameters.get(Names.batteryVoltage);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.batteryVoltage, e);
- }
- }
- return null;
- }
- /**
- * Sets Brake Torque
- * @param brakeTorque
- */
- public void setBrakeTorque(VehicleDataResult brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
- /**
- * Gets Brake Torque
- * @return VehicleDataResult
- */
- public VehicleDataResult getBrakeTorque() {
- Object obj = parameters.get(Names.brakeTorque);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.brakeTorque, e);
- }
- }
- return null;
- }
- /**
- * Sets Engine Torque
- * @param engineTorque
- */
- public void setEngineTorque(VehicleDataResult engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
- /**
- * Gets Engine Torque
- * @return VehicleDataResult
- */
- public VehicleDataResult getEngineTorque() {
- Object obj = parameters.get(Names.engineTorque);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.engineTorque, e);
- }
- }
- return null;
- }
- /**
- * Sets Turbo Boost
- * @param turboBoost
- */
- public void setTurboBoost(VehicleDataResult turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
- /**
- * Gets Turbo Boost
- * @return VehicleDataResult
- */
- public VehicleDataResult getTurboBoost() {
- Object obj = parameters.get(Names.turboBoost);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.turboBoost, e);
- }
- }
- return null;
- }
- /**
- * Sets Coolant Temp
- * @param coolantTemp
- */
- public void setCoolantTemp(VehicleDataResult coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
- /**
- * Gets Coolant Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getCoolantTemp() {
- Object obj = parameters.get(Names.coolantTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.coolantTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Air Fuel Ratio
- * @param airFuelRatio
- */
- public void setAirFuelRatio(VehicleDataResult airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
- /**
- * Gets Air Fuel Ratio
- * @return VehicleDataResult
- */
- public VehicleDataResult getAirFuelRatio() {
- Object obj = parameters.get(Names.airFuelRatio);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.airFuelRatio, e);
- }
- }
- return null;
- }
- /**
- * Sets Cooling Head Temo
- * @param coolingHeadTemp
- */
- public void setCoolingHeadTemp(VehicleDataResult coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
- /**
- * Gets Cooling Head Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getCoolingHeadTemp() {
- Object obj = parameters.get(Names.coolingHeadTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.coolingHeadTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Oil Temp
- * @param oilTemp
- */
- public void setOilTemp(VehicleDataResult oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
- /**
- * Gets Oil Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getOilTemp() {
- Object obj = parameters.get(Names.oilTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.oilTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Intake Air Temp
- * @param intakeAirTemp
- */
- public void setIntakeAirTemp(VehicleDataResult intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
- /**
- * Gets Intake Air Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getIntakeAirTemp() {
- Object obj = parameters.get(Names.intakeAirTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.intakeAirTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Gear Shift Advice
- * @param gearShiftAdvice
- */
- public void setGearShiftAdvice(VehicleDataResult gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
- /**
- * Gets Gear Shift Advice
- * @return VehicleDataResult
- */
- public VehicleDataResult getGearShiftAdvice() {
- Object obj = parameters.get(Names.gearShiftAdvice);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gearShiftAdvice, e);
- }
- }
- return null;
- }
- /**
- * Sets Acceleration
- * @param acceleration
- */
- public void setAcceleration(VehicleDataResult acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
- /**
- * Gets Acceleration
- * @return VehicleDataResult
- */
- public VehicleDataResult getAcceleration() {
- Object obj = parameters.get(Names.acceleration);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.acceleration, e);
- }
- }
- return null;
- }
- /**
- * Sets AccPedal Position
- * @param accPedalPosition
- */
- public void setAccPedalPosition(VehicleDataResult accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
- /**
- * Gets AccPedal Position
- * @return VehicleDataResult
- */
- public VehicleDataResult getAccPedalPosition() {
- Object obj = parameters.get(Names.accPedalPosition);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.accPedalPosition, e);
- }
- }
- return null;
- }
- /**
- * Sets ClutchPedal Position
- * @param clutchPedalPosition
- */
- public void setClutchPedalPosition(VehicleDataResult clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
- /**
- * Gets ClutchPedal Position
- * @return VehicleDataResult
- */
- public VehicleDataResult getClutchPedalPosition() {
- Object obj = parameters.get(Names.clutchPedalPosition);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.clutchPedalPosition, e);
- }
- }
- return null;
- }
- /**
- * Sets Reverse Gear Status
- * @param reverseGearStatus
- */
- public void setReverseGearStatus(VehicleDataResult reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
- /**
- * Gets Reverse Gear Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getReverseGearStatus() {
- Object obj = parameters.get(Names.reverseGearStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.reverseGearStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets AccTorque
- * @param accTorque
- */
- public void setAccTorque(VehicleDataResult accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
- /**
- * Gets AccTorque
- * @return VehicleDataResult
- */
- public VehicleDataResult getAccTorque() {
- Object obj = parameters.get(Names.accTorque);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.accTorque, e);
- }
- }
- return null;
- }
- /**
- * Sets EvInfo
- * @param evInfo
- */
- public void setEvInfo(VehicleDataResult evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
- /**
- * Gets EvInfo
- * @return VehicleDataResult
- */
- public VehicleDataResult getEvInfo() {
- Object obj = parameters.get(Names.evInfo);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.evInfo, e);
- }
- }
- return null;
- }
- /**
- * Sets Ambient Light Status
- * @param ambientLightStatus
- */
- public void setAmbientLightStatus(VehicleDataResult ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
- /**
- * Gets Ambient Light Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getAmbientLightStatus() {
- Object obj = parameters.get(Names.ambientLightStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.ambientLightStatus, e);
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPData.java
deleted file mode 100755
index d14cd4bcc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPData.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-public class SyncPData extends RPCRequest {
- public SyncPData() {
- super("SyncPData");
- }
- public SyncPData(Hashtable hash) {
- super(hash);
- }
- public void setSyncPData(byte[] syncPData) {
- if (syncPData != null) {
- parameters.put(Names.bulkData, syncPData);
- } else {
- parameters.remove(Names.bulkData);
- }
- }
- public byte[] getSyncPData() {
- return (byte[]) parameters.get(Names.bulkData);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPDataResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPDataResponse.java
deleted file mode 100755
index 132583f47..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SyncPDataResponse.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-public class SyncPDataResponse extends RPCResponse {
- public SyncPDataResponse() {
- super("SyncPDataResponse");
- }
- public SyncPDataResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TTSChunk.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TTSChunk.java
deleted file mode 100755
index a54742055..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TTSChunk.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Specifies what is to be spoken. This can be simply a text phrase, which SMARTDEVICELINK will speak according to its own rules.
- * It can also be phonemes from either the Microsoft SAPI phoneme set, or from the LHPLUS phoneme set.
- * It can also be a pre-recorded sound in WAV format (either developer-defined, or provided by the SMARTDEVICELINK platform).
- *
- * <p>In SMARTDEVICELINK, words, and therefore sentences, can be built up from phonemes and are used to explicitly provide the proper pronounciation to the TTS engine.
- * For example, to have SMARTDEVICELINK pronounce the word "read" as "red", rather than as when it is pronounced like "reed",
- * the developer would use phonemes to express this desired pronounciation.
- * <p>For more information about phonemes, see <a href="http://en.wikipedia.org/wiki/Phoneme">http://en.wikipedia.org/wiki/Phoneme</a>.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>text</td>
- * <td>String</td>
- * <td>Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.</td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>type</td>
- * <td>SpeechCapabilities</td>
- * <td>Indicates the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound). </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class TTSChunk extends RPCStruct {
- /**
- * Constructs a newly allocated TTSChunk object
- */
- public TTSChunk() { }
- /**
- * Constructs a newly allocated TTSChunk object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public TTSChunk(Hashtable hash) {
- super(hash);
- }
- /**
- * Get text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.
- * @return text to be spoken, or a phoneme specification, or the name of a pre-recorded sound
- */
- public String getText() {
- return (String) store.get( Names.text );
- }
- /**
- * Set the text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.
- * @param text to be spoken, or a phoneme specification, or the name of a pre-recorded sound.
- */
- public void setText( String text ) {
- if (text != null) {
- store.put(Names.text, text );
- }
- }
- /**
- * Get the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).
- * @return the type of information in the "text" field
- */
- public SpeechCapabilities getType() {
- Object obj = store.get(Names.type);
- if (obj instanceof SpeechCapabilities) {
- return (SpeechCapabilities) obj;
- } else if (obj instanceof String) {
- SpeechCapabilities theCode = null;
- try {
- theCode = SpeechCapabilities.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.type, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Set the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).
- * @param type the type of information in the "text" field
- */
- public void setType( SpeechCapabilities type ) {
- if (type != null) {
- store.put(Names.type, type );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TextField.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TextField.java
deleted file mode 100755
index 68020812b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TextField.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.CharacterSet;
-import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Struct defining the characteristics of a displayed field on the HMI.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>name</td>
- * <td>TextFieldName</td>
- * <td>Enumeration identifying the field. </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>characterSet</td>
- * <td>CharacterSet</td>
- * <td>The character set that is supported in this field. </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>width</td>
- * <td>Int16</td>
- * <td>The number of characters in one row of this field.
- * <ul>
- * <li>Minvalue="1"</li>
- * <li>maxvalue="500"</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>rows</td>
- * <td>Int16</td>
- * <td>The number of rows for this text field.
- * <ul>
- * <li>Minvalue="1"</li>
- * <li>maxvalue="3"</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class TextField extends RPCStruct {
- /**
- * Constructs a newly allocated TextField object
- */
- public TextField() { }
- /**
- * Constructs a newly allocated TextField object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public TextField(Hashtable hash) {
- super(hash);
- }
- /**
- * Get the enumeration identifying the field.
- * @return the name of TextField
- */
- public TextFieldName getName() {
- Object obj = store.get(Names.name);
- if (obj instanceof TextFieldName) {
- return (TextFieldName) obj;
- } else if (obj instanceof String) {
- TextFieldName theCode = null;
- try {
- theCode = TextFieldName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.name, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Set the enumeration identifying the field.
- * @param name the name of TextField
- */
- public void setName( TextFieldName name ) {
- if (name != null) {
- store.put(Names.name, name );
- }
- }
- /**
- * Get the character set that is supported in this field.
- * @return the character set
- */
- public CharacterSet getCharacterSet() {
- Object obj = store.get(Names.characterSet);
- if (obj instanceof CharacterSet) {
- return (CharacterSet) obj;
- } else if (obj instanceof String) {
- CharacterSet theCode = null;
- try {
- theCode = CharacterSet.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.characterSet, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Set the character set that is supported in this field.
- * @param characterSet - the character set
- */
- public void setCharacterSet( CharacterSet characterSet ) {
- if (characterSet != null) {
- store.put(Names.characterSet, characterSet );
- }
- }
- /**
- * Get the number of characters in one row of this field.
- * <ul>
- * <li>Minvalue="1"</li>
- * <li>maxvalue="500"</li>
- * </ul>
- * @return the number of characters in one row of this field
- */
- public Integer getWidth() {
- return (Integer) store.get( Names.width );
- }
- /**
- * Set the number of characters in one row of this field.
- * <ul>
- * <li>Minvalue="1"</li>
- * <li>maxvalue="500"</li>
- * </ul>
- * @param width the number of characters in one row of this field
- */
- public void setWidth( Integer width ) {
- if (width != null) {
- store.put(Names.width, width );
- }
- }
- /**
- *Get the number of rows for this text field.
- * <ul>
- * <li>Minvalue="1"</li>
- * <li>maxvalue="3"</li>
- * </ul>
- * @return the number of rows for this text field
- */
- public Integer getRows() {
- return (Integer) store.get( Names.rows );
- }
- public void setRows( Integer rows ) {
- if (rows != null) {
- store.put(Names.rows, rows );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TireStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TireStatus.java
deleted file mode 100755
index 52ebdafe9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/TireStatus.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.TirePressureTellTale;
-import com.smartdevicelink.proxy.rpc.enums.WarningLightStatus;
-import com.smartdevicelink.util.DebugTool;
-
-public class TireStatus extends RPCStruct {
-
- public TireStatus() { }
- public TireStatus(Hashtable hash) {
- super(hash);
- }
- public void setPressureTellTale(WarningLightStatus pressureTellTale) {
- if (pressureTellTale != null) {
- store.put(Names.pressureTellTale, pressureTellTale);
- } else {
- store.remove(Names.pressureTellTale);
- }
- }
- public WarningLightStatus getPressureTellTale() {
- Object obj = store.get(Names.pressureTellTale);
- if (obj instanceof WarningLightStatus) {
- return (WarningLightStatus) obj;
- } else if (obj instanceof String) {
- WarningLightStatus theCode = null;
- try {
- theCode = WarningLightStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.pressureTellTale, e);
- }
- return theCode;
- }
- return null;
- }
- public void setLeftFront(SingleTireStatus leftFront) {
- if (leftFront != null) {
- store.put(Names.leftFront, leftFront);
- } else {
- store.remove(Names.leftFront);
- }
- }
- public SingleTireStatus getLeftFront() {
- Object obj = store.get(Names.leftFront);
- if (obj instanceof SingleTireStatus) {
- return (SingleTireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new SingleTireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.leftFront, e);
- }
- }
- return null;
- }
- public void setRightFront(SingleTireStatus rightFront) {
- if (rightFront != null) {
- store.put(Names.rightFront, rightFront);
- } else {
- store.remove(Names.rightFront);
- }
- }
- public SingleTireStatus getRightFront() {
- Object obj = store.get(Names.rightFront);
- if (obj instanceof SingleTireStatus) {
- return (SingleTireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new SingleTireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rightFront, e);
- }
- }
- return null;
- }
- public void setLeftRear(SingleTireStatus leftRear) {
- if (leftRear != null) {
- store.put(Names.leftRear, leftRear);
- } else {
- store.remove(Names.leftRear);
- }
- }
- public SingleTireStatus getLeftRear() {
- Object obj = store.get(Names.leftRear);
- if (obj instanceof SingleTireStatus) {
- return (SingleTireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new SingleTireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.leftRear, e);
- }
- }
- return null;
- }
- public void setRightRear(SingleTireStatus rightRear) {
- if (rightRear != null) {
- store.put(Names.rightRear, rightRear);
- } else {
- store.remove(Names.rightRear);
- }
- }
- public SingleTireStatus getRightRear() {
- Object obj = store.get(Names.rightRear);
- if (obj instanceof SingleTireStatus) {
- return (SingleTireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new SingleTireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rightRear, e);
- }
- }
- return null;
- }
- public void setInnerLeftRear(SingleTireStatus innerLeftRear) {
- if (innerLeftRear != null) {
- store.put(Names.innerLeftRear, innerLeftRear);
- } else {
- store.remove(Names.innerLeftRear);
- }
- }
- public SingleTireStatus getInnerLeftRear() {
- Object obj = store.get(Names.innerLeftRear);
- if (obj instanceof SingleTireStatus) {
- return (SingleTireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new SingleTireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.innerLeftRear, e);
- }
- }
- return null;
- }
- public void setInnerRightRear(SingleTireStatus innerRightRear) {
- if (innerRightRear != null) {
- store.put(Names.innerRightRear, innerRightRear);
- } else {
- store.remove(Names.innerRightRear);
- }
- }
- public SingleTireStatus getInnerRightRear() {
- Object obj = store.get(Names.innerRightRear);
- if (obj instanceof SingleTireStatus) {
- return (SingleTireStatus) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new SingleTireStatus((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.innerRightRear, e);
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Turn.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Turn.java
deleted file mode 100755
index a4ec2dca0..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Turn.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Describes a navigation turn including an optional icon
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>navigationText</td>
- * <td>String</td>
- * <td>Text to describe the turn (e.g. streetname)
- * <ul>
- * <li>Maxlength = 500</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>turnIcon</td>
- * <td>Image</td>
- * <td>Image to be shown for a turn
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class Turn extends RPCStruct {
-
- /**
- * Constructs a newly allocated Turn object
- */
- public Turn() { }
-
- /**
- * Constructs a newly allocated Turn object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public Turn(Hashtable hash) {
- super(hash);
- }
-
- /**
- * set the text to describe the turn (e.g. streetname)
- * @param navigationText the text to describe the turn (e.g. streetname)
- */
- public void setNavigationText(String navigationText) {
- if (navigationText != null) {
- store.put(Names.navigationText, navigationText);
- } else {
- store.remove(Names.navigationText);
- }
- }
-
- /**
- * get the text to describe the turn (e.g. streetname)
- * @return the text to describe the turn (e.g. streetname)
- */
- public String getNavigationText() {
- return (String) store.get(Names.navigationText);
- }
-
- /**
- * set Image to be shown for a turn
- * @param turnIcon the image to be shown for a turn
- */
- public void setTurnIcon(Image turnIcon) {
- if (turnIcon != null) {
- store.put(Names.turnIcon, turnIcon);
- } else {
- store.remove(Names.turnIcon);
- }
- }
-
- /**
- * get the image to be shown for a turn
- * @return the image to be shown for a turn
- */
- public Image getTurnIcon() {
- Object obj = store.get(Names.turnIcon);
- if (obj instanceof Image) {
- return (Image) obj;
- } else {
- return new Image((Hashtable) obj);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
deleted file mode 100755
index 20665f22f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-
-/**
- * Terminates an application's interface registration. This causes SMARTDEVICELINK&reg; to
- * dispose of all resources associated with the application's interface
- * registration (e.g. Command Menu items, Choice Sets, button subscriptions,
- * etc.)
- * <p>
- * After the UnregisterAppInterface operation is performed, no other operations
- * can be performed until a new app interface registration is established by
- * calling <i>{@linkplain RegisterAppInterface}</i>
- * <p>
- * <b>HMILevel can be FULL, LIMITED, BACKGROUND or NONE</b>
- * </p>
- *
- * @see RegisterAppInterface
- * @see OnAppInterfaceUnregistered
- */
-public class UnregisterAppInterface extends RPCRequest {
- /**
- * Constructs a new UnregisterAppInterface object
- */
- public UnregisterAppInterface() {
- super("UnregisterAppInterface");
- }
- /**
- * Constructs a new UnregisterAppInterface object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UnregisterAppInterface(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
deleted file mode 100755
index 7b0c3bfd9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Unregister AppInterface Response is sent, when UnregisterAppInterface has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class UnregisterAppInterfaceResponse extends RPCResponse {
-
- /**
- * Constructs a new UnregisterAppInterfaceResponse object
- */
- public UnregisterAppInterfaceResponse() {
- super("UnregisterAppInterface");
- }
-
- /**
- * Constructs a new UnregisterAppInterfaceResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UnregisterAppInterfaceResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
deleted file mode 100755
index 93600bfab..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Deletes a subscription to button notifications for the specified button. For
- * more information about button subscriptions, see {@linkplain SubscribeButton}
- * <p>
- * Application can unsubscribe from a button that is currently being pressed
- * (i.e. has not yet been released), but app will not get button event
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * <p>
- *
- * @since SmartDeviceLink 1.0
- * @see SubscribeButton
- */
-public class UnsubscribeButton extends RPCRequest {
-
- /**
- * Constructs a new UnsubscribeButton object
- */
- public UnsubscribeButton() {
- super("UnsubscribeButton");
- }
- /**
- * Constructs a new UnsubscribeButton object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UnsubscribeButton(Hashtable hash) {
- super(hash);
- }
- /**
- * Gets a name of the button to unsubscribe from
- *
- * @return ButtonName -an Enumeration value, see <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i>
- */
- public ButtonName getButtonName() {
- Object obj = parameters.get(Names.buttonName);
- if (obj instanceof ButtonName) {
- return (ButtonName) obj;
- } else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.buttonName, e);
- }
- return theCode;
- }
- return null;
- }
- /**
- * Sets the name of the button to unsubscribe from
- *
- * @param buttonName
- * an enum value, see <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i>
- */
- public void setButtonName( ButtonName buttonName ) {
- if (buttonName != null) {
- parameters.put(Names.buttonName, buttonName );
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
deleted file mode 100755
index e884055ba..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Unsubscribe Button Response is sent, when UnsubscribeButton has been called
- *
- * @since SmartDeviceLink 1.0
- */
-public class UnsubscribeButtonResponse extends RPCResponse {
-
- /**
- * Constructs a new UnsubscribeButtonResponse object
- */
- public UnsubscribeButtonResponse() {
- super("UnsubscribeButton");
- }
-
- /**
- * Constructs a new UnsubscribeButtonResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UnsubscribeButtonResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
deleted file mode 100755
index 441d0e50e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
+++ /dev/null
@@ -1,916 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * This function is used to unsubscribe the notifications from the
- * subscribeVehicleData function
- * <p>
- * Function Group: Location, VehicleInfo and DrivingChara
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
- *
- * @since SmartDeviceLink 2.0
- * @see SubscribeVehicleData
- * @see GetVehicleData
- */
-public class UnsubscribeVehicleData extends RPCRequest {
-
- /**
- * Constructs a new UnsubscribeVehicleData object
- */
- public UnsubscribeVehicleData() {
- super("UnsubscribeVehicleData");
- }
-
- /**
- * Constructs a new UnsubscribeVehicleData object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UnsubscribeVehicleData(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Gps data
- *
- * @param gps
- * a boolean value
- */
- public void setGps(Boolean gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Gps data has been unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Gps data has been
- * unsubscribed.
- */
- public Boolean getGps() {
- return (Boolean) parameters.get(Names.gps);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes speed data
- *
- * @param speed
- * a boolean value
- */
- public void setSpeed(Boolean speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Speed data has been unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Speed data has been
- * unsubscribed.
- */
- public Boolean getSpeed() {
- return (Boolean) parameters.get(Names.speed);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribe data
- *
- * @param rpm
- * a boolean value
- */
- public void setRpm(Boolean rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the rpm data has been unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the rpm data has been
- * unsubscribed.
- */
- public Boolean getRpm() {
- return (Boolean) parameters.get(Names.rpm);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes FuelLevel data
- *
- * @param fuelLevel
- * a boolean value
- */
- public void setFuelLevel(Boolean fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the FuelLevel data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the FuelLevel data has
- * been unsubscribed.
- */
- public Boolean getFuelLevel() {
- return (Boolean) parameters.get(Names.fuelLevel);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes fuelLevel_State data
- *
- * @param fuelLevel_State
- * a boolean value
- */
- public void setFuelLevel_State(Boolean fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the fuelLevel_State data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the fuelLevel_State data
- * has been unsubscribed.
- */
- public Boolean getFuelLevel_State() {
- return (Boolean) parameters.get(Names.fuelLevel_State);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes instantFuelConsumption data
- *
- * @param instantFuelConsumption
- * a boolean value
- */
- public void setInstantFuelConsumption(Boolean instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the getInstantFuelConsumption data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the getInstantFuelConsumption data
- * has been unsubscribed.
- */
- public Boolean getInstantFuelConsumption() {
- return (Boolean) parameters.get(Names.instantFuelConsumption);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes externalTemperature data
- *
- * @param externalTemperature
- * a boolean value
- */
- public void setExternalTemperature(Boolean externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the externalTemperature data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the externalTemperature data
- * has been unsubscribed.
- */
- public Boolean getExternalTemperature() {
- return (Boolean) parameters.get(Names.externalTemperature);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Currently selected gear data
- *
- * @param prndl
- * a boolean value
- */
- public void setPrndl(Boolean prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Currently selected gear data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Currently selected gear data
- * has been unsubscribed.
- */
- public Boolean getPrndl() {
- return (Boolean) parameters.get(Names.prndl);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes tire pressure status data
- *
- * @param tirePressure
- * a boolean value
- */
- public void setTirePressure(Boolean tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the tire pressure status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the tire pressure status data
- * has been unsubscribed.
- */
- public Boolean getTirePressure() {
- return (Boolean) parameters.get(Names.tirePressure);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes odometer data
- *
- * @param odometer
- * a boolean value
- */
- public void setOdometer(Boolean odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the odometer data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the odometer data
- * has been unsubscribed.
- */
- public Boolean getOdometer() {
- return (Boolean) parameters.get(Names.odometer);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes belt Status data
- *
- * @param beltStatus
- * a boolean value
- */
- public void setBeltStatus(Boolean beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the belt Status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the belt Status data
- * has been unsubscribed.
- */
- public Boolean getBeltStatus() {
- return (Boolean) parameters.get(Names.beltStatus);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes body Information data
- *
- * @param bodyInformation
- * a boolean value
- */
- public void setBodyInformation(Boolean bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the body Information data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the body Information data
- * has been unsubscribed.
- */
- public Boolean getBodyInformation() {
- return (Boolean) parameters.get(Names.bodyInformation);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes device Status data
- *
- * @param deviceStatus
- * a boolean value
- */
- public void setDeviceStatus(Boolean deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the device Status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the device Status data
- * has been unsubscribed.
- */
- public Boolean getDeviceStatus() {
- return (Boolean) parameters.get(Names.deviceStatus);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes driver Braking data
- *
- * @param driverBraking
- * a boolean value
- */
- public void setDriverBraking(Boolean driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the driver Braking data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the driver Braking data
- * has been unsubscribed.
- */
- public Boolean getDriverBraking() {
- return (Boolean) parameters.get(Names.driverBraking);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes wiper Status data
- *
- * @param wiperStatus
- * a boolean value
- */
- public void setWiperStatus(Boolean wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the wiper Status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the wiper Status data
- * has been unsubscribed.
- */
- public Boolean getWiperStatus() {
- return (Boolean) parameters.get(Names.wiperStatus);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes fuel Economy data
- *
- * @param fuelEconomy
- * a boolean value
- */
- public void setFuelEconomy(Boolean fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the fuel Economy data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the fuel Economy data
- * has been unsubscribed.
- */
- public Boolean getFuelEconomy() {
- return (Boolean) parameters.get(Names.fuelEconomy);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Engine Oil Life data
- *
- * @param engineOilLife
- * a boolean value
- */
- public void setEngineOilLife(Boolean engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Engine Oil Life data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Engine Oil Life data
- * has been unsubscribed.
- */
- public Boolean getEngineOilLife() {
- return (Boolean) parameters.get(Names.engineOilLife);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Head Lamp Status data
- *
- * @param headLampStatus
- * a boolean value
- */
- public void setHeadLampStatus(Boolean headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Head Lamp Status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Head Lamp Status data
- * has been unsubscribed.
- */
- public Boolean getHeadLampStatus() {
- return (Boolean) parameters.get(Names.headLampStatus);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Battery Voltage data
- *
- * @param batteryVoltage
- * a boolean value
- */
- public void setBatteryVoltage(Boolean batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Battery Voltage data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Battery Voltage data
- * has been unsubscribed.
- */
- public Boolean getBatteryVoltage() {
- return (Boolean) parameters.get(Names.batteryVoltage);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Brake Torque data
- *
- * @param brakeTorque
- * a boolean value
- */
- public void setBrakeTorque(Boolean brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Brake Torque data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Brake Torque data
- * has been unsubscribed.
- */
- public Boolean getBrakeTorque() {
- return (Boolean) parameters.get(Names.brakeTorque);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Engine Torque data
- *
- * @param engineTorque
- * a boolean value
- */
- public void setEngineTorque(Boolean engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Engine Torque data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Engine Torque data
- * has been unsubscribed.
- */
- public Boolean getEngineTorque() {
- return (Boolean) parameters.get(Names.engineTorque);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Turbo Boost data
- *
- * @param turboBoost
- * a boolean value
- */
- public void setTurboBoost(Boolean turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Turbo Boost data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Turbo Boost data
- * has been unsubscribed.
- */
- public Boolean getTurboBoost() {
- return (Boolean) parameters.get(Names.turboBoost);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Coolant Temp data
- *
- * @param coolantTemp
- * a boolean value
- */
- public void setCoolantTemp(Boolean coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Coolant Temp data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Coolant Temp data
- * has been unsubscribed.
- */
- public Boolean getCoolantTemp() {
- return (Boolean) parameters.get(Names.coolantTemp);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Air Fuel Ratio data
- *
- * @param airFuelRatio
- * a boolean value
- */
- public void setAirFuelRatio(Boolean airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Air Fuel Ratio data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Air Fuel Ratio data
- * has been unsubscribed.
- */
- public Boolean getAirFuelRatio() {
- return (Boolean) parameters.get(Names.airFuelRatio);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Cooling Head Temp data
- *
- * @param coolingHeadTemp
- * a boolean value
- */
- public void setCoolingHeadTemp(Boolean coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Cooling Head Temp data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Cooling Head Temp data
- * has been unsubscribed.
- */
- public Boolean getCoolingHeadTemp() {
- return (Boolean) parameters.get(Names.coolingHeadTemp);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Cooling Oil Temp data
- *
- * @param oilTemp
- * a boolean value
- */
- public void setOilTemp(Boolean oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Oil Temp data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Oil Temp data
- * has been unsubscribed.
- */
- public Boolean getOilTemp() {
- return (Boolean) parameters.get(Names.oilTemp);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Intake Air Temp data
- *
- * @param intakeAirTemp
- * a boolean value
- */
- public void setIntakeAirTemp(Boolean intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Intake Air Temp data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Intake Air Temp data
- * has been unsubscribed.
- */
- public Boolean getIntakeAirTemp() {
- return (Boolean) parameters.get(Names.intakeAirTemp);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Gear Shift Advice data
- *
- * @param gearShiftAdvice
- * a boolean value
- */
- public void setGearShiftAdvice(Boolean gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Gear Shift Advice data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Gear Shift Advice data
- * has been unsubscribed.
- */
- public Boolean getGearShiftAdvice() {
- return (Boolean) parameters.get(Names.gearShiftAdvice);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes acceleration data
- *
- * @param acceleration
- * a boolean value
- */
- public void setAcceleration(Boolean acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the acceleration data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the acceleration data
- * has been unsubscribed.
- */
- public Boolean getAcceleration() {
- return (Boolean) parameters.get(Names.acceleration);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes accPedalPosition data
- *
- * @param accPedalPosition
- * a boolean value
- */
- public void setAccPedalPosition(Boolean accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the accPedalPosition data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the accPedalPosition data
- * has been unsubscribed.
- */
- public Boolean getAccPedalPosition() {
- return (Boolean) parameters.get(Names.accPedalPosition);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes ClutchPedal Position data
- *
- * @param clutchPedalPosition
- * a boolean value
- */
- public void setClutchPedalPosition(Boolean clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the ClutchPedal Position data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the ClutchPedal Position data
- * has been unsubscribed.
- */
- public Boolean getClutchPedalPosition() {
- return (Boolean) parameters.get(Names.clutchPedalPosition);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Reverse Gear Status data
- *
- * @param reverseGearStatus
- * a boolean value
- */
- public void setReverseGearStatus(Boolean reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Reverse Gear Status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Reverse Gear Status data
- * has been unsubscribed.
- */
- public Boolean getReverseGearStatus() {
- return (Boolean) parameters.get(Names.reverseGearStatus);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes accTorque data
- *
- * @param accTorque
- * a boolean value
- */
- public void setAccTorque(Boolean accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the accTorque data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the accTorque data
- * has been unsubscribed.
- */
- public Boolean getAccTorque() {
- return (Boolean) parameters.get(Names.accTorque);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes evInfo data
- *
- * @param evInfo
- * a boolean value
- */
- public void setEvInfo(Boolean evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the evInfo data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the evInfo data
- * has been unsubscribed.
- */
- public Boolean getEvInfo() {
- return (Boolean) parameters.get(Names.evInfo);
- }
-
- /**
- * Sets a boolean value. If true, unsubscribes Ambient Light Status data
- *
- * @param ambientLightStatus
- * a boolean value
- */
- public void setAmbientLightStatus(Boolean ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
-
- /**
- * Gets a boolean value. If true, means the Ambient Light Status data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Ambient Light Status data
- * has been unsubscribed.
- */
- public Boolean getAmbientLightStatus() {
- return (Boolean) parameters.get(Names.ambientLightStatus);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
deleted file mode 100755
index 9cca6802f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
+++ /dev/null
@@ -1,1017 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Unsubscribe Vehicle Data Response is sent, when UnsubscribeVehicleData has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class UnsubscribeVehicleDataResponse extends RPCResponse {
-
- /**
- * Constructs a new UnsubscribeVehicleDataResponse object
- */
- public UnsubscribeVehicleDataResponse() {
- super("UnsubscribeVehicleData");
- }
-
- /**
- * Constructs a new UnsubscribeVehicleDataResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UnsubscribeVehicleDataResponse(Hashtable hash) {
- super(hash);
- }
- /**
- * Sets Gps
- * @param gps
- */
- public void setGps(VehicleDataResult gps) {
- if (gps != null) {
- parameters.put(Names.gps, gps);
- } else {
- parameters.remove(Names.gps);
- }
- }
- /**
- * Gets Gps
- * @return VehicleDataResult
- */
- public VehicleDataResult getGps() {
- Object obj = parameters.get(Names.gps);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gps, e);
- }
- }
- return null;
- }
- /**
- * Sets Speed
- * @param speed
- */
- public void setSpeed(VehicleDataResult speed) {
- if (speed != null) {
- parameters.put(Names.speed, speed);
- } else {
- parameters.remove(Names.speed);
- }
- }
- /**
- * Gets Speed
- * @return VehicleDataResult
- */
- public VehicleDataResult getSpeed() {
- Object obj = parameters.get(Names.speed);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.speed, e);
- }
- }
- return null;
- }
- /**
- * Sets rpm
- * @param rpm
- */
- public void setRpm(VehicleDataResult rpm) {
- if (rpm != null) {
- parameters.put(Names.rpm, rpm);
- } else {
- parameters.remove(Names.rpm);
- }
- }
- /**
- * Gets rpm
- * @return VehicleDataResult
- */
- public VehicleDataResult getRpm() {
- Object obj = parameters.get(Names.rpm);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.rpm, e);
- }
- }
- return null;
- }
- /**
- * Sets Fuel Level
- * @param fuelLevel
- */
- public void setFuelLevel(VehicleDataResult fuelLevel) {
- if (fuelLevel != null) {
- parameters.put(Names.fuelLevel, fuelLevel);
- } else {
- parameters.remove(Names.fuelLevel);
- }
- }
- /**
- * Gets Fuel Level
- * @return VehicleDataResult
- */
- public VehicleDataResult getFuelLevel() {
- Object obj = parameters.get(Names.fuelLevel);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelLevel, e);
- }
- }
- return null;
- }
- /**
- * Sets Fuel Level State
- * @param fuelLevel_State
- */
- public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(Names.fuelLevel_State, fuelLevel_State);
- } else {
- parameters.remove(Names.fuelLevel_State);
- }
- }
- /**
- * Gets Fuel Level State
- * @return VehicleDataResult
- */
- public VehicleDataResult getFuelLevel_State() {
- Object obj = parameters.get(Names.fuelLevel_State);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelLevel_State, e);
- }
- }
- return null;
- }
- /**
- * Sets Instant Fuel Comsumption
- * @param instantFuelConsumption
- */
- public void setInstantFuelConsumption(VehicleDataResult instantFuelConsumption) {
- if (instantFuelConsumption != null) {
- parameters.put(Names.instantFuelConsumption, instantFuelConsumption);
- } else {
- parameters.remove(Names.instantFuelConsumption);
- }
- }
- /**
- * Gets Instant Fuel Comsumption
- * @return VehicleDataResult
- */
- public VehicleDataResult getInstantFuelConsumption() {
- Object obj = parameters.get(Names.instantFuelConsumption);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.instantFuelConsumption, e);
- }
- }
- return null;
- }
- /**
- * Sets External Temperature
- * @param externalTemperature
- */
- public void setExternalTemperature(VehicleDataResult externalTemperature) {
- if (externalTemperature != null) {
- parameters.put(Names.externalTemperature, externalTemperature);
- } else {
- parameters.remove(Names.externalTemperature);
- }
- }
- /**
- * Gets External Temperature
- * @return VehicleDataResult
- */
- public VehicleDataResult getExternalTemperature() {
- Object obj = parameters.get(Names.externalTemperature);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.externalTemperature, e);
- }
- }
- return null;
- }
- /**
- * Gets currently selected gear data
- * @param prndl
- */
- public void setPrndl(VehicleDataResult prndl) {
- if (prndl != null) {
- parameters.put(Names.prndl, prndl);
- } else {
- parameters.remove(Names.prndl);
- }
- }
- /**
- * Gets currently selected gear data
- * @return VehicleDataResult
- */
- public VehicleDataResult getPrndl() {
- Object obj = parameters.get(Names.prndl);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.prndl, e);
- }
- }
- return null;
- }
- /**
- * Sets Tire Pressure
- * @param tirePressure
- */
- public void setTirePressure(VehicleDataResult tirePressure) {
- if (tirePressure != null) {
- parameters.put(Names.tirePressure, tirePressure);
- } else {
- parameters.remove(Names.tirePressure);
- }
- }
- /**
- * Gets Tire Pressure
- * @return VehicleDataResult
- */
- public VehicleDataResult getTirePressure() {
- Object obj = parameters.get(Names.tirePressure);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.tirePressure, e);
- }
- }
- return null;
- }
- /**
- * Sets Odometer
- * @param odometer
- */
- public void setOdometer(VehicleDataResult odometer) {
- if (odometer != null) {
- parameters.put(Names.odometer, odometer);
- } else {
- parameters.remove(Names.odometer);
- }
- }
- /**
- * Gets Odometer
- * @return VehicleDataResult
- */
- public VehicleDataResult getOdometer() {
- Object obj = parameters.get(Names.odometer);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.odometer, e);
- }
- }
- return null;
- }
- /**
- * Sets Belt Status
- * @param beltStatus
- */
- public void setBeltStatus(VehicleDataResult beltStatus) {
- if (beltStatus != null) {
- parameters.put(Names.beltStatus, beltStatus);
- } else {
- parameters.remove(Names.beltStatus);
- }
- }
- /**
- * Gets Belt Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getBeltStatus() {
- Object obj = parameters.get(Names.beltStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.beltStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Body Information
- * @param bodyInformation
- */
- public void setBodyInformation(VehicleDataResult bodyInformation) {
- if (bodyInformation != null) {
- parameters.put(Names.bodyInformation, bodyInformation);
- } else {
- parameters.remove(Names.bodyInformation);
- }
- }
- /**
- * Gets Body Information
- * @return VehicleDataResult
- */
- public VehicleDataResult getBodyInformation() {
- Object obj = parameters.get(Names.bodyInformation);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.bodyInformation, e);
- }
- }
- return null;
- }
- /**
- * Sets Device Status
- * @param deviceStatus
- */
- public void setDeviceStatus(VehicleDataResult deviceStatus) {
- if (deviceStatus != null) {
- parameters.put(Names.deviceStatus, deviceStatus);
- } else {
- parameters.remove(Names.deviceStatus);
- }
- }
- /**
- * Gets Device Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getDeviceStatus() {
- Object obj = parameters.get(Names.deviceStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.deviceStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Driver Braking
- * @param driverBraking
- */
- public void setDriverBraking(VehicleDataResult driverBraking) {
- if (driverBraking != null) {
- parameters.put(Names.driverBraking, driverBraking);
- } else {
- parameters.remove(Names.driverBraking);
- }
- }
- /**
- * Gets Driver Braking
- * @return VehicleDataResult
- */
- public VehicleDataResult getDriverBraking() {
- Object obj = parameters.get(Names.driverBraking);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.driverBraking, e);
- }
- }
- return null;
- }
- /**
- * Sets Wiper Status
- * @param wiperStatus
- */
- public void setWiperStatus(VehicleDataResult wiperStatus) {
- if (wiperStatus != null) {
- parameters.put(Names.wiperStatus, wiperStatus);
- } else {
- parameters.remove(Names.wiperStatus);
- }
- }
- /**
- * Gets Wiper Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getWiperStatus() {
- Object obj = parameters.get(Names.wiperStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.wiperStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Fuel Economy
- * @param fuelEconomy
- */
- public void setFuelEconomy(VehicleDataResult fuelEconomy) {
- if (fuelEconomy != null) {
- parameters.put(Names.fuelEconomy, fuelEconomy);
- } else {
- parameters.remove(Names.fuelEconomy);
- }
- }
- /**
- * Gets Fuel Economy
- * @return VehicleDataResult
- */
- public VehicleDataResult getFuelEconomy() {
- Object obj = parameters.get(Names.fuelEconomy);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.fuelEconomy, e);
- }
- }
- return null;
- }
- /**
- * Sets Engine Oil Life
- * @param engineOilLife
- */
- public void setEngineOilLife(VehicleDataResult engineOilLife) {
- if (engineOilLife != null) {
- parameters.put(Names.engineOilLife, engineOilLife);
- } else {
- parameters.remove(Names.engineOilLife);
- }
- }
- /**
- * Gets Engine Oil Life
- * @return VehicleDataResult
- */
- public VehicleDataResult getEngineOilLife() {
- Object obj = parameters.get(Names.engineOilLife);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.engineOilLife, e);
- }
- }
- return null;
- }
- /**
- * Sets Head Lamp Status
- * @param headLampStatus
- */
- public void setHeadLampStatus(VehicleDataResult headLampStatus) {
- if (headLampStatus != null) {
- parameters.put(Names.headLampStatus, headLampStatus);
- } else {
- parameters.remove(Names.headLampStatus);
- }
- }
- /**
- * Gets Head Lamp Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getHeadLampStatus() {
- Object obj = parameters.get(Names.headLampStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.headLampStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets Battery Voltage
- * @param batteryVoltage
- */
- public void setBatteryVoltage(VehicleDataResult batteryVoltage) {
- if (batteryVoltage != null) {
- parameters.put(Names.batteryVoltage, batteryVoltage);
- } else {
- parameters.remove(Names.batteryVoltage);
- }
- }
- /**
- * Gets Battery Voltage
- * @return VehicleDataResult
- */
- public VehicleDataResult getBatteryVoltage() {
- Object obj = parameters.get(Names.batteryVoltage);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.batteryVoltage, e);
- }
- }
- return null;
- }
- /**
- * Sets Brake Torque
- * @param brakeTorque
- */
- public void setBrakeTorque(VehicleDataResult brakeTorque) {
- if (brakeTorque != null) {
- parameters.put(Names.brakeTorque, brakeTorque);
- } else {
- parameters.remove(Names.brakeTorque);
- }
- }
- /**
- * Gets Brake Torque
- * @return VehicleDataResult
- */
- public VehicleDataResult getBrakeTorque() {
- Object obj = parameters.get(Names.brakeTorque);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.brakeTorque, e);
- }
- }
- return null;
- }
- /**
- * Sets Engine Torque
- * @param engineTorque
- */
- public void setEngineTorque(VehicleDataResult engineTorque) {
- if (engineTorque != null) {
- parameters.put(Names.engineTorque, engineTorque);
- } else {
- parameters.remove(Names.engineTorque);
- }
- }
- /**
- * Gets Engine Torque
- * @return VehicleDataResult
- */
- public VehicleDataResult getEngineTorque() {
- Object obj = parameters.get(Names.engineTorque);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.engineTorque, e);
- }
- }
- return null;
- }
- /**
- * Sets Turbo Boost
- * @param turboBoost
- */
- public void setTurboBoost(VehicleDataResult turboBoost) {
- if (turboBoost != null) {
- parameters.put(Names.turboBoost, turboBoost);
- } else {
- parameters.remove(Names.turboBoost);
- }
- }
- /**
- * Gets Turbo Boost
- * @return VehicleDataResult
- */
- public VehicleDataResult getTurboBoost() {
- Object obj = parameters.get(Names.turboBoost);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.turboBoost, e);
- }
- }
- return null;
- }
- /**
- * Sets Coolant Temp
- * @param coolantTemp
- */
- public void setCoolantTemp(VehicleDataResult coolantTemp) {
- if (coolantTemp != null) {
- parameters.put(Names.coolantTemp, coolantTemp);
- } else {
- parameters.remove(Names.coolantTemp);
- }
- }
- /**
- * Gets Coolant Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getCoolantTemp() {
- Object obj = parameters.get(Names.coolantTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.coolantTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Air Fuel Ratio
- * @param airFuelRatio
- */
- public void setAirFuelRatio(VehicleDataResult airFuelRatio) {
- if (airFuelRatio != null) {
- parameters.put(Names.airFuelRatio, airFuelRatio);
- } else {
- parameters.remove(Names.airFuelRatio);
- }
- }
- /**
- * Gets Air Fuel Ratio
- * @return VehicleDataResult
- */
- public VehicleDataResult getAirFuelRatio() {
- Object obj = parameters.get(Names.airFuelRatio);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.airFuelRatio, e);
- }
- }
- return null;
- }
- /**
- * Sets Cooling Head Temp
- * @param coolingHeadTemp
- */
- public void setCoolingHeadTemp(VehicleDataResult coolingHeadTemp) {
- if (coolingHeadTemp != null) {
- parameters.put(Names.coolingHeadTemp, coolingHeadTemp);
- } else {
- parameters.remove(Names.coolingHeadTemp);
- }
- }
- /**
- * Gets Cooling Head Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getCoolingHeadTemp() {
- Object obj = parameters.get(Names.coolingHeadTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.coolingHeadTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Oil Temp
- * @param oilTemp
- */
- public void setOilTemp(VehicleDataResult oilTemp) {
- if (oilTemp != null) {
- parameters.put(Names.oilTemp, oilTemp);
- } else {
- parameters.remove(Names.oilTemp);
- }
- }
- /**
- * Gets Oil Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getOilTemp() {
- Object obj = parameters.get(Names.oilTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.oilTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Intake Air Temp
- * @param intakeAirTemp
- */
- public void setIntakeAirTemp(VehicleDataResult intakeAirTemp) {
- if (intakeAirTemp != null) {
- parameters.put(Names.intakeAirTemp, intakeAirTemp);
- } else {
- parameters.remove(Names.intakeAirTemp);
- }
- }
- /**
- * Gets Intake Air Temp
- * @return VehicleDataResult
- */
- public VehicleDataResult getIntakeAirTemp() {
- Object obj = parameters.get(Names.intakeAirTemp);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.intakeAirTemp, e);
- }
- }
- return null;
- }
- /**
- * Sets Gear Shift Advice
- * @param gearShiftAdvice
- */
- public void setGearShiftAdvice(VehicleDataResult gearShiftAdvice) {
- if (gearShiftAdvice != null) {
- parameters.put(Names.gearShiftAdvice, gearShiftAdvice);
- } else {
- parameters.remove(Names.gearShiftAdvice);
- }
- }
- /**
- * Gets Gear Shift Advice
- * @return VehicleDataResult
- */
- public VehicleDataResult getGearShiftAdvice() {
- Object obj = parameters.get(Names.gearShiftAdvice);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.gearShiftAdvice, e);
- }
- }
- return null;
- }
- /**
- * Sets Acceleration
- * @param acceleration
- */
- public void setAcceleration(VehicleDataResult acceleration) {
- if (acceleration != null) {
- parameters.put(Names.acceleration, acceleration);
- } else {
- parameters.remove(Names.acceleration);
- }
- }
- /**
- * Gets Acceleration
- * @return VehicleDataResult
- */
- public VehicleDataResult getAcceleration() {
- Object obj = parameters.get(Names.acceleration);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.acceleration, e);
- }
- }
- return null;
- }
- /**
- * Sets AccPedal Position
- * @param accPedalPosition
- */
- public void setAccPedalPosition(VehicleDataResult accPedalPosition) {
- if (accPedalPosition != null) {
- parameters.put(Names.accPedalPosition, accPedalPosition);
- } else {
- parameters.remove(Names.accPedalPosition);
- }
- }
- /**
- * Gets AccPedal Position
- * @return VehicleDataResult
- */
- public VehicleDataResult getAccPedalPosition() {
- Object obj = parameters.get(Names.accPedalPosition);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.accPedalPosition, e);
- }
- }
- return null;
- }
- /**
- * Sets ClutchPedal Position
- * @param clutchPedalPosition
- */
- public void setClutchPedalPosition(VehicleDataResult clutchPedalPosition) {
- if (clutchPedalPosition != null) {
- parameters.put(Names.clutchPedalPosition, clutchPedalPosition);
- } else {
- parameters.remove(Names.clutchPedalPosition);
- }
- }
- /**
- * Gets ClutchPedal Position
- * @return VehicleDataResult
- */
- public VehicleDataResult getClutchPedalPosition() {
- Object obj = parameters.get(Names.clutchPedalPosition);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.clutchPedalPosition, e);
- }
- }
- return null;
- }
- /**
- * Sets Reverse Gear Status
- * @param reverseGearStatus
- */
- public void setReverseGearStatus(VehicleDataResult reverseGearStatus) {
- if (reverseGearStatus != null) {
- parameters.put(Names.reverseGearStatus, reverseGearStatus);
- } else {
- parameters.remove(Names.reverseGearStatus);
- }
- }
- /**
- * Gets Reverse Gear Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getReverseGearStatus() {
- Object obj = parameters.get(Names.reverseGearStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.reverseGearStatus, e);
- }
- }
- return null;
- }
- /**
- * Sets AccTorque
- * @param accTorque
- */
- public void setAccTorque(VehicleDataResult accTorque) {
- if (accTorque != null) {
- parameters.put(Names.accTorque, accTorque);
- } else {
- parameters.remove(Names.accTorque);
- }
- }
- /**
- * Gets AccTorque
- * @return VehicleDataResult
- */
- public VehicleDataResult getAccTorque() {
- Object obj = parameters.get(Names.accTorque);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.accTorque, e);
- }
- }
- return null;
- }
- /**
- * Sets Event Info
- * @param evInfo
- */
- public void setEvInfo(VehicleDataResult evInfo) {
- if (evInfo != null) {
- parameters.put(Names.evInfo, evInfo);
- } else {
- parameters.remove(Names.evInfo);
- }
- }
- /**
- * Gets Event Info
- * @return VehicleDataResult
- */
- public VehicleDataResult getEvInfo() {
- Object obj = parameters.get(Names.evInfo);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.evInfo, e);
- }
- }
- return null;
- }
- /**
- * Sets Ambient Light Status
- * @param ambientLightStatus
- */
- public void setAmbientLightStatus(VehicleDataResult ambientLightStatus) {
- if (ambientLightStatus != null) {
- parameters.put(Names.ambientLightStatus, ambientLightStatus);
- } else {
- parameters.remove(Names.ambientLightStatus);
- }
- }
- /**
- * Get Ambient Light Status
- * @return VehicleDataResult
- */
- public VehicleDataResult getAmbientLightStatus() {
- Object obj = parameters.get(Names.ambientLightStatus);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.ambientLightStatus, e);
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
deleted file mode 100755
index 77c0005f8..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Updates the list of next maneuvers, which can be requested by the user
- * pressing the softbutton "Turns" on the Navigation base screen. Three
- * softbuttons are predefined by the system: Up, Down, Close
- * <p>
- * Function Group: Navigation
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * <p>
- *
- * @since SmartDeviceLink 2.0
- * @see ShowConstantTBT
- */
-public class UpdateTurnList extends RPCRequest {
-
- /**
- * Constructs a new UpdateTurnList object
- */
- public UpdateTurnList() {
- super("UpdateTurnList");
- }
-
- /**
- * Constructs a new UpdateTurnList object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UpdateTurnList(Hashtable hash) {
- super(hash);
- }
-
- /**
- * Sets a list of turns to be shown to the user
- *
- * @param turnList
- * a Vector<Turn> value representing a list of turns to be shown
- * to the user
- * <p>
- * <b>Notes: </b>Minsize=1; Maxsize=100
- */
- public void setTurnList(Vector<Turn> turnList) {
- if (turnList != null) {
- parameters.put(Names.turnList, turnList);
- } else {
- parameters.remove(Names.turnList);
- }
- }
-
- /**
- * Gets a list of turns to be shown to the user
- *
- * @return Vector<Turn> -a Vector value representing a list of turns
- */
- public Vector<Turn> getTurnList() {
- if (parameters.get(Names.turnList) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.turnList);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof Turn) {
- return (Vector<Turn>) list;
- } else if (obj instanceof Hashtable) {
- Vector<Turn> newList = new Vector<Turn>();
- for (Object hashObj : list) {
- newList.add(new Turn((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-
- /**
- * Sets soft buttons in the screen. If omitted on supported displays,
- * app-defined SoftButton will be left blank
- * <p>
- * <b>Notes: </b>Minsize=0; Maxsize=1
- *
- * @param softButtons a Vector value
- */
- public void setSoftButtons(Vector<SoftButton> softButtons) {
- if (softButtons != null) {
- parameters.put(Names.softButtons, softButtons);
- } else {
- parameters.remove(Names.softButtons);
- }
- }
-
- /**
- * Gets soft buttons in the screen
- * @return Vector -a Vector<SoftButton> value
- */
- public Vector<SoftButton> getSoftButtons() {
- if (parameters.get(Names.softButtons) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.softButtons);
- if (list != null && list.size() > 0) {
- Object obj = list.get(0);
- if (obj instanceof SoftButton) {
- return (Vector<SoftButton>) list;
- } else if (obj instanceof Hashtable) {
- Vector<SoftButton> newList = new Vector<SoftButton>();
- for (Object hashObj : list) {
- newList.add(new SoftButton((Hashtable)hashObj));
- }
- return newList;
- }
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
deleted file mode 100755
index 360d3b0ce..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-/**
- * Update Turn List Response is sent, when UpdateTurnList has been called
- *
- * @since SmartDeviceLink 2.0
- */
-public class UpdateTurnListResponse extends RPCResponse {
-
- /**
- * Constructs a new UpdateTurnListResponse object
- */
- public UpdateTurnListResponse() {
- super("UpdateTurnList");
- }
-
- /**
- * Constructs a new UpdateTurnListResponse object indicated by the Hashtable
- * parameter
- * <p>
- *
- * @param hash
- * The Hashtable to use
- */
- public UpdateTurnListResponse(Hashtable hash) {
- super(hash);
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
deleted file mode 100755
index c1d199e22..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.DisplayType;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
-import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
-
-public class VehicleDataResult extends RPCStruct {
-
- public VehicleDataResult() { }
- public VehicleDataResult(Hashtable hash) {
- super(hash);
- }
- public void setDataType(VehicleDataType dataType) {
- if (dataType != null) {
- store.put(Names.dataType, dataType);
- } else {
- store.remove(Names.dataType);
- }
- }
- public VehicleDataType getDataType() {
- Object obj = store.get(Names.dataType);
- if (obj instanceof VehicleDataType) {
- return (VehicleDataType) obj;
- } else if (obj instanceof String) {
- VehicleDataType theCode = null;
- try {
- theCode = VehicleDataType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.dataType, e);
- }
- return theCode;
- }
- return null;
- }
- public void setResultCode(VehicleDataResultCode resultCode) {
- if (resultCode != null) {
- store.put(Names.resultCode, resultCode);
- } else {
- store.remove(Names.resultCode);
- }
- }
- public VehicleDataResultCode getResultCode() {
- Object obj = store.get(Names.resultCode);
- if (obj instanceof VehicleDataResultCode) {
- return (VehicleDataResultCode) obj;
- } else if (obj instanceof String) {
- VehicleDataResultCode theCode = null;
- try {
- theCode = VehicleDataResultCode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.resultCode, e);
- }
- return theCode;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleType.java
deleted file mode 100755
index 7811100f0..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VehicleType.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Describes the type of vehicle the mobile phone is connected with.
- * <p><b>Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>make</td>
- * <td>String</td>
- * <td>Make of the vehicle, e.g. Ford
- * <ul>
- * <li>Maxlength = 500</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>Model</td>
- * <td>String</td>
- * <td>Model of the vehicle, e.g. Fiesta
- * <ul>
- * <li>Maxlength = 500</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>modelYear</td>
- * <td>String</td>
- * <td>Model Year of the vehicle, e.g. 2013
- * <ul>
- * <li>Maxlength = 500</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * <tr>
- * <td>trim</td>
- * <td>String</td>
- * <td>Trim of the vehicle, e.g. SE
- * <ul>
- * <li>Maxlength = 500</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 2.0
- */
-public class VehicleType extends RPCStruct {
-
- /**
- * Constructs a newly allocated VehicleType object
- */
- public VehicleType() { }
-
- /**
- * Constructs a newly allocated VehicleType object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public VehicleType(Hashtable hash) {
- super(hash);
- }
-
- /**
- * get the make of the vehicle
- * @return the make of the vehicle
- */
- public String getMake() {
- return (String) store.get(Names.make);
- }
-
- /**
- * set the make of the vehicle
- *@param make the make of the vehicle
- */
- public void setMake(String make) {
- if (make != null) {
- store.put(Names.make, make);
- } else {
- store.remove(Names.make);
- }
- }
-
- /**
- * get the model of the vehicle
- * @return the model of the vehicle
- */
- public String getModel() {
- return (String) store.get(Names.model);
- }
-
- /**
- * set the model of the vehicle
- * @param model the model of the vehicle
- */
- public void setModel(String model) {
- if (model != null) {
- store.put(Names.model, model);
- } else {
- store.remove(Names.model);
- }
- }
-
- /**
- * get the model year of the vehicle
- * @return the model year of the vehicle
- */
- public String getModelYear() {
- return (String) store.get(Names.modelYear);
- }
-
- /**
- * set the model year of the vehicle
- * @param modelYear the model year of the vehicle
- */
- public void setModelYear(String modelYear) {
- if (modelYear != null) {
- store.put(Names.modelYear, modelYear);
- } else {
- store.remove(Names.modelYear);
- }
- }
-
- /**
- * get the trim of the vehicle
- * @return the trim of the vehicle
- */
- public String getTrim() {
- return (String) store.get(Names.trim);
- }
-
- /**
- * set the trim of the vehicle
- * @param trim the trim of the vehicle
- */
- public void setTrim(String trim) {
- if (trim != null) {
- store.put(Names.trim, trim);
- } else {
- store.remove(Names.trim);
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VrHelpItem.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VrHelpItem.java
deleted file mode 100755
index 20c9a1e3a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/VrHelpItem.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.util.DebugTool;
-
-public class VrHelpItem extends RPCStruct {
-
- public VrHelpItem() { }
- public VrHelpItem(Hashtable hash) {
- super(hash);
- }
- public void setText(String text) {
- if (text != null) {
- store.put(Names.text, text);
- } else {
- store.remove(Names.text);
- }
- }
- public String getText() {
- return (String) store.get(Names.text);
- }
- public void setImage(Image image) {
- if (image != null) {
- store.put(Names.image, image);
- } else {
- store.remove(Names.image);
- }
- }
- public Image getImage() {
- Object obj = store.get(Names.image);
- if (obj instanceof Image) {
- return (Image) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new Image((Hashtable) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.image, e);
- }
- }
- return null;
- }
- public void setPosition(Integer position) {
- if (position != null) {
- store.put(Names.position, position);
- } else {
- store.remove(Names.position);
- }
- }
- public Integer getPosition() {
- return (Integer) store.get(Names.position);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java
deleted file mode 100755
index 0e67a49f2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum AmbientLightStatus {
- DARK,
- LIGHT,
- TWILIGHT,
- TUNNEL_ON,
- TUNNEL_OFF,
- NO_DATA_EXISTS;
-
- public static AmbientLightStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java
deleted file mode 100755
index e8c58db57..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Enumeration listing possible app hmi types.
- * @since SmartDeviceLink 2.0
- */
-public enum AppHMIType {
- /**
- * The App will have default rights.
- */
- DEFAULT,
- /**
- * Communication type of App
- */
- COMMUNICATION,
- /**
- * App dealing with Media
- */
- MEDIA,
- /**
- * Messaging App
- */
- MESSAGING,
- /**
- * Navigation App
- */
- NAVIGATION,
- /**
- * Information App
- */
- INFORMATION,
- /**
- * App dealing with social media
- */
- SOCIAL,
- BACKGROUND_PROCESS,
- /**
- * App only for Testing purposes
- */
- TESTING,
- /**
- * System App
- */
- SYSTEM;
-
- /**
- * Convert String to AppHMIType
- * @param value String
- * @return AppHMIType
- */
- public static AppHMIType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
deleted file mode 100755
index b3bde86c7..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Indicates reason why app interface was unregistered. The application is being
- * disconnected by SMARTDEVICELINK.
- *
- * @since SmartDeviceLink 1.0
- */
-public enum AppInterfaceUnregisteredReason {
- USER_EXIT,
- /**
- * Vehicle ignition turned off.
- *
- * @since SmartDeviceLink 1.0
- */
- IGNITION_OFF,
- /**
- * Bluetooth was turned off, causing termination of a necessary Bluetooth
- * connection.
- *
- * @since SmartDeviceLink 1.0
- */
- BLUETOOTH_OFF,
- /**
- * USB was disconnected, causing termination of a necessary iAP connection.
- *
- * @since SmartDeviceLink 1.0
- */
- USB_DISCONNECTED,
- /**
- * Application attempted SmartDeviceLink RPC request while {@linkplain HMILevel}
- * =NONE. App must have HMILevel other than NONE to issue RPC requests or
- * get notifications or RPC responses.
- *
- * @since SmartDeviceLink 1.0
- */
- REQUEST_WHILE_IN_NONE_HMI_LEVEL,
- /**
- * Either too many -- or too many per unit of time -- requests were made by
- * the application.
- *
- * @since SmartDeviceLink 1.0
- */
- TOO_MANY_REQUESTS,
- /**
- * The application has issued requests which cause driver distraction rules
- * to be violated.
- *
- * @since SmartDeviceLink 1.0
- */
- DRIVER_DISTRACTION_VIOLATION,
- /**
- * The user has changed the language in effect on the SMARTDEVICELINK platform to a
- * language that is incompatible with the language declared by the
- * application in its RegisterAppInterface request.
- *
- * @since SmartDeviceLink 1.0
- */
- LANGUAGE_CHANGE,
- /**
- * The user performed a MASTER RESET on the SMARTDEVICELINK platform, causing removal
- * of a necessary Bluetooth pairing.
- *
- * @since SmartDeviceLink 1.0
- */
- MASTER_RESET,
- /**
- * The user restored settings to FACTORY DEFAULTS on the SMARTDEVICELINK platform.
- *
- * @since SmartDeviceLink 1.0
- */
- FACTORY_DEFAULTS,
- /**
- * The app is not being authorized by Ford to be connected to SMARTDEVICELINK.
- *
- * @since SmartDeviceLink 2.0
- */
- APP_UNAUTHORIZED;
-
- public static AppInterfaceUnregisteredReason valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java
deleted file mode 100755
index dea3504dd..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Describes whether or not streaming audio is currently audible to the user.
- * Though provided in every OnHMIStatus notification, this information is only
- * relevant for applications that declare themselves as media apps in
- * RegisterAppInterface
- *
- * @since SmartDeviceLink 1.0
- */
-public enum AudioStreamingState {
- /**
- * Currently streaming audio, if any, is audible to user.
- *
- * @since SmartDeviceLink 1.0
- */
- AUDIBLE,
-
- /**
- * Some kind of audio mixing is taking place. Currently streaming audio, if
- * any, is audible to the user at a lowered volume.
- *
- * @since SmartDeviceLink 2.0
- */
- ATTENUATED,
- /**
- * Currently streaming audio, if any, is not audible to user. made via VR
- * session.
- *
- * @since SmartDeviceLink 1.0
- */
- NOT_AUDIBLE;
-
- public static AudioStreamingState valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioType.java
deleted file mode 100755
index f0f1f422a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/AudioType.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Describes different audio type options for PerformAudioPassThru
- *
- */
-public enum AudioType {
- /**
- * PCM raw audio
- *
- * @since SmartDeviceLink 2.0
- */
- PCM;
-
- public static AudioType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java
deleted file mode 100755
index f0f254810..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * Describes different bit depth options for PerformAudioPassThru
- *
- */
-public enum BitsPerSample {
- /**
- * 8 bits per sample
- *
- * @since SmartDeviceLink 2.0
- */
- _8_BIT("8_BIT"),
- /**
- * 16 bits per sample
- *
- * @since SmartDeviceLink 2.0
- */
- _16_BIT("16_BIT");
-
- String internalName;
-
- private BitsPerSample(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- public static BitsPerSample valueForString(String value) {
- for (BitsPerSample anEnum : EnumSet.allOf(BitsPerSample.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java
deleted file mode 100755
index 46ab6d060..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Indicates whether the button was depressed or released. A BUTTONUP event will
- * always be preceded by a BUTTONDOWN event
- * <p>
- *
- * @since SmartDeviceLink 1.0
- */
-public enum ButtonEventMode {
- /**
- * The button was released
- */
- BUTTONUP,
- /**
- * The button was depressed
- */
- BUTTONDOWN;
-
- /**
- * Returns a ButtonEventMode (BUTTONUP or BUTTONDOWN)
- *
- * @param value
- * a String
- * @return ButtonEventMode -BUTTONUP or BUTTONDOWN
- */
-
- public static ButtonEventMode valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonName.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonName.java
deleted file mode 100755
index 8ab57d332..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonName.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * <p>
- * Defines logical buttons which, on a given SMARTDEVICELINK unit, would correspond to
- * either physical or soft (touchscreen) buttons. These logical buttons present
- * a standard functional abstraction which the developer can rely upon,
- * independent of the SMARTDEVICELINK unit. For example, the developer can rely upon the OK
- * button having the same meaning to the user across SMARTDEVICELINK platforms.
- * </p>
- * <p>
- * The preset buttons (0-9) can typically be interpreted by the application as
- * corresponding to some user-configured choices, though the application is free
- * to interpret these button presses as it sees fit.
- * </p>
- * <p>
- * The application can discover which buttons a given SMARTDEVICELINK unit implements by
- * interrogating the ButtonCapabilities parameter of the
- * RegisterAppInterface response.
- * </p>
- *
- * @since SmartDeviceLink 1.0
- */
-public enum ButtonName{
- /**
- * Represents the button usually labeled "OK". A typical use of this button
- * is for the user to press it to make a selection.
- *
- * @since SmartDeviceLink 1.0
- */
- OK,
- /**
- * Represents the seek-left button. A typical use of this button is for the
- * user to scroll to the left through menu choices one menu item per press.
- *
- * @since SmartDeviceLink 1.0
- */
- SEEKLEFT,
- /**
- * Represents the seek-right button. A typical use of this button is for the
- * user to scroll to the right through menu choices one menu item per press.
- *
- * @since SmartDeviceLink 1.0
- */
- SEEKRIGHT,
- /**
- * Represents a turn of the tuner knob in the clockwise direction one tick.
- *
- * @since SmartDeviceLink 1.0
- */
- TUNEUP,
- /**
- * Represents a turn of the tuner knob in the counter-clockwise direction
- * one tick.
- *
- * @since SmartDeviceLink 1.0
- */
- TUNEDOWN,
- /**
- * Represents the preset 0 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_0,
- /**
- * Represents the preset 1 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_1,
- /**
- * Represents the preset 2 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_2,
- /**
- * Represents the preset 3 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_3,
- /**
- * Represents the preset 4 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_4,
- /**
- * Represents the preset 5 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_5,
- /**
- * Represents the preset 6 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_6,
- /**
- * Represents the preset 7 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_7,
- /**
- * Represents the preset 8 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_8,
- /**
- * Represents the preset 9 button.
- *
- * @since SmartDeviceLink 1.0
- */
- PRESET_9, CUSTOM_BUTTON;
-
- public static ButtonName valueForString(String value) {
- return valueOf(value);
- }
-
- /**
- * indexForPresetButton returns the integer index for preset buttons
- * which match the preset order. E.G.: indexForPresetButton(PRESET_1)
- * returns the value 1. If the buttonName given is not a preset button,
- * the method will return null.
- *
- * @param buttonName
- * @return Integer
- */
- public static Integer indexForPresetButton(ButtonName buttonName) {
-
- Integer returnIndex = null;
-
- switch(buttonName) {
- case PRESET_0:
- returnIndex = 0;
- break;
- case PRESET_1:
- returnIndex = 1;
- break;
- case PRESET_2:
- returnIndex = 2;
- break;
- case PRESET_3:
- returnIndex = 3;
- break;
- case PRESET_4:
- returnIndex = 4;
- break;
- case PRESET_5:
- returnIndex = 5;
- break;
- case PRESET_6:
- returnIndex = 6;
- break;
- case PRESET_7:
- returnIndex = 7;
- break;
- case PRESET_8:
- returnIndex = 8;
- break;
- case PRESET_9:
- returnIndex = 9;
- break;
- }
-
- return returnIndex;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java
deleted file mode 100755
index cb2911919..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Indicates whether this is a LONG or SHORT button press
- * <p>
- *
- * @since SmartDeviceLink 1.0
- */
-public enum ButtonPressMode {
- /**
- * The button has been depressed for 2 seconds. The button may remain
- * depressed after receiving this event
- */
- LONG,
- /**
- * The button was released before the 2-second long-press interval had
- * elapsed
- */
- SHORT;
- /**
- * Returns a ButtonPressMode (LONG or SHORT)
- *
- * @param value
- * a String
- * @return ButtonPressMode -LONG or SHORT
- */
-
- public static ButtonPressMode valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java
deleted file mode 100755
index 4fc3ecd55..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-/**
- * Character sets supported by SMARTDEVICELINK.
- * @since SmartDeviceLink 1.0
- */
-public enum CharacterSet {
- TYPE2SET,
- TYPE5SET,
- CID1SET,
- CID2SET;
-
- /**
- * Convert String to CharacterSet
- * @param value String
- * @return CharacterSet
- */
- public static CharacterSet valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java
deleted file mode 100755
index 5c087618f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * The list of potential compass directions
- * @since SmartDeviceLink 2.0
- */
-public enum CompassDirection {
- /**
- * Direction North
- */
- NORTH,
- /**
- * Direction Northwest
- */
- NORTHWEST,
- /**
- * Direction West
- */
- WEST,
- /**
- * Direction Southwest
- */
- SOUTHWEST,
- /**
- * Direction South
- */
- SOUTH,
- /**
- * Direction Southeast
- */
- SOUTHEAST,
- /**
- * Direction East
- */
- EAST,
- /**
- * Direction Northeast
- */
- NORTHEAST;
-
- /**
- * Convert String to CompassDirection
- * @param value String
- * @return CompassDirection
- */
- public static CompassDirection valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java
deleted file mode 100755
index e32b5acbe..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * The volume status of a vehicle component
- * @since SmartDeviceLink 2.0
- */
-public enum ComponentVolumeStatus {
- /**
- * Unknown
- */
- UNKNOWN,
- /**
- * Normal
- */
- NORMAL,
- /**
- * Low
- */
- LOW,
- /**
- * Fault
- */
- FAULT,
- /**
- * Alert
- */
- ALERT,
- /**
- * Not supported
- */
- NOT_SUPPORTED;
-
- /**
- * Convert String to ComponentVolumeStatus
- * @param value String
- * @return ComponentVolumeStatus
- */
- public static ComponentVolumeStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java
deleted file mode 100755
index af0f0e6dc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the reported battery status of the connected device, if reported.
- * @since SmartDeviceLink 2.0
- */
-public enum DeviceLevelStatus {
- /**
- * Zero level bars
- */
- ZERO_LEVEL_BARS,
- /**
- * One level bars
- */
- ONE_LEVEL_BARS,
- /**
- * Two level bars
- */
- TWO_LEVEL_BARS,
- /**
- * Three level bars
- */
- THREE_LEVEL_BARS,
- /**
- * Four level bars
- */
- FOUR_LEVEL_BARS,
- /**
- * Not provided
- */
- NOT_PROVIDED;
-
- /**
- * Convert String to DeviceLevelStatus
- * @param value String
- * @return DeviceLevelStatus
- */
- public static DeviceLevelStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Dimension.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Dimension.java
deleted file mode 100755
index b95355d12..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Dimension.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * The supported dimensions of the GPS.
- * @since SmartDeviceLink 2.0
- */
-public enum Dimension {
- /**
- * No GPS at all
- */
- NO_FIX("NO_FIX"),
- /**
- * Longitude and latitude
- */
- _2D("2D"),
- /**
- * Longitude and latitude and altitude
- */
- _3D("3D");
-
- String internalName;
-
- private Dimension(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- /**
- * Convert String to Dimension
- * @param value String
- * @return Dimension
- */
- public static Dimension valueForString(String value) {
- for (Dimension anEnum : EnumSet.allOf(Dimension.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DisplayType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DisplayType.java
deleted file mode 100755
index de1c907c9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DisplayType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Identifies the various display types used by SMARTDEVICELINK. See SmartDeviceLink TDK and Head Unit Guide for further information regarding the displays.
- * @since SmartDeviceLink 1.0
- */
-public enum DisplayType {
- /**
- * This display type provides a 2-line x 20 character "dot matrix" display.
- */
- CID,
- TYPE2,
- TYPE5,
- /**
- * This display type provides an 8 inch touchscreen display.
- */
- NGN,
- GEN2_8_DMA,
- GEN2_6_DMA,
- MFD3,
- MFD4,
- MFD5;
-
- /**
- * Convert String to DisplayType
- * @param value String
- * @return DisplayType
- */
- public static DisplayType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java
deleted file mode 100755
index ef7db4277..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- *
- */
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Enumeration that describes possible states of driver distraction.
- * @since SmartDeviceLink 1.0
- */
-public enum DriverDistractionState {
- /**
- * Driver distraction rules are in effect.
- */
- DD_ON,
- /**
- * Driver distraction rules are NOT in effect.
- */
- DD_OFF;
-
- /**
- * Convert String to DriverDistractionState
- * @param value String
- * @return DriverDistractionState
- */
- public static DriverDistractionState valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FileType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FileType.java
deleted file mode 100755
index 2d2f3e78c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FileType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Enumeration listing possible file tpyes.
- * @since SmartDeviceLink 2.0
- */
-public enum FileType {
- /**
- * BMP
- */
- GRAPHIC_BMP,
- /**
- * JPEG
- */
- GRAPHIC_JPEG,
- /**
- * PNG
- */
- GRAPHIC_PNG,
- /**
- * WAVE
- */
- AUDIO_WAVE,
- /**
- * MP3
- */
- AUDIO_MP3;
-
- /**
- * Convert String to FileType
- * @param value String
- * @return FileType
- */
- public static FileType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FunctionID.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FunctionID.java
deleted file mode 100755
index b77d3a0dc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/FunctionID.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum FunctionID {
- RESERVED,
- RegisterAppInterface,
- UnregisterAppInterface,
- SetGlobalProperties,
- ResetGlobalProperties,
- AddCommand,
- DeleteCommand,
- AddSubMenu,
- DeleteSubMenu,
- CreateInteractionChoiceSet,
- PerformInteraction,
- DeleteInteractionChoiceSet,
- Alert,
- Show,
- Speak,
- SetMediaClockTimer,
- EncodedSyncPData,
- DialNumber,
- PerformAudioPassThru,
- EndAudioPassThru,
- SubscribeButton,
- UnsubscribeButton,
- SubscribeVehicleData,
- UnsubscribeVehicleData,
- GetVehicleData,
- ReadDID,
- GetDTCs,
- ScrollableMessage,
- Slider,
- ShowConstantTBT,
- AlertManeuver,
- UpdateTurnList,
- ChangeLanguageRegistration,
- GenericResponse,
- PutFile,
- DeleteFile,
- ListFiles,
- SetAppIcon,
- SetDisplayLayout,
- OnHMIStatus,
- OnAppInterfaceUnregistered,
- OnButtonEvent,
- OnButtonPress,
- OnVehicleData,
- OnCommand,
- OnEncodedSyncPData,
- OnTBTClientState,
- OnDriverDistraction,
- OnPermissionsChange,
- OnAudioPassThru,
- OnLanguageChange;
-
- public static FunctionID valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GearShiftAdviceStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GearShiftAdviceStatus.java
deleted file mode 100755
index 19ca8ba1f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GearShiftAdviceStatus.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum GearShiftAdviceStatus {
- NO_INDICATION,
- UPSHIFT_FUEL_ECONOMY,
- UPSHIFT_PERFORMANCE,
- UPSHIFT_WARNING,
- DOWNSHIFT_RECOMMENDATION,
- SHIFT_TO_NEUTRAL;
-
- public static GearShiftAdviceStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java
deleted file mode 100755
index 7b61ad068..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Properties of a user-initiated VR interaction (i.e. interactions started by the user pressing the PTT button).
- * @since SmartDeviceLink 1.0
- */
-public enum GlobalProperty{
- /**
- * The help prompt to be spoken if the user needs assistance during a user-initiated interaction.
- */
- HELPPROMPT,
- /**
- * The prompt to be spoken if the user-initiated interaction times out waiting for the user's verbal input.
- */
- TIMEOUTPROMPT,
- VRHELPTITLE,
- VRHELPITEMS;
-
- /**
- * Convert String to GlobalProperty
- * @param value String
- * @return GlobalProperty
- */
- public static GlobalProperty valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HMILevel.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HMILevel.java
deleted file mode 100755
index 5ff093093..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HMILevel.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * Specifies current level of the HMI. An HMI level indicates the degree of user interaction possible through the HMI (e.g. TTS only, display only, VR, etc.). The HMI level varies for an application based on the type of display (i.e. Nav or non-Nav) and the user directing "focus" to other applications (e.g. phone, other mobile applications, etc.)
- * <p>
- * @since SmartDeviceLink 1.0
- */
-public enum HMILevel {
- /**
- * The application has full use of the SMARTDEVICELINK HMI. The app may output via TTS, display, or streaming audio and may gather input via VR, Menu, and button presses
- */
- HMI_FULL("FULL"),
- /**
- * This HMI Level is only defined for a media application using an HMI with an 8 inch touchscreen (Nav) system. The application's {@linkplain com.smartdevicelink.proxy.rpc.Show} text is displayed and it receives button presses from media-oriented buttons (SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN, PRESET_0-9)
- */
- HMI_LIMITED("LIMITED"),
- /**
- * App cannot interact with user via TTS, VR, Display or Button Presses. App can perform the following operations:<br/>
- * <ul>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.AddCommand}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.DeleteCommand}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.AddSubMenu}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.DeleteSubMenu}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.SubscribeButton}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.UnsubscribeButton}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.Show}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.UnregisterAppInterface}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.ResetGlobalProperties}</li>
- * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.SetGlobalProperties}</li>
- * </ul>
- */
- HMI_BACKGROUND("BACKGROUND"),
- /**
- * Application has been discovered by SMARTDEVICELINK, but application cannot send any requests or receive any notifications<br/>
- * An HMILevel of NONE can also mean that the user has exited the application by saying "exit appname" or selecting "exit" from the application's menu. When this happens, the application still has an active interface registration with SMARTDEVICELINK and all SMARTDEVICELINK resources the application has created (e.g. Choice Sets, subscriptions, etc.) still exist. But while the HMILevel is NONE, the application cannot send any messages to SMARTDEVICELINK, except <i>{@linkplain com.smartdevicelink.proxy.rpc.UnregisterAppInterface}</li>
- */
- HMI_NONE("NONE");
-
- String internalName;
-
- private HMILevel(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- /**
- * Returns a HMILevel Status (FULL, LIMITED, BACKGROUND or NONE)
- * @param value a String
- * @return HMILevel -a String value (FULL, LIMITED, BACKGROUND or NONE)
- */
- public static HMILevel valueForString(String value) {
- for (HMILevel anEnum : EnumSet.allOf(HMILevel.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java
deleted file mode 100755
index e9c04b768..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Specifies HMI Zones in the vehicle.
- *
- */
-public enum HmiZoneCapabilities {
- /**
- * Indicates HMI available for front seat passengers.
- *
- * @since SmartDeviceLink 1.0
- */
- FRONT,
- /**
- * Indicates HMI available for rear seat passengers.
- *
- * @since SmartDeviceLink 1.0
- */
- BACK;
-
- public static HmiZoneCapabilities valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java
deleted file mode 100755
index acff462b8..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the ignition switch stability.
- * @since SmartDeviceLink 2.0
- */
-public enum IgnitionStableStatus {
- /**
- * The current ignition switch status is considered not to be stable.
- */
- IGNITION_SWITCH_NOT_STABLE,
- /**
- * The current ignition switch status is considered to be stable.
- */
- IGNITION_SWITCH_STABLE,
- MISSING_FROM_TRANSMITTER;
-
- /**
- * Convert String to IgnitionStableStatus
- * @param value String
- * @return IgnitionStableStatus
- */
- public static IgnitionStableStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java
deleted file mode 100755
index 877b37c98..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the status of ignition..
- * @since SmartDeviceLink 2.0
- */
-public enum IgnitionStatus {
- /**
- * Ignition status currently unknown
- */
- UNKNOWN,
- /**
- * Ignition is off
- */
- OFF,
- /**
- * Ignition is in mode accessory
- */
- ACCESSORY,
- /**
- * Ignition is in mode run
- */
- RUN,
- /**
- * Ignition is in mode run
- */
- START,
- /**
- * Signal is invalid
- */
- INVALID;
-
- /**
- * Convert String to IgnitionStatus
- * @param value String
- * @return IgnitionStatus
- */
- public static IgnitionStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ImageType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ImageType.java
deleted file mode 100755
index c908366cd..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/ImageType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Contains information about the type of image.
- * @since SmartDeviceLink 2.0
- */
-public enum ImageType {
- /**
- * Just the static hex icon value to be used
- */
- STATIC,
- /**
- * Binary image file to be used (identifier to be sent by PutFile)
- */
- DYNAMIC;
-
- /**
- * Convert String to ImageType
- * @param value String
- * @return ImageType
- */
- public static ImageType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java
deleted file mode 100755
index 30eb42605..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * For application-initiated interactions (<i>{@linkplain com.smartdevicelink.proxy.rpc.PerformInteraction}</i>), this specifies
- * the mode by which the user is prompted and by which the user's selection is
- * indicated
- *
- * @since SmartDeviceLink 1.0
- */
-public enum InteractionMode {
- /**
- * This mode causes the interaction to occur only on the display, meaning
- * the choices are presented and selected only via the display. Selections
- * are viewed with the SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN buttons. User's
- * selection is indicated with the OK button
- */
- MANUAL_ONLY,
- /**
- * This mode causes the interaction to occur only through TTS and VR. The
- * user is prompted via TTS to select a choice by saying one of the choice's
- * synonyms
- */
- VR_ONLY,
- /**
- * This mode is a combination of MANUAL_ONLY and VR_ONLY, meaning the user
- * is prompted both visually and audibly. The user can make a selection
- * either using the mode described in MANUAL_ONLY or using the mode
- * described in VR_ONLY. If the user views selections as described in
- * MANUAL_ONLY mode, the interaction becomes strictly, and irreversibly, a
- * MANUAL_ONLY interaction (i.e. the VR session is cancelled, although the
- * interaction itself is still in progress). If the user interacts with the
- * VR session in any way (e.g. speaks a phrase, even if it is not a
- * recognized choice), the interaction becomes strictly, and irreversibly, a
- * VR_ONLY interaction (i.e. the MANUAL_ONLY mode forms of interaction will
- * no longer be honored)
- * <P>
- * The TriggerSource parameter of the
- * {@linkplain com.smartdevicelink.proxy.rpc.PerformInteraction} response will
- * indicate which interaction mode the user finally chose to attempt the
- * selection (even if the interaction did not end with a selection being
- * made)
- */
- BOTH;
-
- /**
- * Returns InteractionMode (MANUAL_ONLY, VR_ONLY or BOTH)
- * @param value a String
- * @return InteractionMode -MANUAL_ONLY, VR_ONLY or BOTH
- */
-
- public static InteractionMode valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Language.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Language.java
deleted file mode 100755
index c5a345c73..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Language.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * Specifies the language to be used for TTS, VR, displayed messages/menus
- * <p>
- *
- * @since SmartDeviceLink 1.0
- *
- */
-public enum Language {
- EN_US("EN-US"),
- ES_MX("ES-MX"),
- FR_CA("FR-CA"),
- DE_DE("DE-DE"),
- ES_ES("ES-ES"),
- EN_GB("EN-GB"),
- RU_RU("RU-RU"),
- TR_TR("TR-TR"),
- PL_PL("PL-PL"),
- FR_FR("FR-FR"),
- IT_IT("IT-IT"),
- SV_SE("SV-SE"),
- PT_PT("PT-PT"),
- NL_NL("NL-NL"),
- EN_AU("EN-AU"),
- ZH_CN("ZH-CN"),
- ZH_TW("ZH-TW"),
- JA_JP("JA-JP"),
- AR_SA("AR-SA"),
- KO_KR("KO-KR"),
- PT_BR("PT-BR"),
- CS_CZ("CS-CZ"),
- DA_DK("DA-DK"),
- NO_NO("NO-NO");
-
- String internalName;
-
- private Language(String internalName) {
- this.internalName = internalName;
- }
- /**
- * Returns a String representing a kind of Language
- */
- public String toString() {
- return this.internalName;
- }
-
- /**
- * Returns a Language's name
- * @param value a String
- * @return Language -EN-US, ES-MX or FR-CA
- */
- public static Language valueForString(String value) {
- for (Language anEnum : EnumSet.allOf(Language.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/LightSwitchStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/LightSwitchStatus.java
deleted file mode 100755
index 53a5cbdf7..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/LightSwitchStatus.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum LightSwitchStatus {
- OFF,
- PARKLAMP,
- HEADLAMP,
- AUTOLAMP;
-
- public static LightSwitchStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MaintenanceModeStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MaintenanceModeStatus.java
deleted file mode 100755
index 3914b3e01..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MaintenanceModeStatus.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum MaintenanceModeStatus {
- NORMAL,
- NEAR,
- ACTIVE,
- FEATURE_NOT_PRESENT;
-
- public static MaintenanceModeStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java
deleted file mode 100755
index 50e8e3de7..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Indicates the format of the time displayed on the connected SMARTDEVICELINK unit.Format
- * description follows the following nomenclature:<br> Sp = Space<br> | = or <br>c =
- * character
- *
- * @since SmartDeviceLink 1.0
- */
-public enum MediaClockFormat {
- /**
- * <p>
- * </p>
- * <ul>
- * <li>maxHours = 19</li>
- * <li>maxMinutes = 59</li>
- * <li>maxSeconds = 59</li>
- * </ul>
- *
- * @since SmartDeviceLink 1.0
- *
- */
- CLOCK1,
- /**
- * <p>
- * </p>
- * <ul>
- * <li>maxHours = 59</li>
- * <li>maxMinutes = 59</li>
- * <li>maxSeconds = 59</li>
- * </ul>
- *
- * @since SmartDeviceLink 1.0
- *
- */
- CLOCK2,
- /**
- * <p>
- * </p>
- * <ul>
- * <li>maxHours = 9</li>
- * <li>maxMinutes = 59</li>
- * <li>maxSeconds = 59</li>
- * </ul>
- *
- * @since SmartDeviceLink 2.0
- *
- */
- CLOCK3,
- /**
- * <p>
- * </p>
- * <ul>
- * <li>5 characters possible</li>
- * <li>Format: 1|sp c :|sp c c</li>
- * <li>1|sp : digit "1" or space</li>
- * <li>c : character out of following character set: sp|0-9|[letters, see
- * TypeII column in XLS.</li>
- * <li>:|sp : colon or space</li>
- * <li>used for Type II headunit</li>
- * </ul>
- *
- * @since SmartDeviceLink 1.0
- */
- CLOCKTEXT1,
- /**
- * <p>
- * </p>
- * <ul>
- * <li>5 characters possible</li>
- * <li>Format: 1|sp c :|sp c c</li>
- * <li>1|sp : digit "1" or space</li>
- * <li>c : character out of following character set: sp|0-9|[letters, see
- * CID column in XLS.</li>
- * <li>:|sp : colon or space</li>
- * <li>used for CID headunit</li>
- * </ul>
- * difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character
- * set
- *
- * @since SmartDeviceLink 1.0
- */
- CLOCKTEXT2,
- /**
- * <p>
- * </p>
- * <ul>
- * <li>6 chars possible</li>
- * <li>Format: 1|sp c c :|sp c c</li>
- * <li>1|sp : digit "1" or space</li>
- * <li>c : character out of following character set: sp|0-9|[letters, see
- * Type 5 column in XLS].</li>
- * <li>:|sp : colon or space</li>
- * <li>used for Type V headunit</li>
- * </ul>
- * difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character
- * set
- *
- *
- * @since SmartDeviceLink 1.0
- */
- CLOCKTEXT3,
- /**
- * <p>
- * </p>
- * <ul>
- * <li>6 chars possible</li>
- * <li>Format: c :|sp c c : c c</li>
- * <li>:|sp : colon or space</li>
- * <li>c : character out of following character set: sp|0-9|[letters]</li>
- * <li>used for MFD3/4/5 headunits</li>
- * </ul>
- *
- *
- * @since SmartDeviceLink 2.0
- */
- CLOCKTEXT4;
-
- public static MediaClockFormat valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MessageType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MessageType.java
deleted file mode 100755
index 15d70dee6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/MessageType.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum MessageType {
- request,
- response,
- notification;
-
- public static MessageType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PRNDL.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
deleted file mode 100755
index 1c256af33..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * The selected gear.
- * @since SmartDeviceLink 2.0
- */
-public enum PRNDL {
- /**
- * Parking
- */
- PARK,
- /**
- * Reverse gear
- */
- REVERSE,
- /**
- * No gear
- */
- NEUTRAL,
- DRIVE,
- /**
- * Drive Sport mode
- */
- SPORT,
- /**
- * 1st gear hold
- */
- LOWGEAR,
- /**
- * First gear
- */
- FIRST,
- /**
- * Second gear
- */
- SECOND,
- /**
- * Third gear
- */
- THIRD,
- /**
- * Fourth gear
- */
- FOURTH,
- /**
- * Fifth gear
- */
- FIFTH,
- /**
- * Sixth gear
- */
- SIXTH;
-
- /**
- * Convert String to PRNDL
- * @param value String
- * @return PRNDL
- */
- public static PRNDL valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PermissionStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PermissionStatus.java
deleted file mode 100755
index a564a9bc3..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PermissionStatus.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Enumeration that describes possible permission states of a policy table entry.
- * @since SmartDeviceLink 2.0
- */
-public enum PermissionStatus {
- ALLOWED,
- DISALLOWED,
- USER_DISALLOWED,
- USER_CONSENT_PENDING;
-
- /**
- * Convert String to PermissionStatus
- * @param value String
- * @return PermissionStatus
- */
- public static PermissionStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
deleted file mode 100755
index b42f3f899..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the current primary audio source of SMARTDEVICELINK (if selected).
- * @since SmartDeviceLink 2.0
- */
-public enum PrimaryAudioSource {
- /**
- * Currently no source selected
- */
- NO_SOURCE_SELECTED,
- /**
- * USB is current source
- */
- USB,
- /**
- * USB2 is current source
- */
- USB2,
- /**
- * Bluetooth Stereo is current source
- */
- BLUETOOTH_STEREO_BTST,
- /**
- * Line in is current source
- */
- LINE_IN,
- /**
- * iPod is current source
- */
- IPOD,
- /**
- * Mobile app is current source
- */
- MOBILE_APP;
-
- /**
- * Convert String to PrimaryAudioSource
- * @param value String
- * @return PrimaryAudioSource
- */
- public static PrimaryAudioSource valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Result.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Result.java
deleted file mode 100755
index f5d4a2853..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/Result.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Defines the possible result codes returned by SMARTDEVICELINK to the application in a
- * Response to a requested operation
- * <p>
- *
- * @since SmartDeviceLink 1.0
- */
-public enum Result {
- /**
- * The request succeeded
- */
- SUCCESS,
- /**
- * The data sent is invalid. For example:<br/>
- * <ul>
- * <li>Invalid Json syntax</li>
- * <li>Parameters out of bounds (number or enum range)</li>
- * <li>Mandatory parameters not provided</li>
- * <li>Parameter provided with wrong type</li>
- * <li>Invalid characters</li>
- * <li>Empty string</li>
- * </ul>
- */
- INVALID_DATA,
- /**
- * The request is not supported by SMARTDEVICELINK
- */
- UNSUPPORTED_REQUEST,
- /**
- * The system could not process the request because the necessary memory
- * couldn't be allocated
- */
- OUT_OF_MEMORY,
- /**
- * There are too many requests pending (means that the response has not been
- * delivered yet). There is a limit of 1000 pending requests at a time
- */
- TOO_MANY_PENDING_REQUESTS,
- /**
- * One of the provided IDs is not valid. For example:<br/>
- * <ul>
- * <li>CorrelationID</li>
- * <li>CommandID</li>
- * <li>MenuID</li>
- * </ul>
- */
- INVALID_ID,
- /**
- * The provided name or synonym is a duplicate of some already-defined name
- * or synonym
- */
- DUPLICATE_NAME,
- /**
- * Specified application name is already associated with an active interface
- * registration. Attempts at doing a second <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.RegisterAppInterface}</i> on a
- * given protocol session will also cause this
- */
- TOO_MANY_APPLICATIONS,
- /**
- * SMARTDEVICELINK does not support the interface version requested by the mobile
- * application
- */
- APPLICATION_REGISTERED_ALREADY,
- /**
- * The requested language is currently not supported. Might be because of a
- * mismatch of the currently active language
- */
- UNSUPPORTED_VERSION,
- /**
- * The request cannot be executed because no application interface has been
- * registered via <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.RegisterAppInterface}</i>
- */
- WRONG_LANGUAGE,
- /**
- * The request cannot be executed because no application interface has been
- * registered via <i>
- * {@linkplain com.smartdevicelink.proxy.rpc.RegisterAppInterface}</i>
- */
- APPLICATION_NOT_REGISTERED,
- /**
- * The data may not be changed, because it is currently in use. For example,
- * when trying to delete a Choice Set that is currently involved in an
- * interaction
- */
- IN_USE,
- /**
- * There is already an existing subscription for this item
- */
- VEHICLE_DATA_NOT_ALLOWED,
- VEHICLE_DATA_NOT_AVAILABLE,
- /**
- * The requested operation was rejected. No attempt was made to perform the
- * operation
- */
- REJECTED,
- /**
- * The requested operation was aborted due to some pre-empting event (e.g.
- * button push, <i>{@linkplain com.smartdevicelink.proxy.rpc.Alert}</i>
- * pre-empts <i>{@linkplain com.smartdevicelink.proxy.rpc.Speak}</i>, etc.)
- */
- ABORTED,
- /**
- * The requested operation was ignored because it was determined to be
- * redundant (e.g. pause media clock when already paused)
- */
- IGNORED,
- /**
- * A button that was requested for subscription is not supported on the
- * currently connected SMARTDEVICELINK platform. See DisplayCapabilities for further
- * information on supported buttons on the currently connected SMARTDEVICELINK platform
- */
- UNSUPPORTED_RESOURCE,
- FILE_NOT_FOUND,
- GENERIC_ERROR,
- DISALLOWED,
- USER_DISALLOWED,
- TIMED_OUT,
- CANCEL_ROUTE,
- TRUNCATED_DATA,
- RETRY,
- WARNINGS;
-
- public static Result valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java
deleted file mode 100755
index 1f30cf09a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * Describes different sampling rates for PerformAudioPassThru
- *
- */
-public enum SamplingRate {
-
- /**
- * Sampling rate of 8 kHz
- *
- * @since SmartDeviceLink 2.0
- */
- _8KHZ("8KHZ"),
- /**
- * Sampling rate of 16 kHz
- *
- * @since SmartDeviceLink 2.0
- */
- _16KHZ("16KHZ"),
- /**
- * Sampling rate of 22 kHz
- *
- * @since SmartDeviceLink 2.0
- */
- _22KHZ("22KHZ"),
- /**
- * Sampling rate of 44 kHz
- *
- * @since SmartDeviceLink 2.0
- */
- _44KHZ("44KHZ");
-
- String internalName;
-
- private SamplingRate(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- public static SamplingRate valueForString(String value) {
- for (SamplingRate anEnum : EnumSet.allOf(SamplingRate.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkConnectionState.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkConnectionState.java
deleted file mode 100755
index b08f4d797..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkConnectionState.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum SmartDeviceLinkConnectionState {
- SMARTDEVICELINK_CONNECTED,
- SMARTDEVICELINK_DISCONNECTED;
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkDisconnectedReason.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkDisconnectedReason.java
deleted file mode 100755
index 631cb0a58..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkDisconnectedReason.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum SmartDeviceLinkDisconnectedReason {
- USER_EXIT,
- IGNITION_OFF,
- BLUETOOTH_OFF,
- USB_DISCONNECTED,
- REQUEST_WHILE_IN_NONE_HMI_LEVEL,
- TOO_MANY_REQUESTS,
- DRIVER_DISTRACTION_VIOLATION,
- LANGUAGE_CHANGE,
- MASTER_RESET,
- FACTORY_DEFAULTS,
- TRANSPORT_ERROR,
- APPLICATION_REQUESTED_DISCONNECT,
- DEFAULT;
-
- public static SmartDeviceLinkDisconnectedReason valueForString(String value) {
- return valueOf(value);
- }
-
- public static SmartDeviceLinkDisconnectedReason convertAppInterfaceUnregisteredReason(AppInterfaceUnregisteredReason reason) {
-
- SmartDeviceLinkDisconnectedReason returnReason = SmartDeviceLinkDisconnectedReason.DEFAULT;
-
- switch(reason) {
- case USER_EXIT:
- returnReason = SmartDeviceLinkDisconnectedReason.USER_EXIT;
- case IGNITION_OFF:
- returnReason = SmartDeviceLinkDisconnectedReason.IGNITION_OFF;
- case BLUETOOTH_OFF:
- returnReason = SmartDeviceLinkDisconnectedReason.BLUETOOTH_OFF;
- case USB_DISCONNECTED:
- returnReason = SmartDeviceLinkDisconnectedReason.USB_DISCONNECTED;
- case REQUEST_WHILE_IN_NONE_HMI_LEVEL:
- returnReason = SmartDeviceLinkDisconnectedReason.REQUEST_WHILE_IN_NONE_HMI_LEVEL;
- case TOO_MANY_REQUESTS:
- returnReason = SmartDeviceLinkDisconnectedReason.TOO_MANY_REQUESTS;
- case DRIVER_DISTRACTION_VIOLATION:
- returnReason = SmartDeviceLinkDisconnectedReason.DRIVER_DISTRACTION_VIOLATION;
- case LANGUAGE_CHANGE:
- returnReason = SmartDeviceLinkDisconnectedReason.LANGUAGE_CHANGE;
- case MASTER_RESET:
- returnReason = SmartDeviceLinkDisconnectedReason.MASTER_RESET;
- case FACTORY_DEFAULTS:
- returnReason = SmartDeviceLinkDisconnectedReason.FACTORY_DEFAULTS;
- }
-
- return returnReason;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkInterfaceAvailability.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkInterfaceAvailability.java
deleted file mode 100755
index 0001365fe..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SmartDeviceLinkInterfaceAvailability.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum SmartDeviceLinkInterfaceAvailability {
- SMARTDEVICELINK_INTERFACE_AVAILABLE,
- SMARTDEVICELINK_INTERFACE_UNAVAILABLE;
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java
deleted file mode 100755
index 74d66ccd6..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-public enum SoftButtonType {
- SBT_TEXT("TEXT"),
- SBT_IMAGE("IMAGE"),
- SBT_BOTH("BOTH");
-
- String internalName;
-
- private SoftButtonType(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- public static SoftButtonType valueForString(String value) {
- for (SoftButtonType anEnum : EnumSet.allOf(SoftButtonType.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java
deleted file mode 100755
index f5acc88ce..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-/**
- * Contains information about TTS capabilities on the SMARTDEVICELINK platform.
- *
- * @since SmartDeviceLink 1.0
- */
-public enum SpeechCapabilities {
- /**
- * The SMARTDEVICELINK platform can speak text phrases.
- *
- * @since SmartDeviceLink 1.0
- */
- TEXT,
- SAPI_PHONEMES,
- LHPLUS_PHONEMES,
- PRE_RECORDED,
- SILENCE;
-
- public static SpeechCapabilities valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemAction.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemAction.java
deleted file mode 100755
index abda20e73..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemAction.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum SystemAction {
- DEFAULT_ACTION,
- STEAL_FOCUS,
- KEEP_CONTEXT;
-
- public static SystemAction valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemContext.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemContext.java
deleted file mode 100755
index 800c0b67e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/SystemContext.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * Indicates whether or not a user-initiated interaction is in progress, and if
- * so, in what mode (i.e. MENU or VR).
- *
- * @since SmartDeviceLink 1.0
- */
-public enum SystemContext {
- /**
- * No user interaction (user-initiated or app-initiated) is in progress.
- *
- * @since SmartDeviceLink 1.0
- */
- SYSCTXT_MAIN("MAIN"),
- /**
- * VR-oriented, user-initiated or app-initiated interaction is in-progress.
- *
- * @since SmartDeviceLink 1.0
- */
- SYSCTXT_VRSESSION("VRSESSION"),
- /**
- * Menu-oriented, user-initiated or app-initiated interaction is
- * in-progress.
- *
- * @since SmartDeviceLink 1.0
- */
- SYSCTXT_MENU("MENU"),
- /**
- * The app's display HMI is currently being obscured by either a system or
- * other app's overlay.
- *
- * @since SmartDeviceLink 2.0
- */
- SYSCTXT_HMI_OBSCURED("HMI_OBSCURED"),
- /**
- * Broadcast only to whichever app has an alert currently being displayed.
- *
- * @since SmartDeviceLink 2.0
- */
- SYSCTXT_ALERT("ALERT");
-
- String internalName;
-
- private SystemContext(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- public static SystemContext valueForString(String value) {
- for (SystemContext anEnum : EnumSet.allOf(SystemContext.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TBTState.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TBTState.java
deleted file mode 100755
index a3d070bff..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TBTState.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Describes possible states of turn-by-turn module.
- * @since SmartDeviceLink 1.0
- */
-public enum TBTState {
- /**
- * Indicates that driver requested a route update.
- */
- ROUTE_UPDATE_REQUEST,
- ROUTE_ACCEPTED,
- ROUTE_REFUSED,
- ROUTE_CANCELLED,
- ETA_REQUEST,
- NEXT_TURN_REQUEST,
- ROUTE_STATUS_REQUEST,
- ROUTE_SUMMARY_REQUEST,
- TRIP_STATUS_REQUEST,
- ROUTE_UPDATE_REQUEST_TIMEOUT;
-
- /**
- * Convert String to TBTState
- * @param value String
- * @return TBTState
- */
- public static TBTState valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java
deleted file mode 100755
index 9c301f72b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * The list of possible alignments of text in a field.
- * @since SmartDeviceLink 1.0
- */
-public enum TextAlignment {
- /**
- * Text aligned left.
- */
- LEFT_ALIGNED,
- /**
- * Text aligned right.
- */
- RIGHT_ALIGNED,
- /**
- * Text aligned centered.
- */
- CENTERED;
-
- /**
- * Convert String to TextAlignment
- * @param value String
- * @return TextAlignment
- */
- public static TextAlignment valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
deleted file mode 100755
index 98a62e5cc..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Names of the text fields that can appear on a SMARTDEVICELINK display.
- * @since SmartDeviceLink 1.0
- */
-public enum TextFieldName {
- /**
- * The first line of the first set of main fields of the persistent display. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- */
- mainField1,
- /**
- * The second line of the first set of main fields of the persistent display. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- */
- mainField2,
- /**
- * The first line of the second set of main fields of the persistent display. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- * @since SmartDeviceLink 2.0
- */
- mainField3,
- /**
- * The second line of the second set of main fields of the persistent display. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- * @since SmartDeviceLink 2.0
- */
- mainField4,
- /**
- * The status bar on the NGN display. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- */
- statusBar,
- /**
- * Text value for MediaClock field. Must be properly formatted according to MediaClockFormat. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- * <p>This field is commonly used to show elapsed or remaining time in an audio track or audio capture
- */
- mediaClock,
- /**
- * The track field of NGN type ACMs. This field is only available for media applications on a NGN display. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Show}.
- * <p>This field is commonly used to show the current track number
- */
- mediaTrack,
- /**
- * The first line of the alert text field. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Alert}.
- */
- alertText1,
- /**
- * The second line of the alert text field. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Alert}.
- */
- alertText2,
- /**
- * The third line of the alert text field. Applies to {@linkplain com.smartdevicelink.proxy.rpc.Alert}.
- * @since SmartDeviceLink 2.0
- */
- alertText3,
- /**
- * Long form body of text that can include newlines and tabs. Applies to ScrollableMessage TBD
- * @since SmartDeviceLink 2.0
- */
- scrollableMessageBody,
- /**
- * First line suggestion for a user response (in the case of VR enabled interaction).
- * @since SmartDeviceLink 2.0
- */
- initialInteractionText,
- /**
- * First line of navigation text.
- * @since SmartDeviceLink 2.0
- */
- navigationText1,
- /**
- * Second line of navigation text.
- * @since SmartDeviceLink 2.0
- */
- navigationText2,
- /**
- * Estimated Time of Arrival time for navigation.
- * @since SmartDeviceLink 2.0
- */
- ETA,
- /**
- * Total distance to destination for navigation.
- * @since SmartDeviceLink 2.0
- */
- totalDistance,
- /**
- * First line of text for audio pass thru.
- * @since SmartDeviceLink 2.0
- */
- audioPassThruDisplayText1,
- /**
- * Second line of text for audio pass thru.
- * @since SmartDeviceLink 2.0
- */
- audioPassThruDisplayText2,
- /**
- * Header text for slider.
- * @since SmartDeviceLink 2.0
- */
- sliderHeader,
- /**
- * Footer text for slider
- * @since SmartDeviceLink 2.0
- */
- sliderFooter;
-
- /**
- * Convert String to TextFieldName
- * @param value String
- * @return TextFieldName
- */
- public static TextFieldName valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TirePressureTellTale.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TirePressureTellTale.java
deleted file mode 100755
index 3ab13f55f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TirePressureTellTale.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum TirePressureTellTale {
- OFF,
- ON,
- FLASH;
-
- public static TirePressureTellTale valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java
deleted file mode 100755
index 1cbebcd22..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-import java.util.EnumSet;
-
-/**
- * Indicates whether choice/command was selected via VR or via a menu selection
- * (using SEEKRIGHT/SEEKLEFT, TUNEUP, TUNEDOWN and OK buttons)
- *
- * @since SmartDeviceLink 1.0
- *
- */
-public enum TriggerSource {
- /**
- * Selection made via menu (i.e. using SEEKRIGHT/SEEKLEFT, TUNEUP, TUNEDOWN
- * and OK buttons)
- */
- TS_MENU("MENU"),
- /**
- * Selection made via VR session
- */
- TS_VR("VR");
-
- String internalName;
-
- private TriggerSource(String internalName) {
- this.internalName = internalName;
- }
-
- public String toString() {
- return this.internalName;
- }
-
- public static TriggerSource valueForString(String value) {
- for (TriggerSource anEnum : EnumSet.allOf(TriggerSource.class)) {
- if (anEnum.toString().equals(value)) {
- return anEnum;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java
deleted file mode 100755
index e4d001c62..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Specifies what function should be performed on the media clock/counter
- * <p>
- *
- * @since SmartDeviceLink 1.0
- */
-public enum UpdateMode {
- /**
- * Starts the media clock timer counting upward, in increments of 1 second
- */
- COUNTUP,
- /**
- * Starts the media clock timer counting downward, in increments of 1 second
- */
- COUNTDOWN,
- /**
- * Pauses the media clock timer
- */
- PAUSE,
- /**
- * Resumes the media clock timer. The timer resumes counting in whatever
- * mode was in effect before pausing (i.e. COUNTUP or COUNTDOWN)
- */
- RESUME,
- CLEAR;
-
-
- /**
- * Returns an UpdateMode value (COUNTUP, COUNTDOWN, PAUSE or RESUME)
- * @param value a String
- * @return UpdateMode -COUNTUP, COUNTDOWN, PAUSE or RESUME
- */
- public static UpdateMode valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataActiveStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataActiveStatus.java
deleted file mode 100755
index 922d5c4ba..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataActiveStatus.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum VehicleDataActiveStatus {
- INACTIVE_NOT_CONFIRMED,
- INACTIVE_CONFIRMED,
- ACTIVE_NOT_CONFIRMED,
- ACTIVE_CONFIRMED,
- FAULT;
-
- public static VehicleDataActiveStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java
deleted file mode 100755
index 25bac590c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the status of a vehicle data event; e.g. a seat belt event status.
- * @since SmartDeviceLink 2.0
- */
-public enum VehicleDataEventStatus {
- /**
- * No event available
- */
- NO_EVENT,
- NO,
- YES,
- /**
- * Vehicle data event is not support
- */
- NOT_SUPPORTED,
- FAULT;
-
- /**
- * Convert String to VehicleDataEventStatus
- * @param value String
- * @return VehicleDataEventStatus
- */
- public static VehicleDataEventStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java
deleted file mode 100755
index 42a5d9fa4..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the status of a vehicle data notification.
- * @since SmartDeviceLink 2.0
- */
-public enum VehicleDataNotificationStatus {
- NOT_SUPPORTED,
- NORMAL,
- ACTIVE;
-
- /**
- * Convert String to VehicleDataNotificationStatus
- * @param value String
- * @return VehicleDataNotificationStatus
- */
- public static VehicleDataNotificationStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
deleted file mode 100755
index ece04ea7d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum VehicleDataResultCode {
- SUCCESS,
- DISALLOWED,
- USER_DISALLOWED,
- INVALID_ID,
- VEHICLE_DATA_NOT_AVAILABLE,
- DATA_ALREADY_SUBSCRIBED,
- DATA_NOT_SUBSCRIBED,
- IGNORED;
-
- public static VehicleDataResultCode valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java
deleted file mode 100755
index 621b0ef57..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the status of a binary vehicle data item.
- * @since SmartDeviceLink 2.0
- *
- */
-public enum VehicleDataStatus {
- /**
- * No data available
- */
- NO_DATA_EXISTS,
- OFF,
- ON;
-
- /**
- * Convert String to VehicleDataStatus
- * @param value String
- * @return VehicleDataStatus
- */
- public static VehicleDataStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
deleted file mode 100755
index d15480773..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Defines the vehicle data types that can be published and subscribed to
- *
- */
-public enum VehicleDataType {
- VEHICLEDATA_SPEED,
- VEHICLEDATA_RPM,
- VEHICLEDATA_FUELLEVEL,
- VEHICLEDATA_FUELLEVEL_STATE,
- VEHICLEDATA_FUELCONSUMPTION,
- VEHICLEDATA_EXTERNTEMP,
- VEHICLEDATA_VIN,
- VEHICLEDATA_PRNDL,
- VEHICLEDATA_TIREPRESSURE,
- VEHICLEDATA_ODOMETER,
- VEHICLEDATA_BELTSTATUS,
- VEHICLEDATA_BODYINFO,
- VEHICLEDATA_DEVICESTATUS,
- VEHICLEDATA_BRAKING;
-
- public static VehicleDataType valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
deleted file mode 100755
index 4db7bc31e..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * The VR capabilities of the connected SMARTDEVICELINK platform.
- *
- */
-public enum VrCapabilities {
- /**
- * The SMARTDEVICELINK platform is capable of recognizing spoken text in the current
- * language.
- *
- * @since SmartDeviceLink 1.0
- */
- Text;
-
- public static VrCapabilities valueForString(String value) {
- if (value.toUpperCase().equals(VrCapabilities.Text.toString().toUpperCase()))
- {
- return VrCapabilities.Text;
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java
deleted file mode 100755
index f2170c0b4..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-/**
- * Reflects the status of a cluster instrument warning light.
- * @since SmartDeviceLink 2.0
- */
-public enum WarningLightStatus {
- /**
- * Warninglight Off
- */
- OFF,
- /**
- * Warninglight On
- */
- ON,
- /**
- * Warninglight is flashing
- */
- FLASH;
-
- /**
- * Convert String to WarningLightStatus
- * @param value String
- * @return WarningLightStatus
- */
- public static WarningLightStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java
deleted file mode 100755
index c3906b4f9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.smartdevicelink.proxy.rpc.enums;
-
-public enum WiperStatus {
- OFF,
- AUTO_OFF,
- OFF_MOVING,
- MAN_INT_OFF,
- MAN_INT_ON,
- MAN_LOW,
- MAN_HIGH,
- MAN_FLICK,
- WASH,
- AUTO_LOW,
- AUTO_HIGH,
- COURTESYWIPE,
- AUTO_ADJUST,
- STALLED,
- NO_DATA_EXISTS;
-
- public static WiperStatus valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/smartdevicelinkMsgVersion.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/smartdevicelinkMsgVersion.java
deleted file mode 100755
index 2a4a6d227..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/smartdevicelinkMsgVersion.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-
-/**
- * Specifies the version number of the SMARTDEVICELINK V4 interface. This is used by both the application and SMARTDEVICELINK to declare what interface version each is using.
- * <p><b> Parameter List
- * <table border="1" rules="all">
- * <tr>
- * <th>Name</th>
- * <th>Type</th>
- * <th>Description</th>
- * <th>SmartDeviceLink Ver. Available</th>
- * </tr>
- * <tr>
- * <td>majorVersion</td>
- * <td>Int16</td>
- * <td>
- * <ul>
- * <li>minvalue="1"</li>
- * <li>maxvalue="10"</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * <tr>
- * <td>minorVersion</td>
- * <td>Int16</td>
- * <td>
- * <ul>
- * <li>minvalue="0"</li>
- * <li>maxvalue="1000"</li>
- * </ul>
- * </td>
- * <td>SmartDeviceLink 1.0</td>
- * </tr>
- * </table>
- * @since SmartDeviceLink 1.0
- */
-public class smartdevicelinkMsgVersion extends RPCStruct {
-
- /**
- * Constructs a newly allocated smartdevicelinkMsgVersion object
- */
- public smartdevicelinkMsgVersion() { }
- /**
- * Constructs a newly allocated smartdevicelinkMsgVersion object indicated by the Hashtable parameter
- * @param hash The Hashtable to use
- */
- public smartdevicelinkMsgVersion(Hashtable hash) {
- super(hash);
- }
- /**
- * Get major version
- * <ul>
- * <li>minvalue="1"</li>
- * <li>maxvalue="10"</li>
- * </ul>
- * @return the major version
- */
- public Integer getMajorVersion() {
- return (Integer) store.get( Names.majorVersion );
- }
- /**
- * Set major version
- * <ul>
- * <li>minvalue="1"</li>
- * <li>maxvalue="10"</li>
- * </ul>
- * @param majorVersion minvalue="1" and maxvalue="10"
- */
- public void setMajorVersion( Integer majorVersion ) {
- if (majorVersion != null) {
- store.put(Names.majorVersion, majorVersion );
- }
- }
- /**
- * Get minor version
- * <ul>
- * <li>minvalue="0"</li>
- * <li>maxvalue="1000"</li>
- * </ul>
- * @return the minor version
- */
- public Integer getMinorVersion() {
- return (Integer) store.get( Names.minorVersion );
- }
- /**
- * Set minor version
- * <ul>
- * <li>minvalue="0"</li>
- * <li>maxvalue="1000"</li>
- * </ul>
- * @param minorVersion min: 0; max: 1000
- */
- public void setMinorVersion( Integer minorVersion ) {
- if (minorVersion != null) {
- store.put(Names.minorVersion, minorVersion );
- }
- }
-} \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/IsmartDeviceLinkConnectionListener.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/IsmartDeviceLinkConnectionListener.java
deleted file mode 100755
index c7b52e0f1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/IsmartDeviceLinkConnectionListener.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.smartdevicelink.smartDeviceLinkConnection;
-
-import com.smartdevicelink.protocol.ProtocolMessage;
-import com.smartdevicelink.protocol.enums.SessionType;
-
-public interface IsmartDeviceLinkConnectionListener {
- public void onTransportDisconnected(String info);
-
- public void onTransportError(String info, Exception e);
-
- public void onProtocolMessageReceived(ProtocolMessage msg);
-
- public void onProtocolSessionStarted(SessionType sessionType,
- byte sessionID, byte version, String correlationID);
-
- public void onProtocolSessionEnded(SessionType sessionType,
- byte sessionID, String correlationID);
-
- public void onProtocolError(String info, Exception e);
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/smartDeviceLinkConnection.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/smartDeviceLinkConnection.java
deleted file mode 100755
index 90138fa32..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/smartDeviceLinkConnection/smartDeviceLinkConnection.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package com.smartdevicelink.smartDeviceLinkConnection;
-
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.protocol.AbstractProtocol;
-import com.smartdevicelink.protocol.IProtocolListener;
-import com.smartdevicelink.protocol.ProtocolMessage;
-import com.smartdevicelink.protocol.SmartDeviceLinkProtocol;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.transport.*;
-
-public class smartDeviceLinkConnection implements IProtocolListener, ITransportListener {
-
- SmartDeviceLinkTransport _transport = null;
- AbstractProtocol _protocol = null;
- IsmartDeviceLinkConnectionListener _connectionListener = null;
-
- // Thread safety locks
- Object TRANSPORT_REFERENCE_LOCK = new Object();
- Object PROTOCOL_REFERENCE_LOCK = new Object();
-
- /**
- * Constructor.
- *
- * @param listener SmartDeviceLink connection listener.
- * @param transportConfig Transport configuration for this connection.
- */
- public smartDeviceLinkConnection(IsmartDeviceLinkConnectionListener listener, BaseTransportConfig transportConfig) {
- _connectionListener = listener;
-
- // Initialize the transport
- synchronized(TRANSPORT_REFERENCE_LOCK) {
- // Ensure transport is null
- if (_transport != null) {
- if (_transport.getIsConnected()) {
- _transport.disconnect();
- }
- _transport = null;
- }
-
- if (transportConfig.getTransportType() == TransportType.BLUETOOTH)
- {
- _transport = new BTTransport(this);
- }
- else if (transportConfig.getTransportType() == TransportType.TCP)
- {
- _transport = new TCPTransport((TCPTransportConfig) transportConfig, this);
- }
- }
-
- // Initialize the protocol
- synchronized(PROTOCOL_REFERENCE_LOCK) {
- // Ensure protocol is null
- if (_protocol != null) {
- _protocol = null;
- }
-
- _protocol = new SmartDeviceLinkProtocol(this);
- }
- }
-
- public AbstractProtocol getSmartDeviceLinkProtocolProtocol(){
- return _protocol;
- }
-
- public void closeConnection(byte rpcSessionID) {
- synchronized(PROTOCOL_REFERENCE_LOCK) {
- if (_protocol != null) {
- // If transport is still connected, sent EndProtocolSessionMessage
- if (_transport != null && _transport.getIsConnected()) {
- _protocol.EndProtocolSession(SessionType.RPC, rpcSessionID);
- }
- _protocol = null;
- } // end-if
- }
-
- synchronized (TRANSPORT_REFERENCE_LOCK) {
- if (_transport != null) {
- _transport.disconnect();
- }
- _transport = null;
- }
- }
-
- public void startTransport() throws SmartDeviceLinkException {
- _transport.openConnection();
- }
-
- public Boolean getIsConnected() {
-
- // If _transport is null, then it can't be connected
- if (_transport == null) {
- return false;
- }
-
- return _transport.getIsConnected();
- }
-
- public void sendMessage(ProtocolMessage msg) {
- _protocol.SendMessage(msg);
- }
-
- @Override
- public void onTransportBytesReceived(byte[] receivedBytes,
- int receivedBytesLength) {
- // Send bytes to protocol to be interpreted
- synchronized(PROTOCOL_REFERENCE_LOCK) {
- if (_protocol != null) {
- _protocol.HandleReceivedBytes(receivedBytes, receivedBytesLength);
- }
- }
- }
-
- @Override
- public void onTransportConnected() {
- synchronized(PROTOCOL_REFERENCE_LOCK){
- if(_protocol != null){
- _protocol.StartProtocolSession(SessionType.RPC);
- }
- }
- }
-
- @Override
- public void onTransportDisconnected(String info) {
- // Pass directly to connection listener
- _connectionListener.onTransportDisconnected(info);
- }
-
- @Override
- public void onTransportError(String info, Exception e) {
- // Pass directly to connection listener
- _connectionListener.onTransportError(info, e);
- }
-
- @Override
- public void onProtocolMessageBytesToSend(byte[] msgBytes, int offset,
- int length) {
- // Protocol has packaged bytes to send, pass to transport for transmission
- synchronized(TRANSPORT_REFERENCE_LOCK) {
- if (_transport != null) {
- _transport.sendBytes(msgBytes, offset, length);
- }
- }
- }
-
- @Override
- public void onProtocolMessageReceived(ProtocolMessage msg) {
- _connectionListener.onProtocolMessageReceived(msg);
- }
-
- @Override
- public void onProtocolSessionStarted(SessionType sessionType,
- byte sessionID, byte version, String correlationID) {
- _connectionListener.onProtocolSessionStarted(sessionType, sessionID, version, correlationID);
- }
-
- @Override
- public void onProtocolSessionEnded(SessionType sessionType, byte sessionID,
- String correlationID) {
- _connectionListener.onProtocolSessionEnded(sessionType, sessionID, correlationID);
- }
-
- @Override
- public void onProtocolError(String info, Exception e) {
- _connectionListener.onProtocolError(info, e);
- }
-
- /**
- * Gets type of transport currently used by this connection.
- *
- * @return One of TransportType enumeration values.
- *
- * @see TransportType
- */
- public TransportType getCurrentTransportType() {
- return _transport.getTransportType();
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/DiagLevel.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/DiagLevel.java
deleted file mode 100755
index b77b34486..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/DiagLevel.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.smartdevicelink.trace;
-
-import com.smartdevicelink.trace.enums.DetailLevel;
-import com.smartdevicelink.trace.enums.Mod;
-
-
-public class DiagLevel {
-
- static private DetailLevel[] levels;
-
- static { // this is a static c-tor!!
- levels = new DetailLevel[Mod.values().length];
- setAllLevels(DetailLevel.OFF);
- }
-
- public static void setAllLevels(DetailLevel thisDetail) {
- for (int i=0; i < levels.length; i++) {
- levels[i] = thisDetail; //
- }
- }
-
- public static void setLevel(Mod thisMod, DetailLevel thisDetail) {
- levels[thisMod.ordinal()] = thisDetail;
- }
-
- public static DetailLevel getLevel(Mod thisMod) {
- return levels[thisMod.ordinal()];
- }
-
- public static boolean isValidDetailLevel(String dtString) {
- // Assume false
- Boolean isValid = false;
-
- if (dtString.equalsIgnoreCase("verbose"))
- isValid = true;
- else if (dtString.equalsIgnoreCase("terse"))
- isValid = true;
- else if (dtString.equalsIgnoreCase("off"))
- isValid = true;
-
- return isValid;
- }
-
- public static DetailLevel toDetailLevel(String dtString) {
- DetailLevel dt = DetailLevel.OFF;
- if (dtString.equalsIgnoreCase("verbose"))
- dt = DetailLevel.VERBOSE;
- else if (dtString.equalsIgnoreCase("terse"))
- dt = DetailLevel.TERSE;
- return dt;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/ISTListener.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/ISTListener.java
deleted file mode 100755
index 3af7d5020..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/ISTListener.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.smartdevicelink.trace;
-
-public interface ISTListener {
- void logXmlMsg(String msg, String token);
-} // end-interface \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/Mime.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/Mime.java
deleted file mode 100755
index 059d64297..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/Mime.java
+++ /dev/null
@@ -1,185 +0,0 @@
-package com.smartdevicelink.trace;
-
-// Borrowed from Dave Boll's infamous SmartDeviceLinkLinkRelay.java
-
-public class Mime {
-
- private static String m_base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
- public static String base64Encode(String str) {
- String b64String = "";
- try {
- byte[] strBytes = str.getBytes("US-ASCII");
- b64String = base64Encode(strBytes);
- } catch (Exception ex) {
- // Don't care?
- } // end-catch
- return b64String;
- } // end-method
-
- public static String base64Encode(byte bytesToEncode[]) {
- return base64Encode(bytesToEncode, 0, bytesToEncode.length);
- } // end-method
-
- public static String base64Encode(byte bytesToEncode[], int offset, int length) {
- StringBuilder sb = new StringBuilder();
-
- int idxin = 0;
- int b64idx = 0;
-
- for (idxin=offset;idxin < offset + length;idxin++) {
- switch ((idxin-offset) % 3) {
- case 0:
- b64idx = (bytesToEncode[idxin] >> 2) & 0x3f;
- break;
- case 1:
- b64idx = (bytesToEncode[idxin] >> 4) & 0x0f;
- b64idx |= ((bytesToEncode[idxin-1] << 4)& 0x30);
- break;
- case 2:
- b64idx = (bytesToEncode[idxin] >> 6) & 0x03;
- b64idx |= ((bytesToEncode[idxin-1] << 2)& 0x3c);
- sb.append(m_base64Chars.charAt(b64idx));
- b64idx = bytesToEncode[idxin] & 0x3f;
- break;
- } // end-switch
- sb.append(m_base64Chars.charAt(b64idx));
- } // end-for
-
- switch ((idxin-offset) % 3) {
- case 0:
- break;
- case 1:
- b64idx = (bytesToEncode[idxin-1] << 4) & 0x30;
- sb.append(m_base64Chars.charAt(b64idx));
- sb.append("==");
- break;
- case 2:
- b64idx = ((bytesToEncode[idxin-1] << 2)& 0x3c);
- sb.append(m_base64Chars.charAt(b64idx));
- sb.append('=');
- break;
- } // end-switch
-
- return sb.toString();
-
- } // end-method
-
- private byte[] base64Decode(String base64String) {
- byte[] outBytes = null;
- byte[] base64ASCIIString = null;
- final String ASCII_Encoding = "US-ASCII";
-
- // Convert b64 string to raw bytes
- try {
- base64ASCIIString = base64String.getBytes(ASCII_Encoding);
- } catch (Exception ex) {
- return null;
- }
-
- if (!m_decodeInitComplete) {
- m_decodeInitComplete = true;
- initForDecode();
- } // end-if
-
- int numInChars = base64ASCIIString.length;
-
- if ((numInChars % 4) > 0) {
- return null;
- } // end-if
-
- int numOutBytes = base64ASCIIString.length / 4;
- numOutBytes *= 3;
- int eqpos = base64String.indexOf("=");
- if (eqpos >= 0) {
- numOutBytes--;
- if (base64String.substring(eqpos).indexOf("==") >= 0) {
- numOutBytes--;
- } // end-if
- } // end-if
- outBytes = new byte[numOutBytes];
-
- byte b64idxbits = 0x00;
- int iidx = 0, oidx = 0;
- byte writeByte = 0x00;
- byte b64ASCIIChar = 0x00;
- for (iidx=0, oidx=0;iidx < numInChars;iidx++) {
- b64ASCIIChar = base64ASCIIString[iidx];
- if (b64ASCIIChar == 0x3d /*'='*/) {
- return outBytes;
- } // end-if
-
- if (!isb64char(b64ASCIIChar)) {
- return null;
- } // end-if
-
- switch (iidx % 4) {
- case 0:
- break;
- case 1:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)((b64idxbits << 2) | ((b64decode[b64ASCIIChar] >> 4) & 0x03));
- outBytes[oidx++] = writeByte;
- break;
- case 2:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)(((b64idxbits << 4) & 0xf0) | ((b64decode[b64ASCIIChar] >> 2) & 0x0f));
- outBytes[oidx++] = writeByte;
- break;
- case 3:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)(((b64idxbits << 6) & 0xc0) | ((b64decode[b64ASCIIChar]) & 0x3f));
- outBytes[oidx++] = writeByte;
- break;
- } // end-switch
- } // end-for
-
- return outBytes;
-
- } // end-method
-
-
- private static byte[] b64decode = new byte[256];
- // A-Z is 0x41-0x5a
- // a-z is 0x61-0x7a
- // 0-9 is 0x30-0x39
- // + is 0x2b
- // / is 0x2f
-
- private static boolean m_decodeInitComplete = false;
-
- private void initForDecode() {
- int aidx = 0;
- int lidx = 0;
- // Set A-Z
- for (aidx=0x41, lidx=0;aidx <= 0x5a;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set a-z
- for (aidx=0x61;aidx <= 0x7a;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set 0-9
- for (aidx=0x30;aidx <= 0x39;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set '+'
- b64decode[0x2b] = (byte)lidx++;
- // Set '/'
- b64decode[0x2f] = (byte)lidx++;
- } // end-method
-
- private boolean isb64char(byte b) {
- // A-Z is 0x41-0x5a
- // a-z is 0x61-0x7a
- // 0-9 is 0x30-0x39
- // + is 0x2b
- // / is 0x2f
- return ( (b >= 0x41 && b <= 0x5a)
- || (b >= 0x61 && b <= 0x7a)
- || (b >= 0x30 && b <= 0x39)
- || (b == 0x2b)
- || (b == 0x2f)
- );
- } // end-method
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/OpenRPCMessage.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/OpenRPCMessage.java
deleted file mode 100755
index 507a136a9..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/OpenRPCMessage.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.smartdevicelink.trace;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCStruct;
-
-class OpenRPCMessage extends RPCMessage {
- private OpenRPCMessage() {super("");}
- public OpenRPCMessage(RPCMessage rpcm) {
- super(rpcm);
- } // end-method
-
- public OpenRPCMessage(RPCStruct rpcs) {
- super(rpcs);
- } // end-method
-
- public String msgDump() {
- StringBuilder pd = new StringBuilder();
-
- pd.append(this.getFunctionName() + " " + this.getMessageType());
-
- msgDump(pd);
-
- return pd.toString();
- } // end-method
-
- public void msgDump(StringBuilder pd) {
- pd.append("[");
-
- dumpParams(parameters, pd);
-
- pd.append("]");
-
- return;
- } // end-method
-
- private void dumpParams(Hashtable ht, StringBuilder pd) {
- Iterator keySet = ht.keySet().iterator();
- Object obj = null;
- String key = "";
- boolean isFirstParam = true;
-
- while (keySet.hasNext()) {
- key = (String)keySet.next();
- obj = ht.get(key);
- if (isFirstParam) {
- isFirstParam = false;
- } else {
- pd.append(", ");
- } // end-if
-
- dumpParamNode(key, obj, pd);
-
- } // end-while
- } // end-method
-
- private void dumpParamNode(String key, Object obj, StringBuilder pd) {
-
- if (obj instanceof Hashtable) {
- pd.append("[");
- dumpParams((Hashtable)obj, pd);
- pd.append("]");
- } else if (obj instanceof RPCStruct) {
- pd.append("[");
- OpenRPCMessage orpcm = new OpenRPCMessage((RPCStruct)obj);
- orpcm.msgDump(pd);
- pd.append("]");
- } else if (obj instanceof Vector) {
- pd.append("[");
- Vector vec = (Vector)obj;
- for (int idx=0;idx < vec.size();idx++) {
- if (idx > 0) {
- pd.append(", ");
- }
- dumpParamNode(key, vec.elementAt(idx), pd);
- } // end-for
- pd.append("]");
- } else {
- pd.append("\"" + key + "\" = \"" + obj.toString() + "\"");
- }
- } // end-method
-} // end-class OpenRPCMessage
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/SmartDeviceLinkTrace.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/SmartDeviceLinkTrace.java
deleted file mode 100755
index f9308a807..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/SmartDeviceLinkTrace.java
+++ /dev/null
@@ -1,469 +0,0 @@
-package com.smartdevicelink.trace;
-
-import java.sql.Timestamp;
-
-import android.bluetooth.BluetoothDevice;
-import android.os.Build;
-import android.os.Debug;
-import android.os.Process;
-
-import com.smartdevicelink.protocol.ProtocolFrameHeader;
-import com.smartdevicelink.protocol.enums.FrameDataControlFrameType;
-import com.smartdevicelink.protocol.enums.FrameType;
-import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.trace.enums.DetailLevel;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.trace.enums.Mod;
-import com.smartdevicelink.transport.SiphonServer;
-import com.smartdevicelink.util.BitConverter;
-import com.smartdevicelink.util.DebugTool;
-import com.smartdevicelink.util.NativeLogTool;
-
-/* This class handles the global TraceSettings as requested by the users either through the combination of the following
- 1. System defaults
- 2. Application XML config
- 3. Programmatic requests from application itself
-
- It is manifested in the <applink>...</applink> tags
- */
-
-public class SmartDeviceLinkTrace {
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- static boolean canWriteLogs = false;
-
- public static final String SYSTEM_LOG_TAG = "SmartDeviceLinkTrace";
-
- private static long baseTics = java.lang.System.currentTimeMillis();
- private final static String KeyStr = SMARTDEVICELINK_LIB_TRACE_KEY;
- private static boolean acceptAPITraceAdjustments = true;
-
- protected static ISTListener m_appTraceListener = null;
-
- ///
- /// The PUBLIC interface to SmartDeviceLinkTrace starts here
- ///
-
-
- public static void setAcceptAPITraceAdjustments(Boolean APITraceAdjustmentsAccepted) {
- if (APITraceAdjustmentsAccepted != null) {
- acceptAPITraceAdjustments = APITraceAdjustmentsAccepted;
- }
- }
-
- public static boolean getAcceptAPITraceAdjustments() {
- return acceptAPITraceAdjustments;
- }
-
- public static void setAppTraceListener(ISTListener listener) {
- m_appTraceListener = listener;
- } // end-method
-
- public static void setTracingEnable(Boolean enable) {
- if (enable != null) {
- canWriteLogs = enable;
- }
- } // end-method
-
- public static void setAppTraceLevel(DetailLevel dt) {
- if ( dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.app, dt);
- } // end-method
-
- public static void setProxyTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.proxy, dt);
- } // end-method
-
- public static void setRpcTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.rpc, dt);
- } // end-method
-
- public static void setMarshallingTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.mar, dt);
- } // end-method
-
- public static void setProtocolTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.proto, dt);
- } // end-method
-
- public static void setTransportTraceLevel(DetailLevel dt) {
- if (dt != null && acceptAPITraceAdjustments)
- DiagLevel.setLevel(Mod.tran, dt);
- } // end-method
-
- private static String encodeTraceMessage(long timestamp, Mod module, InterfaceActivityDirection msgDirection, String msgBodyXml) {
- StringBuilder sb = new StringBuilder("<msg><dms>");
- sb.append(timestamp);
- sb.append("</dms><pid>");
- sb.append(Process.myPid());
- sb.append("</pid><tid>");
- sb.append(Thread.currentThread().getId());
- sb.append("</tid><mod>");
- sb.append(module.toString());
- sb.append("</mod>");
- if (msgDirection != InterfaceActivityDirection.None) {
- sb.append("<dir>");
- sb.append(interfaceActivityDirectionToString(msgDirection));
- sb.append("</dir>");
- } // end-if
- sb.append(msgBodyXml);
- sb.append("</msg>");
-
- return sb.toString();
- } // end-method
-
- private static String interfaceActivityDirectionToString(InterfaceActivityDirection iaDirection) {
- String str = "";
- switch (iaDirection) {
- case Receive:
- str = "rx";
- break;
- case Transmit:
- str = "tx";
- break;
- } // end-switch
- return str;
- } // end-method
-
- static String B64EncodeForXML(String data) {
- return Mime.base64Encode(data);
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: return Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
- } // end-method
-
- public static void logProxyEvent(String eventText, String token) {
- if (DiagLevel.getLevel(Mod.proxy) == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
-
- String msg = SmartDeviceLinkTrace.B64EncodeForXML(eventText);
- String xml = SmartDeviceLinkTrace.encodeTraceMessage(SmartDeviceLinkTrace.getBaseTicsDelta(), Mod.proxy, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- writeXmlTraceMessage(xml);
- } // end-method
-
- public static void logAppEvent(String eventText) {
- if (DiagLevel.getLevel(Mod.app) == DetailLevel.OFF) {
- return;
- } // end-if
-
- long timestamp = SmartDeviceLinkTrace.getBaseTicsDelta();
- String msg = SmartDeviceLinkTrace.B64EncodeForXML(eventText);
- String xml = SmartDeviceLinkTrace.encodeTraceMessage(timestamp, Mod.app, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- writeXmlTraceMessage(xml);
- } // end-method
-
- public static void logRPCEvent(InterfaceActivityDirection msgDirection, RPCMessage rpcMsg, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.rpc);
- if (dl == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
-
- long timestamp = SmartDeviceLinkTrace.getBaseTicsDelta();
- String xml = SmartDeviceLinkTrace.encodeTraceMessage(timestamp, Mod.rpc, msgDirection, rpc2Xml(dl, rpcMsg));
- writeXmlTraceMessage(xml);
- } // end-method
-
- private static String rpc2Xml(DetailLevel dl, RPCMessage rpcMsg) {
- StringBuilder rpcAsXml = new StringBuilder();
- rpcAsXml.append("<op>");
- rpcAsXml.append(rpcMsg.getFunctionName());
- rpcAsXml.append("</op>");
- boolean hasCorrelationID = false;
- Integer correlationID = -1;
- if (rpcMsg instanceof RPCRequest) {
- hasCorrelationID = true;
- correlationID = ((RPCRequest)rpcMsg).getCorrelationID();
- } else if (rpcMsg instanceof RPCResponse) {
- hasCorrelationID = true;
- correlationID = ((RPCResponse)rpcMsg).getCorrelationID();
- } // end-if
- if (hasCorrelationID) {
- rpcAsXml.append("<cid>");
- rpcAsXml.append(correlationID);
- rpcAsXml.append("</cid>");
- } // end-if
- rpcAsXml.append("<type>");
- rpcAsXml.append(rpcMsg.getMessageType());
- rpcAsXml.append("</type>");
- //rpcAsXml.append(newline);
-
- if (dl == DetailLevel.VERBOSE) {
- OpenRPCMessage orpcmsg = new OpenRPCMessage(rpcMsg);
- String rpcParamList = orpcmsg.msgDump();
- String msg = SmartDeviceLinkTrace.B64EncodeForXML(rpcParamList);
- rpcAsXml.append("<d>");
- rpcAsXml.append(msg);
- rpcAsXml.append("</d>");
- } // end-if
- return rpcAsXml.toString();
- } // end-method
-
- public static void logMarshallingEvent(InterfaceActivityDirection msgDirection, byte[] marshalledMessage, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.mar);
- if (dl == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-fif
-
- long timestamp = SmartDeviceLinkTrace.getBaseTicsDelta();
- StringBuilder msg = new StringBuilder();
- msg.append("<sz>");
- msg.append(marshalledMessage.length);
- msg.append("</sz>");
- if (dl == DetailLevel.VERBOSE) {
- msg.append("<d>");
- msg.append(Mime.base64Encode(marshalledMessage));
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: msg.append(Base64.encodeToString(marshalledMessage, Base64.DEFAULT));
- msg.append("</d>");
- } // end-if
- String xml = SmartDeviceLinkTrace.encodeTraceMessage(timestamp, Mod.mar, msgDirection, msg.toString());
- writeXmlTraceMessage(xml);
- } // end-method
-
- public static void logProtocolEvent(InterfaceActivityDirection frameDirection, ProtocolFrameHeader frameHeader, byte[] frameData, int frameDataOffset, int frameDataLength, String token) {
- DetailLevel dl = DiagLevel.getLevel(Mod.proto);
- if (dl == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
-
- StringBuffer protoMsg = new StringBuffer();
- protoMsg.append("<frame>");
- protoMsg.append(SmartDeviceLinkTrace.getProtocolFrameHeaderInfo(frameHeader, frameData));
- if (dl == DetailLevel.VERBOSE) {
- if (frameData != null && frameDataLength > 0) {
- protoMsg.append("<d>");
- String bytesInfo = "";
- bytesInfo = Mime.base64Encode(frameData, frameDataOffset, frameDataLength);
- // Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: bytesInfo = Base64.encodeToString(frameData, frameDataOffset, frameDataLength, Base64.DEFAULT);
- protoMsg.append(bytesInfo);
- protoMsg.append("</d>");
- } // end-if
- } // end-if
- protoMsg.append("</frame>");
- String xml = SmartDeviceLinkTrace.encodeTraceMessage(SmartDeviceLinkTrace.getBaseTicsDelta(), Mod.proto, frameDirection, protoMsg.toString());
- writeXmlTraceMessage(xml);
- } // end-method
-
- private static String getProtocolFrameType(FrameType f) {
- if (f == FrameType.Control)
- return "Control";
- else if (f == FrameType.Consecutive)
- return "Consecutive";
- else if (f == FrameType.First)
- return "First";
- else if (f == FrameType.Single)
- return "Single";
-
- return "Unknown";
- } // end-method
-
- private static String getProtocolSessionType(SessionType serviceType) {
- String s;
- if (serviceType == SessionType.RPC )
- s = "rpc";
- else if (serviceType == SessionType.Bulk_Data)
- s = "bulk";
- else
- s = "Unknown";
- return s;
- } // end-method
-
- private static String getProtocolFrameHeaderInfo(ProtocolFrameHeader hdr, byte[] buf) {
- StringBuilder sb = new StringBuilder();
- sb.append("<hdr>");
- sb.append("<ver>");
- sb.append(hdr.getVersion());
- sb.append("</ver><cmp>");
- sb.append(hdr.isCompressed());
- sb.append("</cmp><ft>");
- sb.append(getProtocolFrameType(hdr.getFrameType()));
- sb.append("</ft><st>");
- sb.append(getProtocolSessionType(hdr.getSessionType()));
- sb.append("</st><sid>");
- sb.append(hdr.getSessionID());
- sb.append("</sid><sz>");
- sb.append(hdr.getDataSize());
- sb.append("</sz>");
-
- int frameData = hdr.getFrameData();
- if (hdr.getFrameType() == FrameType.Control) {
- sb.append("<ca>");
- if (frameData == FrameDataControlFrameType.StartSession.getValue())
- sb.append("StartSession");
- else if (frameData == FrameDataControlFrameType.StartSessionACK.getValue())
- sb.append("StartSessionACK");
- else if (frameData == FrameDataControlFrameType.StartSessionNACK.getValue())
- sb.append("StartSessionNACK");
- else if (frameData == FrameDataControlFrameType.EndSession.getValue())
- sb.append("EndSession");
- sb.append("</ca>");
- } else if (hdr.getFrameType() == FrameType.Consecutive ) {
- sb.append("<fsn>");
- if (frameData == 0 )
- sb.append("lastFrame");
- else
- sb.append(String.format("%02X",frameData));
- sb.append("</fsn>");
- } else if (hdr.getFrameType() == FrameType.First ) {
- int totalSize = BitConverter.intFromByteArray(buf, 0);
- int numFrames = BitConverter.intFromByteArray(buf, 4);
- sb.append("<total>" + totalSize + "</total><numframes>" + numFrames + "</numframes>");
- } else if (hdr.getFrameType() == FrameType.Single ) {
- sb.append("<single/>");
- }
-
- sb.append("</hdr>");
-
- return sb.toString();
- } // end-method
-
- public static String getBTDeviceInfo(BluetoothDevice btDevice) {
- StringBuilder sb = new StringBuilder();
- sb.append("<btp>");
- String btdn = btDevice.getName();
- sb.append("<btn>");
- sb.append(SmartDeviceLinkTrace.B64EncodeForXML(btdn));
- sb.append("</btn>");
- sb.append("<bta>" + btDevice.getAddress() + "</bta>");
- sb.append("<bts>" + btDevice.getBondState() + "</bts>");
- sb.append("</btp>");
- return sb.toString();
- } // end-method
-
- public static void logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int byteLength, String token) {
- logTransportEvent(preamble, transportSpecificInfoXml, msgDirection, buf, 0, byteLength, token);
- } // end-method
-
- private static void checkB64(String x, byte[] buf, int offset, int byteLength) {
- if ((x.length() % 4) != 0) {
- NativeLogTool.logWarning(SmartDeviceLinkTrace.SYSTEM_LOG_TAG, "b64 string length (" + x.length() + ") isn't multiple of 4: buf.length=" + buf.length + ", offset=" + offset + ", len=" + byteLength);
- } // end-if
- } // end-method
-
- public static void logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int offset, int byteLength, String token) {
- if (DiagLevel.getLevel(Mod.tran) == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
-
- StringBuilder msg = new StringBuilder();
- if (transportSpecificInfoXml != null && transportSpecificInfoXml.length() > 0) {
- msg.append(transportSpecificInfoXml);
- } // end-if
- if (preamble != null && preamble.length() > 0) {
- msg.append("<desc>");
- msg.append(preamble);
- msg.append("</desc>");
- } // end-if
- if (buf != null) {
- msg.append("<sz>");
- msg.append(byteLength);
- msg.append("</sz>");
- DetailLevel dl = DiagLevel.getLevel(Mod.tran);
- if (dl == DetailLevel.VERBOSE) {
- if (buf != null && byteLength > 0) {
- msg.append("<d>");
- String bytesInfo = Mime.base64Encode(buf, offset, byteLength);
- checkB64(bytesInfo, buf, offset, byteLength);
- msg.append(bytesInfo);
- msg.append("</d>");
- } // end-if
- } // end-if
- } // end-if
- String xml = SmartDeviceLinkTrace.encodeTraceMessage(SmartDeviceLinkTrace.getBaseTicsDelta(), Mod.tran, msgDirection, msg.toString());
- writeXmlTraceMessage(xml);
- } // end-method
-
- // Package-scoped
- static long getBaseTicsDelta() {
- return java.lang.System.currentTimeMillis() - getBaseTics();
- }
-
- // Package-scoped
- static long getBaseTics() {
- return baseTics;
- } // end-method
-
- public static Boolean writeMessageToSiphonServer(String info) {
- return SiphonServer.sendFormattedTraceMessage(info);
- }
-
- private static void writeXmlTraceMessage(String msg) {
- try {
- // Attempt to write formatted message to the Siphon
- if (false == writeMessageToSiphonServer(msg)) {
- // If writing to the Siphon fails, write to the native log
- NativeLogTool.logInfo(SmartDeviceLinkTrace.SYSTEM_LOG_TAG, msg);
- }
-
- ISTListener localTraceListener = m_appTraceListener;
-
- if (localTraceListener != null) {
- try {
- localTraceListener.logXmlMsg(msg, KeyStr);
- } catch (Exception ex) {
- DebugTool.logError("Failure calling ISTListener: " + ex.toString(), ex);
- } // end-catch
- } // end-if
- } catch (Exception ex) {
- NativeLogTool.logError(SmartDeviceLinkTrace.SYSTEM_LOG_TAG, "Failure writing XML trace message: " + ex.toString());
- }
- } // end-method
-
- // Package-scoped
- public static String getLogHeader(String dumpReason, int seqNo) {
- final String Sep = "-";
- StringBuilder write = new StringBuilder("<?xml version=\"1.0\"?>" + "<logs>");
- write.append("<info>");
- StringBuilder infoBlock = new StringBuilder();
- String hostInfo = Build.BRAND + Sep + Build.MANUFACTURER + Sep + Build.MODEL + "(" + Build.HOST + ")";
- infoBlock.append("<host>" + SmartDeviceLinkTrace.B64EncodeForXML(hostInfo) + "</host>");
- String osv = Build.VERSION.RELEASE + " (" + Build.VERSION.CODENAME + ")";
- infoBlock.append("<osv>" + SmartDeviceLinkTrace.B64EncodeForXML(osv) + "</osv>");
- infoBlock.append(TraceDeviceInfo.getTelephonyHeader());
-
- long heapSize = Debug.getNativeHeapFreeSize() / 1024;
- long heapAllocated = Debug.getNativeHeapAllocatedSize() / 1024;
- infoBlock.append("<mem><hf>" + heapSize + "KB</hf><ha>" + heapAllocated + "KB</ha></mem>");
- infoBlock.append("<np>" + Runtime.getRuntime().availableProcessors() + "</np>");
- infoBlock.append("<pid>" + Process.myPid() + "</pid>");
- infoBlock.append("<tid>" + Thread.currentThread().getId() + "</tid>");
-
- // String dateStamp = (String)
- // DateFormat.format("yy-MM-dd hh:mm:ss SSS", new Timestamp(baseTics));
- Timestamp stamp = new Timestamp(SmartDeviceLinkTrace.getBaseTics());
- String GMTtime = stamp.toGMTString().substring(0, 19);
- long fracSec = stamp.getNanos() / 1000000; // divide by a million
- String fracSecStr = String.format("%03d", fracSec);
- infoBlock.append("<utc>" + GMTtime + "." + fracSecStr + "</utc>");
-
- infoBlock.append(TraceDeviceInfo.getLogHeaderBluetoothPairs());
- infoBlock.append(getApplinkTraceRoot(dumpReason, seqNo));
-
- write.append(infoBlock);
-
- write.append("</info>" + "<msgs>");
- return write.toString();
- } // end-method
-
- private static String getApplinkTraceRoot(String dumpReason, int seqNo) {
- StringBuilder write = new StringBuilder("<applinktraceroot>" + "<sequencenum>" + seqNo
- + "</sequencenum>" + "<dumpreason>" + dumpReason
- + "</dumpreason><tracelevel>");
-
- write.append("<tran>" + DiagLevel.getLevel(Mod.tran) + "</tran>");
- write.append("<proto>" + DiagLevel.getLevel(Mod.proto) + "</proto>");
- write.append("<mar>" + DiagLevel.getLevel(Mod.mar) + "</mar>");
- write.append("<rpc>" + DiagLevel.getLevel(Mod.rpc) + "</rpc>");
- write.append("<proxy>" + DiagLevel.getLevel(Mod.proxy) + "</proxy>");
- write.append("<app>" + DiagLevel.getLevel(Mod.app) + "</app>");
-
- write.append("</tracelevel>");
- write.append("</applinktraceroot>");
- return write.toString();
- } // end-method
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/TraceDeviceInfo.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/TraceDeviceInfo.java
deleted file mode 100755
index b29a7a753..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/TraceDeviceInfo.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- *
- */
-package com.smartdevicelink.trace;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import com.smartdevicelink.util.DebugTool;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.telephony.TelephonyManager;
-
-/**
- * @author vvolkman
- *
- */
-public class TraceDeviceInfo {
- // http://developer.android.com/guide/topics/data/data-storage.html
-
- private static TelephonyManager m_telephonyManager;
-
- // Constructor
- public TraceDeviceInfo(TelephonyManager telephonyManager) {
- m_telephonyManager = telephonyManager;
- }
-
- public static void setTelephonyManager(TelephonyManager telephonyManager) {
- m_telephonyManager = telephonyManager;
- }
-
- public static TelephonyManager getTelephonyManager() {
- return m_telephonyManager;
- }
-
- // package scoped
- static String getTelephonyHeader() {
- // Telephony manager can tell us a few things...
- String info = "";
-
- if (m_telephonyManager != null) {
- try { // getDeviceId() requires android.permission.READ_PHONE_STATE
- info = "<deviceid>" + m_telephonyManager.getDeviceId() + "</deviceid>";
- } catch (Exception e1) {
- DebugTool.logError("Failure getting telephony device ID: " + e1.toString(), e1);
- }
-
- info = "<pt>";
- switch (m_telephonyManager.getPhoneType()) {
- case TelephonyManager.PHONE_TYPE_NONE:
- info += "NONE";
- break;
- case TelephonyManager.PHONE_TYPE_GSM:
- info += "GSM";
- break;
- case TelephonyManager.PHONE_TYPE_CDMA:
- info += "CDMA";
- break;
- default:
- info += "UNKNOWN";
- } // end-switch
-
- info += "</pt>" + "<nt>";
-
- switch (m_telephonyManager.getNetworkType()) {
- case TelephonyManager.NETWORK_TYPE_UNKNOWN:
- info += "UKNOWN";
- break;
- case TelephonyManager.NETWORK_TYPE_GPRS:
- info += "GPRS";
- break;
- case TelephonyManager.NETWORK_TYPE_EDGE:
- info += "EDGE";
- break;
- case TelephonyManager.NETWORK_TYPE_UMTS:
- info += "UMTS";
- break;
- case TelephonyManager.NETWORK_TYPE_HSDPA:
- info += "HSDPA";
- break;
- case TelephonyManager.NETWORK_TYPE_HSUPA:
- info += "HSUPA";
- break;
- case TelephonyManager.NETWORK_TYPE_HSPA:
- info += "HSPA";
- break;
- case TelephonyManager.NETWORK_TYPE_CDMA:
- info += "CDMA";
- break;
- case TelephonyManager.NETWORK_TYPE_EVDO_0:
- info += "EVDO_O";
- break;
- case TelephonyManager.NETWORK_TYPE_EVDO_A:
- info += "EVDO_A";
- break;
- case TelephonyManager.NETWORK_TYPE_1xRTT:
- info += "1xRTT";
- break;
- default:
- info += "UNKNOWN";
- break;
- } // end-switch
-
- info += "</nt>";
- } // end-if
- return info;
- } // end-method
-
- // Package scoped
- static String getLogHeaderBluetoothPairs() {
- Set<BluetoothDevice> btDevices = BluetoothAdapter.getDefaultAdapter()
- .getBondedDevices();
-
- StringBuilder write = new StringBuilder("<btpairs>");
- Iterator<BluetoothDevice> iter = btDevices.iterator();
- while (iter.hasNext()) {
- write.append(SmartDeviceLinkTrace.getBTDeviceInfo(iter.next()));
- }
- write.append("</btpairs>");
-
- return write.toString();
- } // end-method
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/DetailLevel.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/DetailLevel.java
deleted file mode 100755
index 87bad559f..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/DetailLevel.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.smartdevicelink.trace.enums;
-
-
-public enum DetailLevel {
- OFF,
- TERSE,
- VERBOSE;
-
- public static DetailLevel valueForString(String value) {
- return valueOf(value);
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/InterfaceActivityDirection.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/InterfaceActivityDirection.java
deleted file mode 100755
index c348d82b2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/InterfaceActivityDirection.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.smartdevicelink.trace.enums;
-
-public enum InterfaceActivityDirection {
- Transmit,
- Receive,
- None;
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/Mod.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/Mod.java
deleted file mode 100755
index 9c34e2f4c..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/trace/enums/Mod.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.smartdevicelink.trace.enums;
-
-public enum Mod {
- tran,
- proto,
- mar,
- rpc,
- app,
- proxy;
-
- public static Mod valueForString(String value) {
- return valueOf(value);
- }
-}; \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransport.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransport.java
deleted file mode 100755
index c8818ce19..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransport.java
+++ /dev/null
@@ -1,368 +0,0 @@
-package com.smartdevicelink.transport;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.UUID;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothServerSocket;
-import android.bluetooth.BluetoothSocket;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.exception.SmartDeviceLinkExceptionCause;
-import com.smartdevicelink.trace.SmartDeviceLinkTrace;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.util.DebugTool;
-
-/**
- * Bluetooth Transport Implementation. This transport advertises its existence to SMARTDEVICELINK by publishing an SDP record and waiting for an incoming connection from SMARTDEVICELINK. Connection is verified by checking for the SMARTDEVICELINK UUID. For more detailed information please refer to the <a href="#bluetoothTransport">Bluetooth Transport Guide</a>.
- *
- */
-public class BTTransport extends SmartDeviceLinkTransport {
- //936DA01F9ABD4D9D80C702AF85C822A8
- private final static UUID SMARTDEVICELINK_V4_MOBILE_APPLICATION_SVC_CLASS = new UUID(0x936DA01F9ABD4D9DL, 0x80C702AF85C822A8L);
-
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- private BluetoothAdapter _adapter = null;
- private BluetoothSocket _activeSocket = null;
- private InputStream _input = null;
- private UUID _listeningServiceUUID = SMARTDEVICELINK_V4_MOBILE_APPLICATION_SVC_CLASS;
- private BluetoothAdapterMonitor _bluetoothAdapterMonitor = null;
- private TransportReaderThread _transportReader = null;
- private OutputStream _output = null;
- private BluetoothServerSocket _serverSocket = null;
-
- // Boolean to monitor if the transport is in a disconnecting state
- private boolean _disconnecting = false;
-
- public BTTransport(ITransportListener transportListener) {
- super(transportListener);
- } // end-ctor
-
- public void openConnection () throws SmartDeviceLinkException {
-
- // Get the device's default Bluetooth Adapter
- _adapter = BluetoothAdapter.getDefaultAdapter();
-
- // Test if Adapter exists
- if (_adapter == null) {
- throw new SmartDeviceLinkException("No Bluetooth adapter found. Bluetooth adapter must exist to communicate with SMARTDEVICELINK.", SmartDeviceLinkExceptionCause.BLUETOOTH_ADAPTER_NULL);
- }
-
- // Test if Bluetooth is enabled
- try {
- if (!_adapter.isEnabled()) {
- throw new SmartDeviceLinkException("Bluetooth adapter must be enabled to instantiate a SMARTDEVICELINKProxy object.", SmartDeviceLinkExceptionCause.BLUETOOTH_DISABLED);
- }
- } catch (SecurityException e) {
- throw new SmartDeviceLinkException("Insufficient permissions to interact with the Bluetooth Adapter.", SmartDeviceLinkExceptionCause.PERMISSION_DENIED);
- }
-
- // Start BluetoothAdapterMonitor to ensure the Bluetooth Adapter continues to be enabled
- _bluetoothAdapterMonitor = new BluetoothAdapterMonitor(_adapter);
-
- try {
- _serverSocket = _adapter.listenUsingRfcommWithServiceRecord("SMARTDEVICELINKProxy", _listeningServiceUUID);
- } catch (IOException ex) {
-
- // Test to determine if the bluetooth has been disabled since last check
- if (!_adapter.isEnabled()) {
- throw new SmartDeviceLinkException("Bluetooth adapter must be on to instantiate a SMARTDEVICELINKProxy object.", SmartDeviceLinkExceptionCause.BLUETOOTH_DISABLED);
- }
-
- throw new SmartDeviceLinkException("Could not open connection to SMARTDEVICELINK.", ex, SmartDeviceLinkExceptionCause.SMARTDEVICELINK_CONNECTION_FAILED);
- }
-
- // Test to ensure serverSocket is not null
- if (_serverSocket == null) {
- throw new SmartDeviceLinkException("Could not open connection to SMARTDEVICELINK.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_CONNECTION_FAILED);
- }
-
- SmartDeviceLinkTrace.logTransportEvent("BTTransport: listening for incoming connect to service ID " + _listeningServiceUUID, null, InterfaceActivityDirection.Receive, null, 0, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- // Setup transportReader thread
- _transportReader = new TransportReaderThread();
- _transportReader.setName("TransportReader");
- _transportReader.setDaemon(true);
- _transportReader.start();
-
- // Initialize the SiphonServer
- SiphonServer.init();
- } // end-method
-
- public void disconnect() {
- disconnect(null, null);
- }
-
- /**
- * Destroys the transport between SMARTDEVICELINK and the mobile app
- *
- * @param msg
- * @param ex
- */
- private synchronized void disconnect(String msg, Exception ex) {
- // If already disconnecting, return
- if (_disconnecting) {
- // No need to recursively call
- return;
- }
- _disconnecting = true;
-
- String disconnectMsg = (msg == null ? "" : msg);
- if (ex != null) {
- disconnectMsg += ", " + ex.toString();
- } // end-if
-
- SmartDeviceLinkTrace.logTransportEvent("BTTransport.disconnect: " + disconnectMsg, null, InterfaceActivityDirection.Transmit, null, 0, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- try {
- if (_transportReader != null) {
- _transportReader.halt();
- _transportReader = null;
- }
- } catch (Exception e) {
- DebugTool.logError("Failed to stop transport reader thread.", e);
- } // end-catch
-
- try {
- if (_bluetoothAdapterMonitor != null) {
- _bluetoothAdapterMonitor.halt();
- _bluetoothAdapterMonitor = null;
- }
- } catch (Exception e) {
- DebugTool.logError("Failed to stop adapter monitor thread.", e);
- }
-
- try {
- if (_serverSocket != null) {
- _serverSocket.close();
- _serverSocket = null;
- }
- } catch (Exception e) {
- DebugTool.logError("Failed to close serverSocket", e);
- } // end-catch
-
- try {
- if (_activeSocket != null) {
- _activeSocket.close();
- _activeSocket = null;
- }
- } catch (Exception e) {
- DebugTool.logError("Failed to close activeSocket", e);
- } // end-catch
-
- try {
- if (_input != null) {
- _input.close();
- _input = null;
- }
- } catch (Exception e) {
- DebugTool.logError("Failed to close input stream", e);
- } // end-catch
-
- try {
- if (_output != null) {
- _output.close();
- _output = null;
- }
- } catch (Exception e) {
- DebugTool.logError("Failed to close output stream", e);
- } // end-catch
-
- if (ex == null) {
- // This disconnect was not caused by an error, notify the proxy that
- // the trasport has been disconnected.
- handleTransportDisconnected(msg);
- } else {
- // This disconnect was caused by an error, notify the proxy
- // that there was a transport error.
- handleTransportError(msg, ex);
- }
- } // end-method
-
-
- /**
- * Sends data over the transport. Takes a byte array and transmits data provided starting at the
- * offset and of the provided length to fragment transmission.
- */
- public boolean sendBytesOverTransport(byte[] msgBytes, int offset, int length) {
- boolean sendResult = false;
- try {
- _output.write(msgBytes, offset, length);
- sendResult = true;
- } catch (Exception ex) {
- DebugTool.logError("Error writing to Bluetooth socket: " + ex.toString(), ex);
- handleTransportError("Error writing to Bluetooth socket:", ex);
- sendResult = false;
- } // end-catch
- return sendResult;
- } // end-method
-
-
-
- private class TransportReaderThread extends Thread {
-
- byte[] buf = new byte[4096];
- private Boolean isHalted = false;
-
- public void halt() {
- isHalted = true;
- }
-
- private void acceptConnection() {
- SmartDeviceLinkTrace.logTransportEvent("BTTransport: Waiting for incoming RFCOMM connect", "", InterfaceActivityDirection.Receive, null, 0, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- try {
- // Blocks thread until connection established.
- _activeSocket = _serverSocket.accept();
-
- // If halted after serverSocket.accept(), then return immediately
- if (isHalted) {
- return;
- }
-
- // Log info of the connected device
- BluetoothDevice btDevice = _activeSocket.getRemoteDevice();
- String btDeviceInfoXml = SmartDeviceLinkTrace.getBTDeviceInfo(btDevice);
- SmartDeviceLinkTrace.logTransportEvent("BTTransport: RFCOMM Connection Accepted", btDeviceInfoXml, InterfaceActivityDirection.Receive, null, 0, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- _output = _activeSocket.getOutputStream();
- _input = _activeSocket.getInputStream();
-
- handleTransportConnected();
-
- } catch (Exception e) {
-
- if (!isHalted) {
- // Only call disconnect if the thread has not been halted
-
- // Check to see if Bluetooth was disabled
- if (_adapter != null && !_adapter.isEnabled()) {
- disconnect("Bluetooth Adapater has been disabled.", new SmartDeviceLinkException("Bluetooth adapter must be enabled to instantiate a SMARTDEVICELINKProxy object.", e, SmartDeviceLinkExceptionCause.BLUETOOTH_DISABLED));
- } else {
- disconnect("Failed to accept connection", e);
- }
- }
- } finally {
- if (_serverSocket != null && !isHalted) {
- try {
- _serverSocket.close();
- } catch (IOException e) {
- //do nothing
- }
- _serverSocket = null;
- }
- }
- }
-
- private void readFromTransport() {
- try {
- int bytesRead = -1;
- try {
- bytesRead = _input.read(buf);
- } catch (Exception e) {
- if (!isHalted) {
- // Only call disconnect if the thread has not been halted
-
- // Check to see if Bluetooth was disabled
- if (_adapter != null && !_adapter.isEnabled()) {
- disconnect("Bluetooth Adapater has been disabled.", new SmartDeviceLinkException("Bluetooth adapter must be enabled to instantiate a SMARTDEVICELINKProxy object.", e, SmartDeviceLinkExceptionCause.BLUETOOTH_DISABLED));
- } else {
- disconnect("Failed to read from Bluetooth transport.", e);
- }
- }
- return;
- } // end-catch
-
- if (bytesRead != -1) {
- handleReceivedBytes(buf, bytesRead);
- } else {
- // When bytesRead == -1, it indicates end of stream
- if (!isHalted) {
- // Only call disconnect if the thread has not been halted
- DebugTool.logError("End of stream reached!");
- disconnect("End of stream reached.", null);
- }
- }
- } catch (Exception excp) {
- if (!isHalted) {
- // Only call disconnect if the thread has not been halted
- String errString = "Failure in BTTransport reader thread: " + excp.toString();
- DebugTool.logError(errString, excp);
- disconnect(errString, excp);
- }
- return;
- } // end-catch
- } // end-method
-
- public void run() {
- // acceptConnection blocks until the connection has been accepted
- acceptConnection();
-
- while (!isHalted) {
- readFromTransport();
- }
- }
- }
-
- private class BluetoothAdapterMonitor {
- private boolean _isHalted = false;
- private BluetoothAdapter _bluetoothAdapter = null;
- private final String THREAD_NAME = "BluetoothAdapterMonitor";
- private Thread _bluetoothAdapterMonitorThread = null;
-
- public BluetoothAdapterMonitor(BluetoothAdapter bluetoothAdapter) {
- if (bluetoothAdapter == null) {
- throw new IllegalArgumentException("BluetoothAdapter cannot be null.");
- }
-
- // Set the bluetooth adapter
- _bluetoothAdapter = bluetoothAdapter;
-
- _bluetoothAdapterMonitorThread = new Thread(new Runnable() {
- @Override
- public void run() {
- while (!_isHalted) {
- checkIfBluetoothAdapterDisabled();
- try {
- Thread.sleep(15000);
- } catch (InterruptedException e) {
- // Break if interrupted
- break;
- }
- }
- }
- });
- _bluetoothAdapterMonitorThread.setName(THREAD_NAME);
- _bluetoothAdapterMonitorThread.setDaemon(true);
- _bluetoothAdapterMonitorThread.start();
- }
-
- private void checkIfBluetoothAdapterDisabled() {
- if (_bluetoothAdapter != null && !_bluetoothAdapter.isEnabled()) {
- // Bluetooth adapter has been disabled, disconnect the transport
- disconnect("Bluetooth adapter has been disabled.",
- new SmartDeviceLinkException("Bluetooth adapter must be enabled to instantiate a SMARTDEVICELINKProxy object.", SmartDeviceLinkExceptionCause.BLUETOOTH_DISABLED));
- }
- }
-
- public void halt() {
- _isHalted = true;
- _bluetoothAdapterMonitorThread.interrupt();
- }
- }
-
- /**
- * Overridden abstract method which returns specific type of this transport.
- *
- * @return Constant value - TransportType.BLUETOOTH.
- *
- * @see TransportType
- */
- public TransportType getTransportType() {
- return TransportType.BLUETOOTH;
- }
-} // end-class
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransportConfig.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransportConfig.java
deleted file mode 100755
index a2e717604..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BTTransportConfig.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.smartdevicelink.transport;
-
-/**
- * Container of Bluetooth transport specific configuration.
- */
-public final class BTTransportConfig extends BaseTransportConfig {
-
- /**
- * Overridden abstract method which returns specific type of this transport configuration.
- *
- * @return Constant value TransportType.BLUETOOTH.
- *
- * @see TransportType
- */
- public TransportType getTransportType() {
- return TransportType.BLUETOOTH;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BaseTransportConfig.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BaseTransportConfig.java
deleted file mode 100755
index e34e5d945..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/BaseTransportConfig.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.smartdevicelink.transport;
-
-/**
- * Defines base abstract class for transport configurations.
- */
-public abstract class BaseTransportConfig {
-
- /**
- * Gets transport type for this transport configuration.
- *
- * @return One of {@link TransportType} enumeration values that represents type of this transport configuration.
- */
- public abstract TransportType getTransportType();
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/ITransportListener.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/ITransportListener.java
deleted file mode 100755
index 7f4f0b7de..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/ITransportListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.smartdevicelink.transport;
-
-public interface ITransportListener {
- // Called to indicate and deliver bytes received from transport
- void onTransportBytesReceived(byte[] receivedBytes, int receivedBytesLength);
-
- // Called to indicate that transport connection was established
- void onTransportConnected();
-
- // Called to indicate that transport was disconnected (by either side)
- void onTransportDisconnected(String info);
-
- // Called to indicate that some error occurred on the transport
- void onTransportError(String info, Exception e);
-} // end-interface \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SiphonServer.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SiphonServer.java
deleted file mode 100755
index df350264b..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SiphonServer.java
+++ /dev/null
@@ -1,361 +0,0 @@
-package com.smartdevicelink.transport;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.BindException;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-import com.smartdevicelink.util.*;
-
-public class SiphonServer {
- // Prohibit use of no-arg ctor
- private SiphonServer() {}
-
- enum SiphonDataType {
- fromSmartDeviceLink,
- fromApp,
- appLog,
- formattedTrace,
- baselineTimeStamp,
- traceSettings
- }
-
- // Boolean to enable/disable the siphon
- private static Boolean m_siphonEnabled = false;
-
- // Boolean to determine if the siphon has been initialized
- private static Boolean m_siphonInitialized = false;
-
- private static Socket m_siphonSocket = null;
- private static Object m_siphonLock = new Object();
- private static ServerSocket m_listeningSocket = null;
- private static OutputStream m_siphonSocketOutputStream = null;
- private static SiphonServerThread m_siphonClientThread = null;
-
- // Initial timestamp in MS
- private static long m_startTimeStamp = 0;
-
- // SMARTDEVICELINK Trace Message Version
- private static byte m_smartDeviceLinkTraceMsgVersionNumber = 1;
-
- // Max number of ports to attempt a connection on
- private final static Integer MAX_NUMBER_OF_PORT_ATTEMPTS = 1000;
-
- // Starting port for future port attempts
- private final static short FIRST_PORT_TO_ATTEMPT_CONNECTION = 7474;
-
- // Boolean to determine if formatted trace is being sent
- private static Boolean m_sendingFormattedTrace = false;
-
- public static void enableSiphonServer() {
- m_siphonEnabled = true;
- }
-
- public static void disableSiphonServer() {
- m_siphonEnabled = false;
- }
-
- public static boolean init() {
- // Only initialize if the siphon has not been initialized previously
-
- // Check here to be lean. If true, no need to smartDeviceLinkhronize
- if (m_siphonInitialized) {
- return true;
- }
-
- synchronized (m_siphonLock) {
- // To prevent a race condition, re-check m_siphonInitialized inside of smartDeviceLinkhronize block
- if (!m_siphonInitialized) {
- if (m_siphonClientThread == null) {
- // Set current time stamp
- m_startTimeStamp = System.currentTimeMillis();
-
- // Start Siphon Thread
- m_siphonClientThread = new SiphonServerThread();
- m_siphonClientThread.setName("Siphon");
- m_siphonClientThread.setDaemon(true);
- m_siphonClientThread.start();
-
- m_siphonInitialized = true;
- } // end-if
- } // end-lock
- }
-
- return m_siphonInitialized;
- } // end-method
-
- public static void closeServer() throws IOException {
-
- if (m_siphonClientThread != null) {
- m_siphonClientThread.halt();
- m_siphonClientThread = null;
- }
-
- if (m_listeningSocket != null) {
- m_listeningSocket.close();
- m_listeningSocket = null;
- }
-
- if (m_siphonSocket != null) {
- m_siphonSocket.close();
- m_siphonSocket = null;
- }
-
- if (m_siphonSocketOutputStream != null) {
- m_siphonSocketOutputStream.close();
- m_siphonSocketOutputStream = null;
- }
- }
-
- public static Boolean sendBytesFromAPP(byte[] msgBytes, int offset, int length) {
-
- if (m_sendingFormattedTrace) {
- return false;
- }
-
- return sendSiphonData(SiphonDataType.fromApp, msgBytes, offset, length);
- } // end-method
-
- public static Boolean sendBytesFromSMARTDEVICELINK(byte[] msgBytes, int offset, int length) {
-
- if (m_sendingFormattedTrace) {
- return false;
- }
-
- return sendSiphonData(SiphonDataType.fromSmartDeviceLink, msgBytes, offset, length);
- } // end-method
-
- public static Boolean sendSiphonLogData(String message) {
-
- if (m_sendingFormattedTrace) {
- return false;
- }
-
- if (message == null || message.length() == 0) {
- return false;
- }
-
- byte messageBytes[] = null;
- int messageLength = 0;
-
- try {
- messageBytes = message.getBytes("UTF-8");
- } catch (UnsupportedEncodingException e) {
- return false;
- }
-
- messageLength = messageBytes.length;
- return sendSiphonData(SiphonDataType.appLog, messageBytes, 0, messageLength);
-
- }
-
- public static Boolean sendFormattedTraceMessage(String message) {
-
- if (message == null || message.length() == 0) {
- return false;
- }
-
- byte messageBytes[] = null;
- int messageLength = 0;
-
- try {
- messageBytes = message.getBytes("UTF-8");
- } catch (UnsupportedEncodingException e) {
- return false;
- }
-
- messageLength = messageBytes.length;
- if (sendSiphonData(SiphonDataType.formattedTrace, messageBytes, 0, messageLength)) {
- m_sendingFormattedTrace = true;
- return true;
- } else {
- return false;
- }
- }
-
- private static Boolean sendSiphonData(SiphonDataType direction, byte[] msgBytes, int offset, int length) {
- byte siphonDataTypeIndicator = 0x00;
-
- long currentDateTime = System.currentTimeMillis();
- Integer deltaTimeMills = null;
-
- deltaTimeMills = (int)(currentDateTime - m_startTimeStamp);
-
- switch(direction) {
- case fromSmartDeviceLink:
- siphonDataTypeIndicator = 0x00;
- break;
- case fromApp:
- siphonDataTypeIndicator = 0x01;
- break;
- case appLog:
- siphonDataTypeIndicator = 0x02;
- break;
- case formattedTrace:
- siphonDataTypeIndicator = 0x03;
- break;
- case baselineTimeStamp:
- siphonDataTypeIndicator = 0x04;
- break;
- case traceSettings:
- siphonDataTypeIndicator = 0x05;
- break;
- default:
- siphonDataTypeIndicator = 0x00;
- break;
- }
-
- // Set high bit to indicate new format
- siphonDataTypeIndicator = (byte)((byte)0x80 | siphonDataTypeIndicator);
-
- return sendDataToSiphonSocket(siphonDataTypeIndicator, deltaTimeMills, msgBytes, offset, length);
- }
-
- private synchronized static Boolean sendDataToSiphonSocket(byte directionIndicator, Integer timeStamp,
- byte[] msgBytes, int offset, int length) {
- if (!m_siphonEnabled) {
- return false;
- }
-
- if (msgBytes == null || length == 0) {
- return false;
- }
-
- OutputStream siphonOutputStream = null;
-
- synchronized (m_siphonLock) {
- siphonOutputStream = m_siphonSocketOutputStream;
- } // end-lock
-
- if (siphonOutputStream == null) {
- return false;
- }
-
- try {
- // blobSize = length(of message) + 1(size of direction indicator)
- // + 1 (size of msgVersionNumber) + 4 (size of timeStamp)
- int blobSize = length + 1 + 1 + 4;
-
- siphonOutputStream.write(BitConverter.intToByteArray(blobSize));
- siphonOutputStream.write(new byte[] {directionIndicator});
- siphonOutputStream.write(new byte[] {m_smartDeviceLinkTraceMsgVersionNumber});
- siphonOutputStream.write(intToByteArray(timeStamp));
- siphonOutputStream.write(msgBytes, offset, length);
- } catch (Exception ex) {
- return false;
- } // end-catch
-
- return true;
- } // end-method
-
- private static class SiphonServerThread extends Thread {
-
- private Boolean isHalted = false;
- short listenPort;
-
- public void halt() {
- isHalted = true;
- }
-
- private boolean findOpenSocket(short port) {
- // Accept incoming sihpon connection from trace utility.
- Boolean foundOpenPort = false;
- listenPort = port;
-
- // Listen to accept incoming connection from SMARTDEVICELINK
- while (!foundOpenPort) {
- try {
- m_listeningSocket = new ServerSocket(listenPort);
- foundOpenPort = true;
- } catch (BindException ex) {
- listenPort++;
- if(listenPort > port + MAX_NUMBER_OF_PORT_ATTEMPTS) {
- return false;
- }
- } catch (IOException e) {
- return false;
- }
- }
-
- return foundOpenPort;
- }
-
- private void startServerOnPort() throws IOException {
- Socket newSocket = null;
-
- // Wait for a connection
- newSocket = m_listeningSocket.accept();
-
- // If isHalted after accept() delay, return
- if (isHalted) {
- return;
- }
-
- synchronized (m_siphonLock) {
- // Reset siphonSocketOutputStream
- if (m_siphonSocketOutputStream != null) {
- try {
- m_siphonSocketOutputStream.close();
- } catch (IOException e) {
- // Do nothing
- }
- m_siphonSocketOutputStream = null;
- }
-
- // Reset siphonSocket
- if (m_siphonSocket != null) {
- try {
- m_siphonSocket.close();
- } catch (IOException e) {
- // Do nothing
- }
- m_siphonSocket = null;
- }
-
- // Store the new socket
- m_siphonSocket = newSocket;
-
- // Set Socket Options
- m_siphonSocket.setKeepAlive(true);
-
- // Get the output stream of the connection
- m_siphonSocketOutputStream = m_siphonSocket.getOutputStream();
-
- // Output version number to the Siphon upon connection (version number prepending to logInfo)
- DebugTool.logInfo("Siphon connected.");
- } // end-lock
- } // end-method
-
- @Override
- public void run() {
- try {
- if (findOpenSocket(FIRST_PORT_TO_ATTEMPT_CONNECTION)) {
- while (!isHalted) {
- startServerOnPort();
- }
- }
- } catch (Exception ex) {
- // Do nothing
- } finally {
- if (m_listeningSocket != null) {
- try {
- m_listeningSocket.close();
- } catch (IOException e) {
- // Do nothing
- }
- m_listeningSocket = null;
- }
- }
- }
- }
-
- private static final byte[] intToByteArray(int value) {
- return new byte[] {
- (byte)(value >>> 24),
- (byte)(value >>> 16),
- (byte)(value >>> 8),
- (byte)value};
- }
-} // end-class \ No newline at end of file
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SmartDeviceLinkTransport.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SmartDeviceLinkTransport.java
deleted file mode 100755
index 04ab6a69d..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/SmartDeviceLinkTransport.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.smartdevicelink.transport;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.trace.SmartDeviceLinkTrace;
-import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
-import com.smartdevicelink.util.DebugTool;
-
-public abstract class SmartDeviceLinkTransport {
- private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
-
- private final static String FailurePropagating_Msg = "Failure propagating ";
- private Boolean isConnected = false;
-
- private String _sendLockObj = "lock";
-
- // Get status of transport connection
- public Boolean getIsConnected() {
- return isConnected;
- }
-
- //protected SmartDeviceLinkTransport(String endpointName, String param2, ITransportListener transportListener)
- protected SmartDeviceLinkTransport(ITransportListener transportListener) {
- if (transportListener == null) {
- throw new IllegalArgumentException("Provided transport listener interface reference is null");
- } // end-if
- _transportListener = transportListener;
- } // end-method
-
- // This method is called by the subclass to indicate that data has arrived from
- // the transport.
- protected void handleReceivedBytes(byte[] receivedBytes, int receivedBytesLength) {
- try {
- // Trace received data
- if (receivedBytesLength > 0) {
- // Send transport data to the siphon server
- SiphonServer.sendBytesFromSMARTDEVICELINK(receivedBytes, 0, receivedBytesLength);
- SmartDeviceLinkTrace.logTransportEvent("", null, InterfaceActivityDirection.Receive, receivedBytes, receivedBytesLength, SMARTDEVICELINK_LIB_TRACE_KEY);
-
- _transportListener.onTransportBytesReceived(receivedBytes, receivedBytesLength);
- } // end-if
- } catch (Exception excp) {
- DebugTool.logError(FailurePropagating_Msg + "handleBytesFromTransport: " + excp.toString(), excp);
- handleTransportError(FailurePropagating_Msg, excp);
- } // end-catch
- } // end-method
-
- // This method must be implemented by transport subclass, and is called by this
- // base class to actually send an array of bytes out over the transport. This
- // method is meant to only be callable within the class hierarchy.
- protected abstract boolean sendBytesOverTransport(byte[] msgBytes, int offset, int length);
-
- // This method is called by whomever has reference to transport to have bytes
- // sent out over transport.
- public boolean sendBytes(byte[] message) {
- return sendBytes(message, 0, message.length);
- } // end-method
-
- // This method is called by whomever has reference to transport to have bytes
- // sent out over transport.
- public boolean sendBytes(byte[] message, int offset, int length) {
- boolean bytesWereSent = false;
- synchronized (_sendLockObj) {
- bytesWereSent = sendBytesOverTransport(message, offset, length);
- } // end-lock
- // Send transport data to the siphon server
- SiphonServer.sendBytesFromAPP(message, offset, length);
-
- SmartDeviceLinkTrace.logTransportEvent("", null, InterfaceActivityDirection.Transmit, message, offset, length, SMARTDEVICELINK_LIB_TRACE_KEY);
- return bytesWereSent;
- } // end-method
-
- private ITransportListener _transportListener = null;
-
- // This method is called by the subclass to indicate that transport connection
- // has been established.
- protected void handleTransportConnected() {
- isConnected = true;
- try {
- SmartDeviceLinkTrace.logTransportEvent("Transport.connected", null, InterfaceActivityDirection.Receive, null, 0, SMARTDEVICELINK_LIB_TRACE_KEY);
- _transportListener.onTransportConnected();
- } catch (Exception excp) {
- DebugTool.logError(FailurePropagating_Msg + "onTransportConnected: " + excp.toString(), excp);
- handleTransportError(FailurePropagating_Msg + "onTransportConnected", excp);
- } // end-catch
- } // end-method
-
- // This method is called by the subclass to indicate that transport disconnection
- // has occurred.
- protected void handleTransportDisconnected(final String info) {
- isConnected = false;
-
- try {
- SmartDeviceLinkTrace.logTransportEvent("Transport.disconnect: " + info, null, InterfaceActivityDirection.Transmit, null, 0, SMARTDEVICELINK_LIB_TRACE_KEY);
- _transportListener.onTransportDisconnected(info);
- } catch (Exception excp) {
- DebugTool.logError(FailurePropagating_Msg + "onTransportDisconnected: " + excp.toString(), excp);
- } // end-catch
- } // end-method
-
- // This method is called by the subclass to indicate a transport error has occurred.
- protected void handleTransportError(final String message, final Exception ex) {
- isConnected = false;
- _transportListener.onTransportError(message, ex);
- }
-
- public abstract void openConnection() throws SmartDeviceLinkException;
- public abstract void disconnect();
-
- /**
- * Abstract method which should be implemented by subclasses in order to return actual type of the transport.
- *
- * @return One of {@link TransportType} enumeration values.
- *
- * @see TransportType
- */
- public abstract TransportType getTransportType();
-} // end-class
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransport.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransport.java
deleted file mode 100755
index beee9d72a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransport.java
+++ /dev/null
@@ -1,500 +0,0 @@
-package com.smartdevicelink.transport;
-
-import android.util.Log;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.exception.SmartDeviceLinkExceptionCause;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-
-/**
- * General comments:
- *
- * 1) Transport layer can be reorganized to properly incapsulate thread-related code according to Android OS guidelines
- * 2) Currently there are different cases when transport error information sent to listener components
- * a) when there are some errors during writing data to transport
- * b) when there are errors during connection establishing/reading data
- * But information about transport disconnection is sent only if disconnection was successful. So we have following
- * sequences:
- * a) handleTransportConnected -> read without errors -> handleTransportDisconnected
- * b) handleTransportConnected -> handleTransportError(write with errors) -> handleTransportDisconnected
- * c) handleTransportConnected -> handleTransportError(read with errors) -> handleTransportError(socket closed)
- *
- * They can be changed to be more natural and easy to use.
- *
- * 3) Public api is inconsistent. During single call of some api method (for example "openConnection") some of the
- * following result can appears:
- * a) SmartDeviceLinkException thrown
- * b) onTransportError callback called on listeners
- *
- * 4) Handling of connection must be more stable
- * 5) General solution in case of reconnecting must be implemented
- * 6) It must be common and same solution for handling information about physical device adapters (BT, WiFi etc.)
- */
-
-/**
- * Class that implements TCP transport
- */
-public class TCPTransport extends SmartDeviceLinkTransport {
-
- /**
- * Size of the read buffer.
- */
- private static final int READ_BUFFER_SIZE = 4096;
-
- /**
- * Delay between reconnect attempts
- */
- private static final int RECONNECT_DELAY = 5000;
-
- /**
- * Count of the reconnect retries
- */
- private static final int RECONNECT_RETRY_COUNT = 30;
-
- /**
- * Instance of TCP transport configuration
- */
- private TCPTransportConfig mConfig = null;
-
- /**
- * Instance of the client socket
- */
- private Socket mSocket = null;
-
- /**
- * Instance of the input stream. Used to read data from ApplinkCore
- */
- private InputStream mInputStream = null;
-
- /**
- * Instance of the output stream. Used to send data to ApplinkCore
- */
- private OutputStream mOutputStream = null;
-
- /**
- * Instance of the separate thread, that does actual work, related to connecting/reading/writing data
- */
- private TCPTransportThread mThread = null;
-
- /**
- * Initial internal state of the component. Used like a simple lightweight FSM replacement while component
- * must behave differently in response to it's public function calls depending of it's current state
- */
- private TCPTransportState mCurrentState = TCPTransportState.IDLE;
-
- /**
- * Constructs TCP transport component instance
- *
- * @param tcpTransportConfig Instance of the TCP transport configuration
- * @param transportListener Listener that will be notified on different TCP transport activities
- */
- public TCPTransport(TCPTransportConfig tcpTransportConfig, ITransportListener transportListener) {
- super(transportListener);
- this.mConfig = tcpTransportConfig;
- }
-
- /**
- * Performs actual work of sending array of bytes over the transport
- * @param msgBytes Bytes to send
- * @param offset Offset in the bytes array to send data from
- * @param length Number of bytes to send
- * @return True if data was sent successfully, False otherwise
- */
- @Override
- protected boolean sendBytesOverTransport(byte[] msgBytes, int offset, int length) {
- TCPTransportState currentState = getCurrentState();
- logInfo(String.format("TCPTransport: sendBytesOverTransport requested. Size: %d, Offset: %d, Length: %d, Current state is: %s"
- , msgBytes.length, offset, length, currentState.name()));
-
- boolean bResult = false;
-
- if(currentState == TCPTransportState.CONNECTED) {
- synchronized (this) {
- if (mOutputStream != null) {
- logInfo("TCPTransport: sendBytesOverTransport request accepted. Trying to send data");
- try {
- mOutputStream.write(msgBytes, offset, length);
- bResult = true;
- logInfo("TCPTransport.sendBytesOverTransport: successfully send data");
- } catch (IOException e) {
- logError("TCPTransport.sendBytesOverTransport: error during sending data: " + e.getMessage());
- bResult = false;
- }
- } else {
- logError("TCPTransport: sendBytesOverTransport request accepted, but output stream is null");
- }
- }
- } else {
- logInfo("TCPTransport: sendBytesOverTransport request rejected. Transport is not connected");
- bResult = false;
- }
-
- return bResult;
- }
-
- /**
- * Tries to open connection to ApplinkCore.
- * Actual try will be performed only if no actual connection is available
- * @throws SmartDeviceLinkException
- */
- @Override
- public void openConnection() throws SmartDeviceLinkException {
- TCPTransportState currentState = getCurrentState();
- logInfo(String.format("TCPTransport: openConnection requested. Current state is: %s", currentState.name()));
-
- if(currentState == TCPTransportState.IDLE) {
- synchronized (this) {
- setCurrentState(TCPTransportState.CONNECTING);
- logInfo("TCPTransport: openConnection request accepted. Starting transport thread");
- try {
- mThread = new TCPTransportThread();
- mThread.setDaemon(true);
- mThread.start();
-
- // Initialize the SiphonServer
- SiphonServer.init();
- } catch (Exception e) {
- logError("TCPTransport: Exception during transport thread starting", e);
- throw new SmartDeviceLinkException(e);
- }
- }
- } else {
- logInfo("TCPTransport: openConnection request rejected. Another connection is not finished");
- }
- }
-
-
- /**
- * Tries to disconnect from ApplinkCore.
- * Actual try will be performed only if connection is available
- */
- @Override
- public void disconnect() {
- TCPTransportState currentState = getCurrentState();
- logInfo(String.format("TCPTransport: disconnect requested from client. Current state is: %s", currentState.name()));
-
- if(currentState == TCPTransportState.CONNECTED) {
- logInfo("TCPTransport: disconnect request accepted.");
- synchronized (this) {
- disconnect(null, null, true);
- }
- } else {
- logInfo("TCPTransport: disconnect request rejected. Transport is not connected");
- }
- }
-
- /**
- * Performs actual work related to disconnecting from ApplinkCore.
- *
- * @param message Message that describes disconnect reason
- * @param exception Some of the possible exceptions that was the reason of disconnecting
- * @param stopThread True if not only disconnection must be done but also thread that handles connection must be
- * also stopped so no reconnect attempts will be made
- */
- private synchronized void disconnect(String message, Exception exception, boolean stopThread) {
-
- if(getCurrentState() == TCPTransportState.DISCONNECTING) {
- logInfo("TCPTransport: disconnecting already in progress");
- return;
- }
-
- setCurrentState(TCPTransportState.DISCONNECTING);
-
- String disconnectMsg = (message == null ? "" : message);
- if (exception != null) {
- disconnectMsg += ", " + exception.toString();
- }
-
- try {
- if(mThread != null && stopThread) {
- mThread.halt();
- mThread.interrupt();
- }
-
- if(mSocket != null){
- mSocket.close();
- }
- mSocket = null;
- } catch (IOException e) {
- logError("TCPTransport.disconnect: Exception during disconnect: " + e.getMessage());
- }
-
- if (exception == null) {
- // This disconnect was not caused by an error, notify the proxy that
- // the transport has been disconnected.
- logInfo("Disconnect is correct. Handling it");
- handleTransportDisconnected(disconnectMsg);
- } else {
- // This disconnect was caused by an error, notify the proxy
- // that there was a transport error.
- logError("Disconnect is incorrect. Handling it as error");
- handleTransportError(disconnectMsg, exception);
- }
- }
-
- /**
- * Overridden abstract method which returns specific type of this transport.
- *
- * @return Constant value - TransportType.TCP.
- *
- * @see TransportType
- */
- public TransportType getTransportType() {
- return TransportType.TCP;
- }
-
- /**
- * Internal method for logging information messages
- * @param message Message to log
- */
- protected void logInfo(String message) {
- Log.i(getClass().getName(), message);
- }
-
- /**
- * Internal method for logging error messages
- * @param message Message to log
- */
- protected void logError(String message) {
- Log.e(getClass().getName(), message);
- }
-
- /**
- * Internal method for logging warning messages
- * @param message Message to log
- */
- protected void logWarning(String message) {
- Log.w(getClass().getName(), message);
- }
-
- /**
- * Internal method for logging error message together with information about exception that was the reason of it
- * @param message Message to log
- * @param throwable Exception, that was the main reason for logged error message
- */
- protected void logError(String message, Throwable throwable) {
- Log.e(getClass().getName(), message, throwable);
- }
-
- /**
- * Internal class that represents separate thread, that does actual work, related to connecting/reading/writing data
- */
- private class TCPTransportThread extends Thread {
-
- /**
- * Represents current thread state - halted or not. This flag is used to change internal behavior depending
- * on current state.
- */
- private Boolean isHalted = false;
-
- /**
- * Method that marks thread as halted.
- */
- public void halt() {
- isHalted = true;
- }
-
- /**
- * Tries to connect to the applink core. Behavior depends autoReconnect configuration param:
- * a) If autoReconnect is false, then only one connect try will be performed.
- * b) If autoReconnect is true, then in case of connection error continuous reconnect will be performed
- * after short delay until connection will be established or retry count will be reached
- *
- * @return true if connection established and false otherwise
- */
- private boolean connect() {
- boolean bConnected;
- int remainingRetry = RECONNECT_RETRY_COUNT;
-
- synchronized (TCPTransport.this) {
- do {
- try {
-
- if ((null != mSocket) && (!mSocket.isClosed())) {
- logInfo("TCPTransport.connect: Socket is not closed. Trying to close it");
- mSocket.close();
- }
-
- logInfo(String.format("TCPTransport.connect: Socket is closed. Trying to connect to %s", mConfig));
- mSocket = new Socket();
- mSocket.connect(new InetSocketAddress(mConfig.getIPAddress(), mConfig.getPort()));
- mOutputStream = mSocket.getOutputStream();
- mInputStream = mSocket.getInputStream();
-
- } catch (IOException e) {
- logError("TCPTransport.connect: Exception during connect stage: " + e.getMessage());
- }
-
- bConnected = (null != mSocket) && mSocket.isConnected();
-
- if(bConnected){
- logInfo("TCPTransport.connect: Socket connected");
- }else{
- if(mConfig.getAutoReconnect()){
- remainingRetry--;
- logInfo(String.format("TCPTransport.connect: Socket not connected. AutoReconnect is ON. retryCount is: %d. Waiting for reconnect delay: %d"
- , remainingRetry, RECONNECT_DELAY));
- waitFor(RECONNECT_DELAY);
- } else {
- logInfo("TCPTransport.connect: Socket not connected. AutoReconnect is OFF");
- }
- }
- } while ((!bConnected) && (mConfig.getAutoReconnect()) && (remainingRetry > 0) && (!isHalted));
-
- return bConnected;
- }
- }
-
- /**
- * Performs actual thread work
- */
- @Override
- public void run() {
- logInfo("TCPTransport.run: transport thread created. Starting connect stage");
-
- while(!isHalted) {
- setCurrentState(TCPTransportState.CONNECTING);
- if(!connect()){
- if (isHalted) {
- logInfo("TCPTransport.run: Connection failed, but thread already halted");
- } else {
- disconnect("Failed to connect to SMARTDEVICELINK", new SmartDeviceLinkException("Failed to connect to SMARTDEVICELINK"
- , SmartDeviceLinkExceptionCause.SMARTDEVICELINK_CONNECTION_FAILED), true);
- }
- break;
- }
-
- synchronized (TCPTransport.this) {
- setCurrentState(TCPTransportState.CONNECTED);
- handleTransportConnected();
- }
-
- byte[] buffer = new byte[READ_BUFFER_SIZE];
-
- while (!isHalted) {
- logInfo("TCPTransport.run: Waiting for data...");
- int bytesRead;
- try {
- bytesRead = mInputStream.read(buffer);
- } catch (IOException e) {
- internalHandleStreamReadError();
- break;
- }
-
- synchronized (TCPTransport.this) {
- if (mThread.isInterrupted()) {
- logInfo("TCPTransport.run: Got new data but thread is interrupted");
- break;
- }
- }
-
- logInfo("TCPTransport.run: Got new data");
- if (-1 == bytesRead) {
- internalHandleTCPDisconnect();
- break;
- } else if (0 == bytesRead) {
- logInfo("TCPTransport.run: Received zero bytes");
- } else {
- logInfo(String.format("TCPTransport.run: Received %d bytes", bytesRead));
- synchronized (TCPTransport.this) {
- handleReceivedBytes(buffer, bytesRead);
- }
- }
- }
- }
-
- logInfo("TCPTransport.run: Thread terminated");
- setCurrentState(TCPTransportState.IDLE);
- }
-
- /**
- * Internal handling of Tcp disconnection
- */
- private void internalHandleTCPDisconnect() {
- if(isHalted){
- logInfo("TCPTransport.run: TCP disconnect received, but thread already halted");
- } else {
- logInfo("TCPTransport.run: TCP disconnect received");
- disconnect("TCPTransport.run: End of stream reached", null, false);
- }
- }
-
- /**
- * Internal handling of reading data from input stream
- */
- private void internalHandleStreamReadError() {
- if(isHalted){
- logError("TCPTransport.run: Exception during reading data, but thread already halted");
- } else {
- logError("TCPTransport.run: Exception during reading data");
- disconnect("Failed to read data from SMARTDEVICELINK", new SmartDeviceLinkException("Failed to read data from SMARTDEVICELINK"
- , SmartDeviceLinkExceptionCause.SMARTDEVICELINK_CONNECTION_FAILED), false);
- }
- }
- }
-
- /**
- * Returns current TCP transport state
- *
- * @return current state
- */
- private synchronized TCPTransportState getCurrentState() {
- return mCurrentState;
- }
-
- /**
- * Sets current TCP transport state
- * @param currentState New state
- */
- private synchronized void setCurrentState(TCPTransportState currentState) {
- logInfo(String.format("Current state changed to: %s", currentState));
- this.mCurrentState = currentState;
- }
-
- /**
- * Implementation of waiting required delay that cannot be interrupted
- * @param timeMs Time in milliseconds of required delay
- */
- private void waitFor(long timeMs) {
- long endTime = System.currentTimeMillis() +timeMs;
- while (System.currentTimeMillis() < endTime) {
- synchronized (this) {
- try {
- wait(endTime - System.currentTimeMillis());
- } catch (Exception e) {
- // Nothing To Do, simple wait
- }
- }
- }
- }
-
- /**
- * Defines available states of the TCP transport
- */
- private enum TCPTransportState {
- /**
- * TCP transport is created. No connection opened
- */
- IDLE,
-
- /**
- * TCP transport is in progress of establishing connection.
- */
- CONNECTING,
-
- /**
- * TCP transport is connected to applink core
- */
- CONNECTED,
-
- /**
- * TCP transport is in progress of disconnecting
- */
- DISCONNECTING
- }
-} // end-class
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransportConfig.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransportConfig.java
deleted file mode 100755
index a8ab3f1a8..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TCPTransportConfig.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.smartdevicelink.transport;
-
-/**
- * Container of TCP transport specific configuration.
- */
-public final class TCPTransportConfig extends BaseTransportConfig {
-
- /**
- * Value of port to use in TCP connection.
- */
- private final int mPort;
-
- /**
- * Value of IP address to use in TCP connection.
- */
- private final String mIpAddress;
-
- /**
- * Value of flag which is set to true if tcp connection must be automatically reestablished in case of disconnection
- */
- private final boolean mAutoReconnect;
-
- /**
- * Constructor. Objects of this class must be created for known port and IP address value.
- *
- * @param port Port for TCP connection.
- * @param ipAddress IP address for TCP connection.
- * @param autoReconnect Flag which must be set to true if tcp connection must be automatically reestablished in
- * case of disconnection
- */
- public TCPTransportConfig(int port, String ipAddress, boolean autoReconnect) {
- mPort = port;
- mIpAddress = ipAddress;
- mAutoReconnect = autoReconnect;
- }
-
- /**
- * Gets value of Port.
- *
- * @return Port for TCP connection.
- */
- public int getPort() {
- return mPort;
- }
-
- /**
- * Gets value of IP address.
- *
- * @return IP address for TCP connection.
- */
- public String getIPAddress() {
- return mIpAddress;
- }
-
- /**
- * Gets value of AutoReconnect
- * @return Flag that determines automatic reconnection
- */
- public boolean getAutoReconnect() {
- return mAutoReconnect;
- }
-
- /**
- * Overridden abstract method which returns specific type of this transport configuration.
- *
- * @return Constant value TransportType.TCP.
- *
- * @see TransportType
- */
- public TransportType getTransportType() {
- return TransportType.TCP;
- }
-
- @Override
- public String toString() {
- return "TCPTransportConfig{" +
- "Port=" + mPort +
- ", IpAddress='" + mIpAddress + '\'' +
- ", AutoReconnect=" + mAutoReconnect +
- '}';
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TransportType.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TransportType.java
deleted file mode 100755
index 29ea4c435..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/transport/TransportType.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.smartdevicelink.transport;
-
-/**
- * Defines available types of the transports.
- */
-public enum TransportType {
-
- /**
- * Transport type is Bluetooth.
- */
- BLUETOOTH,
-
- /**
- * Transport type is TCP.
- */
- TCP
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Base64.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Base64.java
deleted file mode 100755
index 50b1fd4af..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Base64.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.smartdevicelink.util;
-
-public class Base64 {
-
- private static final String defaultString = "Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure";
-
- private static char[] map = new char[64];
- private static byte[] unmap = new byte['z' + 1];
- static {
- byte i = 0;
- for (char c = 'A'; c <= 'Z'; c++) {
- unmap[c] = i;
- map[i++] = c;
- }
- for (char c = 'a'; c <= 'z'; c++) {
- unmap[c] = i;
- map[i++] = c;
- }
- for (char c = '0'; c <= '9'; c++) {
- unmap[c] = i;
- map[i++] = c;
- }
- unmap['+'] = i;
- map[i++] = '+';
- unmap['/'] = i;
- map[i++] = '/';
-
- unmap['='] = 0;
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
-
- String toEncode = defaultString;
- if (args.length > 0) {
- toEncode = args[0];
- }
- System.out.println(toEncode);
- String encoded = encode(toEncode.getBytes());
- System.out.println(encoded);
- String decoded = new String(decode(encoded));
- System.out.println(decoded);
- }
-
- public static String encode(byte[] toEncode) {
-
- int iSrc = 0;
- int iDest = 0;
- int srcLen = toEncode.length;
- int destLen = (srcLen * 4 + 2) / 3;
- int padLen = ((srcLen + 2) / 3) * 4;
- char[] dest = new char[padLen];
-
- while (iSrc < srcLen) {
- int src1 = toEncode[iSrc++];
- int src2 = (iSrc < srcLen) ? toEncode[iSrc++] : 0;
- int src3 = (iSrc < srcLen) ? toEncode[iSrc++] : 0;
- int dest1 = (src1 >>> 2);
- int dest2 = (src1 << 4) | (src2 >> 4);
- dest2 &= 0x3F;
- int dest3 = (src2 << 2) | (src3 >>> 6);
- dest3 &= 0x3F;
- int dest4 = src3 & 0x3F;
- dest[iDest++] = map[dest1];
- dest[iDest++] = map[dest2];
- dest[iDest] = iDest < destLen ? map[dest3] : '=';
- iDest++;
- dest[iDest] = iDest < destLen ? map[dest4] : '=';
- iDest++;
- }
-
- return new String(dest);
- }
-
- public static byte[] decode(String toDecode) {
- int iSrc = 0;
- int iDest = 0;
- char[] src = toDecode.toCharArray();
- int srcLen = src.length;
- int destLen = ((srcLen / 4) * 3);
- if (src[srcLen - 1] == '=') {
- destLen--;
- }
- if (src[srcLen - 2] == '=') {
- destLen--;
- }
- byte[] dest = new byte[destLen];
-
- while (iSrc < srcLen) {
- byte src1 = unmap[src[iSrc++]];
- byte src2 = unmap[src[iSrc++]];
- byte src3 = unmap[src[iSrc++]];
- byte src4 = unmap[src[iSrc++]];
- int dest1 = (src1 << 2) | (src2 >>> 4);
- int dest2 = (src2 << 4) | (src3 >>> 2);
- int dest3 = (src3 << 6) | src4;
- dest[iDest++] = (byte) dest1;
- if (iDest < destLen) {
- dest[iDest++] = (byte) dest2;
- }
- if (iDest < destLen) {
- dest[iDest++] = (byte) dest3;
- }
- }
-
- return dest;
- }
-
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/BitConverter.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/BitConverter.java
deleted file mode 100755
index 4cb1927b1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/BitConverter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.smartdevicelink.util;
-
-public class BitConverter {
- public static String bytesToHex(byte [] bytes) {
- return bytesToHex(bytes, 0, bytes.length);
- } // end-method
-
- public static String bytesToHex(byte[] bytes, int offset, int length) {
- if (bytes == null) { return null; }
- final char[] HexDigits = new char[] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
- byte b;
- char[] hexChars = new char[2 * length];
- //StringBuffer sb = new StringBuffer();
- int upperBound = Math.min(bytes.length, (offset + length));
- int baidx = 0;
- int sidx = 0;
- for (baidx = offset; baidx < upperBound; baidx++) {
- // Get the byte from the array
- b = bytes[baidx];
- // Use nibbles as index into hex digit array (left nibble, then right)
- hexChars[sidx++] = HexDigits[(b & 0xf0) >> 4];
- hexChars[sidx++] = HexDigits[(b & 0x0f)];
- } // end-for
- return new String(hexChars);
- } // end-method
-
- public static byte [] hexToBytes(String hexString) {
- if (hexString == null) { return null; }
- if (hexString.length() % 2 != 0) {
- hexString = "0" + hexString;
- }
- byte [] theBytes = new byte[hexString.length() / 2];
- for (int i = 0; i < hexString.length(); i += 2) {
- String byteString = hexString.substring(i, i + 2);
- byte theByte = (byte)Integer.parseInt(byteString, 16);
- theBytes[i/2] = theByte;
- }
- return theBytes;
- } // end-method
-
- public static final byte[] intToByteArray(int value) {
- return new byte[] {
- (byte)(value >>> 24),
- (byte)(value >>> 16),
- (byte)(value >>> 8),
- (byte)value};
- }
-
- public static int intFromByteArray(byte[] sizeBuf, int offset) {
- int ret = 0;
- for (int i = offset; i < offset + 4; i++) {
- ret <<= 8;
- ret |= 0xFF & sizeBuf[i];
- }
- return ret;
- }
-
- public static final byte[] shortToByteArray(short value) {
- return new byte[] {
- (byte)(value >>> 8),
- (byte)value};
- }
-
- public static short shortFromByteArray(byte[] sizeBuf, int offset) {
- short ret = 0;
- for (int i = offset; i < offset + 2; i++) {
- ret <<= 8;
- ret |= 0xFF & sizeBuf[i];
- }
- return ret;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/ByteEnumer.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/ByteEnumer.java
deleted file mode 100755
index 3730be66a..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/ByteEnumer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.smartdevicelink.util;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public abstract class ByteEnumer {
-
- protected ByteEnumer(byte value, String name) {
- this.value = value;
- this.name = name;
- }
-
- private byte value;
- private String name;
-
- public byte getValue() { return value; }
- public String getName() { return name; }
-
- public boolean equals(ByteEnumer other) {
- return name == other.getName();
- }
-
- public boolean eq(ByteEnumer other) {
- return equals(other);
- }
-
- public byte value() {
- return value;
- }
-
- public static ByteEnumer get(Vector theList, byte value) {
- Enumeration enumer = theList.elements();
- while (enumer.hasMoreElements()) {
- ByteEnumer current = (ByteEnumer)enumer.nextElement();
- if (current.getValue() == value) {
- return current;
- }
- }
- return null;
- }
-
- public static ByteEnumer get(Vector theList, String name) {
- Enumeration enumer = theList.elements();
- while (enumer.hasMoreElements()) {
- ByteEnumer current = (ByteEnumer)enumer.nextElement();
- if (current.getName().equals(name)) {
- return current;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/DebugTool.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/DebugTool.java
deleted file mode 100755
index 932115594..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/DebugTool.java
+++ /dev/null
@@ -1,262 +0,0 @@
-package com.smartdevicelink.util;
-
-import java.util.Vector;
-
-import android.util.Log;
-
-import com.smartdevicelink.exception.SmartDeviceLinkException;
-import com.smartdevicelink.proxy.Version;
-import com.smartdevicelink.transport.SiphonServer;
-
-public class DebugTool {
-
-
- public static final String TAG = "SmartDeviceLinkProxy";
-
- private static boolean isErrorEnabled = false;
- private static boolean isWarningEnabled = false;
- private static boolean isInfoEnabled = false;
-
- public static void enableDebugTool() {
- isErrorEnabled = true;
- isWarningEnabled = true;
- isInfoEnabled = true;
- }
-
- public static void disableDebugTool() {
- isErrorEnabled = true;
- isWarningEnabled = false;
- isInfoEnabled = false;
- }
-
- public static boolean isDebugEnabled()
- {
- if (isWarningEnabled && isInfoEnabled) return true;
-
- return false;
- }
-
- private static String prependProxyVersionNumberToString(String string) {
- if (Version.VERSION != null && string != null) {
- string = Version.VERSION + ": " + string;
- }
-
- return string;
- }
-
- public static void logError(String msg) {
-
- Boolean wasWritten = false;
-
- msg = prependProxyVersionNumberToString(msg);
-
- wasWritten = logToSiphon(msg);
-
- if (isErrorEnabled && !wasWritten) {
- NativeLogTool.logError(TAG, msg);
- }
- }
-
- public static void logError(String msg, Throwable ex) {
- Boolean wasWritten = false;
-
- msg = prependProxyVersionNumberToString(msg);
-
- if (ex != null) {
- wasWritten = logToSiphon(msg + " Exception String: " + ex.toString());
- } else {
- wasWritten = logToSiphon(msg);
- }
-
- if (isErrorEnabled && !wasWritten) {
- NativeLogTool.logError(TAG, msg, ex);
- }
- }
-
- public static void logWarning(String msg) {
- Boolean wasWritten = false;
-
- msg = prependProxyVersionNumberToString(msg);
-
- wasWritten = logToSiphon(msg);
-
- if (isWarningEnabled && !wasWritten) {
- NativeLogTool.logWarning(TAG, msg);
- }
- }
-
- public static void logInfo(String msg) {
- Boolean wasWritten = false;
-
- msg = prependProxyVersionNumberToString(msg);
-
- wasWritten = logToSiphon(msg);
-
- if (isInfoEnabled && !wasWritten) {
- NativeLogTool.logInfo(TAG, msg);
- }
- }
-
- public static void logInfo(String msg, boolean bPrependVersion) {
- Boolean wasWritten = false;
-
- if (bPrependVersion) msg = prependProxyVersionNumberToString(msg);
-
- wasWritten = logToSiphon(msg);
-
- if (isInfoEnabled && !wasWritten) {
- NativeLogTool.logInfo(TAG, msg);
- }
- }
-
- protected static Boolean logToSiphon(String msg) {
- // Initialize the SiphonServer, will be ignored if already initialized
- SiphonServer.init();
-
- // Write to the SiphonServer
- return SiphonServer.sendSiphonLogData(msg);
- }
-
- protected static String getLine(Throwable ex) {
- if (ex == null) { return null; }
- String toPrint = ex.toString() + " :" + ex.getMessage();
- for (int i=0; i<ex.getStackTrace().length; i++) {
- StackTraceElement elem = ex.getStackTrace()[i];
- toPrint += "\n " + elem.toString();
- }
-
- if (ex instanceof SmartDeviceLinkException) {
- SmartDeviceLinkException smartDeviceLinkEx = (SmartDeviceLinkException) ex;
- if (smartDeviceLinkEx.getInnerException() != null && smartDeviceLinkEx != smartDeviceLinkEx.getInnerException()) {
- toPrint += "\n nested:\n";
- toPrint += getLine(smartDeviceLinkEx.getInnerException());
- }
- }
-
- return toPrint;
- }
-
-
- protected static Vector<IConsole> consoleListenerList = new Vector<IConsole>();
-
- protected final static boolean isTransportEnabled = false;
- protected final static boolean isRPCEnabled = false;
-
- public static void addConsole(IConsole console) {
- synchronized(consoleListenerList) {
- consoleListenerList.addElement(console);
- }
- }
-
- public static void removeConsole(IConsole console) {
- synchronized(consoleListenerList) {
- consoleListenerList.removeElement(console);
- }
- }
-
- public static void clearConsoles() {
- synchronized(consoleListenerList) {
- consoleListenerList.removeAllElements();
- }
- }
-
- public static void logTransport(String msg) {
- if (isTransportEnabled) {
- Log.d(TAG, msg);
- logInfoToConsole(msg);
- }
- }
-
- public static void logRPCSend(String rpcMsg) {
- if (isRPCEnabled) {
- Log.d(TAG, "Sending RPC message: " + rpcMsg);
- logRPCSendToConsole(rpcMsg);
- }
- }
-
- public static void logRPCReceive(String rpcMsg) {
- if (isRPCEnabled) {
- Log.d(TAG, "Received RPC message: " + rpcMsg);
- logRPCSendToConsole(rpcMsg);
- }
- }
-
- protected static void logInfoToConsole(String msg) {
- Vector<IConsole> localList;
- synchronized(consoleListenerList) {
- localList = (Vector<IConsole>) consoleListenerList.clone();
- }
-
- for (int i = 0; i < localList.size(); i++) {
- IConsole consoleListener = (IConsole) localList.elementAt(i);
- try {
- consoleListener.logInfo(msg);
- } catch (Exception ex) {
- Log.e(TAG, "Failure propagating logInfo: " + ex.toString(), ex);
- } // end-catch
- }
- }
-
- protected static void logErrorToConsole(String msg) {
- Vector<IConsole> localList;
- synchronized(consoleListenerList) {
- localList = (Vector<IConsole>) consoleListenerList.clone();
- }
- for (int i = 0; i < localList.size(); i++) {
- IConsole consoleListener = (IConsole) localList.elementAt(i);
- try {
- consoleListener.logError(msg);
- } catch (Exception ex) {
- Log.e(TAG, "Failure propagating logError: " + ex.toString(), ex);
- } // end-catch
- }
- }
-
- protected static void logErrorToConsole(String msg, Throwable e) {
- Vector<IConsole> localList;
- synchronized(consoleListenerList) {
- localList = (Vector<IConsole>) consoleListenerList.clone();
- }
-
- for (int i = 0; i < localList.size(); i++) {
- IConsole consoleListener = (IConsole) localList.elementAt(i);
- try {
- consoleListener.logError(msg, e);
- } catch (Exception ex) {
- Log.e(TAG, "Failure propagating logError: " + ex.toString(), ex);
- } // end-catch
- }
- }
-
- protected static void logRPCSendToConsole(String msg) {
- Vector<IConsole> localList;
- synchronized(consoleListenerList) {
- localList = (Vector<IConsole>) consoleListenerList.clone();
- }
-
- for (int i = 0; i < localList.size(); i++) {
- IConsole consoleListener = (IConsole) localList.elementAt(i);
- try {
- consoleListener.logRPCSend(msg);
- } catch (Exception ex) {
- Log.e(TAG, "Failure propagating logRPCSend: " + ex.toString(), ex);
- } // end-catch
- }
- }
-
- protected static void logRPCReceiveToConsole(String msg) {
- Vector<IConsole> localList;
- synchronized(consoleListenerList) {
- localList = (Vector<IConsole>) consoleListenerList.clone();
- }
-
- for (int i = 0; i < localList.size(); i++) {
- IConsole consoleListener = (IConsole) localList.elementAt(i);
- try {
- consoleListener.logRPCReceive(msg);
- } catch (Exception ex) {
- Log.e(TAG, "Failure propagating logRPCReceive: " + ex.toString(), ex);
- } // end-catch
- }
- }
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/IConsole.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/IConsole.java
deleted file mode 100755
index 8d6d4a0f1..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/IConsole.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.smartdevicelink.util;
-
-
-public interface IConsole {
- void logInfo(String msg);
- void logError(String msg);
- void logError(String msg, Throwable ex);
- void logRPCSend(String rpcMsg);
- void logRPCReceive(String rpcMsg);
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Mime.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Mime.java
deleted file mode 100755
index ae124a139..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/Mime.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package com.smartdevicelink.util;
-
-public class Mime {
-
- private static String m_base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
- public static Boolean isSafeASCII(String check) {
- if (check.contains("&") || check.contains("<") || check.contains("]]") || check.contains("}") )
- return false; // these things aren't reliably CDATA encodable
-
- return true;
- }
-
- public static String base64Encode(String toEncode) {
-
- byte[] bytesToEncode = new byte[toEncode.length()];
- for (int i=0; i< toEncode.length(); i++)
- bytesToEncode[i] = (byte)toEncode.charAt(i);
-
- StringBuilder sb = new StringBuilder();
-
- int idxin = 0;
- int b64idx = 0;
-
- for (idxin=0;idxin < bytesToEncode.length;idxin++) {
- switch (idxin % 3) {
- case 0:
- b64idx = (bytesToEncode[idxin] >> 2) & 0x3f;
- break;
- case 1:
- b64idx = (bytesToEncode[idxin] >> 4) & 0x0f;
- b64idx |= ((bytesToEncode[idxin-1] << 4)& 0x30);
- break;
- case 2:
- b64idx = (bytesToEncode[idxin] >> 6) & 0x03;
- b64idx |= ((bytesToEncode[idxin-1] << 2)& 0x3c);
- sb.append(m_base64Chars.charAt(b64idx));
- b64idx = bytesToEncode[idxin] & 0x3f;
- break;
- } // end-switch
- sb.append(m_base64Chars.charAt(b64idx));
- } // end-for
-
- switch (idxin % 3) {
- case 0:
- break;
- case 1:
- b64idx = (bytesToEncode[idxin-1] << 4) & 0x30;
- sb.append(m_base64Chars.charAt(b64idx));
- sb.append("==");
- break;
- case 2:
- b64idx = ((bytesToEncode[idxin-1] << 2)& 0x3c);
- sb.append(m_base64Chars.charAt(b64idx));
- sb.append('=');
- break;
- } // end-switch
-
- return sb.toString();
- } // end-method
-
-
- private byte[] base64Decode(String base64String) {
- byte[] outBytes = null;
- byte[] base64ASCIIString = null;
- final String ASCII_Encoding = "US-ASCII";
-
- // Convert b64 string to raw bytes
- try {
- base64ASCIIString = base64String.getBytes(ASCII_Encoding);
- } catch (Exception ex){
- // TODO
- //publishStatus("Failure converting b64string to ASCII string: " + ex.toString());
- return null;
- }
-
- if (!m_decodeInitComplete) {
- m_decodeInitComplete = true;
- initForDecode();
- } // end-if
-
- int numInChars = base64ASCIIString.length;
-
- if ((numInChars % 4) > 0) {
- return null;
- } // end-if
-
- int numOutBytes = base64ASCIIString.length / 4;
- numOutBytes *= 3;
- int eqpos = base64String.indexOf("=");
- if (eqpos >= 0) {
- numOutBytes--;
- if (base64String.substring(eqpos).indexOf("==") >= 0) {
- numOutBytes--;
- } // end-if
- } // end-if
- outBytes = new byte[numOutBytes];
-
- byte b64idxbits = 0x00;
- int iidx = 0, oidx = 0;
- byte writeByte = 0x00;
- byte b64ASCIIChar = 0x00;
- for (iidx=0, oidx=0;iidx < numInChars;iidx++) {
- b64ASCIIChar = base64ASCIIString[iidx];
- if (b64ASCIIChar == 0x3d /*'='*/) {
- return outBytes;
- } // end-if
-
- if (!isb64char(b64ASCIIChar)) {
- return null;
- } // end-if
-
- switch (iidx % 4) {
- case 0:
- break;
- case 1:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)((b64idxbits << 2) | ((b64decode[b64ASCIIChar] >> 4) & 0x03));
- outBytes[oidx++] = writeByte;
- break;
- case 2:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)(((b64idxbits << 4) & 0xf0) | ((b64decode[b64ASCIIChar] >> 2) & 0x0f));
- outBytes[oidx++] = writeByte;
- break;
- case 3:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)(((b64idxbits << 6) & 0xc0) | ((b64decode[b64ASCIIChar]) & 0x3f));
- outBytes[oidx++] = writeByte;
- break;
- } // end-switch
- } // end-for
-
- return outBytes;
-
- } // end-method
-
-
- private static byte[] b64decode = new byte[256];
- // A-Z is 0x41-0x5a
- // a-z is 0x61-0x7a
- // 0-9 is 0x30-0x39
- // + is 0x2b
- // / is 0x2f
-
- private static boolean m_decodeInitComplete = false;
-
- private void initForDecode() {
- int aidx = 0;
- int lidx = 0;
- // Set A-Z
- for (aidx=0x41, lidx=0;aidx <= 0x5a;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set a-z
- for (aidx=0x61;aidx <= 0x7a;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set 0-9
- for (aidx=0x30;aidx <= 0x39;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set '+'
- b64decode[0x2b] = (byte)lidx++;
- // Set '/'
- b64decode[0x2f] = (byte)lidx++;
- } // end-method
-
- private boolean isb64char(byte b) {
- // A-Z is 0x41-0x5a
- // a-z is 0x61-0x7a
- // 0-9 is 0x30-0x39
- // + is 0x2b
- // / is 0x2f
- return ( (b >= 0x41 && b <= 0x5a)
- || (b >= 0x61 && b <= 0x7a)
- || (b >= 0x30 && b <= 0x39)
- || (b == 0x2b)
- || (b == 0x2f)
- );
- } // end-method
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/NativeLogTool.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/NativeLogTool.java
deleted file mode 100755
index d4cb847f2..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/NativeLogTool.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.smartdevicelink.util;
-
-import android.util.Log;
-
-import com.smartdevicelink.proxy.SmartDeviceLinkProxyBase;
-
-public class NativeLogTool {
-
- static private boolean logToSystemEnabled = true;
- private static final int ChunkSize = 4000;
-
- private enum LogTarget {
- Info
- ,Warning
- ,Error
- }
-
- public static void setEnableState(boolean en) {
- logToSystemEnabled = en;
- } // end-method
-
- public static boolean isEnabled() {
- return logToSystemEnabled;
- } // end-method
-
- public static void logInfo(String message) {
- logInfo(SmartDeviceLinkProxyBase.TAG, message);
- }
-
- public static void logInfo(String tag, String message) {
- if (logToSystemEnabled) {
- log(LogTarget.Info, tag, message);
- }
- }
-
- public static void logWarning(String message) {
- logWarning(SmartDeviceLinkProxyBase.TAG, message);
- }
-
- public static void logWarning(String tag, String message) {
- if (logToSystemEnabled) {
- log(LogTarget.Warning, tag, message);
- }
- }
-
- public static void logError(String message) {
- logError(SmartDeviceLinkProxyBase.TAG, message);
- }
-
- public static void logError(String tag, String message) {
- if (logToSystemEnabled) {
- log(LogTarget.Error, tag, message);
- }
- }
-
- public static void logError(String message, Throwable t) {
- logError(SmartDeviceLinkProxyBase.TAG, message, t);
- }
-
- public static void logError(String tag, String message, Throwable t) {
- // If the call to logError is passed a throwable, write directly to the system log
- if (logToSystemEnabled) {
- Log.e(tag, message, t);
- }
- }
-
- private static void log(LogTarget ltarg, String source, String logMsg) {
- // Don't log empty messages
- if (logMsg == null || logMsg.length() == 0) {
- return;
- } // end-if
-
- int bytesWritten = 0;
- int substrSize = 0;
- String tag = source;
- String chunk = null;
- try {
- for (int idx=0;idx < logMsg.length();idx += substrSize) {
- substrSize = Math.min(ChunkSize, logMsg.length() - idx);
- chunk = logMsg.substring(idx, idx + substrSize);
- switch (ltarg) {
- case Info:
- bytesWritten = Log.i(tag, chunk);
- break;
- case Warning:
- bytesWritten = Log.w(tag, chunk);
- break;
- case Error:
- bytesWritten = Log.e(tag, chunk);
- break;
- } // end-switch
- if (bytesWritten < chunk.length()) {
- Log.e(SmartDeviceLinkProxyBase.TAG, "Calling Log.e: msg length=" + chunk.length() + ", bytesWritten=" + bytesWritten);
- } // end-if
- } // end-while
- } catch (Exception ex) {
- Log.e(SmartDeviceLinkProxyBase.TAG, "Failure writing " + ltarg.name() + " fragments to android log:" + ex.toString());
- } // end-catch
- } // end-method
-}
diff --git a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/StringEnumer.java b/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/StringEnumer.java
deleted file mode 100755
index 34ab1a300..000000000
--- a/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/util/StringEnumer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.smartdevicelink.util;
-
-import java.util.Vector;
-
-public abstract class StringEnumer {
-
- protected StringEnumer(int value, String name) {
- this.value = value;
- this.name = name;
- }
-
- private int value;
- private String name;
-
- public int getValue() { return value; }
- public String getName() { return name; }
-
- public boolean equals(StringEnumer other) {
- return name == other.getName();
- }
-
- public boolean eq(StringEnumer other) {
- return equals(other);
- }
-
- public String toString() {
- return name;
- }
-
- public static StringEnumer get(Vector<? extends StringEnumer> theList, int value) {
- for (StringEnumer current : theList) {
- if (current.getValue() == value) {
- return current;
- }
- }
- return null;
- }
-
- public static StringEnumer get(Vector<? extends StringEnumer> theList, String name) {
- for (StringEnumer current : theList) {
- if (current.getName().equalsIgnoreCase(name)) {
- return current;
- }
- }
- return null;
- }
-}
diff --git a/SDL_Core/CMakeLists.txt b/SDL_Core/CMakeLists.txt
deleted file mode 100644
index befbf48df..000000000
--- a/SDL_Core/CMakeLists.txt
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.0)
-
-set (PROJECT smartDeviceLinkCore)
-project (${PROJECT})
-
-option(HMI2 "Use Qt HMI" OFF)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
-
-# Please do not change compiler/linker flags if You do not know how particular
-# flag is handled by CMake
-set(CMAKE_INSTALL_PREFIX .)
-set(ARCHIVE_OUTPUT_DIRECTORY ./bin)
-
-option(EXTENDED_MEDIA_MODE "Turn on and off extended Madia Manager features relates to PulseAudio A2DP and GStreamer" OFF)
-option(BUILD_SHARED_LIBS "Build all libraries as shared (if ON) or static (if OFF)" OFF)
-option(BUILD_BT_SUPPORT "Bluetooth support" OFF)
-option(BUILD_USB_SUPPORT "libusb support" OFF)
-option(BUILD_AVAHI_SUPPORT "libavahi support" OFF)
-option(BUILD_RWLOCK_SUPPORT "rwlocks support" OFF)
-option(BUILD_BACKTRACE_SUPPORT "backtrace support" ON)
-
-
-if (UNIX)
- add_definitions(-DOS_POSIX)
-
- set(CMAKE_CXX_FLAGS "-g3 -ggdb3 -std=gnu++0x -Werror=return-type -Wuninitialized")
- set(CMAKE_CXX_FLAGS_RELEASE "-s -O2") #It will be appended to CMAKE_CXX_FLAGS in release
-
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_definitions(-DOS_LINUX)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "QNX")
- add_definitions(-DOS_QNX)
- SET(BUILD_BT_SUPPORT OFF)
- SET(BUILD_AVAHI_SUPPORT OFF)
- SET(BUILD_BACKTRACE_SUPPORT OFF)
- SET(EXTENDED_MEDIA_MODE OFF)
- elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
- add_definitions(-DOS_MACOSX)
- #compile 32-bit 64-bit is having an issue
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386")
- endif()
-endif(UNIX)
-
-if (BUILD_USB_SUPPORT)
- add_definitions(-DUSB_SUPPORT)
-endif()
-
-if (BUILD_BT_SUPPORT)
- add_definitions(-DBLUETOOTH_SUPPORT)
-endif()
-
-if (BUILD_AVAHI_SUPPORT)
- # --- Check libavahi-common, libavahi-client availability
- find_package(Libavahi)
-
- add_definitions(-DAVAHI_SUPPORT)
-endif()
-
-if (BUILD_RWLOCK_SUPPORT)
- add_definitions(-DRWLOCK_SUPPORT)
-endif()
-
-if (BUILD_BACKTRACE_SUPPORT)
- add_definitions(-DBACKTRACE_SUPPORT)
-endif()
-
-# TODO(AK): check current OS here
-add_definitions(-DOS_POSIX)
-
-IF(CMAKE_C_FLAGS_DEBUG)
- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG" )
- add_definitions(-DDEBUG)
-
- # Enable debug mode in the GNU C++ library, to catch incorrect/undefined behavior
- add_definitions(-D_GLIBCXX_DEBUG)
- add_definitions(-D_GLIBCXX_DEBUG_PEDANTIC)
-ELSE (CMAKE_C_FLAGS_DEBUG)
- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRELEASE" )
- add_definitions(-DRELEASE)
-ENDIF(CMAKE_C_FLAGS_DEBUG)
-
-
-if (EXTENDED_MEDIA_MODE)
-add_definitions(-DEXTENDED_MEDIA)
-# required to find 'glibconfig.h'
-find_package(PkgConfig)
-pkg_check_modules(GLIB2 REQUIRED glib-2.0)
-add_definitions(${GLIB2_CFLAGS})
-endif()
-
-# Find log4cxx
-if(UNIX)
- find_package(PkgConfig)
- pkg_check_modules(LOG4CXX REQUIRED liblog4cxx)
- include_directories(${LOG4CXX_INCLUDE_DIRS})
- link_directories(${LOG4CXX_LIBRARY_DIRS})
-elseif(WIN32)
-# Add finding log4cxx here
-endif(UNIX)
-
-
-# --- Interface generator
-
-find_package(PythonInterp)
-if(NOT PYTHONINTERP_FOUND)
- message(ERROR "Python interpreter is not found")
- message(ERROR "To install it type in the command line:")
- message(ERROR "sudo apt-get install python")
-endif(NOT PYTHONINTERP_FOUND)
-
-if (${HMI2})
- cmake_minimum_required(VERSION 2.8.11)
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- set(qt_version "4.8.5")
- else ()
- set(qt_version "5.1.0")
- endif ()
-
- execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version}
- OUTPUT_VARIABLE qt_bin_dir
- )
- message(STATUS "Binary directory Qt ${qt_version} is ${qt_bin_dir}")
- set(ENV{PATH} ${qt_bin_dir}:$ENV{PATH})
-
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- find_package(Qt4 ${qt_version} REQUIRED QtCore QtGui QtDBus QtDeclarative)
- else ()
- find_package(Qt5Core REQUIRED)
- find_package(Qt5DBus REQUIRED)
- find_package(Qt5Qml REQUIRED)
- find_package(Qt5Quick REQUIRED)
- set(qmlplugindump_binary ${qt_bin_dir}/qmlplugindump)
- endif ()
-endif()
-
-set(INTEFRACE_GENERATOR "${PROJECT_SOURCE_DIR}/tools/InterfaceGenerator/Generator.py")
-set(INTEFRACE_GENERATOR_CMD ${PYTHON_EXECUTABLE} -B ${INTEFRACE_GENERATOR})
-file(GLOB_RECURSE INTERFACE_GENERATOR_DEPENDENCIES "${PROJECT_SOURCE_DIR}/tools/InterfaceGenerator/*.*")
-
-macro (GenerateInterface arg_xml_name arg_namespace parser_type)
- string(REGEX MATCH "^[a-zA-Z_0-9]*[^.]" file_name ${arg_xml_name}) # TODO: make expression more robust
-
- set(hpp_file
- "${CMAKE_CURRENT_BINARY_DIR}/${file_name}.h"
- "${CMAKE_CURRENT_BINARY_DIR}/${file_name}_schema.h"
- )
-
- set(cpp_file "${CMAKE_CURRENT_BINARY_DIR}/${file_name}_schema.cc")
- set(full_xml_name "${CMAKE_CURRENT_SOURCE_DIR}/${arg_xml_name}")
-
- add_custom_command( OUTPUT ${hpp_file} ${cpp_file}
- COMMAND ${INTEFRACE_GENERATOR_CMD} ${full_xml_name} ${arg_namespace} ${CMAKE_CURRENT_BINARY_DIR} "--parser-type" "${parser_type}"
- DEPENDS ${INTERFACE_GENERATOR_DEPENDENCIES} ${full_xml_name}
- COMMENT "Generating files:\n ${hpp_file}\n ${cpp_file}\nfrom:\n ${arg_xml_name} ..."
- VERBATIM
- )
-
- include_directories (
- ../../../src/components/smart_objects/include
- ../../../src/components/formatters/include/
- ${CMAKE_SOURCE_DIR}/src/components/formatters/include/
- ${CMAKE_BINARY_DIR}
- )
-
- add_library("${file_name}" ${cpp_file})
-endmacro(GenerateInterface)
-
-# --- Useful macro
-macro(create_test NAME SOURCES LIBS)
- add_executable("${NAME}" ${SOURCES})
- target_link_libraries("${NAME}" ${LIBS})
- add_test(${NAME} ${NAME})
-endmacro(create_test)
-
-# Building application
-
-# --- Type HMI
-if (${HMI2})
- set(QT_HMI ON)
- add_definitions(-DQT_HMI)
-else (${HMI2})
- set(WEB_HMI ON)
- add_definitions(-DWEB_HMI)
-ENDIF (${HMI2})
-
-# --- ThirdPartyLibs
-add_subdirectory(./src/thirdPartyLibs)
-
-# --- Tools
-add_subdirectory(./tools)
-
-# --- Components
-add_subdirectory(./src/components)
-
-# --- Main application
-add_subdirectory(./src/appMain)
-
-# Building tests
-option(BUILD_TESTS "Possibility to build and run tests" OFF)
-if(BUILD_TESTS)
- enable_testing()
- include(Dart)
- # Framework GoogleTest is also integrated together gmock
- # and must not be added separately
- add_subdirectory(./src/thirdPartyLibs/gmock-1.6.0)
- add_subdirectory(./test)
-endif()
-
-# Building documentation
-
-# At first creating directory for generated documentation. Unfortunately doxygen
-# cannot generate it byself
-FIND_PACKAGE(Doxygen)
- IF(DOXYGEN_FOUND)
- option(DOXYGEN_ENABLE_DIAGRAMS "Enable graphical diagram generation" ON)
-
- if(DOXYGEN_ENABLE_DIAGRAMS)
- set(DOXYGEN_ENABLE_DIAGRAMS_PARAM "YES")
- else(DOXYGEN_ENABLE_DIAGRAMS)
- set(DOXYGEN_ENABLE_DIAGRAMS_PARAM "NO")
- endif()
- configure_file("${PROJECT_SOURCE_DIR}/Doxyfile" "${PROJECT_BINARY_DIR}/Doxyfile")
- file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc/doxygen")
- ADD_CUSTOM_TARGET(doxygen COMMAND ${DOXYGEN_EXECUTABLE} "${PROJECT_BINARY_DIR}/Doxyfile")
- ELSE(DOXYGEN_FOUND)
- MESSAGE(STATUS "Doxygen not found. Documentation will not be generated")
- MESSAGE(STATUS "To enable documentation generation please install doxygen and graphviz packages")
- MESSAGE(STATUS "sudo apt-get install doxygen graphviz")
- MESSAGE(STATUS "To enable processing of MscGen comments please install mscgen")
- MESSAGE(STATUS "sudo apt-get install mscgen")
-ENDIF(DOXYGEN_FOUND)
-
-
diff --git a/SDL_Core/Doxyfile b/SDL_Core/Doxyfile
deleted file mode 100644
index e641d760f..000000000
--- a/SDL_Core/Doxyfile
+++ /dev/null
@@ -1,1917 +0,0 @@
-# Doxyfile 1.8.3.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME = SmartDeviceLink
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = doc
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = YES
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip. Note that you specify absolute paths here, but also
-# relative paths, which will be relative from the directory where doxygen is
-# started.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension,
-# and language is one of the parsers supported by doxygen: IDL, Java,
-# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
-# C++. For instance to make doxygen treat .inc files as Fortran files (default
-# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
-# that for custom extensions you also need to set FILE_PATTERNS otherwise the
-# files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
-MARKDOWN_SUPPORT = YES
-
-# When enabled doxygen tries to link words that correspond to documented classes,
-# or namespaces to their corresponding documentation. Such a link can be
-# prevented in individual cases by by putting a % sign in front of the word or
-# globally by setting AUTOLINK_SUPPORT to NO.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = YES
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = YES
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES (the
-# default) will make doxygen replace the get and set methods by a property in
-# the documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if section-label ... \endif
-# and \cond section-label ... \endcond blocks.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path. Do not use
-# file names with spaces, bibtex cannot handle them.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = ./
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.for \
- *.vhd \
- *.vhdl \
- *.txt
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE = **/CMakeLists.txt \
- src/thirdPartyLibs \
- tools/FlexeLint \
- tools/OtrosLogViewer \
- tools/coding-style \
- tools/InterfaceGenerator/ \
- test/
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page (index.html).
-# This can be useful if you have a project on for instance GitHub and want reuse
-# the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C, C++ and Fortran comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If left blank doxygen will
-# generate a default style sheet. Note that it is recommended to use
-# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
-# tag will in the future become obsolete.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
-# user-defined cascading style sheet that is included after the standard
-# style sheets created by doxygen. Using this option one can overrule
-# certain style aspects. This is preferred over using HTML_STYLESHEET
-# since it does not replace the standard style sheet and is therefor more
-# robust against future updates. Doxygen will copy the style sheet file to
-# the output directory.
-
-HTML_EXTRA_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 200
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 100
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
-# identify the documentation publisher. This should be a reverse domain-name
-# style string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
-# SVG. The default value is HTML-CSS, which is slower, but has the best
-# compatibility.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript.
-# There are two flavours of web server based search depending on the
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
-# searching and an index file used by the script. When EXTERNAL_SEARCH is
-# enabled the indexing and searching needs to be provided by external tools.
-# See the manual for details.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain
-# the search results. Doxygen ships with an example indexer (doxyindexer) and
-# search engine (doxysearch.cgi) which are based on the open source search engine
-# library Xapian. See the manual for configuration details.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will returned the search results when EXTERNAL_SEARCH is enabled.
-# Doxygen ships with an example search engine (doxysearch) which is based on
-# the open source search engine library Xapian. See the manual for configuration
-# details.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id
-# of to a relative location where the documentation can be found.
-# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG = YES
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
diff --git a/SDL_Core/FindQt.sh b/SDL_Core/FindQt.sh
deleted file mode 100755
index 71a7b10a1..000000000
--- a/SDL_Core/FindQt.sh
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-usage() {
- echo "Usage: $0 [-v <version>] [-b] [<file name>]"
- echo
- echo " Look for file in Qt directory."
- echo " If file name isn't set then look for bin directory."
- echo
- echo " -v <version> look for Qt specific version x.x.x"
- echo " -b look for binary file"
- echo
-}
-
-version2int() {
- IFS="."
- local ver=0
- for i in $1; do
- ver=$(( $ver * 32 + $i ))
- done
- echo $ver
-}
-
-version_match() {
- v1=$(version2int $1)
- v2=$(version2int $2)
- # It's bash way to say "if ((version1 < version2) and (major1 == major2))
- if [[ ( $v1 -le $v2 ) && ( $(( ($v1 / 1024) - ($v2 / 1024) )) == 0 ) ]]; then
- return 0;
- else
- return 1;
- fi
-}
-
-qmake_data() {
- $1 --version 2>/dev/null | grep "Using Qt version" | sed "s/.*Qt version \\([0-9\\.]*\\) in \\(.*\\)$/\\$2/"
-}
-
-find_binary() {
- local qt_binary="$1/$2" # check specified binary
- if [[ -x $qt_binary && ! -d $qt_binary ]]; then # to be executable and not to be directory
- echo -n $qt_binary # output without newline
- return 0
- fi
- return 1
-}
-
-find_file() {
- local qt_file=$(find $1 -name "$2" -type f -print0 -quit 2>/dev/null) # check specified binary
- if [[ -n $qt_file && ! -d $qt_file ]]; then # if found
- echo -n $qt_file #output without newline
- return 0
- fi
- return 1
-}
-
-type=file
-version="0.0.0"
-while getopts :v:b option; do
- case "$option" in
- v) version=$OPTARG ;;
- b) type=binary ;;
- *) usage; exit 1; ;;
- esac
-done
-
-shift $(( OPTIND - 1 ))
-if [[ -z $1 ]]; then
- type=bindir
-else
- file_name=$1
-fi
-
-## First attempt - using locate
-if command -v locate > /dev/null; then
- for searchloc in $CUSTOM_QT_DIR ~ /opt /usr/local; do
- qmake_list=$(locate $searchloc/*/bin/qmake)
- for qmake in $qmake_list; do
- if [[ ! -x $qmake || -d $qmake ]]; then
- continue
- fi
- # called with "qmake 1" return qmake version
- qt_version=$(qmake_data $qmake 1)
- if ! version_match $version $qt_version; then
- continue
- fi
-
- case $type in
- binary)
- qt_dir=$(dirname $qmake 2> /dev/null)
- if find_binary $qt_dir $file_name; then
- exit 0
- fi
- ;;
- file)
- # called with "qmake 2" return Qt installation dir
- qt_installdir=$(qmake_data $qmake 2)
- if find_file $qt_installdir $file_name; then
- exit 0
- fi
- ;;
- bindir)
- echo -n $(dirname $qmake 2>/dev/null)
- exit 0
- ;;
- esac
- done
- done
-fi
-
-## Second attempt - using find
-export -f find_file
-export -f qmake_data
-export -f version_match
-export -f version2int
-
-qmake=$(find -L $CUSTOM_QT_DIR ~ /opt /usr/local -name '.*' -prune \
- -o -name qmake -type f \
- -executable \
- -exec /bin/bash -c "version_qt=\$(qmake_data {} 1);version_match $version \$version_qt" {} \; -print -quit > /dev/null)
-if ! [ $? ]; then
- exit 1;
-fi
-
-case $type in
- binary)
- qt_dir=$(dirname $qmake 2>/dev/null)
- if find_binary $qt_dir $file_name; then
- exit 0
- fi
- ;;
- file)
- # called with "qmake 2" return Qt installation dir
- qt_installdir=$(qmake_data $qmake 2)
- if find_file $qt_installdir $file_name; then
- exit 0
- fi
- ;;
- bindir)
- echo -n $(dirname $qmake 2>/dev/null)
- exit 0
- ;;
-esac
-
-exit 1
diff --git a/SDL_Core/Lint b/SDL_Core/Lint
deleted file mode 100755
index f4e5d278b..000000000
--- a/SDL_Core/Lint
+++ /dev/null
@@ -1,289 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-function print_usage {
- echo
- echo "Usage: Lint [FILE=file|ALL] BUILD_PATH=path [-v] [w0|w1|w2|w3|w4] [MISRA=ON|MISRA=OFF]"
- echo
- echo "\"FILE=file|ALL\" Sets the scope of linting"
- echo -e '\t' "FILE sets the scope to single \"file\""
- echo -e '\t' "ALL sets the scope to all project modules"
- echo -e '\t' "If none is set then localy changes files will be linted"
- echo
- echo "\"BUILD_PATH=path\" is the only mandatory parameter which sets"
- echo -e '\t' "the path to the build product directory"
- echo
- echo "\"-v\" Turns verbose mode on (off by default)"
- echo
- echo "\"w0|w1|w2|w3|w4\" sets the Warning level"
- echo -e '\t' "w0 - No messages (except for fatal errors)"
- echo -e '\t' "w1 - Error messages only -- no Warnings or"
- echo -e '\t' "Informationals."
- echo -e '\t' "w2 - Error and Warning messages only"
- echo -e '\t' "w3 - Error, Warning and Informational messages (this"
- echo -e '\t' "is the default)"
- echo -e '\t' "w4 - All messages."
- echo
- echo "\"MISRA=ON|MISRA=OFF\" Turns custom MISRA configuration ON"
- echo -e '\t' "and OFF respectively (OFF by defaul)"
- echo
- echo
-}
-
-
-echo
-echo "=========== Lint SMART DEVICE LINK project ==========="
-echo
-
-########################################################################
-##### Process input arguments ##########################################
-########################################################################
-
-MISRA_ENABLED=false
-WARNING_LEVEL=w3
-SCOPE=LOCAL_CHANGES
-BUILD_PATH=""
-VERBOSE=false
-
-if [ $# == 0 ] || [ ${1} == '-h' ] || [ ${1} == '--help' ]; then
- print_usage
- exit 0
-fi
-
-while test $# -gt 0; do
- case "$1" in
- MISRA=ON)
- MISRA_ENABLED=true
- shift
- ;;
- MISRA=OFF)
- MISRA_ENABLED=false
- shift
- ;;
- w0|w1|w2|w3|w4)
- WARNING_LEVEL=$1
- shift
- ;;
- ALL)
- if [ "$SCOPE" != "LOCAL_CHANGES" ]; then
- echo "Wrong input. It is not allowed to use FILE and ALL at the same time"
- print_usage
- exit 1;
- fi
- SCOPE=ALL
- shift
- ;;
- -v|--verbose)
- VERBOSE=true
- shift
- ;;
- *)
- LHS=$(echo $1 | awk 'BEGIN { FS = "=" } ; { print $1 }')
- RHS=$(echo $1 | awk 'BEGIN { FS = "=" } ; { print $2 }')
-
- if [ ${LHS} == 'FILE' ]; then
- if [ "$SCOPE" != "LOCAL_CHANGES" ]; then
- echo "Wrong input. It is not allowed to use FILE and ALL at the same time"
- print_usage
- exit 1;
- fi
-
- if [ "${RHS}" == "" ]; then
- echo "Wrong input. Provide valid FILE value"
- print_usage
- exit 1;
- fi
- SCOPE=$LHS
- FILE_PATH=$RHS
- elif [ ${LHS} == 'BUILD_PATH' ]; then
- if [ "${RHS}" == "" ]; then
- echo "Wrong input. Provide valid BUILD_PATH value"
- print_usage
- exit 1;
- fi
- BUILD_PATH=$RHS
- else
- echo "Wrong input"
- print_usage
- exit 1;
- fi
- shift
- ;;
- esac
-done
-
-if [ "${BUILD_PATH}" == "" ]; then
- echo "Mandatory parameter BUILD_PATH is missing"
- print_usage
- exit 1;
-fi
-
-
-if [ "$SCOPE" == "LOCAL_CHANGES" ]; then
- echo -e '\t' "Lining scope is limitted to localy changed files"
-elif [ "$SCOPE" == "FILE" ]; then
- echo -e '\t' "Lining scope is limitted to file " $FILE_PATH
-elif [ "$SCOPE" == "ALL" ]; then
-
-# echo "You a going to Lint the whole project. It takes a lot of time."
-# echo -n "Are you sure? [Y/n] "
-
-# read item
-# case "$item" in
-# y|Y)
-# ;;
-# n|N)
-# exit 0
-# ;;
-# *)
-# exit 0
-# ;;
-# esac
-
- echo -e '\t' "Lining scope is set to all project files"
-fi
-
-if $MISRA_ENABLED; then
- echo -e '\t' "MISRA is enabled"
-else
- echo -e '\t' "MISRA is disabled"
-fi
-
-case "$WARNING_LEVEL" in
- w0)
- echo -e '\t' "Warning is set to " $WARNING_LEVEL " --- No messages (except for fatal errors)"
- ;;
- w1)
- echo -e '\t' "Warning is set to " $WARNING_LEVEL " --- Error messages only -- no Warnings or Informationals."
- ;;
- w2)
- echo -e '\t' "Warning is set to " $WARNING_LEVEL " --- Error and Warning messages only"
- ;;
- w3)
- echo -e '\t' "Warning is set to " $WARNING_LEVEL " --- Error, Warning and Informational messages (this is the default)"
- ;;
- w4)
- echo -e '\t' "Warning is set to " $WARNING_LEVEL " --- All messages."
- ;;
-esac
-
-if $VERBOSE; then
- echo -e '\t' "Verbose mode is on"
-fi
-
-########################################################################
-##### Configuring ######################################################
-########################################################################
-
-# +e900 Turns on Successful completion, 'Integer' messages produced, which is not by defaulf available in level w0-w3
-# -e830 Turns off Info 831: Reference cited in prior message
-# -e830 Turns off Info 830: Location cited in prior message
-SUPPRESS="-e830 -e831 +e900"
-
-OTHER_PARAMS="-dOS_POSIX"
-MISRA_CONFIGURATION=""
-SOURCE_CODE_PATH="./src/components/ ./src/appMain/"
-EXLUDE_FROM_SOURCE_CODE_PATH="./src/components/qt_hmi/ ./src/components/dbus/ ./src/components/transport_manager/src/usb/qnx"
-
-echo
-echo Configuring ...
-echo =====================================
-echo
-
-rm -Rf ./tools/FlexeLint/tmp
-rm -Rf ./tools/FlexeLint/results
-mkdir ./tools/FlexeLint/tmp
-mkdir ./tools/FlexeLint/results
-
-if $MISRA_ENABLED; then
- MISRA_CONFIGURATION="au-misra-cpp.lnt"
-fi
-
-if [ "$SCOPE" == "ALL" ]; then
- EXLUDE_FROM_SOURCE_CODE_PATH=$(echo $EXLUDE_FROM_SOURCE_CODE_PATH | awk '{gsub(/ /,"\\|")}; 1')
- find $SOURCE_CODE_PATH \( -name "*.cc" -o -name "*.cpp" \) | awk '{print "../../../" $0}' | grep -v "./src/components/qt_hmi/" | grep -v $EXLUDE_FROM_SOURCE_CODE_PATH > ./tools/FlexeLint/tmp/sdl-modules.lnt
-elif [ "$SCOPE" == "FILE" ]; then
- echo "$FILE_PATH" | awk '{print "../../../" $0}' > ./tools/FlexeLint/tmp/sdl-modules.lnt
-elif [ "$SCOPE" == "LOCAL_CHANGES" ]; then
- (git diff --name-only HEAD ; git ls-files --other --exclude-standard) | grep '.cc\|.cpp' | grep 'src/components\|src/appMain' | awk '{print "../../../" $0}' > ./tools/FlexeLint/tmp/sdl-modules.lnt
-fi # if [ $CHECKSCOPE == "ALL" ]
-
-(cd tools/FlexeLint/config && make -f co-gcc.mak > /dev/null)
-
-find ./src/ -type d -name "*include*" | awk '{print "--i../../." $0}' > ./tools/FlexeLint/tmp/sdl-include-path.lnt
-
-echo "--i\"/usr/include/gstreamer-1.0\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/include/glib-2.0\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/lib/i386-linux-gnu/glib-2.0/include\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/lib/x86_64-linux-gnu/glib-2.0/include\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/include/dbus-1.0\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/include/dbus-1.0\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/lib/i386-linux-gnu/dbus-1.0/include\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-echo "--i\"/usr/lib/x86_64-linux-gnu/dbus-1.0/include\"" >> ./tools/FlexeLint/config/gcc-include-path.lnt
-
-########################################################################
-##### Linting ##########################################################
-########################################################################
-FLINT_BINARY="Flint"
-
-echo
-echo Linting ...
-echo =====================================
-echo
-
-cd ./tools/FlexeLint/bin
-
-if $VERBOSE; then
- ./${FLINT_BINARY} -$WARNING_LEVEL $SUPPRESS -zero -u --i../../../$BUILD_PATH/src/components/ $OTHER_PARAMS $WORDSIZE ../config/smartdevicelink.lnt | tee ../results/raw_flexelint_report.txt
-else
- ./${FLINT_BINARY} -$WARNING_LEVEL $SUPPRESS -zero -u --i../../../$BUILD_PATH/src/components/ -os ../results/raw_flexelint_report.txt $OTHER_PARAMS $WORDSIZE ../config/smartdevicelink.lnt
-fi
-
-
-########################################################################
-##### Preparing detailed report ########################################
-########################################################################
-if [ "$SCOPE" != "LOCAL_CHANGES" ]; then
-
- mkdir ../results/developers
-
- echo
- echo Preparing detailed report. Be patient
- echo =====================================
- echo
-
- ./make_detailed_report
-else
- echo
- echo "Detailed report for each developer won't be generated since"
- echo "only local changes are present in report"
- echo =====================================
- echo
-fi
-
-########################################################################
-##### Cleaning-up ######################################################
-########################################################################
-
-function clean-up {
- echo
- echo Cleaning-up ...
- echo =====================================
- echo
-
- rm -R ../tmp
- cd ../config
- make -f co-gcc.mak clean > /dev/null
-
-}
-
-clean-up
-
-
-
-
-
-
-
-
diff --git a/SDL_Core/README.md b/SDL_Core/README.md
deleted file mode 100644
index 7ee95a5c7..000000000
--- a/SDL_Core/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Instructions for building this source code can be found at the [SmartDeviceLink documentation](http://projects.genivi.org/smartdevicelink/documentation) site.
diff --git a/SDL_Core/changes b/SDL_Core/changes
deleted file mode 100644
index e69de29bb..000000000
--- a/SDL_Core/changes
+++ /dev/null
diff --git a/SDL_Core/cmake/Modules/FindDBus.cmake b/SDL_Core/cmake/Modules/FindDBus.cmake
deleted file mode 100644
index 88946261e..000000000
--- a/SDL_Core/cmake/Modules/FindDBus.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-find_path(DBUS_INCLUDE_DIR
- NAMES dbus/dbus.h
- PATHS /usr/lib/dbus-1.0/include
- /usr/include/dbus-1.0)
-
-find_path(DBUS_ARCH_INCLUDE_DIR
- NAMES dbus/dbus-arch-deps.h
- PATHS /usr/lib/dbus-1.0/include
- /usr/include/dbus-1.0
- /usr/lib/x86_64-linux-gnu/dbus-1.0/include
- /usr/lib/i386-linux-gnu/dbus-1.0/include)
-
-set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
-
-mark_as_advanced(DBUS_INCLUDE_DIR)
-mark_as_advanced(DBUS_ARCH_INCLUDE_DIR)
-
-if (DBUS_INCLUDE_DIRS)
- set(DBUS_FOUND true)
-endif()
diff --git a/SDL_Core/cmake/Modules/FindGlib-2.0.cmake b/SDL_Core/cmake/Modules/FindGlib-2.0.cmake
deleted file mode 100644
index b39da141c..000000000
--- a/SDL_Core/cmake/Modules/FindGlib-2.0.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-FILE(TO_CMAKE_PATH "$ENV{GLIB2_DIR}" TRY1_DIR)
-FILE(TO_CMAKE_PATH "${GLIB2_DIR}" TRY2_DIR)
-FILE(GLOB GLIB2_DIR ${TRY1_DIR} ${TRY2_DIR})
-
-FIND_PATH(GLIB_glib_2_INCLUDE_DIR glib.h
- PATHS ${GLIB2_DIR}/include ${GLIB2_DIR}/include/glib-2.0 /usr/local/include/glib-2.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include/
- ENV INCLUDE DOC "Directory containing glib.h include file")
-
-FIND_PATH(GLIB_glibconfig_2_INCLUDE_DIR glibconfig.h
- PATHS ${GLIB2_DIR}/include ${GLIB2_DIR}/include/glib-2.0 ${GLIB2_DIR}/lib/include ${GLIB2_DIR}/lib/glib-2.0/include /usr/local/include/glib-2.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/local/lib/glib-2.0/include
- ENV INCLUDE DOC "Directory containing glibconfig.h include file")
-
-FIND_LIBRARY(GLIB_glib_2_LIBRARY NAMES glib-2.0
- PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "glib library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GLIB_gmodule_2_LIBRARY NAMES gmodule-2.0
- PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gmodule library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GLIB_gobject_2_LIBRARY NAMES gobject-2.0
- PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gobject library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GLIB_gthread_2_LIBRARY NAMES gthread-2.0
- PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gthread library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-IF (GLIB_glib_2_INCLUDE_DIR AND GLIB_glibconfig_2_INCLUDE_DIR AND GLIB_glib_2_LIBRARY AND GLIB_gmodule_2_LIBRARY AND GLIB_gobject_2_LIBRARY AND GLIB_gthread_2_LIBRARY)
- SET(GLIB2_INCLUDE_DIR ${GLIB_glib_2_INCLUDE_DIR} ${GLIB_glibconfig_2_INCLUDE_DIR})
- list(REMOVE_DUPLICATES GLIB2_INCLUDE_DIR)
- SET(GLIB2_LIBRARIES ${GLIB_glib_2_LIBRARY} ${GLIB_gmodule_2_LIBRARY} ${GLIB_gobject_2_LIBRARY} ${GLIB_gthread_2_LIBRARY})
- list(REMOVE_DUPLICATES GLIB2_LIBRARIES)
- SET(GLIB2_FOUND TRUE)
-ENDIF (GLIB_glib_2_INCLUDE_DIR AND GLIB_glibconfig_2_INCLUDE_DIR AND GLIB_glib_2_LIBRARY AND GLIB_gmodule_2_LIBRARY AND GLIB_gobject_2_LIBRARY AND GLIB_gthread_2_LIBRARY)
diff --git a/SDL_Core/cmake/Modules/FindGstreamer-1.0.cmake b/SDL_Core/cmake/Modules/FindGstreamer-1.0.cmake
deleted file mode 100644
index 8f1d69d01..000000000
--- a/SDL_Core/cmake/Modules/FindGstreamer-1.0.cmake
+++ /dev/null
@@ -1,136 +0,0 @@
-FILE(TO_CMAKE_PATH "$ENV{GSTREAMER_DIR}" TRY1_DIR)
-FILE(TO_CMAKE_PATH "${GSTREAMER_DIR}" TRY2_DIR)
-FILE(GLOB GSTREAMER_DIR ${TRY1_DIR} ${TRY2_DIR})
-
-FIND_PATH(GSTREAMER_gst_INCLUDE_DIR gst/gst.h
- PATHS ${GSTREAMER_DIR}/include /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0
- ENV INCLUDE DOC "Directory containing gst/gst.h include file")
-
-FIND_PATH(GSTREAMER_gstconfig_INCLUDE_DIR gst/gstconfig.h
- PATHS ${GSTREAMER_DIR}/include ${GSTREAMER_DIR}/lib/include /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0 /usr/local/lib/include/gstreamer-1.0 /usr/lib/include/gstreamer-1.0
- ENV INCLUDE DOC "Directory containing gst/gstconfig.h include file")
-
-FIND_LIBRARY(GSTREAMER_gstaudio_LIBRARY NAMES gstaudio-1.0 libgstaudio-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstaudio library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstapp_LIBRARY NAMES gstapp-1.0 libgstapp-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstapp library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstbase_LIBRARY NAMES gstbase-1.0 libgstbase-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstbase library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GLIB_gstcdda_LIBRARY NAMES gstcdda-1.0 libgstcdda-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstcdda library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstcontroller_LIBRARY NAMES gstcontroller-1.0 libgstcontroller-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstcontroller library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstdataprotocol_LIBRARY NAMES gstdataprotocol-1.0 libgstdataprotocol-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstdataprotocol library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstinterfaces_LIBRARY NAMES gstinterfaces-1.0 libgstinterfaces-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstinterfaces library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstnet_LIBRARY NAMES gstnet-1.0 libgstnet-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstnet library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstnetbuffer_LIBRARY NAMES gstnetbuffer-1.0 libgstnetbuffer-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstnetbuffer library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstpbutils_LIBRARY NAMES gstpbutils-1.0 libgstpbutils-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstpbutils library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstreamer_LIBRARY NAMES gstreamer-1.0 libgstreamer-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstreamer library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstriff_LIBRARY NAMES gstriff-1.0 libgstriff-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstriff library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstrtp_LIBRARY NAMES gstrtp-1.0 libgstrtp-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstrtp library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstrtsp_LIBRARY NAMES gstrtsp-1.0 libgstrtsp-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstrtsp library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstsdp_LIBRARY NAMES gstsdp-1.0 libgstsdp-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstsdp library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gsttag_LIBRARY NAMES gsttag-1.0 libgsttag-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gsttag library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-FIND_LIBRARY(GSTREAMER_gstvideo_LIBRARY NAMES gstvideo-1.0 libgstvideo-1.0
- PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
- ENV LIB
- DOC "gstvideo library to link with"
- NO_SYSTEM_ENVIRONMENT_PATH)
-
-
-IF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
- GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstcontroller_LIBRARY AND
- GSTREAMER_gstdataprotocol_LIBRARY AND GSTREAMER_gstinterfaces_LIBRARY AND GSTREAMER_gstnet_LIBRARY AND
- GSTREAMER_gstnetbuffer_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstreamer_LIBRARY AND
- GSTREAMER_gstriff_LIBRARY AND GSTREAMER_gstrtp_LIBRARY AND GSTREAMER_gstrtsp_LIBRARY AND GSTREAMER_gstsdp_LIBRARY AND
- GSTREAMER_gsttag_LIBRARY AND GSTREAMER_gstvideo_LIBRARY)
- SET(GSTREAMER_INCLUDE_DIR ${GSTREAMER_gst_INCLUDE_DIR} ${GSTREAMER_gstconfig_INCLUDE_DIR})
- list(REMOVE_DUPLICATES GSTREAMER_INCLUDE_DIR)
- SET(GSTREAMER_LIBRARIES ${GSTREAMER_gstaudio_LIBRARY} ${GSTREAMER_gstbase_LIBRARY}
- ${GSTREAMER_gstcontroller_LIBRARY} ${GSTREAMER_gstdataprotocol_LIBRARY} ${GSTREAMER_gstinterfaces_LIBRARY}
- ${GSTREAMER_gstnet_LIBRARY} ${GSTREAMER_gstnetbuffer_LIBRARY} ${GSTREAMER_gstpbutils_LIBRARY}
- ${GSTREAMER_gstreamer_LIBRARY} ${GSTREAMER_gstriff_LIBRARY} ${GSTREAMER_gstrtp_LIBRARY}
- ${GSTREAMER_gstrtsp_LIBRARY} ${GSTREAMER_gstsdp_LIBRARY} ${GSTREAMER_gsttag_LIBRARY} ${GSTREAMER_gstvideo_LIBRARY})
- list(REMOVE_DUPLICATES GSTREAMER_LIBRARIES)
- SET(GSTREAMER_FOUND TRUE)
-ENDIF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
- GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstcontroller_LIBRARY AND
- GSTREAMER_gstdataprotocol_LIBRARY AND GSTREAMER_gstinterfaces_LIBRARY AND GSTREAMER_gstnet_LIBRARY AND
- GSTREAMER_gstnetbuffer_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstreamer_LIBRARY AND
- GSTREAMER_gstriff_LIBRARY AND GSTREAMER_gstrtp_LIBRARY AND GSTREAMER_gstrtsp_LIBRARY AND GSTREAMER_gstsdp_LIBRARY AND
- GSTREAMER_gsttag_LIBRARY AND GSTREAMER_gstvideo_LIBRARY)
diff --git a/SDL_Core/cmake/Modules/FindLibXML2.cmake b/SDL_Core/cmake/Modules/FindLibXML2.cmake
deleted file mode 100644
index 1daaeb07b..000000000
--- a/SDL_Core/cmake/Modules/FindLibXML2.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-find_path(LibXML2_ROOT_DIR NAMES include/libxml2/libxml/xpath.h)
-find_library(LibXML2_LIBRARIES
- NAMES xml2
- HINTS ${LibXML2_ROOT_DIR}/lib
-)
-find_path(LibXML2_INCLUDE_DIR
- NAMES libxml/tree.h
- HINTS ${LibXML2_ROOT_DIR}/include/libxml2
-)
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LibXML2 DEFAULT_MSG
- LibXML2_LIBRARIES
- LibXML2_INCLUDE_DIR
-)
-
-mark_as_advanced(
- LibXML2_ROOT_DIR
- LibXML2_LIBRARIES
- LibXML2_INCLUDE_DIR
-) \ No newline at end of file
diff --git a/SDL_Core/cmake/Modules/FindLibavahi.cmake b/SDL_Core/cmake/Modules/FindLibavahi.cmake
deleted file mode 100644
index 52865c437..000000000
--- a/SDL_Core/cmake/Modules/FindLibavahi.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-# --- Check libavahi-common, libavahi-client availability
-
-FIND_LIBRARY(
- LIBAVAHI_CLIENT
- NAMES libavahi-client.so
- PATHS /usr/local/lib /usr/lib /opt/local/include /usr/lib/i386-linux-gnu/
- )
-
-if (NOT LIBAVAHI_CLIENT)
- message(STATUS " libavahi-client is not found")
- message(STATUS " To install it type in the command line:")
- message(STATUS " sudo apt-get install libavahi-client-dev")
-endif (NOT LIBAVAHI_CLIENT)
-
-FIND_LIBRARY(
- LIBAVAHI_COMMON
- NAMES libavahi-common.so
- PATHS /usr/local/lib /usr/lib /opt/local/include /usr/lib/i386-linux-gnu/
- )
-
-if (NOT LIBAVAHI_COMMON)
- message(STATUS " libavahi-common is not found")
- message(STATUS " To install it type in the command line:")
- message(STATUS " sudo apt-get install libavahi-common-dev")
-endif (NOT LIBAVAHI_COMMON) \ No newline at end of file
diff --git a/SDL_Core/cmake/Modules/FindQt5Core.cmake b/SDL_Core/cmake/Modules/FindQt5Core.cmake
deleted file mode 100644
index 1a2ad8484..000000000
--- a/SDL_Core/cmake/Modules/FindQt5Core.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} Qt5CoreConfig.cmake
- OUTPUT_VARIABLE config_file
-)
-
-if(config_file STREQUAL "")
- message(FATAL_ERROR "Qt5 Core module not found")
-endif(config_file STREQUAL "")
-
-include(${config_file})
diff --git a/SDL_Core/cmake/Modules/FindQt5DBus.cmake b/SDL_Core/cmake/Modules/FindQt5DBus.cmake
deleted file mode 100644
index d850010e9..000000000
--- a/SDL_Core/cmake/Modules/FindQt5DBus.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} Qt5DBusConfig.cmake
- OUTPUT_VARIABLE config_file
-)
-
-if(config_file STREQUAL "")
- message(FATAL_ERROR "Qt5 DBus module not found")
-endif(config_file STREQUAL "")
-
-include(${config_file})
diff --git a/SDL_Core/cmake/Modules/FindQt5Qml.cmake b/SDL_Core/cmake/Modules/FindQt5Qml.cmake
deleted file mode 100644
index f4bdaa8f7..000000000
--- a/SDL_Core/cmake/Modules/FindQt5Qml.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} Qt5QmlConfig.cmake
- OUTPUT_VARIABLE config_file
-)
-
-if(config_file STREQUAL "")
- message(FATAL_ERROR "Qt5 Qml module not found")
-endif(config_file STREQUAL "")
-
-include(${config_file})
diff --git a/SDL_Core/cmake/Modules/FindQt5Quick.cmake b/SDL_Core/cmake/Modules/FindQt5Quick.cmake
deleted file mode 100644
index 1e16340c2..000000000
--- a/SDL_Core/cmake/Modules/FindQt5Quick.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} Qt5QuickConfig.cmake
- OUTPUT_VARIABLE config_file
-)
-
-if(config_file STREQUAL "")
- message(FATAL_ERROR "Qt5 Quick module not found")
-endif(config_file STREQUAL "")
-
-include(${config_file})
diff --git a/SDL_Core/doc/change_log.txt b/SDL_Core/doc/change_log.txt
deleted file mode 100644
index d123aed72..000000000
--- a/SDL_Core/doc/change_log.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-CW10 04.03.2014
-Changes:
- 1. Heartbeat fix: service=0 is used now for heartbeat,
- heartbeat during media streaming.
- 2. Simultenious Audio and Video streaming.
- 3. Priority messages.
- 4. API v 3.0 rev O.
- 5. Application resumption.
- \ No newline at end of file
diff --git a/SDL_Core/doc/doxygen/components/AppMgr/index.txt b/SDL_Core/doc/doxygen/components/AppMgr/index.txt
deleted file mode 100644
index 17584b09e..000000000
--- a/SDL_Core/doc/doxygen/components/AppMgr/index.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! \page components_appmgr App Manager
-
-Here will be information about App Manager component
-
-*/ \ No newline at end of file
diff --git a/SDL_Core/doc/doxygen/components/HMI/index.txt b/SDL_Core/doc/doxygen/components/HMI/index.txt
deleted file mode 100644
index 361763118..000000000
--- a/SDL_Core/doc/doxygen/components/HMI/index.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! \page components_hmi HMI
-
-Here will be information about HMI component
-
-*/ \ No newline at end of file
diff --git a/SDL_Core/doc/doxygen/components/JSONHandler/Formatters/index.txt b/SDL_Core/doc/doxygen/components/JSONHandler/Formatters/index.txt
deleted file mode 100644
index 9854b88d5..000000000
--- a/SDL_Core/doc/doxygen/components/JSONHandler/Formatters/index.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/*! \page components_jsonhandler_formatters Smart Objects Formatters
-
-In order to create JSON string representation from Smart Object or create Smart Object data structure from JSON string representation JSON Handler component has special classes called formatters.
-
-The interface of formatter is quite simple and defined by NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase class. Actually it has two methods - NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::objToJsonValue to convert JSON string to object and NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::jsonValueToObj to create JSON string from object.
-
-Current implementation has two different implementations of NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase class: NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonALRPCv1 for ALRPC.v1 and NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonALRPCv2 for ALRPC.v2. These implementations handle specifics of each format.
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/JSONHandler/index.txt b/SDL_Core/doc/doxygen/components/JSONHandler/index.txt
deleted file mode 100644
index a65c8ddc7..000000000
--- a/SDL_Core/doc/doxygen/components/JSONHandler/index.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-/*! \page components_jsonhandler JSON Handler
-
-Here will be information about JSON Handler component
-
-Detailed information:
- - \subpage components_jsonhandler_formatters "Smart Objects Formatters"
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/ProtocolHandler/index.txt b/SDL_Core/doc/doxygen/components/ProtocolHandler/index.txt
deleted file mode 100644
index c5b5ceb79..000000000
--- a/SDL_Core/doc/doxygen/components/ProtocolHandler/index.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! \page components_protocolhandler Protocol Handler
-
-Here will be information about Protocol Handler component
-
-*/ \ No newline at end of file
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Type casts.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Type casts.txt
deleted file mode 100644
index 3ae636c92..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Type casts.txt
+++ /dev/null
@@ -1,204 +0,0 @@
-/*! \page components_smartobjects_types_cast Type cast for SmartObjects
-
-One of easy and probably intuitive way to work with values in the Smart Object is simple use of the type casts. Implementation of NsSmartDeviceLink::NsSmartObjects::CSmartObject class has all necessary declarations to support all required types.
-
-Example 1 (Work with int value):
-
-<pre>
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj = 1; //Assign int value
-
-int i = (int)obj; //Get int value
-
-</pre>
-
-Example 2 (Work with long value):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj = 100l; //Assign long value
-
-long l = (long)obj; //Get long value
-
-</pre>
-
-Example 3 (Work with double value):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj = 3.14; //Assign double value
-
-double d = (double)obj; //Get double value
-
-</pre>
-
-Example 4 (Work with char value):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj = 'a'; //Assign char value
-
-char c = (char)obj; //Get char value
-
-</pre>
-
-Example 5 (Work with bool value):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj = true; //Assign bool value
-
-bool b = (bool)obj; //Get bool value
-
-</pre>
-
-Example 6 (Work with string values):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj1;
-
-obj1 = "Hello, world"; //Assign char* string value
-
-obj2 = std::string("Hello, world"); //Assign std::string value
-
-std::string s1 = (std::string)obj1;
-
-std::string s2 = (std::string)obj2;
-
-</pre>
-
-Example 7 (Work with arrays):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject simpleArray;
-
-simpleArray[0] = 1;
-
-simpleArray[1] = true;
-
-simpleArray[2] = 'a';
-
-simpleArray[3] = 3.14;
-
-int val0 = (int)simpleArray[0];
-
-bool val1 = (bool)simpleArray[1];
-
-char val2 = (char)simpleArray[2];
-
-double val3 = (double)simpleArray[3];
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject deepArray;
-
-deepArray[0] = 1;
-
-deepArray[1][0] = 3.14;
-
-deepArray[1][1][0] = true;
-
-int val0 = (int)obj[0];
-
-double val1_0 = (double)obj[1][0];
-
-bool val1_1_0 = (bool)obj[1][1][0];
-
-</pre>
-
-
-Example 8 (Work with maps):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject simpleMap;
-
-simpleMap["name"] = "My name";
-
-simpleMap["count"] = 10;
-
-simpleMap["isValid"] = true;
-
-std::string name = (std::string)obj["name"];
-
-int count = (int)obj["count"];
-
-bool isValid = (bool)obj["isValid"];
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject deepMap;
-
-deepMap["request"]["name"] = "My Request";
-
-deepMap["request"]["id"] = 123;
-
-deepMap["response"]["name"] = "My Response";
-
-deepMap["response"]["id"] = 456;
-
-deepMap["we"]["need"]["to"]["go"]["deeper"] = true;
-
-std::string requestName = (std::string)deepMap["request"]["name"];
-
-int requestId = (int)deepMap["request"]["id"];
-
-std::string responseName = (std::string)deepMap["response"]["name"];
-
-int responseId = (int)deepMap["response"]["id"];
-
-deepFlag = (bool)deepMap["we"]["need"]["to"]["go"]["deeper"];
-
-</pre>
-
-
-Example 9 (Removing elements from Map):
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject mapObj;
-
-mapObj["first"] = "first value";
-mapObj["second"] = "second value";
-mapObj["to delete"] = 1234;
-mapObj["third"] = "third value";
-
-bool result = mapObj.erase("to delete");
-
-</pre>
-
-
-Example 10 (Using alternative method of accessing SmartObject values)
-
-<pre>
-
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj = 1; //Assign int value
-int i = obj.asInt(); //Get int value
-
-obj = 100l; //Assign long value
-long l = obj.asLong(); //Get long value
-
-obj = 3.14; //Assign double value
-double d = obj.asDouble(); //Get double value
-
-obj = true;
-bool b = obj.asBool(); // Get bool value
-
-obj = 'c';
-char c = obj.asChar(); // Get char value
-
-obj = "some string";
-std::string str = obj.asString(); // Get string value
-
-</pre>
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt
deleted file mode 100644
index 6505ae6f4..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-/*! \page components_smartobjects_types_repr Type value representation methods for SmartObjects
-
-As alternative to the type casts NsSmartDeviceLink::NsSmartObjects::CSmartObject class defines set of usable methods that allow to represent object values as desired type. Use of these methods may change code style and readability but functionally it completely similar to the type casts of Smart Objects.
-
-Example:
-
-<pre>
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
-
-obj[0] = 1;
-
-obj[1] = true;
-
-obj[2] = 'a';
-
-obj[3] = 3.14;
-
-int i = obj[0].asInt();
-
-char c = obj[1].asChar();
-
-double d = obj[2].asDouble();
-</pre>
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/index.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/index.txt
deleted file mode 100644
index 9ca3fb3e9..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Types/index.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/*! \page components_smartobjects_types Smart Objects Types
-
-Current implementation of Smart Objects contains definitions that allow working with every Smart Object
-as variable of one of the basic types: bool, int, long, double, char, string (both as char* and std::string), array and map.
-
-There are two different ways to work with type values in SmartObjects:
- - \subpage components_smartobjects_types_cast "Type cast for SmartObjects"
- - \subpage components_smartobjects_types_repr "Type value representation methods for SmartObjects"
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt
deleted file mode 100644
index 2e611f74b..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt
+++ /dev/null
@@ -1,101 +0,0 @@
-/*! \page components_smartobjects_validation_items Schema structure: Schema Items
-
-In order to create new Schema (new object of class NsSmartDeviceLink::NsSmartObjects::CSmartSchema) client first must define all required Schema Items. Actually every Schema is a tree of respective Schema Items. Each node and leaf of that tree defines structural rules for some Smart Object data structure.
-
-Schema Items are represented as class hierarchy. The base class for all schema items is a NsSmartDeviceLink::NsSmartObjects::ISchemaItem class. This base class defines generic validation interface for Schema Items.
-
-To define special elements with always successful or always failing validation there are two special Schema Items: NsSmartDeviceLink::NsSmartObjects::CAlwaysTrueSchemaItem and NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem.
-
-NsSmartDeviceLink::NsSmartObjects::CBoolSchemaItem is used for boolean values and has no parameters (only verifies that respective Smart Object is really has boolean value).
-
-NsSmartDeviceLink::NsSmartObjects::TNumberSchemaItem is template Schema Item that can be used for both integer and floating point values. In addition to the regular type verification it is possible to set min and max value range (these values are optional).
-
-NsSmartDeviceLink::NsSmartObjects::TEnumSchemaItem is used to verify any custom client-defined enum.
-
-NsSmartDeviceLink::NsSmartObjects::CStringSchemaItem is used to verify a string values. As optional parameter max length of the string could be set.
-
-NsSmartDeviceLink::NsSmartObjects::CArraySchemaItem provides validation for array. Can be used to verify special type and array size.
-
-NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem used in case when Schema Item includes another Schema Item. Actually this is only way to create tree node of new Schema. All other Schema Items will be used only to become leafs of validation tree.
-
-After creation of all required Schema Items (which is actually bind in the tree) it is possible to create Schema.
-Schema can be initialized not only by raw root Schema Item, but also by special abstraction called Member (defined by NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem::SMember class). So every root item (NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem) firstly should be wrapped as Member. This wrapping process also allows to set "is mandatory" status for every Member.
-
- and pass root Schema Item as initial parameter to the new Schema.
-
-Currently Schemas are generated by the InterfaceGenerator. For supported ALRPC.v1/.v2 Schema has following structure:
-
-<pre>
-
-ROOT
- |
- -- PARAMS
- | |
- | -- FUNCTION_ID
- | |
- | -- MESSAGE_TYPE
- | |
- | -- CORRELATION_ID
- | |
- | -- PROTOCOL_VERSION
- | |
- | -- PROTOCOL_TYPE
- |
- -- MSG_PARAMS
- |
- -- OBJECT
- |
- -- (Actually contains function-specific leaf item)
- ...
-</pre>
-
-Example:
-
-<pre>
-
-// Function parameter success.
-//
-// true, if successful
-// false, if failed
-TSharedPtr<ISchemaItem> success_SchemaItem = CBoolSchemaItem::create(TSchemaItemParameter<bool>());
-
-// Function parameter resultCode.
-//
-// See Result
-TSharedPtr<ISchemaItem> resultCode_SchemaItem = TEnumSchemaItem<Result::eType>::create(resultCode_allowedEnumSubsetValues, TSchemaItemParameter<Result::eType>());
-
-// Function parameter info.
-//
-// Provides additional human readable info regarding the result.
-TSharedPtr<ISchemaItem> info_SchemaItem = CStringSchemaItem::create(TSchemaItemParameter<size_t>(1000), TSchemaItemParameter<std::string>());
-
-schemaMembersMap["success"] = CObjectSchemaItem::SMember(success_SchemaItem, true);
-
-schemaMembersMap["resultCode"] = CObjectSchemaItem::SMember(resultCode_SchemaItem, true);
-
-schemaMembersMap["info"] = CObjectSchemaItem::SMember(info_SchemaItem, false);
-
-std::map<std::string, CObjectSchemaItem::SMember> paramsMembersMap;
-
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(FunctionIDItems), true);
-
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(MessageTypeItems), true);
-
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(1, 2), true);
-
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
-std::map<std::string, CObjectSchemaItem::SMember> rootMembersMap;
-
-rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schemaMembersMap), true);
-
-rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(paramsMembersMap), true);
-
-
-CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
-
-</pre>
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt
deleted file mode 100644
index a02f0be4b..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/*! \page components_smartobjects_validation_use Using Schema for validation
-
-The main purpose of Schema is validation of existing Smart Object. This process includes type and value validation. The client can use results of validation to determine if given Smart Object is valid or not. Validation of specific Smart Object can be triggered by using NsSmartDeviceLink::NsSmartObjects::CSmartSchema::validate method. Internally Schema triggers respective validate method of every Schema Item in order to perform validation.
-
-Another feature of Schema is capability to be applied to the Smart Object. Applying means that Schema tries to modify object to "normalize" data. Currently this "normalization" effects on string representation of enums. Applying of the Schema can be triggered by using NsSmartDeviceLink::NsSmartObjects::CSmartSchema::applySchema method. Internally Schema triggers respective apply method of every Schema Item and at the moment only enum Schema Items try to covert string representation to enum values.
-
-To "unapply" modifications done by apply feature Schema has NsSmartDeviceLink::NsSmartObjects::CSmartSchema::unapplySchema method. It can be used to make string representations of enums.
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/index.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/index.txt
deleted file mode 100644
index d42579187..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Smart Objects Validation/index.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-/*! \page components_smartobjects_validation Smart Objects validation
-
-The mechanism of Smart Objects validation includes special Schema. This Schema is similar to the regular XML schema. In other words Schema defines structural description of desired object. After that definition is done Schema can be applied to the object in order to make validation.
-
-Every Schema is constructed from objects called SchemaItems. Every SchemaItem defines type and restriction of specific data structure.
-
-For more details please review:
- - \subpage components_smartobjects_validation_items "Schema structure: Schema Items"
- - \subpage components_smartobjects_validation_use "Using Schema for validation"
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/Use of Smart Objects/index.txt b/SDL_Core/doc/doxygen/components/SmartObjects/Use of Smart Objects/index.txt
deleted file mode 100644
index 6ad626de4..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/Use of Smart Objects/index.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-/*! \page components_smartobjects_usage Use Smart Objects
-
-There are lots of useful applications for the Smart Objects. They allow building complex dynamic data
-structures in runtime and can be used to store and provide almost any data. For example any array can contain an item which is other array and so on.
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/SmartObjects/index.txt b/SDL_Core/doc/doxygen/components/SmartObjects/index.txt
deleted file mode 100644
index 3844e1ab6..000000000
--- a/SDL_Core/doc/doxygen/components/SmartObjects/index.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-/*! \page components_smartobjects Smart Objects
-
-Smart Object is building block for a custom dynamic data structures with virtually unlimited complexity. Client code can use Smart Objects to create containers for simple basic types such as bools, ints, doubles, chars, strings end enums as well as arrays and maps.
-
-Smart Objects solution also includes validation/normalization mechanism of schemas witch is similar to the XML schemas. This feature allows client to validate any data structure.
-
-More detailed information is described in following chapters:
- - \subpage components_smartobjects_types "Smart Objects Types"
- - \subpage components_smartobjects_usage "Use of Smart Objects"
- - \subpage components_smartobjects_validation "Smart Objects validation"
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt b/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt
deleted file mode 100644
index 2ba273e9d..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-/** @page components_transportmanager_client_connection_management Connection Management
- *
- * As all requests to TransportManager are asynchronous, client must implement NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener
- * interface and add itself as a device listener with NsSmartDeviceLink::NsTransportManager::ITransportManager::addDeviceListener()
- * in order to receive notifications.
- * To connect remote device client must use NsSmartDeviceLink::NsTransportManager::ITransportManager::connectDevice(). It will initiate connections to all
- * applications running on remove device. For TCP device this call has no effect as TCP connections are initiated by remote devices.
- * Client will be notified about each connected application with NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener::onApplicationConnected().
- * To disconnect all applications running on remote device client must use NsSmartDeviceLink::NsTransportManager::ITransportManager::disconnectDevice().
- * Client will be notified about each disconnected application with NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener::onApplicationDisconnected().
- */
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt b/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt
deleted file mode 100644
index 98dd7426b..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-/** @page components_transportmanager_client_data_transfer Data Transfer
- *
- * As all requests to TransportManager are asynchronous, client must implement NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener
- * interface and add itself as a data listener with NsSmartDeviceLink::NsTransportManager::ITransportManager::addDataListener()
- * in order to receive notifications.
- * To send frame to remote device client must use NsSmartDeviceLink::NsTransportManager::ITransportManager::sendFrame() poviding connection handle,
- * frame data, data size and user data. User data is an integer that is assigned to a frame and will be sent back to client when sending of frame
- * will be completed. Client may use this data to identify frame when send result will be reported. When sending of frame is completed
- * client is notified via NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener::onFrameSendCompleted(). When frame is received from a remote
- * device client is notified via NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener::onFrameReceived().
- */
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt b/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt
deleted file mode 100644
index eb5f3e477..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-/** @page components_transportmanager_client_device_management Device Management
- *
- * As all requests to TransportManager are asynchronous, client must implement NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener
- * interface and add itself as a device listener with NsSmartDeviceLink::NsTransportManager::ITransportManager::addDeviceListener()
- * in order to receive notifications.
- * Client of TransportManager may use NsSmartDeviceLink::NsTransportManager::ITransportManager::scanForNewDevices()
- * to initiate device scan on all device adapters that support this feature. In order to get list of available
- * devices client must override NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener::onDeviceListUpdated().
- * Each device adapter will perform scan independently from other device adapters and device list might be updated
- * several times (after each adapter that supports scanning finishes scanning operation). Device list might also be
- * updated without device scan request, e.g. if new client connects via TCP this device will be added to device list
- * and update notification will be sent to client. In any of these cases client will be provided with the full
- * device list from all device adapters in every notification.
- */
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/index.txt b/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/index.txt
deleted file mode 100644
index 8916dbeb5..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Client Specification/index.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-/*! \page components_transportmanager_client Transport Manager Client Specification
-
-This chapter describes details of correct use of Transport Manager on the client side. In other words this chapter can be called "How to create effective and safe client of Transport Manager".
-Transport Manager defines set of asynchronous requests (means that operations are non-blocking in the calling thread) and provides two different interfaces to monitor asynchronous responses and notifications about data update.
-
-Clients of Transport Manager should use NsSmartDeviceLink::NsTransportManager::ITransportManager interface to initiate any request to the component.
-Also Transport Manager provides two different interfaces:
-
-1) NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener. Client can implement this interface if it needs information about data frame send/receive.
-
-2) NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener. Client can implement this interface if it needs information about updates of devices available for communication and current client applications status.
-
-For more information about typical use of Transport Manager please read the following topics:
- - \subpage components_transportmanager_client_device_management "Device Management"
- - \subpage components_transportmanager_client_connection_management "Connection Management"
- - \subpage components_transportmanager_client_data_transfer "Data Transfer"
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt
deleted file mode 100644
index 970aeffd8..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-/** @page components_transportmanager_internal_design_transport_adapters_bluetooth_adapter Bluetooth Adapter
- *
- * Bluetooth adapter handles communication with external devices via bluetooth. It is implemented in
- * NsSmartDeviceLink::NsTransportManager::CBluetoothAdapter.
- *
- * @section components_transportmanager_internal_design_transport_adapters_bluetooth_adapter_discovery Device discovery
- *
- * When requested by a call to NsSmartDeviceLink::NsTransportManager::CTransportAdapter::scanForNewDevices() bluetooth adapter
- * searches for bluetooth devices. For each found device it runs SDP query for service with SmartDeviceLink UUID
- * (936DA01F-9ABD-4D9D-80C7-02AF85C822A8). Devices that support this service are added to bluetooth adapter device list.
- * Bluetooth device scans are performed only when explicitly requested.
- *
- * @section components_transportmanager_internal_design_transport_adapters_bluetooth_adapter_connecting_devices Connecting devices
- *
- * NsSmartDeviceLink::NsTransportManager::CBluetoothAdapter::createConnectionsListForDevice() runs SDP query for specified device
- * and fills connection list with connections to all RFCOMM channels on remote device where SmartDeviceLink service has been discovered.
- *
- * @see @ref components_transportmanager_internal_design_transport_adapters_common_connecting_devices
- */
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
deleted file mode 100644
index d81b70dfe..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-/** @page components_transportmanager_internal_design_transport_adapters_tcp_adapter TCP Adapter
- *
- * TCP adapter handles communication with remote devices via TCP/IP socket. It is implemented in
- * NsSmartDeviceLink::NsTransportManager::CTCPAdapter.
- *
- * @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_listen Listening for connections
- *
- * TCP adapter creates listening TCP socket (TCP port is specified in NsSmartDeviceLink::NsTransportManager::CTCPAdapter::cTCPAdapterPort)
- * and listens for incoming connections. Devices are identified by their IP address.
- *
- * @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_accept Accepting connection
- *
- * When TCP adapter accepts connection it checks if there is a device with IP address matching with IP address of accepted connection.
- * If there is no such device, then this device is added and device list is updated.
- *
- * @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_disconnecting Disconnecting
- *
- * When socket gets disconnected TCP adapter checks if there is another opened connection for IP address of disconnected application.
- * If it was the last application from this IP address then device with this IP address is removed and devices list is updated.
- */
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt
deleted file mode 100644
index 3a5d0f0e9..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-/** @page components_transportmanager_internal_design_transport_adapters Device Adapters
- *
- * TransportManager communicates with actual devices via device adapters.
- *
- * @section components_transportmanager_internal_design_transport_adapters_common Common logic
- *
- * Logic common to all device adapters is implemented in class NsSmartDeviceLink::NsTransportManager::CTransportAdapter.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_devices_map Devices map
- *
- * Devices map is a map of device handle to internal device structure NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SDevice.
- * Devices map is stored in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDevices. Any access to this map must be performed
- * with NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDevicesMutex locked.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_connections_map Connections map
- *
- * Connections map is a map of connection handle to internal connection structure NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection.
- * Connections map is stored in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mConnections. Any access to this map must be performed
- * with NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mConnectionsMutex locked.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_main_thread Device adapter main thread
- *
- * Device adapter main thread is started in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::run().
- * Specific device adapter must implement virtual function NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mainThread()
- * and implement its specific main thread logic there.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_connection_thread Device adapter connection thread
- *
- * Device adapter connection thread is started in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::startConnection().
- * Specific device adapter must implement virtual function NsSmartDeviceLink::NsTransportManager::CTransportAdapter::connectionThread()
- * and implement its specific connection thread logic there. When connection is established and socket file descriptor is set
- * in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mConnectionSocket specific device adapter may call
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::handleCommunication() to handle all communication through this socket
- * until connection is terminated.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_threads_termination Termination of device adapter threads
- *
- * Specific device adapter implementation must call in its destructor NsSmartDeviceLink::NsTransportManager::CTransportAdapter::waitForThreadsTermination()
- * to wait for termination of all threads (main thread and connection threads). Device adapter threads must be terminated before specific
- * device adapter class is destructed, so it can't be called in the destructor of base class and must be called explicitly from the inherited
- * class's destructor.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_device_scan Requesting scan for new devices
- *
- * Device scan is requested by setting flag NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDeviceScanRequested
- * and signaling conditional variable NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDeviceScanRequestedCond, which may be monitored
- * by specific device adapter if it supports device scanning. Specific device adaptere may call for this purpose
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::waitForDeviceScanRequest() which will wait on this conditional variable
- * until it's signaled or specified timeout expires.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_connecting_devices Connecting devices
- *
- * Device connection is initiated with a call to NsSmartDeviceLink::NsTransportManager::CTransportAdapter::connectDevice().
- * This method calls virtual function NsSmartDeviceLink::NsTransportManager::CTransportAdapter::createConnectionsListForDevice()
- * which may be implemented by specific device adapter to create a list of connections that must be established for the device.
- * For each connection created by device adapter it calls NsSmartDeviceLink::NsTransportManager::CTransportAdapter::startConnection()
- * which adds connection to connections map and starts connection thread.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_disconnecting_devices Disconnecting devices
- *
- * Device disconnection is initiated with a call to NsSmartDeviceLink::NsTransportManager::CTransportAdapter::disconnectDevice().
- * This method finds all connections in connections map that corresponds to specified device and calls
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::stopConnection() for each of them.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_handling_communication Handling communication
- *
- * All frames requested to be sent via NsSmartDeviceLink::NsTransportManager::CTransportAdapter::sendFrame() are stored in
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mFramesToSend. Pipe
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mNotificationPipeFds is used by
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::sendFrame() to notify connection thread that data is available
- * to be sent. NsSmartDeviceLink::NsTransportManager::CTransportAdapter::sendFrame() writes one byte to the write end of this pipe.
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::handleCommunication() uses poll() to wait for
- * incoming data using connection socket file descriptor and outgoing data using file descriptor of the read end of this pipe.
- * When either of them become available for reading or some error occurs (e.g. socket gets disconnected) connection thread
- * wakes up and handles this event. Notification pipe is also used to notify connection thread that connection has to be
- * terminated using NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mTerminateFlag.
- *
- * @subsection components_transportmanager_internal_design_transport_adapters_common_update_client_device_list Updating client device list.
- *
- * Specific device adapter may call NsSmartDeviceLink::NsTransportManager::CTransportAdapter::updateClientDeviceList() when its internal
- * knowledge about available devices is updated to notify device adapter client (TransportManager) about this update.
- *
- * @section components_transportmanager_internal_design_transport_adapters_common_specific Specific device adapters
- *
- * Current TransportManager implementation contains following device adapters:
- *
- * - @subpage components_transportmanager_internal_design_transport_adapters_bluetooth_adapter "Bluetooth Adapter"
- * - @subpage components_transportmanager_internal_design_transport_adapters_tcp_adapter "TCP Adapter"
- */
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Interaction.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Interaction.txt
deleted file mode 100644
index 66a798ecb..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/Interaction.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-/*! \page components_transportmanager_internal_design_interaction Sub-Components Interaction
-
-Internally Transport Manager is a root component for Device Adapters. After running Transport Manager creates Device Adapters and runs them too.
-
-During system life cycle all messages from Device Adapter are translated via Transport Manager to the clients. In other direction – all requests from clients are re-directed to respective Device Adapters by the Transport Manager.
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt
deleted file mode 100644
index 6c35f0962..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/*! \page components_transportmanager_internal_design_multithreading Multi-Threading in Component
-
-Internally Transport Manager uses different threads for different operations. This design solution was used to provide efficient asynchronous communication with clients and underlying Device Adapters.
-
-Transport Manager uses one thread to operate with all device-related callbacks. In other word all callbacks declared in NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener will be called from that thread.
-
-For every active connection one service thread will be created. This thread will be used for all connection-related callbacks. Therefore every implementation of NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener will be called in separated thread that allows client to support multiple connection simultaneously.
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt
deleted file mode 100644
index 8c1dd4318..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-/*! \page components_transportmanager_internal_design_trasport_manager Trasport Manager Implementation
-
-Actually Transport Manager component is implemented as classical manager component. It manages connections and abstract devices and provides unified information for the clients.
-
-Connection-related information encapsulated in structure NsSmartDeviceLink::NsTransportManager::CTransportManager::SConnectionInfo. Transport Manager manages these structures to store information about every active connection.
-
-Frame processing encapsulated in structure NsSmartDeviceLink::NsTransportManager::CTransportManager::SFrameDataForConnection. Transport Manager manages these structures to store information related to data for specific connection.
-
-Callback information between transport manager threads passed in form of special structures:
-NsSmartDeviceLink::NsTransportManager::CTransportManager::SDeviceListenerCallback.
-NsSmartDeviceLink::NsTransportManager::CTransportManager::SDataListenerCallback.
-
-Client calls to TM guarded by separate mutex. This allows use component from different threads without any risk.
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/index.txt b/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/index.txt
deleted file mode 100644
index b29ec48dd..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Internal Design/index.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-/*! \page components_transportmanager_internal_design Component Internal Design
-
-This chapter is focused on Transport Manager internal design and describes internal sub-components and use of multi-threading.
-
-Information regarding sub-components is described in following topics:
- - \subpage components_transportmanager_internal_design_transport_adapters "Device Adapters"
- - \subpage components_transportmanager_internal_design_trasport_manager "Trasport Manager Implementation"
-
-Detailed description of sub-components interaction is described here:
- - \subpage components_transportmanager_internal_design_interaction "Sub-Components Interaction"
-
-More information about internal usage of multi-threading id described here:
- - \subpage components_transportmanager_internal_design_multithreading "Multi-Threading in Component"
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase1.txt b/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase1.txt
deleted file mode 100644
index 4af46e432..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase1.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-/*! \page components_transportmanager_use_cases_1 Scenario with 1 device and 1 application
-
-<h3>Preconditions:</h3>
-<table>
- <tr>
- <th>Steps</th>
- <th>Actions</th>
- <th>Expected result</th>
- </tr>
- <tr>
- <td>1</td>
- <td>The Device is connected to SmartDeviceLink Core VIA Bluetooth or Wi-Fi</td>
- <td>
- <p>For BT: Devices are paired</p>
- <p>For Wi-Fi: Devices are in the same network</p>
- </td>
- </tr>
- <tr>
- <td>2</td>
- <td>Make sure that correct device is connected to SmartDeviceLink core</td>
- <td>IP-address of connected device is relevant</td>
- </tr>
-</table>
-
-<h3>Testcase:</h3>
-<table>
- <tr>
- <th>Steps</th>
- <th>Actions</th>
- <th>Expected result</th>
- </tr>
- <tr>
- <td>1</td>
- <td>Start SmartDeviceLink application on the Devices</td>
- <td>SmartDeviceLink application is up and ready</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Initiate a Device search in HMI</td>
- <td>HMI displays the list of found devices/applications</td>
- </tr>
- <tr>
- <td>3</td>
- <td>Connect to desired device\application</td>
- <td>Application is marked as connected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>4</td>
- <td>Send alert message from SmartDeviceLink application</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>5</td>
- <td>Disconnect device from SmartDeviceLink core</td>
- <td>Application is marked as disconnected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>6</td>
- <td>Try to send alert from disconnected device</td>
- <td>Alert shouldn’t be delivered and displayed in HMI</td>
- </tr>
- <tr>
- <td>7</td>
- <td><strong>Repeat steps 1-4 with using another connection method (BT of Wi-Fi)</strong></td>
- <td>Expected results should be the same</td>
- </tr>
- <tr>
- <td>8</td>
- <td><h3>Stress:</h3>Send big amount of alert messages in a short period of time</td>
- <td>All alert messages are processed correctly</td>
- </tr>
-</table>
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase2.txt b/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase2.txt
deleted file mode 100644
index de1d6baae..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase2.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-/*! \page components_transportmanager_use_cases_2 Scenario with 2 or more devices with 1 application onboard
-
-<h3>Preconditions:</h3>
-<table>
- <tr>
- <th>Steps</th>
- <th>Actions</th>
- <th>Expected result</th>
- </tr>
- <tr>
- <td>1</td>
- <td>Device-1 is connected to Core via Bluetooth</td>
- <td>Devices are paired</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Device-2 is connected to SmartDeviceLink Core via Wi-Fi</td>
- <td>Devices are in the same network</td>
- </tr>
- <tr>
- <td>3</td>
- <td>Make sure that correct devices are connected to SmartDeviceLink core</td>
- <td>IP-address of connected devices are relevant</td>
- </tr>
-</table>
-
-<h3>Testcase:</h3>
-<table>
- <tr>
- <th>Steps</th>
- <th>Actions</th>
- <th>Expected result</th>
- </tr>
- <tr>
- <td>1</td>
- <td>Start SmartDeviceLink application on the Devices</td>
- <td>SmartDeviceLink application is up and ready</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Initiate a Device search in HMI</td>
- <td>HMI displays the list of found devices/applications</td>
- </tr>
- <tr>
- <td>3</td>
- <td>Connect to application-1 on 1-st device</td>
- <td>Application is marked as connected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>4</td>
- <td>Connect to application on 2-nd device</td>
- <td>Application is marked as connected/notification is displayed in HMI. Both applications on device-1 and device-2 are marked as connected</td>
- </tr>
- <tr>
- <td>5</td>
- <td>Send alert message from SmartDeviceLink application-1</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>6</td>
- <td>Send alert message from SmartDeviceLink application-2</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>7</td>
- <td>Send alert messages from both application simultaneously</td>
- <td>Both alerts are displayed on HMI/Alerts are showed consequently</td>
- </tr>
- <tr>
- <td>8</td>
- <td>Disconnect device-2 from SmartDeviceLink core</td>
- <td>Application is marked as disconnected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>9</td>
- <td>Try to send alert messages from both application simultaneously</td>
- <td>Alert is delivered only from device-1</td>
- </tr>
- <tr>
- <td>10</td>
- <td>Disconnect device-1 from SmartDeviceLink core</td>
- <td>Application is marked as disconnected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>11</td>
- <td><strong>Repeat steps 1-9 with more devices or use same connection method (BT of Wi-Fi)</strong></td>
- <td>Expected results should be the same</td>
- </tr>
- <tr>
- <td>12</td>
- <td><h3>Stress:</h3>Send big amount of alert messages in a short period of time from all devices</td>
- <td>All alert messages are processed correctly</td>
- </tr>
-</table>
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase3.txt b/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase3.txt
deleted file mode 100644
index f11faadfd..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/UseCase3.txt
+++ /dev/null
@@ -1,131 +0,0 @@
-/*! \page components_transportmanager_use_cases_3 Scenario with 2 or more devices with 2 or more applications onboard
-
-<h3>Preconditions:</h3>
-<table>
- <tr>
- <th>Steps</th>
- <th>Actions</th>
- <th>Expected result</th>
- </tr>
- <tr>
- <td>1</td>
- <td>Device-1 is connected to Core via Bluetooth</td>
- <td>Devices are paired</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Device-2 is connected to SmartDeviceLink Core via Wi-Fi</td>
- <td>Devices are in the same network</td>
- </tr>
- <tr>
- <td>3</td>
- <td>Make sure that correct devices are connected to SmartDeviceLink core</td>
- <td>IP-address of connected devices are relevant</td>
- </tr>
-</table>
-
-<h3>Testcase:</h3>
-<table>
- <tr>
- <th>Steps</th>
- <th>Actions</th>
- <th>Expected result</th>
- </tr>
- <tr>
- <td>1</td>
- <td>Start SmartDeviceLink application on the Devices</td>
- <td>SmartDeviceLink application is up and ready</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Initiate a Device search in HMI</td>
- <td>HMI displays the list of found devices/applications</td>
- </tr>
- <tr>
- <td>3</td>
- <td>Connect to application-1 on 1-st device</td>
- <td>Application is marked as connected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>4</td>
- <td>Send alert message from SmartDeviceLink application-1 on device-1</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>5</td>
- <td>Connect to application-2 on 1-st device</td>
- <td>Application is marked as connected/notification is displayed in HMI Both applications are marked as connected</td>
- </tr>
- <tr>
- <td>6</td>
- <td>Send alert message from SmartDeviceLink application-2 on device-1</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>7</td>
- <td>Send alert messages from application-1 and application-2 on device-1 simultaneously</td>
- <td>Both alerts are displayed on HMI/Alerts are showed consequently</td>
- </tr>
- <tr>
- <td>8</td>
- <td>Connect to application-1 on 2-st device</td>
- <td>Application is marked as connected/notification is displayed in HMI. All 3 applications are marked as connected</td>
- </tr>
- <tr>
- <td>9</td>
- <td>Send alert messages from application-1 on device-1 and device-2 simultaneously</td>
- <td>Both alerts are displayed on HMI/Alerts are showed consequently</td>
- </tr>
- <tr>
- <td>10</td>
- <td>Send alert message from SmartDeviceLink application-1 on device-2</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>11</td>
- <td>Connect to application on 2-nd device</td>
- <td>Application is marked as connected/notification is displayed in HMI. All 4 applications are marked as connected</td>
- </tr>
- <tr>
- <td>12</td>
- <td>Send alert message from SmartDeviceLink application-2 on device-2</td>
- <td>Alert is displayed on HMI</td>
- </tr>
- <tr>
- <td>13</td>
- <td>Send alert messages from application-1 and application-2 on device-2 simultaneously</td>
- <td>Both alerts are displayed on HMI/Alerts are showed consequently</td>
- </tr>
- <tr>
- <td>14</td>
- <td>Send alert messages from application-2 on device-1 and device-2 simultaneously</td>
- <td>Both alerts are displayed on HMI/Alerts are showed consequently</td>
- </tr>
- <tr>
- <td>15</td>
- <td>Send alert messages from all application simultaneously</td>
- <td>Both alerts are displayed on HMI/Alerts are showed consequently</td>
- </tr>
- <tr>
- <td>16</td>
- <td>Disconnect device-1 from SmartDeviceLink core</td>
- <td>Applications are marked as disconnected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>17</td>
- <td>Disconnect device-2 from SmartDeviceLink core</td>
- <td>All applications are marked as disconnected/notification is displayed in HMI</td>
- </tr>
- <tr>
- <td>18</td>
- <td><strong>Repeat steps 1-15 with more devices and more applications or use same connection method (BT of Wi-Fi)</strong></td>
- <td>Expected results should be the same</td>
- </tr>
- <tr>
- <td>19</td>
- <td><h3>Stress:</h3>Send big amount of alert messages in a short period of time from all devices</td>
- <td>All alert messages are processed correctly</td>
- </tr>
-</table>
-
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/index.txt b/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/index.txt
deleted file mode 100644
index c929a16a8..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/Use Cases/index.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-/*! \page components_transportmanager_use_cases High-Level Use Cases to Test Component
-
-This page contains set of high-level use-cases which can be used for testing of Transport Manager functionallity.
-
-In described scenarious term “Device†means any device which is able to run SmartDeviceLink Applications and capable to connect via BT or
-Wi-Fi.
-
-- \subpage components_transportmanager_use_cases_1 Simple scenario for smoke tests of trasprot level.
-- \subpage components_transportmanager_use_cases_2 Many devices verification for transport level operations.
-- \subpage components_transportmanager_use_cases_3 Complex verification of correct transport level operations.
-*/
diff --git a/SDL_Core/doc/doxygen/components/TransportManager/index.txt b/SDL_Core/doc/doxygen/components/TransportManager/index.txt
deleted file mode 100644
index 73252c751..000000000
--- a/SDL_Core/doc/doxygen/components/TransportManager/index.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/*! \page components_transportmanager Transport Manager
-
-Transport Manager is a component of SmartDeviceLink application which is designed to provide transparent access to transport layer for other components. Current implementation provides unified access to connections via Bluetooth and TCP. Also this component allows run automatic device discovery and provides information about found devices which is able to connect to SmartDeviceLink.
-
-More detailed information is described in following chapters:
- - \subpage components_transportmanager_client "Transport Manager Client Specification"
- - \subpage components_transportmanager_internal_design "Component Internal Design"
- - \subpage components_transportmanager_use_cases "High-Level Use Cases to Test Component"
-*/
diff --git a/SDL_Core/doc/doxygen/components/index.txt b/SDL_Core/doc/doxygen/components/index.txt
deleted file mode 100644
index 6305b013c..000000000
--- a/SDL_Core/doc/doxygen/components/index.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/** \page components Components
- * Project contain following components:
- * - \subpage components_transportmanager "Transport Manager"
- * - \subpage components_protocolhandler "Protocol Handler"
- * - \subpage components_jsonhandler "JSON Handler"
- * - \subpage components_smartobjects "Smart Objects"
- * - \subpage components_appmgr "App Manager"
- * - \subpage components_hmi "HMI"
- */
diff --git a/SDL_Core/doc/doxygen/info.txt b/SDL_Core/doc/doxygen/info.txt
deleted file mode 100644
index e8afe55c1..000000000
--- a/SDL_Core/doc/doxygen/info.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! \page info Project information
-
-Here will be general information about project
-
-*/ \ No newline at end of file
diff --git a/SDL_Core/doc/doxygen/mainpage.txt b/SDL_Core/doc/doxygen/mainpage.txt
deleted file mode 100644
index a8d9a742b..000000000
--- a/SDL_Core/doc/doxygen/mainpage.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * \mainpage Project SmartDeviceLink
- *
- * \section introduction Introduction
- *
- * This is the entry point to the documentation about project.
- *
- * This manual is divided in the following sections:
- * - \subpage info "General project information"
- * - \subpage components "Project components"
- * - \subpage tools "Project specific tools"
- *
- * \section installation Installation
- *
- * \section developers_info Information for developers
- *
- * \section testers_info Information for testers
- *
- */
diff --git a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/Arhitecture.txt b/SDL_Core/doc/doxygen/tools/InterfaceGenerator/Arhitecture.txt
deleted file mode 100644
index 4cf9e84d9..000000000
--- a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/Arhitecture.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! \page tools_interfacegenerator_architecture InterfaceGenerator architecture
-
-InterfaceGenerator is designed as flexible and easily expendable tool that allows to implement both new parsers and generators independently. The core idea of InterfaceGenerator that it has middle-ware product - abstract model of interface that should be generated. This middle layer allows to separate collection of parsers from generators. Also it is possible to add any new validation / normalization component between them. So at the moment the root script creates actual parser and that parser produces model of interface (set of Python classes objects). After that interface model is passed to the desired generator and generator creates result source code files.
-
-*/
diff --git a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/CMake Integration.txt b/SDL_Core/doc/doxygen/tools/InterfaceGenerator/CMake Integration.txt
deleted file mode 100644
index b4fb0b3df..000000000
--- a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/CMake Integration.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-/*! \page tools_interfacegenerator_cmakeintegration Integration with CMake
-
-In order to organize usable build process that allows to create generated code at every workstation in accordance with local setting and ensure that code re-generated after any modification in source XML or InterfaceGenerator itself was designed custom CMake rule "GenerateInterface".
-
-This rule takes 3 arguments - name of source XML file, desired namespace for generated code and name of parser to use (name of parser is required because supported XML formats are indistinguishable and client must explicitly specify desired parser type).
-
-Example:
-
-<pre>
-GenerateInterface("test_v4_protocol_v2_0_revP.xml" "Gen::test::components::JSONHandler" "alrpcv2")
-</pre>
-
-*/
diff --git a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/How To Use.txt b/SDL_Core/doc/doxygen/tools/InterfaceGenerator/How To Use.txt
deleted file mode 100644
index 0f9e340bc..000000000
--- a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/How To Use.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*! \page tools_interfacegenerator_usage How to use InterfaceGenerator
-
-To run InterfaceGenerator the Python 2.7 interpreter should be installed. As input InterfaceGenerator requires full path to the source XML file, namespace to generate result code in, full path to the output directory where result source code C++ will be created and optionally explicit specification of parser type.
-
-Example1 (Run Generator.py to display help):
-
-<pre>
-$ python Generator.py -h
-
-usage: Generator.py [-h] --parser-type {alrpcv1,alrpcv2}
- source-xml namespace output-dir
-
-SmartSchema interface generator
-
-positional arguments:
- source-xml
- namespace
- output-dir
-
-optional arguments:
- -h, --help show this help message and exit
- --parser-type {alrpcv1,alrpcv2}
-</pre>
-
-Example2 (Run Generator.py to generate some code)
-
-<pre>
-python Generator.py /home/user1/xml/alrpc1.xml App::Gen:: /home/user1/gen --parser-type=alrpcv2
-</pre>
-
-*/
diff --git a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/Use of Output.txt b/SDL_Core/doc/doxygen/tools/InterfaceGenerator/Use of Output.txt
deleted file mode 100644
index b486fd7e3..000000000
--- a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/Use of Output.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-/*! \page tools_interfacegenerator_output Use of InterfaceGenerator output
-
-As a result InterfaceGenerator produces one .cpp and one .hpp file in the output directory. Those files contain one C++ class which named in accordance with input XML file name. Class is declared and implemented in specified namespace. Also all enums form source XML file have automatically generated declarations within specified namespace.
-
-Generated class is inherited form predefined base template class CSmartFactory. Actually this inherited class defines specific set of Smart Object schema's initialization methods which are set to the base class member and can be used by the clients.
-
-Also generated code contains string mapping for enums that is used to convert string representation or enums to integer values and vice versa.
-
-Result source code should be compilable but this is not guaranteed if source XML file contains identifier names that are not correct C++ identifiers.
-
-*/
diff --git a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/index.txt b/SDL_Core/doc/doxygen/tools/InterfaceGenerator/index.txt
deleted file mode 100644
index e34299b9c..000000000
--- a/SDL_Core/doc/doxygen/tools/InterfaceGenerator/index.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-/** \page tools_interfacegenerator InterfaceGenerator
- * InterfaceGenerator is a special code generation tool that allows creating of C++ source code to work with interface described as XML file.
- * InterfaceGenerator is a bundle of Python scripts. Root script is a Generator.py. This script should be used by the client to run generator.
- * Currently InterfaceGenerator supports generation form ALRPC v.1 and ALRPC v.2 XML formats.
- *
- * For more details please review:
- * - \subpage tools_interfacegenerator_usage "How to use InterfaceGenerator"
- * - \subpage tools_interfacegenerator_output "Use of InterfaceGenerator output"
- * - \subpage tools_interfacegenerator_architecture "InterfaceGenerator architecture"
- * - \subpage tools_interfacegenerator_cmakeintegration "Integration with CMake"
- */
diff --git a/SDL_Core/doc/doxygen/tools/index.txt b/SDL_Core/doc/doxygen/tools/index.txt
deleted file mode 100644
index 9ff8e13b3..000000000
--- a/SDL_Core/doc/doxygen/tools/index.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/** \page tools Tools
- * Project uses following special tools:
- * - \subpage tools_interfacegenerator "InterfaceGenerator"
- * - \subpage tools_counters "Counters library"
- */
diff --git a/SDL_Core/doc/grc/conf.smartDeviceLinkCore b/SDL_Core/doc/grc/conf.smartDeviceLinkCore
deleted file mode 100644
index 11c7643c6..000000000
--- a/SDL_Core/doc/grc/conf.smartDeviceLinkCore
+++ /dev/null
@@ -1,34 +0,0 @@
-# source filename
-regexp=\w+\.(?:cpp|h)
-colours=yellow
-===
-regexp=^(ERROR|FATAL)
-colours=red on_yellow
-===
-regexp=^WARN
-colours=red
-===
-regexp=^INFO
-colours=blue
-===
-regexp=^TRACE
-colours=magenta
-===
-# component
-regexp=(?<=\])\[[^]]+\]
-colours=cyan
-===
-# something invalid
-regexp=(?i)invalid
-colours=red
-===
-# RPC message start
-regexp=^\{$
-colours=bold
-count=block
-===
-# RPC message end
-regexp=^\}$
-colours=bold
-count=unblock
-
diff --git a/SDL_Core/doc/grc/grc.conf b/SDL_Core/doc/grc/grc.conf
deleted file mode 100644
index dfd3d4cbe..000000000
--- a/SDL_Core/doc/grc/grc.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# smartDeviceCore command
-(^|[/\w\.]+/)smartDeviceLinkCore\s?
-conf.smartDeviceLinkCore
diff --git a/SDL_Core/doc/install.txt b/SDL_Core/doc/install.txt
deleted file mode 100644
index 8076f427b..000000000
--- a/SDL_Core/doc/install.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-* Introduction
- ================
- smartDeviceLinkCore is an application which manages the transport, connection and communication between a head unit and mobile device.
-
-* OS and Hardware
- =========
- Ubuntu 12.04.01 LTS 32-bit OS on the PC with USB-dongle
- Application has been tested using 2 types of USB-dongle:
- D-Link DBT-122
- STLab B-121mini
-
-* External components
- ===================
- For build application we need:
- libbluetooth3, the BlueZ library
- libbluetooth-dev, the development files to link to the BluetZ library.
- Install libraries:
- sudo apt-get install libbluetooth3
- sudo apt-get install libbluetooth-dev
-
- We are using cmake to create build configurations.
- Install cmake:
- sudo apt-get install cmake
-
- Also, make sure the g++ compiler is installed:
- sudo apt-get install g++
-
- To start web-based HMI we need web-browser with web-socket RFC6455 support.
- For example Google Chromium. Install it using:
- sudo apt-get install chromium-browser
-
- To run InterfaceGenerator some python libraries are required and must be
- installed with following command:
- sudo pip install -r tools/InterfaceGenerator/requirements.txt
-
- For logging Apache log4cxx library is used. Install required packages with the following command:
- sudo apt-get install liblog4cxx10 liblog4cxx10-dev
-
- For installing pulseaudio development files which neededfor audio management fetures run:
- sudo apt-get install libpulse-dev
-
- For installing gstreamer development files which needed for audio management fetures:
- First add gstreamer repositories to your apt source list (/etc/apt/sources.list):
- deb http://ppa.launchpad.net/gstreamer-developers/ppa/ubuntu <distributive codename> main
- deb-src http://ppa.launchpad.net/gstreamer-developers/ppa/ubuntu <distributive codename> main
- use code name relevant to the Ubuntu version which you use instead of <distributive codename>.
- Run:
- sudo apt-get update
- and:
- sudo apt-get install gstreamer1.0*
-
-* Build application
- =================
- We support "out of sources" concept for build from R3.0.0
- It means all generated by build tools files will be stored in separate folder.
- Temporary build of application requires two steps.
- 1. Enter src/thirdPartyLibs/logger
- build logger:
-
- 1. Create directory outside of SmartDeviceLink project directory.
- For example "build" folder in the same folder with SmartDeviceLink git repo folder which has a name "git_repo":
- You will have folders structure like this:
- /home/projects/smart_device_link
- |--build
- |--git_repo
- |--doc
- |--src
- |--test
- |--DoxyFile
- \--CMakeLists.txt
- Enter this folder:
- cd build
-
- 2. Create build configuration using cmake:
- 2.1 For Debug configuration
- cmake ../git_repo
- 2.2 For Release configuration, run:
- cmake -DCMAKE_BUILD_TYPE=Release ../git_repo
- 2.3 For Debug configuration with tests, run:
- cmake -DBUILD_TESTS=On ../git_repo
-
- 3. Make project:
- make
-
- Ready to use release application will be in build/src/appMain/smartDeviceLinkCore
-
- 4. If You built configuration with tests (see 2.3 above), then You can run all project tests and see overall result with:
- make test
-
- 5. For creating the doxygen documentation run:
- make doxygen
diff --git a/SDL_Core/doc/qnx_build.txt b/SDL_Core/doc/qnx_build.txt
deleted file mode 100644
index 4f67d6eed..000000000
--- a/SDL_Core/doc/qnx_build.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Building the project
-cmake -DCMAKE_TOOLCHAIN_FILE=../applink/qnx_6.5.0_linux_x86.cmake ../applink
-or for Momentics project:
-cmake -DCMAKE_TOOLCHAIN_FILE=../applink/qnx_6.5.0_linux_x86.cmake -G "Eclipse CDT4 - Unix Makefiles" ../applink
-
-Building with support D-Bus and Qt 4.8
-Install D-Bus (see https://adc.luxoft.com/confluence/x/0AHJDw)
-Install Qt 4.8 (see https://adc.luxoft.com/confluence/x/UwfJDw)
-cmake -DHMI2=ON -DCMAKE_TOOLCHAIN_FILE=../applink/qnx_6.5.0_linux_x86.cmake ../applink
-or for Momentics project:
-cmake -DHMI2=ON -DCMAKE_TOOLCHAIN_FILE=../applink/qnx_6.5.0_linux_x86.cmake -G "Eclipse CDT4 - Unix Makefiles" ../applink
-
-make
-make install
-
-Running project:
-Change server IP in configuration file to QNX target IP.
-Copy directory bin to QNX target.
-You can copy it using scp. Example:
-scp -r user_name@linux_pc_ip:/full_path/to/dir .
-
-For Web HMI set target IP in ini file and change target IP in src/components/HMI/ffw/RPCClient.js
-! Currently we don't have any configuration file for HMI.
-
-Execute smartDeviceLinkCore on QNX qtarget.
-Execute HMI on Linux PC (only Web HMI).
-
-Have fun!
diff --git a/SDL_Core/doc/readme.txt b/SDL_Core/doc/readme.txt
deleted file mode 100644
index 86de7da08..000000000
--- a/SDL_Core/doc/readme.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-* Introduction
- ================
- smartDeviceCore is an application which manages the transport, connection and communication between a head unit and mobile device.
-
-* OS and Hardware
- =========
- Ubuntu 12.04.1 LTS 32-bit OS on the PC with USB-dongle
- Application has been tested using 2 types of USB-dongle:
- D-Link DBT-122
- STLab B-121mini
-
- * External components
- ===================
- For start application we need:
- libbluetooth3, the BlueZ library
- Install library:
- sudo apt-get install libbluetooth3
- To start web-based HMI we need web-browser with web-socket RFC6455 support.
- For example Google Chromium. Install it using:
- sudo apt-get install chromium-browser
- In current implementation Chromium is required for autostart HMI feature.
- For HMI autostart please create in the executable folder file named hmi_link.
- This file should contain one string with full path to HMI index.html file.
- For example:
- /home/user/projects/smart_device_link/src/components/HMI/index.html
-
-* Running application
- ====================
- Plug USB-dongle in.
- Switch Bluetooth on a mobile device ON and make the device discoverable.
- Pair mobile device with PC using Ubuntu tools.
- Device should contain SmartDeviceLink compatible application installed.
- Start application with command:
- ./smartDeviceLinkCore
- Application starts to search devices and starts HMI in cromium-browser.
- In case HMI has not been started please start web-based HMI manually in browser opening src/components/HMI/index.html.
- SmartDeviceLinkCore is searching Bluetooth devices with a correspondibg service.
- Go to info menu in HMI and press App button.
- Press change Devices button.
- Select the device from a list.
- Application opens all available ports on devices and starts communication.
- Returning to the App menu all applications will be shown in a list.
-
-* Colorized logs
- ==============
- You can have colorized log output of smartDeviceLinkCore's messages in the terminal with the help of grc:
-
- 1. Make sure grc is installed:
- sudo apt-get install grc
-
- 2. Copy the config files from the grc/ directory into ~/.grc/ directory:
- mkdir ~/.grc
- cp grc/* ~/.grc/
-
- 3. Add an alias to your shell's config (usually, ~/.bashrc or ~/.zshrc):
- alias grca='grc -es --colour=auto'
-
- Either restart the shell session or source the edited file:
- source ~/.bashrc
- or
- source ~/.zshrc
-
- 4. Start the smartDeviceLink core with the following command:
- grca ./smartDeviceLinkCore
-
- 5. PROFIT
-
diff --git a/SDL_Core/src/appMain/CMakeLists.txt b/SDL_Core/src/appMain/CMakeLists.txt
deleted file mode 100644
index 61a5f4eda..000000000
--- a/SDL_Core/src/appMain/CMakeLists.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-IF (${WEB_HMI})
-set (BROKER_LIBRARIES
- MessageBrokerClient
- MessageBrokerServer
-)
-ENDIF (${WEB_HMI})
-
-
-if (EXTENDED_MEDIA_MODE)
-set(default_media_inc
-${GSTREAMER_gst_INCLUDE_DIR}
-)
-else(EXTENDED_MEDIA_MODE)
-set(default_media_inc
-)
-endif()
-
-set(LIBRARIES
- ApplicationManager
- HMI_API
- MOBILE_API
- v4_protocol_v1_2_no_extra
- SmartObjects
- formatters
- ProtocolHandler
- connectionHandler
- TransportManager
- HMIMessageHandler
- MessageBroker
- ${BROKER_LIBRARIES}
- Utils
- encryption
- jsoncpp
- ConfigProfile
- RequestWatchdog
- MediaManager
- Resumption
- policies
- apr-1
- aprutil-1
-)
-
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES pthread)
-endif()
-
-if (BUILD_BT_SUPPORT)
- list(APPEND LIBRARIES bluetooth)
-endif()
-if (BUILD_AVAHI_SUPPORT)
- list(APPEND LIBRARIES avahi-client avahi-common)
-endif()
-if (BUILD_USB_SUPPORT)
- cmake_policy(PUSH)
- # make link_directories() treat paths relative to the source dir
- # info: cmake --help-policy CMP0015
- cmake_policy(SET CMP0015 NEW)
- link_directories(../thirdPartyLibs/libusbx)
- cmake_policy(POP)
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES Libusb-1.0.16)
-endif()
-endif()
-
-include_directories (
- ./
- ../components/protocol_handler/include/
- ../thirdPartyLibs/jsoncpp/include/
- ../components/application_manager/include
- ../components/formatters/include
- ../components/transport_manager/include
- ../components/config_profile/include
- ../components/utils/include/
- ../components/connection_handler/include/
- ../components/hmi_message_handler/include
- ../components/request_watchdog/include
- ../components/smart_objects/include/
- ../components/media_manager/include/
- ../components/policies/include/
- ../thirdPartyLibs/MessageBroker/include
- ../thirdPartyLibs/encryption/include
- ${CMAKE_SOURCE_DIR}/src/components/
- ${CMAKE_BINARY_DIR}/src/components/
- ${CMAKE_SOURCE_DIR}/src/components/dbus/include/
- ${CMAKE_SOURCE_DIR}
- ${default_media_inc}
-)
-
-set (SOURCES
- main.cc
- life_cycle.cc
-)
-
-if( NOT CMAKE_BUILD_TYPE )
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
-endif()
-
-add_executable(${PROJECT} ${SOURCES})
-target_link_libraries(${PROJECT} ${LIBRARIES})
-
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/policy_table.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/wp1_policy_table.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-
-if (${QT_HMI})
- set(main_qml "hmi/MainWindow.qml")
- set(plugins_dir "hmi/plugins")
-
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- set(start_command "./start-qml.sh")
- set(command_arguments "${main_qml} ${plugins_dir}")
- else ()
- execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} -b qmlscene
- OUTPUT_VARIABLE start_command
- )
- set(command_arguments "${main_qml} -I ${plugins_dir}")
- endif ()
-
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh
- "#!/bin/sh\n${start_command} ${command_arguments}\n")
-elseif (${WEB_HMI})
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hmi_link
- "${CMAKE_HOME_DIRECTORY}/src/components/HMI/index.html")
-endif ()
-
-# Install rules
-install(TARGETS ${PROJECT} DESTINATION bin)
-install(
- FILES log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini policy_table.json
- hmi_capabilities.json wp1_policy_table.json
- DESTINATION bin
-)
-if (${WEB_HMI})
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hmi_link DESTINATION bin)
- endif ()
-elseif (${QT_HMI})
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- install(FILES start-qml.sh DESTINATION bin
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
- GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
- endif ()
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh DESTINATION bin
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
- GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-endif ()
diff --git a/SDL_Core/src/appMain/audio.8bit.wav b/SDL_Core/src/appMain/audio.8bit.wav
deleted file mode 100644
index cebf6cc0e..000000000
--- a/SDL_Core/src/appMain/audio.8bit.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/appMain/btinclude.h b/SDL_Core/src/appMain/btinclude.h
deleted file mode 100644
index 3cefdd4ee..000000000
--- a/SDL_Core/src/appMain/btinclude.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/rfcomm.h>
-
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-
-#include <bluetooth/sco.h>
-
-#include <sys/socket.h>
-
-#include <unistd.h>
diff --git a/SDL_Core/src/appMain/hmi_capabilities.json b/SDL_Core/src/appMain/hmi_capabilities.json
deleted file mode 100644
index f1139176b..000000000
--- a/SDL_Core/src/appMain/hmi_capabilities.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "UI":
- {
- "language":"EN-US",
- "languages":
- [
- "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL","FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR","PT-BR","CS-CZ","DA-DK","NO-NO"
- ],
- "displayCapabilities":
- {
- "displayType":"GEN2_8_DMA",
- "textFields":
- [
- "mainField1","mainField2","mainField3","mainField4","statusBar","mediaClock","mediaTrack","alertText1","alertText2","alertText3",
- "scrollableMessageBody","initialInteractionText","navigationText1","navigationText2","ETA","totalDistance",
- "audioPassThruDisplayText1","audioPassThruDisplayText2","sliderHeader","sliderFooter","notificationText","menuName",
- "secondaryText","tertiaryText","timeToDestination","turnText"
- ],
- "mediaClockFormats":
- [
- "CLOCK1","CLOCK2","CLOCK3","CLOCKTEXT1","CLOCKTEXT2","CLOCKTEXT3","CLOCKTEXT4"
- ],
- "graphicSupported":true,
- "imageCapabilities":
- [
- "DYNAMIC"
- ]
- },
- "audioPassThruCapabilities":
- {
- "samplingRate" : "44KHZ",
- "bitsPerSample" : "8_BIT",
- "audioType" : "PCM"
- },
- "hmiZoneCapabilities":"FRONT",
- "softButtonCapabilities":
- {
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true,
- "imageSupported" :true
- }
- },
- "VR":
- {
- "capabilities":["TEXT"],
- "language":"EN-US",
- "languages":
- [
- "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL","FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR","PT-BR","CS-CZ","DA-DK","NO-NO"
- ]
- },
- "TTS":
- {
- "capabilities":"TEXT",
- "language":"EN-US",
- "languages":
- [
- "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL","FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR","PT-BR","CS-CZ","DA-DK","NO-NO"
- ]
- },
- "Buttons":
- {
- "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
- }
- },
- "VehicleInfo":
- {
- "make" :"Ford",
- "model" :"Fiesta",
- "modelYear" :"2013",
- "trim" :"SE"
- },
- "SyncMessageVersion":
- {
- "majorVersion": 3,
- "minorVersion": 0
- }
-}
diff --git a/SDL_Core/src/appMain/life_cycle.cc b/SDL_Core/src/appMain/life_cycle.cc
deleted file mode 100644
index 687cc331e..000000000
--- a/SDL_Core/src/appMain/life_cycle.cc
+++ /dev/null
@@ -1,321 +0,0 @@
-/**
-* \file signals.cc
-* \brief Signal (i.e. SIGINT) handling.
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "./life_cycle.h"
-#include "utils/signals.h"
-#include "config_profile/profile.h"
-
-using threads::Thread;
-
-namespace main_namespace {
-log4cxx::LoggerPtr LifeCycle::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
-
-namespace {
-
-void NameMessageBrokerThread(const System::Thread& thread,
- const std::string& name) {
- Thread::SetNameForId(Thread::Id(thread.GetId()), name);
-}
-
-} // namespace
-
-LifeCycle::LifeCycle()
- : transport_manager_(NULL)
- , protocol_handler_(NULL)
- , connection_handler_(NULL)
- , app_manager_(NULL)
- , hmi_handler_(NULL)
- , media_manager_(NULL)
- , policy_manager_(NULL)
-#ifdef QT_HMI
- , dbus_adapter_(NULL)
- , dbus_adapter_thread_(NULL) {
-#endif // QT_HMI
-#ifdef WEB_HMI
- , mb_adapter_(NULL)
- , message_broker_(NULL)
- , message_broker_server_(NULL)
- , mb_thread_(NULL)
- , mb_server_thread_(NULL)
- , mb_adapter_thread_(NULL) {
-#endif // WEB_HMI
-}
-
-bool LifeCycle::StartComponents() {
- LOG4CXX_INFO(logger_, "LifeCycle::StartComponents()");
- transport_manager_ =
- transport_manager::TransportManagerDefault::instance();
- DCHECK(transport_manager_ != NULL);
-
- protocol_handler_ =
- new protocol_handler::ProtocolHandlerImpl(transport_manager_);
- DCHECK(protocol_handler_ != NULL);
-
- connection_handler_ =
- connection_handler::ConnectionHandlerImpl::instance();
- DCHECK(connection_handler_ != NULL);
-
- app_manager_ =
- application_manager::ApplicationManagerImpl::instance();
- DCHECK(app_manager_ != NULL);
-
- hmi_handler_ =
- hmi_message_handler::HMIMessageHandlerImpl::instance();
- DCHECK(hmi_handler_ != NULL)
-
- transport_manager_->AddEventListener(protocol_handler_);
- transport_manager_->AddEventListener(connection_handler_);
-
- hmi_handler_->set_message_observer(app_manager_);
-
- media_manager_ = media_manager::MediaManagerImpl::instance();
-
- protocol_handler_->set_session_observer(connection_handler_);
- protocol_handler_->AddProtocolObserver(media_manager_);
- protocol_handler_->AddProtocolObserver(app_manager_);
- media_manager_->SetProtocolHandler(protocol_handler_);
-
- connection_handler_->set_transport_manager(transport_manager_);
- connection_handler_->set_connection_handler_observer(app_manager_);
-
- // It's important to initialise TM after setting up listener chain
- // [TM -> CH -> AM], otherwise some events from TM could arrive at nowhere
- transport_manager_->Init();
-
- policy_manager_ = policies::PolicyManagerImpl::instance();
- DCHECK(policy_manager_);
-
- policies::PolicyConfiguration policy_config;
- policy_config.set_pt_file_name("wp1_policy_table.json");
- policy_manager_->Init(policy_config);
-
- app_manager_->set_protocol_handler(protocol_handler_);
- app_manager_->set_connection_handler(connection_handler_);
- app_manager_->set_hmi_message_handler(hmi_handler_);
- app_manager_->set_policy_manager(policy_manager_);
-
- return true;
-}
-
-#ifdef WEB_HMI
-bool LifeCycle::InitMessageSystem() {
- message_broker_ =
- NsMessageBroker::CMessageBroker::getInstance();
- if (!message_broker_) {
- LOG4CXX_INFO(logger_, " Wrong pMessageBroker pointer!");
- return false;
- }
-
- message_broker_server_ =
- new NsMessageBroker::TcpServer(
- profile::Profile::instance()->server_address(),
- profile::Profile::instance()->server_port(),
- message_broker_);
- if (!message_broker_server_) {
- LOG4CXX_INFO(logger_, " Wrong pJSONRPC20Server pointer!");
- return false;
- }
- message_broker_->startMessageBroker(message_broker_server_);
- if (!networking::init()) {
- LOG4CXX_INFO(logger_, " Networking initialization failed!");
- return false;
- }
-
- if (!message_broker_server_->Bind()) {
- LOG4CXX_FATAL(logger_, "Bind failed!");
- return false;
- } else {
- LOG4CXX_INFO(logger_, "Bind successful!");
- }
-
- if (!message_broker_server_->Listen()) {
- LOG4CXX_FATAL(logger_, "Listen failed!");
- return false;
- } else {
- LOG4CXX_INFO(logger_, " Listen successful!");
- }
-
- mb_adapter_ =
- new hmi_message_handler::MessageBrokerAdapter(
- hmi_message_handler::HMIMessageHandlerImpl::instance(),
- profile::Profile::instance()->server_address(),
- profile::Profile::instance()->server_port());
-
- hmi_message_handler::HMIMessageHandlerImpl::instance()->AddHMIMessageAdapter(
- mb_adapter_);
- if (!mb_adapter_->Connect()) {
- LOG4CXX_INFO(logger_, "Cannot connect to remote peer!");
- return false;
- }
-
- LOG4CXX_INFO(logger_, "Start CMessageBroker thread!");
- mb_thread_ = new System::Thread(
- new System::ThreadArgImpl<NsMessageBroker::CMessageBroker>(
- *message_broker_, &NsMessageBroker::CMessageBroker::MethodForThread,
- NULL));
- mb_thread_->Start(false);
- // Thread can be named only when started because before that point
- // thread doesn't have valid Id to associate name with
- NameMessageBrokerThread(*mb_thread_, "MessageBrokerThread");
-
- LOG4CXX_INFO(logger_, "Start MessageBroker TCP server thread!");
- mb_server_thread_ = new System::Thread(
- new System::ThreadArgImpl<NsMessageBroker::TcpServer>(
- *message_broker_server_, &NsMessageBroker::TcpServer::MethodForThread,
- NULL));
- mb_server_thread_->Start(false);
- NameMessageBrokerThread(*mb_server_thread_, "MessageBrokerTCPServerThread");
-
- LOG4CXX_INFO(logger_, "StartAppMgr JSONRPC 2.0 controller receiver thread!");
- mb_adapter_thread_ = new System::Thread(
- new System::ThreadArgImpl<hmi_message_handler::MessageBrokerAdapter>(
- *mb_adapter_,
- &hmi_message_handler::MessageBrokerAdapter::SubscribeAndBeginReceiverThread,
- NULL));
- mb_adapter_thread_->Start(false);
- NameMessageBrokerThread(*mb_adapter_thread_, "MessageBrokerAdapterThread");
-
- return true;
-}
-#endif // WEB_HMI
-
-#ifdef QT_HMI
-/**
- * Initialize DBus component
- * @return true if success otherwise false.
- */
-bool LifeCycle::InitMessageSystem() {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
-
- dbus_adapter_ = new hmi_message_handler::DBusMessageAdapter(
- hmi_message_handler::HMIMessageHandlerImpl::instance());
-
- hmi_message_handler::HMIMessageHandlerImpl::instance()->AddHMIMessageAdapter(
- dbus_adapter_);
- if (!dbus_adapter_->Init()) {
- LOG4CXX_INFO(logger, "Cannot init DBus service!");
- return false;
- }
-
- dbus_adapter_->SubscribeTo();
-
- LOG4CXX_INFO(logger, "Start DBusMessageAdapter thread!");
- dbus_adapter_thread_ = new System::Thread(
- new System::ThreadArgImpl<hmi_message_handler::DBusMessageAdapter>(
- *dbus_adapter_,
- &hmi_message_handler::DBusMessageAdapter::MethodForReceiverThread,
- NULL));
- dbus_adapter_thread_->Start(false);
-
- return true;
-}
-#endif // QT_HMI
-
-void LifeCycle::StopComponents() {
- hmi_handler_->set_message_observer(NULL);
- connection_handler_->set_connection_handler_observer(NULL);
- protocol_handler_->RemoveProtocolObserver(app_manager_);
-
- LOG4CXX_INFO(logger_, "Destroying Application Manager.");
- app_manager_->Stop();
- application_manager::ApplicationManagerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Policy Manager.");
- policies::PolicyManagerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Transport Manager.");
- transport_manager_->Stop();
- transport_manager::TransportManagerDefault::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Media Manager");
- protocol_handler_->RemoveProtocolObserver(media_manager_);
- media_manager_->SetProtocolHandler(NULL);
- media_manager::MediaManagerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Connection Handler.");
- protocol_handler_->set_session_observer(NULL);
- connection_handler::ConnectionHandlerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Protocol Handler");
- delete protocol_handler_;
-
- LOG4CXX_INFO(logger_, "Destroying HMI Message Handler and MB adapter.");
-#ifdef QT_HMI
- if (dbus_adapter_) {
- if (hmi_handler_) {
- hmi_handler_->RemoveHMIMessageAdapter(dbus_adapter_);
- hmi_message_handler::HMIMessageHandlerImpl::destroy();
- }
- if (dbus_adapter_thread_) {
- dbus_adapter_thread_->Stop();
- dbus_adapter_thread_->Join();
- delete dbus_adapter_thread_;
- }
- delete dbus_adapter_;
- }
-#endif // QT_HMI
-#ifdef WEB_HMI
- hmi_handler_->RemoveHMIMessageAdapter(mb_adapter_);
- hmi_message_handler::HMIMessageHandlerImpl::destroy();
- mb_adapter_->unregisterController();
- mb_adapter_thread_->Stop();
- mb_adapter_thread_->Join();
- delete mb_adapter_thread_;
- mb_adapter_->Close();
- delete mb_adapter_;
-#endif // WEB_HMI
-
-#ifdef WEB_HMI
- LOG4CXX_INFO(logger_, "Destroying Message Broker");
- mb_server_thread_->Stop();
- mb_server_thread_->Join();
- mb_thread_->Stop();
- mb_thread_->Join();
- message_broker_server_->Close();
- message_broker_->stopMessageBroker();
- delete mb_server_thread_;
-
- networking::cleanup();
-#endif // WEB_HMI
-}
-
-void LifeCycle::StopComponentsOnSignal(int32_t params) {
- utils::ResetSubscribeToTerminateSignal();
- instance()->StopComponents();
- utils::ForwardSignal();
-}
-
-} // namespace main_namespace
diff --git a/SDL_Core/src/appMain/life_cycle.h b/SDL_Core/src/appMain/life_cycle.h
deleted file mode 100644
index e91606531..000000000
--- a/SDL_Core/src/appMain/life_cycle.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
-* \file signals.cc
-* \brief Signal (i.e. SIGINT) handling.
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_APPMAIN_LIFE_CYCLE_H_
-#define SRC_APPMAIN_LIFE_CYCLE_H_
-
-#include "hmi_message_handler/hmi_message_handler_impl.h"
-#ifdef QT_HMI
-# include "hmi_message_handler/dbus_message_adapter.h"
-#endif // QT_HMI
-#ifdef WEB_HMI
-# include "hmi_message_handler/messagebroker_adapter.h"
-#endif // WEB_HMI
-#include "application_manager/application_manager_impl.h"
-#include "connection_handler/connection_handler_impl.h"
-#include "protocol_handler/protocol_handler_impl.h"
-#include "transport_manager/transport_manager.h"
-#include "transport_manager/transport_manager_default.h"
-#include "media_manager/media_manager_impl.h"
-#include "policies/policy_manager_impl.h"
-#include "utils/singleton.h"
-
-#ifdef WEB_HMI
-# include "CMessageBroker.hpp"
-# include "mb_tcpserver.hpp"
-# include "networking.h" // cpplint: Include the directory when naming .h files
-#endif // WEB_HMI
-#include "system.h" // cpplint: Include the directory when naming .h files
-
-namespace main_namespace {
-class LifeCycle : public utils::Singleton<LifeCycle> {
- public:
- bool StartComponents();
-
- /**
- * Initialize MessageBroker component
- * @return true if success otherwise false.
- */
- bool InitMessageSystem();
- void StopComponents();
- static void StopComponentsOnSignal(int32_t params);
-
- private:
- LifeCycle();
- transport_manager::TransportManager* transport_manager_;
- protocol_handler::ProtocolHandlerImpl* protocol_handler_;
- connection_handler::ConnectionHandlerImpl* connection_handler_;
- application_manager::ApplicationManagerImpl* app_manager_;
- hmi_message_handler::HMIMessageHandlerImpl* hmi_handler_;
-#ifdef QT_HMI
- hmi_message_handler::DBusMessageAdapter* dbus_adapter_;
-#endif // QT_HMI
-#ifdef WEB_HMI
- hmi_message_handler::MessageBrokerAdapter* mb_adapter_;
-#endif // WEB_HMI
- media_manager::MediaManagerImpl* media_manager_;
- policies::PolicyManagerImpl* policy_manager_;
-
-#ifdef WEB_HMI
- NsMessageBroker::CMessageBroker* message_broker_;
- NsMessageBroker::TcpServer* message_broker_server_;
- System::Thread* mb_thread_;
- System::Thread* mb_server_thread_;
- System::Thread* mb_adapter_thread_;
-#endif // WEB_HMI
-#ifdef QT_HMI
- System::Thread* dbus_adapter_thread_;
-#endif // QT_HMI
-
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(LifeCycle);
-
- FRIEND_BASE_SINGLETON_CLASS(LifeCycle);
-};
-} // namespace main_namespace
-
-#endif // SRC_APPMAIN_LIFE_CYCLE_H_
diff --git a/SDL_Core/src/appMain/log4cxx.properties b/SDL_Core/src/appMain/log4cxx.properties
deleted file mode 100644
index 5301ba3fb..000000000
--- a/SDL_Core/src/appMain/log4cxx.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-# Log for all SmartDeviceLinkCoreSocketHub messages
-log4j.appender.SmartDeviceLinkCoreSocketHub=org.apache.log4j.net.SocketHubAppender
-log4j.appender.SmartDeviceLinkCoreSocketHub.port=4555
-log4j.appender.SmartDeviceLinkCoreSocketHub.locationInfo=true
-
-# Only ERROR and FATAL messages are logged to console
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.ImmediateFlush=true
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %m%n
-log4j.appender.Console.Threshold=ALL
-
-# Log for all SmartDeviceLinkCore messages
-log4j.appender.SmartDeviceLinkCoreLogFile=org.apache.log4j.FileAppender
-log4j.appender.SmartDeviceLinkCoreLogFile.File=SmartDeviceLinkCore.log
-log4j.appender.SmartDeviceLinkCoreLogFile.append=false
-log4j.appender.SmartDeviceLinkCoreLogFile.DatePattern='.' yyyy-MM-dd HH-mm
-log4j.appender.SmartDeviceLinkCoreLogFile.ImmediateFlush=true
-log4j.appender.SmartDeviceLinkCoreLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.SmartDeviceLinkCoreLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all TransportManager messages
-log4j.appender.TransportManagerLogFile=org.apache.log4j.FileAppender
-log4j.appender.TransportManagerLogFile.File=TransportManager.log
-log4j.appender.TransportManagerLogFile.append=false
-log4j.appender.TransportManagerLogFile.DatePattern='.' yyyy-MM-dd HH-mm
-log4j.appender.TransportManagerLogFile.ImmediateFlush=true
-log4j.appender.TransportManagerLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.TransportManagerLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all DBus plugin messages
-log4j.appender.DBusPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.DBusPluginLogFile.File=DBusPlugin.log
-log4j.appender.DBusPluginLogFile.append=false
-log4j.appender.DBusPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.DBusPluginLogFile.ImmediateFlush=true
-log4j.appender.DBusPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.DBusPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all HMI Framework plugin
-log4j.appender.HmiFrameworkPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.HmiFrameworkPluginLogFile.File=HmiFrameworkPlugin.log
-log4j.appender.HmiFrameworkPluginLogFile.append=false
-log4j.appender.HmiFrameworkPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.HmiFrameworkPluginLogFile.ImmediateFlush=true
-log4j.appender.HmiFrameworkPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.HmiFrameworkPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# All SmartDeviceLinkCore logs
-log4j.rootLogger=ALL, SmartDeviceLinkCoreLogFile, SmartDeviceLinkCoreSocketHub
-
-# TransportManager logs
-log4j.logger.TransportManager=ALL, TransportManagerLogFile
-
-# Log for DBus plugin QtHMI
-log4j.logger.DBusPlugin=ALL, DBusPluginLogFile
-
-# Log for HMI Framework plugin
-log4j.logger.HmiFrameworkPlugin=ALL, HmiFrameworkPluginLogFile
-
-# Log by log4cxx plugin
-log4j.logger.Log4cxxPlugin=ALL, HmiFrameworkPluginLogFile
diff --git a/SDL_Core/src/appMain/main.cc b/SDL_Core/src/appMain/main.cc
deleted file mode 100644
index 465f18d28..000000000
--- a/SDL_Core/src/appMain/main.cc
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * \file appMain.cc
- * \brief SmartDeviceLink main application sources
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/stat.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <cstdio>
-#include <cstdlib>
-#include <vector>
-#include <string>
-#include <iostream> // cpplint: Streams are highly discouraged.
-#include <fstream> // cpplint: Streams are highly discouraged.
-
-// ----------------------------------------------------------------------------
-
-#include "./life_cycle.h"
-
-#include "utils/signals.h"
-#include "config_profile/profile.h"
-
-#if defined(EXTENDED_MEDIA)
-#include <gst/gst.h>
-#endif
-
-#include "media_manager/media_manager_impl.h"
-// ----------------------------------------------------------------------------
-// Third-Party includes
-#include "networking.h" // cpplint: Include the directory when naming .h files
-
-// ----------------------------------------------------------------------------
-
-namespace {
-
-const char kBrowser[] = "/usr/bin/chromium-browser";
-const char kBrowserName[] = "chromium-browser";
-const char kBrowserParams[] = "--auth-schemes=basic,digest,ntlm";
-const char kLocalHostAddress[] = "127.0.0.1";
-const char kApplicationVersion[] = "SDL_RB_B3.2";
-
-#ifdef __QNX__
-bool Execute(std::string command, const char * const *) {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- if (system(command.c_str()) == -1) {
- LOG4CXX_INFO(logger, "Can't start HMI!");
- return false;
- }
- return true;
-}
-#else
-bool Execute(std::string file, const char * const * argv) {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- // Create a child process.
- pid_t pid_hmi = fork();
-
- switch (pid_hmi) {
- case -1: { // Error
- LOG4CXX_INFO(logger, "fork() failed!");
- return false;
- }
- case 0: { // Child process
- int32_t fd_dev0 = open("/dev/null", O_RDWR, S_IWRITE);
- if (0 > fd_dev0) {
- LOG4CXX_WARN(logger, "Open dev0 failed!");
- return false;
- }
- // close input/output file descriptors.
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- close(STDERR_FILENO);
-
- // move input/output to /dev/null.
- dup2(fd_dev0, STDIN_FILENO);
- dup2(fd_dev0, STDOUT_FILENO);
- dup2(fd_dev0, STDERR_FILENO);
-
- // Execute the program.
- if (execvp(file.c_str(), const_cast<char* const *>(argv)) == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger, "execvp() failed! Can't start HMI!");
- _exit(EXIT_FAILURE);
- }
-
- return true;
- }
- default: { /* Parent process */
- LOG4CXX_INFO(logger, "Process created with pid " << pid_hmi);
- return true;
- }
- }
-}
-#endif
-
-#ifdef WEB_HMI
-/**
- * Initialize HTML based HMI.
- * @return true if success otherwise false.
- */
-bool InitHmi() {
-log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
-
-struct stat sb;
-if (stat("hmi_link", &sb) == -1) {
- LOG4CXX_INFO(logger, "File with HMI link doesn't exist!");
- return false;
-}
-
-std::ifstream file_str;
-file_str.open("hmi_link");
-
-if (!file_str.is_open()) {
- LOG4CXX_INFO(logger, "File with HMI link was not opened!");
- return false;
-}
-
-file_str.seekg(0, std::ios::end);
-int32_t length = file_str.tellg();
-file_str.seekg(0, std::ios::beg);
-
-std::string hmi_link;
-std::getline(file_str, hmi_link);
-
-
-LOG4CXX_INFO(logger,
- "Input string:" << hmi_link << " length = " << hmi_link.size());
-file_str.close();
-
-if (stat(hmi_link.c_str(), &sb) == -1) {
- LOG4CXX_INFO(logger, "HMI index.html doesn't exist!");
- return false;
-}
-
-#ifdef OS_MACOSX
- // On Mac, use system() to call osascript to start Chrome
- const char kCommand[] = "osascript -e 'tell application \"Google Chrome\" to open \"%s\"'";
- char *cmd;
-
- asprintf(&cmd, kCommand, hmi_link.c_str());
-
- int ret = system(cmd);
-
- free(cmd);
-
- if (ret != 0)
- LOG4CXX_ERROR(logger, "Error launching HTML5 HMI: is Google Chrome installed?");
-
- return (ret ? false : true);
-#elif OS_LINUX
- // On Linux, use Execute() to start the browser
- std::string kBin = kBrowser;
- const char* const kParams[4] = {kBrowserName, kBrowserParams,
- hmi_link.c_str(), NULL};
-
- return Execute(kBin, kParams);
-#else
-#error "Add a way to launch the web HMI on your platform"
-#endif
-}
-#endif // WEB_HMI
-
-#ifdef QT_HMI
-/**
- * Initialize HTML based HMI.
- * @return true if success otherwise false.
- */
-bool InitHmi() {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- std::string kStartHmi = "./start_hmi.sh";
- struct stat sb;
- if (stat(kStartHmi.c_str(), &sb) == -1) {
- LOG4CXX_INFO(logger, "HMI start script doesn't exist!");
- return false;
- }
-
- return Execute(kStartHmi, NULL);
-}
-#endif // QT_HMI
-}
-
-/**
- * \brief Entry point of the program.
- * \param argc number of argument
- * \param argv array of arguments
- * \return EXIT_SUCCESS or EXIT_FAILURE
- */
-int32_t main(int32_t argc, char** argv) {
-
- // --------------------------------------------------------------------------
- // Logger initialization
-
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- log4cxx::PropertyConfigurator::configure("log4cxx.properties");
-
- threads::Thread::SetNameForId(threads::Thread::CurrentId(), "MainThread");
-
- LOG4CXX_INFO(logger, "Application started!");
- LOG4CXX_INFO(logger, "Application version " << kApplicationVersion);
-
- // Initialize gstreamer. Needed to activate debug from the command line.
-#if defined(EXTENDED_MEDIA_MODE)
- gst_init(&argc, &argv);
-#endif
-
- // --------------------------------------------------------------------------
- // Components initialization
-
- profile::Profile::instance()->config_file_name("smartDeviceLink.ini");
-
- main_namespace::LifeCycle::instance()->StartComponents();
-
- // --------------------------------------------------------------------------
- // Third-Party components initialization.
-
- if (!main_namespace::LifeCycle::instance()->InitMessageSystem()) {
- main_namespace::LifeCycle::instance()->StopComponents();
-// without this line log4cxx threads continue using some instances destroyed by exit()
- log4cxx::Logger::getRootLogger()->closeNestedAppenders();
- exit(EXIT_FAILURE);
- }
- LOG4CXX_INFO(logger, "InitMessageBroker successful");
-
- if (profile::Profile::instance()->launch_hmi()) {
- if (profile::Profile::instance()->server_address() ==
- std::string(kLocalHostAddress)) {
- LOG4CXX_INFO(logger, "Start HMI on localhost");
-
- if (!InitHmi()) {
- main_namespace::LifeCycle::instance()->StopComponents();
-// without this line log4cxx threads continue using some instances destroyed by exit()
- log4cxx::Logger::getRootLogger()->closeNestedAppenders();
- exit(EXIT_FAILURE);
- }
- LOG4CXX_INFO(logger, "InitHmi successful");
- }
- }
- // --------------------------------------------------------------------------
-
- utils::SubscribeToTerminateSignal(
- &main_namespace::LifeCycle::StopComponentsOnSignal);
-
- pause();
-}
diff --git a/SDL_Core/src/appMain/policy_table.json b/SDL_Core/src/appMain/policy_table.json
deleted file mode 100644
index 60a8f9746..000000000
--- a/SDL_Core/src/appMain/policy_table.json
+++ /dev/null
@@ -1,393 +0,0 @@
-{
- "rpcs":{
- "GetDTCs":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DiagnosticMessage":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AlertManeuver":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UnsubscribeVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction":{
- "hmi_levels":[
- "FULL"
- ]
- },
- "Speak":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "OnAppInterfaceUnregistered":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnButtonPress":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "RegisterAppInterface":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteSubMenu":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnButtonEvent":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteInteractionChoiceSet":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnPermissionsChange":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "Show":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddCommand":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider":{
- "hmi_levels":[
- "FULL"
- ]
- },
- "ResetGlobalProperties":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnHMIStatus":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SubscribeButton":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UnsubscribeButton":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnTBTClientState":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnAudioPassThru":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformAudioPassThru":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "EndAudioPassThru":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage":{
- "hmi_levels":[
- "FULL"
- ]
- },
- "OnLanguageChange":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-"DialNumber":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"PutFile":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"DeleteFile":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"ListFiles":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"SetAppIcon":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-
- "OnSyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- }
diff --git a/SDL_Core/src/appMain/smartDeviceLink.ini b/SDL_Core/src/appMain/smartDeviceLink.ini
deleted file mode 100644
index c7bdc5f33..000000000
--- a/SDL_Core/src/appMain/smartDeviceLink.ini
+++ /dev/null
@@ -1,77 +0,0 @@
- ; The INI-file consists of different chapters.
-; Each chapter begins with the line containing
-; the name in square brackets. Syntax:
-; [chapter]
-; The chapters consists of a set of items with a
-; assinged value. The syntax is:
-; item=value
-; All white spaces an second encounters of chapters
-; or items will be ignored.
-; Remarks start with semicolon or star as first character.
-; It is alowed for names of chapters and items to
-; contain semicolon and star. Possible syntax is:
-; [ chapter ] ;Remark
-; item = value ;Remark
-
-[HMI]
-LaunchHMI = true
-ServerAddress = 127.0.0.1
-ServerPort = 8087
-VideoStreamingPort = 5050
-AudioStreamingPort = 5080
-
-[MAIN]
-; Stanrart min stack size
-; in Ubuntu : PTHREAD_STACK_MIN = 16384
-; in QNX : PTHREAD_STACK_MIN = 256
-;The value of a variable ThreadStackSize used only if its realy needed, other way stack size will be PTHREAD_STACK_MIN
-ThreadStackSize = 16384
-MixingAudioSupported = true
-PoliciesTable = policy_table.json
-HMICapabilities = hmi_capabilities.json
-MaxCmdID = 2000000000
-DefaultTimeout = 10000
-AppDirectoryQuota = 104857600
-AppHMILevelNoneTimeScaleMaxRequests = 100
-AppHMILevelNoneRequestsTimeScale = 10
-AppTimeScaleMaxRequests = 100
-AppRequestsTimeScale = 10
-PendingRequestsAmount = 1000
-HeartBeatTimeout = 0
-SupportedDiagModes = 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x09, 0x0A, 0x18, 0x19, 0x22, 0x3E
-
-[MEDIA MANAGER]
-EnableRedecoding = false
-;VideoStreamConsumer = socket
-;AudioStreamConsumer = socket
-;VideoStreamConsumer = file
-;AudioStreamConsumer = file
-VideoStreamConsumer = pipe
-AudioStreamConsumer = pipe
-;Temp solution: if you change NamedPipePath also change path to pipe in src/components/qt_hmi/qml_model_qtXX/views/SDLNavi.qml
-NamedVideoPipePath = /tmp/video_stream_pipe
-NamedAudioPipePath = /tmp/audio_stream_pipe
-VideoStreamFile = video_stream_file
-AudioStreamFile = audio_stream_file
-
-
-; HelpPromt and TimeOutPrompt is a vector of strings separated by comma
-[GLOBAL PROPERTIES]
-HelpPromt = Please speak one of the following commands, Please say a command
-TimeOutPromt = Please speak one of the following commands, Please say a command
-HelpTitle = Available Vr Commands List
-
-[FILESYSTEM RESTRICTIONS]
-; Max allowed number of PutFile requests for one application in NONE
-PutFileRequest = 5
-; Max allowed number of DeleteFile requests for one application in NONE
-DeleteFileRequest = 5
-; Max allowed number of ListFiles requests for one application in NONE
-ListFilesRequest = 5
-
-[VR COMMANDS]
-HelpCommand = Help
-
-
-[AppInfo]
-AppInfoStorage = app_info.dat
diff --git a/SDL_Core/src/appMain/start-qml.sh b/SDL_Core/src/appMain/start-qml.sh
deleted file mode 100755
index 1665b2689..000000000
--- a/SDL_Core/src/appMain/start-qml.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-#
-# This script start qml on QNX
-#
-
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib:
-QWS_DISPLAY=qnx
-QWS_MOUSE_PROTO=qnx
-QWS_KEYBOARD=qnx
-export QWS_DISPLAY QWS_MOUSE_PROTO QWS_KEYBOARD
-
-if [ ` pidin | grep devi-hid | wc -l` -eq 0 ]
-then
- slay -f devi-hid
-fi
-
-filename=$1
-pluginpath=$2
-
-if [ -z "$filename" ]
-then
- echo "Usage: start-qml.sh <filename> [<pluginpath>]"
- exit 1
-fi
-if [ -n "$pluginpath" ]
-then
- path="-I $pluginpath"
-fi
-
-/usr/photon/bin/devi-hid -Pr kbd mouse
-qmlviewer -fullscreen -stayontop -qws $filename $path
-slay devi-hid
diff --git a/SDL_Core/src/appMain/test.txt b/SDL_Core/src/appMain/test.txt
deleted file mode 100644
index 0e4b93615..000000000
--- a/SDL_Core/src/appMain/test.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-{'request': {'parameters': {'vrSynonyms': ['Stitcher'], 'appName': 'Stitcher', 'languageDesired': 'EN-US', 'syncMsgVersion': {'majorVersion': 1, 'minorVersion': 1}, 'isMediaApplication': True, 'autoActivateID': '', 'ngnMediaScreenAppName': 'Stitc'}, 'correlationID': 1, 'name': 'RegisterAppInterface'}}
-{'request': {'parameters': {}, 'name':'Show'}}
-{'request': {'parameters': {'mediaTrack': 'Stitcher', 'mainField1': 'Stitcher Radio', 'alignment': 'CENTERED', 'mainField2': ''}, 'correlationID': 3000, 'name': 'Show'}}
diff --git a/SDL_Core/src/appMain/wp1_policy_table.json b/SDL_Core/src/appMain/wp1_policy_table.json
deleted file mode 100644
index 767ba098d..000000000
--- a/SDL_Core/src/appMain/wp1_policy_table.json
+++ /dev/null
@@ -1,198 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "789" : {
- "groups" : [ "Notifications", "Base-4" ],
- "nicknames" : [ "Music App" ],
- "priority" : 1
- },
- "default" : {
- "groups" : [ "Base-4" ],
- "priority" : 1
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommandID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenuID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AlertID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AlertManeuverID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ChangeRegistrationID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSetID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommandID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFileID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSetID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenuID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DialNumberID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DiagnosticMessageID":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequestID":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThruID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponseID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCsID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFilesID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregisteredID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThruID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEventID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPressID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommandID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistractionID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatusID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChangeID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChangeID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientStateID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThruID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteractionID" : {
- "hmi_levels" : [ "FULL" ]
- },
- "PutFileID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ReadDIDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "RegisterAppInterfaceID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalPropertiesID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessageID" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIconID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayoutID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalPropertiesID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimerID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ShowConstantTBTID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SliderID" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SpeakID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButtonID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SubscribeVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterfaceID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButtonID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnsubscribeVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnListID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- }
- },
- "module_config" : {
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://applinkqa.trafficmanager.net/api/policies" ]
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/CMakeLists.txt b/SDL_Core/src/components/CMakeLists.txt
deleted file mode 100644
index 829ff70db..000000000
--- a/SDL_Core/src/components/CMakeLists.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-# --- Interfaces
-add_subdirectory(./interfaces)
-
-# --- TransportManager
-add_subdirectory(./transport_manager)
-
-# --- Policies
-add_subdirectory(./resumption)
-
-# --- formatters
-add_subdirectory(./formatters)
-
-# --- ProtocolHandler
-add_subdirectory(./protocol_handler)
-
-# --- ConnectionHandler
-add_subdirectory(./connection_handler)
-
-# --- Utils
-add_subdirectory(./utils)
-
-# --- Validated types
-add_subdirectory(./rpc_base)
-
-# --- SmartObjects
-add_subdirectory(./smart_objects)
-
-# --- Application manager
-add_subdirectory(./application_manager)
-
-# --- Request watchdog
-add_subdirectory(./request_watchdog)
-
-# --- HMI Message Handler
-add_subdirectory(./hmi_message_handler)
-
-# --- Config
-add_subdirectory(./config_profile)
-
-# --- AudioManager
-add_subdirectory(./media_manager)
-
-# --- Policies
-add_subdirectory(./policies)
-
-if (${QT_HMI})
-# --- DBus
- add_subdirectory(./dbus)
-# --- Qt HMI
- add_subdirectory(./qt_hmi)
-endif ()
-
diff --git a/SDL_Core/src/components/HMI/app/AppViews.js b/SDL_Core/src/components/HMI/app/AppViews.js
deleted file mode 100644
index 30b2ddc42..000000000
--- a/SDL_Core/src/components/HMI/app/AppViews.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL
- * @desc Setup application container for all views
- * @category Application
- * @filesource app/AppViews.js
- * @version 1.0
- */
-
-/** Appending views */
-SDL.AppViews = Em.ContainerView.extend( {
-
- elementId: 'app',
-
- childViews: [
- SDL.HomeView,
- SDL.MediaView,
- SDL.NavigationAppView,
- SDL.InfoView,
- SDL.PhoneView,
- SDL.ClimateView,
- SDL.NavigationView,
- SDL.SettingsView,
- SDL.TurnByTurnView,
- SDL.TBTTurnList,
- SDL.OptionsView,
- SDL.InteractionChoicesView,
- SDL.Keyboard,
- SDL.VRHelpListView,
- SDL.ScrollableMessage,
- SDL.SliderView,
- SDL.StatusClimateView,
- SDL.StatusMediaView,
- SDL.StatusNavigationView,
- SDL.StatusInfoView,
- SDL.StatusPhoneView,
- SDL.TopControls,
- SDL.BottomControls,
- SDL.TTSPopUp,
- SDL.AlertPopUp,
- SDL.AudioPassThruPopUp,
- SDL.VRPopUp,
- SDL.VehicleInfo,
- SDL.TBTClientStateView,
- SDL.DriverDistraction,
- SDL.ExitApp,
- SDL.ControlButtons
- ],
-
- /*
- * This method is called when the app is fully rendered and ready to be
- * displayed. We notify the backend to hide the splash and load internal
- * view modules
- */
- didInsertElement: function() {
-
- this._super();
-
- SDL.set('appReady', true);
- }
-});
diff --git a/SDL_Core/src/components/HMI/app/Flags.js b/SDL_Core/src/components/HMI/app/Flags.js
deleted file mode 100644
index a3f15d034..000000000
--- a/SDL_Core/src/components/HMI/app/Flags.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL
- * @desc flags for application flags used for diffeerent configurations of
- * application As the same code base is used fro Production and RnD work
- * pakackages, it is necessary to configare application for different
- * needs/releases It is NOT recommended to extend this object with new
- * flags. Each modification should be discussed with PM in advance
- * @category Application
- * @filesource app/AppFlags.js
- * @version 1.0
- */
-
-FLAGS = Em.Object.create( {
- /**
- * Set language for localization
- */
- SET_LOCALIZATION: 'eng',
-
- WEBSOCKET_URL: "ws://127.0.0.1:8087",
-
- TOUCH_EVENT_STARTED: false
-
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/SDLApp.js b/SDL_Core/src/components/HMI/app/SDLApp.js
deleted file mode 100644
index bbe464400..000000000
--- a/SDL_Core/src/components/HMI/app/SDLApp.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL
- * @desc Setup application namespace and settings
- * @category Application
- * @filesource app/App.js
- * @version 1.0
- */
-
-SDL = Em.Application.create( {
-
- /** Override for mouse/touch events */
- customEvents: ('ontouchstart' in document.documentElement) ? {
- touchstart: 'actionDown',
- touchend: 'actionUp',
- touchmove: 'actionMove'
- } : {
- mousedown: 'actionDown',
- mouseup: 'actionUp',
- mousemove: 'actionMove'
- },
-
- /** Help mode flag {boolean} */
- helpMode: false,
-
- // determine home view {string}
- homeView: 'home',
-
- /** Set language for localization */
- localization: 'eng',
-
- // Application ready flag
- appReady: false,
-
- // Debug text
- debugText: 'debug&nbsp;mode',
-
- init: function() {
-
- Em.Logger.log('SDL: Application init!');
-
- this._super();
- },
-
- /** Application ready event */
- ready: function() {
-
- Em.Logger.log('SDL: Application ready!');
-
- /** State manager init */
- SDL.States = StateManager.create();
-
- /** container for all views */
- SDL.views = SDL.AppViews.create().appendTo('body');
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/StateManager.js b/SDL_Core/src/components/HMI/app/StateManager.js
deleted file mode 100644
index 000ab8dc3..000000000
--- a/SDL_Core/src/components/HMI/app/StateManager.js
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.States
- * @desc State manager definition
- * @category State Manager
- * @filesource app/StateManager.js
- * @version 1.0
- */
-
- // Extend base Em.State object
-Em.State.reopen({
-
- // used for determine display status
- active: false,
-
- enter: function () {
-
- this.set('active', true);
- },
-
- exit: function () {
-
- this.set('active', false);
- SDL.SDLController.triggerState();
- }
-});
-
-// State Manager class
-var StateManager = Em.StateManager.extend({
-
- // default state
- initialState: 'home',
-
- /**
- * Name of the next state to which at the moment is a transition
- */
- nextState: 'home',
-
- /**
- * Method used for determine previous currentState and make
- */
- goToStates: function (stateName) {
-
- SDL.SDLController.userStateAction();
- this.set('nextState', stateName);
- this.transitionTo(stateName);
- },
-
- /** Go to parent state */
- back: function () {
-
- if (this.currentState.parentState.hasOwnProperty('name')) {
- this.goToStates(this.currentState.parentState.get('path'));
- } else {
- this.goToStates('home');
- }
-
- SDL.StateVisitor.visit(this.currentState);
- },
-
- /** Home state */
- home: Em.State.create({
-
- }),
-
- /** Climate state */
- climate: Em.State.create({
-
- }),
-
- /** info state */
- info: Em.State.create({
-
- exit: function () {
-
- SDL.InfoController.set('activeState', SDL.States.currentState.get('path'));
- this._super();
- },
-
- services: Em.State.create({
-
- }),
-
- travelLink: Em.State.create({
-
- }),
-
- alerts: Em.State.create({
-
- }),
-
- calendar: Em.State.create({
-
- }),
-
- apps: Em.State.create({
-
- /**
- * Calls function from BasicCommunicationRPC to get new list of
- * applications
- */
- enter: function () {
-
- this._super();
- FFW.BasicCommunication.OnFindApplications();
- }
- }),
-
- devicelist: Em.State.create({
- /**
- * Calls function to clear device list on DeviceListView
- */
- enter: function () {
-
- this._super();
- SDL.DeviceListView.clearDeviceList();
- FFW.BasicCommunication.OnStartDeviceDiscovery();
- }
- }),
-
- nonMedia: Em.State.create({
-
- enter: function () {
-
- this._super();
- SDL.SDLController.activateTBT();
- },
-
- exit: function () {
-
- this._super();
-
- SDL.SDLAppController.deactivateApp();
- }
- })
- }),
-
- /** settings state */
- settings: Em.State.create({
-
- }),
-
- /** Media state */
- media: Em.State.create({
-
- exit: function () {
-
- SDL.MediaController.set('activeState', SDL.States.currentState.get('path'));
- this._super();
- },
-
- player: Em.State.create({}),
-
- sdlmedia: Em.State.create({
-
- enter: function () {
-
- this._super();
- SDL.SDLController.activateTBT();
- },
-
- exit: function () {
-
- this._super();
-
- SDL.SDLAppController.deactivateApp();
- }
-
- })
- }),
-
- navigationApp: Em.State.create({
-
- baseNavigation: Em.State.create({
-
- }),
-
- exit: function () {
-
- this._super();
-
- SDL.SDLAppController.deactivateApp();
- }
- }),
-
- /** Navigation state */
- navigation: Em.State.create({
-
- }),
-
- /** Phone state */
- phone: Em.State.create({
-
- dialpad: Em.State.create({
-
- })
- })
-});
diff --git a/SDL_Core/src/components/HMI/app/controller/AppController.js b/SDL_Core/src/components/HMI/app/controller/AppController.js
deleted file mode 100644
index c65546339..000000000
--- a/SDL_Core/src/components/HMI/app/controller/AppController.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.AppController
- * @desc App general logic
- * @category Controller
- * @filesource app/controller/AppController.js
- * @version 1.0
- */
-
-SDL.AppController = Em.Object.create( {
- active: false
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controller/InfoController.js b/SDL_Core/src/components/HMI/app/controller/InfoController.js
deleted file mode 100644
index e31f4ed28..000000000
--- a/SDL_Core/src/components/HMI/app/controller/InfoController.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoController
- * @desc Info Controller logic
- * @category Controller
- * @filesource app/controller/InfoController.js
- * @version 1.0
- */
-
-SDL.InfoController = Em.Object.create( {
-
- activeState: 'info.apps',
-
- hiddenLeftMenu: false,
-
- onState: function(event) {
-
- SDL.States.goToStates('info.' + event.goToState);
- },
-
- onChildState: function(event) {
-
- SDL.States.goToStates(SDL.States.currentState.get('path') + '.'
- + event.goToState);
- },
-
- /**
- * Switching on Application
- */
- turnOnSDL: function () {
-
- //SDL.CDModel.set('active', false);
- /**
- * Set SDL Data active, flag for status bar
- */
- if (SDL.SDLAppController.model) {
- SDL.SDLAppController.model.set('active', true);
- }
- /**
- * Go to SDL state
- */
- if (SDL.SDLAppController.model.appType) {
- for (var i = 0; i < SDL.SDLAppController.model.appType.length; i++) {
- if (SDL.SDLAppController.model.appType[i] == "NAVIGATION") {
- SDL.States.goToStates('navigationApp.baseNavigation');
- return;
- }
- }
- }
-
- SDL.States.goToStates('info.nonMedia');
- //SDL.States.goToStates('media.sdlmedia');
-
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controller/MediaController.js b/SDL_Core/src/components/HMI/app/controller/MediaController.js
deleted file mode 100644
index f354cb84f..000000000
--- a/SDL_Core/src/components/HMI/app/controller/MediaController.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.MediaController
- * @desc Media module logic
- * @category Controller
- * @filesource app/controller/MediaController.js
- * @version 1.0
- */
-SDL.MediaController = Em.Object.create({
-
- /**
- * Initial substate
- */
- activeState: 'media.player',
-
- /**
- * Turn on CD
- */
- turnOnCD: function () {
-
- if (!SDL.States.media.player.active) {
- SDL.States.goToStates('media.player');
- }
-
- if (SDL.SDLAppController.model) {
- SDL.SDLAppController.model.set('active', false);
- }
- SDL.CDModel.set('active', true);
- },
-
- /**
- * Switching on Application
- */
- turnOnSDL: function () {
-
- SDL.CDModel.set('active', false);
- /**
- * Set SDL Data active, flag for status bar
- */
- if (SDL.SDLAppController.model) {
- SDL.SDLAppController.model.set('active', true);
- }
- /**
- * Go to SDL state
- */
- if (SDL.SDLAppController.model.appType) {
- for (var i = 0; i < SDL.SDLAppController.model.appType.length; i++) {
- if (SDL.SDLAppController.model.appType[i] == "NAVIGATION") {
- SDL.States.goToStates('navigationApp.baseNavigation');
- return;
- }
- }
- }
-
- SDL.States.goToStates('media.sdlmedia');
-
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controller/PhoneController.js b/SDL_Core/src/components/HMI/app/controller/PhoneController.js
deleted file mode 100644
index dd722df80..000000000
--- a/SDL_Core/src/components/HMI/app/controller/PhoneController.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PhoneController
- * @desc Phone module logic
- * @category Controller
- * @filesource app/controller/PhoneController.js
- * @version 1.0
- */
-
-SDL.PhoneController = Em.Object.create( {
-
- /** Model binding */
- modelBinding: "SDL.PhoneModel",
-
- /** Dialpad delete key press handeler */
- onDelete: function() {
-
- this.model.deleteDialpadNumber();
- },
-
- /** Dial call handeler */
- onEndCall: function() {
-
- this.model.endCall();
- },
-
- /** Dial call handeler */
- onDialCall: function() {
-
- this.model.dialCall();
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controller/sdl/AppController.js b/SDL_Core/src/components/HMI/app/controller/sdl/AppController.js
deleted file mode 100644
index e12af142e..000000000
--- a/SDL_Core/src/components/HMI/app/controller/sdl/AppController.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLAppController
- * @desc SDL abstract application controller
- * @category Controller
- * @filesource app/controller/sdl/AppController.js
- * @version 1.0
- */
-
-SDL.SDLAppController = Em.Object.create({
-
- init: function () {
-
- this._super();
-
- //FFW.UI.set('isReady', true);
- //FFW.Navigation.set('isReady', true);
- },
-
- /**
- * Active application model binding type {SDLAppModel}
- */
- model: null,
-
- /**
- * Handeler for command button press
- *
- * @param element:
- * SDL.Button
- */
- onCommand: function (element) {
-
- // if submenu
- if (element.menuID >= 0) {
-
- // activate driver destruction if necessary
- if (SDL.SDLModel.driverDistractionState) {
- SDL.DriverDistraction.activate();
- } else {
- this.onSubMenu(element.menuID);
- }
-
- return;
- }
-
- FFW.UI.onCommand(element.commandID, this.model.appID);
- SDL.OptionsView.deactivate();
- },
-
- /**
- * Open commands submenu
- *
- * @param {Number}
- */
- onSubMenu: function (id) {
-
- this.model.set('currentSubMenuId', id);
- },
-
- /**
- * Comparison function for sort array of buttons in options list by 'position' parameter
- *
- * @param {Number}
- */
- buttonsSort: function (arrayId, appID) {
-
- SDL.SDLController.getApplicationModel(appID).commandsList[arrayId].sort(function (a, b) {
- return a.position - b.position;
- })
- },
-
- /**
- * Handeler for command button press
- *
- * @param element:
- * SDL.Button
- */
- onVRCommand: function (element) {
-
- FFW.VR.onCommand(element.commandID, element.appID);
- },
-
- /**
- * Handler for preform interaction choice send response to device and
- * deactivate interactions window
- *
- * @param element:
- * SDL.Button
- */
- onChoiceInteraction: function (element) {
-
- SDL.InteractionChoicesView.deactivate("SUCCESS", element.choiceID);
- },
-
- /**
- * Handeler for Navigation preform interaction choice send response to device and
- * deactivate interactions window
- *
- * @param {Object}
- */
- onChoiceNaviInteraction: function(element) {
-
- SDL.SDLModel.uiShowKeyboard();
-
- FFW.UI.interactionResponse(SDL.SDLModel.resultCode["SUCCESS"], element.choiceID);
-
- SDL.InteractionChoicesView.deactivate("SUCCESS");
- },
-
- /**
- * Open commands list
- */
- openCommandsList: function () {
-
- SDL.OptionsView.activate();
- },
-
- /**
- * Notification of deactivation of current application model initiated in
- * StateManager
- */
- deactivateApp: function () {
-
- if (this.model) {
- SDL.SDLModel.onDeactivateApp(SDL.States.nextState, this.model.appID);
- }
-
- SDL.SDLAppController.onSubMenu('top');
- SDL.SDLAppController.model.set('tbtActivate', false);
- this.model = null;
- },
-
- /**
- * Method clears all applications data and unregister models
- */
- onSDLDisconected: function () {
-
- var i = 0, apps = SDL.SDLModel.registeredApps;
-
- for (i = 0; i < apps.length; i++) {
- SDL.SDLModel.onAppUnregistered({
- "appID": apps[i].appID
- });
- }
- }
-});
diff --git a/SDL_Core/src/components/HMI/app/controller/sdl/Controller.js b/SDL_Core/src/components/HMI/app/controller/sdl/Controller.js
deleted file mode 100644
index 570bdf435..000000000
--- a/SDL_Core/src/components/HMI/app/controller/sdl/Controller.js
+++ /dev/null
@@ -1,747 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLController
- * @desc Main SDL Controller
- * @category Controller
- * @filesource app/controller/sdl/SDLController.js
- * @version 1.0
- */
-SDL.SDLController = Em.Object
- .create( {
- /**
- * Current system context
- *
- * @type {String}
- */
- sysContext: function() {
-
- if (SDL.VRPopUp.VRActive) {
- return 'VRSESSION';
- }
- if (SDL.AlertPopUp.active) {
- return 'ALERT';
- }
- if (SDL.TBTClientStateView.active
- || SDL.VehicleInfo.active
- || SDL.DriverDistraction.active
- || SDL.ExitApp.active
- || SDL.SliderView.active
- || SDL.InteractionChoicesView.active
- || SDL.ScrollableMessage.active
- || SDL.AudioPassThruPopUp.activate
- || SDL.VRHelpListView.active) {
-
- return 'HMI_OBSCURED';
- }
- if (SDL.OptionsView.active) {
- return 'MENU';
- }
- if (SDL.States.info.nonMedia.active
- || SDL.States.media.sdlmedia.active) {
-
- return 'MAIN';
- } else {
- return 'MENU';
- }
- }.property('SDL.DriverDistraction.active',
- 'SDL.OptionsView.active',
- 'SDL.VRPopUp.VRActive',
- 'SDL.AlertPopUp.active',
- 'SDL.TBTClientStateView.active',
- 'SDL.VehicleInfo.active',
- 'SDL.States.info.nonMedia.active',
- 'SDL.States.media.sdlmedia.active',
- 'SDL.ExitApp.active',
- 'SDL.ScrollableMessage.active',
- 'SDL.InteractionChoicesView.active',
- 'SDL.VRHelpListView.active',
- 'SDL.AudioPassThruPopUp.activate'),
-
- /**
- * List of SDL application models
- *
- * @type object
- */
- applicationModels: {
- 0: SDL.SDLMediaModel,
- 1: SDL.SDLNonMediaModel
- },
-
- /**
- * Registered components handler
- *
- * @type object
- */
- activateTBT: function(){
- if (SDL.SDLAppController.model.tbtActivate) {
- SDL.TurnByTurnView.activate(SDL.SDLAppController.model.appID);
- }
- },
-
- /**
- * Registered components handler
- *
- * @type object
- */
- registeredComponentStatus: function(component) {
-
- for ( var i = 0; i < SDL.SDLModel.registeredComponents.length; i++) {
- if (SDL.SDLModel.registeredComponents[i].type == component) {
- SDL.SDLModel.set('registeredComponents.' + i + '.state', true);
- return;
- }
- }
- },
-
- /**
- * Registered components handler
- *
- * @type object
- */
- unregisterComponentStatus: function(component) {
-
- for ( var i = 0; i < SDL.SDLModel.registeredComponents.length; i++) {
- if (SDL.SDLModel.registeredComponents[i].type == component) {
- SDL.SDLModel.set('registeredComponents.' + i + '.state', false);
- return;
- }
- }
- },
-
- /**
- * Notification from state manager about triggered state
- * Method aborts all popups and requests currently in process
- *
- * @type object
- */
- triggerState: function(){
- if (SDL.SliderView.active) {
- SDL.SliderView.deactivate(false);
- }
- },
-
- /**
- * Notify SDLCore that HMI is ready and all components are registered
- *
- * @type {String}
- */
- componentsReadiness: function(component) {
-
- for ( var i = 0; i < SDL.SDLModel.registeredComponents.length; i++) {
- if (!SDL.SDLModel.registeredComponents[i].state) {
- return;
- }
- }
- FFW.BasicCommunication.onReady();
- SDL.SDLModel.timeStamp = new Date().getTime();
-
- console.log(SDL.SDLModel.timeStamp);
-
- }.observes('SDL.SDLModel.registeredComponents.@each.state'),
-
- /**
- * Show VrHelpItems popup with necessary params
- * if VRPopUp is active - show data from Global Properties
- * if VRPopUp and InteractionChoicesView are active - show data from PerformInteraction request
- *
- */
- showVRHelpItems: function() {
-
- if (SDL.SDLAppController.model) {
- if (SDL.SDLModel.VRActive && SDL.SDLModel.interactionData.vrHelp) {
-
- SDL.SDLModel.ShowVrHelp(SDL.SDLModel.interactionData.vrHelpTitle, SDL.SDLModel.interactionData.vrHelp);
- } else if (SDL.SDLModel.VRActive && !SDL.SDLModel.interactionData.vrHelp && SDL.SDLAppController.model.globalProperties.vrHelp) {
-
- if (SDL.SDLAppController.model) {
- SDL.SDLModel.ShowVrHelp(SDL.SDLAppController.model.globalProperties.vrHelpTitle, SDL.SDLAppController.model.globalProperties.vrHelp );
- }
- } else {
- if (SDL.VRHelpListView.active) {
- SDL.VRHelpListView.deactivate();
- }
- }
- }
- }.observes('SDL.SDLModel.VRActive', 'SDL.SDLModel.interactionData.vrHelp'),
-
- /**
- * Handler for Help button in VR menu
- * triggers helpPrompt on HMI
- *
- */
- vrHelpAction: function() {
- if (SDL.SDLModel.interactionData.helpPrompt) {
- SDL.SDLModel.onPrompt(SDL.SDLModel.interactionData.helpPrompt);
- } else if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.helpPrompt.length) {
- SDL.SDLModel.onPrompt(SDL.SDLAppController.model.globalProperties.helpPrompt);
- }
- },
-
- /**
- * Notify SDLCore that TTS haas finished processing
- *
- * @type {String}
- */
- TTSResponseHandler: function() {
-
- if (FFW.TTS.requestId) {
- if (FFW.TTS.aborted) {
- FFW.TTS.sendError(SDL.SDLModel.resultCode["ABORTED"], FFW.TTS.requestId, "TTS.Speak", "TTS Speak request aborted");
- } else {
- FFW.TTS.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"], FFW.TTS.requestId, "TTS.Speak");
- }
- FFW.TTS.requestId = null;
- FFW.TTS.aborted = false;
- }
- },
-
- /**
- * Move VR list to right side when VRHelpList was activated
- *
- * @type {String}
- */
- VRMove: function() {
-
- if (SDL.VRHelpListView.active || SDL.InteractionChoicesView.active) {
- SDL.SDLModel.set('VRHelpListActivated', true);
- } else {
- SDL.SDLModel.set('VRHelpListActivated', false);
- }
- },
-
- /**
- * Activate navigationApp method to set navigationApp data to controlls on main screen
- */
- navigationAppUpdate: function() {
- SDL.BaseNavigationView.update(SDL.SDLAppController.model.appID);
- },
-
- /**
- * Default action for SoftButtons: closes window, popUp or clears
- * applications screen
- *
- * @param {Object}
- */
- defaultActionSoftButton: function(element) {
-
- switch (element.groupName) {
- case "AlertPopUp": {
- SDL.AlertPopUp.deactivate();
- break;
- }
- case "ScrollableMessage": {
- SDL.ScrollableMessage.deactivate(true);
- break;
- }
- }
- },
-
- /**
- * SDL notification call function
- * to notify that SDL Core should reset timeout for some method
- */
- onResetTimeout: function (appID, methodName) {
- FFW.UI.onResetTimeout(appID, methodName);
- },
- /**
- * Action to show Voice Recognition PopUp
- */
- activateVRPopUp: function() {
-
- SDL.SDLModel.toggleProperty('VRActive');
- },
- /**
- * Action for SoftButtons that closes popUp or window and opens
- * applications screen
- *
- * @param {Object}
- */
- stealFocusSoftButton: function(element) {
-
- switch (element.groupName) {
- case "AlertPopUp": {
- SDL.AlertPopUp.deactivate();
- this.onActivateSDLApp(element);
- break;
- }
- case "ScrollableMessage": {
- SDL.ScrollableMessage.deactivate();
- this.onActivateSDLApp(element);
- break;
- }
- }
- },
- /**
- * Action for SoftButtons that clears popUps timer and it become visible
- * all the time until user user closes it
- *
- * @param {Object}
- */
- keepContextSoftButton: function(element) {
-
- switch (element.groupName) {
- case "AlertPopUp": {
- clearTimeout(SDL.AlertPopUp.timer);
- SDL.AlertPopUp.timer = setTimeout(function() {
- SDL.AlertPopUp.deactivate();
- }, SDL.AlertPopUp.timeout);
- this.onResetTimeout(element.appID, "UI.Alert");
- break;
- }
- case "ScrollableMessage": {
- clearTimeout(SDL.ScrollableMessage.timer);
- SDL.ScrollableMessage.timer = setTimeout(function() {
- SDL.ScrollableMessage.deactivate();
- }, SDL.ScrollableMessage.timeout);
- this.onResetTimeout(element.appID, "UI.ScrollableMessage");
- break;
- }
- }
- },
- /**
- * Action for ClosePopUp request that triggers deactivate function from
- * opened popUp
- */
- closePopUp: function() {
-
- if (SDL.AlertPopUp.active) {
- SDL.AlertPopUp.deactivate();
- }
- if (SDL.AudioPassThruPopUp.active) {
- SDL.AudioPassThruPopUp.deactivate();
- this.performAudioPassThruResponse(SDL.SDLModel.resultCode["SUCCESS"]);
- }
- if (SDL.InteractionChoicesView.active) {
- SDL.InteractionChoicesView.deactivate("ABORTED");
- }
- if (SDL.ScrollableMessage.active) {
- SDL.ScrollableMessage.deactivate(true);
- }
- if (SDL.SliderView.active) {
- SDL.SliderView.deactivate(true);
- }
- if (SDL.VRHelpListView.active) {
- SDL.VRHelpListView.deactivate();
- }
- },
-
- /**
- * Method to close InteractionChoices view
- */
- InteractionChoicesDeactivate: function() {
-
- SDL.InteractionChoicesView.deactivate("ABORTED");
- },
- /**
- * Method to open Turn List view from TBT
- *
- * @param {Number}
- * appID AppID of activated sdl application
- */
- tbtTurnList: function(appID) {
-
- SDL.TBTTurnList.activate(appID);
- },
- /**
- * Method to sent notification with selected state of TBT Client State
- *
- * @param {String}
- */
- tbtClientStateSelected: function(state) {
-
- FFW.Navigation.onTBTClientState(state);
- },
- /**
- * Method to sent notification with selected reason of Exit Application
- *
- * @param {String}
- */
- exitAppViewSelected: function(state) {
-
- FFW.BasicCommunication.ExitAllApplications(state);
- },
- /**
- * Method to sent notification ABORTED for PerformInteractionChoise
- */
- interactionChoiseCloseResponse: function(appID, result, choiceID, manualTextEntry) {
-
- FFW.UI.interactionResponse(SDL.SDLController.getApplicationModel(appID).activeRequests.uiPerformInteraction, result, choiceID, manualTextEntry);
- SDL.SDLModel.set('interactionData.vrHelpTitle', null);
- SDL.SDLModel.set('interactionData.vrHelp', null);
-
- SDL.SDLController.getApplicationModel(appID).activeRequests.uiPerformInteraction = null;
- },
- /**
- * Method to sent notification for Alert
- *
- * @param {String}
- * result
- * @param {Number}
- * alertRequestID
- */
- alertResponse: function(result, alertRequestID) {
-
- FFW.UI.alertResponse(result, alertRequestID);
- },
- /**
- * Method to sent notification for Scrollable Message
- *
- * @param {String}
- * result
- * @param {Number}
- * messageRequestId
- */
- scrollableMessageResponse: function(result, messageRequestId) {
-
- if (result == SDL.SDLModel.resultCode['SUCCESS']) {
- FFW.UI.sendUIResult(result,
- messageRequestId,
- 'UI.ScrollableMessage');
- } else {
- FFW.UI.sendError(result,
- messageRequestId,
- 'UI.ScrollableMessage',
- "ScrollableMessage aborted!");
- }
- },
- /**
- * Method to do necessary actions when user navigate throught the menu
- */
- userStateAction: function() {
- if (SDL.ScrollableMessage.active) {
- SDL.ScrollableMessage.deactivate(true);
- }
- },
- /**
- * Method to sent notification for Slider
- *
- * @param {String}
- * result
- * @param {Number}
- * sliderRequestId
- */
- sliderResponse: function(result, sliderRequestId) {
-
- FFW.UI.sendUIResult(result, sliderRequestId, 'UI.Slider');
- },
- /**
- * Method to call performAudioPassThruResponse with Result code
- * parameters
- *
- * @param {Object}
- * element Button object
- */
- callPerformAudioPassThruPopUpResponse: function(element) {
-
- this.performAudioPassThruResponse(element.responseResult);
- },
- /**
- * Method close PerformAudioPassThruPopUp and call response from UI RPC
- * back to SDLCore
- *
- * @param {String}
- * result Result code
- */
- performAudioPassThruResponse: function(result) {
-
- SDL.SDLModel.set('AudioPassThruState', false);
- FFW.UI.sendUIResult(result,
- FFW.UI.performAudioPassThruRequestID,
- "UI.PerformAudioPassThru");
- },
- /**
- * Method close PerformAudioPassThruPopUp and call error response from
- * UI RPC back to SDLCore
- *
- * @param {String}
- * result Result code
- */
- callPerformAudioPassThruPopUpErrorResponse: function(element) {
-
- SDL.SDLModel.set('AudioPassThruState', false);
- FFW.UI.sendError(element.responseResult,
- FFW.UI.performAudioPassThruRequestID,
- "UI.PerformAudioPassThru",
- "PerformAudioPassThru was not completed successfuly!");
- },
- /**
- * Method to set language for UI component with parameters sent from
- * SDLCore to UIRPC
- */
- onLanguageChangeUI: function() {
-
- FFW.UI.OnLanguageChange(SDL.SDLModel.hmiUILanguage);
- }.observes('SDL.SDLModel.hmiUILanguage'),
- /**
- * Method to set language for TTS and VR components with parameters sent
- * from SDLCore to UIRPC
- */
- onLanguageChangeTTSVR: function() {
-
- FFW.TTS.OnLanguageChange(SDL.SDLModel.hmiTTSVRLanguage);
- FFW.VR.OnLanguageChange(SDL.SDLModel.hmiTTSVRLanguage);
- }.observes('SDL.SDLModel.hmiTTSVRLanguage'),
- /**
- * Register application
- *
- * @param {Object}
- * params
- * @param {Number}
- * applicationType
- */
- registerApplication: function(params, applicationType) {
-
- SDL.SDLModel.get('registeredApps')
- .pushObject(this.applicationModels[applicationType].create( {
- appID: params.appID,
- appName: params.appName,
- deviceName: params.deviceName,
- appType: params.appType
- }));
- },
- /**
- * Unregister application
- *
- * @param {Number}
- * appID
- */
- unregisterApplication: function(appID) {
-
- //this.getApplicationModel(appID).set('unregistered', true);
- this.getApplicationModel(appID).onDeleteApplication(appID);
- SDL.VRPopUp.DeleteActivateApp(appID);
- SDL.SDLAppController.set('model', null);
- },
- /**
- * SDL Driver Distraction ON/OFF switcher
- */
- selectDriverDistraction: function() {
-
- if (SDL.SDLModel.driverDistractionState) {
- FFW.UI.onDriverDistraction("DD_ON");
- } else {
- FFW.UI.onDriverDistraction("DD_OFF");
- }
- }.observes('SDL.SDLModel.driverDistractionState'),
-
- /**
- * Ondisplay keyboard event handler
- * Sends notification on SDL Core with changed value
- */
- onKeyboardChanges: function() {
- if (null !== SDL.SDLModel.keyboardInputValue) {
-
- var str = SDL.SDLModel.keyboardInputValue;
-
- if (SDL.SDLAppController.model.globalProperties.keyboardProperties.keypressMode) {
- switch (SDL.SDLAppController.model.globalProperties.keyboardProperties.keypressMode) {
- case 'SINGLE_KEYPRESS':{
- FFW.UI.OnKeyboardInput(str.charAt( str.length-1 ));
- break;
- }
- case 'QUEUE_KEYPRESS':{
- break;
- }
- case 'RESEND_CURRENT_ENTRY':{
- FFW.UI.OnKeyboardInput(str);
- break;
- }
- }
- }
- }
- }.observes('SDL.SDLModel.keyboardInputValue'),
-
- /**
- * Get application model
- *
- * @param {Number}
- */
- getApplicationModel: function(applicationId) {
-
- return SDL.SDLModel.registeredApps.filterProperty('appID',
- applicationId)[0];
- },
- /**
- * Function returns ChangeDeviceView back to previous state
- */
- turnChangeDeviceViewBack: function() {
-
- SDL.States.goToStates('info.apps');
- },
- /**
- * Enter screen vith list of devices application model
- */
- onGetDeviceList: function() {
-
- SDL.States.goToStates('info.devicelist');
- SDL.SDLModel.set('deviceSearchProgress', true);
- },
- /**
- * Send notification if device was choosed
- *
- * @param element:
- * SDL.Button
- */
- onDeviceChoosed: function(element) {
-
- SDL.SDLModel.set('CurrDeviceInfo.name', element.deviceName);
- SDL.SDLModel.set('CurrDeviceInfo.id', element.id);
- FFW.BasicCommunication.OnDeviceChosen(element.deviceName,
- element.id);
- this.turnChangeDeviceViewBack();
- },
- /**
- * Method creates list of Application ID's Then call HMI method for
- * display a list of Applications
- *
- * @param {Object}
- */
- onGetAppList: function(appList) {
-
- SDL.SDLModel.onGetAppList(appList);
- },
- /**
- * Method call's request to get list of applications
- */
- findNewApps: function() {
-
- FFW.BasicCommunication.OnFindApplications();
- },
- /**
- * Method activates selected registered application
- *
- * @param {Object}
- */
- onActivateSDLApp: function(element) {
-
- FFW.BasicCommunication.OnAppActivated(element.appID);
- },
- /**
- * Method sent custom softButtons pressed and event status to RPC
- *
- * @param {Object}
- */
- onSoftButtonActionUpCustom: function(element) {
-
- if (element.time > 0) {
- FFW.Buttons.buttonEventCustom("CUSTOM_BUTTON",
- "BUTTONUP",
- element.softButtonID);
- } else {
- FFW.Buttons.buttonEventCustom("CUSTOM_BUTTON",
- "BUTTONUP",
- element.softButtonID);
- FFW.Buttons.buttonPressedCustom("CUSTOM_BUTTON",
- "SHORT",
- element.softButtonID);
- }
- clearTimeout(element.timer);
- element.time = 0;
- },
- /**
- * Method sent custom softButtons pressed and event status to RPC
- *
- * @param {Object}
- */
- onSoftButtonActionDownCustom: function(element) {
-
- FFW.Buttons.buttonEventCustom("CUSTOM_BUTTON",
- "BUTTONDOWN",
- element.softButtonID);
- element.time = 0;
- element.timer = setTimeout(function() {
-
- FFW.Buttons.buttonPressedCustom("CUSTOM_BUTTON",
- "LONG",
- element.softButtonID);
- element.time++;
- }, 2000);
- },
- /**
- * Method sent softButtons pressed and event status to RPC
- *
- * @param {String}
- * @param {Object}
- */
- onSoftButtonActionUp: function(element) {
-
- if (element.time > 0) {
- FFW.Buttons.buttonEvent(element.presetName, "BUTTONUP");
- } else {
- FFW.Buttons.buttonEvent(element.presetName, "BUTTONUP");
- FFW.Buttons.buttonPressed(element.presetName, "SHORT");
- }
- clearTimeout(element.timer);
- element.time = 0;
- },
- /**
- * Method sent softButtons Ok pressed and event status to RPC
- *
- * @param {String}
- */
- onSoftButtonOkActionDown: function(name) {
-
- FFW.Buttons.buttonEvent(name, "BUTTONDOWN");
- },
- /**
- * Method sent softButton OK pressed and event status to RPC
- *
- * @param {String}
- */
- onSoftButtonOkActionUp: function(name) {
-
- FFW.Buttons.buttonEvent(name, "BUTTONUP");
- FFW.Buttons.buttonPressed(name, "SHORT");
- if (SDL.SDLAppController.model) {
- SDL.SDLAppController.model.set('isPlaying',
- !SDL.SDLAppController.model.isPlaying);
- }
- },
- /**
- * Method sent softButtons pressed and event status to RPC
- *
- * @param {String}
- * @param {Object}
- */
- onSoftButtonActionDown: function(element) {
-
- FFW.Buttons.buttonEvent(element.presetName, "BUTTONDOWN");
- element.time = 0;
- element.timer = setTimeout(function() {
-
- FFW.Buttons.buttonPressed(element.presetName, "LONG");
- element.time++;
- }, 2000);
- },
- /**
- * Send system context
- */
- onSystemContextChange: function() {
-
- FFW.UI.OnSystemContext(this.get('sysContext'));
- }
- });
diff --git a/SDL_Core/src/components/HMI/app/controller/sdl/MediaController.js b/SDL_Core/src/components/HMI/app/controller/sdl/MediaController.js
deleted file mode 100644
index 5d5f17bfd..000000000
--- a/SDL_Core/src/components/HMI/app/controller/sdl/MediaController.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLMediaController
- * @desc SDL Media Controller logic
- * @category Controller
- * @filesource app/controller/sdl/SDLMediaController.js
- * @version 1.0
- */
-
-SDL.SDLMediaController = Em.Object.create( {
-
- /**
- * Current Media application id
- *
- * @type {Number}
- */
- currentAppId: 0,
-
- /**
- * Return current Media application name used for application button
- */
- currentAppName: function() {
-
- if (this.currentAppId) {
- return SDL.SDLController.getApplicationModel(this.currentAppId).appName;
- }
- }.property('this.currentAppId'),
-
- /**
- * Return current Media application icon used for application button
- */
- currentAppIcon: function() {
-
- if (this.currentAppId) { return SDL.SDLController
- .getApplicationModel(this.currentAppId).appIcon; }
- }.property('this.currentAppId', 'SDL.SDLAppController.model.appIcon'),
-
- /** Call notification OnCommand on UIRPC */
- onCommand: function(element) {
-
- FFW.UI.onCommand(element.commandID, element.appID);
- },
-
- /** Call notification OnCommandSoftButton on UIRPC */
- onCommandSoftButton: function(element) {
-
- FFW.UI.onCommandSoftButton(element.softButtonID, element.appID);
- },
-
- /** Switching on Application */
- activateApp: function(applicationModel) {
-
- // store active application id
- this.set('currentAppId', applicationModel.appID);
-
- // set active model
- SDL.SDLAppController.set('model', applicationModel);
-
- SDL.MediaController.turnOnSDL();
-
- },
-
- /**
- * Restore current application to active state
- */
- activateCurrentApp: function() {
-
- FFW.BasicCommunication.OnAppActivated(this.currentAppId);
- },
-
- /** SDL perform interaction action from VR */
- onVRPerformInteractionChoosed: function(element) {
-
- if (SDL.States.media.sdl.sdlperforminteractionchoise.active) {
- FFW.VR.onChoise(element.choiceID);
- SDL.States.back();
- }
-
- },
-
- /** SDL perform interaction action */
- onPerformInteractionChoosed: function(element) {
-
- if (SDL.States.media.sdl.sdlperforminteractionchoise.active) {
- FFW.UI.interactionResponse("SUCCESS", element.choiceID);
- SDL.States.back();
- }
-
- },
-
- /**
- * Method hides sdl activation button and sdl application
- *
- * @param {Number}
- */
- onDeleteApplication: function(appID) {
-
- if (this.currentAppId == appID) {
-
- if (SDL.States.media.sdlmedia.active
- || SDL.SDLAppController.model) {
-
- SDL.SDLAppController.model.set('active', false);
-
- SDL.States.goToStates('info.apps');
-
- SDL.MediaController.set('activeState', 'media.player');
- }
-
- this.set('currentAppId', 0);
- }
-
- SDL.SDLModel.stopStream(appID);
- SDL.SDLModel.get('registeredApps').removeObjects(SDL.SDLModel.get('registeredApps').filterProperty('appID', appID));
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controller/sdl/NonMediaController.js b/SDL_Core/src/components/HMI/app/controller/sdl/NonMediaController.js
deleted file mode 100644
index 46d42f308..000000000
--- a/SDL_Core/src/components/HMI/app/controller/sdl/NonMediaController.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.NonMediaController
- * @desc SDL NonMedia Controller logic
- * @category Controller
- * @filesource app/controller/sdl/NonMediaController.js
- * @version 1.0
- */
-
-SDL.NonMediaController = Em.Object.create( {
-
- /**
- * Current NonMedia application id
- *
- * @type {Number}
- */
- currentAppId: 0,
-
- /**
- * Return current NonMedia application name used for application button
- */
- currentAppName: function() {
-
- if (this.currentAppId) { return SDL.SDLController
- .getApplicationModel(this.currentAppId).appName; }
- }.property('this.currentAppId'),
-
- /**
- * Return current NonMedia application icon used for application button
- */
- currentAppIcon: function() {
-
- if (this.currentAppId) { return SDL.SDLController
- .getApplicationModel(this.currentAppId).appIcon; }
- }.property('this.currentAppId', 'SDL.SDLAppController.model.appIcon'),
-
- /**
- * Activate application model
- *
- * @param {SDLAppModel}
- */
- activateApp: function(applicationModel) {
-
- // store active application id
- this.set('currentAppId', applicationModel.appID);
-
- // set active model
- SDL.SDLAppController.set('model', applicationModel);
-
- // send response
- // FFW.BasicCommunication.ActivateApp( applicationModel.appID );
-
- // Go to SDL state
- SDL.InfoController.turnOnSDL();
- //SDL.States.goToStates('info.nonMedia');
- },
-
- /**
- * Restore current application to active state
- */
- activateCurrentApp: function() {
-
- FFW.BasicCommunication.OnAppActivated(this.currentAppId);
- },
-
- /**
- * Method hides sdl activation button and sdl application
- *
- * @param {Number}
- */
- onDeleteApplication: function(appID) {
-
- if (this.currentAppId == appID) {
- if (SDL.States.info.nonMedia.active
- || SDL.SDLAppController.model) {
-
- SDL.SDLAppController.model.set('active', false);
-
- SDL.States.goToStates('info.apps');
- }
-
- SDL.InfoController.set('activeState', 'info.apps');
-
- this.set('currentAppId', 0);
- }
- SDL.SDLModel.get('registeredApps').removeObjects(SDL.SDLModel.get('registeredApps').filterProperty('appID', appID));
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controller/sdl/RPCController.js b/SDL_Core/src/components/HMI/app/controller/sdl/RPCController.js
deleted file mode 100644
index 1be44ccf4..000000000
--- a/SDL_Core/src/components/HMI/app/controller/sdl/RPCController.js
+++ /dev/null
@@ -1,2898 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.RPCController
- * @desc RPC Controller
- * @category Controller
- * @filesource app/controller/sdl/RPCController.js
- * @version 1.0
- */
-
-SDL.RPCController = Em.Object
- .create( {
-
- /**
- * Start register RPC components on controller init
- */
- init: function() {
-
- FFW.Buttons.connect();
- FFW.TTS.connect();
- FFW.VR.connect();
- FFW.BasicCommunication.connect();
- FFW.UI.connect();
- FFW.VehicleInfo.connect();
- FFW.Navigation.connect();
- },
-
- /**
- * Method to check supported image type in request
- *
- * @param {Object}
- * array
- */
- checkImagesArray: function(array) {
-
- var error = false;
- if (array instanceof Array) {
- for ( var i = 0; i < array.length; i++) {
- if (array[i].image && array[i].image.imageType !== "DYNAMIC") {
-
- error = true;
- }
- }
- }
- return error;
- },
-
- /**
- * Object that contains check methods that returns true if mandatory
- * fields is successful and returns false if not
- */
- BasicCommunication: Em.Object
- .create( {
-
- resultStruct: {},
-
- /**
- * Validate method for request ActivateApp
- *
- * @param {Object}
- * params
- */
- ActivateApp: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
-
- /**
- * Validate method for request UpdateDeviceList
- *
- * @param {Object}
- * params
- */
- UpdateDeviceList: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.deviceList == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'deviceList' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.deviceList.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'deviceList'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request AllowDeviceToConnect
- *
- * @param {Object}
- * params
- */
- AllowDeviceToConnect: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.device == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'device' does not exists!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request UpdateAppList
- *
- * @param {Object}
- * params
- */
- UpdateAppList: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.applications == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'applications' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.applications.length < 1) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'applications'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request MixingAudioSupported
- *
- * @param {Object}
- * params
- */
- MixingAudioSupported: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request AllowAllApps
- *
- * @param {Object}
- * params
- */
- AllowAllApps: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request AllowApp
- *
- * @param {Object}
- * params
- */
- AllowApp: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.app == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'app' does not exists!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- }
-
- }),
-
- /**
- * Object that contains check methods that returns true if mandatory
- * fields is successful and returns false if not
- */
- TTS: Em.Object
- .create( {
-
- resultStruct: {},
-
- /**
- * Validate method for request IsReady
- *
- * @param {Object}
- * params
- */
- IsReady: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetLanguage
- *
- * @param {Object}
- * params
- */
- GetLanguage: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
- /**
- * Validate method for request PerformInteraction
- *
- * @param {Object}
- * params
- */
- PerformInteraction: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.timeout == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'timeout' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.timeout != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'timeout'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request SetGlobalProperties
- *
- * @param {Object}
- * params
- */
- SetGlobalProperties: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetSupportedLanguages
- *
- * @param {Object}
- * params
- */
- GetSupportedLanguages: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request StopSpeaking
- *
- * @param {Object}
- * params
- */
- StopSpeaking: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request Speak
- *
- * @param {Object}
- * params
- */
- Speak: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.ttsChunks == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'ttsChunks' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.ttsChunks.length < 1) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'ttsChunks'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ChangeRegistration
- *
- * @param {Object}
- * params
- */
- ChangeRegistration: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.language == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'language' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.language != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'language'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request OnLanguageChange
- *
- * @param {Object}
- * params
- */
- OnLanguageChange: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.language == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'language' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.language != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'language'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- }
- }),
-
- /**
- * Object that contains check methods that returns true if mandatory
- * fields is successful and returns false if not
- */
- Navigation: Em.Object
- .create( {
-
- resultStruct: {},
-
- /**
- * Validate method for request IsReady
- *
- * @param {Object}
- * params
- */
- IsReady: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request Navigation.AlertManeuver
- *
- * @param {Object}
- * params
- */
- AlertManeuver: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request StartStream
- *
- * @param {Object}
- * params
- */
- StartStream: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.url == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'url' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.url != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'url'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request StopStream
- *
- * @param {Object}
- * params
- */
- StopStream: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request StartAudioStream
- *
- * @param {Object}
- * params
- */
- StartAudioStream: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.url == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'url' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.url != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'url'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request StopAudioStream
- *
- * @param {Object}
- * params
- */
- StopAudioStream: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request Navigation.ShowConstantTBT
- *
- * @param {Object}
- * params
- */
- ShowConstantTBT: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if ("turnIcon" in params
- && params.turnIcon.imageType !== "DYNAMIC") {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- if ("nextTurnIcon" in params
- && params.nextTurnIcon.imageType !== "DYNAMIC") {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- if (params.navigationTexts == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'navigationTexts' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.navigationTexts.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'navigationTexts'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request Navigation.UpdateTurnList
- *
- * @param {Object}
- * params
- */
- UpdateTurnList: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if (params.turnList == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'navigationTexts' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.turnList.length < 1) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'navigationTexts'!"
- };
-
- return this.resultStruct;
- }
- if ("turnList" in params) {
-
- for ( var i = 0; i < params.turnList.length; i++) {
- if (params.turnList[i].image
- && params.turnList[i].image.imageType !== "DYNAMIC") {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- e;
- }
- }
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- }
-
- }),
-
- /**
- * Object that contains check methods that returns true if mandatory
- * fields is successful and returns false if not
- */
- UI: Em.Object
- .create( {
-
- resultStruct: {},
-
- /**
- * Validate method for request SetDisplayLayout
- *
- * @param {Object}
- * params
- */
- SetDisplayLayout: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request IsReady
- *
- * @param {Object}
- * params
- */
- IsReady: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request UI.Alert
- *
- * @param {Object}
- * params
- */
- Alert: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if (params.alertStrings == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'alertStrings' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.alertStrings.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'alertStrings'!"
- };
-
- return this.resultStruct;
- }
- if (params.duration == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'duration' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.duration != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'duration'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request Show
- *
- * @param {Object}
- * params
- */
- ShowNotification: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("icon" in params && params.icon.imageType !== "DYNAMIC") {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- if (params.text == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'text' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.text.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'text'!"
- };
-
- return this.resultStruct;
- }
- if (params.timeout == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'timeout' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.timeout != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'timeout'!"
- };
-
- return this.resultStruct;
- }
- },
-
- /**
- * Validate method for request Show
- *
- * @param {Object}
- * params
- */
- Show: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if ("graphic" in params
- && params.graphic.imageType !== "DYNAMIC") {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- if (params.showStrings == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'showStrings' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.showStrings.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'showStrings'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request AddCommand
- *
- * @param {Object}
- * params
- */
- AddCommand: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("cmdIcon" in params
- && params.cmdIcon.imageType !== "DYNAMIC") {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- if (params.cmdID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'cmdID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.cmdID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'cmdID'!"
- };
-
- return this.resultStruct;
- }
- if (params.menuParams == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'menuParams' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.menuParams != 'object') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'menuParams'!"
- };
-
- return this.resultStruct;
- }
- if (params.menuParams.menuName == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'menuName' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.menuParams.menuName != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'menuName'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request DeleteCommand
- *
- * @param {Object}
- * params
- */
- DeleteCommand: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.cmdID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'cmdID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.cmdID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'cmdID'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request AddSubMenu
- *
- * @param {Object}
- * params
- */
- AddSubMenu: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.menuID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'menuID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.menuID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'menuID'!"
- };
-
- return this.resultStruct;
- }
- if (!params.menuParams) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'menuParams' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request DeleteSubMenu
- *
- * @param {Object}
- * params
- */
- DeleteSubMenu: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.menuID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'menuID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.menuID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'menuID'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
- // don't delete if current submenu active
- if (SDL.SDLController.getApplicationModel(params.appID)
- .get('currentSubMenuId') == params.menuID) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["IN_USE"],
- "resultMessage": "SubMenu is already in use!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request PerformInteraction
- *
- * @param {Object}
- * params
- */
- PerformInteraction: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.initialText == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'initialText' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.initialText != 'object') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'initialText'!"
- };
-
- return this.resultStruct;
- }
- if (params.timeout == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'timeout' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.timeout != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'timeout'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request SetMediaClockTimer
- *
- * @param {Object}
- * params
- */
- SetMediaClockTimer: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.updateMode == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'updateMode' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.updateMode != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'updateMode'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request SetGlobalProperties
- *
- * @param {Object}
- * params
- */
- SetGlobalProperties: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("vrHelp" in params) {
- if (SDL.RPCController.checkImagesArray(params.vrHelp)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetCapabilities
- *
- * @param {Object}
- * params
- */
- GetCapabilities: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ChangeRegistration
- *
- * @param {Object}
- * params
- */
- ChangeRegistration: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.language == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'language' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.language != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'language'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetSupportedLanguages
- *
- * @param {Object}
- * params
- */
- GetSupportedLanguages: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetLanguage
- *
- * @param {Object}
- * params
- */
- GetLanguage: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request SetAppIcon
- *
- * @param {Object}
- * params
- */
- SetAppIcon: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.syncFileName == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'syncFileName' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.syncFileName != 'object') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'syncFileName'!"
- };
-
- return this.resultStruct;
- }
- if ("syncFileName" in params
- && params.syncFileName.imageType !== "DYNAMIC") {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request Slider
- *
- * @param {Object}
- * params
- */
- Slider: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.numTicks == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'numTicks' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.numTicks != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'numTicks'!"
- };
-
- return this.resultStruct;
- }
- if (params.position == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'position' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.position != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'position'!"
- };
-
- return this.resultStruct;
- }
- if (params.sliderHeader == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'sliderHeader' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.sliderHeader != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'sliderHeader'!"
- };
-
- return this.resultStruct;
- }
- if (params.timeout == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'timeout' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.timeout != 'number' || params.timeout < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'timeout'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ScrollableMessage
- *
- * @param {Object}
- * params
- */
- ScrollableMessage: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if (params.messageText == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'messageText' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.messageText.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'messageText'!"
- };
-
- return this.resultStruct;
- }
- if (params.timeout == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'timeout' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.timeout != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'timeout'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request PerformAudioPassThru
- *
- * @param {Object}
- * params
- */
- PerformAudioPassThru: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.audioPassThruDisplayTexts == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'audioPassThruDisplayTexts' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.audioPassThruDisplayTexts.length < 0
- || params.audioPassThruDisplayTexts.length > 2) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'audioPassThruDisplayTexts'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request EndAudioPassThru
- *
- * @param {Object}
- * params
- */
- EndAudioPassThru: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ClosePopUp
- *
- * @param {Object}
- * params
- */
- ClosePopUp: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ShowVrHelp
- *
- * @param {Object}
- * params
- */
- ShowVrHelp: function(params) {
-
- if (params) {
- if ("vrHelp" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.vrHelp)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
- if ("appID" in params) {
-
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
- }
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- }
- }),
-
- /**
- * Object that contains check methods that returns true if mandatory
- * fields is successful and returns false if not
- */
- VehicleInfo: Em.Object
- .create( {
-
- resultStruct: {},
-
- /**
- * Validate method for request IsReady
- *
- * @param {Object}
- * params
- */
- IsReady: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request DiagnosticMessage
- *
- * @param {Object}
- * params
- */
- DiagnosticMessage: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetVehicleType
- *
- * @param {Object}
- * params
- */
- GetVehicleType: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ReadDID
- *
- * @param {Object}
- * params
- */
- ReadDID: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.ecuName == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'ecuName' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.ecuName != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'ecuName'!"
- };
-
- return this.resultStruct;
- }
- if (params.didLocation == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'didLocation' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.didLocation.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'didLocation'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetDTCs
- *
- * @param {Object}
- * params
- */
- GetDTCs: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.ecuName == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'ecuName' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.ecuName != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'ecuName'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetVehicleData
- *
- * @param {Object}
- * params
- */
- GetVehicleData: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request SubscribeVehicleData
- *
- * @param {Object}
- * params
- */
- SubscribeVehicleData: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request UnsubscribeVehicleData
- *
- * @param {Object}
- * params
- */
- UnsubscribeVehicleData: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- }
- }),
-
- /**
- * Object that contains check methods that returns true if mandatory
- * fields is successful and returns false if not
- */
- VR: Em.Object
- .create( {
-
- resultStruct: {},
-
- /**
- * Validate method for request IsReady
- *
- * @param {Object}
- * params
- */
- IsReady: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetCapabilities
- *
- * @param {Object}
- * params
- */
- GetCapabilities: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetLanguage
- *
- * @param {Object}
- * params
- */
- GetLanguage: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request GetSupportedLanguages
- *
- * @param {Object}
- * params
- */
- GetSupportedLanguages: function(params) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request AddCommand
- *
- * @param {Object}
- * params
- */
- AddCommand: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.cmdID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'cmdID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.cmdID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'cmdID'!"
- };
-
- return this.resultStruct;
- }
- if (params.vrCommands == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'vrCommands' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.vrCommands.length < 0) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'vrCommands'!"
- };
-
- return this.resultStruct;
- }
- if ("appID" in params) {
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request DeleteCommand
- *
- * @param {Object}
- * params
- */
- DeleteCommand: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.cmdID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'cmdID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.cmdID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'cmdID'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- },
-
- /**
- * Validate method for request ChangeRegistration
- *
- * @param {Object}
- * params
- */
- ChangeRegistration: function(params) {
-
- if (params == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'params' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (params.language == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'language' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.language != 'string') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'language'!"
- };
-
- return this.resultStruct;
- }
- if (params.appID == null) {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Parameter 'appID' does not exists!"
- };
-
- return this.resultStruct;
- }
- if (typeof params.appID != 'number') {
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Wrong type of parameter 'appID'!"
- };
-
- return this.resultStruct;
- }
-
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["SUCCESS"]
- };
-
- return this.resultStruct;
- }
- })
- });
diff --git a/SDL_Core/src/components/HMI/app/controlls/AZERTYLayout.js b/SDL_Core/src/components/HMI/app/controlls/AZERTYLayout.js
deleted file mode 100755
index d6ae03388..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/AZERTYLayout.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.QWERTYLayout
- * @desc General list component for SDL application
- * @category Controlls
- * @filesource app/controlls/QWERTYLayout.js
- * @version 1.0
- */
-
-SDL.AZERTYLayout = Em.ContainerView.extend( {
-
- classNames: 'keyboardLayout AZERTYLayout wide',
-
- childViews: [
- 'a',
- 'z',
- 'e',
- 'r',
- 't',
- 'y',
- 'u',
- 'i',
- 'o',
- 'p',
- 'q',
- 's',
- 'd',
- 'f',
- 'g',
- 'h',
- 'j',
- 'k',
- 'l',
- 'm',
- 'w',
- 'x',
- 'c',
- 'v',
- 'b',
- 'n',
- 'dash',
- 'ampersand'
- ],
-
- a: SDL.Button.extend({
- classNames: 'a k0',
- text : 'a',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- z: SDL.Button.extend({
- classNames: 'z k1',
- text : 'z',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- e: SDL.Button.extend({
- classNames: 'e k2',
- text : 'e',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- r: SDL.Button.extend({
- classNames: 'r k3',
- text : 'r',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- t: SDL.Button.extend({
- classNames: 't k4',
- text : 't',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- y: SDL.Button.extend({
- classNames: 'y k5',
- text : 'y',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- u: SDL.Button.extend({
- classNames: 'u k6',
- text : 'u',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- i: SDL.Button.extend({
- classNames: 'i k7',
- text : 'i',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- o: SDL.Button.extend({
- classNames: 'o k8',
- text : 'o',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- p: SDL.Button.extend({
- classNames: 'p k9',
- text : 'p',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- q: SDL.Button.extend({
- classNames: 'q k10',
- text : 'q',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- s: SDL.Button.extend({
- classNames: 's k11',
- text : 's',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- d: SDL.Button.extend({
- classNames: 'd k12',
- text : 'd',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- f: SDL.Button.extend({
- classNames: 'f k13',
- text : 'f',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- g: SDL.Button.extend({
- classNames: 'g k14',
- text : 'g',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- h: SDL.Button.extend({
- classNames: 'h k15',
- text : 'h',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- j: SDL.Button.extend({
- classNames: 'j k16',
- text : 'j',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- k: SDL.Button.extend({
- classNames: 'k k17',
- text : 'k',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- l: SDL.Button.extend({
- classNames: 'l k18',
- text : 'l',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- m: SDL.Button.extend({
- classNames: 'm k19',
- text : 'm',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- w: SDL.Button.extend({
- classNames: 'w k21',
- text : 'w',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- x: SDL.Button.extend({
- classNames: 'x k22',
- text : 'x',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- c: SDL.Button.extend({
- classNames: 'c k23',
- text : 'c',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- v: SDL.Button.extend({
- classNames: 'v k24',
- text : 'v',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- b: SDL.Button.extend({
- classNames: 'b k25',
- text : 'b',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- n: SDL.Button.extend({
- classNames: 'n k26',
- text : 'n',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- dash: SDL.Button.extend({
- classNames: 'dash k27',
- text : '-',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- ampersand: SDL.Button.extend({
- classNames: 'ampersand k28',
- text : '&',
- target : 'parentView.parentView',
- action : 'inputChanges'
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/Button.js b/SDL_Core/src/components/HMI/app/controlls/Button.js
deleted file mode 100644
index 7d5b4f4ed..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/Button.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.Button
- * @desc Universal button component for SDL application
- * @category Controlls
- * @filesource app/controlls/Button.js
- * @version 1.0
- */
-
-SDL.Button = Em.View
- .extend(Ember.TargetActionSupport,
- {
- classNames: [
- 'ffw-button', 'notpressed'
- ],
-
- classNameBindings: [
- 'pressed', 'disabled', 'hidden'
- ],
-
- /** Pressed state binding */
- pressed: false,
-
- /** Disable actions on button */
- disabled: false,
-
- /** Button icon class */
- icon: null,
-
- /** Button text */
- text: null,
-
- rightText: null,
-
- target: this.target ? this.target : this,
-
- /** Arrow icon */
- arrow: false,
-
- /** Button timer flag */
- timer: 0,
-
- timerId: null,
- /** Touch leave event flag */
- touchleave: false,
-
- onDown: true,
-
- helpMode: false,
- /** */
- targetElement: null,
-
- actionDown: function(event) {
-
- if (this.get('disabled')) { return; }
-
- var self = this;
-
- this.set('pressed', true);
- /** Set Mouse Leave Event Flag to false */
- this.set('mouseleave', false);
-
- // Default trigger action
- if (this.onDown) {
- this.triggerAction();
- }
-
- // Call trigger with timeout
- if (this.timer) {
- this.timerId = setInterval(function() {
-
- self.triggerAction();
- }, this.timer);
- }
- },
-
- actionUp: function(event) {
-
- this.set('pressed', false);
-
- if (this.timer) {
- clearInterval(this.timerId);
- }
-
- if (this.get('disabled')) {
- if (this.touchleave == true) {
- this.set('touchleave', false);
- }
- return;
- }
-
- if (!this.onDown) {
- this.triggerAction();
- }
- },
-
- /** Only for desktop */
- mouseLeave: function(event) {
-
- this.set('pressed', false);
-
- if (this.timer) {
- clearInterval(this.timerId);
- }
- },
-
- /**
- * Only for IOS Simulation of mouseleave event for touch devices If
- * target element looses focus during touch move event events dont
- * trigger
- */
- touchMove: function(event) {
-
- /** Set Mouse Leave Event Flag to true */
- this.set('touchleave', this.targetElement !== document
- .elementFromPoint(event.originalEvent.touches[0].pageX,
- event.originalEvent.touches[0].pageY));
- },
-
- // component default template
- defaultTemplate: Em.Handlebars
- .compile('<img class="ico" {{bindAttr src="view.icon"}} />'
- + '<span>{{view.text}}</span>'),
-
- templates: {
- text: Em.Handlebars.compile('<span class="text">{{view.text}}</span>'),
-
- icon: Em.Handlebars
- .compile('<img class="ico" {{bindAttr src="view.icon"}} />'),
-
- rightText: Em.Handlebars
- .compile('<img class="ico" {{bindAttr src="view.icon"}} />'
- + '<span class="right_text">{{view.text}}</span>'),
-
- arrow: Em.Handlebars
- .compile('<img class="ico" {{bindAttr src="view.icon"}} />'
- + '<span>{{view.text}}</span>'
- + '<img class="arrow-ico" src="images/common/arrow_ico.png" />'),
-
- rightIcon: Em.Handlebars
- .compile('<img class="ico" {{bindAttr src="view.icon"}} />'
- + '<span>{{view.text}}</span>'
- + '<img class="right_ico" {{bindAttr src="view.righticon"}} />')
- }
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/Indicator.js b/SDL_Core/src/components/HMI/app/controlls/Indicator.js
deleted file mode 100644
index 4d3804e73..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/Indicator.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.Indicator
- * @desc Universal button component with value indicator for SDL application
- * @category Controlls
- * @filesource app/controlls/Indicator.js
- * @version 1.0
- */
-
-SDL.Indicator = Em.View.extend(Ember.TargetActionSupport, {
-
- /** Content binding */
- content: null,
-
- /** internal indicators array */
- indicators: null,
-
- /** indicator active class */
- indActiveClass: null,
-
- /** indicator default class */
- indDefaultClass: null,
-
- /** Set active indicator from the start */
- startFrom: null,
-
- /** binding property to enable/disable indicators */
- enabledBinding: 'content.enabled',
-
- /**
- * Before rendering view handeler need to generate indicators array based on
- * indicator range value
- */
- beforeRender: function() {
-
- // define variables
- var length = this.content.range, view = this, i;
-
- // generate indicators
- this.indicators = [];
-
- for (i = 0; i < length; i++) {
- this.indicators.push(Em.Object.create( {
- index: i,
- className: this.indDefaultClass
- }));
- }
- // apply indicator visualization rule
- view.setRecord();
-
- if (this.startFrom) {
- this.indicators[this.startFrom].set('className',
- this.indActiveClass);
- }
-
- // add observer to content record
- this.addObserver('content', function() {
-
- view.setRecord();
- });
-
- // view internal call
- this.applyAttributesToBuffer(this.buffer);
- },
-
- actionDown: function() {
-
- this.triggerAction();
- },
-
- // change record binding
- setRecord: function() {
-
- var view = this;
-
- if (this.content.observersForKey('value').length == 0) {
-
- this.content.addObserver('value', function() {
-
- view.toggleIndicators();
- });
-
- }
-
- this.toggleIndicators();
- },
-
- // Toggle indicator handeler
- toggleIndicators: function() {
-
- var length = this.indicators.length, i;
-
- for (i = 0; i < length; i++) {
- if (i >= this.content.value) {
- this.indicators[i].set('className', 'SDL_indicator '
- + this.indDefaultClass);
- } else {
- this.indicators[i].set('className', 'SDL_indicator '
- + this.indActiveClass);
- }
- }
- },
-
- /** Define indicator template */
- template: Ember.Handlebars.compile('{{#with view}}'
- + '{{#each indicators}}'
- + '<div {{bindAttr class="className view.enabled:show"}}></div>'
- + '{{/each}}' + '{{/with}}')
-
-});
diff --git a/SDL_Core/src/components/HMI/app/controlls/Label.js b/SDL_Core/src/components/HMI/app/controlls/Label.js
deleted file mode 100644
index 2fc9e6604..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/Label.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.Label
- * @desc Universal label component for SDL application
- * @category Controlls
- * @filesource app/controlls/Label.js
- * @version 1.0
- */
-
-SDL.Label = Em.View.extend( {
- classNameBindings: [
- 'disabled'
- ],
- classNames: 'label',
-
- // component default template
- defaultTemplate: Em.Handlebars.compile('<span>{{view.content}}</span>'),
-
- templates: {
- icon: Em.Handlebars
- .compile('<img class="ico" {{bindAttr src="view.icon"}} />'
- + '<span>{{view.content}}</span>')
- }
-
-/** Define button template */
-/*
- * template: Ember.Handlebars.compile( '{{#with view}}'+ '{{#if icon}}<img
- * class="ico" {{bindAttr src="icon"}} />{{/if}}'+ '<span>{{content}}</span>'+
- * '{{/with}}' )
- */
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/List.js b/SDL_Core/src/components/HMI/app/controlls/List.js
deleted file mode 100644
index e0fc551f4..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/List.js
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.List
- * @desc General list component for SDL application
- * @category Controlls
- * @filesource app/controlls/List.js
- * @version 1.0
- */
-
-SDL.List = Em.ContainerView.extend( {
-
- classNames: 'list',
-
- /** flag for scrollbar */
- disableScrollbar: false,
-
- /** Set count of items at one time */
- itemsOnPage: 0,
-
- /** Speed of scrolling in milliseconds */
- scrollBarSpeed: 200,
-
- /** Number of columns on page */
- columnsNumber: 1,
-
- itemheight: 50,
-
- /** Current scroll page */
- currentPage: 0,
-
- /** Css style of list */
- listScrollingAttributes: '',
-
- /** Count of items in menu */
- /*
- * listCount: function(){ if( this.items ) { return this.items.length; }
- * }.property('items.@each.type'),
- */
- listCount: function() {
-
- if ( (this.get('this.list.childViews.length') / this.get('columnsNumber') / this.get('itemsOnPage') ) < this.get('currentPage')) {
- this.set('currentPage', 0);
- }
- // console.log(this.get('this.list.childViews.length'));
- return this.get('this.list.childViews.length');
- }.property('this.list.childViews.length'),
-
- /** Pages count */
- pageCount: function() {
-
- return Math.ceil(this.get('listCount') / this.get('columnsNumber')
- / this.get('itemsOnPage'));
- }.property('listCount', 'itemsOnPage'),
-
- listHeight: function() {
-
- return this.itemsOnPage * this.itemheight;
- }.property('itemsOnPage'),
-
- /** Action of element "sb-top" which show previous list page */
- sbUp: function() {
-
- if (this.get('currentPage') > 0) {
- this.set('currentPage', this.get('currentPage') - 1);
- }
- },
-
- /** Action of element "sb-bottom" which show previous list page */
- sbDown: function() {
-
- if (this.get('currentPage') < this.get('pageCount') - 1) {
- this.set('currentPage', this.get('currentPage') + 1);
- }
- },
-
- /** Scroll content according to current page */
- onCurrentPageChange: function() {
-
- this.set('listScrollingAttributes', 'margin-top: '
- + (this.get('currentPage') * this.itemsOnPage * (-50)) + 'px');
- }.observes('currentPage'),
-
- /** Method for delete certain item from list */
- deleteItem: function(id) {
-
- this.items.splice(id, 1);
- this.list.refresh();
- },
-
- /** List components */
- childViews: [
- 'list', 'scrollbar'
- ],
-
- /** List view */
- list: Em.ContainerView.extend( {
-
- classNames: 'list-content',
-
- listStyleBinding: 'parentView.listScrollingAttributes',
-
- attributeBindings: [
- 'listStyle:style'
- ],
-
- refresh: function() {
-
- this.rerender();
- }.observes('_parentView.items.@each.type'),
-
- afterRender: function() {
-
- var items = this._parentView.items, element, i, key, binding;
-
- for (i = 0; i < items.length; i++) {
-
- element = items[i].type.create( {
- // element id
- elementId: this._parentView.elementId + '_item' + i,
-
- // list item css class
- classNames: 'list-item',
-
- classNameBindings: [
- 'this.voiceOver'
- ],
-
- // Dynamic property set
- init: function() {
-
- for (key in items[i].params) {
- if (key.match('Binding') != null) {
- binding = Ember.Binding
- .from(items[i].params[key]).to(key
- .replace('Binding', ''));
- binding.connect(this);
- // Set one way binding
- binding.oneWay();
- } else {
- this.set(key, items[i].params[key]);
- }
- }
- this._super();
- // synchronize bindings
- Ember.run.sync();
- }
- })
-
- // Push element to list
- this.get('childViews').pushObject(element);
- }
- }
- }),
-
- /** Scrollbar view */
- scrollbar: SDL.ScrollBar.extend( {
- currentPageBinding: 'parentView.currentPage',
- pageCountBinding: 'parentView.pageCount',
- listHeightBinding: 'parentView.listHeight',
- scrollBarIsDisabledBinding: 'parentView.disableScrollbar'
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/MenuList.js b/SDL_Core/src/components/HMI/app/controlls/MenuList.js
deleted file mode 100644
index b4ba9207e..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/MenuList.js
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.MenuList
- * @desc
- * @category Controlls
- * @filesource app/controlls/MenuList.js
- * @version 1.0
- */
-
-SDL.MenuList = Em.ContainerView
- .extend( {
-
- /**
- * Add new item to container
- *
- * @param buttons:
- * SoftButton[]
- */
- addItems: function(buttons, appID) {
-
- this.deleteItems();
-
- if (buttons) {
- for ( var i = 0; i < buttons.length; i++) {
- this.get('content.childViews').pushObject(SDL.Button
- .create(SDL.PresetEventsCustom, {
- text: buttons[i].text,
- icon: buttons[i].image ? buttons[i].image.value : "",
- templateName: buttons[i].image ? 'rightText' : 'text',
- groupName: "AlertPopUp",
- classNameBindings: ['isHighlighted:isHighlighted'],
- isHighlighted: buttons[i].isHighlighted ? true : false,
- softButtonID: buttons[i].softButtonID,
- systemAction: buttons[i].systemAction,
- groupName: this.groupName,
- classNames: 'softButton',
- appID: appID
- }));
- }
- }
- },
-
- /**
- * Delete existing Soft Buttons from container
- */
- deleteItems: function() {
-
- this.get('content.childViews').removeObjects(this.get('content.childViews').filterProperty('softButtonID'));
- this.get('content.childViews').removeObjects(this.get('content.childViews').filterProperty('softButtonID', 0));
- },
-
- classNames: [
- 'ffw_list_menu'
- ],
-
- attributeBindings: [
- 'elementHeight:style'
- ],
-
- // Position of current page
- page: 0,
-
- // Items per one page
- itemsOnPage: 5,
-
- // Height of one item
- ITEM_HEIGHT: 50,
-
- pageHeight: function() {
-
- return this.itemsOnPage * this.ITEM_HEIGHT;
- }.property('this.itemsOnPage'),
-
- elementHeight: function() {
-
- return 'height:'
- + String(this.get('pageHeight') + this.ITEM_HEIGHT - 2) + 'px;';
- }.property('this.pageHeight'),
-
- // Position of content block
- contentPositon: function() {
-
- return 'top:'
- + String(-(this.get('page') * this.get('pageHeight')))
- + 'px; height:'
- + String(this.get('pageHeight')
- - (Boolean(this.get('onLastPage') && this.get('page')) * this.ITEM_HEIGHT))
- + 'px;';
- }.property('onLastPage'),
-
- // Property for show or hide 'down' button
- onLastPage: function() {
-
- return ((this.get('page') * this.itemsOnPage) < (this
- .get('content.childViews.length') - this.itemsOnPage));
- }.property('page', 'content.childViews.length'),
-
- // Handeler to go previous page
- pageUp: function() {
-
- if (this.get('page')) {
- this.set('page', (this.get('page') - 1));
- }
- },
-
- // Handeler to go next page
- pageDown: function() {
-
- if (this.get('onLastPage')) {
- this.set('page', (this.get('page') + 1));
- }
- },
-
- childViews: [
- 'upButton', 'content', 'downButton'
- ],
-
- upButton: SDL.Button.extend( {
-
- classNames: [
- 'control', 'up_button'
- ],
-
- hidden: function() {
-
- if (this.get('parentView.page')) {
- return false;
- } else {
- return true;
- }
- }.property('parentView.page'),
-
- templateName: 'icon',
-
- icon: 'images/media/ico_arrow_up.png',
-
- action: 'pageUp',
-
- onDown: false,
-
- target: 'parentView'
- }),
-
- downButton: SDL.Button.extend( {
-
- classNames: [
- 'control', 'down_button'
- ],
-
- hidden: function() {
-
- if (this.get('parentView.onLastPage')) {
- return false;
- } else {
- return true;
- }
- }.property('parentView.onLastPage'),
-
- templateName: 'icon',
-
- icon: 'images/media/ico_arrow_down.png',
-
- action: 'pageDown',
-
- onDown: false,
-
- target: 'parentView'
- }),
-
- content: Em.ContainerView.extend( {
-
- classNames: [
- 'content'
- ],
-
- attributeBindings: [
- 'parentView.contentPositon:style'
- ]
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/QWERTYLayout.js b/SDL_Core/src/components/HMI/app/controlls/QWERTYLayout.js
deleted file mode 100755
index 336587d02..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/QWERTYLayout.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.QWERTYLayout
- * @desc General list component for SDL application
- * @category Controlls
- * @filesource app/controlls/QWERTYLayout.js
- * @version 1.0
- */
-
-SDL.QWERTYLayout = Em.ContainerView.extend( {
-
- classNames: 'keyboardLayout QWERTYLayout',
-
- childViews: [
- 'q',
- 'w',
- 'e',
- 'r',
- 't',
- 'y',
- 'u',
- 'i',
- 'o',
- 'p',
- 'a',
- 's',
- 'd',
- 'f',
- 'g',
- 'h',
- 'j',
- 'k',
- 'l',
- 'z',
- 'x',
- 'c',
- 'v',
- 'b',
- 'n',
- 'm',
- 'dash',
- 'ampersand'
- ],
-
- q: SDL.Button.extend({
- classNames: 'q k0',
- text : 'q',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- w: SDL.Button.extend({
- classNames: 'w k1',
- text : 'w',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- e: SDL.Button.extend({
- classNames: 'e k2',
- text : 'e',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- r: SDL.Button.extend({
- classNames: 'r k3',
- text : 'r',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- t: SDL.Button.extend({
- classNames: 't k4',
- text : 't',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- y: SDL.Button.extend({
- classNames: 'y k5',
- text : 'y',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- u: SDL.Button.extend({
- classNames: 'u k6',
- text : 'u',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- i: SDL.Button.extend({
- classNames: 'i k7',
- text : 'i',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- o: SDL.Button.extend({
- classNames: 'o k8',
- text : 'o',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- p: SDL.Button.extend({
- classNames: 'p k9',
- text : 'p',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- a: SDL.Button.extend({
- classNames: 'a k10',
- text : 'a',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- s: SDL.Button.extend({
- classNames: 's k11',
- text : 's',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- d: SDL.Button.extend({
- classNames: 'd k12',
- text : 'd',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- f: SDL.Button.extend({
- classNames: 'f k13',
- text : 'f',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- g: SDL.Button.extend({
- classNames: 'g k14',
- text : 'g',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- h: SDL.Button.extend({
- classNames: 'h k15',
- text : 'h',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- j: SDL.Button.extend({
- classNames: 'j k16',
- text : 'j',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- k: SDL.Button.extend({
- classNames: 'k k17',
- text : 'k',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- l: SDL.Button.extend({
- classNames: 'l k18',
- text : 'l',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- z: SDL.Button.extend({
- classNames: 'z k21',
- text : 'z',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- x: SDL.Button.extend({
- classNames: 'x k22',
- text : 'x',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- c: SDL.Button.extend({
- classNames: 'c k23',
- text : 'c',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- v: SDL.Button.extend({
- classNames: 'v k24',
- text : 'v',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- b: SDL.Button.extend({
- classNames: 'b k25',
- text : 'b',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- n: SDL.Button.extend({
- classNames: 'n k26',
- text : 'n',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- m: SDL.Button.extend({
- classNames: 'm k27',
- text : 'm',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- dash: SDL.Button.extend({
- classNames: 'dash k28',
- text : '-',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- ampersand: SDL.Button.extend({
- classNames: 'ampersand k29',
- text : '&',
- target : 'parentView.parentView',
- action : 'inputChanges'
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/QWERTZLayout.js b/SDL_Core/src/components/HMI/app/controlls/QWERTZLayout.js
deleted file mode 100755
index 4374c5f78..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/QWERTZLayout.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.QWERTYLayout
- * @desc General list component for SDL application
- * @category Controlls
- * @filesource app/controlls/QWERTYLayout.js
- * @version 1.0
- */
-
-SDL.QWERTZLayout = Em.ContainerView.extend( {
-
- classNames: 'keyboardLayout QWERTZLayout',
-
- childViews: [
- 'q',
- 'w',
- 'e',
- 'r',
- 't',
- 'z',
- 'u',
- 'i',
- 'o',
- 'p',
- 'a',
- 's',
- 'd',
- 'f',
- 'g',
- 'h',
- 'j',
- 'k',
- 'l',
- 'y',
- 'x',
- 'c',
- 'v',
- 'b',
- 'n',
- 'm',
- 'dash',
- 'ampersand'
- ],
-
- q: SDL.Button.extend({
- classNames: 'q k0',
- text : 'q',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- w: SDL.Button.extend({
- classNames: 'w k1',
- text : 'w',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- e: SDL.Button.extend({
- classNames: 'e k2',
- text : 'e',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- r: SDL.Button.extend({
- classNames: 'r k3',
- text : 'r',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- t: SDL.Button.extend({
- classNames: 't k4',
- text : 't',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- z: SDL.Button.extend({
- classNames: 'z k5',
- text : 'z',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- u: SDL.Button.extend({
- classNames: 'u k6',
- text : 'u',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- i: SDL.Button.extend({
- classNames: 'i k7',
- text : 'i',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- o: SDL.Button.extend({
- classNames: 'o k8',
- text : 'o',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- p: SDL.Button.extend({
- classNames: 'p k9',
- text : 'p',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- a: SDL.Button.extend({
- classNames: 'a k10',
- text : 'a',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- s: SDL.Button.extend({
- classNames: 's k11',
- text : 's',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- d: SDL.Button.extend({
- classNames: 'd k12',
- text : 'd',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- f: SDL.Button.extend({
- classNames: 'f k13',
- text : 'f',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- g: SDL.Button.extend({
- classNames: 'g k14',
- text : 'g',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- h: SDL.Button.extend({
- classNames: 'h k15',
- text : 'h',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- j: SDL.Button.extend({
- classNames: 'j k16',
- text : 'j',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- k: SDL.Button.extend({
- classNames: 'k k17',
- text : 'k',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- l: SDL.Button.extend({
- classNames: 'l k18',
- text : 'l',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- y: SDL.Button.extend({
- classNames: 'y k21',
- text : 'y',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- x: SDL.Button.extend({
- classNames: 'x k22',
- text : 'x',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- c: SDL.Button.extend({
- classNames: 'c k23',
- text : 'c',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- v: SDL.Button.extend({
- classNames: 'v k24',
- text : 'v',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- b: SDL.Button.extend({
- classNames: 'b k25',
- text : 'b',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- n: SDL.Button.extend({
- classNames: 'n k26',
- text : 'n',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- m: SDL.Button.extend({
- classNames: 'm k27',
- text : 'm',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- dash: SDL.Button.extend({
- classNames: 'dash k28',
- text : '-',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- ampersand: SDL.Button.extend({
- classNames: 'ampersand k29',
- text : '&',
- target : 'parentView.parentView',
- action : 'inputChanges'
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/ScrollBar.js b/SDL_Core/src/components/HMI/app/controlls/ScrollBar.js
deleted file mode 100644
index 466a29e40..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/ScrollBar.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.ScrollBar
- * @desc ScrollBar component for List component
- * @category Controlls
- * @filesource app/controlls/ScrollBar.js
- * @version 1.0
- */
-
-SDL.ScrollBar = Em.ContainerView
- .extend( {
-
- /** Define enable/disable scrollbar */
- classNameBindings: [
- 'scrollBarIsDisabled:is-disabled'
- ],
-
- /** Componet class */
- classNames: 'scrollbar',
-
- /** Childs views */
- childViews: [
- 'upButton', 'bar', 'downButton'
- ],
-
- /** current page */
- currentPage: 1,
-
- /** Pages count */
- pageCount: 0,
-
- listHeight: 250,
-
- /** On/OF scrollbar */
- scrollBarIsDisabled: false,
-
- /** Define bar height */
- sbHeight: function() {
-
- /** Max bar height */
- this.maxHeight = this.listHeight - 102;
- if (this.pageCount <= 1) {
- return this.maxHeight + 1;
- } else {
- return (this.maxHeight / this.pageCount);
- }
- }.property('pageCount'),
-
- /** Position of bar */
- sbTop: function() {
-
- if (this.get('currentPage') == 0) {
- return 0;
- } else {
- return (this.maxHeight - this.get('sbHeight'))
- / (this.get('pageCount') - 1) * this.get('currentPage') + 1;
- }
- }.property('currentPage', 'pageCount'),
-
- /** Support function */
- scrollbarBodyStyleAttributes: function() {
-
- return 'height: ' + (this.get('listHeight') - 1) + 'px;';
- }.property('listHeight'),
-
- /** Support function */
- sbBodyStyleAttributes: function() {
-
- return 'height: ' + (this.get('listHeight') - 100 - 1) + 'px;';
- }.property('listHeight'),
-
- sbStyleAttributes: function() {
-
- return 'height: ' + this.get('sbHeight') + 'px; ' + 'top: '
- + this.get('sbTop') + 'px';
- }.property('currentPage', 'pageCount'),
-
- /** Define scroll up button "disable" status */
- sbUpButtonIsDisabled: function() {
-
- if (this.get('currentPage') < 1) {
- return true;
- } else {
- return false;
- }
- }.property('currentPage', 'pageCount'),
-
- /** Define scroll down button "disable" status */
- sbDownButtonIsDisabled: function() {
-
- if ((this.pageCount - 1) > this.get('currentPage')) {
- return false;
- } else {
- return true;
- }
- }.property('currentPage', 'pageCount'),
-
- attributeBindings: [
- 'scrollbarBodyStyleAttributes:style'
- ],
-
- /** Bottom for scroll up */
- upButton: SDL.Button.extend( {
- classNames: [
- 'sb-top', 'button'
- ],
- action: 'sbUp',
- target: 'parentView.parentView',
- disabledBinding: 'parentView.sbUpButtonIsDisabled',
- icon: 'images/list/scrollbar/button-up-active.png',
- timer: 200
- }),
-
- /** Bottom for scroll down */
- downButton: SDL.Button.extend( {
- classNames: [
- 'sb-bottom', 'button'
- ],
- action: 'sbDown',
- target: 'parentView.parentView',
- disabledBinding: 'parentView.sbDownButtonIsDisabled',
- icon: 'images/list/scrollbar/button-down-active.png',
- timer: 200
- }),
-
- /** Scrollbar track */
- bar: Em.View
- .extend( {
- barBodyStyleBinding: 'parentView.sbBodyStyleAttributes',
- barStyleBinding: 'parentView.sbStyleAttributes',
- cancelAnimationBinding: 'parentView.parentView.cancelAnimation',
-
- layout: Em.Handlebars
- .compile('<div class="sb-body" {{bindAttr style="view.barBodyStyle"}}>'
- + '{{yield}}' + '</div>'),
-
- template: Em.Handlebars
- .compile('<div class="sb-bar" '
- + '{{bindAttr style="view.barStyle"}}'
- + '{{bindAttr class="view.cancelAnimation:cancelBarAnimation"}}>'
- + '</div>')
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/controlls/ScrollableText.js b/SDL_Core/src/components/HMI/app/controlls/ScrollableText.js
deleted file mode 100644
index 40d35f012..000000000
--- a/SDL_Core/src/components/HMI/app/controlls/ScrollableText.js
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.ScrollableText
- * @desc General ScrollableText component
- * @category Controlls
- * @filesource app/controlls/scrollableText.js
- * @version 1.0
- */
-
-SDL.ScrollableText = Em.ContainerView
- .extend( {
-
- classNames: 'scrollableText',
-
- /** flag for scrollbar */
- disableScrollbar: false,
-
- /** Set count of items at one time */
- itemsOnPage: 0,
-
- /** Speed of scrolling in milliseconds */
- scrollBarSpeed: 200,
-
- /** Number of columns on page */
- columnsNumber: 1,
-
- itemheight: 50,
-
- /** Current scroll page */
- currentPage: 0,
-
- /** Css style of scrollableText */
- scrollableTextScrollingAttributes: '',
-
- /** Css style of line-height of rows */
- linesHeght: 23,
-
- linesCount: 1,
-
- scrollHeight: null,
-
- scrollableTextCount: function() {
-
- if ($('#' + this.get('childViews')[1].elementId)) {
- $('#' + this.get('childViews')[1].elementId)
- .removeAttr('style');
- this.set('scrollHeight', $('#'
- + this.get('childViews')[1].elementId)[0].scrollHeight);
- $('#' + this.get('childViews')[1].elementId)
- .height(this.scrollHeight);
- this.set('linesCount', $('#'
- + this.get('childViews')[1].elementId)[0].scrollHeight
- / this.linesHeght);
- }
- },
-
- /** Pages count */
- pageCount: function() {
-
- return Math.ceil(this.get('linesCount') / this.get('itemsOnPage'));
- }.property('linesCount', 'itemsOnPage'),
-
- scrollableTextHeight: function() {
-
- return this.itemsOnPage * this.itemheight;
- }.property('itemsOnPage'),
-
- /** Action of element "sb-top" which show previous scrollableText page */
- sbUp: function() {
-
- if (this.get('currentPage') > 0) {
- this.set('currentPage', this.get('currentPage') - 1);
- }
- },
-
- /** Action of element "sb-bottom" which show previous scrollableText page */
- sbDown: function() {
-
- if (this.get('currentPage') < this.get('pageCount') - 1) {
- this.set('currentPage', this.get('currentPage') + 1);
- }
- },
-
- /** Scroll content according to current page */
- onCurrentPageChange: function() {
-
- this.set('scrollableTextScrollingAttributes', 'height: '
- + this.scrollHeight + 'px; top: '
- + (this.get('currentPage') * this.itemsOnPage * (-23)) + 'px');
- }.observes('currentPage'),
-
- /** Method for delete certain item from scrollableText */
- deleteItem: function(id) {
-
- this.items.splice(id, 1);
- this.scrollableText.refresh();
- },
-
- /** scrollableText components */
- childViews: [
- 'scrollbar',
- // 'scrollableText'
- ],
-
- refreshTextArea: function() {
-
- if (this.get('childViews')[1]) {
- this.get('childViews').removeObject(this.get('childViews')[1]);
- }
-
- $('#scrollableTextArea').height(23);
- this.set('scrollHeight', 23);
- this.set('linesCount', 1);
- this.set('currentPage', 0);
-
- this
- .get('childViews')
- .pushObject(Ember.TextArea
- .create( {
-
- classNames: 'scrollableTextArea',
-
- elementId: 'scrollableTextArea',
-
- scrollableTextStyleBinding: 'parentView.scrollableTextScrollingAttributes',
-
- attributeBindings: [
- 'scrollableTextStyle:style'
- ],
-
- valueBinding: 'this.parentView.items',
-
- actionDown: function() {
-
- return false;
- },
-
- didInsertElement: function() {
-
- this.get('parentView').scrollableTextCount();
- }
- }));
- }.observes('items'),
-
- /** scrollableText view */
- scrollableText: Ember.TextArea
- .extend( {
-
- classNames: 'scrollableTextArea',
-
- elementId: 'scrollableTextArea',
-
- scrollableTextStyleBinding: 'parentView.scrollableTextScrollingAttributes',
-
- attributeBindings: [
- 'scrollableTextStyle:style'
- ],
-
- valueBinding: 'this.parentView.items',
-
- actionDown: function() {
-
- return false;
- },
-
- didInsertElement: function() {
-
- this._parentView.scrollableTextCount();
- },
-
- refresh: function() {
-
- this.rerender();
- }.observes('_parentView.items')
-
- }),
-
- /** Scrollbar view */
- scrollbar: SDL.ScrollBar.extend( {
- currentPageBinding: 'parentView.currentPage',
- pageCountBinding: 'parentView.pageCount',
- scrollableTextHeightBinding: 'parentView.scrollableTextHeight',
- scrollBarIsDisabledBinding: 'parentView.disableScrollbar'
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/mixins/PresetEventCustom.js b/SDL_Core/src/components/HMI/app/mixins/PresetEventCustom.js
deleted file mode 100644
index b28468e47..000000000
--- a/SDL_Core/src/components/HMI/app/mixins/PresetEventCustom.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PresetEventsCustom
- * @desc Handler of custom preset butons events
- * @category mixin
- * @filesource app/mixins/PresetEventsCustom.js
- * @version 1.0
- */
-SDL.PresetEventsCustom = Ember.Mixin.create( {
- actionDown: function() {
-
- this._super();
- SDL.SDLController.onSoftButtonActionDownCustom(this);
- },
- actionUp: function() {
-
- this._super();
- SDL.SDLController.onSoftButtonActionUpCustom(this);
- if (this.systemAction == 'DEFAULT_ACTION') {
-
- SDL.SDLController.defaultActionSoftButton(this);
-
- } else if (this.systemAction == 'STEAL_FOCUS') {
-
- SDL.SDLController.stealFocusSoftButton(this);
-
- } else if (this.systemAction == 'KEEP_CONTEXT') {
-
- SDL.SDLController.keepContextSoftButton(this);
-
- }
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/mixins/PresetEvents.js b/SDL_Core/src/components/HMI/app/mixins/PresetEvents.js
deleted file mode 100644
index 08e58b6f3..000000000
--- a/SDL_Core/src/components/HMI/app/mixins/PresetEvents.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PresetEvents
- * @desc Handler of preset butons events
- * @category mixin
- * @filesource app/mixins/PresetEvents.js
- * @version 1.0
- */
-SDL.PresetEvents = Ember.Mixin.create( {
- actionDown: function() {
-
- this._super();
- SDL.SDLController.onSoftButtonActionDown(this);
- },
- actionUp: function() {
-
- this._super();
- SDL.SDLController.onSoftButtonActionUp(this);
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/model/PhoneModel.js b/SDL_Core/src/components/HMI/app/model/PhoneModel.js
deleted file mode 100644
index 7273be7a9..000000000
--- a/SDL_Core/src/components/HMI/app/model/PhoneModel.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PhoneModel
- * @desc Phone model
- * @category Model
- * @filesource app/model/PhoneModel.js
- * @version 1.0
- */
-
-SDL.PhoneModel = Em.Object.create( {
-
- /** Dial number */
- dialpadNumber: '',
-
- readyForCall: true,
-
- onCall: false,
-
- /** Text for phone status bar */
- statusModeText: null,
-
- /** Start call */
- dialCall: function() {
-
- if (this.dialpadNumber.length) {
- this.set('onCall', true);
- this.set('readyForCall', false);
- }
- },
-
- /** End call */
- endCall: function() {
-
- this.set('onCall', false);
- this.set('readyForCall', true);
- this.set('dialpadNumber', '');
-
- this.set('statusModeText', null);
-
- if (SDL.SDLModel.phoneCall) {
- SDL.SDLModel.set('phoneCall', false);
- SDL.SDLController
- .getApplicationModel(SDL.SDLAppController.model.appID)
- .turnOnSDL();
- }
- },
-
- /** Add symbol to dial pad number */
- setDialpadNumber: function(key) {
-
- if (this.dialpadNumber.length < 14) {
- key = this.dialpadNumber + key;
- this.set('dialpadNumber', key);
- }
- },
-
- /** Delete last number symbol */
- deleteDialpadNumber: function() {
-
- if (this.dialpadNumber.length) {
- this.set('dialpadNumber', this.dialpadNumber.slice(0, -1));
- }
- }
-}) \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/model/abstract/RangedValue.js b/SDL_Core/src/components/HMI/app/model/abstract/RangedValue.js
deleted file mode 100644
index 425e41806..000000000
--- a/SDL_Core/src/components/HMI/app/model/abstract/RangedValue.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name Ranged Value
- * @desc Abstract ranged value class
- * @category Model
- * @filesource app/model/abstract/RangedValue.js
- * @version 1.0
- */
-
-SDL.RangedValue = Em.Object.extend( {
-
- range: 3,
- minValue: 1,
- value: 0,
- cycle: true,
- enabled: true,
-
- /**
- * @desc Cyclically increases seat value until it reaches the range value
- * than value is switched to off (0)
- */
- increase: function() {
-
- if (!this.enabled) {
- this.enable();
- return;
- }
-
- if (this.value < this.range) {
- this.set('value', this.value + 1);
- } else {
- if (!this.cycle) { return; }
- this.set('value', 0);
- }
- },
- /**
- * Toggle indicators one by one
- */
- toggleIndicators: function() {
-
- if (!this.enabled) {
- this.enable();
- return;
- }
-
- if (this.value < this.range - 1) {
- this.set('value', this.value + 1);
- } else {
- this.set('value', 0);
- }
- },
- /**
- * @desc Cyclically increases seat value until it reaches zero value (off)
- * than value is changed to the range value
- */
- decrease: function() {
-
- if (!this.enabled) {
- this.enable();
- return;
- }
-
- if (this.value >= this.minValue) {
- if (!this.cycle && (this.value == this.minValue)) { return; }
- this.set('value', this.value - 1);
- } else {
- this.set('value', this.range);
- }
- },
-
- /**
- * @desc Switch off
- */
- off: function() {
-
- this.set('beforeOff', this.value);
- this.set('value', 0);
- },
-
- /**
- * Switch on
- */
- on: function() {
-
- this.set('value', this.range);
- },
-
- /**
- * Switch visual enable
- */
- enable: function() {
-
- this.set('enabled', true);
- },
-
- /**
- * Switch visual disable
- */
- disable: function() {
-
- this.set('enabled', false);
- },
-
- /**
- * Revert to value before toggle Off
- */
- revert: function() {
-
- if (this.beforeOff) {
- this.set('value', this.beforeOff);
- }
- }
-}) \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/model/media/CDModel.js b/SDL_Core/src/components/HMI/app/model/media/CDModel.js
deleted file mode 100644
index 9ded512c5..000000000
--- a/SDL_Core/src/components/HMI/app/model/media/CDModel.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.CDModel
- * @desc CD Media data model
- * @category Model
- * @filesource app/model/media/CDModel.js
- * @version 1.0
- */
-
-SDL.CDModel = Em.Object.create( {
- active: true,
-
- statusBar: 'The Electric Broncos',
-
- init: function() {
-
- this.set('active', true);
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/model/sdl/AppModel.js b/SDL_Core/src/components/HMI/app/model/sdl/AppModel.js
deleted file mode 100644
index bece47231..000000000
--- a/SDL_Core/src/components/HMI/app/model/sdl/AppModel.js
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLAppModel
- * @desc Abstarct model for SDL applications
- * @category Model
- * @filesource app/model/sdl/AppModel.js
- * @version 1.0
- */
-
-SDL.SDLAppModel = Em.Object.extend({
-
- /**
- * List of subscribed data on VehicleInfo model
- *
- * @type {Object}
- */
- subscribedData: {},
-
- /**
- * Application's container for current processed requests on HMI
- *
- * @type {Object}
- */
- activeRequests: {},
-
- /**
- * Application Id
- *
- * @type {Number}
- */
- appID: null,
-
- /**
- * Application name
- *
- * @type {String}
- */
- appName: '',
-
- /**
- * Navigation streaming url
- */
- navigationStream: null,
-
- /**
- * Navigation streaming url
- */
- navigationAudioStream: null,
-
- /**
- * Chosen device name
- *
- * @type {String}
- */
- deviceName: '',
-
- /**
- * Global properties for current application
- *
- * @type {Object}
- */
- globalProperties: {},
-
- /**
- * Statusbar text
- *
- * @type {String}
- */
- statusText: '',
-
- /**
- * Info data
- *
- * @type: {Em.Object}
- */
- appInfo: null,
-
- /**
- * Current language of applications UI component
- *
- * @type {String}
- */
- UILanguage: 'EN-US',
-
- /**
- * Current language of applications TTS and applications VR component
- *
- * @type {String}
- */
- TTSVRLanguage: 'EN-US',
-
- /**
- * Array of Soft Buttons
- *
- * @type {Array}
- */
- softButtons: [],
-
- /**
- * Array of Objects for TBTTurnList
- *
- * @type {Array}
- */
- turnList: [],
-
- /**
- * URL to application Icon
- *
- * @type {String}
- */
- appIcon: 'images/info/info_leftMenu_apps_ico.png',
-
- /**
- * Application commands list
- *
- * @type {Array}
- */
- commandsList: {
- 0: []
- },
-
- /**
- * Flag to open ShowConstantTBTview when entering to current screen
- *
- * @type {Boolean}
- */
- tbtActivate: false,
-
- /**
- * Return current menu commands
- *
- * @return {Array}
- */
- currentCommandsList: function () {
-
- return this.get('commandsList.' + this.get('currentSubMenuId'));
- }.property('this.currentSubMenuId'),
-
- /**
- * Current command submenu identificator
- *
- * @type {Number}
- */
- currentSubMenuId: 'top',
-
- /**
- * Return current submenu name
- *
- * @return {String}
- */
- currentSubMenuLabel: function () {
-
- //Param "top" is Top level menu index
- var submenu, commands = this.commandsList["top"];
-
- for (var i = 0; i < commands.length; i++) {
- if (commands[i].menuID == this.currentSubMenuId) {
- submenu = commands[i].name;
- }
- }
-
- return this.get('currentSubMenuId') != 'top' ? submenu : 'Options';
- }.property('this.currentSubMenuId'),
-
- /**
- * Interaction chooses data
- *
- * @type {Object}
- */
- interactionChoices: {},
-
- /**
- * Update Soft Buttons will handle on command Show
- *
- * @param {Array}
- */
- updateSoftButtons: function (buttons) {
-
- // delete existing buttons from array
- this.softButtons.splice(0);
-
- // push new buttons to array
- this.get('softButtons').pushObjects(buttons);
- },
-
- /**
- * Add command to list
- *
- * @param {Object}
- */
- addCommand: function (request) {
-
- var parentID = request.params.menuParams.parentID >= 0 ? request.params.menuParams.parentID : 'top';
-
- if (!this.get('commandsList.' + parentID)) {
- this.commandsList[parentID] = [];
- }
-
- var commands = this.get('commandsList.' + parentID);
-
- // Magic number is limit of 1000 commands added on one menu
- if (commands.length <= 999) {
-
- commands[commands.length] = {
- commandID: request.params.cmdID,
- name : request.params.menuParams.menuName,
- parent : parentID,
- position : request.params.menuParams.position ? request.params.menuParams.position : 0,
- icon : request.params.cmdIcon ? request.params.cmdIcon.value : null
- };
-
- if (SDL.SDLController.getApplicationModel(request.params.appID) && SDL.OptionsView.active) {
- SDL.SDLAppController.buttonsSort(parentID, this.appID);
- SDL.OptionsView.commands.refreshItems();
- }
-
- console.log(commands.length);
- FFW.UI.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
- } else {
- FFW.UI.sendError(SDL.SDLModel.resultCode["REJECTED"], request.id, request.method, 'Adding more than 1000 item to the top menu or to submenu is not allowed.');
- }
-
- },
-
- /**
- * Delete command from list
- *
- * @param {Number}
- */
- deleteCommand: function (commandID, requestID) {
-
- for (var i in this.commandsList) {
- if (this.commandsList[i].filterProperty('commandID', commandID).length) {
- if (i != this.currentSubMenuId || this.currentSubMenuId == 'top') {
- this.get('commandsList.' + i).removeObjects(this.get('commandsList.' + i).filterProperty('commandID', commandID));
- SDL.SDLModel.deleteCommandResponse(SDL.SDLModel.resultCode["SUCCESS"], requestID);
- return;
- } else {
- SDL.SDLModel.deleteCommandResponse(SDL.SDLModel.resultCode["IN_USE"], requestID);
- return;
- }
- }
- }
- },
-
- /**
- * Add submenu to commands list
- *
- * @param {Object}
- */
- addSubMenu: function (request) {
-
- // parentID is equal to 'top' cause Top level menu ID
- var parentID = 'top';
-
- var commands = this.get('commandsList.' + parentID);
-
- // Magic number is limit of 1000 commands added on one menu
- if (commands.length <= 999) {
-
- this.commandsList[request.params.menuID] = [];
- commands[commands.length] = {
- menuID : request.params.menuID,
- name : request.params.menuParams.menuName ? request.params.menuParams.menuName : '',
- parent : 0,
- position: request.params.menuParams.position ? request.params.menuParams.position : 0
- };
-
- if (SDL.SDLController.getApplicationModel(request.params.appID) && SDL.OptionsView.active) {
- SDL.SDLAppController.buttonsSort(parentID, this.appID);
- SDL.OptionsView.commands.refreshItems();
- }
-
- FFW.UI.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
- } else {
- FFW.UI.sendError(SDL.SDLModel.resultCode["REJECTED"], request.id, request.method, 'Adding more than 1000 item to the top menu or to submenu is not allowed.');
- }
- },
-
- /**
- * Delete submenu and related commands from list
- *
- * @param {Number}
- */
- deleteSubMenu: function (menuID) {
-
- if (this.commandsList['top'].filterProperty('commandID', menuID)) {
- this.get('commandsList.top').removeObjects(this.get('commandsList.top').filterProperty('menuID', menuID));
- delete(this.commandsList[menuID]);
- }
-
- return SDL.SDLModel.resultCode['SUCCESS'];
- },
-
- /**
- * SDL UI CreateInteraction response handeler push set of commands to
- * voice recognition list
- *
- * @param {Object}
- */
- onCreateInteraction: function (message) {
-
- this.interactionChoices[message.interactionChoiceSetID] = message.choiceSet;
-
- },
-
- /**
- * SDL UI DeleteInteraction response handeler close current interaction
- * set window (if opened) and delete current set commands from voice
- * recognition list
- *
- * @param {Object}
- */
- onDeleteInteraction: function (message) {
-
- delete this.interactionChoices[message.interactionChoiceSetID];
- },
-
- /**
- * SDL UI Slider response handeler open Slider window with received
- * parameters
- *
- * @param {Object}
- */
- onSlider: function (message) {
-
- SDL.SliderView.loadData(message);
-
- SDL.SliderView.activate(this.appName, message.params.timeout);
-
- }
- });
diff --git a/SDL_Core/src/components/HMI/app/model/sdl/MediaModel.js b/SDL_Core/src/components/HMI/app/model/sdl/MediaModel.js
deleted file mode 100644
index da1a6cfd9..000000000
--- a/SDL_Core/src/components/HMI/app/model/sdl/MediaModel.js
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLMediaModel
- * @desc SDL data model
- * @category Model
- * @filesource app/model/media/SDLMediaModel.js
- * @version 1.0
- */
-
-SDL.SDLMediaModel = SDL.SDLAppModel.extend({
-
- init: function () {
-
- this._super();
-
- var subscribeVIData = {};
-
- for (var key in SDL.SDLVehicleInfoModel.vehicleData) {
- subscribeVIData[key] = false;
- }
-
- this.set('subscribedData', subscribeVIData);
-
- // init properties here
- this.set('appInfo', Em.Object.create({
- field1 : '<field1>',
- field2 : '<field2>',
- field3 : '<field3>',
- mediaClock : '<mediaClock>',
- trackIcon : 'images/sdl/audio_icon.jpg',
- customPresets: [
- '<no definition>',
- '<no definition>',
- '<no definition>',
- '<no definition>',
- '<no definition>',
- '<no definition>',
- '<no definition>',
- '<no definition>'
- ],
- alignment : "text-align:center"
- }));
-
- this.set('activeRequests', Em.Object.create({
- uiPerformInteraction: null
- }));
-
- this.set('tbtActivate', false);
- this.set('isPlaying', true);
- this.set('globalProperties.helpPrompt', []);
- this.set('globalProperties.timeoutPrompt', []);
- this.set('globalProperties.keyboardProperties', Em.Object.create());
- this.set('globalProperties.keyboardProperties.keyboardLayout', 'QWERTY');
- this.set('globalProperties.keyboardProperties.limitedCharacterList', []);
-
- this.set('commandsList', {"top": []});
- this.set('softButtons', []);
- },
-
- /**
- * Parameter for presets for Media App to show presets on media screen
- *
- * @type bool
- */
- mediaPreset: false,
-
- /**
- * Flag for media playing state
- *
- * @param {Boolean}
- */
- isPlaying: false,
-
- /**
- * Flag for model active state currently used for status bar
- *
- * @param {Boolean}
- */
- active: false,
-
- /**
- * Timer for Media Clock
- */
- timer: null,
-
- /**
- * Current sdl Sub Menu identificator
- */
- currentSDLSubMenuid: null,
-
- /**
- * Current sdl Perform Interaction Choise identificator
- */
- currentSDLPerformInteractionChoiseId: null,
-
- countUp : true,
- pause : null,
- maxTimeValue: 68400, // 19 hours
- duration : 0,
- currTime : 0,
-
- /**
- * Method hides sdl activation button and sdl application
- *
- * @param {Number}
- */
- onDeleteApplication: function (appID) {
-
- SDL.SDLMediaController.onDeleteApplication(appID);
- },
-
- /**
- * Activate current application model
- */
- turnOnSDL: function () {
-
- SDL.SDLMediaController.activateApp(this);
- },
-
- startTimer: function () {
-
- var self = this;
-
- if (this.pause === false) {
- this.timer = setInterval(function () {
-
- self.set('currTime', self.currTime + 1);
- }, 1000);
- } else {
- clearInterval(this.timer);
- }
- }.observes('this.pause'),
-
- stopTimer: function () {
-
- clearInterval(this.timer);
- this.pause = null;
- this.appInfo.set('mediaClock', '');
- },
-
- setDuration: function () {
-
- var number, str = '', hrs = 0, min = 0, sec = 0;
- if (this.countUp) {
- number = this.duration + this.currTime;
- } else {
- if (this.duration <= this.currTime) {
- clearInterval(this.timer);
- this.currTime = 0;
- this.appInfo.set('mediaClock', '00:00:00');
- return;
- }
- number = this.duration - this.currTime;
- }
-
- hrs = parseInt(number / 3600), // hours
- min = parseInt(number / 60) % 60, // minutes
- sec = number % 60; // seconds
-
- str = (hrs < 10 ? '0' : '') + hrs + ':';
- str += (min < 10 ? '0' : '') + min + ":";
- str += (sec < 10 ? '0' : '') + sec;
- this.appInfo.set('mediaClock', str);
-
- if (!this.get('countUp') && this.duration == this.currTime) {
- clearInterval(this.timer);
- return;
- }
-
- }.observes('this.currTime'),
-
- changeDuration: function () {
-
- clearInterval(this.timer);
- this.currTime = -1;
- this.startTimer();
- }.observes('this.duration'),
-
- /**
- * SDL Setter for Media Clock Timer
- *
- * @param {Object}
- */
- sdlSetMediaClockTimer: function (params) {
-
- if ((params.updateMode == "PAUSE" && this.pause) || (params.updateMode == "RESUME" && !this.pause) || ((params.updateMode == "RESUME" || params.updateMode == "PAUSE") && this.pause === null )) {
- return SDL.SDLModel.resultCode['IGNORED'];
- }
-
- if (params.updateMode == "CLEAR") {
- this.stopTimer();
- return SDL.SDLModel.resultCode['SUCCESS'];
- }
-
- if (params.updateMode == "PAUSE") {
- this.set('pause', true);
- } else if (params.updateMode == "RESUME") {
- this.set('pause', false);
- } else {
- if (params.startTime) {
- this.set('countUp', params.updateMode == "COUNTUP" ? true : false);
- this.set('duration', null);
- this.set('duration', params.startTime.hours * 3600 + params.startTime.minutes * 60 + params.startTime.seconds);
- }
- this.set('pause', false);
- }
-
- return SDL.SDLModel.resultCode['SUCCESS'];
- },
-
- /**
- * Method to clear App OverLay
- */
- clearAppOverLay: function () {
-
- clearInterval(this.timer);
- this.appInfo.set('field1', '');
- this.appInfo.set('field2', '');
- this.appInfo.set('field3', '');
- this.appInfo.set('field4', '');
- this.appInfo.set('alignment', '');
- this.set('statusText', '');
- this.appInfo.set('mediaClock', '');
- this.appInfo.set('mediaTrack', '');
- this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg');
- this.updateSoftButtons();
- for (i = 0; i < 6; i++) {
- this.appInfo.set('customPresets.' + i, '');
- }
- this.set('mediaPreset', false);
-
- },
-
- /**
- * Applin UI Show handler
- *
- * @param {Object}
- */
- onSDLUIShow: function (params) {
-
- clearInterval(this.timer);
-
- for (var i = 0; i < params.showStrings.length; i++) {
- switch (params.showStrings[i].fieldName) {
- case 'mainField1':
- {
- this.appInfo.set('field1', params.showStrings[i].fieldText);
- break;
- }
- case 'mainField2':
- {
- this.appInfo.set('field2', params.showStrings[i].fieldText);
- break;
- }
- case 'mainField3':
- {
- this.appInfo.set('field3', params.showStrings[i].fieldText);
- break;
- }
- case 'mainField4':
- {
- this.appInfo.set('field4', params.showStrings[i].fieldText);
- break;
- }
- case 'statusBar':
- {
- this.set('statusText', params.showStrings[i].fieldText);
- break;
- }
- case 'mediaClock':
- {
- this.appInfo.set('mediaClock', params.showStrings[i].fieldText);
- break;
- }
- case 'mediaTrack':
- {
- this.appInfo.set('mediaTrack', params.showStrings[i].fieldText);
- break;
- }
- default :
- {
- break;
- }
- }
- }
-
- if (params.alignment) {
- switch (params.alignment) {
- case "CENTERED":
- {
- this.appInfo.set('alignment', "text-align:center");
- break;
- }
- case "LEFT_ALIGNED":
- {
- this.appInfo.set('alignment', "text-align:left");
- break;
- }
- case "RIGHT_ALIGNED":
- {
- this.appInfo.set('alignment', "text-align:right");
- break;
- }
- }
- }
-
- if (params.graphic) {
- this.appInfo.set('trackIcon', params.graphic.value);
- } else {
- this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg');
- }
-
- this.updateSoftButtons(params.softButtons);
-
- // Magic number is a count of Preset Buttons on HMI = 6
- if (params.customPresets) {
- for (var i = 0; i < 8; i++) {
- if (params.customPresets[i] != '' || params.customPresets[i] != null) {
- this.appInfo.set('customPresets.' + i, params.customPresets[i]);
- } else {
- this.appInfo.set('customPresets.' + i, 'Preset' + i);
- }
- }
- this.set('mediaPreset', true);
- } else {
- this.set('mediaPreset', false);
- }
- }
- });
diff --git a/SDL_Core/src/components/HMI/app/model/sdl/Model.js b/SDL_Core/src/components/HMI/app/model/sdl/Model.js
deleted file mode 100644
index 53bb9793e..000000000
--- a/SDL_Core/src/components/HMI/app/model/sdl/Model.js
+++ /dev/null
@@ -1,1022 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLModel
- * @desc General model for SDL applications
- * @category Model
- * @filesource app/model/sdl/SDLModel.js
- * @version 1.0
- */
-
-SDL.SDLModel = Em.Object.create({
-
- /**
- * Data came from UI.PerformInteractionRequest for ShowVRHelpItems popup
- *
- * @type {Object}
- */
- interactionData: {
- 'vrHelpTitle': null,
- 'vrHelp': null
- },
-
- /**
- * IScroll object to manage scroll on PerformInteraction view
- *
- * @type {Object}
- */
- interactionListWrapper: null,
-
- /**
- * TimeStamp of current started HMI session
- *
- * @type {Number}
- */
- timeStamp: null,
-
- /**
- * Video player object for navigationApp
- *
- * @type {Object}
- */
- naviVideo: null,
-
- /**
- * Flag to indicate AudioPassThruPopUp activity
- *
- * @type {Boolean}
- */
- AudioPassThruState: false,
-
- /**
- * Current device information
- *
- * @type {Object}
- */
- CurrDeviceInfo: {
- "name": null,
- "id": null
- },
-
- /**
- * Driver Distraction State
- *
- * @type bool
- */
- driverDistractionState: false,
-
- /**
- * Flag to sent Send Data extended params
- *
- * @type {Boolean}
- */
- sendDataExtend: false,
-
- /**
- * VR active status
- *
- * @type {Boolean}
- */
- VRActive: false,
-
- /**
- * Flag to be set true when phone call is initialised
- *
- * @type {Boolean}
- */
- phoneCall: false,
-
- /**
- * Device list search progress flag
- *
- * @param {Boolean}
- */
- deviceSearchProgress: false,
-
- /**
- * Flag to be set true when VRHelpList are activated
- *
- * @param {Boolean}
- */
- VRHelpListActivated: false,
-
- /**
- * Flag to be set true when VRHelpList are activated
- *
- * @type {String}
- */
- keyboardInputValue: "",
-
- /**
- * List of states for OnTBTClientState notification
- */
- tbtClientStates: [
- {
- name: "ROUTE_UPDATE_REQUEST",
- id: 0
- }, {
- name: "ROUTE_ACCEPTED",
- id: 1
- }, {
- name: "ROUTE_REFUSED",
- id: 2
- }, {
- name: "ROUTE_CANCELLED",
- id: 3
- }, {
- name: "ETA_REQUEST",
- id: 4
- }, {
- name: "NEXT_TURN_REQUEST",
- id: 5
- }, {
- name: "ROUTE_STATUS_REQUEST",
- id: 6
- }, {
- name: "ROUTE_SUMMARY_REQUEST",
- id: 7
- }, {
- name: "TRIP_STATUS_REQUEST",
- id: 8
- }, {
- name: "ROUTE_UPDATE_REQUEST_TIMEOUT",
- id: 9
- }
- ],
- /**
- * List of states for ExitApplication notification
- */
- exitAppState: [
- {
- name: "IGNITION_OFF",
- id : 0
- },
- {
- name: "MASTER_RESET",
- id : 1
- },
- {
- name: "FACTORY_DEFAULTS",
- id : 2
- }
- ],
-
- /**
- * Data for AudioPassThruPopUp that contains params for visualisation
- *
- * @type {Object}
- */
- AudioPassThruData: {},
-
- /**
- * Enum with result codes for RPC
- */
- resultCode: {
- "SUCCESS" : 0,
- "UNSUPPORTED_REQUEST" : 1,
- "UNSUPPORTED_RESOURCE" : 2,
- "DISALLOWED" : 3,
- "REJECTED" : 4,
- "ABORTED" : 5,
- "IGNORED" : 6,
- "RETRY" : 7,
- "IN_USE" : 8,
- "DATA_NOT_AVAILABLE" : 9,
- "TIMED_OUT" : 10,
- "INVALID_DATA" : 11,
- "CHAR_LIMIT_EXCEEDED" : 12,
- "INVALID_ID" : 13,
- "DUPLICATE_NAME" : 14,
- "APPLICATION_NOT_REGISTERED": 15,
- "WRONG_LANGUAGE" : 16,
- "OUT_OF_MEMORY" : 17,
- "TOO_MANY_PENDING_REQUESTS" : 18,
- "NO_APPS_REGISTERED" : 19,
- "NO_DEVICES_CONNECTED" : 20,
- "WARNINGS" : 21,
- "GENERIC_ERROR" : 22,
- "USER_DISALLOWED" : 23
- },
-
-
-
- /**
- * Info navigationApp data for ShowConstantTBT request
- *
- * @type: {Object}
- */
- constantTBTParams: {
- "navigationTexts":[
- {
- "fieldName": "navigationText1",
- "fieldText": "mainField1"
- },
- {
- "fieldName": "navigationText2",
- "fieldText": "mainField2"
- },
- {
- "fieldName": "ETA",
- "fieldText": "mainField3"
- },
- {
- "fieldName": "totalDistance",
- "fieldText": "mainField4"
- },
- {
- "fieldName": "navigationText",
- "fieldText": "mainField5"
- },
- {
- "fieldName": "timeToDestination",
- "fieldText": "mainField6"
- }
- ],
- "softButtons": [
- {
- "text" : "Menu",
- "isHighlighted" : true,
- "softButtonID" : 1
- },
- {
- "text" : "Custom button",
- "isHighlighted" : false,
- "softButtonID" : 2
- },
- {
- "text" : "+",
- "isHighlighted" : true,
- "softButtonID" : 3
- },
- {
- "text" : "-",
- "isHighlighted" : false,
- "softButtonID" : 4
- }
- ]
- },
-
- /**
- * List of registered applications, To prevent errors without registered
- * application "-1" used as test appID
- *
- * @type object
- */
- registeredApps: [],
-
- /**
- * List of registered components
- *
- * @type object
- */
- registeredComponents: [
- {
- type: "UI",
- state: false
- }, {
- type: "TTS",
- state: false
- }, {
- type: "VR",
- state: false
- }, {
- type: "BasicCommunication",
- state: false
- }, {
- type: "VehicleInfo",
- state: false
- }, {
- type: "Buttons",
- state: false
- }, {
- type: "Navigation",
- state: false
- }
- ],
-
- /**
- * List of icons
- *
- * @type {Object}
- */
- listOfIcons: {
- // appID: syncFileName
- 0: "images/media/ico_li.png"
- },
-
- /**
- * Array of active applications
- *
- * @type {Array}
- */
- applicationsList: [],
-
- /**
- * Array of connected devices
- *
- * @type {Array}
- */
- devicesList: [],
-
- /**
- * TTS + VR language
- *
- * @type {String}
- */
- hmiTTSVRLanguage: 'EN-US',
-
- /**
- * UI language
- *
- * @type {String}
- */
- hmiUILanguage: 'EN-US',
-
- /**
- * List of supported languages
- *
- * @type {Array}
- */
- sdlLanguagesList: [
- 'EN-US',
- 'ES-MX',
- 'FR-CA',
- 'DE-DE',
- 'ES-ES',
- 'EN-GB',
- 'RU-RU',
- 'TR-TR',
- 'PL-PL',
- 'FR-FR',
- 'IT-IT',
- 'SV-SE',
- 'PT-PT',
- 'NL-NL',
- 'ZH-TW',
- 'JA-JP',
- 'AR-SA',
- 'KO-KR',
- 'PT-BR',
- 'CS-CZ',
- 'DA-DK',
- 'NO-NO'
- ],
-
- /**
- * Method to open Phone view and dial phone number
- *
- * @param {Object}
- */
- dialNumber: function(params) {
-
- this.set('phoneCall', true);
- SDL.States.goToStates('phone.dialpad');
- SDL.PhoneModel.set('dialpadNumber', params.number);
- SDL.PhoneController.onDialCall();
- },
-
- /**
- * Notification method to send touch event data to SDLCore
- *
- * @param {Object}
- */
- onTouchEvent: function(event){
-
- if (event.target.parentElement.className.indexOf("navButton") >= 0 || event.target.className.indexOf("navButton") >= 0) {
- return;
- }
-
- var type = "",
- changedTouches = event.originalEvent.changedTouches ? event.originalEvent.changedTouches.length : 1;
-
- switch (event.originalEvent.type) {
- case "touchstart": {
- FLAGS.TOUCH_EVENT_STARTED = true;
- type = "BEGIN";
- break;
- }
- case "touchmove": {
- type = "MOVE";
- break;
- }
- case "touchend": {
- type = "END";
- break;
- }
- case "mousedown": {
- FLAGS.TOUCH_EVENT_STARTED = true;
- type = "BEGIN";
- break;
- }
- case "mousemove": {
- type = "MOVE";
- break;
- }
- case "mouseup": {
- type = "END";
- break;
- }
- }
-
- if (FLAGS.TOUCH_EVENT_STARTED ) {
-
- var events = [];
- for(var i = 0; i < changedTouches; i++){
-
- if (event.originalEvent.changedTouches && (event.originalEvent.changedTouches[i].pageX > SDL.SDLVehicleInfoModel.vehicleData.displayResolution.width || event.originalEvent.changedTouches[i].pageY > SDL.SDLVehicleInfoModel.vehicleData.displayResolution.height)) {
- return;
- }
-
- events[i] = {};
- events[i].c = [{}];
-
- events[i].id = event.originalEvent.changedTouches ? event.originalEvent.changedTouches[i].identifier : 0;
- events[i].c[0].x = event.originalEvent.changedTouches ? event.originalEvent.changedTouches[i].pageX : event.originalEvent.pageX;
- events[i].c[0].y = event.originalEvent.changedTouches ? event.originalEvent.changedTouches[i].pageY : event.originalEvent.pageY;
- events[i].ts = [event.timeStamp - SDL.SDLModel.timeStamp];
-
-
-
- }
- FFW.UI.onTouchEvent(type, events);
- }
-
- if (event.originalEvent.type == "mouseup") {
- FLAGS.TOUCH_EVENT_STARTED = false;
- }
- },
-
- /**
- * Method to start playing video from streaming video source
- * provided by SDLCore
- *
- * @param {Object}
- */
- startStream: function(params) {
-
- SDL.SDLController.getApplicationModel(params.appID).set('navigationStream', params.url);
- SDL.SDLModel.playVideo();
- },
-
- /**
- * Method to stop playing video streaming
- *
- * @param {Number}
- */
- stopStream: function(appID) {
-
- var createVideoView = Ember.View.create({
- templateName: "video",
- template: Ember.Handlebars.compile('<video id="html5Player"></video>')
- }),
- videoChild = null;
-
- SDL.NavigationAppView.removeChild(SDL.NavigationAppView.get('videoView'));
- SDL.NavigationAppView.rerender();
-
- SDL.SDLController.getApplicationModel(appID).set('navigationStream', null);
-
- //this.pauseVideo();
-
- videoChild = SDL.NavigationAppView.createChildView(createVideoView);
-
- SDL.NavigationAppView.get('childViews').pushObject(videoChild);
- SDL.NavigationAppView.set('videoView', videoChild);
- },
-
- /**
- * Method to start playing audio from streaming audio source
- * provided by SDLCore
- *
- * @param {Object}
- */
- startAudioStream: function(params) {
-
- SDL.SDLController.getApplicationModel(params.appID).set('navigationAudioStream', params.url);
- SDL.StreamAudio.play(params.url);
- },
-
- /**
- * Method to set navigationApp streaming url to current app model
- *
- * @param {Number}
- */
- stoptAudioStream: function(appID) {
-
- SDL.SDLController.getApplicationModel(appID).set('navigationAudioStream', null);
- SDL.StreamAudio.stop();
- },
-
- /**
- * Method to reset navigationApp streaming url from current app model
- */
- playVideo: function(){
- if (SDL.SDLAppController.model.navigationStream !== null) {
-
- SDL.SDLModel.naviVideo = document.getElementById("html5Player");
- SDL.SDLModel.naviVideo.src = SDL.SDLAppController.model.navigationStream;
- SDL.SDLModel.naviVideo.play();
- }
- },
-
- /**
- * Video player trigger to stop playing video
- */
- pauseVideo: function(){
- if (SDL.SDLModel.naviVideo != null) {
-
- SDL.SDLModel.naviVideo.pause();
- }
- },
-
- /**
- * Method to open Turn By Turn view
- *
- * @param {Object}
- */
- tbtActivate: function(params) {
-
- SDL.SDLController.getApplicationModel(params.appID).set('constantTBTParams', params);
- SDL.SDLController.getApplicationModel(params.appID).set('tbtActivate', true);
-
- if (SDL.SDLAppController.model) {
- SDL.SDLController.activateTBT();
- }
- },
-
- /**
- * Method to set data for Turn List in applications model
- *
- * @param {Object}
- */
- tbtTurnListUpdate: function(params) {
-
- SDL.SDLController.getApplicationModel(params.appID).turnList = params.turnList;
- SDL.SDLController.getApplicationModel(params.appID).turnListSoftButtons = params.softButtons;
- SDL.TBTTurnList.updateList(params.appID);
- },
-
- /**
- * Method to VRHelpList on UI with request parameters
- * It opens VrHelpList PopUp with current list of readable VR commands
- *
- * @param {Object}
- */
- ShowVrHelp: function(vrHelpTitle, vrHelp) {
-
- SDL.VRHelpListView.showVRHelp(vrHelpTitle, vrHelp);
- },
-
- /**
- * Method to set language for UI component with parameters sent from
- * SDLCore to UIRPC
- *
- * @type {String} lang
- */
- changeRegistrationUI: function (lang, appID) {
-
- if (SDL.SDLController.getApplicationModel(appID)) {
- SDL.SDLController.getApplicationModel(appID).set('UILanguage', lang);
- }
- },
-
- /**
- * Method to set language for TTS and VR components with parameters sent
- * from SDLCore to UIRPC
- *
- * @type {String} lang
- */
- changeRegistrationTTSVR: function (lang, appID) {
-
- if (SDL.SDLController.getApplicationModel(appID)) {
- SDL.SDLController.getApplicationModel(appID).set('TTSVRLanguage', lang);
- }
- },
-
- /**
- * Method to add activation button to VR commands and set device
- * parameters to model
- *
- * @param {Object}
- */
- onAppRegistered: function (params) {
-
- var applicationType = 1;
-
- if (SDL.SDLController.getApplicationModel(params.application.appID)) {
- return;
- }
-
- if (params.ttsName) {
- SDL.VRPopUp.AddActivateApp(params.ttsName.text ,params.appID);
- }
-
- if (params.vrSynonyms) {
- var length = params.vrSynonyms.length
- for (var i = 0; i < length; i++) {
- SDL.VRPopUp.AddActivateApp(params.vrSynonyms[i] ,params.application.appID);
- }
- }
-
- if (params.application.isMediaApplication) {
- applicationType = 0;
- }
-
- SDL.SDLController.registerApplication(params.application, applicationType);
- },
-
- /**
- * Method to delete activation button from VR commands and delete device
- * parameters from model
- *
- * @param {Object}
- */
- onAppUnregistered: function (params) {
-
- if (SDL.SDLController.getApplicationModel(params.appID)) {
-
- if (SDL.SDLController.getApplicationModel(params.appID).activeRequests.uiPerformInteraction) {
- SDL.InteractionChoicesView.deactivate("ABORTED");
- }
- SDL.SDLController.unregisterApplication(params.appID);
- }
- },
-
- /**
- * SDL UI ScrolableMessage activation function dependent of Driver
- * Distraction toggle state
- *
- * @param {Object}
- * params Object with parameters come from SDLCore.
- * @param {Number}
- * messageRequestId Identification of unique request
- */
- onSDLScrolableMessage: function (request, messageRequestId) {
-
- if (!SDL.ScrollableMessage.active) {
- if (SDL.SDLModel.driverDistractionState) {
- SDL.DriverDistraction.activate();
- FFW.UI.sendError(SDL.SDLModel.resultCode["REJECTED"], request.id, request.method, 'DD mode is active!');
- } else {
- SDL.ScrollableMessage.activate(SDL.SDLController.getApplicationModel(request.params.appID).appName, request.params, messageRequestId);
- }
- } else {
- FFW.UI.sendError(SDL.SDLModel.resultCode["REJECTED"], request.id, request.method, 'Higher priority request is being processed on HMI!');
- }
-
- },
-
- /**
- * setGlobalProperties
- *
- * @param {Object}
- * message Object with parameters come from SDLCore.
- */
- setProperties: function(params) {
-
- for (var i in params) {
- if (i === "keyboardProperties") {
- if (params[i].language) {
- SDL.SDLController.getApplicationModel(params.appID).set('globalProperties.keyboardProperties.language', params[i].language)
- }
- if (params[i].keyboardLayout) {
- SDL.SDLController.getApplicationModel(params.appID).set('globalProperties.keyboardProperties.keyboardLayout', params[i].keyboardLayout);
- }
- if (params[i].keypressMode) {
- SDL.SDLController.getApplicationModel(params.appID).set('globalProperties.keyboardProperties.keypressMode', params[i].keypressMode)
- }
- if (params[i].limitedCharacterList) {
- SDL.SDLController.getApplicationModel(params.appID).set('globalProperties.keyboardProperties.limitedCharacterList', params[i].limitedCharacterList)
- }
- if (params[i].autoCompleteText) {
- SDL.SDLController.getApplicationModel(params.appID).set('globalProperties.keyboardProperties.autoCompleteText', params[i].autoCompleteText)
- }
- } else {
- SDL.SDLController.getApplicationModel(params.appID).set('globalProperties.' + i, params[i]);
- }
- }
-
- },
-
- /**
- * Method to call handler from model to show list of avaliable
- * applications
- *
- * @param {Object}
- * appList
- */
- onGetAppList: function (appList) {
-
- var i = 0, len = appList.length;
- for (i = 0; i < len; i++) {
- if (appList[i]) {
- SDL.SDLModel.onAppRegistered(appList[i]);
- }
- }
-
- },
-
- /**
- * Method to call function from DeviceListView to show list of connected
- * devices
- *
- * @param {Object}
- * params
- */
- onGetDeviceList: function (params) {
-
- if (SDL.States.info.devicelist.active && params.deviceList && params.deviceList.length) {
- SDL.DeviceListView.ShowDeviceList(params);
- }
-
- SDL.SDLModel.set('deviceSearchProgress', false);
- },
-
- /**
- * SDL UI SetAppIcon handler
- *
- * @param {Object}
- * message
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- onSDLSetAppIcon: function (message, id, method) {
-
- if (!SDL.SDLController.getApplicationModel(message.appID)){
- FFW.UI.sendUIResult(SDL.SDLModel.resultCode["APPLICATION_NOT_REGISTERED"], id, method);
- } else {
-
- var img = new Image();
- img.onload = function () {
-
- // code to set the src on success
- SDL.SDLController.getApplicationModel(message.appID).set('appIcon', message.syncFileName.value);
- FFW.UI.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], id, method);
- };
- img.onerror = function (event) {
-
- // doesn't exist or error loading
- FFW.UI.sendError(SDL.SDLModel.resultCode["INVALID_DATA"], id, method, 'Image does not exist!');
- return false;
- };
-
- img.src = message.syncFileName.value;
- }
- },
-
- /**
- * SDL UI Alert response handler show popup window
- *
- * @param {Object}
- * message Object with parameters come from SDLCore
- * @param {Number}
- * alertRequestId Id of current handled request
- */
- onUIAlert: function (message, alertRequestId) {
-
- if (!SDL.AlertPopUp.active) {
- SDL.AlertPopUp.AlertActive(message, alertRequestId);
- } else {
- SDL.SDLController.alertResponse(this.resultCode['REJECTED'], alertRequestId);
- }
- },
-
- /**
- * SDL UI PerformInteraction response handler show popup window
- *
- * @param {Object}
- * message Object with parameters come from SDLCore
- * @param {Number}
- * performInteractionRequestId Id of current handled request
- */
- uiPerformInteraction: function (message) {
-
- if (!SDL.SDLController.getApplicationModel(message.params.appID).activeRequests.uiPerformInteraction) {
- SDL.SDLController.getApplicationModel(message.params.appID).activeRequests.uiPerformInteraction = message.id;
- } else {
- SDL.SDLController.interactionChoiseCloseResponse(message.appID, SDL.SDLModel.resultCode['REJECTED']);
- return;
- }
-
- if (message.params && message.params.vrHelpTitle && message.params.vrHelp) {
-
- SDL.SDLModel.set('interactionData.vrHelpTitle', message.params.vrHelpTitle);
- SDL.SDLModel.set('interactionData.vrHelp', message.params.vrHelp);
- }
-
- SDL.InteractionChoicesView.activate(message);
-
- SDL.SDLController.VRMove();
- },
-
- /**
- * SDL UI Slider response handler show popup window
- *
- * @param {Object}
- * message Object with parameters come from SDLCore
- */
- uiSlider: function (message) {
-
- if (!SDL.SliderView.active) {
- SDL.SDLController.getApplicationModel(message.params.appID).onSlider(message);
- } else {
- FFW.UI.sendSliderResult(this.resultCode["ABORTED"], message.id);
- }
- },
-
- /**
- * SDL ShowKeyboard show method with incoming parameters of layout, language etc...
- *
- * @param {Object}
- * message Object with parameters come from SDLCore
- */
- uiShowKeyboard: function(element){
- SDL.Keyboard.activate(element);
- },
-
- /**
- * SDL UI AudioPassThru response handler show popup window
- *
- * @param {Object}
- * message Object with parameters come from SDLCore.
- */
- UIPerformAudioPassThru: function(message) {
-
- this.set('AudioPassThruData', message);
- this.set('AudioPassThruState', true);
- },
-
- /**
- * Method ends processing of AudioPassThru and call AudioPassThru UI
- * response handler
- */
- UIEndAudioPassThru: function () {
-
- if (this.AudioPassThruState) {
- FFW.UI.sendUIResult(this.resultCode["SUCCESS"], FFW.UI.endAudioPassThruRequestID, "UI.EndAudioPassThru");
- SDL.SDLController.performAudioPassThruResponse(this.resultCode["SUCCESS"]);
- } else {
- FFW.UI.sendError(this.resultCode["GENERIC_ERROR"], FFW.UI.endAudioPassThruRequestID, "UI.EndAudioPassThru", "UI.PerformAudioPassThru are not processed at the moment!");
- }
- },
-
- /**
- * Prompt activation
- *
- * @param {Object}
- * @param {Number}
- */
- onPrompt: function (ttsChunks) {
-
- var message = '';
- if (ttsChunks) {
- for (var i = 0; i < ttsChunks.length; i++) {
- message += ttsChunks[i].text + '\n';
- }
- SDL.TTSPopUp.ActivateTTS(message);
- }
- },
-
- /**
- * Play audio file on PlayTone notification
- */
- onPlayTone: function () {
-
- SDL.Audio.play('audio/initial.wav');
- },
-
- /**
- * Prompt deactivation
- */
- TTSStopSpeaking: function () {
- //true parameter makes send error response ABORTED
- SDL.TTSPopUp.DeactivateTTS();
- FFW.TTS.set('aborted', true);
- },
-
- /**
- * SDL DeleteCommand response handler to sent delete command error or normal result
- *
- * @param {Number}
- * @param {Number}
- */
- deleteCommandResponse: function (resultCode, requestID) {
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
- FFW.UI.sendUIResult(resultCode, requestID, "UI.DeleteCommand");
- } else {
- FFW.UI.sendError(resultCode, requestID, "UI.DeleteCommand", "SubMenu is opened")
- }
- },
-
- /**
- * SDL VR AddCommand response handler add command to voice recognition
- * window
- *
- * @param {Object}
- */
- addCommandVR: function (message) {
-
- var appId = 0;
- if ("appID" in message) {
- appId = message.appID;
- }
-
- SDL.VRPopUp.AddCommand(message.cmdID, message.vrCommands, appId);
- },
-
- /**
- * SDL VR DeleteCommand response handler delete command from voice
- * recognition window
- *
- * @param {Number}
- */
- deleteCommandVR: function (commandID) {
-
- SDL.VRPopUp.DeleteCommand(commandID);
- },
-
- /**
- * SDL VR DeleteCommand response handler delete command from voice
- * recognition window
- *
- * @param {Number}
- */
- deleteCommandVR: function (commandID) {
-
- SDL.VRPopUp.DeleteCommand(commandID);
- },
-
- onDeactivateApp: function (target, appID) {
-
- if (SDL.SDLController.getApplicationModel(appID)) {
- /**
- * Close Options menu if opened
- */
- if (SDL.OptionsView.active) {
- SDL.OptionsView.set('active', false);
- }
-
- var dest = target.split('.'), reason;
-
- switch (dest[0]) {
- case 'media':
- {
- reason = 'AUDIO';
- break;
- }
- case "phone":
- {
- reason = 'PHONEMENU';
- break;
- }
- case "navigation":
- {
- reason = 'NAVIGATIONMAP';
- break;
- }
- case "settings":
- {
- reason = 'SYNCSETTINGS';
- break;
- }
- default:
- {
- reason = 'GENERAL';
- break;
- }
- }
-
- SDL.TurnByTurnView.deactivate();
-
- //if (!SDL.SDLController.getApplicationModel(appID).unregistered) {
- FFW.BasicCommunication.OnAppDeactivated(reason, appID);
- //}
- }
- }
-});
diff --git a/SDL_Core/src/components/HMI/app/model/sdl/NonMediaModel.js b/SDL_Core/src/components/HMI/app/model/sdl/NonMediaModel.js
deleted file mode 100644
index acc4698bc..000000000
--- a/SDL_Core/src/components/HMI/app/model/sdl/NonMediaModel.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLNonMediaModel
- * @desc Concrate model for SDL NonMedia application
- * @category Model
- * @filesource app/model/sdl/NonMediaModel.js
- * @version 1.0
- */
-
-SDL.SDLNonMediaModel = SDL.SDLAppModel.extend({
-
- init: function () {
-
- this._super();
-
- var subscribeVIData = {};
-
- for (var key in SDL.SDLVehicleInfoModel.vehicleData) {
- subscribeVIData[key] = false;
- }
-
- this.set('subscribedData', subscribeVIData);
-
- // init properties here
- this.set('appInfo', Em.Object.create({
- field1 : '<field1>',
- field2 : '<field2>',
- field3 : '<field3>',
- field4 : '<field4>',
- mainImage : 'images/sdl/audio_icon.jpg',
- image : '',
- customPresets: [],
- alignment : "text-align:center"
- }));
-
- this.set('activeRequests', Em.Object.create({
- uiPerformInteraction: null
- }));
-
- this.set('constantTBTParams', null);
-
- this.set('tbtActivate', false);
- this.set('globalProperties.helpPrompt', []);
- this.set('globalProperties.timeoutPrompt', []);
- this.set('globalProperties.keyboardProperties', Em.Object.create());
- this.set('globalProperties.keyboardProperties.keyboardLayout', 'QWERTY');
- this.set('globalProperties.keyboardProperties.limitedCharacterList', []);
-
- this.set('commandsList', {'top': []});
- this.set('softButtons', []);
- },
-
- /**
- * Method hides sdl activation button and sdl application
- *
- * @param {Number}
- */
- onDeleteApplication: function (appID) {
-
- SDL.NonMediaController.onDeleteApplication(appID);
- },
-
- /**
- * Activate current application model
- */
- turnOnSDL: function () {
-
- SDL.NonMediaController.activateApp(this);
- },
-
- /**
- * Method to clear App OverLay
- */
- clearAppOverLay: function () {
-
- clearInterval(this.timer);
- this.appInfo.set('field1', '');
- this.appInfo.set('field2', '');
- this.appInfo.set('field3', '');
- this.appInfo.set('field4', '');
- this.appInfo.set('alignment', '');
- this.appInfo.set('mainImage', 'images/sdl/audio_icon.jpg');
- this.updateSoftButtons();
- for (i = 0; i < 6; i++) {
- this.appInfo.set('customPresets.' + i, '');
- }
-
- },
-
- /**
- * Applin UI Show handler
- *
- * @param {Object}
- */
- onSDLUIShow: function (params) {
-
- for (var i = 0; i < params.showStrings.length; i++) {
- switch (params.showStrings[i].fieldName) {
- case 'mainField1':
- {
- this.appInfo.set('field1', params.showStrings[i].fieldText);
- break;
- }
- case 'mainField2':
- {
- this.appInfo.set('field2', params.showStrings[i].fieldText);
- break;
- }
- case 'mainField3':
- {
- this.appInfo.set('field3', params.showStrings[i].fieldText);
- break;
- }
- case 'mainField4':
- {
- this.appInfo.set('field4', params.showStrings[i].fieldText);
- break;
- }
- case 'statusBar':
- {
- this.appInfo.set('statusText', params.showStrings[i].fieldText);
- break;
- }
- case 'mediaClock':
- {
- this.appInfo.set('mediaClock', params.showStrings[i].fieldText);
- break;
- }
- case 'mediaTrack':
- {
- this.appInfo.set('mediaTrack', params.showStrings[i].fieldText);
- break;
- }
- default :{
- break;
- }
- }
- }
-
- if (params.alignment) {
- switch (params.alignment) {
- case "CENTERED":
- {
- this.appInfo.set('alignment', "text-align:center");
- break;
- }
- case "LEFT_ALIGNED":
- {
- this.appInfo.set('alignment', "text-align:left");
- break;
- }
- case "RIGHT_ALIGNED":
- {
- this.appInfo.set('alignment', "text-align:right");
- break;
- }
- }
- }
-
- if (params.graphic) {
- this.appInfo.set('mainImage', params.graphic.value);
- } else {
- this.appInfo.set('mainImage', 'images/sdl/audio_icon.jpg');
- }
-
- // Magic number is a count of Preset Buttons on HMI = 6
- if (params.customPresets) {
- this.appInfo.set('customPresets', []);
- for (var i = 0; i < 8; i++) {
- if (params.customPresets[i] != '' || params.customPresets[i] != null) {
- this.appInfo.get('customPresets').pushObject(params.customPresets[i]);
- } else {
- this.appInfo.get('customPresets').pushObject('Preset' + i);
- }
- }
- }
-
- this.updateSoftButtons(params.softButtons);
-
- },
-
- sdlSetMediaClockTimer: function () {
-
- return;
- }
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/model/sdl/VehicleInfoModel.js b/SDL_Core/src/components/HMI/app/model/sdl/VehicleInfoModel.js
deleted file mode 100644
index 092e700df..000000000
--- a/SDL_Core/src/components/HMI/app/model/sdl/VehicleInfoModel.js
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLVehicleInfoModel
- * @desc SDL model with vehicle information used instead of CAN network.
- * VehicleInfoModel is simulation of real CAN network.
- * @category Model
- * @filesource app/model/sdl/SDLVehicleInfoModel.js
- * @version 1.0
- */
-
-SDL.SDLVehicleInfoModel = Em.Object
- .create( {
-
- /**
- * Stored VehicleInfo transmission state Data
- *
- * @type {Array}
- */
- vehicleInfoPRNDL: [
- "PARK",
- "REVERSE",
- "NEUTRAL",
- "DRIVE",
- "SPORT",
- "LOWGEAR",
- "FIRST",
- "SECOND",
- "THIRD",
- "FOURTH",
- "FIFTH",
- "SIXTH"
- ],
-
- /**
- * PRNDL state value
- *
- * @type {String}
- */
- prndlSelectState: 'PARK',
-
- /**
- * Stored VehicleInfo Data
- *
- * @type {Array}
- */
- ecuDIDData: [
- {
- 'data': "ECU 1 Test Data"
- }, {
- 'data': "ECU 2 Test Data"
- }
- ],
-
- /**
- * Type of current vehicle: make of the vehicle, model of the vehicle,
- * model Year of the vehicle, trim of the vehicle.
- *
- * @type {Object}
- */
- vehicleType: {
- make: "Ford",
- model: "Fiesta",
- modelYear: "2013",
- trim: "SE"
- },
-
- eVehicleDataType:{
- "gps" :"VEHICLEDATA_GPS",
- "speed": "VEHICLEDATA_SPEED",
- "rpm": "VEHICLEDATA_RPM",
- "fuelLevel": "VEHICLEDATA_FUELLEVEL",
- "fuelLevel_State": "VEHICLEDATA_FUELLEVEL_STATE",
- "instantFuelConsumption": "VEHICLEDATA_FUELCONSUMPTION",
- "externalTemperature": "VEHICLEDATA_EXTERNTEMP",
- "prndl": "VEHICLEDATA_PRNDL",
- "tirePressure": "VEHICLEDATA_TIREPRESSURE",
- "odometer": "VEHICLEDATA_ODOMETER",
- "beltStatus": "VEHICLEDATA_BELTSTATUS",
- "bodyInformation": "VEHICLEDATA_BODYINFO",
- "deviceStatus": "VEHICLEDATA_DEVICESTATUS",
- "eCallInfo": "VEHICLEDATA_ECALLINFO",
- "airbagStatus": "VEHICLEDATA_AIRBAGSTATUS",
- "emergencyEvent": "VEHICLEDATA_EMERGENCYEVENT",
- "clusterModes": "VEHICLEDATA_CLUSTERMODESTATUS",
- "myKey": "VEHICLEDATA_MYKEY",
- "driverBraking": "VEHICLEDATA_BRAKING",
- "wiperStatus": "VEHICLEDATA_WIPERSTATUS",
- "headLampStatus": "VEHICLEDATA_HEADLAMPSTATUS",
- "engineTorque":"VEHICLEDATA_ENGINETORQUE",
- "accPedalPosition": "VEHICLEDATA_ACCPEDAL",
- "steeringWheelAngle": "VEHICLEDATA_STEERINGWHEEL"
- },
-
- /**
- * Stored VehicleInfo Data
- *
- * @type {Object}
- */
- vehicleData: {
- 'displayResolution':{
- 'width': 800,
- 'height': 480
- },
- 'speed': 80.0,
- 'fuelLevel': 0.2,
- 'fuelLevel_State': "UNKNOWN",
- 'instantFuelConsumption': 2.2,
- 'tirePressure': {
- 'pressureTelltale': 'OFF',
- 'leftFront': {
- 'status': 'UNKNOWN'
- },
- 'rightFront': {
- 'status': 'UNKNOWN'
- },
- 'leftRear': {
- 'status': 'UNKNOWN'
- },
- 'rightRear': {
- 'status': 'UNKNOWN'
- },
- 'innerLeftRear': {
- 'status': 'UNKNOWN'
- },
- 'innerRightRear': {
- 'status': 'UNKNOWN'
- }
- },
- 'beltStatus': {
- 'driverBeltDeployed': "NOT_SUPPORTED",
- 'passengerBeltDeployed': "NOT_SUPPORTED",
- 'passengerBuckleBelted': "NOT_SUPPORTED",
- 'driverBuckleBelted': "NOT_SUPPORTED",
- 'leftRow2BuckleBelted': "NOT_SUPPORTED",
- 'passengerChildDetected': "NOT_SUPPORTED",
- 'rightRow2BuckleBelted': "NOT_SUPPORTED",
- 'middleRow2BuckleBelted': "NOT_SUPPORTED",
- 'middleRow3BuckleBelted': "NOT_SUPPORTED",
- 'leftRow3BuckleBelted': "NOT_SUPPORTED",
- 'rightRow3BuckleBelted': "NOT_SUPPORTED",
- 'leftRearInflatableBelted': "NOT_SUPPORTED",
- 'rightRearInflatableBelted': "NOT_SUPPORTED",
- 'middleRow1BeltDeployed': "NOT_SUPPORTED",
- 'middleRow1BuckleBelted': "NOT_SUPPORTED"
- },
- 'bodyInformation': {
- 'parkBrakeActive': false,
- 'ignitionStableStatus': "MISSING_FROM_TRANSMITTER",
- 'ignitionStatus': "UNKNOWN",
- 'driverDoorAjar': true,
- 'passengerDoorAjar': true,
- 'rearLeftDoorAjar': true,
- 'rearRightDoorAjar': true
- },
- 'deviceStatus': {
- 'voiceRecOn': false,
- 'btIconOn': false,
- 'callActive': false,
- 'phoneRoaming': false,
- 'textMsgAvailable': false,
- 'battLevelStatus': "NOT_PROVIDED",
- 'stereoAudioOutputMuted': false,
- 'monoAudioOutputMuted': false,
- 'signalLevelStatus': "NOT_PROVIDED",
- 'primaryAudioSource': "NO_SOURCE_SELECTED",
- 'eCallEventActive': false
- },
- 'driverBraking': "NOT_SUPPORTED",
- 'wiperStatus': "NO_DATA_EXISTS",
- 'headLampStatus': {
- "lowBeamsOn": false,
- "highBeamsOn": false,
- "ambientLightSensorStatus": "NIGHT"
- },
- 'engineTorque': 2.5,
- 'accPedalPosition': 10.5,
- 'steeringWheelAngle': 1.2,
- 'myKey': {
- "e911Override": "NO_DATA_EXISTS"
- },
- 'avgFuelEconomy': 0.1,
- 'batteryVoltage': 12.5,
- 'externalTemperature': 40.0,
- 'vin': '52-452-52-752',
- 'prndl': 'PARK',
- 'batteryPackVoltage': 12.5,
- 'batteryPackCurrent': 7.0,
- 'batteryPackTemperature': 30,
- 'tripOdometer': 0,
- 'genericbinary': '165165650',
- 'satRadioESN': "165165650",
- 'rainSensor': 165165650,
- 'gps': {
- 'longitudeDegrees': 42,
- 'latitudeDegrees': -83,
- 'utcYear': 2013,
- 'utcMonth': 2,
- 'utcDay': 14,
- 'utcHours': 13,
- 'utcMinutes': 16,
- 'utcSeconds': 54,
- 'compassDirection': 'SOUTHWEST',
- 'pdop': 8,
- 'hdop': 5,
- 'vdop': 3,
- 'actual': false,
- 'satellites': 8,
- 'dimension': '2D',
- 'altitude': 7,
- 'heading': 173,
- 'speed': 2
- },
- 'eCallInfo': {
- 'eCallNotificationStatus': 'NORMAL',
- 'auxECallNotificationStatus': 'NORMAL',
- 'eCallConfirmationStatus': 'NORMAL'
- },
- 'airbagStatus': {
- 'driverAirbagDeployed': 'NO_EVENT',
- 'driverSideAirbagDeployed': 'NO_EVENT',
- 'driverCurtainAirbagDeployed': 'NO_EVENT',
- 'passengerAirbagDeployed': 'NO_EVENT',
- 'passengerCurtainAirbagDeployed': 'NO_EVENT',
- 'driverKneeAirbagDeployed': 'NO_EVENT',
- 'passengerSideAirbagDeployed': 'NO_EVENT',
- 'passengerKneeAirbagDeployed': 'NO_EVENT'
- },
- 'emergencyEvent': {
- 'emergencyEventType': 'NO_EVENT',
- 'fuelCutoffStatus': 'NORMAL_OPERATION',
- 'rolloverEvent': 'NO_EVENT',
- 'maximumChangeVelocity': 'NO_EVENT',
- 'multipleEvents': 'NO_EVENT'
- },
- 'clusterModeStatus': {
- 'powerModeActive': false,
- 'powerModeQualificationStatus': 'POWER_MODE_EVALUATION_IN_PROGRESS',
- 'carModeStatus': 'FACTORY',
- 'powerModeStatus': 'KEY_OUT'
- }
-
- },
-
- /**
- * Method to set selected state of vehicle transmission to vehicleData
- */
- onPRNDLSelected: function() {
-
- if (this.prndlSelectState) {
- this.set('vehicleData.prndl', this.prndlSelectState);
- }
- }.observes('this.prndlSelectState'),
-
- /**
- * Method calls GetVehicleType response
- *
- * @type {Number}
- */
- getVehicleType: function(id) {
-
- FFW.VehicleInfo.GetVehicleTypeResponse(this.vehicleType, id);
- },
-
- /**
- * SDL VehicleInfo.GetDTCs handler fill data for response about vehicle
- * errors
- *
- * @type {Object} params
- * @type {Number} id
- */
- vehicleInfoGetDTCs: function(params, id) {
-
- var dtc = [], result = "", ecuHeader = 2;
-
- for ( var i = 0; i < 3; i++) {
- dtc.push("line " + i);
- }
-
- result = "SUCCESS";
-
- FFW.VehicleInfo.vehicleInfoGetDTCsResponse(ecuHeader,
- dtc,
- result,
- id);
-
- },
-
- /**
- * SDL VehicleInfo.ReadDID handler send response about vehicle
- * conditions
- *
- * @type {Object} params
- * @type {Number} id
- */
- vehicleInfoReadDID: function(params, id) {
-
- var didResult = [], resultCode = "";
- // magic number used because there is no huge database on HMI of
- // vehicle
- // data
- if (this.ecuDIDData[1].data) {
- resultCode = "SUCCESS";
- } else {
- resultCode = "INVALID_DATA";
- }
-
- for ( var i = 0; i < params.didLocation.length; i++) {
- if (i < 10) {
- didResult[i] = {};
- didResult[i].resultCode = 'SUCCESS';
- didResult[i].didLocation = params.didLocation[i];
- didResult[i].data = '0';
- } else {
- didResult[i] = {};
- didResult[i].resultCode = "VEHICLE_DATA_NOT_AVAILABLE";
- didResult[i].didLocation = params.didLocation[i];
- didResult[i].data = '0';
- }
- }
-
- FFW.VehicleInfo.vehicleInfoReadDIDResponse(didResult,
- resultCode,
- id);
- },
-
- /**
- * Function returns response message to VehicleInfoRPC
- *
- * @type {Object} message
- */
- SubscribeVehicleData: function(message) {
- if (SDL.SDLController.getApplicationModel(message.params.appID)) {
-
- var subscribeVIData = {};
- for (var key in message.params) {
- if (message.params[key] && key != 'appID' && key in SDL.SDLController.getApplicationModel(message.params.appID).subscribedData && key !== "clusterModeStatus") {
- SDL.SDLController.getApplicationModel(message.params.appID).subscribedData[key] = message.params[key];
- subscribeVIData[key] = {
- dataType: this.eVehicleDataType[key],
- resultCode: "SUCCESS"
- };
- } else if (key != 'appID' && message.params[key] && key !== "clusterModeStatus") {
- subscribeVIData[key] = {
- dataType: this.eVehicleDataType[key],
- resultCode: "VEHICLE_DATA_NOT_AVAILABLE"
- }
- } else if (key === "clusterModeStatus") {
- subscribeVIData["clusterModes"] = {
- dataType: this.eVehicleDataType["clusterModes"],
- resultCode: "SUCCESS"
- }
- }
- }
- }
- FFW.VehicleInfo.sendVISubscribeVehicleDataResult(SDL.SDLModel.resultCode["SUCCESS"], message.id, message.method, subscribeVIData);
- },
-
- /**
- * Function returns response message to VehicleInfoRPC
- *
- * @type {Object} message
- */
- UnsubscribeVehicleData: function(message) {
- if (SDL.SDLController.getApplicationModel(message.params.appID)) {
-
- var subscribeVIData = {};
- for (var key in message.params) {
- if (message.params[key] && key != 'appID' && key in SDL.SDLController.getApplicationModel(message.params.appID).subscribedData && key !== "clusterModeStatus") {
- SDL.SDLController.getApplicationModel(message.params.appID).subscribedData[key] = false;
- subscribeVIData[key] = {
- dataType: this.eVehicleDataType[key],
- resultCode: "SUCCESS"
- };
- } else if (key != 'appID' && message.params[key] && key !== "clusterModeStatus") {
- subscribeVIData[key] = {
- dataType: this.eVehicleDataType[key],
- resultCode: "VEHICLE_DATA_NOT_AVAILABLE"
- }
- } else if (key === "clusterModeStatus") {
- subscribeVIData["clusterModes"] = {
- dataType: this.eVehicleDataType["clusterModes"],
- resultCode: "SUCCESS"
- }
- }
- }
- }
- FFW.VehicleInfo.sendVISubscribeVehicleDataResult(SDL.SDLModel.resultCode["SUCCESS"], message.id, message.method, subscribeVIData);
- },
-
- /**
- * Function returns response message to VehicleInfoRPC
- *
- * @type {Object} message
- */
- getVehicleData: function(message) {
-
- var data = {}
- text = "Params ", result = true;
-
- for ( var key in message.params) {
- if (key != "appID") {
- if (this.vehicleData[key]) {
- data[key] = this.vehicleData[key];
- } else {
- text += key + ", ";
- result = false;
- }
- }
- }
-
- text += "are not avaliable";
-
- if (result) {
- FFW.VehicleInfo.sendGetVehicleDataResut(SDL.SDLModel.resultCode["SUCCESS"], message.id, message.method, data);
- } else {
- FFW.VehicleInfo.sendGetVehicleDataError(SDL.SDLModel.resultCode["DATA_NOT_AVAILABLE"], message.id, message.method, text, data);
- }
- },
-
- /**
- * Function send all vehicle conditions on FFW.VehicleInfo.OnVehicleData
- * for notification when data changes
- */
- onVehicleDataChanged: function() {
-
- var appID = null;
-
- for (var i = 0; i < SDL.SDLModel.registeredApps.length; i++) {
- appID = SDL.SDLModel.registeredApps[i].appID;
- if (SDL.SDLController.getApplicationModel(appID).subscribedData["prndl"]) {
-
- var jsonData = {};
- jsonData["prndl"] = this.vehicleData["prndl"];
- FFW.VehicleInfo.OnVehicleData(jsonData);
- return;
- }
- }
-
- }.observes('this.vehicleData.prndl')
- });
diff --git a/SDL_Core/src/components/HMI/app/util/Audio.js b/SDL_Core/src/components/HMI/app/util/Audio.js
deleted file mode 100644
index 9684d5b4e..000000000
--- a/SDL_Core/src/components/HMI/app/util/Audio.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.Audio
- * @desc HTML5 Audio player
- * @category utils
- * @filesource app/util/Audio.js
- * @version 1.0
- */
-
-SDL.Audio = {
-
- audio: new Audio(),
-
- play: function(path) {
-
- this.audio.src = path;
- this.audio.play();
- }
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/util/StreamAudio.js b/SDL_Core/src/components/HMI/app/util/StreamAudio.js
deleted file mode 100644
index de78abae7..000000000
--- a/SDL_Core/src/components/HMI/app/util/StreamAudio.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.StreamAudio
- * @desc HTML5 Audio player
- * @category utils
- * @filesource app/util/StreamAudio.js
- * @version 1.0
- */
-
-SDL.StreamAudio = {
-
- audio: new Audio(),
-
- play: function(path) {
-
- this.audio.src = path;
- this.audio.play();
- },
-
- stop: function() {
-
- this.audio.src = "";
- this.audio.pause();
- }
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/WarningView.js b/SDL_Core/src/components/HMI/app/view/WarningView.js
deleted file mode 100644
index 44ddf3f6a..000000000
--- a/SDL_Core/src/components/HMI/app/view/WarningView.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.WarningViewg
- * @desc Warning representation
- * @category View
- * @filesource app/view/WarningView.js
- * @version 1.0
- */
-
-SDL.warningView = Em.ContainerView
- .extend( {
-
- classNameBindings: [
- 'fade:fadeAnimation:fadeWarning', 'hide:inactive_state',
- ],
-
- elementId: 'warning_view',
-
- childViews: [
- 'content', 'button'
- ],
-
- content: Em.View
- .extend( {
-
- classNames: 'message',
-
- template: Ember.Handlebars
- .compile('<div class="warning_text"> {{SDL.locale.label.view_warning}}</div>'
- + '<div class="text">'
- + '<br>'
- + '<p>{{SDL.locale.label.view_warning_paragraph1}} </p><br>'
- + '<p> {{SDL.locale.label.view_warning_paragraph2}} </p><br>'
- + '</div>')
- }),
-
- button: Em.View.create( {
-
- elementId: 'warning_ok_button',
-
- classNameBindings: [
- 'isReady: visible_display', 'pressed:pressed'
- ],
-
- classNames: [
- 'okbut', 'ffw-button'
- ],
- /**
- * Check for webkit fillmode animation support Android < 4 version
- * doesnt support webkit animation fillmode
- */
- checkForCCS3AnimationSupport: function() {
-
- if (FFW.isAndroid) {
- return $('body')[0].style.webkitAnimationFillMode === '';
- } else {
- return false;
- }
- },
-
- template: Ember.Handlebars.compile('<span>OK</span>'),
-
- /* this method is called when the web part is fully loaded */
- appLoaded: function() {
-
- var self = this;
- /** Show OK Button after 2 second delay */
- setTimeout(function() {
-
- self.set('isReady', true);
- }, 2000);
- }.observes('SDL.appReady'),
-
- actionDown: function(event) {
-
- this.set('pressed', true);
- },
-
- actionUp: function(event) {
-
- this.set('pressed', false);
-
- var self = this;
-
- this._parentView.set('fade', this
- .checkForCCS3AnimationSupport());
-
- setTimeout(function() {
-
- self._parentView.set('hide', true);
- }, 1000);
- }
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/climateView.js b/SDL_Core/src/components/HMI/app/view/climateView.js
deleted file mode 100644
index 626c2a235..000000000
--- a/SDL_Core/src/components/HMI/app/view/climateView.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PlayerControllsView
- * @desc Video player visual representation
- * @category View
- * @filesource app/view/player/PlayerView.js
- * @version 1.0
- */
-SDL.ClimateView = Em.ContainerView.create( {
- /** View Id */
- elementId: 'climateView',
-
- classNameBindings:
- [
- 'SDL.States.climate.active:active_state:inactive_state'
- ],
-
- childViews:
- [
- 'windowText'
- ],
-
-
- windowText: SDL.Label.extend( {
-
- classNames: 'windowText',
-
- content: 'Climate'
- } )
-
-} );
diff --git a/SDL_Core/src/components/HMI/app/view/home/bottomControls.js b/SDL_Core/src/components/HMI/app/view/home/bottomControls.js
deleted file mode 100644
index 787955ce1..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/bottomControls.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.BottomControlls
- * @desc BottomControlls module visual representation
- * @category View
- * @filesource app/view/BottomControls.js
- * @version 1.0
- */
-
-SDL.BottomControls = Em.ContainerView.extend( {
-
- elementId: 'app_bottom_controlls',
-
- childViews: [
- 'information', 'home', 'settings'
- ],
-
- information: Em.View.extend( {
- elementId: 'info_but',
- classNameBindings: [
- 'SDL.States.info.active:selected'
- ],
-
- template: Em.Handlebars.compile('<div id="info_but_click"></div>'),
-
- actionDown: function(event) {
-
- if (!SDL.States.info.active) {
- if (SDL.InfoController.activeState === 'info.nonMedia') {
- SDL.NonMediaController.activateCurrentApp();
- } else {
- SDL.States.goToStates(SDL.InfoController.activeState);
- }
- }
- }
- }),
-
- home: Em.View.extend( {
- elementId: 'home_but',
- classNameBindings: [
- 'SDL.States.home.active:selected'
- ],
-
- template: Em.Handlebars.compile('<div id="home_but_click"></div>'),
-
- actionDown: function(event) {
-
- SDL.States.goToStates('home');
- }
- }),
-
- settings: Em.View.extend( {
- elementId: 'setting_but',
-
- classNameBindings: 'SDL.States.settings.active:selected',
-
- template: Em.Handlebars.compile('<div id="setting_but_click"></div>'),
-
- actionDown: function(event) {
-
- if (!SDL.States.settings.active) {
- SDL.States.goToStates('settings');
- }
- }
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/controlButtons.js b/SDL_Core/src/components/HMI/app/view/home/controlButtons.js
deleted file mode 100644
index 645c1dd93..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/controlButtons.js
+++ /dev/null
@@ -1,530 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.controlButtons
- * @desc Climate module visual representation
- * @category View
- * @filesource app/view/home/controlButtons.js
- * @version 1.0
- */
-
-SDL.ControlButtons = Em.ContainerView
- .create( {
-
- elementId: 'app_controlButtons',
-
- childViews: [
- 'VRButton',
- 'buttonControls',
- 'driverDistractionControl',
- 'infoTable',
- 'sendData',
- 'vehicleInfo',
- 'tbtClientState',
- 'ExitApp',
- 'UILanguages',
- 'TTSVRLanguages',
- 'UILanguagesLabel',
- 'TTSVRLanguagesLabel',
- 'appUILanguagesLabel',
- 'appTTSVRLanguagesLabel',
- 'appUILang',
- 'appTTSVRLang'
- ],
-
- /*
- * Label with name of UILanguages select
- */
- appUILang: SDL.Label.extend( {
-
- elementId: 'appUILang',
-
- classNames: 'appUILang',
-
- contentBinding: 'SDL.SDLAppController.model.UILanguage'
- }),
-
- /*
- * Label with name of TTSVRLanguages select
- */
- appTTSVRLang: SDL.Label.extend( {
-
- elementId: 'appTTSVRLang',
-
- classNames: 'appTTSVRLang',
-
- contentBinding: 'SDL.SDLAppController.model.TTSVRLanguage'
- }),
-
- /*
- * Label with name of UILanguages select
- */
- appUILanguagesLabel: SDL.Label.extend( {
-
- elementId: 'appUILanguagesLabel',
-
- classNames: 'appUILanguagesLabel',
-
- content: 'application UI Languages'
- }),
-
- /*
- * Label with name of TTSVRLanguages select
- */
- appTTSVRLanguagesLabel: SDL.Label.extend( {
-
- elementId: 'appTTSVRLanguagesLabel',
-
- classNames: 'appTTSVRLanguagesLabel',
-
- content: 'application (TTS + VR) Languages'
- }),
-
- /*
- * Label with name of UILanguages select
- */
- UILanguagesLabel: SDL.Label.extend( {
-
- elementId: 'UILanguagesLabel',
-
- classNames: 'UILanguagesLabel',
-
- content: 'UI Languages'
- }),
-
- /*
- * Label with name of TTSVRLanguages select
- */
- TTSVRLanguagesLabel: SDL.Label.extend( {
-
- elementId: 'TTSVRLanguagesLabel',
-
- classNames: 'TTSVRLanguagesLabel',
-
- content: 'TTS + VR Languages'
- }),
-
- /*
- * HMI element Select with list of supported UI component languages
- */
- UILanguages: Em.Select.extend( {
-
- elementId: 'UILanguages',
-
- classNames: 'languageSelect',
-
- contentBinding: 'SDL.SDLModel.sdlLanguagesList',
-
- valueBinding: 'SDL.SDLModel.hmiUILanguage'
- }),
-
- /*
- * HMI element Select with list of supported TTS and VR component
- * languages
- */
- TTSVRLanguages: Em.Select.extend( {
-
- elementId: 'TTSVRLanguages',
-
- classNames: 'languageSelect',
-
- contentBinding: 'SDL.SDLModel.sdlLanguagesList',
-
- valueBinding: 'SDL.SDLModel.hmiTTSVRLanguage'
- }),
-
- /**
- * Sending data from HMI for processing in SDLCore
- */
- sendData: SDL.Button.create( {
- elementId: 'sendData',
- classNames: 'sendData btnNotPressed',
- action: function() {
-
- FFW.BasicCommunication.OnSystemRequest();
- },
- text: 'OnSystemRequest',
- templateName: 'text'
- }),
-
- /**
- * VehicleInfo button
- */
- vehicleInfo: SDL.Button.create( {
- elementId: 'vehicleInfoButton',
- classNames: 'vehicleInfoButton btn',
- text: 'Vehicle Info',
- action: function() {
-
- // this._super();
- SDL.VehicleInfo.toggleActivity();
- },
- templateName: 'text'
- }),
-
- /**
- * TBT Client State button
- */
- tbtClientState: SDL.Button.create( {
- elementId: 'tbtClientStateButton',
- classNames: 'tbtClientStateButton btn',
- text: 'TBT Client State',
- action: function() {
-
- // this._super();
- SDL.TBTClientStateView.toggleActivity();
- },
- templateName: 'text'
- }),
-
- /**
- * Exit Application button opens Exit Application reasons popup
- */
- ExitApp: SDL.Button.create( {
- elementId: 'exitApp',
- classNames: 'exitApp btn',
- text: 'Exit Application',
- action: function() {
-
- // this._super();
- SDL.ExitApp.toggleActivity();
- },
- templateName: 'text'
- }),
-
- /**
- * Voice Recognition button
- */
- VRButton: SDL.Button.create( {
- elementId: 'VRButton',
- classNames: 'VRButton',
- action: 'activateVRPopUp',
- target: 'SDL.SDLController'
- }),
-
- infoTable: Em.ContainerView
- .extend( {
- elementId: 'infoTable',
-
- classNames: 'infoTable',
-
- childViews: [
- 'globalPropertiesLabel',
- 'gpHelpData',
- 'gpTimeoutData',
- 'gpAUTOCOMPLETE'
- ],
-
- globalPropertiesLabel: SDL.Label.extend( {
-
- elementId: 'sdlGPLabel',
-
- classNames: 'sdlGPLabel',
-
- content: 'HELP_PROMPT: TIMEOUT_PROMPT: AUTOCOMPLETE_TEXT:'
- }),
-
- gpHelpData: SDL.Label.extend( {
-
- elementId: 'sdlGPHData',
-
- classNames: 'sdlGPData',
-
- contentBinding: 'this.propertiesData',
-
- propertiesData: function() {
-
- var str = '';
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.helpPrompt) {
- var i = 0;
-
- for (i = 0; i < SDL.SDLAppController.model.globalProperties.helpPrompt.length; i++) {
- str += SDL.SDLAppController.model.globalProperties.helpPrompt[i].text
- + ' ';
- }
- }
- return str;
- }.property('SDL.SDLAppController.model.globalProperties.helpPrompt.@each.text')
- }),
-
- gpTimeoutData: SDL.Label.extend( {
-
- elementId: 'sdlGPTData',
-
- classNames: 'sdlGPData',
-
- contentBinding: 'this.propertiesData',
-
- propertiesData: function() {
-
- var str = '';
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.timeoutPrompt) {
- var i = 0;
- for (i = 0; i < SDL.SDLAppController.model.globalProperties.timeoutPrompt.length; i++) {
- str += SDL.SDLAppController.model.globalProperties.timeoutPrompt[i].text
- + ' ';
- }
- }
-
- return str;
- }.property('SDL.SDLAppController.model.globalProperties.timeoutPrompt.@each.text')
- }),
-
- gpAUTOCOMPLETE: SDL.Label.extend( {
-
- elementId: 'sdlGPAUTOCOMPLETE',
-
- classNames: 'sdlGPData',
-
- contentBinding: 'SDL.SDLAppController.model.globalProperties.keyboardProperties.autoCompleteText',
-
- propertiesData: function() {
-
-// var str = '';
-// if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.timeoutPrompt) {
-// var i = 0;
-// for (i = 0; i < SDL.SDLAppController.model.globalProperties.timeoutPrompt.length; i++) {
-// str += SDL.SDLAppController.model.globalProperties.timeoutPrompt[i].text
-// + ' ';
-// }
-// }
-//
-// return str;
- }.property('SDL.SDLAppController.model.globalProperties.keyboardProperties.autoCompleteText.@each')
- })
- }),
-
- driverDistractionControl: Em.ContainerView.extend( {
- elementId: 'driverDistractionControl',
-
- classNames: 'driverDistractionControl',
-
- childViews: [
- 'driverDistractionLabel', 'driverDistractionCheckBox'
- ],
-
- driverDistractionLabel: SDL.Label.extend( {
-
- elementId: 'driverDistractionControlLabel',
-
- classNames: 'driverDistractionControlLabel',
-
- content: 'DD'
- }),
-
- driverDistractionCheckBox: Em.Checkbox.extend( {
-
- elementId: 'driverDistractionControlCheckBox',
-
- classNames: 'driverDistractionControlCheckBox',
-
- checkedBinding: 'SDL.SDLModel.driverDistractionState'
-
- })
- }),
-
- buttonControls: Em.ContainerView.extend( {
- elementId: 'buttonControls',
-
- classNames: 'buttonControls',
-
- childViews: [
- 'ContainerControlls',
- 'OneBtn',
- 'TwoBtn',
- 'ThreeBtn',
- 'FourBtn',
- 'FiveBtn',
- 'SixBtn',
- 'SevenBtn',
- 'EightBtn',
- 'NineBtn',
- 'ZiroBtn'
- ],
-
- ContainerControlls: Em.ContainerView.extend( {
- elementId: 'ContainerControlls',
-
- classNames: 'ContainerControlls',
-
- childViews: [
- 'UpBtn', 'DownBtn', 'LeftBtn', 'RightBtn', 'OkBtn'
- ],
-
- /** Up button */
- UpBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'TUNEUP',
- classNames: 'UpBtn',
- time: 0,
- presetName: 'TUNEUP'
- }),
-
- /** Down button */
- DownBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'TUNEDOWN',
- classNames: 'DownBtn',
- time: 0,
- presetName: 'TUNEDOWN'
- }),
-
- /** Left button */
- LeftBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'SEEKLEFT',
- classNames: 'LeftBtn',
- time: 0,
- presetName: 'SEEKLEFT'
- }),
-
- /** Right button */
- RightBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'SEEKRIGHT',
- classNames: 'RightBtn',
- time: 0,
- presetName: 'SEEKRIGHT'
- }),
-
- /** Ok button */
- OkBtn: SDL.Button.create( {
- elementId: 'OK',
- classNames: 'OkBtn',
- time: 0,
- presetName: 'OK',
- actionDown: function() {
-
- this._super();
- SDL.SDLController
- .onSoftButtonOkActionDown(this.presetName);
- },
- actionUp: function() {
-
- this._super();
- SDL.SDLController
- .onSoftButtonOkActionUp(this.presetName);
- }
- })
- }),
-
- /** One button */
- OneBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_1',
- classNames: 'OneBtn btnNotPressed',
- text: '1',
- time: 0,
- presetName: 'PRESET_1',
- templateName: 'text'
- }),
-
- /** Two button */
- TwoBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_2',
- classNames: 'TwoBtn btnNotPressed',
- text: '2',
- time: 0,
- presetName: 'PRESET_2',
- templateName: 'text'
- }),
-
- /** Three button */
- ThreeBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_3',
- classNames: 'ThreeBtn btnNotPressed',
- text: '3',
- time: 0,
- presetName: 'PRESET_3',
- templateName: 'text'
- }),
-
- /** Four button */
- FourBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_4',
- classNames: 'FourBtn btnNotPressed',
- text: '4',
- time: 0,
- presetName: 'PRESET_4',
- templateName: 'text'
- }),
-
- /** Five button */
- FiveBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_5',
- classNames: 'FiveBtn btnNotPressed',
- text: '5',
- time: 0,
- presetName: 'PRESET_5',
- templateName: 'text'
- }),
-
- /** One button */
- SixBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_6',
- classNames: 'SixBtn btnNotPressed',
- text: '6',
- time: 0,
- presetName: 'PRESET_6',
- templateName: 'text'
- }),
-
- /** One button */
- SevenBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_7',
- classNames: 'SevenBtn btnNotPressed',
- text: '7',
- time: 0,
- presetName: 'PRESET_7',
- templateName: 'text'
- }),
-
- /** One button */
- EightBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_8',
- classNames: 'EightBtn btnNotPressed',
- text: '8',
- time: 0,
- presetName: 'PRESET_8',
- templateName: 'text'
- }),
-
- /** One button */
- NineBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_9',
- classNames: 'NineBtn btnNotPressed',
- text: '9',
- time: 0,
- presetName: 'PRESET_9',
- templateName: 'text'
- }),
-
- /** One button */
- ZiroBtn: SDL.Button.create(SDL.PresetEvents, {
- elementId: 'PRESET_0',
- classNames: 'ZiroBtn btnNotPressed',
- text: '0',
- time: 0,
- presetName: 'PRESET_0',
- templateName: 'text'
- })
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/statusClimateView.js b/SDL_Core/src/components/HMI/app/view/home/statusClimateView.js
deleted file mode 100644
index 01b6dc636..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/statusClimateView.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.StatusClimateView
- * @desc Climate statusbar visual representation
- * @category View
- * @filesource app/view/climate/StatusClimateView.js
- * @version 1.0
- */
-
-SDL.StatusClimateView = Em.ContainerView.extend( {
-
- elementId: 'status_climate',
-
- classNames: [
- 'status_bar'
- ],
-
- /** Climate components */
- childViews: [
- 'statusHome'
- ],
-
- /** Label for Home screen */
- statusHome: SDL.Label.create( {
- elementId: 'status_climate_label',
-
- classNames: [
- 'visible'
- ],
-
- content: 'Climate'
- }),
-
- /**
- * Select phone state should be called when user press phone statusbar
- */
- actionUp: function(event) {
-
- SDL.States.goToStates('climate');
- }
-
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/statusInfoView.js b/SDL_Core/src/components/HMI/app/view/home/statusInfoView.js
deleted file mode 100644
index 1241d87c3..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/statusInfoView.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.StatusInfoView
- * @desc Component for Information Status bar
- * @category view
- * @filesource app/view/home/statusNavigationView.js
- * @version 1.0
- */
-SDL.StatusInfoView = Em.ContainerView.extend( {
- /** View Id */
- elementId: 'status_info',
-
- classNames: [
- 'status_bar', 'hidden'
- ],
-
- classNameBindings: [
- 'SDL.States.info.active:selected'
- ],
-
- /** Navigation components */
- childViews: [
- 'statusHome'
- ],
-
- /** Label for Home screen */
- statusHome: SDL.Label.create( {
- elementId: 'status_info_label',
- content: 'Information'
- }),
-
- actionUp: function(event) {
-
- SDL.States.goToStates(SDL.InfoController.activeState);
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/statusMediaView.js b/SDL_Core/src/components/HMI/app/view/home/statusMediaView.js
deleted file mode 100644
index 53d72b565..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/statusMediaView.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.StatusMediaView
- * @desc Component for Media Status bar
- * @category view
- * @filesource app/view/media/StatusMediaView.js
- * @version 1.0
- */
-SDL.StatusMediaView = Em.ContainerView
- .extend( {
-
- elementId: 'media_status',
-
- classNameBindings: [
- 'SDL.States.media.active:selected'
- ],
-
- /** Climate components */
- childViews: [
- 'statusHome', 'statusInfo'
- ],
-
- /** Label for Home screen */
- statusHome: SDL.Label.extend( {
- elementId: 'media_status_homestatus',
- classNameBindings: [
- 'SDL.States.home.active:visible'
- ],
- contentBinding: Ember.Binding
- .oneWay('SDL.locale.label.view_mediaStatus_entertainment')
- }),
-
- statusInfo: Em.ContainerView
- .extend( {
- elementId: 'media_status_radio_container',
-
- childViews: [
- 'info'
- ],
-
- info: Em.View
- .extend( {
- elementId: 'media_status_radio_info',
- controlerBinding: 'SDL.MediaController',
- /** Bind class for visual representation */
- classNameBindings: [
- 'SDL.States.home.active:hidden_display:visible_display'
- ],
- /** Define module layout */
- template: Em.Handlebars
- .compile('<div class="statusInfo">'
- + '<div class="station">'
- + '<span {{bindAttr class="SDL.CDModel.active:visible_display"}}>{{SDL.CDModel.statusBar}}</span>'
- + // title
- '<span {{bindAttr class="SDL.SDLAppController.model.active:visible_display"}}>{{SDL.SDLAppController.model.statusText}}</span>'
- + // SDL
- '</div>'
- + '<div class="icon cdIco"'
- + '{{bindAttr class="SDL.CDModel.active:cdIco"}}'
- + // CD
- // icon
- '{{bindAttr class="SDL.SDLAppController.model.active:appIco"}}>'
- + // SDL
- '</div>' + '</div>')
- })
- }),
- actionUp: function(event) {
-
- if (SDL.MediaController.activeState.indexOf('media.sdlmedia') >= 0) {
- SDL.SDLMediaController.activateCurrentApp();
- } else {
- SDL.States.goToStates(SDL.MediaController.activeState);
- }
- }
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/statusNavigationView.js b/SDL_Core/src/components/HMI/app/view/home/statusNavigationView.js
deleted file mode 100644
index e1d5bac3d..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/statusNavigationView.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.StatusNavigationView
- * @desc Component for Navigation Status bar
- * @category view
- * @filesource app/view/home/statusNavigationView.js
- * @version 1.0
- */
-SDL.StatusNavigationView = Em.ContainerView.extend( {
- /** View Id */
- elementId: 'status_nav',
-
- classNames: 'status_bar',
-
- /** Navigation components */
- childViews: [
- 'statusHome'
- ],
-
- /** Label for Home screen */
- statusHome: SDL.Label.create( {
- elementId: 'navigation_status_label',
- classNames: 'visible',
- content: 'Navigation'
- }),
-
- /**
- * Select phone state should be called when user press phone statusbar
- */
- actionUp: function(event) {
-
- SDL.States.goToStates('navigation');
- }
-
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/statusPhoneView.js b/SDL_Core/src/components/HMI/app/view/home/statusPhoneView.js
deleted file mode 100644
index 034d9c782..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/statusPhoneView.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.StatusPhoneView
- * @desc Phone statusbar visual representation
- * @category View
- * @filesource app/view/phone/StatusPhoneView.js
- * @version 1.0
- */
-
-SDL.StatusPhoneView = Em.ContainerView.extend( {
-
- elementId: 'status_phone',
-
- classNames: [
- 'status_bar'
- ],
-
- /** Bind class for visual representation */
- classNameBindings: [
- 'SDL.States.phone.active:selected'
- ],
-
- /** Climate components */
- childViews: [
- 'statusHome',
- ],
-
- /** Label for Home screen */
- statusHome: SDL.Label.extend( {
- elementId: 'status_phone_label',
-
- classNames: 'visible',
-
- content: 'Phone'
- }),
-
- /**
- * Select phone state should be called when user press phone statusbar
- */
- actionUp: function(event) {
-
- SDL.States.goToStates('phone.dialpad');
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/home/topControls.js b/SDL_Core/src/components/HMI/app/view/home/topControls.js
deleted file mode 100644
index 0e3508ff5..000000000
--- a/SDL_Core/src/components/HMI/app/view/home/topControls.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.ClimateView
- * @desc Climate module visual representation
- * @category View
- * @filesource app/view/climate/ClimateView.js
- * @version 1.0
- */
-
-SDL.TopControls = Em.ContainerView.extend( {
-
- elementId: 'app_top_menu_cont',
-
- childViews: [
- 'controls'
- ],
-
- controls: Em.ContainerView.extend( {
- elementId: 'top_controls',
-
- childViews: [
- 'clock'
- ],
-
- clock: Em.View.extend( {
- elementId: 'clock',
-
- template: Em.Handlebars
- .compile('<div id="time_num">1:47 86°</div>')
-
- })
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/homeView.js b/SDL_Core/src/components/HMI/app/view/homeView.js
deleted file mode 100644
index 4663996af..000000000
--- a/SDL_Core/src/components/HMI/app/view/homeView.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.HomeView
- * @desc Home screen visual representation
- * @category View
- * @filesource app/view/home/HomeView.js
- * @version 1.0
- */
-
-SDL.HomeView = Em.ContainerView.create( {
-
- classNameBindings: 'SDL.States.home.active:active_state:inactive_state',
-
- elementId: 'home'
-} );
diff --git a/SDL_Core/src/components/HMI/app/view/info/alertsView.js b/SDL_Core/src/components/HMI/app/view/info/alertsView.js
deleted file mode 100644
index 6e4e935f5..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/alertsView.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoAlertsView
- * @desc Info Alerts module visual representation
- * @category View
- * @filesource app/view/sinfo/InfoAlertsView.js
- * @version 1.0
- */
-
-SDL.InfoAlertsView = Em.ContainerView.create( {
- /** Bind class for visual representation */
- classNameBindings: [
- 'SDL.States.info.alerts.active:active_state:inactive_state'
- ],
-
- elementId: 'info_alerts',
-
- childViews: [
- 'listCaption', 'mainlist', 'rightlist'
- ],
-
- listCaption: SDL.LabelPlusToggleButton.extend( {
- elementId: 'info_alerts_listCaption',
- labelContentBinding: 'SDL.locale.label.view_info_alerts_sort',
- tButtonValue: 0,
- tButtonRange: 2,
- tButtonLabelsBinding: 'SDL.locale.label.view_info_alerts_dateIcon',
- labelDisabled: true,
- tButtonDisabled: true
- }),
-
- mainlist: SDL.List.extend( {
-
- elementId: 'info_alerts_list',
-
- itemsOnPage: 6,
-
- items: [
- {
- type: SDL.Label,
-
- params: {
- disabled: true
- }
- }, {
- type: SDL.Button,
- params: {
- classNames: [
- 'ember-view ffw-button notpressed list-item disabled active'
- ],
- textBinding: 'SDL.locale.label.view_info_alerts_911Assist',
- templateName: 'rightIcon',
- icon: 'images/info/ico_emergcyAndEnvelope.png',
- righticon: 'images/info/ico_arrowLock.png',
- disabled: true
- }
- }
- ]
- }),
-
- rightlist: SDL.List.extend( {
-
- elementId: 'info_alerts_rightList',
-
- itemsOnPage: 5,
-
- disableScrollbar: true,
-
- items: [
- {
- type: SDL.Button,
- params: {
- className: 'button',
- textBinding: 'SDL.locale.label.view_info_alerts_view',
- disabled: true
- }
- }, {
- type: SDL.Button,
- params: {
- className: 'button',
- textBinding: 'SDL.locale.label.view_info_alerts_delete',
- disabled: true
- }
- }, {
- type: SDL.Button,
- params: {
- className: 'button',
- textBinding: 'SDL.locale.label.view_info_alerts_deleteAll',
- disabled: true
- }
- }
- ]
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/info/appsView.js b/SDL_Core/src/components/HMI/app/view/info/appsView.js
deleted file mode 100644
index 39c5d97bd..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/appsView.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoAppsview
- * @desc Info Apps visual representation
- * @category View
- * @filesource app/view/info/AppsView.js
- * @version 1.0
- */
-
-SDL.InfoAppsView = Em.ContainerView
- .create( {
-
- elementId: 'info_apps',
-
- classNameBindings: [
- 'SDL.States.info.apps.active:active_state:inactive_state'
- ],
-
- childViews: [
- 'vehicleHealthReport',
- 'Asist911',
- 'installButton',
- 'findNewApps',
- 'getDeviceList',
- 'listOfApplications'
- ],
-
- /**
- * Function to add application to application list
- */
- showAppList: function() {
-
- this.get('listOfApplications.list').removeAllChildren();
-
- this.listOfApplications.list.refresh();
-
- var i, apps = SDL.SDLModel.registeredApps, appIndex;
-
- for (i = 0; i < apps.length; i++) {
-
- appIndex = SDL.SDLModel.registeredApps.indexOf(apps[i]);
-
- this.get('listOfApplications.list.childViews')
- .pushObject(SDL.Button.create( {
- action: 'onActivateSDLApp',
- target: 'SDL.SDLController',
- text: apps[i].appName + " - " + apps[i].deviceName,
- appName: apps[i].appName,
- appID: apps[i].appID,
- classNames: 'list-item button',
- iconBinding: 'SDL.SDLModel.registeredApps.' + appIndex
- + '.appIcon'
- }));
- }
-
- }.observes('SDL.SDLModel.registeredApps.@each'),
-
- vehicleHealthReport: SDL.Button
- .extend( {
- goToState: 'vehicle.healthReport',
- classNames: 'button vehicleHealthReport leftButtons',
- icon: 'images/info/ico_vehicle.png',
- textBinding: 'SDL.locale.label.view_info_apps_vehicle_VehicleHealthReport',
- elementId: 'infoAppsVehicleHealthReport',
- arrow: true,
- onDown: false
- }),
-
- Asist911: SDL.Button.extend( {
- goToState: 'help.helpAssist',
- classNames: 'button Asist911 leftButtons',
- icon: 'images/info/ico_assist.png',
- textBinding: 'SDL.locale.label.view_info_apps_911Assist',
- elementId: 'infoAppsAsist911',
- arrow: true,
- onDown: false
- }),
-
- installButton: SDL.Button
- .extend( {
- goToState: 'settings.system.installApplications',
- icon: 'images/info/ico_info_install.png',
- textBinding: 'SDL.locale.label.view_info_apps_vehicle_InstallApplicationsUp',
- elementId: 'infoAppsInstallButton',
- classNames: 'button installButton leftButtons',
- arrow: true,
- onDown: false
- }),
-
- findNewApps: SDL.Button
- .extend( {
- goToState: 'settings.system.installApplications',
- icon: 'images/sdl/new_apps.png',
- textBinding: 'SDL.locale.label.view_info_apps_vehicle_FindNewApplications',
- elementId: 'infoAppsFindNewApps',
- classNames: 'button findNewApps leftButtons',
- arrow: true,
- action: 'findNewApps',
- target: 'SDL.SDLController',
- onDown: false
- }),
-
- getDeviceList: SDL.Button
- .extend( {
- icon: 'images/sdl/devices.png',
- textBinding: 'SDL.locale.label.view_info_apps_vehicle_GetDeviceList',
- elementId: 'infoAppsGetDeviceList',
- classNames: 'button getDeviceList leftButtons',
- arrow: true,
- action: 'onGetDeviceList',
- target: 'SDL.SDLController',
- onDown: false
- }),
-
- listOfApplications: SDL.List.extend( {
-
- elementId: 'info_apps_list',
-
- itemsOnPage: 5,
-
- /** Items */
- items: new Array()
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/info/calendarView.js b/SDL_Core/src/components/HMI/app/view/info/calendarView.js
deleted file mode 100644
index 235938a90..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/calendarView.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoCalendarView
- * @desc Info Calendar module visual representation
- * @category View
- * @filesource app/view/sinfo/CalendarView.js
- * @version 1.0
- */
-
-SDL.InfoCalendarView = Em.View
- .create( {
- /** Bind class for visual representation */
- classNameBindings: [
- 'SDL.States.info.calendar.active:active_state:inactive_state'
- ],
-
- elementId: 'info_calendar',
-
- template: Ember.Handlebars
- .compile('<div class="inner-wrapper">'
- + '<div class="label-20 disabled date">{{SDL.locale.label.view_info_calendar_date}}</div>'
- +
-
- '{{view SDL.Button '
- + 'class= "today button" '
- + 'textBinding="SDL.locale.label.view_info_calendar_today" '
- + 'disabled=true '
- + '}}'
- +
-
- '<div class="day day-1">{{SDL.locale.label.view_info_calendar_day1}}</div>'
- + '<div class="day day-2">{{SDL.locale.label.view_info_calendar_day2}}</div>'
- + '<div class="day day-3">{{SDL.locale.label.view_info_calendar_day3}}</div>'
- + '<div class="day day-4">{{SDL.locale.label.view_info_calendar_day4}}</div>'
- + '<div class="day day-5">{{SDL.locale.label.view_info_calendar_day5}}</div>'
- + '<div class="day day-6">{{SDL.locale.label.view_info_calendar_day6}}</div>'
- + '<div class="day day-7 active">{{SDL.locale.label.view_info_calendar_day7}}</div>'
- +
-
- '<div class="c-btn disabled btn-1">1</div>'
- + '<div class="c-btn disabled btn-8">8</div>'
- + '<div class="c-btn disabled btn-15">15</div>'
- + '<div class="c-btn disabled btn-22">22</div>'
- + '<div class="c-btn disabled btn-29">29</div>' +
-
- '<div class="c-btn disabled btn-7">7</div>'
- + '<div class="c-btn disabled btn-14">14</div>'
- + '<div class="c-btn disabled btn-21">21</div>'
- + '<div class="c-btn disabled active btn-28">28</div>' +
-
- '<div class="c-btn disabled btn-6">6</div>'
- + '<div class="c-btn disabled btn-13">13</div>'
- + '<div class="c-btn disabled btn-20">20</div>'
- + '<div class="c-btn disabled btn-27">27</div>' +
-
- '<div class="c-btn disabled btn-5">5</div>'
- + '<div class="c-btn disabled btn-12">12</div>'
- + '<div class="c-btn disabled btn-19">19</div>'
- + '<div class="c-btn disabled btn-26">26</div>' +
-
- '<div class="c-btn disabled btn-4">4</div>'
- + '<div class="c-btn disabled btn-11">11</div>'
- + '<div class="c-btn disabled btn-18">18</div>'
- + '<div class="c-btn disabled btn-25">25</div>' +
-
- '<div class="c-btn disabled btn-3">3</div>'
- + '<div class="c-btn disabled btn-10">10</div>'
- + '<div class="c-btn disabled btn-17">17</div>'
- + '<div class="c-btn disabled btn-24">24</div>'
- + '<div class="c-btn disabled btn-31">31</div>' +
-
- '<div class="c-btn disabled btn-2">2</div>'
- + '<div class="c-btn disabled btn-9">9</div>'
- + '<div class="c-btn disabled btn-16">16</div>'
- + '<div class="c-btn disabled btn-23">23</div>'
- + '<div class="c-btn disabled btn-30">30</div>' +
-
- '</div>')
-
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/info/devicelistView.js b/SDL_Core/src/components/HMI/app/view/info/devicelistView.js
deleted file mode 100644
index 5bd6b8e68..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/devicelistView.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.DeviceListView
- * @desc Media App Options module visual representation
- * @category View
- * @filesource app/view/media/devicelistView.js
- * @version 1.0
- */
-
-SDL.DeviceListView = Em.ContainerView.create( {
-
- classNames: [
- 'info_apps_deviceList_view'
- ],
-
- classNameBindings: [
- 'SDL.States.info.devicelist.active:active_state:inactive_state'
- ],
-
- /**
- * View Id
- */
- elementId: 'info_apps_deviceList_view',
-
- /**
- * View Components
- */
- childViews: [
- 'backButton',
- 'listOfDevices',
- 'deviceListLabel',
- 'progress'
- ],
-
- /**
- * Animation of search devices progress
- */
- progress: Em.View.extend( {
- classNames: [
- 'progress'
- ],
- classNameBindings: ['SDL.SDLModel.deviceSearchProgress:progress']
- }),
-
-
- /**
- * Button to return to previous view
- */
- backButton: SDL.Button.extend( {
- classNames: [
- 'backButton', 'button'
- ],
- action: 'turnChangeDeviceViewBack',
- target: 'SDL.SDLController',
- icon: 'images/media/ico_back.png'
- }),
-
- /**
- * Label in title
- */
- deviceListLabel: SDL.Label.extend( {
-
- elementId: 'deviceListLabel',
-
- classNames: 'deviceListLabel',
-
- content: 'Change Devices'
- }),
-
- /**
- * Function calls when notification from RPC comes and creates buttons to
- * choose devices
- */
- ShowDeviceList: function(params) {
-
- this.clearDeviceList();
-
- var i, len = params.deviceList.length;
- for (i = 0; i < len; i++) {
- this.get('listOfDevices.list.childViews').pushObject(SDL.Button
- .create( {
- deviceName: params.deviceList[i].name,
- icon: params.deviceList[i].icon,
- text: params.deviceList[i].name,
- classNames: 'ffw-button notpressed list-item',
- templateName: params.deviceList[i].icon ? 'rightIcon'
- : 'text',
- action: 'onDeviceChoosed',
- target: 'SDL.SDLController',
- onDown: false,
- id: params.deviceList[i].id
- }));
- }
- },
-
- /**
- * Function calls each time when user enters Change Device menu and clear
- * all old data about devices
- */
- clearDeviceList: function() {
-
- this.get('listOfDevices.list').removeAllChildren();
- this.listOfDevices.rerender();
- },
-
- /**
- * List for option on DeviceListView screen
- */
- listOfDevices: SDL.List.extend( {
-
- elementId: 'info_apps_deviceList_list',
-
- itemsOnPage: 5,
-
- /** Items array */
- items: []
- })
-});
diff --git a/SDL_Core/src/components/HMI/app/view/info/nonMediaView.js b/SDL_Core/src/components/HMI/app/view/info/nonMediaView.js
deleted file mode 100644
index b36aab21b..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/nonMediaView.js
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoNonMedia
- * @desc NonMedia application visual representation
- * @category View
- * @filesource app/view/info/nonMedia.js
- * @version 1.0
- */
-
-SDL.InfoNonMedia = Em.ContainerView
- .create( {
-
- elementId: 'info_nonMedia',
-
- controller: SDL.SDLAppController,
-
- childViews: [
- 'content'
- ],
-
- classNameBindings: [
- 'this.activeState:active_state:inactive_state'
- ],
-
- activeState: function(){
- if (SDL.TurnByTurnView.activeTBT) {
- return false;
- } else if (SDL.States.info.nonMedia.active) {
- return true;
- } else {
- return false;
- }
- }.property('SDL.States.info.nonMedia.active', 'SDL.TurnByTurnView.activeTBT'),
-
- content: Em.ContainerView
- .extend( {
- classNames: [
- 'inner_content'
- ],
-
- childViews: [
- 'deviceName', 'image', 'fields', 'innerMenu', 'presets'
- ],
-
- /**
- * Deactivate View
- */
- deactivate: function() {
-
- SDL.States.goToStates('info.apps');
- },
-
- deviceName: SDL.Label.extend( {
-
- classNames: [
- 'app_title'
- ],
-
- contentBinding: 'SDL.SDLAppController.model.deviceName'
- }),
-
- image: Em.View
- .extend( {
-
- classNames: [
- 'app_image'
- ],
-
- template: Ember.Handlebars
- .compile('<img width="150px" {{bindAttr src="SDL.SDLAppController.model.appInfo.mainImage"}}>')
- }),
-
- fields: Em.ContainerView.extend( {
-
- classNames: [
- 'app_fields'
- ],
-
- childViews: [
- 'field1', 'field2', 'field3', 'field4'
- ],
-
- field1: SDL.Label.extend( {
- contentBinding: 'controller.model.appInfo.field1',
- attributeBindings: ["style"],
- style: function(){
- if (SDL.SDLAppController.model) {
- return SDL.SDLAppController.model.appInfo.alignment;
- } else {
- return null;
- }
- }.property("SDL.SDLAppController.model.appInfo.alignment")
- }),
-
- field2: SDL.Label.extend( {
- contentBinding: 'controller.model.appInfo.field2',
- attributeBindings: ["style"],
- style: function(){
- if (SDL.SDLAppController.model) {
- return SDL.SDLAppController.model.appInfo.alignment;
- } else {
- return null;
- }
- }.property("SDL.SDLAppController.model.appInfo.alignment")
- }),
-
- field3: SDL.Label.extend( {
- contentBinding: 'controller.model.appInfo.field3'
- }),
-
- field4: SDL.Label.extend( {
- contentBinding: 'controller.model.appInfo.field4'
- })
-
- }),
-
- innerMenu: SDL.MenuList
- .extend( {
-
- refreshItems: function() {
-
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.appID == SDL.NonMediaController.currentAppId) {
- this
- .addItems(SDL.SDLAppController.model.softButtons,
- SDL.SDLAppController.model.appID);
- }
- }
- .observes('SDL.SDLAppController.model.softButtons.@each'),
-
- groupName: "NonMediaView",
-
- content: Em.ContainerView.extend( {
-
- classNames: [
- 'content'
- ],
-
- attributeBindings: [
- 'parentView.contentPositon:style'
- ],
-
- childViews: [
- 'optionsButton'
- ],
-
- optionsButton: SDL.Button.extend( {
- text: 'Options',
-
- templateName: 'arrow',
-
- action: 'openCommandsList',
- target: 'SDL.SDLAppController'
- })
- })
- }),
-
- presets: Em.ContainerView
- .extend( {
- classNames: [
- 'presets'
- ],
-
- classNameBindings: [
- 'hidden'
- ],
-
- hidden: function() {
-
- if (SDL.SDLAppController.model) { return !Boolean(SDL.SDLAppController.model
- .get('appInfo.customPresets').length); }
-
- }
- .property('SDL.SDLAppController.model.appInfo.customPresets.@each'),
-
- childViews: [
- 'perset1',
- 'perset2',
- 'perset3',
- 'perset4',
- 'perset5',
- 'perset6',
- 'perset7',
- 'perset8'
- ],
-
- perset1: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.0',
- presetName: 'PRESET_1'
- }),
- perset2: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.1',
- presetName: 'PRESET_2'
- }),
- perset3: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.2',
- presetName: 'PRESET_3'
- }),
- perset4: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.3',
- presetName: 'PRESET_4'
- }),
- perset5: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.4',
- presetName: 'PRESET_5'
- }),
- perset6: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.5',
- presetName: 'PRESET_6'
- }),
- perset7: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.6',
- presetName: 'PRESET_7'
- }),
- perset8: SDL.Button.extend(SDL.PresetEvents, {
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.7',
- presetName: 'PRESET_8'
- })
- })
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/info/servicesView.js b/SDL_Core/src/components/HMI/app/view/info/servicesView.js
deleted file mode 100644
index f4bac6d0e..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/servicesView.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.ServicesView
- * @desc Info Services module visual representation
- * @category Info
- * @filesource app/view/ServicesView.js
- * @version 1.0
- */
-
-SDL.InfoServicesView = Em.View
- .create( {
-
- elementId: 'info_services_view',
-
- classNameBindings: [
- 'SDL.States.info.services.active:active_state:inactive_state'
- ],
-
- /** Define module template */
- template: Ember.Handlebars
- .compile('<div class="inner-content">'
- + '<div id="info_sync_services" class="info-text">{{SDL.locale.label.view_info_services_syncServices}}</div>'
- + '<div id="info_traff" class="info-text">{{SDL.locale.label.view_info_services_trafficDirectionsAndInformation}}</div>'
- + '<div id="info_traffic_report" class="info-text">{{SDL.locale.label.view_info_services_getTheLatestTrafficRreport}}</div>'
- + '<div id="info_traffic_pts" class="info-text">{{SDL.locale.label.view_info_services_findBusinessesAndDownloadSaved}}<br>{{SDL.locale.label.view_info_services_Pts}}</div>'
- + '<div id="info_traffic_hear" class="info-text">{{SDL.locale.label.view_info_services_hearPersonalizedInformationMore}}</div>'
- + '<div id="info_connect" class="info-text">{{SDL.locale.label.view_info_services_connecttoServices}}</div>'
- + '<div id="info_log" class="info-text">{{SDL.locale.label.view_info_services_toActivate}}</div>'
- + '</div>')
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/info/travelLinkView.js b/SDL_Core/src/components/HMI/app/view/info/travelLinkView.js
deleted file mode 100644
index 2bf6b90a9..000000000
--- a/SDL_Core/src/components/HMI/app/view/info/travelLinkView.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoTravelLinkView
- * @desc Info Travel Link Help module visual representation
- * @category View
- * @filesource app/view/settings/InfoTravelLinkView.js
- * @version 1.0
- */
-
-SDL.InfoTravelLinkView = Em.ContainerView
- .create( {
-
- classNameBindings: [
- 'SDL.States.info.travelLink.active:active_state:inactive_state'
- ],
-
- elementId: 'info_travelLink',
-
- childViews: [
- 'imageLogo', 'listLeft', 'listRight',
- ],
-
- imageLogo: SDL.Label.extend( {
- elementId: 'info_travelLink_logo',
- icon: 'images/info/info_travelLink_sirius_logo.png',
- templateName: 'icon'
- }),
-
- listLeft: SDL.List
- .extend( {
- elementId: 'info_travelLink_listLeft',
-
- disableScrollbar: true,
-
- itemsOnPage: 5,
-
- /** Items */
- items: [
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_trafficOnRoute',
- templateName: 'arrow',
- disabled: true
- }
-
- },
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_trafficNearby',
- templateName: 'arrow',
- disabled: true
- }
-
- },
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_fuelPrices',
- templateName: 'arrow',
- disabled: true
- }
-
- },
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_movieListings',
- templateName: 'arrow',
- disabled: true
- }
-
- },
- ]
- }),
-
- listRight: SDL.List
- .extend( {
- elementId: 'info_travelLink_listRight',
-
- disableScrollbar: true,
-
- /** Items */
- items: [
- {
-
- type: SDL.Button,
-
- params: {
-
- textBinding: 'SDL.locale.label.view_info_travelLink_subscriptionInfo',
- disabled: true
- }
-
- },
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_weather',
- templateName: 'arrow',
- disabled: true
- }
-
- },
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_sportsInfo',
- templateName: 'arrow',
- disabled: true
- }
-
- },
- {
-
- type: SDL.Button,
-
- params: {
- textBinding: 'SDL.locale.label.view_info_travelLink_skiConditions',
- templateName: 'arrow',
- disabled: true
- }
-
- }
- ]
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/infoView.js b/SDL_Core/src/components/HMI/app/view/infoView.js
deleted file mode 100644
index f5a59b706..000000000
--- a/SDL_Core/src/components/HMI/app/view/infoView.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InfoView
- * @desc Info module visual representation
- * @category Info
- * @filesource app/view/InfoView.js
- * @version 1.0
- */
-
-SDL.InfoView = Em.ContainerView.create( {
-
- elementId: 'info_view',
-
- /** Bind class for visual representation */
- classNameBindings:
- [
- 'SDL.States.info.active:active_state:inactive_state'
- ],
-
- controllerBinding: Ember.Binding.oneWay( 'SDL.InfoController' ),
-
- /** Settings components */
- childViews:
- [
- 'leftMenu',
- SDL.InfoServicesView,
- SDL.InfoTravelLinkView,
- SDL.InfoCalendarView,
- SDL.InfoAppsView,
- SDL.InfoNonMedia,
- SDL.DeviceListView
- ],
-
- /** Left menu */
- leftMenu: Em.ContainerView.extend( {
- elementId: 'info_leftMenu',
-
- classNameBindings:
- [
- 'parentView.controller.hiddenLeftMenu:hidden'
- ],
-
- classNames: 'menu-items',
-
- childViews:
- [
- 'border',
- 'items'
- ],
-
- border: Em.View.extend( {
- classNames: 'ls_border'
- } ),
-
- items: Em.ContainerView.extend( {
- classNames: 'ls-items',
-
- childViews:
- [
- 'servicesButton',
- 'travelLinkButton',
- 'calendarButton',
- 'appsButton',
- 'sdlButton'
- ],
-
- servicesButton: SDL.Button.extend( {
- elementId: 'info_leftMenu_services',
- goToState: 'services',
- classNames: 'menu-item lsp1_p',
- classNameBindings:
- [
- 'SDL.States.info.services.active:info_active'
- ],
- textBinding: 'SDL.locale.label.view_info_leftmenu_services',
- icon: 'images/info/info_leftMenu_services_ico.png',
- action: 'onState',
- target: 'SDL.InfoController'
- } ),
-
- travelLinkButton: SDL.Button.extend( {
- elementId: 'info_leftMenu_travelLink',
- goToState: 'travelLink',
- classNames: 'menu-item lsp1_p',
- classNameBindings:
- [
- 'SDL.States.info.travelLink.active:info_active'
- ],
- textBinding: 'SDL.locale.label.view_info_leftmenu_travelLink',
- icon: 'images/info/info_leftMenu_travelLink_ico.png',
- action: 'onState',
- target: 'SDL.InfoController'
- } ),
-
- alertsButton: SDL.Button.extend( {
- elementId: 'info_leftMenu_alerts',
- goToState: 'alerts',
- classNames: 'menu-item lsp1_p',
- classNameBindings:
- [
- 'SDL.States.info.alerts.active:info_active'
- ],
- textBinding: 'SDL.locale.label.view_info_leftmenu_alerts',
- icon: 'images/info/info_leftMenu_alerts_ico.png',
- action: 'onState',
- target: 'SDL.InfoController'
- } ),
-
- calendarButton: SDL.Button.extend( {
- elementId: 'info_leftMenu_calendar',
- goToState: 'calendar',
- classNames: 'menu-item lsp1_p',
- classNameBindings:
- [
- 'SDL.States.info.calendar.active:info_active'
- ],
- textBinding: 'SDL.locale.label.view_info_leftmenu_calendar',
- icon: 'images/info/info_leftMenu_calendar_ico.png',
- action: 'onState',
- target: 'SDL.InfoController'
- } ),
-
- appsButton: SDL.Button.extend( {
- elementId: 'info_leftMenu_apps',
- goToState: 'apps',
- classNames: 'menu-item lsp1_p',
- classNameBindings:
- [
- 'SDL.States.info.apps.active:info_active'
- ],
- textBinding: 'SDL.locale.label.view_info_leftmenu_apps',
- icon: 'images/info/info_leftMenu_apps_ico.png',
- action: 'onState',
- target: 'SDL.InfoController'
- } ),
-
- sdlButton: SDL.Button.extend( {
- elementId: 'info_leftMenu_sdl',
- goToState: 'nonMedia',
- classNames: 'menu-item lsp1_p',
- classNameBindings:
- [
- 'SDL.States.info.nonMedia.active:info_active'
- ],
- hidden: function() {
- return !SDL.NonMediaController.currentAppId;
- }.property( 'SDL.NonMediaController.currentAppId' ),
- textBinding: 'SDL.NonMediaController.currentAppName',
- iconBinding: 'SDL.NonMediaController.currentAppIcon',
- action: 'activateCurrentApp',
- target: 'SDL.NonMediaController'
- } )
- } )
- } )
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/media/common/LeftMenuView.js b/SDL_Core/src/components/HMI/app/view/media/common/LeftMenuView.js
deleted file mode 100644
index ba4495681..000000000
--- a/SDL_Core/src/components/HMI/app/view/media/common/LeftMenuView.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.LeftMenuView
- * @desc Media Left Menu module visual representation
- * @category View
- * @filesource app/view/media/SiriusView.js
- * @version 1.0
- */
-
-SDL.LeftMenuView = Em.ContainerView.extend( {
- /** View ID */
- elementId: 'media_leftmenu',
-
- /** View components */
- childViews:
- [
- 'border',
- 'cdButton',
- 'sdlButton'
- ],
- /** Border decoration */
- border: Em.View.extend( {
- elementId: 'media_left_menu_border',
- classNames: 'ls_border'
- } ),
-
- /** CD Station Button */
- cdButton: SDL.Button.extend( {
- classNameBindings:
- [
- 'SDL.CDModel.active:active_state'
- ],
- elementId: 'media_cdButton',
- classNames: 'media-ls-item',
- action: 'turnOnCD',
- icon: 'images/media/ico_cd.png',
- target: 'SDL.MediaController',
- textBinding: Ember.Binding.oneWay( 'SDL.locale.label.view_media_cd' )
- } ),
- /** SDL Button */
- sdlButton: SDL.Button.extend( {
- classNameBindings:
- [
- 'SDL.States.media.sdlmedia.active:active_state'
- ],
- elementId: 'media_sdlButton',
- classNames: 'media-ls-item',
- hidden: function() {
- return !SDL.SDLMediaController.currentAppId;
- }.property( 'SDL.SDLMediaController.currentAppId' ),
- textBinding: 'SDL.SDLMediaController.currentAppName',
- iconBinding: 'SDL.SDLMediaController.currentAppIcon',
- action: 'activateCurrentApp',
- target: 'SDL.SDLMediaController'
- } )
-
-} );
diff --git a/SDL_Core/src/components/HMI/app/view/media/playerView.js b/SDL_Core/src/components/HMI/app/view/media/playerView.js
deleted file mode 100644
index 406a6dba4..000000000
--- a/SDL_Core/src/components/HMI/app/view/media/playerView.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.MediaPlayerView
- * @desc Media Player module visual representation
- * @category View
- * @filesource app/view/media/common/MediaPalyerView.js
- * @version 1.0
- */
-SDL.playerView = Em.View.create( {
-
- elementId: 'media_player_view_container',
-
- classNameBindings:
- [
- 'SDL.States.media.player.active:active_state:inactive_state'
- ]
-
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/media/sdl/controllsView.js b/SDL_Core/src/components/HMI/app/view/media/sdl/controllsView.js
deleted file mode 100644
index b90e29235..000000000
--- a/SDL_Core/src/components/HMI/app/view/media/sdl/controllsView.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLMediaControlls
- * @desc SDLMediaControlls visual representation
- * @category View
- * @filesource app/view/media/sdl/controllsView.js
- * @version 1.0
- */
-
-SDL.SDLMediaControlls = Em.ContainerView.create( {
-
- childViews:
- [
- 'info',
- 'Controls',
- 'tuneButtons'
- ],
-
- /**
- * Verification paramiter
- */
- sdlMediaControlls: "V2",
-
- info: Em.View.extend( {
-
- elementId: 'app_view_info',
-
- template: Em.Handlebars
- .compile( '{{#with view}}'
- + '<div class="track-info">'
- + '<div class="device">{{SDL.SDLAppController.model.deviceName}}</div>'
- + '<div class="divider_o"></div>'
- + '<div class="title textLimit" {{bindAttr style="SDL.SDLAppController.model.appInfo.alignment"}}>{{SDL.SDLAppController.model.appInfo.field1}}</div>'
- + '<div class="album textLimit" {{bindAttr style="SDL.SDLAppController.model.appInfo.alignment"}}>{{SDL.SDLAppController.model.appInfo.field2}}</div>'
- + '<div class="artist textLimit"{{bindAttr class="SDL.SDLAppController.model.mediaPreset:hidden"}}>{{SDL.SDLAppController.model.appInfo.field3}}</div>'
- + '<div class="time"{{bindAttr class="SDL.SDLAppController.model.mediaPreset:timeV2"}}>{{SDL.SDLAppController.model.appInfo.mediaClock}}</div>'
- + '<img class="cd_logo" {{bindAttr src="SDL.SDLAppController.model.appInfo.trackIcon" class="SDL.SDLAppController.model.mediaPreset:cd_logoV2"}} />'
- + '</div>' + '{{/with}}' )
- } ),
-
- Controls: Em.ContainerView.create( {
-
- elementId: 'app_view_controlls',
-
- /** View components */
- childViews:
- [
- 'PrevTrackButton',
- 'PlayButton',
- 'NextTrackButton'
- ],
-
- classNames: 'player_controlls',
-
- classNameBindings: 'SDL.SDLAppController.model.mediaPreset:player_controllsV2',
-
- PrevTrackButton: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'app_view_controlls_prev_track_button_v2',
- classNames:
- [
- 'bc-item-big',
- 'prevcd'
- ],
- classNames:
- [
- 'bc-item-big',
- 'prevcd'
- ],
- icon: 'images/media/ico_prew.png',
- presetName: 'SEEKLEFT'
- } ),
- PlayButton: SDL.Button.extend( {
- elementId: 'app_view_controlls_play_button_v2',
- classNames:
- [
- 'bc-item-big',
- 'playcd'
- ],
- presetName: 'OK',
- actionUp: function() {
- SDL.SDLController.onSoftButtonOkActionUp( this.presetName );
- },
- actionDown: function() {
- SDL.SDLController.onSoftButtonOkActionDown( this.presetName );
- },
- /**
- * Define button
- * template
- */
- template: Ember.Handlebars
- .compile( '<img class="playIcon" {{bindAttr class="SDL.SDLAppController.model.isPlaying:visible:not-visible"}} src="images/media/ico_pause.png" />'
- + '<img class="playIcon not-visible" {{bindAttr class="SDL.SDLAppController.model.isPlaying:not-visible:visible"}} src="images/media/ico-play.png" />' )
- } ),
- NextTrackButton: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'app_view_controlls_next_track_button_v2',
- classNames:
- [
- 'bc-item-big',
- 'nextcd'
- ],
- icon: 'images/media/ico_next.png',
- presetName: 'SEEKRIGHT'
- } )
- } ),
-
- tuneButtons: Em.ContainerView.create( {
-
- elementId: 'sdl_media_presetButtons',
-
- classNameBindings:
- [
- 'SDL.SDLAppController.model.mediaPreset::hidden'
- ],
-
- classNames:
- [
- 'main-preset-buttons-wraper'
- ],
-
- childViews:
- [
- 'wrapper'
- ],
-
- wrapper: Em.ContainerView.extend( {
-
- elementId: 'sdl_media_presetButtons_wrapper',
-
- classNames: 'preset-items',
-
- childViews:
- [
- '1',
- '2',
- '3',
- '4',
- '5',
- '6',
- '7',
- '8'
- ],
-
- 1: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button1',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.0',
- templateName: 'text',
- presetName: 'PRESET_1'
- } ),
- 2: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button2',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.1',
- templateName: 'text',
- presetName: 'PRESET_2'
- } ),
- 3: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button3',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.2',
- templateName: 'text',
- presetName: 'PRESET_3'
- } ),
- 4: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button4',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.3',
- templateName: 'text',
- presetName: 'PRESET_4'
- } ),
- 5: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button5',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.4',
- templateName: 'text',
- presetName: 'PRESET_5'
- } ),
- 6: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button6',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.5',
- templateName: 'text',
- presetName: 'PRESET_6'
- } ),
- 7: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button7',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.6',
- templateName: 'text',
- presetName: 'PRESET_7'
- } ),
- 8: SDL.Button.extend( SDL.PresetEvents, {
- elementId: 'sdl_media_preset_button8',
- classNames: 'preset-item',
- textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.7',
- templateName: 'text',
- presetName: 'PRESET_8'
- } )
- } )
- } )
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/media/sdlmediaView.js b/SDL_Core/src/components/HMI/app/view/media/sdlmediaView.js
deleted file mode 100644
index 78371e7ea..000000000
--- a/SDL_Core/src/components/HMI/app/view/media/sdlmediaView.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.sdlView
- * @desc SDL Media application module visual representation
- * @category View
- * @filesource app/view/media/sdlView.js
- * @version 1.0
- */
-SDL.sdlView = Em.ContainerView
- .create( {
-
- /**
- * View Id
- */
- elementId: 'sdl_view_container',
-
- classNameBindings: [
- 'this.activeState:active_state:inactive_state'
- ],
-
- activeState: function(){
- if (SDL.TurnByTurnView.activeTBT) {
- return false;
- } else if (SDL.States.media.sdlmedia.active) {
- return true;
- } else {
- return false;
- }
- }.property('SDL.States.media.sdlmedia.active', 'SDL.TurnByTurnView.activeTBT'),
-
- /**
- * View Components
- */
- childViews: [
- 'innerMenu',
- 'controlls'
- ],
-
- controlls: SDL.SDLMediaControlls,
-
- /**
- * Deactivate View
- */
- deactivate: function() {
-
- SDL.States.goToStates('info.apps');
- },
-
- innerMenu: SDL.MenuList
- .extend( {
-
- refreshItems: function() {
-
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.appID == SDL.SDLMediaController.currentAppId) {
- this.addItems(SDL.SDLAppController.model.softButtons,
- SDL.SDLAppController.model.appID);
- }
- }.observes('SDL.SDLAppController.model.softButtons.@each'),
-
- groupName: "MediaView",
-
- content: Em.ContainerView.extend( {
-
- classNames: [
- 'content'
- ],
-
- attributeBindings: [
- 'parentView.contentPositon:style'
- ],
-
- childViews: [
- 'optionsButton'
- ],
-
- optionsButton: SDL.Button.extend( {
- text: 'Options',
-
- templateName: 'arrow',
-
- action: 'openCommandsList',
- target: 'SDL.SDLAppController'
- })
- })
- })
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/mediaView.js b/SDL_Core/src/components/HMI/app/view/mediaView.js
deleted file mode 100644
index 647b59306..000000000
--- a/SDL_Core/src/components/HMI/app/view/mediaView.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.MediaView
- * @desc Media module visual representation
- * @category View
- * @filesource app/view/media/MediaView.js
- * @version 1.0
- */
-SDL.MediaView = Em.ContainerView.create( {
- /** View Id */
- elementId: 'media',
-
- classNameBindings: 'SDL.States.media.active:active_state:inactive_state',
-
- /** Media components */
- childViews:
- [
- 'leftMenu',
- SDL.playerView,
- SDL.sdlView
- ],
- /** Left Menu view component */
- leftMenu: SDL.LeftMenuView
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/navigationApp/baseNavigationView.js b/SDL_Core/src/components/HMI/app/view/navigationApp/baseNavigationView.js
deleted file mode 100644
index d0972368c..000000000
--- a/SDL_Core/src/components/HMI/app/view/navigationApp/baseNavigationView.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.BaseNavigationView
- * @desc Navigation component base screen
- * @category View
- * @filesource app/view/navigationApp/baseNavigationView.js
- * @version 1.0
- */
-SDL.BaseNavigationView = Em.ContainerView.create({
- /** View Id */
- elementId: 'baseNavigation',
-
- classNameBindings: [
- 'SDL.States.navigationApp.baseNavigation.active:active_state:inactive_state'
- ],
-
- afterRender: function() {
- this.update();
- },
-
- childViews: [
- 'mainField1',
- 'mainField2',
- 'mainField3',
- 'mainField4',
- 'mainField5',
- 'mainField6',
- 'optionsBtn'
- ],
-
- mainField1: null,
- mainField2: null,
- mainField3: null,
- mainField4: null,
- mainField5: null,
- mainField6: null,
-
- update: function(){
-
- var naviParams = SDL.SDLModel.constantTBTParams;
-
- if (naviParams) {
-
- for ( var i = 0; i < naviParams.navigationTexts.length; i++) {
- switch (naviParams.navigationTexts[i].fieldName) {
- case 'navigationText1': {
- this.set('mainField1',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'navigationText2': {
- this.set('mainField2',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'ETA': {
- this.set('mainField4', naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'totalDistance': {
- this.set('mainField5',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'navigationText': {
- this.set('mainField6',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'timeToDestination': {
- this.set('mainField3',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- default :{
- break;
- }
- }
- }
-
- if (naviParams.softButtons) {
- for ( var i = 0; i < naviParams.softButtons.length; i++) {
- this.get('childViews').pushObject(SDL.Button.create(SDL.PresetEventsCustom, {
- text: naviParams.softButtons[i].text,
- icon: naviParams.softButtons[i].image ? naviParams.softButtons[i].image.value : "",
- templateName: naviParams.softButtons[i].image ? 'rightText' : 'text',
- groupName: "NaviBase",
- classNameBindings: ['isHighlighted:isHighlighted'],
- isHighlighted: naviParams.softButtons[i].isHighlighted ? true : false,
- softButtonID: naviParams.softButtons[i].softButtonID,
- systemAction: naviParams.softButtons[i].systemAction,
- classNames: 'navButton softButton softButton' + (i + 1),
- appID: null
- }));
- }
- }
- }
- },
-
- mainField1: SDL.Label.extend({
-
- classNames: 'mainField1 mainField',
-
- contentBinding: 'SDL.SDLAppController.model.appInfo.field1'
- }),
-
- mainField2: SDL.Label.extend({
-
- classNames: 'mainField2 mainField',
-
- contentBinding: 'SDL.SDLAppController.model.appInfo.field2'
- }),
-
- mainField3: SDL.Label.extend({
-
- classNames: 'mainField3 mainField',
-
- contentBinding: 'SDL.SDLAppController.model.appInfo.field3'
- }),
-
- mainField4: SDL.Label.extend({
-
- classNames: 'mainField4 mainField',
-
- contentBinding: 'SDL.SDLAppController.model.appInfo.field4'
- }),
-
- mainField5: SDL.Label.extend({
-
- classNames: 'mainField5 mainField',
-
- contentBinding: 'parentView.mainField5'
- }),
-
- mainField6: SDL.Label.extend({
-
- classNames: 'mainField6 mainField',
-
- contentBinding: 'parentView.mainField6'
- }),
-
- optionsBtn: SDL.Button.extend({
- classNames: 'naviOptionsBtn navButton',
- text : "Options",
- action: 'openCommandsList',
- target: 'SDL.SDLAppController'
- })
-
-});
diff --git a/SDL_Core/src/components/HMI/app/view/navigationAppView.js b/SDL_Core/src/components/HMI/app/view/navigationAppView.js
deleted file mode 100644
index 29a69e190..000000000
--- a/SDL_Core/src/components/HMI/app/view/navigationAppView.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.NavigationAppView
- * @desc Navigation component
- * @category View
- * @filesource app/view/navigationAppView.js
- * @version 1.0
- */
-SDL.NavigationAppView = Em.ContainerView.create( {
- /** View Id */
- elementId: 'NavigationAppView',
-
- classNameBindings: [
- 'this.activeState:active_state:inactive_state'
- ],
-
- activeState: function(){
- if (SDL.TurnByTurnView.activeTBT) {
- return false;
- } else if (SDL.States.navigationApp.active) {
- return true;
- } else {
- return false;
- }
- }.property('SDL.States.navigationApp.active', 'SDL.TurnByTurnView.activeTBT'),
-
- childViews: [
- 'videoView',
- SDL.BaseNavigationView
- ],
-
- actionMove:function(event){
-
- SDL.SDLModel.onTouchEvent(event);
- },
-
- actionUp:function(event){
-
- SDL.SDLModel.onTouchEvent(event);
- },
-
- actionDown:function(event){
-
- SDL.SDLModel.onTouchEvent(event);
- },
-
- videoView: Ember.View.create({
- templateName: "video",
- template: Ember.Handlebars.compile('<video id="html5Player"></video>')
- })
-
-});
diff --git a/SDL_Core/src/components/HMI/app/view/navigationView.js b/SDL_Core/src/components/HMI/app/view/navigationView.js
deleted file mode 100644
index bdb4b6ded..000000000
--- a/SDL_Core/src/components/HMI/app/view/navigationView.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.NavigationView
- * @desc Navigation component
- * @category View
- * @filesource app/view/navigationView.js
- * @version 1.0
- */
-SDL.NavigationView = Em.ContainerView.create( {
- /** View Id */
- elementId: 'navigationView',
-
- classNameBindings: [
- 'SDL.States.navigation.active:active_state:inactive_state'
- ],
-
- childViews:
- [
- 'windowText'
- ],
-
-
- windowText: SDL.Label.extend( {
-
- classNames: 'windowText',
-
- content: 'Navigation'
- } )
-
-});
diff --git a/SDL_Core/src/components/HMI/app/view/phone/dialpadView.js b/SDL_Core/src/components/HMI/app/view/phone/dialpadView.js
deleted file mode 100644
index 0290750d0..000000000
--- a/SDL_Core/src/components/HMI/app/view/phone/dialpadView.js
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.DialpadPhoneView
- * @desc Phone Dialpad module visual representation
- * @category View
- * @filesource app/view/phone/DialpadView.js
- * @version 1.0
- */
-
-SDL.DialpadPhoneView = Em.ContainerView.create( {
-
- elementId: 'phone_dialpad',
-
- classNameBindings: 'SDL.States.phone.dialpad.active:active_state:inactive_state',
-
- childViews:
- [
- 'number',
- 'keypad',
- 'deleteButton',
- 'dialButton',
- 'endButton'
- ],
-
- /** Number area */
- number: SDL.Label.extend( {
- elementId: 'phone_dialpad_number',
-
- contentBinding: Em.Binding.oneWay( 'SDL.PhoneController.model.dialpadNumber' )
- } ),
-
- /** Keypad block */
- keypad: Em.ContainerView.extend( {
- elementId: 'phone_dialpad_keypad',
-
- childViews:
- [
- 'key1',
- 'key2',
- 'key3',
- 'key4',
- 'key5',
- 'key6',
- 'key7',
- 'key8',
- 'key9',
- 'key0',
- 'keyStar',
- 'keyDiez'
- ],
-
- key1: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key1',
-
- classNames: 'left',
-
- text: '1'
- } ),
-
- key2: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key2',
-
- classNames: 'center',
-
- text: '2'
- } ),
-
- key3: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key3',
-
- classNames: 'right',
-
- text: '3'
-
- } ),
-
- key4: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key4',
-
- classNames: 'left',
-
- text: '4'
- } ),
-
- key5: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key5',
-
- classNames: 'center',
-
- text: '5'
- } ),
-
- key6: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key6',
-
- classNames: 'right',
-
- text: '6'
- } ),
-
- key7: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key7',
-
- classNames: 'left',
-
- text: '7'
- } ),
-
- key8: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key8',
-
- classNames: 'center',
-
- text: '8'
- } ),
-
- key9: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key9',
-
- classNames: 'right',
-
- text: '9'
- } ),
-
- key0: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_key0',
-
- classNames: 'center',
-
- text: '0'
- } ),
-
- keyStar: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_keyStar',
-
- classNames: 'left',
-
- text: '*'
- } ),
-
- keyDiez: SDL.Button.extend( {
- elementId: 'phone_dialpad_keypad_keyDiez',
-
- classNames: 'right',
-
- text: '#'
- } )
- } ),
-
- deleteButton: SDL.Button.extend( {
- elementId: 'phone_dialpad_deleteButton',
-
- classNameBindings:
- [
- 'SDL.PhoneController.model.dialpadNumber.length:show'
- ],
-
- icon: 'images/phone/del.png',
-
- action: 'onDelete',
- target: 'SDL.PhoneController',
-
- disabledBinding: Em.Binding.oneWay( 'SDL.PhoneController.model.onCall' )
- } ),
-
- dialButton: SDL.Button.extend( {
- elementId: 'phone_dialpad_dialButton',
-
- textBinding: Em.Binding.oneWay( 'SDL.locale.label.view_phone_dial' ),
- icon: 'images/phone/dial.png',
-
- action: 'onDialCall',
- target: 'SDL.PhoneController',
-
- disabledBinding: Em.Binding.oneWay( 'SDL.PhoneController.model.onCall' )
- } ),
-
- endButton: SDL.Button.extend( {
- elementId: 'phone_dialpad_endButton',
-
- textBinding: Em.Binding.oneWay( 'SDL.locale.label.view_phone_end' ),
- icon: 'images/phone/end.png',
-
- action: 'onEndCall',
- target: 'SDL.PhoneController',
-
- disabledBinding: Em.Binding.oneWay( 'SDL.PhoneController.model.readyForCall' )
- } )
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/phoneView.js b/SDL_Core/src/components/HMI/app/view/phoneView.js
deleted file mode 100644
index ec3413eb7..000000000
--- a/SDL_Core/src/components/HMI/app/view/phoneView.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PhoneView
- * @desc Phone module visual representation
- * @category View
- * @filesource app/view/phone/PhoneView.js
- * @version 1.0
- */
-
-SDL.PhoneView = Em.ContainerView.create( {
-
- elementId: 'phone',
-
- /** Bind class for visual representation */
- classNameBindings: [
- 'SDL.States.phone.active:active_state:inactive_state'
- ],
-
- /** Initial phone components */
- childViews: [
- 'menu', SDL.DialpadPhoneView
- ],
-
- /** Left menu */
- menu: Em.ContainerView.extend( {
- elementId: 'phone_menu',
-
- // classNameBindings: ['SDL.PhoneController.hideMenu:hide'],
-
- childViews: [
- 'border', 'items'
- ],
-
- border: Em.View.extend( {
- classNames: 'ls_border',
-
- template: Ember.Handlebars
- .compile('<img class="bg" src="images/common/ls_border.png">')
- }),
-
- items: Em.ContainerView.extend( {
- classNames: 'ls-items',
-
- childViews: [
- 'dialpadButton'
- ],
-
- dialpadButton: SDL.Button.extend( {
- elementId: 'phone_menu_dialpadButton',
-
- classNames: 'ls-item lsp1_p active_in_helpmode',
- classNameBindings: [
- 'SDL.States.phone.dialpad.active:phone_active'
- ],
- textBinding: Em.Binding
- .oneWay('SDL.locale.label.view_phone_phone'),
- icon: 'images/phone/ico_phone.png',
- action: 'subState',
- target: 'SDL.PhoneController',
-
- stateName: 'dialpad'
- })
- })
- }),
-
- /** End call message window */
- endCallMessage: SDL.Label.extend( {
- elementId: 'phone_endCallMessage',
-
- contentBinding: Em.Binding
- .oneWay('SDL.locale.label.view_phone_popUp_callEnded')
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/AlertPopUp.js b/SDL_Core/src/components/HMI/app/view/sdl/AlertPopUp.js
deleted file mode 100644
index de4502974..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/AlertPopUp.js
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.AlertPopUp
- * @desc AlertPopUp module visual representation
- * @category View
- * @filesource app/view/sdl/AlertPopUp.js
- * @version 1.0
- */
-
-SDL.AlertPopUp = Em.ContainerView.create({
-
- elementId: 'AlertPopUp',
-
- classNames: 'AlertPopUp',
-
- classNameBindings:
- [
- 'active:AlertActive'
- ],
-
- childViews:
- [
- 'applicationName',
- 'image',
- 'message1',
- 'message2',
- 'message3',
- 'softbuttons',
- 'progressIndicatorView'
- ],
-
- /**
- * Id of current request
- *
- * @type {Number}
- */
- alertRequestId: null,
-
- content1: 'Title',
-
- content2: 'Text',
-
- active: false,
-
- timer: null,
-
- timeout: null,
-
- progressIndicator: false,
-
- /**
- * Wagning image on Alert PopUp
- */
- image: Em.View.extend({
- elementId: 'alertPopUpImage',
-
- classNames: 'alertPopUpImage'
- }),
-
- /**
- * Wagning image on Alert PopUp
- */
- progressIndicatorView: Em.View.extend({
- elementId: 'progressIndicator',
-
- classNameBindings: 'this.parentView.progressIndicator:progressIndicator'
- }),
-
- applicationName: SDL.Label.extend({
-
- elementId: 'applicationName',
-
- classNames: 'applicationName',
-
- contentBinding: 'parentView.appName'
- }),
-
- message1: SDL.Label.extend({
-
- elementId: 'message1',
-
- classNames: 'message1',
-
- contentBinding: 'parentView.content1'
- }),
-
- message2: SDL.Label.extend({
-
- elementId: 'message2',
-
- classNames: 'message2',
-
- contentBinding: 'parentView.content2'
- }),
-
- message3: SDL.Label.extend({
-
- elementId: 'message3',
-
- classNames: 'message3',
-
- contentBinding: 'parentView.content3'
- }),
-
- /**
- * Deactivate PopUp
- */
- deactivate: function() {
- this.set('active', false);
- clearTimeout(this.timer);
-
- SDL.SDLController.alertResponse(SDL.SDLModel.resultCode['SUCCESS'], this.alertRequestId);
-
- SDL.SDLController.onSystemContextChange();
- },
-
- /**
- * Container for softbuttons
- */
- softbuttons: Em.ContainerView.extend({
-
- childViews:
- [
- 'buttons'
- ],
-
- buttons: Em.ContainerView.extend({
- elementId: 'alertSoftButtons',
-
- classNames: 'alertSoftButtons'
- })
- }),
-
- /**
- * @desc Function creates Soft Buttons on AlertPoUp
- * @param {Object} params
- */
- addSoftButtons: function(params, appID) {
-
- this.softbuttons.buttons.removeAllChildren();
- this.softbuttons.buttons.rerender();
-
- if(params){
-
- var softButtonsClass;
- switch(params.length){
- case 1:
- softButtonsClass = 'one';
- break;
- case 2:
- softButtonsClass = 'two';
- break;
- case 3:
- softButtonsClass = 'three';
- break;
- case 4:
- softButtonsClass = 'four';
- break;
- }
-
- for(var i = 0; i < params.length; i++){
- this.get('softbuttons.buttons.childViews')
- .pushObject(SDL.Button.create(SDL.PresetEventsCustom, {
- systemAction: params[i].systemAction,
- groupName: "AlertPopUp",
- classNameBindings: ['isHighlighted:isHighlighted'],
- isHighlighted: params[i].isHighlighted ? true : false,
- softButtonID: params[i].softButtonID,
- icon: params[i].image ? params[i].image.value : "",
- text: params[i].text,
- classNames: 'list-item softButton ' + softButtonsClass,
- elementId: 'softButton' + i,
- templateName: params[i].image ? 'rightText' : 'text',
- appID: appID
- }));
- }
- }
- },
-
- AlertActive: function(message, alertRequestId) {
- var self = this;
-
- this.set('alertRequestId', alertRequestId);
-
- this.addSoftButtons(message.softButtons, message.appID);
-
- this.set('progressIndicator', message.progressIndicator);
-
- this.set('appName', SDL.SDLController.getApplicationModel(message.appID).appName);
-
- for (var i = 0; i < message.alertStrings.length; i++) {
- switch (message.alertStrings[i].fieldName) {
- case 'alertText1': {
- this.set('content1', message.alertStrings[i].fieldText);
- break;
- }
- case 'alertText2': {
- this.set('content2', message.alertStrings[i].fieldText);
- break;
- }
- case 'alertText3': {
- this.set('content3', message.alertStrings[i].fieldText);
- break;
- }
- }
- }
-
- this.set('active', true);
- this.set('timeout', message.duration);
- SDL.SDLController.onSystemContextChange();
-
- clearTimeout(this.timer);
- this.timer = setTimeout(function() {
- self.deactivate();
- }, message.duration);
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/AudioPassThruPopUp.js b/SDL_Core/src/components/HMI/app/view/sdl/AudioPassThruPopUp.js
deleted file mode 100644
index 3900ee35a..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/AudioPassThruPopUp.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.AudioPassThruPopUp
- * @desc AudioPassThruPopUp module visual representation
- * @category View
- * @filesource app/view/sdl/AudioPassThruPopUp.js
- * @version 1.0
- */
-
-SDL.AudioPassThruPopUp = Em.ContainerView.create( {
-
- elementId: 'AudioPassThruPopUp',
-
- classNames: 'AudioPassThruPopUp',
-
- classNameBindings:
- [
- 'activate:AudioPassThruActive'
- ],
-
- childViews:
- [
- 'applicationName',
- 'image',
- 'message1',
- 'message2',
- 'message3',
- 'buttonRetry',
- 'buttonDone',
- 'buttonCancel'
- ],
-
- content1: 'Title',
-
- content2: 'Text',
-
- activateBinding: 'SDL.SDLModel.AudioPassThruState',
-
- timer: null,
-
- applicationName: SDL.Label.extend( {
-
- elementId: 'AudioPassThruPopUpApplicationName',
-
- classNames: 'applicationName',
-
- contentBinding: 'parentView.appName'
- } ),
-
- /**
- * Wagning image on Alert PopUp
- */
- image: Em.View.extend( {
- elementId: 'audioPassThruImage',
-
- classNames: 'audioPassThruImage'
- } ),
-
- message1: SDL.Label.extend( {
-
- elementId: 'AudioPassThruPopUpMessage1',
-
- classNames: 'message1',
-
- contentBinding: 'parentView.content1'
- } ),
-
- message2: SDL.Label.extend( {
-
- elementId: 'AudioPassThruPopUpMessage2',
-
- classNames: 'message2',
-
- contentBinding: 'parentView.content2'
- } ),
-
- message3: SDL.Label.extend( {
-
- elementId: 'AudioPassThruPopUpMessage3',
-
- classNames: 'message3',
-
- contentBinding: 'parentView.content3'
- } ),
-
- buttonRetry: SDL.Button.create( {
- elementId: 'AudioPassThruPopUpButtonRetry',
- classNames: 'buttonRetry softButton',
- text: 'Retry',
- responseResult: SDL.SDLModel.resultCode['RETRY'],
- actionUp: function() {
- SDL.SDLController.callPerformAudioPassThruPopUpErrorResponse( this );
- }
- } ),
-
- buttonDone: SDL.Button.create( {
- elementId: 'AudioPassThruPopUpButtonDone',
- classNames: 'buttonDone softButton',
- text: 'Done',
- responseResult: SDL.SDLModel.resultCode['SUCCESS'],
- actionUp: function() {
- SDL.SDLController.callPerformAudioPassThruPopUpResponse( this );
- }
- } ),
-
- buttonCancel: SDL.Button.create( {
- elementId: 'AudioPassThruPopUpButtonCancel',
- classNames: 'buttonCancel softButton',
- text: 'Cancel',
- responseResult: SDL.SDLModel.resultCode['ABORTED'],
- actionUp: function() {
- SDL.SDLController.callPerformAudioPassThruPopUpErrorResponse( this );
- }
- } ),
-
- /**
- * Method clears PopUp's timer when activity flag become false, and show
- * PopUp with data come from SDLCorel when activity flag become true
- */
- AudioPassThruActivity: function() {
-
- if( this.activate ){
-
- var self = this, data = SDL.SDLModel.AudioPassThruData;
-
- this.set( 'appName', SDL.SDLController.getApplicationModel( data.appID ).appName );
-
- for (var i = 0; i < data.audioPassThruDisplayTexts.length; i++) {
- switch (data.audioPassThruDisplayTexts[i].fieldName) {
- case 'audioPassThruDisplayText1': {
- this.set('content1', data.audioPassThruDisplayTexts[i].fieldText);
- break;
- }
- case 'audioPassThruDisplayText2': {
- this.set('content2', data.audioPassThruDisplayTexts[i].fieldText);
- break;
- }
- }
- }
-
- clearTimeout( this.timer );
- this.timer = setTimeout( function() {
- SDL.SDLController.performAudioPassThruResponse( SDL.SDLModel.resultCode["SUCCESS"] );
- }, data.maxDuration );
- }else{
- if( this.timer ){
- clearTimeout( this.timer );
- }
- }
-
- SDL.SDLController.onSystemContextChange();
- }.observes( 'activate' )
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/ExitAppView.js b/SDL_Core/src/components/HMI/app/view/sdl/ExitAppView.js
deleted file mode 100644
index 920f5f36d..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/ExitAppView.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.ExitApp
- * @desc Exit All Applications reason select visual representation
- * @category View
- * @filesource app/view/sdl/ExitAppView.js
- * @version 1.0
- */
-
-SDL.ExitApp = Em.ContainerView.create( {
-
- elementId: 'exitAppView',
-
- classNames: 'exitAppView',
-
- classNameBindings:
- [
- 'active'
- ],
-
- childViews:
- [
- 'exitAppViewLabel',
- 'exitAppViewTitle',
- 'exitAppViewSelect'
- ],
-
- /**
- * Title of VehicleInfo PopUp view
- */
- exitAppViewLabel: SDL.Label.extend( {
-
- elementId: 'exitAppViewLabel',
-
- classNames: 'exitAppViewLabel',
-
- content: 'Exit Application'
- } ),
-
- /**
- * Property indicates the activity state of TBTClientStateView
- */
- active: false,
-
- /**
- * Title of tbtClientState group of parameters
- */
- exitAppViewTitle: SDL.Label.extend( {
-
- elementId: 'exitAppViewTitle',
-
- classNames: 'exitAppViewTitle',
-
- content: 'Exit Application reason'
- } ),
-
- /**
- * HMI element Select with parameters of TBTClientStates
- */
- exitAppViewSelect: Em.Select.extend( {
-
- elementId: 'exitAppViewSelect',
-
- classNames: 'exitAppViewSelect',
-
- contentBinding: 'SDL.SDLModel.exitAppState',
-
- optionValuePath: 'content.id',
-
- optionLabelPath: 'content.name',
-
- /**
- * Selected data sent on model for further processing
- */
- click: function() {
-
- SDL.SDLController.exitAppViewSelected( this.selection.name );
-
- }
- } ),
-
- /**
- * Trigger function that activates and deactivates tbtClientStateView
- */
- toggleActivity: function() {
- this.toggleProperty( 'active' );
- SDL.SDLController.onSystemContextChange();
- }
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/TTSPopUp.js b/SDL_Core/src/components/HMI/app/view/sdl/TTSPopUp.js
deleted file mode 100644
index 0fb11eeb5..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/TTSPopUp.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.TTSPopUp
- * @desc TTSPopUp module visual representation
- * @category View
- * @filesource app/view/sdl/TTSPopUp.js
- * @version 1.0
- */
-
-SDL.TTSPopUp = Em.ContainerView.create( {
-
- elementId: 'TTSPopUp',
-
- classNames: 'TTSPopUp',
-
- classNameBindings: [
- 'active'
- ],
-
- childViews: [
- 'popUp', 'message'
- ],
-
- requestId: null,
-
- content: 'Messaage',
-
- active: false,
-
- timer: null,
-
- popUp: Ember.TextArea.extend( {
-
- elementId: 'popUp',
-
- classNames: 'popUp',
-
- valueBinding: 'parentView.content'
- }),
-
- message: SDL.Label.extend( {
-
- elementId: 'message',
-
- classNames: 'message'
- }),
-
- ActivateTTS: function(msg) {
-
- var self = this;
-
- //this.requestId = id;
-
- this.set('content', msg);
- this.set('active', true);
-
- clearTimeout(this.timer);
- this.timer = setTimeout(function() {
-
- self.DeactivateTTS();
- }, 2000); // 2 second timeout for TTS popUp
- FFW.TTS.Started();
- },
-
- DeactivateTTS: function() {
- clearTimeout(this.timer);
- this.set('active', false);
- SDL.SDLController.TTSResponseHandler();
- FFW.TTS.Stopped();
- },
-
- /**
- * This event triggered when component is placed to document DOM structure
- */
- didInsertElement: function() {
-
- this._super();
-
- //FFW.TTS.set('isReady', true);
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/VRHelpListView.js b/SDL_Core/src/components/HMI/app/view/sdl/VRHelpListView.js
deleted file mode 100644
index 879ff0f79..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/VRHelpListView.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InteractionChoicesView
- * @desc Interaction Choices visual representation
- * @category View
- * @filesource app/view/sdl/shared/interactionChoicesView.js
- * @version 1.0
- */
-
-SDL.VRHelpListView = SDL.SDLAbstractView.create( {
-
- elementId: 'vr_help_list_view',
-
- childViews: [
- 'backButton', 'captionText', 'helpList'
- ],
-
- helpList: SDL.List.extend( {
- elementId: 'vr_help_list_view_list',
- itemsOnPage: 5,
- items: []
- }),
-
- /**
- * Deactivate window
- */
- deactivate: function() {
-
- this._super();
-
- SDL.SDLController.VRMove();
- SDL.SDLController.onSystemContextChange();
- },
-
- /**
- * Clean choices caption and list before new proform
- */
- clean: function() {
-
- this.set('captionText.content', 'vrHelp');
- this.helpList.items = [];
- this.helpList.list.refresh();
- },
-
- /**
- * Update choises list with actual set id
- *
- * @param data:
- * Array
- */
- showVRHelp: function(vrHelpTitle, vrHelp) {
-
- this.clean();
-
- this.set('active', true);
-
- SDL.SDLController.VRMove();
-
- if (vrHelpTitle) {
- this.captionText.set('content', vrHelpTitle);
- }
-
- if (vrHelp) {
- for (i = 0; i < vrHelp.length; i++) {
- this.helpList.items.push( {
- type: SDL.Label,
- params: {
- content: vrHelp[i].text,
- icon: vrHelp[i].image
- ? vrHelp[i].image.value : null,
- templateName: vrHelp[i].image ? "icon" : null
- }
- });
- }
- }
-
- this.helpList.list.refresh();
- SDL.SDLController.onSystemContextChange();
- }
-});
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/VRPopUp.js b/SDL_Core/src/components/HMI/app/view/sdl/VRPopUp.js
deleted file mode 100644
index 0bf6bd7e6..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/VRPopUp.js
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.VRPopUp
- * @desc VRPopUp module visual representation
- * @category View
- * @filesource app/view/sdl/VRPopUp.js
- * @version 1.0
- */
-
-SDL.VRPopUp = Em.ContainerView.create( {
-
- elementId: 'VRPopUp',
-
- classNames: 'VRPopUp',
-
- classNameBindings:
- [
- 'SDL.SDLModel.VRActive:active',
- 'SDL.SDLModel.VRHelpListActivated:move'
- ],
-
- childViews:
- [
- 'popUp',
- 'VRLabel',
- 'VRImage',
- 'listOfCommands'
- ],
-
- VRImage: Em.View.extend( {
-
- elementId: 'VRImage',
-
- classNames: 'VRImage'
- } ),
-
- VRLabel: SDL.Label.extend( {
-
- elementId: 'VRLabel',
-
- classNames: 'VRLabel',
-
- content: 'Speak the command'
- } ),
-
- VRActiveBinding: 'SDL.SDLModel.VRActive',
-
- popUp: Em.View.extend( {
-
- elementId: 'popUp',
-
- classNames: 'popUp'
- } ),
-
- AddCommand: function( commandID, vrCommands, appID ) {
-
- for( var j = 0; j < vrCommands.length; j++ ){
- this.get( 'listOfCommands.list.childViews' ).pushObject( SDL.Button.create( {
- action: 'onVRCommand',
- target: 'SDL.SDLAppController',
- appID: appID,
- commandID: commandID,
- text: vrCommands[j],
- classNames: 'list-item',
- templateName: 'text'
- } ) );
- }
-
- },
-
- DeleteCommand: function( commandID ) {
-
- this.get( 'listOfCommands.list.childViews' ).removeObjects( this.get( 'listOfCommands.list.childViews' ).filterProperty( 'commandID', commandID ) );
-
- },
-
- AddActivateApp: function( AppName, appID ) {
-
- this.get( 'listOfCommands.list.childViews' ).pushObject( SDL.Button.create( {
- action: 'onActivateSDLApp',
- target: 'SDL.SDLController',
- appID: appID,
- text: AppName,
- classNames: 'list-item',
- templateName: 'text'
- } ) );
-
- },
-
- DeleteActivateApp: function( appID ) {
-
- this.get( 'listOfCommands.list.childViews' ).removeObjects( this.get( 'listOfCommands.list.childViews' ).filterProperty( 'appID', appID ) );
-
- },
-
- /**
- * List for option on SDLOptionsView screen
- */
- listOfCommands: SDL.List.extend( {
-
- elementId: 'VR_list',
-
- itemsOnPage: 5,
-
- /** Items array */
- items: [
- {
- type: SDL.Button,
- params: {
- //templateName: template,
- text: 'Help',
- target: 'SDL.SDLController',
- action: 'vrHelpAction',
- onDown: false
- }
- }
- ]
- } ),
-
- // deactivate VR on change application state
- onStateChange: function() {
- if (this.VRActive) {
- FFW.VR.Started();
- this.set( 'VRActive', false );
- } else {
- FFW.VR.Stopped();
- }
- }.observes('SDL.TransitionIterator.ready'),
-
- onActivate: function() {
- SDL.SDLController.VRMove();
- SDL.SDLController.onSystemContextChange();
- if (this.VRActive) {
- FFW.VR.Started();
- } else {
- FFW.VR.Stopped();
- }
- }.observes('this.VRActive'),
-
- /**
- * This event triggered when component is placed to
- * document DOM structure
- */
- didInsertElement: function() {
- this._super();
-
- //FFW.VR.set( 'isReady', true );
- }
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/VehicleInfoView.js b/SDL_Core/src/components/HMI/app/view/sdl/VehicleInfoView.js
deleted file mode 100644
index 541d07105..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/VehicleInfoView.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.VehicleInfo
- * @desc VehicleInfo module visual representation
- * @category View
- * @filesource app/view/sdl/VehicleInfo.js
- * @version 1.0
- */
-
-SDL.VehicleInfo = Em.ContainerView.create( {
-
- elementId: 'VehicleInfo',
-
- classNames: 'VehicleInfo',
-
- classNameBindings:
- [
- 'active'
- ],
-
- childViews:
- [
- 'prndl',
- 'vehicleInfoLabel',
- 'prndlSelect',
- 'ecu1Title',
- 'ecu1',
- 'ecu2',
- 'ecu1Data',
- 'ecu2Data'
-
- ],
-
- /**
- * Label with stored data in VehicleInfo model
- */
- ecu2Data: SDL.Label.extend( {
-
- elementId: 'ecu2Data',
-
- classNames: 'ecu2Data',
-
- contentBinding: 'SDL.SDLVehicleInfoModel.ecuDIDData.1.data'
- } ),
-
- /**
- * Label with stored data in VehicleInfo model
- */
- ecu1Data: SDL.Label.extend( {
-
- elementId: 'ecu1Data',
-
- classNames: 'ecu1Data',
-
- contentBinding: 'SDL.SDLVehicleInfoModel.ecuDIDData.0.data'
- } ),
-
- /**
- * Label with name of some parameter stored data in VehicleInfo model
- */
- ecu2: SDL.Label.extend( {
-
- elementId: 'ecu2',
-
- classNames: 'ecu2',
-
- content: 'ECU 2:'
- } ),
-
- /**
- * Label with name of some parameter stored data in VehicleInfo model
- */
- ecu1: SDL.Label.extend( {
-
- elementId: 'ecu1',
-
- classNames: 'ecu1',
-
- content: 'ECU 1:'
- } ),
-
- /**
- * Title of ecu group of parameters stored data in VehicleInfo model
- */
- ecu1Title: SDL.Label.extend( {
-
- elementId: 'ecu1Title',
-
- classNames: 'ecu1Title',
-
- content: 'ECU'
- } ),
-
- /**
- * Title of VehicleInfo PopUp view
- */
- vehicleInfoLabel: SDL.Label.extend( {
-
- elementId: 'vehicleInfoLabel',
-
- classNames: 'vehicleInfoLabel',
-
- content: 'Vehicle Information'
- } ),
-
- /**
- * Property indicates the activity state of VehicleInfo PopUp
- */
- active: false,
-
- /**
- * Title of prndl group of parameters stored in VehicleInfo model
- */
- prndl: SDL.Label.extend( {
-
- elementId: 'prndl',
-
- classNames: 'prndl',
-
- content: 'PRNDL'
- } ),
-
- /**
- * HMI element Select with parameters of transmission state from VehicleInfo
- * Model
- */
- prndlSelect: Em.Select.extend( {
-
- elementId: 'prndlSelect',
-
- classNames: 'prndlSelect',
-
- contentBinding: 'SDL.SDLVehicleInfoModel.vehicleInfoPRNDL',
-
- valueBinding: 'SDL.SDLVehicleInfoModel.prndlSelectState'
- } ),
-
- /**
- * Trigger function that activates and deactivates VehicleInfo PopUp
- */
- toggleActivity: function() {
- this.set( 'active', !this.active );
- SDL.SDLController.onSystemContextChange();
- },
-
- /**
- * This event triggered when component is placed to
- * document DOM structure
- */
- didInsertElement: function() {
- this._super();
-
- //FFW.VehicleInfo.set( 'isReady', true );
- }
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/driverDistraction.js b/SDL_Core/src/components/HMI/app/view/sdl/driverDistraction.js
deleted file mode 100644
index e2f57105c..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/driverDistraction.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.DriverDistraction
- * @desc DriverDistractionPopUp module visual representation
- * @category View
- * @filesource app/view/sdl/driverDistraction.js
- * @version 1.0
- */
-
-SDL.DriverDistraction = Em.ContainerView.create( {
-
- elementId: 'driverDistraction',
-
- classNames: 'driverDistractionWindow',
-
- classNameBindings:
- [
- 'active'
- ],
-
- childViews:
- [
- 'driverDistractionPopUp',
- 'driverDistractionText'
- ],
-
- content: 'Not accessible while driving',
-
- active: false,
-
- driverDistractionPopUp: Em.View.create( {
-
- classNames: 'driverDistraction'
- } ),
-
- driverDistractionText: SDL.Label.extend( {
-
- elementId: 'driverDistractionText',
-
- classNames: 'driverDistractionText',
-
- contentBinding: 'parentView.content'
- } ),
-
- activate: function() {
- this.set( 'active', true );
- setTimeout( function() {
- SDL.DriverDistraction.deactivate();
- }, 3000 );
-
- SDL.SDLController.onSystemContextChange();
- },
-
- deactivate: function() {
- this.set( 'active', false );
-
- SDL.SDLController.onSystemContextChange();
- }
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/AbstractView.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/AbstractView.js
deleted file mode 100644
index 0294c1773..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/AbstractView.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SDLAbstractView
- * @desc SDL application abstract shared view
- * @category View
- * @filesource app/view/sdl/shared/AbstractView.js
- * @version 1.0
- */
-
-SDL.SDLAbstractView = Em.ContainerView.extend( {
-
- classNames:
- [
- 'sdl-window'
- ],
-
- classNameBindings:
- [
- 'active:active_state:inactive_state'
- ],
-
- active: false,
-
- caption: 'Caption Text',
-
- /**
- * Activate window and set caption text
- *
- * @param text: String
- */
- activate: function( text ) {
- if( text ){
- this.set( 'caption', text );
- }
- this.set( 'active', true );
- },
-
- /**
- * Deactivate window
- */
- deactivate: function() {
- this.set( 'active', false );
- },
-
- onStateChange: function() {
- if( this.active ){
- this.deactivate();
- }
- }.observes( 'SDL.TransitionIterator.ready' ),
-
- backButton: SDL.Button.extend( {
- classNames:
- [
- 'back-button'
- ],
- target: 'this.parentView',
- action: 'deactivate',
- icon: 'images/media/ico_back.png',
- onDown: false
- } ),
-
- captionText: SDL.Label.extend( {
- classNames:
- [
- 'caption-text'
- ],
-
- contentBinding: 'this.parentView.caption'
- } )
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js
deleted file mode 100644
index 16ffe89ee..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.InteractionChoicesView
- * @desc Interaction Choices visual representation
- * @category View
- * @filesource app/view/sdl/shared/interactionChoicesView.js
- * @version 1.0
- */
-
-SDL.InteractionChoicesView = SDL.SDLAbstractView.create({
-
- elementId: 'perform_interaction_view',
-
- childViews: [
- 'backButton',
- 'captionText',
- 'listOfChoices',
- 'input',
- 'listWrapper'
- ],
-
- didInsertElement: function(){
-
- SDL.SDLModel.interactionListWrapper = new iScroll('listWrapper', { hideScrollbar:false, hScrollbar: true, vScrollbar: true, hScroll: true, vScroll: true });
- },
-
- backButton: SDL.Button.extend({
- classNames: [
- 'back-button'
- ],
- target: 'SDL.SDLController',
- action: 'InteractionChoicesDeactivate',
- icon: 'images/media/ico_back.png',
- onDown: false
- }),
-
- input: Ember.TextArea.extend({
- classNameBindings: ['this.parentView.search::hide'],
- tagName: 'input',
- attribute: ['type:text'],
- attributeBindings: ['disabled'],
- disabled: false,
- click: function(){
- SDL.SDLModel.uiShowKeyboard(this);
- },
- search: function(){
- this.get('parentView').deactivate("SUCCESS");
- }
- }),
-
- listWrapper: Em.ContainerView.extend({
-
- classNameBindings: ['this.parentView.icon::hide'],
-
- elementId: 'listWrapper',
-
- classNames: 'listWrapper',
-
- childViews: [
- 'naviChoises'
- ],
-
- naviChoises: Em.ContainerView.extend({
- classNames: 'naviChoises',
- childViews: [
- 'captionText'
- ],
-
- captionText: SDL.Label.extend({
-
- classNameBindings: ['this.parentView.search:hide'],
- classNames: ['caption-text'],
- contentBinding: 'this.parentView.caption'
- })
-
- })
- }),
-
- captionText: SDL.Label.extend({
-
- classNameBindings: ['this.parentView.search:hide'],
- classNames: ['caption-text'],
- contentBinding: 'this.parentView.caption'
- }),
-
- listOfChoices: SDL.List.extend({
- classNameBindings: ['this.parentView.list::hide'],
- elementId: 'perform_interaction_view_list',
- itemsOnPage: 5,
- items: []
- }),
-
- timer: null,
-
- timeout: null,
-
- search: false,
-
- list: false,
-
- icon: false,
-
- /**
- * Id of app initiated performInteraction request
- */
- appID: null,
-
- /**
- * Method updates popup timer when data changes through keyboard
- */
- timerUpdate: function (){
- if (this.timeout) {
- clearTimeout(this.timer);
- var self = this;
- this.timer = setTimeout(function () {
-
- self.deactivate("TIMED_OUT");
- }, this.timeout);
- }
- }.observes('this.input.value'),
-
- /**
- * Activate window and set caption text
- *
- * @param text: String
- */
- activate: function (message) {
-
- this.clean();
-
- if (message.params && message.params.initialText) {
- this.set('caption', message.params.initialText.fieldText);
- }
-
- this.appID = message.params.appID;
-
- if (message.params.interactionLayout) {
-
- switch (message.params.interactionLayout) {
- case "ICON_ONLY" : {
-
- this.preformChoicesNavigation(message.params.choiceSet, message.params.timeout);
-
-
- this.set('search', false);
- this.set('list', false);
- this.set('icon', true);
- this.set('active', true);
- SDL.SDLController.onSystemContextChange();
- break;
- }
- case "ICON_WITH_SEARCH" : {
-
- this.preformChoicesNavigation(message.params.choiceSet, message.params.timeout);
-
- this.set('icon', true);
- this.set('search', true);
- this.set('list', false);
- this.set('active', true);
- SDL.SDLController.onSystemContextChange();
- break;
- }
- case "LIST_ONLY" : {
-
- this.preformChoices(message.params.choiceSet, message.params.timeout);
-
- this.set('list', true);
- this.set('icon', false);
- this.set('search', false);
- this.set('active', true);
- SDL.SDLController.onSystemContextChange();
- break;
- }
- case "LIST_WITH_SEARCH" : {
-
- this.preformChoices(message.params.choiceSet, message.params.timeout);
-
- this.set('list', true);
- this.set('search', true);
- this.set('icon', false);
- this.set('active', true);
- break;
- }
- case "KEYBOARD" : {
- this.preformChoices(null, message.params.timeout);
- SDL.SDLModel.uiShowKeyboard(this.input);
-
-
- this.set('list', false);
- this.set('search', false);
- this.set('icon', false);
- // this.set('active', true);
-
- break;
- }
- default:
- {
- // default action
- }
- }
- } else {
-
- if (message.params.choiceSet) {
- this.preformChoices(message.params.choiceSet, message.params.timeout);
-
- this.set('list', true);
- this.set('icon', false);
- this.set('search', false);
- this.set('active', true);
- SDL.SDLController.onSystemContextChange();
- } else {
-
- this.timer = setTimeout(function () {
- SDL.InteractionChoicesView.deactivate("TIMED_OUT");
- }, message.params.timeout);
- }
- }
-
- },
-
- /**
- * Deactivate window
- */
- deactivate: function (result, choiceID) {
-
- clearTimeout(this.timer);
- this.set('active', false);
- SDL.SDLController.VRMove();
- SDL.Keyboard.deactivate();
-
-
-
- switch (result) {
- case "ABORTED":
- {
- SDL.SDLController.interactionChoiseCloseResponse(this.appID, SDL.SDLModel.resultCode["ABORTED"]);
- break;
- }
- case "TIMED_OUT":
- {
- SDL.SDLController.interactionChoiseCloseResponse(this.appID, SDL.SDLModel.resultCode["TIMED_OUT"]);
- break;
- }
- case "SUCCESS":
- {
- SDL.SDLController.interactionChoiseCloseResponse(this.appID, SDL.SDLModel.resultCode["SUCCESS"], choiceID, this.input.value);
- break;
- }
- default:
- {
- // default action
- }
- }
-
- this.appID = null;
-
- SDL.SDLController.onSystemContextChange();
- },
-
- /**
- * Clean choices caption and list before new proform
- */
- clean: function () {
-
- this.input.set('value', null);
- this.set('captionText.content', 'Interaction Choices');
- this.set('timeout', null);
- this.listOfChoices.items = [];
- this.listOfChoices.list.refresh();
- var length = this.get('listWrapper.naviChoises.childViews').length;
- for (var i=0; i < length; i++) {
- SDL.InteractionChoicesView.get('listWrapper.naviChoises.childViews').shiftObject();
- }
- },
-
- /**
- * Update choises list with actual set id
- *
- * @param data:
- * Array
- */
- preformChoices: function (data, timeout) {
-
- this.set('timeout', timeout);
-
- if (data) {
-
- // temp for testing
- for (var i = 0; i < data.length; i++) {
- this.listOfChoices.items
- .push({
- type: SDL.Button,
- params: {
- text: data[i].menuName,
- choiceID: data[i].choiceID,
- action: 'onChoiceInteraction',
- onDown: false,
- target: 'SDL.SDLAppController',
- templateName: data[i].image ? 'rightIcon' : 'text',
- icon: data[i].image ? data[i].image.value : null
- }
- });
- }
-
- this.listOfChoices.list.refresh();
- }
-
- var self = this;
-
- clearTimeout(this.timer);
- this.timer = setTimeout(function () {
-
- self.deactivate("TIMED_OUT");
- }, timeout);
- },
-
- /**
- * Update choises list with actual set id
- *
- * @param data:
- * Array
- */
- preformChoicesNavigation: function (data, timeout) {
-
- this.set('timeout', timeout);
-
- if (data) {
-
- // temp for testing
- for (var i = 0; i < data.length; i++) {
- this.get('listWrapper.naviChoises.childViews').pushObject(SDL.Button.create({
- text: data[i].menuName,
- choiceID: data[i].choiceID,
- action: 'onChoiceInteraction',
- onDown: false,
- target: 'SDL.SDLAppController',
- templateName: data[i].image ? 'rightIcon' : 'text',
- icon: data[i].image ? data[i].image.value : null
- })
- );
- }
-
- }
-
- var self = this;
-
- setTimeout(function(){
-
- SDL.SDLModel.interactionListWrapper.refresh();
- }, 0);
-
- clearTimeout(this.timer);
- this.timer = setTimeout(function () {
- self.deactivate("TIMED_OUT");
- }, timeout);
- }
-});
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/keyboard.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/keyboard.js
deleted file mode 100644
index b82b7c697..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/keyboard.js
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.Keyboard
- * @desc Slider visual representation
- * @category View
- * @filesource app/view/sdl/shared/keyboard.js
- * @version 1.0
- */
-
-SDL.Keyboard = SDL.SDLAbstractView.create({
-
- elementId: 'keyboard_view',
-
- childViews: [
- 'backButton',
- 'microphone',
- 'searchBar',
- 'controlls',
- 'buttonsAreaQWERTY',
- 'buttonsAreaQWERTZ',
- 'buttonsAreaAZERTY'
- ],
-
- /**
- * Activate keyboard method
- *
- * @param {Object}
- */
- activate: function( element ) {
- if( element.tagName === 'input' ){
-
- this.set( 'active', true );
- this.set('target', element);
- }
- },
-
- backButton: SDL.Button.extend( {
- classNames:
- [
- 'back-button'
- ],
- action: function() {
-
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.activeRequests.uiPerformInteraction && !SDL.InteractionChoicesView.active) {
- SDL.InteractionChoicesView.deactivate("ABORTED");
- }
- SDL.Keyboard.deactivate();
- },
- icon: 'images/media/ico_back.png',
- onDown: false
- } ),
-
- /**
- * Extend deactivate method send SUCCESS response on deactivate with current
- * slider value
- */
- deactivate: function () {
-
- this._super();
- this.searchBar.input.set('value', null);
- this.set('target', null);
- },
-
- inputChanges: function (element) {
-
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.activeRequests.uiPerformInteraction) {
- SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction");
- }
-
- if (this.searchBar.input.value == null) {
- this.searchBar.input.set('value', "");
- }
-
- switch (element.text) {
- case "Space": {
- this.searchBar.input.set('value', this.searchBar.input.value + " ");
- this.target.set('value', this.searchBar.input.value);
- break;
- }
- case "Search": {
- this.target.search();
- this.deactivate();
- break;
- }
- default:{
- this.searchBar.input.set('value', this.searchBar.input.value + element.text);
- this.target.set('value', this.searchBar.input.value);
- }
-
- }
- },
-
- clearBtn: function (element) {
- this.searchBar.input.set('value', this.searchBar.input.value.slice(0, -1));
- this.target.set('value', this.searchBar.input.value);
- SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction");
- },
-
- /**
- * Tearget element that initiated keyboard
- */
- target: null,
-
- microphone: SDL.Button.extend({
- classNames: 'microphone',
- text: 'mic'
- }),
-
- searchBar: Em.ContainerView.extend({
-
- classNames: 'searchBar',
-
- childViews: [
- 'input',
- 'clearBtn',
- 'serchIcon'
- ],
-
- clearBtn: SDL.Button.extend({
- classNames: 'clearBtn',
- text: 'X',
- action: 'clearBtn',
- target: 'parentView.parentView'
- }),
-
- serchIcon: Em.View.extend({
- classNames: 'serchIcon'
- }),
-
- input: Ember.TextField.extend({
- elementId: "keyboardInput",
- classNames: "keyboardInput",
- valueBinding: 'SDL.SDLModel.keyboardInputValue'
- })
-
- }),
-
- controlls: Em.ContainerView.extend({
-
- classNames: 'controlls',
-
- childViews: [
- 'numericBtn',
- 'symbolBtn',
- 'spaceBtn',
- 'caseSwitchBtn',
- 'localisationBtn',
- 'searchBtn'
- ],
-
- numericBtn: SDL.Button.extend({
- classNames: 'numericBtn controll',
- text: '123'
- }),
-
- symbolBtn: SDL.Button.extend({
- classNames: 'symbolBtn controll',
- text: '!@#'
- }),
-
- spaceBtn: SDL.Button.extend({
- classNames: 'spaceBtn controll',
- text: 'Space',
- target : 'parentView.parentView',
- action : 'inputChanges'
- }),
-
- caseSwitchBtn: SDL.Button.extend({
- classNames: 'caseSwitchBtn controll',
- text: 'ABC'
- }),
-
- localisationBtn: SDL.Button.extend({
- classNames: 'localisationBtn controll',
- icon: 'images/info/info_leftMenu_apps_ico.png'
- }),
-
- searchBtn: SDL.Button.extend(SDL.PresetEvents, {
- classNames: 'searchBtn controll',
- text: 'Search',
- click: function(){
- this.get('parentView.parentView').inputChanges(this);
- },
- presetName: 'SEARCH'
- })
- }),
-
- disableButtons: function(){
-
- if (SDL.SDLAppController.model) {
- if (!SDL.SDLAppController.model.globalProperties.keyboardProperties) {
- return;
- }
- var list = SDL.SDLAppController.model.globalProperties.keyboardProperties.limitedCharacterList ? SDL.SDLAppController.model.globalProperties.keyboardProperties.limitedCharacterList : [];
-
- for (var i = 0; i < list.length; i++) {
- list[i] = list[i].toLowerCase();
- }
-
- if (SDL.SDLAppController.model && list.length){
-
- for (var i = 0; i < this.buttonsAreaQWERTY._childViews.length; i++) {
-
- if (list.indexOf(this.buttonsAreaQWERTY._childViews[i].text) < 0) {
- this.buttonsAreaQWERTY._childViews[i].set('disabled', true);
- this.buttonsAreaQWERTZ._childViews[i].set('disabled', true);
- this.buttonsAreaAZERTY._childViews[i].set('disabled', true);
- } else {
- this.buttonsAreaQWERTY._childViews[i].set('disabled', false);
- this.buttonsAreaQWERTZ._childViews[i].set('disabled', false);
- this.buttonsAreaAZERTY._childViews[i].set('disabled', false);
- }
- }
- } else if (SDL.SDLAppController.model && !list.length) {
- for (var i = 0; i < this.buttonsAreaQWERTY._childViews.length; i++) {
- this.buttonsAreaQWERTY._childViews[i].set('disabled', false);
- }
- }
- }
-
- }.observes('SDL.SDLAppController.model.globalProperties.keyboardProperties.limitedCharacterList.@each'),
-
- buttonsAreaQWERTY: SDL.QWERTYLayout.create({
-
- classNameBindings: 'this.pQWERTY::hide',
-
- pQWERTY: function(){
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.keyboardProperties.keyboardLayout == "QWERTY") {
- return true;
- } else {
- return false;
- }
- }.property('SDL.SDLAppController.model.globalProperties.keyboardProperties.keyboardLayout')
-
- }),
-
- buttonsAreaQWERTZ: SDL.QWERTZLayout.create({
-
- classNameBindings: 'this.pQWERTZ::hide',
-
- pQWERTZ: function(){
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.keyboardProperties.keyboardLayout == "QWERTZ") {
- return true;
- } else {
- return false;
- }
- }.property('SDL.SDLAppController.model.globalProperties.keyboardProperties.keyboardLayout')
-
- }),
-
- buttonsAreaAZERTY: SDL.AZERTYLayout.create({
-
- classNameBindings: 'this.pAZERTY::hide',
-
- pAZERTY: function(){
- if (SDL.SDLAppController.model && SDL.SDLAppController.model.globalProperties.keyboardProperties.keyboardLayout == "AZERTY") {
- return true;
- } else {
- return false;
- }
- }.property('SDL.SDLAppController.model.globalProperties.keyboardProperties.keyboardLayout')
-
- })
-
-});
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/optionsView.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/optionsView.js
deleted file mode 100644
index a4858255a..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/optionsView.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.OptionsView
- * @desc Options visual representation
- * @category View
- * @filesource app/view/sdl/shared/optionsView.js
- * @version 1.0
- */
-
-SDL.OptionsView = SDL.SDLAbstractView.create({
-
- elementId: 'sdl_options',
-
- childViews:
- [
- 'backButton',
- 'captionText',
- 'commands'
- ],
-
- // Menu caption text
- captionBinding: 'SDL.SDLAppController.model.currentSubMenuLabel',
-
- commands: SDL.List.extend({
-
- elementId: 'info_nonMedia_options_list',
-
- itemsOnPage: 5,
-
- items: [],
-
- /*
- * itemsDefault: [ { type: SDL.Button,
- *
- * params: { templateName: 'text', text: 'Exit', target:
- * 'this.parentView.parentView.parentView', action: 'deactivate',
- * onDown: false } }, { type: SDL.Button,
- *
- * params: { templateName: 'arrow', text: 'Device Information', } } ],
- */
-
- refreshItems: function() {
-
- if (SDL.SDLAppController.model) {
-
- var commands = SDL.SDLAppController.model.get('currentCommandsList'),
- i,
- len,
- template;
-
- this.items = [];
-
- len = commands.length;
-
- for(i = 0; i < len; i++){
-
- if(commands[i].menuID >= 0){
- template = 'arrow';
- }else{
- template = commands[i].icon ? 'rightText' : 'text';
- }
-
- this.items.push({
- type: SDL.Button,
- params: {
- templateName: template,
- text: commands[i].name,
- commandID: commands[i].commandID,
- menuID: commands[i].menuID,
- icon: commands[i].icon,
- target: 'SDL.SDLAppController',
- action: 'onCommand',
- onDown: false
- }
- })
- }
-
- this.list.refresh();
- }
-
- }.observes('SDL.SDLAppController.model.currentSubMenuId', 'SDL.SDLAppController.model.currentCommandsList.@each')
- }),
-
- activate: function(text) {
- this._super();
-
- SDL.SDLAppController.buttonsSort('top', SDL.SDLAppController.model.appID);
- SDL.OptionsView.commands.refreshItems();
-
- SDL.SDLController.onSystemContextChange();
- },
-
- // Extend deactivate window
- deactivate: function() {
-
- if (SDL.SDLAppController.model) {
-
- if (SDL.SDLAppController.model.get('currentSubMenuId') >= 0) {
- SDL.SDLAppController.onSubMenu('top');
- }else{
- this._super();
- SDL.SDLController.onSystemContextChange();
- }
- }
-
- }
-});
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/scrollableMessage.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/scrollableMessage.js
deleted file mode 100644
index 1cc1c2d0c..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/scrollableMessage.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.ScrollableMessage
- * @desc ScrollableMessage module visual representation
- * @category View
- * @filesource app/view/sdl/shared/scrollableMessage.js
- * @version 1.0
- */
-
-SDL.ScrollableMessage = SDL.SDLAbstractView.create({
-
- elementId: 'ScrollableMessage',
-
- classNames: 'ScrollableMessage',
-
- classNameBindings: [
- 'active:active'
- ],
-
- /**
- * Id of current request
- *
- * @type {Number}
- */
- messageRequestId: null,
-
- active: false,
-
- appID: null,
-
- timer: null,
-
- timeout: null,
-
- childViews: [
- 'backButton', 'captionText', 'softButtons', 'listOfCommands'
- ],
-
- /**
- * Deactivate View
- *
- * @param {Object} ABORTED Parameter to indicate status for
- * UI.ScrollableMessageResponse
- */
- deactivate: function (ABORTED) {
- clearTimeout(this.timer);
- this.set('active', false);
- this.softButtons.set('page', 0);
-
- this.timeout = null;
-
- SDL.SDLController.scrollableMessageResponse(ABORTED ? SDL.SDLModel.resultCode['ABORTED'] : SDL.SDLModel.resultCode['SUCCESS'], this.messageRequestId);
-
- SDL.SDLController.onSystemContextChange();
- },
-
- activate: function (appName, params, messageRequestId) {
- if (appName) {
-
- var self = this;
-
- if (params.messageText.fieldName == 'scrollableMessageBody') {
- this.set('listOfCommands.items', params.messageText.fieldText);
- }
-
- this.set('messageRequestId', messageRequestId);
- this.set('captionText.content', appName);
- this.softButtons.addItems(params.softButtons, params.appID);
- this.set('active', true);
- clearTimeout(this.timer);
- this.timeout = params.timeout;
- this.timer = setTimeout(function () {
- self.deactivate();
- }, params.timeout);
-
- SDL.SDLController.onSystemContextChange();
- }
- },
-
- softButtons: SDL.MenuList.extend({
-
- itemsOnPage: 4,
-
- groupName: "ScrollableMessage",
-
- content: Em.ContainerView.extend({
-
- classNames: [
- 'content'
- ],
-
- attributeBindings: [
- 'parentView.contentPositon:style'
- ]
-
- })
- }),
-
- /**
- * List for option on SDLOptionsView screen
- */
- listOfCommands: SDL.ScrollableText.extend({
-
- elementId: 'scrollable_message_list',
-
- itemsOnPage: 11,
-
- /** Items array */
- items: 'asdasdasd',
-
- /**
- * Reset timeout function
- */
- click: function(){
-
- var self = this._parentView;
-
- clearTimeout(this._parentView.timer);
- SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.ScrollableMessage");
- this._parentView.timer = setTimeout(function () {
- self.deactivate();
- }, this._parentView.timeout);
- }
- })
-});
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/sliderView.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/sliderView.js
deleted file mode 100644
index aedb2cbc0..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/sliderView.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.SliderView
- * @desc Slider visual representation
- * @category View
- * @filesource app/view/sdl/shared/sliderView.js
- * @version 1.0
- */
-
-SDL.SliderView = SDL.SDLAbstractView.create( {
-
- elementId: 'slider_view',
-
- childViews:
- [
- 'backButton',
- 'captionText',
- 'headerLabel',
- 'footerLabel',
- 'adjustControl'
- ],
-
- headerLabel: SDL.Label.extend( {
- classNames: 'slider-header',
- content: 'Header Label'
- } ),
-
- footerLabel: SDL.Label.extend( {
- classNames: 'slider-footer',
- content: 'Footer Label',
- data: []
- } ),
-
- /**
- * Identifier of current request
- */
- sliderRequestId: null,
-
- timer: null,
-
- timeout: null,
-
- /**
- * Extend deactivate method send SUCCESS response on deactivate with current
- * slider value
- */
- deactivate: function(ABORTED) {
- this._super();
- this.timeout = null;
- clearTimeout(this.timer);
- this.timer = null;
-
- if (ABORTED === true) {
- FFW.UI.sendSliderResult( SDL.SDLModel.resultCode["SUCCESS"], this.get( 'sliderRequestId' ), this.get( 'adjustControl.sliderValue.value' ) );
- } else {
- FFW.UI.sendSliderResult( SDL.SDLModel.resultCode["ABORTED"], this.get( 'sliderRequestId' ), this.get( 'adjustControl.sliderValue.value' ) );
- }
-
- SDL.SDLController.onSystemContextChange();
- },
-
- activate: function(text, timeout) {
- if( text ){
- this.set( 'caption', text );
- }
-
- this.set( 'active', true );
-
- this.set('timeout', timeout);
-
- SDL.SDLController.onSystemContextChange();
-
- this.timer = setTimeout(function () {
- if (SDL.SliderView.active) {
- SDL.SliderView.deactivate(true);
- }
- }, timeout);
- },
-
- dataChange: function(){
- if (this.timeout){
- var self = this;
-
- clearTimeout(this.timer);
- SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.Slider");
- this.timer = setTimeout(function () {
- self.deactivate(true);
- }, this.timeout);
- }
- }.observes('this.adjustControl.sliderValue.value'),
-
- adjustControl: Em.ContainerView.extend( {
-
- classNames: 'sliderControl',
-
- childViews:
- [
- 'minusBtn',
- 'led',
- 'plusBtn'
- ],
-
- sliderValue: Em.Object.create( {
- range: 10,
- value: 0
- } ),
-
- minusBtn: SDL.Button.extend( {
- classNames: 'control minus',
- icon: 'images/common/minus-ico.png',
- actionDown: function() {
- this._super();
- if (this._parentView.sliderValue.value > 1) {
- this.set( 'parentView.sliderValue.value', this._parentView.sliderValue.value - 1 );
- }
- }
- } ),
-
- led: SDL.Indicator.create( {
- classNames: 'ledContainer ico',
- contentBinding: 'parentView.sliderValue',
- indActiveClass: 'led',
- indDefaultClass: 'led-inactive'
- } ),
-
- plusBtn: SDL.Button.extend( {
- classNames: 'control plus',
- icon: 'images/common/plus-ico.png',
- actionDown: function() {
- this._super();
- if (this._parentView.sliderValue.value < this._parentView.sliderValue.range) {
- this.set( 'parentView.sliderValue.value', this._parentView.sliderValue.value + 1 );
- }
- }
- } )
- } ),
-
- loadData: function( message ) {
-
- var data = message.params;
-
- this.set( 'sliderRequestId', message.id );
-
- this.set( 'headerLabel.content', data.sliderHeader );
- this.get( 'adjustControl.sliderValue' ).set( 'range', data.numTicks );
- this.get( 'adjustControl.sliderValue' ).set( 'value', data.position );
-
- setTimeout( function() {
- SDL.SliderView.adjustControl.rerender();
- }, 1 );
-
- if (!data.sliderFooter) {
- this.set('footerLabel.content', '');
- return;
- }
-
- this.footerLabel.data = data.sliderFooter;
-
- if (data.sliderFooter.length != data.numTicks) {
- this.set( 'footerLabel.content', data.sliderFooter[0] );
- } else {
- // Magick number is array index correction
- this.set( 'footerLabel.content', data.sliderFooter[data.position - 1] );
- }
- },
-
- /**
- * Change footer text depends on current slider position works only for
- * dynamic footer mode
- */
- changeFooterText: function() {
- if( this.footerLabel.data && this.footerLabel.data.length > 1 ){
- this.set( 'footerLabel.content', this.footerLabel.data[this.adjustControl.sliderValue.value - 1] );
- }
- }.observes( 'adjustControl.sliderValue.value' )
-} );
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/tbtTurnList.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/tbtTurnList.js
deleted file mode 100644
index acc1d46f8..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/tbtTurnList.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.TBTTurnList
- * @desc TBT Turn List visual representation
- * @category View
- * @filesource app/view/sdl/shared/tbtTurnList.js
- * @version 1.0
- */
-
-SDL.TBTTurnList = SDL.SDLAbstractView.create({
-
- elementId: 'tbtTurnListView',
-
- childViews: [
- 'backButton',
- 'captionText',
- 'tbtTurnListList'
- ],
-
- /**
- * Activate window
- */
- activate: function () {
-
- this.set('active', true);
- },
-
- /**
- * Deactivate window if TurnByTurnView window was closed
- */
- closeTurnList: function () {
-
- if (!SDL.TurnByTurnView.get('activeTBT')) {
- this.set('active', false);
- }
- }.observes('SDL.TurnByTurnView.activeTBT'),
-
- /**
- * Title Labes of window
- */
- captionText: SDL.Label.extend({
- classNames: 'caption-text',
-
- content: 'Turn List'
- }),
-
- /**
- * Turn List
- */
- tbtTurnListList: SDL.List.extend({
- elementId : 'tbtTurnListList',
- itemsOnPage: 5,
- items : []
- }),
-
- /**
- * Function updates content of Turn List with data from application's
- * model
- *
- * @type {Number}
- */
- updateList: function (appID) {
-
- this.get('tbtTurnListList.list').removeAllChildren();
-
- this.tbtTurnListList.list.refresh();
-
- var turnListArray = SDL.SDLController.getApplicationModel(appID).turnList,
- length = turnListArray.length;
- for (var i = 0; i < length; i++) {
- this.get('tbtTurnListList.list.childViews').pushObject(SDL.Label.create({
- icon : turnListArray[i].turnIcon ? turnListArray[i].turnIcon.value : "",
- content : turnListArray[i].navigationText ? turnListArray[i].navigationText.fieldText : "",
- classNames : 'list-item',
- templateName: turnListArray[i].turnIcon ? 'icon' : ''
- }));
- }
- if (SDL.SDLController.getApplicationModel(appID).turnListSoftButtons) {
- turnListArray = SDL.SDLController.getApplicationModel(appID).turnListSoftButtons;
- length = turnListArray.length;
- } else {
- length = null;
- turnListArray = [];
- }
- for (var i = 0; i < length; i++) {
- this.get('tbtTurnListList.list.childViews').pushObject(SDL.Button.create(SDL.PresetEventsCustom, {
- systemAction : turnListArray[i].systemAction,
- groupName : "TBTList",
- classNameBindings: [
- 'isHighlighted:isHighlighted'
- ],
- isHighlighted : turnListArray[i].isHighlighted ? true : false,
- softButtonID : turnListArray[i].softButtonID,
- icon : turnListArray[i].image ? turnListArray[i].image.value : "",
- text : turnListArray[i].text,
- classNames : 'list-item softButton',
- elementId : 'softButton' + i,
- templateName : turnListArray[i].image ? 'rightIcon' : 'text',
- appID : appID
- }));
- }
- }
- });
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/shared/turnByTurnView.js b/SDL_Core/src/components/HMI/app/view/sdl/shared/turnByTurnView.js
deleted file mode 100644
index ea19034e2..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/shared/turnByTurnView.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.TurnByTurnView
- * @desc TurnByTurnView module visual representation
- * @category View
- * @filesource app/view/sdl/shared/turnByTurnView.js
- * @version 1.0
- */
-
-SDL.TurnByTurnView = SDL.SDLAbstractView.create( {
-
- elementId: 'TurnByTurnView',
-
- classNames: 'TurnByTurnView',
-
- classNameBindings: [
- 'activeTBT:active_state:inactive_state'
- ],
-
- active: false,
-
- activeTBT: false,
-
- childViews: [
- 'captionText',
- 'softButtons',
- 'totalDistanceLabel',
- 'etaLabel',
- 'turnList',
- 'homeScreen',
- 'navigationText2',
- 'turnIconImage',
- 'nextTurnIconImage',
- 'distanceToManeuver',
- 'distanceToManeuverScale',
- 'timeToDestination'
- ],
-
- appID: -1,
- navigationText2: null,
- eta: null,
- totalDistance: null,
- turnIcon: null,
- nextturnIcon: null,
- distanceToManeuver: null,
- distanceToManeuverScale: null,
- timeToDestination: null,
- maneuverComplete: null,
-
- activate: function(appID) {
-
- var naviParams = SDL.SDLController.getApplicationModel(appID).constantTBTParams;
-
- if (naviParams) {
-
- for ( var i = 0; i < naviParams.navigationTexts.length; i++) {
- switch (naviParams.navigationTexts[i].fieldName) {
- case 'navigationText1': {
- this.set('captionText.content',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'navigationText2': {
- this.set('navigationText2',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'ETA': {
- this.set('eta', naviParams.navigationTexts[i].fieldText);
- break;
- }
- case 'totalDistance': {
- this.set('totalDistance',
- naviParams.navigationTexts[i].fieldText);
- break;
- }
- }
- }
-
- if (naviParams.softButtons) {
- this.softButtons.addItems(naviParams.softButtons);
- }
-
- if (naviParams.maneuverComplete) {
- this.set('maneuverComplete', naviParams.maneuverComplete);
- }
-
- this.set('appID', naviParams.appID);
-
- if (naviParams.turnIcon) {
-
- this.set('turnIcon', naviParams.turnIcon.value);
- }
-
- if (naviParams.nextTurnIcon) {
-
- this.set('nextTurnIcon', naviParams.nextTurnIcon.value);
- }
- this.set('distanceToManeuver', naviParams.distanceToManeuver);
- this.set('distanceToManeuverScale', naviParams.distanceToManeuverScale);
- this.set('timeToDestination', naviParams.timeToDestination);
-
- this.set('activeTBT', true);
- }
- },
-
- /**
- * Deactivate View
- */
- deactivate: function() {
-
- this.set('activeTBT', false);
- },
-
- totalDistanceLabel: SDL.Label.extend( {
- classNames: 'totalDistanceLabel',
- contentBinding: 'parentView.totalDistance'
- }),
-
- distanceToManeuverScale: SDL.Label.extend( {
- classNames: 'distanceToManeuverScale',
- contentBinding: 'parentView.distanceToManeuverScale'
- }),
-
- distanceToManeuver: SDL.Label.extend( {
- classNames: 'distanceToManeuver',
- contentBinding: 'parentView.distanceToManeuver'
- }),
-
- timeToDestination: SDL.Label.extend( {
- classNames: 'timeToDestination',
- contentBinding: 'parentView.timeToDestination'
- }),
-
- etaLabel: SDL.Label.extend( {
- classNames: 'etaLabel',
- contentBinding: 'parentView.eta'
- }),
-
- turnList: SDL.Button.create( {
- elementID: 'turnList',
- classNames: 'turnList btn',
- text: 'Turn List',
- action: function() {
-
- SDL.SDLController.tbtTurnList(this._parentView.appID);
- },
- target: '',
- onDown: false,
- templateName: 'arrow'
- }),
-
- turnIconImage: Em.View.create( {
- classNames: 'turnIcon btn',
- attributeBindings: [
- 'style'
- ],
- style: function() {
-
- if (this._parentView.turnIcon) {
- return 'background-image: URL(' + this._parentView.turnIcon
- + ');';
- } else {
- return '';
- }
- }.property('this.parentView.turnIcon')
- }),
-
- nextTurnIconImage: Em.View.create( {
- classNames: 'nextTurnIcon btn',
- attributeBindings: [
- 'style'
- ],
- style: function() {
-
- if (this._parentView.nextTurnIcon) {
- return 'background-image: URL(' + this._parentView.nextTurnIcon
- + ');';
- } else {
- return '';
- }
- }.property('this.parentView.nextTurnIcon')
- }),
-
- navigationText2: SDL.Label.extend( {
- classNames: 'navigationText2',
- contentBinding: 'parentView.navigationText2'
- }),
-
- homeScreen: SDL.Button.create( {
- elementId: 'homeScreen',
- classNames: 'homeScreen btn',
- text: 'Home Screen',
- iconBinding: 'SDL.SDLAppController.model.appIcon',
- target: 'this.parentView',
- action: 'deactivate',
- onDown: false
- }),
-
- softButtons: SDL.MenuList.extend( {
-
- itemsOnPage: 3,
-
- groupName: "TurnByTurnView",
-
- content: Em.ContainerView.extend( {
-
- classNames: [
- 'content'
- ]
-
- })
- })
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/sdl/tbtClientStateView.js b/SDL_Core/src/components/HMI/app/view/sdl/tbtClientStateView.js
deleted file mode 100644
index 62856bff8..000000000
--- a/SDL_Core/src/components/HMI/app/view/sdl/tbtClientStateView.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.TBTClientStateView
- * @desc TBTClientStateView module visual representation
- * @category View
- * @filesource app/view/sdl/TBTClientStateView.js
- * @version 1.0
- */
-
-SDL.TBTClientStateView = Em.ContainerView.create( {
-
- elementId: 'tbtClientStateView',
-
- classNames: 'tbtClientStateView',
-
- classNameBindings:
- [
- 'active'
- ],
-
- childViews:
- [
- 'tbtClientStateLabel',
- 'tbtClientState',
- 'tbtClientStateSelect'
- ],
-
- /**
- * Title of VehicleInfo PopUp view
- */
- tbtClientStateLabel: SDL.Label.extend( {
-
- elementId: 'tbtClientStateLabel',
-
- classNames: 'tbtClientStateLabel',
-
- content: 'TBT Client State'
- } ),
-
- /**
- * Property indicates the activity state of TBTClientStateView
- */
- active: false,
-
- /**
- * Title of tbtClientState group of parameters
- */
- tbtClientState: SDL.Label.extend( {
-
- elementId: 'tbtClientState',
-
- classNames: 'tbtClientState',
-
- content: 'Client State'
- } ),
-
- /**
- * HMI element Select with parameters of TBTClientStates
- */
- tbtClientStateSelect: Em.Select.extend( {
-
- elementId: 'tbtClientStateSelect',
-
- classNames: 'tbtClientStateSelect',
-
- contentBinding: 'SDL.SDLModel.tbtClientStates',
-
- optionValuePath: 'content.id',
-
- optionLabelPath: 'content.name',
-
- /**
- * Selected data sent on model for further processing
- */
- click: function() {
-
- SDL.SDLController.tbtClientStateSelected( this.selection.name );
-
- }
- } ),
-
- /**
- * Trigger function that activates and deactivates tbtClientStateView
- */
- toggleActivity: function() {
- this.toggleProperty( 'active' );
- SDL.SDLController.onSystemContextChange();
- }
-} ); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/app/view/settingsView.js b/SDL_Core/src/components/HMI/app/view/settingsView.js
deleted file mode 100644
index f0c2638ca..000000000
--- a/SDL_Core/src/components/HMI/app/view/settingsView.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * · Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * · Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * · Neither the name of the Ford Motor Company nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.PlayerControllsView
- * @desc Video player visual representation
- * @category View
- * @filesource app/view/player/PlayerView.js
- * @version 1.0
- */
-SDL.SettingsView = Em.ContainerView.create( {
- /** View Id */
- elementId: 'settingsView',
-
- classNameBindings: [
- 'SDL.States.settings.active:active_state:inactive_state'
- ],
-
- childViews: [
- 'windowText'
- ],
-
- windowText: SDL.Label.extend( {
-
- classNames: 'windowText',
-
- content: 'Settings'
- })
-
-});
diff --git a/SDL_Core/src/components/HMI/audio/alert.wav b/SDL_Core/src/components/HMI/audio/alert.wav
deleted file mode 100644
index bde18695e..000000000
--- a/SDL_Core/src/components/HMI/audio/alert.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/audio/initial.wav b/SDL_Core/src/components/HMI/audio/initial.wav
deleted file mode 100644
index 61a549fbc..000000000
--- a/SDL_Core/src/components/HMI/audio/initial.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/audio/listen.wav b/SDL_Core/src/components/HMI/audio/listen.wav
deleted file mode 100644
index 0f087c8d2..000000000
--- a/SDL_Core/src/components/HMI/audio/listen.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/audio/positive.wav b/SDL_Core/src/components/HMI/audio/positive.wav
deleted file mode 100644
index 464af1f88..000000000
--- a/SDL_Core/src/components/HMI/audio/positive.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/audio/say.wav b/SDL_Core/src/components/HMI/audio/say.wav
deleted file mode 100644
index 0975fe976..000000000
--- a/SDL_Core/src/components/HMI/audio/say.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/css/buttonControls.css b/SDL_Core/src/components/HMI/css/buttonControls.css
deleted file mode 100644
index 77299af89..000000000
--- a/SDL_Core/src/components/HMI/css/buttonControls.css
+++ /dev/null
@@ -1,524 +0,0 @@
-/**
- * buttonControls module CSS
- *
- * @category Style Sheets
- * @filesource css/buttonControls.css
- * @version 2.0
- */
-#buttonControls.buttonControls {
- width: 270px;
- height: 200px;
- top: 0px;
- left: 790px;
-}
-
-#driverDistractionControl.driverDistractionControl {
- width: 302px;
- height: 20px;
- top: 423px;
- left: 810px;
-}
-
-#driverDistractionControl .driverDistractionControlLabel {
- left: 20px;
-}
-
-#keyboard_view .back-button{
- top: 58px;
-}
-
-#keyboard_view .controlls{
- top: 350px;
- width: 800px;
- height: 75px;
-}
-
-#keyboard_view .controll{
- margin: 10px;
- height: 60px;
- border: 1px solid #333;
- text-align: center;
- line-height: 60px;
- border-radius: 3px;
-}
-
-#keyboard_view .controlls .leftBtn{
- width: 130px;
- left: 0px;
-}
-
-#keyboard_view .controlls .numericBtn{
- width: 60px;
- left: 145px;
-}
-
-#keyboard_view .controlls .symbolBtn{
- width: 60px;
- left: 220px;
-}
-
-#keyboard_view .controlls .spaceBtn{
- width: 215px;
- left: 295px;
-}
-
-#keyboard_view .controlls .caseSwitchBtn{
- width: 60px;
- left: 525px;
-}
-
-#keyboard_view .controlls .localisationBtn{
- width: 60px;
- left: 600px;
-}
-
-#keyboard_view .controlls .searchBtn{
- width: 100px;
- left: 677px;
-}
-
-#keyboard_view .keyboardLayout{
- width: 750px;
- height: 185px;
- top: 170px;
- left: 25px;
-}
-
-#keyboard_view .keyboardLayout.wide{
- left: 5px !important;
-}
-
-#keyboard_view .searchBar{
- top: 58px;
- width: 666px;
- height: 49px;
- left: 120px;
-}
-
-#keyboard_view input{
- width: 597px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
- background: rgba(119, 119, 119, 0.42);
- cursor: pointer;
- font-size: 32px;
- color: #FFF;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#keyboard_view .microphone{
- text-align: center;
- line-height: 49px;
-}
-
-#keyboard_view .clearBtn{
- right: 0px;
- top: 0px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
- font-size: 32px;
- text-align: center;
- line-height: 50px;
-}
-
-#keyboard_view .microphone{
- left: 63px;
- top: 58px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#keyboard_view .keyboardLayout .ffw-button{
- width: 60px;
- height: 50px;
- border-radius: 3px;
- border: 1px solid #333;
- margin: 5px;
- font-size: 42px;
- text-align: center;
- line-height: 50px;
-}
-#keyboard_view .keyboardLayout .k1{
- left: 75px;
-}
-#keyboard_view .keyboardLayout .k2{
- left: 150px;
-}
-#keyboard_view .keyboardLayout .k3{
- left: 225px;
-}
-#keyboard_view .keyboardLayout .k4{
- left: 300px;
-}
-#keyboard_view .keyboardLayout .k5{
- left: 375px;
-}
-#keyboard_view .keyboardLayout .k6{
- left: 450px;
-}
-#keyboard_view .keyboardLayout .k7{
- left: 525px;
-}
-#keyboard_view .keyboardLayout .k8{
- left: 600px;
-}
-#keyboard_view .keyboardLayout .k9{
- left: 675px;
-}
-#keyboard_view .keyboardLayout .k10{
- left: 38px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k11{
- left: 113px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k12{
- left: 188px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k13{
- left: 263px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k14{
- left: 338px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k15{
- left: 413px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k16{
- left: 488px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k17{
- left: 563px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k18{
- left: 638px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k19{
- left: 713px;
- top: 62px;
-}
-#keyboard_view .keyboardLayout .k20{
- left: 0px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k21{
- left: 75px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k22{
- left: 150px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k23{
- left: 225px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k24{
- left: 300px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k25{
- left: 375px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k26{
- left: 450px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k27{
- left: 525px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k28{
- left: 600px;
- top: 124px;
-}
-#keyboard_view .keyboardLayout .k29{
- left: 675px;
- top: 124px;
-}
-#infoTable.infoTable {
- width: 400px;
- height: 96px;
- top: 308px;
- left: 801px;
- background-color: #383737;
- color: white;
- border: 1px solid gray;
- overflow: hidden;
-}
-
-#infoTable .sdlGPLabel {
- width: 190px;
- border-right: 1px solid #14100F;
- height: 96px;
- position: relative;
- float: left;
-}
-
-#infoTable .sdlGPData {
- position: relative;
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- width: 203px;
- height: 18px;
-}
-
-#buttonControls .ContainerControlls {
- left: 34px;
- background:
- url(../images/home/controlButtons/backGroundControllButtons.png)
- no-repeat;
- width: 200px;
- height: 200px;
-}
-
-#buttonControls .UpBtn {
- background: url(../images/home/controlButtons/UpButton.png) no-repeat;
- background-position: -32px 0;
- width: 137px;
- height: 64px;
- left: 32px;
- -webkit-transition: 0.2s;
-}
-
-#TUNEUP.pressed {
- background: url(../images/home/controlButtons/UpButton_pressed.png)
- !important;
- background-position: -32px 0 !important;
- width: 137px !important;
- height: 69px !important;
- left: 32px !important;
-}
-
-#buttonControls .DownBtn {
- background: url(../images/home/controlButtons/DownButton.png) no-repeat;
- background-position: -32px -132px;
- width: 137px;
- height: 65px;
- top: 132px;
- left: 32px;
- -webkit-transition: 0.2s;
-}
-
-#TUNEDOWN.pressed {
- background: url(../images/home/controlButtons/DownButton_pressed.png)
- no-repeat;
- background-position: -32px -132px !important;
- width: 137px !important;
- height: 65px !important;
- top: 132px !important;
- left: 32px !important;
-}
-
-#buttonControls .LeftBtn {
- background: url(../images/home/controlButtons/LeftButton.png) no-repeat;
- width: 63px;
- height: 138px;
- background-position: -3px -31px;
- left: 3px;
- top: 31px;
- -webkit-transition: 0.2s;
-}
-
-#SEEKLEFT.pressed {
- background: url(../images/home/controlButtons/LeftButton_pressed.png)
- no-repeat;
- width: 63px !important;
- height: 138px !important;
- background-position: -3px -31px !important;
- left: 3px !important;
- top: 31px !important;
-}
-
-#buttonControls .RightBtn {
- background: url(../images/home/controlButtons/RightButton.png) no-repeat;
- background-position: -131px -31px;
- width: 68px;
- height: 139px;
- left: 131px;
- top: 31px;
- -webkit-transition: 0.2s;
-}
-
-#SEEKRIGHT.pressed {
- background: url(../images/home/controlButtons/RightButton_pressed.png)
- no-repeat;
- background-position: -131px -31px !important;
- width: 68px !important;
- height: 139px !important;
- left: 131px !important;
- top: 31px !important;
-}
-
-#buttonControls .OkBtn {
- background: url(../images/home/controlButtons/OkButton.png) no-repeat;
- background-position: -55px -55px;
- width: 89px;
- height: 90px;
- left: 55px;
- top: 55px;
- -webkit-transition: 0.2s;
-}
-
-#OK.pressed {
- background: url(../images/home/controlButtons/OkButton_pressed.png)
- no-repeat;
- background-position: -55px -55px !important;
- width: 89px !important;
- height: 90px !important;
- left: 55px !important;
- top: 55px !important;
-}
-
-#app_controlButtons .sendData {
- top: 252px !important;
- left: 1049px !important;
- width: 150px !important;
- font-size: 16px !important;
-}
-
-#app_controlButtons .btnNotPressed {
- width: 40px;
- height: 40px;
- left: 0px;
- top: 200px;
- -webkit-transition: 0.2s;
- border-radius: 8px;
- background-color: #1D1D1D;
- border: 1px solid #383737;
- box-shadow: inset 5px 5px 10px #383737, inset -3px -3px 10px black;
- -webkit-transition: 0.2s;
- font-size: 38px;
- line-height: 42px;
- text-align: center;
- position: relative;
- float: left;
- margin-left: 10px;
- margin-top: 10px;
-}
-
-}
-#app_controlButtons .languageSelect {
- position: absolute;
- width: 150px;
- height: 30px;
- color: white;
- background: #393939;
-}
-
-#app_controlButtons .languageSelect option {
- background: #393939;
-}
-
-#UILanguages.languageSelect {
- top: 110px;
- left: 1028px;
-}
-
-#TTSVRLanguages.languageSelect {
- top: 170px;
- left: 1028px;
-}
-
-#app_controlButtons .UILanguagesLabel {
- top: 91px;
- left: 1028px;
- width: 150px;
-}
-
-#app_controlButtons .TTSVRLanguagesLabel {
- top: 151px;
- left: 1028px;
- width: 160px;
-}
-
-#app_controlButtons .appUILanguagesLabel {
- top: 91px;
- left: 1195px;
- width: 250px;
-}
-
-#app_controlButtons .appTTSVRLanguagesLabel {
- top: 151px;
- left: 1195px;
- width: 250px;
-}
-
-#app_controlButtons .appUILang {
- top: 117px;
- left: 1195px;
- width: 150px;
-}
-
-#app_controlButtons .appTTSVRLang {
- top: 176px;
- left: 1195px;
- width: 150px;
-}
-
-#app_controlButtons .sendDataCheckBox {
- left: 1158px;
- position: absolute;
- top: 275px;
-}
-
-#app_controlButtons .sendDataLabel {
- top: 275px;
- left: 1180px;
- width: 160px;
-}
-
-#buttonControls .btnNotPressed.pressed {
- box-shadow: inset 5px 5px 10px black, inset -3px -3px 10px #383737;
- line-height: 45px;
-}
-
-#app_controlButtons .languageSelect {
- position: absolute;
- width: 150px;
- height: 30px;
- color: white;
- background: #393939;
-}
-
-#app_controlButtons .languageSelect option {
- background: #393939;
-}
-
-#UILanguages.languageSelect {
- top: 110px;
- left: 1028px;
-}
-
-#TTSVRLanguages.languageSelect {
- top: 170px;
- left: 1028px;
-}
-
-#app_controlButtons .UILanguagesLabel {
- top: 91px;
- left: 1028px;
- width: 150px;
-}
-
-#app_controlButtons .TTSVRLanguagesLabel {
- top: 151px;
- left: 1028px;
- width: 160px;
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/css/general.css b/SDL_Core/src/components/HMI/css/general.css
deleted file mode 100644
index 07efbaa9e..000000000
--- a/SDL_Core/src/components/HMI/css/general.css
+++ /dev/null
@@ -1,1516 +0,0 @@
-/*GENERAL CSS*/
-* {
- /*Reset default browser styles*/
- margin: 0;
- padding: 0;
- border: none;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- -webkit-user-select: none;
-}
-
-html, body {
- /*GLOBAL HTML and BODE Dimansions*/
- width: 100%;
- min-height: 100%;
-}
-
-body {
- /*FONT FAMILY*/
- font-family: sans-serif;
- /*Defaul font size*/
- font-size: 16px;
- background-color: #000;
- color: #fff;
- overflow: hidden;
-}
-
-/*Default style for all images*/
-img {
- border-width: 0px;
- border-style: none;
- margin: 0px;
- padding: 0px;
- z-index: 1000;
- pointer-events: none;
-}
-
-/*Default style for all DIVs*/
-div {
- position: absolute;
- margin: 0;
- padding: 0;
-}
-
-.ffw-button {
- cursor: pointer;
- background: url(../images/common/button.png) repeat-x;
-}
-
-.ffw-button.pressed {
- background-position: bottom;
-}
-
-.windowText {
- top: 190px;
- width: 800px;
- font-size: 80px;
- color: white;
- text-align: center;
-}
-
-/* Home view */
-#home {
- background: url(../images/home/home_main_image.png) no-repeat;
- width: 800px;
- height: 369px;
- top: 56px;
-}
-
-/* Climate Status */
-#status_climate {
- bottom: 0px;
- right: 0px;
- text-align: right;
- font-size: 21px;
- width: 324px;
- height: 48px;
- cursor: pointer;
- background: url(../images/common/climate-status-bg.png) no-repeat;
- z-index: 1;
-}
-
-#status_climate_label {
- display: block;
- width: 100%;
- visibility: hidden;
-}
-
-#status_climate_label span {
- padding-right: 11px;
-}
-
-/* Navigation Status */
-#status_nav {
- top: 0px;
- right: 0px;
- text-align: right;
- font-size: 21px;
- width: 324px;
- height: 48px;
- cursor: pointer;
- background: url(../images/common/nav-status-bg.png) no-repeat;
- z-index: 1;
-}
-
-#navigation_status_label {
- width: 100%;
- display: block;
- visibility: hidden;
-}
-
-#navigation_status_label span {
- padding-right: 11px;
-}
-
-/*FORD CONTAINER DEFAULT DIMANSIONS */
-#app {
- /*position:relative;*/
- width: 800px;
- height: 480px;
- /*overflow: hidden;
- Mac font smoothing */
- -webkit-font-smoothing: antialiased;
- /*margin: 25px auto;*/
-}
-
-/* TTS popUp*/
-#TTSPopUp.TTSPopUp {
- opacity: 0;
- left: 500px;
- width: 295px;
- height: 100px;
- z-index: 1;
- border-radius: 10 PX;
- top: 8px;
- -webkit-transition: opacity 1s ease-in-out;
- display: none;
-}
-
-#TTSPopUp .popUp {
- width: 294px;
- height: 98px;
- border: 1px solid black;
- border-radius: 10px;
- background-color: black;
- border: #A6A6A6 solid 2px;
- color: white;
-}
-
-#TTSPopUp .message {
- top: 10px;
- left: 10px;
- width: 278px;
- height: 81px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#TTSPopUp.active {
- opacity: 1;
- display: block;
-}
-
-/* Diver Distraction PopUp */
-#driverDistraction.driverDistractionWindow {
- left: 0;
- top: 0;
- width: 800px;
- height: 480px;
- background: rgba(0, 0, 0, 0.7);
- z-index: 30000;
- opacity: 0;
- display: none;
-}
-
-#driverDistraction .driverDistraction {
- left: 200px;
- width: 400px;
- height: 200px;
- z-index: 2;
- top: 140px;
- -webkit-transition: opacity 1s ease-in-out;
- background-color: black;
- border: #A6A6A6 solid 2px;
- border-radius: 6px;
-}
-
-#driverDistraction.active {
- opacity: 1;
- display: block;
-}
-
-#driverDistraction .driverDistractionText {
- top: 224px;
- left: 210px;
- width: 374px;
- height: 20px;
- text-align: center;
- font-size: 28px;
- z-index: 2;
-}
-
-/* UI popUp*/
-/* VR popUp*/
-#VRPopUp.VRPopUp {
- opacity: 0;
- left: 50px;
- width: 700px;
- height: 340px;
- background-color: black;
- z-index: 2;
- border-radius: 10 PX;
- top: 70px;
- -webkit-transition: opacity 1s ease-in-out;
- display: none;
-}
-
-#VRPopUp span {
- margin-left: 15px;
-}
-
-#VRPopUp .popUp {
- width: 698px;
- height: 338px;
- border: 1px solid white;
- border-radius: 10px;
-}
-
-#VRPopUp .message1 {
- top: 10px;
- left: 10px;
- width: 278px;
- height: 81px;
-}
-
-#VRPopUp .message2 {
- top: 40px;
- left: 10px;
- width: 278px;
- height: 81px;
-}
-
-#VRPopUp.active {
- opacity: 1;
- display: block;
- transition: all 1s;
-}
-
-#VRPopUp .list {
- position: absolute;
- width: 629px;
- height: 251px;
- border-radius: 2px;
- left: 35px;
- top: 70px;
-}
-
-#VRPopUp .list-content {
- border: none;
-}
-
-#VRPopUp .list-item {
- position: relative;
- width: 100%;
- height: 48px;
- font-size: 20px;
- line-height: 50px;
- border: 1px solid #393939;
-}
-
-#VRPopUp .list-content {
- width: 578px;
-}
-
-#VRPopUp .VRLabel {
- top: 10px;
- width: 550px;
- left: 35px;
- height: 20px;
- padding: 15px;
- background: #393939;
-}
-
-#VRPopUp .VRImage {
- right: 25px;
- width: 50px;
- height: 50px;
- top: 10px;
- background: url(../images/home/controlButtons/vrImage.png) no-repeat;
- background-size: contain;
-}
-
-/*WRAPER FOR CONTENT VIEW*/
-#app_active_view {
- position: absolute;
- width: 800px;
- height: 480px;
-}
-
-#html5Player {
- position: absolute;
- z-index: 1;
- width: 800px;
- height: 480px;
-}
-
-#html5Player.visible {
- -webkit-transform: translateX(0px) !important;
-}
-
-#mode {
- position: relative;
- margin: 150px auto;
- width: 150px;
-}
-
-/* Image preloader block*/
-#preloader {
- position: absolute;
- left: -9999px;
- top: -9999px;
-}
-
-/*CLOCK*/
-#clock {
- font-size: 28px;
- text-align: center;
- width: 225px;
- height: 50px;
- position: relative;
- float: left;
- pointer-events: all;
- cursor: pointer;
-}
-
-#clock.mcs {
- width: 225px;
-}
-
-#time_num {
- width: 100%;
- padding: 10px;
- margin-left: 5px;
-}
-
-#app_top_menu_cont {
- z-index: 10000;
- top: 0px;
- left: 275px;
- position: relative;
- pointer-events: none;
-}
-
-#top_controls {
- width: 322px;
- height: 58px;
- background: url("../images/common/header_bg.png") no-repeat;
- z-index: 2;
-}
-
-.not-visible {
- visibility: hidden !important;
-}
-
-/* Universal class to show hidden elements */
-.visible {
- visibility: visible !important;
-}
-
-/* Universal class to show transparent elements */
-.show {
- opacity: 1 !important;
-}
-
-.arrow-ico {
- position: absolute;
- right: 10px;
-}
-
-.right_text {
- float: right;
- margin-right: 5px;
-}
-
-.hidden_display {
- display: none !important;
-}
-
-.visible_display {
- display: block !important;
-}
-
-/*STATUS BAR*/
-.status_bar {
- z-index: 2001;
- line-height: 50px;
-}
-
-.selected {
- display: none;
-}
-
-/*BOTTOM Control BUTTONS*/
-#app_bottom_controlls {
- z-index: 11000;
- bottom: 0px;
- left: 275px;
- width: 252px;
- height: 59px;
- /*background: url(../images/common/bottom_cont_bg.png) no-repeat;*/
- overflow: hidden;
- pointer-events: none;
-}
-
-#home_active {
- z-index: 2002;
- bottom: 0px;
- left: 275px;
- width: 250px;
- height: 58px;
- background: url("../../images/common/home_active.png") no-repeat;
-}
-
-#home_but {
- height: 59px;
- width: 73px;
- cursor: pointer;
- z-index: 1000;
- background: url(../images/home/bottom_controlls_full.png) no-repeat;
- background-position: -90px -59px;
- position: relative;
- float: left;
- pointer-events: none;
-}
-
-#home_but.large {
- width: 126px;
- background-position: 0px -177px;
-}
-
-#home_but.large.selected {
- width: 126px;
- background-position: 0px -118px;
-}
-
-#home_but.selected {
- background-position: -90px 0px;
- display: block;
-}
-
-#home_but_click {
- height: 59px;
- width: 73px;
- cursor: pointer;
- z-index: 1001;
- position: absolute;
- pointer-events: all;
-}
-
-#home_but_click.large {
- width: 125px;
- height: 115px;
- -webkit-transform: skew(0deg, -42deg);
-}
-
-/*INFO BUTTON*/
-#info_but_click {
- height: 117px;
- width: 88px;
- cursor: pointer;
- z-index: 1001;
- position: absolute;
- pointer-events: all;
- -webkit-transform: skew(0deg, -52deg);
-}
-
-#info_but {
- height: 59px;
- width: 90px;
- cursor: pointer;
- background: url(../images/home/bottom_controlls_full.png) no-repeat;
- background-position: 0px -59px;
- position: relative;
- float: left;
- z-index: 1001;
- pointer-events: none;
- -webkit-border-top-left-radius: 10px;
-}
-
-#info_but.selected {
- background-position: 0px 0px;
- display: block;
-}
-
-/*SETTINGS BUTTON*/
-#setting_but {
- width: 89px;
- height: 59px;
- cursor: pointer;
- background: url(../images/home/bottom_controlls_full.png) no-repeat;
- background-position: -162px -59px;
- position: relative;
- float: left;
- pointer-events: none;
-}
-
-#setting_but.large {
- width: 126px;
- background-position: -126px -177px;
-}
-
-#setting_but.large.selected {
- width: 126px;
- background-position: -126px -118px;
-}
-
-#setting_but.selected {
- background-position: -162px 0px;
- display: block;
-}
-
-#setting_but_click {
- width: 83px;
- height: 110px;
- cursor: pointer;
- position: absolute;
- -webkit-transform: skew(0deg, 52deg);
- left: 1px;
- top: 4px;
- z-index: 1000;
- pointer-events: all;
-}
-
-#setting_but_click.large {
- width: 158px;
- height: 155px;
-}
-
-/*HIDDEN FOR CONTENT BLOCKS*/
-.hidden {
- -webkit-transform: translateX(-2000px);
- -moz-transform: translateX(-2000px);
-}
-
-/*ACTIVE VISIBLE FOR CONTENT BLOCK*/
-.inactive_state {
- -webkit-transform: translateX(-2000px);
- -moz-transform: translateX(-2000px);
-}
-
-.active_state {
- -webkit-transform: translateX(0px) !important;
- -moz-transform: translateX(0px) !important;
-}
-
-.passive_button_color {
- color: #999 !important;
-}
-
-/*MEDIA BLOCK CONTAINER*/
-#media {
- width: 800px;
- height: 480px;
- background: url(../images/media/bg.png) no-repeat;
-}
-
-/****************************** FOR MEDIA VIEW************************************************/
-/*#media, #browseUsbHD {
-background: url(../images/media/bg.png) no-repeat;
-}
-
-#media_view {
-width: 800px;
-height: 480px;
-}
-
-#media_view #cntrlMenu {
-position: relative;
-margin-top: 90px;
-}*/
-/*Video Player*/
-/*******Player Controlls View********/
-#video_player_view {
- top: 85px;
- left: 93px;
- z-index: 2002;
- display: block;
-}
-
-/*Holder for all progressbar elements*/
-#video_player_view .progressline_holder {
- display: block;
- width: 537px;
- height: 10px;
- cursor: pointer;
- background: url(../images/player/player_prog_bg.png) no-repeat;
-}
-
-/*Style to fix actual width for progress bar concerning width of progrees bar mark*/
-.progressline_width_fix {
- width: 537px;
- position: absolute;
-}
-
-/*Progressbar*/
-#video_player_view .progressbar {
- display: block;
- height: 10px;
- background: url(../images/player/prog_ind.png) no-repeat;
- position: relative;
- float: left;
-}
-
-/*Current time*/
-.current_time {
- width: 33px;
- height: 15px;
- top: -4px;
- left: -55px;
- font-weight: bold;
-}
-
-/*Total time*/
-.total_time {
- width: 33px;
- height: 15px;
- left: 546px;
- top: -4px;
- font-weight: bold;
-}
-
-/*Drag Area*/
-.drag_area {
- width: 561px;
- position: relative;
- float: left;
- height: 10px;
-}
-
-/*Progress bar mark*/
-#mark {
- position: relative;
- float: left;
- bottom: 19px;
- left: -20px;
- background: url(../images/player/player_free_control.png) no-repeat;
- width: 50px;
- height: 50px;
-}
-
-#mark.active {
- background: url(../images/player/player_active_control.png) no-repeat !important;
- bottom: 20px !important;
- left: -21px !important;
- width: 52px !important;
- height: 52px !important;
-}
-
-/*Back Button*/
-#back {
- width: 80px;
- height: 50px;
- cursor: pointer;
- top: 60px;
- left: 140px;
- border: 1px solid #393939;
-}
-
-#back .ico {
- top: 13px;
- left: 20px;
- position: relative;
-}
-
-/* Forward Button*/
-#frw {
- width: 79px;
- height: 49px;
- cursor: pointer;
- top: 60px;
- left: 347px;
-
-]
-border:
-
-1
-px solid #393939
-
-;
--webkit-border-radius:
-
-3
-px
-
-;
- }
-
-#frw .ico {
- top: 13px;
- left: 24px;
- position: relative;
-}
-
-/*Play Button*/
-#play {
- width: 79px;
- height: 49px;
- cursor: pointer;
- top: 60px;
- left: 244px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
-}
-
-#play .play {
- top: 13px;
- left: 31px;
- position: relative;
-}
-
-#play .pause {
- top: 10px;
- left: 28px;
- position: relative;
-}
-
-/*Stop Button*/
-#stop {
- width: 79px;
- height: 49px;
- cursor: pointer;
- top: -18px;
- left: 585px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
-}
-
-#stop .ico {
- top: 17px;
- left: 18px;
- position: relative;
-}
-
-/********************FOR TEST PURPOSE ONLY********************/
-.centered {
- position: absolute;
- width: 300px;
- height: 200px;
- border: 2px solid #999;
- color: white;
- text-align: center;
- margin: 100px auto;
- line-height: 190px;
- font-size: 24px;
- left: 240px;
-}
-
-/**************************FOR LIST***************************/
-/* List */
-.list {
- position: relative;
- overflow: hidden;
-}
-
-.list-content {
- border-top: 1px solid #393939;
- border-left: 1px solid #393939;
- border-right: 1px solid #393939;
-}
-
-/* List item */
-.list-item {
- position: relative;
- width: 100%;
- height: 49px;
- font-size: 20px;
- line-height: 50px;
- border-bottom: 1px solid #393939;
-}
-
-.list-item .ico {
- height: 49px;
- float: left;
-}
-
-.list-item span {
- /*position: absolute*/
-}
-
-/* List item background */
-.list-item.notpressed {
- background-image: url(../images/list/list_item_bg.png);
-}
-
-.list-item .highLighted {
-
-}
-
-/*************************FOR SCROLLBAR*************************/
-/*
-.scrollBar{
- position: relative;
- width: 48px;
- background: black;
- border: 1px solid #393939;
- border-top-right-radius: 1px;
- border-top-left-radius: 1px;
- border-bottom-right-radius: 1px;
- border-bottom-left-radius: 1px;
- float: right;
-}
-*/
-.scrollbar {
- position: absolute;
- top: 0px;
- right: 0px;
- width: 48px;
- background: black;
- border: 1px solid #393939;
- border-top-right-radius: 2px;
- border-top-left-radius: 2px;
- border-bottom-right-radius: 2px;
- border-bottom-left-radius: 2px;
-}
-
-.sb-content {
- width: 48px;
- background: black;
- border: 1px solid #393939;
- border-top-right-radius: 2px;
- border-top-left-radius: 2px;
- border-bottom-right-radius: 2px;
- border-bottom-left-radius: 2px;
-}
-
-/* Top button */
-.sb-top {
- height: 48px;
- width: 48px;
- border-bottom: #393939 1px solid;
- position: relative;
- cursor: pointer;
-}
-
-/* Background of scrollbar */
-.sb-body {
- height: 148px;
- width: 46px;
- background-color: #262626;
- margin: 1px;
- position: relative;
-}
-
-/* Bar */
-.sb-bar {
- width: 46px;
- height: 146px;
- background: #464646;
- position: relative;
- bottom: 10px;
- -webkit-transition: top 0.2s ease-out;
-}
-
-/* Bottom button */
-.sb-bottom {
- height: 48px;
- width: 48px;
- border-top: #393939 1px solid;
- position: absolute;
- cursor: pointer;
- bottom: 0px;
-}
-
-/* Buttons image position */
-.sb-bottom img, .sb-top img {
- margin-top: 13px;
- margin-left: 13px;
-}
-
-/* List item button background */
-.list-item.pressed {
- background-image: url(../images/list/list_item_pressed.png);
-}
-
-/** Background for pressed button */
-.button.pressed {
- background-image: url(../images/list/list_item_pressed.png);
-}
-
-/* Hide function */
-.is-disabled {
- display: none;
-}
-
-.hide {
- visibility: hidden;
-}
-
-/* Disabled list items */
-.disabled {
- color: #999;
-}
-
-.disabled .ico, .disabled .right_ico {
- opacity: .3;
-}
-
-.disabled .arrow-ico {
- opacity: .3;
-}
-
-#sing {
- width: 19px;
- height: 27px;
- left: 13px;
- top: 13px;
-}
-
-#sing.white {
- background: url(../images/help/white_help.png) no-repeat;
-}
-
-#sing.yellow {
- background: url(../images/help/yellow_help.png) no-repeat;
-}
-
-/******************** FOR FAQ ********************************/
-#faq_btn {
- cursor: pointer;
- width: 145px;
- height: 53px;
- background: url(../images/help/faq_top_btn.png) no-repeat;
- top: 0;
- left: 110px;
- z-index: 0;
- pointer-events: none;
- -webkit-transition: left 0.5s ease-in-out;
-}
-
-.faq-pressed {
- left: 0px !important;
-}
-
-#faq_btn.pressed {
- background: url(../images/help/faq_top_btn_pressed.png) no-repeat !important;
-}
-
-#faq_btn .ico {
- position: absolute;
- right: 32px;
- top: 8px;
-}
-
-#faq_btn_c {
- width: 118px;
- height: 50px;
- -webkit-transform: skewX(-43deg);
- z-index: 1;
- cursor: pointer;
- pointer-events: all;
-}
-
-#faq_btn .ind_inact {
- background: url(../images/help/ind_vert_def.png) no-repeat;
- position: absolute;
- right: 32px;
- top: 8px;
- width: 19px;
- height: 32px;
-}
-
-#faq_btn .ind_act {
- background: url(../images/help/ind_vert_active.png) no-repeat;
- position: absolute;
- right: 32px;
- top: 8px;
- width: 19px;
- height: 32px;
-}
-
-.button {
- background-image: url(../images/list/list_item_bg.png);
- cursor: pointer;
-}
-
-.button img {
- float: left;
-}
-
-/* default style */
-* {
- margin: 0;
- padding: 0;
- border: 0;
- -webkit-user-select: none;
-}
-
-/******************* For FAQ View *******************/
-#fag_view {
- font-size: 20px;
- display: block;
- background: url(../images/help/faq_bg.png) no-repeat;
- width: 800px;
- height: 384px;
- position: absolute;
- top: 48px;
-}
-
-#faq_view_list {
- position: relative;
- margin-left: 115px;
- margin-top: 34px;
- height: 251px;
- width: 630px;
- float: left;
-}
-
-#faq_view_list .list-content {
- width: 570px;
-}
-
-#fag_view .list-item {
- position: relative;
- width: 570px;
- height: 49px;
- font-size: 20px;
- line-height: 50px;
- border-bottom: 1px solid #393939;
- cursor: pointer;
- float: left;
-}
-
-#fag_view .list-item span {
- left: 5px;
- margin-top: 18px;
- margin-left: 17px;
-}
-
-/* Faq bottom text*/
-#faq_bottom {
- bottom: 19px;
- width: 764px;
- height: 50px;
- font-size: 18px;
- float: left;
- margin-top: 31px;
- margin-left: 36px;
-}
-
-#faq_bottom div {
- float: left;
- width: 764px;
-}
-
-#faq_bottom .second-line {
- top: 22px;
-}
-
-#settings_view {
- width: 800px;
- height: 480px;
-}
-
-.block {
- display: block !important;
-}
-
-.test_blur {
- width: 800px;
- height: 480px;
- top: -55px;
- z-index: 1001;
- opacity: .6;
- background-color: black;
- box-shadow: 3px;
-}
-
-.pointer {
- cursor: pointer !important;
-}
-
-/*CAUTION MESSAGE*/
-#warning_view {
- width: 800px;
- height: 480px;
- z-index: 12001;
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(218, 218, 218)), color-stop(0.3, rgb(0, 0, 0)));
-}
-
-#warning_view.fr .text {
- font-size: 23px;
-}
-
-#warning_view .message {
- width: 744px;
- height: 340px;
- position: relative;
- margin: 0 auto;
- top: 15px;
-}
-
-#warning_view .warning_text {
- position: relative;
- margin: 0 auto;
- width: 216px;
- font-size: 42px;
- font-weight: bold;
- top: 20px;
- text-shadow: 1px 1px 3px white;
- color: #CC2A2A;
-}
-
-#warning_view .text {
- font-size: 25px;
- position: relative;
- top: 15px;
- font-weight: bold;
-}
-
-#warning_view .okbut {
- width: 130px;
- height: 51px;
- position: relative;
- top: 30px;
- cursor: pointer;
- float: right;
- margin-right: 83px;
- display: none;
- font-size: 20px;
- text-align: center;
- line-height: 50px;
-}
-
-.hideWarning {
- width: 0px !important;
- overflow: hidden;
- z-index: -1 !important;
-}
-
-.fadeWarning {
- opacity: 0;
- transition: opacity 1s;
- -moz-transition: opacity 1s;
- -webkit-transition: opacity 1s;
- -o-transition: opacity 1s;
-}
-
-#warning_view.fadeAnimation {
- -webkit-animation-name: opacity;
- -webkit-animation-duration: 1s;
- -webkit-animation-timing-function: linear;
- -webkit-animation-fill-mode: forwards;
-}
-
-@
--webkit-keyframes opacity {
-
-from {
- opacity: 1;
-
-}
-
-to {
- opacity: 0;
-}
-
- }
-
-/* Welcome Orientation View*/
-#app_welcome_orientation_view {
- width: 800px;
- height: 480px;
- z-index: 12000;
-}
-
-#app_welcome_orientation_balck_mask_view {
- width: 800px;
- height: 480px;
- background: #000;
- opacity: 0.75;
-}
-
-#app_welcome_orientation_popup_text {
- position: relative;
- margin: 0px auto;
- font-size: 30px;
- text-align: center;
- width: 410px;
- margin-top: 18px;
-}
-
-#app_welcome_orientation_denypopup_text {
- position: relative;
- margin: 0px auto;
- font-size: 28px;
- text-align: center;
- width: 460px;
- margin-top: 53px;
-}
-
-#app_welcome_orientation_popup_buttons {
- width: 266px;
- height: 53px;
- border: 1px solid #333;
- position: relative;
- margin: 20px auto 0px;
-}
-
-#app_welcome_orientation_popup_lable {
- position: relative;
- width: 479px;
- height: 70px;
- border: 1px solid #fff;
- text-align: center;
- margin: 0px auto;
- margin-top: 70px;
- font-size: 25px;
- font-family: Helvetica;
-}
-
-#app_welcome_orientation_popup_lable span {
- position: relative;
- top: 5px;
- width: 432px;
-}
-
-#app_welcome_orientation_popup_view, #wo_denypopup {
- width: 546px;
- height: 346px;
- background: #000;
- z-index: 12002;
- left: 134px;
- top: 46px;
- border: 2px solid #A28542;
- -webkit-border-radius: 4px;
-}
-
-#wo_popup_btn_divider {
- width: 4px;
- height: 48px;
- background: url(../images/common/divider.png) no-repeat;
- left: 131px;
- z-index: 1;
-}
-
-#wo_popup_yes_button, #wo_popup_no_button {
- height: 52px;
- width: 132px;
- cursor: pointer;
- position: relative;
- float: left;
- font-size: 20px;
- text-align: center;
- line-height: 52px;
-}
-
-#wo_popup_yes_button {
- border-right: 1px solid #000;
-}
-
-#wo_popup_no_button {
- border-left: 1px solid #393939;
-}
-
-#wo_popup_denypopup_ok_button {
- width: 238px;
- height: 48px;
- background: url(../images/common/bt_bg.png) repeat-x;
- cursor: pointer;
- position: relative;
- float: left;
- font-size: 20px;
- font-weight: bold;
- text-align: center;
- line-height: 50px;
- border: 1px solid #333;
- left: 155px;
- top: 80px;
- -webkit-border-radius: 4px;
-}
-
-#woSkippButton {
- width: 80px;
- height: 50px;
- cursor: pointer;
- top: 370px;
- left: 710px;
- font-size: 21px;
- text-align: center;
- line-height: 48px;
- z-index: 10000;
- border: 1px solid white;
- -webkit-border-radius: 3px;
- background: url(../images/common/skippbuttonbg_pressed.png) no-repeat;
- opacity: 0.75;
- display: none;
-}
-
-#woSkippButton .right_text {
- margin-top: 2px;
-}
-
-#woSkippButton.pressed {
- background: url(../images/common/skippbuttonbg_pressed.png) no-repeat !important;
-}
-
-#wo_popup_yes_button.pressed, #wo_popup_no_button.pressed, #wo_popup_denypopup_ok_button.pressed {
- background: url(../images/common/bt_bg_pressed.png) repeat-x !important;
-}
-
-/* END Welcome Orientation View*/
-/* Video Error Popup*/
-#video_error_popup {
- background: black;
- border: 1px solid #A03333;
- -webkit-border-radius: 3px;
- font-size: 23px;
- font-weight: bold;
- left: 308px;
- text-align: center;
- top: 170px;
- z-index: 12100;
- position: absolute;
- padding: 10px;
- display: none;
-}
-
-.mft_indicator {
- opacity: 0;
-}
-
-/* Lable plus Button*/
-.lablePlusButton .button {
- float: right;
- right: 0px;
- width: 323px;
- height: 49px;
- border-left: 1px solid #393939;
-}
-
-.lablePlusButton .lable span, .lablePlusButton .button span {
- margin-left: 13px;
-}
-
-.lablePlusButton .button.single {
- width: 148px;
- height: 28px;
- border: 1px solid #393939;
- border-radius: 2px;
- margin-top: 10px;
- margin-right: 10px;
- text-align: center;
- line-height: 28px;
- float: right;
-}
-
-.lablePlusButton .button.single span {
- margin: 0px;
-}
-
-/* ****************Select System Popup *********************** */
-#select_sysytem_view {
- width: 796px;
- height: 475px;
- top: 1px;
- border: 2px solid #926100;
- background: #000;
- z-index: 12002;
- -webkit-border-radius: 4px;
-}
-
-/* header lable*/
-#select_system_heading_lable {
- position: relative;
- font-size: 30px;
- text-align: center;
- margin-top: 25px;
- margin-bottom: 30px;
-}
-
-/* content container*/
-#select_system_container {
- width: 756px;
- height: 200px;
- position: relative;
- margin: 0px auto;
- border: 1px solid #393939;
-}
-
-/* vehicle select list*/
-#settings_list {
- height: 130px;
- position: relative;
-}
-
-/* vehicle select list container*/
-#select_system_list {
- width: 545px;
- position: relative;
- float: right;
- margin-top: 15px;
- margin-right: 20px;
-}
-
-/* vehicle select list buttons*/
-#settings_list .button {
- position: relative;
- width: 135px;
- height: 48px;
- font-size: 20px;
- text-align: center;
- line-height: 48px;
- float: left;
- border-right: 1px solid #393939;
- border-top: 1px solid #393939;
- border-bottom: 1px solid #393939;
-}
-
-#settings_list .button.left-border {
- border-left: 1px solid #393939;
-}
-
-#settings_list .button.active {
- background: url(../images/settings/btn-48h-gray-active.png) repeat-x !important;
- color: #000;
-}
-
-#settings_list .button.bottom {
- margin-top: 2px;
-}
-
-/* select climate style lable*/
-#select_system_label {
- font-size: 20px;
- width: 135px;
- position: relative;
- float: left;
- margin-left: 10px;
- margin-top: 15px;
-}
-
-/* Navigation select block*/
-#navsdcard {
- height: 70px;
- position: relative;
- border-bottom: 1px solid #393939;
-}
-
-/* Navigation select block button container*/
-#sdnav_buttons {
- position: relative;
- float: right;
- margin-top: 10px;
- margin-right: 20px;
-}
-
-/* Navigation select block button*/
-#navsdcard .button {
- width: 120px;
- height: 48px;
- border: 1px solid #393939;
- text-align: center;
- font-size: 20px;
- line-height: 48px;
- font-weight: bold;
-}
-
-#navsdcard .button.active {
- background: url(../images/settings/btn-48h-gray-active.png) repeat-x !important;
- color: #000;
-}
-
-#navsdcard_no_btn {
- position: relative;
- float: right;
-}
-
-#navsdcard_yes_btn {
- position: relative;
- float: left;
-}
-
-/* navigationApp select lable*/
-#sdnav_label {
- position: relative;
- float: left;
- font-size: 20px;
- margin-top: 15px;
- margin-left: 10px;
-}
-
-/* Submit button*/
-#select_system_submit {
- width: 130px;
- height: 50px;
- z-index: 12002;
- position: relative;
- border: 1px solid #393939;
- text-align: center;
- font-size: 25px;
- font-weight: bold;
- line-height: 50px;
- margin: 50px auto;
-}
-
-/* Info Lable*/
-#select_system_info {
- position: relative;
- text-align: center;
- font-size: 25px;
- margin-top: 25px;
-}
-
-#select_system_info span {
- border: 1px solid #fff;
- padding: 5px 15px 5px 15px;
-}
diff --git a/SDL_Core/src/components/HMI/css/info.css b/SDL_Core/src/components/HMI/css/info.css
deleted file mode 100644
index 34776e6cb..000000000
--- a/SDL_Core/src/components/HMI/css/info.css
+++ /dev/null
@@ -1,671 +0,0 @@
-#status_info {
- top: 0px;
- right: 0px;
- text-align: right;
- font-size: 21px;
- width: 324px;
- height: 48px;
- cursor: pointer;
- background: url(../images/common/nav-status-bg.png) no-repeat;
- z-index: 1;
-}
-
-#status_info_label {
- width: 100%;
- display: block;
-}
-
-#status_info_label span {
- padding-right: 11px;
-}
-
-#info_view {
- width: 800px;
- height: 480px;
-}
-
-#info_view.green_bg {
- background: url(../images/nav/bg.png) no-repeat;
-}
-
-#info_leftMenu {
- background: #333;
- width: 150px;
- height: 300px;
- top: 90px;
-}
-
-#info_leftMenu .menu-item.info_active {
- background: url("../images/info/menu_active.png") repeat-x;
-}
-
-#info_leftMenu .menu-item {
- z-index: 201;
- position: relative;
- width: 150px;
- height: 50px;
- cursor: pointer;
-}
-
-#info_leftMenu .menu-item span {
- position: absolute;
- left: 50px;
- width: 100px;
- height: 50px;
- font-size: 18px;
- line-height: 50px;
- white-space: nowrap;
- overflow: hidden;
-}
-
-#info_leftMenu .ico {
- height: 50px;
- width: 50px;
-}
-
-#info_leftMenu .settings_active {
- background: url("../images/settings/menu_active.png") repeat-x;
-}
-
-#info_right_menu {
- left: 183px;
- top: 6px;
-}
-
-#info_sync_services {
- font-size: 32px;
- width: 280px;
-}
-
-#info_traff {
- font-size: 20px;
- width: 410px;
- top: 36px;
-}
-
-#info_traffic_report {
- width: 300px;
- top: 85px;
- font-size: 20px;
- color: #a6a6a6;
-}
-
-#info_traffic_pts {
- width: 400px;
- top: 120px;
- font-size: 20px;
- color: #65cdd9;
-}
-
-#info_traffic_hear {
- width: 355px;
- top: 192px;
- font-size: 20px;
- color: #a6a6a6;
-}
-
-#info_connect {
- width: 300px;
- top: 241px;
- font-size: 20px;
- left: 15px;
-}
-
-#info_log {
- width: 500px;
- top: 285px;
- font-size: 20px;
-}
-
-#info_left_menu {
- top: 6px;
-}
-
-#info_left_menu div {
- font-size: 20px;
- left: 49px;
-}
-
-#info_left_services {
- top: 17px;
-}
-
-#info_left_travel_link {
- top: 66px;
- width: 200px;
-}
-
-#info_left_alerts {
- top: 118px;
-}
-
-#info_left_calendar {
- top: 166px;
-}
-
-#info_left_apps {
- top: 216px;
-}
-
-/******************* For Info.Services *******************/
-#info_services_view {
- top: 48px;
- left: 153px;
- background: url(../images/info/info_services_bg.png) no-repeat 0px 39px;
- height: 384px;
- width: 647px;
-}
-
-#info_services_view .inner-content {
- left: 30px;
- top: 49px;
-}
-
-/******************* For Info.travelLink *******************/
-#info_travelLink {
- position: absolute;
- top: 48px;
- left: 153px;
- width: 647px;
- height: 384px;
- float: left;
- z-index: 1001;
-}
-
-#info_travelLink_logo {
- margin-top: 48px;
- margin-left: 22px;
-}
-
-#info_travelLink .inner-content {
- top: 71px;
-}
-
-#info_travelLink .block-header-title {
- top: 21px;
- left: 75px;
-}
-
-#info_travelLink .list {
- width: 308px;
- border-radius: 2px;
- max-height: 248px;
- border: 1px solid #393939;
-}
-
-#info_travelLink .list .list-item:last-of-type {
- height: 50px;
- border: none;
-}
-
-#info_travelLink .list-content {
- position: relative;
- float: left;
- width: 100%;
- border: none;
-}
-
-#info_travelLink_listLeft {
- left: 12px;
- top: 92px;
-}
-
-#info_travelLink_listRight {
- position: absolute;
- top: 43px;
- right: 5px;
- width: 310px;
-}
-
-#info_travelLink_listLeft .list-item span,#info_travelLink_listRight .list-item span
- {
- margin-left: 44px;
-}
-
-#info_travelLink.fr #info_travelLink_listLeft .list-item span,#info_travelLink.fr #info_travelLink_listRight .list-item span
- {
- margin-left: 22px;
-}
-
-#info_travelLink_listRight_item0 span {
- margin-left: 0px !important;
-}
-
-#info_travelLink_listRight_item0 {
- text-align: center;
-}
-
-#info_travelLink_listRight .list-item:first-of-type {
- height: 48px !important;
-}
-
-/******************* For Info.Alerts menu *****************/
- /******************* For Info.Calendar menu ***************/
-#info_calendar {
- left: 153px;
- top: 48px;
- width: 647px;
- height: 384px;
- background-image: url(../images/info/view_info_calendar.png);
- background-repeat: no-repeat;
- background-position: 4px 38px;
-}
-
-#info_calendar .inner-wrapper {
- left: 99px;
- top: 99px;
-}
-
-#info_calendar .c-btn {
- width: 90px;
- height: 34px;
- background: url(../images/info/callendar-btn.png) no-repeat 0px 0px;
- text-align: center;
- line-height: 33px;
-}
-
-#info_calendar .c-btn.active {
- background: #3b3b3b url(../images/common/btn-28h-gray-active.png)
- repeat-x 0 5px !important;
-}
-
-#info_calendar .date {
- white-space: nowrap;
- font-size: 26px;
- top: -43px;
- left: 178px;
-}
-
-#info_calendar .today {
- white-space: nowrap;
- top: -58px;
- left: 414px;
- height: 48px;
- width: 130px;
- font-size: 20px;
- line-height: 48px;
- border: 1px #333 solid;
- text-align: center;
- border-radius: 2px;
-}
-
-#info_calendar .day {
- width: 89px;
- height: 36px;
- text-align: center;
- top: 5px;
- line-height: 25px;
-}
-
-#info_calendar .day.active {
- background: #f28b06;
-}
-
-#info_calendar .day-1 {
- left: -86px;
-}
-
-#info_calendar .day-2 {
- left: 3px;
-}
-
-#info_calendar .day-3 {
- left: 93px;
-}
-
-#info_calendar .day-4 {
- left: 183px;
-}
-
-#info_calendar .day-5 {
- left: 272px;
-}
-
-#info_calendar .day-6 {
- left: 363px;
-}
-
-#info_calendar .day-7 {
- left: 453px;
-}
-
-#info_calendar .btn-1 {
- left: -88px;
- top: 40px;
-}
-
-#info_calendar .btn-8 {
- left: -88px;
- top: 75px;
-}
-
-#info_calendar .btn-15 {
- left: -87px;
- top: 108px;
-}
-
-#info_calendar .btn-22 {
- left: -88px;
- top: 141px;
-}
-
-#info_calendar .btn-29 {
- left: -88px;
- top: 174px;
-}
-
-#info_calendar .btn-7 {
- left: 452px;
- top: 40px;
-}
-
-#info_calendar .btn-14 {
- left: 452px;
- top: 75px;
-}
-
-#info_calendar .btn-21 {
- left: 452px;
- top: 108px;
-}
-
-#info_calendar .btn-28 {
- left: 452px;
- top: 141px;
-}
-
-#info_calendar .btn-6 {
- left: 362px;
- top: 40px;
-}
-
-#info_calendar .btn-13 {
- left: 362px;
- top: 75px;
-}
-
-#info_calendar .btn-20 {
- left: 362px;
- top: 108px;
-}
-
-#info_calendar .btn-27 {
- left: 362px;
- top: 141px;
-}
-
-#info_calendar .btn-5 {
- left: 272px;
- top: 40px;
-}
-
-#info_calendar .btn-12 {
- left: 272px;
- top: 75px;
-}
-
-#info_calendar .btn-19 {
- left: 272px;
- top: 108px;
-}
-
-#info_calendar .btn-26 {
- left: 272px;
- top: 141px;
-}
-
-#info_calendar .btn-4 {
- left: 182px;
- top: 40px;
-}
-
-#info_calendar .btn-11 {
- left: 182px;
- top: 75px;
-}
-
-#info_calendar .btn-18 {
- left: 182px;
- top: 108px;
-}
-
-#info_calendar .btn-25 {
- left: 182px;
- top: 141px;
-}
-
-#info_calendar .btn-3 {
- left: 92px;
- top: 40px;
-}
-
-#info_calendar .btn-10 {
- left: 92px;
- top: 75px;
-}
-
-#info_calendar .btn-17 {
- left: 92px;
- top: 108px;
-}
-
-#info_calendar .btn-24 {
- left: 92px;
- top: 141px;
-}
-
-#info_calendar .btn-31 {
- left: 92px;
- top: 174px;
-}
-
-#info_calendar .btn-2 {
- left: 2px;
- top: 40px;
-}
-
-#info_calendar .btn-9 {
- left: 2px;
- top: 75px;
-}
-
-#info_calendar .btn-16 {
- left: 2px;
- top: 108px;
-}
-
-#info_calendar .btn-23 {
- left: 2px;
- top: 141px;
-}
-
-#info_calendar .btn-30 {
- left: 2px;
- top: 174px;
-}
-
-/******************* For Info.DeviceList *******************/
-#info_view .info_apps_deviceList_view {
- background: black;
- width: 800px;
- height: 480px;
- z-index: 201;
-}
-
-#info_apps_deviceList_view .backButton {
- top: 80px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
- left: 5px;
-}
-
-#info_apps_deviceList_view .backButton .ico {
- margin-top: 13px;
- margin-left: 8px;
-}
-
-#info_apps_deviceList_view .list {
- position: absolute;
- width: 629px;
- height: 251px;
- border-radius: 2px;
- left: 100px;
- top: 154px;
-}
-
-#info_apps_deviceList_view .list-content {
- width: 578px;
- border: none;
-}
-
-#info_apps_deviceList_view .list-item {
- border: 1px solid #393939 !important;
-}
-
-/******************* For Info.Apps menu*******************/
-#info_apps {
- position: absolute;
- top: 48px;
- left: 153px;
- width: 647px;
- height: 384px;
- float: left;
- z-index: 1001;
-}
-
-#info_apps .backButton {
- top: 59px;
-}
-
-#info_apps .block-header-title {
- top: 67px;
- left: 73px;
-}
-
-#info_apps_pushToTalk_buttton {
- top: 80px;
- right: 5px;
- height: 48px;
- width: 48px;
- border: 1px solid #4bffff;
- border-radius: 2px;
-}
-
-#info_apps_list {
- top: 70px;
- left: 13px;
-}
-
-#info_appst {
- height: 250px;
- position: relative;
- float: left;
- margin-top: 5px;
- width: 554px;
-}
-
-#info_apps .list {
- width: 629px;
- height: 251px;
-}
-
-#info_apps_list .list-item .ico {
- width: 50px;
- height: 50px;
- position: absolute;
-}
-
-#info_apps_list .list-item span {
- margin-left: 50px;
-}
-
-#info_apps_list .list-item {
- height: 48px !important;
- border: 1px solid #393939;
-}
-
-#info_apps_list .list-content {
- width: 279px;
- border: none !important;
-}
-
-#info_apps .leftButtons {
- width: 278px;
- float: left;
- margin-right: 10px;
- height: 51px;
- font-size: 20px;
- line-height: 50px;
- border: 1px solid #393939;
- cursor: pointer;
- left: 10px;
-}
-
-#info_apps .vehicleHealthReport {
- top: 70px;
-}
-
-#info_apps .Asist911 {
- top: 122px;
-}
-
-#info_apps .installButton {
- top: 174px;
-}
-
-#info_apps .findNewApps {
- top: 226px;
-}
-
-#info_apps .findNewApps img {
- margin: 9px;
- width: 32px;
-}
-
-#info_apps .getDeviceList {
- top: 278px;
-}
-
-#info_apps .getDeviceList img {
- width: 38px;
- margin: 6px;
-}
-
-#info_apps .list {
- float: right;
- margin-right: 41px;
- width: 330px
-}
-
-#info_apps_install_Button span {
- position: absolute;
-}
-
-#info_apps.fr #info_apps_install_Button span {
- position: absolute;
- line-height: 20px;
- width: 170px;
- top: 3px;
-}
-
-#info_apps .list-item .ico {
- float: left;
-}
-
-#info_apps .list-item span {
- height: 23px;
-}
-
-#info_apps .inner-wrapper {
- left: 100px;
- top: 71px;
-}
-
-#info_apps_install_Button {
- border: 1px solid #393939;
- border-radius: 2px;
- top: 269px;
- left: 303px;
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/css/mcs.css b/SDL_Core/src/components/HMI/css/mcs.css
deleted file mode 100644
index 304e2ee8d..000000000
--- a/SDL_Core/src/components/HMI/css/mcs.css
+++ /dev/null
@@ -1,3703 +0,0 @@
-/*** Multi Contour Seat ** */
-#back-button {
- background: url(../images/common/page-back-button.png) no-repeat center
- 12px, url(../images/common/btn-48h.png);
- width: 48px;
- z-index: 5000;
- left: -107px;
- top: -72px;
-}
-
-#back-button.pressed {
- background: url(../images/common/page-back-button.png) no-repeat center
- 12px, url(../images/common/btn-48h-pressed.png);
-}
-
-#MultiContourSeat_customMassage {
- visibility: hidden;
- background-color: #000;
- z-index: 200;
- width: 800px;
- height: 345px;
- position: absolute;
- top: -60px;
- left: -112px;
-}
-
-#MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#MultiContourSeat_customMassage_caption2 {
- top: 35px;
- width: 350px;
- text-align: center;
- left: 225px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .MultiContourSeat_customMassage_previewButton
- {
- top: 172px;
- left: 620px;
- width: 120px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .MultiContourSeat_customMassage_previewButtonTop
- {
- top: 113px;
- left: 535px;
- width: 120px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .MultiContourSeat_customMassage_previewButtonBottom
- {
- top: 239px;
- left: 535px;
- width: 120px;
- text-align: center;
-}
-
-#MultiContourSeat_customMassage_backButton {
- top: 220px;
- left: 535px;
- width: 120px;
- text-align: center;
-}
-
-#MultiContourSeat_customMassage_backButtonCenter {
- bottom: 10px;
- left: 340px;
- width: 120px;
- text-align: center;
-}
-
-#MultiContourSeatContainer .led {
- width: 12px;
- height: 40px;
- background: url("../images/common/seat-act-led.png") no-repeat;
- position: relative !important;
- float: left;
- background-position: -4px 0;
-}
-
-#MultiContourSeatContainer .led-inactive {
- background: url("../images/common/seat-inact-led.png") no-repeat;
- background-position: 3px 8px;
- width: 12px;
- height: 40px;
- position: relative !important;
- float: left;
-}
-
-#MultiContourSeat_customMassage .led {
- /*background-position: -4px -6px;*/
-
-}
-
-#MultiContourSeat_customMassage .led-inactive {
- /*background-position: 3px 2px;*/
-
-}
-
-#contentMCS {
- top: 83px;
- left: 112px;
-}
-
-#MultiContourSeatContainer {
- position: absolute;
- background-color: black;
- width: 800px;
- height: 384px;
- top: -38px;
- left: -160px;
- z-index: 1001;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .block-header-title {
- font-size: 26px;
- width: 400px;
- top: -72px;
- left: -38px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .view_settings_vehicle_MultiContourSeat-left-s
- {
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat-left-s.png)
- no-repeat;
- width: 193px;
- height: 263px;
- left: -70px;
- top: -40px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .view_settings_vehicle_MultiContourSeat-Massage-left-s
- {
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat-driver_massage_seat.png)
- no-repeat;
- width: 193px;
- height: 263px;
- left: -70px;
- top: -40px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .notActiveSeat {
- opacity: 0.5;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .not_selected .active {
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .driver {
- width: 158px;
- left: -54px;
- top: 226px;
- text-align: center;
- line-height: 49px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .btn-48.active {
- background: url(../images/common/btn-48h-active-gray.png) repeat-x
- !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .btn-28.active {
- background: url(../images/settings/btn-28h-gray-active.png) repeat-x
- !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .adjust {
- width: 158px;
- left: -54px;
- top: 226px;
- text-align: center;
- line-height: 49px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .massage {
- width: 144px;
- left: 299px;
- top: -60px;
- text-align: center;
- line-height: 49px;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- -webkit-border-top-right-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- -moz-border-radius-topright: 3px;
- -moz-border-radius-bottomright: 3px;
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .adjust {
- width: 144px;
- left: 154px;
- top: -60px;
- text-align: center;
- line-height: 49px;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- -webkit-border-top-left-radius: 3px;
- -webkit-border-bottom-left-radius: 3px;
- -moz-border-radius-topleft: 3px;
- -moz-border-radius-bottomleft: 3px;
- border-top-left-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .passenger {
- width: 158px;
- left: 496px;
- top: 227px;
- text-align: center;
- line-height: 49px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .pressed {
- background: url(../images/common/btn-48h-pressed.png) bottom repeat-x
- !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-1 {
- width: 32px;
- height: 39px;
- left: 414px;
- top: 3px;
- background: url(../images/settings/seats.png) no-repeat;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-2 {
- width: 32px;
- height: 39px;
- left: 414px;
- top: 61px;
- background: url(../images/settings/seats.png) no-repeat 0 -61px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-3 {
- width: 32px;
- height: 39px;
- left: 414px;
- top: 118px;
- background: url(../images/settings/seats.png) no-repeat 0 -117px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-4 {
- width: 32px;
- height: 39px;
- left: 414px;
- top: 179px;
- background: url(../images/settings/seats.png) no-repeat 0 -177px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-5 {
- width: 32px;
- height: 39px;
- left: 414px;
- top: 236px;
- background: url(../images/settings/seats.png) no-repeat 0 -233px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-message-1 {
- width: 32px;
- height: 38px;
- left: 414px;
- top: 3px;
- background: url(../images/settings/seats-message.png) no-repeat;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-message-2 {
- width: 32px;
- height: 38px;
- left: 414px;
- top: 63px;
- background: url(../images/settings/seats-message.png) no-repeat 0 -61px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seat-right {
- width: 193px;
- height: 263px;
- left: 480px;
- top: -40px;
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat-right-s.png)
- no-repeat;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .massage-seat-right {
- width: 193px;
- height: 263px;
- left: 480px;
- top: -40px;
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat-Passenger_massage_seat.png)
- no-repeat;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control {
- width: 238px;
- height: 41px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-#MultiContourSeat_customMassage .control {
- width: 213px;
- /*height: 28px;*/
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .indButtonMCS.active,#view_settings_vehicle_MultiContourSeat_Adjust .seats-message-actions.active,#view_settings_vehicle_MultiContourSeat_Adjust .control.active
- {
- border: 1px solid #ff9900;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control .minus {
- width: 58px;
- height: 41px;
- border-right: 1px solid #393939;
- -webkit-border-top-right-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- -moz-border-radius-topright: 3px;
- -moz-border-radius-bottomright: 3px;
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
- top: 0;
- left: 0;
- background: url(../images/common/btn-48h.png);
- position: relative;
- float: left;
- cursor: pointer;
-}
-
-#MultiContourSeat_customMassage .control .minus { /* height: 28px;*/
-
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .ledContainer {
- position: relative;
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control .plus {
- width: 58px;
- height: 41px;
- border-left: 1px solid #393939;
- -webkit-border-top-left-radius: 3px;
- -webkit-border-bottom-left-radius: 3px;
- -moz-border-radius-topleft: 3px;
- -moz-border-radius-bottomleft: 3px;
- border-top-left-radius: 3px;
- border-bottom-left-radius: 3px;
- top: 0px;
- right: 0;
- background: url(../images/common/btn-48h.png);
- cursor: pointer;
-}
-
-#MultiContourSeat_customMassage .control .plus { /* height: 28px;*/
-
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control .minus .ico {
- top: 19px;
- left: 20px;
- position: absolute;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control .plus .ico {
- top: 12px;
- left: 20px;
- position: absolute;
-}
-
-#MultiContourSeat_customMassage .control .minus .ico { /*top: 13px;*/
-
-}
-
-#MultiContourSeat_customMassage .control .plus .ico { /*top: 6px;;*/
-
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control-1 {
- top: 1px;
- left: 155px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control-2 {
- top: 60px;
- left: 155px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control-3 {
- top: 119px;
- left: 155px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control-4 {
- top: 177px;
- left: 155px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .control-5 {
- top: 235px;
- left: 154px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-1 {
- left: 60px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-2 {
- left: 71px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-3 {
- left: 82px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-4 {
- left: 93px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-5 {
- left: 104px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-6 {
- left: 115px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-7 {
- left: 126px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-8 {
- left: 137px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-9 {
- left: 148px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .led-10 {
- left: 159px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-message-actions {
- width: 238px;
- height: 48px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- left: 154px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-message-actions-1
- {
- top: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .seats-message-actions-2
- {
- top: 60px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .quality {
- width: 79px;
- height: 48px;
- background: url(../images/common/btn-48h.png);
- font-size: 20px;
- text-align: center;
- line-height: 48px;
- cursor: pointer;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .delim {
- width: 4px;
- height: 48px;
- background: url(../images/common/delim.png) no-repeat;
- z-index: 100;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .active.quality {
- background: url(../images/common/btn-48h-active-gray.png) !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .delim-0 {
- left: 76px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .delim-1 {
- left: 158px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .button0 {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .button1 {
- left: 80px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust .button2 {
- left: 159px;
-}
-
-#MultiContourSeatContainer .indButtonMCS {
- width: 84px;
- height: 49px;
- cursor: pointer;
-}
-
-#MultiContourSeatContainer .indButtonMCS .ico {
- top: 1px;
- left: 26px;
- position: absolute;
-}
-
-#MultiContourSeatContainer .indButtonMCS div {
- width: 22px;
- height: 17px;
- top: 35px;
- left: 25px;
- position: relative;
- float: left;
- margin-left: -9px;
-}
-
-#MultiContourSeatContainer .indButtonMCS div.small_ind_def {
- background: url(../images/climate/small_ind_def.png) no-repeat;
-}
-
-#MultiContourSeatContainer .indButtonMCS div.small_ind_active {
- background: url(../images/climate/small_ind_active.png) no-repeat;
-}
-
-#MultiContourSeatContainer .indButtonMCS.notpressed {
- background: url(../images/common/btn-48h.png);
- background-size: contain;
- border-radius: 3px;
- border: 1px solid #393939;
-}
-
-#MultiContourSeatContainer .indButtonMCS.pressed {
- background: url(../images/climate/left_person_control/rb_bg_pressed.png)
- no-repeat;
-}
-
-/* BEGIN concept 1.1 */
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions
- {
- left: 186px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .massageTop1
- {
- width: 18px;
- height: 27px;
- left: 150px;
- background-image: url(../images/settings/massageTop.png) !important;
- background-repeat: no-repeat;
- top: 8px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .massageTop2
- {
- width: 30px;
- height: 27px;
- left: 150px;
- background-image: url(../images/settings/massageBottom.png) !important;
- background-repeat: no-repeat;
- top: 52px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .massageTop3
- {
- width: 30px;
- height: 27px;
- left: 143px;
- background-image: url(../images/settings/massageVertical.png) !important;
- background-repeat: no-repeat;
- top: 96px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .dividerBlocks
- {
- width: 292px;
- height: 0px;
- border: 1px solid #525252;
- left: 154px;
- top: 139px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .massageBottom1
- {
- width: 29px;
- height: 21px;
- left: 143px;
- background-image: url(../images/settings/MassageCircle.png) !important;
- background-repeat: no-repeat;
- top: 162px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .massageBottom2
- {
- width: 29px;
- height: 30px;
- left: 144px;
- background-image: url(../images/settings/massageRound.png) !important;
- background-repeat: no-repeat;
- top: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .massageBottom3
- {
- width: 27px;
- height: 30px;
- left: 144px;
- background-image: url(../images/settings/massageHorisontal.png)
- !important;
- background-repeat: no-repeat;
- top: 245px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-1
- {
- top: 46px;
- left: 428px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-2
- {
- top: 196px;
- left: 428px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .quality
- {
- width: 56px;
- height: 38px;
- line-height: 38px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions
- {
- width: 224px;
- height: 38px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions-top2
- {
- top: 45px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions-top3
- {
- top: 90px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions-bottom1
- {
- top: 150px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions-bottom2
- {
- top: 195px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .seats-message-actions-bottom3
- {
- top: 240px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .delim
- {
- height: 38px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .delim-0
- {
- left: 54px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .delim-1
- {
- left: 110px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .delim-2
- {
- left: 166px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .button0
- {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .button1
- {
- left: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .button2
- {
- left: 112px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1 .button3
- {
- left: 168px;
-}
-
-/* END concept 1.1 */ /* BEGIN concept 1.2 */
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-actions
- {
- left: 154px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-1
- {
- top: 35px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-2
- {
- top: 203px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .quality
- {
- width: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .quality img
- {
- margin-top: 10px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-actions
- {
- width: 224px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-actions-top2
- {
- top: 60px;
- left: 210px;
- width: 168px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-actions-bottom1
- {
- top: 170px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .seats-message-actions-bottom2
- {
- top: 230px;
- left: 210px;
- width: 168px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .delim-0
- {
- left: 54px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .delim-1
- {
- left: 110px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .delim-2
- {
- left: 166px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .button0
- {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .button1
- {
- left: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .button2
- {
- left: 112px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2 .button3
- {
- left: 168px;
-}
-
-/* END concept 1.2 */ /* BEGIN concept 1.3 */
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .indButtonMCS div.small_ind_active
- {
- background: url(../images/climate/small_ind_green.png) no-repeat;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .patternTextIndicator
- {
- top: -29px;
- width: 80px;
- text-align: center;
- font-size: 18px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .patternTextTop
- {
- left: 280px;
- width: 150px;
- text-align: center;
- font-size: 18px;
- top: 30px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .patternTextBottom
- {
- left: 280px;
- width: 150px;
- text-align: center;
- font-size: 18px;
- top: 140px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-actions
- {
- left: 154px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-1
- {
- top: 35px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-2
- {
- top: 203px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .quality
- {
- width: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .quality img
- {
- margin-top: 10px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-actions
- {
- width: 224px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-actions-top1
- {
- left: 159px;
- top: 60px;
- width: 78px;
- height: 20px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-actions-top2
- {
- left: 270px;
- top: 60px;
- width: 168px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-actions-bottom1
- {
- top: 170px;
- left: 159px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .seats-message-actions-bottom2
- {
- top: 170px;
- left: 270px;
- width: 168px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .delim-0
- {
- left: 54px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .delim-1
- {
- left: 110px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .delim-2
- {
- left: 166px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .button0
- {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .button1
- {
- left: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .button2
- {
- left: 112px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_3 .button3
- {
- left: 168px;
-}
-
-/* END concept 1.3 */ /* BEGIN concept 1.4 */
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .patternText1
- {
- width: 78px;
- height: 20px;
- top: 65px;
- left: 270px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .pattern1
- {
- background-image: url('../images/settings/massageTop.png');
- background-repeat: no-repeat;
- background-position: 53px 0px;
- background-size: contain;
- width: 83px;
- height: 20px;
- top: 65px;
- left: 209px;
- text-align: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .pattern2
- {
- background-image: url('../images/settings/massageBottom.png');
- background-repeat: no-repeat;
- background-position: 53px 0px;
- background-size: contain;
- width: 83px;
- height: 20px;
- top: 65px;
- left: 209px;
- text-align: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .pattern3
- {
- background-image: url('../images/settings/massageVertical.png');
- background-repeat: no-repeat;
- background-position: 52px 0px;
- background-size: contain;
- width: 83px;
- height: 20px;
- top: 65px;
- left: 202px;
- text-align: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .patternbottom1
- {
- background-image: url('../images/settings/massageCircle.png');
- background-repeat: no-repeat;
- background-position: 53px 0px;
- background-size: contain;
- width: 83px;
- height: 20px;
- top: 165px;
- left: 196px;
- text-align: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .patternbottom2
- {
- background-image: url('../images/settings/massageRound.png');
- background-repeat: no-repeat;
- background-position: 55px 0px;
- background-size: contain;
- width: 83px;
- height: 20px;
- top: 165px;
- left: 196px;
- text-align: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .patternbottom3
- {
- background-image: url('../images/settings/massageHorisontal.png');
- background-repeat: no-repeat;
- background-position: 55px 0px;
- background-size: contain;
- width: 83px;
- height: 20px;
- top: 165px;
- left: 202px;
- text-align: left;
-}
-
-#seatsMassageView1_4 .seatsMassageView1_4_seatLabel {
- top: 172px;
- left: 45px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .seats-message-2
- {
- top: 105px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .patternText2
- {
- width: 78px;
- height: 20px;
- top: 165px;
- left: 271px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .labelTitle
- {
- width: 600px;
- text-align: left;
- height: 30px;
- line-height: 30px;
- font-size: 26px;
- left: 74px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Settings
- {
- top: 200px;
- left: 197px;
- width: 138px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Settings span
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Settings .ico
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Massage
- {
- text-align: center;
- height: 48px;
- line-height: 48px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Massage.button0
- {
- top: 70px;
- left: 45px;
- width: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Massage.button1
- {
- top: 130px;
- left: 45px;
- width: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Massage.button2
- {
- top: 190px;
- left: 45px;
- width: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5Back
- {
- top: 280px;
- left: 45px;
- width: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .concept1_5SettingsScreen
- {
- top: -60px;
- left: -112px;
- width: 800px;
- height: 345px;
- background: black;
- z-index: 100;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .btn-48
- {
- line-height: 48px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .show
- {
- visibility: visible !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .hide
- {
- visibility: hidden;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .quality
- {
- width: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .quality img
- {
- margin-top: 10px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .seats-message-actions-top
- {
- left: 355px;
- top: 120px;
- width: 168px !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .seats-message-actions-bottom
- {
- left: 355px;
- top: 210px;
- width: 168px !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .seats-message-actions
- {
- width: 224px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .seats-message-actions-2
- {
- top: 100px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .delim-0
- {
- left: 54px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .delim-1
- {
- left: 110px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .delim-2
- {
- left: 166px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .button0
- {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .button1
- {
- left: 56px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .button2
- {
- left: 112px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 .button3
- {
- left: 168px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 #alternatingMassage .seats-message-1
- {
- width: 32px;
- height: 38px;
- top: 126px;
- background: url(../images/settings/seats-message.png) no-repeat;
- left: 285px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_4 #alternatingMassage .seats-message-2
- {
- width: 32px;
- height: 38px;
- top: 216px;
- left: 285px;
- background: url(../images/settings/seats-message.png) no-repeat 0 -61px;
-}
-
-/* END concept 1.4 */ /* BEGIN concept 1.5 */
-#seatsMassageView1_5 .seatsMassageView1_5_seatLabel {
- top: 160px;
- left: 0px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .labelTitle
- {
- width: 600px;
- text-align: left;
- height: 30px;
- line-height: 30px;
- font-size: 26px;
- left: 74px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .labelText
- {
- top: 97px;
- width: 672px;
- text-align: center;
- left: 140px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Settings
- {
- top: 120px;
- left: 205px;
- width: 138px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Settings span
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Settings .ico
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Massage
- {
- text-align: center;
- height: 48px;
- line-height: 48px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Massage.button0
- {
- top: 147px;
- left: 240px;
- width: 150px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Massage.button1
- {
- top: 147px;
- left: 400px;
- width: 150px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Massage.button2
- {
- top: 147px;
- left: 560px;
- width: 150px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5Back
- {
- top: 280px;
- left: 45px;
- width: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .concept1_5SettingsScreen
- {
- top: -60px;
- left: -112px;
- width: 800px;
- height: 345px;
- background: black;
- z-index: 100;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5Settings .ico
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .btn-48
- {
- line-height: 48px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .show
- {
- visibility: visible !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView1_5 .hide
- {
- visibility: hidden;
-}
-
-/* END concept 1.5 */ /* BEGIN HMI concept 2.1 */
-#seatsMassageView2_1 .seatsMassageView2_1_seatLabel {
- top: 160px;
- left: 0px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView2_1 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView2_1 .control {
- width: 237px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .quality
- {
- width: 50px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .seats-message-actions
- {
- width: 250px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .delim-0
- {
- left: 48px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .delim-1
- {
- left: 98px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .delim-2
- {
- left: 148px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .button0
- {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .button1
- {
- left: 50px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .button2
- {
- left: 100px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .button3
- {
- left: 150px;
- width: 100px;
-}
-
-#seatsMassageView2_1_settingsButton {
- width: 210px;
- left: 175px;
- top: 130px;
- line-height: 49px;
-}
-
-#seatsMassageView2_1_settingsButton .ico {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .control-11
- {
- top: 60px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .control-12
- {
- top: 105px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .control-13
- {
- top: 150px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .control-14
- {
- top: 210px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_1 .control-15
- {
- top: 255px;
- left: 370px;
-}
-
-#seatsMassageView2_1 #MultiContourSeat_customMassage .seats-message-1 {
- left: 150px;
- top: 107px;
-}
-
-#seatsMassageView2_1 #MultiContourSeat_customMassage .seats-message-2 {
- left: 150px;
- top: 234px;
-}
-
-#seatsMassageView2_1_upperLabel {
- top: 73px;
- left: 645px;
-}
-
-#seatsMassageView2_1_middleLabel {
- top: 117px;
- left: 645px;
-}
-
-#seatsMassageView2_1_lowerLabel {
- top: 162px;
- left: 645px;
-}
-
-#seatsMassageView2_1_frontLabel {
- top: 223px;
- left: 645px;
-}
-
-#seatsMassageView2_1_rearLabel {
- top: 266px;
- left: 645px;
-}
-
-/* END HMI concept 2.1 */ /* BEGIN HMI concept 2.2 */
-#seatsMassageView2_2 .MultiContourSeat_customMassage_previewButtonTop {
- top: 134px;
- left: 625px;
- width: 120px;
- text-align: center;
-}
-
-#seatsMassageView2_2 .MultiContourSeat_customMassage_previewButtonBottom
- {
- top: 282px;
- left: 625px;
- width: 120px;
- text-align: center;
-}
-
-#seatsMassageView2_2 .control {
- width: 240px;
- /*height: 28px;*/
-}
-
-#seatsMassageView2_2 .seatsMassageView2_2_seatLabel {
- top: 172px;
- left: 0px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .quality
- {
- width: 100px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .seats-message-actions
- {
- width: 200px;
- left: 198px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .delim-0
- {
- left: 98px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .button0
- {
- left: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .button1
- {
- left: 100px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .control-11
- {
- top: 80px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .control-12
- {
- top: 125px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .control-13
- {
- top: 170px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .control-14
- {
- top: 253px;
- left: 370px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView2_2 .control-15
- {
- top: 298px;
- left: 370px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .seats-message-1 {
- left: 230px;
- top: 128px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .seats-message-2 {
- left: 720px;
- top: 275px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .seats-message-actions-3
- {
- top: 45px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .seats-message-actions-4
- {
- top: 218px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .seats-message-actions
- {
- left: 358px;
- width: 265px;
- height: 28px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .quality {
- width: 50px;
- height: 28px;
- line-height: 29px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .delim {
- height: 28px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .delim-0 {
- left: 48px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .delim-1 {
- left: 98px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .delim-2 {
- left: 148px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .button0 {
- left: 0;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .button1 {
- left: 50px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .button2 {
- left: 100px;
-}
-
-#seatsMassageView2_2 #MultiContourSeat_customMassage .button3 {
- left: 150px;
- width: 115px;
-}
-
-#seatsMassageView2_2_upperLabel {
- top: 93px;
- left: 645px;
-}
-
-#seatsMassageView2_2_middleLabel {
- top: 138px;
- left: 645px;
-}
-
-#seatsMassageView2_2_lowerLabel {
- top: 182px;
- left: 645px;
-}
-
-#seatsMassageView2_2_frontLabel {
- top: 266px;
- left: 645px;
-}
-
-#seatsMassageView2_2_rearLabel {
- top: 310px;
- left: 645px;
-}
-
-#seatsMassageView2_2_settingsButton {
- width: 210px;
- left: 192px;
- top: 130px;
- line-height: 49px;
-}
-
-#seatsMassageView2_2_settingsButton .ico {
- float: left;
-}
-
-/* END HMI concept 2.2 */ /* BEGIN HMI concept 4.1 */
-#seatsMassageView4_1 .seatsMassageView4_1_seatLabel {
- top: 172px;
- left: 45px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView4_1_settingsButton {
- width: 140px;
- left: 200px;
- top: 130px;
- line-height: 49px;
-}
-
-#seatsMassageView4_1_settingsButton .ico {
- float: left;
-}
-
-#seatsMassageView4_1 #MultiContourSeat_customMassage .seats-message-actions
- {
- left: 280px;
-}
-
-#seatsMassageView4_1 #MultiContourSeat_customMassage .seats-message-actions-3
- {
- top: 115px;
-}
-
-#seatsMassageView4_1 #MultiContourSeat_customMassage .seats-message-actions-4
- {
- top: 205px;
-}
-
-#seatsMassageView4_1 #MultiContourSeat_customMassage .seats-message-3 {
- right: 220px;
- top: 120px;
- width: 32px;
- height: 38px;
- background: url(../images/settings/seats-message.png) no-repeat;
-}
-
-#seatsMassageView4_1 #MultiContourSeat_customMassage .seats-message-4 {
- right: 220px;
- top: 210px;
- width: 32px;
- height: 38px;
- background: url(../images/settings/seats-message.png) no-repeat 0 -61px;
-}
-
-/* END HMI concept 4.1 */ /* BEGIN HMI concept 5.1 */
-#seatsMassageView5_1 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView5_1 .seatsMassageView5_1_seatLabel {
- top: 187px;
- left: 0px;
- font-size: 24px;
- width: 140px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 #MultiContourSeat_customMassage_backButtonCenter
- {
- bottom: 0px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .lableToggleButton
- {
- height: 48px;
- border: 1px solid gray;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .lableToggleButton .btn-48
- {
- height: 46px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .lableToggleButton .lableToggle
- {
- line-height: 30px;
- margin-left: 10px;
- margin-top: 10px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .toogleButtonContainer
- {
- width: 100px;
- margin: 0px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .toogleButtonContainer .toggles
- {
- position: absolute;
- float: left;
- width: 50px;
- height: 28px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .seatsMassageView_settingsButton
- {
- width: 140px;
- left: 200px;
- top: 130px;
- line-height: 49px;
- text-align: left !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .seatsMassageView_settingsButton span
- {
- position: absolute;
- line-height: 50px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .toogleButtonContainer span
- {
- position: absolute;
- width: 50px;
- margin-top: 0px;
- text-align: center;
- line-height: 28px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .seats-message-actions-3
- {
- left: 247px;
- margin-top: 10px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5Settings
- {
- top: 200px;
- left: 197px;
- width: 138px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5Settings span
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5Settings .ico
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5Massage
- {
- text-align: center;
- height: 48px;
- line-height: 48px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist {
- top: 76px;
- left: 139px;
- height: 251px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-content {
- width: 674px;
- border-right: none;
- border-top: none;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item:first-child,#seatsMassageView5_1 .MCSSettingslist .soundButton:first-child
- {
- border-top: 1px solid #393939;
- height: 48px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item {
- position: relative;
- width: 577px;
- float: left;
- height: 49px;
- border-bottom: 1px solid #393939;
- border-right: 1px solid #393939;
- line-height: 50px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item.soundButton {
- width: 48px;
- border-left: 1px solid #393939;
- margin-left: 10px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item.soundButton .ico {
- border: none;
- margin-top: 12px;
- margin-right: 11px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item.pressed {
- background: url(../images/phone/phone_button_bg_active.png) repeat-x
- !important;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item>span {
- margin-left: 13px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item .ico {
- float: right;
- border: 1px solid #393939;
- border-radius: 2px;
- margin-top: 9px;
- margin-right: 9px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .list-item.big-ico img {
- float: right;
- border: none;
- margin-top: 4px;
- margin-right: 9px;
-}
-
-#seatsMassageView5_1 .MCSSettingslist .toggles,#seatsMassageView5_1 .MCSSettingslist .toggles span
- {
- width: 148px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .MCSSettingslist .button1
- {
- left: 148px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .MCSSettingslist .delim
- {
- height: 29px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .MCSSettingslist .delim-0
- {
- left: 147px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .toogleButtonContainer .button1
- {
- left: 50px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .toogleButtonContainer .delim-0
- {
- left: 48px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5Back
- {
- top: 280px;
- left: 45px;
- width: 200px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .concept1_5SettingsScreen
- {
- top: -60px;
- left: 154px;
- width: 291px;
- height: 345px;
- background: black;
- z-index: 100;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .btn-48
- {
- line-height: 48px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .show
- {
- visibility: visible !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView5_1 .hide
- {
- visibility: hidden;
-}
-
-/* END HMI concept 5.1 */ /* BEGIN HMI concept 5.2 */
-#seatsMassageView5_2_settingsButton {
- width: 140px;
- left: 200px;
- top: 130px;
- line-height: 49px;
-}
-
-#seatsMassageView5_2 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView5_2 .seatsMassageView5_2_seatLabel {
- top: 160px;
- left: 0px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView5_2_settingsButton .ico {
- float: left;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .seats-message-actions
- {
- left: 275px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .seats-message-actions-3
- {
- top: 90px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .seats-message-actions-4
- {
- top: 190px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .quality {
- width: 50px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .seats-message-actions
- {
- width: 250px;
-}
-
-#MultiContourSeat_customMassage_5_2_topLabel {
- top: 65px;
- left: 275px;
- width: 250px;
- text-align: center;
-}
-
-#MultiContourSeat_customMassage_5_2_bottomLabel {
- top: 165px;
- left: 275px;
- width: 250px;
- text-align: center;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .delim-0 {
- left: 48px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .delim-1 {
- left: 98px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .delim-2 {
- left: 148px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .delim-3 {
- left: 198px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .button0 {
- left: 0;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .button1 {
- left: 50px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .button2 {
- left: 100px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .button3 {
- left: 150px;
-}
-
-#seatsMassageView5_2 #MultiContourSeat_customMassage .button4 {
- left: 200px;
-}
-
-/* END HMI concept 5.2 */ /* BEGIN HMI concept 6.1 */
-#seatsMassageView6_1 #settingsScreen .seatsMassageView6_1_seatLabel {
- top: 13px;
- left: 600px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView6_1 .mySettingsPopUpTitle {
- width: 143px;
- height: 25px;
- position: absolute;
- top: 163px;
- left: 216px !important;
- background: gray;
- text-align: center;
- line-height: 25px;
- font-size: 16px !important;
- font-weight: bold;
-}
-
-#seatsMassageView6_1 .mySettingsLabel {
- z-index: 100;
- left: 102px;
-}
-
-#seatsMassageView6_1 .MultiContourSeat_customMassage .btn-28.active {
- background: url(../images/common/btn-48h-active-gray.png) repeat-x
- !important;
-}
-
-#seatsMassageView6_1 #settingsScreen .durationButtons .quality,#seatsMassageView6_1 #settingsScreen .pauseButtons .quality
- {
- width: 60px;
-}
-
-#seatsMassageView6_1 #settingsScreen .quality {
- height: 35px;
- width: 130px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-#seatsMassageView6_1 #settingsScreen .btn-28 {
- text-align: center;
- line-height: 34px;
-}
-
-#seatsMassageView6_1 .settingsScreen {
- width: 800px;
- height: 368px;
- top: -15px;
- background: black;
- visibility: hidden;
-}
-
-#seatsMassageView6_1 .settingsScreen2 {
- width: 800px;
- height: 368px;
- top: -15px;
- background: black;
- visibility: hidden;
-}
-
-#seatsMassageView6_1 #settingsScreen .seats-message-actions {
- height: 39px;
- border: none;
-}
-
-#seatsMassageView6_1 #settingsScreen .button0 {
- left: 0;
-}
-
-#seatsMassageView6_1 #settingsScreen .button1 {
- left: 140px;
-}
-
-#seatsMassageView6_1 #settingsScreen .button2 {
- left: 280px;
-}
-
-#seatsMassageView6_1 #settingsScreen .button3 {
- left: 420px;
-}
-
-#seatsMassageView6_1 #settingsScreen .durationButtons .button0,#seatsMassageView6_1 #settingsScreen .pauseButtons .button0
- {
- left: 0;
-}
-
-#seatsMassageView6_1 #settingsScreen .durationButtons .button1,#seatsMassageView6_1 #settingsScreen .pauseButtons .button1
- {
- left: 70px;
-}
-
-#seatsMassageView6_1 #settingsScreen .durationButtons .button2,#seatsMassageView6_1 #settingsScreen .pauseButtons .button2
- {
- left: 140px;
-}
-
-#seatsMassageView6_1 #settingsScreen .durationButtons .button3,#seatsMassageView6_1 #settingsScreen .pauseButtons .button3
- {
- left: 210px;
-}
-
-#seatsMassageView6_1 #settingsScreen .durationButtons .button4,#seatsMassageView6_1 #settingsScreen .pauseButtons .button4
- {
- left: 280px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .control-11
- {
- top: 60px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .control-12
- {
- top: 105px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .control-13
- {
- top: 150px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .control-14
- {
- top: 230px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .control-15
- {
- top: 275px;
- left: 350px;
-}
-
-#seatsMassageView6_1 #settingsScreen2 .seats-message-1 {
- left: 280px;
- top: 110px;
-}
-
-#seatsMassageView6_1 #settingsScreen2 .seats-message-2 {
- left: 280px;
- top: 252px;
-}
-
-#seatsMassageView6_1 .seatsMassageView6_1_seatLabel {
- top: 172px;
- left: 45px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView6_1 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView6_1 .seatsMassageView6_1_upperLabel {
- top: 73px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_1 .seatsMassageView6_1_middleLabel {
- top: 118px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_1 .seatsMassageView6_1_lowerLabel {
- top: 163px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_1 .seatsMassageView6_1_frontLabel {
- top: 243px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_1 .seatsMassageView6_1_rearLabel {
- top: 287px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_1 .label {
- font-size: 26px;
- left: 20px;
-}
-
-#seatsMassageView6_1 .massageLabel {
- top: 51px;
-}
-
-#seatsMassageView6_1 .pattern {
- top: 91px;
-}
-
-#seatsMassageView6_1 .intensity {
- top: 131px;
-}
-
-#seatsMassageView6_1 .speed {
- top: 211px;
-}
-
-#seatsMassageView6_1 .duration {
- top: 251px;
-}
-
-#seatsMassageView6_1 .pause {
- top: 291px;
-}
-
-#seatsMassageView6_1 .editMenu {
- left: 70px;
- width: 240px;
- top: 12px;
- text-align: center;
-}
-
-#seatsMassageView6_1 .massageButtons {
- top: 50px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_1 .massageButtons img {
- height: 34px;
-}
-
-#seatsMassageView6_1 .patternButtons {
- top: 90px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_1 .intensityButtons {
- top: 130px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_1 .intensityEditCustom {
- top: 170px;
- left: 520px;
- width: 270px;
- height: 34px;
-}
-
-#seatsMassageView6_1 .speedButtons {
- top: 210px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_1 .durationButtons {
- top: 250px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_1 .pauseButtons {
- top: 290px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_1 .preview {
- top: 330px;
- left: 289px;
- width: 214px;
- height: 34px;
-}
-
-#seatsMassageView6_1 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView6_1 .settingsScreen2 .MultiContourSeat_customMassage_caption
- {
- top: 14px;
-}
-
-#seatsMassageView6_1 .SettingsBlocks {
- margin-left: auto;
- margin-right: auto;
- width: 315px;
- height: 50px;
- position: relative;
- -webkit-transition: width 1s;
-}
-
-#seatsMassageView6_1 .MultiContourSeat_customMassage {
- visibility: hidden;
- background-color: #000;
- z-index: 200;
- width: 800px;
- height: 345px;
- position: absolute;
- top: -60px;
- left: -112px;
- background-image: url('../images/settings/mcsBlockBackArrow6_1.png');
- background-position: 339px 39px;
- background-repeat: no-repeat;
-}
-
-#seatsMassageView6_1 .btn-48 {
- line-height: 48px;
- text-align: center;
-}
-
-#seatsMassageView6_1 .show {
- visibility: visible !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButtonUp
- {
- width: 200px;
- left: 560px;
- top: 101px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButtonDown
- {
- width: 200px;
- left: 560px;
- bottom: 143px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButtonEdit
- {
- width: 250px;
- left: 275px;
- bottom: 40px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButtonNew
- {
- width: 100px;
- left: 275px;
- bottom: 0px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButtonTrash
- {
- width: 140px;
- left: 385px;
- bottom: 0px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsBlock
- {
- width: 220px;
- top: 130px;
- text-align: center !important;
- transition: 1s;
- -webkit-transition: top 1s; /* Safari and Chrome */
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButton
- {
- width: 159px;
- left: 154px;
- top: 205px;
- line-height: 49px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButton2
- {
- width: 50px;
- left: 365px;
- top: 205px;
- line-height: 49px;
- text-align: left !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .seatsMassageView_settingsButton3
- {
- width: 50px;
- left: 403px;
- top: 130px;
- line-height: 49px;
- text-align: left !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .hide
- {
- visibility: hidden;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_1 .captionMySettings
- {
- top: 157px;
- left: 138px;
- width: 300px;
- height: 90px;
- border: 1px solid;
- padding: 8px 13px 13px 13px;
- font-size: 26px;
-}
-
-/* END HMI concept 6.1 */ /* BEGIN HMI concept 6.2 */
-#seatsMassageView6_2 #settingsScreen .seatsMassageView6_2_seatLabel {
- top: 13px;
- left: 600px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView6_2 .MultiContourSeat_customMassage .seatsMassageView6_2_seatLabel_custom
- {
- top: 60px;
- left: 300px !important;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsButton
- {
- width: 159px;
- left: 154px;
- top: 205px;
- line-height: 49px;
- z-index: 1;
-}
-
-#seatsMassageView6_2 .mySettingsPopUpTitle {
- width: 143px;
- height: 25px;
- position: absolute;
- top: 163px;
- left: 216px !important;
- background: gray;
- text-align: center;
- line-height: 25px;
- font-size: 16px !important;
- font-weight: bold;
-}
-
-#seatsMassageView6_2 .mySettingsLabel {
- z-index: 100;
- left: 102px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .captionMySettings
- {
- top: 157px;
- left: 138px;
- width: 300px;
- height: 90px;
- border: 1px solid;
- padding: 8px 13px 13px 13px;
- font-size: 26px;
-}
-
-#seatsMassageView6_2 #settingsScreen .durationButtons .quality,#seatsMassageView6_2 #settingsScreen .pauseButtons .quality
- {
- width: 60px;
-}
-
-#seatsMassageView6_2 #settingsScreen .quality {
- height: 35px;
- width: 130px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-#seatsMassageView6_2 #settingsScreen .btn-28 {
- text-align: center;
- line-height: 34px;
-}
-
-#seatsMassageView6_2 .settingsScreen {
- width: 800px;
- height: 368px;
- top: -15px;
- background: black;
- visibility: hidden;
-}
-
-#seatsMassageView6_2 .settingsScreen2 {
- width: 800px;
- height: 368px;
- top: -15px;
- background: black;
- visibility: hidden;
-}
-
-#seatsMassageView6_2 #settingsScreen .seats-message-actions {
- height: 39px;
- border: none;
-}
-
-#seatsMassageView6_2 #settingsScreen .button0 {
- left: 0;
-}
-
-#seatsMassageView6_2 #settingsScreen .button1 {
- left: 140px;
-}
-
-#seatsMassageView6_2 #settingsScreen .button2 {
- left: 280px;
-}
-
-#seatsMassageView6_2 #settingsScreen .button3 {
- left: 420px;
-}
-
-#seatsMassageView6_2 #settingsScreen .durationButtons .button0,#seatsMassageView6_2 #settingsScreen .pauseButtons .button0
- {
- left: 0;
-}
-
-#seatsMassageView6_2 #settingsScreen .durationButtons .button1,#seatsMassageView6_2 #settingsScreen .pauseButtons .button1
- {
- left: 70px;
-}
-
-#seatsMassageView6_2 #settingsScreen .durationButtons .button2,#seatsMassageView6_2 #settingsScreen .pauseButtons .button2
- {
- left: 140px;
-}
-
-#seatsMassageView6_2 #settingsScreen .durationButtons .button3,#seatsMassageView6_2 #settingsScreen .pauseButtons .button3
- {
- left: 210px;
-}
-
-#seatsMassageView6_2 #settingsScreen .durationButtons .button4,#seatsMassageView6_2 #settingsScreen .pauseButtons .button4
- {
- left: 280px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .control-11
- {
- top: 60px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .control-12
- {
- top: 105px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .control-13
- {
- top: 150px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .control-14
- {
- top: 230px;
- left: 350px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .control-15
- {
- top: 275px;
- left: 350px;
-}
-
-#seatsMassageView6_2 #settingsScreen2 .seats-message-1 {
- left: 280px;
- top: 110px;
-}
-
-#seatsMassageView6_2 #settingsScreen2 .seats-message-2 {
- left: 280px;
- top: 252px;
-}
-
-#seatsMassageView6_2 .seatsMassageView6_2_seatLabel {
- top: 172px;
- left: 45px;
- font-size: 24px;
- width: 199px;
- text-align: center;
-}
-
-#seatsMassageView6_2 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView6_2 .seatsMassageView6_2_upperLabel {
- top: 73px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_2 .seatsMassageView6_2_middleLabel {
- top: 118px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_2 .seatsMassageView6_2_lowerLabel {
- top: 163px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_2 .seatsMassageView6_2_frontLabel {
- top: 243px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_2 .seatsMassageView6_2_rearLabel {
- top: 287px;
- left: 615px !important;
- font-size: 18px !important;
-}
-
-#seatsMassageView6_2 .label {
- font-size: 26px;
- left: 20px;
-}
-
-#seatsMassageView6_2 .massageLabel {
- top: 51px;
-}
-
-#seatsMassageView6_2 .pattern {
- top: 91px;
-}
-
-#seatsMassageView6_2 .intensity {
- top: 131px;
-}
-
-#seatsMassageView6_2 .speed {
- top: 211px;
-}
-
-#seatsMassageView6_2 .duration {
- top: 251px;
-}
-
-#seatsMassageView6_2 .pause {
- top: 291px;
-}
-
-#seatsMassageView6_2 .editMenu {
- width: 240px;
- top: 12px;
- text-align: center;
- left: 70px;
-}
-
-#seatsMassageView6_2 .massageButtons {
- top: 50px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_2 .massageButtons img {
- height: 34px;
-}
-
-#seatsMassageView6_2 .patternButtons {
- top: 90px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_2 .intensityButtons {
- top: 130px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_2 .intensityEditCustom {
- top: 170px;
- left: 520px;
- width: 270px;
- height: 34px;
-}
-
-#seatsMassageView6_2 .speedButtons {
- top: 210px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_2 .durationButtons {
- top: 250px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_2 .pauseButtons {
- top: 290px;
- left: 240px;
- width: 560px;
-}
-
-#seatsMassageView6_2 .preview {
- top: 330px;
- left: 289px;
- width: 214px;
- height: 34px;
-}
-
-#seatsMassageView6_2 .settingsScreen2 .MultiContourSeat_customMassage_caption
- {
- top: 14px;
-}
-
-#seatsMassageView6_2 .MultiContourSeat_customMassage_caption {
- width: 600px;
- height: 28px;
- line-height: 29px;
- left: 74px;
- font-size: 26px;
-}
-
-#seatsMassageView6_2 .SettingsBlocks {
- margin-left: auto;
- margin-right: auto;
- width: 315px;
- height: 50px;
- position: relative;
- -webkit-transition: width 1s;
-}
-
-#seatsMassageView6_2 .MultiContourSeat_customMassage {
- visibility: hidden;
- background-color: #000;
- z-index: 200;
- width: 800px;
- height: 345px;
- position: absolute;
- top: -60px;
- left: -112px;
- background-image: url('../images/settings/mcsBlockBackArrow6_2.png');
- background-position: 39px 145px;
- background-repeat: no-repeat;
-}
-
-#seatsMassageView6_2 .btn-48 {
- line-height: 48px;
- text-align: center;
-}
-
-#seatsMassageView6_2 .show {
- visibility: visible !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsButtonNew
- {
- width: 100px;
- left: 270px;
- bottom: 20px;
- line-height: 49px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsButtonTrash
- {
- width: 71px;
- left: 446px;
- bottom: 5px;
- line-height: 49px;
- height: 78px;
- background-image: url("../images/settings/trash.png");
- background-repeat: no-repeat;
- background-size: contain;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsButtonSave
- {
- width: 100px;
- left: 480px;
- bottom: 20px;
- line-height: 49px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsBlock
- {
- width: 100px;
- top: 130px;
- line-height: 49px;
- text-align: center !important;
- transition: left 1s;
- -webkit-transition: left 1s; /* Safari and Chrome */
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsButton2
- {
- width: 50px;
- left: 365px;
- top: 205px;
- line-height: 49px;
- text-align: left !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .seatsMassageView_settingsButton3
- {
- width: 50px;
- left: 403px;
- top: 130px;
- line-height: 49px;
- text-align: left !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView6_2 .hide
- {
- visibility: hidden;
-}
-
-/* END HMI concept 6.2 */ /* BEGIN HMI concept 7.1 */
-#seatsMassageView7_1_appendix .localBack {
- background: url(../images/common/page-back-button.png) no-repeat center
- 12px, url(../images/common/btn-48h.png);
- width: 48px;
- z-index: 5000;
- left: 5px;
- top: 59px;
- visibility: hidden;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .seatsMassageView_settingsButton2
- {
- width: 50px;
- left: 365px;
- top: 205px;
- line-height: 49px;
- text-align: left !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .seatsMassageView_settingsButton
- {
- width: 159px;
- left: 154px;
- top: 205px;
- line-height: 49px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .captionMySettings
- {
- top: 157px;
- left: 138px;
- width: 300px;
- height: 90px;
- border: 1px solid;
- padding: 8px 13px 13px 13px;
- font-size: 26px;
-}
-
-#seatsMassageView7_1 .mySettingsPopUpTitle {
- width: 143px;
- height: 25px;
- position: absolute;
- top: 163px;
- left: 216px !important;
- background: gray;
- text-align: center;
- line-height: 25px;
- font-size: 16px !important;
- font-weight: bold;
-}
-
-#seatsMassageView7_1 .mySettingsLabel {
- z-index: 100;
- left: 102px;
-}
-
-#seatsMassageView7_1_appendix .btn-48 {
- line-height: 48px;
- text-align: center;
-}
-
-#seatsMassageView7_1_appendix .seats-message-actions-3 {
- top: 165px;
- left: 59px;
-}
-
-#seatsMassageView7_1_appendix .show {
- visibility: visible !important;
-}
-
-#seatsMassageView7_1_appendix {
- z-index: 2003;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView {
- visibility: hidden;
- background-color: whiteSmoke;
- width: 350px;
- height: 368px;
- position: absolute;
- top: 56px;
- left: 305px !important;
- background: black;
- border: #A6A6A6 solid 2px;
- border-radius: 6px;
- font-size: 18px;
- font-family: Arial;
-}
-
-#seatsMassageView7_1_appendix .titleQuestion {
- font-size: 21px;
- font-family: Arial;
- width: 350px;
- text-align: center;
- top: 25px;
-}
-
-#seatsMassageView7_1_appendix .question {
- font-size: 18px;
- font-family: Arial;
- width: 350px;
- text-align: center;
- top: 65px;
-}
-
-#seatsMassageView7_1_appendix .titleAnswer {
- font-size: 21px;
- font-family: Arial;
- width: 350px;
- text-align: center;
- top: 103px;
-}
-
-#seatsMassageView7_1_appendix .View1 .seats-message-actions-3 {
- top: 194px;
- left: 7px;
-}
-
-#seatsMassageView7_1_appendix .View1 .titleQuestion {
- left: 0px;
- width: 500px;
- top: 40px;
-}
-
-#seatsMassageView7_1_appendix .View1 .question {
- left: 0px;
- top: 90px;
- text-align: center;
- width: 500px;
-}
-
-#seatsMassageView7_1_appendix .View1 .titleAnswer {
- left: 0px;
- width: 500px;
- top: 134px;
-}
-
-#seatsMassageView7_1_appendix .View1 .button0 {
- left: 0;
- top: 0 !important;
-}
-
-#seatsMassageView7_1_appendix .View1 .button1 {
- left: 0;
- top: 45px !important;
-}
-
-#seatsMassageView7_1_appendix .View1 .button2 {
- left: 0;
- top: 90px !important;
-}
-
-#seatsMassageView7_1_appendix .View1 .button3 {
- left: 258px !important;
- top: 0px !important;
-}
-
-#seatsMassageView7_1_appendix .View1 .button4 {
- left: 258px !important;
- top: 45px !important;
-}
-
-#seatsMassageView7_1_appendix .View1 .button5 {
- left: 258px !important;
- top: 90px !important;
-}
-
-#seatsMassageView7_1_appendix .View1 .btn-48 {
- height: 35px !important;
- line-height: 35px !important;
-}
-
-#seatsMassageView7_1_appendix .seatsMassageDialogView4 {
- visibility: hidden;
- font-size: 26px !important;
- font-family: Arial;
- font-size: 18px;
- font-family: Arial;
- left: 300px;
- top: 140px;
- width: 232px;
- height: 127px;
- background: white;
- border-radius: 6px;
- border: 1px solid gray;
- color: black;
- text-align: center;
- padding: 10px;
-}
-
-#seatsMassageView7_1_appendix .seatsMassageDialogView5 {
- visibility: hidden;
- font-size: 26px !important;
- font-family: Arial;
- font-size: 18px;
- font-family: Arial;
- left: 300px;
- top: 132px;
- width: 326px;
- height: 165px;
- background: white;
- border-radius: 6px;
- border: 1px solid gray;
- color: black;
- text-align: center;
- padding: 10px;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView.View1 {
- visibility: hidden;
- background-color: whiteSmoke;
- width: 520px;
- height: 368px;
- position: absolute;
- top: 56px;
- left: 265px !important;
- background: black;
- border: #A6A6A6 solid 2px;
- border-radius: 6px;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView .button0 {
- left: 0;
- top: 0;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView .button1 {
- left: 0;
- top: 60px;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView .button2 {
- left: 0;
- top: 120px;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView .button3 {
- left: 0;
- top: 180px;
-}
-
-#seatsMassageView7_1_appendix .SeatsMassageDialogView .button {
- width: 245px;
- border-radius: 3px;
- border: 1px solid #393939;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .concept1_5Settings
- {
- top: 200px;
- left: 197px;
- width: 138px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .concept1_5Settings span
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .concept1_5Settings .ico
- {
- float: left;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .concept1_5Massage
- {
- text-align: center;
- height: 48px;
- line-height: 48px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .toogleButtonContainer .button1
- {
- left: 50px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .toogleButtonContainer .delim-0
- {
- left: 48px;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .concept1_5SettingsScreen
- {
- top: -60px;
- left: 154px;
- width: 291px;
- height: 345px;
- background: black;
- z-index: 100;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .btn-48
- {
- line-height: 48px;
- text-align: center;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .show
- {
- visibility: visible !important;
-}
-
-#view_settings_vehicle_MultiContourSeat_Adjust #seatsMassageView7_1 .hide
- {
- visibility: hidden;
-}
-
-/* END HMI concept 7.1 */ /* lumbars */ /* driver */
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion1 .active {
- background: url(../images/settings/TopLumbar_WhiteOutline_driver.png)
- no-repeat;
- width: 38px;
- height: 29px;
- top: 70px;
- left: 22px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion2 .active {
- background: url(../images/settings/MiddleLumbar_WhiteOutline_driver.png)
- no-repeat;
- width: 34px;
- height: 30px;
- top: 84px;
- left: 18px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion3 .active {
- background: url(../images/settings/LowerLumbar_WhiteOutline_driver.png)
- no-repeat;
- width: 33px;
- height: 36px;
- top: 99px;
- left: 14px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion4 .active {
- background: url(../images/settings/lumbar_cushion_top-active.png)
- no-repeat;
- width: 70px;
- height: 70px;
- top: 71px;
- left: -2px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion5 .active {
- background: url(../images/settings/lumbar_cushion_bot-active.png)
- no-repeat;
- width: 91px;
- height: 59px;
- top: 112px;
- left: -37px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion6 .active {
- background: url(../images/settings/whiteOutline_driver-lumbar-all.png)
- no-repeat;
- width: 47px;
- height: 68px;
- top: 70px;
- left: 16px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion7 .active {
- background: url(../images/settings/Cushion_WhiteOutline_driver.png)
- no-repeat;
- width: 74px;
- height: 36px;
- top: 119px;
- left: -32px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion1 .lumbar {
- background: url(../images/settings/driver-lumbar-top.png) no-repeat;
- width: 36px;
- height: 31px;
- top: 69px;
- left: 22px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion2 .lumbar {
- background: url(../images/settings/driver-lumbar-mid.png) no-repeat;
- width: 34px;
- height: 31px;
- top: 84px;
- left: 17px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion3 .lumbar {
- background: url(../images/settings/driver-lumbar-low.png) no-repeat;
- width: 31px;
- height: 35px;
- top: 99px;
- left: 15px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion4 .lumbar {
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat_adj1.png)
- no-repeat;
- width: 70px;
- height: 70px;
- top: 68px;
- left: -4px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion5 .lumbar {
- background: url(../images/settings/lumbar_cushion.png) no-repeat;
- width: 91px;
- height: 59px;
- top: 111px;
- left: -36px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion6 .lumbar {
- background: url(../images/settings/driver-lumbar-all.png) no-repeat;
- width: 47px;
- height: 68px;
- top: 68px;
- left: 12px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_driverSeat_cushion7 .lumbar {
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat_adj2.png)
- no-repeat;
- width: 73px;
- height: 37px;
- top: 119px;
- left: -30px;
- opacity: 0;
-}
-
-/* passenger */
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion1 .active {
- background: url(../images/settings/TopLumbar_WhiteOutline_passenger.png)
- no-repeat;
- width: 38px;
- height: 29px;
- top: 70px;
- left: 541px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion2 .active {
- background:
- url(../images/settings/MiddleLumbar_WhiteOutline_passenger.png)
- no-repeat;
- width: 34px;
- height: 30px;
- top: 84px;
- left: 549px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion3 .active {
- background:
- url(../images/settings/LowerLumbar_WhiteOutline_passenger.png)
- no-repeat;
- width: 33px;
- height: 36px;
- top: 99px;
- left: 555px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion4 .active {
- background:
- url(../images/settings/lumbar_cushion_top_passenger-active.png)
- no-repeat;
- width: 70px;
- height: 70px;
- top: 71px;
- left: 535px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion5 .active {
- background:
- url(../images/settings/lumbar_cushion_bot_passanger-active.png)
- no-repeat;
- width: 91px;
- height: 59px;
- top: 112px;
- left: 546px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion6 .active {
- background:
- url(../images/settings/WhiteOutline_passenger-lumbar-all.png)
- no-repeat;
- width: 47px;
- height: 68px;
- top: 70px;
- left: 544px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion7 .active {
- background: url(../images/settings/Cushion_WhiteOutline_passenger.png)
- no-repeat;
- width: 74px;
- height: 36px;
- top: 120px;
- left: 558px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion1 .lumbar {
- background: url(../images/settings/passenger-lumbar-top.png) no-repeat;
- width: 37px;
- height: 31px;
- top: 68px;
- left: 542px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion2 .lumbar {
- background: url(../images/settings/passenger-lumbar-mid.png) no-repeat;
- width: 34px;
- height: 31px;
- top: 84px;
- left: 550px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion3 .lumbar {
- background: url(../images/settings/passenger-lumbar-low.png) no-repeat;
- width: 32px;
- height: 35px;
- top: 99px;
- left: 555px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion4 .lumbar {
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat_adj1_passenger.png)
- no-repeat;
- width: 69px;
- height: 69px;
- top: 70px;
- left: 535px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion5 .lumbar {
- background: url(../images/settings/passenger_lumbar_cushion.png)
- no-repeat;
- width: 91px;
- height: 59px;
- top: 111px;
- left: 546px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion6 .lumbar {
- background: url(../images/settings/passenger-lumbar-all.png) no-repeat;
- width: 47px;
- height: 68px;
- top: 68px;
- left: 540px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_passengerSeat_cushion7 .lumbar {
- background:
- url(../images/settings/view_settings_vehicle_MultiContourSeat_adj2_passenger.png)
- no-repeat;
- width: 72px;
- height: 37px;
- top: 119px;
- left: 559px;
- opacity: 0;
-}
-
-/* CUSTOM MASSAGE */ /* Driver cushions */
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion6 .active
- {
- background: url(../images/settings/TopLumbar_WhiteOutline_driver.png)
- no-repeat;
- width: 38px;
- height: 29px;
- top: 70px;
- left: 22px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion7 .active
- {
- background: url(../images/settings/MiddleLumbar_WhiteOutline_driver.png)
- no-repeat;
- width: 34px;
- height: 30px;
- top: 84px;
- left: 18px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion8 .active
- {
- background: url(../images/settings/LowerLumbar_WhiteOutline_driver.png)
- no-repeat;
- width: 33px;
- height: 36px;
- top: 99px;
- left: 14px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion9 .active
- {
- background: url(../images/settings/driver-lumbar-m-top-selected.png)
- no-repeat;
- width: 77px;
- height: 41px;
- top: 119px;
- left: -30px;
- z-index: 1;
- opacity: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion10 .active
- {
- background: url(../images/settings/driver-lumbar-m-bottom-selected.png)
- no-repeat;
- width: 77px;
- height: 41px;
- top: 119px;
- left: -30px;
- z-index: 1;
- opacity: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion6 .lumbar
- {
- background: url(../images/settings/driver-lumbar-top.png) no-repeat;
- width: 36px;
- height: 31px;
- top: 69px;
- left: 22px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion7 .lumbar
- {
- background: url(../images/settings/driver-lumbar-mid.png) no-repeat;
- width: 34px;
- height: 31px;
- top: 84px;
- left: 17px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion8 .lumbar
- {
- background: url(../images/settings/driver-lumbar-low.png) no-repeat;
- width: 31px;
- height: 35px;
- top: 99px;
- left: 15px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion9 .lumbar
- {
- background: url(../images/settings/driver-lumbar-m-top.png) no-repeat;
- width: 73px;
- height: 37px;
- top: 119px;
- left: -30px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_driverSeat_cushion10 .lumbar
- {
- background: url(../images/settings/driver-lumbar-m-bottom.png) no-repeat;
- width: 73px;
- height: 37px;
- top: 119px;
- left: -30px;
- opacity: 0;
-}
-
-/* Passenger cushions */
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion6 .active
- {
- background: url(../images/settings/TopLumbar_WhiteOutline_passenger.png)
- no-repeat;
- width: 38px;
- height: 29px;
- top: 70px;
- left: 541px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion7 .active
- {
- background:
- url(../images/settings/MiddleLumbar_WhiteOutline_passenger.png)
- no-repeat;
- width: 34px;
- height: 30px;
- top: 84px;
- left: 549px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion8 .active
- {
- background:
- url(../images/settings/LowerLumbar_WhiteOutline_passenger.png)
- no-repeat;
- width: 33px;
- height: 36px;
- top: 99px;
- left: 555px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion9 .active
- {
- background: url(../images/settings/passenger-lumbar-m-top-selected.png)
- no-repeat;
- width: 77px;
- height: 41px;
- top: 120px;
- left: 558px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion10 .active
- {
- background:
- url(../images/settings/passenger-lumbar-m-bottom-selected.png)
- no-repeat;
- width: 77px;
- height: 41px;
- top: 120px;
- left: 558px;
- z-index: 1;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion6 .lumbar
- {
- background: url(../images/settings/passenger-lumbar-top.png) no-repeat;
- width: 36px;
- height: 31px;
- top: 70px;
- left: 541px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion7 .lumbar
- {
- background: url(../images/settings/passenger-lumbar-mid.png) no-repeat;
- width: 34px;
- height: 31px;
- top: 84px;
- left: 549px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion8 .lumbar
- {
- background: url(../images/settings/passenger-lumbar-low.png) no-repeat;
- width: 31px;
- height: 35px;
- top: 99px;
- left: 555px;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion9 .lumbar
- {
- background: url(../images/settings/passenger-lumbar-m-top.png) no-repeat;
- width: 77px;
- height: 41px;
- top: 120px;
- left: 558px;;
- opacity: 0;
-}
-
-#view_settings_vehicle_MultiContourSeat_customMassage_passengerSeat_cushion10 .lumbar
- {
- background: url(../images/settings/passenger-lumbar-m-bottom.png)
- no-repeat;
- width: 77px;
- height: 41px;
- top: 120px;
- left: 558px;
- opacity: 0;
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/css/media.css b/SDL_Core/src/components/HMI/css/media.css
deleted file mode 100644
index ac9c5df9d..000000000
--- a/SDL_Core/src/components/HMI/css/media.css
+++ /dev/null
@@ -1,528 +0,0 @@
-#media_leftmenu {
- z-index: 301;
- position: absolute;
- top: 90px;
- left: 0px;
- width: 150px;
- height: 300px;
- background: #333;
-}
-
-#media_cdButton {
- font-size: 18px;
- padding-left: 48px;
- line-height: 48px;
-}
-
-#media_sdlButton {
- font-size: 18px;
- line-height: 48px;
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#media_sdlButton span {
- margin-left: 50px;
-}
-
-#media_status {
- bottom: 0px;
- left: 0px;
- font-size: 21px;
- width: 324px;
- height: 48px;
- cursor: pointer;
- background: url(../images/common/media-status-bg.png) no-repeat;
- z-index: 1;
-}
-
-#media_status_homestatus {
- position: absolute;
- visibility: hidden;
- width: 100%;
- line-height: 50px;
-}
-
-#media_status_homestatus span {
- padding-left: 11px;
-}
-
-.ls_border {
- z-index: 201;
- position: absolute;
- top: -3px;
- left: 0px;
- width: 153px;
- height: 306px;
- background: url(../images/common/ls_border.png) no-repeat;
-}
-
-.media-ls-items {
- position: relative;
- width: 150px;
- height: 300px;
-}
-
-.media-ls-item {
- z-index: 201;
- position: relative;
- height: 50px;
- cursor: pointer;
- background: url(../images/media/ls-item_bg.png) no-repeat;
-}
-
-.media-ls-item.active_state {
- background: url(../images/media/ls-item_bg_act.png) no-repeat !important;
-}
-
-.media-ls-item>.bg {
- z-index: 201;
- position: absolute;
- top: 0px;
- left: 0px;
- width: 150px;
- height: 50px;
-}
-
-.media-ls-item>.ico {
- z-index: 299;
- position: absolute;
- left: 0px;
- width: 50px;
- height: 50px;
-}
-
-.media-ls-item>.ico.more {
- left: 50px;
-}
-
-.media-ls-item>p {
- z-index: 298;
- position: absolute;
- left: 48px;
- width: 86px;
- height: 50px;
- font-size: 18px;
- line-height: 50px;
- white-space: nowrap;
- overflow: hidden;
-}
-
-.media-ls-item>.led {
- z-index: 299;
- position: absolute;
- top: 0px;
- right: 8px;
- width: 24px;
- height: 50px;
-}
-
-.media-ls-item.empty {
- background: #333333;
-}
-
-.main-preset-buttons-wraper {
- position: relative;
- width: 468px;
- height: 100px;
- float: left;
- left: 165px;
- top: 290px;
- z-index: 503;
-}
-
-.main-preset-buttons-wraper .preset-items {
- position: relative;
- width: 467px;
- height: 99px;
- border: 1px solid #393939;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- z-index: 1;
-}
-
-.main-preset-buttons-wraper .preset-item {
- position: relative;
- display: inline-block;
- vertical-align: top;
- border-right: 1px solid #393939;
- border-bottom: 1px solid #393939;
- width: 116px;
- height: 49px;
- cursor: pointer;
-}
-
-.main-preset-buttons-wraper .preset-item.a0 {
- background: url(../images/media/bcs-item_bgL.png) no-repeat;
- border-right: 1px solid #393939;
- border-bottom: 1px solid #393939;
-}
-
-.main-preset-buttons-wraper .preset-item.a0.pressed {
- background: url(../images/media/bcs-item_bgL_pressed.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a0.active {
- background: url(../images/media/bcs-item_bg_act.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a1 {
- background: url(../images/media/bcs-item_bgS.png) no-repeat;
- border-right: 1px solid #393939;
- border-bottom: 1px solid #393939;
- width: 157px;
-}
-
-.main-preset-buttons-wraper .preset-item.a1.pressed {
- background: url(../images/media/bcs-item_bgS_pressed.png) no-repeat;
- width: 157px;
-}
-
-.main-preset-buttons-wraper .preset-item.a1.active {
- background: url(../images/media/bcs-item_bg_act.png) repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a2 {
- background: url(../images/media/bcs-item_bgR.png) no-repeat;
- border-bottom: 1px solid #393939;
- width: 153px;
-}
-
-.main-preset-buttons-wraper .preset-item.a2.pressed {
- background: url(../images/media/bcs-item_bgR_pressed.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a2.active {
- background: url(../images/media/bcs-item_bg_act.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a3 {
- background: url(../images/media/bcs-item_bgL.png) no-repeat;
- border-right: 1px solid #393939;
-}
-
-.main-preset-buttons-wraper .preset-item.a3.pressed {
- background: url(../images/media/bcs-item_bgL_pressed.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a3.active {
- background: url(../images/media/bcs-item_bg_act.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a4 {
- background: url(../images/media/bcs-item_bgS.png) no-repeat;
- border-right: 1px solid #393939;
- width: 157px;
-}
-
-.main-preset-buttons-wraper .preset-item.a4.pressed {
- background: url(../images/media/bcs-item_bgS_pressed.png) no-repeat;
- width: 157px;
-}
-
-.main-preset-buttons-wraper .preset-item.a4.active {
- background: url(../images/media/bcs-item_bg_act.png) repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a5 {
- background: url(../images/media/bcs-item_bgR.png) no-repeat;
- width: 153px;
-}
-
-.main-preset-buttons-wraper .preset-item.a5.pressed {
- background: url(../images/media/bcs-item_bgR_pressed.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item.a5.active {
- background: url(../images/media/bcs-item_bg_act.png) no-repeat;
-}
-
-.main-preset-buttons-wraper .preset-item>.bg {
- z-index: 201;
- position: absolute;
- top: 0px;
- left: 0px;
- width: 155px;
- height: 49px;
-}
-
-.main-preset-buttons-wraper .preset-item>span {
- z-index: 202;
- display: block;
- position: absolute;
- left: 10px;
- width: 30px;
- height: 50px;
- font-size: 32px;
- line-height: 50px;
- white-space: nowrap;
- overflow: hidden;
- color: #999;
-}
-
-.main-preset-buttons-wraper .preset-item>p {
- z-index: 202;
- position: absolute;
- left: 40px;
- width: 100px;
- height: 50px;
- font-size: 18px;
- line-height: 50px;
- white-space: nowrap;
- overflow: hidden;
-}
-
-.home-preset-buttons-wraper {
- top: 82px;
- left: 34px;
- z-index: 50;
-}
-
-.home-preset-buttons-wraper .preset-items {
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- border: 1px solid #393939;
- width: 328px;
- height: 79px;
-}
-
-.bc-item2>p {
- z-index: 202;
- position: absolute;
- left: 40px;
- width: 100px;
- height: 50px;
- font-size: 18px;
- line-height: 50px;
- white-space: nowrap;
- overflow: hidden;
-}
-
-.bc-item-big {
- position: relative;
- float: left;
- width: 156px;
- height: 100px;
- line-height: 100px;
- text-align: center;
- font-size: 20px;
-}
-
-.bc-item-big.prevcd,.bc-item-big.prevusb,.bc-item-big.prevsd,.bc-item-big.prevblue
- {
- width: 155px;
- height: 98px;
- border-right: 1px solid #393939;
- cursor: pointer;
- background: url(../images/media/cd-prev-btn.png) no-repeat;
-}
-
-.bc-item-big.prevcd.pressed,.bc-item-big.prevusb.pressed,.bc-item-big.prevsd.pressed,.bc-item-big.prevblue.pressed
- {
- background: url(../images/media/cd-prev-btn_pressed.png) no-repeat;
-}
-
-.bc-item-big.playcd {
- width: 157px;
- height: 98px;
- border-right: 1px solid #393939;
- cursor: pointer;
- background: url(../images/media/cd_play_btn.png) no-repeat;
-}
-
-.playIcon {
- position: absolute;
- left: 66px;
-}
-
-.playIcon.hideicon {
- visibility: hidden;
-}
-
-.playIcon.showicon {
- visibility: visible;
-}
-
-.bc-item-big.playcd.pressed,.bc-item-big.playusb.pressed,.bc-item-big.playsd.pressed,.bc-item-big.playblue.pressed
- {
- background: url(../images/media/cd_play_btn_pressed.png) no-repeat;
-}
-
-.bc-item-big.nextcd,.bc-item-big.nextusb,.bc-item-big.nextsd,.bc-item-big.nextblue
- {
- width: 154px;
- height: 98px;
- cursor: pointer;
- background: url(../images/media/cd-next-btn.png) no-repeat;
-}
-
-.bc-item-big.nextcd.pressed,.bc-item-big.nextusb.pressed,.bc-item-big.nextsd.pressed,.bc-item-big.nextblue.pressed
- {
- background: url(../images/media/cd-next-btn_pressed.png) no-repeat;
-}
-
-#bt-bg {
- position: relative;
- float: left;
- margin-left: 10px;
- margin-top: -8px;
-}
-
-#bt-dis-controls {
- background: url(../images/media/disabled_player_controls.png) no-repeat;
- width: 470px;
- height: 100px;
- position: relative;
- bottom: 17px;
- float: left;
- margin-left: 13px;
-}
-
-#avin-line {
- z-index: 200;
- position: relative;
- width: 151px;
- height: 297px;
- margin-top: 100px;
- margin-left: 171px;
-}
-
-.player_controlls {
- z-index: 199;
- position: absolute;
- top: 237px;
- left: 13px;
- width: 468px;
- height: 99px;
- background: url("../images/media/btn_bg.png") repeat;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
-}
-
-#sdl_view_container .track-info {
- left: 165px;
- top: 55px;
-}
-
-#sdl_view_container .list-content {
- border: none;
-}
-
-#sdl_view_container .list-item {
- position: relative;
- width: 100%;
- height: 48px;
- font-size: 20px;
- line-height: 50px;
- border: 1px solid #393939;
-}
-
-.track-info {
- z-index: 199;
- position: absolute;
- left: 13px;
- width: 470px;
- overflow: hidden;
- height: 237px;
-}
-
-.track-info>.total {
- position: absolute;
- top: 30px;
- left: 10px;
- width: 300px;
- text-align: left;
- font-size: 20px;
- color: #999999;
-}
-
-.track-info>.title {
- top: 110px;
- font-size: 38px;
- left: 7px;
-}
-
-.track-info>.track-number {
- top: 153px;
- font-size: 26px;
- left: 10px;
-}
-
-.track-info>.time {
- top: 190px;
- font-size: 26px;
- left: 10px;
-}
-
-.track-info>.divider_o {
- top: 65px;
-}
-
-.track-info>.device {
- position: absolute;
- top: 30px;
- left: 10px;
- width: 300px;
- text-align: left;
- font-size: 20px;
- color: #999999;
-}
-
-.divider_o {
- position: absolute;
- top: 120px;
- left: 0px;
- width: 470px;
- height: 1px;
- background: url("../images/media/divider_o.png") no-repeat;
-}
-
-.statusInfo {
- width: 275px;
- height: 48px;
-}
-
-.statusInfo .station {
- top: 12px;
- left: 11px;
- text-overflow: ellipsis;
- overflow: hidden;
- height: 21px;
- width: 220px;
-}
-
-.statusInfo .station span {
- display: none;
-}
-
-.statusInfo .icon {
- width: 50px;
- height: 50px;
- left: 224px;
-}
-
-.cdIco {
- background: url(../images/media/ico_cd.png) no-repeat !important
-}
-
-.appIco {
- background: url(../images/info/info_leftMenu_apps_ico.png) no-repeat
- !important
-}
-
-#media_player_view_container {
- background: url(../images/media/player_view.png) no-repeat;
- width: 635px;
- height: 323px;
- top: 70px;
- left: 161px;
- z-index: 501;
-}
-
-#sdl_view_container .ffw_list_menu {
- top: 90px;
- left: 650px;
- width: 140px;
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/css/navigation.css b/SDL_Core/src/components/HMI/css/navigation.css
deleted file mode 100644
index 55cab5b14..000000000
--- a/SDL_Core/src/components/HMI/css/navigation.css
+++ /dev/null
@@ -1,102 +0,0 @@
-/*NAVIGATION CSS*/
-#baseNavigation{
- z-index: 2;
- position: absolute;
- top: 48px;
- width: 800px;
- height: 384px;
-}
-#baseNavigation .mainField{
- position: absolute;
- background: rgba(124, 124, 124, 0.3);
- border: 1px solid;
- border-color: rgba(90, 90, 90, 0.31);
- border-radius: 3px;
- box-shadow: inset 2px 2px 10px 0px rgba(112, 112, 112, 0.3), inset -2px -2px 10px 0px rgba(112, 112, 112, 0.3);
- padding-top: 10px;
- padding-left: 10px;
- font-size: 18px;
-}
-#baseNavigation .softButton{
- position: absolute;
- border-radius: 3px;
- border: 1px solid #393939;
-}
-#baseNavigation .mainField1{
- top: 0;
- height: 30px;
- width: 190px;
- left: 0;
-}
-#baseNavigation .mainField2{
- top: 0;
- height: 40px;
- width: 380px;
- left: 204px;
-}
-#baseNavigation .mainField3{
- top: 0;
- height: 30px;
- width: 190px;
- right: 0;
-}
-#baseNavigation .mainField4{
- top: 50px;
- height: 30px;
- width: 90px;
- right: 0;
- overflow: hidden;
- white-space: nowrap;
-}
-#baseNavigation .mainField5{
- top: 100px;
- height: 30px;
- width: 90px;
- right: 0;
-}
-#baseNavigation .mainField6{
- bottom: 0;
- height: 40px;
- width: 280px;
- left: 254px;
-}
-#baseNavigation .softButton1{
- width: 250px;
- bottom: 0;
- left: 0;
- position: absolute!important;
- margin: 0px!important;
- height: 49px!important;
- font-size: 32px;
- line-height: 50px!important;
-}
-#baseNavigation .softButton2{
- width: 250px;
- bottom: 0px;
- right: 0px;
- position: absolute!important;
- margin: 0px!important;
- height: 49px!important;
- font-size: 32px;
- line-height: 50px!important;
-}
-#baseNavigation .softButton3{
- width: 100px;
- top: 100px;
- left: 0;
- position: absolute!important;
- margin: 0px!important;
- height: 49px!important;
- font-size: 32px;
- line-height: 50px!important;
-}
-#baseNavigation .softButton4{
- width: 100px;
- top: 150px;
- left: 0;
- position: absolute!important;
- margin: 0px!important;
- height: 49px!important;
- font-size: 32px;
- line-height: 50px!important;
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/css/phone.css b/SDL_Core/src/components/HMI/css/phone.css
deleted file mode 100644
index fbd538b06..000000000
--- a/SDL_Core/src/components/HMI/css/phone.css
+++ /dev/null
@@ -1,1549 +0,0 @@
-/**
- * Phone module CSS
- *
- * @category Style Sheets
- * @filesource css/phone.css
- * @version 2.0
- */
-#phone {
- width: 800px;
- height: 480px;
- background: url(../images/phone/bg.png) no-repeat;
- background-position: top;
-} /*
-
-
- Backgrpund for active toogleButton
-#phone .toogleButtonContainer .active {
- background: url(../images/phone/bcs-item_bg_act.png);
-}
-
-#phone .delim {
- position: relative;
- float: left;
- border: #393939 1px solid;
- height: 26px;
- width: 0px;
-}
-
- LEFT MENU
-*/
-#phone_menu {
- position: absolute;
- top: 90px;
- left: 0px;
- width: 150px;
- height: 300px;
- background: #333;
-}
-
-.ls_border {
- z-index: 201;
- position: absolute;
- top: -3px;
- left: 0px;
- width: 153px;
- height: 306px;
-}
-
-.ls-items {
- position: relative;
- width: 150px;
- height: 300px;
-}
-
-.ls-item {
- z-index: 201;
- position: relative;
- width: 150px;
-}
-
-/*.ls-item > .bg{z-index:201;position:absolute;top:0px;left:0px;width:150px;height:50px;}
- */
-.ls-item>.ico {
- z-index: 299;
- position: absolute;
- left: 10px;
- width: 30px;
- height: 30px;
- top: 10px;
-} /*
- .ls-item > .ico.more {left:50px;}
- */
-.ls-item span {
- z-index: 298;
- position: absolute;
- left: 50px;
- width: 100px;
- height: 50px;
- font-size: 18px;
- line-height: 50px;
- white-space: nowrap;
- overflow: hidden;
-}
-
-/*.ls-item > .led{z-index:299;position:absolute;top:0px;right:8px;width:24px;height:50px;}
- .ls-item.empty{background:#333333;}
- .firts_item{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;}
- .last_item{-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;}
- */
-.lsp1_p {
- background: url("../images/phone/menu_bg.png") repeat-x bottom;
-}
-
-.phone_active {
- background: url("../images/phone/menu_active.png") repeat-x bottom
- !important;
- border-top: 1px solid #3e3115;
- border-bottom: 1px solid #4a3a17
-}
-
-#phone_menu .ls-item {
- height: 48px;
- border-bottom: 1px solid #656565;
- border-top: 1px solid #393939;
-} /*
- .navigationApp {width:26px;height:25px;background:url("../images/phone/ico_navigation.png") no-repeat;left:60px;top:10px;}
-
-#phone_menu.hide {
- left: -170px;
-}
-
-#phone_menu_quickdialButton,
-#phone_menu_messagingButton,
-#phone_menu_settingsButton {
- z-index: 203;
-}
-
-#phone .list-item.active {
- background: url(../images/phone/phone_button_bg_active.png) repeat-x;
-}
- PHONE STATUS BAR
-*/
-#status_phone {
- top: 0px;
- left: 0px;
- font-size: 21px;
- cursor: pointer;
- width: 324px;
- height: 48px;
- background: url(../images/common/phone-statusbar-bg.png) no-repeat;
- z-index: 1;
-}
-
-#status_phone_label {
- width: 100%;
- display: block;
- visibility: hidden;
-}
-
-#status_phone_label span {
- padding-left: 11px;
-} /*
-
-#status_phone_call {
- position: absolute;
- top: 0px;
- left: 11px;
-}
-
-#status_phone_antena {
- background: url(../images/phone/phone_antena.png) no-repeat;
- width: 28px;
- height: 18px;
- top: 15px;
- left: 236px;
-}
-
-
- PHONE HOME WIDGET
-
-#home_widgetPhone_dndButton {
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- border: 1px solid #393939;
- padding: 12px 53px 11px 14px;
- font-size: 21px;
- top: 104px;
- left: 96px;
-}
-
-#home_widgetPhone_onCall {
- width: 100%;
-}
-
-#home_widgetPhone_dndButton .ind_inact {
- position: absolute;
- right: 17px;
- top: 13px;
- width:6px;
- height:21px;
- background:url(../images/common/ind_vert_def.png) no-repeat;
-}
-
-#home_widgetPhone_dndButton .ind_act {
- position: absolute;
- right: 11px;
- top: 8px;
- background:url(../images/common/ind_vert_active.png) no-repeat;
- width:19px;
- height:32px;
-}
-
-#home_widgetPhone_endCallButton {
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- border: 1px solid #393939;
- padding: 12px 77px 11px 14px;
- font-size: 21px;
- top: 104px;
- left: 96px;
- z-index: 0;
-}
-
-#home_widgetPhone_endCallButton .ico {
- left: 60px;
- position: relative;
- top: 2px;
- float: right;
-}
-
-#home_widgetPhone_icons {
- background: url(../images/home/home_phone.png) no-repeat;
- width: 137px;
- height: 35px;
- left: 132px;
- top: 18px;
-}
-
-#home_widgetPhone_icons.help {
- background: url(../images/home/home_phone_blur.png) no-repeat !important;
-}
-
-#home_widgetPhone_label {
- font-size: 27px;
- top: 60px;
- left: 52px;
- width: 300px;
- text-align: center;
-}
-
-#home_widgetPhone_nameInfo {
- position: relative;
- left: 100px;
- top: 25px;
-}
-
-#home_widgetPhone_nameInfo span {
- font-size: 24px;
- margin-left: 43px;
-}
-
-#home_widgetPhone_callInfo {
- position: relative;
- left: 100px;
- top: 38px;
-}
-
-#home_widgetPhone_callInfo span {
- font-size: 24px;
- margin-left: 20px;
-}
-
-#home_widgetPhone_help {
- width: 194px;
- height: 155px;
- background: url(../images/home/home_phone_end_blur.png) no-repeat;
- position: absolute;
- top: 15px;
- left: 82px;
- z-index: 1;
- visibility: hidden;
-}
-
- PHONE MODULE
-
- DIALPAD
-
-
-#phone_endCallMessage {
- background: black;
- border: 1px solid #A28542;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- font-size: 23px;
- font-weight: bold;
- height: 75px;
- left: 271px;
- line-height: 68px;
- text-align: center;
- top: 170px;
- width: 250px;
- z-index: 1000;
- display: none;
-}
-
-#phone_info {
- width: 248px;
- height: 27px;
- top: 15px;
- left: 15px;
- z-index: 10010;
-}
-
-#phone_info_number {
- font-size: 15px;
-}
-
-#phone_info_name {
- font-size: 20px;
- width: 132px;
-}
-
-#phone_info_name p {
- margin-top: -3px;
-}
-
-*/
-#phone_dialpad_number {
- width: 283px;
- height: 30px;
- position: absolute;
- left: 258px;
- top: 87px;
- text-align: center;
- font-size: 22px;
- padding: 10px 0 0 0;
- background: black;
- border: 1px solid #393939;
- border-radius: 3px;
-}
-
-#phone_dialpad_keypad {
- width: 282px;
- height: 200px;
- position: absolute;
- left: 259px;
- top: 141px;
-}
-
-#phone_dialpad_keypad div {
- font-size: 26px;
- text-align: center;
- line-height: 32px;
-} /*
-
-
-#phone_dialpad_keypad .words {
- font-size: 17px;
- margin: -11px 0 0 0;
- display: block;
- color: #999;
-}
-
-*/
-#phone_dialpad_keypad .left {
- left: 0px;
- width: 93px;
- height: 49px;
- border-left: 1px solid #393939;
- border-right: 1px solid #000;
- border-top: 1px solid #393939;
-}
-
-#phone_dialpad_keypad .center {
- left: 95px;
- width: 93px;
- height: 49px;
- border-top: 1px solid #393939;
- border-left: 1px solid #393939;
- border-right: 1px solid #000;
-}
-
-#phone_dialpad_keypad .right {
- left: 190px;
- width: 93px;
- height: 49px;
- border-left: 1px solid #393939;
- border-right: 1px solid #393939;
- border-top: 1px solid #393939;
-}
-
-#phone_dialpad_keypad_key4,#phone_dialpad_keypad_key5,#phone_dialpad_keypad_key6
- {
- top: 50px;
-}
-
-#phone_dialpad_keypad_key7,#phone_dialpad_keypad_key8,#phone_dialpad_keypad_key9
- {
- top: 100px;
-}
-
-#phone_dialpad_keypad_key0,#phone_dialpad_keypad_keyDiez,#phone_dialpad_keypad_keyStar
- {
- top: 150px;
- border-bottom: 1px solid #393939;
-}
-
-#phone_dialpad_keypad_key1 {
- -webkit-border-top-left-radius: 3px;
- border-top-left-radius: 3px;
-}
-
-#phone_dialpad_keypad_key3 {
- -webkit-border-top-right-radius: 3px;
- border-top-right-radius: 3px;
-}
-
-#phone_dialpad_keypad_keyStar {
- -webkit-border-bottom-left-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-
-#phone_dialpad_keypad_keyDiez {
- -webkit-border-bottom-right-radius: 3px;
- border-bottom-right-radius: 3px;
-} /*
-
-
- Dialpad controls
-
-#phone_dialpad_controls {
- width: 526px;
- height: 38px;
- border: 1px solid #393939;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- top: 355px;
- left: 259px;
-}
-
-#phone_dialpad_controls div {
- position: absolute;
- background-repeat: repeat-x;
- height: 38px;
- width: 130px;
- text-align: center;
- line-height: 38px;
- font-size: 20px;
-}
-
-#phone_dialpad_controls_privacyButton {
- border-right: 1px solid #000;
- z-index: 2001;
- cursor: pointer;
-}
-
-#phone_dialpad_controls .ind_inact {
- position: absolute;
- right: 8px;
- top: 8px;
- width:6px;
- height:21px;
- background:url(../images/common/ind_vert_def.png) no-repeat;
-}
-
-#phone_dialpad_controls .ind_act {
- position: absolute;
- right: 2px;
- top: 3px;
- background:url(../images/common/ind_vert_active.png) no-repeat;
- width:19px;
- height:32px;
-}
-
-
-#phone_dialpad_controls_holdButton {
- left: 131px;
- border-left: 1px solid #393939;
- border-right: 1px solid #000;
- cursor: pointer;
-}
-
-#phone_dialpad_controls_muteButton {
- left: 263px;
- border-left: 1px solid #393939;
- border-right: 1px solid #000;
- cursor: pointer;
-}
-
-#phone_dialpad_controls_joinButton {
- border-left: 1px solid #393939;
- left: 395px;
- z-index: 2001;
- cursor: pointer;
-}
-
-*/
-#phone_dialpad_deleteButton {
- opacity: 0;
- cursor: pointer;
- width: 93px;
- height: 49px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- left: 554px;
- top: 291px;
- border: 1px solid #393939;
-}
-
-#phone_dialpad_deleteButton .ico {
- position: absolute;
- left: 34px;
- top: 15px;
-}
-
-#phone_dialpad_dialButton {
- cursor: pointer;
- border: 1px solid #393939;
- left: 661px;
- top: 241px;
- width: 128px;
- height: 49px;
- -webkit-border-top-left-radius: 3px;
- border-top-left-radius: 3px;
- -webkit-border-top-right-radius: 3px;
- border-top-right-radius: 3px;
-}
-
-#phone_dialpad_dialButton span {
- font-size: 18px;
- position: absolute;
- left: 14px;
- top: 14px;
-}
-
-#phone_dialpad_dialButton .ico {
- position: absolute;
- right: 14px;
- top: 11px;
-}
-
-#phone_dialpad_endButton {
- cursor: pointer;
- border: 1px solid #393939;
- left: 661px;
- top: 291px;
- width: 128px;
- height: 49px;
- -webkit-border-bottom-left-radius: 3px;
- border-bottom-left-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- border-bottom-right-radius: 3px;
-}
-
-#phone_dialpad_endButton span {
- font-size: 18px;
- position: absolute;
- left: 14px;
- top: 14px;
-}
-
-#phone_dialpad_endButton .ico {
- position: absolute;
- right: 9px;
- top: 16px;
-} /*
-
-#phone_dialpad_contactImage {
- opacity: 0;
- width: 130px;
- height: 135px;
- background: url("../images/phone/dial_photo.png") repeat-x;
- left: 658px;
- top: 86px;
-}
-
- QUICK DIAL
-
-#phone_quickdial_content {
- width: 630px;
- height: 250px;
- left: 166px;
- top: 98px;
- background: url(../images/phone/quick_dial_inact_bg.png) no-repeat;
-}
-
-#phone_quickdial ul.l-block {
- list-style: none;
- position: relative;
- float: left;
- width: 320px;
- height: 250px;
-}
-
-#phone_quickdial ul.r-block {
- list-style: none;
- position: relative;
- float: left;
- width: 310px;
- height: 250px;
-}
-
-#phone_quickdial ul li {
- line-height: 50px;
- font-size: 20px;
-}
-
-#phone_quickdial ul li span.number {
- position: relative;
- float: left;
- padding-left: 5px;
- padding-right: 15px;
- font-size: 29px;
- width: 22px;
-}
-
- PHONEBOOK
-#phone_phonebook_content {
- left: 166px;
- top: 98px;
- width: 633px;
- height: 295px;
-}
-
-#phone_phonebook_filters {
- width: 470px;
- height: 40px;
- position: relative;
- margin-left: 100px;
- background: url(../images/phone/book-filter-bg.png) no-repeat;
-}
-
-#phone_phonebook_filters ul {
- list-style: none;
-}
-
-#phone_phonebook_filters li {
- float: left;
- width: 94px;
- text-align: center;
- line-height: 40px;
- font-size: 20px;
-}
-
-#phone_phonebook_list {
- height: 251px;
- position: relative;
- float: left;
- margin-top: 5px;
- width: 630px;
-}
-
-#phone_phonebook_list .list-content {
- width: 568px;
-}
-
-#phone_phonebook .list-item span {
- padding-left: 10px;
-}
-
- HISTORY
-
-#phone_history_content {
- left: 166px;
- top: 98px;
- width: 625px;
- height: 295px;
-}
-
-#phone_history_filters {
- background: url(../images/phone/history-filter-bg.png) no-repeat;
- width: 470px;
- height: 40px;
- position: relative;
-}
-
-#phone_history_filters ul {
- list-style: none;
-}
-
-#phone_history_filters li {
- float: left;
- width: 117px;
- text-align: center;
- line-height: 40px;
- font-size: 20px;
-}
-
-#phone_history_list {
- width: 470px;
- height: 251px;
- position: relative;
- top: 5px;
- float: left;
-}
-
-#phone_history_list .list-content {
- width: 413px;
-}
-
-#phone_history_list .list-item .ico {
- margin-top: 7px;
- margin-right: 5px;
- margin-left: 5px;
- float: left;
-}
-
-#phone_history_list .list-item .right_text {
- margin-right: 6px;
-}
-
-#phone_history_controls {
- width: 150px;
- height: 149px;
- left: 5px;
- top: 5px;
- position: relative;
- float: left;
- border: 1px solid #393939;
- border-radius:3px;
- -webkit-border-radius:3px;
- -moz-border-radius:3px;
-}
-
-#phone_history_dial {
- position: relative;
- height: 50px;
- width: 150px;
- font-size: 20px;
- line-height: 43px;
-}
-
-#phone_history_dial span {
- padding-left: 10px;
-}
-
-#phone_history_dial .ico {
- float: right;
- margin: 10px;
-}
-
-#phone_history_savedial {
- position: relative;
- height: 99px;
- width: 150px;
- font-size: 20px;
- line-height: 43px;
-}
-
-#phone_history_savedial span {
- padding-left: 10px;
-}
-
- MESSAGING
-
-#phone_messaging_content {
- left: 166px;
- top: 98px;
- width: 570px;
- height: 295px;
-}
-
-#phone_messaging_send {
- background: url(../images/phone/btn_bg.png) repeat-x;
- width: 150px;
- height: 38px;
- position: relative;
- float: left;
- font-size: 20px;
- line-height: 40px;
- border: 1px solid #393939;
- border-radius:3px;
-}
-
-#phone_messaging_send span {
- padding-left: 10px;
-}
-
-#phone_messaging_send .arrow-ico {
- top: -5px;
-}
-
-#phone_messaging_controls {
- background: url(../images/phone/msg-r-group-bg.png) no-repeat;
- width: 300px;
- height: 40px;
- position: relative;
- float: right;
-}
-
-#phone_messaging_controls ul {
- list-style: none;
-}
-
-#phone_messaging_controls ul li {
- float: left;
- width: 150px;
- text-align: center;
- line-height: 40px;
- font-size: 20px;
-}
-
-#phone_messaging_list {
- width: 570px;
- height: 250px;
- position: relative;
- margin-top: 45px;
- background: url(../images/phone/msg-list-bg.png) no-repeat;
-}
-
-#phone_messaging_list ul.list {
- float: left;
- list-style: none;
-}
-
-#phone_messaging_list ul.del {
- float: right;
- list-style: none;
-}
-
-#phone_messaging_list ul.list li {
- width: 320px;
- height: 50px;
- font-size: 20px;
- line-height: 50px;
- padding-left: 50px;
-}
-
-#phone_messaging_list ul.del li {
- width: 100px;
- height: 50px;
- font-size: 20px;
- line-height: 50px;
- text-align: center;
-}
-
- SETTINGS
-#phone_settings {
- z-index: 10001;
-}
-
-#phone_settings_content {
- width: 627px;
- height: 300px;
- left: 166px;
- top: 87px;
-}
-
-#phone_settings_list {
- width: 630px;
- height: 301px;
- position: relative;
- top: 5px;
- float: left;
-}
-
-#phone_settings_list .list-content {
- width: 570px;
-}
-
-#phone_settings_list .list-item > span,
-#phone_settings_list .lableToggle span{
- padding-left: 7px;
-}
-
-#phone_settings_list .list-item .ico {
- position: absolute;
- right: 10px;
- top: 8px;
- opacity: 1;
-}
-
-#phone_settings_list .lableToggleButton{
- background-image: url(../images/list/list_item_bg.png);
-}
-
-#phone_settings .toogleButtonContainer {
- position: relative;
- width: 198px;
- height: 28px;
- border: 1px solid #393939;
- border-radius: 2px;
- float: right;
- margin-top: 10px;
- margin-right: 10px;
-}
-
- HELP MODE
-
-#phone .shifted {
- width: 650px;
- left: 150px;
-}
-
-#phone .blured_background {
- visibility: hidden;
- width: 800px;
- height: 480px;
- z-index: 1001;
- position: absolute;
-}
-
-#phone_dialpad_help {
- background: url(../images/phone/phone_help_dialpad.png) no-repeat;
-}
-
-#phone_quickdial_help {
- background: url(../images/phone/phone_help_quickdial.png) no-repeat;
-}
-
-#phone_phonebook_help {
- background: url(../images/phone/phone_help_phonebook.png) no-repeat;
-}
-
-#phone_history_help {
- background: url(../images/phone/phone_help_history.png) no-repeat;
-}
-
-#phone_messaging_help {
- background: url(../images/phone/phone_help_messaging.png) no-repeat;
-}
-
-#phone_settings_help {
- background: url(../images/phone/phone_help_settings.png) no-repeat;
-}
-
-#phone_menu_help {
- background: url("../images/phone/phone_help_menu.png") no-repeat;
- width: 165px;
- height: 315px;
- z-index: 202;
- pointer-events: none;
-}
-
-#phone_help_divider {
- height: 3px;
- width: 150px;
- top: 249px;
- left: 0;
-}
-
-#phone_settings_help_dndButton {
- font-size: 20px;
- line-height: 55px;
- height: 50px;
- width: 570px;
- top: 190px;
- left: 16px;
- z-index: 2001;
- cursor: pointer;
-}
-
-#phone_settings_help_dndButton span {
- padding-left: 8px;
-}
-
-#phone_settings_help_dndButton .ico {
- position: absolute;
- right: 9px;
- top: 13px;
- opacity: 1;
-}
-
- Phone settings Bluetooth Devices
-#phone_settings_BluetoothDevices_view {
- width: 800px;
- height: 480px;
- background-image: url(../images/phone/bg.png);
- font-size: 20px;
- z-index: 10001;
-}
-
-#phone_settings_BluetoothDevices_view .backButton {
- margin-top: 59px;
-}
-
-#phone_settings_BluetoothDevices_view .block-header-title {
- top: 69px;
-}
-
-#phone_settings_BluetoothDevices_view .bluetoothLogo{
- background: url(../images/phone/ico_bluetoothConnect.png) no-repeat;
- top: 109px;
- left: 5px;
- height: 50px;
- width: 50px;
-}
-
-#phone_settings_BluetoothDevices_list {
- margin-top: 109px;
- margin-left: 65px;
- width: 570px;
- height: 301px;;
-}
-
-
-#phone_settings_BluetoothDevices_list .list-content {
- border-right: none;
- border-top: none;
-}
-
-#phone_settings_BluetoothDevices_list .list-item:first-child {
- border-top: 1px solid #393939;
- height: 48px;
-}
-
-#phone_settings_BluetoothDevices_list .list-item {
- position: relative;
- width: 503px;
- float: left;
- height: 49px;
- border-bottom: 1px solid #393939;
- border-right: 1px solid #393939;
- line-height: 50px;
-}
-
-#phone_settings_BluetoothDevices_list .list-item.pressed {
- background: url(../images/phone/phone_button_bg_active.png) repeat-x !important;
-}
-
-#phone_settings_BluetoothDevices_list .list-item > span {
- position: absolute;
- left: 63px;
-}
-
-#phone_settings_BluetoothDevices_list .list-item .ico {
- position: absolute;
- float: left;
- left: 9px;
-}
-
-#phone_settings_BluetoothDevices_list .list-item .right_ico {
- float: right;
-}
-
-#phone_settings_BluetoothDevices_list .list-item.big-ico img {
- float: right;
- border: none;
- margin-top: 4px;
- margin-right: 9px;
-}
-
-#phone_settings_BluetoothDevices_view .right-menu{
- top: 109px;
- right: 3px;
- float: right;
- width: 150px;
- border: 1px solid #393939;
- border-bottom: none;
- -webkit-border-radius: 3px;
-}
-
-#view_phone_phoneSettings_bluetoothDevices_rightmenu .menu-item{
- position: relative;
- width: 135px;
- height: 49px;
- cursor: pointer;
- border-bottom: 1px solid #333;
- font-size: 18px;
- line-height: 46px;
- padding-left: 15px;
-}
-
-#phone_settings_BluetoothDevices_view.help-mode {
- background-image: url(../images/phone/phone_settings_bluetoothDevices_bg_help.png);
- background-repeat: no-repeat;
-}
-
-#phone_settings_BluetoothDevices_view.help-mode .menu-item,
-#phone_settings_BluetoothDevices_view.help-mode .right-menu {
- border: none;
- background: none;
-}
-
-#phone_settings_BluetoothDevices_view.help-mode .menu-item{
- margin-top: 1px;
- right: 1px;
-}
-
-#phone_settings_BluetoothDevices_view.help-mode .menu-item .arrow-ico,
-#phone_settings_BluetoothDevices_view.help-mode .bluetoothLogo{
- opacity: 0;
-}
-
-.help-mode #phone_settings_BluetoothDevices_view .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
-.help-mode #phone_settings_BluetoothDevices_list .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
- Phone settings Phone Ringer
-#phone_settings_phoneRinger_view {
- width: 800px;
- height: 480px;
- background-image: url(../images/phone/bg.png);
- font-size: 20px;
- z-index: 10001;
-}
-
-
-#phone_settings_phoneRinger_view .backButton {
- margin-top: 59px;
-}
-
-#phone_settings_phoneRinger_view .block-header-title {
- top: 69px;
-}
-
-#phone_settings_phoneRinger_list {
- margin-top: 139px;
- margin-left: 65px;
- width: 734px;
- height: 251px;;
-}
-
-#phone_settings_phoneRinger_list .list-content {
- width: 674px;
- border-right: none;
- border-top: none;
-}
-
-#phone_settings_phoneRinger_list .list-item:first-child,
-#phone_settings_phoneRinger_list .soundButton:first-child{
- border-top: 1px solid #393939;
- height: 48px;
-}
-
-#phone_settings_phoneRinger_list .list-item {
- position: relative;
- width: 613px;
- float: left;
- height: 49px;
- border-bottom: 1px solid #393939;
- border-right: 1px solid #393939;
- line-height: 50px;
-}
-
-#phone_settings_phoneRinger_list .list-item.soundButton {
- width: 48px;
- border-left: 1px solid #393939;
- margin-left: 10px;
-}
-
-#phone_settings_phoneRinger_list .list-item.soundButton .ico {
- border: none;
- margin-top: 12px;
- margin-right: 11px;
-}
-
-#phone_settings_phoneRinger_list .list-item.pressed {
- background: url(../images/phone/phone_button_bg_active.png) repeat-x !important;
-}
-
-#phone_settings_phoneRinger_list .list-item > span {
- margin-left: 13px;
-}
-
-#phone_settings_phoneRinger_list .list-item .ico {
- float: right;
- border: 1px solid #393939;
- border-radius: 2px;
- margin-top: 9px;
- margin-right: 9px;
-}
-
-#phone_settings_phoneRinger_list .list-item.big-ico img {
- float: right;
- border: none;
- margin-top: 4px;
- margin-right: 9px;
-}
-
-#phone_settings_phoneRinger_list .toggles, #phone_settings_phoneRinger_list .toggles span {
- width: 148px;
-}
-
-#phone_settings_phoneRinger_view.help-mode {
- background-image: url(../images/phone/phone_settings_phoneRinger_bg_help.png);
- background-repeat: no-repeat;
-}
-
-.help-mode #phone_settings_phoneRinger_view .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
-.help-mode #phone_settings_phoneRinger_list .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
- Phone settings Text Message Notification
-#phone_settings_textMessageNotification_view {
- width: 800px;
- height: 480px;
- background-image: url(../images/phone/bg.png);
- font-size: 20px;
- z-index: 10001;
-}
-
-
-#phone_settings_textMessageNotification_view .backButton {
- margin-top: 59px;
-}
-
-#phone_settings_textMessageNotification_view .block-header-title {
- top: 69px;
-}
-
-#phone_settings_textMessageNotification_list {
- margin-top: 139px;
- margin-left: 65px;
- width: 731px;
- height: 251px;
-}
-
-#phone_settings_textMessageNotification_list .list-content {
- width: 674px;
- border-right: none;
- border-top: none;
-}
-
-#phone_settings_textMessageNotification_list .list-item:first-child,
-#phone_settings_textMessageNotification_list .soundButton:first-child{
- border-top: 1px solid #393939;
- height: 48px;
-}
-
-#phone_settings_textMessageNotification_list .list-item {
- position: relative;
- width: 613px;
- float: left;
- height: 49px;
- border-bottom: 1px solid #393939;
- border-right: 1px solid #393939;
- line-height: 50px;
-}
-
-#phone_settings_textMessageNotification_list .list-item.soundButton {
- width: 48px;
- border-left: 1px solid #393939;
- margin-left: 10px;
-}
-
-#phone_settings_textMessageNotification_list .list-item.soundButton .ico {
- border: none;
- margin-top: 12px;
- margin-right: 11px;
-}
-
-#phone_settings_textMessageNotification_list .list-item.pressed {
- background: url(../images/phone/phone_button_bg_active.png) repeat-x !important;
-}
-
-#phone_settings_textMessageNotification_list .list-item > span {
- margin-left: 13px;
-}
-
-#phone_settings_textMessageNotification_list .list-item .ico {
- float: right;
- border: 1px solid #393939;
- border-radius: 2px;
- margin-top: 9px;
- margin-right: 9px;
-}
-
-#phone_settings_textMessageNotification_list .list-item.big-ico img {
- float: right;
- border: none;
- margin-top: 4px;
- margin-right: 9px;
-}
-
-#phone_settings_textMessageNotification_list .toggles, #phone_settings_textMessageNotification_list .toggles span {
- width: 148px;
-}
-
-#phone_settings_textMessageNotification_view.help-mode {
- background-image: url(../images/phone/phone_settings_textMessageNotification_bg_help.png);
- background-repeat: no-repeat;
-}
-
-.help-mode #phone_settings_textMessageNotification_view .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
-.help-mode #phone_settings_textMessageNotification_list .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
- Phone settings Internet Data Connection
-#phone_settings_internetDataConnection_view {
- width: 800px;
- height: 480px;
- background-image: url(../images/phone/bg.png);
- font-size: 20px;
- z-index: 10001;
-}
-
-
-#phone_settings_internetDataConnection_view.help-mode .toogleButtonContainer {
- border: none !important;
-
-}
-
-#phone_settings_internetDataConnection_view .backButton {
- margin-top: 59px;
-}
-
-#phone_settings_internetDataConnection_view .block-header-title {
- top: 69px;
-}
-
-#phone_settings_internetDataConnection_view .content {
- top: 119px;
- left: 100px;
- width: 650px;
- height: 300px;
-}
-
-#phone_settings_phoneRinger_phone_label {
- position: relative;
- width: 300px;
- height: 29px;
- float: left;
- margin-left: 12px;
-}
-
-#phone_settings_phoneRinger_phone_label .ico {
- margin-top: -12px;
- margin-left: -6px;
-}
-
-#phone_settings_phoneRinger_phone_label span {
- position: absolute;
- margin-left: 13px;
- top: -3px;
-}
-
-#phone_settings_internetDataConnection_view .lableToggleButton {
- position: relative;
- margin-top: 1px;
- width: 560px;
- height: 50px;
- line-height: 50px;
- float: left;
-}
-
-#phone_settings_internetDataConnection_view .toogleButtonContainer {
- width: 298px;
- margin-left: 213px;
- margin-right: 9px;
- margin-top: 9px;
-}
-
-#phone_settings_internetDataConnection_view .lableToggleButton .lableToggle > span {
- margin-left: 12px;
-}
-
-#phone_settings_internetDataConnection_view .helpButton {
- position: relative;
- float: right;
- margin-top: 10px;
- height: 28px;
- width: 88px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#phone_settings_internetDataConnection_view .helpButton .ico{
- margin-top: 4px;
- margin-left: 38px;
-}
-
-#phone_settings_phoneRinger_DUNSettings_button {
- position: relative;
- float: left;
- width: 648px;
- height: 48px;
- line-height: 50px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#phone_settings_phoneRinger_DUNSettings_button span {
- margin-left: 12px;
-}
-
-#phone_settings_internetDataConnection_view .wraper {
- position: relative;
- float: left;
- top: -1px;
- border: 1px solid #333;
- border-radius: 2px;
- height: 109px;
- padding-left: 10px;
- padding-top: 9px;
- width: 638px;
-}
-
-#phone_settings_phoneRinger_dataUsage_label {
- width: 613px;
-}
-
-#phone_settings_phoneRinger_dataUsage_label span {
- line-height: 25px
-}
-
-#phone_settings_internetDataConnection_view.fr #phone_settings_phoneRinger_dataUsage_label {
- line-height: 21px;
-}
-
-#phone_settings_internetDataConnection_view.fr #phone_settings_phoneRinger_dataUsage_label span{
- line-height: 21px;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .content .ico,
-#phone_settings_internetDataConnection_view.help-mode .arrow-ico {
- opacity: 0;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .wraper {
- top: 0px;
- left: 1px;
- border: none;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .content .button {
- border: none;
- background: none;
-}
-
-.help-mode #phone_settings_phoneRinger_DUNSettings_button {
- top: 1px;
-}
-
-#phone_settings_internetDataConnection_view.help-mode {
- background: url(../images/phone/phone_settings_internetDataConnection_bg_help.png) no-repeat;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .lableToggleButton {
- top: -1px;
- left: -1px;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .lableToggleButton .button0 span {
- margin-left: 0px !important;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .lableToggleButton .button1 span {
- margin-left: 2px !important;
-}
-
-#phone_settings_internetDataConnection_view.help-mode .lableToggleButton .button2 span {
- margin-left: 3px !important;
-}
-
-.help-mode #phone_settings_phoneRinger_DUNSettings_button {
- margin-left: 1px;
-}
-
-.help-mode #phone_settings_phoneRinger_OnConnect_Lable {
- margin-top: 3px;
-}
-
- Phone settings phonebook
-#phone_settings_phoneBook_view {
- width: 800px;
- height: 480px;
- background-image: url(../images/phone/bg.png);
- font-size: 20px;
- z-index: 10001;
-}
-
-#phone_settings_phoneBook_view .backButton {
- margin-top: 59px;
-}
-
-#phone_settings_phoneBook_view .block-header-title {
- top: 69px;
-}
-
-#phone_settings_phoneBook_list {
- margin-top: 139px;
- margin-left: 65px;
- width: 731px;
- height: 251px;;
-}
-
-#phone_settings_phoneBook_list .list-content {
- width: 670px;
-}
-
-#phone_settings_phoneBook_list .list-item {
- position: relative;
- width: 670px;
- float: left;
- height: 49px;
- border-bottom: 1px solid #393939;
- line-height: 50px;
-}
-
-#phone_settings_phoneBook_list .list-item > span {
- margin-left: 13px;
-}
-
-#phone_settings_phoneBook_list .list-item .lableToggle span {
- margin-left: 13px;
-}
-
-#phone_settings_phoneBook_list .list-item .ico {
- float: right;
- border: 1px solid #393939;
- border-radius: 2px;
- margin-top: 9px;
- margin-right: 9px;
-}
-
-#phone_settings_phoneBook_list .list-item.big-ico img {
- float: right;
- border: none;
- margin-top: 4px;
- margin-right: 9px;
-}
-
-#phone_settings_phoneBook_list .toogleButtonContainer {
- width: 298px;
-}
-
-#phone_settings_phoneBook_view.help-mode .toogleButtonContainer {
- border: none !important;
-}
-
-#phone_settings_phoneBook_view.fr #phone_settings_phoneBook_list_item0 .lableToggle {
- line-height: 19px;
- width: 360px;
- margin: 5px 0px 0px 13px;
-}
-
-#phone_settings_phoneBook_view.fr #phone_settings_phoneBook_list_item0 .lableToggle span {
- margin-left: 0px;
-}
-
-#phone_settings_phoneBook_view.help-mode {
- background-image: url(../images/phone/phone_settings_phoneBook_bg_help.png);
- background-repeat: no-repeat;
-}
-
-phone_settings_phoneBook_view.help-mode #phone_settings_phoneBook_view .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
-phone_settings_phoneBook_view.help-mode #phone_settings_phoneBook_list .list-item span {
- text-shadow: 0 0 3px #999;
-}
-
-phone_settings_phoneBook_view.help-mode #phone_settings_phoneBook_list .toogleButtonContainer {
- margin-right: 11px;
-}
-
-phone_settings_phoneBook_view.help-mode #phone_settings_phoneBook_list .lablePlusButton .button.single {
- right: 1px;
- top: 1px;
-}
-phone_settings_phoneBook_view.help-mode #phone_settings_phoneBook_list .button1 span {
- margin-left: 3px !important;
-}*/ \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/css/sdl.css b/SDL_Core/src/components/HMI/css/sdl.css
deleted file mode 100644
index 5a72861da..000000000
--- a/SDL_Core/src/components/HMI/css/sdl.css
+++ /dev/null
@@ -1,1114 +0,0 @@
-/**
- * CSS for sdl aplications
- */
-.ffw_list_menu {
- left: 440px;
- width: 158px;
- border: 1px solid #393939;
- overflow: hidden;
-}
-
-.ffw_list_menu .control {
- z-index: 2000;
- text-align: center;
-}
-
-.ffw_list_menu .ffw-button {
- position: relative;
- height: 49px;
- border-bottom: 1px solid #393939;
- line-height: 50px;
- display: -webkit-flex;
- display: -moz-flex;
- display: flex;
-}
-
-.ffw_list_menu .ffw-button span {
- height: 50px;
- overflow: hidden;
- text-overflow: ellipsis;
- padding-left: 10px;
-}
-
-.ffw_list_menu .content {
- position: relative;
-}
-
-.ffw_list_menu .ffw-button.hidden {
- display: none;
-}
-
-.sdl-window {
- width: 800px;
- height: 480px;
- background-color: #000;
- z-index: 1;
-}
-
-/**
- * Important Class for SoftButtons Highlightening
- */
-.isHighlighted{
- color: gold;
-}
-
-.isHighlighted .ico{
- border-style: solid;
- border-color: #FFA300 #F7DA9C;
- border-width: 1px;
-}
-
-.softButton .ico{
- width: 50px;
- height: 49px;
- -webkit-flex: 0 0 50px;
- float: left;
-}
-
-.softButton .right_text{
- padding-left: 5px !important;
-}
-
-.sdl-window .back-button {
- top: 80px;
- left: 5px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-.sdl-window .back-button .ico {
- margin-top: 13px;
- margin-left: 8px;
-}
-
-#info_apps_deviceList_view .deviceListLabel,.sdl-window .caption-text {
- top: 80px;
- left: 75px;
- width: 620px;
- background: #393939;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 50px;
- height: 50px;
- padding-left: 15px;
- padding-right: 15px;
-}
-
-#info_apps_deviceList_view .progress{
- top: 175px;
- left: 254px;
- background: URL('../images/sdl/progress.gif') no-repeat;
- width: 300px;
- height: 200px;
-}
-
-#info_nonMedia {
- z-index: 1001;
-}
-
-#info_nonMedia .backButton {
- top: 80px;
- left: 20px;
-}
-
-#info_nonMedia .inner_content {
- left: 180px;
- top: 90px;
- width: 600px;
- height: 300px;
- overflow: hidden;
-}
-
-#info_nonMedia .app_title {
- width: 390px;
- padding: 15px;
- top: 1px;
- background-color: #393939;
-}
-
-#info_nonMedia .app_image {
- top: 60px;
-}
-
-#info_nonMedia .app_fields {
- left: 160px;
- top: 60px;
- width: 260px;
-}
-
-#info_nonMedia .app_fields .label {
- position: relative;
- border: 1px solid #393939;
- padding: 7px;
- margin-bottom: 5px;
-}
-
-#info_nonMedia .presets {
- top: 220px;
- width: 420px;
- height: 80px;
-}
-
-#info_nonMedia .presets .ffw-button {
- width: 103px;
- height: 38px;
- position: relative;
- float: left;
- line-height: 40px;
- border-bottom: 1px solid #393939;
- border-right: 1px solid #393939;
- border-top: 1px solid #222;
- border-left: 1px solid #222;
- text-align: center;
-}
-
-#info_nonMedia .app_image img {
- border: 1px solid #393939;
-}
-
-#sdl_options .list {
- width: 650px;
- height: 251px;
- border-radius: 2px;
- left: 75px;
- top: 150px;
-}
-
-/*#sdl_view_container .list-content,*/
-#sdl_options .list-content {
- width: 590px;
-}
-
-#VRPopUp.move{
- left: 800px;
-}
-
-#VRPopUp span,#info_apps_deviceList_list .list-content span,#sdl_view_container .list-content span,#sdl_options .list-content span
- {
- margin-left: 15px;
- position: absolute;
- text-overflow: ellipsis;
- width: 527px;
- overflow: hidden;
-}
-
-#sdl_options .list-content .ico {
- height: 49px;
- float: left;
-}
-
-#info_nonMedia_options_submenu {
- z-index: 11000;
- width: 800px;
- height: 480px;
- background-color: black;
- top: 0px;
- left: 0px;
-}
-
-#sdl_media_presetButtons .preset-item>span {
- z-index: 202;
- display: block;
- position: absolute;
- left: 10px;
- width: 105px;
- height: 50px;
- font-size: 20px;
- line-height: 50px;
- overflow: hidden;
- text-overflow: ellipsis;
- color: white;
-}
-
-#sdl_view_container .preset-items {
- width: 468px;
-}
-
-#sdl_view_container .main-preset-buttons-wraper .preset-item.a3,#sdl_view_container .main-preset-buttons-wraper .preset-item.a6
- {
- width: 155px;
-}
-
-#sdl_view_container .player_controllsV2 {
- top: 241px !important;
- height: 48px;
-}
-
-#sdl_view_container .player_controllsV2 .ffw-button {
- height: 48px;
-}
-
-#sdl_view_container .player_controllsV2 img {
- margin-top: -26px;
-}
-
-/* ScrollableMessage */
-#ScrollableMessage.ScrollableMessage {
- left: 0;
- top: 0;
- width: 800px;
- height: 480px;
- /*z-index: 1000;*/
- background: url(../images/media/bg.png) no-repeat;
-}
-
-#ScrollableMessage.active {
- opacity: 1;
- display: block;
-}
-
-#ScrollableMessage .backButton {
- top: 80px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#ScrollableMessage .titleText {
- top: 80px;
- left: 75px;
- width: 620px;
- height: 20px;
- background: #393939;
- padding: 15px;
-}
-
-#ScrollableMessage .scrollableText {
- position: absolute;
- width: 525px;
- height: 251px;
- border-radius: 2px;
- left: 200px;
- top: 154px;
- overflow: hidden;
-}
-
-#ScrollableMessage .scrollableText-content {
- border: none;
- width: 474px;
-}
-
-#ScrollableMessage .scrollableText-item {
- position: relative;
- width: 100%;
- height: 48px;
- font-size: 20px;
- line-height: 50px;
- border: 1px solid #393939;
-}
-
-#ScrollableMessage .ffw_list_menu {
- top: 154px !important;
- left: 25px !important;
-}
-
-#ScrollableMessage .scrollableTextArea {
- margin: 0px;
- /*height: 251px;*/
- width: 469px;
- font-family: sans-serif;
- font-size: 16px;
- color: white;
- background-color: transparent;
- resize: none;
- line-height: 23px;
- position: absolute;
-}
-
-/* SDL Slider */
-.slider-header {
- top: 167px;
- left: 145px;
- width: 480px;
- background: #393939;
- line-height: 50px;
- height: 50px;
- padding-left: 15px;
- padding-right: 15px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.slider-footer {
- top: 325px;
- left: 145px;
- width: 480px;
- background: #393939;
- line-height: 50px;
- height: 50px;
- padding-left: 15px;
- padding-right: 15px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#slider_view .sliderControl {
- width: 600px;
- left: 100px;
- top: 250px;
- text-align: center;
-}
-
-#slider_view .control {
- width: 58px;
- height: 38px;
- border: 1px solid #393939;
- position: relative;
- display: inline-block;
-}
-
-#slider_view .ledContainer {
- position: relative;
- display: inline-block;
- border: 1px solid #393939;
- height: 38px;
-}
-
-#slider_view .control.minus .ico {
- top: 19px;
- left: 20px;
- position: absolute;
-}
-
-#slider_view .control.plus .ico {
- top: 12px;
- left: 20px;
- position: absolute;
-}
-
-#slider_view .led {
- width: 12px;
- height: 40px;
- background: url("../images/common/seat-act-led.png") no-repeat;
- position: relative !important;
- background-position: -4px 0;
- display: inline-block;
-}
-
-#slider_view .led-inactive {
- background: url("../images/common/seat-inact-led.png") no-repeat;
- background-position: 3px 8px;
- width: 12px;
- height: 40px;
- position: relative !important;
- display: inline-block;
-}
-
-/* SDL Perform Interaction Choise,
- SDL TBT Turn List */
-#tbtTurnListView .list,
-#perform_interaction_view .list,
-#vr_help_list_view .list {
- position: absolute;
- width: 650px;
- height: 251px;
- border-radius: 2px;
- left: 75px;
- top: 154px;
-}
-
-#tbtTurnListView .list span,
-#perform_interaction_view .list span,
-#vr_help_list_view .list span{
- margin-left: 15px;
-}
-
-#tbtTurnListView .list-content,
-#perform_interaction_view .list-content,
-#vr_help_list_view .list-content {
- width: 578px;
-}
-
-#perform_interaction_view input{
- width: 720px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
- background: rgba(119, 119, 119, 0.42);
- cursor: pointer;
- font-size: 32px;
- color: #FFF;
- top: 80px;
- left: 65px;
- position: absolute;
-}
-#perform_interaction_view .listWrapper{
- top: 140px;
- width: 750px;
- height: 275px;
- left: 25px;
-}
-
-#perform_interaction_view .naviChoises .ffw-button{
- width: 110px;
- height: 110px;
- margin: 20px;
- float: left;
- position: relative;
- border: 1px solid #333;
- border-radius: 2px;
- background-repeat: repeat;
-}
-
-#sdl_view_container .cd_logo {
- position: absolute;
- top: 90px;
- right: 10px;
- border: 1px solid #393939;
- -webkit-border-radius: 2px;
- width: 109px;
- height: 109px;
-}
-
-#sdl_view_container .cd_logoV2 {
- position: absolute;
- top: 70px;
- right: 10px;
- border: 1px solid #393939;
- -webkit-border-radius: 2px;
- width: 109px;
- height: 109px;
-}
-
-#sdl_view_container .timeV2 {
- top: 155px;
-}
-
-#sdl_view_container .textLimit {
- width: 460px;
- text-overflow: ellipsis;
- overflow: hidden;
-}
-
-#VRButton.VRButton {
- background: url(../images/home/controlButtons/vr.png) no-repeat;
- width: 89px;
- height: 90px;
- left: 1024px;;
- top: 2px;
- -webkit-transition: 0.2s;
-}
-
-#VRButton.pressed {
- background: url(../images/home/controlButtons/vr_pressed.png) no-repeat;
-}
-
-#vehicleInfoButton.vehicleInfoButton {
- width: 117px;
- height: 48px;
- left: 1059px;
- top: 206px;
- text-align: center;
- line-height: 48px;
-}
-
-#tbtClientStateButton.tbtClientStateButton {
- width: 158px;
- height: 48px;
- left: 865px;
- top: 418px;
- text-align: center;
- line-height: 48px;
-}
-
-#exitApp.exitApp {
- width: 135px;
- height: 48px;
- left: 1043px;
- top: 418px;
- text-align: center;
- line-height: 48px;
-}
-
-#exitAppView,#tbtClientStateView,#VehicleInfo {
- opacity: 0;
- left: 50px;
- width: 700px;
- height: 340px;
- background-color: black;
- z-index: 2;
- border-radius: 10PX;
- top: 70px;
- -webkit-transition: opacity 1s ease-in-out;
- display: none;
- border: 1px solid white;
-}
-
-#exitAppView .exitAppViewLabel,#tbtClientStateView .tbtClientStateLabel,#VehicleInfo .vehicleInfoLabel
- {
- top: 10px;
- width: 600px;
- left: 35px;
- height: 20px;
- padding: 15px;
- background: #393939;
-}
-
-#exitAppView.active,#tbtClientStateView.active,#VehicleInfo.active {
- opacity: 1;
- display: block;
-}
-
-#exitAppView .exitAppViewTitle,#tbtClientStateView .tbtClientState,#VehicleInfo .prndl
- {
- top: 70px;
- width: 600px;
- left: 40px;
- height: 20px;
- padding: 10px;
- background: #535353;
-}
-
-#exitAppView .exitAppViewSelect,#tbtClientStateView .tbtClientStateSelect,#VehicleInfo .prndlSelect
- {
- top: 125px;
- position: absolute;
- width: 150px;
- left: 275px;
- height: 40px;
- color: white;
- background: #393939;
-}
-
-#exitAppView .exitAppViewSelect option,#tbtClientStateView .tbtClientStateSelect option,#VehicleInfo .prndlSelect option
- {
- background: #393939;
-}
-
-#VehicleInfo .ecu1Title {
- top: 180px;
- width: 600px;
- left: 40px;
- height: 20px;
- padding: 10px;
- background: #535353;
-}
-
-#VehicleInfo .ecu1 {
- top: 233px;
- width: 80px;
- left: 65px;
- height: 20px;
- padding: 10px;
-}
-
-#VehicleInfo .ecu2 {
- top: 265px;
- width: 80px;
- left: 65px;
- height: 20px;
- padding: 10px;
-}
-
-#VehicleInfo .ecu1Data {
- top: 233px;
- width: 485px;
- left: 155px;
- height: 20px;
- padding: 10px;
-}
-
-#VehicleInfo .ecu2Data {
- top: 265px;
- width: 485px;
- left: 155px;
- height: 20px;
- padding: 10px;
-}
-
-/* Alert, AudioPassThruPopUp popup*/
-#AudioPassThruPopUp.AudioPassThruPopUp,#AlertPopUp.AlertPopUp
- {
- opacity: 0;
- left: 200px;
- width: 400px;
- height: 245px;
- z-index: 2;
- top: 110px;
- -webkit-transition: opacity 1s ease-in-out;
- background-color: black;
- border: #A6A6A6 solid 2px;
- border-radius: 6px;
- display: none;
-}
-
-#AudioPassThruPopUp .applicationName,#AlertPopUp .applicationName
- {
- width: 380px;
- left: 10px;
- text-align: center;
- font-size: 25px;
- line-height: 30px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#AlertPopUp .alertPopUpImage {
- width: 83px;
- height: 74px;
- background: url(../images/sdl/Warning.png) no-repeat;
- top: 45px;
- left: 10px;
-}
-
-#AlertPopUp .progressIndicator {
- width: 50px;
- height: 50px;
- background: url(../images/sdl/progressindicator.gif) no-repeat;
- top: 0px;
- background-size: contain;
- left: 0px;
-}
-
-#AudioPassThruPopUp .audioPassThruImage {
- width: 83px;
- height: 74px;
- background: url(../images/home/controlButtons/vrImage.png) no-repeat;
- top: 45px;
- left: 25px;
-}
-
-#AudioPassThruPopUp .message1,#AlertPopUp .message1 {
- top: 37px;
- left: 105px;
- width: 285px;
- height: 30px;
- text-align: center;
- font-size: 23px;
- line-height: 30px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#AudioPassThruPopUp .message2,#AlertPopUp .message2 {
- top: 70px;
- left: 105px;
- width: 285px;
- height: 28px;
- text-align: center;
- font-size: 23px;
- line-height: 30px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#AudioPassThruPopUp .message3,#AlertPopUp .message3 {
- top: 100px;
- left: 105px;
- width: 285px;
- height: 28px;
- text-align: center;
- font-size: 23px;
- line-height: 30px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#AudioPassThruPopUp.AudioPassThruActive,#AlertPopUp.AlertActive
- {
- opacity: 1;
- display: block;
-}
-
-#baseNavigation .softButton,#AudioPassThruPopUp .softButton,#AlertPopUp .softButton
- {
- border: 1px solid #393939;
- border-radius: 3px;
- height: 42px;
- line-height: 42px;
- text-align: center;
- float: left;
- margin: 10px;
- position: relative;
- text-overflow: ellipsis;
- overflow: hidden;
-}
-
-#baseNavigation .naviOptionsBtn{
- border: 1px solid #393939;
- border-radius: 3px;
- height: 42px;
- line-height: 42px;
- text-align: center;
- text-overflow: ellipsis;
- overflow: hidden;
- top: 283px;
- right: 6px;
- width: 105px;
- position: absolute;
-}
-
-#AlertPopUp .alertSoftButtons {
- margin-left: 8px;
- top: 120px;
- width: 386px;
-}
-
-#softButton0.one {
- margin-top: 42px;
- width: 362px;
-}
-
-#softButton0.two {
- margin-top: 42px;
- width: 170px;
-}
-
-#softButton1.two {
- margin-top: 42px;
- width: 170px;
-}
-
-#softButton0.three {
- width: 170px;
-}
-
-#AudioPassThruPopUp .buttonDone,#softButton1.three {
- width: 170px;
-}
-
-#AudioPassThruPopUp .buttonCancel,#softButton2.three {
- width: 362px;
-}
-
-#softButton0.four {
- width: 170px;
-}
-
-#softButton1.four {
- width: 170px;
-}
-
-#softButton2.four {
- width: 170px;
-}
-
-#softButton3.four {
- width: 170px;
-}
-
-#AudioPassThruPopUp .buttonRetry {
- top: 120px;
- width: 175px;
-}
-
-#AudioPassThruPopUp .buttonDone {
- top: 120px;
- width: 175px;
-}
-
-#AudioPassThruPopUp .buttonCancel {
- top: 120px;
- width: 372px;
-}
-
-#info_leftMenu_sdl {
- font-size: 18px;
- line-height: 48px;
-}
-
-#info_leftMenu_sdl img {
- float: left;
-}
-
-#info_leftMenu_sdl span {
- float: left;
- position: relative;
- width: 100px;
- text-overflow: ellipsis;
- overflow: hidden;
- left: 0;
-}
-
-/* TurnByTurnView */
-#TurnByTurnView.TurnByTurnView {
- top: 48px;
- height: 384px;
- left: 153px;
- width: 647px;
- background: none;
-}
-
-#TurnByTurnView .caption-text {
- left: 5px;
- width: 607px;
- top: 15px;
-}
-
-#TurnByTurnView .label {
- overflow: hidden;
-}
-
-#TurnByTurnView .totalDistanceLabel {
- height: 20px;
- background: #393939;
- padding: 15px;
- left: 5px;
- top: 80px;
- width: 170px;
-}
-
-#TurnByTurnView .etaLabel {
- height: 20px;
- background: #393939;
- padding: 15px;
- left: 206px;
- top: 80px;
- width: 170px;
-}
-
-#TurnByTurnView .turnList {
- left: 5px;
- top: 145px;
- width: 379px;
- padding: 10px;
- text-align: center;
-}
-
-#TurnByTurnView .ffw_list_menu {
- height: 198px;
- top: 200px;
- left: 5px;
- width: 401px;
- border: none;
-}
-
-#TurnByTurnView .ffw-button {
- border-radius: 3px;
- border: 1px solid #393939;
- margin-bottom: 5px;
- text-align: center;
- font-size: 20px;
-}
-
-
-#TurnByTurnView .ffw-button .text {
- margin: auto;
-}
-
-#TurnByTurnView .turnList .arrow-ico {
- margin-top: -13px;
-}
-
-#turnList img {
- margin-top: -10px;
-}
-
-#TurnByTurnView .homeScreen {
- left: 440px;
- top: 312px;
- padding: 0 0 0 5px;
- width: 195px;
-}
-
-#TurnByTurnView .homeScreen span {
- width: 140px;
-}
-
-#TurnByTurnView .homeScreen>img {
- float: left;
- width: 50px;
- height: 50px;
-}
-
-#TurnByTurnView .homeScreen>span {
- float: left;
- line-height: 50px;
- padding-left: 5px;
-}
-
-#TurnByTurnView .navigationText2 {
- left: 440px;
- top: 268px;
- width: 182px;
- padding: 10px;
- height: 20px;
- background: #393939;
-}
-
-#TurnByTurnView .turnIcon,
-#TurnByTurnView .nextTurnIcon {
- border: 1px solid #222;
- left: 540px;
- width: 100px;
- height: 100px;
- background-size: contain;
- background-repeat: no-repeat;
-}
-
-#TurnByTurnView .distanceToManeuver{
- top: 80px;
- left: 419px;
- background: #393939;
- padding: 15px;
-}
-
-#TurnByTurnView .distanceToManeuverScale{
- top: 144px;
- left: 419px;
- background: #393939;
- padding: 15px;
-}
-
-#TurnByTurnView .timeToDestination{
- top: 207px;
- left: 419px;
- background: #393939;
- padding: 15px;
-}
-
-#TurnByTurnView .turnIcon {
- top: 65px;
-}
-
-#TurnByTurnView .nextTurnIcon {
- top: 166px;
-}
-
-#tbtTurnListList .list-content .label>img {
- width: 50px;
- height: 50px;
- float: left;
-}
-
-#info_apps_list .ffw-button {
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#sdl_view_container {
- z-index: 501;
-}
-
-#sdl_view_container .title {
- top: 79px;
- font-size: 38px;
- left: 7px;
- width: 340px;
- height: 44px;
-}
-
-#sdl_view_container .album {
- top: 123px;
- font-size: 26px;
- left: 10px;
- width: 330px;
- height: 32px;
-}
-
-#sdl_view_container .artist {
- top: 155px;
- font-size: 26px;
- left: 10px;
- width: 330px;
- height: 32px;
-}
-
-#sdl_view_container .player_controlls {
- top: 292px;
- left: 165px;
-}
-
-/* SDL Slider*/
-#media_sdl_slider_view {
- width: 800px;
- height: 480px;
- z-index: 1000;
- background: url(../images/media/bg.png) no-repeat;
-}
-
-#media_sdl_slider_view .backButton {
- top: 80px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#media_sdl_slider_view .initialText {
- top: 80px;
- left: 75px;
- width: 620px;
- height: 20px;
- background: #393939;
- padding: 15px;
-}
-
-/* SDL Perform Interaction Choise */
-#media_app_perform_interaction_view {
- width: 800px;
- height: 480px;
- z-index: 1000;
- background: url(../images/media/bg.png) no-repeat;
-}
-
-#media_app_perform_interaction_view .backButton {
- top: 80px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#media_app_perform_interaction_view .list {
- position: absolute;
- width: 629px;
- height: 251px;
- border-radius: 2px;
- left: 100px;
- top: 154px;
-}
-
-#media_app_perform_interaction_view .initialText {
- top: 80px;
- left: 75px;
- width: 620px;
- height: 20px;
- background: #393939;
- padding: 15px;
-}
-
-#media_app_perform_interaction_view .list-content {
- width: 578px;
-}
-
-/* SDL Media Options */
-#media_app_options_view {
- width: 800px;
- height: 480px;
- z-index: 2002;
- background: url(../images/media/bg.png) no-repeat;
-}
-
-#media_app_options_view .backButton {
- top: 80px;
- width: 48px;
- height: 48px;
- border: 1px solid #333;
- border-radius: 2px;
-}
-
-#media_app_options_view .list {
- position: absolute;
- width: 650px;
- height: 251px;
- border-radius: 2px;
- left: 75px;
- top: 154px;
-}
-
-#media_app_options_view .optionsLabel {
- top: 80px;
- left: 75px;
- width: 620px;
- height: 20px;
- background: #393939;
- padding: 15px;
-}
-
-#media_app_options_view .list-content {
- width: 578px;
-} \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/BasicCommunicationRPC.js b/SDL_Core/src/components/HMI/ffw/BasicCommunicationRPC.js
deleted file mode 100644
index afc619bfa..000000000
--- a/SDL_Core/src/components/HMI/ffw/BasicCommunicationRPC.js
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * Reference implementation of BasicCommunication component. Interface to get or
- * set some essential information from OS. BasicCommunication responsible for
- * handling the basic commands of non-graphical part such as the registration of
- * mobile apps, geting the list of devices and applications and data transfer.
- */
-
-FFW.BasicCommunication = FFW.RPCObserver
- .create( {
-
- /**
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create( {
- componentName: "BasicCommunication"
- }),
-
- onAppRegisteredSubscribeRequestID: -1,
- onAppUnregisteredSubscribeRequestID: -1,
- onPlayToneSubscribeRequestID: -1,
- onSDLCloseSubscribeRequestID: -1,
-
- onAppRegisteredUnsubscribeRequestID: -1,
- onAppUnregisteredUnsubscribeRequestID: -1,
- onPlayToneUnsubscribeRequestID: -1,
- onSDLCloseUnsubscribeRequestID: -1,
-
- // const
- onAppRegisteredNotification: "BasicCommunication.OnAppRegistered",
- onAppUnregisteredNotification: "BasicCommunication.OnAppUnregistered",
- onPlayToneNotification: "BasicCommunication.PlayTone",
- onSDLCloseNotification: "BasicCommunication.OnSDLClose",
-
- /**
- * init object
- */
- init: function() {
-
- },
-
- /**
- * connect to RPC bus
- */
- connect: function() {
-
- this.client.connect(this, 600); // Magic number is unique identifier
- // for component
- },
-
- /**
- * disconnect from RPC bus
- */
- disconnect: function() {
-
- this.client.disconnect();
- },
-
- /**
- * Client is registered - we can send request starting from this point
- * of time
- */
- onRPCRegistered: function() {
-
- Em.Logger.log("FFW.BasicCommunicationRPC.onRPCRegistered");
- this._super();
-
- // subscribe to notifications
- this.onAppRegisteredSubscribeRequestID = this.client
- .subscribeToNotification(this.onAppRegisteredNotification);
- this.onAppUnregisteredSubscribeRequestID = this.client
- .subscribeToNotification(this.onAppUnregisteredNotification);
- this.onPlayToneSubscribeRequestID = this.client
- .subscribeToNotification(this.onPlayToneNotification);
- this.onSDLCloseSubscribeRequestID = this.client
- .subscribeToNotification(this.onSDLCloseNotification);
-
- },
-
- /**
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.BasicCommunicationRPC.onRPCUnregistered");
- this._super();
-
- // unsubscribe from notifications
- this.onAppRegisteredUnsubscribeRequestID = this.client
- .unsubscribeFromNotification(this.onAppRegisteredNotification);
- this.onAppUnregisteredUnsubscribeRequestID = this.client
- .unsubscribeFromNotification(this.onAppUnregisteredNotification);
- this.onPlayToneUnsubscribeRequestID = this.client
- .unsubscribeFromNotification(this.onPlayToneUpdatedNotification);
- this.onSDLCloseUnsubscribeRequestID = this.client
- .unsubscribeFromNotification(this.onSDLCloseNotification);
- },
-
- /**
- * Client disconnected.
- */
- onRPCDisconnected: function() {
-
- if (SDL.SDLAppController) {
- SDL.SDLAppController.onSDLDisconected();
- }
- },
-
- /**
- * when result is received from RPC component this function is called It
- * is the propriate place to check results of reuqest execution Please
- * use previously store reuqestID to determine to which request repsonse
- * belongs to
- */
- onRPCResult: function(response) {
-
- Em.Logger.log("FFW.BasicCommunicationRPC.onRPCResult");
- this._super();
- },
-
- /**
- * handle RPC erros here
- */
- onRPCError: function(error) {
-
- Em.Logger.log("FFW.BasicCommunicationRPC.onRPCError");
- this._super();
- },
-
- /**
- * handle RPC notifications here
- */
- onRPCNotification: function(notification) {
-
- Em.Logger.log("FFW.BasicCommunicationRPC.onRPCNotification");
- this._super();
-
- if (notification.method == this.onAppRegisteredNotification) {
- SDL.SDLModel.onAppRegistered(notification.params);
- this.OnFindApplications();
- }
-
- if (notification.method == this.onAppUnregisteredNotification) {
- // remove app from list
- SDL.SDLModel.onAppUnregistered(notification.params);
- }
-
- if (notification.method == this.onPlayToneNotification) {
- SDL.SDLModel.onPlayTone();
- }
-
- if (notification.method == this.onSDLCloseNotification) {
- //notification handler method
- }
- },
-
- /**
- * handle RPC requests here
- */
- onRPCRequest: function(request) {
-
- Em.Logger.log("FFW.BasicCommunicationRPC.onRPCRequest");
- this._super();
-
- if (this.validationCheck(request)) {
-
- if (request.method == "BasicCommunication.MixingAudioSupported") {
- this.MixingAudioSupported(true);
- }
- if (request.method == "BasicCommunication.AllowAllApps") {
- this.AllowAllApps(true);
- }
- if (request.method == "BasicCommunication.AllowApp") {
- this.AllowApp(true);
- }
- if (request.method == "BasicCommunication.AllowDeviceToConnect") {
- this
- .AllowDeviceToConnect(request.id, request.method, allow);
- }
- if (request.method == "BasicCommunication.UpdateAppList") {
- if (SDL.States.info.active) {
- SDL.SDLController
- .onGetAppList(request.params.applications);
- }
- this.sendBCResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
- }
- if (request.method == "BasicCommunication.UpdateDeviceList") {
- SDL.SDLModel.onGetDeviceList(request.params);
- this.sendBCResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
- }
- if (request.method == "BasicCommunication.ActivateApp") {
- SDL.SDLController.getApplicationModel(request.params.appID).turnOnSDL();
- this.sendBCResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
- }
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendBCResult: function(resultCode, id, method) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": method
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * id
- * @param {String}
- * method
- * @param {Boolean}
- * allow
- */
- AllowDeviceToConnect: function(id, method, allow) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type (enum)
- // from SDL
- // protocol
- "method": method,
- "allow": true
- }
- };
- this.client.send(JSONMessage);
-
- },
-
- /**
- * notification that UI is ready BasicCommunication should be sunscribed
- * to this notification
- */
- onReady: function() {
-
- Em.Logger.log("FFW.BasicCommunication.onReady");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnReady"
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Send request if application was activated
- *
- * @param {number} appID
- */
- OnAppActivated: function(appID) {
-
- Em.Logger.log("FFW.BasicCommunication.OnAppActivated");
-
- // send notification
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnAppActivated",
- "params": {
- "appID": appID
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * This methos is request to get list of registered apps.
- */
- OnFindApplications: function() {
-
- Em.Logger.log("FFW.BasicCommunication.OnFindApplications");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnFindApplications"
- };
-
- if (SDL.SDLModel.CurrDeviceInfo.name
- || SDL.SDLModel.CurrDeviceInfo.id) {
-
- JSONMessage.params = {
- "deviceInfo": SDL.SDLModel.CurrDeviceInfo
- };
- }
-
- this.client.send(JSONMessage);
- },
-
- /**
- * Request for list of avaliable devices
- */
- getDeviceList: function() {
-
- Em.Logger.log("FFW.BasicCommunication.GetDeviceList");
-
- this.getDeviceListRequestID = this.client.generateID();
-
- var JSONMessage = {
- "id": this.getDeviceListRequestID,
- "jsonrpc": "2.0",
- "method": "BasicCommunication.GetDeviceList"
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Invoked by UI component when user switches to any functionality which
- * is not other mobile application.
- *
- * @params {String}
- * @params {Number}
- */
- OnAppDeactivated: function(reason, appID) {
-
- Em.Logger.log("FFW.BasicCommunication.OnAppDeactivated");
-
- // send request
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnAppDeactivated",
- "params": {
- "appID": appID,
- "reason": reason
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Initiated by HMI user. In response optional list of found devices -
- * if not provided, not were found.
- */
- OnStartDeviceDiscovery: function() {
-
- Em.Logger.log("FFW.BasicCommunication.OnStartDeviceDiscovery");
-
- // send request
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnStartDeviceDiscovery"
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Used by HMI when User chooses to exit application.
- *
- * @params {Number}
- */
- ExitApplication: function(appID) {
-
- Em.Logger.log("FFW.BasicCommunication.OnExitApplication");
-
- // send request
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnExitApplication",
- "params": {
- "appID": appID
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Sent by HMI to SDL to close all registered applications.
- *
- * @params {String}
- */
- ExitAllApplications: function(reason) {
-
- Em.Logger.log("FFW.BasicCommunication.OnExitAllApplications");
-
- // send request
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnExitAllApplications",
- "params": {
- "reason": reason
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Response with params of the last one supports mixing audio (ie
- * recording TTS command and playing audio).
- *
- * @params {Number}
- */
- MixingAudioSupported: function(attenuatedSupported) {
-
- Em.Logger.log("FFW.BasicCommunication.MixingAudioSupportedResponse");
-
- // send request
-
- var JSONMessage = {
- "id": this.client.idStart,
- "jsonrpc": "2.0",
- "result": {
- "code": 0,
- "attenuatedSupported": attenuatedSupported,
- "method": "BasicCommunication.MixingAudioSupported"
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Response with Results by user/HMI allowing SDL functionality or
- * disallowing access to all mobile apps.
- *
- * @params {Number}
- */
- AllowAllApps: function(allowed) {
-
- Em.Logger.log("FFW.BasicCommunication.AllowAllAppsResponse");
-
- // send request
-
- var JSONMessage = {
- "id": this.client.idStart,
- "jsonrpc": "2.0",
- "result": {
- "code": 0,
- "method": "BasicCommunication.AllowAllApps",
- "allowed": allowed
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Response with result of allowed application
- *
- * @params {Number}
- */
- AllowApp: function(allowed) {
-
- Em.Logger.log("FFW.BasicCommunication.AllowAppResponse");
-
- // send request
-
- var JSONMessage = {
- "id": this.client.idStart,
- "jsonrpc": "2.0",
- "result": {
- "code": 0,
- "method": "BasicCommunication.AllowApp",
- "allowed": allowed
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Notifies if device was choosed
- *
- * @param {String}
- * deviceName
- * @param {Number}
- * appID
- */
- OnDeviceChosen: function(deviceName, appID) {
-
- Em.Logger.log("FFW.BasicCommunication.OnDeviceChosen");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnDeviceChosen",
- "params": {
- "deviceInfo": {
- "name": deviceName,
- "id": appID
- }
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function(resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Initiated by HMI.
- */
- OnSystemRequest: function() {
-
- Em.Logger.log("FFW.BasicCommunication.OnSystemRequest");
-
- // send request
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "BasicCommunication.OnStartDeviceDiscovery",
- "params":{
- "requestType": "HTTP",
- "url": "http://127.0.0.1",
- "fileType": "BINARY",
- "offset": 1000,
- "length": 10000
- }
- };
- this.client.send(JSONMessage);
- }
-
- })
diff --git a/SDL_Core/src/components/HMI/ffw/ButtonsRPC.js b/SDL_Core/src/components/HMI/ffw/ButtonsRPC.js
deleted file mode 100644
index d3134295e..000000000
--- a/SDL_Core/src/components/HMI/ffw/ButtonsRPC.js
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Reference implementation of Buttons component.
- *
- * Buttons sends to SDLCore press and hold events of soft buttons, presets and
- * some hard keys.
- */
-
-FFW.Buttons = FFW.RPCObserver.create( {
-
- /*
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create( {
- componentName: "Buttons"
- }),
-
- /*
- * connect to RPC bus
- */
- connect: function() {
-
- this.client.connect(this, 200); // Magic number is unique identifier for
- // component
- },
-
- /*
- * disconnect from RPC bus
- */
- disconnect: function() {
-
- this.client.disconnect();
- },
-
- /*
- * Client is registered - we can send request starting from this point of
- * time
- */
- onRPCRegistered: function() {
-
- Em.Logger.log("FFW.Buttons.onRPCRegistered");
- this._super();
- },
-
- /*
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.Buttons.onRPCUnregistered");
- this._super();
- },
-
- /*
- * Client disconnected.
- */
- onRPCDisconnected: function() {
-
- },
-
- /*
- * when result is received from RPC component this function is called It is
- * the propriate place to check results of reuqest execution Please use
- * previously store reuqestID to determine to which request repsonse belongs
- * to
- */
- onRPCResult: function(response) {
-
- Em.Logger.log("FFW.Buttons.onRPCResult");
- this._super();
- },
-
- /*
- * handle RPC erros here
- */
- onRPCError: function(error) {
-
- Em.Logger.log("FFW.Buttons.onRPCError");
- this._super();
- },
-
- /*
- * handle RPC notifications here
- */
- onRPCNotification: function(notification) {
-
- Em.Logger.log("FFW.Buttons.onRPCNotification");
- this._super();
- },
-
- /*
- * handle RPC requests here
- */
- onRPCRequest: function(request) {
-
- Em.Logger.log("FFW.Buttons.onRPCRequest");
- this._super();
-
- if (request.method == "Buttons.GetCapabilities") {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "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
- },
- "code": 0,
- "method": "Buttons.GetCapabilities"
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function(resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /*
- * Notifies the ButtonsRPC that the web is all set. Should be called twice:
- * when the RPC link is up or failed to connect and all the views are
- * rendered.
- */
- buttonPressed: function(id, type) {
-
- Em.Logger.log("FFW.Buttons.buttonPressed " + type);
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "Buttons.OnButtonPress",
- "params": {
- "name": id,
- "mode": type
- }
- };
-
- this.client.send(JSONMessage);
- },
-
- /*
- * Notifies the ButtonsRPC that the web is all set. Should be called twice:
- * when the RPC link is up or failed to connect and all the views are
- * rendered.
- */
- buttonEvent: function(id, type) {
-
- Em.Logger.log("FFW.Buttons.OnButtonEvent " + type);
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "Buttons.OnButtonEvent",
- "params": {
- "name": id,
- "mode": type
- }
- };
-
- this.client.send(JSONMessage);
-
- },
-
- /*
- * Notifies the ButtonsRPC that the web is all set. Should be called twice:
- * when the RPC link is up or failed to connect and all the views are
- * rendered.
- */
- buttonPressedCustom: function(name, type, softButtonID) {
-
- Em.Logger.log("FFW.Buttons.OnButtonPress " + type);
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "Buttons.OnButtonPress",
- "params": {
- "name": name,
- "mode": type,
- "customButtonID": softButtonID
- }
- };
-
- this.client.send(JSONMessage);
- },
-
- /*
- * Notifies the ButtonsRPC that the web is all set. Should be called twice:
- * when the RPC link is up or failed to connect and all the views are
- * rendered.
- */
- buttonEventCustom: function(name, type, softButtonID) {
-
- Em.Logger.log("FFW.Buttons.OnButtonEvent " + type);
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "Buttons.OnButtonEvent",
- "params": {
- "name": name,
- "mode": type,
- "customButtonID": softButtonID
- }
- };
-
- this.client.send(JSONMessage);
-
- }
-})
diff --git a/SDL_Core/src/components/HMI/ffw/Framework.js b/SDL_Core/src/components/HMI/ffw/Framework.js
deleted file mode 100644
index 4ab772528..000000000
--- a/SDL_Core/src/components/HMI/ffw/Framework.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name FFW
- * @desc Setup framework namespace and settings
- * @category Framework
- * @filesource app/Framework.js
- * @version 1.0
- */
-
-FFW = Em.Object.create( {
-
- init: function() {
-
- Em.Logger.log('FFW: Framework init');
- }
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/NavigationRPC.js b/SDL_Core/src/components/HMI/ffw/NavigationRPC.js
deleted file mode 100644
index b08a19adc..000000000
--- a/SDL_Core/src/components/HMI/ffw/NavigationRPC.js
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Reference implementation of Navigation component.
- *
- * Interface to get or set some essential information sent from SDLCore.
- * Navigation is responsible for the navigationApp functionality provided by the
- * application: display graphics and multimedia components, is responsible for
- * the transfer of managed manipulations, generated by the user to the server.
- *
- */
-
-FFW.Navigation = FFW.RPCObserver.create( {
-
- /**
- * If true then Navigation is present and ready to communicate with SDL.
- *
- * @type {Boolean}
- */
- isReady: true,
-
- /**
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create( {
- componentName: "Navigation"
- }),
-
- // temp var for debug
- appID: 1,
-
- /**
- * connect to RPC bus
- */
- connect: function() {
-
- this.client.connect(this, 800); // Magic number is unique identifier for
- // component
- },
-
- /**
- * disconnect from RPC bus
- */
- disconnect: function() {
-
- this.client.disconnect();
- },
-
- /**
- * Client is registered - we can send request starting from this point of
- * time
- */
- onRPCRegistered: function() {
-
- Em.Logger.log("FFW.Navigation.onRPCRegistered");
- this._super();
-
- // subscribe to notifications
- },
-
- /**
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.Navigation.onRPCUnregistered");
- this._super();
-
- // unsubscribe from notifications
- },
-
- /**
- * Client disconnected.
- */
- onRPCDisconnected: function() {
-
- },
-
- /**
- * when result is received from RPC component this function is called It is
- * the propriate place to check results of request execution Please use
- * previously store reuqestID to determine to which request repsonse belongs
- * to
- */
- onRPCResult: function(response) {
-
- Em.Logger.log("FFW.Navigation.onRPCResult");
- this._super();
- },
-
- /**
- * handle RPC erros here
- */
- onRPCError: function(error) {
-
- Em.Logger.log("FFW.Navigation.onRPCError");
- this._super();
- },
-
- /**
- * handle RPC notifications here
- */
- onRPCNotification: function(notification) {
-
- Em.Logger.log("FFW.Navigation.onRPCNotification");
- this._super();
-
- if (notification.method == this.onStopStreamNotification) {
- SDL.SDLModel.onStopStream(notification.params.appID);
- }
- },
-
- /**
- * handle RPC requests here
- */
- onRPCRequest: function(request) {
-
- Em.Logger.log("FFW.Navigation.onRPCRequest");
- if (this.validationCheck(request)) {
-
- var resultCode = null;
-
- switch (request.method) {
- case "Navigation.IsReady": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "available": this.get('isReady'),
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "Navigation.IsReady"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
- case "Navigation.AlertManeuver": {
-
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "Navigation.ShowConstantTBT": {
-
- SDL.SDLModel.tbtActivate(request.params);
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "Navigation.UpdateTurnList": {
-
- SDL.SDLModel.tbtTurnListUpdate(request.params);
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "Navigation.StartAudioStream": {
-
- SDL.SDLModel.startAudioStream(request.params);
-
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "Navigation.StopAudioStream": {
-
- SDL.SDLModel.stoptAudioStream(request.params.appID);
-
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "Navigation.StartStream": {
-
- SDL.SDLModel.startStream(request.params);
-
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "Navigation.StopStream": {
-
- SDL.SDLModel.stopStream(request.params.appID);
-
- this.sendNavigationResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- }
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function(resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendNavigationResult: function(resultCode, id, method) {
-
- Em.Logger.log("FFW.UI." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": method
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Notifies if TBTClientState was activated
- *
- * @param {String}
- * state
- * @param {Number}
- * appID
- */
- onTBTClientState: function(state, appID) {
-
- Em.Logger.log("FFW.Navigation.OnTBTClientState");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "Navigation.OnTBTClientState",
- "params": {
- "state": state
- }
- };
- this.client.send(JSONMessage);
- }
-}) \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/RPCClient.js b/SDL_Core/src/components/HMI/ffw/RPCClient.js
deleted file mode 100644
index 744bbbc53..000000000
--- a/SDL_Core/src/components/HMI/ffw/RPCClient.js
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Base class for RPC client
- *
- * Class provides access to basic functionality of RPC components Message Broker
- * as: registerComponent unregisterComponent subscription to notifications logic
- * to calculate request id
- */
-
-FFW.RPCClient = Em.Object
- .extend( {
-
- /*
- * transport layer for messages exchange
- */
- socket: null, // instance of websocket
-
- /*
- * url for message broker
- */
- url: "ws://localhost:8087",
-// url: FLAGS.WEBSOCKET_URL,
-
- /*
- * Component name in RPC system It is unique.
- */
- componentName: null,
-
- /*
- * observer of RPC states
- */
- observer: null,
-
- /*
- * these variables are used to have unique request ids for different
- * components in RPC bus idStart is received as a response for
- * registerRPCComponent messages. space for ids for specific RPC
- * component is allocated by message broker
- */
- idStart: -1,
- idRange: 1000,
- requestId: -1,
-
- registerRequestId: -1,
- unregisterRequestId: -1,
-
- /*
- * Open WebSocket and initialize handlers
- */
- connect: function(observer, startId) {
-
- this.observer = observer;
- this.idStart = startId;
-
- this.socket = new WebSocket(this.url);
-
- var self = this;
-
- this.socket.onopen = function(evt) {
-
- self.onWSOpen(evt)
- };
- this.socket.onclose = function(evt) {
-
- self.onWSClose(evt)
- };
- this.socket.onmessage = function(evt) {
-
- self.onWSMessage(evt)
- };
- this.socket.onerror = function(evt) {
-
- self.onWSError(evt)
- };
-
- },
-
- /*
- * Close WebSocket connection Please make sure that component was
- * unregistered in advance
- */
- disconnect: function() {
-
- this.unregisterRPCComponent();
- },
-
- /*
- * WebSocket connection is ready Now RPC component can be registered in
- * message broker
- */
- onWSOpen: function(evt) {
-
- Em.Logger.log("RPCCLient.onWSOpen");
-
- this.registerRPCComponent();
- },
-
- /*
- * when result is received from RPC component this function is called It
- * is the propriate place to check results of reuqest execution Please
- * use previously store reuqestID to determine to which request repsonse
- * belongs to
- */
- onWSMessage: function(evt) {
-
- Em.Logger.log("Message received: " + evt.data);
-
- var jsonObj = JSON.parse(evt.data);
-
- // handle component registration
- if (jsonObj.id == this.registerRequestId && jsonObj.method == null && typeof jsonObj.result == 'number') {
- if (jsonObj.error == null) {
- this.requestId = this.idStart = jsonObj.result;
- this.observer.onRPCRegistered();
- }
- // handle component unregistration
- } else if (jsonObj.id == this.unregisterRequestId) {
- if (jsonObj.error == null) {
- this.socket.close();
- this.observer.onRPCUnregistered();
- }
- // handle result, error, notification, requests
- } else {
- if (jsonObj.id == null) {
- this.observer.onRPCNotification(jsonObj);
- } else {
- if (jsonObj.result != null)
- this.observer.onRPCResult(jsonObj);
- else if (jsonObj.error != null)
- this.observer.onRPCError(jsonObj);
- else
- this.observer.onRPCRequest(jsonObj);
- }
- }
- },
-
- /*
- * WebSocket connection is closed Please make sure that RPCComponent was
- * dunregistered in advance
- */
- onWSClose: function(evt) {
-
- Em.Logger.log("RPCClient: Connection is closed");
-
- SDL.SDLController.unregisterComponentStatus(this.observer.client.componentName);
-
- var self = this;
- setTimeout(function(){
- self.connect(self.observer, self.idStart);
- }, 5000);
- this.observer.onRPCDisconnected();
- },
-
- /*
- * WebSocket connection errors handling
- */
- onWSError: function(evt) {
-
- // Em.Logger.log("ERROR: " + evt.data);
- Em.Logger.log("ERROR: ");
- },
-
- /*
- * register component is RPC bus
- */
- registerRPCComponent: function() {
-
- this.registerRequestId = this.idStart;
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": this.registerRequestId,
- "method": "MB.registerComponent",
- "params": {
- "componentName": this.componentName
- }
- };
- this.send(JSONMessage);
- },
-
- /*
- * unregister component is RPC bus
- */
- unregisterRPCComponent: function() {
-
- this.unregisterRequestId = this.generateId();
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": this.unregisterRequestId,
- "method": "MB.unregisterComponent",
- "params": {
- "componentName": this.componentName
- }
- };
- this.send(JSONMessage);
- },
-
- /*
- * Subscribes to notification. Returns the request's id.
- */
- subscribeToNotification: function(notification) {
-
- var msgId = this.generateId();
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": msgId,
- "method": "MB.subscribeTo",
- "params": {
- "propertyName": notification
- }
- };
- this.send(JSONMessage);
- return msgId;
- },
-
- /*
- * Unsubscribes from notification. Returns the request's id.
- */
- unsubscribeFromNotification: function(notification) {
-
- var msgId = this.client.generateId();
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": msgId,
- "method": "MB.unsubscribeFrom",
- "params": {
- "propertyName": notification
- }
- };
- this.send(JSONMessage);
- return msgId;
- },
-
- /*
- * stringify object and send via socket connection
- */
- send: function(obj) {
-
- if (this.socket.readyState == this.socket.OPEN) {
- var strJson = JSON.stringify(obj);
- Em.Logger.log(strJson);
-
- var logTime = new Date();
- console.log(logTime.getHours() + ":" + logTime.getMinutes() + ":" + logTime.getSeconds() + ":" + logTime.getMilliseconds());
-
- this.socket.send(strJson);
- } else {
- Em.Logger
- .error("RPCClient: Can't send message since socket is not ready");
- }
- },
-
- /*
- * Generate id for new request to RPC component Function has to be used
- * as private
- */
- generateId: function() {
-
- this.requestId++;
- if (this.requestId >= this.idStart + this.idRange)
- this.requestId = this.idStart;
- return this.requestId;
- }
-
- })
diff --git a/SDL_Core/src/components/HMI/ffw/RPCObserver.js b/SDL_Core/src/components/HMI/ffw/RPCObserver.js
deleted file mode 100644
index 9fd422d78..000000000
--- a/SDL_Core/src/components/HMI/ffw/RPCObserver.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @desc Observer of RPCClient
- */
-
-FFW.RPCObserver = Em.Object
- .extend( {
-
- onRPCRegistered: function() {
-
- // request necessary parameters from Backend
- SDL.SDLController.registeredComponentStatus(this.client.componentName);
- },
-
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.RPCObserver.onUnregistered");
- },
-
- onRPCDisconnected: function() {
-
- Em.Logger.log("FFW.RPCObserver.onRPCDisconnected");
- },
-
- /*
- * when result is received from RPC component this function is called It
- * is the propriate place to check results of reuqest execution Please
- * use previously store reuqestID to determine to which request repsonse
- * belongs to
- */
- onRPCResult: function(result) {
-
- // parse JSON string and set necessary properties
- },
-
- /*
- */
- onRPCError: function(error) {
-
- // parse JSON string and set necessary properties
- },
-
- /*
- */
- onRPCNotification: function(notification) {
-
- // parse JSON string and set necessary properties
- },
-
- onRPCRequest: function(request) {
-
- // parse JSON string and send back necessary data
- },
-
- validationCheck: function(request) {
-
- if (request && request.method) {
- var parsedMethod = request.method.split(/[.]/), validateFunc, result;
-
- //if (request.params && "appID" in request.params && SDL.SDLModel.registeredApps.filterProperty('appID', request.params.appID).length > 0) {
- if (request.params && request.params.appID >= 0 && !SDL.SDLModel.registeredApps.filterProperty('appID', request.params.appID)) {
- Em.Logger.error('No application registered with current appID!');
- return false;
- }
-
- if (SDL.RPCController[parsedMethod[0]][parsedMethod[1]]) {
- validateFunc = SDL.RPCController[parsedMethod[0]][parsedMethod[1]];
- result = validateFunc(request.params);
-
- if (result.resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
- this.sendError(result.resultCode,
- request.id,
- request.method,
- result.resultMessage);
- return false;
- } else {
- return true;
- }
- } else {
- this
- .sendError(SDL.SDLModel.resultCode["UNSUPPORTED_REQUEST"],
- request.id,
- request.method,
- 'Unsupported incoming request! ' + parsedMethod[0]
- + '.' + parsedMethod[1]);
- Em.Logger.error('No method "' + parsedMethod[0] + '.'
- + parsedMethod[1] + '"');
- return false;
- }
- }
- }
- }); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/TTSRPC.js b/SDL_Core/src/components/HMI/ffw/TTSRPC.js
deleted file mode 100644
index fe205e555..000000000
--- a/SDL_Core/src/components/HMI/ffw/TTSRPC.js
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Reference implementation of TTS component.
- *
- * TTS is responsible for playing sound data sent from SDLCore to notify user
- * about some events happened.
- */
-
-FFW.TTS = FFW.RPCObserver.create( {
-
- /**
- * If true then TTS is present and ready to communicate with SDL.
- *
- * @type {Boolean}
- */
- isReady: true,
-
- /**
- * Request id of current running Speak request
- *
- * @type {Boolean}
- */
- requestId: null,
-
- /**
- * Flag to determine if Speak request was aborted
- *
- * @type {Boolean}
- */
- aborted: false,
-
- /*
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create( {
- componentName: "TTS"
- }),
-
- /*
- * connect to RPC bus
- */
- connect: function() {
-
- this.client.connect(this, 300); // Magic number is unique identifier for
- // component
- },
-
- /*
- * disconnect from RPC bus
- */
- disconnect: function() {
-
- this.client.disconnect();
- },
-
- /*
- * Client is registered - we can send request starting from this point of
- * time
- */
- onRPCRegistered: function() {
-
- Em.Logger.log("FFW.TTS.onRPCRegistered");
- this._super();
- },
-
- /*
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.TTS.onRPCUnregistered");
- this._super();
- },
-
- /*
- * Client disconnected.
- */
- onRPCDisconnected: function() {
-
- },
-
- /*
- * when result is received from RPC component this function is called It is
- * the propriate place to check results of reuqest execution Please use
- * previously store reuqestID to determine to which request repsonse belongs
- * to
- */
- onRPCResult: function(response) {
-
- Em.Logger.log("FFW.TTS.onRPCResult");
- this._super();
- },
-
- /*
- * handle RPC erros here
- */
- onRPCError: function(error) {
-
- Em.Logger.log("FFW.TTS.onRPCError");
- this._super();
- },
-
- /*
- * handle RPC notifications here
- */
- onRPCNotification: function(notification) {
-
- Em.Logger.log("FFW.TTS.onRPCNotification");
- this._super();
- },
-
- /*
- * handle RPC requests here
- */
- onRPCRequest: function(request) {
-
- Em.Logger.log("FFW.TTS.onRPCRequest");
- this._super();
-
- switch (request.method) {
- case "TTS.Speak": {
-
- if (SDL.TTSPopUp.active) {
- FFW.TTS.sendError(SDL.SDLModel.resultCode["REJECTED"], request.id, "TTS.Speak", "TTS in progress. Rejected.");
- } else {
- this.requestId = request.id;
- SDL.SDLModel.onPrompt(request.params.ttsChunks);
- }
-
- break;
- }
- case "TTS.SetGlobalProperties": {
-
- SDL.SDLModel.setProperties(request.params);
-
- this.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "TTS.StopSpeaking": {
-
- SDL.SDLModel.TTSStopSpeaking();
-
- this.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "TTS.GetCapabilities": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "speechCapabilities": [
- "TEXT",
- "PRE_RECORDED"
- ],
- "prerecordedSpeechCapabilities": [
- "HELP_JINGLE",
- "INITIAL_JINGLE",
- "LISTEN_JINGLE",
- "POSITIVE_JINGLE",
- "NEGATIVE_JINGLE"
- ],
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type (enum)
- // from SDL
- // protocol
- "method": "TTS.GetCapabilities"
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "TTS.PerformInteraction":
- {
-
- SDL.SDLModel.onPrompt(request.params.initialPrompt);
-
- SDL.SDLModel.interactionData.helpPrompt = request.params.helpPrompt;
-
- var request = request;
-
- setTimeout(function(){
- if (SDL.InteractionChoicesView.active) {
- //FFW.TTS.requestId = request.id;
- SDL.SDLModel.onPrompt(request.params.timeoutPrompt);
- SDL.SDLModel.interactionData.helpPrompt = null;
- }
- }, request.params.timeout - 2000); //Magic numer is a platform depended HMI behavior: -2 seconds for timeout prompt
-
- this.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, "TTS.PerformInteraction");
-
- break;
- }
- case "TTS.GetSupportedLanguages": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type (enum)
- // from SDL
- "method": "TTS.GetSupportedLanguages",
- "languages": SDL.SDLModel.sdlLanguagesList
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "TTS.GetLanguage": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type (enum)
- // from SDL
- "method": "TTS.GetLanguage",
- "language": SDL.SDLModel.hmiTTSVRLanguage
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "TTS.ChangeRegistration": {
-
- SDL.SDLModel.changeRegistrationTTSVR(request.params.language, request.params.appID);
-
- this.sendTTSResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
-
- case "TTS.IsReady": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "available": this.get('isReady'),
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "TTS.IsReady"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
-
- default: {
- // statements_def
- break;
- }
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function(resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendTTSResult: function(resultCode, id, method) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": method
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /*
- * Notifies if sdl TTS components language was changed
- */
- OnLanguageChange: function(lang) {
-
- Em.Logger.log("FFW.TTS.OnLanguageChange");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "TTS.OnLanguageChange",
- "params": {
- "language": lang
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Initiated by TTS module to let SDL know that TTS session has started.
- */
- Started: function() {
-
- Em.Logger.log("FFW.TTS.Started");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "TTS.Started"
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Initiated by TTS module to let SDL know that TTS session has stopped.
- */
- Stopped: function() {
-
- Em.Logger.log("FFW.TTS.Stopped");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "TTS.Stopped"
- };
- this.client.send(JSONMessage);
- }
-}) \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/UIRPC.js b/SDL_Core/src/components/HMI/ffw/UIRPC.js
deleted file mode 100644
index 8970cda2c..000000000
--- a/SDL_Core/src/components/HMI/ffw/UIRPC.js
+++ /dev/null
@@ -1,1345 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Reference implementation of UI component.
- *
- * Interface to get or set some essential information sent from SDLCore. UI is
- * responsible for the functionality provided by the application: display
- * graphics and multimedia components, is responsible for the transfer of
- * managed manipulations, generated by the user to the server.
- *
- */
-
-FFW.UI = FFW.RPCObserver.create({
-
- /**
- * If true then UI is present and ready to communicate with SDL.
- *
- * @type {Boolean}
- */
- isReady: true,
-
- /**
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create({
- componentName: "UI"
- }),
-
- // temp var for debug
- appID: 1,
-
- onShowNotificationSubscribeRequestID: -1,
-
- onShowNotificationUnsubscribeRequestID: -1,
-
- // const
- onShowNotificationNotification: "UI.ShowNotification",
-
- /**
- * ids for requests AudioPassThru
- */
- performAudioPassThruRequestID: -1,
- endAudioPassThruRequestID: -1,
-
- /**
- * connect to RPC bus
- */
- connect: function () {
-
- this.client.connect(this, 400); // Magic number is unique identifier
- // for component
- },
-
- /**
- * disconnect from RPC bus
- */
- disconnect: function () {
-
- this.client.disconnect();
- },
-
- /**
- * Client is registered - we can send request starting from this point
- * of time
- */
- onRPCRegistered: function () {
-
- Em.Logger.log("FFW.UI.onRPCRegistered");
- this._super();
-
- // subscribe to notifications
- this.onShowNotificationSubscribeRequestID = this.client.subscribeToNotification(this.onShowNotificationNotification);
- },
-
- /**
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function () {
-
- Em.Logger.log("FFW.UI.onRPCUnregistered");
- this._super();
-
- // unsubscribe from notifications
- this.onShowNotificationUnsubscribeRequestID = this.client.unsubscribeFromNotification(this.onShowNotificationNotification);
- },
-
- /**
- * Client disconnected.
- */
- onRPCDisconnected: function () {
-
- },
-
- /**
- * when result is received from RPC component this function is called It
- * is the propriate place to check results of request execution Please
- * use previously store reuqestID to determine to which request repsonse
- * belongs to
- */
- onRPCResult: function (response) {
-
- Em.Logger.log("FFW.UI.onRPCResult");
- this._super();
- },
-
- /**
- * handle RPC erros here
- */
- onRPCError: function (error) {
-
- Em.Logger.log("FFW.UI.onRPCError");
- this._super();
- },
-
- /**
- * handle RPC notifications here
- */
- onRPCNotification: function (notification) {
-
- Em.Logger.log("FFW.UI.onRPCNotification");
- this._super();
-
- if (notification.method == this.onShowNotificationNotification) {
- // to do
- }
- },
-
- /**
- * handle RPC requests here
- */
- onRPCRequest: function (request) {
-
- Em.Logger.log("FFW.UI.onRPCRequest");
-
- if (this.validationCheck(request)) {
-
- switch (request.method) {
- case "UI.Alert":
- {
-
- SDL.SDLModel.onUIAlert(request.params, request.id);
-
- break;
- }
- case "UI.Show":
- {
-
- SDL.TurnByTurnView.deactivate();
- SDL.SDLController.getApplicationModel(request.params.appID).onSDLUIShow(request.params);
- this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
-
- break;
- }
- case "UI.SetGlobalProperties":
- {
- SDL.SDLModel.setProperties(request.params);
-
- this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
-
- break;
- }
- case "UI.ResetGlobalProperties":
- {
-
- this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
-
- break;
- }
- case "UI.AddCommand":
- {
-
- SDL.SDLController.getApplicationModel(request.params.appID).addCommand(request);
-
- break;
- }
- case "UI.DeleteCommand":
- {
-
- SDL.SDLController.getApplicationModel(request.params.appID).deleteCommand(request.params.cmdID, request.id);
-
- break;
- }
- case "UI.AddSubMenu":
- {
-
- SDL.SDLController.getApplicationModel(request.params.appID).addSubMenu(request);
-
- break;
- }
- case "UI.DeleteSubMenu":
- {
-
- var resultCode = SDL.SDLController.getApplicationModel(request.params.appID).deleteSubMenu(request.params.menuID);
- this.sendUIResult(resultCode, request.id, request.method);
-
- break;
- }
- case "UI.PerformInteraction":
- {
-
- SDL.SDLModel.uiPerformInteraction(request);
-
- break;
- }
- case "UI.SetMediaClockTimer":
- {
-
- var resultCode = SDL.SDLController.getApplicationModel(request.params.appID).sdlSetMediaClockTimer(request.params);
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
- this.sendUIResult(resultCode, request.id, request.method);
- } else {
- this.sendError(resultCode, request.id, request.method, 'Request is ignored, because the intended result is already in effect.');
- }
-
- break;
- }
- case "UI.Slider":
- {
-
- SDL.SDLModel.uiSlider(request);
-
- break;
- }
- case "UI.ScrollableMessage":
- {
-
- SDL.SDLModel.onSDLScrolableMessage(request, request.id);
-
- break;
- }
- case "UI.ChangeRegistration":
- {
-
- SDL.SDLModel.changeRegistrationUI(request.params.language, request.params.appID);
- this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
-
- break;
- }
- case "UI.SetDisplayLayout":
- {
-
- var senResponseFlag = false;
-
- switch (request.params.displayLayout){
- case "MEDIA": {
- senResponseFlag = true;
- break;
- }
- case "NON-MEDIA": {
- senResponseFlag = true;
- break;
- }
- case "DEFAULT": {
- senResponseFlag = true;
- break;
- }
- case "ONSCREEN_PRESETS": {
- senResponseFlag = true;
- break;
- }
- case "NAV_FULLSCREEN_MAP": {
- senResponseFlag = true;
- break;
- }
- case "NAV_KEYBOARD": {
- senResponseFlag = true;
- break;
- }
- case "NAV_LIST": {
- senResponseFlag = true;
- break;
- }
- }
-
- if (senResponseFlag) {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "displayCapabilities": {
- "displayType": "GEN2_8_DMA",
- "textFields": [
- "mainField1",
- "mainField2",
- "mainField3",
- "mainField4",
- "statusBar",
- "mediaClock",
- "mediaTrack",
- "alertText1",
- "alertText2",
- "alertText3",
- "scrollableMessageBody",
- "initialInteractionText",
- "navigationText1",
- "navigationText2",
- "ETA",
- "totalDistance",
- "navigationText",
- "audioPassThruDisplayText1",
- "audioPassThruDisplayText2",
- "sliderHeader",
- "sliderFooter",
- "notificationText",
- "menuName",
- "secondaryText",
- "tertiaryText",
- "timeToDestination",
- "turnText"
- ],
- "imageFields": [
- {
- "name": "softButtonImage",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "choiceImage",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "choiceSecondaryImage",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "vrHelpItem",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "turnIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "menuIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "cmdIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "graphic",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "showConstantTBTIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "showConstantTBTNextTurnIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "showConstantTBTNextTurnIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- }
- ],
- "mediaClockFormats": [
- "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4"
- ],
- "graphicSupported": true,
- "imageCapabilities": ["DYNAMIC"],
- "templatesAvailable": ["TEMPLATE"],
- "screenParams": {
- "resolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 480
- },
- "touchEventAvailable": {
- "pressAvailable": true,
- "multiTouchAvailable": true,
- "doublePressAvailable": false
- }
- },
- "numCustomPresetsAvailable": 8
- },
- "buttonCapabilities": [
- {
- "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
- }
- ],
- "softButtonCapabilities": [{
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true,
- "imageSupported": true
- }],
- "presetBankCapabilities": {
- "onScreenPresetsAvailable": true
- },
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "UI.SetDisplayLayout"
- }
- };
-
- this.client.send(JSONMessage);
-
- } else {
- this.sendError(SDL.SDLModel.resultCode["UNSUPPORTED_RESOURCE"], request.id, request.method, "Unsupported display layout!")
- }
-
- break;
- }
- case "UI.SetAppIcon":
- {
-
- SDL.SDLModel.onSDLSetAppIcon(request.params, request.id, request.method);
-
- break;
- }
- case "UI.PerformAudioPassThru":
- {
-
- this.performAudioPassThruRequestID = request.id;
- SDL.SDLModel.UIPerformAudioPassThru(request.params);
-
- break;
- }
- case "UI.EndAudioPassThru":
- {
-
- this.endAudioPassThruRequestID = request.id;
-
- SDL.SDLModel.UIEndAudioPassThru();
-
- break;
- }
- case "UI.GetSupportedLanguages":
- {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "id": request.id,
- "jsonrpc": "2.0",
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type
- // (enum)
- // from
- // SDL
- "method": "UI.GetSupportedLanguages",
- "languages": SDL.SDLModel.sdlLanguagesList
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "UI.GetLanguage":
- {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type
- // (enum)
- // from
- // SDL
- "method": "UI.GetLanguage",
- "language": SDL.SDLModel.hmiUILanguage
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "UI.GetCapabilities":
- {
-
- Em.Logger.log("FFW." + request.method + "Response");
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "displayCapabilities": {
- "displayType": "GEN2_8_DMA",
- "textFields": [
- "mainField1",
- "mainField2",
- "mainField3",
- "mainField4",
- "statusBar",
- "mediaClock",
- "mediaTrack",
- "alertText1",
- "alertText2",
- "alertText3",
- "scrollableMessageBody",
- "initialInteractionText",
- "navigationText1",
- "navigationText2",
- "ETA",
- "totalDistance",
- "navigationText",
- "audioPassThruDisplayText1",
- "audioPassThruDisplayText2",
- "sliderHeader",
- "sliderFooter",
- "notificationText",
- "menuName",
- "secondaryText",
- "tertiaryText",
- "timeToDestination",
- "turnText"
- ],
- "imageFields": [
- {
- "name": "softButtonImage",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "choiceImage",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "choiceSecondaryImage",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "vrHelpItem",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "turnIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "menuIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "cmdIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "graphic",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "showConstantTBTIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "showConstantTBTNextTurnIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- },
- {
- "name": "showConstantTBTNextTurnIcon",
- "imageTypeSupported":
- [
- "GRAPHIC_BMP",
- "GRAPHIC_JPEG",
- "GRAPHIC_PNG"
- ],
- "imageResolution":
- {
- "resolutionWidth": 64,
- "resolutionHeight": 64
- }
- }
- ],
- "mediaClockFormats": [
- "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4"
- ],
- "graphicSupported": true,
- "imageCapabilities": ["DYNAMIC"],
- "templatesAvailable": ["TEMPLATE"],
- "screenParams": {
- "resolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 480
- },
- "touchEventAvailable": {
- "pressAvailable": true,
- "multiTouchAvailable": true,
- "doublePressAvailable": false
- }
- },
- "numCustomPresetsAvailable": 8
- },
- "audioPassThruCapabilities": {
- "samplingRate": "44KHZ",
- "bitsPerSample": "8_BIT",
- "audioType": "PCM"
- },
- "hmiZoneCapabilities": "FRONT",
- "softButtonCapabilities": {
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true,
- "imageSupported": true
- },
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "UI.GetCapabilities"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
- case "UI.IsReady":
- {
-
- Em.Logger.log("FFW." + request.method + "Response");
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "available": this.get('isReady'),
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "UI.IsReady"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
- case "UI.ClosePopUp":
- {
-
- SDL.SDLController.closePopUp();
-
-
- Em.Logger.log("FFW." + request.method + "Response");
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "UI.ClosePopUp"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
- case "UI.ShowVrHelp":
- {
-
- //SDL.SDLModel.ShowVrHelp(request.params);
-
- this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
-
- break;
- }
- case "UI.ShowKeyboard":
- {
-
- SDL.SDLModel.uiShowKeyboard(request.params);
-
- this.sendUIResult(SDL.SDLModel.resultCode["SUCCESS"], request.id, request.method);
-
- break;
- }
- default:
- {
- // statements_def
- break;
- }
- }
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function (resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode !== 0) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendUIResult: function (resultCode, id, method) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": method
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- */
- alertResponse: function (resultCode, id) {
-
- Em.Logger.log("FFW.UI.AlertResponse");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": 'UI.Alert'
- }
- };
- this.client.send(JSONMessage);
- } else {
- this.sendError(resultCode, id, "UI.Alert", 'Alert request aborted.');
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * sliderRequestID
- * @param {Number}
- * sliderPosition
- */
- sendSliderResult: function (resultCode, sliderRequestID, sliderPosition) {
-
-
- Em.Logger.log("FFW.UI.SliderResponse");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": sliderRequestID,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": 'UI.Slider'
- }
- };
-
- if (sliderPosition) {
- JSONMessage.result.sliderPosition = sliderPosition;
- }
- } else {
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": sliderRequestID,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": 'Slider request aborted.',
- "data": {
- "method": 'UI.Slider'
- }
- }
- };
-
- if (sliderPosition) {
- JSONMessage.error.data.sliderPosition = sliderPosition;
- }
- }
-
- this.client.send(JSONMessage);
- },
-
- /**
- * Notification method to send touch event data to SDLCore
- *
- * @param {Number} appID
- * @param {String} methodName
- */
- onResetTimeout: function (appID, methodName) {
-
- Em.Logger.log("FFW.UI.OnResetTimeout");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnResetTimeout",
- "params": {
- "methodName": methodName,
- "appID": appID
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * send notification when command was triggered
- *
- * @param {Number}
- * commandID
- * @param {Number}
- * appID
- */
- onCommand: function (commandID, appID) {
-
- Em.Logger.log("FFW.UI.onCommand");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnCommand",
- "params": {
- "cmdID": commandID,
- "appID": appID
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Notification method to send touch event data to SDLCore
- *
- * @param {String} type
- * @param {Object} touchLists
- * @param {Object} info
- */
- onTouchEvent: function (type, event) {
-
- Em.Logger.log("FFW.UI.OnTouchEvent");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnTouchEvent",
- "params": {
- "type": type,
- "event": event
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * send notification when command was triggered
- *
- * @param {Number}
- * softButtonID
- * @param {Number}
- * appID
- */
- onCommandSoftButton: function (softButtonID, appID) {
-
- Em.Logger.log("FFW.UI.onCommand");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnCommand",
- "params": {
- "commandID": softButtonID,
- "appID": appID
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * send notification when command was triggered
- *
- * @param {Number} appID
- * @param {Number} resultCode
- * @param {Number} commandID
- * @param {String} manualTextEntry
- */
- interactionResponse: function (appID, resultCode, commandID, manualTextEntry) {
-
- Em.Logger.log("FFW.UI.PerformInteractionResponse");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": appID,
- "result": {
- "code": resultCode,
- "method": "UI.PerformInteraction"
- }
- };
-
- if (commandID) {
- JSONMessage.result.choiceID = commandID;
- }
-
- if (manualTextEntry) {
- JSONMessage.result.manualTextEntry = manualTextEntry;
- }
- } else {
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": appID,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": "Perform Interaction error response.",
- "data": {
- "method": "UI.PerformInteraction"
- }
- }
- };
- }
-
- this.client.send(JSONMessage);
- },
-
- /**
- * send notification when DriverDistraction PopUp is visible
- *
- * @param {String}
- * driverDistractionState
- */
- onDriverDistraction: function (driverDistractionState) {
-
- Em.Logger.log("FFW.UI.DriverDistraction");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnDriverDistraction",
- "params": {
- "state": driverDistractionState
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Notifies if system context is changed
- *
- * @param {String}
- * systemContextValue
- */
- OnSystemContext: function (systemContextValue) {
-
- Em.Logger.log("FFW.UI.OnSystemContext");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnSystemContext",
- "params": {
- "systemContext": systemContextValue
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Notifies if sdl UI components language was changed
- *
- * @param {String}
- * lang
- */
- OnLanguageChange: function (lang) {
-
- Em.Logger.log("FFW.UI.OnLanguageChange");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnLanguageChange",
- "params": {
- "language": lang
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Sends notification on SDL Core display keyboard value
- *
- * @param {String}
- *
- */
- OnKeyboardInput: function (value) {
-
- Em.Logger.log("FFW.UI.OnKeyboardInput");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "UI.OnKeyboardInput",
- "params": {
- "data": value,
- "event": "KEYPRESS"
- }
- };
- this.client.send(JSONMessage);
- }
-})
diff --git a/SDL_Core/src/components/HMI/ffw/VRRPC.js b/SDL_Core/src/components/HMI/ffw/VRRPC.js
deleted file mode 100644
index cfc8b07fe..000000000
--- a/SDL_Core/src/components/HMI/ffw/VRRPC.js
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Reference implementation of VR component.
- *
- * Interface to get or set some essential information sent from SDLCore. VR is
- * responsible for receiving voice commands choosed by user and sending
- * notification of chosen commands to SDLCore.
- *
- */
-
-FFW.VR = FFW.RPCObserver.create( {
-
- /**
- * If true then VR is present and ready to communicate with SDL.
- *
- * @type {Boolean}
- */
- isReady: true,
-
- /*
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create( {
- componentName: "VR"
- }),
-
- /*
- * connect to RPC bus
- */
- connect: function() {
-
- this.client.connect(this, 500); // Magic number is unique identifier for
- // component
- },
-
- /*
- * disconnect from RPC bus
- */
- disconnect: function() {
-
- this.client.disconnect();
- },
-
- /*
- * Client is registered - we can send request starting from this point of
- * time
- */
- onRPCRegistered: function() {
-
- Em.Logger.log("FFW.VR.onRPCRegistered");
- this._super();
- },
-
- /*
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.VR.onRPCUnregistered");
- this._super();
- },
-
- /*
- * Client disconnected.
- */
- onRPCDisconnected: function() {
-
- },
-
- /*
- * when result is received from RPC component this function is called It is
- * the propriate place to check results of reuqest execution Please use
- * previously store reuqestID to determine to which request repsonse belongs
- * to
- */
- onRPCResult: function(response) {
-
- Em.Logger.log("FFW.VR.onRPCResult");
- this._super();
- },
-
- /*
- * handle RPC erros here
- */
- onRPCError: function(error) {
-
- Em.Logger.log("FFW.VR.onRPCError");
- this._super();
- },
-
- /*
- * handle RPC notifications here
- */
- onRPCNotification: function(notification) {
-
- Em.Logger.log("FFW.VR.onRPCNotification");
- this._super();
- },
-
- /*
- * send notification when command was triggered
- */
- onCommand: function(element) {
-
- Em.Logger.log("FFW.VR.onCommand");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VR.OnCommand",
- "params": {
- "commandID": element.commandID
- }
- };
- this.client.send(JSONMessage);
-
- SDL.VRPopUp.set('VRActive', false);
- },
-
- /*
- * handle RPC requests here
- */
- onRPCRequest: function(request) {
-
- Em.Logger.log("FFW.VR.onRPCRequest");
- if (this.validationCheck(request)) {
-
- switch (request.method) {
- case "VR.AddCommand": {
-
- SDL.SDLModel.addCommandVR(request.params);
-
- this.sendVRResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "VR.DeleteCommand": {
-
- SDL.SDLModel.deleteCommandVR(request.params.cmdID);
-
- this.sendVRResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "VR.GetSupportedLanguages": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type
- // (enum)
- // from SDL
- "method": "VR.GetSupportedLanguages",
- "languages": SDL.SDLModel.sdlLanguagesList
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "VR.GetLanguage": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"], // type
- // (enum)
- // from SDL
- "method": "VR.GetLanguage",
- "language": SDL.SDLModel.hmiTTSVRLanguage
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
- case "VR.ChangeRegistration": {
-
- SDL.SDLModel.changeRegistrationTTSVR(request.params.language, request.params.appID);
-
- this.sendVRResult(SDL.SDLModel.resultCode["SUCCESS"],
- request.id,
- request.method);
-
- break;
- }
- case "VR.IsReady": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "available": this.get('isReady'),
- "code": 0,
- "method": "VR.IsReady"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
- case "VR.GetCapabilities": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "VR.GetCapabilities",
- "vrCapabilities": ["TEXT"]
- }
- };
- this.client.send(JSONMessage);
-
- break;
- }
-
- default: {
- // statements_def
- break;
- }
- }
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function(resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendVRResult: function(resultCode, id, method) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode, // type (enum) from SDL protocol
- "method": method
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /*
- * send notification when command was triggered from VR
- */
- onChoise: function(commandID) {
-
- Em.Logger.log("FFW.VR.PerformInteraction");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VR.OnChoise",
- "params": {
- "choiceID": commandID
- }
- };
-
- this.client.send(JSONMessage);
- },
-
- /**
- * Initiated by VR module to let SDL know that VR session has started.
- */
- Started: function() {
-
- Em.Logger.log("FFW.VR.Started");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VR.Started"
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Initiated by VR module to let SDL know that VR session has stopped.
- */
- Stopped: function() {
-
- Em.Logger.log("FFW.VR.Stopped");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VR.Stopped"
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * send notification when command was triggered
- */
- onCommand: function(commandID, appID) {
-
- Em.Logger.log("FFW.VR.onCommand");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VR.OnCommand",
- "params": {
- "cmdID": commandID,
- "appID": appID
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * Notifies if sdl VR components language was changed
- */
- OnLanguageChange: function(lang) {
-
- Em.Logger.log("FFW.VR.OnLanguageChange");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VR.OnLanguageChange",
- "params": {
- "language": lang
- }
- };
- this.client.send(JSONMessage);
- }
-}) \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/VehicleInfoRPC.js b/SDL_Core/src/components/HMI/ffw/VehicleInfoRPC.js
deleted file mode 100644
index 6d969e0ca..000000000
--- a/SDL_Core/src/components/HMI/ffw/VehicleInfoRPC.js
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * Reference implementation of VehicleInfo component.
- *
- * Interface to get or set some essential information sent from SDLCore.
- * VehicleInfo is responsible for sending a data about the condition of the
- * vehicle between SDLCore and CAN network. Instead CAN network used
- * VehicleInfoModel.
- *
- */
-
-FFW.VehicleInfo = FFW.RPCObserver.create( {
-
- /**
- * If true then VehicleInfo is present and ready to communicate with SDL.
- *
- * @type {Boolean}
- */
- isReady: true,
-
- /**
- * access to basic RPC functionality
- */
- client: FFW.RPCClient.create( {
- componentName: "VehicleInfo"
- }),
-
- /**
- * connect to RPC bus
- */
- connect: function() {
-
- this.client.connect(this, 700); // Magic number is unique identifier for
- // component
- },
-
- /**
- * disconnect from RPC bus
- */
- disconnect: function() {
-
- this.client.disconnect();
- },
-
- /**
- * Client is registered - we can send request starting from this point of
- * time
- */
- onRPCRegistered: function() {
-
- Em.Logger.log("FFW.VehicleInfo.onRPCRegistered");
- this._super();
- },
-
- /**
- * Client is unregistered - no more requests
- */
- onRPCUnregistered: function() {
-
- Em.Logger.log("FFW.VehicleInfo.onRPCUnregistered");
- this._super();
- },
-
- /**
- * Client disconnected.
- */
- onRPCDisconnected: function() {
-
- },
-
- /**
- * when result is received from RPC component this function is called It is
- * the propriate place to check results of reuqest execution Please use
- * previously store reuqestID to determine to which request repsonse belongs
- * to
- */
- onRPCResult: function(response) {
-
- Em.Logger.log("FFW.VehicleInfo.onRPCResult");
- this._super();
- },
-
- /**
- * handle RPC erros here
- */
- onRPCError: function(error) {
-
- Em.Logger.log("FFW.VehicleInfo.onRPCError");
- this._super();
- },
-
- /**
- * handle RPC notifications here
- */
- onRPCNotification: function(notification) {
-
- Em.Logger.log("FFW.VehicleInfo.onRPCNotification");
- this._super();
- },
-
- /**
- * handle RPC requests here
- *
- * @type {Object} request
- */
- onRPCRequest: function(request) {
-
- Em.Logger.log("FFW.VehicleInfo.onRPCRequest");
- if (this.validationCheck(request)) {
-
- switch (request.method) {
- case "VehicleInfo.GetVehicleData": {
-
- SDL.SDLVehicleInfoModel.getVehicleData(request);
-
- break;
- }
-
- case "VehicleInfo.ReadDID": {
-
- SDL.SDLVehicleInfoModel.vehicleInfoReadDID(request.params,
- request.id);
-
- break;
- }
-
- case "VehicleInfo.GetDTCs": {
-
- SDL.SDLVehicleInfoModel.vehicleInfoGetDTCs(request.params,
- request.id);
-
- break;
- }
-
- case "VehicleInfo.DiagnosticMessage": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "messageDataResult": [200],
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "VehicleInfo.DiagnosticMessage"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
-
- break;
- }
-
- case "VehicleInfo.SubscribeVehicleData": {
-
- SDL.SDLVehicleInfoModel.SubscribeVehicleData(request);
-
- break;
- }
-
- case "VehicleInfo.UnsubscribeVehicleData": {
-
- SDL.SDLVehicleInfoModel.UnsubscribeVehicleData(request);
-
- break;
- }
-
- case "VehicleInfo.GetVehicleType": {
-
- SDL.SDLVehicleInfoModel.getVehicleType(request.id);
-
- break;
- }
-
- case "VehicleInfo.IsReady": {
-
- Em.Logger.log("FFW." + request.method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": request.id,
- "result": {
- "available": this.get('isReady'),
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "VehicleInfo.IsReady"
- }
- };
-
- this.client.send(JSONMessage);
-
- break;
- }
-
- default: {
- // statements_def
- break;
- }
- }
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendError: function(resultCode, id, method, message) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": {
- "method": method
- }
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Send response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendVIResult: function(resultCode, id, method) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": resultCode,
- "method": method
- }
- };
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Send response from onRPCRequest
- *
- * @param {Number} resultCode
- * @param {Number} id
- * @param {String} method
- * @param {Object} data
- */
- sendVISubscribeVehicleDataResult: function(resultCode, id, method, data) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode === SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": data
- };
-
- JSONMessage.result.code = resultCode;
- JSONMessage.result.method = method;
-
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendGetVehicleDataError: function(resultCode, id, method, message, data) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- if (resultCode != SDL.SDLModel.resultCode["SUCCESS"]) {
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "error": {
- "code": resultCode, // type (enum) from SDL protocol
- "message": message,
- "data": data
- }
- };
-
- JSONMessage.error.data.method = method;
- this.client.send(JSONMessage);
- }
- },
-
- /**
- * Send error response from onRPCRequest
- *
- * @param {Number}
- * resultCode
- * @param {Number}
- * id
- * @param {String}
- * method
- */
- sendGetVehicleDataResut: function(resultCode, id, method, data) {
-
- Em.Logger.log("FFW." + method + "Response");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": data
- };
- JSONMessage.result.code = resultCode;
- JSONMessage.result.method = method;
- this.client.send(JSONMessage);
- },
-
- /**
- * Notifies if data was changed
- *
- * @type {Object} params
- */
- OnVehicleData: function(params) {
-
- Em.Logger.log("FFW.VehicleInfo.OnVehicleData");
-
- // send repsonse
- var JSONMessage = {
- "jsonrpc": "2.0",
- "method": "VehicleInfo.OnVehicleData",
- "params": params
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * GetVehicleType Response
- *
- * @type {string} vehicleType
- * @type {int} id
- */
- GetVehicleTypeResponse: function(vehicleType, id) {
-
- Em.Logger.log("FFW.VehicleInfo.GetVehicleTypeResponse");
-
- var JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": SDL.SDLModel.resultCode["SUCCESS"],
- "method": "VehicleInfo.GetVehicleType",
- "vehicleType": vehicleType
- }
- };
-
- this.client.send(JSONMessage);
- },
-
- /**
- * ReadDID Response
- *
- * @type {array} dataResult
- * @type {array} data
- * @type {string} info
- * @type {string} result
- * @type {int} id
- */
- vehicleInfoReadDIDResponse: function(didResult, resultCode, id) {
-
- Em.Logger.log("FFW.VehicleInfo.ReadDIDResponse");
-
- var JSONMessage;
- // send repsonse
- JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": SDL.SDLModel.resultCode[resultCode], // type (enum)
- // from SDL
- // protocol
- "method": "VehicleInfo.ReadDID",
- "didResult": didResult
- }
- };
- this.client.send(JSONMessage);
- },
-
- /**
- * GetDTCs Response
- *
- * @type {Number} ecuHeader
- * @type {Array} dtc
- * @type {String} result
- * @type {Number} id
- */
- vehicleInfoGetDTCsResponse: function(ecuHeader, dtc, result, id) {
-
- Em.Logger.log("FFW.VehicleInfo.GetDTCsResponse");
-
- var JSONMessage;
- // send repsonse
- JSONMessage = {
- "jsonrpc": "2.0",
- "id": id,
- "result": {
- "code": SDL.SDLModel.resultCode[result], // type (enum) from
- // SDL protocol
- "method": "VehicleInfo.GetDTCs",
- "ecuHeader": ecuHeader,
- "dtc": dtc
- }
- };
-
- this.client.send(JSONMessage);
- }
-}) \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/ffw/WebSocket.js b/SDL_Core/src/components/HMI/ffw/WebSocket.js
deleted file mode 100644
index 7b508b406..000000000
--- a/SDL_Core/src/components/HMI/ffw/WebSocket.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * WebSocket interface mockup
- *
- * Android WebView and browser don't support WebSocket This class provides
- * interface mockup to have seamless code for different platforms
- * JavaScriptFacade is used instead of real WebSocket connection
- *
- */
-
-FFW.WebSocket = Em.Object.extend( {
-
- readyState: 1,
-
- /*
- * add observer of messages from Android
- */
- init: function() {
-
- FFW.WebSocketSimulator.addClient(this);
- },
-
- /*
- * remove observer of Android messages on connection close
- */
- close: function() {
-
- FFW.WebSocketSimulator.removeClient(this);
- // simulate connection is closed
- this.onclose(null);
- },
-
- /*
- * send message to Android native code Java Script facade is used instead of
- * real WebSocket connection
- */
- send: function(jsonMessage) {
-
- FFW.WebSocketSimulator.send(this.clientName, jsonMessage);
- },
-
- // handlers for web socket events
- onclose: null,
- onerror: null,
- onmessage: null,
- onopen: null,
-
- /*
- * used for identification of sender and receiver of particular message
- * from/to Android
- */
- clientName: ''
-});
diff --git a/SDL_Core/src/components/HMI/images/common/arr-r-disable.png b/SDL_Core/src/components/HMI/images/common/arr-r-disable.png
deleted file mode 100644
index acdfb56f9..000000000
--- a/SDL_Core/src/components/HMI/images/common/arr-r-disable.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/arr-r.png b/SDL_Core/src/components/HMI/images/common/arr-r.png
deleted file mode 100644
index 05d8e9797..000000000
--- a/SDL_Core/src/components/HMI/images/common/arr-r.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/arrow_ico.png b/SDL_Core/src/components/HMI/images/common/arrow_ico.png
deleted file mode 100644
index 97126966d..000000000
--- a/SDL_Core/src/components/HMI/images/common/arrow_ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/bt_bg.png b/SDL_Core/src/components/HMI/images/common/bt_bg.png
deleted file mode 100644
index b69267e44..000000000
--- a/SDL_Core/src/components/HMI/images/common/bt_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/bt_bg_pressed.png b/SDL_Core/src/components/HMI/images/common/bt_bg_pressed.png
deleted file mode 100644
index acd4acbac..000000000
--- a/SDL_Core/src/components/HMI/images/common/bt_bg_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-28h-gray-active.png b/SDL_Core/src/components/HMI/images/common/btn-28h-gray-active.png
deleted file mode 100644
index 2b4b2ee0a..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-28h-gray-active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-28h.png b/SDL_Core/src/components/HMI/images/common/btn-28h.png
deleted file mode 100644
index 034c061be..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-28h.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-48h-active-gray.png b/SDL_Core/src/components/HMI/images/common/btn-48h-active-gray.png
deleted file mode 100644
index 3faeff3d7..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-48h-active-gray.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-48h-active.png b/SDL_Core/src/components/HMI/images/common/btn-48h-active.png
deleted file mode 100644
index 9515a2172..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-48h-active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-48h-pressed.png b/SDL_Core/src/components/HMI/images/common/btn-48h-pressed.png
deleted file mode 100644
index 8f62dd087..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-48h-pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-48h.png b/SDL_Core/src/components/HMI/images/common/btn-48h.png
deleted file mode 100644
index 89fe73bf3..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-48h.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/btn-98h.png b/SDL_Core/src/components/HMI/images/common/btn-98h.png
deleted file mode 100644
index be25c0c45..000000000
--- a/SDL_Core/src/components/HMI/images/common/btn-98h.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/button.png b/SDL_Core/src/components/HMI/images/common/button.png
deleted file mode 100644
index 04144a6d6..000000000
--- a/SDL_Core/src/components/HMI/images/common/button.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/button_active_blue.png b/SDL_Core/src/components/HMI/images/common/button_active_blue.png
deleted file mode 100644
index e8f661903..000000000
--- a/SDL_Core/src/components/HMI/images/common/button_active_blue.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/button_large.png b/SDL_Core/src/components/HMI/images/common/button_large.png
deleted file mode 100644
index 737f96262..000000000
--- a/SDL_Core/src/components/HMI/images/common/button_large.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/button_small.png b/SDL_Core/src/components/HMI/images/common/button_small.png
deleted file mode 100644
index 3f8ec3448..000000000
--- a/SDL_Core/src/components/HMI/images/common/button_small.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/center-button-150.png b/SDL_Core/src/components/HMI/images/common/center-button-150.png
deleted file mode 100644
index a696c3ca6..000000000
--- a/SDL_Core/src/components/HMI/images/common/center-button-150.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/center-button.png b/SDL_Core/src/components/HMI/images/common/center-button.png
deleted file mode 100644
index fd407b735..000000000
--- a/SDL_Core/src/components/HMI/images/common/center-button.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/climate-status-bg.png b/SDL_Core/src/components/HMI/images/common/climate-status-bg.png
deleted file mode 100644
index dbdddddd5..000000000
--- a/SDL_Core/src/components/HMI/images/common/climate-status-bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/delim.png b/SDL_Core/src/components/HMI/images/common/delim.png
deleted file mode 100644
index 98e651666..000000000
--- a/SDL_Core/src/components/HMI/images/common/delim.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/divider.png b/SDL_Core/src/components/HMI/images/common/divider.png
deleted file mode 100644
index c567e5ef2..000000000
--- a/SDL_Core/src/components/HMI/images/common/divider.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/header_bg.png b/SDL_Core/src/components/HMI/images/common/header_bg.png
deleted file mode 100644
index f2752149f..000000000
--- a/SDL_Core/src/components/HMI/images/common/header_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/ico_back.png b/SDL_Core/src/components/HMI/images/common/ico_back.png
deleted file mode 100644
index f2cdf410e..000000000
--- a/SDL_Core/src/components/HMI/images/common/ico_back.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/ind_vert_active.png b/SDL_Core/src/components/HMI/images/common/ind_vert_active.png
deleted file mode 100644
index 526fc2746..000000000
--- a/SDL_Core/src/components/HMI/images/common/ind_vert_active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/ind_vert_def.png b/SDL_Core/src/components/HMI/images/common/ind_vert_def.png
deleted file mode 100644
index 594852cd1..000000000
--- a/SDL_Core/src/components/HMI/images/common/ind_vert_def.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/ls_border.png b/SDL_Core/src/components/HMI/images/common/ls_border.png
deleted file mode 100644
index d59d3afbb..000000000
--- a/SDL_Core/src/components/HMI/images/common/ls_border.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/media-status-bg.png b/SDL_Core/src/components/HMI/images/common/media-status-bg.png
deleted file mode 100644
index b48786c04..000000000
--- a/SDL_Core/src/components/HMI/images/common/media-status-bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/minus-ico.png b/SDL_Core/src/components/HMI/images/common/minus-ico.png
deleted file mode 100644
index a5fd7585a..000000000
--- a/SDL_Core/src/components/HMI/images/common/minus-ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/nav-status-bg.png b/SDL_Core/src/components/HMI/images/common/nav-status-bg.png
deleted file mode 100644
index afe2168ca..000000000
--- a/SDL_Core/src/components/HMI/images/common/nav-status-bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/okbut.png b/SDL_Core/src/components/HMI/images/common/okbut.png
deleted file mode 100644
index 7762204aa..000000000
--- a/SDL_Core/src/components/HMI/images/common/okbut.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/okbut_pressed.png b/SDL_Core/src/components/HMI/images/common/okbut_pressed.png
deleted file mode 100644
index 7f3262f2d..000000000
--- a/SDL_Core/src/components/HMI/images/common/okbut_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/page-back-button.png b/SDL_Core/src/components/HMI/images/common/page-back-button.png
deleted file mode 100644
index 8cc6ad971..000000000
--- a/SDL_Core/src/components/HMI/images/common/page-back-button.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/phone-statusbar-bg.png b/SDL_Core/src/components/HMI/images/common/phone-statusbar-bg.png
deleted file mode 100644
index 1d63f4898..000000000
--- a/SDL_Core/src/components/HMI/images/common/phone-statusbar-bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/plus-ico.png b/SDL_Core/src/components/HMI/images/common/plus-ico.png
deleted file mode 100644
index 3a3aa2181..000000000
--- a/SDL_Core/src/components/HMI/images/common/plus-ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/scroll_down.png b/SDL_Core/src/components/HMI/images/common/scroll_down.png
deleted file mode 100644
index d16060531..000000000
--- a/SDL_Core/src/components/HMI/images/common/scroll_down.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/scroll_down_active.png b/SDL_Core/src/components/HMI/images/common/scroll_down_active.png
deleted file mode 100644
index f609ecae6..000000000
--- a/SDL_Core/src/components/HMI/images/common/scroll_down_active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/scroll_down_inactive.png b/SDL_Core/src/components/HMI/images/common/scroll_down_inactive.png
deleted file mode 100644
index 418379f0b..000000000
--- a/SDL_Core/src/components/HMI/images/common/scroll_down_inactive.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/scroll_up.png b/SDL_Core/src/components/HMI/images/common/scroll_up.png
deleted file mode 100644
index 6ae4d6836..000000000
--- a/SDL_Core/src/components/HMI/images/common/scroll_up.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/scroll_up_inactive.png b/SDL_Core/src/components/HMI/images/common/scroll_up_inactive.png
deleted file mode 100644
index 328ed7a3a..000000000
--- a/SDL_Core/src/components/HMI/images/common/scroll_up_inactive.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/seat-act-led.png b/SDL_Core/src/components/HMI/images/common/seat-act-led.png
deleted file mode 100644
index 7acb61359..000000000
--- a/SDL_Core/src/components/HMI/images/common/seat-act-led.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/seat-inact-led.png b/SDL_Core/src/components/HMI/images/common/seat-inact-led.png
deleted file mode 100644
index 40a57e2cc..000000000
--- a/SDL_Core/src/components/HMI/images/common/seat-inact-led.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/skipbuttonbg.png b/SDL_Core/src/components/HMI/images/common/skipbuttonbg.png
deleted file mode 100644
index 9e3b4e97a..000000000
--- a/SDL_Core/src/components/HMI/images/common/skipbuttonbg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/skippbuttonbg_pressed.png b/SDL_Core/src/components/HMI/images/common/skippbuttonbg_pressed.png
deleted file mode 100644
index 27c2a52ce..000000000
--- a/SDL_Core/src/components/HMI/images/common/skippbuttonbg_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/system_settings_btn_bg.png b/SDL_Core/src/components/HMI/images/common/system_settings_btn_bg.png
deleted file mode 100644
index ca8a268dd..000000000
--- a/SDL_Core/src/components/HMI/images/common/system_settings_btn_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/system_settings_btn_bg_active.png b/SDL_Core/src/components/HMI/images/common/system_settings_btn_bg_active.png
deleted file mode 100644
index b53bd11e8..000000000
--- a/SDL_Core/src/components/HMI/images/common/system_settings_btn_bg_active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/system_settings_btn_h54.png b/SDL_Core/src/components/HMI/images/common/system_settings_btn_h54.png
deleted file mode 100644
index 1da632450..000000000
--- a/SDL_Core/src/components/HMI/images/common/system_settings_btn_h54.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/common/toggle.png b/SDL_Core/src/components/HMI/images/common/toggle.png
deleted file mode 100644
index 7162ad36b..000000000
--- a/SDL_Core/src/components/HMI/images/common/toggle.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/bottom_controlls_full.png b/SDL_Core/src/components/HMI/images/home/bottom_controlls_full.png
deleted file mode 100644
index 3fc22b56f..000000000
--- a/SDL_Core/src/components/HMI/images/home/bottom_controlls_full.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/DownButton.png b/SDL_Core/src/components/HMI/images/home/controlButtons/DownButton.png
deleted file mode 100644
index 66e3cc5a7..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/DownButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/DownButton_pressed.png b/SDL_Core/src/components/HMI/images/home/controlButtons/DownButton_pressed.png
deleted file mode 100644
index b23b07780..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/DownButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton.png b/SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton.png
deleted file mode 100644
index a33a09f94..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton_pressed.png b/SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton_pressed.png
deleted file mode 100644
index fbc15a584..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/LeftButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/OkButton.png b/SDL_Core/src/components/HMI/images/home/controlButtons/OkButton.png
deleted file mode 100644
index 809f719de..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/OkButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/OkButton_pressed.png b/SDL_Core/src/components/HMI/images/home/controlButtons/OkButton_pressed.png
deleted file mode 100644
index 2902de6a3..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/OkButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/RightButton.png b/SDL_Core/src/components/HMI/images/home/controlButtons/RightButton.png
deleted file mode 100644
index 35da46f26..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/RightButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/RightButton_pressed.png b/SDL_Core/src/components/HMI/images/home/controlButtons/RightButton_pressed.png
deleted file mode 100644
index 3a3d247ff..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/RightButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/UpButton.png b/SDL_Core/src/components/HMI/images/home/controlButtons/UpButton.png
deleted file mode 100644
index 58407ce9e..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/UpButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/UpButton_pressed.png b/SDL_Core/src/components/HMI/images/home/controlButtons/UpButton_pressed.png
deleted file mode 100644
index 7b853cb2a..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/UpButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/backGroundControllButtons.png b/SDL_Core/src/components/HMI/images/home/controlButtons/backGroundControllButtons.png
deleted file mode 100644
index 041d49e7e..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/backGroundControllButtons.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/vr.png b/SDL_Core/src/components/HMI/images/home/controlButtons/vr.png
deleted file mode 100644
index af09282df..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/vr.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/vrImage.png b/SDL_Core/src/components/HMI/images/home/controlButtons/vrImage.png
deleted file mode 100644
index 2f6bac2d9..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/vrImage.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/controlButtons/vr_pressed.png b/SDL_Core/src/components/HMI/images/home/controlButtons/vr_pressed.png
deleted file mode 100644
index 9206e42a9..000000000
--- a/SDL_Core/src/components/HMI/images/home/controlButtons/vr_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/home_main_image.png b/SDL_Core/src/components/HMI/images/home/home_main_image.png
deleted file mode 100644
index e1b830fbe..000000000
--- a/SDL_Core/src/components/HMI/images/home/home_main_image.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/home/home_phone.png b/SDL_Core/src/components/HMI/images/home/home_phone.png
deleted file mode 100644
index dfdd0a577..000000000
--- a/SDL_Core/src/components/HMI/images/home/home_phone.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/callendar-btn.png b/SDL_Core/src/components/HMI/images/info/callendar-btn.png
deleted file mode 100644
index c193f0f21..000000000
--- a/SDL_Core/src/components/HMI/images/info/callendar-btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/ico_assist.png b/SDL_Core/src/components/HMI/images/info/ico_assist.png
deleted file mode 100644
index 1abb26dc1..000000000
--- a/SDL_Core/src/components/HMI/images/info/ico_assist.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/ico_info_install.png b/SDL_Core/src/components/HMI/images/info/ico_info_install.png
deleted file mode 100644
index 5c9d93ad2..000000000
--- a/SDL_Core/src/components/HMI/images/info/ico_info_install.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/ico_vehicle.png b/SDL_Core/src/components/HMI/images/info/ico_vehicle.png
deleted file mode 100644
index c4ca30f96..000000000
--- a/SDL_Core/src/components/HMI/images/info/ico_vehicle.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/info_leftMenu_apps_ico.png b/SDL_Core/src/components/HMI/images/info/info_leftMenu_apps_ico.png
deleted file mode 100644
index 7f648c9a0..000000000
--- a/SDL_Core/src/components/HMI/images/info/info_leftMenu_apps_ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/info_leftMenu_calendar_ico.png b/SDL_Core/src/components/HMI/images/info/info_leftMenu_calendar_ico.png
deleted file mode 100644
index 6fb5aec3e..000000000
--- a/SDL_Core/src/components/HMI/images/info/info_leftMenu_calendar_ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/info_leftMenu_services_ico.png b/SDL_Core/src/components/HMI/images/info/info_leftMenu_services_ico.png
deleted file mode 100644
index de36255aa..000000000
--- a/SDL_Core/src/components/HMI/images/info/info_leftMenu_services_ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/info_leftMenu_travelLink_ico.png b/SDL_Core/src/components/HMI/images/info/info_leftMenu_travelLink_ico.png
deleted file mode 100644
index 4235c92d0..000000000
--- a/SDL_Core/src/components/HMI/images/info/info_leftMenu_travelLink_ico.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/info_services_bg.png b/SDL_Core/src/components/HMI/images/info/info_services_bg.png
deleted file mode 100644
index ef082c739..000000000
--- a/SDL_Core/src/components/HMI/images/info/info_services_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/info_travelLink_sirius_logo.png b/SDL_Core/src/components/HMI/images/info/info_travelLink_sirius_logo.png
deleted file mode 100644
index 0eb328c9c..000000000
--- a/SDL_Core/src/components/HMI/images/info/info_travelLink_sirius_logo.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/menu_active.png b/SDL_Core/src/components/HMI/images/info/menu_active.png
deleted file mode 100644
index b4cf7277a..000000000
--- a/SDL_Core/src/components/HMI/images/info/menu_active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/info/view_info_calendar.png b/SDL_Core/src/components/HMI/images/info/view_info_calendar.png
deleted file mode 100644
index 9e09ae9d6..000000000
--- a/SDL_Core/src/components/HMI/images/info/view_info_calendar.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/list/list_item_bg.png b/SDL_Core/src/components/HMI/images/list/list_item_bg.png
deleted file mode 100644
index f5cdcbe34..000000000
--- a/SDL_Core/src/components/HMI/images/list/list_item_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/list/list_item_pressed.png b/SDL_Core/src/components/HMI/images/list/list_item_pressed.png
deleted file mode 100644
index 593d697a0..000000000
--- a/SDL_Core/src/components/HMI/images/list/list_item_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/list/scrollbar/button-down-active.png b/SDL_Core/src/components/HMI/images/list/scrollbar/button-down-active.png
deleted file mode 100644
index bcd52150b..000000000
--- a/SDL_Core/src/components/HMI/images/list/scrollbar/button-down-active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/list/scrollbar/button-up-active.png b/SDL_Core/src/components/HMI/images/list/scrollbar/button-up-active.png
deleted file mode 100644
index 5d1bb3f07..000000000
--- a/SDL_Core/src/components/HMI/images/list/scrollbar/button-up-active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/bcs-item_bgL.png b/SDL_Core/src/components/HMI/images/media/bcs-item_bgL.png
deleted file mode 100644
index cbb8dc44b..000000000
--- a/SDL_Core/src/components/HMI/images/media/bcs-item_bgL.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/bcs-item_bgL_pressed.png b/SDL_Core/src/components/HMI/images/media/bcs-item_bgL_pressed.png
deleted file mode 100644
index e69de29bb..000000000
--- a/SDL_Core/src/components/HMI/images/media/bcs-item_bgL_pressed.png
+++ /dev/null
diff --git a/SDL_Core/src/components/HMI/images/media/bcs-item_bgR.png b/SDL_Core/src/components/HMI/images/media/bcs-item_bgR.png
deleted file mode 100644
index e9aef9089..000000000
--- a/SDL_Core/src/components/HMI/images/media/bcs-item_bgR.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/bcs-item_bgR_pressed.png b/SDL_Core/src/components/HMI/images/media/bcs-item_bgR_pressed.png
deleted file mode 100644
index d7c3f961c..000000000
--- a/SDL_Core/src/components/HMI/images/media/bcs-item_bgR_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/bcs-item_bgS.png b/SDL_Core/src/components/HMI/images/media/bcs-item_bgS.png
deleted file mode 100644
index 54d70b7f0..000000000
--- a/SDL_Core/src/components/HMI/images/media/bcs-item_bgS.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/bcs-item_bgS_pressed.png b/SDL_Core/src/components/HMI/images/media/bcs-item_bgS_pressed.png
deleted file mode 100644
index 8c1563af9..000000000
--- a/SDL_Core/src/components/HMI/images/media/bcs-item_bgS_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/bg.png b/SDL_Core/src/components/HMI/images/media/bg.png
deleted file mode 100644
index b0c24355f..000000000
--- a/SDL_Core/src/components/HMI/images/media/bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/btn_bg.png b/SDL_Core/src/components/HMI/images/media/btn_bg.png
deleted file mode 100644
index 9713aab1e..000000000
--- a/SDL_Core/src/components/HMI/images/media/btn_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/cd-next-btn.png b/SDL_Core/src/components/HMI/images/media/cd-next-btn.png
deleted file mode 100644
index 1973292d4..000000000
--- a/SDL_Core/src/components/HMI/images/media/cd-next-btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/cd-next-btn_pressed.png b/SDL_Core/src/components/HMI/images/media/cd-next-btn_pressed.png
deleted file mode 100644
index 8cb1391b8..000000000
--- a/SDL_Core/src/components/HMI/images/media/cd-next-btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/cd-prev-btn.png b/SDL_Core/src/components/HMI/images/media/cd-prev-btn.png
deleted file mode 100644
index 8bdd67d8f..000000000
--- a/SDL_Core/src/components/HMI/images/media/cd-prev-btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/cd-prev-btn_pressed.png b/SDL_Core/src/components/HMI/images/media/cd-prev-btn_pressed.png
deleted file mode 100644
index 3dbdbb9c8..000000000
--- a/SDL_Core/src/components/HMI/images/media/cd-prev-btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/cd_play_btn.png b/SDL_Core/src/components/HMI/images/media/cd_play_btn.png
deleted file mode 100644
index d183119f2..000000000
--- a/SDL_Core/src/components/HMI/images/media/cd_play_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/divider_o.png b/SDL_Core/src/components/HMI/images/media/divider_o.png
deleted file mode 100644
index 38cb6bc8e..000000000
--- a/SDL_Core/src/components/HMI/images/media/divider_o.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico-play.png b/SDL_Core/src/components/HMI/images/media/ico-play.png
deleted file mode 100644
index 5e746174c..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico-play.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_arrow_down.png b/SDL_Core/src/components/HMI/images/media/ico_arrow_down.png
deleted file mode 100644
index 609e4a16c..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_arrow_up.png b/SDL_Core/src/components/HMI/images/media/ico_arrow_up.png
deleted file mode 100644
index 09b9610f2..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_back.png b/SDL_Core/src/components/HMI/images/media/ico_back.png
deleted file mode 100644
index f2cdf410e..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_back.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_cd.png b/SDL_Core/src/components/HMI/images/media/ico_cd.png
deleted file mode 100644
index b482408f2..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_cd.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_next.png b/SDL_Core/src/components/HMI/images/media/ico_next.png
deleted file mode 100644
index 24c19d2bf..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_next.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_pause.png b/SDL_Core/src/components/HMI/images/media/ico_pause.png
deleted file mode 100644
index d885c1203..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_pause.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ico_prew.png b/SDL_Core/src/components/HMI/images/media/ico_prew.png
deleted file mode 100644
index a079f6705..000000000
--- a/SDL_Core/src/components/HMI/images/media/ico_prew.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ls-item_bg.png b/SDL_Core/src/components/HMI/images/media/ls-item_bg.png
deleted file mode 100644
index 3863e15c7..000000000
--- a/SDL_Core/src/components/HMI/images/media/ls-item_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/ls-item_bg_act.png b/SDL_Core/src/components/HMI/images/media/ls-item_bg_act.png
deleted file mode 100644
index 7b52318a4..000000000
--- a/SDL_Core/src/components/HMI/images/media/ls-item_bg_act.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/media/player_view.png b/SDL_Core/src/components/HMI/images/media/player_view.png
deleted file mode 100644
index fec0f3193..000000000
--- a/SDL_Core/src/components/HMI/images/media/player_view.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/bg.png b/SDL_Core/src/components/HMI/images/phone/bg.png
deleted file mode 100644
index ffcf3e667..000000000
--- a/SDL_Core/src/components/HMI/images/phone/bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/del.png b/SDL_Core/src/components/HMI/images/phone/del.png
deleted file mode 100644
index 714b1edb6..000000000
--- a/SDL_Core/src/components/HMI/images/phone/del.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/dial.png b/SDL_Core/src/components/HMI/images/phone/dial.png
deleted file mode 100644
index 56b95bfdb..000000000
--- a/SDL_Core/src/components/HMI/images/phone/dial.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/end.png b/SDL_Core/src/components/HMI/images/phone/end.png
deleted file mode 100644
index 2d622bcc7..000000000
--- a/SDL_Core/src/components/HMI/images/phone/end.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/ico_phone.png b/SDL_Core/src/components/HMI/images/phone/ico_phone.png
deleted file mode 100644
index 68bcf408d..000000000
--- a/SDL_Core/src/components/HMI/images/phone/ico_phone.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/keypad/center_btn.png b/SDL_Core/src/components/HMI/images/phone/keypad/center_btn.png
deleted file mode 100644
index 9661ecd18..000000000
--- a/SDL_Core/src/components/HMI/images/phone/keypad/center_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/keypad/center_btn_pressed.png b/SDL_Core/src/components/HMI/images/phone/keypad/center_btn_pressed.png
deleted file mode 100644
index 42ac69bb2..000000000
--- a/SDL_Core/src/components/HMI/images/phone/keypad/center_btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/keypad/left_btn.png b/SDL_Core/src/components/HMI/images/phone/keypad/left_btn.png
deleted file mode 100644
index d043b4255..000000000
--- a/SDL_Core/src/components/HMI/images/phone/keypad/left_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/keypad/left_btn_pressed.png b/SDL_Core/src/components/HMI/images/phone/keypad/left_btn_pressed.png
deleted file mode 100644
index 287c1eaba..000000000
--- a/SDL_Core/src/components/HMI/images/phone/keypad/left_btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/keypad/right_btn.png b/SDL_Core/src/components/HMI/images/phone/keypad/right_btn.png
deleted file mode 100644
index 30f7ec9a9..000000000
--- a/SDL_Core/src/components/HMI/images/phone/keypad/right_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/keypad/right_btn_pressed.png b/SDL_Core/src/components/HMI/images/phone/keypad/right_btn_pressed.png
deleted file mode 100644
index 9f67dd001..000000000
--- a/SDL_Core/src/components/HMI/images/phone/keypad/right_btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/menu_active.png b/SDL_Core/src/components/HMI/images/phone/menu_active.png
deleted file mode 100644
index 776e857b5..000000000
--- a/SDL_Core/src/components/HMI/images/phone/menu_active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/phone/menu_bg.png b/SDL_Core/src/components/HMI/images/phone/menu_bg.png
deleted file mode 100644
index 7de8abeb7..000000000
--- a/SDL_Core/src/components/HMI/images/phone/menu_bg.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/sdl/Warning.png b/SDL_Core/src/components/HMI/images/sdl/Warning.png
deleted file mode 100644
index c91cd31d3..000000000
--- a/SDL_Core/src/components/HMI/images/sdl/Warning.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/sdl/audio_icon.jpg b/SDL_Core/src/components/HMI/images/sdl/audio_icon.jpg
deleted file mode 100644
index 22efcfa9d..000000000
--- a/SDL_Core/src/components/HMI/images/sdl/audio_icon.jpg
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/sdl/devices.png b/SDL_Core/src/components/HMI/images/sdl/devices.png
deleted file mode 100644
index 91979c58e..000000000
--- a/SDL_Core/src/components/HMI/images/sdl/devices.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/sdl/new_apps.png b/SDL_Core/src/components/HMI/images/sdl/new_apps.png
deleted file mode 100644
index 85a75c263..000000000
--- a/SDL_Core/src/components/HMI/images/sdl/new_apps.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/sdl/progress.gif b/SDL_Core/src/components/HMI/images/sdl/progress.gif
deleted file mode 100644
index 37690fa5b..000000000
--- a/SDL_Core/src/components/HMI/images/sdl/progress.gif
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/images/sdl/progressindicator.gif b/SDL_Core/src/components/HMI/images/sdl/progressindicator.gif
deleted file mode 100644
index 77d358cae..000000000
--- a/SDL_Core/src/components/HMI/images/sdl/progressindicator.gif
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/HMI/index.html b/SDL_Core/src/components/HMI/index.html
deleted file mode 100644
index cab732fbe..000000000
--- a/SDL_Core/src/components/HMI/index.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" ontouchmove="event.preventDefault();"><html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Ford Smart Device HMI</title>
- <!--Styles-->
- <link rel="stylesheet" type="text/css" href="css/buttonControls.css" />
- <link rel="stylesheet" type="text/css" href="css/general.css" />
- <link rel="stylesheet" type="text/css" href="css/navigation.css" />
- <link rel="stylesheet" type="text/css" href="css/phone.css" />
- <link rel="stylesheet" type="text/css" href="css/info.css" />
- <link rel="stylesheet" type="text/css" href="css/media.css" />
- <link rel="stylesheet" type="text/css" href="css/sdl.css" />
-
- <!--Libs-->
-
- <script type="text/javascript" src="lib/handlebars-1.0.0.beta.6.js"></script>
-
- <!-- RELEASE's min versions -->
-
- <script type="text/javascript" src="lib/jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src="lib/ember-1.0.pre.min.js"></script>
- <script type="text/javascript" src="lib/iscroll-lite.js"></script>
-
-
- </head>
- <body ontouchmove="event.preventDefault();">
-
-
- <script type="text/javascript" src="app/Flags.js"></script>
-
- <!-- Framework -->
- <script type="text/javascript" src="ffw/Framework.js"></script>
- <script type="text/javascript" src="ffw/WebSocket.js"></script>
- <script type="text/javascript" src="ffw/RPCObserver.js"></script>
- <script type="text/javascript" src="ffw/RPCClient.js"></script>
- <script type="text/javascript" src="ffw/ButtonsRPC.js"></script>
- <script type="text/javascript" src="ffw/UIRPC.js"></script>
- <script type="text/javascript" src="ffw/NavigationRPC.js"></script>
- <script type="text/javascript" src="ffw/TTSRPC.js"></script>
- <script type="text/javascript" src="ffw/VRRPC.js"></script>
- <script type="text/javascript" src="ffw/VehicleInfoRPC.js"></script>
- <script type="text/javascript" src="ffw/BasicCommunicationRPC.js"></script>
-
- <!-- APP -->
- <script type="text/javascript" src="app/SDLApp.js"></script>
- <!-- locales -->
- <script type="text/javascript" src="locale/eng.js"></script>
- <script type="text/javascript" src="locale/locale.js"></script>
- <script type="text/javascript" src="app/view/WarningView.js"></script>
-
- <script type="text/x-handlebars">
- {{view SDL.warningView}}
- </script>
-
- <!-- UI controlls -->
- <script type="text/javascript" src="app/controlls/Button.js"></script>
- <script type="text/javascript" src="app/controlls/Label.js"></script>
- <script type="text/javascript" src="app/controlls/ScrollBar.js"></script>
- <script type="text/javascript" src="app/controlls/List.js"></script>
- <script type="text/javascript" src="app/controlls/Indicator.js"></script>
- <script type="text/javascript" src="app/controlls/QWERTYLayout.js"></script>
- <script type="text/javascript" src="app/controlls/QWERTZLayout.js"></script>
- <script type="text/javascript" src="app/controlls/AZERTYLayout.js"></script>
- <script type="text/javascript" src="app/controlls/MenuList.js"></script>
- <script type="text/javascript" src="app/controlls/ScrollableText.js"></script>
-
- <!-- utils -->
- <script type="text/javascript" src="app/util/Audio.js"></script>
- <script type="text/javascript" src="app/util/StreamAudio.js"></script>
-
- <!-- Models -->
-
- <script type="text/javascript" src="app/model/media/CDModel.js"></script>
-
- <script type="text/javascript" src="app/model/PhoneModel.js"></script>
-
- <!-- SDL models -->
- <script type="text/javascript" src="app/model/sdl/VehicleInfoModel.js"></script>
- <script type="text/javascript" src="app/model/sdl/AppModel.js"></script>
- <script type="text/javascript" src="app/model/sdl/NonMediaModel.js"></script>
- <script type="text/javascript" src="app/model/sdl/MediaModel.js"></script>
- <script type="text/javascript" src="app/model/sdl/Model.js"></script>
- <!-- SDL models END -->
-
- <!-- Controllers -->
- <!--script type="text/javascript" src="app/controller/AppController.js"></script-->
- <script type="text/javascript" src="app/controller/MediaController.js"></script>
- <script type="text/javascript" src="app/controller/PhoneController.js"></script>
- <script type="text/javascript" src="app/controller/InfoController.js"></script>
-
- <script type="text/javascript" src="app/controller/sdl/Controller.js"></script>
- <script type="text/javascript" src="app/controller/sdl/RPCController.js"></script>
- <script type="text/javascript" src="app/controller/sdl/AppController.js"></script>
- <script type="text/javascript" src="app/controller/sdl/NonMediaController.js"></script>
- <script type="text/javascript" src="app/controller/sdl/MediaController.js"></script>
-
- <!-- Mixins -->
- <script type="text/javascript" src="app/mixins/PresetEvents.js"></script>
- <script type="text/javascript" src="app/mixins/PresetEventCustom.js"></script>
-
- <!-- Views -->
-
- <!-- phone views -->
- <script type="text/javascript" src="app/view/phone/dialpadView.js"></script>
-
- <!-- media views -->
- <script type="text/javascript" src="app/view/media/sdl/controllsView.js"></script>
- <script type="text/javascript" src="app/view/media/common/LeftMenuView.js"></script>
- <script type="text/javascript" src="app/view/media/playerView.js"></script>
- <script type="text/javascript" src="app/view/media/sdlmediaView.js"></script>
-
- <!-- info views -->
- <script type="text/javascript" src="app/view/info/servicesView.js"></script>
- <script type="text/javascript" src="app/view/info/travelLinkView.js"></script>
- <script type="text/javascript" src="app/view/info/calendarView.js"></script>
- <script type="text/javascript" src="app/view/info/appsView.js"></script>
- <script type="text/javascript" src="app/view/info/devicelistView.js"></script>
- <script type="text/javascript" src="app/view/info/nonMediaView.js"></script>
-
- <script type="text/javascript" src="app/view/homeView.js"></script>
- <script type="text/javascript" src="app/view/mediaView.js"></script>
- <script type="text/javascript" src="app/view/infoView.js"></script>
- <script type="text/javascript" src="app/view/climateView.js"></script>
- <script type="text/javascript" src="app/view/phoneView.js"></script>
- <script type="text/javascript" src="app/view/navigationView.js"></script>
- <script type="text/javascript" src="app/view/settingsView.js"></script>
- <script type="text/javascript" src="app/view/navigationApp/baseNavigationView.js"></script>
- <script type="text/javascript" src="app/view/navigationAppView.js"></script>
-
- <!-- home views -->
- <script type="text/javascript" src="app/view/home/controlButtons.js"></script>
-
- <script type="text/javascript" src="app/view/home/topControls.js"></script>
- <script type="text/javascript" src="app/view/home/bottomControls.js"></script>
- <script type="text/javascript" src="app/view/home/statusMediaView.js"></script>
- <script type="text/javascript" src="app/view/home/statusPhoneView.js"></script>
- <script type="text/javascript" src="app/view/home/statusInfoView.js"></script>
- <script type="text/javascript" src="app/view/home/statusNavigationView.js"></script>
- <script type="text/javascript" src="app/view/home/statusClimateView.js"></script>
- <!-- SDL views -->
- <script type="text/javascript" src="app/view/sdl/shared/AbstractView.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/interactionChoicesView.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/sliderView.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/optionsView.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/scrollableMessage.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/turnByTurnView.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/tbtTurnList.js"></script>
- <script type="text/javascript" src="app/view/sdl/shared/keyboard.js"></script>
- <script type="text/javascript" src="app/view/sdl/TTSPopUp.js"></script>
- <script type="text/javascript" src="app/view/sdl/AlertPopUp.js"></script>
- <script type="text/javascript" src="app/view/sdl/AudioPassThruPopUp.js"></script>
- <script type="text/javascript" src="app/view/sdl/VRPopUp.js"></script>
- <script type="text/javascript" src="app/view/sdl/VehicleInfoView.js"></script>
- <script type="text/javascript" src="app/view/sdl/VRHelpListView.js"></script>
- <script type="text/javascript" src="app/view/sdl/tbtClientStateView.js"></script>
- <script type="text/javascript" src="app/view/sdl/driverDistraction.js"></script>
- <script type="text/javascript" src="app/view/sdl/ExitAppView.js"></script>
-
-
-
- <script type="text/javascript" src="app/StateManager.js"></script>
-
- <!-- STATE MACHINE -->
- <script type="text/javascript" src="app/AppViews.js"></script>
-
-
- <!-- Big Images Preloader block -->
- <div id="preloader">
- </div>
-
-
- </body>
-</html> \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/lib/ember-1.0.pre.js b/SDL_Core/src/components/HMI/lib/ember-1.0.pre.js
deleted file mode 100644
index dc2cb8447..000000000
--- a/SDL_Core/src/components/HMI/lib/ember-1.0.pre.js
+++ /dev/null
@@ -1,20709 +0,0 @@
-// Version: v1.0.pre
-// Last commit: 7955b85 (2012-08-03 14:50:17 -0700)
-
-
-(function() {
-/*global __fail__*/
-
-if ('undefined' === typeof Ember) {
- Ember = {};
-
- if ('undefined' !== typeof window) {
- window.Em = window.Ember = Em = Ember;
- }
-}
-
-Ember.ENV = 'undefined' === typeof ENV ? {} : ENV;
-
-if (!('MANDATORY_SETTER' in Ember.ENV)) {
- Ember.ENV.MANDATORY_SETTER = true; // default to true for debug dist
-}
-
-/**
- Define an assertion that will throw an exception if the condition is not
- met. Ember build tools will remove any calls to Ember.assert() when
- doing a production build. Example:
-
- // Test for truthiness
- Ember.assert('Must pass a valid object', obj);
- // Fail unconditionally
- Ember.assert('This code path should never be run')
-
- @static
- @function
- @param {String} desc
- A description of the assertion. This will become the text of the Error
- thrown if the assertion fails.
-
- @param {Boolean} test
- Must be truthy for the assertion to pass. If falsy, an exception will be
- thrown.
-*/
-Ember.assert = function(desc, test) {
- if (!test) throw new Error("assertion failed: "+desc);
-};
-
-
-/**
- Display a warning with the provided message. Ember build tools will
- remove any calls to Ember.warn() when doing a production build.
-
- @static
- @function
- @param {String} message
- A warning to display.
-
- @param {Boolean} test
- An optional boolean. If falsy, the warning will be displayed.
-*/
-Ember.warn = function(message, test) {
- if (!test) {
- Ember.Logger.warn("WARNING: "+message);
- if ('trace' in Ember.Logger) Ember.Logger.trace();
- }
-};
-
-/**
- Display a deprecation warning with the provided message and a stack trace
- (Chrome and Firefox only). Ember build tools will remove any calls to
- Ember.deprecate() when doing a production build.
-
- @static
- @function
- @param {String} message
- A description of the deprecation.
-
- @param {Boolean} test
- An optional boolean. If falsy, the deprecation will be displayed.
-*/
-Ember.deprecate = function(message, test) {
- if (Ember && Ember.TESTING_DEPRECATION) { return; }
-
- if (arguments.length === 1) { test = false; }
- if (test) { return; }
-
- if (Ember && Ember.ENV.RAISE_ON_DEPRECATION) { throw new Error(message); }
-
- var error;
-
- // When using new Error, we can't do the arguments check for Chrome. Alternatives are welcome
- try { __fail__.fail(); } catch (e) { error = e; }
-
- if (Ember.LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
- var stack, stackStr = '';
- if (error['arguments']) {
- // Chrome
- stack = error.stack.replace(/^\s+at\s+/gm, '').
- replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').
- replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n');
- stack.shift();
- } else {
- // Firefox
- stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').
- replace(/^\(/gm, '{anonymous}(').split('\n');
- }
-
- stackStr = "\n " + stack.slice(2).join("\n ");
- message = message + stackStr;
- }
-
- Ember.Logger.warn("DEPRECATION: "+message);
-};
-
-
-
-/**
- Display a deprecation warning with the provided message and a stack trace
- (Chrome and Firefox only) when the wrapped method is called.
-
- Ember build tools will not remove calls to Ember.deprecateFunc(), though
- no warnings will be shown in production.
-
- @static
- @function
- @param {String} message
- A description of the deprecation.
-
- @param {Function} func
- The function to be deprecated.
-*/
-Ember.deprecateFunc = function(message, func) {
- return function() {
- Ember.deprecate(message);
- return func.apply(this, arguments);
- };
-};
-
-
-window.ember_assert = Ember.deprecateFunc("ember_assert is deprecated. Please use Ember.assert instead.", Ember.assert);
-window.ember_warn = Ember.deprecateFunc("ember_warn is deprecated. Please use Ember.warn instead.", Ember.warn);
-window.ember_deprecate = Ember.deprecateFunc("ember_deprecate is deprecated. Please use Ember.deprecate instead.", Ember.deprecate);
-window.ember_deprecateFunc = Ember.deprecateFunc("ember_deprecateFunc is deprecated. Please use Ember.deprecateFunc instead.", Ember.deprecateFunc);
-
-})();
-
-// Version: v1.0.pre
-// Last commit: 7955b85 (2012-08-03 14:50:17 -0700)
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Em:true ENV */
-
-if ('undefined' === typeof Ember) {
- // Create core object. Make it act like an instance of Ember.Namespace so that
- // objects assigned to it are given a sane string representation.
- Ember = {};
-}
-
-/**
- @namespace
- @name Ember
- @version 1.0.pre
-
- All Ember methods and functions are defined inside of this namespace.
- You generally should not add new properties to this namespace as it may be
- overwritten by future versions of Ember.
-
- You can also use the shorthand "Em" instead of "Ember".
-
- Ember-Runtime is a framework that provides core functions for
- Ember including cross-platform functions, support for property
- observing and objects. Its focus is on small size and performance. You can
- use this in place of or along-side other cross-platform libraries such as
- jQuery.
-
- The core Runtime framework is based on the jQuery API with a number of
- performance optimizations.
-*/
-
-// aliases needed to keep minifiers from removing the global context
-if ('undefined' !== typeof window) {
- window.Em = window.Ember = Em = Ember;
-}
-
-// Make sure these are set whether Ember was already defined or not
-
-Ember.isNamespace = true;
-
-Ember.toString = function() { return "Ember"; };
-
-
-/**
- @static
- @type String
- @default '1.0.pre'
- @constant
-*/
-Ember.VERSION = '1.0.pre';
-
-/**
- @static
- @type Hash
- @constant
-
- Standard environmental variables. You can define these in a global `ENV`
- variable before loading Ember to control various configuration
- settings.
-*/
-Ember.ENV = Ember.ENV || ('undefined' === typeof ENV ? {} : ENV);
-
-Ember.config = Ember.config || {};
-
-// ..........................................................
-// BOOTSTRAP
-//
-
-/**
- @static
- @type Boolean
- @default true
- @constant
-
- Determines whether Ember should enhances some built-in object
- prototypes to provide a more friendly API. If enabled, a few methods
- will be added to Function, String, and Array. Object.prototype will not be
- enhanced, which is the one that causes most troubles for people.
-
- In general we recommend leaving this option set to true since it rarely
- conflicts with other code. If you need to turn it off however, you can
- define an ENV.EXTEND_PROTOTYPES config to disable it.
-*/
-Ember.EXTEND_PROTOTYPES = (Ember.ENV.EXTEND_PROTOTYPES !== false);
-
-/**
- @static
- @type Boolean
- @default true
- @constant
-
- Determines whether Ember logs a full stack trace during deprecation warnings
-*/
-Ember.LOG_STACKTRACE_ON_DEPRECATION = (Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION !== false);
-
-/**
- @static
- @type Boolean
- @default Ember.EXTEND_PROTOTYPES
- @constant
-
- Determines whether Ember should add ECMAScript 5 shims to older browsers.
-*/
-Ember.SHIM_ES5 = (Ember.ENV.SHIM_ES5 === false) ? false : Ember.EXTEND_PROTOTYPES;
-
-
-/**
- @static
- @type Boolean
- @default true
- @constant
-
- Determines whether computed properties are cacheable by default.
- This option will be removed for the 1.1 release.
-
- When caching is enabled by default, you can use `volatile()` to disable
- caching on individual computed properties.
-*/
-Ember.CP_DEFAULT_CACHEABLE = (Ember.ENV.CP_DEFAULT_CACHEABLE !== false);
-
-/**
- @static
- @type Boolean
- @default true
- @constant
-
- Determines whether views render their templates using themselves
- as the context, or whether it is inherited from the parent. This option
- will be removed in the 1.1 release.
-
- If you need to update your application to use the new context rules, simply
- prefix property access with `view.`:
-
- // Before:
- {{#each App.photosController}}
- Photo Title: {{title}}
- {{#view App.InfoView contentBinding="this"}}
- {{content.date}}
- {{content.cameraType}}
- {{otherViewProperty}}
- {{/view}}
- {{/each}}
-
- // After:
- {{#each App.photosController}}
- Photo Title: {{title}}
- {{#view App.InfoView}}
- {{date}}
- {{cameraType}}
- {{view.otherViewProperty}}
- {{/view}}
- {{/each}}
-*/
-Ember.VIEW_PRESERVES_CONTEXT = (Ember.ENV.VIEW_PRESERVES_CONTEXT !== false);
-
-/**
- Empty function. Useful for some operations.
-
- @returns {Object}
- @private
-*/
-Ember.K = function() { return this; };
-
-/**
- @namespace
- @name window
- @description The global window object
-*/
-
-
-// Stub out the methods defined by the ember-debug package in case it's not loaded
-
-if ('undefined' === typeof Ember.assert) { Ember.assert = Ember.K; }
-if ('undefined' === typeof Ember.warn) { Ember.warn = Ember.K; }
-if ('undefined' === typeof Ember.deprecate) { Ember.deprecate = Ember.K; }
-if ('undefined' === typeof Ember.deprecateFunc) {
- Ember.deprecateFunc = function(_, func) { return func; };
-}
-
-// These are deprecated but still supported
-
-if ('undefined' === typeof ember_assert) { window.ember_assert = Ember.K; }
-if ('undefined' === typeof ember_warn) { window.ember_warn = Ember.K; }
-if ('undefined' === typeof ember_deprecate) { window.ember_deprecate = Ember.K; }
-if ('undefined' === typeof ember_deprecateFunc) {
- /** @private */
- window.ember_deprecateFunc = function(_, func) { return func; };
-}
-
-
-// ..........................................................
-// LOGGER
-//
-
-/**
- @class
-
- Inside Ember-Metal, simply uses the window.console object.
- Override this to provide more robust logging functionality.
-*/
-Ember.Logger = window.console || { log: Ember.K, warn: Ember.K, error: Ember.K, info: Ember.K, debug: Ember.K };
-
-})();
-
-
-
-(function() {
-/*jshint newcap:false*/
-
-// NOTE: There is a bug in jshint that doesn't recognize `Object()` without `new`
-// as being ok unless both `newcap:false` and not `use strict`.
-// https://github.com/jshint/jshint/issues/392
-
-// Testing this is not ideal, but we want to use native functions
-// if available, but not to use versions created by libraries like Prototype
-/** @private */
-var isNativeFunc = function(func) {
- // This should probably work in all browsers likely to have ES5 array methods
- return func && Function.prototype.toString.call(func).indexOf('[native code]') > -1;
-};
-
-// From: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/map
-/** @private */
-var arrayMap = isNativeFunc(Array.prototype.map) ? Array.prototype.map : function(fun /*, thisp */) {
- //"use strict";
-
- if (this === void 0 || this === null) {
- throw new TypeError();
- }
-
- var t = Object(this);
- var len = t.length >>> 0;
- if (typeof fun !== "function") {
- throw new TypeError();
- }
-
- var res = new Array(len);
- var thisp = arguments[1];
- for (var i = 0; i < len; i++) {
- if (i in t) {
- res[i] = fun.call(thisp, t[i], i, t);
- }
- }
-
- return res;
-};
-
-// From: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/foreach
-/** @private */
-var arrayForEach = isNativeFunc(Array.prototype.forEach) ? Array.prototype.forEach : function(fun /*, thisp */) {
- //"use strict";
-
- if (this === void 0 || this === null) {
- throw new TypeError();
- }
-
- var t = Object(this);
- var len = t.length >>> 0;
- if (typeof fun !== "function") {
- throw new TypeError();
- }
-
- var thisp = arguments[1];
- for (var i = 0; i < len; i++) {
- if (i in t) {
- fun.call(thisp, t[i], i, t);
- }
- }
-};
-
-/** @private */
-var arrayIndexOf = isNativeFunc(Array.prototype.indexOf) ? Array.prototype.indexOf : function (obj, fromIndex) {
- if (fromIndex === null || fromIndex === undefined) { fromIndex = 0; }
- else if (fromIndex < 0) { fromIndex = Math.max(0, this.length + fromIndex); }
- for (var i = fromIndex, j = this.length; i < j; i++) {
- if (this[i] === obj) { return i; }
- }
- return -1;
-};
-
-Ember.ArrayPolyfills = {
- map: arrayMap,
- forEach: arrayForEach,
- indexOf: arrayIndexOf
-};
-
-var utils = Ember.EnumerableUtils = {
- map: function(obj, callback, thisArg) {
- return obj.map ? obj.map.call(obj, callback, thisArg) : arrayMap.call(obj, callback, thisArg);
- },
-
- forEach: function(obj, callback, thisArg) {
- return obj.forEach ? obj.forEach.call(obj, callback, thisArg) : arrayForEach.call(obj, callback, thisArg);
- },
-
- indexOf: function(obj, element, index) {
- return obj.indexOf ? obj.indexOf.call(obj, element, index) : arrayIndexOf.call(obj, element, index);
- },
-
- indexesOf: function(obj, elements) {
- return elements === undefined ? [] : utils.map(elements, function(item) {
- return utils.indexOf(obj, item);
- });
- },
-
- removeObject: function(array, item) {
- var index = utils.indexOf(array, item);
- if (index !== -1) { array.splice(index, 1); }
- }
-};
-
-
-if (Ember.SHIM_ES5) {
- if (!Array.prototype.map) {
- /** @private */
- Array.prototype.map = arrayMap;
- }
-
- if (!Array.prototype.forEach) {
- /** @private */
- Array.prototype.forEach = arrayForEach;
- }
-
- if (!Array.prototype.indexOf) {
- /** @private */
- Array.prototype.indexOf = arrayIndexOf;
- }
-}
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Node */
-/**
- @class
-
- Platform specific methods and feature detectors needed by the framework.
-
- @name Ember.platform
-*/
-var platform = Ember.platform = {};
-
-/**
- Identical to Object.create(). Implements if not available natively.
- @memberOf Ember.platform
- @name create
-*/
-Ember.create = Object.create;
-
-if (!Ember.create) {
- /** @private */
- var K = function() {};
-
- Ember.create = function(obj, props) {
- K.prototype = obj;
- obj = new K();
- if (props) {
- K.prototype = obj;
- for (var prop in props) {
- K.prototype[prop] = props[prop].value;
- }
- obj = new K();
- }
- K.prototype = null;
-
- return obj;
- };
-
- Ember.create.isSimulated = true;
-}
-
-/** @private */
-var defineProperty = Object.defineProperty;
-var canRedefineProperties, canDefinePropertyOnDOM;
-
-// Catch IE8 where Object.defineProperty exists but only works on DOM elements
-if (defineProperty) {
- try {
- defineProperty({}, 'a',{get:function(){}});
- } catch (e) {
- /** @private */
- defineProperty = null;
- }
-}
-
-if (defineProperty) {
- // Detects a bug in Android <3.2 where you cannot redefine a property using
- // Object.defineProperty once accessors have already been set.
- /** @private */
- canRedefineProperties = (function() {
- var obj = {};
-
- defineProperty(obj, 'a', {
- configurable: true,
- enumerable: true,
- get: function() { },
- set: function() { }
- });
-
- defineProperty(obj, 'a', {
- configurable: true,
- enumerable: true,
- writable: true,
- value: true
- });
-
- return obj.a === true;
- })();
-
- // This is for Safari 5.0, which supports Object.defineProperty, but not
- // on DOM nodes.
- /** @private */
- canDefinePropertyOnDOM = (function(){
- try {
- defineProperty(document.createElement('div'), 'definePropertyOnDOM', {});
- return true;
- } catch(e) { }
-
- return false;
- })();
-
- if (!canRedefineProperties) {
- /** @private */
- defineProperty = null;
- } else if (!canDefinePropertyOnDOM) {
- /** @private */
- defineProperty = function(obj, keyName, desc){
- var isNode;
-
- if (typeof Node === "object") {
- isNode = obj instanceof Node;
- } else {
- isNode = typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string";
- }
-
- if (isNode) {
- // TODO: Should we have a warning here?
- return (obj[keyName] = desc.value);
- } else {
- return Object.defineProperty(obj, keyName, desc);
- }
- };
- }
-}
-
-/**
- Identical to Object.defineProperty(). Implements as much functionality
- as possible if not available natively.
-
- @memberOf Ember.platform
- @name defineProperty
- @param {Object} obj The object to modify
- @param {String} keyName property name to modify
- @param {Object} desc descriptor hash
- @returns {void}
-*/
-platform.defineProperty = defineProperty;
-
-/**
- Set to true if the platform supports native getters and setters.
-
- @memberOf Ember.platform
- @name hasPropertyAccessors
-*/
-platform.hasPropertyAccessors = true;
-
-if (!platform.defineProperty) {
- platform.hasPropertyAccessors = false;
-
- platform.defineProperty = function(obj, keyName, desc) {
- if (!desc.get) { obj[keyName] = desc.value; }
- };
-
- platform.defineProperty.isSimulated = true;
-}
-
-if (Ember.ENV.MANDATORY_SETTER && !platform.hasPropertyAccessors) {
- Ember.ENV.MANDATORY_SETTER = false;
-}
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var o_defineProperty = Ember.platform.defineProperty,
- o_create = Ember.create,
- // Used for guid generation...
- GUID_KEY = '__ember'+ (+ new Date()),
- uuid = 0,
- numberCache = [],
- stringCache = {};
-
-var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
-
-/**
- @private
- @static
- @type String
- @constant
-
- A unique key used to assign guids and other private metadata to objects.
- If you inspect an object in your browser debugger you will often see these.
- They can be safely ignored.
-
- On browsers that support it, these properties are added with enumeration
- disabled so they won't show up when you iterate over your properties.
-*/
-Ember.GUID_KEY = GUID_KEY;
-
-var GUID_DESC = {
- writable: false,
- configurable: false,
- enumerable: false,
- value: null
-};
-
-/**
- @private
-
- Generates a new guid, optionally saving the guid to the object that you
- pass in. You will rarely need to use this method. Instead you should
- call Ember.guidFor(obj), which return an existing guid if available.
-
- @param {Object} obj
- Optional object the guid will be used for. If passed in, the guid will
- be saved on the object and reused whenever you pass the same object
- again.
-
- If no object is passed, just generate a new guid.
-
- @param {String} prefix
- Optional prefix to place in front of the guid. Useful when you want to
- separate the guid into separate namespaces.
-
- @returns {String} the guid
-*/
-Ember.generateGuid = function generateGuid(obj, prefix) {
- if (!prefix) prefix = 'ember';
- var ret = (prefix + (uuid++));
- if (obj) {
- GUID_DESC.value = ret;
- o_defineProperty(obj, GUID_KEY, GUID_DESC);
- }
- return ret ;
-};
-
-/**
- @private
-
- Returns a unique id for the object. If the object does not yet have
- a guid, one will be assigned to it. You can call this on any object,
- Ember.Object-based or not, but be aware that it will add a _guid property.
-
- You can also use this method on DOM Element objects.
-
- @method
- @param obj {Object} any object, string, number, Element, or primitive
- @returns {String} the unique guid for this instance.
-*/
-Ember.guidFor = function guidFor(obj) {
-
- // special cases where we don't want to add a key to object
- if (obj === undefined) return "(undefined)";
- if (obj === null) return "(null)";
-
- var cache, ret;
- var type = typeof obj;
-
- // Don't allow prototype changes to String etc. to change the guidFor
- switch(type) {
- case 'number':
- ret = numberCache[obj];
- if (!ret) ret = numberCache[obj] = 'nu'+obj;
- return ret;
-
- case 'string':
- ret = stringCache[obj];
- if (!ret) ret = stringCache[obj] = 'st'+(uuid++);
- return ret;
-
- case 'boolean':
- return obj ? '(true)' : '(false)';
-
- default:
- if (obj[GUID_KEY]) return obj[GUID_KEY];
- if (obj === Object) return '(Object)';
- if (obj === Array) return '(Array)';
- ret = 'ember'+(uuid++);
- GUID_DESC.value = ret;
- o_defineProperty(obj, GUID_KEY, GUID_DESC);
- return ret;
- }
-};
-
-// ..........................................................
-// META
-//
-
-var META_DESC = {
- writable: true,
- configurable: false,
- enumerable: false,
- value: null
-};
-
-var META_KEY = Ember.GUID_KEY+'_meta';
-
-/**
- The key used to store meta information on object for property observing.
-
- @static
- @type String
-*/
-Ember.META_KEY = META_KEY;
-
-// Placeholder for non-writable metas.
-var EMPTY_META = {
- descs: {},
- watching: {}
-};
-
-if (MANDATORY_SETTER) { EMPTY_META.values = {}; }
-
-Ember.EMPTY_META = EMPTY_META;
-
-if (Object.freeze) Object.freeze(EMPTY_META);
-
-var isDefinePropertySimulated = Ember.platform.defineProperty.isSimulated;
-
-function Meta(obj) {
- this.descs = {};
- this.watching = {};
- this.cache = {};
- this.source = obj;
-}
-
-if (isDefinePropertySimulated) {
- // on platforms that don't support enumerable false
- // make meta fail jQuery.isPlainObject() to hide from
- // jQuery.extend() by having a property that fails
- // hasOwnProperty check.
- Meta.prototype.__preventPlainObject__ = true;
-}
-
-/**
- @private
- @function
-
- Retrieves the meta hash for an object. If 'writable' is true ensures the
- hash is writable for this object as well.
-
- The meta object contains information about computed property descriptors as
- well as any watched properties and other information. You generally will
- not access this information directly but instead work with higher level
- methods that manipulate this hash indirectly.
-
- @param {Object} obj
- The object to retrieve meta for
-
- @param {Boolean} writable
- Pass false if you do not intend to modify the meta hash, allowing the
- method to avoid making an unnecessary copy.
-
- @returns {Hash}
-*/
-Ember.meta = function meta(obj, writable) {
-
- var ret = obj[META_KEY];
- if (writable===false) return ret || EMPTY_META;
-
- if (!ret) {
- if (!isDefinePropertySimulated) o_defineProperty(obj, META_KEY, META_DESC);
-
- ret = new Meta(obj);
-
- if (MANDATORY_SETTER) { ret.values = {}; }
-
- obj[META_KEY] = ret;
-
- // make sure we don't accidentally try to create constructor like desc
- ret.descs.constructor = null;
-
- } else if (ret.source !== obj) {
- if (!isDefinePropertySimulated) o_defineProperty(obj, META_KEY, META_DESC);
-
- ret = o_create(ret);
- ret.descs = o_create(ret.descs);
- ret.watching = o_create(ret.watching);
- ret.cache = {};
- ret.source = obj;
-
- if (MANDATORY_SETTER) { ret.values = o_create(ret.values); }
-
- obj[META_KEY] = ret;
- }
- return ret;
-};
-
-Ember.getMeta = function getMeta(obj, property) {
- var meta = Ember.meta(obj, false);
- return meta[property];
-};
-
-Ember.setMeta = function setMeta(obj, property, value) {
- var meta = Ember.meta(obj, true);
- meta[property] = value;
- return value;
-};
-
-/**
- @private
-
- In order to store defaults for a class, a prototype may need to create
- a default meta object, which will be inherited by any objects instantiated
- from the class's constructor.
-
- However, the properties of that meta object are only shallow-cloned,
- so if a property is a hash (like the event system's `listeners` hash),
- it will by default be shared across all instances of that class.
-
- This method allows extensions to deeply clone a series of nested hashes or
- other complex objects. For instance, the event system might pass
- ['listeners', 'foo:change', 'ember157'] to `prepareMetaPath`, which will
- walk down the keys provided.
-
- For each key, if the key does not exist, it is created. If it already
- exists and it was inherited from its constructor, the constructor's
- key is cloned.
-
- You can also pass false for `writable`, which will simply return
- undefined if `prepareMetaPath` discovers any part of the path that
- shared or undefined.
-
- @param {Object} obj The object whose meta we are examining
- @param {Array} path An array of keys to walk down
- @param {Boolean} writable whether or not to create a new meta
- (or meta property) if one does not already exist or if it's
- shared with its constructor
-*/
-Ember.metaPath = function metaPath(obj, path, writable) {
- var meta = Ember.meta(obj, writable), keyName, value;
-
- for (var i=0, l=path.length; i<l; i++) {
- keyName = path[i];
- value = meta[keyName];
-
- if (!value) {
- if (!writable) { return undefined; }
- value = meta[keyName] = { __ember_source__: obj };
- } else if (value.__ember_source__ !== obj) {
- if (!writable) { return undefined; }
- value = meta[keyName] = o_create(value);
- value.__ember_source__ = obj;
- }
-
- meta = value;
- }
-
- return value;
-};
-
-/**
- @private
-
- Wraps the passed function so that `this._super` will point to the superFunc
- when the function is invoked. This is the primitive we use to implement
- calls to super.
-
- @param {Function} func
- The function to call
-
- @param {Function} superFunc
- The super function.
-
- @returns {Function} wrapped function.
-*/
-Ember.wrap = function(func, superFunc) {
-
- function K() {}
-
- var newFunc = function() {
- var ret, sup = this._super;
- this._super = superFunc || K;
- ret = func.apply(this, arguments);
- this._super = sup;
- return ret;
- };
-
- newFunc.base = func;
- return newFunc;
-};
-
-/**
- Returns true if the passed object is an array or Array-like.
-
- Ember Array Protocol:
-
- - the object has an objectAt property
- - the object is a native Array
- - the object is an Object, and has a length property
-
- Unlike Ember.typeOf this method returns true even if the passed object is
- not formally array but appears to be array-like (i.e. implements Ember.Array)
-
- Ember.isArray(); // false
- Ember.isArray([]); // true
- Ember.isArray( Ember.ArrayProxy.create({ content: [] }) ); // true
-
- @param {Object} obj The object to test
- @returns {Boolean}
-*/
-Ember.isArray = function(obj) {
- if (!obj || obj.setInterval) { return false; }
- if (Array.isArray && Array.isArray(obj)) { return true; }
- if (Ember.Array && Ember.Array.detect(obj)) { return true; }
- if ((obj.length !== undefined) && 'object'===typeof obj) { return true; }
- return false;
-};
-
-/**
- Forces the passed object to be part of an array. If the object is already
- an array or array-like, returns the object. Otherwise adds the object to
- an array. If obj is null or undefined, returns an empty array.
-
- Ember.makeArray(); => []
- Ember.makeArray(null); => []
- Ember.makeArray(undefined); => []
- Ember.makeArray('lindsay'); => ['lindsay']
- Ember.makeArray([1,2,42]); => [1,2,42]
-
- var controller = Ember.ArrayProxy.create({ content: [] });
- Ember.makeArray(controller) === controller; => true
-
- @param {Object} obj the object
- @returns {Array}
-*/
-Ember.makeArray = function(obj) {
- if (obj === null || obj === undefined) { return []; }
- return Ember.isArray(obj) ? obj : [obj];
-};
-
-function canInvoke(obj, methodName) {
- return !!(obj && typeof obj[methodName] === 'function');
-}
-
-/**
- Checks to see if the `methodName` exists on the `obj`.
-
- @function
-
- @param {Object} obj The object to check for the method
- @param {String} methodName The method name to check for
-*/
-Ember.canInvoke = canInvoke;
-
-/**
- Checks to see if the `methodName` exists on the `obj`,
- and if it does, invokes it with the arguments passed.
-
- @function
-
- @param {Object} obj The object to check for the method
- @param {String} methodName The method name to check for
- @param {Array} args The arguments to pass to the method
-
- @returns {Boolean} true if the method does not return false
- @returns {Boolean} false otherwise
-*/
-Ember.tryInvoke = function(obj, methodName, args) {
- if (canInvoke(obj, methodName)) {
- return obj[methodName].apply(obj, args);
- }
-};
-
-})();
-
-
-
-(function() {
-/**
- JavaScript (before ES6) does not have a Map implementation. Objects,
- which are often used as dictionaries, may only have Strings as keys.
-
- Because Ember has a way to get a unique identifier for every object
- via `Ember.guidFor`, we can implement a performant Map with arbitrary
- keys. Because it is commonly used in low-level bookkeeping, Map is
- implemented as a pure JavaScript object for performance.
-
- This implementation follows the current iteration of the ES6 proposal
- for maps (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets),
- with two exceptions. First, because we need our implementation to be
- pleasant on older browsers, we do not use the `delete` name (using
- `remove` instead). Second, as we do not have the luxury of in-VM
- iteration, we implement a forEach method for iteration.
-
- Map is mocked out to look like an Ember object, so you can do
- `Ember.Map.create()` for symmetry with other Ember classes.
-*/
-/** @private */
-var guidFor = Ember.guidFor,
- indexOf = Ember.ArrayPolyfills.indexOf;
-
-var copy = function(obj) {
- var output = {};
-
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) { output[prop] = obj[prop]; }
- }
-
- return output;
-};
-
-var copyMap = function(original, newObject) {
- var keys = original.keys.copy(),
- values = copy(original.values);
-
- newObject.keys = keys;
- newObject.values = values;
-
- return newObject;
-};
-
-// This class is used internally by Ember.js and Ember Data.
-// Please do not use it at this time. We plan to clean it up
-// and add many tests soon.
-var OrderedSet = Ember.OrderedSet = function() {
- this.clear();
-};
-
-OrderedSet.create = function() {
- return new OrderedSet();
-};
-
-OrderedSet.prototype = {
- clear: function() {
- this.presenceSet = {};
- this.list = [];
- },
-
- add: function(obj) {
- var guid = guidFor(obj),
- presenceSet = this.presenceSet,
- list = this.list;
-
- if (guid in presenceSet) { return; }
-
- presenceSet[guid] = true;
- list.push(obj);
- },
-
- remove: function(obj) {
- var guid = guidFor(obj),
- presenceSet = this.presenceSet,
- list = this.list;
-
- delete presenceSet[guid];
-
- var index = indexOf.call(list, obj);
- if (index > -1) {
- list.splice(index, 1);
- }
- },
-
- isEmpty: function() {
- return this.list.length === 0;
- },
-
- forEach: function(fn, self) {
- // allow mutation during iteration
- var list = this.list.slice();
-
- for (var i = 0, j = list.length; i < j; i++) {
- fn.call(self, list[i]);
- }
- },
-
- toArray: function() {
- return this.list.slice();
- },
-
- copy: function() {
- var set = new OrderedSet();
-
- set.presenceSet = copy(this.presenceSet);
- set.list = this.list.slice();
-
- return set;
- }
-};
-
-/**
- A Map stores values indexed by keys. Unlike JavaScript's
- default Objects, the keys of a Map can be any JavaScript
- object.
-
- Internally, a Map has two data structures:
-
- `keys`: an OrderedSet of all of the existing keys
- `values`: a JavaScript Object indexed by the
- Ember.guidFor(key)
-
- When a key/value pair is added for the first time, we
- add the key to the `keys` OrderedSet, and create or
- replace an entry in `values`. When an entry is deleted,
- we delete its entry in `keys` and `values`.
-*/
-
-/** @private */
-var Map = Ember.Map = function() {
- this.keys = Ember.OrderedSet.create();
- this.values = {};
-};
-
-Map.create = function() {
- return new Map();
-};
-
-Map.prototype = {
- /**
- Retrieve the value associated with a given key.
-
- @param {anything} key
- @return {anything} the value associated with the key, or undefined
- */
- get: function(key) {
- var values = this.values,
- guid = guidFor(key);
-
- return values[guid];
- },
-
- /**
- Adds a value to the map. If a value for the given key has already been
- provided, the new value will replace the old value.
-
- @param {anything} key
- @param {anything} value
- */
- set: function(key, value) {
- var keys = this.keys,
- values = this.values,
- guid = guidFor(key);
-
- keys.add(key);
- values[guid] = value;
- },
-
- /**
- Removes a value from the map for an associated key.
-
- @param {anything} key
- @returns {Boolean} true if an item was removed, false otherwise
- */
- remove: function(key) {
- // don't use ES6 "delete" because it will be annoying
- // to use in browsers that are not ES6 friendly;
- var keys = this.keys,
- values = this.values,
- guid = guidFor(key),
- value;
-
- if (values.hasOwnProperty(guid)) {
- keys.remove(key);
- value = values[guid];
- delete values[guid];
- return true;
- } else {
- return false;
- }
- },
-
- /**
- Check whether a key is present.
-
- @param {anything} key
- @returns {Boolean} true if the item was present, false otherwise
- */
- has: function(key) {
- var values = this.values,
- guid = guidFor(key);
-
- return values.hasOwnProperty(guid);
- },
-
- /**
- Iterate over all the keys and values. Calls the function once
- for each key, passing in the key and value, in that order.
-
- The keys are guaranteed to be iterated over in insertion order.
-
- @param {Function} callback
- @param {anything} self if passed, the `this` value inside the
- callback. By default, `this` is the map.
- */
- forEach: function(callback, self) {
- var keys = this.keys,
- values = this.values;
-
- keys.forEach(function(key) {
- var guid = guidFor(key);
- callback.call(self, key, values[guid]);
- });
- },
-
- copy: function() {
- return copyMap(this, new Map());
- }
-};
-
-var MapWithDefault = Ember.MapWithDefault = function(options) {
- Map.call(this);
- this.defaultValue = options.defaultValue;
-};
-
-MapWithDefault.create = function(options) {
- if (options) {
- return new MapWithDefault(options);
- } else {
- return new Map();
- }
-};
-
-MapWithDefault.prototype = Ember.create(Map.prototype);
-
-MapWithDefault.prototype.get = function(key) {
- var hasValue = this.has(key);
-
- if (hasValue) {
- return Map.prototype.get.call(this, key);
- } else {
- var defaultValue = this.defaultValue(key);
- this.set(key, defaultValue);
- return defaultValue;
- }
-};
-
-MapWithDefault.prototype.copy = function() {
- return copyMap(this, new MapWithDefault({
- defaultValue: this.defaultValue
- }));
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var META_KEY = Ember.META_KEY, get, set;
-
-var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
-
-/** @private */
-var IS_GLOBAL = /^([A-Z$]|([0-9][A-Z$]))/;
-var IS_GLOBAL_PATH = /^([A-Z$]|([0-9][A-Z$])).*[\.\*]/;
-var HAS_THIS = /^this[\.\*]/;
-var FIRST_KEY = /^([^\.\*]+)/;
-
-// ..........................................................
-// GET AND SET
-//
-// If we are on a platform that supports accessors we can get use those.
-// Otherwise simulate accessors by looking up the property directly on the
-// object.
-
-/** @private */
-get = function get(obj, keyName) {
- // Helpers that operate with 'this' within an #each
- if (keyName === '') {
- return obj;
- }
-
- if (!keyName && 'string'===typeof obj) {
- keyName = obj;
- obj = null;
- }
-
- if (!obj || keyName.indexOf('.') !== -1) {
- return getPath(obj, keyName);
- }
-
- Ember.assert("You need to provide an object and key to `get`.", !!obj && keyName);
-
- var meta = obj[META_KEY], desc = meta && meta.descs[keyName], ret;
- if (desc) {
- return desc.get(obj, keyName);
- } else {
- if (MANDATORY_SETTER && meta && meta.watching[keyName] > 0) {
- ret = meta.values[keyName];
- } else {
- ret = obj[keyName];
- }
-
- if (ret === undefined &&
- 'object' === typeof obj && !(keyName in obj) && 'function' === typeof obj.unknownProperty) {
- return obj.unknownProperty(keyName);
- }
-
- return ret;
- }
-};
-
-/** @private */
-set = function set(obj, keyName, value, tolerant) {
- if (typeof obj === 'string') {
- Ember.assert("Path '" + obj + "' must be global if no obj is given.", IS_GLOBAL.test(obj));
- value = keyName;
- keyName = obj;
- obj = null;
- }
-
- if (!obj || keyName.indexOf('.') !== -1) {
- return setPath(obj, keyName, value, tolerant);
- }
-
- Ember.assert("You need to provide an object and key to `set`.", !!obj && keyName !== undefined);
- Ember.assert('calling set on destroyed object', !obj.isDestroyed);
-
- var meta = obj[META_KEY], desc = meta && meta.descs[keyName],
- isUnknown, currentValue;
- if (desc) {
- desc.set(obj, keyName, value);
- }
- else {
- isUnknown = 'object' === typeof obj && !(keyName in obj);
-
- // setUnknownProperty is called if `obj` is an object,
- // the property does not already exist, and the
- // `setUnknownProperty` method exists on the object
- if (isUnknown && 'function' === typeof obj.setUnknownProperty) {
- obj.setUnknownProperty(keyName, value);
- } else if (meta && meta.watching[keyName] > 0) {
- if (MANDATORY_SETTER) {
- currentValue = meta.values[keyName];
- } else {
- currentValue = obj[keyName];
- }
- // only trigger a change if the value has changed
- if (value !== currentValue) {
- Ember.propertyWillChange(obj, keyName);
- if (MANDATORY_SETTER) {
- if (currentValue === undefined && !(keyName in obj)) {
- Ember.defineProperty(obj, keyName, null, value); // setup mandatory setter
- } else {
- meta.values[keyName] = value;
- }
- } else {
- obj[keyName] = value;
- }
- Ember.propertyDidChange(obj, keyName);
- }
- } else {
- obj[keyName] = value;
- }
- }
- return value;
-};
-
-/** @private */
-function firstKey(path) {
- return path.match(FIRST_KEY)[0];
-}
-
-// assumes path is already normalized
-/** @private */
-function normalizeTuple(target, path) {
- var hasThis = HAS_THIS.test(path),
- isGlobal = !hasThis && IS_GLOBAL_PATH.test(path),
- key;
-
- if (!target || isGlobal) target = window;
- if (hasThis) path = path.slice(5);
-
- if (target === window) {
- key = firstKey(path);
- target = get(target, key);
- path = path.slice(key.length+1);
- }
-
- // must return some kind of path to be valid else other things will break.
- if (!path || path.length===0) throw new Error('Invalid Path');
-
- return [ target, path ];
-}
-
-/** @private */
-function getPath(root, path) {
- var hasThis, parts, tuple, idx, len;
-
- // If there is no root and path is a key name, return that
- // property from the global object.
- // E.g. get('Ember') -> Ember
- if (root === null && path.indexOf('.') === -1) { return get(window, path); }
-
- // detect complicated paths and normalize them
- hasThis = HAS_THIS.test(path);
-
- if (!root || hasThis) {
- tuple = normalizeTuple(root, path);
- root = tuple[0];
- path = tuple[1];
- tuple.length = 0;
- }
-
- parts = path.split(".");
- len = parts.length;
- for (idx=0; root && idx<len; idx++) {
- root = get(root, parts[idx], true);
- if (root && root.isDestroyed) { return undefined; }
- }
- return root;
-}
-
-/** @private */
-function setPath(root, path, value, tolerant) {
- var keyName;
-
- // get the last part of the path
- keyName = path.slice(path.lastIndexOf('.') + 1);
-
- // get the first part of the part
- path = path.slice(0, path.length-(keyName.length+1));
-
- // unless the path is this, look up the first part to
- // get the root
- if (path !== 'this') {
- root = getPath(root, path);
- }
-
- if (!keyName || keyName.length === 0) {
- throw new Error('You passed an empty path');
- }
-
- if (!root) {
- if (tolerant) { return; }
- else { throw new Error('Object in path '+path+' could not be found or was destroyed.'); }
- }
-
- return set(root, keyName, value);
-}
-
-/**
- @private
-
- Normalizes a target/path pair to reflect that actual target/path that should
- be observed, etc. This takes into account passing in global property
- paths (i.e. a path beginning with a captial letter not defined on the
- target) and * separators.
-
- @param {Object} target
- The current target. May be null.
-
- @param {String} path
- A path on the target or a global property path.
-
- @returns {Array} a temporary array with the normalized target/path pair.
-*/
-Ember.normalizeTuple = function(target, path) {
- return normalizeTuple(target, path);
-};
-
-Ember.getWithDefault = function(root, key, defaultValue) {
- var value = get(root, key);
-
- if (value === undefined) { return defaultValue; }
- return value;
-};
-
-
-/**
- @function
-
- Gets the value of a property on an object. If the property is computed,
- the function will be invoked. If the property is not defined but the
- object implements the unknownProperty() method then that will be invoked.
-
- If you plan to run on IE8 and older browsers then you should use this
- method anytime you want to retrieve a property on an object that you don't
- know for sure is private. (My convention only properties beginning with
- an underscore '_' are considered private.)
-
- On all newer browsers, you only need to use this method to retrieve
- properties if the property might not be defined on the object and you want
- to respect the unknownProperty() handler. Otherwise you can ignore this
- method.
-
- Note that if the obj itself is null, this method will simply return
- undefined.
-
- @param {Object} obj
- The object to retrieve from.
-
- @param {String} keyName
- The property key to retrieve
-
- @returns {Object} the property value or null.
-*/
-Ember.get = get;
-Ember.getPath = Ember.deprecateFunc('getPath is deprecated since get now supports paths', Ember.get);
-
-/**
- @function
-
- Sets the value of a property on an object, respecting computed properties
- and notifying observers and other listeners of the change. If the
- property is not defined but the object implements the unknownProperty()
- method then that will be invoked as well.
-
- If you plan to run on IE8 and older browsers then you should use this
- method anytime you want to set a property on an object that you don't
- know for sure is private. (My convention only properties beginning with
- an underscore '_' are considered private.)
-
- On all newer browsers, you only need to use this method to set
- properties if the property might not be defined on the object and you want
- to respect the unknownProperty() handler. Otherwise you can ignore this
- method.
-
- @param {Object} obj
- The object to modify.
-
- @param {String} keyName
- The property key to set
-
- @param {Object} value
- The value to set
-
- @returns {Object} the passed value.
-*/
-Ember.set = set;
-Ember.setPath = Ember.deprecateFunc('setPath is deprecated since set now supports paths', Ember.set);
-
-/**
- Error-tolerant form of Ember.set. Will not blow up if any part of the
- chain is undefined, null, or destroyed.
-
- This is primarily used when syncing bindings, which may try to update after
- an object has been destroyed.
-*/
-Ember.trySet = function(root, path, value) {
- return set(root, path, value, true);
-};
-Ember.trySetPath = Ember.deprecateFunc('trySetPath has been renamed to trySet', Ember.trySet);
-
-/**
- Returns true if the provided path is global (e.g., "MyApp.fooController.bar")
- instead of local ("foo.bar.baz").
-
- @param {String} path
- @returns Boolean
-*/
-Ember.isGlobalPath = function(path) {
- return IS_GLOBAL.test(path);
-};
-
-
-
-if (Ember.config.overrideAccessors) {
- Ember.config.overrideAccessors();
- get = Ember.get;
- set = Ember.set;
-}
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var GUID_KEY = Ember.GUID_KEY,
- META_KEY = Ember.META_KEY,
- EMPTY_META = Ember.EMPTY_META,
- metaFor = Ember.meta,
- o_create = Ember.create,
- objectDefineProperty = Ember.platform.defineProperty;
-
-var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
-
-// ..........................................................
-// DESCRIPTOR
-//
-
-/**
- @private
- @constructor
-
- Objects of this type can implement an interface to responds requests to
- get and set. The default implementation handles simple properties.
-
- You generally won't need to create or subclass this directly.
-*/
-var Descriptor = Ember.Descriptor = function() {};
-
-// ..........................................................
-// DEFINING PROPERTIES API
-//
-
-/**
- @private
-
- NOTE: This is a low-level method used by other parts of the API. You almost
- never want to call this method directly. Instead you should use Ember.mixin()
- to define new properties.
-
- Defines a property on an object. This method works much like the ES5
- Object.defineProperty() method except that it can also accept computed
- properties and other special descriptors.
-
- Normally this method takes only three parameters. However if you pass an
- instance of Ember.Descriptor as the third param then you can pass an optional
- value as the fourth parameter. This is often more efficient than creating
- new descriptor hashes for each property.
-
- ## Examples
-
- // ES5 compatible mode
- Ember.defineProperty(contact, 'firstName', {
- writable: true,
- configurable: false,
- enumerable: true,
- value: 'Charles'
- });
-
- // define a simple property
- Ember.defineProperty(contact, 'lastName', undefined, 'Jolley');
-
- // define a computed property
- Ember.defineProperty(contact, 'fullName', Ember.computed(function() {
- return this.firstName+' '+this.lastName;
- }).property('firstName', 'lastName').cacheable());
-*/
-Ember.defineProperty = function(obj, keyName, desc, data, meta) {
- // The first two parameters to defineProperty are mandatory:
- //
- // * obj: the object to define this property on. This may be
- // a prototype.
- // * keyName: the name of the property
- //
- // One and only one of the following two parameters must be
- // provided:
- //
- // * desc: an instance of Ember.Descriptor (typically a
- // computed property) or an ES5 descriptor.
- // * data: something other than a descriptor, that will
- // become the explicit value of this property.
-
- var descs, existingDesc, watching, value;
-
- if (!meta) meta = metaFor(obj);
- descs = meta.descs;
- existingDesc = meta.descs[keyName];
- watching = meta.watching[keyName] > 0;
-
- if (existingDesc instanceof Ember.Descriptor) {
- existingDesc.teardown(obj, keyName);
- }
-
- if (desc instanceof Ember.Descriptor) {
- value = desc;
-
- descs[keyName] = desc;
- if (MANDATORY_SETTER && watching) {
- objectDefineProperty(obj, keyName, {
- configurable: true,
- enumerable: true,
- writable: true,
- value: undefined // make enumerable
- });
- } else {
- obj[keyName] = undefined; // make enumerable
- }
- desc.setup(obj, keyName);
- } else {
- descs[keyName] = undefined; // shadow descriptor in proto
- if (desc == null) {
- value = data;
-
- if (MANDATORY_SETTER && watching) {
- meta.values[keyName] = data;
- objectDefineProperty(obj, keyName, {
- configurable: true,
- enumerable: true,
- set: function() {
- Ember.assert('Must use Ember.set() to access this property', false);
- },
- get: function() {
- var meta = this[META_KEY];
- return meta && meta.values[keyName];
- }
- });
- } else {
- obj[keyName] = data;
- }
- } else {
- value = desc;
-
- // compatibility with ES5
- objectDefineProperty(obj, keyName, desc);
- }
- }
-
- // if key is being watched, override chains that
- // were initialized with the prototype
- if (watching) { Ember.overrideChains(obj, keyName, meta); }
-
- // The `value` passed to the `didDefineProperty` hook is
- // either the descriptor or data, whichever was passed.
- if (obj.didDefineProperty) { obj.didDefineProperty(obj, keyName, value); }
-
- return this;
-};
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var AFTER_OBSERVERS = ':change';
-var BEFORE_OBSERVERS = ':before';
-var guidFor = Ember.guidFor;
-
-var deferred = 0;
-var array_Slice = [].slice;
-
-/** @private */
-var ObserverSet = function () {
- this.targetSet = {};
-};
-ObserverSet.prototype.add = function (target, path) {
- var targetSet = this.targetSet,
- targetGuid = Ember.guidFor(target),
- pathSet = targetSet[targetGuid];
- if (!pathSet) {
- targetSet[targetGuid] = pathSet = {};
- }
- if (pathSet[path]) {
- return false;
- } else {
- return pathSet[path] = true;
- }
-};
-ObserverSet.prototype.clear = function () {
- this.targetSet = {};
-};
-
-/** @private */
-var DeferredEventQueue = function() {
- this.targetSet = {};
- this.queue = [];
-};
-
-DeferredEventQueue.prototype.push = function(target, eventName, keyName) {
- var targetSet = this.targetSet,
- queue = this.queue,
- targetGuid = Ember.guidFor(target),
- eventNameSet = targetSet[targetGuid],
- index;
-
- if (!eventNameSet) {
- targetSet[targetGuid] = eventNameSet = {};
- }
- index = eventNameSet[eventName];
- if (index === undefined) {
- eventNameSet[eventName] = queue.push(Ember.deferEvent(target, eventName, [target, keyName])) - 1;
- } else {
- queue[index] = Ember.deferEvent(target, eventName, [target, keyName]);
- }
-};
-
-DeferredEventQueue.prototype.flush = function() {
- var queue = this.queue;
- this.queue = [];
- this.targetSet = {};
- for (var i=0, len=queue.length; i < len; ++i) {
- queue[i]();
- }
-};
-
-var queue = new DeferredEventQueue(), beforeObserverSet = new ObserverSet();
-
-/** @private */
-function notifyObservers(obj, eventName, keyName, forceNotification) {
- if (deferred && !forceNotification) {
- queue.push(obj, eventName, keyName);
- } else {
- Ember.sendEvent(obj, eventName, [obj, keyName]);
- }
-}
-
-/** @private */
-function flushObserverQueue() {
- beforeObserverSet.clear();
-
- queue.flush();
-}
-
-Ember.beginPropertyChanges = function() {
- deferred++;
- return this;
-};
-
-Ember.endPropertyChanges = function() {
- deferred--;
- if (deferred<=0) flushObserverQueue();
-};
-
-/**
- Make a series of property changes together in an
- exception-safe way.
-
- Ember.changeProperties(function() {
- obj1.set('foo', mayBlowUpWhenSet);
- obj2.set('bar', baz);
- });
-*/
-Ember.changeProperties = function(cb, binding){
- Ember.beginPropertyChanges();
- try {
- cb.call(binding);
- } finally {
- Ember.endPropertyChanges();
- }
-};
-
-/**
- Set a list of properties on an object. These properties are set inside
- a single `beginPropertyChanges` and `endPropertyChanges` batch, so
- observers will be buffered.
-*/
-Ember.setProperties = function(self, hash) {
- Ember.changeProperties(function(){
- for(var prop in hash) {
- if (hash.hasOwnProperty(prop)) Ember.set(self, prop, hash[prop]);
- }
- });
- return self;
-};
-
-
-/** @private */
-function changeEvent(keyName) {
- return keyName+AFTER_OBSERVERS;
-}
-
-/** @private */
-function beforeEvent(keyName) {
- return keyName+BEFORE_OBSERVERS;
-}
-
-Ember.addObserver = function(obj, path, target, method) {
- Ember.addListener(obj, changeEvent(path), target, method);
- Ember.watch(obj, path);
- return this;
-};
-
-/** @private */
-Ember.observersFor = function(obj, path) {
- return Ember.listenersFor(obj, changeEvent(path));
-};
-
-Ember.removeObserver = function(obj, path, target, method) {
- Ember.unwatch(obj, path);
- Ember.removeListener(obj, changeEvent(path), target, method);
- return this;
-};
-
-Ember.addBeforeObserver = function(obj, path, target, method) {
- Ember.addListener(obj, beforeEvent(path), target, method);
- Ember.watch(obj, path);
- return this;
-};
-
-// Suspend observer during callback.
-//
-// This should only be used by the target of the observer
-// while it is setting the observed path.
-/** @private */
-Ember._suspendBeforeObserver = function(obj, path, target, method, callback) {
- return Ember._suspendListener(obj, beforeEvent(path), target, method, callback);
-};
-
-Ember._suspendObserver = function(obj, path, target, method, callback) {
- return Ember._suspendListener(obj, changeEvent(path), target, method, callback);
-};
-
-/** @private */
-Ember.beforeObserversFor = function(obj, path) {
- return Ember.listenersFor(obj, beforeEvent(path));
-};
-
-Ember.removeBeforeObserver = function(obj, path, target, method) {
- Ember.unwatch(obj, path);
- Ember.removeListener(obj, beforeEvent(path), target, method);
- return this;
-};
-
-/** @private */
-Ember.notifyObservers = function(obj, keyName) {
- if (obj.isDestroying) { return; }
-
- notifyObservers(obj, changeEvent(keyName), keyName);
-};
-
-/** @private */
-Ember.notifyBeforeObservers = function(obj, keyName) {
- if (obj.isDestroying) { return; }
-
- var guid, set, forceNotification = false;
-
- if (deferred) {
- if (beforeObserverSet.add(obj, keyName)) {
- forceNotification = true;
- } else {
- return;
- }
- }
-
- notifyObservers(obj, beforeEvent(keyName), keyName, forceNotification);
-};
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var guidFor = Ember.guidFor, // utils.js
- metaFor = Ember.meta, // utils.js
- get = Ember.get, // accessors.js
- set = Ember.set, // accessors.js
- normalizeTuple = Ember.normalizeTuple, // accessors.js
- GUID_KEY = Ember.GUID_KEY, // utils.js
- META_KEY = Ember.META_KEY, // utils.js
- // circular reference observer depends on Ember.watch
- // we should move change events to this file or its own property_events.js
- notifyObservers = Ember.notifyObservers, // observer.js
- forEach = Ember.ArrayPolyfills.forEach, // array.js
- FIRST_KEY = /^([^\.\*]+)/,
- IS_PATH = /[\.\*]/;
-
-var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER,
-o_defineProperty = Ember.platform.defineProperty;
-
-/** @private */
-function firstKey(path) {
- return path.match(FIRST_KEY)[0];
-}
-
-// returns true if the passed path is just a keyName
-/** @private */
-function isKeyName(path) {
- return path==='*' || !IS_PATH.test(path);
-}
-
-// ..........................................................
-// DEPENDENT KEYS
-//
-
-var DEP_SKIP = { __emberproto__: true }; // skip some keys and toString
-
-/** @private */
-function iterDeps(method, obj, depKey, seen, meta) {
-
- var guid = guidFor(obj);
- if (!seen[guid]) seen[guid] = {};
- if (seen[guid][depKey]) return;
- seen[guid][depKey] = true;
-
- var deps = meta.deps;
- deps = deps && deps[depKey];
- if (deps) {
- for(var key in deps) {
- if (DEP_SKIP[key]) continue;
- method(obj, key);
- }
- }
-}
-
-
-var WILL_SEEN, DID_SEEN;
-
-// called whenever a property is about to change to clear the cache of any dependent keys (and notify those properties of changes, etc...)
-/** @private */
-function dependentKeysWillChange(obj, depKey, meta) {
- if (obj.isDestroying) { return; }
-
- var seen = WILL_SEEN, top = !seen;
- if (top) { seen = WILL_SEEN = {}; }
- iterDeps(propertyWillChange, obj, depKey, seen, meta);
- if (top) { WILL_SEEN = null; }
-}
-
-// called whenever a property has just changed to update dependent keys
-/** @private */
-function dependentKeysDidChange(obj, depKey, meta) {
- if (obj.isDestroying) { return; }
-
- var seen = DID_SEEN, top = !seen;
- if (top) { seen = DID_SEEN = {}; }
- iterDeps(propertyDidChange, obj, depKey, seen, meta);
- if (top) { DID_SEEN = null; }
-}
-
-// ..........................................................
-// CHAIN
-//
-
-/** @private */
-function addChainWatcher(obj, keyName, node) {
- if (!obj || ('object' !== typeof obj)) return; // nothing to do
- var m = metaFor(obj);
- var nodes = m.chainWatchers;
- if (!nodes || nodes.__emberproto__ !== obj) {
- nodes = m.chainWatchers = { __emberproto__: obj };
- }
-
- if (!nodes[keyName]) { nodes[keyName] = {}; }
- nodes[keyName][guidFor(node)] = node;
- Ember.watch(obj, keyName);
-}
-
-/** @private */
-function removeChainWatcher(obj, keyName, node) {
- if (!obj || 'object' !== typeof obj) { return; } // nothing to do
- var m = metaFor(obj, false),
- nodes = m.chainWatchers;
- if (!nodes || nodes.__emberproto__ !== obj) { return; } //nothing to do
- if (nodes[keyName]) { delete nodes[keyName][guidFor(node)]; }
- Ember.unwatch(obj, keyName);
-}
-
-var pendingQueue = [];
-
-// attempts to add the pendingQueue chains again. If some of them end up
-// back in the queue and reschedule is true, schedules a timeout to try
-// again.
-/** @private */
-function flushPendingChains() {
- if (pendingQueue.length === 0) { return; } // nothing to do
-
- var queue = pendingQueue;
- pendingQueue = [];
-
- forEach.call(queue, function(q) { q[0].add(q[1]); });
-
- Ember.warn('Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos', pendingQueue.length === 0);
-}
-
-/** @private */
-function isProto(pvalue) {
- return metaFor(pvalue, false).proto === pvalue;
-}
-
-// A ChainNode watches a single key on an object. If you provide a starting
-// value for the key then the node won't actually watch it. For a root node
-// pass null for parent and key and object for value.
-/** @private */
-var ChainNode = function(parent, key, value, separator) {
- var obj;
- this._parent = parent;
- this._key = key;
-
- // _watching is true when calling get(this._parent, this._key) will
- // return the value of this node.
- //
- // It is false for the root of a chain (because we have no parent)
- // and for global paths (because the parent node is the object with
- // the observer on it)
- this._watching = value===undefined;
-
- this._value = value;
- this._separator = separator || '.';
- this._paths = {};
- if (this._watching) {
- this._object = parent.value();
- if (this._object) { addChainWatcher(this._object, this._key, this); }
- }
-
- // Special-case: the EachProxy relies on immediate evaluation to
- // establish its observers.
- //
- // TODO: Replace this with an efficient callback that the EachProxy
- // can implement.
- if (this._parent && this._parent._key === '@each') {
- this.value();
- }
-};
-
-var ChainNodePrototype = ChainNode.prototype;
-
-ChainNodePrototype.value = function() {
- if (this._value === undefined && this._watching) {
- var obj = this._parent.value();
- this._value = (obj && !isProto(obj)) ? get(obj, this._key) : undefined;
- }
- return this._value;
-};
-
-ChainNodePrototype.destroy = function() {
- if (this._watching) {
- var obj = this._object;
- if (obj) { removeChainWatcher(obj, this._key, this); }
- this._watching = false; // so future calls do nothing
- }
-};
-
-// copies a top level object only
-ChainNodePrototype.copy = function(obj) {
- var ret = new ChainNode(null, null, obj, this._separator),
- paths = this._paths, path;
- for (path in paths) {
- if (paths[path] <= 0) { continue; } // this check will also catch non-number vals.
- ret.add(path);
- }
- return ret;
-};
-
-// called on the root node of a chain to setup watchers on the specified
-// path.
-ChainNodePrototype.add = function(path) {
- var obj, tuple, key, src, separator, paths;
-
- paths = this._paths;
- paths[path] = (paths[path] || 0) + 1;
-
- obj = this.value();
- tuple = normalizeTuple(obj, path);
-
- // the path was a local path
- if (tuple[0] && tuple[0] === obj) {
- path = tuple[1];
- key = firstKey(path);
- path = path.slice(key.length+1);
-
- // global path, but object does not exist yet.
- // put into a queue and try to connect later.
- } else if (!tuple[0]) {
- pendingQueue.push([this, path]);
- tuple.length = 0;
- return;
-
- // global path, and object already exists
- } else {
- src = tuple[0];
- key = path.slice(0, 0-(tuple[1].length+1));
- separator = path.slice(key.length, key.length+1);
- path = tuple[1];
- }
-
- tuple.length = 0;
- this.chain(key, path, src, separator);
-};
-
-// called on the root node of a chain to teardown watcher on the specified
-// path
-ChainNodePrototype.remove = function(path) {
- var obj, tuple, key, src, paths;
-
- paths = this._paths;
- if (paths[path] > 0) { paths[path]--; }
-
- obj = this.value();
- tuple = normalizeTuple(obj, path);
- if (tuple[0] === obj) {
- path = tuple[1];
- key = firstKey(path);
- path = path.slice(key.length+1);
- } else {
- src = tuple[0];
- key = path.slice(0, 0-(tuple[1].length+1));
- path = tuple[1];
- }
-
- tuple.length = 0;
- this.unchain(key, path);
-};
-
-ChainNodePrototype.count = 0;
-
-ChainNodePrototype.chain = function(key, path, src, separator) {
- var chains = this._chains, node;
- if (!chains) { chains = this._chains = {}; }
-
- node = chains[key];
- if (!node) { node = chains[key] = new ChainNode(this, key, src, separator); }
- node.count++; // count chains...
-
- // chain rest of path if there is one
- if (path && path.length>0) {
- key = firstKey(path);
- path = path.slice(key.length+1);
- node.chain(key, path); // NOTE: no src means it will observe changes...
- }
-};
-
-ChainNodePrototype.unchain = function(key, path) {
- var chains = this._chains, node = chains[key];
-
- // unchain rest of path first...
- if (path && path.length>1) {
- key = firstKey(path);
- path = path.slice(key.length+1);
- node.unchain(key, path);
- }
-
- // delete node if needed.
- node.count--;
- if (node.count<=0) {
- delete chains[node._key];
- node.destroy();
- }
-
-};
-
-ChainNodePrototype.willChange = function() {
- var chains = this._chains;
- if (chains) {
- for(var key in chains) {
- if (!chains.hasOwnProperty(key)) { continue; }
- chains[key].willChange();
- }
- }
-
- if (this._parent) { this._parent.chainWillChange(this, this._key, 1); }
-};
-
-ChainNodePrototype.chainWillChange = function(chain, path, depth) {
- if (this._key) { path = this._key + this._separator + path; }
-
- if (this._parent) {
- this._parent.chainWillChange(this, path, depth+1);
- } else {
- if (depth > 1) { Ember.propertyWillChange(this.value(), path); }
- path = 'this.' + path;
- if (this._paths[path] > 0) { Ember.propertyWillChange(this.value(), path); }
- }
-};
-
-ChainNodePrototype.chainDidChange = function(chain, path, depth) {
- if (this._key) { path = this._key + this._separator + path; }
- if (this._parent) {
- this._parent.chainDidChange(this, path, depth+1);
- } else {
- if (depth > 1) { Ember.propertyDidChange(this.value(), path); }
- path = 'this.' + path;
- if (this._paths[path] > 0) { Ember.propertyDidChange(this.value(), path); }
- }
-};
-
-ChainNodePrototype.didChange = function(suppressEvent) {
- // invalidate my own value first.
- if (this._watching) {
- var obj = this._parent.value();
- if (obj !== this._object) {
- removeChainWatcher(this._object, this._key, this);
- this._object = obj;
- addChainWatcher(obj, this._key, this);
- }
- this._value = undefined;
-
- // Special-case: the EachProxy relies on immediate evaluation to
- // establish its observers.
- if (this._parent && this._parent._key === '@each')
- this.value();
- }
-
- // then notify chains...
- var chains = this._chains;
- if (chains) {
- for(var key in chains) {
- if (!chains.hasOwnProperty(key)) { continue; }
- chains[key].didChange(suppressEvent);
- }
- }
-
- if (suppressEvent) { return; }
-
- // and finally tell parent about my path changing...
- if (this._parent) { this._parent.chainDidChange(this, this._key, 1); }
-};
-
-// get the chains for the current object. If the current object has
-// chains inherited from the proto they will be cloned and reconfigured for
-// the current object.
-/** @private */
-function chainsFor(obj) {
- var m = metaFor(obj), ret = m.chains;
- if (!ret) {
- ret = m.chains = new ChainNode(null, null, obj);
- } else if (ret.value() !== obj) {
- ret = m.chains = ret.copy(obj);
- }
- return ret;
-}
-
-/** @private */
-function notifyChains(obj, m, keyName, methodName, arg) {
- var nodes = m.chainWatchers;
-
- if (!nodes || nodes.__emberproto__ !== obj) { return; } // nothing to do
-
- nodes = nodes[keyName];
- if (!nodes) { return; }
-
- for(var key in nodes) {
- if (!nodes.hasOwnProperty(key)) { continue; }
- nodes[key][methodName](arg);
- }
-}
-
-Ember.overrideChains = function(obj, keyName, m) {
- notifyChains(obj, m, keyName, 'didChange', true);
-};
-
-/** @private */
-function chainsWillChange(obj, keyName, m) {
- notifyChains(obj, m, keyName, 'willChange');
-}
-
-/** @private */
-function chainsDidChange(obj, keyName, m) {
- notifyChains(obj, m, keyName, 'didChange');
-}
-
-// ..........................................................
-// WATCH
-//
-
-/**
- @private
-
- Starts watching a property on an object. Whenever the property changes,
- invokes Ember.propertyWillChange and Ember.propertyDidChange. This is the
- primitive used by observers and dependent keys; usually you will never call
- this method directly but instead use higher level methods like
- Ember.addObserver().
-*/
-Ember.watch = function(obj, keyName) {
- // can't watch length on Array - it is special...
- if (keyName === 'length' && Ember.typeOf(obj) === 'array') { return this; }
-
- var m = metaFor(obj), watching = m.watching, desc;
-
- // activate watching first time
- if (!watching[keyName]) {
- watching[keyName] = 1;
- if (isKeyName(keyName)) {
- desc = m.descs[keyName];
- if (desc && desc.willWatch) { desc.willWatch(obj, keyName); }
-
- if ('function' === typeof obj.willWatchProperty) {
- obj.willWatchProperty(keyName);
- }
-
- if (MANDATORY_SETTER && keyName in obj) {
- m.values[keyName] = obj[keyName];
- o_defineProperty(obj, keyName, {
- configurable: true,
- enumerable: true,
- set: function() {
- Ember.assert('Must use Ember.set() to access this property', false);
- },
- get: function() {
- var meta = this[META_KEY];
- return meta && meta.values[keyName];
- }
- });
- }
- } else {
- chainsFor(obj).add(keyName);
- }
-
- } else {
- watching[keyName] = (watching[keyName] || 0) + 1;
- }
- return this;
-};
-
-Ember.isWatching = function isWatching(obj, key) {
- var meta = obj[META_KEY];
- return (meta && meta.watching[key]) > 0;
-};
-
-Ember.watch.flushPending = flushPendingChains;
-
-/** @private */
-Ember.unwatch = function(obj, keyName) {
- // can't watch length on Array - it is special...
- if (keyName === 'length' && Ember.typeOf(obj) === 'array') { return this; }
-
- var m = metaFor(obj), watching = m.watching, desc;
-
- if (watching[keyName] === 1) {
- watching[keyName] = 0;
-
- if (isKeyName(keyName)) {
- desc = m.descs[keyName];
- if (desc && desc.didUnwatch) { desc.didUnwatch(obj, keyName); }
-
- if ('function' === typeof obj.didUnwatchProperty) {
- obj.didUnwatchProperty(keyName);
- }
-
- if (MANDATORY_SETTER && keyName in obj) {
- o_defineProperty(obj, keyName, {
- configurable: true,
- enumerable: true,
- writable: true,
- value: m.values[keyName]
- });
- delete m.values[keyName];
- }
- } else {
- chainsFor(obj).remove(keyName);
- }
-
- } else if (watching[keyName]>1) {
- watching[keyName]--;
- }
-
- return this;
-};
-
-/**
- @private
-
- Call on an object when you first beget it from another object. This will
- setup any chained watchers on the object instance as needed. This method is
- safe to call multiple times.
-*/
-Ember.rewatch = function(obj) {
- var m = metaFor(obj, false), chains = m.chains;
-
- // make sure the object has its own guid.
- if (GUID_KEY in obj && !obj.hasOwnProperty(GUID_KEY)) {
- Ember.generateGuid(obj, 'ember');
- }
-
- // make sure any chained watchers update.
- if (chains && chains.value() !== obj) {
- m.chains = chains.copy(obj);
- }
-
- return this;
-};
-
-Ember.finishChains = function(obj) {
- var m = metaFor(obj, false), chains = m.chains;
- if (chains) {
- if (chains.value() !== obj) {
- m.chains = chains = chains.copy(obj);
- }
- chains.didChange(true);
- }
-};
-
-// ..........................................................
-// PROPERTY CHANGES
-//
-
-/**
- This function is called just before an object property is about to change.
- It will notify any before observers and prepare caches among other things.
-
- Normally you will not need to call this method directly but if for some
- reason you can't directly watch a property you can invoke this method
- manually along with `Ember.propertyDidChange()` which you should call just
- after the property value changes.
-
- @memberOf Ember
-
- @param {Object} obj
- The object with the property that will change
-
- @param {String} keyName
- The property key (or path) that will change.
-
- @returns {void}
-*/
-function propertyWillChange(obj, keyName, value) {
- var m = metaFor(obj, false),
- watching = m.watching[keyName] > 0 || keyName === 'length',
- proto = m.proto,
- desc = m.descs[keyName];
-
- if (!watching) { return; }
- if (proto === obj) { return; }
- if (desc && desc.willChange) { desc.willChange(obj, keyName); }
- dependentKeysWillChange(obj, keyName, m);
- chainsWillChange(obj, keyName, m);
- Ember.notifyBeforeObservers(obj, keyName);
-}
-
-Ember.propertyWillChange = propertyWillChange;
-
-/**
- This function is called just after an object property has changed.
- It will notify any observers and clear caches among other things.
-
- Normally you will not need to call this method directly but if for some
- reason you can't directly watch a property you can invoke this method
- manually along with `Ember.propertyWilLChange()` which you should call just
- before the property value changes.
-
- @memberOf Ember
-
- @param {Object} obj
- The object with the property that will change
-
- @param {String} keyName
- The property key (or path) that will change.
-
- @returns {void}
-*/
-function propertyDidChange(obj, keyName) {
- var m = metaFor(obj, false),
- watching = m.watching[keyName] > 0 || keyName === 'length',
- proto = m.proto,
- desc = m.descs[keyName];
-
- if (proto === obj) { return; }
-
- // shouldn't this mean that we're watching this key?
- if (desc && desc.didChange) { desc.didChange(obj, keyName); }
- if (!watching && keyName !== 'length') { return; }
-
- dependentKeysDidChange(obj, keyName, m);
- chainsDidChange(obj, keyName, m);
- Ember.notifyObservers(obj, keyName);
-}
-
-Ember.propertyDidChange = propertyDidChange;
-
-var NODE_STACK = [];
-
-/**
- Tears down the meta on an object so that it can be garbage collected.
- Multiple calls will have no effect.
-
- @param {Object} obj the object to destroy
- @returns {void}
-*/
-Ember.destroy = function (obj) {
- var meta = obj[META_KEY], node, nodes, key, nodeObject;
- if (meta) {
- obj[META_KEY] = null;
- // remove chainWatchers to remove circular references that would prevent GC
- node = meta.chains;
- if (node) {
- NODE_STACK.push(node);
- // process tree
- while (NODE_STACK.length > 0) {
- node = NODE_STACK.pop();
- // push children
- nodes = node._chains;
- if (nodes) {
- for (key in nodes) {
- if (nodes.hasOwnProperty(key)) {
- NODE_STACK.push(nodes[key]);
- }
- }
- }
- // remove chainWatcher in node object
- if (node._watching) {
- nodeObject = node._object;
- if (nodeObject) {
- removeChainWatcher(nodeObject, node._key, node);
- }
- }
- }
- }
- }
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-Ember.warn("Computed properties will soon be cacheable by default. To enable this in your app, set `ENV.CP_DEFAULT_CACHEABLE = true`.", Ember.CP_DEFAULT_CACHEABLE);
-
-
-var get = Ember.get,
- metaFor = Ember.meta,
- guidFor = Ember.guidFor,
- a_slice = [].slice,
- o_create = Ember.create,
- META_KEY = Ember.META_KEY,
- watch = Ember.watch,
- unwatch = Ember.unwatch;
-
-// ..........................................................
-// DEPENDENT KEYS
-//
-
-// data structure:
-// meta.deps = {
-// 'depKey': {
-// 'keyName': count,
-// __emberproto__: SRC_OBJ [to detect clones]
-// },
-// __emberproto__: SRC_OBJ
-// }
-
-/**
- @private
-
- This function returns a map of unique dependencies for a
- given object and key.
-*/
-function keysForDep(obj, depsMeta, depKey) {
- var keys = depsMeta[depKey];
- if (!keys) {
- // if there are no dependencies yet for a the given key
- // create a new empty list of dependencies for the key
- keys = depsMeta[depKey] = { __emberproto__: obj };
- } else if (keys.__emberproto__ !== obj) {
- // otherwise if the dependency list is inherited from
- // a superclass, clone the hash
- keys = depsMeta[depKey] = o_create(keys);
- keys.__emberproto__ = obj;
- }
- return keys;
-}
-
-/**
- @private
-
- return obj[META_KEY].deps
- */
-function metaForDeps(obj, meta) {
- var deps = meta.deps;
- // If the current object has no dependencies...
- if (!deps) {
- // initialize the dependencies with a pointer back to
- // the current object
- deps = meta.deps = { __emberproto__: obj };
- } else if (deps.__emberproto__ !== obj) {
- // otherwise if the dependencies are inherited from the
- // object's superclass, clone the deps
- deps = meta.deps = o_create(deps);
- deps.__emberproto__ = obj;
- }
- return deps;
-}
-
-/** @private */
-function addDependentKeys(desc, obj, keyName, meta) {
- // the descriptor has a list of dependent keys, so
- // add all of its dependent keys.
- var depKeys = desc._dependentKeys, depsMeta, idx, len, depKey, keys;
- if (!depKeys) return;
-
- depsMeta = metaForDeps(obj, meta);
-
- for(idx = 0, len = depKeys.length; idx < len; idx++) {
- depKey = depKeys[idx];
- // Lookup keys meta for depKey
- keys = keysForDep(obj, depsMeta, depKey);
- // Increment the number of times depKey depends on keyName.
- keys[keyName] = (keys[keyName] || 0) + 1;
- // Watch the depKey
- watch(obj, depKey);
- }
-}
-
-/** @private */
-function removeDependentKeys(desc, obj, keyName, meta) {
- // the descriptor has a list of dependent keys, so
- // add all of its dependent keys.
- var depKeys = desc._dependentKeys, depsMeta, idx, len, depKey, keys;
- if (!depKeys) return;
-
- depsMeta = metaForDeps(obj, meta);
-
- for(idx = 0, len = depKeys.length; idx < len; idx++) {
- depKey = depKeys[idx];
- // Lookup keys meta for depKey
- keys = keysForDep(obj, depsMeta, depKey);
- // Increment the number of times depKey depends on keyName.
- keys[keyName] = (keys[keyName] || 0) - 1;
- // Watch the depKey
- unwatch(obj, depKey);
- }
-}
-
-// ..........................................................
-// COMPUTED PROPERTY
-//
-
-/** @private */
-function ComputedProperty(func, opts) {
- this.func = func;
- this._cacheable = (opts && opts.cacheable !== undefined) ? opts.cacheable : Ember.CP_DEFAULT_CACHEABLE;
- this._dependentKeys = opts && opts.dependentKeys;
-}
-
-/**
- @constructor
-*/
-Ember.ComputedProperty = ComputedProperty;
-ComputedProperty.prototype = new Ember.Descriptor();
-
-/**
- @extends Ember.ComputedProperty
- @private
-*/
-var ComputedPropertyPrototype = ComputedProperty.prototype;
-
-/**
- Call on a computed property to set it into cacheable mode. When in this
- mode the computed property will automatically cache the return value of
- your function until one of the dependent keys changes.
-
- MyApp.president = Ember.Object.create({
- fullName: function() {
- return this.get('firstName') + ' ' + this.get('lastName');
-
- // After calculating the value of this function, Ember.js will
- // return that value without re-executing this function until
- // one of the dependent properties change.
- }.property('firstName', 'lastName').cacheable()
- });
-
- Properties are cacheable by default.
-
- @memberOf Ember.ComputedProperty.prototype
- @name cacheable
- @function
- @param {Boolean} aFlag optional set to false to disable caching
- @returns {Ember.ComputedProperty} receiver
-*/
-ComputedPropertyPrototype.cacheable = function(aFlag) {
- this._cacheable = aFlag !== false;
- return this;
-};
-
-/**
- Call on a computed property to set it into non-cached mode. When in this
- mode the computed property will not automatically cache the return value.
-
- MyApp.outsideService = Ember.Object.create({
- value: function() {
- return OutsideService.getValue();
- }.property().volatile()
- });
-
- @memberOf Ember.ComputedProperty.prototype
- @name volatile
- @function
- @returns {Ember.ComputedProperty} receiver
-*/
-ComputedPropertyPrototype.volatile = function() {
- return this.cacheable(false);
-};
-
-/**
- Sets the dependent keys on this computed property. Pass any number of
- arguments containing key paths that this computed property depends on.
-
- MyApp.president = Ember.Object.create({
- fullName: Ember.computed(function() {
- return this.get('firstName') + ' ' + this.get('lastName');
-
- // Tell Ember.js that this computed property depends on firstName
- // and lastName
- }).property('firstName', 'lastName')
- });
-
- @memberOf Ember.ComputedProperty.prototype
- @name property
- @function
- @param {String} path... zero or more property paths
- @returns {Ember.ComputedProperty} receiver
-*/
-ComputedPropertyPrototype.property = function() {
- var args = [];
- for (var i = 0, l = arguments.length; i < l; i++) {
- args.push(arguments[i]);
- }
- this._dependentKeys = args;
- return this;
-};
-
-/**
- In some cases, you may want to annotate computed properties with additional
- metadata about how they function or what values they operate on. For example,
- computed property functions may close over variables that are then no longer
- available for introspection.
-
- You can pass a hash of these values to a computed property like this:
-
- person: function() {
- var personId = this.get('personId');
- return App.Person.create({ id: personId });
- }.property().meta({ type: App.Person })
-
- The hash that you pass to the `meta()` function will be saved on the
- computed property descriptor under the `_meta` key. Ember runtime
- exposes a public API for retrieving these values from classes,
- via the `metaForProperty()` function.
-
- @memberOf Ember.ComputedProperty.prototype
- @name meta
- @function
- @param {Hash} meta
- @returns {Ember.ComputedProperty} property descriptor instance
-*/
-
-ComputedPropertyPrototype.meta = function(meta) {
- if (arguments.length === 0) {
- return this._meta || {};
- } else {
- this._meta = meta;
- return this;
- }
-};
-
-/** @private - impl descriptor API */
-ComputedPropertyPrototype.willWatch = function(obj, keyName) {
- // watch already creates meta for this instance
- var meta = obj[META_KEY];
- Ember.assert('watch should have setup meta to be writable', meta.source === obj);
- if (!(keyName in meta.cache)) {
- addDependentKeys(this, obj, keyName, meta);
- }
-};
-
-ComputedPropertyPrototype.didUnwatch = function(obj, keyName) {
- var meta = obj[META_KEY];
- Ember.assert('unwatch should have setup meta to be writable', meta.source === obj);
- if (!(keyName in meta.cache)) {
- // unwatch already creates meta for this instance
- removeDependentKeys(this, obj, keyName, meta);
- }
-};
-
-/** @private - impl descriptor API */
-ComputedPropertyPrototype.didChange = function(obj, keyName) {
- // _suspended is set via a CP.set to ensure we don't clear
- // the cached value set by the setter
- if (this._cacheable && this._suspended !== obj) {
- var meta = metaFor(obj);
- if (keyName in meta.cache) {
- delete meta.cache[keyName];
- if (!meta.watching[keyName]) {
- removeDependentKeys(this, obj, keyName, meta);
- }
- }
- }
-};
-
-/** @private - impl descriptor API */
-ComputedPropertyPrototype.get = function(obj, keyName) {
- var ret, cache, meta;
- if (this._cacheable) {
- meta = metaFor(obj);
- cache = meta.cache;
- if (keyName in cache) { return cache[keyName]; }
- ret = cache[keyName] = this.func.call(obj, keyName);
- if (!meta.watching[keyName]) {
- addDependentKeys(this, obj, keyName, meta);
- }
- } else {
- ret = this.func.call(obj, keyName);
- }
- return ret;
-};
-
-/** @private - impl descriptor API */
-ComputedPropertyPrototype.set = function(obj, keyName, value) {
- var cacheable = this._cacheable,
- meta = metaFor(obj, cacheable),
- watched = meta.watching[keyName],
- oldSuspended = this._suspended,
- hadCachedValue,
- ret;
-
- this._suspended = obj;
-
- if (watched) { Ember.propertyWillChange(obj, keyName); }
- if (cacheable) {
- if (keyName in meta.cache) {
- delete meta.cache[keyName];
- hadCachedValue = true;
- }
- }
- ret = this.func.call(obj, keyName, value);
- if (cacheable) {
- if (!watched && !hadCachedValue) {
- addDependentKeys(this, obj, keyName, meta);
- }
- meta.cache[keyName] = ret;
- }
- if (watched) { Ember.propertyDidChange(obj, keyName); }
- this._suspended = oldSuspended;
- return ret;
-};
-
-/** @private - called when property is defined */
-ComputedPropertyPrototype.setup = function(obj, keyName) {
- var meta = obj[META_KEY];
- if (meta && meta.watching[keyName]) {
- addDependentKeys(this, obj, keyName, metaFor(obj));
- }
-};
-
-/** @private - called before property is overridden */
-ComputedPropertyPrototype.teardown = function(obj, keyName) {
- var meta = metaFor(obj);
-
- if (meta.watching[keyName] || keyName in meta.cache) {
- removeDependentKeys(this, obj, keyName, meta);
- }
-
- if (this._cacheable) { delete meta.cache[keyName]; }
-
- return null; // no value to restore
-};
-
-/**
- This helper returns a new property descriptor that wraps the passed
- computed property function. You can use this helper to define properties
- with mixins or via Ember.defineProperty().
-
- The function you pass will be used to both get and set property values.
- The function should accept two parameters, key and value. If value is not
- undefined you should set the value first. In either case return the
- current value of the property.
-
- @param {Function} func
- The computed property function.
-
- @returns {Ember.ComputedProperty} property descriptor instance
-*/
-Ember.computed = function(func) {
- var args;
-
- if (arguments.length > 1) {
- args = a_slice.call(arguments, 0, -1);
- func = a_slice.call(arguments, -1)[0];
- }
-
- var cp = new ComputedProperty(func);
-
- if (args) {
- cp.property.apply(cp, args);
- }
-
- return cp;
-};
-
-/**
- Returns the cached value for a property, if one exists.
- This can be useful for peeking at the value of a computed
- property that is generated lazily, without accidentally causing
- it to be created.
-
- @param {Object} obj the object whose property you want to check
- @param {String} key the name of the property whose cached value you want
- to return
-
-*/
-Ember.cacheFor = function cacheFor(obj, key) {
- var cache = metaFor(obj, false).cache;
-
- if (cache && key in cache) {
- return cache[key];
- }
-};
-
-Ember.computed.not = function(dependentKey) {
- return Ember.computed(dependentKey, function(key) {
- return !get(this, dependentKey);
- }).cacheable();
-};
-
-Ember.computed.empty = function(dependentKey) {
- return Ember.computed(dependentKey, function(key) {
- var val = get(this, dependentKey);
- return val === undefined || val === null || val === '' || (Ember.isArray(val) && get(val, 'length') === 0);
- }).cacheable();
-};
-
-Ember.computed.bool = function(dependentKey) {
- return Ember.computed(dependentKey, function(key) {
- return !!get(this, dependentKey);
- }).cacheable();
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var o_create = Ember.create,
- meta = Ember.meta,
- metaPath = Ember.metaPath,
- guidFor = Ember.guidFor,
- a_slice = [].slice;
-
-/**
- The event system uses a series of nested hashes to store listeners on an
- object. When a listener is registered, or when an event arrives, these
- hashes are consulted to determine which target and action pair to invoke.
-
- The hashes are stored in the object's meta hash, and look like this:
-
- // Object's meta hash
- {
- listeners: { // variable name: `listenerSet`
- "foo:changed": { // variable name: `targetSet`
- [targetGuid]: { // variable name: `actionSet`
- [methodGuid]: { // variable name: `action`
- target: [Object object],
- method: [Function function]
- }
- }
- }
- }
- }
-
-*/
-
-// Gets the set of all actions, keyed on the guid of each action's
-// method property.
-/** @private */
-function actionSetFor(obj, eventName, target, writable) {
- return metaPath(obj, ['listeners', eventName, guidFor(target)], writable);
-}
-
-// Gets the set of all targets, keyed on the guid of each action's
-// target property.
-/** @private */
-function targetSetFor(obj, eventName) {
- var listenerSet = meta(obj, false).listeners;
- if (!listenerSet) { return false; }
-
- return listenerSet[eventName] || false;
-}
-
-// TODO: This knowledge should really be a part of the
-// meta system.
-var SKIP_PROPERTIES = { __ember_source__: true };
-
-/** @private */
-function iterateSet(obj, eventName, callback, params) {
- var targetSet = targetSetFor(obj, eventName);
- if (!targetSet) { return false; }
- // Iterate through all elements of the target set
- for(var targetGuid in targetSet) {
- if (SKIP_PROPERTIES[targetGuid]) { continue; }
-
- var actionSet = targetSet[targetGuid];
- if (actionSet) {
- // Iterate through the elements of the action set
- for(var methodGuid in actionSet) {
- if (SKIP_PROPERTIES[methodGuid]) { continue; }
-
- var action = actionSet[methodGuid];
- if (action) {
- if (callback(action, params, obj) === true) {
- return true;
- }
- }
- }
- }
- }
- return false;
-}
-
-/** @private */
-function invokeAction(action, params, sender) {
- var method = action.method, target = action.target;
- // If there is no target, the target is the object
- // on which the event was fired.
- if (!target) { target = sender; }
- if ('string' === typeof method) { method = target[method]; }
- if (params) {
- method.apply(target, params);
- } else {
- method.apply(target);
- }
-}
-
-/**
- The sendEvent arguments > 2 are passed to an event listener.
-
- @memberOf Ember
-*/
-function addListener(obj, eventName, target, method) {
- Ember.assert("You must pass at least an object and event name to Ember.addListener", !!obj && !!eventName);
-
- if (!method && 'function' === typeof target) {
- method = target;
- target = null;
- }
-
- var actionSet = actionSetFor(obj, eventName, target, true),
- methodGuid = guidFor(method);
-
- if (!actionSet[methodGuid]) {
- actionSet[methodGuid] = { target: target, method: method };
- }
-
- if ('function' === typeof obj.didAddListener) {
- obj.didAddListener(eventName, target, method);
- }
-}
-
-/** @memberOf Ember */
-function removeListener(obj, eventName, target, method) {
- Ember.assert("You must pass at least an object and event name to Ember.removeListener", !!obj && !!eventName);
-
- if (!method && 'function' === typeof target) {
- method = target;
- target = null;
- }
-
- var actionSet = actionSetFor(obj, eventName, target, true),
- methodGuid = guidFor(method);
-
- // we can't simply delete this parameter, because if we do, we might
- // re-expose the property from the prototype chain.
- if (actionSet && actionSet[methodGuid]) { actionSet[methodGuid] = null; }
-
- if ('function' === typeof obj.didRemoveListener) {
- obj.didRemoveListener(eventName, target, method);
- }
-}
-
-// Suspend listener during callback.
-//
-// This should only be used by the target of the event listener
-// when it is taking an action that would cause the event, e.g.
-// an object might suspend its property change listener while it is
-// setting that property.
-/** @private */
-function suspendListener(obj, eventName, target, method, callback) {
- if (!method && 'function' === typeof target) {
- method = target;
- target = null;
- }
-
- var actionSet = actionSetFor(obj, eventName, target, true),
- methodGuid = guidFor(method),
- action = actionSet && actionSet[methodGuid];
-
- actionSet[methodGuid] = null;
- try {
- return callback.call(target);
- } finally {
- actionSet[methodGuid] = action;
- }
-}
-
-// returns a list of currently watched events
-/** @memberOf Ember */
-function watchedEvents(obj) {
- var listeners = meta(obj, false).listeners, ret = [];
-
- if (listeners) {
- for(var eventName in listeners) {
- if (!SKIP_PROPERTIES[eventName] && listeners[eventName]) {
- ret.push(eventName);
- }
- }
- }
- return ret;
-}
-
-/** @memberOf Ember */
-function sendEvent(obj, eventName, params) {
- // first give object a chance to handle it
- if (obj !== Ember && 'function' === typeof obj.sendEvent) {
- obj.sendEvent(eventName, params);
- }
-
- iterateSet(obj, eventName, invokeAction, params);
- return true;
-}
-
-/** @memberOf Ember */
-function deferEvent(obj, eventName, params) {
- var actions = [];
- iterateSet(obj, eventName, function (action) {
- actions.push(action);
- });
-
- return function() {
- if (obj.isDestroyed) { return; }
-
- if (obj !== Ember && 'function' === typeof obj.sendEvent) {
- obj.sendEvent(eventName, params);
- }
-
- for (var i=0, len=actions.length; i < len; ++i) {
- invokeAction(actions[i], params, obj);
- }
- };
-}
-
-/** @memberOf Ember */
-function hasListeners(obj, eventName) {
- if (iterateSet(obj, eventName, function() { return true; })) {
- return true;
- }
-
- // no listeners! might as well clean this up so it is faster later.
- var set = metaPath(obj, ['listeners'], true);
- set[eventName] = null;
-
- return false;
-}
-
-/** @memberOf Ember */
-function listenersFor(obj, eventName) {
- var ret = [];
- iterateSet(obj, eventName, function (action) {
- ret.push([action.target, action.method]);
- });
- return ret;
-}
-
-Ember.addListener = addListener;
-Ember.removeListener = removeListener;
-Ember._suspendListener = suspendListener;
-Ember.sendEvent = sendEvent;
-Ember.hasListeners = hasListeners;
-Ember.watchedEvents = watchedEvents;
-Ember.listenersFor = listenersFor;
-Ember.deferEvent = deferEvent;
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2010 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-// Ember.Logger
-// Ember.watch.flushPending
-// Ember.beginPropertyChanges, Ember.endPropertyChanges
-// Ember.guidFor
-
-// ..........................................................
-// HELPERS
-//
-
-var slice = [].slice,
- forEach = Ember.ArrayPolyfills.forEach;
-
-// invokes passed params - normalizing so you can pass target/func,
-// target/string or just func
-/** @private */
-function invoke(target, method, args, ignore) {
-
- if (method === undefined) {
- method = target;
- target = undefined;
- }
-
- if ('string' === typeof method) { method = target[method]; }
- if (args && ignore > 0) {
- args = args.length > ignore ? slice.call(args, ignore) : null;
- }
-
- // Unfortunately in some browsers we lose the backtrace if we rethrow the existing error,
- // so in the event that we don't have an `onerror` handler we don't wrap in a try/catch
- if ('function' === typeof Ember.onerror) {
- try {
- // IE8's Function.prototype.apply doesn't accept undefined/null arguments.
- return method.apply(target || this, args || []);
- } catch (error) {
- Ember.onerror(error);
- }
- } else {
- // IE8's Function.prototype.apply doesn't accept undefined/null arguments.
- return method.apply(target || this, args || []);
- }
-}
-
-
-// ..........................................................
-// RUNLOOP
-//
-
-var timerMark; // used by timers...
-
-/** @private */
-var RunLoop = function(prev) {
- this._prev = prev || null;
- this.onceTimers = {};
-};
-
-RunLoop.prototype = {
- end: function() {
- this.flush();
- },
-
- prev: function() {
- return this._prev;
- },
-
- // ..........................................................
- // Delayed Actions
- //
-
- schedule: function(queueName, target, method) {
- var queues = this._queues, queue;
- if (!queues) { queues = this._queues = {}; }
- queue = queues[queueName];
- if (!queue) { queue = queues[queueName] = []; }
-
- var args = arguments.length > 3 ? slice.call(arguments, 3) : null;
- queue.push({ target: target, method: method, args: args });
- return this;
- },
-
- flush: function(queueName) {
- var queueNames, idx, len, queue, log;
-
- if (!this._queues) { return this; } // nothing to do
-
- function iter(item) {
- invoke(item.target, item.method, item.args);
- }
-
- Ember.watch.flushPending(); // make sure all chained watchers are setup
-
- if (queueName) {
- while (this._queues && (queue = this._queues[queueName])) {
- this._queues[queueName] = null;
-
- // the sync phase is to allow property changes to propagate. don't
- // invoke observers until that is finished.
- if (queueName === 'sync') {
- log = Ember.LOG_BINDINGS;
- if (log) { Ember.Logger.log('Begin: Flush Sync Queue'); }
-
- Ember.beginPropertyChanges();
- try {
- forEach.call(queue, iter);
- } finally {
- Ember.endPropertyChanges();
- }
-
- if (log) { Ember.Logger.log('End: Flush Sync Queue'); }
-
- } else {
- forEach.call(queue, iter);
- }
- }
-
- } else {
- queueNames = Ember.run.queues;
- len = queueNames.length;
- idx = 0;
-
- outerloop:
- while (idx < len) {
- queueName = queueNames[idx];
- queue = this._queues && this._queues[queueName];
- delete this._queues[queueName];
-
- if (queue) {
- // the sync phase is to allow property changes to propagate. don't
- // invoke observers until that is finished.
- if (queueName === 'sync') {
- log = Ember.LOG_BINDINGS;
- if (log) { Ember.Logger.log('Begin: Flush Sync Queue'); }
-
- Ember.beginPropertyChanges();
- try {
- forEach.call(queue, iter);
- } finally {
- Ember.endPropertyChanges();
- }
-
- if (log) { Ember.Logger.log('End: Flush Sync Queue'); }
- } else {
- forEach.call(queue, iter);
- }
- }
-
- // Loop through prior queues
- for (var i = 0; i <= idx; i++) {
- if (this._queues && this._queues[queueNames[i]]) {
- // Start over at the first queue with contents
- idx = i;
- continue outerloop;
- }
- }
-
- idx++;
- }
- }
-
- timerMark = null;
-
- return this;
- }
-
-};
-
-Ember.RunLoop = RunLoop;
-
-// ..........................................................
-// Ember.run - this is ideally the only public API the dev sees
-//
-/**
-* @namespace Ember.run is both a function and a namespace for
-* RunLoop-related functions.
-* @name Ember.run
-*/
-
-/**
- Runs the passed target and method inside of a RunLoop, ensuring any
- deferred actions including bindings and views updates are flushed at the
- end.
-
- Normally you should not need to invoke this method yourself. However if
- you are implementing raw event handlers when interfacing with other
- libraries or plugins, you should probably wrap all of your code inside this
- call.
-
- Ember.run(function(){
- // code to be execute within a RunLoop
- });
-
- @name run
- @methodOf Ember.run
- @param {Object} target
- (Optional) target of method to call
-
- @param {Function|String} method
- Method to invoke. May be a function or a string. If you pass a string
- then it will be looked up on the passed target.
-
- @param {Object...} args
- Any additional arguments you wish to pass to the method.
-
- @returns {Object} return value from invoking the passed function.
-*/
-Ember.run = function(target, method) {
- var ret, loop;
- run.begin();
- try {
- if (target || method) { ret = invoke(target, method, arguments, 2); }
- } finally {
- run.end();
- }
- return ret;
-};
-
-/** @private */
-var run = Ember.run;
-
-
-/**
- Begins a new RunLoop. Any deferred actions invoked after the begin will
- be buffered until you invoke a matching call to Ember.run.end(). This is
- an lower-level way to use a RunLoop instead of using Ember.run().
-
- Ember.run.begin();
- // code to be execute within a RunLoop
- Ember.run.end();
-
-
- @returns {void}
-*/
-Ember.run.begin = function() {
- run.currentRunLoop = new RunLoop(run.currentRunLoop);
-};
-
-/**
- Ends a RunLoop. This must be called sometime after you call Ember.run.begin()
- to flush any deferred actions. This is a lower-level way to use a RunLoop
- instead of using Ember.run().
-
- Ember.run.begin();
- // code to be execute within a RunLoop
- Ember.run.end();
-
- @returns {void}
-*/
-Ember.run.end = function() {
- Ember.assert('must have a current run loop', run.currentRunLoop);
- try {
- run.currentRunLoop.end();
- }
- finally {
- run.currentRunLoop = run.currentRunLoop.prev();
- }
-};
-
-/**
- Array of named queues. This array determines the order in which queues
- are flushed at the end of the RunLoop. You can define your own queues by
- simply adding the queue name to this array. Normally you should not need
- to inspect or modify this property.
-
- @type Array
- @default ['sync', 'actions', 'destroy', 'timers']
-*/
-Ember.run.queues = ['sync', 'actions', 'destroy', 'timers'];
-
-/**
- Adds the passed target/method and any optional arguments to the named
- queue to be executed at the end of the RunLoop. If you have not already
- started a RunLoop when calling this method one will be started for you
- automatically.
-
- At the end of a RunLoop, any methods scheduled in this way will be invoked.
- Methods will be invoked in an order matching the named queues defined in
- the run.queues property.
-
- Ember.run.schedule('timers', this, function(){
- // this will be executed at the end of the RunLoop, when timers are run
- console.log("scheduled on timers queue");
- });
- Ember.run.schedule('sync', this, function(){
- // this will be executed at the end of the RunLoop, when bindings are synced
- console.log("scheduled on sync queue");
- });
- // Note the functions will be run in order based on the run queues order. Output would be:
- // scheduled on sync queue
- // scheduled on timers queue
-
- @param {String} queue
- The name of the queue to schedule against. Default queues are 'sync' and
- 'actions'
-
- @param {Object} target
- (Optional) target object to use as the context when invoking a method.
-
- @param {String|Function} method
- The method to invoke. If you pass a string it will be resolved on the
- target object at the time the scheduled item is invoked allowing you to
- change the target function.
-
- @param {Object} arguments...
- Optional arguments to be passed to the queued method.
-
- @returns {void}
-*/
-Ember.run.schedule = function(queue, target, method) {
- var loop = run.autorun();
- loop.schedule.apply(loop, arguments);
-};
-
-var scheduledAutorun;
-/** @private */
-function autorun() {
- scheduledAutorun = null;
- if (run.currentRunLoop) { run.end(); }
-}
-
-// Used by global test teardown
-/** @private */
-Ember.run.hasScheduledTimers = function() {
- return !!(scheduledAutorun || scheduledLater || scheduledNext);
-};
-
-// Used by global test teardown
-/** @private */
-Ember.run.cancelTimers = function () {
- if (scheduledAutorun) {
- clearTimeout(scheduledAutorun);
- scheduledAutorun = null;
- }
- if (scheduledLater) {
- clearTimeout(scheduledLater);
- scheduledLater = null;
- }
- if (scheduledNext) {
- clearTimeout(scheduledNext);
- scheduledNext = null;
- }
- timers = {};
-};
-
-/**
- Begins a new RunLoop if necessary and schedules a timer to flush the
- RunLoop at a later time. This method is used by parts of Ember to
- ensure the RunLoop always finishes. You normally do not need to call this
- method directly. Instead use Ember.run().
-
- Ember.run.autorun();
-
- @returns {Ember.RunLoop} the new current RunLoop
-*/
-Ember.run.autorun = function() {
- if (!run.currentRunLoop) {
- Ember.assert("You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run", !Ember.testing);
-
- run.begin();
-
- if (!scheduledAutorun) {
- scheduledAutorun = setTimeout(autorun, 1);
- }
- }
-
- return run.currentRunLoop;
-};
-
-/**
- Immediately flushes any events scheduled in the 'sync' queue. Bindings
- use this queue so this method is a useful way to immediately force all
- bindings in the application to sync.
-
- You should call this method anytime you need any changed state to propagate
- throughout the app immediately without repainting the UI.
-
- Ember.run.sync();
-
- @returns {void}
-*/
-Ember.run.sync = function() {
- run.autorun();
- run.currentRunLoop.flush('sync');
-};
-
-// ..........................................................
-// TIMERS
-//
-
-var timers = {}; // active timers...
-
-var scheduledLater;
-/** @private */
-function invokeLaterTimers() {
- scheduledLater = null;
- var now = (+ new Date()), earliest = -1;
- for (var key in timers) {
- if (!timers.hasOwnProperty(key)) { continue; }
- var timer = timers[key];
- if (timer && timer.expires) {
- if (now >= timer.expires) {
- delete timers[key];
- invoke(timer.target, timer.method, timer.args, 2);
- } else {
- if (earliest<0 || (timer.expires < earliest)) earliest=timer.expires;
- }
- }
- }
-
- // schedule next timeout to fire...
- if (earliest > 0) { scheduledLater = setTimeout(invokeLaterTimers, earliest-(+ new Date())); }
-}
-
-/**
- Invokes the passed target/method and optional arguments after a specified
- period if time. The last parameter of this method must always be a number
- of milliseconds.
-
- You should use this method whenever you need to run some action after a
- period of time instead of using setTimeout(). This method will ensure that
- items that expire during the same script execution cycle all execute
- together, which is often more efficient than using a real setTimeout.
-
- Ember.run.later(myContext, function(){
- // code here will execute within a RunLoop in about 500ms with this == myContext
- }, 500);
-
- @param {Object} target
- (optional) target of method to invoke
-
- @param {Function|String} method
- The method to invoke. If you pass a string it will be resolved on the
- target at the time the method is invoked.
-
- @param {Object...} args
- Optional arguments to pass to the timeout.
-
- @param {Number} wait
- Number of milliseconds to wait.
-
- @returns {String} a string you can use to cancel the timer in Ember.run.cancel() later.
-*/
-Ember.run.later = function(target, method) {
- var args, expires, timer, guid, wait;
-
- // setTimeout compatibility...
- if (arguments.length===2 && 'function' === typeof target) {
- wait = method;
- method = target;
- target = undefined;
- args = [target, method];
- } else {
- args = slice.call(arguments);
- wait = args.pop();
- }
-
- expires = (+ new Date()) + wait;
- timer = { target: target, method: method, expires: expires, args: args };
- guid = Ember.guidFor(timer);
- timers[guid] = timer;
- run.once(timers, invokeLaterTimers);
- return guid;
-};
-
-/** @private */
-function invokeOnceTimer(guid, onceTimers) {
- if (onceTimers[this.tguid]) { delete onceTimers[this.tguid][this.mguid]; }
- if (timers[guid]) { invoke(this.target, this.method, this.args, 2); }
- delete timers[guid];
-}
-
-/**
- Schedules an item to run one time during the current RunLoop. Calling
- this method with the same target/method combination will have no effect.
-
- Note that although you can pass optional arguments these will not be
- considered when looking for duplicates. New arguments will replace previous
- calls.
-
- Ember.run(function(){
- var doFoo = function() { foo(); }
- Ember.run.once(myContext, doFoo);
- Ember.run.once(myContext, doFoo);
- // doFoo will only be executed once at the end of the RunLoop
- });
-
- @param {Object} target
- (optional) target of method to invoke
-
- @param {Function|String} method
- The method to invoke. If you pass a string it will be resolved on the
- target at the time the method is invoked.
-
- @param {Object...} args
- Optional arguments to pass to the timeout.
-
-
- @returns {Object} timer
-*/
-Ember.run.once = function(target, method) {
- var tguid = Ember.guidFor(target),
- mguid = Ember.guidFor(method),
- onceTimers = run.autorun().onceTimers,
- guid = onceTimers[tguid] && onceTimers[tguid][mguid],
- timer;
-
- if (guid && timers[guid]) {
- timers[guid].args = slice.call(arguments); // replace args
- } else {
- timer = {
- target: target,
- method: method,
- args: slice.call(arguments),
- tguid: tguid,
- mguid: mguid
- };
-
- guid = Ember.guidFor(timer);
- timers[guid] = timer;
- if (!onceTimers[tguid]) { onceTimers[tguid] = {}; }
- onceTimers[tguid][mguid] = guid; // so it isn't scheduled more than once
-
- run.schedule('actions', timer, invokeOnceTimer, guid, onceTimers);
- }
-
- return guid;
-};
-
-var scheduledNext;
-/** @private */
-function invokeNextTimers() {
- scheduledNext = null;
- for(var key in timers) {
- if (!timers.hasOwnProperty(key)) { continue; }
- var timer = timers[key];
- if (timer.next) {
- delete timers[key];
- invoke(timer.target, timer.method, timer.args, 2);
- }
- }
-}
-
-/**
- Schedules an item to run after control has been returned to the system.
- This is often equivalent to calling setTimeout(function...,1).
-
- Ember.run.next(myContext, function(){
- // code to be executed in the next RunLoop, which will be scheduled after the current one
- });
-
- @param {Object} target
- (optional) target of method to invoke
-
- @param {Function|String} method
- The method to invoke. If you pass a string it will be resolved on the
- target at the time the method is invoked.
-
- @param {Object...} args
- Optional arguments to pass to the timeout.
-
- @returns {Object} timer
-*/
-Ember.run.next = function(target, method) {
- var guid,
- timer = {
- target: target,
- method: method,
- args: slice.call(arguments),
- next: true
- };
-
- guid = Ember.guidFor(timer);
- timers[guid] = timer;
-
- if (!scheduledNext) { scheduledNext = setTimeout(invokeNextTimers, 1); }
- return guid;
-};
-
-/**
- Cancels a scheduled item. Must be a value returned by `Ember.run.later()`,
- `Ember.run.once()`, or `Ember.run.next()`.
-
- var runNext = Ember.run.next(myContext, function(){
- // will not be executed
- });
- Ember.run.cancel(runNext);
-
- var runLater = Ember.run.later(myContext, function(){
- // will not be executed
- }, 500);
- Ember.run.cancel(runLater);
-
- var runOnce = Ember.run.once(myContext, function(){
- // will not be executed
- });
- Ember.run.cancel(runOnce);
-
- @param {Object} timer
- Timer object to cancel
-
- @returns {void}
-*/
-Ember.run.cancel = function(timer) {
- delete timers[timer];
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-// Ember.Logger
-// get, set, trySet
-// guidFor, isArray, meta
-// addObserver, removeObserver
-// Ember.run.schedule
-// ..........................................................
-// CONSTANTS
-//
-
-/**
- @static
-
- Debug parameter you can turn on. This will log all bindings that fire to
- the console. This should be disabled in production code. Note that you
- can also enable this from the console or temporarily.
-
- @type Boolean
- @default false
-*/
-Ember.LOG_BINDINGS = false || !!Ember.ENV.LOG_BINDINGS;
-
-var get = Ember.get,
- set = Ember.set,
- guidFor = Ember.guidFor,
- isGlobalPath = Ember.isGlobalPath;
-
-
-/** @private */
-function getWithGlobals(obj, path) {
- return get(isGlobalPath(path) ? window : obj, path);
-}
-
-// ..........................................................
-// BINDING
-//
-
-/** @private */
-var Binding = function(toPath, fromPath) {
- this._direction = 'fwd';
- this._from = fromPath;
- this._to = toPath;
- this._directionMap = Ember.Map.create();
-};
-
-Binding.prototype = /** @scope Ember.Binding.prototype */ {
- /**
- This copies the Binding so it can be connected to another object.
- @returns {Ember.Binding}
- */
- copy: function () {
- var copy = new Binding(this._to, this._from);
- if (this._oneWay) { copy._oneWay = true; }
- return copy;
- },
-
- // ..........................................................
- // CONFIG
- //
-
- /**
- This will set "from" property path to the specified value. It will not
- attempt to resolve this property path to an actual object until you
- connect the binding.
-
- The binding will search for the property path starting at the root object
- you pass when you connect() the binding. It follows the same rules as
- `get()` - see that method for more information.
-
- @param {String} propertyPath the property path to connect to
- @returns {Ember.Binding} receiver
- */
- from: function(path) {
- this._from = path;
- return this;
- },
-
- /**
- This will set the "to" property path to the specified value. It will not
- attempt to resolve this property path to an actual object until you
- connect the binding.
-
- The binding will search for the property path starting at the root object
- you pass when you connect() the binding. It follows the same rules as
- `get()` - see that method for more information.
-
- @param {String|Tuple} propertyPath A property path or tuple
- @returns {Ember.Binding} this
- */
- to: function(path) {
- this._to = path;
- return this;
- },
-
- /**
- Configures the binding as one way. A one-way binding will relay changes
- on the "from" side to the "to" side, but not the other way around. This
- means that if you change the "to" side directly, the "from" side may have
- a different value.
-
- @returns {Ember.Binding} receiver
- */
- oneWay: function() {
- this._oneWay = true;
- return this;
- },
-
- /** @private */
- toString: function() {
- var oneWay = this._oneWay ? '[oneWay]' : '';
- return "Ember.Binding<" + guidFor(this) + ">(" + this._from + " -> " + this._to + ")" + oneWay;
- },
-
- // ..........................................................
- // CONNECT AND SYNC
- //
-
- /**
- Attempts to connect this binding instance so that it can receive and relay
- changes. This method will raise an exception if you have not set the
- from/to properties yet.
-
- @param {Object} obj The root object for this binding.
- @returns {Ember.Binding} this
- */
- connect: function(obj) {
- Ember.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
-
- var fromPath = this._from, toPath = this._to;
- Ember.trySet(obj, toPath, getWithGlobals(obj, fromPath));
-
- // add an observer on the object to be notified when the binding should be updated
- Ember.addObserver(obj, fromPath, this, this.fromDidChange);
-
- // if the binding is a two-way binding, also set up an observer on the target
- if (!this._oneWay) { Ember.addObserver(obj, toPath, this, this.toDidChange); }
-
- this._readyToSync = true;
-
- return this;
- },
-
- /**
- Disconnects the binding instance. Changes will no longer be relayed. You
- will not usually need to call this method.
-
- @param {Object} obj
- The root object you passed when connecting the binding.
-
- @returns {Ember.Binding} this
- */
- disconnect: function(obj) {
- Ember.assert('Must pass a valid object to Ember.Binding.disconnect()', !!obj);
-
- var twoWay = !this._oneWay;
-
- // remove an observer on the object so we're no longer notified of
- // changes that should update bindings.
- Ember.removeObserver(obj, this._from, this, this.fromDidChange);
-
- // if the binding is two-way, remove the observer from the target as well
- if (twoWay) { Ember.removeObserver(obj, this._to, this, this.toDidChange); }
-
- this._readyToSync = false; // disable scheduled syncs...
- return this;
- },
-
- // ..........................................................
- // PRIVATE
- //
-
- /** @private - called when the from side changes */
- fromDidChange: function(target) {
- this._scheduleSync(target, 'fwd');
- },
-
- /** @private - called when the to side changes */
- toDidChange: function(target) {
- this._scheduleSync(target, 'back');
- },
-
- /** @private */
- _scheduleSync: function(obj, dir) {
- var directionMap = this._directionMap;
- var existingDir = directionMap.get(obj);
-
- // if we haven't scheduled the binding yet, schedule it
- if (!existingDir) {
- Ember.run.schedule('sync', this, this._sync, obj);
- directionMap.set(obj, dir);
- }
-
- // If both a 'back' and 'fwd' sync have been scheduled on the same object,
- // default to a 'fwd' sync so that it remains deterministic.
- if (existingDir === 'back' && dir === 'fwd') {
- directionMap.set(obj, 'fwd');
- }
- },
-
- /** @private */
- _sync: function(obj) {
- var log = Ember.LOG_BINDINGS;
-
- // don't synchronize destroyed objects or disconnected bindings
- if (obj.isDestroyed || !this._readyToSync) { return; }
-
- // get the direction of the binding for the object we are
- // synchronizing from
- var directionMap = this._directionMap;
- var direction = directionMap.get(obj);
-
- var fromPath = this._from, toPath = this._to;
-
- directionMap.remove(obj);
-
- // if we're synchronizing from the remote object...
- if (direction === 'fwd') {
- var fromValue = getWithGlobals(obj, this._from);
- if (log) {
- Ember.Logger.log(' ', this.toString(), '->', fromValue, obj);
- }
- if (this._oneWay) {
- Ember.trySet(obj, toPath, fromValue);
- } else {
- Ember._suspendObserver(obj, toPath, this, this.toDidChange, function () {
- Ember.trySet(obj, toPath, fromValue);
- });
- }
- // if we're synchronizing *to* the remote object
- } else if (direction === 'back') {
- var toValue = get(obj, this._to);
- if (log) {
- Ember.Logger.log(' ', this.toString(), '<-', toValue, obj);
- }
- Ember._suspendObserver(obj, fromPath, this, this.fromDidChange, function () {
- Ember.trySet(Ember.isGlobalPath(fromPath) ? window : obj, fromPath, toValue);
- });
- }
- }
-
-};
-
-/** @private */
-function mixinProperties(to, from) {
- for (var key in from) {
- if (from.hasOwnProperty(key)) {
- to[key] = from[key];
- }
- }
-}
-
-mixinProperties(Binding,
-/** @scope Ember.Binding */ {
-
- /**
- @see Ember.Binding.prototype.from
- */
- from: function() {
- var C = this, binding = new C();
- return binding.from.apply(binding, arguments);
- },
-
- /**
- @see Ember.Binding.prototype.to
- */
- to: function() {
- var C = this, binding = new C();
- return binding.to.apply(binding, arguments);
- },
-
- /**
- Creates a new Binding instance and makes it apply in a single direction.
- A one-way binding will relay changes on the "from" side object (supplies
- as the `from` argument) the "to" side, but not the other way around.
- This means that if you change the "to" side directly, the "from" side may have
- a different value.
-
- @param {String} from from path.
- @param {Boolean} [flag] (Optional) passing nothing here will make the binding oneWay. You can
- instead pass false to disable oneWay, making the binding two way again.
-
- @see Ember.Binding.prototype.oneWay
- */
- oneWay: function(from, flag) {
- var C = this, binding = new C(null, from);
- return binding.oneWay(flag);
- }
-
-});
-
-/**
- @class
-
- An Ember.Binding connects the properties of two objects so that whenever the
- value of one property changes, the other property will be changed also.
-
- ## Automatic Creation of Bindings with `/^*Binding/`-named Properties
- You do not usually create Binding objects directly but instead describe
- bindings in your class or object definition using automatic binding detection.
-
- Properties ending in a `Binding` suffix will be converted to Ember.Binding instances.
- The value of this property should be a string representing a path to another object or
- a custom binding instanced created using Binding helpers (see "Customizing Your Bindings"):
-
- valueBinding: "MyApp.someController.title"
-
- This will create a binding from `MyApp.someController.title` to the `value`
- property of your object instance automatically. Now the two values will be
- kept in sync.
-
- ## One Way Bindings
-
- One especially useful binding customization you can use is the `oneWay()`
- helper. This helper tells Ember that you are only interested in
- receiving changes on the object you are binding from. For example, if you
- are binding to a preference and you want to be notified if the preference
- has changed, but your object will not be changing the preference itself, you
- could do:
-
- bigTitlesBinding: Ember.Binding.oneWay("MyApp.preferencesController.bigTitles")
-
- This way if the value of MyApp.preferencesController.bigTitles changes the
- "bigTitles" property of your object will change also. However, if you
- change the value of your "bigTitles" property, it will not update the
- preferencesController.
-
- One way bindings are almost twice as fast to setup and twice as fast to
- execute because the binding only has to worry about changes to one side.
-
- You should consider using one way bindings anytime you have an object that
- may be created frequently and you do not intend to change a property; only
- to monitor it for changes. (such as in the example above).
-
- ## Adding Bindings Manually
-
- All of the examples above show you how to configure a custom binding, but
- the result of these customizations will be a binding template, not a fully
- active Binding instance. The binding will actually become active only when you
- instantiate the object the binding belongs to. It is useful however, to
- understand what actually happens when the binding is activated.
-
- For a binding to function it must have at least a "from" property and a "to"
- property. The from property path points to the object/key that you want to
- bind from while the to path points to the object/key you want to bind to.
-
- When you define a custom binding, you are usually describing the property
- you want to bind from (such as "MyApp.someController.value" in the examples
- above). When your object is created, it will automatically assign the value
- you want to bind "to" based on the name of your binding key. In the
- examples above, during init, Ember objects will effectively call
- something like this on your binding:
-
- binding = Ember.Binding.from(this.valueBinding).to("value");
-
- This creates a new binding instance based on the template you provide, and
- sets the to path to the "value" property of the new object. Now that the
- binding is fully configured with a "from" and a "to", it simply needs to be
- connected to become active. This is done through the connect() method:
-
- binding.connect(this);
-
- Note that when you connect a binding you pass the object you want it to be
- connected to. This object will be used as the root for both the from and
- to side of the binding when inspecting relative paths. This allows the
- binding to be automatically inherited by subclassed objects as well.
-
- Now that the binding is connected, it will observe both the from and to side
- and relay changes.
-
- If you ever needed to do so (you almost never will, but it is useful to
- understand this anyway), you could manually create an active binding by
- using the Ember.bind() helper method. (This is the same method used by
- to setup your bindings on objects):
-
- Ember.bind(MyApp.anotherObject, "value", "MyApp.someController.value");
-
- Both of these code fragments have the same effect as doing the most friendly
- form of binding creation like so:
-
- MyApp.anotherObject = Ember.Object.create({
- valueBinding: "MyApp.someController.value",
-
- // OTHER CODE FOR THIS OBJECT...
-
- });
-
- Ember's built in binding creation method makes it easy to automatically
- create bindings for you. You should always use the highest-level APIs
- available, even if you understand how it works underneath.
-
- @since Ember 0.9
-*/
-Ember.Binding = Binding;
-
-/**
- Global helper method to create a new binding. Just pass the root object
- along with a to and from path to create and connect the binding.
-
- @param {Object} obj
- The root object of the transform.
-
- @param {String} to
- The path to the 'to' side of the binding. Must be relative to obj.
-
- @param {String} from
- The path to the 'from' side of the binding. Must be relative to obj or
- a global path.
-
- @returns {Ember.Binding} binding instance
-*/
-Ember.bind = function(obj, to, from) {
- return new Ember.Binding(to, from).connect(obj);
-};
-
-Ember.oneWay = function(obj, to, from) {
- return new Ember.Binding(to, from).oneWay().connect(obj);
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var Mixin, REQUIRED, Alias,
- classToString, superClassString,
- a_map = Ember.ArrayPolyfills.map,
- a_indexOf = Ember.ArrayPolyfills.indexOf,
- a_forEach = Ember.ArrayPolyfills.forEach,
- a_slice = [].slice,
- EMPTY_META = {}, // dummy for non-writable meta
- META_SKIP = { __emberproto__: true, __ember_count__: true },
- o_create = Ember.create,
- defineProperty = Ember.defineProperty,
- guidFor = Ember.guidFor;
-
-/** @private */
-function mixinsMeta(obj) {
- var m = Ember.meta(obj, true), ret = m.mixins;
- if (!ret) {
- ret = m.mixins = { __emberproto__: obj };
- } else if (ret.__emberproto__ !== obj) {
- ret = m.mixins = o_create(ret);
- ret.__emberproto__ = obj;
- }
- return ret;
-}
-
-/** @private */
-function initMixin(mixin, args) {
- if (args && args.length > 0) {
- mixin.mixins = a_map.call(args, function(x) {
- if (x instanceof Mixin) { return x; }
-
- // Note: Manually setup a primitive mixin here. This is the only
- // way to actually get a primitive mixin. This way normal creation
- // of mixins will give you combined mixins...
- var mixin = new Mixin();
- mixin.properties = x;
- return mixin;
- });
- }
- return mixin;
-}
-
-/** @private */
-function isMethod(obj) {
- return 'function' === typeof obj &&
- obj.isMethod !== false &&
- obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String;
-}
-
-/** @private */
-function mergeMixins(mixins, m, descs, values, base) {
- var len = mixins.length, idx, mixin, guid, props, value, key, ovalue, concats;
-
- /** @private */
- function removeKeys(keyName) {
- delete descs[keyName];
- delete values[keyName];
- }
-
- for(idx=0; idx < len; idx++) {
- mixin = mixins[idx];
- Ember.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(mixin), typeof mixin === 'object' && mixin !== null && Object.prototype.toString.call(mixin) !== '[object Array]');
-
- if (mixin instanceof Mixin) {
- guid = guidFor(mixin);
- if (m[guid]) { continue; }
- m[guid] = mixin;
- props = mixin.properties;
- } else {
- props = mixin; // apply anonymous mixin properties
- }
-
- if (props) {
- // reset before adding each new mixin to pickup concats from previous
- concats = values.concatenatedProperties || base.concatenatedProperties;
- if (props.concatenatedProperties) {
- concats = concats ? concats.concat(props.concatenatedProperties) : props.concatenatedProperties;
- }
-
- for (key in props) {
- if (!props.hasOwnProperty(key)) { continue; }
- value = props[key];
- if (value instanceof Ember.Descriptor) {
- if (value === REQUIRED && descs[key]) { continue; }
-
- descs[key] = value;
- values[key] = undefined;
- } else {
- // impl super if needed...
- if (isMethod(value)) {
- ovalue = descs[key] === undefined && values[key];
- if (!ovalue) { ovalue = base[key]; }
- if ('function' !== typeof ovalue) { ovalue = null; }
- if (ovalue) {
- var o = value.__ember_observes__, ob = value.__ember_observesBefore__;
- value = Ember.wrap(value, ovalue);
- value.__ember_observes__ = o;
- value.__ember_observesBefore__ = ob;
- }
- } else if ((concats && a_indexOf.call(concats, key) >= 0) || key === 'concatenatedProperties') {
- var baseValue = values[key] || base[key];
- value = baseValue ? baseValue.concat(value) : Ember.makeArray(value);
- }
-
- descs[key] = undefined;
- values[key] = value;
- }
- }
-
- // manually copy toString() because some JS engines do not enumerate it
- if (props.hasOwnProperty('toString')) {
- base.toString = props.toString;
- }
-
- } else if (mixin.mixins) {
- mergeMixins(mixin.mixins, m, descs, values, base);
- if (mixin._without) { a_forEach.call(mixin._without, removeKeys); }
- }
- }
-}
-
-/** @private */
-function writableReq(obj) {
- var m = Ember.meta(obj), req = m.required;
- if (!req || req.__emberproto__ !== obj) {
- req = m.required = req ? o_create(req) : { __ember_count__: 0 };
- req.__emberproto__ = obj;
- }
- return req;
-}
-
-var IS_BINDING = Ember.IS_BINDING = /^.+Binding$/;
-
-/** @private */
-function detectBinding(obj, key, value, m) {
- if (IS_BINDING.test(key)) {
- var bindings = m.bindings;
- if (!bindings) {
- bindings = m.bindings = { __emberproto__: obj };
- } else if (bindings.__emberproto__ !== obj) {
- bindings = m.bindings = o_create(m.bindings);
- bindings.__emberproto__ = obj;
- }
- bindings[key] = value;
- }
-}
-
-/** @private */
-function connectBindings(obj, m) {
- // TODO Mixin.apply(instance) should disconnect binding if exists
- var bindings = m.bindings, key, binding, to;
- if (bindings) {
- for (key in bindings) {
- binding = key !== '__emberproto__' && bindings[key];
- if (binding) {
- to = key.slice(0, -7); // strip Binding off end
- if (binding instanceof Ember.Binding) {
- binding = binding.copy(); // copy prototypes' instance
- binding.to(to);
- } else { // binding is string path
- binding = new Ember.Binding(to, binding);
- }
- binding.connect(obj);
- obj[key] = binding;
- }
- }
- // mark as applied
- m.bindings = { __emberproto__: obj };
- }
-}
-
-function finishPartial(obj, m) {
- connectBindings(obj, m || Ember.meta(obj));
- return obj;
-}
-
-/** @private */
-function applyMixin(obj, mixins, partial) {
- var descs = {}, values = {}, m = Ember.meta(obj), req = m.required,
- key, value, desc, prevValue, paths, len, idx;
-
- // Go through all mixins and hashes passed in, and:
- //
- // * Handle concatenated properties
- // * Set up _super wrapping if necessary
- // * Set up computed property descriptors
- // * Copying `toString` in broken browsers
- mergeMixins(mixins, mixinsMeta(obj), descs, values, obj);
-
- for(key in values) {
- if (key === 'contructor') { continue; }
- if (!values.hasOwnProperty(key)) { continue; }
-
- desc = descs[key];
- value = values[key];
-
- if (desc === REQUIRED) {
- if (!(key in obj)) {
- Ember.assert('Required property not defined: '+key, !!partial);
-
- // for partial applies add to hash of required keys
- req = writableReq(obj);
- req.__ember_count__++;
- req[key] = true;
- }
- } else {
- while (desc && desc instanceof Alias) {
- var altKey = desc.methodName;
- if (descs[altKey] || values[altKey]) {
- value = values[altKey];
- desc = descs[altKey];
- } else if (m.descs[altKey]) {
- desc = m.descs[altKey];
- value = undefined;
- } else {
- desc = undefined;
- value = obj[altKey];
- }
- }
-
- if (desc === undefined && value === undefined) { continue; }
-
- prevValue = obj[key];
-
- if ('function' === typeof prevValue) {
- if ((paths = prevValue.__ember_observesBefore__)) {
- len = paths.length;
- for (idx=0; idx < len; idx++) {
- Ember.removeBeforeObserver(obj, paths[idx], null, key);
- }
- } else if ((paths = prevValue.__ember_observes__)) {
- len = paths.length;
- for (idx=0; idx < len; idx++) {
- Ember.removeObserver(obj, paths[idx], null, key);
- }
- }
- }
-
- detectBinding(obj, key, value, m);
-
- defineProperty(obj, key, desc, value, m);
-
- if ('function' === typeof value) {
- if (paths = value.__ember_observesBefore__) {
- len = paths.length;
- for (idx=0; idx < len; idx++) {
- Ember.addBeforeObserver(obj, paths[idx], null, key);
- }
- } else if (paths = value.__ember_observes__) {
- len = paths.length;
- for (idx=0; idx < len; idx++) {
- Ember.addObserver(obj, paths[idx], null, key);
- }
- }
- }
-
- if (req && req[key]) {
- req = writableReq(obj);
- req.__ember_count__--;
- req[key] = false;
- }
- }
- }
-
- if (!partial) { // don't apply to prototype
- finishPartial(obj, m);
- }
-
- // Make sure no required attrs remain
- if (!partial && req && req.__ember_count__>0) {
- var keys = [];
- for (key in req) {
- if (META_SKIP[key]) { continue; }
- keys.push(key);
- }
- // TODO: Remove surrounding if clause from production build
- Ember.assert('Required properties not defined: '+keys.join(','));
- }
- return obj;
-}
-
-Ember.mixin = function(obj) {
- var args = a_slice.call(arguments, 1);
- applyMixin(obj, args, false);
- return obj;
-};
-
-/**
- @class
-
- The `Ember.Mixin` class allows you to create mixins, whose properties can be
- added to other classes. For instance,
-
- App.Editable = Ember.Mixin.create({
- edit: function() {
- console.log('starting to edit');
- this.set('isEditing', true);
- },
- isEditing: false
- });
-
- // Mix mixins into classes by passing them as the first arguments to
- // .extend or .create.
- App.CommentView = Ember.View.extend(App.Editable, {
- template: Ember.Handlebars.compile('{{#if isEditing}}...{{else}}...{{/if}}')
- });
-
- commentView = App.CommentView.create();
- commentView.edit(); // => outputs 'starting to edit'
-
- Note that Mixins are created with `Ember.Mixin.create`, not
- `Ember.Mixin.extend`.
-*/
-Ember.Mixin = function() { return initMixin(this, arguments); };
-
-/** @private */
-Mixin = Ember.Mixin;
-
-/** @private */
-Mixin._apply = applyMixin;
-
-Mixin.applyPartial = function(obj) {
- var args = a_slice.call(arguments, 1);
- return applyMixin(obj, args, true);
-};
-
-Mixin.finishPartial = finishPartial;
-
-Mixin.create = function() {
- classToString.processed = false;
- var M = this;
- return initMixin(new M(), arguments);
-};
-
-var MixinPrototype = Mixin.prototype;
-
-MixinPrototype.reopen = function() {
- var mixin, tmp;
-
- if (this.properties) {
- mixin = Mixin.create();
- mixin.properties = this.properties;
- delete this.properties;
- this.mixins = [mixin];
- } else if (!this.mixins) {
- this.mixins = [];
- }
-
- var len = arguments.length, mixins = this.mixins, idx;
-
- for(idx=0; idx < len; idx++) {
- mixin = arguments[idx];
- Ember.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(mixin), typeof mixin === 'object' && mixin !== null && Object.prototype.toString.call(mixin) !== '[object Array]');
-
- if (mixin instanceof Mixin) {
- mixins.push(mixin);
- } else {
- tmp = Mixin.create();
- tmp.properties = mixin;
- mixins.push(tmp);
- }
- }
-
- return this;
-};
-
-MixinPrototype.apply = function(obj) {
- return applyMixin(obj, [this], false);
-};
-
-MixinPrototype.applyPartial = function(obj) {
- return applyMixin(obj, [this], true);
-};
-
-/** @private */
-function _detect(curMixin, targetMixin, seen) {
- var guid = guidFor(curMixin);
-
- if (seen[guid]) { return false; }
- seen[guid] = true;
-
- if (curMixin === targetMixin) { return true; }
- var mixins = curMixin.mixins, loc = mixins ? mixins.length : 0;
- while (--loc >= 0) {
- if (_detect(mixins[loc], targetMixin, seen)) { return true; }
- }
- return false;
-}
-
-MixinPrototype.detect = function(obj) {
- if (!obj) { return false; }
- if (obj instanceof Mixin) { return _detect(obj, this, {}); }
- var mixins = Ember.meta(obj, false).mixins;
- if (mixins) {
- return !!mixins[guidFor(this)];
- }
- return false;
-};
-
-MixinPrototype.without = function() {
- var ret = new Mixin(this);
- ret._without = a_slice.call(arguments);
- return ret;
-};
-
-/** @private */
-function _keys(ret, mixin, seen) {
- if (seen[guidFor(mixin)]) { return; }
- seen[guidFor(mixin)] = true;
-
- if (mixin.properties) {
- var props = mixin.properties;
- for (var key in props) {
- if (props.hasOwnProperty(key)) { ret[key] = true; }
- }
- } else if (mixin.mixins) {
- a_forEach.call(mixin.mixins, function(x) { _keys(ret, x, seen); });
- }
-}
-
-MixinPrototype.keys = function() {
- var keys = {}, seen = {}, ret = [];
- _keys(keys, this, seen);
- for(var key in keys) {
- if (keys.hasOwnProperty(key)) { ret.push(key); }
- }
- return ret;
-};
-
-/** @private - make Mixin's have nice displayNames */
-
-var NAME_KEY = Ember.GUID_KEY+'_name';
-var get = Ember.get;
-
-/** @private */
-function processNames(paths, root, seen) {
- var idx = paths.length;
- for(var key in root) {
- if (!root.hasOwnProperty || !root.hasOwnProperty(key)) { continue; }
- var obj = root[key];
- paths[idx] = key;
-
- if (obj && obj.toString === classToString) {
- obj[NAME_KEY] = paths.join('.');
- } else if (obj && get(obj, 'isNamespace')) {
- if (seen[guidFor(obj)]) { continue; }
- seen[guidFor(obj)] = true;
- processNames(paths, obj, seen);
- }
- }
- paths.length = idx; // cut out last item
-}
-
-/** @private */
-function findNamespaces() {
- var Namespace = Ember.Namespace, obj, isNamespace;
-
- if (Namespace.PROCESSED) { return; }
-
- for (var prop in window) {
- // get(window.globalStorage, 'isNamespace') would try to read the storage for domain isNamespace and cause exception in Firefox.
- // globalStorage is a storage obsoleted by the WhatWG storage specification. See https://developer.mozilla.org/en/DOM/Storage#globalStorage
- if (prop === "globalStorage" && window.StorageList && window.globalStorage instanceof window.StorageList) { continue; }
- // Unfortunately, some versions of IE don't support window.hasOwnProperty
- if (window.hasOwnProperty && !window.hasOwnProperty(prop)) { continue; }
-
- // At times we are not allowed to access certain properties for security reasons.
- // There are also times where even if we can access them, we are not allowed to access their properties.
- try {
- obj = window[prop];
- isNamespace = obj && get(obj, 'isNamespace');
- } catch (e) {
- continue;
- }
-
- if (isNamespace) {
- Ember.deprecate("Namespaces should not begin with lowercase.", /^[A-Z]/.test(prop));
- obj[NAME_KEY] = prop;
- }
- }
-}
-
-Ember.identifyNamespaces = findNamespaces;
-
-/** @private */
-superClassString = function(mixin) {
- var superclass = mixin.superclass;
- if (superclass) {
- if (superclass[NAME_KEY]) { return superclass[NAME_KEY]; }
- else { return superClassString(superclass); }
- } else {
- return;
- }
-};
-
-/** @private */
-classToString = function() {
- var Namespace = Ember.Namespace, namespace;
-
- // TODO: Namespace should really be in Metal
- if (Namespace) {
- if (!this[NAME_KEY] && !classToString.processed) {
- if (!Namespace.PROCESSED) {
- findNamespaces();
- Namespace.PROCESSED = true;
- }
-
- classToString.processed = true;
-
- var namespaces = Namespace.NAMESPACES;
- for (var i=0, l=namespaces.length; i<l; i++) {
- namespace = namespaces[i];
- processNames([namespace.toString()], namespace, {});
- }
- }
- }
-
- if (this[NAME_KEY]) {
- return this[NAME_KEY];
- } else {
- var str = superClassString(this);
- if (str) {
- return "(subclass of " + str + ")";
- } else {
- return "(unknown mixin)";
- }
- }
-};
-
-MixinPrototype.toString = classToString;
-
-// returns the mixins currently applied to the specified object
-// TODO: Make Ember.mixin
-Mixin.mixins = function(obj) {
- var ret = [], mixins = Ember.meta(obj, false).mixins, key, mixin;
- if (mixins) {
- for(key in mixins) {
- if (META_SKIP[key]) { continue; }
- mixin = mixins[key];
-
- // skip primitive mixins since these are always anonymous
- if (!mixin.properties) { ret.push(mixins[key]); }
- }
- }
- return ret;
-};
-
-REQUIRED = new Ember.Descriptor();
-REQUIRED.toString = function() { return '(Required Property)'; };
-
-Ember.required = function() {
- return REQUIRED;
-};
-
-/** @private */
-Alias = function(methodName) {
- this.methodName = methodName;
-};
-Alias.prototype = new Ember.Descriptor();
-
-Ember.alias = function(methodName) {
- return new Alias(methodName);
-};
-
-// ..........................................................
-// OBSERVER HELPER
-//
-
-Ember.observer = function(func) {
- var paths = a_slice.call(arguments, 1);
- func.__ember_observes__ = paths;
- return func;
-};
-
-// If observers ever become asynchronous, Ember.immediateObserver
-// must remain synchronous.
-Ember.immediateObserver = function() {
- for (var i=0, l=arguments.length; i<l; i++) {
- var arg = arguments[i];
- Ember.assert("Immediate observers must observe internal properties only, not properties on other objects.", typeof arg !== "string" || arg.indexOf('.') === -1);
- }
-
- return Ember.observer.apply(this, arguments);
-};
-
-Ember.beforeObserver = function(func) {
- var paths = a_slice.call(arguments, 1);
- func.__ember_observesBefore__ = paths;
- return func;
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Metal
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-(function() {
-/**
- * @license
- * ==========================================================================
- * Ember
- * Copyright ©2006-2011, Strobe Inc. and contributors.
- * Portions copyright ©2008-2011 Apple Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * For more information about Ember, visit http://www.emberjs.com
- *
- * ==========================================================================
- */
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals ENV */
-var indexOf = Ember.EnumerableUtils.indexOf;
-
-// ........................................
-// TYPING & ARRAY MESSAGING
-//
-
-var TYPE_MAP = {};
-var t = "Boolean Number String Function Array Date RegExp Object".split(" ");
-Ember.ArrayPolyfills.forEach.call(t, function(name) {
- TYPE_MAP[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-var toString = Object.prototype.toString;
-
-/**
- Returns a consistent type for the passed item.
-
- Use this instead of the built-in Ember.typeOf() to get the type of an item.
- It will return the same result across all browsers and includes a bit
- more detail. Here is what will be returned:
-
- | Return Value | Meaning |
- |---------------|------------------------------------------------------|
- | 'string' | String primitive |
- | 'number' | Number primitive |
- | 'boolean' | Boolean primitive |
- | 'null' | Null value |
- | 'undefined' | Undefined value |
- | 'function' | A function |
- | 'array' | An instance of Array |
- | 'class' | A Ember class (created using Ember.Object.extend()) |
- | 'instance' | A Ember object instance |
- | 'error' | An instance of the Error object |
- | 'object' | A JavaScript object not inheriting from Ember.Object |
-
- Examples:
-
- Ember.typeOf(); => 'undefined'
- Ember.typeOf(null); => 'null'
- Ember.typeOf(undefined); => 'undefined'
- Ember.typeOf('michael'); => 'string'
- Ember.typeOf(101); => 'number'
- Ember.typeOf(true); => 'boolean'
- Ember.typeOf(Ember.makeArray); => 'function'
- Ember.typeOf([1,2,90]); => 'array'
- Ember.typeOf(Ember.Object.extend()); => 'class'
- Ember.typeOf(Ember.Object.create()); => 'instance'
- Ember.typeOf(new Error('teamocil')); => 'error'
-
- // "normal" JavaScript object
- Ember.typeOf({a: 'b'}); => 'object'
-
- @param item {Object} the item to check
- @returns {String} the type
-*/
-Ember.typeOf = function(item) {
- var ret;
-
- ret = (item === null || item === undefined) ? String(item) : TYPE_MAP[toString.call(item)] || 'object';
-
- if (ret === 'function') {
- if (Ember.Object && Ember.Object.detect(item)) ret = 'class';
- } else if (ret === 'object') {
- if (item instanceof Error) ret = 'error';
- else if (Ember.Object && item instanceof Ember.Object) ret = 'instance';
- else ret = 'object';
- }
-
- return ret;
-};
-
-/**
- Returns true if the passed value is null or undefined. This avoids errors
- from JSLint complaining about use of ==, which can be technically
- confusing.
-
- Ember.none(); => true
- Ember.none(null); => true
- Ember.none(undefined); => true
- Ember.none(''); => false
- Ember.none([]); => false
- Ember.none(function(){}); => false
-
- @param {Object} obj Value to test
- @returns {Boolean}
-*/
-Ember.none = function(obj) {
- return obj === null || obj === undefined;
-};
-
-/**
- Verifies that a value is null or an empty string | array | function.
-
- Constrains the rules on `Ember.none` by returning false for empty
- string and empty arrays.
-
- Ember.empty(); => true
- Ember.empty(null); => true
- Ember.empty(undefined); => true
- Ember.empty(''); => true
- Ember.empty([]); => true
- Ember.empty('tobias fünke'); => false
- Ember.empty([0,1,2]); => false
-
- @param {Object} obj Value to test
- @returns {Boolean}
-*/
-Ember.empty = function(obj) {
- return obj === null || obj === undefined || (obj.length === 0 && typeof obj !== 'function');
-};
-
-/**
- This will compare two javascript values of possibly different types.
- It will tell you which one is greater than the other by returning:
-
- - -1 if the first is smaller than the second,
- - 0 if both are equal,
- - 1 if the first is greater than the second.
-
- The order is calculated based on Ember.ORDER_DEFINITION, if types are different.
- In case they have the same type an appropriate comparison for this type is made.
-
- Ember.compare('hello', 'hello'); => 0
- Ember.compare('abc', 'dfg'); => -1
- Ember.compare(2, 1); => 1
-
- @param {Object} v First value to compare
- @param {Object} w Second value to compare
- @returns {Number} -1 if v < w, 0 if v = w and 1 if v > w.
-*/
-Ember.compare = function compare(v, w) {
- if (v === w) { return 0; }
-
- var type1 = Ember.typeOf(v);
- var type2 = Ember.typeOf(w);
-
- var Comparable = Ember.Comparable;
- if (Comparable) {
- if (type1==='instance' && Comparable.detect(v.constructor)) {
- return v.constructor.compare(v, w);
- }
-
- if (type2 === 'instance' && Comparable.detect(w.constructor)) {
- return 1-w.constructor.compare(w, v);
- }
- }
-
- // If we haven't yet generated a reverse-mapping of Ember.ORDER_DEFINITION,
- // do so now.
- var mapping = Ember.ORDER_DEFINITION_MAPPING;
- if (!mapping) {
- var order = Ember.ORDER_DEFINITION;
- mapping = Ember.ORDER_DEFINITION_MAPPING = {};
- var idx, len;
- for (idx = 0, len = order.length; idx < len; ++idx) {
- mapping[order[idx]] = idx;
- }
-
- // We no longer need Ember.ORDER_DEFINITION.
- delete Ember.ORDER_DEFINITION;
- }
-
- var type1Index = mapping[type1];
- var type2Index = mapping[type2];
-
- if (type1Index < type2Index) { return -1; }
- if (type1Index > type2Index) { return 1; }
-
- // types are equal - so we have to check values now
- switch (type1) {
- case 'boolean':
- case 'number':
- if (v < w) { return -1; }
- if (v > w) { return 1; }
- return 0;
-
- case 'string':
- var comp = v.localeCompare(w);
- if (comp < 0) { return -1; }
- if (comp > 0) { return 1; }
- return 0;
-
- case 'array':
- var vLen = v.length;
- var wLen = w.length;
- var l = Math.min(vLen, wLen);
- var r = 0;
- var i = 0;
- while (r === 0 && i < l) {
- r = compare(v[i],w[i]);
- i++;
- }
- if (r !== 0) { return r; }
-
- // all elements are equal now
- // shorter array should be ordered first
- if (vLen < wLen) { return -1; }
- if (vLen > wLen) { return 1; }
- // arrays are equal now
- return 0;
-
- case 'instance':
- if (Ember.Comparable && Ember.Comparable.detect(v)) {
- return v.compare(v, w);
- }
- return 0;
-
- case 'date':
- var vNum = v.getTime();
- var wNum = w.getTime();
- if (vNum < wNum) { return -1; }
- if (vNum > wNum) { return 1; }
- return 0;
-
- default:
- return 0;
- }
-};
-
-/** @private */
-function _copy(obj, deep, seen, copies) {
- var ret, loc, key;
-
- // primitive data types are immutable, just return them.
- if ('object' !== typeof obj || obj===null) return obj;
-
- // avoid cyclical loops
- if (deep && (loc=indexOf(seen, obj))>=0) return copies[loc];
-
- Ember.assert('Cannot clone an Ember.Object that does not implement Ember.Copyable', !(obj instanceof Ember.Object) || (Ember.Copyable && Ember.Copyable.detect(obj)));
-
- // IMPORTANT: this specific test will detect a native array only. Any other
- // object will need to implement Copyable.
- if (Ember.typeOf(obj) === 'array') {
- ret = obj.slice();
- if (deep) {
- loc = ret.length;
- while(--loc>=0) ret[loc] = _copy(ret[loc], deep, seen, copies);
- }
- } else if (Ember.Copyable && Ember.Copyable.detect(obj)) {
- ret = obj.copy(deep, seen, copies);
- } else {
- ret = {};
- for(key in obj) {
- if (!obj.hasOwnProperty(key)) continue;
- ret[key] = deep ? _copy(obj[key], deep, seen, copies) : obj[key];
- }
- }
-
- if (deep) {
- seen.push(obj);
- copies.push(ret);
- }
-
- return ret;
-}
-
-/**
- Creates a clone of the passed object. This function can take just about
- any type of object and create a clone of it, including primitive values
- (which are not actually cloned because they are immutable).
-
- If the passed object implements the clone() method, then this function
- will simply call that method and return the result.
-
- @param {Object} object The object to clone
- @param {Boolean} deep If true, a deep copy of the object is made
- @returns {Object} The cloned object
-*/
-Ember.copy = function(obj, deep) {
- // fast paths
- if ('object' !== typeof obj || obj===null) return obj; // can't copy primitives
- if (Ember.Copyable && Ember.Copyable.detect(obj)) return obj.copy(deep);
- return _copy(obj, deep, deep ? [] : null, deep ? [] : null);
-};
-
-/**
- Convenience method to inspect an object. This method will attempt to
- convert the object into a useful string description.
-
- @param {Object} obj The object you want to inspect.
- @returns {String} A description of the object
-*/
-Ember.inspect = function(obj) {
- var v, ret = [];
- for(var key in obj) {
- if (obj.hasOwnProperty(key)) {
- v = obj[key];
- if (v === 'toString') { continue; } // ignore useless items
- if (Ember.typeOf(v) === 'function') { v = "function() { ... }"; }
- ret.push(key + ": " + v);
- }
- }
- return "{" + ret.join(" , ") + "}";
-};
-
-/**
- Compares two objects, returning true if they are logically equal. This is
- a deeper comparison than a simple triple equal. For sets it will compare the
- internal objects. For any other object that implements `isEqual()` it will
- respect that method.
-
- Ember.isEqual('hello', 'hello'); => true
- Ember.isEqual(1, 2); => false
- Ember.isEqual([4,2], [4,2]); => false
-
- @param {Object} a first object to compare
- @param {Object} b second object to compare
- @returns {Boolean}
-*/
-Ember.isEqual = function(a, b) {
- if (a && 'function'===typeof a.isEqual) return a.isEqual(b);
- return a === b;
-};
-
-/**
- @private
- Used by Ember.compare
-*/
-Ember.ORDER_DEFINITION = Ember.ENV.ORDER_DEFINITION || [
- 'undefined',
- 'null',
- 'boolean',
- 'number',
- 'string',
- 'array',
- 'object',
- 'instance',
- 'function',
- 'class',
- 'date'
-];
-
-/**
- Returns all of the keys defined on an object or hash. This is useful
- when inspecting objects for debugging. On browsers that support it, this
- uses the native Object.keys implementation.
-
- @function
- @param {Object} obj
- @returns {Array} Array containing keys of obj
-*/
-Ember.keys = Object.keys;
-
-if (!Ember.keys) {
- Ember.keys = function(obj) {
- var ret = [];
- for(var key in obj) {
- if (obj.hasOwnProperty(key)) { ret.push(key); }
- }
- return ret;
- };
-}
-
-// ..........................................................
-// ERROR
-//
-
-/**
- @class
-
- A subclass of the JavaScript Error object for use in Ember.
-*/
-Ember.Error = function() {
- var tmp = Error.prototype.constructor.apply(this, arguments);
-
- for (var p in tmp) {
- if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; }
- }
- this.message = tmp.message;
-};
-
-Ember.Error.prototype = Ember.create(Error.prototype);
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-/** @private **/
-var STRING_DASHERIZE_REGEXP = (/[ _]/g);
-var STRING_DASHERIZE_CACHE = {};
-var STRING_DECAMELIZE_REGEXP = (/([a-z])([A-Z])/g);
-var STRING_CAMELIZE_REGEXP = (/(\-|_|\s)+(.)?/g);
-var STRING_UNDERSCORE_REGEXP_1 = (/([a-z\d])([A-Z]+)/g);
-var STRING_UNDERSCORE_REGEXP_2 = (/\-|\s+/g);
-
-/**
- Defines the hash of localized strings for the current language. Used by
- the `Ember.String.loc()` helper. To localize, add string values to this
- hash.
-
- @type Hash
-*/
-Ember.STRINGS = {};
-
-/**
- Defines string helper methods including string formatting and localization.
- Unless Ember.EXTEND_PROTOTYPES = false these methods will also be added to the
- String.prototype as well.
-
- @namespace
-*/
-Ember.String = {
-
- /**
- Apply formatting options to the string. This will look for occurrences
- of %@ in your string and substitute them with the arguments you pass into
- this method. If you want to control the specific order of replacement,
- you can add a number after the key as well to indicate which argument
- you want to insert.
-
- Ordered insertions are most useful when building loc strings where values
- you need to insert may appear in different orders.
-
- "Hello %@ %@".fmt('John', 'Doe') => "Hello John Doe"
- "Hello %@2, %@1".fmt('John', 'Doe') => "Hello Doe, John"
-
- @param {Object...} [args]
- @returns {String} formatted string
- */
- fmt: function(str, formats) {
- // first, replace any ORDERED replacements.
- var idx = 0; // the current index for non-numerical replacements
- return str.replace(/%@([0-9]+)?/g, function(s, argIndex) {
- argIndex = (argIndex) ? parseInt(argIndex,0) - 1 : idx++ ;
- s = formats[argIndex];
- return ((s === null) ? '(null)' : (s === undefined) ? '' : s).toString();
- }) ;
- },
-
- /**
- Formats the passed string, but first looks up the string in the localized
- strings hash. This is a convenient way to localize text. See
- `Ember.String.fmt()` for more information on formatting.
-
- Note that it is traditional but not required to prefix localized string
- keys with an underscore or other character so you can easily identify
- localized strings.
-
- Ember.STRINGS = {
- '_Hello World': 'Bonjour le monde',
- '_Hello %@ %@': 'Bonjour %@ %@'
- };
-
- Ember.String.loc("_Hello World");
- => 'Bonjour le monde';
-
- Ember.String.loc("_Hello %@ %@", ["John", "Smith"]);
- => "Bonjour John Smith";
-
- @param {String} str
- The string to format
-
- @param {Array} formats
- Optional array of parameters to interpolate into string.
-
- @returns {String} formatted string
- */
- loc: function(str, formats) {
- str = Ember.STRINGS[str] || str;
- return Ember.String.fmt(str, formats) ;
- },
-
- /**
- Splits a string into separate units separated by spaces, eliminating any
- empty strings in the process. This is a convenience method for split that
- is mostly useful when applied to the String.prototype.
-
- Ember.String.w("alpha beta gamma").forEach(function(key) {
- console.log(key);
- });
- > alpha
- > beta
- > gamma
-
- @param {String} str
- The string to split
-
- @returns {String} split string
- */
- w: function(str) { return str.split(/\s+/); },
-
- /**
- Converts a camelized string into all lower case separated by underscores.
-
- 'innerHTML'.decamelize() => 'inner_html'
- 'action_name'.decamelize() => 'action_name'
- 'css-class-name'.decamelize() => 'css-class-name'
- 'my favorite items'.decamelize() => 'my favorite items'
-
- @param {String} str
- The string to decamelize.
-
- @returns {String} the decamelized string.
- */
- decamelize: function(str) {
- return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase();
- },
-
- /**
- Replaces underscores or spaces with dashes.
-
- 'innerHTML'.dasherize() => 'inner-html'
- 'action_name'.dasherize() => 'action-name'
- 'css-class-name'.dasherize() => 'css-class-name'
- 'my favorite items'.dasherize() => 'my-favorite-items'
-
- @param {String} str
- The string to dasherize.
-
- @returns {String} the dasherized string.
- */
- dasherize: function(str) {
- var cache = STRING_DASHERIZE_CACHE,
- ret = cache[str];
-
- if (ret) {
- return ret;
- } else {
- ret = Ember.String.decamelize(str).replace(STRING_DASHERIZE_REGEXP,'-');
- cache[str] = ret;
- }
-
- return ret;
- },
-
- /**
- Returns the lowerCaseCamel form of a string.
-
- 'innerHTML'.camelize() => 'innerHTML'
- 'action_name'.camelize() => 'actionName'
- 'css-class-name'.camelize() => 'cssClassName'
- 'my favorite items'.camelize() => 'myFavoriteItems'
-
- @param {String} str
- The string to camelize.
-
- @returns {String} the camelized string.
- */
- camelize: function(str) {
- return str.replace(STRING_CAMELIZE_REGEXP, function(match, separator, chr) {
- return chr ? chr.toUpperCase() : '';
- });
- },
-
- /**
- Returns the UpperCamelCase form of a string.
-
- 'innerHTML'.classify() => 'InnerHTML'
- 'action_name'.classify() => 'ActionName'
- 'css-class-name'.classify() => 'CssClassName'
- 'my favorite items'.classift() => 'MyFavoriteItems'
- */
- classify: function(str) {
- var camelized = Ember.String.camelize(str);
- return camelized.charAt(0).toUpperCase() + camelized.substr(1);
- },
-
- /**
- More general than decamelize. Returns the lower_case_and_underscored
- form of a string.
-
- 'innerHTML'.underscore() => 'inner_html'
- 'action_name'.underscore() => 'action_name'
- 'css-class-name'.underscore() => 'css_class_name'
- 'my favorite items'.underscore() => 'my_favorite_items'
-
- @param {String} str
- The string to underscore.
-
- @returns {String} the underscored string.
- */
- underscore: function(str) {
- return str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').
- replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase();
- }
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var fmt = Ember.String.fmt,
- w = Ember.String.w,
- loc = Ember.String.loc,
- camelize = Ember.String.camelize,
- decamelize = Ember.String.decamelize,
- dasherize = Ember.String.dasherize,
- underscore = Ember.String.underscore;
-
-if (Ember.EXTEND_PROTOTYPES) {
-
- /**
- @see Ember.String.fmt
- */
- String.prototype.fmt = function() {
- return fmt(this, arguments);
- };
-
- /**
- @see Ember.String.w
- */
- String.prototype.w = function() {
- return w(this);
- };
-
- /**
- @see Ember.String.loc
- */
- String.prototype.loc = function() {
- return loc(this, arguments);
- };
-
- /**
- @see Ember.String.camelize
- */
- String.prototype.camelize = function() {
- return camelize(this);
- };
-
- /**
- @see Ember.String.decamelize
- */
- String.prototype.decamelize = function() {
- return decamelize(this);
- };
-
- /**
- @see Ember.String.dasherize
- */
- String.prototype.dasherize = function() {
- return dasherize(this);
- };
-
- /**
- @see Ember.String.underscore
- */
- String.prototype.underscore = function() {
- return underscore(this);
- };
-
-}
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var a_slice = Array.prototype.slice;
-
-if (Ember.EXTEND_PROTOTYPES) {
-
- /**
- The `property` extension of Javascript's Function prototype is available
- when Ember.EXTEND_PROTOTYPES is true, which is the default.
-
- Computed properties allow you to treat a function like a property:
-
- MyApp.president = Ember.Object.create({
- firstName: "Barack",
- lastName: "Obama",
-
- fullName: function() {
- return this.get('firstName') + ' ' + this.get('lastName');
-
- // Call this flag to mark the function as a property
- }.property()
- });
-
- MyApp.president.get('fullName'); => "Barack Obama"
-
- Treating a function like a property is useful because they can work with
- bindings, just like any other property.
-
- Many computed properties have dependencies on other properties. For
- example, in the above example, the `fullName` property depends on
- `firstName` and `lastName` to determine its value. You can tell Ember.js
- about these dependencies like this:
-
- MyApp.president = Ember.Object.create({
- firstName: "Barack",
- lastName: "Obama",
-
- fullName: function() {
- return this.get('firstName') + ' ' + this.get('lastName');
-
- // Tell Ember.js that this computed property depends on firstName
- // and lastName
- }.property('firstName', 'lastName')
- });
-
- Make sure you list these dependencies so Ember.js knows when to update
- bindings that connect to a computed property. Changing a dependency
- will not immediately trigger an update of the computed property, but
- will instead clear the cache so that it is updated when the next `get`
- is called on the property.
-
- Note: you will usually want to use `property(...)` with `cacheable()`.
-
- @see Ember.ComputedProperty
- @see Ember.computed
- */
- Function.prototype.property = function() {
- var ret = Ember.computed(this);
- return ret.property.apply(ret, arguments);
- };
-
- /**
- The `observes` extension of Javascript's Function prototype is available
- when Ember.EXTEND_PROTOTYPES is true, which is the default.
-
- You can observe property changes simply by adding the `observes`
- call to the end of your method declarations in classes that you write.
- For example:
-
- Ember.Object.create({
- valueObserver: function() {
- // Executes whenever the "value" property changes
- }.observes('value')
- });
-
- @see Ember.Observable
- */
- Function.prototype.observes = function() {
- this.__ember_observes__ = a_slice.call(arguments);
- return this;
- };
-
- /**
- The `observesBefore` extension of Javascript's Function prototype is
- available when Ember.EXTEND_PROTOTYPES is true, which is the default.
-
- You can get notified when a property changes is about to happen by
- by adding the `observesBefore` call to the end of your method
- declarations in classes that you write. For example:
-
- Ember.Object.create({
- valueObserver: function() {
- // Executes whenever the "value" property is about to change
- }.observesBefore('value')
- });
-
- @see Ember.Observable
- */
- Function.prototype.observesBefore = function() {
- this.__ember_observesBefore__ = a_slice.call(arguments);
- return this;
- };
-
-}
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-
-
-
-
-// ..........................................................
-// HELPERS
-//
-
-var get = Ember.get, set = Ember.set;
-var a_slice = Array.prototype.slice;
-var a_indexOf = Ember.EnumerableUtils.indexOf;
-
-var contexts = [];
-/** @private */
-function popCtx() {
- return contexts.length===0 ? {} : contexts.pop();
-}
-
-/** @private */
-function pushCtx(ctx) {
- contexts.push(ctx);
- return null;
-}
-
-/** @private */
-function iter(key, value) {
- var valueProvided = arguments.length === 2;
-
- function i(item) {
- var cur = get(item, key);
- return valueProvided ? value===cur : !!cur;
- }
- return i ;
-}
-
-/**
- @class
-
- This mixin defines the common interface implemented by enumerable objects
- in Ember. Most of these methods follow the standard Array iteration
- API defined up to JavaScript 1.8 (excluding language-specific features that
- cannot be emulated in older versions of JavaScript).
-
- This mixin is applied automatically to the Array class on page load, so you
- can use any of these methods on simple arrays. If Array already implements
- one of these methods, the mixin will not override them.
-
- h3. Writing Your Own Enumerable
-
- To make your own custom class enumerable, you need two items:
-
- 1. You must have a length property. This property should change whenever
- the number of items in your enumerable object changes. If you using this
- with an Ember.Object subclass, you should be sure to change the length
- property using set().
-
- 2. If you must implement nextObject(). See documentation.
-
- Once you have these two methods implement, apply the Ember.Enumerable mixin
- to your class and you will be able to enumerate the contents of your object
- like any other collection.
-
- h3. Using Ember Enumeration with Other Libraries
-
- Many other libraries provide some kind of iterator or enumeration like
- facility. This is often where the most common API conflicts occur.
- Ember's API is designed to be as friendly as possible with other
- libraries by implementing only methods that mostly correspond to the
- JavaScript 1.8 API.
-
- @extends Ember.Mixin
- @since Ember 0.9
-*/
-Ember.Enumerable = Ember.Mixin.create(
- /** @scope Ember.Enumerable.prototype */ {
-
- /** @private - compatibility */
- isEnumerable: true,
-
- /**
- Implement this method to make your class enumerable.
-
- This method will be call repeatedly during enumeration. The index value
- will always begin with 0 and increment monotonically. You don't have to
- rely on the index value to determine what object to return, but you should
- always check the value and start from the beginning when you see the
- requested index is 0.
-
- The previousObject is the object that was returned from the last call
- to nextObject for the current iteration. This is a useful way to
- manage iteration if you are tracing a linked list, for example.
-
- Finally the context parameter will always contain a hash you can use as
- a "scratchpad" to maintain any other state you need in order to iterate
- properly. The context object is reused and is not reset between
- iterations so make sure you setup the context with a fresh state whenever
- the index parameter is 0.
-
- Generally iterators will continue to call nextObject until the index
- reaches the your current length-1. If you run out of data before this
- time for some reason, you should simply return undefined.
-
- The default implementation of this method simply looks up the index.
- This works great on any Array-like objects.
-
- @param {Number} index the current index of the iteration
- @param {Object} previousObject the value returned by the last call to nextObject.
- @param {Object} context a context object you can use to maintain state.
- @returns {Object} the next object in the iteration or undefined
- */
- nextObject: Ember.required(Function),
-
- /**
- Helper method returns the first object from a collection. This is usually
- used by bindings and other parts of the framework to extract a single
- object if the enumerable contains only one item.
-
- If you override this method, you should implement it so that it will
- always return the same value each time it is called. If your enumerable
- contains only one object, this method should always return that object.
- If your enumerable is empty, this method should return undefined.
-
- var arr = ["a", "b", "c"];
- arr.firstObject(); => "a"
-
- var arr = [];
- arr.firstObject(); => undefined
-
- @returns {Object} the object or undefined
- */
- firstObject: Ember.computed(function() {
- if (get(this, 'length')===0) return undefined ;
-
- // handle generic enumerables
- var context = popCtx(), ret;
- ret = this.nextObject(0, null, context);
- pushCtx(context);
- return ret ;
- }).property('[]').cacheable(),
-
- /**
- Helper method returns the last object from a collection. If your enumerable
- contains only one object, this method should always return that object.
- If your enumerable is empty, this method should return undefined.
-
- var arr = ["a", "b", "c"];
- arr.lastObject(); => "c"
-
- var arr = [];
- arr.lastObject(); => undefined
-
- @returns {Object} the last object or undefined
- */
- lastObject: Ember.computed(function() {
- var len = get(this, 'length');
- if (len===0) return undefined ;
- var context = popCtx(), idx=0, cur, last = null;
- do {
- last = cur;
- cur = this.nextObject(idx++, last, context);
- } while (cur !== undefined);
- pushCtx(context);
- return last;
- }).property('[]').cacheable(),
-
- /**
- Returns true if the passed object can be found in the receiver. The
- default version will iterate through the enumerable until the object
- is found. You may want to override this with a more efficient version.
-
- var arr = ["a", "b", "c"];
- arr.contains("a"); => true
- arr.contains("z"); => false
-
- @param {Object} obj
- The object to search for.
-
- @returns {Boolean} true if object is found in enumerable.
- */
- contains: function(obj) {
- return this.find(function(item) { return item===obj; }) !== undefined;
- },
-
- /**
- Iterates through the enumerable, calling the passed function on each
- item. This method corresponds to the forEach() method defined in
- JavaScript 1.6.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(item, index, enumerable);
-
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- Note that in addition to a callback, you can also pass an optional target
- object that will be set as "this" on the context. This is a good way
- to give your iterator function access to the current object.
-
- @param {Function} callback The callback to execute
- @param {Object} [target] The target object to use
- @returns {Object} receiver
- */
- forEach: function(callback, target) {
- if (typeof callback !== "function") throw new TypeError() ;
- var len = get(this, 'length'), last = null, context = popCtx();
-
- if (target === undefined) target = null;
-
- for(var idx=0;idx<len;idx++) {
- var next = this.nextObject(idx, last, context) ;
- callback.call(target, next, idx, this);
- last = next ;
- }
- last = null ;
- context = pushCtx(context);
- return this ;
- },
-
- /**
- Alias for mapProperty
-
- @param {String} key name of the property
- @returns {Array} The mapped array.
- */
- getEach: function(key) {
- return this.mapProperty(key);
- },
-
- /**
- Sets the value on the named property for each member. This is more
- efficient than using other methods defined on this helper. If the object
- implements Ember.Observable, the value will be changed to set(), otherwise
- it will be set directly. null objects are skipped.
-
- @param {String} key The key to set
- @param {Object} value The object to set
- @returns {Object} receiver
- */
- setEach: function(key, value) {
- return this.forEach(function(item) {
- set(item, key, value);
- });
- },
-
- /**
- Maps all of the items in the enumeration to another value, returning
- a new array. This method corresponds to map() defined in JavaScript 1.6.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(item, index, enumerable);
-
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- It should return the mapped value.
-
- Note that in addition to a callback, you can also pass an optional target
- object that will be set as "this" on the context. This is a good way
- to give your iterator function access to the current object.
-
- @param {Function} callback The callback to execute
- @param {Object} [target] The target object to use
- @returns {Array} The mapped array.
- */
- map: function(callback, target) {
- var ret = [];
- this.forEach(function(x, idx, i) {
- ret[idx] = callback.call(target, x, idx,i);
- });
- return ret ;
- },
-
- /**
- Similar to map, this specialized function returns the value of the named
- property on all items in the enumeration.
-
- @param {String} key name of the property
- @returns {Array} The mapped array.
- */
- mapProperty: function(key) {
- return this.map(function(next) {
- return get(next, key);
- });
- },
-
- /**
- Returns an array with all of the items in the enumeration that the passed
- function returns true for. This method corresponds to filter() defined in
- JavaScript 1.6.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(item, index, enumerable);
-
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- It should return the true to include the item in the results, false otherwise.
-
- Note that in addition to a callback, you can also pass an optional target
- object that will be set as "this" on the context. This is a good way
- to give your iterator function access to the current object.
-
- @param {Function} callback The callback to execute
- @param {Object} [target] The target object to use
- @returns {Array} A filtered array.
- */
- filter: function(callback, target) {
- var ret = [];
- this.forEach(function(x, idx, i) {
- if (callback.call(target, x, idx, i)) ret.push(x);
- });
- return ret ;
- },
-
- /**
- Returns an array with just the items with the matched property. You
- can pass an optional second argument with the target value. Otherwise
- this will match any property that evaluates to true.
-
- @param {String} key the property to test
- @param {String} [value] optional value to test against.
- @returns {Array} filtered array
- */
- filterProperty: function(key, value) {
- return this.filter(iter.apply(this, arguments));
- },
-
- /**
- Returns the first item in the array for which the callback returns true.
- This method works similar to the filter() method defined in JavaScript 1.6
- except that it will stop working on the array once a match is found.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(item, index, enumerable);
-
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- It should return the true to include the item in the results, false otherwise.
-
- Note that in addition to a callback, you can also pass an optional target
- object that will be set as "this" on the context. This is a good way
- to give your iterator function access to the current object.
-
- @param {Function} callback The callback to execute
- @param {Object} [target] The target object to use
- @returns {Object} Found item or null.
- */
- find: function(callback, target) {
- var len = get(this, 'length') ;
- if (target === undefined) target = null;
-
- var last = null, next, found = false, ret ;
- var context = popCtx();
- for(var idx=0;idx<len && !found;idx++) {
- next = this.nextObject(idx, last, context) ;
- if (found = callback.call(target, next, idx, this)) ret = next ;
- last = next ;
- }
- next = last = null ;
- context = pushCtx(context);
- return ret ;
- },
-
- /**
- Returns the first item with a property matching the passed value. You
- can pass an optional second argument with the target value. Otherwise
- this will match any property that evaluates to true.
-
- This method works much like the more generic find() method.
-
- @param {String} key the property to test
- @param {String} [value] optional value to test against.
- @returns {Object} found item or null
- */
- findProperty: function(key, value) {
- return this.find(iter.apply(this, arguments));
- },
-
- /**
- Returns true if the passed function returns true for every item in the
- enumeration. This corresponds with the every() method in JavaScript 1.6.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(item, index, enumerable);
-
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- It should return the true or false.
-
- Note that in addition to a callback, you can also pass an optional target
- object that will be set as "this" on the context. This is a good way
- to give your iterator function access to the current object.
-
- Example Usage:
-
- if (people.every(isEngineer)) { Paychecks.addBigBonus(); }
-
- @param {Function} callback The callback to execute
- @param {Object} [target] The target object to use
- @returns {Boolean}
- */
- every: function(callback, target) {
- return !this.find(function(x, idx, i) {
- return !callback.call(target, x, idx, i);
- });
- },
-
- /**
- Returns true if the passed property resolves to true for all items in the
- enumerable. This method is often simpler/faster than using a callback.
-
- @param {String} key the property to test
- @param {String} [value] optional value to test against.
- @returns {Array} filtered array
- */
- everyProperty: function(key, value) {
- return this.every(iter.apply(this, arguments));
- },
-
-
- /**
- Returns true if the passed function returns true for any item in the
- enumeration. This corresponds with the every() method in JavaScript 1.6.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(item, index, enumerable);
-
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- It should return the true to include the item in the results, false otherwise.
-
- Note that in addition to a callback, you can also pass an optional target
- object that will be set as "this" on the context. This is a good way
- to give your iterator function access to the current object.
-
- Usage Example:
-
- if (people.some(isManager)) { Paychecks.addBiggerBonus(); }
-
- @param {Function} callback The callback to execute
- @param {Object} [target] The target object to use
- @returns {Array} A filtered array.
- */
- some: function(callback, target) {
- return !!this.find(function(x, idx, i) {
- return !!callback.call(target, x, idx, i);
- });
- },
-
- /**
- Returns true if the passed property resolves to true for any item in the
- enumerable. This method is often simpler/faster than using a callback.
-
- @param {String} key the property to test
- @param {String} [value] optional value to test against.
- @returns {Boolean} true
- */
- someProperty: function(key, value) {
- return this.some(iter.apply(this, arguments));
- },
-
- /**
- This will combine the values of the enumerator into a single value. It
- is a useful way to collect a summary value from an enumeration. This
- corresponds to the reduce() method defined in JavaScript 1.8.
-
- The callback method you provide should have the following signature (all
- parameters are optional):
-
- function(previousValue, item, index, enumerable);
-
- - *previousValue* is the value returned by the last call to the iterator.
- - *item* is the current item in the iteration.
- - *index* is the current index in the iteration
- - *enumerable* is the enumerable object itself.
-
- Return the new cumulative value.
-
- In addition to the callback you can also pass an initialValue. An error
- will be raised if you do not pass an initial value and the enumerator is
- empty.
-
- Note that unlike the other methods, this method does not allow you to
- pass a target object to set as this for the callback. It's part of the
- spec. Sorry.
-
- @param {Function} callback The callback to execute
- @param {Object} initialValue Initial value for the reduce
- @param {String} reducerProperty internal use only.
- @returns {Object} The reduced value.
- */
- reduce: function(callback, initialValue, reducerProperty) {
- if (typeof callback !== "function") { throw new TypeError(); }
-
- var ret = initialValue;
-
- this.forEach(function(item, i) {
- ret = callback.call(null, ret, item, i, this, reducerProperty);
- }, this);
-
- return ret;
- },
-
- /**
- Invokes the named method on every object in the receiver that
- implements it. This method corresponds to the implementation in
- Prototype 1.6.
-
- @param {String} methodName the name of the method
- @param {Object...} args optional arguments to pass as well.
- @returns {Array} return values from calling invoke.
- */
- invoke: function(methodName) {
- var args, ret = [];
- if (arguments.length>1) args = a_slice.call(arguments, 1);
-
- this.forEach(function(x, idx) {
- var method = x && x[methodName];
- if ('function' === typeof method) {
- ret[idx] = args ? method.apply(x, args) : method.call(x);
- }
- }, this);
-
- return ret;
- },
-
- /**
- Simply converts the enumerable into a genuine array. The order is not
- guaranteed. Corresponds to the method implemented by Prototype.
-
- @returns {Array} the enumerable as an array.
- */
- toArray: function() {
- var ret = [];
- this.forEach(function(o, idx) { ret[idx] = o; });
- return ret ;
- },
-
- /**
- Returns a copy of the array with all null elements removed.
-
- var arr = ["a", null, "c", null];
- arr.compact(); => ["a", "c"]
-
- @returns {Array} the array without null elements.
- */
- compact: function() { return this.without(null); },
-
- /**
- Returns a new enumerable that excludes the passed value. The default
- implementation returns an array regardless of the receiver type unless
- the receiver does not contain the value.
-
- var arr = ["a", "b", "a", "c"];
- arr.without("a"); => ["b", "c"]
-
- @param {Object} value
- @returns {Ember.Enumerable}
- */
- without: function(value) {
- if (!this.contains(value)) return this; // nothing to do
- var ret = [] ;
- this.forEach(function(k) {
- if (k !== value) ret[ret.length] = k;
- }) ;
- return ret ;
- },
-
- /**
- Returns a new enumerable that contains only unique values. The default
- implementation returns an array regardless of the receiver type.
-
- var arr = ["a", "a", "b", "b"];
- arr.uniq(); => ["a", "b"]
-
- @returns {Ember.Enumerable}
- */
- uniq: function() {
- var ret = [];
- this.forEach(function(k){
- if (a_indexOf(ret, k)<0) ret.push(k);
- });
- return ret;
- },
-
- /**
- This property will trigger anytime the enumerable's content changes.
- You can observe this property to be notified of changes to the enumerables
- content.
-
- For plain enumerables, this property is read only. Ember.Array overrides
- this method.
-
- @type Ember.Array
- */
- '[]': Ember.computed(function(key, value) {
- return this;
- }).property().cacheable(),
-
- // ..........................................................
- // ENUMERABLE OBSERVERS
- //
-
- /**
- Registers an enumerable observer. Must implement Ember.EnumerableObserver
- mixin.
- */
- addEnumerableObserver: function(target, opts) {
- var willChange = (opts && opts.willChange) || 'enumerableWillChange',
- didChange = (opts && opts.didChange) || 'enumerableDidChange';
-
- var hasObservers = get(this, 'hasEnumerableObservers');
- if (!hasObservers) Ember.propertyWillChange(this, 'hasEnumerableObservers');
- Ember.addListener(this, '@enumerable:before', target, willChange);
- Ember.addListener(this, '@enumerable:change', target, didChange);
- if (!hasObservers) Ember.propertyDidChange(this, 'hasEnumerableObservers');
- return this;
- },
-
- /**
- Removes a registered enumerable observer.
- */
- removeEnumerableObserver: function(target, opts) {
- var willChange = (opts && opts.willChange) || 'enumerableWillChange',
- didChange = (opts && opts.didChange) || 'enumerableDidChange';
-
- var hasObservers = get(this, 'hasEnumerableObservers');
- if (hasObservers) Ember.propertyWillChange(this, 'hasEnumerableObservers');
- Ember.removeListener(this, '@enumerable:before', target, willChange);
- Ember.removeListener(this, '@enumerable:change', target, didChange);
- if (hasObservers) Ember.propertyDidChange(this, 'hasEnumerableObservers');
- return this;
- },
-
- /**
- Becomes true whenever the array currently has observers watching changes
- on the array.
-
- @type Boolean
- */
- hasEnumerableObservers: Ember.computed(function() {
- return Ember.hasListeners(this, '@enumerable:change') || Ember.hasListeners(this, '@enumerable:before');
- }).property().cacheable(),
-
-
- /**
- Invoke this method just before the contents of your enumerable will
- change. You can either omit the parameters completely or pass the objects
- to be removed or added if available or just a count.
-
- @param {Ember.Enumerable|Number} removing
- An enumerable of the objects to be removed or the number of items to
- be removed.
-
- @param {Ember.Enumerable|Number} adding
- An enumerable of the objects to be added or the number of items to be
- added.
-
- @returns {Ember.Enumerable} receiver
- */
- enumerableContentWillChange: function(removing, adding) {
-
- var removeCnt, addCnt, hasDelta;
-
- if ('number' === typeof removing) removeCnt = removing;
- else if (removing) removeCnt = get(removing, 'length');
- else removeCnt = removing = -1;
-
- if ('number' === typeof adding) addCnt = adding;
- else if (adding) addCnt = get(adding,'length');
- else addCnt = adding = -1;
-
- hasDelta = addCnt<0 || removeCnt<0 || addCnt-removeCnt!==0;
-
- if (removing === -1) removing = null;
- if (adding === -1) adding = null;
-
- Ember.propertyWillChange(this, '[]');
- if (hasDelta) Ember.propertyWillChange(this, 'length');
- Ember.sendEvent(this, '@enumerable:before', [this, removing, adding]);
-
- return this;
- },
-
- /**
- Invoke this method when the contents of your enumerable has changed.
- This will notify any observers watching for content changes. If your are
- implementing an ordered enumerable (such as an array), also pass the
- start and end values where the content changed so that it can be used to
- notify range observers.
-
- @param {Number} start
- optional start offset for the content change. For unordered
- enumerables, you should always pass -1.
-
- @param {Ember.Enumerable|Number} removing
- An enumerable of the objects to be removed or the number of items to
- be removed.
-
- @param {Ember.Enumerable|Number} adding
- An enumerable of the objects to be added or the number of items to be
- added.
-
- @returns {Object} receiver
- */
- enumerableContentDidChange: function(removing, adding) {
- var notify = this.propertyDidChange, removeCnt, addCnt, hasDelta;
-
- if ('number' === typeof removing) removeCnt = removing;
- else if (removing) removeCnt = get(removing, 'length');
- else removeCnt = removing = -1;
-
- if ('number' === typeof adding) addCnt = adding;
- else if (adding) addCnt = get(adding, 'length');
- else addCnt = adding = -1;
-
- hasDelta = addCnt<0 || removeCnt<0 || addCnt-removeCnt!==0;
-
- if (removing === -1) removing = null;
- if (adding === -1) adding = null;
-
- Ember.sendEvent(this, '@enumerable:change', [this, removing, adding]);
- if (hasDelta) Ember.propertyDidChange(this, 'length');
- Ember.propertyDidChange(this, '[]');
-
- return this ;
- }
-
-}) ;
-
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-// ..........................................................
-// HELPERS
-//
-
-var get = Ember.get, set = Ember.set, meta = Ember.meta, map = Ember.EnumerableUtils.map, cacheFor = Ember.cacheFor;
-
-/** @private */
-function none(obj) { return obj===null || obj===undefined; }
-
-// ..........................................................
-// ARRAY
-//
-/**
- @namespace
-
- This module implements Observer-friendly Array-like behavior. This mixin is
- picked up by the Array class as well as other controllers, etc. that want to
- appear to be arrays.
-
- Unlike Ember.Enumerable, this mixin defines methods specifically for
- collections that provide index-ordered access to their contents. When you
- are designing code that needs to accept any kind of Array-like object, you
- should use these methods instead of Array primitives because these will
- properly notify observers of changes to the array.
-
- Although these methods are efficient, they do add a layer of indirection to
- your application so it is a good idea to use them only when you need the
- flexibility of using both true JavaScript arrays and "virtual" arrays such
- as controllers and collections.
-
- You can use the methods defined in this module to access and modify array
- contents in a KVO-friendly way. You can also be notified whenever the
- membership if an array changes by changing the syntax of the property to
- .observes('*myProperty.[]') .
-
- To support Ember.Array in your own class, you must override two
- primitives to use it: replace() and objectAt().
-
- Note that the Ember.Array mixin also incorporates the Ember.Enumerable mixin. All
- Ember.Array-like objects are also enumerable.
-
- @extends Ember.Enumerable
- @since Ember 0.9.0
-*/
-Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.prototype */ {
-
- /** @private - compatibility */
- isSCArray: true,
-
- /**
- @field {Number} length
-
- Your array must support the length property. Your replace methods should
- set this property whenever it changes.
- */
- length: Ember.required(),
-
- /**
- Returns the object at the given index. If the given index is negative or
- is greater or equal than the array length, returns `undefined`.
-
- This is one of the primitives you must implement to support `Ember.Array`.
- If your object supports retrieving the value of an array item using `get()`
- (i.e. `myArray.get(0)`), then you do not need to implement this method
- yourself.
-
- var arr = ['a', 'b', 'c', 'd'];
- arr.objectAt(0); => "a"
- arr.objectAt(3); => "d"
- arr.objectAt(-1); => undefined
- arr.objectAt(4); => undefined
- arr.objectAt(5); => undefined
-
- @param {Number} idx
- The index of the item to return.
- */
- objectAt: function(idx) {
- if ((idx < 0) || (idx>=get(this, 'length'))) return undefined ;
- return get(this, idx);
- },
-
- /**
- This returns the objects at the specified indexes, using `objectAt`.
-
- var arr = ['a', 'b', 'c', 'd'];
- arr.objectsAt([0, 1, 2]) => ["a", "b", "c"]
- arr.objectsAt([2, 3, 4]) => ["c", "d", undefined]
-
- @param {Array} indexes
- An array of indexes of items to return.
- */
- objectsAt: function(indexes) {
- var self = this;
- return map(indexes, function(idx){ return self.objectAt(idx); });
- },
-
- /** @private (nodoc) - overrides Ember.Enumerable version */
- nextObject: function(idx) {
- return this.objectAt(idx);
- },
-
- /**
- @field []
-
- This is the handler for the special array content property. If you get
- this property, it will return this. If you set this property it a new
- array, it will replace the current content.
-
- This property overrides the default property defined in Ember.Enumerable.
- */
- '[]': Ember.computed(function(key, value) {
- if (value !== undefined) this.replace(0, get(this, 'length'), value) ;
- return this ;
- }).property().cacheable(),
-
- firstObject: Ember.computed(function() {
- return this.objectAt(0);
- }).property().cacheable(),
-
- lastObject: Ember.computed(function() {
- return this.objectAt(get(this, 'length')-1);
- }).property().cacheable(),
-
- /** @private (nodoc) - optimized version from Enumerable */
- contains: function(obj){
- return this.indexOf(obj) >= 0;
- },
-
- // Add any extra methods to Ember.Array that are native to the built-in Array.
- /**
- Returns a new array that is a slice of the receiver. This implementation
- uses the observable array methods to retrieve the objects for the new
- slice.
-
- var arr = ['red', 'green', 'blue'];
- arr.slice(0); => ['red', 'green', 'blue']
- arr.slice(0, 2); => ['red', 'green']
- arr.slice(1, 100); => ['green', 'blue']
-
- @param beginIndex {Integer} (Optional) index to begin slicing from.
- @param endIndex {Integer} (Optional) index to end the slice at.
- @returns {Array} New array with specified slice
- */
- slice: function(beginIndex, endIndex) {
- var ret = [];
- var length = get(this, 'length') ;
- if (none(beginIndex)) beginIndex = 0 ;
- if (none(endIndex) || (endIndex > length)) endIndex = length ;
- while(beginIndex < endIndex) {
- ret[ret.length] = this.objectAt(beginIndex++) ;
- }
- return ret ;
- },
-
- /**
- Returns the index of the given object's first occurrence.
- If no startAt argument is given, the starting location to
- search is 0. If it's negative, will count backward from
- the end of the array. Returns -1 if no match is found.
-
- var arr = ["a", "b", "c", "d", "a"];
- arr.indexOf("a"); => 0
- arr.indexOf("z"); => -1
- arr.indexOf("a", 2); => 4
- arr.indexOf("a", -1); => 4
- arr.indexOf("b", 3); => -1
- arr.indexOf("a", 100); => -1
-
- @param {Object} object the item to search for
- @param {Number} startAt optional starting location to search, default 0
- @returns {Number} index or -1 if not found
- */
- indexOf: function(object, startAt) {
- var idx, len = get(this, 'length');
-
- if (startAt === undefined) startAt = 0;
- if (startAt < 0) startAt += len;
-
- for(idx=startAt;idx<len;idx++) {
- if (this.objectAt(idx, true) === object) return idx ;
- }
- return -1;
- },
-
- /**
- Returns the index of the given object's last occurrence.
- If no startAt argument is given, the search starts from
- the last position. If it's negative, will count backward
- from the end of the array. Returns -1 if no match is found.
-
- var arr = ["a", "b", "c", "d", "a"];
- arr.lastIndexOf("a"); => 4
- arr.lastIndexOf("z"); => -1
- arr.lastIndexOf("a", 2); => 0
- arr.lastIndexOf("a", -1); => 4
- arr.lastIndexOf("b", 3); => 1
- arr.lastIndexOf("a", 100); => 4
-
- @param {Object} object the item to search for
- @param {Number} startAt optional starting location to search, default 0
- @returns {Number} index or -1 if not found
- */
- lastIndexOf: function(object, startAt) {
- var idx, len = get(this, 'length');
-
- if (startAt === undefined || startAt >= len) startAt = len-1;
- if (startAt < 0) startAt += len;
-
- for(idx=startAt;idx>=0;idx--) {
- if (this.objectAt(idx) === object) return idx ;
- }
- return -1;
- },
-
- // ..........................................................
- // ARRAY OBSERVERS
- //
-
- /**
- Adds an array observer to the receiving array. The array observer object
- normally must implement two methods:
-
- * `arrayWillChange(start, removeCount, addCount)` - This method will be
- called just before the array is modified.
- * `arrayDidChange(start, removeCount, addCount)` - This method will be
- called just after the array is modified.
-
- Both callbacks will be passed the starting index of the change as well a
- a count of the items to be removed and added. You can use these callbacks
- to optionally inspect the array during the change, clear caches, or do
- any other bookkeeping necessary.
-
- In addition to passing a target, you can also include an options hash
- which you can use to override the method names that will be invoked on the
- target.
-
- @param {Object} target
- The observer object.
-
- @param {Hash} opts
- Optional hash of configuration options including willChange, didChange,
- and a context option.
-
- @returns {Ember.Array} receiver
- */
- addArrayObserver: function(target, opts) {
- var willChange = (opts && opts.willChange) || 'arrayWillChange',
- didChange = (opts && opts.didChange) || 'arrayDidChange';
-
- var hasObservers = get(this, 'hasArrayObservers');
- if (!hasObservers) Ember.propertyWillChange(this, 'hasArrayObservers');
- Ember.addListener(this, '@array:before', target, willChange);
- Ember.addListener(this, '@array:change', target, didChange);
- if (!hasObservers) Ember.propertyDidChange(this, 'hasArrayObservers');
- return this;
- },
-
- /**
- Removes an array observer from the object if the observer is current
- registered. Calling this method multiple times with the same object will
- have no effect.
-
- @param {Object} target
- The object observing the array.
-
- @returns {Ember.Array} receiver
- */
- removeArrayObserver: function(target, opts) {
- var willChange = (opts && opts.willChange) || 'arrayWillChange',
- didChange = (opts && opts.didChange) || 'arrayDidChange';
-
- var hasObservers = get(this, 'hasArrayObservers');
- if (hasObservers) Ember.propertyWillChange(this, 'hasArrayObservers');
- Ember.removeListener(this, '@array:before', target, willChange);
- Ember.removeListener(this, '@array:change', target, didChange);
- if (hasObservers) Ember.propertyDidChange(this, 'hasArrayObservers');
- return this;
- },
-
- /**
- Becomes true whenever the array currently has observers watching changes
- on the array.
-
- @type Boolean
- */
- hasArrayObservers: Ember.computed(function() {
- return Ember.hasListeners(this, '@array:change') || Ember.hasListeners(this, '@array:before');
- }).property().cacheable(),
-
- /**
- If you are implementing an object that supports Ember.Array, call this
- method just before the array content changes to notify any observers and
- invalidate any related properties. Pass the starting index of the change
- as well as a delta of the amounts to change.
-
- @param {Number} startIdx
- The starting index in the array that will change.
-
- @param {Number} removeAmt
- The number of items that will be removed. If you pass null assumes 0
-
- @param {Number} addAmt
- The number of items that will be added. If you pass null assumes 0.
-
- @returns {Ember.Array} receiver
- */
- arrayContentWillChange: function(startIdx, removeAmt, addAmt) {
-
- // if no args are passed assume everything changes
- if (startIdx===undefined) {
- startIdx = 0;
- removeAmt = addAmt = -1;
- } else {
- if (removeAmt === undefined) removeAmt=-1;
- if (addAmt === undefined) addAmt=-1;
- }
-
- // Make sure the @each proxy is set up if anyone is observing @each
- if (Ember.isWatching(this, '@each')) { get(this, '@each'); }
-
- Ember.sendEvent(this, '@array:before', [this, startIdx, removeAmt, addAmt]);
-
- var removing, lim;
- if (startIdx>=0 && removeAmt>=0 && get(this, 'hasEnumerableObservers')) {
- removing = [];
- lim = startIdx+removeAmt;
- for(var idx=startIdx;idx<lim;idx++) removing.push(this.objectAt(idx));
- } else {
- removing = removeAmt;
- }
-
- this.enumerableContentWillChange(removing, addAmt);
-
- return this;
- },
-
- arrayContentDidChange: function(startIdx, removeAmt, addAmt) {
-
- // if no args are passed assume everything changes
- if (startIdx===undefined) {
- startIdx = 0;
- removeAmt = addAmt = -1;
- } else {
- if (removeAmt === undefined) removeAmt=-1;
- if (addAmt === undefined) addAmt=-1;
- }
-
- var adding, lim;
- if (startIdx>=0 && addAmt>=0 && get(this, 'hasEnumerableObservers')) {
- adding = [];
- lim = startIdx+addAmt;
- for(var idx=startIdx;idx<lim;idx++) adding.push(this.objectAt(idx));
- } else {
- adding = addAmt;
- }
-
- this.enumerableContentDidChange(removeAmt, adding);
- Ember.sendEvent(this, '@array:change', [this, startIdx, removeAmt, addAmt]);
-
- var length = get(this, 'length'),
- cachedFirst = cacheFor(this, 'firstObject'),
- cachedLast = cacheFor(this, 'lastObject');
- if (this.objectAt(0) !== cachedFirst) {
- Ember.propertyWillChange(this, 'firstObject');
- Ember.propertyDidChange(this, 'firstObject');
- }
- if (this.objectAt(length-1) !== cachedLast) {
- Ember.propertyWillChange(this, 'lastObject');
- Ember.propertyDidChange(this, 'lastObject');
- }
-
- return this;
- },
-
- // ..........................................................
- // ENUMERATED PROPERTIES
- //
-
- /**
- Returns a special object that can be used to observe individual properties
- on the array. Just get an equivalent property on this object and it will
- return an enumerable that maps automatically to the named key on the
- member objects.
- */
- '@each': Ember.computed(function() {
- if (!this.__each) this.__each = new Ember.EachProxy(this);
- return this.__each;
- }).property().cacheable()
-
-}) ;
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/**
- @namespace
-
- Implements some standard methods for comparing objects. Add this mixin to
- any class you create that can compare its instances.
-
- You should implement the compare() method.
-
- @extends Ember.Mixin
- @since Ember 0.9
-*/
-Ember.Comparable = Ember.Mixin.create( /** @scope Ember.Comparable.prototype */{
-
- /**
- walk like a duck. Indicates that the object can be compared.
-
- @type Boolean
- @default true
- @constant
- */
- isComparable: true,
-
- /**
- Override to return the result of the comparison of the two parameters. The
- compare method should return:
-
- - `-1` if `a < b`
- - `0` if `a == b`
- - `1` if `a > b`
-
- Default implementation raises an exception.
-
- @param a {Object} the first object to compare
- @param b {Object} the second object to compare
- @returns {Integer} the result of the comparison
- */
- compare: Ember.required(Function)
-
-});
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2010 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-/**
- @namespace
-
- Implements some standard methods for copying an object. Add this mixin to
- any object you create that can create a copy of itself. This mixin is
- added automatically to the built-in array.
-
- You should generally implement the copy() method to return a copy of the
- receiver.
-
- Note that frozenCopy() will only work if you also implement Ember.Freezable.
-
- @extends Ember.Mixin
- @since Ember 0.9
-*/
-Ember.Copyable = Ember.Mixin.create(
-/** @scope Ember.Copyable.prototype */ {
-
- /**
- Override to return a copy of the receiver. Default implementation raises
- an exception.
-
- @function
- @param deep {Boolean} if true, a deep copy of the object should be made
- @returns {Object} copy of receiver
- */
- copy: Ember.required(Function),
-
- /**
- If the object implements Ember.Freezable, then this will return a new copy
- if the object is not frozen and the receiver if the object is frozen.
-
- Raises an exception if you try to call this method on a object that does
- not support freezing.
-
- You should use this method whenever you want a copy of a freezable object
- since a freezable object can simply return itself without actually
- consuming more memory.
-
- @returns {Object} copy of receiver or receiver
- */
- frozenCopy: function() {
- if (Ember.Freezable && Ember.Freezable.detect(this)) {
- return get(this, 'isFrozen') ? this : this.copy().freeze();
- } else {
- throw new Error(Ember.String.fmt("%@ does not support freezing", [this]));
- }
- }
-});
-
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2010 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-
-
-
-
-var get = Ember.get, set = Ember.set;
-
-/**
- @namespace
-
- The Ember.Freezable mixin implements some basic methods for marking an object
- as frozen. Once an object is frozen it should be read only. No changes
- may be made the internal state of the object.
-
- ## Enforcement
-
- To fully support freezing in your subclass, you must include this mixin and
- override any method that might alter any property on the object to instead
- raise an exception. You can check the state of an object by checking the
- isFrozen property.
-
- Although future versions of JavaScript may support language-level freezing
- object objects, that is not the case today. Even if an object is freezable,
- it is still technically possible to modify the object, even though it could
- break other parts of your application that do not expect a frozen object to
- change. It is, therefore, very important that you always respect the
- isFrozen property on all freezable objects.
-
- ## Example Usage
-
- The example below shows a simple object that implement the Ember.Freezable
- protocol.
-
- Contact = Ember.Object.extend(Ember.Freezable, {
-
- firstName: null,
-
- lastName: null,
-
- // swaps the names
- swapNames: function() {
- if (this.get('isFrozen')) throw Ember.FROZEN_ERROR;
- var tmp = this.get('firstName');
- this.set('firstName', this.get('lastName'));
- this.set('lastName', tmp);
- return this;
- }
-
- });
-
- c = Context.create({ firstName: "John", lastName: "Doe" });
- c.swapNames(); => returns c
- c.freeze();
- c.swapNames(); => EXCEPTION
-
- ## Copying
-
- Usually the Ember.Freezable protocol is implemented in cooperation with the
- Ember.Copyable protocol, which defines a frozenCopy() method that will return
- a frozen object, if the object implements this method as well.
-
- @extends Ember.Mixin
- @since Ember 0.9
-*/
-Ember.Freezable = Ember.Mixin.create(
-/** @scope Ember.Freezable.prototype */ {
-
- /**
- Set to true when the object is frozen. Use this property to detect whether
- your object is frozen or not.
-
- @type Boolean
- */
- isFrozen: false,
-
- /**
- Freezes the object. Once this method has been called the object should
- no longer allow any properties to be edited.
-
- @returns {Object} receiver
- */
- freeze: function() {
- if (get(this, 'isFrozen')) return this;
- set(this, 'isFrozen', true);
- return this;
- }
-
-});
-
-Ember.FROZEN_ERROR = "Frozen object cannot be modified.";
-
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var forEach = Ember.EnumerableUtils.forEach;
-
-/**
- @class
-
- This mixin defines the API for modifying generic enumerables. These methods
- can be applied to an object regardless of whether it is ordered or
- unordered.
-
- Note that an Enumerable can change even if it does not implement this mixin.
- For example, a MappedEnumerable cannot be directly modified but if its
- underlying enumerable changes, it will change also.
-
- ## Adding Objects
-
- To add an object to an enumerable, use the addObject() method. This
- method will only add the object to the enumerable if the object is not
- already present and the object if of a type supported by the enumerable.
-
- set.addObject(contact);
-
- ## Removing Objects
-
- To remove an object form an enumerable, use the removeObject() method. This
- will only remove the object if it is already in the enumerable, otherwise
- this method has no effect.
-
- set.removeObject(contact);
-
- ## Implementing In Your Own Code
-
- If you are implementing an object and want to support this API, just include
- this mixin in your class and implement the required methods. In your unit
- tests, be sure to apply the Ember.MutableEnumerableTests to your object.
-
- @extends Ember.Mixin
- @extends Ember.Enumerable
-*/
-Ember.MutableEnumerable = Ember.Mixin.create(Ember.Enumerable,
- /** @scope Ember.MutableEnumerable.prototype */ {
-
- /**
- __Required.__ You must implement this method to apply this mixin.
-
- Attempts to add the passed object to the receiver if the object is not
- already present in the collection. If the object is present, this method
- has no effect.
-
- If the passed object is of a type not supported by the receiver
- then this method should raise an exception.
-
- @function
-
- @param {Object} object
- The object to add to the enumerable.
-
- @returns {Object} the passed object
- */
- addObject: Ember.required(Function),
-
- /**
- Adds each object in the passed enumerable to the receiver.
-
- @param {Ember.Enumerable} objects the objects to add.
- @returns {Object} receiver
- */
- addObjects: function(objects) {
- Ember.beginPropertyChanges(this);
- forEach(objects, function(obj) { this.addObject(obj); }, this);
- Ember.endPropertyChanges(this);
- return this;
- },
-
- /**
- __Required.__ You must implement this method to apply this mixin.
-
- Attempts to remove the passed object from the receiver collection if the
- object is in present in the collection. If the object is not present,
- this method has no effect.
-
- If the passed object is of a type not supported by the receiver
- then this method should raise an exception.
-
- @function
-
- @param {Object} object
- The object to remove from the enumerable.
-
- @returns {Object} the passed object
- */
- removeObject: Ember.required(Function),
-
-
- /**
- Removes each objects in the passed enumerable from the receiver.
-
- @param {Ember.Enumerable} objects the objects to remove
- @returns {Object} receiver
- */
- removeObjects: function(objects) {
- Ember.beginPropertyChanges(this);
- forEach(objects, function(obj) { this.removeObject(obj); }, this);
- Ember.endPropertyChanges(this);
- return this;
- }
-
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-// ..........................................................
-// CONSTANTS
-//
-
-var OUT_OF_RANGE_EXCEPTION = "Index out of range" ;
-var EMPTY = [];
-
-// ..........................................................
-// HELPERS
-//
-
-var get = Ember.get, set = Ember.set, forEach = Ember.EnumerableUtils.forEach;
-
-/**
- @class
-
- This mixin defines the API for modifying array-like objects. These methods
- can be applied only to a collection that keeps its items in an ordered set.
-
- Note that an Array can change even if it does not implement this mixin.
- For example, one might implement a SparseArray that cannot be directly
- modified, but if its underlying enumerable changes, it will change also.
-
- @extends Ember.Mixin
- @extends Ember.Array
- @extends Ember.MutableEnumerable
-*/
-Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,
- /** @scope Ember.MutableArray.prototype */ {
-
- /**
- __Required.__ You must implement this method to apply this mixin.
-
- This is one of the primitives you must implement to support Ember.Array. You
- should replace amt objects started at idx with the objects in the passed
- array. You should also call this.enumerableContentDidChange() ;
-
- @function
-
- @param {Number} idx
- Starting index in the array to replace. If idx >= length, then append
- to the end of the array.
-
- @param {Number} amt
- Number of elements that should be removed from the array, starting at
- *idx*.
-
- @param {Array} objects
- An array of zero or more objects that should be inserted into the array
- at *idx*
- */
- replace: Ember.required(),
-
- /**
- Remove all elements from self. This is useful if you
- want to reuse an existing array without having to recreate it.
-
- var colors = ["red", "green", "blue"];
- color.length(); => 3
- colors.clear(); => []
- colors.length(); => 0
-
- @returns {Ember.Array} An empty Array.
- */
- clear: function () {
- var len = get(this, 'length');
- if (len === 0) return this;
- this.replace(0, len, EMPTY);
- return this;
- },
-
- /**
- This will use the primitive replace() method to insert an object at the
- specified index.
-
- var colors = ["red", "green", "blue"];
- colors.insertAt(2, "yellow"); => ["red", "green", "yellow", "blue"]
- colors.insertAt(5, "orange"); => Error: Index out of range
-
- @param {Number} idx index of insert the object at.
- @param {Object} object object to insert
- */
- insertAt: function(idx, object) {
- if (idx > get(this, 'length')) throw new Error(OUT_OF_RANGE_EXCEPTION) ;
- this.replace(idx, 0, [object]) ;
- return this ;
- },
-
- /**
- Remove an object at the specified index using the replace() primitive
- method. You can pass either a single index, or a start and a length.
-
- If you pass a start and length that is beyond the
- length this method will throw an Ember.OUT_OF_RANGE_EXCEPTION
-
- var colors = ["red", "green", "blue", "yellow", "orange"];
- colors.removeAt(0); => ["green", "blue", "yellow", "orange"]
- colors.removeAt(2, 2); => ["green", "blue"]
- colors.removeAt(4, 2); => Error: Index out of range
-
- @param {Number} start index, start of range
- @param {Number} len length of passing range
- @returns {Object} receiver
- */
- removeAt: function(start, len) {
-
- var delta = 0;
-
- if ('number' === typeof start) {
-
- if ((start < 0) || (start >= get(this, 'length'))) {
- throw new Error(OUT_OF_RANGE_EXCEPTION);
- }
-
- // fast case
- if (len === undefined) len = 1;
- this.replace(start, len, EMPTY);
- }
-
- return this ;
- },
-
- /**
- Push the object onto the end of the array. Works just like push() but it
- is KVO-compliant.
-
- var colors = ["red", "green", "blue"];
- colors.pushObject("black"); => ["red", "green", "blue", "black"]
- colors.pushObject(["yellow", "orange"]); => ["red", "green", "blue", "black", ["yellow", "orange"]]
-
- */
- pushObject: function(obj) {
- this.insertAt(get(this, 'length'), obj) ;
- return obj ;
- },
-
- /**
- Add the objects in the passed numerable to the end of the array. Defers
- notifying observers of the change until all objects are added.
-
- var colors = ["red", "green", "blue"];
- colors.pushObjects("black"); => ["red", "green", "blue", "black"]
- colors.pushObjects(["yellow", "orange"]); => ["red", "green", "blue", "black", "yellow", "orange"]
-
- @param {Ember.Enumerable} objects the objects to add
- @returns {Ember.Array} receiver
- */
- pushObjects: function(objects) {
- this.replace(get(this, 'length'), 0, objects);
- return this;
- },
-
- /**
- Pop object from array or nil if none are left. Works just like pop() but
- it is KVO-compliant.
-
- var colors = ["red", "green", "blue"];
- colors.popObject(); => "blue"
- console.log(colors); => ["red", "green"]
-
- */
- popObject: function() {
- var len = get(this, 'length') ;
- if (len === 0) return null ;
-
- var ret = this.objectAt(len-1) ;
- this.removeAt(len-1, 1) ;
- return ret ;
- },
-
- /**
- Shift an object from start of array or nil if none are left. Works just
- like shift() but it is KVO-compliant.
-
- var colors = ["red", "green", "blue"];
- colors.shiftObject(); => "red"
- console.log(colors); => ["green", "blue"]
-
- */
- shiftObject: function() {
- if (get(this, 'length') === 0) return null ;
- var ret = this.objectAt(0) ;
- this.removeAt(0) ;
- return ret ;
- },
-
- /**
- Unshift an object to start of array. Works just like unshift() but it is
- KVO-compliant.
-
- var colors = ["red", "green", "blue"];
- colors.unshiftObject("yellow"); => ["yellow", "red", "green", "blue"]
- colors.unshiftObject(["black", "white"]); => [["black", "white"], "yellow", "red", "green", "blue"]
-
- */
- unshiftObject: function(obj) {
- this.insertAt(0, obj) ;
- return obj ;
- },
-
- /**
- Adds the named objects to the beginning of the array. Defers notifying
- observers until all objects have been added.
-
- var colors = ["red", "green", "blue"];
- colors.unshiftObjects(["black", "white"]); => ["black", "white", "red", "green", "blue"]
- colors.unshiftObjects("yellow"); => Type Error: 'undefined' is not a function
-
- @param {Ember.Enumerable} objects the objects to add
- @returns {Ember.Array} receiver
- */
- unshiftObjects: function(objects) {
- this.replace(0, 0, objects);
- return this;
- },
-
- /**
- Reverse objects in the array. Works just like reverse() but it is
- KVO-compliant.
-
- @return {Ember.Array} receiver
- */
- reverseObjects: function() {
- var len = get(this, 'length');
- if (len === 0) return this;
- var objects = this.toArray().reverse();
- this.replace(0, len, objects);
- return this;
- },
-
- // ..........................................................
- // IMPLEMENT Ember.MutableEnumerable
- //
-
- /** @private (nodoc) */
- removeObject: function(obj) {
- var loc = get(this, 'length') || 0;
- while(--loc >= 0) {
- var curObject = this.objectAt(loc) ;
- if (curObject === obj) this.removeAt(loc) ;
- }
- return this ;
- },
-
- /** @private (nodoc) */
- addObject: function(obj) {
- if (!this.contains(obj)) this.pushObject(obj);
- return this ;
- }
-
-});
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-var get = Ember.get, set = Ember.set, defineProperty = Ember.defineProperty;
-
-/**
- @class
-
- ## Overview
-
- This mixin provides properties and property observing functionality, core
- features of the Ember object model.
-
- Properties and observers allow one object to observe changes to a
- property on another object. This is one of the fundamental ways that
- models, controllers and views communicate with each other in an Ember
- application.
-
- Any object that has this mixin applied can be used in observer
- operations. That includes Ember.Object and most objects you will
- interact with as you write your Ember application.
-
- Note that you will not generally apply this mixin to classes yourself,
- but you will use the features provided by this module frequently, so it
- is important to understand how to use it.
-
- ## Using get() and set()
-
- Because of Ember's support for bindings and observers, you will always
- access properties using the get method, and set properties using the
- set method. This allows the observing objects to be notified and
- computed properties to be handled properly.
-
- More documentation about `get` and `set` are below.
-
- ## Observing Property Changes
-
- You typically observe property changes simply by adding the `observes`
- call to the end of your method declarations in classes that you write.
- For example:
-
- Ember.Object.create({
- valueObserver: function() {
- // Executes whenever the "value" property changes
- }.observes('value')
- });
-
- Although this is the most common way to add an observer, this capability
- is actually built into the Ember.Object class on top of two methods
- defined in this mixin: `addObserver` and `removeObserver`. You can use
- these two methods to add and remove observers yourself if you need to
- do so at runtime.
-
- To add an observer for a property, call:
-
- object.addObserver('propertyKey', targetObject, targetAction)
-
- This will call the `targetAction` method on the `targetObject` to be called
- whenever the value of the `propertyKey` changes.
-
- Note that if `propertyKey` is a computed property, the observer will be
- called when any of the property dependencies are changed, even if the
- resulting value of the computed property is unchanged. This is necessary
- because computed properties are not computed until `get` is called.
-
- @extends Ember.Mixin
-*/
-Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
-
- /** @private - compatibility */
- isObserverable: true,
-
- /**
- Retrieves the value of a property from the object.
-
- This method is usually similar to using object[keyName] or object.keyName,
- however it supports both computed properties and the unknownProperty
- handler.
-
- Because `get` unifies the syntax for accessing all these kinds
- of properties, it can make many refactorings easier, such as replacing a
- simple property with a computed property, or vice versa.
-
- ### Computed Properties
-
- Computed properties are methods defined with the `property` modifier
- declared at the end, such as:
-
- fullName: function() {
- return this.getEach('firstName', 'lastName').compact().join(' ');
- }.property('firstName', 'lastName')
-
- When you call `get` on a computed property, the function will be
- called and the return value will be returned instead of the function
- itself.
-
- ### Unknown Properties
-
- Likewise, if you try to call `get` on a property whose value is
- undefined, the unknownProperty() method will be called on the object.
- If this method returns any value other than undefined, it will be returned
- instead. This allows you to implement "virtual" properties that are
- not defined upfront.
-
- @param {String} key The property to retrieve
- @returns {Object} The property value or undefined.
- */
- get: function(keyName) {
- return get(this, keyName);
- },
-
- /**
- To get multiple properties at once, call getProperties
- with a list of strings or an array:
-
- record.getProperties('firstName', 'lastName', 'zipCode'); // => { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
-
- is equivalent to:
-
- record.getProperties(['firstName', 'lastName', 'zipCode']); // => { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
-
- @param {String...|Array} list of keys to get
- @returns {Hash}
- */
- getProperties: function() {
- var ret = {};
- var propertyNames = arguments;
- if (arguments.length === 1 && Ember.typeOf(arguments[0]) === 'array') {
- propertyNames = arguments[0];
- }
- for(var i = 0; i < propertyNames.length; i++) {
- ret[propertyNames[i]] = get(this, propertyNames[i]);
- }
- return ret;
- },
-
- /**
- Sets the provided key or path to the value.
-
- This method is generally very similar to calling object[key] = value or
- object.key = value, except that it provides support for computed
- properties, the unknownProperty() method and property observers.
-
- ### Computed Properties
-
- If you try to set a value on a key that has a computed property handler
- defined (see the get() method for an example), then set() will call
- that method, passing both the value and key instead of simply changing
- the value itself. This is useful for those times when you need to
- implement a property that is composed of one or more member
- properties.
-
- ### Unknown Properties
-
- If you try to set a value on a key that is undefined in the target
- object, then the unknownProperty() handler will be called instead. This
- gives you an opportunity to implement complex "virtual" properties that
- are not predefined on the object. If unknownProperty() returns
- undefined, then set() will simply set the value on the object.
-
- ### Property Observers
-
- In addition to changing the property, set() will also register a
- property change with the object. Unless you have placed this call
- inside of a beginPropertyChanges() and endPropertyChanges(), any "local"
- observers (i.e. observer methods declared on the same object), will be
- called immediately. Any "remote" observers (i.e. observer methods
- declared on another object) will be placed in a queue and called at a
- later time in a coalesced manner.
-
- ### Chaining
-
- In addition to property changes, set() returns the value of the object
- itself so you can do chaining like this:
-
- record.set('firstName', 'Charles').set('lastName', 'Jolley');
-
- @param {String} key The property to set
- @param {Object} value The value to set or null.
- @returns {Ember.Observable}
- */
- set: function(keyName, value) {
- set(this, keyName, value);
- return this;
- },
-
- /**
- To set multiple properties at once, call setProperties
- with a Hash:
-
- record.setProperties({ firstName: 'Charles', lastName: 'Jolley' });
-
- @param {Hash} hash the hash of keys and values to set
- @returns {Ember.Observable}
- */
- setProperties: function(hash) {
- return Ember.setProperties(this, hash);
- },
-
- /**
- Begins a grouping of property changes.
-
- You can use this method to group property changes so that notifications
- will not be sent until the changes are finished. If you plan to make a
- large number of changes to an object at one time, you should call this
- method at the beginning of the changes to begin deferring change
- notifications. When you are done making changes, call endPropertyChanges()
- to deliver the deferred change notifications and end deferring.
-
- @returns {Ember.Observable}
- */
- beginPropertyChanges: function() {
- Ember.beginPropertyChanges();
- return this;
- },
-
- /**
- Ends a grouping of property changes.
-
- You can use this method to group property changes so that notifications
- will not be sent until the changes are finished. If you plan to make a
- large number of changes to an object at one time, you should call
- beginPropertyChanges() at the beginning of the changes to defer change
- notifications. When you are done making changes, call this method to
- deliver the deferred change notifications and end deferring.
-
- @returns {Ember.Observable}
- */
- endPropertyChanges: function() {
- Ember.endPropertyChanges();
- return this;
- },
-
- /**
- Notify the observer system that a property is about to change.
-
- Sometimes you need to change a value directly or indirectly without
- actually calling get() or set() on it. In this case, you can use this
- method and propertyDidChange() instead. Calling these two methods
- together will notify all observers that the property has potentially
- changed value.
-
- Note that you must always call propertyWillChange and propertyDidChange as
- a pair. If you do not, it may get the property change groups out of order
- and cause notifications to be delivered more often than you would like.
-
- @param {String} key The property key that is about to change.
- @returns {Ember.Observable}
- */
- propertyWillChange: function(keyName){
- Ember.propertyWillChange(this, keyName);
- return this;
- },
-
- /**
- Notify the observer system that a property has just changed.
-
- Sometimes you need to change a value directly or indirectly without
- actually calling get() or set() on it. In this case, you can use this
- method and propertyWillChange() instead. Calling these two methods
- together will notify all observers that the property has potentially
- changed value.
-
- Note that you must always call propertyWillChange and propertyDidChange as
- a pair. If you do not, it may get the property change groups out of order
- and cause notifications to be delivered more often than you would like.
-
- @param {String} keyName The property key that has just changed.
- @returns {Ember.Observable}
- */
- propertyDidChange: function(keyName) {
- Ember.propertyDidChange(this, keyName);
- return this;
- },
-
- /**
- Convenience method to call `propertyWillChange` and `propertyDidChange` in
- succession.
-
- @param {String} keyName The property key to be notified about.
- @returns {Ember.Observable}
- */
- notifyPropertyChange: function(keyName) {
- this.propertyWillChange(keyName);
- this.propertyDidChange(keyName);
- return this;
- },
-
- addBeforeObserver: function(key, target, method) {
- Ember.addBeforeObserver(this, key, target, method);
- },
-
- /**
- Adds an observer on a property.
-
- This is the core method used to register an observer for a property.
-
- Once you call this method, anytime the key's value is set, your observer
- will be notified. Note that the observers are triggered anytime the
- value is set, regardless of whether it has actually changed. Your
- observer should be prepared to handle that.
-
- You can also pass an optional context parameter to this method. The
- context will be passed to your observer method whenever it is triggered.
- Note that if you add the same target/method pair on a key multiple times
- with different context parameters, your observer will only be called once
- with the last context you passed.
-
- ### Observer Methods
-
- Observer methods you pass should generally have the following signature if
- you do not pass a "context" parameter:
-
- fooDidChange: function(sender, key, value, rev);
-
- The sender is the object that changed. The key is the property that
- changes. The value property is currently reserved and unused. The rev
- is the last property revision of the object when it changed, which you can
- use to detect if the key value has really changed or not.
-
- If you pass a "context" parameter, the context will be passed before the
- revision like so:
-
- fooDidChange: function(sender, key, value, context, rev);
-
- Usually you will not need the value, context or revision parameters at
- the end. In this case, it is common to write observer methods that take
- only a sender and key value as parameters or, if you aren't interested in
- any of these values, to write an observer that has no parameters at all.
-
- @param {String} key The key to observer
- @param {Object} target The target object to invoke
- @param {String|Function} method The method to invoke.
- @returns {Ember.Object} self
- */
- addObserver: function(key, target, method) {
- Ember.addObserver(this, key, target, method);
- },
-
- /**
- Remove an observer you have previously registered on this object. Pass
- the same key, target, and method you passed to addObserver() and your
- target will no longer receive notifications.
-
- @param {String} key The key to observer
- @param {Object} target The target object to invoke
- @param {String|Function} method The method to invoke.
- @returns {Ember.Observable} receiver
- */
- removeObserver: function(key, target, method) {
- Ember.removeObserver(this, key, target, method);
- },
-
- /**
- Returns true if the object currently has observers registered for a
- particular key. You can use this method to potentially defer performing
- an expensive action until someone begins observing a particular property
- on the object.
-
- @param {String} key Key to check
- @returns {Boolean}
- */
- hasObserverFor: function(key) {
- return Ember.hasListeners(this, key+':change');
- },
-
- /**
- This method will be called when a client attempts to get the value of a
- property that has not been defined in one of the typical ways. Override
- this method to create "virtual" properties.
-
- @param {String} key The name of the unknown property that was requested.
- @returns {Object} The property value or undefined. Default is undefined.
- */
- unknownProperty: function(key) {
- return undefined;
- },
-
- /**
- This method will be called when a client attempts to set the value of a
- property that has not been defined in one of the typical ways. Override
- this method to create "virtual" properties.
-
- @param {String} key The name of the unknown property to be set.
- @param {Object} value The value the unknown property is to be set to.
- */
- setUnknownProperty: function(key, value) {
- defineProperty(this, key);
- set(this, key, value);
- },
-
- /**
- @deprecated
- @param {String} path The property path to retrieve
- @returns {Object} The property value or undefined.
- */
- getPath: function(path) {
- Ember.deprecate("getPath is deprecated since get now supports paths");
- return this.get(path);
- },
-
- /**
- @deprecated
- @param {String} path The path to the property that will be set
- @param {Object} value The value to set or null.
- @returns {Ember.Observable}
- */
- setPath: function(path, value) {
- Ember.deprecate("setPath is deprecated since set now supports paths");
- return this.set(path, value);
- },
-
- /**
- Retrieves the value of a property, or a default value in the case that the property
- returns undefined.
-
- person.getWithDefault('lastName', 'Doe');
-
- @param {String} keyName The name of the property to retrieve
- @param {Object} defaultValue The value to return if the property value is undefined
- @returns {Object} The property value or the defaultValue.
- */
- getWithDefault: function(keyName, defaultValue) {
- return Ember.getWithDefault(this, keyName, defaultValue);
- },
-
- /**
- Set the value of a property to the current value plus some amount.
-
- person.incrementProperty('age');
- team.incrementProperty('score', 2);
-
- @param {String} keyName The name of the property to increment
- @param {Object} increment The amount to increment by. Defaults to 1
- @returns {Object} The new property value
- */
- incrementProperty: function(keyName, increment) {
- if (!increment) { increment = 1; }
- set(this, keyName, (get(this, keyName) || 0)+increment);
- return get(this, keyName);
- },
-
- /**
- Set the value of a property to the current value minus some amount.
-
- player.decrementProperty('lives');
- orc.decrementProperty('health', 5);
-
- @param {String} keyName The name of the property to decrement
- @param {Object} increment The amount to decrement by. Defaults to 1
- @returns {Object} The new property value
- */
- decrementProperty: function(keyName, increment) {
- if (!increment) { increment = 1; }
- set(this, keyName, (get(this, keyName) || 0)-increment);
- return get(this, keyName);
- },
-
- /**
- Set the value of a boolean property to the opposite of it's
- current value.
-
- starship.toggleProperty('warpDriveEnaged');
-
- @param {String} keyName The name of the property to toggle
- @returns {Object} The new property value
- */
- toggleProperty: function(keyName) {
- set(this, keyName, !get(this, keyName));
- return get(this, keyName);
- },
-
- /**
- Returns the cached value of a computed property, if it exists.
- This allows you to inspect the value of a computed property
- without accidentally invoking it if it is intended to be
- generated lazily.
-
- @param {String} keyName
- @returns {Object} The cached value of the computed property, if any
- */
- cacheFor: function(keyName) {
- return Ember.cacheFor(this, keyName);
- },
-
- /** @private - intended for debugging purposes */
- observersForKey: function(keyName) {
- return Ember.observersFor(this, keyName);
- }
-});
-
-
-
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-Ember.TargetActionSupport = Ember.Mixin.create({
- target: null,
- action: null,
-
- targetObject: Ember.computed(function() {
- var target = get(this, 'target');
-
- if (Ember.typeOf(target) === "string") {
- var value = get(this, target);
- if (value === undefined) { value = get(window, target); }
- return value;
- } else {
- return target;
- }
- }).property('target').cacheable(),
-
- triggerAction: function() {
- var action = get(this, 'action'),
- target = get(this, 'targetObject');
-
- if (target && action) {
- var ret;
-
- if (typeof target.send === 'function') {
- ret = target.send(action, this);
- } else {
- if (typeof action === 'string') {
- action = target[action];
- }
- ret = action.call(target, this);
- }
- if (ret !== false) ret = true;
-
- return ret;
- } else {
- return false;
- }
- }
-});
-
-})();
-
-
-
-(function() {
-/**
- @class
-
- @extends Ember.Mixin
- */
-Ember.Evented = Ember.Mixin.create(
- /** @scope Ember.Evented.prototype */ {
- on: function(name, target, method) {
- Ember.addListener(this, name, target, method);
- },
-
- one: function(name, target, method) {
- if (!method) {
- method = target;
- target = null;
- }
-
- var self = this;
- var wrapped = function() {
- Ember.removeListener(self, name, target, wrapped);
-
- if ('string' === typeof method) { method = this[method]; }
-
- // Internally, a `null` target means that the target is
- // the first parameter to addListener. That means that
- // the `this` passed into this function is the target
- // determined by the event system.
- method.apply(this, arguments);
- };
-
- this.on(name, target, wrapped);
- },
-
- trigger: function(name) {
- var args = [], i, l;
- for (i = 1, l = arguments.length; i < l; i++) {
- args.push(arguments[i]);
- }
- Ember.sendEvent(this, name, args);
- },
-
- fire: function(name) {
- Ember.deprecate("Ember.Evented#fire() has been deprecated in favor of trigger() for compatibility with jQuery. It will be removed in 1.0. Please update your code to call trigger() instead.");
- this.trigger.apply(this, arguments);
- },
-
- off: function(name, target, method) {
- Ember.removeListener(this, name, target, method);
- },
-
- has: function(name) {
- return Ember.hasListeners(this, name);
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-
-
-// NOTE: this object should never be included directly. Instead use Ember.
-// Ember.Object. We only define this separately so that Ember.Set can depend on it
-
-
-
-var classToString = Ember.Mixin.prototype.toString;
-var set = Ember.set, get = Ember.get;
-var o_create = Ember.create,
- o_defineProperty = Ember.platform.defineProperty,
- a_slice = Array.prototype.slice,
- meta = Ember.meta,
- rewatch = Ember.rewatch,
- finishChains = Ember.finishChains,
- finishPartial = Ember.Mixin.finishPartial,
- reopen = Ember.Mixin.prototype.reopen;
-
-var undefinedDescriptor = {
- configurable: true,
- writable: true,
- enumerable: false,
- value: undefined
-};
-
-/** @private */
-function makeCtor() {
-
- // Note: avoid accessing any properties on the object since it makes the
- // method a lot faster. This is glue code so we want it to be as fast as
- // possible.
-
- var wasApplied = false, initMixins;
-
- var Class = function() {
- if (!wasApplied) {
- Class.proto(); // prepare prototype...
- }
- var m = Ember.meta(this);
- m.proto = this;
- if (initMixins) {
- this.reopen.apply(this, initMixins);
- initMixins = null;
- }
- o_defineProperty(this, Ember.GUID_KEY, undefinedDescriptor);
- o_defineProperty(this, '_super', undefinedDescriptor);
- finishPartial(this, m);
- delete m.proto;
- finishChains(this);
- this.init.apply(this, arguments);
- };
-
- Class.toString = classToString;
- Class.willReopen = function() {
- if (wasApplied) {
- Class.PrototypeMixin = Ember.Mixin.create(Class.PrototypeMixin);
- }
-
- wasApplied = false;
- };
- Class._initMixins = function(args) { initMixins = args; };
-
- Class.proto = function() {
- var superclass = Class.superclass;
- if (superclass) { superclass.proto(); }
-
- if (!wasApplied) {
- wasApplied = true;
- Class.PrototypeMixin.applyPartial(Class.prototype);
- rewatch(Class.prototype);
- }
-
- return this.prototype;
- };
-
- return Class;
-
-}
-
-var CoreObject = makeCtor();
-
-CoreObject.PrototypeMixin = Ember.Mixin.create(
-/** @scope Ember.CoreObject.prototype */ {
-
- reopen: function() {
- Ember.Mixin._apply(this, arguments, true);
- return this;
- },
-
- isInstance: true,
-
- /** @private */
- init: function() {},
-
- /** @field */
- isDestroyed: false,
-
- /** @field */
- isDestroying: false,
-
- /**
- Destroys an object by setting the isDestroyed flag and removing its
- metadata, which effectively destroys observers and bindings.
-
- If you try to set a property on a destroyed object, an exception will be
- raised.
-
- Note that destruction is scheduled for the end of the run loop and does not
- happen immediately.
-
- @returns {Ember.Object} receiver
- */
- destroy: function() {
- if (this.isDestroying) { return; }
-
- this.isDestroying = true;
-
- if (this.willDestroy) { this.willDestroy(); }
-
- set(this, 'isDestroyed', true);
- Ember.run.schedule('destroy', this, this._scheduledDestroy);
- return this;
- },
-
- /**
- Invoked by the run loop to actually destroy the object. This is
- scheduled for execution by the `destroy` method.
-
- @private
- */
- _scheduledDestroy: function() {
- Ember.destroy(this);
- if (this.didDestroy) { this.didDestroy(); }
- },
-
- bind: function(to, from) {
- if (!(from instanceof Ember.Binding)) { from = Ember.Binding.from(from); }
- from.to(to).connect(this);
- return from;
- },
-
- toString: function() {
- return '<'+this.constructor.toString()+':'+Ember.guidFor(this)+'>';
- }
-});
-
-if (Ember.config.overridePrototypeMixin) {
- Ember.config.overridePrototypeMixin(CoreObject.PrototypeMixin);
-}
-
-CoreObject.__super__ = null;
-
-var ClassMixin = Ember.Mixin.create(
-/** @scope Ember.ClassMixin.prototype */ {
-
- ClassMixin: Ember.required(),
-
- PrototypeMixin: Ember.required(),
-
- isClass: true,
-
- isMethod: false,
-
- extend: function() {
- var Class = makeCtor(), proto;
- Class.ClassMixin = Ember.Mixin.create(this.ClassMixin);
- Class.PrototypeMixin = Ember.Mixin.create(this.PrototypeMixin);
-
- Class.ClassMixin.ownerConstructor = Class;
- Class.PrototypeMixin.ownerConstructor = Class;
-
- reopen.apply(Class.PrototypeMixin, arguments);
-
- Class.superclass = this;
- Class.__super__ = this.prototype;
-
- proto = Class.prototype = o_create(this.prototype);
- proto.constructor = Class;
- Ember.generateGuid(proto, 'ember');
- meta(proto).proto = proto; // this will disable observers on prototype
-
- Class.ClassMixin.apply(Class);
- return Class;
- },
-
- create: function() {
- var C = this;
- if (arguments.length>0) { this._initMixins(arguments); }
- return new C();
- },
-
- reopen: function() {
- this.willReopen();
- reopen.apply(this.PrototypeMixin, arguments);
- return this;
- },
-
- reopenClass: function() {
- reopen.apply(this.ClassMixin, arguments);
- Ember.Mixin._apply(this, arguments, false);
- return this;
- },
-
- detect: function(obj) {
- if ('function' !== typeof obj) { return false; }
- while(obj) {
- if (obj===this) { return true; }
- obj = obj.superclass;
- }
- return false;
- },
-
- detectInstance: function(obj) {
- return obj instanceof this;
- },
-
- /**
- In some cases, you may want to annotate computed properties with additional
- metadata about how they function or what values they operate on. For example,
- computed property functions may close over variables that are then no longer
- available for introspection.
-
- You can pass a hash of these values to a computed property like this:
-
- person: function() {
- var personId = this.get('personId');
- return App.Person.create({ id: personId });
- }.property().meta({ type: App.Person })
-
- Once you've done this, you can retrieve the values saved to the computed
- property from your class like this:
-
- MyClass.metaForProperty('person');
-
- This will return the original hash that was passed to `meta()`.
- */
- metaForProperty: function(key) {
- var desc = meta(this.proto(), false).descs[key];
-
- Ember.assert("metaForProperty() could not find a computed property with key '"+key+"'.", !!desc && desc instanceof Ember.ComputedProperty);
- return desc._meta || {};
- },
-
- /**
- Iterate over each computed property for the class, passing its name
- and any associated metadata (see `metaForProperty`) to the callback.
- */
- eachComputedProperty: function(callback, binding) {
- var proto = this.proto(),
- descs = meta(proto).descs,
- empty = {},
- property;
-
- for (var name in descs) {
- property = descs[name];
-
- if (property instanceof Ember.ComputedProperty) {
- callback.call(binding || this, name, property._meta || empty);
- }
- }
- }
-
-});
-
-if (Ember.config.overrideClassMixin) {
- Ember.config.overrideClassMixin(ClassMixin);
-}
-
-CoreObject.ClassMixin = ClassMixin;
-ClassMixin.apply(CoreObject);
-
-/**
- @class
-*/
-Ember.CoreObject = CoreObject;
-
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, guidFor = Ember.guidFor, none = Ember.none;
-
-/**
- @class
-
- An unordered collection of objects.
-
- A Set works a bit like an array except that its items are not ordered.
- You can create a set to efficiently test for membership for an object. You
- can also iterate through a set just like an array, even accessing objects
- by index, however there is no guarantee as to their order.
-
- All Sets are observable via the Enumerable Observer API - which works
- on any enumerable object including both Sets and Arrays.
-
- ## Creating a Set
-
- You can create a set like you would most objects using
- `new Ember.Set()`. Most new sets you create will be empty, but you can
- also initialize the set with some content by passing an array or other
- enumerable of objects to the constructor.
-
- Finally, you can pass in an existing set and the set will be copied. You
- can also create a copy of a set by calling `Ember.Set#copy()`.
-
- #js
- // creates a new empty set
- var foundNames = new Ember.Set();
-
- // creates a set with four names in it.
- var names = new Ember.Set(["Charles", "Tom", "Juan", "Alex"]); // :P
-
- // creates a copy of the names set.
- var namesCopy = new Ember.Set(names);
-
- // same as above.
- var anotherNamesCopy = names.copy();
-
- ## Adding/Removing Objects
-
- You generally add or remove objects from a set using `add()` or
- `remove()`. You can add any type of object including primitives such as
- numbers, strings, and booleans.
-
- Unlike arrays, objects can only exist one time in a set. If you call `add()`
- on a set with the same object multiple times, the object will only be added
- once. Likewise, calling `remove()` with the same object multiple times will
- remove the object the first time and have no effect on future calls until
- you add the object to the set again.
-
- NOTE: You cannot add/remove null or undefined to a set. Any attempt to do so
- will be ignored.
-
- In addition to add/remove you can also call `push()`/`pop()`. Push behaves
- just like `add()` but `pop()`, unlike `remove()` will pick an arbitrary
- object, remove it and return it. This is a good way to use a set as a job
- queue when you don't care which order the jobs are executed in.
-
- ## Testing for an Object
-
- To test for an object's presence in a set you simply call
- `Ember.Set#contains()`.
-
- ## Observing changes
-
- When using `Ember.Set`, you can observe the `"[]"` property to be
- alerted whenever the content changes. You can also add an enumerable
- observer to the set to be notified of specific objects that are added and
- removed from the set. See `Ember.Enumerable` for more information on
- enumerables.
-
- This is often unhelpful. If you are filtering sets of objects, for instance,
- it is very inefficient to re-filter all of the items each time the set
- changes. It would be better if you could just adjust the filtered set based
- on what was changed on the original set. The same issue applies to merging
- sets, as well.
-
- ## Other Methods
-
- `Ember.Set` primary implements other mixin APIs. For a complete reference
- on the methods you will use with `Ember.Set`, please consult these mixins.
- The most useful ones will be `Ember.Enumerable` and
- `Ember.MutableEnumerable` which implement most of the common iterator
- methods you are used to on Array.
-
- Note that you can also use the `Ember.Copyable` and `Ember.Freezable`
- APIs on `Ember.Set` as well. Once a set is frozen it can no longer be
- modified. The benefit of this is that when you call frozenCopy() on it,
- Ember will avoid making copies of the set. This allows you to write
- code that can know with certainty when the underlying set data will or
- will not be modified.
-
- @extends Ember.Enumerable
- @extends Ember.MutableEnumerable
- @extends Ember.Copyable
- @extends Ember.Freezable
-
- @since Ember 0.9
-*/
-Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Ember.Freezable,
- /** @scope Ember.Set.prototype */ {
-
- // ..........................................................
- // IMPLEMENT ENUMERABLE APIS
- //
-
- /**
- This property will change as the number of objects in the set changes.
-
- @type number
- @default 0
- */
- length: 0,
-
- /**
- Clears the set. This is useful if you want to reuse an existing set
- without having to recreate it.
-
- var colors = new Ember.Set(["red", "green", "blue"]);
- colors.length; => 3
- colors.clear();
- colors.length; => 0
-
- @returns {Ember.Set} An empty Set
- */
- clear: function() {
- if (this.isFrozen) { throw new Error(Ember.FROZEN_ERROR); }
-
- var len = get(this, 'length');
- if (len === 0) { return this; }
-
- var guid;
-
- this.enumerableContentWillChange(len, 0);
- Ember.propertyWillChange(this, 'firstObject');
- Ember.propertyWillChange(this, 'lastObject');
-
- for (var i=0; i < len; i++){
- guid = guidFor(this[i]);
- delete this[guid];
- delete this[i];
- }
-
- set(this, 'length', 0);
-
- Ember.propertyDidChange(this, 'firstObject');
- Ember.propertyDidChange(this, 'lastObject');
- this.enumerableContentDidChange(len, 0);
-
- return this;
- },
-
- /**
- Returns true if the passed object is also an enumerable that contains the
- same objects as the receiver.
-
- var colors = ["red", "green", "blue"],
- same_colors = new Ember.Set(colors);
- same_colors.isEqual(colors); => true
- same_colors.isEqual(["purple", "brown"]); => false
-
- @param {Ember.Set} obj the other object.
- @returns {Boolean}
- */
- isEqual: function(obj) {
- // fail fast
- if (!Ember.Enumerable.detect(obj)) return false;
-
- var loc = get(this, 'length');
- if (get(obj, 'length') !== loc) return false;
-
- while(--loc >= 0) {
- if (!obj.contains(this[loc])) return false;
- }
-
- return true;
- },
-
- /**
- Adds an object to the set. Only non-null objects can be added to a set
- and those can only be added once. If the object is already in the set or
- the passed value is null this method will have no effect.
-
- This is an alias for `Ember.MutableEnumerable.addObject()`.
-
- var colors = new Ember.Set();
- colors.add("blue"); => ["blue"]
- colors.add("blue"); => ["blue"]
- colors.add("red"); => ["blue", "red"]
- colors.add(null); => ["blue", "red"]
- colors.add(undefined); => ["blue", "red"]
-
- @function
- @param {Object} obj The object to add.
- @returns {Ember.Set} The set itself.
- */
- add: Ember.alias('addObject'),
-
- /**
- Removes the object from the set if it is found. If you pass a null value
- or an object that is already not in the set, this method will have no
- effect. This is an alias for `Ember.MutableEnumerable.removeObject()`.
-
- var colors = new Ember.Set(["red", "green", "blue"]);
- colors.remove("red"); => ["blue", "green"]
- colors.remove("purple"); => ["blue", "green"]
- colors.remove(null); => ["blue", "green"]
-
- @function
- @param {Object} obj The object to remove
- @returns {Ember.Set} The set itself.
- */
- remove: Ember.alias('removeObject'),
-
- /**
- Removes the last element from the set and returns it, or null if it's empty.
-
- var colors = new Ember.Set(["green", "blue"]);
- colors.pop(); => "blue"
- colors.pop(); => "green"
- colors.pop(); => null
-
- @returns {Object} The removed object from the set or null.
- */
- pop: function() {
- if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
- var obj = this.length > 0 ? this[this.length-1] : null;
- this.remove(obj);
- return obj;
- },
-
- /**
- Inserts the given object on to the end of the set. It returns
- the set itself.
-
- This is an alias for `Ember.MutableEnumerable.addObject()`.
-
- var colors = new Ember.Set();
- colors.push("red"); => ["red"]
- colors.push("green"); => ["red", "green"]
- colors.push("blue"); => ["red", "green", "blue"]
-
- @function
- @returns {Ember.Set} The set itself.
- */
- push: Ember.alias('addObject'),
-
- /**
- Removes the last element from the set and returns it, or null if it's empty.
-
- This is an alias for `Ember.Set.pop()`.
-
- var colors = new Ember.Set(["green", "blue"]);
- colors.shift(); => "blue"
- colors.shift(); => "green"
- colors.shift(); => null
-
- @function
- @returns {Object} The removed object from the set or null.
- */
- shift: Ember.alias('pop'),
-
- /**
- Inserts the given object on to the end of the set. It returns
- the set itself.
-
- This is an alias of `Ember.Set.push()`
-
- var colors = new Ember.Set();
- colors.unshift("red"); => ["red"]
- colors.unshift("green"); => ["red", "green"]
- colors.unshift("blue"); => ["red", "green", "blue"]
-
- @function
- @returns {Ember.Set} The set itself.
- */
- unshift: Ember.alias('push'),
-
- /**
- Adds each object in the passed enumerable to the set.
-
- This is an alias of `Ember.MutableEnumerable.addObjects()`
-
- var colors = new Ember.Set();
- colors.addEach(["red", "green", "blue"]); => ["red", "green", "blue"]
-
- @function
- @param {Ember.Enumerable} objects the objects to add.
- @returns {Ember.Set} The set itself.
- */
- addEach: Ember.alias('addObjects'),
-
- /**
- Removes each object in the passed enumerable to the set.
-
- This is an alias of `Ember.MutableEnumerable.removeObjects()`
-
- var colors = new Ember.Set(["red", "green", "blue"]);
- colors.removeEach(["red", "blue"]); => ["green"]
-
- @function
- @param {Ember.Enumerable} objects the objects to remove.
- @returns {Ember.Set} The set itself.
- */
- removeEach: Ember.alias('removeObjects'),
-
- // ..........................................................
- // PRIVATE ENUMERABLE SUPPORT
- //
-
- /** @private */
- init: function(items) {
- this._super();
- if (items) this.addObjects(items);
- },
-
- /** @private (nodoc) - implement Ember.Enumerable */
- nextObject: function(idx) {
- return this[idx];
- },
-
- /** @private - more optimized version */
- firstObject: Ember.computed(function() {
- return this.length > 0 ? this[0] : undefined;
- }).property().cacheable(),
-
- /** @private - more optimized version */
- lastObject: Ember.computed(function() {
- return this.length > 0 ? this[this.length-1] : undefined;
- }).property().cacheable(),
-
- /** @private (nodoc) - implements Ember.MutableEnumerable */
- addObject: function(obj) {
- if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
- if (none(obj)) return this; // nothing to do
-
- var guid = guidFor(obj),
- idx = this[guid],
- len = get(this, 'length'),
- added ;
-
- if (idx>=0 && idx<len && (this[idx] === obj)) return this; // added
-
- added = [obj];
-
- this.enumerableContentWillChange(null, added);
- Ember.propertyWillChange(this, 'lastObject');
-
- len = get(this, 'length');
- this[guid] = len;
- this[len] = obj;
- set(this, 'length', len+1);
-
- Ember.propertyDidChange(this, 'lastObject');
- this.enumerableContentDidChange(null, added);
-
- return this;
- },
-
- /** @private (nodoc) - implements Ember.MutableEnumerable */
- removeObject: function(obj) {
- if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
- if (none(obj)) return this; // nothing to do
-
- var guid = guidFor(obj),
- idx = this[guid],
- len = get(this, 'length'),
- isFirst = idx === 0,
- isLast = idx === len-1,
- last, removed;
-
-
- if (idx>=0 && idx<len && (this[idx] === obj)) {
- removed = [obj];
-
- this.enumerableContentWillChange(removed, null);
- if (isFirst) { Ember.propertyWillChange(this, 'firstObject'); }
- if (isLast) { Ember.propertyWillChange(this, 'lastObject'); }
-
- // swap items - basically move the item to the end so it can be removed
- if (idx < len-1) {
- last = this[len-1];
- this[idx] = last;
- this[guidFor(last)] = idx;
- }
-
- delete this[guid];
- delete this[len-1];
- set(this, 'length', len-1);
-
- if (isFirst) { Ember.propertyDidChange(this, 'firstObject'); }
- if (isLast) { Ember.propertyDidChange(this, 'lastObject'); }
- this.enumerableContentDidChange(removed, null);
- }
-
- return this;
- },
-
- /** @private (nodoc) - optimized version */
- contains: function(obj) {
- return this[guidFor(obj)]>=0;
- },
-
- /** @private (nodoc) */
- copy: function() {
- var C = this.constructor, ret = new C(), loc = get(this, 'length');
- set(ret, 'length', loc);
- while(--loc>=0) {
- ret[loc] = this[loc];
- ret[guidFor(this[loc])] = loc;
- }
- return ret;
- },
-
- /** @private */
- toString: function() {
- var len = this.length, idx, array = [];
- for(idx = 0; idx < len; idx++) {
- array[idx] = this[idx];
- }
- return "Ember.Set<%@>".fmt(array.join(','));
- }
-
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/**
- @class
-
- `Ember.Object` is the main base class for all Ember objects. It is a subclass
- of `Ember.CoreObject` with the `Ember.Observable` mixin applied. For details,
- see the documentation for each of these.
-
- @extends Ember.CoreObject
- @extends Ember.Observable
-*/
-Ember.Object = Ember.CoreObject.extend(Ember.Observable);
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var indexOf = Ember.ArrayPolyfills.indexOf;
-
-/**
- @private
- A Namespace is an object usually used to contain other objects or methods
- such as an application or framework. Create a namespace anytime you want
- to define one of these new containers.
-
- # Example Usage
-
- MyFramework = Ember.Namespace.create({
- VERSION: '1.0.0'
- });
-
-*/
-Ember.Namespace = Ember.Object.extend({
- isNamespace: true,
-
- init: function() {
- Ember.Namespace.NAMESPACES.push(this);
- Ember.Namespace.PROCESSED = false;
- },
-
- toString: function() {
- Ember.identifyNamespaces();
- return this[Ember.GUID_KEY+'_name'];
- },
-
- destroy: function() {
- var namespaces = Ember.Namespace.NAMESPACES;
- window[this.toString()] = undefined;
- namespaces.splice(indexOf.call(namespaces, this), 1);
- this._super();
- }
-});
-
-Ember.Namespace.NAMESPACES = [Ember];
-Ember.Namespace.PROCESSED = false;
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/**
- @private
-
- Defines a namespace that will contain an executable application. This is
- very similar to a normal namespace except that it is expected to include at
- least a 'ready' function which can be run to initialize the application.
-
- Currently Ember.Application is very similar to Ember.Namespace. However, this
- class may be augmented by additional frameworks so it is important to use
- this instance when building new applications.
-
- # Example Usage
-
- MyApp = Ember.Application.create({
- VERSION: '1.0.0',
- store: Ember.Store.create().from(Ember.fixtures)
- });
-
- MyApp.ready = function() {
- //..init code goes here...
- }
-
-*/
-Ember.Application = Ember.Namespace.extend();
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- An ArrayProxy wraps any other object that implements Ember.Array and/or
- Ember.MutableArray, forwarding all requests. This makes it very useful for
- a number of binding use cases or other cases where being able to swap
- out the underlying array is useful.
-
- A simple example of usage:
-
- var pets = ['dog', 'cat', 'fish'];
- var ap = Ember.ArrayProxy.create({ content: Ember.A(pets) });
- ap.get('firstObject'); // => 'dog'
- ap.set('content', ['amoeba', 'paramecium']);
- ap.get('firstObject'); // => 'amoeba'
-
- This class can also be useful as a layer to transform the contents of
- an array, as they are accessed. This can be done by overriding
- `objectAtContent`:
-
- var pets = ['dog', 'cat', 'fish'];
- var ap = Ember.ArrayProxy.create({
- content: Ember.A(pets),
- objectAtContent: function(idx) {
- return this.get('content').objectAt(idx).toUpperCase();
- }
- });
- ap.get('firstObject'); // => 'DOG'
-
-
- @extends Ember.Object
- @extends Ember.Array
- @extends Ember.MutableArray
-*/
-Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,
-/** @scope Ember.ArrayProxy.prototype */ {
-
- /**
- The content array. Must be an object that implements Ember.Array and/or
- Ember.MutableArray.
-
- @type Ember.Array
- */
- content: null,
-
- /**
- The array that the proxy pretends to be. In the default `ArrayProxy`
- implementation, this and `content` are the same. Subclasses of `ArrayProxy`
- can override this property to provide things like sorting and filtering.
- */
- arrangedContent: Ember.computed('content', function() {
- return get(this, 'content');
- }).cacheable(),
-
- /**
- Should actually retrieve the object at the specified index from the
- content. You can override this method in subclasses to transform the
- content item to something new.
-
- This method will only be called if content is non-null.
-
- @param {Number} idx
- The index to retrieve.
-
- @returns {Object} the value or undefined if none found
- */
- objectAtContent: function(idx) {
- return get(this, 'arrangedContent').objectAt(idx);
- },
-
- /**
- Should actually replace the specified objects on the content array.
- You can override this method in subclasses to transform the content item
- into something new.
-
- This method will only be called if content is non-null.
-
- @param {Number} idx
- The starting index
-
- @param {Number} amt
- The number of items to remove from the content.
-
- @param {Array} objects
- Optional array of objects to insert or null if no objects.
-
- @returns {void}
- */
- replaceContent: function(idx, amt, objects) {
- get(this, 'arrangedContent').replace(idx, amt, objects);
- },
-
- /**
- Invoked when the content property is about to change. Notifies observers that the
- entire array content will change.
- */
- _contentWillChange: Ember.beforeObserver(function() {
- var content = get(this, 'content');
-
- if (content) {
- content.removeArrayObserver(this, {
- willChange: 'contentArrayWillChange',
- didChange: 'contentArrayDidChange'
- });
- }
- }, 'content'),
-
-
- contentArrayWillChange: Ember.K,
- contentArrayDidChange: Ember.K,
-
- /**
- Invoked when the content property changes. Notifies observers that the
- entire array content has changed.
- */
- _contentDidChange: Ember.observer(function() {
- var content = get(this, 'content'),
- len = content ? get(content, 'length') : 0;
-
- Ember.assert("Can't set ArrayProxy's content to itself", content !== this);
-
- if (content) {
- content.addArrayObserver(this, {
- willChange: 'contentArrayWillChange',
- didChange: 'contentArrayDidChange'
- });
- }
- }, 'content'),
-
- _arrangedContentWillChange: Ember.beforeObserver(function() {
- var arrangedContent = get(this, 'arrangedContent'),
- len = arrangedContent ? get(arrangedContent, 'length') : 0;
-
- this.arrangedContentArrayWillChange(this, 0, len, undefined);
-
- if (arrangedContent) {
- arrangedContent.removeArrayObserver(this, {
- willChange: 'arrangedContentArrayWillChange',
- didChange: 'arrangedContentArrayDidChange'
- });
- }
- }, 'arrangedContent'),
-
- _arrangedContentDidChange: Ember.observer(function() {
- var arrangedContent = get(this, 'arrangedContent'),
- len = arrangedContent ? get(arrangedContent, 'length') : 0;
-
- Ember.assert("Can't set ArrayProxy's content to itself", arrangedContent !== this);
-
- if (arrangedContent) {
- arrangedContent.addArrayObserver(this, {
- willChange: 'arrangedContentArrayWillChange',
- didChange: 'arrangedContentArrayDidChange'
- });
- }
-
- this.arrangedContentArrayDidChange(this, 0, undefined, len);
- }, 'arrangedContent'),
-
- /** @private (nodoc) */
- objectAt: function(idx) {
- return get(this, 'content') && this.objectAtContent(idx);
- },
-
- /** @private (nodoc) */
- length: Ember.computed(function() {
- var arrangedContent = get(this, 'arrangedContent');
- return arrangedContent ? get(arrangedContent, 'length') : 0;
- // No dependencies since Enumerable notifies length of change
- }).property().cacheable(),
-
- /** @private (nodoc) */
- replace: function(idx, amt, objects) {
- if (get(this, 'content')) this.replaceContent(idx, amt, objects);
- return this;
- },
-
- /** @private (nodoc) */
- arrangedContentArrayWillChange: function(item, idx, removedCnt, addedCnt) {
- this.arrayContentWillChange(idx, removedCnt, addedCnt);
- },
-
- /** @private (nodoc) */
- arrangedContentArrayDidChange: function(item, idx, removedCnt, addedCnt) {
- this.arrayContentDidChange(idx, removedCnt, addedCnt);
- },
-
- /** @private (nodoc) */
- init: function() {
- this._super();
- this._contentWillChange();
- this._contentDidChange();
- this._arrangedContentWillChange();
- this._arrangedContentDidChange();
- }
-
-});
-
-
-
-
-})();
-
-
-
-(function() {
-var get = Ember.get,
- set = Ember.set,
- fmt = Ember.String.fmt,
- addBeforeObserver = Ember.addBeforeObserver,
- addObserver = Ember.addObserver,
- removeBeforeObserver = Ember.removeBeforeObserver,
- removeObserver = Ember.removeObserver,
- propertyWillChange = Ember.propertyWillChange,
- propertyDidChange = Ember.propertyDidChange;
-
-function contentPropertyWillChange(content, contentKey) {
- var key = contentKey.slice(8); // remove "content."
- if (key in this) { return; } // if shadowed in proxy
- propertyWillChange(this, key);
-}
-
-function contentPropertyDidChange(content, contentKey) {
- var key = contentKey.slice(8); // remove "content."
- if (key in this) { return; } // if shadowed in proxy
- propertyDidChange(this, key);
-}
-
-/**
- @class
-
- `Ember.ObjectProxy` forwards all properties not defined by the proxy itself
- to a proxied `content` object.
-
- object = Ember.Object.create({
- name: 'Foo'
- });
- proxy = Ember.ObjectProxy.create({
- content: object
- });
-
- // Access and change existing properties
- proxy.get('name') // => 'Foo'
- proxy.set('name', 'Bar');
- object.get('name') // => 'Bar'
-
- // Create new 'description' property on `object`
- proxy.set('description', 'Foo is a whizboo baz');
- object.get('description') // => 'Foo is a whizboo baz'
-
- While `content` is unset, setting a property to be delegated will throw an Error.
-
- proxy = Ember.ObjectProxy.create({
- content: null,
- flag: null
- });
- proxy.set('flag', true);
- proxy.get('flag'); // => true
- proxy.get('foo'); // => undefined
- proxy.set('foo', 'data'); // throws Error
-
- Delegated properties can be bound to and will change when content is updated.
-
- Computed properties on the proxy itself can depend on delegated properties.
-
- ProxyWithComputedProperty = Ember.ObjectProxy.extend({
- fullName: function () {
- var firstName = this.get('firstName'),
- lastName = this.get('lastName');
- if (firstName && lastName) {
- return firstName + ' ' + lastName;
- }
- return firstName || lastName;
- }.property('firstName', 'lastName')
- });
- proxy = ProxyWithComputedProperty.create();
- proxy.get('fullName'); => undefined
- proxy.set('content', {
- firstName: 'Tom', lastName: 'Dale'
- }); // triggers property change for fullName on proxy
- proxy.get('fullName'); => 'Tom Dale'
-*/
-Ember.ObjectProxy = Ember.Object.extend(
-/** @scope Ember.ObjectProxy.prototype */ {
- /**
- The object whose properties will be forwarded.
-
- @type Ember.Object
- @default null
- */
- content: null,
- _contentDidChange: Ember.observer(function() {
- Ember.assert("Can't set ObjectProxy's content to itself", this.get('content') !== this);
- }, 'content'),
- /** @private */
- willWatchProperty: function (key) {
- var contentKey = 'content.' + key;
- addBeforeObserver(this, contentKey, null, contentPropertyWillChange);
- addObserver(this, contentKey, null, contentPropertyDidChange);
- },
- /** @private */
- didUnwatchProperty: function (key) {
- var contentKey = 'content.' + key;
- removeBeforeObserver(this, contentKey, null, contentPropertyWillChange);
- removeObserver(this, contentKey, null, contentPropertyDidChange);
- },
- /** @private */
- unknownProperty: function (key) {
- var content = get(this, 'content');
- if (content) {
- return get(content, key);
- }
- },
- /** @private */
- setUnknownProperty: function (key, value) {
- var content = get(this, 'content');
- Ember.assert(fmt("Cannot delegate set('%@', %@) to the 'content' property of object proxy %@: its 'content' is undefined.", [key, value, this]), content);
- return set(content, key, value);
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var set = Ember.set, get = Ember.get, guidFor = Ember.guidFor;
-var forEach = Ember.EnumerableUtils.forEach;
-
-var EachArray = Ember.Object.extend(Ember.Array, {
-
- init: function(content, keyName, owner) {
- this._super();
- this._keyName = keyName;
- this._owner = owner;
- this._content = content;
- },
-
- objectAt: function(idx) {
- var item = this._content.objectAt(idx);
- return item && get(item, this._keyName);
- },
-
- length: Ember.computed(function() {
- var content = this._content;
- return content ? get(content, 'length') : 0;
- }).property().cacheable()
-
-});
-
-var IS_OBSERVER = /^.+:(before|change)$/;
-
-/** @private */
-function addObserverForContentKey(content, keyName, proxy, idx, loc) {
- var objects = proxy._objects, guid;
- if (!objects) objects = proxy._objects = {};
-
- while(--loc>=idx) {
- var item = content.objectAt(loc);
- if (item) {
- Ember.addBeforeObserver(item, keyName, proxy, 'contentKeyWillChange');
- Ember.addObserver(item, keyName, proxy, 'contentKeyDidChange');
-
- // keep track of the indicies each item was found at so we can map
- // it back when the obj changes.
- guid = guidFor(item);
- if (!objects[guid]) objects[guid] = [];
- objects[guid].push(loc);
- }
- }
-}
-
-/** @private */
-function removeObserverForContentKey(content, keyName, proxy, idx, loc) {
- var objects = proxy._objects;
- if (!objects) objects = proxy._objects = {};
- var indicies, guid;
-
- while(--loc>=idx) {
- var item = content.objectAt(loc);
- if (item) {
- Ember.removeBeforeObserver(item, keyName, proxy, 'contentKeyWillChange');
- Ember.removeObserver(item, keyName, proxy, 'contentKeyDidChange');
-
- guid = guidFor(item);
- indicies = objects[guid];
- indicies[indicies.indexOf(loc)] = null;
- }
- }
-}
-
-/**
- @private
- @class
-
- This is the object instance returned when you get the @each property on an
- array. It uses the unknownProperty handler to automatically create
- EachArray instances for property names.
-
- @extends Ember.Object
-*/
-Ember.EachProxy = Ember.Object.extend({
-
- init: function(content) {
- this._super();
- this._content = content;
- content.addArrayObserver(this);
-
- // in case someone is already observing some keys make sure they are
- // added
- forEach(Ember.watchedEvents(this), function(eventName) {
- this.didAddListener(eventName);
- }, this);
- },
-
- /**
- You can directly access mapped properties by simply requesting them.
- The unknownProperty handler will generate an EachArray of each item.
- */
- unknownProperty: function(keyName, value) {
- var ret;
- ret = new EachArray(this._content, keyName, this);
- Ember.defineProperty(this, keyName, null, ret);
- this.beginObservingContentKey(keyName);
- return ret;
- },
-
- // ..........................................................
- // ARRAY CHANGES
- // Invokes whenever the content array itself changes.
-
- arrayWillChange: function(content, idx, removedCnt, addedCnt) {
- var keys = this._keys, key, array, lim;
-
- lim = removedCnt>0 ? idx+removedCnt : -1;
- Ember.beginPropertyChanges(this);
-
- for(key in keys) {
- if (!keys.hasOwnProperty(key)) { continue; }
-
- if (lim>0) removeObserverForContentKey(content, key, this, idx, lim);
-
- Ember.propertyWillChange(this, key);
- }
-
- Ember.propertyWillChange(this._content, '@each');
- Ember.endPropertyChanges(this);
- },
-
- arrayDidChange: function(content, idx, removedCnt, addedCnt) {
- var keys = this._keys, key, array, lim;
-
- lim = addedCnt>0 ? idx+addedCnt : -1;
- Ember.beginPropertyChanges(this);
-
- for(key in keys) {
- if (!keys.hasOwnProperty(key)) { continue; }
-
- if (lim>0) addObserverForContentKey(content, key, this, idx, lim);
-
- Ember.propertyDidChange(this, key);
- }
-
- Ember.propertyDidChange(this._content, '@each');
- Ember.endPropertyChanges(this);
- },
-
- // ..........................................................
- // LISTEN FOR NEW OBSERVERS AND OTHER EVENT LISTENERS
- // Start monitoring keys based on who is listening...
-
- didAddListener: function(eventName) {
- if (IS_OBSERVER.test(eventName)) {
- this.beginObservingContentKey(eventName.slice(0, -7));
- }
- },
-
- didRemoveListener: function(eventName) {
- if (IS_OBSERVER.test(eventName)) {
- this.stopObservingContentKey(eventName.slice(0, -7));
- }
- },
-
- // ..........................................................
- // CONTENT KEY OBSERVING
- // Actual watch keys on the source content.
-
- beginObservingContentKey: function(keyName) {
- var keys = this._keys;
- if (!keys) keys = this._keys = {};
- if (!keys[keyName]) {
- keys[keyName] = 1;
- var content = this._content,
- len = get(content, 'length');
- addObserverForContentKey(content, keyName, this, 0, len);
- } else {
- keys[keyName]++;
- }
- },
-
- stopObservingContentKey: function(keyName) {
- var keys = this._keys;
- if (keys && (keys[keyName]>0) && (--keys[keyName]<=0)) {
- var content = this._content,
- len = get(content, 'length');
- removeObserverForContentKey(content, keyName, this, 0, len);
- }
- },
-
- contentKeyWillChange: function(obj, keyName) {
- Ember.propertyWillChange(this, keyName);
- },
-
- contentKeyDidChange: function(obj, keyName) {
- Ember.propertyDidChange(this, keyName);
- }
-
-});
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-// Add Ember.Array to Array.prototype. Remove methods with native
-// implementations and supply some more optimized versions of generic methods
-// because they are so common.
-var NativeArray = Ember.Mixin.create(Ember.MutableArray, Ember.Observable, Ember.Copyable, {
-
- // because length is a built-in property we need to know to just get the
- // original property.
- get: function(key) {
- if (key==='length') return this.length;
- else if ('number' === typeof key) return this[key];
- else return this._super(key);
- },
-
- objectAt: function(idx) {
- return this[idx];
- },
-
- // primitive for array support.
- replace: function(idx, amt, objects) {
-
- if (this.isFrozen) throw Ember.FROZEN_ERROR ;
-
- // if we replaced exactly the same number of items, then pass only the
- // replaced range. Otherwise, pass the full remaining array length
- // since everything has shifted
- var len = objects ? get(objects, 'length') : 0;
- this.arrayContentWillChange(idx, amt, len);
-
- if (!objects || objects.length === 0) {
- this.splice(idx, amt) ;
- } else {
- var args = [idx, amt].concat(objects) ;
- this.splice.apply(this,args) ;
- }
-
- this.arrayContentDidChange(idx, amt, len);
- return this ;
- },
-
- // If you ask for an unknown property, then try to collect the value
- // from member items.
- unknownProperty: function(key, value) {
- var ret;// = this.reducedProperty(key, value) ;
- if ((value !== undefined) && ret === undefined) {
- ret = this[key] = value;
- }
- return ret ;
- },
-
- // If browser did not implement indexOf natively, then override with
- // specialized version
- indexOf: function(object, startAt) {
- var idx, len = this.length;
-
- if (startAt === undefined) startAt = 0;
- else startAt = (startAt < 0) ? Math.ceil(startAt) : Math.floor(startAt);
- if (startAt < 0) startAt += len;
-
- for(idx=startAt;idx<len;idx++) {
- if (this[idx] === object) return idx ;
- }
- return -1;
- },
-
- lastIndexOf: function(object, startAt) {
- var idx, len = this.length;
-
- if (startAt === undefined) startAt = len-1;
- else startAt = (startAt < 0) ? Math.ceil(startAt) : Math.floor(startAt);
- if (startAt < 0) startAt += len;
-
- for(idx=startAt;idx>=0;idx--) {
- if (this[idx] === object) return idx ;
- }
- return -1;
- },
-
- copy: function() {
- return this.slice();
- }
-});
-
-// Remove any methods implemented natively so we don't override them
-var ignore = ['length'];
-Ember.EnumerableUtils.forEach(NativeArray.keys(), function(methodName) {
- if (Array.prototype[methodName]) ignore.push(methodName);
-});
-
-if (ignore.length>0) {
- NativeArray = NativeArray.without.apply(NativeArray, ignore);
-}
-
-/**
- The NativeArray mixin contains the properties needed to to make the native
- Array support Ember.MutableArray and all of its dependent APIs. Unless you
- have Ember.EXTEND_PROTOTYPES set to false, this will be applied automatically.
- Otherwise you can apply the mixin at anytime by calling
- `Ember.NativeArray.activate`.
-
- @namespace
- @extends Ember.MutableArray
- @extends Ember.Array
- @extends Ember.Enumerable
- @extends Ember.MutableEnumerable
- @extends Ember.Copyable
- @extends Ember.Freezable
-*/
-Ember.NativeArray = NativeArray;
-
-/**
- Creates an Ember.NativeArray from an Array like object.
- Does not modify the original object.
-
- @returns {Ember.NativeArray}
-*/
-Ember.A = function(arr){
- if (arr === undefined) { arr = []; }
- return Ember.NativeArray.apply(arr);
-};
-
-/**
- Activates the mixin on the Array.prototype if not already applied. Calling
- this method more than once is safe.
-
- @returns {void}
-*/
-Ember.NativeArray.activate = function() {
- NativeArray.apply(Array.prototype);
-
- Ember.A = function(arr) { return arr || []; };
-};
-
-if (Ember.EXTEND_PROTOTYPES) Ember.NativeArray.activate();
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-Ember._PromiseChain = Ember.Object.extend({
- promises: null,
- failureCallback: Ember.K,
- successCallback: Ember.K,
- abortCallback: Ember.K,
- promiseSuccessCallback: Ember.K,
-
- /**
- @private
- */
- runNextPromise: function() {
- if (get(this, 'isDestroyed')) { return; }
-
- var item = get(this, 'promises').shiftObject();
- if (item) {
- var promise = get(item, 'promise') || item;
- Ember.assert("Cannot find promise to invoke", Ember.canInvoke(promise, 'then'));
-
- var self = this;
-
- var successCallback = function() {
- self.promiseSuccessCallback.call(this, item, arguments);
- self.runNextPromise();
- };
-
- var failureCallback = get(self, 'failureCallback');
-
- promise.then(successCallback, failureCallback);
- } else {
- this.successCallback();
- }
- },
-
- start: function() {
- this.runNextPromise();
- return this;
- },
-
- abort: function() {
- this.abortCallback();
- this.destroy();
- },
-
- init: function() {
- set(this, 'promises', Ember.A(get(this, 'promises')));
- this._super();
- }
-});
-
-
-})();
-
-
-
-(function() {
-var loadHooks = {};
-var loaded = {};
-
-Ember.onLoad = function(name, callback) {
- var object;
-
- loadHooks[name] = loadHooks[name] || Ember.A();
- loadHooks[name].pushObject(callback);
-
- if (object = loaded[name]) {
- callback(object);
- }
-};
-
-Ember.runLoadHooks = function(name, object) {
- var hooks;
-
- loaded[name] = object;
-
- if (hooks = loadHooks[name]) {
- loadHooks[name].forEach(function(callback) {
- callback(object);
- });
- }
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-Ember.ControllerMixin = Ember.Mixin.create({
- /**
- The object to which events from the view should be sent.
-
- For example, when a Handlebars template uses the `{{action}}` helper,
- it will attempt to send the event to the view's controller's `target`.
-
- By default, a controller's `target` is set to the router after it is
- instantiated by `Ember.Application#initialize`.
- */
- target: null,
- store: null
-});
-
-Ember.Controller = Ember.Object.extend(Ember.ControllerMixin);
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set, forEach = Ember.EnumerableUtils.forEach;
-
-/**
- @class
-
- @extends Ember.Mixin
- @extends Ember.MutableEnumerable
-*/
-Ember.SortableMixin = Ember.Mixin.create(Ember.MutableEnumerable,
- /** @scope Ember.Observable.prototype */ {
- sortProperties: null,
- sortAscending: true,
-
- addObject: function(obj) {
- var content = get(this, 'content');
- content.pushObject(obj);
- },
-
- removeObject: function(obj) {
- var content = get(this, 'content');
- content.removeObject(obj);
- },
-
- orderBy: function(item1, item2) {
- var result = 0,
- sortProperties = get(this, 'sortProperties'),
- sortAscending = get(this, 'sortAscending');
-
- Ember.assert("you need to define `sortProperties`", !!sortProperties);
-
- forEach(sortProperties, function(propertyName) {
- if (result === 0) {
- result = Ember.compare(get(item1, propertyName), get(item2, propertyName));
- if ((result !== 0) && !sortAscending) {
- result = (-1) * result;
- }
- }
- });
-
- return result;
- },
-
- destroy: function() {
- var content = get(this, 'content'),
- sortProperties = get(this, 'sortProperties');
-
- if (content && sortProperties) {
- forEach(content, function(item) {
- forEach(sortProperties, function(sortProperty) {
- Ember.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
- }, this);
- }, this);
- }
-
- return this._super();
- },
-
- isSorted: Ember.computed('sortProperties', function() {
- return !!get(this, 'sortProperties');
- }),
-
- arrangedContent: Ember.computed('content', 'sortProperties.@each', function(key, value) {
- var content = get(this, 'content'),
- isSorted = get(this, 'isSorted'),
- sortProperties = get(this, 'sortProperties'),
- self = this;
-
- if (content && isSorted) {
- content = content.slice();
- content.sort(function(item1, item2) {
- return self.orderBy(item1, item2);
- });
- forEach(content, function(item) {
- forEach(sortProperties, function(sortProperty) {
- Ember.addObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
- }, this);
- }, this);
- return Ember.A(content);
- }
-
- return content;
- }).cacheable(),
-
- _contentWillChange: Ember.beforeObserver(function() {
- var content = get(this, 'content'),
- sortProperties = get(this, 'sortProperties');
-
- if (content && sortProperties) {
- forEach(content, function(item) {
- forEach(sortProperties, function(sortProperty) {
- Ember.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
- }, this);
- }, this);
- }
-
- this._super();
- }, 'content'),
-
- sortAscendingWillChange: Ember.beforeObserver(function() {
- this._lastSortAscending = get(this, 'sortAscending');
- }, 'sortAscending'),
-
- sortAscendingDidChange: Ember.observer(function() {
- if (get(this, 'sortAscending') !== this._lastSortAscending) {
- var arrangedContent = get(this, 'arrangedContent');
- arrangedContent.reverseObjects();
- }
- }, 'sortAscending'),
-
- contentArrayWillChange: function(array, idx, removedCount, addedCount) {
- var isSorted = get(this, 'isSorted');
-
- if (isSorted) {
- var arrangedContent = get(this, 'arrangedContent');
- var removedObjects = array.slice(idx, idx+removedCount);
- var sortProperties = get(this, 'sortProperties');
-
- forEach(removedObjects, function(item) {
- arrangedContent.removeObject(item);
-
- forEach(sortProperties, function(sortProperty) {
- Ember.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
- }, this);
- });
- }
-
- return this._super(array, idx, removedCount, addedCount);
- },
-
- contentArrayDidChange: function(array, idx, removedCount, addedCount) {
- var isSorted = get(this, 'isSorted'),
- sortProperties = get(this, 'sortProperties');
-
- if (isSorted) {
- var addedObjects = array.slice(idx, idx+addedCount);
- var arrangedContent = get(this, 'arrangedContent');
-
- forEach(addedObjects, function(item) {
- this.insertItemSorted(item);
-
- forEach(sortProperties, function(sortProperty) {
- Ember.addObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
- }, this);
- }, this);
- }
-
- return this._super(array, idx, removedCount, addedCount);
- },
-
- insertItemSorted: function(item) {
- var arrangedContent = get(this, 'arrangedContent');
- var length = get(arrangedContent, 'length');
-
- var idx = this._binarySearch(item, 0, length);
- arrangedContent.insertAt(idx, item);
- },
-
- contentItemSortPropertyDidChange: function(item) {
- var arrangedContent = get(this, 'arrangedContent'),
- index = arrangedContent.indexOf(item);
-
- arrangedContent.removeObject(item);
- this.insertItemSorted(item);
- },
-
- _binarySearch: function(item, low, high) {
- var mid, midItem, res, arrangedContent;
-
- if (low === high) {
- return low;
- }
-
- arrangedContent = get(this, 'arrangedContent');
-
- mid = low + Math.floor((high - low) / 2);
- midItem = arrangedContent.objectAt(mid);
-
- res = this.orderBy(midItem, item);
-
- if (res < 0) {
- return this._binarySearch(item, mid+1, high);
- } else if (res > 0) {
- return this._binarySearch(item, low, mid);
- }
-
- return mid;
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- Ember.ArrayController provides a way for you to publish a collection of objects
- so that you can easily bind to the collection from a Handlebars #each helper,
- an Ember.CollectionView, or other controllers.
-
- The advantage of using an ArrayController is that you only have to set up
- your view bindings once; to change what's displayed, simply swap out the
- `content` property on the controller.
-
- For example, imagine you wanted to display a list of items fetched via an XHR
- request. Create an Ember.ArrayController and set its `content` property:
-
- MyApp.listController = Ember.ArrayController.create();
-
- $.get('people.json', function(data) {
- MyApp.listController.set('content', data);
- });
-
- Then, create a view that binds to your new controller:
-
- {{#each MyApp.listController}}
- {{firstName}} {{lastName}}
- {{/each}}
-
- Although you are binding to the controller, the behavior of this controller
- is to pass through any methods or properties to the underlying array. This
- capability comes from `Ember.ArrayProxy`, which this class inherits from.
-
- Note: As of this writing, `ArrayController` does not add any functionality
- to its superclass, `ArrayProxy`. The Ember team plans to add additional
- controller-specific functionality in the future, e.g. single or multiple
- selection support. If you are creating something that is conceptually a
- controller, use this class.
-
- @extends Ember.ArrayProxy
-*/
-
-Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
- Ember.SortableMixin);
-
-})();
-
-
-
-(function() {
-Ember.ObjectController = Ember.ObjectProxy.extend(Ember.ControllerMixin);
-
-})();
-
-
-
-(function() {
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Runtime
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- An Ember.Application instance serves as the namespace in which you define your
- application's classes. You can also override the configuration of your
- application.
-
- By default, Ember.Application will begin listening for events on the document.
- If your application is embedded inside a page, instead of controlling the
- entire document, you can specify which DOM element to attach to by setting
- the `rootElement` property:
-
- MyApp = Ember.Application.create({
- rootElement: $('#my-app')
- });
-
- The root of an Ember.Application must not be removed during the course of the
- page's lifetime. If you have only a single conceptual application for the
- entire page, and are not embedding any third-party Ember applications
- in your page, use the default document root for your application.
-
- You only need to specify the root if your page contains multiple instances
- of Ember.Application.
-
- @extends Ember.Object
-*/
-Ember.Application = Ember.Namespace.extend(
-/** @scope Ember.Application.prototype */{
-
- /**
- The root DOM element of the Application.
-
- Can be specified as DOMElement or a selector string.
-
- @type DOMElement
- @default 'body'
- */
- rootElement: 'body',
-
- /**
- @type Ember.EventDispatcher
- @default null
- */
- eventDispatcher: null,
-
- /**
- @type Object
- @default null
- */
- customEvents: null,
-
- /** @private */
- init: function() {
- var eventDispatcher,
- rootElement = get(this, 'rootElement');
- this._super();
-
- eventDispatcher = Ember.EventDispatcher.create({
- rootElement: rootElement
- });
-
- set(this, 'eventDispatcher', eventDispatcher);
-
- // jQuery 1.7 doesn't call the ready callback if already ready
- if (Ember.$.isReady) {
- Ember.run.once(this, this.didBecomeReady);
- } else {
- var self = this;
- Ember.$(document).ready(function() {
- Ember.run.once(self, self.didBecomeReady);
- });
- }
- },
-
- /**
- Instantiate all controllers currently available on the namespace
- and inject them onto a router.
-
- Example:
-
- App.PostsController = Ember.ArrayController.extend();
- App.CommentsController = Ember.ArrayController.extend();
-
- var router = Ember.Router.create({
- ...
- });
-
- App.initialize(router);
-
- router.get('postsController') // <App.PostsController:ember1234>
- router.get('commentsController') // <App.CommentsController:ember1235>
-
- router.get('postsController.router') // router
- */
- initialize: function(router) {
- var properties = Ember.A(Ember.keys(this)),
- injections = get(this.constructor, 'injections'),
- namespace = this, controller, name;
-
- if (!router && Ember.Router.detect(namespace['Router'])) {
- router = namespace['Router'].create();
- this._createdRouter = router;
- }
-
- if (router) {
- set(this, 'router', router);
-
- // By default, the router's namespace is the current application.
- //
- // This allows it to find model classes when a state has a
- // route like `/posts/:post_id`. In that case, it would first
- // convert `post_id` into `Post`, and then look it up on its
- // namespace.
- set(router, 'namespace', this);
- }
-
- Ember.runLoadHooks('application', this);
-
- injections.forEach(function(injection) {
- properties.forEach(function(property) {
- injection[1](namespace, router, property);
- });
- });
-
- if (router && router instanceof Ember.Router) {
- this.startRouting(router);
- }
- },
-
- /** @private */
- didBecomeReady: function() {
- var eventDispatcher = get(this, 'eventDispatcher'),
- customEvents = get(this, 'customEvents');
-
- eventDispatcher.setup(customEvents);
-
- this.ready();
- },
-
- /**
- @private
-
- If the application has a router, use it to route to the current URL, and
- trigger a new call to `route` whenever the URL changes.
- */
- startRouting: function(router) {
- var location = get(router, 'location'),
- rootElement = get(this, 'rootElement'),
- applicationController = get(router, 'applicationController');
-
- Ember.assert("ApplicationView and ApplicationController must be defined on your application", (this.ApplicationView && applicationController) );
-
- var applicationView = this.ApplicationView.create({
- controller: applicationController
- });
- this._createdApplicationView = applicationView;
-
- applicationView.appendTo(rootElement);
-
- router.route(location.getURL());
- location.onUpdateURL(function(url) {
- router.route(url);
- });
- },
-
- /**
- Called when the Application has become ready.
- The call will be delayed until the DOM has become ready.
- */
- ready: Ember.K,
-
- /** @private */
- willDestroy: function() {
- get(this, 'eventDispatcher').destroy();
- if (this._createdRouter) { this._createdRouter.destroy(); }
- if (this._createdApplicationView) { this._createdApplicationView.destroy(); }
- },
-
- registerInjection: function(options) {
- this.constructor.registerInjection(options);
- }
-});
-
-Ember.Application.reopenClass({
- concatenatedProperties: ['injections'],
- injections: Ember.A(),
- registerInjection: function(options) {
- var injections = get(this, 'injections'),
- before = options.before,
- name = options.name,
- injection = options.injection,
- location;
-
- if (before) {
- location = injections.find(function(item) {
- if (item[0] === before) { return true; }
- });
- location = injections.indexOf(location);
- } else {
- location = get(injections, 'length');
- }
-
- injections.splice(location, 0, [name, injection]);
- }
-});
-
-Ember.Application.registerInjection({
- name: 'controllers',
- injection: function(app, router, property) {
- if (!/^[A-Z].*Controller$/.test(property)) { return; }
-
- var name = property.charAt(0).toLowerCase() + property.substr(1),
- controller = app[property].create();
-
- router.set(name, controller);
-
- controller.setProperties({
- target: router,
- controllers: router,
- namespace: app
- });
- }
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-/**
- This file implements the `location` API used by Ember's router.
-
- That API is:
-
- getURL: returns the current URL
- setURL(path): sets the current URL
- onUpdateURL(callback): triggers the callback when the URL changes
- formatURL(url): formats `url` to be placed into `href` attribute
-
- Calling setURL will not trigger onUpdateURL callbacks.
-
- TODO: This, as well as the Ember.Location documentation below, should
- perhaps be moved so that it's visible in the JsDoc output.
-*/
-/**
- @class
-
- Ember.Location returns an instance of the correct implementation of
- the `location` API.
-
- You can pass it a `implementation` ('hash', 'history', 'none') to force a
- particular implementation.
-*/
-Ember.Location = {
- create: function(options) {
- var implementation = options && options.implementation;
- Ember.assert("Ember.Location.create: you must specify a 'implementation' option", !!implementation);
-
- var implementationClass = this.implementations[implementation];
- Ember.assert("Ember.Location.create: " + implementation + " is not a valid implementation", !!implementationClass);
-
- return implementationClass.create.apply(implementationClass, arguments);
- },
-
- registerImplementation: function(name, implementation) {
- this.implementations[name] = implementation;
- },
-
- implementations: {}
-};
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- Ember.HashLocation implements the location API using the browser's
- hash. At present, it relies on a hashchange event existing in the
- browser.
-
- @extends Ember.Object
-*/
-Ember.HashLocation = Ember.Object.extend(
-/** @scope Ember.HashLocation.prototype */ {
-
- /** @private */
- init: function() {
- set(this, 'location', get(this, 'location') || window.location);
- },
-
- /**
- @private
-
- Returns the current `location.hash`, minus the '#' at the front.
- */
- getURL: function() {
- return get(this, 'location').hash.substr(1);
- },
-
- /**
- @private
-
- Set the `location.hash` and remembers what was set. This prevents
- `onUpdateURL` callbacks from triggering when the hash was set by
- `HashLocation`.
- */
- setURL: function(path) {
- get(this, 'location').hash = path;
- set(this, 'lastSetURL', path);
- },
-
- /**
- @private
-
- Register a callback to be invoked when the hash changes. These
- callbacks will execute when the user presses the back or forward
- button, but not after `setURL` is invoked.
- */
- onUpdateURL: function(callback) {
- var self = this;
- var guid = Ember.guidFor(this);
-
- Ember.$(window).bind('hashchange.ember-location-'+guid, function() {
- var path = location.hash.substr(1);
- if (get(self, 'lastSetURL') === path) { return; }
-
- set(self, 'lastSetURL', null);
-
- callback(location.hash.substr(1));
- });
- },
-
- /**
- @private
-
- Given a URL, formats it to be placed into the page as part
- of an element's `href` attribute.
-
- This is used, for example, when using the {{action}} helper
- to generate a URL based on an event.
- */
- formatURL: function(url) {
- return '#'+url;
- },
-
- /** @private */
- willDestroy: function() {
- var guid = Ember.guidFor(this);
-
- Ember.$(window).unbind('hashchange.ember-location-'+guid);
- }
-});
-
-Ember.Location.registerImplementation('hash', Ember.HashLocation);
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- Ember.HistoryLocation implements the location API using the browser's
- history.pushState API.
-
- @extends Ember.Object
-*/
-Ember.HistoryLocation = Ember.Object.extend(
-/** @scope Ember.HistoryLocation.prototype */ {
-
- /** @private */
- init: function() {
- set(this, 'location', get(this, 'location') || window.location);
- set(this, '_initialURL', get(this, 'location').pathname);
- },
-
- /**
- Will be pre-pended to path upon state change
- */
- rootURL: '/',
-
- /**
- @private
-
- Used to give history a starting reference
- */
- _initialURL: null,
-
- /**
- @private
-
- Returns the current `location.pathname`.
- */
- getURL: function() {
- return get(this, 'location').pathname;
- },
-
- /**
- @private
-
- Uses `history.pushState` to update the url without a page reload.
- */
- setURL: function(path) {
- var state = window.history.state,
- initialURL = get(this, '_initialURL');
-
- path = this.formatPath(path);
-
- if ((initialURL !== path && !state) || (state && state.path !== path)) {
- window.history.pushState({ path: path }, null, path);
- }
- },
-
- /**
- @private
-
- Register a callback to be invoked whenever the browser
- history changes, including using forward and back buttons.
- */
- onUpdateURL: function(callback) {
- var guid = Ember.guidFor(this);
-
- Ember.$(window).bind('popstate.ember-location-'+guid, function(e) {
- callback(location.pathname);
- });
- },
-
- /**
- @private
-
- returns the given path appended to rootURL
- */
- formatPath: function(path) {
- var rootURL = get(this, 'rootURL');
-
- if (path !== '') {
- rootURL = rootURL.replace(/\/$/, '');
- }
-
- return rootURL + path;
- },
-
- /**
- @private
-
- Used when using {{action}} helper. Since no formatting
- is required we just return the url given.
- */
- formatURL: function(url) {
- return url;
- },
-
- /** @private */
- willDestroy: function() {
- var guid = Ember.guidFor(this);
-
- Ember.$(window).unbind('popstate.ember-location-'+guid);
- }
-});
-
-Ember.Location.registerImplementation('history', Ember.HistoryLocation);
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- Ember.NoneLocation does not interact with the browser. It is useful for
- testing, or when you need to manage state with your Router, but temporarily
- don't want it to muck with the URL (for example when you embed your
- application in a larger page).
-
- @extends Ember.Object
-*/
-Ember.NoneLocation = Ember.Object.extend(
-/** @scope Ember.NoneLocation.prototype */ {
- path: '',
-
- getURL: function() {
- return get(this, 'path');
- },
-
- setURL: function(path) {
- set(this, 'path', path);
- },
-
- onUpdateURL: function(callback) {
- // We are not wired up to the browser, so we'll never trigger the callback.
- },
-
- formatURL: function(url) {
- // The return value is not overly meaningful, but we do not want to throw
- // errors when test code renders templates containing {{action href=true}}
- // helpers.
- return url;
- }
-});
-
-Ember.Location.registerImplementation('none', Ember.NoneLocation);
-
-})();
-
-
-
-(function() {
-
-})();
-
-
-
-(function() {
-
-})();
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-Ember.assert("Ember Views require jQuery 1.7", window.jQuery && (window.jQuery().jquery.match(/^1\.7(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
-Ember.$ = window.jQuery;
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-// http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dndevents
-var dragEvents = Ember.String.w('dragstart drag dragenter dragleave dragover drop dragend');
-
-// Copies the `dataTransfer` property from a browser event object onto the
-// jQuery event object for the specified events
-Ember.EnumerableUtils.forEach(dragEvents, function(eventName) {
- Ember.$.event.fixHooks[eventName] = { props: ['dataTransfer'] };
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-var get = Ember.get, set = Ember.set;
-var indexOf = Ember.ArrayPolyfills.indexOf;
-
-/** @private */
-var ClassSet = function() {
- this.seen = {};
- this.list = [];
-};
-
-ClassSet.prototype = {
- add: function(string) {
- if (string in this.seen) { return; }
- this.seen[string] = true;
-
- this.list.push(string);
- },
-
- toDOM: function() {
- return this.list.join(" ");
- }
-};
-
-/**
- @class
-
- Ember.RenderBuffer gathers information regarding the a view and generates the
- final representation. Ember.RenderBuffer will generate HTML which can be pushed
- to the DOM.
-
- @extends Ember.Object
-*/
-Ember.RenderBuffer = function(tagName) {
- return new Ember._RenderBuffer(tagName);
-};
-
-Ember._RenderBuffer = function(tagName) {
- this.elementTag = tagName;
- this.childBuffers = [];
-};
-
-Ember._RenderBuffer.prototype =
-/** @scope Ember.RenderBuffer.prototype */ {
-
- /**
- Array of class-names which will be applied in the class="" attribute
-
- You should not maintain this array yourself, rather, you should use
- the addClass() method of Ember.RenderBuffer.
-
- @type Array
- @default []
- */
- elementClasses: null,
-
- /**
- The id in of the element, to be applied in the id="" attribute
-
- You should not set this property yourself, rather, you should use
- the id() method of Ember.RenderBuffer.
-
- @type String
- @default null
- */
- elementId: null,
-
- /**
- A hash keyed on the name of the attribute and whose value will be
- applied to that attribute. For example, if you wanted to apply a
- data-view="Foo.bar" property to an element, you would set the
- elementAttributes hash to {'data-view':'Foo.bar'}
-
- You should not maintain this hash yourself, rather, you should use
- the attr() method of Ember.RenderBuffer.
-
- @type Hash
- @default {}
- */
- elementAttributes: null,
-
- /**
- The tagname of the element an instance of Ember.RenderBuffer represents.
-
- Usually, this gets set as the first parameter to Ember.RenderBuffer. For
- example, if you wanted to create a `p` tag, then you would call
-
- Ember.RenderBuffer('p')
-
- @type String
- @default null
- */
- elementTag: null,
-
- /**
- A hash keyed on the name of the style attribute and whose value will
- be applied to that attribute. For example, if you wanted to apply a
- background-color:black;" style to an element, you would set the
- elementStyle hash to {'background-color':'black'}
-
- You should not maintain this hash yourself, rather, you should use
- the style() method of Ember.RenderBuffer.
-
- @type Hash
- @default {}
- */
- elementStyle: null,
-
- /**
- Nested RenderBuffers will set this to their parent RenderBuffer
- instance.
-
- @type Ember._RenderBuffer
- */
- parentBuffer: null,
-
- /**
- Adds a string of HTML to the RenderBuffer.
-
- @param {String} string HTML to push into the buffer
- @returns {Ember.RenderBuffer} this
- */
- push: function(string) {
- this.childBuffers.push(String(string));
- return this;
- },
-
- /**
- Adds a class to the buffer, which will be rendered to the class attribute.
-
- @param {String} className Class name to add to the buffer
- @returns {Ember.RenderBuffer} this
- */
- addClass: function(className) {
- // lazily create elementClasses
- var elementClasses = this.elementClasses = (this.elementClasses || new ClassSet());
- this.elementClasses.add(className);
-
- return this;
- },
-
- /**
- Sets the elementID to be used for the element.
-
- @param {String} id
- @returns {Ember.RenderBuffer} this
- */
- id: function(id) {
- this.elementId = id;
- return this;
- },
-
- // duck type attribute functionality like jQuery so a render buffer
- // can be used like a jQuery object in attribute binding scenarios.
-
- /**
- Adds an attribute which will be rendered to the element.
-
- @param {String} name The name of the attribute
- @param {String} value The value to add to the attribute
- @returns {Ember.RenderBuffer|String} this or the current attribute value
- */
- attr: function(name, value) {
- var attributes = this.elementAttributes = (this.elementAttributes || {});
-
- if (arguments.length === 1) {
- return attributes[name];
- } else {
- attributes[name] = value;
- }
-
- return this;
- },
-
- /**
- Remove an attribute from the list of attributes to render.
-
- @param {String} name The name of the attribute
- @returns {Ember.RenderBuffer} this
- */
- removeAttr: function(name) {
- var attributes = this.elementAttributes;
- if (attributes) { delete attributes[name]; }
-
- return this;
- },
-
- /**
- Adds a style to the style attribute which will be rendered to the element.
-
- @param {String} name Name of the style
- @param {String} value
- @returns {Ember.RenderBuffer} this
- */
- style: function(name, value) {
- var style = this.elementStyle = (this.elementStyle || {});
-
- this.elementStyle[name] = value;
- return this;
- },
-
- /**
- Create a new child render buffer from a parent buffer. Optionally set
- additional properties on the buffer. Optionally invoke a callback
- with the newly created buffer.
-
- This is a primitive method used by other public methods: `begin`,
- `prepend`, `replaceWith`, `insertAfter`.
-
- @private
- @param {String} tagName Tag name to use for the child buffer's element
- @param {Ember._RenderBuffer} parent The parent render buffer that this
- buffer should be appended to.
- @param {Function} fn A callback to invoke with the newly created buffer.
- @param {Object} other Additional properties to add to the newly created
- buffer.
- */
- newBuffer: function(tagName, parent, fn, other) {
- var buffer = new Ember._RenderBuffer(tagName);
- buffer.parentBuffer = parent;
-
- if (other) { Ember.$.extend(buffer, other); }
- if (fn) { fn.call(this, buffer); }
-
- return buffer;
- },
-
- /**
- Replace the current buffer with a new buffer. This is a primitive
- used by `remove`, which passes `null` for `newBuffer`, and `replaceWith`,
- which passes the new buffer it created.
-
- @private
- @param {Ember._RenderBuffer} buffer The buffer to insert in place of
- the existing buffer.
- */
- replaceWithBuffer: function(newBuffer) {
- var parent = this.parentBuffer;
- if (!parent) { return; }
-
- var childBuffers = parent.childBuffers;
-
- var index = indexOf.call(childBuffers, this);
-
- if (newBuffer) {
- childBuffers.splice(index, 1, newBuffer);
- } else {
- childBuffers.splice(index, 1);
- }
- },
-
- /**
- Creates a new Ember.RenderBuffer object with the provided tagName as
- the element tag and with its parentBuffer property set to the current
- Ember.RenderBuffer.
-
- @param {String} tagName Tag name to use for the child buffer's element
- @returns {Ember.RenderBuffer} A new RenderBuffer object
- */
- begin: function(tagName) {
- return this.newBuffer(tagName, this, function(buffer) {
- this.childBuffers.push(buffer);
- });
- },
-
- /**
- Prepend a new child buffer to the current render buffer.
-
- @param {String} tagName Tag name to use for the child buffer's element
- */
- prepend: function(tagName) {
- return this.newBuffer(tagName, this, function(buffer) {
- this.childBuffers.splice(0, 0, buffer);
- });
- },
-
- /**
- Replace the current buffer with a new render buffer.
-
- @param {String} tagName Tag name to use for the new buffer's element
- */
- replaceWith: function(tagName) {
- var parentBuffer = this.parentBuffer;
-
- return this.newBuffer(tagName, parentBuffer, function(buffer) {
- this.replaceWithBuffer(buffer);
- });
- },
-
- /**
- Insert a new render buffer after the current render buffer.
-
- @param {String} tagName Tag name to use for the new buffer's element
- */
- insertAfter: function(tagName) {
- var parentBuffer = get(this, 'parentBuffer');
-
- return this.newBuffer(tagName, parentBuffer, function(buffer) {
- var siblings = parentBuffer.childBuffers;
- var index = indexOf.call(siblings, this);
- siblings.splice(index + 1, 0, buffer);
- });
- },
-
- /**
- Closes the current buffer and adds its content to the parentBuffer.
-
- @returns {Ember.RenderBuffer} The parentBuffer, if one exists. Otherwise, this
- */
- end: function() {
- var parent = this.parentBuffer;
- return parent || this;
- },
-
- remove: function() {
- this.replaceWithBuffer(null);
- },
-
- /**
- @returns {DOMElement} The element corresponding to the generated HTML
- of this buffer
- */
- element: function() {
- return Ember.$(this.string())[0];
- },
-
- /**
- Generates the HTML content for this buffer.
-
- @returns {String} The generated HTMl
- */
- string: function() {
- var content = '', tag = this.elementTag, openTag;
-
- if (tag) {
- var id = this.elementId,
- classes = this.elementClasses,
- attrs = this.elementAttributes,
- style = this.elementStyle,
- styleBuffer = '', prop;
-
- openTag = ["<" + tag];
-
- if (id) { openTag.push('id="' + this._escapeAttribute(id) + '"'); }
- if (classes) { openTag.push('class="' + this._escapeAttribute(classes.toDOM()) + '"'); }
-
- if (style) {
- for (prop in style) {
- if (style.hasOwnProperty(prop)) {
- styleBuffer += (prop + ':' + this._escapeAttribute(style[prop]) + ';');
- }
- }
-
- openTag.push('style="' + styleBuffer + '"');
- }
-
- if (attrs) {
- for (prop in attrs) {
- if (attrs.hasOwnProperty(prop)) {
- openTag.push(prop + '="' + this._escapeAttribute(attrs[prop]) + '"');
- }
- }
- }
-
- openTag = openTag.join(" ") + '>';
- }
-
- var childBuffers = this.childBuffers;
-
- Ember.ArrayPolyfills.forEach.call(childBuffers, function(buffer) {
- var stringy = typeof buffer === 'string';
- content += (stringy ? buffer : buffer.string());
- });
-
- if (tag) {
- return openTag + content + "</" + tag + ">";
- } else {
- return content;
- }
- },
-
- _escapeAttribute: function(value) {
- // Stolen shamelessly from Handlebars
-
- var escape = {
- "<": "&lt;",
- ">": "&gt;",
- '"': "&quot;",
- "'": "&#x27;",
- "`": "&#x60;"
- };
-
- var badChars = /&(?!\w+;)|[<>"'`]/g;
- var possible = /[&<>"'`]/;
-
- var escapeChar = function(chr) {
- return escape[chr] || "&amp;";
- };
-
- var string = value.toString();
-
- if(!possible.test(string)) { return string; }
- return string.replace(badChars, escapeChar);
- }
-
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
-
-/**
- @ignore
-
- Ember.EventDispatcher handles delegating browser events to their corresponding
- Ember.Views. For example, when you click on a view, Ember.EventDispatcher ensures
- that that view's `mouseDown` method gets called.
-*/
-Ember.EventDispatcher = Ember.Object.extend(
-/** @scope Ember.EventDispatcher.prototype */{
-
- /**
- @private
-
- The root DOM element to which event listeners should be attached. Event
- listeners will be attached to the document unless this is overridden.
-
- Can be specified as a DOMElement or a selector string.
-
- The default body is a string since this may be evaluated before document.body
- exists in the DOM.
-
- @type DOMElement
- @default 'body'
- */
- rootElement: 'body',
-
- /**
- @private
-
- Sets up event listeners for standard browser events.
-
- This will be called after the browser sends a DOMContentReady event. By
- default, it will set up all of the listeners on the document body. If you
- would like to register the listeners on a different element, set the event
- dispatcher's `root` property.
- */
- setup: function(addedEvents) {
- var event, events = {
- touchstart : 'touchStart',
- touchmove : 'touchMove',
- touchend : 'touchEnd',
- touchcancel : 'touchCancel',
- keydown : 'keyDown',
- keyup : 'keyUp',
- keypress : 'keyPress',
- mousedown : 'mouseDown',
- mouseup : 'mouseUp',
- contextmenu : 'contextMenu',
- click : 'click',
- dblclick : 'doubleClick',
- mousemove : 'mouseMove',
- focusin : 'focusIn',
- focusout : 'focusOut',
- mouseenter : 'mouseEnter',
- mouseleave : 'mouseLeave',
- submit : 'submit',
- input : 'input',
- change : 'change',
- dragstart : 'dragStart',
- drag : 'drag',
- dragenter : 'dragEnter',
- dragleave : 'dragLeave',
- dragover : 'dragOver',
- drop : 'drop',
- dragend : 'dragEnd'
- };
-
- Ember.$.extend(events, addedEvents || {});
-
- var rootElement = Ember.$(get(this, 'rootElement'));
-
- Ember.assert(fmt('You cannot use the same root element (%@) multiple times in an Ember.Application', [rootElement.selector || rootElement[0].tagName]), !rootElement.is('.ember-application'));
- Ember.assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', !rootElement.closest('.ember-application').length);
- Ember.assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.find('.ember-application').length);
-
- rootElement.addClass('ember-application');
-
- Ember.assert('Unable to add "ember-application" class to rootElement. Make sure you set rootElement to the body or an element in the body.', rootElement.is('.ember-application'));
-
- for (event in events) {
- if (events.hasOwnProperty(event)) {
- this.setupHandler(rootElement, event, events[event]);
- }
- }
- },
-
- /**
- @private
-
- Registers an event listener on the document. If the given event is
- triggered, the provided event handler will be triggered on the target
- view.
-
- If the target view does not implement the event handler, or if the handler
- returns false, the parent view will be called. The event will continue to
- bubble to each successive parent view until it reaches the top.
-
- For example, to have the `mouseDown` method called on the target view when
- a `mousedown` event is received from the browser, do the following:
-
- setupHandler('mousedown', 'mouseDown');
-
- @param {String} event the browser-originated event to listen to
- @param {String} eventName the name of the method to call on the view
- */
- setupHandler: function(rootElement, event, eventName) {
- var self = this;
-
- rootElement.delegate('.ember-view', event + '.ember', function(evt, triggeringManager) {
-
- var view = Ember.View.views[this.id],
- result = true, manager = null;
-
- manager = self._findNearestEventManager(view,eventName);
-
- if (manager && manager !== triggeringManager) {
- result = self._dispatchEvent(manager, evt, eventName, view);
- } else if (view) {
- result = self._bubbleEvent(view,evt,eventName);
- } else {
- evt.stopPropagation();
- }
-
- return result;
- });
-
- rootElement.delegate('[data-ember-action]', event + '.ember', function(evt) {
- var actionId = Ember.$(evt.currentTarget).attr('data-ember-action'),
- action = Ember.Handlebars.ActionHelper.registeredActions[actionId],
- handler = action.handler;
-
- if (action.eventName === eventName) {
- return handler(evt);
- }
- });
- },
-
- /** @private */
- _findNearestEventManager: function(view, eventName) {
- var manager = null;
-
- while (view) {
- manager = get(view, 'eventManager');
- if (manager && manager[eventName]) { break; }
-
- view = get(view, 'parentView');
- }
-
- return manager;
- },
-
- /** @private */
- _dispatchEvent: function(object, evt, eventName, view) {
- var result = true;
-
- var handler = object[eventName];
- if (Ember.typeOf(handler) === 'function') {
- result = handler.call(object, evt, view);
- // Do not preventDefault in eventManagers.
- evt.stopPropagation();
- }
- else {
- result = this._bubbleEvent(view, evt, eventName);
- }
-
- return result;
- },
-
- /** @private */
- _bubbleEvent: function(view, evt, eventName) {
- return Ember.run(function() {
- return view.handleEvent(eventName, evt);
- });
- },
-
- /** @private */
- destroy: function() {
- var rootElement = get(this, 'rootElement');
- Ember.$(rootElement).undelegate('.ember').removeClass('ember-application');
- return this._super();
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-// Add a new named queue for rendering views that happens
-// after bindings have synced.
-var queues = Ember.run.queues;
-queues.splice(Ember.$.inArray('actions', queues)+1, 0, 'render');
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-Ember.ControllerMixin.reopen({
-
- target: null,
- controllers: null,
- namespace: null,
- view: null,
-
- /**
- `connectOutlet` creates a new instance of a provided view
- class, wires it up to its associated controller, and
- assigns the new view to a property on the current controller.
-
- The purpose of this method is to enable views that use
- outlets to quickly assign new views for a given outlet.
-
- For example, an application view's template may look like
- this:
-
- <h1>My Blog</h1>
- {{outlet}}
-
- The view for this outlet is specified by assigning a
- `view` property to the application's controller. The
- following code will assign a new `App.PostsView` to
- that outlet:
-
- applicationController.connectOutlet('posts');
-
- In general, you will also want to assign a controller
- to the newly created view. By convention, a controller
- named `postsController` will be assigned as the view's
- controller.
-
- In an application initialized using `app.initialize(router)`,
- `connectOutlet` will look for `postsController` on the
- router. The initialization process will automatically
- create an instance of `App.PostsController` called
- `postsController`, so you don't need to do anything
- beyond `connectOutlet` to assign your view and wire it
- up to its associated controller.
-
- You can supply a `content` for the controller by supplying
- a final argument after the view class:
-
- applicationController.connectOutlet('posts', App.Post.find());
-
- You can specify a particular outlet to use. For example, if your main
- template looks like:
-
- <h1>My Blog</h1>
- {{outlet master}}
- {{outlet detail}}
-
- You can assign an `App.PostsView` to the master outlet:
-
- applicationController.connectOutlet({
- name: 'posts',
- outletName: 'master',
- context: App.Post.find()
- });
-
- You can write this as:
-
- applicationController.connectOutlet('master', 'posts', App.Post.find());
-
- @param {String} outletName a name for the outlet to set
- @param {String} name a view/controller pair name
- @param {Object} context a context object to assign to the
- controller's `content` property, if a controller can be
- found (optional)
- */
- connectOutlet: function(name, context) {
- // Normalize arguments. Supported arguments:
- //
- // name
- // name, context
- // outletName, name
- // outletName, name, context
- // options
- //
- // The options hash has the following keys:
- //
- // name: the name of the controller and view
- // to use. If this is passed, the name
- // determines the view and controller.
- // outletName: the name of the outlet to
- // fill in. default: 'view'
- // viewClass: the class of the view to instantiate
- // controller: the controller instance to pass
- // to the view
- // context: an object that should become the
- // controller's `content` and thus the
- // template's context.
-
- var outletName, viewClass, view, controller, options;
-
- if (Ember.typeOf(context) === 'string') {
- outletName = name;
- name = context;
- context = arguments[2];
- }
-
- if (arguments.length === 1) {
- if (Ember.typeOf(name) === 'object') {
- options = name;
- outletName = options.outletName;
- name = options.name;
- viewClass = options.viewClass;
- controller = options.controller;
- context = options.context;
- }
- } else {
- options = {};
- }
-
- outletName = outletName || 'view';
-
- Ember.assert("You must supply a name or a view class to connectOutlets, but not both", (!!name && !viewClass && !controller) || (!name && !!viewClass));
-
- if (name) {
- var namespace = get(this, 'namespace'),
- controllers = get(this, 'controllers');
-
- var viewClassName = name.charAt(0).toUpperCase() + name.substr(1) + "View";
- viewClass = get(namespace, viewClassName);
- controller = get(controllers, name + 'Controller');
-
- Ember.assert("The name you supplied " + name + " did not resolve to a view " + viewClassName, !!viewClass);
- Ember.assert("The name you supplied " + name + " did not resolve to a controller " + name + 'Controller', (!!controller && !!context) || !context);
- }
-
- if (controller && context) { controller.set('content', context); }
- view = viewClass.create();
- if (controller) { set(view, 'controller', controller); }
- set(this, outletName, view);
-
- return view;
- },
-
- /**
- Convenience method to connect controllers. This method makes other controllers
- available on the controller the method was invoked on.
-
- For example, to make the `personController` and the `postController` available
- on the `overviewController`, you would call:
-
- overviewController.connectControllers('person', 'post');
-
- @param {String...} controllerNames the controllers to make available
- */
- connectControllers: function() {
- var controllers = get(this, 'controllers'),
- controllerNames = Array.prototype.slice.apply(arguments),
- controllerName;
-
- for (var i=0, l=controllerNames.length; i<l; i++) {
- controllerName = controllerNames[i] + 'Controller';
- set(this, controllerName, get(controllers, controllerName));
- }
- }
-});
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, addObserver = Ember.addObserver;
-var meta = Ember.meta, fmt = Ember.String.fmt;
-var a_slice = [].slice;
-var a_forEach = Ember.EnumerableUtils.forEach;
-
-var childViewsProperty = Ember.computed(function() {
- var childViews = this._childViews;
-
- var ret = Ember.A();
-
- a_forEach(childViews, function(view) {
- if (view.isVirtual) {
- ret.pushObjects(get(view, 'childViews'));
- } else {
- ret.push(view);
- }
- });
-
- return ret;
-}).property().cacheable();
-
-var VIEW_PRESERVES_CONTEXT = Ember.VIEW_PRESERVES_CONTEXT;
-Ember.warn("The way that the {{view}} helper affects templates is about to change. Previously, templates inside child views would use the new view as the context. Soon, views will preserve their parent context when rendering their template. You can opt-in early to the new behavior by setting `ENV.VIEW_PRESERVES_CONTEXT = true`. For more information, see https://gist.github.com/2494968. You should update your templates as soon as possible; this default will change soon, and the option will be eliminated entirely before the 1.0 release.", VIEW_PRESERVES_CONTEXT);
-
-/**
- @static
-
- Global hash of shared templates. This will automatically be populated
- by the build tools so that you can store your Handlebars templates in
- separate files that get loaded into JavaScript at buildtime.
-
- @type Hash
-*/
-Ember.TEMPLATES = {};
-
-var invokeForState = {
- preRender: {},
- inBuffer: {},
- hasElement: {},
- inDOM: {},
- destroyed: {}
-};
-
-/**
- @class
-
- `Ember.View` is the class in Ember responsible for encapsulating templates of HTML
- content, combining templates with data to render as sections of a page's DOM, and
- registering and responding to user-initiated events.
-
- ## HTML Tag
- The default HTML tag name used for a view's DOM representation is `div`. This can be
- customized by setting the `tagName` property. The following view class:
-
- ParagraphView = Ember.View.extend({
- tagName: 'em'
- })
-
- Would result in instances with the following HTML:
-
- <em id="ember1" class="ember-view"></em>
-
- ## HTML `class` Attribute
- The HTML `class` attribute of a view's tag can be set by providing a `classNames` property
- that is set to an array of strings:
-
- MyView = Ember.View.extend({
- classNames: ['my-class', 'my-other-class']
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view my-class my-other-class"></div>
-
- `class` attribute values can also be set by providing a `classNameBindings` property
- set to an array of properties names for the view. The return value of these properties
- will be added as part of the value for the view's `class` attribute. These properties
- can be computed properties:
-
- MyView = Ember.View.extend({
- classNameBindings: ['propertyA', 'propertyB'],
- propertyA: 'from-a',
- propertyB: function(){
- if(someLogic){ return 'from-b'; }
- }.property()
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view from-a from-b"></div>
-
- If the value of a class name binding returns a boolean the property name itself
- will be used as the class name if the property is true. The class name will
- not be added if the value is `false` or `undefined`.
-
- MyView = Ember.View.extend({
- classNameBindings: ['hovered'],
- hovered: true
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view hovered"></div>
-
- When using boolean class name bindings you can supply a string value other than the
- property name for use as the `class` HTML attribute by appending the preferred value after
- a ":" character when defining the binding:
-
- MyView = Ember.View.extend({
- classNameBindings: ['awesome:so-very-cool'],
- awesome: true
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view so-very-cool"></div>
-
-
- Boolean value class name bindings whose property names are in a camelCase-style
- format will be converted to a dasherized format:
-
- MyView = Ember.View.extend({
- classNameBindings: ['isUrgent'],
- isUrgent: true
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view is-urgent"></div>
-
-
- Class name bindings can also refer to object values that are found by
- traversing a path relative to the view itself:
-
- MyView = Ember.View.extend({
- classNameBindings: ['messages.empty']
- messages: Ember.Object.create({
- empty: true
- })
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view empty"></div>
-
-
- If you want to add a class name for a property which evaluates to true and
- and a different class name if it evaluates to false, you can pass a binding
- like this:
-
- // Applies 'enabled' class when isEnabled is true and 'disabled' when isEnabled is false
- Ember.View.create({
- classNameBindings: ['isEnabled:enabled:disabled']
- isEnabled: true
- });
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view enabled"></div>
-
- When isEnabled is `false`, the resulting HTML reprensentation looks like this:
-
- <div id="ember1" class="ember-view disabled"></div>
-
- This syntax offers the convenience to add a class if a property is `false`:
-
- // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false
- Ember.View.create({
- classNameBindings: ['isEnabled::disabled']
- isEnabled: true
- });
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view"></div>
-
- When the `isEnabled` property on the view is set to `false`, it will result
- in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view disabled"></div>
-
-
- Updates to the the value of a class name binding will result in automatic update
- of the HTML `class` attribute in the view's rendered HTML representation.
- If the value becomes `false` or `undefined` the class name will be removed.
-
- Both `classNames` and `classNameBindings` are concatenated properties.
- See `Ember.Object` documentation for more information about concatenated properties.
-
- ## HTML Attributes
- The HTML attribute section of a view's tag can be set by providing an `attributeBindings`
- property set to an array of property names on the view. The return value of these properties
- will be used as the value of the view's HTML associated attribute:
-
- AnchorView = Ember.View.extend({
- tagName: 'a',
- attributeBindings: ['href'],
- href: 'http://google.com'
- })
-
- Will result in view instances with an HTML representation of:
-
- <a id="ember1" class="ember-view" href="http://google.com"></a>
-
- If the return value of an `attributeBindings` monitored property is a boolean
- the property will follow HTML's pattern of repeating the attribute's name as
- its value:
-
- MyTextInput = Ember.View.extend({
- tagName: 'input',
- attributeBindings: ['disabled'],
- disabled: true
- })
-
- Will result in view instances with an HTML representation of:
-
- <input id="ember1" class="ember-view" disabled="disabled" />
-
- `attributeBindings` can refer to computed properties:
-
- MyTextInput = Ember.View.extend({
- tagName: 'input',
- attributeBindings: ['disabled'],
- disabled: function(){
- if (someLogic) {
- return true;
- } else {
- return false;
- }
- }.property()
- })
-
- Updates to the the property of an attribute binding will result in automatic update
- of the HTML attribute in the view's rendered HTML representation.
-
- `attributeBindings` is a concatenated property. See `Ember.Object` documentation
- for more information about concatenated properties.
-
- ## Templates
- The HTML contents of a view's rendered representation are determined by its template.
- Templates can be any function that accepts an optional context parameter and returns
- a string of HTML that will be inserted within the view's tag. Most
- typically in Ember this function will be a compiled Ember.Handlebars template.
-
- AView = Ember.View.extend({
- template: Ember.Handlebars.compile('I am the template')
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view">I am the template</div>
-
- The default context of the compiled template will be the view instance itself:
-
- AView = Ember.View.extend({
- template: Ember.Handlebars.compile('Hello {{excitedGreeting}}')
- })
-
- aView = AView.create({
- content: Ember.Object.create({
- firstName: 'Barry'
- })
- excitedGreeting: function(){
- return this.get("content.firstName") + "!!!"
- }
- })
-
- Will result in an HTML representation of:
-
- <div id="ember1" class="ember-view">Hello Barry!!!</div>
-
- Within an Ember application is more common to define a Handlebars templates as
- part of a page:
-
- <script type='text/x-handlebars' data-template-name='some-template'>
- Hello
- </script>
-
- And associate it by name using a view's `templateName` property:
-
- AView = Ember.View.extend({
- templateName: 'some-template'
- })
-
- Using a value for `templateName` that does not have a Handlebars template with a
- matching `data-template-name` attribute will throw an error.
-
- Assigning a value to both `template` and `templateName` properties will throw an error.
-
- For views classes that may have a template later defined (e.g. as the block portion of a `{{view}}`
- Handlebars helper call in another template or in a subclass), you can provide a `defaultTemplate`
- property set to compiled template function. If a template is not later provided for the view
- instance the `defaultTemplate` value will be used:
-
- AView = Ember.View.extend({
- defaultTemplate: Ember.Handlebars.compile('I was the default'),
- template: null,
- templateName: null
- })
-
- Will result in instances with an HTML representation of:
-
- <div id="ember1" class="ember-view">I was the default</div>
-
- If a `template` or `templateName` is provided it will take precedence over `defaultTemplate`:
-
- AView = Ember.View.extend({
- defaultTemplate: Ember.Handlebars.compile('I was the default')
- })
-
- aView = AView.create({
- template: Ember.Handlebars.compile('I was the template, not default')
- })
-
- Will result in the following HTML representation when rendered:
-
- <div id="ember1" class="ember-view">I was the template, not default</div>
-
- ## Layouts
- Views can have a secondary template that wraps their main template. Like
- primary templates, layouts can be any function that accepts an optional context
- parameter and returns a string of HTML that will be inserted inside view's tag. Views whose HTML
- element is self closing (e.g. `<input />`) cannot have a layout and this property will be ignored.
-
- Most typically in Ember a layout will be a compiled Ember.Handlebars template.
-
- A view's layout can be set directly with the `layout` property or reference an
- existing Handlebars template by name with the `layoutName` property.
-
- A template used as a layout must contain a single use of the Handlebars `{{yield}}`
- helper. The HTML contents of a view's rendered `template` will be inserted at this location:
-
- AViewWithLayout = Ember.View.extend({
- layout: Ember.Handlebars.compile("<div class='my-decorative-class'>{{yield}}</div>")
- template: Ember.Handlebars.compile("I got wrapped"),
- })
-
- Will result in view instances with an HTML representation of:
-
- <div id="ember1" class="ember-view">
- <div class="my-decorative-class">
- I got wrapped
- </div>
- </div>
-
- See `Handlebars.helpers.yield` for more information.
-
- ## Responding to Browser Events
- Views can respond to user-initiated events in one of three ways: method implementation,
- through an event manager, and through `{{action}}` helper use in their template or layout.
-
- ### Method Implementation
- Views can respond to user-initiated events by implementing a method that matches the
- event name. A `jQuery.Event` object will be passed as the argument to this method.
-
- AView = Ember.View.extend({
- click: function(event){
- // will be called when when an instance's
- // rendered element is clicked
- }
- })
-
- ### Event Managers
- Views can define an object as their `eventManager` property. This object can then
- implement methods that match the desired event names. Matching events that occur
- on the view's rendered HTML or the rendered HTML of any of its DOM descendants
- will trigger this method. A `jQuery.Event` object will be passed as the first
- argument to the method and an `Ember.View` object as the second. The `Ember.View`
- will be the view whose rendered HTML was interacted with. This may be the view with
- the `eventManager` property or one of its descendent views.
-
- AView = Ember.View.extend({
- eventManager: Ember.Object.create({
- doubleClick: function(event, view){
- // will be called when when an instance's
- // rendered element or any rendering
- // of this views's descendent
- // elements is clicked
- }
- })
- })
-
-
- An event defined for an event manager takes precedence over events of the same
- name handled through methods on the view.
-
-
- AView = Ember.View.extend({
- mouseEnter: function(event){
- // will never trigger.
- },
- eventManager: Ember.Object.create({
- mouseEnter: function(event, view){
- // takes presedence over AView#mouseEnter
- }
- })
- })
-
- Similarly a view's event manager will take precedence for events of any views
- rendered as a descendent. A method name that matches an event name will not be called
- if the view instance was rendered inside the HTML representation of a view that has
- an `eventManager` property defined that handles events of the name. Events not handled
- by the event manager will still trigger method calls on the descendent.
-
- OuterView = Ember.View.extend({
- template: Ember.Handlebars.compile("outer {{#view InnerView}}inner{{/view}} outer"),
- eventManager: Ember.Object.create({
- mouseEnter: function(event, view){
- // view might be instance of either
- // OutsideView or InnerView depending on
- // where on the page the user interaction occured
- }
- })
- })
-
- InnerView = Ember.View.extend({
- click: function(event){
- // will be called if rendered inside
- // an OuterView because OuterView's
- // eventManager doesn't handle click events
- },
- mouseEnter: function(event){
- // will never be called if rendered inside
- // an OuterView.
- }
- })
-
- ### Handlebars `{{action}}` Helper
- See `Handlebars.helpers.action`.
-
- ### Event Names
- Possible events names for any of the responding approaches described above are:
-
- Touch events: 'touchStart', 'touchMove', 'touchEnd', 'touchCancel'
-
- Keyboard events: 'keyDown', 'keyUp', 'keyPress'
-
- Mouse events: 'mouseDown', 'mouseUp', 'contextMenu', 'click', 'doubleClick', 'mouseMove',
- 'focusIn', 'focusOut', 'mouseEnter', 'mouseLeave'
-
- Form events: 'submit', 'change', 'focusIn', 'focusOut', 'input'
-
- HTML5 drag and drop events: 'dragStart', 'drag', 'dragEnter', 'dragLeave', 'drop', 'dragEnd'
-
- ## Handlebars `{{view}}` Helper
- Other `Ember.View` instances can be included as part of a view's template by using the `{{view}}`
- Handlebars helper. See `Handlebars.helpers.view` for additional information.
-
- @extends Ember.Object
- @extends Ember.Evented
-*/
-Ember.View = Ember.Object.extend(Ember.Evented,
-/** @scope Ember.View.prototype */ {
-
- /** @private */
- concatenatedProperties: ['classNames', 'classNameBindings', 'attributeBindings'],
-
- /**
- @type Boolean
- @default true
- @constant
- */
- isView: true,
-
- // ..........................................................
- // TEMPLATE SUPPORT
- //
-
- /**
- The name of the template to lookup if no template is provided.
-
- Ember.View will look for a template with this name in this view's
- `templates` object. By default, this will be a global object
- shared in `Ember.TEMPLATES`.
-
- @type String
- @default null
- */
- templateName: null,
-
- /**
- The name of the layout to lookup if no layout is provided.
-
- Ember.View will look for a template with this name in this view's
- `templates` object. By default, this will be a global object
- shared in `Ember.TEMPLATES`.
-
- @type String
- @default null
- */
- layoutName: null,
-
- /**
- The hash in which to look for `templateName`.
-
- @type Ember.Object
- @default Ember.TEMPLATES
- */
- templates: Ember.TEMPLATES,
-
- /**
- The template used to render the view. This should be a function that
- accepts an optional context parameter and returns a string of HTML that
- will be inserted into the DOM relative to its parent view.
-
- In general, you should set the `templateName` property instead of setting
- the template yourself.
-
- @field
- @type Function
- */
- template: Ember.computed(function(key, value) {
- if (value !== undefined) { return value; }
-
- var templateName = get(this, 'templateName'),
- template = this.templateForName(templateName, 'template');
-
- return template || get(this, 'defaultTemplate');
- }).property('templateName').cacheable(),
-
- /**
- The controller managing this view. If this property is set, it will be
- made available for use by the template.
-
- @type Object
- */
- controller: Ember.computed(function(key, value) {
- var parentView;
-
- if (arguments.length === 2) {
- return value;
- } else {
- parentView = get(this, 'parentView');
- return parentView ? get(parentView, 'controller') : null;
- }
- }).property().cacheable(),
-
- /**
- A view may contain a layout. A layout is a regular template but
- supersedes the `template` property during rendering. It is the
- responsibility of the layout template to retrieve the `template`
- property from the view (or alternatively, call `Handlebars.helpers.yield`,
- `{{yield}}`) to render it in the correct location.
-
- This is useful for a view that has a shared wrapper, but which delegates
- the rendering of the contents of the wrapper to the `template` property
- on a subclass.
-
- @field
- @type Function
- */
- layout: Ember.computed(function(key, value) {
- if (arguments.length === 2) { return value; }
-
- var layoutName = get(this, 'layoutName'),
- layout = this.templateForName(layoutName, 'layout');
-
- return layout || get(this, 'defaultLayout');
- }).property('layoutName').cacheable(),
-
- templateForName: function(name, type) {
- if (!name) { return; }
-
- var templates = get(this, 'templates'),
- template = get(templates, name);
-
- if (!template) {
- throw new Ember.Error(fmt('%@ - Unable to find %@ "%@".', [this, type, name]));
- }
-
- return template;
- },
-
- /**
- The object from which templates should access properties.
-
- This object will be passed to the template function each time the render
- method is called, but it is up to the individual function to decide what
- to do with it.
-
- By default, this will be the view itself.
-
- @type Object
- */
- context: Ember.computed(function(key, value) {
- if (arguments.length === 2) {
- set(this, '_context', value);
- return value;
- } else {
- return get(this, '_context');
- }
- }).cacheable(),
-
- /**
- @private
-
- Private copy of the view's template context. This can be set directly
- by Handlebars without triggering the observer that causes the view
- to be re-rendered.
-
- The context of a view is looked up as follows:
-
- 1. Specified controller
- 2. Supplied context (usually by Handlebars)
- 3. `parentView`'s context (for a child of a ContainerView)
-
- The code in Handlebars that overrides the `_context` property first
- checks to see whether the view has a specified controller. This is
- something of a hack and should be revisited.
- */
- _context: Ember.computed(function(key, value) {
- var parentView, controller, context;
-
- if (arguments.length === 2) {
- return value;
- }
-
- if (VIEW_PRESERVES_CONTEXT) {
- if (controller = get(this, 'controller')) {
- return controller;
- }
-
- parentView = get(this, '_parentView');
- if (parentView) {
- return get(parentView, '_context');
- }
- }
-
- return this;
- }).cacheable(),
-
- /**
- If a value that affects template rendering changes, the view should be
- re-rendered to reflect the new value.
-
- @private
- */
- _displayPropertyDidChange: Ember.observer(function() {
- this.rerender();
- }, 'context', 'controller'),
-
- /**
- If the view is currently inserted into the DOM of a parent view, this
- property will point to the parent of the view.
-
- @type Ember.View
- @default null
- */
- parentView: Ember.computed(function() {
- var parent = get(this, '_parentView');
-
- if (parent && parent.isVirtual) {
- return get(parent, 'parentView');
- } else {
- return parent;
- }
- }).property('_parentView').volatile(),
-
- _parentView: null,
-
- // return the current view, not including virtual views
- concreteView: Ember.computed(function() {
- if (!this.isVirtual) { return this; }
- else { return get(this, 'parentView'); }
- }).property('_parentView').volatile(),
-
- /**
- If false, the view will appear hidden in DOM.
-
- @type Boolean
- @default null
- */
- isVisible: true,
-
- /**
- Array of child views. You should never edit this array directly.
- Instead, use appendChild and removeFromParent.
-
- @private
- @type Array
- @default []
- */
- childViews: childViewsProperty,
-
- _childViews: [],
-
- /**
- When it's a virtual view, we need to notify the parent that their
- childViews will change.
- */
- _childViewsWillChange: Ember.beforeObserver(function() {
- if (this.isVirtual) {
- var parentView = get(this, 'parentView');
- if (parentView) { Ember.propertyWillChange(parentView, 'childViews'); }
- }
- }, 'childViews'),
-
- /**
- When it's a virtual view, we need to notify the parent that their
- childViews did change.
- */
- _childViewsDidChange: Ember.observer(function() {
- if (this.isVirtual) {
- var parentView = get(this, 'parentView');
- if (parentView) { Ember.propertyDidChange(parentView, 'childViews'); }
- }
- }, 'childViews'),
-
- /**
- Return the nearest ancestor that is an instance of the provided
- class.
-
- @param {Class} klass Subclass of Ember.View (or Ember.View itself)
- @returns Ember.View
- */
- nearestInstanceOf: function(klass) {
- var view = get(this, 'parentView');
-
- while (view) {
- if(view instanceof klass) { return view; }
- view = get(view, 'parentView');
- }
- },
-
- /**
- Return the nearest ancestor that has a given property.
-
- @param {String} property A property name
- @returns Ember.View
- */
- nearestWithProperty: function(property) {
- var view = get(this, 'parentView');
-
- while (view) {
- if (property in view) { return view; }
- view = get(view, 'parentView');
- }
- },
-
- /**
- Return the nearest ancestor whose parent is an instance of
- `klass`.
-
- @param {Class} klass Subclass of Ember.View (or Ember.View itself)
- @returns Ember.View
- */
- nearestChildOf: function(klass) {
- var view = get(this, 'parentView');
-
- while (view) {
- if(get(view, 'parentView') instanceof klass) { return view; }
- view = get(view, 'parentView');
- }
- },
-
- /**
- Return the nearest ancestor that is an Ember.CollectionView
-
- @returns Ember.CollectionView
- */
- collectionView: Ember.computed(function() {
- return this.nearestInstanceOf(Ember.CollectionView);
- }).cacheable(),
-
- /**
- Return the nearest ancestor that is a direct child of
- an Ember.CollectionView
-
- @returns Ember.View
- */
- itemView: Ember.computed(function() {
- return this.nearestChildOf(Ember.CollectionView);
- }).cacheable(),
-
- /**
- Return the nearest ancestor that has the property
- `content`.
-
- @returns Ember.View
- */
- contentView: Ember.computed(function() {
- return this.nearestWithProperty('content');
- }).cacheable(),
-
- /**
- @private
-
- When the parent view changes, recursively invalidate
- collectionView, itemView, and contentView
- */
- _parentViewDidChange: Ember.observer(function() {
- if (this.isDestroying) { return; }
-
- this.invokeRecursively(function(view) {
- view.propertyDidChange('collectionView');
- view.propertyDidChange('itemView');
- view.propertyDidChange('contentView');
- });
-
- if (get(this, 'parentView.controller') && !get(this, 'controller')) {
- this.notifyPropertyChange('controller');
- }
- }, '_parentView'),
-
- _controllerDidChange: Ember.observer(function() {
- if (this.isDestroying) { return; }
-
- this.forEachChildView(function(view) {
- view.propertyDidChange('controller');
- });
- }, 'controller'),
-
- cloneKeywords: function() {
- var templateData = get(this, 'templateData');
-
- var keywords = templateData ? Ember.copy(templateData.keywords) : {};
- set(keywords, 'view', get(this, 'concreteView'));
- set(keywords, 'controller', get(this, 'controller'));
-
- return keywords;
- },
-
- /**
- Called on your view when it should push strings of HTML into a
- Ember.RenderBuffer. Most users will want to override the `template`
- or `templateName` properties instead of this method.
-
- By default, Ember.View will look for a function in the `template`
- property and invoke it with the value of `context`. The value of
- `context` will be the view's controller unless you override it.
-
- @param {Ember.RenderBuffer} buffer The render buffer
- */
- render: function(buffer) {
- // If this view has a layout, it is the responsibility of the
- // the layout to render the view's template. Otherwise, render the template
- // directly.
- var template = get(this, 'layout') || get(this, 'template');
-
- if (template) {
- var context = get(this, '_context');
- var keywords = this.cloneKeywords();
-
- var data = {
- view: this,
- buffer: buffer,
- isRenderData: true,
- keywords: keywords
- };
-
- // Invoke the template with the provided template context, which
- // is the view by default. A hash of data is also passed that provides
- // the template with access to the view and render buffer.
-
- Ember.assert('template must be a function. Did you mean to call Ember.Handlebars.compile("...") or specify templateName instead?', typeof template === 'function');
- // The template should write directly to the render buffer instead
- // of returning a string.
- var output = template(context, { data: data });
-
- // If the template returned a string instead of writing to the buffer,
- // push the string onto the buffer.
- if (output !== undefined) { buffer.push(output); }
- }
- },
-
- invokeForState: function(name) {
- var stateName = this.state, args, fn;
-
- // try to find the function for the state in the cache
- if (fn = invokeForState[stateName][name]) {
- args = a_slice.call(arguments);
- args[0] = this;
-
- return fn.apply(this, args);
- }
-
- // otherwise, find and cache the function for this state
- var parent = this, states = parent.states, state;
-
- while (states) {
- state = states[stateName];
-
- while (state) {
- fn = state[name];
-
- if (fn) {
- invokeForState[stateName][name] = fn;
-
- args = a_slice.call(arguments, 1);
- args.unshift(this);
-
- return fn.apply(this, args);
- }
-
- state = state.parentState;
- }
-
- states = states.parent;
- }
- },
-
- /**
- Renders the view again. This will work regardless of whether the
- view is already in the DOM or not. If the view is in the DOM, the
- rendering process will be deferred to give bindings a chance
- to synchronize.
-
- If children were added during the rendering process using `appendChild`,
- `rerender` will remove them, because they will be added again
- if needed by the next `render`.
-
- In general, if the display of your view changes, you should modify
- the DOM element directly instead of manually calling `rerender`, which can
- be slow.
- */
- rerender: function() {
- return this.invokeForState('rerender');
- },
-
- clearRenderedChildren: function() {
- var lengthBefore = this.lengthBeforeRender,
- lengthAfter = this.lengthAfterRender;
-
- // If there were child views created during the last call to render(),
- // remove them under the assumption that they will be re-created when
- // we re-render.
-
- // VIEW-TODO: Unit test this path.
- var childViews = this._childViews;
- for (var i=lengthAfter-1; i>=lengthBefore; i--) {
- if (childViews[i]) { childViews[i].destroy(); }
- }
- },
-
- /**
- @private
-
- Iterates over the view's `classNameBindings` array, inserts the value
- of the specified property into the `classNames` array, then creates an
- observer to update the view's element if the bound property ever changes
- in the future.
- */
- _applyClassNameBindings: function() {
- var classBindings = get(this, 'classNameBindings'),
- classNames = get(this, 'classNames'),
- elem, newClass, dasherizedClass;
-
- if (!classBindings) { return; }
-
- // Loop through all of the configured bindings. These will be either
- // property names ('isUrgent') or property paths relative to the view
- // ('content.isUrgent')
- a_forEach(classBindings, function(binding) {
-
- // Variable in which the old class value is saved. The observer function
- // closes over this variable, so it knows which string to remove when
- // the property changes.
- var oldClass;
-
- // Set up an observer on the context. If the property changes, toggle the
- // class name.
- var observer = function() {
- // Get the current value of the property
- newClass = this._classStringForProperty(binding);
- elem = this.$();
-
- // If we had previously added a class to the element, remove it.
- if (oldClass) {
- elem.removeClass(oldClass);
- // Also remove from classNames so that if the view gets rerendered,
- // the class doesn't get added back to the DOM.
- classNames.removeObject(oldClass);
- }
-
- // If necessary, add a new class. Make sure we keep track of it so
- // it can be removed in the future.
- if (newClass) {
- elem.addClass(newClass);
- oldClass = newClass;
- } else {
- oldClass = null;
- }
- };
-
- // Get the class name for the property at its current value
- dasherizedClass = this._classStringForProperty(binding);
-
- if (dasherizedClass) {
- // Ensure that it gets into the classNames array
- // so it is displayed when we render.
- classNames.push(dasherizedClass);
-
- // Save a reference to the class name so we can remove it
- // if the observer fires. Remember that this variable has
- // been closed over by the observer.
- oldClass = dasherizedClass;
- }
-
- // Extract just the property name from bindings like 'foo:bar'
- var parsedPath = Ember.View._parsePropertyPath(binding);
- addObserver(this, parsedPath.path, observer);
- }, this);
- },
-
- /**
- Iterates through the view's attribute bindings, sets up observers for each,
- then applies the current value of the attributes to the passed render buffer.
-
- @param {Ember.RenderBuffer} buffer
- */
- _applyAttributeBindings: function(buffer) {
- var attributeBindings = get(this, 'attributeBindings'),
- attributeValue, elem, type;
-
- if (!attributeBindings) { return; }
-
- a_forEach(attributeBindings, function(binding) {
- var split = binding.split(':'),
- property = split[0],
- attributeName = split[1] || property;
-
- // Create an observer to add/remove/change the attribute if the
- // JavaScript property changes.
- var observer = function() {
- elem = this.$();
- if (!elem) { return; }
-
- attributeValue = get(this, property);
-
- Ember.View.applyAttributeBindings(elem, attributeName, attributeValue);
- };
-
- addObserver(this, property, observer);
-
- // Determine the current value and add it to the render buffer
- // if necessary.
- attributeValue = get(this, property);
- Ember.View.applyAttributeBindings(buffer, attributeName, attributeValue);
- }, this);
- },
-
- /**
- @private
-
- Given a property name, returns a dasherized version of that
- property name if the property evaluates to a non-falsy value.
-
- For example, if the view has property `isUrgent` that evaluates to true,
- passing `isUrgent` to this method will return `"is-urgent"`.
- */
- _classStringForProperty: function(property) {
- var parsedPath = Ember.View._parsePropertyPath(property);
- var path = parsedPath.path;
-
- var val = get(this, path);
- if (val === undefined && Ember.isGlobalPath(path)) {
- val = get(window, path);
- }
-
- return Ember.View._classStringForValue(path, val, parsedPath.className, parsedPath.falsyClassName);
- },
-
- // ..........................................................
- // ELEMENT SUPPORT
- //
-
- /**
- Returns the current DOM element for the view.
-
- @field
- @type DOMElement
- */
- element: Ember.computed(function(key, value) {
- if (value !== undefined) {
- return this.invokeForState('setElement', value);
- } else {
- return this.invokeForState('getElement');
- }
- }).property('_parentView').cacheable(),
-
- /**
- Returns a jQuery object for this view's element. If you pass in a selector
- string, this method will return a jQuery object, using the current element
- as its buffer.
-
- For example, calling `view.$('li')` will return a jQuery object containing
- all of the `li` elements inside the DOM element of this view.
-
- @param {String} [selector] a jQuery-compatible selector string
- @returns {Ember.CoreQuery} the CoreQuery object for the DOM node
- */
- $: function(sel) {
- return this.invokeForState('$', sel);
- },
-
- /** @private */
- mutateChildViews: function(callback) {
- var childViews = this._childViews,
- idx = childViews.length,
- view;
-
- while(--idx >= 0) {
- view = childViews[idx];
- callback.call(this, view, idx);
- }
-
- return this;
- },
-
- /** @private */
- forEachChildView: function(callback) {
- var childViews = this._childViews;
-
- if (!childViews) { return this; }
-
- var len = childViews.length,
- view, idx;
-
- for(idx = 0; idx < len; idx++) {
- view = childViews[idx];
- callback.call(this, view);
- }
-
- return this;
- },
-
- /**
- Appends the view's element to the specified parent element.
-
- If the view does not have an HTML representation yet, `createElement()`
- will be called automatically.
-
- Note that this method just schedules the view to be appended; the DOM
- element will not be appended to the given element until all bindings have
- finished synchronizing.
-
- This is not typically a function that you will need to call directly
- when building your application. You might consider using Ember.ContainerView
- instead. If you do need to use appendTo, be sure that the target element you
- are providing is associated with an Ember.Application and does not have an
- ancestor element that is associated with an Ember view.
-
- @param {String|DOMElement|jQuery} A selector, element, HTML string, or jQuery object
- @returns {Ember.View} receiver
- */
- appendTo: function(target) {
- // Schedule the DOM element to be created and appended to the given
- // element after bindings have synchronized.
- this._insertElementLater(function() {
- Ember.assert("You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.", !Ember.$(target).is('.ember-view') && !Ember.$(target).parents().is('.ember-view'));
- this.$().appendTo(target);
- });
-
- return this;
- },
-
- /**
- Replaces the content of the specified parent element with this view's element.
- If the view does not have an HTML representation yet, `createElement()`
- will be called automatically.
-
- Note that this method just schedules the view to be appended; the DOM
- element will not be appended to the given element until all bindings have
- finished synchronizing
-
- @param {String|DOMElement|jQuery} A selector, element, HTML string, or jQuery object
- @returns {Ember.View} received
- */
- replaceIn: function(target) {
- Ember.assert("You cannot replace an existing Ember.View. Consider using Ember.ContainerView instead.", !Ember.$(target).is('.ember-view') && !Ember.$(target).parents().is('.ember-view'));
-
- this._insertElementLater(function() {
- Ember.$(target).empty();
- this.$().appendTo(target);
- });
-
- return this;
- },
-
- /**
- @private
-
- Schedules a DOM operation to occur during the next render phase. This
- ensures that all bindings have finished synchronizing before the view is
- rendered.
-
- To use, pass a function that performs a DOM operation..
-
- Before your function is called, this view and all child views will receive
- the `willInsertElement` event. After your function is invoked, this view
- and all of its child views will receive the `didInsertElement` event.
-
- view._insertElementLater(function() {
- this.createElement();
- this.$().appendTo('body');
- });
-
- @param {Function} fn the function that inserts the element into the DOM
- */
- _insertElementLater: function(fn) {
- this._lastInsert = Ember.guidFor(fn);
- Ember.run.schedule('render', this, this.invokeForState, 'insertElement', fn);
- },
-
- /**
- Appends the view's element to the document body. If the view does
- not have an HTML representation yet, `createElement()` will be called
- automatically.
-
- Note that this method just schedules the view to be appended; the DOM
- element will not be appended to the document body until all bindings have
- finished synchronizing.
-
- @returns {Ember.View} receiver
- */
- append: function() {
- return this.appendTo(document.body);
- },
-
- /**
- Removes the view's element from the element to which it is attached.
-
- @returns {Ember.View} receiver
- */
- remove: function() {
- // What we should really do here is wait until the end of the run loop
- // to determine if the element has been re-appended to a different
- // element.
- // In the interim, we will just re-render if that happens. It is more
- // important than elements get garbage collected.
- this.destroyElement();
- this.invokeRecursively(function(view) {
- view.clearRenderedChildren();
- });
- },
-
- /**
- The ID to use when trying to locate the element in the DOM. If you do not
- set the elementId explicitly, then the view's GUID will be used instead.
- This ID must be set at the time the view is created.
-
- @type String
- @readOnly
- */
- elementId: Ember.computed(function(key, value) {
- return value !== undefined ? value : Ember.guidFor(this);
- }).cacheable(),
-
- /**
- @private
-
- TODO: Perhaps this should be removed from the production build somehow.
- */
- _elementIdDidChange: Ember.beforeObserver(function() {
- throw "Changing a view's elementId after creation is not allowed.";
- }, 'elementId'),
-
- /**
- Attempts to discover the element in the parent element. The default
- implementation looks for an element with an ID of elementId (or the view's
- guid if elementId is null). You can override this method to provide your
- own form of lookup. For example, if you want to discover your element
- using a CSS class name instead of an ID.
-
- @param {DOMElement} parentElement The parent's DOM element
- @returns {DOMElement} The discovered element
- */
- findElementInParentElement: function(parentElem) {
- var id = "#" + get(this, 'elementId');
- return Ember.$(id)[0] || Ember.$(id, parentElem)[0];
- },
-
- /**
- Creates a new renderBuffer with the passed tagName. You can override this
- method to provide further customization to the buffer if needed. Normally
- you will not need to call or override this method.
-
- @returns {Ember.RenderBuffer}
- */
- renderBuffer: function(tagName) {
- tagName = tagName || get(this, 'tagName');
-
- // Explicitly check for null or undefined, as tagName
- // may be an empty string, which would evaluate to false.
- if (tagName === null || tagName === undefined) {
- tagName = 'div';
- }
-
- return Ember.RenderBuffer(tagName);
- },
-
- /**
- Creates a DOM representation of the view and all of its
- child views by recursively calling the `render()` method.
-
- After the element has been created, `didInsertElement` will
- be called on this view and all of its child views.
-
- @returns {Ember.View} receiver
- */
- createElement: function() {
- if (get(this, 'element')) { return this; }
-
- var buffer = this.renderToBuffer();
- set(this, 'element', buffer.element());
-
- return this;
- },
-
- /**
- Called when a view is going to insert an element into the DOM.
- */
- willInsertElement: Ember.K,
-
- /**
- Called when the element of the view has been inserted into the DOM.
- Override this function to do any set up that requires an element in the
- document body.
- */
- didInsertElement: Ember.K,
-
- /**
- Called when the view is about to rerender, but before anything has
- been torn down. This is a good opportunity to tear down any manual
- observers you have installed based on the DOM state
- */
- willRerender: Ember.K,
-
- /**
- Run this callback on the current view and recursively on child views.
-
- @private
- */
- invokeRecursively: function(fn) {
- fn.call(this, this);
-
- this.forEachChildView(function(view) {
- view.invokeRecursively(fn);
- });
- },
-
- /**
- Invalidates the cache for a property on all child views.
- */
- invalidateRecursively: function(key) {
- this.forEachChildView(function(view) {
- view.propertyDidChange(key);
- });
- },
-
- /**
- @private
-
- Invokes the receiver's willInsertElement() method if it exists and then
- invokes the same on all child views.
-
- NOTE: In some cases this was called when the element existed. This no longer
- works so we let people know. We can remove this warning code later.
- */
- _notifyWillInsertElement: function() {
- this.invokeRecursively(function(view) {
- view.trigger('willInsertElement');
- });
- },
-
- /**
- @private
-
- Invokes the receiver's didInsertElement() method if it exists and then
- invokes the same on all child views.
- */
- _notifyDidInsertElement: function() {
- this.invokeRecursively(function(view) {
- view.trigger('didInsertElement');
- });
- },
-
- /**
- @private
-
- Invokes the receiver's willRerender() method if it exists and then
- invokes the same on all child views.
- */
- _notifyWillRerender: function() {
- this.invokeRecursively(function(view) {
- view.trigger('willRerender');
- });
- },
-
- /**
- Destroys any existing element along with the element for any child views
- as well. If the view does not currently have a element, then this method
- will do nothing.
-
- If you implement willDestroyElement() on your view, then this method will
- be invoked on your view before your element is destroyed to give you a
- chance to clean up any event handlers, etc.
-
- If you write a willDestroyElement() handler, you can assume that your
- didInsertElement() handler was called earlier for the same element.
-
- Normally you will not call or override this method yourself, but you may
- want to implement the above callbacks when it is run.
-
- @returns {Ember.View} receiver
- */
- destroyElement: function() {
- return this.invokeForState('destroyElement');
- },
-
- /**
- Called when the element of the view is going to be destroyed. Override
- this function to do any teardown that requires an element, like removing
- event listeners.
- */
- willDestroyElement: function() {},
-
- /**
- @private
-
- Invokes the `willDestroyElement` callback on the view and child views.
- */
- _notifyWillDestroyElement: function() {
- this.invokeRecursively(function(view) {
- view.trigger('willDestroyElement');
- });
- },
-
- /** @private (nodoc) */
- _elementWillChange: Ember.beforeObserver(function() {
- this.forEachChildView(function(view) {
- Ember.propertyWillChange(view, 'element');
- });
- }, 'element'),
-
- /**
- @private
-
- If this view's element changes, we need to invalidate the caches of our
- child views so that we do not retain references to DOM elements that are
- no longer needed.
-
- @observes element
- */
- _elementDidChange: Ember.observer(function() {
- this.forEachChildView(function(view) {
- Ember.propertyDidChange(view, 'element');
- });
- }, 'element'),
-
- /**
- Called when the parentView property has changed.
-
- @function
- */
- parentViewDidChange: Ember.K,
-
- /**
- @private
-
- Invoked by the view system when this view needs to produce an HTML
- representation. This method will create a new render buffer, if needed,
- then apply any default attributes, such as class names and visibility.
- Finally, the `render()` method is invoked, which is responsible for
- doing the bulk of the rendering.
-
- You should not need to override this method; instead, implement the
- `template` property, or if you need more control, override the `render`
- method.
-
- @param {Ember.RenderBuffer} buffer the render buffer. If no buffer is
- passed, a default buffer, using the current view's `tagName`, will
- be used.
- */
- renderToBuffer: function(parentBuffer, bufferOperation) {
- var buffer;
-
- Ember.run.sync();
-
- // Determine where in the parent buffer to start the new buffer.
- // By default, a new buffer will be appended to the parent buffer.
- // The buffer operation may be changed if the child views array is
- // mutated by Ember.ContainerView.
- bufferOperation = bufferOperation || 'begin';
-
- // If this is the top-most view, start a new buffer. Otherwise,
- // create a new buffer relative to the original using the
- // provided buffer operation (for example, `insertAfter` will
- // insert a new buffer after the "parent buffer").
- if (parentBuffer) {
- var tagName = get(this, 'tagName');
- if (tagName === null || tagName === undefined) {
- tagName = 'div';
- }
-
- buffer = parentBuffer[bufferOperation](tagName);
- } else {
- buffer = this.renderBuffer();
- }
-
- this.buffer = buffer;
- this.transitionTo('inBuffer', false);
-
- this.lengthBeforeRender = this._childViews.length;
-
- this.beforeRender(buffer);
- this.render(buffer);
- this.afterRender(buffer);
-
- this.lengthAfterRender = this._childViews.length;
-
- return buffer;
- },
-
- beforeRender: function(buffer) {
- this.applyAttributesToBuffer(buffer);
- },
-
- afterRender: Ember.K,
-
- /**
- @private
- */
- applyAttributesToBuffer: function(buffer) {
- // Creates observers for all registered class name and attribute bindings,
- // then adds them to the element.
- this._applyClassNameBindings();
-
- // Pass the render buffer so the method can apply attributes directly.
- // This isn't needed for class name bindings because they use the
- // existing classNames infrastructure.
- this._applyAttributeBindings(buffer);
-
-
- a_forEach(get(this, 'classNames'), function(name){ buffer.addClass(name); });
- buffer.id(get(this, 'elementId'));
-
- var role = get(this, 'ariaRole');
- if (role) {
- buffer.attr('role', role);
- }
-
- if (get(this, 'isVisible') === false) {
- buffer.style('display', 'none');
- }
- },
-
- // ..........................................................
- // STANDARD RENDER PROPERTIES
- //
-
- /**
- Tag name for the view's outer element. The tag name is only used when
- an element is first created. If you change the tagName for an element, you
- must destroy and recreate the view element.
-
- By default, the render buffer will use a `<div>` tag for views.
-
- @type String
- @default null
- */
-
- // We leave this null by default so we can tell the difference between
- // the default case and a user-specified tag.
- tagName: null,
-
- /**
- The WAI-ARIA role of the control represented by this view. For example, a
- button may have a role of type 'button', or a pane may have a role of
- type 'alertdialog'. This property is used by assistive software to help
- visually challenged users navigate rich web applications.
-
- The full list of valid WAI-ARIA roles is available at:
- http://www.w3.org/TR/wai-aria/roles#roles_categorization
-
- @type String
- @default null
- */
- ariaRole: null,
-
- /**
- Standard CSS class names to apply to the view's outer element. This
- property automatically inherits any class names defined by the view's
- superclasses as well.
-
- @type Array
- @default ['ember-view']
- */
- classNames: ['ember-view'],
-
- /**
- A list of properties of the view to apply as class names. If the property
- is a string value, the value of that string will be applied as a class
- name.
-
- // Applies the 'high' class to the view element
- Ember.View.create({
- classNameBindings: ['priority']
- priority: 'high'
- });
-
- If the value of the property is a Boolean, the name of that property is
- added as a dasherized class name.
-
- // Applies the 'is-urgent' class to the view element
- Ember.View.create({
- classNameBindings: ['isUrgent']
- isUrgent: true
- });
-
- If you would prefer to use a custom value instead of the dasherized
- property name, you can pass a binding like this:
-
- // Applies the 'urgent' class to the view element
- Ember.View.create({
- classNameBindings: ['isUrgent:urgent']
- isUrgent: true
- });
-
- This list of properties is inherited from the view's superclasses as well.
-
- @type Array
- @default []
- */
- classNameBindings: [],
-
- /**
- A list of properties of the view to apply as attributes. If the property is
- a string value, the value of that string will be applied as the attribute.
-
- // Applies the type attribute to the element
- // with the value "button", like <div type="button">
- Ember.View.create({
- attributeBindings: ['type'],
- type: 'button'
- });
-
- If the value of the property is a Boolean, the name of that property is
- added as an attribute.
-
- // Renders something like <div enabled="enabled">
- Ember.View.create({
- attributeBindings: ['enabled'],
- enabled: true
- });
- */
- attributeBindings: [],
-
- state: 'preRender',
-
- // .......................................................
- // CORE DISPLAY METHODS
- //
-
- /**
- @private
-
- Setup a view, but do not finish waking it up.
- - configure childViews
- - register the view with the global views hash, which is used for event
- dispatch
- */
- init: function() {
- this._super();
-
- // Register the view for event handling. This hash is used by
- // Ember.EventDispatcher to dispatch incoming events.
- if (!this.isVirtual) Ember.View.views[get(this, 'elementId')] = this;
-
- // setup child views. be sure to clone the child views array first
- this._childViews = this._childViews.slice();
-
- Ember.assert("Only arrays are allowed for 'classNameBindings'", Ember.typeOf(this.classNameBindings) === 'array');
- this.classNameBindings = Ember.A(this.classNameBindings.slice());
-
- Ember.assert("Only arrays are allowed for 'classNames'", Ember.typeOf(this.classNames) === 'array');
- this.classNames = Ember.A(this.classNames.slice());
-
- var viewController = get(this, 'viewController');
- if (viewController) {
- viewController = get(viewController);
- if (viewController) {
- set(viewController, 'view', this);
- }
- }
- },
-
- appendChild: function(view, options) {
- return this.invokeForState('appendChild', view, options);
- },
-
- /**
- Removes the child view from the parent view.
-
- @param {Ember.View} view
- @returns {Ember.View} receiver
- */
- removeChild: function(view) {
- // If we're destroying, the entire subtree will be
- // freed, and the DOM will be handled separately,
- // so no need to mess with childViews.
- if (this.isDestroying) { return; }
-
- // update parent node
- set(view, '_parentView', null);
-
- // remove view from childViews array.
- var childViews = this._childViews;
-
- Ember.EnumerableUtils.removeObject(childViews, view);
-
- this.propertyDidChange('childViews'); // HUH?! what happened to will change?
-
- return this;
- },
-
- /**
- Removes all children from the parentView.
-
- @returns {Ember.View} receiver
- */
- removeAllChildren: function() {
- return this.mutateChildViews(function(view) {
- this.removeChild(view);
- });
- },
-
- destroyAllChildren: function() {
- return this.mutateChildViews(function(view) {
- view.destroy();
- });
- },
-
- /**
- Removes the view from its parentView, if one is found. Otherwise
- does nothing.
-
- @returns {Ember.View} receiver
- */
- removeFromParent: function() {
- var parent = get(this, '_parentView');
-
- // Remove DOM element from parent
- this.remove();
-
- if (parent) { parent.removeChild(this); }
- return this;
- },
-
- /**
- You must call `destroy` on a view to destroy the view (and all of its
- child views). This will remove the view from any parent node, then make
- sure that the DOM element managed by the view can be released by the
- memory manager.
- */
- willDestroy: function() {
- // calling this._super() will nuke computed properties and observers,
- // so collect any information we need before calling super.
- var childViews = this._childViews,
- parent = get(this, '_parentView'),
- childLen;
-
- // destroy the element -- this will avoid each child view destroying
- // the element over and over again...
- if (!this.removedFromDOM) { this.destroyElement(); }
-
- // remove from non-virtual parent view if viewName was specified
- if (this.viewName) {
- var nonVirtualParentView = get(this, 'parentView');
- if (nonVirtualParentView) {
- set(nonVirtualParentView, this.viewName, null);
- }
- }
-
- // remove from parent if found. Don't call removeFromParent,
- // as removeFromParent will try to remove the element from
- // the DOM again.
- if (parent) { parent.removeChild(this); }
-
- this.state = 'destroyed';
-
- childLen = childViews.length;
- for (var i=childLen-1; i>=0; i--) {
- childViews[i].removedFromDOM = true;
- childViews[i].destroy();
- }
-
- // next remove view from global hash
- if (!this.isVirtual) delete Ember.View.views[get(this, 'elementId')];
- },
-
- /**
- Instantiates a view to be added to the childViews array during view
- initialization. You generally will not call this method directly unless
- you are overriding createChildViews(). Note that this method will
- automatically configure the correct settings on the new view instance to
- act as a child of the parent.
-
- @param {Class} viewClass
- @param {Hash} [attrs] Attributes to add
- @returns {Ember.View} new instance
- @test in createChildViews
- */
- createChildView: function(view, attrs) {
- if (Ember.View.detect(view)) {
- attrs = attrs || {};
- attrs._parentView = this;
- attrs.templateData = attrs.templateData || get(this, 'templateData');
-
- view = view.create(attrs);
-
- // don't set the property on a virtual view, as they are invisible to
- // consumers of the view API
- if (view.viewName) { set(get(this, 'concreteView'), view.viewName, view); }
- } else {
- Ember.assert('You must pass instance or subclass of View', view instanceof Ember.View);
- Ember.assert("You can only pass attributes when a class is provided", !attrs);
-
- if (!get(view, 'templateData')) {
- set(view, 'templateData', get(this, 'templateData'));
- }
-
- set(view, '_parentView', this);
- }
-
- return view;
- },
-
- becameVisible: Ember.K,
- becameHidden: Ember.K,
-
- /**
- @private
-
- When the view's `isVisible` property changes, toggle the visibility
- element of the actual DOM element.
- */
- _isVisibleDidChange: Ember.observer(function() {
- var $el = this.$();
- if (!$el) { return; }
-
- var isVisible = get(this, 'isVisible');
-
- $el.toggle(isVisible);
-
- if (this._isAncestorHidden()) { return; }
-
- if (isVisible) {
- this._notifyBecameVisible();
- } else {
- this._notifyBecameHidden();
- }
- }, 'isVisible'),
-
- _notifyBecameVisible: function() {
- this.trigger('becameVisible');
-
- this.forEachChildView(function(view) {
- var isVisible = get(view, 'isVisible');
-
- if (isVisible || isVisible === null) {
- view._notifyBecameVisible();
- }
- });
- },
-
- _notifyBecameHidden: function() {
- this.trigger('becameHidden');
- this.forEachChildView(function(view) {
- var isVisible = get(view, 'isVisible');
-
- if (isVisible || isVisible === null) {
- view._notifyBecameHidden();
- }
- });
- },
-
- _isAncestorHidden: function() {
- var parent = get(this, 'parentView');
-
- while (parent) {
- if (get(parent, 'isVisible') === false) { return true; }
-
- parent = get(parent, 'parentView');
- }
-
- return false;
- },
-
- clearBuffer: function() {
- this.invokeRecursively(function(view) {
- this.buffer = null;
- });
- },
-
- transitionTo: function(state, children) {
- this.state = state;
-
- if (children !== false) {
- this.forEachChildView(function(view) {
- view.transitionTo(state);
- });
- }
- },
-
- /**
- @private
-
- Override the default event firing from Ember.Evented to
- also call methods with the given name.
- */
- trigger: function(name) {
- this._super.apply(this, arguments);
- var method = this[name];
- if (method) {
- var args = [], i, l;
- for (i = 1, l = arguments.length; i < l; i++) {
- args.push(arguments[i]);
- }
- return method.apply(this, args);
- }
- },
-
- has: function(name) {
- return Ember.typeOf(this[name]) === 'function' || this._super(name);
- },
-
- // .......................................................
- // EVENT HANDLING
- //
-
- /**
- @private
-
- Handle events from `Ember.EventDispatcher`
- */
- handleEvent: function(eventName, evt) {
- return this.invokeForState('handleEvent', eventName, evt);
- }
-
-});
-
-/**
- Describe how the specified actions should behave in the various
- states that a view can exist in. Possible states:
-
- * preRender: when a view is first instantiated, and after its
- element was destroyed, it is in the preRender state
- * inBuffer: once a view has been rendered, but before it has
- been inserted into the DOM, it is in the inBuffer state
- * inDOM: once a view has been inserted into the DOM it is in
- the inDOM state. A view spends the vast majority of its
- existence in this state.
- * destroyed: once a view has been destroyed (using the destroy
- method), it is in this state. No further actions can be invoked
- on a destroyed view.
-*/
-
- // in the destroyed state, everything is illegal
-
- // before rendering has begun, all legal manipulations are noops.
-
- // inside the buffer, legal manipulations are done on the buffer
-
- // once the view has been inserted into the DOM, legal manipulations
- // are done on the DOM element.
-
-/** @private */
-var DOMManager = {
- prepend: function(view, childView) {
- childView._insertElementLater(function() {
- var element = view.$();
- element.prepend(childView.$());
- });
- },
-
- after: function(view, nextView) {
- nextView._insertElementLater(function() {
- var element = view.$();
- element.after(nextView.$());
- });
- },
-
- replace: function(view) {
- var element = get(view, 'element');
-
- set(view, 'element', null);
-
- view._insertElementLater(function() {
- Ember.$(element).replaceWith(get(view, 'element'));
- });
- },
-
- remove: function(view) {
- var elem = get(view, 'element');
-
- set(view, 'element', null);
- view._lastInsert = null;
-
- Ember.$(elem).remove();
- },
-
- empty: function(view) {
- view.$().empty();
- }
-};
-
-Ember.View.reopen({
- states: Ember.View.states,
- domManager: DOMManager
-});
-
-Ember.View.reopenClass({
-
- /**
- @private
-
- Parse a path and return an object which holds the parsed properties.
-
- For example a path like "content.isEnabled:enabled:disabled" wil return the
- following object:
-
- {
- path: "content.isEnabled",
- className: "enabled",
- falsyClassName: "disabled",
- classNames: ":enabled:disabled"
- }
-
- */
- _parsePropertyPath: function(path) {
- var split = path.split(/:/),
- propertyPath = split[0],
- classNames = "",
- className,
- falsyClassName;
-
- // check if the property is defined as prop:class or prop:trueClass:falseClass
- if (split.length > 1) {
- className = split[1];
- if (split.length === 3) { falsyClassName = split[2]; }
-
- classNames = ':' + className;
- if (falsyClassName) { classNames += ":" + falsyClassName; }
- }
-
- return {
- path: propertyPath,
- classNames: classNames,
- className: (className === '') ? undefined : className,
- falsyClassName: falsyClassName
- };
- },
-
- /**
- @private
-
- Get the class name for a given value, based on the path, optional className
- and optional falsyClassName.
-
- - if the value is truthy and a className is defined, the className is returned
- - if the value is true, the dasherized last part of the supplied path is returned
- - if the value is false and a falsyClassName is supplied, the falsyClassName is returned
- - if the value is truthy, the value is returned
- - if none of the above rules apply, null is returned
-
- */
- _classStringForValue: function(path, val, className, falsyClassName) {
- // If the value is truthy and we're using the colon syntax,
- // we should return the className directly
- if (!!val && className) {
- return className;
-
- // If value is a Boolean and true, return the dasherized property
- // name.
- } else if (val === true) {
- // catch syntax like isEnabled::not-enabled
- if (val === true && !className && falsyClassName) { return null; }
-
- // Normalize property path to be suitable for use
- // as a class name. For exaple, content.foo.barBaz
- // becomes bar-baz.
- var parts = path.split('.');
- return Ember.String.dasherize(parts[parts.length-1]);
-
- // If the value is false and a falsyClassName is specified, return it
- } else if (val === false && falsyClassName) {
- return falsyClassName;
-
- // If the value is not false, undefined, or null, return the current
- // value of the property.
- } else if (val !== false && val !== undefined && val !== null) {
- return val;
-
- // Nothing to display. Return null so that the old class is removed
- // but no new class is added.
- } else {
- return null;
- }
- }
-});
-
-// Create a global view hash.
-Ember.View.views = {};
-
-// If someone overrides the child views computed property when
-// defining their class, we want to be able to process the user's
-// supplied childViews and then restore the original computed property
-// at view initialization time. This happens in Ember.ContainerView's init
-// method.
-Ember.View.childViewsProperty = childViewsProperty;
-
-Ember.View.applyAttributeBindings = function(elem, name, value) {
- var type = Ember.typeOf(value);
- var currentValue = elem.attr(name);
-
- // if this changes, also change the logic in ember-handlebars/lib/helpers/binding.js
- if ((type === 'string' || (type === 'number' && !isNaN(value))) && value !== currentValue) {
- elem.attr(name, value);
- } else if (value && type === 'boolean') {
- elem.attr(name, name);
- } else if (!value) {
- elem.removeAttr(name);
- }
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-Ember.View.states = {
- _default: {
- // appendChild is only legal while rendering the buffer.
- appendChild: function() {
- throw "You can't use appendChild outside of the rendering process";
- },
-
- $: function() {
- return undefined;
- },
-
- getElement: function() {
- return null;
- },
-
- // Handle events from `Ember.EventDispatcher`
- handleEvent: function() {
- return true; // continue event propagation
- },
-
- destroyElement: function(view) {
- set(view, 'element', null);
- view._lastInsert = null;
- return view;
- }
- }
-};
-
-Ember.View.reopen({
- states: Ember.View.states
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-Ember.View.states.preRender = {
- parentState: Ember.View.states._default,
-
- // a view leaves the preRender state once its element has been
- // created (createElement).
- insertElement: function(view, fn) {
- if (view._lastInsert !== Ember.guidFor(fn)){
- return;
- }
- view.createElement();
- view._notifyWillInsertElement();
- // after createElement, the view will be in the hasElement state.
- fn.call(view);
- view.transitionTo('inDOM');
- view._notifyDidInsertElement();
- },
-
- empty: Ember.K,
-
- setElement: function(view, value) {
- if (value !== null) {
- view.transitionTo('hasElement');
- }
- return value;
- }
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, meta = Ember.meta;
-
-Ember.View.states.inBuffer = {
- parentState: Ember.View.states._default,
-
- $: function(view, sel) {
- // if we don't have an element yet, someone calling this.$() is
- // trying to update an element that isn't in the DOM. Instead,
- // rerender the view to allow the render method to reflect the
- // changes.
- view.rerender();
- return Ember.$();
- },
-
- // when a view is rendered in a buffer, rerendering it simply
- // replaces the existing buffer with a new one
- rerender: function(view) {
- Ember.deprecate("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM. Because this is avoidable and the cause of significant performance issues in applications, this behavior is deprecated. If you want to use the debugger to find out what caused this, you can set ENV.RAISE_ON_DEPRECATION to true.");
-
- view._notifyWillRerender();
-
- view.clearRenderedChildren();
- view.renderToBuffer(view.buffer, 'replaceWith');
- },
-
- // when a view is rendered in a buffer, appending a child
- // view will render that view and append the resulting
- // buffer into its buffer.
- appendChild: function(view, childView, options) {
- var buffer = view.buffer;
-
- childView = this.createChildView(childView, options);
- view._childViews.push(childView);
-
- childView.renderToBuffer(buffer);
-
- view.propertyDidChange('childViews');
-
- return childView;
- },
-
- // when a view is rendered in a buffer, destroying the
- // element will simply destroy the buffer and put the
- // state back into the preRender state.
- destroyElement: function(view) {
- view.clearBuffer();
- view._notifyWillDestroyElement();
- view.transitionTo('preRender');
-
- return view;
- },
-
- empty: function() {
- Ember.assert("Emptying a view in the inBuffer state is not allowed and should not happen under normal circumstances. Most likely there is a bug in your application. This may be due to excessive property change notifications.");
- },
-
- // It should be impossible for a rendered view to be scheduled for
- // insertion.
- insertElement: function() {
- throw "You can't insert an element that has already been rendered";
- },
-
- setElement: function(view, value) {
- if (value === null) {
- view.transitionTo('preRender');
- } else {
- view.clearBuffer();
- view.transitionTo('hasElement');
- }
-
- return value;
- }
-};
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, meta = Ember.meta;
-
-Ember.View.states.hasElement = {
- parentState: Ember.View.states._default,
-
- $: function(view, sel) {
- var elem = get(view, 'element');
- return sel ? Ember.$(sel, elem) : Ember.$(elem);
- },
-
- getElement: function(view) {
- var parent = get(view, 'parentView');
- if (parent) { parent = get(parent, 'element'); }
- if (parent) { return view.findElementInParentElement(parent); }
- return Ember.$("#" + get(view, 'elementId'))[0];
- },
-
- setElement: function(view, value) {
- if (value === null) {
- view.transitionTo('preRender');
- } else {
- throw "You cannot set an element to a non-null value when the element is already in the DOM.";
- }
-
- return value;
- },
-
- // once the view has been inserted into the DOM, rerendering is
- // deferred to allow bindings to synchronize.
- rerender: function(view) {
- view._notifyWillRerender();
-
- view.clearRenderedChildren();
-
- view.domManager.replace(view);
- return view;
- },
-
- // once the view is already in the DOM, destroying it removes it
- // from the DOM, nukes its element, and puts it back into the
- // preRender state if inDOM.
-
- destroyElement: function(view) {
- view._notifyWillDestroyElement();
- view.domManager.remove(view);
- return view;
- },
-
- empty: function(view) {
- var _childViews = view._childViews, len, idx;
- if (_childViews) {
- len = _childViews.length;
- for (idx = 0; idx < len; idx++) {
- _childViews[idx]._notifyWillDestroyElement();
- }
- }
- view.domManager.empty(view);
- },
-
- // Handle events from `Ember.EventDispatcher`
- handleEvent: function(view, eventName, evt) {
- if (view.has(eventName)) {
- // Handler should be able to re-dispatch events, so we don't
- // preventDefault or stopPropagation.
- return view.trigger(eventName, evt);
- } else {
- return true; // continue event propagation
- }
- }
-};
-
-Ember.View.states.inDOM = {
- parentState: Ember.View.states.hasElement,
-
- insertElement: function(view, fn) {
- if (view._lastInsert !== Ember.guidFor(fn)){
- return;
- }
- throw "You can't insert an element into the DOM that has already been inserted";
- }
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var destroyedError = "You can't call %@ on a destroyed view", fmt = Ember.String.fmt;
-
-Ember.View.states.destroyed = {
- parentState: Ember.View.states._default,
-
- appendChild: function() {
- throw fmt(destroyedError, ['appendChild']);
- },
- rerender: function() {
- throw fmt(destroyedError, ['rerender']);
- },
- destroyElement: function() {
- throw fmt(destroyedError, ['destroyElement']);
- },
- empty: function() {
- throw fmt(destroyedError, ['empty']);
- },
-
- setElement: function() {
- throw fmt(destroyedError, ["set('element', ...)"]);
- },
-
- // Since element insertion is scheduled, don't do anything if
- // the view has been destroyed between scheduling and execution
- insertElement: Ember.K
-};
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, meta = Ember.meta;
-var forEach = Ember.EnumerableUtils.forEach;
-
-var childViewsProperty = Ember.computed(function() {
- return get(this, '_childViews');
-}).property('_childViews').cacheable();
-
-/**
- @class
-
- A `ContainerView` is an `Ember.View` subclass that allows for manual or programatic
- management of a view's `childViews` array that will correctly update the `ContainerView`
- instance's rendered DOM representation.
-
- ## Setting Initial Child Views
- The initial array of child views can be set in one of two ways. You can provide
- a `childViews` property at creation time that contains instance of `Ember.View`:
-
-
- aContainer = Ember.ContainerView.create({
- childViews: [Ember.View.create(), Ember.View.create()]
- })
-
- You can also provide a list of property names whose values are instances of `Ember.View`:
-
- aContainer = Ember.ContainerView.create({
- childViews: ['aView', 'bView', 'cView'],
- aView: Ember.View.create(),
- bView: Ember.View.create()
- cView: Ember.View.create()
- })
-
- The two strategies can be combined:
-
- aContainer = Ember.ContainerView.create({
- childViews: ['aView', Ember.View.create()],
- aView: Ember.View.create()
- })
-
- Each child view's rendering will be inserted into the container's rendered HTML in the same
- order as its position in the `childViews` property.
-
- ## Adding and Removing Child Views
- The views in a container's `childViews` array should be added and removed by manipulating
- the `childViews` property directly.
-
- To remove a view pass that view into a `removeObject` call on the container's `childViews` property.
-
- Given an empty `<body>` the following code
-
- aContainer = Ember.ContainerView.create({
- classNames: ['the-container'],
- childViews: ['aView', 'bView'],
- aView: Ember.View.create({
- template: Ember.Handlebars.compile("A")
- }),
- bView: Ember.View.create({
- template: Ember.Handlebars.compile("B")
- })
- })
-
- aContainer.appendTo('body')
-
- Results in the HTML
-
- <div class="ember-view the-container">
- <div class="ember-view">A</div>
- <div class="ember-view">B</div>
- </div>
-
- Removing a view
-
- aContainer.get('childViews') // [aContainer.aView, aContainer.bView]
- aContainer.get('childViews').removeObject(aContainer.get('bView'))
- aContainer.get('childViews') // [aContainer.aView]
-
- Will result in the following HTML
-
- <div class="ember-view the-container">
- <div class="ember-view">A</div>
- </div>
-
-
- Similarly, adding a child view is accomplished by adding `Ember.View` instances to the
- container's `childViews` property.
-
- Given an empty `<body>` the following code
-
- aContainer = Ember.ContainerView.create({
- classNames: ['the-container'],
- childViews: ['aView', 'bView'],
- aView: Ember.View.create({
- template: Ember.Handlebars.compile("A")
- }),
- bView: Ember.View.create({
- template: Ember.Handlebars.compile("B")
- })
- })
-
- aContainer.appendTo('body')
-
- Results in the HTML
-
- <div class="ember-view the-container">
- <div class="ember-view">A</div>
- <div class="ember-view">B</div>
- </div>
-
- Adding a view
-
- AnotherViewClass = Ember.View.extend({
- template: Ember.Handlebars.compile("Another view")
- })
-
- aContainer.get('childViews') // [aContainer.aView, aContainer.bView]
- aContainer.get('childViews').pushObject(AnotherViewClass.create())
- aContainer.get('childViews') // [aContainer.aView, aContainer.bView, <AnotherViewClass instance>]
-
- Will result in the following HTML
-
- <div class="ember-view the-container">
- <div class="ember-view">A</div>
- <div class="ember-view">B</div>
- <div class="ember-view">Another view</div>
- </div>
-
-
- Direct manipulation of childViews presence or absence in the DOM via calls to
- `remove` or `removeFromParent` or calls to a container's `removeChild` may not behave
- correctly.
-
- Calling `remove()` on a child view will remove the view's HTML, but it will remain as part of its
- container's `childView`s property.
-
- Calling `removeChild()` on the container will remove the passed view instance from the container's
- `childView`s but keep its HTML within the container's rendered view.
-
- Calling `removeFromParent()` behaves as expected but should be avoided in favor of direct
- manipulation of a container's `childViews` property.
-
- aContainer = Ember.ContainerView.create({
- classNames: ['the-container'],
- childViews: ['aView', 'bView'],
- aView: Ember.View.create({
- template: Ember.Handlebars.compile("A")
- }),
- bView: Ember.View.create({
- template: Ember.Handlebars.compile("B")
- })
- })
-
- aContainer.appendTo('body')
-
- Results in the HTML
-
- <div class="ember-view the-container">
- <div class="ember-view">A</div>
- <div class="ember-view">B</div>
- </div>
-
- Calling `aContainer.get('aView').removeFromParent()` will result in the following HTML
-
- <div class="ember-view the-container">
- <div class="ember-view">B</div>
- </div>
-
- And the `Ember.View` instance stored in `aContainer.aView` will be removed from `aContainer`'s
- `childViews` array.
-
- ## Templates and Layout
- A `template`, `templateName`, `defaultTemplate`, `layout`, `layoutName` or `defaultLayout`
- property on a container view will not result in the template or layout being rendered.
- The HTML contents of a `Ember.ContainerView`'s DOM representation will only be the rendered HTML
- of its child views.
-
- ## Binding a View to Display
-
- If you would like to display a single view in your ContainerView, you can set its `currentView`
- property. When the `currentView` property is set to a view instance, it will be added to the
- ContainerView's `childViews` array. If the `currentView` property is later changed to a
- different view, the new view will replace the old view. If `currentView` is set to `null`, the
- last `currentView` will be removed.
-
- This functionality is useful for cases where you want to bind the display of a ContainerView to
- a controller or state manager. For example, you can bind the `currentView` of a container to
- a controller like this:
-
- // Controller
- App.appController = Ember.Object.create({
- view: Ember.View.create({
- templateName: 'person_template'
- })
- });
-
- // Handlebars template
- {{view Ember.ContainerView currentViewBinding="App.appController.view"}}
-
- @extends Ember.View
-*/
-
-Ember.ContainerView = Ember.View.extend({
-
- init: function() {
- this._super();
-
- var childViews = get(this, 'childViews');
- Ember.defineProperty(this, 'childViews', childViewsProperty);
-
- var _childViews = this._childViews;
-
- forEach(childViews, function(viewName, idx) {
- var view;
-
- if ('string' === typeof viewName) {
- view = get(this, viewName);
- view = this.createChildView(view);
- set(this, viewName, view);
- } else {
- view = this.createChildView(viewName);
- }
-
- _childViews[idx] = view;
- }, this);
-
- var currentView = get(this, 'currentView');
- if (currentView) _childViews.push(this.createChildView(currentView));
-
- // Make the _childViews array observable
- Ember.A(_childViews);
-
- // Sets up an array observer on the child views array. This
- // observer will detect when child views are added or removed
- // and update the DOM to reflect the mutation.
- get(this, 'childViews').addArrayObserver(this, {
- willChange: 'childViewsWillChange',
- didChange: 'childViewsDidChange'
- });
- },
-
- /**
- Instructs each child view to render to the passed render buffer.
-
- @param {Ember.RenderBuffer} buffer the buffer to render to
- @private
- */
- render: function(buffer) {
- this.forEachChildView(function(view) {
- view.renderToBuffer(buffer);
- });
- },
-
- /**
- When the container view is destroyed, tear down the child views
- array observer.
-
- @private
- */
- willDestroy: function() {
- get(this, 'childViews').removeArrayObserver(this, {
- willChange: 'childViewsWillChange',
- didChange: 'childViewsDidChange'
- });
-
- this._super();
- },
-
- /**
- When a child view is removed, destroy its element so that
- it is removed from the DOM.
-
- The array observer that triggers this action is set up in the
- `renderToBuffer` method.
-
- @private
- @param {Ember.Array} views the child views array before mutation
- @param {Number} start the start position of the mutation
- @param {Number} removed the number of child views removed
- **/
- childViewsWillChange: function(views, start, removed) {
- if (removed === 0) { return; }
-
- var changedViews = views.slice(start, start+removed);
- this.initializeViews(changedViews, null, null);
-
- this.invokeForState('childViewsWillChange', views, start, removed);
- },
-
- /**
- When a child view is added, make sure the DOM gets updated appropriately.
-
- If the view has already rendered an element, we tell the child view to
- create an element and insert it into the DOM. If the enclosing container view
- has already written to a buffer, but not yet converted that buffer into an
- element, we insert the string representation of the child into the appropriate
- place in the buffer.
-
- @private
- @param {Ember.Array} views the array of child views afte the mutation has occurred
- @param {Number} start the start position of the mutation
- @param {Number} removed the number of child views removed
- @param {Number} the number of child views added
- */
- childViewsDidChange: function(views, start, removed, added) {
- var len = get(views, 'length');
-
- // No new child views were added; bail out.
- if (added === 0) return;
-
- var changedViews = views.slice(start, start+added);
- this.initializeViews(changedViews, this, get(this, 'templateData'));
-
- // Let the current state handle the changes
- this.invokeForState('childViewsDidChange', views, start, added);
- },
-
- initializeViews: function(views, parentView, templateData) {
- forEach(views, function(view) {
- set(view, '_parentView', parentView);
-
- if (!get(view, 'templateData')) {
- set(view, 'templateData', templateData);
- }
- });
- },
-
- /**
- Schedules a child view to be inserted into the DOM after bindings have
- finished syncing for this run loop.
-
- @param {Ember.View} view the child view to insert
- @param {Ember.View} prev the child view after which the specified view should
- be inserted
- @private
- */
- _scheduleInsertion: function(view, prev) {
- if (prev) {
- prev.domManager.after(prev, view);
- } else {
- this.domManager.prepend(this, view);
- }
- },
-
- currentView: null,
-
- _currentViewWillChange: Ember.beforeObserver(function() {
- var childViews = get(this, 'childViews'),
- currentView = get(this, 'currentView');
-
- if (currentView) {
- childViews.removeObject(currentView);
- currentView.destroy();
- }
- }, 'currentView'),
-
- _currentViewDidChange: Ember.observer(function() {
- var childViews = get(this, 'childViews'),
- currentView = get(this, 'currentView');
-
- if (currentView) {
- childViews.pushObject(currentView);
- }
- }, 'currentView')
-});
-
-// Ember.ContainerView extends the default view states to provide different
-// behavior for childViewsWillChange and childViewsDidChange.
-Ember.ContainerView.states = {
- parent: Ember.View.states,
-
- inBuffer: {
- childViewsDidChange: function(parentView, views, start, added) {
- var buffer = parentView.buffer,
- startWith, prev, prevBuffer, view;
-
- // Determine where to begin inserting the child view(s) in the
- // render buffer.
- if (start === 0) {
- // If views were inserted at the beginning, prepend the first
- // view to the render buffer, then begin inserting any
- // additional views at the beginning.
- view = views[start];
- startWith = start + 1;
- view.renderToBuffer(buffer, 'prepend');
- } else {
- // Otherwise, just insert them at the same place as the child
- // views mutation.
- view = views[start - 1];
- startWith = start;
- }
-
- for (var i=startWith; i<start+added; i++) {
- prev = view;
- view = views[i];
- prevBuffer = prev.buffer;
- view.renderToBuffer(prevBuffer, 'insertAfter');
- }
- }
- },
-
- hasElement: {
- childViewsWillChange: function(view, views, start, removed) {
- for (var i=start; i<start+removed; i++) {
- views[i].remove();
- }
- },
-
- childViewsDidChange: function(view, views, start, added) {
- // If the DOM element for this container view already exists,
- // schedule each child view to insert its DOM representation after
- // bindings have finished syncing.
- var prev = start === 0 ? null : views[start-1];
-
- for (var i=start; i<start+added; i++) {
- view = views[i];
- this._scheduleInsertion(view, prev);
- prev = view;
- }
- }
- }
-};
-
-Ember.ContainerView.states.inDOM = {
- parentState: Ember.ContainerView.states.hasElement
-};
-
-Ember.ContainerView.reopen({
- states: Ember.ContainerView.states
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
-
-/**
- @class
-
- `Ember.CollectionView` is an `Ember.View` descendent responsible for managing a
- collection (an array or array-like object) by maintaing a child view object and
- associated DOM representation for each item in the array and ensuring that child
- views and their associated rendered HTML are updated when items in the array
- are added, removed, or replaced.
-
- ## Setting content
- The managed collection of objects is referenced as the `Ember.CollectionView` instance's
- `content` property.
-
- someItemsView = Ember.CollectionView.create({
- content: ['A', 'B','C']
- })
-
- The view for each item in the collection will have its `content` property set
- to the item.
-
- ## Specifying itemViewClass
- By default the view class for each item in the managed collection will be an instance
- of `Ember.View`. You can supply a different class by setting the `CollectionView`'s
- `itemViewClass` property.
-
- Given an empty `<body>` and the following code:
-
-
- someItemsView = Ember.CollectionView.create({
- classNames: ['a-collection'],
- content: ['A','B','C'],
- itemViewClass: Ember.View.extend({
- template: Ember.Handlebars.compile("the letter: {{view.content}}")
- })
- })
-
- someItemsView.appendTo('body')
-
- Will result in the following HTML structure
-
- <div class="ember-view a-collection">
- <div class="ember-view">the letter: A</div>
- <div class="ember-view">the letter: B</div>
- <div class="ember-view">the letter: C</div>
- </div>
-
- ## Automatic matching of parent/child tagNames
-
- Setting the `tagName` property of a `CollectionView` to any of
- "ul", "ol", "table", "thead", "tbody", "tfoot", "tr", or "select" will result
- in the item views receiving an appropriately matched `tagName` property.
-
-
- Given an empty `<body>` and the following code:
-
- anUndorderedListView = Ember.CollectionView.create({
- tagName: 'ul',
- content: ['A','B','C'],
- itemViewClass: Ember.View.extend({
- template: Ember.Handlebars.compile("the letter: {{view.content}}")
- })
- })
-
- anUndorderedListView.appendTo('body')
-
- Will result in the following HTML structure
-
- <ul class="ember-view a-collection">
- <li class="ember-view">the letter: A</li>
- <li class="ember-view">the letter: B</li>
- <li class="ember-view">the letter: C</li>
- </ul>
-
- Additional tagName pairs can be provided by adding to `Ember.CollectionView.CONTAINER_MAP `
-
- Ember.CollectionView.CONTAINER_MAP['article'] = 'section'
-
-
- ## Empty View
- You can provide an `Ember.View` subclass to the `Ember.CollectionView` instance as its
- `emptyView` property. If the `content` property of a `CollectionView` is set to `null`
- or an empty array, an instance of this view will be the `CollectionView`s only child.
-
- aListWithNothing = Ember.CollectionView.create({
- classNames: ['nothing']
- content: null,
- emptyView: Ember.View.extend({
- template: Ember.Handlebars.compile("The collection is empty")
- })
- })
-
- aListWithNothing.appendTo('body')
-
- Will result in the following HTML structure
-
- <div class="ember-view nothing">
- <div class="ember-view">
- The collection is empty
- </div>
- </div>
-
- ## Adding and Removing items
- The `childViews` property of a `CollectionView` should not be directly manipulated. Instead,
- add, remove, replace items from its `content` property. This will trigger
- appropriate changes to its rendered HTML.
-
- ## Use in templates via the `{{collection}}` Ember.Handlebars helper
- Ember.Handlebars provides a helper specifically for adding `CollectionView`s to templates.
- See `Ember.Handlebars.collection` for more details
-
- @since Ember 0.9
- @extends Ember.ContainerView
-*/
-Ember.CollectionView = Ember.ContainerView.extend(
-/** @scope Ember.CollectionView.prototype */ {
-
- /**
- A list of items to be displayed by the Ember.CollectionView.
-
- @type Ember.Array
- @default null
- */
- content: null,
-
- /**
- @private
-
- This provides metadata about what kind of empty view class this
- collection would like if it is being instantiated from another
- system (like Handlebars)
- */
- emptyViewClass: Ember.View,
-
- /**
- An optional view to display if content is set to an empty array.
-
- @type Ember.View
- @default null
- */
- emptyView: null,
-
- /**
- @type Ember.View
- @default Ember.View
- */
- itemViewClass: Ember.View,
-
- /** @private */
- init: function() {
- var ret = this._super();
- this._contentDidChange();
- return ret;
- },
-
- _contentWillChange: Ember.beforeObserver(function() {
- var content = this.get('content');
-
- if (content) { content.removeArrayObserver(this); }
- var len = content ? get(content, 'length') : 0;
- this.arrayWillChange(content, 0, len);
- }, 'content'),
-
- /**
- @private
-
- Check to make sure that the content has changed, and if so,
- update the children directly. This is always scheduled
- asynchronously, to allow the element to be created before
- bindings have synchronized and vice versa.
- */
- _contentDidChange: Ember.observer(function() {
- var content = get(this, 'content');
-
- if (content) {
- Ember.assert(fmt("an Ember.CollectionView's content must implement Ember.Array. You passed %@", [content]), Ember.Array.detect(content));
- content.addArrayObserver(this);
- }
-
- var len = content ? get(content, 'length') : 0;
- this.arrayDidChange(content, 0, null, len);
- }, 'content'),
-
- willDestroy: function() {
- var content = get(this, 'content');
- if (content) { content.removeArrayObserver(this); }
-
- this._super();
- },
-
- arrayWillChange: function(content, start, removedCount) {
- // If the contents were empty before and this template collection has an
- // empty view remove it now.
- var emptyView = get(this, 'emptyView');
- if (emptyView && emptyView instanceof Ember.View) {
- emptyView.removeFromParent();
- }
-
- // Loop through child views that correspond with the removed items.
- // Note that we loop from the end of the array to the beginning because
- // we are mutating it as we go.
- var childViews = get(this, 'childViews'), childView, idx, len;
-
- len = get(childViews, 'length');
-
- var removingAll = removedCount === len;
-
- if (removingAll) {
- this.invokeForState('empty');
- }
-
- for (idx = start + removedCount - 1; idx >= start; idx--) {
- childView = childViews[idx];
- if (removingAll) { childView.removedFromDOM = true; }
- childView.destroy();
- }
- },
-
- /**
- Called when a mutation to the underlying content array occurs.
-
- This method will replay that mutation against the views that compose the
- Ember.CollectionView, ensuring that the view reflects the model.
-
- This array observer is added in contentDidChange.
-
- @param {Array} addedObjects
- the objects that were added to the content
-
- @param {Array} removedObjects
- the objects that were removed from the content
-
- @param {Number} changeIndex
- the index at which the changes occurred
- */
- arrayDidChange: function(content, start, removed, added) {
- var itemViewClass = get(this, 'itemViewClass'),
- childViews = get(this, 'childViews'),
- addedViews = [], view, item, idx, len, itemTagName;
-
- if ('string' === typeof itemViewClass) {
- itemViewClass = get(itemViewClass);
- }
-
- Ember.assert(fmt("itemViewClass must be a subclass of Ember.View, not %@", [itemViewClass]), Ember.View.detect(itemViewClass));
-
- len = content ? get(content, 'length') : 0;
- if (len) {
- for (idx = start; idx < start+added; idx++) {
- item = content.objectAt(idx);
-
- view = this.createChildView(itemViewClass, {
- content: item,
- contentIndex: idx
- });
-
- addedViews.push(view);
- }
- } else {
- var emptyView = get(this, 'emptyView');
- if (!emptyView) { return; }
-
- emptyView = this.createChildView(emptyView);
- addedViews.push(emptyView);
- set(this, 'emptyView', emptyView);
- }
- childViews.replace(start, 0, addedViews);
- },
-
- createChildView: function(view, attrs) {
- view = this._super(view, attrs);
-
- var itemTagName = get(view, 'tagName');
- var tagName = (itemTagName === null || itemTagName === undefined) ? Ember.CollectionView.CONTAINER_MAP[get(this, 'tagName')] : itemTagName;
-
- set(view, 'tagName', tagName);
-
- return view;
- }
-});
-
-/**
- @static
-
- A map of parent tags to their default child tags. You can add
- additional parent tags if you want collection views that use
- a particular parent tag to default to a child tag.
-
- @type Hash
- @constant
-*/
-Ember.CollectionView.CONTAINER_MAP = {
- ul: 'li',
- ol: 'li',
- table: 'tr',
- thead: 'tr',
- tbody: 'tr',
- tfoot: 'tr',
- tr: 'td',
- select: 'option'
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2006-2011 Strobe Inc. and contributors.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-/*globals jQuery*/
-
-})();
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- @extends Ember.Object
-*/
-Ember.State = Ember.Object.extend(Ember.Evented,
-/** @scope Ember.State.prototype */{
- isState: true,
-
- /**
- A reference to the parent state.
-
- @type Ember.State
- */
- parentState: null,
- start: null,
-
- /**
- The name of this state.
-
- @type String
- */
- name: null,
-
- /**
- The full path to this state.
-
- @type String
- @readOnly
- */
- path: Ember.computed(function() {
- var parentPath = get(this, 'parentState.path'),
- path = get(this, 'name');
-
- if (parentPath) {
- path = parentPath + '.' + path;
- }
-
- return path;
- }).property().cacheable(),
-
- /**
- @private
-
- Override the default event firing from Ember.Evented to
- also call methods with the given name.
- */
- trigger: function(name) {
- if (this[name]) {
- this[name].apply(this, [].slice.call(arguments, 1));
- }
- this._super.apply(this, arguments);
- },
-
- /** @private */
- init: function() {
- var states = get(this, 'states'), foundStates;
- set(this, 'childStates', Ember.A());
- set(this, 'eventTransitions', get(this, 'eventTransitions') || {});
-
- var name, value, transitionTarget;
-
- // As a convenience, loop over the properties
- // of this state and look for any that are other
- // Ember.State instances or classes, and move them
- // to the `states` hash. This avoids having to
- // create an explicit separate hash.
-
- if (!states) {
- states = {};
-
- for (name in this) {
- if (name === "constructor") { continue; }
-
- if (value = this[name]) {
- if (transitionTarget = value.transitionTarget) {
- this.eventTransitions[name] = transitionTarget;
- }
-
- this.setupChild(states, name, value);
- }
- }
-
- set(this, 'states', states);
- } else {
- for (name in states) {
- this.setupChild(states, name, states[name]);
- }
- }
-
- set(this, 'pathsCache', {});
- set(this, 'pathsCacheNoContext', {});
- },
-
- /** @private */
- setupChild: function(states, name, value) {
- if (!value) { return false; }
-
- if (value.isState) {
- set(value, 'name', name);
- } else if (Ember.State.detect(value)) {
- value = value.create({
- name: name
- });
- }
-
- if (value.isState) {
- set(value, 'parentState', this);
- get(this, 'childStates').pushObject(value);
- states[name] = value;
- }
- },
-
- lookupEventTransition: function(name) {
- var path, state = this;
-
- while(state && !path) {
- path = state.eventTransitions[name];
- state = state.get('parentState');
- }
-
- return path;
- },
-
- /**
- A Boolean value indicating whether the state is a leaf state
- in the state hierarchy. This is false if the state has child
- states; otherwise it is true.
-
- @type Boolean
- */
- isLeaf: Ember.computed(function() {
- return !get(this, 'childStates').length;
- }).cacheable(),
-
- /**
- A boolean value indicating whether the state takes a context.
- By default we assume all states take contexts.
- */
- hasContext: true,
-
- /**
- This is the default transition event.
-
- @event
- @param {Ember.StateManager} manager
- @param context
- @see Ember.StateManager#transitionEvent
- */
- setup: Ember.K,
-
- /**
- This event fires when the state is entered.
-
- @event
- @param {Ember.StateManager} manager
- */
- enter: Ember.K,
-
- /**
- This event fires when the state is exited.
-
- @event
- @param {Ember.StateManager} manager
- */
- exit: Ember.K
-});
-
-var Event = Ember.$ && Ember.$.Event;
-
-Ember.State.reopenClass(
-/** @scope Ember.State */{
-
- /**
- @static
-
- Creates an action function for transitioning to the named state while preserving context.
-
- The following example StateManagers are equivalent:
-
- aManager = Ember.StateManager.create({
- stateOne: Ember.State.create({
- changeToStateTwo: Ember.State.transitionTo('stateTwo')
- }),
- stateTwo: Ember.State.create({})
- })
-
- bManager = Ember.StateManager.create({
- stateOne: Ember.State.create({
- changeToStateTwo: function(manager, context){
- manager.transitionTo('stateTwo', context)
- }
- }),
- stateTwo: Ember.State.create({})
- })
-
- @param {String} target
- */
- transitionTo: function(target) {
- var event = function(stateManager, context) {
- if (Event && context instanceof Event) {
- if (context.hasOwnProperty('context')) {
- context = context.context;
- } else {
- // If we received an event and it doesn't contain
- // a context, don't pass along a superfluous
- // context to the target of the event.
- return stateManager.transitionTo(target);
- }
- }
-
- stateManager.transitionTo(target, context);
- };
-
- event.transitionTarget = target;
-
- return event;
- }
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
-var arrayForEach = Ember.ArrayPolyfills.forEach;
-/**
- @private
-
- A Transition takes the enter, exit and resolve states and normalizes
- them:
-
- * takes any passed in contexts into consideration
- * adds in `initialState`s
-*/
-var Transition = function(raw) {
- this.enterStates = raw.enterStates.slice();
- this.exitStates = raw.exitStates.slice();
- this.resolveState = raw.resolveState;
-
- this.finalState = raw.enterStates[raw.enterStates.length - 1] || raw.resolveState;
-};
-
-Transition.prototype = {
- /**
- @private
-
- Normalize the passed in enter, exit and resolve states.
-
- This process also adds `finalState` and `contexts` to the Transition object.
-
- @param {Ember.StateManager} manager the state manager running the transition
- @param {Array} contexts a list of contexts passed into `transitionTo`
- */
- normalize: function(manager, contexts) {
- this.matchContextsToStates(contexts);
- this.addInitialStates();
- this.removeUnchangedContexts(manager);
- return this;
- },
-
- /**
- @private
-
- Match each of the contexts passed to `transitionTo` to a state.
- This process may also require adding additional enter and exit
- states if there are more contexts than enter states.
-
- @param {Array} contexts a list of contexts passed into `transitionTo`
- */
- matchContextsToStates: function(contexts) {
- var stateIdx = this.enterStates.length - 1,
- matchedContexts = [],
- state,
- context;
-
- // Next, we will match the passed in contexts to the states they
- // represent.
- //
- // First, assign a context to each enter state in reverse order. If
- // any contexts are left, add a parent state to the list of states
- // to enter and exit, and assign a context to the parent state.
- //
- // If there are still contexts left when the state manager is
- // reached, raise an exception.
- //
- // This allows the following:
- //
- // |- root
- // | |- post
- // | | |- comments
- // | |- about (* current state)
- //
- // For `transitionTo('post.comments', post, post.get('comments')`,
- // the first context (`post`) will be assigned to `root.post`, and
- // the second context (`post.get('comments')`) will be assigned
- // to `root.post.comments`.
- //
- // For the following:
- //
- // |- root
- // | |- post
- // | | |- index (* current state)
- // | | |- comments
- //
- // For `transitionTo('post.comments', otherPost, otherPost.get('comments')`,
- // the `<root.post>` state will be added to the list of enter and exit
- // states because its context has changed.
-
- while (contexts.length > 0) {
- if (stateIdx >= 0) {
- state = this.enterStates[stateIdx--];
- } else {
- if (this.enterStates.length) {
- state = get(this.enterStates[0], 'parentState');
- if (!state) { throw "Cannot match all contexts to states"; }
- } else {
- // If re-entering the current state with a context, the resolve
- // state will be the current state.
- state = this.resolveState;
- }
-
- this.enterStates.unshift(state);
- this.exitStates.unshift(state);
- }
-
- // in routers, only states with dynamic segments have a context
- if (get(state, 'hasContext')) {
- context = contexts.pop();
- } else {
- context = null;
- }
-
- matchedContexts.unshift(context);
- }
-
- this.contexts = matchedContexts;
- },
-
- /**
- @private
-
- Add any `initialState`s to the list of enter states.
- */
- addInitialStates: function() {
- var finalState = this.finalState, initialState;
-
- while(true) {
- initialState = get(finalState, 'initialState') || 'start';
- finalState = get(finalState, 'states.' + initialState);
-
- if (!finalState) { break; }
-
- this.finalState = finalState;
- this.enterStates.push(finalState);
- this.contexts.push(undefined);
- }
- },
-
- /**
- @private
-
- Remove any states that were added because the number of contexts
- exceeded the number of explicit enter states, but the context has
- not changed since the last time the state was entered.
-
- @param {Ember.StateManager} manager passed in to look up the last
- context for a states
- */
- removeUnchangedContexts: function(manager) {
- // Start from the beginning of the enter states. If the state was added
- // to the list during the context matching phase, make sure the context
- // has actually changed since the last time the state was entered.
- while (this.enterStates.length > 0) {
- if (this.enterStates[0] !== this.exitStates[0]) { break; }
-
- if (this.enterStates.length === this.contexts.length) {
- if (manager.getStateMeta(this.enterStates[0], 'context') !== this.contexts[0]) { break; }
- this.contexts.shift();
- }
-
- this.resolveState = this.enterStates.shift();
- this.exitStates.shift();
- }
- }
-};
-
-/**
- @class
-
- StateManager is part of Ember's implementation of a finite state machine. A StateManager
- instance manages a number of properties that are instances of `Ember.State`,
- tracks the current active state, and triggers callbacks when states have changed.
-
- ## Defining States
-
- The states of StateManager can be declared in one of two ways. First, you can define
- a `states` property that contains all the states:
-
- managerA = Ember.StateManager.create({
- states: {
- stateOne: Ember.State.create(),
- stateTwo: Ember.State.create()
- }
- })
-
- managerA.get('states')
- // {
- // stateOne: Ember.State.create(),
- // stateTwo: Ember.State.create()
- // }
-
- You can also add instances of `Ember.State` (or an `Ember.State` subclass) directly as properties
- of a StateManager. These states will be collected into the `states` property for you.
-
- managerA = Ember.StateManager.create({
- stateOne: Ember.State.create(),
- stateTwo: Ember.State.create()
- })
-
- managerA.get('states')
- // {
- // stateOne: Ember.State.create(),
- // stateTwo: Ember.State.create()
- // }
-
- ## The Initial State
- When created a StateManager instance will immediately enter into the state
- defined as its `start` property or the state referenced by name in its
- `initialState` property:
-
- managerA = Ember.StateManager.create({
- start: Ember.State.create({})
- })
-
- managerA.get('currentState.name') // 'start'
-
- managerB = Ember.StateManager.create({
- initialState: 'beginHere',
- beginHere: Ember.State.create({})
- })
-
- managerB.get('currentState.name') // 'beginHere'
-
- Because it is a property you may also provide a computed function if you wish to derive
- an `initialState` programmatically:
-
- managerC = Ember.StateManager.create({
- initialState: function(){
- if (someLogic) {
- return 'active';
- } else {
- return 'passive';
- }
- }.property(),
- active: Ember.State.create({}),
- passive: Ember.State.create({})
- })
-
- ## Moving Between States
- A StateManager can have any number of Ember.State objects as properties
- and can have a single one of these states as its current state.
-
- Calling `transitionTo` transitions between states:
-
- robotManager = Ember.StateManager.create({
- initialState: 'poweredDown',
- poweredDown: Ember.State.create({}),
- poweredUp: Ember.State.create({})
- })
-
- robotManager.get('currentState.name') // 'poweredDown'
- robotManager.transitionTo('poweredUp')
- robotManager.get('currentState.name') // 'poweredUp'
-
- Before transitioning into a new state the existing `currentState` will have its
- `exit` method called with the StateManager instance as its first argument and
- an object representing the transition as its second argument.
-
- After transitioning into a new state the new `currentState` will have its
- `enter` method called with the StateManager instance as its first argument and
- an object representing the transition as its second argument.
-
- robotManager = Ember.StateManager.create({
- initialState: 'poweredDown',
- poweredDown: Ember.State.create({
- exit: function(stateManager){
- console.log("exiting the poweredDown state")
- }
- }),
- poweredUp: Ember.State.create({
- enter: function(stateManager){
- console.log("entering the poweredUp state. Destroy all humans.")
- }
- })
- })
-
- robotManager.get('currentState.name') // 'poweredDown'
- robotManager.transitionTo('poweredUp')
- // will log
- // 'exiting the poweredDown state'
- // 'entering the poweredUp state. Destroy all humans.'
-
-
- Once a StateManager is already in a state, subsequent attempts to enter that state will
- not trigger enter or exit method calls. Attempts to transition into a state that the
- manager does not have will result in no changes in the StateManager's current state:
-
- robotManager = Ember.StateManager.create({
- initialState: 'poweredDown',
- poweredDown: Ember.State.create({
- exit: function(stateManager){
- console.log("exiting the poweredDown state")
- }
- }),
- poweredUp: Ember.State.create({
- enter: function(stateManager){
- console.log("entering the poweredUp state. Destroy all humans.")
- }
- })
- })
-
- robotManager.get('currentState.name') // 'poweredDown'
- robotManager.transitionTo('poweredUp')
- // will log
- // 'exiting the poweredDown state'
- // 'entering the poweredUp state. Destroy all humans.'
- robotManager.transitionTo('poweredUp') // no logging, no state change
-
- robotManager.transitionTo('someUnknownState') // silently fails
- robotManager.get('currentState.name') // 'poweredUp'
-
-
- Each state property may itself contain properties that are instances of Ember.State.
- The StateManager can transition to specific sub-states in a series of transitionTo method calls or
- via a single transitionTo with the full path to the specific state. The StateManager will also
- keep track of the full path to its currentState
-
- robotManager = Ember.StateManager.create({
- initialState: 'poweredDown',
- poweredDown: Ember.State.create({
- charging: Ember.State.create(),
- charged: Ember.State.create()
- }),
- poweredUp: Ember.State.create({
- mobile: Ember.State.create(),
- stationary: Ember.State.create()
- })
- })
-
- robotManager.get('currentState.name') // 'poweredDown'
-
- robotManager.transitionTo('poweredUp')
- robotManager.get('currentState.name') // 'poweredUp'
-
- robotManager.transitionTo('mobile')
- robotManager.get('currentState.name') // 'mobile'
-
- // transition via a state path
- robotManager.transitionTo('poweredDown.charging')
- robotManager.get('currentState.name') // 'charging'
-
- robotManager.get('currentState.path') // 'poweredDown.charging'
-
- Enter transition methods will be called for each state and nested child state in their
- hierarchical order. Exit methods will be called for each state and its nested states in
- reverse hierarchical order.
-
- Exit transitions for a parent state are not called when entering into one of its child states,
- only when transitioning to a new section of possible states in the hierarchy.
-
- robotManager = Ember.StateManager.create({
- initialState: 'poweredDown',
- poweredDown: Ember.State.create({
- enter: function(){},
- exit: function(){
- console.log("exited poweredDown state")
- },
- charging: Ember.State.create({
- enter: function(){},
- exit: function(){}
- }),
- charged: Ember.State.create({
- enter: function(){
- console.log("entered charged state")
- },
- exit: function(){
- console.log("exited charged state")
- }
- })
- }),
- poweredUp: Ember.State.create({
- enter: function(){
- console.log("entered poweredUp state")
- },
- exit: function(){},
- mobile: Ember.State.create({
- enter: function(){
- console.log("entered mobile state")
- },
- exit: function(){}
- }),
- stationary: Ember.State.create({
- enter: function(){},
- exit: function(){}
- })
- })
- })
-
-
- robotManager.get('currentState.path') // 'poweredDown'
- robotManager.transitionTo('charged')
- // logs 'entered charged state'
- // but does *not* log 'exited poweredDown state'
- robotManager.get('currentState.name') // 'charged
-
- robotManager.transitionTo('poweredUp.mobile')
- // logs
- // 'exited charged state'
- // 'exited poweredDown state'
- // 'entered poweredUp state'
- // 'entered mobile state'
-
- During development you can set a StateManager's `enableLogging` property to `true` to
- receive console messages of state transitions.
-
- robotManager = Ember.StateManager.create({
- enableLogging: true
- })
-
- ## Managing currentState with Actions
- To control which transitions between states are possible for a given state, StateManager
- can receive and route action messages to its states via the `send` method. Calling to `send` with
- an action name will begin searching for a method with the same name starting at the current state
- and moving up through the parent states in a state hierarchy until an appropriate method is found
- or the StateManager instance itself is reached.
-
- If an appropriately named method is found it will be called with the state manager as the first
- argument and an optional `context` object as the second argument.
-
- managerA = Ember.StateManager.create({
- initialState: 'stateOne.substateOne.subsubstateOne',
- stateOne: Ember.State.create({
- substateOne: Ember.State.create({
- anAction: function(manager, context){
- console.log("an action was called")
- },
- subsubstateOne: Ember.State.create({})
- })
- })
- })
-
- managerA.get('currentState.name') // 'subsubstateOne'
- managerA.send('anAction')
- // 'stateOne.substateOne.subsubstateOne' has no anAction method
- // so the 'anAction' method of 'stateOne.substateOne' is called
- // and logs "an action was called"
- // with managerA as the first argument
- // and no second argument
-
- someObject = {}
- managerA.send('anAction', someObject)
- // the 'anAction' method of 'stateOne.substateOne' is called again
- // with managerA as the first argument and
- // someObject as the second argument.
-
-
- If the StateManager attempts to send an action but does not find an appropriately named
- method in the current state or while moving upwards through the state hierarchy
- it will throw a new Ember.Error. Action detection only moves upwards through the state hierarchy
- from the current state. It does not search in other portions of the hierarchy.
-
- managerB = Ember.StateManager.create({
- initialState: 'stateOne.substateOne.subsubstateOne',
- stateOne: Ember.State.create({
- substateOne: Ember.State.create({
- subsubstateOne: Ember.State.create({})
- })
- }),
- stateTwo: Ember.State.create({
- anAction: function(manager, context){
- // will not be called below because it is
- // not a parent of the current state
- }
- })
- })
-
- managerB.get('currentState.name') // 'subsubstateOne'
- managerB.send('anAction')
- // Error: <Ember.StateManager:ember132> could not
- // respond to event anAction in state stateOne.substateOne.subsubstateOne.
-
- Inside of an action method the given state should delegate `transitionTo` calls on its
- StateManager.
-
- robotManager = Ember.StateManager.create({
- initialState: 'poweredDown.charging',
- poweredDown: Ember.State.create({
- charging: Ember.State.create({
- chargeComplete: function(manager, context){
- manager.transitionTo('charged')
- }
- }),
- charged: Ember.State.create({
- boot: function(manager, context){
- manager.transitionTo('poweredUp')
- }
- })
- }),
- poweredUp: Ember.State.create({
- beginExtermination: function(manager, context){
- manager.transitionTo('rampaging')
- },
- rampaging: Ember.State.create()
- })
- })
-
- robotManager.get('currentState.name') // 'charging'
- robotManager.send('boot') // throws error, no boot action
- // in current hierarchy
- robotManager.get('currentState.name') // remains 'charging'
-
- robotManager.send('beginExtermination') // throws error, no beginExtermination
- // action in current hierarchy
- robotManager.get('currentState.name') // remains 'charging'
-
- robotManager.send('chargeComplete')
- robotManager.get('currentState.name') // 'charged'
-
- robotManager.send('boot')
- robotManager.get('currentState.name') // 'poweredUp'
-
- robotManager.send('beginExtermination', allHumans)
- robotManager.get('currentState.name') // 'rampaging'
-
- Transition actions can also be created using the `transitionTo` method of the Ember.State class. The
- following example StateManagers are equivalent:
-
- aManager = Ember.StateManager.create({
- stateOne: Ember.State.create({
- changeToStateTwo: Ember.State.transitionTo('stateTwo')
- }),
- stateTwo: Ember.State.create({})
- })
-
- bManager = Ember.StateManager.create({
- stateOne: Ember.State.create({
- changeToStateTwo: function(manager, context){
- manager.transitionTo('stateTwo', context)
- }
- }),
- stateTwo: Ember.State.create({})
- })
-**/
-Ember.StateManager = Ember.State.extend(
-/** @scope Ember.StateManager.prototype */ {
-
- /**
- When creating a new statemanager, look for a default state to transition
- into. This state can either be named `start`, or can be specified using the
- `initialState` property.
- */
- init: function() {
- this._super();
-
- set(this, 'stateMeta', Ember.Map.create());
-
- var initialState = get(this, 'initialState');
-
- if (!initialState && get(this, 'states.start')) {
- initialState = 'start';
- }
-
- if (initialState) {
- this.transitionTo(initialState);
- Ember.assert('Failed to transition to initial state "' + initialState + '"', !!get(this, 'currentState'));
- }
- },
-
- stateMetaFor: function(state) {
- var meta = get(this, 'stateMeta'),
- stateMeta = meta.get(state);
-
- if (!stateMeta) {
- stateMeta = {};
- meta.set(state, stateMeta);
- }
-
- return stateMeta;
- },
-
- setStateMeta: function(state, key, value) {
- return set(this.stateMetaFor(state), key, value);
- },
-
- getStateMeta: function(state, key) {
- return get(this.stateMetaFor(state), key);
- },
-
- /**
- The current state from among the manager's possible states. This property should
- not be set directly. Use `transitionTo` to move between states by name.
-
- @type Ember.State
- @readOnly
- */
- currentState: null,
-
- /**
- The name of transitionEvent that this stateManager will dispatch
-
- @property {String}
- @default 'setup'
- */
- transitionEvent: 'setup',
-
- /**
- If set to true, `errorOnUnhandledEvents` will cause an exception to be
- raised if you attempt to send an event to a state manager that is not
- handled by the current state or any of its parent states.
-
- @type Boolean
- @default true
- */
- errorOnUnhandledEvent: true,
-
- send: function(event, context) {
- Ember.assert('Cannot send event "' + event + '" while currentState is ' + get(this, 'currentState'), get(this, 'currentState'));
- return this.sendRecursively(event, get(this, 'currentState'), context);
- },
-
- sendRecursively: function(event, currentState, context) {
- var log = this.enableLogging,
- action = currentState[event];
-
- // Test to see if the action is a method that
- // can be invoked. Don't blindly check just for
- // existence, because it is possible the state
- // manager has a child state of the given name,
- // and we should still raise an exception in that
- // case.
- if (typeof action === 'function') {
- if (log) { Ember.Logger.log(fmt("STATEMANAGER: Sending event '%@' to state %@.", [event, get(currentState, 'path')])); }
- return action.call(currentState, this, context);
- } else {
- var parentState = get(currentState, 'parentState');
- if (parentState) {
- return this.sendRecursively(event, parentState, context);
- } else if (get(this, 'errorOnUnhandledEvent')) {
- throw new Ember.Error(this.toString() + " could not respond to event " + event + " in state " + get(this, 'currentState.path') + ".");
- }
- }
- },
-
- /**
- Finds a state by its state path.
-
- Example:
-
- manager = Ember.StateManager.create({
- root: Ember.State.create({
- dashboard: Ember.State.create()
- })
- });
-
- manager.getStateByPath(manager, "root.dashboard")
-
- // returns the dashboard state
-
- @param {Ember.State} root the state to start searching from
- @param {String} path the state path to follow
- @returns {Ember.State} the state at the end of the path
- */
- getStateByPath: function(root, path) {
- var parts = path.split('.'),
- state = root;
-
- for (var i=0, l=parts.length; i<l; i++) {
- state = get(get(state, 'states'), parts[i]);
- if (!state) { break; }
- }
-
- return state;
- },
-
- findStateByPath: function(state, path) {
- var possible;
-
- while (!possible && state) {
- possible = this.getStateByPath(state, path);
- state = get(state, 'parentState');
- }
-
- return possible;
- },
-
- /**
- @private
-
- A state stores its child states in its `states` hash.
- This code takes a path like `posts.show` and looks
- up `origin.states.posts.states.show`.
-
- It returns a list of all of the states from the
- origin, which is the list of states to call `enter`
- on.
- */
- findStatesByPath: function(origin, path) {
- if (!path || path === "") { return undefined; }
- var r = path.split('.'),
- ret = [];
-
- for (var i=0, len = r.length; i < len; i++) {
- var states = get(origin, 'states');
-
- if (!states) { return undefined; }
-
- var s = get(states, r[i]);
- if (s) { origin = s; ret.push(s); }
- else { return undefined; }
- }
-
- return ret;
- },
-
- goToState: function() {
- // not deprecating this yet so people don't constantly need to
- // make trivial changes for little reason.
- return this.transitionTo.apply(this, arguments);
- },
-
- transitionTo: function(path, context) {
- // XXX When is transitionTo called with no path
- if (Ember.empty(path)) { return; }
-
- // The ES6 signature of this function is `path, ...contexts`
- var contexts = context ? Array.prototype.slice.call(arguments, 1) : [],
- currentState = get(this, 'currentState') || this;
-
- // First, get the enter, exit and resolve states for the current state
- // and specified path. If possible, use an existing cache.
- var hash = this.contextFreeTransition(currentState, path);
-
- // Next, process the raw state information for the contexts passed in.
- var transition = new Transition(hash).normalize(this, contexts);
-
- this.enterState(transition);
- this.triggerSetupContext(transition);
- },
-
- contextFreeTransition: function(currentState, path) {
- var cache = currentState.pathsCache[path];
- if (cache) { return cache; }
-
- var enterStates = this.findStatesByPath(currentState, path),
- exitStates = [],
- resolveState = currentState;
-
- // Walk up the states. For each state, check whether a state matching
- // the `path` is nested underneath. This will find the closest
- // parent state containing `path`.
- //
- // This allows the user to pass in a relative path. For example, for
- // the following state hierarchy:
- //
- // | |root
- // | |- posts
- // | | |- show (* current)
- // | |- comments
- // | | |- show
- //
- // If the current state is `<root.posts.show>`, an attempt to
- // transition to `comments.show` will match `<root.comments.show>`.
- //
- // First, this code will look for root.posts.show.comments.show.
- // Next, it will look for root.posts.comments.show. Finally,
- // it will look for `root.comments.show`, and find the state.
- //
- // After this process, the following variables will exist:
- //
- // * resolveState: a common parent state between the current
- // and target state. In the above example, `<root>` is the
- // `resolveState`.
- // * enterStates: a list of all of the states represented
- // by the path from the `resolveState`. For example, for
- // the path `root.comments.show`, `enterStates` would have
- // `[<root.comments>, <root.comments.show>]`
- // * exitStates: a list of all of the states from the
- // `resolveState` to the `currentState`. In the above
- // example, `exitStates` would have
- // `[<root.posts>`, `<root.posts.show>]`.
- while (resolveState && !enterStates) {
- exitStates.unshift(resolveState);
-
- resolveState = get(resolveState, 'parentState');
- if (!resolveState) {
- enterStates = this.findStatesByPath(this, path);
- if (!enterStates) {
- Ember.assert('Could not find state for path: "'+path+'"');
- return;
- }
- }
- enterStates = this.findStatesByPath(resolveState, path);
- }
-
- // If the path contains some states that are parents of both the
- // current state and the target state, remove them.
- //
- // For example, in the following hierarchy:
- //
- // |- root
- // | |- post
- // | | |- index (* current)
- // | | |- show
- //
- // If the `path` is `root.post.show`, the three variables will
- // be:
- //
- // * resolveState: `<state manager>`
- // * enterStates: `[<root>, <root.post>, <root.post.show>]`
- // * exitStates: `[<root>, <root.post>, <root.post.index>]`
- //
- // The goal of this code is to remove the common states, so we
- // have:
- //
- // * resolveState: `<root.post>`
- // * enterStates: `[<root.post.show>]`
- // * exitStates: `[<root.post.index>]`
- //
- // This avoid unnecessary calls to the enter and exit transitions.
- while (enterStates.length > 0 && enterStates[0] === exitStates[0]) {
- resolveState = enterStates.shift();
- exitStates.shift();
- }
-
- // Cache the enterStates, exitStates, and resolveState for the
- // current state and the `path`.
- var transitions = currentState.pathsCache[path] = {
- exitStates: exitStates,
- enterStates: enterStates,
- resolveState: resolveState
- };
-
- return transitions;
- },
-
- triggerSetupContext: function(transitions) {
- var contexts = transitions.contexts,
- offset = transitions.enterStates.length - contexts.length,
- enterStates = transitions.enterStates,
- transitionEvent = get(this, 'transitionEvent');
-
- Ember.assert("More contexts provided than states", offset >= 0);
-
- arrayForEach.call(enterStates, function(state, idx) {
- state.trigger(transitionEvent, this, contexts[idx-offset]);
- }, this);
- },
-
- getState: function(name) {
- var state = get(this, name),
- parentState = get(this, 'parentState');
-
- if (state) {
- return state;
- } else if (parentState) {
- return parentState.getState(name);
- }
- },
-
- enterState: function(transition) {
- var log = this.enableLogging;
-
- var exitStates = transition.exitStates.slice(0).reverse();
- arrayForEach.call(exitStates, function(state) {
- state.trigger('exit', this);
- }, this);
-
- arrayForEach.call(transition.enterStates, function(state) {
- if (log) { Ember.Logger.log("STATEMANAGER: Entering " + get(state, 'path')); }
- state.trigger('enter', this);
- }, this);
-
- set(this, 'currentState', transition.finalState);
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Statecharts
-// Copyright: ©2011 Living Social Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-(function() {
-var get = Ember.get;
-
-Ember._ResolvedState = Ember.Object.extend({
- manager: null,
- state: null,
- match: null,
-
- object: Ember.computed(function(key, value) {
- if (arguments.length === 2) {
- this._object = value;
- return value;
- } else {
- if (this._object) {
- return this._object;
- } else {
- var state = get(this, 'state'),
- match = get(this, 'match'),
- manager = get(this, 'manager');
- return state.deserialize(manager, match.hash);
- }
- }
- }).property(),
-
- hasPromise: Ember.computed(function() {
- return Ember.canInvoke(get(this, 'object'), 'then');
- }).property('object'),
-
- promise: Ember.computed(function() {
- var object = get(this, 'object');
- if (Ember.canInvoke(object, 'then')) {
- return object;
- } else {
- return {
- then: function(success) { success(object); }
- };
- }
- }).property('object'),
-
- transition: function() {
- var manager = get(this, 'manager'),
- path = get(this, 'state.path'),
- object = get(this, 'object');
- manager.transitionTo(path, object);
- }
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get;
-
-// The Ember Routable mixin assumes the existance of a simple
-// routing shim that supports the following three behaviors:
-//
-// * .getURL() - this is called when the page loads
-// * .setURL(newURL) - this is called from within the state
-// manager when the state changes to a routable state
-// * .onURLChange(callback) - this happens when the user presses
-// the back or forward button
-
-var paramForClass = function(classObject) {
- var className = classObject.toString(),
- parts = className.split("."),
- last = parts[parts.length - 1];
-
- return Ember.String.underscore(last) + "_id";
-};
-
-var merge = function(original, hash) {
- for (var prop in hash) {
- if (!hash.hasOwnProperty(prop)) { continue; }
- if (original.hasOwnProperty(prop)) { continue; }
-
- original[prop] = hash[prop];
- }
-};
-
-/**
- @class
- @extends Ember.Mixin
-*/
-Ember.Routable = Ember.Mixin.create({
- init: function() {
- var redirection;
- this.on('connectOutlets', this, this.stashContext);
-
- if (redirection = get(this, 'redirectsTo')) {
- Ember.assert("You cannot use `redirectsTo` if you already have a `connectOutlets` method", this.connectOutlets === Ember.K);
-
- this.connectOutlets = function(router) {
- router.transitionTo(redirection);
- };
- }
-
- // normalize empty route to '/'
- var route = get(this, 'route');
- if (route === '') {
- route = '/';
- }
-
- this._super();
-
- Ember.assert("You cannot use `redirectsTo` on a state that has child states", !redirection || (!!redirection && !!get(this, 'isLeaf')));
- },
-
- /**
- @private
-
- Whenever a routable state is entered, the context it was entered with
- is stashed so that we can regenerate the state's `absoluteURL` on
- demand.
- */
- stashContext: function(manager, context) {
- var serialized = this.serialize(manager, context);
- Ember.assert('serialize must return a hash', !serialized || typeof serialized === 'object');
-
- manager.setStateMeta(this, 'context', context);
- manager.setStateMeta(this, 'serialized', serialized);
-
- if (get(this, 'isRoutable') && !get(manager, 'isRouting')) {
- this.updateRoute(manager, get(manager, 'location'));
- }
- },
-
- /**
- @private
-
- Whenever a routable state is entered, the router's location object
- is notified to set the URL to the current absolute path.
-
- In general, this will update the browser's URL.
- */
- updateRoute: function(manager, location) {
- if (get(this, 'isLeafRoute')) {
- var path = this.absoluteRoute(manager);
- location.setURL(path);
- }
- },
-
- /**
- @private
-
- Get the absolute route for the current state and a given
- hash.
-
- This method is private, as it expects a serialized hash,
- not the original context object.
- */
- absoluteRoute: function(manager, hash) {
- var parentState = get(this, 'parentState');
- var path = '', generated;
-
- // If the parent state is routable, use its current path
- // as this route's prefix.
- if (get(parentState, 'isRoutable')) {
- path = parentState.absoluteRoute(manager, hash);
- }
-
- var matcher = get(this, 'routeMatcher'),
- serialized = manager.getStateMeta(this, 'serialized');
-
- // merge the existing serialized object in with the passed
- // in hash.
- hash = hash || {};
- merge(hash, serialized);
-
- generated = matcher && matcher.generate(hash);
-
- if (generated) {
- path = path + '/' + generated;
- }
-
- return path;
- },
-
- /**
- @private
-
- At the moment, a state is routable if it has a string `route`
- property. This heuristic may change.
- */
- isRoutable: Ember.computed(function() {
- return typeof get(this, 'route') === 'string';
- }).cacheable(),
-
- /**
- @private
-
- Determine if this is the last routeable state
- */
- isLeafRoute: Ember.computed(function() {
- if (get(this, 'isLeaf')) { return true; }
- return !get(this, 'childStates').findProperty('isRoutable');
- }).cacheable(),
-
- /**
- @private
-
- A _RouteMatcher object generated from the current route's `route`
- string property.
- */
- routeMatcher: Ember.computed(function() {
- var route = get(this, 'route');
- if (route) {
- return Ember._RouteMatcher.create({ route: route });
- }
- }).cacheable(),
-
- /**
- @private
-
- Check whether the route has dynamic segments and therefore takes
- a context.
- */
- hasContext: Ember.computed(function() {
- var routeMatcher = get(this, 'routeMatcher');
- if (routeMatcher) {
- return routeMatcher.identifiers.length > 0;
- }
- }).cacheable(),
-
- /**
- @private
-
- The model class associated with the current state. This property
- uses the `modelType` property, in order to allow it to be
- specified as a String.
- */
- modelClass: Ember.computed(function() {
- var modelType = get(this, 'modelType');
-
- if (typeof modelType === 'string') {
- return Ember.get(window, modelType);
- } else {
- return modelType;
- }
- }).cacheable(),
-
- /**
- @private
-
- Get the model class for the state. The heuristic is:
-
- * The state must have a single dynamic segment
- * The dynamic segment must end in `_id`
- * A dynamic segment like `blog_post_id` is converted into `BlogPost`
- * The name is then looked up on the passed in namespace
-
- The process of initializing an application with a router will
- pass the application's namespace into the router, which will be
- used here.
- */
- modelClassFor: function(namespace) {
- var modelClass, routeMatcher, identifiers, match, className;
-
- // if an explicit modelType was specified, use that
- if (modelClass = get(this, 'modelClass')) { return modelClass; }
-
- // if the router has no lookup namespace, we won't be able to guess
- // the modelType
- if (!namespace) { return; }
-
- // make sure this state is actually a routable state
- routeMatcher = get(this, 'routeMatcher');
- if (!routeMatcher) { return; }
-
- // only guess modelType for states with a single dynamic segment
- // (no more, no fewer)
- identifiers = routeMatcher.identifiers;
- if (identifiers.length !== 2) { return; }
-
- // extract the `_id` from the end of the dynamic segment; if the
- // dynamic segment does not end in `_id`, we can't guess the
- // modelType
- match = identifiers[1].match(/^(.*)_id$/);
- if (!match) { return; }
-
- // convert the underscored type into a class form and look it up
- // on the router's namespace
- className = Ember.String.classify(match[1]);
- return get(namespace, className);
- },
-
- /**
- The default method that takes a `params` object and converts
- it into an object.
-
- By default, a params hash that looks like `{ post_id: 1 }`
- will be looked up as `namespace.Post.find(1)`. This is
- designed to work seamlessly with Ember Data, but will work
- fine with any class that has a `find` method.
- */
- deserialize: function(manager, params) {
- var modelClass, routeMatcher, param;
-
- if (modelClass = this.modelClassFor(get(manager, 'namespace'))) {
- Ember.assert("Expected "+modelClass.toString()+" to implement `find` for use in '"+this.get('path')+"' `deserialize`. Please implement the `find` method or overwrite `deserialize`.", modelClass.find);
- return modelClass.find(params[paramForClass(modelClass)]);
- }
-
- return params;
- },
-
- /**
- The default method that takes an object and converts it into
- a params hash.
-
- By default, if there is a single dynamic segment named
- `blog_post_id` and the object is a `BlogPost` with an
- `id` of `12`, the serialize method will produce:
-
- { blog_post_id: 12 }
- */
- serialize: function(manager, context) {
- var modelClass, routeMatcher, namespace, param, id;
-
- if (Ember.empty(context)) { return ''; }
-
- if (modelClass = this.modelClassFor(get(manager, 'namespace'))) {
- param = paramForClass(modelClass);
- id = get(context, 'id');
- context = {};
- context[param] = id;
- }
-
- return context;
- },
-
- /**
- @private
- */
- resolvePath: function(manager, path) {
- if (get(this, 'isLeafRoute')) { return Ember.A(); }
-
- var childStates = get(this, 'childStates'), match;
-
- childStates = Ember.A(childStates.filterProperty('isRoutable'));
-
- childStates = childStates.sort(function(a, b) {
- var aDynamicSegments = get(a, 'routeMatcher.identifiers.length'),
- bDynamicSegments = get(b, 'routeMatcher.identifiers.length'),
- aRoute = get(a, 'route'),
- bRoute = get(b, 'route');
-
- if (aRoute.indexOf(bRoute) === 0) {
- return -1;
- } else if (bRoute.indexOf(aRoute) === 0) {
- return 1;
- }
-
- if (aDynamicSegments !== bDynamicSegments) {
- return aDynamicSegments - bDynamicSegments;
- }
-
- return get(b, 'route.length') - get(a, 'route.length');
- });
-
- var state = childStates.find(function(state) {
- var matcher = get(state, 'routeMatcher');
- if (match = matcher.match(path)) { return true; }
- });
-
- Ember.assert("Could not find state for path " + path, !!state);
-
- var resolvedState = Ember._ResolvedState.create({
- manager: manager,
- state: state,
- match: match
- });
-
- var states = state.resolvePath(manager, match.remaining);
-
- return Ember.A([resolvedState]).pushObjects(states);
- },
-
- /**
- @private
-
- Once `unroute` has finished unwinding, `routePath` will be called
- with the remainder of the route.
-
- For example, if you were in the /posts/1/comments state, and you
- moved into the /posts/2/comments state, `routePath` will be called
- on the state whose path is `/posts` with the path `/2/comments`.
- */
- routePath: function(manager, path) {
- if (get(this, 'isLeafRoute')) { return; }
-
- var resolvedStates = this.resolvePath(manager, path),
- hasPromises = resolvedStates.some(function(s) { return get(s, 'hasPromise'); });
-
- function runTransition() {
- resolvedStates.forEach(function(rs) { rs.transition(); });
- }
-
- if (hasPromises) {
- manager.transitionTo('loading');
-
- Ember.assert('Loading state should be the child of a route', Ember.Routable.detect(get(manager, 'currentState.parentState')));
- Ember.assert('Loading state should not be a route', !Ember.Routable.detect(get(manager, 'currentState')));
-
- manager.handleStatePromises(resolvedStates, runTransition);
- } else {
- runTransition();
- }
- },
-
- /**
- @private
-
- When you move to a new route by pressing the back
- or forward button, this method is called first.
-
- Its job is to move the state manager into a parent
- state of the state it will eventually move into.
- */
- unroutePath: function(router, path) {
- var parentState = get(this, 'parentState');
-
- // If we're at the root state, we're done
- if (parentState === router) {
- return;
- }
-
- path = path.replace(/^(?=[^\/])/, "/");
- var absolutePath = this.absoluteRoute(router);
-
- var route = get(this, 'route');
-
- // If the current path is empty, move up one state,
- // because the index ('/') state must be a leaf node.
- if (route !== '/') {
- // If the current path is a prefix of the path we're trying
- // to go to, we're done.
- var index = path.indexOf(absolutePath),
- next = path.charAt(absolutePath.length);
-
- if (index === 0 && (next === "/" || next === "")) {
- return;
- }
- }
-
- // Transition to the parent and call unroute again.
- router.enterState({
- exitStates: [this],
- enterStates: [],
- finalState: parentState
- });
-
- router.send('unroutePath', path);
- },
-
- /**
- The `connectOutlets` event will be triggered once a
- state has been entered. It will be called with the
- route's context.
- */
- connectOutlets: Ember.K,
-
- /**
- The `navigateAway` event will be triggered when the
- URL changes due to the back/forward button
- */
- navigateAway: Ember.K
-});
-
-})();
-
-
-
-(function() {
-/**
- @class
- @extends Ember.Routable
-*/
-Ember.Route = Ember.State.extend(Ember.Routable);
-
-})();
-
-
-
-(function() {
-var escapeForRegex = function(text) {
- return text.replace(/[\-\[\]{}()*+?.,\\\^\$|#\s]/g, "\\$&");
-};
-
-Ember._RouteMatcher = Ember.Object.extend({
- state: null,
-
- init: function() {
- var route = this.route,
- identifiers = [],
- count = 1,
- escaped;
-
- // Strip off leading slash if present
- if (route.charAt(0) === '/') {
- route = this.route = route.substr(1);
- }
-
- escaped = escapeForRegex(route);
-
- var regex = escaped.replace(/:([a-z_]+)(?=$|\/)/gi, function(match, id) {
- identifiers[count++] = id;
- return "([^/]+)";
- });
-
- this.identifiers = identifiers;
- this.regex = new RegExp("^/?" + regex);
- },
-
- match: function(path) {
- var match = path.match(this.regex);
-
- if (match) {
- var identifiers = this.identifiers,
- hash = {};
-
- for (var i=1, l=identifiers.length; i<l; i++) {
- hash[identifiers[i]] = match[i];
- }
-
- return {
- remaining: path.substr(match[0].length),
- hash: identifiers.length > 0 ? hash : null
- };
- }
- },
-
- generate: function(hash) {
- var identifiers = this.identifiers, route = this.route, id;
- for (var i=1, l=identifiers.length; i<l; i++) {
- id = identifiers[i];
- route = route.replace(new RegExp(":" + id), hash[id]);
- }
- return route;
- }
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-var merge = function(original, hash) {
- for (var prop in hash) {
- if (!hash.hasOwnProperty(prop)) { continue; }
- if (original.hasOwnProperty(prop)) { continue; }
-
- original[prop] = hash[prop];
- }
-};
-
-/**
- @class
-
- `Ember.Router` is the subclass of `Ember.StateManager` responsible for providing URL-based
- application state detection. The `Ember.Router` instance of an application detects the browser URL
- at application load time and attempts to match it to a specific application state. Additionally
- the router will update the URL to reflect an application's state changes over time.
-
- ## Adding a Router Instance to Your Application
- An instance of Ember.Router can be associated with an instance of Ember.Application in one of two ways:
-
- You can provide a subclass of Ember.Router as the `Router` property of your application. An instance
- of this Router class will be instantiated and route detection will be enabled when the application's
- `initialize` method is called. The Router instance will be available as the `router` property
- of the application:
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({ ... })
- });
-
- App.initialize();
- App.get('router') // an instance of App.Router
-
- If you want to define a Router instance elsewhere, you can pass the instance to the application's
- `initialize` method:
-
- App = Ember.Application.create();
- aRouter = Ember.Router.create({ ... });
-
- App.initialize(aRouter);
- App.get('router') // aRouter
-
- ## Adding Routes to a Router
- The `initialState` property of Ember.Router instances is named `root`. The state stored in this
- property must be a subclass of Ember.Route. The `root` route acts as the container for the
- set of routable states but is not routable itself. It should have states that are also subclasses
- of Ember.Route which each have a `route` property describing the URL pattern you would like to detect.
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- index: Ember.Route.extend({
- route: '/'
- }),
- ... additional Ember.Routes ...
- })
- })
- });
- App.initialize();
-
-
- When an application loads, Ember will parse the URL and attempt to find an Ember.Route within
- the application's states that matches. (The example URL-matching below will use the default
- 'hash syntax' provided by `Ember.HashLocation`.)
-
- In the following route structure:
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/'
- }),
- bRoute: Ember.Route.extend({
- route: '/alphabeta'
- })
- })
- })
- });
- App.initialize();
-
- Loading the page at the URL '#/' will detect the route property of 'root.aRoute' ('/') and
- transition the router first to the state named 'root' and then to the substate 'aRoute'.
-
- Respectively, loading the page at the URL '#/alphabeta' would detect the route property of
- 'root.bRoute' ('/alphabeta') and transition the router first to the state named 'root' and
- then to the substate 'bRoute'.
-
- ## Adding Nested Routes to a Router
- Routes can contain nested subroutes each with their own `route` property describing the nested
- portion of the URL they would like to detect and handle. Router, like all instances of StateManager,
- cannot call `transitonTo` with an intermediary state. To avoid transitioning the Router into an
- intermediary state when detecting URLs, a Route with nested routes must define both a base `route`
- property for itself and a child Route with a `route` property of `'/'` which will be transitioned
- to when the base route is detected in the URL:
-
- Given the following application code:
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/theBaseRouteForThisSet',
-
- indexSubRoute: Ember.Route.extend({
- route: '/',
- }),
-
- subRouteOne: Ember.Route.extend({
- route: '/subroute1
- }),
-
- subRouteTwo: Ember.Route.extend({
- route: '/subRoute2'
- })
-
- })
- })
- })
- });
- App.initialize();
-
- When the application is loaded at '/theBaseRouteForThisSet' the Router will transition to the route
- at path 'root.aRoute' and then transition to state 'indexSubRoute'.
-
- When the application is loaded at '/theBaseRouteForThisSet/subRoute1' the Router will transition to
- the route at path 'root.aRoute' and then transition to state 'subRouteOne'.
-
- ## Route Transition Events
- Transitioning between Ember.Route instances (including the transition into the detected
- route when loading the application) triggers the same transition events as state transitions for
- base `Ember.State`s. However, the default `setup` transition event is named `connectOutlets` on
- Ember.Router instances (see 'Changing View Hierarchy in Response To State Change').
-
- The following route structure when loaded with the URL "#/"
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/',
- enter: function(router) {
- console.log("entering root.aRoute from", router.get('currentState.name'));
- },
- connectOutlets: function(router) {
- console.log("entered root.aRoute, fully transitioned to", router.get('currentState.path'));
- }
- })
- })
- })
- });
- App.initialize();
-
- Will result in console output of:
-
- 'entering root.aRoute from root'
- 'entered root.aRoute, fully transitioned to root.aRoute '
-
- Ember.Route has two additional callbacks for handling URL serialization and deserialization. See
- 'Serializing/Deserializing URLs'
-
- ## Routes With Dynamic Segments
- An Ember.Route's `route` property can reference dynamic sections of the URL by prefacing a URL segment
- with the ':' character. The values of these dynamic segments will be passed as a hash to the
- `deserialize` method of the matching Route (see 'Serializing/Deserializing URLs').
-
- ## Serializing/Deserializing URLs
- Ember.Route has two callbacks for associating a particular object context with a URL: `serialize`
- for converting an object into a parameters hash to fill dynamic segments of a URL and `deserialize`
- for converting a hash of dynamic segments from the URL into the appropriate object.
-
- ### Deserializing A URL's Dynamic Segments
- When an application is first loaded or the URL is changed manually (e.g. through the browser's
- back button) the `deserialize` method of the URL's matching Ember.Route will be called with
- the application's router as its first argument and a hash of the URLs dynamic segments and values
- as its second argument.
-
- The following route structure when loaded with the URL "#/fixed/thefirstvalue/anotherFixed/thesecondvalue":
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/fixed/:dynamicSectionA/anotherFixed/:dynamicSectionB',
- deserialize: function(router, params) {}
- })
- })
- })
- });
- App.initialize();
-
- Will call the 'deserialize' method of the Route instance at the path 'root.aRoute' with the
- following hash as its second argument:
-
- {
- dynamicSectionA: 'thefirstvalue',
- dynamicSectionB: 'thesecondvalue'
- }
-
- Within `deserialize` you should use this information to retrieve or create an appropriate context
- object for the given URL (e.g. by loading from a remote API or accessing the browser's
- `localStorage`). This object must be the `return` value of `deserialize` and will be
- passed to the Route's `connectOutlets` and `serialize` methods.
-
- When an application's state is changed from within the application itself, the context provided for
- the transition will be passed and `deserialize` is not called (see 'Transitions Between States').
-
- ### Serializing An Object For URLs with Dynamic Segments
- When transitioning into a Route whose `route` property contains dynamic segments the Route's
- `serialize` method is called with the Route's router as the first argument and the Route's
- context as the second argument. The return value of `serialize` will be use to populate the
- dynamic segments and should be a object with keys that match the names of the dynamic sections.
-
- Given the following route structure:
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/'
- }),
- bRoute: Ember.Route.extend({
- route: '/staticSection/:someDynamicSegment',
- serialize: function(router, context) {
- return {
- someDynamicSegment: context.get('name')
- }
- }
- })
- })
- })
- });
- App.initialize();
-
-
- Transitioning to "root.bRoute" with a context of `Object.create({name: 'Yehuda'})` will call
- the Route's `serialize` method with the context as its second argument and update the URL to
- '#/staticSection/Yehuda'.
-
- ## Transitions Between States
- Once a routed application has initialized its state based on the entry URL, subsequent transitions to other
- states will update the URL if the entered Route has a `route` property. Given the following route structure
- loaded at the URL '#/':
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/',
- moveElsewhere: Ember.Route.transitionTo('bRoute')
- }),
- bRoute: Ember.Route.extend({
- route: '/someOtherLocation'
- })
- })
- })
- });
- App.initialize();
-
- And application code:
-
- App.get('router').send('moveElsewhere');
-
- Will transition the application's state to 'root.bRoute' and trigger an update of the URL to
- '#/someOtherLocation'.
-
- For URL patterns with dynamic segments a context can be supplied as the second argument to `send`.
- The router will match dynamic segments names to keys on this object and fill in the URL with the
- supplied values. Given the following state structure loaded at the URL '#/':
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/',
- moveElsewhere: Ember.Route.transitionTo('bRoute')
- }),
- bRoute: Ember.Route.extend({
- route: '/a/route/:dynamicSection/:anotherDynamicSection',
- connectOutlets: function(router, context) {},
- })
- })
- })
- });
- App.initialize();
-
- And application code:
-
- App.get('router').send('moveElsewhere', {
- dynamicSection: '42',
- anotherDynamicSection: 'Life'
- });
-
- Will transition the application's state to 'root.bRoute' and trigger an update of the URL to
- '#/a/route/42/Life'.
-
- The context argument will also be passed as the second argument to the `serialize` method call.
-
- ## Injection of Controller Singletons
- During application initialization Ember will detect properties of the application ending in 'Controller',
- create singleton instances of each class, and assign them as a properties on the router. The property name
- will be the UpperCamel name converted to lowerCamel format. These controller classes should be subclasses
- of Ember.ObjectController, Ember.ArrayController, Ember.Controller, or a custom Ember.Object that includes the
- Ember.ControllerMixin mixin.
-
- App = Ember.Application.create({
- FooController: Ember.Object.create(Ember.ControllerMixin),
- Router: Ember.Router.extend({ ... })
- });
-
- App.get('router.fooController'); // instance of App.FooController
-
- The controller singletons will have their `namespace` property set to the application and their `target`
- property set to the application's router singleton for easy integration with Ember's user event system.
- See 'Changing View Hierarchy in Response To State Change' and 'Responding to User-initiated Events'
-
- ## Responding to User-initiated Events
- Controller instances injected into the router at application initialization have their `target` property
- set to the application's router instance. These controllers will also be the default `context` for their
- associated views. Uses of the `{{action}}` helper will automatically target the application's router.
-
- Given the following application entered at the URL '#/':
-
- App = Ember.Application.create({
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/',
- anActionOnTheRouter: function(router, context) {
- router.transitionTo('anotherState', context);
- }
- })
- anotherState: Ember.Route.extend({
- route: '/differentUrl',
- connectOutlets: function(router, context) {
-
- }
- })
- })
- })
- });
- App.initialize();
-
- The following template:
-
- <script type="text/x-handlebars" data-template-name="aView">
- <h1><a {{action anActionOnTheRouter}}>{{title}}</a></h1>
- </script>
-
- Will delegate `click` events on the rendered `h1` to the application's router instance. In this case the
- `anActionOnTheRouter` method of the state at 'root.aRoute' will be called with the view's controller
- as the context argument. This context will be passed to the `connectOutlets` as its second argument.
-
- Different `context` can be supplied from within the `{{action}}` helper, allowing specific context passing
- between application states:
-
- <script type="text/x-handlebars" data-template-name="photos">
- {{#each photo in controller}}
- <h1><a {{action showPhoto photo}}>{{title}}</a></h1>
- {{/each}}
- </script>
-
- See Handlebars.helpers.action for additional usage examples.
-
-
- ## Changing View Hierarchy in Response To State Change
- Changes in application state that change the URL should be accompanied by associated changes in view
- hierarchy. This can be accomplished by calling 'connectOutlet' on the injected controller singletons from
- within the 'connectOutlets' event of an Ember.Route:
-
- App = Ember.Application.create({
- OneController: Ember.ObjectController.extend(),
- OneView: Ember.View.extend(),
-
- AnotherController: Ember.ObjectController.extend(),
- AnotherView: Ember.View.extend(),
-
- Router: Ember.Router.extend({
- root: Ember.Route.extend({
- aRoute: Ember.Route.extend({
- route: '/',
- connectOutlets: function(router, context) {
- router.get('oneController').connectOutlet('another');
- },
- })
- })
- })
- });
- App.initialize();
-
-
- This will detect the '{{outlet}}' portion of `oneController`'s view (an instance of `App.OneView`) and
- fill it with a rendered instance of `App.AnotherView` whose `context` will be the single instance of
- `App.AnotherController` stored on the router in the `anotherController` property.
-
- For more information about Outlets, see `Ember.Handlebars.helpers.outlet`. For additional information on
- the `connectOutlet` method, see `Ember.Controller.connectOutlet`. For more information on
- controller injections, see `Ember.Application#initialize()`. For additional information about view context,
- see `Ember.View`.
-
- @extends Ember.StateManager
-*/
-Ember.Router = Ember.StateManager.extend(
-/** @scope Ember.Router.prototype */ {
-
- /**
- @property {String}
- @default 'root'
- */
- initialState: 'root',
-
- /**
- The `Ember.Location` implementation to be used to manage the application
- URL state. The following values are supported:
-
- * 'hash': Uses URL fragment identifiers (like #/blog/1) for routing.
- * 'none': Does not read or set the browser URL, but still allows for
- routing to happen. Useful for testing.
-
- @type String
- @default 'hash'
- */
- location: 'hash',
-
- /**
- This is only used when a history location is used so that applications that
- don't live at the root of the domain can append paths to their root.
-
- @type String
- @default '/'
- */
-
- rootURL: '/',
-
- /**
- On router, transitionEvent should be called connectOutlets
-
- @property {String}
- @default 'connectOutlets'
- */
- transitionEvent: 'connectOutlets',
-
- transitionTo: function() {
- this.abortRoutingPromises();
- this._super.apply(this, arguments);
- },
-
- route: function(path) {
- this.abortRoutingPromises();
-
- set(this, 'isRouting', true);
-
- var routableState;
-
- try {
- path = path.replace(/^(?=[^\/])/, "/");
-
- this.send('navigateAway');
- this.send('unroutePath', path);
-
- routableState = get(this, 'currentState');
- while (routableState && !routableState.get('isRoutable')) {
- routableState = get(routableState, 'parentState');
- }
- var currentURL = routableState ? routableState.absoluteRoute(this) : '';
- var rest = path.substr(currentURL.length);
-
- this.send('routePath', rest);
- } finally {
- set(this, 'isRouting', false);
- }
-
- routableState = get(this, 'currentState');
- while (routableState && !routableState.get('isRoutable')) {
- routableState = get(routableState, 'parentState');
- }
-
- if (routableState) {
- routableState.updateRoute(this, get(this, 'location'));
- }
- },
-
- urlFor: function(path, hash) {
- var currentState = get(this, 'currentState') || this,
- state = this.findStateByPath(currentState, path);
-
- Ember.assert(Ember.String.fmt("Could not find route with path '%@'", [path]), !!state);
- Ember.assert("To get a URL for a state, it must have a `route` property.", !!get(state, 'routeMatcher'));
-
- var location = get(this, 'location'),
- absoluteRoute = state.absoluteRoute(this, hash);
-
- return location.formatURL(absoluteRoute);
- },
-
- urlForEvent: function(eventName) {
- var contexts = Array.prototype.slice.call(arguments, 1);
- var currentState = get(this, 'currentState');
- var targetStateName = currentState.lookupEventTransition(eventName);
-
- Ember.assert(Ember.String.fmt("You must specify a target state for event '%@' in order to link to it in the current state '%@'.", [eventName, get(currentState, 'path')]), !!targetStateName);
-
- var targetState = this.findStateByPath(currentState, targetStateName);
-
- Ember.assert("Your target state name " + targetStateName + " for event " + eventName + " did not resolve to a state", !!targetState);
-
- var hash = this.serializeRecursively(targetState, contexts, {});
-
- return this.urlFor(targetStateName, hash);
- },
-
- /** @private */
- serializeRecursively: function(state, contexts, hash) {
- var parentState,
- context = get(state, 'hasContext') ? contexts.pop() : null;
- merge(hash, state.serialize(this, context));
- parentState = state.get("parentState");
- if (parentState && parentState instanceof Ember.Route) {
- return this.serializeRecursively(parentState, contexts, hash);
- } else {
- return hash;
- }
- },
-
- abortRoutingPromises: function() {
- if (this._routingPromises) {
- this._routingPromises.abort();
- this._routingPromises = null;
- }
- },
-
- /**
- @private
- */
- handleStatePromises: function(states, complete) {
- this.abortRoutingPromises();
-
- this.set('isLocked', true);
-
- var manager = this;
-
- this._routingPromises = Ember._PromiseChain.create({
- promises: states.slice(),
-
- successCallback: function() {
- manager.set('isLocked', false);
- complete();
- },
-
- failureCallback: function() {
- throw "Unable to load object";
- },
-
- promiseSuccessCallback: function(item, args) {
- set(item, 'object', args[0]);
- },
-
- abortCallback: function() {
- manager.set('isLocked', false);
- }
- }).start();
- },
-
- /** @private */
- init: function() {
- this._super();
-
- var location = get(this, 'location'),
- rootURL = get(this, 'rootURL');
-
- if ('string' === typeof location) {
- set(this, 'location', Ember.Location.create({
- implementation: location,
- rootURL: rootURL
- }));
- }
- },
-
- /** @private */
- willDestroy: function() {
- get(this, 'location').destroy();
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Routing
-// Copyright: ©2012 Tilde Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-(function() {
-var get = Ember.get;
-
-Ember.StateManager.reopen(
-/** @scope Ember.StateManager.prototype */ {
-
- /**
- If the current state is a view state or the descendent of a view state,
- this property will be the view associated with it. If there is no
- view state active in this state manager, this value will be null.
-
- @type Ember.View
- */
- currentView: Ember.computed(function() {
- var currentState = get(this, 'currentState'),
- view;
-
- while (currentState) {
- // TODO: Remove this when view state is removed
- if (get(currentState, 'isViewState')) {
- view = get(currentState, 'view');
- if (view) { return view; }
- }
-
- currentState = get(currentState, 'parentState');
- }
-
- return null;
- }).property('currentState').cacheable()
-
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-/**
- @class
- @deprecated
-
- Ember.ViewState extends Ember.State to control the presence of a childView within a
- container based on the current state of the ViewState's StateManager.
-
- ## Interactions with Ember's View System.
- When combined with instances of `Ember.StateManager`, ViewState is designed to
- interact with Ember's view system to control which views are added to
- and removed from the DOM based on the manager's current state.
-
- By default, a StateManager will manage views inside the 'body' element. This can be
- customized by setting the `rootElement` property to a CSS selector of an existing
- HTML element you would prefer to receive view rendering.
-
-
- viewStates = Ember.StateManager.create({
- rootElement: '#some-other-element'
- })
-
- You can also specify a particular instance of `Ember.ContainerView` you would like to receive
- view rendering by setting the `rootView` property. You will be responsible for placing
- this element into the DOM yourself.
-
- aLayoutView = Ember.ContainerView.create()
-
- // make sure this view instance is added to the browser
- aLayoutView.appendTo('body')
-
- App.viewStates = Ember.StateManager.create({
- rootView: aLayoutView
- })
-
-
- Once you have an instance of StateManager controlling a view, you can provide states
- that are instances of `Ember.ViewState`. When the StateManager enters a state
- that is an instance of `Ember.ViewState` that `ViewState`'s `view` property will be
- instantiated and inserted into the StateManager's `rootView` or `rootElement`.
- When a state is exited, the `ViewState`'s view will be removed from the StateManager's
- view.
-
- ContactListView = Ember.View.extend({
- classNames: ['my-contacts-css-class'],
- template: Ember.Handlebars.compile('<h2>People</h2>')
- })
-
- PhotoListView = Ember.View.extend({
- classNames: ['my-photos-css-class'],
- template: Ember.Handlebars.compile('<h2>Photos</h2>')
- })
-
- viewStates = Ember.StateManager.create({
- showingPeople: Ember.ViewState.create({
- view: ContactListView
- }),
- showingPhotos: Ember.ViewState.create({
- view: PhotoListView
- })
- })
-
- viewStates.transitionTo('showingPeople')
-
- The above code will change the rendered HTML from
-
- <body></body>
-
- to
-
- <body>
- <div id="ember1" class="ember-view my-contacts-css-class">
- <h2>People</h2>
- </div>
- </body>
-
- Changing the current state via `transitionTo` from `showingPeople` to
- `showingPhotos` will remove the `showingPeople` view and add the `showingPhotos` view:
-
- viewStates.transitionTo('showingPhotos')
-
- will change the rendered HTML to
-
- <body>
- <div id="ember2" class="ember-view my-photos-css-class">
- <h2>Photos</h2>
- </div>
- </body>
-
-
- When entering nested `ViewState`s, each state's view will be draw into the the StateManager's
- `rootView` or `rootElement` as siblings.
-
-
- ContactListView = Ember.View.extend({
- classNames: ['my-contacts-css-class'],
- template: Ember.Handlebars.compile('<h2>People</h2>')
- })
-
- EditAContactView = Ember.View.extend({
- classNames: ['editing-a-contact-css-class'],
- template: Ember.Handlebars.compile('Editing...')
- })
-
- viewStates = Ember.StateManager.create({
- showingPeople: Ember.ViewState.create({
- view: ContactListView,
-
- withEditingPanel: Ember.ViewState.create({
- view: EditAContactView
- })
- })
- })
-
-
- viewStates.transitionTo('showingPeople.withEditingPanel')
-
-
- Will result in the following rendered HTML:
-
- <body>
- <div id="ember2" class="ember-view my-contacts-css-class">
- <h2>People</h2>
- </div>
-
- <div id="ember2" class="ember-view editing-a-contact-css-class">
- Editing...
- </div>
- </body>
-
-
- ViewState views are added and removed from their StateManager's view via their
- `enter` and `exit` methods. If you need to override these methods, be sure to call
- `_super` to maintain the adding and removing behavior:
-
- viewStates = Ember.StateManager.create({
- aState: Ember.ViewState.create({
- view: Ember.View.extend({}),
- enter: function(manager){
- // calling _super ensures this view will be
- // properly inserted
- this._super(manager);
-
- // now you can do other things
- }
- })
- })
-
- ## Managing Multiple Sections of A Page With States
- Multiple StateManagers can be combined to control multiple areas of an application's rendered views.
- Given the following HTML body:
-
- <body>
- <div id='sidebar-nav'>
- </div>
- <div id='content-area'>
- </div>
- </body>
-
- You could separately manage view state for each section with two StateManagers
-
- navigationStates = Ember.StateManager.create({
- rootElement: '#sidebar-nav',
- userAuthenticated: Em.ViewState.create({
- view: Ember.View.extend({})
- }),
- userNotAuthenticated: Em.ViewState.create({
- view: Ember.View.extend({})
- })
- })
-
- contentStates = Ember.StateManager.create({
- rootElement: '#content-area',
- books: Em.ViewState.create({
- view: Ember.View.extend({})
- }),
- music: Em.ViewState.create({
- view: Ember.View.extend({})
- })
- })
-
-
- If you prefer to start with an empty body and manage state programmatically you
- can also take advantage of StateManager's `rootView` property and the ability of
- `Ember.ContainerView`s to manually manage their child views.
-
-
- dashboard = Ember.ContainerView.create({
- childViews: ['navigationAreaView', 'contentAreaView'],
- navigationAreaView: Ember.ContainerView.create({}),
- contentAreaView: Ember.ContainerView.create({})
- })
-
- navigationStates = Ember.StateManager.create({
- rootView: dashboard.get('navigationAreaView'),
- userAuthenticated: Em.ViewState.create({
- view: Ember.View.extend({})
- }),
- userNotAuthenticated: Em.ViewState.create({
- view: Ember.View.extend({})
- })
- })
-
- contentStates = Ember.StateManager.create({
- rootView: dashboard.get('contentAreaView'),
- books: Em.ViewState.create({
- view: Ember.View.extend({})
- }),
- music: Em.ViewState.create({
- view: Ember.View.extend({})
- })
- })
-
- dashboard.appendTo('body')
-
- ## User Manipulation of State via `{{action}}` Helpers
- The Handlebars `{{action}}` helper is StateManager-aware and will use StateManager action sending
- to connect user interaction to action-based state transitions.
-
- Given the following body and handlebars template
-
- <body>
- <script type='text/x-handlebars'>
- <a href="#" {{action "anAction" target="App.appStates"}}> Go </a>
- </script>
- </body>
-
- And application code
-
- App = Ember.Application.create()
- App.appStates = Ember.StateManager.create({
- initialState: 'aState',
- aState: Ember.State.create({
- anAction: function(manager, context){}
- }),
- bState: Ember.State.create({})
- })
-
- A user initiated click or touch event on "Go" will trigger the 'anAction' method of
- `App.appStates.aState` with `App.appStates` as the first argument and a
- `jQuery.Event` object as the second object. The `jQuery.Event` will include a property
- `view` that references the `Ember.View` object that was interacted with.
-
-**/
-Ember.ViewState = Ember.State.extend(
-/** @scope Ember.ViewState.prototype */ {
- isViewState: true,
-
- init: function() {
- Ember.deprecate("Ember.ViewState is deprecated and will be removed from future releases. Consider using the outlet pattern to display nested views instead. For more information, see http://emberjs.com/guides/outlets/.");
- return this._super();
- },
-
- enter: function(stateManager) {
- var view = get(this, 'view'), root, childViews;
-
- if (view) {
- if (Ember.View.detect(view)) {
- view = view.create();
- set(this, 'view', view);
- }
-
- Ember.assert('view must be an Ember.View', view instanceof Ember.View);
-
- root = stateManager.get('rootView');
-
- if (root) {
- childViews = get(root, 'childViews');
- childViews.pushObject(view);
- } else {
- root = stateManager.get('rootElement') || 'body';
- view.appendTo(root);
- }
- }
- },
-
- exit: function(stateManager) {
- var view = get(this, 'view');
-
- if (view) {
- // If the view has a parent view, then it is
- // part of a view hierarchy and should be removed
- // from its parent.
- if (get(view, 'parentView')) {
- view.removeFromParent();
- } else {
-
- // Otherwise, the view is a "root view" and
- // was appended directly to the DOM.
- view.remove();
- }
- }
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Statecharts
-// Copyright: ©2011 Living Social Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-(function() {
-// ==========================================================================
-// Project: metamorph
-// Copyright: ©2011 My Company Inc. All rights reserved.
-// ==========================================================================
-
-(function(window) {
-
- var K = function(){},
- guid = 0,
- document = window.document,
-
- // Feature-detect the W3C range API, the extended check is for IE9 which only partially supports ranges
- supportsRange = ('createRange' in document) && (typeof Range !== 'undefined') && Range.prototype.createContextualFragment,
-
- // Internet Explorer prior to 9 does not allow setting innerHTML if the first element
- // is a "zero-scope" element. This problem can be worked around by making
- // the first node an invisible text node. We, like Modernizr, use &shy;
- needsShy = (function(){
- var testEl = document.createElement('div');
- testEl.innerHTML = "<div></div>";
- testEl.firstChild.innerHTML = "<script></script>";
- return testEl.firstChild.innerHTML === '';
- })();
-
- // Constructor that supports either Metamorph('foo') or new
- // Metamorph('foo');
- //
- // Takes a string of HTML as the argument.
-
- var Metamorph = function(html) {
- var self;
-
- if (this instanceof Metamorph) {
- self = this;
- } else {
- self = new K();
- }
-
- self.innerHTML = html;
- var myGuid = 'metamorph-'+(guid++);
- self.start = myGuid + '-start';
- self.end = myGuid + '-end';
-
- return self;
- };
-
- K.prototype = Metamorph.prototype;
-
- var rangeFor, htmlFunc, removeFunc, outerHTMLFunc, appendToFunc, afterFunc, prependFunc, startTagFunc, endTagFunc;
-
- outerHTMLFunc = function() {
- return this.startTag() + this.innerHTML + this.endTag();
- };
-
- startTagFunc = function() {
- return "<script id='" + this.start + "' type='text/x-placeholder'></script>";
- };
-
- endTagFunc = function() {
- return "<script id='" + this.end + "' type='text/x-placeholder'></script>";
- };
-
- // If we have the W3C range API, this process is relatively straight forward.
- if (supportsRange) {
-
- // Get a range for the current morph. Optionally include the starting and
- // ending placeholders.
- rangeFor = function(morph, outerToo) {
- var range = document.createRange();
- var before = document.getElementById(morph.start);
- var after = document.getElementById(morph.end);
-
- if (outerToo) {
- range.setStartBefore(before);
- range.setEndAfter(after);
- } else {
- range.setStartAfter(before);
- range.setEndBefore(after);
- }
-
- return range;
- };
-
- htmlFunc = function(html, outerToo) {
- // get a range for the current metamorph object
- var range = rangeFor(this, outerToo);
-
- // delete the contents of the range, which will be the
- // nodes between the starting and ending placeholder.
- range.deleteContents();
-
- // create a new document fragment for the HTML
- var fragment = range.createContextualFragment(html);
-
- // insert the fragment into the range
- range.insertNode(fragment);
- };
-
- removeFunc = function() {
- // get a range for the current metamorph object including
- // the starting and ending placeholders.
- var range = rangeFor(this, true);
-
- // delete the entire range.
- range.deleteContents();
- };
-
- appendToFunc = function(node) {
- var range = document.createRange();
- range.setStart(node);
- range.collapse(false);
- var frag = range.createContextualFragment(this.outerHTML());
- node.appendChild(frag);
- };
-
- afterFunc = function(html) {
- var range = document.createRange();
- var after = document.getElementById(this.end);
-
- range.setStartAfter(after);
- range.setEndAfter(after);
-
- var fragment = range.createContextualFragment(html);
- range.insertNode(fragment);
- };
-
- prependFunc = function(html) {
- var range = document.createRange();
- var start = document.getElementById(this.start);
-
- range.setStartAfter(start);
- range.setEndAfter(start);
-
- var fragment = range.createContextualFragment(html);
- range.insertNode(fragment);
- };
-
- } else {
- /**
- * This code is mostly taken from jQuery, with one exception. In jQuery's case, we
- * have some HTML and we need to figure out how to convert it into some nodes.
- *
- * In this case, jQuery needs to scan the HTML looking for an opening tag and use
- * that as the key for the wrap map. In our case, we know the parent node, and
- * can use its type as the key for the wrap map.
- **/
- var wrapMap = {
- select: [ 1, "<select multiple='multiple'>", "</select>" ],
- fieldset: [ 1, "<fieldset>", "</fieldset>" ],
- table: [ 1, "<table>", "</table>" ],
- tbody: [ 2, "<table><tbody>", "</tbody></table>" ],
- tr: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
- colgroup: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- map: [ 1, "<map>", "</map>" ],
- _default: [ 0, "", "" ]
- };
-
- /**
- * Given a parent node and some HTML, generate a set of nodes. Return the first
- * node, which will allow us to traverse the rest using nextSibling.
- *
- * We need to do this because innerHTML in IE does not really parse the nodes.
- **/
- var firstNodeFor = function(parentNode, html) {
- var arr = wrapMap[parentNode.tagName.toLowerCase()] || wrapMap._default;
- var depth = arr[0], start = arr[1], end = arr[2];
-
- if (needsShy) { html = '&shy;'+html; }
-
- var element = document.createElement('div');
- element.innerHTML = start + html + end;
-
- for (var i=0; i<=depth; i++) {
- element = element.firstChild;
- }
-
- // Look for &shy; to remove it.
- if (needsShy) {
- var shyElement = element;
-
- // Sometimes we get nameless elements with the shy inside
- while (shyElement.nodeType === 1 && !shyElement.nodeName) {
- shyElement = shyElement.firstChild;
- }
-
- // At this point it's the actual unicode character.
- if (shyElement.nodeType === 3 && shyElement.nodeValue.charAt(0) === "\u00AD") {
- shyElement.nodeValue = shyElement.nodeValue.slice(1);
- }
- }
-
- return element;
- };
-
- /**
- * In some cases, Internet Explorer can create an anonymous node in
- * the hierarchy with no tagName. You can create this scenario via:
- *
- * div = document.createElement("div");
- * div.innerHTML = "<table>&shy<script></script><tr><td>hi</td></tr></table>";
- * div.firstChild.firstChild.tagName //=> ""
- *
- * If our script markers are inside such a node, we need to find that
- * node and use *it* as the marker.
- **/
- var realNode = function(start) {
- while (start.parentNode.tagName === "") {
- start = start.parentNode;
- }
-
- return start;
- };
-
- /**
- * When automatically adding a tbody, Internet Explorer inserts the
- * tbody immediately before the first <tr>. Other browsers create it
- * before the first node, no matter what.
- *
- * This means the the following code:
- *
- * div = document.createElement("div");
- * div.innerHTML = "<table><script id='first'></script><tr><td>hi</td></tr><script id='last'></script></table>
- *
- * Generates the following DOM in IE:
- *
- * + div
- * + table
- * - script id='first'
- * + tbody
- * + tr
- * + td
- * - "hi"
- * - script id='last'
- *
- * Which means that the two script tags, even though they were
- * inserted at the same point in the hierarchy in the original
- * HTML, now have different parents.
- *
- * This code reparents the first script tag by making it the tbody's
- * first child.
- **/
- var fixParentage = function(start, end) {
- if (start.parentNode !== end.parentNode) {
- end.parentNode.insertBefore(start, end.parentNode.firstChild);
- }
- };
-
- htmlFunc = function(html, outerToo) {
- // get the real starting node. see realNode for details.
- var start = realNode(document.getElementById(this.start));
- var end = document.getElementById(this.end);
- var parentNode = end.parentNode;
- var node, nextSibling, last;
-
- // make sure that the start and end nodes share the same
- // parent. If not, fix it.
- fixParentage(start, end);
-
- // remove all of the nodes after the starting placeholder and
- // before the ending placeholder.
- node = start.nextSibling;
- while (node) {
- nextSibling = node.nextSibling;
- last = node === end;
-
- // if this is the last node, and we want to remove it as well,
- // set the `end` node to the next sibling. This is because
- // for the rest of the function, we insert the new nodes
- // before the end (note that insertBefore(node, null) is
- // the same as appendChild(node)).
- //
- // if we do not want to remove it, just break.
- if (last) {
- if (outerToo) { end = node.nextSibling; } else { break; }
- }
-
- node.parentNode.removeChild(node);
-
- // if this is the last node and we didn't break before
- // (because we wanted to remove the outer nodes), break
- // now.
- if (last) { break; }
-
- node = nextSibling;
- }
-
- // get the first node for the HTML string, even in cases like
- // tables and lists where a simple innerHTML on a div would
- // swallow some of the content.
- node = firstNodeFor(start.parentNode, html);
-
- // copy the nodes for the HTML between the starting and ending
- // placeholder.
- while (node) {
- nextSibling = node.nextSibling;
- parentNode.insertBefore(node, end);
- node = nextSibling;
- }
- };
-
- // remove the nodes in the DOM representing this metamorph.
- //
- // this includes the starting and ending placeholders.
- removeFunc = function() {
- var start = realNode(document.getElementById(this.start));
- var end = document.getElementById(this.end);
-
- this.html('');
- start.parentNode.removeChild(start);
- end.parentNode.removeChild(end);
- };
-
- appendToFunc = function(parentNode) {
- var node = firstNodeFor(parentNode, this.outerHTML());
-
- while (node) {
- nextSibling = node.nextSibling;
- parentNode.appendChild(node);
- node = nextSibling;
- }
- };
-
- afterFunc = function(html) {
- // get the real starting node. see realNode for details.
- var end = document.getElementById(this.end);
- var insertBefore = end.nextSibling;
- var parentNode = end.parentNode;
- var nextSibling;
- var node;
-
- // get the first node for the HTML string, even in cases like
- // tables and lists where a simple innerHTML on a div would
- // swallow some of the content.
- node = firstNodeFor(parentNode, html);
-
- // copy the nodes for the HTML between the starting and ending
- // placeholder.
- while (node) {
- nextSibling = node.nextSibling;
- parentNode.insertBefore(node, insertBefore);
- node = nextSibling;
- }
- };
-
- prependFunc = function(html) {
- var start = document.getElementById(this.start);
- var parentNode = start.parentNode;
- var nextSibling;
- var node;
-
- node = firstNodeFor(parentNode, html);
- var insertBefore = start.nextSibling;
-
- while (node) {
- nextSibling = node.nextSibling;
- parentNode.insertBefore(node, insertBefore);
- node = nextSibling;
- }
- }
- }
-
- Metamorph.prototype.html = function(html) {
- this.checkRemoved();
- if (html === undefined) { return this.innerHTML; }
-
- htmlFunc.call(this, html);
-
- this.innerHTML = html;
- };
-
- Metamorph.prototype.replaceWith = function(html) {
- this.checkRemoved();
- htmlFunc.call(this, html, true);
- };
-
- Metamorph.prototype.remove = removeFunc;
- Metamorph.prototype.outerHTML = outerHTMLFunc;
- Metamorph.prototype.appendTo = appendToFunc;
- Metamorph.prototype.after = afterFunc;
- Metamorph.prototype.prepend = prependFunc;
- Metamorph.prototype.startTag = startTagFunc;
- Metamorph.prototype.endTag = endTagFunc;
-
- Metamorph.prototype.isRemoved = function() {
- var before = document.getElementById(this.start);
- var after = document.getElementById(this.end);
-
- return !before || !after;
- };
-
- Metamorph.prototype.checkRemoved = function() {
- if (this.isRemoved()) {
- throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.");
- }
- };
-
- window.Metamorph = Metamorph;
-})(this);
-
-
-})();
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Handlebars */
-var objectCreate = Ember.create;
-
-/**
- @namespace
- @name Handlebars
- @private
-*/
-
-/**
- @namespace
- @name Handlebars.helpers
- @description Helpers for Handlebars templates
-*/
-
-Ember.assert("Ember Handlebars requires Handlebars 1.0.beta.5 or greater", window.Handlebars && window.Handlebars.VERSION.match(/^1\.0\.beta\.[56789]$|^1\.0\.rc\.[123456789]+/));
-
-/**
- @class
-
- Prepares the Handlebars templating library for use inside Ember's view
- system.
-
- The Ember.Handlebars object is the standard Handlebars library, extended to use
- Ember's get() method instead of direct property access, which allows
- computed properties to be used inside templates.
-
- To create an Ember.Handlebars template, call Ember.Handlebars.compile(). This will
- return a function that can be used by Ember.View for rendering.
-*/
-Ember.Handlebars = objectCreate(Handlebars);
-
-Ember.Handlebars.helpers = objectCreate(Handlebars.helpers);
-
-/**
- Override the the opcode compiler and JavaScript compiler for Handlebars.
- @private
-*/
-Ember.Handlebars.Compiler = function() {};
-Ember.Handlebars.Compiler.prototype = objectCreate(Handlebars.Compiler.prototype);
-Ember.Handlebars.Compiler.prototype.compiler = Ember.Handlebars.Compiler;
-
-/** @private */
-Ember.Handlebars.JavaScriptCompiler = function() {};
-Ember.Handlebars.JavaScriptCompiler.prototype = objectCreate(Handlebars.JavaScriptCompiler.prototype);
-Ember.Handlebars.JavaScriptCompiler.prototype.compiler = Ember.Handlebars.JavaScriptCompiler;
-Ember.Handlebars.JavaScriptCompiler.prototype.namespace = "Ember.Handlebars";
-
-
-Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer = function() {
- return "''";
-};
-
-/**
- Override the default buffer for Ember Handlebars. By default, Handlebars creates
- an empty String at the beginning of each invocation and appends to it. Ember's
- Handlebars overrides this to append to a single shared buffer.
-
- @private
-*/
-Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer = function(string) {
- return "data.buffer.push("+string+");";
-};
-
-/**
- Rewrite simple mustaches from {{foo}} to {{bind "foo"}}. This means that all simple
- mustaches in Ember's Handlebars will also set up an observer to keep the DOM
- up to date when the underlying property changes.
-
- @private
-*/
-Ember.Handlebars.Compiler.prototype.mustache = function(mustache) {
- if (mustache.params.length || mustache.hash) {
- return Handlebars.Compiler.prototype.mustache.call(this, mustache);
- } else {
- var id = new Handlebars.AST.IdNode(['_triageMustache']);
-
- // Update the mustache node to include a hash value indicating whether the original node
- // was escaped. This will allow us to properly escape values when the underlying value
- // changes and we need to re-render the value.
- if(!mustache.escaped) {
- mustache.hash = mustache.hash || new Handlebars.AST.HashNode([]);
- mustache.hash.pairs.push(["unescaped", new Handlebars.AST.StringNode("true")]);
- }
- mustache = new Handlebars.AST.MustacheNode([id].concat([mustache.id]), mustache.hash, !mustache.escaped);
- return Handlebars.Compiler.prototype.mustache.call(this, mustache);
- }
-};
-
-/**
- Used for precompilation of Ember Handlebars templates. This will not be used during normal
- app execution.
-
- @param {String} string The template to precompile
-*/
-Ember.Handlebars.precompile = function(string) {
- var ast = Handlebars.parse(string);
-
- var options = {
- knownHelpers: {
- action: true,
- unbound: true,
- bindAttr: true,
- template: true,
- view: true,
- _triageMustache: true
- },
- data: true,
- stringParams: true
- };
-
- var environment = new Ember.Handlebars.Compiler().compile(ast, options);
- return new Ember.Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
-};
-
-/**
- The entry point for Ember Handlebars. This replaces the default Handlebars.compile and turns on
- template-local data and String parameters.
-
- @param {String} string The template to compile
-*/
-Ember.Handlebars.compile = function(string) {
- var ast = Handlebars.parse(string);
- var options = { data: true, stringParams: true };
- var environment = new Ember.Handlebars.Compiler().compile(ast, options);
- var templateSpec = new Ember.Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
-
- return Handlebars.template(templateSpec);
-};
-
-/**
- If a path starts with a reserved keyword, returns the root
- that should be used.
-
- @private
-*/
-var normalizePath = Ember.Handlebars.normalizePath = function(root, path, data) {
- var keywords = (data && data.keywords) || {},
- keyword, isKeyword;
-
- // Get the first segment of the path. For example, if the
- // path is "foo.bar.baz", returns "foo".
- keyword = path.split('.', 1)[0];
-
- // Test to see if the first path is a keyword that has been
- // passed along in the view's data hash. If so, we will treat
- // that object as the new root.
- if (keywords.hasOwnProperty(keyword)) {
- // Look up the value in the template's data hash.
- root = keywords[keyword];
- isKeyword = true;
-
- // Handle cases where the entire path is the reserved
- // word. In that case, return the object itself.
- if (path === keyword) {
- path = '';
- } else {
- // Strip the keyword from the path and look up
- // the remainder from the newly found root.
- path = path.substr(keyword.length+1);
- }
- }
-
- return { root: root, path: path, isKeyword: isKeyword };
-};
-/**
- Lookup both on root and on window. If the path starts with
- a keyword, the corresponding object will be looked up in the
- template's data hash and used to resolve the path.
-
- @param {Object} root The object to look up the property on
- @param {String} path The path to be lookedup
- @param {Object} options The template's option hash
-*/
-
-Ember.Handlebars.getPath = function(root, path, options) {
- var data = options && options.data,
- normalizedPath = normalizePath(root, path, data),
- value;
-
- // In cases where the path begins with a keyword, change the
- // root to the value represented by that keyword, and ensure
- // the path is relative to it.
- root = normalizedPath.root;
- path = normalizedPath.path;
-
- value = Ember.get(root, path);
-
- if (value === undefined && root !== window && Ember.isGlobalPath(path)) {
- value = Ember.get(window, path);
- }
- return value;
-};
-
-/**
- Registers a helper in Handlebars that will be called if no property with the
- given name can be found on the current context object, and no helper with
- that name is registered.
-
- This throws an exception with a more helpful error message so the user can
- track down where the problem is happening.
-
- @name Handlebars.helpers.helperMissing
- @param {String} path
- @param {Hash} options
-*/
-Ember.Handlebars.registerHelper('helperMissing', function(path, options) {
- var error, view = "";
-
- error = "%@ Handlebars error: Could not find property '%@' on object %@.";
- if (options.data){
- view = options.data.view;
- }
- throw new Ember.Error(Ember.String.fmt(error, [view, path, this]));
-});
-
-
-})();
-
-
-
-(function() {
-
-Ember.String.htmlSafe = function(str) {
- return new Handlebars.SafeString(str);
-};
-
-var htmlSafe = Ember.String.htmlSafe;
-
-if (Ember.EXTEND_PROTOTYPES) {
-
- /**
- @see Ember.String.htmlSafe
- */
- String.prototype.htmlSafe = function() {
- return htmlSafe(this);
- };
-
-}
-
-})();
-
-
-
-(function() {
-/*jshint newcap:false*/
-var set = Ember.set, get = Ember.get;
-
-var DOMManager = {
- remove: function(view) {
- var morph = view.morph;
- if (morph.isRemoved()) { return; }
- set(view, 'element', null);
- view._lastInsert = null;
- morph.remove();
- },
-
- prepend: function(view, childView) {
- childView._insertElementLater(function() {
- var morph = view.morph;
- morph.prepend(childView.outerHTML);
- childView.outerHTML = null;
- });
- },
-
- after: function(view, nextView) {
- nextView._insertElementLater(function() {
- var morph = view.morph;
- morph.after(nextView.outerHTML);
- nextView.outerHTML = null;
- });
- },
-
- replace: function(view) {
- var morph = view.morph;
-
- view.transitionTo('preRender');
- view.clearRenderedChildren();
- var buffer = view.renderToBuffer();
-
- Ember.run.schedule('render', this, function() {
- if (get(view, 'isDestroyed')) { return; }
- view.invalidateRecursively('element');
- view._notifyWillInsertElement();
- morph.replaceWith(buffer.string());
- view.transitionTo('inDOM');
- view._notifyDidInsertElement();
- });
- },
-
- empty: function(view) {
- view.morph.html("");
- }
-};
-
-// The `morph` and `outerHTML` properties are internal only
-// and not observable.
-
-Ember._Metamorph = Ember.Mixin.create({
- isVirtual: true,
- tagName: '',
-
- init: function() {
- this._super();
- this.morph = Metamorph();
- },
-
- beforeRender: function(buffer) {
- buffer.push(this.morph.startTag());
- },
-
- afterRender: function(buffer) {
- buffer.push(this.morph.endTag());
- },
-
- createElement: function() {
- var buffer = this.renderToBuffer();
- this.outerHTML = buffer.string();
- this.clearBuffer();
- },
-
- domManager: DOMManager
-});
-
-Ember._MetamorphView = Ember.View.extend(Ember._Metamorph);
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Handlebars */
-
-var get = Ember.get, set = Ember.set, getPath = Ember.Handlebars.getPath;
-/**
- @ignore
- @private
- @class
-
- Ember._HandlebarsBoundView is a private view created by the Handlebars `{{bind}}`
- helpers that is used to keep track of bound properties.
-
- Every time a property is bound using a `{{mustache}}`, an anonymous subclass
- of Ember._HandlebarsBoundView is created with the appropriate sub-template and
- context set up. When the associated property changes, just the template for
- this view will re-render.
-*/
-Ember._HandlebarsBoundView = Ember._MetamorphView.extend({
-/** @scope Ember._HandlebarsBoundView.prototype */
-
- /**
- The function used to determine if the `displayTemplate` or
- `inverseTemplate` should be rendered. This should be a function that takes
- a value and returns a Boolean.
-
- @type Function
- @default null
- */
- shouldDisplayFunc: null,
-
- /**
- Whether the template rendered by this view gets passed the context object
- of its parent template, or gets passed the value of retrieving `path`
- from the `pathRoot`.
-
- For example, this is true when using the `{{#if}}` helper, because the
- template inside the helper should look up properties relative to the same
- object as outside the block. This would be false when used with `{{#with
- foo}}` because the template should receive the object found by evaluating
- `foo`.
-
- @type Boolean
- @default false
- */
- preserveContext: false,
-
- /**
- If `preserveContext` is true, this is the object that will be used
- to render the template.
-
- @type Object
- */
- previousContext: null,
-
- /**
- The template to render when `shouldDisplayFunc` evaluates to true.
-
- @type Function
- @default null
- */
- displayTemplate: null,
-
- /**
- The template to render when `shouldDisplayFunc` evaluates to false.
-
- @type Function
- @default null
- */
- inverseTemplate: null,
-
-
- /**
- The path to look up on `pathRoot` that is passed to
- `shouldDisplayFunc` to determine which template to render.
-
- In addition, if `preserveContext` is false, the object at this path will
- be passed to the template when rendering.
-
- @type String
- @default null
- */
- path: null,
-
- /**
- The object from which the `path` will be looked up. Sometimes this is the
- same as the `previousContext`, but in cases where this view has been generated
- for paths that start with a keyword such as `view` or `controller`, the
- path root will be that resolved object.
-
- @type Object
- */
- pathRoot: null,
-
- normalizedValue: Ember.computed(function() {
- var path = get(this, 'path'),
- pathRoot = get(this, 'pathRoot'),
- valueNormalizer = get(this, 'valueNormalizerFunc'),
- result, templateData;
-
- // Use the pathRoot as the result if no path is provided. This
- // happens if the path is `this`, which gets normalized into
- // a `pathRoot` of the current Handlebars context and a path
- // of `''`.
- if (path === '') {
- result = pathRoot;
- } else {
- templateData = get(this, 'templateData');
- result = getPath(pathRoot, path, { data: templateData });
- }
-
- return valueNormalizer ? valueNormalizer(result) : result;
- }).property('path', 'pathRoot', 'valueNormalizerFunc').volatile(),
-
- rerenderIfNeeded: function() {
- if (!get(this, 'isDestroyed') && get(this, 'normalizedValue') !== this._lastNormalizedValue) {
- this.rerender();
- }
- },
-
- /**
- Determines which template to invoke, sets up the correct state based on
- that logic, then invokes the default Ember.View `render` implementation.
-
- This method will first look up the `path` key on `pathRoot`,
- then pass that value to the `shouldDisplayFunc` function. If that returns
- true, the `displayTemplate` function will be rendered to DOM. Otherwise,
- `inverseTemplate`, if specified, will be rendered.
-
- For example, if this Ember._HandlebarsBoundView represented the {{#with foo}}
- helper, it would look up the `foo` property of its context, and
- `shouldDisplayFunc` would always return true. The object found by looking
- up `foo` would be passed to `displayTemplate`.
-
- @param {Ember.RenderBuffer} buffer
- */
- render: function(buffer) {
- // If not invoked via a triple-mustache ({{{foo}}}), escape
- // the content of the template.
- var escape = get(this, 'isEscaped');
-
- var shouldDisplay = get(this, 'shouldDisplayFunc'),
- preserveContext = get(this, 'preserveContext'),
- context = get(this, 'previousContext');
-
- var inverseTemplate = get(this, 'inverseTemplate'),
- displayTemplate = get(this, 'displayTemplate');
-
- var result = get(this, 'normalizedValue');
- this._lastNormalizedValue = result;
-
- // First, test the conditional to see if we should
- // render the template or not.
- if (shouldDisplay(result)) {
- set(this, 'template', displayTemplate);
-
- // If we are preserving the context (for example, if this
- // is an #if block, call the template with the same object.
- if (preserveContext) {
- set(this, '_context', context);
- } else {
- // Otherwise, determine if this is a block bind or not.
- // If so, pass the specified object to the template
- if (displayTemplate) {
- set(this, '_context', result);
- } else {
- // This is not a bind block, just push the result of the
- // expression to the render context and return.
- if (result === null || result === undefined) {
- result = "";
- } else if (!(result instanceof Handlebars.SafeString)) {
- result = String(result);
- }
-
- if (escape) { result = Handlebars.Utils.escapeExpression(result); }
- buffer.push(result);
- return;
- }
- }
- } else if (inverseTemplate) {
- set(this, 'template', inverseTemplate);
-
- if (preserveContext) {
- set(this, '_context', context);
- } else {
- set(this, '_context', result);
- }
- } else {
- set(this, 'template', function() { return ''; });
- }
-
- return this._super(buffer);
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
-var getPath = Ember.Handlebars.getPath, normalizePath = Ember.Handlebars.normalizePath;
-var forEach = Ember.ArrayPolyfills.forEach;
-
-var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers;
-
-// Binds a property into the DOM. This will create a hook in DOM that the
-// KVO system will look for and update if the property changes.
-/** @private */
-function bind(property, options, preserveContext, shouldDisplay, valueNormalizer) {
- var data = options.data,
- fn = options.fn,
- inverse = options.inverse,
- view = data.view,
- currentContext = this,
- pathRoot, path, normalized;
-
- normalized = normalizePath(currentContext, property, data);
-
- pathRoot = normalized.root;
- path = normalized.path;
-
- // Set up observers for observable objects
- if ('object' === typeof this) {
- // Create the view that will wrap the output of this template/property
- // and add it to the nearest view's childViews array.
- // See the documentation of Ember._HandlebarsBoundView for more.
- var bindView = view.createChildView(Ember._HandlebarsBoundView, {
- preserveContext: preserveContext,
- shouldDisplayFunc: shouldDisplay,
- valueNormalizerFunc: valueNormalizer,
- displayTemplate: fn,
- inverseTemplate: inverse,
- path: path,
- pathRoot: pathRoot,
- previousContext: currentContext,
- isEscaped: !options.hash.unescaped,
- templateData: options.data
- });
-
- view.appendChild(bindView);
-
- /** @private */
- var observer = function() {
- Ember.run.once(bindView, 'rerenderIfNeeded');
- };
-
- // Observes the given property on the context and
- // tells the Ember._HandlebarsBoundView to re-render. If property
- // is an empty string, we are printing the current context
- // object ({{this}}) so updating it is not our responsibility.
- if (path !== '') {
- Ember.addObserver(pathRoot, path, observer);
- }
- } else {
- // The object is not observable, so just render it out and
- // be done with it.
- data.buffer.push(getPath(pathRoot, path, options));
- }
-}
-
-/**
- '_triageMustache' is used internally select between a binding and helper for
- the given context. Until this point, it would be hard to determine if the
- mustache is a property reference or a regular helper reference. This triage
- helper resolves that.
-
- This would not be typically invoked by directly.
-
- @private
- @name Handlebars.helpers._triageMustache
- @param {String} property Property/helperID to triage
- @param {Function} fn Context to provide for rendering
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('_triageMustache', function(property, fn) {
- Ember.assert("You cannot pass more than one argument to the _triageMustache helper", arguments.length <= 2);
- if (helpers[property]) {
- return helpers[property].call(this, fn);
- }
- else {
- return helpers.bind.apply(this, arguments);
- }
-});
-
-/**
- `bind` can be used to display a value, then update that value if it
- changes. For example, if you wanted to print the `title` property of
- `content`:
-
- {{bind "content.title"}}
-
- This will return the `title` property as a string, then create a new
- observer at the specified path. If it changes, it will update the value in
- DOM. Note that if you need to support IE7 and IE8 you must modify the
- model objects properties using Ember.get() and Ember.set() for this to work as
- it relies on Ember's KVO system. For all other browsers this will be handled
- for you automatically.
-
- @private
- @name Handlebars.helpers.bind
- @param {String} property Property to bind
- @param {Function} fn Context to provide for rendering
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('bind', function(property, fn) {
- Ember.assert("You cannot pass more than one argument to the bind helper", arguments.length <= 2);
-
- var context = (fn.contexts && fn.contexts[0]) || this;
-
- return bind.call(context, property, fn, false, function(result) {
- return !Ember.none(result);
- });
-});
-
-/**
- Use the `boundIf` helper to create a conditional that re-evaluates
- whenever the bound value changes.
-
- {{#boundIf "content.shouldDisplayTitle"}}
- {{content.title}}
- {{/boundIf}}
-
- @private
- @name Handlebars.helpers.boundIf
- @param {String} property Property to bind
- @param {Function} fn Context to provide for rendering
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('boundIf', function(property, fn) {
- var context = (fn.contexts && fn.contexts[0]) || this;
- var func = function(result) {
- if (Ember.typeOf(result) === 'array') {
- return get(result, 'length') !== 0;
- } else {
- return !!result;
- }
- };
-
- return bind.call(context, property, fn, true, func, func);
-});
-
-/**
- @name Handlebars.helpers.with
- @param {Function} context
- @param {Hash} options
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('with', function(context, options) {
- if (arguments.length === 4) {
- var keywordName, path, rootPath, normalized;
-
- Ember.assert("If you pass more than one argument to the with helper, it must be in the form #with foo as bar", arguments[1] === "as");
- options = arguments[3];
- keywordName = arguments[2];
- path = arguments[0];
-
- Ember.assert("You must pass a block to the with helper", options.fn && options.fn !== Handlebars.VM.noop);
-
- if (Ember.isGlobalPath(path)) {
- Ember.bind(options.data.keywords, keywordName, path);
- } else {
- normalized = normalizePath(this, path, options.data);
- path = normalized.path;
- rootPath = normalized.root;
-
- // This is a workaround for the fact that you cannot bind separate objects
- // together. When we implement that functionality, we should use it here.
- var contextKey = Ember.$.expando + Ember.guidFor(rootPath);
- options.data.keywords[contextKey] = rootPath;
-
- // if the path is '' ("this"), just bind directly to the current context
- var contextPath = path ? contextKey + '.' + path : contextKey;
- Ember.bind(options.data.keywords, keywordName, contextPath);
- }
-
- return bind.call(this, path, options.fn, true, function(result) {
- return !Ember.none(result);
- });
- } else {
- Ember.assert("You must pass exactly one argument to the with helper", arguments.length === 2);
- Ember.assert("You must pass a block to the with helper", options.fn && options.fn !== Handlebars.VM.noop);
- return helpers.bind.call(options.contexts[0], context, options);
- }
-});
-
-
-/**
- @name Handlebars.helpers.if
- @param {Function} context
- @param {Hash} options
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('if', function(context, options) {
- Ember.assert("You must pass exactly one argument to the if helper", arguments.length === 2);
- Ember.assert("You must pass a block to the if helper", options.fn && options.fn !== Handlebars.VM.noop);
-
- return helpers.boundIf.call(options.contexts[0], context, options);
-});
-
-/**
- @name Handlebars.helpers.unless
- @param {Function} context
- @param {Hash} options
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('unless', function(context, options) {
- Ember.assert("You must pass exactly one argument to the unless helper", arguments.length === 2);
- Ember.assert("You must pass a block to the unless helper", options.fn && options.fn !== Handlebars.VM.noop);
-
- var fn = options.fn, inverse = options.inverse;
-
- options.fn = inverse;
- options.inverse = fn;
-
- return helpers.boundIf.call(options.contexts[0], context, options);
-});
-
-/**
- `bindAttr` allows you to create a binding between DOM element attributes and
- Ember objects. For example:
-
- <img {{bindAttr src="imageUrl" alt="imageTitle"}}>
-
- @name Handlebars.helpers.bindAttr
- @param {Hash} options
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('bindAttr', function(options) {
-
- var attrs = options.hash;
-
- Ember.assert("You must specify at least one hash argument to bindAttr", !!Ember.keys(attrs).length);
-
- var view = options.data.view;
- var ret = [];
- var ctx = this;
-
- // Generate a unique id for this element. This will be added as a
- // data attribute to the element so it can be looked up when
- // the bound property changes.
- var dataId = ++Ember.$.uuid;
-
- // Handle classes differently, as we can bind multiple classes
- var classBindings = attrs['class'];
- if (classBindings !== null && classBindings !== undefined) {
- var classResults = EmberHandlebars.bindClasses(this, classBindings, view, dataId, options);
- ret.push('class="' + Handlebars.Utils.escapeExpression(classResults.join(' ')) + '"');
- delete attrs['class'];
- }
-
- var attrKeys = Ember.keys(attrs);
-
- // For each attribute passed, create an observer and emit the
- // current value of the property as an attribute.
- forEach.call(attrKeys, function(attr) {
- var path = attrs[attr],
- pathRoot, normalized;
-
- Ember.assert(fmt("You must provide a String for a bound attribute, not %@", [path]), typeof path === 'string');
-
- normalized = normalizePath(ctx, path, options.data);
-
- pathRoot = normalized.root;
- path = normalized.path;
-
- var value = (path === 'this') ? pathRoot : getPath(pathRoot, path, options),
- type = Ember.typeOf(value);
-
- Ember.assert(fmt("Attributes must be numbers, strings or booleans, not %@", [value]), value === null || value === undefined || type === 'number' || type === 'string' || type === 'boolean');
-
- var observer, invoker;
-
- /** @private */
- observer = function observer() {
- var result = getPath(pathRoot, path, options);
-
- Ember.assert(fmt("Attributes must be numbers, strings or booleans, not %@", [result]), result === null || result === undefined || typeof result === 'number' || typeof result === 'string' || typeof result === 'boolean');
-
- var elem = view.$("[data-bindattr-" + dataId + "='" + dataId + "']");
-
- // If we aren't able to find the element, it means the element
- // to which we were bound has been removed from the view.
- // In that case, we can assume the template has been re-rendered
- // and we need to clean up the observer.
- if (elem.length === 0) {
- Ember.removeObserver(pathRoot, path, invoker);
- return;
- }
-
- Ember.View.applyAttributeBindings(elem, attr, result);
- };
-
- /** @private */
- invoker = function() {
- Ember.run.once(observer);
- };
-
- // Add an observer to the view for when the property changes.
- // When the observer fires, find the element using the
- // unique data id and update the attribute to the new value.
- if (path !== 'this') {
- Ember.addObserver(pathRoot, path, invoker);
- }
-
- // if this changes, also change the logic in ember-views/lib/views/view.js
- if ((type === 'string' || (type === 'number' && !isNaN(value)))) {
- ret.push(attr + '="' + Handlebars.Utils.escapeExpression(value) + '"');
- } else if (value && type === 'boolean') {
- // The developer controls the attr name, so it should always be safe
- ret.push(attr + '="' + attr + '"');
- }
- }, this);
-
- // Add the unique identifier
- // NOTE: We use all lower-case since Firefox has problems with mixed case in SVG
- ret.push('data-bindattr-' + dataId + '="' + dataId + '"');
- return new EmberHandlebars.SafeString(ret.join(' '));
-});
-
-/**
- Helper that, given a space-separated string of property paths and a context,
- returns an array of class names. Calling this method also has the side
- effect of setting up observers at those property paths, such that if they
- change, the correct class name will be reapplied to the DOM element.
-
- For example, if you pass the string "fooBar", it will first look up the
- "fooBar" value of the context. If that value is true, it will add the
- "foo-bar" class to the current element (i.e., the dasherized form of
- "fooBar"). If the value is a string, it will add that string as the class.
- Otherwise, it will not add any new class name.
-
- @param {Ember.Object} context
- The context from which to lookup properties
-
- @param {String} classBindings
- A string, space-separated, of class bindings to use
-
- @param {Ember.View} view
- The view in which observers should look for the element to update
-
- @param {Srting} bindAttrId
- Optional bindAttr id used to lookup elements
-
- @returns {Array} An array of class names to add
-*/
-EmberHandlebars.bindClasses = function(context, classBindings, view, bindAttrId, options) {
- var ret = [], newClass, value, elem;
-
- // Helper method to retrieve the property from the context and
- // determine which class string to return, based on whether it is
- // a Boolean or not.
- var classStringForPath = function(root, parsedPath, options) {
- var val,
- path = parsedPath.path;
-
- if (path === 'this') {
- val = root;
- } else if (path === '') {
- val = true;
- } else {
- val = getPath(root, path, options);
- }
-
- return Ember.View._classStringForValue(path, val, parsedPath.className, parsedPath.falsyClassName);
- };
-
- // For each property passed, loop through and setup
- // an observer.
- forEach.call(classBindings.split(' '), function(binding) {
-
- // Variable in which the old class value is saved. The observer function
- // closes over this variable, so it knows which string to remove when
- // the property changes.
- var oldClass;
-
- var observer, invoker;
-
- var parsedPath = Ember.View._parsePropertyPath(binding),
- path = parsedPath.path,
- pathRoot = context,
- normalized;
-
- if (path !== '' && path !== 'this') {
- normalized = normalizePath(context, path, options.data);
-
- pathRoot = normalized.root;
- path = normalized.path;
- }
-
- // Set up an observer on the context. If the property changes, toggle the
- // class name.
- /** @private */
- observer = function() {
- // Get the current value of the property
- newClass = classStringForPath(pathRoot, parsedPath, options);
- elem = bindAttrId ? view.$("[data-bindattr-" + bindAttrId + "='" + bindAttrId + "']") : view.$();
-
- // If we can't find the element anymore, a parent template has been
- // re-rendered and we've been nuked. Remove the observer.
- if (elem.length === 0) {
- Ember.removeObserver(pathRoot, path, invoker);
- } else {
- // If we had previously added a class to the element, remove it.
- if (oldClass) {
- elem.removeClass(oldClass);
- }
-
- // If necessary, add a new class. Make sure we keep track of it so
- // it can be removed in the future.
- if (newClass) {
- elem.addClass(newClass);
- oldClass = newClass;
- } else {
- oldClass = null;
- }
- }
- };
-
- /** @private */
- invoker = function() {
- Ember.run.once(observer);
- };
-
- if (path !== '' && path !== 'this') {
- Ember.addObserver(pathRoot, path, invoker);
- }
-
- // We've already setup the observer; now we just need to figure out the
- // correct behavior right now on the first pass through.
- value = classStringForPath(pathRoot, parsedPath, options);
-
- if (value) {
- ret.push(value);
-
- // Make sure we save the current value so that it can be removed if the
- // observer fires.
- oldClass = value;
- }
- });
-
- return ret;
-};
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Handlebars */
-
-// TODO: Don't require the entire module
-var get = Ember.get, set = Ember.set;
-var PARENT_VIEW_PATH = /^parentView\./;
-var EmberHandlebars = Ember.Handlebars;
-var VIEW_PRESERVES_CONTEXT = Ember.VIEW_PRESERVES_CONTEXT;
-
-/** @private */
-EmberHandlebars.ViewHelper = Ember.Object.create({
-
- propertiesFromHTMLOptions: function(options, thisContext) {
- var hash = options.hash, data = options.data;
- var extensions = {},
- classes = hash['class'],
- dup = false;
-
- if (hash.id) {
- extensions.elementId = hash.id;
- dup = true;
- }
-
- if (classes) {
- classes = classes.split(' ');
- extensions.classNames = classes;
- dup = true;
- }
-
- if (hash.classBinding) {
- extensions.classNameBindings = hash.classBinding.split(' ');
- dup = true;
- }
-
- if (hash.classNameBindings) {
- if (extensions.classNameBindings === undefined) extensions.classNameBindings = [];
- extensions.classNameBindings = extensions.classNameBindings.concat(hash.classNameBindings.split(' '));
- dup = true;
- }
-
- if (hash.attributeBindings) {
- Ember.assert("Setting 'attributeBindings' via Handlebars is not allowed. Please subclass Ember.View and set it there instead.");
- extensions.attributeBindings = null;
- dup = true;
- }
-
- if (dup) {
- hash = Ember.$.extend({}, hash);
- delete hash.id;
- delete hash['class'];
- delete hash.classBinding;
- }
-
- // Set the proper context for all bindings passed to the helper. This applies to regular attribute bindings
- // as well as class name bindings. If the bindings are local, make them relative to the current context
- // instead of the view.
- var path;
-
- // Evaluate the context of regular attribute bindings:
- for (var prop in hash) {
- if (!hash.hasOwnProperty(prop)) { continue; }
-
- // Test if the property ends in "Binding"
- if (Ember.IS_BINDING.test(prop) && typeof hash[prop] === 'string') {
- path = this.contextualizeBindingPath(hash[prop], data);
- if (path) { hash[prop] = path; }
- }
- }
-
- // Evaluate the context of class name bindings:
- if (extensions.classNameBindings) {
- for (var b in extensions.classNameBindings) {
- var full = extensions.classNameBindings[b];
- if (typeof full === 'string') {
- // Contextualize the path of classNameBinding so this:
- //
- // classNameBinding="isGreen:green"
- //
- // is converted to this:
- //
- // classNameBinding="bindingContext.isGreen:green"
- var parsedPath = Ember.View._parsePropertyPath(full);
- path = this.contextualizeBindingPath(parsedPath.path, data);
- if (path) { extensions.classNameBindings[b] = path + parsedPath.classNames; }
- }
- }
- }
-
- // Make the current template context available to the view
- // for the bindings set up above.
- extensions.bindingContext = thisContext;
-
- return Ember.$.extend(hash, extensions);
- },
-
- // Transform bindings from the current context to a context that can be evaluated within the view.
- // Returns null if the path shouldn't be changed.
- //
- // TODO: consider the addition of a prefix that would allow this method to return `path`.
- contextualizeBindingPath: function(path, data) {
- var normalized = Ember.Handlebars.normalizePath(null, path, data);
- if (normalized.isKeyword) {
- return 'templateData.keywords.' + path;
- } else if (Ember.isGlobalPath(path)) {
- return null;
- } else if (path === 'this') {
- return 'bindingContext';
- } else {
- return 'bindingContext.' + path;
- }
- },
-
- helper: function(thisContext, path, options) {
- var inverse = options.inverse,
- data = options.data,
- view = data.view,
- fn = options.fn,
- hash = options.hash,
- newView;
-
- if ('string' === typeof path) {
- newView = EmberHandlebars.getPath(thisContext, path, options);
- Ember.assert("Unable to find view at path '" + path + "'", !!newView);
- } else {
- newView = path;
- }
-
- Ember.assert(Ember.String.fmt('You must pass a view class to the #view helper, not %@ (%@)', [path, newView]), Ember.View.detect(newView));
-
- var viewOptions = this.propertiesFromHTMLOptions(options, thisContext);
- var currentView = data.view;
- viewOptions.templateData = options.data;
-
- if (fn) {
- Ember.assert("You cannot provide a template block if you also specified a templateName", !get(viewOptions, 'templateName') && !get(newView.proto(), 'templateName'));
- viewOptions.template = fn;
- }
-
- // We only want to override the `_context` computed property if there is
- // no specified controller. See View#_context for more information.
- if (VIEW_PRESERVES_CONTEXT && !newView.proto().controller && !newView.proto().controllerBinding && !viewOptions.controller && !viewOptions.controllerBinding) {
- viewOptions._context = thisContext;
- }
-
- currentView.appendChild(newView, viewOptions);
- }
-});
-
-/**
- `{{view}}` inserts a new instance of `Ember.View` into a template passing its options
- to the `Ember.View`'s `create` method and using the supplied block as the view's own template.
-
- An empty `<body>` and the following template:
-
- <script type="text/x-handlebars">
- A span:
- {{#view tagName="span"}}
- hello.
- {{/view}}
- </script>
-
- Will result in HTML structure:
-
- <body>
- <!-- Note: the handlebars template script
- also results in a rendered Ember.View
- which is the outer <div> here -->
-
- <div class="ember-view">
- A span:
- <span id="ember1" class="ember-view">
- Hello.
- </span>
- </div>
- </body>
-
- ### parentView setting
-
- The `parentView` property of the new `Ember.View` instance created through `{{view}}`
- will be set to the `Ember.View` instance of the template where `{{view}}` was called.
-
- aView = Ember.View.create({
- template: Ember.Handlebars.compile("{{#view}} my parent: {{parentView.elementId}} {{/view}}")
- })
-
- aView.appendTo('body')
-
- Will result in HTML structure:
-
- <div id="ember1" class="ember-view">
- <div id="ember2" class="ember-view">
- my parent: ember1
- </div>
- </div>
-
- ### Setting CSS id and class attributes
-
- The HTML `id` attribute can be set on the `{{view}}`'s resulting element with the `id` option.
- This option will _not_ be passed to `Ember.View.create`.
-
- <script type="text/x-handlebars">
- {{#view tagName="span" id="a-custom-id"}}
- hello.
- {{/view}}
- </script>
-
- Results in the following HTML structure:
-
- <div class="ember-view">
- <span id="a-custom-id" class="ember-view">
- hello.
- </span>
- </div>
-
- The HTML `class` attribute can be set on the `{{view}}`'s resulting element with
- the `class` or `classNameBindings` options. The `class` option
- will directly set the CSS `class` attribute and will not be passed to
- `Ember.View.create`. `classNameBindings` will be passed to `create` and use
- `Ember.View`'s class name binding functionality:
-
- <script type="text/x-handlebars">
- {{#view tagName="span" class="a-custom-class"}}
- hello.
- {{/view}}
- </script>
-
- Results in the following HTML structure:
-
- <div class="ember-view">
- <span id="ember2" class="ember-view a-custom-class">
- hello.
- </span>
- </div>
-
- ### Supplying a different view class
- `{{view}}` can take an optional first argument before its supplied options to specify a
- path to a custom view class.
-
- <script type="text/x-handlebars">
- {{#view "MyApp.CustomView"}}
- hello.
- {{/view}}
- </script>
-
- The first argument can also be a relative path. Ember will search for the view class
- starting at the `Ember.View` of the template where `{{view}}` was used as the root object:
-
- MyApp = Ember.Application.create({})
- MyApp.OuterView = Ember.View.extend({
- innerViewClass: Ember.View.extend({
- classNames: ['a-custom-view-class-as-property']
- }),
- template: Ember.Handlebars.compile('{{#view "innerViewClass"}} hi {{/view}}')
- })
-
- MyApp.OuterView.create().appendTo('body')
-
-Will result in the following HTML:
-
- <div id="ember1" class="ember-view">
- <div id="ember2" class="ember-view a-custom-view-class-as-property">
- hi
- </div>
- </div>
-
- ### Blockless use
-
- If you supply a custom `Ember.View` subclass that specifies its own template
- or provide a `templateName` option to `{{view}}` it can be used without supplying a block.
- Attempts to use both a `templateName` option and supply a block will throw an error.
-
- <script type="text/x-handlebars">
- {{view "MyApp.ViewWithATemplateDefined"}}
- </script>
-
- ### viewName property
-
- You can supply a `viewName` option to `{{view}}`. The `Ember.View` instance will
- be referenced as a property of its parent view by this name.
-
- aView = Ember.View.create({
- template: Ember.Handlebars.compile('{{#view viewName="aChildByName"}} hi {{/view}}')
- })
-
- aView.appendTo('body')
- aView.get('aChildByName') // the instance of Ember.View created by {{view}} helper
-
- @name Handlebars.helpers.view
- @param {String} path
- @param {Hash} options
- @returns {String} HTML string
-*/
-EmberHandlebars.registerHelper('view', function(path, options) {
- Ember.assert("The view helper only takes a single argument", arguments.length <= 2);
-
- // If no path is provided, treat path param as options.
- if (path && path.data && path.data.isRenderData) {
- options = path;
- path = "Ember.View";
- }
-
- return EmberHandlebars.ViewHelper.helper(this, path, options);
-});
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Handlebars */
-
-// TODO: Don't require all of this module
-var get = Ember.get, getPath = Ember.Handlebars.getPath, fmt = Ember.String.fmt;
-
-/**
- `{{collection}}` is a `Ember.Handlebars` helper for adding instances of
- `Ember.CollectionView` to a template. See `Ember.CollectionView` for additional
- information on how a `CollectionView` functions.
-
- `{{collection}}`'s primary use is as a block helper with a `contentBinding` option
- pointing towards an `Ember.Array`-compatible object. An `Ember.View` instance will
- be created for each item in its `content` property. Each view will have its own
- `content` property set to the appropriate item in the collection.
-
- The provided block will be applied as the template for each item's view.
-
- Given an empty `<body>` the following template:
-
- <script type="text/x-handlebars">
- {{#collection contentBinding="App.items"}}
- Hi {{content.name}}
- {{/collection}}
- </script>
-
- And the following application code
-
- App = Ember.Application.create()
- App.items = [
- Ember.Object.create({name: 'Dave'}),
- Ember.Object.create({name: 'Mary'}),
- Ember.Object.create({name: 'Sara'})
- ]
-
- Will result in the HTML structure below
-
- <div class="ember-view">
- <div class="ember-view">Hi Dave</div>
- <div class="ember-view">Hi Mary</div>
- <div class="ember-view">Hi Sara</div>
- </div>
-
- ### Blockless Use
- If you provide an `itemViewClass` option that has its own `template` you can omit
- the block.
-
- The following template:
-
- <script type="text/x-handlebars">
- {{collection contentBinding="App.items" itemViewClass="App.AnItemView"}}
- </script>
-
- And application code
-
- App = Ember.Application.create()
- App.items = [
- Ember.Object.create({name: 'Dave'}),
- Ember.Object.create({name: 'Mary'}),
- Ember.Object.create({name: 'Sara'})
- ]
-
- App.AnItemView = Ember.View.extend({
- template: Ember.Handlebars.compile("Greetings {{content.name}}")
- })
-
- Will result in the HTML structure below
-
- <div class="ember-view">
- <div class="ember-view">Greetings Dave</div>
- <div class="ember-view">Greetings Mary</div>
- <div class="ember-view">Greetings Sara</div>
- </div>
-
- ### Specifying a CollectionView subclass
- By default the `{{collection}}` helper will create an instance of `Ember.CollectionView`.
- You can supply a `Ember.CollectionView` subclass to the helper by passing it
- as the first argument:
-
- <script type="text/x-handlebars">
- {{#collection App.MyCustomCollectionClass contentBinding="App.items"}}
- Hi {{content.name}}
- {{/collection}}
- </script>
-
-
- ### Forwarded `item.*`-named Options
- As with the `{{view}}`, helper options passed to the `{{collection}}` will be set on
- the resulting `Ember.CollectionView` as properties. Additionally, options prefixed with
- `item` will be applied to the views rendered for each item (note the camelcasing):
-
- <script type="text/x-handlebars">
- {{#collection contentBinding="App.items"
- itemTagName="p"
- itemClassNames="greeting"}}
- Howdy {{content.name}}
- {{/collection}}
- </script>
-
- Will result in the following HTML structure:
-
- <div class="ember-view">
- <p class="ember-view greeting">Howdy Dave</p>
- <p class="ember-view greeting">Howdy Mary</p>
- <p class="ember-view greeting">Howdy Sara</p>
- </div>
-
- @name Handlebars.helpers.collection
- @param {String} path
- @param {Hash} options
- @returns {String} HTML string
-*/
-Ember.Handlebars.registerHelper('collection', function(path, options) {
- // If no path is provided, treat path param as options.
- if (path && path.data && path.data.isRenderData) {
- options = path;
- path = undefined;
- Ember.assert("You cannot pass more than one argument to the collection helper", arguments.length === 1);
- } else {
- Ember.assert("You cannot pass more than one argument to the collection helper", arguments.length === 2);
- }
-
- var fn = options.fn;
- var data = options.data;
- var inverse = options.inverse;
-
- // If passed a path string, convert that into an object.
- // Otherwise, just default to the standard class.
- var collectionClass;
- collectionClass = path ? getPath(this, path, options) : Ember.CollectionView;
- Ember.assert(fmt("%@ #collection: Could not find collection class %@", [data.view, path]), !!collectionClass);
-
- var hash = options.hash, itemHash = {}, match;
-
- // Extract item view class if provided else default to the standard class
- var itemViewClass, itemViewPath = hash.itemViewClass;
- var collectionPrototype = collectionClass.proto();
- delete hash.itemViewClass;
- itemViewClass = itemViewPath ? getPath(collectionPrototype, itemViewPath, options) : collectionPrototype.itemViewClass;
- Ember.assert(fmt("%@ #collection: Could not find itemViewClass %@", [data.view, itemViewPath]), !!itemViewClass);
-
- // Go through options passed to the {{collection}} helper and extract options
- // that configure item views instead of the collection itself.
- for (var prop in hash) {
- if (hash.hasOwnProperty(prop)) {
- match = prop.match(/^item(.)(.*)$/);
-
- if(match) {
- // Convert itemShouldFoo -> shouldFoo
- itemHash[match[1].toLowerCase() + match[2]] = hash[prop];
- // Delete from hash as this will end up getting passed to the
- // {{view}} helper method.
- delete hash[prop];
- }
- }
- }
-
- var tagName = hash.tagName || collectionPrototype.tagName;
-
- if (fn) {
- itemHash.template = fn;
- delete options.fn;
- }
-
- var emptyViewClass;
- if (inverse && inverse !== Handlebars.VM.noop) {
- emptyViewClass = get(collectionPrototype, 'emptyViewClass');
- emptyViewClass = emptyViewClass.extend({
- template: inverse,
- tagName: itemHash.tagName
- });
- } else if (hash.emptyViewClass) {
- emptyViewClass = getPath(this, hash.emptyViewClass, options);
- }
- hash.emptyView = emptyViewClass;
-
- if (hash.eachHelper === 'each') {
- itemHash._context = Ember.computed(function() {
- return get(this, 'content');
- }).property('content');
- delete hash.eachHelper;
- }
-
- var viewOptions = Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({ data: data, hash: itemHash }, this);
- hash.itemViewClass = itemViewClass.extend(viewOptions);
-
- return Ember.Handlebars.helpers.view.call(this, collectionClass, options);
-});
-
-
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Handlebars */
-var getPath = Ember.Handlebars.getPath;
-
-/**
- `unbound` allows you to output a property without binding. *Important:* The
- output will not be updated if the property changes. Use with caution.
-
- <div>{{unbound somePropertyThatDoesntChange}}</div>
-
- @name Handlebars.helpers.unbound
- @param {String} property
- @returns {String} HTML string
-*/
-Ember.Handlebars.registerHelper('unbound', function(property, fn) {
- var context = (fn.contexts && fn.contexts[0]) || this;
- return getPath(context, property, fn);
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-/*jshint debug:true*/
-var getPath = Ember.Handlebars.getPath, normalizePath = Ember.Handlebars.normalizePath;
-
-/**
- `log` allows you to output the value of a value in the current rendering
- context.
-
- {{log myVariable}}
-
- @name Handlebars.helpers.log
- @param {String} property
-*/
-Ember.Handlebars.registerHelper('log', function(property, options) {
- var context = (options.contexts && options.contexts[0]) || this,
- normalized = normalizePath(context, property, options.data),
- pathRoot = normalized.root,
- path = normalized.path,
- value = (path === 'this') ? pathRoot : getPath(pathRoot, path, options);
- Ember.Logger.log(value);
-});
-
-/**
- The `debugger` helper executes the `debugger` statement in the current
- context.
-
- {{debugger}}
-
- @name Handlebars.helpers.debugger
- @param {String} property
-*/
-Ember.Handlebars.registerHelper('debugger', function() {
- debugger;
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember._Metamorph, {
- itemViewClass: Ember._MetamorphView,
- emptyViewClass: Ember._MetamorphView,
-
- createChildView: function(view, attrs) {
- view = this._super(view, attrs);
-
- // At the moment, if a container view subclass wants
- // to insert keywords, it is responsible for cloning
- // the keywords hash. This will be fixed momentarily.
- var keyword = get(this, 'keyword');
-
- if (keyword) {
- var data = get(view, 'templateData');
-
- data = Ember.copy(data);
- data.keywords = view.cloneKeywords();
- set(view, 'templateData', data);
-
- var content = get(view, 'content');
-
- // In this case, we do not bind, because the `content` of
- // a #each item cannot change.
- data.keywords[keyword] = content;
- }
-
- return view;
- }
-});
-
-Ember.Handlebars.registerHelper('each', function(path, options) {
- if (arguments.length === 4) {
- Ember.assert("If you pass more than one argument to the each helper, it must be in the form #each foo in bar", arguments[1] === "in");
-
- var keywordName = arguments[0];
-
- options = arguments[3];
- path = arguments[2];
- if (path === '') { path = "this"; }
-
- options.hash.keyword = keywordName;
- } else {
- options.hash.eachHelper = 'each';
- }
-
- Ember.assert("You must pass a block to the each helper", options.fn && options.fn !== Handlebars.VM.noop);
-
- options.hash.contentBinding = path;
- // Set up emptyView as a metamorph with no tag
- //options.hash.emptyViewClass = Ember._MetamorphView;
-
- return Ember.Handlebars.helpers.collection.call(this, 'Ember.Handlebars.EachView', options);
-});
-
-})();
-
-
-
-(function() {
-/**
- `template` allows you to render a template from inside another template.
- This allows you to re-use the same template in multiple places. For example:
-
- <script type="text/x-handlebars">
- {{#with loggedInUser}}
- Last Login: {{lastLogin}}
- User Info: {{template "user_info"}}
- {{/with}}
- </script>
-
- <script type="text/x-handlebars" data-template-name="user_info">
- Name: <em>{{name}}</em>
- Karma: <em>{{karma}}</em>
- </script>
-
- This helper looks for templates in the global Ember.TEMPLATES hash. If you
- add &lt;script&gt; tags to your page with the `data-template-name` attribute set,
- they will be compiled and placed in this hash automatically.
-
- You can also manually register templates by adding them to the hash:
-
- Ember.TEMPLATES["my_cool_template"] = Ember.Handlebars.compile('<b>{{user}}</b>');
-
- @name Handlebars.helpers.template
- @param {String} templateName the template to render
-*/
-
-Ember.Handlebars.registerHelper('template', function(name, options) {
- var template = Ember.TEMPLATES[name];
-
- Ember.assert("Unable to find template with name '"+name+"'.", !!template);
-
- Ember.TEMPLATES[name](this, { data: options.data });
-});
-
-})();
-
-
-
-(function() {
-var EmberHandlebars = Ember.Handlebars,
- getPath = EmberHandlebars.getPath,
- get = Ember.get,
- a_slice = Array.prototype.slice;
-
-var ActionHelper = EmberHandlebars.ActionHelper = {
- registeredActions: {}
-};
-
-ActionHelper.registerAction = function(actionName, options) {
- var actionId = (++Ember.$.uuid).toString();
-
- ActionHelper.registeredActions[actionId] = {
- eventName: options.eventName,
- handler: function(event) {
- var modifier = event.shiftKey || event.metaKey || event.altKey || event.ctrlKey,
- secondaryClick = event.which > 1, // IE9 may return undefined
- nonStandard = modifier || secondaryClick;
-
- if (options.link && nonStandard) {
- // Allow the browser to handle special link clicks normally
- return;
- }
-
- event.preventDefault();
-
- event.view = options.view;
-
- if (options.hasOwnProperty('context')) {
- event.context = options.context;
- }
-
- if (options.hasOwnProperty('contexts')) {
- event.contexts = options.contexts;
- }
-
- var target = options.target;
-
- // Check for StateManager (or compatible object)
- if (target.isState && typeof target.send === 'function') {
- return target.send(actionName, event);
- } else {
- Ember.assert(Ember.String.fmt('Target %@ does not have action %@', [target, actionName]), target[actionName]);
- return target[actionName].call(target, event);
- }
- }
- };
-
- options.view.on('willRerender', function() {
- delete ActionHelper.registeredActions[actionId];
- });
-
- return actionId;
-};
-
-/**
- The `{{action}}` helper registers an HTML element within a template for
- DOM event handling and forwards that interaction to the Application's router,
- the template's `Ember.View` instance, or supplied `target` option (see 'Specifiying a Target').
-
- User interaction with that element will invoke the supplied action name on
- the appropriate target.
-
- Given the following Handlebars template on the page
-
- <script type="text/x-handlebars" data-template-name='a-template'>
- <div {{action anActionName}}>
- click me
- </div>
- </script>
-
- And application code
-
- AView = Ember.View.extend({
- templateName; 'a-template',
- anActionName: function(event){}
- });
-
- aView = AView.create();
- aView.appendTo('body');
-
- Will results in the following rendered HTML
-
- <div class="ember-view">
- <div data-ember-action="1">
- click me
- </div>
- </div>
-
- Clicking "click me" will trigger the `anActionName` method of the `aView`
- object with a `jQuery.Event` object as its argument. The `jQuery.Event`
- object will be extended to include a `view` property that is set to the
- original view interacted with (in this case the `aView` object).
-
- ### Event Propagation
-
- Events triggered through the action helper will automatically have
- `.preventDefault()` called on them. You do not need to do so in your event
- handlers. To stop propagation of the event, simply return `false` from your
- handler.
-
- If you need the default handler to trigger you should either register your
- own event handler, or use event methods on your view class. See Ember.View
- 'Responding to Browser Events' for more information.
-
- ### Specifying DOM event type
-
- By default the `{{action}}` helper registers for DOM `click` events. You can
- supply an `on` option to the helper to specify a different DOM event name:
-
- <script type="text/x-handlebars" data-template-name='a-template'>
- <div {{action anActionName on="doubleClick"}}>
- click me
- </div>
- </script>
-
- See Ember.View 'Responding to Browser Events' for a list of
- acceptable DOM event names.
-
- Because `{{action}}` depends on Ember's event dispatch system it will only
- function if an `Ember.EventDispatcher` instance is available. An
- `Ember.EventDispatcher` instance will be created when a new
- `Ember.Application` is created. Having an instance of `Ember.Application`
- will satisfy this requirement.
-
-
- ### Specifying a Target
- There are several possible target objects for `{{action}}` helpers:
-
- In a typical `Ember.Router`-backed Application where views are managed
- through use of the `{{outlet}}` helper, actions will be forwarded to the
- current state of the Applications's Router. See Ember.Router 'Responding
- to User-initiated Events' for more information.
-
- If you manaully set the `target` property on the controller of a template's
- `Ember.View` instance, the specifed `controller.target` will become the target
- for any actions. Likely custom values for a controller's `target` are the
- controller itself or a StateManager other than the Application's Router.
-
- If the templates's view lacks a controller property the view itself is the target.
-
- Finally, a `target` option can be provided to the helper to change which object
- will receive the method call. This option must be a string representing a
- path to an object:
-
- <script type="text/x-handlebars" data-template-name='a-template'>
- <div {{action anActionName target="MyApplication.someObject"}}>
- click me
- </div>
- </script>
-
- Clicking "click me" in the rendered HTML of the above template will trigger
- the `anActionName` method of the object at `MyApplication.someObject`.
- The first argument to this method will be a `jQuery.Event` extended to
- include a `view` property that is set to the original view interacted with.
-
- A path relative to the template's `Ember.View` instance can also be used as
- a target:
-
- <script type="text/x-handlebars" data-template-name='a-template'>
- <div {{action anActionName target="parentView"}}>
- click me
- </div>
- </script>
-
- Clicking "click me" in the rendered HTML of the above template will trigger
- the `anActionName` method of the view's parent view.
-
- The `{{action}}` helper is `Ember.StateManager` aware. If the target of the
- action is an `Ember.StateManager` instance `{{action}}` will use the `send`
- functionality of StateManagers. The documentation for `Ember.StateManager`
- has additional information about this use.
-
- If an action's target does not implement a method that matches the supplied
- action name an error will be thrown.
-
- <script type="text/x-handlebars" data-template-name='a-template'>
- <div {{action aMethodNameThatIsMissing}}>
- click me
- </div>
- </script>
-
- With the following application code
-
- AView = Ember.View.extend({
- templateName; 'a-template',
- // note: no method 'aMethodNameThatIsMissing'
- anActionName: function(event){}
- });
-
- aView = AView.create();
- aView.appendTo('body');
-
- Will throw `Uncaught TypeError: Cannot call method 'call' of undefined` when
- "click me" is clicked.
-
- ### Specifying a context
-
- By default the `{{action}}` helper passes the current Handlebars context
- along in the `jQuery.Event` object. You may specify an alternate object to
- pass as the context by providing a property path:
-
- <script type="text/x-handlebars" data-template-name='a-template'>
- {{#each person in people}}
- <div {{action edit person}}>
- click me
- </div>
- {{/each}}
- </script>
-
- @name Handlebars.helpers.action
- @param {String} actionName
- @param {Object...} contexts
- @param {Hash} options
-*/
-EmberHandlebars.registerHelper('action', function(actionName) {
- var options = arguments[arguments.length - 1],
- contexts = a_slice.call(arguments, 1, -1);
-
- var hash = options.hash,
- view = options.data.view,
- target, controller, link;
-
- // create a hash to pass along to registerAction
- var action = {
- eventName: hash.on || "click"
- };
-
- action.view = view = get(view, 'concreteView');
-
- if (hash.target) {
- target = getPath(this, hash.target, options);
- } else if (controller = options.data.keywords.controller) {
- target = get(controller, 'target');
- }
-
- action.target = target = target || view;
-
- if (contexts.length) {
- action.contexts = contexts = Ember.EnumerableUtils.map(contexts, function(context) {
- return getPath(this, context, options);
- }, this);
- action.context = contexts[0];
- }
-
- var output = [], url;
-
- if (hash.href && target.urlForEvent) {
- url = target.urlForEvent.apply(target, [actionName].concat(contexts));
- output.push('href="' + url + '"');
- action.link = true;
- }
-
- var actionId = ActionHelper.registerAction(actionName, action);
- output.push('data-ember-action="' + actionId + '"');
-
- return new EmberHandlebars.SafeString(output.join(" "));
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, set = Ember.set;
-
-/**
-
- When used in a Handlebars template that is assigned to an `Ember.View` instance's
- `layout` property Ember will render the layout template first, inserting the view's
- own rendered output at the `{{ yield }}` location.
-
- An empty `<body>` and the following application code:
-
- AView = Ember.View.extend({
- classNames: ['a-view-with-layout'],
- layout: Ember.Handlebars.compile('<div class="wrapper">{{ yield }}</div>'),
- template: Ember.Handlebars.compile('<span>I am wrapped</span>')
- })
-
- aView = AView.create()
- aView.appendTo('body')
-
- Will result in the following HTML output:
-
- <body>
- <div class='ember-view a-view-with-layout'>
- <div class="wrapper">
- <span>I am wrapped</span>
- </div>
- </div>
- </body>
-
- The yield helper cannot be used outside of a template assigned to an `Ember.View`'s `layout` property
- and will throw an error if attempted.
-
- BView = Ember.View.extend({
- classNames: ['a-view-with-layout'],
- template: Ember.Handlebars.compile('{{yield}}')
- })
-
- bView = BView.create()
- bView.appendTo('body')
-
- // throws
- // Uncaught Error: assertion failed: You called yield in a template that was not a layout
-
- @name Handlebars.helpers.yield
- @param {Hash} options
- @returns {String} HTML string
-*/
-Ember.Handlebars.registerHelper('yield', function(options) {
- var view = options.data.view, template;
-
- while (view && !get(view, 'layout')) {
- view = get(view, 'parentView');
- }
-
- Ember.assert("You called yield in a template that was not a layout", !!view);
-
- template = get(view, 'template');
-
- if (template) { template(this, options); }
-});
-
-})();
-
-
-
-(function() {
-/**
- The `outlet` helper allows you to specify that the current
- view's controller will fill in the view for a given area.
-
- {{outlet}}
-
- By default, when the the current controller's `view`
- property changes, the outlet will replace its current
- view with the new view.
-
- controller.set('view', someView);
-
- You can also specify a particular name, other than view:
-
- {{outlet masterView}}
- {{outlet detailView}}
-
- Then, you can control several outlets from a single
- controller:
-
- controller.set('masterView', postsView);
- controller.set('detailView', postView);
-
- @name Handlebars.helpers.outlet
- @param {String} property the property on the controller
- that holds the view for this outlet
-*/
-Ember.Handlebars.registerHelper('outlet', function(property, options) {
- if (property && property.data && property.data.isRenderData) {
- options = property;
- property = 'view';
- }
-
- options.hash.currentViewBinding = "controller." + property;
-
- return Ember.Handlebars.helpers.view.call(this, Ember.ContainerView, options);
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var set = Ember.set, get = Ember.get;
-
-/**
- @class
-
- Creates an HTML input of type 'checkbox' with HTML related properties
- applied directly to the input.
-
- {{view Ember.Checkbox classNames="applicaton-specific-checkbox"}}
-
- <input id="ember1" class="ember-view ember-checkbox applicaton-specific-checkbox" type="checkbox">
-
- You can add a `label` tag yourself in the template where the Ember.Checkbox is being used.
-
- <label>
- Some Title
- {{view Ember.Checkbox classNames="applicaton-specific-checkbox"}}
- </label>
-
-
- The `checked` attribute of an Ember.Checkbox object should always be set
- through the Ember object or by interacting with its rendered element representation
- via the mouse, keyboard, or touch. Updating the value of the checkbox via jQuery will
- result in the checked value of the object and its element losing synchronization.
-
- ## Layout and LayoutName properties
- Because HTML `input` elements are self closing `layout` and `layoutName` properties will
- not be applied. See `Ember.View`'s layout section for more information.
-
- @extends Ember.View
-*/
-Ember.Checkbox = Ember.View.extend({
- classNames: ['ember-checkbox'],
-
- tagName: 'input',
-
- attributeBindings: ['type', 'checked', 'disabled', 'tabindex'],
-
- type: "checkbox",
- checked: false,
- disabled: false,
-
- init: function() {
- this._super();
- this.on("change", this, this._updateElementValue);
- },
-
- /**
- @private
- */
- _updateElementValue: function() {
- set(this, 'checked', this.$().prop('checked'));
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-/** @class */
-Ember.TextSupport = Ember.Mixin.create(
-/** @scope Ember.TextSupport.prototype */ {
-
- value: "",
-
- attributeBindings: ['placeholder', 'disabled', 'maxlength', 'tabindex'],
- placeholder: null,
- disabled: false,
- maxlength: null,
-
- insertNewline: Ember.K,
- cancel: Ember.K,
-
- /** @private */
- init: function() {
- this._super();
- this.on("focusOut", this, this._elementValueDidChange);
- this.on("change", this, this._elementValueDidChange);
- this.on("keyUp", this, this.interpretKeyEvents);
- },
-
- /**
- @private
- */
- interpretKeyEvents: function(event) {
- var map = Ember.TextSupport.KEY_EVENTS;
- var method = map[event.keyCode];
-
- this._elementValueDidChange();
- if (method) { return this[method](event); }
- },
-
- _elementValueDidChange: function() {
- set(this, 'value', this.$().val());
- }
-
-});
-
-Ember.TextSupport.KEY_EVENTS = {
- 13: 'insertNewline',
- 27: 'cancel'
-};
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- The `Ember.TextField` view class renders a text
- [input](https://developer.mozilla.org/en/HTML/Element/Input) element. It
- allows for binding Ember properties to the text field contents (`value`),
- live-updating as the user inputs text.
-
- Example:
-
- {{view Ember.TextField valueBinding="firstName"}}
-
- ## Layout and LayoutName properties
- Because HTML `input` elements are self closing `layout` and `layoutName` properties will
- not be applied. See `Ember.View`'s layout section for more information.
-
- @extends Ember.View
- @extends Ember.TextSupport
-*/
-Ember.TextField = Ember.View.extend(Ember.TextSupport,
- /** @scope Ember.TextField.prototype */ {
-
- classNames: ['ember-text-field'],
- tagName: "input",
- attributeBindings: ['type', 'value', 'size'],
-
- /**
- The value attribute of the input element. As the user inputs text, this
- property is updated live.
-
- @type String
- @default ""
- */
- value: "",
-
- /**
- The type attribute of the input element.
-
- @type String
- @default "text"
- */
- type: "text",
-
- /**
- The size of the text field in characters.
-
- @type String
- @default null
- */
- size: null
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-Ember.Button = Ember.View.extend(Ember.TargetActionSupport, {
- classNames: ['ember-button'],
- classNameBindings: ['isActive'],
-
- tagName: 'button',
-
- propagateEvents: false,
-
- attributeBindings: ['type', 'disabled', 'href', 'tabindex'],
-
- /** @private
- Overrides TargetActionSupport's targetObject computed
- property to use Handlebars-specific path resolution.
- */
- targetObject: Ember.computed(function() {
- var target = get(this, 'target'),
- root = get(this, 'context'),
- data = get(this, 'templateData');
-
- if (typeof target !== 'string') { return target; }
-
- return Ember.Handlebars.getPath(root, target, { data: data });
- }).property('target').cacheable(),
-
- // Defaults to 'button' if tagName is 'input' or 'button'
- type: Ember.computed(function(key, value) {
- var tagName = this.get('tagName');
- if (value !== undefined) { this._type = value; }
- if (this._type !== undefined) { return this._type; }
- if (tagName === 'input' || tagName === 'button') { return 'button'; }
- }).property('tagName').cacheable(),
-
- disabled: false,
-
- // Allow 'a' tags to act like buttons
- href: Ember.computed(function() {
- return this.get('tagName') === 'a' ? '#' : null;
- }).property('tagName').cacheable(),
-
- mouseDown: function() {
- if (!get(this, 'disabled')) {
- set(this, 'isActive', true);
- this._mouseDown = true;
- this._mouseEntered = true;
- }
- return get(this, 'propagateEvents');
- },
-
- mouseLeave: function() {
- if (this._mouseDown) {
- set(this, 'isActive', false);
- this._mouseEntered = false;
- }
- },
-
- mouseEnter: function() {
- if (this._mouseDown) {
- set(this, 'isActive', true);
- this._mouseEntered = true;
- }
- },
-
- mouseUp: function(event) {
- if (get(this, 'isActive')) {
- // Actually invoke the button's target and action.
- // This method comes from the Ember.TargetActionSupport mixin.
- this.triggerAction();
- set(this, 'isActive', false);
- }
-
- this._mouseDown = false;
- this._mouseEntered = false;
- return get(this, 'propagateEvents');
- },
-
- keyDown: function(event) {
- // Handle space or enter
- if (event.keyCode === 13 || event.keyCode === 32) {
- this.mouseDown();
- }
- },
-
- keyUp: function(event) {
- // Handle space or enter
- if (event.keyCode === 13 || event.keyCode === 32) {
- this.mouseUp();
- }
- },
-
- // TODO: Handle proper touch behavior. Including should make inactive when
- // finger moves more than 20x outside of the edge of the button (vs mouse
- // which goes inactive as soon as mouse goes out of edges.)
-
- touchStart: function(touch) {
- return this.mouseDown(touch);
- },
-
- touchEnd: function(touch) {
- return this.mouseUp(touch);
- },
-
- init: function() {
- Ember.deprecate("Ember.Button is deprecated and will be removed from future releases. Consider using the `{{action}}` helper.");
- this._super();
- }
-});
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-var get = Ember.get, set = Ember.set;
-
-/**
- @class
-
- The `Ember.TextArea` view class renders a
- [textarea](https://developer.mozilla.org/en/HTML/Element/textarea) element.
- It allows for binding Ember properties to the text area contents (`value`),
- live-updating as the user inputs text.
-
- ## Layout and LayoutName properties
-
- Because HTML `textarea` elements do not contain inner HTML the `layout` and `layoutName`
- properties will not be applied. See `Ember.View`'s layout section for more information.
-
- @extends Ember.View
- @extends Ember.TextSupport
-*/
-Ember.TextArea = Ember.View.extend(Ember.TextSupport,
-/** @scope Ember.TextArea.prototype */ {
-
- classNames: ['ember-text-area'],
-
- tagName: "textarea",
- attributeBindings: ['rows', 'cols'],
- rows: null,
- cols: null,
-
- _updateElementValue: Ember.observer(function() {
- // We do this check so cursor position doesn't get affected in IE
- var value = get(this, 'value'),
- $el = this.$();
- if ($el && value !== $el.val()) {
- $el.val(value);
- }
- }, 'value'),
-
- /** @private */
- init: function() {
- this._super();
- this.on("didInsertElement", this, this._updateElementValue);
- }
-
-});
-
-})();
-
-
-
-(function() {
-Ember.TabContainerView = Ember.View.extend({
- init: function() {
- Ember.deprecate("Ember.TabContainerView is deprecated and will be removed from future releases.");
- this._super();
- }
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get;
-
-Ember.TabPaneView = Ember.View.extend({
- tabsContainer: Ember.computed(function() {
- return this.nearestInstanceOf(Ember.TabContainerView);
- }).property().volatile(),
-
- isVisible: Ember.computed(function() {
- return get(this, 'viewName') === get(this, 'tabsContainer.currentView');
- }).property('tabsContainer.currentView').volatile(),
-
- init: function() {
- Ember.deprecate("Ember.TabPaneView is deprecated and will be removed from future releases.");
- this._super();
- }
-});
-
-})();
-
-
-
-(function() {
-var get = Ember.get, setPath = Ember.setPath;
-
-Ember.TabView = Ember.View.extend({
- tabsContainer: Ember.computed(function() {
- return this.nearestInstanceOf(Ember.TabContainerView);
- }).property().volatile(),
-
- mouseUp: function() {
- setPath(this, 'tabsContainer.currentView', get(this, 'value'));
- },
-
- init: function() {
- Ember.deprecate("Ember.TabView is deprecated and will be removed from future releases.");
- this._super();
- }
-});
-
-})();
-
-
-
-(function() {
-
-})();
-
-
-
-(function() {
-/*jshint eqeqeq:false */
-
-var set = Ember.set, get = Ember.get;
-var indexOf = Ember.EnumerableUtils.indexOf, indexesOf = Ember.EnumerableUtils.indexesOf;
-
-/**
- @class
-
- The Ember.Select view class renders a
- [select](https://developer.mozilla.org/en/HTML/Element/select) HTML element,
- allowing the user to choose from a list of options. The selected option(s)
- are updated live in the `selection` property, while the corresponding value
- is updated in the `value` property.
-
- ### Using Strings
- The simplest version of an Ember.Select takes an array of strings for the options
- of a select box and a valueBinding to set the value.
-
- Example:
-
- App.controller = Ember.Object.create({
- selected: null,
- content: [
- "Yehuda",
- "Tom"
- ]
- })
-
- {{view Ember.Select
- contentBinding="App.controller.content"
- valueBinding="App.controller.selected"
- }}
-
- Would result in the following HTML:
-
- <select class="ember-select">
- <option value="Yehuda">Yehuda</option>
- <option value="Tom">Tom</option>
- </select>
-
- Selecting Yehuda from the select box will set `App.controller.selected` to "Yehuda"
-
- ### Using Objects
- An Ember.Select can also take an array of JS or Ember objects.
-
- When using objects you need to supply optionLabelPath and optionValuePath parameters
- which will be used to get the label and value for each of the options.
-
- Usually you will bind to either the selection or the value attribute of the select.
-
- Use selectionBinding if you would like to set the whole object as a property on the target.
- Use valueBinding if you would like to set just the value.
-
- Example using selectionBinding:
-
- App.controller = Ember.Object.create({
- selectedPerson: null,
- selectedPersonId: null,
- content: [
- Ember.Object.create({firstName: "Yehuda", id: 1}),
- Ember.Object.create({firstName: "Tom", id: 2})
- ]
- })
-
- {{view Ember.Select
- contentBinding="App.controller.content"
- optionLabelPath="content.firstName"
- optionValuePath="content.id"
- selectionBinding="App.controller.selectedPerson"
- prompt="Please Select"}}
-
- <select class="ember-select">
- <option value>Please Select</option>
- <option value="1">Yehuda</option>
- <option value="2">Tom</option>
- </select>
-
- Selecting Yehuda here will set `App.controller.selectedPerson` to
- the Yehuda object.
-
- Example using valueBinding:
-
- {{view Ember.Select
- contentBinding="App.controller.content"
- optionLabelPath="content.firstName"
- optionValuePath="content.id"
- valueBinding="App.controller.selectedPersonId"
- prompt="Please Select"}}
-
- Selecting Yehuda in this case will set `App.controller.selectedPersonId` to 1.
-
- @extends Ember.View
-*/
-Ember.Select = Ember.View.extend(
- /** @scope Ember.Select.prototype */ {
-
- tagName: 'select',
- classNames: ['ember-select'],
- defaultTemplate: Ember.Handlebars.compile('{{#if view.prompt}}<option value>{{view.prompt}}</option>{{/if}}{{#each view.content}}{{view Ember.SelectOption contentBinding="this"}}{{/each}}'),
- attributeBindings: ['multiple', 'tabindex'],
-
- /**
- The `multiple` attribute of the select element. Indicates whether multiple
- options can be selected.
-
- @type Boolean
- @default false
- */
- multiple: false,
-
- /**
- The list of options.
-
- If `optionLabelPath` and `optionValuePath` are not overridden, this should
- be a list of strings, which will serve simultaneously as labels and values.
-
- Otherwise, this should be a list of objects. For instance:
-
- content: Ember.A([
- { id: 1, firstName: 'Yehuda' },
- { id: 2, firstName: 'Tom' }
- ]),
- optionLabelPath: 'content.firstName',
- optionValuePath: 'content.id'
-
- @type Array
- @default null
- */
- content: null,
-
- /**
- When `multiple` is false, the element of `content` that is currently
- selected, if any.
-
- When `multiple` is true, an array of such elements.
-
- @type Object or Array
- @default null
- */
- selection: null,
-
- /**
- In single selection mode (when `multiple` is false), value can be used to get
- the current selection's value or set the selection by it's value.
-
- It is not currently supported in multiple selection mode.
-
- @type String
- @default null
- */
- value: Ember.computed(function(key, value) {
- if (arguments.length === 2) { return value; }
-
- var valuePath = get(this, 'optionValuePath').replace(/^content\.?/, '');
- return valuePath ? get(this, 'selection.' + valuePath) : get(this, 'selection');
- }).property('selection').cacheable(),
-
- /**
- If given, a top-most dummy option will be rendered to serve as a user
- prompt.
-
- @type String
- @default null
- */
- prompt: null,
-
- /**
- The path of the option labels. See `content`.
-
- @type String
- @default 'content'
- */
- optionLabelPath: 'content',
-
- /**
- The path of the option values. See `content`.
-
- @type String
- @default 'content'
- */
- optionValuePath: 'content',
-
- _change: function() {
- if (get(this, 'multiple')) {
- this._changeMultiple();
- } else {
- this._changeSingle();
- }
- },
-
- selectionDidChange: Ember.observer(function() {
- var selection = get(this, 'selection'),
- isArray = Ember.isArray(selection);
- if (get(this, 'multiple')) {
- if (!isArray) {
- set(this, 'selection', Ember.A([selection]));
- return;
- }
- this._selectionDidChangeMultiple();
- } else {
- this._selectionDidChangeSingle();
- }
- }, 'selection'),
-
- valueDidChange: Ember.observer(function() {
- var content = get(this, 'content'),
- value = get(this, 'value'),
- valuePath = get(this, 'optionValuePath').replace(/^content\.?/, ''),
- selectedValue = (valuePath ? get(this, 'selection.' + valuePath) : get(this, 'selection')),
- selection;
-
- if (value !== selectedValue) {
- selection = content.find(function(obj) {
- return value === (valuePath ? get(obj, valuePath) : obj);
- });
-
- this.set('selection', selection);
- }
- }, 'value'),
-
-
- _triggerChange: function() {
- var selection = get(this, 'selection');
-
- if (selection) { this.selectionDidChange(); }
-
- this._change();
- },
-
- _changeSingle: function() {
- var selectedIndex = this.$()[0].selectedIndex,
- content = get(this, 'content'),
- prompt = get(this, 'prompt');
-
- if (!content) { return; }
- if (prompt && selectedIndex === 0) { set(this, 'selection', null); return; }
-
- if (prompt) { selectedIndex -= 1; }
- set(this, 'selection', content.objectAt(selectedIndex));
- },
-
- _changeMultiple: function() {
- var options = this.$('option:selected'),
- prompt = get(this, 'prompt'),
- offset = prompt ? 1 : 0,
- content = get(this, 'content');
-
- if (!content){ return; }
- if (options) {
- var selectedIndexes = options.map(function(){
- return this.index - offset;
- }).toArray();
- set(this, 'selection', content.objectsAt(selectedIndexes));
- }
- },
-
- _selectionDidChangeSingle: function() {
- var el = this.get('element');
- if (!el) { return; }
-
- var content = get(this, 'content'),
- selection = get(this, 'selection'),
- selectionIndex = content ? indexOf(content, selection) : -1,
- prompt = get(this, 'prompt');
-
- if (prompt) { selectionIndex += 1; }
- if (el) { el.selectedIndex = selectionIndex; }
- },
-
- _selectionDidChangeMultiple: function() {
- var content = get(this, 'content'),
- selection = get(this, 'selection'),
- selectedIndexes = content ? indexesOf(content, selection) : [-1],
- prompt = get(this, 'prompt'),
- offset = prompt ? 1 : 0,
- options = this.$('option'),
- adjusted;
-
- if (options) {
- options.each(function() {
- adjusted = this.index > -1 ? this.index + offset : -1;
- this.selected = indexOf(selectedIndexes, adjusted) > -1;
- });
- }
- },
-
- init: function() {
- this._super();
- this.on("didInsertElement", this, this._triggerChange);
- this.on("change", this, this._change);
- }
-});
-
-Ember.SelectOption = Ember.View.extend({
- tagName: 'option',
- attributeBindings: ['value', 'selected'],
-
- defaultTemplate: function(context, options) {
- options = { data: options.data, hash: {} };
- Ember.Handlebars.helpers.bind.call(context, "view.label", options);
- },
-
- init: function() {
- this.labelPathDidChange();
- this.valuePathDidChange();
-
- this._super();
- },
-
- selected: Ember.computed(function() {
- var content = get(this, 'content'),
- selection = get(this, 'parentView.selection');
- if (get(this, 'parentView.multiple')) {
- return selection && indexOf(selection, content) > -1;
- } else {
- // Primitives get passed through bindings as objects... since
- // `new Number(4) !== 4`, we use `==` below
- return content == selection;
- }
- }).property('content', 'parentView.selection').volatile(),
-
- labelPathDidChange: Ember.observer(function() {
- var labelPath = get(this, 'parentView.optionLabelPath');
-
- if (!labelPath) { return; }
-
- Ember.defineProperty(this, 'label', Ember.computed(function() {
- return get(this, labelPath);
- }).property(labelPath).cacheable());
- }, 'parentView.optionLabelPath'),
-
- valuePathDidChange: Ember.observer(function() {
- var valuePath = get(this, 'parentView.optionValuePath');
-
- if (!valuePath) { return; }
-
- Ember.defineProperty(this, 'value', Ember.computed(function() {
- return get(this, valuePath);
- }).property(valuePath).cacheable());
- }, 'parentView.optionValuePath')
-});
-
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-/*globals Handlebars */
-// Find templates stored in the head tag as script tags and make them available
-// to Ember.CoreView in the global Ember.TEMPLATES object. This will be run as as
-// jQuery DOM-ready callback.
-//
-// Script tags with "text/x-handlebars" will be compiled
-// with Ember's Handlebars and are suitable for use as a view's template.
-// Those with type="text/x-raw-handlebars" will be compiled with regular
-// Handlebars and are suitable for use in views' computed properties.
-Ember.Handlebars.bootstrap = function(ctx) {
- var selectors = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';
-
- Ember.$(selectors, ctx)
- .each(function() {
- // Get a reference to the script tag
- var script = Ember.$(this),
- type = script.attr('type');
-
- var compile = (script.attr('type') === 'text/x-raw-handlebars') ?
- Ember.$.proxy(Handlebars.compile, Handlebars) :
- Ember.$.proxy(Ember.Handlebars.compile, Ember.Handlebars),
- // Get the name of the script, used by Ember.View's templateName property.
- // First look for data-template-name attribute, then fall back to its
- // id if no name is found.
- templateName = script.attr('data-template-name') || script.attr('id'),
- template = compile(script.html()),
- view, viewPath, elementId, options;
-
- if (templateName) {
- // For templates which have a name, we save them and then remove them from the DOM
- Ember.TEMPLATES[templateName] = template;
-
- // Remove script tag from DOM
- script.remove();
- } else {
- if (script.parents('head').length !== 0) {
- // don't allow inline templates in the head
- throw new Ember.Error("Template found in <head> without a name specified. " +
- "Please provide a data-template-name attribute.\n" +
- script.html());
- }
-
- // For templates which will be evaluated inline in the HTML document, instantiates a new
- // view, and replaces the script tag holding the template with the new
- // view's DOM representation.
- //
- // Users can optionally specify a custom view subclass to use by setting the
- // data-view attribute of the script tag.
- viewPath = script.attr('data-view');
- view = viewPath ? Ember.get(viewPath) : Ember.View;
-
- // Get the id of the script, used by Ember.View's elementId property,
- // Look for data-element-id attribute.
- elementId = script.attr('data-element-id');
-
- options = { template: template };
- if (elementId) { options.elementId = elementId; }
-
- view = view.create(options);
-
- view._insertElementLater(function() {
- script.replaceWith(this.$());
-
- // Avoid memory leak in IE
- script = null;
- });
- }
- });
-};
-
-/** @private */
-function bootstrap() {
- Ember.Handlebars.bootstrap( Ember.$(document) );
-}
-
-/*
- We tie this to application.load to ensure that we've at least
- attempted to bootstrap at the point that the application is loaded.
-
- We also tie this to document ready since we're guaranteed that all
- the inline templates are present at this point.
-
- There's no harm to running this twice, since we remove the templates
- from the DOM after processing.
-*/
-
-Ember.$(document).ready(bootstrap);
-Ember.onLoad('application', bootstrap);
-
-})();
-
-
-
-(function() {
-// ==========================================================================
-// Project: Ember Handlebars Views
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
-// Version: v1.0.pre
-// Last commit: 7955b85 (2012-08-03 14:50:17 -0700)
-
-
-(function() {
-// ==========================================================================
-// Project: Ember
-// Copyright: ©2011 Strobe Inc. and contributors.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-})();
-
diff --git a/SDL_Core/src/components/HMI/lib/ember-1.0.pre.min.js b/SDL_Core/src/components/HMI/lib/ember-1.0.pre.min.js
deleted file mode 100644
index 73375a7d5..000000000
--- a/SDL_Core/src/components/HMI/lib/ember-1.0.pre.min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// ==========================================================================
-// Project: Ember - JavaScript Application Framework
-// Copyright: ©2011-2012 Tilde Inc. and contributors
-// Portions ©2006-2011 Strobe Inc.
-// Portions ©2008-2011 Apple Inc. All rights reserved.
-// License: Licensed under MIT license (see license.js)
-// ==========================================================================
-
-
-// Version: v1.0.pre
-// Last commit: 7955b85 (2012-08-03 14:50:17 -0700)
-
-
-(function(){"undefined"==typeof Ember&&(Ember={}),"undefined"!=typeof window&&(window.Em=window.Ember=Em=Ember),Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.pre",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES!==!1,Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.CP_DEFAULT_CACHEABLE=Ember.ENV.CP_DEFAULT_CACHEABLE!==!1,Ember.VIEW_PRESERVES_CONTEXT=Ember.ENV.VIEW_PRESERVES_CONTEXT!==!1,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(a,b){return b}),"undefined"==typeof ember_assert&&(window.ember_assert=Ember.K),"undefined"==typeof ember_warn&&(window.ember_warn=Ember.K),"undefined"==typeof ember_deprecate&&(window.ember_deprecate=Ember.K),"undefined"==typeof ember_deprecateFunc&&(window.ember_deprecateFunc=function(a,b){return b}),Ember.Logger=window.console||{log:Ember.K,warn:Ember.K,error:Ember.K,info:Ember.K,debug:Ember.K}})(),function(){var a=function(a){return a&&Function.prototype.toString.call(a).indexOf("[native code]")>-1},b=a(Array.prototype.map)?Array.prototype.map:function(a){if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(typeof a!="function")throw new TypeError;var d=new Array(c),e=arguments[1];for(var f=0;f<c;f++)f in b&&(d[f]=a.call(e,b[f],f,b));return d},c=a(Array.prototype.forEach)?Array.prototype.forEach:function(a){if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(typeof a!="function")throw new TypeError;var d=arguments[1];for(var e=0;e<c;e++)e in b&&a.call(d,b[e],e,b)},d=a(Array.prototype.indexOf)?Array.prototype.indexOf:function(a,b){b===null||b===undefined?b=0:b<0&&(b=Math.max(0,this.length+b));for(var c=b,d=this.length;c<d;c++)if(this[c]===a)return c;return-1};Ember.ArrayPolyfills={map:b,forEach:c,indexOf:d};var e=Ember.EnumerableUtils={map:function(a,c,d){return a.map?a.map.call(a,c,d):b.call(a,c,d)},forEach:function(a,b,d){return a.forEach?a.forEach.call(a,b,d):c.call(a,b,d)},indexOf:function(a,b,c){return a.indexOf?a.indexOf.call(a,b,c):d.call(a,b,c)},indexesOf:function(a,b){return b===undefined?[]:e.map(b,function(b){return e.indexOf(a,b)})},removeObject:function(a,b){var c=e.indexOf(a,b);c!==-1&&a.splice(c,1)}};Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=b),Array.prototype.forEach||(Array.prototype.forEach=c),Array.prototype.indexOf||(Array.prototype.indexOf=d))}(),function(){var a=Ember.platform={};Ember.create=Object.create;if(!Ember.create){var b=function(){};Ember.create=function(a,c){b.prototype=a,a=new b;if(c){b.prototype=a;for(var d in c)b.prototype[d]=c[d].value;a=new b}return b.prototype=null,a},Ember.create.isSimulated=!0}var c=Object.defineProperty,d,e;if(c)try{c({},"a",{get:function(){}})}catch(f){c=null}c&&(d=function(){var a={};return c(a,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),c(a,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),a.a===!0}(),e=function(){try{return c(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(a){}return!1}(),d?e||(c=function(a,b,c){var d;return typeof Node=="object"?d=a instanceof Node:d=typeof a=="object"&&typeof a.nodeType=="number"&&typeof a.nodeName=="string",d?a[b]=c.value:Object.defineProperty(a,b,c)}):c=null),a.defineProperty=c,a.hasPropertyAccessors=!0,a.defineProperty||(a.hasPropertyAccessors=!1,a.defineProperty=function(a,b,c){c.get||(a[b]=c.value)},a.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!a.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){function m(a){this.descs={},this.watching={},this.cache={},this.source=a}function n(a,b){return!!a&&typeof a[b]=="function"}var a=Ember.platform.defineProperty,b=Ember.create,c="__ember"+ +(new Date),d=0,e=[],f={},g=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=c;var h={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,f){f||(f="ember");var g=f+d++;return e&&(h.value=g,a(e,c,h)),g},Ember.guidFor=function(g){if(g===undefined)return"(undefined)";if(g===null)return"(null)";var i,j,k=typeof g;switch(k){case"number":return j=e[g],j||(j=e[g]="nu"+g),j;case"string":return j=f[g],j||(j=f[g]="st"+d++),j;case"boolean":return g?"(true)":"(false)";default:if(g[c])return g[c];if(g===Object)return"(Object)";if(g===Array)return"(Array)";return j="ember"+d++,h.value=j,a(g,c,h),j}};var i={writable:!0,configurable:!1,enumerable:!1,value:null},j=Ember.GUID_KEY+"_meta";Ember.META_KEY=j;var k={descs:{},watching:{}};g&&(k.values={}),Ember.EMPTY_META=k,Object.freeze&&Object.freeze(k);var l=Ember.platform.defineProperty.isSimulated;l&&(m.prototype.__preventPlainObject__=!0),Ember.meta=function(d,e){var f=d[j];return e===!1?f||k:(f?f.source!==d&&(l||a(d,j,i),f=b(f),f.descs=b(f.descs),f.watching=b(f.watching),f.cache={},f.source=d,g&&(f.values=b(f.values)),d[j]=f):(l||a(d,j,i),f=new m(d),g&&(f.values={}),d[j]=f,f.descs.constructor=null),f)},Ember.getMeta=function(b,c){var d=Ember.meta(b,!1);return d[c]},Ember.setMeta=function(b,c,d){var e=Ember.meta(b,!0);return e[c]=d,d},Ember.metaPath=function(c,d,e){var f=Ember.meta(c,e),g,h;for(var i=0,j=d.length;i<j;i++){g=d[i],h=f[g];if(!h){if(!e)return undefined;h=f[g]={__ember_source__:c}}else if(h.__ember_source__!==c){if(!e)return undefined;h=f[g]=b(h),h.__ember_source__=c}f=h}return h},Ember.wrap=function(a,b){function c(){}var d=function(){var d,e=this._super;return this._super=b||c,d=a.apply(this,arguments),this._super=e,d};return d.base=a,d},Ember.isArray=function(a){return!a||a.setInterval?!1:Array.isArray&&Array.isArray(a)?!0:Ember.Array&&Ember.Array.detect(a)?!0:a.length!==undefined&&"object"==typeof a?!0:!1},Ember.makeArray=function(a){return a===null||a===undefined?[]:Ember.isArray(a)?a:[a]},Ember.canInvoke=n,Ember.tryInvoke=function(a,b,c){if(n(a,b))return a[b].apply(a,c)}}(),function(){var a=Ember.guidFor,b=Ember.ArrayPolyfills.indexOf,c=function(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},d=function(a,b){var d=a.keys.copy(),e=c(a.values);return b.keys=d,b.values=e,b},e=Ember.OrderedSet=function(){this.clear()};e.create=function(){return new e},e.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(b){var c=a(b),d=this.presenceSet,e=this.list;if(c in d)return;d[c]=!0,e.push(b)},remove:function(c){var d=a(c),e=this.presenceSet,f=this.list;delete e[d];var g=b.call(f,c);g>-1&&f.splice(g,1)},isEmpty:function(){return this.list.length===0},forEach:function(a,b){var c=this.list.slice();for(var d=0,e=c.length;d<e;d++)a.call(b,c[d])},toArray:function(){return this.list.slice()},copy:function(){var a=new e;return a.presenceSet=c(this.presenceSet),a.list=this.list.slice(),a}};var f=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};f.create=function(){return new f},f.prototype={get:function(b){var c=this.values,d=a(b);return c[d]},set:function(b,c){var d=this.keys,e=this.values,f=a(b);d.add(b),e[f]=c},remove:function(b){var c=this.keys,d=this.values,e=a(b),f;return d.hasOwnProperty(e)?(c.remove(b),f=d[e],delete d[e],!0):!1},has:function(b){var c=this.values,d=a(b);return c.hasOwnProperty(d)},forEach:function(b,c){var d=this.keys,e=this.values;d.forEach(function(d){var f=a(d);b.call(c,d,e[f])})},copy:function(){return d(this,new f)}};var g=Ember.MapWithDefault=function(a){f.call(this),this.defaultValue=a.defaultValue};g.create=function(a){return a?new g(a):new f},g.prototype=Ember.create(f.prototype),g.prototype.get=function(a){var b=this.has(a);if(b)return f.prototype.get.call(this,a);var c=this.defaultValue(a);return this.set(a,c),c},g.prototype.copy=function(){return d(this,new g({defaultValue:this.defaultValue}))}}(),function(){function i(a){return a.match(h)[0]}function j(a,c){var d=g.test(c),e=!d&&f.test(c),h;if(!a||e)a=window;d&&(c=c.slice(5)),a===window&&(h=i(c),a=b(a,h),c=c.slice(h.length+1));if(!c||c.length===0)throw new Error("Invalid Path");return[a,c]}function k(a,c){var d,e,f,h,i;if(a===null&&c.indexOf(".")===-1)return b(window,c);d=g.test(c);if(!a||d)f=j(a,c),a=f[0],c=f[1],f.length=0;e=c.split("."),i=e.length;for(h=0;a&&h<i;h++){a=b(a,e[h],!0);if(a&&a.isDestroyed)return undefined}return a}function l(a,b,d,e){var f;f=b.slice(b.lastIndexOf(".")+1),b=b.slice(0,b.length-(f.length+1)),b!=="this"&&(a=k(a,b));if(!f||f.length===0)throw new Error("You passed an empty path");if(!a){if(e)return;throw new Error("Object in path "+b+" could not be found or was destroyed.")}return c(a,f,d)}var a=Ember.META_KEY,b,c,d=Ember.ENV.MANDATORY_SETTER,e=/^([A-Z$]|([0-9][A-Z$]))/,f=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,g=/^this[\.\*]/,h=/^([^\.\*]+)/;b=function(c,e){if(e==="")return c;!e&&"string"==typeof c&&(e=c,c=null);if(!c||e.indexOf(".")!==-1)return k(c,e);var f=c[a],g=f&&f.descs[e],h;return g?g.get(c,e):(d&&f&&f.watching[e]>0?h=f.values[e]:h=c[e],h!==undefined||"object"!=typeof c||e in c||"function"!=typeof c.unknownProperty?h:c.unknownProperty(e))},c=function(c,e,f,g){typeof c=="string"&&(f=e,e=c,c=null);if(!c||e.indexOf(".")!==-1)return l(c,e,f,g);var h=c[a],i=h&&h.descs[e],j,k;return i?i.set(c,e,f):(j="object"==typeof c&&!(e in c),j&&"function"==typeof c.setUnknownProperty?c.setUnknownProperty(e,f):h&&h.watching[e]>0?(d?k=h.values[e]:k=c[e],f!==k&&(Ember.propertyWillChange(c,e),d?k!==undefined||e in c?h.values[e]=f:Ember.defineProperty(c,e,null,f):c[e]=f,Ember.propertyDidChange(c,e))):c[e]=f),f},Ember.normalizeTuple=function(a,b){return j(a,b)},Ember.getWithDefault=function(a,c,d){var e=b(a,c);return e===undefined?d:e},Ember.get=b,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get),Ember.set=c,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(a,b,d){return c(a,b,d,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet),Ember.isGlobalPath=function(a){return e.test(a)},Ember.config.overrideAccessors&&(Ember.config.overrideAccessors(),b=Ember.get,c=Ember.set)}(),function(){var a=Ember.GUID_KEY,b=Ember.META_KEY,c=Ember.EMPTY_META,d=Ember.meta,e=Ember.create,f=Ember.platform.defineProperty,g=Ember.ENV.MANDATORY_SETTER,h=Ember.Descriptor=function(){};Ember.defineProperty=function(a,c,e,h,i){var j,k,l,m;return i||(i=d(a)),j=i.descs,k=i.descs[c],l=i.watching[c]>0,k instanceof Ember.Descriptor&&k.teardown(a,c),e instanceof Ember.Descriptor?(m=e,j[c]=e,g&&l?f(a,c,{configurable:!0,enumerable:!0,writable:!0,value:undefined}):a[c]=undefined,e.setup(a,c)):(j[c]=undefined,e==null?(m=h,g&&l?(i.values[c]=h,f(a,c,{configurable:!0,enumerable:!0,set:function(){},get:function(){var a=this[b];return a&&a.values[c]}})):a[c]=h):(m=e,f(a,c,e))),l&&Ember.overrideChains(a,c,i),a.didDefineProperty&&a.didDefineProperty(a,c,m),this}}(),function(){function j(a,b,c,e){d&&!e?h.push(a,b,c):Ember.sendEvent(a,b,[a,c])}function k(){i.clear(),h.flush()}function l(b){return b+a}function m(a){return a+b}var a=":change",b=":before",c=Ember.guidFor,d=0,e=[].slice,f=function(){this.targetSet={}};f.prototype.add=function(a,b){var c=this.targetSet,d=Ember.guidFor(a),e=c[d];return e||(c[d]=e={}),e[b]?!1:e[b]=!0},f.prototype.clear=function(){this.targetSet={}};var g=function(){this.targetSet={},this.queue=[]};g.prototype.push=function(a,b,c){var d=this.targetSet,e=this.queue,f=Ember.guidFor(a),g=d[f],h;g||(d[f]=g={}),h=g[b],h===undefined?g[b]=e.push(Ember.deferEvent(a,b,[a,c]))-1:e[h]=Ember.deferEvent(a,b,[a,c])},g.prototype.flush=function(){var a=this.queue;this.queue=[],this.targetSet={};for(var b=0,c=a.length;b<c;++b)a[b]()};var h=new g,i=new f;Ember.beginPropertyChanges=function(){return d++,this},Ember.endPropertyChanges=function(){d--,d<=0&&k()},Ember.changeProperties=function(a,b){Ember.beginPropertyChanges();try{a.call(b)}finally{Ember.endPropertyChanges()}},Ember.setProperties=function(a,b){return Ember.changeProperties(function(){for(var c in b)b.hasOwnProperty(c)&&Ember.set(a,c,b[c])}),a},Ember.addObserver=function(a,b,c,d){return Ember.addListener(a,l(b),c,d),Ember.watch(a,b),this},Ember.observersFor=function(a,b){return Ember.listenersFor(a,l(b))},Ember.removeObserver=function(a,b,c,d){return Ember.unwatch(a,b),Ember.removeListener(a,l(b),c,d),this},Ember.addBeforeObserver=function(a,b,c,d){return Ember.addListener(a,m(b),c,d),Ember.watch(a,b),this},Ember._suspendBeforeObserver=function(a,b,c,d,e){return Ember._suspendListener(a,m(b),c,d,e)},Ember._suspendObserver=function(a,b,c,d,e){return Ember._suspendListener(a,l(b),c,d,e)},Ember.beforeObserversFor=function(a,b){return Ember.listenersFor(a,m(b))},Ember.removeBeforeObserver=function(a,b,c,d){return Ember.unwatch(a,b),Ember.removeListener(a,m(b),c,d),this},Ember.notifyObservers=function(a,b){if(a.isDestroying)return;j(a,l(b),b)},Ember.notifyBeforeObservers=function(a,b){if(a.isDestroying)return;var c,e,f=!1;if(d){if(!i.add(a,b))return;f=!0}j(a,m(b),b,f)}}(),function(){function n(a){return a.match(j)[0]}function o(a){return a==="*"||!k.test(a)}function q(b,c,d,e,f){var g=a(c);e[g]||(e[g]={});if(e[g][d])return;e[g][d]=!0;var h=f.deps;h=h&&h[d];if(h)for(var i in h){if(p[i])continue;b(c,i)}}function t(a,b,c){if(a.isDestroying)return;var d=r,e=!d;e&&(d=r={}),q(G,a,b,d,c),e&&(r=null)}function u(a,b,c){if(a.isDestroying)return;var d=s,e=!d;e&&(d=s={}),q(H,a,b,d,c),e&&(s=null)}function v(c,d,e){if(!c||"object"!=typeof c)return;var f=b(c),g=f.chainWatchers;if(!g||g.__emberproto__!==c)g=f.chainWatchers={__emberproto__:c};g[d]||(g[d]={}),g[d][a(e)]=e,Ember.watch(c,d)}function w(c,d,e){if(!c||"object"!=typeof c)return;var f=b(c,!1),g=f.chainWatchers;if(!g||g.__emberproto__!==c)return;g[d]&&delete g[d][a(e)],Ember.unwatch(c,d)}function y(){if(x.length===0)return;var a=x;x=[],i.call(a,function(a){a[0].add(a[1])})}function z(a){return b(a,!1).proto===a}function C(a){var c=b(a),d=c.chains;return d?d.value()!==a&&(d=c.chains=d.copy(a)):d=c.chains=new A(null,null,a),d}function D(a,b,c,d,e){var f=b.chainWatchers;if(!f||f.__emberproto__!==a)return;f=f[c];if(!f)return;for(var g in f){if(!f.hasOwnProperty(g))continue;f[g][d](e)}}function E(a,b,c){D(a,c,b,"willChange")}function F(a,b,c){D(a,c,b,"didChange")}function G(a,c,d){var e=b(a,!1),f=e.watching[c]>0||c==="length",g=e.proto,h=e.descs[c];if(!f)return;if(g===a)return;h&&h.willChange&&h.willChange(a,c),t(a,c,e),E(a,c,e),Ember.notifyBeforeObservers(a,c)}function H(a,c){var d=b(a,!1),e=d.watching[c]>0||c==="length",f=d.proto,g=d.descs[c];if(f===a)return;g&&g.didChange&&g.didChange(a,c);if(!e&&c!=="length")return;u(a,c,d),F(a,c,d),Ember.notifyObservers(a,c)}var a=Ember.guidFor,b=Ember.meta,c=Ember.get,d=Ember.set,e=Ember.normalizeTuple,f=Ember.GUID_KEY,g=Ember.META_KEY,h=Ember.notifyObservers,i=Ember.ArrayPolyfills.forEach,j=/^([^\.\*]+)/,k=/[\.\*]/,l=Ember.ENV.MANDATORY_SETTER,m=Ember.platform.defineProperty,p={__emberproto__:!0},r,s,x=[],A=function(a,b,c,d){var e;this._parent=a,this._key=b,this._watching=c===undefined,this._value=c,this._separator=d||".",this._paths={},this._watching&&(this._object=a.value(),this._object&&v(this._object,this._key,this)),this._parent&&this._parent._key==="@each"&&this.value()},B=A.prototype;B.value=function(){if(this._value===undefined&&this._watching){var a=this._parent.value();this._value=a&&!z(a)?c(a,this._key):undefined}return this._value},B.destroy=function(){if(this._watching){var a=this._object;a&&w(a,this._key,this),this._watching=!1}},B.copy=function(a){var b=new A(null,null,a,this._separator),c=this._paths,d;for(d in c){if(c[d]<=0)continue;b.add(d)}return b},B.add=function(a){var b,c,d,f,g,h;h=this._paths,h[a]=(h[a]||0)+1,b=this.value(),c=e(b,a);if(c[0]&&c[0]===b)a=c[1],d=n(a),a=a.slice(d.length+1);else{if(!c[0]){x.push([this,a]),c.length=0;return}f=c[0],d=a.slice(0,0-(c[1].length+1)),g=a.slice(d.length,d.length+1),a=c[1]}c.length=0,this.chain(d,a,f,g)},B.remove=function(a){var b,c,d,f,g;g=this._paths,g[a]>0&&g[a]--,b=this.value(),c=e(b,a),c[0]===b?(a=c[1],d=n(a),a=a.slice(d.length+1)):(f=c[0],d=a.slice(0,0-(c[1].length+1)),a=c[1]),c.length=0,this.unchain(d,a)},B.count=0,B.chain=function(a,b,c,d){var e=this._chains,f;e||(e=this._chains={}),f=e[a],f||(f=e[a]=new A(this,a,c,d)),f.count++,b&&b.length>0&&(a=n(b),b=b.slice(a.length+1),f.chain(a,b))},B.unchain=function(a,b){var c=this._chains,d=c[a];b&&b.length>1&&(a=n(b),b=b.slice(a.length+1),d.unchain(a,b)),d.count--,d.count<=0&&(delete c[d._key],d.destroy())},B.willChange=function(){var a=this._chains;if(a)for(var b in a){if(!a.hasOwnProperty(b))continue;a[b].willChange()}this._parent&&this._parent.chainWillChange(this,this._key,1)},B.chainWillChange=function(a,b,c){this._key&&(b=this._key+this._separator+b),this._parent?this._parent.chainWillChange(this,b,c+1):(c>1&&Ember.propertyWillChange(this.value(),b),b="this."+b,this._paths[b]>0&&Ember.propertyWillChange(this.value(),b))},B.chainDidChange=function(a,b,c){this._key&&(b=this._key+this._separator+b),this._parent?this._parent.chainDidChange(this,b,c+1):(c>1&&Ember.propertyDidChange(this.value(),b),b="this."+b,this._paths[b]>0&&Ember.propertyDidChange(this.value(),b))},B.didChange=function(a){if(this._watching){var b=this._parent.value();b!==this._object&&(w(this._object,this._key,this),this._object=b,v(b,this._key,this)),this._value=undefined,this._parent&&this._parent._key==="@each"&&this.value()}var c=this._chains;if(c)for(var d in c){if(!c.hasOwnProperty(d))continue;c[d].didChange(a)}if(a)return;this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.overrideChains=function(a,b,c){D(a,c,b,"didChange",!0)},Ember.watch=function(a,c){if(c==="length"&&Ember.typeOf(a)==="array")return this;var d=b(a),e=d.watching,f;return e[c]?e[c]=(e[c]||0)+1:(e[c]=1,o(c)?(f=d.descs[c],f&&f.willWatch&&f.willWatch(a,c),"function"==typeof a.willWatchProperty&&a.willWatchProperty(c),l&&c in a&&(d.values[c]=a[c],m(a,c,{configurable:!0,enumerable:!0,set:function(){},get:function(){var a=this[g];return a&&a.values[c]}}))):C(a).add(c)),this},Ember.isWatching=function(b,c){var d=b[g];return(d&&d.watching[c])>0},Ember.watch.flushPending=y,Ember.unwatch=function(a,c){if(c==="length"&&Ember.typeOf(a)==="array")return this;var d=b(a),e=d.watching,f;return e[c]===1?(e[c]=0,o(c)?(f=d.descs[c],f&&f.didUnwatch&&f.didUnwatch(a,c),"function"==typeof a.didUnwatchProperty&&a.didUnwatchProperty(c),l&&c in a&&(m(a,c,{configurable:!0,enumerable:!0,writable:!0,value:d.values[c]}),delete d.values[c])):C(a).remove(c)):e[c]>1&&e[c]--,this},Ember.rewatch=function(a){var c=b(a,!1),d=c.chains;return f in a&&!a.hasOwnProperty(f)&&Ember.generateGuid(a,"ember"),d&&d.value()!==a&&(c.chains=d.copy(a)),this},Ember.finishChains=function(a){var c=b(a,!1),d=c.chains;d&&(d.value()!==a&&(c.chains=d=d.copy(a)),d.didChange(!0))},Ember.propertyWillChange=G,Ember.propertyDidChange=H;var I=[];Ember.destroy=function(a){var b=a[g],c,d,e,f;if(b){a[g]=null,c=b.chains;if(c){I.push(c);while(I.length>0){c=I.pop(),d=c._chains;if(d)for(e in d)d.hasOwnProperty(e)&&I.push(d[e]);c._watching&&(f=c._object,f&&w(f,c._key,c))}}}}}(),function(){function i(a,b,c){var d=b[c];return d?d.__emberproto__!==a&&(d=b[c]=e(d),d.__emberproto__=a):d=b[c]={__emberproto__:a},d}function j(a,b){var c=b.deps;return c?c.__emberproto__!==a&&(c=b.deps=e(c),c.__emberproto__=a):c=b.deps={__emberproto__:a},c}function k(a,b,c,d){var e=a._dependentKeys,f,h,k,l,m;if(!e)return;f=j(b,d);for(h=0,k=e.length;h<k;h++)l=e[h],m=i(b,f,l),m[c]=(m[c]||0)+1,g(b,l)}function l(a,b,c,d){var e=a._dependentKeys,f,g,k,l,m;if(!e)return;f=j(b,d);for(g=0,k=e.length;g<k;g++)l=e[g],m=i(b,f,l),m[c]=(m[c]||0)-1,h(b,l)}function m(a,b){this.func=a,this._cacheable=b&&b.cacheable!==undefined?b.cacheable:Ember.CP_DEFAULT_CACHEABLE,this._dependentKeys=b&&b.dependentKeys}var a=Ember.get,b=Ember.meta,c=Ember.guidFor,d=[].slice,e=Ember.create,f=Ember.META_KEY,g=Ember.watch,h=Ember.unwatch;Ember.ComputedProperty=m,m.prototype=new Ember.Descriptor;var n=m.prototype;n.cacheable=function(a){return this._cacheable=a!==!1,this},n.volatile=function(){return this.cacheable(!1)},n.property=function(){var a=[];for(var b=0,c=arguments.length;b<c;b++)a.push(arguments[b]);return this._dependentKeys=a,this},n.meta=function(a){return arguments.length===0?this._meta||{}:(this._meta=a,this)},n.willWatch=function(a,b){var c=a[f];b in c.cache||k(this,a,b,c)},n.didUnwatch=function(a,b){var c=a[f];b in c.cache||l(this,a,b,c)},n.didChange=function(a,c){if(this._cacheable&&this._suspended!==a){var d=b(a);c in d.cache&&(delete d.cache[c],d.watching[c]||l(this,a,c,d))}},n.get=function(a,c){var d,e,f;if(this._cacheable){f=b(a),e=f.cache;if(c in e)return e[c];d=e[c]=this.func.call(a,c),f.watching[c]||k(this,a,c,f)}else d=this.func.call(a,c);return d},n.set=function(a,c,d){var e=this._cacheable,f=b(a,e),g=f.watching[c],h=this._suspended,i,j;return this._suspended=a,g&&Ember.propertyWillChange(a,c),e&&c in f.cache&&(delete f.cache[c],i=!0),j=this.func.call(a,c,d),e&&(!g&&!i&&k(this,a,c,f),f.cache[c]=j),g&&Ember.propertyDidChange(a,c),this._suspended=h,j},n.setup=function(a,c){var d=a[f];d&&d.watching[c]&&k(this,a,c,b(a))},n.teardown=function(a,c){var d=b(a);return(d.watching[c]||c in d.cache)&&l(this,a,c,d),this._cacheable&&delete d.cache[c],null},Ember.computed=function(a){var b;arguments.length>1&&(b=d.call(arguments,0,-1),a=d.call(arguments,-1)[0]);var c=new m(a);return b&&c.property.apply(c,b),c},Ember.cacheFor=function(c,d){var e=b(c,!1).cache;if(e&&d in e)return e[d]},Ember.computed.not=function(b){return Ember.computed(b,function(c){return!a(this,b)}).cacheable()},Ember.computed.empty=function(b){return Ember.computed(b,function(c){var d=a(this,b);return d===undefined||d===null||d===""||Ember.isArray(d)&&a(d,"length")===0}).cacheable()},Ember.computed.bool=function(b){return Ember.computed(b,function(c){return!!a(this,b)}).cacheable()}}(),function(){function f(a,b,e,f){return c(a,["listeners",b,d(e)],f)}function g(a,c){var d=b(a,!1).listeners;return d?d[c]||!1:!1}function i(a,b,c,d){var e=g(a,b);if(!e)return!1;for(var f in e){if(h[f])continue;var i=e[f];if(i)for(var j in i){if(h[j])continue;var k=i[j];if(k&&c(k,d,a)===!0)return!0}}return!1}function j(a,b,c){var d=a.method,e=a.target;e||(e=c),"string"==typeof d&&(d=e[d]),b?d.apply(e,b):d.apply(e)}function k(a,b,c,e){!e&&"function"==typeof c&&(e=c,c=null);var g=f(a,b,c,!0),h=d(e);g[h]||(g[h]={target:c,method:e}),"function"==typeof a.didAddListener&&a.didAddListener(b,c,e)}function l(a,b,c,e){!e&&"function"==typeof c&&(e=c,c=null);var g=f(a,b,c,!0),h=d(e);g&&g[h]&&(g[h]=null),"function"==typeof a.didRemoveListener&&a.didRemoveListener(b,c,e)}function m(a,b,c,e,g){!e&&"function"==typeof c&&(e=c,c=null);var h=f(a,b,c,!0),i=d(e),j=h&&h[i];h[i]=null;try{return g.call(c)}finally{h[i]=j}}function n(a){var c=b(a,!1).listeners,d=[];if(c)for(var e in c)!h[e]&&c[e]&&d.push(e);return d}function o(a,b,c){return a!==Ember&&"function"==typeof a.sendEvent&&a.sendEvent(b,c),i(a,b,j,c),!0}function p(a,b,c){var d=[];return i(a,b,function(a){d.push(a)}),function(){if(a.isDestroyed)return;a!==Ember&&"function"==typeof a.sendEvent&&a.sendEvent(b,c);for(var e=0,f=d.length;e<f;++e)j(d[e],c,a)}}function q(a,b){if(i(a,b,function(){return!0}))return!0;var d=c(a,["listeners"],!0);return d[b]=null,!1}function r(a,b){var c=[];return i(a,b,function(a){c.push([a.target,a.method])}),c}var a=Ember.create,b=Ember.meta,c=Ember.metaPath,d=Ember.guidFor,e=[].slice,h={__ember_source__:!0};Ember.addListener=k,Ember.removeListener=l,Ember._suspendListener=m,Ember.sendEvent=o,Ember.hasListeners=q,Ember.watchedEvents=n,Ember.listenersFor=r,Ember.deferEvent=p}(),function(){function c(b,c,d,e){c===undefined&&(c=b,b=undefined),"string"==typeof c&&(c=b[c]),d&&e>0&&(d=d.length>e?a.call(d,e):null);if("function"!=typeof Ember.onerror)return c.apply(b||this,d||[]);try{return c.apply(b||this,d||[])}catch(f){Ember.onerror(f)}}function h(){g=null,f.currentRunLoop&&f.end()}function k(){j=null;var a=+(new Date),b=-1;for(var d in i){if(!i.hasOwnProperty(d))continue;var e=i[d];if(e&&e.expires)if(a>=e.expires)delete i[d],c(e.target,e.method,e.args,2);else if(b<0||e.expires<b)b=e.expires}b>0&&(j=setTimeout(k,b- +(new Date)))}function l(a,b){b[this.tguid]&&delete b[this.tguid][this.mguid],i[a]&&c(this.target,this.method,this.args,2),delete i[a]}function n(){m=null;for(var a in i){if(!i.hasOwnProperty(a))continue;var b=i[a];b.next&&(delete i[a],c(b.target,b.method,b.args,2))}}var a=[].slice,b=Ember.ArrayPolyfills.forEach,d,e=function(a){this._prev=a||null,this.onceTimers={}};e.prototype={end:function(){this.flush()},prev:function(){return this._prev},schedule:function(b,c,d){var e=this._queues,f;e||(e=this._queues={}),f=e[b],f||(f=e[b]=[]);var g=arguments.length>3?a.call(arguments,3):null;return f.push({target:c,method:d,args:g}),this},flush:function(a){function j(a){c(a.target,a.method,a.args)}var e,f,g,h,i;if(!this._queues)return this;Ember.watch.flushPending();if(a)while(this._queues&&(h=this._queues[a])){this._queues[a]=null;if(a==="sync"){i=Ember.LOG_BINDINGS,i&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges();try{b.call(h,j)}finally{Ember.endPropertyChanges()}i&&Ember.Logger.log("End: Flush Sync Queue")}else b.call(h,j)}else{e=Ember.run.queues,g=e.length,f=0;a:while(f<g){a=e[f],h=this._queues&&this._queues[a],delete this._queues[a];if(h)if(a==="sync"){i=Ember.LOG_BINDINGS,i&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges();try{b.call(h,j)}finally{Ember.endPropertyChanges()}i&&Ember.Logger.log("End: Flush Sync Queue")}else b.call(h,j);for(var k=0;k<=f;k++)if(this._queues&&this._queues[e[k]]){f=k;continue a}f++}}return d=null,this}},Ember.RunLoop=e,Ember.run=function(a,b){var d,e;f.begin();try{if(a||b)d=c(a,b,arguments,2)}finally{f.end()}return d};var f=Ember.run;Ember.run.begin=function(){f.currentRunLoop=new e(f.currentRunLoop)},Ember.run.end=function(){try{f.currentRunLoop.end()}finally{f.currentRunLoop=f.currentRunLoop.prev()}},Ember.run.queues=["sync","actions","destroy","timers"],Ember.run.schedule=function(a,b,c){var d=f.autorun();d.schedule.apply(d,arguments)};var g;Ember.run.hasScheduledTimers=function(){return!!(g||j||m)},Ember.run.cancelTimers=function(){g&&(clearTimeout(g),g=null),j&&(clearTimeout(j),j=null),m&&(clearTimeout(m),m=null),i={}},Ember.run.autorun=function(){return f.currentRunLoop||(f.begin(),g||(g=setTimeout(h,1))),f.currentRunLoop},Ember.run.sync=function(){f.autorun(),f.currentRunLoop.flush("sync")};var i={},j;Ember.run.later=function(b,c){var d,e,g,h,j;return arguments.length===2&&"function"==typeof b?(j=c,c=b,b=undefined,d=[b,c]):(d=a.call(arguments),j=d.pop()),e=+(new Date)+j,g={target:b,method:c,expires:e,args:d},h=Ember.guidFor(g),i[h]=g,f.once(i,k),h},Ember.run.once=function(b,c){var d=Ember.guidFor(b),e=Ember.guidFor(c),g=f.autorun().onceTimers,h=g[d]&&g[d][e],j;return h&&i[h]?i[h].args=a.call(arguments):(j={target:b,method:c,args:a.call(arguments),tguid:d,mguid:e},h=Ember.guidFor(j),i[h]=j,g[d]||(g[d]={}),g[d][e]=h,f.schedule("actions",j,l,h,g)),h};var m;Ember.run.next=function(b,c){var d,e={target:b,method:c,args:a.call(arguments),next:!0};return d=Ember.guidFor(e),i[d]=e,m||(m=setTimeout(n,1)),d},Ember.run.cancel=function(a){delete i[a]}}(),function(){function e(b,c){return a(d(c)?window:b,c)}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}Ember.LOG_BINDINGS=!!Ember.ENV.LOG_BINDINGS;var a=Ember.get,b=Ember.set,c=Ember.guidFor,d=Ember.isGlobalPath,f=function(a,b){this._direction="fwd",this._from=b,this._to=a,this._directionMap=Ember.Map.create()};f.prototype={copy:function(){var a=new f(this._to,this._from);return this._oneWay&&(a._oneWay=!0),a},from:function(a){return this._from=a,this},to:function(a){return this._to=a,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var a=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+c(this)+">("+this._from+" -> "+this._to+")"+a},connect:function(a){var b=this._from,c=this._to;return Ember.trySet(a,c,e(a,b)),Ember.addObserver(a,b,this,this.fromDidChange),this._oneWay||Ember.addObserver(a,c,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(a){var b=!this._oneWay;return Ember.removeObserver(a,this._from,this,this.fromDidChange),b&&Ember.removeObserver(a,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(a){this._scheduleSync(a,"fwd")},toDidChange:function(a){this._scheduleSync(a,"back")},_scheduleSync:function(a,b){var c=this._directionMap,d=c.get(a);d||(Ember.run.schedule("sync",this,this._sync,a),c.set(a,b)),d==="back"&&b==="fwd"&&c.set(a,"fwd")},_sync:function(b){var c=Ember.LOG_BINDINGS;if(b.isDestroyed||!this._readyToSync)return;var d=this._directionMap,f=d.get(b),g=this._from,h=this._to;d.remove(b);if(f==="fwd"){var i=e(b,this._from);c&&Ember.Logger.log(" ",this.toString(),"->",i,b),this._oneWay?Ember.trySet(b,h,i):Ember._suspendObserver(b,h,this,this.toDidChange,function(){Ember.trySet(b,h,i)})}else if(f==="back"){var j=a(b,this._to);c&&Ember.Logger.log(" ",this.toString(),"<-",j,b),Ember._suspendObserver(b,g,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(g)?window:b,g,j)})}}},g(f,{from:function(){var a=this,b=new a;return b.from.apply(b,arguments)},to:function(){var a=this,b=new a;return b.to.apply(b,arguments)},oneWay:function(a,b){var c=this,d=new c(null,a);return d.oneWay(b)}}),Ember.Binding=f,Ember.bind=function(a,b,c){return(new Ember.Binding(b,c)).connect(a)},Ember.oneWay=function(a,b,c){return(new Ember.Binding(b,c)).oneWay().connect(a)}}(),function(){function o(a){var b=Ember.meta(a,!0),c=b.mixins;return c?c.__emberproto__!==a&&(c=b.mixins=l(c),c.__emberproto__=a):c=b.mixins={__emberproto__:a},c}function p(b,c){return c&&c.length>0&&(b.mixins=f.call(c,function(b){if(b instanceof a)return b;var c=new a;return c.properties=b,c})),b}function q(a){return"function"==typeof a&&a.isMethod!==!1&&a!==Boolean&&a!==Object&&a!==Number&&a!==Array&&a!==Date&&a!==String}function r(c,d,e,f,i){function v(a){delete e[a],delete f[a]}var j=c.length,k,l,m,o,p,s,t,u;for(k=0;k<j;k++){l=c[k];if(l instanceof a){m=n(l);if(d[m])continue;d[m]=l,o=l.properties}else o=l;if(o){u=f.concatenatedProperties||i.concatenatedProperties,o.concatenatedProperties&&(u=u?u.concat(o.concatenatedProperties):o.concatenatedProperties);for(s in o){if(!o.hasOwnProperty(s))continue;p=o[s];if(p instanceof Ember.Descriptor){if(p===b&&e[s])continue;e[s]=p,f[s]=undefined}else{if(q(p)){t=e[s]===undefined&&f[s],t||(t=i[s]),"function"!=typeof t&&(t=null);if(t){var w=p.__ember_observes__,x=p.__ember_observesBefore__;p=Ember.wrap(p,t),p.__ember_observes__=w,p.__ember_observesBefore__=x}}else if(u&&g.call(u,s)>=0||s==="concatenatedProperties"){var y=f[s]||i[s];p=y?y.concat(p):Ember.makeArray(p)}e[s]=undefined,f[s]=p}}o.hasOwnProperty("toString")&&(i.toString=o.toString)}else l.mixins&&(r(l.mixins,d,e,f,i),l._without&&h.call(l._without,v))}}function s(a){var b=Ember.meta(a),c=b.required;if(!c||c.__emberproto__!==a)c=b.required=c?l(c):{__ember_count__:0},c.__emberproto__=a;return c}function u(a,b,c,d){if(t.test(b)){var e=d.bindings;e?e.__emberproto__!==a&&(e=d.bindings=l(d.bindings),e.__emberproto__=a):e=d.bindings={__emberproto__:a},e[b]=c}}function v(a,b){var c=b.bindings,d,e,f;if(c){for(d in c)e=d!=="__emberproto__"&&c[d],e&&(f=d.slice(0,-7),e instanceof Ember.Binding?(e=e.copy(),e.to(f)):e=new Ember.Binding(f,e),e.connect(a),a[d]=e);b.bindings={__emberproto__:a}}}function w(a,b){return v(a,b||Ember.meta(a)),a}function x(a,d,e){var f={},g={},h=Ember.meta(a),i=h.required,j,l,n,p,q,t,v;r(d,o(a),f,g,a);for(j in g){if(j==="contructor")continue;if(!g.hasOwnProperty(j))continue;n=f[j],l=g[j];if(n===b)j in a||(i=s(a),i.__ember_count__++,i[j]=!0);else{while(n&&n instanceof c){var x=n.methodName;f[x]||g[x]?(l=g[x],n=f[x]):h.descs[x]?(n=h.descs[x],l=undefined):(n=undefined,l=a[x])}if(n===undefined&&l===undefined)continue;p=a[j];if("function"==typeof p)if(q=p.__ember_observesBefore__){t=q.length;for(v=0;v<t;v++)Ember.removeBeforeObserver(a,q[v],null,j)}else if(q=p.__ember_observes__){t=q.length;for(v=0;v<t;v++)Ember.removeObserver(a,q[v],null,j)}u(a,j,l,h),m(a,j,n,l,h);if("function"==typeof l)if(q=l.__ember_observesBefore__){t=q.length;for(v=0;v<t;v++)Ember.addBeforeObserver(a,q[v],null,j)}else if(q=l.__ember_observes__){t=q.length;for(v=0;v<t;v++)Ember.addObserver(a,q[v],null,j)}i&&i[j]&&(i=s(a),i.__ember_count__--,i[j]=!1)}}e||w(a,h);if(!e&&i&&i.__ember_count__>0){var y=[];for(j in i){if(k[j])continue;y.push(j)}}return a
-}function z(a,b,c){var d=n(a);if(c[d])return!1;c[d]=!0;if(a===b)return!0;var e=a.mixins,f=e?e.length:0;while(--f>=0)if(z(e[f],b,c))return!0;return!1}function A(a,b,c){if(c[n(b)])return;c[n(b)]=!0;if(b.properties){var d=b.properties;for(var e in d)d.hasOwnProperty(e)&&(a[e]=!0)}else b.mixins&&h.call(b.mixins,function(b){A(a,b,c)})}function D(a,b,c){var e=a.length;for(var f in b){if(!b.hasOwnProperty||!b.hasOwnProperty(f))continue;var g=b[f];a[e]=f;if(g&&g.toString===d)g[B]=a.join(".");else if(g&&C(g,"isNamespace")){if(c[n(g)])continue;c[n(g)]=!0,D(a,g,c)}}a.length=e}function E(){var a=Ember.Namespace,b,c;if(a.PROCESSED)return;for(var d in window){if(d==="globalStorage"&&window.StorageList&&window.globalStorage instanceof window.StorageList)continue;if(window.hasOwnProperty&&!window.hasOwnProperty(d))continue;try{b=window[d],c=b&&C(b,"isNamespace")}catch(e){continue}c&&(b[B]=d)}}var a,b,c,d,e,f=Ember.ArrayPolyfills.map,g=Ember.ArrayPolyfills.indexOf,h=Ember.ArrayPolyfills.forEach,i=[].slice,j={},k={__emberproto__:!0,__ember_count__:!0},l=Ember.create,m=Ember.defineProperty,n=Ember.guidFor,t=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(a){var b=i.call(arguments,1);return x(a,b,!1),a},Ember.Mixin=function(){return p(this,arguments)},a=Ember.Mixin,a._apply=x,a.applyPartial=function(a){var b=i.call(arguments,1);return x(a,b,!0)},a.finishPartial=w,a.create=function(){d.processed=!1;var a=this;return p(new a,arguments)};var y=a.prototype;y.reopen=function(){var b,c;this.properties?(b=a.create(),b.properties=this.properties,delete this.properties,this.mixins=[b]):this.mixins||(this.mixins=[]);var d=arguments.length,e=this.mixins,f;for(f=0;f<d;f++)b=arguments[f],b instanceof a?e.push(b):(c=a.create(),c.properties=b,e.push(c));return this},y.apply=function(a){return x(a,[this],!1)},y.applyPartial=function(a){return x(a,[this],!0)},y.detect=function(b){if(!b)return!1;if(b instanceof a)return z(b,this,{});var c=Ember.meta(b,!1).mixins;return c?!!c[n(this)]:!1},y.without=function(){var b=new a(this);return b._without=i.call(arguments),b},y.keys=function(){var a={},b={},c=[];A(a,this,b);for(var d in a)a.hasOwnProperty(d)&&c.push(d);return c};var B=Ember.GUID_KEY+"_name",C=Ember.get;Ember.identifyNamespaces=E,e=function(a){var b=a.superclass;if(b)return b[B]?b[B]:e(b);return},d=function(){var a=Ember.Namespace,b;if(a&&!this[B]&&!d.processed){a.PROCESSED||(E(),a.PROCESSED=!0),d.processed=!0;var c=a.NAMESPACES;for(var f=0,g=c.length;f<g;f++)b=c[f],D([b.toString()],b,{})}if(this[B])return this[B];var h=e(this);return h?"(subclass of "+h+")":"(unknown mixin)"},y.toString=d,a.mixins=function(a){var b=[],c=Ember.meta(a,!1).mixins,d,e;if(c)for(d in c){if(k[d])continue;e=c[d],e.properties||b.push(c[d])}return b},b=new Ember.Descriptor,b.toString=function(){return"(Required Property)"},Ember.required=function(){return b},c=function(a){this.methodName=a},c.prototype=new Ember.Descriptor,Ember.alias=function(a){return new c(a)},Ember.observer=function(a){var b=i.call(arguments,1);return a.__ember_observes__=b,a},Ember.immediateObserver=function(){for(var a=0,b=arguments.length;a<b;a++)var c=arguments[a];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(a){var b=i.call(arguments,1);return a.__ember_observesBefore__=b,a}}(),function(){}(),function(){}(),function(){function e(b,c,d,f){var g,h,i;if("object"!=typeof b||b===null)return b;if(c&&(h=a(d,b))>=0)return f[h];if(Ember.typeOf(b)==="array"){g=b.slice();if(c){h=g.length;while(--h>=0)g[h]=e(g[h],c,d,f)}}else if(Ember.Copyable&&Ember.Copyable.detect(b))g=b.copy(c,d,f);else{g={};for(i in b){if(!b.hasOwnProperty(i))continue;g[i]=c?e(b[i],c,d,f):b[i]}}return c&&(d.push(b),f.push(g)),g}var a=Ember.EnumerableUtils.indexOf,b={},c="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(c,function(a){b["[object "+a+"]"]=a.toLowerCase()});var d=Object.prototype.toString;Ember.typeOf=function(a){var c;return c=a===null||a===undefined?String(a):b[d.call(a)]||"object",c==="function"?Ember.Object&&Ember.Object.detect(a)&&(c="class"):c==="object"&&(a instanceof Error?c="error":Ember.Object&&a instanceof Ember.Object?c="instance":c="object"),c},Ember.none=function(a){return a===null||a===undefined},Ember.empty=function(a){return a===null||a===undefined||a.length===0&&typeof a!="function"},Ember.compare=function f(a,b){if(a===b)return 0;var c=Ember.typeOf(a),d=Ember.typeOf(b),e=Ember.Comparable;if(e){if(c==="instance"&&e.detect(a.constructor))return a.constructor.compare(a,b);if(d==="instance"&&e.detect(b.constructor))return 1-b.constructor.compare(b,a)}var g=Ember.ORDER_DEFINITION_MAPPING;if(!g){var h=Ember.ORDER_DEFINITION;g=Ember.ORDER_DEFINITION_MAPPING={};var i,j;for(i=0,j=h.length;i<j;++i)g[h[i]]=i;delete Ember.ORDER_DEFINITION}var k=g[c],l=g[d];if(k<l)return-1;if(k>l)return 1;switch(c){case"boolean":case"number":if(a<b)return-1;if(a>b)return 1;return 0;case"string":var m=a.localeCompare(b);if(m<0)return-1;if(m>0)return 1;return 0;case"array":var n=a.length,o=b.length,p=Math.min(n,o),q=0,r=0;while(q===0&&r<p)q=f(a[r],b[r]),r++;if(q!==0)return q;if(n<o)return-1;if(n>o)return 1;return 0;case"instance":if(Ember.Comparable&&Ember.Comparable.detect(a))return a.compare(a,b);return 0;case"date":var s=a.getTime(),t=b.getTime();if(s<t)return-1;if(s>t)return 1;return 0;default:return 0}},Ember.copy=function(a,b){return"object"!=typeof a||a===null?a:Ember.Copyable&&Ember.Copyable.detect(a)?a.copy(b):e(a,b,b?[]:null,b?[]:null)},Ember.inspect=function(a){var b,c=[];for(var d in a)if(a.hasOwnProperty(d)){b=a[d];if(b==="toString")continue;Ember.typeOf(b)==="function"&&(b="function() { ... }"),c.push(d+": "+b)}return"{"+c.join(" , ")+"}"},Ember.isEqual=function(a,b){return a&&"function"==typeof a.isEqual?a.isEqual(b):a===b},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),Ember.Error=function(){var a=Error.prototype.constructor.apply(this,arguments);for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);this.message=a.message},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){var a=/[ _]/g,b={},c=/([a-z])([A-Z])/g,d=/(\-|_|\s)+(.)?/g,e=/([a-z\d])([A-Z]+)/g,f=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(a,b){var c=0;return a.replace(/%@([0-9]+)?/g,function(a,d){return d=d?parseInt(d,0)-1:c++,a=b[d],(a===null?"(null)":a===undefined?"":a).toString()})},loc:function(a,b){return a=Ember.STRINGS[a]||a,Ember.String.fmt(a,b)},w:function(a){return a.split(/\s+/)},decamelize:function(a){return a.replace(c,"$1_$2").toLowerCase()},dasherize:function(c){var d=b,e=d[c];return e?e:(e=Ember.String.decamelize(c).replace(a,"-"),d[c]=e,e)},camelize:function(a){return a.replace(d,function(a,b,c){return c?c.toUpperCase():""})},classify:function(a){var b=Ember.String.camelize(a);return b.charAt(0).toUpperCase()+b.substr(1)},underscore:function(a){return a.replace(e,"$1_$2").replace(f,"_").toLowerCase()}}}(),function(){var a=Ember.String.fmt,b=Ember.String.w,c=Ember.String.loc,d=Ember.String.camelize,e=Ember.String.decamelize,f=Ember.String.dasherize,g=Ember.String.underscore;Ember.EXTEND_PROTOTYPES&&(String.prototype.fmt=function(){return a(this,arguments)},String.prototype.w=function(){return b(this)},String.prototype.loc=function(){return c(this,arguments)},String.prototype.camelize=function(){return d(this)},String.prototype.decamelize=function(){return e(this)},String.prototype.dasherize=function(){return f(this)},String.prototype.underscore=function(){return g(this)})}(),function(){var a=Array.prototype.slice;Ember.EXTEND_PROTOTYPES&&(Function.prototype.property=function(){var a=Ember.computed(this);return a.property.apply(a,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=a.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=a.call(arguments),this})}(),function(){}(),function(){function f(){return e.length===0?{}:e.pop()}function g(a){return e.push(a),null}function h(b,c){function e(e){var f=a(e,b);return d?c===f:!!f}var d=arguments.length===2;return e}var a=Ember.get,b=Ember.set,c=Array.prototype.slice,d=Ember.EnumerableUtils.indexOf,e=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(a(this,"length")===0)return undefined;var b=f(),c;return c=this.nextObject(0,null,b),g(b),c}).property("[]").cacheable(),lastObject:Ember.computed(function(){var b=a(this,"length");if(b===0)return undefined;var c=f(),d=0,e,h=null;do h=e,e=this.nextObject(d++,h,c);while(e!==undefined);return g(c),h}).property("[]").cacheable(),contains:function(a){return this.find(function(b){return b===a})!==undefined},forEach:function(b,c){if(typeof b!="function")throw new TypeError;var d=a(this,"length"),e=null,h=f();c===undefined&&(c=null);for(var i=0;i<d;i++){var j=this.nextObject(i,e,h);b.call(c,j,i,this),e=j}return e=null,h=g(h),this},getEach:function(a){return this.mapProperty(a)},setEach:function(a,c){return this.forEach(function(d){b(d,a,c)})},map:function(a,b){var c=[];return this.forEach(function(d,e,f){c[e]=a.call(b,d,e,f)}),c},mapProperty:function(b){return this.map(function(c){return a(c,b)})},filter:function(a,b){var c=[];return this.forEach(function(d,e,f){a.call(b,d,e,f)&&c.push(d)}),c},filterProperty:function(a,b){return this.filter(h.apply(this,arguments))},find:function(b,c){var d=a(this,"length");c===undefined&&(c=null);var e=null,h,i=!1,j,k=f();for(var l=0;l<d&&!i;l++){h=this.nextObject(l,e,k);if(i=b.call(c,h,l,this))j=h;e=h}return h=e=null,k=g(k),j},findProperty:function(a,b){return this.find(h.apply(this,arguments))},every:function(a,b){return!this.find(function(c,d,e){return!a.call(b,c,d,e)})},everyProperty:function(a,b){return this.every(h.apply(this,arguments))},some:function(a,b){return!!this.find(function(c,d,e){return!!a.call(b,c,d,e)})},someProperty:function(a,b){return this.some(h.apply(this,arguments))},reduce:function(a,b,c){if(typeof a!="function")throw new TypeError;var d=b;return this.forEach(function(b,e){d=a.call(null,d,b,e,this,c)},this),d},invoke:function(a){var b,d=[];return arguments.length>1&&(b=c.call(arguments,1)),this.forEach(function(c,e){var f=c&&c[a];"function"==typeof f&&(d[e]=b?f.apply(c,b):f.call(c))},this),d},toArray:function(){var a=[];return this.forEach(function(b,c){a[c]=b}),a},compact:function(){return this.without(null)},without:function(a){if(!this.contains(a))return this;var b=[];return this.forEach(function(c){c!==a&&(b[b.length]=c)}),b},uniq:function(){var a=[];return this.forEach(function(b){d(a,b)<0&&a.push(b)}),a},"[]":Ember.computed(function(a,b){return this}).property().cacheable(),addEnumerableObserver:function(b,c){var d=c&&c.willChange||"enumerableWillChange",e=c&&c.didChange||"enumerableDidChange",f=a(this,"hasEnumerableObservers");return f||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",b,d),Ember.addListener(this,"@enumerable:change",b,e),f||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(b,c){var d=c&&c.willChange||"enumerableWillChange",e=c&&c.didChange||"enumerableDidChange",f=a(this,"hasEnumerableObservers");return f&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",b,d),Ember.removeListener(this,"@enumerable:change",b,e),f&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}).property().cacheable(),enumerableContentWillChange:function(b,c){var d,e,f;return"number"==typeof b?d=b:b?d=a(b,"length"):d=b=-1,"number"==typeof c?e=c:c?e=a(c,"length"):e=c=-1,f=e<0||d<0||e-d!==0,b===-1&&(b=null),c===-1&&(c=null),Ember.propertyWillChange(this,"[]"),f&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,b,c]),this},enumerableContentDidChange:function(b,c){var d=this.propertyDidChange,e,f,g;return"number"==typeof b?e=b:b?e=a(b,"length"):e=b=-1,"number"==typeof c?f=c:c?f=a(c,"length"):f=c=-1,g=f<0||e<0||f-e!==0,b===-1&&(b=null),c===-1&&(c=null),Ember.sendEvent(this,"@enumerable:change",[this,b,c]),g&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function f(a){return a===null||a===undefined}var a=Ember.get,b=Ember.set,c=Ember.meta,d=Ember.EnumerableUtils.map,e=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(b){return b<0||b>=a(this,"length")?undefined:a(this,b)},objectsAt:function(a){var b=this;return d(a,function(a){return b.objectAt(a)})},nextObject:function(a){return this.objectAt(a)},"[]":Ember.computed(function(b,c){return c!==undefined&&this.replace(0,a(this,"length"),c),this}).property().cacheable(),firstObject:Ember.computed(function(){return this.objectAt(0)}).property().cacheable(),lastObject:Ember.computed(function(){return this.objectAt(a(this,"length")-1)}).property().cacheable(),contains:function(a){return this.indexOf(a)>=0},slice:function(b,c){var d=[],e=a(this,"length");f(b)&&(b=0);if(f(c)||c>e)c=e;while(b<c)d[d.length]=this.objectAt(b++);return d},indexOf:function(b,c){var d,e=a(this,"length");c===undefined&&(c=0),c<0&&(c+=e);for(d=c;d<e;d++)if(this.objectAt(d,!0)===b)return d;return-1},lastIndexOf:function(b,c){var d,e=a(this,"length");if(c===undefined||c>=e)c=e-1;c<0&&(c+=e);for(d=c;d>=0;d--)if(this.objectAt(d)===b)return d;return-1},addArrayObserver:function(b,c){var d=c&&c.willChange||"arrayWillChange",e=c&&c.didChange||"arrayDidChange",f=a(this,"hasArrayObservers");return f||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",b,d),Ember.addListener(this,"@array:change",b,e),f||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(b,c){var d=c&&c.willChange||"arrayWillChange",e=c&&c.didChange||"arrayDidChange",f=a(this,"hasArrayObservers");return f&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",b,d),Ember.removeListener(this,"@array:change",b,e),f&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}).property().cacheable(),arrayContentWillChange:function(b,c,d){b===undefined?(b=0,c=d=-1):(c===undefined&&(c=-1),d===undefined&&(d=-1)),Ember.isWatching(this,"@each")&&a(this,"@each"),Ember.sendEvent(this,"@array:before",[this,b,c,d]);var e,f;if(b>=0&&c>=0&&a(this,"hasEnumerableObservers")){e=[],f=b+c;for(var g=b;g<f;g++)e.push(this.objectAt(g))}else e=c;return this.enumerableContentWillChange(e,d),this},arrayContentDidChange:function(b,c,d){b===undefined?(b=0,c=d=-1):(c===undefined&&(c=-1),d===undefined&&(d=-1));var f,g;if(b>=0&&d>=0&&a(this,"hasEnumerableObservers")){f=[],g=b+d;for(var h=b;h<g;h++)f.push(this.objectAt(h))}else f=d;this.enumerableContentDidChange(c,f),Ember.sendEvent(this,"@array:change",[this,b,c,d]);var i=a(this,"length"),j=e(this,"firstObject"),k=e(this,"lastObject");return this.objectAt(0)!==j&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(i-1)!==k&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each}).property().cacheable()})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var a=Ember.get,b=Ember.set;Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return a(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var a=Ember.get,b=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return a(this,"isFrozen")?this:(b(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var a=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(b){return Ember.beginPropertyChanges(this),a(b,function(a){this.addObject(a)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(b){return Ember.beginPropertyChanges(this),a(b,function(a){this.removeObject(a)},this),Ember.endPropertyChanges(this),this}})}(),function(){var a="Index out of range",b=[],c=Ember.get,d=Ember.set,e=Ember.EnumerableUtils.forEach;Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var a=c(this,"length");return a===0?this:(this.replace(0,a,b),this)},insertAt:function(b,d){if(b>c(this,"length"))throw new Error(a);return this.replace(b,0,[d]),this},removeAt:function(d,e){var f=0;if("number"==typeof d){if(d<0||d>=c(this,"length"))throw new Error(a);e===undefined&&(e=1),this.replace(d,e,b)}return this},pushObject:function(a){return this.insertAt(c(this,"length"),a),a},pushObjects:function(a){return this.replace(c(this,"length"),0,a),this},popObject:function(){var a=c(this,"length");if(a===0)return null;var b=this.objectAt(a-1);return this.removeAt(a-1,1),b},shiftObject:function(){if(c(this,"length")===0)return null;var a=this.objectAt(0);return this.removeAt(0),a},unshiftObject:function(a){return this.insertAt(0,a),a},unshiftObjects:function(a){return this.replace(0,0,a),this},reverseObjects:function(){var a=c(this,"length");if(a===0)return this;var b=this.toArray().reverse();return this.replace(0,a,b),this},removeObject:function(a){var b=c(this,"length")||0;while(--b>=0){var d=this.objectAt(b);d===a&&this.removeAt(b)}return this},addObject:function(a){return this.contains(a)||this.pushObject(a),this}})}(),function(){var a=Ember.get,b=Ember.set,c=Ember.defineProperty;Ember.Observable=Ember.Mixin.create({isObserverable:!0,get:function(b){return a(this,b)},getProperties:function(){var b={},c=arguments;arguments.length===1&&Ember.typeOf(arguments[0])==="array"&&(c=arguments[0]);for(var d=0;d<c.length;d++)b[c[d]]=a(this,c[d]);return b},set:function(a,c){return b(this,a,c),this},setProperties:function(a){return Ember.setProperties(this,a)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(a){return Ember.propertyWillChange(this,a),this},propertyDidChange:function(a){return Ember.propertyDidChange(this,a),this},notifyPropertyChange:function(a){return this.propertyWillChange(a),this.propertyDidChange(a),this},addBeforeObserver:function(a,b,c){Ember.addBeforeObserver(this,a,b,c)},addObserver:function(a,b,c){Ember.addObserver(this,a,b,c)},removeObserver:function(a,b,c){Ember.removeObserver(this,a,b,c)},hasObserverFor:function(a){return Ember.hasListeners(this,a+":change")},unknownProperty:function(a){return undefined},setUnknownProperty:function(a,d){c(this,a),b(this,a,d)},getPath:function(a){return this.get(a)},setPath:function(a,b){return this.set(a,b)},getWithDefault:function(a,b){return Ember.getWithDefault(this,a,b)},incrementProperty:function(c,d){return d||(d=1),b(this,c,(a(this,c)||0)+d),a(this,c)},decrementProperty:function(c,d){return d||(d=1),b(this,c,(a(this,c)||0)-d),a(this,c)},toggleProperty:function(c){return b(this,c,!a(this,c)),a(this,c)},cacheFor:function(a){return Ember.cacheFor(this,a)},observersForKey:function(a){return Ember.observersFor(this,a)}})}(),function(){var a=Ember.get,b=Ember.set;Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,targetObject:Ember.computed(function(){var b=a(this,"target");if(Ember.typeOf(b)==="string"){var c=a(this,b);return c===undefined&&(c=a(window,b)),c}return b}).property("target").cacheable(),triggerAction:function(){var b=a(this,"action"),c=a(this,"targetObject");if(c&&b){var d;return typeof c.send=="function"?d=c.send(b,this):(typeof b=="string"&&(b=c[b]),d=b.call(c,this)),d!==!1&&(d=!0),d}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(a,b,c){Ember.addListener(this,a,b,c)},one:function(a,b,c){c||(c=b,b=null);var d=this,e=function(){Ember.removeListener(d,a,b,e),"string"==typeof c&&(c=this[c]),c.apply(this,arguments)};this.on(a,b,e)},trigger:function(a){var b=[],c,d;for(c=1,d=arguments.length;c<d;c++)b.push(arguments[c]);Ember.sendEvent(this,a,b)},fire:function(a){this.trigger.apply(this,arguments)},off:function(a,b,c){Ember.removeListener(this,a,b,c)},has:function(a){return Ember.hasListeners(this,a)}})}(),function(){}(),function(){function m(){var b=!1,c,d=function(){b||d.proto();var a=Ember.meta(this);a.proto=this,c&&(this.reopen.apply(this,c),c=null),e(this,Ember.GUID_KEY,l),e(this,"_super",l),j(this,a),delete a.proto,i(this),this.init.apply(this,arguments)};return d.toString=a,d.willReopen=function(){b&&(d.PrototypeMixin=Ember.Mixin.create(d.PrototypeMixin)),b=!1},d._initMixins=function(a){c=a},d.proto=function(){var a=d.superclass;return a&&a.proto(),b||(b=!0,d.PrototypeMixin.applyPartial(d.prototype),h(d.prototype)),this.prototype},d}var a=Ember.Mixin.prototype.toString,b=Ember.set,c=Ember.get,d=Ember.create,e=Ember.platform.defineProperty,f=Array.prototype.slice,g=Ember.meta,h=Ember.rewatch,i=Ember.finishChains,j=Ember.Mixin.finishPartial,k=Ember.Mixin.prototype.reopen,l={configurable:!0,writable:!0,enumerable:!1,value:undefined},n=m();n.PrototypeMixin=Ember.Mixin.create({reopen:function(){return Ember.Mixin._apply(this,arguments,!0),this},isInstance:!0,init:function(){},isDestroyed:!1,isDestroying:!1,destroy:function(){if(this.isDestroying)return;return this.isDestroying=!0,this.willDestroy&&this.willDestroy(),b(this,"isDestroyed",!0),Ember.run.schedule("destroy",this,this._scheduledDestroy),this},_scheduledDestroy:function(){Ember.destroy(this),this.didDestroy&&this.didDestroy()},bind:function(a,b){return b instanceof Ember.Binding||(b=Ember.Binding.from(b)),b.to(a).connect(this),b},toString:function(){return"<"+this.constructor.toString()+":"+Ember.guidFor(this)+">"}}),Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(n.PrototypeMixin),n.__super__=null;var o=Ember.Mixin.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var a=m(),b;return a.ClassMixin=Ember.Mixin.create(this.ClassMixin),a.PrototypeMixin=Ember.Mixin.create(this.PrototypeMixin),a.ClassMixin.ownerConstructor=a,a.PrototypeMixin.ownerConstructor=a,k.apply(a.PrototypeMixin,arguments),a.superclass=this,a.__super__=this.prototype,b=a.prototype=d(this.prototype),b.constructor=a,Ember.generateGuid(b,"ember"),g(b).proto=b,a.ClassMixin.apply(a),a},create:function(){var a=this;return arguments.length>0&&this._initMixins(arguments),new a},reopen:function(){return this.willReopen(),k.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return k.apply(this.ClassMixin,arguments),Ember.Mixin._apply(this,arguments,!1),this},detect:function(a){if("function"!=typeof a)return!1;while(a){if(a===this)return!0;a=a.superclass}return!1},detectInstance:function(a){return a instanceof this},metaForProperty:function(a){var b=g(this.proto(),!1).descs[a];return b._meta||{}},eachComputedProperty:function(a,b){var c=this.proto(),d=g(c).descs,e={},f;for(var h in d)f=d[h],f instanceof Ember.ComputedProperty&&a.call(b||this,h,f._meta||e)}});Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(o),n.ClassMixin=o,o.apply(n),Ember.CoreObject=n}(),function(){var a=Ember.get,b=Ember.set,c=Ember.guidFor,d=Ember.none;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var d=a(this,"length");if(d===0)return this;var e;this.enumerableContentWillChange(d,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var f=0;f<d;f++)e=c(this[f]),delete this[e],delete this[f];return b(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(d,0),this},isEqual:function(b){if(!Ember.Enumerable.detect(b))return!1;var c=a(this,"length");if(a(b,"length")!==c)return!1;while(--c>=0)if(!b.contains(this[c]))return!1;return!0},add:Ember.alias("addObject"),remove:Ember.alias("removeObject"),pop:function(){if(a(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var b=this.length>0?this[this.length-1]:null;return this.remove(b),b},push:Ember.alias("addObject"),shift:Ember.alias("pop"),unshift:Ember.alias("push"),addEach:Ember.alias("addObjects"),removeEach:Ember.alias("removeObjects"),init:function(a){this._super(),a&&this.addObjects(a)},nextObject:function(a){return this[a]},firstObject:Ember.computed(function(){return this.length>0?this[0]:undefined}).property().cacheable(),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:undefined}).property().cacheable(),addObject:function(e){if(a(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(d(e))return this;var f=c(e),g=this[f],h=a(this,"length"),i;return g>=0&&g<h&&this[g]===e?this:(i=[e],this.enumerableContentWillChange(null,i),Ember.propertyWillChange(this,"lastObject"),h=a(this,"length"),this[f]=h,this[h]=e,b(this,"length",h+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,i),this)},removeObject:function(e){if(a(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(d(e))return this;var f=c(e),g=this[f],h=a(this,"length"),i=g===0,j=g===h-1,k,l;return g>=0&&g<h&&this[g]===e&&(l=[e],this.enumerableContentWillChange(l,null),i&&Ember.propertyWillChange(this,"firstObject"),j&&Ember.propertyWillChange(this,"lastObject"),g<h-1&&(k=this[h-1],this[g]=k,this[c(k)]=g),delete this[f],delete this[h-1],b(this,"length",h-1),i&&Ember.propertyDidChange(this,"firstObject"),j&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(l,null)),this},contains:function(a){return this[c(a)]>=0},copy:function(){var d=this.constructor,e=new d,f=a(this,"length");b(e,"length",f);while(--f>=0)e[f]=this[f],e[c(this[f])]=f;return e},toString:function(){var a=this.length,b,c=[];for(b=0;b<a;b++)c[b]=this[b];return"Ember.Set<%@>".fmt(c.join(","))}})}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable)}(),function(){var a=Ember.ArrayPolyfills.indexOf;Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){return Ember.identifyNamespaces(),this[Ember.GUID_KEY+"_name"]},destroy:function(){var b=Ember.Namespace.NAMESPACES;window[this.toString()]=undefined,b.splice(a.call(b,this),1),this._super()}}),Ember.Namespace.NAMESPACES=[Ember],Ember.Namespace.PROCESSED=!1}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var a=Ember.get,b=Ember.set;Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed("content",function(){return a(this,"content")}).cacheable(),objectAtContent:function(b){return a(this,"arrangedContent").objectAt(b)},replaceContent:function(b,c,d){a(this,"arrangedContent").replace(b,c,d)},_contentWillChange:Ember.beforeObserver(function(){var b=a(this,"content");b&&b.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},"content"),contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){var b=a(this,"content"),c=b?a(b,"length"):0;b&&b.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},"content"),_arrangedContentWillChange:Ember.beforeObserver(function(){var b=a(this,"arrangedContent"),c=b?a(b,"length"):0;this.arrangedContentArrayWillChange(this,0,c,undefined),b&&b.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var b=a(this,"arrangedContent"),c=b?a(b,"length"):0;b&&b.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"}),this.arrangedContentArrayDidChange(this,0,undefined,c)},"arrangedContent"),objectAt:function(b){return a(this,"content")&&this.objectAtContent(b)},length:Ember.computed(function(){var b=a(this,"arrangedContent");return b?a(b,"length"):0}).property().cacheable(),replace:function(b,c,d){return a(this,"content")&&this.replaceContent(b,c,d),this},arrangedContentArrayWillChange:function(a,b,c,d){this.arrayContentWillChange(b,c,d)},arrangedContentArrayDidChange:function(a,b,c,d){this.arrayContentDidChange(b,c,d)},init:function(){this._super(),this._contentWillChange(),this._contentDidChange(),this._arrangedContentWillChange(),this._arrangedContentDidChange()}})}(),function(){function j(a,b){var c=b.slice(8);if(c in this)return;h(this,c)}function k(a,b){var c=b.slice(8);if(c in this)return;i(this,c)}var a=Ember.get,b=Ember.set,c=Ember.String.fmt,d=Ember.addBeforeObserver,e=Ember.addObserver,f=Ember.removeBeforeObserver,g=Ember.removeObserver,h=Ember.propertyWillChange,i=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),willWatchProperty:function(a){var b="content."+a;d(this,b,null,j),e(this,b,null,k)},didUnwatchProperty:function(a){var b="content."+a;f(this,b,null,j),g(this,b,null,k)},unknownProperty:function(b){var c=a(this,"content");if(c)return a(c,b)},setUnknownProperty:function(c,d){var e=a(this,"content");return b(e,c,d)}})}(),function(){function g(a,b,d,e,f){var g=d._objects,h;g||(g=d._objects={});while(--f>=e){var i=a.objectAt(f);i&&(Ember.addBeforeObserver(i,b,d,"contentKeyWillChange"),Ember.addObserver(i,b,d,"contentKeyDidChange"),h=c(i),g[h]||(g[h]=[]),g[h].push(f))}}function h(a,b,d,e,f){var g=d._objects;g||(g=d._objects={});var h,i;while(--f>=e){var j=a.objectAt(f);j&&(Ember.removeBeforeObserver(j,b,d,"contentKeyWillChange"),Ember.removeObserver(j,b,d,"contentKeyDidChange"),i=c(j),h=g[i],h[h.indexOf(f)]=null)}}var a=Ember.set,b=Ember.get,c=Ember.guidFor,d=Ember.EnumerableUtils.forEach,e=Ember.Object.extend(Ember.Array,{init:function(a,b,c){this._super(),this._keyName=b,this._owner=c,this._content=a},objectAt:function(a){var c=this._content.objectAt(a);return c&&b(c,this._keyName)},length:Ember.computed(function(){var a=this._content;return a?b(a,"length"):0}).property().cacheable()}),f=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(a){this._super(),this._content=a,a.addArrayObserver(this),d(Ember.watchedEvents(this),function(a){this.didAddListener(a)},this)},unknownProperty:function(a,b){var c;return c=new e(this._content,a,this),Ember.defineProperty(this,a,null,c),this.beginObservingContentKey(a),c},arrayWillChange:function(a,b,c,d){var e=this._keys,f,g,i;i=c>0?b+c:-1,Ember.beginPropertyChanges(this);for(f in e){if(!e.hasOwnProperty(f))continue;i>0&&h(a,f,this,b,i),Ember.propertyWillChange(this,f)}Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(a,b,c,d){var e=this._keys,f,h,i;i=d>0?b+d:-1,Ember.beginPropertyChanges(this);for(f in e){if(!e.hasOwnProperty(f))continue;i>0&&g(a,f,this,b,i),Ember.propertyDidChange(this,f)}Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(a){f.test(a)&&this.beginObservingContentKey(a.slice(0,-7))},didRemoveListener:function(a){f.test(a)&&this.stopObservingContentKey(a.slice(0,-7))},beginObservingContentKey:function(a){var c=this._keys;c||(c=this._keys={});if(!c[a]){c[a]=1;var d=this._content,e=b(d,"length");g(d,a,this,0,e)}else c[a]++},stopObservingContentKey:function(a){var c=this._keys;if(c&&c[a]>0&&--c[a]<=0){var d=this._content,e=b(d,"length");h(d,a,this,0,e)}},contentKeyWillChange:function(a,b){Ember.propertyWillChange(this,b)},contentKeyDidChange:function(a,b){Ember.propertyDidChange(this,b)}})}(),function(){var a=Ember.get,b=Ember.set,c=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(a){return a==="length"?this.length:"number"==typeof a?this[a]:this._super(a)},objectAt:function(a){return this[a]},replace:function(b,c,d){if(this.isFrozen)throw Ember.FROZEN_ERROR;var e=
-d?a(d,"length"):0;this.arrayContentWillChange(b,c,e);if(!d||d.length===0)this.splice(b,c);else{var f=[b,c].concat(d);this.splice.apply(this,f)}return this.arrayContentDidChange(b,c,e),this},unknownProperty:function(a,b){var c;return b!==undefined&&c===undefined&&(c=this[a]=b),c},indexOf:function(a,b){var c,d=this.length;b===undefined?b=0:b=b<0?Math.ceil(b):Math.floor(b),b<0&&(b+=d);for(c=b;c<d;c++)if(this[c]===a)return c;return-1},lastIndexOf:function(a,b){var c,d=this.length;b===undefined?b=d-1:b=b<0?Math.ceil(b):Math.floor(b),b<0&&(b+=d);for(c=b;c>=0;c--)if(this[c]===a)return c;return-1},copy:function(){return this.slice()}}),d=["length"];Ember.EnumerableUtils.forEach(c.keys(),function(a){Array.prototype[a]&&d.push(a)}),d.length>0&&(c=c.without.apply(c,d)),Ember.NativeArray=c,Ember.A=function(a){return a===undefined&&(a=[]),Ember.NativeArray.apply(a)},Ember.NativeArray.activate=function(){c.apply(Array.prototype),Ember.A=function(a){return a||[]}},Ember.EXTEND_PROTOTYPES&&Ember.NativeArray.activate()}(),function(){var a=Ember.get,b=Ember.set;Ember._PromiseChain=Ember.Object.extend({promises:null,failureCallback:Ember.K,successCallback:Ember.K,abortCallback:Ember.K,promiseSuccessCallback:Ember.K,runNextPromise:function(){if(a(this,"isDestroyed"))return;var b=a(this,"promises").shiftObject();if(b){var c=a(b,"promise")||b,d=this,e=function(){d.promiseSuccessCallback.call(this,b,arguments),d.runNextPromise()},f=a(d,"failureCallback");c.then(e,f)}else this.successCallback()},start:function(){return this.runNextPromise(),this},abort:function(){this.abortCallback(),this.destroy()},init:function(){b(this,"promises",Ember.A(a(this,"promises"))),this._super()}})}(),function(){var a={},b={};Ember.onLoad=function(c,d){var e;a[c]=a[c]||Ember.A(),a[c].pushObject(d),(e=b[c])&&d(e)},Ember.runLoadHooks=function(c,d){var e;b[c]=d,(e=a[c])&&a[c].forEach(function(a){a(d)})}}(),function(){}(),function(){Ember.ControllerMixin=Ember.Mixin.create({target:null,store:null}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var a=Ember.get,b=Ember.set,c=Ember.EnumerableUtils.forEach;Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,addObject:function(b){var c=a(this,"content");c.pushObject(b)},removeObject:function(b){var c=a(this,"content");c.removeObject(b)},orderBy:function(b,d){var e=0,f=a(this,"sortProperties"),g=a(this,"sortAscending");return c(f,function(c){e===0&&(e=Ember.compare(a(b,c),a(d,c)),e!==0&&!g&&(e=-1*e))}),e},destroy:function(){var b=a(this,"content"),d=a(this,"sortProperties");return b&&d&&c(b,function(a){c(d,function(b){Ember.removeObserver(a,b,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed("sortProperties",function(){return!!a(this,"sortProperties")}),arrangedContent:Ember.computed("content","sortProperties.@each",function(b,d){var e=a(this,"content"),f=a(this,"isSorted"),g=a(this,"sortProperties"),h=this;return e&&f?(e=e.slice(),e.sort(function(a,b){return h.orderBy(a,b)}),c(e,function(a){c(g,function(b){Ember.addObserver(a,b,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(e)):e}).cacheable(),_contentWillChange:Ember.beforeObserver(function(){var b=a(this,"content"),d=a(this,"sortProperties");b&&d&&c(b,function(a){c(d,function(b){Ember.removeObserver(a,b,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=a(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(a(this,"sortAscending")!==this._lastSortAscending){var b=a(this,"arrangedContent");b.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(b,d,e,f){var g=a(this,"isSorted");if(g){var h=a(this,"arrangedContent"),i=b.slice(d,d+e),j=a(this,"sortProperties");c(i,function(a){h.removeObject(a),c(j,function(b){Ember.removeObserver(a,b,this,"contentItemSortPropertyDidChange")},this)})}return this._super(b,d,e,f)},contentArrayDidChange:function(b,d,e,f){var g=a(this,"isSorted"),h=a(this,"sortProperties");if(g){var i=b.slice(d,d+f),j=a(this,"arrangedContent");c(i,function(a){this.insertItemSorted(a),c(h,function(b){Ember.addObserver(a,b,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(b,d,e,f)},insertItemSorted:function(b){var c=a(this,"arrangedContent"),d=a(c,"length"),e=this._binarySearch(b,0,d);c.insertAt(e,b)},contentItemSortPropertyDidChange:function(b){var c=a(this,"arrangedContent"),d=c.indexOf(b);c.removeObject(b),this.insertItemSorted(b)},_binarySearch:function(b,c,d){var e,f,g,h;return c===d?c:(h=a(this,"arrangedContent"),e=c+Math.floor((d-c)/2),f=h.objectAt(e),g=this.orderBy(f,b),g<0?this._binarySearch(b,e+1,d):g>0?this._binarySearch(b,c,e):e)}})}(),function(){var a=Ember.get,b=Ember.set;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin)}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){}(),function(){}(),function(){var a=Ember.get,b=Ember.set;Ember.Application=Ember.Namespace.extend({rootElement:"body",eventDispatcher:null,customEvents:null,init:function(){var c,d=a(this,"rootElement");this._super(),c=Ember.EventDispatcher.create({rootElement:d}),b(this,"eventDispatcher",c);if(Ember.$.isReady)Ember.run.once(this,this.didBecomeReady);else{var e=this;Ember.$(document).ready(function(){Ember.run.once(e,e.didBecomeReady)})}},initialize:function(c){var d=Ember.A(Ember.keys(this)),e=a(this.constructor,"injections"),f=this,g,h;!c&&Ember.Router.detect(f.Router)&&(c=f.Router.create(),this._createdRouter=c),c&&(b(this,"router",c),b(c,"namespace",this)),Ember.runLoadHooks("application",this),e.forEach(function(a){d.forEach(function(b){a[1](f,c,b)})}),c&&c instanceof Ember.Router&&this.startRouting(c)},didBecomeReady:function(){var b=a(this,"eventDispatcher"),c=a(this,"customEvents");b.setup(c),this.ready()},startRouting:function(b){var c=a(b,"location"),d=a(this,"rootElement"),e=a(b,"applicationController"),f=this.ApplicationView.create({controller:e});this._createdApplicationView=f,f.appendTo(d),b.route(c.getURL()),c.onUpdateURL(function(a){b.route(a)})},ready:Ember.K,willDestroy:function(){a(this,"eventDispatcher").destroy(),this._createdRouter&&this._createdRouter.destroy(),this._createdApplicationView&&this._createdApplicationView.destroy()},registerInjection:function(a){this.constructor.registerInjection(a)}}),Ember.Application.reopenClass({concatenatedProperties:["injections"],injections:Ember.A(),registerInjection:function(b){var c=a(this,"injections"),d=b.before,e=b.name,f=b.injection,g;d?(g=c.find(function(a){if(a[0]===d)return!0}),g=c.indexOf(g)):g=a(c,"length"),c.splice(g,0,[e,f])}}),Ember.Application.registerInjection({name:"controllers",injection:function(a,b,c){if(!/^[A-Z].*Controller$/.test(c))return;var d=c.charAt(0).toLowerCase()+c.substr(1),e=a[c].create();b.set(d,e),e.setProperties({target:b,controllers:b,namespace:a})}})}(),function(){var a=Ember.get,b=Ember.set;Ember.Location={create:function(a){var b=a&&a.implementation,c=this.implementations[b];return c.create.apply(c,arguments)},registerImplementation:function(a,b){this.implementations[a]=b},implementations:{}}}(),function(){var a=Ember.get,b=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){b(this,"location",a(this,"location")||window.location)},getURL:function(){return a(this,"location").hash.substr(1)},setURL:function(c){a(this,"location").hash=c,b(this,"lastSetURL",c)},onUpdateURL:function(c){var d=this,e=Ember.guidFor(this);Ember.$(window).bind("hashchange.ember-location-"+e,function(){var e=location.hash.substr(1);if(a(d,"lastSetURL")===e)return;b(d,"lastSetURL",null),c(location.hash.substr(1))})},formatURL:function(a){return"#"+a},willDestroy:function(){var a=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+a)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var a=Ember.get,b=Ember.set;Ember.HistoryLocation=Ember.Object.extend({init:function(){b(this,"location",a(this,"location")||window.location),b(this,"_initialURL",a(this,"location").pathname)},rootURL:"/",_initialURL:null,getURL:function(){return a(this,"location").pathname},setURL:function(b){var c=window.history.state,d=a(this,"_initialURL");b=this.formatPath(b),(d!==b&&!c||c&&c.path!==b)&&window.history.pushState({path:b},null,b)},onUpdateURL:function(a){var b=Ember.guidFor(this);Ember.$(window).bind("popstate.ember-location-"+b,function(b){a(location.pathname)})},formatPath:function(b){var c=a(this,"rootURL");return b!==""&&(c=c.replace(/\/$/,"")),c+b},formatURL:function(a){return a},willDestroy:function(){var a=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+a)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){var a=Ember.get,b=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return a(this,"path")},setURL:function(a){b(this,"path",a)},onUpdateURL:function(a){},formatURL:function(a){return a}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){}(),function(){}(),function(){Ember.$=window.jQuery}(),function(){var a=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(a,function(a){Ember.$.event.fixHooks[a]={props:["dataTransfer"]}})}(),function(){var a=Ember.get,b=Ember.set,c=Ember.ArrayPolyfills.indexOf,d=function(){this.seen={},this.list=[]};d.prototype={add:function(a){if(a in this.seen)return;this.seen[a]=!0,this.list.push(a)},toDOM:function(){return this.list.join(" ")}},Ember.RenderBuffer=function(a){return new Ember._RenderBuffer(a)},Ember._RenderBuffer=function(a){this.elementTag=a,this.childBuffers=[]},Ember._RenderBuffer.prototype={elementClasses:null,elementId:null,elementAttributes:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(a){return this.childBuffers.push(String(a)),this},addClass:function(a){var b=this.elementClasses=this.elementClasses||new d;return this.elementClasses.add(a),this},id:function(a){return this.elementId=a,this},attr:function(a,b){var c=this.elementAttributes=this.elementAttributes||{};return arguments.length===1?c[a]:(c[a]=b,this)},removeAttr:function(a){var b=this.elementAttributes;return b&&delete b[a],this},style:function(a,b){var c=this.elementStyle=this.elementStyle||{};return this.elementStyle[a]=b,this},newBuffer:function(a,b,c,d){var e=new Ember._RenderBuffer(a);return e.parentBuffer=b,d&&Ember.$.extend(e,d),c&&c.call(this,e),e},replaceWithBuffer:function(a){var b=this.parentBuffer;if(!b)return;var d=b.childBuffers,e=c.call(d,this);a?d.splice(e,1,a):d.splice(e,1)},begin:function(a){return this.newBuffer(a,this,function(a){this.childBuffers.push(a)})},prepend:function(a){return this.newBuffer(a,this,function(a){this.childBuffers.splice(0,0,a)})},replaceWith:function(a){var b=this.parentBuffer;return this.newBuffer(a,b,function(a){this.replaceWithBuffer(a)})},insertAfter:function(b){var d=a(this,"parentBuffer");return this.newBuffer(b,d,function(a){var b=d.childBuffers,e=c.call(b,this);b.splice(e+1,0,a)})},end:function(){var a=this.parentBuffer;return a||this},remove:function(){this.replaceWithBuffer(null)},element:function(){return Ember.$(this.string())[0]},string:function(){var a="",b=this.elementTag,c;if(b){var d=this.elementId,e=this.elementClasses,f=this.elementAttributes,g=this.elementStyle,h="",i;c=["<"+b],d&&c.push('id="'+this._escapeAttribute(d)+'"'),e&&c.push('class="'+this._escapeAttribute(e.toDOM())+'"');if(g){for(i in g)g.hasOwnProperty(i)&&(h+=i+":"+this._escapeAttribute(g[i])+";");c.push('style="'+h+'"')}if(f)for(i in f)f.hasOwnProperty(i)&&c.push(i+'="'+this._escapeAttribute(f[i])+'"');c=c.join(" ")+">"}var j=this.childBuffers;return Ember.ArrayPolyfills.forEach.call(j,function(b){var c=typeof b=="string";a+=c?b:b.string()}),b?c+a+"</"+b+">":a},_escapeAttribute:function(a){var b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[<>"'`]/g,d=/[&<>"'`]/,e=function(a){return b[a]||"&amp;"},f=a.toString();return d.test(f)?f.replace(c,e):f}}}(),function(){var a=Ember.get,b=Ember.set,c=Ember.String.fmt;Ember.EventDispatcher=Ember.Object.extend({rootElement:"body",setup:function(b){var c,d={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"};Ember.$.extend(d,b||{});var e=Ember.$(a(this,"rootElement"));e.addClass("ember-application");for(c in d)d.hasOwnProperty(c)&&this.setupHandler(e,c,d[c])},setupHandler:function(a,b,c){var d=this;a.delegate(".ember-view",b+".ember",function(a,b){var e=Ember.View.views[this.id],f=!0,g=null;return g=d._findNearestEventManager(e,c),g&&g!==b?f=d._dispatchEvent(g,a,c,e):e?f=d._bubbleEvent(e,a,c):a.stopPropagation(),f}),a.delegate("[data-ember-action]",b+".ember",function(a){var b=Ember.$(a.currentTarget).attr("data-ember-action"),d=Ember.Handlebars.ActionHelper.registeredActions[b],e=d.handler;if(d.eventName===c)return e(a)})},_findNearestEventManager:function(b,c){var d=null;while(b){d=a(b,"eventManager");if(d&&d[c])break;b=a(b,"parentView")}return d},_dispatchEvent:function(a,b,c,d){var e=!0,f=a[c];return Ember.typeOf(f)==="function"?(e=f.call(a,b,d),b.stopPropagation()):e=this._bubbleEvent(d,b,c),e},_bubbleEvent:function(a,b,c){return Ember.run(function(){return a.handleEvent(c,b)})},destroy:function(){var b=a(this,"rootElement");return Ember.$(b).undelegate(".ember").removeClass("ember-application"),this._super()}})}(),function(){var a=Ember.run.queues;a.splice(Ember.$.inArray("actions",a)+1,0,"render")}(),function(){var a=Ember.get,b=Ember.set;Ember.ControllerMixin.reopen({target:null,controllers:null,namespace:null,view:null,connectOutlet:function(c,d){var e,f,g,h,i;Ember.typeOf(d)==="string"&&(e=c,c=d,d=arguments[2]),arguments.length===1?Ember.typeOf(c)==="object"&&(i=c,e=i.outletName,c=i.name,f=i.viewClass,h=i.controller,d=i.context):i={},e=e||"view";if(c){var j=a(this,"namespace"),k=a(this,"controllers"),l=c.charAt(0).toUpperCase()+c.substr(1)+"View";f=a(j,l),h=a(k,c+"Controller")}return h&&d&&h.set("content",d),g=f.create(),h&&b(g,"controller",h),b(this,e,g),g},connectControllers:function(){var c=a(this,"controllers"),d=Array.prototype.slice.apply(arguments),e;for(var f=0,g=d.length;f<g;f++)e=d[f]+"Controller",b(this,e,a(c,e))}})}(),function(){}(),function(){var a=Ember.get,b=Ember.set,c=Ember.addObserver,d=Ember.meta,e=Ember.String.fmt,f=[].slice,g=Ember.EnumerableUtils.forEach,h=Ember.computed(function(){var b=this._childViews,c=Ember.A();return g(b,function(b){b.isVirtual?c.pushObjects(a(b,"childViews")):c.push(b)}),c}).property().cacheable(),i=Ember.VIEW_PRESERVES_CONTEXT;Ember.TEMPLATES={};var j={preRender:{},inBuffer:{},hasElement:{},inDOM:{},destroyed:{}};Ember.View=Ember.Object.extend(Ember.Evented,{concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(b,c){if(c!==undefined)return c;var d=a(this,"templateName"),e=this.templateForName(d,"template");return e||a(this,"defaultTemplate")}).property("templateName").cacheable(),controller:Ember.computed(function(b,c){var d;return arguments.length===2?c:(d=a(this,"parentView"),d?a(d,"controller"):null)}).property().cacheable(),layout:Ember.computed(function(b,c){if(arguments.length===2)return c;var d=a(this,"layoutName"),e=this.templateForName(d,"layout");return e||a(this,"defaultLayout")}).property("layoutName").cacheable(),templateForName:function(b,c){if(!b)return;var d=a(this,"templates"),f=a(d,b);if(!f)throw new Ember.Error(e('%@ - Unable to find %@ "%@".',[this,c,b]));return f},context:Ember.computed(function(c,d){return arguments.length===2?(b(this,"_context",d),d):a(this,"_context")}).cacheable(),_context:Ember.computed(function(b,c){var d,e,f;if(arguments.length===2)return c;if(i){if(e=a(this,"controller"))return e;d=a(this,"_parentView");if(d)return a(d,"_context")}return this}).cacheable(),_displayPropertyDidChange:Ember.observer(function(){this.rerender()},"context","controller"),parentView:Ember.computed(function(){var b=a(this,"_parentView");return b&&b.isVirtual?a(b,"parentView"):b}).property("_parentView").volatile(),_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?a(this,"parentView"):this}).property("_parentView").volatile(),isVisible:!0,childViews:h,_childViews:[],_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var b=a(this,"parentView");b&&Ember.propertyWillChange(b,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var b=a(this,"parentView");b&&Ember.propertyDidChange(b,"childViews")}},"childViews"),nearestInstanceOf:function(b){var c=a(this,"parentView");while(c){if(c instanceof b)return c;c=a(c,"parentView")}},nearestWithProperty:function(b){var c=a(this,"parentView");while(c){if(b in c)return c;c=a(c,"parentView")}},nearestChildOf:function(b){var c=a(this,"parentView");while(c){if(a(c,"parentView")instanceof b)return c;c=a(c,"parentView")}},collectionView:Ember.computed(function(){return this.nearestInstanceOf(Ember.CollectionView)}).cacheable(),itemView:Ember.computed(function(){return this.nearestChildOf(Ember.CollectionView)}).cacheable(),contentView:Ember.computed(function(){return this.nearestWithProperty("content")}).cacheable(),_parentViewDidChange:Ember.observer(function(){if(this.isDestroying)return;this.invokeRecursively(function(a){a.propertyDidChange("collectionView"),a.propertyDidChange("itemView"),a.propertyDidChange("contentView")}),a(this,"parentView.controller")&&!a(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){if(this.isDestroying)return;this.forEachChildView(function(a){a.propertyDidChange("controller")})},"controller"),cloneKeywords:function(){var c=a(this,"templateData"),d=c?Ember.copy(c.keywords):{};return b(d,"view",a(this,"concreteView")),b(d,"controller",a(this,"controller")),d},render:function(b){var c=a(this,"layout")||a(this,"template");if(c){var d=a(this,"_context"),e=this.cloneKeywords(),f={view:this,buffer:b,isRenderData:!0,keywords:e},g=c(d,{data:f});g!==undefined&&b.push(g)}},invokeForState:function(a){var b=this.state,c,d;if(d=j[b][a])return c=f.call(arguments),c[0]=this,d.apply(this,c);var e=this,g=e.states,h;while(g){h=g[b];while(h){d=h[a];if(d)return j[b][a]=d,c=f.call(arguments,1),c.unshift(this),d.apply(this,c);h=h.parentState}g=g.parent}},rerender:function(){return this.invokeForState("rerender")},clearRenderedChildren:function(){var a=this.lengthBeforeRender,b=this.lengthAfterRender,c=this._childViews;for(var d=b-1;d>=a;d--)c[d]&&c[d].destroy()},_applyClassNameBindings:function(){var b=a(this,"classNameBindings"),d=a(this,"classNames"),e,f,h;if(!b)return;g(b,function(a){var b,g=function(){f=this._classStringForProperty(a),e=this.$(),b&&(e.removeClass(b),d.removeObject(b)),f?(e.addClass(f),b=f):b=null};h=this._classStringForProperty(a),h&&(d.push(h),b=h);var i=Ember.View._parsePropertyPath(a);c(this,i.path,g)},this)},_applyAttributeBindings:function(b){var d=a(this,"attributeBindings"),e,f,h;if(!d)return;g(d,function(d){var g=d.split(":"),h=g[0],i=g[1]||h,j=function(){f=this.$();if(!f)return;e=a(this,h),Ember.View.applyAttributeBindings(f,i,e)};c(this,h,j),e=a(this,h),Ember.View.applyAttributeBindings(b,i,e)},this)},_classStringForProperty:function(b){var c=Ember.View._parsePropertyPath(b),d=c.path,e=a(this,d);return e===undefined&&Ember.isGlobalPath(d)&&(e=a(window,d)),Ember.View._classStringForValue(d,e,c.className,c.falsyClassName)},element:Ember.computed(function(a,b){return b!==undefined?this.invokeForState("setElement",b):this.invokeForState("getElement")}).property("_parentView").cacheable(),$:function(a){return this.invokeForState("$",a)},mutateChildViews:function(a){var b=this._childViews,c=b.length,d;while(--c>=0)d=b[c],a.call(this,d,c);return this},forEachChildView:function(a){var b=this._childViews;if(!b)return this;var c=b.length,d,e;for(e=0;e<c;e++)d=b[e],a.call(this,d);return this},appendTo:function(a){return this._insertElementLater(function(){this.$().appendTo(a)}),this},replaceIn:function(a){return this._insertElementLater(function(){Ember.$(a).empty(),this.$().appendTo(a)}),this},_insertElementLater:function(a){this._lastInsert=Ember.guidFor(a),Ember.run.schedule("render",this,this.invokeForState,"insertElement",a)},append:function(){return this.appendTo(document.body)},remove:function(){this.destroyElement(),this.invokeRecursively(function(a){a.clearRenderedChildren()})},elementId:Ember.computed(function(a,b){return b!==undefined?b:Ember.guidFor(this)}).cacheable(),_elementIdDidChange:Ember.beforeObserver(function(){throw"Changing a view's elementId after creation is not allowed."},"elementId"),findElementInParentElement:function(b){var c="#"+a(this,"elementId");return Ember.$(c)[0]||Ember.$(c,b)[0]},renderBuffer:function(b){b=b||a(this,"tagName");if(b===null||b===undefined)b="div";return Ember.RenderBuffer(b)},createElement:function(){if(a(this,"element"))return this;var c=this.renderToBuffer();return b(this,"element",c.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willRerender:Ember.K,invokeRecursively:function(a){a.call(this,this),this.forEachChildView(function(b){b.invokeRecursively(a)})},invalidateRecursively:function(a){this.forEachChildView(function(b){b.propertyDidChange(a)})},_notifyWillInsertElement:function(){this.invokeRecursively(function(a){a.trigger("willInsertElement")})},_notifyDidInsertElement:function(){this.invokeRecursively(function(a){a.trigger("didInsertElement")})},_notifyWillRerender:function(){this.invokeRecursively(function(a){a.trigger("willRerender")})},destroyElement:function(){return this.invokeForState("destroyElement")},willDestroyElement:function(){},_notifyWillDestroyElement:function(){this.invokeRecursively(function(a){a.trigger("willDestroyElement")})},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(a){Ember.propertyWillChange(a,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(a){Ember.propertyDidChange(a,"element")})},"element"),parentViewDidChange:Ember.K,renderToBuffer:function(b,c){var d;Ember.run.sync(),c=c||"begin";if(b){var e=a(this,"tagName");if(e===null||e===undefined)e="div";d=b[c](e)}else d=this.renderBuffer();return this.buffer=d,this.transitionTo("inBuffer",!1),this.lengthBeforeRender=this._childViews.length,this.beforeRender(d),this.render(d),this.afterRender(d),this.lengthAfterRender=this._childViews.length,d},beforeRender:function(a){this.applyAttributesToBuffer(a)},afterRender:Ember.K,applyAttributesToBuffer:function(b){this._applyClassNameBindings(),this._applyAttributeBindings(b),g(a(this,"classNames"),function(a){b.addClass(a)}),b.id(a(this,"elementId"));var c=a(this,"ariaRole");c&&b.attr("role",c),a(this,"isVisible")===!1&&b.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:[],attributeBindings:[],state:"preRender",init:function(){this._super(),this.isVirtual||(Ember.View.views[a(this,"elementId")]=this),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice());var c=a(this,"viewController");c&&(c=a(c),c&&b(c,"view",this))},appendChild:function(a,b){return this.invokeForState("appendChild",a,b)},removeChild:function(a){if(this.isDestroying)return;b(a,"_parentView",null);var c=this._childViews;return Ember.EnumerableUtils.removeObject(c,a),this.propertyDidChange("childViews"),this},removeAllChildren:function(){return this.mutateChildViews(function(a){this.removeChild(a)})},destroyAllChildren:function(){return this.mutateChildViews(function(a){a.destroy()})},removeFromParent:function(){var b=a(this,"_parentView");return this.remove(),b&&b.removeChild(this),this},willDestroy:function(){var c=this._childViews,d=a(this,"_parentView"),e;this.removedFromDOM||this.destroyElement();if(this.viewName){var f=a(this,"parentView");f&&b(f,this.viewName,null)}d&&d.removeChild(this),this.state="destroyed",e=c.length;for(var g=e-1;g>=0;g--)c[g].removedFromDOM=!0,c[g].destroy();this.isVirtual||delete Ember.View.views[a(this,"elementId")]},createChildView:function(c,d){return Ember.View.detect(c)?(d=d||{},d._parentView=this,d.templateData=d.templateData||a(this,"templateData"),c=c.create(d),c.viewName&&b(a(this,"concreteView"),c.viewName,c)):(a(c,"templateData")||b(c,"templateData",a(this,"templateData")),b(c,"_parentView",this)),c},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var b=this.$();if(!b)return;var c=a(this,"isVisible");b.toggle(c);if(this._isAncestorHidden())return;c?this._notifyBecameVisible():this._notifyBecameHidden()},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(b){var c=a(b,"isVisible");(c||c===null)&&b._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(b){var c=a(b,"isVisible");(c||c===null)&&b._notifyBecameHidden()})},_isAncestorHidden:function(){var b=a(this,"parentView");while(b){if(a(b,"isVisible")===!1)return!0;b=a(b,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(a){this.buffer=null})},transitionTo:function(a,b){this.state=a,b!==!1&&this.forEachChildView(function(b){b.transitionTo(a)})},trigger:function(a){this._super.apply(this,arguments);var b=this[a];if(b){var c=[],d,e;for(d=1,e=arguments.length;d<e;d++)c.push(arguments[d]);return b.apply(this,c)}},has:function(a){return Ember.typeOf(this[a])==="function"||this._super(a)},handleEvent:function(a,b){return this.invokeForState("handleEvent",a,b)}});var k={prepend:function(a,b){b._insertElementLater(function(){var c=a.$();c.prepend(b.$())})},after:function(a,b){b._insertElementLater(function(){var c=a.$();c.after(b.$())})},replace:function(c){var d=a(c,"element");b(c,"element",null),c._insertElementLater(function(){Ember.$(d).replaceWith(a(c,"element"))})},remove:function(c){var d=a(c,"element");b(c,"element",null),c._lastInsert=null,Ember.$(d).remove()},empty:function(a){a.$().empty()}};Ember.View.reopen({states:Ember.View.states,domManager:k}),Ember.View.reopenClass({_parsePropertyPath:function(a){var b=a.split(/:/),c=b[0],d="",e,f;return b.length>1&&(e=b[1],b.length===3&&(f=b[2]),d=":"+e,f&&(d+=":"+f)),{path:c,classNames:d,className:e===""?undefined:e,falsyClassName:f}},_classStringForValue:function(a,b,c,d){if(!!b&&c)return c;if(b===!0){if(b===!0&&!c&&d)return null;var e=a.split(".");return Ember.String.dasherize(e[e.length-1])}return b===!1&&d?d:b!==!1&&b!==undefined&&b!==null?b:null}}),Ember.View.views={},Ember.View.childViewsProperty=h,Ember.View.applyAttributeBindings=function(a,b,c){var d=Ember.typeOf(c),e=a.attr(b);(d==="string"||d==="number"&&!isNaN(c))&&c!==e?a.attr(b,c):c&&d==="boolean"?a.attr(b,b):c||a.removeAttr(b)}}(),function(){var a=Ember.get,b=Ember.set;Ember.View.states={_default:{appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return undefined},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(a){return b(a,"element",null),a._lastInsert=null,a}}},Ember.View.reopen({states:Ember.View.states})}(),function(){Ember.View.states.preRender={parentState:Ember.View.states._default,insertElement:function(a,b){if(a._lastInsert!==Ember.guidFor(b))return;a.createElement(),a._notifyWillInsertElement(),b.call(a),a.transitionTo("inDOM"),a._notifyDidInsertElement()},empty:Ember.K,setElement:function(a,b){return b!==null&&a.transitionTo("hasElement"),b}}}(),function(){var a=Ember.get,b=Ember.set,c=Ember.meta;Ember.View.states.inBuffer={parentState:Ember.View.states._default,$:function(a,b){return a.rerender(),Ember.$()},rerender:function(a){a._notifyWillRerender(),a.clearRenderedChildren(),a.renderToBuffer(a.buffer,"replaceWith")},appendChild:function(a,b,c){var d=a.buffer;return b=this.createChildView(b,c),a._childViews.push(b),b.renderToBuffer(d),a.propertyDidChange("childViews"),b},destroyElement:function(a){return a.clearBuffer(),a._notifyWillDestroyElement(),a.transitionTo("preRender"),a},empty:function(){},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(a,b){return b===null?a.transitionTo("preRender"):(a.clearBuffer(),a.transitionTo("hasElement")),b}}}(),function(){var a=Ember.get,b=Ember.set,c=Ember.meta;Ember.View.states.hasElement={parentState:Ember.View.states._default,$:function(b,c){var d=a(b,"element");return c?Ember.$(c,d):Ember.$(d)},getElement:function(b){var c=a(b,"parentView");return c&&(c=a(c,"element")),c?b.findElementInParentElement(c):Ember.$("#"+a(b,"elementId"))[0]},setElement:function(a,b){if(b!==null)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return a.transitionTo("preRender"),b},rerender:function(a){return a._notifyWillRerender(),a.clearRenderedChildren(),a.domManager.replace(a),a},destroyElement:function(a){return a._notifyWillDestroyElement(),a.domManager.remove(a),a},empty:function(a){var b=a._childViews,c,d;if(b){c=b.length;for(d=0;d<c;d++)b[d]._notifyWillDestroyElement()}a.domManager.empty(a)},handleEvent:function(a,b,c){return a.has(b)?a.trigger(b,c):!0}},Ember.View.states.inDOM={parentState:Ember.View.states.hasElement,insertElement:function(a,b){if(a._lastInsert!==Ember.guidFor(b))return;throw"You can't insert an element into the DOM that has already been inserted"}}}(),function(){var a="You can't call %@ on a destroyed view",b=Ember.String.fmt;Ember.View.states.destroyed={parentState:Ember.View.states._default,appendChild:function(){throw b(a,["appendChild"])},rerender:function(){throw b(a,["rerender"])},destroyElement:function(){throw b(a,["destroyElement"])},empty:function(){throw b(a,["empty"])},setElement:function(){throw b(a,["set('element', ...)"])},insertElement:Ember.K}}(),function(){}(),function(){var a=Ember.get,b=Ember.set,c=Ember.meta,d=Ember.EnumerableUtils.forEach,e=Ember.computed(function(){return a(this,"_childViews")}).property("_childViews").cacheable();Ember.ContainerView=Ember.View.extend({init:function(){this._super();var c=a(this,"childViews");Ember.defineProperty(this,"childViews",e);var f=this._childViews;d(c,function(c,d){var e;"string"==typeof c?(e=a(this,c),e=this.createChildView(e),b(this,c,e)):e=this.createChildView(c),f[d]=e},this);var g=a(this,"currentView");g&&f.push(this.createChildView(g)),Ember.A(f),a(this,"childViews").addArrayObserver(this,{willChange:"childViewsWillChange",didChange:"childViewsDidChange"})},render:function(a){this.forEachChildView(function(b){b.renderToBuffer(a)})},willDestroy:function(){a(this,"childViews").removeArrayObserver(this,{willChange:"childViewsWillChange",didChange:"childViewsDidChange"}),this._super()},childViewsWillChange:function(a,b,c){if(c===0)return;var d=a.slice(b,b+c);this.initializeViews(d,null,null),this.invokeForState("childViewsWillChange",a,b,c)},childViewsDidChange:function(b,c,d,e){var f=a(b,"length");if(e===0)return;var g=b.slice(c,c+e);this.initializeViews(g,this,a(this,"templateData")),this.invokeForState("childViewsDidChange",b,c,e)},initializeViews:function(c,e,f){d(c,function(c){b(c,"_parentView",e),a(c,"templateData")||b(c,"templateData",f)})},_scheduleInsertion:function(a,b){b?b.domManager.after(b,a):this.domManager.prepend(this,a)},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var b=a(this,"childViews"),c=a(this,"currentView");c&&(b.removeObject(c),c.destroy())},"currentView"),_currentViewDidChange:Ember.observer(function(){var b=a(this,"childViews"),c=a(this,"currentView");c&&b.pushObject(c)},"currentView")}),Ember.ContainerView.states={parent:Ember.View.states,inBuffer:{childViewsDidChange:function(a,b,c,d){var e=a.buffer,f,g,h,i;c===0?(i=b[c],f=c+1,i.renderToBuffer(e,"prepend")):(i=b[c-1],f=c);for(var j=f;j<c+d;j++)g=i,i=b[j],h=g.buffer,i.renderToBuffer(h,"insertAfter")}},hasElement:{childViewsWillChange:function(a,b,c,d){for(var e=c;e<c+d;e++)b[e].remove()},childViewsDidChange
-:function(a,b,c,d){var e=c===0?null:b[c-1];for(var f=c;f<c+d;f++)a=b[f],this._scheduleInsertion(a,e),e=a}}},Ember.ContainerView.states.inDOM={parentState:Ember.ContainerView.states.hasElement},Ember.ContainerView.reopen({states:Ember.ContainerView.states})}(),function(){var a=Ember.get,b=Ember.set,c=Ember.String.fmt;Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var a=this._super();return this._contentDidChange(),a},_contentWillChange:Ember.beforeObserver(function(){var b=this.get("content");b&&b.removeArrayObserver(this);var c=b?a(b,"length"):0;this.arrayWillChange(b,0,c)},"content"),_contentDidChange:Ember.observer(function(){var b=a(this,"content");b&&b.addArrayObserver(this);var c=b?a(b,"length"):0;this.arrayDidChange(b,0,null,c)},"content"),willDestroy:function(){var b=a(this,"content");b&&b.removeArrayObserver(this),this._super()},arrayWillChange:function(b,c,d){var e=a(this,"emptyView");e&&e instanceof Ember.View&&e.removeFromParent();var f=a(this,"childViews"),g,h,i;i=a(f,"length");var j=d===i;j&&this.invokeForState("empty");for(h=c+d-1;h>=c;h--)g=f[h],j&&(g.removedFromDOM=!0),g.destroy()},arrayDidChange:function(c,d,e,f){var g=a(this,"itemViewClass"),h=a(this,"childViews"),i=[],j,k,l,m,n;"string"==typeof g&&(g=a(g)),m=c?a(c,"length"):0;if(m)for(l=d;l<d+f;l++)k=c.objectAt(l),j=this.createChildView(g,{content:k,contentIndex:l}),i.push(j);else{var o=a(this,"emptyView");if(!o)return;o=this.createChildView(o),i.push(o),b(this,"emptyView",o)}h.replace(d,0,i)},createChildView:function(c,d){c=this._super(c,d);var e=a(c,"tagName"),f=e===null||e===undefined?Ember.CollectionView.CONTAINER_MAP[a(this,"tagName")]:e;return b(c,"tagName",f),c}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){}(),function(){}(),function(){var a=Ember.get,b=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var b=a(this,"parentState.path"),c=a(this,"name");return b&&(c=b+"."+c),c}).property().cacheable(),trigger:function(a){this[a]&&this[a].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var c=a(this,"states"),d;b(this,"childStates",Ember.A()),b(this,"eventTransitions",a(this,"eventTransitions")||{});var e,f,g;if(!c){c={};for(e in this){if(e==="constructor")continue;if(f=this[e]){if(g=f.transitionTarget)this.eventTransitions[e]=g;this.setupChild(c,e,f)}}b(this,"states",c)}else for(e in c)this.setupChild(c,e,c[e]);b(this,"pathsCache",{}),b(this,"pathsCacheNoContext",{})},setupChild:function(c,d,e){if(!e)return!1;e.isState?b(e,"name",d):Ember.State.detect(e)&&(e=e.create({name:d})),e.isState&&(b(e,"parentState",this),a(this,"childStates").pushObject(e),c[d]=e)},lookupEventTransition:function(a){var b,c=this;while(c&&!b)b=c.eventTransitions[a],c=c.get("parentState");return b},isLeaf:Ember.computed(function(){return!a(this,"childStates").length}).cacheable(),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K});var c=Ember.$&&Ember.$.Event;Ember.State.reopenClass({transitionTo:function(a){var b=function(b,d){if(c&&d instanceof c){if(!d.hasOwnProperty("context"))return b.transitionTo(a);d=d.context}b.transitionTo(a,d)};return b.transitionTarget=a,b}})}(),function(){var a=Ember.get,b=Ember.set,c=Ember.String.fmt,d=Ember.ArrayPolyfills.forEach,e=function(a){this.enterStates=a.enterStates.slice(),this.exitStates=a.exitStates.slice(),this.resolveState=a.resolveState,this.finalState=a.enterStates[a.enterStates.length-1]||a.resolveState};e.prototype={normalize:function(a,b){return this.matchContextsToStates(b),this.addInitialStates(),this.removeUnchangedContexts(a),this},matchContextsToStates:function(b){var c=this.enterStates.length-1,d=[],e,f;while(b.length>0){if(c>=0)e=this.enterStates[c--];else{if(this.enterStates.length){e=a(this.enterStates[0],"parentState");if(!e)throw"Cannot match all contexts to states"}else e=this.resolveState;this.enterStates.unshift(e),this.exitStates.unshift(e)}a(e,"hasContext")?f=b.pop():f=null,d.unshift(f)}this.contexts=d},addInitialStates:function(){var b=this.finalState,c;for(;;){c=a(b,"initialState")||"start",b=a(b,"states."+c);if(!b)break;this.finalState=b,this.enterStates.push(b),this.contexts.push(undefined)}},removeUnchangedContexts:function(a){while(this.enterStates.length>0){if(this.enterStates[0]!==this.exitStates[0])break;if(this.enterStates.length===this.contexts.length){if(a.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}},Ember.StateManager=Ember.State.extend({init:function(){this._super(),b(this,"stateMeta",Ember.Map.create());var c=a(this,"initialState");!c&&a(this,"states.start")&&(c="start"),c&&this.transitionTo(c)},stateMetaFor:function(b){var c=a(this,"stateMeta"),d=c.get(b);return d||(d={},c.set(b,d)),d},setStateMeta:function(a,c,d){return b(this.stateMetaFor(a),c,d)},getStateMeta:function(b,c){return a(this.stateMetaFor(b),c)},currentState:null,transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(b,c){return this.sendRecursively(b,a(this,"currentState"),c)},sendRecursively:function(b,d,e){var f=this.enableLogging,g=d[b];if(typeof g=="function")return f&&Ember.Logger.log(c("STATEMANAGER: Sending event '%@' to state %@.",[b,a(d,"path")])),g.call(d,this,e);var h=a(d,"parentState");if(h)return this.sendRecursively(b,h,e);if(a(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+b+" in state "+a(this,"currentState.path")+".")},getStateByPath:function(b,c){var d=c.split("."),e=b;for(var f=0,g=d.length;f<g;f++){e=a(a(e,"states"),d[f]);if(!e)break}return e},findStateByPath:function(b,c){var d;while(!d&&b)d=this.getStateByPath(b,c),b=a(b,"parentState");return d},findStatesByPath:function(b,c){if(!c||c==="")return undefined;var d=c.split("."),e=[];for(var f=0,g=d.length;f<g;f++){var h=a(b,"states");if(!h)return undefined;var i=a(h,d[f]);if(!i)return undefined;b=i,e.push(i)}return e},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(b,c){if(Ember.empty(b))return;var d=c?Array.prototype.slice.call(arguments,1):[],f=a(this,"currentState")||this,g=this.contextFreeTransition(f,b),h=(new e(g)).normalize(this,d);this.enterState(h),this.triggerSetupContext(h)},contextFreeTransition:function(b,c){var d=b.pathsCache[c];if(d)return d;var e=this.findStatesByPath(b,c),f=[],g=b;while(g&&!e){f.unshift(g),g=a(g,"parentState");if(!g){e=this.findStatesByPath(this,c);if(!e)return}e=this.findStatesByPath(g,c)}while(e.length>0&&e[0]===f[0])g=e.shift(),f.shift();var h=b.pathsCache[c]={exitStates:f,enterStates:e,resolveState:g};return h},triggerSetupContext:function(b){var c=b.contexts,e=b.enterStates.length-c.length,f=b.enterStates,g=a(this,"transitionEvent");d.call(f,function(a,b){a.trigger(g,this,c[b-e])},this)},getState:function(b){var c=a(this,b),d=a(this,"parentState");if(c)return c;if(d)return d.getState(b)},enterState:function(c){var e=this.enableLogging,f=c.exitStates.slice(0).reverse();d.call(f,function(a){a.trigger("exit",this)},this),d.call(c.enterStates,function(b){e&&Ember.Logger.log("STATEMANAGER: Entering "+a(b,"path")),b.trigger("enter",this)},this),b(this,"currentState",c.finalState)}})}(),function(){}(),function(){var a=Ember.get;Ember._ResolvedState=Ember.Object.extend({manager:null,state:null,match:null,object:Ember.computed(function(b,c){if(arguments.length===2)return this._object=c,c;if(this._object)return this._object;var d=a(this,"state"),e=a(this,"match"),f=a(this,"manager");return d.deserialize(f,e.hash)}).property(),hasPromise:Ember.computed(function(){return Ember.canInvoke(a(this,"object"),"then")}).property("object"),promise:Ember.computed(function(){var b=a(this,"object");return Ember.canInvoke(b,"then")?b:{then:function(a){a(b)}}}).property("object"),transition:function(){var b=a(this,"manager"),c=a(this,"state.path"),d=a(this,"object");b.transitionTo(c,d)}})}(),function(){var a=Ember.get,b=function(a){var b=a.toString(),c=b.split("."),d=c[c.length-1];return Ember.String.underscore(d)+"_id"},c=function(a,b){for(var c in b){if(!b.hasOwnProperty(c))continue;if(a.hasOwnProperty(c))continue;a[c]=b[c]}};Ember.Routable=Ember.Mixin.create({init:function(){var b;this.on("connectOutlets",this,this.stashContext);if(b=a(this,"redirectsTo"))this.connectOutlets=function(a){a.transitionTo(b)};var c=a(this,"route");c===""&&(c="/"),this._super()},stashContext:function(b,c){var d=this.serialize(b,c);b.setStateMeta(this,"context",c),b.setStateMeta(this,"serialized",d),a(this,"isRoutable")&&!a(b,"isRouting")&&this.updateRoute(b,a(b,"location"))},updateRoute:function(b,c){if(a(this,"isLeafRoute")){var d=this.absoluteRoute(b);c.setURL(d)}},absoluteRoute:function(b,d){var e=a(this,"parentState"),f="",g;a(e,"isRoutable")&&(f=e.absoluteRoute(b,d));var h=a(this,"routeMatcher"),i=b.getStateMeta(this,"serialized");return d=d||{},c(d,i),g=h&&h.generate(d),g&&(f=f+"/"+g),f},isRoutable:Ember.computed(function(){return typeof a(this,"route")=="string"}).cacheable(),isLeafRoute:Ember.computed(function(){return a(this,"isLeaf")?!0:!a(this,"childStates").findProperty("isRoutable")}).cacheable(),routeMatcher:Ember.computed(function(){var b=a(this,"route");if(b)return Ember._RouteMatcher.create({route:b})}).cacheable(),hasContext:Ember.computed(function(){var b=a(this,"routeMatcher");if(b)return b.identifiers.length>0}).cacheable(),modelClass:Ember.computed(function(){var b=a(this,"modelType");return typeof b=="string"?Ember.get(window,b):b}).cacheable(),modelClassFor:function(b){var c,d,e,f,g;if(c=a(this,"modelClass"))return c;if(!b)return;d=a(this,"routeMatcher");if(!d)return;e=d.identifiers;if(e.length!==2)return;f=e[1].match(/^(.*)_id$/);if(!f)return;return g=Ember.String.classify(f[1]),a(b,g)},deserialize:function(c,d){var e,f,g;return(e=this.modelClassFor(a(c,"namespace")))?e.find(d[b(e)]):d},serialize:function(c,d){var e,f,g,h,i;if(Ember.empty(d))return"";if(e=this.modelClassFor(a(c,"namespace")))h=b(e),i=a(d,"id"),d={},d[h]=i;return d},resolvePath:function(b,c){if(a(this,"isLeafRoute"))return Ember.A();var d=a(this,"childStates"),e;d=Ember.A(d.filterProperty("isRoutable")),d=d.sort(function(b,c){var d=a(b,"routeMatcher.identifiers.length"),e=a(c,"routeMatcher.identifiers.length"),f=a(b,"route"),g=a(c,"route");return f.indexOf(g)===0?-1:g.indexOf(f)===0?1:d!==e?d-e:a(c,"route.length")-a(b,"route.length")});var f=d.find(function(b){var d=a(b,"routeMatcher");if(e=d.match(c))return!0}),g=Ember._ResolvedState.create({manager:b,state:f,match:e}),h=f.resolvePath(b,e.remaining);return Ember.A([g]).pushObjects(h)},routePath:function(b,c){function f(){d.forEach(function(a){a.transition()})}if(a(this,"isLeafRoute"))return;var d=this.resolvePath(b,c),e=d.some(function(b){return a(b,"hasPromise")});e?(b.transitionTo("loading"),b.handleStatePromises(d,f)):f()},unroutePath:function(b,c){var d=a(this,"parentState");if(d===b)return;c=c.replace(/^(?=[^\/])/,"/");var e=this.absoluteRoute(b),f=a(this,"route");if(f!=="/"){var g=c.indexOf(e),h=c.charAt(e.length);if(g===0&&(h==="/"||h===""))return}b.enterState({exitStates:[this],enterStates:[],finalState:d}),b.send("unroutePath",c)},connectOutlets:Ember.K,navigateAway:Ember.K})}(),function(){Ember.Route=Ember.State.extend(Ember.Routable)}(),function(){var a=function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^\$|#\s]/g,"\\$&")};Ember._RouteMatcher=Ember.Object.extend({state:null,init:function(){var b=this.route,c=[],d=1,e;b.charAt(0)==="/"&&(b=this.route=b.substr(1)),e=a(b);var f=e.replace(/:([a-z_]+)(?=$|\/)/gi,function(a,b){return c[d++]=b,"([^/]+)"});this.identifiers=c,this.regex=new RegExp("^/?"+f)},match:function(a){var b=a.match(this.regex);if(b){var c=this.identifiers,d={};for(var e=1,f=c.length;e<f;e++)d[c[e]]=b[e];return{remaining:a.substr(b[0].length),hash:c.length>0?d:null}}},generate:function(a){var b=this.identifiers,c=this.route,d;for(var e=1,f=b.length;e<f;e++)d=b[e],c=c.replace(new RegExp(":"+d),a[d]);return c}})}(),function(){var a=Ember.get,b=Ember.set,c=function(a,b){for(var c in b){if(!b.hasOwnProperty(c))continue;if(a.hasOwnProperty(c))continue;a[c]=b[c]}};Ember.Router=Ember.StateManager.extend({initialState:"root",location:"hash",rootURL:"/",transitionEvent:"connectOutlets",transitionTo:function(){this.abortRoutingPromises(),this._super.apply(this,arguments)},route:function(c){this.abortRoutingPromises(),b(this,"isRouting",!0);var d;try{c=c.replace(/^(?=[^\/])/,"/"),this.send("navigateAway"),this.send("unroutePath",c),d=a(this,"currentState");while(d&&!d.get("isRoutable"))d=a(d,"parentState");var e=d?d.absoluteRoute(this):"",f=c.substr(e.length);this.send("routePath",f)}finally{b(this,"isRouting",!1)}d=a(this,"currentState");while(d&&!d.get("isRoutable"))d=a(d,"parentState");d&&d.updateRoute(this,a(this,"location"))},urlFor:function(b,c){var d=a(this,"currentState")||this,e=this.findStateByPath(d,b),f=a(this,"location"),g=e.absoluteRoute(this,c);return f.formatURL(g)},urlForEvent:function(b){var c=Array.prototype.slice.call(arguments,1),d=a(this,"currentState"),e=d.lookupEventTransition(b),f=this.findStateByPath(d,e),g=this.serializeRecursively(f,c,{});return this.urlFor(e,g)},serializeRecursively:function(b,d,e){var f,g=a(b,"hasContext")?d.pop():null;return c(e,b.serialize(this,g)),f=b.get("parentState"),f&&f instanceof Ember.Route?this.serializeRecursively(f,d,e):e},abortRoutingPromises:function(){this._routingPromises&&(this._routingPromises.abort(),this._routingPromises=null)},handleStatePromises:function(a,c){this.abortRoutingPromises(),this.set("isLocked",!0);var d=this;this._routingPromises=Ember._PromiseChain.create({promises:a.slice(),successCallback:function(){d.set("isLocked",!1),c()},failureCallback:function(){throw"Unable to load object"},promiseSuccessCallback:function(a,c){b(a,"object",c[0])},abortCallback:function(){d.set("isLocked",!1)}}).start()},init:function(){this._super();var c=a(this,"location"),d=a(this,"rootURL");"string"==typeof c&&b(this,"location",Ember.Location.create({implementation:c,rootURL:d}))},willDestroy:function(){a(this,"location").destroy()}})}(),function(){}(),function(){var a=Ember.get;Ember.StateManager.reopen({currentView:Ember.computed(function(){var b=a(this,"currentState"),c;while(b){if(a(b,"isViewState")){c=a(b,"view");if(c)return c}b=a(b,"parentState")}return null}).property("currentState").cacheable()})}(),function(){var a=Ember.get,b=Ember.set;Ember.ViewState=Ember.State.extend({isViewState:!0,init:function(){return this._super()},enter:function(c){var d=a(this,"view"),e,f;d&&(Ember.View.detect(d)&&(d=d.create(),b(this,"view",d)),e=c.get("rootView"),e?(f=a(e,"childViews"),f.pushObject(d)):(e=c.get("rootElement")||"body",d.appendTo(e)))},exit:function(b){var c=a(this,"view");c&&(a(c,"parentView")?c.removeFromParent():c.remove())}})}(),function(){}(),function(){(function(a){var b=function(){},c=0,d=a.document,e="createRange"in d&&typeof Range!="undefined"&&Range.prototype.createContextualFragment,f=function(){var a=d.createElement("div");return a.innerHTML="<div></div>",a.firstChild.innerHTML="<script></script>",a.firstChild.innerHTML===""}(),g=function(a){var d;this instanceof g?d=this:d=new b,d.innerHTML=a;var e="metamorph-"+c++;return d.start=e+"-start",d.end=e+"-end",d};b.prototype=g.prototype;var h,i,j,k,l,m,n,o,p;k=function(){return this.startTag()+this.innerHTML+this.endTag()},o=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},p=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"};if(e)h=function(a,b){var c=d.createRange(),e=d.getElementById(a.start),f=d.getElementById(a.end);return b?(c.setStartBefore(e),c.setEndAfter(f)):(c.setStartAfter(e),c.setEndBefore(f)),c},i=function(a,b){var c=h(this,b);c.deleteContents();var d=c.createContextualFragment(a);c.insertNode(d)},j=function(){var a=h(this,!0);a.deleteContents()},l=function(a){var b=d.createRange();b.setStart(a),b.collapse(!1);var c=b.createContextualFragment(this.outerHTML());a.appendChild(c)},m=function(a){var b=d.createRange(),c=d.getElementById(this.end);b.setStartAfter(c),b.setEndAfter(c);var e=b.createContextualFragment(a);b.insertNode(e)},n=function(a){var b=d.createRange(),c=d.getElementById(this.start);b.setStartAfter(c),b.setEndAfter(c);var e=b.createContextualFragment(a);b.insertNode(e)};else{var q={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},r=function(a,b){var c=q[a.tagName.toLowerCase()]||q._default,e=c[0],g=c[1],h=c[2];f&&(b="&shy;"+b);var i=d.createElement("div");i.innerHTML=g+b+h;for(var j=0;j<=e;j++)i=i.firstChild;if(f){var k=i;while(k.nodeType===1&&!k.nodeName)k=k.firstChild;k.nodeType===3&&k.nodeValue.charAt(0)==="­"&&(k.nodeValue=k.nodeValue.slice(1))}return i},s=function(a){while(a.parentNode.tagName==="")a=a.parentNode;return a},t=function(a,b){a.parentNode!==b.parentNode&&b.parentNode.insertBefore(a,b.parentNode.firstChild)};i=function(a,b){var c=s(d.getElementById(this.start)),e=d.getElementById(this.end),f=e.parentNode,g,h,i;t(c,e),g=c.nextSibling;while(g){h=g.nextSibling,i=g===e;if(i){if(!b)break;e=g.nextSibling}g.parentNode.removeChild(g);if(i)break;g=h}g=r(c.parentNode,a);while(g)h=g.nextSibling,f.insertBefore(g,e),g=h},j=function(){var a=s(d.getElementById(this.start)),b=d.getElementById(this.end);this.html(""),a.parentNode.removeChild(a),b.parentNode.removeChild(b)},l=function(a){var b=r(a,this.outerHTML());while(b)nextSibling=b.nextSibling,a.appendChild(b),b=nextSibling},m=function(a){var b=d.getElementById(this.end),c=b.nextSibling,e=b.parentNode,f,g;g=r(e,a);while(g)f=g.nextSibling,e.insertBefore(g,c),g=f},n=function(a){var b=d.getElementById(this.start),c=b.parentNode,e,f;f=r(c,a);var g=b.nextSibling;while(f)e=f.nextSibling,c.insertBefore(f,g),f=e}}g.prototype.html=function(a){this.checkRemoved();if(a===undefined)return this.innerHTML;i.call(this,a),this.innerHTML=a},g.prototype.replaceWith=function(a){this.checkRemoved(),i.call(this,a,!0)},g.prototype.remove=j,g.prototype.outerHTML=k,g.prototype.appendTo=l,g.prototype.after=m,g.prototype.prepend=n,g.prototype.startTag=o,g.prototype.endTag=p,g.prototype.isRemoved=function(){var a=d.getElementById(this.start),b=d.getElementById(this.end);return!a||!b},g.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},a.Metamorph=g})(this)}(),function(){var a=Ember.create;Ember.Handlebars=a(Handlebars),Ember.Handlebars.helpers=a(Handlebars.helpers),Ember.Handlebars.Compiler=function(){},Ember.Handlebars.Compiler.prototype=a(Handlebars.Compiler.prototype),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},Ember.Handlebars.JavaScriptCompiler.prototype=a(Handlebars.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler,Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(a){return"data.buffer.push("+a+");"},Ember.Handlebars.Compiler.prototype.mustache=function(a){if(a.params.length||a.hash)return Handlebars.Compiler.prototype.mustache.call(this,a);var b=new Handlebars.AST.IdNode(["_triageMustache"]);return a.escaped||(a.hash=a.hash||new Handlebars.AST.HashNode([]),a.hash.pairs.push(["unescaped",new Handlebars.AST.StringNode("true")])),a=new Handlebars.AST.MustacheNode([b].concat([a.id]),a.hash,!a.escaped),Handlebars.Compiler.prototype.mustache.call(this,a)},Ember.Handlebars.precompile=function(a){var b=Handlebars.parse(a),c={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},d=(new Ember.Handlebars.Compiler).compile(b,c);return(new Ember.Handlebars.JavaScriptCompiler).compile(d,c,undefined,!0)},Ember.Handlebars.compile=function(a){var b=Handlebars.parse(a),c={data:!0,stringParams:!0},d=(new Ember.Handlebars.Compiler).compile(b,c),e=(new Ember.Handlebars.JavaScriptCompiler).compile(d,c,undefined,!0);return Handlebars.template(e)};var b=Ember.Handlebars.normalizePath=function(a,b,c){var d=c&&c.keywords||{},e,f;return e=b.split(".",1)[0],d.hasOwnProperty(e)&&(a=d[e],f=!0,b===e?b="":b=b.substr(e.length+1)),{root:a,path:b,isKeyword:f}};Ember.Handlebars.getPath=function(a,c,d){var e=d&&d.data,f=b(a,c,e),g;return a=f.root,c=f.path,g=Ember.get(a,c),g===undefined&&a!==window&&Ember.isGlobalPath(c)&&(g=Ember.get(window,c)),g},Ember.Handlebars.registerHelper("helperMissing",function(a,b){var c,d="";throw c="%@ Handlebars error: Could not find property '%@' on object %@.",b.data&&(d=b.data.view),new Ember.Error(Ember.String.fmt(c,[d,a,this]))})}(),function(){Ember.String.htmlSafe=function(a){return new Handlebars.SafeString(a)};var a=Ember.String.htmlSafe;Ember.EXTEND_PROTOTYPES&&(String.prototype.htmlSafe=function(){return a(this)})}(),function(){var a=Ember.set,b=Ember.get,c={remove:function(b){var c=b.morph;if(c.isRemoved())return;a(b,"element",null),b._lastInsert=null,c.remove()},prepend:function(a,b){b._insertElementLater(function(){var c=a.morph;c.prepend(b.outerHTML),b.outerHTML=null})},after:function(a,b){b._insertElementLater(function(){var c=a.morph;c.after(b.outerHTML),b.outerHTML=null})},replace:function(a){var c=a.morph;a.transitionTo("preRender"),a.clearRenderedChildren();var d=a.renderToBuffer();Ember.run.schedule("render",this,function(){if(b(a,"isDestroyed"))return;a.invalidateRecursively("element"),a._notifyWillInsertElement(),c.replaceWith(d.string()),a.transitionTo("inDOM"),a._notifyDidInsertElement()})},empty:function(a){a.morph.html("")}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",init:function(){this._super(),this.morph=Metamorph()},beforeRender:function(a){a.push(this.morph.startTag())},afterRender:function(a){a.push(this.morph.endTag())},createElement:function(){var a=this.renderToBuffer();this.outerHTML=a.string(),this.clearBuffer()},domManager:c}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph)}(),function(){var a=Ember.get,b=Ember.set,c=Ember.Handlebars.getPath;Ember._HandlebarsBoundView=Ember._MetamorphView.extend({shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:Ember.computed(function(){var b=a(this,"path"),d=a(this,"pathRoot"),e=a(this,"valueNormalizerFunc"),f,g;return b===""?f=d:(g=a(this,"templateData"),f=c(d,b,{data:g})),e?e(f):f}).property("path","pathRoot","valueNormalizerFunc").volatile(),rerenderIfNeeded:function(){!a(this,"isDestroyed")&&a(this,"normalizedValue")!==this._lastNormalizedValue&&this.rerender()},render:function(c){var d=a(this,"isEscaped"),e=a(this,"shouldDisplayFunc"),f=a(this,"preserveContext"),g=a(this,"previousContext"),h=a(this,"inverseTemplate"),i=a(this,"displayTemplate"),j=a(this,"normalizedValue");this._lastNormalizedValue=j;if(e(j)){b(this,"template",i);if(f)b(this,"_context",g);else{if(!i){j===null||j===undefined?j="":j instanceof Handlebars.SafeString||(j=String(j)),d&&(j=Handlebars.Utils.escapeExpression(j)),c.push(j);return}b(this,"_context",j)}}else h?(b(this,"template",h),f?b(this,"_context",g):b(this,"_context",j)):b(this,"template",function(){return""});return this._super(c)}})}(),function(){function i(a,b,c,f,g){var h=b.data,i=b.fn,j=b.inverse,k=h.view,l=this,m,n,o;o=e(l,a,h),m=o.root,n=o.path;if("object"==typeof this){var p=k.createChildView(Ember._HandlebarsBoundView,{preserveContext:c,shouldDisplayFunc:f,valueNormalizerFunc:g,displayTemplate:i,inverseTemplate:j,path:n,pathRoot:m,previousContext:l,isEscaped:!b.hash.unescaped,templateData:b.data});k.appendChild(p);var q=function(){Ember.run.once(p,"rerenderIfNeeded")};n!==""&&Ember.addObserver(m,n,q)}else h.buffer.push(d(m,n,b))}var a=Ember.get,b=Ember.set,c=Ember.String.fmt,d=Ember.Handlebars.getPath,e=Ember.Handlebars.normalizePath,f=Ember.ArrayPolyfills.forEach,g=Ember.Handlebars,h=g.helpers;g.registerHelper("_triageMustache",function(a,b){return h[a]?h[a].call(this,b):h.bind.apply(this,arguments)}),g.registerHelper("bind",function(a,b){var c=b.contexts&&b.contexts[0]||this;return i.call(c,a,b,!1,function(a){return!Ember.none(a)})}),g.registerHelper("boundIf",function(b,c){var d=c.contexts&&c.contexts[0]||this,e=function(b){return Ember.typeOf(b)==="array"?a(b,"length")!==0:!!b};return i.call(d,b,c,!0,e,e)}),g.registerHelper("with",function(a,b){if(arguments.length===4){var c,d,f,g;b=arguments[3],c=arguments[2],d=arguments[0];if(Ember.isGlobalPath(d))Ember.bind(b.data.keywords,c,d);else{g=e(this,d,b.data),d=g.path,f=g.root;var j=Ember.$.expando+Ember.guidFor(f);b.data.keywords[j]=f;var k=d?j+"."+d:j;Ember.bind(b.data.keywords,c,k)}return i.call(this,d,b.fn,!0,function(a){return!Ember.none(a)})}return h.bind.call(b.contexts[0],a,b)}),g.registerHelper("if",function(a,b){return h.boundIf.call(b.contexts[0],a,b)}),g.registerHelper("unless",function(a,b){var c=b.fn,d=b.inverse;return b.fn=d,b.inverse=c,h.boundIf.call(b.contexts[0],a,b)}),g.registerHelper("bindAttr",function(a){var b=a.hash,c=a.data.view,h=[],i=this,j=++Ember.$.uuid,k=b["class"];if(k!==null&&k!==undefined){var l=g.bindClasses(this,k,c,j,a);h.push('class="'+Handlebars.Utils.escapeExpression(l.join(" "))+'"'),delete b["class"]}var m=Ember.keys(b);return f.call(m,function(f){var g=b[f],k,l;l=e(i,g,a.data),k=l.root,g=l.path;var m=g==="this"?k:d(k,g,a),n=Ember.typeOf(m),o,p;o=function(){var e=d(k,g,a),h=c.$("[data-bindattr-"+j+"='"+j+"']");if(h.length===0){Ember.removeObserver(k,g,p);return}Ember.View.applyAttributeBindings(h,f,e)},p=function(){Ember.run.once(o)},g!=="this"&&Ember.addObserver(k,g,p),n==="string"||n==="number"&&!isNaN(m)?h.push(f+'="'+Handlebars.Utils.escapeExpression(m)+'"'):m&&n==="boolean"&&h.push(f+'="'+f+'"')},this),h.push("data-bindattr-"+j+'="'+j+'"'),new g.SafeString(h.join(" "))}),g.bindClasses=function(a,b,c,g,h){var i=[],j,k,l,m=function(a,b,c){var e,f=b.path;return f==="this"?e=a:f===""?e=!0:e=d(a,f,c),Ember.View._classStringForValue(f,e,b.className,b.falsyClassName)};return f.call(b.split(" "),function(b){var d,f,n,o=Ember.View._parsePropertyPath(b),p=o.path,q=a,r;p!==""&&p!=="this"&&(r=e(a,p,h.data),q=r.root,p=r.path),f=function(){j=m(q,o,h),l=g?c.$("[data-bindattr-"+g+"='"+g+"']"):c.$(),l.length===0?Ember.removeObserver(q,p,n):(d&&l.removeClass(d),j?(l.addClass(j),d=j):d=null)},n=function(){Ember.run.once(f)},p!==""&&p!=="this"&&Ember.addObserver(q,p,n),k=m(q,o,h),k&&(i.push(k),d=k)}),i}}(),function(){var a=Ember.get,b=Ember.set,c=/^parentView\./,d=Ember.Handlebars,e=Ember.VIEW_PRESERVES_CONTEXT;d.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(a,b){var c=a.hash,d=a.data,e={},f=c["class"],g=!1;c.id&&(e.elementId=c.id,g=!0),f&&(f=f.split(" "),e.classNames=f,g=!0),c.classBinding&&(e.classNameBindings=c.classBinding.split(" "),g=!0),c.classNameBindings&&(e.classNameBindings===undefined&&(e.classNameBindings=[]),e.classNameBindings=e.classNameBindings.concat(c.classNameBindings.split(" ")),g=!0),c.attributeBindings&&(e.attributeBindings=null,g=!0),g&&(c=Ember.$.extend({},c),delete c.id,delete c["class"],delete c.classBinding);var h;for(var i in c){if(!c.hasOwnProperty(i))continue;Ember.IS_BINDING.test(i)&&typeof c[i]=="string"&&(h=this.contextualizeBindingPath(c[i],d),h&&(c[i]=h))}if(e.classNameBindings)for(var j in e.classNameBindings){var k=e.classNameBindings[j];if(typeof k=="string"){var l=Ember.View._parsePropertyPath(k);h=this.contextualizeBindingPath(l.path,d),h&&(e.classNameBindings[j]=h+l.classNames)}}return e.bindingContext=b,Ember.$.extend(c,e)},contextualizeBindingPath:function(a,b){var c=Ember.Handlebars.normalizePath(null,a,b);return c.isKeyword?"templateData.keywords."+a:Ember.isGlobalPath(a)?null:a==="this"?"bindingContext":"bindingContext."+a},helper:function(a,b,c){var f=c.inverse,g=c.data,h=g.view,i=c.fn,j=c.hash,k;"string"==typeof b?k=d.getPath(a,b,c):k=b;var l=this.propertiesFromHTMLOptions(c,a),m=g.view;l.templateData=c.data,i&&(l.template=i),e&&!k.proto().controller&&!k.proto().controllerBinding&&!l.controller&&!l.controllerBinding&&(l._context=a),m.appendChild(k,l)}}),d.registerHelper("view",function(a,b){return a&&a.data&&a.data.isRenderData&&(b=a,a="Ember.View"),d.ViewHelper.helper(this,a,b)})}(),function(){var a=Ember.get,b=Ember.Handlebars.getPath,c=Ember.String.fmt;Ember.Handlebars.registerHelper("collection",function(c,d){c&&c.data&&c.data.isRenderData&&(d=c,c=undefined);var e=d.fn,f=d.data,g=d.inverse,h;h=c?b(this,c,d):Ember.CollectionView;var i=d.hash,j={},k,l,m=i.itemViewClass,n=h.proto();delete i.itemViewClass,l=m?b(n,m,d):n.itemViewClass;for(var o in i)i.hasOwnProperty(o)&&(k=o.match(/^item(.)(.*)$/),k&&(j[k[1].toLowerCase()+k[2]]=i[o],delete i[o]));var p=i.tagName||n.tagName;e&&(j.template=e,delete d.fn);var q;g&&g!==Handlebars.VM.noop?(q=a(n,"emptyViewClass"),q=q.extend({template:g,tagName:j.tagName})):i.emptyViewClass&&(q=b(this,i.emptyViewClass,d)),i.emptyView=q,i.eachHelper==="each"&&(j._context=Ember.computed(function(){return a(this,"content")}).property("content"),delete i.eachHelper);var r=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:f,hash:j},this);return i.itemViewClass=l.extend(r),Ember.Handlebars.helpers.view.call(this,h,d)})}(),function(){var a=Ember.Handlebars.getPath;Ember.Handlebars.registerHelper("unbound",function(b,c){var d=c.contexts&&c.contexts[0]||this;return a(d,b,c)})}(),function(){var a=Ember.Handlebars.getPath,b=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(c,d){var e=d.contexts&&d.contexts[0]||this,f=b(e,c,d.data),g=f.root,h=f.path,i=h==="this"?g:a(g,h,d);Ember.Logger.log(i)}),Ember.Handlebars.registerHelper("debugger",function(){debugger})}(),function(){var a=Ember.get,b=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(c,d){c=this._super(c,d);var e=a(this,"keyword");if(e){var f=a(c,"templateData");f=Ember.copy(f),f.keywords=c.cloneKeywords(),b(c,"templateData",f);var g=a(c,"content");f.keywords[e]=g}return c}}),Ember.Handlebars.registerHelper("each",function(a,b){if(arguments.length===4){var c=arguments[0];b=arguments[3],a=arguments[2],a===""&&(a="this"),b.hash.keyword=c}else b.hash.eachHelper="each";return b.hash.contentBinding=a,Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",b)})}(),function(){Ember.Handlebars.registerHelper("template",function(a,b){var c=Ember.TEMPLATES[a];Ember.TEMPLATES[a](this,{data:b.data})})}(),function(){var a=Ember.Handlebars,b=a.getPath,c=Ember.get,d=Array.prototype.slice,e=a.ActionHelper={registeredActions:{}};e.registerAction=function(a,b){var c=(++Ember.$.uuid).toString();return e.registeredActions[c]={eventName:b.eventName,handler:function(c){var d=c.shiftKey||c.metaKey||c.altKey||c.ctrlKey,e=c.which>1,f=d||e;if(b.link&&f)return;c.preventDefault(),c.view=b.view,b.hasOwnProperty("context")&&(c.context=b.context),b.hasOwnProperty("contexts")&&(c.contexts=b.contexts);var g=b.target;return g.isState&&typeof g.send=="function"?g.send(a,c):g[a].call(g,c)}},b.view.on("willRerender",function(){delete e.registeredActions[c]}),c},a.registerHelper("action",function(f){var g=arguments[arguments.length-1],h=d.call(arguments,1,-1),i=g.hash,j=g.data.view,k,l,m,n={eventName:i.on||"click"};n.view=j=c(j,"concreteView");if(i.target)k=b(this,i.target,g);else if(l=g.data.keywords.controller)k=c(l,"target");n.target=k=k||j,h.length&&(n.contexts=h=Ember.EnumerableUtils.map(h,function(a){return b(this,a,g)},this),n.context=h[0]);var o=[],p;i.href&&k.urlForEvent&&(p=k.urlForEvent.apply(k,[f].concat(h)),o.push('href="'+p+'"'),n.link=!0);var q=e.registerAction(f,n);return o.push('data-ember-action="'+q+'"'),new a.SafeString(o.join(" "))})}(),function(){var a=Ember.get,b=Ember.set;Ember.Handlebars.registerHelper("yield",function(b){var c=b.data.view,d;while(c&&!a(c,"layout"))c=a(c,"parentView");d=a(c,"template"),d&&d(this,b)})}(),function(){Ember.Handlebars.registerHelper("outlet",function(a,b){return a&&a.data&&a.data.isRenderData&&(b=a,a="view"),b.hash.currentViewBinding="controller."+a,Ember.Handlebars
-.helpers.view.call(this,Ember.ContainerView,b)})}(),function(){}(),function(){}(),function(){var a=Ember.set,b=Ember.get;Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){a(this,"checked",this.$().prop("checked"))}})}(),function(){var a=Ember.get,b=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},interpretKeyEvents:function(a){var b=Ember.TextSupport.KEY_EVENTS,c=b[a.keyCode];this._elementValueDidChange();if(c)return this[c](a)},_elementValueDidChange:function(){b(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){var a=Ember.get,b=Ember.set;Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size"],value:"",type:"text",size:null})}(),function(){var a=Ember.get,b=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var b=a(this,"target"),c=a(this,"context"),d=a(this,"templateData");return typeof b!="string"?b:Ember.Handlebars.getPath(c,b,{data:d})}).property("target").cacheable(),type:Ember.computed(function(a,b){var c=this.get("tagName");b!==undefined&&(this._type=b);if(this._type!==undefined)return this._type;if(c==="input"||c==="button")return"button"}).property("tagName").cacheable(),disabled:!1,href:Ember.computed(function(){return this.get("tagName")==="a"?"#":null}).property("tagName").cacheable(),mouseDown:function(){return a(this,"disabled")||(b(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),a(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(b(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(b(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(c){return a(this,"isActive")&&(this.triggerAction(),b(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,a(this,"propagateEvents")},keyDown:function(a){(a.keyCode===13||a.keyCode===32)&&this.mouseDown()},keyUp:function(a){(a.keyCode===13||a.keyCode===32)&&this.mouseUp()},touchStart:function(a){return this.mouseDown(a)},touchEnd:function(a){return this.mouseUp(a)},init:function(){this._super()}})}(),function(){var a=Ember.get,b=Ember.set;Ember.TextArea=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var b=a(this,"value"),c=this.$();c&&b!==c.val()&&c.val(b)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){Ember.TabContainerView=Ember.View.extend({init:function(){this._super()}})}(),function(){var a=Ember.get;Ember.TabPaneView=Ember.View.extend({tabsContainer:Ember.computed(function(){return this.nearestInstanceOf(Ember.TabContainerView)}).property().volatile(),isVisible:Ember.computed(function(){return a(this,"viewName")===a(this,"tabsContainer.currentView")}).property("tabsContainer.currentView").volatile(),init:function(){this._super()}})}(),function(){var a=Ember.get,b=Ember.setPath;Ember.TabView=Ember.View.extend({tabsContainer:Ember.computed(function(){return this.nearestInstanceOf(Ember.TabContainerView)}).property().volatile(),mouseUp:function(){b(this,"tabsContainer.currentView",a(this,"value"))},init:function(){this._super()}})}(),function(){}(),function(){var a=Ember.set,b=Ember.get,c=Ember.EnumerableUtils.indexOf,d=Ember.EnumerableUtils.indexesOf;Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(b,c,d,e,f){function q(a,b){var c="",e,f,g,h;return b.buffer.push("<option value>"),e=a,f="view.prompt",g={},h="true",g.escaped=h,h=d._triageMustache||a._triageMustache,k={},k.hash=g,k.contexts=[],k.contexts.push(e),k.data=b,typeof h===m?e=h.call(a,f,k):h===o?e=n.call(a,"_triageMustache",f,k):e=h,b.buffer.push(p(e)+"</option>"),c}function r(a,b){var c,e,f,g;c=a,e="Ember.SelectOption",f={},g="this",f.contentBinding=g,g=d.view||a.view,k={},k.hash=f,k.contexts=[],k.contexts.push(c),k.data=b,typeof g===m?c=g.call(a,e,k):g===o?c=n.call(a,"view",e,k):c=g,b.buffer.push(p(c))}d=d||Ember.Handlebars.helpers;var g="",h,i,j,k,l=this,m="function",n=d.helperMissing,o=void 0,p=this.escapeExpression;return h=c,i="view.prompt",j=d["if"],k=l.program(1,q,f),k.hash={},k.contexts=[],k.contexts.push(h),k.fn=k,k.inverse=l.noop,k.data=f,h=j.call(c,i,k),(h||h===0)&&f.buffer.push(h),h=c,i="view.content",j=d.each,k=l.program(3,r,f),k.hash={},k.contexts=[],k.contexts.push(h),k.fn=k,k.inverse=l.noop,k.data=f,h=j.call(c,i,k),(h||h===0)&&f.buffer.push(h),g}),attributeBindings:["multiple","tabindex"],multiple:!1,content:null,selection:null,value:Ember.computed(function(a,c){if(arguments.length===2)return c;var d=b(this,"optionValuePath").replace(/^content\.?/,"");return d?b(this,"selection."+d):b(this,"selection")}).property("selection").cacheable(),prompt:null,optionLabelPath:"content",optionValuePath:"content",_change:function(){b(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var c=b(this,"selection"),d=Ember.isArray(c);if(b(this,"multiple")){if(!d){a(this,"selection",Ember.A([c]));return}this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection"),valueDidChange:Ember.observer(function(){var a=b(this,"content"),c=b(this,"value"),d=b(this,"optionValuePath").replace(/^content\.?/,""),e=d?b(this,"selection."+d):b(this,"selection"),f;c!==e&&(f=a.find(function(a){return c===(d?b(a,d):a)}),this.set("selection",f))},"value"),_triggerChange:function(){var a=b(this,"selection");a&&this.selectionDidChange(),this._change()},_changeSingle:function(){var c=this.$()[0].selectedIndex,d=b(this,"content"),e=b(this,"prompt");if(!d)return;if(e&&c===0){a(this,"selection",null);return}e&&(c-=1),a(this,"selection",d.objectAt(c))},_changeMultiple:function(){var c=this.$("option:selected"),d=b(this,"prompt"),e=d?1:0,f=b(this,"content");if(!f)return;if(c){var g=c.map(function(){return this.index-e}).toArray();a(this,"selection",f.objectsAt(g))}},_selectionDidChangeSingle:function(){var a=this.get("element");if(!a)return;var d=b(this,"content"),e=b(this,"selection"),f=d?c(d,e):-1,g=b(this,"prompt");g&&(f+=1),a&&(a.selectedIndex=f)},_selectionDidChangeMultiple:function(){var a=b(this,"content"),e=b(this,"selection"),f=a?d(a,e):[-1],g=b(this,"prompt"),h=g?1:0,i=this.$("option"),j;i&&i.each(function(){j=this.index>-1?this.index+h:-1,this.selected=c(f,j)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}}),Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(a,b){b={data:b.data,hash:{}},Ember.Handlebars.helpers.bind.call(a,"view.label",b)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var a=b(this,"content"),d=b(this,"parentView.selection");return b(this,"parentView.multiple")?d&&c(d,a)>-1:a==d}).property("content","parentView.selection").volatile(),labelPathDidChange:Ember.observer(function(){var a=b(this,"parentView.optionLabelPath");if(!a)return;Ember.defineProperty(this,"label",Ember.computed(function(){return b(this,a)}).property(a).cacheable())},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var a=b(this,"parentView.optionValuePath");if(!a)return;Ember.defineProperty(this,"value",Ember.computed(function(){return b(this,a)}).property(a).cacheable())},"parentView.optionValuePath")})}(),function(){}(),function(){function a(){Ember.Handlebars.bootstrap(Ember.$(document))}Ember.Handlebars.bootstrap=function(a){var b='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(b,a).each(function(){var a=Ember.$(this),b=a.attr("type"),c=a.attr("type")==="text/x-raw-handlebars"?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),d=a.attr("data-template-name")||a.attr("id"),e=c(a.html()),f,g,h,i;if(d)Ember.TEMPLATES[d]=e,a.remove();else{if(a.parents("head").length!==0)throw new Ember.Error("Template found in <head> without a name specified. Please provide a data-template-name attribute.\n"+a.html());g=a.attr("data-view"),f=g?Ember.get(g):Ember.View,h=a.attr("data-element-id"),i={template:e},h&&(i.elementId=h),f=f.create(i),f._insertElementLater(function(){a.replaceWith(this.$()),a=null})}})},Ember.$(document).ready(a),Ember.onLoad("application",a)}(),function(){}(); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/lib/handlebars-1.0.0.beta.6.js b/SDL_Core/src/components/HMI/lib/handlebars-1.0.0.beta.6.js
deleted file mode 100644
index 70665b1c3..000000000
--- a/SDL_Core/src/components/HMI/lib/handlebars-1.0.0.beta.6.js
+++ /dev/null
@@ -1,1550 +0,0 @@
-// lib/handlebars/base.js
-var Handlebars = {};
-
-Handlebars.VERSION = "1.0.beta.6";
-
-Handlebars.helpers = {};
-Handlebars.partials = {};
-
-Handlebars.registerHelper = function(name, fn, inverse) {
- if(inverse) { fn.not = inverse; }
- this.helpers[name] = fn;
-};
-
-Handlebars.registerPartial = function(name, str) {
- this.partials[name] = str;
-};
-
-Handlebars.registerHelper('helperMissing', function(arg) {
- if(arguments.length === 2) {
- return undefined;
- } else {
- throw new Error("Could not find property '" + arg + "'");
- }
-});
-
-var toString = Object.prototype.toString, functionType = "[object Function]";
-
-Handlebars.registerHelper('blockHelperMissing', function(context, options) {
- var inverse = options.inverse || function() {}, fn = options.fn;
-
-
- var ret = "";
- var type = toString.call(context);
-
- if(type === functionType) { context = context.call(this); }
-
- if(context === true) {
- return fn(this);
- } else if(context === false || context == null) {
- return inverse(this);
- } else if(type === "[object Array]") {
- if(context.length > 0) {
- for(var i=0, j=context.length; i<j; i++) {
- ret = ret + fn(context[i]);
- }
- } else {
- ret = inverse(this);
- }
- return ret;
- } else {
- return fn(context);
- }
-});
-
-Handlebars.registerHelper('each', function(context, options) {
- var fn = options.fn, inverse = options.inverse;
- var ret = "";
-
- if(context && context.length > 0) {
- for(var i=0, j=context.length; i<j; i++) {
- ret = ret + fn(context[i]);
- }
- } else {
- ret = inverse(this);
- }
- return ret;
-});
-
-Handlebars.registerHelper('if', function(context, options) {
- var type = toString.call(context);
- if(type === functionType) { context = context.call(this); }
-
- if(!context || Handlebars.Utils.isEmpty(context)) {
- return options.inverse(this);
- } else {
- return options.fn(this);
- }
-});
-
-Handlebars.registerHelper('unless', function(context, options) {
- var fn = options.fn, inverse = options.inverse;
- options.fn = inverse;
- options.inverse = fn;
-
- return Handlebars.helpers['if'].call(this, context, options);
-});
-
-Handlebars.registerHelper('with', function(context, options) {
- return options.fn(context);
-});
-
-Handlebars.registerHelper('log', function(context) {
- Handlebars.log(context);
-});
-;
-// lib/handlebars/compiler/parser.js
-/* Jison generated parser */
-var handlebars = (function(){
-
-var parser = {trace: function trace() { },
-yy: {},
-symbols_: {"error":2,"root":3,"program":4,"EOF":5,"statements":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"params":25,"hash":26,"param":27,"STRING":28,"INTEGER":29,"BOOLEAN":30,"hashSegments":31,"hashSegment":32,"ID":33,"EQUALS":34,"pathSegments":35,"SEP":36,"$accept":0,"$end":1},
-terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},
-productions_: [0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],
-performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
-
-var $0 = $$.length - 1;
-switch (yystate) {
-case 1: return $$[$0-1]
-break;
-case 2: this.$ = new yy.ProgramNode($$[$0-2], $$[$0])
-break;
-case 3: this.$ = new yy.ProgramNode($$[$0])
-break;
-case 4: this.$ = new yy.ProgramNode([])
-break;
-case 5: this.$ = [$$[$0]]
-break;
-case 6: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]
-break;
-case 7: this.$ = new yy.InverseNode($$[$0-2], $$[$0-1], $$[$0])
-break;
-case 8: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0])
-break;
-case 9: this.$ = $$[$0]
-break;
-case 10: this.$ = $$[$0]
-break;
-case 11: this.$ = new yy.ContentNode($$[$0])
-break;
-case 12: this.$ = new yy.CommentNode($$[$0])
-break;
-case 13: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1])
-break;
-case 14: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1])
-break;
-case 15: this.$ = $$[$0-1]
-break;
-case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1])
-break;
-case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true)
-break;
-case 18: this.$ = new yy.PartialNode($$[$0-1])
-break;
-case 19: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1])
-break;
-case 20:
-break;
-case 21: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]]
-break;
-case 22: this.$ = [[$$[$0-1]].concat($$[$0]), null]
-break;
-case 23: this.$ = [[$$[$0-1]], $$[$0]]
-break;
-case 24: this.$ = [[$$[$0]], null]
-break;
-case 25: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
-break;
-case 26: this.$ = [$$[$0]]
-break;
-case 27: this.$ = $$[$0]
-break;
-case 28: this.$ = new yy.StringNode($$[$0])
-break;
-case 29: this.$ = new yy.IntegerNode($$[$0])
-break;
-case 30: this.$ = new yy.BooleanNode($$[$0])
-break;
-case 31: this.$ = new yy.HashNode($$[$0])
-break;
-case 32: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]
-break;
-case 33: this.$ = [$$[$0]]
-break;
-case 34: this.$ = [$$[$0-2], $$[$0]]
-break;
-case 35: this.$ = [$$[$0-2], new yy.StringNode($$[$0])]
-break;
-case 36: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])]
-break;
-case 37: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])]
-break;
-case 38: this.$ = new yy.IdNode($$[$0])
-break;
-case 39: $$[$0-2].push($$[$0]); this.$ = $$[$0-2];
-break;
-case 40: this.$ = [$$[$0]]
-break;
-}
-},
-table: [{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],
-defaultActions: {16:[2,1],37:[2,23],53:[2,21]},
-parseError: function parseError(str, hash) {
- throw new Error(str);
-},
-parse: function parse(input) {
- var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
- this.lexer.setInput(input);
- this.lexer.yy = this.yy;
- this.yy.lexer = this.lexer;
- if (typeof this.lexer.yylloc == "undefined")
- this.lexer.yylloc = {};
- var yyloc = this.lexer.yylloc;
- lstack.push(yyloc);
- if (typeof this.yy.parseError === "function")
- this.parseError = this.yy.parseError;
- function popStack(n) {
- stack.length = stack.length - 2 * n;
- vstack.length = vstack.length - n;
- lstack.length = lstack.length - n;
- }
- function lex() {
- var token;
- token = self.lexer.lex() || 1;
- if (typeof token !== "number") {
- token = self.symbols_[token] || token;
- }
- return token;
- }
- var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
- while (true) {
- state = stack[stack.length - 1];
- if (this.defaultActions[state]) {
- action = this.defaultActions[state];
- } else {
- if (symbol == null)
- symbol = lex();
- action = table[state] && table[state][symbol];
- }
- if (typeof action === "undefined" || !action.length || !action[0]) {
- if (!recovering) {
- expected = [];
- for (p in table[state])
- if (this.terminals_[p] && p > 2) {
- expected.push("'" + this.terminals_[p] + "'");
- }
- var errStr = "";
- if (this.lexer.showPosition) {
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + this.terminals_[symbol] + "'";
- } else {
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
- }
- this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
- }
- }
- if (action[0] instanceof Array && action.length > 1) {
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
- }
- switch (action[0]) {
- case 1:
- stack.push(symbol);
- vstack.push(this.lexer.yytext);
- lstack.push(this.lexer.yylloc);
- stack.push(action[1]);
- symbol = null;
- if (!preErrorSymbol) {
- yyleng = this.lexer.yyleng;
- yytext = this.lexer.yytext;
- yylineno = this.lexer.yylineno;
- yyloc = this.lexer.yylloc;
- if (recovering > 0)
- recovering--;
- } else {
- symbol = preErrorSymbol;
- preErrorSymbol = null;
- }
- break;
- case 2:
- len = this.productions_[action[1]][1];
- yyval.$ = vstack[vstack.length - len];
- yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
- r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
- if (typeof r !== "undefined") {
- return r;
- }
- if (len) {
- stack = stack.slice(0, -1 * len * 2);
- vstack = vstack.slice(0, -1 * len);
- lstack = lstack.slice(0, -1 * len);
- }
- stack.push(this.productions_[action[1]][0]);
- vstack.push(yyval.$);
- lstack.push(yyval._$);
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
- stack.push(newState);
- break;
- case 3:
- return true;
- }
- }
- return true;
-}
-};/* Jison generated lexer */
-var lexer = (function(){
-
-var lexer = ({EOF:1,
-parseError:function parseError(str, hash) {
- if (this.yy.parseError) {
- this.yy.parseError(str, hash);
- } else {
- throw new Error(str);
- }
- },
-setInput:function (input) {
- this._input = input;
- this._more = this._less = this.done = false;
- this.yylineno = this.yyleng = 0;
- this.yytext = this.matched = this.match = '';
- this.conditionStack = ['INITIAL'];
- this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
- return this;
- },
-input:function () {
- var ch = this._input[0];
- this.yytext+=ch;
- this.yyleng++;
- this.match+=ch;
- this.matched+=ch;
- var lines = ch.match(/\n/);
- if (lines) this.yylineno++;
- this._input = this._input.slice(1);
- return ch;
- },
-unput:function (ch) {
- this._input = ch + this._input;
- return this;
- },
-more:function () {
- this._more = true;
- return this;
- },
-pastInput:function () {
- var past = this.matched.substr(0, this.matched.length - this.match.length);
- return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
- },
-upcomingInput:function () {
- var next = this.match;
- if (next.length < 20) {
- next += this._input.substr(0, 20-next.length);
- }
- return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
- },
-showPosition:function () {
- var pre = this.pastInput();
- var c = new Array(pre.length + 1).join("-");
- return pre + this.upcomingInput() + "\n" + c+"^";
- },
-next:function () {
- if (this.done) {
- return this.EOF;
- }
- if (!this._input) this.done = true;
-
- var token,
- match,
- col,
- lines;
- if (!this._more) {
- this.yytext = '';
- this.match = '';
- }
- var rules = this._currentRules();
- for (var i=0;i < rules.length; i++) {
- match = this._input.match(this.rules[rules[i]]);
- if (match) {
- lines = match[0].match(/\n.*/g);
- if (lines) this.yylineno += lines.length;
- this.yylloc = {first_line: this.yylloc.last_line,
- last_line: this.yylineno+1,
- first_column: this.yylloc.last_column,
- last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
- this.yytext += match[0];
- this.match += match[0];
- this.matches = match;
- this.yyleng = this.yytext.length;
- this._more = false;
- this._input = this._input.slice(match[0].length);
- this.matched += match[0];
- token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
- if (token) return token;
- else return;
- }
- }
- if (this._input === "") {
- return this.EOF;
- } else {
- this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
- {text: "", token: null, line: this.yylineno});
- }
- },
-lex:function lex() {
- var r = this.next();
- if (typeof r !== 'undefined') {
- return r;
- } else {
- return this.lex();
- }
- },
-begin:function begin(condition) {
- this.conditionStack.push(condition);
- },
-popState:function popState() {
- return this.conditionStack.pop();
- },
-_currentRules:function _currentRules() {
- return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
- },
-topState:function () {
- return this.conditionStack[this.conditionStack.length-2];
- },
-pushState:function begin(condition) {
- this.begin(condition);
- }});
-lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
-
-var YYSTATE=YY_START
-switch($avoiding_name_collisions) {
-case 0:
- if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
- if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
- if(yy_.yytext) return 14;
-
-break;
-case 1: return 14;
-break;
-case 2: this.popState(); return 14;
-break;
-case 3: return 24;
-break;
-case 4: return 16;
-break;
-case 5: return 20;
-break;
-case 6: return 19;
-break;
-case 7: return 19;
-break;
-case 8: return 23;
-break;
-case 9: return 23;
-break;
-case 10: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
-break;
-case 11: return 22;
-break;
-case 12: return 34;
-break;
-case 13: return 33;
-break;
-case 14: return 33;
-break;
-case 15: return 36;
-break;
-case 16: /*ignore whitespace*/
-break;
-case 17: this.popState(); return 18;
-break;
-case 18: this.popState(); return 18;
-break;
-case 19: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 28;
-break;
-case 20: return 30;
-break;
-case 21: return 30;
-break;
-case 22: return 29;
-break;
-case 23: return 33;
-break;
-case 24: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 33;
-break;
-case 25: return 'INVALID';
-break;
-case 26: return 5;
-break;
-}
-};
-lexer.rules = [/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];
-lexer.conditions = {"mu":{"rules":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"INITIAL":{"rules":[0,1,26],"inclusive":true}};return lexer;})()
-parser.lexer = lexer;
-return parser;
-})();
-if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
-exports.parser = handlebars;
-exports.parse = function () { return handlebars.parse.apply(handlebars, arguments); }
-exports.main = function commonjsMain(args) {
- if (!args[1])
- throw new Error('Usage: '+args[0]+' FILE');
- if (typeof process !== 'undefined') {
- var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8");
- } else {
- var cwd = require("file").path(require("file").cwd());
- var source = cwd.join(args[1]).read({charset: "utf-8"});
- }
- return exports.parser.parse(source);
-}
-if (typeof module !== 'undefined' && require.main === module) {
- exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);
-}
-};
-;
-// lib/handlebars/compiler/base.js
-Handlebars.Parser = handlebars;
-
-Handlebars.parse = function(string) {
- Handlebars.Parser.yy = Handlebars.AST;
- return Handlebars.Parser.parse(string);
-};
-
-Handlebars.print = function(ast) {
- return new Handlebars.PrintVisitor().accept(ast);
-};
-
-Handlebars.logger = {
- DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
-
- // override in the host environment
- log: function(level, str) {}
-};
-
-Handlebars.log = function(level, str) { Handlebars.logger.log(level, str); };
-;
-// lib/handlebars/compiler/ast.js
-(function() {
-
- Handlebars.AST = {};
-
- Handlebars.AST.ProgramNode = function(statements, inverse) {
- this.type = "program";
- this.statements = statements;
- if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
- };
-
- Handlebars.AST.MustacheNode = function(params, hash, unescaped) {
- this.type = "mustache";
- this.id = params[0];
- this.params = params.slice(1);
- this.hash = hash;
- this.escaped = !unescaped;
- };
-
- Handlebars.AST.PartialNode = function(id, context) {
- this.type = "partial";
-
- // TODO: disallow complex IDs
-
- this.id = id;
- this.context = context;
- };
-
- var verifyMatch = function(open, close) {
- if(open.original !== close.original) {
- throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
- }
- };
-
- Handlebars.AST.BlockNode = function(mustache, program, close) {
- verifyMatch(mustache.id, close);
- this.type = "block";
- this.mustache = mustache;
- this.program = program;
- };
-
- Handlebars.AST.InverseNode = function(mustache, program, close) {
- verifyMatch(mustache.id, close);
- this.type = "inverse";
- this.mustache = mustache;
- this.program = program;
- };
-
- Handlebars.AST.ContentNode = function(string) {
- this.type = "content";
- this.string = string;
- };
-
- Handlebars.AST.HashNode = function(pairs) {
- this.type = "hash";
- this.pairs = pairs;
- };
-
- Handlebars.AST.IdNode = function(parts) {
- this.type = "ID";
- this.original = parts.join(".");
-
- var dig = [], depth = 0;
-
- for(var i=0,l=parts.length; i<l; i++) {
- var part = parts[i];
-
- if(part === "..") { depth++; }
- else if(part === "." || part === "this") { this.isScoped = true; }
- else { dig.push(part); }
- }
-
- this.parts = dig;
- this.string = dig.join('.');
- this.depth = depth;
- this.isSimple = (dig.length === 1) && (depth === 0);
- };
-
- Handlebars.AST.StringNode = function(string) {
- this.type = "STRING";
- this.string = string;
- };
-
- Handlebars.AST.IntegerNode = function(integer) {
- this.type = "INTEGER";
- this.integer = integer;
- };
-
- Handlebars.AST.BooleanNode = function(bool) {
- this.type = "BOOLEAN";
- this.bool = bool;
- };
-
- Handlebars.AST.CommentNode = function(comment) {
- this.type = "comment";
- this.comment = comment;
- };
-
-})();;
-// lib/handlebars/utils.js
-Handlebars.Exception = function(message) {
- var tmp = Error.prototype.constructor.apply(this, arguments);
-
- for (var p in tmp) {
- if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; }
- }
-
- this.message = tmp.message;
-};
-Handlebars.Exception.prototype = new Error;
-
-// Build out our basic SafeString type
-Handlebars.SafeString = function(string) {
- this.string = string;
-};
-Handlebars.SafeString.prototype.toString = function() {
- return this.string.toString();
-};
-
-(function() {
- var escape = {
- "<": "&lt;",
- ">": "&gt;",
- '"': "&quot;",
- "'": "&#x27;",
- "`": "&#x60;"
- };
-
- var badChars = /&(?!\w+;)|[<>"'`]/g;
- var possible = /[&<>"'`]/;
-
- var escapeChar = function(chr) {
- return escape[chr] || "&amp;";
- };
-
- Handlebars.Utils = {
- escapeExpression: function(string) {
- // don't escape SafeStrings, since they're already safe
- if (string instanceof Handlebars.SafeString) {
- return string.toString();
- } else if (string == null || string === false) {
- return "";
- }
-
- if(!possible.test(string)) { return string; }
- return string.replace(badChars, escapeChar);
- },
-
- isEmpty: function(value) {
- if (typeof value === "undefined") {
- return true;
- } else if (value === null) {
- return true;
- } else if (value === false) {
- return true;
- } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
- return true;
- } else {
- return false;
- }
- }
- };
-})();;
-// lib/handlebars/compiler/compiler.js
-Handlebars.Compiler = function() {};
-Handlebars.JavaScriptCompiler = function() {};
-
-(function(Compiler, JavaScriptCompiler) {
- Compiler.OPCODE_MAP = {
- appendContent: 1,
- getContext: 2,
- lookupWithHelpers: 3,
- lookup: 4,
- append: 5,
- invokeMustache: 6,
- appendEscaped: 7,
- pushString: 8,
- truthyOrFallback: 9,
- functionOrFallback: 10,
- invokeProgram: 11,
- invokePartial: 12,
- push: 13,
- assignToHash: 15,
- pushStringParam: 16
- };
-
- Compiler.MULTI_PARAM_OPCODES = {
- appendContent: 1,
- getContext: 1,
- lookupWithHelpers: 2,
- lookup: 1,
- invokeMustache: 3,
- pushString: 1,
- truthyOrFallback: 1,
- functionOrFallback: 1,
- invokeProgram: 3,
- invokePartial: 1,
- push: 1,
- assignToHash: 1,
- pushStringParam: 1
- };
-
- Compiler.DISASSEMBLE_MAP = {};
-
- for(var prop in Compiler.OPCODE_MAP) {
- var value = Compiler.OPCODE_MAP[prop];
- Compiler.DISASSEMBLE_MAP[value] = prop;
- }
-
- Compiler.multiParamSize = function(code) {
- return Compiler.MULTI_PARAM_OPCODES[Compiler.DISASSEMBLE_MAP[code]];
- };
-
- Compiler.prototype = {
- compiler: Compiler,
-
- disassemble: function() {
- var opcodes = this.opcodes, opcode, nextCode;
- var out = [], str, name, value;
-
- for(var i=0, l=opcodes.length; i<l; i++) {
- opcode = opcodes[i];
-
- if(opcode === 'DECLARE') {
- name = opcodes[++i];
- value = opcodes[++i];
- out.push("DECLARE " + name + " = " + value);
- } else {
- str = Compiler.DISASSEMBLE_MAP[opcode];
-
- var extraParams = Compiler.multiParamSize(opcode);
- var codes = [];
-
- for(var j=0; j<extraParams; j++) {
- nextCode = opcodes[++i];
-
- if(typeof nextCode === "string") {
- nextCode = "\"" + nextCode.replace("\n", "\\n") + "\"";
- }
-
- codes.push(nextCode);
- }
-
- str = str + " " + codes.join(" ");
-
- out.push(str);
- }
- }
-
- return out.join("\n");
- },
-
- guid: 0,
-
- compile: function(program, options) {
- this.children = [];
- this.depths = {list: []};
- this.options = options;
-
- // These changes will propagate to the other compiler components
- var knownHelpers = this.options.knownHelpers;
- this.options.knownHelpers = {
- 'helperMissing': true,
- 'blockHelperMissing': true,
- 'each': true,
- 'if': true,
- 'unless': true,
- 'with': true,
- 'log': true
- };
- if (knownHelpers) {
- for (var name in knownHelpers) {
- this.options.knownHelpers[name] = knownHelpers[name];
- }
- }
-
- return this.program(program);
- },
-
- accept: function(node) {
- return this[node.type](node);
- },
-
- program: function(program) {
- var statements = program.statements, statement;
- this.opcodes = [];
-
- for(var i=0, l=statements.length; i<l; i++) {
- statement = statements[i];
- this[statement.type](statement);
- }
- this.isSimple = l === 1;
-
- this.depths.list = this.depths.list.sort(function(a, b) {
- return a - b;
- });
-
- return this;
- },
-
- compileProgram: function(program) {
- var result = new this.compiler().compile(program, this.options);
- var guid = this.guid++;
-
- this.usePartial = this.usePartial || result.usePartial;
-
- this.children[guid] = result;
-
- for(var i=0, l=result.depths.list.length; i<l; i++) {
- depth = result.depths.list[i];
-
- if(depth < 2) { continue; }
- else { this.addDepth(depth - 1); }
- }
-
- return guid;
- },
-
- block: function(block) {
- var mustache = block.mustache;
- var depth, child, inverse, inverseGuid;
-
- var params = this.setupStackForMustache(mustache);
-
- var programGuid = this.compileProgram(block.program);
-
- if(block.program.inverse) {
- inverseGuid = this.compileProgram(block.program.inverse);
- this.declare('inverse', inverseGuid);
- }
-
- this.opcode('invokeProgram', programGuid, params.length, !!mustache.hash);
- this.declare('inverse', null);
- this.opcode('append');
- },
-
- inverse: function(block) {
- var params = this.setupStackForMustache(block.mustache);
-
- var programGuid = this.compileProgram(block.program);
-
- this.declare('inverse', programGuid);
-
- this.opcode('invokeProgram', null, params.length, !!block.mustache.hash);
- this.declare('inverse', null);
- this.opcode('append');
- },
-
- hash: function(hash) {
- var pairs = hash.pairs, pair, val;
-
- this.opcode('push', '{}');
-
- for(var i=0, l=pairs.length; i<l; i++) {
- pair = pairs[i];
- val = pair[1];
-
- this.accept(val);
- this.opcode('assignToHash', pair[0]);
- }
- },
-
- partial: function(partial) {
- var id = partial.id;
- this.usePartial = true;
-
- if(partial.context) {
- this.ID(partial.context);
- } else {
- this.opcode('push', 'depth0');
- }
-
- this.opcode('invokePartial', id.original);
- this.opcode('append');
- },
-
- content: function(content) {
- this.opcode('appendContent', content.string);
- },
-
- mustache: function(mustache) {
- var params = this.setupStackForMustache(mustache);
-
- this.opcode('invokeMustache', params.length, mustache.id.original, !!mustache.hash);
-
- if(mustache.escaped && !this.options.noEscape) {
- this.opcode('appendEscaped');
- } else {
- this.opcode('append');
- }
- },
-
- ID: function(id) {
- this.addDepth(id.depth);
-
- this.opcode('getContext', id.depth);
-
- this.opcode('lookupWithHelpers', id.parts[0] || null, id.isScoped || false);
-
- for(var i=1, l=id.parts.length; i<l; i++) {
- this.opcode('lookup', id.parts[i]);
- }
- },
-
- STRING: function(string) {
- this.opcode('pushString', string.string);
- },
-
- INTEGER: function(integer) {
- this.opcode('push', integer.integer);
- },
-
- BOOLEAN: function(bool) {
- this.opcode('push', bool.bool);
- },
-
- comment: function() {},
-
- // HELPERS
- pushParams: function(params) {
- var i = params.length, param;
-
- while(i--) {
- param = params[i];
-
- if(this.options.stringParams) {
- if(param.depth) {
- this.addDepth(param.depth);
- }
-
- this.opcode('getContext', param.depth || 0);
- this.opcode('pushStringParam', param.string);
- } else {
- this[param.type](param);
- }
- }
- },
-
- opcode: function(name, val1, val2, val3) {
- this.opcodes.push(Compiler.OPCODE_MAP[name]);
- if(val1 !== undefined) { this.opcodes.push(val1); }
- if(val2 !== undefined) { this.opcodes.push(val2); }
- if(val3 !== undefined) { this.opcodes.push(val3); }
- },
-
- declare: function(name, value) {
- this.opcodes.push('DECLARE');
- this.opcodes.push(name);
- this.opcodes.push(value);
- },
-
- addDepth: function(depth) {
- if(depth === 0) { return; }
-
- if(!this.depths[depth]) {
- this.depths[depth] = true;
- this.depths.list.push(depth);
- }
- },
-
- setupStackForMustache: function(mustache) {
- var params = mustache.params;
-
- this.pushParams(params);
-
- if(mustache.hash) {
- this.hash(mustache.hash);
- }
-
- this.ID(mustache.id);
-
- return params;
- }
- };
-
- JavaScriptCompiler.prototype = {
- // PUBLIC API: You can override these methods in a subclass to provide
- // alternative compiled forms for name lookup and buffering semantics
- nameLookup: function(parent, name, type) {
- if (/^[0-9]+$/.test(name)) {
- return parent + "[" + name + "]";
- } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
- return parent + "." + name;
- }
- else {
- return parent + "['" + name + "']";
- }
- },
-
- appendToBuffer: function(string) {
- if (this.environment.isSimple) {
- return "return " + string + ";";
- } else {
- return "buffer += " + string + ";";
- }
- },
-
- initializeBuffer: function() {
- return this.quotedString("");
- },
-
- namespace: "Handlebars",
- // END PUBLIC API
-
- compile: function(environment, options, context, asObject) {
- this.environment = environment;
- this.options = options || {};
-
- this.name = this.environment.name;
- this.isChild = !!context;
- this.context = context || {
- programs: [],
- aliases: { self: 'this' },
- registers: {list: []}
- };
-
- this.preamble();
-
- this.stackSlot = 0;
- this.stackVars = [];
-
- this.compileChildren(environment, options);
-
- var opcodes = environment.opcodes, opcode;
-
- this.i = 0;
-
- for(l=opcodes.length; this.i<l; this.i++) {
- opcode = this.nextOpcode(0);
-
- if(opcode[0] === 'DECLARE') {
- this.i = this.i + 2;
- this[opcode[1]] = opcode[2];
- } else {
- this.i = this.i + opcode[1].length;
- this[opcode[0]].apply(this, opcode[1]);
- }
- }
-
- return this.createFunctionContext(asObject);
- },
-
- nextOpcode: function(n) {
- var opcodes = this.environment.opcodes, opcode = opcodes[this.i + n], name, val;
- var extraParams, codes;
-
- if(opcode === 'DECLARE') {
- name = opcodes[this.i + 1];
- val = opcodes[this.i + 2];
- return ['DECLARE', name, val];
- } else {
- name = Compiler.DISASSEMBLE_MAP[opcode];
-
- extraParams = Compiler.multiParamSize(opcode);
- codes = [];
-
- for(var j=0; j<extraParams; j++) {
- codes.push(opcodes[this.i + j + 1 + n]);
- }
-
- return [name, codes];
- }
- },
-
- eat: function(opcode) {
- this.i = this.i + opcode.length;
- },
-
- preamble: function() {
- var out = [];
-
- // this register will disambiguate helper lookup from finding a function in
- // a context. This is necessary for mustache compatibility, which requires
- // that context functions in blocks are evaluated by blockHelperMissing, and
- // then proceed as if the resulting value was provided to blockHelperMissing.
- this.useRegister('foundHelper');
-
- if (!this.isChild) {
- var namespace = this.namespace;
- var copies = "helpers = helpers || " + namespace + ".helpers;";
- if(this.environment.usePartial) { copies = copies + " partials = partials || " + namespace + ".partials;"; }
- out.push(copies);
- } else {
- out.push('');
- }
-
- if (!this.environment.isSimple) {
- out.push(", buffer = " + this.initializeBuffer());
- } else {
- out.push("");
- }
-
- // track the last context pushed into place to allow skipping the
- // getContext opcode when it would be a noop
- this.lastContext = 0;
- this.source = out;
- },
-
- createFunctionContext: function(asObject) {
- var locals = this.stackVars;
- if (!this.isChild) {
- locals = locals.concat(this.context.registers.list);
- }
-
- if(locals.length > 0) {
- this.source[1] = this.source[1] + ", " + locals.join(", ");
- }
-
- // Generate minimizer alias mappings
- if (!this.isChild) {
- var aliases = []
- for (var alias in this.context.aliases) {
- this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
- }
- }
-
- if (this.source[1]) {
- this.source[1] = "var " + this.source[1].substring(2) + ";";
- }
-
- // Merge children
- if (!this.isChild) {
- this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
- }
-
- if (!this.environment.isSimple) {
- this.source.push("return buffer;");
- }
-
- var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
-
- for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
- params.push("depth" + this.environment.depths.list[i]);
- }
-
- if (asObject) {
- params.push(this.source.join("\n "));
-
- return Function.apply(this, params);
- } else {
- var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + this.source.join("\n ") + '}';
- Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n");
- return functionSource;
- }
- },
-
- appendContent: function(content) {
- this.source.push(this.appendToBuffer(this.quotedString(content)));
- },
-
- append: function() {
- var local = this.popStack();
- this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
- if (this.environment.isSimple) {
- this.source.push("else { " + this.appendToBuffer("''") + " }");
- }
- },
-
- appendEscaped: function() {
- var opcode = this.nextOpcode(1), extra = "";
- this.context.aliases.escapeExpression = 'this.escapeExpression';
-
- if(opcode[0] === 'appendContent') {
- extra = " + " + this.quotedString(opcode[1][0]);
- this.eat(opcode);
- }
-
- this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")" + extra));
- },
-
- getContext: function(depth) {
- if(this.lastContext !== depth) {
- this.lastContext = depth;
- }
- },
-
- lookupWithHelpers: function(name, isScoped) {
- if(name) {
- var topStack = this.nextStack();
-
- this.usingKnownHelper = false;
-
- var toPush;
- if (!isScoped && this.options.knownHelpers[name]) {
- toPush = topStack + " = " + this.nameLookup('helpers', name, 'helper');
- this.usingKnownHelper = true;
- } else if (isScoped || this.options.knownHelpersOnly) {
- toPush = topStack + " = " + this.nameLookup('depth' + this.lastContext, name, 'context');
- } else {
- this.register('foundHelper', this.nameLookup('helpers', name, 'helper'));
- toPush = topStack + " = foundHelper || " + this.nameLookup('depth' + this.lastContext, name, 'context');
- }
-
- toPush += ';';
- this.source.push(toPush);
- } else {
- this.pushStack('depth' + this.lastContext);
- }
- },
-
- lookup: function(name) {
- var topStack = this.topStack();
- this.source.push(topStack + " = (" + topStack + " === null || " + topStack + " === undefined || " + topStack + " === false ? " +
- topStack + " : " + this.nameLookup(topStack, name, 'context') + ");");
- },
-
- pushStringParam: function(string) {
- this.pushStack('depth' + this.lastContext);
- this.pushString(string);
- },
-
- pushString: function(string) {
- this.pushStack(this.quotedString(string));
- },
-
- push: function(name) {
- this.pushStack(name);
- },
-
- invokeMustache: function(paramSize, original, hasHash) {
- this.populateParams(paramSize, this.quotedString(original), "{}", null, hasHash, function(nextStack, helperMissingString, id) {
- if (!this.usingKnownHelper) {
- this.context.aliases.helperMissing = 'helpers.helperMissing';
- this.context.aliases.undef = 'void 0';
- this.source.push("else if(" + id + "=== undef) { " + nextStack + " = helperMissing.call(" + helperMissingString + "); }");
- if (nextStack !== id) {
- this.source.push("else { " + nextStack + " = " + id + "; }");
- }
- }
- });
- },
-
- invokeProgram: function(guid, paramSize, hasHash) {
- var inverse = this.programExpression(this.inverse);
- var mainProgram = this.programExpression(guid);
-
- this.populateParams(paramSize, null, mainProgram, inverse, hasHash, function(nextStack, helperMissingString, id) {
- if (!this.usingKnownHelper) {
- this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
- this.source.push("else { " + nextStack + " = blockHelperMissing.call(" + helperMissingString + "); }");
- }
- });
- },
-
- populateParams: function(paramSize, helperId, program, inverse, hasHash, fn) {
- var needsRegister = hasHash || this.options.stringParams || inverse || this.options.data;
- var id = this.popStack(), nextStack;
- var params = [], param, stringParam, stringOptions;
-
- if (needsRegister) {
- this.register('tmp1', program);
- stringOptions = 'tmp1';
- } else {
- stringOptions = '{ hash: {} }';
- }
-
- if (needsRegister) {
- var hash = (hasHash ? this.popStack() : '{}');
- this.source.push('tmp1.hash = ' + hash + ';');
- }
-
- if(this.options.stringParams) {
- this.source.push('tmp1.contexts = [];');
- }
-
- for(var i=0; i<paramSize; i++) {
- param = this.popStack();
- params.push(param);
-
- if(this.options.stringParams) {
- this.source.push('tmp1.contexts.push(' + this.popStack() + ');');
- }
- }
-
- if(inverse) {
- this.source.push('tmp1.fn = tmp1;');
- this.source.push('tmp1.inverse = ' + inverse + ';');
- }
-
- if(this.options.data) {
- this.source.push('tmp1.data = data;');
- }
-
- params.push(stringOptions);
-
- this.populateCall(params, id, helperId || id, fn, program !== '{}');
- },
-
- populateCall: function(params, id, helperId, fn, program) {
- var paramString = ["depth0"].concat(params).join(", ");
- var helperMissingString = ["depth0"].concat(helperId).concat(params).join(", ");
-
- var nextStack = this.nextStack();
-
- if (this.usingKnownHelper) {
- this.source.push(nextStack + " = " + id + ".call(" + paramString + ");");
- } else {
- this.context.aliases.functionType = '"function"';
- var condition = program ? "foundHelper && " : ""
- this.source.push("if(" + condition + "typeof " + id + " === functionType) { " + nextStack + " = " + id + ".call(" + paramString + "); }");
- }
- fn.call(this, nextStack, helperMissingString, id);
- this.usingKnownHelper = false;
- },
-
- invokePartial: function(context) {
- params = [this.nameLookup('partials', context, 'partial'), "'" + context + "'", this.popStack(), "helpers", "partials"];
-
- if (this.options.data) {
- params.push("data");
- }
-
- this.pushStack("self.invokePartial(" + params.join(", ") + ");");
- },
-
- assignToHash: function(key) {
- var value = this.popStack();
- var hash = this.topStack();
-
- this.source.push(hash + "['" + key + "'] = " + value + ";");
- },
-
- // HELPERS
-
- compiler: JavaScriptCompiler,
-
- compileChildren: function(environment, options) {
- var children = environment.children, child, compiler;
-
- for(var i=0, l=children.length; i<l; i++) {
- child = children[i];
- compiler = new this.compiler();
-
- this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
- var index = this.context.programs.length;
- child.index = index;
- child.name = 'program' + index;
- this.context.programs[index] = compiler.compile(child, options, this.context);
- }
- },
-
- programExpression: function(guid) {
- if(guid == null) { return "self.noop"; }
-
- var child = this.environment.children[guid],
- depths = child.depths.list;
- var programParams = [child.index, child.name, "data"];
-
- for(var i=0, l = depths.length; i<l; i++) {
- depth = depths[i];
-
- if(depth === 1) { programParams.push("depth0"); }
- else { programParams.push("depth" + (depth - 1)); }
- }
-
- if(depths.length === 0) {
- return "self.program(" + programParams.join(", ") + ")";
- } else {
- programParams.shift();
- return "self.programWithDepth(" + programParams.join(", ") + ")";
- }
- },
-
- register: function(name, val) {
- this.useRegister(name);
- this.source.push(name + " = " + val + ";");
- },
-
- useRegister: function(name) {
- if(!this.context.registers[name]) {
- this.context.registers[name] = true;
- this.context.registers.list.push(name);
- }
- },
-
- pushStack: function(item) {
- this.source.push(this.nextStack() + " = " + item + ";");
- return "stack" + this.stackSlot;
- },
-
- nextStack: function() {
- this.stackSlot++;
- if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
- return "stack" + this.stackSlot;
- },
-
- popStack: function() {
- return "stack" + this.stackSlot--;
- },
-
- topStack: function() {
- return "stack" + this.stackSlot;
- },
-
- quotedString: function(str) {
- return '"' + str
- .replace(/\\/g, '\\\\')
- .replace(/"/g, '\\"')
- .replace(/\n/g, '\\n')
- .replace(/\r/g, '\\r') + '"';
- }
- };
-
- var reservedWords = (
- "break else new var" +
- " case finally return void" +
- " catch for switch while" +
- " continue function this with" +
- " default if throw" +
- " delete in try" +
- " do instanceof typeof" +
- " abstract enum int short" +
- " boolean export interface static" +
- " byte extends long super" +
- " char final native synchronized" +
- " class float package throws" +
- " const goto private transient" +
- " debugger implements protected volatile" +
- " double import public let yield"
- ).split(" ");
-
- var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
-
- for(var i=0, l=reservedWords.length; i<l; i++) {
- compilerWords[reservedWords[i]] = true;
- }
-
- JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
- if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {
- return true;
- }
- return false;
- }
-
-})(Handlebars.Compiler, Handlebars.JavaScriptCompiler);
-
-Handlebars.precompile = function(string, options) {
- options = options || {};
-
- var ast = Handlebars.parse(string);
- var environment = new Handlebars.Compiler().compile(ast, options);
- return new Handlebars.JavaScriptCompiler().compile(environment, options);
-};
-
-Handlebars.compile = function(string, options) {
- options = options || {};
-
- var compiled;
- function compile() {
- var ast = Handlebars.parse(string);
- var environment = new Handlebars.Compiler().compile(ast, options);
- var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
- return Handlebars.template(templateSpec);
- }
-
- // Template is only compiled on first use and cached after that point.
- return function(context, options) {
- if (!compiled) {
- compiled = compile();
- }
- return compiled.call(this, context, options);
- };
-};
-;
-// lib/handlebars/runtime.js
-Handlebars.VM = {
- template: function(templateSpec) {
- // Just add water
- var container = {
- escapeExpression: Handlebars.Utils.escapeExpression,
- invokePartial: Handlebars.VM.invokePartial,
- programs: [],
- program: function(i, fn, data) {
- var programWrapper = this.programs[i];
- if(data) {
- return Handlebars.VM.program(fn, data);
- } else if(programWrapper) {
- return programWrapper;
- } else {
- programWrapper = this.programs[i] = Handlebars.VM.program(fn);
- return programWrapper;
- }
- },
- programWithDepth: Handlebars.VM.programWithDepth,
- noop: Handlebars.VM.noop
- };
-
- return function(context, options) {
- options = options || {};
- return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
- };
- },
-
- programWithDepth: function(fn, data, $depth) {
- var args = Array.prototype.slice.call(arguments, 2);
-
- return function(context, options) {
- options = options || {};
-
- return fn.apply(this, [context, options.data || data].concat(args));
- };
- },
- program: function(fn, data) {
- return function(context, options) {
- options = options || {};
-
- return fn(context, options.data || data);
- };
- },
- noop: function() { return ""; },
- invokePartial: function(partial, name, context, helpers, partials, data) {
- options = { helpers: helpers, partials: partials, data: data };
-
- if(partial === undefined) {
- throw new Handlebars.Exception("The partial " + name + " could not be found");
- } else if(partial instanceof Function) {
- return partial(context, options);
- } else if (!Handlebars.compile) {
- throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
- } else {
- partials[name] = Handlebars.compile(partial);
- return partials[name](context, options);
- }
- }
-};
-
-Handlebars.template = Handlebars.VM.template;
-;
diff --git a/SDL_Core/src/components/HMI/lib/iscroll-lite.js b/SDL_Core/src/components/HMI/lib/iscroll-lite.js
deleted file mode 100644
index 3a6cab7d2..000000000
--- a/SDL_Core/src/components/HMI/lib/iscroll-lite.js
+++ /dev/null
@@ -1,594 +0,0 @@
-/*!
- * iScroll Lite base on iScroll v4.1.6 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org
- * Released under MIT license, http://cubiq.org/license
- */
-
-(function(){
-var m = Math,
- mround = function (r) { return r >> 0; },
- vendor = (/webkit/i).test(navigator.appVersion) ? 'webkit' :
- (/firefox/i).test(navigator.userAgent) ? 'Moz' :
- 'opera' in window ? 'O' : '',
-
- // Browser capabilities
- isAndroid = (/android/gi).test(navigator.appVersion),
- isIDevice = (/iphone|ipad/gi).test(navigator.appVersion),
- isPlaybook = (/playbook/gi).test(navigator.appVersion),
- isTouchPad = (/hp-tablet/gi).test(navigator.appVersion),
-
- has3d = 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix(),
- hasTouch = 'ontouchstart' in window && !isTouchPad,
- hasTransform = vendor + 'Transform' in document.documentElement.style,
- hasTransitionEnd = isIDevice || isPlaybook,
-
- nextFrame = (function() {
- return window.requestAnimationFrame
- || window.webkitRequestAnimationFrame
- || window.mozRequestAnimationFrame
- || window.oRequestAnimationFrame
- || window.msRequestAnimationFrame
- || function(callback) { return setTimeout(callback, 17); }
- })(),
- cancelFrame = (function () {
- return window.cancelRequestAnimationFrame
- || window.webkitCancelAnimationFrame
- || window.webkitCancelRequestAnimationFrame
- || window.mozCancelRequestAnimationFrame
- || window.oCancelRequestAnimationFrame
- || window.msCancelRequestAnimationFrame
- || clearTimeout
- })(),
-
- // Events
- RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize',
- START_EV = hasTouch ? 'touchstart' : 'mousedown',
- MOVE_EV = hasTouch ? 'touchmove' : 'mousemove',
- END_EV = hasTouch ? 'touchend' : 'mouseup',
- CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup',
-
- // Helpers
- trnOpen = 'translate' + (has3d ? '3d(' : '('),
- trnClose = has3d ? ',0)' : ')',
-
- // Constructor
- iScroll = function (el, options) {
- var that = this,
- doc = document,
- i;
-
- that.wrapper = typeof el == 'object' ? el : doc.getElementById(el);
- that.wrapper.style.overflow = 'hidden';
- that.scroller = that.wrapper.children[0];
-
- // Default options
- that.options = {
- hScroll: true,
- vScroll: true,
- x: 0,
- y: 0,
- bounce: true,
- bounceLock: false,
- momentum: true,
- lockDirection: true,
- useTransform: true,
- useTransition: false,
-
- // Events
- onRefresh: null,
- onBeforeScrollStart: function (e) { e.preventDefault(); },
- onScrollStart: null,
- onBeforeScrollMove: null,
- onScrollMove: null,
- onBeforeScrollEnd: null,
- onScrollEnd: null,
- onTouchEnd: null,
- onDestroy: null
- };
-
- // User defined options
- for (i in options) that.options[i] = options[i];
-
- // Set starting position
- that.x = that.options.x;
- that.y = that.options.y;
-
- // Normalize options
- that.options.useTransform = hasTransform ? that.options.useTransform : false;
- that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar;
- that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar;
- that.options.useTransition = hasTransitionEnd && that.options.useTransition;
-
- // Set some default styles
- that.scroller.style[vendor + 'TransitionProperty'] = that.options.useTransform ? '-' + vendor.toLowerCase() + '-transform' : 'top left';
- that.scroller.style[vendor + 'TransitionDuration'] = '0';
- that.scroller.style[vendor + 'TransformOrigin'] = '0 0';
- if (that.options.useTransition) that.scroller.style[vendor + 'TransitionTimingFunction'] = 'cubic-bezier(0.33,0.66,0.66,1)';
-
- if (that.options.useTransform) that.scroller.style[vendor + 'Transform'] = trnOpen + that.x + 'px,' + that.y + 'px' + trnClose;
- else that.scroller.style.cssText += ';position:absolute;top:' + that.y + 'px;left:' + that.x + 'px';
-
- that.refresh();
-
- that._bind(RESIZE_EV, window);
- that._bind(START_EV);
- if (!hasTouch) that._bind('mouseout', that.wrapper);
- };
-
-// Prototype
-iScroll.prototype = {
- enabled: true,
- x: 0,
- y: 0,
- steps: [],
- scale: 1,
-
- handleEvent: function (e) {
- var that = this;
- switch(e.type) {
- case START_EV:
- if (!hasTouch && e.button !== 0) return;
- that._start(e);
- break;
- case MOVE_EV: that._move(e); break;
- case END_EV:
- case CANCEL_EV: that._end(e); break;
- case RESIZE_EV: that._resize(); break;
- case 'mouseout': that._mouseout(e); break;
- case 'webkitTransitionEnd': that._transitionEnd(e); break;
- }
- },
-
- _resize: function () {
- this.refresh();
- },
-
- _pos: function (x, y) {
- x = this.hScroll ? x : 0;
- y = this.vScroll ? y : 0;
-
- if (this.options.useTransform) {
- this.scroller.style[vendor + 'Transform'] = trnOpen + x + 'px,' + y + 'px' + trnClose + ' scale(' + this.scale + ')';
- } else {
- x = mround(x);
- y = mround(y);
- this.scroller.style.left = x + 'px';
- this.scroller.style.top = y + 'px';
- }
-
- this.x = x;
- this.y = y;
- },
-
- _start: function (e) {
- var that = this,
- point = hasTouch ? e.touches[0] : e,
- matrix, x, y;
-
- if (!that.enabled) return;
-
- if (that.options.onBeforeScrollStart) that.options.onBeforeScrollStart.call(that, e);
-
- if (that.options.useTransition) that._transitionTime(0);
-
- that.moved = false;
- that.animating = false;
- that.zoomed = false;
- that.distX = 0;
- that.distY = 0;
- that.absDistX = 0;
- that.absDistY = 0;
- that.dirX = 0;
- that.dirY = 0;
-
- if (that.options.momentum) {
- if (that.options.useTransform) {
- // Very lame general purpose alternative to CSSMatrix
- matrix = getComputedStyle(that.scroller, null)[vendor + 'Transform'].replace(/[^0-9-.,]/g, '').split(',');
- x = matrix[4] * 1;
- y = matrix[5] * 1;
- } else {
- x = getComputedStyle(that.scroller, null).left.replace(/[^0-9-]/g, '') * 1;
- y = getComputedStyle(that.scroller, null).top.replace(/[^0-9-]/g, '') * 1;
- }
-
- if (x != that.x || y != that.y) {
- if (that.options.useTransition) that._unbind('webkitTransitionEnd');
- else cancelFrame(that.aniTime);
- that.steps = [];
- that._pos(x, y);
- }
- }
-
- that.startX = that.x;
- that.startY = that.y;
- that.pointX = point.pageX;
- that.pointY = point.pageY;
-
- that.startTime = e.timeStamp || Date.now();
-
- if (that.options.onScrollStart) that.options.onScrollStart.call(that, e);
-
- that._bind(MOVE_EV);
- that._bind(END_EV);
- that._bind(CANCEL_EV);
- },
-
- _move: function (e) {
- var that = this,
- point = hasTouch ? e.touches[0] : e,
- deltaX = point.pageX - that.pointX,
- deltaY = point.pageY - that.pointY,
- newX = that.x + deltaX,
- newY = that.y + deltaY,
- timestamp = e.timeStamp || Date.now();
-
- if (that.options.onBeforeScrollMove) that.options.onBeforeScrollMove.call(that, e);
-
- that.pointX = point.pageX;
- that.pointY = point.pageY;
-
- // Slow down if outside of the boundaries
- if (newX > 0 || newX < that.maxScrollX) {
- newX = that.options.bounce ? that.x + (deltaX / 2) : newX >= 0 || that.maxScrollX >= 0 ? 0 : that.maxScrollX;
- }
- if (newY > 0 || newY < that.maxScrollY) {
- newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= 0 || that.maxScrollY >= 0 ? 0 : that.maxScrollY;
- }
-
- that.distX += deltaX;
- that.distY += deltaY;
- that.absDistX = m.abs(that.distX);
- that.absDistY = m.abs(that.distY);
-
- if (that.absDistX < 6 && that.absDistY < 6) {
- return;
- }
-
- // Lock direction
- if (that.options.lockDirection) {
- if (that.absDistX > that.absDistY + 5) {
- newY = that.y;
- deltaY = 0;
- } else if (that.absDistY > that.absDistX + 5) {
- newX = that.x;
- deltaX = 0;
- }
- }
-
- that.moved = true;
- that._pos(newX, newY);
- that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
- that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;
-
- if (timestamp - that.startTime > 300) {
- that.startTime = timestamp;
- that.startX = that.x;
- that.startY = that.y;
- }
-
- if (that.options.onScrollMove) that.options.onScrollMove.call(that, e);
- },
-
- _end: function (e) {
- if (hasTouch && e.touches.length != 0) return;
-
- var that = this,
- point = hasTouch ? e.changedTouches[0] : e,
- target, ev,
- momentumX = { dist:0, time:0 },
- momentumY = { dist:0, time:0 },
- duration = (e.timeStamp || Date.now()) - that.startTime,
- newPosX = that.x,
- newPosY = that.y,
- newDuration;
-
- that._unbind(MOVE_EV);
- that._unbind(END_EV);
- that._unbind(CANCEL_EV);
-
- if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e);
-
- if (!that.moved) {
- if (hasTouch) {
- // Find the last touched element
- target = point.target;
- while (target.nodeType != 1) target = target.parentNode;
-
- if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA') {
- ev = document.createEvent('MouseEvents');
- ev.initMouseEvent('click', true, true, e.view, 1,
- point.screenX, point.screenY, point.clientX, point.clientY,
- e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
- 0, null);
- ev._fake = true;
- target.dispatchEvent(ev);
- }
- }
-
- that._resetPos(200);
-
- if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
- return;
- }
-
- if (duration < 300 && that.options.momentum) {
- momentumX = newPosX ? that._momentum(newPosX - that.startX, duration, -that.x, that.scrollerW - that.wrapperW + that.x, that.options.bounce ? that.wrapperW : 0) : momentumX;
- momentumY = newPosY ? that._momentum(newPosY - that.startY, duration, -that.y, (that.maxScrollY < 0 ? that.scrollerH - that.wrapperH + that.y : 0), that.options.bounce ? that.wrapperH : 0) : momentumY;
-
- newPosX = that.x + momentumX.dist;
- newPosY = that.y + momentumY.dist;
-
- if ((that.x > 0 && newPosX > 0) || (that.x < that.maxScrollX && newPosX < that.maxScrollX)) momentumX = { dist:0, time:0 };
- if ((that.y > 0 && newPosY > 0) || (that.y < that.maxScrollY && newPosY < that.maxScrollY)) momentumY = { dist:0, time:0 };
- }
-
- if (momentumX.dist || momentumY.dist) {
- newDuration = m.max(m.max(momentumX.time, momentumY.time), 10);
-
- that.scrollTo(mround(newPosX), mround(newPosY), newDuration);
-
- if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
- return;
- }
-
- that._resetPos(200);
- if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
- },
-
- _resetPos: function (time) {
- var that = this,
- resetX = that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x,
- resetY = that.y >= 0 || that.maxScrollY > 0 ? 0 : that.y < that.maxScrollY ? that.maxScrollY : that.y;
-
- if (resetX == that.x && resetY == that.y) {
- if (that.moved) {
- if (that.options.onScrollEnd) that.options.onScrollEnd.call(that); // Execute custom code on scroll end
- that.moved = false;
- }
-
- return;
- }
-
- that.scrollTo(resetX, resetY, time || 0);
- },
-
- _mouseout: function (e) {
- var t = e.relatedTarget;
-
- if (!t) {
- this._end(e);
- return;
- }
-
- while (t = t.parentNode) if (t == this.wrapper) return;
-
- this._end(e);
- },
-
- _transitionEnd: function (e) {
- var that = this;
-
- if (e.target != that.scroller) return;
-
- that._unbind('webkitTransitionEnd');
-
- that._startAni();
- },
-
- /**
- *
- * Utilities
- *
- */
- _startAni: function () {
- var that = this,
- startX = that.x, startY = that.y,
- startTime = Date.now(),
- step, easeOut,
- animate;
-
- if (that.animating) return;
-
- if (!that.steps.length) {
- that._resetPos(400);
- return;
- }
-
- step = that.steps.shift();
-
- if (step.x == startX && step.y == startY) step.time = 0;
-
- that.animating = true;
- that.moved = true;
-
- if (that.options.useTransition) {
- that._transitionTime(step.time);
- that._pos(step.x, step.y);
- that.animating = false;
- if (step.time) that._bind('webkitTransitionEnd');
- else that._resetPos(0);
- return;
- }
-
- animate = function () {
- var now = Date.now(),
- newX, newY;
-
- if (now >= startTime + step.time) {
- that._pos(step.x, step.y);
- that.animating = false;
- if (that.options.onAnimationEnd) that.options.onAnimationEnd.call(that); // Execute custom code on animation end
- that._startAni();
- return;
- }
-
- now = (now - startTime) / step.time - 1;
- easeOut = m.sqrt(1 - now * now);
- newX = (step.x - startX) * easeOut + startX;
- newY = (step.y - startY) * easeOut + startY;
- that._pos(newX, newY);
- if (that.animating) that.aniTime = nextFrame(animate);
- };
-
- animate();
- },
-
- _transitionTime: function (time) {
- this.scroller.style[vendor + 'TransitionDuration'] = time + 'ms';
- },
-
- _momentum: function (dist, time, maxDistUpper, maxDistLower, size) {
- var deceleration = 0.0006,
- speed = m.abs(dist) / time,
- newDist = (speed * speed) / (2 * deceleration),
- newTime = 0, outsideDist = 0;
-
- // Proportinally reduce speed if we are outside of the boundaries
- if (dist > 0 && newDist > maxDistUpper) {
- outsideDist = size / (6 / (newDist / speed * deceleration));
- maxDistUpper = maxDistUpper + outsideDist;
- speed = speed * maxDistUpper / newDist;
- newDist = maxDistUpper;
- } else if (dist < 0 && newDist > maxDistLower) {
- outsideDist = size / (6 / (newDist / speed * deceleration));
- maxDistLower = maxDistLower + outsideDist;
- speed = speed * maxDistLower / newDist;
- newDist = maxDistLower;
- }
-
- newDist = newDist * (dist < 0 ? -1 : 1);
- newTime = speed / deceleration;
-
- return { dist: newDist, time: mround(newTime) };
- },
-
- _offset: function (el) {
- var left = -el.offsetLeft,
- top = -el.offsetTop;
-
- while (el = el.offsetParent) {
- left -= el.offsetLeft;
- top -= el.offsetTop;
- }
-
- return { left: left, top: top };
- },
-
- _bind: function (type, el, bubble) {
- (el || this.scroller).addEventListener(type, this, !!bubble);
- },
-
- _unbind: function (type, el, bubble) {
- (el || this.scroller).removeEventListener(type, this, !!bubble);
- },
-
-
- /**
- *
- * Public methods
- *
- */
- destroy: function () {
- var that = this;
-
- that.scroller.style[vendor + 'Transform'] = '';
-
- // Remove the event listeners
- that._unbind(RESIZE_EV, window);
- that._unbind(START_EV);
- that._unbind(MOVE_EV);
- that._unbind(END_EV);
- that._unbind(CANCEL_EV);
- that._unbind('mouseout', that.wrapper);
- if (that.options.useTransition) that._unbind('webkitTransitionEnd');
-
- if (that.options.onDestroy) that.options.onDestroy.call(that);
- },
-
- refresh: function () {
- var that = this,
- offset;
-
- that.wrapperW = that.wrapper.clientWidth;
- that.wrapperH = that.wrapper.clientHeight;
-
- that.scrollerW = that.scroller.offsetWidth;
- that.scrollerH = that.scroller.offsetHeight;
- that.maxScrollX = that.wrapperW - that.scrollerW;
- that.maxScrollY = that.wrapperH - that.scrollerH;
- that.dirX = 0;
- that.dirY = 0;
-
- that.hScroll = that.options.hScroll && that.maxScrollX < 0;
- that.vScroll = that.options.vScroll && (!that.options.bounceLock && !that.hScroll || that.scrollerH > that.wrapperH);
-
- offset = that._offset(that.wrapper);
- that.wrapperOffsetLeft = -offset.left;
- that.wrapperOffsetTop = -offset.top;
-
-
- that.scroller.style[vendor + 'TransitionDuration'] = '0';
-
- that._resetPos(200);
- },
-
- scrollTo: function (x, y, time, relative) {
- var that = this,
- step = x,
- i, l;
-
- that.stop();
-
- if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }];
-
- for (i=0, l=step.length; i<l; i++) {
- if (step[i].relative) { step[i].x = that.x - step[i].x; step[i].y = that.y - step[i].y; }
- that.steps.push({ x: step[i].x, y: step[i].y, time: step[i].time || 0 });
- }
-
- that._startAni();
- },
-
- scrollToElement: function (el, time) {
- var that = this, pos;
- el = el.nodeType ? el : that.scroller.querySelector(el);
- if (!el) return;
-
- pos = that._offset(el);
- pos.left += that.wrapperOffsetLeft;
- pos.top += that.wrapperOffsetTop;
-
- pos.left = pos.left > 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left;
- pos.top = pos.top > 0 ? 0 : pos.top < that.maxScrollY ? that.maxScrollY : pos.top;
- time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time;
-
- that.scrollTo(pos.left, pos.top, time);
- },
-
- disable: function () {
- this.stop();
- this._resetPos(0);
- this.enabled = false;
-
- // If disabled after touchstart we make sure that there are no left over events
- this._unbind(MOVE_EV);
- this._unbind(END_EV);
- this._unbind(CANCEL_EV);
- },
-
- enable: function () {
- this.enabled = true;
- },
-
- stop: function () {
- cancelFrame(this.aniTime);
- this.steps = [];
- this.moved = false;
- this.animating = false;
- }
-};
-
-if (typeof exports !== 'undefined') exports.iScroll = iScroll;
-else window.iScroll = iScroll;
-
-})();
diff --git a/SDL_Core/src/components/HMI/lib/jquery-1.7.2.js b/SDL_Core/src/components/HMI/lib/jquery-1.7.2.js
deleted file mode 100644
index 0073dfc8c..000000000
--- a/SDL_Core/src/components/HMI/lib/jquery-1.7.2.js
+++ /dev/null
@@ -1,9404 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.7.2
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Wed Mar 21 12:46:34 2012 -0700
- */
-(function( window, undefined ) {
-
-// Use the correct document accordingly with window argument (sandbox)
-var document = window.document,
- navigator = window.navigator,
- location = window.location;
-var jQuery = (function() {
-
-// Define a local copy of jQuery
-var jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // A simple way to check for HTML strings or ID strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
-
- // Check if a string has a non-whitespace character in it
- rnotwhite = /\S/,
-
- // Used for trimming whitespace
- trimLeft = /^\s+/,
- trimRight = /\s+$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
-
- // Useragent RegExp
- rwebkit = /(webkit)[ \/]([\w.]+)/,
- ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
- rmsie = /(msie) ([\w.]+)/,
- rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
-
- // Matches dashed string for camelizing
- rdashAlpha = /-([a-z]|[0-9])/ig,
- rmsPrefix = /^-ms-/,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return ( letter + "" ).toUpperCase();
- },
-
- // Keep a UserAgent string for use with jQuery.browser
- userAgent = navigator.userAgent,
-
- // For matching the engine and version of the browser
- browserMatch,
-
- // The deferred used on DOM ready
- readyList,
-
- // The ready event handler
- DOMContentLoaded,
-
- // Save a reference to some core methods
- toString = Object.prototype.toString,
- hasOwn = Object.prototype.hasOwnProperty,
- push = Array.prototype.push,
- slice = Array.prototype.slice,
- trim = String.prototype.trim,
- indexOf = Array.prototype.indexOf,
-
- // [[Class]] -> type pairs
- class2type = {};
-
-jQuery.fn = jQuery.prototype = {
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem, ret, doc;
-
- // Handle $(""), $(null), or $(undefined)
- if ( !selector ) {
- return this;
- }
-
- // Handle $(DOMElement)
- if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
- }
-
- // The body element only exists once, optimize finding it
- if ( selector === "body" && !context && document.body ) {
- this.context = document;
- this[0] = document.body;
- this.selector = selector;
- this.length = 1;
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- // Are we dealing with HTML string or an ID?
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = quickExpr.exec( selector );
- }
-
- // Verify a match, and that no context was specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
- doc = ( context ? context.ownerDocument || context : document );
-
- // If a single string is passed in and it's a single tag
- // just do a createElement and skip the rest
- ret = rsingleTag.exec( selector );
-
- if ( ret ) {
- if ( jQuery.isPlainObject( context ) ) {
- selector = [ document.createElement( ret[1] ) ];
- jQuery.fn.attr.call( selector, context, true );
-
- } else {
- selector = [ doc.createElement( ret[1] ) ];
- }
-
- } else {
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
- selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
- }
-
- return jQuery.merge( this, selector );
-
- // HANDLE: $("#id")
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The current version of jQuery being used
- jquery: "1.7.2",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return slice.call( this, 0 );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems, name, selector ) {
- // Build a new jQuery matched element set
- var ret = this.constructor();
-
- if ( jQuery.isArray( elems ) ) {
- push.apply( ret, elems );
-
- } else {
- jQuery.merge( ret, elems );
- }
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
-
- ret.context = this.context;
-
- if ( name === "find" ) {
- ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
- } else if ( name ) {
- ret.selector = this.selector + "." + name + "(" + selector + ")";
- }
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Attach the listeners
- jQuery.bindReady();
-
- // Add the callback
- readyList.add( fn );
-
- return this;
- },
-
- eq: function( i ) {
- i = +i;
- return i === -1 ?
- this.slice( i ) :
- this.slice( i, i + 1 );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ),
- "slice", slice.call(arguments).join(",") );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
- // Either a released hold or an DOMready/load event and not yet ready
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.fireWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger( "ready" ).off( "ready" );
- }
- }
- },
-
- bindReady: function() {
- if ( readyList ) {
- return;
- }
-
- readyList = jQuery.Callbacks( "once memory" );
-
- // Catch cases where $(document).ready() is called after the
- // browser event has already occurred.
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Mozilla, Opera and webkit nightlies currently support this event
- if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else if ( document.attachEvent ) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var toplevel = false;
-
- try {
- toplevel = window.frameElement == null;
- } catch(e) {}
-
- if ( document.documentElement.doScroll && toplevel ) {
- doScrollCheck();
- }
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- return obj == null ?
- String( obj ) :
- class2type[ toString.call(obj) ] || "object";
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call(obj, "constructor") &&
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- for ( var name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- parseJSON: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
-
- }
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
- var xml, tmp;
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && rnotwhite.test( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
- },
-
- // args is for internal usage only
- each: function( object, callback, args ) {
- var name, i = 0,
- length = object.length,
- isObj = length === undefined || jQuery.isFunction( object );
-
- if ( args ) {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.apply( object[ name ], args ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.apply( object[ i++ ], args ) === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
- break;
- }
- }
- }
- }
-
- return object;
- },
-
- // Use native String.trim function wherever possible
- trim: trim ?
- function( text ) {
- return text == null ?
- "" :
- trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
- },
-
- // results is for internal usage only
- makeArray: function( array, results ) {
- var ret = results || [];
-
- if ( array != null ) {
- // The window, strings (and functions) also have 'length'
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
- var type = jQuery.type( array );
-
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
- push.call( ret, array );
- } else {
- jQuery.merge( ret, array );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, array, i ) {
- var len;
-
- if ( array ) {
- if ( indexOf ) {
- return indexOf.call( array, elem, i );
- }
-
- len = array.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in array && array[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var i = first.length,
- j = 0;
-
- if ( typeof second.length === "number" ) {
- for ( var l = second.length; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var ret = [], retVal;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value, key, ret = [],
- i = 0,
- length = elems.length,
- // jquery objects are treated as arrays
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( key in elems ) {
- value = callback( elems[ key ], key, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return ret.concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- if ( typeof context === "string" ) {
- var tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- var args = slice.call( arguments, 2 ),
- proxy = function() {
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Mutifunctional method to get and set values to a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
- var exec,
- bulk = key == null,
- i = 0,
- length = elems.length;
-
- // Sets many values
- if ( key && typeof key === "object" ) {
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
- }
- chainable = 1;
-
- // Sets one value
- } else if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = pass === undefined && jQuery.isFunction( value );
-
- if ( bulk ) {
- // Bulk operations only iterate when executing function values
- if ( exec ) {
- exec = fn;
- fn = function( elem, key, value ) {
- return exec.call( jQuery( elem ), value );
- };
-
- // Otherwise they run against the entire set
- } else {
- fn.call( elems, value );
- fn = null;
- }
- }
-
- if ( fn ) {
- for (; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
- }
-
- chainable = 1;
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // Use of jQuery.browser is frowned upon.
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
- uaMatch: function( ua ) {
- ua = ua.toLowerCase();
-
- var match = rwebkit.exec( ua ) ||
- ropera.exec( ua ) ||
- rmsie.exec( ua ) ||
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
- [];
-
- return { browser: match[1] || "", version: match[2] || "0" };
- },
-
- sub: function() {
- function jQuerySub( selector, context ) {
- return new jQuerySub.fn.init( selector, context );
- }
- jQuery.extend( true, jQuerySub, this );
- jQuerySub.superclass = this;
- jQuerySub.fn = jQuerySub.prototype = this();
- jQuerySub.fn.constructor = jQuerySub;
- jQuerySub.sub = this.sub;
- jQuerySub.fn.init = function init( selector, context ) {
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
- context = jQuerySub( context );
- }
-
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
- };
- jQuerySub.fn.init.prototype = jQuerySub.fn;
- var rootjQuerySub = jQuerySub(document);
- return jQuerySub;
- },
-
- browser: {}
-});
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-browserMatch = jQuery.uaMatch( userAgent );
-if ( browserMatch.browser ) {
- jQuery.browser[ browserMatch.browser ] = true;
- jQuery.browser.version = browserMatch.version;
-}
-
-// Deprecated, use jQuery.browser.webkit instead
-if ( jQuery.browser.webkit ) {
- jQuery.browser.safari = true;
-}
-
-// IE doesn't match non-breaking spaces with \s
-if ( rnotwhite.test( "\xA0" ) ) {
- trimLeft = /^[\s\xA0]+/;
- trimRight = /[\s\xA0]+$/;
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-
-// Cleanup functions for the document ready method
-if ( document.addEventListener ) {
- DOMContentLoaded = function() {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- };
-
-} else if ( document.attachEvent ) {
- DOMContentLoaded = function() {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( document.readyState === "complete" ) {
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-}
-
-// The DOM ready check for Internet Explorer
-function doScrollCheck() {
- if ( jQuery.isReady ) {
- return;
- }
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch(e) {
- setTimeout( doScrollCheck, 1 );
- return;
- }
-
- // and execute any waiting functions
- jQuery.ready();
-}
-
-return jQuery;
-
-})();
-
-
-// String to Object flags format cache
-var flagsCache = {};
-
-// Convert String-formatted flags into Object-formatted ones and store in cache
-function createFlags( flags ) {
- var object = flagsCache[ flags ] = {},
- i, length;
- flags = flags.split( /\s+/ );
- for ( i = 0, length = flags.length; i < length; i++ ) {
- object[ flags[i] ] = true;
- }
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * flags: an optional list of space-separated flags that will change how
- * the callback list behaves
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible flags:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( flags ) {
-
- // Convert flags from String-formatted to Object-formatted
- // (we check in cache first)
- flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
-
- var // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = [],
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Add one or several callbacks to the list
- add = function( args ) {
- var i,
- length,
- elem,
- type,
- actual;
- for ( i = 0, length = args.length; i < length; i++ ) {
- elem = args[ i ];
- type = jQuery.type( elem );
- if ( type === "array" ) {
- // Inspect recursively
- add( elem );
- } else if ( type === "function" ) {
- // Add if not in unique mode and callback is not in
- if ( !flags.unique || !self.has( elem ) ) {
- list.push( elem );
- }
- }
- }
- },
- // Fire callbacks
- fire = function( context, args ) {
- args = args || [];
- memory = !flags.memory || [ context, args ];
- fired = true;
- firing = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
- memory = true; // Mark as halted
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( !flags.once ) {
- if ( stack && stack.length ) {
- memory = stack.shift();
- self.fireWith( memory[ 0 ], memory[ 1 ] );
- }
- } else if ( memory === true ) {
- self.disable();
- } else {
- list = [];
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- var length = list.length;
- add( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away, unless previous
- // firing was halted (stopOnFalse)
- } else if ( memory && memory !== true ) {
- firingStart = length;
- fire( memory[ 0 ], memory[ 1 ] );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- var args = arguments,
- argIndex = 0,
- argLength = args.length;
- for ( ; argIndex < argLength ; argIndex++ ) {
- for ( var i = 0; i < list.length; i++ ) {
- if ( args[ argIndex ] === list[ i ] ) {
- // Handle firingIndex and firingLength
- if ( firing ) {
- if ( i <= firingLength ) {
- firingLength--;
- if ( i <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- // Remove the element
- list.splice( i--, 1 );
- // If we have some unicity property then
- // we only need to do this once
- if ( flags.unique ) {
- break;
- }
- }
- }
- }
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- if ( list ) {
- var i = 0,
- length = list.length;
- for ( ; i < length; i++ ) {
- if ( fn === list[ i ] ) {
- return true;
- }
- }
- }
- return false;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory || memory === true ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( stack ) {
- if ( firing ) {
- if ( !flags.once ) {
- stack.push( [ context, args ] );
- }
- } else if ( !( flags.once && memory ) ) {
- fire( context, args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-
-
-var // Static reference to slice
- sliceDeferred = [].slice;
-
-jQuery.extend({
-
- Deferred: function( func ) {
- var doneList = jQuery.Callbacks( "once memory" ),
- failList = jQuery.Callbacks( "once memory" ),
- progressList = jQuery.Callbacks( "memory" ),
- state = "pending",
- lists = {
- resolve: doneList,
- reject: failList,
- notify: progressList
- },
- promise = {
- done: doneList.add,
- fail: failList.add,
- progress: progressList.add,
-
- state: function() {
- return state;
- },
-
- // Deprecated
- isResolved: doneList.fired,
- isRejected: failList.fired,
-
- then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
- deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
- return this;
- },
- always: function() {
- deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
- return this;
- },
- pipe: function( fnDone, fnFail, fnProgress ) {
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( {
- done: [ fnDone, "resolve" ],
- fail: [ fnFail, "reject" ],
- progress: [ fnProgress, "notify" ]
- }, function( handler, data ) {
- var fn = data[ 0 ],
- action = data[ 1 ],
- returned;
- if ( jQuery.isFunction( fn ) ) {
- deferred[ handler ](function() {
- returned = fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
- }
- });
- } else {
- deferred[ handler ]( newDefer[ action ] );
- }
- });
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- if ( obj == null ) {
- obj = promise;
- } else {
- for ( var key in promise ) {
- obj[ key ] = promise[ key ];
- }
- }
- return obj;
- }
- },
- deferred = promise.promise({}),
- key;
-
- for ( key in lists ) {
- deferred[ key ] = lists[ key ].fire;
- deferred[ key + "With" ] = lists[ key ].fireWith;
- }
-
- // Handle state
- deferred.done( function() {
- state = "resolved";
- }, failList.disable, progressList.lock ).fail( function() {
- state = "rejected";
- }, doneList.disable, progressList.lock );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( firstParam ) {
- var args = sliceDeferred.call( arguments, 0 ),
- i = 0,
- length = args.length,
- pValues = new Array( length ),
- count = length,
- pCount = length,
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
- firstParam :
- jQuery.Deferred(),
- promise = deferred.promise();
- function resolveFunc( i ) {
- return function( value ) {
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- if ( !( --count ) ) {
- deferred.resolveWith( deferred, args );
- }
- };
- }
- function progressFunc( i ) {
- return function( value ) {
- pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- deferred.notifyWith( promise, pValues );
- };
- }
- if ( length > 1 ) {
- for ( ; i < length; i++ ) {
- if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
- args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
- } else {
- --count;
- }
- }
- if ( !count ) {
- deferred.resolveWith( deferred, args );
- }
- } else if ( deferred !== firstParam ) {
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
- }
- return promise;
- }
-});
-
-
-
-
-jQuery.support = (function() {
-
- var support,
- all,
- a,
- select,
- opt,
- input,
- fragment,
- tds,
- events,
- eventName,
- i,
- isSupported,
- div = document.createElement( "div" ),
- documentElement = document.documentElement;
-
- // Preliminary tests
- div.setAttribute("className", "t");
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-
- all = div.getElementsByTagName( "*" );
- a = div.getElementsByTagName( "a" )[ 0 ];
-
- // Can't get basic test support
- if ( !all || !all.length || !a ) {
- return {};
- }
-
- // First batch of supports tests
- select = document.createElement( "select" );
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName( "input" )[ 0 ];
-
- support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: ( a.getAttribute("href") === "/a" ),
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.55/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Make sure that if no value is specified for a checkbox
- // that it defaults to "on".
- // (WebKit defaults to "" instead)
- checkOn: ( input.value === "on" ),
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // Tests for enctype support on a form(#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // Will be defined later
- submitBubbles: true,
- changeBubbles: true,
- focusinBubbles: false,
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- pixelMargin: true
- };
-
- // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
- jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Test to see if it's possible to delete an expando from an element
- // Fails in Internet Explorer
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
- div.attachEvent( "onclick", function() {
- // Cloning a node shouldn't copy over any
- // bound event handlers (IE does this)
- support.noCloneEvent = false;
- });
- div.cloneNode( true ).fireEvent( "onclick" );
- }
-
- // Check if a radio maintains its value
- // after being appended to the DOM
- input = document.createElement("input");
- input.value = "t";
- input.setAttribute("type", "radio");
- support.radioValue = input.value === "t";
-
- input.setAttribute("checked", "checked");
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
- fragment = document.createDocumentFragment();
- fragment.appendChild( div.lastChild );
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- fragment.removeChild( input );
- fragment.appendChild( div );
-
- // Technique from Juriy Zaytsev
- // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
- // We only care about the case where non-standard event systems
- // are used, namely in IE. Short-circuiting here helps us to
- // avoid an eval call (in setAttribute) which can cause CSP
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
- if ( div.attachEvent ) {
- for ( i in {
- submit: 1,
- change: 1,
- focusin: 1
- }) {
- eventName = "on" + i;
- isSupported = ( eventName in div );
- if ( !isSupported ) {
- div.setAttribute( eventName, "return;" );
- isSupported = ( typeof div[ eventName ] === "function" );
- }
- support[ i + "Bubbles" ] = isSupported;
- }
- }
-
- fragment.removeChild( div );
-
- // Null elements to avoid leaks in IE
- fragment = select = opt = div = input = null;
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, outer, inner, table, td, offsetSupport,
- marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
- paddingMarginBorderVisibility, paddingMarginBorder,
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- conMarginTop = 1;
- paddingMarginBorder = "padding:0;margin:0;border:";
- positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
- paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
- style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
- html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
- "<table " + style + "' cellpadding='0' cellspacing='0'>" +
- "<tr><td></td></tr></table>";
-
- container = document.createElement("div");
- container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
- body.insertBefore( container, body.firstChild );
-
- // Construct the test element
- div = document.createElement("div");
- container.appendChild( div );
-
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- // (only IE 8 fails this test)
- div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName( "td" );
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Check if empty table cells still have offsetWidth/Height
- // (IE <= 8 fail this test)
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. For more
- // info see bug #3333
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- if ( window.getComputedStyle ) {
- div.innerHTML = "";
- marginDiv = document.createElement( "div" );
- marginDiv.style.width = "0";
- marginDiv.style.marginRight = "0";
- div.style.width = "2px";
- div.appendChild( marginDiv );
- support.reliableMarginRight =
- ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- // (IE < 8 does this)
- div.innerHTML = "";
- div.style.width = div.style.padding = "1px";
- div.style.border = 0;
- div.style.overflow = "hidden";
- div.style.display = "inline";
- div.style.zoom = 1;
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Check if elements with layout shrink-wrap their children
- // (IE 6 does this)
- div.style.display = "block";
- div.style.overflow = "visible";
- div.innerHTML = "<div style='width:5px;'></div>";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
- }
-
- div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
- div.innerHTML = html;
-
- outer = div.firstChild;
- inner = outer.firstChild;
- td = outer.nextSibling.firstChild.firstChild;
-
- offsetSupport = {
- doesNotAddBorder: ( inner.offsetTop !== 5 ),
- doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
- };
-
- inner.style.position = "fixed";
- inner.style.top = "20px";
-
- // safari subtracts parent border width here which is 5px
- offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
- inner.style.position = inner.style.top = "";
-
- outer.style.overflow = "hidden";
- outer.style.position = "relative";
-
- offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
- offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
-
- if ( window.getComputedStyle ) {
- div.style.marginTop = "1%";
- support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
- }
-
- if ( typeof container.style.zoom !== "undefined" ) {
- container.style.zoom = 1;
- }
-
- body.removeChild( container );
- marginDiv = div = container = null;
-
- jQuery.extend( support, offsetSupport );
- });
-
- return support;
-})();
-
-
-
-
-var rbrace = /^(?:\{.*\}|\[.*\])$/,
- rmultiDash = /([A-Z])/g;
-
-jQuery.extend({
- cache: {},
-
- // Please use with caution
- uuid: 0,
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var privateCache, thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
- isEvents = name === "events";
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = ++jQuery.uuid;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- privateCache = thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Users should not attempt to inspect the internal events object using jQuery.data,
- // it is undocumented and subject to change. But does anyone listen? No.
- if ( isEvents && !thisCache[ name ] ) {
- return privateCache.events;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
- },
-
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- // Reference to internal data cache key
- internalKey = jQuery.expando,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
-
- // See jQuery.data for more information
- id = isNode ? elem[ internalKey ] : internalKey;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split( " " );
- }
- }
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject(cache[ id ]) ) {
- return;
- }
- }
-
- // Browsers that fail expando deletion also refuse to delete expandos on
- // the window, but it will allow it on all other JS objects; other browsers
- // don't care
- // Ensure that `cache` is not a window object #10080
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
- delete cache[ id ];
- } else {
- cache[ id ] = null;
- }
-
- // We destroyed the cache and need to eliminate the expando on the node to avoid
- // false lookups in the cache for entries that no longer exist
- if ( isNode ) {
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( jQuery.support.deleteExpando ) {
- delete elem[ internalKey ];
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( internalKey );
- } else {
- elem[ internalKey ] = null;
- }
- }
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return jQuery.data( elem, name, data, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- if ( elem.nodeName ) {
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- if ( match ) {
- return !(match === true || elem.getAttribute("classid") !== match);
- }
- }
-
- return true;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var parts, part, attr, name, l,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attr = elem.attributes;
- for ( l = attr.length; i < l; i++ ) {
- name = attr[i].name;
-
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- parts = key.split( ".", 2 );
- parts[1] = parts[1] ? "." + parts[1] : "";
- part = parts[1] + "!";
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- data = this.triggerHandler( "getData" + part, [ parts[0] ] );
-
- // Try to fetch any internally stored data first
- if ( data === undefined && elem ) {
- data = jQuery.data( elem, key );
- data = dataAttr( elem, key, data );
- }
-
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
- }
-
- parts[1] = value;
- this.each(function() {
- var self = jQuery( this );
-
- self.triggerHandler( "setData" + part, parts );
- jQuery.data( this, key, value );
- self.triggerHandler( "changeData" + part, parts );
- });
- }, null, value, arguments.length > 1, null, false );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- jQuery.isNumeric( data ) ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- for ( var name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-
-
-
-
-function handleQueueMarkDefer( elem, type, src ) {
- var deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- defer = jQuery._data( elem, deferDataKey );
- if ( defer &&
- ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
- ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
- // Give room for hard-coded callbacks to fire first
- // and eventually mark/queue something else on the element
- setTimeout( function() {
- if ( !jQuery._data( elem, queueDataKey ) &&
- !jQuery._data( elem, markDataKey ) ) {
- jQuery.removeData( elem, deferDataKey, true );
- defer.fire();
- }
- }, 0 );
- }
-}
-
-jQuery.extend({
-
- _mark: function( elem, type ) {
- if ( elem ) {
- type = ( type || "fx" ) + "mark";
- jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
- }
- },
-
- _unmark: function( force, elem, type ) {
- if ( force !== true ) {
- type = elem;
- elem = force;
- force = false;
- }
- if ( elem ) {
- type = type || "fx";
- var key = type + "mark",
- count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
- if ( count ) {
- jQuery._data( elem, key, count );
- } else {
- jQuery.removeData( elem, key, true );
- handleQueueMarkDefer( elem, type, "mark" );
- }
- }
- },
-
- queue: function( elem, type, data ) {
- var q;
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- q = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !q || jQuery.isArray(data) ) {
- q = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- q.push( data );
- }
- }
- return q || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- fn = queue.shift(),
- hooks = {};
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- }
-
- if ( fn ) {
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- jQuery._data( elem, type + ".run", hooks );
- fn.call( elem, function() {
- jQuery.dequeue( elem, type );
- }, hooks );
- }
-
- if ( !queue.length ) {
- jQuery.removeData( elem, type + "queue " + type + ".run", true );
- handleQueueMarkDefer( elem, type, "queue" );
- }
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, object ) {
- if ( typeof type !== "string" ) {
- object = type;
- type = undefined;
- }
- type = type || "fx";
- var defer = jQuery.Deferred(),
- elements = this,
- i = elements.length,
- count = 1,
- deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- tmp;
- function resolve() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- }
- while( i-- ) {
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
- jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
- count++;
- tmp.add( resolve );
- }
- }
- resolve();
- return defer.promise( object );
- }
-});
-
-
-
-
-var rclass = /[\n\t\r]/g,
- rspace = /\s+/,
- rreturn = /\r/g,
- rtype = /^(?:button|input)$/i,
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
- rclickable = /^a(?:rea)?$/i,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- nodeHook, boolHook, fixSpecified;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classNames, i, l, elem,
- setClass, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call(this, j, this.className) );
- });
- }
-
- if ( value && typeof value === "string" ) {
- classNames = value.split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 ) {
- if ( !elem.className && classNames.length === 1 ) {
- elem.className = value;
-
- } else {
- setClass = " " + elem.className + " ";
-
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
- setClass += classNames[ c ] + " ";
- }
- }
- elem.className = jQuery.trim( setClass );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classNames, i, l, elem, className, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call(this, j, this.className) );
- });
- }
-
- if ( (value && typeof value === "string") || value === undefined ) {
- classNames = ( value || "" ).split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 && elem.className ) {
- if ( value ) {
- className = (" " + elem.className + " ").replace( rclass, " " );
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- className = className.replace(" " + classNames[ c ] + " ", " ");
- }
- elem.className = jQuery.trim( className );
-
- } else {
- elem.className = "";
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.split( rspace );
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space seperated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // toggle whole className
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var self = jQuery(this), val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, i, max, option,
- index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type === "select-one";
-
- // Nothing was selected
- if ( index < 0 ) {
- return null;
- }
-
- // Loop through all the selected options
- i = one ? index : 0;
- max = one ? index + 1 : options.length;
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
- if ( one && !values.length && options.length ) {
- return jQuery( options[ index ] ).val();
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attrFn: {
- val: true,
- css: true,
- html: true,
- text: true,
- data: true,
- width: true,
- height: true,
- offset: true
- },
-
- attr: function( elem, name, value, pass ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( pass && name in jQuery.attrFn ) {
- return jQuery( elem )[ name ]( value );
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
-
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, "" + value );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- ret = elem.getAttribute( name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret === null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var propName, attrNames, name, l, isBool,
- i = 0;
-
- if ( value && elem.nodeType === 1 ) {
- attrNames = value.toLowerCase().split( rspace );
- l = attrNames.length;
-
- for ( ; i < l; i++ ) {
- name = attrNames[ i ];
-
- if ( name ) {
- propName = jQuery.propFix[ name ] || name;
- isBool = rboolean.test( name );
-
- // See #9699 for explanation of this approach (setting first, then removal)
- // Do not do this for boolean attributes (see #10870)
- if ( !isBool ) {
- jQuery.attr( elem, name, "" );
- }
- elem.removeAttribute( getSetAttribute ? name : propName );
-
- // Set corresponding property to false for boolean attributes
- if ( isBool && propName in elem ) {
- elem[ propName ] = false;
- }
- }
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to it's default in case type is set after value
- // This is for element creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- },
- // Use the value property for back compat
- // Use the nodeHook for button elements in IE6/7 (#1954)
- value: {
- get: function( elem, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.get( elem, name );
- }
- return name in elem ?
- elem.value :
- null;
- },
- set: function( elem, value, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.set( elem, value, name );
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
-jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- // Align boolean attributes with corresponding properties
- // Fall back to attribute presence where some booleans are not supported
- var attrNode,
- property = jQuery.prop( elem, name );
- return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- var propName;
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- // value is true since we know at this point it's type boolean and not false
- // Set boolean attributes to the same name and set the DOM property
- propName = jQuery.propFix[ name ] || name;
- if ( propName in elem ) {
- // Only set the IDL specifically if it already exists on the element
- elem[ propName ] = true;
- }
-
- elem.setAttribute( name, name.toLowerCase() );
- }
- return name;
- }
-};
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- fixSpecified = {
- name: true,
- id: true,
- coords: true
- };
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret;
- ret = elem.getAttributeNode( name );
- return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
- ret.nodeValue :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- ret = document.createAttribute( name );
- elem.setAttributeNode( ret );
- }
- return ( ret.nodeValue = value + "" );
- }
- };
-
- // Apply the nodeHook to tabindex
- jQuery.attrHooks.tabindex.set = nodeHook.set;
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- if ( value === "" ) {
- value = "false";
- }
- nodeHook.set( elem, value, name );
- }
- };
-}
-
-
-// Some attributes require a special call on IE
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret === null ? undefined : ret;
- }
- });
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Normalize to lowercase since IE uppercases css property names
- return elem.style.cssText.toLowerCase() || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = "" + value );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-
-
-
-
-var rformElems = /^(?:textarea|input|select)$/i,
- rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
- rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
- quickParse = function( selector ) {
- var quick = rquickIs.exec( selector );
- if ( quick ) {
- // 0 1 2 3
- // [ _, tag, id, class ]
- quick[1] = ( quick[1] || "" ).toLowerCase();
- quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
- }
- return quick;
- },
- quickIs = function( elem, m ) {
- var attrs = elem.attributes || {};
- return (
- (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
- (!m[2] || (attrs.id || {}).value === m[2]) &&
- (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
- );
- },
- hoverHack = function( events ) {
- return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
- };
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- add: function( elem, types, handler, data, selector ) {
-
- var elemData, eventHandle, events,
- t, tns, type, namespaces, handleObj,
- handleObjIn, quick, handlers, special;
-
- // Don't attach events to noData or text/comment nodes (allow plain objects tho)
- if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- events = elemData.events;
- if ( !events ) {
- elemData.events = events = {};
- }
- eventHandle = elemData.handle;
- if ( !eventHandle ) {
- elemData.handle = eventHandle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = jQuery.trim( hoverHack(types) ).split( " " );
- for ( t = 0; t < types.length; t++ ) {
-
- tns = rtypenamespace.exec( types[t] ) || [];
- type = tns[1];
- namespaces = ( tns[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: tns[1],
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- quick: selector && quickParse( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- handlers = events[ type ];
- if ( !handlers ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- global: {},
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
- t, tns, type, origType, namespaces, origCount,
- j, events, special, handle, eventType, handleObj;
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
- for ( t = 0; t < types.length; t++ ) {
- tns = rtypenamespace.exec( types[t] ) || [];
- type = origType = tns[1];
- namespaces = tns[2];
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector? special.delegateType : special.bindType ) || type;
- eventType = events[ type ] || [];
- origCount = eventType.length;
- namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
-
- // Remove matching events
- for ( j = 0; j < eventType.length; j++ ) {
- handleObj = eventType[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- eventType.splice( j--, 1 );
-
- if ( handleObj.selector ) {
- eventType.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( eventType.length === 0 && origCount !== eventType.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- handle = elemData.handle;
- if ( handle ) {
- handle.elem = null;
- }
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery.removeData( elem, [ "events", "handle" ], true );
- }
- },
-
- // Events that are safe to short-circuit if no handlers are attached.
- // Native DOM events should not be added, they may have inline handlers.
- customEvent: {
- "getData": true,
- "setData": true,
- "changeData": true
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- // Don't do events on text and comment nodes
- if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
- return;
- }
-
- // Event object or event type
- var type = event.type || event,
- namespaces = [],
- cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "!" ) >= 0 ) {
- // Exclusive events trigger only for the exact event (no namespaces)
- type = type.slice(0, -1);
- exclusive = true;
- }
-
- if ( type.indexOf( "." ) >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
-
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
- // No jQuery handlers for this event type, and it can't have inline handlers
- return;
- }
-
- // Caller can pass in an Event, Object, or just an event type string
- event = typeof event === "object" ?
- // jQuery.Event object
- event[ jQuery.expando ] ? event :
- // Object literal
- new jQuery.Event( type, event ) :
- // Just the event type (string)
- new jQuery.Event( type );
-
- event.type = type;
- event.isTrigger = true;
- event.exclusive = exclusive;
- event.namespace = namespaces.join( "." );
- event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
- ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
-
- // Handle a global trigger
- if ( !elem ) {
-
- // TODO: Stop taunting the data cache; remove global events and always attach to document
- cache = jQuery.cache;
- for ( i in cache ) {
- if ( cache[ i ].events && cache[ i ].events[ type ] ) {
- jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
- }
- }
- return;
- }
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data != null ? jQuery.makeArray( data ) : [];
- data.unshift( event );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- eventPath = [[ elem, special.bindType || type ]];
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
- old = null;
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push([ cur, bubbleType ]);
- old = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( old && old === elem.ownerDocument ) {
- eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
- }
- }
-
- // Fire handlers on the event path
- for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
-
- cur = eventPath[i][0];
- event.type = eventPath[i][1];
-
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
- // Note that this is a bare JS function and not a jQuery handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- // IE<9 dies on focus/blur to hidden element (#1486)
- if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- old = elem[ ontype ];
-
- if ( old ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( old ) {
- elem[ ontype ] = old;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event || window.event );
-
- var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
- delegateCount = handlers.delegateCount,
- args = [].slice.call( arguments, 0 ),
- run_all = !event.exclusive && !event.namespace,
- special = jQuery.event.special[ event.type ] || {},
- handlerQueue = [],
- i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers that should run if there are delegated events
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && !(event.button && event.type === "click") ) {
-
- // Pregenerate a single jQuery object for reuse with .is()
- jqcur = jQuery(this);
- jqcur.context = this.ownerDocument || this;
-
- for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
-
- // Don't process events on disabled elements (#6911, #8165)
- if ( cur.disabled !== true ) {
- selMatch = {};
- matches = [];
- jqcur[0] = cur;
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
- sel = handleObj.selector;
-
- if ( selMatch[ sel ] === undefined ) {
- selMatch[ sel ] = (
- handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
- );
- }
- if ( selMatch[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, matches: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( handlers.length > delegateCount ) {
- handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
- }
-
- // Run delegates first; they may want to stop propagation beneath us
- for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
- matched = handlerQueue[ i ];
- event.currentTarget = matched.elem;
-
- for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
- handleObj = matched.matches[ j ];
-
- // Triggered event must either 1) be non-exclusive and have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
-
- event.data = handleObj.data;
- event.handleObj = handleObj;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- event.result = ret;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
- props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = jQuery.Event( originalEvent );
-
- for ( i = copy.length; i; ) {
- prop = copy[ --i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Target should not be a text node (#504, Safari)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
- if ( event.metaKey === undefined ) {
- event.metaKey = event.ctrlKey;
- }
-
- return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- ready: {
- // Make sure the ready event is setup
- setup: jQuery.bindReady
- },
-
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
-
- focus: {
- delegateType: "focusin"
- },
- blur: {
- delegateType: "focusout"
- },
-
- beforeunload: {
- setup: function( data, namespaces, eventHandle ) {
- // We only want to do this special case on windows
- if ( jQuery.isWindow( this ) ) {
- this.onbeforeunload = eventHandle;
- }
- },
-
- teardown: function( namespaces, eventHandle ) {
- if ( this.onbeforeunload === eventHandle ) {
- this.onbeforeunload = null;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-// Some plugins are using, but it's undocumented/deprecated and will be removed.
-// The 1.7 special event interface should provide all the hooks needed now.
-jQuery.event.handle = jQuery.event.dispatch;
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- if ( elem.detachEvent ) {
- elem.detachEvent( "on" + type, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-function returnFalse() {
- return false;
-}
-function returnTrue() {
- return true;
-}
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
-
- // if preventDefault exists run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // otherwise set the returnValue property of the original event to false (IE)
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- this.isPropagationStopped = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
- // if stopPropagation exists run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
- // otherwise set the cancelBubble property of the original event to true (IE)
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- },
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj,
- selector = handleObj.selector,
- ret;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !form._submit_attached ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- form._submit_attached = true;
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- jQuery.event.simulate( "change", this, event, true );
- }
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- elem._change_attached = true;
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) { // && selector != null
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- var handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( var type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- live: function( types, data, fn ) {
- jQuery( this.context ).on( types, this.selector, data, fn );
- return this;
- },
- die: function( types, fn ) {
- jQuery( this.context ).off( types, this.selector || "**", fn );
- return this;
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- if ( this[0] ) {
- return jQuery.event.trigger( type, data, this[0], true );
- }
- },
-
- toggle: function( fn ) {
- // Save reference to arguments for access in closure
- var args = arguments,
- guid = fn.guid || jQuery.guid++,
- i = 0,
- toggler = function( event ) {
- // Figure out which function to execute
- var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
- jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
- // Make sure that clicks stop
- event.preventDefault();
-
- // and execute the function
- return args[ lastToggle ].apply( this, arguments ) || false;
- };
-
- // link all the functions, so any of them can unbind this click handler
- toggler.guid = guid;
- while ( i < args.length ) {
- args[ i++ ].guid = guid;
- }
-
- return this.click( toggler );
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- if ( fn == null ) {
- fn = data;
- data = null;
- }
-
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( jQuery.attrFn ) {
- jQuery.attrFn[ name ] = true;
- }
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-
-
-
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- * More information: http://sizzlejs.com/
- */
-(function(){
-
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
- expando = "sizcache" + (Math.random() + '').replace('.', ''),
- done = 0,
- toString = Object.prototype.toString,
- hasDuplicate = false,
- baseHasDuplicate = true,
- rBackslash = /\\/g,
- rReturn = /\r\n/g,
- rNonWord = /\W/;
-
-// Here we check if the JavaScript engine is using some sort of
-// optimization where it does not always call our comparision
-// function. If that is the case, discard the hasDuplicate value.
-// Thus far that includes Google Chrome.
-[0, 0].sort(function() {
- baseHasDuplicate = false;
- return 0;
-});
-
-var Sizzle = function( selector, context, results, seed ) {
- results = results || [];
- context = context || document;
-
- var origContext = context;
-
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
- return [];
- }
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- var m, set, checkSet, extra, ret, cur, pop, i,
- prune = true,
- contextXML = Sizzle.isXML( context ),
- parts = [],
- soFar = selector;
-
- // Reset the position of the chunker regexp (start from head)
- do {
- chunker.exec( "" );
- m = chunker.exec( soFar );
-
- if ( m ) {
- soFar = m[3];
-
- parts.push( m[1] );
-
- if ( m[2] ) {
- extra = m[3];
- break;
- }
- }
- } while ( m );
-
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
-
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
- set = posProcess( parts[0] + parts[1], context, seed );
-
- } else {
- set = Expr.relative[ parts[0] ] ?
- [ context ] :
- Sizzle( parts.shift(), context );
-
- while ( parts.length ) {
- selector = parts.shift();
-
- if ( Expr.relative[ selector ] ) {
- selector += parts.shift();
- }
-
- set = posProcess( selector, set, seed );
- }
- }
-
- } else {
- // Take a shortcut and set the context if the root selector is an ID
- // (but not if it'll be faster if the inner selector is an ID)
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
-
- ret = Sizzle.find( parts.shift(), context, contextXML );
- context = ret.expr ?
- Sizzle.filter( ret.expr, ret.set )[0] :
- ret.set[0];
- }
-
- if ( context ) {
- ret = seed ?
- { expr: parts.pop(), set: makeArray(seed) } :
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
-
- set = ret.expr ?
- Sizzle.filter( ret.expr, ret.set ) :
- ret.set;
-
- if ( parts.length > 0 ) {
- checkSet = makeArray( set );
-
- } else {
- prune = false;
- }
-
- while ( parts.length ) {
- cur = parts.pop();
- pop = cur;
-
- if ( !Expr.relative[ cur ] ) {
- cur = "";
- } else {
- pop = parts.pop();
- }
-
- if ( pop == null ) {
- pop = context;
- }
-
- Expr.relative[ cur ]( checkSet, pop, contextXML );
- }
-
- } else {
- checkSet = parts = [];
- }
- }
-
- if ( !checkSet ) {
- checkSet = set;
- }
-
- if ( !checkSet ) {
- Sizzle.error( cur || selector );
- }
-
- if ( toString.call(checkSet) === "[object Array]" ) {
- if ( !prune ) {
- results.push.apply( results, checkSet );
-
- } else if ( context && context.nodeType === 1 ) {
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
- results.push( set[i] );
- }
- }
-
- } else {
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
- results.push( set[i] );
- }
- }
- }
-
- } else {
- makeArray( checkSet, results );
- }
-
- if ( extra ) {
- Sizzle( extra, origContext, results, seed );
- Sizzle.uniqueSort( results );
- }
-
- return results;
-};
-
-Sizzle.uniqueSort = function( results ) {
- if ( sortOrder ) {
- hasDuplicate = baseHasDuplicate;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[ i - 1 ] ) {
- results.splice( i--, 1 );
- }
- }
- }
- }
-
- return results;
-};
-
-Sizzle.matches = function( expr, set ) {
- return Sizzle( expr, null, null, set );
-};
-
-Sizzle.matchesSelector = function( node, expr ) {
- return Sizzle( expr, null, null, [node] ).length > 0;
-};
-
-Sizzle.find = function( expr, context, isXML ) {
- var set, i, len, match, type, left;
-
- if ( !expr ) {
- return [];
- }
-
- for ( i = 0, len = Expr.order.length; i < len; i++ ) {
- type = Expr.order[i];
-
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
- left = match[1];
- match.splice( 1, 1 );
-
- if ( left.substr( left.length - 1 ) !== "\\" ) {
- match[1] = (match[1] || "").replace( rBackslash, "" );
- set = Expr.find[ type ]( match, context, isXML );
-
- if ( set != null ) {
- expr = expr.replace( Expr.match[ type ], "" );
- break;
- }
- }
- }
- }
-
- if ( !set ) {
- set = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( "*" ) :
- [];
- }
-
- return { set: set, expr: expr };
-};
-
-Sizzle.filter = function( expr, set, inplace, not ) {
- var match, anyFound,
- type, found, item, filter, left,
- i, pass,
- old = expr,
- result = [],
- curLoop = set,
- isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
-
- while ( expr && set.length ) {
- for ( type in Expr.filter ) {
- if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
- filter = Expr.filter[ type ];
- left = match[1];
-
- anyFound = false;
-
- match.splice(1,1);
-
- if ( left.substr( left.length - 1 ) === "\\" ) {
- continue;
- }
-
- if ( curLoop === result ) {
- result = [];
- }
-
- if ( Expr.preFilter[ type ] ) {
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
-
- if ( !match ) {
- anyFound = found = true;
-
- } else if ( match === true ) {
- continue;
- }
- }
-
- if ( match ) {
- for ( i = 0; (item = curLoop[i]) != null; i++ ) {
- if ( item ) {
- found = filter( item, match, i, curLoop );
- pass = not ^ found;
-
- if ( inplace && found != null ) {
- if ( pass ) {
- anyFound = true;
-
- } else {
- curLoop[i] = false;
- }
-
- } else if ( pass ) {
- result.push( item );
- anyFound = true;
- }
- }
- }
- }
-
- if ( found !== undefined ) {
- if ( !inplace ) {
- curLoop = result;
- }
-
- expr = expr.replace( Expr.match[ type ], "" );
-
- if ( !anyFound ) {
- return [];
- }
-
- break;
- }
- }
- }
-
- // Improper expression
- if ( expr === old ) {
- if ( anyFound == null ) {
- Sizzle.error( expr );
-
- } else {
- break;
- }
- }
-
- old = expr;
- }
-
- return curLoop;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Utility function for retreiving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-var getText = Sizzle.getText = function( elem ) {
- var i, node,
- nodeType = elem.nodeType,
- ret = "";
-
- if ( nodeType ) {
- if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent || innerText for elements
- if ( typeof elem.textContent === 'string' ) {
- return elem.textContent;
- } else if ( typeof elem.innerText === 'string' ) {
- // Replace IE's carriage returns
- return elem.innerText.replace( rReturn, '' );
- } else {
- // Traverse it's children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- } else {
-
- // If no nodeType, this is expected to be an array
- for ( i = 0; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- if ( node.nodeType !== 8 ) {
- ret += getText( node );
- }
- }
- }
- return ret;
-};
-
-var Expr = Sizzle.selectors = {
- order: [ "ID", "NAME", "TAG" ],
-
- match: {
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
- },
-
- leftMatch: {},
-
- attrMap: {
- "class": "className",
- "for": "htmlFor"
- },
-
- attrHandle: {
- href: function( elem ) {
- return elem.getAttribute( "href" );
- },
- type: function( elem ) {
- return elem.getAttribute( "type" );
- }
- },
-
- relative: {
- "+": function(checkSet, part){
- var isPartStr = typeof part === "string",
- isTag = isPartStr && !rNonWord.test( part ),
- isPartStrNotTag = isPartStr && !isTag;
-
- if ( isTag ) {
- part = part.toLowerCase();
- }
-
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
- if ( (elem = checkSet[i]) ) {
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
-
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
- elem || false :
- elem === part;
- }
- }
-
- if ( isPartStrNotTag ) {
- Sizzle.filter( part, checkSet, true );
- }
- },
-
- ">": function( checkSet, part ) {
- var elem,
- isPartStr = typeof part === "string",
- i = 0,
- l = checkSet.length;
-
- if ( isPartStr && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
-
- for ( ; i < l; i++ ) {
- elem = checkSet[i];
-
- if ( elem ) {
- var parent = elem.parentNode;
- checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
- }
- }
-
- } else {
- for ( ; i < l; i++ ) {
- elem = checkSet[i];
-
- if ( elem ) {
- checkSet[i] = isPartStr ?
- elem.parentNode :
- elem.parentNode === part;
- }
- }
-
- if ( isPartStr ) {
- Sizzle.filter( part, checkSet, true );
- }
- }
- },
-
- "": function(checkSet, part, isXML){
- var nodeCheck,
- doneName = done++,
- checkFn = dirCheck;
-
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
- nodeCheck = part;
- checkFn = dirNodeCheck;
- }
-
- checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
- },
-
- "~": function( checkSet, part, isXML ) {
- var nodeCheck,
- doneName = done++,
- checkFn = dirCheck;
-
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
- nodeCheck = part;
- checkFn = dirNodeCheck;
- }
-
- checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
- }
- },
-
- find: {
- ID: function( match, context, isXML ) {
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- },
-
- NAME: function( match, context ) {
- if ( typeof context.getElementsByName !== "undefined" ) {
- var ret = [],
- results = context.getElementsByName( match[1] );
-
- for ( var i = 0, l = results.length; i < l; i++ ) {
- if ( results[i].getAttribute("name") === match[1] ) {
- ret.push( results[i] );
- }
- }
-
- return ret.length === 0 ? null : ret;
- }
- },
-
- TAG: function( match, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( match[1] );
- }
- }
- },
- preFilter: {
- CLASS: function( match, curLoop, inplace, result, not, isXML ) {
- match = " " + match[1].replace( rBackslash, "" ) + " ";
-
- if ( isXML ) {
- return match;
- }
-
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
- if ( elem ) {
- if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
- if ( !inplace ) {
- result.push( elem );
- }
-
- } else if ( inplace ) {
- curLoop[i] = false;
- }
- }
- }
-
- return false;
- },
-
- ID: function( match ) {
- return match[1].replace( rBackslash, "" );
- },
-
- TAG: function( match, curLoop ) {
- return match[1].replace( rBackslash, "" ).toLowerCase();
- },
-
- CHILD: function( match ) {
- if ( match[1] === "nth" ) {
- if ( !match[2] ) {
- Sizzle.error( match[0] );
- }
-
- match[2] = match[2].replace(/^\+|\s*/g, '');
-
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
- var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
- match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
-
- // calculate the numbers (first)n+(last) including if they are negative
- match[2] = (test[1] + (test[2] || 1)) - 0;
- match[3] = test[3] - 0;
- }
- else if ( match[2] ) {
- Sizzle.error( match[0] );
- }
-
- // TODO: Move to normal caching system
- match[0] = done++;
-
- return match;
- },
-
- ATTR: function( match, curLoop, inplace, result, not, isXML ) {
- var name = match[1] = match[1].replace( rBackslash, "" );
-
- if ( !isXML && Expr.attrMap[name] ) {
- match[1] = Expr.attrMap[name];
- }
-
- // Handle if an un-quoted value was used
- match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
-
- if ( match[2] === "~=" ) {
- match[4] = " " + match[4] + " ";
- }
-
- return match;
- },
-
- PSEUDO: function( match, curLoop, inplace, result, not ) {
- if ( match[1] === "not" ) {
- // If we're dealing with a complex expression, or a simple one
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
- match[3] = Sizzle(match[3], null, null, curLoop);
-
- } else {
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
-
- if ( !inplace ) {
- result.push.apply( result, ret );
- }
-
- return false;
- }
-
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
- return true;
- }
-
- return match;
- },
-
- POS: function( match ) {
- match.unshift( true );
-
- return match;
- }
- },
-
- filters: {
- enabled: function( elem ) {
- return elem.disabled === false && elem.type !== "hidden";
- },
-
- disabled: function( elem ) {
- return elem.disabled === true;
- },
-
- checked: function( elem ) {
- return elem.checked === true;
- },
-
- selected: function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- parent: function( elem ) {
- return !!elem.firstChild;
- },
-
- empty: function( elem ) {
- return !elem.firstChild;
- },
-
- has: function( elem, i, match ) {
- return !!Sizzle( match[3], elem ).length;
- },
-
- header: function( elem ) {
- return (/h\d/i).test( elem.nodeName );
- },
-
- text: function( elem ) {
- var attr = elem.getAttribute( "type" ), type = elem.type;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
- },
-
- radio: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
- },
-
- checkbox: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
- },
-
- file: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
- },
-
- password: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
- },
-
- submit: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && "submit" === elem.type;
- },
-
- image: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
- },
-
- reset: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && "reset" === elem.type;
- },
-
- button: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && "button" === elem.type || name === "button";
- },
-
- input: function( elem ) {
- return (/input|select|textarea|button/i).test( elem.nodeName );
- },
-
- focus: function( elem ) {
- return elem === elem.ownerDocument.activeElement;
- }
- },
- setFilters: {
- first: function( elem, i ) {
- return i === 0;
- },
-
- last: function( elem, i, match, array ) {
- return i === array.length - 1;
- },
-
- even: function( elem, i ) {
- return i % 2 === 0;
- },
-
- odd: function( elem, i ) {
- return i % 2 === 1;
- },
-
- lt: function( elem, i, match ) {
- return i < match[3] - 0;
- },
-
- gt: function( elem, i, match ) {
- return i > match[3] - 0;
- },
-
- nth: function( elem, i, match ) {
- return match[3] - 0 === i;
- },
-
- eq: function( elem, i, match ) {
- return match[3] - 0 === i;
- }
- },
- filter: {
- PSEUDO: function( elem, match, i, array ) {
- var name = match[1],
- filter = Expr.filters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
-
- } else if ( name === "contains" ) {
- return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
-
- } else if ( name === "not" ) {
- var not = match[3];
-
- for ( var j = 0, l = not.length; j < l; j++ ) {
- if ( not[j] === elem ) {
- return false;
- }
- }
-
- return true;
-
- } else {
- Sizzle.error( name );
- }
- },
-
- CHILD: function( elem, match ) {
- var first, last,
- doneName, parent, cache,
- count, diff,
- type = match[1],
- node = elem;
-
- switch ( type ) {
- case "only":
- case "first":
- while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- if ( type === "first" ) {
- return true;
- }
-
- node = elem;
-
- /* falls through */
- case "last":
- while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- return true;
-
- case "nth":
- first = match[2];
- last = match[3];
-
- if ( first === 1 && last === 0 ) {
- return true;
- }
-
- doneName = match[0];
- parent = elem.parentNode;
-
- if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
- count = 0;
-
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
- if ( node.nodeType === 1 ) {
- node.nodeIndex = ++count;
- }
- }
-
- parent[ expando ] = doneName;
- }
-
- diff = elem.nodeIndex - last;
-
- if ( first === 0 ) {
- return diff === 0;
-
- } else {
- return ( diff % first === 0 && diff / first >= 0 );
- }
- }
- },
-
- ID: function( elem, match ) {
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
- },
-
- TAG: function( elem, match ) {
- return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
- },
-
- CLASS: function( elem, match ) {
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
- .indexOf( match ) > -1;
- },
-
- ATTR: function( elem, match ) {
- var name = match[1],
- result = Sizzle.attr ?
- Sizzle.attr( elem, name ) :
- Expr.attrHandle[ name ] ?
- Expr.attrHandle[ name ]( elem ) :
- elem[ name ] != null ?
- elem[ name ] :
- elem.getAttribute( name ),
- value = result + "",
- type = match[2],
- check = match[4];
-
- return result == null ?
- type === "!=" :
- !type && Sizzle.attr ?
- result != null :
- type === "=" ?
- value === check :
- type === "*=" ?
- value.indexOf(check) >= 0 :
- type === "~=" ?
- (" " + value + " ").indexOf(check) >= 0 :
- !check ?
- value && result !== false :
- type === "!=" ?
- value !== check :
- type === "^=" ?
- value.indexOf(check) === 0 :
- type === "$=" ?
- value.substr(value.length - check.length) === check :
- type === "|=" ?
- value === check || value.substr(0, check.length + 1) === check + "-" :
- false;
- },
-
- POS: function( elem, match, i, array ) {
- var name = match[2],
- filter = Expr.setFilters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
- }
- }
- }
-};
-
-var origPOS = Expr.match.POS,
- fescape = function(all, num){
- return "\\" + (num - 0 + 1);
- };
-
-for ( var type in Expr.match ) {
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
-}
-// Expose origPOS
-// "global" as in regardless of relation to brackets/parens
-Expr.match.globalPOS = origPOS;
-
-var makeArray = function( array, results ) {
- array = Array.prototype.slice.call( array, 0 );
-
- if ( results ) {
- results.push.apply( results, array );
- return results;
- }
-
- return array;
-};
-
-// Perform a simple check to determine if the browser is capable of
-// converting a NodeList to an array using builtin methods.
-// Also verifies that the returned array holds DOM nodes
-// (which is not the case in the Blackberry browser)
-try {
- Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
-
-// Provide a fallback method if it does not work
-} catch( e ) {
- makeArray = function( array, results ) {
- var i = 0,
- ret = results || [];
-
- if ( toString.call(array) === "[object Array]" ) {
- Array.prototype.push.apply( ret, array );
-
- } else {
- if ( typeof array.length === "number" ) {
- for ( var l = array.length; i < l; i++ ) {
- ret.push( array[i] );
- }
-
- } else {
- for ( ; array[i]; i++ ) {
- ret.push( array[i] );
- }
- }
- }
-
- return ret;
- };
-}
-
-var sortOrder, siblingCheck;
-
-if ( document.documentElement.compareDocumentPosition ) {
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
- return a.compareDocumentPosition ? -1 : 1;
- }
-
- return a.compareDocumentPosition(b) & 4 ? -1 : 1;
- };
-
-} else {
- sortOrder = function( a, b ) {
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return a.sourceIndex - b.sourceIndex;
- }
-
- var al, bl,
- ap = [],
- bp = [],
- aup = a.parentNode,
- bup = b.parentNode,
- cur = aup;
-
- // If the nodes are siblings (or identical) we can do a quick check
- if ( aup === bup ) {
- return siblingCheck( a, b );
-
- // If no parents were found then the nodes are disconnected
- } else if ( !aup ) {
- return -1;
-
- } else if ( !bup ) {
- return 1;
- }
-
- // Otherwise they're somewhere else in the tree so we need
- // to build up a full list of the parentNodes for comparison
- while ( cur ) {
- ap.unshift( cur );
- cur = cur.parentNode;
- }
-
- cur = bup;
-
- while ( cur ) {
- bp.unshift( cur );
- cur = cur.parentNode;
- }
-
- al = ap.length;
- bl = bp.length;
-
- // Start walking down the tree looking for a discrepancy
- for ( var i = 0; i < al && i < bl; i++ ) {
- if ( ap[i] !== bp[i] ) {
- return siblingCheck( ap[i], bp[i] );
- }
- }
-
- // We ended someplace up the tree so do a sibling check
- return i === al ?
- siblingCheck( a, bp[i], -1 ) :
- siblingCheck( ap[i], b, 1 );
- };
-
- siblingCheck = function( a, b, ret ) {
- if ( a === b ) {
- return ret;
- }
-
- var cur = a.nextSibling;
-
- while ( cur ) {
- if ( cur === b ) {
- return -1;
- }
-
- cur = cur.nextSibling;
- }
-
- return 1;
- };
-}
-
-// Check to see if the browser returns elements by name when
-// querying by getElementById (and provide a workaround)
-(function(){
- // We're going to inject a fake input element with a specified name
- var form = document.createElement("div"),
- id = "script" + (new Date()).getTime(),
- root = document.documentElement;
-
- form.innerHTML = "<a name='" + id + "'/>";
-
- // Inject it into the root element, check its status, and remove it quickly
- root.insertBefore( form, root.firstChild );
-
- // The workaround has to do additional checks after a getElementById
- // Which slows things down for other browsers (hence the branching)
- if ( document.getElementById( id ) ) {
- Expr.find.ID = function( match, context, isXML ) {
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
-
- return m ?
- m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
- [m] :
- undefined :
- [];
- }
- };
-
- Expr.filter.ID = function( elem, match ) {
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
-
- return elem.nodeType === 1 && node && node.nodeValue === match;
- };
- }
-
- root.removeChild( form );
-
- // release memory in IE
- root = form = null;
-})();
-
-(function(){
- // Check to see if the browser returns only elements
- // when doing getElementsByTagName("*")
-
- // Create a fake element
- var div = document.createElement("div");
- div.appendChild( document.createComment("") );
-
- // Make sure no comments are found
- if ( div.getElementsByTagName("*").length > 0 ) {
- Expr.find.TAG = function( match, context ) {
- var results = context.getElementsByTagName( match[1] );
-
- // Filter out possible comments
- if ( match[1] === "*" ) {
- var tmp = [];
-
- for ( var i = 0; results[i]; i++ ) {
- if ( results[i].nodeType === 1 ) {
- tmp.push( results[i] );
- }
- }
-
- results = tmp;
- }
-
- return results;
- };
- }
-
- // Check to see if an attribute returns normalized href attributes
- div.innerHTML = "<a href='#'></a>";
-
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
- div.firstChild.getAttribute("href") !== "#" ) {
-
- Expr.attrHandle.href = function( elem ) {
- return elem.getAttribute( "href", 2 );
- };
- }
-
- // release memory in IE
- div = null;
-})();
-
-if ( document.querySelectorAll ) {
- (function(){
- var oldSizzle = Sizzle,
- div = document.createElement("div"),
- id = "__sizzle__";
-
- div.innerHTML = "<p class='TEST'></p>";
-
- // Safari can't handle uppercase or unicode characters when
- // in quirks mode.
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
- return;
- }
-
- Sizzle = function( query, context, extra, seed ) {
- context = context || document;
-
- // Only use querySelectorAll on non-XML documents
- // (ID selectors don't work in non-HTML documents)
- if ( !seed && !Sizzle.isXML(context) ) {
- // See if we find a selector to speed up
- var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
-
- if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
- // Speed-up: Sizzle("TAG")
- if ( match[1] ) {
- return makeArray( context.getElementsByTagName( query ), extra );
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
- return makeArray( context.getElementsByClassName( match[2] ), extra );
- }
- }
-
- if ( context.nodeType === 9 ) {
- // Speed-up: Sizzle("body")
- // The body element only exists once, optimize finding it
- if ( query === "body" && context.body ) {
- return makeArray( [ context.body ], extra );
-
- // Speed-up: Sizzle("#ID")
- } else if ( match && match[3] ) {
- var elem = context.getElementById( match[3] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id === match[3] ) {
- return makeArray( [ elem ], extra );
- }
-
- } else {
- return makeArray( [], extra );
- }
- }
-
- try {
- return makeArray( context.querySelectorAll(query), extra );
- } catch(qsaError) {}
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- var oldContext = context,
- old = context.getAttribute( "id" ),
- nid = old || id,
- hasParent = context.parentNode,
- relativeHierarchySelector = /^\s*[+~]/.test( query );
-
- if ( !old ) {
- context.setAttribute( "id", nid );
- } else {
- nid = nid.replace( /'/g, "\\$&" );
- }
- if ( relativeHierarchySelector && hasParent ) {
- context = context.parentNode;
- }
-
- try {
- if ( !relativeHierarchySelector || hasParent ) {
- return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
- }
-
- } catch(pseudoError) {
- } finally {
- if ( !old ) {
- oldContext.removeAttribute( "id" );
- }
- }
- }
- }
-
- return oldSizzle(query, context, extra, seed);
- };
-
- for ( var prop in oldSizzle ) {
- Sizzle[ prop ] = oldSizzle[ prop ];
- }
-
- // release memory in IE
- div = null;
- })();
-}
-
-(function(){
- var html = document.documentElement,
- matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
-
- if ( matches ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9 fails this)
- var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
- pseudoWorks = false;
-
- try {
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( document.documentElement, "[test!='']:sizzle" );
-
- } catch( pseudoError ) {
- pseudoWorks = true;
- }
-
- Sizzle.matchesSelector = function( node, expr ) {
- // Make sure that attribute selectors are quoted
- expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
-
- if ( !Sizzle.isXML( node ) ) {
- try {
- if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
- var ret = matches.call( node, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || !disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9, so check for that
- node.document && node.document.nodeType !== 11 ) {
- return ret;
- }
- }
- } catch(e) {}
- }
-
- return Sizzle(expr, null, null, [node]).length > 0;
- };
- }
-})();
-
-(function(){
- var div = document.createElement("div");
-
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
-
- // Opera can't find a second classname (in 9.6)
- // Also, make sure that getElementsByClassName actually exists
- if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
- return;
- }
-
- // Safari caches class attributes, doesn't catch changes (in 3.2)
- div.lastChild.className = "e";
-
- if ( div.getElementsByClassName("e").length === 1 ) {
- return;
- }
-
- Expr.order.splice(1, 0, "CLASS");
- Expr.find.CLASS = function( match, context, isXML ) {
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
- return context.getElementsByClassName(match[1]);
- }
- };
-
- // release memory in IE
- div = null;
-})();
-
-function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
-
- if ( elem ) {
- var match = false;
-
- elem = elem[dir];
-
- while ( elem ) {
- if ( elem[ expando ] === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 && !isXML ){
- elem[ expando ] = doneName;
- elem.sizset = i;
- }
-
- if ( elem.nodeName.toLowerCase() === cur ) {
- match = elem;
- break;
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
-
- if ( elem ) {
- var match = false;
-
- elem = elem[dir];
-
- while ( elem ) {
- if ( elem[ expando ] === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 ) {
- if ( !isXML ) {
- elem[ expando ] = doneName;
- elem.sizset = i;
- }
-
- if ( typeof cur !== "string" ) {
- if ( elem === cur ) {
- match = true;
- break;
- }
-
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
- match = elem;
- break;
- }
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-if ( document.documentElement.contains ) {
- Sizzle.contains = function( a, b ) {
- return a !== b && (a.contains ? a.contains(b) : true);
- };
-
-} else if ( document.documentElement.compareDocumentPosition ) {
- Sizzle.contains = function( a, b ) {
- return !!(a.compareDocumentPosition(b) & 16);
- };
-
-} else {
- Sizzle.contains = function() {
- return false;
- };
-}
-
-Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
-
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-var posProcess = function( selector, context, seed ) {
- var match,
- tmpSet = [],
- later = "",
- root = context.nodeType ? [context] : context;
-
- // Position selectors must be done after the filter
- // And so must :not(positional) so we move all PSEUDOs to the end
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
- later += match[0];
- selector = selector.replace( Expr.match.PSEUDO, "" );
- }
-
- selector = Expr.relative[selector] ? selector + "*" : selector;
-
- for ( var i = 0, l = root.length; i < l; i++ ) {
- Sizzle( selector, root[i], tmpSet, seed );
- }
-
- return Sizzle.filter( later, tmpSet );
-};
-
-// EXPOSE
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-Sizzle.selectors.attrMap = {};
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.filters;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})();
-
-
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
- // Note: This RegExp should be improved, or likely pulled from Sizzle
- rmultiselector = /,/,
- isSimple = /^.[^:#\[\.,]*$/,
- slice = Array.prototype.slice,
- POS = jQuery.expr.match.globalPOS,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var self = this,
- i, l;
-
- if ( typeof selector !== "string" ) {
- return jQuery( selector ).filter(function() {
- for ( i = 0, l = self.length; i < l; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- });
- }
-
- var ret = this.pushStack( "", "find", selector ),
- length, n, r;
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- length = ret.length;
- jQuery.find( selector, this[i], ret );
-
- if ( i > 0 ) {
- // Make sure that the results are unique
- for ( n = length; n < ret.length; n++ ) {
- for ( r = 0; r < length; r++ ) {
- if ( ret[r] === ret[n] ) {
- ret.splice(n--, 1);
- break;
- }
- }
- }
- }
- }
-
- return ret;
- },
-
- has: function( target ) {
- var targets = jQuery( target );
- return this.filter(function() {
- for ( var i = 0, l = targets.length; i < l; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false), "not", selector);
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true), "filter", selector );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- POS.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var ret = [], i, l, cur = this[0];
-
- // Array (deprecated as of jQuery 1.7)
- if ( jQuery.isArray( selectors ) ) {
- var level = 1;
-
- while ( cur && cur.ownerDocument && cur !== context ) {
- for ( i = 0; i < selectors.length; i++ ) {
-
- if ( jQuery( cur ).is( selectors[ i ] ) ) {
- ret.push({ selector: selectors[ i ], elem: cur, level: level });
- }
- }
-
- cur = cur.parentNode;
- level++;
- }
-
- return ret;
- }
-
- // String
- var pos = POS.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- cur = this[i];
-
- while ( cur ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
-
- } else {
- cur = cur.parentNode;
- if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
- break;
- }
- }
- }
- }
-
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
-
- return this.pushStack( ret, "closest", selectors );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
- all :
- jQuery.unique( all ) );
- },
-
- andSelf: function() {
- return this.add( this.prevObject );
- }
-});
-
-// A painfully simple check to see if an element is disconnected
-// from a document (should be improved, where feasible).
-function isDisconnected( node ) {
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return jQuery.nth( elem, 2, "nextSibling" );
- },
- prev: function( elem ) {
- return jQuery.nth( elem, 2, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.makeArray( elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret, name, slice.call( arguments ).join(",") );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- nth: function( cur, result, dir, elem ) {
- result = result || 1;
- var num = 0;
-
- for ( ; cur; cur = cur[dir] ) {
- if ( cur.nodeType === 1 && ++num === result ) {
- break;
- }
- }
-
- return cur;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem, i ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem, i ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-
-
-
-
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style)/i,
- rnocache = /<(?:script|object|embed|option|style)/i,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /\/(java|ecma)script/i,
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- area: [ 1, "<map>", "</map>" ],
- _default: [ 0, "", "" ]
- },
- safeFragment = createSafeFragment( document );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-// IE can't serialize <link> and <script> tags normally
-if ( !jQuery.support.htmlSerialize ) {
- wrapMap._default = [ 1, "div<div>", "</div>" ];
-}
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- if ( this[0] && this[0].parentNode ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this );
- });
- } else if ( arguments.length ) {
- var set = jQuery.clean( arguments );
- set.push.apply( set, this.toArray() );
- return this.pushStack( set, "before", arguments );
- }
- },
-
- after: function() {
- if ( this[0] && this[0].parentNode ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- });
- } else if ( arguments.length ) {
- var set = this.pushStack( this, "after", arguments );
- set.push.apply( set, jQuery.clean(arguments) );
- return set;
- }
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- jQuery.cleanData( [ elem ] );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- null;
- }
-
-
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName( "*" ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function( value ) {
- if ( this[0] && this[0].parentNode ) {
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( jQuery.isFunction( value ) ) {
- return this.each(function(i) {
- var self = jQuery(this), old = self.html();
- self.replaceWith( value.call( this, i, old ) );
- });
- }
-
- if ( typeof value !== "string" ) {
- value = jQuery( value ).detach();
- }
-
- return this.each(function() {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- jQuery( this ).remove();
-
- if ( next ) {
- jQuery(next).before( value );
- } else {
- jQuery(parent).append( value );
- }
- });
- } else {
- return this.length ?
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
- this;
- }
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
- var results, first, fragment, parent,
- value = args[0],
- scripts = [];
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
- return this.each(function() {
- jQuery(this).domManip( args, table, callback, true );
- });
- }
-
- if ( jQuery.isFunction(value) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- args[0] = value.call(this, i, table ? self.html() : undefined);
- self.domManip( args, table, callback );
- });
- }
-
- if ( this[0] ) {
- parent = value && value.parentNode;
-
- // If we're in a fragment, just use that instead of building a new one
- if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
- results = { fragment: parent };
-
- } else {
- results = jQuery.buildFragment( args, this, scripts );
- }
-
- fragment = results.fragment;
-
- if ( fragment.childNodes.length === 1 ) {
- first = fragment = fragment.firstChild;
- } else {
- first = fragment.firstChild;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
-
- for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
- callback.call(
- table ?
- root(this[i], first) :
- this[i],
- // Make sure that we do not leak memory by inadvertently discarding
- // the original fragment (which might have attached data) instead of
- // using it; in addition, use the original fragment object for the last
- // item instead of first because it can end up being emptied incorrectly
- // in certain situations (Bug #8070).
- // Fragments from the fragment cache must always be cloned and never used
- // in place.
- results.cacheable || ( l > 1 && i < lastIndex ) ?
- jQuery.clone( fragment, true, true ) :
- fragment
- );
- }
- }
-
- if ( scripts.length ) {
- jQuery.each( scripts, function( i, elem ) {
- if ( elem.src ) {
- jQuery.ajax({
- type: "GET",
- global: false,
- url: elem.src,
- async: false,
- dataType: "script"
- });
- } else {
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- });
- }
- }
-
- return this;
- }
-});
-
-function root( elem, cur ) {
- return jQuery.nodeName(elem, "table") ?
- (elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
- elem;
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function cloneFixAttributes( src, dest ) {
- var nodeName;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // clearAttributes removes the attributes, which we don't want,
- // but also removes the attachEvent events, which we *do* want
- if ( dest.clearAttributes ) {
- dest.clearAttributes();
- }
-
- // mergeAttributes, in contrast, only merges back on the
- // original attributes, not the events
- if ( dest.mergeAttributes ) {
- dest.mergeAttributes( src );
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 fail to clone children inside object elements that use
- // the proprietary classid attribute value (rather than the type
- // attribute) to identify the type of content to display
- if ( nodeName === "object" ) {
- dest.outerHTML = src.outerHTML;
-
- } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
- if ( src.checked ) {
- dest.defaultChecked = dest.checked = src.checked;
- }
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
-
- // IE blanks contents when cloning scripts
- } else if ( nodeName === "script" && dest.text !== src.text ) {
- dest.text = src.text;
- }
-
- // Event data gets referenced instead of copied if the expando
- // gets copied too
- dest.removeAttribute( jQuery.expando );
-
- // Clear flags for bubbling special change/submit events, they must
- // be reattached when the newly cloned events are first activated
- dest.removeAttribute( "_submit_attached" );
- dest.removeAttribute( "_change_attached" );
-}
-
-jQuery.buildFragment = function( args, nodes, scripts ) {
- var fragment, cacheable, cacheresults, doc,
- first = args[ 0 ];
-
- // nodes may contain either an explicit document object,
- // a jQuery collection or context object.
- // If nodes[0] contains a valid object to assign to doc
- if ( nodes && nodes[0] ) {
- doc = nodes[0].ownerDocument || nodes[0];
- }
-
- // Ensure that an attr object doesn't incorrectly stand in as a document object
- // Chrome and Firefox seem to allow this to occur and will throw exception
- // Fixes #8950
- if ( !doc.createDocumentFragment ) {
- doc = document;
- }
-
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
- // Cloning options loses the selected state, so don't cache them
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
- // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
- if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
- first.charAt(0) === "<" && !rnocache.test( first ) &&
- (jQuery.support.checkClone || !rchecked.test( first )) &&
- (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
-
- cacheable = true;
-
- cacheresults = jQuery.fragments[ first ];
- if ( cacheresults && cacheresults !== 1 ) {
- fragment = cacheresults;
- }
- }
-
- if ( !fragment ) {
- fragment = doc.createDocumentFragment();
- jQuery.clean( args, doc, fragment, scripts );
- }
-
- if ( cacheable ) {
- jQuery.fragments[ first ] = cacheresults ? fragment : 1;
- }
-
- return { fragment: fragment, cacheable: cacheable };
-};
-
-jQuery.fragments = {};
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var ret = [],
- insert = jQuery( selector ),
- parent = this.length === 1 && this[0].parentNode;
-
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
- insert[ original ]( this[0] );
- return this;
-
- } else {
- for ( var i = 0, l = insert.length; i < l; i++ ) {
- var elems = ( i > 0 ? this.clone(true) : this ).get();
- jQuery( insert[i] )[ original ]( elems );
- ret = ret.concat( elems );
- }
-
- return this.pushStack( ret, name, insert.selector );
- }
- };
-});
-
-function getAll( elem ) {
- if ( typeof elem.getElementsByTagName !== "undefined" ) {
- return elem.getElementsByTagName( "*" );
-
- } else if ( typeof elem.querySelectorAll !== "undefined" ) {
- return elem.querySelectorAll( "*" );
-
- } else {
- return [];
- }
-}
-
-// Used in clean, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( elem.type === "checkbox" || elem.type === "radio" ) {
- elem.defaultChecked = elem.checked;
- }
-}
-// Finds all inputs and passes them to fixDefaultChecked
-function findInputs( elem ) {
- var nodeName = ( elem.nodeName || "" ).toLowerCase();
- if ( nodeName === "input" ) {
- fixDefaultChecked( elem );
- // Skip scripts, get other children
- } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
- }
-}
-
-// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
-function shimCloneNode( elem ) {
- var div = document.createElement( "div" );
- safeFragment.appendChild( div );
-
- div.innerHTML = elem.outerHTML;
- return div.firstChild;
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var srcElements,
- destElements,
- i,
- // IE<=8 does not properly clone detached, unknown element nodes
- clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
- elem.cloneNode( true ) :
- shimCloneNode( elem );
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
- // IE copies events bound via attachEvent when using cloneNode.
- // Calling detachEvent on the clone will also remove the events
- // from the original. In order to get around this, we use some
- // proprietary methods to clear the events. Thanks to MooTools
- // guys for this hotness.
-
- cloneFixAttributes( elem, clone );
-
- // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- // Weird iteration because IE will replace the length property
- // with an element if you are cloning the body and one of the
- // elements on the page has a name or id of "length"
- for ( i = 0; srcElements[i]; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- cloneFixAttributes( srcElements[i], destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- cloneCopyEvent( elem, clone );
-
- if ( deepDataAndEvents ) {
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- for ( i = 0; srcElements[i]; ++i ) {
- cloneCopyEvent( srcElements[i], destElements[i] );
- }
- }
- }
-
- srcElements = destElements = null;
-
- // Return the cloned set
- return clone;
- },
-
- clean: function( elems, context, fragment, scripts ) {
- var checkScriptType, script, j,
- ret = [];
-
- context = context || document;
-
- // !context.createElement fails in IE with an error but returns typeof 'object'
- if ( typeof context.createElement === "undefined" ) {
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
- }
-
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- if ( typeof elem === "number" ) {
- elem += "";
- }
-
- if ( !elem ) {
- continue;
- }
-
- // Convert html string into DOM nodes
- if ( typeof elem === "string" ) {
- if ( !rhtml.test( elem ) ) {
- elem = context.createTextNode( elem );
- } else {
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
- wrap = wrapMap[ tag ] || wrapMap._default,
- depth = wrap[0],
- div = context.createElement("div"),
- safeChildNodes = safeFragment.childNodes,
- remove;
-
- // Append wrapper element to unknown element safe doc fragment
- if ( context === document ) {
- // Use the fragment we've already created for this document
- safeFragment.appendChild( div );
- } else {
- // Use a fragment created with the owner document
- createSafeFragment( context ).appendChild( div );
- }
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + elem + wrap[2];
-
- // Move to the right depth
- while ( depth-- ) {
- div = div.lastChild;
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- var hasBody = rtbody.test(elem),
- tbody = tag === "table" && !hasBody ?
- div.firstChild && div.firstChild.childNodes :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !hasBody ?
- div.childNodes :
- [];
-
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
- }
- }
- }
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
- }
-
- elem = div.childNodes;
-
- // Clear elements from DocumentFragment (safeFragment or otherwise)
- // to avoid hoarding elements. Fixes #11356
- if ( div ) {
- div.parentNode.removeChild( div );
-
- // Guard against -1 index exceptions in FF3.6
- if ( safeChildNodes.length > 0 ) {
- remove = safeChildNodes[ safeChildNodes.length - 1 ];
-
- if ( remove && remove.parentNode ) {
- remove.parentNode.removeChild( remove );
- }
- }
- }
- }
- }
-
- // Resets defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- var len;
- if ( !jQuery.support.appendChecked ) {
- if ( elem[0] && typeof (len = elem.length) === "number" ) {
- for ( j = 0; j < len; j++ ) {
- findInputs( elem[j] );
- }
- } else {
- findInputs( elem );
- }
- }
-
- if ( elem.nodeType ) {
- ret.push( elem );
- } else {
- ret = jQuery.merge( ret, elem );
- }
- }
-
- if ( fragment ) {
- checkScriptType = function( elem ) {
- return !elem.type || rscriptType.test( elem.type );
- };
- for ( i = 0; ret[i]; i++ ) {
- script = ret[i];
- if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
- scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
-
- } else {
- if ( script.nodeType === 1 ) {
- var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
-
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
- }
- fragment.appendChild( script );
- }
- }
- }
-
- return ret;
- },
-
- cleanData: function( elems ) {
- var data, id,
- cache = jQuery.cache,
- special = jQuery.event.special,
- deleteExpando = jQuery.support.deleteExpando;
-
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
- continue;
- }
-
- id = elem[ jQuery.expando ];
-
- if ( id ) {
- data = cache[ id ];
-
- if ( data && data.events ) {
- for ( var type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
-
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
- if ( data.handle ) {
- data.handle.elem = null;
- }
- }
-
- if ( deleteExpando ) {
- delete elem[ jQuery.expando ];
-
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( jQuery.expando );
- }
-
- delete cache[ id ];
- }
- }
- }
-});
-
-
-
-
-var ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity=([^)]*)/,
- // fixed for IE9, see #8346
- rupper = /([A-Z]|^ms)/g,
- rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
- rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
- rrelNum = /^([\-+])=([\-+.\de]+)/,
- rmargin = /^margin/,
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
-
- // order is important!
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
-
- curCSS,
-
- getComputedStyle,
- currentStyle;
-
-jQuery.fn.css = function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
-};
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
-
- } else {
- return elem.style.opacity;
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, origName = jQuery.camelCase( name ),
- style = elem.style, hooks = jQuery.cssHooks[ origName ];
-
- name = jQuery.cssProps[ origName ] || origName;
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra ) {
- var ret, hooks;
-
- // Make sure that we're working with the right name
- name = jQuery.camelCase( name );
- hooks = jQuery.cssHooks[ name ];
- name = jQuery.cssProps[ name ] || name;
-
- // cssFloat needs a special treatment
- if ( name === "cssFloat" ) {
- name = "float";
- }
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
- return ret;
-
- // Otherwise, if a way to get the computed value exists, use that
- } else if ( curCSS ) {
- return curCSS( elem, name );
- }
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {},
- ret, name;
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.call( elem );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-// DEPRECATED in 1.3, Use jQuery.css() instead
-jQuery.curCSS = jQuery.css;
-
-if ( document.defaultView && document.defaultView.getComputedStyle ) {
- getComputedStyle = function( elem, name ) {
- var ret, defaultView, computedStyle, width,
- style = elem.style;
-
- name = name.replace( rupper, "-$1" ).toLowerCase();
-
- if ( (defaultView = elem.ownerDocument.defaultView) &&
- (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
-
- ret = computedStyle.getPropertyValue( name );
- if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
- ret = jQuery.style( elem, name );
- }
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
- // which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
- width = style.width;
- style.width = ret;
- ret = computedStyle.width;
- style.width = width;
- }
-
- return ret;
- };
-}
-
-if ( document.documentElement.currentStyle ) {
- currentStyle = function( elem, name ) {
- var left, rsLeft, uncomputed,
- ret = elem.currentStyle && elem.currentStyle[ name ],
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && (uncomputed = style[ name ]) ) {
- ret = uncomputed;
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( rnumnonpx.test( ret ) ) {
-
- // Remember the original values
- left = style.left;
- rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- elem.runtimeStyle.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- elem.runtimeStyle.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-curCSS = getComputedStyle || currentStyle;
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- i = name === "width" ? 1 : 0,
- len = 4;
-
- if ( val > 0 ) {
- if ( extra !== "border" ) {
- for ( ; i < len; i += 2 ) {
- if ( !extra ) {
- val -= parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
- }
- if ( extra === "margin" ) {
- val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0;
- } else {
- val -= parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
- }
- }
- }
-
- return val + "px";
- }
-
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
-
- // Add padding, border, margin
- if ( extra ) {
- for ( ; i < len; i += 2 ) {
- val += parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
- if ( extra !== "padding" ) {
- val += parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
- }
- if ( extra === "margin" ) {
- val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0;
- }
- }
- }
-
- return val + "px";
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- if ( elem.offsetWidth !== 0 ) {
- return getWidthOrHeight( elem, name, extra );
- } else {
- return jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- });
- }
- }
- },
-
- set: function( elem, value ) {
- return rnum.test( value ) ?
- value + "px" :
- value;
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( parseFloat( RegExp.$1 ) / 100 ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there there is no filter style applied in a css rule, we are done
- if ( currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-jQuery(function() {
- // This hook cannot be added until DOM ready because the support test
- // for it is not run until after DOM ready
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" }, function() {
- if ( computed ) {
- return curCSS( elem, "margin-right" );
- } else {
- return elem.style.marginRight;
- }
- });
- }
- };
- }
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- var width = elem.offsetWidth,
- height = elem.offsetHeight;
-
- return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
-
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i,
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ],
- expanded = {};
-
- for ( i = 0; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-});
-
-
-
-
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rhash = /#.*$/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rquery = /\?/,
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
- rselectTextarea = /^(?:select|textarea)/i,
- rspacesAjax = /\s+/,
- rts = /([?&])_=[^&]*/,
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Document location
- ajaxLocation,
-
- // Document location segments
- ajaxLocParts,
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = ["*/"] + ["*"];
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- if ( jQuery.isFunction( func ) ) {
- var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
- i = 0,
- length = dataTypes.length,
- dataType,
- list,
- placeBefore;
-
- // For each dataType in the dataTypeExpression
- for ( ; i < length; i++ ) {
- dataType = dataTypes[ i ];
- // We control if we're asked to add before
- // any existing element
- placeBefore = /^\+/.test( dataType );
- if ( placeBefore ) {
- dataType = dataType.substr( 1 ) || "*";
- }
- list = structure[ dataType ] = structure[ dataType ] || [];
- // then we add to the structure accordingly
- list[ placeBefore ? "unshift" : "push" ]( func );
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
- dataType /* internal */, inspected /* internal */ ) {
-
- dataType = dataType || options.dataTypes[ 0 ];
- inspected = inspected || {};
-
- inspected[ dataType ] = true;
-
- var list = structure[ dataType ],
- i = 0,
- length = list ? list.length : 0,
- executeOnly = ( structure === prefilters ),
- selection;
-
- for ( ; i < length && ( executeOnly || !selection ); i++ ) {
- selection = list[ i ]( options, originalOptions, jqXHR );
- // If we got redirected to another dataType
- // we try there if executing only and not done already
- if ( typeof selection === "string" ) {
- if ( !executeOnly || inspected[ selection ] ) {
- selection = undefined;
- } else {
- options.dataTypes.unshift( selection );
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, selection, inspected );
- }
- }
- }
- // If we're only executing or nothing was selected
- // we try the catchall dataType if not done already
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, "*", inspected );
- }
- // unnecessary when only executing (prefilters)
- // but it'll be ignored by the caller in that case
- return selection;
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-}
-
-jQuery.fn.extend({
- load: function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
-
- // Don't do a request if no elements are being requested
- } else if ( !this.length ) {
- return this;
- }
-
- var off = url.indexOf( " " );
- if ( off >= 0 ) {
- var selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // Default to a GET request
- var type = "GET";
-
- // If the second parameter was provided
- if ( params ) {
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( typeof params === "object" ) {
- params = jQuery.param( params, jQuery.ajaxSettings.traditional );
- type = "POST";
- }
- }
-
- var self = this;
-
- // Request the remote document
- jQuery.ajax({
- url: url,
- type: type,
- dataType: "html",
- data: params,
- // Complete callback (responseText is used internally)
- complete: function( jqXHR, status, responseText ) {
- // Store the response as specified by the jqXHR object
- responseText = jqXHR.responseText;
- // If successful, inject the HTML into all the matched elements
- if ( jqXHR.isResolved() ) {
- // #4825: Get the actual response in case
- // a dataFilter is present in ajaxSettings
- jqXHR.done(function( r ) {
- responseText = r;
- });
- // See if a selector was specified
- self.html( selector ?
- // Create a dummy div to hold the results
- jQuery("<div>")
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append(responseText.replace(rscript, ""))
-
- // Locate the specified elements
- .find(selector) :
-
- // If not, just inject the full result
- responseText );
- }
-
- if ( callback ) {
- self.each( callback, [ responseText, status, jqXHR ] );
- }
- }
- });
-
- return this;
- },
-
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
-
- serializeArray: function() {
- return this.map(function(){
- return this.elements ? jQuery.makeArray( this.elements ) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
- rinput.test( this.type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val, i ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
- jQuery.fn[ o ] = function( f ){
- return this.on( o, f );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- type: method,
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- };
-});
-
-jQuery.extend({
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- if ( settings ) {
- // Building a settings object
- ajaxExtend( target, jQuery.ajaxSettings );
- } else {
- // Extending ajaxSettings
- settings = target;
- target = jQuery.ajaxSettings;
- }
- ajaxExtend( target, settings );
- return target;
- },
-
- ajaxSettings: {
- url: ajaxLocation,
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- type: "GET",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- processData: true,
- async: true,
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- xml: "application/xml, text/xml",
- html: "text/html",
- text: "text/plain",
- json: "application/json, text/javascript",
- "*": allTypes
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // List of data converters
- // 1) key format is "source_type destination_type" (a single space in-between)
- // 2) the catchall symbol "*" can be used for source_type
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- context: true,
- url: true
- }
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events
- // It's the callbackContext if one was provided in the options
- // and if it's a DOM node or a jQuery collection
- globalEventContext = callbackContext !== s &&
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
- jQuery( callbackContext ) : jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks( "once memory" ),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // ifModified key
- ifModifiedKey,
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // Response headers
- responseHeadersString,
- responseHeaders,
- // transport
- transport,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // The jqXHR state
- state = 0,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Fake xhr
- jqXHR = {
-
- readyState: 0,
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- if ( !state ) {
- var lname = name.toLowerCase();
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match === undefined ? null : match;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- statusText = statusText || "abort";
- if ( transport ) {
- transport.abort( statusText );
- }
- done( 0, statusText );
- return this;
- }
- };
-
- // Callback for when everything is done
- // It is defined here because jslint complains if it is declared
- // at the end of the function (which would be more logical and readable)
- function done( status, nativeStatusText, responses, headers ) {
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- var isSuccess,
- success,
- error,
- statusText = nativeStatusText,
- response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
- lastModified,
- etag;
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
-
- if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
- jQuery.lastModified[ ifModifiedKey ] = lastModified;
- }
- if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
- jQuery.etag[ ifModifiedKey ] = etag;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
-
- statusText = "notmodified";
- isSuccess = true;
-
- // If we have data
- } else {
-
- try {
- success = ajaxConvert( s, response );
- statusText = "success";
- isSuccess = true;
- } catch(e) {
- // We have a parsererror
- statusText = "parsererror";
- error = e;
- }
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( !statusText || status ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = "" + ( nativeStatusText || statusText );
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger( "ajaxStop" );
- }
- }
- }
-
- // Attach deferreds
- deferred.promise( jqXHR );
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
- jqXHR.complete = completeDeferred.add;
-
- // Status-dependent callbacks
- jqXHR.statusCode = function( map ) {
- if ( map ) {
- var tmp;
- if ( state < 2 ) {
- for ( tmp in map ) {
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
- }
- } else {
- tmp = map[ jqXHR.status ];
- jqXHR.then( tmp, tmp );
- }
- }
- return this;
- };
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // We also use the url parameter if available
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
-
- // Determine if a cross-domain request is in order
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return false;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger( "ajaxStart" );
- }
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Get ifModifiedKey before adding the anti-cache parameter
- ifModifiedKey = s.url;
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
-
- var ts = jQuery.now(),
- // try replacing _= if it is there
- ret = s.url.replace( rts, "$1_=" + ts );
-
- // if nothing was replaced, add timestamp to the end
- s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- ifModifiedKey = ifModifiedKey || s.url;
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
- }
- if ( jQuery.etag[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
- }
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already
- jqXHR.abort();
- return false;
-
- }
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout( function(){
- jqXHR.abort( "timeout" );
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch (e) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- return jqXHR;
- },
-
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a, traditional ) {
- var s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : value;
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( var prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
- }
-});
-
-function buildParams( prefix, obj, traditional, add ) {
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // If array item is non-scalar (array or object), encode its
- // numeric index to resolve deserialization ambiguity issues.
- // Note that rack (as of 1.0.0) can't currently deserialize
- // nested arrays properly, and attempting to do so may cause
- // a server error. Possible fixes are to modify rack's
- // deserialization algorithm or to provide an option or flag
- // to force array serialization to be shallow.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( var name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-
-// This is still on the jQuery object... for now
-// Want to move this to jQuery.ajax some day
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {}
-
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields,
- ct,
- type,
- finalDataType,
- firstDataType;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- var dataTypes = s.dataTypes,
- converters = {},
- i,
- key,
- length = dataTypes.length,
- tmp,
- // Current and previous dataTypes
- current = dataTypes[ 0 ],
- prev,
- // Conversion expression
- conversion,
- // Conversion function
- conv,
- // Conversion functions (transitive conversion)
- conv1,
- conv2;
-
- // For each dataType in the chain
- for ( i = 1; i < length; i++ ) {
-
- // Create converters map
- // with lowercased keys
- if ( i === 1 ) {
- for ( key in s.converters ) {
- if ( typeof key === "string" ) {
- converters[ key.toLowerCase() ] = s.converters[ key ];
- }
- }
- }
-
- // Get the dataTypes
- prev = current;
- current = dataTypes[ i ];
-
- // If current is auto dataType, update it to prev
- if ( current === "*" ) {
- current = prev;
- // If no auto and dataTypes are actually different
- } else if ( prev !== "*" && prev !== current ) {
-
- // Get the converter
- conversion = prev + " " + current;
- conv = converters[ conversion ] || converters[ "* " + current ];
-
- // If there is no direct converter, search transitively
- if ( !conv ) {
- conv2 = undefined;
- for ( conv1 in converters ) {
- tmp = conv1.split( " " );
- if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
- conv2 = converters[ tmp[1] + " " + current ];
- if ( conv2 ) {
- conv1 = converters[ conv1 ];
- if ( conv1 === true ) {
- conv = conv2;
- } else if ( conv2 === true ) {
- conv = conv1;
- }
- break;
- }
- }
- }
- }
- // If we found no converter, dispatch an error
- if ( !( conv || conv2 ) ) {
- jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
- }
- // If found converter is not an equivalence
- if ( conv !== true ) {
- // Convert with 1 or 2 converters accordingly
- response = conv ? conv( response ) : conv2( conv1(response) );
- }
- }
- }
- return response;
-}
-
-
-
-
-var jsc = jQuery.now(),
- jsre = /(\=)\?(&|$)|\?\?/i;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- return jQuery.expando + "_" + ( jsc++ );
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
-
- if ( s.dataTypes[ 0 ] === "jsonp" ||
- s.jsonp !== false && ( jsre.test( s.url ) ||
- inspectData && jsre.test( s.data ) ) ) {
-
- var responseContainer,
- jsonpCallback = s.jsonpCallback =
- jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
- previous = window[ jsonpCallback ],
- url = s.url,
- data = s.data,
- replace = "$1" + jsonpCallback + "$2";
-
- if ( s.jsonp !== false ) {
- url = url.replace( jsre, replace );
- if ( s.url === url ) {
- if ( inspectData ) {
- data = data.replace( jsre, replace );
- }
- if ( s.data === data ) {
- // Add callback manually
- url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
- }
- }
- }
-
- s.url = url;
- s.data = data;
-
- // Install callback
- window[ jsonpCallback ] = function( response ) {
- responseContainer = [ response ];
- };
-
- // Clean-up function
- jqXHR.always(function() {
- // Set callback back to previous value
- window[ jsonpCallback ] = previous;
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( previous ) ) {
- window[ jsonpCallback ]( responseContainer[ 0 ] );
- }
- });
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( jsonpCallback + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Delegate to script
- return "script";
- }
-});
-
-
-
-
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /javascript|ecmascript/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement( "script" );
-
- script.async = "async";
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( head && script.parentNode ) {
- head.removeChild( script );
- }
-
- // Dereference the script
- script = undefined;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
- // This arises when a base node is used (#2709 and #4378).
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( 0, 1 );
- }
- }
- };
- }
-});
-
-
-
-
-var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
- // Abort all pending requests
- for ( var key in xhrCallbacks ) {
- xhrCallbacks[ key ]( 0, 1 );
- }
- } : false,
- xhrId = 0,
- xhrCallbacks;
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-(function( xhr ) {
- jQuery.extend( jQuery.support, {
- ajax: !!xhr,
- cors: !!xhr && ( "withCredentials" in xhr )
- });
-})( jQuery.ajaxSettings.xhr() );
-
-// Create transport if the browser can provide an xhr
-if ( jQuery.support.ajax ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var xhr = s.xhr(),
- handle,
- i;
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( _ ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occured
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
- responses = {};
- xml = xhr.responseXML;
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- try {
- responses.text = xhr.responseText;
- } catch( _ ) {
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- // if we're in sync mode or it's in cache
- // and has been retrieved directly (IE6 & IE7)
- // we need to manually fire the callback
- if ( !s.async || xhr.readyState === 4 ) {
- callback();
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback(0,1);
- }
- }
- };
- }
- });
-}
-
-
-
-
-var elemdisplay = {},
- iframe, iframeDoc,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
- timerId,
- fxAttrs = [
- // height animations
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
- // width animations
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
- // opacity animations
- [ "opacity" ]
- ],
- fxNow;
-
-jQuery.fn.extend({
- show: function( speed, easing, callback ) {
- var elem, display;
-
- if ( speed || speed === 0 ) {
- return this.animate( genFx("show", 3), speed, easing, callback );
-
- } else {
- for ( var i = 0, j = this.length; i < j; i++ ) {
- elem = this[ i ];
-
- if ( elem.style ) {
- display = elem.style.display;
-
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
- display = elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( (display === "" && jQuery.css(elem, "display") === "none") ||
- !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
- jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( i = 0; i < j; i++ ) {
- elem = this[ i ];
-
- if ( elem.style ) {
- display = elem.style.display;
-
- if ( display === "" || display === "none" ) {
- elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
- }
- }
- }
-
- return this;
- }
- },
-
- hide: function( speed, easing, callback ) {
- if ( speed || speed === 0 ) {
- return this.animate( genFx("hide", 3), speed, easing, callback);
-
- } else {
- var elem, display,
- i = 0,
- j = this.length;
-
- for ( ; i < j; i++ ) {
- elem = this[i];
- if ( elem.style ) {
- display = jQuery.css( elem, "display" );
-
- if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
- jQuery._data( elem, "olddisplay", display );
- }
- }
- }
-
- // Set the display of the elements in a second loop
- // to avoid the constant reflow
- for ( i = 0; i < j; i++ ) {
- if ( this[i].style ) {
- this[i].style.display = "none";
- }
- }
-
- return this;
- }
- },
-
- // Save the old toggle function
- _toggle: jQuery.fn.toggle,
-
- toggle: function( fn, fn2, callback ) {
- var bool = typeof fn === "boolean";
-
- if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
- this._toggle.apply( this, arguments );
-
- } else if ( fn == null || bool ) {
- this.each(function() {
- var state = bool ? fn : jQuery(this).is(":hidden");
- jQuery(this)[ state ? "show" : "hide" ]();
- });
-
- } else {
- this.animate(genFx("toggle", 3), fn, fn2, callback);
- }
-
- return this;
- },
-
- fadeTo: function( speed, to, easing, callback ) {
- return this.filter(":hidden").css("opacity", 0).show().end()
- .animate({opacity: to}, speed, easing, callback);
- },
-
- animate: function( prop, speed, easing, callback ) {
- var optall = jQuery.speed( speed, easing, callback );
-
- if ( jQuery.isEmptyObject( prop ) ) {
- return this.each( optall.complete, [ false ] );
- }
-
- // Do not change referenced properties as per-property easing will be lost
- prop = jQuery.extend( {}, prop );
-
- function doAnimation() {
- // XXX 'this' does not always have a nodeName when running the
- // test suite
-
- if ( optall.queue === false ) {
- jQuery._mark( this );
- }
-
- var opt = jQuery.extend( {}, optall ),
- isElement = this.nodeType === 1,
- hidden = isElement && jQuery(this).is(":hidden"),
- name, val, p, e, hooks, replace,
- parts, start, end, unit,
- method;
-
- // will store per property easing and be used to determine when an animation is complete
- opt.animatedProperties = {};
-
- // first pass over propertys to expand / normalize
- for ( p in prop ) {
- name = jQuery.camelCase( p );
- if ( p !== name ) {
- prop[ name ] = prop[ p ];
- delete prop[ p ];
- }
-
- if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
- replace = hooks.expand( prop[ name ] );
- delete prop[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'p' from above because we have the correct "name"
- for ( p in replace ) {
- if ( ! ( p in prop ) ) {
- prop[ p ] = replace[ p ];
- }
- }
- }
- }
-
- for ( name in prop ) {
- val = prop[ name ];
- // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
- if ( jQuery.isArray( val ) ) {
- opt.animatedProperties[ name ] = val[ 1 ];
- val = prop[ name ] = val[ 0 ];
- } else {
- opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
- }
-
- if ( val === "hide" && hidden || val === "show" && !hidden ) {
- return opt.complete.call( this );
- }
-
- if ( isElement && ( name === "height" || name === "width" ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( this, "display" ) === "inline" &&
- jQuery.css( this, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
- this.style.display = "inline-block";
-
- } else {
- this.style.zoom = 1;
- }
- }
- }
- }
-
- if ( opt.overflow != null ) {
- this.style.overflow = "hidden";
- }
-
- for ( p in prop ) {
- e = new jQuery.fx( this, opt, p );
- val = prop[ p ];
-
- if ( rfxtypes.test( val ) ) {
-
- // Tracks whether to show or hide based on private
- // data attached to the element
- method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
- if ( method ) {
- jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
- e[ method ]();
- } else {
- e[ val ]();
- }
-
- } else {
- parts = rfxnum.exec( val );
- start = e.cur();
-
- if ( parts ) {
- end = parseFloat( parts[2] );
- unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" ) {
- jQuery.style( this, p, (end || 1) + unit);
- start = ( (end || 1) / e.cur() ) * start;
- jQuery.style( this, p, start + unit);
- }
-
- // If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] ) {
- end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
- }
-
- e.custom( start, end, unit );
-
- } else {
- e.custom( start, val, "" );
- }
- }
- }
-
- // For JS strict compliance
- return true;
- }
-
- return optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
-
- stop: function( type, clearQueue, gotoEnd ) {
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var index,
- hadTimers = false,
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- // clear marker counters if we know they won't be
- if ( !gotoEnd ) {
- jQuery._unmark( true, this );
- }
-
- function stopQueue( elem, data, index ) {
- var hooks = data[ index ];
- jQuery.removeData( elem, index, true );
- hooks.stop( gotoEnd );
- }
-
- if ( type == null ) {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
- stopQueue( this, data, index );
- }
- }
- } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
- stopQueue( this, data, index );
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- if ( gotoEnd ) {
-
- // force the next step to be the last
- timers[ index ]( true );
- } else {
- timers[ index ].saveState();
- }
- hadTimers = true;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( !( gotoEnd && hadTimers ) ) {
- jQuery.dequeue( this, type );
- }
- });
- }
-
-});
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout( clearFxNow, 0 );
- return ( fxNow = jQuery.now() );
-}
-
-function clearFxNow() {
- fxNow = undefined;
-}
-
-// Generate parameters to create a standard animation
-function genFx( type, num ) {
- var obj = {};
-
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
- obj[ this ] = type;
- });
-
- return obj;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx( "show", 1 ),
- slideUp: genFx( "hide", 1 ),
- slideToggle: genFx( "toggle", 1 ),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.extend({
- speed: function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function( noUnmark ) {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- } else if ( noUnmark !== false ) {
- jQuery._unmark( this );
- }
- };
-
- return opt;
- },
-
- easing: {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
- }
- },
-
- timers: [],
-
- fx: function( elem, options, prop ) {
- this.options = options;
- this.elem = elem;
- this.prop = prop;
-
- options.orig = options.orig || {};
- }
-
-});
-
-jQuery.fx.prototype = {
- // Simple function for setting a style value
- update: function() {
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
- },
-
- // Get the current size
- cur: function() {
- if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
- return this.elem[ this.prop ];
- }
-
- var parsed,
- r = jQuery.css( this.elem, this.prop );
- // Empty strings, null, undefined and "auto" are converted to 0,
- // complex values such as "rotate(1rad)" are returned as is,
- // simple values such as "10px" are parsed to Float.
- return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
- },
-
- // Start an animation from one number to another
- custom: function( from, to, unit ) {
- var self = this,
- fx = jQuery.fx;
-
- this.startTime = fxNow || createFxNow();
- this.end = to;
- this.now = this.start = from;
- this.pos = this.state = 0;
- this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
-
- function t( gotoEnd ) {
- return self.step( gotoEnd );
- }
-
- t.queue = this.options.queue;
- t.elem = this.elem;
- t.saveState = function() {
- if ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
- if ( self.options.hide ) {
- jQuery._data( self.elem, "fxshow" + self.prop, self.start );
- } else if ( self.options.show ) {
- jQuery._data( self.elem, "fxshow" + self.prop, self.end );
- }
- }
- };
-
- if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval( fx.tick, fx.interval );
- }
- },
-
- // Simple 'show' function
- show: function() {
- var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
-
- // Remember where we started, so that we can go back to it later
- this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
- this.options.show = true;
-
- // Begin the animation
- // Make sure that we start at a small width/height to avoid any flash of content
- if ( dataShow !== undefined ) {
- // This show is picking up where a previous hide or show left off
- this.custom( this.cur(), dataShow );
- } else {
- this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
- }
-
- // Start by showing the element
- jQuery( this.elem ).show();
- },
-
- // Simple 'hide' function
- hide: function() {
- // Remember where we started, so that we can go back to it later
- this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
- this.options.hide = true;
-
- // Begin the animation
- this.custom( this.cur(), 0 );
- },
-
- // Each step of an animation
- step: function( gotoEnd ) {
- var p, n, complete,
- t = fxNow || createFxNow(),
- done = true,
- elem = this.elem,
- options = this.options;
-
- if ( gotoEnd || t >= options.duration + this.startTime ) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- options.animatedProperties[ this.prop ] = true;
-
- for ( p in options.animatedProperties ) {
- if ( options.animatedProperties[ p ] !== true ) {
- done = false;
- }
- }
-
- if ( done ) {
- // Reset the overflow
- if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
-
- jQuery.each( [ "", "X", "Y" ], function( index, value ) {
- elem.style[ "overflow" + value ] = options.overflow[ index ];
- });
- }
-
- // Hide the element if the "hide" operation was done
- if ( options.hide ) {
- jQuery( elem ).hide();
- }
-
- // Reset the properties, if the item has been hidden or shown
- if ( options.hide || options.show ) {
- for ( p in options.animatedProperties ) {
- jQuery.style( elem, p, options.orig[ p ] );
- jQuery.removeData( elem, "fxshow" + p, true );
- // Toggle data is no longer needed
- jQuery.removeData( elem, "toggle" + p, true );
- }
- }
-
- // Execute the complete function
- // in the event that the complete function throws an exception
- // we must ensure it won't be called twice. #5684
-
- complete = options.complete;
- if ( complete ) {
-
- options.complete = false;
- complete.call( elem );
- }
- }
-
- return false;
-
- } else {
- // classical easing cannot be used with an Infinity duration
- if ( options.duration == Infinity ) {
- this.now = t;
- } else {
- n = t - this.startTime;
- this.state = n / options.duration;
-
- // Perform the easing function, defaults to swing
- this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
- this.now = this.start + ( (this.end - this.start) * this.pos );
- }
- // Perform the next step of the animation
- this.update();
- }
-
- return true;
- }
-};
-
-jQuery.extend( jQuery.fx, {
- tick: function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- },
-
- interval: 13,
-
- stop: function() {
- clearInterval( timerId );
- timerId = null;
- },
-
- speeds: {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
- },
-
- step: {
- opacity: function( fx ) {
- jQuery.style( fx.elem, "opacity", fx.now );
- },
-
- _default: function( fx ) {
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
- } else {
- fx.elem[ fx.prop ] = fx.now;
- }
- }
- }
-});
-
-// Ensure props that can't be negative don't go there on undershoot easing
-jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
- // exclude marginTop, marginLeft, marginBottom and marginRight from this list
- if ( prop.indexOf( "margin" ) ) {
- jQuery.fx.step[ prop ] = function( fx ) {
- jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
- };
- }
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-
-// Try to restore the default display value of an element
-function defaultDisplay( nodeName ) {
-
- if ( !elemdisplay[ nodeName ] ) {
-
- var body = document.body,
- elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
- display = elem.css( "display" );
- elem.remove();
-
- // If the simple way fails,
- // get element's real default display by attaching it to a temp iframe
- if ( display === "none" || display === "" ) {
- // No iframe to use yet, so create it
- if ( !iframe ) {
- iframe = document.createElement( "iframe" );
- iframe.frameBorder = iframe.width = iframe.height = 0;
- }
-
- body.appendChild( iframe );
-
- // Create a cacheable copy of the iframe document on first call.
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
- if ( !iframeDoc || !iframe.createElement ) {
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
- iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" );
- iframeDoc.close();
- }
-
- elem = iframeDoc.createElement( nodeName );
-
- iframeDoc.body.appendChild( elem );
-
- display = jQuery.css( elem, "display" );
- body.removeChild( iframe );
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return elemdisplay[ nodeName ];
-}
-
-
-
-
-var getOffset,
- rtable = /^t(?:able|d|h)$/i,
- rroot = /^(?:body|html)$/i;
-
-if ( "getBoundingClientRect" in document.documentElement ) {
- getOffset = function( elem, doc, docElem, box ) {
- try {
- box = elem.getBoundingClientRect();
- } catch(e) {}
-
- // Make sure we're not dealing with a disconnected DOM node
- if ( !box || !jQuery.contains( docElem, elem ) ) {
- return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
- }
-
- var body = doc.body,
- win = getWindow( doc ),
- clientTop = docElem.clientTop || body.clientTop || 0,
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
- scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
- scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
- top = box.top + scrollTop - clientTop,
- left = box.left + scrollLeft - clientLeft;
-
- return { top: top, left: left };
- };
-
-} else {
- getOffset = function( elem, doc, docElem ) {
- var computedStyle,
- offsetParent = elem.offsetParent,
- prevOffsetParent = elem,
- body = doc.body,
- defaultView = doc.defaultView,
- prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
- top = elem.offsetTop,
- left = elem.offsetLeft;
-
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
- if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
- break;
- }
-
- computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
- top -= elem.scrollTop;
- left -= elem.scrollLeft;
-
- if ( elem === offsetParent ) {
- top += elem.offsetTop;
- left += elem.offsetLeft;
-
- if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
- }
-
- prevOffsetParent = offsetParent;
- offsetParent = elem.offsetParent;
- }
-
- if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
- }
-
- prevComputedStyle = computedStyle;
- }
-
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
- top += body.offsetTop;
- left += body.offsetLeft;
- }
-
- if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
- top += Math.max( docElem.scrollTop, body.scrollTop );
- left += Math.max( docElem.scrollLeft, body.scrollLeft );
- }
-
- return { top: top, left: left };
- };
-}
-
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var elem = this[0],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return null;
- }
-
- if ( elem === doc.body ) {
- return jQuery.offset.bodyOffset( elem );
- }
-
- return getOffset( elem, doc, doc.documentElement );
-};
-
-jQuery.offset = {
-
- bodyOffset: function( body ) {
- var top = body.offsetTop,
- left = body.offsetLeft;
-
- if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
- }
-
- return { top: top, left: left };
- },
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[0] ) {
- return null;
- }
-
- var elem = this[0],
-
- // Get *real* offsetParent
- offsetParent = this.offsetParent(),
-
- // Get correct offsets
- offset = this.offset(),
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
-
- // Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
-
- // Add offsetParent borders
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
-
- // Subtract the two offsets
- return {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.body;
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- jQuery.support.boxModel && win.document.documentElement[ method ] ||
- win.document.body[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-
-
-
-
-// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- var clientProp = "client" + name,
- scrollProp = "scroll" + name,
- offsetProp = "offset" + name;
-
- // innerHeight and innerWidth
- jQuery.fn[ "inner" + name ] = function() {
- var elem = this[0];
- return elem ?
- elem.style ?
- parseFloat( jQuery.css( elem, type, "padding" ) ) :
- this[ type ]() :
- null;
- };
-
- // outerHeight and outerWidth
- jQuery.fn[ "outer" + name ] = function( margin ) {
- var elem = this[0];
- return elem ?
- elem.style ?
- parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
- this[ type ]() :
- null;
- };
-
- jQuery.fn[ type ] = function( value ) {
- return jQuery.access( this, function( elem, type, value ) {
- var doc, docElemProp, orig, ret;
-
- if ( jQuery.isWindow( elem ) ) {
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
- doc = elem.document;
- docElemProp = doc.documentElement[ clientProp ];
- return jQuery.support.boxModel && docElemProp ||
- doc.body && doc.body[ clientProp ] || docElemProp;
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- doc = elem.documentElement;
-
- // when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
- // so we can't use max, as it'll choose the incorrect offset[Width/Height]
- // instead we use the correct client[Width/Height]
- // support:IE6
- if ( doc[ clientProp ] >= doc[ scrollProp ] ) {
- return doc[ clientProp ];
- }
-
- return Math.max(
- elem.body[ scrollProp ], doc[ scrollProp ],
- elem.body[ offsetProp ], doc[ offsetProp ]
- );
- }
-
- // Get width or height on the element
- if ( value === undefined ) {
- orig = jQuery.css( elem, type );
- ret = parseFloat( orig );
- return jQuery.isNumeric( ret ) ? ret : orig;
- }
-
- // Set the width or height on the element
- jQuery( elem ).css( type, value );
- }, type, value, arguments.length, null );
- };
-});
-
-
-
-
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-
-
-})( window );
diff --git a/SDL_Core/src/components/HMI/lib/jquery-1.7.2.min.js b/SDL_Core/src/components/HMI/lib/jquery-1.7.2.min.js
deleted file mode 100644
index 1775c9c03..000000000
--- a/SDL_Core/src/components/HMI/lib/jquery-1.7.2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.2 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
-a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
-.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/locale/eng.js b/SDL_Core/src/components/HMI/locale/eng.js
deleted file mode 100644
index 75c7e200d..000000000
--- a/SDL_Core/src/components/HMI/locale/eng.js
+++ /dev/null
@@ -1,62 +0,0 @@
-SDL.eng = {
-
- view_warning: 'WARNING!',
- view_warning_paragraph1: 'This application is intended to be used as a demonstrative aid only, while the vehicle is parked. Don&apos;t use it while driving.',
- view_warning_paragraph2: 'Use extreme caution when using any device that takes your attention off the road. Ford recommends against the use of any hand-held device while driving and that you comply with all applicable laws. Your primary responsibility is the safe operation of the vehicle.',
-
- view_mediaStatus_entertainment: 'Entertainment',
-
- view_info_alerts_sort: 'Sort By',
-
- view_info_alerts_dateIcon: [
- 'Date', 'Icon'
- ],
- view_info_alerts_911Assist: '911 Assist Set To OFF 2012',
- view_info_alerts_view: 'View',
- view_info_alerts_delete: 'Delete',
- view_info_alerts_deleteAll: 'Delete All',
- view_info_apps_911Assist: '911 Assist',
- view_info_apps_vehicle_VehicleHealthReport: 'Vehicle Health Report',
- view_info_apps_vehicle_InstallApplicationsUp: 'Install Applications/Up',
- view_info_apps_vehicle_FindNewApplications: 'Find New Apps',
- view_info_apps_vehicle_GetDeviceList: 'Change Devices',
-
- view_info_calendar_date: 'Jul, 2012',
- view_info_calendar_today: 'Go to Today',
- view_info_calendar_day1: 'SUN',
- view_info_calendar_day2: 'MON',
- view_info_calendar_day3: 'TUE',
- view_info_calendar_day4: 'WED',
- view_info_calendar_day5: 'THU',
- view_info_calendar_day6: 'FRI',
- view_info_calendar_day7: 'SAT',
-
- view_info_services_syncServices: 'SYNC Services',
- view_info_services_trafficDirectionsAndInformation: 'TRAFFIC, DIRECTIONS AND INFORMATION',
- view_info_services_getTheLatestTrafficRreport: 'Get the latest traffic report',
- view_info_services_findBusinessesAndDownloadSaved: 'Find Businesses and Download Saved ',
- view_info_services_hearPersonalizedInformationMore: 'Hear Personalized Information & More',
- view_info_services_connecttoServices: 'Connect to Services',
- view_info_services_toActivate: 'To activate, log onto www.SyncMyRide.com',
-
- view_info_travelLink_trafficOnRoute: 'Traffic on Route',
- view_info_travelLink_trafficNearby: 'Traffic Nearby',
- view_info_travelLink_fuelPrices: 'Fuel Prices',
- view_info_travelLink_movieListings: 'Movie Listings',
- view_info_travelLink_subscriptionInfo: 'Subscription Info',
- view_info_travelLink_weather: 'Weather',
- view_info_travelLink_sportsInfo: 'Sports Info',
- view_info_travelLink_skiConditions: 'Ski Conditions',
-
- view_info_leftmenu_services: 'Services',
- view_info_leftmenu_travelLink: 'Travel Link',
- view_info_leftmenu_alerts: 'Alerts',
- view_info_leftmenu_calendar: 'Calendar',
- view_info_leftmenu_apps: 'Apps',
-
- view_media_cd: 'CD',
- view_phone_dial: 'Dial',
- view_phone_end: 'End',
- view_phone_phone: 'Phone',
- view_phone_popUp_callEnded: 'Call Ended'
-}; \ No newline at end of file
diff --git a/SDL_Core/src/components/HMI/locale/locale.js b/SDL_Core/src/components/HMI/locale/locale.js
deleted file mode 100644
index 486fe7526..000000000
--- a/SDL_Core/src/components/HMI/locale/locale.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met: ·
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. · Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. · Neither the name of the Ford Motor Company nor the
- * names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * @name SDL.locale
- * @desc SDL localization object
- * @category Localization
- * @filesource locale/locale.js
- * @version 1.0
- */
-
-SDL.locale = Em.Object.create( {
-
- label: SDL[SDL.localization],
-
- setLang: function(lang) {
-
- this.set('label', SDL[SDL.localization]);
- }.observes('SDL.localization')
-}); \ No newline at end of file
diff --git a/SDL_Core/src/components/application_manager/CMakeLists.txt b/SDL_Core/src/components/application_manager/CMakeLists.txt
deleted file mode 100644
index 916d72749..000000000
--- a/SDL_Core/src/components/application_manager/CMakeLists.txt
+++ /dev/null
@@ -1,347 +0,0 @@
-include_directories (
- ./include/
- ../utils/include/
- ../formatters/include/
- ../protocol_handler/include/
- ../smart_objects/include/
- ../hmi_message_handler/include
- ../media_manager/include/
- ../connection_handler/include/
- ../config_profile/include/
- ../request_watchdog/include/
- ../transport_manager/include/
- ../policies/include/
- ../../thirdPartyLibs/jsoncpp/include/
- ../../thirdPartyLibs/encryption/include/
- ../../thirdPartyLibs/MessageBroker/include
- ${CMAKE_BINARY_DIR}/src/components/
-)
-
-set (SOURCES
-./src/application_manager_impl.cc
-./src/message.cc
-./src/application_impl.cc
-./src/mobile_command_factory.cc
-./src/message_helper.cc
-./src/hmi_command_factory.cc
-./src/hmi_capabilities.cc
-./src/application_data_impl.cc
-./src/request_controller.cc
-./src/resume_ctrl.cpp
-./src/mobile_message_handler.cc
-)
-
-set (POLICIES_MANAGER
-./src/policies_manager/policies_manager.cc
-)
-
-set (EVENT_ENGINE
-./src/event_engine/event.cc
-./src/event_engine/event_dispatcher.cc
-./src/event_engine/event_observer.cc
-)
-
-set (MOBILE_COMMANDS_SOURCES
-./src/commands/command_impl.cc
-./src/commands/command_request_impl.cc
-./src/commands/command_response_impl.cc
-./src/commands/command_notification_impl.cc
-./src/commands/pending.cc
-./src/commands/mobile/add_command_request.cc
-./src/commands/mobile/add_command_response.cc
-./src/commands/mobile/add_sub_menu_request.cc
-./src/commands/mobile/add_sub_menu_response.cc
-./src/commands/mobile/alert_request.cc
-./src/commands/mobile/alert_response.cc
-./src/commands/mobile/alert_maneuver_request.cc
-./src/commands/mobile/alert_maneuver_response.cc
-./src/commands/mobile/change_registration_request.cc
-./src/commands/mobile/change_registration_response.cc
-./src/commands/mobile/create_interaction_choice_set_request.cc
-./src/commands/mobile/create_interaction_choice_set_response.cc
-./src/commands/mobile/delete_command_request.cc
-./src/commands/mobile/delete_command_response.cc
-./src/commands/mobile/delete_file_request.cc
-./src/commands/mobile/delete_file_response.cc
-./src/commands/mobile/delete_interaction_choice_set_request.cc
-./src/commands/mobile/delete_interaction_choice_set_response.cc
-./src/commands/mobile/delete_sub_menu_request.cc
-./src/commands/mobile/delete_sub_menu_response.cc
-./src/commands/mobile/dial_number_request.cc
-./src/commands/mobile/encoded_sync_pdata_request.cc
-./src/commands/mobile/encoded_sync_pdata_response.cc
-./src/commands/mobile/end_audio_pass_thru_request.cc
-./src/commands/mobile/end_audio_pass_thru_response.cc
-./src/commands/mobile/generic_response.cc
-./src/commands/mobile/get_dtcs_request.cc
-./src/commands/mobile/get_dtcs_response.cc
-./src/commands/mobile/diagnostic_message_request.cc
-./src/commands/mobile/diagnostic_message_response.cc
-./src/commands/mobile/get_vehicle_data_request.cc
-./src/commands/mobile/get_vehicle_data_response.cc
-./src/commands/mobile/list_files_request.cc
-./src/commands/mobile/list_files_response.cc
-./src/commands/mobile/on_app_interface_unregistered_notification.cc
-./src/commands/mobile/on_audio_pass_thru_notification.cc
-./src/commands/mobile/on_button_event_notification.cc
-./src/commands/mobile/on_button_press_notification.cc
-./src/commands/mobile/on_driver_distraction_notification.cc
-./src/commands/mobile/on_encoded_sync_pdata_notification.cc
-./src/commands/mobile/on_hmi_status_notification.cc
-./src/commands/mobile/on_language_change_notification.cc
-./src/commands/mobile/on_command_notification.cc
-./src/commands/mobile/on_permissions_change_notification.cc
-./src/commands/mobile/on_tbt_client_state_notification.cc
-./src/commands/mobile/on_vehicle_data_notification.cc
-./src/commands/mobile/perform_audio_pass_thru_request.cc
-./src/commands/mobile/perform_audio_pass_thru_response.cc
-./src/commands/mobile/perform_interaction_request.cc
-./src/commands/mobile/perform_interaction_response.cc
-./src/commands/mobile/put_file_request.cc
-./src/commands/mobile/put_file_response.cc
-./src/commands/mobile/read_did_request.cc
-./src/commands/mobile/read_did_response.cc
-./src/commands/mobile/register_app_interface_request.cc
-./src/commands/mobile/register_app_interface_response.cc
-./src/commands/mobile/reset_global_properties_request.cc
-./src/commands/mobile/reset_global_properties_response.cc
-./src/commands/mobile/scrollable_message_request.cc
-./src/commands/mobile/scrollable_message_response.cc
-./src/commands/mobile/set_display_layout_request.cc
-./src/commands/mobile/set_display_layout_response.cc
-./src/commands/mobile/set_global_properties_request.cc
-./src/commands/mobile/set_global_properties_response.cc
-./src/commands/mobile/set_icon_request.cc
-./src/commands/mobile/set_icon_response.cc
-./src/commands/mobile/set_media_clock_timer_request.cc
-./src/commands/mobile/set_media_clock_timer_response.cc
-./src/commands/mobile/show_constant_tbt_request.cc
-./src/commands/mobile/show_constant_tbt_response.cc
-./src/commands/mobile/show_request.cc
-./src/commands/mobile/show_response.cc
-./src/commands/mobile/slider_request.cc
-./src/commands/mobile/slider_response.cc
-./src/commands/mobile/speak_request.cc
-./src/commands/mobile/speak_response.cc
-./src/commands/mobile/subscribe_button_request.cc
-./src/commands/mobile/subscribe_button_response.cc
-./src/commands/mobile/subscribe_vehicle_data_request.cc
-./src/commands/mobile/subscribe_vehicle_data_response.cc
-./src/commands/mobile/unregister_app_interface_request.cc
-./src/commands/mobile/unregister_app_interface_response.cc
-./src/commands/mobile/unsubscribe_button_request.cc
-./src/commands/mobile/unsubscribe_button_response.cc
-./src/commands/mobile/unsubscribe_vehicle_data_request.cc
-./src/commands/mobile/unsubscribe_vehicle_data_response.cc
-./src/commands/mobile/update_turn_list_request.cc
-./src/commands/mobile/update_turn_list_response.cc
-./src/commands/mobile/sync_pdata_request.cc
-./src/commands/mobile/sync_pdata_response.cc
-./src/commands/mobile/system_request.cc
-./src/commands/mobile/system_response.cc
-./src/commands/mobile/on_sync_pdata_notification.cc
-./src/commands/mobile/on_keyboard_input_notification.cc
-./src/commands/mobile/on_touch_event_notification.cc
-./src/commands/mobile/on_system_request_notification.cc
-./src/commands/mobile/on_hash_change_notification.cc
-)
-
-set (HMI_COMMANDS_SOURCES
-./src/commands/hmi/request_to_hmi.cc
-./src/commands/hmi/response_from_hmi.cc
-./src/commands/hmi/notification_to_hmi.cc
-./src/commands/hmi/notification_from_hmi.cc
-./src/commands/hmi/allow_all_apps_request.cc
-./src/commands/hmi/allow_all_apps_response.cc
-./src/commands/hmi/allow_app_request.cc
-./src/commands/hmi/allow_app_response.cc
-./src/commands/hmi/activate_app_request.cc
-./src/commands/hmi/activate_app_response.cc
-./src/commands/hmi/mixing_audio_supported_request.cc
-./src/commands/hmi/mixing_audio_supported_response.cc
-./src/commands/hmi/update_app_list_request.cc
-./src/commands/hmi/update_app_list_response.cc
-./src/commands/hmi/on_update_device_list.cc
-./src/commands/hmi/update_device_list_request.cc
-./src/commands/hmi/update_device_list_response.cc
-./src/commands/hmi/on_exit_all_applications_notification.cc
-./src/commands/hmi/on_exit_application_notification.cc
-./src/commands/hmi/on_start_device_discovery.cc
-./src/commands/hmi/close_popup_request.cc
-./src/commands/hmi/close_popup_response.cc
-./src/commands/hmi/on_app_activated_notification.cc
-./src/commands/hmi/button_get_capabilities_request.cc
-./src/commands/hmi/button_get_capabilities_response.cc
-./src/commands/hmi/vr_is_ready_request.cc
-./src/commands/hmi/vr_is_ready_response.cc
-./src/commands/hmi/vr_add_command_request.cc
-./src/commands/hmi/vr_add_command_response.cc
-./src/commands/hmi/vr_delete_command_request.cc
-./src/commands/hmi/vr_delete_command_response.cc
-./src/commands/hmi/vr_change_registration_request.cc
-./src/commands/hmi/vr_change_registration_response.cc
-./src/commands/hmi/vr_get_supported_languages_request.cc
-./src/commands/hmi/vr_get_supported_languages_response.cc
-./src/commands/hmi/vr_get_language_request.cc
-./src/commands/hmi/vr_get_language_response.cc
-./src/commands/hmi/vr_get_capabilities_request.cc
-./src/commands/hmi/vr_get_capabilities_response.cc
-./src/commands/hmi/tts_is_ready_request.cc
-./src/commands/hmi/tts_is_ready_response.cc
-./src/commands/hmi/tts_change_registration_request.cc
-./src/commands/hmi/tts_change_registration_response.cc
-./src/commands/hmi/tts_get_language_request.cc
-./src/commands/hmi/tts_get_language_response.cc
-./src/commands/hmi/tts_get_supported_languages_request.cc
-./src/commands/hmi/tts_get_supported_languages_response.cc
-./src/commands/hmi/tts_stop_speaking_request.cc
-./src/commands/hmi/tts_stop_speaking_response.cc
-./src/commands/hmi/tts_speak_request.cc
-./src/commands/hmi/tts_speak_response.cc
-./src/commands/hmi/tts_set_global_properties_request.cc
-./src/commands/hmi/tts_set_global_properties_response.cc
-./src/commands/hmi/tts_get_capabilities_request.cc
-./src/commands/hmi/tts_get_capabilities_response.cc
-./src/commands/hmi/tts_perform_interaction_request.cc
-./src/commands/hmi/tts_perform_interaction_response.cc
-./src/commands/hmi/ui_add_command_request.cc
-./src/commands/hmi/ui_add_command_response.cc
-./src/commands/hmi/ui_delete_command_request.cc
-./src/commands/hmi/ui_delete_command_response.cc
-./src/commands/hmi/ui_add_submenu_request.cc
-./src/commands/hmi/ui_add_submenu_response.cc
-./src/commands/hmi/ui_delete_submenu_request.cc
-./src/commands/hmi/ui_delete_submenu_response.cc
-./src/commands/hmi/ui_get_supported_languages_request.cc
-./src/commands/hmi/ui_get_supported_languages_response.cc
-./src/commands/hmi/ui_get_language_request.cc
-./src/commands/hmi/ui_get_language_response.cc
-./src/commands/hmi/ui_get_capabilities_request.cc
-./src/commands/hmi/ui_get_capabilities_response.cc
-./src/commands/hmi/ui_change_registration_request.cc
-./src/commands/hmi/ui_change_registration_response.cc
-./src/commands/hmi/ui_show_request.cc
-./src/commands/hmi/ui_show_response.cc
-./src/commands/hmi/ui_alert_request.cc
-./src/commands/hmi/ui_alert_response.cc
-./src/commands/hmi/ui_slider_request.cc
-./src/commands/hmi/ui_scrollable_message_request.cc
-./src/commands/hmi/ui_scrollable_message_response.cc
-./src/commands/hmi/ui_set_global_properties_request.cc
-./src/commands/hmi/ui_set_global_properties_response.cc
-./src/commands/hmi/ui_slider_response.cc
-./src/commands/hmi/ui_is_ready_request.cc
-./src/commands/hmi/ui_is_ready_response.cc
-./src/commands/hmi/ui_perform_audio_pass_thru_request.cc
-./src/commands/hmi/ui_perform_audio_pass_thru_response.cc
-./src/commands/hmi/ui_end_audio_pass_thru_request.cc
-./src/commands/hmi/ui_end_audio_pass_thru_response.cc
-./src/commands/hmi/ui_perform_interaction_request.cc
-./src/commands/hmi/ui_perform_interaction_response.cc
-./src/commands/hmi/ui_set_icon_request.cc
-./src/commands/hmi/ui_set_icon_response.cc
-./src/commands/hmi/ui_set_media_clock_timer_request.cc
-./src/commands/hmi/ui_set_media_clock_timer_response.cc
-./src/commands/hmi/ui_show_request.cc
-./src/commands/hmi/ui_show_response.cc
-./src/commands/hmi/vi_is_ready_request.cc
-./src/commands/hmi/vi_is_ready_response.cc
-./src/commands/hmi/vi_read_did_request.cc
-./src/commands/hmi/vi_read_did_response.cc
-./src/commands/hmi/vi_get_dtcs_request.cc
-./src/commands/hmi/vi_get_dtcs_response.cc
-./src/commands/hmi/vi_diagnostic_message_request.cc
-./src/commands/hmi/vi_diagnostic_message_response.cc
-./src/commands/hmi/vi_get_vehicle_type_request.cc
-./src/commands/hmi/vi_get_vehicle_type_response.cc
-./src/commands/hmi/navi_is_ready_request.cc
-./src/commands/hmi/navi_is_ready_response.cc
-./src/commands/hmi/navi_alert_maneuver_request.cc
-./src/commands/hmi/navi_alert_maneuver_response.cc
-./src/commands/hmi/navi_update_turn_list_request.cc
-./src/commands/hmi/navi_update_turn_list_response.cc
-./src/commands/hmi/navi_show_constant_tbt_request.cc
-./src/commands/hmi/navi_show_constant_tbt_response.cc
-./src/commands/hmi/on_ready_notification.cc
-./src/commands/hmi/on_system_context_notification.cc
-./src/commands/hmi/on_device_chosen_notification.cc
-./src/commands/hmi/on_update_device_list.cc
-./src/commands/hmi/on_app_registered_notification.cc
-./src/commands/hmi/on_app_unregistered_notification.cc
-./src/commands/hmi/on_driver_distraction_notification.cc
-./src/commands/hmi/on_play_tone_notification.cc
-./src/commands/hmi/on_tts_started_notification.cc
-./src/commands/hmi/on_tts_stopped_notification.cc
-./src/commands/hmi/on_vr_started_notification.cc
-./src/commands/hmi/on_vr_stopped_notification.cc
-./src/commands/hmi/on_vr_command_notification.cc
-./src/commands/hmi/on_ui_command_notification.cc
-./src/commands/hmi/on_navi_tbt_client_state_notification.cc
-./src/commands/hmi/on_app_deactivated_notification.cc
-./src/commands/hmi/on_tts_language_change_notification.cc
-./src/commands/hmi/on_vr_language_change_notification.cc
-./src/commands/hmi/on_ui_language_change_notification.cc
-./src/commands/hmi/on_button_event_notification.cc
-./src/commands/hmi/on_button_press_notification.cc
-./src/commands/hmi/on_show_notification.cc
-./src/commands/hmi/on_find_applications.cc
-./src/commands/hmi/on_ui_keyboard_input_notification.cc
-./src/commands/hmi/on_ui_touch_event_notification.cc
-./src/commands/hmi/on_ui_reset_timeout_notification.cc
-./src/commands/hmi/navi_start_stream_request.cc
-./src/commands/hmi/navi_start_stream_response.cc
-./src/commands/hmi/navi_stop_stream_request.cc
-./src/commands/hmi/navi_stop_stream_response.cc
-./src/commands/hmi/audio_start_stream_request.cc
-./src/commands/hmi/audio_start_stream_response.cc
-./src/commands/hmi/audio_stop_stream_request.cc
-./src/commands/hmi/audio_stop_stream_response.cc
-./src/commands/hmi/on_system_request_notification.cc
-./src/commands/hmi/ui_set_display_layout_request.cc
-./src/commands/hmi/ui_set_display_layout_response.cc
-./src/commands/hmi/on_sdl_close_notification.cc
-)
-
-set (HMI_COMMANDS_SOURCES_WEBHMI
-./src/commands/hmi/vi_get_vehicle_data_request.cc
-./src/commands/hmi/vi_get_vehicle_data_response.cc
-./src/commands/hmi/vi_subscribe_vehicle_data_request.cc
-./src/commands/hmi/vi_subscribe_vehicle_data_response.cc
-./src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
-./src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
-./src/commands/hmi/on_vi_vehicle_data_notification.cc
-)
-
-set (HMI_COMMANDS_SOURCES_QTHMI
-./src/commands/hmi/on_vi_gps_data_notification.cc
-./src/commands/hmi/on_vi_speed_notification.cc
-./src/commands/hmi/on_vi_rpm_notification.cc
-./src/commands/hmi/on_vi_fuel_level_notification.cc
-./src/commands/hmi/on_vi_fuel_level_state_notification.cc
-./src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
-./src/commands/hmi/on_vi_external_temperature_notification.cc
-./src/commands/hmi/on_vi_vin_notification.cc
-./src/commands/hmi/on_vi_prndl_notification.cc
-./src/commands/hmi/on_vi_tire_pressure_notification.cc
-./src/commands/hmi/on_vi_odometer_notification.cc
-./src/commands/hmi/on_vi_belt_status_notification.cc
-./src/commands/hmi/on_vi_body_information_notification.cc
-./src/commands/hmi/on_vi_device_status_notification.cc
-./src/commands/hmi/on_vi_driver_braking_notification.cc
-./src/commands/hmi/on_vi_wiper_status_notification.cc
-./src/commands/hmi/on_vi_head_lamp_status_notification.cc
-./src/commands/hmi/on_vi_engine_torque_notification.cc
-./src/commands/hmi/on_vi_acc_pedal_position_notification.cc
-./src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
-./src/commands/hmi/on_vi_my_key_notification.cc
-)
-
-if (${WEB_HMI})
- set (HMI_COMMANDS_SOURCES ${HMI_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES_WEBHMI})
-endif (${WEB_HMI})
-if (${QT_HMI})
- set (HMI_COMMANDS_SOURCES ${HMI_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES_QTHMI})
-endif (${QT_HMI})
-
-add_library("ApplicationManager" ${SOURCES} ${MOBILE_COMMANDS_SOURCES} ${HMI_COMMANDS_SOURCES} ${POLICIES_MANAGER} ${EVENT_ENGINE})
-target_link_libraries ("ApplicationManager" log4cxx)
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/application.h b/SDL_Core/src/components/application_manager/include/application_manager/application.h
deleted file mode 100644
index 06f69348b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/application.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_H_
-
-#include <string>
-#include <map>
-#include "utils/shared_ptr.h"
-#include "interfaces/MOBILE_API.h"
-#include "connection_handler/device.h"
-#include <set>
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace application_manager {
-
-namespace mobile_api = mobile_apis;
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-typedef int32_t ErrorCode;
-
-enum APIVersion {
- kUnknownAPI = -1,
- kAPIV1 = 1,
- kAPIV2 = 2
-};
-
-struct Version {
- APIVersion min_supported_api_version;
- APIVersion max_supported_api_version;
-
- Version()
- : min_supported_api_version(APIVersion::kUnknownAPI),
- max_supported_api_version(APIVersion::kUnknownAPI) {
- }
-};
-
-struct AppFile {
- // need to use in std::map;
- AppFile() {
- }
- AppFile(const std::string& name, bool persistent, bool download_complete,
- mobile_apis::FileType::eType type)
- : is_persistent(persistent),
- is_download_complete(download_complete),
- file_name(name),
- file_type(type){
- }
- std::string file_name;
- bool is_persistent;
- bool is_download_complete;
- mobile_apis::FileType::eType file_type;
-};
-typedef std::map<std::string, AppFile> AppFilesMap;
-class InitialApplicationData {
- public:
- virtual ~InitialApplicationData() {
- }
-
- virtual const smart_objects::SmartObject* app_types() const = 0;
- virtual const smart_objects::SmartObject* vr_synonyms() const = 0;
- virtual const smart_objects::SmartObject* mobile_app_id() const = 0;
- virtual const smart_objects::SmartObject* tts_name() const = 0;
- virtual const smart_objects::SmartObject* ngn_media_screen_name() const = 0;
- virtual const mobile_api::Language::eType& language() const = 0;
- virtual const mobile_api::Language::eType& ui_language() const = 0;
- virtual void set_app_types(const smart_objects::SmartObject& app_types) = 0;
- virtual void set_vr_synonyms(
- const smart_objects::SmartObject& vr_synonyms) = 0;
- virtual void set_mobile_app_id(
- const smart_objects::SmartObject& mobile_app_id) = 0;
- virtual void set_tts_name(const smart_objects::SmartObject& tts_name) = 0;
- virtual void set_ngn_media_screen_name(
- const smart_objects::SmartObject& ngn_name) = 0;
- virtual void set_language(const mobile_api::Language::eType& language) = 0;
- virtual void set_ui_language(
- const mobile_api::Language::eType& ui_language) = 0;
-};
-
-/*
- * @brief Typedef for supported commands in application menu
- */
-typedef std::map<uint32_t, smart_objects::SmartObject*> CommandsMap;
-
-/*
- * @brief Typedef for supported sub menu in application menu
- */
-typedef std::map<uint32_t, smart_objects::SmartObject*> SubMenuMap;
-
-/*
- * @brief Typedef for interaction choice set
- */
-typedef std::map<uint32_t, smart_objects::SmartObject*> ChoiceSetMap;
-
-/*
- * @brief Typedef for perform interaction choice set
- */
-typedef std::map<uint32_t, smart_objects::SmartObject*> PerformChoiceSetMap;
-
-class DynamicApplicationData {
- public:
- virtual ~DynamicApplicationData() {
- }
- virtual const smart_objects::SmartObject* help_prompt() const = 0;
- virtual const smart_objects::SmartObject* timeout_prompt() const = 0;
- virtual const smart_objects::SmartObject* vr_help_title() const = 0;
- virtual const smart_objects::SmartObject* vr_help() const = 0;
- virtual const mobile_api::TBTState::eType& tbt_state() const = 0;
- virtual const smart_objects::SmartObject* show_command() const = 0;
- virtual const smart_objects::SmartObject* tbt_show_command() const = 0;
- virtual const std::set<mobile_apis::ButtonName::eType>& SubscribedButtons() const = 0;
- virtual const std::set<uint32_t>& SubscribesIVI() const = 0;
- virtual const smart_objects::SmartObject* keyboard_props() const = 0;
-
- virtual void set_help_prompt(
- const smart_objects::SmartObject& help_prompt) = 0;
- virtual void set_timeout_prompt(
- const smart_objects::SmartObject& timeout_prompt) = 0;
- virtual void set_vr_help_title(
- const smart_objects::SmartObject& vr_help_title) = 0;
- virtual void reset_vr_help_title() = 0;
- virtual void set_vr_help(const smart_objects::SmartObject& vr_help) = 0;
- virtual void reset_vr_help() = 0;
- virtual void set_tbt_state(const mobile_api::TBTState::eType& tbt_state) = 0;
- virtual void set_show_command(
- const smart_objects::SmartObject& show_command) = 0;
- virtual void set_tbt_show_command(
- const smart_objects::SmartObject& tbt_show) = 0;
- virtual void set_keyboard_props(
- const smart_objects::SmartObject& keyboard_props) = 0;
-
- /*
- * @brief Adds a command to the in application menu
- */
- virtual void AddCommand(uint32_t cmd_id,
- const smart_objects::SmartObject& command) = 0;
-
- /*
- * @brief Deletes all commands from the application
- * menu with the specified command id
- */
- virtual void RemoveCommand(uint32_t cmd_id) = 0;
-
- /*
- * @brief Finds command with the specified command id
- */
- virtual smart_objects::SmartObject* FindCommand(uint32_t cmd_id) = 0;
-
- /*
- * @brief Adds a menu to the application
- */
- virtual void AddSubMenu(uint32_t menu_id,
- const smart_objects::SmartObject& menu) = 0;
-
- /*
- * @brief Deletes menu from the application menu
- */
- virtual void RemoveSubMenu(uint32_t menu_id) = 0;
-
- /*
- * @brief Finds menu with the specified id
- */
- virtual smart_objects::SmartObject* FindSubMenu(
- uint32_t menu_id) const = 0;
-
- /*
- * @brief Returns true if sub menu with such name already exist
- */
- virtual bool IsSubMenuNameAlreadyExist(const std::string& name) = 0;
-
- /*
- * @brief Adds a interaction choice set to the application
- *
- * @param choice_set_id Unique ID used for this interaction choice set
- * @param choice_set SmartObject that represent choice set
- */
- virtual void AddChoiceSet(uint32_t choice_set_id,
- const smart_objects::SmartObject& choice_set) = 0;
-
- /*
- * @brief Deletes choice set from the application
- *
- * @param choice_set_id Unique ID of the interaction choice set
- */
- virtual void RemoveChoiceSet(uint32_t choice_set_id) = 0;
-
- /*
- * @brief Finds choice set with the specified choice_set_id id
- *
- * @param choice_set_id Unique ID of the interaction choice set
- */
- virtual smart_objects::SmartObject* FindChoiceSet(
- uint32_t choice_set_id) = 0;
-
- /*
- * @brief Adds perform interaction choice set to the application
- *
- * @param choice_set_id Unique ID used for this interaction choice set
- * @param choice_set SmartObject that represents choice set
- */
- virtual void AddPerformInteractionChoiceSet(
- uint32_t choice_set_id,
- const smart_objects::SmartObject& choice_set) = 0;
-
- /*
- * @brief Deletes entirely perform interaction choice set map
- *
- */
- virtual void DeletePerformInteractionChoiceSetMap() = 0;
-
- /*
- * @brief Retrieves entirely ChoiceSet - VR commands map
- *
- * @return ChoiceSet map that is currently in use
- */
- virtual const PerformChoiceSetMap&
- performinteraction_choice_set_map() const = 0;
-
- /*
- * @brief Retrieves choice set that is currently in use by perform
- * interaction
- *
- * @param choice_set_id Unique ID of the interaction choice set
- *
- * @return SmartObject that represents choice set
- */
- virtual smart_objects::SmartObject* FindPerformInteractionChoiceSet(
- uint32_t choice_set_id) const = 0;
-
- /*
- * @brief Retrieve application commands
- */
- virtual const CommandsMap& commands_map() const = 0;
-
- /*
- * @brief Retrieve application sub menus
- */
- virtual const SubMenuMap& sub_menu_map() const = 0;
-
- /*
- * @brief Retrieve application choice set map
- */
- virtual const ChoiceSetMap& choice_set_map() const = 0;
-
- /*
- * @brief Sets perform interaction state
- *
- * @param active Current state of the perform interaction
- */
- virtual void set_perform_interaction_active(uint32_t active) = 0;
-
- /*
- * @brief Retrieves perform interaction state
- *
- * @return TRUE if perform interaction active, otherwise FALSE
- */
- virtual uint32_t is_perform_interaction_active() const = 0;
-
- /*
- * @brief Sets the choice that was selected in
- * response to PerformInteraction
- *
- * @param choice Choice that was selected
- */
- virtual void set_perform_interaction_ui_corrid(uint32_t choice) = 0;
-
- /*
- * @brief Retrieve the choice that was selected in
- * response to PerformInteraction
- *
- * @return Choice that was selected in response to PerformInteraction
- */
- virtual uint32_t perform_interaction_ui_corrid() const = 0;
-
- /*
- * @brief Sets the mode for perform interaction: UI/VR/BOTH
- *
- * @param mode Mode that was selected (MENU; VR; BOTH)
- */
- virtual void set_perform_interaction_mode(int32_t mode) = 0;
-
- /*
- * @brief Retrieve the mode that was PerformInteraction sent in
- *
- * @return mode of PerformInteraction
- */
- virtual int32_t perform_interaction_mode() const = 0;
-
- /*
- * @brief Sets reset global properties state
- *
- * @param active Current state of the reset global properties
- */
- virtual void set_reset_global_properties_active(bool active) = 0;
-
- /*
- * @brief Retrieves reset global properties state
- *
- * @return TRUE if perform interaction active, otherwise FALSE
- */
- virtual bool is_reset_global_properties_active() const = 0;
-};
-
-class Application : public virtual InitialApplicationData,
- public virtual DynamicApplicationData {
- public:
- virtual ~Application() {
- }
-
- /**
- * @brief Returns message belonging to the application
- * that is currently executed (i.e. on HMI).
- * @return smart_objects::SmartObject * Active message
- */
- virtual const smart_objects::SmartObject* active_message() const = 0;
-
- /**
- * @brief Change Hash value and return it
- * @return next Hash value
- */
- virtual uint32_t nextHash() = 0;
-
- /**
- * @brief returns cuurent hash value
- * @return current Hash value
- */
- virtual uint32_t curHash() const = 0;
-
- /**
- * @brief Change Hash for current application
- * and send notification to mobile
- * @return updated_hash
- */
- virtual uint32_t UpdateHash() = 0;
-
- virtual void CloseActiveMessage() = 0;
- virtual bool IsFullscreen() const = 0;
- virtual bool MakeFullscreen() = 0;
- virtual bool IsAudible() const = 0;
- virtual void MakeNotAudible() = 0;
- virtual bool allowed_support_navigation() const = 0;
- virtual void set_allowed_support_navigation(bool allow) = 0;
- virtual bool hmi_supports_navi_streaming() const = 0;
- virtual void set_hmi_supports_navi_streaming(const bool& supports) = 0;
- virtual bool app_allowed() const = 0;
- virtual bool has_been_activated() const = 0;
-
- virtual const Version& version() const = 0;
- virtual uint32_t app_id() const = 0;
- virtual const std::string& name() const = 0;
- virtual bool is_media_application() const = 0;
- virtual const mobile_api::HMILevel::eType& hmi_level() const = 0;
- virtual const uint32_t put_file_in_none_count() const = 0;
- virtual const uint32_t delete_file_in_none_count() const = 0;
- virtual const uint32_t list_files_in_none_count() const = 0;
- virtual const mobile_api::SystemContext::eType& system_context() const = 0;
- virtual const mobile_api::AudioStreamingState::eType&
- audio_streaming_state() const = 0;
- virtual const std::string& app_icon_path() const = 0;
- virtual connection_handler::DeviceHandle device() const = 0;
- virtual void set_tts_speak_state(bool state_tts_speak) = 0;
- virtual void set_version(const Version& version) = 0;
- virtual void set_name(const std::string& name) = 0;
- virtual void set_is_media_application(bool is_media) = 0;
- virtual void set_hmi_level(const mobile_api::HMILevel::eType& hmi_level) = 0;
- virtual void increment_put_file_in_none_count() = 0;
- virtual void increment_delete_file_in_none_count() = 0;
- virtual void increment_list_files_in_none_count() = 0;
- virtual void set_system_context(
- const mobile_api::SystemContext::eType& system_context) = 0;
- virtual void set_audio_streaming_state(
- const mobile_api::AudioStreamingState::eType& state) = 0;
- virtual bool set_app_icon_path(const std::string& file_name) = 0;
- virtual void set_app_allowed(const bool& allowed) = 0;
- virtual void set_device(connection_handler::DeviceHandle device) = 0;
-
- virtual bool AddFile(AppFile& file) = 0;
- virtual const AppFilesMap& getAppFiles() const = 0;
-
- /**
- * @brief Updates fields of existing file
- * @param file_name File name, that need to update
- * @param is_persistent Bollean describes is file persistent?
- * @param is_download_complete Bollean describes is file downloaded fully on need to finish downloading?
- * @return TRUE if file exist and updated sucsesfuly, othervise return false
- */
- virtual bool UpdateFile(AppFile& file) = 0;
- virtual bool DeleteFile(const std::string& file_name) = 0;
-
- virtual bool SubscribeToButton(mobile_apis::ButtonName::eType btn_name) = 0;
- virtual bool IsSubscribedToButton(mobile_apis::ButtonName::eType btn_name) = 0;
- virtual bool UnsubscribeFromButton(mobile_apis::ButtonName::eType btn_name) = 0;
-
- virtual bool SubscribeToIVI(uint32_t vehicle_info_type_) = 0;
- virtual bool IsSubscribedToIVI(uint32_t vehicle_info_type_) = 0;
- virtual bool UnsubscribeFromIVI(uint32_t vehicle_info_type_) = 0;
-};
-
-typedef utils::SharedPtr<Application> ApplicationSharedPtr;
-typedef utils::SharedPtr<const Application> ApplicationConstSharedPtr;
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/application_data_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/application_data_impl.h
deleted file mode 100644
index ac16a65da..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/application_data_impl.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_DATA_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_DATA_IMPL_H_
-
-#include <string>
-#include "smart_objects/smart_object.h"
-#include "application_manager/application.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace mobile_api = mobile_apis;
-
-class InitialApplicationDataImpl : public virtual Application {
- public:
- InitialApplicationDataImpl();
- ~InitialApplicationDataImpl();
-
- const smart_objects::SmartObject* app_types() const;
- const smart_objects::SmartObject* vr_synonyms() const;
- const smart_objects::SmartObject* mobile_app_id() const;
- const smart_objects::SmartObject* tts_name() const;
- const smart_objects::SmartObject* ngn_media_screen_name() const;
- const mobile_api::Language::eType& language() const;
- const mobile_api::Language::eType& ui_language() const;
- void set_app_types(const smart_objects::SmartObject& app_types);
- void set_vr_synonyms(const smart_objects::SmartObject& vr_synonyms);
- void set_mobile_app_id(const smart_objects::SmartObject& mobile_app_id);
- void set_tts_name(const smart_objects::SmartObject& tts_name);
- void set_ngn_media_screen_name(const smart_objects::SmartObject& ngn_name);
- void set_language(const mobile_api::Language::eType& language);
- void set_ui_language(const mobile_api::Language::eType& ui_language);
-
- protected:
- smart_objects::SmartObject* app_types_;
- smart_objects::SmartObject* vr_synonyms_;
- smart_objects::SmartObject* mobile_app_id_;
- smart_objects::SmartObject* tts_name_;
- smart_objects::SmartObject* ngn_media_screen_name_;
- mobile_api::Language::eType language_;
- mobile_api::Language::eType ui_language_;
- private:
- DISALLOW_COPY_AND_ASSIGN(InitialApplicationDataImpl);
-};
-
-class DynamicApplicationDataImpl : public virtual Application {
- public:
- DynamicApplicationDataImpl();
- ~DynamicApplicationDataImpl();
- const smart_objects::SmartObject* help_prompt() const;
- const smart_objects::SmartObject* timeout_prompt() const;
- const smart_objects::SmartObject* vr_help_title() const;
- const smart_objects::SmartObject* vr_help() const;
- const mobile_api::TBTState::eType& tbt_state() const;
- const smart_objects::SmartObject* show_command() const;
- const smart_objects::SmartObject* tbt_show_command() const;
- const smart_objects::SmartObject* keyboard_props() const;
-
- void set_help_prompt(const smart_objects::SmartObject& help_prompt);
- void set_timeout_prompt(const smart_objects::SmartObject& timeout_prompt);
- void set_vr_help_title(const smart_objects::SmartObject& vr_help_title);
- void reset_vr_help_title();
- void set_vr_help(const smart_objects::SmartObject& vr_help);
- void reset_vr_help();
- void set_tbt_state(const mobile_api::TBTState::eType& tbt_state);
- void set_show_command(const smart_objects::SmartObject& show_command);
- void set_tbt_show_command(const smart_objects::SmartObject& tbt_show);
- void set_keyboard_props(const smart_objects::SmartObject& keyboard_props);
-
- /*
- * @brief Adds a command to the in application menu
- */
- void AddCommand(uint32_t cmd_id,
- const smart_objects::SmartObject& command);
-
- /*
- * @brief Deletes all commands from the application menu with the specified command id
- */
- void RemoveCommand(uint32_t cmd_id);
-
- /*
- * @brief Finds command with the specified command id
- */
- smart_objects::SmartObject* FindCommand(uint32_t cmd_id);
-
- /*
- * @brief Adds a menu to the application
- */
- void AddSubMenu(uint32_t menu_id, const smart_objects::SmartObject& menu);
-
- /*
- * @brief Deletes menu from the application menu
- */
- void RemoveSubMenu(uint32_t menu_id);
-
- /*
- * @brief Finds menu with the specified id
- */
- smart_objects::SmartObject* FindSubMenu(uint32_t menu_id) const;
-
- /*
- * @brief Returns true if sub menu with such name already exist
- */
- bool IsSubMenuNameAlreadyExist(const std::string& name);
-
- /*
- * @brief Adds a interaction choice set to the application
- *
- * @param choice_set_id Unique ID used for this interaction choice set
- * @param choice_set SmartObject that represent choice set
- */
- void AddChoiceSet(uint32_t choice_set_id,
- const smart_objects::SmartObject& choice_set);
-
- /*
- * @brief Deletes choice set from the application
- *
- * @param choice_set_id Unique ID of the interaction choice set
- */
- void RemoveChoiceSet(uint32_t choice_set_id);
-
- /*
- * @brief Finds choice set with the specified choice_set_id id
- *
- * @param choice_set_id Unique ID of the interaction choice set
- */
- smart_objects::SmartObject* FindChoiceSet(uint32_t choice_set_id);
-
- /*
- * @brief Adds perform interaction choice set to the application
- *
- * @param choice_set_id Unique ID used for this interaction choice set
- * @param choice_set SmartObject that represents choice set
- */
- void AddPerformInteractionChoiceSet(
- uint32_t choice_set_id, const smart_objects::SmartObject& choice_set);
-
- /*
- * @brief Deletes entirely perform interaction choice set map
- *
- */
- void DeletePerformInteractionChoiceSetMap();
-
- /*
- * @brief Retrieves entirely ChoiceSet - VR commands map
- *
- * @return ChoiceSet map that is currently in use
- */
- inline const PerformChoiceSetMap& performinteraction_choice_set_map() const;
-
- /*
- * @brief Retrieves choice set that is currently in use by perform
- * interaction
- *
- * @param choice_set_id Unique ID of the interaction choice set
- *
- * @return SmartObject that represents choice set
- */
- smart_objects::SmartObject* FindPerformInteractionChoiceSet(
- uint32_t choice_set_id) const;
-
- /*
- * @brief Retrieve application commands
- */
- inline const CommandsMap& commands_map() const;
-
- /*
- * @brief Retrieve application sub menus
- */
- inline const SubMenuMap& sub_menu_map() const;
-
- /*
- * @brief Retrieve application choice set map
- */
- inline const ChoiceSetMap& choice_set_map() const;
-
- /*
- * @brief Sets perform interaction state
- *
- * @param active Current state of the perform interaction
- */
- void set_perform_interaction_active(uint32_t active);
-
- /*
- * @brief Retrieves perform interaction state
- *
- * @return TRUE if perform interaction active, otherwise FALSE
- */
- inline uint32_t is_perform_interaction_active() const;
-
- /*
- * @brief Sets the choice that was selected in
- * response to PerformInteraction
- *
- * @param choice Choice that was selected
- */
- void set_perform_interaction_ui_corrid(uint32_t corr_id);
-
- /*
- * @brief Retrieve the choice that was selected in
- * response to PerformInteraction
- *
- * @return Choice that was selected in response to PerformInteraction
- */
- inline uint32_t perform_interaction_ui_corrid() const;
- /*
- * @brief Sets the mode for perform interaction: UI/VR/BOTH
- *
- * @param mode Mode that was selected (MENU; VR; BOTH)
- */
- void set_perform_interaction_mode(int32_t mode);
-
- /*
- * @brief Retrieve the mode that was PerformInteraction sent in
- *
- * @return mode of PerformInteraction
- */
- inline int32_t perform_interaction_mode() const;
-
- /*
- * @brief Sets reset global properties state
- *
- * @param active Current state of the reset global properties
- */
- void set_reset_global_properties_active(bool active);
-
- /*
- * @brief Retrieves reset global properties state
- *
- * @return TRUE if perform interaction active, otherwise FALSE
- */
- inline bool is_reset_global_properties_active() const;
-
- protected:
- smart_objects::SmartObject* help_prompt_;
- smart_objects::SmartObject* timeout_prompt_;
- smart_objects::SmartObject* vr_help_title_;
- smart_objects::SmartObject* vr_help_;
- mobile_api::TBTState::eType tbt_state_;
- smart_objects::SmartObject* show_command_;
- smart_objects::SmartObject* tbt_show_command_;
- smart_objects::SmartObject* keyboard_props_;
-
-
- CommandsMap commands_;
- SubMenuMap sub_menu_;
- ChoiceSetMap choice_set_map_;
- PerformChoiceSetMap performinteraction_choice_set_map_;
- int32_t perform_interaction_mode_;
- uint32_t is_perform_interaction_active_;
- uint32_t perform_interaction_ui_corrid_;
- bool is_reset_global_properties_active_;
- private:
- DISALLOW_COPY_AND_ASSIGN(DynamicApplicationDataImpl);
-};
-
-const CommandsMap& DynamicApplicationDataImpl::commands_map() const {
- return commands_;
-}
-
-const SubMenuMap& DynamicApplicationDataImpl::sub_menu_map() const {
- return sub_menu_;
-}
-
-const ChoiceSetMap& DynamicApplicationDataImpl::choice_set_map() const {
- return choice_set_map_;
-}
-
-uint32_t DynamicApplicationDataImpl::is_perform_interaction_active() const {
- return is_perform_interaction_active_;
-}
-
-uint32_t DynamicApplicationDataImpl::perform_interaction_ui_corrid() const {
- return perform_interaction_ui_corrid_;
-}
-
-bool DynamicApplicationDataImpl::is_reset_global_properties_active() const {
- return is_reset_global_properties_active_;
-}
-
-const PerformChoiceSetMap&
-DynamicApplicationDataImpl::performinteraction_choice_set_map() const {
- return performinteraction_choice_set_map_;
-}
-
-inline int32_t DynamicApplicationDataImpl::perform_interaction_mode() const {
- return perform_interaction_mode_;
-}
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_DATA_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/application_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/application_impl.h
deleted file mode 100644
index 8216af88c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/application_impl.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_IMPL_H_
-
-#include <map>
-#include <set>
-#include <vector>
-#include "application_manager/application_data_impl.h"
-#include "connection_handler/device.h"
-
-namespace application_manager {
-
-namespace mobile_api = mobile_apis;
-
-class ApplicationImpl : public virtual InitialApplicationDataImpl,
- public virtual DynamicApplicationDataImpl {
- public:
- explicit ApplicationImpl(uint32_t application_id);
- ~ApplicationImpl();
-
- /**
- * @brief Returns message belonging to the application
- * that is currently executed (i.e. on HMI).
- * @return smart_objects::SmartObject * Active message
- */
- const smart_objects::SmartObject* active_message() const;
- void CloseActiveMessage();
- bool IsFullscreen() const;
- bool MakeFullscreen();
- bool IsAudible() const;
- void MakeNotAudible();
- bool allowed_support_navigation() const;
- void set_allowed_support_navigation(bool allow);
- bool hmi_supports_navi_streaming() const ;
- void set_hmi_supports_navi_streaming(const bool& supports);
- inline bool app_allowed() const;
- bool has_been_activated() const;
-
- const Version& version() const;
- inline uint32_t app_id() const;
- const std::string& name() const;
- bool is_media_application() const;
- const mobile_api::HMILevel::eType& hmi_level() const;
- const uint32_t put_file_in_none_count() const;
- const uint32_t delete_file_in_none_count() const;
- const uint32_t list_files_in_none_count() const;
- const mobile_api::SystemContext::eType& system_context() const;
- inline const mobile_api::AudioStreamingState::eType&
- audio_streaming_state() const;
- const std::string& app_icon_path() const;
- connection_handler::DeviceHandle device() const;
- void set_tts_speak_state(bool state_tts_speak);
- void set_version(const Version& ver);
- void set_name(const std::string& name);
- void set_is_media_application(bool is_media);
- void set_hmi_level(const mobile_api::HMILevel::eType& hmi_level);
- void increment_put_file_in_none_count();
- void increment_delete_file_in_none_count();
- void increment_list_files_in_none_count();
- void set_system_context(
- const mobile_api::SystemContext::eType& system_context);
- void set_audio_streaming_state(
- const mobile_api::AudioStreamingState::eType& state);
- bool set_app_icon_path(const std::string& path);
- void set_app_allowed(const bool& allowed);
- void set_device(connection_handler::DeviceHandle device);
-
- bool AddFile(AppFile& file);
- bool UpdateFile(AppFile& file);
-
- bool DeleteFile(const std::string& file_name);
- virtual const AppFilesMap& getAppFiles() const;
-
- bool SubscribeToButton(mobile_apis::ButtonName::eType btn_name);
- bool IsSubscribedToButton(mobile_apis::ButtonName::eType btn_name);
- bool UnsubscribeFromButton(mobile_apis::ButtonName::eType btn_name);
-
- bool SubscribeToIVI(uint32_t vehicle_info_type_);
- bool IsSubscribedToIVI(uint32_t vehicle_info_type_);
- bool UnsubscribeFromIVI(uint32_t vehicle_info_type_);
-
- virtual const std::set<mobile_apis::ButtonName::eType>& SubscribedButtons() const;
- virtual const std::set<uint32_t>& SubscribesIVI() const;
-
- virtual uint32_t nextHash();
- virtual uint32_t curHash() const;
-
- /**
- * @brief Change Hash for current application
- * and send notification to mobile
- * @return updated_hash
- */
- virtual uint32_t UpdateHash();
-
-
- protected:
- void CleanupFiles();
-
- private:
-
- uint32_t hash_val_;
-
- smart_objects::SmartObject* active_message_;
-
- Version version_;
- uint32_t app_id_;
- std::string app_name_;
- bool is_media_;
- bool allowed_support_navigation_;
- bool is_app_allowed_;
- bool has_been_activated_;
- bool tts_speak_state_;
- bool hmi_supports_navi_streaming_;
-
- mobile_api::HMILevel::eType hmi_level_;
- uint32_t put_file_in_none_count_;
- uint32_t delete_file_in_none_count_;
- uint32_t list_files_in_none_count_;
- mobile_api::SystemContext::eType system_context_;
- mobile_api::AudioStreamingState::eType audio_streaming_state_;
- std::string app_icon_path_;
- connection_handler::DeviceHandle device_;
-
- AppFilesMap app_files_;
- std::set<mobile_apis::ButtonName::eType> subscribed_buttons_;
- std::set<uint32_t> subscribed_vehicle_info_;
- DISALLOW_COPY_AND_ASSIGN(ApplicationImpl);
-};
-
-uint32_t ApplicationImpl::app_id() const {
- return app_id_;
-}
-
-const mobile_api::AudioStreamingState::eType&
-ApplicationImpl::audio_streaming_state() const {
- return audio_streaming_state_;
-}
-
-bool ApplicationImpl::app_allowed() const {
- return is_app_allowed_;
-}
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/application_manager.h b/SDL_Core/src/components/application_manager/include/application_manager/application_manager.h
deleted file mode 100644
index 1f1a6739e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/application_manager.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
-
-#include <set>
-#include "hmi_message_handler/hmi_message_handler.h"
-#include "connection_handler/connection_handler.h"
-#include "protocol_handler/protocol_handler.h"
-
-namespace policies {
- class PolicyManager;
-} // namespace policies
-
-namespace application_manager {
-
-class Application;
-class HMIMatrix;
-class PoliciesManager;
-
-class ApplicationManager {
- public:
- virtual ~ApplicationManager() {
- }
-
- /**
- * @brief Stop work.
- *
- * @return TRUE on success otherwise FALSE.
- **/
- virtual bool Stop() = 0;
-
- virtual void set_hmi_message_handler(
- hmi_message_handler::HMIMessageHandler* handler) = 0;
- virtual void set_protocol_handler(
- protocol_handler::ProtocolHandler* handler) = 0;
- virtual void set_connection_handler(
- connection_handler::ConnectionHandler* handler) = 0;
- virtual void set_policy_manager(
- policies::PolicyManager* policy_manager) = 0;
-
- protected:
- virtual void CreateHMIMatrix(HMIMatrix* matrix) = 0;
- virtual void CreatePoliciesManager(PoliciesManager* managaer) = 0;
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/application_manager_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/application_manager_impl.h
deleted file mode 100644
index fdb6894c9..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ /dev/null
@@ -1,610 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_H_
-
-#include <cstdint>
-#include <vector>
-#include <map>
-#include <set>
-#include "application_manager/hmi_command_factory.h"
-#include "application_manager/application_manager.h"
-#include "application_manager/hmi_capabilities.h"
-#include "application_manager/message.h"
-#include "application_manager/policies_manager/policies_manager.h"
-#include "application_manager/request_controller.h"
-#include "application_manager/resume_ctrl.h"
-#include "protocol_handler/protocol_observer.h"
-#include "hmi_message_handler/hmi_message_observer.h"
-
-#include "media_manager/media_manager_impl.h"
-
-#include "connection_handler/connection_handler_observer.h"
-#include "connection_handler/device.h"
-
-#include "formatters/CSmartFactory.hpp"
-
-#include "interfaces/HMI_API.h"
-#include "interfaces/HMI_API_schema.h"
-#include "interfaces/MOBILE_API_schema.h"
-
-#include "interfaces/v4_protocol_v1_2_no_extra.h"
-#include "interfaces/v4_protocol_v1_2_no_extra_schema.h"
-
-#include "protocol_handler/service_type.h"
-
-#include "utils/macro.h"
-#include "utils/logger.h"
-#include "utils/shared_ptr.h"
-#include "utils/message_queue.h"
-#include "utils/prioritized_queue.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/message_loop_thread.h"
-#include "utils/lock.h"
-#include "utils/singleton.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-namespace threads {
-class Thread;
-}
-class CommandNotificationImpl;
-
-namespace application_manager {
-namespace mobile_api = mobile_apis;
-
-class ApplicationManagerImpl;
-
-namespace impl {
-using namespace threads;
-
-/*
- * These dummy classes are here to locally impose strong typing on different
- * kinds of messages
- * Currently there is no type difference between incoming and outgoing messages
- * And due to ApplicationManagerImpl works as message router it has to distinguish
- * messages passed from it's different connection points
- * TODO(ik): replace these with globally defined message types
- * when we have them.
- */
-struct MessageFromMobile: public utils::SharedPtr<Message> {
- explicit MessageFromMobile(const utils::SharedPtr<Message>& message):
- utils::SharedPtr<Message>(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const { return (*this)->Priority().OrderingValue(); }
-};
-
-struct MessageToMobile: public utils::SharedPtr<Message> {
- explicit MessageToMobile(const utils::SharedPtr<Message>& message,
- bool final_message):
- utils::SharedPtr<Message>(message), is_final(final_message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const { return (*this)->Priority().OrderingValue(); }
- // Signals if connection to mobile must be closed after sending this message
- bool is_final;
- };
-
-struct MessageFromHmi: public utils::SharedPtr<Message> {
- explicit MessageFromHmi(const utils::SharedPtr<Message>& message):
- utils::SharedPtr<Message>(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const { return (*this)->Priority().OrderingValue(); }
-};
-
-struct MessageToHmi: public utils::SharedPtr<Message> {
- explicit MessageToHmi(const utils::SharedPtr<Message>& message):
- utils::SharedPtr<Message>(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const { return (*this)->Priority().OrderingValue(); }
-};
-
-// Short type names for proiritized message queues
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<MessageFromMobile> > FromMobileQueue;
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<MessageToMobile> > ToMobileQueue;
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<MessageFromHmi> > FromHmiQueue;
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<MessageToHmi> > ToHmiQueue;
-}
-
-class ApplicationManagerImpl : public ApplicationManager,
- public hmi_message_handler::HMIMessageObserver,
- public protocol_handler::ProtocolObserver,
- public connection_handler::ConnectionHandlerObserver,
- public impl::FromMobileQueue::Handler,
- public impl::ToMobileQueue::Handler,
- public impl::FromHmiQueue::Handler,
- public impl::ToHmiQueue::Handler,
- public utils::Singleton<ApplicationManagerImpl> {
- friend class ResumeCtrl;
- public:
- ~ApplicationManagerImpl();
-
- /**
- * @brief Stop work.
- *
- * @return TRUE on success otherwise FALSE.
- **/
- virtual bool Stop();
-
- /////////////////////////////////////////////////////
-
- ApplicationSharedPtr application(int32_t app_id) const;
- inline const std::set<ApplicationSharedPtr>& applications() const;
- ApplicationSharedPtr active_application() const;
- std::vector<ApplicationSharedPtr> applications_by_button(uint32_t button);
- std::vector<ApplicationSharedPtr> applications_by_ivi(uint32_t vehicle_info);
- std::vector<ApplicationSharedPtr> applications_with_navi();
-
- /////////////////////////////////////////////////////
-
- HMICapabilities& hmi_capabilities();
-
- ApplicationSharedPtr RegisterApplication(
- const utils::SharedPtr<smart_objects::SmartObject>& request_for_registration);
- /*
- * @brief Closes application by id
- *
- * @param app_id Application id
- * @param is_resuming describes - is this unregister
- * is normal or need to be resumed
- */
- void UnregisterApplication(const uint32_t& app_id, bool is_resuming = false);
-
- /*
- * @brief Sets unregister reason for closing all registered applications
- * duringHU switching off
- *
- * @param reason Describes the reason for HU switching off
- */
- void SetUnregisterAllApplicationsReason(
- mobile_api::AppInterfaceUnregisteredReason::eType reason);
-
- /*
- * @brief Closes all registered applications
- */
- void UnregisterAllApplications();
-
- bool RemoveAppDataFromHMI(ApplicationSharedPtr app);
- bool LoadAppDataToHMI(ApplicationSharedPtr app);
- bool ActivateApplication(ApplicationSharedPtr app);
- /**
- * @brief Put application in Limited HMI Level if possible,
- * otherwise put applicatuion other HMI level.
- * do not send any notifications to mobile
- * @param app, application, that need to be puted in Limeted
- * @return seted HMI Level
- */
- mobile_api::HMILevel::eType PutApplicationInLimited(ApplicationSharedPtr app);
-
- /**
- * @brief Put application in FULL HMI Level if possible,
- * otherwise put applicatuion other HMI level.
- * do not send any notifications to mobile
- * @param app, application, that need to be puted in FULL
- * @return seted HMI Level
- */
- mobile_api::HMILevel::eType PutApplicationInFull(ApplicationSharedPtr app);
-
- void DeactivateApplication(ApplicationSharedPtr app);
- void ConnectToDevice(uint32_t id);
- void OnHMIStartedCooperation();
-
- /*
- * @brief Returns unique correlation ID for HMI request
- *
- * @return Unique correlation ID
- */
- uint32_t GetNextHMICorrelationID();
-
- /* @brief Starts audio passthru process
- *
- * @return true on success, false if passthru is already in process
- */
- bool begin_audio_pass_thru();
-
- /*
- * @brief Finishes already started audio passthru process
- *
- * @return true on success, false if passthru is not active
- */
- bool end_audio_pass_thru();
-
- /*
- * @brief Retrieves driver distraction state
- *
- * @return Current state of the distraction state
- */
- inline bool driver_distraction() const;
-
- /*
- * @brief Sets state for driver distraction
- *
- * @param state New state to be set
- */
- void set_driver_distraction(bool is_distracting);
-
- /*
- * @brief Retrieves if VR session has started
- *
- * @return Current VR session state (started, stopped)
- */
- inline bool vr_session_started() const;
-
- /*
- * @brief Sets VR session state
- *
- * @param state Current HMI VR session state
- */
- void set_vr_session_started(const bool& state);
-
- /*
- * @brief Retrieves SDL access to all mobile apps
- *
- * @return Currently active state of the access
- */
- inline bool all_apps_allowed() const;
-
- /*
- * @brief Sets SDL access to all mobile apps
- *
- * @param allowed SDL access to all mobile apps
- */
- void set_all_apps_allowed(const bool& allowed);
-
- /*
- * @brief Starts audio pass thru thread
- *
- * @param session_key Session key of connection for Mobile side
- * @param correlation_id Correlation id for response for Mobile side
- * @param max_duration Max duration of audio recording in milliseconds
- * @param sampling_rate Value for rate(8, 16, 22, 44 kHz)
- * @param bits_per_sample The quality the audio is recorded.
- * @param audio_type Type of audio data
- */
- void StartAudioPassThruThread(int32_t session_key, int32_t correlation_id,
- int32_t max_duration, int32_t sampling_rate,
- int32_t bits_per_sample, int32_t audio_type);
-
- /*
- * @brief Terminates audio pass thru thread
- * @param application_key Id of application for which
- * audio pass thru should be stopped
- */
- void StopAudioPassThru(int32_t application_key);
-
- void SendAudioPassThroughNotification(uint32_t session_key,
- std::vector<uint8_t> binaryData);
-
- std::string GetDeviceName(connection_handler::DeviceHandle handle);
-
- /////////////////////////////////////////////////////
-
- void set_hmi_message_handler(hmi_message_handler::HMIMessageHandler* handler);
- void set_connection_handler(connection_handler::ConnectionHandler* handler);
- virtual void set_policy_manager(policies::PolicyManager* policy_manager);
- void set_protocol_handler(protocol_handler::ProtocolHandler* handler);
-
- ///////////////////////////////////////////////////////
-
- void StartDevicesDiscovery();
-
- // Put message to the queue to be sent to mobile.
- // if |final_message| parameter is set connection to mobile will be closed
- // after processing this message
- void SendMessageToMobile(
- const utils::SharedPtr<smart_objects::SmartObject>& message, bool final_message = false);
- bool ManageMobileCommand(
- const utils::SharedPtr<smart_objects::SmartObject>& message);
- void SendMessageToHMI(
- const utils::SharedPtr<smart_objects::SmartObject>& message);
- bool ManageHMICommand(
- const utils::SharedPtr<smart_objects::SmartObject>& message);
-
- /////////////////////////////////////////////////////////
- /*
- * @brief Overriden ProtocolObserver method
- */
- virtual void OnMessageReceived(const protocol_handler::
- RawMessagePtr& message);
-
- /*
- * @brief Overriden ProtocolObserver method
- */
- virtual void OnMobileMessageSent(const protocol_handler::
- RawMessagePtr& message);
-
- void OnMessageReceived(
- hmi_message_handler::MessageSharedPointer message);
- void OnErrorSending(hmi_message_handler::MessageSharedPointer message);
-
- void OnDeviceListUpdated(const connection_handler::DeviceList& device_list);
- void RemoveDevice(const connection_handler::DeviceHandle& device_handle);
- bool OnServiceStartedCallback(const connection_handler::DeviceHandle& device_handle,
- const int32_t& session_key,
- const protocol_handler::ServiceType& type);
- void OnServiceEndedCallback(const int32_t& session_key,
- const protocol_handler::ServiceType& type);
-
- /**
- * @ Add notification to collection
- *
- * @param ptr Reference to shared pointer that point on hmi notification
- */
- void addNotification(const CommandSharedPtr& ptr);
-
- /**
- * @ Add notification to collection
- *
- * @param ptr Reference to shared pointer that point on hmi notification
- */
- void removeNotification(const CommandSharedPtr& ptr);
-
- /**
- * @ Updates request timeout
- *
- * @param connection_key Connection key of application
- * @param mobile_correlation_id Correlation ID of the mobile request
- * @param new_timeout_value New timeout to be set
- */
- void updateRequestTimeout(uint32_t connection_key,
- uint32_t mobile_correlation_id,
- uint32_t new_timeout_value);
-
- /*
- * @brief Retrieves application id associated whith correlation id
- *
- * @param correlation_id Correlation ID of the HMI request
- *
- * @return application id associated whith correlation id
- */
- const uint32_t application_id(const int32_t correlation_id);
-
- /*
- * @brief Sets application id correlation id
- *
- * @param correlation_id Correlation ID of the HMI request
- * @param app_id Application ID
- */
- void set_application_id(const int32_t correlation_id,
- const uint32_t app_id);
-
- /*
- * @brief Change AudioStreamingState for all application according to
- * system audio-mixing capabilities (NOT_AUDIBLE/ATTENUATED) and
- * send notification for this changes
- */
- void Mute();
-
- /*
- * @brief Change AudioStreamingState for all application to AUDIBLE and
- * send notification for this changes
- */
- void Unmute();
-
- /*
- * @brief Checks HMI level and returns true if audio streaming is allowed
- */
- bool IsAudioStreamingAllowed(uint32_t connection_key) const;
-
- /*
- * @brief Checks HMI level and returns true if video streaming is allowed
- */
- bool IsVideoStreamingAllowed(uint32_t connection_key) const;
-
- /**
- * Getter for resume_controller
- * @return Resume Controller
- */
- ResumeCtrl& resume_controller() { return resume_ctrl_; }
-
- /*
- * @brief Save binary data to specified directory
- *
- * @param application name
- * @param binary file name
- * @param binary data
- * @param path for saving data
- * @param offset for saving data to existing file with offset. If offset is 0 - create new file ( overrite existing )
- *
- * @return SUCCESS if file was saved, other code otherwise
- */
- mobile_apis::Result::eType SaveBinary(
- const std::string& app_name,
- const std::vector<uint8_t>& binary_data,
- const std::string& save_path,
- const uint32_t offset = 0);
-
- private:
- ApplicationManagerImpl();
- bool InitThread(threads::Thread* thread);
- hmi_apis::HMI_API& hmi_so_factory();
- mobile_apis::MOBILE_API& mobile_so_factory();
-
- void CreateHMIMatrix(HMIMatrix* matrix);
- void CreatePoliciesManager(PoliciesManager* managaer);
-
- /**
- * \brief Performs check using PoliciesManager of availability
- * of the message for the application. If error occured it is sent
- * as response to initiator of request.
- * \param message Message received for application
- * \param application Application that recieved message to be checked by policies
- * \return bool Indicates whether message is allowed for application
- */
- bool CheckPolicies(smart_objects::SmartObject* message,
- ApplicationSharedPtr app);
-
- /**
- * \brief Using HMIMatrix checks which messages sent to HMI are of higher priority
- * and acts accordingly (closes message with lower priority,
- * rejects message in case message with higher priority is operating on HMI).
- * If error occured it is sent as response to initiator of request.
- * \param message Message received for application
- * \return bool Indicates whether message is allowed for application
- */
- bool CheckHMIMatrix(smart_objects::SmartObject* message);
-
- bool ConvertMessageToSO(const Message& message,
- smart_objects::SmartObject& output);
- bool ConvertSOtoMessage(const smart_objects::SmartObject& message,
- Message& output);
- utils::SharedPtr<Message> ConvertRawMsgToMessage(
- const protocol_handler::RawMessagePtr& message);
-
- void ProcessMessageFromMobile(const utils::SharedPtr<Message>& message);
- void ProcessMessageFromHMI(const utils::SharedPtr<Message>& message);
-
- // threads::MessageLoopThread<*>::Handler implementations
- /*
- * @brief Handles for threads pumping different types
- * of messages. Beware, each is called on different thread!
- */
- // CALLED ON messages_from_mobile_ thread!
- virtual void Handle(const impl::MessageFromMobile& message) OVERRIDE;
-
- // CALLED ON messages_to_mobile_ thread!
- virtual void Handle(const impl::MessageToMobile& message) OVERRIDE;
-
- // CALLED ON messages_from_hmi_ thread!
- virtual void Handle(const impl::MessageFromHmi& message) OVERRIDE;
-
- // CALLED ON messages_to_hmi_ thread!
- virtual void Handle(const impl::MessageToHmi& message) OVERRIDE;
-
- private:
-
-
- // members
- ResumeCtrl resume_ctrl_;
-
- /**
- * @brief Resume controler is responcible for save and load information
- * about persistent application data on disk, and save session ID for resuming
- * application in case INGITION_OFF or MASTER_RESSET
- */
-
- /**
- * @brief Map of connection keys and associated applications
- */
- std::map<int32_t, ApplicationSharedPtr> applications_;
-
- /**
- * @brief List of applications
- */
- std::set<ApplicationSharedPtr> application_list_;
-
- /**
- * @brief Set of HMI notifications with timeout.
- */
- std::list<CommandSharedPtr> notification_list_;
-
- /**
- * @brief Map of correlation id and associated application id.
- */
- std::map<const int32_t, const uint32_t> appID_list_;
-
- bool audio_pass_thru_active_;
- sync_primitives::Lock audio_pass_thru_lock_;
- bool is_distracting_driver_;
- bool is_vr_session_strated_;
- bool hmi_cooperating_;
- bool is_all_apps_allowed_;
- media_manager::MediaManager* media_manager_;
-
- hmi_message_handler::HMIMessageHandler* hmi_handler_;
- connection_handler::ConnectionHandler* connection_handler_;
- protocol_handler::ProtocolHandler* protocol_handler_;
- policies::PolicyManager* policy_manager_;
- request_controller::RequestController request_ctrl_;
- HMICapabilities hmi_capabilities_;
-
- // TODO(YS): Remove old implementation
- policies_manager::PoliciesManager policies_manager_;
-
- hmi_apis::HMI_API* hmi_so_factory_;
- mobile_apis::MOBILE_API* mobile_so_factory_;
-
- static log4cxx::LoggerPtr logger_;
-
- static uint32_t corelation_id_;
- static const uint32_t max_corelation_id_;
-
- // The reason of HU shutdown
- mobile_api::AppInterfaceUnregisteredReason::eType unregister_reason_;
-
- // Construct message threads when everything is already created
-
- // Thread that pumps messages coming from mobile side.
- impl::FromMobileQueue messages_from_mobile_;
- // Thread that pumps messages being passed to mobile side.
- impl::ToMobileQueue messages_to_mobile_;
- // Thread that pumps messages coming from HMI.
- impl::FromHmiQueue messages_from_hmi_;
- // Thread that pumps messages being passed to HMI.
- impl::ToHmiQueue messages_to_hmi_;
-
- // Lock for applications list
- sync_primitives::Lock applications_list_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(ApplicationManagerImpl);
-
- FRIEND_BASE_SINGLETON_CLASS(ApplicationManagerImpl);
-};
-
-const std::set<ApplicationSharedPtr>& ApplicationManagerImpl::applications() const {
- return application_list_;
-}
-
-bool ApplicationManagerImpl::vr_session_started() const {
- return is_vr_session_strated_;
-}
-
-bool ApplicationManagerImpl::driver_distraction() const {
- return is_distracting_driver_;
-}
-
-inline bool ApplicationManagerImpl::all_apps_allowed() const {
- return is_all_apps_allowed_;
-}
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/command.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/command.h
deleted file mode 100644
index 843a20bbb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/command.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_H_
-
-#include "utils/shared_ptr.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace application_manager {
-
-/**
- * @brief SmartObject type
- **/
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-typedef utils::SharedPtr<smart_objects::SmartObject> MessageSharedPtr;
-
-namespace commands {
-
-/**
- * @brief Base command class
- **/
-class Command {
- public:
- /**
- * @brief Command initialization function
- **/
- virtual bool Init() = 0;
-
- /**
- * @brief Execute command
- **/
- virtual void Run() = 0;
-
- /**
- * @brief Free resources
- **/
- virtual bool CleanUp() = 0;
-
- /**
- * \brief Command class destructor
- **/
- virtual ~Command() {}
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/command_impl.h
deleted file mode 100644
index 8fab40efd..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_impl.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_IMPL_H_
-
-#include "application_manager/commands/command.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-extern log4cxx::LoggerPtr logger_;
-
-/**
- * @brief Class is intended to encapsulate RPC as an object
- **/
-class CommandImpl : public Command {
- public:
- /**
- * @brief CommandImpl class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit CommandImpl(const MessageSharedPtr& message);
-
- /**
- * @brief CommandImpl class destructor
- *
- **/
- virtual ~CommandImpl();
-
- /**
- * @brief Init required by command resources
- **/
- virtual bool Init();
-
- /**
- * @brief Cleanup all resources used by command
- **/
- virtual bool CleanUp();
-
- /**
- * @brief Execute corresponding command by calling the action on reciever
- **/
- virtual void Run();
-
- // members
- static const int32_t hmi_protocol_type_;
- static const int32_t mobile_protocol_type_;
- static const int32_t protocol_version_;
-
- protected:
- MessageSharedPtr message_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CommandImpl);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_notification_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/command_notification_impl.h
deleted file mode 100644
index 7d0d11af8..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_notification_impl.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_NOTIFICATION_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_NOTIFICATION_IMPL_H_
-
-#include "application_manager/commands/command_impl.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace application_manager {
-
-namespace commands {
-
-class CommandNotificationImpl : public CommandImpl {
- public:
- explicit CommandNotificationImpl(const MessageSharedPtr& message);
- virtual ~CommandNotificationImpl();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendNotification();
- private:
- DISALLOW_COPY_AND_ASSIGN(CommandNotificationImpl);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_NOTIFICATION_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/command_request_impl.h
deleted file mode 100644
index 008894b22..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_request_impl.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_REQUEST_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_REQUEST_IMPL_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/event_engine/event_observer.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/lock.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace application_manager {
-
-namespace commands {
-
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
-
-class CommandRequestImpl : public CommandImpl,
- public event_engine::EventObserver {
- public:
-
- enum RequestState {
- kAwaitingHMIResponse = 0,
- kTimedOut,
- kCompleted
- };
-
- explicit CommandRequestImpl(const MessageSharedPtr& message);
- virtual ~CommandRequestImpl();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
-
- /*
- * @brief Function is called by RequestController when request execution time
- * has exceed it's limit
- *
- */
- virtual void onTimeOut();
-
- /**
- * @brief Default EvenObserver's pure virtual method implementation
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Retrieves request default timeout.
- * If request has a custom timeout, request_timeout_ should be reassign to it
- *
- * @return Request default timeout
- */
- inline unsigned int default_timeout() const;
-
- /*
- * @brief Retrieves request ID
- */
- inline int function_id() const;
-
- /*
- * @brief Retrieves correlation ID
- */
- inline int correlation_id() const;
-
- /*
- * @brief Retrieves connection key
- */
- inline int connection_key() const;
-
- /*
- * @brief Creates Mobile response
- *
- * @param success true if successful; false, if failed
- * @param result_code Result code (SUCCESS, INVALID_DATA, e.t.c)
- * @param info Provides additional human readable info regarding the result
- * @param response_params Additional params in response
- */
- void SendResponse(const bool success,
- const mobile_apis::Result::eType& result_code,
- const char* info = NULL,
- const NsSmart::SmartObject* response_params = NULL);
-
- /**
- * @brief Check syntax of string from mobile
- * @param str - string that need to be checked
- * @param allow_empty_string if true methos allow empty sting
- * @return true if succes otherwise return false
- */
- bool CheckSyntax(std::string str, bool allow_empty_line = false);
-
- /*
- * @brief Sends HMI request
- *
- * @param function_id HMI request ID
- * @param msg_params HMI request msg params
- * @param use_events true if we need subscribe on event(HMI request)
- *
- */
- void SendHMIRequest(const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject* msg_params = NULL,
- bool use_events = false);
-
- /*
- * @brief Creates HMI request
- *
- * @param function_id HMI request ID
- * @param msg_params HMI request msg params
- */
- void CreateHMINotification(const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const;
-
- protected:
- unsigned int default_timeout_;
- RequestState current_state_;
- sync_primitives::Lock state_lock_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CommandRequestImpl);
-};
-
-unsigned int CommandRequestImpl::default_timeout() const {
- return default_timeout_;
-}
-
-int CommandRequestImpl::function_id() const {
- return (*message_)[strings::params][strings::function_id].asInt();
-}
-
-int CommandRequestImpl::correlation_id() const {
- return (*message_)[strings::params][strings::correlation_id].asInt();
-}
-
-int CommandRequestImpl::connection_key() const {
- return (*message_)[strings::params][strings::connection_key].asInt();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_REQUEST_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_response_impl.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/command_response_impl.h
deleted file mode 100644
index 0c93bf54d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/command_response_impl.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_RESPONSE_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_RESPONSE_IMPL_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace application_manager {
-
-namespace commands {
-
-class CommandResponseImpl : public CommandImpl {
- public:
- explicit CommandResponseImpl(const MessageSharedPtr& message);
- virtual ~CommandResponseImpl();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendResponse(bool successe,
- const mobile_apis::Result::eType& result_code =
- mobile_apis::Result::INVALID_ENUM,
- bool final_message = false);
- private:
- DISALLOW_COPY_AND_ASSIGN(CommandResponseImpl);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_COMMAND_RESPONSE_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
deleted file mode 100644
index 1329178c3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ActivateAppRequest command class
- **/
-class ActivateAppRequest : public RequestToHMI {
- public:
- /**
- * @brief ActivateAppRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ActivateAppRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ActivateAppRequest class destructor
- **/
- virtual ~ActivateAppRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ActivateAppRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
deleted file mode 100644
index 1df9bc095..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/activate_app_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ActivateAppResponse command class
- **/
-class ActivateAppResponse : public ResponseFromHMI {
- public:
- /**
- * @brief ActivateAppResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ActivateAppResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ActivateAppResponse class destructor
- **/
- virtual ~ActivateAppResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ActivateAppResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ACTIVATE_APP_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
deleted file mode 100644
index 6c2db489c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAllAppsRequest command class
- **/
-class AllowAllAppsRequest : public RequestToHMI {
- public:
- /**
- * @brief AllowAllAppsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AllowAllAppsRequest(const MessageSharedPtr& message);
-
- /**
- * @brief AllowAllAppsRequest class destructor
- **/
- virtual ~AllowAllAppsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAllAppsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
deleted file mode 100644
index 0eb8184fa..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_all_apps_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAllAppsResponse command class
- **/
-class AllowAllAppsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AllowAllAppsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AllowAllAppsResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AllowAllAppsResponse class destructor
- **/
- virtual ~AllowAllAppsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAllAppsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_ALL_APPS_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
deleted file mode 100644
index 91228440a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAppRequest command class
- **/
-class AllowAppRequest : public RequestToHMI {
- public:
- /**
- * @brief AllowAppRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AllowAppRequest(const MessageSharedPtr& message);
-
- /**
- * @brief AllowAppRequest class destructor
- **/
- virtual ~AllowAppRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAppRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
deleted file mode 100644
index 5a24ac1a7..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/allow_app_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AllowAppResponse command class
- **/
-class AllowAppResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AllowAppResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AllowAppResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AllowAppResponse class destructor
- **/
- virtual ~AllowAppResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAppResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ALLOW_APP_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_request.h
deleted file mode 100644
index 39a3ecab4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_START_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_START_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AudioStartStreamRequest command class
- **/
-class AudioStartStreamRequest : public RequestToHMI {
- public:
- /**
- * @brief AudioStartStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AudioStartStreamRequest(const MessageSharedPtr& message);
-
- /**
- * @brief OnNaviStartStreamRequest class destructor
- **/
- virtual ~AudioStartStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStartStreamRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_START_STREAM_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_response.h
deleted file mode 100644
index 8b816eb82..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_start_stream_response.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_START_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_START_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AudioStartStreamResponse command class
- **/
-class AudioStartStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AudioStartStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AudioStartStreamResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AudioStartStreamResponse class destructor
- **/
- virtual ~AudioStartStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStartStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_START_STREAM_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_request.h
deleted file mode 100644
index c5a1e7543..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_request.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_STOP_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_STOP_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AudioStopStreamRequest command class
- **/
-class AudioStopStreamRequest : public RequestToHMI {
- public:
- /**
- * @brief AudioStopStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AudioStopStreamRequest(const MessageSharedPtr& message);
-
- /**
- * @brief NaviStopStreamRequest class destructor
- **/
- virtual ~AudioStopStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStopStreamRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_STOP_STREAM_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_response.h
deleted file mode 100644
index 972892469..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/audio_stop_stream_response.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_STOP_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_STOP_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStopStreamResponse command class
- **/
-class AudioStopStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief AudioStopStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AudioStopStreamResponse(const MessageSharedPtr& message);
-
- /**
- * @brief OnNaviStopStreamResponse class destructor
- **/
- virtual ~AudioStopStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioStopStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_AUDIO_STOP_STREAM_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
deleted file mode 100644
index 3c9fbac68..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ButtonGetCapabilitiesRequest command class
- **/
-class ButtonGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief ButtonGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ButtonGetCapabilitiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ButtonGetCapabilitiesRequest class destructor
- **/
- virtual ~ButtonGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
deleted file mode 100644
index 067954537..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/button_get_capabilities_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ButtonGetCapabilitiesResponse command class
- **/
-class ButtonGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief ButtonGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ButtonGetCapabilitiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ButtonGetCapabilitiesResponse class destructor
- **/
- virtual ~ButtonGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_BUTTON_GET_CAPABILITIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
deleted file mode 100644
index 72ff8a2c5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ClosePopupRequest command class
- **/
-class ClosePopupRequest : public RequestToHMI {
- public:
- /**
- * @brief ClosePopupRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ClosePopupRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ClosePopupRequest class destructor
- **/
- virtual ~ClosePopupRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ClosePopupRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
deleted file mode 100644
index 05318e3cb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/close_popup_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP__RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP__RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ClosePopupResponse command class
- **/
-class ClosePopupResponse : public ResponseFromHMI {
- public:
- /**
- * @brief ClosePopupResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ClosePopupResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ClosePopupResponse class destructor
- **/
- virtual ~ClosePopupResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ClosePopupResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_CLOSE_POPUP__RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
deleted file mode 100644
index 905b5b383..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief MixingAudioSupportedRequest command class
- **/
-class MixingAudioSupportedRequest : public RequestToHMI {
- public:
- /**
- * @brief MixingAudioSupportedRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit MixingAudioSupportedRequest(const MessageSharedPtr& message);
-
- /**
- * @brief MixingAudioSupportedRequest class destructor
- **/
- virtual ~MixingAudioSupportedRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MixingAudioSupportedRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
deleted file mode 100644
index c8bfe4e15..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/mixing_audio_supported_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief MixingAudioSupportedResponse command class
- **/
-class MixingAudioSupportedResponse : public ResponseFromHMI {
- public:
- /**
- * @brief MixingAudioSupportedResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit MixingAudioSupportedResponse(const MessageSharedPtr& message);
-
- /**
- * @brief MixingAudioSupportedResponse class destructor
- **/
- virtual ~MixingAudioSupportedResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MixingAudioSupportedResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_MIXING_AUDIO_SUPPORTED_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
deleted file mode 100644
index 1e2a39df9..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviAlertManeuverRequest command class
- **/
-class NaviAlertManeuverRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviAlertManeuverRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviAlertManeuverRequest(const MessageSharedPtr& message);
-
- /**
- * @brief NaviAlertManeuverRequest class destructor
- **/
- virtual ~NaviAlertManeuverRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviAlertManeuverRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
deleted file mode 100644
index 41e0f623f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_alert_maneuver_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviAlertManeuverResponse command class
- **/
-class NaviAlertManeuverResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviAlertManeuverResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviAlertManeuverResponse(const MessageSharedPtr& message);
-
- /**
- * @brief NaviAlertManeuverResponse class destructor
- **/
- virtual ~NaviAlertManeuverResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviAlertManeuverResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_ALERT_MANEUVER_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
deleted file mode 100644
index a31efc7fe..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviIsReadyRequest command class
- **/
-class NaviIsReadyRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviIsReadyRequest(const MessageSharedPtr& message);
-
- /**
- * @brief NaviIsReadyRequest class destructor
- **/
- virtual ~NaviIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVIGATION_IS_READY_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
deleted file mode 100644
index 0fbad3515..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviIsReadyResponse command class
- **/
-class NaviIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviIsReadyResponse(const MessageSharedPtr& message);
-
- /**
- * @brief NaviIsReadyResponse class destructor
- **/
- virtual ~NaviIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_IS_READY_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
deleted file mode 100644
index 5da47e580..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviShowConstantTBTRequest command class
- **/
-class NaviShowConstantTBTRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviShowConstantTBTRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviShowConstantTBTRequest(const MessageSharedPtr& message);
-
- /**
- * @brief NaviShowConstantTBTRequest class destructor
- **/
- virtual ~NaviShowConstantTBTRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviShowConstantTBTRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
deleted file mode 100644
index 4a26b26b0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_show_constant_tbt_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviShowConstantTBTResponse command class
- **/
-class NaviShowConstantTBTResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviShowConstantTBTResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviShowConstantTBTResponse(const MessageSharedPtr& message);
-
- /**
- * @brief NaviShowConstantTBTResponse class destructor
- **/
- virtual ~NaviShowConstantTBTResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviShowConstantTBTResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SHOW_CONSTANT_TBT_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
deleted file mode 100644
index f43b99221..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStartStreamRequest command class
- **/
-class NaviStartStreamRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviStartStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviStartStreamRequest(const MessageSharedPtr& message);
-
- /**
- * @brief OnNaviStartStreamRequest class destructor
- **/
- virtual ~NaviStartStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStartStreamRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h
deleted file mode 100644
index c94b6f219..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_start_stream_response.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStartStreamResponse command class
- **/
-class NaviStartStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviStartStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviStartStreamResponse(const MessageSharedPtr& message);
-
- /**
- * @brief NaviStartStreamResponse class destructor
- **/
- virtual ~NaviStartStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStartStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_START_STREAM_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h
deleted file mode 100644
index 86b0981c2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_request.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStopStreamRequest command class
- **/
-class NaviStopStreamRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviStopStreamRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviStopStreamRequest(const MessageSharedPtr& message);
-
- /**
- * @brief NaviStopStreamRequest class destructor
- **/
- virtual ~NaviStopStreamRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStopStreamRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h
deleted file mode 100644
index 6f4986e4c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_stop_stream_response.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviStopStreamResponse command class
- **/
-class NaviStopStreamResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviStopStreamResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviStopStreamResponse(const MessageSharedPtr& message);
-
- /**
- * @brief OnNaviStopStreamResponse class destructor
- **/
- virtual ~NaviStopStreamResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviStopStreamResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_STOP_STREAM_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
deleted file mode 100644
index 61beef1b3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviUpdateTurnListRequest command class
- **/
-class NaviUpdateTurnListRequest : public RequestToHMI {
- public:
- /**
- * @brief NaviUpdateTurnListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviUpdateTurnListRequest(const MessageSharedPtr& message);
-
- /**
- * @brief NaviUpdateTurnListRequest class destructor
- **/
- virtual ~NaviUpdateTurnListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviUpdateTurnListRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
deleted file mode 100644
index 9e711b8be..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/navi_update_turn_list_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief NaviUpdateTurnListResponse command class
- **/
-class NaviUpdateTurnListResponse : public ResponseFromHMI {
- public:
- /**
- * @brief NaviUpdateTurnListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit NaviUpdateTurnListResponse(const MessageSharedPtr& message);
-
- /**
- * @brief NaviUpdateTurnListResponse class destructor
- **/
- virtual ~NaviUpdateTurnListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NaviUpdateTurnListResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UPDATE_TURN_LIST_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h
deleted file mode 100644
index 219306d37..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_from_hmi.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class CSmartObject;
-}
-}
-
-namespace application_manager {
-
-namespace commands {
-
-namespace NsSmartObj = NsSmartDeviceLink::NsSmartObjects;
-
-class NotificationFromHMI : public CommandImpl {
- public:
- explicit NotificationFromHMI(const MessageSharedPtr& message);
- virtual ~NotificationFromHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendNotificationToMobile(const MessageSharedPtr& message);
- void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id,
- const NsSmartObj::SmartObject& msg_params) const;
- private:
- DISALLOW_COPY_AND_ASSIGN(NotificationFromHMI);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h
deleted file mode 100644
index 2372754b6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/notification_to_hmi.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class NotificationToHMI : public CommandImpl {
- public:
- explicit NotificationToHMI(const MessageSharedPtr& message);
- virtual ~NotificationToHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendNotification();
- private:
- DISALLOW_COPY_AND_ASSIGN(NotificationToHMI);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
deleted file mode 100644
index a8bdeb6c9..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_activated_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppActivatedNotification command class
- **/
-class OnAppActivatedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAppActivatedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnAppActivatedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnAppActivatedNotification class destructor
- **/
- virtual ~OnAppActivatedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppActivatedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_ACTIVATED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
deleted file mode 100644
index 4c56dc415..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_deactivated_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppDeactivatedNotification command class
- **/
-class OnAppDeactivatedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnAppDeactivatedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnAppDeactivatedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnAppDeactivatedNotification class destructor
- **/
- virtual ~OnAppDeactivatedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppDeactivatedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_DEACTIVATED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
deleted file mode 100644
index 4364aa9a3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_registered_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppRegisteredNotification command class
- **/
-class OnAppRegisteredNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnAppRegisteredNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnAppRegisteredNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnAppRegisteredNotification class destructor
- **/
- virtual ~OnAppRegisteredNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppRegisteredNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_REGISTERED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
deleted file mode 100644
index d8470af39..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_app_unregistered_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppUnregisteredNotification command class
- **/
-class OnAppUnregisteredNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnAppUnregisteredNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnAppUnregisteredNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnAppUnregisteredNotification class destructor
- **/
- virtual ~OnAppUnregisteredNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppUnregisteredNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_APP_UNREGISTERED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
deleted file mode 100644
index 0e2ffc300..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_event_notification.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnButtonEventNotification command class
- **/
-class OnButtonEventNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnButtonEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnButtonEventNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnButtonEventNotification class destructor
- **/
- virtual ~OnButtonEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnButtonEventNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_EVENT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
deleted file mode 100644
index a54c7584f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_button_press_notification.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnButtonPressNotification command class
- **/
-class OnButtonPressNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnButtonPressNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnButtonPressNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnButtonPressNotification class destructor
- **/
- virtual ~OnButtonPressNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnButtonPressNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_BUTTON_PRESS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
deleted file mode 100644
index e980bfe41..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_device_chosen_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnDeviceChosenNotification command class
- **/
-class OnDeviceChosenNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnDeviceChosenNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnDeviceChosenNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnDeviceChosenNotification class destructor
- **/
- virtual ~OnDeviceChosenNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDeviceChosenNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_CHOSEN_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
deleted file mode 100644
index 77da5cf3b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_driver_distraction_notification.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnDriverDistractionNotification command class
- **/
-class OnDriverDistractionNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnDriverDistractionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnDriverDistractionNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnDriverDistractionNotification class destructor
- **/
- virtual ~OnDriverDistractionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDriverDistractionNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
deleted file mode 100644
index 0140e649c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_all_applications_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_EXIT_ALL_APPLICATIONS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_EXIT_ALL_APPLICATIONS_REQUEST_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnExitAllApplicationsNotification command class
- **/
-class OnExitAllApplicationsNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnExitAllApplicationsNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnExitAllApplicationsNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnExitAllApplicationsNotification class destructor
- **/
- virtual ~OnExitAllApplicationsNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnExitAllApplicationsNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_EXIT_ALL_APPLICATIONS_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
deleted file mode 100644
index b78c0e2af..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_exit_application_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_EXIT_APPLICATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_EXIT_APPLICATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnExitApplicationNotification command class
- **/
-class OnExitApplicationNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnExitApplicationNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnExitApplicationNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnExitApplicationNotification class destructor
- **/
- virtual ~OnExitApplicationNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnExitApplicationNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_EXIT_APPLICATION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
deleted file mode 100644
index 2499129b2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_find_applications.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_LIST_UPDATED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_LIST_UPDATED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnFindApplications command class
- **/
-class OnFindApplications : public NotificationFromHMI {
- public:
- /**
- * @brief OnFindApplications class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnFindApplications(const MessageSharedPtr& message);
-
- /**
- * @brief OnFindApplications class destructor
- **/
- virtual ~OnFindApplications();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnFindApplications);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_DEVICE_LIST_UPDATED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
deleted file mode 100644
index 6e42e1a0c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_navi_tbt_client_state_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnNaviTBTClientStateNotification command class
- **/
-class OnNaviTBTClientStateNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnNaviTBTClientStateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnNaviTBTClientStateNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnNaviTBTClientStateNotification class destructor
- **/
- virtual ~OnNaviTBTClientStateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnNaviTBTClientStateNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_TBT_CLIENT_STATE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h
deleted file mode 100644
index 8e463c327..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_play_tone_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_PLAY_TONE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_PLAY_TONE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnPlayToneNotification command class
- **/
-class OnPlayToneNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnPlayToneNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnPlayToneNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnPlayToneNotification class destructor
- **/
- virtual ~OnPlayToneNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnPlayToneNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_PLAY_TONE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
deleted file mode 100644
index a3e2dd731..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ready_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnReadyNotification command class
- **/
-class OnReadyNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnReadyNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnReadyNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnReadyNotification class destructor
- **/
- virtual ~OnReadyNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnReadyNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_READY_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
deleted file mode 100644
index e6b4418d6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_sdl_close_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSDLCloseNotification command class
- **/
-class OnSDLCloseNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnSDLCloseNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnSDLCloseNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnSdlCloseNotification class destructor
- **/
- virtual ~OnSDLCloseNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSDLCloseNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SDL_CLOSE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_show_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_show_notification.h
deleted file mode 100644
index 1264d5f67..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_show_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SHOW_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SHOW_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnShowNotification command class
- **/
-class OnShowNotification : public NotificationToHMI {
- public:
- /**
- * @brief OnShowNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnShowNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnShowNotification class destructor
- **/
- virtual ~OnShowNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnShowNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SHOW_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
deleted file mode 100644
index 3e4dc1daf..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_start_device_discovery.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_START_DEVICE_DISCOVERY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_START_DEVICE_DISCOVERY_REQUEST_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnStartDeviceDiscovery command class
- **/
-class OnStartDeviceDiscovery : public NotificationFromHMI {
- public:
- /**
- * @brief OnStartDeviceDiscovery class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnStartDeviceDiscovery(const MessageSharedPtr& message);
-
- /**
- * @brief OnStartDeviceDiscovery class destructor
- **/
- virtual ~OnStartDeviceDiscovery();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnStartDeviceDiscovery);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_START_DEVICE_DISCOVERY_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
deleted file mode 100644
index edf325c2d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_context_notification.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief OnSystemContextNotification command class
- **/
-class OnSystemContextNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnSystemContextNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnSystemContextNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnSystemContextNotification class destructor
- **/
- virtual ~OnSystemContextNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSystemContextNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_CONTEXT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
deleted file mode 100644
index 6e3a0eea7..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_system_request_notification.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnSystemRequestNotification command class
- **/
-class OnSystemRequestNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnSystemRequestNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnSystemRequestNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnSystemRequestNotification class destructor
- **/
- virtual ~OnSystemRequestNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
-
- DISALLOW_COPY_AND_ASSIGN(OnSystemRequestNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_SYSTEM_REQUEST_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
deleted file mode 100644
index d9b55ac0c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_language_change_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTTSLanguageChangeNotification command class
- **/
-class OnTTSLanguageChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSLanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnTTSLanguageChangeNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnTTSLanguageChangeNotification class destructor
- **/
- virtual ~OnTTSLanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSLanguageChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
deleted file mode 100644
index 8cb625607..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_started_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTTSStartedNotification command class
- **/
-class OnTTSStartedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSStartedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnTTSStartedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnTTSStartedNotification class destructor
- **/
- virtual ~OnTTSStartedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSStartedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STARTED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
deleted file mode 100644
index 31fb6fb31..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_tts_stopped_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTTSStoppedNotification command class
- **/
-class OnTTSStoppedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnTTSStoppedNotification class constructor
- *
- * @param message Incoming SmartObject OnTTSStartedNotificationmessage
- **/
- explicit OnTTSStoppedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnTTSStoppedNotification class destructor
- **/
- virtual ~OnTTSStoppedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTTSStoppedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_TTS_STOPPED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
deleted file mode 100644
index 1d0aaf307..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_command_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnUICommandNotification command class
- **/
-class OnUICommandNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUICommandNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnUICommandNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnUICommandNotification class destructor
- **/
- virtual ~OnUICommandNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUICommandNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_COMMAND_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
deleted file mode 100644
index bb0a6a72d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_keyboard_input_notification.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnUIKeyBoardInputNotification command class
- **/
-class OnUIKeyBoardInputNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUIKeyBoardInputNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnUIKeyBoardInputNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnUIKeyBoardInputNotification class destructor
- **/
- virtual ~OnUIKeyBoardInputNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUIKeyBoardInputNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_KEYBOARD_INPUT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
deleted file mode 100644
index 85b8f60c4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_language_change_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnUILanguageChangeNotification command class
- **/
-class OnUILanguageChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUILanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnUILanguageChangeNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnUILanguageChangeNotification class destructor
- **/
- virtual ~OnUILanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUILanguageChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
deleted file mode 100644
index 511606d07..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_reset_timeout_notification.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnUIResetTimeoutNotification command class
- **/
-class OnUIResetTimeoutNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUIResetTimeoutNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnUIResetTimeoutNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnUIResetTimeoutNotification class destructor
- **/
- virtual ~OnUIResetTimeoutNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUIResetTimeoutNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_RESET_TIMEOUT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
deleted file mode 100644
index 3231d1ca2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_ui_touch_event_notification.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-/**
- * @brief OnUITouchEventNotification command class
- **/
-class OnUITouchEventNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnUITouchEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnUITouchEventNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnUITouchEventNotification class destructor
- **/
- virtual ~OnUITouchEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUITouchEventNotification);
-};
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_UI_TOUCH_EVENT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
deleted file mode 100644
index b6d7a555d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_update_device_list.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_DEVICE_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_DEVICE_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnUpdateDeviceList command class
- **/
-class OnUpdateDeviceList : public NotificationFromHMI {
- public:
- /**
- * @brief OnUpdateDeviceList class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnUpdateDeviceList(const MessageSharedPtr& message);
-
- /**
- * @brief OnUpdateDeviceList class destructor
- **/
- virtual ~OnUpdateDeviceList();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnUpdateDeviceList);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_DEVICE_LIST_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
deleted file mode 100644
index 04bb3e54b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIAccPedalPositionNotification command class
- **/
-class OnVIAccPedalPositionNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIAccPedalPositionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIAccPedalPositionNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIAccPedalPositionNotification class destructor
- **/
- virtual ~OnVIAccPedalPositionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIAccPedalPositionNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ACC_PEDAL_POSITION_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
deleted file mode 100644
index 3cfb048cd..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_belt_status_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIBeltStatusNotification command class
- **/
-class OnVIBeltStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIBeltStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIBeltStatusNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIBeltStatusNotification class destructor
- **/
- virtual ~OnVIBeltStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIBeltStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BELT_STATUS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
deleted file mode 100644
index b9ecf5a34..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_body_information_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIBodyInformationNotification command class
- **/
-class OnVIBodyInformationNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIBodyInformationNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIBodyInformationNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIBodyInformationNotification class destructor
- **/
- virtual ~OnVIBodyInformationNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIBodyInformationNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_BODY_INFORMATION_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
deleted file mode 100644
index 925989e8c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_device_status_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIDeviceStatusNotification command class
- **/
-class OnVIDeviceStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIDeviceStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIDeviceStatusNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIDeviceStatusNotification class destructor
- **/
- virtual ~OnVIDeviceStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIDeviceStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DEVICE_STATUS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
deleted file mode 100644
index 7baea9065..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_driver_braking_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIDriverBrakingNotification command class
- **/
-class OnVIDriverBrakingNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIDriverBrakingNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIDriverBrakingNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIDriverBrakingNotification class destructor
- **/
- virtual ~OnVIDriverBrakingNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIDriverBrakingNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_DRIVER_BRAKING_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
deleted file mode 100644
index 33dd824c6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_engine_torque_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIEngineTorqueNotification command class
- **/
-class OnVIEngineTorqueNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIEngineTorqueNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIEngineTorqueNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIEngineTorqueNotification class destructor
- **/
- virtual ~OnVIEngineTorqueNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIEngineTorqueNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ENGINE_TORQUE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
deleted file mode 100644
index 207302a37..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_external_temperature_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIExternalTemperatureNotification command class
- **/
-class OnVIExternalTemperatureNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIExternalTemperatureNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIExternalTemperatureNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIExternalTemperatureNotification class destructor
- **/
- virtual ~OnVIExternalTemperatureNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIExternalTemperatureNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_EXTERNAL_TEMPERATURE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
deleted file mode 100644
index 535758db2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIFuelLevelNotification command class
- **/
-class OnVIFuelLevelNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIFuelLevelNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIFuelLevelNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIFuelLevelNotification class destructor
- **/
- virtual ~OnVIFuelLevelNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIFuelLevelNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
deleted file mode 100644
index 92dffd89b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_fuel_level_state_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIFuelLevelStateNotification command class
- **/
-class OnVIFuelLevelStateNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIFuelLevelStateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIFuelLevelStateNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIFuelLevelStateNotification class destructor
- **/
- virtual ~OnVIFuelLevelStateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIFuelLevelStateNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_FUEL_LEVEL_STATE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
deleted file mode 100644
index d8f2a768f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_gps_data_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIGpsDataNotification command class
- **/
-class OnVIGpsDataNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIGpsDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIGpsDataNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIGpsDataNotification class destructor
- **/
- virtual ~OnVIGpsDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIGpsDataNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_GPS_DATA_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
deleted file mode 100644
index 47802e97e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_head_lamp_status_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIHeadLampStatusNotification command class
- **/
-class OnVIHeadLampStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIHeadLampStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIHeadLampStatusNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIHeadLampStatusNotification class destructor
- **/
- virtual ~OnVIHeadLampStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIHeadLampStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_HEAD_LAMP_STATUS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
deleted file mode 100644
index fe3841298..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIInstantFuelConsumptionNotification command class
- **/
-class OnVIInstantFuelConsumptionNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIInstantFuelConsumptionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIInstantFuelConsumptionNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIInstantFuelConsumptionNotification class destructor
- **/
- virtual ~OnVIInstantFuelConsumptionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIInstantFuelConsumptionNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_INSTANT_FUEL_CONSUMPTION_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
deleted file mode 100644
index d636b6e77..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_my_key_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIMyKeyNotification command class
- **/
-class OnVIMyKeyNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIMyKeyNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIMyKeyNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIMyKeyNotification class destructor
- **/
- virtual ~OnVIMyKeyNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIMyKeyNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_MY_KEY_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
deleted file mode 100644
index 1cf4c2587..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_odometer_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIOdometerNotification command class
- **/
-class OnVIOdometerNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIOdometerNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIOdometerNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIOdometerNotification class destructor
- **/
- virtual ~OnVIOdometerNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIOdometerNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_ODOMETER_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
deleted file mode 100644
index 5a3a13637..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_prndl_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIPrndlNotification command class
- **/
-class OnVIPrndlNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIPrndlNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIPrndlNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIPrndlNotification class destructor
- **/
- virtual ~OnVIPrndlNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIPrndlNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_PRNDL_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
deleted file mode 100644
index 80dea2a6e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_rpm_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIRpmNotification command class
- **/
-class OnVIRpmNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIRpmNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIRpmNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIRpmNotification class destructor
- **/
- virtual ~OnVIRpmNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIRpmNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_RPM_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
deleted file mode 100644
index 19bffabf4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_speed_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVISpeedNotification command class
- **/
-class OnVISpeedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVISpeedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVISpeedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVISpeedNotification class destructor
- **/
- virtual ~OnVISpeedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVISpeedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_SPEED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
deleted file mode 100644
index 0826cb6c6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVISteeringWheelAngleNotification command class
- **/
-class OnVISteeringWheelAngleNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVISteeringWheelAngleNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVISteeringWheelAngleNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVISteeringWheelAngleNotification class destructor
- **/
- virtual ~OnVISteeringWheelAngleNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVISteeringWheelAngleNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_STEERING_WHEEL_ANGLE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
deleted file mode 100644
index ba8eceefc..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_tire_pressure_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVITirePressureNotification command class
- **/
-class OnVITirePressureNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVITirePressureNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVITirePressureNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVITirePressureNotification class destructor
- **/
- virtual ~OnVITirePressureNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVITirePressureNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_TIRE_PRESSURE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
deleted file mode 100644
index 30ad9d6ac..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vehicle_data_notification.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIVehicleDataNotification command class
- * Sent by HMI for the periodic and non periodic vehicle data
- **/
-class OnVIVehicleDataNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIVehicleDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIVehicleDataNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIVehicleDataNotification class destructor
- **/
- virtual ~OnVIVehicleDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIVehicleDataNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
deleted file mode 100644
index 0cb5fb17d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_vin_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIVinNotification command class
- **/
-class OnVIVinNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIVinNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIVinNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIVinNotification class destructor
- **/
- virtual ~OnVIVinNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIVinNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_VIN_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
deleted file mode 100644
index c7a1a6bd6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vi_wiper_status_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVIWiperStatusNotification command class
- **/
-class OnVIWiperStatusNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVIWiperStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVIWiperStatusNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVIWiperStatusNotification class destructor
- **/
- virtual ~OnVIWiperStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVIWiperStatusNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VI_WIPER_STATUS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
deleted file mode 100644
index 677bc2672..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_command_notification.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRCommandNotification command class
- **/
-class OnVRCommandNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRCommandNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVRCommandNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVRCommandNotification class destructor
- **/
- virtual ~OnVRCommandNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
-
- DISALLOW_COPY_AND_ASSIGN(OnVRCommandNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_COMMAND_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
deleted file mode 100644
index 24c60c32d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_language_change_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRLanguageChangeNotification command class
- **/
-class OnVRLanguageChangeNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRLanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVRLanguageChangeNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVRLanguageChangeNotification class destructor
- **/
- virtual ~OnVRLanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRLanguageChangeNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
deleted file mode 100644
index cc78f010b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_started_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRStartedNotification command class
- **/
-class OnVRStartedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRStartedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVRStartedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVRStartedNotification class destructor
- **/
- virtual ~OnVRStartedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRStartedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STARTED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
deleted file mode 100644
index 2ee8ad429..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/on_vr_stopped_notification.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVRStoppedNotification command class
- **/
-class OnVRStoppedNotification : public NotificationFromHMI {
- public:
- /**
- * @brief OnVRStoppedNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVRStoppedNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVRStoppedNotification class destructor
- **/
- virtual ~OnVRStoppedNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnVRStoppedNotification);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_VR_STOPPED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
deleted file mode 100644
index e1149773b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_TO_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_TO_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-
-class RequestToHMI : public CommandImpl {
- public:
- explicit RequestToHMI(const MessageSharedPtr& message);
- virtual ~RequestToHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendRequest();
-
- /*
- * @brief Retrieves correlation ID
- */
- inline int32_t correlation_id() const;
-
- /*
- * @brief Retrieves application ID
- */
- inline uint32_t application_id() const;
- private:
- DISALLOW_COPY_AND_ASSIGN(RequestToHMI);
-};
-int32_t RequestToHMI::correlation_id() const {
- return (*message_)[strings::params][strings::correlation_id].asInt();
-}
-uint32_t RequestToHMI::application_id() const {
- return (*message_)[strings::msg_params][strings::app_id].asUInt();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_REQUEST_TO_HMI_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
deleted file mode 100644
index e46583ba1..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/response_from_hmi.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_FROM_HMI_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_FROM_HMI_H_
-
-#include "application_manager/commands/command_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace application_manager {
-
-namespace commands {
-
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
-
-class ResponseFromHMI : public CommandImpl {
- public:
- explicit ResponseFromHMI(const MessageSharedPtr& message);
- virtual ~ResponseFromHMI();
- virtual bool Init();
- virtual bool CleanUp();
- virtual void Run();
- void SendResponseToMobile(const MessageSharedPtr& message);
-
- /*
- * @brief Creates HMI request
- *
- * @param function_id HMI request ID
- * @param msg_params HMI request msg params
- */
- void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const;
-
- /*
- * @brief Retrieves correlation ID
- */
- inline int32_t correlation_id() const;
- private:
- DISALLOW_COPY_AND_ASSIGN(ResponseFromHMI);
-};
-
-int32_t ResponseFromHMI::correlation_id() const {
- return (*message_)[strings::params][strings::correlation_id].asInt();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_RESPONSE_FROM_HMI_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
deleted file mode 100644
index a587af950..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSChangeRegistrationRequest command class
- **/
-class TTSChangeRegistrationRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSChangeRegistrationRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSChangeRegistrationRequest class destructor
- **/
- virtual ~TTSChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSChangeRegistrationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
deleted file mode 100644
index 3a9e9fda5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_change_registration_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSChangeRegistratioResponse command class
- **/
-class TTSChangeRegistratioResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSChangeRegistratioResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSChangeRegistratioResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSChangeRegistratioResponse class destructor
- **/
- virtual ~TTSChangeRegistratioResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSChangeRegistratioResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
deleted file mode 100644
index 73edd9de7..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetCapabilitiesRequest command class
- **/
-class TTSGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSGetCapabilitiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSGetCapabilitiesRequest class destructor
- **/
- virtual ~TTSGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
deleted file mode 100644
index 71f85d68e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_capabilities_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetCapabilitiesResponse command class
- **/
-class TTSGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSGetCapabilitiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSGetCapabilitiesResponse class destructor
- **/
- virtual ~TTSGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_CAPABILITIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
deleted file mode 100644
index 94e38ec47..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetLanguageRequest command class
- **/
-class TTSGetLanguageRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSGetLanguageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSGetLanguageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSGetLanguageRequest class destructor
- **/
- virtual ~TTSGetLanguageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
deleted file mode 100644
index bd67d64f3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_language_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetLanguageResponse command class
- **/
-class TTSGetLanguageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSGetLanguageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSGetLanguageResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSGetLanguageResponse class destructor
- **/
- virtual ~TTSGetLanguageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_LANGUAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
deleted file mode 100644
index ff80dd238..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetSupportedLanguagesRequest command class
- **/
-class TTSGetSupportedLanguagesRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSGetSupportedLanguagesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSGetSupportedLanguagesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSGetSupportedLanguagesRequest class destructor
- **/
- virtual ~TTSGetSupportedLanguagesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
deleted file mode 100644
index 244f22346..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_get_supported_languages_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSGetSupportedLanguagesResponse command class
- **/
-class TTSGetSupportedLanguagesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSGetSupportedLanguagesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSGetSupportedLanguagesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSGetSupportedLanguagesResponse class destructor
- **/
- virtual ~TTSGetSupportedLanguagesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
deleted file mode 100644
index dc58d852e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSIsReadyRequest command class
- **/
-class TTSIsReadyRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSIsReadyRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSIsReadyRequest class destructor
- **/
- virtual ~TTSIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
deleted file mode 100644
index 375e5a5d1..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSIsReadyResponse command class
- **/
-class TTSIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSIsReadyResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSIsReadyResponse class destructor
- **/
- virtual ~TTSIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_IS_READY_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_request.h
deleted file mode 100644
index 04057a3d0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_PERFORM_INTERACTION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_PERFORM_INTERACTION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSPerformInteractionRequest command class
- **/
-class TTSPerformInteractionRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSPerformInteractionRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSPerformInteractionRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSPerformInteractionRequest class destructor
- **/
- virtual ~TTSPerformInteractionRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSPerformInteractionRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_PERFORM_INTERACTION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_response.h
deleted file mode 100644
index 08ec53bd5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_perform_interaction_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_PERFORM_INTERACTION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_PERFORM_INTERACTION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSPerformInteractionResponse command class
- **/
-class TTSPerformInteractionResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSPerformInteractionResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSPerformInteractionResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSPerformInteractionResponse class destructor
- **/
- virtual ~TTSPerformInteractionResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSPerformInteractionResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
deleted file mode 100644
index b398e0b2d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSetGlobalPropertiesRequest command class
- **/
-class TTSSetGlobalPropertiesRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSSetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSSetGlobalPropertiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSSetGlobalPropertiesRequest class destructor
- **/
- virtual ~TTSSetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
deleted file mode 100644
index adf0b7027..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_set_global_properties_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSetGlobalPropertiesResponse command class
- **/
-class TTSSetGlobalPropertiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSSetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSSetGlobalPropertiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSSetGlobalPropertiesResponse class destructor
- **/
- virtual ~TTSSetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
deleted file mode 100644
index 326c638f4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSpeakRequest command class
- **/
-class TTSSpeakRequest
- : public RequestToHMI {
- public:
- /**
- * @brief TTSSpeakRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSSpeakRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSSpeakRequest class destructor
- **/
- virtual ~TTSSpeakRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSpeakRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
deleted file mode 100644
index e22c54987..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_speak_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSSpeakResponse command class
- **/
-class TTSSpeakResponse
- : public ResponseFromHMI {
- public:
- /**
- * @brief TTSSpeakResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSSpeakResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSSpeakResponse class destructor
- **/
- virtual ~TTSSpeakResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSSpeakResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_SPEAK_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
deleted file mode 100644
index 0d82121fd..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSStopSpeakingRequest command class
- **/
-class TTSStopSpeakingRequest : public RequestToHMI {
- public:
- /**
- * @brief TTSStopSpeakingRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSStopSpeakingRequest(const MessageSharedPtr& message);
-
- /**
- * @brief TTSStopSpeakingRequest class destructor
- **/
- virtual ~TTSStopSpeakingRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSStopSpeakingRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
deleted file mode 100644
index b9055bfbe..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/tts_stop_speaking_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief TTSStopSpeakingResponse command class
- **/
-class TTSStopSpeakingResponse : public ResponseFromHMI {
- public:
- /**
- * @brief TTSStopSpeakingResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit TTSStopSpeakingResponse(const MessageSharedPtr& message);
-
- /**
- * @brief TTSStopSpeakingResponse class destructor
- **/
- virtual ~TTSStopSpeakingResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TTSStopSpeakingResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_TTS_STOP_SPEAKING_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
deleted file mode 100644
index ffd6eeeef..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddCommandRequest command class
- **/
-class UIAddCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief UIAddCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIAddCommandRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIAddCommandRequest class destructor
- **/
- virtual ~UIAddCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
deleted file mode 100644
index f84b71d0f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_command_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddCommandResponse command class
- **/
-class UIAddCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIAddCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIAddCommandResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIAddCommandResponse class destructor
- **/
- virtual ~UIAddCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_COMMAND_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
deleted file mode 100644
index 1227de046..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddSubmenuRequest command class
- **/
-class UIAddSubmenuRequest : public RequestToHMI {
- public:
- /**
- * @brief UIAddSubmenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIAddSubmenuRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIAddSubmenuRequest class destructor
- **/
- virtual ~UIAddSubmenuRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
deleted file mode 100644
index 1b3a10729..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_add_submenu_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddSubmenuResponse command class
- **/
-class UIAddSubmenuResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIAddSubmenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIAddSubmenuResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIAddSubmenuResponse class destructor
- **/
- virtual ~UIAddSubmenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ADD_SUBMENU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
deleted file mode 100644
index 7395eb19e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAlertRequest command class
- **/
-class UIAlertRequest : public RequestToHMI {
- public:
- /**
- * @brief UIAlertRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIAlertRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIAlertRequest class destructor
- **/
- virtual ~UIAlertRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAlertRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
deleted file mode 100644
index 1d17d9809..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_alert_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAlertResponse command class
- **/
-class UIAlertResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIAlertResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIAlertResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIAlertResponse class destructor
- **/
- virtual ~UIAlertResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIAlertResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_ALERT_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
deleted file mode 100644
index 51276b7b0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIChangeRegistrationRequest command class
- **/
-class UIChangeRegistrationRequest : public RequestToHMI {
- public:
- /**
- * @brief UIChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIChangeRegistrationRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIChangeRegistrationRequest class destructor
- **/
- virtual ~UIChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIChangeRegistrationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
deleted file mode 100644
index edb7574e8..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_change_registration_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIChangeRegistratioResponse command class
- **/
-class UIChangeRegistratioResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIChangeRegistratioResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIChangeRegistratioResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIChangeRegistratioResponse class destructor
- **/
- virtual ~UIChangeRegistratioResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIChangeRegistratioResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
deleted file mode 100644
index 398f78c28..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIDeleteCommandRequest command class
- **/
-class UIDeleteCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief UIDeleteCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIDeleteCommandRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIDeleteCommandRequest class destructor
- **/
- virtual ~UIDeleteCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
deleted file mode 100644
index bb1981190..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_command_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIDeleteCommandResponse command class
- **/
-class UIDeleteCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIDeleteCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIDeleteCommandResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIDeleteCommandResponse class destructor
- **/
- virtual ~UIDeleteCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_COMMAND_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
deleted file mode 100644
index 1b3747234..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIAddSubmenuRequest command class
- **/
-class UIDeleteSubmenuRequest : public RequestToHMI {
- public:
- /**
- * @brief UIDeleteSubmenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIDeleteSubmenuRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIDeleteSubmenuRequest class destructor
- **/
- virtual ~UIDeleteSubmenuRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteSubmenuRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
deleted file mode 100644
index 8bbab9946..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_delete_submenu_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIDeleteSubmenuResponse command class
- **/
-class UIDeleteSubmenuResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIDeleteSubmenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIDeleteSubmenuResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIDeleteSubmenuResponse class destructor
- **/
- virtual ~UIDeleteSubmenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIDeleteSubmenuResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_DELETE_SUBMENU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
deleted file mode 100644
index 9e8e11c1a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIEndAudioPassThruRequest command class
- * When this request is invoked, the audio capture stops
- **/
-class UIEndAudioPassThruRequest : public RequestToHMI {
- public:
- /**
- * @brief UIEndAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIEndAudioPassThruRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIEndAudioPassThruRequest class destructor
- **/
- virtual ~UIEndAudioPassThruRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIEndAudioPassThruRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
deleted file mode 100644
index 740fc5501..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_end_audio_pass_thru_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIEndAudioPassThruResponse command class
- **/
-class UIEndAudioPassThruResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIEndAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIEndAudioPassThruResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIEndAudioPassThruResponse class destructor
- **/
- virtual ~UIEndAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIEndAudioPassThruResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_END_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
deleted file mode 100644
index 2d0469d6a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetCapabilitiesRequest command class
- **/
-class UIGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief UIGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIGetCapabilitiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIGetCapabilitiesRequest class destructor
- **/
- virtual ~UIGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
deleted file mode 100644
index dc6052e04..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_capabilities_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetCapabilitiesResponse command class
- **/
-class UIGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIGetCapabilitiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIGetCapabilitiesResponse class destructor
- **/
- virtual ~UIGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_CAPABILITIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
deleted file mode 100644
index 4fca4826b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetLanguageRequest command class
- **/
-class UIGetLanguageRequest : public RequestToHMI {
- public:
- /**
- * @brief UIGetLanguageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIGetLanguageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIGetLanguageRequest class destructor
- **/
- virtual ~UIGetLanguageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetLanguageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
deleted file mode 100644
index ea43e3856..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_language_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetLanguageResponse command class
- **/
-class UIGetLanguageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIGetLanguageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIGetLanguageResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIGetLanguageResponse class destructor
- **/
- virtual ~UIGetLanguageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetLanguageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_LANGUAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
deleted file mode 100644
index cc0e70fea..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetSupportedLanguagesRequest command class
- **/
-class UIGetSupportedLanguagesRequest : public RequestToHMI {
- public:
- /**
- * @brief UIGetSupportedLanguagesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIGetSupportedLanguagesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIGetSupportedLanguagesRequest class destructor
- **/
- virtual ~UIGetSupportedLanguagesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
deleted file mode 100644
index 15e400687..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_get_supported_languages_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIGetSupportedLanguagesResponse command class
- **/
-class UIGetSupportedLanguagesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIGetSupportedLanguagesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIGetSupportedLanguagesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIGetSupportedLanguagesResponse class destructor
- **/
- virtual ~UIGetSupportedLanguagesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
deleted file mode 100644
index 5e2cb7ef9..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIIsReadyRequest command class
- **/
-class UIIsReadyRequest : public RequestToHMI {
- public:
- /**
- * @brief UIIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIIsReadyRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIIsReadyRequest class destructor
- **/
- virtual ~UIIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
deleted file mode 100644
index bc7210f2a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIIsReadyResponse command class
- **/
-class UIIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIIsReadyResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIIsReadyResponse class destructor
- **/
- virtual ~UIIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_IS_READY_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
deleted file mode 100644
index 94bc4827a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformAudioPassThruRequest command class
- **/
-class UIPerformAudioPassThruRequest : public RequestToHMI {
- public:
- /**
- * @brief UIPerformAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIPerformAudioPassThruRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIPerformAudioPassThruRequest class destructor
- **/
- virtual ~UIPerformAudioPassThruRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformAudioPassThruRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
deleted file mode 100644
index 04afedfba..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformAudioPassThruResponse command class
- **/
-class UIPerformAudioPassThruResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIPerformAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIPerformAudioPassThruResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIPerformAudioPassThruResponse class destructor
- **/
- virtual ~UIPerformAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformAudioPassThruResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
deleted file mode 100644
index 0d6313943..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformInteractionRequest command class
- **/
-class UIPerformInteractionRequest : public RequestToHMI {
- public:
- /**
- * @brief UIPerformInteractionRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIPerformInteractionRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIPerformInteractionRequest class destructor
- **/
- virtual ~UIPerformInteractionRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformInteractionRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_CREATE_INTERACTION_SET_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
deleted file mode 100644
index 32a87c73c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_perform_interaction_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIPerformInteractionResponse command class
- **/
-class UIPerformInteractionResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIPerformInteractionResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIPerformInteractionResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIPerformInteractionResponse class destructor
- **/
- virtual ~UIPerformInteractionResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIPerformInteractionResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
deleted file mode 100644
index 6f23d3b21..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIScrollableMessageRequest command class
- **/
-class UIScrollableMessageRequest : public RequestToHMI {
- public:
- /**
- * @brief UIScrollableMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIScrollableMessageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIScrollableMessageRequest class destructor
- **/
- virtual ~UIScrollableMessageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIScrollableMessageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
deleted file mode 100644
index 7bf15a051..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_scrollable_message_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIScrollableMessageResponse command class
- **/
-class UIScrollableMessageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIScrollableMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIScrollableMessageResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIScrollableMessageResponse class destructor
- **/
- virtual ~UIScrollableMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIScrollableMessageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SCROLLABLE_MESSAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h
deleted file mode 100644
index 7e67912f5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_request.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UiSetDisplayLayoutRequest command class
- **/
-class UiSetDisplayLayoutRequest : public RequestToHMI {
- public:
- /**
- * @brief UiSetDisplayLayoutRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UiSetDisplayLayoutRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UiSetDisplayLayoutRequest class destructor
- **/
- virtual ~UiSetDisplayLayoutRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UiSetDisplayLayoutRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
deleted file mode 100644
index 74df2030e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_display_layout_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UiSetDisplayLayoutResponse command class
- **/
-class UiSetDisplayLayoutResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UiSetDisplayLayoutResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UiSetDisplayLayoutResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UiSetDisplayLayoutResponse class destructor
- **/
- virtual ~UiSetDisplayLayoutResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UiSetDisplayLayoutResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_DISPLAY_LAYOUT_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
deleted file mode 100644
index f3f7d0e73..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetGlobalPropertiesRequest command class
- **/
-class UISetGlobalPropertiesRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISetGlobalPropertiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIShowRequest class destructor
- **/
- virtual ~UISetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
deleted file mode 100644
index bc00397e3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_global_properties_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetGlobalPropertiesResponse command class
- **/
-class UISetGlobalPropertiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISetGlobalPropertiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UISetGlobalPropertiesResponse class destructor
- **/
- virtual ~UISetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
deleted file mode 100644
index 1541aada6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetIconRequest command class
- **/
-class UISetIconRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetIconRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISetIconRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UISetIconRequest class destructor
- **/
- virtual ~UISetIconRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetIconRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
deleted file mode 100644
index f125f6428..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_icon_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetIconResponse command class
- **/
-class UISetIconResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetIconResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISetIconResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UISetIconResponse class destructor
- **/
- virtual ~UISetIconResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetIconResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_ICON_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
deleted file mode 100644
index 44cbbbfcf..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetMediaClockTimerRequest command class
- **/
-class UISetMediaClockTimerRequest : public RequestToHMI {
- public:
- /**
- * @brief UISetMediaClockTimerRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISetMediaClockTimerRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UISetMediaClockTimerRequest class destructor
- **/
- virtual ~UISetMediaClockTimerRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetMediaClockTimerRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
deleted file mode 100644
index dd46f128d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_set_media_clock_timer_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISetMediaClockTimerResponse command class
- **/
-class UISetMediaClockTimerResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISetMediaClockTimerResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISetMediaClockTimerResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UISetMediaClockTimerResponse class destructor
- **/
- virtual ~UISetMediaClockTimerResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISetMediaClockTimerResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
deleted file mode 100644
index 6f22263e6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIShowRequest command class
- **/
-class UIShowRequest : public RequestToHMI {
- public:
- /**
- * @brief UIShowRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIShowRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UIShowRequest class destructor
- **/
- virtual ~UIShowRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIShowRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
deleted file mode 100644
index a6391fa6c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_show_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UIShowResponse command class
- **/
-class UIShowResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UIShowResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UIShowResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UIShowResponse class destructor
- **/
- virtual ~UIShowResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIShowResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SHOW_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
deleted file mode 100644
index 5cb31b4a9..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ButtonGetCapabilitiesRequest command class
- **/
-class UISliderRequest : public RequestToHMI {
- public:
- /**
- * @brief UISliderRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISliderRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UISliderRequest class destructor
- **/
- virtual ~UISliderRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISliderRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
deleted file mode 100644
index aae5408e2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/ui_slider_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UISliderResponse command class
- **/
-class UISliderResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UISliderResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UISliderResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UISliderResponse class destructor
- **/
- virtual ~UISliderResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UISliderResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SLIDER_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
deleted file mode 100644
index 51dac16ec..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_APP_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_APP_LIST_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateAppListRequest command class
- **/
-class UpdateAppListRequest : public RequestToHMI {
- public:
- /**
- * @brief UpdateAppListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UpdateAppListRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UpdateAppListRequest class destructor
- **/
- virtual ~UpdateAppListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateAppListRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_APP_LIST_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
deleted file mode 100644
index 7e3f4d1ac..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_app_list_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_APP_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_APP_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateAppListResponse command class
- **/
-class UpdateAppListResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UpdateAppListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UpdateAppListResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UpdateAppListResponse class destructor
- **/
- virtual ~UpdateAppListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateAppListResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_APP_LIST_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
deleted file mode 100644
index abf82b26a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_DEVICE_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_DEVICE_LIST_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateDeviceListRequest command class
- **/
-class UpdateDeviceListRequest : public RequestToHMI {
- public:
- /**
- * @brief UpdateDeviceListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UpdateDeviceListRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UpdateDeviceListRequest class destructor
- **/
- virtual ~UpdateDeviceListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateDeviceListRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_GET_DEVICE_LIST_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
deleted file mode 100644
index d4191c8be..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/update_device_list_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateDeviceListResponse command class
- **/
-class UpdateDeviceListResponse : public ResponseFromHMI {
- public:
- /**
- * @brief UpdateDeviceListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UpdateDeviceListResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UpdateDeviceListResponse class destructor
- **/
- virtual ~UpdateDeviceListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateDeviceListResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UPDATE_DEVICE_LIST_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
deleted file mode 100644
index 90e1e145c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIDiagnosticMessageRequest command class
- **/
-class VIDiagnosticMessageRequest : public RequestToHMI {
- public:
- /**
- * @brief VIDiagnosticMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIDiagnosticMessageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIDiagnosticMessageRequest class destructor
- **/
- virtual ~VIDiagnosticMessageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIDiagnosticMessageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
deleted file mode 100644
index f332a3281..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_diagnostic_message_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIDiagnosticMessageResponse command class
- **/
-class VIDiagnosticMessageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIDiagnosticMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIDiagnosticMessageResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIDiagnosticMessageResponse class destructor
- **/
- virtual ~VIDiagnosticMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIDiagnosticMessageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_DIAGNOSTIC_MESSAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
deleted file mode 100644
index 93f046d7d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetDTCsRequest command class
- **/
-class VIGetDTCsRequest : public RequestToHMI {
- public:
- /**
- * @brief VIGetDTCsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetDTCsRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIGetDTCsRequest class destructor
- **/
- virtual ~VIGetDTCsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetDTCsRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
deleted file mode 100644
index 9ee7fac44..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_dtcs_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetDTCsResponse command class
- **/
-class VIGetDTCsResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetDTCsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetDTCsResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIGetDTCsResponse class destructor
- **/
- virtual ~VIGetDTCsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetDTCsResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_DTCS_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
deleted file mode 100644
index 9cb964981..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataRequest command class
- **/
-class VIGetVehicleDataRequest : public RequestToHMI {
- public:
- /**
- * @brief VIGetVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetVehicleDataRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIGetVehicleDataRequest class destructor
- **/
- virtual ~VIGetVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
deleted file mode 100644
index 951bf0c33..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_request_template.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HMI_VI_GETBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-#define HMI_VI_GETBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataRequestTemplate command class
- *
- * Template class for sending 1 subscribe thin request
- **/
-template<event_engine::Event::EventID eventID>
-class VIGetVehicleDataRequestTemplate : public RequestToHMI {
- public:
- /**
- * @brief VIGetVehicleDataRequestTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetVehicleDataRequestTemplate(const MessageSharedPtr& message)
- : RequestToHMI(message) {
- }
-
- /**
- * @brief Execute command with sending DBus thin request to HMI
- **/
- virtual void Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleDataRequestTemplate::Run");
- SendRequest();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataRequestTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // HMI_VI_GETBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
deleted file mode 100644
index 952b0fb4d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataResponse command class
- **/
-class VIGetVehicleDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetVehicleDataResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIGetVehicleDataResponse class destructor
- **/
- virtual ~VIGetVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_DATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
deleted file mode 100644
index ecd465365..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_data_response_template.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HMI_VI_GETBSCRIBE_VEHICLE_DATA_REQUEST_RESPONSE_H_
-#define HMI_VI_GETBSCRIBE_VEHICLE_DATA_REQUEST_RESPONSE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIGetVehicleDataResponseTemplate command class
- **/
-template<event_engine::Event::EventID eventID>
-class VIGetVehicleDataResponseTemplate : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetVehicleDataResponseTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetVehicleDataResponseTemplate(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleDataResponseTemplate::Run");
- event_engine::Event event(eventID);
- event.set_smart_object(*message_);
- event.raise();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleDataResponseTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // HMI_VI_GETBSCRIBE_VEHICLE_DATA_REQUEST_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
deleted file mode 100644
index 876f7d2e5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleTypeRequest command class
- **/
-class VIGetVehicleTypeRequest : public RequestToHMI {
- public:
- /**
- * @brief VIGetVehicleTypeRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetVehicleTypeRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIGetVehicleTypeRequest class destructor
- **/
- virtual ~VIGetVehicleTypeRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
deleted file mode 100644
index 8b632182f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_get_vehicle_type_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIGetVehicleTypeResponse command class
- **/
-class VIGetVehicleTypeResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIGetVehicleTypeResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIGetVehicleTypeResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIGetVehicleTypeResponse class destructor
- **/
- virtual ~VIGetVehicleTypeResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_GET_VEHICLE_TYPE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
deleted file mode 100644
index e905cf4c0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIIsReadyRequest command class
- **/
-class VIIsReadyRequest : public RequestToHMI {
- public:
- /**
- * @brief VIIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIIsReadyRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIIsReadyRequest class destructor
- **/
- virtual ~VIIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
deleted file mode 100644
index e13e368b3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIIsReadyResponse command class
- **/
-class VIIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIIsReadyResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIIsReadyResponse class destructor
- **/
- virtual ~VIIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_IS_READY_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
deleted file mode 100644
index 336ad4443..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIReadDIDRequest command class
- **/
-class VIReadDIDRequest : public RequestToHMI {
- public:
- /**
- * @brief VIReadDIDRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIReadDIDRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIReadDIDRequest class destructor
- **/
- virtual ~VIReadDIDRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIReadDIDRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
deleted file mode 100644
index af6650517..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_read_did_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIReadDIDResponse command class
- **/
-class VIReadDIDResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIReadDIDResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIReadDIDResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIReadDIDResponse class destructor
- **/
- virtual ~VIReadDIDResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIReadDIDResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_READ_DID_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
deleted file mode 100644
index ef14a05f2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VISubscribeVehicleDataRequest command class
- **/
-class VISubscribeVehicleDataRequest : public RequestToHMI {
- public:
- /**
- * @brief VISubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VISubscribeVehicleDataRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VISubscribeVehicleDataRequest class destructor
- **/
- virtual ~VISubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
deleted file mode 100644
index bcfa2f6f1..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-#define HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VISubscriveVehicleDataRequestTemplate command class
- *
- * Template class for sending 1 subscribe thin request
- **/
-template<event_engine::Event::EventID eventID>
-class VISubscribeVehicleDataRequestTemplate : public RequestToHMI {
- public:
- /**
- * @brief VISubscriveVehicleDataRequestTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VISubscribeVehicleDataRequestTemplate(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
- }
-
- /**
- * @brief Execute command with sending DBus thin request to HMI
- **/
- virtual void Run() {
- LOG4CXX_INFO(logger_, "VISubscriveVehicleDataRequestTemplate::Run");
- SendRequest();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataRequestTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // HMI_VI_SUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
deleted file mode 100644
index 057fd52e1..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VISubscribeVehicleDataResponse command class
- **/
-class VISubscribeVehicleDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VISubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VISubscribeVehicleDataResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VISubscribeVehicleDataResponse class destructor
- **/
- virtual ~VISubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
deleted file mode 100644
index 740d8c386..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-#define HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief VISubscriveVehicleDataResponseTemplate command class
- **/
-template<event_engine::Event::EventID eventID>
-class VISubscribeVehicleDataResponseTemplate : public ResponseFromHMI {
- public:
- /**
- * @brief VISubscriveVehicleDataResponseTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VISubscribeVehicleDataResponseTemplate(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run() {
- LOG4CXX_INFO(logger_, "VISubscribeVehicleDataResponse::Run");
- event_engine::Event event(eventID);
- event.set_smart_object(*message_);
- event.raise();
- }
- private:
- DISALLOW_COPY_AND_ASSIGN(VISubscribeVehicleDataResponseTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // HMI_VI_SUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
deleted file mode 100644
index 18d118fad..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIUnsubscribeVehicleDataRequest command class
- **/
-class VIUnsubscribeVehicleDataRequest : public RequestToHMI {
- public:
- /**
- * @brief VIUnsubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIUnsubscribeVehicleDataRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VIUnsubscribeVehicleDataRequest class destructor
- **/
- virtual ~VIUnsubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
deleted file mode 100644
index d604d4d53..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-#define HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIUnsubscriveVehicleDataRequestTemplate command class
- *
- * Template class for sending 1 unsubscribe thin request
- **/
-template<event_engine::Event::EventID eventID>
-class VIUnsubscribeVehicleDataRequestTemplate : public RequestToHMI {
- public:
- /**
- * @brief VIUnsubscriveVehicleDataRequestTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIUnsubscribeVehicleDataRequestTemplate(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
- }
-
- /**
- * @brief Execute command with sending DBus thin request to HMI
- **/
- virtual void Run() {
- LOG4CXX_INFO(logger_, "VIUnsubscriveVehicleDataRequestTemplate::Run");
- SendRequest();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataRequestTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-#endif // HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_TEMPLATE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
deleted file mode 100644
index b71b8241f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VIUnsubscribeVehicleDataResponse command class
- **/
-class VIUnsubscribeVehicleDataResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VIUnsubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIUnsubscribeVehicleDataResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VIUnsubscribeVehicleDataResponse class destructor
- **/
- virtual ~VIUnsubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
deleted file mode 100644
index 8730cc036..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-#define HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-namespace commands {
-
-/**
- * @brief VIUnsubscriveVehicleDataResponseTemplate command class
- **/
-template<event_engine::Event::EventID eventID>
-class VIUnsubscribeVehicleDataResponseTemplate : public ResponseFromHMI {
- public:
- /**
- * @brief VISubscriveVehicleDataResponseTemplate class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VIUnsubscribeVehicleDataResponseTemplate(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run() {
- LOG4CXX_INFO(logger_, "VIUnsubscriveVehicleDataResponseTemplate::Run");
- event_engine::Event event(eventID);
- event.set_smart_object(*message_);
- event.raise();
- }
- private:
- DISALLOW_COPY_AND_ASSIGN(VIUnsubscribeVehicleDataResponseTemplate<eventID>);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // HMI_VI_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_TEMPLATE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
deleted file mode 100644
index 3675cfb15..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRAddCommandRequest command class
- **/
-class VRAddCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief VRAddCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRAddCommandRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRAddCommandRequest class destructor
- **/
- virtual ~VRAddCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRAddCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
deleted file mode 100644
index 328e8a205..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_add_command_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRAddCommandResponse command class
- **/
-class VRAddCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRAddCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRAddCommandResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRAddCommandResponse class destructor
- **/
- virtual ~VRAddCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRAddCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_ADD_COMMAND_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
deleted file mode 100644
index 5e69b4c18..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRChangeRegistrationRequest command class
- **/
-class VRChangeRegistrationRequest : public RequestToHMI {
- public:
- /**
- * @brief VRChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRChangeRegistrationRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRChangeRegistrationRequest class destructor
- **/
- virtual ~VRChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRChangeRegistrationRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
deleted file mode 100644
index f79da4459..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_change_registration_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRChangeRegistrationResponse command class
- **/
-class VRChangeRegistrationResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRChangeRegistrationResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRChangeRegistrationResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRChangeRegistrationResponse class destructor
- **/
- virtual ~VRChangeRegistrationResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRChangeRegistrationResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
deleted file mode 100644
index b843f498f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRDeleteCommandRequest command class
- **/
-class VRDeleteCommandRequest : public RequestToHMI {
- public:
- /**
- * @brief VRDeleteCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRDeleteCommandRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRDeleteCommandRequest class destructor
- **/
- virtual ~VRDeleteCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRDeleteCommandRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
deleted file mode 100644
index 11a681bd5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_delete_command_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRDeleteCommandResponse command class
- **/
-class VRDeleteCommandResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRDeleteCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRDeleteCommandResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRDeleteCommandResponse class destructor
- **/
- virtual ~VRDeleteCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRDeleteCommandResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_DELETE_COMMAND_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
deleted file mode 100644
index 7771bdd14..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetCapabilitiesRequest command class
- **/
-class VRGetCapabilitiesRequest : public RequestToHMI {
- public:
- /**
- * @brief VRGetCapabilitiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRGetCapabilitiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRGetCapabilitiesRequest class destructor
- **/
- virtual ~VRGetCapabilitiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
deleted file mode 100644
index ced60c9d6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_capabilities_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetCapabilitiesResponse command class
- **/
-class VRGetCapabilitiesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRGetCapabilitiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRGetCapabilitiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRGetCapabilitiesResponse class destructor
- **/
- virtual ~VRGetCapabilitiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_CAPABILITIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
deleted file mode 100644
index 955355d06..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetLanguageRequest command class
- **/
-class VRGetLanguageRequest : public RequestToHMI {
- public:
- /**
- * @brief VRGetLanguageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRGetLanguageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRGetLanguageRequest class destructor
- **/
- virtual ~VRGetLanguageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetLanguageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
deleted file mode 100644
index 2bd59b8be..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_language_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetLanguageResponse command class
- **/
-class VRGetLanguageResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRGetLanguageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRGetLanguageResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRGetLanguageResponse class destructor
- **/
- virtual ~VRGetLanguageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetLanguageResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_LANGUAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
deleted file mode 100644
index 79105978b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetSupportedLanguagesRequest command class
- **/
-class VRGetSupportedLanguagesRequest : public RequestToHMI {
- public:
- /**
- * @brief VRGetSupportedLanguagesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRGetSupportedLanguagesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRGetSupportedLanguagesRequest class destructor
- **/
- virtual ~VRGetSupportedLanguagesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
deleted file mode 100644
index 38f505622..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_get_supported_languages_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRGetSupportedLanguagesResponse command class
- **/
-class VRGetSupportedLanguagesResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRGetSupportedLanguagesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRGetSupportedLanguagesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRGetSupportedLanguagesResponse class destructor
- **/
- virtual ~VRGetSupportedLanguagesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_GET_SUPPORTED_LANGUAGES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
deleted file mode 100644
index ac734638b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRIsReadyRequest command class
- **/
-class VRIsReadyRequest : public RequestToHMI {
- public:
- /**
- * @brief VRIsReadyRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRIsReadyRequest(const MessageSharedPtr& message);
-
- /**
- * @brief VRIsReadyRequest class destructor
- **/
- virtual ~VRIsReadyRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRIsReadyRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
deleted file mode 100644
index 4f4f86d84..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief VRIsReadyResponse command class
- **/
-class VRIsReadyResponse : public ResponseFromHMI {
- public:
- /**
- * @brief VRIsReadyResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit VRIsReadyResponse(const MessageSharedPtr& message);
-
- /**
- * @brief VRIsReadyResponse class destructor
- **/
- virtual ~VRIsReadyResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VRIsReadyResponse);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_VR_IS_READY_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h
deleted file mode 100644
index bce9d6350..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_request.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_COMMAND_REQUEST_H_
-
-#include "application_manager/application.h"
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddCommandRequest command class
- **/
-class AddCommandRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AddCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AddCommandRequest(const MessageSharedPtr& message);
-
- /**
- * @brief AddCommandRequest class destructor
- **/
- virtual ~AddCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
-
- /*
- * @brief Check if command name doesn't exist in application
- * Please see SDLAQ-CRS-407 for more information
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandName(ApplicationConstSharedPtr app);
-
- /*
- * @brief Check if command VR synonyms doesn't exist in application commands
- * Please see SDLAQ-CRS-407 for more information
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandVRSynonym(ApplicationConstSharedPtr app);
-
- /*
- * @brief Check if command parent ID exists in submenu map
- *
- * @param app Mobile application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckCommandParentId(ApplicationConstSharedPtr app);
-
- /*
- * @brief Check if commands has valid syntax
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckVRCommandsNames();
-
- /*
- * @brief Check if menuNames has valid syntax
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckMenuName();
-
- DISALLOW_COPY_AND_ASSIGN(AddCommandRequest);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- bool is_ui_send_;
- bool is_vr_send_;
-
- bool is_ui_received_;
- bool is_vr_received_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType vr_result_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_COMMAND_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h
deleted file mode 100644
index 67a49a8e1..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_command_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddCommandResponse command class
- **/
-class AddCommandResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AddCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AddCommandResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AddCommandResponse class destructor
- **/
- virtual ~AddCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AddCommandResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_COMMAND_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h
deleted file mode 100644
index befeb76d9..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_request.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_SUB_MENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_SUB_MENU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddSubMenuRequest command class
- **/
-class AddSubMenuRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AddSubMenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AddSubMenuRequest(const MessageSharedPtr& message);
-
- /**
- * @brief AddSubMenuRequest class destructor
- **/
- virtual ~AddSubMenuRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
-
- /*
- * @brief Check if submenu name is valid
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckSubMenuName();
-
- DISALLOW_COPY_AND_ASSIGN(AddSubMenuRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_SUB_MENU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h
deleted file mode 100644
index 62c404951..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/add_sub_menu_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_SUB_MENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_SUB_MENU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AddSubMenuResponse command class
- **/
-class AddSubMenuResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AddSubMenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AddSubMenuResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AddSubMenuResponse class destructor
- **/
- virtual ~AddSubMenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AddSubMenuResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ADD_SUB_MENU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h
deleted file mode 100644
index e932b7244..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_MANEUVER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_MANEUVER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/commands/pending.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertManeuverRequest command class
- **/
-class AlertManeuverRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AlertManeuverRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AlertManeuverRequest(const MessageSharedPtr& message);
-
- /**
- * @brief AlertManeuverRequest class destructor
- **/
- virtual ~AlertManeuverRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- mobile_apis::Result::eType result_;
- mobile_apis::Result::eType tts_speak_result_code_;
- mobile_apis::Result::eType navi_alert_maneuver_result_code_;
- Pending pending_requests_;
-
- DISALLOW_COPY_AND_ASSIGN(AlertManeuverRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_MANEUVER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h
deleted file mode 100644
index 5f0827699..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_MANEUVER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_MANEUVER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertManeuverResponse command class
- **/
-class AlertManeuverResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AlertManeuverResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AlertManeuverResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AlertManeuverResponse class destructor
- **/
- virtual ~AlertManeuverResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AlertManeuverResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_MANEUVER_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
deleted file mode 100644
index cb693fdd5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertRequest command class
- **/
-class AlertRequest : public CommandRequestImpl {
- public:
- /**
- * @brief AlertRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AlertRequest(const MessageSharedPtr& message);
-
- /**
- * @brief AlertRequest class destructor
- **/
- virtual ~AlertRequest();
-
- /**
- * @brief Initialize request params
- **/
- virtual bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- protected:
-
- private:
- /*
- * @brief Checks if request parameters are valid
- * @param app_id Id of application requested this RPC
- * @returns true if request is valid and should be processed
- */
- bool Validate(uint32_t app_id);
- /*
- * @brief Sends UI Alert request
- *
- * @param app_id Id of application requested this RPC
- */
- void SendAlertRequest(int32_t app_id);
-
- /*
- * @brief Sends TTS Speak request
- *
- * @param app_id Id of application requested this RPC
- */
- void SendSpeakRequest(int32_t app_id);
-
- /*
- * @brief Sends Basic communication playtone notification
- *
- * @param app_id Id of application requested this RPC
- */
- void SendPlayToneNotification(int32_t app_id);
-
- /*
- * @brief Tells if there are sent requests without responses
- */
- bool HasHmiResponsesToWait();
-
- bool awaiting_ui_alert_response_;
- bool awaiting_tts_speak_response_;
- bool awaiting_tts_stop_speaking_response_;
- bool response_success_;
- bool flag_other_component_sent_;
- mobile_apis::Result::eType response_result_;
- smart_objects::SmartObject response_params_;
- mobile_apis::Result::eType tts_speak_response_;
-
- DISALLOW_COPY_AND_ASSIGN(AlertRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h
deleted file mode 100644
index 59b38933a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/alert_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief AlertResponse command class
- **/
-class AlertResponse : public CommandResponseImpl {
- public:
- /**
- * @brief AlertResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit AlertResponse(const MessageSharedPtr& message);
-
- /**
- * @brief AlertResponse class destructor
- **/
- virtual ~AlertResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AlertResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ALERT_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
deleted file mode 100644
index 3fe97ba1c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_request.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/commands/pending.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ChangeRegistrationRequest command class
- **/
-class ChangeRegistrationRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ChangeRegistrationRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ChangeRegistrationRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ChangeRegistrationRequest class destructor
- **/
- virtual ~ChangeRegistrationRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Search for requested language in HMI UI supported languages
- *
- * @return true if language supported by UI, otherwise false
- */
- bool IsLanguageSupportedByUI(const int32_t& hmi_display_lang);
-
- /*
- * @brief Search for requested language in HMI VR supported languages
- *
- * @return true if language supported by VR, otherwise false
- */
- bool IsLanguageSupportedByVR(const int32_t& hmi_display_lang);
-
- /*
- * @brief Search for requested language in HMI TTS supported languages
- *
- * @return true if language supported by TTS, otherwise false
- */
- bool IsLanguageSupportedByTTS(const int32_t& hmi_display_lang);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- /*
- * @brief Checks result codes
- *
- * @return true if one of result codes is success
- */
- static bool WasAnySuccess(const hmi_apis::Common_Result::eType ui,
- const hmi_apis::Common_Result::eType vr,
- const hmi_apis::Common_Result::eType tts);
-
- Pending pending_requests_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType vr_result_;
- hmi_apis::Common_Result::eType tts_result_;
-
- DISALLOW_COPY_AND_ASSIGN(ChangeRegistrationRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_CHANGE_REGISTRATION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h
deleted file mode 100644
index 2cac5f2d5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/change_registration_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CHANGE_REGISTRATION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CHANGE_REGISTRATION_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ChangeRegistrationResponse command class
- **/
-class ChangeRegistrationResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ChangeRegistrationResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ChangeRegistrationResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ChangeRegistrationResponse class destructor
- **/
- virtual ~ChangeRegistrationResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChangeRegistrationResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CHANGE_REGISTRATION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h
deleted file mode 100644
index 1eca8d518..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
-
-#include "application_manager/application.h"
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief CreateInteractionChoiceSetRequest command class
- **/
-class CreateInteractionChoiceSetRequest : public CommandRequestImpl {
- public:
- /**
- * @brief CreateInteractionChoiceSetRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit CreateInteractionChoiceSetRequest(const MessageSharedPtr& message);
-
- /**
- * @brief CreateInteractionChoiceSetRequest class destructor
- **/
- virtual ~CreateInteractionChoiceSetRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
-
- /*
- * @brief Checks incoming choiseSet params.
- * @param app Registred mobile application
- *
- * @return Mobile result code
- */
- mobile_apis::Result::eType CheckChoiceSet(ApplicationConstSharedPtr app);
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare choice ID param
- *
- * return TRUE if there is coincidence of choice ID, otherwise FALSE
- */
- struct CoincidencePredicateChoiceID {
- explicit CoincidencePredicateChoiceID(const uint32_t newItem)
- :newItem_(newItem)
- {};
-
- bool operator()(smart_objects::SmartObject obj) {
- return obj[strings::choice_id].asInt() == newItem_;
- };
-
- const uint32_t newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare menu name param
- *
- * return TRUE if there is coincidence of menu name, otherwise FALSE
- */
- struct CoincidencePredicateMenuName {
- explicit CoincidencePredicateMenuName(const std::string& newItem)
- :newItem_(newItem)
- {};
-
- bool operator()(smart_objects::SmartObject obj) {
- return obj[strings::menu_name].asString() == newItem_;
- };
-
- const std::string& newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckChoiceSet method to compare VR commands param
- *
- * return TRUE if there is coincidence of VR commands, otherwise FALSE
- */
- struct CoincidencePredicateVRCommands {
- explicit CoincidencePredicateVRCommands(const smart_objects::SmartObject& newItem)
- :newItem_(newItem)
- {};
-
- bool operator()(smart_objects::SmartObject obj) {
- return compareStr(obj, newItem_);
- };
-
- const smart_objects::SmartObject& newItem_;
- };
-
- /*
- * @brief Checks if incoming choice set doesn't has similar VR synonyms.
- *
- * @param choice1 Choice to compare
- * @param choice2 Choice to compare
- *
- * return Return TRUE if there are similar VR synonyms in choice set,
- * otherwise FALSE
- */
- bool compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2);
-
- /*
- * @brief Checks VR synonyms ignoring differences in case.
- *
- * @param str1 VR synonym to compare
- * @param str2 VR synonym to compare
- *
- * return Return TRUE if there are similar VR synonyms in choice set,
- * otherwise FALSE
- */
- static bool compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2);
-
- DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CREATE_INTERACTION_CHOICE_SET_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h
deleted file mode 100644
index 965573f4a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief CreateInteractionChoiceSetResponse command class
- **/
-class CreateInteractionChoiceSetResponse : public CommandResponseImpl {
- public:
- /**
- * @brief CreateInteractionChoiceSetResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit CreateInteractionChoiceSetResponse(const MessageSharedPtr& message);
-
- /**
- * @brief CreateInteractionChoiceSetResponse class destructor
- **/
- virtual ~CreateInteractionChoiceSetResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_CREATE_INTERACTION_CHOICE_SET_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h
deleted file mode 100644
index bae0fedd5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_request.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_COMMAND_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_COMMAND_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteCommandRequest command class
- **/
-class DeleteCommandRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteCommandRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteCommandRequest(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteCommandRequest class destructor
- **/
- virtual ~DeleteCommandRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
-
- DISALLOW_COPY_AND_ASSIGN(DeleteCommandRequest);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- bool is_ui_send_;
- bool is_vr_send_;
-
- bool is_ui_received_;
- bool is_vr_received_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType vr_result_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_COMMAND_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h
deleted file mode 100644
index 0fe0f0959..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_command_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_COMMAND_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_COMMAND_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteCommandResponse command class
- **/
-class DeleteCommandResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteCommandResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteCommandResponse(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteCommandResponse class destructor
- **/
- virtual ~DeleteCommandResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteCommandResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_COMMAND_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h
deleted file mode 100644
index e10671091..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_FILE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_FILE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteFileRequest command class
- **/
-class DeleteFileRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteFileRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteFileRequest(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteFileRequest class destructor
- **/
- virtual ~DeleteFileRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteFileRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_FILE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h
deleted file mode 100644
index cfe6aaa4f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_file_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_FILE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_FILE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteFileResponse command class
- **/
-class DeleteFileResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteFileResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteFileResponse(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteFileResponse class destructor
- **/
- virtual ~DeleteFileResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteFileResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_FILE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h
deleted file mode 100644
index f70594993..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_request.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteInteractionChoiceSetRequest command class
- **/
-class DeleteInteractionChoiceSetRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteInteractionChoiceSetRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteInteractionChoiceSetRequest(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteInteractionChoiceSetRequest class destructor
- **/
- virtual ~DeleteInteractionChoiceSetRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
-
- /*
- * @brief Check if requested choice set ID in use by perform interaction
- *
- * @param app mobile application
- */
- bool ChoiceSetInUse(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_INTERACTION_CHOICE_SET_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h
deleted file mode 100644
index 1f641e15b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_interaction_choice_set_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_INTERACTION_CHOICE_SET_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteInteractionChoiceSetResponse command class
- **/
-class DeleteInteractionChoiceSetResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteInteractionChoiceSetResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteInteractionChoiceSetResponse(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteInteractionChoiceSetResponse class destructor
- **/
- virtual ~DeleteInteractionChoiceSetResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteInteractionChoiceSetResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_INTERACTION_CHOICE_SET_RESPONSE_COMMAND_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h
deleted file mode 100644
index 668721805..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_request.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_SUB_MENU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_SUB_MENU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DeleteSubMenuRequest command class
- **/
-class DeleteSubMenuRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DeleteSubMenuRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteSubMenuRequest(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteSubMenuRequest class destructor
- **/
- virtual ~DeleteSubMenuRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Deletes VR commands from SDL for corresponding submenu ID
- *
- * @param app_id Application ID
- *
- * @return TRUE on success, otherwise FALSE
- */
- void DeleteSubMenuVRCommands(ApplicationConstSharedPtr app);
-
- /*
- * @brief Deletes UI commands from SDL for corresponding submenu ID
- *
- * @param app_id Application ID
- *
- * @return TRUE on success, otherwise FALSE
- */
- void DeleteSubMenuUICommands(ApplicationSharedPtr const app);
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_SUB_MENU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h
deleted file mode 100644
index 0bb080e93..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/delete_sub_menu_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_SUB_MENU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_SUB_MENU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ResetGlobalPropertiesResponse command class
- **/
-class DeleteSubMenuResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DeleteSubMenuResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DeleteSubMenuResponse(const MessageSharedPtr& message);
-
- /**
- * @brief DeleteSubMenuResponse class destructor
- **/
- virtual ~DeleteSubMenuResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DELETE_SUB_MENU_RESPONSE_COMMAND_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h
deleted file mode 100644
index 4cda040b4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_request.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAGNOSTIC_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAGNOSTIC_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DiagnosticMessageRequest command class
- **/
-class DiagnosticMessageRequest : public CommandRequestImpl {
- public:
- /**
- * @brief DiagnosticMessageRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DiagnosticMessageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief DiagnosticMessageRequest class destructor
- **/
- virtual ~DiagnosticMessageRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticMessageRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAGNOSTIC_MESSAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h
deleted file mode 100644
index 1b6a6024f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/diagnostic_message_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAGNOSTIC_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DiagnosticMessageResponse command class
- **/
-class DiagnosticMessageResponse : public CommandResponseImpl {
- public:
- /**
- * @brief DiagnosticMessageResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit DiagnosticMessageResponse(const MessageSharedPtr& message);
-
- /**
- * @brief DiagnosticMessageResponse class destructor
- **/
- virtual ~DiagnosticMessageResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticMessageResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAGNOSTIC_MESSAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h
deleted file mode 100644
index 10ffa5b32..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/dial_number_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAL_NUMBER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAL_NUMBER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief DialNumber request command class
- **/
-class DialNumberRequest : public CommandRequestImpl {
- public:
- /**
- * \brief DialNumberRequest class constructor
- **/
- explicit DialNumberRequest(const MessageSharedPtr& message);
-
- /**
- * \brief DialNumberRequest class destructor
- **/
- virtual ~DialNumberRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DialNumberRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_DIAL_NUMBER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_request.h
deleted file mode 100644
index daea178cb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_request.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ENCODED_SYNC_PDATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ENCODED_SYNC_PDATA_REQUEST_H_
-
-#include <string>
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief EncodedSyncPData request command class
- **/
-class EncodedSyncPDataRequest : public CommandRequestImpl {
- public:
- /**
- * \brief EncodedSyncPDataRequest class constructor
- **/
- explicit EncodedSyncPDataRequest(const MessageSharedPtr& message);
-
- /**
- * \brief EncodedSyncPDataRequest class destructor
- **/
- virtual ~EncodedSyncPDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- static const std::string TEMPORARY_HARDCODED_FILENAME;
- static const std::string TEMPORARY_HARDCODED_FOLDERNAME;
-
- DISALLOW_COPY_AND_ASSIGN(EncodedSyncPDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ENCODED_SYNC_PDATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_response.h
deleted file mode 100644
index e067bd0f0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/encoded_sync_pdata_response.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ENCODED_SYNC_PDATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ENCODED_SYNC_PDATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class EncodedSyncPDataResponse : public CommandResponseImpl {
- public:
- /**
- * \brief EncodedSyncPDataResponse class constructor
- **/
- explicit EncodedSyncPDataResponse(const MessageSharedPtr& message);
-
- /**
- * \brief EncodedSyncPDataResponse class destructor
- **/
- virtual ~EncodedSyncPDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EncodedSyncPDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ENCODED_SYNC_PDATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h
deleted file mode 100644
index f291f7a74..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_request.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_END_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_END_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief EndAudioPassThruRequest command class
- **/
-class EndAudioPassThruRequest : public CommandRequestImpl {
- public:
- /**
- * @brief EndAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit EndAudioPassThruRequest(const MessageSharedPtr& message);
-
- /**
- * @brief EndAudioPassThruRequest class destructor
- **/
- virtual ~EndAudioPassThruRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EndAudioPassThruRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_END_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h
deleted file mode 100644
index 5ad5f85e6..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/end_audio_pass_thru_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_END_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_END_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief EndAudioPassThruResponse command class
- **/
-class EndAudioPassThruResponse : public CommandResponseImpl {
- public:
- /**
- * @brief EndAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit EndAudioPassThruResponse(const MessageSharedPtr& message);
-
- /**
- * @brief EndAudioPassThruResponse class destructor
- **/
- virtual ~EndAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EndAudioPassThruResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_END_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
deleted file mode 100644
index c3b39bf91..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/generic_response.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GENERIC_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GENERIC_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class GenericResponse : public CommandResponseImpl {
- public:
- /**
- * \brief GenericResponse class constructor
- **/
- explicit GenericResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
- }
-
- /**
- * \brief GenericResponse class destructor
- **/
- virtual ~GenericResponse() {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GenericResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GENERIC_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h
deleted file mode 100644
index d76ac253b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_request.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_DTCS_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_DTCS_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetDTCsRequest command class
- **/
-class GetDTCsRequest : public CommandRequestImpl {
- public:
- /**
- * @brief GetDTCsRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit GetDTCsRequest(const MessageSharedPtr& message);
-
- /**
- * @brief GetDTCsRequest class destructor
- **/
- virtual ~GetDTCsRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetDTCsRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_DTCS_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h
deleted file mode 100644
index 69ff1fca5..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_dtcs_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_DTCS_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_DTCS_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetDTCsResponse command class
- **/
-class GetDTCsResponse : public CommandResponseImpl {
- public:
- /**
- * @brief GetDTCsResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit GetDTCsResponse(const MessageSharedPtr& message);
-
- /**
- * @brief GetDTCsResponse class destructor
- **/
- virtual ~GetDTCsResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetDTCsResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_DTCS_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h
deleted file mode 100644
index 9a8f7d334..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_request.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class SmartObject;
-
-namespace commands {
-
-/**
- * @brief GetVehicleDataRequest command class
- **/
-class GetVehicleDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief GetVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit GetVehicleDataRequest(const MessageSharedPtr& message);
-
- /**
- * @brief GetVehicleDataRequest class destructor
- **/
- virtual ~GetVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
-
- protected:
- virtual void on_event(const event_engine::Event& event);
-
-#ifdef QT_HMI
- private:
- void SendRequestsToHmi(const int32_t app_id);
-
- struct HmiRequest {
- hmi_apis::Common_Result::eType status;
- bool complete;
- smart_objects::SmartObject value;
- const char* str;
- hmi_apis::FunctionID::eType func_id;
- };
-
- typedef std::vector<HmiRequest> HmiRequests;
- HmiRequests hmi_requests_;
-#endif // #ifdef QT_HMI
-
- DISALLOW_COPY_AND_ASSIGN(GetVehicleDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_VEHICLE_DATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h
deleted file mode 100644
index f0306df6a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/get_vehicle_data_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief GetVehicleDataResponse command class
- **/
-class GetVehicleDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief GetVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit GetVehicleDataResponse(const MessageSharedPtr& message);
-
- /**
- * @brief GetVehicleDataResponse class destructor
- **/
- virtual ~GetVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetVehicleDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_GET_VEHICLE_DATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h
deleted file mode 100644
index 86171f1ff..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_LIST_FILES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_LIST_FILES_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ListFilesRequest command class
- **/
-class ListFilesRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ListFilesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ListFilesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ListFilesRequest class destructor
- **/
- virtual ~ListFilesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ListFilesRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_LIST_FILES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h
deleted file mode 100644
index 6f8e80bae..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/list_files_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_LIST_FILES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_LIST_FILES_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ListFilesResponse command class
- **/
-class ListFilesResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ListFilesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ListFilesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ListFilesResponse class destructor
- **/
- virtual ~ListFilesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ListFilesResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_LIST_FILES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h
deleted file mode 100644
index 875366047..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_app_interface_unregistered_notification.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAppInterfaceUnregisteredNotification class
- **/
-class OnAppInterfaceUnregisteredNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnAppInterfaceUnregisteredNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnAppInterfaceUnregisteredNotification(
- const MessageSharedPtr& message);
-
- /**
- * @brief OnAppInterfaceUnregisteredNotification class destructor
- **/
- virtual ~OnAppInterfaceUnregisteredNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAppInterfaceUnregisteredNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_APP_INTERFACE_UNREGISTERED_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h
deleted file mode 100644
index 67bc31977..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_audio_pass_thru_notification.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnAudioPassThruNotification class used to send notification with binary data written from
- * microphone to mobile device while PerformAudioPassThru is active.
- **/
-class OnAudioPassThruNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnAudioPassThruNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnAudioPassThruNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnAudioPassThruNotification class destructor
- **/
- virtual ~OnAudioPassThruNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnAudioPassThruNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_AUDIO_PASS_THRU_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h
deleted file mode 100644
index d1297ba98..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_event_notification.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_BUTTON_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_BUTTON_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnButtonEventNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
- **/
-class OnButtonEventNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnButtonEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnButtonEventNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnButtonEventNotification class destructor
- **/
- virtual ~OnButtonEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Sends button event notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendButtonEvent(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(OnButtonEventNotification);
-};
-
-} // namespace mobile
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_BUTTON_EVENT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h
deleted file mode 100644
index 0ebdb6d7c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_button_press_notification.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_BUTTON_PRESS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_BUTTON_PRESS_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnButtonPressNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
- **/
-class OnButtonPressNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnButtonPressNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnButtonPressNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnButtonEventCommand class destructor
- **/
- virtual ~OnButtonPressNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Sends button press notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendButtonPress(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(OnButtonPressNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_BUTTON_PRESS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h
deleted file mode 100644
index 751b1e7dd..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_COMMAND_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_COMMAND_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief OnCommandNotification class is used to send notification
- * to mobile device.
- **/
-class OnCommandNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnCommandNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnCommandNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnCommandNotification class destructor
- **/
- virtual ~OnCommandNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
- private:
- DISALLOW_COPY_AND_ASSIGN(OnCommandNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_COMMAND_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h
deleted file mode 100644
index 2f2a3c81f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_driver_distraction_notification.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnDriverDistractionNotification class
- **/
-class OnDriverDistractionNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnDriverDistractionNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnDriverDistractionNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnDriverDistractionNotification class destructor
- **/
- virtual ~OnDriverDistractionNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnDriverDistractionNotification);
-};
-
-} // namespace mobile
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_DRIVER_DISTRACTION_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_encoded_sync_pdata_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_encoded_sync_pdata_notification.h
deleted file mode 100644
index f5e06f661..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_encoded_sync_pdata_notification.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_ENCODED_SYNC_PDATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_ENCODED_SYNC_PDATA_NOTIFICATION_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/timer_thread.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class Application;
-
-/**
- * @brief OnEncodedSyncPDataNotification class is used as callback including binary
- * data of any SyncP packets that SYNC needs to send back to the mobile device
- **/
-class OnEncodedSyncPDataNotification : public CommandResponseImpl {
- public:
- /**
- * @brief OnEncodedSyncPDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnEncodedSyncPDataNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnEncodedSyncPDataNotification class destructor
- **/
- virtual ~OnEncodedSyncPDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Timer callback function
- */
- void onTimer();
-
- private:
- /*
- * @brief Sends sync pdata notification to mobile device
- */
- void SendEncodedPData();
-
- // members
- timer::TimerThread<OnEncodedSyncPDataNotification> timer_;
-
- DISALLOW_COPY_AND_ASSIGN(OnEncodedSyncPDataNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_ENCODED_SYNC_PDATA_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h
deleted file mode 100644
index be8304786..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hash_change_notification.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_HASH_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_HASH_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-namespace mobile {
-
-/**
- * @brief OnHashChangeNotification class
- **/
-class OnHashChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnHashChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnHashChangeNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnHashChangeNotification class destructor
- **/
- virtual ~OnHashChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnHashChangeNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_HASH_CHANGE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h
deleted file mode 100644
index aefa7f9c2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_hmi_status_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_HMI_STATUS_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_HMI_STATUS_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnHMIStatusNotification class
- **/
-class OnHMIStatusNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnHMIStatusNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnHMIStatusNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnHMIStatusNotification class destructor
- **/
- virtual ~OnHMIStatusNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnHMIStatusNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_HMI_STATUS_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h
deleted file mode 100644
index e0d6a258e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_keyboard_input_notification.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnKeyBoardInputNotification class
- **/
-class OnKeyBoardInputNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnKeyBoardInputNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnKeyBoardInputNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnKeyBoardInputNotification class destructor
- **/
- virtual ~OnKeyBoardInputNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnKeyBoardInputNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_KEYBOARD_INPUT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h
deleted file mode 100644
index d16311489..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_language_change_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnLanguageChangeNotification class
- **/
-class OnLanguageChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnLanguageChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnLanguageChangeNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnLanguageChangeNotification class destructor
- **/
- virtual ~OnLanguageChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnLanguageChangeNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_LANGUAGE_CHANGE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h
deleted file mode 100644
index 3cffe8ff4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_permissions_change_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnPermissionsChangeNotification class
- **/
-class OnPermissionsChangeNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnPermissionsChangeNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnPermissionsChangeNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnPermissionsChangeNotification class destructor
- **/
- virtual ~OnPermissionsChangeNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnPermissionsChangeNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_PERMISSIONS_CHANGE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_sync_pdata_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_sync_pdata_notification.h
deleted file mode 100644
index 936a68868..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_sync_pdata_notification.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_SYNC_PDATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_SYNC_PDATA_NOTIFICATION_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/timer_thread.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-class Application;
-
-/**
- * @brief OnSyncPDataNotification class is used as callback including binary
- * data of any SyncP packets that SYNC needs to send back to the mobile device
- **/
-class OnSyncPDataNotification : public CommandResponseImpl {
- public:
- /**
- * @brief OnSyncPDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnSyncPDataNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnSyncPDataNotification class destructor
- **/
- virtual ~OnSyncPDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Timer callback function
- *
- */
- void onTimer();
-
- private:
- /*
- * @brief Sends sync pdata notification to mobile device
- */
- void SendPData();
-
- // members
- timer::TimerThread<OnSyncPDataNotification> timer_;
-
- DISALLOW_COPY_AND_ASSIGN(OnSyncPDataNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_ENCODED_SYNC_PDATA_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h
deleted file mode 100644
index 183b673af..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_system_request_notification.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_SYSTEM_REQUEST_NOTIFICATION_H_
-
-
-#include "application_manager/commands/command_notification_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnSystemRequestNotification class
- **/
-class OnSystemRequestNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnSystemRequestNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnSystemRequestNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnSystemRequestNotification class destructor
- **/
- virtual ~OnSystemRequestNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnSystemRequestNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_SYSTEM_REQUEST_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h
deleted file mode 100644
index 5c34caba3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_tbt_client_state_notification.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnTBTClientStateNotification class
- **/
-class OnTBTClientStateNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnTBTClientStateNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnTBTClientStateNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnTBTClientStateNotification class destructor
- **/
- virtual ~OnTBTClientStateNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTBTClientStateNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_TBT_CLIENT_STATE_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h
deleted file mode 100644
index 1aba3087d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_touch_event_notification.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-/**
- * @brief OnTouchEventNotification class
- **/
-class OnTouchEventNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnTouchEventNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnTouchEventNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnTouchEventNotification class destructor
- **/
- virtual ~OnTouchEventNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OnTouchEventNotification);
-};
-
-} // namespace mobile
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_TOUCH_EVENT_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h
deleted file mode 100644
index 7e64f1963..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/on_vehicle_data_notification.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_VEHICLE_DATA_NOTIFICATION_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_VEHICLE_DATA_NOTIFICATION_H_
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief OnVehicleDataNotification class is used to send notification
- * to mobile device that some button was pressed on HMI.
- **/
-class OnVehicleDataNotification : public CommandNotificationImpl {
- public:
- /**
- * @brief OnVehicleDataNotification class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit OnVehicleDataNotification(const MessageSharedPtr& message);
-
- /**
- * @brief OnVehicleDataNotification class destructor
- **/
- virtual ~OnVehicleDataNotification();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- /*
- * @brief Sends vehicle data notification to mobile device
- *
- * @param app Application to receive notification
- */
- void SendVehicleData(ApplicationConstSharedPtr app);
-
- DISALLOW_COPY_AND_ASSIGN(OnVehicleDataNotification);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_VEHICLE_DATA_NOTIFICATION_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
deleted file mode 100644
index 2968497df..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PerformAudioPassThruRequest command class
- **/
-class PerformAudioPassThruRequest : public CommandRequestImpl {
- public:
- /**
- * @brief PerformAudioPassThruRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit PerformAudioPassThruRequest(const MessageSharedPtr& message);
-
- /**
- * @brief PerformAudioPassThruRequest class destructor
- **/
- virtual ~PerformAudioPassThruRequest();
-
- bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Sends TTS Speak request
- */
- void SendSpeakRequest(const int32_t app_id);
-
- DISALLOW_COPY_AND_ASSIGN(PerformAudioPassThruRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_AUDIO_PASS_THRU_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h
deleted file mode 100644
index d659e59be..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PerformAudioPassThruResponse command class
- **/
-class PerformAudioPassThruResponse : public CommandResponseImpl {
- public:
- /**
- * @brief PerformAudioPassThruResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit PerformAudioPassThruResponse(const MessageSharedPtr& message);
-
- /**
- * @brief PerformAudioPassThruResponse class destructor
- **/
- virtual ~PerformAudioPassThruResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PerformAudioPassThruResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_AUDIO_PASS_THRU_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h
deleted file mode 100644
index 652e73f86..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_INTERACTION_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_INTERACTION_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/timer_thread.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief PerformInteractionRequest command class
- **/
-class PerformInteractionRequest : public CommandRequestImpl {
-
- public:
- /**
- * @brief PerformInteractionRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit PerformInteractionRequest(const MessageSharedPtr& message);
-
- /**
- * @brief PerformInteractionRequest class destructor
- **/
- virtual ~PerformInteractionRequest();
-
- /**
- * @brief Initialize request params
- **/
- virtual bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Timer callback function
- *
- */
- void onTimer();
-
- private:
- /*
- * @brief Function is called by RequestController when request execution time
- * has exceed it's limit
- *
- */
- virtual void onTimeOut();
-
- /*
- * @brief Function will be called when VR_OnCommand event
- * comes
- *
- * @param message which should send to mobile side
- *
- */
- void ProcessVRNotification(const smart_objects::SmartObject& message);
-
- /*
- * @brief Function will be called when event AppUnregistered comes
- *
- * @param message which will be sent to mobile side
- *
- */
- void ProcessAppUnregisteredNotification
- (const smart_objects::SmartObject& message);
-
- /*
- * @brief Sends VRDeleteCommand request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendVrDeleteCommand(ApplicationSharedPtr app);
-
- /*
- * @brief Sends PerformInteraction response to mobile side
- *
- * @param message which should send to mobile side
- *
- */
- void ProcessPerformInteractionResponse
- (const smart_objects::SmartObject& message);
-
- /*
- * @brief Sends VR AddCommand request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendVRAddCommandRequest(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sends UI PerformInteraction request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendUIPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sends TTS PerformInteraction request to HMI
- *
- * @param app_id Application ID
- *
- */
- void SendTTSPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Prepare request for sending to HMI
- *
- * @param array of structure of TTS
- *
- */
- void DeleteParameterFromTTSChunk(smart_objects::SmartObject* array_tts_chunk);
-
- /*
- * @brief Sends UI Show VR help request to HMI
- *
- * @param app_id Application ID
- */
- void SendUIShowVRHelpRequest(ApplicationSharedPtr const app);
-
- /**
- * @brief Creates and Sends Perform interaction to UI.
- */
- void CreateUIPerformInteraction(const smart_objects::SmartObject& msg_params,
- application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Checks if incoming choice set doesn't has similar menu names.
- *
- * @param app_id Application ID
- *
- * return Return TRUE if there are no similar menu names in choice set,
- * otherwise FALSE
- */
- bool CheckChoiceSetMenuNames(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Checks if incoming choice set doesn't has similar VR synonyms.
- *
- * @param app_id Application ID
- *
- * return Return TRUE if there are no similar VR synonyms in choice set,
- * otherwise FALSE
- */
- bool CheckChoiceSetVRSynonyms(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Checks if request with non-sequential positions of vrHelpItems
- * SDLAQ-CRS-466
- *
- * @param app_id Application ID
- *
- * @return TRUE if vrHelpItems positions are sequential,
- * otherwise FALSE
- */
- bool CheckVrHelpItemPositions(application_manager::ApplicationSharedPtr const app);
-
- // members
- timer::TimerThread<PerformInteractionRequest> timer_;
-
- DISALLOW_COPY_AND_ASSIGN(PerformInteractionRequest);
- mobile_apis::Result::eType tts_perform_interaction_code_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_INTERACTION_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h
deleted file mode 100644
index 4ecc149fb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_INTERACTION_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_INTERACTION_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PerformInteractionResponse command class
- **/
-class PerformInteractionResponse : public CommandResponseImpl {
- public:
- /**
- * @brief PerformInteractionResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit PerformInteractionResponse(const MessageSharedPtr& message);
-
- /**
- * @brief PerformInteractionResponse class destructor
- **/
- virtual ~PerformInteractionResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PerformInteractionResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PERFORM_INTERACTION_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h
deleted file mode 100644
index 3b0309417..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PUT_FILE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PUT_FILE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PutFileRequest command class
- **/
-class PutFileRequest : public CommandRequestImpl {
- public:
- /**
- * @brief PutFileRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit PutFileRequest(const MessageSharedPtr& message);
-
- /**
- * @brief PutFileRequest class destructor
- **/
- virtual ~PutFileRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PutFileRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PUT_FILE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h
deleted file mode 100644
index 89ff6ad08..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/put_file_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PUT_FILE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PUT_FILE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief PutFileResponse command class
- **/
-class PutFileResponse : public CommandResponseImpl {
- public:
- /**
- * @brief PutFileResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit PutFileResponse(const MessageSharedPtr& message);
-
- /**
- * @brief PutFileResponse class destructor
- **/
- virtual ~PutFileResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PutFileResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PUT_FILE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h
deleted file mode 100644
index e2e5dbf3d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_request.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ReadDIDRequest command class
- **/
-class ReadDIDRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ReadDIDRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ReadDIDRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ReadDIDRequest class destructor
- **/
- virtual ~ReadDIDRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ReadDIDRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h
deleted file mode 100644
index 80b9b5ea4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/read_did_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ReadDIDResponse command class
- **/
-class ReadDIDResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ReadDIDResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ReadDIDResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ReadDIDResponse class destructor
- **/
- virtual ~ReadDIDResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ReadDIDResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_READ_DID_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
deleted file mode 100644
index 834534234..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
-
-#include <string.h>
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-class Application;
-
-namespace commands {
-
-/**
- * @brief Register app interface request command class
- **/
-class RegisterAppInterfaceRequest : public CommandRequestImpl {
- public:
- /**
- * \brief RegisterAppInterfaceRequest class constructor
- **/
- explicit RegisterAppInterfaceRequest(const MessageSharedPtr& message);
-
- /**
- * @brief RegisterAppInterfaceRequest class destructor
- **/
- virtual ~RegisterAppInterfaceRequest();
-
- /**
- * @brief Init required by command resources
- **/
- virtual bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
- // virtual void cleanUp() = 0;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Sends RegisterAppInterface response to mobile
- *
- *@param application_impl application
- *
- **/
- void SendRegisterAppInterfaceResponseToMobile(
- mobile_apis::Result::eType result = mobile_apis::Result::SUCCESS);
-
- private:
- /*
- * @brief Send addVRcommand request to HMI
- *
- * @param application_impl application
- */
- void SendVrCommandsOnRegisterAppToHMI(
- const application_manager::Application& application_impl);
-
- /*
- * @brief Send ttsSpeak request to HMI
- *
- * @param application_impl application
- */
- void SendTTSChunksToHMI(
- const application_manager::Application& application_impl);
-
- /*
- * @brief Check new ID along with known mobile application ID
- *
- * return TRUE if ID is known already, otherwise - FALSE
- */
- bool IsApplicationWithSameAppIdRegistered();
-
- /*
- * @brief Check for some request param. names restrictions, e.g. for
- * newline characters
- *
- * return SUCCESS if param name pass the check, otherwise - error code
- * will be returned
- */
- mobile_apis::Result::eType CheckRestrictions() const;
-
- /*
- * @brief Removes hidden symbols and spaces
- *
- * return cleared copy of param name
- */
- std::string ClearParamName(std::string param_name) const;
-
-
- /*
- * @brief Check new application parameters (name, tts, vr) for
- * coincidence with already known parameters of registered applications
- *
- * return SUCCESS if there is no coincidence of app.name/TTS/VR synonyms,
- * otherwise appropriate error code returns
- */
- mobile_apis::Result::eType CheckCoincidence();
-
- /*
- * @brief Predicate for using with CheckCoincidence method to compare with TTS SO
- *
- * return TRUE if there is coincidence of TTS text field, otherwise FALSE
- */
- struct CoincidencePredicateTTS {
- explicit CoincidencePredicateTTS(const std::string &newItem)
- :newItem_(newItem)
- {};
-
- bool operator()(smart_objects::SmartObject obj) {
- const std::string text = obj[strings::text].asString();
- return !(strcasecmp(text.c_str(), newItem_.c_str()));
- };
-
- const std::string &newItem_;
- };
-
- /*
- * @brief Predicate for using with CheckCoincidence method to compare with VR synonym SO
- *
- * return TRUE if there is coincidence of VR, otherwise FALSE
- */
- struct CoincidencePredicateVR {
- explicit CoincidencePredicateVR(const std::string &newItem)
- :newItem_(newItem)
- {};
-
- bool operator()(smart_objects::SmartObject obj) {
- const std::string vr_synonym = obj.asString();
- return !(strcasecmp(vr_synonym.c_str(), newItem_.c_str()));
- };
-
- const std::string &newItem_;
- };
-
-
- DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h
deleted file mode 100644
index 14b904e63..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief Register app interface request command class
- **/
-class RegisterAppInterfaceResponse : public CommandResponseImpl {
- public:
- /**
- * \brief RegisterAppInterfaceResponse class constructor
- **/
- explicit RegisterAppInterfaceResponse(const MessageSharedPtr& response)
- : CommandResponseImpl(response) {
- }
-
- /**
- * \brief RegisterAppInterfaceResponse class destructor
- **/
- virtual ~RegisterAppInterfaceResponse() {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h
deleted file mode 100644
index 1c4960f5f..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_request.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-// TODO(DK): Include GlobalProperty header
-/*
- * @brief Names of all global properties that should be unset.
- */
-enum GlobalProperty {
- HELPPROMT = 0,
- TIMEOUTPROMT = 1,
- VRHELPTITLE = 2,
- VRHELPITEMS = 3
-};
-
-/**
- * @brief ResetGlobalPropertiesRequest command class
- **/
-class ResetGlobalPropertiesRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ResetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ResetGlobalPropertiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ResetGlobalPropertiesRequest class destructor
- **/
- virtual ~ResetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Sets default value of the HELPPROMT global property
- * to the first vrCommand of each Command Menu registered in application
- *
- * @param app Registered application
- * @param is_timeout_promp Flag indicating that timeout prompt
- * should be reset
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetHelpPromt(ApplicationSharedPtr app);
-
- /*
- * @brief Sets default value of the TIMEOUTPROMT global property
- * to the first vrCommand of each Command Menu registered in application
- *
- * @param app Registered application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetTimeoutPromt(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sets default value of the VRHELPTITLE global property
- * to the application name
- *
- * @param app Registered application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetVrHelpTitle(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sets default value of the VRHELPITEMS global property
- * to value equal to registered command -1(default command “Help / Cancelâ€.)
- *
- * @param app Registered application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetVrHelpItems(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- DISALLOW_COPY_AND_ASSIGN(ResetGlobalPropertiesRequest);
-
- bool is_ui_send_;
- bool is_tts_send_;
-
- bool is_ui_received_;
- bool is_tts_received_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType tts_result_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h
deleted file mode 100644
index 7c0b8eb00..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/reset_global_properties_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ResetGlobalPropertiesResponse command class
- **/
-class ResetGlobalPropertiesResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ResetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ResetGlobalPropertiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ResetGlobalPropertiesResponse class destructor
- **/
- virtual ~ResetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_RESET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h
deleted file mode 100644
index bf8bc3eba..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_request.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief scrollable message request command class
- **/
-class ScrollabelMessageRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ScrollabeMessageRequest class constructor
- **/
- explicit ScrollabelMessageRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SliderCommand class destructor
- **/
- virtual ~ScrollabelMessageRequest();
-
- /**
- * @brief Initialize request params
- **/
- virtual bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
-
- // members
- mobile_apis::Result::eType result_;
-
- DISALLOW_COPY_AND_ASSIGN(ScrollabelMessageRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
deleted file mode 100644
index 36fd311ad..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/scrollable_message_response.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class ScrollableMessageResponse : public CommandResponseImpl {
- public:
- /**
- * \brief ScrollableMessageResponse class constructor
- **/
- explicit ScrollableMessageResponse(const MessageSharedPtr& message);
-
- /**
- * \brief SpeakResponseCommand class destructor
- **/
- virtual ~ScrollableMessageResponse() {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScrollableMessageResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SCROLLABLE_MESSAGE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h
deleted file mode 100644
index 925a1cd67..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_request.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetDisplayLayoutRequest command class
- **/
-class SetDisplayLayoutRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SetDisplayLayoutRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SetDisplayLayoutRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SetDisplayLayoutRequest class destructor
- **/
- virtual ~SetDisplayLayoutRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- **/
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetDisplayLayoutRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h
deleted file mode 100644
index dbf3de8d8..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_display_layout_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetDisplayLayoutResponse command class
- **/
-class SetDisplayLayoutResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetDisplayLayoutResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SetDisplayLayoutResponse(const MessageSharedPtr& message);
-
- /**
- * @brief SetDisplayLayoutResponse class destructor
- **/
- virtual ~SetDisplayLayoutResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetDisplayLayoutResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_DISPLAY_LAYOUT_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h
deleted file mode 100644
index 92dbccf06..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_request.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Register app interface request command class
- **/
-class SetGlobalPropertiesRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SetGlobalPropertiesRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SetGlobalPropertiesRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SetGlobalPropertiesRequest class destructor
- **/
- virtual ~SetGlobalPropertiesRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Chec if HelpItems order is correct
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckVrHelpItemsOrder();
-
- /*
- * @brief Check if there some not delivered hmi responses exist
- *
- * @return true if all responses received
- */
- bool IsPendingResponseExist();
-
- /*
- * @brief Checks if request has at least one parameter
- *
- * @param params request parameters
- *
- * @returns true if at least one parameter is present in object
- */
- static bool ValidateConditionalMandatoryParameters(
- const smart_objects::SmartObject& params);
-
- DISALLOW_COPY_AND_ASSIGN(SetGlobalPropertiesRequest);
-
- bool is_ui_send_;
- bool is_tts_send_;
-
- bool is_ui_received_;
- bool is_tts_received_;
-
- hmi_apis::Common_Result::eType ui_result_;
- hmi_apis::Common_Result::eType tts_result_;
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h
deleted file mode 100644
index dd80e738e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_global_properties_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Register app interface request command class
- **/
-class SetGlobalPropertiesResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetGlobalPropertiesResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SetGlobalPropertiesResponse(const MessageSharedPtr& message);
-
- /**
- * @brief SetGlobalPropertiesResponse class destructor
- **/
- virtual ~SetGlobalPropertiesResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetGlobalPropertiesResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_GLOBAL_PROPERTIES_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h
deleted file mode 100644
index d46094032..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_request.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetIconRequest command class
- **/
-class SetIconRequest : public CommandRequestImpl {
- public:
- /**
- * @brief Contains information about the type of image
- */
- typedef enum {
- STATIC = 0,
- DYNAMIC
- } ImageType;
-
- /**
- * @brief SetIconRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SetIconRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SetIconRequest class destructor
- **/
- virtual ~SetIconRequest();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetIconRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h
deleted file mode 100644
index 88dceaf5a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_icon_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetIconResponse command class
- **/
-class SetIconResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SetIconResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SetIconResponse(const MessageSharedPtr& message);
-
- /**
- * @brief SetIconResponse class destructor
- **/
- virtual ~SetIconResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetIconResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_ICON_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h
deleted file mode 100644
index e4fae5c0b..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_request.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SetMediaClockRequest request command class
- **/
-class SetMediaClockRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SetMediaClockRequest class constructor
- **/
- explicit SetMediaClockRequest(const MessageSharedPtr& message);
-
- /**
- * \brief ShowCommand class destructor
- **/
- virtual ~SetMediaClockRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- void on_event(const event_engine::Event& event);
-
- private:
- bool isDataValid();
-
- DISALLOW_COPY_AND_ASSIGN(SetMediaClockRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
deleted file mode 100644
index e835c17c8..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/set_media_clock_timer_response.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SetMediaClockTimerResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SetMediaClockTimerResponse class constructor
- **/
- explicit SetMediaClockTimerResponse(const MessageSharedPtr& message);
-
- /**
- * \brief SetMediaClockTimerResponse class destructor
- **/
- virtual ~SetMediaClockTimerResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SetMediaClockTimerResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SET_MEDIA_CLOCK_TIMER_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h
deleted file mode 100644
index 968a30cdb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_request.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ShowConstantTBTRequest command class
- **/
-class ShowConstantTBTRequest : public CommandRequestImpl {
- public:
- /**
- * @brief ShowConstantTBTRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ShowConstantTBTRequest(const MessageSharedPtr& message);
-
- /**
- * @brief ShowConstantTBTRequest class destructor
- **/
- virtual ~ShowConstantTBTRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
-
- // members
- mobile_apis::Result::eType result_;
-
- DISALLOW_COPY_AND_ASSIGN(ShowConstantTBTRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h
deleted file mode 100644
index 6a102b198..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_constant_tbt_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief ShowConstantTBTResponse command class
- **/
-class ShowConstantTBTResponse : public CommandResponseImpl {
- public:
- /**
- * @brief ShowConstantTBTResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit ShowConstantTBTResponse(const MessageSharedPtr& message);
-
- /**
- * @brief ShowConstantTBTResponse class destructor
- **/
- virtual ~ShowConstantTBTResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShowConstantTBTResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_CONSTANT_TBT_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_request.h
deleted file mode 100644
index c187058dc..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_request.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief show request command class
- **/
-class ShowRequest : public CommandRequestImpl {
- public:
- /**
- * \brief ShowRequest class constructor
- **/
- explicit ShowRequest(const MessageSharedPtr& message);
-
- /**
- * \brief ShowRequest class destructor
- **/
- virtual ~ShowRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
-
- /*
- * @brief Check if main fileds{1,2,3,4} have valid syntax
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool CheckMenuFieldsNames();
-
- // members
- mobile_apis::Result::eType result_;
-
- DISALLOW_COPY_AND_ASSIGN(ShowRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
deleted file mode 100644
index 970b54747..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/show_response.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class ShowResponse : public CommandResponseImpl {
- public:
- /**
- * \brief ShowResponse class constructor
- **/
- explicit ShowResponse(const MessageSharedPtr& message);
-
- /**
- * \brief ShowResponse class destructor
- **/
- virtual ~ShowResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShowResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SHOW_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h
deleted file mode 100644
index edfba87a0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_request.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief slider request command class
- **/
-class SliderRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SliderRequest class constructor
- **/
- explicit SliderRequest(const MessageSharedPtr& message);
-
- /**
- * \brief SliderRequest class destructor
- **/
- virtual ~SliderRequest();
-
- /**
- * @brief Initialize request params
- **/
- virtual bool Init();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SliderRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
deleted file mode 100644
index b7821adca..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/slider_response.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SliderResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SliderResponse class constructor
- **/
- explicit SliderResponse(const MessageSharedPtr& message);
-
- /**
- * \brief SpeakResponseCommand class destructor
- **/
- virtual ~SliderResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SliderResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SLIDER_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h
deleted file mode 100644
index 6c4e69977..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_request.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief speak request command class
- **/
-class SpeakRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SpeakRequest class constructor
- **/
- explicit SpeakRequest(const MessageSharedPtr& message);
-
- /**
- * \brief SpeakRequest class destructor
- **/
- virtual ~SpeakRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /*
- * @brief Sends Speak response to mobile side
- *
- * @param message which should send to mobile side
- *
- */
- void ProcessTTSSpeakResponse(const smart_objects::SmartObject& message);
- DISALLOW_COPY_AND_ASSIGN(SpeakRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
deleted file mode 100644
index ef9b8f89d..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/speak_response.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SpeakResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SpeakResponse class constructor
- **/
- explicit SpeakResponse(const MessageSharedPtr& message);
-
- /**
- * \brief SpeakResponse class destructor
- **/
- virtual ~SpeakResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SpeakResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SPEAK_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h
deleted file mode 100644
index b91480dbb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeButtonRequest command class
- **/
-class SubscribeButtonRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SubscribeButtonRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SubscribeButtonRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SubscribeButtonRequest class destructor
- **/
- virtual ~SubscribeButtonRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeButtonRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h
deleted file mode 100644
index 836688454..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeButtonResponse command class
- **/
-class SubscribeButtonResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SubscribeButtonResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SubscribeButtonResponse(const MessageSharedPtr& message);
-
- /**
- * @brief SubscribeButtonResponse class destructor
- **/
- virtual ~SubscribeButtonResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeButtonResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_BUTTON_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h
deleted file mode 100644
index ae657ffe7..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeVehicleDataRequest command class
- **/
-class SubscribeVehicleDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SubscribeVehicleDataRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SubscribeButtonCommandRequest class destructor
- **/
- virtual ~SubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
-#ifdef QT_HMI
- private:
- struct HmiRequest {
- hmi_apis::Common_Result::eType status;
- bool complete;
- smart_objects::SmartObject value;
- const char* str;
- hmi_apis::FunctionID::eType func_id;
- };
-
- typedef std::vector<HmiRequest> HmiRequests;
- HmiRequests hmi_requests_;
-#endif // #ifdef QT_HMI
-
- private:
- bool IsAnythingAlreadySubscribed();
-
- DISALLOW_COPY_AND_ASSIGN(SubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h
deleted file mode 100644
index d2771c071..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/subscribe_vehicle_data_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SubscribeVehicleDataResponse command class
- **/
-class SubscribeVehicleDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SubscribeVehicleDataResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UnsubscribeVehicleDataCommandRequest class destructor
- **/
- virtual ~SubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_request.h
deleted file mode 100644
index e41ab7f36..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_request.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYNC_PDATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYNC_PDATA_REQUEST_H_
-
-#include <string>
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SyncPData request command class
- **/
-class SyncPDataRequest : public CommandRequestImpl {
- public:
- /**
- * \brief SyncPDataRequest class constructor
- **/
- explicit SyncPDataRequest(const MessageSharedPtr& message);
-
- /**
- * \brief SyncPDataRequest class destructor
- **/
- virtual ~SyncPDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- static const std::string TEMPORARY_HARDCODED_FILENAME;
- static const std::string TEMPORARY_HARDCODED_FOLDERNAME;
-
- DISALLOW_COPY_AND_ASSIGN(SyncPDataRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYNC_PDATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_response.h
deleted file mode 100644
index 529a7264a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/sync_pdata_response.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYNC_PDATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYNC_PDATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/message.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-
-class SyncPDataResponse : public CommandResponseImpl {
- public:
- /**
- * \brief SyncPDataResponse class constructor
- **/
- explicit SyncPDataResponse(const MessageSharedPtr& message);
-
- /**
- * \brief SyncPDataResponse class destructor
- **/
- virtual ~SyncPDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SyncPDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SYNC_PDATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_request.h
deleted file mode 100644
index 745b06b3c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_request.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_SYSTEM_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_SYSTEM_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SystemRequest command class
- **/
-class SystemRequest : public CommandRequestImpl {
- public:
- /**
- * @brief SystemRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SystemRequest(const MessageSharedPtr& message);
-
- /**
- * @brief SystemRequest class destructor
- **/
- virtual ~SystemRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SystemRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_SYSTEM_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_response.h
deleted file mode 100644
index ca2fb9997..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/system_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_SYSTEM_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_SYSTEM_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief SystemResponse command class
- **/
-class SystemResponse : public CommandResponseImpl {
- public:
- /**
- * @brief SystemResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit SystemResponse(const MessageSharedPtr& message);
-
- /**
- * @brief SystemResponse class destructor
- **/
- virtual ~SystemResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SystemResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_SYSTEM_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h
deleted file mode 100644
index a5a53736e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_request.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief Unregister app interface request command class
- **/
-class UnregisterAppInterfaceRequest : public CommandRequestImpl {
- public:
- /**
- * \brief UnregisterAppInterfaceRequest class constructor
- **/
- explicit UnregisterAppInterfaceRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
- }
-
- /**
- * \brief UnregisterAppInterfaceRequest class destructor
- **/
- virtual ~UnregisterAppInterfaceRequest() {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
- // virtual void cleanUp() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnregisterAppInterfaceRequest);
-};
-
-} // namespace commands
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h
deleted file mode 100644
index 5c8928a6c..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unregister_app_interface_response.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace commands {
-/**
- * @brief Unregister app interface request command class
- **/
-class UnregisterAppInterfaceResponse : public CommandResponseImpl {
- public:
- /**
- * \brief UnregisterAppInterfaceResponse class constructor
- **/
- explicit UnregisterAppInterfaceResponse(const MessageSharedPtr& response)
- : CommandResponseImpl(response) {
- }
-
- /**
- * \brief UnregisterAppInterfaceResponse class destructor
- **/
- virtual ~UnregisterAppInterfaceResponse() {
- }
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnregisterAppInterfaceResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNREGISTER_APP_INTERFACE_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h
deleted file mode 100644
index 3ec216de2..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_request.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeButtonRequest command class
- **/
-class UnsubscribeButtonRequest : public CommandRequestImpl {
- public:
- /**
- * @brief UnsubscribeButtonRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UnsubscribeButtonRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UnsubscribeButtonRequest class destructor
- **/
- virtual ~UnsubscribeButtonRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeButtonRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h
deleted file mode 100644
index 972da4806..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_button_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeButtonResponse command class
- **/
-class UnsubscribeButtonResponse : public CommandResponseImpl {
- public:
- /**
- * @brief UnsubscribeButtonResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UnsubscribeButtonResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UnsubscribeButtonResponse class destructor
- **/
- virtual ~UnsubscribeButtonResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeButtonResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_BUTTON_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h
deleted file mode 100644
index be8a00389..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_request.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeVehicleDataRequest command class
- **/
-class UnsubscribeVehicleDataRequest : public CommandRequestImpl {
- public:
- /**
- * @brief UnsubscribeVehicleDataRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UnsubscribeVehicleDataRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UnsubscribeVehicleDataRequest class destructor
- **/
- virtual ~UnsubscribeVehicleDataRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
-#ifdef QT_HMI
- private:
- struct HmiRequest {
- hmi_apis::Common_Result::eType status;
- bool complete;
- smart_objects::SmartObject value;
- const char* str;
- hmi_apis::FunctionID::eType func_id;
- };
-
- typedef std::vector<HmiRequest> HmiRequests;
- HmiRequests hmi_requests_;
-#endif // #ifdef QT_HMI
-
- private:
- bool IsAnythingAlreadyUnsubscribed();
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeVehicleDataRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h
deleted file mode 100644
index 3fb932ecf..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_vehicle_data_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UnsubscribeVehicleDataResponse command class
- **/
-class UnsubscribeVehicleDataResponse : public CommandResponseImpl {
- public:
- /**
- * @brief UnsubscribeVehicleDataResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UnsubscribeVehicleDataResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UnsubscribeVehicleDataResponse class destructor
- **/
- virtual ~UnsubscribeVehicleDataResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsubscribeVehicleDataResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_VEHICLE_DATA_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h
deleted file mode 100644
index 0ae79a54e..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_request.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
-
-#include "application_manager/commands/command_request_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateTurnListRequest command class
- **/
-class UpdateTurnListRequest : public CommandRequestImpl {
- public:
- /**
- * @brief UpdateTurnListRequest class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UpdateTurnListRequest(const MessageSharedPtr& message);
-
- /**
- * @brief UpdateTurnListRequest class destructor
- **/
- virtual ~UpdateTurnListRequest();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const event_engine::Event& event);
-
- private:
- /**
- * @brief check correct parameter turnList
- *
- * @return TRUE if turnList is correct,
- * otherwise FALSE
- */
- bool CheckTurnListArray();
-
- // members
- mobile_apis::Result::eType result_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateTurnListRequest);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_REQUEST_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h
deleted file mode 100644
index fdbf64826..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/mobile/update_turn_list_response.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
-
-#include "application_manager/commands/command_response_impl.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/**
- * @brief UpdateTurnListResponse command class
- **/
-class UpdateTurnListResponse : public CommandResponseImpl {
- public:
- /**
- * @brief UpdateTurnListResponse class constructor
- *
- * @param message Incoming SmartObject message
- **/
- explicit UpdateTurnListResponse(const MessageSharedPtr& message);
-
- /**
- * @brief UpdateTurnListResponse class destructor
- **/
- virtual ~UpdateTurnListResponse();
-
- /**
- * @brief Execute command
- **/
- virtual void Run();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UpdateTurnListResponse);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UPDATE_TURN_LIST_RESPONSE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/commands/pending.h b/SDL_Core/src/components/application_manager/include/application_manager/commands/pending.h
deleted file mode 100644
index bbfc24665..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/commands/pending.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PENDING_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PENDING_H_
-
-#include <set>
-#include "utils/macro.h"
-#include "utils/lock.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-/*
- * @brief Class for monitoring of pending requests/responses to HMI
- */
-class Pending {
- public:
- /*
- * Constructor
- */
- Pending();
-
- /*
- * Destructor
- */
- ~Pending();
-
- void Add(hmi_apis::FunctionID::eType id);
- void Remove(hmi_apis::FunctionID::eType id);
- bool IsFinal(hmi_apis::FunctionID::eType id);
-
- private:
- std::set<hmi_apis::FunctionID::eType> pending_;
- sync_primitives::Lock lock_;
- hmi_apis::FunctionID::eType last_;
- DISALLOW_COPY_AND_ASSIGN(Pending);
-};
-
-} // namespace commands
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_PENDING_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event.h b/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event.h
deleted file mode 100644
index e76b767f1..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_H_
-
-#include <interfaces/HMI_API.h>
-
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace application_manager {
-namespace event_engine {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-class Event {
- public:
-
- // Typedef for possible Event ID's from mobile_apis functionID enum
- typedef hmi_apis::FunctionID::eType EventID;
-
- /*
- * @brief Constructor with parameters
- *
- * @param id Event ID. Please see mobile_apis::FunctionID for possible ID's
- */
- explicit Event(const EventID& id);
-
- /*
- * @brief Destructor
- */
- virtual ~Event();
-
- /*
- * @brief Sends synchronously event to all subscribers.
- *
- */
- void raise();
-
- /*
- * @brief Provides event ID
- */
- inline const EventID& id() const;
-
- /*
- * @brief Sets event smart object
- *
- * @param so The smart_object received in HMI response
- */
- void set_smart_object(smart_objects::SmartObject& so);
-
- /*
- * @brief Retrieves event smart object
- *
- * @return The smart_object received in HMI response
- */
- inline const smart_objects::SmartObject& smart_object() const;
-
- /*
- * @brief Retrieves smart object request ID
- */
- inline int32_t smart_object_function_id() const;
-
- /*
- * @brief Retrieves smart object correlation ID
- */
- inline int32_t smart_object_correlation_id() const;
-
- /*
- * @brief Retrieves smart_object response type
- */
- inline int32_t smart_object_type() const;
-
- protected:
-
- private:
-
- EventID id_;
- smart_objects::SmartObject response_so_;
-
- /*
- * @brief Default constructor
- *
- * Unimplemented to avoid misusing
- */
- Event();
-
- DISALLOW_COPY_AND_ASSIGN(Event);
-};
-
-const Event::EventID& Event::id() const {
- return id_;
-}
-
-const smart_objects::SmartObject& Event::smart_object() const {
- return response_so_;
-}
-
-int32_t Event::smart_object_function_id() const {
- return response_so_.getElement(
- strings::params).getElement(strings::function_id).asInt();
-}
-
-int32_t Event::smart_object_correlation_id() const {
- return response_so_.getElement(
- strings::params).getElement(strings::correlation_id).asInt();
-}
-
-int32_t Event::smart_object_type() const {
- return response_so_.getElement(
- strings::params).getElement(strings::message_type).asInt();
-}
-
-}
-}
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h b/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h
deleted file mode 100644
index fb7d4cd50..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_dispatcher.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_DISPATCHER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_DISPATCHER_H_
-
-#include <list>
-#include <map>
-
-#include "utils/lock.h"
-#include "utils/singleton.h"
-
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-namespace event_engine {
-
-class EventObserver;
-
-class EventDispatcher : public utils::Singleton<EventDispatcher> {
- public:
-
- /*
- * @brief Delivers the event to all subscribers
- *
- * @param event Received event
- */
- void raise_event(const Event& event);
-
- /*
- * @brief Subscribe the observer to event
- *
- * @param event_id The event ID to subscribe for
- * @param hmi_correlation_id The event HMI correlation ID
- * @param observer The observer to subscribe for event
- */
- void add_observer(const Event::EventID& event_id,
- int32_t hmi_correlation_id,
- EventObserver* const observer);
-
- /*
- * @brief Unsubscribes the observer from specific event
- *
- * @param event_id The event ID to unsubscribe from
- * @param observer The observer to be unsubscribed
- */
- void remove_observer(const Event::EventID& event_id,
- EventObserver* const observer);
-
- /*
- * @brief Unsubscribes the observer from all events
- *
- * @param observer The observer to be unsubscribed
- */
- void remove_observer(EventObserver* const observer);
-
- protected:
-
- private:
-
- /*
- * @brief Default constructor
- */
- EventDispatcher();
-
- /*
- * @brief Destructor
- */
- virtual ~EventDispatcher();
-
- DISALLOW_COPY_AND_ASSIGN(EventDispatcher);
-
- FRIEND_BASE_SINGLETON_CLASS(EventDispatcher);
-
- // Data types section
- typedef std::list<EventObserver*> ObserverList;
- typedef std::map<int32_t, ObserverList> ObserversMap;
- typedef std::map<Event::EventID, ObserversMap> EventObserverMap;
-
- // Members section
- sync_primitives::Lock state_lock_;
- EventObserverMap observers_;
-};
-
-}
-}
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_DISPATCHER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_observer.h b/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_observer.h
deleted file mode 100644
index 863120329..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/event_engine/event_observer.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_OBSERVER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_OBSERVER_H_
-
-#include <string>
-#include "application_manager/event_engine/event.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-
-namespace application_manager {
-namespace event_engine {
-
-class EventObserver
-{
- public:
-
- friend class EventDispatcher;
-
- // Typedef for possible Observer ID's from mobile_apis functionID enum
- typedef unsigned long ObserverID;
-
- /*
- * @brief Constructor
- *
- */
- EventObserver();
-
- /*
- * @brief Destructor
- */
- virtual ~EventObserver();
-
- /**
- * @brief Retrieves observer unique id
- *
- * @return Unique Observer id
- */
- inline const ObserverID& id() const;
-
- /**
- * @brief Interface method that is called whenever new event received
- *
- * @param event The received event
- */
- virtual void on_event(const Event& event) = 0;
-
- protected:
-
- /*
- * @brief Subscribe to an event
- *
- * @param event_id The event ID to subscribe for
- * @param hmi_correlation_id The event HMI correlation ID.
- * If param is omitted, it means subscription for HMI notification
- */
- void subscribe_on_event(
- const Event::EventID& event_id, int32_t hmi_correlation_id = 0);
-
- /*
- * @brief Unsubscribes the observer from specific event
- *
- * @param event_id The event ID to unsubscribe from
- */
- void unsubscribe_from_event(const Event::EventID& event_id);
-
- /*
- * @brief Unsubscribes the observer from all events
- *
- */
- void unsubscribe_from_all_events();
-
- private:
-
- ObserverID id_;
-
- DISALLOW_COPY_AND_ASSIGN(EventObserver);
-};
-
-const EventObserver::ObserverID& EventObserver::id() const {
- return id_;
-}
-
-}
-}
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_EVENT_OBSERVER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/hmi_capabilities.h b/SDL_Core/src/components/application_manager/include/application_manager/hmi_capabilities.h
deleted file mode 100644
index 2ac8fd9c4..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/hmi_capabilities.h
+++ /dev/null
@@ -1,515 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_CAPABILITIES_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_CAPABILITIES_H_
-
-#include "interfaces/HMI_API.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-namespace application_manager {
-
-class ApplicationManagerImpl;
-
-class HMICapabilities {
-
- public:
-
- /*
- * @ Class constructor
- *
- * @param app_mngr Application manager pointer
- */
- explicit HMICapabilities(ApplicationManagerImpl* const app_mngr);
-
- /*
- * @brief Class destructor
- *
- */
- virtual ~HMICapabilities();
-
- /**
- * @brief Checks if all HMI capabilities received
- *
- * @return TRUE if all information received, otherwise FALSE
- */
- bool is_hmi_capabilities_initialized() const;
-
- /*
- * @brief Checks is image type(Static/Dynamic) requested by
- * Mobile Device is supported on current HMI.
- * @param image_type recieved type of image from Enum.
- * @return Bool true if supported
- */
- bool VerifyImageType(int32_t image_type) const;
-
- /**
- * @brief Checks if all HMI capabilities received
- *
- * @return TRUE if all information received, otherwise FALSE
- */
- inline bool is_vr_cooperating() const;
- void set_is_vr_cooperating(bool value);
-
- inline bool is_tts_cooperating() const;
- void set_is_tts_cooperating(bool value);
-
- inline bool is_ui_cooperating() const;
- void set_is_ui_cooperating(bool value);
-
- inline bool is_navi_cooperating() const;
- void set_is_navi_cooperating(bool value);
-
- inline bool is_ivi_cooperating() const;
- void set_is_ivi_cooperating(bool value);
-
- /*
- * @brief Retrieves if mixing audio is supported by HMI
- * (ie recording TTS command and playing audio)
- *
- * @return Current state of the mixing audio flag
- */
- inline bool attenuated_supported() const;
-
- /*
- * @brief Sets state for mixing audio
- *
- * @param state New state to be set
- */
- void set_attenuated_supported(bool state);
-
- /*
- * @brief Retrieves currently active UI language
- *
- * @return Currently active UI language
- */
- inline const hmi_apis::Common_Language::eType&
- active_ui_language() const;
-
- /*
- * @brief Sets currently active UI language
- *
- * @param language Currently active UI language
- */
- void set_active_ui_language(const hmi_apis::Common_Language::eType& language);
-
- /*
- * @brief Retrieves UI supported languages
- *
- * @return Currently supported UI languages
- */
- inline const smart_objects::SmartObject*
- ui_supported_languages() const;
-
- /*
- * @brief Sets supported UI languages
- *
- * @param supported_languages Supported UI languages
- */
- void set_ui_supported_languages(
- const smart_objects::SmartObject& supported_languages);
-
- /*
- * @brief Retrieves currently active VR language
- *
- * @return Currently active VR language
- */
- inline const hmi_apis::Common_Language::eType&
- active_vr_language() const;
-
- /*
- * @brief Sets currently active VR language
- *
- * @param language Currently active VR language
- */
- void set_active_vr_language(const hmi_apis::Common_Language::eType& language);
-
- /*
- * @brief Retrieves VR supported languages
- *
- * @return Currently supported VR languages
- */
- inline const smart_objects::SmartObject*
- vr_supported_languages() const;
-
- /*
- * @brief Sets supported VR languages
- *
- * @param supported_languages Supported VR languages
- */
- void set_vr_supported_languages(
- const smart_objects::SmartObject& supported_languages);
-
- /*
- * @brief Retrieves currently active TTS language
- *
- * @return Currently active TTS language
- */
- inline const hmi_apis::Common_Language::eType&
- active_tts_language() const;
-
- /*
- * @brief Sets currently active TTS language
- *
- * @param language Currently active TTS language
- */
- void set_active_tts_language(
- const hmi_apis::Common_Language::eType& language);
-
- /*
- * @brief Retrieves TTS supported languages
- *
- * @return Currently supported TTS languages
- */
- inline const smart_objects::SmartObject*
- tts_supported_languages() const;
-
- /*
- * @brief Sets supported TTS languages
- *
- * @param supported_languages Supported TTS languages
- */
- void set_tts_supported_languages(
- const smart_objects::SmartObject& supported_languages);
-
- /*
- * @brief Retrieves information about the display capabilities
- *
- * @return Currently supported display capabilities
- */
- inline const smart_objects::SmartObject*
- display_capabilities() const;
-
- /*
- * @brief Sets supported display capabilities
- *
- * @param display_capabilities supported display capabilities
- */
- void set_display_capabilities(
- const smart_objects::SmartObject& display_capabilities);
-
- /*
- * @brief Retrieves information about the HMI zone capabilities
- *
- * @return Currently supported HMI zone capabilities
- */
- inline const smart_objects::SmartObject*
- hmi_zone_capabilities() const;
-
- /*
- * @brief Sets supported HMI zone capabilities
- *
- * @param hmi_zone_capabilities supported HMI zone capabilities
- */
- void set_hmi_zone_capabilities(
- const smart_objects::SmartObject& hmi_zone_capabilities);
-
- /*
- * @brief Retrieves information about the SoftButton's capabilities
- *
- * @return Currently supported SoftButton's capabilities
- */
- inline const smart_objects::SmartObject*
- soft_button_capabilities() const;
-
- /*
- * @brief Sets supported SoftButton's capabilities
- *
- * @param soft_button_capabilities supported SoftButton's capabilities
- */
- void set_soft_button_capabilities(
- const smart_objects::SmartObject& soft_button_capabilities);
-
- /*
- * @brief Retrieves information about the Button's capabilities
- *
- * @return Currently supported Button's capabilities
- */
- inline const smart_objects::SmartObject* button_capabilities() const;
-
- /*
- * @brief Sets supported Button's capabilities
- *
- * @param soft_button_capabilities supported Button's capabilities
- */
- void set_button_capabilities(
- const smart_objects::SmartObject& button_capabilities);
-
- /*
- * @brief Sets supported speech capabilities
- *
- * @param speech_capabilities supported speech capabilities
- */
- void set_speech_capabilities(
- const smart_objects::SmartObject& speech_capabilities);
-
- /*
- * @brief Retrieves information about the speech capabilities
- *
- * @return Currently supported speech capabilities
- */
- inline const smart_objects::SmartObject* speech_capabilities() const;
-
- /*
- * @brief Sets supported VR capabilities
- *
- * @param vr_capabilities supported VR capabilities
- */
- void set_vr_capabilities(const smart_objects::SmartObject& vr_capabilities);
-
- /*
- * @brief Retrieves information about the VR capabilities
- *
- * @return Currently supported VR capabilities
- */
- inline const smart_objects::SmartObject* vr_capabilities() const;
-
- /*
- * @brief Sets supported audio_pass_thru capabilities
- *
- * @param vr_capabilities supported audio_pass_thru capabilities
- */
- void set_audio_pass_thru_capabilities(
- const smart_objects::SmartObject& audio_pass_thru_capabilities);
-
- /*
- * @brief Retrieves information about the audio_pass_thru capabilities
- *
- * @return Currently supported audio_pass_thru capabilities
- */
- inline const smart_objects::SmartObject*
- audio_pass_thru_capabilities() const;
-
- /*
- * @brief Retrieves information about the preset bank capabilities
- *
- * @return Currently supported preset bank capabilities
- */
- inline const smart_objects::SmartObject* preset_bank_capabilities() const;
-
- /*
- * @brief Sets supported preset bank capabilities
- *
- * @param soft_button_capabilities supported preset bank capabilities
- */
- void set_preset_bank_capabilities(
- const smart_objects::SmartObject& preset_bank_capabilities);
-
- /*
- * @brief Sets vehicle information(make, model, modelYear)
- *
- * @param vehicle_type Cuurent vehicle information
- */
- void set_vehicle_type(const smart_objects::SmartObject& vehicle_type);
-
- /*
- * @brief Retrieves vehicle information(make, model, modelYear)
- *
- * @param vehicle_type Cuurent vehicle information
- */
- inline const smart_objects::SmartObject* vehicle_type() const;
-
- /*
- * @brief Retrieves information about the prerecorded speech
- *
- * @return Currently supported prerecorded speech
- */
- inline const smart_objects::SmartObject* prerecorded_speech() const;
-
- /*
- * @brief Sets supported prerecorded speech
- *
- * @param prerecorded_speech supported prerecorded speech
- */
- void set_prerecorded_speech(
- const smart_objects::SmartObject& prerecorded_speech);
-
-
- protected:
-
- /*
- * @brief Loads capabilities from local file in case SDL was launched
- * without HMI
- *
- * @return TRUE if capabilities loaded successfully, otherwise FALSE.
- */
- bool load_capabilities_from_file();
-
- private:
- bool is_vr_cooperating_;
- bool is_tts_cooperating_;
- bool is_ui_cooperating_;
- bool is_navi_cooperating_;
- bool is_ivi_cooperating_;
-
- // to check if IsReady response for corresponding interface received
- bool is_vr_ready_response_recieved_;
- bool is_tts_ready_response_recieved_;
- bool is_ui_ready_response_recieved_;
- bool is_navi_ready_response_recieved_;
- bool is_ivi_ready_response_recieved_;
-
- bool attenuated_supported_;
- hmi_apis::Common_Language::eType ui_language_;
- hmi_apis::Common_Language::eType vr_language_;
- hmi_apis::Common_Language::eType tts_language_;
- smart_objects::SmartObject* vehicle_type_;
- smart_objects::SmartObject* ui_supported_languages_;
- smart_objects::SmartObject* tts_supported_languages_;
- smart_objects::SmartObject* vr_supported_languages_;
- smart_objects::SmartObject* display_capabilities_;
- smart_objects::SmartObject* hmi_zone_capabilities_;
- smart_objects::SmartObject* soft_buttons_capabilities_;
- smart_objects::SmartObject* button_capabilities_;
- smart_objects::SmartObject* preset_bank_capabilities_;
- smart_objects::SmartObject* vr_capabilities_;
- smart_objects::SmartObject* speech_capabilities_;
- smart_objects::SmartObject* audio_pass_thru_capabilities_;
- smart_objects::SmartObject* prerecorded_speech_;
-
- ApplicationManagerImpl* app_mngr_;
-
- DISALLOW_COPY_AND_ASSIGN(HMICapabilities);
-};
-
-bool HMICapabilities::is_ui_cooperating() const {
- return is_ui_cooperating_;
-}
-
-bool HMICapabilities::is_vr_cooperating() const {
- return is_vr_cooperating_;
-}
-
-bool HMICapabilities::is_tts_cooperating() const {
- return is_tts_cooperating_;
-}
-
-bool HMICapabilities::is_navi_cooperating() const {
- return is_navi_cooperating_;
-}
-
-bool HMICapabilities::is_ivi_cooperating() const {
- return is_ivi_cooperating_;
-}
-
-const hmi_apis::Common_Language::eType&
-HMICapabilities::active_ui_language() const {
- return ui_language_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::ui_supported_languages() const {
- return ui_supported_languages_;
-}
-
-const hmi_apis::Common_Language::eType&
-HMICapabilities::active_vr_language() const {
- return vr_language_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::vr_supported_languages() const {
- return vr_supported_languages_;
-}
-
-const hmi_apis::Common_Language::eType&
-HMICapabilities::active_tts_language() const {
- return tts_language_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::tts_supported_languages() const {
- return tts_supported_languages_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::display_capabilities() const {
- return display_capabilities_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::hmi_zone_capabilities() const {
- return hmi_zone_capabilities_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::soft_button_capabilities() const {
- return soft_buttons_capabilities_;
-}
-
-const smart_objects::SmartObject* HMICapabilities::button_capabilities() const {
- return button_capabilities_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::speech_capabilities() const {
- return speech_capabilities_;
-}
-
-const smart_objects::SmartObject* HMICapabilities::vr_capabilities() const {
- return vr_capabilities_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::audio_pass_thru_capabilities() const {
- return audio_pass_thru_capabilities_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::preset_bank_capabilities() const {
- return preset_bank_capabilities_;
-}
-
-bool HMICapabilities::attenuated_supported() const {
- return attenuated_supported_;
-}
-
-const smart_objects::SmartObject* HMICapabilities::vehicle_type() const {
- return vehicle_type_;
-}
-
-const smart_objects::SmartObject*
-HMICapabilities::prerecorded_speech() const {
- return prerecorded_speech_;
-}
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_CAPABILITIES_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/hmi_command_factory.h b/SDL_Core/src/components/application_manager/include/application_manager/hmi_command_factory.h
deleted file mode 100644
index de0fa7e25..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/hmi_command_factory.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_COMMAND_FACTORY_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_COMMAND_FACTORY_H_
-
-#include "application_manager/commands/command.h"
-#include "utils/macro.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-typedef utils::SharedPtr<commands::Command> CommandSharedPtr;
-
-/**
- * @brief Factory class for command creation
- **/
-class HMICommandFactory {
- public:
- /**
- * @brief Create command object and return pointer to it
- *
- * @param smartObject SmartObject shared pointer.
- * @return Pointer to created command object.
- **/
- static CommandSharedPtr CreateCommand(const MessageSharedPtr& message);
-
- private:
- HMICommandFactory();
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(HMICommandFactory);
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_HMI_COMMAND_FACTORY_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/message.h b/SDL_Core/src/components/application_manager/include/application_manager/message.h
deleted file mode 100644
index 0b439c245..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/message.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MESSAGE_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MESSAGE_H_
-
-#include <string>
-#include <vector>
-
-#include "utils/shared_ptr.h"
-#include "protocol_handler/message_priority.h"
-#include "smart_objects/smart_object.h"
-#include "protocol_handler/rpc_type.h"
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-namespace application_manager {
-
-typedef std::vector<uint8_t> BinaryData;
-
-// Message type is a general type used by both mobile and HMI messages
-enum MessageType {
- kUnknownType = -1,
- kRequest = 0,
- kResponse = 1,
- kNotification = 2,
- kErrorResponse = 3
-};
-
-// Map PrcType to corresponding MessageType
-MessageType MessageTypeFromRpcType(protocol_handler::RpcType rpc_type);
-
-enum ProtocolVersion {
- kUnknownProtocol = -1,
- kHMI = 0,
- kV1 = 1,
- kV2 = 2
-};
-
-class Message {
- public:
- Message(protocol_handler::MessagePriority priority);
- Message(const Message& message);
- Message& operator=(const Message& message);
- bool operator==(const Message& message);
- ~Message();
-
- //! --------------------------------------------------------------------------
- int32_t function_id() const;
- int32_t correlation_id() const;
- int32_t connection_key() const;
-
- MessageType type() const;
- ProtocolVersion protocol_version() const;
-
- const std::string& json_message() const;
- const BinaryData* binary_data() const;
- bool has_binary_data() const;
- const smart_objects::SmartObject& smart_object() const;
-
- //! --------------------------------------------------------------------------
- void set_function_id(int32_t id);
- void set_correlation_id(int32_t id);
- void set_connection_key(int32_t key);
- void set_message_type(MessageType type);
- void set_binary_data(BinaryData* data);
- void set_json_message(const std::string& json_message);
- void set_protocol_version(ProtocolVersion version);
- void set_smart_object(const smart_objects::SmartObject& object);
-
- protocol_handler::MessagePriority Priority() const { return priority_; }
-
- private:
- int32_t function_id_; // @remark protocol V2.
- int32_t correlation_id_; // @remark protocol V2.
- MessageType type_; // @remark protocol V2.
-
- // Pre-calculated message priority, higher priority messages are
- // Processed first
- protocol_handler::MessagePriority priority_;
-
- int32_t connection_key_;
- ProtocolVersion version_;
- std::string json_message_;
- smart_objects::SmartObject smart_object_;
-
- // TODO(akandul): replace with shared_ptr
- BinaryData* binary_data_;
-};
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MESSAGE_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/message_helper.h b/SDL_Core/src/components/application_manager/include/application_manager/message_helper.h
deleted file mode 100644
index a65321690..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/message_helper.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MESSAGE_HELPER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MESSAGE_HELPER_H_
-
-#include <map>
-#include <string>
-#include "interfaces/MOBILE_API.h"
-#include "utils/macro.h"
-#include "connection_handler/device.h"
-#include "application_manager/application.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace application_manager {
-namespace mobile_api = mobile_apis;
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-/*
- * @brief Typedef for HMI TextFieldName type
- */
-typedef enum {
- MAIN_FILED1 = 0,
- MAIN_FILED2,
- MAIN_FILED3,
- MAIN_FILED4,
- STATUS_BAR,
- MEDIA_CLOCK,
- MEDIA_TRACK,
- ALERT_TEXT1,
- ALERT_TEXT2,
- ALERT_TEXT3,
- SCROLLABLE_MSG_BODY,
- INITIAL_INTERACTION_TEXT,
- NAVI_TEXT1,
- NAVI_TEXT2,
- ETA,
- TOTAL_DISTANCE,
- NAVI_TEXT,
- AUDIO_DISPLAY_TEXT1,
- AUDIO_DISPLAY_TEXT2,
- SLIDER_HADER,
- SLIDER_FOOTEER
-} TextFieldName;
-
-/*
- * @brief Typedef for the vehicle data types that can
- * be published and subscribed to
- */
-typedef enum {
- GPS = 0,
- SPEED,
- RPM,
- FUELLEVEL,
- FUELLEVEL_STATE,
- FUELCONSUMPTION,
- EXTERNTEMP,
- VIN,
- PRNDL,
- TIREPRESSURE,
- ODOMETER,
- BELTSTATUS,
- BODYINFO,
- DEVICESTATUS,
- ECALLINFO,
- AIRBAGSTATUS,
- EMERGENCYEVENT,
- CLUSTERMODESTATUS,
- MYKEY,
- BRAKING,
- WIPERSTATUS,
- HEADLAMPSTATUS,
- BATTVOLTAGE,
- ENGINETORQUE,
- ACCPEDAL,
- STEERINGWHEEL
-} VehicleDataType;
-
-/*
- * @brief Typedef for VehicleData
- *
- * @param const char* Name of the parameter in mobile request
- * @param VehicleDataType Enum for vehicle data
- */
-typedef std::map<const char*, VehicleDataType> VehicleData;
-
-/**
- * @brief MessageHelper class
- **/
-class MessageHelper {
- public:
-
- typedef std::vector<smart_objects::SmartObject*> SmartObjectList;
-
- /**
- * @brief Sends HMI status notification to mobile
- *
- *@param application_impl application with changed HMI status
- *
- **/
- static void SendHMIStatusNotification(const Application& application_impl);
-
- /**
- * @brief Sends OnAppRegistered notification to HMI
- *
- *@param application_impl application with changed HMI status
- *
- **/
- static void SendOnAppRegisteredNotificationToHMI(
- const Application& application_impl);
-
- /**
- * @brief Sendss Vr Command 'Help'
- */
- static void SendHelpVrCommand();
-
- /**
- * @brief Create mobile HashUpdateNotification
- */
- static smart_objects::SmartObject* GetHashUpdateNotification(const uint32_t app_id);
-
- /**
- * @brief Sends to mobile HashUpdateNotification
- */
- static void SendHashUpdateNotification(const uint32_t app_id);
-
- /**
- * @brief Removes Vr Synonyms of application name from HMI
- * when unregistering application.
- */
- static void SendRemoveVrCommandsOnUnregisterApp(ApplicationConstSharedPtr app);
-
- /**
- * @brief Sends OnAppInterfaceUnregistered notification to mobile
- *
- *@param connection_key Connection key
- *@param reason Reason
- *
- **/
- static void SendOnAppInterfaceUnregisteredNotificationToMobile(
- int32_t connection_key,
- mobile_apis::AppInterfaceUnregisteredReason::eType reason);
-
- /*
- * @brief Retrieve vehicle data map for param name in mobile request
- * to VehicleDataType
- *
- * @return VehicleData reference
- */
- static const VehicleData& vehicle_data();
-
- static smart_objects::SmartObject* CreateBlockedByPoliciesResponse(
- mobile_apis::FunctionID::eType function_id,
- mobile_apis::Result::eType result, uint32_t correlation_id,
- uint32_t connection_key);
-
- /*
- * @brief Prepare GetDeviceListResponse
- *
- *
- * @param devices Devices list
- *
- */
- static smart_objects::SmartObject* CreateDeviceListSO(
- const connection_handler::DeviceList& devices);
-
- static smart_objects::SmartObject* CreateModuleInfoSO(
- uint32_t function_id);
-
- static smart_objects::SmartObject* CreateSetAppIcon(
- const std::string& path_to_icon, uint32_t app_id);
-
- /**
- * @brief Sends IVI subscriptions
- */
- static bool SendIVISubscribtions(const uint32_t app_id);
-
- /**
- * @brief Sends IVI subscriptions
- */
- static SmartObjectList GetIVISubscribtionRequests(const uint32_t app_id);
-
- static void SendAppDataToHMI(ApplicationConstSharedPtr app);
- static void SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app);
- static SmartObjectList CreateGlobalPropertiesRequestsToHMI(ApplicationConstSharedPtr app);
-
- static smart_objects::SmartObject* CreateAppVrHelp(ApplicationConstSharedPtr app);
-
- static void SendShowRequestToHMI(ApplicationConstSharedPtr app);
- static void SendShowConstantTBTRequestToHMI(ApplicationConstSharedPtr app);
- static void SendAddCommandRequestToHMI(ApplicationConstSharedPtr app);
- static SmartObjectList CreateAddCommandRequestToHMI(ApplicationConstSharedPtr app);
-
- static void SendChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app);
- static void SendAddVRCommandToHMI(
- uint32_t cmd_id, const smart_objects::SmartObject& vr_commands,
- uint32_t app_id);
-
- static smart_objects::SmartObject* CreateAddVRCommandToHMI(
- uint32_t cmd_id, const smart_objects::SmartObject& vr_commands,
- uint32_t app_id);
-
- static void SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app);
- static SmartObjectList CreateAddSubMenuRequestToHMI(ApplicationConstSharedPtr app);
-
- static void RemoveAppDataFromHMI(ApplicationSharedPtr app);
- static void SendOnSdlCloseNotificationToHMI();
- static void SendOnAppUnregNotificationToHMI(ApplicationConstSharedPtr app);
- static void SendDeleteCommandRequestToHMI(ApplicationConstSharedPtr app);
- static void SendDeleteSubMenuRequestToHMI(ApplicationConstSharedPtr app);
- static void ResetGlobalproperties(ApplicationSharedPtr app);
-
- static void SendActivateAppToHMI(uint32_t const app_id);
-
-
- /*
- * @brief Sends notification to HMI to start video streaming
- *
- * @param url URL for video streamng
- * @param connection_key Application connection key
- *
- */
- static void SendNaviStartStream(const std::string& url, int32_t connection_key);
-
- /*
- * @brief Sends notification to HMI to stop video streaming
- *
- * @param connection_key Application connection key
- *
- */
- static void SendNaviStopStream(int32_t connection_key);
-
- /*
- * @brief Sends notification to HMI to start audio streaming
- *
- * @param url URL for video streamng
- * @param connection_key Application connection key
- *
- */
- static void SendAudioStartStream(const std::string& url, int32_t connection_key);
-
- /*
- * @brief Sends notification to HMI to stop audio streaming
- *
- * @param connection_key Application connection key
- *
- */
- static void SendAudioStopStream(int32_t connection_key);
-
- /*
- * @brief Sends notification to HMI to stop audioPathThru
- *
- * @param connection_key Application connection key
- *
- * @return TRUE on SUCCES otherwise return FALSE
- */
- static bool SendStopAudioPathThru();
-
- static smart_objects::SmartObject* CreateNegativeResponse(
- uint32_t connection_key, int32_t function_id, uint32_t correlation_id,
- int32_t result_code);
-
- /*
- * @brief Verify image and add image file full path
- *
- * @param SmartObject with image
- *
- * @param app current application
- *
- * @return verification result
- *
- */
- static mobile_apis::Result::eType VerifyImage(smart_objects::SmartObject& image,
- ApplicationConstSharedPtr app);
-
- /*
- * @brief Finds "Image" structure in request and verify image file presence
- * in Core.
- *
- * @param message SmartObject with request
- *
- * @param app current application
- *
- * @return verification result
- *
- */
- static mobile_apis::Result::eType VerifyImageFiles(
- smart_objects::SmartObject& message, ApplicationConstSharedPtr app);
-
- static bool VerifySoftButtonText(smart_objects::SmartObject& soft_button);
-
- static mobile_apis::Result::eType ProcessSoftButtons(
- smart_objects::SmartObject& message_params,
- ApplicationConstSharedPtr app);
-
- static bool PrintSmartObject(const smart_objects::SmartObject& object);
-
- template<typename From, typename To>
- static To ConvertEnumAPINoCheck(const From& input) {
- return static_cast<To>(input);
- }
-
- private:
- static smart_objects::SmartObject* CreateChangeRegistration(
- int32_t function_id, int32_t language, uint32_t app_id);
- static smart_objects::SmartObject* CreateGeneralVrCommand();
- static void SendRemoveCommandToHMI(int32_t function_id, int32_t command_id,
- uint32_t app_id);
- MessageHelper();
-
- static const VehicleData vehicle_data_;
- DISALLOW_COPY_AND_ASSIGN(MessageHelper);
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MESSAGE_HELPER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/mobile_command_factory.h b/SDL_Core/src/components/application_manager/include/application_manager/mobile_command_factory.h
deleted file mode 100644
index ecfe41f0a..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/mobile_command_factory.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_COMMAND_FACTORY_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_COMMAND_FACTORY_H_
-
-#include "application_manager/commands/command.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-
-typedef utils::SharedPtr<commands::Command> CommandSharedPtr;
-
-/**
- * @brief Factory class for command creation
- **/
-class MobileCommandFactory {
- public:
- /**
- * @brief Create command object and return pointer to it
- *
- * @param smartObject SmartObject shared pointer.
- * @return Pointer to created command object.
- **/
- static CommandSharedPtr CreateCommand(const MessageSharedPtr& message);
-
- private:
- MobileCommandFactory();
- DISALLOW_COPY_AND_ASSIGN(MobileCommandFactory);
-};
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_COMMAND_FACTORY_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/mobile_message_handler.h b/SDL_Core/src/components/application_manager/include/application_manager/mobile_message_handler.h
deleted file mode 100644
index 5d7be9a34..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/mobile_message_handler.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_MESSAGE_HANDLER_IMPL_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_MESSAGE_HANDLER_IMPL_H_
-
-#include "utils/macro.h"
-#include "utils/logger.h"
-#include "protocol_handler/raw_message.h"
-#include "application_manager/message.h"
-
-namespace application_manager {
-typedef utils::SharedPtr<application_manager::Message> MobileMessage;
-class MobileMessageHandler {
- public:
- static application_manager::Message* HandleIncomingMessageProtocolV1(
- const protocol_handler::RawMessagePtr& message);
-
- static application_manager::Message* HandleIncomingMessageProtocolV2(
- const protocol_handler::RawMessagePtr& message);
-
- //! -------------------------------------------------------------
-
- static protocol_handler::RawMessage* HandleOutgoingMessageProtocolV1(
- const MobileMessage& message);
-
- static protocol_handler::RawMessage* HandleOutgoingMessageProtocolV2(
- const MobileMessage& message);
-
- //! -------------------------------------------------------------
- private:
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(MobileMessageHandler);
-};
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_MOBILE_MESSAGE_HANDLER_IMPL_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h b/SDL_Core/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h
deleted file mode 100644
index e401bc7e3..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/policies_manager/policies_manager.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICIES_MANAGER_POLICIES_MANAGER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICIES_MANAGER_POLICIES_MANAGER_H_
-
-#include <map>
-#include <vector>
-#include <string>
-#include <utility>
-
-#include "interfaces/MOBILE_API.h"
-
-#include "utils/logger.h"
-#include "utils/macro.h"
-
-namespace application_manager {
-namespace policies_manager {
-
-typedef mobile_apis::FunctionID::eType ItemName;
-typedef std::vector<mobile_apis::HMILevel::eType> HmiLevels;
-typedef std::pair<ItemName, HmiLevels> PoliciesItem;
-typedef std::map<ItemName, HmiLevels> PoliciesItems;
-
-class PoliciesManager {
- public:
- PoliciesManager();
- ~PoliciesManager();
-
- bool Init();
- bool IsValidHmiStatus(mobile_apis::FunctionID::eType function,
- mobile_apis::HMILevel::eType status);
-
- private:
- PoliciesItems items_;
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(PoliciesManager);
-};
-
-} // namespace policies_manager
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICIES_MANAGER_POLICIES_MANAGER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/request_controller.h b/SDL_Core/src/components/application_manager/include/application_manager/request_controller.h
deleted file mode 100644
index b05e372a0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/request_controller.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_REQUEST_CONTROLLER_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_REQUEST_CONTROLLER_H_
-
-#include <list>
-#include "utils/lock.h"
-#include "interfaces/MOBILE_API.h"
-#include "request_watchdog/request_watchdog.h"
-#include "request_watchdog/watchdog_subscriber.h"
-#include "application_manager/commands/command.h"
-
-namespace application_manager {
-
-namespace request_controller {
-
-/*
- * @brief RequestController class is used to control currently active mobile
- * requests.
- */
-class RequestController: public request_watchdog::WatchdogSubscriber {
- public:
-
- // Data types
-
- /*
- * @brief Typedef for active mobile request
- *
- */
- typedef utils::SharedPtr<commands::Command> Request;
-
- /**
- * @brief Synchronizing state identifiers
- */
- enum TResult
- {
- SUCCESS = 0,
- TOO_MANY_REQUESTS,
- TOO_MANY_PENDING_REQUESTS,
- NONE_HMI_LEVEL_MANY_REQUESTS
- };
-
- // Methods
- /*
- * @brief Class constructor
- *
- */
- RequestController();
-
- /*
- * @brief Class destructor
- *
- */
- virtual ~RequestController();
-
- /*
- * @brief Check if max request amount wasn't exceed and adds request to queue.
- *
- * @param request Active mobile request
- * @param hmi_level Current application hmi_level
- *
- * @return Result code
- *
- */
- TResult addRequest(const Request& request,
- const mobile_apis::HMILevel::eType& hmi_level);
-
- /*
- * @brief Removes request from queue
- *
- * @param mobile_corellation_id Active mobile request correlation ID
- *
- */
- void terminateRequest(const uint32_t& mobile_correlation_id);
-
- /*
- * @brief Removes all requests from queue for specified application
- *
- * @param app_id Mobile application ID
- *
- */
- void terminateAppRequests(const uint32_t& app_id);
-
- /**
- * @ Updates request timeout
- *
- * @param connection_key Connection key of application
- * @param mobile_correlation_id Correlation ID of the mobile request
- * @param new_timeout_value New timeout to be set
- */
- void updateRequestTimeout(const uint32_t& connection_key,
- const uint32_t& mobile_correlation_id,
- const uint32_t& new_timeout);
-
- /*
- * @brief Notify subscriber that expired entry should be removed
- * using Watchdog::removeRequest(int32_t connection_key, int32_t correlation_id)
- *
- * @param RequestInfo Request related information
- */
- void onTimeoutExpired(const request_watchdog::RequestInfo& info);
-
- protected:
-
- private:
-
- std::list<Request> request_list_;
- sync_primitives::Lock request_list_lock_;
- request_watchdog::Watchdog* watchdog_;
-
- DISALLOW_COPY_AND_ASSIGN(RequestController);
-};
-
-} // namespace request_controller
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_REQUEST_CONTROLLER_H_
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/resume_ctrl.h b/SDL_Core/src/components/application_manager/include/application_manager/resume_ctrl.h
deleted file mode 100644
index 2142d05cb..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/resume_ctrl.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_RESUME_CTRL_H
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_RESUME_CTRL_H
-
-#include <cstdint>
-#include <vector>
-#include <map>
-#include <set>
-#include <list>
-
-#include "json/json.h"
-#include "interfaces/HMI_API.h"
-#include "interfaces/HMI_API_schema.h"
-#include "interfaces/MOBILE_API_schema.h"
-#include "connection_handler/connection_handler_observer.h"
-#include "connection_handler/device.h"
-#include "application_manager/event_engine/event_observer.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/application.h"
-
-namespace application_manager {
-
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-class ApplicationManagerImpl;
-class Application;
-class ResumeCtrl: public event_engine::EventObserver {
-
- mutable sync_primitives::Lock queue_lock_;
-
- public:
-
- /**
- * @brief Constructor
- * @param app_mngr ApplicationManager pointer
- */
- explicit ResumeCtrl(ApplicationManagerImpl* app_mngr);
-
- /**
- * @brief Event, that raised if application get resumption response from HMI
- * @param event : event object, that contains smart_object with HMI message
- */
- virtual void on_event(const event_engine::Event& event);
-
- /**
- * @brief Save all applications info to the file system
- */
- void SaveAllApplications();
-
- /**
- * @brief Save application persistent info for future resuming
- * @param application is application witch need to be saved
- * In case of IGN_OFF or Ctl-C or MEATER_RESSET this info will save to to file system
- */
- void SaveApplication(ApplicationConstSharedPtr application);
-
- /**
- * @brief Load unregistered applications info from the file system
- * You can use this function only if connection handler is ready
- */
- void LoadApplications();
-
- /**
- * @brief Set application HMI Level as saved
- * @param application is application witch HMI Level is need to restore
- * @return true if success, otherwise return false
- */
- bool RestoreApplicationHMILevel(ApplicationSharedPtr application);
-
- /**
- * @brief Set application HMI Level as saved
- * @param application is application witch HMI Level is need to restore
- * @return true if success, otherwise return false
- */
- bool RestoreApplicationData(ApplicationSharedPtr application);
-
- /**
- * @brief Check if Resume controller have saved instance of application
- * @param application is application witch need to be checked
- * @return true if exist, false otherwise
- */
- bool ApplicationIsSaved(ApplicationConstSharedPtr application);
-
- /**
- * @brief Remove application from list of saved applications
- * @param application is application witch need to be removed
- * @return return true, if success, otherwise return false
- */
- bool RemoveApplicationFromSaved(ApplicationConstSharedPtr application);
-
- /**
- * @brief Save application info to FileSystem
- */
- void SavetoFileSystem();
-
- /**
- * @brief Start timer for resumption applications
- * @param application that is need to be restored
- * @return true if it was saved, otherwise return false
- */
- bool StartResumption(ApplicationSharedPtr application, uint32_t hash);
-
- /**
- * @brief Check application hash
- * @param application that is need to be restored
- * @return true if it was saved, otherwise return false
- */
- bool CheckApplicationHash(uint32_t app_id, uint32_t hash);
-
- /**
- * @brief Timer callback function
- *
- */
- void onTimer();
-
- private:
-
- timer::TimerThread<ResumeCtrl> timer_;
- /**
- * @brief This struct need to map
- * timestamp and application from correlationID
- */
- struct ResumingApp {
- uint32_t old_session_key; // session key is the same as app_id
- ApplicationSharedPtr app;
- };
-
- static log4cxx::LoggerPtr logger_;
-
- /**
- * @brief Time step to check resumption TIME_OUT
- */
- static const uint32_t kTimeStep = 3;
-
- /**
- *@brief Data of applications, that whait for resuming
- */
- std::vector<Json::Value> saved_applications_;
-
- typedef std::pair<uint32_t, uint32_t> application_timestamp;
- struct TimeStampComparator {
- bool operator() (const application_timestamp& lhs,
- const application_timestamp& rhs) const{
- return lhs.second < rhs.second;
- }
- };
-
- /**
- *@brief Mapping applications to time_stamps
- * wait for timer to resume HMI Level
- *
- */
- std::set<application_timestamp, TimeStampComparator> waiting_for_timer_;
-
-
- ApplicationManagerImpl* app_mngr_;
-
- /**
- * @brief times of IGN_OFF that zombie application have to be saved.
- */
- static const uint32_t kApplicationLifes = 3;
-
-
- /**
- * @brief Check if Resume controller have saved instance of application
- * @param app_id - application id witch is the same as session_key or connection_key
- * @return true if exist, false otherwise
- */
- bool ApplicationIsSaved(const uint32_t app_id);
-
- Json::Value GetApplicationCommands(const uint32_t app_id);
- Json::Value GetApplicationInteractionChoiseSets(const uint32_t app_id);
- Json::Value GetApplicationGlobalProperties(const uint32_t app_id);
- Json::Value GetApplicationSubscriptions(const uint32_t app_id);
- Json::Value GetApplicationFiles(const uint32_t app_id);
-
- Json::Value JsonFromSO(const NsSmartDeviceLink::NsSmartObjects::SmartObject *so);
-
- void SendHMIRequest(const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject* msg_params = NULL,
- bool use_events = false);
-
- bool ProcessHMIRequest(
- NsSmartDeviceLink::NsSmartObjects::SmartObject* request = NULL,
- bool use_events = false);
-};
-
-} // namespace application_manager
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_RESUME_CTRL_H
diff --git a/SDL_Core/src/components/application_manager/include/application_manager/smart_object_keys.h b/SDL_Core/src/components/application_manager/include/application_manager/smart_object_keys.h
deleted file mode 100644
index e76bbe0d0..000000000
--- a/SDL_Core/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SMART_OBJECT_KEYS_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SMART_OBJECT_KEYS_H_
-
-namespace application_manager {
-
-namespace strings {
-
-const char params[] = "params";
-const char message_type[] = "message_type";
-const char correlation_id[] = "correlation_id";
-const char function_id[] = "function_id";
-const char protocol_version[] = "protocol_version";
-const char protocol_type[] = "protocol_type";
-const char connection_key[] = "connection_key";
-const char error[] = "error";
-const char error_msg[] = "message";
-
-const char msg_params[] = "msg_params";
-const char info[] = "info";
-const char app_id[] = "appID";
-const char url[] = "url";
-const char cmd_icon[] = "cmdIcon";
-const char result_code[] = "resultCode";
-const char success[] = "success";
-const char sync_msg_version[] = "syncMsgVersion";
-const char major_version[] = "majorVersion";
-const char minor_version[] = "minorVersion";
-const char app_name[] = "appName";
-const char ngn_media_screen_app_name[] = "ngnMediaScreenAppName";
-const char vr_synonyms[] = "vrSynonyms";
-const char uses_vehicle_data[] = "usesVehicleData";
-const char is_media_application[] = "isMediaApplication";
-const char language_desired[] = "languageDesired";
-const char auto_activated_id[] = "autoActivateID";
-const char app_type[] = "appType";
-const char app_hmi_type[] = "appHMIType";
-const char tts_name[] = "ttsName";
-const char binary_data[] = "binary_data";
-const char timeout_prompt[] = "timeoutPrompt";
-const char timeout[] = "timeout";
-const char vr_help_title[] = "vrHelpTitle";
-const char vr_help[] = "vrHelp";
-const char main_field_1[] = "mainField1";
-const char main_field_2[] = "mainField2";
-const char main_field_3[] = "mainField3";
-const char main_field_4[] = "mainField4";
-const char eta[] = "eta";
-const char time_to_destination[] = "timeToDestination";
-const char total_distance[] = "totalDistance";
-const char alignment[] = "alignment";
-const char graphic[] = "graphic";
-const char secondary_graphic[] = "secondaryGraphic";
-const char status_bar[] = "statusBar";
-const char media_clock[] = "mediaClock";
-const char media_track[] = "mediaTrack";
-const char properties[] = "properties";
-const char cmd_id[] = "cmdID";
-const char menu_params[] = "menuParams";
-const char menu_title[] = "menuTitle";
-const char menu_icon[] = "menuIcon";
-const char keyboard_properties[] = "keyboardProperties";
-const char vr_commands[] = "vrCommands";
-const char position[] = "position";
-const char num_ticks[] = "numTicks";
-const char slider_footer[] = "sliderFooter";
-const char menu_id[] = "menuID";
-const char menu_name[] = "menuName";
-const char interaction_choice_set_id[] = "interactionChoiceSetID";
-const char interaction_choice_set_id_list[] = "interactionChoiceSetIDList";
-const char choice_set[] = "choiceSet";
-const char choice_id[] = "choiceID";
-const char navigation_text_1[] = "navigationText1";
-const char navigation_text_2[] = "navigationText2";
-const char alert_text1[] = "alertText1";
-const char alert_text2[] = "alertText2";
-const char alert_text3[] = "alertText3";
-const char tts_chunks[] = "ttsChunks";
-const char initial_prompt[] = "initialPrompt";
-const char initial_text[] = "initialText";
-const char duration[] = "duration";
-const char progress_indicator[] = "progressIndicator";
-const char play_tone[] = "playTone";
-const char soft_buttons[] = "softButtons";
-const char custom_presets[] = "customPresets";
-const char audio_pass_display_text1[] = "audioPassThruDisplayText1";
-const char audio_pass_display_text2[] = "audioPassThruDisplayText2";
-const char max_duration[] = "maxDuration";
-const char sampling_rate[] = "samplingRate";
-const char bits_per_sample[] = "bitsPerSample";
-const char audio_type[] = "audioType";
-const char button_name[] = "buttonName";
-const char button_event_mode[] = "buttonEventMode";
-const char button_press_mode[] = "buttonPressMode";
-const char custom_button_id[] = "customButtonID";
-const char data_type[] = "dataType";
-const char turn_list[] = "turnList";
-const char turn_icon[] = "turnIcon";
-const char next_turn_icon[] = "nextTurnIcon";
-const char value[] = "value";
-const char hmi_display_language[] = "hmiDisplayLanguage";
-const char language[] = "language";
-const char data[] = "data";
-const char start_time[] = "startTime";
-const char end_time[] = "endTime";
-const char hours[] = "hours";
-const char minutes[] = "minutes";
-const char seconds [] = "seconds";
-const char update_mode[] = "updateMode";
-const char trigger_source[] = "triggerSource";
-const char hmi_level[] = "hmiLevel";
-const char audio_streaming_state[] = "audioStreamingState";
-const char system_context[] = "systemContext";
-const char speech_capabilities[] = "speechCapabilities";
-const char vr_capabilities[] = "vrCapabilities";
-const char audio_pass_thru_capabilities[] = "audioPassThruCapabilities";
-// PutFile
-const char sync_file_name[] = "syncFileName";
-const char file_type[] = "fileType";
-const char persistent_file[] = "persistentFile";
-const char file_data[] = "fileData";
-const char space_available[] = "spaceAvailable";
-const char image_type[] = "imageType";
-const char image[] = "image";
-const char type[] = "type";
-const char system_file[] = "systemFile";
-const char offset[] = "offset";
-const char length[] = "length";
-
-const char filenames[] = "filenames";
-
-const char hmi_display_language_desired[] = "hmiDisplayLanguageDesired";
-const char ecu_name[] = "ecuName";
-const char dtc_mask[] = "dtcMask";
-const char did_location[] = "didLocation";
-const char app_list[] = "appList";
-const char device_list[] = "deviceList";
-const char device_info[] = "deviceInfo";
-const char name[] = "name";
-const char id[] = "id";
-const char application[] = "application";
-const char icon[] = "icon";
-const char device_name[] = "deviceName";
-const char reason[] = "reason";
-const char available[] = "available";
-const char text[] = "text";
-
-// vehicle info
-const char gps[] = "gps";
-const char speed[] = "speed";
-const char rpm[] = "rpm";
-const char fuel_level[] = "fuelLevel";
-const char fuel_level_state[] = "fuelLevel_State";
-const char instant_fuel_consumption[] = "instantFuelConsumption";
-const char external_temp[] = "externalTemperature";
-const char vin[] = "vin";
-const char prndl[] = "prndl";
-const char tire_pressure[] = "tirePressure";
-const char odometer[] = "odometer";
-const char belt_status[] = "beltStatus";
-const char body_information[] = "bodyInformation";
-const char device_status[] = "deviceStatus";
-const char driver_braking[] = "driverBraking";
-const char wiper_status[] = "wiperStatus";
-const char head_lamp_status[] = "headLampStatus";
-const char engine_torque[] = "engineTorque";
-const char acc_pedal_pos[] = "accPedalPosition";
-const char steering_wheel_angle[] = "steeringWheelAngle";
-const char e_call_info[] = "eCallInfo";
-const char airbag_status[] = "airbagStatus";
-const char emergency_event[] = "emergencyEvent";
-const char cluster_mode_status[] = "clusterModeStatus";
-const char my_key[] = "myKey";
-const char help_prompt[] = "helpPrompt";
-const char scroll_message_body[] = "scrollableMessageBody";
-const char data_result[] = "dataResult";
-const char dtc_list[] = "dtcList";
-const char interaction_mode[] = "interactionMode";
-const char slider_position[] = "sliderPosition";
-const char system_action[] = "systemAction";
-const char prerecorded_speech[] = "prerecordedSpeech";
-const char supported_diag_modes[] = "supportedDiagModes";
-
-//resuming
-const char application_commands[] = "applicationCommands";
-const char application_choise_sets[] = "applicationChoiceSets";
-const char application_global_properties[] = "globalProperties";
-const char application_vehicle_info[] = "vehicleInfo";
-const char application_buttons[] = "buttons";
-const char application_subscribtions[] = "subscribtions";
-const char application_files[] = "applicationFiles";
-const char resumption[] = "resumption";
-const char ign_off_count[] = "ign_off_count";
-const char connection_info[] = "connection_info";
-const char is_download_complete[] = "is_download_complete";
-
-const char hash_id[] = "hashID";
-const char time_stamp[] = "timeStamp";
-const char manual_text_entry[] = "manualTextEntry";
-} // namespace strings
-
-namespace mobile_notification {
-const char state[] = "state";
-const char syncp_timeout[] = "Timeout";
-} // namespace mobile_notification
-
-namespace hmi_request {
-const char parent_id[] = "parentID";
-const char field_name[] = "fieldName";
-const char field_text[] = "fieldText";
-const char alert_strings[] = "alertStrings";
-const char duration[] = "duration";
-const char soft_buttons[] = "softButtons";
-const char tts_chunks[] = "ttsChunks";
-const char audio_pass_display_texts[] = "audioPassThruDisplayTexts";
-const char max_duration[] = "maxDuration";
-const char reason[] = "reason";
-const char message_text[] = "messageText";
-const char initial_text[] = "initialText";
-const char navi_texts[] = "navigationTexts";
-const char navi_text[] = "navigationText";
-const char show_strings[] = "showStrings";
-const char interaction_layout[] = "interactionLayout";
-const char menu_title[] = "menuTitle";
-const char menu_icon[] = "menuIcon";
-const char keyboard_properties[] = "keyboardProperties";
-const char method_name[] = "methodName";
-const char keyboard_layout[] = "keyboardLayout";
-const char send_dynamic_entry[] = "sendDynamicEntry";
-const char limited_character_list[] = "limitedCharacterList";
-const char auto_complete_text[] = "autoCompleteText";
-} // namespace hmi_request
-
-namespace hmi_response {
-const char code[] = "code";
-const char message[] = "message";
-const char method[] = "method";
-const char try_again_time[] = "tryAgainTime";
-const char custom_button_id[] = "customButtonID";
-const char button_name[] = "name";
-const char button_mode[] = "mode";
-const char attenuated_supported[] = "attenuatedSupported";
-const char languages[] = "languages";
-const char language[] = "language";
-const char display_capabilities[] = "displayCapabilities";
-const char hmi_zone_capabilities[] = "hmiZoneCapabilities";
-const char soft_button_capabilities[] = "softButtonCapabilities";
-const char image_supported[] = "imageSupported";
-const char button_capabilities[] = "buttonCapabilities";
-const char capabilities[] = "capabilities";
-const char speech_capabilities[] = "speechCapabilities";
-const char prerecorded_speech_capabilities[] = "prerecordedSpeechCapabilities";
-const char preset_bank_capabilities[] = "presetBankCapabilities";
-const char allowed[] = "allowed";
-const char vehicle_type[] = "vehicleType";
-const char did_result[] = "didResult";
-const char result_code[] = "resultCode";
-const char dtc[] = "dtc";
-const char ecu_header[] = "ecuHeader";
-const char image_capabilities[] = "imageCapabilities";
-const char display_type[] = "displayType";
-const char text_fields[] = "textFields";
-const char media_clock_formats[] = "mediaClockFormats";
-const char graphic_supported[] = "graphicSupported";
-const char templates_available[] = "templatesAvailable";
-const char screen_params[] = "screenParams";
-const char num_custom_presets_available[] = "numCustomPresetsAvailable";
-} // namespace hmi_response
-
-namespace hmi_notification {
-const char prndl[] = "prndl";
-const char file_name[] = "file_name";
-const char system_context[] = "systemContext";
-const char state[] = "state";
-const char result[] = "result";
-
-} // namespace hmi_notification
-
-} // namespace application_manager
-
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_SMART_OBJECT_KEYS_H_
diff --git a/SDL_Core/src/components/application_manager/src/application_data_impl.cc b/SDL_Core/src/components/application_manager/src/application_data_impl.cc
deleted file mode 100644
index 5b5155c02..000000000
--- a/SDL_Core/src/components/application_manager/src/application_data_impl.cc
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/application_data_impl.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace application_manager {
-
-InitialApplicationDataImpl::InitialApplicationDataImpl()
- : app_types_(NULL),
- vr_synonyms_(NULL),
- mobile_app_id_(NULL),
- tts_name_(NULL),
- ngn_media_screen_name_(NULL),
- language_(mobile_api::Language::INVALID_ENUM),
- ui_language_(mobile_api::Language::INVALID_ENUM) {
-}
-
-InitialApplicationDataImpl::~InitialApplicationDataImpl() {
- if (app_types_) {
- delete app_types_;
- app_types_ = NULL;
- }
-
- if (vr_synonyms_) {
- delete vr_synonyms_;
- vr_synonyms_ = NULL;
- }
-
- if (mobile_app_id_) {
- delete mobile_app_id_;
- mobile_app_id_ = NULL;
- }
-
- if (tts_name_) {
- delete tts_name_;
- tts_name_ = NULL;
- }
-
- if (ngn_media_screen_name_) {
- delete ngn_media_screen_name_;
- ngn_media_screen_name_ = NULL;
- }
-}
-
-const smart_objects::SmartObject*
-InitialApplicationDataImpl::app_types() const {
- return app_types_;
-}
-
-const smart_objects::SmartObject*
-InitialApplicationDataImpl::vr_synonyms() const {
- return vr_synonyms_;
-}
-
-const smart_objects::SmartObject*
-InitialApplicationDataImpl::mobile_app_id() const {
- return mobile_app_id_;
-}
-
-const smart_objects::SmartObject* InitialApplicationDataImpl::tts_name() const {
- return tts_name_;
-}
-
-const smart_objects::SmartObject*
-InitialApplicationDataImpl::ngn_media_screen_name() const {
- return ngn_media_screen_name_;
-}
-
-const mobile_api::Language::eType&
-InitialApplicationDataImpl::language() const {
- return language_;
-}
-
-const mobile_api::Language::eType&
-InitialApplicationDataImpl::ui_language() const {
- return ui_language_;
-}
-
-void InitialApplicationDataImpl::set_app_types(
- const smart_objects::SmartObject& app_types) {
- if (app_types_) {
- delete app_types_;
- }
-
- app_types_ = new smart_objects::SmartObject(app_types);
-}
-
-void InitialApplicationDataImpl::set_vr_synonyms(
- const smart_objects::SmartObject& vr_synonyms) {
- if (vr_synonyms_) {
- delete vr_synonyms_;
- }
- vr_synonyms_ = new smart_objects::SmartObject(vr_synonyms);
-}
-
-void InitialApplicationDataImpl::set_mobile_app_id(
- const smart_objects::SmartObject& mobile_app_id) {
- if (mobile_app_id_) {
- delete mobile_app_id_;
- }
- mobile_app_id_ = new smart_objects::SmartObject(mobile_app_id);
-}
-
-void InitialApplicationDataImpl::set_tts_name(
- const smart_objects::SmartObject& tts_name) {
- if (tts_name_) {
- delete tts_name_;
- }
-
- tts_name_ = new smart_objects::SmartObject(tts_name);
-}
-
-void InitialApplicationDataImpl::set_ngn_media_screen_name(
- const smart_objects::SmartObject& ngn_name) {
- if (ngn_media_screen_name_) {
- delete ngn_media_screen_name_;
- }
-
- ngn_media_screen_name_ = new smart_objects::SmartObject(ngn_name);
-}
-
-void InitialApplicationDataImpl::set_language(
- const mobile_api::Language::eType& language) {
- language_ = language;
-}
-
-void InitialApplicationDataImpl::set_ui_language(
- const mobile_api::Language::eType& ui_language) {
- ui_language_ = ui_language;
-}
-
-DynamicApplicationDataImpl::DynamicApplicationDataImpl()
- : help_prompt_(NULL),
- timeout_prompt_(NULL),
- vr_help_title_(NULL),
- vr_help_(NULL),
- tbt_state_(mobile_api::TBTState::INVALID_ENUM),
- show_command_(NULL),
- tbt_show_command_(NULL),
- commands_(),
- sub_menu_(),
- choice_set_map_(),
- performinteraction_choice_set_map_(),
- is_perform_interaction_active_(false),
- perform_interaction_ui_corrid_(0),
- is_reset_global_properties_active_(false),
- perform_interaction_mode_(-1) {
-}
-
-DynamicApplicationDataImpl::~DynamicApplicationDataImpl() {
- if (help_prompt_) {
- delete help_prompt_;
- help_prompt_ = NULL;
- }
-
- if (timeout_prompt_) {
- delete timeout_prompt_;
- timeout_prompt_ = NULL;
- }
-
- if (vr_help_title_) {
- delete vr_help_title_;
- vr_help_title_ = NULL;
- }
-
- if (vr_help_) {
- delete vr_help_;
- vr_help_ = NULL;
- }
-
- if (show_command_) {
- delete show_command_;
- show_command_ = NULL;
- }
-
- if (tbt_show_command_) {
- delete tbt_show_command_;
- tbt_show_command_ = NULL;
- }
-
- for (CommandsMap::iterator command_it = commands_.begin();
- commands_.end() != command_it; ++command_it) {
- delete command_it->second;
- }
- commands_.clear();
-
- for (SubMenuMap::iterator sub_menu_it = sub_menu_.begin();
- sub_menu_.end() != sub_menu_it; ++sub_menu_it) {
- delete sub_menu_it->second;
- }
- sub_menu_.clear();
-
- PerformChoiceSetMap::iterator it = performinteraction_choice_set_map_.begin();
- for (; performinteraction_choice_set_map_.end() != it; ++it) {
- delete it->second;
- }
- performinteraction_choice_set_map_.clear();
-}
-
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::help_prompt() const {
- return help_prompt_;
-}
-
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::timeout_prompt() const {
- return timeout_prompt_;
-}
-
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::vr_help_title() const {
- return vr_help_title_;
-}
-
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::vr_help() const {
- return vr_help_;
-}
-
-const mobile_api::TBTState::eType&
-DynamicApplicationDataImpl::tbt_state() const {
- return tbt_state_;
-}
-
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::show_command() const {
- return show_command_;
-}
-
-const smart_objects::SmartObject*
-DynamicApplicationDataImpl::tbt_show_command() const {
- return tbt_show_command_;
-}
-
-const NsSmartDeviceLink::NsSmartObjects::SmartObject *DynamicApplicationDataImpl::keyboard_props() const {
- return keyboard_props_;
-}
-
-void DynamicApplicationDataImpl::set_help_prompt(
- const smart_objects::SmartObject& help_prompt) {
- if (help_prompt_) {
- delete help_prompt_;
- }
- help_prompt_ = new smart_objects::SmartObject(help_prompt);
-}
-
-void DynamicApplicationDataImpl::set_timeout_prompt(
- const smart_objects::SmartObject& timeout_prompt) {
- if (timeout_prompt_) {
- delete timeout_prompt_;
- }
- timeout_prompt_ = new smart_objects::SmartObject(timeout_prompt);
-}
-
-void DynamicApplicationDataImpl::set_vr_help_title(
- const smart_objects::SmartObject& vr_help_title) {
- if (vr_help_title_) {
- delete vr_help_title_;
- }
- vr_help_title_ = new smart_objects::SmartObject(vr_help_title);
-}
-
-void DynamicApplicationDataImpl::reset_vr_help_title() {
- if (vr_help_title_) {
- delete vr_help_title_;
- vr_help_title_ = NULL;
- }
-}
-
-void DynamicApplicationDataImpl::set_vr_help(
- const smart_objects::SmartObject& vr_help) {
- if (vr_help_) {
- delete vr_help_;
- }
- vr_help_ = new smart_objects::SmartObject(vr_help);
-}
-
-void DynamicApplicationDataImpl::reset_vr_help() {
- if (vr_help_) {
- delete vr_help_;
- }
- vr_help_ = NULL;
-}
-
-void DynamicApplicationDataImpl::set_tbt_state(
- const mobile_api::TBTState::eType& tbt_state) {
- tbt_state_ = tbt_state;
-}
-
-void DynamicApplicationDataImpl::set_show_command(
- const smart_objects::SmartObject& show_command) {
- if (show_command_) {
- delete show_command_;
- }
- show_command_ = new smart_objects::SmartObject(show_command);
-}
-
-void DynamicApplicationDataImpl::set_tbt_show_command(
- const smart_objects::SmartObject& tbt_show) {
- if (tbt_show_command_) {
- delete tbt_show_command_;
- }
- tbt_show_command_ = new smart_objects::SmartObject(tbt_show);
-}
-
-void DynamicApplicationDataImpl::set_keyboard_props(
- const smart_objects::SmartObject &keyboard_props) {
- if (keyboard_props_) {
- delete keyboard_props_;
- }
- keyboard_props_ = new smart_objects::SmartObject(keyboard_props);
-}
-
-
-void DynamicApplicationDataImpl::AddCommand(
- uint32_t cmd_id, const smart_objects::SmartObject& command) {
- commands_[cmd_id] = new smart_objects::SmartObject(command);
-}
-
-void DynamicApplicationDataImpl::RemoveCommand(uint32_t cmd_id) {
- CommandsMap::iterator it = commands_.find(cmd_id);
-
- if (commands_.end() != it) {
- delete it->second;
- commands_.erase(it);
- }
-}
-
-smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
- uint32_t cmd_id) {
- CommandsMap::const_iterator it = commands_.find(cmd_id);
- if (it != commands_.end()) {
- return it->second;
- }
-
- return NULL;
-}
-
-// TODO(VS): Create common functions for processing collections
-void DynamicApplicationDataImpl::AddSubMenu(
- uint32_t menu_id, const smart_objects::SmartObject& menu) {
- sub_menu_[menu_id] = new smart_objects::SmartObject(menu);
-}
-
-void DynamicApplicationDataImpl::RemoveSubMenu(uint32_t menu_id) {
- SubMenuMap::iterator it = sub_menu_.find(menu_id);
-
- if (sub_menu_.end() != it) {
- delete it->second;
- sub_menu_.erase(menu_id);
- }
-}
-
-smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
- uint32_t menu_id) const {
- SubMenuMap::const_iterator it = sub_menu_.find(menu_id);
- if (it != sub_menu_.end()) {
- return it->second;
- }
-
- return NULL;
-}
-
-bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
- const std::string& name) {
- for (SubMenuMap::iterator it = sub_menu_.begin();
- sub_menu_.end() != it;
- ++it) {
- smart_objects::SmartObject* menu = it->second;
- if ((*menu)[strings::menu_name] == name) {
- return true;
- }
- }
- return false;
-}
-
-void DynamicApplicationDataImpl::AddChoiceSet(
- uint32_t choice_set_id, const smart_objects::SmartObject& choice_set) {
- choice_set_map_[choice_set_id] = new smart_objects::SmartObject(choice_set);
-}
-
-void DynamicApplicationDataImpl::RemoveChoiceSet(uint32_t choice_set_id) {
- ChoiceSetMap::iterator it = choice_set_map_.find(choice_set_id);
-
- if (choice_set_map_.end() != it) {
- delete it->second;
- choice_set_map_.erase(choice_set_id);
- }
-}
-
-smart_objects::SmartObject* DynamicApplicationDataImpl::FindChoiceSet(
- uint32_t choice_set_id) {
- ChoiceSetMap::const_iterator it = choice_set_map_.find(choice_set_id);
- if (it != choice_set_map_.end()) {
- return it->second;
- }
-
- return NULL;
-}
-
-void DynamicApplicationDataImpl::AddPerformInteractionChoiceSet(
- uint32_t choice_set_id, const smart_objects::SmartObject& vr_commands) {
- performinteraction_choice_set_map_[choice_set_id] =
- new smart_objects::SmartObject(vr_commands);
-}
-
-void DynamicApplicationDataImpl::DeletePerformInteractionChoiceSetMap() {
- PerformChoiceSetMap::iterator it = performinteraction_choice_set_map_.begin();
- for (; performinteraction_choice_set_map_.end() != it; ++it) {
- delete it->second;
- }
- performinteraction_choice_set_map_.clear();
-}
-
-smart_objects::SmartObject*
-DynamicApplicationDataImpl::FindPerformInteractionChoiceSet(
- uint32_t choice_set_id) const {
- PerformChoiceSetMap::const_iterator it = performinteraction_choice_set_map_
- .find(choice_set_id);
-
- if (it != performinteraction_choice_set_map_.end()) {
- return it->second;
- }
-
- return NULL;
-}
-
-void DynamicApplicationDataImpl::set_perform_interaction_active(
- uint32_t active) {
- is_perform_interaction_active_ = active;
-}
-
-void DynamicApplicationDataImpl::set_perform_interaction_ui_corrid(
- uint32_t corr_id) {
- perform_interaction_ui_corrid_ = corr_id;
-}
-
-void DynamicApplicationDataImpl::set_reset_global_properties_active(
- bool active) {
- is_reset_global_properties_active_ = active;
-}
-
-void DynamicApplicationDataImpl::set_perform_interaction_mode(int32_t mode) {
- perform_interaction_mode_ = mode;
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/application_impl.cc b/SDL_Core/src/components/application_manager/src/application_impl.cc
deleted file mode 100644
index 198e1a3fb..000000000
--- a/SDL_Core/src/components/application_manager/src/application_impl.cc
+++ /dev/null
@@ -1,359 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include <stdlib.h>
-#include "application_manager/application_impl.h"
-#include "utils/file_system.h"
-#include "application_manager/message_helper.h"
-
-namespace {
-log4cxx::LoggerPtr g_logger = log4cxx::Logger::getLogger("ApplicationManager");
-}
-
-
-
-namespace application_manager {
-
-ApplicationImpl::ApplicationImpl(uint32_t application_id)
- : app_id_(application_id),
- active_message_(NULL),
- is_media_(false),
- hmi_supports_navi_streaming_(false),
- allowed_support_navigation_(false),
- hmi_level_(mobile_api::HMILevel::HMI_NONE),
- put_file_in_none_count_(0),
- delete_file_in_none_count_(0),
- list_files_in_none_count_(0),
- system_context_(mobile_api::SystemContext::SYSCTXT_MAIN),
- audio_streaming_state_(mobile_api::AudioStreamingState::NOT_AUDIBLE),
- is_app_allowed_(true),
- has_been_activated_(false),
- tts_speak_state_(false),
- device_(0) {
- srand(time(NULL));
-}
-
-ApplicationImpl::~ApplicationImpl() {
- // TODO(AK): check if this is correct assimption
- if (active_message_) {
- delete active_message_;
- active_message_ = NULL;
- }
-
- subscribed_buttons_.clear();
- subscribed_vehicle_info_.clear();
-
- CleanupFiles();
-}
-
-void ApplicationImpl::CloseActiveMessage() {
- delete active_message_;
- active_message_ = NULL;
-}
-
-bool ApplicationImpl::IsFullscreen() const {
- return mobile_api::HMILevel::HMI_FULL == hmi_level_;
-}
-
-bool ApplicationImpl::MakeFullscreen() {
- hmi_level_ = mobile_api::HMILevel::HMI_FULL;
- if (is_media_ && !tts_speak_state_) {
- audio_streaming_state_ = mobile_api::AudioStreamingState::AUDIBLE;
- }
- system_context_ = mobile_api::SystemContext::SYSCTXT_MAIN;
- if (!has_been_activated_) {
- has_been_activated_ = true;
- }
- return true;
-}
-
-bool ApplicationImpl::IsAudible() const {
- return mobile_api::HMILevel::HMI_FULL == hmi_level_
- || mobile_api::HMILevel::HMI_LIMITED == hmi_level_;
-}
-
-void ApplicationImpl::MakeNotAudible() {
- hmi_level_ = mobile_api::HMILevel::HMI_BACKGROUND;
- audio_streaming_state_ = mobile_api::AudioStreamingState::NOT_AUDIBLE;
-}
-
-bool ApplicationImpl::allowed_support_navigation() const {
- return allowed_support_navigation_;
-}
-
-void ApplicationImpl::set_allowed_support_navigation(bool allow) {
- allowed_support_navigation_ = allow;
-}
-
-const smart_objects::SmartObject* ApplicationImpl::active_message() const {
- return active_message_;
-}
-
-const Version& ApplicationImpl::version() const {
- return version_;
-}
-
-const std::string& ApplicationImpl::name() const {
- return app_name_;
-}
-
-bool ApplicationImpl::is_media_application() const {
- return is_media_;
-}
-
-const mobile_api::HMILevel::eType& ApplicationImpl::hmi_level() const {
- return hmi_level_;
-}
-
-const uint32_t ApplicationImpl::put_file_in_none_count() const {
- return put_file_in_none_count_;
-}
-
-const uint32_t ApplicationImpl::delete_file_in_none_count() const {
- return delete_file_in_none_count_;
-}
-
-const uint32_t ApplicationImpl::list_files_in_none_count() const {
- return list_files_in_none_count_;
-}
-
-const mobile_api::SystemContext::eType&
-ApplicationImpl::system_context() const {
- return system_context_;
-}
-
-const std::string& ApplicationImpl::app_icon_path() const {
- return app_icon_path_;
-}
-
-connection_handler::DeviceHandle ApplicationImpl::device() const {
- return device_;
-}
-
-void ApplicationImpl::set_version(const Version& ver) {
- version_ = ver;
-}
-
-void ApplicationImpl::set_name(const std::string& name) {
- app_name_ = name;
-}
-
-void ApplicationImpl::set_is_media_application(bool is_media) {
- is_media_ = is_media;
- // Audio streaming state for non-media application can not be different
- // from NOT_AUDIBLE
- if (!is_media)
- set_audio_streaming_state(mobile_api::AudioStreamingState::NOT_AUDIBLE);
-}
-
-void ApplicationImpl::set_tts_speak_state(bool state_tts_speak) {
- tts_speak_state_ = state_tts_speak;
-}
-
-void ApplicationImpl::set_hmi_level(
- const mobile_api::HMILevel::eType& hmi_level) {
- if (mobile_api::HMILevel::HMI_NONE != hmi_level_ &&
- mobile_api::HMILevel::HMI_NONE == hmi_level) {
- put_file_in_none_count_ = 0;
- delete_file_in_none_count_ = 0;
- list_files_in_none_count_ = 0;
- }
-
- hmi_level_ = hmi_level;
-}
-
-void ApplicationImpl::set_hmi_supports_navi_streaming(const bool& supports) {
- hmi_supports_navi_streaming_ = supports;
-}
-
-bool ApplicationImpl::hmi_supports_navi_streaming() const {
- return hmi_supports_navi_streaming_;
-}
-
-void ApplicationImpl::increment_put_file_in_none_count() {
- ++put_file_in_none_count_;
-}
-
-void ApplicationImpl::increment_delete_file_in_none_count() {
- ++delete_file_in_none_count_;
-}
-
-void ApplicationImpl::increment_list_files_in_none_count() {
- ++list_files_in_none_count_;
-}
-
-void ApplicationImpl::set_system_context(
- const mobile_api::SystemContext::eType& system_context) {
- system_context_ = system_context;
-}
-
-void ApplicationImpl::set_audio_streaming_state(
- const mobile_api::AudioStreamingState::eType& state) {
- if (!is_media_application()
- && state != mobile_api::AudioStreamingState::NOT_AUDIBLE) {
- LOG4CXX_WARN(g_logger, "Trying to set audio streaming state"
- " for non-media application to different from NOT_AUDIBLE");
- return;
- }
- audio_streaming_state_ = state;
-}
-
-bool ApplicationImpl::set_app_icon_path(const std::string& path) {
- std::string file_name = path.substr(path.find_last_of("/") + 1);
- if (app_files_.find(file_name) != app_files_.end()) {
- app_icon_path_ = path;
- return true;
- }
- return false;
-}
-
-void ApplicationImpl::set_app_allowed(const bool& allowed) {
- is_app_allowed_ = allowed;
-}
-
-void ApplicationImpl::set_device(connection_handler::DeviceHandle device) {
- device_ = device;
-}
-
-bool ApplicationImpl::has_been_activated() const {
- return has_been_activated_;
-}
-
-bool ApplicationImpl::AddFile(AppFile& file) {
- if (app_files_.count(file.file_name) == 0) {
- app_files_[file.file_name] = file;
- return true;
- }
- return false;
-}
-
-bool ApplicationImpl::UpdateFile(AppFile& file) {
- if (app_files_.count(file.file_name) != 0) {
- app_files_[file.file_name] = file;
- return true;
- }
- return false;
-}
-
-bool ApplicationImpl::DeleteFile(const std::string& file_name) {
- AppFilesMap::iterator it = app_files_.find(file_name);
- if (it != app_files_.end()) {
- app_files_.erase(it);
- return true;
- }
- return false;
-}
-
-const AppFilesMap& ApplicationImpl::getAppFiles() const {
- return this->app_files_;
-}
-
-bool ApplicationImpl::SubscribeToButton(mobile_apis::ButtonName::eType btn_name) {
- size_t old_size = subscribed_buttons_.size();
- subscribed_buttons_.insert(btn_name);
- return (subscribed_buttons_.size() == old_size + 1);
-}
-
-bool ApplicationImpl::IsSubscribedToButton(mobile_apis::ButtonName::eType btn_name) {
- std::set<mobile_apis::ButtonName::eType>::iterator it = subscribed_buttons_.find(btn_name);
- return (subscribed_buttons_.end() != it);
-}
-bool ApplicationImpl::UnsubscribeFromButton(mobile_apis::ButtonName::eType btn_name) {
- size_t old_size = subscribed_buttons_.size();
- subscribed_buttons_.erase(btn_name);
- return (subscribed_buttons_.size() == old_size - 1);
-}
-
-bool ApplicationImpl::SubscribeToIVI(uint32_t vehicle_info_type_) {
- size_t old_size = subscribed_vehicle_info_.size();
- subscribed_vehicle_info_.insert(vehicle_info_type_);
- return (subscribed_vehicle_info_.size() == old_size + 1);
-}
-
-bool ApplicationImpl::IsSubscribedToIVI(uint32_t vehicle_info_type_) {
- std::set<uint32_t>::iterator it = subscribed_vehicle_info_.find(
- vehicle_info_type_);
- return (subscribed_vehicle_info_.end() != it);
-}
-
-bool ApplicationImpl::UnsubscribeFromIVI(uint32_t vehicle_info_type_) {
- size_t old_size = subscribed_vehicle_info_.size();
- subscribed_vehicle_info_.erase(vehicle_info_type_);
- return (subscribed_vehicle_info_.size() == old_size - 1);
-}
-
-const std::set<mobile_apis::ButtonName::eType>& ApplicationImpl::SubscribedButtons() const {
- return subscribed_buttons_;
-}
-
-const std::set<uint32_t>& ApplicationImpl::SubscribesIVI() const {
- return subscribed_vehicle_info_;
-}
-
-uint32_t ApplicationImpl::nextHash() {
- hash_val_ = rand();
- return hash_val_;
-}
-
-uint32_t ApplicationImpl::curHash() const {
- return hash_val_;
-}
-
-uint32_t ApplicationImpl::UpdateHash() {
- uint32_t new_hash= nextHash();
- MessageHelper::SendHashUpdateNotification(app_id());
- return new_hash;
-}
-
-void ApplicationImpl::CleanupFiles() {
- std::string directory_name = file_system::FullPath(name());
- if (file_system::DirectoryExists(directory_name)) {
- for (AppFilesMap::const_iterator it = app_files_.begin();
- it != app_files_.end(); ++it) {
- if (!it->second.is_persistent) {
- std::string file_name = directory_name;
- file_name += "/";
- file_name += it->second.file_name;
- file_system::DeleteFile(file_name);
- }
- }
- std::vector < std::string > persistent_files = file_system::ListFiles(
- directory_name);
- if (0 == persistent_files.size()) {
- file_system::RemoveDirectory(directory_name);
- }
- }
- app_files_.clear();
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/application_manager_impl.cc b/SDL_Core/src/components/application_manager/src/application_manager_impl.cc
deleted file mode 100644
index 033882b47..000000000
--- a/SDL_Core/src/components/application_manager/src/application_manager_impl.cc
+++ /dev/null
@@ -1,1661 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/application_manager_impl.h"
-
-#include <climits>
-#include <string>
-#include <fstream>
-
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/mobile_command_factory.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/mobile_message_handler.h"
-#include "connection_handler/connection_handler_impl.h"
-#include "formatters/formatter_json_rpc.h"
-#include "formatters/CFormatterJsonSDLRPCv2.hpp"
-#include "formatters/CFormatterJsonSDLRPCv1.hpp"
-#include "config_profile/profile.h"
-#include "utils/threads/thread.h"
-#include "utils/file_system.h"
-#include "policies/policy_manager.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-log4cxx::LoggerPtr ApplicationManagerImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ApplicationManager"));
-
-uint32_t ApplicationManagerImpl::corelation_id_ = 0;
-const uint32_t ApplicationManagerImpl::max_corelation_id_ = UINT_MAX;
-
-namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace jhs = NsSmartDeviceLink::NsJSONHandler::strings;
-
-ApplicationManagerImpl::ApplicationManagerImpl()
- : audio_pass_thru_active_(false),
- is_distracting_driver_(false),
- is_vr_session_strated_(false),
- hmi_cooperating_(false),
- is_all_apps_allowed_(true),
- hmi_handler_(NULL),
- connection_handler_(NULL),
- policy_manager_(NULL),
- hmi_so_factory_(NULL),
- mobile_so_factory_(NULL),
- protocol_handler_(NULL),
- messages_from_mobile_("application_manager::FromMobileThreadImpl", this),
- messages_to_mobile_("application_manager::ToMobileThreadImpl", this),
- messages_from_hmi_("application_manager::FromHMHThreadImpl", this),
- messages_to_hmi_("application_manager::ToHMHThreadImpl", this),
- request_ctrl_(),
- hmi_capabilities_(this),
- unregister_reason_(mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET),
- media_manager_(NULL),
- resume_ctrl_(this)
-{
- LOG4CXX_INFO(logger_, "Creating ApplicationManager");
- if (!policies_manager_.Init()) {
- LOG4CXX_ERROR(logger_, "Policies manager initialization failed.");
- return;
- }
-
- media_manager_ = media_manager::MediaManagerImpl::instance();
-}
-
-bool ApplicationManagerImpl::InitThread(threads::Thread* thread) {
- if (!thread) {
- LOG4CXX_ERROR(logger_, "Failed to allocate memory for thread object");
- return false;
- }
- LOG4CXX_INFO(
- logger_,
- "Starting thread with stack size "
- << profile::Profile::instance()->thread_min_stack_size());
- if (!thread->start()) {
- /*startWithOptions(
- threads::ThreadOptions(
- profile::Profile::instance()->thread_min_stack_size()))*/
- LOG4CXX_ERROR(logger_, "Failed to start thread");
- return false;
- }
- return true;
-}
-
-ApplicationManagerImpl::~ApplicationManagerImpl() {
- LOG4CXX_INFO(logger_, "Destructing ApplicationManager.");
-
- media_manager_ = NULL;
- hmi_handler_ = NULL;
- connection_handler_ = NULL;
- policy_manager_ = NULL;
- hmi_so_factory_ = NULL;
- mobile_so_factory_ = NULL;
- protocol_handler_ = NULL;
- media_manager_ = NULL;
-}
-
-bool ApplicationManagerImpl::Stop() {
- LOG4CXX_INFO(logger_, "Stop ApplicationManager.");
- try {
- UnregisterAllApplications();
- }
- catch(...) {
- LOG4CXX_ERROR(logger_,
- "An error occured during unregistering applications.");
- }
- MessageHelper::SendOnSdlCloseNotificationToHMI();
- return true;
-}
-
-ApplicationSharedPtr ApplicationManagerImpl::application(int32_t app_id) const {
- std::map<int32_t, ApplicationSharedPtr>::const_iterator it =
- applications_.find(app_id);
- if (applications_.end() != it) {
- return it->second;
- } else {
- return ApplicationSharedPtr();
- }
-}
-
-ApplicationSharedPtr ApplicationManagerImpl::active_application() const {
- // TODO(DK) : check driver distraction
- for (std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- application_list_.end() != it;
- ++it) {
- if ((*it)->IsFullscreen()) {
- return *it;
- }
- }
- return ApplicationSharedPtr();
-}
-
-std::vector<ApplicationSharedPtr> ApplicationManagerImpl::applications_by_button(
- uint32_t button) {
- std::vector<ApplicationSharedPtr> result;
- for (std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- application_list_.end() != it; ++it) {
- if ((*it)->IsSubscribedToButton(
- static_cast<mobile_apis::ButtonName::eType>(button))) {
- result.push_back(*it);
- }
- }
- return result;
-}
-
-std::vector<ApplicationSharedPtr> ApplicationManagerImpl::applications_by_ivi(
- uint32_t vehicle_info) {
- std::vector<ApplicationSharedPtr> result;
- for (std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- application_list_.end() != it;
- ++it) {
- if ((*it)->IsSubscribedToIVI(vehicle_info)) {
- result.push_back(*it);
- }
- }
- return result;
-}
-
-std::vector<ApplicationSharedPtr> ApplicationManagerImpl::applications_with_navi() {
- std::vector<ApplicationSharedPtr> result;
- for (std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- application_list_.end() != it;
- ++it) {
- if ((*it)->allowed_support_navigation()) {
- result.push_back(*it);
- }
- }
- return result;
-}
-
-ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
- const utils::SharedPtr<smart_objects::SmartObject>&
- request_for_registration) {
- smart_objects::SmartObject& message = *request_for_registration;
- uint32_t connection_key =
- message[strings::params][strings::connection_key].asInt();
-
- if (false == is_all_apps_allowed_) {
- LOG4CXX_INFO(logger_,
- "RegisterApplication: access to app's disabled by user");
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- connection_key, mobile_apis::FunctionID::RegisterAppInterfaceID,
- message[strings::params][strings::correlation_id].asUInt(),
- mobile_apis::Result::DISALLOWED));
- ManageMobileCommand(response);
- return ApplicationSharedPtr();
- }
-
- // app_id is SDL "internal" ID
- // original app_id can be gotten via ApplicationImpl::mobile_app_id()
- uint32_t app_id = 0;
- std::list<int32_t> sessions_list;
- uint32_t device_id = 0;
-
- if (connection_handler_) {
- connection_handler::ConnectionHandlerImpl* con_handler_impl =
- static_cast<connection_handler::ConnectionHandlerImpl*>(
- connection_handler_);
- if (con_handler_impl->GetDataOnSessionKey(connection_key, &app_id,
- &sessions_list, &device_id)
- == -1) {
- LOG4CXX_ERROR(logger_,
- "Failed to create application: no connection info.");
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- connection_key, mobile_apis::FunctionID::RegisterAppInterfaceID,
- message[strings::params][strings::correlation_id].asUInt(),
- mobile_apis::Result::GENERIC_ERROR));
- ManageMobileCommand(response);
- return ApplicationSharedPtr();
- }
- }
-
- ApplicationSharedPtr application(new ApplicationImpl(app_id));
- if (!application) {
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- connection_key, mobile_apis::FunctionID::RegisterAppInterfaceID,
- message[strings::params][strings::correlation_id].asUInt(),
- mobile_apis::Result::OUT_OF_MEMORY));
- ManageMobileCommand(response);
- return ApplicationSharedPtr();
- }
-
- const std::string& name =
- message[strings::msg_params][strings::app_name].asString();
-
- application->set_name(name);
- application->set_device(device_id);
-
- application->set_language(
- static_cast<mobile_api::Language::eType>(
- message[strings::msg_params][strings::language_desired].asInt()));
-
- application->set_ui_language(
- static_cast<mobile_api::Language::eType>(
- message[strings::msg_params][strings::hmi_display_language_desired]
- .asInt()));
-
- Version version;
- int32_t min_version =
- message[strings::msg_params][strings::sync_msg_version]
- [strings::minor_version].asInt();
-
- /*if (min_version < APIVersion::kAPIV2) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_VERSION");
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- connection_key, mobile_apis::FunctionID::RegisterAppInterfaceID,
- message[strings::params][strings::correlation_id],
- mobile_apis::Result::UNSUPPORTED_VERSION));
- ManageMobileCommand(response);
- delete application;
- return NULL;
- }*/
- version.min_supported_api_version = static_cast<APIVersion>(min_version);
-
- int32_t max_version =
- message[strings::msg_params][strings::sync_msg_version]
- [strings::major_version].asInt();
-
- /*if (max_version > APIVersion::kAPIV2) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_VERSION");
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- connection_key, mobile_apis::FunctionID::RegisterAppInterfaceID,
- message[strings::params][strings::correlation_id],
- mobile_apis::Result::UNSUPPORTED_VERSION));
- ManageMobileCommand(response);
- delete application;
- return NULL;
- }*/
- version.max_supported_api_version = static_cast<APIVersion>(max_version);
- application->set_version(version);
-
- application->set_mobile_app_id(message[strings::msg_params][strings::app_id]);
-
- sync_primitives::AutoLock lock(applications_list_lock_);
-
- applications_.insert(std::pair<int32_t, ApplicationSharedPtr>(app_id, application));
- application_list_.insert(application);
-
- // TODO(PV): add asking user to allow application
- // BasicCommunication_AllowApp
- // application->set_app_allowed(result);
- return application;
-}
-
-bool ApplicationManagerImpl::RemoveAppDataFromHMI(ApplicationSharedPtr app) {
- return true;
-}
-
-bool ApplicationManagerImpl::LoadAppDataToHMI(ApplicationSharedPtr app) {
- return true;
-}
-
-bool ApplicationManagerImpl::ActivateApplication(ApplicationSharedPtr app) {
- if (!app) {
- LOG4CXX_ERROR(logger_, "Null-pointer application received.");
- NOTREACHED();
- return false;
- }
-
- bool is_new_app_media = app->is_media_application();
-
- for (std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- application_list_.end() != it;
- ++it) {
- ApplicationSharedPtr curr_app = *it;
- if (app->app_id() == curr_app->app_id()) {
- if (curr_app->IsFullscreen()) {
- LOG4CXX_WARN(logger_, "Application is already active.");
- return false;
- }
- if (mobile_api::HMILevel::eType::HMI_LIMITED !=
- curr_app->hmi_level()) {
- if (curr_app->has_been_activated()) {
- MessageHelper::SendAppDataToHMI(curr_app);
- }
- }
- if (!curr_app->MakeFullscreen()) {
- return false;
- }
- MessageHelper::SendHMIStatusNotification(*curr_app);
- } else {
- if (is_new_app_media) {
- if (curr_app->IsAudible()) {
- curr_app->MakeNotAudible();
- MessageHelper::SendHMIStatusNotification(*curr_app);
- }
- }
- if (curr_app->IsFullscreen()) {
- MessageHelper::RemoveAppDataFromHMI(curr_app);
- }
- }
- }
- return true;
-}
-
-mobile_apis::HMILevel::eType ApplicationManagerImpl::PutApplicationInLimited(
- ApplicationSharedPtr app) {
- DCHECK(app.get())
-
- bool is_new_app_media = app->is_media_application();
- mobile_api::HMILevel::eType result = mobile_api::HMILevel::HMI_LIMITED;
-
- for (std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- application_list_.end() != it;
- ++it) {
- ApplicationSharedPtr curr_app = *it;
- if (app->app_id() == curr_app->app_id()) {
- continue;
- }
-
- if (curr_app->hmi_level() == mobile_api::HMILevel::HMI_LIMITED) {
- result = mobile_api::HMILevel::HMI_BACKGROUND;
- break;
- }
- if (curr_app->hmi_level() == mobile_api::HMILevel::HMI_FULL) {
- if (curr_app->is_media_application()) {
- result = mobile_api::HMILevel::HMI_BACKGROUND;
- } else {
- result = mobile_api::HMILevel::HMI_LIMITED;
- }
- break;
- }
-
- }
- app->set_hmi_level(result);
- return result;
-}
-
-mobile_api::HMILevel::eType ApplicationManagerImpl::PutApplicationInFull(
- ApplicationSharedPtr app) {
- DCHECK(app.get())
-
- bool is_new_app_media = app->is_media_application();
- mobile_api::HMILevel::eType result = mobile_api::HMILevel::HMI_FULL;
-
- std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- for (; application_list_.end() != it; ++it) {
- ApplicationSharedPtr curr_app = *it;
- if (app->app_id() == curr_app->app_id()) {
- continue;
- }
-
- if (is_new_app_media) {
- if (curr_app->hmi_level() == mobile_api::HMILevel::HMI_FULL) {
- if (curr_app->is_media_application()) {
- result = mobile_api::HMILevel::HMI_BACKGROUND;
- } else {
- result = mobile_api::HMILevel::HMI_LIMITED;
- }
- break;
- }
- if (curr_app->hmi_level() == mobile_api::HMILevel::HMI_LIMITED) {
- result = mobile_api::HMILevel::HMI_BACKGROUND;
- break;
- }
- } else {
- if (curr_app->hmi_level() == mobile_api::HMILevel::HMI_FULL) {
- result = mobile_api::HMILevel::HMI_BACKGROUND;
- break;
- }
- if (curr_app->hmi_level() == mobile_api::HMILevel::HMI_LIMITED) {
- result = mobile_api::HMILevel::HMI_FULL;
- break;
- }
- }
- }
-
- if ( result == mobile_api::HMILevel::HMI_FULL) {
- MessageHelper::SendActivateAppToHMI(app->app_id());
- }
- return result;
-}
-
-void ApplicationManagerImpl::DeactivateApplication(ApplicationSharedPtr app) {
- MessageHelper::SendDeleteCommandRequestToHMI(app);
- MessageHelper::ResetGlobalproperties(app);
-}
-
-void ApplicationManagerImpl::ConnectToDevice(uint32_t id) {
- // TODO(VS): Call function from ConnectionHandler
- if (!connection_handler_) {
- LOG4CXX_WARN(logger_, "Connection handler is not set.");
- return;
- }
-
- connection_handler_->ConnectToDevice(id);
-}
-
-void ApplicationManagerImpl::OnHMIStartedCooperation() {
- hmi_cooperating_ = true;
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnHMIStartedCooperation()");
-
- if (true == profile::Profile::instance()->launch_hmi()) {
- utils::SharedPtr<smart_objects::SmartObject> is_vr_ready(
- MessageHelper::CreateModuleInfoSO(
- static_cast<uint32_t>(hmi_apis::FunctionID::VR_IsReady)));
- ManageHMICommand(is_vr_ready);
-
- utils::SharedPtr<smart_objects::SmartObject> is_tts_ready(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_IsReady));
- ManageHMICommand(is_tts_ready);
-
- utils::SharedPtr<smart_objects::SmartObject> is_ui_ready(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_IsReady));
- ManageHMICommand(is_ui_ready);
-
- utils::SharedPtr<smart_objects::SmartObject> is_navi_ready(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::Navigation_IsReady));
- ManageHMICommand(is_navi_ready);
-
- utils::SharedPtr<smart_objects::SmartObject> is_ivi_ready(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_IsReady));
- ManageHMICommand(is_ivi_ready);
-
- utils::SharedPtr<smart_objects::SmartObject> button_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::Buttons_GetCapabilities));
- ManageHMICommand(button_capabilities);
- }
-
- if (!connection_handler_) {
- LOG4CXX_WARN(logger_, "Connection handler is not set.");
- } else {
- connection_handler_->StartTransportManager();
- }
-}
-
-uint32_t ApplicationManagerImpl::GetNextHMICorrelationID() {
- if (corelation_id_ < max_corelation_id_) {
- corelation_id_++;
- } else {
- corelation_id_ = 0;
- }
-
- return corelation_id_;
-}
-
-bool ApplicationManagerImpl::begin_audio_pass_thru() {
- sync_primitives::AutoLock lock(audio_pass_thru_lock_);
- if (audio_pass_thru_active_) {
- return false;
- } else {
- audio_pass_thru_active_ = true;
- return true;
- }
-}
-
-bool ApplicationManagerImpl::end_audio_pass_thru() {
- sync_primitives::AutoLock lock(audio_pass_thru_lock_);
- if (audio_pass_thru_active_) {
- audio_pass_thru_active_ = false;
- return true;
- } else {
- return false;
- }
-}
-
-void ApplicationManagerImpl::set_driver_distraction(bool is_distracting) {
- is_distracting_driver_ = is_distracting;
-}
-
-void ApplicationManagerImpl::set_vr_session_started(const bool& state) {
- is_vr_session_strated_ = state;
-}
-
-void ApplicationManagerImpl::set_all_apps_allowed(const bool& allowed) {
- is_all_apps_allowed_ = allowed;
-}
-
-void ApplicationManagerImpl::StartAudioPassThruThread(int32_t session_key,
- int32_t correlation_id, int32_t max_duration, int32_t sampling_rate,
- int32_t bits_per_sample, int32_t audio_type) {
- LOG4CXX_INFO(logger_, "START MICROPHONE RECORDER");
- if (NULL != media_manager_) {
- media_manager_->StartMicrophoneRecording(
- session_key,
- std::string("record.wav"),
- max_duration);
- }
-}
-
-void ApplicationManagerImpl::SendAudioPassThroughNotification(
- uint32_t session_key,
- std::vector<uint8_t> binaryData) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- sync_primitives::AutoLock lock(audio_pass_thru_lock_);
- if (!audio_pass_thru_active_) {
- LOG4CXX_ERROR(logger_, "Trying to send PassThroughNotification"
- " when PassThrough is not active");
-
- return;
- }
- }
-
- smart_objects::SmartObject* on_audio_pass = NULL;
- on_audio_pass = new smart_objects::SmartObject();
-
- if (NULL == on_audio_pass) {
- LOG4CXX_ERROR_EXT(logger_, "OnAudioPassThru NULL pointer");
-
- return;
- }
-
- LOG4CXX_INFO_EXT(logger_, "Fill smart object");
-
- (*on_audio_pass)[strings::params][strings::message_type] =
- application_manager::MessageType::kNotification;
-
- (*on_audio_pass)[strings::params][strings::connection_key] =
- static_cast<int32_t>(session_key);
- (*on_audio_pass)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnAudioPassThruID;
-
- LOG4CXX_INFO_EXT(logger_, "Fill binary data");
- // binary data
- (*on_audio_pass)[strings::params][strings::binary_data] =
- smart_objects::SmartObject(binaryData);
-
- LOG4CXX_INFO_EXT(logger_, "After fill binary data");
-
- LOG4CXX_INFO_EXT(logger_, "Send data");
- CommandSharedPtr command =
- MobileCommandFactory::CreateCommand(&(*on_audio_pass));
- command->Init();
- command->Run();
- command->CleanUp();
-}
-
-void ApplicationManagerImpl::StopAudioPassThru(int32_t application_key) {
- LOG4CXX_TRACE_ENTER(logger_);
- if (NULL != media_manager_) {
- media_manager_->StopMicrophoneRecording(application_key);
- }
-}
-
-std::string ApplicationManagerImpl::GetDeviceName(
- connection_handler::DeviceHandle handle) {
- DCHECK(connection_handler_ != 0);
-
- std::string device_name = "";
- std::list<uint32_t> applications_list;
- connection_handler::ConnectionHandlerImpl* con_handler_impl =
- static_cast<connection_handler::ConnectionHandlerImpl*>(
- connection_handler_);
- if (con_handler_impl->GetDataOnDeviceID(handle, &device_name,
- &applications_list) == -1) {
- LOG4CXX_ERROR(logger_, "Failed to extract device name for id " << handle);
- } else {
- LOG4CXX_INFO(logger_, "\t\t\t\t\tDevice name is " << device_name);
- }
-
- return device_name;
-}
-
-void ApplicationManagerImpl::OnMessageReceived(
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnMessageReceived");
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- utils::SharedPtr<Message> outgoing_message = ConvertRawMsgToMessage(message);
- if (outgoing_message) {
- messages_from_mobile_.PostMessage(
- impl::MessageFromMobile(outgoing_message));
- } else {
- LOG4CXX_WARN(logger_, "Incorrect message received");
- }
-}
-
-void ApplicationManagerImpl::OnMobileMessageSent(
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnMobileMessageSent");
-}
-
-void ApplicationManagerImpl::OnMessageReceived(
- hmi_message_handler::MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnMessageReceived");
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- messages_from_hmi_.PostMessage(impl::MessageFromHmi(message));
-}
-
-void ApplicationManagerImpl::OnErrorSending(
- hmi_message_handler::MessageSharedPointer message) {
- return;
-}
-
-void ApplicationManagerImpl::OnDeviceListUpdated(
- const connection_handler::DeviceList& device_list) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::OnDeviceListUpdated");
-
- smart_objects::SmartObject* update_list = new smart_objects::SmartObject;
- smart_objects::SmartObject& so_to_send = *update_list;
- so_to_send[jhs::S_PARAMS][jhs::S_FUNCTION_ID] =
- hmi_apis::FunctionID::BasicCommunication_UpdateDeviceList;
- so_to_send[jhs::S_PARAMS][jhs::S_MESSAGE_TYPE] =
- hmi_apis::messageType::request;
- so_to_send[jhs::S_PARAMS][jhs::S_PROTOCOL_VERSION] = 2;
- so_to_send[jhs::S_PARAMS][jhs::S_PROTOCOL_TYPE] = 1;
- so_to_send[jhs::S_PARAMS][jhs::S_CORRELATION_ID] = GetNextHMICorrelationID();
- smart_objects::SmartObject* msg_params = MessageHelper::CreateDeviceListSO(
- device_list);
- if (!msg_params) {
- LOG4CXX_WARN(logger_, "Failed to create sub-smart object.");
- delete update_list;
- return;
- }
- so_to_send[jhs::S_MSG_PARAMS] = *msg_params;
- ManageHMICommand(update_list);
-}
-
-void ApplicationManagerImpl::RemoveDevice(
- const connection_handler::DeviceHandle& device_handle) {
-}
-
-
-bool ApplicationManagerImpl::IsAudioStreamingAllowed(uint32_t connection_key) const {
- ApplicationSharedPtr app = application(connection_key);
-
- if (!app) {
- LOG4CXX_INFO(logger_, "An application is not registered.");
- return false;
- }
-
- const mobile_api::HMILevel::eType& hmi_level = app->hmi_level();
-
- if (mobile_api::HMILevel::HMI_FULL == hmi_level ||
- mobile_api::HMILevel::HMI_LIMITED == hmi_level) {
- return true;
- }
-
- return false;
-}
-
-bool ApplicationManagerImpl::IsVideoStreamingAllowed(uint32_t connection_key) const {
- ApplicationSharedPtr app = application(connection_key);
-
- if (!app) {
- LOG4CXX_INFO(logger_, "An application is not registered.");
- return false;
- }
-
- const mobile_api::HMILevel::eType& hmi_level = app->hmi_level();
-
- if (mobile_api::HMILevel::HMI_FULL == hmi_level &&
- app->hmi_supports_navi_streaming() ) {
- return true;
- }
-
- return false;
-}
-
-bool ApplicationManagerImpl::OnServiceStartedCallback(
- const connection_handler::DeviceHandle& device_handle,
- const int32_t& session_key,
- const protocol_handler::ServiceType& type) {
- LOG4CXX_INFO(logger_,
- "OnServiceStartedCallback " << type << " in session " << session_key);
-
- ApplicationSharedPtr app = application(session_key);
-
- switch (type) {
- case protocol_handler::kRpc: {
- LOG4CXX_INFO(logger_, "RPC service is about to be started.");
- break;
- }
- case protocol_handler::kMobileNav: {
- LOG4CXX_INFO(logger_, "Video service is about to be started.");
- if (media_manager_) {
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "An application is not registered.");
- return false;
- }
- if (app->allowed_support_navigation()) {
- media_manager_->StartVideoStreaming(session_key);
- } else {
- return false;
- }
- }
- break;
- }
- case protocol_handler::kAudio: {
- LOG4CXX_INFO(logger_, "Audio service is about to be started.");
- if (media_manager_) {
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "An application is not registered.");
- return false;
- }
- if (app->allowed_support_navigation()) {
- media_manager_->StartAudioStreaming(session_key);
- } else {
- return false;
- }
- }
- break;
- }
- default: {
- LOG4CXX_WARN(logger_, "Unknown type of service to be started.");
- break;
- }
- }
-
- return true;
-}
-
-void ApplicationManagerImpl::OnServiceEndedCallback(const int32_t& session_key,
- const protocol_handler::ServiceType& type) {
- LOG4CXX_INFO_EXT(
- logger_,
- "OnServiceEndedCallback " << type << " in session " << session_key);
- switch (type) {
- case protocol_handler::kRpc: {
- LOG4CXX_INFO(logger_, "Remove application.");
- UnregisterApplication(session_key, true);
- break;
- }
- case protocol_handler::kMobileNav: {
- LOG4CXX_INFO(logger_, "Stop video streaming.");
- if (media_manager_) {
- media_manager_->StopVideoStreaming(session_key);
- }
- break;
- }
- case protocol_handler::kAudio:{
- LOG4CXX_INFO(logger_, "Stop audio service.");
- if (media_manager_) {
- media_manager_->StopAudioStreaming(session_key);
- }
- break;
- }
- default:
- LOG4CXX_WARN(logger_, "Unknown type of service to be ended.");
- break;
- }
-}
-
-void ApplicationManagerImpl::set_hmi_message_handler(
- hmi_message_handler::HMIMessageHandler* handler) {
- hmi_handler_ = handler;
-}
-
-void ApplicationManagerImpl::set_connection_handler(
- connection_handler::ConnectionHandler* handler) {
- connection_handler_ = handler;
- resume_ctrl_.LoadApplications();
-}
-
-void ApplicationManagerImpl::set_policy_manager(
- policies::PolicyManager* policy_manager) {
- policy_manager_ = policy_manager;
-}
-
-void ApplicationManagerImpl::set_protocol_handler(
- protocol_handler::ProtocolHandler* handler) {
- protocol_handler_ = handler;
-}
-
-void ApplicationManagerImpl::StartDevicesDiscovery() {
- connection_handler::ConnectionHandlerImpl::instance()->
- StartDevicesDiscovery();
-}
-
-void ApplicationManagerImpl::SendMessageToMobile(
- const utils::SharedPtr<smart_objects::SmartObject>& message,
- bool final_message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SendMessageToMobile");
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- if (!protocol_handler_) {
- LOG4CXX_WARN(logger_, "No Protocol Handler set");
- return;
- }
-
- mobile_so_factory().attachSchema(*message);
- LOG4CXX_INFO(
- logger_,
- "Attached schema to message, result if valid: " << message->isValid());
-
- // Messages to mobile are not yet prioritized so use default priority value
- utils::SharedPtr<Message> message_to_send(new Message(
- protocol_handler::MessagePriority::kDefault));
- if (!ConvertSOtoMessage((*message), (*message_to_send))) {
- LOG4CXX_WARN(logger_, "Can't send msg to Mobile: failed to create string");
- return;
- }
-
- smart_objects::SmartObject& msg_to_mobile = *message;
- if (msg_to_mobile[strings::params].keyExists(strings::correlation_id)) {
- request_ctrl_.terminateRequest(
- msg_to_mobile[strings::params][strings::correlation_id].asUInt());
- }
-
- messages_to_mobile_.PostMessage(impl::MessageToMobile(message_to_send,
- final_message));
-}
-
-bool ApplicationManagerImpl::ManageMobileCommand(
- const utils::SharedPtr<smart_objects::SmartObject>& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::ManageMobileCommand");
-
- if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
- NOTREACHED()
- return false;
- }
-
-#ifdef DEBUG
- MessageHelper::PrintSmartObject(*message);
-#endif
-
- LOG4CXX_INFO(logger_, "Trying to create message in mobile factory.");
- CommandSharedPtr command = MobileCommandFactory::CreateCommand(message);
-
- if (!command) {
- LOG4CXX_WARN(logger_, "Failed to create mobile command from smart object");
- return false;
- }
-
- mobile_apis::FunctionID::eType function_id =
- static_cast<mobile_apis::FunctionID::eType>(
- (*message)[strings::params][strings::function_id].asInt());
-
- // Notifications from HMI have no such parameter
- uint32_t correlation_id =
- (*message)[strings::params].keyExists(strings::correlation_id)
- ? (*message)[strings::params][strings::correlation_id].asUInt()
- : 0;
-
- uint32_t connection_key =
- (*message)[strings::params][strings::connection_key].asUInt();
-
- uint32_t protocol_type =
- (*message)[strings::params][strings::protocol_type].asUInt();
-
- ApplicationSharedPtr app;
-
- if (((mobile_apis::FunctionID::RegisterAppInterfaceID != function_id) &&
- (protocol_type == commands::CommandImpl::mobile_protocol_type_)) &&
- (mobile_apis::FunctionID::UnregisterAppInterfaceID != function_id)) {
- app = ApplicationManagerImpl::instance()->application(connection_key);
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "APPLICATION_NOT_REGISTERED");
- smart_objects::SmartObject* response =
- MessageHelper::CreateNegativeResponse(
- connection_key,
- static_cast<int32_t>(function_id),
- correlation_id,
- static_cast<int32_t>(mobile_apis::Result::APPLICATION_NOT_REGISTERED));
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(response);
- return false;
- }
-
- // Message for "CheckPermission" must be with attached schema
- mobile_so_factory().attachSchema(*message);
-
- policies::CheckPermissionResult result =
- policy_manager_->CheckPermission(app->app_id(),
- *message,
- app->hmi_level());
-
- if (policies::PermissionResult::PERMISSION_ALLOWED != result.result) {
- LOG4CXX_WARN(
- logger_,
- "Request blocked by policies. " << "FunctionID: "
- << static_cast<int32_t>(function_id) << " Application HMI status: "
- << static_cast<int32_t>(app->hmi_level()));
-
- smart_objects::SmartObject* response =
- MessageHelper::CreateBlockedByPoliciesResponse(function_id,
- mobile_apis::Result::REJECTED, correlation_id, connection_key);
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(response);
- return true;
- }
- }
-
- if (command->Init()) {
- if ((*message)[strings::params][strings::message_type].asInt() ==
- mobile_apis::messageType::request) {
- // get application hmi level
- mobile_api::HMILevel::eType app_hmi_level =
- mobile_api::HMILevel::INVALID_ENUM;
- if (app) {
- app_hmi_level = app->hmi_level();
- }
-
- request_controller::RequestController::TResult result =
- request_ctrl_.addRequest(command, app_hmi_level);
-
- if (result == request_controller::RequestController::SUCCESS) {
- LOG4CXX_INFO(logger_, "Perform request");
- } else if (result ==
- request_controller::RequestController::
- TOO_MANY_PENDING_REQUESTS) {
- LOG4CXX_ERROR_EXT(logger_, "Unable to perform request: " <<
- "TOO_MANY_PENDING_REQUESTS");
-
- smart_objects::SmartObject* response =
- MessageHelper::CreateNegativeResponse(
- connection_key,
- static_cast<int32_t>(function_id),
- correlation_id,
- static_cast<int32_t>(mobile_apis::Result::TOO_MANY_PENDING_REQUESTS));
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(response);
- return false;
- } else if (result ==
- request_controller::RequestController::TOO_MANY_REQUESTS) {
- LOG4CXX_ERROR_EXT(logger_, "Unable to perform request: " <<
- "TOO_MANY_REQUESTS");
-
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key,
- mobile_api::AppInterfaceUnregisteredReason::TOO_MANY_REQUESTS);
-
- UnregisterApplication(connection_key, true);
- return false;
- } else if (result ==
- request_controller::RequestController::
- NONE_HMI_LEVEL_MANY_REQUESTS) {
- LOG4CXX_ERROR_EXT(logger_, "Unable to perform request: " <<
- "REQUEST_WHILE_IN_NONE_HMI_LEVEL");
-
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key, mobile_api::AppInterfaceUnregisteredReason::
- REQUEST_WHILE_IN_NONE_HMI_LEVEL);
-
- UnregisterApplication(connection_key, true);
- return false;
- } else {
- LOG4CXX_ERROR_EXT(logger_, "Unable to perform request: Unknown case");
- return false;
- }
- }
-
- command->Run();
- }
-
- return true;
-}
-
-void ApplicationManagerImpl::SendMessageToHMI(
- const utils::SharedPtr<smart_objects::SmartObject>& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SendMessageToHMI");
-
- if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
- NOTREACHED();
- return;
- }
-
- if (!hmi_handler_) {
- LOG4CXX_WARN(logger_, "No HMI Handler set");
- return;
- }
-
- // SmartObject |message| has no way to declare priority for now
- utils::SharedPtr<Message> message_to_send(
- new Message(protocol_handler::MessagePriority::kDefault));
- if (!message_to_send) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return;
- }
-
- hmi_so_factory().attachSchema(*message);
- LOG4CXX_INFO(
- logger_,
- "Attached schema to message, result if valid: " << message->isValid());
-
-#ifdef WEB_HMI
- if (!ConvertSOtoMessage(*message, *message_to_send)) {
- LOG4CXX_WARN(logger_,
- "Cannot send message to HMI: failed to create string");
- return;
- }
-#endif // WEB_HMI
-
-#ifdef QT_HMI
- message_to_send->set_smart_object(*message);
-#endif // QT_HMI
-
- messages_to_hmi_.PostMessage(impl::MessageToHmi(message_to_send));
-}
-
-bool ApplicationManagerImpl::ManageHMICommand(
- const utils::SharedPtr<smart_objects::SmartObject>& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::ManageHMICommand");
-
- if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
- NOTREACHED();
- return false;
- }
-
-#ifdef DEBUG
- MessageHelper::PrintSmartObject(*message);
-#endif
-
- CommandSharedPtr command = HMICommandFactory::CreateCommand(message);
-
- if (!command) {
- LOG4CXX_WARN(logger_, "Failed to create command from smart object");
- return false;
- }
-
- if (command->Init()) {
- command->Run();
- if (command->CleanUp()) {
- return true;
- }
- }
- return false;
-}
-
-void ApplicationManagerImpl::CreateHMIMatrix(HMIMatrix* matrix) {
-}
-
-void ApplicationManagerImpl::CreatePoliciesManager(PoliciesManager* managaer) {
-}
-
-bool ApplicationManagerImpl::CheckPolicies(smart_objects::SmartObject* message,
- ApplicationSharedPtr app) {
- return true;
-}
-
-bool ApplicationManagerImpl::CheckHMIMatrix(
- smart_objects::SmartObject* message) {
- return true;
-}
-
-bool ApplicationManagerImpl::ConvertMessageToSO(
- const Message& message, smart_objects::SmartObject& output) {
- LOG4CXX_INFO(
- logger_,
- "\t\t\tMessage to convert: protocol " << message.protocol_version()
- << "; json " << message.json_message());
-
- switch (message.protocol_version()) {
- case ProtocolVersion::kV2: {
-
- if (!formatters::CFormatterJsonSDLRPCv2::fromString(
- message.json_message(),
- output,
- message.function_id(),
- message.type(),
- message.correlation_id())
- || !mobile_so_factory().attachSchema(output)
- || ((output.validate() != smart_objects::Errors::OK)
- && (output.validate() !=
- smart_objects::Errors::UNEXPECTED_PARAMETER))) {
- LOG4CXX_WARN(logger_, "Failed to parse string to smart object");
- utils::SharedPtr<smart_objects::SmartObject> response(
- MessageHelper::CreateNegativeResponse(
- message.connection_key(), message.function_id(),
- message.correlation_id(), mobile_apis::Result::INVALID_DATA));
- ManageMobileCommand(response);
- return false;
- }
- LOG4CXX_INFO(
- logger_,
- "Convertion result for sdl object is true" << " function_id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
- output[strings::params][strings::connection_key] =
- message.connection_key();
- if (message.binary_data()) {
- output[strings::params][strings::binary_data] =
- *(message.binary_data());
- }
- break;
- }
- case ProtocolVersion::kHMI: {
- int32_t result = formatters::FormatterJsonRpc::FromString <
- hmi_apis::FunctionID::eType, hmi_apis::messageType::eType > (
- message.json_message(), output);
- LOG4CXX_INFO(
- logger_,
- "Convertion result: " << result << " function id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
- if (!hmi_so_factory().attachSchema(output)) {
- LOG4CXX_WARN(logger_, "Failed to attach schema to object.");
- return false;
- }
- if (output.validate() != smart_objects::Errors::OK &&
- output.validate() != smart_objects::Errors::UNEXPECTED_PARAMETER) {
- LOG4CXX_WARN(
- logger_,
- "Incorrect parameter from HMI");
- output.erase(strings::msg_params);
- output[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::INVALID_DATA;
- output[strings::msg_params][strings::info] =
- std::string("Received invalid data on HMI response");
- }
- break;
- }
- case ProtocolVersion::kV1: {
- static NsSmartDeviceLinkRPC::V1::v4_protocol_v1_2_no_extra v1_shema;
-
- if (message.function_id() == 0 || message.type() == kUnknownType) {
- LOG4CXX_ERROR(logger_, "Message received: UNSUPPORTED_VERSION");
-
- int32_t conversation_result =
- formatters::CFormatterJsonSDLRPCv1::fromString <
- NsSmartDeviceLinkRPC::V1::FunctionID::eType,
- NsSmartDeviceLinkRPC::V1::messageType::eType > (
- message.json_message(), output);
-
- if (formatters::CFormatterJsonSDLRPCv1::kSuccess
- == conversation_result) {
-
- smart_objects::SmartObject params = smart_objects::SmartObject(smart_objects::SmartType::SmartType_Map);
-
- output[strings::params][strings::message_type] =
- NsSmartDeviceLinkRPC::V1::messageType::response;
- output[strings::params][strings::connection_key] = message.connection_key();
-
- output[strings::msg_params] =
- smart_objects::SmartObject(smart_objects::SmartType::SmartType_Map);
- output[strings::msg_params][strings::success] = false;
- output[strings::msg_params][strings::result_code] =
- NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION;
-
- smart_objects::SmartObject* msg_to_send = new smart_objects::SmartObject(output);
- v1_shema.attachSchema(*msg_to_send);
- SendMessageToMobile(msg_to_send);
- return false;
- }
- }
-
- break;
- }
- default:
- // TODO(PV):
- // removed NOTREACHED() because some app can still have vesion 1.
- LOG4CXX_WARN(
- logger_,
- "Application used unsupported protocol :" << message.protocol_version()
- << ".");
- return false;
- }
-
- LOG4CXX_INFO(logger_, "Successfully parsed message into smart object");
- return true;
-}
-
-bool ApplicationManagerImpl::ConvertSOtoMessage(
- const smart_objects::SmartObject& message, Message& output) {
- LOG4CXX_INFO(logger_, "Message to convert");
-
- if (smart_objects::SmartType_Null == message.getType()
- || smart_objects::SmartType_Invalid == message.getType()) {
- LOG4CXX_WARN(logger_, "Invalid smart object received.");
- return false;
- }
-
- LOG4CXX_INFO(
- logger_,
- "Message with protocol: "
- << message.getElement(jhs::S_PARAMS).getElement(jhs::S_PROTOCOL_TYPE)
- .asInt());
-
- std::string output_string;
- switch (message.getElement(jhs::S_PARAMS).getElement(jhs::S_PROTOCOL_TYPE)
- .asInt()) {
- case 0:
- {
- if (message.getElement(jhs::S_PARAMS).getElement(jhs::S_PROTOCOL_VERSION).asInt() == 1) {
- if (!formatters::CFormatterJsonSDLRPCv1::toString(message,
- output_string)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
- return false;
- }
- output.set_protocol_version(application_manager::kV1);
- } else {
- if (!formatters::CFormatterJsonSDLRPCv2::toString(message,
- output_string)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
- return false;
- }
- output.set_protocol_version(application_manager::kV2);
- }
-
- break;
- }
- case 1: {
- if (!formatters::FormatterJsonRpc::ToString(message, output_string)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
- return false;
- }
- output.set_protocol_version(application_manager::kHMI);
- break;
- }
- default:
- NOTREACHED();
- return false;
- }
-
- LOG4CXX_INFO(logger_, "Convertion result: " << output_string);
-
- output.set_connection_key(
- message.getElement(jhs::S_PARAMS).getElement(strings::connection_key)
- .asInt());
-
- output.set_function_id(
- message.getElement(jhs::S_PARAMS).getElement(jhs::S_FUNCTION_ID).asInt());
-
- output.set_correlation_id(
- message.getElement(jhs::S_PARAMS).getElement(jhs::S_CORRELATION_ID)
- .asInt());
- output.set_message_type(
- static_cast<MessageType>(message.getElement(jhs::S_PARAMS).getElement(
- jhs::S_MESSAGE_TYPE).asInt()));
-
- // Currently formatter creates JSON = 3 bytes for empty SmartObject.
- // workaround for notification. JSON must be empty
- if (mobile_apis::FunctionID::OnAudioPassThruID
- != message.getElement(jhs::S_PARAMS).getElement(strings::function_id)
- .asInt()) {
- output.set_json_message(output_string);
- }
-
- if (message.getElement(jhs::S_PARAMS).keyExists(strings::binary_data)) {
- application_manager::BinaryData* binaryData =
- new application_manager::BinaryData(
- message.getElement(jhs::S_PARAMS).getElement(strings::binary_data)
- .asBinary());
-
- if (NULL == binaryData) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return false;
- }
- output.set_binary_data(binaryData);
- }
-
- LOG4CXX_INFO(logger_, "Successfully parsed smart object into message");
- return true;
-}
-
-utils::SharedPtr<Message> ApplicationManagerImpl::ConvertRawMsgToMessage(
- const protocol_handler::RawMessagePtr& message) {
- DCHECK(message);
- utils::SharedPtr<Message> outgoing_message;
-
- if (message->service_type() != protocol_handler::kRpc
- &&
- message->service_type() != protocol_handler::kBulk) {
- // skip this message, not under handling of ApplicationManager
- LOG4CXX_INFO(logger_, "Skipping message; not the under AM handling.");
- return outgoing_message;
- }
-
- Message* convertion_result = NULL;
- if (message->protocol_version() == 1) {
- convertion_result =
- MobileMessageHandler::HandleIncomingMessageProtocolV1(message);
- } else if (message->protocol_version() == 2) {
- convertion_result =
- MobileMessageHandler::HandleIncomingMessageProtocolV2(message);
- } else {
- LOG4CXX_WARN(logger_, "Unknown protocol version.");
- return outgoing_message;
- }
-
- if (convertion_result) {
- outgoing_message = convertion_result;
- } else {
- LOG4CXX_ERROR(logger_, "Received invalid message");
- }
- return outgoing_message;
-}
-
-void ApplicationManagerImpl::ProcessMessageFromMobile(
- const utils::SharedPtr<Message>& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::ProcessMessageFromMobile()");
-
- utils::SharedPtr<smart_objects::SmartObject> so_from_mobile(
- new smart_objects::SmartObject);
-
- if (!so_from_mobile) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return;
- }
-
- if (!ConvertMessageToSO(*message, *so_from_mobile)) {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
- return;
- }
-
- if (!ManageMobileCommand(so_from_mobile)) {
- LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
- }
-}
-
-void ApplicationManagerImpl::ProcessMessageFromHMI(
- const utils::SharedPtr<Message>& message) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::ProcessMessageFromHMI()");
- utils::SharedPtr<smart_objects::SmartObject> smart_object(
- new smart_objects::SmartObject);
-
- if (!smart_object) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- return;
- }
-
-#ifdef WEB_HMI
- if (!ConvertMessageToSO(*message, *smart_object)) {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
- return;
- }
-#endif // WEB_HMI
-
-#ifdef QT_HMI
- *smart_object = message->smart_object();
-#endif // QT_HMI
-
- LOG4CXX_INFO(logger_, "Converted message, trying to create hmi command");
- if (!ManageHMICommand(smart_object)) {
- LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
- }
-}
-
-hmi_apis::HMI_API& ApplicationManagerImpl::hmi_so_factory() {
- if (!hmi_so_factory_) {
- hmi_so_factory_ = new hmi_apis::HMI_API;
- if (!hmi_so_factory_) {
- LOG4CXX_ERROR(logger_, "Out of memory");
- NOTREACHED();
- }
- }
- return *hmi_so_factory_;
-}
-
-mobile_apis::MOBILE_API& ApplicationManagerImpl::mobile_so_factory() {
- if (!mobile_so_factory_) {
- mobile_so_factory_ = new mobile_apis::MOBILE_API;
- if (!mobile_so_factory_) {
- LOG4CXX_ERROR(logger_, "Out of memory.");
- NOTREACHED();
- }
- }
- return *mobile_so_factory_;
-}
-
-HMICapabilities& ApplicationManagerImpl::hmi_capabilities() {
- return hmi_capabilities_;
-}
-
-void ApplicationManagerImpl::addNotification(const CommandSharedPtr& ptr) {
- notification_list_.push_back(ptr);
-}
-
-void ApplicationManagerImpl::removeNotification(const CommandSharedPtr& ptr) {
- std::list<CommandSharedPtr>::iterator it = notification_list_.begin();
- for (; notification_list_.end() != it; ++it) {
- if (*it == ptr) {
- notification_list_.erase(it);
- break;
- }
- }
-}
-
-void ApplicationManagerImpl::updateRequestTimeout(uint32_t connection_key,
- uint32_t mobile_correlation_id,
- uint32_t new_timeout_value) {
- request_ctrl_.updateRequestTimeout(connection_key, mobile_correlation_id,
- new_timeout_value);
-}
-
-const uint32_t ApplicationManagerImpl::application_id
-(const int32_t correlation_id) {
- // ykazakov: there is no erase for const iterator for QNX
- std::map<const int32_t, const uint32_t>::iterator it =
- appID_list_.find(correlation_id);
- if (appID_list_.end() != it) {
- const uint32_t app_id = it->second;
- appID_list_.erase(it);
- return app_id;
- } else {
- return 0;
- }
-}
-
-void ApplicationManagerImpl::set_application_id(const int32_t correlation_id,
- const uint32_t app_id) {
- appID_list_.insert(std::pair<const int32_t, const uint32_t>
- (correlation_id, app_id));
-}
-
-void ApplicationManagerImpl::SetUnregisterAllApplicationsReason(
- mobile_api::AppInterfaceUnregisteredReason::eType reason) {
- unregister_reason_ = reason;
-}
-
-void ApplicationManagerImpl::UnregisterAllApplications() {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::UnregisterAllApplications " <<
- unregister_reason_);
-
- hmi_cooperating_ = false;
-
- std::set<ApplicationSharedPtr>::iterator it = application_list_.begin();
- while (it != application_list_.end()) {
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- (*it)->app_id(), unregister_reason_);
-
- UnregisterApplication((*it)->app_id(), true);
- it = application_list_.begin();
- }
- resume_ctrl_.SavetoFileSystem();
-}
-
-void ApplicationManagerImpl::UnregisterApplication(const uint32_t& app_id, bool is_resuming) {
- LOG4CXX_INFO(logger_,
- "ApplicationManagerImpl::UnregisterApplication " << app_id);
-
- sync_primitives::AutoLock lock(applications_list_lock_);
-
- std::map<int32_t, ApplicationSharedPtr>::iterator it = applications_.find(app_id);
- if (applications_.end() == it) {
- LOG4CXX_INFO(logger_, "Application is already unregistered.");
- return;
- }
- ApplicationSharedPtr app_to_remove = it->second;
- if (is_resuming) {
- resume_ctrl_.SaveApplication(app_to_remove);
- }
- if (audio_pass_thru_active_) {
- // May be better to put this code in MessageHelper?
- end_audio_pass_thru();
- StopAudioPassThru(app_id);
- MessageHelper::SendStopAudioPathThru();
- }
- MessageHelper::RemoveAppDataFromHMI(it->second);
- MessageHelper::SendOnAppUnregNotificationToHMI(it->second);
- applications_.erase(it);
- application_list_.erase(app_to_remove);
- request_ctrl_.terminateAppRequests(app_id);
-
- return;
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageFromMobile& message) {
- LOG4CXX_INFO(logger_, "Received message from Mobile side");
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- return;
- }
- ProcessMessageFromMobile(message);
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageToMobile& message) {
- protocol_handler::RawMessage* rawMessage = 0;
- if (message->protocol_version() == application_manager::kV1) {
- rawMessage = MobileMessageHandler::HandleOutgoingMessageProtocolV1(
- message);
- } else if (message->protocol_version() == application_manager::kV2) {
- rawMessage = MobileMessageHandler::HandleOutgoingMessageProtocolV2(
- message);
- } else {
- return;
- }
- if (!rawMessage) {
- LOG4CXX_ERROR(logger_, "Failed to create raw message.");
- return;
- }
-
- if (!protocol_handler_) {
- LOG4CXX_WARN(logger_,
- "Protocol Handler is not set; cannot send message to mobile.");
- return;
- }
-
- protocol_handler_->SendMessageToMobileApp(rawMessage, message.is_final);
-
- LOG4CXX_INFO(logger_, "Message for mobile given away.");
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageFromHmi& message) {
- LOG4CXX_INFO(logger_, "Received message from hmi");
-
- if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
- return;
- }
-
- ProcessMessageFromHMI(message);
-}
-
-void ApplicationManagerImpl::Handle(const impl::MessageToHmi& message) {
- LOG4CXX_INFO(logger_, "Received message to hmi");
- if (!hmi_handler_) {
- LOG4CXX_ERROR(logger_, "Observer is not set for HMIMessageHandler");
- return;
- }
-
- hmi_handler_->SendMessageToHMI(message);
- LOG4CXX_INFO(logger_, "Message from hmi given away.");
-}
-
-
-void ApplicationManagerImpl::Mute() {
- mobile_apis::AudioStreamingState::eType state =
- hmi_capabilities_.attenuated_supported()
- ? mobile_apis::AudioStreamingState::ATTENUATED
- : mobile_apis::AudioStreamingState::NOT_AUDIBLE;
-
- std::set<ApplicationSharedPtr>::const_iterator it = application_list_.begin();
- std::set<ApplicationSharedPtr>::const_iterator itEnd = application_list_.end();
- for (; it != itEnd; ++it) {
- if ((*it)->is_media_application()) {
- (*it)->set_audio_streaming_state(state);
- (*it)->set_tts_speak_state(true);
- MessageHelper::SendHMIStatusNotification(*(*it));
- }
- }
-}
-
-void ApplicationManagerImpl::Unmute() {
- std::set<ApplicationSharedPtr>::const_iterator it = application_list_.begin();
- std::set<ApplicationSharedPtr>::const_iterator itEnd = application_list_.end();
- for (; it != itEnd; ++it) {
- if ((*it)->is_media_application()) {
- (*it)->set_audio_streaming_state(
- mobile_apis::AudioStreamingState::AUDIBLE);
- (*it)->set_tts_speak_state(false);
- MessageHelper::SendHMIStatusNotification(*(*it));
- }
- }
-}
-
-mobile_apis::Result::eType ApplicationManagerImpl::SaveBinary(
- const std::string& app_name, const std::vector<uint8_t>& binary_data,
- const std::string& save_path, const uint32_t offset) {
- if (binary_data.size() > file_system::GetAvailableSpaceForApp(app_name)) {
- return mobile_apis::Result::OUT_OF_MEMORY;
- }
-
- LOG4CXX_INFO(logger_, "SaveBinaryWithOffset binary_size = "
- << binary_data.size() << " offset = " << offset);
-
- uint32_t file_size = file_system::FileSize(file_system::FullPath(save_path));
- std::ofstream* file_stream;
- if (offset != 0) {
- if (file_size != offset) {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SaveBinaryWithOffset offset does'n match existing filesize");
- return mobile_apis::Result::INVALID_DATA;
- }
- file_stream = file_system::Open(file_system::FullPath(save_path),
- std::ios_base::app);
- } else {
- LOG4CXX_INFO(logger_, "ApplicationManagerImpl::SaveBinaryWithOffset offset is 0, rewrite");
- // if offset == 0: rewrite file
- file_stream = file_system::Open(file_system::FullPath(save_path),
- std::ios_base::out);
- }
-
- if (!file_system::Write(file_stream,binary_data.data(), binary_data.size())) {
- file_system::Close(file_stream);
- return mobile_apis::Result::GENERIC_ERROR;
- }
- file_system::Close(file_stream);
- LOG4CXX_INFO(logger_, "Successfully write data to file");
- return mobile_apis::Result::SUCCESS;
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/command_impl.cc b/SDL_Core/src/components/application_manager/src/commands/command_impl.cc
deleted file mode 100644
index 95d96bde1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/command_impl.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/command_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-log4cxx::LoggerPtr logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("Commands"));
-
-const int32_t CommandImpl::hmi_protocol_type_ = 1;
-const int32_t CommandImpl::mobile_protocol_type_ = 0;
-const int32_t CommandImpl::protocol_version_ = 2;
-
-CommandImpl::CommandImpl(const MessageSharedPtr& message)
- : message_(message) {
-}
-
-CommandImpl::~CommandImpl() {
- CleanUp();
-}
-
-bool CommandImpl::Init() {
- return true;
-}
-
-bool CommandImpl::CleanUp() {
- return true;
-}
-
-void CommandImpl::Run() {
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/command_notification_impl.cc b/SDL_Core/src/components/application_manager/src/commands/command_notification_impl.cc
deleted file mode 100644
index c99f2d908..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/command_notification_impl.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/command_notification_impl.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CommandNotificationImpl::CommandNotificationImpl(
- const MessageSharedPtr& message)
- : CommandImpl(message) {
-}
-
-CommandNotificationImpl::~CommandNotificationImpl() {
-}
-
-bool CommandNotificationImpl::Init() {
- return true;
-}
-
-bool CommandNotificationImpl::CleanUp() {
- return true;
-}
-
-void CommandNotificationImpl::Run() {
-}
-
-void CommandNotificationImpl::SendNotification() {
- (*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- LOG4CXX_INFO(logger_, "SendNotification");
- MessageHelper::PrintSmartObject(*message_);
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/command_request_impl.cc b/SDL_Core/src/components/application_manager/src/commands/command_request_impl.cc
deleted file mode 100644
index 0ba1ba69d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/command_request_impl.cc
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-#include "smart_objects/smart_object.h"
-#include "config_profile/profile.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CommandRequestImpl::CommandRequestImpl(const MessageSharedPtr& message)
- : CommandImpl(message),
- default_timeout_(profile::Profile::instance()->default_timeout()),
- current_state_(kAwaitingHMIResponse) {
-}
-
-CommandRequestImpl::~CommandRequestImpl() {
-}
-
-bool CommandRequestImpl::Init() {
- return true;
-}
-
-bool CommandRequestImpl::CleanUp() {
- return true;
-}
-
-void CommandRequestImpl::Run() {
-}
-
-void CommandRequestImpl::onTimeOut() {
- LOG4CXX_INFO(logger_, "CommandRequestImpl::onTimeOut");
-
- unsubscribe_from_all_events();
- {
- sync_primitives::AutoLock auto_lock(state_lock_);
- if (kCompleted == current_state_) {
- // don't send timeout if request completed
- return;
- }
-
- current_state_ = kTimedOut;
- }
-
- smart_objects::SmartObject* response =
- MessageHelper::CreateNegativeResponse(connection_key(), function_id(),
- correlation_id(), mobile_api::Result::TIMED_OUT);
-
- ApplicationManagerImpl::instance()->ManageMobileCommand(response);
-}
-
-void CommandRequestImpl::on_event(const event_engine::Event& event) {
-}
-
-void CommandRequestImpl::SendResponse(
- const bool success, const mobile_apis::Result::eType& result_code,
- const char* info, const NsSmart::SmartObject* response_params) {
-
- {
- sync_primitives::AutoLock auto_lock(state_lock_);
- if (kTimedOut == current_state_) {
- // don't send response if request timeout expired
- return;
- }
-
- current_state_ = kCompleted;
- }
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
- NsSmartDeviceLink::NsSmartObjects::SmartObject& response = *result;
-
- response[strings::params][strings::message_type] = MessageType::kResponse;
- response[strings::params][strings::correlation_id] = correlation_id();
- response[strings::params][strings::protocol_type] =
- CommandImpl::mobile_protocol_type_;
- response[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- response[strings::params][strings::connection_key] = connection_key();
- response[strings::params][strings::function_id] = function_id();
-
- if (response_params) {
- response[strings::msg_params] = *response_params;
- }
-
- if (info) {
- response[strings::msg_params][strings::info] = std::string(info);
- }
-
- response[strings::msg_params][strings::success] = success;
- response[strings::msg_params][strings::result_code] = result_code;
-
- ApplicationManagerImpl::instance()->ManageMobileCommand(result);
-}
-
-bool CommandRequestImpl::CheckSyntax(std::string str, bool allow_empty_line) {
- if (std::string::npos != str.find_first_of("\t\n")) {
- LOG4CXX_ERROR(logger_, "CheckSyntax failed! :" << str);
- return false;
- }
- if (!allow_empty_line) {
- if ((std::string::npos == str.find_first_not_of(' '))) {
- return false;
- }
- }
- return true;
-}
-
-void CommandRequestImpl::SendHMIRequest(
- const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject* msg_params, bool use_events) {
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
-
- const uint32_t hmi_correlation_id =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
- if (use_events) {
- subscribe_on_event(function_id, hmi_correlation_id);
- }
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
- request[strings::params][strings::message_type] = MessageType::kRequest;
- request[strings::params][strings::function_id] = function_id;
- request[strings::params][strings::correlation_id] = hmi_correlation_id;
- request[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- request[strings::params][strings::protocol_type] =
- CommandImpl::hmi_protocol_type_;
-
- if (msg_params) {
- request[strings::msg_params] = *msg_params;
- }
-
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- SendResponse(false, mobile_apis::Result::OUT_OF_MEMORY);
- }
-}
-
-//TODO(VS): Should be removed after we will shift to Event engine usage completely
-void CommandRequestImpl::CreateHMINotification(
- const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const {
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
- NsSmartDeviceLink::NsSmartObjects::SmartObject& notify = *result;
-
- notify[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
- notify[strings::params][strings::function_id] = function_id;
- notify[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- notify[strings::params][strings::protocol_type] =
- CommandImpl::hmi_protocol_type_;
- notify[strings::msg_params] = msg_params;
-
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send HMI notification");
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/command_response_impl.cc b/SDL_Core/src/components/application_manager/src/commands/command_response_impl.cc
deleted file mode 100644
index d7bd9133b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/command_response_impl.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/command_response_impl.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CommandResponseImpl::CommandResponseImpl(const MessageSharedPtr& message)
- : CommandImpl(message) {
-}
-
-CommandResponseImpl::~CommandResponseImpl() {
-}
-
-bool CommandResponseImpl::Init() {
- return true;
-}
-
-bool CommandResponseImpl::CleanUp() {
- return true;
-}
-
-void CommandResponseImpl::Run() {
-}
-
-void CommandResponseImpl::SendResponse(
- bool success, const mobile_apis::Result::eType& result_code, bool final_message) {
- LOG4CXX_INFO(logger_, "Trying to send response");
-
- (*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
- (*message_)[strings::msg_params][strings::success] = success;
-
- if (!(*message_)[strings::msg_params].keyExists(strings::result_code)) {
- if (mobile_apis::Result::INVALID_ENUM != result_code) {
- (*message_)[strings::msg_params][strings::result_code] = result_code;
- } else if ((*message_)[strings::params].keyExists(hmi_response::code)) {
- (*message_)[strings::msg_params][strings::result_code] =
- (*message_)[strings::params][hmi_response::code];
- } else {
- if (success) {
- (*message_)[strings::msg_params][strings::result_code] =
- mobile_apis::Result::SUCCESS;
- } else {
- (*message_)[strings::msg_params][strings::result_code] =
- mobile_apis::Result::INVALID_ENUM;
- }
- }
- }
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_, final_message);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_request.cc
deleted file mode 100644
index de1cf3347..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_request.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/activate_app_request.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ActivateAppRequest::ActivateAppRequest(
- const MessageSharedPtr& message): RequestToHMI(message) {
-}
-
-ActivateAppRequest::~ActivateAppRequest() {
-}
-
-void ActivateAppRequest::Run() {
- LOG4CXX_INFO(logger_, "ActivateAppRequest::Run");
- int32_t correlation_id = RequestToHMI::correlation_id();
- uint32_t app_id = RequestToHMI::application_id();
- ApplicationManagerImpl::instance()->set_application_id(correlation_id, app_id);
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_response.cc
deleted file mode 100644
index fc31b34b5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/activate_app_response.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/activate_app_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ActivateAppResponse::ActivateAppResponse(
- const MessageSharedPtr& message): ResponseFromHMI(message) {
-}
-
-ActivateAppResponse::~ActivateAppResponse() {
-}
-
-void ActivateAppResponse::Run() {
- LOG4CXX_INFO(logger_, "ActivateAppResponse::Run");
- const hmi_apis::Common_Result::eType code =
- static_cast<hmi_apis::Common_Result::eType>(
- (*message_)[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS == code) {
- int32_t correlation_id = ResponseFromHMI::correlation_id();
- const uint32_t app_id = ApplicationManagerImpl::instance()->
- application_id(correlation_id);
- if (!app_id) {
- LOG4CXX_ERROR(logger_, "Error app_id = "<<app_id);
- return;
- }
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(app_id);
- if (application) {
- ApplicationManagerImpl::instance()->ActivateApplication(application);
- } else {
- LOG4CXX_ERROR(logger_, "Application cannot activate");
- }
- } else {
- LOG4CXX_ERROR(logger_, "Error result code"<<code);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc
deleted file mode 100644
index 6ac42c7a0..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/allow_all_apps_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAllAppsRequest::AllowAllAppsRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-AllowAllAppsRequest::~AllowAllAppsRequest() {
-}
-
-void AllowAllAppsRequest::Run() {
- LOG4CXX_INFO(logger_, "AllowAllAppsRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc
deleted file mode 100644
index 69c52a326..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_all_apps_response.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/allow_all_apps_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAllAppsResponse::AllowAllAppsResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-AllowAllAppsResponse::~AllowAllAppsResponse() {
-}
-
-void AllowAllAppsResponse::Run() {
- LOG4CXX_INFO(logger_, "AllowAllAppsResponse::Run");
-
- ApplicationManagerImpl::instance()->set_all_apps_allowed(
- (*message_)[strings::msg_params][hmi_response::allowed].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_request.cc
deleted file mode 100644
index 302a8c676..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/allow_app_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAppRequest::AllowAppRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-AllowAppRequest::~AllowAppRequest() {
-}
-
-void AllowAppRequest::Run() {
- LOG4CXX_INFO(logger_, "AllowAppRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_response.cc
deleted file mode 100644
index 035e41438..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/allow_app_response.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/allow_app_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AllowAppResponse::AllowAppResponse(
- const MessageSharedPtr& message): ResponseFromHMI(message) {
-}
-
-AllowAppResponse::~AllowAppResponse() {
-}
-
-void AllowAppResponse::Run() {
- LOG4CXX_INFO(logger_, "AllowAppResponse::Run");
-
- uint32_t connection_key =
- (*message_)[strings::params][strings::connection_key].asInt();
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->
- application(connection_key);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- app->set_app_allowed((*message_)[strings::msg_params][hmi_response::allowed].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_request.cc
deleted file mode 100644
index 15ffbfe2e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_request.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/audio_start_stream_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStartStreamRequest::AudioStartStreamRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-AudioStartStreamRequest::~AudioStartStreamRequest() {
-}
-
-void AudioStartStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "AudioStartStreamRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_response.cc
deleted file mode 100644
index 1acc07d46..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_start_stream_response.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/audio_start_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStartStreamResponse::AudioStartStreamResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-AudioStartStreamResponse::~AudioStartStreamResponse() {
-}
-
-void AudioStartStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "AudioStartStreamResponse::Run");
-
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_request.cc
deleted file mode 100644
index 72c0a54eb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_request.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "application_manager/commands/hmi/audio_stop_stream_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStopStreamRequest::AudioStopStreamRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-AudioStopStreamRequest::~AudioStopStreamRequest() {
-}
-
-void AudioStopStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "AudioStopStreamRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_response.cc
deleted file mode 100644
index f583feb23..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/audio_stop_stream_response.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/audio_stop_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AudioStopStreamResponse::AudioStopStreamResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-AudioStopStreamResponse::~AudioStopStreamResponse() {
-}
-
-void AudioStopStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "AudioStopStreamResponse::Run");
-
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc
deleted file mode 100644
index e00b3fdc5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_request.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {
-}
-
-void ButtonGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "ButtonGetCapabilitiesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc
deleted file mode 100644
index 0b6723474..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/button_get_capabilities_response.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/button_get_capabilities_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {
-}
-
-void ButtonGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "ButtonGetCapabilitiesResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_button_capabilities(
- (*message_)[strings::msg_params][hmi_response::capabilities]);
-
- hmi_capabilities.set_preset_bank_capabilities(
- (*message_)[strings::msg_params][hmi_response::preset_bank_capabilities]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_request.cc
deleted file mode 100644
index 3cc581868..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/close_popup_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ClosePopupRequest::ClosePopupRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-ClosePopupRequest::~ClosePopupRequest() {
-}
-
-void ClosePopupRequest::Run() {
- LOG4CXX_INFO(logger_, "ClosePopupRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_response.cc
deleted file mode 100644
index fa98be5e0..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/close_popup_response.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/close_popup_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ClosePopupResponse::ClosePopupResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-ClosePopupResponse::~ClosePopupResponse() {
-}
-
-void ClosePopupResponse::Run() {
- LOG4CXX_INFO(logger_, "ClosePopupResponse::Run");
-
- // TODO(VS): Process response from HMI
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc
deleted file mode 100644
index 9ab4bf5db..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/mixing_audio_supported_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-MixingAudioSupportedRequest::MixingAudioSupportedRequest(
- const MessageSharedPtr& message) : RequestToHMI(message) {
-}
-
-MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {
-}
-
-void MixingAudioSupportedRequest::Run() {
- LOG4CXX_INFO(logger_, "MixingAudioSupportedRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc
deleted file mode 100644
index 4a4fc276d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/mixing_audio_supported_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/mixing_audio_supported_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-MixingAudioSupportedResponse::MixingAudioSupportedResponse(
- const MessageSharedPtr& message) : ResponseFromHMI(message) {
-}
-
-MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {
-}
-
-void MixingAudioSupportedResponse::Run() {
- LOG4CXX_INFO(logger_, "MixingAudioSupportedResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- hmi_capabilities.set_attenuated_supported((*message_)
- [strings::msg_params][hmi_response::attenuated_supported].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc
deleted file mode 100644
index 7128231b1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/navi_alert_maneuver_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviAlertManeuverRequest::NaviAlertManeuverRequest(
- const MessageSharedPtr& message) : RequestToHMI(message) {
-}
-
-NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {
-}
-
-void NaviAlertManeuverRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviAlertManeuverRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc
deleted file mode 100644
index 823c96211..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_alert_maneuver_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/navi_alert_maneuver_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviAlertManeuverResponse::NaviAlertManeuverResponse(
- const MessageSharedPtr& message) : ResponseFromHMI(message) {
-}
-
-NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {
-}
-
-void NaviAlertManeuverResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviAlertManeuverResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_AlertManeuver);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc
deleted file mode 100644
index b7a179942..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/navi_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviIsReadyRequest::NaviIsReadyRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-NaviIsReadyRequest::~NaviIsReadyRequest() {
-}
-
-void NaviIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviIsReadyRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc
deleted file mode 100644
index 8aef42b40..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_is_ready_response.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/navi_is_ready_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviIsReadyResponse::NaviIsReadyResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-NaviIsReadyResponse::~NaviIsReadyResponse() {
-}
-
-void NaviIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviIsReadyResponse::Run");
- smart_objects::SmartObject& object = *message_;
-
- bool is_available = false;
- if (object[strings::msg_params].keyExists(strings::available)) {
- is_available = object[strings::msg_params][strings::available].asBool();
- }
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_is_navi_cooperating(is_available);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc
deleted file mode 100644
index 9103e1f6c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviShowConstantTBTRequest::NaviShowConstantTBTRequest(
- const MessageSharedPtr& message) : RequestToHMI(message) {
-}
-
-NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {
-}
-
-void NaviShowConstantTBTRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviShowConstantTBTRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc
deleted file mode 100644
index 03c70dd81..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_show_constant_tbt_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/navi_show_constant_tbt_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviShowConstantTBTResponse::NaviShowConstantTBTResponse(
- const MessageSharedPtr& message) : ResponseFromHMI(message) {
-}
-
-NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {
-}
-
-void NaviShowConstantTBTResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviShowConstantTBTResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
deleted file mode 100644
index cb9dbd61e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/navi_start_stream_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStartStreamRequest::NaviStartStreamRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-NaviStartStreamRequest::~NaviStartStreamRequest() {
-}
-
-void NaviStartStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviStartStreamRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc
deleted file mode 100644
index 77a9ff577..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_start_stream_response.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/navi_start_stream_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStartStreamResponse::NaviStartStreamResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-NaviStartStreamResponse::~NaviStartStreamResponse() {
-}
-
-void NaviStartStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviStartStreamResponse::Run");
-
- ApplicationSharedPtr app =
- ApplicationManagerImpl::instance()->active_application();
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "NaviStartStreamResponse no active app!");
- return;
- }
-
- const hmi_apis::Common_Result::eType code =
- static_cast<hmi_apis::Common_Result::eType>(
- (*message_)[strings::params][hmi_response::code].asInt());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- LOG4CXX_INFO(logger_, "NaviStartStreamResponse SUCCESS");
- app->set_hmi_supports_navi_streaming(true);
- } else {
- LOG4CXX_INFO(logger_, "NaviStartStreamResponse NOT SUCCESS");
- app->set_hmi_supports_navi_streaming(false);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc
deleted file mode 100644
index 2f1e14a12..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_request.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStopStreamRequest::NaviStopStreamRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-NaviStopStreamRequest::~NaviStopStreamRequest() {
-}
-
-void NaviStopStreamRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviStopStreamRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc
deleted file mode 100644
index c368940d5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_stop_stream_response.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/navi_stop_stream_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviStopStreamResponse::NaviStopStreamResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-NaviStopStreamResponse::~NaviStopStreamResponse() {
-}
-
-void NaviStopStreamResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviStopStreamResponse::Run");
-
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc
deleted file mode 100644
index d0df9ec86..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviUpdateTurnListRequest::NaviUpdateTurnListRequest(
- const MessageSharedPtr& message) : RequestToHMI(message) {
-}
-
-NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {
-}
-
-void NaviUpdateTurnListRequest::Run() {
- LOG4CXX_INFO(logger_, "NaviUpdateTurnListRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc
deleted file mode 100644
index d93b67bb5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/navi_update_turn_list_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/navi_update_turn_list_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NaviUpdateTurnListResponse::NaviUpdateTurnListResponse(
- const MessageSharedPtr& message) : ResponseFromHMI(message) {
-}
-
-NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {
-}
-
-void NaviUpdateTurnListResponse::Run() {
- LOG4CXX_INFO(logger_, "NaviUpdateTurnListResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc
deleted file mode 100644
index b324e196a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/notification_from_hmi.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/notification_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NotificationFromHMI::NotificationFromHMI(const MessageSharedPtr& message)
- : CommandImpl(message) {
-}
-
-NotificationFromHMI::~NotificationFromHMI() {
-}
-
-bool NotificationFromHMI::Init() {
- return true;
-}
-
-bool NotificationFromHMI::CleanUp() {
- return true;
-}
-
-void NotificationFromHMI::Run() {
-}
-
-void NotificationFromHMI::SendNotificationToMobile(
- const MessageSharedPtr& message) {
- ApplicationManagerImpl::instance()->ManageMobileCommand(message);
-}
-
-void NotificationFromHMI::CreateHMIRequest(
- const hmi_apis::FunctionID::eType& function_id,
- const NsSmartObj::SmartObject& msg_params) const {
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
-
- // get hmi correlation id for chaining further request from this object
- const uint32_t hmi_correlation_id_ = ApplicationManagerImpl::instance()
- ->GetNextHMICorrelationID();
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
- request[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kRequest);
- request[strings::params][strings::function_id] =
- static_cast<int32_t>(function_id);
- request[strings::params][strings::correlation_id] = hmi_correlation_id_;
- request[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- request[strings::params][strings::protocol_type] =
- CommandImpl::hmi_protocol_type_;
-
- request[strings::msg_params] = msg_params;
-
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- return;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc
deleted file mode 100644
index 51ab188e9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/notification_to_hmi.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/notification_to_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-NotificationToHMI::NotificationToHMI(const MessageSharedPtr& message)
- : CommandImpl(message) {
-}
-
-NotificationToHMI::~NotificationToHMI() {
-}
-
-bool NotificationToHMI::Init() {
- return true;
-}
-
-bool NotificationToHMI::CleanUp() {
- return true;
-}
-
-void NotificationToHMI::Run() {
-}
-
-void NotificationToHMI::SendNotification() {
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
- ApplicationManagerImpl::instance()->SendMessageToHMI(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc
deleted file mode 100644
index 8152244a9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_activated_notification.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_app_activated_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppActivatedNotification::OnAppActivatedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnAppActivatedNotification::~OnAppActivatedNotification() {
-}
-
-void OnAppActivatedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppActivatedNotification::Run");
- uint32_t app_id = ((*message_)[strings::msg_params][strings::app_id]).asUInt();
- MessageHelper::SendActivateAppToHMI(app_id);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc
deleted file mode 100644
index e20a1b907..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_app_deactivated_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "config_profile/profile.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppDeactivatedNotification::OnAppDeactivatedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {
-}
-
-void OnAppDeactivatedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppDeactivatedNotification::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->active_application();
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "OnAppDeactivatedNotification no active app!");
- return;
- }
-
- if ((*message_)[strings::msg_params][strings::app_id].asInt()
- != app->app_id()) {
- LOG4CXX_ERROR_EXT(logger_, "Wrong application id!");
- return;
- }
-
- if (mobile_api::HMILevel::eType::HMI_NONE == app->hmi_level()) {
- return;
- }
-
- switch ((*message_)[strings::msg_params][hmi_request::reason].asInt()) {
- case hmi_apis::Common_DeactivateReason::AUDIO:
- case hmi_apis::Common_DeactivateReason::PHONECALL: {
- if (app->is_media_application()) {
- if (profile::Profile::instance()->is_mixing_audio_supported()) {
- app->set_audio_streaming_state(
- mobile_api::AudioStreamingState::ATTENUATED);
- } else {
- app->set_audio_streaming_state(
- mobile_api::AudioStreamingState::NOT_AUDIBLE);
- }
- }
- ApplicationManagerImpl::instance()->DeactivateApplication(app);
- app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
- break;
- }
- case hmi_apis::Common_DeactivateReason::NAVIGATIONMAP:
- case hmi_apis::Common_DeactivateReason::PHONEMENU:
- case hmi_apis::Common_DeactivateReason::SYNCSETTINGS:
- case hmi_apis::Common_DeactivateReason::GENERAL: {
- if (app->is_media_application()) {
- if (mobile_api::HMILevel::HMI_FULL == app->hmi_level()) {
- app->set_hmi_level(mobile_api::HMILevel::HMI_LIMITED);
- }
- } else {
- ApplicationManagerImpl::instance()->DeactivateApplication(app);
- app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND);
- }
- break;
- }
- default: {
- LOG4CXX_ERROR_EXT(logger_, "Unknown reason of app deactivation");
- return;
- }
- }
-
- MessageHelper::SendHMIStatusNotification(*app);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc
deleted file mode 100644
index 26bc396db..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_registered_notification.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_app_registered_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppRegisteredNotification::OnAppRegisteredNotification(
- const MessageSharedPtr& message) : NotificationToHMI(message) {
-}
-
-OnAppRegisteredNotification::~OnAppRegisteredNotification() {
-}
-
-void OnAppRegisteredNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppRegisteredNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc
deleted file mode 100644
index 2bedcb063..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_app_unregistered_notification.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_app_unregistered_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppUnregisteredNotification::OnAppUnregisteredNotification(
- const MessageSharedPtr& message) : NotificationToHMI(message) {
-}
-
-OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {
-}
-
-void OnAppUnregisteredNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppUnregisteredNotification::Run");
-
- //sending event for delete VRCommand on PerformInteraction
- event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered);
- event.set_smart_object(*message_);
- event.raise();
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc
deleted file mode 100644
index e44fde016..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_button_event_notification.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_button_event_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "utils/logger.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnButtonEventNotification::OnButtonEventNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnButtonEventNotification::~OnButtonEventNotification() {
-}
-
-void OnButtonEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run");
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc
deleted file mode 100644
index f5c65494a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_button_press_notification.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_button_press_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "utils/logger.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnButtonPressNotification::OnButtonPressNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnButtonPressNotification::~OnButtonPressNotification() {
-}
-
-void OnButtonPressNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonPressNotification::Run");
- event_engine::Event event(hmi_apis::FunctionID::Buttons_OnButtonPress);
- event.set_smart_object(*message_);
- event.raise();
- (*message_)[strings::params][strings::function_id] =
- static_cast<int>(mobile_apis::FunctionID::eType::OnButtonPressID);
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc
deleted file mode 100644
index 537c246f4..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_device_chosen_notification.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_device_chosen_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnDeviceChosenNotification::OnDeviceChosenNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnDeviceChosenNotification::~OnDeviceChosenNotification() {
-}
-
-void OnDeviceChosenNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDeviceChosenNotification::Run");
-
- if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
- ApplicationManagerImpl::instance()->ConnectToDevice(
- (*message_)[strings::msg_params][strings::device_info][strings::id]
- .asInt());
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc
deleted file mode 100644
index c4263390e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <set>
-#include "application_manager/commands/hmi/on_driver_distraction_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnDriverDistractionNotification::OnDriverDistractionNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnDriverDistractionNotification::~OnDriverDistractionNotification() {
-}
-
-void OnDriverDistractionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDriverDistractionNotification::Run");
-
- const hmi_apis::Common_DriverDistractionState::eType state =
- static_cast<hmi_apis::Common_DriverDistractionState::eType>(
- (*message_)[strings::msg_params][hmi_notification::state]
- .asInt());
- ApplicationManagerImpl::instance()->set_driver_distraction(state);
-
- smart_objects::SmartObject* on_driver_distraction =
- new smart_objects::SmartObject();
-
- if (NULL == on_driver_distraction) {
- LOG4CXX_ERROR_EXT(logger_, "NULL pointer");
- return;
- }
-
- (*on_driver_distraction)[strings::params][strings::function_id] =
- mobile_api::FunctionID::OnDriverDistractionID;
-
- (*on_driver_distraction)[strings::msg_params][mobile_notification::state] =
- state;
-
- SendNotificationToMobile(on_driver_distraction);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc
deleted file mode 100644
index ba65e5ddf..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_all_applications_notification.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_exit_all_applications_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-#include "utils/signals.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnExitAllApplicationsNotification::OnExitAllApplicationsNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {
-}
-
-void OnExitAllApplicationsNotification::Run() {
- LOG4CXX_INFO(logger_, "OnExitAllApplicationsNotification::Run");
-
- const hmi_apis::Common_ApplicationsCloseReason::eType reason =
- static_cast<hmi_apis::Common_ApplicationsCloseReason::eType>(
- (*message_)[strings::msg_params][hmi_request::reason].asInt());
-
- mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
- mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM;
-
- switch (reason) {
- case hmi_apis::Common_ApplicationsCloseReason::IGNITION_OFF: {
- mob_reason = mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF;
- break;
- }
- case hmi_apis::Common_ApplicationsCloseReason::MASTER_RESET: {
- mob_reason = mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET;
- break;
- }
- case hmi_apis::Common_ApplicationsCloseReason::FACTORY_DEFAULTS: {
- mob_reason = mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS;
- break;
- }
- default : {
- LOG4CXX_ERROR(logger_, "Unkown Application close reason" << reason);
- return;
- }
- }
-
- ApplicationManagerImpl::instance()->SetUnregisterAllApplicationsReason(
- mob_reason);
-
- // notify life cycle to stop SDL
- utils::ForwardSignal();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc
deleted file mode 100644
index f74c2bb3a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_exit_application_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnExitApplicationNotification::OnExitApplicationNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnExitApplicationNotification::~OnExitApplicationNotification() {
-}
-
-void OnExitApplicationNotification::Run() {
- LOG4CXX_INFO(logger_, "OnExitApplicationNotification::Run");
-
- ApplicationManagerImpl::instance()->UnregisterApplication(
- (*message_)[strings::msg_params][strings::app_id].asUInt());
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_find_applications.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_find_applications.cc
deleted file mode 100644
index bc32ab1cf..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_find_applications.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_find_applications.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnFindApplications::OnFindApplications(const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnFindApplications::~OnFindApplications() {
-}
-
-void OnFindApplications::Run() {
- LOG4CXX_INFO(logger_, "OnFindApplications::Run");
-
- // TODO(PV): add UpdateAppsOnDevice to ApplicationManager
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc
deleted file mode 100644
index a68ae9079..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_navi_tbt_client_state_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {
-}
-
-void OnNaviTBTClientStateNotification::Run() {
- LOG4CXX_INFO(logger_, "OnNaviTBTClientStateNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnTBTClientStateID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc
deleted file mode 100644
index e05b38d45..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_play_tone_notification.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_play_tone_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnPlayToneNotification::OnPlayToneNotification(const MessageSharedPtr& message)
- : NotificationToHMI(message) {
-}
-
-OnPlayToneNotification::~OnPlayToneNotification() {
-}
-
-void OnPlayToneNotification::Run() {
- LOG4CXX_INFO(logger_, "OnPlayToneNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ready_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_ready_notification.cc
deleted file mode 100644
index ff870361b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ready_notification.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_ready_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnReadyNotification::OnReadyNotification(const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnReadyNotification::~OnReadyNotification() {
-}
-
-void OnReadyNotification::Run() {
- LOG4CXX_INFO(logger_, "OnReadyNotification::Run");
-
- ApplicationManagerImpl::instance()->OnHMIStartedCooperation();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc
deleted file mode 100644
index 70240b4bf..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_sdl_close_notification.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_sdl_close_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSDLCloseNotification::OnSDLCloseNotification(
- const MessageSharedPtr& message) : NotificationToHMI(message) {
-}
-
-OnSDLCloseNotification::~OnSDLCloseNotification() {
-}
-
-void OnSDLCloseNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSdlCloseNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_show_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_show_notification.cc
deleted file mode 100644
index b33a0310e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_show_notification.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_show_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnShowNotification::OnShowNotification(const MessageSharedPtr& message)
- : NotificationToHMI(message) {
-}
-
-OnShowNotification::~OnShowNotification() {
-}
-
-void OnShowNotification::Run() {
- LOG4CXX_INFO(logger_, "OnShowNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc
deleted file mode 100644
index fc5ffed42..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_start_device_discovery.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_start_device_discovery.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnStartDeviceDiscovery::OnStartDeviceDiscovery(const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {
-}
-
-void OnStartDeviceDiscovery::Run() {
- LOG4CXX_INFO(logger_, "OnStartDeviceDiscovery::Run");
-
- ApplicationManagerImpl::instance()->StartDevicesDiscovery();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc
deleted file mode 100644
index 1a4bab0b5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_system_context_notification.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_system_context_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace {
-using namespace mobile_api::AudioStreamingState;
-
-void UpdateVRState(ApplicationManagerImpl* app_mgr,
- bool vr_session_is_active_on_hmi) {
- // If VR session state is now different (has changed) on HMI
- if (app_mgr->vr_session_started() != vr_session_is_active_on_hmi) {
- app_mgr->set_vr_session_started(vr_session_is_active_on_hmi);
- }
-}
-
-}
-
-namespace commands {
-using namespace mobile_api::SystemContext;
-
-OnSystemContextNotification::OnSystemContextNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnSystemContextNotification::~OnSystemContextNotification() {
-}
-
-void OnSystemContextNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemContextNotification::Run");
-
- ApplicationManagerImpl* app_mgr = ApplicationManagerImpl::instance();
- const std::set<ApplicationSharedPtr>& app_list = app_mgr->applications();
- std::set<ApplicationSharedPtr>::const_iterator it = app_list.begin();
-
- mobile_api::SystemContext::eType system_context =
- static_cast<mobile_api::SystemContext::eType>(
- (*message_)[strings::msg_params][hmi_notification::system_context].asInt());
-
- UpdateVRState(app_mgr, SYSCTXT_VRSESSION == system_context);
-
- // SDLAQ-CRS-833 implementation
- for (; app_list.end() != it; ++it) {
- if (mobile_api::HMILevel::HMI_FULL == (*it)->hmi_level() ||
- mobile_api::HMILevel::HMI_LIMITED == (*it)->hmi_level()) {
-
- // If context actually changed
- if (system_context != (*it)->system_context()) {
- (*it)->set_system_context(system_context);
- }
-
- MessageHelper::SendHMIStatusNotification((*(*it)));
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
deleted file mode 100644
index d390cd863..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_system_request_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSystemRequestNotification::OnSystemRequestNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnSystemRequestNotification::~OnSystemRequestNotification() {
-}
-
-void OnSystemRequestNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemRequestNotification::Run");
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc
deleted file mode 100644
index 7efa49634..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_language_change_notification.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_tts_language_change_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {
-}
-
-void OnTTSLanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSLanguageChangeNotification::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_active_tts_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
-
- (*message_)[strings::msg_params][strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
-
- const std::set<ApplicationSharedPtr> applications =
- ApplicationManagerImpl::instance()->applications();
-
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (;applications.end() != it; ++it) {
- ApplicationSharedPtr app = (*it);
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
-
- if (static_cast<int>(app->language())
- != (*message_)[strings::msg_params][strings::language].asInt()) {
- app->set_hmi_level(mobile_api::HMILevel::HMI_NONE);
-
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
- ApplicationManagerImpl::instance()->UnregisterApplication(app->app_id());
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc
deleted file mode 100644
index c3c8daeea..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_started_notification.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_tts_started_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTTSStartedNotification::OnTTSStartedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnTTSStartedNotification::~OnTTSStartedNotification() {
-}
-
-void OnTTSStartedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSStartedNotification::Run");
-
- ApplicationManagerImpl::instance()->Mute();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc
deleted file mode 100644
index 55be65828..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_tts_stopped_notification.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_tts_stopped_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTTSStoppedNotification::OnTTSStoppedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnTTSStoppedNotification::~OnTTSStoppedNotification() {
-}
-
-void OnTTSStoppedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTTSStoppedNotification::Run");
-
- ApplicationManagerImpl::instance()->Unmute();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc
deleted file mode 100644
index 4ed5839e5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_command_notification.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_ui_command_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnUICommandNotification::OnUICommandNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnUICommandNotification::~OnUICommandNotification() {
-}
-
-void OnUICommandNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUICommandNotification::Run");
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
-
- (*message_)[strings::msg_params][strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_MENU);
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc
deleted file mode 100644
index 45ff7425b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_keyboard_input_notification.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_ui_keyboard_input_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {
-}
-
-void OnUIKeyBoardInputNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUIKeyBoardInputNotification::Run");
-
- //prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnKeyboardInputID;
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
deleted file mode 100644
index 115ff384f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_ui_language_change_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnUILanguageChangeNotification::OnUILanguageChangeNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {
-}
-
-void OnUILanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUILanguageChangeNotification::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_active_ui_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
-
- (*message_)[strings::msg_params][strings::hmi_display_language] =
- (*message_)[strings::msg_params][strings::language];
-
- (*message_)[strings::msg_params][strings::language] =
- hmi_capabilities.active_vr_language();
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
-
- const std::set<ApplicationSharedPtr> applications =
- ApplicationManagerImpl::instance()->applications();
-
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (;applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
-
- if (app->ui_language() != (*message_)[strings::msg_params]
- [strings::hmi_display_language].asInt()) {
-
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
- ApplicationManagerImpl::instance()->UnregisterApplication(app->app_id(), true);
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc
deleted file mode 100644
index 357bfc4cb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_reset_timeout_notification.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_ui_reset_timeout_notification.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnUIResetTimeoutNotification::OnUIResetTimeoutNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {
-}
-
-void OnUIResetTimeoutNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUIResetTimeoutNotification::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc
deleted file mode 100644
index 7868e8119..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_ui_touch_event_notification.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_ui_touch_event_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace hmi {
-
-OnUITouchEventNotification::OnUITouchEventNotification(
- const MessageSharedPtr& message) : NotificationFromHMI(message) {
-}
-
-OnUITouchEventNotification::~OnUITouchEventNotification() {
-}
-
-void OnUITouchEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnUITouchEventNotification::Run");
-
- //prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnTouchEventID;
- SendNotificationToMobile(message_);
-}
-
-} // namespace hmi
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_update_device_list.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_update_device_list.cc
deleted file mode 100644
index 737e62c74..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_update_device_list.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/on_update_device_list.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnUpdateDeviceList::OnUpdateDeviceList(const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnUpdateDeviceList::~OnUpdateDeviceList() {
-}
-
-void OnUpdateDeviceList::Run() {
- LOG4CXX_INFO(logger_, "OnUpdateDeviceList::Run");
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
deleted file mode 100644
index be0c4ebb6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {
-}
-
-void OnVIAccPedalPositionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIAccPedalPositionNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc
deleted file mode 100644
index 688a5c1fb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_belt_status_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_belt_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIBeltStatusNotification::OnVIBeltStatusNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {
-}
-
-void OnVIBeltStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIBeltStatusNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc
deleted file mode 100644
index e80a2edcf..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_body_information_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_body_information_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIBodyInformationNotification::OnVIBodyInformationNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {
-}
-
-void OnVIBodyInformationNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIBodyInformationNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc
deleted file mode 100644
index 4669398da..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_device_status_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_device_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIDeviceStatusNotification::OnVIDeviceStatusNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {
-}
-
-void OnVIDeviceStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIDeviceStatusNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc
deleted file mode 100644
index 8b61d0af2..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_driver_braking_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_driver_braking_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIDriverBrakingNotification::OnVIDriverBrakingNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {
-}
-
-void OnVIDriverBrakingNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIDriverBrakingNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc
deleted file mode 100644
index 1b0989b1e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_engine_torque_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_engine_torque_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIEngineTorqueNotification::OnVIEngineTorqueNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {
-}
-
-void OnVIEngineTorqueNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIEngineTorqueNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc
deleted file mode 100644
index f7a921359..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_external_temperature_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_external_temperature_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {
-}
-
-void OnVIExternalTemperatureNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIExternalTemperatureNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc
deleted file mode 100644
index 97d797b63..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_fuel_level_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIFuelLevelNotification::OnVIFuelLevelNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {
-}
-
-void OnVIFuelLevelNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIFuelLevelNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc
deleted file mode 100644
index 0024f17a8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_fuel_level_state_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_fuel_level_state_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {
-}
-
-void OnVIFuelLevelStateNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIFuelLevelStateNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc
deleted file mode 100644
index 5b7ec7297..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_gps_data_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_gps_data_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIGpsDataNotification::OnVIGpsDataNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIGpsDataNotification::~OnVIGpsDataNotification() {
-}
-
-void OnVIGpsDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIGpsDataNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc
deleted file mode 100644
index 355c00f0c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_head_lamp_status_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_head_lamp_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {
-}
-
-void OnVIHeadLampStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIHeadLampStatusNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
deleted file mode 100644
index 17240bce6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIInstantFuelConsumptionNotification::OnVIInstantFuelConsumptionNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIInstantFuelConsumptionNotification::~OnVIInstantFuelConsumptionNotification() {
-}
-
-void OnVIInstantFuelConsumptionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIInstantFuelConsumptionNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc
deleted file mode 100644
index 1caaecb44..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_my_key_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_my_key_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIMyKeyNotification::OnVIMyKeyNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIMyKeyNotification::~OnVIMyKeyNotification() {
-}
-
-void OnVIMyKeyNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIMyKeyNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc
deleted file mode 100644
index 02127a138..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_odometer_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_odometer_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIOdometerNotification::OnVIOdometerNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIOdometerNotification::~OnVIOdometerNotification() {
-}
-
-void OnVIOdometerNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIOdometerNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc
deleted file mode 100644
index 4692191cb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_prndl_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_prndl_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIPrndlNotification::OnVIPrndlNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIPrndlNotification::~OnVIPrndlNotification() {
-}
-
-void OnVIPrndlNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIPrndlNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc
deleted file mode 100644
index b16421903..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_rpm_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_rpm_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIRpmNotification::OnVIRpmNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIRpmNotification::~OnVIRpmNotification() {
-}
-
-void OnVIRpmNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIRpmNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc
deleted file mode 100644
index 6bc1e8b2c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_speed_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_speed_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVISpeedNotification::OnVISpeedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVISpeedNotification::~OnVISpeedNotification() {
-}
-
-void OnVISpeedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVISpeedNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
deleted file mode 100644
index 853b4eeea..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {
-}
-
-void OnVISteeringWheelAngleNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVISteeringWheelAngleNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc
deleted file mode 100644
index 01ac7e9f8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_tire_pressure_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_tire_pressure_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVITirePressureNotification::OnVITirePressureNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVITirePressureNotification::~OnVITirePressureNotification() {
-}
-
-void OnVITirePressureNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVITirePressureNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc
deleted file mode 100644
index eda88ef60..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vehicle_data_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIVehicleDataNotification::OnVIVehicleDataNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {
-}
-
-void OnVIVehicleDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIVehicleDataNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc
deleted file mode 100644
index 546dc0d3c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_vin_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_vin_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIVinNotification::OnVIVinNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIVinNotification::~OnVIVinNotification() {
-}
-
-void OnVIVinNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIVinNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc
deleted file mode 100644
index 101427df0..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vi_wiper_status_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vi_wiper_status_notification.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVIWiperStatusNotification::OnVIWiperStatusNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {
-}
-
-void OnVIWiperStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVIWiperStatusNotification::Run");
-
- // prepare SmartObject for mobile factory
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnVehicleDataID);
-
- SendNotificationToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc
deleted file mode 100644
index b4adc2a63..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_command_notification.cc
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vr_command_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-#include "config_profile/profile.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRCommandNotification::OnVRCommandNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVRCommandNotification::~OnVRCommandNotification() {
-}
-
-void OnVRCommandNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRCommandNotification::Run");
-
- ApplicationSharedPtr active_app = ApplicationManagerImpl::instance()
- ->active_application();
- const uint32_t cmd_id = (*message_)[strings::msg_params][strings::cmd_id]
- .asUInt();
- uint32_t max_cmd_id = profile::Profile::instance()->max_cmd_id();
- if (!active_app) {
- if (cmd_id > max_cmd_id + 1) {
- MessageHelper::SendActivateAppToHMI(cmd_id - max_cmd_id);
- } else {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- }
- return;
- }
-
- // Check if this is one of standart VR commands (i.e. "Help")
- if (cmd_id > max_cmd_id + 1) {
- LOG4CXX_INFO(logger_, "Switched App");
- MessageHelper::SendActivateAppToHMI(cmd_id - max_cmd_id);
- return;
- }
- // Check if this is "Help"
- if (cmd_id == max_cmd_id + 1) {
- return;
- }
- const uint32_t app_id = (*message_)[strings::msg_params][strings::app_id]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- /* check if perform interaction is active
- * if it is active we should sent to HMI DeleteCommand request
- * and PerformInterActionResponse to mobile
- */
- if (0 != app->is_perform_interaction_active()) {
- event_engine::Event event(hmi_apis::FunctionID::VR_OnCommand);
- event.set_smart_object(*message_);
- event.raise();
- } else {
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
-
- (*message_)[strings::msg_params][strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR);
- SendNotificationToMobile(message_);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc
deleted file mode 100644
index 72c7546f3..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_language_change_notification.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vr_language_change_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRLanguageChangeNotification::OnVRLanguageChangeNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {
-}
-
-void OnVRLanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRLanguageChangeNotification::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_active_vr_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
-
- (*message_)[strings::msg_params][strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
-
- const std::set<ApplicationSharedPtr> applications =
- ApplicationManagerImpl::instance()->applications();
-
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (;applications.end() != it; ++it) {
- ApplicationSharedPtr app = (*it);
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotificationToMobile(message_);
- int32_t lang = static_cast<int32_t>(app->language());
- if (lang
- != (*message_)[strings::msg_params][strings::language].asInt()) {
- app->set_hmi_level(mobile_api::HMILevel::HMI_NONE);
-
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE);
- ApplicationManagerImpl::instance()->UnregisterApplication(app->app_id(), true);
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc
deleted file mode 100644
index be0c54e2d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_started_notification.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vr_started_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRStartedNotification::OnVRStartedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVRStartedNotification::~OnVRStartedNotification() {
-}
-
-void OnVRStartedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRStartedNotification::Run");
-
- ApplicationManagerImpl::instance()->set_vr_session_started(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc
deleted file mode 100644
index 4d46f3735..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/on_vr_stopped_notification.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/on_vr_stopped_notification.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVRStoppedNotification::OnVRStoppedNotification(
- const MessageSharedPtr& message)
- : NotificationFromHMI(message) {
-}
-
-OnVRStoppedNotification::~OnVRStoppedNotification() {
-}
-
-void OnVRStoppedNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVRStoppedNotification::Run");
-
- ApplicationManagerImpl::instance()->set_vr_session_started(false);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/request_to_hmi.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
deleted file mode 100644
index aa8c97408..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/request_to_hmi.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RequestToHMI::RequestToHMI(const MessageSharedPtr& message)
- : CommandImpl(message) {
-}
-
-RequestToHMI::~RequestToHMI() {
-}
-
-bool RequestToHMI::Init() {
- return true;
-}
-
-bool RequestToHMI::CleanUp() {
- return true;
-}
-
-void RequestToHMI::Run() {
-}
-
-void RequestToHMI::SendRequest() {
- (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
- (*message_)[strings::params][strings::protocol_version] = protocol_version_;
-
- ApplicationManagerImpl::instance()->SendMessageToHMI(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/response_from_hmi.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/response_from_hmi.cc
deleted file mode 100644
index bba5d7d1e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/response_from_hmi.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/response_from_hmi.h"
-#include "application_manager/application_manager_impl.h"
-#include "smart_objects/smart_object.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResponseFromHMI::ResponseFromHMI(const MessageSharedPtr& message)
- : CommandImpl(message) {
- //If it is error response, shift info
- if ((*message)[strings::params].keyExists(hmi_response::message)) {
- (*message)[strings::msg_params][strings::info] =
- (*message)[strings::params][hmi_response::message];
- }
-}
-
-ResponseFromHMI::~ResponseFromHMI() {
-}
-
-bool ResponseFromHMI::Init() {
- return true;
-}
-
-bool ResponseFromHMI::CleanUp() {
- return true;
-}
-
-void ResponseFromHMI::Run() {
-}
-
-void ResponseFromHMI::SendResponseToMobile(const MessageSharedPtr& message) {
- (*message)[strings::params][strings::message_type] = MessageType::kResponse;
-
- ApplicationManagerImpl::instance()->ManageMobileCommand(message);
-}
-
-void ResponseFromHMI::CreateHMIRequest(
- const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const {
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
-
- if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
- return;
- }
-
- // get hmi correlation id for chaining further request from this object
- const uint32_t hmi_correlation_id_ = ApplicationManagerImpl::instance()
- ->GetNextHMICorrelationID();
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
- request[strings::params][strings::message_type] = MessageType::kRequest;
- request[strings::params][strings::function_id] = function_id;
- request[strings::params][strings::correlation_id] = hmi_correlation_id_;
- request[strings::params][strings::protocol_version] =
- CommandImpl::protocol_version_;
- request[strings::params][strings::protocol_type] =
- CommandImpl::hmi_protocol_type_;
-
- request[strings::msg_params] = msg_params;
-
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- return;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc
deleted file mode 100644
index 638503d16..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_change_registration_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSChangeRegistrationRequest::TTSChangeRegistrationRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {
-}
-
-void TTSChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSChangeRegistrationRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc
deleted file mode 100644
index 67e48b4ed..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_change_registration_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_change_registration_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSChangeRegistratioResponse::TTSChangeRegistratioResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {
-}
-
-void TTSChangeRegistratioResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSChangeRegistratioResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_ChangeRegistration);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc
deleted file mode 100644
index 59cf50b38..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {
-}
-
-void TTSGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSGetCapabilitiesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc
deleted file mode 100644
index f7309822d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_capabilities_response.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_get_capabilities_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {
-}
-
-void TTSGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSGetCapabilitiesResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- if ((*message_)[strings::msg_params].keyExists(hmi_response::speech_capabilities)) {
- hmi_capabilities.set_speech_capabilities(
- (*message_)[strings::msg_params][hmi_response::speech_capabilities]);
- }
- if ((*message_)[strings::msg_params].keyExists(
- hmi_response::prerecorded_speech_capabilities)) {
- hmi_capabilities.set_prerecorded_speech(
- (*message_)[strings::msg_params]
- [hmi_response::prerecorded_speech_capabilities]);
- }
-
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc
deleted file mode 100644
index 9f2fe7134..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_get_language_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetLanguageRequest::TTSGetLanguageRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSGetLanguageRequest::~TTSGetLanguageRequest() {
-}
-
-void TTSGetLanguageRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSGetLanguageRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
deleted file mode 100644
index e26fa8773..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_get_language_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetLanguageResponse::TTSGetLanguageResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSGetLanguageResponse::~TTSGetLanguageResponse() {
-}
-
-void TTSGetLanguageResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSGetLanguageResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_active_tts_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][hmi_response::language].asInt()));
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc
deleted file mode 100644
index 08c1d8244..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_get_supported_languages_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {
-}
-
-void TTSGetSupportedLanguagesRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSGetSupportedLanguagesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc
deleted file mode 100644
index aa041f66b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_get_supported_languages_response.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_get_supported_languages_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {
-}
-
-void TTSGetSupportedLanguagesResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSGetSupportedLanguagesResponse::Run");
-
- const hmi_apis::Common_Result::eType code =
- static_cast<hmi_apis::Common_Result::eType>(
- (*message_)[strings::params][hmi_response::code].asInt());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_tts_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc
deleted file mode 100644
index 7733de488..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSIsReadyRequest::TTSIsReadyRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSIsReadyRequest::~TTSIsReadyRequest() {
-}
-
-void TTSIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSIsReadyRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc
deleted file mode 100644
index fb3cb4858..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_is_ready_response.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_is_ready_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSIsReadyResponse::TTSIsReadyResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSIsReadyResponse::~TTSIsReadyResponse() {
-}
-
-void TTSIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSIsReadyResponse::Run");
- smart_objects::SmartObject& object = *message_;
-
- bool is_available = false;
- if (object[strings::msg_params].keyExists(strings::available)) {
- is_available = object[strings::msg_params][strings::available].asBool();
- }
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- hmi_capabilities.set_is_tts_cooperating(is_available);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_request.cc
deleted file mode 100644
index a61902123..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_perform_interaction_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSPerformInteractionRequest::TTSPerformInteractionRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSPerformInteractionRequest::~TTSPerformInteractionRequest() {
-}
-
-void TTSPerformInteractionRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSPerformInteractionRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_response.cc
deleted file mode 100644
index 2ddacca6b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_perform_interaction_response.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_perform_interaction_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSPerformInteractionResponse::TTSPerformInteractionResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSPerformInteractionResponse::~TTSPerformInteractionResponse() {
-}
-
-void TTSPerformInteractionResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSPerformInteractionResponse::Run");
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc
deleted file mode 100644
index 04f1380d9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_set_global_properties_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {
-}
-
-void TTSSetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSSetGlobalPropertiesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc
deleted file mode 100644
index c90655186..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_set_global_properties_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_set_global_properties_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {
-}
-
-void TTSSetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSSetGlobalPropertiesResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_request.cc
deleted file mode 100644
index 9b4bd6858..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_speak_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSpeakRequest::TTSSpeakRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSSpeakRequest::~TTSSpeakRequest() {
-}
-
-void TTSSpeakRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSSpeakRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_response.cc
deleted file mode 100644
index 9b9e43dbe..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_speak_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_speak_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSSpeakResponse::TTSSpeakResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSSpeakResponse::~TTSSpeakResponse() {
-}
-
-void TTSSpeakResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSSpeakResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc
deleted file mode 100644
index 107cb7933..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/tts_stop_speaking_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSStopSpeakingRequest::TTSStopSpeakingRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {
-}
-
-void TTSStopSpeakingRequest::Run() {
- LOG4CXX_INFO(logger_, "TTSStopSpeakingRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc
deleted file mode 100644
index 9bd4f8966..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/tts_stop_speaking_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/tts_stop_speaking_response.h"
-
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-TTSStopSpeakingResponse::TTSStopSpeakingResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {
-}
-
-void TTSStopSpeakingResponse::Run() {
- LOG4CXX_INFO(logger_, "TTSStopSpeakingResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::TTS_StopSpeaking);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc
deleted file mode 100644
index 9aa5d2e2d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_add_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddCommandRequest::UIAddCommandRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIAddCommandRequest::~UIAddCommandRequest() {
-}
-
-void UIAddCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "UIAddCommandRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc
deleted file mode 100644
index 21b34e063..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_command_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_add_command_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddCommandResponse::UIAddCommandResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIAddCommandResponse::~UIAddCommandResponse() {
-}
-
-void UIAddCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "UIAddCommandResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_AddCommand);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc
deleted file mode 100644
index 7a9c5c6fe..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_add_submenu_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddSubmenuRequest::UIAddSubmenuRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIAddSubmenuRequest::~UIAddSubmenuRequest() {
-}
-
-void UIAddSubmenuRequest::Run() {
- LOG4CXX_INFO(logger_, "UIAddCommandRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc
deleted file mode 100644
index af88de2b4..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_add_submenu_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_add_submenu_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAddSubmenuResponse::UIAddSubmenuResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIAddSubmenuResponse::~UIAddSubmenuResponse() {
-}
-
-void UIAddSubmenuResponse::Run() {
- LOG4CXX_INFO(logger_, "UIAddSubmenuResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_AddSubMenu);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_request.cc
deleted file mode 100644
index f8c9ed570..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_alert_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAlertRequest::UIAlertRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIAlertRequest::~UIAlertRequest() {
-}
-
-void UIAlertRequest::Run() {
- LOG4CXX_INFO(logger_, "UIAlertRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_response.cc
deleted file mode 100644
index 289b90d29..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_alert_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_alert_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIAlertResponse::UIAlertResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIAlertResponse::~UIAlertResponse() {
-}
-
-void UIAlertResponse::Run() {
- LOG4CXX_INFO(logger_, "UIAlertResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_Alert);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc
deleted file mode 100644
index fbba2b402..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_change_registration_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIChangeRegistrationRequest::UIChangeRegistrationRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {
-}
-
-void UIChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "UIChangeRegistrationRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc
deleted file mode 100644
index 16447077d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_change_registration_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_change_registration_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIChangeRegistratioResponse::UIChangeRegistratioResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {
-}
-
-void UIChangeRegistratioResponse::Run() {
- LOG4CXX_INFO(logger_, "UIChangeRegistratioResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_ChangeRegistration);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc
deleted file mode 100644
index 23fb4c67f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_delete_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteCommandRequest::UIDeleteCommandRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIDeleteCommandRequest::~UIDeleteCommandRequest() {
-}
-
-void UIDeleteCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteCommandRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc
deleted file mode 100644
index 0ac32877c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_command_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_delete_command_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteCommandResponse::UIDeleteCommandResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIDeleteCommandResponse::~UIDeleteCommandResponse() {
-}
-
-void UIDeleteCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteCommandResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_DeleteCommand);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc
deleted file mode 100644
index 41f356b98..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_delete_submenu_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {
-}
-
-void UIDeleteSubmenuRequest::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteSubmenuRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc
deleted file mode 100644
index 5a3359b72..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_delete_submenu_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_delete_submenu_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIDeleteSubmenuResponse::UIDeleteSubmenuResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {
-}
-
-void UIDeleteSubmenuResponse::Run() {
- LOG4CXX_INFO(logger_, "UIDeleteSubmenuResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc
deleted file mode 100644
index 4c93f9235..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIEndAudioPassThruRequest::UIEndAudioPassThruRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {
-}
-
-void UIEndAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "UIEndAudioPassThruRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc
deleted file mode 100644
index e560ae293..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_end_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIEndAudioPassThruResponse::UIEndAudioPassThruResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {
-}
-
-void UIEndAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "UIEndAudioPassThruResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc
deleted file mode 100644
index b9f1b6917..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetCapabilitiesRequest::UIGetCapabilitiesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {
-}
-
-void UIGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "UIGetCapabilitiesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc
deleted file mode 100644
index 0663bf033..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_capabilities_response.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_get_capabilities_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetCapabilitiesResponse::UIGetCapabilitiesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {
-}
-
-void UIGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "UIGetCapabilitiesResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_display_capabilities(
- (*message_)[strings::msg_params][hmi_response::display_capabilities]);
-
- hmi_capabilities.set_hmi_zone_capabilities(
- (*message_)[strings::msg_params][hmi_response::hmi_zone_capabilities]);
-
- if ((*message_)[strings::msg_params].keyExists(
- hmi_response::soft_button_capabilities)) {
- hmi_capabilities.set_soft_button_capabilities(
- (*message_)[strings::msg_params][hmi_response::soft_button_capabilities]);
- }
-
- if ((*message_)[strings::msg_params].keyExists(
- strings::audio_pass_thru_capabilities)) {
-
- hmi_capabilities.set_audio_pass_thru_capabilities(
- (*message_)[strings::msg_params][strings::audio_pass_thru_capabilities]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc
deleted file mode 100644
index ffca242d4..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_get_language_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetLanguageRequest::UIGetLanguageRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIGetLanguageRequest::~UIGetLanguageRequest() {
-}
-
-void UIGetLanguageRequest::Run() {
- LOG4CXX_INFO(logger_, "UIGetLanguageRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
deleted file mode 100644
index 20435d788..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_get_language_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetLanguageResponse::UIGetLanguageResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIGetLanguageResponse::~UIGetLanguageResponse() {
-}
-
-void UIGetLanguageResponse::Run() {
- LOG4CXX_INFO(logger_, "UIGetLanguageResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_active_ui_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][hmi_response::language].asInt()));
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc
deleted file mode 100644
index 455486ef6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_get_supported_languages_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {
-}
-
-void UIGetSupportedLanguagesRequest::Run() {
- LOG4CXX_INFO(logger_, "UIGetSupportedLanguagesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc
deleted file mode 100644
index 8492cfca5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_get_supported_languages_response.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_get_supported_languages_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {
-}
-
-void UIGetSupportedLanguagesResponse::Run() {
- LOG4CXX_INFO(logger_, "UIGetSupportedLanguagesResponse::Run");
-
- const hmi_apis::Common_Result::eType code =
- static_cast<hmi_apis::Common_Result::eType>(
- (*message_)[strings::params][hmi_response::code].asInt());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_ui_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc
deleted file mode 100644
index 50d0ddd95..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIIsReadyRequest::UIIsReadyRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIIsReadyRequest::~UIIsReadyRequest() {
-}
-
-void UIIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "UIIsReadyRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc
deleted file mode 100644
index 97d11b602..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_is_ready_response.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_is_ready_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIIsReadyResponse::UIIsReadyResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIIsReadyResponse::~UIIsReadyResponse() {
-}
-
-void UIIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "UIIsReadyResponse::Run");
- smart_objects::SmartObject& object = *message_;
-
- bool is_available = false;
- if (object[strings::msg_params].keyExists(strings::available)) {
- is_available = object[strings::msg_params][strings::available].asBool();
- }
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_is_ui_cooperating(is_available);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
deleted file mode 100644
index cf77703a9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {
-}
-
-void UIPerformAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "UIPerformAudioPassThruRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
deleted file mode 100644
index 36d4c507b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {
-}
-
-void UIPerformAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "UIPerformAudioPassThruResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc
deleted file mode 100644
index 09f98ec03..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_perform_interaction_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformInteractionRequest::UIPerformInteractionRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIPerformInteractionRequest::~UIPerformInteractionRequest() {
-}
-
-void UIPerformInteractionRequest::Run() {
- LOG4CXX_INFO(logger_, "UIPerformInteractionRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc
deleted file mode 100644
index 2f5f6ead5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_perform_interaction_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_perform_interaction_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIPerformInteractionResponse::UIPerformInteractionResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIPerformInteractionResponse::~UIPerformInteractionResponse() {
-}
-
-void UIPerformInteractionResponse::Run() {
- LOG4CXX_INFO(logger_, "UIPerformInteractionResponse::Run");
- event_engine::Event event(hmi_apis::FunctionID::UI_PerformInteraction);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc
deleted file mode 100644
index ac34dd236..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_scrollable_message_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIScrollableMessageRequest::UIScrollableMessageRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIScrollableMessageRequest::~UIScrollableMessageRequest() {
-}
-
-void UIScrollableMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "UIScrollableMessageRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc
deleted file mode 100644
index 182d512c8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_scrollable_message_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_scrollable_message_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIScrollableMessageResponse::UIScrollableMessageResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIScrollableMessageResponse::~UIScrollableMessageResponse() {
-}
-
-void UIScrollableMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "UIScrollableMessageResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc
deleted file mode 100644
index 3dea85348..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_request.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_set_display_layout_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest(
- const MessageSharedPtr& message): RequestToHMI(message) {
-}
-
-UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {
-}
-
-void UiSetDisplayLayoutRequest::Run() {
- LOG4CXX_INFO(logger_, "UiSetDisplayLayoutRequest::Run");
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc
deleted file mode 100644
index f381a4db2..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_display_layout_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_set_display_layout_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse(
- const MessageSharedPtr& message): ResponseFromHMI(message) {
-}
-
-UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {
-}
-
-void UiSetDisplayLayoutResponse::Run() {
- LOG4CXX_INFO(logger_, "UiSetDisplayLayoutResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc
deleted file mode 100644
index e538866c1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_set_global_properties_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {
-}
-
-void UISetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "UISetGlobalPropertiesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc
deleted file mode 100644
index 67023533c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_global_properties_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_set_global_properties_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {
-}
-
-void UISetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "UISetGlobalPropertiesResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
deleted file mode 100644
index b587a3028..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_set_icon_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetIconRequest::UISetIconRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UISetIconRequest::~UISetIconRequest() {
-}
-
-void UISetIconRequest::Run() {
- LOG4CXX_INFO(logger_, "UISetIconRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc
deleted file mode 100644
index f4565baaf..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_icon_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_set_icon_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetIconResponse::UISetIconResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UISetIconResponse::~UISetIconResponse() {
-}
-
-void UISetIconResponse::Run() {
- LOG4CXX_INFO(logger_, "UISetIconResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc
deleted file mode 100644
index 1eb218013..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetMediaClockTimerRequest::UISetMediaClockTimerRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {
-}
-
-void UISetMediaClockTimerRequest::Run() {
- LOG4CXX_INFO(logger_, "UISetMediaClockTimerRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc
deleted file mode 100644
index ee67862a1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_set_media_clock_timer_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISetMediaClockTimerResponse::UISetMediaClockTimerResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {
-}
-
-void UISetMediaClockTimerResponse::Run() {
- LOG4CXX_INFO(logger_, "UISetMediaClockTimerResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_request.cc
deleted file mode 100644
index 841c8a62f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_show_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIShowRequest::UIShowRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UIShowRequest::~UIShowRequest() {
-}
-
-void UIShowRequest::Run() {
- LOG4CXX_INFO(logger_, "UIShowRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_response.cc
deleted file mode 100644
index c95cbbd2b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_show_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_show_response.h"
-#include "application_manager/event_engine/event.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UIShowResponse::UIShowResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UIShowResponse::~UIShowResponse() {
-}
-
-void UIShowResponse::Run() {
- LOG4CXX_INFO(logger_, "UIShowResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_Show);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_request.cc
deleted file mode 100644
index fc7203c0e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/ui_slider_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISliderRequest::UISliderRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UISliderRequest::~UISliderRequest() {
-}
-
-void UISliderRequest::Run() {
- LOG4CXX_INFO(logger_, "UISliderRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_response.cc
deleted file mode 100644
index 8d2522e22..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/ui_slider_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/ui_slider_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UISliderResponse::UISliderResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UISliderResponse::~UISliderResponse() {
-}
-
-void UISliderResponse::Run() {
- LOG4CXX_INFO(logger_, "UISliderResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::UI_Slider);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_request.cc
deleted file mode 100644
index eaa09b40c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/update_app_list_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateAppListRequest::UpdateAppListRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UpdateAppListRequest::~UpdateAppListRequest() {
-}
-
-void UpdateAppListRequest::Run() {
- LOG4CXX_INFO(logger_, "UpdateAppListRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_response.cc
deleted file mode 100644
index 7c8537bc8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/update_app_list_response.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/update_app_list_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateAppListResponse::UpdateAppListResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UpdateAppListResponse::~UpdateAppListResponse() {
-}
-
-void UpdateAppListResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateAppListResponse::Run");
-
- // TODO(PV): add check
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_request.cc
deleted file mode 100644
index 6346f312f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_request.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/update_device_list_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateDeviceListRequest::UpdateDeviceListRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-UpdateDeviceListRequest::~UpdateDeviceListRequest() {
-}
-
-void UpdateDeviceListRequest::Run() {
- LOG4CXX_INFO(logger_, "UpdateDeviceListRequest::Run");
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_response.cc
deleted file mode 100644
index 85ef57404..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/update_device_list_response.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/update_device_list_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateDeviceListResponse::UpdateDeviceListResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-UpdateDeviceListResponse::~UpdateDeviceListResponse() {
-}
-
-void UpdateDeviceListResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateDeviceListResponse::Run");
-
- // TODO(PV): add check for correctness.
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc
deleted file mode 100644
index 45d44e447..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_diagnostic_message_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {
-}
-
-void VIDiagnosticMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "VIDiagnosticMessageRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc
deleted file mode 100644
index d83869b27..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_diagnostic_message_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_diagnostic_message_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {
-}
-
-void VIDiagnosticMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "VIDiagnosticMessageResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc
deleted file mode 100644
index 5289816fb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_get_dtcs_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetDTCsRequest::VIGetDTCsRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIGetDTCsRequest::~VIGetDTCsRequest() {
-}
-
-void VIGetDTCsRequest::Run() {
- LOG4CXX_INFO(logger_, "VIGetDTCsRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc
deleted file mode 100644
index 0cacc51d6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_dtcs_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_get_dtcs_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetDTCsResponse::VIGetDTCsResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIGetDTCsResponse::~VIGetDTCsResponse() {
-}
-
-void VIGetDTCsResponse::Run() {
- LOG4CXX_INFO(logger_, "VIGetDTCsResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc
deleted file mode 100644
index 40b2ca9fe..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleDataRequest::VIGetVehicleDataRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {
-}
-
-void VIGetVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleDataRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc
deleted file mode 100644
index 122ddcced..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_data_response.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_get_vehicle_data_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleDataResponse::VIGetVehicleDataResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {
-}
-
-void VIGetVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleDataResponse::Run");
- smart_objects::SmartObject* result_so = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!result_so) {
- // TODO(PV): add response with out of memory.
- LOG4CXX_ERROR(logger_,
- "Failed to create new Smart Object on get vehicle response.");
- return;
- }
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
-
- smart_objects::SmartObject& result = *result_so;
-
- if ((*message_)[strings::params][strings::message_type]
- == static_cast<int32_t>(hmi_apis::messageType::error_response)) {
- if ((*message_)[strings::params].keyExists(strings::data)) {
- result[strings::msg_params] = (*message_)[strings::params][strings::data];
- result[strings::params][hmi_response::code] =
- (*message_)[strings::params][hmi_response::code];
- result[strings::params][strings::correlation_id] =
- (*message_)[strings::params][strings::correlation_id];
- result[strings::params][strings::error_msg] =
- (*message_)[strings::params][strings::error_msg];
- result[strings::params][strings::message_type] =
- (*message_)[strings::params][strings::message_type];
- result[strings::params][strings::protocol_type] =
- (*message_)[strings::params][strings::protocol_type];
- result[strings::params][strings::protocol_version] =
- (*message_)[strings::params][strings::protocol_version];
- }
-
- event.set_smart_object(*result_so);
- } else {
- event.set_smart_object(*message_);
- }
-
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc
deleted file mode 100644
index 4c46de950..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_get_vehicle_type_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {
-}
-
-void VIGetVehicleTypeRequest::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleTypeRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc
deleted file mode 100644
index 18c0136d1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_get_vehicle_type_response.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_get_vehicle_type_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {
-}
-
-void VIGetVehicleTypeResponse::Run() {
- LOG4CXX_INFO(logger_, "VIGetVehicleTypeResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_vehicle_type(
- (*message_)[strings::msg_params][hmi_response::vehicle_type]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc
deleted file mode 100644
index 074d6f602..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIIsReadyRequest::VIIsReadyRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIIsReadyRequest::~VIIsReadyRequest() {
-}
-
-void VIIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "VIIsReadyRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
deleted file mode 100644
index f06e01879..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_is_ready_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIIsReadyResponse::VIIsReadyResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIIsReadyResponse::~VIIsReadyResponse() {
-}
-
-void VIIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "VIIsReadyResponse::Run");
- smart_objects::SmartObject& object = *message_;
-
- bool is_available = false;
- if (object[strings::msg_params].keyExists(strings::available)) {
- is_available = object[strings::msg_params][strings::available].asBool();
- }
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- hmi_capabilities.set_is_ivi_cooperating(is_available);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc
deleted file mode 100644
index 1485b471c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_read_did_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIReadDIDRequest::VIReadDIDRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIReadDIDRequest::~VIReadDIDRequest() {
-}
-
-void VIReadDIDRequest::Run() {
- LOG4CXX_INFO(logger_, "VIReadDIDRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc
deleted file mode 100644
index ddd9f3c54..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_read_did_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_read_did_response.h"
-#include "application_manager/event_engine/event.h"
-#include "application_manager/application_manager_impl.h"
-
-
-namespace application_manager {
-
-namespace commands {
-
-VIReadDIDResponse::VIReadDIDResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIReadDIDResponse::~VIReadDIDResponse() {
-}
-
-void VIReadDIDResponse::Run() {
- LOG4CXX_INFO(logger_, "VIReadDIDResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_ReadDID);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
deleted file mode 100644
index 38950a2a2..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {
-}
-
-void VISubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "VISubscribeVehicleDataRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
deleted file mode 100644
index bd67294fb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {
-}
-
-void VISubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "VISubscribeVehicleDataResponse::Run");
- event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData
- );
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
deleted file mode 100644
index 0af87c2a2..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {
-}
-
-void VIUnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "VIUnsubscribeVehicleDataRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
deleted file mode 100644
index 22231b4a6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {
-}
-
-void VIUnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "VIUnsubscribeVehicleDataResponse::Run");
- event_engine::Event event(
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData
- );
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc
deleted file mode 100644
index a74ece95d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_add_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRAddCommandRequest::VRAddCommandRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRAddCommandRequest::~VRAddCommandRequest() {
-}
-
-void VRAddCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "VRAddCommandRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc
deleted file mode 100644
index 513ccdace..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_add_command_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_add_command_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRAddCommandResponse::VRAddCommandResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRAddCommandResponse::~VRAddCommandResponse() {
-}
-
-void VRAddCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "VRAddCommandResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc
deleted file mode 100644
index bd7c1e784..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_change_registration_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRChangeRegistrationRequest::VRChangeRegistrationRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {
-}
-
-void VRChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "VRChangeRegistrationRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc
deleted file mode 100644
index 92a36d23f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_change_registration_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_change_registration_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRChangeRegistrationResponse::VRChangeRegistrationResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {
-}
-
-void VRChangeRegistrationResponse::Run() {
- LOG4CXX_INFO(logger_, "VRChangeRegistratioResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::VR_ChangeRegistration);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc
deleted file mode 100644
index 0241be630..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_delete_command_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRDeleteCommandRequest::VRDeleteCommandRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRDeleteCommandRequest::~VRDeleteCommandRequest() {
-}
-
-void VRDeleteCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "VRDeleteCommandRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc
deleted file mode 100644
index c5a13126b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_delete_command_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_delete_command_response.h"
-#include "application_manager/event_engine/event.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRDeleteCommandResponse::VRDeleteCommandResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRDeleteCommandResponse::~VRDeleteCommandResponse() {
-}
-
-void VRDeleteCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "VRDeleteCommandResponse::Run");
-
- event_engine::Event event(hmi_apis::FunctionID::VR_DeleteCommand);
- event.set_smart_object(*message_);
- event.raise();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc
deleted file mode 100644
index 8b1d4ae0b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_get_capabilities_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetCapabilitiesRequest::VRGetCapabilitiesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {
-}
-
-void VRGetCapabilitiesRequest::Run() {
- LOG4CXX_INFO(logger_, "VRGetCapabilitiesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc
deleted file mode 100644
index de6fdd7a9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_capabilities_response.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_get_capabilities_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetCapabilitiesResponse::VRGetCapabilitiesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {
-}
-
-void VRGetCapabilitiesResponse::Run() {
- LOG4CXX_INFO(logger_, "VRGetCapabilitiesResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
-
- hmi_capabilities.set_vr_capabilities(
- (*message_)[strings::msg_params][strings::vr_capabilities]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc
deleted file mode 100644
index 9f4aeb979..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_get_language_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetLanguageRequest::VRGetLanguageRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRGetLanguageRequest::~VRGetLanguageRequest() {
-}
-
-void VRGetLanguageRequest::Run() {
- LOG4CXX_INFO(logger_, "VRGetLanguageRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
deleted file mode 100644
index acbd24fbb..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_get_language_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetLanguageResponse::VRGetLanguageResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRGetLanguageResponse::~VRGetLanguageResponse() {
-}
-
-void VRGetLanguageResponse::Run() {
- LOG4CXX_INFO(logger_, "VRGetLanguageResponse::Run");
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- hmi_capabilities.set_active_vr_language(
- static_cast<hmi_apis::Common_Language::eType>(
- (*message_)[strings::msg_params][hmi_response::language].asInt()));
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc
deleted file mode 100644
index e43d88430..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_request.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_get_supported_languages_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest(
- const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {
-}
-
-void VRGetSupportedLanguagesRequest::Run() {
- LOG4CXX_INFO(logger_, "VRGetSupportedLanguagesRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc
deleted file mode 100644
index d2cc148a0..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_get_supported_languages_response.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_get_supported_languages_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse(
- const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {
-}
-
-void VRGetSupportedLanguagesResponse::Run() {
- LOG4CXX_INFO(logger_, "VRGetSupportedLanguagesResponse::Run");
-
- const hmi_apis::Common_Result::eType code =
- static_cast<hmi_apis::Common_Result::eType>(
- (*message_)[strings::params][hmi_response::code].asInt());
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- hmi_capabilities.set_vr_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc
deleted file mode 100644
index 944cfcbb3..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_request.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/hmi/vr_is_ready_request.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRIsReadyRequest::VRIsReadyRequest(const MessageSharedPtr& message)
- : RequestToHMI(message) {
-}
-
-VRIsReadyRequest::~VRIsReadyRequest() {
-}
-
-void VRIsReadyRequest::Run() {
- LOG4CXX_INFO(logger_, "VRIsReadyRequest::Run");
-
- SendRequest();
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc b/SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
deleted file mode 100644
index 8cf5e66ee..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "application_manager/commands/hmi/vr_is_ready_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-VRIsReadyResponse::VRIsReadyResponse(const MessageSharedPtr& message)
- : ResponseFromHMI(message) {
-}
-
-VRIsReadyResponse::~VRIsReadyResponse() {
-}
-
-void VRIsReadyResponse::Run() {
- LOG4CXX_INFO(logger_, "VRIsReadyResponse::Run");
- smart_objects::SmartObject& object = *message_;
-
- bool is_available = false;
- if (object[strings::msg_params].keyExists(strings::available)) {
- is_available = object[strings::msg_params][strings::available].asBool();
- }
-
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- hmi_capabilities.set_is_vr_cooperating(is_available);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/add_command_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/add_command_request.cc
deleted file mode 100644
index 78bc47c06..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/add_command_request.cc
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include "application_manager/commands/mobile/add_command_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddCommandRequest::AddCommandRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- is_ui_send_(false),
- is_vr_send_(false),
- is_ui_received_(false),
- is_vr_received_(false),
- ui_result_(hmi_apis::Common_Result::INVALID_ENUM),
- vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {
-}
-
-AddCommandRequest::~AddCommandRequest() {
-}
-
-void AddCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "AddCommandRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "No application associated with session key");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "MessageHelper::VerifyImageFiles return " << verification_result);
- SendResponse(false, verification_result);
- return;
- }
-
- if (!((*message_)[strings::msg_params].keyExists(strings::cmd_id))) {
- LOG4CXX_ERROR_EXT(logger_, "INVALID_DATA");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (app->FindCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asUInt())) {
- LOG4CXX_ERROR_EXT(logger_, "INVALID_ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- bool data_exist = false;
-
- if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
- if (!CheckCommandName(app)) {
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
- if ((*message_)[strings::msg_params][strings::menu_params].keyExists(
- hmi_request::parent_id)) {
- if (!CheckCommandParentId(app)) {
- SendResponse(false, mobile_apis::Result::INVALID_ID,
- "Parent ID doesn't exist");
- return;
- }
- }
- data_exist = true;
- }
-
- if (((*message_)[strings::msg_params].keyExists(strings::vr_commands))
- && ((*message_)[strings::msg_params]
- [strings::vr_commands].length() > 0)) {
-
- if (!CheckCommandVRSynonym(app)) {
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
-
- if (!CheckVRCommandsNames()) {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- data_exist = true;
- }
-
- if (!data_exist) {
- LOG4CXX_ERROR_EXT(logger_, "INVALID_DATA");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
- if (!CheckMenuName()) {
- LOG4CXX_ERROR_EXT(logger_, "MenuName is invalid");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- msg_params[strings::menu_params] =
- (*message_)[strings::msg_params][strings::menu_params];
-
- msg_params[strings::app_id] = app->app_id();
-
- if ( ((*message_)[strings::msg_params].keyExists(strings::cmd_icon))
- && ((*message_)[strings::msg_params][strings::cmd_icon].keyExists(strings::value))
- && (0 < (*message_)[strings::msg_params][strings::cmd_icon]
- [strings::value].length())) {
- msg_params[strings::cmd_icon] =
- (*message_)[strings::msg_params][strings::cmd_icon];
- }
-
- is_ui_send_ = true;
-
- SendHMIRequest(hmi_apis::FunctionID::UI_AddCommand, &msg_params, true);
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::vr_commands)) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- msg_params[strings::vr_commands] =
- (*message_)[strings::msg_params][strings::vr_commands];
- msg_params[strings::app_id] = app->app_id();
-
- is_vr_send_ = true;
-
- SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &msg_params, true);
- }
-}
-
-bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator i = commands.begin();
-
- for (; commands.end() != i; ++i) {
-
- if(!(*i->second).keyExists(strings::menu_params)) {
- continue;
- }
-
- if ((*i->second)[strings::menu_params][strings::menu_name].asString()
- == (*message_)[strings::msg_params][strings::menu_params]
- [strings::menu_name].asString()) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::CheckCommandName received"
- " command name already exist");
- return false;
- }
- }
- return true;
-}
-
-bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator it = commands.begin();
-
- for (; commands.end() != it; ++it) {
-
- if(!(*it->second).keyExists(strings::vr_commands)) {
- continue;
- }
-
- for (size_t i = 0; i < (*it->second)[strings::vr_commands].length(); ++i) {
- for (size_t j = 0;
- j < (*message_)[strings::msg_params][strings::vr_commands].length();
- ++j) {
- std::string vr_cmd_i =
- (*it->second)[strings::vr_commands][i].asString();
- std::string vr_cmd_j =
- (*message_)[strings::msg_params]
- [strings::vr_commands][j].asString();
-
- if (0 == strcasecmp(vr_cmd_i.c_str(), vr_cmd_j.c_str())) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::CheckCommandVRSynonym"
- " received command vr synonym already exist");
- return false;
- }
- }
- }
- }
- return true;
-}
-
-bool AddCommandRequest::CheckVRCommandsNames() {
- for (size_t i = 0;
- i < (*message_)[strings::msg_params][strings::vr_commands].length();
- ++i) {
- const std::string& str =
- (*message_)[strings::msg_params][strings::vr_commands][i].asString();
-
- if (!CheckSyntax(str)) {
- LOG4CXX_INFO(logger_, "Invalid command name.");
- return false;
- }
- }
- return true;
-}
-
-bool AddCommandRequest::CheckMenuName() {
- const std::string& str = (*message_)[strings::msg_params][strings::menu_params]
- [strings::menu_name].asString();
- if (!CheckSyntax(str)) {
- LOG4CXX_INFO(logger_, "Invalid menu name.");
- return false;
- }
- return true;
-}
-
-bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
- if (!app) {
- return false;
- }
-
- const int32_t parent_id =
- (*message_)[strings::msg_params][strings::menu_params]
- [hmi_request::parent_id].asInt();
- smart_objects::SmartObject* parent = app->FindSubMenu(parent_id);
-
- if (!parent) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::CheckCommandParentId received"
- " submenu doesn't exist");
- return false;
- }
- return true;
-}
-
-void AddCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AddCommandRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_AddCommand: {
- LOG4CXX_INFO(logger_, "Received UI_AddCommand event");
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- if (hmi_apis::Common_Result::SUCCESS != ui_result_) {
- (*message_)[strings::msg_params].erase(strings::menu_params);
- }
- break;
- }
- case hmi_apis::FunctionID::VR_AddCommand: {
- LOG4CXX_INFO(logger_, "Received VR_AddCommand event");
- is_vr_received_ = true;
- vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- if (hmi_apis::Common_Result::SUCCESS != vr_result_) {
- (*message_)[strings::msg_params].erase(strings::vr_commands);
- }
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- return;
- }
- }
-
- if (!IsPendingResponseExist()) {
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- smart_objects::SmartObject* command = application->FindCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asInt());
-
- if (!command) {
- if ((((*message_)[strings::msg_params].keyExists(strings::menu_params)) ||
- ((*message_)[strings::msg_params].keyExists(strings::vr_commands))) &&
- (hmi_apis::Common_Result::REJECTED != ui_result_)) {
- application->AddCommand((*message_)[strings::msg_params]
- [strings::cmd_id].asInt(),
- (*message_)[strings::msg_params]);
- }
-
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
-
- bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
- (hmi_apis::Common_Result::SUCCESS == vr_result_)) ||
- ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
- (hmi_apis::Common_Result::INVALID_ENUM == vr_result_)) ||
- ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_) &&
- (hmi_apis::Common_Result::SUCCESS == vr_result_));
-
- if (!result && (hmi_apis::Common_Result::REJECTED == ui_result_)) {
- result_code = static_cast<mobile_apis::Result::eType>(ui_result_);
- } else {
- result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, vr_result_));
- }
-
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- application->UpdateHash();
- }
- }
-}
-
-bool AddCommandRequest::IsPendingResponseExist() {
- return is_ui_send_ != is_ui_received_ || is_vr_send_ != is_vr_received_;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/add_command_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/add_command_response.cc
deleted file mode 100644
index 0c135af07..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/add_command_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/add_command_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddCommandResponse::AddCommandResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-AddCommandResponse::~AddCommandResponse() {
-}
-
-void AddCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "AddCommandResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
deleted file mode 100644
index b3a8b90f4..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_request.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/add_sub_menu_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddSubMenuRequest::AddSubMenuRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-AddSubMenuRequest::~AddSubMenuRequest() {
-}
-
-void AddSubMenuRequest::Run() {
- LOG4CXX_INFO(logger_, "AddSubMenuRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (app->FindSubMenu(
- (*message_)[strings::msg_params][strings::menu_id].asInt())) {
- LOG4CXX_ERROR(logger_, "INVALID_ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- if (app->IsSubMenuNameAlreadyExist(
- (*message_)[strings::msg_params][strings::menu_name].asString())) {
- LOG4CXX_ERROR(logger_, "DUPLICATE_NAME");
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
- return;
- }
-
- if (!CheckSubMenuName()) {
- LOG4CXX_ERROR(logger_, "SubMenuName is not valid");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::menu_id] =
- (*message_)[strings::msg_params][strings::menu_id];
- if ((*message_)[strings::msg_params].keyExists(strings::position)) {
- msg_params[strings::menu_params][strings::position] =
- (*message_)[strings::msg_params][strings::position];
- }
- msg_params[strings::menu_params][strings::menu_name] =
- (*message_)[strings::msg_params][strings::menu_name];
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::UI_AddSubMenu, &msg_params, true);
-}
-
-void AddSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AddSubMenuRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_AddSubMenu: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (result) {
- application->AddSubMenu((*message_)[strings::msg_params]
- [strings::menu_id].asInt(),
- (*message_)[strings::msg_params]);
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-bool AddSubMenuRequest::CheckSubMenuName() {
- const std::string& str =
- (*message_)[strings::msg_params][strings::menu_name].asString();
- if (!CheckSyntax(str)) {
- LOG4CXX_INFO(logger_, "Invalid subMenu name.");
- return false;
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc
deleted file mode 100644
index bcd7df288..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/add_sub_menu_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/add_sub_menu_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AddSubMenuResponse::AddSubMenuResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-AddSubMenuResponse::~AddSubMenuResponse() {
-}
-
-void AddSubMenuResponse::Run() {
- LOG4CXX_INFO(logger_, "AddSubMenuResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
deleted file mode 100644
index 4707d460d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/alert_maneuver_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertManeuverRequest::AlertManeuverRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- result_(mobile_apis::Result::INVALID_ENUM),
- tts_speak_result_code_(mobile_apis::Result::INVALID_ENUM),
- navi_alert_maneuver_result_code_(mobile_apis::Result::INVALID_ENUM) {
-}
-
-AlertManeuverRequest::~AlertManeuverRequest() {
-}
-
-void AlertManeuverRequest::Run() {
- LOG4CXX_INFO(logger_, "AlertManeuverRequest::Run");
-
- if ((!(*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
- (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) {
- LOG4CXX_ERROR(logger_, "AlertManeuverRequest::Request without parameters!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (NULL == app.get()) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- if (mobile_apis::Result::INVALID_DATA == processing_result) {
- LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
- SendResponse(false, processing_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!");
- result_ = processing_result;
- }
- }
-
- // Checking parameters and how many HMI requests should be sent
- bool tts_is_ok = false;
-
- // check TTSChunk parameter
- if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
- if (0 < (*message_)[strings::msg_params][strings::tts_chunks].length()) {
- pending_requests_.Add(hmi_apis::FunctionID::TTS_Speak);
- tts_is_ok = true;
- }
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- msg_params[hmi_request::soft_buttons] =
- (*message_)[strings::msg_params][strings::soft_buttons];
- }
-
- pending_requests_.Add(hmi_apis::FunctionID::Navigation_AlertManeuver);
- SendHMIRequest(hmi_apis::FunctionID::Navigation_AlertManeuver,
- &msg_params,
- true);
-
- if (tts_is_ok) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[hmi_request::tts_chunks] =
- (*message_)[strings::msg_params][strings::tts_chunks];
-
- msg_params[strings::app_id] = app->app_id();
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
- }
-}
-
-void AlertManeuverRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AlertManeuverRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
- hmi_apis::FunctionID::eType event_id = event.id();
- switch (event_id) {
- case hmi_apis::FunctionID::Navigation_AlertManeuver: {
- LOG4CXX_INFO(logger_, "Received Navigation_AlertManeuver event");
-
- pending_requests_.Remove(event_id);
-
- navi_alert_maneuver_result_code_ =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
-
- pending_requests_.Remove(event_id);
-
- tts_speak_result_code_ =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- SendResponse(false, result_code, "Received unknown event");
- return;
- }
- }
-
- if (pending_requests_.IsFinal(event_id)) {
-
- bool result = ((hmi_apis::Common_Result::SUCCESS ==
- static_cast<hmi_apis::Common_Result::eType>(tts_speak_result_code_)) &&
- (hmi_apis::Common_Result::SUCCESS ==
- static_cast<hmi_apis::Common_Result::eType>(navi_alert_maneuver_result_code_))) ||
- ((hmi_apis::Common_Result::INVALID_ENUM ==
- static_cast<hmi_apis::Common_Result::eType>(tts_speak_result_code_)) &&
- (hmi_apis::Common_Result::SUCCESS ==
- static_cast<hmi_apis::Common_Result::eType>(navi_alert_maneuver_result_code_)));
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(std::max(tts_speak_result_code_,
- navi_alert_maneuver_result_code_));
-
- const char* return_info = NULL;
-
- if (result) {
- if (mobile_apis::Result::INVALID_ENUM != result_) {
- result_code = result_;
- } else if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE ==
- static_cast<hmi_apis::Common_Result::eType>(result_code)) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info =
- std::string("Unsupported phoneme type sent in a prompt").c_str();
- }
- }
-
- SendResponse(result, result_code, return_info,
- &(message[strings::msg_params]));
- } else {
- LOG4CXX_INFO(logger_,
- "There are some pending responses from HMI."
- "AlertManeuverRequest still waiting.");
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc
deleted file mode 100644
index 99fcde69a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_maneuver_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/alert_maneuver_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertManeuverResponse::AlertManeuverResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-AlertManeuverResponse::~AlertManeuverResponse() {
-}
-
-void AlertManeuverResponse::Run() {
- LOG4CXX_INFO(logger_, "AlertManeuverResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/alert_request.cc
deleted file mode 100644
index 3201669a9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_request.cc
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/alert_request.h"
-
-#include "application_manager/application_impl.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-#include <interfaces/HMI_API.h>
-
-namespace application_manager {
-
-namespace commands {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-AlertRequest::AlertRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- awaiting_ui_alert_response_(false),
- awaiting_tts_speak_response_(false),
- awaiting_tts_stop_speaking_response_(false),
- response_success_(false),
- flag_other_component_sent_(false),
- response_result_(mobile_apis::Result::SUCCESS),
- tts_speak_response_(mobile_apis::Result::INVALID_ENUM) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
-}
-
-AlertRequest::~AlertRequest() {
-}
-
-bool AlertRequest::Init() {
-
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::duration)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::duration].asUInt();
- } else {
- const int32_t def_value = 5000;
- default_timeout_ = def_value;
- }
-
- return true;
-}
-
-void AlertRequest::Run() {
- LOG4CXX_INFO(logger_, "AlertRequest::Run");
-
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asInt();
-
- if (!Validate(app_id)) {
- // Invalid command, abort execution
- return;
- }
-
- awaiting_ui_alert_response_ = true;
- if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
- if (0 < (*message_)[strings::msg_params][strings::tts_chunks].length()) {
- awaiting_tts_speak_response_ = true;
- }
- }
- SendAlertRequest(app_id);
- SendPlayToneNotification(app_id);
- if (awaiting_tts_speak_response_) {
- SendSpeakRequest(app_id);
- }
-}
-
-void AlertRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "AlertRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event " << awaiting_tts_speak_response_ << " "
- << awaiting_tts_stop_speaking_response_ << " " << awaiting_ui_alert_response_);
- ApplicationManagerImpl::instance()->updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- break;
- }
- case hmi_apis::FunctionID::UI_Alert: {
- LOG4CXX_INFO(logger_, "Received UI_Alert event");
- DCHECK(awaiting_ui_alert_response_);
- awaiting_ui_alert_response_ = false;
-
- if (awaiting_tts_speak_response_) {
- awaiting_tts_stop_speaking_response_ = true;
- SendHMIRequest(hmi_apis::FunctionID::TTS_StopSpeaking, NULL, true);
- }
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- // Mobile Alert request is successful when UI_Alert is successful
- response_success_ = mobile_apis::Result::SUCCESS == result_code;
- if (!response_success_) {
- response_result_ = result_code;
- }
- response_params_ = message[strings::msg_params];
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
- DCHECK(awaiting_tts_speak_response_);
- awaiting_tts_speak_response_ = false;
- tts_speak_response_ = static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- case hmi_apis::FunctionID::TTS_StopSpeaking: {
- LOG4CXX_INFO(logger_, "Received TTS_StopSpeaking event");
- DCHECK(awaiting_tts_stop_speaking_response_);
- awaiting_tts_stop_speaking_response_ = false;
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- return;
- }
- }
- if (!HasHmiResponsesToWait()) {
- std::string response_info("");
- if ((mobile_apis::Result::UNSUPPORTED_RESOURCE == tts_speak_response_) &&
- (!flag_other_component_sent_) && response_success_) {
- response_success_ = false;
- response_result_ = mobile_apis::Result::WARNINGS;
- response_info = "Unsupported phoneme type sent in a prompt";
- } else if ((mobile_apis::Result::UNSUPPORTED_RESOURCE ==
- tts_speak_response_) && (mobile_apis::Result::UNSUPPORTED_RESOURCE ==
- response_result_) && response_success_) {
- response_result_ = mobile_apis::Result::WARNINGS;
- response_info = "Unsupported phoneme type sent in a prompt and "
- "unsupported image sent in soft buttons";
- } else if ((mobile_apis::Result::UNSUPPORTED_RESOURCE ==
- tts_speak_response_) && response_success_) {
- response_result_ = mobile_apis::Result::WARNINGS;
- response_info = "Unsupported phoneme type sent in a prompt";
- }
- SendResponse(response_success_, response_result_,
- response_info.empty() ? NULL : response_info.c_str(),
- &response_params_);
- }
-}
-
-bool AlertRequest::Validate(uint32_t app_id) {
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "No application associated with session key");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- if (mobile_apis::Result::INVALID_DATA == processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, processing_result);
- return false;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!");
- response_result_ = processing_result;
- }
- }
-
- // check if mandatory params(alertText1 and TTSChunk) specified
- if ((!(*message_)[strings::msg_params].keyExists(strings::alert_text1))
- && (!(*message_)[strings::msg_params].keyExists(strings::alert_text2))
- && (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks)
- && (1 > (*message_)[strings::msg_params]
- [strings::tts_chunks].length()))) {
- LOG4CXX_ERROR_EXT(logger_, "Mandatory parameters are missing");
- SendResponse(false, mobile_apis::Result::INVALID_DATA,
- "Mandatory parameters are missing");
- return false;
- }
-
- return true;
-}
-
-void AlertRequest::SendAlertRequest(int32_t app_id) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[hmi_request::alert_strings] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- int32_t index = 0;
- if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) {
- msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
- TextFieldName::ALERT_TEXT1;
- msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::alert_text1];
- index++;
- }
- if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) {
- msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
- TextFieldName::ALERT_TEXT2;
- msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::alert_text2];
- index++;
- }
- if ((*message_)[strings::msg_params].keyExists(strings::alert_text3)) {
- msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
- TextFieldName::ALERT_TEXT3;
- msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::alert_text3];
- }
-
- // softButtons
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- msg_params[hmi_request::soft_buttons] =
- (*message_)[strings::msg_params][strings::soft_buttons];
- }
- // app_id
- msg_params[strings::app_id] = app_id;
- msg_params[strings::duration] = default_timeout_;
-
- // NAVI platform progressIndicator
- if ((*message_)[strings::msg_params].keyExists(strings::progress_indicator)) {
- msg_params[strings::progress_indicator] =
- (*message_)[strings::msg_params][strings::progress_indicator];
- }
- if (msg_params[hmi_request::alert_strings].length() > 0 ||
- msg_params.keyExists(hmi_request::soft_buttons)) {
- flag_other_component_sent_ = true;
- }
- SendHMIRequest(hmi_apis::FunctionID::UI_Alert, &msg_params, true);
-}
-
-void AlertRequest::SendSpeakRequest(int32_t app_id) {
-
- // crate HMI speak request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[hmi_request::tts_chunks] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- msg_params[hmi_request::tts_chunks] =
- (*message_)[strings::msg_params][strings::tts_chunks];
- msg_params[strings::app_id] = app_id;
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
-}
-
-void AlertRequest::SendPlayToneNotification(int32_t app_id) {
- LOG4CXX_INFO(logger_, "AlertRequest::SendPlayToneNotification");
-
- // check playtone parameter
- if ((*message_)[strings::msg_params].keyExists(strings::play_tone)) {
- if ((*message_)[strings::msg_params][strings::play_tone].asBool()) {
- // crate HMI basic communication playtone request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- CreateHMINotification(hmi_apis::FunctionID::BasicCommunication_PlayTone,
- msg_params);
- }
- }
-}
-
-bool AlertRequest::HasHmiResponsesToWait() {
- return awaiting_ui_alert_response_ || awaiting_tts_speak_response_
- || awaiting_tts_stop_speaking_response_;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/alert_response.cc
deleted file mode 100644
index 5b8cd6557..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/alert_response.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/alert_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-AlertResponse::AlertResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-AlertResponse::~AlertResponse() {
-}
-
-void AlertResponse::Run() {
- LOG4CXX_INFO(logger_, "AlertResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_request.cc
deleted file mode 100644
index 67d307bd1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_request.cc
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <algorithm>
-#include "application_manager/commands/mobile/change_registration_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ChangeRegistrationRequest::ChangeRegistrationRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- ui_result_(hmi_apis::Common_Result::INVALID_ENUM),
- tts_result_(hmi_apis::Common_Result::INVALID_ENUM),
- vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {
-}
-
-ChangeRegistrationRequest::~ChangeRegistrationRequest() {
-}
-
-void ChangeRegistrationRequest::Run() {
- LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::Run");
-
- ApplicationManagerImpl* instance = ApplicationManagerImpl::instance();
- const HMICapabilities& hmi_capabilities = instance->hmi_capabilities();
-
- ApplicationSharedPtr app = instance->application(connection_key());
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (!hmi_capabilities.is_ui_cooperating()) {
- ui_result_ = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- }
-
- if (!hmi_capabilities.is_vr_cooperating()) {
- vr_result_ = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- }
-
- if (!hmi_capabilities.is_tts_cooperating()) {
- tts_result_ = hmi_apis::Common_Result::UNSUPPORTED_RESOURCE;
- }
-
- const int32_t hmi_language =
- (*message_)[strings::msg_params][strings::hmi_display_language].asInt();
-
- const int32_t language =
- (*message_)[strings::msg_params][strings::language].asInt();
-
- if (false ==
- (IsLanguageSupportedByUI(hmi_language) &&
- IsLanguageSupportedByVR(language) &&
- IsLanguageSupportedByTTS(language))) {
- LOG4CXX_ERROR(logger_, "Language is not supported");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- pending_requests_.Add(hmi_apis::FunctionID::UI_ChangeRegistration);
- pending_requests_.Add(hmi_apis::FunctionID::VR_ChangeRegistration);
- pending_requests_.Add(hmi_apis::FunctionID::TTS_ChangeRegistration);
-
- // UI processing
- smart_objects::SmartObject ui_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- ui_params[strings::language] = hmi_language;
- ui_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::UI_ChangeRegistration,
- &ui_params, true);
-
- // VR processing
- smart_objects::SmartObject vr_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- vr_params[strings::language] =
- (*message_)[strings::msg_params][strings::language];
-
- vr_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::VR_ChangeRegistration,
- &vr_params, true);
-
- // TTS processing
- smart_objects::SmartObject tts_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- tts_params[strings::language] =
- (*message_)[strings::msg_params][strings::language];
-
- tts_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::TTS_ChangeRegistration,
- &tts_params, true);
-}
-
-bool ChangeRegistrationRequest::WasAnySuccess(
- const hmi_apis::Common_Result::eType ui,
- const hmi_apis::Common_Result::eType vr,
- const hmi_apis::Common_Result::eType tts) {
-
- return
- hmi_apis::Common_Result::SUCCESS == ui ||
- hmi_apis::Common_Result::SUCCESS == vr ||
- hmi_apis::Common_Result::SUCCESS == tts;
-}
-
-void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ChangeRegistrationRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- hmi_apis::FunctionID::eType event_id = event.id();
-
- switch (event_id) {
- case hmi_apis::FunctionID::UI_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received UI_ChangeRegistration event");
- pending_requests_.Remove(event_id);
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- case hmi_apis::FunctionID::VR_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received VR_ChangeRegistration event");
- pending_requests_.Remove(event_id);
- vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- case hmi_apis::FunctionID::TTS_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received TTS_ChangeRegistration event");
- pending_requests_.Remove(event_id);
- tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event_id);
- return;
- }
- }
-
- if (pending_requests_.IsFinal(event_id)) {
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (hmi_apis::Common_Result::SUCCESS == ui_result_) {
- application->set_ui_language(static_cast<mobile_api::Language::eType>(
- (*message_)[strings::msg_params][strings::hmi_display_language].asInt()));
- }
-
- if (hmi_apis::Common_Result::SUCCESS == vr_result_
- || hmi_apis::Common_Result::SUCCESS == tts_result_) {
- application->set_language(static_cast<mobile_api::Language::eType>(
- (*message_)[strings::msg_params][strings::language].asInt()));
- }
-
- int32_t greates_result_code = std::max(std::max(ui_result_, vr_result_),
- tts_result_);
-
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::eType::ChangeRegistrationID;
-
- SendResponse(WasAnySuccess(ui_result_, vr_result_, tts_result_),
- static_cast<mobile_apis::Result::eType>(greates_result_code),
- NULL, &(message[strings::msg_params]));
- } else {
- LOG4CXX_INFO(logger_,
- "There are some pending responses from HMI."
- "ChangeRegistrationRequest still waiting.");
- }
-}
-
-bool ChangeRegistrationRequest::IsLanguageSupportedByUI(
- const int32_t& hmi_display_lang) {
-
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- const smart_objects::SmartObject* ui_languages =
- hmi_capabilities.ui_supported_languages();
-
- if (!ui_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return false;
- }
-
- for (size_t i = 0; i < ui_languages->length(); ++i) {
- if (hmi_display_lang == ui_languages->getElement(i).asInt()) {
- return true;
- }
- }
-
- LOG4CXX_ERROR(logger_, "Language isn't supported by UI");
-
- return false;
-}
-
-bool ChangeRegistrationRequest::IsLanguageSupportedByVR(
- const int32_t& hmi_display_lang) {
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- const smart_objects::SmartObject* vr_languages =
- hmi_capabilities.vr_supported_languages();
-
- if (!vr_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return false;
- }
-
- for (size_t i = 0; i < vr_languages->length(); ++i) {
- if (hmi_display_lang == vr_languages->getElement(i).asInt()) {
- return true;
- }
- }
-
- LOG4CXX_ERROR(logger_, "Language isn't supported by VR");
-
- return false;
-}
-
-bool ChangeRegistrationRequest::IsLanguageSupportedByTTS(
- const int32_t& hmi_display_lang) {
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- const smart_objects::SmartObject* tts_languages =
- hmi_capabilities.tts_supported_languages();
-
- if (!tts_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return false;
- }
-
- for (size_t i = 0; i < tts_languages->length(); ++i) {
- if (hmi_display_lang == tts_languages->getElement(i).asInt()) {
- return true;
- break;
- }
- }
-
- LOG4CXX_ERROR(logger_, "Language isn't supported by TTS");
- return false;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_response.cc
deleted file mode 100644
index 13c926ec8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/change_registration_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/change_registration_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ChangeRegistrationResponse::ChangeRegistrationResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-ChangeRegistrationResponse::~ChangeRegistrationResponse() {
-}
-
-void ChangeRegistrationResponse::Run() {
- LOG4CXX_INFO(logger_, "ChangeRegistrationResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
deleted file mode 100644
index ae8865679..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <string>
-#include <algorithm>
-#include <vector>
-#include "application_manager/commands/mobile/create_interaction_choice_set_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
-}
-
-void CreateInteractionChoiceSetRequest::Run() {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles((*message_)[strings::msg_params], app);
-
- mobile_apis::Result::eType result_ = mobile_apis::Result::SUCCESS;
- if (mobile_apis::Result::SUCCESS != verification_result) {
- if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImageFiles INVALID_DATA!");
- SendResponse(false, verification_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImageFiles UNSUPPORTED_RESOURCE!");
- result_ = verification_result;
- }
- }
-
- const int32_t choice_set_id = (*message_)[strings::msg_params]
- [strings::interaction_choice_set_id].asInt();
-
- if (app->FindChoiceSet(choice_set_id)) {
- LOG4CXX_ERROR(logger_, "Invalid ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- mobile_apis::Result::eType result = CheckChoiceSet(app);
- if (mobile_apis::Result::SUCCESS != result) {
- SendResponse(false, result);
- return;
- }
-
- app->AddChoiceSet(choice_set_id, (*message_)[strings::msg_params]);
-
- SendResponse(true, result_);
- app->UpdateHash();
-}
-
-mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
- ApplicationConstSharedPtr app) {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetRequest::CheckChoiceSet");
-
- const smart_objects::SmartArray* new_choice_set_array =
- (*message_)[strings::msg_params][strings::choice_set].asArray();
-
- smart_objects::SmartArray::const_iterator it_array =
- new_choice_set_array->begin();
-
- smart_objects::SmartArray::const_iterator it_array_end =
- new_choice_set_array->end();
-
- // Self check of new choice set for params coincidence
- for (; it_array != it_array_end; ++it_array) {
-
- CoincidencePredicateChoiceID c((*it_array)[strings::choice_id].asInt());
- if (1 != std::count_if(
- new_choice_set_array->begin(),
- new_choice_set_array->end(),
- c)) {
-
- LOG4CXX_ERROR(logger_, "Incoming choice set has duplicate IDs.");
- return mobile_apis::Result::INVALID_ID;
- }
-
- // Check new choice set params along with already registered choice sets
- const ChoiceSetMap& app_choice_set_map = app->choice_set_map();
- ChoiceSetMap::const_iterator it = app_choice_set_map.begin();
- ChoiceSetMap::const_iterator itEnd = app_choice_set_map.end();
- for (; it != itEnd; ++it) {
- const smart_objects::SmartObject* app_choice_set = it->second;
- if (NULL != app_choice_set) {
-
- const smart_objects::SmartArray* curr_choice_set =
- (*app_choice_set)[strings::choice_set].asArray();
-
- if (0 != std::count_if(
- curr_choice_set->begin(),
- curr_choice_set->end(),
- c)) {
- LOG4CXX_ERROR(logger_, "Incoming choice ID already exists.");
- return mobile_apis::Result::INVALID_ID;
- }
- }
- }
-
- CoincidencePredicateMenuName m((*it_array)[strings::menu_name].asString());
- if (1 != std::count_if(
- new_choice_set_array->begin(),
- new_choice_set_array->end(),
- m)) {
-
- LOG4CXX_ERROR(logger_, "Incoming choice set has duplicate menu names.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- // Check coincidence inside the current choice
- const smart_objects::SmartArray* vr_array =
- (*it_array)[strings::vr_commands].asArray();
-
- smart_objects::SmartArray::const_iterator it_vr = vr_array->begin();
- smart_objects::SmartArray::const_iterator it_vr_end = vr_array->end();
-
- for (; it_vr != it_vr_end; ++it_vr) {
- CoincidencePredicateVRCommands v((*it_vr));
- if (1 != std::count_if(vr_array->begin(), vr_array->end(), v)) {
-
- LOG4CXX_ERROR(logger_,
- "Incoming choice set has duplicate VR command(s)");
-
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
-
- // Check along with VR commands in other choices in the new set
- smart_objects::SmartArray::const_iterator it_same_array =
- new_choice_set_array->begin();
-
- smart_objects::SmartArray::const_iterator it_same_array_end =
- new_choice_set_array->end();
-
- for (; it_same_array != it_same_array_end; ++it_same_array) {
-
- // Skip check for itself
- if ((*it_array)[strings::choice_id] ==
- (*it_same_array)[strings::choice_id]) {
-
- continue;
- }
-
- if (compareSynonyms((*it_array), (*it_same_array))) {
-
- LOG4CXX_ERROR(logger_,
- "Incoming choice set has duplicate VR command(s).");
-
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
- }
-
- return mobile_apis::Result::SUCCESS;
-}
-
-bool CreateInteractionChoiceSetRequest::compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2) {
-
- smart_objects::SmartArray* vr_cmds_1 =
- choice1[strings::vr_commands].asArray();
- DCHECK(vr_cmds_1 != NULL);
- smart_objects::SmartArray* vr_cmds_2 =
- choice2[strings::vr_commands].asArray();
- DCHECK(vr_cmds_2 != NULL);
-
- smart_objects::SmartArray::iterator it;
- it = std::find_first_of(vr_cmds_1->begin(), vr_cmds_1->end(),
- vr_cmds_2->begin(), vr_cmds_2->end(),
- CreateInteractionChoiceSetRequest::compareStr);
-
-
- if (it != vr_cmds_1->end()) {
- LOG4CXX_INFO(logger_, "Incoming choice set has duplicated VR synonyms "
- << it->asString());
- return true;
- }
-
- return false;
-}
-
-bool CreateInteractionChoiceSetRequest::compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2) {
-
- return 0 == strcasecmp(str1.asCharArray(), str2.asCharArray());
-}
-
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc
deleted file mode 100644
index 8d6ea1b34..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_response.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/create_interaction_choice_set_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {
-}
-
-void CreateInteractionChoiceSetResponse::Run() {
- LOG4CXX_INFO(logger_, "CreateInteractionChoiceSetResponse::Run");
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_request.cc
deleted file mode 100644
index 3f5e39641..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_request.cc
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_command_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteCommandRequest::DeleteCommandRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- is_ui_send_(false),
- is_vr_send_(false),
- is_ui_received_(false),
- is_vr_received_(false),
- ui_result_(hmi_apis::Common_Result::INVALID_ENUM),
- vr_result_(hmi_apis::Common_Result::INVALID_ENUM) {
-}
-
-DeleteCommandRequest::~DeleteCommandRequest() {
-}
-
-void DeleteCommandRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteCommandRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- smart_objects::SmartObject* command = application->FindCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asInt());
-
- if (!command) {
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- LOG4CXX_ERROR(logger_, "Invalid ID");
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::cmd_id] =
- (*message_)[strings::msg_params][strings::cmd_id];
- msg_params[strings::app_id] = application->app_id();
-
- // we should specify amount of required responses in the 1st request
- uint32_t chaining_counter = 0;
- if ((*command).keyExists(strings::menu_params)) {
- ++chaining_counter;
- }
-
- if ((*command).keyExists(strings::vr_commands)) {
- ++chaining_counter;
- }
-
- if ((*command).keyExists(strings::menu_params)) {
- is_ui_send_ = true;
-
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params, true);
- }
- // check vr params
- if ((*command).keyExists(strings::vr_commands)) {
- is_vr_send_ = true;
-
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params, true);
- }
-}
-
-void DeleteCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "DeleteCommandRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_DeleteCommand: {
- LOG4CXX_INFO(logger_, "Received UI_DeleteCommand event");
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- break;
- }
- case hmi_apis::FunctionID::VR_DeleteCommand: {
- LOG4CXX_INFO(logger_, "Received VR_DeleteCommand event");
- is_vr_received_ = true;
- vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- return;
- }
- }
-
- if (!IsPendingResponseExist()) {
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- smart_objects::SmartObject* command = application->FindCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asInt());
-
- if (command) {
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
-
- bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
- (hmi_apis::Common_Result::SUCCESS == vr_result_)) ||
- ((hmi_apis::Common_Result::SUCCESS == ui_result_) &&
- (hmi_apis::Common_Result::INVALID_ENUM == vr_result_)) ||
- ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_) &&
- (hmi_apis::Common_Result::SUCCESS == vr_result_));
-
- if (result) {
- application->RemoveCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asInt());
- }
-
- if (!result && (hmi_apis::Common_Result::REJECTED == ui_result_)) {
- result_code = static_cast<mobile_apis::Result::eType>(vr_result_);
- } else {
- result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, vr_result_));
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- }
- }
-}
-
-bool DeleteCommandRequest::IsPendingResponseExist() {
- return is_ui_send_ != is_ui_received_ || is_vr_send_ != is_vr_received_;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_response.cc
deleted file mode 100644
index 812e58743..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_command_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_command_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteCommandResponse::DeleteCommandResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-DeleteCommandResponse::~DeleteCommandResponse() {
-}
-
-void DeleteCommandResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteCommandResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_request.cc
deleted file mode 100644
index 9fc89b25d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_request.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_file_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "config_profile/profile.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteFileRequest::DeleteFileRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-DeleteFileRequest::~DeleteFileRequest() {
-}
-
-void DeleteFileRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteFileRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() &&
- profile::Profile::instance()->delete_file_in_none() <= application->delete_file_in_none_count()) {
- // If application is in the HMI_NONE level the quantity of allowed
- // DeleteFile request is limited by the configuration profile
- LOG4CXX_ERROR(logger_, "Too many requests from the app with HMILevel HMI_NONE ");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- const std::string& sync_file_name =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
-
- std::string relative_file_path = application->name();
- relative_file_path += "/";
- relative_file_path += sync_file_name;
-
- std::string full_file_path = file_system::FullPath(relative_file_path);
-
- if (file_system::FileExists(full_file_path)) {
- if (file_system::DeleteFile(full_file_path)) {
- application->DeleteFile(sync_file_name);
- application->increment_delete_file_in_none_count();
- SendResponse(true, mobile_apis::Result::SUCCESS);
- } else {
- SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
- }
- } else {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_response.cc
deleted file mode 100644
index 3892114f1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_file_response.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_file_response.h"
-#include "utils/file_system.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteFileResponse::DeleteFileResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-DeleteFileResponse::~DeleteFileResponse() {
-}
-
-void DeleteFileResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteFileResponse::Run");
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
- (*message_)[strings::msg_params][strings::space_available] =
- static_cast<int32_t>(file_system::GetAvailableSpaceForApp(app->name()));
- SendResponse((*message_)[strings::msg_params][strings::success].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
deleted file mode 100644
index c98f16c97..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_interaction_choice_set_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {
-}
-
-void DeleteInteractionChoiceSetRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteInteractionChoiceSetRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "No application associated with session key");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const int32_t choise_set_id =
- (*message_)[strings::msg_params]
- [strings::interaction_choice_set_id].asInt();
-
- if (!app->FindChoiceSet(choise_set_id)) {
- LOG4CXX_ERROR_EXT(logger_, "INVALID_ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
-
- if (ChoiceSetInUse(app)) {
- LOG4CXX_ERROR_EXT(logger_, "Choice set currently in use");
- SendResponse(false, mobile_apis::Result::IN_USE);
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::interaction_choice_set_id] = choise_set_id;
- msg_params[strings::app_id] = app->app_id();
-
- app->RemoveChoiceSet(choise_set_id);
-
- SendResponse(true, mobile_apis::Result::SUCCESS);
- /*CreateHMIRequest(hmi_apis::FunctionID::UI_DeleteInteractionChoiceSet,
- msg_params, true);*/
-}
-
-bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(ApplicationConstSharedPtr app) {
- if (app->is_perform_interaction_active()) {
- // retrieve stored choice sets for perform interaction
- const PerformChoiceSetMap& choice_set_map = app
- ->performinteraction_choice_set_map();
-
- PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
- for (; choice_set_map.end() != it; ++it) {
- if (it->first
- == (*message_)[strings::msg_params]
- [strings::interaction_choice_set_id].asInt()) {
- LOG4CXX_ERROR_EXT(logger_,
- "DeleteInteractionChoiceSetRequest::ChoiceSetInUse");
- return true;
- }
- }
- }
- return false;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc
deleted file mode 100644
index d260add7c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_response.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_interaction_choice_set_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {
-}
-
-void DeleteInteractionChoiceSetResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteInteractionChoiceSetResponse::Run");
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- const int32_t code =
- (*message_)[strings::msg_params][strings::result_code].asInt();
-
- if (hmi_apis::Common_Result::SUCCESS == code) {
- SendResponse(true);
- } else {
- // TODO(DK): Some logic
- SendResponse(false);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
deleted file mode 100644
index bcd55a38f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_request.cc
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_sub_menu_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteSubMenuRequest::DeleteSubMenuRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-DeleteSubMenuRequest::~DeleteSubMenuRequest() {
-}
-
-void DeleteSubMenuRequest::Run() {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if (!app->FindSubMenu(
- (*message_)[strings::msg_params][strings::menu_id].asInt())) {
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- LOG4CXX_ERROR(logger_, "Invalid ID");
- return;
- }
-
- // delete sub menu items from SDL and HMI
- DeleteSubMenuVRCommands(app);
- DeleteSubMenuUICommands(app);
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::menu_id] =
- (*message_)[strings::msg_params][strings::menu_id];
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteSubMenu, &msg_params, true);
-}
-
-void DeleteSubMenuRequest::DeleteSubMenuVRCommands(ApplicationConstSharedPtr app) {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::DeleteSubMenuVRCommands");
-
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator it = commands.begin();
-
- for (; commands.end() != it; ++it) {
-
- if (!(*it->second).keyExists(strings::vr_commands)) {
- continue;
- }
-
- if ((*message_)[strings::msg_params][strings::menu_id].asInt()
- == (*it->second)[strings::menu_params]
- [hmi_request::parent_id].asInt()) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
- }
- }
-}
-
-void DeleteSubMenuRequest::DeleteSubMenuUICommands(ApplicationSharedPtr const app) {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::DeleteSubMenuUICommands");
-
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator it = commands.begin();
-
- while (commands.end() != it) {
-
- if (!(*it->second).keyExists(strings::menu_params)) {
- continue;
- }
-
- if ((*message_)[strings::msg_params][strings::menu_id].asInt()
- == (*it->second)[strings::menu_params]
- [hmi_request::parent_id].asInt()) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
-
- app->RemoveCommand((*it->second)[strings::cmd_id].asInt());
-
- it = commands.begin(); // Can not relay on
- // iterators after erase was called
-
- SendHMIRequest(hmi_apis::FunctionID::UI_DeleteCommand, &msg_params);
- } else {
- ++it;
- }
- }
-}
-
-void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "DeleteSubMenuRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_DeleteSubMenu: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- if (result) {
- application->RemoveSubMenu(
- (*message_)[strings::msg_params][strings::menu_id].asInt());
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc
deleted file mode 100644
index 0a25a1161..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/delete_sub_menu_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/delete_sub_menu_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DeleteSubMenuResponse::DeleteSubMenuResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-DeleteSubMenuResponse::~DeleteSubMenuResponse() {
-}
-
-void DeleteSubMenuResponse::Run() {
- LOG4CXX_INFO(logger_, "DeleteSubMenuResponse::Run");
-
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
deleted file mode 100644
index 162d1cdc3..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/diagnostic_message_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DiagnosticMessageRequest::DiagnosticMessageRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-DiagnosticMessageRequest::~DiagnosticMessageRequest() {
-}
-
-void DiagnosticMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "DiagnosticMessageRequest::Run");
-
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage,
- &(*message_), true);
-}
-
-void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "DiagnosticMessageRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc
deleted file mode 100644
index 2a8b234ff..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/diagnostic_message_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/diagnostic_message_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DiagnosticMessageResponse::DiagnosticMessageResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-DiagnosticMessageResponse::~DiagnosticMessageResponse() {
-}
-
-void DiagnosticMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "DiagnosticMessageResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/dial_number_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/dial_number_request.cc
deleted file mode 100644
index 140f43128..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/dial_number_request.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/dial_number_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-DialNumberRequest::DialNumberRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-DialNumberRequest::~DialNumberRequest() {
-}
-
-void DialNumberRequest::Run() {
- LOG4CXX_INFO(logger_, "DialNumberRequest::Run");
-
- SendResponse(false, mobile_apis::Result::UNSUPPORTED_REQUEST);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_request.cc
deleted file mode 100644
index 53dc83c25..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_request.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/encoded_sync_pdata_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-#include "encryption/Base64.h"
-
-namespace application_manager {
-
-namespace commands {
-
-const std::string EncodedSyncPDataRequest::TEMPORARY_HARDCODED_FILENAME =
- "policy_sync_data.dat";
-const std::string EncodedSyncPDataRequest::TEMPORARY_HARDCODED_FOLDERNAME =
- "policies";
-
-EncodedSyncPDataRequest::EncodedSyncPDataRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-EncodedSyncPDataRequest::~EncodedSyncPDataRequest() {
-}
-
-void EncodedSyncPDataRequest::Run() {
- LOG4CXX_INFO(logger_, "EncodedSyncPDataRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const std::string& sync_file_name = TEMPORARY_HARDCODED_FILENAME;
-
- size_t data_array_size = (*message_)[strings::msg_params][strings::data].
- length();
-
- std::string encoded_string_pdata;
- for (size_t i = 0; i < data_array_size; ++i) {
- encoded_string_pdata += (*message_)[strings::msg_params][strings::data][i]
- .asString();
- }
-
- LOG4CXX_INFO(logger_, "encoded_string_pdata = " << encoded_string_pdata);
-
- const std::string string_pdata = base64_decode(encoded_string_pdata);
-
- LOG4CXX_INFO(logger_, "string_pdata = " << string_pdata);
-
- const std::vector<uint8_t> file_data(string_pdata.begin(),
- string_pdata.end());
-
- std::string relative_file_path = file_system::CreateDirectory(
- TEMPORARY_HARDCODED_FOLDERNAME);
- relative_file_path += "/";
- relative_file_path += sync_file_name;
-
- mobile_apis::Result::eType save_result =
- ApplicationManagerImpl::instance()->SaveBinary(
- application->name(),
- file_data,
- relative_file_path);
-
- switch(save_result) {
- case mobile_apis::Result::SUCCESS:
- SendResponse(true, save_result);
- break;
- default:
- SendResponse(false, save_result);
- break;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_response.cc
deleted file mode 100644
index 0c738bf3c..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/encoded_sync_pdata_response.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/encoded_sync_pdata_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-EncodedSyncPDataResponse::EncodedSyncPDataResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-EncodedSyncPDataResponse::~EncodedSyncPDataResponse() {
-}
-
-void EncodedSyncPDataResponse::Run() {
- LOG4CXX_INFO(logger_, "EncodedSyncPDataResponse::Run");
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
deleted file mode 100644
index 71eec0e77..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/end_audio_pass_thru_request.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-EndAudioPassThruRequest::EndAudioPassThruRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-EndAudioPassThruRequest::~EndAudioPassThruRequest() {
-}
-
-void EndAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "EndAudioPassThruRequest::Run");
- bool ended_successfully = ApplicationManagerImpl::instance()->end_audio_pass_thru();
-
- if (ended_successfully) {
- SendHMIRequest(hmi_apis::FunctionID::UI_EndAudioPassThru, NULL, true);
- int32_t session_key =
- (*message_)[strings::params][strings::connection_key].asInt();
- ApplicationManagerImpl::instance()->StopAudioPassThru(session_key);
- } else {
- SendResponse(false, mobile_apis::Result::REJECTED,
- "No PerformAudioPassThru is now active");
- }
-}
-
-void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "EndAudioPassThruRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_EndAudioPassThru: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc
deleted file mode 100644
index 128d921f9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/end_audio_pass_thru_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-EndAudioPassThruResponse::EndAudioPassThruResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-EndAudioPassThruResponse::~EndAudioPassThruResponse() {
-}
-
-void EndAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "EndAudioPassThruResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/generic_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/generic_response.cc
deleted file mode 100644
index 69c841b2f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/generic_response.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/generic_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void GenericResponse::Run() {
- /*NsSmartDeviceLink::NsSmartObjects::SmartObject response;
-
- response[strings::params][strings::correlation_id] =
- (*message_)[strings::params][strings::correlation_id];
- response[strings::params][strings::protocol_version] =
- (*message_)[strings::params][strings::protocol_version];
- response[strings::params][strings::connection_key] =
- (*message_)[strings::params][strings::connection_key];
-
- response[strings::msg_params][strings::success] = false;
- */
-
- (*message_)[strings::params][strings::message_type] = MessageType::kResponse;
- (*message_)[strings::msg_params][strings::success] = false;
- (*message_)[strings::msg_params][strings::result_code] =
- mobile_apis::Result::INVALID_DATA;
-
- SendResponse(false);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc
deleted file mode 100644
index f0c91db64..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/get_dtcs_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetDTCsRequest::GetDTCsRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-GetDTCsRequest::~GetDTCsRequest() {
-}
-
-void GetDTCsRequest::Run() {
- LOG4CXX_INFO(logger_, "GetDTCsRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
- LOG4CXX_ERROR(logger_, "App has not been activated");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::ecu_name] =
- (*message_)[strings::msg_params][strings::ecu_name];
- msg_params[strings::dtc_mask] =
- (*message_)[strings::msg_params][strings::dtc_mask];
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_GetDTCs, &msg_params, true);
-}
-
-void GetDTCsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetDTCsRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_GetDTCs: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc
deleted file mode 100644
index 2ed7a9295..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/get_dtcs_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/get_dtcs_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetDTCsResponse::GetDTCsResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-GetDTCsResponse::~GetDTCsResponse() {
-}
-
-void GetDTCsResponse::Run() {
- LOG4CXX_INFO(logger_, "GetDTCsResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
deleted file mode 100644
index 7292dfa99..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include "application_manager/commands/mobile/get_vehicle_data_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-#ifdef WEB_HMI
-GetVehicleDataRequest::GetVehicleDataRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-GetVehicleDataRequest::~GetVehicleDataRequest() {
-}
-
-void GetVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::Run");
-
- int32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
- LOG4CXX_ERROR(logger_, "app in HMI level HMI_NONE");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- const int32_t min_length_msg_params = 1;
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[str::msg_params].keyExists(it->first)
- && true == (*message_)[str::msg_params][it->first].asBool()) {
- msg_params[it->first] = (*message_)[strings::msg_params][it->first];
- }
- }
- if (msg_params.length() > min_length_msg_params) {
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_GetVehicleData,
- &msg_params, true);
- return;
- }
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
-}
-
-void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event");
- smart_objects::SmartObject message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- bool result = false;
- if (mobile_apis::Result::SUCCESS == result_code ||
- (hmi_apis::Common_Result::DATA_NOT_AVAILABLE ==
- static_cast<hmi_apis::Common_Result::eType>(result_code)
- && message[strings::msg_params].length() > 1)) {
- result = true;
- }
- const char *info = NULL;
- std::string error_message;
- if (true ==
- message[strings::msg_params].keyExists(hmi_response::method)) {
- message[strings::msg_params].erase(hmi_response::method);
- }
- if (true == message[strings::params].keyExists(strings::error_msg)) {
- error_message = message[strings::params][strings::error_msg].asString();
- info = error_message.c_str();
- }
- SendResponse(result, result_code, info, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
-GetVehicleDataRequest::GetVehicleDataRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-GetVehicleDataRequest::~GetVehicleDataRequest() {
-}
-
-void GetVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::Run");
-
- int32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
- LOG4CXX_ERROR(logger_, "app in HMI level HMI_NONE");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[str::msg_params].keyExists(it->first)
- && true == (*message_)[str::msg_params][it->first].asBool()) {
- SendRequestsToHmi(app->app_id());
- return;
- }
- }
-
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
-}
-
-namespace {
- struct Subrequest {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
- };
- Subrequest subrequests[] = {
- { hmi_apis::FunctionID::VehicleInfo_GetGpsData, str::gps},
- { hmi_apis::FunctionID::VehicleInfo_GetSpeed, str::speed},
- { hmi_apis::FunctionID::VehicleInfo_GetRpm, str::rpm},
- { hmi_apis::FunctionID::VehicleInfo_GetFuelLevel, str::fuel_level},
- { hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState, str::fuel_level_state},
- { hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption, str::instant_fuel_consumption},
- { hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature, str::external_temp},
- { hmi_apis::FunctionID::VehicleInfo_GetVin, str::vin},
- { hmi_apis::FunctionID::VehicleInfo_GetPrndl, str::prndl},
- { hmi_apis::FunctionID::VehicleInfo_GetTirePressure, str::tire_pressure},
- { hmi_apis::FunctionID::VehicleInfo_GetOdometer, str::odometer},
- { hmi_apis::FunctionID::VehicleInfo_GetBeltStatus, str::belt_status},
- { hmi_apis::FunctionID::VehicleInfo_GetBodyInformation, str::body_information},
- { hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus, str::device_status},
- { hmi_apis::FunctionID::VehicleInfo_GetDriverBraking, str::driver_braking},
- { hmi_apis::FunctionID::VehicleInfo_GetWiperStatus, str::wiper_status},
- { hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus, str::head_lamp_status},
- { hmi_apis::FunctionID::VehicleInfo_GetEngineTorque, str::engine_torque},
- { hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition, str::acc_pedal_pos},
- { hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle, str::steering_wheel_angle},
- { hmi_apis::FunctionID::VehicleInfo_GetECallInfo, str::e_call_info},
- { hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus, str::airbag_status},
- { hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent, str::emergency_event},
- { hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus, str::cluster_mode_status},
- { hmi_apis::FunctionID::VehicleInfo_GetMyKey, str::my_key},
- };
-}
-
-void GetVehicleDataRequest::SendRequestsToHmi(const int32_t app_id) {
- smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app_id;
-
- for (int32_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
- const Subrequest& sr = subrequests[i];
- if (true == (*message_)[str::msg_params].keyExists(sr.str)
- && true == (*message_)[str::msg_params][sr.str].asBool()) {
- HmiRequest hmi_request;
- hmi_request.str = sr.str;
- hmi_request.func_id = sr.func_id;
- hmi_request.complete = false;
- hmi_requests_.push_back(hmi_request);
- }
- }
-
- LOG4CXX_INFO(logger_,
- hmi_requests_.size() << " requests are going to be sent to HMI");
-
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- SendHMIRequest(it->func_id, &msg_params, true);
- }
-}
-
-void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event " << event.id());
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- HmiRequest & hmi_request = *it;
- if (hmi_request.func_id == event.id()) {
- hmi_request.status =
- static_cast<hmi_apis::Common_Result::eType>(message[strings::params][hmi_response::code]
- .asInt());
- if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
- hmi_request.value = message[str::msg_params][hmi_request.str];
- hmi_request.complete = true;
- break;
- }
- }
-
- bool all_complete = true;
- bool any_arg_success = false;
- mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- if (!it->complete) {
- all_complete = false;
- break;
- }
- if (hmi_apis::Common_Result::SUCCESS != it->status) {
- if (mobile_api::Result::SUCCESS == status) {
- status = static_cast<mobile_apis::Result::eType>(it->status);
- } else if (status
- != static_cast<mobile_apis::Result::eType>(it->status)) {
- status = mobile_api::Result::eType::GENERIC_ERROR;
- }
- LOG4CXX_TRACE(logger_, "Status from HMI: " << it->status << ", so response status become " << status);
- } else {
- any_arg_success = true;
- }
- }
-
- if (all_complete) {
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- if (any_arg_success) {
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- response_params[it->str] = it->value;
- }
- }
- LOG4CXX_INFO(
- logger_, "All HMI requests are complete");
- const char *info = NULL;
- std::string error_message;
- if (true == message[strings::params].keyExists(strings::error_msg)) {
- error_message = message[strings::params][strings::error_msg].asString();
- info = error_message.c_str();
- }
- SendResponse( any_arg_success, status, info, &response_params);
- }
-}
-#endif // #ifdef QT_HMI
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc
deleted file mode 100644
index d9087fdc6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/get_vehicle_data_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/get_vehicle_data_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-GetVehicleDataResponse::GetVehicleDataResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-GetVehicleDataResponse::~GetVehicleDataResponse() {
-}
-
-void GetVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "GetVehicleDataResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/list_files_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/list_files_request.cc
deleted file mode 100644
index 530fd1c92..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/list_files_request.cc
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/list_files_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "config_profile/profile.h"
-#include "application_manager/mobile_command_factory.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ListFilesRequest::ListFilesRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-ListFilesRequest::~ListFilesRequest() {
-}
-
-void ListFilesRequest::Run() {
- LOG4CXX_INFO(logger_, "ListFilesRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() &&
- profile::Profile::instance()->list_files_in_none() <= application->list_files_in_none_count()) {
- // If application is in the HMI_NONE level the quantity of allowed
- // DeleteFile request is limited by the configuration profile
- LOG4CXX_ERROR(logger_, "Too many requests from the app with HMILevel HMI_NONE ");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- application->increment_list_files_in_none_count();
-
- (*message_)[strings::msg_params][strings::space_available] =
- static_cast<int32_t>(file_system::GetAvailableSpaceForApp(application->name()));
- int32_t i = 0;
- const AppFilesMap& app_files = application->getAppFiles();
- for (AppFilesMap::const_iterator it = app_files.begin();
- it != app_files.end(); ++it) {
- (*message_)[strings::msg_params][strings::filenames][i++] = it->second.file_name;
- }
- (*message_)[strings::params][strings::message_type] =
- application_manager::MessageType::kResponse;
- SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &(*message_)[strings::msg_params]);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/list_files_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/list_files_response.cc
deleted file mode 100644
index 52e8d26e9..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/list_files_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/list_files_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ListFilesResponse::ListFilesResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-ListFilesResponse::~ListFilesResponse() {
-}
-
-void ListFilesResponse::Run() {
- LOG4CXX_INFO(logger_, "ListFilesResponse::Run");
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc
deleted file mode 100644
index 6063c8cc5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_app_interface_unregistered_notification.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_app_interface_unregistered_notification.h"
-#include "application_manager/message.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAppInterfaceUnregisteredNotification::OnAppInterfaceUnregisteredNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnAppInterfaceUnregisteredNotification::~OnAppInterfaceUnregisteredNotification() {
-}
-
-void OnAppInterfaceUnregisteredNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAppInterfaceUnregisteredNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc
deleted file mode 100644
index dd000ca11..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_audio_pass_thru_notification.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_audio_pass_thru_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnAudioPassThruNotification::OnAudioPassThruNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnAudioPassThruNotification::~OnAudioPassThruNotification() {
-}
-
-void OnAudioPassThruNotification::Run() {
- LOG4CXX_INFO(logger_, "OnAudioPassThruNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
deleted file mode 100644
index 53fd0cf62..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_button_event_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnButtonEventNotification::OnButtonEventNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnButtonEventNotification::~OnButtonEventNotification() {
-}
-
-void OnButtonEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run");
-
- const uint32_t btn_id =
- static_cast<uint32_t>(
- (*message_)[strings::msg_params][hmi_response::button_name].asInt());
-
- const std::vector<ApplicationSharedPtr>& subscribedApps =
- ApplicationManagerImpl::instance()->applications_by_button(btn_id);
-
- std::vector<ApplicationSharedPtr>::const_iterator it = subscribedApps.begin();
- for (; subscribedApps.end() != it; ++it) {
- ApplicationSharedPtr subscribed_app = *it;
- if (!subscribed_app) {
- LOG4CXX_WARN_EXT(logger_, "Null pointer to subscribed app.");
- continue;
- }
-
- if ((mobile_api::HMILevel::HMI_FULL == subscribed_app->hmi_level())
- || (mobile_api::HMILevel::HMI_LIMITED == subscribed_app->hmi_level()
- && static_cast<uint32_t>(mobile_apis::ButtonName::OK) !=
- btn_id)) {
- SendButtonEvent(subscribed_app);
- } else {
- LOG4CXX_WARN_EXT(logger_, "OnButtonEvent in HMI_BACKGROUND or NONE");
- continue;
- }
- }
-}
-
-void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
- smart_objects::SmartObject* on_btn_event = new smart_objects::SmartObject();
-
- if (!on_btn_event) {
- LOG4CXX_ERROR_EXT(logger_, "OnButtonEvent NULL pointer");
- return;
- }
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "OnButtonEvent NULL pointer");
- return;
- }
-
- (*on_btn_event)[strings::params][strings::connection_key] = app->app_id();
-
- (*on_btn_event)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnButtonEventID);
-
- (*on_btn_event)[strings::msg_params][strings::button_name] =
- (*message_)[strings::msg_params][hmi_response::button_name];
- (*on_btn_event)[strings::msg_params][strings::button_event_mode] =
- (*message_)[strings::msg_params][hmi_response::button_mode];
-
- if ((*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
- (*on_btn_event)[strings::msg_params][strings::custom_button_id] =
- (*message_)[strings::msg_params][strings::custom_button_id];
- }
-
- message_.reset(on_btn_event);
- SendNotification();
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
deleted file mode 100644
index 64844f011..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_button_press_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnButtonPressNotification::OnButtonPressNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnButtonPressNotification::~OnButtonPressNotification() {
-}
-
-void OnButtonPressNotification::Run() {
- LOG4CXX_INFO(logger_, "OnButtonPressNotification::Run");
-
- const uint32_t btn_id =
- static_cast<uint32_t>(
- (*message_)[strings::msg_params][hmi_response::button_name].asInt());
-
- const std::vector<ApplicationSharedPtr>& subscribedApps =
- ApplicationManagerImpl::instance()->applications_by_button(btn_id);
-
- std::vector<ApplicationSharedPtr>::const_iterator it = subscribedApps.begin();
- for (; subscribedApps.end() != it; ++it) {
- ApplicationSharedPtr subscribed_app = *it;
- if (!subscribed_app) {
- LOG4CXX_WARN_EXT(logger_, "Null pointer to subscribed app.");
- continue;
- }
-
- if ((mobile_api::HMILevel::HMI_FULL == subscribed_app->hmi_level())
- || (mobile_api::HMILevel::HMI_LIMITED == subscribed_app->hmi_level()
- && static_cast<uint32_t>(mobile_apis::ButtonName::OK) !=
- btn_id)) {
- SendButtonPress(subscribed_app);
- } else {
- LOG4CXX_WARN_EXT(logger_, "OnButtonEvent in HMI_BACKGROUND or NONE");
- continue;
- }
- }
-}
-
-void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
- smart_objects::SmartObject* on_btn_press = new smart_objects::SmartObject();
-
- if (!on_btn_press) {
- LOG4CXX_ERROR_EXT(logger_, "OnButtonPress NULL pointer");
- return;
- }
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "OnButtonPress NULL pointer");
- return;
- }
-
- (*on_btn_press)[strings::params][strings::connection_key] = app->app_id();
-
- (*on_btn_press)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnButtonPressID);
-
- (*on_btn_press)[strings::msg_params][strings::button_name] =
- (*message_)[strings::msg_params][hmi_response::button_name];
- (*on_btn_press)[strings::msg_params][strings::button_press_mode] =
- (*message_)[strings::msg_params][hmi_response::button_mode];
-
- if ((*message_)[strings::msg_params].keyExists(
- hmi_response::custom_button_id)) {
- (*on_btn_press)[strings::msg_params][strings::custom_button_id] =
- (*message_)[strings::msg_params][strings::custom_button_id];
- }
-
- message_.reset(on_btn_press);
- SendNotification();
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_command_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_command_notification.cc
deleted file mode 100644
index 34f5d8ed4..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_command_notification.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_command_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnCommandNotification::OnCommandNotification(const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnCommandNotification::~OnCommandNotification() {
-}
-
-void OnCommandNotification::Run() {
- LOG4CXX_INFO(logger_, "OnCommandNotification::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::msg_params][strings::app_id].asInt());
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "No application associated with session key");
- return;
- }
-
- const uint32_t cmd_id = (*message_)[strings::msg_params][strings::cmd_id]
- .asUInt();
-
- if (!app->FindCommand(cmd_id)) {
- LOG4CXX_ERROR_EXT(logger_,
- " No applications found for the command " << cmd_id);
- return;
- }
-
- (*message_)[strings::params][strings::connection_key] = app->app_id();
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc
deleted file mode 100644
index 2f836a088..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_driver_distraction_notification.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_driver_distraction_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnDriverDistractionNotification::OnDriverDistractionNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnDriverDistractionNotification::~OnDriverDistractionNotification() {
-}
-
-void OnDriverDistractionNotification::Run() {
- LOG4CXX_INFO(logger_, "OnDriverDistractionNotification::Run");
-
- const std::set<ApplicationSharedPtr>& applications =
- ApplicationManagerImpl::instance()->applications();
-
- std::set<ApplicationSharedPtr>::iterator it = applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotification();
- }
- }
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_encoded_sync_pdata_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_encoded_sync_pdata_notification.cc
deleted file mode 100644
index f22f9de3b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_encoded_sync_pdata_notification.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include <vector>
-#include "application_manager/commands/mobile/on_encoded_sync_pdata_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-#include "encryption/Base64.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnEncodedSyncPDataNotification::OnEncodedSyncPDataNotification(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message),
- timer_(this, &OnEncodedSyncPDataNotification::onTimer) {
-}
-
-OnEncodedSyncPDataNotification::~OnEncodedSyncPDataNotification() {
-}
-
-void OnEncodedSyncPDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnEncodedSyncPDataNotification::Run");
-
- const std::string fileName =
- (*message_)[strings::params][hmi_notification::file_name].asString();
-
- if (!file_system::FileExists(fileName)) {
- (*message_)[strings::msg_params][strings::success] = false;
- (*message_)[strings::msg_params][strings::result_code] =
- static_cast<int32_t>(mobile_apis::Result::FILE_NOT_FOUND);
-
- SendResponse(false);
- LOG4CXX_ERROR(logger_, "File not found");
- return;
- }
-
- const char* timeout = mobile_notification::syncp_timeout;
- if ((*message_)[strings::msg_params].keyExists(timeout)) {
- ApplicationManagerImpl::instance()->addNotification(this);
- timer_.start((*message_)[strings::msg_params][timeout].asInt());
- } else {
- SendEncodedPData();
- }
-}
-
-void OnEncodedSyncPDataNotification::onTimer() {
- LOG4CXX_INFO(logger_, "OnEncodedSyncPDataNotification::onTimer");
-
- SendEncodedPData();
-}
-
-void OnEncodedSyncPDataNotification::SendEncodedPData() {
- const std::string fileName =
- (*message_)[strings::params][hmi_notification::file_name].asString();
-
- std::vector<uint8_t> pData;
- file_system::ReadBinaryFile(fileName, pData);
- const std::string string_pdata = base64_decode(
- std::string(pData.begin(), pData.end()));
-
- (*message_)[strings::params][strings::data] = string_pdata;
-
- SendResponse(true);
- ApplicationManagerImpl::instance()->removeNotification(this);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
deleted file mode 100644
index 1f30231bc..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_hash_change_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include <string>
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnHashChangeNotification::OnHashChangeNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnHashChangeNotification::~OnHashChangeNotification() {
-}
-
-void OnHashChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnHashChangeNotification::Run");
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- int32_t app_id;
- app_id = (*message_)[strings::params][strings::connection_key].asInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- std::stringstream stream;
- stream << app->curHash();
- (*message_)[strings::msg_params][strings::hash_id] = stream.str();
- SendNotification();
-}
-
-} //namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
deleted file mode 100644
index 4208d6b35..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_hmi_status_notification.h"
-#include "application_manager/message.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnHMIStatusNotification::OnHMIStatusNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnHMIStatusNotification::~OnHMIStatusNotification() {
-}
-
-void OnHMIStatusNotification::Run() {
- LOG4CXX_INFO(logger_, "OnHMIStatusNotification::Run");
-
- (*message_)[strings::params][strings::message_type] = static_cast<int32_t> (
- application_manager::MessageType::kNotification);
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
deleted file mode 100644
index 969885ab1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_keyboard_input_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnKeyBoardInputNotification::OnKeyBoardInputNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnKeyBoardInputNotification::~OnKeyBoardInputNotification() {
-}
-
-void OnKeyBoardInputNotification::Run() {
- LOG4CXX_INFO(logger_, "OnKeyBoardInputNotification::Run");
-
- const std::vector<ApplicationSharedPtr>& applications =
- ApplicationManagerImpl::instance()->applications_with_navi();
-
- std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotification();
- }
- }
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc
deleted file mode 100644
index f550df874..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_language_change_notification.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_language_change_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnLanguageChangeNotification::OnLanguageChangeNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnLanguageChangeNotification::~OnLanguageChangeNotification() {
-}
-
-void OnLanguageChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnLanguageChangeNotification::Run");
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc
deleted file mode 100644
index 37c81085e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_permissions_change_notification.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_permissions_change_notification.h"
-#include "application_manager/message.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnPermissionsChangeNotification::OnPermissionsChangeNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {
-}
-
-void OnPermissionsChangeNotification::Run() {
- LOG4CXX_INFO(logger_, "OnPermissionsChangeNotification::Run");
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- SendNotification();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_sync_pdata_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_sync_pdata_notification.cc
deleted file mode 100644
index bbfa3e576..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_sync_pdata_notification.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include <vector>
-#include "application_manager/commands/mobile/on_sync_pdata_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-#include "encryption/Base64.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnSyncPDataNotification::OnSyncPDataNotification(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message),
- timer_(this, &OnSyncPDataNotification::onTimer) {
-}
-
-OnSyncPDataNotification::~OnSyncPDataNotification() {
-}
-
-void OnSyncPDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSyncPDataNotification::Run");
-
- const std::string fileName =
- (*message_)[strings::params][hmi_notification::file_name].asString();
-
- if (!file_system::FileExists(fileName)) {
- (*message_)[strings::msg_params][strings::success] = false;
- (*message_)[strings::msg_params][strings::result_code] =
- static_cast<int32_t>(mobile_apis::Result::FILE_NOT_FOUND);
-
- LOG4CXX_ERROR(logger_, "File not found");
- SendResponse(false);
- return;
- }
-
- const char* timeout = mobile_notification::syncp_timeout;
- if ((*message_)[strings::msg_params].keyExists(timeout)) {
- ApplicationManagerImpl::instance()->addNotification(this);
- timer_.start((*message_)[strings::msg_params][timeout].asInt());
- } else {
- SendPData();
- }
-}
-
-void OnSyncPDataNotification::onTimer() {
- LOG4CXX_INFO(logger_, "OnSyncPDataNotification::onTimer");
-
- SendPData();
-}
-
-void OnSyncPDataNotification::SendPData() {
- LOG4CXX_INFO(logger_, "OnSyncPDataNotification::SendPData");
-
- const std::string fileName =
- (*message_)[strings::params][hmi_notification::file_name].asString();
-
- std::vector<uint8_t> pData;
- file_system::ReadBinaryFile(fileName, pData);
- const std::string string_pdata = std::string(pData.begin(), pData.end());
- (*message_)[strings::params][strings::data] = string_pdata;
-
- SendResponse(true);
- ApplicationManagerImpl::instance()->removeNotification(this);
-}
-
-} // namespace commands
-
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
deleted file mode 100644
index a40f1c1b1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_system_request_notification.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnSystemRequestNotification::OnSystemRequestNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnSystemRequestNotification::~OnSystemRequestNotification() {
-}
-
-void OnSystemRequestNotification::Run() {
- LOG4CXX_INFO(logger_, "OnSystemRequestNotification::Run");
-
- SendNotification();
-}
-
-} //namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc
deleted file mode 100644
index 05494c614..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_tbt_client_state_notification.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_tbt_client_state_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnTBTClientStateNotification::OnTBTClientStateNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnTBTClientStateNotification::~OnTBTClientStateNotification() {
-}
-
-void OnTBTClientStateNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTBTClientStateNotification::Run");
-
- (*message_)[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- const std::vector<ApplicationSharedPtr>& applications =
- ApplicationManagerImpl::instance()->applications_with_navi();
-
- std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotification();
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc
deleted file mode 100644
index dd2431bb6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_touch_event_notification.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_touch_event_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace mobile {
-
-OnTouchEventNotification::OnTouchEventNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnTouchEventNotification::~OnTouchEventNotification() {
-}
-
-void OnTouchEventNotification::Run() {
- LOG4CXX_INFO(logger_, "OnTouchEventNotification::Run");
-
- const std::vector<ApplicationSharedPtr>& applications =
- ApplicationManagerImpl::instance()->applications_with_navi();
-
- std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) {
- (*message_)[strings::params][strings::connection_key] = app->app_id();
- SendNotification();
- }
- }
-}
-
-} // namespace mobile
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
deleted file mode 100644
index 46ed25cb1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/on_vehicle_data_notification.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-OnVehicleDataNotification::OnVehicleDataNotification(
- const MessageSharedPtr& message)
- : CommandNotificationImpl(message) {
-}
-
-OnVehicleDataNotification::~OnVehicleDataNotification() {
-}
-
-void OnVehicleDataNotification::Run() {
- LOG4CXX_INFO(logger_, "OnVehicleDataNotification::Run");
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[strings::msg_params].keyExists(it->first)) {
- const std::vector<ApplicationSharedPtr>& applications =
- ApplicationManagerImpl::instance()->applications_by_ivi((static_cast<uint32_t>(it->second)));
-
- std::vector<ApplicationSharedPtr>::const_iterator it = applications.begin();
- for (; applications.end() != it; ++it) {
- ApplicationSharedPtr app = *it;
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "NULL pointer");
- continue;
- }
-
- LOG4CXX_INFO(
- logger_,
- "Send OnVehicleData PRNDL notification to " << app->name()
- << " application id " << app->app_id());
-
- (*message_)[strings::params][strings::connection_key] = app->app_id();
-
- SendNotification();
- }
-
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
deleted file mode 100644
index 07ce5cf15..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/perform_audio_pass_thru_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-PerformAudioPassThruRequest::PerformAudioPassThruRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {
-}
-
-bool PerformAudioPassThruRequest::Init() {
- default_timeout_ += (*message_)[str::msg_params][str::max_duration].asInt();
- return true;
-}
-
-void PerformAudioPassThruRequest::Run() {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::Run");
-
- if (ApplicationManagerImpl::instance()->begin_audio_pass_thru() == false) {
- // Audio pass thru already active
- LOG4CXX_ERROR_EXT(logger_, "REJECTED");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "APPLICATION_NOT_REGISTERED");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
- LOG4CXX_ERROR_EXT(logger_, "application isn't activated");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- SendSpeakRequest(app->app_id());
-
- // create HMI request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[str::app_id] = app_id;
-
- msg_params[hmi_request::audio_pass_display_texts] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text1)) {
- msg_params[hmi_request::audio_pass_display_texts]
- [0][hmi_request::field_name] = static_cast<int32_t>
- (application_manager::TextFieldName::AUDIO_DISPLAY_TEXT1);
- msg_params[hmi_request::audio_pass_display_texts]
- [0][hmi_request::field_text] =
- (*message_)[str::msg_params][str::audio_pass_display_text1];
- }
-
- if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text2)) {
- msg_params[hmi_request::audio_pass_display_texts]
- [1][hmi_request::field_name] = static_cast<int32_t>
- (application_manager::TextFieldName::AUDIO_DISPLAY_TEXT2);
- msg_params[hmi_request::audio_pass_display_texts]
- [1][hmi_request::field_text] =
- (*message_)[str::msg_params][str::audio_pass_display_text2];
- }
-
- // duration
- msg_params[hmi_request::max_duration] =
- (*message_)[str::msg_params][str::max_duration];
-
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::UI_PerformAudioPassThru,
- &msg_params, true);
-
- ApplicationManagerImpl::instance()->StartAudioPassThruThread(
- (*message_)[str::params][str::connection_key].asInt(),
- (*message_)[str::params][str::correlation_id].asInt(),
- (*message_)[str::msg_params][str::max_duration].asInt(),
- (*message_)[str::msg_params][str::sampling_rate].asInt(),
- (*message_)[str::msg_params][str::bits_per_sample].asInt(),
- (*message_)[str::msg_params][str::audio_type].asInt());
-}
-
-void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_PerformAudioPassThru: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code ||
- mobile_apis::Result::RETRY == result_code;
-
- if (ApplicationManagerImpl::instance()->end_audio_pass_thru()) {
- int32_t session_key =
- (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationManagerImpl::instance()->StopAudioPassThru(session_key);
- }
-
- const char* return_info = NULL;
-
- if (result) {
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE ==
- static_cast<hmi_apis::Common_Result::eType>(result_code)) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string("Unsupported phoneme type sent in a prompt").c_str();
- }
- }
-
- SendResponse(result, result_code, return_info, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-void PerformAudioPassThruRequest::SendSpeakRequest(const int32_t app_id) {
- // crate HMI TTS speak request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
-
- if ((*message_)[str::msg_params].keyExists(str::initial_prompt) &&
- (0 < (*message_)[str::msg_params][str::initial_prompt].length())) {
- for (int32_t i = 0;
- i < (*message_)[str::msg_params][str::initial_prompt].length();
- ++i) {
- msg_params[hmi_request::tts_chunks][i][str::text] =
- (*message_)[str::msg_params][str::initial_prompt][i][str::text];
- }
- // app_id
- msg_params[strings::app_id] = app_id;
-
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params);
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc
deleted file mode 100644
index a10eaac9f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/perform_audio_pass_thru_response.h"
-#include "application_manager/application_manager_impl.h"
-
-
-namespace application_manager {
-
-namespace commands {
-
-PerformAudioPassThruResponse::PerformAudioPassThruResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {
-}
-
-void PerformAudioPassThruResponse::Run() {
- LOG4CXX_INFO(logger_, "PerformAudioPassThruResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
deleted file mode 100644
index e46161d24..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
+++ /dev/null
@@ -1,763 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <string>
-#include "application_manager/commands/mobile/perform_interaction_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "config_profile/profile.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PerformInteractionRequest::PerformInteractionRequest(
- const MessageSharedPtr& message)
-: CommandRequestImpl(message),
- timer_(this, &PerformInteractionRequest::onTimer),
- tts_perform_interaction_code_(mobile_apis::Result::INVALID_ENUM) {
-
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
- subscribe_on_event(hmi_apis::FunctionID::VR_OnCommand);
- subscribe_on_event(hmi_apis::FunctionID::Buttons_OnButtonPress);
- subscribe_on_event(
- hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered);
-}
-
-PerformInteractionRequest::~PerformInteractionRequest() {
-}
-
-void PerformInteractionRequest::onTimer() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::onTimer");
-}
-
-bool PerformInteractionRequest::Init() {
-
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- }
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- default_timeout_ *= 2;
- }
- return true;
-}
-
-void PerformInteractionRequest::Run() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::Run");
-
- // timer_.start(2);
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (0 != app->is_perform_interaction_active()) {
- LOG4CXX_INFO(logger_, "Another perform interaction is running!");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles((*message_)[strings::msg_params], app);
-
- if ((mobile_apis::Result::SUCCESS != verification_result) &&
- (mobile_apis::Result::UNSUPPORTED_RESOURCE != verification_result)) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "MessageHelper::VerifyImageFiles return " << verification_result);
- SendResponse(false, verification_result);
- return;
- }
-
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- for (size_t i = 0; i < choice_list.length(); ++i) {
- if (!app->FindChoiceSet(choice_list[i].asInt())) {
- LOG4CXX_ERROR(logger_, "Invalid ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return;
- }
- }
-
- uint32_t correlation_id =
- (*message_)[strings::params][strings::correlation_id].asUInt();
-
- int32_t mode =
- (*message_)[strings::msg_params][strings::interaction_mode].asInt();
-
- app->set_perform_interaction_mode(mode);
-
- mobile_apis::InteractionMode::eType interaction_mode =
- static_cast<mobile_apis::InteractionMode::eType>(mode);
-
- switch (interaction_mode) {
- case mobile_apis::InteractionMode::BOTH: {
- LOG4CXX_INFO(logger_, "Interaction Mode: BOTH");
- if (!CheckChoiceSetVRSynonyms(app)) {
- return;
- }
-
- if (!CheckChoiceSetMenuNames(app)) {
- return;
- }
-
- if (!CheckVrHelpItemPositions(app)) {
- return;
- }
-
- app->set_perform_interaction_active(correlation_id);
- SendVRAddCommandRequest(app);
- SendTTSPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
- break;
- }
- case mobile_apis::InteractionMode::MANUAL_ONLY: {
- LOG4CXX_INFO(logger_, "Interaction Mode: MANUAL_ONLY");
- if (!CheckChoiceSetMenuNames(app)) {
- return;
- }
-
- app->set_perform_interaction_active(correlation_id);
- SendTTSPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
- break;
- }
- case mobile_apis::InteractionMode::VR_ONLY: {
- LOG4CXX_INFO(logger_, "Interaction Mode: VR_ONLY");
- if (!CheckChoiceSetVRSynonyms(app)) {
- return;
- }
-
- if (!CheckVrHelpItemPositions(app)) {
- return;
- }
-
- // TODO(DK): need to implement timeout
- app->set_perform_interaction_active(correlation_id);
- SendVRAddCommandRequest(app);
- SendTTSPerformInteractionRequest(app);
- SendUIPerformInteractionRequest(app);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Unknown interaction mode");
- return;
- }
- }
-
- // TODO(DK): need to implement timeout TTS speak request.
-}
-
-void PerformInteractionRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::on_event");
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
- ApplicationManagerImpl::instance()->updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
- break;
- }
- case hmi_apis::FunctionID::VR_OnCommand: {
- LOG4CXX_INFO(logger_, "Received VR_OnCommand event");
- ProcessVRNotification(event.smart_object());
- break;
- }
- case hmi_apis::FunctionID::UI_PerformInteraction: {
- LOG4CXX_INFO(logger_, "Received UI_PerformInteraction event");
- ProcessPerformInteractionResponse(event.smart_object());
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered: {
- LOG4CXX_INFO(logger_, "Received OnAppUnregistered event");
- ProcessAppUnregisteredNotification(event.smart_object());
- break;
- }
- case hmi_apis::FunctionID::TTS_PerformInteraction: {
- LOG4CXX_INFO(logger_, "Received TTS_PerformInteraction");
- tts_perform_interaction_code_ = static_cast<mobile_apis::Result::eType>(
- event.smart_object()[strings::params][hmi_response::code].asInt());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-void PerformInteractionRequest::onTimeOut() {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::onTimeOut");
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
- if (app) {
-
- // Unsubscribe from event on UIPerformInteractionResponse to
- // avoid of double execution of SendVrDeleteCommand()
- unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
- SendVrDeleteCommand(app);
- app->set_perform_interaction_active(0);
- app->set_perform_interaction_mode(-1);
- app->DeletePerformInteractionChoiceSetMap();
- }
- CommandRequestImpl::onTimeOut();
-}
-
-void PerformInteractionRequest::ProcessVRNotification(
- const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::ProcessVRNotification");
- const uint32_t app_id = message[strings::msg_params][strings::app_id]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- int32_t cmd_id = message[strings::msg_params][strings::cmd_id].asInt();
- const PerformChoiceSetMap& choice_set_map = app
- ->performinteraction_choice_set_map();
- bool choice_id_chosen = false;
- LOG4CXX_INFO(logger_, "If command was choice id");
- for (PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
- choice_set_map.end() != it; ++it) {
- const smart_objects::SmartObject& choice_set = (*it->second).getElement(
- strings::choice_set);
- for (size_t j = 0; j < choice_set.length(); ++j) {
- if (cmd_id ==
- choice_set.getElement(j).getElement(strings::choice_id).asInt()) {
- choice_id_chosen = true;
- break;
- }
- }
- }
- if (choice_id_chosen) {
- LOG4CXX_INFO(logger_, "Command was choice id!");
- smart_objects::SmartObject c_p_request_so = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- c_p_request_so[hmi_request::method_name] = "UI.PerformInteraction";
- SendHMIRequest(hmi_apis::FunctionID::UI_ClosePopUp, &(c_p_request_so));
- SendVrDeleteCommand(app);
- app->set_perform_interaction_mode(-1);
- app->DeletePerformInteractionChoiceSetMap();
- app->set_perform_interaction_active(0);
-
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::PerformInteractionID);
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::choice_id] = cmd_id;
- msg_params[strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR);
- SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &(msg_params));
-
- } else {
- LOG4CXX_INFO(logger_, "Sending OnCommand notification");
- smart_objects::SmartObject* notification_so =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
- if (!notification_so) {
- LOG4CXX_ERROR(
- logger_,
- "Failed to allocate memory for perform interaction response.");
- return;
- }
- smart_objects::SmartObject& notification = *notification_so;
- notification = message;
- notification[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
- notification[strings::msg_params][strings::trigger_source] =
- static_cast<int32_t>(mobile_apis::TriggerSource::TS_VR);
- ApplicationManagerImpl::instance()->ManageMobileCommand(notification_so);
- }
-}
-
-void PerformInteractionRequest::ProcessAppUnregisteredNotification
- (const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_,
- "PerformInteractionRequest::ProcessAppUnregisteredNotification");
- const uint32_t app_id = (*message_)[strings::params]
- [strings::connection_key].asUInt();
- if (app_id == message[strings::msg_params][strings::app_id].asUInt()) {
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- if (app->is_perform_interaction_active()) {
- if (static_cast<int32_t>(mobile_apis::InteractionMode::MANUAL_ONLY) !=
- app->perform_interaction_mode()) {
- SendVrDeleteCommand(app);
- }
- app->set_perform_interaction_mode(-1);
- app->DeletePerformInteractionChoiceSetMap();
- app->set_perform_interaction_active(0);
- }
- } else {
- LOG4CXX_INFO(logger_, "Notification was sent from another application");
- }
-}
-
-void PerformInteractionRequest::SendVrDeleteCommand(
- application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_INFO(logger_, "PerformInteractionRequest::SendVrDeleteCommand");
- const PerformChoiceSetMap& choice_set_map = app
- ->performinteraction_choice_set_map();
- PerformChoiceSetMap::const_iterator it = choice_set_map.begin();
- for (; choice_set_map.end() != it; ++it) {
- const smart_objects::SmartObject& choice_set = (*it->second).getElement(
- strings::choice_set);
- for (size_t j = 0; j < choice_set.length(); ++j) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::cmd_id] = choice_set.getElement(j).getElement(
- strings::choice_id);
- SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
- }
- }
-}
-
-void PerformInteractionRequest::ProcessPerformInteractionResponse(
- const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_,
- "PerformInteractionRequest::ProcessPerformInteractionResponse");
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
- if (app->is_perform_interaction_active()) {
- if (static_cast<int32_t>(mobile_apis::InteractionMode::MANUAL_ONLY)
- != app->perform_interaction_mode()) {
- SendVrDeleteCommand(app);
- }
- app->set_perform_interaction_mode(-1);
- app->DeletePerformInteractionChoiceSetMap();
- app->set_perform_interaction_active(0);
- }
- (*message_)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::PerformInteractionID);
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params = message[strings::msg_params];
- bool result = false;
- int32_t hmi_response_code =
- message[strings::params][hmi_response::code].asInt();
- if (hmi_apis::Common_Result::SUCCESS ==
- hmi_apis::Common_Result::eType(hmi_response_code)) {
- if (message[strings::msg_params].keyExists(strings::manual_text_entry)) {
- msg_params[strings::trigger_source] = mobile_apis::TriggerSource::TS_KEYBOARD;
- } else {
- msg_params[strings::trigger_source] = mobile_apis::TriggerSource::TS_MENU;
- }
- result = true;
- }
-
- const char* return_info = NULL;
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(hmi_response_code);
- if (result) {
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE ==
- hmi_apis::Common_Result::eType(hmi_response_code)) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string(
- "Unsupported phoneme type sent in any item").c_str();
- }
- }
-
- SendResponse(result,
- result_code,
- return_info,
- &(msg_params));
-}
-
-void PerformInteractionRequest::SendVRAddCommandRequest(
- application_manager::ApplicationSharedPtr const app) {
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::VR_ONLY == mode) {
- // TODO(DK): We need subscribe perform interaction with on command
- // notification
- /*CreateHMIRequest(hmi_apis::FunctionID::UI_PerformInteraction,
- smart_objects::SmartObject(smart_objects::SmartType_Map), true, 1);*/
- }
-
- for (size_t i = 0; i < choice_list.length(); ++i) {
- smart_objects::SmartObject* choice_set = app->FindChoiceSet(
- choice_list[i].asInt());
-
- if (choice_set) {
- for (size_t j = 0; j < (*choice_set)[strings::choice_set].length(); ++j) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::cmd_id] =
- (*choice_set)[strings::choice_set][j][strings::choice_id];
- msg_params[strings::vr_commands] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- msg_params[strings::vr_commands] =
- (*choice_set)[strings::choice_set][j][strings::vr_commands];
- SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &msg_params);
- }
- }
- }
-}
-
-void PerformInteractionRequest::SendUIPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app) {
- smart_objects::SmartObject& choice_set_id_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::VR_ONLY != mode) {
- msg_params[hmi_request::initial_text][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::
- INITIAL_INTERACTION_TEXT);
- msg_params[hmi_request::initial_text][hmi_request::field_text] =
- (*message_)[strings::msg_params][hmi_request::initial_text];
- }
- bool is_vr_help_item = false;
- if (mobile_apis::InteractionMode::MANUAL_ONLY != mode) {
- msg_params[strings::vr_help_title] =
- (*message_)[strings::msg_params][strings::initial_text].asString();
- if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- is_vr_help_item = true;
- msg_params[strings::vr_help] =
- (*message_)[strings::msg_params][strings::vr_help];
- }
- }
-
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- msg_params[strings::timeout] = default_timeout_/2;
- } else {
- msg_params[strings::timeout] = default_timeout_;
- }
- msg_params[strings::app_id] = app->app_id();
- if (mobile_apis::InteractionMode::VR_ONLY != mode) {
- msg_params[strings::choice_set] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- }
- int32_t index_array_of_vr_help = 0;
- for (size_t i = 0; i < choice_set_id_list.length(); ++i) {
- smart_objects::SmartObject* choice_set = app->FindChoiceSet(
- choice_set_id_list[i].asInt());
- if (choice_set) {
- // save perform interaction choice set
- app->AddPerformInteractionChoiceSet(choice_set_id_list[i].asInt(),
- *choice_set);
- for (size_t j = 0; j < (*choice_set)[strings::choice_set].length(); ++j) {
- if (mobile_apis::InteractionMode::VR_ONLY != mode) {
- size_t index = msg_params[strings::choice_set].length();
- msg_params[strings::choice_set][index] =
- (*choice_set)[strings::choice_set][j];
- // vrCommands should be added via VR.AddCommand only
- msg_params[strings::choice_set][index].erase(strings::vr_commands);
- }
- if (mobile_apis::InteractionMode::MANUAL_ONLY !=
- mode && !is_vr_help_item) {
- smart_objects::SmartObject& vr_commands =
- (*choice_set)[strings::choice_set][j][strings::vr_commands];
- if (0 < vr_commands.length()) {
- // copy only first synonym
- smart_objects::SmartObject item(smart_objects::SmartType_Map);
- item[strings::text] = vr_commands[0].asString();
- item[strings::position] = index_array_of_vr_help + 1;
- msg_params[strings::vr_help][index_array_of_vr_help++] = item;
- }
- }
- }
- }
- }
- if ((*message_)[strings::msg_params]
- .keyExists(hmi_request::interaction_layout)
- && mobile_apis::InteractionMode::VR_ONLY != mode) {
- msg_params[hmi_request::interaction_layout] =
- (*message_)[strings::msg_params][hmi_request::interaction_layout].
- asInt();
- }
- CreateUIPerformInteraction(msg_params, app);
-}
-
-void PerformInteractionRequest::CreateUIPerformInteraction(
- const smart_objects::SmartObject& msg_params,
- application_manager::ApplicationSharedPtr const app) {
- SendHMIRequest(hmi_apis::FunctionID::UI_PerformInteraction,
- &msg_params, true);
-}
-
-void PerformInteractionRequest::SendTTSPerformInteractionRequest(
- application_manager::ApplicationSharedPtr const app) {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if ((*message_)[strings::msg_params].keyExists(strings::help_prompt)) {
-
- msg_params[strings::help_prompt] =
- (*message_)[strings::msg_params][strings::help_prompt];
-
- DeleteParameterFromTTSChunk(&msg_params[strings::help_prompt]);
- } else {
-
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- msg_params[strings::help_prompt] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- int32_t index = 0;
- for (uint32_t i = 0; i < choice_list.length(); ++i) {
- smart_objects::SmartObject* choice_set =
- app->FindChoiceSet(choice_list[i].asInt());
-
- if (choice_set) {
- for (uint32_t j = 0;
- j < (*choice_set)[strings::choice_set].length();
- ++j) {
- smart_objects::SmartObject& vr_commands =
- (*choice_set)[strings::choice_set][j][strings::vr_commands];
- if (0 < vr_commands.length()) {
- // copy only first synonym
- smart_objects::SmartObject item(smart_objects::SmartType_Map);
- item[strings::text] = vr_commands[0].asString();
- msg_params[strings::help_prompt][index++] = item;
- }
- }
- }
- }
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::timeout_prompt)) {
- msg_params[strings::timeout_prompt] =
- (*message_)[strings::msg_params][strings::timeout_prompt];
-
- DeleteParameterFromTTSChunk(&msg_params[strings::timeout_prompt]);
- } else {
- msg_params[strings::timeout_prompt] = msg_params[strings::help_prompt];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
- msg_params[strings::initial_prompt] =
- (*message_)[strings::msg_params][strings::initial_prompt];
-
- DeleteParameterFromTTSChunk(&msg_params[strings::initial_prompt]);
- }
-
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- msg_params[strings::timeout] = default_timeout_/2;
- } else {
- msg_params[strings::timeout] = default_timeout_;
- }
-
- SendHMIRequest(hmi_apis::FunctionID::TTS_PerformInteraction, &msg_params,
- true);
-}
-
-void PerformInteractionRequest::DeleteParameterFromTTSChunk
-(smart_objects::SmartObject* array_tts_chunk) {
- int32_t length = array_tts_chunk->length();
- for (int32_t i = 0; i < length; ++i) {
- array_tts_chunk[i].erase(strings::type);
- }
-}
-
-bool PerformInteractionRequest::CheckChoiceSetMenuNames(
- application_manager::ApplicationSharedPtr const app) {
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- for (size_t i = 0; i < choice_list.length(); ++i) {
- // choice_set contains SmartObject msg_params
- smart_objects::SmartObject* i_choice_set = app->FindChoiceSet(
- choice_list[i].asInt());
-
- for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject* j_choice_set = app->FindChoiceSet(
- choice_list[j].asInt());
-
- if (i == j) {
- // skip check the same element
- continue;
- }
-
- if (!i_choice_set || !j_choice_set) {
- LOG4CXX_ERROR(logger_, "Invalid ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return false;
- }
-
- size_t ii = 0;
- size_t jj = 0;
- for (; ii < (*i_choice_set)[strings::choice_set].length(); ++ii) {
- for (; jj < (*j_choice_set)[strings::choice_set].length(); ++jj) {
- std::string ii_menu_name =
- (*i_choice_set)[strings::choice_set][ii][strings::menu_name]
- .asString();
- std::string jj_menu_name =
- (*j_choice_set)[strings::choice_set][jj][strings::menu_name]
- .asString();
-
- if (ii_menu_name == jj_menu_name) {
- LOG4CXX_ERROR(logger_, "Choice set has duplicated menu name");
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME,
- "Choice set has duplicated menu name");
- return false;
- }
- }
- }
- }
- }
-
- return true;
-}
-
-bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
- application_manager::ApplicationSharedPtr const app) {
- smart_objects::SmartObject& choice_list =
- (*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
-
- for (size_t i = 0; i < choice_list.length(); ++i) {
- // choice_set contains SmartObject msg_params
- smart_objects::SmartObject* i_choice_set = app->FindChoiceSet(
- choice_list[i].asInt());
-
- for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject* j_choice_set = app->FindChoiceSet(
- choice_list[j].asInt());
-
- if (i == j) {
- // skip check the same element
- continue;
- }
-
- if ((!i_choice_set) || (!j_choice_set)) {
- LOG4CXX_ERROR(logger_, "Invalid ID");
- SendResponse(false, mobile_apis::Result::INVALID_ID);
- return false;
- }
-
- size_t ii = 0;
- size_t jj = 0;
- for (; ii < (*i_choice_set)[strings::choice_set].length(); ++ii) {
- for (; jj < (*j_choice_set)[strings::choice_set].length(); ++jj) {
- // choice_set pointer contains SmartObject msg_params
- smart_objects::SmartObject& ii_vr_commands =
- (*i_choice_set)[strings::choice_set][ii][strings::vr_commands];
-
- smart_objects::SmartObject& jj_vr_commands =
- (*j_choice_set)[strings::choice_set][jj][strings::vr_commands];
-
- for (size_t iii = 0; iii < ii_vr_commands.length(); ++iii) {
- for (size_t jjj = 0; jjj < jj_vr_commands.length(); ++jjj) {
- std::string vr_cmd_i = ii_vr_commands[iii].asString();
- std::string vr_cmd_j = jj_vr_commands[jjj].asString();
- if (0 == strcasecmp(vr_cmd_i.c_str(), vr_cmd_j.c_str())) {
- LOG4CXX_ERROR(logger_, "Choice set has duplicated VR synonym");
- SendResponse(false, mobile_apis::Result::DUPLICATE_NAME,
- "Choice set has duplicated VR synonym");
- return false;
- }
- }
- }
- }
- }
- }
- }
-
- return true;
-}
-
-bool PerformInteractionRequest::CheckVrHelpItemPositions(
- application_manager::ApplicationSharedPtr const app) {
-
- if (!(*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- LOG4CXX_INFO(logger_, ""
- "PerformInteractionRequest::CheckVrHelpItemPositions vr_help omitted");
- return true;
- }
-
- smart_objects::SmartObject& vr_help =
- (*message_)[strings::msg_params][strings::vr_help];
-
- int32_t position = 1;
- for (size_t i = 0; i < vr_help.length(); ++i) {
- if (position != vr_help[i][strings::position].asInt()) {
- LOG4CXX_ERROR(logger_, "Non-sequential vrHelp item position");
- SendResponse(false, mobile_apis::Result::REJECTED,
- "Non-sequential vrHelp item position");
- return false;
- }
- ++position;
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc
deleted file mode 100644
index 4ceb4ce3b..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/perform_interaction_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/perform_interaction_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PerformInteractionResponse::PerformInteractionResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-PerformInteractionResponse::~PerformInteractionResponse() {
-}
-
-void PerformInteractionResponse::Run() {
- LOG4CXX_INFO(logger_, "PerformInteractionResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/put_file_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/put_file_request.cc
deleted file mode 100644
index 12d7c386a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/put_file_request.cc
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/put_file_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "config_profile/profile.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PutFileRequest::PutFileRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-PutFileRequest::~PutFileRequest() {
-}
-
-void PutFileRequest::Run() {
- LOG4CXX_INFO(logger_, "PutFileRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == application->hmi_level() &&
- profile::Profile::instance()->put_file_in_none() <=
- application->put_file_in_none_count()) {
- // If application is in the HMI_NONE level the quantity of allowed
- // PutFile request is limited by the configuration profile
- LOG4CXX_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_ERROR(logger_, "Binary data empty");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (!(*message_)[strings::msg_params].keyExists(strings::sync_file_name)) {
- LOG4CXX_ERROR(logger_, "No file name");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if (!(*message_)[strings::msg_params].keyExists(strings::file_type)) {
- LOG4CXX_ERROR(logger_, "No file type");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- const std::string& sync_file_name =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
- const mobile_apis::FileType::eType& file_type =
- static_cast<mobile_apis::FileType::eType>(
- (*message_)[strings::msg_params][strings::file_type].asInt());
- const std::vector<uint8_t> binary_data =
- (*message_)[strings::params][strings::binary_data].asBinary();
-
- uint32_t offset = 0;
- bool is_persistent_file = false;
- bool is_system_file = false;
- uint32_t length = binary_data.size();
- bool is_download_compleate = true;
- bool offset_exist = (*message_)[strings::msg_params].keyExists(strings::offset);
-
- if (offset_exist) {
- offset = (*message_)[strings::msg_params][strings::offset].asInt();
- }
- if ((*message_)[strings::msg_params].keyExists(strings::length)) {
- length =
- (*message_)[strings::msg_params][strings::length].asInt();
- }
- if ((*message_)[strings::msg_params].
- keyExists(strings::persistent_file)) {
- is_persistent_file =
- (*message_)[strings::msg_params][strings::persistent_file].asBool();
- }
- if ((*message_)[strings::msg_params].
- keyExists(strings::system_file)) {
- is_system_file =
- (*message_)[strings::msg_params][strings::system_file].asBool();
- }
-
- if (is_system_file & (file_type != mobile_apis::FileType::BINARY)) {
- LOG4CXX_INFO(logger_, "File is System but not binary");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- }
- std::string relative_file_path =
- file_system::CreateDirectory(application->name());
- relative_file_path += "/";
- relative_file_path += sync_file_name;
-
- mobile_apis::Result::eType save_result =
- ApplicationManagerImpl::instance()->SaveBinary(
- application->name(),
- binary_data,
- relative_file_path,
- offset);
-
- switch (save_result) {
- case mobile_apis::Result::SUCCESS: {
- AppFile file(sync_file_name, is_persistent_file, is_download_compleate, file_type);
- if (offset == 0) {
- LOG4CXX_INFO(logger_, "New file downloading");
- if (!application->AddFile(file)) {
- LOG4CXX_INFO(logger_, "Couldn't add file to application (File already Exist in application and was rewrited on fs) ");
- // It can be first part of new big file, so we need tu update information about it's downloading status and percictency
- if (!application->UpdateFile(file)) {
- LOG4CXX_INFO(logger_, "Couldn't update file");
- // If it is impossible to update file, application doesn't know about existing this file
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- } else {
- /* if file added - increment it's count ( may be application->AddFile have to incapsulate it? )
- * Any way now this method evals not only in "none"*/
- application->increment_put_file_in_none_count();
- }
- }
-// For future implementation ( when length will contains file size)
-// if (offset + binary_data.size() == length) {
-// LOG4CXX_INFO(logger_, "File is Fully downloaded");
-// if (!application->UpdateFile(file)) {
-// // If it is impossible to update file, application doesn't know about existing this file
-// SendResponse(false, mobile_apis::Result::INVALID_DATA);
-// return;
-// }
-// } else {
-// //TODO: Maybe need to save in AppFile information about downloading progress
-// }
- SendResponse(true, save_result);
- break;
- }
- default:
- if (mobile_apis::Result::OUT_OF_MEMORY == save_result) {
- if (file_system::FileExists(relative_file_path)) {
- DCHECK(file_system::DeleteFile(relative_file_path));
- }
- }
- LOG4CXX_INFO(logger_, "Save in unsuccesfull result = " << save_result);
- SendResponse(false, save_result);
- break;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/put_file_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/put_file_response.cc
deleted file mode 100644
index 493061d73..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/put_file_response.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/put_file_response.h"
-#include "utils/file_system.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-PutFileResponse::PutFileResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-PutFileResponse::~PutFileResponse() {
-}
-
-void PutFileResponse::Run() {
- LOG4CXX_INFO(logger_, "PutFileResponse::Run");
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- (*message_)[strings::msg_params][strings::space_available] =
- static_cast<int32_t>(file_system::GetAvailableSpaceForApp(app->name()));
-
- SendResponse((*message_)[strings::msg_params][strings::success].asBool());
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/read_did_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/read_did_request.cc
deleted file mode 100644
index f8b7aed0d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/read_did_request.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/read_did_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ReadDIDRequest::ReadDIDRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-ReadDIDRequest::~ReadDIDRequest() {
-}
-
-void ReadDIDRequest::Run() {
- LOG4CXX_INFO(logger_, "ReadDIDRequest::Run");
-
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "An application is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
- SendResponse(false, mobile_apis::Result::REJECTED);
- LOG4CXX_ERROR(logger_, "Rejected");
- return;
- }
-
- if (0 == (*message_)[strings::msg_params][strings::did_location].length()) {
- LOG4CXX_ERROR_EXT(logger_, "INVALID_DATA");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::ecu_name] =
- (*message_)[strings::msg_params][strings::ecu_name];
- msg_params[strings::did_location] =
- (*message_)[strings::msg_params][strings::did_location];
-
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_ReadDID, &msg_params, true);
-}
-
-void ReadDIDRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ReadDIDRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::VehicleInfo_ReadDID: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/read_did_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/read_did_response.cc
deleted file mode 100644
index 888b59075..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/read_did_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/read_did_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ReadDIDResponse::ReadDIDResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-ReadDIDResponse::~ReadDIDResponse() {
-}
-
-void ReadDIDResponse::Run() {
- LOG4CXX_INFO(logger_, "ReadDIDResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
deleted file mode 100644
index 620b38b28..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/register_app_interface_request.h"
-
-#include <unistd.h>
-#include <algorithm>
-
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "config_profile/profile.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {
-}
-
-bool RegisterAppInterfaceRequest::Init() {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::Init");
- return true;
-}
-
-void RegisterAppInterfaceRequest::Run() {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::Run "<< connection_key());
-
- // wait till all HMI capabilities initialized
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- while (!hmi_capabilities.is_hmi_capabilities_initialized()) {
- sleep(1);
- // TODO(DK): timer_->StartWait(1);
- ApplicationManagerImpl::instance()->updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
- }
-
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- if (application) {
- SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY);
- return;
- }
-
- if (IsApplicationWithSameAppIdRegistered()) {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- mobile_apis::Result::eType restriction_result = CheckRestrictions();
- if (mobile_apis::Result::SUCCESS != restriction_result) {
- LOG4CXX_ERROR_EXT(logger_, "Param names restrictions check failed.");
- SendResponse(false, restriction_result);
- return;
- }
-
- mobile_apis::Result::eType coincidence_result =
- CheckCoincidence();
-
- if (mobile_apis::Result::SUCCESS != coincidence_result) {
- LOG4CXX_ERROR_EXT(logger_, "Coincidence check failed.");
- SendResponse(false, coincidence_result);
- return;
- }
-
- ApplicationSharedPtr app =
- ApplicationManagerImpl::instance()->RegisterApplication(message_);
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "Application " <<
- msg_params[strings::app_name].asString() << " hasn't been registered!");
- } else {
- app->set_is_media_application(
- msg_params[strings::is_media_application].asBool());
-
- if (msg_params.keyExists(strings::vr_synonyms)) {
- app->set_vr_synonyms(msg_params[strings::vr_synonyms]);
- }
-
- if (msg_params.keyExists(strings::ngn_media_screen_app_name)) {
- app->set_ngn_media_screen_name(
- msg_params[strings::ngn_media_screen_app_name]);
- }
-
- if (msg_params.keyExists(strings::tts_name)) {
- app->set_tts_name(msg_params[strings::tts_name]);
- }
-
- if (msg_params.keyExists(strings::app_hmi_type)) {
- app->set_app_types(msg_params[strings::app_hmi_type]);
-
- // check if app is NAVI
- const int32_t is_navi_type = mobile_apis::AppHMIType::NAVIGATION;
- const smart_objects::SmartObject& app_type =
- msg_params.getElement(strings::app_hmi_type);
-
- for (size_t i = 0; i < app_type.length(); ++i) {
- if (is_navi_type == app_type.getElement(i).asInt()) {
- app->set_allowed_support_navigation(true);
- }
- }
- }
-
- MessageHelper::SendOnAppRegisteredNotificationToHMI(*app);
- SendRegisterAppInterfaceResponseToMobile();
-
- }
-}
-
-void RegisterAppInterfaceRequest::SendVrCommandsOnRegisterAppToHMI
-(const application_manager::Application& application_impl) {
- uint32_t max_cmd_id = profile::Profile::instance()->max_cmd_id();
- uint32_t app_id = application_impl.app_id();
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = (max_cmd_id + app_id);
- msg_params[strings::vr_commands] = *(application_impl.vr_synonyms());
- if (0 < app_id) {
- msg_params[strings::app_id] = app_id;
- }
- SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &msg_params);
-}
-
-void RegisterAppInterfaceRequest::SendTTSChunksToHMI
-(const application_manager::Application& application_impl) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = application_impl.app_id();
- msg_params[strings::tts_chunks] = *(application_impl.tts_name());
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak, &msg_params, true);
-}
-
-void RegisterAppInterfaceRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::on_event");
- switch (event.id()) {
- case hmi_apis::FunctionID::TTS_Speak: {
- const smart_objects::SmartObject& message = event.smart_object();
-
- mobile_apis::Result::eType tts_result =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- SendRegisterAppInterfaceResponseToMobile(tts_result);
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-
-void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
- mobile_apis::Result::eType result) {
- smart_objects::SmartObject* params = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!params) {
- SendResponse(false, mobile_apis::Result::OUT_OF_MEMORY);
- return;
- }
-
- ApplicationManagerImpl* app_manager = ApplicationManagerImpl::instance();
- const HMICapabilities& hmi_capabilities = app_manager->hmi_capabilities();
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
- smart_objects::SmartObject& response_params = *params;
-
- response_params[strings::sync_msg_version][strings::major_version] =
- APIVersion::kAPIV2;
- response_params[strings::sync_msg_version][strings::minor_version] =
- APIVersion::kAPIV2;
-
- response_params[strings::language] = hmi_capabilities.active_vr_language();
- response_params[strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- if (msg_params[strings::language_desired].asInt() !=
- hmi_capabilities.active_vr_language() ||
- msg_params[strings::hmi_display_language_desired].asInt() !=
- hmi_capabilities.active_ui_language()) {
-
- LOG4CXX_WARN_EXT(
- logger_,
- "Wrong language on registering application " << application->name());
-
- LOG4CXX_ERROR_EXT(
- logger_,
- "vr "
- << msg_params[strings::language_desired].asInt()
- << " - "
- << hmi_capabilities.active_vr_language()
- << "ui "
- << msg_params[strings::hmi_display_language_desired].asInt()
- << " - "
- << hmi_capabilities.active_ui_language());
-
- result = mobile_apis::Result::WRONG_LANGUAGE;
- }
-
- if (hmi_capabilities.display_capabilities()) {
-
- response_params[hmi_response::display_capabilities] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- smart_objects::SmartObject& display_caps =
- response_params[hmi_response::display_capabilities];
-
- display_caps[hmi_response::display_type] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::display_type);
-
- display_caps[hmi_response::text_fields] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::text_fields);
-
- display_caps[hmi_response::media_clock_formats] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::media_clock_formats);
-
- display_caps[hmi_response::templates_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::templates_available);
-
- display_caps[hmi_response::screen_params] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::screen_params);
-
- display_caps[hmi_response::num_custom_presets_available] =
- hmi_capabilities.display_capabilities()->getElement(
- hmi_response::num_custom_presets_available);
-
- if (hmi_capabilities.display_capabilities()->getElement(
- hmi_response::image_capabilities).length() > 0) {
-
- display_caps[hmi_response::graphic_supported] = true;
- } else {
-
- display_caps[hmi_response::graphic_supported] = false;
- }
- }
-
- if (hmi_capabilities.button_capabilities()) {
- response_params[hmi_response::button_capabilities] =
- *hmi_capabilities.button_capabilities();
- }
- if (hmi_capabilities.soft_button_capabilities()) {
- response_params[hmi_response::soft_button_capabilities] =
- *hmi_capabilities.soft_button_capabilities();
- }
- if (hmi_capabilities.preset_bank_capabilities()) {
- response_params[hmi_response::preset_bank_capabilities] =
- *hmi_capabilities.preset_bank_capabilities();
- }
- if (hmi_capabilities.hmi_zone_capabilities()) {
- response_params[hmi_response::hmi_zone_capabilities] =
- *hmi_capabilities.hmi_zone_capabilities();
- }
- if (hmi_capabilities.speech_capabilities()) {
- response_params[strings::speech_capabilities] =
- *hmi_capabilities.speech_capabilities();
- }
- if (hmi_capabilities.vr_capabilities()) {
- response_params[strings::vr_capabilities] =
- *hmi_capabilities.vr_capabilities();
- }
- if (hmi_capabilities.audio_pass_thru_capabilities()) {
- response_params[strings::audio_pass_thru_capabilities] =
- *hmi_capabilities.audio_pass_thru_capabilities();
- }
- if (hmi_capabilities.vehicle_type()) {
- response_params[hmi_response::vehicle_type] =
- *hmi_capabilities.vehicle_type();
- }
- if (hmi_capabilities.prerecorded_speech()) {
- response_params[strings::prerecorded_speech] =
- *(hmi_capabilities.prerecorded_speech());
- }
-
- const std::vector<uint32_t>& diag_modes =
- profile::Profile::instance()->supported_diag_modes();
- if (!diag_modes.empty()) {
- std::vector<uint32_t>::const_iterator it = diag_modes.begin();
- uint32_t index = 0;
- for (; it != diag_modes.end(); ++it) {
- response_params[strings::supported_diag_modes][index] = *it;
- ++index;
- }
- }
-
- ResumeCtrl& resumer = ApplicationManagerImpl::instance()->resume_controller();
- uint32_t hash_id = 0;
-
- if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) {
-
- hash_id = (*message_)[strings::msg_params][strings::hash_id].asUInt();
- if (!resumer.CheckApplicationHash((*application->mobile_app_id()).asInt(),
- hash_id)) {
- result = mobile_apis::Result::RESUME_FAILED;
- }
- }
-
- SendResponse(true, result, "", params);
- resumer.StartResumption(application, hash_id);
-}
-
-mobile_apis::Result::eType
-RegisterAppInterfaceRequest::CheckCoincidence() {
-
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::CheckCoincidence ");
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- ApplicationManagerImpl* app_manager = ApplicationManagerImpl::instance();
-
- const std::set<ApplicationSharedPtr>& applications = app_manager->applications();
- std::set<ApplicationSharedPtr>::const_iterator it = applications.begin();
- const std::string app_name = msg_params[strings::app_name].asString();
-
- for (; applications.end() != it; ++it) {
-
- // name check
- const std::string &cur_name = (*it)->name();
- if (!strcasecmp(app_name.c_str(), cur_name.c_str())) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- const smart_objects::SmartObject* tts = (*it)->tts_name();
- std::vector<smart_objects::SmartObject>* curr_tts = NULL;
- if (NULL != tts) {
- curr_tts = tts->asArray();
- CoincidencePredicateTTS t(app_name);
-
- if (0 != std::count_if((*curr_tts).begin(), (*curr_tts).end(), t)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
-
- const smart_objects::SmartObject* vr = (*it)->vr_synonyms();
- const std::vector<smart_objects::SmartObject>* curr_vr = NULL;
- if (NULL != vr) {
- curr_vr = vr->asArray();
- CoincidencePredicateVR v(app_name);
-
- if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v )) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
-
-
- // tts check
- if (msg_params.keyExists(strings::tts_name)) {
-
- const std::vector<smart_objects::SmartObject>* new_tts =
- msg_params[strings::tts_name].asArray();
-
- std::vector<smart_objects::SmartObject>::const_iterator it_tts =
- new_tts->begin();
-
- std::vector<smart_objects::SmartObject>::const_iterator it_tts_End =
- new_tts->end();
-
- for (; it_tts != it_tts_End; ++it_tts) {
- std::string text = (*it_tts)[strings::text].asString();
- if (!strcasecmp(cur_name.c_str(), text.c_str())){
- LOG4CXX_ERROR(logger_,
- "Some TTS parameters names are known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- CoincidencePredicateTTS t((*it_tts)[strings::text].asString());
- if (NULL != curr_tts
- && 0 != std::count_if(curr_tts->begin(), curr_tts->end(), t)) {
- LOG4CXX_ERROR(logger_,
- "Some TTS parameters names are known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- CoincidencePredicateVR v((*it_tts)[strings::text].asString());
- if (NULL != curr_vr
- && 0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
- LOG4CXX_ERROR(logger_,
- "Some TTS parameters names are known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
- } // end tts check
-
- if (msg_params.keyExists(strings::vr_synonyms)) {
-
- const std::vector<smart_objects::SmartObject>* new_vr =
- msg_params[strings::vr_synonyms].asArray();
-
- std::vector<smart_objects::SmartObject>::const_iterator it_vr =
- new_vr->begin();
-
- std::vector<smart_objects::SmartObject>::const_iterator it_vr_End =
- new_vr->end();
-
- for (; it_vr != it_vr_End; ++it_vr) {
- std::string vr_synonym = it_vr->asString();
- if (!strcasecmp(cur_name.c_str(), vr_synonym.c_str())) {
- LOG4CXX_ERROR(logger_, "Some VR synonyms are known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- CoincidencePredicateTTS t(it_vr->asString());
- if (NULL !=curr_tts
- && 0 != std::count_if(curr_tts->begin(), curr_tts->end(), t)) {
- LOG4CXX_ERROR(logger_, "Some VR synonyms are known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
-
- CoincidencePredicateVR v(it_vr->asString());
- if (NULL != curr_vr
- && 0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "Some VR synonyms are known already.");
- return mobile_apis::Result::DUPLICATE_NAME;
- }
- }
- } // end vr check
-
- } // application for end
-
- return mobile_apis::Result::SUCCESS;
-} // method end
-
-mobile_apis::Result::eType
-RegisterAppInterfaceRequest::CheckRestrictions() const {
-
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::CheckRestrictions");
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- const std::string& app_name = msg_params[strings::app_name].asString();
-
- if (ClearParamName(app_name).empty()) {
- printf("Application name is empty.\n");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if ((app_name[0] == '\n') ||
- ((app_name[0] == '\\') && (app_name[1] == 'n'))) {
-
- printf("Application name has invalid characters.");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if (msg_params.keyExists(strings::tts_name)) {
-
- const smart_objects::SmartArray* tts =
- msg_params[strings::tts_name].asArray();
-
- smart_objects::SmartArray::const_iterator it = tts->begin();
- smart_objects::SmartArray::const_iterator it_end = tts->end();
-
- for (; it != it_end; ++it) {
-
- const std::string& tts_name = (*it)[strings::text].asString();
-
- if (ClearParamName(tts_name).empty()) {
- printf("TTS value is empty.");
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if ((tts_name[0] == '\n') ||
- ((tts_name[0] == '\\') && (tts_name[1] == 'n'))) {
-
- printf("TTS value(s) has invalid characters.");
- return mobile_apis::Result::INVALID_DATA;
- }
- }
- }
-
- return mobile_apis::Result::SUCCESS;
-}
-
-std::string
-RegisterAppInterfaceRequest::ClearParamName(std::string param_name) const {
-
- // Expecting for chars different from newlines and spaces in the appName
- //
- // There is an agreement, that "\n" is not allowed symbols, so we have to
- // check for this case also
-
- std::string newline = "\\n";
- while (std::string::npos != param_name.find(newline)) {
- param_name.erase(param_name.find(newline), newline.length());
- }
-
- std::string::iterator param_name_new_end =
- std::remove_if(param_name.begin(), param_name.end(), ::isspace);
-
- return std::string(param_name.begin(), param_name_new_end);
-}
-
-bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
-
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceRequest::IsApplicationRegistered");
-
- int32_t mobile_app_id = (*message_)[strings::msg_params][strings::app_id].asInt();
-
- const std::set<ApplicationSharedPtr>& applications =
- ApplicationManagerImpl::instance()->applications();
-
- std::set<ApplicationSharedPtr>::const_iterator it = applications.begin();
- std::set<ApplicationSharedPtr>::const_iterator it_end = applications.end();
-
- for (; it != it_end; ++it) {
- if (mobile_app_id == (*it)->mobile_app_id()->asInt()) {
- return true;
- }
- }
-
- return false;
-}
-
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
deleted file mode 100644
index 3f35c44d6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/register_app_interface_response.h"
-#include "interfaces/MOBILE_API.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void RegisterAppInterfaceResponse::Run() {
- LOG4CXX_INFO(logger_, "RegisterAppInterfaceResponse::Run");
-
- bool success = (*message_)[strings::msg_params][strings::success].asBool();
-
- bool last_message = !success;
- // Do not close connection in case of APPLICATION_NOT_REGISTERED despite it is an error
- if (!success && (*message_)[strings::msg_params].keyExists(strings::result_code)) {
- mobile_apis::Result::eType result_code =
- mobile_apis::Result::eType((*message_)[strings::msg_params][strings::result_code].asInt());
- if (result_code == mobile_apis::Result::APPLICATION_REGISTERED_ALREADY) {
- last_message = false;
- }
- }
-
- SendResponse(success, mobile_apis::Result::INVALID_ENUM, last_message);
-
- if (success) {
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asInt());
-
- MessageHelper::SendHMIStatusNotification(*application);
- MessageHelper::SendChangeRegistrationRequestToHMI(application);
- }
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
deleted file mode 100644
index 4a8939a43..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/reset_global_properties_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "config_profile/profile.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- is_ui_send_(false),
- is_tts_send_(false),
- is_ui_received_(false),
- is_tts_received_(false),
- ui_result_(hmi_apis::Common_Result::INVALID_ENUM),
- tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {
-}
-
-ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {
-}
-
-void ResetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "ResetGlobalPropertiesRequest::Run");
-
- uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "No application associated with session key");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- size_t obj_length = (*message_)[strings::msg_params][strings::properties]
- .length();
-
- bool helpt_promt = false;
- bool timeout_prompt = false;
- bool vr_help_title = false;
- bool vr_help_items = false;
- bool menu_name = false;
- bool menu_icon = false;
- bool is_key_board_properties = false;
-
- for (size_t i = 0; i < obj_length; ++i) {
- switch ((*message_)[strings::msg_params][strings::properties][i].asInt()) {
- case GlobalProperty::HELPPROMT: {
- helpt_promt = ResetHelpPromt(app);
- break;
- }
- case GlobalProperty::TIMEOUTPROMT: {
- timeout_prompt = ResetTimeoutPromt(app);
- break;
- }
- case GlobalProperty::VRHELPTITLE: {
- vr_help_title = ResetVrHelpTitle(app);
- break;
- }
- case GlobalProperty::VRHELPITEMS: {
- vr_help_items = ResetVrHelpItems(app);
- break;
- }
- case mobile_apis::GlobalProperty::MENUNAME: {
- menu_name = true;
- break;
- }
- case mobile_apis::GlobalProperty::MENUICON: {
- menu_icon = true;
- break;
- }
- case mobile_apis::GlobalProperty::KEYBOARDPROPERTIES: {
- is_key_board_properties = true;
- break;
- }
- default: {
- LOG4CXX_ERROR(
- logger_,
- "Unknown global property 0x%02X value"
- << (*message_)[strings::msg_params][strings::properties][i].asInt());
- break;
- }
- }
- }
-
- if (vr_help_title || vr_help_items || menu_name || menu_icon
- || is_key_board_properties) {
- is_ui_send_ = true;
- }
-
- if (timeout_prompt || helpt_promt) {
- is_tts_send_ = true;
- }
-
- app->set_reset_global_properties_active(true);
-
- if (vr_help_title || vr_help_items || menu_name || menu_icon
- || is_key_board_properties) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (vr_help_title || vr_help_items) {
- smart_objects::SmartObject* vr_help = MessageHelper::CreateAppVrHelp(app);
- if (!vr_help) {
- return;
- }
- msg_params = *vr_help;
- }
- if (menu_name) {
- msg_params[hmi_request::menu_title] = "";
- }
- //TODO(DT): clarify the sending parameter menuIcon
- //if (menu_icon) {
- //}
- if (is_key_board_properties) {
- smart_objects::SmartObject key_board_properties = smart_objects::
- SmartObject(smart_objects::SmartType_Map);
- key_board_properties[strings::language] = static_cast<int32_t>
- (hmi_apis::Common_Language::EN_US);
- key_board_properties[hmi_request::keyboard_layout] = static_cast<int32_t>
- (hmi_apis::Common_KeyboardLayout::QWERTY);
- key_board_properties[hmi_request::send_dynamic_entry] = false;
-
- // Look for APPLINK-4432 for details.
- /*smart_objects::SmartObject limited_character_list = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- limited_character_list[0] = "";
- key_board_properties[hmi_request::limited_character_list] =
- limited_character_list;*/
-
- key_board_properties[hmi_request::auto_complete_text] = "";
- msg_params[hmi_request::keyboard_properties] = key_board_properties;
- }
-
- msg_params[strings::app_id] = app->app_id();
- SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
- &msg_params, true);
- }
-
- if (timeout_prompt || helpt_promt) {
- // create ui request
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (helpt_promt) {
- msg_params[strings::help_prompt] = (*app->help_prompt());
- }
-
- if (timeout_prompt) {
- msg_params[strings::timeout_prompt] = (*app->timeout_prompt());
- }
-
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::TTS_SetGlobalProperties,
- &msg_params, true);
- }
-}
-
-bool ResetGlobalPropertiesRequest::ResetHelpPromt(
- application_manager::ApplicationSharedPtr app) {
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
-
- const std::vector<std::string>& help_prompt = profile::Profile::instance()
- ->help_prompt();
-
- smart_objects::SmartObject so_help_prompt = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- for (uint32_t i = 0; i < help_prompt.size(); ++i) {
- smart_objects::SmartObject helpPrompt = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- helpPrompt[strings::text] = help_prompt[i];
- helpPrompt[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
- so_help_prompt[i] = helpPrompt;
- }
-
- app->set_help_prompt(so_help_prompt);
-
- return true;
-}
-
-bool ResetGlobalPropertiesRequest::ResetTimeoutPromt(
- application_manager::ApplicationSharedPtr const app) {
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
-
- const std::vector<std::string>& time_out_promt = profile::Profile::instance()
- ->time_out_promt();
-
- smart_objects::SmartObject so_time_out_promt = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- for (uint32_t i = 0; i < time_out_promt.size(); ++i) {
- smart_objects::SmartObject timeoutPrompt = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- timeoutPrompt[strings::text] = time_out_promt[i];
- timeoutPrompt[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
- so_time_out_promt[i] = timeoutPrompt;
- }
-
- app->set_timeout_prompt(so_time_out_promt);
-
- return true;
-}
-
-bool ResetGlobalPropertiesRequest::ResetVrHelpTitle(
- application_manager::ApplicationSharedPtr const app) {
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
- app->reset_vr_help_title();
-
- return true;
-}
-
-bool ResetGlobalPropertiesRequest::ResetVrHelpItems(
- application_manager::ApplicationSharedPtr const app) {
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
- app->reset_vr_help();
-
- return true;
-}
-
-void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ResetGlobalPropertiesRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
- is_tts_received_ = true;
- tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- if (!IsPendingResponseExist()) {
- bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_ ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_))
- || ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::INVALID_ENUM == tts_result_))
- || ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_));
-
- mobile_apis::Result::eType result_code;
- const char* return_info = NULL;
-
- if (result) {
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string("Unsupported phoneme type sent in a prompt").c_str();
- } else {
- result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
- }
- } else {
- result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
- }
-
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
- SendResponse(result, static_cast<mobile_apis::Result::eType>(result_code),
- return_info, &(message[strings::msg_params]));
- application->UpdateHash();
- }
-}
-
-bool ResetGlobalPropertiesRequest::IsPendingResponseExist() {
- return is_ui_send_ != is_ui_received_ || is_tts_send_ != is_tts_received_;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc
deleted file mode 100644
index aeacabf9d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/reset_global_properties_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/reset_global_properties_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {
-}
-
-void ResetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "ResetGlobalPropertiesResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
deleted file mode 100644
index e949b9888..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_request.cc
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/scrollable_message_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ScrollabelMessageRequest::ScrollabelMessageRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- result_(mobile_apis::Result::INVALID_ENUM) {
-
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
-}
-
-ScrollabelMessageRequest::~ScrollabelMessageRequest() {
-}
-
-bool ScrollabelMessageRequest::Init() {
-
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- } else {
- const int32_t def_value = 30000;
- default_timeout_ = def_value;
- }
-
- return true;
-}
-
-void ScrollabelMessageRequest::Run() {
- LOG4CXX_INFO(logger_, "ScrollabelMessageRequest::Run");
-
- ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
- ->application((*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- if (mobile_apis::Result::INVALID_DATA == processing_result) {
- LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
- SendResponse(false, processing_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!");
- result_ = processing_result;
- }
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[hmi_request::message_text][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::SCROLLABLE_MSG_BODY);
- msg_params[hmi_request::message_text][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::scroll_message_body];
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::timeout] = default_timeout_;
-
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- msg_params[strings::soft_buttons] =
- (*message_)[strings::msg_params][strings::soft_buttons];
- }
-
- SendHMIRequest(hmi_apis::FunctionID::UI_ScrollableMessage, &msg_params, true);
-}
-
-void ScrollabelMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ScrollabelMessageRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
- ApplicationManagerImpl::instance()->updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
- break;
- }
- case hmi_apis::FunctionID::UI_ScrollableMessage: {
- LOG4CXX_INFO(logger_, "Received UI_ScrollableMessage event");
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>
- (message[strings::params][hmi_response::code].asInt());
-
- bool result = false;
- if (mobile_apis::Result::SUCCESS == result_code) {
- result = true;
- }
- if (mobile_apis::Result::ABORTED == result_code) {
- result = true;
- } else
-
- if (mobile_apis::Result::INVALID_ENUM != result_) {
- result_code = result_;
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- break;
- }
- }
-}
-
-} // namespace commands
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc
deleted file mode 100644
index 45a8e991f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/scrollable_message_response.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/scrollable_message_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ScrollableMessageResponse::ScrollableMessageResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-void ScrollableMessageResponse::Run() {
- LOG4CXX_INFO(logger_, "ScrollableMessageResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
deleted file mode 100644
index 5ee701365..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_request.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_display_layout_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-
-namespace application_manager {
-
-namespace commands {
-
-SetDisplayLayoutRequest::SetDisplayLayoutRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {
-}
-
-void SetDisplayLayoutRequest::Run() {
- LOG4CXX_INFO(logger_, "SetDisplayLayoutRequest::Run");
-
- ApplicationConstSharedPtr app = ApplicationManagerImpl::instance()
- ->application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- (*message_)[strings::msg_params][strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::UI_SetDisplayLayout,
- &((*message_)[strings::msg_params]), true);
-
-}
-
-void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetDisplayLayoutRequest::on_event");
-
- const smart_objects::SmartObject& message = event.smart_object();
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetDisplayLayout: {
- LOG4CXX_INFO(logger_, "Received UI_SetDisplayLayout event");
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- bool response_success = mobile_apis::Result::SUCCESS == result_code;
- if (response_success) {
- HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- if (message[strings::msg_params].keyExists(hmi_response::display_capabilities)) {
- hmi_capabilities.set_display_capabilities(
- message[strings::msg_params][hmi_response::display_capabilities]);
- }
-
- if (message[strings::msg_params].keyExists(
- hmi_response::soft_button_capabilities)) {
- hmi_capabilities.set_soft_button_capabilities(
- message[strings::msg_params][hmi_response::soft_button_capabilities]);
- }
-
- }
- SendResponse(response_success, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc
deleted file mode 100644
index 51f8c1f35..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_display_layout_response.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_display_layout_response.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetDisplayLayoutResponse::SetDisplayLayoutResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {
-}
-
-void SetDisplayLayoutResponse::Run() {
- LOG4CXX_INFO(logger_, "SetDisplayLayoutResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
deleted file mode 100644
index cfb4be5af..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <algorithm>
-#include "application_manager/commands/mobile/set_global_properties_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetGlobalPropertiesRequest::SetGlobalPropertiesRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- is_ui_send_(false),
- is_tts_send_(false),
- is_ui_received_(false),
- is_tts_received_(false),
- ui_result_(hmi_apis::Common_Result::INVALID_ENUM),
- tts_result_(hmi_apis::Common_Result::INVALID_ENUM) {
-}
-
-SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {
-}
-
-void SetGlobalPropertiesRequest::Run() {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::Run");
-
- const smart_objects::SmartObject& msg_params =
- (*message_)[strings::msg_params];
-
- uint32_t app_id =
- (*message_)[strings::params][strings::connection_key].asUInt();
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "No application associated with session key");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (!ValidateConditionalMandatoryParameters(msg_params)) {
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "There are no parameters present in request.");
- return;
- }
-
- // Check for image file(s) in vrHelpItem
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "MessageHelper::VerifyImageFiles return " << verification_result);
- SendResponse(false, verification_result);
- return;
- }
-
-
- bool is_help_prompt_present = msg_params.keyExists(strings::help_prompt);
- bool is_timeout_prompt_present = msg_params.keyExists(
- strings::timeout_prompt);
- bool is_vr_help_title_present = msg_params.keyExists(strings::vr_help_title);
- bool is_vr_help_present = msg_params.keyExists(strings::vr_help);
- bool is_menu_title_present = msg_params.keyExists(hmi_request::menu_title);
- bool is_menu_icon_present = msg_params.keyExists(hmi_request::menu_icon);
- bool is_keyboard_props_present =
- msg_params.keyExists(hmi_request::keyboard_properties);
-
- // Media-only applications support API v2.1 with less parameters
- if (!app->allowed_support_navigation() &&
- (is_keyboard_props_present ||
- is_menu_icon_present ||
- is_menu_title_present)
- ) {
- const std::string app_type =
- app->is_media_application() ? "media" : "non-media";
-
- const std::string message =
- "There are too many parameters for "+app_type+" application.";
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- message.c_str());
- return;
- }
-
- if ((is_vr_help_title_present && is_vr_help_present) ||
- (!is_vr_help_title_present && !is_vr_help_present)) {
- is_ui_send_ = true;
- }
-
- if (is_help_prompt_present || is_timeout_prompt_present) {
- is_tts_send_ = true;
- }
-
- if (is_vr_help_title_present && is_vr_help_present) {
- // check vrhelpitem position index
- if (!CheckVrHelpItemsOrder()) {
- LOG4CXX_ERROR(logger_, "Request rejected");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- app->set_vr_help_title(
- msg_params.getElement(strings::vr_help_title));
- app->set_vr_help(
- msg_params.getElement(strings::vr_help));
-
- smart_objects::SmartObject params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- params[strings::vr_help_title] = (*app->vr_help_title());
- params[strings::vr_help] = (*app->vr_help());
- params[strings::app_id] = app->app_id();
- if (is_menu_title_present) {
-
- params[hmi_request::menu_title] =
- msg_params[hmi_request::menu_title].asString();
- }
- if (is_menu_icon_present) {
-
- params[hmi_request::menu_icon] =
- msg_params[hmi_request::menu_icon];
- }
- if (is_keyboard_props_present) {
-
- params[hmi_request::keyboard_properties] =
- msg_params[hmi_request::keyboard_properties];
- }
-
- SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
- &params, true);
- } else if (!is_vr_help_title_present && !is_vr_help_present) {
- const CommandsMap& cmdMap = app->commands_map();
- CommandsMap::const_iterator command_it = cmdMap.begin();
-
- int32_t index = 0;
- smart_objects::SmartObject vr_help_items;
- for (; cmdMap.end() != command_it; ++command_it) {
- if (false == (*command_it->second).keyExists(strings::vr_commands)) {
- LOG4CXX_ERROR(logger_, "VR synonyms are empty");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- // use only first
- vr_help_items[index][strings::position] = (index + 1);
- vr_help_items[index++][strings::text] =
- (*command_it->second)[strings::vr_commands][0];
- }
-
- app->set_vr_help_title(smart_objects::SmartObject(app->name()));
- app->set_vr_help(vr_help_items);
-
- smart_objects::SmartObject params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- params[strings::vr_help_title] = (*app->vr_help_title());
- params[strings::vr_help] = (*app->vr_help());
- params[strings::app_id] = app->app_id();
- if (is_menu_title_present) {
-
- params[hmi_request::menu_title] =
- msg_params[hmi_request::menu_title].asString();
- }
- if (is_menu_icon_present) {
-
- params[hmi_request::menu_icon] =
- msg_params[hmi_request::menu_icon];
- }
- if (is_keyboard_props_present) {
-
- params[hmi_request::keyboard_properties] =
- msg_params[hmi_request::keyboard_properties];
- }
-
- SendHMIRequest(hmi_apis::FunctionID::UI_SetGlobalProperties,
- &params, true);
- } else {
- LOG4CXX_ERROR(logger_, "Request rejected");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- // check TTS params
- if (is_help_prompt_present || is_timeout_prompt_present) {
- smart_objects::SmartObject params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (is_help_prompt_present) {
- app->set_help_prompt(
- msg_params.getElement(strings::help_prompt));
- params[strings::help_prompt] = (*app->help_prompt());
- }
-
- if (is_timeout_prompt_present) {
- app->set_timeout_prompt(
- msg_params.getElement(strings::timeout_prompt));
- params[strings::timeout_prompt] = (*app->timeout_prompt());
- }
-
- params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::TTS_SetGlobalProperties,
- &params, true);
- }
-}
-
-bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder() {
- const smart_objects::SmartObject vr_help = (*message_)[strings::msg_params]
- .getElement(strings::vr_help);
-
- // vr help item start position must be 1
- const uint32_t vr_help_item_start_position = 1;
-
- if (vr_help_item_start_position !=
- vr_help.getElement(0).getElement(strings::position).asUInt()) {
- LOG4CXX_ERROR(logger_, "VR help items start position is wrong");
- return false;
- }
-
- // Check if VR Help Items contains sequential positionss
- size_t i = 0;
- for (size_t j = 1; j < vr_help.length(); ++i, ++j) {
- if ((vr_help.getElement(i).getElement(strings::position).asInt() + 1)
- != vr_help.getElement(j).getElement(strings::position).asInt()) {
- LOG4CXX_ERROR(logger_, "VR help items order is wrong");
- return false;
- }
- }
-
- return true;
-}
-
-void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(CommandRequestImpl::connection_key());
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
- is_ui_received_ = true;
- ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
- is_tts_received_ = true;
- tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-
- if (!IsPendingResponseExist()) {
- bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_ ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_))
- || ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::INVALID_ENUM == tts_result_))
- || ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_));
-
- mobile_apis::Result::eType result_code;
- const char* return_info = NULL;
-
- if (result) {
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info =
- std::string("Unsupported phoneme type sent in a prompt").c_str();
- } else {
- result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
- }
- } else {
- result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
- }
-
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
- SendResponse(result, static_cast<mobile_apis::Result::eType>(result_code),
- return_info, &(message[strings::msg_params]));
- application->UpdateHash();
- }
-}
-
-bool SetGlobalPropertiesRequest::IsPendingResponseExist() {
-
- return is_ui_send_ != is_ui_received_ || is_tts_send_ != is_tts_received_;
-}
-
-bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
- const smart_objects::SmartObject& params) {
- return params.keyExists(strings::help_prompt)
- || params.keyExists(strings::timeout_prompt)
- || params.keyExists(strings::vr_help_title)
- || params.keyExists(strings::vr_help)
- || params.keyExists(strings::menu_title)
- || params.keyExists(strings::menu_icon)
- || params.keyExists(strings::keyboard_properties);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc
deleted file mode 100644
index 5f0b62fb4..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_global_properties_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_global_properties_response.h"
-#include "application_manager/application_manager_impl.h"
-
-
-namespace application_manager {
-
-namespace commands {
-
-SetGlobalPropertiesResponse::SetGlobalPropertiesResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {
-}
-
-void SetGlobalPropertiesResponse::Run() {
- LOG4CXX_INFO(logger_, "SetGlobalPropertiesResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_request.cc
deleted file mode 100644
index 73dc1bd0f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_request.cc
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_icon_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetIconRequest::SetIconRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SetIconRequest::~SetIconRequest() {
-}
-
-void SetIconRequest::Run() {
- LOG4CXX_INFO(logger_, "SetIconRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const std::string& sync_file_name =
- (*message_)[strings::msg_params][strings::sync_file_name].asString();
-
- std::string relative_file_path = app->name();
- relative_file_path += "/";
- relative_file_path += sync_file_name;
-
- std::string full_file_path = file_system::FullPath(relative_file_path);
-
- if (!file_system::FileExists(full_file_path)) {
- LOG4CXX_ERROR(logger_, "No such file");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = app->app_id();
- msg_params[strings::sync_file_name] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- const std::string full_file_path_for_hmi = file_system::ConvertPathForURL(
- full_file_path);
-
- msg_params[strings::sync_file_name][strings::value] = full_file_path_for_hmi;
-
- // TODO(VS): research why is image_type hardcoded
- msg_params[strings::sync_file_name][strings::image_type] =
- static_cast<int32_t> (SetIconRequest::ImageType::DYNAMIC);
-
- // for further use in on_event function
- (*message_)[strings::msg_params][strings::sync_file_name] =
- msg_params[strings::sync_file_name];
-
- SendHMIRequest(hmi_apis::FunctionID::UI_SetAppIcon, &msg_params, true);
-}
-
-void SetIconRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetIconRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetAppIcon: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- if (result) {
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- connection_key());
-
- const std::string path = (*message_)[strings::msg_params]
- [strings::sync_file_name]
- [strings::value].asString();
- app->set_app_icon_path(path);
-
- LOG4CXX_INFO(logger_,
- "Icon path was set to '" << app->app_icon_path() << "'");
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_response.cc
deleted file mode 100644
index f1580823d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_icon_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_icon_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetIconResponse::SetIconResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SetIconResponse::~SetIconResponse() {
-}
-
-void SetIconResponse::Run() {
- LOG4CXX_INFO(logger_, "SetIconResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
deleted file mode 100644
index 7daddce7a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_request.cc
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_media_clock_timer_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetMediaClockRequest::SetMediaClockRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SetMediaClockRequest::~SetMediaClockRequest() {
-}
-
-void SetMediaClockRequest::Run() {
- LOG4CXX_INFO(logger_, "SetMediaClockRequest::Run");
-
- uint32_t app_id = (*message_)[strings::params][strings::connection_key]
- .asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- if (!app->is_media_application()) {
- LOG4CXX_ERROR(logger_, "Application is not media application");
- SendResponse(false, mobile_apis::Result::REJECTED);
- return;
- }
-
- if (isDataValid()) {
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- // copy entirely msg
- msg_params = (*message_)[strings::msg_params];
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(hmi_apis::FunctionID::UI_SetMediaClockTimer, &msg_params, true);
- } else {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- }
-}
-
-void SetMediaClockRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetMediaClockRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
- }
-}
-
-bool SetMediaClockRequest::isDataValid() {
- if (!(*message_)[strings::msg_params].keyExists(strings::start_time)
- && ((*message_)[strings::msg_params][strings::update_mode]
- == mobile_apis::UpdateMode::COUNTUP
- || (*message_)[strings::msg_params][strings::update_mode]
- == mobile_apis::UpdateMode::COUNTDOWN)) {
- LOG4CXX_INFO(logger_, "Data is invalid");
- return false;
- } else if (((*message_)[strings::msg_params].keyExists(strings::start_time))
- && ((*message_)[strings::msg_params][strings::update_mode]
- == mobile_apis::UpdateMode::COUNTUP
- || (*message_)[strings::msg_params][strings::update_mode]
- == mobile_apis::UpdateMode::COUNTDOWN) &&
- ((*message_)[strings::msg_params].keyExists(strings::end_time))) {
- unsigned int start_time_in_seconds = 0;
- unsigned int end_time_in_seconds = 0;
- start_time_in_seconds = ((*message_)[strings::msg_params]
- [strings::start_time][strings::hours].asUInt()) * 3600;
- start_time_in_seconds += ((*message_)[strings::msg_params]
- [strings::start_time][strings::minutes].asUInt()) * 60;
- start_time_in_seconds += ((*message_)[strings::msg_params]
- [strings::start_time][strings::seconds].asUInt());
- end_time_in_seconds = ((*message_)[strings::msg_params]
- [strings::end_time][strings::hours].asUInt()) * 3600;
- end_time_in_seconds += ((*message_)[strings::msg_params]
- [strings::end_time][strings::minutes].asUInt()) * 60;
- end_time_in_seconds += ((*message_)[strings::msg_params]
- [strings::end_time][strings::seconds].asUInt());
- if (((end_time_in_seconds > start_time_in_seconds) &&
- ((*message_)[strings::msg_params][strings::update_mode] ==
- mobile_apis::UpdateMode::COUNTDOWN)) ||
- ((end_time_in_seconds < start_time_in_seconds) &&
- ((*message_)[strings::msg_params][strings::update_mode] ==
- mobile_apis::UpdateMode::COUNTUP))) {
- LOG4CXX_INFO(logger_, "Data is invalid");
- return false;
- }
- }
- LOG4CXX_INFO(logger_, "Data is valid");
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc
deleted file mode 100644
index 73923b002..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/set_media_clock_timer_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/set_media_clock_timer_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SetMediaClockTimerResponse::SetMediaClockTimerResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {
-}
-
-void SetMediaClockTimerResponse::Run() {
- LOG4CXX_INFO(logger_, "SetMediaClockTimerResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
deleted file mode 100644
index 27cb9f52a..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/show_constant_tbt_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowConstantTBTRequest::ShowConstantTBTRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- result_(mobile_apis::Result::INVALID_ENUM) {
-}
-
-ShowConstantTBTRequest::~ShowConstantTBTRequest() {
-}
-
-void ShowConstantTBTRequest::Run() {
- LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
-
- // TODO(DK): Missing mandatory param
- if (!msg_params.keyExists(strings::soft_buttons)) {
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
- return;
- }
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons(msg_params, app);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- if (mobile_apis::Result::INVALID_DATA == processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, processing_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!");
- result_ = processing_result;
- }
- }
-
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles(msg_params, app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImageFiles INVALID_DATA!");
- SendResponse(false, verification_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImageFiles UNSUPPORTED_RESOURCE!");
- result_ = verification_result;
- }
- }
-
- msg_params[strings::app_id] = app->app_id();
-
- msg_params[hmi_request::navi_texts] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- int32_t index = 0;
- if (msg_params.keyExists(strings::navigation_text_1)) {
- // erase useless parametr
- msg_params.erase(strings::navigation_text_1);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::NAVI_TEXT1);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::navigation_text_1];
- }
-
- if (msg_params.keyExists(strings::navigation_text_2)) {
- // erase useless param
- msg_params.erase(strings::navigation_text_2);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::NAVI_TEXT2);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::navigation_text_2];
- }
-
- if (msg_params.keyExists(strings::eta)) {
- // erase useless param
- msg_params.erase(strings::eta);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::ETA);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::eta];
- }
-
- if (msg_params.keyExists(strings::total_distance)) {
- // erase useless param
- msg_params.erase(strings::total_distance);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::TOTAL_DISTANCE);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::total_distance];
- }
-
- if (msg_params.keyExists(strings::time_to_destination)) {
- // erase useless param
- msg_params.erase(strings::time_to_destination);
- msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
- static_cast<int32_t>(hmi_apis::Common_TextFieldName::timeToDestination);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::time_to_destination];
- }
-
- app->set_tbt_show_command(msg_params);
- SendHMIRequest(hmi_apis::FunctionID::Navigation_ShowConstantTBT, &msg_params,
- true);
-}
-
-
-void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ShowConstantTBTRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::Navigation_ShowConstantTBT: {
- LOG4CXX_INFO(logger_, "Received Navigation_ShowConstantTBT event");
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
- if (mobile_apis::Result::INVALID_ENUM != result_) {
- result_code = result_;
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- break;
- }
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc
deleted file mode 100644
index d5539d148..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/show_constant_tbt_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/show_constant_tbt_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowConstantTBTResponse::ShowConstantTBTResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-ShowConstantTBTResponse::~ShowConstantTBTResponse() {
-}
-
-void ShowConstantTBTResponse::Run() {
- LOG4CXX_INFO(logger_, "ShowConstantTBTResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/show_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/show_request.cc
deleted file mode 100644
index bde57429e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/show_request.cc
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/show_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "utils/file_system.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowRequest::ShowRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- result_(mobile_apis::Result::INVALID_ENUM) {
-}
-
-ShowRequest::~ShowRequest() {
-}
-
-void ShowRequest::Run() {
- LOG4CXX_INFO(logger_, "ShowRequest::Run");
-
- ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
- ->application(
- (*message_)[strings::params][strings::connection_key].asInt());
-
- if (!app) {
- LOG4CXX_ERROR_EXT(
- logger_, "An application " << app->name() << " is not registered.");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- if (mobile_apis::Result::INVALID_DATA == processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, processing_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!");
- result_ = processing_result;
- }
- }
-
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImageFiles INVALID_DATA!");
- SendResponse(false, verification_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImageFiles UNSUPPORTED_RESOURCE!");
- result_ = verification_result;
- }
- }
-
- if (!CheckMenuFieldsNames()) {
- LOG4CXX_ERROR(logger_, "Bad menu name");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app->app_id();
-
- msg_params[hmi_request::show_strings] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- int32_t index = 0;
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::MAIN_FILED1);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_1];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_2)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::MAIN_FILED2);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_2];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::MAIN_FILED3);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_3];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::MAIN_FILED4);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::main_field_4];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::MEDIA_CLOCK);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::media_clock];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::media_track)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::MEDIA_TRACK);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::media_track];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) {
- msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
- static_cast<int32_t>(application_manager::TextFieldName::STATUS_BAR);
- msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
- (*message_)[strings::msg_params][strings::status_bar];
- ++index;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::alignment)) {
- msg_params[strings::alignment] =
- (*message_)[strings::msg_params][strings::alignment];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::graphic)) {
- msg_params[strings::graphic] =
- (*message_)[strings::msg_params][strings::graphic];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::secondary_graphic)) {
- msg_params[strings::secondary_graphic] =
- (*message_)[strings::msg_params][strings::secondary_graphic];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
- msg_params[strings::soft_buttons] =
- (*message_)[strings::msg_params][strings::soft_buttons];
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::custom_presets)) {
- msg_params[strings::custom_presets] =
- (*message_)[strings::msg_params][strings::custom_presets];
- }
-
- SendHMIRequest(hmi_apis::FunctionID::UI_Show, &msg_params, true);
-
- MessageSharedPtr persistentData = new smart_objects::SmartObject(msg_params);
- app->set_show_command(*persistentData);
-}
-
-void ShowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ShowRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::UI_Show: {
- LOG4CXX_INFO(logger_, "Received UI_Show event");
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
- if (mobile_apis::Result::INVALID_ENUM != result_) {
- result_code = result_;
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- break;
- }
- }
-}
-
-bool ShowRequest::CheckMenuFieldsNames() {
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) {
- const std::string& str = (*message_)[strings::msg_params]
- [strings::main_field_4].asString();
- if (!CheckSyntax(str, true)) {
- LOG4CXX_INFO(logger_, "main_field_4 syntax check failed");
- return false;
- }
- }
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) {
- const std::string& str = (*message_)[strings::msg_params]
- [strings::main_field_3].asString();
- if (!CheckSyntax(str, true)) {
- LOG4CXX_INFO(logger_, "main_field_3 syntax check failed");
- return false;
- }
- }
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_2)) {
- const std::string& str = (*message_)[strings::msg_params]
- [strings::main_field_2].asString();
- if (!CheckSyntax(str, true)) {
- LOG4CXX_INFO(logger_, "main_field_2 syntax check failed");
- return false;
- }
- }
- if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) {
- const std::string& str = (*message_)[strings::msg_params]
- [strings::main_field_1].asString();
- if (!CheckSyntax(str, true)) {
- LOG4CXX_INFO(logger_, "main_field_1 syntax check failed");
- return false;
- }
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/show_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/show_response.cc
deleted file mode 100644
index 1f9c59c6f..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/show_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/show_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-ShowResponse::ShowResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-ShowResponse::~ShowResponse() {
-}
-
-void ShowResponse::Run() {
- LOG4CXX_INFO(logger_, "ShowResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/slider_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/slider_request.cc
deleted file mode 100644
index 6e0646262..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/slider_request.cc
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/slider_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SliderRequest::SliderRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
- subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
-}
-
-SliderRequest::~SliderRequest() {
-}
-
-bool SliderRequest::Init() {
-
- /* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- }
-
- return true;
-}
-
-void SliderRequest::Run() {
- LOG4CXX_INFO(logger_, "SliderRequest::Run");
-
- ApplicationSharedPtr application =
- application_manager::ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if ((*message_)[strings::msg_params][strings::num_ticks].asInt()
- < (*message_)[strings::msg_params][strings::position].asInt()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- if ((*message_)[strings::msg_params].keyExists(strings::slider_footer)) {
- if (1 < (*message_)[strings::msg_params][strings::slider_footer].length()) {
- if ((*message_)[strings::msg_params][strings::num_ticks].asInt()
- != (*message_)[strings::msg_params]
- [strings::slider_footer].length()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
- }
- }
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
- msg_params[strings::app_id] = application->app_id();
-
- if (!(*message_)[strings::msg_params].keyExists(strings::timeout)) {
- msg_params[strings::timeout] = default_timeout_;
- }
-
- SendHMIRequest(hmi_apis::FunctionID::UI_Slider, &msg_params, true);
-}
-
-void SliderRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SliderRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- const event_engine::Event::EventID event_id = event.id();
- if (event_id == hmi_apis::FunctionID::UI_OnResetTimeout) {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
- ApplicationManagerImpl::instance()->updateRequestTimeout(connection_key(),
- correlation_id(),
- default_timeout());
- return;
- }
- if (event_id != hmi_apis::FunctionID::UI_Slider) {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- return;
- }
-
- //event_id == hmi_apis::FunctionID::UI_Slider:
- LOG4CXX_INFO(logger_, "Received UI_Slider event");
-
- const int response_code =
- message[strings::params][hmi_response::code].asInt();
-
- smart_objects::SmartObject response_msg_params = message[strings::msg_params];
- if (response_code == hmi_apis::Common_Result::ABORTED)
- //Copy slider_position info to msg_params section
- response_msg_params[strings::slider_position] =
- message[strings::params][strings::data][strings::slider_position];
-
- const bool is_response_success =
- (mobile_apis::Result::SUCCESS == response_code) ||
- //Aborted has slider_position data
- (mobile_apis::Result::ABORTED == response_code);
-
- SendResponse(is_response_success,
- mobile_apis::Result::eType(response_code),
- 0,
- &response_msg_params);
-}
-
-} // namespace commands
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/slider_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/slider_response.cc
deleted file mode 100644
index bfb6b0a1e..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/slider_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/slider_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SliderResponse::SliderResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SliderResponse::~SliderResponse() {
-}
-
-void SliderResponse::Run() {
- LOG4CXX_INFO(logger_, "SliderResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/speak_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/speak_request.cc
deleted file mode 100644
index 05e4b2310..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/speak_request.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/speak_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SpeakRequest::SpeakRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SpeakRequest::~SpeakRequest() {
-}
-
-void SpeakRequest::Run() {
- LOG4CXX_INFO(logger_, "SpeakRequest::Run");
-
- ApplicationSharedPtr app = application_manager::ApplicationManagerImpl::instance()
- ->application(connection_key());
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- (*message_)[strings::msg_params][strings::app_id] = app->app_id();
- SendHMIRequest(hmi_apis::FunctionID::TTS_Speak,
- &message_->getElement(strings::msg_params), true);
-}
-
-void SpeakRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SpeakRequest::on_event");
- switch (event.id()) {
- case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
-
- ProcessTTSSpeakResponse(event.smart_object());
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
- break;
- }
- }
-}
-
-void SpeakRequest::ProcessTTSSpeakResponse(
- const smart_objects::SmartObject& message) {
- LOG4CXX_INFO(logger_, "SpeakRequest::ProcessTTSSpeakResponse");
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
- bool result = false;
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS ==
- static_cast<hmi_apis::Common_Result::eType>(result_code)) {
- result = true;
- }
- (*message_)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::SpeakID;
-
- const char* return_info = NULL;
-
- if (result) {
- if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE ==
- static_cast<hmi_apis::Common_Result::eType>(result_code)) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info = std::string("Unsupported phoneme type sent in a prompt").c_str();
- }
- }
-
- SendResponse(result, static_cast<mobile_apis::Result::eType>(result_code),
- return_info, &(message[strings::msg_params]));
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/speak_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/speak_response.cc
deleted file mode 100644
index 92b85bbb8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/speak_response.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/speak_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SpeakResponse::SpeakResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SpeakResponse::~SpeakResponse() {
-}
-
-void SpeakResponse::Run() {
- LOG4CXX_INFO(logger_, "SpeakResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
deleted file mode 100644
index 9d014a25d..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/subscribe_button_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-SubscribeButtonRequest::SubscribeButtonRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SubscribeButtonRequest::~SubscribeButtonRequest() {
-}
-
-void SubscribeButtonRequest::Run() {
- LOG4CXX_INFO(logger_, "SubscribeButtonRequest::Run");
-
- uint32_t app_id = (*message_)[strings::params][strings::connection_key].asUInt();
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "APPLICATION_NOT_REGISTERED");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const uint32_t btn_id = ((*message_)[str::msg_params][str::button_name]
- .asUInt());
-
- if (app->IsSubscribedToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id))) {
- LOG4CXX_ERROR_EXT(logger_, "Already subscribed to button " << btn_id);
- SendResponse(false, mobile_apis::Result::IGNORED);
- return;
- }
-
- app->SubscribeToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id));
- SendResponse(true, mobile_apis::Result::SUCCESS);
-
- app->UpdateHash();
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc
deleted file mode 100644
index 6253f8ca3..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_button_response.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/subscribe_button_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SubscribeButtonResponse::SubscribeButtonResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SubscribeButtonResponse::~SubscribeButtonResponse() {
-}
-
-void SubscribeButtonResponse::Run() {
- LOG4CXX_INFO(logger_, "SubscribeButtonResponse::Run");
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- // TODO(DK): Some logic
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
deleted file mode 100644
index 8c427bea1..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/subscribe_vehicle_data_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-namespace commands {
-
-SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {
-}
-
-#ifdef QT_HMI
-namespace {
- struct Subrequest {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
- };
- Subrequest subrequests[] = {
- { hmi_apis::FunctionID::VehicleInfo_SubscribeGps, strings::gps},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed, strings::speed},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeRpm, strings::rpm},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel, strings::fuel_level},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State, strings::fuel_level_state},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption, strings::instant_fuel_consumption},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature, strings::external_temp},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeVin, strings::vin},
- { hmi_apis::FunctionID::VehicleInfo_SubscribePrndl, strings::prndl},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure, strings::tire_pressure},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer, strings::odometer},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus, strings::belt_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation, strings::body_information},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus, strings::device_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking, strings::driver_braking},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus, strings::wiper_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus, strings::head_lamp_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque, strings::engine_torque},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition, strings::acc_pedal_pos},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle, strings::steering_wheel_angle},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo, strings::e_call_info},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus, strings::airbag_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent, strings::emergency_event},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus, strings::cluster_mode_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey, strings::my_key},
- };
-}
-#endif // #ifdef QT_HMI
-
-void SubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- CommandRequestImpl::connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- // counter for items to subscribe
- int32_t items_to_subscribe = 0;
- // counter for subscribed items by application
- int32_t subscribed_items = 0;
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = app->app_id();
-
- for (; vehicle_data.end() != it; ++it) {
- std::string key_name = it->first;
- if ((*message_)[strings::msg_params].keyExists(key_name)) {
- bool is_key_enabled = (*message_)[strings::msg_params][key_name].asBool();
- if (is_key_enabled) {
- ++items_to_subscribe;
- msg_params[key_name] = is_key_enabled;
-
- VehicleDataType key_type = it->second;
- if (app->SubscribeToIVI(static_cast<uint32_t>(key_type))) {
- ++subscribed_items;
- }
- }
- }
- }
-
- if (0 == items_to_subscribe) {
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "No data in the request");
- return;
- } else if (0 == subscribed_items) {
- SendResponse(false,
- mobile_apis::Result::IGNORED,
- "Already subscribed on provided VehicleData");
- return;
- }
-#ifdef WEB_HMI
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
- &msg_params, true);
-#endif // #ifdef WEB_HMI
-
-#ifdef QT_HMI
- //Generate list of subrequests
- for (int i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
- const Subrequest& sr = subrequests[i];
- if (true == (*message_)[strings::msg_params].keyExists(sr.str)
- && true == (*message_)[strings::msg_params][sr.str].asBool()) {
- HmiRequest hmi_request;
- hmi_request.str = sr.str;
- hmi_request.func_id = sr.func_id;
- hmi_request.complete = false;
- hmi_requests_.push_back(hmi_request);
- }
- }
- LOG4CXX_INFO(logger_, hmi_requests_.size() << " requests are going to be sent to HMI");
-
- //Send subrequests
- for (HmiRequests::const_iterator it = hmi_requests_.begin(); it != hmi_requests_.end(); ++it)
- SendHMIRequest(it->func_id, &msg_params, true);
-#endif // #ifdef QT_HMI
-}
-
-void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::on_event");
-
- const smart_objects::SmartObject& message = event.smart_object();
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- CommandRequestImpl::connection_key());
-
-#ifdef WEB_HMI
- hmi_apis::Common_Result::eType hmi_result =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result =
- hmi_result == hmi_apis::Common_Result::SUCCESS;
-
- mobile_apis::Result::eType result_code =
- hmi_result == hmi_apis::Common_Result::SUCCESS
- ? mobile_apis::Result::SUCCESS
- : static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- const char* return_info = NULL;
- if (result) {
- if (IsAnythingAlreadySubscribed()) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info =
- std::string("Unsupported phoneme type sent in a prompt").c_str();
- }
- }
-
- SendResponse(result,
- result_code,
- return_info,
- &(message[strings::msg_params]));
- app->UpdateHash();
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
- for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- HmiRequest & hmi_request = *it;
- if (hmi_request.func_id == event.id()) {
- hmi_request.status =
- static_cast<hmi_apis::Common_Result::eType>(message[strings::params][hmi_response::code]
- .asInt());
- if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
- hmi_request.value = message[strings::msg_params][hmi_request.str];
- hmi_request.complete = true;
- break;
- }
- }
- bool all_complete = true;
- bool any_arg_success = false;
- mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- if (!it->complete) {
- all_complete = false;
- break;
- }
- if (hmi_apis::Common_Result::SUCCESS != it->status) {
- if (mobile_api::Result::SUCCESS == status) {
- status = static_cast<mobile_apis::Result::eType>(it->status);
- } else if (status
- != static_cast<mobile_apis::Result::eType>(it->status)) {
- status = mobile_api::Result::eType::GENERIC_ERROR;
- }
- LOG4CXX_TRACE(logger_, "Status from HMI: " << it->status <<
- ", so response status become " << status);
- } else {
- any_arg_success = true;
- }
- }
-
- if (all_complete) {
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- if (any_arg_success) {
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- response_params[it->str] = it->value;
- }
- }
- LOG4CXX_INFO(logger_, "All HMI requests are complete");
- SendResponse(any_arg_success, status, NULL, &response_params);
- app->UpdateHash();
- }
-#endif // #ifdef QT_HMI
-}
-
-bool SubscribeVehicleDataRequest::IsAnythingAlreadySubscribed() {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataRequest::Run");
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[strings::msg_params].keyExists(it->first)) {
-
- if ((*message_)[strings::msg_params][it->first]
- [strings::result_code].asInt() ==
- hmi_apis::Common_VehicleDataResultCode::
- VDRC_DATA_ALREADY_SUBSCRIBED) {
- return true;
- }
- }
- }
-
- return false;
-}
-
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc
deleted file mode 100644
index 972a65418..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/subscribe_vehicle_data_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-namespace commands {
-
-SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {
-}
-
-void SubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "SubscribeVehicleDataResponse::Run");
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_request.cc
deleted file mode 100644
index 4fae27be5..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_request.cc
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/sync_pdata_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-#include "encryption/Base64.h"
-
-namespace application_manager {
-
-namespace commands {
-
-const std::string SyncPDataRequest::TEMPORARY_HARDCODED_FILENAME =
- "policy_sync_data.dat";
-const std::string SyncPDataRequest::TEMPORARY_HARDCODED_FOLDERNAME =
- "policies";
-
-SyncPDataRequest::SyncPDataRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SyncPDataRequest::~SyncPDataRequest() {
-}
-
-void SyncPDataRequest::Run() {
- LOG4CXX_INFO(logger_, "SyncPDataRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_ERROR(logger_, "Binary data is missed!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- const std::string& sync_file_name = TEMPORARY_HARDCODED_FILENAME;
-
- const std::vector<uint8_t> file_data =
- (*message_)[strings::params][strings::binary_data].asBinary();
-
- std::string relative_file_path = file_system::CreateDirectory(
- TEMPORARY_HARDCODED_FOLDERNAME);
- relative_file_path += "/";
- relative_file_path += sync_file_name;
-
- mobile_apis::Result::eType save_result =
- ApplicationManagerImpl::instance()->SaveBinary(
- application->name(),
- file_data,
- relative_file_path);
-
- switch(save_result) {
- case mobile_apis::Result::SUCCESS:
- SendResponse(true, save_result);
- break;
- default:
- SendResponse(false, save_result);
- break;
- }
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_response.cc
deleted file mode 100644
index 751fd9eb6..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/sync_pdata_response.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/sync_pdata_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SyncPDataResponse::SyncPDataResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SyncPDataResponse::~SyncPDataResponse() {
-}
-
-void SyncPDataResponse::Run() {
- LOG4CXX_INFO(logger_, "SyncPDataResponse::Run");
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/system_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/system_request.cc
deleted file mode 100644
index 270907e55..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/system_request.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
-Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/system_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SystemRequest::SystemRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-SystemRequest::~SystemRequest() {
-}
-
-void SystemRequest::Run() {
- LOG4CXX_INFO(logger_, "SystemRequest::Run");
-
- ApplicationSharedPtr application = ApplicationManagerImpl::instance()->application(
- connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_ERROR(logger_, "Binary data is missed!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
- SendResponse(true, mobile_apis::Result::SUCCESS);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/system_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/system_response.cc
deleted file mode 100644
index e77ab0845..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/system_response.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/system_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-SystemResponse::SystemResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-SystemResponse::~SystemResponse() {
-}
-
-void SystemResponse::Run() {
- LOG4CXX_INFO(logger_, "SystemResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
deleted file mode 100644
index 0fc1d1fa0..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/unregister_app_interface_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void UnregisterAppInterfaceRequest::Run() {
- LOG4CXX_INFO(logger_, "UnregisterAppInterfaceRequest::Run");
-
- ApplicationManagerImpl* app_manager = ApplicationManagerImpl::instance();
-
- if (!app_manager->application(connection_key())) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- app_manager->UnregisterApplication(connection_key());
- SendResponse(true, mobile_apis::Result::SUCCESS);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
deleted file mode 100644
index 8ef0eb3ed..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/unregister_app_interface_response.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/unregister_app_interface_response.h"
-
-namespace application_manager {
-
-namespace commands {
-
-void UnregisterAppInterfaceResponse::Run() {
- LOG4CXX_INFO(logger_, "UnregisterAppInterfaceResponse::Run");
-
- SendResponse((*message_)[strings::msg_params][strings::success].asBool());
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc
deleted file mode 100644
index f22d1c0a2..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_request.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/unsubscribe_button_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-namespace str = strings;
-
-UnsubscribeButtonRequest::UnsubscribeButtonRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {
-}
-
-void UnsubscribeButtonRequest::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeButtonRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[str::params][str::connection_key].asUInt());
-
- if (!app) {
- LOG4CXX_ERROR_EXT(logger_, "APPLICATION_NOT_REGISTERED");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- const uint32_t btn_id = (*message_)[str::msg_params][str::button_name]
- .asUInt();
-
- if (!app->IsSubscribedToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id))) {
- LOG4CXX_ERROR_EXT(logger_, "App doesn't subscibe to button " << btn_id);
- SendResponse(false, mobile_apis::Result::IGNORED);
- return;
- }
-
- app->UnsubscribeFromButton(static_cast<mobile_apis::ButtonName::eType>(btn_id));
- SendResponse(true, mobile_apis::Result::SUCCESS);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc
deleted file mode 100644
index 1331eac27..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_button_response.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/unsubscribe_button_response.h"
-#include "application_manager/application_manager_impl.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UnsubscribeButtonResponse::UnsubscribeButtonResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {
-}
-
-void UnsubscribeButtonResponse::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeButtonResponse::Run");
-
- namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- // TODO(DK): Some logic
- SendResponse(true);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
deleted file mode 100644
index 5d2e33015..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/command_impl.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-#include "application_manager/smart_object_keys.h"
-
-namespace application_manager {
-namespace commands {
-
-UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
- const MessageSharedPtr& message)
- : CommandRequestImpl(message) {
-}
-
-UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {
-}
-
-#ifdef QT_HMI
-namespace {
- struct Subrequest {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
- };
- Subrequest subrequests[] = {
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps, strings::gps},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed, strings::speed},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm, strings::rpm},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel, strings::fuel_level},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State, strings::fuel_level_state},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption, strings::instant_fuel_consumption},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature, strings::external_temp},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin, strings::vin},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl, strings::prndl},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure, strings::tire_pressure},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer, strings::odometer},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus, strings::belt_status},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation, strings::body_information},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus, strings::device_status},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking, strings::driver_braking},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus, strings::wiper_status},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus, strings::head_lamp_status},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque, strings::engine_torque},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition, strings::acc_pedal_pos},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle, strings::steering_wheel_angle},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo, strings::e_call_info},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus, strings::airbag_status},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent, strings::emergency_event},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus, strings::cluster_mode_status},
- { hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey, strings::my_key},
- };
-}
-#endif // #ifdef QT_HMI
-
-void UnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- CommandRequestImpl::connection_key());
-
- if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
- // counter for items to subscribe
- int32_t items_to_unsubscribe = 0;
- // counter for subscribed items by application
- int32_t unsubscribed_items = 0;
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::app_id] = app->app_id();
-
- for (; vehicle_data.end() != it; ++it) {
- std::string key_name = it->first;
- if ((*message_)[strings::msg_params].keyExists(key_name)) {
- bool is_key_enabled = (*message_)[strings::msg_params][key_name].asBool();
- if (is_key_enabled) {
- ++items_to_unsubscribe;
- msg_params[key_name] = is_key_enabled;
-
- VehicleDataType key_type = it->second;
- if (app->UnsubscribeFromIVI(static_cast<uint32_t>(key_type))) {
- ++unsubscribed_items;
- }
- }
- }
- }
-
- if (0 == items_to_unsubscribe) {
- SendResponse(false, mobile_apis::Result::INVALID_DATA,
- "No data in the request", &msg_params);
- return;
- } else if (0 == unsubscribed_items) {
- SendResponse(false, mobile_apis::Result::IGNORED,
- "Was not subscribed on any VehicleData", &msg_params);
- return;
- }
-
-#ifdef WEB_HMI
- SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
- &msg_params, true);
-#endif // #ifdef WEB_HMI
-
-#ifdef QT_HMI
- //Generate list of subrequests
- for (int i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) {
- const Subrequest& sr = subrequests[i];
- if (true == (*message_)[strings::msg_params].keyExists(sr.str)
- && true == (*message_)[strings::msg_params][sr.str].asBool()) {
- HmiRequest hmi_request;
- hmi_request.str = sr.str;
- hmi_request.func_id = sr.func_id;
- hmi_request.complete = false;
- hmi_requests_.push_back(hmi_request);
- }
- }
- LOG4CXX_INFO(logger_,
- hmi_requests_.size() << " requests are going to be sent to HMI");
-
- //Send subrequests
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it)
- SendHMIRequest(it->func_id, &msg_params, true);
-#endif // #ifdef QT_HMI
-}
-
-void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::on_event");
-
- const smart_objects::SmartObject& message = event.smart_object();
-
-#ifdef WEB_HMI
- hmi_apis::Common_Result::eType hmi_result =
- static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result =
- hmi_result == hmi_apis::Common_Result::SUCCESS;
-
- mobile_apis::Result::eType result_code =
- hmi_result == hmi_apis::Common_Result::SUCCESS
- ? mobile_apis::Result::SUCCESS
- : static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- const char* return_info = NULL;
-
- if (result) {
- if (IsAnythingAlreadyUnsubscribed()) {
- result_code = mobile_apis::Result::WARNINGS;
- return_info =
- std::string("Unsupported phoneme type sent in a prompt").c_str();
- }
- }
-
- SendResponse(result, result_code, return_info,
- &(message[strings::msg_params]));
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
- for (HmiRequests::iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- HmiRequest & hmi_request = *it;
- if (hmi_request.func_id == event.id()) {
- hmi_request.status =
- static_cast<hmi_apis::Common_Result::eType>(message[strings::params][hmi_response::code]
- .asInt());
- if (hmi_apis::Common_Result::SUCCESS == hmi_request.status)
- hmi_request.value = message[strings::msg_params][hmi_request.str];
- hmi_request.complete = true;
- break;
- }
- }
- bool all_complete = true;
- bool any_arg_success = false;
- mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS;
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- if (!it->complete) {
- all_complete = false;
- break;
- }
- if (hmi_apis::Common_Result::SUCCESS != it->status) {
- if (mobile_api::Result::SUCCESS == status) {
- status = static_cast<mobile_apis::Result::eType>(it->status);
- } else if (status
- != static_cast<mobile_apis::Result::eType>(it->status)) {
- status = mobile_api::Result::eType::GENERIC_ERROR;
- } LOG4CXX_TRACE(logger_, "Status from HMI: " << it->status <<
- ", so response status become " << status);
- } else {
- any_arg_success = true;
- }
- }
- if (all_complete) {
- smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- if (any_arg_success) {
- for (HmiRequests::const_iterator it = hmi_requests_.begin();
- it != hmi_requests_.end(); ++it) {
- response_params[it->str] = it->value;
- }
- }
- LOG4CXX_INFO(logger_, "All HMI requests are complete");
- SendResponse(any_arg_success, status, NULL, &response_params);
- }
-#endif // #ifdef QT_HMI
-}
-
-bool UnsubscribeVehicleDataRequest::IsAnythingAlreadyUnsubscribed() {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataRequest::Run");
-
- const VehicleData& vehicle_data = MessageHelper::vehicle_data();
- VehicleData::const_iterator it = vehicle_data.begin();
-
- for (; vehicle_data.end() != it; ++it) {
- if (true == (*message_)[strings::msg_params].keyExists(it->first)) {
-
- if ((*message_)[strings::msg_params][it->first]
- [strings::result_code].asInt() ==
- hmi_apis::Common_VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED) {
- return true;
- }
- }
- }
-
- return false;
-}
-
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc
deleted file mode 100644
index 60f7077da..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_response.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_response.h"
-
-namespace application_manager {
-namespace commands {
-
-UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
- const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {
-}
-
-void UnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_INFO(logger_, "UnsubscribeVehicleDataResponse::Run");
-
- namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
- // check if response false
- if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
- if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
- SendResponse(false);
- return;
- }
- }
-
- // TODO(DK): Some logic
- SendResponse(true);
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
deleted file mode 100644
index f2077ab41..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include "application_manager/commands/mobile/update_turn_list_request.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "application_manager/message_helper.h"
-#include "interfaces/MOBILE_API.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateTurnListRequest::UpdateTurnListRequest(const MessageSharedPtr& message)
- : CommandRequestImpl(message),
- result_(mobile_apis::Result::INVALID_ENUM) {
-}
-
-UpdateTurnListRequest::~UpdateTurnListRequest() {
-}
-
-void UpdateTurnListRequest::Run() {
- LOG4CXX_INFO(logger_, "UpdateTurnListRequest::Run");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(
- (*message_)[strings::params][strings::connection_key].asUInt());
-
- if (!app) {
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
- return;
- }
-
- mobile_apis::Result::eType processing_result =
- MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != processing_result) {
- if (mobile_apis::Result::INVALID_DATA == processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, processing_result);
- return;
- }
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) {
- LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!");
- result_ = processing_result;
- }
- }
-
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyImageFiles((*message_)[strings::msg_params], app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_ERROR_EXT(
- logger_,
- "MessageHelper::VerifyImageFiles return " << verification_result);
- SendResponse(false, verification_result);
- return;
- }
-
- if (!CheckTurnListArray()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
- SendResponse(false, mobile_apis::Result::INVALID_DATA);
- return;
- }
-
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
- for (uint32_t i = 0; i < msg_params[strings::turn_list].length(); ++i) {
- if (msg_params[strings::turn_list][i].keyExists(hmi_request::navi_text)) {
- std::string navigation_text =
- msg_params[strings::turn_list][i][hmi_request::navi_text].asString();
- msg_params[strings::turn_list][i].erase(hmi_request::navi_text);
- msg_params[strings::turn_list]
- [i][hmi_request::navi_text][hmi_request::field_name] =
- static_cast<int>(hmi_apis::Common_TextFieldName::turnText);
- msg_params[strings::turn_list]
- [i][hmi_request::navi_text][hmi_request::field_text] =
- navigation_text;
- }
- }
-
- msg_params[strings::app_id] = app->app_id();
-
-
- SendHMIRequest(hmi_apis::FunctionID::Navigation_UpdateTurnList, &msg_params,
- true);
-}
-
-void UpdateTurnListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "UpdateTurnListRequest::on_event");
- const smart_objects::SmartObject& message = event.smart_object();
-
- switch (event.id()) {
- case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
- LOG4CXX_INFO(logger_, "Received Navigation_UpdateTurnList event");
-
- mobile_apis::Result::eType result_code =
- static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
-
- bool result = mobile_apis::Result::SUCCESS == result_code;
- if (mobile_apis::Result::INVALID_ENUM != result_) {
- result_code = result_;
- }
-
- SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
- break;
- }
- default: {
- LOG4CXX_ERROR(logger_,"Received unknown event" << event.id());
- break;
- }
- }
-}
-
-bool UpdateTurnListRequest::CheckTurnListArray() {
- if (!(*message_)[strings::msg_params].keyExists(strings::turn_list)) {
- return false;
- }
-
- int32_t length = (*message_)[strings::msg_params][strings::turn_list].length();
- if (0 == length) {
- return false;
- }
- for (int32_t i = 0; i < length; ++i) {
- if (!((*message_)[strings::msg_params][strings::turn_list][i].
- keyExists(hmi_request::navi_text)) &&
- !((*message_)[strings::msg_params][strings::turn_list][i].
- keyExists(strings::turn_icon))) {
- return false;
- }
- }
- return true;
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc b/SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc
deleted file mode 100644
index ec1e0bce8..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/mobile/update_turn_list_response.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/mobile/update_turn_list_response.h"
-#include "application_manager/application_manager_impl.h"
-#include "interfaces/HMI_API.h"
-
-namespace application_manager {
-
-namespace commands {
-
-UpdateTurnListResponse::UpdateTurnListResponse(const MessageSharedPtr& message)
- : CommandResponseImpl(message) {
-}
-
-UpdateTurnListResponse::~UpdateTurnListResponse() {
-}
-
-void UpdateTurnListResponse::Run() {
- LOG4CXX_INFO(logger_, "UpdateTurnListResponse::Run");
-
- ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
-}
-
-} // namespace commands
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/commands/pending.cc b/SDL_Core/src/components/application_manager/src/commands/pending.cc
deleted file mode 100644
index 0c04464af..000000000
--- a/SDL_Core/src/components/application_manager/src/commands/pending.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/commands/pending.h"
-
-namespace application_manager {
-
-namespace commands {
-
-
-Pending::Pending()
-: last_(hmi_apis::FunctionID::INVALID_ENUM) {
-}
-
-Pending::~Pending() {
-}
-
-void Pending::Add(hmi_apis::FunctionID::eType id) {
- sync_primitives::AutoLock L(lock_);
- pending_.insert(id);
-}
-
-void Pending::Remove(hmi_apis::FunctionID::eType id) {
- sync_primitives::AutoLock L(lock_);
- pending_.erase(id);
-
- if (pending_.empty()) {
- last_ = id;
- }
-}
-
-bool Pending::IsFinal(hmi_apis::FunctionID::eType id) {
- return id == last_;
-}
-
-} // namespace commands
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/event_engine/event.cc b/SDL_Core/src/components/application_manager/src/event_engine/event.cc
deleted file mode 100644
index e454025df..000000000
--- a/SDL_Core/src/components/application_manager/src/event_engine/event.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-
-namespace application_manager {
-namespace event_engine {
-
-Event::Event(const EventID& id)
-: id_(id)
-, response_so_() {
-}
-
-Event::~Event() {
-}
-
-void Event::raise() {
- EventDispatcher::instance()->raise_event(*this);
-}
-
-void Event::set_smart_object(smart_objects::SmartObject& so) {
- response_so_ = so;
-}
-
-}
-}
diff --git a/SDL_Core/src/components/application_manager/src/event_engine/event_dispatcher.cc b/SDL_Core/src/components/application_manager/src/event_engine/event_dispatcher.cc
deleted file mode 100644
index a552ef622..000000000
--- a/SDL_Core/src/components/application_manager/src/event_engine/event_dispatcher.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "interfaces/HMI_API.h"
-#include "application_manager/event_engine/event_observer.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-
-namespace application_manager {
-namespace event_engine {
-using namespace sync_primitives;
-
-EventDispatcher::EventDispatcher()
- : observers_() {
-}
-
-EventDispatcher::~EventDispatcher() {
-}
-
-void EventDispatcher::raise_event(const Event& event) {
- // create local list
- ObserverList list;
- {
- AutoLock auto_lock(state_lock_);
- // check if event is notification
- if (hmi_apis::messageType::notification == event.smart_object_type()) {
-
- //ObserversMap iterator
- ObserversMap::iterator it = observers_[event.id()].begin();
- for (; observers_[event.id()].end() != it; ++it) {
- list = it->second;
- }
- }
-
- if (hmi_apis::messageType::response == event.smart_object_type()
- || hmi_apis::messageType::error_response == event.smart_object_type()) {
- list = observers_[event.id()][event.smart_object_correlation_id()];
- }
- }
-
- // Call observers
- ObserverList::iterator observers = list.begin();
- for (; list.end() != observers; ++observers) {
- (*observers)->on_event(event);
- }
-}
-
-void EventDispatcher::add_observer(const Event::EventID& event_id,
- int32_t hmi_correlation_id,
- EventObserver* const observer) {
- AutoLock auto_lock(state_lock_);
- observers_[event_id][hmi_correlation_id].push_back(observer);
-}
-
-void EventDispatcher::remove_observer(const Event::EventID& event_id,
- EventObserver* const observer) {
- AutoLock auto_lock(state_lock_);
- ObserversMap::iterator it = observers_[event_id].begin();
- for (; observers_[event_id].end() != it; ++it) {
-
- //ObserverList iterator
- ObserverList::iterator observer_it = it->second.begin();
- while (it->second.end() != observer_it) {
- if (observer->id() == (*observer_it)->id()) {
- observer_it = it->second.erase(observer_it);
- } else {
- ++observer_it;
- }
- }
- }
-}
-
-void EventDispatcher::remove_observer(EventObserver* const observer) {
- AutoLock auto_lock(state_lock_);
- EventObserverMap::iterator event_map = observers_.begin();
- for (; observers_.end() != event_map; ++event_map) {
-
- ObserversMap::iterator it = event_map->second.begin();
- for (; event_map->second.end() != it; ++it) {
-
- //ObserverList iterator
- ObserverList::iterator observer_it = it->second.begin();
- while (it->second.end() != observer_it) {
- if (observer->id() == (*observer_it)->id()) {
- observer_it = it->second.erase(observer_it);
- } else {
- ++observer_it;
- }
- }
- }
- }
-}
-
-}
-}
diff --git a/SDL_Core/src/components/application_manager/src/event_engine/event_observer.cc b/SDL_Core/src/components/application_manager/src/event_engine/event_observer.cc
deleted file mode 100644
index c6d81529f..000000000
--- a/SDL_Core/src/components/application_manager/src/event_engine/event_observer.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/event_engine/event.h"
-#include "application_manager/event_engine/event_observer.h"
-
-namespace application_manager {
-namespace event_engine {
-
-EventObserver::EventObserver()
- : id_(0) {
- //Get unique id based on this
- id_ = reinterpret_cast<unsigned long>(this);
-}
-
-EventObserver::~EventObserver() {
- unsubscribe_from_all_events();
-}
-
-void EventObserver::subscribe_on_event(const Event::EventID& event_id,
- int32_t hmi_correlation_id) {
- EventDispatcher::instance()->add_observer(event_id, hmi_correlation_id, this);
-}
-
-void EventObserver::unsubscribe_from_event(const Event::EventID& event_id) {
- EventDispatcher::instance()->remove_observer(event_id, this);
-}
-
-void EventObserver::unsubscribe_from_all_events() {
- EventDispatcher::instance()->remove_observer(this);
-}
-
-}
-}
diff --git a/SDL_Core/src/components/application_manager/src/hmi_capabilities.cc b/SDL_Core/src/components/application_manager/src/hmi_capabilities.cc
deleted file mode 100644
index d62b0f609..000000000
--- a/SDL_Core/src/components/application_manager/src/hmi_capabilities.cc
+++ /dev/null
@@ -1,691 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <map>
-#include "json/json.h"
-#include "utils/file_system.h"
-#include "interfaces/HMI_API.h"
-#include "config_profile/profile.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/hmi_capabilities.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-
-namespace application_manager {
-
-std::map<std::string, hmi_apis::Common_Language::eType> languages_enum_values =
-{
- {"EN_US", hmi_apis::Common_Language::EN_US},
- {"ES_MX", hmi_apis::Common_Language::ES_MX},
- {"FR_CA", hmi_apis::Common_Language::FR_CA},
- {"DE_DE", hmi_apis::Common_Language::DE_DE},
- {"ES_ES", hmi_apis::Common_Language::ES_ES},
- {"EN_GB", hmi_apis::Common_Language::EN_GB},
- {"TR_TR", hmi_apis::Common_Language::RU_RU},
- {"TR_TR", hmi_apis::Common_Language::TR_TR},
- {"PL_PL", hmi_apis::Common_Language::PL_PL},
- {"FR_FR", hmi_apis::Common_Language::FR_FR},
- {"IT_IT", hmi_apis::Common_Language::IT_IT},
- {"SV_SE", hmi_apis::Common_Language::SV_SE},
- {"PT_PT", hmi_apis::Common_Language::PT_PT},
- {"EN_AU", hmi_apis::Common_Language::NL_NL},
- {"EN_AU", hmi_apis::Common_Language::EN_AU},
- {"ZH_CN", hmi_apis::Common_Language::ZH_CN},
- {"ZH_TW", hmi_apis::Common_Language::ZH_TW},
- {"JA_JP", hmi_apis::Common_Language::JA_JP},
- {"AR_SA", hmi_apis::Common_Language::AR_SA},
- {"KO_KR", hmi_apis::Common_Language::KO_KR},
- {"PT_BR", hmi_apis::Common_Language::PT_BR},
- {"CS_CZ", hmi_apis::Common_Language::CS_CZ},
- {"DA_DK", hmi_apis::Common_Language::DA_DK},
- {"NO_NO", hmi_apis::Common_Language::NO_NO}
-};
-
-std::map<std::string, hmi_apis::Common_VrCapabilities::eType> vr_enum_capabilities =
-{
- {"TEXT", hmi_apis::Common_VrCapabilities::VR_TEXT}
-};
-
-std::map<std::string, hmi_apis::Common_ButtonName::eType> button_enum_name =
-{
- {"OK" , hmi_apis::Common_ButtonName::OK},
- {"SEEKLEFT" , hmi_apis::Common_ButtonName::SEEKLEFT},
- {"SEEKRIGHT" , hmi_apis::Common_ButtonName::SEEKRIGHT},
- {"TUNEUP" , hmi_apis::Common_ButtonName::TUNEUP},
- {"TUNEDOWN" , hmi_apis::Common_ButtonName::TUNEDOWN},
- {"PRESET_0" , hmi_apis::Common_ButtonName::PRESET_0},
- {"PRESET_1" , hmi_apis::Common_ButtonName::PRESET_1},
- {"PRESET_2" , hmi_apis::Common_ButtonName::PRESET_2},
- {"PRESET_3" , hmi_apis::Common_ButtonName::PRESET_3},
- {"PRESET_4" , hmi_apis::Common_ButtonName::PRESET_4},
- {"PRESET_5" , hmi_apis::Common_ButtonName::PRESET_5},
- {"PRESET_6" , hmi_apis::Common_ButtonName::PRESET_6},
- {"PRESET_7" , hmi_apis::Common_ButtonName::PRESET_7},
- {"PRESET_8" , hmi_apis::Common_ButtonName::PRESET_8},
- {"PRESET_9" , hmi_apis::Common_ButtonName::PRESET_9},
- {"CUSTOM_BUTTON" , hmi_apis::Common_ButtonName::CUSTOM_BUTTON},
- {"SEARCH" , hmi_apis::Common_ButtonName::SEARCH},
-
-};
-
-std::map<std::string, hmi_apis::Common_TextFieldName::eType> text_fields_enum_name =
-{
- {"mainField1", hmi_apis::Common_TextFieldName::mainField1},
- {"mainField2", hmi_apis::Common_TextFieldName::mainField2},
- {"mainField3", hmi_apis::Common_TextFieldName::mainField3},
- {"mainField4", hmi_apis::Common_TextFieldName::mainField4},
- {"statusBar" , hmi_apis::Common_TextFieldName::statusBar},
- {"mediaClock", hmi_apis::Common_TextFieldName::mediaClock},
- {"mediaTrack", hmi_apis::Common_TextFieldName::mediaTrack},
- {"alertText1", hmi_apis::Common_TextFieldName::alertText1},
- {"alertText2", hmi_apis::Common_TextFieldName::alertText2},
- {"alertText3", hmi_apis::Common_TextFieldName::alertText3},
- {"scrollableMessageBody" , hmi_apis::Common_TextFieldName::scrollableMessageBody},
- {"initialInteractionText", hmi_apis::Common_TextFieldName::initialInteractionText},
- {"navigationText1" , hmi_apis::Common_TextFieldName::navigationText1},
- {"navigationText2" , hmi_apis::Common_TextFieldName::navigationText2},
- {"ETA" , hmi_apis::Common_TextFieldName::ETA},
- {"totalDistance" , hmi_apis::Common_TextFieldName::totalDistance},
- {"audioPassThruDisplayText1", hmi_apis::Common_TextFieldName::audioPassThruDisplayText1},
- {"audioPassThruDisplayText2", hmi_apis::Common_TextFieldName::audioPassThruDisplayText2},
- {"sliderHeader" , hmi_apis::Common_TextFieldName::sliderHeader},
- {"sliderFooter" , hmi_apis::Common_TextFieldName::sliderFooter},
- {"notificationText" , hmi_apis::Common_TextFieldName::notificationText},
- {"menuName" , hmi_apis::Common_TextFieldName::menuName},
- {"secondaryText" , hmi_apis::Common_TextFieldName::secondaryText},
- {"tertiaryText" , hmi_apis::Common_TextFieldName::tertiaryText},
- {"timeToDestination", hmi_apis::Common_TextFieldName::timeToDestination},
- {"turnText" , hmi_apis::Common_TextFieldName::turnText}
-};
-
-std::map<std::string, hmi_apis::Common_MediaClockFormat::eType> media_clock_enum_name =
-{
- {"CLOCK1" , hmi_apis::Common_MediaClockFormat::CLOCK1},
- {"CLOCK2" , hmi_apis::Common_MediaClockFormat::CLOCK2},
- {"CLOCK3" , hmi_apis::Common_MediaClockFormat::CLOCK3},
- {"CLOCKTEXT1", hmi_apis::Common_MediaClockFormat::CLOCKTEXT1},
- {"CLOCKTEXT2", hmi_apis::Common_MediaClockFormat::CLOCKTEXT2},
- {"CLOCKTEXT3", hmi_apis::Common_MediaClockFormat::CLOCKTEXT3},
- {"CLOCKTEXT4", hmi_apis::Common_MediaClockFormat::CLOCKTEXT4},
-};
-
-std::map<std::string, hmi_apis::Common_ImageType::eType> image_type_enum =
-{
- {"STATIC" , hmi_apis::Common_ImageType::STATIC},
- {"DYNAMIC", hmi_apis::Common_ImageType::DYNAMIC}
-};
-
-std::map<std::string, hmi_apis::Common_SamplingRate::eType> sampling_rate_enum =
-{
- {"8KHZ" , hmi_apis::Common_SamplingRate::RATE_8KHZ},
- {"16KHZ", hmi_apis::Common_SamplingRate::RATE_16KHZ},
- {"22KHZ", hmi_apis::Common_SamplingRate::RATE_22KHZ},
- {"44KHZ", hmi_apis::Common_SamplingRate::RATE_44KHZ}
-};
-
-std::map<std::string, hmi_apis::Common_BitsPerSample::eType> bit_per_sample_enum =
-{
- {"RATE_8_BIT", hmi_apis::Common_BitsPerSample::RATE_8_BIT},
- {"RATE_16_BIT", hmi_apis::Common_BitsPerSample::RATE_16_BIT}
-};
-
-std::map<std::string, hmi_apis::Common_AudioType::eType> audio_type_enum =
-{
- {"PCM", hmi_apis::Common_AudioType::PCM}
-};
-
-std::map<std::string, hmi_apis::Common_HmiZoneCapabilities::eType> hmi_zone_enum =
-{
- {"FRONT", hmi_apis::Common_HmiZoneCapabilities::FRONT},
- {"BACK", hmi_apis::Common_HmiZoneCapabilities::BACK},
-};
-
-
-
-HMICapabilities::HMICapabilities(ApplicationManagerImpl* const app_mngr)
- : is_vr_cooperating_(false),
- is_tts_cooperating_(false),
- is_ui_cooperating_(false),
- is_navi_cooperating_(false),
- is_ivi_cooperating_(false),
- is_vr_ready_response_recieved_(false),
- is_tts_ready_response_recieved_(false),
- is_ui_ready_response_recieved_(false),
- is_navi_ready_response_recieved_(false),
- is_ivi_ready_response_recieved_(false),
- ui_language_(hmi_apis::Common_Language::INVALID_ENUM),
- vr_language_(hmi_apis::Common_Language::INVALID_ENUM),
- tts_language_(hmi_apis::Common_Language::INVALID_ENUM),
- vehicle_type_(NULL),
- attenuated_supported_(false),
- ui_supported_languages_(NULL),
- tts_supported_languages_(NULL),
- vr_supported_languages_(NULL),
- display_capabilities_(NULL),
- hmi_zone_capabilities_(NULL),
- soft_buttons_capabilities_(NULL),
- button_capabilities_(NULL),
- preset_bank_capabilities_(NULL),
- vr_capabilities_(NULL),
- speech_capabilities_(NULL),
- audio_pass_thru_capabilities_(NULL),
- app_mngr_(app_mngr),
- prerecorded_speech_(NULL) {
-
- if (false == profile::Profile::instance()->launch_hmi()) {
- if (load_capabilities_from_file()) {
- is_vr_ready_response_recieved_ = true;
- is_tts_ready_response_recieved_ = true;
- is_ui_ready_response_recieved_ = true;
- is_navi_ready_response_recieved_ = true;
- is_ivi_ready_response_recieved_ = true;
-
- is_vr_cooperating_ = true;
- is_tts_cooperating_ = true;
- is_ui_cooperating_ = true;
- is_navi_cooperating_ = true;
- is_ivi_cooperating_ = true;
- }
- }
-}
-
-HMICapabilities::~HMICapabilities() {
- delete vehicle_type_;
- delete ui_supported_languages_;
- delete tts_supported_languages_;
- delete vr_supported_languages_;
- delete display_capabilities_;
- delete hmi_zone_capabilities_;
- delete soft_buttons_capabilities_;
- delete button_capabilities_;
- delete preset_bank_capabilities_;
- delete vr_capabilities_;
- delete speech_capabilities_;
- delete audio_pass_thru_capabilities_;
- delete prerecorded_speech_;
- app_mngr_ = NULL;
-}
-
-bool HMICapabilities::is_hmi_capabilities_initialized() const {
- bool result = true;
-
- if (is_vr_ready_response_recieved_ && is_tts_ready_response_recieved_
- && is_ui_ready_response_recieved_ && is_navi_ready_response_recieved_
- && is_ivi_ready_response_recieved_) {
- if (is_vr_cooperating_) {
- if ((!vr_supported_languages_) ||
- (hmi_apis::Common_Language::INVALID_ENUM == vr_language_)) {
- result = false;
- }
- }
-
- if (is_tts_cooperating_) {
- if ((!tts_supported_languages_) ||
- (hmi_apis::Common_Language::INVALID_ENUM == tts_language_)) {
- result = false;
- }
- }
-
- if (is_ui_cooperating_) {
- if ((!ui_supported_languages_) ||
- (hmi_apis::Common_Language::INVALID_ENUM == ui_language_)) {
- result = false;
- }
- }
-
- if (is_ivi_cooperating_) {
- if (!vehicle_type_) {
- result = false;
- }
- }
- } else {
- result = false;
- }
-
- return result;
-}
-
-bool HMICapabilities::VerifyImageType(int32_t image_type) const {
- if (!display_capabilities_) {
- return false;
- }
-
- if (display_capabilities_->keyExists(hmi_response::image_capabilities)) {
- const smart_objects::SmartObject& image_caps = display_capabilities_
- ->getElement(hmi_response::image_capabilities);
- for (int32_t i = 0; i < image_caps.length(); ++i) {
- if (image_caps.getElement(i).asInt() == image_type) {
- return true;
- }
- }
- }
-
- return false;
-}
-
-void HMICapabilities::set_is_vr_cooperating(bool value) {
- is_vr_ready_response_recieved_ = true;
- is_vr_cooperating_ = value;
- if (is_vr_cooperating_) {
- utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetLanguage));
- app_mngr_->ManageHMICommand(get_language);
- utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetSupportedLanguages));
- app_mngr_->ManageHMICommand(get_all_languages);
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetCapabilities));
- app_mngr_->ManageHMICommand(get_capabilities);
-
- MessageHelper::SendHelpVrCommand();
- }
-}
-
-void HMICapabilities::set_is_tts_cooperating(bool value) {
- is_tts_ready_response_recieved_ = true;
- is_tts_cooperating_ = value;
- if (is_tts_cooperating_) {
- utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetLanguage));
- app_mngr_->ManageHMICommand(get_language);
- utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetSupportedLanguages));
- app_mngr_->ManageHMICommand(get_all_languages);
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetCapabilities));
- app_mngr_->ManageHMICommand(get_capabilities);
- }
-}
-
-void HMICapabilities::set_is_ui_cooperating(bool value) {
- is_ui_ready_response_recieved_ = true;
- is_ui_cooperating_ = value;
- if (is_ui_cooperating_) {
- utils::SharedPtr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetLanguage));
- app_mngr_->ManageHMICommand(get_language);
- utils::SharedPtr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetSupportedLanguages));
- app_mngr_->ManageHMICommand(get_all_languages);
- utils::SharedPtr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetCapabilities));
- app_mngr_->ManageHMICommand(get_capabilities);
- }
-}
-
-void HMICapabilities::set_is_navi_cooperating(bool value) {
- is_navi_ready_response_recieved_ = true;
- is_navi_cooperating_ = value;
-}
-
-void HMICapabilities::set_is_ivi_cooperating(bool value) {
- is_ivi_ready_response_recieved_ = true;
- is_ivi_cooperating_ = value;
- if (is_ivi_cooperating_) {
- utils::SharedPtr<smart_objects::SmartObject> get_type(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleType));
- app_mngr_->ManageHMICommand(get_type);
- }
-}
-
-void HMICapabilities::set_attenuated_supported(bool state) {
- attenuated_supported_ = state;
-}
-
-void HMICapabilities::set_active_ui_language(
- const hmi_apis::Common_Language::eType& language) {
- ui_language_ = language;
-}
-
-void HMICapabilities::set_active_vr_language(
- const hmi_apis::Common_Language::eType& language) {
- vr_language_ = language;
-}
-
-void HMICapabilities::set_active_tts_language(
- const hmi_apis::Common_Language::eType& language) {
- tts_language_ = language;
-}
-
-void HMICapabilities::set_ui_supported_languages(
- const smart_objects::SmartObject& supported_languages) {
- if (ui_supported_languages_) {
- delete ui_supported_languages_;
- }
- ui_supported_languages_ = new smart_objects::SmartObject(supported_languages);
-}
-
-void HMICapabilities::set_tts_supported_languages(
- const smart_objects::SmartObject& supported_languages) {
- if (tts_supported_languages_) {
- delete tts_supported_languages_;
- }
- tts_supported_languages_ = new smart_objects::SmartObject(
- supported_languages);
-}
-
-void HMICapabilities::set_vr_supported_languages(
- const smart_objects::SmartObject& supported_languages) {
- if (vr_supported_languages_) {
- delete vr_supported_languages_;
- }
- vr_supported_languages_ = new smart_objects::SmartObject(supported_languages);
-}
-
-void HMICapabilities::set_display_capabilities(
- const smart_objects::SmartObject& display_capabilities) {
- if (display_capabilities_) {
- delete display_capabilities_;
- }
- display_capabilities_ = new smart_objects::SmartObject(display_capabilities);
-}
-
-void HMICapabilities::set_hmi_zone_capabilities(
- const smart_objects::SmartObject& hmi_zone_capabilities) {
- if (hmi_zone_capabilities_) {
- delete hmi_zone_capabilities_;
- }
- hmi_zone_capabilities_ = new smart_objects::SmartObject(
- hmi_zone_capabilities);
-}
-
-void HMICapabilities::set_soft_button_capabilities(
- const smart_objects::SmartObject& soft_button_capabilities) {
- if (soft_buttons_capabilities_) {
- delete soft_buttons_capabilities_;
- }
- soft_buttons_capabilities_ = new smart_objects::SmartObject(
- soft_button_capabilities);
-}
-
-void HMICapabilities::set_button_capabilities(
- const smart_objects::SmartObject& button_capabilities) {
- if (button_capabilities_) {
- delete button_capabilities_;
- }
- button_capabilities_ = new smart_objects::SmartObject(button_capabilities);
-}
-
-void HMICapabilities::set_vr_capabilities(
- const smart_objects::SmartObject& vr_capabilities) {
- if (vr_capabilities_) {
- delete vr_capabilities_;
- }
- vr_capabilities_ = new smart_objects::SmartObject(vr_capabilities);
-}
-
-void HMICapabilities::set_speech_capabilities(
- const smart_objects::SmartObject& speech_capabilities) {
- if (speech_capabilities_) {
- delete speech_capabilities_;
- }
- speech_capabilities_ = new smart_objects::SmartObject(speech_capabilities);
-}
-
-void HMICapabilities::set_audio_pass_thru_capabilities(
- const smart_objects::SmartObject& audio_pass_thru_capabilities) {
- if (audio_pass_thru_capabilities_) {
- delete audio_pass_thru_capabilities_;
- }
- audio_pass_thru_capabilities_ = new smart_objects::SmartObject(
- audio_pass_thru_capabilities);
-}
-
-void HMICapabilities::set_preset_bank_capabilities(
- const smart_objects::SmartObject& preset_bank_capabilities) {
- if (preset_bank_capabilities_) {
- delete preset_bank_capabilities_;
- }
- preset_bank_capabilities_ = new smart_objects::SmartObject(
- preset_bank_capabilities);
-}
-
-void HMICapabilities::set_vehicle_type(
- const smart_objects::SmartObject& vehicle_type) {
- if (vehicle_type_) {
- delete vehicle_type_;
- }
- vehicle_type_ = new smart_objects::SmartObject(vehicle_type);
-}
-
-void HMICapabilities::set_prerecorded_speech(
- const smart_objects::SmartObject& prerecorded_speech) {
- if (prerecorded_speech_) {
- delete prerecorded_speech_;
- prerecorded_speech_ = NULL;
- }
- prerecorded_speech_ = new smart_objects::SmartObject(prerecorded_speech);
-}
-
-bool HMICapabilities::load_capabilities_from_file() {
- std::string json_string;
- std::string file_name =
- profile::Profile::instance()->hmi_capabilities_file_name();
-
- if (!file_system::FileExists(file_name)) {
- return false;
- }
-
- if (!file_system::ReadFile(file_name, json_string)) {
- return false;
- }
-
- try {
- Json::Reader reader_;
- Json::Value root_json;
-
- bool result = reader_.parse(json_string, root_json, false);
- if (!result) {
- return false;
- }
- // UI
- Json::Value ui = root_json.get("UI", "");
- set_active_ui_language(
- languages_enum_values.find(ui.get("language", "").asString())->second);
-
- Json::Value languages = ui.get("languages", "");
- smart_objects::SmartObject ui_languages =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (int32_t i = 0; i < languages.size(); i++) {
- ui_languages[i] =
- languages_enum_values.find(languages[i].asString())->second;
- }
- set_ui_supported_languages(ui_languages);
-
- Json::Value display_capabilities = ui.get("displayCapabilities", "");
- smart_objects::SmartObject display_capabilities_so =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- display_capabilities_so["displayType"] =
- display_capabilities.get("displayType", "").asString();
-
- display_capabilities_so["textFields"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- Json::Value text_fields = display_capabilities.get("textFields", "");
- for (int32_t i = 0; i < text_fields.size(); i++) {
-
- // there is an issue with enum to string, therefore used string
- display_capabilities_so["textFields"][i]["name"] =
- text_fields_enum_name.find(text_fields[i].asString())->first;
- }
-
- display_capabilities_so["mediaClockFormats"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- Json::Value media_clock_format =
- display_capabilities.get("mediaClockFormats", "");
- for (int32_t i = 0; i < media_clock_format.size(); i++) {
- display_capabilities_so["mediaClockFormats"][i] =
- media_clock_enum_name.find(media_clock_format[i].asString())->second;
- }
- display_capabilities_so["graphicSupported"] =
- display_capabilities.get("graphicSupported", "").asBool();
-
- Json::Value image_capabilities =
- display_capabilities.get("imageCapabilities", "");
- display_capabilities_so["imageCapabilities"] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (int32_t i = 0; i < image_capabilities.size(); i++) {
- display_capabilities_so["imageCapabilities"][i] =
- image_type_enum.find(image_capabilities[i].asString())->second;
- }
- set_display_capabilities(display_capabilities_so);
-
- Json::Value audio_capabilities = ui.get("audioPassThruCapabilities", "");
- smart_objects::SmartObject audio_capabilities_so =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- int32_t i = 0;
- audio_capabilities_so[i] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- audio_capabilities_so[i]["samplingRate"] =
- sampling_rate_enum.find(
- audio_capabilities.get("samplingRate", "").asString())->second;
- audio_capabilities_so[i]["bitsPerSample"] =
- bit_per_sample_enum.find(
- audio_capabilities.get("bitsPerSample", "").asString())->second;
- audio_capabilities_so[i]["audioType"] =
- audio_type_enum.find(
- audio_capabilities.get("audioType", "").asString())->second;
- set_audio_pass_thru_capabilities(audio_capabilities_so);
-
- smart_objects::SmartObject hmi_zone_capabilities_so =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- int32_t index = 0;
- hmi_zone_capabilities_so[index] =
- hmi_zone_enum.find(ui.get("hmiZoneCapabilities", "").asString())->second;
- set_hmi_zone_capabilities(hmi_zone_capabilities_so);
-
- Json::Value soft_button_capabilities = ui.get("softButtonCapabilities", "");
- smart_objects::SmartObject soft_button_capabilities_so =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- soft_button_capabilities_so["shortPressAvailable"] =
- soft_button_capabilities.get("shortPressAvailable", "").asBool();
- soft_button_capabilities_so["longPressAvailable"] =
- soft_button_capabilities.get("longPressAvailable", "").asBool();
- soft_button_capabilities_so["upDownAvailable"] =
- soft_button_capabilities.get("upDownAvailable", "").asBool();
- soft_button_capabilities_so["imageSupported"] =
- soft_button_capabilities.get("imageSupported", "").asBool();
- set_soft_button_capabilities(soft_button_capabilities_so);
-
- // VR
- Json::Value vr = root_json.get("VR", "");
- set_active_vr_language(
- languages_enum_values.find(vr.get("language", "").asString())->second);
-
- languages = vr.get("languages", "");
- smart_objects::SmartObject vr_languages =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (int32_t i = 0; i < languages.size(); i++) {
- vr_languages[i] =
- languages_enum_values.find(languages[i].asString())->second;
- }
- set_vr_supported_languages(ui_languages);
-
- Json::Value capabilities = vr.get("capabilities", "");
- smart_objects::SmartObject vr_capabilities =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (int32_t i = 0; i < capabilities.size(); i++) {
- vr_capabilities[i] =
- vr_enum_capabilities.find(capabilities[i].asString())->second;
- }
- set_vr_capabilities(vr_capabilities);
-
- // TTS
- Json::Value tts = root_json.get("TTS", "");
- set_active_tts_language(
- languages_enum_values.find(tts.get("language", "").asString())->second);
-
- languages = tts.get("languages", "");
- smart_objects::SmartObject tts_languages =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (int32_t i = 0; i < languages.size(); i++) {
- tts_languages[i] =
- languages_enum_values.find(languages[i].asString())->second;
- }
- set_tts_supported_languages(ui_languages);
- set_speech_capabilities(
- smart_objects::SmartObject(tts.get("capabilities", "").asString()));
-
- // Buttons
- Json::Value buttons = root_json.get("Buttons", "");
- Json::Value bt_capabilities = buttons.get("capabilities", "");
- smart_objects::SmartObject buttons_capabilities =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (int32_t i = 0; i < bt_capabilities.size(); i++) {
- smart_objects::SmartObject button =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- button["name"] =
- button_enum_name.find(bt_capabilities[i].get("name", "").asString())->second;
- button["shortPressAvailable"] =
- bt_capabilities[i].get("shortPressAvailable", "").asBool();
- button["longPressAvailable"] =
- bt_capabilities[i].get("longPressAvailable", "").asBool();
- button["upDownAvailable"] =
- bt_capabilities[i].get("upDownAvailable", "").asBool();
-
- buttons_capabilities[i] = button;
- }
- set_button_capabilities(buttons_capabilities);
-
- Json::Value presetBank = buttons.get("presetBankCapabilities", "");
- smart_objects::SmartObject preset_bank =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- preset_bank["onScreenPresetsAvailable"] =
- presetBank.get("onScreenPresetsAvailable", "").asBool();
- set_preset_bank_capabilities(preset_bank);
-
- // VehicleType
- Json::Value vehicle_info = root_json.get("VehicleInfo", "");
- smart_objects::SmartObject vehicle_type =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- vehicle_type["make"] = vehicle_info.get("make", "").asString();
- vehicle_type["model"] = vehicle_info.get("model", "").asString();
- vehicle_type["modelYear"] = vehicle_info.get("modelYear", "").asString();
- vehicle_type["trim"] = vehicle_info.get("trim", "").asString();
- set_vehicle_type(vehicle_type);
-
- } catch (...) {
- return false;
- }
- return true;
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/hmi_command_factory.cc b/SDL_Core/src/components/application_manager/src/hmi_command_factory.cc
deleted file mode 100644
index 0612d859e..000000000
--- a/SDL_Core/src/components/application_manager/src/hmi_command_factory.cc
+++ /dev/null
@@ -1,1880 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/hmi_command_factory.h"
-
-#include "application_manager/message.h"
-#include "interfaces/HMI_API.h"
-
-#include "application_manager/commands/hmi/update_device_list_request.h"
-#include "application_manager/commands/hmi/update_device_list_response.h"
-#include "application_manager/commands/hmi/on_update_device_list.h"
-#include "application_manager/commands/hmi/on_start_device_discovery.h"
-#include "application_manager/commands/hmi/update_app_list_request.h"
-#include "application_manager/commands/hmi/update_app_list_response.h"
-#include "application_manager/commands/hmi/on_find_applications.h"
-#include "application_manager/commands/hmi/allow_all_apps_request.h"
-#include "application_manager/commands/hmi/allow_all_apps_response.h"
-#include "application_manager/commands/hmi/allow_app_request.h"
-#include "application_manager/commands/hmi/allow_app_response.h"
-#include "application_manager/commands/hmi/activate_app_request.h"
-#include "application_manager/commands/hmi/activate_app_response.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_request.h"
-#include "application_manager/commands/hmi/mixing_audio_supported_response.h"
-#include "application_manager/commands/hmi/on_app_activated_notification.h"
-#include "application_manager/commands/hmi/on_exit_all_applications_notification.h"
-#include "application_manager/commands/hmi/on_exit_application_notification.h"
-#include "application_manager/commands/hmi/close_popup_request.h"
-#include "application_manager/commands/hmi/close_popup_response.h"
-#include "application_manager/commands/hmi/button_get_capabilities_request.h"
-#include "application_manager/commands/hmi/button_get_capabilities_response.h"
-#include "application_manager/commands/hmi/ui_add_command_request.h"
-#include "application_manager/commands/hmi/ui_add_command_response.h"
-#include "application_manager/commands/hmi/ui_delete_command_request.h"
-#include "application_manager/commands/hmi/ui_delete_command_response.h"
-#include "application_manager/commands/hmi/ui_add_submenu_request.h"
-#include "application_manager/commands/hmi/ui_add_submenu_response.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_request.h"
-#include "application_manager/commands/hmi/ui_delete_submenu_response.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/ui_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/ui_get_language_request.h"
-#include "application_manager/commands/hmi/ui_get_language_response.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_request.h"
-#include "application_manager/commands/hmi/ui_get_capabilities_response.h"
-#include "application_manager/commands/hmi/ui_change_registration_request.h"
-#include "application_manager/commands/hmi/ui_change_registration_response.h"
-#include "application_manager/commands/hmi/ui_show_request.h"
-#include "application_manager/commands/hmi/ui_show_response.h"
-#include "application_manager/commands/hmi/ui_alert_request.h"
-#include "application_manager/commands/hmi/ui_alert_response.h"
-#include "application_manager/commands/hmi/ui_is_ready_request.h"
-#include "application_manager/commands/hmi/ui_is_ready_response.h"
-#include "application_manager/commands/hmi/ui_slider_request.h"
-#include "application_manager/commands/hmi/ui_slider_response.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_request.h"
-#include "application_manager/commands/hmi/ui_set_media_clock_timer_response.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_request.h"
-#include "application_manager/commands/hmi/ui_set_global_properties_response.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_request.h"
-#include "application_manager/commands/hmi/ui_scrollable_message_response.h"
-#include "application_manager/commands/hmi/ui_set_icon_request.h"
-#include "application_manager/commands/hmi/ui_set_icon_response.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_response.h"
-#include "application_manager/commands/hmi/ui_perform_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_response.h"
-#include "application_manager/commands/hmi/ui_end_audio_pass_thru_request.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_request.h"
-#include "application_manager/commands/hmi/ui_perform_interaction_response.h"
-#include "application_manager/commands/hmi/vr_is_ready_request.h"
-#include "application_manager/commands/hmi/vr_is_ready_response.h"
-#include "application_manager/commands/hmi/vr_add_command_request.h"
-#include "application_manager/commands/hmi/vr_add_command_response.h"
-#include "application_manager/commands/hmi/vr_delete_command_request.h"
-#include "application_manager/commands/hmi/vr_delete_command_response.h"
-#include "application_manager/commands/hmi/vr_change_registration_request.h"
-#include "application_manager/commands/hmi/vr_change_registration_response.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/vr_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/vr_get_language_request.h"
-#include "application_manager/commands/hmi/vr_get_language_response.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_request.h"
-#include "application_manager/commands/hmi/vr_get_capabilities_response.h"
-#include "application_manager/commands/hmi/tts_is_ready_request.h"
-#include "application_manager/commands/hmi/tts_is_ready_response.h"
-#include "application_manager/commands/hmi/tts_change_registration_request.h"
-#include "application_manager/commands/hmi/tts_change_registration_response.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_request.h"
-#include "application_manager/commands/hmi/tts_get_supported_languages_response.h"
-#include "application_manager/commands/hmi/tts_get_language_request.h"
-#include "application_manager/commands/hmi/tts_get_language_response.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_request.h"
-#include "application_manager/commands/hmi/tts_stop_speaking_response.h"
-#include "application_manager/commands/hmi/tts_speak_request.h"
-#include "application_manager/commands/hmi/tts_speak_response.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_request.h"
-#include "application_manager/commands/hmi/tts_set_global_properties_response.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_request.h"
-#include "application_manager/commands/hmi/tts_get_capabilities_response.h"
-#include "application_manager/commands/hmi/tts_perform_interaction_request.h"
-#include "application_manager/commands/hmi/tts_perform_interaction_response.h"
-#include "application_manager/commands/hmi/vi_is_ready_request.h"
-#include "application_manager/commands/hmi/vi_is_ready_response.h"
-#include "application_manager/commands/hmi/vi_read_did_request.h"
-#include "application_manager/commands/hmi/vi_read_did_response.h"
-
-#ifdef WEB_HMI
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_response.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_response.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-#endif // #ifdef WEB_HMI
-
-#ifdef QT_HMI
-#include "application_manager/commands/hmi/vi_get_vehicle_data_request_template.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_data_response_template.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_request_template.h"
-#include "application_manager/commands/hmi/vi_subscribe_vehicle_data_response_template.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h"
-#include "application_manager/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h"
-#include "application_manager/commands/hmi/on_vi_gps_data_notification.h"
-#include "application_manager/commands/hmi/on_vi_speed_notification.h"
-#include "application_manager/commands/hmi/on_vi_rpm_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_notification.h"
-#include "application_manager/commands/hmi/on_vi_fuel_level_state_notification.h"
-#include "application_manager/commands/hmi/on_vi_instant_fuel_consumption_notification.h"
-#include "application_manager/commands/hmi/on_vi_external_temperature_notification.h"
-#include "application_manager/commands/hmi/on_vi_vin_notification.h"
-#include "application_manager/commands/hmi/on_vi_prndl_notification.h"
-#include "application_manager/commands/hmi/on_vi_tire_pressure_notification.h"
-#include "application_manager/commands/hmi/on_vi_odometer_notification.h"
-#include "application_manager/commands/hmi/on_vi_belt_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_body_information_notification.h"
-#include "application_manager/commands/hmi/on_vi_device_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_driver_braking_notification.h"
-#include "application_manager/commands/hmi/on_vi_wiper_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_head_lamp_status_notification.h"
-#include "application_manager/commands/hmi/on_vi_engine_torque_notification.h"
-#include "application_manager/commands/hmi/on_vi_acc_pedal_position_notification.h"
-#include "application_manager/commands/hmi/on_vi_steering_wheel_angle_notification.h"
-#include "application_manager/commands/hmi/on_vi_my_key_notification.h"
-#endif // #ifdef QT_HMI
-
-#include "application_manager/commands/hmi/vi_get_dtcs_request.h"
-#include "application_manager/commands/hmi/vi_get_dtcs_response.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_request.h"
-#include "application_manager/commands/hmi/vi_diagnostic_message_response.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_request.h"
-#include "application_manager/commands/hmi/vi_get_vehicle_type_response.h"
-#include "application_manager/commands/hmi/navi_is_ready_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_request.h"
-#include "application_manager/commands/hmi/navi_show_constant_tbt_response.h"
-#include "application_manager/commands/hmi/navi_is_ready_response.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_request.h"
-#include "application_manager/commands/hmi/navi_alert_maneuver_response.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
-#include "application_manager/commands/hmi/navi_update_turn_list_response.h"
-#include "application_manager/commands/hmi/on_ready_notification.h"
-#include "application_manager/commands/hmi/on_device_chosen_notification.h"
-#include "application_manager/commands/hmi/on_system_context_notification.h"
-#include "application_manager/commands/hmi/on_app_registered_notification.h"
-#include "application_manager/commands/hmi/on_app_unregistered_notification.h"
-#include "application_manager/commands/hmi/on_driver_distraction_notification.h"
-#include "application_manager/commands/hmi/on_play_tone_notification.h"
-#include "application_manager/commands/hmi/on_tts_started_notification.h"
-#include "application_manager/commands/hmi/on_tts_stopped_notification.h"
-#include "application_manager/commands/hmi/on_vr_started_notification.h"
-#include "application_manager/commands/hmi/on_vr_stopped_notification.h"
-#include "application_manager/commands/hmi/on_vr_command_notification.h"
-#include "application_manager/commands/hmi/on_ui_command_notification.h"
-#include "application_manager/commands/hmi/on_app_deactivated_notification.h"
-#include "application_manager/commands/hmi/on_ui_language_change_notification.h"
-#include "application_manager/commands/hmi/on_vr_language_change_notification.h"
-#include "application_manager/commands/hmi/on_tts_language_change_notification.h"
-#include "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
-#include "application_manager/commands/hmi/on_button_event_notification.h"
-#include "application_manager/commands/hmi/on_button_press_notification.h"
-#include "application_manager/commands/hmi/on_show_notification.h"
-#include "application_manager/commands/hmi/on_vi_vehicle_data_notification.h"
-#include "application_manager/commands/hmi/on_ui_keyboard_input_notification.h"
-#include "application_manager/commands/hmi/on_ui_touch_event_notification.h"
-#include "application_manager/commands/hmi/on_ui_reset_timeout_notification.h"
-#include "application_manager/commands/hmi/navi_start_stream_request.h"
-#include "application_manager/commands/hmi/navi_start_stream_response.h"
-#include "application_manager/commands/hmi/navi_stop_stream_request.h"
-#include "application_manager/commands/hmi/navi_stop_stream_response.h"
-#include "application_manager/commands/hmi/audio_start_stream_request.h"
-#include "application_manager/commands/hmi/audio_start_stream_response.h"
-#include "application_manager/commands/hmi/audio_stop_stream_request.h"
-#include "application_manager/commands/hmi/audio_stop_stream_response.h"
-#include "application_manager/commands/hmi/on_system_request_notification.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_request.h"
-#include "application_manager/commands/hmi/ui_set_display_layout_response.h"
-#include "application_manager/commands/hmi/on_sdl_close_notification.h"
-
-namespace application_manager {
-
-log4cxx::LoggerPtr HMICommandFactory::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ApplicationManager"));
-
-CommandSharedPtr HMICommandFactory::CreateCommand(
- const MessageSharedPtr& message) {
- const int function_id = (*message)[strings::params][strings::function_id]
- .asInt();
- LOG4CXX_INFO(logger_,
- "HMICommandFactory::CreateCommand function_id: " << function_id);
-
- CommandSharedPtr command(
- new application_manager::commands::CommandImpl(message));
-
- bool is_response = false;
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- is_response = true;
- LOG4CXX_INFO(logger_, "HMICommandFactory::CreateCommand response");
- } else if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kErrorResponse)) {
- is_response = true;
- LOG4CXX_INFO(logger_, "HMICommandFactory::CreateCommand error response");
- } else {
- LOG4CXX_INFO(logger_, "HMICommandFactory::CreateCommand request");
- }
-
- switch (function_id) {
- case hmi_apis::FunctionID::BasicCommunication_OnStartDeviceDiscovery: {
- command.reset(new commands::OnStartDeviceDiscovery(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_UpdateDeviceList: {
- if (is_response) {
- command.reset(new commands::UpdateDeviceListResponse(message));
- } else {
- command.reset(new commands::UpdateDeviceListRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_AllowAllApps: {
- if (is_response) {
- command.reset(new commands::AllowAllAppsResponse(message));
- } else {
- command.reset(new commands::AllowAllAppsRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_AllowApp: {
- if (is_response) {
- command.reset(new commands::AllowAppResponse(message));
- } else {
- command.reset(new commands::AllowAppRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_ActivateApp: {
- if (is_response) {
- command.reset(new commands::ActivateAppResponse(message));
- } else {
- command.reset(new commands::ActivateAppRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported: {
- if (is_response) {
- command.reset(new commands::MixingAudioSupportedResponse(message));
- } else {
- command.reset(new commands::MixingAudioSupportedRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnExitAllApplications: {
- command.reset(new commands::OnExitAllApplicationsNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_AddCommand: {
- if (is_response) {
- command.reset(new commands::UIAddCommandResponse(message));
- } else {
- command.reset(new commands::UIAddCommandRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_DeleteCommand: {
- if (is_response) {
- command.reset(new commands::UIDeleteCommandResponse(message));
- } else {
- command.reset(new commands::UIDeleteCommandRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_AddSubMenu: {
- if (is_response) {
- command.reset(new commands::UIAddSubmenuResponse(message));
- } else {
- command.reset(new commands::UIAddSubmenuRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_DeleteSubMenu: {
- if (is_response) {
- command.reset(new commands::UIDeleteSubmenuResponse(message));
- } else {
- command.reset(new commands::UIDeleteSubmenuRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
- if (is_response) {
- command.reset(new commands::UISetMediaClockTimerResponse(message));
- } else {
- command.reset(new commands::UISetMediaClockTimerRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_PerformInteraction: {
- if (is_response) {
- command.reset(new commands::UIPerformInteractionResponse(message));
- } else {
- command.reset(new commands::UIPerformInteractionRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- if (is_response) {
- command.reset(new commands::UISetGlobalPropertiesResponse(message));
- } else {
- command.reset(new commands::UISetGlobalPropertiesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_ScrollableMessage: {
- if (is_response) {
- command.reset(new commands::UIScrollableMessageResponse(message));
- } else {
- command.reset(new commands::UIScrollableMessageRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_SetAppIcon: {
- if (is_response) {
- command.reset(new commands::UISetIconResponse(message));
- } else {
- command.reset(new commands::UISetIconRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_GetSupportedLanguages: {
- if (is_response) {
- command.reset(new commands::UIGetSupportedLanguagesResponse(message));
- } else {
- command.reset(new commands::UIGetSupportedLanguagesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_GetLanguage: {
- if (is_response) {
- command.reset(new commands::UIGetLanguageResponse(message));
- } else {
- command.reset(new commands::UIGetLanguageRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::UIGetCapabilitiesResponse(message));
- } else {
- command.reset(new commands::UIGetCapabilitiesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_ChangeRegistration: {
- if (is_response) {
- command.reset(new commands::UIChangeRegistratioResponse(message));
- } else {
- command.reset(new commands::UIChangeRegistrationRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_PerformAudioPassThru: {
- if (is_response) {
- command.reset(new commands::UIPerformAudioPassThruResponse(message));
- } else {
- command.reset(new commands::UIPerformAudioPassThruRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_EndAudioPassThru: {
- if (is_response) {
- command.reset(new commands::UIEndAudioPassThruResponse(message));
- } else {
- command.reset(new commands::UIEndAudioPassThruRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_Alert: {
- if (is_response) {
- command.reset(new commands::UIAlertResponse(message));
- } else {
- command.reset(new commands::UIAlertRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_IsReady: {
- if (is_response) {
- command.reset(new commands::VRIsReadyResponse(message));
- } else {
- command.reset(new commands::VRIsReadyRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_AddCommand: {
- if (is_response) {
- command.reset(new commands::VRAddCommandResponse(message));
- } else {
- command.reset(new commands::VRAddCommandRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_DeleteCommand: {
- if (is_response) {
- command.reset(new commands::VRDeleteCommandResponse(message));
- } else {
- command.reset(new commands::VRDeleteCommandRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_ChangeRegistration: {
- if (is_response) {
- command.reset(new commands::VRChangeRegistrationResponse(message));
- } else {
- command.reset(new commands::VRChangeRegistrationRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_GetSupportedLanguages: {
- if (is_response) {
- command.reset(new commands::VRGetSupportedLanguagesResponse(message));
- } else {
- command.reset(new commands::VRGetSupportedLanguagesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_GetLanguage: {
- if (is_response) {
- command.reset(new commands::VRGetLanguageResponse(message));
- } else {
- command.reset(new commands::VRGetLanguageRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::VRGetCapabilitiesResponse(message));
- } else {
- command.reset(new commands::VRGetCapabilitiesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_IsReady: {
- if (is_response) {
- command.reset(new commands::TTSIsReadyResponse(message));
- } else {
- command.reset(new commands::TTSIsReadyRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_ChangeRegistration: {
- if (is_response) {
- command.reset(new commands::TTSChangeRegistratioResponse(message));
- } else {
- command.reset(new commands::TTSChangeRegistrationRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_GetSupportedLanguages: {
- if (is_response) {
- command.reset(new commands::TTSGetSupportedLanguagesResponse(message));
- } else {
- command.reset(new commands::TTSGetSupportedLanguagesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_StopSpeaking: {
- if (is_response) {
- command.reset(new commands::TTSStopSpeakingResponse(message));
- } else {
- command.reset(new commands::TTSStopSpeakingRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_GetLanguage: {
- if (is_response) {
- command.reset(new commands::TTSGetLanguageResponse(message));
- } else {
- command.reset(new commands::TTSGetLanguageRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_Speak: {
- if (is_response) {
- command.reset(new commands::TTSSpeakResponse(message));
- } else {
- command.reset(new commands::TTSSpeakRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- if (is_response) {
- command.reset(new commands::TTSSetGlobalPropertiesResponse(message));
- } else {
- command.reset(new commands::TTSSetGlobalPropertiesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::TTSGetCapabilitiesResponse(message));
- } else {
- command.reset(new commands::TTSGetCapabilitiesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_Started: {
- command.reset(new commands::OnTTSStartedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::TTS_Stopped: {
- command.reset(new commands::OnTTSStoppedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppActivated: {
- command.reset(new commands::OnAppActivatedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnExitApplication: {
- command.reset(new commands::OnExitApplicationNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_Show: {
- if (is_response) {
- command.reset(new commands::UIShowResponse(message));
- } else {
- command.reset(new commands::UIShowRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_Slider: {
- if (is_response) {
- command.reset(new commands::UISliderResponse(message));
- } else {
- command.reset(new commands::UISliderRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_ClosePopUp: {
- if (is_response) {
- command.reset(new commands::ClosePopupResponse(message));
- } else {
- command.reset(new commands::ClosePopupRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::UI_IsReady: {
- if (is_response) {
- command.reset(new commands::UIIsReadyResponse(message));
- } else {
- command.reset(new commands::UIIsReadyRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_IsReady: {
- if (is_response) {
- command.reset(new commands::VIIsReadyResponse(message));
- } else {
- command.reset(new commands::VIIsReadyRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_ReadDID: {
- if (is_response) {
- command.reset(new commands::VIReadDIDResponse(message));
- } else {
- command.reset(new commands::VIReadDIDRequest(message));
- }
- break;
- }
-#ifdef WEB_HMI
- case hmi_apis::FunctionID::VehicleInfo_GetVehicleData: {
- if (is_response) {
- command.reset(new commands::VIGetVehicleDataResponse(message));
- } else {
- command.reset(new commands::VIGetVehicleDataRequest(message));
- }
- break;
- }
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
- case hmi_apis::FunctionID::VehicleInfo_GetGpsData: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetGpsData>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetGpsData>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetSpeed: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSpeed>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSpeed>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetRpm: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetRpm>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetRpm>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetFuelLevel: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevel>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption>(
- message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature>(
- message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetPrndl: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetPrndl>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetPrndl>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetVin: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetVin>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetVin>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetTirePressure: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetTirePressure>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetOdometer: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetOdometer>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetOdometer>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetBeltStatus: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBeltStatus>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetBodyInformation: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetBodyInformation>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetDriverBraking: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetDriverBraking>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetWiperStatus: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetWiperStatus>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetEngineTorque: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEngineTorque>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition>(
- message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle>(
- message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetECallInfo: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetECallInfo>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus>(
- message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetMyKey: {
- if (is_response)
- command.reset(
- new commands::VIGetVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetMyKey>(message));
- else
- command.reset(
- new commands::VIGetVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_GetMyKey>(message));
- break;
- }
-#endif // #ifdef QT_HMI
- case hmi_apis::FunctionID::VehicleInfo_GetDTCs: {
- if (is_response) {
- command.reset(new commands::VIGetDTCsResponse(message));
- } else {
- command.reset(new commands::VIGetDTCsRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage: {
- if (is_response) {
- command.reset(new commands::VIDiagnosticMessageResponse(message));
- } else {
- command.reset(new commands::VIDiagnosticMessageRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_GetVehicleType: {
- if (is_response) {
- command.reset(new commands::VIGetVehicleTypeResponse(message));
- } else {
- command.reset(new commands::VIGetVehicleTypeRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_IsReady: {
- if (is_response) {
- command.reset(new commands::NaviIsReadyResponse(message));
- } else {
- command.reset(new commands::NaviIsReadyRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_AlertManeuver: {
- if (is_response) {
- command.reset(new commands::NaviAlertManeuverResponse(message));
- } else {
- command.reset(new commands::NaviAlertManeuverRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
- if (is_response) {
- command.reset(new commands::NaviUpdateTurnListResponse(message));
- } else {
- command.reset(new commands::NaviUpdateTurnListRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_ShowConstantTBT: {
- if (is_response) {
- command.reset(new commands::NaviShowConstantTBTResponse(message));
- } else {
- command.reset(new commands::NaviShowConstantTBTRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Buttons_GetCapabilities: {
- if (is_response) {
- command.reset(new commands::ButtonGetCapabilitiesResponse(message));
- } else {
- command.reset(new commands::ButtonGetCapabilitiesRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_PlayTone: {
- command.reset(new commands::OnPlayToneNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnReady: {
- command.reset(new commands::OnReadyNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnDeviceChosen: {
- command.reset(new commands::OnDeviceChosenNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnSystemContext: {
- command.reset(new commands::OnSystemContextNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnDriverDistraction: {
- command.reset(
- new commands::hmi::OnDriverDistractionNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnUpdateDeviceList: {
- command.reset(new commands::OnUpdateDeviceList(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppRegistered: {
- command.reset(new commands::OnAppRegisteredNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered: {
- command.reset(new commands::OnAppUnregisteredNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnFindApplications: {
- command.reset(new commands::OnFindApplications(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_UpdateAppList: {
- if (is_response) {
- command.reset(new commands::UpdateAppListResponse(message));
- } else {
- command.reset(new commands::UpdateAppListRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::VR_Started: {
- command.reset(new commands::OnVRStartedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VR_Stopped: {
- command.reset(new commands::OnVRStoppedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VR_OnCommand: {
- command.reset(new commands::OnVRCommandNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnCommand: {
- command.reset(new commands::OnUICommandNotification(message));
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated: {
- command.reset(new commands::OnAppDeactivatedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnLanguageChange: {
- command.reset(new commands::OnUILanguageChangeNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VR_OnLanguageChange: {
- command.reset(new commands::OnVRLanguageChangeNotification(message));
- break;
- }
- case hmi_apis::FunctionID::TTS_OnLanguageChange: {
- command.reset(new commands::OnTTSLanguageChangeNotification(message));
- break;
- }
- case hmi_apis::FunctionID::Buttons_OnButtonEvent: {
- command.reset(new commands::hmi::OnButtonEventNotification(message));
- break;
- }
- case hmi_apis::FunctionID::Buttons_OnButtonPress: {
- command.reset(new commands::hmi::OnButtonPressNotification(message));
- break;
- }
-#ifdef WEB_HMI
- case hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData: {
- if (is_response) {
- command.reset(new commands::VISubscribeVehicleDataResponse(message));
- } else {
- command.reset(new commands::VISubscribeVehicleDataRequest(message));
- }
- break;
- }
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
- case hmi_apis::FunctionID::VehicleInfo_SubscribeGps: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeGps>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeGps>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeRpm: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeRpm>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeRpm>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribePrndl: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribePrndl>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribePrndl>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeVin: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeVin>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeVin>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus>(
- message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey: {
- if (is_response)
- command.reset(
- new commands::VISubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey>(message));
- else
- command.reset(
- new commands::VISubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey>(message));
- break;
- }
-#endif // #ifdef QT_HMI
-#ifdef WEB_HMI
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData: {
- if (is_response) {
- command.reset(new commands::VIUnsubscribeVehicleDataResponse(message));
- } else {
- command.reset(new commands::VIUnsubscribeVehicleDataRequest(message));
- }
- break;
- }
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps>(message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed>(message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm>(message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl>(message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin>(message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin>(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus>(
- message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus>(
- message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey: {
- if (is_response)
- command.reset(
- new commands::VIUnsubscribeVehicleDataResponseTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey>(message));
- else
- command.reset(
- new commands::VIUnsubscribeVehicleDataRequestTemplate<
- hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey>(message));
- break;
- }
-#endif // #ifdef QT_HMI
-#ifdef WEB_HMI
- case hmi_apis::FunctionID::VehicleInfo_OnVehicleData: {
- command.reset(new commands::OnVIVehicleDataNotification(message));
- break;
- }
-#endif // #ifdef WEB_HMI
-#ifdef QT_HMI
- case hmi_apis::FunctionID::VehicleInfo_OnGpsData: {
- command.reset(new commands::OnVIGpsDataNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnSpeed: {
- command.reset(new commands::OnVISpeedNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnRpm: {
- command.reset(new commands::OnVIRpmNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnFuelLevel: {
- command.reset(new commands::OnVIFuelLevelNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnFuelLevelState: {
- command.reset(new commands::OnVIFuelLevelStateNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnInstantFuelConsumption: {
- command.reset(
- new commands::OnVIInstantFuelConsumptionNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnExternalTemperature: {
- command.reset(new commands::OnVIExternalTemperatureNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnVin: {
- command.reset(new commands::OnVIVinNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnPrndl: {
- command.reset(new commands::OnVIPrndlNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnTirePressure: {
- command.reset(new commands::OnVITirePressureNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnOdometer: {
- command.reset(new commands::OnVIOdometerNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnBeltStatus: {
- command.reset(new commands::OnVIBeltStatusNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnBodyInformation: {
- command.reset(new commands::OnVIBodyInformationNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnDeviceStatus: {
- command.reset(new commands::OnVIDeviceStatusNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnDriverBraking: {
- command.reset(new commands::OnVIDriverBrakingNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnWiperStatus: {
- command.reset(new commands::OnVIWiperStatusNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnHeadLampStatus: {
- command.reset(new commands::OnVIHeadLampStatusNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnEngineTorque: {
- command.reset(new commands::OnVIEngineTorqueNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnAccPedalPosition: {
- command.reset(new commands::OnVIAccPedalPositionNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnSteeringWheelAngle: {
- command.reset(new commands::OnVISteeringWheelAngleNotification(message));
- break;
- }
- case hmi_apis::FunctionID::VehicleInfo_OnMyKey: {
- command.reset(new commands::OnVIMyKeyNotification(message));
- break;
- }
-#endif // #ifdef QT_HMI
- case hmi_apis::FunctionID::UI_ShowNotification: {
- command.reset(new commands::OnShowNotification(message));
- break;
- }
- case hmi_apis::FunctionID::Navigation_OnTBTClientState: {
- command.reset(new commands::OnNaviTBTClientStateNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnKeyboardInput: {
- command.reset(new commands::hmi::OnUIKeyBoardInputNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnTouchEvent: {
- command.reset(new commands::hmi::OnUITouchEventNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_OnResetTimeout: {
- command.reset(new commands::hmi::OnUIResetTimeoutNotification(message));
- break;
- }
- case hmi_apis::FunctionID::Navigation_StartStream: {
- if (is_response) {
- command.reset(new commands::NaviStartStreamResponse(message));
- } else {
- command.reset(new commands::NaviStartStreamRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StopStream: {
- if (is_response) {
- command.reset(new commands::NaviStopStreamResponse(message));
- } else {
- command.reset(new commands::NaviStopStreamRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StartAudioStream: {
- if (is_response) {
- command.reset(new commands::AudioStartStreamResponse(message));
- } else {
- command.reset(new commands::AudioStartStreamRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::Navigation_StopAudioStream: {
- if (is_response) {
- command.reset(new commands::AudioStopStreamResponse(message));
- } else {
- command.reset(new commands::AudioStopStreamRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::TTS_PerformInteraction: {
- if (is_response) {
- command.reset(new commands::TTSPerformInteractionResponse(message));
- } else {
- command.reset(new commands::TTSPerformInteractionRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnSystemRequest: {
- command.reset(new commands::OnSystemRequestNotification(message));
- break;
- }
- case hmi_apis::FunctionID::UI_SetDisplayLayout: {
- if (is_response) {
- command.reset(new commands::UiSetDisplayLayoutResponse(message));
- } else {
- command.reset(new commands::UiSetDisplayLayoutRequest(message));
- }
- break;
- }
- case hmi_apis::FunctionID::BasicCommunication_OnSDLClose: {
- command.reset(new commands::OnSDLCloseNotification(message));
- break;
- }
- }
-
- return command;
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/message.cc b/SDL_Core/src/components/application_manager/src/message.cc
deleted file mode 100644
index c5aef9790..000000000
--- a/SDL_Core/src/components/application_manager/src/message.cc
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/message.h"
-
-namespace {
-bool BinaryDataPredicate(uint8_t i, uint8_t j) {
- return (i == j);
-}
-}
-
-namespace application_manager {
-
-MessageType MessageTypeFromRpcType(protocol_handler::RpcType rpc_type) {
- switch (rpc_type) {
- case protocol_handler::kRpcTypeRequest:
- return kRequest;
- case protocol_handler::kRpcTypeResponse:
- return kResponse;
- case protocol_handler::kRpcTypeNotification:
- return kNotification;
- case protocol_handler::kRpcTypeReserved:
- default:
- DCHECK(false);
- return kUnknownType;
- }
-}
-
-Message::Message(protocol_handler::MessagePriority priority)
- : function_id_(0),
- type_(kUnknownType),
- priority_(priority),
- correlation_id_(0),
- connection_key_(0),
- binary_data_(NULL),
- version_(kUnknownProtocol) {
-}
-
-Message::Message(const Message& message)
- : priority_(message.priority_) {
- *this = message;
-}
-
-Message& Message::operator=(const Message& message) {
- set_function_id(message.function_id_);
- set_correlation_id(message.correlation_id_);
- set_connection_key(message.connection_key_);
- set_message_type(message.type_);
- if (message.binary_data_) {
- set_binary_data(message.binary_data_);
- }
- set_json_message(message.json_message_);
- set_protocol_version(message.protocol_version());
- priority_ = message.priority_;
-
- return *this;
-}
-
-bool Message::operator==(const Message& message) {
- bool function_id = function_id_ == message.function_id_;
- bool correlation_id = correlation_id_ == message.correlation_id_;
- bool connection_key = connection_key_ == message.connection_key_;
- bool type = type_ == message.type_;
- bool json_message = json_message_ == message.json_message_;
- bool version = version_ == message.version_;
-
- bool binary_data = std::equal(binary_data_->begin(), binary_data_->end(),
- message.binary_data_->begin(),
- BinaryDataPredicate);
-
- return function_id && correlation_id && connection_key && type && binary_data
- && json_message && version;
-}
-
-Message::~Message() {
- if (binary_data_) {
- delete binary_data_;
- }
-}
-
-int32_t Message::function_id() const {
- return function_id_;
-}
-
-int32_t Message::correlation_id() const {
- return correlation_id_;
-}
-
-int32_t Message::connection_key() const {
- return connection_key_;
-}
-
-MessageType Message::type() const {
- return type_;
-}
-
-ProtocolVersion Message::protocol_version() const {
- return version_;
-}
-
-const std::string& Message::json_message() const {
- return json_message_;
-}
-
-const BinaryData* Message::binary_data() const {
- return binary_data_;
-}
-
-bool Message::has_binary_data() const {
- return (binary_data_ != NULL);
-}
-
-void Message::set_function_id(int32_t id) {
- function_id_ = id;
-}
-
-void Message::set_correlation_id(int32_t id) {
- correlation_id_ = id;
-}
-
-void Message::set_connection_key(int32_t key) {
- connection_key_ = key;
-}
-
-void Message::set_message_type(MessageType type) {
- type_ = type;
-}
-
-void Message::set_binary_data(BinaryData* data) {
- if (NULL == data) {
- NOTREACHED();
- return;
- }
-
- if (binary_data_) {
- delete binary_data_;
- }
-
- binary_data_ = data;
-}
-
-void Message::set_json_message(const std::string& json_message) {
- json_message_ = json_message;
-}
-
-void Message::set_protocol_version(ProtocolVersion version) {
- version_ = version;
-}
-
-const smart_objects::SmartObject &Message::smart_object() const {
- return smart_object_;
-}
-
-void Message::set_smart_object(const smart_objects::SmartObject& object) {
- smart_object_ = object;
-}
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/message_helper.cc b/SDL_Core/src/components/application_manager/src/message_helper.cc
deleted file mode 100644
index 9e7bf4842..000000000
--- a/SDL_Core/src/components/application_manager/src/message_helper.cc
+++ /dev/null
@@ -1,1593 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <set>
-#include <string>
-#include <algorithm>
-
-#include "utils/macro.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/commands/command_impl.h"
-#include "connection_handler/connection_handler_impl.h"
-#include "application_manager/application.h"
-#include "config_profile/profile.h"
-#include "utils/file_system.h"
-#include "interfaces/MOBILE_API.h"
-
-
-namespace {
-
-log4cxx::LoggerPtr g_logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("ApplicationManager"));
-
-hmi_apis::Common_Language::eType ToCommonLanguage(
- mobile_apis::Language::eType mobile_language) {
- // Update this check if mobile_api::Language
- // or hmi_apis::Common_Language changes.
- // Or, better, generate functions like this from XML
- long lang_val = long(mobile_language);
- long max_common_lang_val = long(hmi_apis::Common_Language::NO_NO);
- long max_mobile_lang = long(mobile_apis::Language::NO_NO);
- if (max_common_lang_val != max_mobile_lang) {
- LOG4CXX_ERROR(g_logger, "Mapping between Common_Language and Language"
- " has changed! Please update converter function");
- }
- if (lang_val > max_common_lang_val) {
- LOG4CXX_ERROR(g_logger, "Non-convertable language ID");
- }
- return hmi_apis::Common_Language::eType(lang_val);
-}
-
-}
-
-namespace application_manager {
-
-namespace {
-
-bool ValidateSoftButtons(smart_objects::SmartObject& soft_buttons) {
- using namespace smart_objects;
- for (size_t i = 0; i < soft_buttons.length(); ++i) {
- SmartObject& button = soft_buttons[i];
-
- // Check if image parameter is valid
- if (button.keyExists(strings::image)) {
- SmartObject& buttonImage = button[strings::image];
-
- // Image name must not be empty
- std::string file_name = buttonImage[strings::value].asString();
- file_name.erase(remove(file_name.begin(), file_name.end(), ' '), file_name.end());
- if (file_name.empty()) {
- return false;
- }
- }
- }
- return true;
-}
-
-}
-std::pair<const char*, VehicleDataType> kVehicleDataInitializer[] = {
-std::make_pair(strings::gps, VehicleDataType::GPS),
-std::make_pair(strings::speed, VehicleDataType::SPEED),
-std::make_pair(strings::rpm, VehicleDataType::RPM),
-std::make_pair(strings::fuel_level, VehicleDataType::FUELLEVEL),
-std::make_pair(strings::fuel_level_state, VehicleDataType::FUELLEVEL_STATE),
-std::make_pair(strings::instant_fuel_consumption, VehicleDataType::FUELCONSUMPTION),
-std::make_pair(strings::external_temp, VehicleDataType::EXTERNTEMP),
-std::make_pair(strings::vin, VehicleDataType::VIN ),
-std::make_pair(strings::prndl, VehicleDataType::PRNDL),
-std::make_pair(strings::tire_pressure, VehicleDataType::TIREPRESSURE),
-std::make_pair(strings::odometer, VehicleDataType::ODOMETER),
-std::make_pair(strings::belt_status, VehicleDataType::BELTSTATUS),
-std::make_pair(strings::body_information, VehicleDataType::BODYINFO),
-std::make_pair(strings::device_status, VehicleDataType::DEVICESTATUS),
-std::make_pair(strings::driver_braking, VehicleDataType::BRAKING),
-std::make_pair(strings::wiper_status, VehicleDataType::WIPERSTATUS),
-std::make_pair(strings::head_lamp_status, VehicleDataType::HEADLAMPSTATUS),
-std::make_pair(strings::e_call_info, VehicleDataType::ECALLINFO),
-std::make_pair(strings::airbag_status, VehicleDataType::AIRBAGSTATUS),
-std::make_pair(strings::emergency_event, VehicleDataType::EMERGENCYEVENT),
-std::make_pair(strings::cluster_mode_status, VehicleDataType::CLUSTERMODESTATUS),
-std::make_pair(strings::my_key, VehicleDataType::MYKEY),
-/*
- NOT DEFINED in mobile API
- std::make_pair(strings::gps, VehicleDataType::BATTVOLTAGE),
- */
-std::make_pair(strings::engine_torque, VehicleDataType::ENGINETORQUE ),
-std::make_pair(strings::acc_pedal_pos, VehicleDataType::ACCPEDAL),
-std::make_pair(strings::steering_wheel_angle, VehicleDataType::STEERINGWHEEL),
-};
-
-const VehicleData MessageHelper::vehicle_data_(kVehicleDataInitializer,
- kVehicleDataInitializer +
- ARRAYSIZE(kVehicleDataInitializer));
-
-
-#ifdef QT_HMI
-namespace {
- struct VehicleInfo_Requests {
- hmi_apis::FunctionID::eType func_id;
- const char* str;
- };
- static VehicleInfo_Requests ivi_subrequests[] = {
- { hmi_apis::FunctionID::VehicleInfo_SubscribeGps, strings::gps},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed, strings::speed},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeRpm, strings::rpm},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel, strings::fuel_level},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State, strings::fuel_level_state},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption, strings::instant_fuel_consumption},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature, strings::external_temp},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeVin, strings::vin},
- { hmi_apis::FunctionID::VehicleInfo_SubscribePrndl, strings::prndl},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure, strings::tire_pressure},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer, strings::odometer},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus, strings::belt_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation, strings::body_information},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus, strings::device_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking, strings::driver_braking},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus, strings::wiper_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus, strings::head_lamp_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque, strings::engine_torque},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition, strings::acc_pedal_pos},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle, strings::steering_wheel_angle},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo, strings::e_call_info},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus, strings::airbag_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent, strings::emergency_event},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus, strings::cluster_mode_status},
- { hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey, strings::my_key},
- };
-}
-#endif // #ifdef QT_HMI
-
-
-void MessageHelper::SendHMIStatusNotification(
- const Application& application_impl) {
- smart_objects::SmartObject* notification = new smart_objects::SmartObject;
- if (!notification) {
- // TODO(VS): please add logger.
- return;
- }
- smart_objects::SmartObject& message = *notification;
-
- message[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_api::FunctionID::OnHMIStatusID);
-
- message[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
-
- message[strings::params][strings::connection_key] =
- static_cast<int32_t>(application_impl.app_id());
-
- message[strings::msg_params][strings::hmi_level] =
- static_cast<int32_t>(application_impl.hmi_level());
-
- message[strings::msg_params][strings::audio_streaming_state] =
- static_cast<int32_t>(application_impl.audio_streaming_state());
-
- message[strings::msg_params][strings::system_context] =
- static_cast<int32_t>(application_impl.system_context());
-
- DCHECK(ApplicationManagerImpl::instance()->ManageMobileCommand(notification));
-}
-
-void MessageHelper::SendOnAppRegisteredNotificationToHMI(
- const Application& application_impl) {
- smart_objects::SmartObject* notification = new smart_objects::SmartObject;
- if (!notification) {
- // TODO(VS): please add logger.
- return;
- }
- smart_objects::SmartObject& message = *notification;
-
- message[strings::params][strings::function_id] =
- static_cast<int32_t>(hmi_apis::FunctionID::BasicCommunication_OnAppRegistered);
-
- message[strings::params][strings::message_type] =
- static_cast<int32_t>(application_manager::MessageType::kNotification);
- message[strings::msg_params][strings::application][strings::app_name] =
- application_impl.name();
-
- const smart_objects::SmartObject* ngn_media_screen_name =
- application_impl.ngn_media_screen_name();
-
- if (ngn_media_screen_name) {
- message[strings::msg_params][strings::application]
- [strings::ngn_media_screen_app_name] = *ngn_media_screen_name;
- }
-
- message[strings::msg_params][strings::application][strings::icon] =
- application_impl.app_icon_path();
-
- std::string dev_name = ApplicationManagerImpl::instance()->GetDeviceName(
- application_impl.device());
- message[strings::msg_params][strings::application][strings::device_name] =
- dev_name;
-
- message[strings::msg_params][strings::application][strings::app_id] =
- application_impl.app_id();
-
- message[strings::msg_params][strings::application][strings::hmi_display_language_desired] =
- static_cast<int32_t>(application_impl.ui_language());
-
- message[strings::msg_params][strings::application][strings::is_media_application] =
- application_impl.is_media_application();
-
- const smart_objects::SmartObject* app_type = application_impl.app_types();
-
- if (app_type) {
- message[strings::msg_params][strings::application][strings::app_type] =
- *app_type;
- }
- if (application_impl.vr_synonyms()) {
- message[strings::msg_params][strings::vr_synonyms] = *(application_impl.vr_synonyms());
- }
- if (application_impl.tts_name()) {
- message[strings::msg_params][strings::tts_name] = *(application_impl.tts_name());
- }
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(notification));
-}
-
-smart_objects::SmartObject* MessageHelper::CreateGeneralVrCommand() {
- smart_objects::SmartObject* vr_help_command = new smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- if (!vr_help_command) {
- return NULL;
- }
- smart_objects::SmartObject& help_object = *vr_help_command;
- const std::vector<std::string>& vr_general_cmds = profile::Profile::instance()
- ->vr_commands();
- for (uint32_t i = 0; i < vr_general_cmds.size(); ++i) {
- help_object[i] = vr_general_cmds[i];
- }
- return vr_help_command;
-}
-
-void MessageHelper::SendHelpVrCommand() {
- smart_objects::SmartObject* vr_help_command = CreateGeneralVrCommand();
- if (!vr_help_command) {
- return;
- }
- uint32_t max_cmd_id = profile::Profile::instance()->max_cmd_id();
- SendAddVRCommandToHMI(max_cmd_id + 1, *vr_help_command, 0);
-}
-
-smart_objects::SmartObject* MessageHelper::GetHashUpdateNotification(const uint32_t app_id) {
-
- LOG4CXX_INFO(g_logger, "GetHashUpdateNotification" << app_id);
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- smart_objects::SmartObject* message = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- (*message)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnHashChangeID;
- (*message)[strings::params][strings::connection_key] = app_id;
-
- return message;
-}
-
-void MessageHelper::SendHashUpdateNotification(const uint32_t app_id) {
- LOG4CXX_INFO(g_logger, "SendHashUpdateNotification");
-
- smart_objects::SmartObject* so = GetHashUpdateNotification(app_id);
- PrintSmartObject(*so);
- DCHECK(ApplicationManagerImpl::instance()->ManageMobileCommand(so));
-}
-
-void MessageHelper::SendRemoveVrCommandsOnUnregisterApp(ApplicationConstSharedPtr app) {
- uint32_t max_cmd_id = profile::Profile::instance()->max_cmd_id();
-
- if (app->vr_synonyms()) {
- SendRemoveCommandToHMI(
- static_cast<int32_t>(hmi_apis::FunctionID::VR_DeleteCommand),
- max_cmd_id + app->app_id(), app->app_id());
- }
-}
-
-void MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
- int32_t connection_key,
- mobile_api::AppInterfaceUnregisteredReason::eType reason) {
- smart_objects::SmartObject* notification = new smart_objects::SmartObject;
- if (!notification) {
- // TODO(VS): please add logger.
- return;
- }
- smart_objects::SmartObject& message = *notification;
-
- message[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_api::FunctionID::OnAppInterfaceUnregisteredID);
-
- message[strings::params][strings::message_type] =
- static_cast<int32_t>(kNotification);
-
- message[strings::params][strings::connection_key] = connection_key;
-
- message[strings::msg_params][strings::reason] =
- static_cast<int32_t>(reason);
-
- DCHECK(ApplicationManagerImpl::instance()->ManageMobileCommand(notification));
-}
-
-const VehicleData& MessageHelper::vehicle_data() {
- return vehicle_data_;
-}
-
-smart_objects::SmartObject* MessageHelper::CreateBlockedByPoliciesResponse(
- mobile_apis::FunctionID::eType function_id,
- mobile_apis::Result::eType result, uint32_t correlation_id,
- uint32_t connection_key) {
- smart_objects::SmartObject* response = new smart_objects::SmartObject;
- if (!response) {
- return NULL;
- }
-
- (*response)[strings::params][strings::function_id] = static_cast<int>(function_id);
- (*response)[strings::params][strings::message_type] = static_cast<int>(kResponse);
- (*response)[strings::msg_params][strings::success] = false;
- (*response)[strings::msg_params][strings::result_code] = static_cast<int>(result);
- (*response)[strings::params][strings::correlation_id] = correlation_id;
- (*response)[strings::params][strings::connection_key] = connection_key;
- (*response)[strings::params][strings::protocol_type] =
- commands::CommandImpl::mobile_protocol_type_;
- (*response)[strings::params][strings::protocol_version] =
- static_cast<int>(kV2);
- return response;
-}
-
-smart_objects::SmartObject* MessageHelper::CreateDeviceListSO(
- const connection_handler::DeviceList& devices) {
- smart_objects::SmartObject* device_list_so = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (NULL == device_list_so) {
- return NULL;
- }
-
- (*device_list_so)[strings::device_list] = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- smart_objects::SmartObject& list_so = (*device_list_so)[strings::device_list];
- int32_t index = 0;
- for (connection_handler::DeviceList::const_iterator it = devices.begin();
- devices.end() != it; ++it) {
- const connection_handler::Device& d = static_cast<connection_handler::Device>(it->second);
- list_so[index][strings::name] =
- d.user_friendly_name();
- list_so[index][strings::id] = it->second.device_handle();
- ++index;
- }
- return device_list_so;
-}
-
-smart_objects::SmartObject* MessageHelper::CreateModuleInfoSO(
- uint32_t function_id) {
- smart_objects::SmartObject* module_info = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (NULL == module_info) {
- return NULL;
- }
- smart_objects::SmartObject& object = *module_info;
- object[strings::params][strings::message_type] =
- static_cast<int>(kRequest);
- object[strings::params][strings::function_id] =
- static_cast<int>(function_id);
- object[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
- object[strings::msg_params] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- return module_info;
-}
-
-smart_objects::SmartObject* MessageHelper::CreateSetAppIcon(
- const std::string& path_to_icon, uint32_t app_id) {
- smart_objects::SmartObject* set_icon = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!set_icon) {
- return NULL;
- }
-
- smart_objects::SmartObject& object = *set_icon;
- object[strings::sync_file_name][strings::value] = path_to_icon;
- // TODO(PV): need to store actual image type
- object[strings::sync_file_name][strings::image_type] =
- static_cast<int>(mobile_api::ImageType::DYNAMIC);
- object[strings::app_id] = app_id;
-
- return set_icon;
-}
-
-bool MessageHelper::SendIVISubscribtions(const uint32_t app_id) {
- LOG4CXX_INFO(g_logger, " MessageHelper::SendIVISubscribtions ");
-
- bool succes = true;
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- SmartObjectList requests = GetIVISubscribtionRequests(app_id);
- for (SmartObjectList::const_iterator it = requests.begin();
- it != requests.end(); ++it) {
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(*it)) {
- succes = false;
- }
- }
- return succes;
-}
-
-MessageHelper::SmartObjectList MessageHelper::GetIVISubscribtionRequests(const uint32_t app_id) {
- LOG4CXX_INFO(g_logger, " MessageHelper::GetIVISubscribtionRequests ");
-
- ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app);
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::app_id] = app_id;
- const VehicleData& vehicle_data = MessageHelper::vehicle_data_;
- VehicleData::const_iterator ivi_it = vehicle_data.begin();
- const std::set<uint32_t>& subscribes = app->SubscribesIVI();
-
- for (; vehicle_data.end() != ivi_it; ++ivi_it) {
- uint32_t type_id = static_cast<int>(ivi_it->second);
- if (subscribes.end() != subscribes.find(type_id)) {
- std::string key_name = ivi_it->first;
- msg_params[key_name] = true;
- }
- }
-
- SmartObjectList hmi_requests;
-#ifdef WEB_HMI
- smart_objects::SmartObject* request = MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
- (*request)[strings::msg_params] = msg_params;
- hmi_requests.push_back(request);
-#endif // #ifdef WEB_HMI
-
-#ifdef QT_HMI
- //Generate list of ivi_subrequests
- for (int i = 0; i < sizeof(ivi_subrequests) / sizeof(ivi_subrequests[0]); ++i) {
- const VehicleInfo_Requests& sr = ivi_subrequests[i];
- if (true == msg_params.keyExists(sr.str)
- && true == msg_params[sr.str].asBool()) {
- smart_objects::SmartObject* request = MessageHelper::CreateModuleInfoSO(
- sr.func_id);
- (*request)[strings::msg_params] = msg_params;
- hmi_requests.push_back(request);
- }
- }
-#endif // #ifdef QT_HMI
- return hmi_requests;
-}
-
-void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app) {
- uint32_t id = app->app_id();
-
- utils::SharedPtr<smart_objects::SmartObject> set_app_icon(
- new smart_objects::SmartObject);
- if (set_app_icon) {
- smart_objects::SmartObject& so_to_send = *set_app_icon;
- so_to_send[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::UI_SetAppIcon);
- so_to_send[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- so_to_send[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- so_to_send[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- so_to_send[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- so_to_send[strings::msg_params] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- smart_objects::SmartObject* msg_params = MessageHelper::CreateSetAppIcon(
- app->app_icon_path(), id);
-
- if (msg_params) {
- so_to_send[strings::msg_params] = *msg_params;
- }
- // TODO(PV): appropriate handling of result
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(set_app_icon));
- }
-
- SendGlobalPropertiesToHMI(app);
- SendShowRequestToHMI(app);
- SendAddCommandRequestToHMI(app);
-}
-
-void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app) {
- DCHECK(app.get());
-
- SmartObjectList requests = CreateGlobalPropertiesRequestsToHMI(app);
- for (SmartObjectList::const_iterator it = requests.begin();
- it != requests.end(); ++it) {
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(*it))
- }
-}
-
-MessageHelper::SmartObjectList MessageHelper::CreateGlobalPropertiesRequestsToHMI(ApplicationConstSharedPtr app) {
-
- SmartObjectList requests;
- DCHECK(app.get());
-
- // UI global properties
-
- if (app->vr_help_title() || app->vr_help()) {
- smart_objects::SmartObject* ui_global_properties =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!ui_global_properties) {
- return requests;
- }
-
- (*ui_global_properties)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::UI_SetGlobalProperties);
- (*ui_global_properties)[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- (*ui_global_properties)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*ui_global_properties)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*ui_global_properties)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject ui_msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (app->vr_help_title()) {
- ui_msg_params[strings::vr_help_title] = (*app->vr_help_title());
- }
- if (app->vr_help()) {
- ui_msg_params[strings::vr_help] = (*app->vr_help());
- }
- ui_msg_params[strings::app_id] = app->app_id();
-
- (*ui_global_properties)[strings::msg_params] = ui_msg_params;
-
- requests.push_back(ui_global_properties);
- }
-
- // TTS global properties
- if (app->help_prompt() || app->timeout_prompt()) {
- smart_objects::SmartObject* tts_global_properties =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!tts_global_properties) {
- return requests;
- }
-
- (*tts_global_properties)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::TTS_SetGlobalProperties);
- (*tts_global_properties)[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- (*tts_global_properties)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*tts_global_properties)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*tts_global_properties)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject tts_msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (app->help_prompt()) {
- tts_msg_params[strings::help_prompt] = (*app->help_prompt());
- }
- if (app->timeout_prompt()) {
- tts_msg_params[strings::timeout_prompt] = (*app->timeout_prompt());
- }
- tts_msg_params[strings::app_id] = app->app_id();
-
- (*tts_global_properties)[strings::msg_params] = tts_msg_params;
-
- requests.push_back(tts_global_properties);
- }
- return requests;
-}
-
-smart_objects::SmartObject* MessageHelper::CreateAppVrHelp(ApplicationConstSharedPtr app) {
- smart_objects::SmartObject* result = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!result) {
- return NULL;
- }
- smart_objects::SmartObject& vr_help = *result;
- if (app->vr_help_title()) {
- vr_help[strings::vr_help_title] = (*app->vr_help_title());
- } else {
- vr_help[strings::vr_help_title] = app->name();
- }
-
- if (app->vr_help()) {
- vr_help[strings::vr_help] = (*app->vr_help());
- } else {
- const std::set<ApplicationSharedPtr>& apps = ApplicationManagerImpl::instance()
- ->applications();
-
- int32_t index = 0;
- std::set<ApplicationSharedPtr>::const_iterator it_app = apps.begin();
- for (; apps.end() != it_app; ++it_app) {
- if ((*it_app)->vr_synonyms()) {
- smart_objects::SmartObject item(smart_objects::SmartType_Map);
- item[strings::text] = (*((*it_app)->vr_synonyms())).getElement(0);
- item[strings::position] = index + 1;
- vr_help[strings::vr_help][index++] = item;
- }
- }
-
- // copy all app VR commands
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator it = commands.begin();
-
- for (; commands.end() != it; ++it) {
- smart_objects::SmartObject item(smart_objects::SmartType_Map);
- item[strings::text] =
- (*it->second)[strings::vr_commands][0].asString();
- item[strings::position] = index + 1;
- vr_help[strings::vr_help][index++] = item;
- }
- }
- return result;
-}
-
-void MessageHelper::SendShowRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app) {
- return;
- }
-
- smart_objects::SmartObject* ui_show = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!ui_show) {
- return;
- }
-
- if (app->show_command()) {
- (*ui_show)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::UI_Show);
- (*ui_show)[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- (*ui_show)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*ui_show)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*ui_show)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
- (*ui_show)[strings::msg_params] = (*app->show_command());
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(ui_show));
- }
-}
-
-void MessageHelper::SendShowConstantTBTRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app) {
- return;
- }
-
- smart_objects::SmartObject* navi_show_tbt = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!navi_show_tbt) {
- return;
- }
-
- if (app->tbt_show_command()) {
- (*navi_show_tbt)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
- (*navi_show_tbt)[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- (*navi_show_tbt)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*navi_show_tbt)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*navi_show_tbt)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
- (*navi_show_tbt)[strings::msg_params] = (*app->tbt_show_command());
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(navi_show_tbt));
- }
-}
-
-void MessageHelper::SendAddCommandRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app) {
- return;
- }
- SmartObjectList requests = CreateAddCommandRequestToHMI(app);
- for (SmartObjectList::iterator it = requests.begin();
- it != requests.end(); ++it) {
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(*it));
- }
-}
-
-MessageHelper::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(ApplicationConstSharedPtr app) {
- DCHECK(app.get());
-
- SmartObjectList requests;
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator i = commands.begin();
- for (; commands.end() != i; ++i) {
- // UI Interface
- if ((*i->second).keyExists(strings::menu_params)) {
- smart_objects::SmartObject* ui_command = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!ui_command) {
- return requests;
- }
-
- (*ui_command)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::UI_AddCommand);
- (*ui_command)[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- (*ui_command)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*ui_command)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*ui_command)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = i->first;
- msg_params[strings::menu_params] = (*i->second)[strings::menu_params];
- msg_params[strings::app_id] = app->app_id();
-
- if (((*i->second)[strings::cmd_icon].keyExists(strings::value))
- && (0 < (*i->second)[strings::cmd_icon][strings::value].length())) {
- msg_params[strings::cmd_icon] = (*i->second)[strings::cmd_icon];
- msg_params[strings::cmd_icon][strings::value] =
- (*i->second)[strings::cmd_icon][strings::value].asString();
- }
- (*ui_command)[strings::msg_params] = msg_params;
- requests.push_back(ui_command);
- }
-
- // VR Interface
- if ((*i->second).keyExists(strings::vr_commands)) {
- SendAddVRCommandToHMI(i->first, (*i->second)[strings::vr_commands],
- app->app_id());
- }
- }
- return requests;
-}
-
-smart_objects::SmartObject* MessageHelper::CreateChangeRegistration(
- int32_t function_id, int32_t language, uint32_t app_id) {
- smart_objects::SmartObject* command = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!command) {
- return NULL;
- }
- smart_objects::SmartObject& params = *command;
-
- params[strings::params][strings::message_type] =
- static_cast<int>(hmi_apis::messageType::request);
- params[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- params[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
-
- params[strings::params][strings::function_id] = function_id;
-
- params[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::language] = language;
- msg_params[strings::app_id] = app_id;
-
- params[strings::msg_params] = msg_params;
- return command;
-}
-
-void MessageHelper::SendChangeRegistrationRequestToHMI(ApplicationConstSharedPtr app) {
- hmi_apis::Common_Language::eType app_common_language =
- ToCommonLanguage(app->language());
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- if (mobile_apis::Language::INVALID_ENUM != app->language()) {
- smart_objects::SmartObject* vr_command = CreateChangeRegistration(
- hmi_apis::FunctionID::VR_ChangeRegistration, app->language(),
- app->app_id());
-
- if (vr_command) {
- ApplicationManagerImpl::instance()->ManageHMICommand(vr_command);
- }
- }
-
- if (mobile_apis::Language::INVALID_ENUM != app->language()) {
- smart_objects::SmartObject* tts_command = CreateChangeRegistration(
- hmi_apis::FunctionID::TTS_ChangeRegistration, app->language(),
- app->app_id());
-
- if (tts_command) {
- ApplicationManagerImpl::instance()->ManageHMICommand(tts_command);
- }
- }
-
- if (mobile_apis::Language::INVALID_ENUM != app->ui_language()) {
- smart_objects::SmartObject* ui_command = CreateChangeRegistration(
- hmi_apis::FunctionID::UI_ChangeRegistration, app->ui_language(),
- app->app_id());
-
- if (ui_command) {
- ApplicationManagerImpl::instance()->ManageHMICommand(ui_command);
- }
-
- }
-}
-
-void MessageHelper::SendAddVRCommandToHMI(
- uint32_t cmd_id, const smart_objects::SmartObject& vr_commands,
- uint32_t app_id) {
- smart_objects::SmartObject* request = CreateAddVRCommandToHMI(cmd_id, vr_commands, app_id);
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(request));
-}
-
-smart_objects::SmartObject* MessageHelper::CreateAddVRCommandToHMI(uint32_t cmd_id, const NsSmartDeviceLink::NsSmartObjects::SmartObject &vr_commands, uint32_t app_id) {
- smart_objects::SmartObject* vr_command = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!vr_command) {
- return NULL;
- }
-
- (*vr_command)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::VR_AddCommand;
- (*vr_command)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*vr_command)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*vr_command)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*vr_command)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (0 != cmd_id) {
- msg_params[strings::cmd_id] = cmd_id;
- }
- msg_params[strings::vr_commands] = vr_commands;
- if (0 < app_id) {
- msg_params[strings::app_id] = app_id;
- }
- (*vr_command)[strings::msg_params] = msg_params;
-
- return vr_command;
-}
-
-void MessageHelper::SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app) {
- DCHECK(app.get());
- SmartObjectList requests = CreateAddSubMenuRequestToHMI(app);
- for (SmartObjectList::iterator it = requests.begin();
- it != requests.end(); ++it) {
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(*it));
- }
-}
-
-MessageHelper::SmartObjectList MessageHelper::CreateAddSubMenuRequestToHMI(ApplicationConstSharedPtr app) {
- SmartObjectList requsets;
- const SubMenuMap& sub_menu = app->sub_menu_map();
- SubMenuMap::const_iterator i = sub_menu.begin();
- for (; sub_menu.end() != i; ++i) {
- smart_objects::SmartObject* ui_sub_menu = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!ui_sub_menu) {
- return requsets;
- }
-
- (*ui_sub_menu)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::UI_AddSubMenu;
- (*ui_sub_menu)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*ui_sub_menu)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*ui_sub_menu)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*ui_sub_menu)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::menu_id] = i->first;
- msg_params[strings::menu_params][strings::position] =
- (*i->second)[strings::position];
- msg_params[strings::menu_params][strings::menu_name] =
- (*i->second)[strings::menu_name];
- msg_params[strings::app_id] = app->app_id();
- (*ui_sub_menu)[strings::msg_params] = msg_params;
- requsets.push_back(ui_sub_menu);
- }
- return requsets;
-}
-
-void MessageHelper::RemoveAppDataFromHMI(ApplicationSharedPtr app) {
- SendDeleteCommandRequestToHMI(app);
- SendDeleteSubMenuRequestToHMI(app);
- SendRemoveVrCommandsOnUnregisterApp(app);
- ResetGlobalproperties(app);
-}
-
-void MessageHelper::SendOnSdlCloseNotificationToHMI() {
- smart_objects::SmartObject* notification = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!notification) {
- return;
- }
- smart_objects::SmartObject& message = *notification;
- message[strings::params][strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_OnSDLClose;
- message[strings::params][strings::message_type] = MessageType::kNotification;
-
- ApplicationManagerImpl::instance()->ManageHMICommand(&message);
-}
-
-void MessageHelper::SendOnAppUnregNotificationToHMI(ApplicationConstSharedPtr app) {
- smart_objects::SmartObject* notification = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!notification) {
- return;
- }
-
- smart_objects::SmartObject& message = *notification;
-
- message[strings::params][strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_OnAppUnregistered;
-
- message[strings::params][strings::message_type] = MessageType::kNotification;
- message[strings::msg_params][strings::app_id] = app->app_id();
-
- ApplicationManagerImpl::instance()->ManageHMICommand(&message);
-}
-
-void MessageHelper::SendDeleteCommandRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app) {
- return;
- }
-
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator i = commands.begin();
- for (; commands.end() != i; ++i) {
- if ((*i->second).keyExists(strings::menu_params)) {
- SendRemoveCommandToHMI(
- static_cast<int32_t>(hmi_apis::FunctionID::UI_DeleteCommand),
- i->first, app->app_id());
- }
-
- if ((*i->second).keyExists(strings::vr_commands)) {
- SendRemoveCommandToHMI(
- static_cast<int32_t>(hmi_apis::FunctionID::VR_DeleteCommand),
- i->first, app->app_id());
- }
- }
-}
-
-void MessageHelper::SendRemoveCommandToHMI(int32_t function_id, int32_t command_id,
- uint32_t app_id) {
- smart_objects::SmartObject* delete_cmd = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- if (!delete_cmd) {
- return;
- }
-
- (*delete_cmd)[strings::params][strings::function_id] = function_id;
- (*delete_cmd)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*delete_cmd)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*delete_cmd)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*delete_cmd)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = command_id;
- msg_params[strings::app_id] = app_id;
- (*delete_cmd)[strings::msg_params] = msg_params;
- ApplicationManagerImpl::instance()->ManageHMICommand(delete_cmd);
-}
-
-void MessageHelper::SendDeleteSubMenuRequestToHMI(ApplicationConstSharedPtr app) {
- if (!app) {
- return;
- }
-
- const SubMenuMap& sub_menu = app->sub_menu_map();
- SubMenuMap::const_iterator i = sub_menu.begin();
- for (; sub_menu.end() != i; ++i) {
- smart_objects::SmartObject* delete_sub_menu =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!delete_sub_menu) {
- return;
- }
-
- (*delete_sub_menu)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::UI_DeleteSubMenu;
- (*delete_sub_menu)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*delete_sub_menu)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*delete_sub_menu)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*delete_sub_menu)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- msg_params[strings::menu_id] = i->first;
- msg_params[strings::menu_params][strings::position] =
- (*i->second)[strings::position];
- msg_params[strings::menu_params][strings::menu_name] =
- (*i->second)[strings::menu_name];
- msg_params[strings::app_id] = app->app_id();
- (*delete_sub_menu)[strings::msg_params] = msg_params;
-
- ApplicationManagerImpl::instance()->ManageHMICommand(delete_sub_menu);
- }
-}
-
-void MessageHelper::SendActivateAppToHMI(uint32_t const app_id) {
- smart_objects::SmartObject* message = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- if (!message) {
- return;
- }
-
- (*message)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_ActivateApp;
- (*message)[strings::params][strings::message_type] = MessageType::kRequest;
- (*message)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
- (*message)[strings::msg_params][strings::app_id] = app_id;
-
- ApplicationManagerImpl::instance()->ManageHMICommand(message);
-}
-
-smart_objects::SmartObject* MessageHelper::CreateNegativeResponse(
- uint32_t connection_key, int32_t function_id, uint32_t correlation_id,
- int32_t result_code) {
- smart_objects::SmartObject* response = new smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- smart_objects::SmartObject& response_data = *response;
- response_data[strings::params][strings::function_id] = function_id;
- response_data[strings::params][strings::message_type] =
- mobile_apis::messageType::response;
- response_data[strings::params][strings::correlation_id] = correlation_id;
- response_data[strings::params][strings::protocol_type] =
- commands::CommandImpl::mobile_protocol_type_;
- response_data[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- response_data[strings::msg_params][strings::result_code] = result_code;
- response_data[strings::msg_params][strings::success] = false;
- response_data[strings::params][strings::connection_key] = connection_key;
-
- return response;
-}
-
-void MessageHelper::ResetGlobalproperties(ApplicationSharedPtr app) {
- // reset help_prompt
- const std::vector<std::string>& help_prompt = profile::Profile::instance()
- ->help_prompt();
-
- smart_objects::SmartObject so_help_prompt = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- for (uint32_t i = 0; i < help_prompt.size(); ++i) {
- smart_objects::SmartObject helpPrompt = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- helpPrompt[strings::text] = help_prompt[i];
- so_help_prompt[i] = helpPrompt;
- }
-
- app->set_help_prompt(so_help_prompt);
-
- // reset timeout prompt
- const std::vector<std::string>& time_out_promt = profile::Profile::instance()
- ->time_out_promt();
-
- smart_objects::SmartObject so_time_out_promt = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
-
- for (uint32_t i = 0; i < time_out_promt.size(); ++i) {
- smart_objects::SmartObject timeoutPrompt = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- timeoutPrompt[strings::text] = time_out_promt[i];
- so_time_out_promt[i] = timeoutPrompt;
- }
-
- app->set_timeout_prompt(so_time_out_promt);
-
- // reset VR help title
- smart_objects::SmartObject help_title(app->name());
- app->set_vr_help_title(help_title);
-
- // reset VR help items
- const CommandsMap& cmdMap = app->commands_map();
- smart_objects::SmartObject vr_help_items;
-
- int32_t index = 0;
- CommandsMap::const_iterator command_it = cmdMap.begin();
-
- for (; cmdMap.end() != command_it; ++command_it) {
- if (true == (*command_it->second).keyExists(strings::vr_commands)) {
- // use only first
- vr_help_items[index][strings::position] = (index + 1);
- vr_help_items[index++][strings::text] =
- (*command_it->second)[strings::vr_commands][0];
- }
- }
-
- app->set_vr_help(vr_help_items);
-
- // send global properties
- SendGlobalPropertiesToHMI(app);
-}
-
-void MessageHelper::SendNaviStartStream(
- const std::string& url, int32_t connection_key) {
- LOG4CXX_INFO(g_logger, "MessageHelper::SendNaviStartStream");
- smart_objects::SmartObject* start_stream =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!start_stream) {
- return;
- }
-
- (*start_stream)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::Navigation_StartStream;
- (*start_stream)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*start_stream)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*start_stream)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*start_stream)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- uint32_t app_id = 0;
- connection_handler::ConnectionHandlerImpl::instance()->GetDataOnSessionKey(
- connection_key,
- &app_id);
-
- msg_params[strings::app_id] = app_id;
- msg_params[strings::url] = url;
-
- (*start_stream)[strings::msg_params] = msg_params;
-
- ApplicationManagerImpl::instance()->ManageHMICommand(start_stream);
-}
-
-void MessageHelper::SendNaviStopStream(int32_t connection_key) {
- smart_objects::SmartObject* stop_stream =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!stop_stream) {
- return;
- }
-
- (*stop_stream)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::Navigation_StopStream;
- (*stop_stream)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*stop_stream)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*stop_stream)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*stop_stream)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- uint32_t app_id = 0;
- connection_handler::ConnectionHandlerImpl::instance()->GetDataOnSessionKey(
- connection_key,
- &app_id);
-
- msg_params[strings::app_id] = app_id;
-
- (*stop_stream)[strings::msg_params] = msg_params;
-
- ApplicationManagerImpl::instance()->ManageHMICommand(stop_stream);
-}
-
-void MessageHelper::SendAudioStartStream(
- const std::string& url, int32_t connection_key) {
-
- smart_objects::SmartObject* start_stream =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!start_stream) {
- return;
- }
-
- (*start_stream)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::Navigation_StartAudioStream;
- (*start_stream)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*start_stream)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*start_stream)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*start_stream)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- uint32_t app_id = 0;
- connection_handler::ConnectionHandlerImpl::instance()->GetDataOnSessionKey(
- connection_key,
- &app_id);
-
- msg_params[strings::app_id] = app_id;
- msg_params[strings::url] = url;
-
- (*start_stream)[strings::msg_params] = msg_params;
-
- DCHECK(ApplicationManagerImpl::instance()->ManageHMICommand(start_stream));
-}
-
-void MessageHelper::SendAudioStopStream(int32_t connection_key) {
- smart_objects::SmartObject* stop_stream =
- new smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (!stop_stream) {
- return;
- }
-
- (*stop_stream)[strings::params][strings::function_id] =
- hmi_apis::FunctionID::Navigation_StopAudioStream;
- (*stop_stream)[strings::params][strings::message_type] =
- hmi_apis::messageType::request;
- (*stop_stream)[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- (*stop_stream)[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- (*stop_stream)[strings::params][strings::correlation_id] =
- ApplicationManagerImpl::instance()->GetNextHMICorrelationID();
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- uint32_t app_id = 0;
- connection_handler::ConnectionHandlerImpl::instance()->GetDataOnSessionKey(
- connection_key,
- &app_id);
-
- msg_params[strings::app_id] = app_id;
-
- (*stop_stream)[strings::msg_params] = msg_params;
-
- ApplicationManagerImpl::instance()->ManageHMICommand(stop_stream);
-}
-
-bool MessageHelper::SendStopAudioPathThru() {
- LOG4CXX_INFO(g_logger,"MessageHelper::SendAudioStopAudioPathThru");
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- new NsSmartDeviceLink::NsSmartObjects::SmartObject;
- const uint32_t hmi_correlation_id = ApplicationManagerImpl::instance()->
- GetNextHMICorrelationID();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
- request[strings::params][strings::message_type] = MessageType::kRequest;
- request[strings::params][strings::function_id] = hmi_apis::FunctionID::UI_EndAudioPassThru;
- request[strings::params][strings::correlation_id] = hmi_correlation_id;
- request[strings::params][strings::protocol_version] =
- commands::CommandImpl::protocol_version_;
- request[strings::params][strings::protocol_type] =
- commands::CommandImpl::hmi_protocol_type_;
- return ApplicationManagerImpl::instance()->ManageHMICommand(result);
-}
-
-mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
- smart_objects::SmartObject& message, ApplicationConstSharedPtr app) {
- if (NsSmartDeviceLink::NsSmartObjects::SmartType_Array == message.getType()) {
- for (int32_t i = 0; i < message.length(); ++i) {
- mobile_apis::Result::eType res = VerifyImageFiles(message[i], app);
- if (mobile_apis::Result::SUCCESS != res) {
- return res;
- }
- }
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Map
- == message.getType()) {
- if (message.keyExists(strings::image_type)) {
- mobile_apis::Result::eType verification_result =
- VerifyImage(message, app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- return verification_result; // exit point
- }
- } else {
- std::set < std::string > keys = message.enumerate();
-
- for (std::set<std::string>::const_iterator key = keys.begin();
- key != keys.end(); ++key) {
- if (strings::soft_buttons != (*key)) {
- mobile_apis::Result::eType res = VerifyImageFiles(message[*key], app);
- if (mobile_apis::Result::SUCCESS != res) {
- return res;
- }
- }
- }
- }
- } // all other types shoudn't be processed
-
- return mobile_apis::Result::SUCCESS;
-}
-
-mobile_apis::Result::eType MessageHelper::VerifyImage(
- smart_objects::SmartObject& image, ApplicationConstSharedPtr app) {
- const std::string& file_name = image[strings::value].asString();
-
- std::string str = file_name;
- str.erase(remove(str.begin(), str.end(), ' '), str.end());
- if (0 == str.size()) {
- return mobile_apis::Result::INVALID_DATA;
- }
-
- std::string relative_file_path = app->name();
- relative_file_path += "/";
- relative_file_path += file_name;
-
- std::string full_file_path = file_system::FullPath(relative_file_path);
-
- if (!file_system::FileExists(full_file_path)) {
- return mobile_apis::Result::INVALID_DATA;
- }
-
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- if (!hmi_capabilities.VerifyImageType(
- static_cast<mobile_apis::ImageType::eType>(image[strings::image_type]
- .asInt()))) {
- return mobile_apis::Result::UNSUPPORTED_RESOURCE;
- }
-
- image[strings::value] = full_file_path;
-
- return mobile_apis::Result::SUCCESS;
-}
-
-bool MessageHelper::VerifySoftButtonText
-(smart_objects::SmartObject& soft_button) {
- std::string text = soft_button[strings::text].asString();
- text.erase(remove(text.begin(), text.end(), ' '), text.end());
- text.erase(remove(text.begin(), text.end(), '\n'), text.end());
- if (text.size()) {
- return true;
- } else {
- soft_button.erase(strings::text);
- }
-
- return false;
-}
-
-mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(
- smart_objects::SmartObject& message_params, ApplicationConstSharedPtr app) {
- if (!message_params.keyExists(strings::soft_buttons)) {
- return mobile_apis::Result::SUCCESS;
- }
-
- const HMICapabilities& hmi_capabilities =
- ApplicationManagerImpl::instance()->hmi_capabilities();
- const smart_objects::SmartObject* soft_button_capabilities =
- hmi_capabilities.soft_button_capabilities();
- bool image_supported = false;
- if (soft_button_capabilities) {
- image_supported =
- (*soft_button_capabilities)[hmi_response::image_supported].asBool();
- }
-
- smart_objects::SmartObject& request_soft_buttons =
- message_params[strings::soft_buttons];
-
- // Check whether soft buttons request is well-formed
- if (!ValidateSoftButtons(request_soft_buttons))
- return mobile_apis::Result::INVALID_DATA;
-
- smart_objects::SmartObject soft_buttons = smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- bool flag_unsuported_resource = false;
-
- int32_t j = 0;
- for (int32_t i = 0; i < request_soft_buttons.length(); ++i) {
- switch (request_soft_buttons[i][strings::type].asInt()) {
- case mobile_apis::SoftButtonType::SBT_IMAGE: {
- if (!image_supported) {
- continue;
- }
-
- if (request_soft_buttons[i].keyExists(strings::image)) {
- mobile_apis::Result::eType verification_result = VerifyImage(
- request_soft_buttons[i][strings::image], app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE ==
- verification_result) {
- request_soft_buttons[i].erase(strings::image);
- flag_unsuported_resource = true;
- } else {
- return mobile_apis::Result::INVALID_DATA;
- }
- }
- } else {
- return mobile_apis::Result::INVALID_DATA;
- }
- break;
- }
- case mobile_apis::SoftButtonType::SBT_TEXT: {
- if (!request_soft_buttons[i].keyExists(strings::text)) {
- return mobile_apis::Result::INVALID_DATA;
- }
-
- if (!VerifySoftButtonText(request_soft_buttons[i])) {
- continue;
- }
- break;
- }
- case mobile_apis::SoftButtonType::SBT_BOTH: {
-
- if (request_soft_buttons[i].keyExists(strings::text)) {
- VerifySoftButtonText(request_soft_buttons[i]);
- } else {
- return mobile_apis::Result::INVALID_DATA;
- }
-
- bool image_exist = false;
- if (image_supported) {
- image_exist = request_soft_buttons[i].keyExists(strings::image);
- if (!image_exist) {
- return mobile_apis::Result::INVALID_DATA;
- }
- }
- if (image_exist) {
- mobile_apis::Result::eType verification_result = VerifyImage(
- request_soft_buttons[i][strings::image], app);
-
- if (mobile_apis::Result::SUCCESS != verification_result) {
- if (mobile_apis::Result::UNSUPPORTED_RESOURCE ==
- verification_result) {
- request_soft_buttons[i].erase(strings::image);
- flag_unsuported_resource = true;
- } else {
- return mobile_apis::Result::INVALID_DATA;
- }
- }
- }
- break;
- }
- default: {
- continue;
- break;
- }
- }
-
- soft_buttons[j] = request_soft_buttons[i];
-
- if (!soft_buttons[j].keyExists(strings::system_action)) {
- soft_buttons[j][strings::system_action] =
- mobile_apis::SystemAction::DEFAULT_ACTION;
- }
-
- ++j;
- }
-
- request_soft_buttons = soft_buttons;
-
- if (0 == request_soft_buttons.length()) {
- message_params.erase(strings::soft_buttons);
- }
- if (flag_unsuported_resource) {
- return mobile_apis::Result::UNSUPPORTED_RESOURCE;
- } else {
- return mobile_apis::Result::SUCCESS;
- }
-}
-
-// TODO(AK): change printf to logger
-bool MessageHelper::PrintSmartObject(const smart_objects::SmartObject& object) {
- static uint32_t tab = 0;
- std::string tab_buffer;
-
- if (tab == 0) {
- printf("\n-------------------------------------------------------------");
- }
-
- for (uint32_t i = 0; i < tab; ++i) {
- tab_buffer += "\t";
- }
-
- switch (object.getType()) {
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Array: {
- for (size_t i = 0; i < object.length(); i++) {
- ++tab;
-
- printf("\n%s%d: ", tab_buffer.c_str(), i);
- if (!PrintSmartObject(object.getElement(i))) {
- printf("\n");
- return false;
- }
- }
- break;
- }
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Map: {
- std::set < std::string > keys = object.enumerate();
-
- for (std::set<std::string>::const_iterator key = keys.begin();
- key != keys.end(); key++) {
- ++tab;
-
- printf("\n%s%s: ", tab_buffer.c_str(), (*key).c_str());
- if (!PrintSmartObject(object[(*key).c_str()])) {
- printf("\n");
- return false;
- }
- }
- break;
- }
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Boolean:
- object.asBool() ? printf("true\n") : printf("false\n");
- break;
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Double: {
- printf("%f", object.asDouble());
- break;
- }
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Integer:
- printf("%d", object.asInt());
- break;
- case NsSmartDeviceLink::NsSmartObjects::SmartType_String:
- printf("%s", object.asString().c_str());
- break;
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Character:
- printf("%c", object.asChar());
- break;
- default:
- printf("PrintSmartObject - default case\n");
- break;
- }
-
- if (0 != tab) {
- --tab;
- } else {
- printf("\n-------------------------------------------------------------\n");
- }
-
- return true;
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/mobile_command_factory.cc b/SDL_Core/src/components/application_manager/src/mobile_command_factory.cc
deleted file mode 100644
index 9b868f8c4..000000000
--- a/SDL_Core/src/components/application_manager/src/mobile_command_factory.cc
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/mobile_command_factory.h"
-#include "application_manager/commands/mobile/add_command_request.h"
-#include "application_manager/commands/mobile/add_command_response.h"
-#include "application_manager/commands/mobile/delete_command_request.h"
-#include "application_manager/commands/mobile/delete_command_response.h"
-#include "application_manager/commands/mobile/add_sub_menu_request.h"
-#include "application_manager/commands/mobile/add_sub_menu_response.h"
-#include "application_manager/commands/mobile/alert_request.h"
-#include "application_manager/commands/mobile/alert_response.h"
-#include "application_manager/commands/mobile/alert_maneuver_request.h"
-#include "application_manager/commands/mobile/alert_maneuver_response.h"
-#include "application_manager/commands/mobile/change_registration_request.h"
-#include "application_manager/commands/mobile/change_registration_response.h"
-#include "application_manager/commands/mobile/create_interaction_choice_set_request.h"
-#include "application_manager/commands/mobile/create_interaction_choice_set_response.h"
-#include "application_manager/commands/mobile/delete_file_request.h"
-#include "application_manager/commands/mobile/delete_file_response.h"
-#include "application_manager/commands/mobile/delete_interaction_choice_set_request.h"
-#include "application_manager/commands/mobile/delete_interaction_choice_set_response.h"
-#include "application_manager/commands/mobile/delete_sub_menu_request.h"
-#include "application_manager/commands/mobile/delete_sub_menu_response.h"
-#include "application_manager/commands/mobile/dial_number_request.h"
-#include "application_manager/commands/mobile/encoded_sync_pdata_request.h"
-#include "application_manager/commands/mobile/encoded_sync_pdata_response.h"
-#include "application_manager/commands/mobile/end_audio_pass_thru_request.h"
-#include "application_manager/commands/mobile/end_audio_pass_thru_response.h"
-#include "application_manager/commands/mobile/generic_response.h"
-#include "application_manager/commands/mobile/get_dtcs_request.h"
-#include "application_manager/commands/mobile/get_dtcs_response.h"
-#include "application_manager/commands/mobile/get_vehicle_data_request.h"
-#include "application_manager/commands/mobile/get_vehicle_data_response.h"
-#include "application_manager/commands/mobile/list_files_request.h"
-#include "application_manager/commands/mobile/list_files_response.h"
-#include "application_manager/commands/mobile/on_app_interface_unregistered_notification.h"
-#include "application_manager/commands/mobile/on_audio_pass_thru_notification.h"
-#include "application_manager/commands/mobile/on_button_event_notification.h"
-#include "application_manager/commands/mobile/on_button_press_notification.h"
-#include "application_manager/commands/mobile/on_driver_distraction_notification.h"
-#include "application_manager/commands/mobile/on_encoded_sync_pdata_notification.h"
-#include "application_manager/commands/mobile/on_hmi_status_notification.h"
-#include "application_manager/commands/mobile/on_language_change_notification.h"
-#include "application_manager/commands/mobile/on_command_notification.h"
-#include "application_manager/commands/mobile/on_permissions_change_notification.h"
-#include "application_manager/commands/mobile/on_tbt_client_state_notification.h"
-#include "application_manager/commands/mobile/on_vehicle_data_notification.h"
-#include "application_manager/commands/mobile/on_hash_change_notification.h"
-#include "application_manager/commands/mobile/perform_audio_pass_thru_request.h"
-#include "application_manager/commands/mobile/perform_audio_pass_thru_response.h"
-#include "application_manager/commands/mobile/perform_interaction_request.h"
-#include "application_manager/commands/mobile/perform_interaction_response.h"
-#include "application_manager/commands/mobile/put_file_request.h"
-#include "application_manager/commands/mobile/put_file_response.h"
-#include "application_manager/commands/mobile/read_did_request.h"
-#include "application_manager/commands/mobile/read_did_response.h"
-#include "application_manager/commands/mobile/register_app_interface_request.h"
-#include "application_manager/commands/mobile/register_app_interface_response.h"
-#include "application_manager/commands/mobile/reset_global_properties_request.h"
-#include "application_manager/commands/mobile/reset_global_properties_response.h"
-#include "application_manager/commands/mobile/scrollable_message_request.h"
-#include "application_manager/commands/mobile/scrollable_message_response.h"
-#include "application_manager/commands/mobile/set_display_layout_request.h"
-#include "application_manager/commands/mobile/set_display_layout_response.h"
-#include "application_manager/commands/mobile/set_global_properties_request.h"
-#include "application_manager/commands/mobile/set_global_properties_response.h"
-#include "application_manager/commands/mobile/set_icon_request.h"
-#include "application_manager/commands/mobile/set_icon_response.h"
-#include "application_manager/commands/mobile/set_media_clock_timer_request.h"
-#include "application_manager/commands/mobile/set_media_clock_timer_response.h"
-#include "application_manager/commands/mobile/show_constant_tbt_request.h"
-#include "application_manager/commands/mobile/show_constant_tbt_response.h"
-#include "application_manager/commands/mobile/show_request.h"
-#include "application_manager/commands/mobile/show_response.h"
-#include "application_manager/commands/mobile/slider_request.h"
-#include "application_manager/commands/mobile/slider_response.h"
-#include "application_manager/commands/mobile/speak_request.h"
-#include "application_manager/commands/mobile/speak_response.h"
-#include "application_manager/commands/mobile/subscribe_button_request.h"
-#include "application_manager/commands/mobile/subscribe_button_response.h"
-#include "application_manager/commands/mobile/subscribe_vehicle_data_request.h"
-#include "application_manager/commands/mobile/subscribe_vehicle_data_response.h"
-#include "application_manager/commands/mobile/unregister_app_interface_request.h"
-#include "application_manager/commands/mobile/unregister_app_interface_response.h"
-#include "application_manager/commands/mobile/unsubscribe_button_request.h"
-#include "application_manager/commands/mobile/unsubscribe_button_response.h"
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_request.h"
-#include "application_manager/commands/mobile/unsubscribe_vehicle_data_response.h"
-#include "application_manager/commands/mobile/update_turn_list_request.h"
-#include "application_manager/commands/mobile/update_turn_list_response.h"
-#include "application_manager/commands/mobile/sync_pdata_request.h"
-#include "application_manager/commands/mobile/sync_pdata_response.h"
-#include "application_manager/commands/mobile/system_request.h"
-#include "application_manager/commands/mobile/system_response.h"
-#include "application_manager/commands/mobile/on_sync_pdata_notification.h"
-#include "application_manager/commands/mobile/on_keyboard_input_notification.h"
-#include "application_manager/commands/mobile/on_touch_event_notification.h"
-#include "application_manager/commands/mobile/on_system_request_notification.h"
-#include "application_manager/commands/mobile/diagnostic_message_request.h"
-#include "application_manager/commands/mobile/diagnostic_message_response.h"
-#include "interfaces/MOBILE_API.h"
-
-namespace application_manager {
-
-CommandSharedPtr MobileCommandFactory::CreateCommand(
- const MessageSharedPtr& message) {
- CommandSharedPtr command;
-
- switch ((*message)[strings::params][strings::function_id].asInt()) {
- case mobile_apis::FunctionID::RegisterAppInterfaceID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kRequest)) {
- command.reset(new commands::RegisterAppInterfaceRequest(message));
- } else {
- command.reset(new commands::RegisterAppInterfaceResponse(message));
- }
- break;
- }
- case mobile_apis::FunctionID::UnregisterAppInterfaceID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kRequest)) {
- command.reset(new commands::UnregisterAppInterfaceRequest(message));
- } else {
- command.reset(new commands::UnregisterAppInterfaceResponse(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SetGlobalPropertiesID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetGlobalPropertiesResponse(message));
- } else {
- command.reset(new commands::SetGlobalPropertiesRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ResetGlobalPropertiesID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ResetGlobalPropertiesResponse(message));
- } else {
- command.reset(new commands::ResetGlobalPropertiesRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::AddCommandID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::AddCommandResponse(message));
- } else {
- command.reset(new commands::AddCommandRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteCommandID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::DeleteCommandResponse(message));
- } else {
- command.reset(new commands::DeleteCommandRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::AddSubMenuID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::AddSubMenuResponse(message));
- } else {
- command.reset(new commands::AddSubMenuRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteSubMenuID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::DeleteSubMenuResponse(message));
- } else {
- command.reset(new commands::DeleteSubMenuRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteInteractionChoiceSetID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::DeleteInteractionChoiceSetResponse(message));
- } else {
- command.reset(new commands::DeleteInteractionChoiceSetRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::AlertID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::AlertResponse(message));
- } else {
- command.reset(new commands::AlertRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SpeakID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SpeakResponse(message));
- } else {
- command.reset(new commands::SpeakRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SliderID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SliderResponse(message));
- } else {
- command.reset(new commands::SliderRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::PerformAudioPassThruID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::PerformAudioPassThruResponse(message));
- } else {
- command.reset(new commands::PerformAudioPassThruRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::CreateInteractionChoiceSetID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(
- new commands::CreateInteractionChoiceSetResponse(message));
- } else {
- command.reset(new commands::CreateInteractionChoiceSetRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::PerformInteractionID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::PerformInteractionResponse(message));
- } else {
- command.reset(new commands::PerformInteractionRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::EndAudioPassThruID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::EndAudioPassThruResponse(message));
- } else {
- command.reset(new commands::EndAudioPassThruRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::PutFileID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::PutFileResponse(message));
- } else {
- command.reset(new commands::PutFileRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::DeleteFileID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::DeleteFileResponse(message));
- } else {
- command.reset(new commands::DeleteFileRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ListFilesID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ListFilesResponse(message));
- } else {
- command.reset(new commands::ListFilesRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SubscribeButtonID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SubscribeButtonResponse(message));
- } else {
- command.reset(new commands::SubscribeButtonRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::UnsubscribeButtonID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::UnsubscribeButtonResponse(message));
- } else {
- command.reset(new commands::UnsubscribeButtonRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ShowConstantTBTID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ShowConstantTBTResponse(message));
- } else {
- command.reset(new commands::ShowConstantTBTRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ShowID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ShowResponse(message));
- } else {
- command.reset(new commands::ShowRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SubscribeVehicleDataID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SubscribeVehicleDataResponse(message));
- } else {
- command.reset(new commands::SubscribeVehicleDataRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SyncPDataID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SyncPDataResponse(message));
- } else {
- command.reset(new commands::SyncPDataRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::EncodedSyncPDataID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::EncodedSyncPDataResponse(message));
- } else {
- command.reset(new commands::EncodedSyncPDataRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::UnsubscribeVehicleDataID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::UnsubscribeVehicleDataResponse(message));
- } else {
- command.reset(new commands::UnsubscribeVehicleDataRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ReadDIDID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ReadDIDResponse(message));
- } else {
- command.reset(new commands::ReadDIDRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::GetVehicleDataID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::GetVehicleDataResponse(message));
- } else {
- command.reset(new commands::GetVehicleDataRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ScrollableMessageID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ScrollableMessageResponse(message));
- } else {
- command.reset(new commands::ScrollabelMessageRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::AlertManeuverID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::AlertManeuverResponse(message));
- } else {
- command.reset(new commands::AlertManeuverRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SetAppIconID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetIconResponse(message));
- } else {
- command.reset(new commands::SetIconRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SetDisplayLayoutID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetDisplayLayoutResponse(message));
- } else {
- command.reset(new commands::SetDisplayLayoutRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::UpdateTurnListID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::UpdateTurnListResponse(message));
- } else {
- command.reset(new commands::UpdateTurnListRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::ChangeRegistrationID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::ChangeRegistrationResponse(message));
- } else {
- command.reset(new commands::ChangeRegistrationRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::GetDTCsID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::GetDTCsResponse(message));
- } else {
- command.reset(new commands::GetDTCsRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::DiagnosticMessageID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::DiagnosticMessageResponse(message));
- } else {
- command.reset(new commands::DiagnosticMessageRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SetMediaClockTimerID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SetMediaClockTimerResponse(message));
- } else {
- command.reset(new commands::SetMediaClockRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::SystemRequestID: {
- if ((*message)[strings::params][strings::message_type]
- == static_cast<int>(application_manager::MessageType::kResponse)) {
- command.reset(new commands::SystemResponse(message));
- } else {
- command.reset(new commands::SystemRequest(message));
- }
- break;
- }
- case mobile_apis::FunctionID::OnButtonEventID: {
- command.reset(new commands::mobile::OnButtonEventNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnButtonPressID: {
- command.reset(new commands::mobile::OnButtonPressNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnAudioPassThruID: {
- command.reset(new commands::OnAudioPassThruNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnVehicleDataID: {
- command.reset(new commands::OnVehicleDataNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnAppInterfaceUnregisteredID: {
- command.reset(
- new commands::OnAppInterfaceUnregisteredNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnCommandID: {
- command.reset(new commands::OnCommandNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnTBTClientStateID: {
- command.reset(new commands::OnTBTClientStateNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnDriverDistractionID: {
- command.reset(
- new commands::mobile::OnDriverDistractionNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnLanguageChangeID: {
- command.reset(new commands::OnLanguageChangeNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnPermissionsChangeID: {
- command.reset(new commands::OnPermissionsChangeNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnHMIStatusID: {
- command.reset(new commands::OnHMIStatusNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnSyncPDataID: {
- command.reset(new commands::OnSyncPDataNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnKeyboardInputID: {
- command.reset(new commands::mobile::OnKeyBoardInputNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnTouchEventID: {
- command.reset(new commands::mobile::OnTouchEventNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnSystemRequestID: {
- command.reset(new commands::mobile::OnSystemRequestNotification(message));
- break;
- }
- case mobile_apis::FunctionID::OnHashChangeID: {
- command.reset(new commands::mobile::OnHashChangeNotification(message));
- break;
- }
- default: {
- command.reset(new commands::GenericResponse(message));
- (*message)[strings::params][strings::function_id] =
- static_cast<int32_t>(mobile_apis::FunctionID::GenericResponseID);
- break;
- }
- }
-
- return command;
-}
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/mobile_message_handler.cc b/SDL_Core/src/components/application_manager/src/mobile_message_handler.cc
deleted file mode 100644
index 94c277288..000000000
--- a/SDL_Core/src/components/application_manager/src/mobile_message_handler.cc
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-
-#include "utils/macro.h"
-#include "application_manager/mobile_message_handler.h"
-#include "protocol_handler/service_type.h"
-#include "protocol_handler/protocol_payload.h"
-#include "utils/bitstream.h"
-
-#include <stdint.h>
-#include <memory>
-
-namespace {
-const uint8_t kRequest = 0x0;
-const uint8_t kResponse = 0x1;
-const uint8_t kNotification = 0x2;
-const uint8_t kUnknown = 0xF;
-}
-
-namespace application_manager {
-
-log4cxx::LoggerPtr MobileMessageHandler::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("MobileMessageHandler"));
-
-application_manager::Message*
-MobileMessageHandler::HandleIncomingMessageProtocolV1(
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger_,
- "MobileMessageHandler HandleIncomingMessageProtocolV1()");
- application_manager::Message* outgoing_message =
- new application_manager::Message(
- protocol_handler::MessagePriority::FromServiceType(
- message->service_type())
- );
- if (!message) {
- NOTREACHED();
- return NULL;
- }
-
- outgoing_message->set_connection_key(message->connection_key());
- outgoing_message->set_protocol_version(
- static_cast<application_manager::ProtocolVersion>(message
- ->protocol_version()));
- outgoing_message->set_json_message(
- std::string(reinterpret_cast<const char*>(message->data()),
- message->data_size()));
-
- if (outgoing_message->json_message().empty()) {
- return NULL;
- }
-
- return outgoing_message;
-}
-
-application_manager::Message*
-MobileMessageHandler::HandleIncomingMessageProtocolV2(
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger_,
- "MobileMessageHandler HandleIncomingMessageProtocolV2()");
-
- utils::BitStream message_bytestream(message->data(), message->data_size());
- protocol_handler::ProtocolPayloadV2 payload;
- protocol_handler::Extract(&message_bytestream, &payload,
- message->data_size());
-
- // Silently drop message if it wasn't parsed correctly
- if (message_bytestream.IsBad()) {
- LOG4CXX_INFO(logger_,
- "Drop ill-formed message from mobile, partially parsed: "
- <<payload);
- return NULL;
- }
-
- std::auto_ptr<application_manager::Message> outgoing_message(
- new application_manager::Message(
- protocol_handler::MessagePriority::FromServiceType(
- message->service_type())));
-
- outgoing_message->set_json_message(payload.json);
- outgoing_message->set_function_id(payload.header.rpc_function_id);
- outgoing_message->set_message_type(
- MessageTypeFromRpcType(payload.header.rpc_type));
- outgoing_message->set_correlation_id(int32_t(payload.header.corellation_id));
- outgoing_message->set_connection_key(message->connection_key());
- outgoing_message->set_protocol_version(
- static_cast<application_manager::ProtocolVersion>(message
- ->protocol_version()));
-
- if (!payload.data.empty()) {
- outgoing_message->set_binary_data(
- new application_manager::BinaryData(payload.data));
- }
- return outgoing_message.release();
-}
-
-protocol_handler::RawMessage*
-MobileMessageHandler::HandleOutgoingMessageProtocolV1(
- const MobileMessage& message) {
- LOG4CXX_INFO(logger_,
- "MobileMessageHandler HandleOutgoingMessageProtocolV1()");
- std::string messageString = message->json_message();
- if (messageString.length() == 0) {
- LOG4CXX_INFO(logger_,
- "Drop ill-formed message from mobile");
- return NULL;
- }
-
- uint8_t* rawMessage = new uint8_t[messageString.length() + 1];
- memcpy(rawMessage, messageString.c_str(), messageString.length() + 1);
-
- protocol_handler::RawMessage* result = new protocol_handler::RawMessage(
- message->connection_key(), 1, rawMessage, messageString.length() + 1);
-
- return result;
-}
-
-protocol_handler::RawMessage*
-MobileMessageHandler::HandleOutgoingMessageProtocolV2(
- const MobileMessage& message) {
- LOG4CXX_INFO(logger_,
- "MobileMessageHandler HandleOutgoingMessageProtocolV2()");
- if (message->json_message().length() == 0) {
- LOG4CXX_ERROR(logger_, "json string is empty.")
- }
- const uint32_t MAX_HEADER_SIZE = 12;
-
- uint32_t jsonSize = message->json_message().length();
- uint32_t binarySize = 0;
- if (message->has_binary_data()) {
- binarySize = message->binary_data()->size();
- }
-
- uint8_t* dataForSending = new uint8_t[MAX_HEADER_SIZE + jsonSize
- + binarySize];
- uint8_t offset = 0;
-
- uint8_t rpcTypeFlag = 0;
- switch (message->type()) {
- case application_manager::kRequest:
- rpcTypeFlag = kRequest;
- break;
- case application_manager::kResponse:
- rpcTypeFlag = kResponse;
- break;
- case application_manager::kNotification:
- rpcTypeFlag = kNotification;
- break;
- default:
- NOTREACHED();
- break;
- }
-
- uint32_t functionId = message->function_id();
- dataForSending[offset++] = ((rpcTypeFlag << 4) & 0xF0) | (functionId >> 24);
- dataForSending[offset++] = functionId >> 16;
- dataForSending[offset++] = functionId >> 8;
- dataForSending[offset++] = functionId;
-
- uint32_t correlationId = message->correlation_id();
- dataForSending[offset++] = correlationId >> 24;
- dataForSending[offset++] = correlationId >> 16;
- dataForSending[offset++] = correlationId >> 8;
- dataForSending[offset++] = correlationId;
-
- dataForSending[offset++] = jsonSize >> 24;
- dataForSending[offset++] = jsonSize >> 16;
- dataForSending[offset++] = jsonSize >> 8;
- dataForSending[offset++] = jsonSize;
-
- memcpy(dataForSending + offset, message->json_message().c_str(), jsonSize);
-
- if (message->has_binary_data()) {
- const std::vector<uint8_t>& binaryData = *(message->binary_data());
- uint8_t* currentPointer = dataForSending + offset + jsonSize;
- for (uint32_t i = 0; i < binarySize; ++i) {
- currentPointer[i] = binaryData[i];
- }
- }
-
- protocol_handler::RawMessage* msgToProtocolHandler =
- new protocol_handler::RawMessage(message->connection_key(), 2,
- dataForSending,
- MAX_HEADER_SIZE + jsonSize + binarySize);
-
- return msgToProtocolHandler;
-}
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/policies_manager/policies_manager.cc b/SDL_Core/src/components/application_manager/src/policies_manager/policies_manager.cc
deleted file mode 100644
index 408d26cd8..000000000
--- a/SDL_Core/src/components/application_manager/src/policies_manager/policies_manager.cc
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "application_manager/policies_manager/policies_manager.h"
-
-#include <algorithm>
-
-#include "json/json.h"
-#include "config_profile/profile.h"
-#include "utils/file_system.h"
-
-namespace FunctionID = mobile_apis::FunctionID;
-
-namespace {
-const char kRpcsKey[] = "rpcs";
-const char kHmiLevelsKey[] = "hmi_levels";
-
-std::pair<const char*, FunctionID::eType> kFunctionIDsInitializer[] = {
- std::make_pair("RegisterAppInterface", FunctionID::RegisterAppInterfaceID),
- std::make_pair("UnregisterAppInterface", FunctionID::UnregisterAppInterfaceID),
- std::make_pair("SetGlobalProperties", FunctionID::SetGlobalPropertiesID),
- std::make_pair("ResetGlobalProperties", FunctionID::ResetGlobalPropertiesID),
- std::make_pair("AddCommand", FunctionID::AddCommandID),
- std::make_pair("DeleteCommand", FunctionID::DeleteCommandID),
- std::make_pair("AddSubMenu", FunctionID::AddSubMenuID),
- std::make_pair("DeleteSubMenu", FunctionID::DeleteSubMenuID),
- std::make_pair("CreateInteractionChoiceSet", FunctionID::CreateInteractionChoiceSetID),
- std::make_pair("PerformInteraction", FunctionID::PerformInteractionID),
- std::make_pair("DeleteInteractionChoiceSet", FunctionID::DeleteInteractionChoiceSetID),
- std::make_pair("Alert", FunctionID::AlertID),
- std::make_pair("Show", FunctionID::ShowID),
- std::make_pair("Speak", FunctionID::SpeakID),
- std::make_pair("SetMediaClockTimer", FunctionID::SetMediaClockTimerID),
- std::make_pair("EncodedSyncPData", FunctionID::EncodedSyncPDataID),
- std::make_pair("SyncPData", FunctionID::SyncPDataID),
- std::make_pair("PerformAudioPassThru", FunctionID::PerformAudioPassThruID),
- std::make_pair("EndAudioPassThru", FunctionID::EndAudioPassThruID),
- std::make_pair("SubscribeButton", FunctionID::SubscribeButtonID),
- std::make_pair("UnsubscribeButton", FunctionID::UnsubscribeButtonID),
- std::make_pair("SubscribeVehicleData", FunctionID::SubscribeVehicleDataID),
- std::make_pair("UnsubscribeVehicleData", FunctionID::UnsubscribeVehicleDataID),
- std::make_pair("GetVehicleData", FunctionID::GetVehicleDataID),
- std::make_pair("ReadDID", FunctionID::ReadDIDID),
- std::make_pair("GetDTCs", FunctionID::GetDTCsID),
- std::make_pair("DiagnosticMessage", FunctionID::DiagnosticMessageID),
- std::make_pair("SystemRequest", FunctionID::SystemRequestID),
- std::make_pair("ScrollableMessage", FunctionID::ScrollableMessageID),
- std::make_pair("Slider", FunctionID::SliderID),
- std::make_pair("ShowConstantTBT", FunctionID::ShowConstantTBTID),
- std::make_pair("AlertManeuver", FunctionID::AlertManeuverID),
- std::make_pair("UpdateTurnList", FunctionID::UpdateTurnListID),
- std::make_pair("ChangeRegistration", FunctionID::ChangeRegistrationID),
- std::make_pair("GenericResponse", FunctionID::GenericResponseID),
- std::make_pair("PutFile", FunctionID::PutFileID),
- std::make_pair("DeleteFile", FunctionID::DeleteFileID),
- std::make_pair("ListFiles", FunctionID::ListFilesID),
- std::make_pair("SetAppIcon", FunctionID::SetAppIconID),
- std::make_pair("SetDisplayLayout", FunctionID::SetDisplayLayoutID),
- std::make_pair("OnHMIStatus", FunctionID::OnHMIStatusID),
- std::make_pair("OnAppInterfaceUnregistered", FunctionID::OnAppInterfaceUnregisteredID),
- std::make_pair("OnButtonEvent", FunctionID::OnButtonEventID),
- std::make_pair("OnButtonPress", FunctionID::OnButtonPressID),
- std::make_pair("OnVehicleData", FunctionID::OnVehicleDataID),
- std::make_pair("OnCommand", FunctionID::OnCommandID),
- std::make_pair("OnEncodedSyncPData", FunctionID::OnEncodedSyncPDataID),
- std::make_pair("OnTBTClientState", FunctionID::OnTBTClientStateID),
- std::make_pair("OnPermissionsChange", FunctionID::OnPermissionsChangeID),
- std::make_pair("OnAudioPassThru", FunctionID::OnAudioPassThruID),
- std::make_pair("OnLanguageChange", FunctionID::OnLanguageChangeID),
- std::make_pair("OnDriverDistraction", FunctionID::OnDriverDistractionID),
- std::make_pair("OnSyncPData", FunctionID::EncodedSyncPDataID)
-};
-std::map<std::string, FunctionID::eType> kFunctionIDs(kFunctionIDsInitializer,
- kFunctionIDsInitializer +
- ARRAYSIZE(kFunctionIDsInitializer));
-
-std::pair<const char*, mobile_apis::HMILevel::eType> kHmiLevelsInitializer[] = {
- std::make_pair("FULL", mobile_apis::HMILevel::HMI_FULL),
- std::make_pair("LIMITED", mobile_apis::HMILevel::HMI_LIMITED),
- std::make_pair("BACKGROUND", mobile_apis::HMILevel::HMI_BACKGROUND),
- std::make_pair("NONE", mobile_apis::HMILevel::HMI_NONE)
-};
-
-std::map<std::string, mobile_apis::HMILevel::eType> kHmiLevels(kHmiLevelsInitializer,
- kHmiLevelsInitializer +
- ARRAYSIZE(kHmiLevelsInitializer));
-} // namespace
-
-namespace application_manager {
-namespace policies_manager {
-
-//! ---------------------------------------------------------------------------
-
-log4cxx::LoggerPtr PoliciesManager::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("PoliciesManager"));
-
-//! ---------------------------------------------------------------------------
-
-PoliciesManager::PoliciesManager() {
-}
-
-PoliciesManager::~PoliciesManager() {
-}
-
-bool PoliciesManager::Init() {
- std::string json_string;
- std::string policies_file_name = profile::Profile::instance()
- ->policies_file_name();
- if (!file_system::FileExists(policies_file_name)) {
- return false;
- }
-
- if (!file_system::ReadFile(policies_file_name, json_string)) {
- return false;
- }
-
- try {
- Json::Reader reader_;
- Json::Value json_;
- bool parsedSuccess = reader_.parse(json_string, json_, false);
- if (!parsedSuccess) {
- LOG4CXX_ERROR(
- logger_,
- "Failed to parse JSON: " << reader_.getFormatedErrorMessages());
- return false;
- }
-
- if (!json_.isMember(kRpcsKey)) {
- LOG4CXX_ERROR(logger_, kRpcsKey << " doesn't exist.");
- return false;
- }
-
- const Json::Value& items = json_[kRpcsKey];
- for (Json::ValueIterator i = items.begin(); i != items.end(); ++i) {
- const Json::Value& item = i.key();
- HmiLevels hmi_levels;
-
- if (items.isMember(kHmiLevelsKey)) {
- continue;
- }
-
- const Json::Value levels = items[item.asString()][kHmiLevelsKey];
- for (uint32_t j = 0; j < levels.size(); ++j) {
- hmi_levels.push_back(kHmiLevels[levels[j].asString()]);
- }
-
- items_.insert(PoliciesItem(kFunctionIDs[item.asString()], hmi_levels));
- }
- } catch (...) {
- return false;
- }
-
- return true;
-}
-
-bool PoliciesManager::IsValidHmiStatus(FunctionID::eType function,
- mobile_apis::HMILevel::eType status) {
- if (items_.find(function) == items_.end()) {
- return false;
- }
-
- HmiLevels levels = items_[function];
- if (std::find(levels.begin(), levels.end(), status) != levels.end()) {
- return true;
- }
-
- return false;
-}
-
-} // namespace policies_manager
-} // namespace application_manager
-
diff --git a/SDL_Core/src/components/application_manager/src/request_controller.cc b/SDL_Core/src/components/application_manager/src/request_controller.cc
deleted file mode 100644
index 57e8b77c6..000000000
--- a/SDL_Core/src/components/application_manager/src/request_controller.cc
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "utils/logger.h"
-#include "config_profile/profile.h"
-#include "application_manager/request_controller.h"
-#include "application_manager/commands/command_request_impl.h"
-
-namespace application_manager {
-
-namespace request_controller {
-using namespace sync_primitives;
-
-log4cxx::LoggerPtr logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("RequestController"));
-
-RequestController::RequestController()
- : watchdog_(NULL) {
- LOG4CXX_INFO(logger_, "RequestController::RequestController()");
- watchdog_ = new request_watchdog::RequestWatchdog;
- watchdog_->AddListener(this);
-}
-
-RequestController::~RequestController() {
- LOG4CXX_INFO(logger_, "RequestController::~RequestController()");
- request_list_.clear();
-
- if (watchdog_) {
- watchdog_->RemoveListener(this);
- delete watchdog_;
- watchdog_ = NULL;
- }
-}
-
-RequestController::TResult RequestController::addRequest(
- const Request& request, const mobile_apis::HMILevel::eType& hmi_level) {
- LOG4CXX_INFO(logger_, "RequestController::addRequest()");
-
- RequestController::TResult result = RequestController::SUCCESS;
- {
- AutoLock auto_lock(request_list_lock_);
-
- const commands::CommandRequestImpl* request_impl =
- static_cast<commands::CommandRequestImpl*>(request.get());
-
- const uint32_t& app_hmi_level_none_time_scale =
- profile::Profile::instance()->app_hmi_level_none_time_scale();
-
- const uint32_t& app_hmi_level_none_max_request_per_time_scale =
- profile::Profile::instance()->app_hmi_level_none_time_scale_max_requests();
-
- const uint32_t& app_time_scale =
- profile::Profile::instance()->app_time_scale();
-
- const uint32_t& max_request_per_time_scale =
- profile::Profile::instance()->app_time_scale_max_requests();
-
- const uint32_t& pending_requests_amount =
- profile::Profile::instance()->pending_requests_amount();
-
- const mobile_apis::HMILevel::eType hmi_level =
- mobile_apis::HMILevel::HMI_NONE;
-
- if (false == watchdog_->checkHMILevelTimeScaleMaxRequest(hmi_level,
- request_impl->connection_key(), app_hmi_level_none_time_scale,
- app_hmi_level_none_max_request_per_time_scale)) {
- LOG4CXX_ERROR(logger_, "Too many application requests in hmi level NONE");
- result = RequestController::NONE_HMI_LEVEL_MANY_REQUESTS;
- } else if (false == watchdog_->checkTimeScaleMaxRequest(
- request_impl->connection_key(),
- app_time_scale, max_request_per_time_scale)) {
- LOG4CXX_ERROR(logger_, "Too many application requests");
- result = RequestController::TOO_MANY_REQUESTS;
- } else if (pending_requests_amount == request_list_.size()) {
- LOG4CXX_ERROR(logger_, "Too many pending request");
- result = RequestController::TOO_MANY_PENDING_REQUESTS;
- } else {
-
- request_list_.push_back(request);
-
- LOG4CXX_INFO(logger_, "Adding request to watchdog. Default timeout is "
- << request_impl->default_timeout());
-
- watchdog_->addRequest(new request_watchdog::RequestInfo(
- request_impl->function_id(),
- request_impl->connection_key(),
- request_impl->correlation_id(),
- request_impl->default_timeout(),
- hmi_level));
-
- LOG4CXX_INFO(logger_, "Added request to watchdog.");
- LOG4CXX_INFO(logger_, "RequestController size is " << request_list_.size());
- }
- }
-
- return result;
-}
-
-void RequestController::terminateRequest(
- const uint32_t& mobile_correlation_id) {
- LOG4CXX_INFO(logger_, "RequestController::terminateRequest()");
-
- {
- AutoLock auto_lock(request_list_lock_);
- std::list<Request>::iterator it = request_list_.begin();
- for (; request_list_.end() != it; ++it) {
- const commands::CommandRequestImpl* request_impl =
- static_cast<commands::CommandRequestImpl*>(it->get());
- if (request_impl->correlation_id() == mobile_correlation_id) {
- watchdog_->removeRequest(
- request_impl->connection_key(), request_impl->correlation_id());
- request_list_.erase(it);
- break;
- }
- }
- }
-}
-
-void RequestController::terminateAppRequests(
- const uint32_t& app_id) {
- LOG4CXX_INFO(logger_, "RequestController::terminateAppRequests()");
-
- {
- AutoLock auto_lock(request_list_lock_);
- std::list<Request>::iterator it = request_list_.begin();
- while (request_list_.end() != it) {
- const commands::CommandRequestImpl* request_impl =
- static_cast<commands::CommandRequestImpl*>(it->get());
- if (request_impl->connection_key() == app_id) {
- watchdog_->removeRequest(
- request_impl->connection_key(), request_impl->correlation_id());
- it = request_list_.erase(it);
- } else {
- ++it;
- }
- }
- }
-}
-
-void RequestController::updateRequestTimeout(
- const uint32_t& connection_key,
- const uint32_t& mobile_correlation_id,
- const uint32_t& new_timeout) {
- LOG4CXX_INFO(logger_, "RequestController::updateRequestTimeout()");
-
- watchdog_->updateRequestTimeout(connection_key,
- mobile_correlation_id,
- new_timeout);
-}
-
-void RequestController::onTimeoutExpired(
- const request_watchdog::RequestInfo& info) {
- LOG4CXX_INFO(logger_, "RequestController::onTimeoutExpired()");
-
- commands::CommandRequestImpl* request_impl = NULL;
- {
- AutoLock auto_lock(request_list_lock_);
- std::list<Request>::iterator it = request_list_.begin();
- for (; request_list_.end() != it; ++it) {
- request_impl = static_cast<commands::CommandRequestImpl*>(it->get());
- if (request_impl->correlation_id() == info.correlationID_ &&
- request_impl->connection_key() == info.connectionID_) {
- LOG4CXX_INFO(logger_, "Timeout for request id " << info.correlationID_
- << " of application " << info.connectionID_ << " expired");
- break;
- }
- }
- }
-
- if (request_impl) {
- request_impl->onTimeOut();
- }
-}
-
-} // namespace request_controller
-
-} // namespace application_manager
diff --git a/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp b/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp
deleted file mode 100644
index 587c312c6..000000000
--- a/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp
+++ /dev/null
@@ -1,529 +0,0 @@
-#include <fstream>
-
-#include "application_manager/resume_ctrl.h"
-#include "config_profile/profile.h"
-#include "utils/file_system.h"
-#include "connection_handler/connection_handler_impl.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application.h"
-#include "application_manager/message_helper.h"
-#include "smart_objects/smart_object.h"
-#include "connection_handler/connection.h"
-#include "formatters/CFormatterJsonBase.hpp"
-#include "application_manager/commands/command_impl.h"
-
-namespace application_manager {
- log4cxx::LoggerPtr ResumeCtrl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ResumeCtrl"));
-namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-
-ResumeCtrl::ResumeCtrl(ApplicationManagerImpl* app_mngr)
- : app_mngr_(app_mngr),
- timer_(this, &ResumeCtrl::onTimer) {
-}
-
-void ResumeCtrl::SaveAllApplications() {
- LOG4CXX_INFO(logger_, " ResumeCtrl::SaveApplications()");
- DCHECK(app_mngr_);
-
- std::set<ApplicationSharedPtr>::iterator it =
- app_mngr_->application_list_.begin();
- std::set<ApplicationSharedPtr>::iterator it_end =
- app_mngr_->application_list_.end();
- for (; it != it_end; ++it) {
- SaveApplication(*it);
- }
-}
-
-void ResumeCtrl::SaveApplication(ApplicationConstSharedPtr application) {
- LOG4CXX_INFO(logger_, " ResumeCtrl::SaveApplication");
- DCHECK(application.get());
-
- Json::Value* json_app = NULL;
- const uint32_t app_id = application->mobile_app_id()->asUInt();
- for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
- it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asUInt() == app_id) {
- json_app = &(*it);
- LOG4CXX_INFO(logger_, "ResumeCtrl Application with this id"
- "is already exist ( update info ) " << app_id);
- break;
- }
- }
-
- if (json_app == NULL) {
- LOG4CXX_INFO(logger_, "ResumeCtrl Application with this ID does not"
- "exist. Add new" << app_id);
- saved_applications_.push_back(Json::Value());
- json_app = &(saved_applications_.back());
- }
-
- uint32_t connection_key = application->app_id();
- (*json_app)[strings::app_id] = app_id;
- (*json_app)[strings::connection_key] = connection_key;
- (*json_app)[strings::hmi_level] =
- static_cast<int32_t> (application->hmi_level());
- (*json_app)[strings::ign_off_count] = 0;
- (*json_app)[strings::hash_id] = application->curHash();
- (*json_app)[strings::application_commands] =
- GetApplicationCommands(connection_key);
- (*json_app)[strings::application_choise_sets] =
- GetApplicationInteractionChoiseSets(connection_key);
- (*json_app)[strings::application_global_properties] =
- GetApplicationGlobalProperties(connection_key);
- (*json_app)[strings::application_subscribtions] =
- GetApplicationSubscriptions(connection_key);
- (*json_app)[strings::application_files] = GetApplicationFiles(connection_key);
- (*json_app)[strings::time_stamp] = (uint32_t)time(NULL);
-}
-
-void ResumeCtrl::LoadApplications() {
- LOG4CXX_INFO(logger_, "ResumeCtrl::LoadApplications");
- DCHECK(app_mngr_);
-
- const std::string& storage =
- profile::Profile::instance()->app_info_storage();
- Json::Value root;
- Json::Reader m_reader;
- std::ifstream file(file_system::FullPath(storage).c_str(),
- std::ios::in);
- if (!file.is_open()) {
- LOG4CXX_ERROR(logger_, "Error while opening file");
- return;
- }
-
- m_reader.parse(file, root);
- if (root.isNull()) {
- LOG4CXX_INFO(logger_, "There are no Saved applications");
- return;
- }
-
- for (Json::Value::iterator it = root.begin(); it != root.end(); ++it) {
- Json::Value cur_app_data = (*it);
- LOG4CXX_INFO(logger_, "Restored Application: " <<
- cur_app_data.toStyledString());
- saved_applications_.push_back(cur_app_data);
- uint32_t session_key = cur_app_data[strings::connection_key].asUInt();
- }
-}
-
-void ResumeCtrl::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::on_event ");
-}
-
-bool ResumeCtrl::RestoreApplicationHMILevel(ApplicationSharedPtr application) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::RestoreApplicationHMILevel");
- DCHECK(application.get());
-
- for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
- it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asUInt() ==
- application->mobile_app_id()->asUInt()) {
-
- mobile_apis::HMILevel::eType saved_hmi_level;
- mobile_apis::HMILevel::eType restored_hmi_level;
-
- saved_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
- (*it)[strings::hmi_level].asInt());
-
- if (saved_hmi_level == mobile_apis::HMILevel::HMI_FULL) {
- restored_hmi_level = app_mngr_->PutApplicationInFull(application);
- } else if (saved_hmi_level == mobile_apis::HMILevel::HMI_LIMITED) {
- restored_hmi_level = app_mngr_->PutApplicationInLimited(application);
- } else {
- restored_hmi_level = saved_hmi_level;
- application->set_hmi_level(saved_hmi_level);
- }
- MessageHelper::SendHMIStatusNotification(*(application.get()));
- LOG4CXX_INFO(logger_, "Restore Application "
- << (*it)[strings::app_id].asUInt()
- << " to HMILevel " << restored_hmi_level);
- return true;
- }
- }
-
- return false;
-}
-
-bool ResumeCtrl::RestoreApplicationData(ApplicationSharedPtr application) {
- LOG4CXX_INFO(logger_, "RestoreApplicationData");
- DCHECK(application.get());
-
- std::vector<Json::Value>::iterator it = saved_applications_.begin();
- for (; it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asUInt() ==
- application->mobile_app_id()->asUInt()) {
- break;
- }
- }
- if (it == saved_applications_.end()) {
- LOG4CXX_WARN(logger_,"Application not saved");
- return false;
- }
-
- Json::Value& saved_app = *it;
- MessageHelper::SmartObjectList requests;
-
- LOG4CXX_INFO(logger_, saved_app.toStyledString());
- Json::Value& app_commands = saved_app[strings::application_commands];
- Json::Value& app_choise_sets = saved_app[strings::application_choise_sets];
- Json::Value& global_properties = saved_app[strings::application_global_properties];
- Json::Value& subscribtions = saved_app[strings::application_subscribtions];
-
-
- //add commands
- for (Json::Value::iterator json_it = app_commands.begin();
- json_it != app_commands.end(); ++json_it) {
- Json::Value& json_command = *json_it;
- smart_objects::SmartObject message = smart_objects::SmartObject(
- smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(json_command, message);
- application->AddCommand(message[strings::cmd_id].asUInt(), message);
- }
-
- requests = MessageHelper::CreateAddCommandRequestToHMI(application);
-
- for (MessageHelper::SmartObjectList::iterator it = requests.begin();
- it != requests.end(); ++it) {
- ProcessHMIRequest(*it, true);
- }
-
- //add choisets
- for (Json::Value::iterator json_it = app_choise_sets.begin();
- json_it != app_choise_sets.end(); ++json_it) {
- Json::Value& json_choiset = *json_it;
- smart_objects::SmartObject msg_param = smart_objects::SmartObject(
- smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(json_choiset , msg_param);
- const int32_t choice_set_id = msg_param
- [strings::interaction_choice_set_id].asInt();
- application->AddChoiceSet(choice_set_id, msg_param);
- }
-
- //setglobal properties
- if (!global_properties.isNull()) {
- smart_objects::SmartObject properties_so = smart_objects::SmartObject(
- smart_objects::SmartType::SmartType_Map);
- Formatters::CFormatterJsonBase::jsonValueToObj(global_properties , properties_so);
-
- application->set_vr_help_title(
- properties_so.getElement(strings::vr_help_title));
- application->set_vr_help(
- properties_so.getElement(strings::vr_help));
- application->set_timeout_prompt(
- properties_so.getElement(strings::timeout_prompt));
- application->set_help_prompt(
- properties_so.getElement(strings::help_prompt));
- MessageHelper::SendGlobalPropertiesToHMI(application);
- }
-
- //subscribes
- if (!subscribtions.isNull()) {
- Json::Value& subscribtions_buttons = subscribtions[strings::application_buttons];
- Json::Value& subscribtions_ivi= subscribtions[strings::application_vehicle_info];
- for (Json::Value::iterator json_it = subscribtions_buttons.begin();
- json_it != subscribtions_buttons.end(); ++json_it) {
- mobile_apis::ButtonName::eType btn;
- btn = static_cast<mobile_apis::ButtonName::eType>((*json_it).asInt());
- application->SubscribeToButton(btn);
- }
-
- for (Json::Value::iterator json_it = subscribtions_ivi.begin();
- json_it != subscribtions_ivi.end(); ++json_it) {
- VehicleDataType ivi;
- ivi = static_cast<VehicleDataType>((*json_it).asInt());
- LOG4CXX_INFO(logger_, "VehicleDataType :" << ivi);
- bool result = application->SubscribeToIVI(ivi);
- LOG4CXX_INFO(logger_, "result = :" << result);
- }
- requests = MessageHelper::GetIVISubscribtionRequests(application->app_id());
-
- for (MessageHelper::SmartObjectList::iterator it = requests.begin();
- it != requests.end(); ++it) {
- ProcessHMIRequest(*it,true);
- }
- }
- return true;
-}
-
-bool ResumeCtrl::ApplicationIsSaved(const uint32_t app_id) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::ApplicationIsSaved " << app_id);
-
- for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
- it != saved_applications_.end(); ++it) {
- if ((*it)[strings::connection_key].asInt() == app_id) {
- return true;
- }
- }
- return false;
-}
-
-bool ResumeCtrl::RemoveApplicationFromSaved(ApplicationConstSharedPtr application) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::RemoveApplicationFromSaved ");
- DCHECK(application.get());
-
- for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
- it != saved_applications_.end(); ) {
- if ((*it)[strings::app_id].asUInt() == application->mobile_app_id()->asUInt()) {
- saved_applications_.erase(it);
- return true;
- } else {
- ++it;
- }
- }
- return false;
-}
-
-void ResumeCtrl::SavetoFileSystem() {
- LOG4CXX_INFO(logger_, "ResumeCtrl::SavetoFileSystem()");
-
- const std::string& storage =
- profile::Profile::instance()->app_info_storage();
- std::ofstream file(file_system::FullPath(storage).c_str(),
- std::ios::out);
- Json::Value to_save;
- for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
- it != saved_applications_.end(); ++it) {
- uint32_t ign_off_count = (*it)[strings::ign_off_count].asUInt();
- if (ign_off_count < kApplicationLifes) {
- ign_off_count++;
- (*it)[strings::ign_off_count] = ign_off_count;
- to_save.append(*it);
- }
- }
-
- if (file.is_open()) {
- file << to_save.toStyledString();
- } else {
- LOG4CXX_ERROR(logger_, "An error occurred during save");
- }
- file.close();
-}
-
-
-bool ResumeCtrl::StartResumption(ApplicationSharedPtr application,
- uint32_t hash) {
-
- LOG4CXX_INFO(logger_, "ResumeCtrl::StartResumption " << hash);
- DCHECK(application.get());
- sync_primitives::AutoLock auto_lock(queue_lock_);
-
- std::vector<Json::Value>::iterator it = saved_applications_.begin();
- for (; it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asUInt() ==
- application->mobile_app_id()->asUInt()) {
-
- uint32_t saved_hash = (*it)[strings::hash_id].asUInt();
- uint32_t time_stamp= (*it)[strings::time_stamp].asUInt();
- if (hash == saved_hash) {
- RestoreApplicationData(application);
- }
-
- waiting_for_timer_.insert(std::make_pair(application->app_id(),
- time_stamp));
- timer_.start(kTimeStep);
- return true;
- }
- }
-
- return false;
-}
-
-bool ResumeCtrl::CheckApplicationHash(uint32_t app_id, uint32_t hash) {
- std::vector<Json::Value>::iterator it = saved_applications_.begin();
- for (; it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asUInt() == app_id) {
- uint32_t saved_hash = (*it)[strings::hash_id].asUInt();
- if (hash == saved_hash) {
- return true;
- }
- }
- }
-
- return false;
-}
-
-void ResumeCtrl::onTimer() {
- LOG4CXX_INFO(logger_, "ResumeCtrl::onTimer()");
- sync_primitives::AutoLock auto_lock(queue_lock_);
-
- std::set<application_timestamp, TimeStampComparator>::iterator it=
- waiting_for_timer_.begin();
-
- for (; it != waiting_for_timer_.end(); ++it) {
- ApplicationSharedPtr app =
- ApplicationManagerImpl::instance()->application((*it).first);
- if (!app.get()) {
- LOG4CXX_ERROR(logger_, "Invalid app_id = " << (*it).first);
- break;
- }
-
- RestoreApplicationHMILevel(app);
- RemoveApplicationFromSaved(app);
- }
-
- waiting_for_timer_.clear();
-}
-
-Json::Value ResumeCtrl::GetApplicationCommands(const uint32_t app_id) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationCommands" << app_id);
-
- ApplicationConstSharedPtr app =
- ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- Json::Value result;
- const CommandsMap& commands = app->commands_map();
- CommandsMap::const_iterator it = commands.begin();
- for (;it != commands.end(); ++it) {
- smart_objects::SmartObject* so = it->second;
- Json::Value curr;
- Formatters::CFormatterJsonBase::objToJsonValue(*so, curr);
- result.append(curr);
- LOG4CXX_INFO(logger_, "Converted:" << curr.toStyledString());
- }
- return result;
-}
-
-Json::Value ResumeCtrl::GetApplicationInteractionChoiseSets(
- const uint32_t app_id) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationInteractionChoiseSets"
- << app_id);
-
- Json::Value result;
- ApplicationConstSharedPtr app =
- ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- const ChoiceSetMap& choices = app->choice_set_map();
- ChoiceSetMap::const_iterator it = choices.begin();
- for ( ;it != choices.end(); ++it) {
- smart_objects::SmartObject* so = it->second;
- Json::Value curr;
- Formatters::CFormatterJsonBase::objToJsonValue(*so, curr);
- result.append(curr);
- LOG4CXX_INFO(logger_, "Converted:" << curr.toStyledString());
- }
- return result;
-}
-
-Json::Value ResumeCtrl::GetApplicationGlobalProperties(const uint32_t app_id) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationGlobalProperties" << app_id);
-
- Json::Value result;
- ApplicationConstSharedPtr app =
- ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- const smart_objects::SmartObject* help_promt = app->help_prompt();
- const smart_objects::SmartObject* timeout_prompt = app->timeout_prompt();
- const smart_objects::SmartObject* vr_help = app->vr_help();
- const smart_objects::SmartObject* vr_help_title = app->vr_help_title();
- const smart_objects::SmartObject* vr_synonyms = app->vr_synonyms();
-
- Json::Value sgp;
- sgp[strings::help_prompt] = JsonFromSO(help_promt);
- sgp[strings::timeout_prompt] = JsonFromSO(timeout_prompt);
- sgp[strings::vr_help] = JsonFromSO(vr_help);
- sgp[strings::vr_help_title] = JsonFromSO(vr_help_title);
- sgp[strings::vr_synonyms] = JsonFromSO(vr_synonyms);
-
- return sgp;
-}
-
-Json::Value ResumeCtrl::GetApplicationSubscriptions(const uint32_t app_id) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationSubscriptions" << app_id);
-
- Json::Value result;
- ApplicationConstSharedPtr app =
- ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- std::set<mobile_apis::ButtonName::eType>::iterator it_button ;
- std::set<uint32_t>::iterator it_vehicle;
-
- for (it_button = app->SubscribedButtons().begin() ;
- it_button != app->SubscribedButtons().end(); ++it_button) {
- result[strings::application_buttons].append(*it_button);
- }
- for (it_vehicle = app->SubscribesIVI().begin();
- it_vehicle != app->SubscribesIVI().end(); ++it_vehicle) {
- result[strings::application_vehicle_info].append(*it_vehicle);
- }
- return result;
-}
-
-Json::Value ResumeCtrl::GetApplicationFiles(const uint32_t app_id) {
- LOG4CXX_INFO(logger_, "ResumeCtrl::GetApplicationFiles" << app_id);
-
- Json::Value result;
- ApplicationConstSharedPtr app =
- ApplicationManagerImpl::instance()->application(app_id);
- DCHECK(app.get());
-
- const AppFilesMap& app_files = app->getAppFiles();
- for(AppFilesMap::const_iterator file_it = app_files.begin();
- file_it != app_files.end(); file_it++) {
- const AppFile& file = file_it->second;
- if (file.is_persistent) {
- Json::Value file_data;
- file_data[strings::persistent_file] = file.is_persistent;
- file_data[strings::is_download_complete] = file.is_download_complete;
- file_data[strings::sync_file_name] = file.file_name;
- result.append(file_data);
- }
- }
- return result;
-}
-
-Json::Value ResumeCtrl::JsonFromSO(const smart_objects::SmartObject *so) {
- Json::Value temp;
- if (so) {
- Formatters::CFormatterJsonBase::objToJsonValue(*so, temp);
- }
- return temp;
-}
-
-bool ResumeCtrl::ProcessHMIRequest(smart_objects::SmartObject* request,
- bool use_events) {
- if (use_events) {
- const hmi_apis::FunctionID::eType function_id =
- static_cast<hmi_apis::FunctionID::eType>(
- (*request)[strings::function_id].asInt());
-
- const int32_t hmi_correlation_id =
- (*request)[strings::correlation_id].asInt();
- subscribe_on_event(function_id, hmi_correlation_id);
- }
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(request)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- return true;
- }
- return false;
-}
-
-void ResumeCtrl::SendHMIRequest(
- const hmi_apis::FunctionID::eType& function_id,
- const smart_objects::SmartObject* msg_params, bool use_events) {
-
- NsSmartDeviceLink::NsSmartObjects::SmartObject* result =
- MessageHelper::CreateModuleInfoSO(function_id);
- int32_t hmi_correlation_id =
- (*result)[strings::params][strings::correlation_id].asInt();
- if (use_events) {
- subscribe_on_event(function_id, hmi_correlation_id);
- }
-
- if (msg_params) {
- (*result)[strings::msg_params] = *msg_params;
- }
-
- if (!ApplicationManagerImpl::instance()->ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- }
-}
-
-} // namespace application_manager
-
-
-
diff --git a/SDL_Core/src/components/config_profile/CMakeLists.txt b/SDL_Core/src/components/config_profile/CMakeLists.txt
deleted file mode 100644
index c63d12e3c..000000000
--- a/SDL_Core/src/components/config_profile/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-include_directories (
- ./include
- ../utils/include/
- ../media_manager/include/
- ../protocol_handler/include
-)
-
-set (SOURCES
- ./src/profile.cc
- ./src/ini_file.cc
-)
-
-add_library("ConfigProfile" ${SOURCES})
-target_link_libraries ("ConfigProfile" Utils)
diff --git a/SDL_Core/src/components/config_profile/include/config_profile/ini_file.h b/SDL_Core/src/components/config_profile/include/config_profile/ini_file.h
deleted file mode 100644
index 764ff2f6c..000000000
--- a/SDL_Core/src/components/config_profile/include/config_profile/ini_file.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONFIG_PROFILE_INCLUDE_CONFIG_PROFILE_INI_FILE_H_
-#define SRC_COMPONENTS_CONFIG_PROFILE_INCLUDE_CONFIG_PROFILE_INI_FILE_H_
-
-#include <stdint.h>
-
-namespace profile {
-
-#define INI_FILE_VER 1000
-
-#if !defined TRUE
-#define TRUE 1
-#endif
-#if !defined True
-#define True 1
-#endif
-
-#if !defined FALSE
-#define FALSE 0
-#endif
-#if !defined False
-#define False 0
-#endif
-
-/*
- * @brief Global defines
- */
-#define INI_LINE_LEN 512
-#define INI_FILE_TEMP_NAME "ini.tmp"
-
-#define INI_FLAG_UPDATE 0x00
-#define INI_FLAG_ITEM_UP_CREA 0x01
-#define INI_FLAG_FILE_UP_CREA 0x10
-
-/*
- * @brief Global typedefs
- */
-typedef enum Ini_search_id_e {
- INI_NOTHING,
- INI_RIGHT_CHAPTER,
- INI_WRONG_CHAPTER,
- INI_RIGHT_ITEM,
- INI_WRONG_ITEM,
- INI_REMARK,
-
- INI_SEARCH_MAX
-} Ini_search_id;
-
-/*
- * @brief Prototypes of functions
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * @brief Write usage instructions to the end of the file
- * @param
- *
- * @return NULL if file or desired entry not found, otherwise pointer to fname
- */
-extern char* ini_write_inst(const char *fname,
- uint8_t flag);
-
-/*
- * @brief Read a certain item of the specified chapter of a ini-file
- *
- * @return NULL if file or desired entry not found, otherwise pointer to value
- */
-extern char* ini_read_value(const char *fname,
- const char *chapter,
- const char *item,
- char *value);
-
-/*
- * @brief Write a certain item of the specified chapter of a ini-file
- *
- * @return NULL if file not found, otherwise pointer to value
- */
-extern char ini_write_value(const char *fname,
- const char *chapter,
- const char *item,
- const char *value,
- uint8_t flag);
-
-/*
- * @brief Parse the given line for the item and returns the value if
- * there is one otherwise NULL
- *
- * @return NULL if desired entry not found, otherwise pointer to value
- */
-extern Ini_search_id ini_parse_line(const char *line,
- const char *tag,
- char *value);
-
-#ifdef __cplusplus
-}
-#endif
-
-} // namespace profile
-
-#endif // SRC_COMPONENTS_CONFIG_PROFILE_INCLUDE_CONFIG_PROFILE_INI_FILE_H_
diff --git a/SDL_Core/src/components/config_profile/include/config_profile/profile.h b/SDL_Core/src/components/config_profile/include/config_profile/profile.h
deleted file mode 100644
index 96b1525f8..000000000
--- a/SDL_Core/src/components/config_profile/include/config_profile/profile.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONFIG_PROFILE_INCLUDE_CONFIG_PROFILE_PROFILE_H_
-#define SRC_COMPONENTS_CONFIG_PROFILE_INCLUDE_CONFIG_PROFILE_PROFILE_H_
-
-#include <string>
-#include <vector>
-#include <stdint.h>
-#include "utils/macro.h"
-#include "utils/singleton.h"
-
-namespace profile {
-
-/**
- * The Profile class
- */
-class Profile : public utils::Singleton<Profile> {
- public:
- // Methods section
-
- /**
- * Destructor
- *
- * Unimplemented to avoid misusing
- *
- */
- virtual ~Profile();
-
- /**
- * @brief Returns the path to the config file
- */
- const std::string& config_file_name() const;
-
- /**
- * @brief Sets the path to the config file
- */
- void config_file_name(const std::string& fileName);
-
- /**
- * @brief Returns true if HMI should be started, otherwise false
- */
- bool launch_hmi() const;
-
- /**
- * @brief Returns server address
- */
- const std::string& server_address() const;
-
- /**
- * @brief Returns server port
- */
- const uint16_t& server_port() const;
-
- /**
- * @brief Returns port for video streaming
- */
- const uint16_t& video_streaming_port() const;
-
- /**
- * @brief Returns port for audio streaming
- */
- const uint16_t& audio_streaming_port() const;
-
- /**
- * @brief Returns policies file name
- */
- const std::string& policies_file_name() const;
-
- /**
- * @brief Returns hmi capabilities file name
- */
- const std::string& hmi_capabilities_file_name() const;
-
- /**
- * @brief Returns help promt vector
- */
- const std::vector<std::string>& help_prompt() const;
-
- /**
- * @brief Returns help promt vector
- */
- const std::vector<std::string>& time_out_promt() const;
-
- /**
- * @brief Returns vr commands default for all apps
- * such as Help.
- */
- const std::vector<std::string>& vr_commands() const;
-
- /**
- * @brief Maximum command id available for mobile app
- */
- const uint32_t& max_cmd_id() const;
-
- /**
- * @brief Default timeout for waiting for response to mobile app
- */
- const uint32_t& default_timeout() const;
-
- /**
- * @brief Default timeout for waiting for resuming
- */
- const uint32_t& app_resuming_timeout() const;
-
- /**
- * @brief Returns desirable thread stack size
- */
- const uint64_t& thread_min_stack_size() const;
-
- /**
- * @brief Returns true if audio mixing is supported
- */
- bool is_mixing_audio_supported() const;
-
- /**
- * @brief Returns true if video re-decoding enabled
- */
- bool is_redecoding_enabled() const;
-
- /**
- * @brief Returns title for Vr Help
- */
- const std::string& vr_help_title() const;
-
- /**
- * @brief Returns application directory quota size
- */
- const uint32_t& app_dir_quota() const;
-
- /**
- * @brief Returns the video server type
- */
- const std::string& video_server_type() const;
-
- /**
- * @brief Returns the audio server type
- */
- const std::string& audio_server_type() const;
-
- /**
- * @brief Returns the video pipe path
- */
- const std::string& named_video_pipe_path() const;
-
- /**
- * @brief Returns the audio pipe path
- */
- const std::string& named_audio_pipe_path() const;
-
- /**
- * @brief Returns time scale for max amount of requests for application
- * in hmi level none.
- */
- const uint32_t& app_hmi_level_none_time_scale() const;
-
- /**
- * @brief Returns path to testing file to which redirects video stream
- */
- const std::string& video_stream_file() const;
-
- /**
- * @brief Returns path to testing file to which redirects audio stream
- */
- const std::string& audio_stream_file() const;
-
- /**
- * @brief Returns allowable max amount of requests per time scale for
- * application in hmi level none
- *
- */
- const uint32_t& app_hmi_level_none_time_scale_max_requests() const;
-
- /**
- * @brief Returns application time scale for max amount of requests per it.
- */
- const uint32_t& app_time_scale() const;
-
- /**
- * @brief Returns allowable max amount of requests per application
- * time scale
- */
- const uint32_t& app_time_scale_max_requests() const;
-
- /**
- * @brief Returns allowable amount of the system pending requests
- */
- const uint32_t& pending_requests_amount() const;
-
- /**
- * @brief Returns Max allowed number of PutFile requests for one
- * application in NONE
- */
- const uint32_t& put_file_in_none() const;
-
- /**
- * @brief Returns Max allowed number of DeleteFile requests for one
- * application in NONE
- */
- const uint32_t& delete_file_in_none() const;
-
- /**
- * @brief Returns Max allowed number of ListFiles requests for one
- * application in NONE
- */
- const uint32_t& list_files_in_none() const;
-
- /*
- * @brief Returns file name for storing applications data
- */
- const std::string& app_info_storage() const;
-
- /*
- * @brief Heartbeat timeout before closing connection
- */
- const int32_t heart_beat_timeout() const;
-
- /*
- * @brief Timeout in transport manager before disconnect
- */
- uint32_t transport_manager_disconnect_timeout() const;
-
- /*
- * @brief Returns true if last state singleton is used
- */
- bool use_last_state() const;
-
- /**
- * @brief Returns supported diagnostic modes
- */
- const std::vector<uint32_t>& supported_diag_modes() const;
-
- // Members section
-
- protected:
- // Methods section
-
- // Members section
-
- private:
- // Methods section
-
- /**
- * Default constructor
- *
- * Unimplemented to avoid misusing
- *
- */
- Profile();
-
- /*
- * @brief Updates all related values from ini file
- */
- void UpdateValues();
-
- /**
- * @brief Reads a boolean value from the profile
- *
- * @param value The value to return
- * @param pSection The section to read the value in
- * @param pKey The key whose value needs to be read out
- *
- * @return FALSE if could not read the value out of the profile
- * (then the value is not changed)
- */
- bool ReadValue(bool* value,
- const char* const pSection,
- const char* const pKey) const;
-
- /**
- * @brief Reads a string value from the profile
- *
- * @param value The value to return
- * @param pSection The section to read the value in
- * @param pKey The key whose value needs to be read out
- *
- * @return FALSE if could not read the value out of the profile
- * (then the value is not changed)
- */
- bool ReadValue(std::string* value,
- const char* const pSection,
- const char* const pKey) const;
-
-
- /**
- * @brief Reads a string value from the profile
- *
- * @param value Result value
- * @param default_value Value to use key wasn't found
- * @param pSection The section to read the value in
- * @param pKey The key whose value needs to be read out
- *
- * @return FALSE if could not read the value out of the profile
- * (then the value is not changed)
- */
- bool ReadStringValue(std::string* value,
- const char* default_value,
- const char* const pSection,
- const char* const pKey) const;
-
- /**
- * @brief Reads an int32_t value from the profile
- *
- * @param value Result value
- * @param default_value Value to use key wasn't found
- * @param pSection The section to read the value in
- * @param pKey The key whose value needs to be read out
- *
- * @return FALSE if could not read the value out of the profile
- * (then the value is not changed)
- */
- bool ReadIntValue(int32_t* value,
- int32_t default_value,
- const char* const pSection,
- const char* const pKey) const;
-
- // Members section
- bool launch_hmi_;
- std::string config_file_name_;
- std::string server_address_;
- uint16_t server_port_;
- uint16_t video_streaming_port_;
- uint16_t audio_streaming_port_;
- std::string policies_file_name_;
- std::string hmi_capabilities_file_name_;
- std::vector<std::string> help_prompt_;
- std::vector<std::string> time_out_promt_;
- std::vector<std::string> vr_commands_;
- uint64_t min_tread_stack_size_;
- bool is_mixing_audio_supported_;
- bool is_redecoding_enabled_;
- uint32_t max_cmd_id_;
- uint32_t default_timeout_;
- uint32_t app_resuming_timeout_;
- std::string vr_help_title_;
- uint32_t app_dir_quota_;
- std::string video_consumer_type_;
- std::string audio_consumer_type_;
- std::string named_video_pipe_path_;
- std::string named_audio_pipe_path_;
- uint32_t app_hmi_level_none_time_scale_max_requests_;
- uint32_t app_hmi_level_none_requests_time_scale_;
- std::string video_stream_file_;
- std::string audio_stream_file_;
- uint32_t app_time_scale_max_requests_;
- uint32_t app_requests_time_scale_;
- uint32_t pending_requests_amount_;
- uint32_t put_file_in_none_;
- uint32_t delete_file_in_none_;
- uint32_t list_files_in_none_;
- std::string app_info_storage_;
- int32_t heart_beat_timeout_;
- uint32_t transport_manager_disconnect_timeout_;
- bool use_last_state_;
- std::vector<uint32_t> supported_diag_modes_;
-
- DISALLOW_COPY_AND_ASSIGN(Profile);
-
- FRIEND_BASE_SINGLETON_CLASS(Profile);
-};
-
-} // namespace profile
-
-#endif // SRC_COMPONENTS_CONFIG_PROFILE_INCLUDE_CONFIG_PROFILE_PROFILE_H_
diff --git a/SDL_Core/src/components/config_profile/src/ini_file.cc b/SDL_Core/src/components/config_profile/src/ini_file.cc
deleted file mode 100644
index f594f5097..000000000
--- a/SDL_Core/src/components/config_profile/src/ini_file.cc
+++ /dev/null
@@ -1,411 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config_profile/ini_file.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdint.h>
-
-#ifndef _WIN32
-#include <unistd.h>
-#else
-#define PATH_MAX _MAX_PATH
-#endif
-
-#ifdef __linux__
-#define USE_MKSTEMP 1
-#endif
-
-#include <string>
-
-namespace profile {
-
-char* ini_write_inst(const char *fname, uint8_t flag) {
- FILE *fp = 0;
-
- if (NULL == fname)
- return NULL;
- if ('\0' == *fname)
- return NULL;
-
- if ((fp = fopen(fname, "a")) == 0)
- if (flag & INI_FLAG_FILE_UP_CREA)
- if ((fp = fopen(fname, "w")) == 0)
- return NULL;
- if (0 == fp) {
- return NULL;
- }
- fprintf(fp, "\n");
- fprintf(fp, "; The INI-file consists of different chapters.\n");
- fprintf(fp, "; Each chapter begins with the line containing\n");
- fprintf(fp, "; the name in square brackets. Syntax:\n");
- fprintf(fp, "; [chapter]\n");
- fprintf(fp, "; The chapters consists of a set of items with a\n");
- fprintf(fp, "; assinged value. The syntax is:\n");
- fprintf(fp, "; item=value\n");
- fprintf(fp, "; All white spaces an second encounters of chapters\n");
- fprintf(fp, "; or items will be ignored.\n");
- fprintf(fp, "; Remarks start with semicolon or star as first character.\n");
- fprintf(fp, "; It is alowed for names of chapters and items to\n");
- fprintf(fp, "; contain semicolon and star. Possible syntax is:\n");
- fprintf(fp, "; [ chapter ] ;Remark\n");
- fprintf(fp, "; item = value\n");
- fprintf(fp, "\n");
-
- fclose(fp);
- return const_cast<char*>(fname);
-}
-
-char* ini_read_value(const char *fname,
- const char *chapter, const char *item, char *value) {
- FILE *fp = 0;
- bool chapter_found = false;
- char line[INI_LINE_LEN] = "";
- char val[INI_LINE_LEN] = "";
- char tag[INI_LINE_LEN] = "";
-
- Ini_search_id result;
- *line = '\0';
- *val = '\0';
- *tag = '\0';
- if ((NULL == fname) || (NULL == chapter) || (NULL == item) || (NULL == value))
- return NULL;
-
- *value = '\0';
- if (('\0' == *fname) || ('\0' == *chapter) || ('\0' == *item))
- return NULL;
-
- if ((fp = fopen(fname, "r")) == 0)
- return NULL;
-
- snprintf(tag, INI_LINE_LEN, "%s", chapter);
- for (int32_t i = 0; i < strlen(tag); i++) {
- tag[i] = toupper(tag[i]);
- }
-
- while (NULL != fgets(line, INI_LINE_LEN, fp)) {
- // Now start the line parsing
- result = ini_parse_line(line, tag, val);
- if (!chapter_found) {
- if (INI_RIGHT_CHAPTER == result) {
- chapter_found = true;
-
- snprintf(tag, INI_LINE_LEN, "%s", item);
- for (int32_t i = 0; i < strlen(tag); i++)
- tag[i] = toupper(tag[i]);
- }
- } else {
- // FIXME (dchmerev@gmail.com): Unnecessary condition
- if ((INI_RIGHT_CHAPTER == result) || (INI_WRONG_CHAPTER == result)) {
- fclose(fp);
- return NULL;
- }
- if (INI_RIGHT_ITEM == result) {
- fclose(fp);
- snprintf(value, INI_LINE_LEN, "%s", val);
- return value;
- }
- }
- }
-
- fclose(fp);
-
- return NULL;
-}
-
-char ini_write_value(const char *fname,
- const char *chapter, const char *item,
- const char *value, uint8_t flag) {
- FILE *rd_fp, *wr_fp = 0;
- uint16_t i, cr_count;
- int32_t wr_result;
- bool chapter_found = false;
- bool value_written = false;
- char line[INI_LINE_LEN] = "";
- char val[INI_LINE_LEN] = "";
- char tag[INI_LINE_LEN] = "";
- char temp_fname[PATH_MAX] = "";
- Ini_search_id result;
- *line = '\0';
- *val = '\0';
- *tag = '\0';
- *temp_fname = '\0';
-
- if ((NULL == fname) || (NULL == chapter) || (NULL == item) || (NULL == value))
- return FALSE;
- if (('\0' == *fname) || ('\0' == *chapter) || ('\0' == *item))
- return FALSE;
-
- if (0 == (rd_fp = fopen(fname, "r"))) {
- ini_write_inst(fname, flag);
- if (0 == (rd_fp = fopen(fname, "r")))
- return FALSE;
- }
-
-#if USE_MKSTEMP
- {
- char *temp_str;
- int32_t fd = -1;
- temp_str = static_cast<char*>(getenv("TMPDIR"));
- if (temp_str) {
- snprintf(temp_fname, PATH_MAX,
- "%s/ini.XXXXXX", temp_str);
-
- fd = mkstemp(temp_fname);
- if (-1 == fd) {
- return FALSE;
- }
- wr_fp = fdopen(fd, "w");
- if (NULL == wr_fp) {
- unlink(temp_fname);
- close(fd);
- return FALSE;
- }
- } else {
- return FALSE;
- }
- }
-#else // #if USE_MKSTEMP
- tmpnam(temp_fname);
- if (0 == (wr_fp = fopen(temp_fname, "w")))
- return FALSE;
-#endif // #else #if USE_MKSTEMP
-
- snprintf(tag, INI_LINE_LEN, "%s", chapter);
- for (int32_t i = 0; i < strlen (tag); i++)
- tag[i] = toupper(tag[i]);
-
- wr_result = 1; cr_count = 0;
- while ((NULL != fgets(line, INI_LINE_LEN, rd_fp)) && (0 < wr_result)) {
- // Now start the line parsing
- result = ini_parse_line(line, tag, val);
-
- if (!value_written) {
- if (!chapter_found) {
- if (INI_RIGHT_CHAPTER == result) {
- chapter_found = true;
- // coding style
- snprintf(tag, INI_LINE_LEN, "%s", item);
- for (int32_t i = 0; i < strlen (tag); i++)
- tag[i] = toupper(tag[i]);
- }
- } else {
- if ((INI_RIGHT_CHAPTER == result) || (INI_WRONG_CHAPTER == result)) {
- /* item not found but new capture */
- if (flag & INI_FLAG_ITEM_UP_CREA)
- fprintf(wr_fp, "%s=%s\n", item, value);
- /* The item must not update in an other chapter
- even it has the right name because only the
- first chapter is significant */
- value_written = true;
- } else if (result == INI_RIGHT_ITEM) {
- for (i = 0; i < cr_count; i++)
- fprintf(wr_fp, "\n");
- cr_count = 0;
- wr_result = fprintf(wr_fp, "%s=%s\n", item, value);
- value_written = true;
- continue;
- }
- }
- } /* if (!value_written) */
-
- if (0 == strcmp(val, "\n")) {
- cr_count++;
- } else {
- for (int32_t i = 0; i < cr_count; i++)
- fprintf(wr_fp, "\n");
- cr_count = 0;
- wr_result = fprintf(wr_fp, "%s", line);
- }
- }
- if (0 < (wr_result) && (!value_written)) {
- if (flag & INI_FLAG_ITEM_UP_CREA) {
- if (!chapter_found)
- fprintf(wr_fp, "\n[%s]\n", chapter);
- fprintf(wr_fp, "%s=%s\n", item, value);
- value_written = true;
- }
- }
- fprintf(wr_fp, "\n");
-
-
- fclose(wr_fp);
- fclose(rd_fp);
-
- remove(fname);
- if (0 != rename(temp_fname, fname)) {
- remove(temp_fname);
- return FALSE;
- }
-
- return (value_written);
-}
-
-Ini_search_id ini_parse_line(const char *line, const char *tag, char *value) {
- const char *line_ptr;
- char *temp_ptr;
- char temp_str[INI_LINE_LEN] = "";
- *temp_str = '\0';
-
- snprintf(value, INI_LINE_LEN, "%s", line);
-
- /* cut leading spaces */
- line_ptr = line;
- for (int32_t i = 0; i < strlen(line); i++) {
- if ((line[i] == ' ') ||
- (line[i] == 9) || // TAB
- (line[i] == 10) || // LF
- (line[i] == 13)) { // CR
- line_ptr++;
- } else {
- break;
- }
- }
- if ('\0' == *line_ptr) {
- snprintf(value, INI_LINE_LEN, "\n");
- return INI_NOTHING;
- }
-
- if ((*line_ptr == ';') || (*line_ptr == '*')) /* remark */
- return INI_REMARK;
-
- if (*line_ptr == '[' && strrchr(line_ptr, ']') != NULL) {
- line_ptr++;
-
- /* cut leading stuff */
- uint16_t len = strlen(line_ptr);
- for (int32_t i = 0; i < len; i++) {
- if ((*line_ptr == ' ') ||
- (*line_ptr == 9) || // TAB
- (*line_ptr == 10) || // LF
- (*line_ptr == 13)) { // CR
- line_ptr++;
- } else {
- break;
- }
- }
- if (*line_ptr == '\0')
- return INI_NOTHING;
-
- snprintf(temp_str, INI_LINE_LEN, "%s", line_ptr);
- temp_ptr = strrchr(temp_str, ']');
- if (NULL == temp_ptr) {
- return INI_NOTHING;
- } else {
- *temp_ptr = '\0';
- }
-
- /* cut trailing stuff */
- for (int32_t i = strlen(temp_str) - 1; i > 0; i--) {
- if ((temp_str[i] == ' ') ||
- (temp_str[i] == 9) || // TAB
- (temp_str[i] == 10) || // LF
- (temp_str[i] == 13)) { // CR
- temp_str[i] = '\0';
- } else {
- break;
- }
- }
-
- snprintf(value, INI_LINE_LEN, "%s", temp_str);
-
- for (int32_t i = 0; i < strlen(temp_str); i++)
- temp_str[i] = toupper(temp_str[i]);
- if (strcmp(temp_str, tag) == 0)
- return INI_RIGHT_CHAPTER;
- else
- return INI_WRONG_CHAPTER;
- }
-
- if (NULL != strchr(line_ptr, '=')) {
- strncpy(temp_str, line_ptr, (strchr(line_ptr, '=') - line_ptr));
- /* cut trailing stuff */
- for (int32_t i = strlen(temp_str) - 1; i > 0; i--) {
- if ((temp_str[i] == '=') ||
- (temp_str[i] == ' ') ||
- (temp_str[i] == 9) || // TAB
- (temp_str[i] == 10) || // LF
- (temp_str[i] == 13)) { // CR
- temp_str[i] = '\0';
- } else {
- break;
- }
- }
-
- snprintf(value, INI_LINE_LEN, "%s", temp_str);
-
- for (int32_t i = 0; i < strlen (temp_str); i++)
- temp_str[i] = toupper(temp_str[i]);
- if (strcmp(temp_str, tag) == 0) {
- line_ptr = strchr(line_ptr, '=') + 1;
- uint16_t len = strlen(line_ptr);
- /* cut trailing stuff */
- for (int32_t i = 0; i < len; i++) {
- if ((*line_ptr == ' ') ||
- (*line_ptr == 9) || // TAB
- (*line_ptr == 10) || // LF
- (*line_ptr == 13)) { // CR
- line_ptr++;
- } else {
- break;
- }
- }
-
- snprintf(value, INI_LINE_LEN, "%s", line_ptr);
-
- if (value[0] != '\0') {
- /* cut trailing stuff */
- for (int32_t i = strlen(value) - 1; i > 0; i--) {
- if ((value[i] == ' ') ||
- (value[i] == ';') ||
- (value[i] == 9) || // TAB
- (value[i] == 10) || // LF
- (value[i] == 13)) { // CR
- value[i] = '\0';
- } else {
- break;
- }
- }
- }
- return INI_RIGHT_ITEM;
- } else {
- return INI_WRONG_ITEM;
- }
- }
-
- return INI_NOTHING;
-}
-} // namespace profile
diff --git a/SDL_Core/src/components/config_profile/src/profile.cc b/SDL_Core/src/components/config_profile/src/profile.cc
deleted file mode 100644
index db4a0d5ec..000000000
--- a/SDL_Core/src/components/config_profile/src/profile.cc
+++ /dev/null
@@ -1,666 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config_profile/profile.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "config_profile/ini_file.h"
-#include "utils/logger.h"
-#include "utils/threads/thread.h"
-
-namespace {
-const char* kMainSection = "MAIN";
-// Heartbeat is disabled by default
-const uint32_t kDefaultHeartBeatTimeout = 0;
-}
-
-log4cxx::LoggerPtr logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("Profile"));
-
-namespace profile {
-Profile::Profile()
- : config_file_name_("smartDeviceLink.ini"),
- launch_hmi_(true),
- policies_file_name_("policy_table.json"),
- hmi_capabilities_file_name_("hmi_capabilities.json"),
- server_address_("127.0.0.1"),
- server_port_(8087),
- video_streaming_port_(5050),
- audio_streaming_port_(5080),
- help_prompt_(),
- time_out_promt_(),
- min_tread_stack_size_(threads::Thread::kMinStackSize),
- is_mixing_audio_supported_(false),
- is_redecoding_enabled_(false),
- max_cmd_id_(2000000000),
- default_timeout_(10000),
- app_resuming_timeout_(5),
- app_dir_quota_(104857600),
- app_hmi_level_none_time_scale_max_requests_(100),
- app_hmi_level_none_requests_time_scale_(10),
- app_time_scale_max_requests_(100),
- app_requests_time_scale_(10),
- pending_requests_amount_(1000),
- put_file_in_none_(5),
- delete_file_in_none_(5),
- list_files_in_none_(5),
- app_info_storage_("app_info.dat"),
- heart_beat_timeout_(kDefaultHeartBeatTimeout),
- transport_manager_disconnect_timeout_(0),
- use_last_state_(false),
- supported_diag_modes_() {
- UpdateValues();
-}
-
-Profile::~Profile() {
-}
-
-void Profile::config_file_name(const std::string& fileName) {
- if (false == fileName.empty()) {
- LOG4CXX_INFO(logger_, "setConfigFileName " << fileName);
- config_file_name_ = fileName;
- UpdateValues();
- }
-}
-
-const std::string& Profile::config_file_name() const {
- return config_file_name_;
-}
-
-bool Profile::launch_hmi() const {
- return launch_hmi_;
-}
-
-const std::string& Profile::policies_file_name() const {
- return policies_file_name_;
-}
-
-const std::string& Profile::hmi_capabilities_file_name() const {
- return hmi_capabilities_file_name_;
-}
-
-const std::string& Profile::server_address() const {
- return server_address_;
-}
-
-const std::vector<std::string>& Profile::help_prompt() const {
- return help_prompt_;
-}
-
-const std::vector<std::string>& Profile::time_out_promt() const {
- return time_out_promt_;
-}
-
-const std::vector<std::string>& Profile::vr_commands() const {
- return vr_commands_;
-}
-
-const uint32_t& Profile::max_cmd_id() const {
- return max_cmd_id_;
-}
-
-const uint32_t& Profile::default_timeout() const {
- return default_timeout_;
-}
-
-const uint32_t &Profile::app_resuming_timeout() const {
- return app_resuming_timeout_;
-}
-
-const std::string& Profile::vr_help_title() const {
- return vr_help_title_;
-}
-
-const uint16_t& Profile::server_port() const {
- return server_port_;
-}
-
-const uint16_t& Profile::video_streaming_port() const {
- return video_streaming_port_;
-}
-
-const uint16_t& Profile::audio_streaming_port() const {
- return audio_streaming_port_;
-}
-
-const uint64_t& Profile::thread_min_stack_size() const {
- return min_tread_stack_size_;
-}
-
-bool Profile::is_mixing_audio_supported() const {
- return is_mixing_audio_supported_;
-}
-
-const uint32_t& Profile::app_dir_quota() const {
- return app_dir_quota_;
-}
-
-bool Profile::is_redecoding_enabled() const {
- return is_redecoding_enabled_;
-}
-
-const std::string& Profile::video_server_type() const {
- return video_consumer_type_;
-}
-
-const std::string& Profile::audio_server_type() const {
- return audio_consumer_type_;
-}
-
-const std::string& Profile::named_video_pipe_path() const {
- return named_video_pipe_path_;
-}
-
-const std::string& Profile::named_audio_pipe_path() const {
- return named_audio_pipe_path_;
-}
-
-const uint32_t& Profile::app_hmi_level_none_time_scale() const {
- return app_hmi_level_none_requests_time_scale_;
-}
-
-const uint32_t& Profile::app_hmi_level_none_time_scale_max_requests() const {
- return app_hmi_level_none_time_scale_max_requests_;
-}
-
-const std::string& Profile::video_stream_file() const {
- return video_stream_file_;
-}
-
-const std::string& Profile::audio_stream_file() const {
- return audio_stream_file_;
-}
-
-const uint32_t& Profile::app_time_scale() const {
- return app_requests_time_scale_;
-}
-
-const uint32_t& Profile::app_time_scale_max_requests() const {
- return app_time_scale_max_requests_;
-}
-
-const uint32_t& Profile::pending_requests_amount() const {
- return pending_requests_amount_;
-}
-
-const uint32_t& Profile::put_file_in_none() const {
- return put_file_in_none_;
-}
-
-const uint32_t& Profile::delete_file_in_none() const {
- return delete_file_in_none_;
-}
-
-const uint32_t& Profile::list_files_in_none() const {
- return list_files_in_none_;
-}
-
-const std::string& Profile::app_info_storage() const {
- return app_info_storage_;
-}
-
-const int32_t Profile::heart_beat_timeout() const {
- return heart_beat_timeout_;
-}
-
-uint32_t Profile::transport_manager_disconnect_timeout() const {
- return transport_manager_disconnect_timeout_;
-}
-
-bool Profile::use_last_state() const {
- return use_last_state_;
-}
-
-const std::vector<uint32_t>& Profile::supported_diag_modes() const {
- return supported_diag_modes_;
-}
-
-void Profile::UpdateValues() {
- LOG4CXX_INFO(logger_, "Profile::UpdateValues");
-
- char value[INI_LINE_LEN + 1];
- *value = '\0';
-
- if ((0 != ini_read_value(config_file_name_.c_str(), "HMI", "LaunchHMI", value))
- && ('\0' != *value)) {
- if (0 == strcmp("true", value)) {
- launch_hmi_ = true;
- } else {
- launch_hmi_ = false;
- }
- LOG4CXX_INFO(logger_, "Set launch HMI to " << launch_hmi_);
- }
-
- if ((0
- != ini_read_value(config_file_name_.c_str(), "HMI", "ServerAddress",
- value)) && ('\0' != *value)) {
- server_address_ = value;
- LOG4CXX_INFO(logger_, "Set server address to " << server_address_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN", "PoliciesTable",
- value)) && ('\0' != *value)) {
- policies_file_name_ = value;
- LOG4CXX_INFO(logger_, "Set policy file to " << policies_file_name_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN", "HMICapabilities",
- value)) && ('\0' != *value)) {
- hmi_capabilities_file_name_ = value;
- LOG4CXX_INFO(
- logger_,
- "Set hmi capabilities file to " << hmi_capabilities_file_name_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "HMI", "ServerPort", value))
- && ('\0' != *value)) {
- server_port_ = atoi(value);
- LOG4CXX_INFO(logger_, "Set server port to " << server_port_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "HMI", "VideoStreamingPort",
- value)) && ('\0' != *value)) {
- video_streaming_port_ = atoi(value);
- LOG4CXX_INFO(logger_,
- "Set video streaming port to " << video_streaming_port_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "HMI", "AudioStreamingPort",
- value)) && ('\0' != *value)) {
- audio_streaming_port_ = atoi(value);
- LOG4CXX_INFO(logger_,
- "Set audio streaming port to " << audio_streaming_port_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN", "ThreadStackSize",
- value)) && ('\0' != *value)) {
- min_tread_stack_size_ = atoi(value);
- if (min_tread_stack_size_ < threads::Thread::kMinStackSize) {
- min_tread_stack_size_ = threads::Thread::kMinStackSize;
- }
- LOG4CXX_INFO(logger_,
- "Set threadStackMinSize to " << min_tread_stack_size_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MEDIA MANAGER",
- "EnableRedecoding", value)) && ('\0' != *value)) {
- if (0 == strcmp("true", value)) {
- is_redecoding_enabled_ = true;
- }
- LOG4CXX_INFO(logger_, "Set RedecodingEnabled to " << value);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MEDIA MANAGER",
- "VideoStreamConsumer", value)) && ('\0' != *value)) {
- video_consumer_type_ = value;
- LOG4CXX_INFO(logger_,
- "Set VideoStreamConsumer to " << video_consumer_type_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MEDIA MANAGER",
- "AudioStreamConsumer", value)) && ('\0' != *value)) {
- audio_consumer_type_ = value;
- LOG4CXX_INFO(logger_,
- "Set AudioStreamConsumer to " << audio_consumer_type_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MEDIA MANAGER",
- "NamedVideoPipePath", value)) && ('\0' != *value)) {
- named_video_pipe_path_ = value;
- LOG4CXX_INFO(logger_, "Set server address to " << named_video_pipe_path_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MEDIA MANAGER",
- "NamedAudioPipePath", value)) && ('\0' != *value)) {
- named_audio_pipe_path_ = value;
- LOG4CXX_INFO(logger_, "Set server address to " << named_audio_pipe_path_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MEDIA MANAGER",
- "VideoStreamFile", value)) && ('\0' != *value)) {
- video_stream_file_ = value;
- LOG4CXX_INFO(logger_, "Set video stream file to " << video_stream_file_);
- }
-
- *value = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(),
- "MEDIA MANAGER", "AudioStreamFile", value))
- && ('\0' != *value)) {
- audio_stream_file_ = value;
- LOG4CXX_INFO(logger_, "Set audio stream file to " << audio_stream_file_);
- }
-
- *value = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(),
- "MAIN", "MixingAudioSupported", value))
- && ('\0' != *value)) {
- if (0 == strcmp("true", value)) {
- is_mixing_audio_supported_ = true;
- }
- LOG4CXX_INFO(logger_, "Set MixingAudioSupported to " << value);
- }
-
- *value = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(), "MAIN", "MaxCmdID", value))
- && ('\0' != *value)) {
- max_cmd_id_ = atoi(value);
- if (max_cmd_id_ < 0) {
- max_cmd_id_ = 2000000000;
- }
- LOG4CXX_INFO(logger_, "Set Maximum Command ID to " << max_cmd_id_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "FILESYSTEM RESTRICTIONS",
- "PutFileRequest", value)) && ('\0' != *value)) {
- put_file_in_none_ = atoi(value);
- if (put_file_in_none_ < 0) {
- put_file_in_none_ = 5;
- }
- LOG4CXX_INFO(logger_, "Max allowed number of PutFile requests for one "
- "application in NONE to " << put_file_in_none_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "FILESYSTEM RESTRICTIONS",
- "DeleteFileRequest", value)) && ('\0' != *value)) {
- delete_file_in_none_ = atoi(value);
- if (delete_file_in_none_ < 0) {
- delete_file_in_none_ = 5;
- }
- LOG4CXX_INFO(logger_, "Max allowed number of DeleteFile requests for one "
- "application in NONE to " << delete_file_in_none_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "FILESYSTEM RESTRICTIONS",
- "ListFilesRequest", value)) && ('\0' != *value)) {
- list_files_in_none_ = atoi(value);
- if (list_files_in_none_ < 0) {
- list_files_in_none_ = 5;
- }
- LOG4CXX_INFO(logger_, "Max allowed number of ListFiles requests for one "
- "application in NONE to " << list_files_in_none_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN", "DefaultTimeout",
- value)) && ('\0' != *value)) {
- default_timeout_ = atoi(value);
- if (default_timeout_ <= 0) {
- default_timeout_ = 10000;
- }
- LOG4CXX_INFO(logger_, "Set Default timeout to " << default_timeout_);
- }
-
- *value = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(),
- "MAIN", "ApplicationResumingTimeout", value))
- && ('\0' != *value)) {
- app_resuming_timeout_ = atoi(value);
- if (app_resuming_timeout_ <= 0) {
- app_resuming_timeout_ = 5;
- }
- LOG4CXX_INFO(logger_, "Set Resuming timeout to " << app_resuming_timeout_);
- }
-
- *value = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(),
- "MAIN", "AppDirectoryQuota", value))
- && ('\0' != *value)) {
- app_dir_quota_ = atoi(value);
- if (app_dir_quota_ <= 0) {
- app_dir_quota_ = 104857600;
- }
- LOG4CXX_INFO(logger_, "Set App Directory Quota " << app_dir_quota_);
- }
-
- help_prompt_.clear();
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "GLOBAL PROPERTIES",
- "HelpPromt", value)) && ('\0' != *value)) {
- char* str = NULL;
- str = strtok(value, ",");
- while (str != NULL) {
- LOG4CXX_INFO(logger_, "Add HelpPromt string" << str);
- help_prompt_.push_back(std::string(str));
- str = strtok(NULL, ",");
- }
- }
-
- time_out_promt_.clear();
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "GLOBAL PROPERTIES",
- "TimeOutPromt", value)) && ('\0' != *value)) {
- char* str = NULL;
- str = strtok(value, ",");
- while (str != NULL) {
- LOG4CXX_INFO(logger_, "Add TimeOutPromt string" << str);
- time_out_promt_.push_back(std::string(str));
- str = strtok(NULL, ",");
- }
- }
-
- vr_help_title_ = "";
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "GLOBAL PROPERTIES",
- "HelpTitle", value)) && ('\0' != *value)) {
- vr_help_title_ = value;
- LOG4CXX_INFO(logger_, "Add HelpTitle string" << vr_help_title_);
- }
-
- vr_commands_.clear();
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "VR COMMANDS", "HelpCommand",
- value)) && ('\0' != *value)) {
- char* str = NULL;
- str = strtok(value, ",");
- while (str != NULL) {
- LOG4CXX_INFO(logger_, "Add vr command string" << str);
- vr_commands_.push_back(std::string(str));
- str = strtok(NULL, ",");
- }
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN",
- "AppTimeScaleMaxRequests", value))
- && ('\0' != *value)) {
- app_time_scale_max_requests_ = atoi(value);
- LOG4CXX_INFO(logger_, "Set max amount of requests per application"
- " time scale " << app_time_scale_max_requests_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN",
- "AppRequestsTimeScale", value)) && ('\0' != *value)) {
- app_requests_time_scale_ = atoi(value);
- LOG4CXX_INFO(logger_, "Set Application time scale for max amount"
- " of requests " << app_requests_time_scale_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN",
- "AppHMILevelNoneTimeScaleMaxRequests", value))
- && ('\0' != *value)) {
- app_hmi_level_none_time_scale_max_requests_ = atoi(value);
- LOG4CXX_INFO(logger_, "Set max amount of requests per application"
- " time scale " << app_hmi_level_none_time_scale_max_requests_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN",
- "AppHMILevelNoneRequestsTimeScale", value))
- && ('\0' != *value)) {
- app_hmi_level_none_requests_time_scale_ = atoi(value);
- LOG4CXX_INFO(logger_, "Set Application time scale for max amount"
- " of requests " << app_hmi_level_none_requests_time_scale_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN",
- "PendingRequestsAmount", value)) && ('\0' != *value)) {
- pending_requests_amount_ = atoi(value);
- if (app_dir_quota_ <= 0) {
- pending_requests_amount_ = 1000;
- }
- LOG4CXX_INFO(
- logger_,
- "Set system pending requests amount " << pending_requests_amount_);
- }
-
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "AppInfo", "AppInfoStorage",
- value)) && ('\0' != *value)) {
- app_info_storage_ = value;
- LOG4CXX_INFO(
- logger_,
- "Set Application information storage to " << app_info_storage_);
- }
-
- supported_diag_modes_.clear();
- *value = '\0';
- if ((0
- != ini_read_value(config_file_name_.c_str(), "MAIN",
- "SupportedDiagModes", value)) && ('\0' != *value)) {
- char* str = NULL;
- str = strtok(value, ",");
- while (str != NULL) {
- supported_diag_modes_.push_back(strtol(str, NULL, 16));
- str = strtok(NULL, ",");
- }
- }
-
- (void) ReadIntValue(&heart_beat_timeout_, kDefaultHeartBeatTimeout,
- kMainSection, "HeartBeatTimeout");
-}
-
-bool Profile::ReadValue(bool* value, const char* const pSection,
- const char* const pKey) const {
- bool ret = false;
-
- char buf[INI_LINE_LEN + 1];
- *buf = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(), pSection, pKey, buf))
- && ('\0' != *buf)) {
- const int32_t tmpVal = atoi(buf);
- if (0 == tmpVal) {
- *value = false;
- } else {
- *value = true;
- }
-
- ret = true;
- }
-
- return ret;
-}
-
-bool Profile::ReadValue(std::string* value, const char* const pSection,
- const char* const pKey) const {
- bool ret = false;
-
- char buf[INI_LINE_LEN + 1];
- *buf = '\0';
- if ((0 != ini_read_value(config_file_name_.c_str(), pSection, pKey, buf))
- && ('\0' != *buf)) {
- *value = buf;
- ret = true;
- }
-
- return ret;
-}
-
-bool Profile::ReadStringValue(std::string* value, const char* default_value,
- const char* const pSection,
- const char* const pKey) const {
- if (!ReadValue(value, pSection, pKey)) {
- *value = default_value;
- return false;
- }
- return true;
-}
-
-bool Profile::ReadIntValue(int32_t* value, int32_t default_value,
- const char* const pSection,
- const char* const pKey) const {
- std::string string_value;
- if (!ReadValue(&string_value, pSection, pKey)) {
- *value = default_value;
- return false;
- } else {
- *value = atoi(string_value.c_str());
- return true;
- }
-}
-
-} // namespace profile
diff --git a/SDL_Core/src/components/connection_handler/CMakeLists.txt b/SDL_Core/src/components/connection_handler/CMakeLists.txt
deleted file mode 100644
index 568960444..000000000
--- a/SDL_Core/src/components/connection_handler/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-include_directories (
- ./include/
- ../transport_manager/include/
- ../protocol_handler/include/
- ../config_profile/include/
- ../utils/include/
-)
-
-set (SOURCES
- ./src/connection_handler_impl.cc
- ./src/connection.cc
- ./src/device.cc
- ./src/heartbeat_monitor.cc
-)
-
-set(LIBRARIES
- ConfigProfile
-)
-
-add_library("connectionHandler" ${SOURCES})
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/connection.h b/SDL_Core/src/components/connection_handler/include/connection_handler/connection.h
deleted file mode 100644
index 7bad9027f..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/connection.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/**
- * \file Connection.hpp
- * \brief Connection class.
- * Stores connection information
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_H_
-
-#include <map>
-#include <vector>
-
-#include "utils/logger.h"
-#include "utils/lock.h"
-#include "connection_handler/device.h"
-#include "connection_handler/heartbeat_monitor.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink connection_handler namespace.
- */
-namespace connection_handler {
-
-class ConnectionHandler;
-
-/**
- * \brief Type for ConnectionHandle
- */
-typedef int32_t ConnectionHandle;
-
-/**
- * \brief Type for Connections map
- * Key is ConnectionHandle which is uniq
- */
-typedef std::map<int32_t, Connection*> ConnectionList;
-
-/**
- * \brief Type for Connections map iterator
- */
-typedef ConnectionList::iterator ConnectionListIterator;
-
-/**
- * \brief Type for Session Services
- */
-typedef std::vector<uint8_t> ServiceList;
-
-/**
- * \brief Type for Services iterator
- */
-typedef std::vector<uint8_t>::iterator ServiceListIterator;
-
-/**
- * \brief Type for Services iterator
- */
-typedef std::vector<uint8_t>::const_iterator ServiceListConstIterator;
-
-/**
- * \brief Type for Services iterator
- */
-typedef std::map<uint8_t, ServiceList> SessionMap;
-
-/**
- * \brief Type for Services iterator
- */
-typedef std::map<uint8_t, ServiceList>::iterator SessionMapIterator;
-
-/**
- * \brief Type for Services const iterator
- */
-typedef std::map<uint8_t, ServiceList>::const_iterator SessionMapConstIterator;
-
-/**
- * \class Connection
- * \brief Connection class
- */
-class Connection {
- public:
- /**
- * \brief Class constructor
- */
- Connection(ConnectionHandle connection_handle,
- DeviceHandle connection_device_handle,
- ConnectionHandler* connection_handler,
- int32_t heartbeat_timeout);
-
- /**
- * \brief Destructor
- */
- ~Connection();
-
- /**
- * \brief Returns device handle
- * \return DeviceHandle
- */
- ConnectionHandle connection_handle() const;
-
- /**
- * \brief Returns connection device handle
- * \return ConnectionDeviceHandle
- */
- DeviceHandle connection_device_handle();
-
- /**
- * \brief Adds session to connection
- * \return sessionID or -1 in case of issues
- */
- int32_t AddNewSession();
-
- /**
- * \brief Removes session from connection
- * \param aSession session ID
- * \return sessionID or -1 in case of issues
- */
- int32_t RemoveSession(uint8_t session);
-
- /**
- * \brief Adds service to session
- * \return TRUE on success, otherwise FALSE
- */
- bool AddNewService(uint8_t session, uint8_t service);
-
- /**
- * \brief Removes service from session
- * \param aSession session ID
- * \return TRUE on success, otherwise FALSE
- */
- bool RemoveService(uint8_t session, uint8_t service);
-
- /**
- * \brief Returns map of sessions which have been opened in
- * current connection.
- */
- const SessionMap session_map() const;
-
- /*
- * \brief Close this connection and all associated sessions
- */
- void Close();
-
- /*
- * \brief Prevent this connection from being closed by heartbeat timeout
- */
- void KeepAlive();
-
- private:
- ConnectionHandler* connection_handler_;
-
- /**
- * \brief Current connection handle.
- */
- ConnectionHandle connection_handle_;
-
- /**
- * \brief DeviceHandle of this connection.
- */
- DeviceHandle connection_device_handle_;
-
- /**
- * \brief session/services map
- */
- SessionMap session_map_;
-
- mutable sync_primitives::Lock session_map_lock_;
-
- /*
- * \brief monitor that closes connection if there is no traffic over it
- */
- HeartBeatMonitor heartbeat_monitor_;
-
- /**
- * \brief For logging.
- */
- static log4cxx::LoggerPtr logger_;
-};
-
-}/* namespace connection_handler */
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_H_
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler.h b/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler.h
deleted file mode 100644
index ca061bc30..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * \file connection_handler.hpp
- * \brief Connection handler interface class.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_H_
-
-#include "transport_manager/transport_manager_listener.h"
-#include "protocol_handler/session_observer.h"
-#include "connection_handler/connection_handler_observer.h"
-#include "connection_handler/device.h"
-#include "connection_handler/connection.h"
-#include "connection_handler/devices_discovery_starter.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink connection_handler namespace.
- */
-namespace connection_handler {
-/**
- * \class ConnectionHandler
- * \brief SmartDeviceLink ConnectionHandler interface class
- */
-class ConnectionHandler {
- public:
- /**
- * \brief Sets observer pointer for ConnectionHandler.
- * \param observer Pointer to observer object.
- **/
- virtual void set_connection_handler_observer(
- ConnectionHandlerObserver* observer) = 0;
-
- /**
- * \brief Sets pointer to TransportManager.
- * \param transportManager Pointer to TransportManager object.
- **/
- virtual void set_transport_manager(
- transport_manager::TransportManager* transport_manager) = 0;
-
- virtual void StartTransportManager() = 0;
-
- virtual void ConnectToDevice(
- connection_handler::DeviceHandle device_handle) = 0;
-
- /*
- * Close all associated sessions and close the connection pointed by handle
- */
- virtual void CloseConnection(ConnectionHandle connection_handle) = 0;
-
-
- protected:
- /**
- * \brief Destructor
- */
- virtual ~ConnectionHandler() {
- }
-};
-}/* namespace connection_handler */
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_H_
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_impl.h b/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
deleted file mode 100644
index 31277b4c7..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/**
- * \file connection_handlerImpl.hpp
- * \brief Connection handler class.
- * Observes TransportManager and ProtocolHandler, stores information regarding connections
- * and sessions and provides it to AppManager.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_IMPL_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_IMPL_H_
-
-#include <map>
-#include <list>
-#include <string>
-
-#include "transport_manager/transport_manager_listener_empty.h"
-#include "protocol_handler/session_observer.h"
-#include "transport_manager/transport_manager_listener_empty.h"
-#include "connection_handler/connection_handler_observer.h"
-#include "connection_handler/device.h"
-#include "connection_handler/connection.h"
-#include "connection_handler/devices_discovery_starter.h"
-#include "connection_handler/connection_handler.h"
-#include "utils/logger.h"
-#include "utils/macro.h"
-#include "utils/lock.h"
-#include "utils/stl_utils.h"
-#include "utils/singleton.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink connection_handler namespace.
- */
-namespace connection_handler {
-/**
- * \class ConnectionHandlerImpl
- * \brief SmartDeviceLink connection_handler main class
- */
-class ConnectionHandlerImpl : public ConnectionHandler,
- public transport_manager::TransportManagerListenerEmpty,
- public protocol_handler::SessionObserver,
- public DevicesDiscoveryStarter,
- public utils::Singleton<ConnectionHandlerImpl> {
- public:
- /**
- * \brief Destructor
- */
- virtual ~ConnectionHandlerImpl();
-
- /**
- * \brief Sets observer pointer for connection_handler.
- * \param observer Pointer to observer object.
- **/
- virtual void set_connection_handler_observer(
- ConnectionHandlerObserver* observer);
-
- /**
- * \brief Sets pointer to TransportManager.
- * \param transportManager Pointer to TransportManager object.
- **/
- virtual void set_transport_manager(
- transport_manager::TransportManager* transport_mngr);
-
- /**
- * \brief Connects to all services of device
- * \param deviceHandle Handle of device to connect to
- */
- virtual void ConnectToDevice(connection_handler::DeviceHandle device_handle);
-
- virtual void StartTransportManager();
-
- virtual void OnDeviceListUpdated(
- const std::vector<transport_manager::DeviceInfo>&);
-
- /**
- * \brief Available devices list updated.
- *
- * Called when device scanning initiated with scanForNewDevices
- * is completed or devices connected via background procedures.
- *
- * \param DeviceList New list of available devices.
- **/
- virtual void OnDeviceFound(const transport_manager::DeviceInfo& device_info);
- virtual void OnDeviceAdded(const transport_manager::DeviceInfo& device_info);
- virtual void OnDeviceRemoved(const transport_manager::DeviceInfo& device_info);
-
- virtual void OnScanDevicesFinished();
- virtual void OnScanDevicesFailed(
- const transport_manager::SearchDeviceError& error);
-
- /**
- * \brief Notifies about established connection.
- *
- * \param connection_id ID of new connection.
- **/
- virtual void OnConnectionEstablished(
- const transport_manager::DeviceInfo& device_info,
- const transport_manager::ConnectionUID& connection_id);
- virtual void OnConnectionFailed(
- const transport_manager::DeviceInfo& device_info,
- const transport_manager::ConnectError& error);
- virtual void OnConnectionClosed(
- transport_manager::ConnectionUID connection_id);
- virtual void OnConnectionClosedFailure(
- transport_manager::ConnectionUID connection_id,
- const transport_manager::DisconnectError& error);
- virtual void OnUnexpectedDisconnect(
- transport_manager::ConnectionUID connection_id,
- const transport_manager::CommunicationError& error);
- virtual void OnDeviceConnectionLost(
- const connection_handler::DeviceHandle& device,
- const transport_manager::DisconnectDeviceError& error);
- /**
- * \brief Informs about failure during DisconnectDevice procedure of TM
- * \param device Information about disconnected device
- * \param error Information about possible reason of loosing connection
- */
- virtual void OnDisconnectFailed(
- const connection_handler::DeviceHandle& device,
- const transport_manager::DisconnectDeviceError& error);
-
- /**
- * \brief Callback function used by ProtocolHandler
- * when Mobile Application initiates start of new session.
- * \param connection_handle Connection identifier whithin which session has to be started.
- * \param sessionId Identifier of the session to be started
- * \return int32_t Id (number) of new session if successful otherwise -1.
- */
- virtual int32_t OnSessionStartedCallback(
- const transport_manager::ConnectionUID& connection_handle,
- const uint8_t& session_id,
- const protocol_handler::ServiceType& service_type);
-
- /**
- * \brief Callback function used by ProtocolHandler
- * when Mobile Application initiates session ending.
- * \param connection_handle Connection identifier whithin which session exists
- * \param sessionId Identifier of the session to be ended
- * \param hashCode Hash used only in second version of SmartDeviceLink protocol.
- * If not equal to hash assigned to session on start then operation fails.
- * \return int32_t -1 if operation fails session key otherwise
- */
- virtual uint32_t OnSessionEndedCallback(
- const transport_manager::ConnectionUID& connection_handle,
- const uint8_t& session_id, const uint32_t& hashCode,
- const protocol_handler::ServiceType& service_type);
-
- /**
- * \brief Creates unique identifier of session (can be used as hash)
- * from given connection identifier
- * whithin which session exists and session number.
- * \param connection_handle Connection identifier whithin which session exists
- * \param sessionId Identifier of the session
- * \return int32_t Unique key for session
- */
- virtual uint32_t KeyFromPair(
- transport_manager::ConnectionUID connection_handle,
- uint8_t session_id);
-
- /**
- * \brief Returns connection identifier and session number from given session key
- * \param key Unique key used by other components as session identifier
- * \param connection_handle Returned: Connection identifier whithin which session exists
- * \param sessionId Returned: Number of session
- */
- virtual void PairFromKey(uint32_t key,
- transport_manager::ConnectionUID* connection_handle,
- uint8_t* session_id);
-
- /**
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- virtual int32_t GetDataOnSessionKey(uint32_t key, uint32_t* app_id = 0,
- std::list<int32_t>* sessions_list = NULL,
- uint32_t* device_id = 0);
-
- /**
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- virtual int32_t GetDataOnDeviceID(connection_handler::DeviceHandle device_handle,
- std::string* device_name = NULL,
- std::list<uint32_t>* applications_list = NULL,
- std::string* mac_address = NULL);
-
-
- /**
- * \brief Method which should start devices discoveryng
- */
- virtual void StartDevicesDiscovery();
-
- /*
- * Close all associated sessions and close the connection associated with the key
- */
- virtual void CloseConnection(uint32_t key);
-
- /*
- * Close all associated sessions and close the connection pointed by handle
- */
- virtual void CloseConnection(ConnectionHandle connection_handle) OVERRIDE;
-
- /*
- * Keep connection associated with the key from being closed by heartbeat monitor
- */
- void KeepConnectionAlive(uint32_t connection_key);
- private:
- /**
- * \brief Default class constructor
- */
- ConnectionHandlerImpl();
-
- /**
- * \brief Checks does device exist in list from TransportManager
- * \param DeviceHandle Handle of device for checking.
- * \param DeviceHandle Handle of device for checking.
- * \return True if device exists.
- */
- bool DoesDeviceExistInTMList(
- const std::vector<transport_manager::DeviceInfo>& device_list,
- const connection_handler::DeviceHandle device_handle);
-
- /**
- * \brief Checks does device exist in list and adds if not
- * \param DeviceHandle Handle of device for checking.
- * \return True if device was added
- */
- bool AddDeviceInDeviceListIfNotExist(
- const transport_manager::DeviceInfo& device);
-
- /**
- * \brief Disconnect application.
- *
- * \param device_handle DeviceHandle of disconnected device.
- * \param connection_handle Connection handle.
- **/
- void RemoveConnection(const ConnectionHandle connection_handle);
-
- void OnConnectionEnded(
- const transport_manager::ConnectionUID& connection_id);
-
- /**
- * \brief Pointer to observer
- */
- ConnectionHandlerObserver* connection_handler_observer_;
-
- /**
- * \brief Pointer to TransportManager
- */
- transport_manager::TransportManager* transport_manager_;
-
- /**
- * \brief List of devices
- */
- DeviceList device_list_;
-
- /**
- * \brief List of connections
- */
- ConnectionList connection_list_;
-
- /**
- * \brief Lock for applications list
- */
- sync_primitives::Lock connection_list_lock_;
-
- /*
- * \brief Cleans connection list on destruction
- */
- utils::StlMapDeleter<ConnectionList> connection_list_deleter_;
-
- /**
- *\brief For logging.
- */
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl);
-
- FRIEND_BASE_SINGLETON_CLASS(ConnectionHandlerImpl);
-};
-}/* namespace connection_handler */
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_IMPL_H_
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_observer.h b/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_observer.h
deleted file mode 100644
index 614311343..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/connection_handler_observer.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * \file connection_handlerObserver.hpp
- * \brief connection_handlerObserver class.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_OBSERVER_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_OBSERVER_H_
-
-#include "connection_handler/device.h"
-#include "connection_handler/connection.h"
-#include "protocol_handler/service_type.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink connection_handler namespace.
- */
-namespace connection_handler {
-
-/**
- * \class ConnectionHandlerObserver
- * \brief ConnectionHandlerObserver class
- */
-class ConnectionHandlerObserver {
- public:
- /**
- * \brief Available devices list updated.
- *
- * Called when device scanning initiated with scanForNewDevices
- * is completed.
- *
- * \param DeviceList New list of available devices.
- **/
- virtual void OnDeviceListUpdated(
- const connection_handler::DeviceList& device_list) = 0;
-
- /**
- * \brief Removes device.
- *
- * Called when device has been removed from a list.
- *
- * \param DeviceHandle Handle of removed device.
- **/
- virtual void RemoveDevice(
- const connection_handler::DeviceHandle& device_handle) = 0;
-
- /**
- * \brief Callback function used by connection_handler
- * when Mobile Application initiates start of new service.
- * \param deviceHandle Device identifier within which session has to be started.
- * \param sessionKey Key of started session.
- * \param type Established service type
- */
- virtual bool OnServiceStartedCallback(
- const connection_handler::DeviceHandle& device_handle,
- const int32_t& session_key,
- const protocol_handler::ServiceType& type) = 0;
-
- /**
- * \brief Callback function used by connection_handler
- * when Mobile Application initiates service ending.
- * \param sessionKey Key of session which should be ended
- */
- virtual void OnServiceEndedCallback(
- const int32_t& session_key,
- const protocol_handler::ServiceType& type) = 0;
-
- protected:
- /**
- * \brief Destructor
- */
- virtual ~ConnectionHandlerObserver() {
- }
-};
-}/* namespace connection_handler */
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_OBSERVER_H_
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/device.h b/SDL_Core/src/components/connection_handler/include/connection_handler/device.h
deleted file mode 100644
index b480aeb99..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/device.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * \file Device.hpp
- * \brief Device class.
- * Stores device information
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_DEVICE_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_DEVICE_H_
-
-#include <string>
-#include <map>
-#include <vector>
-#include "utils/logger.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink connection_handler namespace.
- */
-namespace connection_handler {
-
-/**
- * \brief Type for DeviceHandle
- */
-typedef uint32_t DeviceHandle;
-typedef std::vector<int32_t> AppList;
-
-/**
- * \class Device
- * \brief Connection class
- */
-class Device {
- public:
- /**
- * \brief Class constructor
- */
- Device(DeviceHandle device_handle, const std::string& user_friendly_name,
- const std::string& mac_address = "");
-
- /**
- * \brief Destructor
- */
- ~Device();
-
- /**
- * \brief Returns device handle
- * \return DeviceHandle
- */
- DeviceHandle device_handle() const;
-
- /**
- * \brief Returns user frendly device name
- * \return UserFriendlyName
- */
- std::string user_friendly_name() const;
-
- std::string mac_address() const;
-
- private:
- /**
- * \brief Uniq device handle.
- */
- DeviceHandle device_handle_;
-
- /**
- * \brief User-friendly device name.
- */
- std::string user_friendly_name_;
-
- /**
- * \brief Mac address of device if available
- */
- std::string mac_address_;
-
- /**
- * \brief For logging.
- */
- static log4cxx::LoggerPtr logger_;
-};
-
-/**
- * \brief Type for Devices map
- */
-typedef std::map<int32_t, Device> DeviceList;
-
-/**
- * \brief Type for Devices map iterator
- * Key is DeviceHandle which is uniq
- */
-typedef std::map<int32_t, Device>::iterator DeviceListIterator;
-
-}/* namespace connection_handler */
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_DEVICE_H_
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/devices_discovery_starter.h b/SDL_Core/src/components/connection_handler/include/connection_handler/devices_discovery_starter.h
deleted file mode 100644
index d2fb657db..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/devices_discovery_starter.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * \file DevicesDiscoveryStarter.hpp
- * \brief Starter of devices discovering process.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_DEVICES_DISCOVERY_STARTER_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_DEVICES_DISCOVERY_STARTER_H_
-
-#include "connection_handler/device.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink connection_handler namespace.
- */
-namespace connection_handler {
-/**
- * \class DevicesDiscoveryStarter
- * \brief Starter of devices discovering process class
- */
-class DevicesDiscoveryStarter {
- public:
- /**
- * \brief Method which should start devices discoveryng
- */
- virtual void StartDevicesDiscovery()=0;
-
- /**
- * \brief Connects to all services of device
- * \param deviceHandle Handle of device to connect to
- */
- virtual void ConnectToDevice(
- connection_handler::DeviceHandle device_handle) = 0;
-
- virtual void StartTransportManager() = 0;
-
- protected:
- /**
- * \brief Destructor
- */
- virtual ~DevicesDiscoveryStarter() {
- }
-};
-}/* namespace connection_handler */
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_CONNECTION_HANDLER_DEVICES_DISCOVERY_STARTER_H_
diff --git a/SDL_Core/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h b/SDL_Core/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h
deleted file mode 100644
index b43f0e90b..000000000
--- a/SDL_Core/src/components/connection_handler/include/connection_handler/heartbeat_monitor.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_HEARTBEAT_MONITOR_H_
-#define SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_HEARTBEAT_MONITOR_H_
-
-#include <stdint.h>
-#include <map>
-
-#include "utils/timer_thread.h"
-#include "utils/threads/thread_validator.h"
-#include "utils/macro.h"
-
-namespace connection_handler {
-
-class Connection;
-
-/*
- * Starts timer and when it elapses closes associated connection
- */
-class HeartBeatMonitor: public threads::SingleThreadSimpleValidator {
- public:
- HeartBeatMonitor(int32_t heartbeat_timeout_seconds,
- Connection* connection);
- ~HeartBeatMonitor();
- /*
- * \brief Starts connection monitoring.
- * Should be called when first session was opened.
- */
- void BeginMonitoring();
- /*
- * Resets keepalive timer preventing connection from being killed
- */
- void KeepAlive();
- private:
- void TimeOut();
- private:
- // \brief Heartbeat timeout, should be read from profile
- const int32_t heartbeat_timeout_seconds_;
- // \brief Connection that must be closed when timeout elapsed
- Connection* connection_;
- timer::TimerThread<HeartBeatMonitor> timer_;
- DISALLOW_COPY_AND_ASSIGN(HeartBeatMonitor);
-};
-
-} // namespace connection_handler
-
-#endif // SRC_COMPONENTS_CONNECTION_HANDLER_INCLUDE_HEARTBEAT_MONITOR_H_
diff --git a/SDL_Core/src/components/connection_handler/src/connection.cc b/SDL_Core/src/components/connection_handler/src/connection.cc
deleted file mode 100644
index 1ffecb506..000000000
--- a/SDL_Core/src/components/connection_handler/src/connection.cc
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * \file Connection.cpp
- * \brief Connection class implementation.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <algorithm>
-
-#include "connection_handler/connection.h"
-#include "connection_handler/connection_handler.h"
-#include "utils/macro.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink ConnectionHandler namespace.
- */
-namespace connection_handler {
-
-log4cxx::LoggerPtr Connection::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ConnectionHandler"));
-
-Connection::Connection(ConnectionHandle connection_handle,
- DeviceHandle connection_device_handle,
- ConnectionHandler* connection_handler,
- int32_t heartbeat_timeout)
- : connection_handler_(connection_handler),
- connection_handle_(connection_handle),
- connection_device_handle_(connection_device_handle),
- heartbeat_monitor_(heartbeat_timeout, this) {
- DCHECK(connection_handler_);
-}
-
-Connection::~Connection() {
- session_map_.clear();
-}
-
-int32_t Connection::AddNewSession() {
- sync_primitives::AutoLock lock(session_map_lock_);
-
- int32_t result = -1;
-
- if (session_map_.empty()) {
- heartbeat_monitor_.BeginMonitoring();
- }
-
- const uint8_t max_connections = 255;
- int32_t size = session_map_.size();
- if (max_connections > size) {
-
- ++size;
- /* whenever new session created RPC and Bulk services are
- established automatically */
- session_map_[size].push_back(
- static_cast<uint8_t>(protocol_handler::kRpc));
- session_map_[size].push_back(
- static_cast<uint8_t>(protocol_handler::kBulk));
-
- result = size;
- }
-
- return result;
-}
-
-int32_t Connection::RemoveSession(uint8_t session) {
- sync_primitives::AutoLock lock(session_map_lock_);
- int32_t result = -1;
- SessionMapIterator it = session_map_.find(session);
- if (session_map_.end() == it) {
- LOG4CXX_ERROR(logger_, "Session not found in this connection!");
- } else {
- session_map_.erase(session);
- result = session;
- }
-
- return result;
-}
-
-bool Connection::AddNewService(uint8_t session, uint8_t service) {
- sync_primitives::AutoLock lock(session_map_lock_);
- bool result = false;
-
- SessionMapIterator session_it = session_map_.find(session);
- if (session_it == session_map_.end()) {
- LOG4CXX_ERROR(logger_, "Session not found in this connection!");
- return result;
- }
-
- ServiceListIterator service_it = find(session_it->second.begin(),
- session_it->second.end(), service);
- if (service_it != session_it->second.end()) {
- LOG4CXX_ERROR(logger_, "Session " << session << " already established"
- " service " << service);
- } else {
- session_it->second.push_back(service);
- result = true;
- }
-
- return result;
-}
-
-bool Connection::RemoveService(uint8_t session, uint8_t service) {
- sync_primitives::AutoLock lock(session_map_lock_);
- bool result = false;
-
- SessionMapIterator session_it = session_map_.find(session);
- if (session_it == session_map_.end()) {
- LOG4CXX_ERROR(logger_, "Session not found in this connection!");
- return result;
- }
-
- ServiceListIterator service_it = find(session_it->second.begin(),
- session_it->second.end(), service);
- if (service_it != session_it->second.end()) {
- session_it->second.erase(service_it);
- result = true;
- } else {
- LOG4CXX_ERROR(logger_, "Session " << session << " didn't established"
- " service " << service);
- }
-
- return result;
-}
-
-ConnectionHandle Connection::connection_handle() const {
- return connection_handle_;
-}
-
-DeviceHandle Connection::connection_device_handle() {
- return connection_device_handle_;
-}
-
-const SessionMap Connection::session_map() const {
- sync_primitives::AutoLock lock(session_map_lock_);
- return session_map_;
-}
-
-void Connection::Close() {
- connection_handler_->CloseConnection(connection_handle_);
-}
-
-void Connection::KeepAlive() {
- heartbeat_monitor_.KeepAlive();
-}
-
-}/* namespace connection_handler */
diff --git a/SDL_Core/src/components/connection_handler/src/connection_handler_impl.cc b/SDL_Core/src/components/connection_handler/src/connection_handler_impl.cc
deleted file mode 100644
index 995526f13..000000000
--- a/SDL_Core/src/components/connection_handler/src/connection_handler_impl.cc
+++ /dev/null
@@ -1,580 +0,0 @@
-/**
- * \file ConnectionHandlerImpl.cpp
- * \brief Connection handler class.
- * \Observes TransportManager and ProtocolHandler, stores information regarding connections
- * \and sessions and provides it to AppManager.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include <string>
-#include <list>
-#include <algorithm>
-
-#include "connection_handler/connection_handler_impl.h"
-#include "transport_manager/info.h"
-#include "config_profile/profile.h"
-
-namespace {
-int32_t HeartBeatTimeout() {
- return profile::Profile::instance()->heart_beat_timeout();
-}
-}
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink ConnectionHandler namespace.
- */
-namespace connection_handler {
-
-ConnectionHandle HandleFromConnectionUID(transport_manager::ConnectionUID uid) {
- return ConnectionHandle(uid);
-}
-
-transport_manager::ConnectionUID ConnectionUIDFromHandle(ConnectionHandle handle) {
- return transport_manager::ConnectionUID(handle);
-}
-
-log4cxx::LoggerPtr ConnectionHandlerImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ConnectionHandler"));
-
-ConnectionHandlerImpl::ConnectionHandlerImpl()
- : connection_handler_observer_(NULL),
- transport_manager_(NULL),
- connection_list_deleter_(&connection_list_){
-}
-
-ConnectionHandlerImpl::~ConnectionHandlerImpl() {
- LOG4CXX_INFO(logger_, "Destructing ConnectionHandlerImpl.");
-}
-
-void ConnectionHandlerImpl::set_connection_handler_observer(
- ConnectionHandlerObserver* observer) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::set_connection_handler_observer()");
- if (!observer) {
- LOG4CXX_ERROR(logger_, "Null pointer to observer.");
- return;
- }
- connection_handler_observer_ = observer;
-}
-
-void ConnectionHandlerImpl::OnDeviceListUpdated(
- const std::vector<transport_manager::DeviceInfo>& device_info_list) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnDeviceListUpdated()");
-
- bool list_actually_changed = false;
-
- DeviceListIterator itr = device_list_.begin();
- while (itr != device_list_.end()) {
- if (!DoesDeviceExistInTMList(device_info_list, (*itr).first)) {
- // Device has been removed. Perform all needed actions.
- // 1. Delete all the connections and sessions of this device
- // 2. Delete device from a list
- // 3. Let observer know that device has been deleted.
- DeviceHandle device_for_remove_handle = (*itr).first;
- for (ConnectionListIterator it = connection_list_.begin();
- it != connection_list_.end(); ++it) {
- if (device_for_remove_handle
- == (*it).second->connection_device_handle()) {
- RemoveConnection((*it).first);
- }
- }
- itr = device_list_.erase(itr);
- list_actually_changed = true;
- if (connection_handler_observer_) {
- connection_handler_observer_->RemoveDevice(device_for_remove_handle);
- }
- }
- else {
- ++itr;
- }
- }
- for (std::vector<transport_manager::DeviceInfo>::const_iterator it_in =
- device_info_list.begin(); it_in != device_info_list.end(); ++it_in) {
- list_actually_changed |= AddDeviceInDeviceListIfNotExist((*it_in));
- }
- if (connection_handler_observer_ && list_actually_changed) {
- connection_handler_observer_->OnDeviceListUpdated(device_list_);
- }
-}
-
-void ConnectionHandlerImpl::OnDeviceFound(
- const transport_manager::DeviceInfo& device_info) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnDeviceFound()");
-}
-
-void ConnectionHandlerImpl::OnDeviceAdded(
- const transport_manager::DeviceInfo& device_info) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnDeviceAdded()");
-}
-
-void ConnectionHandlerImpl::OnDeviceRemoved(
- const transport_manager::DeviceInfo& device_info) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnDeviceRemoved()");
-}
-
-bool ConnectionHandlerImpl::DoesDeviceExistInTMList(
- const std::vector<transport_manager::DeviceInfo>& device_list,
- const connection_handler::DeviceHandle device_handle) {
- bool result = false;
- for (std::vector<transport_manager::DeviceInfo>::const_iterator it_in =
- device_list.begin();
- it_in != device_list.end();
- ++it_in) {
- if (it_in->device_handle() == device_handle) {
- result = true;
- break;
- }
- }
- return result;
-}
-
-bool ConnectionHandlerImpl::AddDeviceInDeviceListIfNotExist(
- const transport_manager::DeviceInfo& device_info) {
- DeviceListIterator it = device_list_.find(device_info.device_handle());
- if (device_list_.end() == it) {
- LOG4CXX_INFO(logger_, "Adding new device!");
- device_list_.insert(
- DeviceList::value_type(
- device_info.device_handle(),
- Device(device_info.device_handle(), device_info.name(),
- device_info.mac_address())));
- return true;
- }
- return false;
-}
-
-void ConnectionHandlerImpl::OnScanDevicesFinished() {
- LOG4CXX_INFO(logger_, "Scan devices finished successfully.");
-}
-
-void ConnectionHandlerImpl::OnScanDevicesFailed(
- const transport_manager::SearchDeviceError& error) {
- LOG4CXX_ERROR(logger_, "Failed to Scan devices.");
-}
-
-void ConnectionHandlerImpl::OnConnectionEstablished(
- const transport_manager::DeviceInfo& device_info,
- const transport_manager::ConnectionUID& connection_id) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnConnectionEstablished()");
-
- DeviceListIterator it = device_list_.find(device_info.device_handle());
- if (device_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown device!");
- return;
- }
- LOG4CXX_INFO(logger_, "Add Connection:" << connection_id << " to the list.");
- sync_primitives::AutoLock lock(connection_list_lock_);
- connection_list_.insert(
- ConnectionList::value_type(
- connection_id,
- new Connection(connection_id, device_info.device_handle(),
- this, HeartBeatTimeout())));
-}
-
-void ConnectionHandlerImpl::OnConnectionFailed(
- const transport_manager::DeviceInfo& device_info,
- const transport_manager::ConnectError& error) {
- // TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Failed connecting.");
-}
-
-void ConnectionHandlerImpl::OnConnectionClosed(
- transport_manager::ConnectionUID connection_id) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnConnectionClosed");
-
- OnConnectionEnded(connection_id);
-}
-
-void ConnectionHandlerImpl::OnConnectionClosedFailure(
- transport_manager::ConnectionUID connection_id,
- const transport_manager::DisconnectError& error) {
- // TODO(PV): implement
- LOG4CXX_ERROR(logger_, "ConnectionHandlerImpl::OnConnectionClosedFailure");
-}
-
-void ConnectionHandlerImpl::OnUnexpectedDisconnect(
- transport_manager::ConnectionUID connection_id,
- const transport_manager::CommunicationError& error) {
- LOG4CXX_ERROR(logger_, "ConnectionHandlerImpl::OnUnexpectedDisconnect");
-}
-
-void ConnectionHandlerImpl::OnDeviceConnectionLost(
- const transport_manager::DeviceHandle& device,
- const transport_manager::DisconnectDeviceError& error) {
- // TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Lost connection with device " << device);
-}
-
-void ConnectionHandlerImpl::OnDisconnectFailed(
- const transport_manager::DeviceHandle& device,
- const transport_manager::DisconnectDeviceError& error) {
- // TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Trying to Disconnect device failed.");
-}
-
-void ConnectionHandlerImpl::RemoveConnection(
- const ConnectionHandle connection_handle) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::RemoveConnection()");
-
- OnConnectionEnded(connection_handle);
-}
-
- int32_t ConnectionHandlerImpl::OnSessionStartedCallback(
- const transport_manager::ConnectionUID& connection_handle,
- const uint8_t& sessionId,
- const protocol_handler::ServiceType& service_type) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnSessionStartedCallback()");
-
- int32_t new_session_id = -1;
-
- sync_primitives::AutoLock lock(connection_list_lock_);
- ConnectionListIterator it = connection_list_.find(connection_handle);
- if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown connection!");
- return -1;
- }
-
- if ((0 == sessionId) && (protocol_handler::kRpc == service_type)) {
- new_session_id = (it->second)->AddNewSession();
- if (0 > new_session_id) {
- LOG4CXX_ERROR(logger_, "Not possible to start session!");
- return -1;
- }
- } else if ((0 != sessionId) && (protocol_handler::kRpc != service_type)) {
- if (!(it->second)->AddNewService(sessionId, service_type)) {
- LOG4CXX_ERROR(logger_, "Not possible to establish service!");
- return -1;
- }
- new_session_id = sessionId;
- } else {
- LOG4CXX_ERROR(logger_, "Not possible to establish service!");
- return -1;
- }
-
- if (connection_handler_observer_) {
- int32_t session_key = KeyFromPair(connection_handle, new_session_id);
-
- bool success = connection_handler_observer_->OnServiceStartedCallback(
- (it->second)->connection_device_handle(), session_key, service_type);
-
- if (!success && (protocol_handler::kRpc == service_type)) {
- (it->second)->RemoveSession(new_session_id);
- new_session_id = -1;
- } else if (!success) {
- (it->second)->RemoveService(sessionId, service_type);
- new_session_id = -1;
- }
- }
-
- return new_session_id;
-}
-
-uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
- const uint32_t& connection_handle, const uint8_t& sessionId,
- const uint32_t& hashCode,
- const protocol_handler::ServiceType& service_type) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::OnSessionEndedCallback()");
-
- int32_t result = -1;
- sync_primitives::AutoLock lock(connection_list_lock_);
- ConnectionListIterator it = connection_list_.find(connection_handle);
- if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown connection!");
- return result;
- }
-
- if (protocol_handler::kRpc == service_type) {
- LOG4CXX_INFO(logger_, "Session to be removed");
-
- result = (it->second)->RemoveSession(sessionId);
- if (0 > result) {
- LOG4CXX_ERROR(logger_, "Not possible to remove session!");
- return result;
- }
- } else {
- if (!(it->second)->RemoveService(sessionId, service_type)) {
- LOG4CXX_ERROR(logger_, "Not possible to remove service!");
- return result;
- }
- result = sessionId;
- }
-
- if (0 != connection_handler_observer_) {
- int32_t sessionKey = KeyFromPair(connection_handle, sessionId);
- connection_handler_observer_->OnServiceEndedCallback(sessionKey,
- service_type);
- result = sessionKey;
- }
-
- return result;
-}
-
-uint32_t ConnectionHandlerImpl::KeyFromPair(
- transport_manager::ConnectionUID connection_handle,
- uint8_t sessionId) {
- int32_t key = connection_handle | (sessionId << 16);
- LOG4CXX_INFO(
- logger_,
- "Key for ConnectionHandle:" << static_cast<int32_t>(connection_handle)
- << " Session:" << static_cast<int32_t>(sessionId) << " is: "
- << static_cast<int32_t>(key));
- return key;
-}
-
-void ConnectionHandlerImpl::PairFromKey(uint32_t key,
- uint32_t* connection_handle,
- uint8_t* sessionId) {
- *connection_handle = key & 0xFF00FFFF;
- *sessionId = key >> 16;
- LOG4CXX_INFO(
- logger_,
- "ConnectionHandle:" << static_cast<int32_t>(*connection_handle) << " Session:"
- << static_cast<int32_t>(*sessionId) << " for key:"
- << static_cast<int32_t>(key));
-}
-
-int32_t ConnectionHandlerImpl::GetDataOnSessionKey(uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::GetDataOnSessionKey");
-
- int32_t result = -1;
- transport_manager::ConnectionUID conn_handle = 0;
- uint8_t session_id = 0;
- PairFromKey(key, &conn_handle, &session_id);
- ConnectionListIterator it = connection_list_.find(conn_handle);
-
- if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown connection!");
- return result;
- }
-
- Connection& connection = *it->second;
- if (device_id) {
- *device_id = connection.connection_device_handle();
- }
-
- if (sessions_list) {
- sessions_list->clear();
- }
-
- if (0 == session_id) {
- LOG4CXX_INFO(logger_,
- "No sessions in connection " << static_cast<int32_t>(conn_handle));
- if (app_id) {
- *app_id = 0;
- }
- } else {
- if (app_id) {
- *app_id = KeyFromPair(conn_handle, session_id);
- }
-
- LOG4CXX_INFO(
- logger_,
- "Connection " << static_cast<int32_t>(conn_handle) << " has "
- << connection.session_map().size() << " sessions.");
-
- if (sessions_list) {
- const SessionMap& session_map = connection.session_map();
- for (SessionMapConstIterator session_it = session_map.begin(),
- end = session_map.end(); session_it != end; ++session_it) {
- sessions_list->push_back(KeyFromPair(conn_handle, it->first));
- }
- }
-
- result = 0;
- }
-
- return result;
-}
-
-int32_t ConnectionHandlerImpl::GetDataOnDeviceID(
- DeviceHandle device_handle, std::string* device_name,
- std::list<uint32_t>* applications_list,
- std::string* mac_address) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::GetDataOnDeviceID");
-
- int32_t result = -1;
- DeviceListIterator it = device_list_.find(device_handle);
- if (device_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Device not found!");
- return result;
- }
-
- if (device_name) {
- *device_name = (*it).second.user_friendly_name();
- }
-
- if (applications_list) {
- applications_list->clear();
- for (ConnectionListIterator itr = connection_list_.begin();
- itr != connection_list_.end(); ++itr) {
- if (device_handle == (*itr).second->connection_device_handle()) {
- const SessionMap& session_map = (itr->second)->session_map();
- for (SessionMapConstIterator session_it = session_map.begin(),
- end = session_map.end(); session_it != end; ++session_it) {
- applications_list->push_back(it->first);
- }
- }
- }
- }
-
- if (mac_address) {
- *mac_address = it->second.mac_address();
- }
-
- result = 0;
-
- return result;
-}
-
-void ConnectionHandlerImpl::set_transport_manager(
- transport_manager::TransportManager* transport_mngr) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::set_transport_manager()");
- if (!transport_mngr) {
- LOG4CXX_ERROR(logger_, "Null pointer to TransportManager.");
- return;
- }
- transport_manager_ = transport_mngr;
-}
-
-void ConnectionHandlerImpl::StartDevicesDiscovery() {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::StartDevicesDiscovery()");
-
- if (NULL == transport_manager_) {
- LOG4CXX_ERROR(logger_, "Null pointer to TransportManager.");
- return;
- }
- //transport_manager_->SearchDevices();
- if (connection_handler_observer_) {
- connection_handler_observer_->OnDeviceListUpdated(device_list_);
- }
-}
-
-void ConnectionHandlerImpl::ConnectToDevice(
- connection_handler::DeviceHandle device_handle) {
- connection_handler::DeviceList::const_iterator it_in;
- it_in = device_list_.find(device_handle);
- if (device_list_.end() != it_in) {
- LOG4CXX_INFO_EXT(logger_,
- "Connecting to device with handle " << device_handle);
- if (transport_manager_) {
- if (transport_manager::E_SUCCESS !=
- transport_manager_->ConnectDevice(device_handle)) {
- LOG4CXX_WARN(logger_, "Can't connect to device");
- }
- } else {
- LOG4CXX_ERROR(logger_, "Null pointer to TransportManager.");
- }
- } else {
- LOG4CXX_ERROR(
- logger_,
- "Application Manager wanted to connect to non-existing device");
- }
-}
-
-void ConnectionHandlerImpl::StartTransportManager() {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::StartTransportManager()");
- if (NULL == transport_manager_) {
- LOG4CXX_ERROR(logger_, "Null pointer to TransportManager.");
- return;
- }
-
- transport_manager_->Visibility(true);
-}
-
-void ConnectionHandlerImpl::CloseConnection(uint32_t key) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::CloseConnection by HB");
-
- uint32_t connection_handle = 0;
- uint8_t session_id = 0;
- PairFromKey(key, &connection_handle, &session_id);
-
- CloseConnection(connection_handle);
-}
-
-void ConnectionHandlerImpl::CloseConnection(ConnectionHandle connection_handle) {
- LOG4CXX_INFO(logger_, "ConnectionHandlerImpl::CloseConnection");
- if (!transport_manager_) {
- LOG4CXX_ERROR(logger_, "Null pointer to TransportManager.");
- return;
- }
- transport_manager::ConnectionUID connection_uid =
- ConnectionUIDFromHandle(connection_handle);
- transport_manager_->Disconnect(connection_uid);
-}
-
-void ConnectionHandlerImpl::KeepConnectionAlive(uint32_t connection_key) {
- uint32_t connection_handle = 0;
- uint8_t session_id = 0;
- PairFromKey(connection_key, &connection_handle, &session_id);
-
- sync_primitives::AutoLock lock(connection_list_lock_);
- ConnectionListIterator it = connection_list_.find(connection_handle);
- if (connection_list_.end() != it) {
- it->second->KeepAlive();
- }
-}
-
-void ConnectionHandlerImpl::OnConnectionEnded(
- const transport_manager::ConnectionUID& connection_id) {
- LOG4CXX_INFO(logger_, "Delete Connection: " <<
- static_cast<int32_t>(connection_id) << " from the list.");
-
- sync_primitives::AutoLock lock(connection_list_lock_);
- ConnectionListIterator itr = connection_list_.find(connection_id);
- if (connection_list_.end() == itr) {
- LOG4CXX_ERROR(logger_, "Connection not found!");
- return;
- }
-
- if (0 != connection_handler_observer_) {
- const Connection* connection = itr->second;
- const SessionMap session_map = connection->session_map();
- for (SessionMapConstIterator session_it = session_map.begin(),
- end = session_map.end(); session_it != end; ++session_it) {
-
- uint32_t session_key = KeyFromPair(connection_id, session_it->first);
- for (ServiceListConstIterator service_it = session_it->second.begin(),
- end = session_it->second.end(); service_it != end; ++service_it) {
-
- connection_handler_observer_->OnServiceEndedCallback(
- session_key, static_cast<protocol_handler::ServiceType>(*service_it));
- }
- }
- }
-
- delete itr->second;
- connection_list_.erase(itr);
-}
-
-}/* namespace connection_handler */
diff --git a/SDL_Core/src/components/connection_handler/src/device.cc b/SDL_Core/src/components/connection_handler/src/device.cc
deleted file mode 100644
index 35c9acbaa..000000000
--- a/SDL_Core/src/components/connection_handler/src/device.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * \file Device.cpp
- * \brief Device class implementation.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "connection_handler/device.h"
-
-/**
- * \namespace connection_handler
- * \brief SmartDeviceLink ConnectionHandler namespace.
- */
-namespace connection_handler {
-
-log4cxx::LoggerPtr Device::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ConnectionHandler"));
-
-Device::Device(DeviceHandle device_handle,
- const std::string& user_friendly_name,
- const std::string& mac_address)
- : device_handle_(device_handle),
- user_friendly_name_(user_friendly_name),
- mac_address_(mac_address) {
-}
-
-Device::~Device() {
-}
-
-DeviceHandle Device::device_handle() const {
- return device_handle_;
-}
-
-std::string Device::user_friendly_name() const {
- return user_friendly_name_;
-}
-
-std::string Device::mac_address() const {
- return mac_address_;
-}
-}/* namespace connection_handler */
diff --git a/SDL_Core/src/components/connection_handler/src/heartbeat_monitor.cc b/SDL_Core/src/components/connection_handler/src/heartbeat_monitor.cc
deleted file mode 100644
index 7058ad0f8..000000000
--- a/SDL_Core/src/components/connection_handler/src/heartbeat_monitor.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "connection_handler/heartbeat_monitor.h"
-#include "connection_handler/connection.h"
-#include "log4cxx/logger.h"
-
-namespace connection_handler {
-
-namespace {
-log4cxx::LoggerPtr g_logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("ConnectionHandler"));
-}
-
-HeartBeatMonitor::HeartBeatMonitor(int32_t heartbeat_timeout_seconds,
- Connection* connection)
- : heartbeat_timeout_seconds_(heartbeat_timeout_seconds),
- connection_(connection),
- timer_(this, &HeartBeatMonitor::TimeOut) {
-}
-
-HeartBeatMonitor::~HeartBeatMonitor() {
- AssertRunningOnCreationThread();
-}
-
-void HeartBeatMonitor::BeginMonitoring() {
- AssertRunningOnCreationThread();
- if (heartbeat_timeout_seconds_ != 0) {
- LOG4CXX_INFO(g_logger, "Heart beat monitor: monitoring connection "
- << connection_->connection_handle() << ", timeout "
- << heartbeat_timeout_seconds_ << " seconds");
- timer_.start(heartbeat_timeout_seconds_);
- } else {
- LOG4CXX_INFO(g_logger, "Heart beat monitor: disabled");
- }
-}
-
-void HeartBeatMonitor::TimeOut() {
- LOG4CXX_INFO(g_logger, "Heart beat monitor: connection "
- << connection_->connection_handle() << " timed out, closing");
- connection_->Close();
-}
-
-void HeartBeatMonitor::KeepAlive() {
- AssertRunningOnCreationThread();
- if (heartbeat_timeout_seconds_ != 0) {
- LOG4CXX_INFO(
- g_logger,
- "Resetting heart beat timer for connection "
- << connection_->connection_handle());
- timer_.stop();
- timer_.start(heartbeat_timeout_seconds_);
- }
-}
-
-
-} // namespace connection_handler
diff --git a/SDL_Core/src/components/dbus/CMakeLists.txt b/SDL_Core/src/components/dbus/CMakeLists.txt
deleted file mode 100644
index 9b2f8be72..000000000
--- a/SDL_Core/src/components/dbus/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-find_package(DBus)
-include_directories (
- ${DBUS_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/include/
- ${CMAKE_SOURCE_DIR}/
- ${CMAKE_SOURCE_DIR}/src/components/
- ${CMAKE_BINARY_DIR}/src/components/
- ${CMAKE_SOURCE_DIR}/src/components/formatters/include/
- ${CMAKE_SOURCE_DIR}/src/components/smart_objects/include/
- ${CMAKE_SOURCE_DIR}/src/components/utils/include/
-)
-
-set (SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/src/schema.cc
- ${CMAKE_CURRENT_BINARY_DIR}/message_descriptions.cc
- ${CMAKE_CURRENT_BINARY_DIR}/introspection_xml.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_message_controller.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_adapter.cc
-)
-
-set (LIBRARIES dbus-1)
-
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/message_descriptions.cc
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_message_descriptions.py
- --infile ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- --outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_message_descriptions.py
-)
-
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/introspection_xml.cc
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_introspection_c.py
- --infile ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- --outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_introspection_c.py
-)
-
-add_library("DBus" ${SOURCES})
-target_link_libraries("DBus" "${LIBRARIES}")
diff --git a/SDL_Core/src/components/dbus/codegen/code_formatter.py b/SDL_Core/src/components/dbus/codegen/code_formatter.py
deleted file mode 100644
index 41c2bb6b6..000000000
--- a/SDL_Core/src/components/dbus/codegen/code_formatter.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file code_formatter.py
-# @brief Utility that helps to manage indents in generated code
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-class CodeBlock:
- indent = 0
- def __init__(self, out):
- self.out = out
- if type(out) == file:
- self.indent = 0
- elif type(out) == CodeBlock:
- self.indent = out.indent
- def __enter__(self):
- self.indent += 1
- return self
- def __exit__(self, exc_type, exc_value, traceback):
- if self.indent >= 1:
- self.indent -= 1
- def write(self, s):
- self.out.write(' ' * self.indent + s)
-
-# vim: set ts=4 sw=4 et:
-
diff --git a/SDL_Core/src/components/dbus/codegen/ford_xml_parser.py b/SDL_Core/src/components/dbus/codegen/ford_xml_parser.py
deleted file mode 100644
index f672f0d6d..000000000
--- a/SDL_Core/src/components/dbus/codegen/ford_xml_parser.py
+++ /dev/null
@@ -1,211 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file ford_xml_parser.py
-# @brief Parser for HMI_API.xml
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from xml.etree import ElementTree
-from collections import OrderedDict
-
-node_name = '/com/ford/hmi'
-
-class ParamDesc:
- pass
-
-class FordXmlParser:
- def __init__(self, in_el_tree, interface_path=None):
- self.interface_path = interface_path
- self.el_tree = in_el_tree
- self.find_enums()
- self.find_structs()
-
- def find_enums(self):
- self.enums = dict()
- for interface_el in self.el_tree.findall('interface'):
- interface_name = interface_el.get('name')
- for enum_el in interface_el.findall('enum'):
- enum_name = enum_el.get('name')
- self.enums[(interface_name,enum_name)] = enum_el
-
-
- def make_param_desc(self, param_el, iface=None):
- param_desc = ParamDesc()
- param_desc.name = param_el.get('name')
- param_desc.type = param_el.get('type')
- param_desc.enum = False
- param_desc.struct = False
- param_desc.fulltype = param_desc.type
- if param_el.get('mandatory') == 'false':
- param_desc.mandatory = False
- else:
- param_desc.mandatory = True
- if param_el.get('array') == 'true':
- param_desc.array = True
- else:
- param_desc.array = False
- param_desc.minValue = param_el.get('minvalue') if param_el.get('minvalue') else 0
- param_desc.maxValue = param_el.get('maxvalue')
- param_desc.minLength = param_el.get('minlength') if param_el.get('minlength') else 0
- param_desc.maxLength = param_el.get('maxlength')
- param_desc.minSize = param_el.get('minsize')
- param_desc.maxSize = param_el.get('maxsize')
-
- param_desc.restricted = param_desc.minValue != None or \
- param_desc.maxValue != None or \
- param_desc.minLength > 0 or \
- param_desc.maxLength > 0
- param_desc.restrictedArray = param_desc.array and (param_desc.minSize > 0 or param_desc.maxSize > 0)
- if iface is None:
- return param_desc
- if param_desc.type not in ['Integer', 'String', 'Boolean', 'Float']:
- param_type = param_desc.type.split('.')
- if len(param_type) > 1:
- param_type = (param_type[0], param_type[1])
- else:
- param_type = (iface, param_type[0])
- param_desc.fulltype = param_type
- if param_type in self.enums: param_desc.enum = True
- elif param_type in self.structs: param_desc.struct = True
- return param_desc
-
-
- def find_structs(self):
- self.structs = OrderedDict()
- for interface_el in self.el_tree.findall('interface'):
- interface_name = interface_el.get('name')
- for struct_el in interface_el.findall('struct'):
- struct_name = struct_el.get('name')
- self.structs[(interface_name, struct_name)] = []
-
- for interface_el in self.el_tree.findall('interface'):
- interface_name = interface_el.get('name')
- for struct_el in interface_el.findall('struct'):
- struct_name = struct_el.get('name')
- for param_el in struct_el.findall('param'):
- param_desc = self.make_param_desc(param_el, interface_name)
- self.structs[(interface_name, struct_name)].append(param_desc)
-
-
- def convert_struct_to_dbus(self, param_type):
- ret = '('
- struct = self.structs[param_type]
- for param in struct:
- ret = ret + self.convert_to_dbus_type(param)
- ret = ret + ')'
- return ret
-
-
- def convert_to_dbus_type(self, param):
- if param.type == 'Integer': restype = 'i'
- elif param.type == 'String': restype = 's'
- elif param.type == 'Boolean': restype = 'b'
- elif param.type == 'Float': restype = 'd' # D-Bus double
- elif param.enum: restype = 'i' # D-Bus 32-bit signed int
- elif param.struct: restype = self.convert_struct_to_dbus(param.fulltype)
- else: raise RuntimeError('Unknown type: ' + param.type)
- if param.array: restype = 'a' + restype
- if not param.mandatory: restype = '(b' + restype + ')'
- return restype
-
-
- def find_notifications(self, interface_el):
- notifications = list()
- for function_el in interface_el.findall('function[@messagetype="notification"]'):
- notifications.append(function_el)
- return notifications
-
-
- def find_request_response_pairs(self, interface_el):
- result = list()
- request_els = interface_el.findall('function[@messagetype="request"]')
- response_els = interface_el.findall('function[@messagetype="response"]')
- for request_el in request_els:
- name = request_el.get('name')
- response_el = next(r for r in response_els if r.get('name') == name)
- result.append((request_el, response_el))
- return result
-
-
- def convert_to_signal(self, notification_el, interface):
- result = ElementTree.Element('signal')
- result.set('name', notification_el.get('name'))
- for param_el in notification_el.findall('param'):
- self.create_arg_element(result, param_el, interface)
- return result
-
-
- def convert_to_method(self, (request_el, response_el), interface):
- result = ElementTree.Element('method')
- result.set('name', request_el.get('name'))
- for param_el in request_el.findall('param'):
- arg_el = self.create_arg_element(result, param_el, interface)
- arg_el.set('direction', 'in')
-
- arg_el = ElementTree.SubElement(result, 'arg')
- arg_el.set('name', 'retCode')
- arg_el.set('type', 'i')
- arg_el.set('direction', 'out')
-
- for param_el in response_el.findall('param'):
- arg_el = self.create_arg_element(result, param_el, interface)
- arg_el.set('direction', 'out')
- return result
-
-
- def create_arg_element(self, parent, param_el, interface):
- arg_el = ElementTree.SubElement(parent, 'arg')
- arg_el.set('name', param_el.get('name'))
- arg_el.set('type', self.convert_to_dbus_type(self.make_param_desc(param_el, interface)))
- return arg_el
-
-
- def create_introspection_iface_el(self, interface_el):
- interface = interface_el.get('name')
- interface_name = self.interface_path + '.' + interface
-
- notifications = self.find_notifications(interface_el)
- signals = [self.convert_to_signal(n, interface) for n in notifications]
-
- request_responses = self.find_request_response_pairs(interface_el)
- methods = [self.convert_to_method(r, interface) for r in request_responses]
-
- if signals or methods:
- el = ElementTree.Element('interface', attrib={'name':interface_name})
- for m in methods: el.append(m)
- for s in signals: el.append(s)
- return el
-
-
-
diff --git a/SDL_Core/src/components/dbus/codegen/make_introspection_c.py b/SDL_Core/src/components/dbus/codegen/make_introspection_c.py
deleted file mode 100755
index 2a195d8d6..000000000
--- a/SDL_Core/src/components/dbus/codegen/make_introspection_c.py
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_introspection_c.py
-# @brief Converts introspection.xml to C-string
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from argparse import ArgumentParser
-from ford_xml_parser import FordXmlParser
-from ford_xml_parser import node_name
-from xml.etree import ElementTree
-from os import path
-from sys import argv
-
-class Impl(FordXmlParser):
- def convert_to_introspection(self, out_el_tree):
- for interface_el in self.el_tree.findall('interface'):
- el = self.create_introspection_iface_el(interface_el)
- if el is not None:
- out_el_tree.append(el)
-
-arg_parser = ArgumentParser(description='Converts introspection.xml to C-string')
-arg_parser.add_argument('--infile', required=True, help="Full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--outdir', required=True, help="Path to directory where output file introspection_xml.cc will be saved")
-args = arg_parser.parse_args()
-
-if not path.isdir(args.outdir):
- makedirs(args.outdir)
-
-out_file = open(args.outdir + '/' + 'introspection_xml.cc', "w")
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-out_tree_root = ElementTree.Element('node', attrib={'name':node_name})
-
-impl = Impl(in_tree_root, 'com.ford.hmi.sdl')
-impl.convert_to_introspection(out_tree_root)
-
-introspection_string = '<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">'
-introspection_string += "\n"
-introspection_string += ElementTree.tostring(out_tree_root)
-
-out_file.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-out_file.write("""/**
- * @file instrospections_xml.cc
- * @brief D-Bus introspection XML as C-string
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-
-out_file.write("char introspection_xml[] = {")
-
-cnt = 0
-for char in introspection_string:
- if cnt % 12 == 0:
- out_file.write("\n ")
- else:
- out_file.write(" ")
- out_file.write("0x%02x," % ord(char))
- cnt = cnt + 1
-
-out_file.write(" 0x00\n")
-out_file.write("};")
-
diff --git a/SDL_Core/src/components/dbus/codegen/make_message_descriptions.py b/SDL_Core/src/components/dbus/codegen/make_message_descriptions.py
deleted file mode 100755
index 007966639..000000000
--- a/SDL_Core/src/components/dbus/codegen/make_message_descriptions.py
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_message_descriptions.py
-# @brief Generates HMI API message descriptions for D-Bus
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from argparse import ArgumentParser
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser
-from os import path
-from sys import argv
-
-namespace_name = 'ford_message_descriptions'
-namespace = namespace_name + '::'
-
-
-class Impl(FordXmlParser):
- def write_param_definition(self, param_var_name, param, out):
- if param.array:
- tmp_param = copy(param)
- tmp_param.array = False
- tmp_param.mandatory = True
- dbus_sig = self.convert_to_dbus_type(tmp_param)
- self.write_param_definition(param_var_name + '_array', tmp_param, out)
-
- if param.array: out.write('const ' + namespace + 'ArrayDescription ')
- elif param.struct: out.write('const ' + namespace + 'StructDescription ')
- else: out.write('const ' + namespace + 'ParameterDescription ')
-
- out.write(param_var_name + " = {\n")
-
- if param.struct or param.array:
- out.write(" {\n")
- shift = ' ' * 4
- else:
- shift = ' ' * 2
-
- out.write(shift + "\"" + param.name + "\",\n")
-
- if param.array:
- out.write(shift + namespace + "Array,\n")
- elif param.struct:
- out.write(shift + namespace + "Struct,\n")
- elif param.enum:
- out.write(shift + namespace + "Enum,\n")
- else:
- out.write(shift + namespace + param.type + ",\n")
-
- if param.mandatory:
- out.write(shift + "true\n")
- else:
- out.write(shift + "false\n")
-
- if param.struct or param.array:
- out.write(" },\n")
- if param.array:
- out.write(" (const " + namespace + "ParameterDescription*)&" + param_var_name + "_array,\n")
- out.write(" \"" + dbus_sig + "\"\n")
- elif param.struct:
- out.write(" Structs::" + param.fulltype[0] + "__" + param.fulltype[1] + "__parameters\n")
- out.write("};\n")
-
-
- def write_struct_params_declarations(self, out):
- out.write("struct Structs {\n");
- for (interface, name), params in self.structs.iteritems():
- params_var_name = interface + '__' + name + '__parameters'
- out.write(" static const " + namespace + "ParameterDescription* " + params_var_name + "[];\n")
- out.write("};\n\n")
-
-
- def write_enum_entries_declarations(self, out):
- out.write("struct Enums {\n");
- for interface, name in self.enums:
- entries_var_name = interface + '__' + name + '__entries'
- out.write(" static const " + namespace + "EnumDescription::Entry* " + entries_var_name + "[];\n")
- out.write("};\n\n")
-
-
- def write_parameters(self, params, out, name):
- n = 1
- for param in params:
- param_var_name = name + str(n)
- n = n + 1
- self.write_param_definition(param_var_name, param, out)
-
-
- def write_struct_params_definitions(self, out):
- for (interface, name), params in self.structs.iteritems():
- param_var_name = interface + '__' + name + '__parameter'
- self.write_parameters(params, out, param_var_name)
- params_var_name = 'Structs::' + interface + '__' + name + '__parameters'
- out.write("const " + namespace + "ParameterDescription* " + params_var_name + "[] = {\n")
- for n in range(1, len(params) + 1):
- name = param_var_name + str(n)
- out.write(" (const " + namespace + "ParameterDescription*)&" + name + ",\n")
- out.write( " NULL };\n\n")
-
-
- def write_enum_entries_definitions(self, out):
- for (interface, name), enum_el in self.enums.iteritems():
- n = 1
- for element_el in enum_el.findall('element'):
- entry_var_name = interface + '__' + name + '__entry' + str(n)
- value = element_el.get("value")
- if value is None:
- value = str(n)
- out.write(namespace + "EnumDescription::Entry " + entry_var_name + " = {\"" + element_el.get("name") + "\", " + value + "};\n")
- n = n + 1
-
- entries_var_name = "Enums::" + interface + '__' + name + '__entries'
- out.write("const " + namespace + "EnumDescription::Entry* " + entries_var_name + "[] = {\n")
- for n in range(1, len(enum_el.findall('element')) + 1):
- entry_var_name = interface + '__' + name + '__entry' + str(n)
- out.write(" &" + entry_var_name + ",\n")
- out.write(" NULL };\n\n")
-
-
- def write_message_definition(self, message_el, interface, out):
- name = message_el.get('name')
- messagetype = message_el.get('messagetype')
- params = list()
- for param_el in message_el.findall('param'):
- param_desc = self.make_param_desc(param_el, interface)
- params.append(param_desc)
- param_var_name = interface + '__' + name + '__' + messagetype + '__parameter'
- self.write_parameters(params, out, param_var_name)
-
- params_var_name = param_var_name + 's'
- out.write("const " + namespace + "ParameterDescription* " + params_var_name + "[] = {\n")
- for n in range(1, len(params) + 1):
- param_name = param_var_name + str(n)
- out.write(" (const " + namespace + "ParameterDescription*)&" + param_name + ",\n")
- out.write(" NULL };\n")
-
- message_desc_name = interface + '__' + name + '__' + messagetype
- out.write("const " + namespace + "MessageDescription " + message_desc_name + " = {\n")
- out.write(" \"" + interface + "\",\n")
- out.write(" \"" + name + "\",\n")
- out.write(" hmi_apis::messageType::" + messagetype + ",\n")
- out.write(" hmi_apis::FunctionID::" + interface + "_" + name + ",\n")
- out.write(" " + params_var_name + "\n")
- out.write("};\n\n")
-
-
- def write_message_definitions(self, out):
- for interface_el in self.el_tree.findall('interface'):
- interface = interface_el.get('name')
- message_els = interface_el.findall('function')
- for message_el in message_els:
- self.write_message_definition(message_el, interface, out)
-
-
- def make_message_descriptions(self, out):
- self.write_struct_params_declarations(out)
- #self.write_enum_entries_declarations(out)
- self.write_struct_params_definitions(out)
- #self.write_enum_entries_definitions(out)
- self.write_message_definitions(out)
-
-
- def make_message_array(self, out):
- out.write("const MessageDescription* message_descriptions[] = {\n")
- for interface_el in self.el_tree.findall('interface'):
- interface = interface_el.get('name')
- message_els = interface_el.findall('function')
- for message_el in message_els:
- name = message_el.get('name')
- messagetype = message_el.get('messagetype')
- message_desc_name = interface + '__' + name + '__' + messagetype
- out.write(" &" + message_desc_name + ",\n")
- out.write(" NULL\n")
- out.write("};\n")
-
-
-arg_parser = ArgumentParser(description="Generates HMI API message descriptions for D-Bus on SDL core side")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output file message_descriptions.cc will be saved")
-args = arg_parser.parse_args()
-
-if not path.isdir(args.outdir):
- makedirs(args.outdir)
-
-outfile = 'message_descriptions.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root)
-
-out = open(args.outdir + "/" + outfile, "w")
-
-out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-out.write("""/**
- * @file message_descriptions.cc
- * @brief Generated HMI API message descriptions for D-Bus
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-
-out.write("#include \"dbus/message_descriptions.h\"\n\n");
-out.write("namespace {\n\n");
-impl.make_message_descriptions(out)
-out.write("}\n\n");
-
-out.write("namespace " + namespace_name + " {\n\n");
-impl.make_message_array(out)
-out.write("}\n\n");
-
diff --git a/SDL_Core/src/components/dbus/codegen/make_qml_dbus_cpp.py b/SDL_Core/src/components/dbus/codegen/make_qml_dbus_cpp.py
deleted file mode 100755
index 910781342..000000000
--- a/SDL_Core/src/components/dbus/codegen/make_qml_dbus_cpp.py
+++ /dev/null
@@ -1,734 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_cpp.py
-# @brief Generator of QML to QDbus C++ part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from argparse import ArgumentParser
-import os.path
-from sys import argv
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser, ParamDesc
-from code_formatter import CodeBlock
-
-prefix_class_item = 'Declarative'
-invoke_type_connection = 'Direct'
-
-def defaultValue(param):
- if param.type == "Integer":
- return "0"
- elif param.type == "Float":
- return "0.0"
- elif param.type == "Boolean":
- return "false"
- elif param.enum:
- return "0"
-
-class Impl(FordXmlParser):
- def make_dbus_type_declarations(self, out):
- for struct in self.structs.items():
- self.write_struct_declaration(struct, out)
-
- def make_dbus_metatype_declarations(self, out):
- for struct in self.structs.items():
- self.write_struct_metatype_declaration(struct, out)
-
-
- def write_struct_declaration(self, ((iface, name), params), out):
- struct_name = "{0}_{1}".format(iface, name)
- out.write("struct {0} {{\n".format(struct_name))
- with CodeBlock(out) as out:
- for param in params:
- out.write("{0} {1};\n".format(self.qt_param_type(param), param.name))
- out.write("{0}()\n".format(struct_name))
- initializersList = map(lambda x: "{0}({1})".format(x.name, defaultValue(x)), [p for p in params if p.type != "String" and not p.struct and not p.array])
- if initializersList:
- out.write(": " + ",\n ".join(initializersList))
-
- out.write("{ }\n")
-
- out.write("};\n")
- out.write('QDBusArgument& operator << (QDBusArgument&, const ' + struct_name + "&);\n")
- out.write('const QDBusArgument& operator >> (const QDBusArgument&, ' + struct_name + "&);\n")
- out.write('void PutArgToMap(QVariantMap& map, const char* name, const ' + struct_name + "& v);\n")
- out.write('QVariant ValueToVariant(' + struct_name + "& v);\n")
- out.write('QVariant ValueToVariant(QList<' + struct_name + " >& v);\n")
- out.write('bool GetArgFromMap(const QVariantMap& map, const char* name, ' + struct_name + "& v);\n")
- out.write('bool VariantToValue(const QVariant& variant, ' + struct_name + "& v);\n")
- out.write('bool VariantToValue(const QVariant& variant, QList<' + struct_name + " >& v);\n")
-
-
- def write_struct_metatype_declaration(self, ((iface, name), params), out):
- struct_name = iface + '_' + name
- out.write('Q_DECLARE_METATYPE(' + struct_name + ")\n")
- out.write('Q_DECLARE_METATYPE(OptionalArgument<' + struct_name + ">)\n")
- out.write('Q_DECLARE_METATYPE(QList<' + struct_name + ">)\n")
- out.write('Q_DECLARE_METATYPE(OptionalArgument<QList<' + struct_name + "> >)\n\n")
-
-
- def make_dbus_type_definitions(self, out):
- for struct in self.structs.items():
- self.write_struct_definition(struct, out)
-
- def write_struct_definition(self, ((iface, name), params), out):
- struct_name = iface + '_' + name
-
- out.write('QDBusArgument& operator << (QDBusArgument& arg, const ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("arg.beginStructure();\n")
- for param in params:
- out.write("arg << v.{0};\n".format(param.name))
- out.write("arg.endStructure();\n")
- out.write("return arg;\n")
- out.write("}\n\n")
-
- out.write('const QDBusArgument& operator >> (const QDBusArgument& arg, ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("arg.beginStructure();\n")
- for param in params:
- out.write("arg >> v.{0};\n".format(param.name))
- out.write("arg.endStructure();\n")
- out.write("return arg;\n")
- out.write("}\n\n")
-
- out.write('QVariant ValueToVariant(const ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("QVariantMap map;\n")
- for param in params:
- out.write("""PutArgToMap(map, "{0}", v.{0});\n""".format(param.name))
- out.write("return QVariant::fromValue(map);\n")
- out.write("}\n\n")
-
- out.write('QVariant ValueToVariant(const QList<' + struct_name + ">& v) {\n")
- with CodeBlock(out) as out:
- out.write("QList<QVariant> ret;\n")
- out.write("for (QList<{0}>::const_iterator i = v.begin(); i != v.end(); ++i)\n".format(struct_name))
- with CodeBlock(out) as out:
- out.write("ret.append(ValueToVariant(*i));\n")
- out.write("return QVariant::fromValue(ret);\n")
- out.write("}\n\n")
-
- out.write('void PutArgToMap(QVariantMap& map, const char* name, const ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("map.insert(name, ValueToVariant(v));\n")
- out.write("}\n\n")
-
- out.write('bool VariantToValue(const QVariant& variant, ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("if (variant.type() != QVariant::Map) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_ERROR(logger_, "Input argument isn't a map");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("QVariantMap map = variant.toMap();\n")
- for param in params:
- out.write("if (!GetArgFromMap(map, \"" + param.name + "\", v." + param.name + ")) return false;\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- out.write('bool VariantToValue(const QVariant& variant, QList<' + struct_name + ">& v) {\n")
- with CodeBlock(out) as out:
- out.write("if (variant.type() != QVariant::List) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_ERROR(logger_, "Input argument isn't a list");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("QList<QVariant> list = variant.toList();\n")
- out.write("for (QList<QVariant>::const_iterator i = list.begin(); i != list.end(); ++i) {\n");
- with CodeBlock(out) as out:
- out.write(struct_name + " s;\n");
- out.write("if (!VariantToValue(*i, s)) return false;\n");
- out.write("v.append(s);\n");
- out.write("}\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- out.write('bool GetArgFromMap(const QVariantMap& map, const char* name, ' + struct_name + "& v) {\n")
- with CodeBlock(out) as out:
- out.write("QVariantMap::const_iterator it = map.find(name);\n")
- out.write("if (map.end() == it) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_WARN(logger_, "Argument '" << name << "' not found");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("if (it->type() != QVariant::Map) {\n")
- with CodeBlock(out) as out:
- out.write("""LOG4CXX_ERROR(logger_, "Argument '" << name << "' isn't a map");\n""")
- out.write("return false;\n")
- out.write("}\n")
- out.write("const QVariantMap& inmap = it->toMap();\n")
- for param in params:
- out.write("if (!GetArgFromMap(inmap, \"" + param.name + "\", v." + param.name + ")) return false;\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- def write_param_validation(self, param, param_name, fail_statement, out, level=0):
- if not param.mandatory and (param.restricted or param.restrictedArray or (param.struct and any(map(lambda x: x.restricted, self.structs[param.fulltype])))):
- out.write("if (%s.presence) {\n" % param_name)
- param_copy = copy(param)
- param_copy.mandatory = True
- with CodeBlock(out) as out:
- self.write_param_validation(param_copy, param_name + ".val", fail_statement, out, level+1)
- out.write("}\n")
- elif param.array:
- if param.minSize > 0:
- out.write("if ({0}.count() < {1}) {{ {2}; }}\n".format(param_name, param.minSize, fail_statement))
- if param.maxSize != None:
- out.write("if ({0}.count() > {1}) {{ {2}; }}\n".format(param_name, param.maxSize, fail_statement))
- if param.restricted:
- out.write('for ({0}::const_iterator it_{2} = {1}.begin(); it_{2} != {1}.end(); ++it_{2}) {{\n'.format(self.qt_param_type(param), param_name, level))
- with CodeBlock(out) as out:
- param_copy = copy(param)
- param_copy.array = False
- self.write_param_validation(param_copy, "(*it_{0})".format(level), fail_statement, out, level+1)
- out.write("}\n")
- elif param.struct:
- for p in self.structs[param.fulltype]:
- self.write_param_validation(p, "{0}.{1}".format(param_name, p.name), fail_statement, out, level+1)
- elif param.type == "Integer" or param.type == "Float":
- conditions = []
- if (param.minValue != None):
- conditions.append("(%s < %s)" % (param_name, param.minValue))
- if (param.maxValue != None):
- conditions.append("(%s > %s)" % (param_name, param.maxValue))
- if conditions:
- out.write('if (%s) { %s; }\n' % (' || '.join(conditions), fail_statement))
- elif param.type == "String":
- conditions = []
- if (param.minLength > 0):
- conditions.append("(%s.size() < %s)" % (param_name, param.minLength))
- if (param.maxLength > 0):
- conditions.append("(%s.size() > %s)" % (param_name, param.maxLength))
- if conditions:
- out.write('if (%s) { %s; }\n' % (' || '.join(conditions), fail_statement))
-
- def qt_param_type(self, param):
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return "OptionalArgument< " + self.qt_param_type(param_copy) + " >"
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- if param.type == 'String':
- return "QStringList"
- return "QList< " + self.qt_param_type(param_copy) + " >"
- if param.type == 'Integer' or param.enum:
- return 'int'
- elif param.type == 'String':
- return 'QString'
- elif param.type == 'Boolean':
- return 'bool'
- elif param.type == 'Float':
- return 'double'
- elif param.struct:
- return "_".join(param.fulltype)
- return "xxx"
-
-
- def from_variant_func_name(self, param, interface):
- prefix = ''
- if not param.mandatory:
- param_copy = copy(param)
- param_copy.mandatory = True
- return 'opt_' + self.from_variant_func_name(param_copy, interface)
- if param.array:
- param_copy = copy(param)
- param_copy.array = False
- return 'arr_' + self.from_variant_func_name(param_copy, interface)
-
- if param.type in ['Integer', 'String', 'Boolean', 'Float']:
- param_type = param.type
- else:
- param_type = param.type.split('.')
- if len(param_type) > 1:
- param_type = (param_type[0], param_type[1])
- else:
- param_type = (interface, param_type[0])
- if param_type in self.structs:
- param_type = param_type[0] + '_' + param_type[1]
- elif param_type in self.enums:
- param_type = 'Integer'
- return param_type + '_from_variant'
-
-
- def make_method_signature(self, request, response, interface, add_classname):
- in_params = [self.make_param_desc(x, interface) for x in request.findall('param')]
- out_params = [self.make_param_desc(x, interface) for x in response.findall('param')]
-
- signature_len = len(''.join(map(lambda x: self.convert_to_dbus_type(x), in_params + out_params)))
- if signature_len > 255:
- raise RuntimeError("Too long signature of {0} method. Maximum valid length is 255, actual is {1}", request.get('name'), signature_len)
-
- return "int {0}{1} ({2}{3}const QDBusMessage& message, QString& userMessage_out{4}{5})".format(
- interface + "Adaptor::" if add_classname else "",
- request.get('name'),
- ", ".join(map(lambda x: "const {0}& {1}_in".format(self.qt_param_type(x), x.name), in_params)),
- ", " if in_params else "",
- ", " if out_params else "",
- ", ".join(map(lambda x: "{0}& {1}_out".format(self.qt_param_type(x), x.name), out_params)))
-
-
- def make_signal_signature(self, signal, interface, add_void):
- params = signal.findall('param')
- if add_void:
- retstr = 'void '
- else:
- retstr = ''
- retstr = retstr + signal.get('name') + '('
- params_num = len(params)
- for i in range(0, params_num):
- param_desc = self.make_param_desc(params[i], interface)
- param_type = self.qt_param_type(param_desc)
- retstr = retstr + param_type + ' ' + param_desc.name
- if i <> params_num - 1: retstr = retstr + ", "
- retstr = retstr + ')'
- return retstr
-
-
- def make_qml_signal_signature(self, signal, interface, name, short=False, add_classname=False):
- params = signal.findall('param')
- if short:
- retstr = ''
- else:
- retstr = 'void '
- if add_classname:
- retstr = retstr + interface + 'Adaptor::'
- retstr = retstr + name + '('
- params_num = len(params)
- for i in range(0, params_num):
- param_desc = self.make_param_desc(params[i], interface)
- if param_desc.struct or param_desc.array or not param_desc.mandatory: typ = 'QVariant'
- elif param_desc.type == 'Integer' or param_desc.enum: typ = 'int'
- elif param_desc.type == 'Boolean': typ = 'bool'
- elif param_desc.type == 'Float': typ = 'double'
- elif param_desc.type == 'String': typ = 'QString'
- else: typ = 'QVariant'
- retstr = retstr + typ
- if not short: retstr = retstr + ' ' + param_desc.name
- if i <> params_num - 1: retstr = retstr + ", "
- retstr = retstr + ')'
- return retstr
-
-
- def write_adaptor_declaration(self, interface_el, notifications, request_responses, out):
- global prefix_class_item
- def glue_strings(strings):
- ret = list()
- curstr = ''
- for str in strings:
- curstr = curstr + str
- if(str[-1] == '>'):
- ret.append(curstr)
- curstr = ''
- return ret
- ifacename = interface_el.get('name')
- out.write("class " + ifacename + "Adaptor : public QDBusAbstractAdaptor {\n");
- out.write(" Q_OBJECT\n");
- out.write(" Q_CLASSINFO(\"D-Bus Interface\", \"" + self.interface_path + '.' + ifacename + "\")\n");
- out.write(" Q_CLASSINFO(\"D-Bus Introspection\",\n");
- introspection_el = self.create_introspection_iface_el(interface_el)
- introspection = glue_strings(ElementTree.tostringlist(introspection_el))
- for str in introspection:
- str = str.replace('"', '\\"')
- out.write('"' + str + '"' + "\n")
- out.write(" )\n")
- out.write(" public:\n")
- out.write(" explicit " + ifacename + "Adaptor(QObject *parent = 0);\n")
- out.write(" void SetApi(Q%sItem*);\n" % prefix_class_item)
- out.write(" DBusController *dbusController;\n")
- out.write(" public slots:\n")
- for (request, response) in request_responses:
- signature = self.make_method_signature(request, response, ifacename, False)
- out.write(" " + signature + ";\n")
- out.write(" signals:\n")
- for n in notifications:
- signature = self.make_signal_signature(n, ifacename, True)
- out.write(" " + signature + ";\n")
- out.write(" private slots:\n")
- for n in notifications:
- signature = self.make_qml_signal_signature(n, ifacename, n.get('name') + '_qml', False)
- out.write(" " + signature + ";\n")
- out.write(" private:\n")
- out.write(" Q%sItem* api_;\n" % prefix_class_item)
- out.write("};\n\n");
-
- def write_adaptor_definition(self, interface_el, notifications, request_responses, out):
- global prefix_class_item
- iface_name = interface_el.get('name')
- classname = iface_name + 'Adaptor'
- out.write("{0}::{0}(QObject* parent) : QDBusAbstractAdaptor(parent) {{}}\n".format(classname))
-
- out.write("void {0}::SetApi(Q{1}Item* api) {{\n".format(classname, prefix_class_item))
- with CodeBlock(out) as out:
- out.write("api_ = api;\n")
- for n in notifications:
- signame = n.get('name')
- signame = signame[:1].lower() + signame[1:]
- slotname = n.get('name') + '_qml'
- sig_signature = self.make_qml_signal_signature(n, iface_name, signame, True)
- slot_signature = self.make_qml_signal_signature(n, iface_name, slotname, True)
- out.write("connect(api_, SIGNAL(" + sig_signature + "), this, SLOT(" + slot_signature + "));\n")
- out.write("LOG4CXX_TRACE(logger_, \"CONNECT SIGNALS: \" << __PRETTY_FUNCTION__ );\n")
- out.write("}\n\n")
-
- for (request,response) in request_responses:
- in_params = [ self.make_param_desc(x, iface_name) for x in request.findall('param') ]
- out_params = [ self.make_param_desc(x, iface_name) for x in response.findall('param') ]
-
- out.write("bool fill{0}{1}Reply(QDBusMessage& message, const QVariantMap& map) {{\n".format(classname, request.get('name')))
- with CodeBlock(out) as out:
- out.write("int retCode_out = 0;\n")
- out.write("GetArgFromMap(map, \"__retCode\", retCode_out);\n")
- out.write("QVariant retCode_arg = QVariant::fromValue(retCode_out);\n")
- out.write("message << retCode_arg;\n")
- out.write("QString userMessage_out;\n")
- out.write("GetArgFromMap(map, \"__message\", userMessage_out);\n")
- out.write("QVariant userMessage_arg = QVariant::fromValue(userMessage_out);\n")
- out.write("message << userMessage_arg;\n")
- for p in out_params:
- param_name = p.name
- param_type = self.qt_param_type(p)
- out.write("%s %s_out;\n" % (param_type, p.name))
- out.write("if (!GetArgFromMap(map, \"{0}\", {0}_out)) {{ return false; }}\n".format(p.name))
- self.write_param_validation(p, p.name + "_out", "return false", out)
- out.write("QVariant {0}_arg;\n".format(p.name))
- out.write("{0}_arg.setValue({0}_out);\n".format(p.name))
- out.write("message << {0}_arg;\n".format(p.name))
- out.write("LOG4CXX_DEBUG(logger_, \"Output arguments:\\n\" << QVariant(map));\n")
- out.write("LOG4CXX_TRACE(logger_, \"REPLY ASYNC: \" << __PRETTY_FUNCTION__ );\n")
- out.write("return true;\n")
- out.write("}\n\n")
-
- out.write("{0} {{\n".format(self.make_method_signature(request, response, iface_name, True)))
- with CodeBlock(out) as out:
- out.write("LOG4CXX_TRACE(logger_, \"ENTER: \" << __PRETTY_FUNCTION__ );\n")
- out.write("int ret = 0;\n")
- return_statement = "return ret;\n"
- out.write("QVariantMap in_arg;\n");
- out.write("QVariant out_arg_v;\n");
- for param in in_params:
- self.write_param_validation(param, param.name + "_in", "RaiseDbusError(this, InvalidData); return ret", out)
- out.write("PutArgToMap(in_arg, \"" + param.name + "\", " + param.name + "_in);\n")
- out.write("LOG4CXX_DEBUG(logger_, \"Input arguments:\\n\" << in_arg);\n")
- method_name = request.get('name')[:1].lower() + request.get('name')[1:]
-
- out.write("dbusController->message = &message;\n")
- out.write("dbusController->fill = &fill{0}{1}Reply;\n".format(classname, request.get("name")))
-
- out.write("""if (!QMetaObject::invokeMethod(api_, "{0}", Qt::{1}Connection, Q_RETURN_ARG(QVariant, out_arg_v), Q_ARG(QVariant, QVariant(in_arg)))) {{\n""".format(method_name, invoke_type_connection))
- with CodeBlock(out) as out:
- out.write("RaiseDbusError(this, InvalidData);\n")
- out.write("LOG4CXX_ERROR(logger_, \"Can't invoke method " + method_name +"\");\n ")
- out.write("return ret;\n")
- out.write("}\n")
-
- out.write("dbusController->message = NULL;\n")
- out.write("dbusController->fill = NULL;\n")
- out.write("if (message.isDelayedReply()) {\n")
- with CodeBlock(out) as out:
- out.write("return ret;\n")
- out.write("}\n")
-
- out.write("QVariantMap out_arg;\n")
- out.write("if (out_arg_v.type() == QVariant::Map) {\n")
- with CodeBlock(out) as out:
- out.write("out_arg = out_arg_v.toMap();\n")
- out.write("};\n")
-
- out.write("int err;\n")
- out.write("""if (GetArgFromMap(out_arg, "__errno", err)) { RaiseDbusError(this, err); return ret; }\n""")
-
- out.write("int async_uid;\n")
- out.write("if (GetArgFromMap(out_arg, \"__async_uid\", async_uid)) {\n")
- with CodeBlock(out) as out:
- out.write("message.setDelayedReply(true);\n")
- out.write("dbusController->addMessage(message, &fill%s%sReply, async_uid);\n" % (classname, request.get('name')))
- out.write("LOG4CXX_TRACE(logger_, \"EXIT ASYNC: \" << __PRETTY_FUNCTION__ );\n")
- out.write("return ret;\n");
- out.write("}\n\n")
-
- for param in out_params:
- out.write("if (!GetArgFromMap(out_arg, \"{0}\", {0}_out)) {{ RaiseDbusError(this, InvalidData); return ret; }}\n".format(param.name))
- self.write_param_validation(param, param.name + "_out", "RaiseDbusError(this, InvalidData); return ret", out)
-
- out.write("GetArgFromMap(out_arg, \"__retCode\", ret);\n")
- out.write("GetArgFromMap(out_arg, \"__message\", userMessage_out);\n")
- out.write("LOG4CXX_DEBUG(logger_, \"Output arguments:\\n\" << QVariant(out_arg));\n")
- out.write("LOG4CXX_TRACE(logger_, \"EXIT: \" << __PRETTY_FUNCTION__ );\n")
- out.write("return ret;\n")
- out.write("}\n\n")
-
- for n in notifications:
- slotname = n.get('name') + '_qml'
- slot_signature = self.make_qml_signal_signature(n, iface_name, slotname, False, True)
- out.write(slot_signature + " {\n")
- params = n.findall('param')
- out.write(" LOG4CXX_TRACE(logger_, \"EMIT SIGNAL: \" << __PRETTY_FUNCTION__ );\n")
- out.write(" LOG4CXX_DEBUG(logger_, \"Arguments:\\n{\"")
- for p in params[0:-1]:
- param = self.make_param_desc(p, iface_name)
- out.write(" << \" " + param.name + ":\" << " + param.name + " << \",\"")
- for p in params[-1:]: # last param without comma in end line
- p = params[-1]
- param = self.make_param_desc(p, iface_name)
- out.write(" << \" " + param.name + ":\" << " + param.name)
- out.write(" << \" }\");\n")
- for p in params:
- param = self.make_param_desc(p, iface_name)
- param_type = self.qt_param_type(param)
- param_name = 'p_' + param.name
- if param.mandatory:
- if param.array or (param.type not in ['Integer', 'String', 'Float', 'Boolean'] and not param.enum):
- out.write(' ' + param_type + ' ' + param_name + ";\n")
- out.write(' if (!VariantToValue(' + param.name + ', ' + param_name + ")) {\n")
- out.write(" LOG4CXX_ERROR(logger_, \"Can't convert variant to value\");\n")
- out.write(" return;}\n")
- else:
- out.write(' ' + param_type + ' ' + param_name + ";\n")
- out.write(' ' + param_name + '.presence = !' + param.name + ".isNull();\n")
- out.write(' if (' + param_name + ".presence) {\n")
- out.write(' if (!VariantToValue(' + param.name + ', ' + param_name + ".val)) {\n")
- out.write(" LOG4CXX_ERROR(logger_, \"Can't convert variant to value\");\n")
- out.write(" return;\n }\n")
- out.write(" }\n")
- out.write(' emit ' + n.get('name') + '(')
- for i in range(len(params)):
- param = self.make_param_desc(params[i], iface_name)
- basic_type = (param.type in ['Integer', 'String', 'Float', 'Boolean']) or param.enum
- if param.array or (not param.mandatory) or (not basic_type):
- param_name = 'p_' + param.name
- else:
- param_name = param.name
- out.write(param_name)
- if i != len(params) - 1: out.write(', ')
- out.write(");\n")
- out.write("}\n\n")
-
-
- def make_dbus_adaptor_declarations(self, out):
- for interface_el in self.el_tree.findall('interface'):
- notifications = self.find_notifications(interface_el)
- request_responses = self.find_request_response_pairs(interface_el)
- if len(notifications) > 0 or len(request_responses) > 0:
- self.write_adaptor_declaration(interface_el, notifications, request_responses, out)
-
-
- def make_dbus_adaptor_definitions(self, out):
- for interface_el in self.el_tree.findall('interface'):
- notifications = self.find_notifications(interface_el)
- request_responses = self.find_request_response_pairs(interface_el)
- if len(notifications) > 0 or len(request_responses) > 0:
- self.write_adaptor_definition(interface_el, notifications, request_responses, out)
-
-
- def make_dbus_register_metatypes_declaraion(self, out):
- out.write("void RegisterDbusMetatypes();\n")
-
-
- def make_dbus_register_metatypes_definition(self, out):
- out.write("void RegisterDbusMetatypes() {\n")
- for (iface, name) in self.structs:
- struct_name = iface + '_' + name
- out.write('qDBusRegisterMetaType<' + struct_name + ">();\n")
- out.write('qDBusRegisterMetaType<OptionalArgument<' + struct_name + "> >();\n")
- out.write('qDBusRegisterMetaType<QList<' + struct_name + "> >();\n")
- out.write('qDBusRegisterMetaType<OptionalArgument<QList<' + struct_name + "> > >();\n")
- out.write("}\n")
-
-
- def make_api_adaptors_class(self, out):
- global prefix_class_item
- out.write("struct ApiAdaptors {\n")
- interfaces = self.el_tree.findall('interface')
- def filt(iface):
- return self.find_notifications(iface) or self.find_request_response_pairs(iface)
- interfaces = filter(filt, interfaces)
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- out.write(" " + name + "* " + name + "_;\n")
- out.write(" ApiAdaptors() :\n")
- for i in range(len(interfaces)):
- name = interfaces[i].get('name') + 'Adaptor'
- out.write(" " + name + "_(NULL)")
- if i <> len(interfaces) - 1: out.write(',')
- out.write("\n")
- out.write(" {}\n")
- out.write(" void Init(QObject* p) {\n")
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- out.write(" " + name + "_ = new " + name + "(p);\n")
- out.write(" }\n")
- out.write(" void SetApi(QObject* p) {\n")
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- chname = interface_el.get('name')
- out.write(" " + name + ("_->SetApi(p->findChild<Q%sItem*>(\"" % prefix_class_item) + chname + "\"));\n")
- out.write(" }\n")
- out.write(" void SetDBusController(DBusController* dc) {\n")
- for interface_el in interfaces:
- name = interface_el.get('name') + 'Adaptor'
- chname = interface_el.get('name')
- out.write(" " + name + "_->dbusController = dc;\n")
- out.write(" }\n")
- out.write("};\n\n")
-
-
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus C++ part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files qml_dbus.cc, qml_dbus.h will be saved")
-args = arg_parser.parse_args()
-
-if args.version == "4.8.5":
- prefix_class_item = 'Declarative'
- invoke_type_connection = 'Direct'
-elif args.version == "5.1.0":
- prefix_class_item = 'Quick'
- invoke_type_connection = 'BlockingQueued'
-
-header_name = 'qml_dbus.h'
-source_name = 'qml_dbus.cc'
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root, 'com.ford.sdl.hmi')
-
-header_out = open(args.outdir + '/' + header_name, "w")
-source_out = open(args.outdir + '/' + source_name, "w")
-
-header_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-header_out.write("""/**
- * @file qml_dbus.h
- * @brief Generated QDbus adaptors header file
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-header_out.write("#ifndef SRC_COMPONENTS_DBUS_QML_DBUS_H_\n");
-header_out.write("#define SRC_COMPONENTS_DBUS_QML_DBUS_H_\n\n");
-header_out.write("#include <QtDBus/QDBusArgument>\n");
-header_out.write("#include <QtDBus/QDBusMessage>\n");
-header_out.write("#include <QtDBus/QDBusConnection>\n");
-header_out.write("#include <QtDBus/QDBusAbstractAdaptor>\n");
-header_out.write("#include <QtDBus/QDBusMetaType>\n");
-header_out.write("#include <Qt%s/Q%sItem>\n" % (prefix_class_item, prefix_class_item));
-header_out.write("#include \"qml_dbus_common.h\"\n\n");
-header_out.write("#include \"dbus_controller.h\"\n\n");
-impl.make_dbus_type_declarations(header_out)
-impl.make_dbus_adaptor_declarations(header_out)
-impl.make_dbus_register_metatypes_declaraion(header_out)
-impl.make_api_adaptors_class(header_out)
-impl.make_dbus_metatype_declarations(header_out)
-header_out.write("#endif // #ifndef SRC_COMPONENTS_DBUS_QML_DBUS_H_\n");
-
-source_out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
-source_out.write("""/**
- * @file qml_dbus.cc
- * @brief Generated QDbus adaptors source file
- *
- * This file is a part of HMI D-Bus layer.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-""")
-source_out.write("#include \"" + header_name + "\"\n\n");
-source_out.write("#include <log4cxx/logger.h>\n")
-source_out.write("#include <log4cxx/propertyconfigurator.h>\n\n")
-source_out.write("extern log4cxx::LoggerPtr logger_;\n\n")
-impl.make_dbus_type_definitions(source_out)
-impl.make_dbus_adaptor_definitions(source_out)
-impl.make_dbus_register_metatypes_definition(source_out)
diff --git a/SDL_Core/src/components/dbus/codegen/make_qml_dbus_qml.py b/SDL_Core/src/components/dbus/codegen/make_qml_dbus_qml.py
deleted file mode 100755
index 1be73d14e..000000000
--- a/SDL_Core/src/components/dbus/codegen/make_qml_dbus_qml.py
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# @file make_qml_dbus_qml.py
-# @brief Generator of QML to QDbus QML part
-#
-# This file is a part of HMI D-Bus layer.
-#
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from os import path
-from os import makedirs
-from sys import argv
-from argparse import ArgumentParser
-from xml.etree import ElementTree
-from copy import copy
-from ford_xml_parser import FordXmlParser
-
-namespace = 'dbus_qml'
-qt_quick_version = '1.1'
-type_variant_name = 'variant'
-
-class Impl(FordXmlParser):
- def write_function(self, ifacename, request, response, out):
- name = request.get('name')
- name = name[:1].lower() + name[1:]
- out.write(" function " + name + "(params) {\n")
- out.write(""" console.debug("{0}Proxy::{1}")\n""".format(ifacename, name))
- out.write(" try {\n")
- out.write(" if(\"{0}\" in sdl{1})\n".format(name, ifacename))
- out.write(" return sdl{0}.{1}(" .format(ifacename, name))
- params = request.findall('param')
- for i in range(len(params)):
- out.write('params.' + params[i].get('name'))
- if i <> len(params) - 1:
- out.write(', ')
- out.write(")\n")
- out.write(" else\n")
- out.write(""" return { "__errno": Common.Result.UNSUPPORTED_REQUEST }\n""")
- out.write(" } catch(err) {\n")
- out.write(""" return { "__errno": err }\n""")
- out.write(" }\n")
- out.write(" }\n\n")
-
-
- def write_signal_param(self, param, out):
- if param.array or param.struct or not param.mandatory: typ = type_variant_name
- elif param.type == 'Integer' or param.enum: typ = 'int'
- elif param.type == 'String': typ = 'string'
- elif param.type == 'Boolean': typ = 'bool'
- elif param.type == 'Float': typ = 'double'
- else: typ = type_variant_name
- out.write(typ + ' ' + param.name)
-
-
- def write_signal(self, ifacename, notification, out):
- name = notification.get('name')
- name = name[:1].lower() + name[1:]
- out.write(" signal " + name + "(")
- params = notification.findall('param')
- for i in range(len(params)):
- self.write_signal_param(self.make_param_desc(params[i], ifacename), out)
- if i <> len(params) - 1:
- out.write(', ')
- out.write(")\n")
- name = notification.get('name')
- out.write(""" on{1}: console.debug("emitted {0}:{1}")\n""".format(ifacename, name))
-
-
- def write_qml(self, iface, out):
- global qt_quick_version
- name = iface.get('name')
- out.write("import QtQuick %s\n" % qt_quick_version)
- out.write("""import "Common.js" as Common\n""")
- out.write("import \"..\"\n\n")
- out.write("Item {\n")
- out.write(" " + name + " {\n")
- out.write(" id: sdl" + name + "\n")
- out.write(" }\n")
-
- notifications = impl.find_notifications(interface_el)
- request_responses = impl.find_request_response_pairs(interface_el)
- for request, response in request_responses:
- self.write_function(name, request, response, out)
- for n in notifications:
- self.write_signal(name, n, out)
- out.write("}\n")
-
-
- def write_js_enum(self, enum, out):
- out.write("var " + enum.get('name') + " = {\n")
- lastval = -1
- elements = enum.findall('element')
- for i in range(len(elements)):
- element = elements[i]
- value = element.get('value')
- if value is None:
- value = lastval + 1
- else:
- value = int(value)
- lastval = value
- name = element.get('internal_name')
- if name is None:
- name = element.get('name')
- out.write(" " + name + ': ' + str(value))
- if len(elements) - 1 != i: out.write(',')
- out.write("\n")
- out.write("}\n\n")
-
-
-def write_header(out):
- out.write("// Warning! This file is generated by '%s'. Edit at your own risk.\n" % argv[0])
- out.write("""/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-""")
-
-arg_parser = ArgumentParser(description="Generator of Qt to QDbus QML part")
-arg_parser.add_argument('--infile', required=True, help="full name of input file, e.g. applink/src/components/interfaces/QT_HMI_API.xml")
-arg_parser.add_argument('--version', required=False, help="Qt version 4.8.5 (default) or 5.1.0")
-arg_parser.add_argument('--outdir', required=True, help="path to directory where output files with pattern name <intarface name>Proxy.qml will be saved, e.g. BasicCommunicationProxy.qml, ButtonsProxy.qml VRProxy.qml")
-args = arg_parser.parse_args()
-
-if args.version == "4.8.5":
- qt_quick_version = "1.1"
- type_variant_name = "variant"
-elif args.version == "5.1.0":
- qt_quick_version = "2.0"
- type_variant_name = "var"
-
-if not path.isdir(args.outdir):
- makedirs(args.outdir)
-
-in_tree = ElementTree.parse(args.infile)
-in_tree_root = in_tree.getroot()
-
-impl = Impl(in_tree_root)
-
-for interface_el in in_tree_root.findall('interface'):
- notifications = impl.find_notifications(interface_el)
- request_responses = impl.find_request_response_pairs(interface_el)
- if notifications or request_responses:
- filename = interface_el.get('name')+'Proxy.qml'
- outfile = open(args.outdir + '/' + filename, 'w')
- write_header(outfile)
- impl.write_qml(interface_el, outfile)
-
-enum_files = dict()
-for (iface, name), enum in impl.enums.items():
- if iface in enum_files:
- outfile = enum_files[iface]
- else:
- filename = iface+'.js'
- outfile = open(args.outdir + '/' + filename, 'w')
- write_header(outfile)
- outfile.write(".pragma library\n")
- enum_files[iface] = outfile
- impl.write_js_enum(enum, outfile)
-
-
diff --git a/SDL_Core/src/components/dbus/include/dbus/dbus_adapter.h b/SDL_Core/src/components/dbus/include/dbus/dbus_adapter.h
deleted file mode 100644
index a704fc9a0..000000000
--- a/SDL_Core/src/components/dbus/include/dbus/dbus_adapter.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_ADAPTER_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_ADAPTER_H_
-
-#include <string>
-#include "utils/logger.h"
-#include "smart_objects/smart_object.h"
-#include "dbus/schema.h"
-
-struct DBusConnection;
-struct DBusMessage;
-struct DBusMessageIter;
-
-namespace dbus {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-/**
- * \brief class for work with DBus
- */
-class DBusAdapter {
- public:
- /**
- * \brief constructs DBus adapter
- * \param sdlServiceName core service name
- * \param sdlObjectPath core object path
- * \param hmiServiceName hmi service name
- */
- DBusAdapter(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath);
-
- /**
- * \brief destructs DBus adapter
- */
- virtual ~DBusAdapter();
-
- /**
- * \brief inits service
- * \return true if success
- */
- bool Init();
-
- /**
- * \brief return schema messages for DBus
- * \return schema
- */
- const DBusSchema& get_schema() const;
-
- protected:
- static log4cxx::LoggerPtr logger_;
-
- /**
- * \brief calls method on HMI
- * \param id id message
- * \param func_id id function in Ford protocol
- * \param name pair interface and name of method for call
- * \param obj params for call
- */
- void MethodCall(uint id, const MessageId func_id, const MessageName name,
- const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends signal
- * \param id id message
- * \param func_id id function in Ford protocol
- * \param name pair interface and name of signal for call
- * \param obj params for signal
- */
- void Signal(const MessageId func_id, const MessageName name,
- const smart_objects::SmartObject& obj);
-
- /**
- * \brief returns result of call method to HMI
- * \param id id message
- * \param obj params for return
- */
- void MethodReturn(uint id, const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends error on message from HMI
- * \param id id message
- * \param msg message from HMI
- * \param name name of error
- * \param description description of error
- */
- void Error(uint id, const std::string& name, const std::string& description);
-
- /**
- * \brief adds a match rule
- * \param rule string rule in the DBus specification
- */
- void AddMatch(const std::string& rule);
-
- /**
- * \brief processes incoming message from DBus if queue isn't empty
- * and fill obj
- * \param obj object for send to core
- * \return true if message processed
- */
- bool Process(smart_objects::SmartObject& obj);
-
- /**
- * \brief push Ford message id to map by serial
- * \param serial DBus message serial
- * \param ids pair correlation id and Ford message id
- */
- inline void PushMessageId(uint32_t serial, std::pair<uint, MessageId> ids);
-
- /**
- * \brief pop Ford message id from map by serial
- * \param serial DBus message serial
- * \return pair correlation id and Ford message id
- */
- inline std::pair<uint, MessageId> PopMessageId(uint32_t serial);
-
- std::string sdl_service_name_;
- std::string sdl_object_path_;
- std::string hmi_service_name_;
- std::string hmi_object_path_;
- DBusConnection* conn_;
-
- private:
- /**
- * \brief schema messages and arguments for DBus
- */
- const DBusSchema* schema_;
-
- /**
- * \brief mapping serial message DBus on message id Ford protocol
- */
- std::map<uint32_t, std::pair<uint, MessageId> > map_messages_;
-
- /**
- * \brief processes incoming call of method and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessMethodCall(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief processes incoming return of method and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessMethodReturn(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief processes incoming error and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessError(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief processes incoming signal and fill obj
- * \param msg message from DBus
- * \param obj object for send to core
- * \return true if success
- */
- bool ProcessSignal(DBusMessage* msg, smart_objects::SmartObject& obj);
-
- /**
- * \brief sets arguments to message
- * \param msg DBus message
- * \param rules list of rules for arguments
- * \param args map of arguments
- * \return true if success
- */
- bool SetArguments(DBusMessage* msg, const ListArgs& rules,
- const smart_objects::SmartObject& args);
-
- /**
- * \brief Sets one argument to message
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of argument
- * \return true if success
- */
- bool SetOneArgument(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets value for argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of argument
- * \return true if success
- */
- bool SetValue(DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets value for every element of argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param array values of argument
- * \return true if success
- */
- bool SetArrayValue(DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets struct value for argument
- * \param iter DBus message iter
- * \param rules description for argument
- * \param param structure
- * \return true if success
- */
- bool SetStructValue(DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- const smart_objects::SmartObject& param);
-
- /**
- * \brief sets optional value for argument.
- * Optional param is struct bool, value
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of optional argument
- * \return true if success
- */
- bool SetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject &param);
-
- /**
- * \brief gets arguments from message
- * \param iter DBus message iterator
- * \param code response code (output)
- * \param message response message (output)
- * \return true if success
- */
- bool GetHeader(DBusMessageIter* iter, int *code, std::string *message);
-
- /**
- * \brief gets arguments from message with header
- * \param iter DBus message iterator
- * \param rules list of rules for arguments
- * \param args map of arguments
- * \return true if success
- */
- bool GetArguments(DBusMessageIter* iter, const ListArgs& rules,
- smart_objects::SmartObject& args);
-
- /**
- * \brief gets one argument from message
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param args map of arguments
- * \return true if success
- */
- bool GetOneArgument(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject &args);
-
- /**
- * \brief gets value for argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of argument
- * \return true if success
- */
- bool GetValue(DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief gets value for every element of argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param array values of argument
- * \return true if success
- */
- bool GetArrayValue(DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief gets struct value for argument
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param structure
- * \return true if success
- */
- bool GetStructValue(DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- smart_objects::SmartObject& param);
-
- /**
- * \brief gets optional value for argument.
- * Optional param is struct bool, value
- * \param iter DBus message iterator
- * \param rules description for argument
- * \param param value of optional argument
- * \return true if success
- */
- bool GetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject &param);
-
- /**
- * \brief processes request on introspect
- * \param msg DBus message
- */
- void Introspect(DBusMessage* msg);
-};
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_ADAPTER_H_
diff --git a/SDL_Core/src/components/dbus/include/dbus/dbus_message_controller.h b/SDL_Core/src/components/dbus/include/dbus/dbus_message_controller.h
deleted file mode 100644
index 6eb07989e..000000000
--- a/SDL_Core/src/components/dbus/include/dbus/dbus_message_controller.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_CONTROLLER_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_CONTROLLER_H_
-
-#include <string>
-#include <map>
-#include "dbus/dbus_adapter.h"
-
-namespace dbus {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-class DBusMessageController : public DBusAdapter {
- public:
- /**
- * \brief constructs DBus message controller
- * \param sdlServiceName name of service SDL
- * \param sdlObjectPath path of object SDL
- * \param hmiServiceName name of service HMI
- * \param hmiObjectPath path of object HMI
- */
- DBusMessageController(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath);
-
- /**
- * \brief destructs DBus message controller
- */
- virtual ~DBusMessageController();
-
- /**
- * \brief subscribes to the DBus signal.
- * \param interface name of interface in HMI
- * \param signal name of signal
- */
- void SubscribeTo(const std::string& interface, const std::string& signal);
-
- /**
- * \brief Method for receiving thread.
- */
- void* MethodForReceiverThread(void*);
-
- protected:
- /**
- * \brief sends message to core
- * \param obj
- */
- virtual void SendMessageToCore(const smart_objects::SmartObject& obj) = 0;
-};
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_DBUS_MESSAGE_CONTROLLER_H_
diff --git a/SDL_Core/src/components/dbus/include/dbus/message_descriptions.h b/SDL_Core/src/components/dbus/include/dbus/message_descriptions.h
deleted file mode 100644
index 9f73b2573..000000000
--- a/SDL_Core/src/components/dbus/include/dbus/message_descriptions.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-#ifndef SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
-#define SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
-
-#include <stdint.h>
-#include <stdlib.h>
-#include "interfaces/HMI_API.h"
-
-namespace ford_message_descriptions {
-
-enum ParameterType {Integer, Boolean, Float, String, Struct, Enum, Array};
-
-struct ParameterDescription {
- const char* name;
- const ParameterType type;
- const bool obligatory; // TODO (dchmerev@luxoft.com): rename to 'mandatory' as in HMI API description
-};
-
-struct ArrayDescription {
- const ParameterDescription base;
- const ParameterDescription* element;
- const char* element_dbus_signature;
-};
-
-struct StructDescription {
- const ParameterDescription base;
- const ParameterDescription** parameters;
-};
-
-struct MessageDescription {
- const char* interface;
- const char* name;
- const hmi_apis::messageType::eType message_type;
- const hmi_apis::FunctionID::eType function_id;
- const ParameterDescription** parameters;
-};
-
-extern const MessageDescription* message_descriptions[];
-
-} // namespace ford_message_descriptions
-
-#endif // SRC_COMPONENTS_DBUS_INCLUDE_DBUS_MESSAGE_DESCRIPTIONS_H_
-
diff --git a/SDL_Core/src/components/dbus/include/dbus/schema.h b/SDL_Core/src/components/dbus/include/dbus/schema.h
deleted file mode 100644
index 4e6ae9baf..000000000
--- a/SDL_Core/src/components/dbus/include/dbus/schema.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-#ifndef SRC_COMPONENTS_DBUS_SCHEMA_INCLUDE_DBUS_SCHEMA_SCHEMA_H_
-#define SRC_COMPONENTS_DBUS_SCHEMA_INCLUDE_DBUS_SCHEMA_SCHEMA_H_
-
-#include <string>
-#include <vector>
-#include <utility>
-
-#include "dbus/message_descriptions.h"
-#include "interfaces/HMI_API.h"
-
-namespace dbus {
-
-using ford_message_descriptions::ParameterDescription;
-using ford_message_descriptions::MessageDescription;
-
-struct Description;
-
-typedef hmi_apis::FunctionID::eType MessageId;
-typedef hmi_apis::messageType::eType MessageType;
-typedef std::pair<std::string, std::string> MessageName; // interface, message
-typedef std::vector<const ParameterDescription*> ListArgs;
-typedef std::vector<const Description*> Messages;
-
-/**
- * \brief Wrapper class for message description
- */
-class DBusSchema {
- public:
- explicit DBusSchema(const MessageDescription** array);
-
- /**
- * \brief gets message name by message id
- * \param id id message
- * \return name message
- */
- MessageName getMessageName(MessageId id) const;
-
- /**
- * \brief gets message id by message name
- * \param name name message
- * \return id message
- */
- MessageId getMessageId(MessageName name) const;
-
- /**
- * \brief gets list rules for arguments
- * \param id id message
- * \param type type message
- * \return list rules
- */
- ListArgs getListArgs(MessageId id, MessageType type) const;
-
- /**
- * \brief gets list rules for arguments
- * @param name name message
- * @param type type message
- * @return list rules
- */
- ListArgs getListArgs(MessageName name, MessageType type) const;
-
- private:
- Messages msgs_;
-};
-
-} // namespace dbus
-
-#endif // SRC_COMPONENTS_DBUS_SCHEMA_INCLUDE_DBUS_SCHEMA_SCHEMA_H_
diff --git a/SDL_Core/src/components/dbus/src/dbus_adapter.cc b/SDL_Core/src/components/dbus/src/dbus_adapter.cc
deleted file mode 100644
index 6f5138aa4..000000000
--- a/SDL_Core/src/components/dbus/src/dbus_adapter.cc
+++ /dev/null
@@ -1,782 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "dbus/dbus_adapter.h"
-#include <dbus/dbus.h>
-#include "formatters/CSmartFactory.hpp"
-
-using ford_message_descriptions::ParameterDescription;
-namespace sos = NsSmartDeviceLink::NsJSONHandler::strings;
-
-extern char introspection_xml[];
-
-namespace dbus {
-
-log4cxx::LoggerPtr DBusAdapter::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("HMIMessageHandler"));
-
-std::vector<std::string> &split(const std::string &s, char delim,
- std::vector<std::string> &elems) {
- std::stringstream ss(s);
- std::string item;
- while (std::getline(ss, item, delim)) {
- elems.push_back(item);
- }
- return elems;
-}
-
-DBusAdapter::DBusAdapter(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath)
- : sdl_service_name_(sdlServiceName),
- sdl_object_path_(sdlObjectPath),
- hmi_service_name_(hmiServiceName),
- hmi_object_path_(hmiObjectPath),
- conn_(NULL),
- schema_(new DBusSchema(ford_message_descriptions::message_descriptions)) {
-}
-
-DBusAdapter::~DBusAdapter() {
- dbus_shutdown();
- delete schema_;
-}
-
-bool DBusAdapter::Init() {
- DBusError err;
- int ret;
- dbus_error_init(&err);
- if (!dbus_threads_init_default()) {
- LOG4CXX_ERROR(logger_, "DBus: Can't initializes threads");
- return false;
- }
- conn_ = dbus_bus_get(DBUS_BUS_SESSION, &err);
- if (dbus_error_is_set(&err)) {
- LOG4CXX_ERROR(logger_, "DBus: Connection Error " << err.message);
- dbus_error_free(&err);
- return false;
- }
- ret = dbus_bus_request_name(conn_, sdl_service_name_.c_str(),
- DBUS_NAME_FLAG_DO_NOT_QUEUE,
- &err);
- if (ret == -1 || dbus_error_is_set(&err)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't request name " << err.name);
- dbus_error_free(&err);
- return false;
- }
- if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
- LOG4CXX_ERROR(
- logger_,
- "DBus: Service '" << sdl_service_name_ << "' is already running");
- return false;
- }
-
- LOG4CXX_INFO(logger_, "DBus: Success init dbus adaptor");
- return true;
-}
-
-bool DBusAdapter::Process(smart_objects::SmartObject& obj) {
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return false;
- }
- DBusMessage* msg = dbus_connection_pop_message(conn_);
- if (msg != NULL) {
- switch (dbus_message_get_type(msg)) {
- case DBUS_MESSAGE_TYPE_METHOD_CALL:
- return ProcessMethodCall(msg, obj);
- case DBUS_MESSAGE_TYPE_METHOD_RETURN:
- return ProcessMethodReturn(msg, obj);
- case DBUS_MESSAGE_TYPE_ERROR:
- return ProcessError(msg, obj);
- case DBUS_MESSAGE_TYPE_SIGNAL:
- return ProcessSignal(msg, obj);
- default:
- return false;
- }
- } else {
- dbus_connection_read_write(conn_, 50);
- }
- return false;
-}
-
-void DBusAdapter::MethodReturn(uint id, const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj) {
- // TODO(KKolodiy): implement
-}
-
-void DBusAdapter::Error(uint id, const std::string& name,
- const std::string& description) {
- // TODO(KKolodiy): implement
-}
-
-void DBusAdapter::MethodCall(uint id, const MessageId func_id,
- const MessageName name,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj) {
- LOG4CXX_DEBUG(logger_, "Method call " << name.first << "." << name.second);
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return;
- }
-
- if (func_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return;
- }
-
- DBusMessage* msg;
- msg = dbus_message_new_method_call(
- hmi_service_name_.c_str(), hmi_object_path_.c_str(),
- (hmi_service_name_ + "." + name.first).c_str(), name.second.c_str());
- if (NULL == msg) {
- LOG4CXX_WARN(logger_, "DBus: Failed call method (Message Null)");
- return;
- }
-
- const ListArgs& args = schema_->getListArgs(func_id,
- hmi_apis::messageType::request);
- if (!SetArguments(msg, args, obj)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Signature is wrong)");
- dbus_message_unref(msg);
- return;
- }
-
- dbus_uint32_t serial;
- if (!dbus_connection_send(conn_, msg, &serial)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Can't send message)");
- dbus_message_unref(msg);
- return;
- }
- PushMessageId(serial, std::make_pair(id, func_id));
- dbus_message_unref(msg);
- LOG4CXX_INFO(logger_, "DBus: Success call method");
-}
-
-void DBusAdapter::Signal(const MessageId func_id, const MessageName name,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj) {
- LOG4CXX_DEBUG(logger_, "Signal " << name.first << "." << name.second);
- if (conn_ == NULL) {
- LOG4CXX_ERROR(logger_, "DBus: DBusAdaptor isn't init");
- return;
- }
-
- if (func_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return;
- }
-
- DBusMessage *msg;
- msg = dbus_message_new_signal(sdl_object_path_.c_str(),
- (sdl_service_name_ + "." + name.first).c_str(),
- name.second.c_str());
- if (NULL == msg) {
- LOG4CXX_WARN(logger_, "DBus: Failed emit signal (Message Null)");
- return;
- }
-
- const ListArgs& args = schema_->getListArgs(
- func_id, hmi_apis::messageType::notification);
- if (!SetArguments(msg, args, obj)) {
- LOG4CXX_ERROR(logger_, "DBus: Failed call method (Signature is wrong)");
- dbus_message_unref(msg);
- return;
- }
-
- if (!dbus_connection_send(conn_, msg, NULL)) { // serial isn't required
- LOG4CXX_WARN(logger_, "DBus: Failed emit signal (Out Of Memory)");
- dbus_message_unref(msg);
- return;
- }
- dbus_message_unref(msg);
- LOG4CXX_INFO(logger_, "DBus: Success emit signal");
-}
-
-void DBusAdapter::AddMatch(const std::string& rule) {
- LOG4CXX_INFO(logger_, "Subscription: " << rule);
- dbus_bus_add_match(conn_, rule.c_str(), NULL);
-}
-
-bool DBusAdapter::ProcessMethodCall(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- std::string method = dbus_message_get_member(msg);
- std::string interface = dbus_message_get_interface(msg);
- LOG4CXX_INFO(logger_, "DBus: name of method " << interface << " " << method);
-
- if (interface == "org.freedesktop.DBus.Introspectable"
- && method == "Introspect") {
- LOG4CXX_INFO(logger_, "DBus: INTROSPECT");
- Introspect(msg);
- return false;
- }
- // SDL Core does not provide other methods
- return false;
-}
-
-bool DBusAdapter::ProcessMethodReturn(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- LOG4CXX_INFO(logger_, "ProcessMethodReturn");
- dbus_uint32_t reply_serial = dbus_message_get_reply_serial(msg);
- std::pair<uint, MessageId> ids = PopMessageId(reply_serial);
- if (ids.second == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return false;
- }
-
- obj[sos::S_MSG_PARAMS] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- ListArgs args = schema_->getListArgs(ids.second,
- hmi_apis::messageType::response);
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- int code = 0;
- std::string message;
- smart_objects::SmartObject description(smart_objects::SmartType_Map);
- bool ret = GetHeader(&iter, &code, &message)
- && GetArguments(&iter, args, description);
-
- if (ret) {
- obj[sos::S_PARAMS][sos::S_CORRELATION_ID] = ids.first;
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = ids.second;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] = hmi_apis::messageType::response;
- obj[sos::S_PARAMS][sos::kCode] = code;
- obj[sos::S_PARAMS][sos::kMessage] = message;
- if (code != hmi_apis::Common_Result::SUCCESS) {
- MessageName name = schema_->getMessageName(ids.second);
- description["method"] = name.first + "." + name.second;
- obj[sos::S_PARAMS]["data"] = description;
- } else {
- obj[sos::S_MSG_PARAMS] = description;
- }
- }
-
- dbus_message_unref(msg);
- return ret;
-}
-
-bool DBusAdapter::ProcessError(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- dbus_uint32_t reply_serial = dbus_message_get_reply_serial(msg);
- std::pair<uint, MessageId> ids = PopMessageId(reply_serial);
- if (ids.second == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name method");
- return false;
- }
-
- const char* name;
- bool ret = false;
- if ((name = dbus_message_get_error_name(msg)) != NULL) {
- ford_message_descriptions::ParameterDescription rule = { "description",
- ford_message_descriptions::String, true };
- ListArgs args;
- args.push_back(&rule);
- smart_objects::SmartObject description(smart_objects::SmartType_Map);
- description[rule.name] = smart_objects::SmartObject(
- smart_objects::SmartType_String);
-
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- ret = GetArguments(&iter, args, description);
- MessageName method = schema_->getMessageName(ids.second);
-
- obj[sos::S_PARAMS][sos::S_CORRELATION_ID] = ids.first;
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = ids.second;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] = hmi_apis::messageType::response;
- obj[sos::S_PARAMS][sos::kCode] = description[rule.name].asInt();
- obj[sos::S_MSG_PARAMS] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
- obj[sos::S_PARAMS]["data"]["method"] = method.first + "." + method.second;
-
- LOG4CXX_WARN(
- logger_,
- "DBus: Call of method " << method.first << "." << method.second << " returned error " << name << ": " << description[rule.name].asString());
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Type message isn't error");
- }
-
- dbus_message_unref(msg);
- return ret;
-}
-
-bool DBusAdapter::ProcessSignal(DBusMessage* msg,
- smart_objects::SmartObject& obj) {
- std::string method = dbus_message_get_member(msg);
- std::string interface = dbus_message_get_interface(msg);
- LOG4CXX_INFO(logger_, "DBus: name of signal " << method);
-
- std::vector<std::string> elems;
- split(interface, '.', elems);
- MessageName name(elems.back(), method);
- MessageId m_id = schema_->getMessageId(name);
- if (m_id == hmi_apis::FunctionID::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "DBus: Invalid name signal");
- return false;
- }
-
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID] = m_id;
- obj[sos::S_PARAMS][sos::S_MESSAGE_TYPE] = hmi_apis::messageType::notification;
- obj[sos::S_MSG_PARAMS] = smart_objects::SmartObject(
- smart_objects::SmartType_Map);
-
- const ListArgs args = schema_->getListArgs(
- name, hmi_apis::messageType::notification);
-
- DBusMessageIter iter;
- dbus_message_iter_init(msg, &iter);
- bool ret = GetArguments(&iter, args, obj[sos::S_MSG_PARAMS]);
- dbus_message_unref(msg);
- return ret;
-}
-
-bool DBusAdapter::SetArguments(DBusMessage* msg, const ListArgs& rules,
- const smart_objects::SmartObject& args) {
- DBusMessageIter iter;
- dbus_message_iter_init_append(msg, &iter);
- size_t size = rules.size();
- for (size_t i = 0; i < size; ++i) {
- const smart_objects::SmartObject& param = args.getElement(rules[i]->name);
- if (!SetOneArgument(&iter, rules[i], param)) {
- return false;
- }
- }
- return true;
-}
-
-bool DBusAdapter::SetOneArgument(DBusMessageIter* iter,
- const ParameterDescription* rules,
- const smart_objects::SmartObject& param) {
- if (rules->obligatory) {
- if (param.isValid()) {
- return SetValue(iter, rules, param);
- } else {
- LOG4CXX_WARN(logger_,
- "DBus: Argument '" << rules->name << "' is obligatory!");
- return false;
- }
- } else {
- return SetOptionalValue(iter, rules, param);
- }
-}
-
-bool DBusAdapter::SetValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject& param) {
- // LOG4CXX_DEBUG(logger_, "DBus: Set param " << rules->name << " = " << param.asString());
- int type = 0;
- void* value = 0;
- dbus_int32_t integerValue = 0;
- double floatValue = 0;
- dbus_bool_t booleanValue = false;
- const char* stringValue;
- switch (rules->type) {
- case ford_message_descriptions::ParameterType::Array:
- return SetArrayValue(
- iter,
- reinterpret_cast<const ford_message_descriptions::ArrayDescription*>(rules),
- param);
- break;
- case ford_message_descriptions::ParameterType::Struct:
- return SetStructValue(
- iter,
- reinterpret_cast<const ford_message_descriptions::StructDescription*>(rules),
- param);
- break;
- case ford_message_descriptions::ParameterType::Enum:
- case ford_message_descriptions::ParameterType::Integer:
- type = DBUS_TYPE_INT32;
- integerValue = param.asInt();
- value = &integerValue;
- break;
- case ford_message_descriptions::ParameterType::Float:
- type = DBUS_TYPE_DOUBLE;
- floatValue = param.asDouble();
- value = &floatValue;
- break;
- case ford_message_descriptions::ParameterType::Boolean:
- type = DBUS_TYPE_BOOLEAN;
- booleanValue = param.asBool();
- value = &booleanValue;
- break;
- case ford_message_descriptions::ParameterType::String:
- type = DBUS_TYPE_STRING;
- stringValue = param.asString().c_str();
- value = &stringValue;
- break;
- default:
- LOG4CXX_ERROR(logger_, "DBus: Unknown type of argument")
- ;
- return false;
- }
- return dbus_message_iter_append_basic(iter, type, value);
-}
-
-bool DBusAdapter::SetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- const smart_objects::SmartObject &param) {
- DBusMessageIter sub_iter;
- if (!dbus_message_iter_open_container(iter, DBUS_TYPE_STRUCT, NULL,
- &sub_iter)) {
- LOG4CXX_ERROR(
- logger_,
- "DBus: Can't open container type (STRUCT) for optional parameter");
- return false;
- }
-
- ford_message_descriptions::ParameterDescription flagRules = { "flag",
- ford_message_descriptions::Boolean, true };
- smart_objects::SmartObject flag(
- param.getType() != smart_objects::SmartType_Invalid);
- if (!SetValue(&sub_iter, &flagRules, flag)
- || !SetValue(&sub_iter, rules, param)) {
- return false;
- }
-
- if (!dbus_message_iter_close_container(iter, &sub_iter)) {
- LOG4CXX_ERROR(
- logger_,
- "DBus: Can't close container type (STRUCT) for optional parameter");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::SetArrayValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- const smart_objects::SmartObject& param) {
- smart_objects::SmartType type = param.getType();
- if (type != smart_objects::SmartType_Array &&
- type != smart_objects::SmartType_Invalid) {
- LOG4CXX_ERROR(logger_, "DBus: SmartObject is not a map");
- return false;
- }
- DBusMessageIter sub_iter;
- if (!dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
- rules->element_dbus_signature,
- &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't open container type (ARRAY)");
- return false;
- }
- size_t size = param.length();
- for (size_t i = 0; i < size; ++i) {
- if (!SetValue(&sub_iter, rules->element, param[i])) {
- return false;
- }
- }
- if (!dbus_message_iter_close_container(iter, &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't close container type (ARRAY)");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::SetStructValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- const smart_objects::SmartObject& structure) {
- smart_objects::SmartType type = structure.getType();
- if (type != smart_objects::SmartType_Map &&
- type != smart_objects::SmartType_Invalid) {
- LOG4CXX_ERROR(logger_, "DBus: SmartObject is not a map");
- return false;
- }
- DBusMessageIter sub_iter;
- if (!dbus_message_iter_open_container(iter, DBUS_TYPE_STRUCT, NULL,
- &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't open container type (STRUCT)");
- return false;
- }
- const ParameterDescription** entry;
- entry = rules->parameters;
- while (*entry != NULL) {
- const smart_objects::SmartObject& param =
- structure.getElement((*entry)->name);
- if (!SetOneArgument(&sub_iter, *entry, param)) {
- return false;
- }
- entry++;
- }
- if (!dbus_message_iter_close_container(iter, &sub_iter)) {
- LOG4CXX_ERROR(logger_, "DBus: Can't close container type (STRUCT)");
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::GetHeader(DBusMessageIter* iter, int* code,
- std::string* message) {
- // Get code of response
- dbus_int32_t intValue;
- int type = dbus_message_iter_get_arg_type(iter);
- if (type != DBUS_TYPE_INT32) {
- LOG4CXX_ERROR(logger_, "DBus: Unknown format of header");
- return false;
- }
- dbus_message_iter_get_basic(iter, &intValue);
- *code = intValue;
- LOG4CXX_DEBUG(logger_, "DBus: Code of response " << *code);
-
- dbus_message_iter_next(iter);
-
- // Get message of response
- type = dbus_message_iter_get_arg_type(iter);
- if (type != DBUS_TYPE_STRING) {
- LOG4CXX_ERROR(logger_, "DBus: Unknown format of header");
- return false;
- }
- const char* stringValue;
- dbus_message_iter_get_basic(iter, &stringValue);
- *message = stringValue;
- LOG4CXX_DEBUG(logger_, "DBus: message of response " << *message);
-
- dbus_message_iter_next(iter);
- return true;
-}
-
-bool DBusAdapter::GetArguments(DBusMessageIter* iter, const ListArgs& rules,
- smart_objects::SmartObject& args) {
- LOG4CXX_TRACE(logger_, "GetArguments");
-
- size_t size = rules.size();
- for (size_t i = 0; i < size; ++i) {
- if (!GetOneArgument(iter, rules[i], args)) {
- return false;
- }
- dbus_message_iter_next(iter);
- }
- return true;
-}
-
-const DBusSchema& DBusAdapter::get_schema() const {
- return *schema_;
-}
-
-bool DBusAdapter::GetOneArgument(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& args) {
- if (rules->obligatory) {
- return GetValue(iter, rules, args[rules->name]);
- } else {
- if (!GetOptionalValue(iter, rules, args[rules->name])) {
- args.erase(rules->name);
- }
- return true; // for optional argument always true
- }
-}
-
-bool DBusAdapter::GetValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param) {
- LOG4CXX_DEBUG(logger_, "DBus: Get param " << rules->name);
- int type = dbus_message_iter_get_arg_type(iter);
- switch (rules->type) {
- case ford_message_descriptions::ParameterType::Array:
- if (type == DBUS_TYPE_ARRAY) {
- return GetArrayValue(
- iter,
- // FIXME (dchmerev@luxoft.com): not portable, danger cast.
- reinterpret_cast<const ford_message_descriptions::ArrayDescription*>(rules),
- param);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Struct:
- if (type == DBUS_TYPE_STRUCT) {
- return GetStructValue(
- iter,
- reinterpret_cast<const ford_message_descriptions::StructDescription*>(rules),
- param);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Enum:
- case ford_message_descriptions::ParameterType::Integer:
- if (type == DBUS_TYPE_INT32) {
- dbus_int32_t integerValue;
- dbus_message_iter_get_basic(iter, &integerValue);
- smart_objects::SmartObject value(integerValue);
- param = value;
- LOG4CXX_DEBUG(logger_, "DBus: " << rules->name << " = " << integerValue);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Float:
- if (type == DBUS_TYPE_DOUBLE) {
- double floatValue;
- dbus_message_iter_get_basic(iter, &floatValue);
- smart_objects::SmartObject value(floatValue);
- param = value;
- LOG4CXX_DEBUG(logger_, "DBus: " << rules->name << " = " << floatValue);
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::Boolean:
- if (type == DBUS_TYPE_BOOLEAN) {
- dbus_bool_t booleanValue;
- dbus_message_iter_get_basic(iter, &booleanValue);
- smart_objects::SmartObject value(static_cast<bool>(booleanValue));
- param = value;
- LOG4CXX_DEBUG(logger_, "DBus: " << rules->name << " = " << (booleanValue ? "true" : "false"));
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- case ford_message_descriptions::ParameterType::String:
- if (type == DBUS_TYPE_STRING) {
- const char* stringValue;
- dbus_message_iter_get_basic(iter, &stringValue);
- std::string strValue = stringValue;
- smart_objects::SmartObject value(strValue);
- param = value;
- LOG4CXX_DEBUG(logger_, "DBus: " << rules->name << " = \"" << strValue << "\"");
- } else {
- LOG4CXX_ERROR(logger_, "DBus: Not expected type of argument");
- return false;
- }
- break;
- default:
- LOG4CXX_ERROR(logger_, "DBus: Unknown type of argument")
- ;
- return false;
- }
- return true;
-}
-
-bool DBusAdapter::GetArrayValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ArrayDescription* rules,
- smart_objects::SmartObject& param) {
- smart_objects::SmartObject array(smart_objects::SmartType_Array);
- int i = 0;
- DBusMessageIter sub_iter;
- dbus_message_iter_recurse(iter, &sub_iter);
- while (dbus_message_iter_get_arg_type(&sub_iter) != DBUS_TYPE_INVALID) {
- if (!GetValue(&sub_iter, rules->element, array[i])) {
- return false;
- }
- dbus_message_iter_next(&sub_iter);
- i++;
- }
- param = array;
- return true;
-}
-
-bool DBusAdapter::GetStructValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::StructDescription* rules,
- smart_objects::SmartObject& param) {
- DBusMessageIter sub_iter;
- dbus_message_iter_recurse(iter, &sub_iter);
- const ParameterDescription** entry;
- entry = rules->parameters;
- smart_objects::SmartObject structure(smart_objects::SmartType_Map);
- while (*entry != NULL) {
- if (!GetOneArgument(&sub_iter, *entry, structure)) {
- return false;
- }
- dbus_message_iter_next(&sub_iter);
- entry++;
- }
- param = structure;
- return true;
-}
-
-bool DBusAdapter::GetOptionalValue(
- DBusMessageIter* iter,
- const ford_message_descriptions::ParameterDescription* rules,
- smart_objects::SmartObject& param) {
- DBusMessageIter sub_iter;
- dbus_message_iter_recurse(iter, &sub_iter);
-
- ford_message_descriptions::ParameterDescription flagRules = { "flag",
- ford_message_descriptions::Boolean, true };
- smart_objects::SmartObject flag;
- if (!GetValue(&sub_iter, &flagRules, flag)) {
- return false;
- }
- if (flag.asBool()) {
- dbus_message_iter_next(&sub_iter);
- return GetValue(&sub_iter, rules, param);
- } else {
- return false;
- }
-}
-
-std::pair<uint, MessageId> DBusAdapter::PopMessageId(uint32_t serial) {
- std::map<dbus_uint32_t, std::pair<uint, MessageId> >::iterator it;
- it = map_messages_.find(serial);
- if (it != map_messages_.end()) {
- std::pair<uint, MessageId> ids = (*it).second;
- map_messages_.erase(it);
- return ids;
- }
- return std::make_pair(0, hmi_apis::FunctionID::INVALID_ENUM);
-}
-
-void DBusAdapter::PushMessageId(uint32_t serial,
- std::pair<uint, MessageId> ids) {
- map_messages_.insert(std::make_pair(serial, ids));
-}
-
-void DBusAdapter::Introspect(DBusMessage* msg) {
- DBusMessage *reply;
-
- dbus_uint32_t serial = dbus_message_get_serial(msg);
- reply = dbus_message_new_method_return(msg);
- if (!reply) {
- LOG4CXX_WARN(logger_, "DBus: Failed return method for introspection");
- return;
- }
-
- DBusMessageIter iter;
- dbus_message_iter_init_append(reply, &iter);
- char* value = introspection_xml;
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &value);
- dbus_connection_send(conn_, reply, &serial);
- dbus_connection_flush(conn_);
- dbus_message_unref(reply);
- dbus_message_unref(msg);
-}
-
-} // namespace dbus
diff --git a/SDL_Core/src/components/dbus/src/dbus_message_controller.cc b/SDL_Core/src/components/dbus/src/dbus_message_controller.cc
deleted file mode 100644
index 99a165398..000000000
--- a/SDL_Core/src/components/dbus/src/dbus_message_controller.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "dbus/dbus_message_controller.h"
-#include "formatters/CSmartFactory.hpp"
-
-namespace sos = NsSmartDeviceLink::NsJSONHandler::strings;
-
-namespace dbus {
-
-DBusMessageController::DBusMessageController(const std::string& sdlServiceName,
- const std::string& sdlObjectPath,
- const std::string& hmiServiceName,
- const std::string& hmiObjectPath)
- : DBusAdapter(sdlServiceName, sdlObjectPath,
- hmiServiceName, hmiObjectPath) {}
-
-void DBusMessageController::SubscribeTo(const std::string& interface,
- const std::string& signal) {
- std::string rule = "type='signal'";
- rule.append(", sender='").append(hmi_service_name_).append("'")
- .append(", path='").append(hmi_object_path_).append("'")
- .append(", interface='").append(hmi_service_name_).append(".")
- .append(interface).append("'")
- .append(", member='").append(signal).append("'");
- DBusAdapter::AddMatch(rule);
-}
-
-DBusMessageController::~DBusMessageController() {
-}
-
-void* DBusMessageController::MethodForReceiverThread(void*) {
- while (true) {
- smart_objects::SmartObject obj(smart_objects::SmartType_Map);
- obj[sos::S_PARAMS][sos::S_PROTOCOL_VERSION] = 2;
- obj[sos::S_PARAMS][sos::S_PROTOCOL_TYPE] = 1;
- if (DBusAdapter::Process(obj)) {
- SendMessageToCore(obj);
- }
- }
- return NULL;
-}
-
-} // namespace dbus
diff --git a/SDL_Core/src/components/dbus/src/schema.cc b/SDL_Core/src/components/dbus/src/schema.cc
deleted file mode 100644
index 226489cb6..000000000
--- a/SDL_Core/src/components/dbus/src/schema.cc
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-#include "dbus/schema.h"
-
-#include <algorithm>
-#include <functional>
-
-namespace dbus {
-
-struct Description {
- MessageId id;
- MessageName name;
- MessageType type;
- ListArgs args;
-};
-
-struct IsId : public std::unary_function<const Description*, bool> {
- explicit IsId(MessageId id) : id_(id) {}
- bool operator() (const Description* desc) {
- return desc->id == id_;
- }
- private:
- MessageId id_;
-};
-
-struct IsName : public std::unary_function<const Description*, bool> {
- explicit IsName(const MessageName& name) : name_(name) {}
- bool operator() (const Description* desc) {
- return desc->name == name_;
- }
- private:
- MessageName name_;
-};
-
-struct IsIdType : public std::unary_function<const Description*, bool> {
- explicit IsIdType(const MessageId& id, const MessageType& type)
- : id_(id), type_(type) {}
- bool operator() (const Description* desc) {
- return desc->id == id_ && desc->type == type_;
- }
- private:
- MessageId id_;
- MessageType type_;
-};
-
-struct IsNameType : public std::unary_function<const Description*, bool> {
- explicit IsNameType(const MessageName& name, const MessageType& type)
- : name_(name), type_(type) {}
- bool operator() (const Description* desc) {
- return desc->name == name_ && desc->type == type_;
- }
- private:
- MessageName name_;
- MessageType type_;
-};
-
-DBusSchema::DBusSchema(const MessageDescription** array) {
- const MessageDescription** msg = array;
- while (*msg != NULL) {
- Description *desc = new Description();
- desc->id = (*msg)->function_id;
- desc->name = std::make_pair((*msg)->interface, (*msg)->name);
- desc->type = (*msg)->message_type;
- const ParameterDescription** param;
- param = (*msg)->parameters;
- while (*param != NULL) {
- desc->args.push_back(*param);
- param++;
- }
- msgs_.push_back(desc);
- msg++;
- }
-}
-
-MessageName DBusSchema::getMessageName(MessageId id) const {
- Messages::const_iterator it = std::find_if(msgs_.begin(), msgs_.end(), IsId(id));
- if (msgs_.end() != it) {
- return (*it)->name;
- }
- return MessageName();
-}
-
-MessageId DBusSchema::getMessageId(MessageName name) const {
- Messages::const_iterator it = std::find_if(msgs_.begin(), msgs_.end(), IsName(name));
- if (msgs_.end() != it) {
- return (*it)->id;
- }
- return hmi_apis::FunctionID::eType::INVALID_ENUM;
-}
-
-ListArgs DBusSchema::getListArgs(MessageId id, MessageType type) const {
- Messages::const_iterator it = std::find_if(msgs_.begin(), msgs_.end(), IsIdType(id, type));
- if (msgs_.end() != it) {
- return (*it)->args;
- }
- return ListArgs();
-}
-
-ListArgs DBusSchema::getListArgs(MessageName name, MessageType type) const {
- Messages::const_iterator it = std::find_if(msgs_.begin(), msgs_.end(), IsNameType(name, type));
- if (msgs_.end() != it) {
- return (*it)->args;
- }
- return ListArgs();
-}
-
-} // namespace dbus_schema
diff --git a/SDL_Core/src/components/formatters/CMakeLists.txt b/SDL_Core/src/components/formatters/CMakeLists.txt
deleted file mode 100644
index 31016ee70..000000000
--- a/SDL_Core/src/components/formatters/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-include_directories (
- ./include/
- ../protocol_handler/include/
- ../utils/include/
- ../../thirdPartyLibs/jsoncpp/include/
- ../../thirdPartyLibs/MessageBroker/include
- ../../../src/components/smart_objects/include
-)
-
-set (SOURCES
- ./src/CSmartFactory.cpp
-)
-
-set (FORMATTER_SOURCES
- ./src/CFormatterJsonBase.cpp
- ./src/CFormatterJsonSDLRPCv1.cpp
- ./src/CFormatterJsonSDLRPCv2.cpp
- ./src/formatter_json_rpc.cc
- ./src/meta_formatter.cc
- ./src/generic_json_formatter.cc
-)
-
-add_library("formatters" ${SOURCES}
- ${FORMATTER_SOURCES}
-)
diff --git a/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonBase.hpp b/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonBase.hpp
deleted file mode 100644
index ef57d9b1b..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonBase.hpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * @file CFormatterJsonBase.hpp
- * @brief CFormatterJsonBase header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef __CFORMATTERJSONBASE_HPP__
-#define __CFORMATTERJSONBASE_HPP__
-
-#include "smart_objects/smart_object.h"
-#include "json/json.h"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-namespace meta_formatter_error_code {
- /**
- * @brief Error codes of MetaFormatter represented as bitmask
- **/
- typedef long tMetaFormatterErrorCode ;
-
- /**
- * @brief OK, no error
- */
- static const tMetaFormatterErrorCode kErrorOk = 0x0;
-
- /**
- * @brief origin smart object is not function
- */
- static const tMetaFormatterErrorCode kErrorObjectIsNotFunction = 0x01;
-
- /**
- * @brief smart shema describes object which is not function
- */
- static const tMetaFormatterErrorCode kErrorSchemaIsNotFunction = 0x02;
-
- /**
- * @brief result smart object has invalid type (SmartType_Invalid)
- * before passing to MetaFormatter, i.e. result object can not
- * be changed, i.e. result object can not be built
- *
- */
- static const tMetaFormatterErrorCode kErrorFailedCreateObjectBySchema = 0x04;
-}
-
- /**
- * @brief The base class for all JSON based formatters.
- */
- class CFormatterJsonBase
- {
- private:
-
- /**
- * @brief Constructor.
- */
- CFormatterJsonBase();
-
- /**
- * @brief Copy constructor.
- *
- * @param obj Object to copy.
- */
- CFormatterJsonBase(const CFormatterJsonBase &obj);
-
- protected:
-
-
- public:
-
- /**
- * @brief The method constructs a SmartObject from the input JSON object
- *
- * @param value Input JSON object.
- * @param obj The resulting SmartObject.
- */
- static void jsonValueToObj(const Json::Value &value,
- NsSmartDeviceLink::NsSmartObjects::SmartObject &obj);
-
- /**
- * @brief The method constructs a JSON object from the input SmartObject
- *
- * @param obj Input SmartObject. Can contain a complex structure of objects.
- * @param value The resulting JSON object. It has the same structure as the input SmartObject.
- */
- static void objToJsonValue(const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj,
- Json::Value &value);
- };
-
-}
-}
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
-
-#endif // __CFORMATTERJSONBASE_HPP__
diff --git a/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.hpp b/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.hpp
deleted file mode 100644
index 3b24a8a71..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.hpp
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-#ifndef __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS__CFORMATTERJSONSDLRPCV1_HPP__
-#define __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS__CFORMATTERJSONSDLRPCV1_HPP__
-
-#include "json/json.h"
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/enum_schema_item.h"
-
-#include "CFormatterJsonBase.hpp"
-
-#include "formatters/CSmartFactory.hpp"
-#include "formatters/meta_formatter.h"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-/**
- * @brief Class is used to convert SmartObjects to JSON string and vice versa.
- *
- * JSON strings is in SDLRPCv1 format.
- */
-class CFormatterJsonSDLRPCv1 : public CFormatterJsonBase {
- private:
- /**
- * @brief Hidden constructor.
- *
- * The class contains only static methods. Should not be instantiated.
- */
- CFormatterJsonSDLRPCv1();
-
- /**
- * @brief Hidden copy constructor.
- *
- * The class contains only static methods. Should not be instantiated.
- */
- CFormatterJsonSDLRPCv1(const CFormatterJsonSDLRPCv1&);
-
- /**
- * @brief Extracts a message type from the SmartObject
- */
- static const std::string getMessageType(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
-
- /**
- * @brief Extracts a message type from the root JSON object.
- *
- * @return Type or empty string if there's no type in the JSON object.
- */
- static const std::string getMessageType(const Json::Value& root);
-
- // SDLRPCv1 string consts
-
- /**
- * @brief String constant for REQUEST.
- */
- static const std::string S_REQUEST;
-
- /**
- * @brief String constant for RESPONSE.
- */
- static const std::string S_RESPONSE;
-
- /**
- * @brief String constant for NOTIFICATION.
- */
- static const std::string S_NOTIFICATION;
-
- /**
- * @brief String constant for PARAMETERS.
- */
- static const std::string S_PARAMETERS;
-
- /**
- * @brief String constant for NAME.
- */
- static const std::string S_NAME;
-
- /**
- * @brief String constant for CORRELATION_ID.
- */
- static const std::string S_CORRELATION_ID;
-
- public:
-
- static const int32_t kSuccess;
- static const int32_t kParsingError;
- static const int32_t kFunctionIdNotFound;
- static const int32_t kMessageTypeNotFound;
- static const int32_t kCorrelationIdNotFound;
-
- typedef NsSmartDeviceLink::NsJSONHandler::Formatters::meta_formatter_error_code::tMetaFormatterErrorCode tMetaFormatterErrorCode;
-
- /**
- * @brief Creates a JSON string from a SmartObject.
- *
- * @param obj input SmartObject
- * @param outStr resulting JSON string
- * @return true if success, false otherwise
- */
- static bool toString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj,
- std::string& outStr);
-
- /**
- * @brief Creates a SmartObject from a JSON string.
- *
- * @param str input JSON string
- * @param out The resulting SmartObject
- * @return true if success, otherwise - false
- */
- template<typename FunctionId, typename MessageType>
- static int32_t fromString(const std::string &str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject &out);
-
- /**
- * @brief Converts to string the smart object against the given schema
- *
- * @param object Original smart object
- * @param schema Smart schema which describes 'fake' smart object to be formatted
- * @param outStr Resulting JSON string
- * @return formatting error code
- */
- static tMetaFormatterErrorCode MetaFormatToString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
- std::string& outStr);
-
-};
-
-// ----------------------------------------------------------------------------
-
-template<typename FunctionId, typename MessageType>
-int32_t Formatters::CFormatterJsonSDLRPCv1::fromString(
- const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out) {
- int32_t result = kSuccess;
-
- try {
- Json::Value root;
- Json::Reader reader;
- std::string type;
-
- if (false == reader.parse(str, root)) {
- result = kParsingError | kMessageTypeNotFound | kFunctionIdNotFound
- | kCorrelationIdNotFound;
- }
-
- if (kSuccess == result) {
- type = getMessageType(root);
- if (true == type.empty()) {
- result = kMessageTypeNotFound | kFunctionIdNotFound
- | kCorrelationIdNotFound;
- }
- }
-
- FunctionId functionId;
- MessageType messageType;
-
- if (kSuccess == result) {
- typedef NsSmartDeviceLink::NsSmartObjects::TEnumSchemaItem<MessageType> MessageTypeEnum;
- if (false == MessageTypeEnum::stringToEnum(type, messageType)) {
- // If MessageType is not found than FunctionId and CorrelationId can not be found either
- result = kMessageTypeNotFound | kFunctionIdNotFound
- | kCorrelationIdNotFound;
- }
- }
-
- if (kSuccess == result) {
- typedef NsSmartDeviceLink::NsSmartObjects::TEnumSchemaItem<FunctionId> FunctionIdEnum;
- if (false
- == FunctionIdEnum::stringToEnum(root[type][S_NAME].asString(),
- functionId)) {
- result = kFunctionIdNotFound;
- functionId = FunctionId::INVALID_ENUM;
- }
- }
-
- namespace S = NsSmartDeviceLink::NsJSONHandler::strings;
-
- if (!(result & kMessageTypeNotFound)) {
- jsonValueToObj(root[type][S_PARAMETERS], out[S::S_MSG_PARAMS]);
-
- out[S::S_PARAMS][S::S_MESSAGE_TYPE] = messageType;
- out[S::S_PARAMS][S::S_FUNCTION_ID] = functionId;
- if (true == root[type][S_CORRELATION_ID].empty()) {
- if (type != S_NOTIFICATION) { // Notification may not have CorrelationId
- result |= kCorrelationIdNotFound;
- out[S::S_PARAMS][S::S_CORRELATION_ID] = -1;
- }
- } else {
- out[S::S_PARAMS][S::S_CORRELATION_ID] = root[type][S_CORRELATION_ID]
- .asInt();
- }
- out[S::S_PARAMS][S::S_PROTOCOL_TYPE] = 0;
- out[S::S_PARAMS][S::S_PROTOCOL_VERSION] = 1;
- }
- } catch (...) {
- result = kParsingError;
- }
-
- return result;
-}
-
-}
-}
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
-
-#endif // __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS__CFORMATTERJSONSDLRPCV1_HPP__
diff --git a/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.hpp b/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.hpp
deleted file mode 100644
index 3b4e20651..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.hpp
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS__CFORMATTERJSONSDLRPCV2_HPP__
-#define __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS__CFORMATTERJSONSDLRPCV2_HPP__
-
-#include "json/json.h"
-
-#include "smart_objects/smart_object.h"
-
-#include "CFormatterJsonBase.hpp"
-#include "formatters/CSmartFactory.hpp"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-/**
- * @brief Class is used to convert SmartObjects to JSON string and vice versa.
- *
- * JSON strings is in SDLRPCv2 format.
- */
-class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
- private:
-
- /**
- * @brief Hidden constructor.
- *
- * The class contains only static methods. Should not be instantiated.
- */
- CFormatterJsonSDLRPCv2();
-
- /**
- * @brief Hidden copy constructor.
- *
- * The class contains only static methods. Should not be instantiated.
- */
- CFormatterJsonSDLRPCv2(const CFormatterJsonSDLRPCv2&);
-
- public:
-
- typedef NsSmartDeviceLink::NsJSONHandler::Formatters::meta_formatter_error_code::tMetaFormatterErrorCode tMetaFormatterErrorCode;
-
- /**
- * @brief Creates a JSON string from a SmartObject.
- *
- * @param obj input SmartObject
- * @param outStr resulting JSON string
- * @return true if success, false otherwise
- */
- static bool toString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj,
- std::string& outStr);
-
- /**
- * @brief Creates a SmartObject from a JSON string.
- *
- * @param str Input JSON string in SDLRPCv2 format
- * @param out Output SmartObject
- * @param functionId The corresponding field in SmartObject is filled with this param.
- * @param messageType The corresponding field in SmartObject is filled with this param.
- * @return true if success, otherwise - false
- */
- template<typename FunctionId, typename MessageType>
- static bool fromString(const std::string &str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject &out,
- FunctionId functionId, MessageType messageType);
-
- /**
- * @brief Creates a SmartObject from a JSON string.
- *
- * Version with CorrelationID.
- *
- * @param str Input JSON string in SDLRPCv2 format
- * @param out Output SmartObject
- * @param functionId The corresponding field in SmartObject is filled with this param.
- * @param messageType The corresponding field in SmartObject is filled with this param.
- * @param correlatioId It's like sequence number. The corresponding field in SmartObject
- * is filled with this param.
- * @return true if success, otherwise - false
- */
- template<typename FunctionId, typename MessageType>
- static bool fromString(const std::string &str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject &out,
- FunctionId functionId, MessageType messageType,
- int32_t correlationId);
-
- /**
- * @brief Converts to string the smart object against the given schema
- *
- * @param object Original smart object
- * @param schema Smart schema which describes 'fake' smart object to be formatted
- * @param outStr Resulting JSON string
- * @return formatting error code
- */
- static tMetaFormatterErrorCode MetaFormatToString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
- std::string& outStr);
-};
-
-template<typename FunctionId, typename MessageType>
-inline bool CFormatterJsonSDLRPCv2::fromString(
- const std::string& str, NsSmartDeviceLink::NsSmartObjects::SmartObject& out,
- FunctionId functionId, MessageType messageType) {
- bool result = true;
-
- try {
- Json::Value root;
- Json::Reader reader;
-
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
- bool result = reader.parse(str, root);
-
- if (true == result) {
- out[strings::S_PARAMS][strings::S_MESSAGE_TYPE] = messageType;
- out[strings::S_PARAMS][strings::S_FUNCTION_ID] = functionId;
- out[strings::S_PARAMS][strings::S_PROTOCOL_TYPE] = 0;
- out[strings::S_PARAMS][strings::S_PROTOCOL_VERSION] = 2;
-
- jsonValueToObj(root, out[strings::S_MSG_PARAMS]);
- }
- } catch (...) {
- result = false;
- }
-
- return result;
-}
-
-template<typename FunctionId, typename MessageType>
-inline bool CFormatterJsonSDLRPCv2::fromString(
- const std::string& str, NsSmartDeviceLink::NsSmartObjects::SmartObject& out,
- FunctionId functionId, MessageType messageType, int32_t correlationId) {
-
- bool result = fromString(str, out, functionId, messageType);
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
-
- if (true == result) {
- out[strings::S_PARAMS][strings::S_CORRELATION_ID] = correlationId;
- }
-
- return result;
-}
-
-}
-}
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
-
-#endif // __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS__CFORMATTERJSONSDLRPCV2_HPP__
diff --git a/SDL_Core/src/components/formatters/include/formatters/CSmartFactory.hpp b/SDL_Core/src/components/formatters/include/formatters/CSmartFactory.hpp
deleted file mode 100644
index 7cefabaa7..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/CSmartFactory.hpp
+++ /dev/null
@@ -1,422 +0,0 @@
-/**
- * @file CSmartFactory.hpp
- * @brief CSmartFactory header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef __CSMARTFACTORY_HPP__
-#define __CSMARTFACTORY_HPP__
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/smart_schema.h"
-#include <map>
-#include <string>
-
-namespace NsSmartDeviceLink
-{
- namespace NsJSONHandler
- {
- /**
- * @brief String constants used by SmartFactory.
- */
- namespace strings
- {
- /**
- * @brief String constant for MSG_PARAMS.
- */
- extern const std::string S_MSG_PARAMS;
-
- /**
- * @brief String constant for PARAMS.
- */
- extern const std::string S_PARAMS;
-
- /**
- * @brief String constant for FUNCTION_ID.
- */
- extern const std::string S_FUNCTION_ID;
-
- /**
- * @brief String constant for MESSAGE_TYPE.
- */
- extern const std::string S_MESSAGE_TYPE;
-
- /**
- * @brief String constant for PROTOCOL_VERSION.
- */
- extern const std::string S_PROTOCOL_VERSION;
-
- /**
- * @brief String constant for PROTOCOL_TYPE.
- */
- extern const std::string S_PROTOCOL_TYPE;
-
- /**
- * @brief String constant for CORRELATION_ID.
- */
- extern const std::string S_CORRELATION_ID;
-
- /**
- * @brief String constant for "code" param name.
- */
- extern const std::string kCode;
-
- /**
- * @brief String constant for "message" param name.
- */
- extern const std::string kMessage;
- }
-
- /**
- * @brief Smart Schema key.
- *
- * @tparam FunctionIdEnum Type of function ID enum.
- * @tparam MessageTypeEnum Type of messageType enum.
- */
- template <class FunctionIdEnum, class MessageTypeEnum>
- struct SmartSchemaKey
- {
- /**
- * @brief Value of function ID for the key.
- */
- FunctionIdEnum functionId;
-
- /**
- * @brief Value of messageType for the key.
- */
- MessageTypeEnum messageType;
-
- /**
- * @brief Constructor.
- *
- * @param functionIdParam Value of function ID.
- * @param messageTypeParam Value of message type.
- */
- SmartSchemaKey(FunctionIdEnum functionIdParam, MessageTypeEnum messageTypeParam);
- };
-
- /**
- * @brief Smart Factory.
- *
- * This class is used as base class for generated factories.
- * Clients should use methods of this class to access all
- * SmartSchema validation features.
- *
- * @tparam FunctionIdEnum Type of function ID enum.
- * @tparam MessageTypeEnum Type of messageType enum.
- * @tparam StructIdEnum Type of StructId enum.
- */
- template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
- class CSmartFactory
- {
- public:
-
- /**
- * @brief Constructor.
- */
- CSmartFactory(void);
-
- /**
- * @brief Attach schema to the function SmartObject.
- *
- * @param object SmartObject to attach schema for.
- *
- * @return True if operation was successful or false otherwise.
- */
- bool attachSchema(NsSmartDeviceLink::NsSmartObjects::SmartObject& object);
-
- /**
- * @brief Attach schema to the struct SmartObject.
- *
- * @param struct_id Identifier of the struct.
- * @param object SmartObject to attach schema for.
- *
- * @return True if operation was successful of false otherwise.
- */
- bool AttachSchema(const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::SmartObject &object);
-
-
- /**
- * @brief Create new SmartObject with attached function SmartSchema.
- *
- * @param function_id FunctionID of the function.
- * @param message_type messageType of the function.
- *
- * @return If function succeeded it returns new SmartObject with
- * map type and attached SmartSchema. Client can use such
- * object to store specific function and perform validation.
- * Otherwise (if SmartSchema was not attached to the
- * SmartObject) function returns empty SmartObject with
- * null type.
- */
- NsSmartDeviceLink::NsSmartObjects::SmartObject CreateSmartObject(
- const FunctionIdEnum function_id,
- const MessageTypeEnum message_type);
-
- /**
- * @brief Create new SmartObject with attached struct SmartSchema.
- *
- * @param struct_id Identifier of the struct.
- *
- * @return If function succeeded it returns new SmartObject with
- * map type and attached SmartSchema. Client can use such
- * object to store specific struct and perform validation.
- * Otherwise (if SmartSchema was not attached to the
- * SmartObject) function returns empty SmartObject with
- * null type.
- */
- NsSmartDeviceLink::NsSmartObjects::SmartObject CreateSmartObject(
- const StructIdEnum struct_id);
-
- /**
- * @brief Get SmartSchema for specific function.
- *
- * @param function_id FunctionID of the function.
- * @param message_type messageType of the function.
- * @param[out] result This value will be copy of the desired
- * function SmartSchema if it found (this
- * function returns true) or unmodified if
- * SmartSchema is not found (this function
- * returns false).
- *
- * @return True if function schema for specified input parameters
- * is found or false otherwise.
- */
- bool GetSchema(
- const FunctionIdEnum function_id,
- const MessageTypeEnum message_type,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema &result);
-
- /**
- * @brief Get SmartSchema for specific struct.
- *
- * @param struct_id Identifier of the struct.
- *
- * @param[out] result This value will be copy of the desired
- * struct SmartSchema if it found (this
- * function returns true) or unmodified if
- * SmartSchema is not found (this function
- * returns false).
- *
- * @return True if struct schema for specified input parameter is
- * found or false otherwise.
- */
- bool GetSchema(
- const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema &result);
-
- protected:
-
- /**
- * @brief Defines map of SmartSchemaKeys to the SmartSchemes.
- *
- * This container type should be used to store SmartSchemes of
- * functions.
- */
- typedef std::map<SmartSchemaKey<FunctionIdEnum, MessageTypeEnum>,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema>
- FuncionsSchemesMap;
-
- /**
- * @brief Defines map of StructIdEnum to the SmartSchemes.
- *
- * This container type should be used to store SmartSchemes of
- * structs.
- */
- typedef std::map<StructIdEnum,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema>
- StructsSchemesMap;
-
- /**
- * @brief Map of all function schemes for this factory.
- */
- FuncionsSchemesMap functions_schemes_;
-
- /**
- * @brief Map of all struct shemes for this factory.
- */
- StructsSchemesMap structs_schemes_;
- };
-
- template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
- CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::CSmartFactory(void)
- : functions_schemes_(),
- structs_schemes_()
- {
- }
-
- template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
- bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema(NsSmartDeviceLink::NsSmartObjects::SmartObject &object)
- {
- if(false == object.keyExists(strings::S_PARAMS)) return false;
- if(false == object[strings::S_PARAMS].keyExists(strings::S_MESSAGE_TYPE)) return false;
- if(false == object[strings::S_PARAMS].keyExists(strings::S_FUNCTION_ID)) return false;
-
- MessageTypeEnum msgtype((MessageTypeEnum)object[strings::S_PARAMS][strings::S_MESSAGE_TYPE].asInt());
- FunctionIdEnum fid((FunctionIdEnum)object[strings::S_PARAMS][strings::S_FUNCTION_ID].asInt());
-
- SmartSchemaKey<FunctionIdEnum, MessageTypeEnum> key(fid, msgtype);
-
- typename FuncionsSchemesMap::iterator schemaIterator = functions_schemes_.find(key);
-
- if(schemaIterator == functions_schemes_.end())
- {
- // Schema was not found
- return false;
- }
-
- object.setSchema(schemaIterator->second);
- schemaIterator->second.applySchema(object);
-
- return true;
- }
-
- template <class FunctionIdEnum,
- class MessageTypeEnum,
- class StructIdEnum>
- bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::
- AttachSchema(
- const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::SmartObject &object) {
- typename StructsSchemesMap::iterator structs_iterator =
- structs_schemes_.find(struct_id);
-
- if (structs_iterator == structs_schemes_.end()) {
- return false;
- }
-
- object.setSchema(structs_iterator->second);
- structs_iterator->second.applySchema(object);
-
- return true;
- }
-
- template <class FunctionIdEnum,
- class MessageTypeEnum,
- class StructIdEnum>
- NsSmartDeviceLink::NsSmartObjects::SmartObject
- CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::
- CreateSmartObject(
- const FunctionIdEnum function_id,
- const MessageTypeEnum message_type) {
- SmartSchemaKey<FunctionIdEnum, MessageTypeEnum> key(
- function_id, message_type);
-
- typename FuncionsSchemesMap::iterator schema_iterator =
- functions_schemes_.find(key);
-
- if(schema_iterator != functions_schemes_.end()) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject function_object(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
- function_object.setSchema(schema_iterator->second);
- schema_iterator->second.applySchema(function_object);
- return function_object;
- }
-
- return NsSmartDeviceLink::NsSmartObjects::SmartObject();
- }
-
- template <class FunctionIdEnum,
- class MessageTypeEnum,
- class StructIdEnum>
- NsSmartDeviceLink::NsSmartObjects::SmartObject
- CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::
- CreateSmartObject(const StructIdEnum struct_id) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject struct_object(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
- if (AttachSchema(struct_id, struct_object)) {
- return struct_object;
- }
-
- return NsSmartDeviceLink::NsSmartObjects::SmartObject();
- }
-
- template <class FunctionIdEnum,
- class MessageTypeEnum,
- class StructIdEnum>
- bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::
- GetSchema(const FunctionIdEnum function_id,
- const MessageTypeEnum message_type,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema &result) {
- SmartSchemaKey<FunctionIdEnum, MessageTypeEnum> key(function_id,
- message_type);
-
- typename FuncionsSchemesMap::iterator schema_iterator =
- functions_schemes_.find(key);
-
- if(schema_iterator != functions_schemes_.end()) {
- result = schema_iterator->second;
- return true;
- }
-
- return false;
- }
-
- template <class FunctionIdEnum,
- class MessageTypeEnum,
- class StructIdEnum>
- bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::
- GetSchema(const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema &result) {
- typename StructsSchemesMap::iterator structs_iterator =
- structs_schemes_.find(struct_id);
-
- if(structs_iterator != structs_schemes_.end()) {
- result = structs_iterator->second;
- return true;
- }
-
- return false;
- }
-
- template <class FunctionIdEnum, class MessageTypeEnum>
- SmartSchemaKey<FunctionIdEnum, MessageTypeEnum>::SmartSchemaKey(FunctionIdEnum functionIdParam, MessageTypeEnum messageTypeParam)
- : functionId(functionIdParam)
- , messageType(messageTypeParam)
- {
-
- }
-
- template <class FunctionIdEnum, class MessageTypeEnum>
- bool operator<(const SmartSchemaKey< FunctionIdEnum, MessageTypeEnum >& l, const SmartSchemaKey< FunctionIdEnum, MessageTypeEnum >& r)
- {
- if (l.functionId < r.functionId) return true;
- if (l.functionId > r.functionId) return false;
-
- if (l.messageType < r.messageType) return true;
- if (l.messageType > r.messageType) return false;
-
- return false;
- }
- }
-}
-#endif //__CSMARTFACTORY_HPP__
diff --git a/SDL_Core/src/components/formatters/include/formatters/formatter_json_rpc.h b/SDL_Core/src/components/formatters/include/formatters/formatter_json_rpc.h
deleted file mode 100644
index 196cab9c2..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/formatter_json_rpc.h
+++ /dev/null
@@ -1,497 +0,0 @@
-/**
- * @file formatter_json_rpc.h
- * @brief FormatterJsonRpc header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SMARTDEVICELINK_COMPONENTS_JSONHANDLER_INCLUDE_FORMATTERS_FORMATTER_JSON_RPC_H_
-#define SMARTDEVICELINK_COMPONENTS_JSONHANDLER_INCLUDE_FORMATTERS_FORMATTER_JSON_RPC_H_
-
-#include <string>
-#include <sys/stat.h>
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/enum_schema_item.h"
-#include "json/json.h"
-
-#include "CFormatterJsonBase.hpp"
-#include "formatters/CSmartFactory.hpp"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-/**
- * @brief Formatter for JSON RPC format.
- */
-class FormatterJsonRpc: public CFormatterJsonBase {
- public:
- /**
- * @brief No errors occured during the parsing of the input JSON string.
- */
- static const int32_t kSuccess = 0;
-
- /**
- * @brief Input JSON string cannot be parsed.
- */
- static const int32_t kParsingError = 1;
-
- /**
- * @brief Input JSON string has invalid format.
- */
- static const int32_t kInvalidFormat = 2;
-
- /**
- * @brief Method in input JSON string is not
- * specified or specified incorrectly.
- */
- static const int32_t kMethodNotSpecified = 4;
-
- /**
- * @brief Method is unknown.
- */
- static const int32_t kUnknownMethod = 8;
-
- /**
- * @brief Message type is unknown.
- */
- static const int32_t kUnknownMessageType = 16;
-
- /**
- * @brief Id of request or response is invalid.
- */
- static const int32_t kInvalidId = 32;
-
- /**
- * @brief Response code is not available.
- */
- static const int32_t kResponseCodeNotAvailable = 64;
-
- /**
- * @brief Message for error response is not available.
- */
- static const int32_t kErrorResponseMessageNotAvailable = 128;
-
- /**
- * @brief Creates a JSON string from a SmartObject.
- *
- * @param obj Input SmartObject.
- * @param out_str Resulting JSON string.
- *
- * @return true if success, false otherwise.
- */
- static bool ToString(const NsSmartObjects::SmartObject& obj,
- std::string& out_str);
-
- /**
- * @brief Creates a SmartObject from a JSON string.
- *
- * @tparam FunctionId Type of function id enumeration.
- * @tparam MessageType Type of message type enumeration.
- *
- * @param str input JSON string.
- * @param out The resulting SmartObject.
- *
- * @return An integer that is a bitwise-or of all error codes occured
- * during the parsing of the input string. 0 if no errors occured.
- */
- template <typename FunctionId, typename MessageType>
- static int32_t FromString(const std::string& str,
- NsSmartObjects::SmartObject& out);
-
- private:
- /**
- * @brief Request.
- */
- static const char* kRequest;
-
- /**
- * @brief Response.
- */
- static const char* kResponse;
-
- /**
- * @brief Notification.
- */
- static const char* kNotification;
-
- /**
- * @brief Error reponse.
- */
- static const char* kErrorResponse;
-
- /**
- * @brief Name of "jsonrpc" message field.
- */
- static const char* kJsonRpc;
-
- /**
- * @brief Expected value of "jsonrpc" message field ("2.0").
- */
- static const char* kJsonRpcExpectedValue;
-
- /**
- * @brief Name of "id" message field.
- */
- static const char* kId;
-
- /**
- * @brief Name of "method" field.
- */
- static const char* kMethod;
-
- /**
- * @brief Name of "params" field.
- */
- static const char* kParams;
-
- /**
- * @brief Name of "result" field.
- */
- static const char* kResult;
-
- /**
- * @brief Name of "error" field.
- */
- static const char* kError;
-
- /**
- * @brief Name of "code" field.
- */
- static const char* kCode;
-
- /**
- * @brief Name of "data" field.
- */
- static const char* kData;
-
- /**
- * @brief Name of "message" field.
- */
- static const char* kMessage;
-
- /**
- * @brief Constructor.
- */
- FormatterJsonRpc();
-
- /**
- * @brief Copy constructor.
- *
- * @param unused Unused parameter.
- */
- FormatterJsonRpc(const FormatterJsonRpc& unused);
-
- /**
- * @brief Parse function id.
- *
- * @tparam FunctionId Type of function id enumeration.
- *
- * @param method_value JSON value with function id.
- * @param out The resulting SmartObject.
- *
- * @return An integer that is a bitwise-or of all error codes occured
- * during the parsing of the function id. 0 if no errors occured.
- */
- template <typename FunctionId>
- static int32_t ParseFunctionId(const Json::Value& method_value,
- NsSmartObjects::SmartObject& out);
-
- /**
- * @brief Set method.
- *
- * Try to extract function id from the message object and set the "method"
- * field of the container.
- *
- * @param params Message parameters object.
- * @param method_container Container for the "method" field.
- *
- * @return true if function id was extracted successfully and set as a
- * value of "method" field.
- */
- static bool SetMethod(const NsSmartObjects::SmartObject& params,
- Json::Value& method_container);
-
- /**
- * @brief Set id.
- *
- * Try to extract request/response id from the message object and set the
- * "id" field of the container.
- *
- * @param params Message parameters object.
- * @param id_container Container for the "id" field.
- *
- * @return true if request/response id was extracted successfully and set
- * as a value of "id" field.
- */
- static bool SetId(const NsSmartObjects::SmartObject& params,
- Json::Value& id_container);
-
- /**
- * @brief Set message
- *
- * Try to extract message from response error object and set "message" field for the container
- *
- * @param params Message parameters object.
- * @param id_container Container of the "message" field
- *
- * @return true if message string was extracted successfully and set
- * as a value of "message" field.
- */
- static bool SetMessage(const NsSmartObjects::SmartObject& params,
- Json::Value& id_container);
-};
-
-template <typename FunctionId, typename MessageType>
-int32_t FormatterJsonRpc::FromString(const std::string& str,
- NsSmartObjects::SmartObject& out) {
- int32_t result = kSuccess;
- try {
- Json::Value root;
- Json::Reader reader;
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
-
- if (false == reader.parse(str, root)) {
- result = kParsingError | kMethodNotSpecified | kUnknownMethod |
- kUnknownMessageType;
- } else {
- if (false == root.isMember(kJsonRpc)) {
- result |= kInvalidFormat;
- } else {
- const Json::Value& jsonRpcValue = root[kJsonRpc];
-
- if ((false == jsonRpcValue.isString()) ||
- (jsonRpcValue.asString() != kJsonRpcExpectedValue)) {
- result |= kInvalidFormat;
- }
- }
-
- std::string message_type_string;
- Json::Value response_value;
- bool response_value_found = false;
- bool is_error_response = false;
-
- if (false == root.isMember(kId)) {
- message_type_string = kNotification;
-
- if (false == root.isMember(kMethod)) {
- result |= kMethodNotSpecified | kUnknownMethod;
- } else {
- result |= ParseFunctionId<FunctionId>(root[kMethod], out);
- }
- out[strings::S_MSG_PARAMS]
- = NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
- } else {
- const Json::Value& id_value = root[kId];
-
- if (true == id_value.isString()) {
- out[strings::S_PARAMS][strings::S_CORRELATION_ID] =
- id_value.asString();
- } else if (true == id_value.isInt()) {
- out[strings::S_PARAMS][strings::S_CORRELATION_ID] =
- id_value.asInt();
- } else if (true == id_value.isDouble()) {
- out[strings::S_PARAMS][strings::S_CORRELATION_ID] =
- id_value.asDouble();
- } else if (true == id_value.isNull()) {
- out[strings::S_PARAMS][strings::S_CORRELATION_ID] =
- NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Null);
- } else {
- result |= kInvalidFormat | kInvalidId;
- }
-
- if (true == root.isMember(kMethod)) {
- message_type_string = kRequest;
- result |= ParseFunctionId<FunctionId>(root[kMethod], out);
- out[strings::S_MSG_PARAMS]
- = NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
- } else {
- Json::Value method_container;
- bool method_container_found = false;
-
- if (true == root.isMember(kResult)) {
- out[strings::S_MSG_PARAMS]
- = NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
-
- message_type_string = kResponse;
- response_value = root[kResult];
- response_value_found = true;
- method_container = root[kResult];
- method_container_found = true;
- } else if (true == root.isMember(kError)) {
- out[strings::S_MSG_PARAMS]
- = NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
- message_type_string = kErrorResponse;
- response_value = root[kError];
- response_value_found = true;
- is_error_response = true;
-
- if (true == response_value.isObject()) {
- if (true == response_value.isMember(kData)) {
- method_container = response_value[kData];
- method_container_found = true;
- }
- }
- } else {
- result |= kUnknownMessageType;
- }
-
- if (false == method_container_found) {
- result |= kMethodNotSpecified | kUnknownMethod;
- } else if (false == method_container.isObject()) {
- result |= kInvalidFormat | kMethodNotSpecified | kUnknownMethod;
- } else {
- if (false == method_container.isMember(kMethod)) {
- result |= kMethodNotSpecified | kUnknownMethod;
- } else {
- result |= ParseFunctionId<FunctionId>(method_container[kMethod],
- out);
- }
- }
- }
- }
-
- if (0 == (result & kUnknownMessageType)) {
- MessageType message_type;
-
- if (false == NsSmartObjects::TEnumSchemaItem<MessageType>::stringToEnum(
- message_type_string, message_type)) {
- result |= kUnknownMessageType;
- } else {
- out[strings::S_PARAMS][strings::S_MESSAGE_TYPE] = message_type;
- }
- }
-
- if (true == root.isMember(kParams)) {
- const Json::Value& params_value = root[kParams];
-
- if (false == params_value.isObject()) {
- result |= kInvalidFormat;
- } else {
- jsonValueToObj(root[kParams], out[strings::S_MSG_PARAMS]);
- }
- } else if (true == root.isMember(kResult)) {
- const Json::Value& result_value = root[kResult];
-
- if (false == result_value.isObject()) {
- result |= kInvalidFormat;
- } else {
- jsonValueToObj(root[kResult], out[strings::S_MSG_PARAMS]);
- }
- } else if (true == is_error_response) {
- jsonValueToObj(response_value[kData], out[strings::S_PARAMS][kData]);
- }
-
- if ((kResponse == message_type_string) ||
- (kErrorResponse == message_type_string)) {
- if (true == out.keyExists(strings::S_MSG_PARAMS)) {
- out[strings::S_MSG_PARAMS].erase(kMethod);
- out[strings::S_MSG_PARAMS].erase(kCode);
- }
-
- if (false == response_value_found) {
- result |= kResponseCodeNotAvailable;
- } else {
- if (false == response_value.isObject()) {
- result |= kInvalidFormat | kResponseCodeNotAvailable;
-
- if (true == is_error_response) {
- result |= kErrorResponseMessageNotAvailable;
- }
- } else {
- if (false == response_value.isMember(kCode)) {
- result |= kResponseCodeNotAvailable;
- } else {
- const Json::Value& code_value = response_value[kCode];
-
- if (false == code_value.isInt()) {
- result |= kInvalidFormat | kResponseCodeNotAvailable;
- } else {
- out[strings::S_PARAMS][strings::kCode] = code_value.asInt();
- }
- }
-
- if (true == is_error_response) {
- if (false == response_value.isMember(kMessage)) {
- result |= kErrorResponseMessageNotAvailable;
- } else {
- const Json::Value& message_value = response_value[kMessage];
-
- if (false == message_value.isString()) {
- result |= kErrorResponseMessageNotAvailable;
- } else {
- out[strings::S_PARAMS][strings::kMessage] =
- message_value.asString();
- }
- }
- }
- }
- }
- }
- }
-
- out[strings::S_PARAMS][strings::S_PROTOCOL_TYPE] = 1;
- out[strings::S_PARAMS][strings::S_PROTOCOL_VERSION] = 2;
- } catch(...) {
- result = kParsingError;
- }
-
- return result;
-}
-
-template <typename FunctionId>
-int32_t FormatterJsonRpc::ParseFunctionId(const Json::Value& method_value,
- NsSmartObjects::SmartObject& out) {
- int32_t result = kSuccess;
-
- if (false == method_value.isString()) {
- result |= kInvalidFormat | kUnknownMethod;
- } else {
- FunctionId function_id;
-
- if (false == NsSmartObjects::TEnumSchemaItem<FunctionId>::stringToEnum(
- method_value.asString(), function_id)) {
- result |= kUnknownMethod;
- } else {
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
-
- out[strings::S_PARAMS][strings::S_FUNCTION_ID] = function_id;
- }
- }
-
- return result;
-}
-
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
-
-#endif // SMARTDEVICELINK_COMPONENTS_JSONHANDLER_INCLUDE_FORMATTERS_FORMATTER_JSON_RPC_H_
diff --git a/SDL_Core/src/components/formatters/include/formatters/generic_json_formatter.h b/SDL_Core/src/components/formatters/include/formatters/generic_json_formatter.h
deleted file mode 100644
index 3eaee0b36..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/generic_json_formatter.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @file generic_json_formatter.h
- * @brief Generic JSON formatter header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SMARTDEVICELINK_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_GENERIC_JSON_FORMATTER_H_
-#define SMARTDEVICELINK_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_GENERIC_JSON_FORMATTER_H_
-
-#include "CFormatterJsonBase.hpp"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-class GenericJsonFormatter: public CFormatterJsonBase {
-public:
- /**
- * @brief Creates a JSON string from a SmartObject.
- *
- * @param obj Input SmartObject.
- * @param out_str Resulting JSON string.
- */
- static void ToString(const NsSmartObjects::SmartObject& obj,
- std::string& out_str);
-
- /**
- * @brief Creates a SmartObject from a JSON string.
- *
- * @param str input JSON string.
- * @param out The resulting SmartObject.
- *
- * @return true if success, false otherwise.
- */
- static bool FromString(const std::string& str,
- NsSmartObjects::SmartObject& out);
-};
-
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
-
-#endif // SMARTDEVICELINK_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_GENERIC_JSON_FORMATTER_H_
diff --git a/SDL_Core/src/components/formatters/include/formatters/meta_formatter.h b/SDL_Core/src/components/formatters/include/formatters/meta_formatter.h
deleted file mode 100644
index c1b767d7c..000000000
--- a/SDL_Core/src/components/formatters/include/formatters/meta_formatter.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file meta_fromatter.h
- * @brief file describes class CMetaFormatter which is designed to format
- * the smart object against given schema for given formatter
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS_METAFORMATTER_H__
-#define __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS_METAFORMATTER_H__
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/smart_schema.h"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-/**
- * @brief Formats to string the smart object against given schema for given formatter
- *
- * Sample usage:
- * CSmartFactory factory;
- * SmartObject object;
- * CSmartSchmema schema;
- *
- */
-class CMetaFormatter {
- public:
-
- /**
- * @brief Creates smart object by the given schema having copied
- * matched tree elements from original object.
- *
- * @param object Original smart object which macthed tree elements
- * will be copied from
- * @param schema Smart schema which describes result smart object
- * @param result_object createdsmart object
- * @return true if successful, false - otherwise
- */
- static bool CreateObjectByPattern(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& result_object);
-};
-
-}// namespace NsSmartDeviceLink
-}// namespace NsSmartDeviceLink::NsJSONHandler
-}// namespace NsSmartDeviceLink::NsJSONHandler::Formatters
-
-#endif // __SMARTDEVICELINKCORE_JSONHANDLER_FORMATTERS_METAFORMATTER_H__
diff --git a/SDL_Core/src/components/formatters/src/CFormatterJsonBase.cpp b/SDL_Core/src/components/formatters/src/CFormatterJsonBase.cpp
deleted file mode 100644
index 4abc4b8ae..000000000
--- a/SDL_Core/src/components/formatters/src/CFormatterJsonBase.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * @file CFormatterJsonBase.cpp
- * @brief CFormatterJsonBase source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-#include "json/json.h"
-
-#include "formatters/CFormatterJsonBase.hpp"
-
-void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::jsonValueToObj(
- const Json::Value& value,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj) {
- try {
- if (value.type() == Json::objectValue) {
- obj = NsSmartDeviceLink::NsSmartObjects::SmartObject(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
-
- Json::Value::Members members = value.getMemberNames();
-
- for (int32_t i = 0; i < members.size(); i++) {
- jsonValueToObj(value[members[i]], obj[members[i]]);
- }
- } else if (value.type() == Json::arrayValue) {
- obj = NsSmartDeviceLink::NsSmartObjects::SmartObject(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Array);
-
- for (int32_t i = 0; i < value.size(); i++) {
- jsonValueToObj(value[i], obj[i]);
- }
- } else if (value.type() == Json::intValue
- || value.type() == Json::uintValue) {
- obj = value.asInt();
- } else if (value.type() == Json::realValue) {
- obj = value.asDouble();
- } else if (value.type() == Json::booleanValue) {
- obj = value.asBool();
- } else if (value.type() == Json::stringValue) {
- obj = value.asString();
- }
- } catch (...) {
- }
-}
-
-// ----------------------------------------------------------------------------
-
-void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::objToJsonValue(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject &obj,
- Json::Value &item) {
- try {
- if (NsSmartDeviceLink::NsSmartObjects::SmartType_Array == obj.getType()) {
- item = Json::arrayValue;
-
- for (int32_t i = 0; i < obj.length(); i++) {
- Json::Value value(Json::nullValue);
-
- objToJsonValue(obj.getElement(i), value);
-
- item.append(value);
- }
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Map
- == obj.getType()) {
- item = Json::objectValue;
- std::set<std::string> keys = obj.enumerate();
-
- for (std::set<std::string>::const_iterator key = keys.begin();
- key != keys.end(); key++) {
- Json::Value value(Json::nullValue);
-
- objToJsonValue(obj.getElement(*key), value);
-
- item[*key] = value;
- }
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Boolean
- == obj.getType()) {
- item = obj.asBool();
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Integer
- == obj.getType()) {
- item = obj.asInt();
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Double
- == obj.getType()) {
- item = obj.asDouble();
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Null
- == obj.getType()) {
- item = Json::nullValue;
- } else {
- item = obj.asString();
- }
- } catch (...) {
- }
-}
diff --git a/SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv1.cpp b/SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv1.cpp
deleted file mode 100644
index 407a00188..000000000
--- a/SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv1.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-#include "formatters/CFormatterJsonSDLRPCv1.hpp"
-#include "formatters/meta_formatter.h"
-
-namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-// ----------------------------------------------------------------------------
-
-const std::string CFormatterJsonSDLRPCv1::S_REQUEST("request");
-const std::string CFormatterJsonSDLRPCv1::S_RESPONSE("response");
-const std::string CFormatterJsonSDLRPCv1::S_NOTIFICATION("notification");
-const std::string CFormatterJsonSDLRPCv1::S_PARAMETERS("parameters");
-const std::string CFormatterJsonSDLRPCv1::S_NAME("name");
-const std::string CFormatterJsonSDLRPCv1::S_CORRELATION_ID("correlationID");
-
-const int32_t CFormatterJsonSDLRPCv1::kSuccess = 0;
-const int32_t CFormatterJsonSDLRPCv1::kParsingError = 1 << 0;
-const int32_t CFormatterJsonSDLRPCv1::kFunctionIdNotFound = 1 << 1;
-const int32_t CFormatterJsonSDLRPCv1::kMessageTypeNotFound = 1 << 2;
-const int32_t CFormatterJsonSDLRPCv1::kCorrelationIdNotFound = 1 << 3;
-// ----------------------------------------------------------------------------
-
-const std::string CFormatterJsonSDLRPCv1::getMessageType(
- const smart_objects_ns::SmartObject& obj) {
- return obj.getElement(strings::S_PARAMS).getElement(strings::S_MESSAGE_TYPE)
- .asString();
-}
-
-// ----------------------------------------------------------------------------
-
-const std::string CFormatterJsonSDLRPCv1::getMessageType(
- const Json::Value& root) {
- std::string type;
-
- if (true == root.isMember(S_REQUEST)) {
- type = S_REQUEST;
- } else if (true == root.isMember(S_RESPONSE)) {
- type = S_RESPONSE;
- } else if (true == root.isMember(S_NOTIFICATION)) {
- type = S_NOTIFICATION;
- } else {
- }
-
- return type;
-}
-
-// ----------------------------------------------------------------------------
-
-bool CFormatterJsonSDLRPCv1::toString(const smart_objects_ns::SmartObject& obj,
- std::string& outStr) {
- bool result = false;
- try {
- Json::Value root(Json::objectValue);
- Json::Value params(Json::objectValue);
-
- smart_objects_ns::SmartObject formattedObj(obj);
- formattedObj.getSchema().unapplySchema(formattedObj); // converts enums(as int32_t) to strings
-
- objToJsonValue(formattedObj.getElement(strings::S_MSG_PARAMS), params);
-
- std::string type = getMessageType(formattedObj);
- root[type] = Json::Value(Json::objectValue);
- root[type][S_PARAMETERS] = params;
-
- if (formattedObj[strings::S_PARAMS].keyExists(strings::S_CORRELATION_ID)) {
- root[type][S_CORRELATION_ID] =
- formattedObj[strings::S_PARAMS][strings::S_CORRELATION_ID].asInt();
- }
-
- root[type][S_NAME] = formattedObj[strings::S_PARAMS][strings::S_FUNCTION_ID]
- .asString();
-
- outStr = root.toStyledString();
-
- result = true;
- } catch (...) {
- result = false;
- }
-
- return result;
-}
-
-// ----------------------------------------------------------------------------
-
-CFormatterJsonSDLRPCv1::tMetaFormatterErrorCode CFormatterJsonSDLRPCv1::MetaFormatToString(
- const smart_objects_ns::SmartObject& object,
- const smart_objects_ns::CSmartSchema& schema, std::string& outStr) {
- meta_formatter_error_code::tMetaFormatterErrorCode result_code =
- meta_formatter_error_code::kErrorOk;
-
- smart_objects_ns::SmartObject tmp_object;
-
- if (false
- == CMetaFormatter::CreateObjectByPattern(object, schema, tmp_object)) {
- result_code |= meta_formatter_error_code::kErrorFailedCreateObjectBySchema;
- return result_code;
- }
-
- // determine whether smart objects are functions
- // (in terms of SDLRPC communication)
- bool is_root_object_created_by_schema = ((tmp_object.getType()
- == smart_objects_ns::SmartType_Map)
- && tmp_object.keyExists(strings::S_PARAMS)
- && tmp_object.keyExists(strings::S_MSG_PARAMS));
-
- bool is_root_object = ((object.getType() == smart_objects_ns::SmartType_Map)
- && object.keyExists(strings::S_PARAMS)
- && object.keyExists(strings::S_MSG_PARAMS));
-
- if (false == is_root_object) {
- result_code |= meta_formatter_error_code::kErrorObjectIsNotFunction;
- }
- if (false == is_root_object_created_by_schema) {
- result_code |= meta_formatter_error_code::kErrorSchemaIsNotFunction;
- }
-
- CFormatterJsonSDLRPCv1::toString(tmp_object, outStr);
-
- return result_code;
-}
-
-}
-}
-}
diff --git a/SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv2.cpp b/SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv2.cpp
deleted file mode 100644
index d76e28911..000000000
--- a/SDL_Core/src/components/formatters/src/CFormatterJsonSDLRPCv2.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "formatters/CFormatterJsonSDLRPCv2.hpp"
-#include "formatters/meta_formatter.h"
-
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
-namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-// ----------------------------------------------------------------------------
-
-bool CFormatterJsonSDLRPCv2::toString(const smart_objects_ns::SmartObject& obj,
- std::string& outStr) {
- bool result = true;
- try {
- Json::Value root(Json::objectValue);
-
- smart_objects_ns::SmartObject formattedObj(obj);
- formattedObj.getSchema().unapplySchema(formattedObj); // converts enums(as int32_t) to strings
-
- objToJsonValue(formattedObj.getElement(strings::S_MSG_PARAMS), root);
-
- outStr = root.toStyledString();
-
- result = true;
- } catch (...) {
- result = false;
- }
-
- return result;
-}
-
-// ----------------------------------------------------------------------------
-
-CFormatterJsonSDLRPCv2::tMetaFormatterErrorCode CFormatterJsonSDLRPCv2::MetaFormatToString(
- const smart_objects_ns::SmartObject& object,
- const smart_objects_ns::CSmartSchema& schema, std::string& outStr) {
-
- meta_formatter_error_code::tMetaFormatterErrorCode result_code =
- meta_formatter_error_code::kErrorOk;
-
- smart_objects_ns::SmartObject tmp_object;
-
- if (false
- == CMetaFormatter::CreateObjectByPattern(object, schema, tmp_object)) {
- result_code |= meta_formatter_error_code::kErrorFailedCreateObjectBySchema;
- return result_code;
- }
-
- // determine whether smart objects are functions
- // (in terms of SDLRPC communication)
- bool is_root_object_created_by_schema = ((tmp_object.getType()
- == smart_objects_ns::SmartType_Map)
- && tmp_object.keyExists(strings::S_PARAMS)
- && tmp_object.keyExists(strings::S_MSG_PARAMS));
-
- bool is_root_object = ((object.getType() == smart_objects_ns::SmartType_Map)
- && object.keyExists(strings::S_PARAMS)
- && object.keyExists(strings::S_MSG_PARAMS));
-
- if (false == is_root_object) {
- result_code |= meta_formatter_error_code::kErrorObjectIsNotFunction;
- }
- if (false == is_root_object_created_by_schema) {
- result_code |= meta_formatter_error_code::kErrorSchemaIsNotFunction;
- }
-
- CFormatterJsonSDLRPCv2::toString(tmp_object, outStr);
-
- return result_code;
-}
-
-}
-}
-}
diff --git a/SDL_Core/src/components/formatters/src/CSmartFactory.cpp b/SDL_Core/src/components/formatters/src/CSmartFactory.cpp
deleted file mode 100644
index 363db7696..000000000
--- a/SDL_Core/src/components/formatters/src/CSmartFactory.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file CSmartFactory.cpp
- * @brief CSmartFactory source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "formatters/CSmartFactory.hpp"
-
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS("msg_params");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS("params");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID("function_id");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE("message_type");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION("protocol_version");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE("protocol_type");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID("correlation_id");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::kCode("code");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::kMessage(
- "message");
diff --git a/SDL_Core/src/components/formatters/src/formatter_json_rpc.cc b/SDL_Core/src/components/formatters/src/formatter_json_rpc.cc
deleted file mode 100644
index 8722df46d..000000000
--- a/SDL_Core/src/components/formatters/src/formatter_json_rpc.cc
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * @file formatter_json_rpc.cc
- * @brief formatter_json_rpc source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "formatters/formatter_json_rpc.h"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-namespace strings = NsJSONHandler::strings;
-
-const char *FormatterJsonRpc::kRequest = "request";
-const char *FormatterJsonRpc::kResponse = "response";
-const char *FormatterJsonRpc::kNotification = "notification";
-const char *FormatterJsonRpc::kErrorResponse = "error_response";
-const char *FormatterJsonRpc::kJsonRpc = "jsonrpc";
-const char *FormatterJsonRpc::kJsonRpcExpectedValue = "2.0";
-const char *FormatterJsonRpc::kId = "id";
-const char *FormatterJsonRpc::kMethod = "method";
-const char *FormatterJsonRpc::kParams = "params";
-const char *FormatterJsonRpc::kResult = "result";
-const char *FormatterJsonRpc::kError = "error";
-const char *FormatterJsonRpc::kCode = "code";
-const char *FormatterJsonRpc::kData = "data";
-const char *FormatterJsonRpc::kMessage = "message";
-
-bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject &obj,
- std::string &out_str) {
- bool result = true;
- try {
- Json::Value root(Json::objectValue);
-
- root[kJsonRpc] = kJsonRpcExpectedValue;
-
- NsSmartObjects::SmartObject formatted_object(obj);
- Json::Value msg_params_json(Json::objectValue);
- formatted_object.getSchema().unapplySchema(formatted_object);
-
- bool is_message_params = formatted_object.keyExists(strings::S_MSG_PARAMS);
- bool empty_message_params = true;
- if (true == is_message_params) {
- const NsSmartObjects::SmartObject &msg_params = formatted_object
- .getElement(strings::S_MSG_PARAMS);
-
- result = (NsSmartObjects::SmartType_Map == msg_params.getType());
- if (true == result) {
- objToJsonValue(msg_params, msg_params_json);
- }
- if (0 < msg_params.length()) {
- empty_message_params = false;
- }
- }
-
- if (false == formatted_object.keyExists(strings::S_PARAMS)) {
- result = false;
- } else {
- const NsSmartObjects::SmartObject &params = formatted_object.getElement(
- strings::S_PARAMS);
- if (NsSmartObjects::SmartType_Map != params.getType()) {
- result = false;
- } else {
- const NsSmartObjects::SmartObject &message_type_object = params
- .getElement(strings::S_MESSAGE_TYPE);
-
- if (NsSmartObjects::SmartType_String != message_type_object.getType()) {
- result = false;
- } else {
- const std::string message_type = message_type_object.asString();
-
- if (kRequest == message_type) {
- if (false == empty_message_params) {
- root[kParams] = msg_params_json;
- }
- result = result && SetMethod(params, root);
- result = result && SetId(params, root);
- } else if (kResponse == message_type) {
- root[kResult] = msg_params_json;
- result = result && SetMethod(params, root[kResult]);
- result = result && SetId(params, root);
-
- if (false == params.keyExists(strings::kCode)) {
- result = false;
- } else {
- const NsSmartObjects::SmartObject &code = params.getElement(
- strings::kCode);
-
- if (NsSmartObjects::SmartType_Integer != code.getType()) {
- result = false;
- } else {
- root[kResult][kCode] = code.asInt();
- }
- }
- } else if (kNotification == message_type) {
- root[kParams] = msg_params_json;
- result = result && SetMethod(params, root);
- } else if (kErrorResponse == message_type) {
- result = result && SetId(params, root);
- result = result && SetMethod(params, root[kError][kData]);
- result = result && SetMessage(params, root[kError]);
-
- const NsSmartObjects::SmartObject &code = params.getElement(
- strings::kCode);
- if (NsSmartObjects::SmartType_Integer != code.getType()) {
- result = false;
- } else {
- root[kError][kCode] = code.asInt();
- }
- }
- }
- }
- }
- out_str = root.toStyledString();
- } catch (...) {
- result = false;
- }
-
- return result;
-}
-
-bool FormatterJsonRpc::SetMethod(const NsSmartObjects::SmartObject &params,
- Json::Value &method_container) {
- bool result = false;
-
- if (true == params.keyExists(strings::S_FUNCTION_ID)) {
- const NsSmartObjects::SmartObject &function_id =
- params.getElement(strings::S_FUNCTION_ID);
-
- if (NsSmartObjects::SmartType_String == function_id.getType()) {
- method_container[kMethod] = function_id.asString();
- result = true;
- }
- }
-
- return result;
-}
-
-bool FormatterJsonRpc::SetId(const NsSmartObjects::SmartObject &params,
- Json::Value &id_container) {
- bool result = false;
-
- if (true == params.keyExists(strings::S_CORRELATION_ID)) {
- const NsSmartObjects::SmartObject &id = params.getElement(
- strings::S_CORRELATION_ID);
-
- if (NsSmartObjects::SmartType_Integer == id.getType()) {
- id_container[kId] = id.asUInt();
- result = true;
- }
- }
-
- return result;
-}
-
-bool FormatterJsonRpc::SetMessage(const NsSmartObjects::SmartObject &params,
- Json::Value &message_container) {
- bool result = false;
-
- if (true == params.keyExists(strings::kMessage)) {
- const NsSmartObjects::SmartObject &message = params.getElement(
- strings::kMessage);
-
- if (NsSmartObjects::SmartType_String == message.getType()) {
- message_container[kMessage] = message.asString();
- result = true;
- }
- }
-
- return result;
-}
-
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/formatters/src/generic_json_formatter.cc b/SDL_Core/src/components/formatters/src/generic_json_formatter.cc
deleted file mode 100644
index ce1aa0380..000000000
--- a/SDL_Core/src/components/formatters/src/generic_json_formatter.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @file generic_json_formatter.cc
- * @brief Generic JSON formatter source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "formatters/generic_json_formatter.h"
-
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
-
-void GenericJsonFormatter::ToString(const NsSmartObjects::SmartObject& obj,
- std::string& out_str) {
- Json::Value json_root;
- objToJsonValue(obj, json_root);
- out_str = json_root.toStyledString();
-}
-
-bool GenericJsonFormatter::FromString(const std::string& str,
- NsSmartObjects::SmartObject& out) {
- Json::Value json_root;
- Json::Reader reader;
- bool result = reader.parse(str, json_root);
-
- if (true == result) {
- jsonValueToObj(json_root, out);
- }
-
- return result;
-}
-
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/formatters/src/meta_formatter.cc b/SDL_Core/src/components/formatters/src/meta_formatter.cc
deleted file mode 100644
index 145020a5e..000000000
--- a/SDL_Core/src/components/formatters/src/meta_formatter.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file meta_fromatter.cc
- * @brief implementation of class CMetaFormatter which is designed to format
- * the smart object against given schema for given formatter
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.auto
-
-#include <set>
-#include <string>
-
-#include "formatters/meta_formatter.h"
-
-namespace formatter_ns = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
-
-//---------------------------------------------------------------
-
-bool formatter_ns::CMetaFormatter::CreateObjectByPattern(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& result_object) {
-
- if (smart_objects_ns::SmartType_Invalid == result_object.getType()) {
- return false;
- }
-
- schema.BuildObjectBySchema(object, result_object);
-
- result_object.setSchema(schema);
-
- return true;
-}
diff --git a/SDL_Core/src/components/hmi_message_handler/CMakeLists.txt b/SDL_Core/src/components/hmi_message_handler/CMakeLists.txt
deleted file mode 100644
index 4bdec5ca2..000000000
--- a/SDL_Core/src/components/hmi_message_handler/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-include_directories (
- ./include/
- ../application_manager/include/
- ../utils/include/
- ../smart_objects/include/
- ../formatters/include/
- ../config_profile/include/
- ../media_manager/include/
- ../protocol_handler/include
- ../../thirdPartyLibs/jsoncpp/include/
- ../../thirdPartyLibs/MessageBroker/include
- ../config_profile/include
- ${CMAKE_SOURCE_DIR}/src/components/
- ${CMAKE_BINARY_DIR}/src/components/
- ${CMAKE_SOURCE_DIR}/src/components/dbus/include/
- ${CMAKE_SOURCE_DIR}/
-)
-
-IF (${QT_HMI})
- set (DBUS_SOURCE ./src/dbus_message_adapter.cc)
- set (DBUS_ADAPTER DBus)
-ENDIF (${QT_HMI})
-
-set (SOURCES
- ./src/hmi_message_handler_impl.cc
- ./src/messagebroker_adapter.cc
- ./src/hmi_message_adapter.cc
- ${DBUS_SOURCE}
-)
-
-set (LIBRARIES
- log4cxx
- ${DBUS_ADAPTER}
-)
-
-add_library("HMIMessageHandler" ${SOURCES})
-target_link_libraries ("HMIMessageHandler" ${LIBRARIES})
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h
deleted file mode 100644
index ed3f965bd..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/dbus_message_adapter.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_DBUS_MESSAGE_ADAPTER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_DBUS_MESSAGE_ADAPTER_H_
-
-#include <string>
-#include "hmi_message_handler/hmi_message_adapter.h"
-#include "dbus/dbus_message_controller.h"
-#include "smart_objects/smart_object.h"
-
-namespace hmi_message_handler {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-/**
- * \brief adapter for DBus
- */
-class DBusMessageAdapter
- : public HMIMessageAdapter,
- public dbus::DBusMessageController {
- public:
- typedef utils::SharedPtr<application_manager::Message> MessageSharedPointer;
- explicit DBusMessageAdapter(HMIMessageHandler* hmi_msg_handler);
- ~DBusMessageAdapter();
- void SendMessageToHMI(MessageSharedPointer message);
-
- /**
- * \brief subscribes to signals
- */
- void SubscribeTo();
-
- private:
- static const std::string SDL_SERVICE_NAME;
- static const std::string SDL_OBJECT_PATH;
- static const std::string HMI_SERVICE_NAME;
- static const std::string HMI_OBJECT_PATH;
-
- /**
- * \brief sends request to HMI
- * \param obj request
- */
- void Request(const smart_objects::SmartObject &obj);
-
- /**
- * \brief sends notification to HMI
- * \param obj notification
- */
- void Notification(const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends response to HMI
- * \param obj response
- */
- void Response(const smart_objects::SmartObject &obj);
-
- /**
- * \brief sends error response to HMI
- * \param obj error
- */
- void ErrorResponse(const smart_objects::SmartObject& obj);
-
- /**
- * \brief sends message to core
- * \param obj
- */
- void SendMessageToCore(const smart_objects::SmartObject &obj);
-};
-
-} // namespace hmi_message_handler
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_DBUS_MESSAGE_ADAPTER_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h
deleted file mode 100644
index dc515318a..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_ADAPTER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_ADAPTER_H_
-
-#include "hmi_message_handler/hmi_message_handler.h"
-
-namespace hmi_message_handler {
-/**
- * \class HMIMessageAdapter
- * \brief Interface class describing methods neccessary for exchanging message
- * between ApplicationManager and HMI. Adapter for concrete transport connection
- * SDL with HMI has to implement this interface.
- */
-class HMIMessageAdapter : public HMIMessageSender {
- public:
- /**
- * \brief Constructor
- * \param handler Pointer to implementation of HMIMessageHandler abstract class
- * to notify it about receiving message or error on sending message.
- */
- explicit HMIMessageAdapter(HMIMessageHandler* handler);
-
- /**
- * \brief Destructor
- */
- virtual ~HMIMessageAdapter();
-
- protected:
- /**
- * \brief Interface for subscriptions.
- * Each class implementing interface should use it according to
- * standarts of transport for which it is to be an adapter.
- * For example, Adapter for MessageBroker will use it to subscribe to notifications
- * from HMI.
- */
- virtual void SubscribeTo() = 0;
- inline virtual HMIMessageHandler* handler() const {
- return handler_;
- }
-
- private:
- /**
- *\brief Pointer on handler to notify it about receiving message/error.
- */
- mutable HMIMessageHandler* handler_;
-};
-
-} // namespace hmi_message_handler
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_ADAPTER_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h
deleted file mode 100644
index 828ae9a00..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_HANDLER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_HANDLER_H_
-
-#include "hmi_message_handler/hmi_message_sender.h"
-#include "hmi_message_handler/hmi_message_observer.h"
-
-namespace hmi_message_handler {
-
-class HMIMessageAdapter;
-/**
- * \class HMIMessageHandler
- * \brief Abstract class for handling different HMI adapters;
- * establishing interface for message exchange between SDL core and HMI.
- */
-class HMIMessageHandler : public HMIMessageObserver, public HMIMessageSender {
- public:
- virtual ~HMIMessageHandler() {}
- virtual void AddHMIMessageAdapter(HMIMessageAdapter* adapter) = 0;
- virtual void RemoveHMIMessageAdapter(HMIMessageAdapter* adapter) = 0;
-};
-
-} // namespace hmi_message_handler
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_HANDLER_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h
deleted file mode 100644
index 4800f3000..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_HANDLER_IMPL_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_HANDLER_IMPL_H_
-
-#include <set>
-#include "hmi_message_handler/hmi_message_adapter.h"
-#include "hmi_message_handler/hmi_message_handler.h"
-#include "utils/macro.h"
-#include "utils/message_queue.h"
-#include "utils/prioritized_queue.h"
-#include "utils/threads/message_loop_thread.h"
-#include "utils/threads/thread.h"
-#include "utils/singleton.h"
-
-namespace hmi_message_handler {
-
-
-namespace impl {
-/*
-* These dummy classes are here to locally impose strong typing on different
-* kinds of messages
-* Currently there is no type difference between incoming and outgoing messages
-* TODO(ik): replace these with globally defined message types
-* when we have them.
-*/
-struct MessageFromHmi: public MessageSharedPointer {
- MessageFromHmi(const MessageSharedPointer& message)
- : MessageSharedPointer(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const { return (*this)->Priority().OrderingValue(); }
-};
-
-struct MessageToHmi: public MessageSharedPointer {
- MessageToHmi(const MessageSharedPointer& message)
- : MessageSharedPointer(message) {}
- // PrioritizedQueue requres this method to decide which priority to assign
- size_t PriorityOrder() const { return (*this)->Priority().OrderingValue(); }
-};
-
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<MessageFromHmi> > FromHmiQueue;
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<MessageToHmi> > ToHmiQueue;
-}
-
-class ToHMIThreadImpl;
-class FromHMIThreadImpl;
-
-class HMIMessageHandlerImpl
- : public HMIMessageHandler,
- public impl::FromHmiQueue::Handler,
- public impl::ToHmiQueue::Handler,
- public utils::Singleton<HMIMessageHandlerImpl> {
- public:
- ~HMIMessageHandlerImpl();
- void OnMessageReceived(MessageSharedPointer message);
- void SendMessageToHMI(MessageSharedPointer message);
- void set_message_observer(HMIMessageObserver* observer);
- void OnErrorSending(MessageSharedPointer message);
- void AddHMIMessageAdapter(HMIMessageAdapter* adapter);
- void RemoveHMIMessageAdapter(HMIMessageAdapter* adapter);
-
- private:
- HMIMessageHandlerImpl();
-
-
- // threads::MessageLoopThread<*>::Handler implementations
-
- // CALLED ON messages_from_hmi_ THREAD!
- virtual void Handle(const impl::MessageFromHmi& message) OVERRIDE;
- // CALLED ON messages_to_hmi_ THREAD!
- virtual void Handle(const impl::MessageToHmi& message) OVERRIDE;
- private:
-
- HMIMessageObserver* observer_;
- std::set<HMIMessageAdapter*> message_adapters_;
-
- // Construct message threads when everything is already created
-
- // Thread that pumps messages coming from hmi.
- impl::FromHmiQueue messages_from_hmi_;
- // Thread that pumps messages being passed to hmi.
- impl::ToHmiQueue messages_to_hmi_;
-
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(HMIMessageHandlerImpl);
-
- FRIEND_BASE_SINGLETON_CLASS(HMIMessageHandlerImpl);
-};
-} // namespace hmi_message_handler
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_HANDLER_IMPL_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h
deleted file mode 100644
index fa0258149..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_observer.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_OBSERVER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_OBSERVER_H_
-
-namespace hmi_message_handler {
-
-class HMIMessageObserver {
- public:
- virtual void OnMessageReceived(
- utils::SharedPtr<application_manager::Message> message) = 0;
- virtual void OnErrorSending(
- utils::SharedPtr<application_manager::Message> message) = 0;
-};
-}
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_OBSERVER_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h
deleted file mode 100644
index 271285730..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_sender.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_SENDER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_SENDER_H_
-
-#include "application_manager/message.h"
-
-namespace hmi_message_handler {
- typedef utils::SharedPtr<application_manager::Message> MessageSharedPointer;
-
-class HMIMessageSender {
- public:
- virtual void SendMessageToHMI(MessageSharedPointer message) = 0;
-};
-
-}
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_HMI_MESSAGE_SENDER_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h b/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h
deleted file mode 100644
index 6bd244719..000000000
--- a/SDL_Core/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_MESSAGEBROKER_ADAPTER_H_
-#define SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_MESSAGEBROKER_ADAPTER_H_
-
-#include <string>
-
-#include "mb_controller.hpp"
-#include "hmi_message_handler/hmi_message_adapter.h"
-#include "utils/logger.h"
-#include "utils/threads/thread_validator.h"
-
-namespace hmi_message_handler {
-
-class MessageBrokerAdapter : public HMIMessageAdapter,
- public NsMessageBroker::CMessageBrokerController,
- public threads::SingleThreadValidator {
- public:
- MessageBrokerAdapter(HMIMessageHandler* handler_param, const std::string&
- server_address, uint16_t port);
- ~MessageBrokerAdapter();
- void SendMessageToHMI(MessageSharedPointer message);
-
- /*Methods from CMessageBrokerController*/
- /**
- * \brief Called on receiving response message from RPCBus.
- * \param method Name of corresponding request method that was sent previously to RPCBus.
- * \param root Received Json object.
- */
- void processResponse(std::string method, Json::Value& root);
-
- /**
- * \brief Called on receiving request message from RPCBus.
- * \param root Received Json object.
- */
- void processRequest(Json::Value& root);
-
- /**
- * \brief Called on receiving notification message from RPCBus.
- * \param root Received Json object.
- */
- void processNotification(Json::Value& root);
-
- void SubscribeTo();
-
- void* SubscribeAndBeginReceiverThread(void* param);
-
- protected:
- void ProcessRecievedFromMB(Json::Value& root);
-
- private:
- static const std::string ADDRESS;
- static const uint16_t PORT;
-
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(MessageBrokerAdapter);
-};
-} // namespace hmi_message_handler
-
-#endif // SRC_COMPONENTS_HMI_MESSAGE_HANDLER_INCLUDE_HMI_MESSAGE_HANDLER_MESSAGEBROKER_ADAPTER_H_
diff --git a/SDL_Core/src/components/hmi_message_handler/src/dbus_message_adapter.cc b/SDL_Core/src/components/hmi_message_handler/src/dbus_message_adapter.cc
deleted file mode 100644
index 62d9f8615..000000000
--- a/SDL_Core/src/components/hmi_message_handler/src/dbus_message_adapter.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "hmi_message_handler/dbus_message_adapter.h"
-
-#include "formatters/CSmartFactory.hpp"
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-namespace sos = NsSmartDeviceLink::NsJSONHandler::strings;
-
-namespace hmi_message_handler {
-
-const std::string DBusMessageAdapter::SDL_SERVICE_NAME = "com.ford.sdl.core";
-const std::string DBusMessageAdapter::SDL_OBJECT_PATH = "/";
-const std::string DBusMessageAdapter::HMI_SERVICE_NAME = "com.ford.sdl.hmi";
-const std::string DBusMessageAdapter::HMI_OBJECT_PATH = "/";
-
-std::vector<std::string> &split(const std::string &s, char delim,
- std::vector<std::string> &elems) {
- std::stringstream ss(s);
- std::string item;
- while (std::getline(ss, item, delim)) {
- elems.push_back(item);
- }
- return elems;
-}
-
-DBusMessageAdapter::DBusMessageAdapter(HMIMessageHandler* hmi_msg_handler)
- : HMIMessageAdapter(hmi_msg_handler),
- DBusMessageController(SDL_SERVICE_NAME, SDL_OBJECT_PATH,
- HMI_SERVICE_NAME, HMI_OBJECT_PATH) {
- LOG4CXX_INFO(logger_, "Created DBusMessageAdapter");
-}
-
-DBusMessageAdapter::~DBusMessageAdapter() {
-}
-
-void DBusMessageAdapter::SendMessageToHMI(MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "DBusMessageAdapter::sendMessageToHMI");
-
- const smart_objects::SmartObject& smart = message->smart_object();
- switch (smart[sos::S_PARAMS][sos::S_MESSAGE_TYPE].asInt()) {
- case hmi_apis::messageType::request:
- Request(smart);
- break;
- case hmi_apis::messageType::notification:
- Notification(smart);
- break;
- case hmi_apis::messageType::response:
- Response(smart);
- break;
- case hmi_apis::messageType::error_response:
- ErrorResponse(smart);
- break;
- case hmi_apis::messageType::INVALID_ENUM:
- default:
- LOG4CXX_INFO(logger_, "Message type is invalid");
- }
-}
-
-void DBusMessageAdapter::SubscribeTo() {
- LOG4CXX_INFO(logger_, "DBusMessageAdapter::subscribeTo");
- DBusMessageController::SubscribeTo("Buttons", "OnButtonEvent");
- DBusMessageController::SubscribeTo("Buttons", "OnButtonPress");
- DBusMessageController::SubscribeTo("UI", "ShowNotification");
- DBusMessageController::SubscribeTo("UI", "OnCommand");
- DBusMessageController::SubscribeTo("UI", "OnDriverDistraction");
- DBusMessageController::SubscribeTo("UI", "OnSystemContext");
- DBusMessageController::SubscribeTo("UI", "OnLanguageChange");
- DBusMessageController::SubscribeTo("UI", "OnKeyboardInput");
- DBusMessageController::SubscribeTo("UI", "OnTouchEvent");
- DBusMessageController::SubscribeTo("UI", "OnResetTimeout");
- DBusMessageController::SubscribeTo("VR", "Started");
- DBusMessageController::SubscribeTo("VR", "Stopped");
- DBusMessageController::SubscribeTo("VR", "OnCommand");
- DBusMessageController::SubscribeTo("VR", "OnLanguageChange");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnReady");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnAppDeactivated");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnStartDeviceDiscovery");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnUpdateDeviceList");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnFindApplications");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnAppActivated");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnAppRegistered");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnAppUnregistered");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnExitApplication");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnExitAllApplications");
- DBusMessageController::SubscribeTo("BasicCommunication", "OnDeviceChosen");
- DBusMessageController::SubscribeTo("TTS", "Started");
- DBusMessageController::SubscribeTo("TTS", "Stopped");
- DBusMessageController::SubscribeTo("TTS", "OnLanguageChange");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnGpsData");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnSpeed");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnRpm");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnFuelLevel");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnFuelLevelState");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnInstantFuelConsumption");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnExternalTemperature");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnVin");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnPrndl");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnTirePressure");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnOdometer");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnBeltStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnBodyInformation");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnDeviceStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnDriverBraking");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnWiperStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnHeadLampStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnEngineTorque");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnAccPedalPosition");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnSteeringWheelAngle");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnECallInfo");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnAirbagStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnEmergencyEvent");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnClusterModeStatus");
- DBusMessageController::SubscribeTo("VehicleInfo", "OnMyKey");
- DBusMessageController::SubscribeTo("Navigation", "OnTBTClientState");
- LOG4CXX_INFO(logger_, "Subscribed to notifications.");
-}
-
-void DBusMessageAdapter::SendMessageToCore(const smart_objects::SmartObject& obj) {
- LOG4CXX_INFO(logger_, "DBusMessageAdapter::SendMessageToCore");
-
- if (!handler()) {
- LOG4CXX_WARN(logger_, "DBusMessageAdapter hasn't handler");
- return;
- }
-
- MessageSharedPointer message = new application_manager::Message(protocol_handler::MessagePriority::kDefault);//todo: ykazakov constant is a temp solution to finish merge MessagePriority::FromServiceType(message.servicetype) shall be used instead
- message->set_protocol_version(application_manager::ProtocolVersion::kHMI);
- message->set_smart_object(obj);
- handler()->OnMessageReceived(message);
- LOG4CXX_INFO(logger_, "Successfully sent to observer");
-}
-
-void DBusMessageAdapter::Request(const smart_objects::SmartObject& obj) {
- LOG4CXX_DEBUG(logger_, "Request");
- dbus::MessageId func_id = static_cast<dbus::MessageId>(
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID].asInt());
- dbus::MessageName name = get_schema().getMessageName(func_id);
- uint id = obj[sos::S_PARAMS][sos::S_CORRELATION_ID].asInt();
- MethodCall(id, func_id, name, obj[sos::S_MSG_PARAMS]);
-}
-
-void DBusMessageAdapter::Notification(const smart_objects::SmartObject &obj) {
- LOG4CXX_DEBUG(logger_, "Notification");
- dbus::MessageId func_id = static_cast<dbus::MessageId>(
- obj[sos::S_PARAMS][sos::S_FUNCTION_ID].asInt());
- dbus::MessageName name = get_schema().getMessageName(func_id);
- Signal(func_id, name, obj[sos::S_MSG_PARAMS]);
-}
-
-void DBusMessageAdapter::Response(const smart_objects::SmartObject& obj) {
- LOG4CXX_DEBUG(logger_, "Response");
- uint id = obj[sos::S_PARAMS][sos::S_CORRELATION_ID].asInt();
- MethodReturn(id, obj[sos::S_MSG_PARAMS]);
-}
-
-void DBusMessageAdapter::ErrorResponse(const smart_objects::SmartObject &obj) {
- LOG4CXX_DEBUG(logger_, "Error");
- // TODO(KKolodiy): get error and description
- std::string error = "";
- std::string description = "";
- uint id = obj[sos::S_PARAMS][sos::S_CORRELATION_ID].asInt();
- Error(id, error, description);
-}
-
-} // namespace hmi_message_handler
diff --git a/SDL_Core/src/components/hmi_message_handler/src/hmi_message_adapter.cc b/SDL_Core/src/components/hmi_message_handler/src/hmi_message_adapter.cc
deleted file mode 100644
index 343f13f00..000000000
--- a/SDL_Core/src/components/hmi_message_handler/src/hmi_message_adapter.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "hmi_message_handler/hmi_message_adapter.h"
-
-namespace hmi_message_handler {
-HMIMessageAdapter::HMIMessageAdapter(HMIMessageHandler* handler)
- : handler_(handler) {
-}
-
-HMIMessageAdapter::~HMIMessageAdapter() {
- handler_ = 0;
-}
-
-} // namespace hmi_message_handler
diff --git a/SDL_Core/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc b/SDL_Core/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
deleted file mode 100644
index 7df82fd82..000000000
--- a/SDL_Core/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "hmi_message_handler/hmi_message_handler_impl.h"
-#include "config_profile/profile.h"
-
-namespace hmi_message_handler {
-
-log4cxx::LoggerPtr HMIMessageHandlerImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("HMIMessageHandler"));
-
-HMIMessageHandlerImpl::HMIMessageHandlerImpl()
- : observer_(NULL),
- messages_to_hmi_("hmi_message_handler::ToHMIThreadImpl", this,
- threads::ThreadOptions(
- profile::Profile::instance()->thread_min_stack_size())),
- messages_from_hmi_("hmi_message_handler::FromHMIThreadImpl", this,
- threads::ThreadOptions(
- profile::Profile::instance()->thread_min_stack_size())) {
-}
-
-HMIMessageHandlerImpl::~HMIMessageHandlerImpl() {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::~HMIMessageHandlerImpl()");
- observer_ = NULL;
- if (!message_adapters_.empty()) {
- LOG4CXX_WARN(logger_, "Not all HMIMessageAdapter have unsubscribed from"
- " HMIMessageHandlerImpl");
- }
-}
-
-void HMIMessageHandlerImpl::OnMessageReceived(MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::OnMessageReceived()");
- if (!observer_) {
- LOG4CXX_WARN(logger_, "No HMI message observer set!");
- return;
- }
- messages_from_hmi_.PostMessage(impl::MessageFromHmi(message));
-}
-
-void HMIMessageHandlerImpl::SendMessageToHMI(MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::~sendMessageToHMI()");
- messages_to_hmi_.PostMessage(impl::MessageToHmi(message));
-}
-
-void HMIMessageHandlerImpl::set_message_observer(HMIMessageObserver* observer) {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::SetMessageObserver()");
- observer_ = observer;
-}
-
-void HMIMessageHandlerImpl::OnErrorSending(MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::OnErrorSending()");
- if (!observer_) {
- LOG4CXX_WARN(logger_, "No HMI message observer set!");
- return;
- }
- observer_->OnErrorSending(message);
-}
-
-void HMIMessageHandlerImpl::AddHMIMessageAdapter(HMIMessageAdapter* adapter) {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::AddHMIMessageAdapter()");
- message_adapters_.insert(adapter);
-}
-
-void HMIMessageHandlerImpl::RemoveHMIMessageAdapter(
- HMIMessageAdapter* adapter) {
- LOG4CXX_INFO(logger_, "HMIMessageHandlerImpl::RemoveHMIMessageAdapter()");
- DCHECK(adapter != NULL);
- message_adapters_.erase(adapter);
-}
-
-void HMIMessageHandlerImpl::Handle(const impl::MessageFromHmi& message) {
- LOG4CXX_INFO(logger_, "Received message from hmi");
-
- if (!observer_) {
- LOG4CXX_ERROR(logger_, "Observer is not set for HMIMessageHandler");
- return;
- }
-
- observer_->OnMessageReceived(message);
- LOG4CXX_INFO(logger_, "Message from hmi given away.");
-
-}
-void HMIMessageHandlerImpl::Handle(const impl::MessageToHmi& message) {
- for (std::set<HMIMessageAdapter*>::iterator it =
- message_adapters_.begin();
- it != message_adapters_.end();
- ++it) {
- (*it)->SendMessageToHMI(message);
- }
-}
-
-
-} // namespace hmi_message_handler
diff --git a/SDL_Core/src/components/hmi_message_handler/src/messagebroker_adapter.cc b/SDL_Core/src/components/hmi_message_handler/src/messagebroker_adapter.cc
deleted file mode 100644
index 4949b92e3..000000000
--- a/SDL_Core/src/components/hmi_message_handler/src/messagebroker_adapter.cc
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-
-#include "hmi_message_handler/messagebroker_adapter.h"
-#include "config_profile/profile.h"
-
-namespace hmi_message_handler {
-
-typedef NsMessageBroker::CMessageBrokerController MessageBrokerController;
-
-log4cxx::LoggerPtr MessageBrokerAdapter::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("HMIMessageHandler"));
-
-MessageBrokerAdapter::MessageBrokerAdapter(HMIMessageHandler* handler_param,
- const std::string& server_address,
- uint16_t port)
- : MessageBrokerController(server_address, port, "SDL"),
- HMIMessageAdapter(handler_param) {
- LOG4CXX_INFO(logger_, "Created MessageBrokerAdapter");
-}
-
-MessageBrokerAdapter::~MessageBrokerAdapter() {
-}
-
-void MessageBrokerAdapter::SendMessageToHMI(
- hmi_message_handler::MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::sendMessageToHMI");
- /*if (!message) {
- // TODO(PV): LOG
- return;
- }*/
-
- Json::Reader reader;
- Json::Value json_value;
- if (!reader.parse(message->json_message(), json_value, false)) {
- // TODO(PV): LOG4CXX_ERROR(mLogger, "Received invalid json string.");
- return;
- }
-
- sendJsonMessage(json_value);
-}
-
-void MessageBrokerAdapter::processResponse(std::string method,
- Json::Value& root) {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::processResponse");
- ProcessRecievedFromMB(root);
-}
-
-void MessageBrokerAdapter::processRequest(Json::Value& root) {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::processRequest");
- ProcessRecievedFromMB(root);
-}
-
-void MessageBrokerAdapter::processNotification(Json::Value& root) {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::processNotification");
- ProcessRecievedFromMB(root);
-}
-
-void MessageBrokerAdapter::SubscribeTo() {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::subscribeTo");
- MessageBrokerController::subscribeTo("Buttons.OnButtonEvent");
- MessageBrokerController::subscribeTo("Buttons.OnButtonPress");
- MessageBrokerController::subscribeTo("UI.OnCommand");
- MessageBrokerController::subscribeTo("VR.OnCommand");
- MessageBrokerController::subscribeTo("BasicCommunication.OnReady");
- MessageBrokerController::subscribeTo("BasicCommunication.OnExitAllApplications");
- MessageBrokerController::subscribeTo("UI.OnDriverDistraction");
- MessageBrokerController::subscribeTo("UI.OnSystemContext");
- MessageBrokerController::subscribeTo("UI.OnAppActivated");
- MessageBrokerController::subscribeTo("UI.OnKeyboardInput");
- MessageBrokerController::subscribeTo("UI.OnTouchEvent");
- MessageBrokerController::subscribeTo("UI.OnResetTimeout");
- MessageBrokerController::subscribeTo("BasicCommunication.OnAppDeactivated");
- MessageBrokerController::subscribeTo(
- "BasicCommunication.OnStartDeviceDiscovery");
- MessageBrokerController::subscribeTo("BasicCommunication.OnUpdateDeviceList");
- MessageBrokerController::subscribeTo("BasicCommunication.OnFindApplications");
- MessageBrokerController::subscribeTo("BasicCommunication.OnAppActivated");
- MessageBrokerController::subscribeTo("BasicCommunication.OnExitApplication");
- MessageBrokerController::subscribeTo(
- "BasicCommunication.OnExitAllApplications");
- MessageBrokerController::subscribeTo("BasicCommunication.OnDeviceChosen");
- MessageBrokerController::subscribeTo("UI.OnLanguageChange");
- MessageBrokerController::subscribeTo("VR.OnLanguageChange");
- MessageBrokerController::subscribeTo("TTS.OnLanguageChange");
- MessageBrokerController::subscribeTo("VehicleInfo.OnVehicleData");
- MessageBrokerController::subscribeTo("Navigation.OnTBTClientState");
- MessageBrokerController::subscribeTo("TTS.Started");
- MessageBrokerController::subscribeTo("TTS.Stopped");
- MessageBrokerController::subscribeTo("BasicCommunication.OnSystemRequest");
-
- LOG4CXX_INFO(logger_, "Subscribed to notifications.");
-}
-
-void* MessageBrokerAdapter::SubscribeAndBeginReceiverThread(void* param) {
- PassToThread(threads::Thread::CurrentId());
- registerController();
- SubscribeTo();
- return MethodForReceiverThread(param);
-}
-
-void MessageBrokerAdapter::ProcessRecievedFromMB(Json::Value& root) {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::ProcessRecievedFromMB");
- if (root.isNull()) {
- // LOG
- return;
- }
-
- Json::FastWriter writer;
- std::string message_string = writer.write(root);
-
- if (message_string.empty()) {
- // LOG
- return;
- }
-
- if (!handler()) {
- // WARNING
- return;
- }
-
- // Messages from HMI (sent through message broker) have no priority so far
- // assign default priority
- hmi_message_handler::MessageSharedPointer message = hmi_message_handler::MessageSharedPointer(new application_manager::Message(
- protocol_handler::MessagePriority::kDefault));
- // message->set_message_type()
- message->set_json_message(message_string);
- message->set_protocol_version(application_manager::ProtocolVersion::kHMI);
-
- handler()->OnMessageReceived(message);
- LOG4CXX_INFO(logger_, "Successfully sent to observer");
-}
-
-} // namespace hmi_message_handler
diff --git a/SDL_Core/src/components/interfaces/CMakeLists.txt b/SDL_Core/src/components/interfaces/CMakeLists.txt
deleted file mode 100644
index f611dfaca..000000000
--- a/SDL_Core/src/components/interfaces/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-include_directories (
- ../utils/include/
- ../formatters/include
-)
-
-GenerateInterface("v4_protocol_v1_2_no_extra.xml" "NsSmartDeviceLinkRPC::V1" "sdlrpcv1")
-GenerateInterface("MOBILE_API.xml" "mobile_apis" "sdlrpcv2")
-
-IF (${WEB_HMI})
- GenerateInterface("HMI_API.xml" "hmi_apis" "jsonrpc")
-ENDIF (${WEB_HMI})
-
-IF (${QT_HMI})
- set(hpp_file
- "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API.h"
- "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.h"
- )
-
- set(cpp_file "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.cc")
- set(full_xml_name "${CMAKE_CURRENT_SOURCE_DIR}/QT_HMI_API.xml")
-
- add_custom_command( OUTPUT ${hpp_file} ${cpp_file}
- COMMAND ${INTEFRACE_GENERATOR_CMD} ${full_xml_name} hmi_apis ${CMAKE_CURRENT_BINARY_DIR} "--parser-type" "jsonrpc"
- DEPENDS ${INTERFACE_GENERATOR_DEPENDENCIES} ${full_xml_name}
- COMMENT "Generating files:\n ${hpp_file}\n ${cpp_file}\nfrom:\n QT_HMI_API.xml ..."
- VERBATIM
- )
-
- include_directories (
- ../../../src/components/smart_objects/include
- ../../../src/components/formatters/include/
- ${CMAKE_SOURCE_DIR}/src/components/formatters/include/
- ${CMAKE_BINARY_DIR}
- )
-
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HMI_API.h"
- COMMAND sed "-e" "s/QT_HMI_API/HMI_API/g" "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API.h" > "${CMAKE_CURRENT_BINARY_DIR}/HMI_API.h"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API.h")
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.h"
- COMMAND sed "-e" "s/QT_HMI_API/HMI_API/g" "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.h" > "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.h"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.h")
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc"
- COMMAND sed "-e" "s/QT_HMI_API/HMI_API/g" "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.cc" > "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/QT_HMI_API_schema.cc" "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.h" "${CMAKE_CURRENT_BINARY_DIR}/HMI_API.h")
- add_library(HMI_API "${CMAKE_CURRENT_BINARY_DIR}/HMI_API_schema.cc")
-ENDIF (${QT_HMI})
-
diff --git a/SDL_Core/src/components/interfaces/HMI_API.xml b/SDL_Core/src/components/interfaces/HMI_API.xml
deleted file mode 100644
index a2dc68cd6..000000000
--- a/SDL_Core/src/components/interfaces/HMI_API.xml
+++ /dev/null
@@ -1,3347 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-
-<!--
-* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE. -->
-
-
-<interfaces name="SmartDeviceLink HMI API">
-
-<interface name="Common" version="1.1" date="2013-10-02">
-
-<enum name="Result">
- <element name="SUCCESS" value="0"/>
- <element name="UNSUPPORTED_REQUEST" value="1"/>
- <element name="UNSUPPORTED_RESOURCE" value="2"/>
- <element name="DISALLOWED" value="3"/>
- <element name="REJECTED" value="4"/>
- <element name="ABORTED" value="5"/>
- <element name="IGNORED" value="6"/>
- <element name="RETRY" value="7"/>
- <element name="IN_USE" value="8"/>
- <element name="DATA_NOT_AVAILABLE" value="9"/>
- <element name="TIMED_OUT" value="10"/>
- <element name="INVALID_DATA" value="11"/>
- <element name="CHAR_LIMIT_EXCEEDED" value="12"/>
- <element name="INVALID_ID" value="13"/>
- <element name="DUPLICATE_NAME" value="14"/>
- <element name="APPLICATION_NOT_REGISTERED" value="15"/>
- <element name="WRONG_LANGUAGE" value="16"/>
- <element name="OUT_OF_MEMORY" value="17"/>
- <element name="TOO_MANY_PENDING_REQUESTS" value="18"/>
- <element name="NO_APPS_REGISTERED" value="19"/>
- <element name="NO_DEVICES_CONNECTED" value="20"/>
- <element name="WARNINGS" value="21"/>
- <element name="GENERIC_ERROR" value="22"/>
- <element name="USER_DISALLOWED" value="23"/>
-</enum>
-
-<enum name="ButtonName">
- <description>Defines the hard (physical) and soft (touchscreen) buttons available from SYNC</description>
- <element name="OK"/>
- <element name="SEEKLEFT"/>
- <element name="SEEKRIGHT"/>
- <element name="TUNEUP"/>
- <element name="TUNEDOWN"/>
- <element name="PRESET_0"/>
- <element name="PRESET_1"/>
- <element name="PRESET_2"/>
- <element name="PRESET_3"/>
- <element name="PRESET_4"/>
- <element name="PRESET_5"/>
- <element name="PRESET_6"/>
- <element name="PRESET_7"/>
- <element name="PRESET_8"/>
- <element name="PRESET_9"/>
- <element name="CUSTOM_BUTTON"/>
- <element name="SEARCH"/>
-</enum>
-
-<enum name="ButtonEventMode">
- <element name="BUTTONUP">
- <description>A button has been released up</description>
- </element>
- <element name="BUTTONDOWN">
- <description>A button has been pressed down</description>
- </element>
-</enum>
-
-<enum name="ButtonPressMode">
- <element name="LONG">
- <description>A button was released, after it was pressed for a long time. Actual timing is defined by head unit and may vary</description>
- </element>
- <element name="SHORT">
- <description>A button was released, after it was pressed for a short time. Actual timing is defined by head unit and may vary</description>
- </element>
-</enum>
-
- <enum name="Language">
- <element name="EN-US" internal_name="EN_US">
- <description>English - US</description>
- </element>
- <element name="ES-MX" internal_name="ES_MX">
- <description>Spanish - Mexico</description>
- </element>
- <element name="FR-CA" internal_name="FR_CA">
- <description>French - Canada</description>
- </element>
- <element name="DE-DE" internal_name="DE_DE">
- <description>German - Germany</description>
- </element>
- <element name="ES-ES" internal_name="ES_ES">
- <description>Spanish - Spain</description>
- </element>
- <element name="EN-GB" internal_name="EN_GB">
- <description>English - GB</description>
- </element>
- <element name="RU-RU" internal_name="RU_RU">
- <description>Russian - Russia</description>
- </element>
- <element name="TR-TR" internal_name="TR_TR">
- <description>Turkish - Turkey</description>
- </element>
- <element name="PL-PL" internal_name="PL_PL">
- <description>Polish - Poland</description>
- </element>
- <element name="FR-FR" internal_name="FR_FR">
- <description>French - France</description>
- </element>
- <element name="IT-IT" internal_name="IT_IT">
- <description>Italian - Italy</description>
- </element>
- <element name="SV-SE" internal_name="SV_SE">
- <description>Swedish - Sweden</description>
- </element>
- <element name="PT-PT" internal_name="PT_PT">
- <description>Portuguese - Portugal</description>
- </element>
- <element name="NL-NL" internal_name="NL_NL">
- <description>Dutch (Standard) - Netherlands</description>
- </element>
- <element name="EN-AU" internal_name="EN_AU">
- <description>English - Australia</description>
- </element>
- <element name="ZH-CN" internal_name="ZH_CN">
- <description>Mandarin - China</description>
- </element>
- <element name="ZH-TW" internal_name="ZH_TW">
- <description>Mandarin - Taiwan</description>
- </element>
- <element name="JA-JP" internal_name="JA_JP">
- <description>Japanese - Japan</description>
- </element>
- <element name="AR-SA" internal_name="AR_SA">
- <description>Arabic - Saudi Arabia</description>
- </element>
- <element name="KO-KR" internal_name="KO_KR">
- <description>Korean - South Korea</description>
- </element>
- <element name="PT-BR" internal_name="PT_BR">
- <description>Portuguese - Brazil</description>
- </element>
- <element name="CS-CZ" internal_name="CS_CZ">
- <description>Czech - Czech Republic</description>
- </element>
- <element name="DA-DK" internal_name="DA_DK">
- <description>Danish - Denmark</description>
- </element>
- <element name="NO-NO" internal_name="NO_NO">
- <description>Norwegian - Norway</description>
- </element>
-</enum>
-
-<enum name="SoftButtonType">
- <description>Contains information about the SoftButton capabilities.</description>
- <element name="TEXT" internal_name="SBT_TEXT"/>
- <element name="IMAGE" internal_name="SBT_IMAGE"/>
- <element name="BOTH" internal_name="SBT_BOTH"/>
-</enum>
-
-<enum name="SystemAction">
- <description>Enumeration that describes system actions that can be triggered.</description>
- <element name="DEFAULT_ACTION">
- <description>Default action occurs. Standard behavior (e.g. SoftButton clears overlay).</description>
- </element>
- <element name="STEAL_FOCUS">
- <description>The calling app's dialog or related event should clear and the app should be brought into HMI_FULL.</description>
- </element>
- <element name="KEEP_CONTEXT">
- <description>Current system context is maintained. An overlay is persisted even though a SoftButton has been pressed and the notification sent.</description>
- </element>
-</enum>
-
-<enum name="AppHMIType">
- <description>Enumeration listing possible app types.</description>
- <element name="DEFAULT" />
- <element name="COMMUNICATION" />
- <element name="MEDIA" />
- <element name="MESSAGING" />
- <element name="NAVIGATION" />
- <element name="INFORMATION" />
- <element name="SOCIAL" />
- <element name="BACKGROUND_PROCESS" />
- <element name="TESTING" />
- <element name="SYSTEM" />
-</enum>
-
-<enum name="LayoutMode">
- <description>For touchscreen interactions, the mode of how the choices are presented.</description>
- <element name="ICON_ONLY" />
- <description>This mode causes the interaction to display the previous set of choices as icons.</description>
- <element name="ICON_WITH_SEARCH" />
- <description>This mode causes the interaction to display the previous set of choices as icons along with a search field in the HMI.</description>
- <element name="LIST_ONLY" />
- <description>This mode causes the interaction to display the previous set of choices as a list.</description>
- <element name="LIST_WITH_SEARCH" />
- <description>This mode causes the interaction to display the previous set of choices as a list along with a search field in the HMI.</description>
- <element name="KEYBOARD" />
- <description>This mode causes the interaction to immediately display a keyboard entry through the HMI.</description>
-</enum>
-
-<enum name="DeactivateReason">
- <description>Specifies the functionality the User has switched to.</description>
- <element name="AUDIO">
- <description>Navigated to audio(radio, etc)</description>
- </element>
- <element name="PHONECALL">
- <description>Navigated to make a call.</description>
- </element>
- <element name="NAVIGATIONMAP">
- <description>Navigated to navigation screen.</description>
- </element>
- <element name="PHONEMENU">
- <description>Navigated to phone menu.</description>
- </element>
- <element name="SYNCSETTINGS">
- <description>Navigated to settings menu.</description>
- </element>
- <element name="GENERAL">
- <description>Other screens navigation apart from other mobile app.</description>
- </element>
-</enum>
-
-<enum name="ClockUpdateMode">
- <description>Describes how the media clock timer should behave on the platform</description>
- <element name="COUNTUP" />
- <description>Starts the media clock timer counting upwards, as in time elapsed.</description>
- <element name="COUNTDOWN" />
- <description>Starts the media clock timer counting downwards, as in time remaining.</description>
- <element name="PAUSE" />
- <description>Pauses the media clock timer</description>
- <element name="RESUME" />
- <description>Resume the media clock timer</description>
- <element name="CLEAR" />
- <description>Clears the media clock timer (previously done through Show->mediaClock)</description>
-</enum>
-
-<enum name="SystemContext">
- <description>Enumeration that describes possible contexts the application might be in on HU.</description>
- <description>Communicated to whichever app is in HMI FULL, except Alert.</description>
- <element name="MAIN" internal_name="SYSCTXT_MAIN">
- <description>The app's persistent display (whether media/non-media/navigation) is fully visible onscreen.</description>
- <description> There is currently no user interaction (user-initiated or app-initiated) with the head-unit</description>
- </element>
- <element name="VRSESSION" internal_name="SYSCTXT_VRSESSION">
- <description>The system is currently in a VR session (with whatever dedicated VR screen being overlaid onscreen).</description>
- </element>
- <element name="MENU" internal_name="SYSCTXT_MENU">
- <description>The system is currently displaying a system or in-App menu onscreen.</description>
- </element>
- <element name="HMI_OBSCURED" internal_name="SYSCTXT_HMI_OBSCURED">
- <description>The app's display HMI is currently obscuring with either a system or other app's overlay (except of Alert element).</description>
- </element>
- <element name="ALERT" internal_name="SYSCTXT_ALERT">
- <description>Broadcast only to whichever app has an alert currently being displayed.</description>
- </element>
-</enum>
-
-<enum name="HmiZoneCapabilities">
- <description>Contains information about the HMI zone capabilities.</description>
- <description>For future use.</description>
- <element name="FRONT" />
- <element name="BACK" />
-</enum>
-
-<enum name="SpeechCapabilities">
- <description>Contains information about the TTS capabilities.</description>
- <element name="TEXT" internal_name="SC_TEXT" />
- <element name="SAPI_PHONEMES" />
- <element name="LHPLUS_PHONEMES" />
- <element name="PRE_RECORDED" />
- <element name="SILENCE" />
-</enum>
-
-<enum name="VrCapabilities">
- <description>Contains information about the VR capabilities.</description>
- <element name="TEXT" internal_name="VR_TEXT" />
-</enum>
-
-<enum name="PrerecordedSpeech">
- <description>Contains a list of prerecorded speech items present on the platform.</description>
- <element name="HELP_JINGLE" />
- <element name="INITIAL_JINGLE" />
- <element name="LISTEN_JINGLE" />
- <element name="POSITIVE_JINGLE" />
- <element name="NEGATIVE_JINGLE" />
-</enum>
-
-<enum name="TBTState">
- <description>Enumeration that describes possible states of turn-by-turn client or SmartDeviceLink app.</description>
- <element name="ROUTE_UPDATE_REQUEST" />
- <element name="ROUTE_ACCEPTED" />
- <element name="ROUTE_REFUSED" />
- <element name="ROUTE_CANCELLED" />
- <element name="ETA_REQUEST" />
- <element name="NEXT_TURN_REQUEST" />
- <element name="ROUTE_STATUS_REQUEST" />
- <element name="ROUTE_SUMMARY_REQUEST" />
- <element name="TRIP_STATUS_REQUEST" />
- <element name="ROUTE_UPDATE_REQUEST_TIMEOUT" />
-</enum>
-
-<enum name="ApplicationsCloseReason">
- <description>Describes the reasons for exiting all of applications.</description>
- <element name="IGNITION_OFF" />
- <element name="MASTER_RESET" />
- <element name="FACTORY_DEFAULTS" />
-</enum>
-
-<enum name="DisplayType">
- <description>The possible types of HU display.</description>
- <element name="CID">
- <description> A 2-line x 20 character "dot matrix" display </description>
- </element>
- <element name="TYPE2">
- <description> 1 line older radio head unit.</description>
- </element>
- <element name="TYPE5">
- <description> Old radio head unit.</description>
- </element>
- <element name="NGN">
- <description> Next Generation Navigation display.</description>
- </element>
- <element name="GEN2_8_DMA">
- <description> GEN-2, 8 inch display.</description>
- </element>
- <element name="GEN2_6_DMA">
- <description> GEN-2, 6 inch display.</description>
- </element>
- <element name="MFD3">
- <description> 3 inch GEN1.1 display </description>
- </element>
- <element name="MFD4">
- <description> 4 inch GEN1.1 display </description>
- </element>
- <element name="MFD5">
- <description> 5 inch GEN1.1 display </description>
- </element>
- <element name="GEN3_8-INCH" internal_name="GEN3_8_INCH" />
- </enum>
-
-<enum name="ImageType">
- <description>Contains information about the type of image.</description>
- <element name="STATIC" />
- <element name="DYNAMIC" />
-</enum>
-
-<enum name="TextFieldName">
- <element name="mainField1">
- <description>The first line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="mainField2">
- <description>The second line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="mainField3">
- <description>The first line of second set of main fields of persistent display; applies to "Show"</description>
- </element>
- <element name="mainField4">
- <description>The second line of second set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="statusBar">
- <description>The status bar on NGN; applies to "Show"</description>
- </element>
- <element name="mediaClock">
- <description>Text value for MediaClock field; applies to "Show"</description>
- </element>
- <element name="mediaTrack">
- <description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
- </element>
- <element name="alertText1">
- <description>The first line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="alertText2">
- <description>The second line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="alertText3">
- <description>The third line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="scrollableMessageBody">
- <description>Long form body of text that can include newlines and tabs; applies to "ScrollableMessage"</description>
- </element>
- <element name="initialInteractionText">
- <description> First line suggestion for a user response (in the case of VR enabled interaction</description>
- </element>
- <element name="navigationText1">
- <description> First line of navigation text</description>
- </element>
- <element name="navigationText2">
- <description> Second line of navigation text</description>
- </element>
- <element name="ETA">
- <description> Estimated Time of Arrival time for navigation</description>
- </element>
- <element name="totalDistance">
- <description> Total distance to destination for navigation</description>
- </element>
- <element name="navigationText">
- <description>Navigation text for UpdateTurnList.</description>
- </element>
- <element name="audioPassThruDisplayText1">
- <description> First line of text for audio pass thru</description>
- </element>
- <element name="audioPassThruDisplayText2">
- <description> Second line of text for audio pass thru</description>
- </element>
- <element name="sliderHeader">
- <description> Header text for slider</description>
- </element>
- <element name="sliderFooter">
- <description> Footer text for slider</description>
- </element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
- <element name="menuName">
- <description> Primary text for Choice</description>
- </element>
- <element name="secondaryText">
- <description> Secondary text for Choice</description>
- </element>
- <element name="tertiaryText">
- <description> Tertiary text for Choice</description>
- </element>
- <element name="timeToDestination"/>
- <!-- TO DO to be removed -->
- <element name="turnText"/>
-</enum>
-
-<enum name="ImageFieldName">
- <element name="softButtonImage">
- <description>The image field for SoftButton</description>
- </element>
- <element name="choiceImage">
- <description>The first image field for Choice</description>
- </element>
- <element name="choiceSecondaryImage">
- <description>The secondary image field for Choice</description>
- </element>
- <element name="vrHelpItem">
- <description>The image field for vrHelpItem</description>
- </element>
- <element name="turnIcon">
- <description>The image field for Turn</description>
- </element>
- <element name="menuIcon">
- <description>The image field for the menu icon in SetGlobalProperties</description>
- </element>
- <element name="cmdIcon">
- <description>The image field for AddCommand</description>
- </element>
- <element name="appIcon">
- <description>The image field for the app icon (set by setAppIcon)</description>
- </element>
- <element name="graphic">
- <description>The image field for Show</description>
- </element>
- <element name="showConstantTBTIcon">
- <description>The primary image field for ShowConstantTBT</description>
- </element>
- <element name="showConstantTBTNextTurnIcon">
- <description>The secondary image field for ShowConstantTBT</description>
- </element>
-</enum>
-
-<enum name="TextAlignment">
- <description>The list of possible alignments, left, right, or centered</description>
- <element name="LEFT_ALIGNED" />
- <element name="RIGHT_ALIGNED" />
- <element name="CENTERED" />
-</enum>
-
-<enum name="DriverDistractionState">
- <description>Enumeration that describes possible states of driver distraction.</description>
- <element name="DD_ON" />
- <element name="DD_OFF" />
-</enum>
-
-<enum name="MediaClockFormat">
- <element name="CLOCK1">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 19;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 19;maxMinutes = 59;maxSeconds = 59;
- Is used for Type II, NGN and CID head units.
- </description>
- </element>
- <element name="CLOCK2">
- <description>
- minutesFieldWidth = 3;minutesFieldMax = 199;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 59;maxMinutes = 59;maxSeconds = 59;
- Is used for Type V head units.
- </description>
- </element>
- <element name="CLOCK3">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 59;secondsFieldWidth = 2;secondsFieldMax = 59;maxHours = 9;maxMinutes = 59;maxSeconds = 59;
- Is used for GEN1.1 (i.e. MFD3/4/5) head units.
- </description>
- </element>
- <element name="CLOCKTEXT1">
- <description>
- 5 characters possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for Type II head unit
- </description>
- </element>
- <element name="CLOCKTEXT2">
- <description>
- 5 chars possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for CID and NGN head unit
- </description>
- </element>
- <element name="CLOCKTEXT3">
- <description>
- 6 chars possible
- Format: 1|sp c c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for Type V head unit
- </description>
- </element>
- <element name="CLOCKTEXT4">
- <description>
- 6 chars possible
- Format: c :|sp c c : c c
- :|sp : colon or space
- c : character out of following character set: sp|0-9|[letters].
- Is used for GEN1.1 (i.e. MFD3/4/5) head units
- </description>
- </element>
-</enum>
-
-<!--IVI part-->
-<enum name="ComponentVolumeStatus">
- <description>The volume status of a vehicle component.</description>
- <element name="UNKNOWN" internal_name="CVS_UNKNOWN">
- <description> The data is unknown.</description>
- </element>
- <element name="NORMAL" internal_name="CVS_NORMAL">
- <description> The volume is normal.</description>
- </element>
- <element name="LOW" internal_name="CVS_LOW">
- <description> The volume is low.</description>
- </element>
- <element name="FAULT" internal_name="CVS_FAULT">
- <description> The module/sensor is currently faulted. </description>
- </element>
- <element name="ALERT" internal_name="CVS_ALERT">
- <description> The component`s volume is in critical level.</description>
- </element>
- <element name="NOT_SUPPORTED" internal_name="CVS_NOT_SUPPORTED">
- <description> The data is not supported.</description>
- </element>
-</enum>
-
-<enum name="PRNDL">
- <description>The selected gear.</description>
- <element name="PARK">
- <description>Parking</description>
- </element>
- <element name="REVERSE">
- <description>Reverse gear</description>
- </element>
- <element name="NEUTRAL">
- <description>No gear</description>
- </element>
- <element name="DRIVE">
- </element>
- <element name="SPORT">
- <description>Drive Sport mode</description>
- </element>
- <element name="LOWGEAR">
- <description>1st gear hold</description>
- </element>
- <element name="FIRST">
- </element>
- <element name="SECOND">
- </element>
- <element name="THIRD">
- </element>
- <element name="FOURTH">
- </element>
- <element name="FIFTH">
- </element>
- <element name="SIXTH">
- </element>
- <element name="SEVENTH">
- </element>
- <element name="EIGHTH">
- </element>
- <element name="FAULT">
- </element>
-</enum>
-
-<enum name="VehicleDataEventStatus">
- <description>Reflects the status of a vehicle data event; e.g. a seat belt event status.</description>
- <element name="NO_EVENT" internal_name="VDES_NO_EVENT">
- <description> The system does not have the adequate information to send valid YES or NO states.</description>
- </element>
- <element name="NO" internal_name="VDES_NO">
- <description> The requested event is in NO state.</description>
- </element>
- <element name="YES" internal_name="VDES_YES">
- <description> The requested event is in YES state.</description>
- </element>
- <element name="NOT_SUPPORTED" internal_name="VDES_NOT_SUPPORTED">
- <description> The requested data is not supported </description>
- </element>
- <element name="FAULT" internal_name="VDES_FAULT">
- <description> The module/sensor is currently faulted.</description>
- </element>
-</enum>
-
-<enum name="VehicleDataStatus">
- <description>Reflects the status of a binary vehicle data item.</description>
- <element name="NO_DATA_EXISTS" internal_name="VDS_NO_DATA_EXISTS">
- </element>
- <element name="OFF" internal_name="VDS_OFF">
- </element>
- <element name="ON" internal_name="VDS_ON">
- </element>
-</enum>
-
-<enum name="IgnitionStableStatus">
- <description>Reflects the ignition switch stability.</description>
- <element name="IGNITION_SWITCH_NOT_STABLE">
- </element>
- <element name="IGNITION_SWITCH_STABLE">
- </element>
- <element name="MISSING_FROM_TRANSMITTER">
- <description> Either the data is not accessible or the sensor is broken.</description>
- </element>
-</enum>
-
-<enum name="IgnitionStatus">
- <description>Reflects the status of ignition.</description>
- <element name="UNKNOWN" internal_name="IS_UNKNOWN">
- <description> The information is not acceptable. </description>
- </element>
- <element name="OFF" internal_name="IS_OFF">
- <description> The ignition is off.</description>
- </element>
- <element name="ACCESSORY" internal_name="IS_ACCESSORY">
- <description> The accessories are active (power windows, audio, display, etc.).</description>
- </element>
- <element name="RUN" internal_name="IS_RUN">
- <description> Ignition is active.</description>
- </element>
- <element name="START" internal_name="IS_START">
- <description> Starter is switched.</description>
- </element>
- <element name="INVALID" internal_name="IS_INVALID">
- <description> The data is provided, but there is some sort of fault or problem.</description>
- </element>
-</enum>
-
-<enum name="DeviceLevelStatus">
- <description>Reflects the reported component status of the connected device, if reported.</description>
- <element name="ZERO_LEVEL_BARS">
- </element>
- <element name="ONE_LEVEL_BARS">
- </element>
- <element name="TWO_LEVEL_BARS">
- </element>
- <element name="THREE_LEVEL_BARS">
- </element>
- <element name="FOUR_LEVEL_BARS">
- </element>
- <element name="NOT_PROVIDED">
- </element>
-</enum>
-
-<enum name="PrimaryAudioSource">
- <description>Reflects the current primary audio source (if selected).</description>
- <element name="NO_SOURCE_SELECTED">
- </element>
- <element name="USB">
- </element>
- <element name="USB2">
- </element>
- <element name="BLUETOOTH_STEREO_BTST">
- </element>
- <element name="LINE_IN">
- </element>
- <element name="IPOD">
- </element>
- <element name="MOBILE_APP">
- </element>
-</enum>
-
-<enum name="CompassDirection">
- <description>The list of potential compass directions</description>
- <element name="NORTH">
- </element>
- <element name="NORTHWEST">
- </element>
- <element name="WEST">
- </element>
- <element name="SOUTHWEST">
- </element>
- <element name="SOUTH">
- </element>
- <element name="SOUTHEAST">
- </element>
- <element name="EAST">
- </element>
- <element name="NORTHEAST">
- </element>
-</enum>
-
-<enum name="Dimension">
- <description>The supported dimensions of the GPS</description>
- <element name="NO_FIX" internal_name="Dimension_NO_FIX">
- <description>No GPS at all</description>
- </element>
- <element name="2D" internal_name="Dimension_2D">
- <description>Longitude and lattitude</description>
- </element>
- <element name="3D" internal_name="Dimension_3D">
- <description>Longitude and lattitude and altitude</description>
- </element>
-</enum>
-
-<enum name="TouchType">
- <element name="BEGIN"/>
- <element name="MOVE"/>
- <element name="END"/>
-</enum>
-
-<enum name="WarningLightStatus">
- <description>Reflects the status of a cluster instrument warning light.</description>
- <element name="OFF" internal_name="WLS_OFF">
- </element>
- <element name="ON" internal_name="WLS_ON">
- </element>
- <element name="FLASH" internal_name="WLS_FLASH">
- </element>
- <element name="NOT_USED" internal_name="WLS_NOT_USED">
- </element>
-</enum>
-
-<enum name="VehicleDataResultCode">
- <description>Enumeration that describes possible result codes of a vehicle data entry request.</description>
- <element name="SUCCESS" internal_name="VDRC_SUCCESS"/>
- <element name="TRUNCATED_DATA" internal_name="VDRC_TRUNCATED_DATA"/>
- <element name="DISALLOWED" internal_name="VDRC_DISALLOWED"/>
- <element name="USER_DISALLOWED" internal_name="VDRC_USER_DISALLOWED"/>
- <element name="INVALID_ID" internal_name="VDRC_INVALID_ID"/>
- <element name="VEHICLE_DATA_NOT_AVAILABLE" internal_name="VDRC_DATA_NOT_AVAILABLE"/>
- <element name="DATA_ALREADY_SUBSCRIBED" internal_name="VDRC_DATA_ALREADY_SUBSCRIBED"/>
- <element name="DATA_NOT_SUBSCRIBED" internal_name="VDRC_DATA_NOT_SUBSCRIBED"/>
- <element name="IGNORED" internal_name="VDRC_IGNORED"/>
-</enum>
-
-<enum name="VehicleDataType">
- <description>Defines the data types that can be published and subscribed to.</description>
- <element name="VEHICLEDATA_GPS">
- <description>Notifies GPSData may be subscribed</description>
- </element>
- <element name="VEHICLEDATA_SPEED" />
- <element name="VEHICLEDATA_RPM" />
- <element name="VEHICLEDATA_FUELLEVEL" />
- <element name="VEHICLEDATA_FUELLEVEL_STATE" />
- <element name="VEHICLEDATA_FUELCONSUMPTION" />
- <element name="VEHICLEDATA_EXTERNTEMP" />
- <element name="VEHICLEDATA_VIN" />
- <element name="VEHICLEDATA_PRNDL" />
- <element name="VEHICLEDATA_TIREPRESSURE" />
- <element name="VEHICLEDATA_ODOMETER" />
- <element name="VEHICLEDATA_BELTSTATUS" />
- <element name="VEHICLEDATA_BODYINFO" />
- <element name="VEHICLEDATA_DEVICESTATUS" />
- <element name="VEHICLEDATA_ECALLINFO" />
- <element name="VEHICLEDATA_AIRBAGSTATUS" />
- <element name="VEHICLEDATA_EMERGENCYEVENT" />
- <element name="VEHICLEDATA_CLUSTERMODESTATUS" />
- <element name="VEHICLEDATA_MYKEY" />
- <element name="VEHICLEDATA_BRAKING" />
- <element name="VEHICLEDATA_WIPERSTATUS" />
- <element name="VEHICLEDATA_HEADLAMPSTATUS" />
- <element name="VEHICLEDATA_BATTVOLTAGE" />
- <element name="VEHICLEDATA_ENGINETORQUE" />
- <element name="VEHICLEDATA_ACCPEDAL" />
- <element name="VEHICLEDATA_STEERINGWHEEL" />
-</enum>
-
-<enum name="WiperStatus">
- <description>Reflects the status of the wipers.</description>
- <element name="OFF">
- <description> The wipers are off.</description>
- </element>
- <element name="AUTO_OFF">
- <description> The wipers are automatically off </description>
- </element>
- <element name="OFF_MOVING">
- <description> Means that though set to off, somehow the wipers have been engaged (physically moved enough to engage a wiping motion).</description>
- </element>
- <element name="MAN_INT_OFF">
- <description> The wipers are manually off after having been working.</description>
- </element>
- <element name="MAN_INT_ON">
- <description> The wipers are manually on.</description>
- </element>
- <element name="MAN_LOW">
- <description> The wipers are manually set to low speed.</description>
- </element>
- <element name="MAN_HIGH">
- <description> The wipers are manually set to high speed.</description>
- </element>
- <element name="MAN_FLICK">
- <description> The wipers are manually set for doing a flick.</description>
- </element>
- <element name="WASH">
- <description> The wipers are set to use the water from vehicle washer bottle for cleaning the windscreen.</description>
- </element>
- <element name="AUTO_LOW">
- <description> The wipers are automatically set to low speed.</description>
- </element>
- <element name="AUTO_HIGH">
- <description> The wipers are automatically set to high speed.</description>
- </element>
- <element name="COURTESYWIPE">
- <description> This is for when a user has just initiated a WASH and several seconds later a secondary wipe is automatically initiated to clear remaining fluid.</description>
- </element>
- <element name="AUTO_ADJUST">
- <description> This is set as the user moves between possible automatic wiper speeds.</description>
- </element>
- <element name="STALLED">
- <description> The wiper is stalled to its place. </description>
- </element>
- <element name="NO_DATA_EXISTS">
- <description> The sensor / module cannot provide any information for wiper.</description>
- </element>
-</enum>
-
-<enum name="SamplingRate">
- <description>Describes different sampling options for PerformAudioPassThru.</description>
- <element name="8KHZ" internal_name="RATE_8KHZ"/>
- <element name="16KHZ" internal_name="RATE_16KHZ"/>
- <element name="22KHZ" internal_name="RATE_22KHZ"/>
- <element name="44KHZ" internal_name="RATE_44KHZ"/>
-</enum>
-
-<enum name="BitsPerSample">
- <description>Describes different quality options for PerformAudioPassThru.</description>
- <element name="8_BIT" internal_name="RATE_8_BIT"/>
- <element name="16_BIT" internal_name="RATE_16_BIT"/>
-</enum>
-
-<enum name="AudioType">
- <description>Describes different audio type options for PerformAudioPassThru.</description>
- <element name="PCM" />
-</enum>
-
-<enum name="KeyboardLayout">
- <description>Enumeration listing possible keyboard layouts.</description>
- <element name="QWERTY" />
- <element name="QWERTZ" />
- <element name="AZERTY" />
-</enum>
-
-<enum name="KeyboardEvent">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="KEYPRESS" />
- <element name="ENTRY_SUBMITTED" />
- <element name="ENTRY_CANCELLED" />
- <element name="ENTRY_ABORTED" />
-</enum>
-
-<enum name="KeypressMode">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="SINGLE_KEYPRESS">
- <description>Each keypress is individually sent as the user presses the keyboard keys.</description>
- </element>
- <element name="QUEUE_KEYPRESSES">
- <description>The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.</description>
- </element>
- <element name="RESEND_CURRENT_ENTRY">
- <description>The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.</description>
- </element>
-</enum>
-
-<enum name="AmbientLightStatus">
- <description>Reflects the status of the ambient light sensor.</description>
- <element name="NIGHT" />
- <element name="TWILIGHT_1" />
- <element name="TWILIGHT_2" />
- <element name="TWILIGHT_3" />
- <element name="TWILIGHT_4" />
- <element name="DAY" />
- <element name="UNKNOWN" />
- <element name="INVALID" />
-</enum>
-
-<enum name="FileType">
- <description>Enumeration listing possible file types.</description>
- <element name="GRAPHIC_BMP" />
- <element name="GRAPHIC_JPEG" />
- <element name="GRAPHIC_PNG" />
- <element name="AUDIO_WAVE" />
- <element name="AUDIO_MP3" />
- <element name="AUDIO_AAC" />
- <element name="BINARY" />
- <element name="JSON" />
-</enum>
-
-<enum name="RequestType">
- <description>Enumeration listing possible asynchronous requests.</description>
- <element name="HTTP" />
- <element name="FILE_RESUME" />
- <element name="AUTH_REQUEST" />
- <element name="AUTH_CHALLENGE" />
- <element name="AUTH_ACK" />
- </enum>
-
-<enum name="ECallConfirmationStatus">
- <description>Reflects the status of the eCall Notification.</description>
- <element name="NORMAL" internal_name="ECCS_NORMAL">
- </element>
- <element name="CALL_IN_PROGRESS" internal_name="ECCS_CALL_IN_PROGRESS">
- </element>
- <element name="CALL_CANCELLED" internal_name="ECCS_CALL_CANCELLED">
- </element>
- <element name="CALL_COMPLETED">
- </element>
- <element name="CALL_UNSUCCESSFUL" internal_name="ECCS_CALL_UNSUCCESSFUL">
- </element>
- <element name="ECALL_CONFIGURED_OFF" internal_name="ECCS_ECALL_CONFIGURED_OFF">
- </element>
- <element name="CALL_COMPLETE_DTMF_TIMEOUT" internal_name="ECCS_CALL_COMPLETE_DTMF_TIMEOUT">
- </element>
-</enum>
-
-<enum name="VehicleDataNotificationStatus">
- <description>Reflects the status of a vehicle data notification.</description>
- <element name="NOT_SUPPORTED" internal_name="VDNS_NOT_SUPPORTED">
- </element>
- <element name="NORMAL" internal_name="VDNS_NORMAL">
- </element>
- <element name="ACTIVE" internal_name="VDNS_ACTIVE">
- </element>
- <element name="NOT_USED" internal_name="VDNS_NOT_USED">
- </element>
-</enum>
-
-<enum name="EmergencyEventType">
- <description>Reflects the emergency event status of the vehicle.</description>
- <element name="NO_EVENT" internal_name="EET_NO_EVENT">
- </element>
- <element name="FRONTAL" internal_name="EET_FRONTAL">
- </element>
- <element name="SIDE" internal_name="EET_SIDE">
- </element>
- <element name="REAR" internal_name="EET_REAR">
- </element>
- <element name="ROLLOVER" internal_name="EET_ROLLOVER">
- </element>
- <element name="NOT_SUPPORTED" internal_name="EET_NOT_SUPPORTED">
- </element>
- <element name="FAULT" internal_name="EET_FAULT">
- </element>
-</enum>
-
-<enum name="FuelCutoffStatus">
- <description>Reflects the status of the RCM fuel cutoff.</description>
- <element name="TERMINATE_FUEL" internal_name="FCS_TERMINATE_FUEL">
- </element>
- <element name="NORMAL_OPERATION" internal_name="FCS_NORMAL_OPERATION">
- </element>
- <element name="FAULT" internal_name="FCS_FAULT">
- </element>
-</enum>
-
-<enum name="PowerModeQualificationStatus">
- <description>Reflects the status of the current power mode qualification.</description>
- <element name="POWER_MODE_UNDEFINED">
- </element>
- <element name="POWER_MODE_EVALUATION_IN_PROGRESS">
- </element>
- <element name="NOT_DEFINED">
- </element>
- <element name="POWER_MODE_OK">
- </element>
-</enum>
-
-<enum name="CarModeStatus">
- <description>Reflects the status of the current car mode.</description>
- <element name="NORMAL" internal_name="CMS_NORMAL">
- </element>
- <element name="FACTORY" internal_name="CMS_FACTORY">
- </element>
- <element name="TRANSPORT" internal_name="CMS_TRANSPORT">
- </element>
- <element name="CRASH" internal_name="CMS_CRASH">
- </element>
-</enum>
-
-<enum name="PowerModeStatus">
- <description>Reflects the status of the current power mode.</description>
- <element name="KEY_OUT">
- </element>
- <element name="KEY_RECENTLY_OUT">
- </element>
- <element name="KEY_APPROVED_0">
- </element>
- <element name="POST_ACCESORY_0">
- </element>
- <element name="ACCESORY_1">
- </element>
- <element name="POST_IGNITION_1">
- </element>
- <element name="IGNITION_ON_2">
- </element>
- <element name="RUNNING_2">
- </element>
- <element name="CRANK_3">
- </element>
-</enum>
-
-<!-- End of IVI part-->
-
-<struct name="ButtonCapabilities">
- <description>Contains the information about capabilities of a button.</description>
- <param name="name" type="Common.ButtonName" mandatory="true">
- <description>The name of the Button from the ButtonName enum</description>
- </param>
- <param name="shortPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a short press. Whenever the button is pressed short, onButtonPressed(SHORT) should be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a LONG press. Whenever the button is pressed long, onButtonPressed(LONG) should be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean" mandatory="true">
- <description>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent(DOWN) should be invoked. Whenever the button is released, onButtonEvent(UP) should be invoked.</description>
- </param>
-</struct>
-
-<struct name="VehicleDataResult">
- <description>Individual published data request result</description>
- <param name="dataType" type="Common.VehicleDataType">
- <description>Defined published data element type.</description>
- </param>
- <param name="resultCode" type="Common.VehicleDataResultCode">
- <description>Published data result code.</description>
- </param>
-</struct>
-
-<struct name="TouchCoord">
- <param name="x" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The x coordinate of the touch.</description>
- </param>
- <param name="y" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The y coordinate of the touch.</description>
- </param>
-</struct>
-
-<struct name="TouchEvent">
- <param name="id" type="Integer" mandatory="true" minvalue="0" maxvalue="9">
- <description>
- A touch's unique identifier. The application can track the current touch events by id.
- If a touch event has type begin, the id should be added to the set of touches.
- If a touch event has type end, the id should be removed from the set of touches.
- </description>
- </param>
- <param name="ts" type="Integer" mandatory="true" array="true" minvalue="0" maxvalue="2147483647" minsize="1" maxsize="1000">
- <description>
- The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds.
- The timestamp is used to determined the rate of change of position of a touch.
- The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user.
- If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array.
- </description>
- </param>
- <param name="c" type="Common.TouchCoord" mandatory="true" array="true" minsize="1" maxsize="1000">
- </param>
-</struct>
-
-<struct name="PresetBankCapabilities">
- <description>Contains information about on-screen preset capabilities (whether the HW preset buttons could be duplicated with onscreen buttons).</description>
- <param name="onScreenPresetsAvailable" type="Boolean" mandatory="true">
- <description>Must be true if onscreen custom presets are available.</description>
- </param>
-</struct>
-
-<struct name="Image">
- <param name="value" maxlength="65535" type="String" mandatory="true">
- <description>The path to the dynamic image stored on HU or the static binary image itself.</description>
- </param>
- <param name="imageType" type="Common.ImageType" mandatory="true">
- <description>Describes, whether it is a static or dynamic image.</description>
- </param>
-</struct>
-
-<struct name="SoftButton">
- <param name="type" type="Common.SoftButtonType" mandatory="true">
- <description>Describes, whether text, icon or both text and image should be displayed on the soft button. See softButtonType</description>
- </param>
- <param name="text" maxlength="500" type="String" mandatory="false">
- <description>Optional text to be displayed (if defined as TEXT or BOTH)</description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description>Optional image struct for SoftButton (if defined as IMAGE or BOTH)</description>
- </param>
- <param name="isHighlighted" type="Boolean" mandatory="false">
- <description>If true, must be highlighted</description>
- <description>If false, must be not</description>
- </param>
- <param name="softButtonID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Value which must be returned via OnButtonPress / OnButtonEvent</description>
- </param>
- <param name="systemAction" type="Common.SystemAction" mandatory="false">
- <description>Parameter indicates whether clicking a SoftButton must call a specific system action. See SystemAction</description>
- </param>
- </struct>
-
-<struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to be spoken</description>
- <param name="text" type="String" mandatory="true" maxlength="500">
- <description>The text or phonemes to be spoken.</description>
- </param>
- <param name="type" type="Common.SpeechCapabilities" mandatory="true">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities.</description>
- </param>
-</struct>
-
-<struct name="HMIApplication">
- <description>Data type containing information about application needed by HMI.</description>
- <param name="appName" type="String" maxlength="100" mandatory="true">
- <description>The mobile application name, e.g. "Ford Drive Green".</description>
- </param>
- <param name="ngnMediaScreenAppName" type="String" maxlength="100" mandatory="false">
- <description>Provides an abbreviated version of the app name (if needed), that may be displayed on the NGN media screen.</description>
- <description>If not provided, the appName should be used instead (and may be truncated if too long)</description>
- </param>
- <param name="icon" type="String" mandatory="false">
- <description>Path to application icon stored on HU.</description>
- </param>
- <param name="deviceName" type="String" mandatory="true">
- <description>The name of device which the provided application is running on.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Unique (during ignition cycle) id of the application. To be used in all RPCs sent by both HU system and SDL</description>
- </param>
- <param name="hmiDisplayLanguageDesired" type="Common.Language" mandatory="true">
- <description>The language the application intends to use on HU </description>
- </param>
- <param name="isMediaApplication" type="Boolean" mandatory="true">
- <description>Indicates whether it is a media or a non-media application.</description>
- </param>
- <param name="appType" type="Common.AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>List of all applicable app types stating which classifications to be given to the app.</description>
- <description>e.g. for platforms like GEN2, this determines which "corner(s)" the app can populate.</description>
- </param>
-</struct>
-
-<struct name="MenuParams">
- <param name="parentID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>unique ID of the sub menu, the command must be added to.</description>
- <description>If not provided, the command must be added to the top level of the in application menu.</description>
- </param>
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
- <description>Position within the items that are at the top level of the in application menu.</description>
- <description>0 should insert at the front.</description>
- <description>1 should insert at the second position.</description>
- <description>if position is greater than or equal to the number of items on the top level, the the sub menu/command should be appended to the end.</description>
- <description>If this param is omitted the entry should be added at the end.</description>
- </param>
- <param name="menuName" type="String" maxlength="500" mandatory="true">
- <description>The name of the sub menu/command.</description>
- </param>
-</struct>
-
-<struct name="Choice">
- <description>A choice is an option given to the user which can be selected either by menu, or through voice recognition system.</description>
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description> The unique within the concerned application identifier for this choice </description>
- </param>
- <param name="menuName" type="String" maxlength="500" mandatory="false">
- <description> The name of the choice </description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description> The image for representing the choice </description>
- </param>
- <param name="secondaryText" maxlength="500" type="String" mandatory="false">
- <description>Optional secondary text to display; e.g. address of POI in a search result entry</description>
- </param>
- <param name="tertiaryText" maxlength="500" type="String" mandatory="false">
- <description>Optional tertiary text to display; e.g. distance to POI for a search result entry</description>
- </param>
- <param name="secondaryImage" type="Image" mandatory="false">
- <description>Optional secondary image struct for choice</description>
- </param>
-</struct>
-
-<struct name="VrHelpItem">
- <param name="text" maxlength="500" type="String" mandatory="true">
- <description>Text to display for VR Help item</description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description>Image struct for VR Help item</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="100" mandatory="true">
- <description>Position to display item in VR Help list</description>
- </param>
-</struct>
-
-<struct name="TimeFormat">
- <param name="hours" type="Integer" minvalue="0" maxvalue="59" mandatory="true">
- <description>The hour of the media clock.</description>
- <description>Some units only support a max of 19 hours. If out of range, it should be rejected.</description>
- </param>
- <param name="minutes" type="Integer" minvalue="0" maxvalue="59" mandatory="true"/>
- <param name="seconds" type="Integer" minvalue="0" maxvalue="59" mandatory="true"/>
-</struct>
-
-<struct name="TouchEventCapabilities">
- <param name="pressAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="multiTouchAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="doublePressAvailable" type="Boolean" mandatory="true">
- </param>
-</struct>
-
-<struct name="ImageResolution">
- <param name="resolutionWidth" type="Integer" minvalue="1" maxvalue="10000" mandatory="true">
- <description>The image resolution width.</description>
- </param>
- <param name="resolutionHeight" type="Integer" minvalue="1" maxvalue="10000" mandatory="true">
- <description>The image resolution height.</description>
- </param>
-</struct>
-
-<struct name="ScreenParams">
- <param name="resolution" type="Common.ImageResolution" mandatory="true">
- <description>The resolution of the prescribed screen area.</description>
- </param>
- <param name="touchEventAvailable" type="Common.TouchEventCapabilities" mandatory="false">
- <description>Types of screen touch events available in screen area.</description>
- </param>
-</struct>
-
-<struct name="ImageField">
- <param name="name" type="Common.ImageFieldName" mandatory="true">
- <description>The name that identifies the field. See ImageFieldName.</description>
- </param>
- <param name="imageTypeSupported" type="Common.FileType" maxsize="100" array="true" mandatory="false" minsize="1">
- <description>The image types that are supported in this field. See FileType.</description>
- </param>
- <param name="imageResolution" type="Common.ImageResolution" mandatory="false">
- <description>The image resolution of this field.</description>
- </param>
-</struct>
-
-<struct name="DisplayCapabilities">
- <description>Contains information about the display capabilities.</description>
- <param name="displayType" type="Common.DisplayType" mandatory="true">
- <description>The type of the display. See DisplayType</description>
- </param>
- <param name="textFields" type="Common.TextFieldName" minsize="0" maxsize="100" array="true" mandatory="true">
- <description>A set of all fields for text displaying supported by HU. See TextFieldName.</description>
- <description>If there are no textfields supported, the empty array must be returned</description>
- </param>
- <param name="imageFields" type="Common.ImageField" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>A set of all fields that support images. See ImageField</description>
- </param>
- <param name="mediaClockFormats" type="Common.MediaClockFormat" minsize="1" maxsize="100" array="true" mandatory="true">
- <description>A set of all supported formats of the media clock. See MediaClockFormat</description>
- </param>
- <param name="imageCapabilities" type="Common.ImageType" array="true" minsize="0" maxsize="2" mandatory="false">
- </param>
- <param name="graphicSupported" type="Boolean" mandatory="true">
- <description>The display's persistent screen supports referencing a static or dynamic image.</description>
- </param>
- <param name="templatesAvailable" type="String" minsize="0" maxsize="100" maxlength="100" array="true" mandatory="true">
- <description>A set of all predefined persistent display templates available on headunit. To be referenced in SetDisplayLayout.</description>
- </param>
- <param name="screenParams" type="Common.ScreenParams" mandatory="false">
- <description>A set of all parameters related to a prescribed screen area (e.g. for video / touch input).</description>
- </param>
- <param name="numCustomPresetsAvailable" type="Integer" minvalue="1" maxvalue="100" mandatory="false">
- <description>The number of on-screen custom presets available (if any); otherwise omitted.</description>
- </param>
-</struct>
-
-<struct name="SoftButtonCapabilities">
- <description>Contains information about a SoftButton's capabilities.</description>
- <param name="shortPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a short press.</description>
- <description>Whenever the button is pressed short, onButtonPressed( SHORT) must be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a LONG press.</description>
- <description>Whenever the button is pressed long, onButtonPressed( LONG) must be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean" mandatory="true">
- <description>The button supports "button down" and "button up".</description>
- <description>Whenever the button is pressed, onButtonEvent( DOWN) must be invoked.</description>
- <description>Whenever the button is released, onButtonEvent( UP) must be invoked.</description>
- </param>
- <param name="imageSupported" type="Boolean" mandatory="true">
- <description>Must be true if the button supports referencing a static or dynamic image.</description>
- </param>
-</struct>
-
-<struct name="AudioPassThruCapabilities">
- <description>
- Describes different audio type configurations for PerformAudioPassThru.
- e.g. 8kHz,8-bit,PCM
- </description>
- <param name="samplingRate" type="Common.SamplingRate" mandatory="true"/>
- <param name="bitsPerSample" type="Common.BitsPerSample" mandatory="true"/>
- <param name="audioType" type="Common.AudioType" mandatory="true"/>
-</struct>
-
-<struct name="Coordinate">
- <param name="xCoord" type="Integer" mandatory="true">
- </param>
- <param name="yCoord" type="Integer" mandatory="true">
- </param>
-</struct>
-
-<struct name="TextFieldStruct">
- <param name="fieldName" type="Common.TextFieldName" mandatory="true">
- <description>The name of the field for displaying the text.</description>
- </param>
- <param name="fieldText" type="String" maxlength="500" mandatory="true">
- <description>The text itself.</description>
- </param>
-</struct>
-
-<struct name="KeyboardProperties">
- <description>Configuration of on-screen keyboard (if available).</description>
- <param name="language" type="Common.Language" mandatory="false">
- <description>The keyboard language.</description>
- </param>
- <param name="keyboardLayout" type="Common.KeyboardLayout" mandatory="false" >
- <description>Desired keyboard layout.</description>
- </param>
- <param name="keypressMode" type="Common.KeypressMode" mandatory="false" >
- <description>
- Desired keypress mode.
- If omitted, this value will be set to RESEND_CURRENT_ENTRY.
- </description>
- </param>
- <param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Array of keyboard characters to enable.</description>
- <description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
- </param>
- <param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
- <description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
-</struct>
-
-<struct name="Turn">
- <param name="navigationText" type="Common.TextFieldStruct" mandatory="false">
- <description>Uses navigationText from TextFieldStruct.</description>
- </param>
- <param name="turnIcon" type="Common.Image" mandatory="false">
- </param>
-</struct>
-
-<struct name="VehicleType">
- <param name="make" type="String" maxlength="500" mandatory="false">
- <description>Make of the vehicle</description>
- <description>e.g. Ford</description>
- </param>
- <param name="model" type="String" maxlength="500" mandatory="false">
- <description>Model of the vehicle</description>
- <description>e.g. Fiesta</description>
- </param>
- <param name="modelYear" type="String" maxlength="500" mandatory="false">
- <description>Model Year of the vehicle</description>
- <description>e.g. 2013</description>
- </param>
- <param name="trim" type="String" maxlength="500" mandatory="false">
- <description>Trim of the vehicle</description>
- <description>e.g. SE</description>
- </param>
-</struct>
-
-<struct name="DeviceInfo">
- <param name="name" type="String" mandatory="true">
- <description>The name of the device connected.</description>
- </param>
- <param name="id" type="Integer" mandatory="true">
- <description>The ID of the device connected</description>
- </param>
-</struct>
-
-<!--IVI part-->
-<struct name="GPSData">
- <description>Struct with the GPS data.</description>
- <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="false">
- </param>
- <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="false">
- </param>
- <param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100" mandatory="false">
- <description>The current UTC year.</description>
- </param>
- <param name="utcMonth" type="Integer" minvalue="1" maxvalue="12" mandatory="false">
- <description>The current UTC month.</description>
- </param>
- <param name="utcDay" type="Integer" minvalue="1" maxvalue="31" mandatory="false">
- <description>The current UTC day.</description>
- </param>
- <param name="utcHours" type="Integer" minvalue="0" maxvalue="23" mandatory="false">
- <description>The current UTC hour.</description>
- </param>
- <param name="utcMinutes" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC minute.</description>
- </param>
- <param name="utcSeconds" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC second.</description>
- </param>
- <param name="compassDirection" type="Common.CompassDirection" mandatory="false">
- <description>See CompassDirection.</description>
- </param>
- <param name="pdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>PDOP.</description>
- </param>
- <param name="hdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>HDOP.</description>
- </param>
- <param name="vdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>VDOP.</description>
- </param>
- <param name="actual" type="Boolean" mandatory="false">
- <description>
- True, if actual.
- False, if infered.
- </description>
- </param>
- <param name="satellites" type="Integer" minvalue="0" maxvalue="31" mandatory="false">
- <description>Number of satellites in view</description>
- </param>
- <param name="dimension" type="Common.Dimension" mandatory="false">
- <description>See Dimension</description>
- </param>
- <param name="altitude" type="Float" minvalue="-10000" maxvalue="10000" mandatory="false">
- <description>Altitude in meters</description>
- </param>
- <param name="heading" type="Float" minvalue="0" maxvalue="359.99" mandatory="false">
- <description>The heading. North is 0. Resolution is 0.01</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="false">
- <description>The speed in KPH</description>
- </param>
-</struct>
-
-<struct name="SingleTireStatus">
- <param name="status" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The status of component volume. See ComponentVolumeStatus.</description>
-</param>
-</struct>
-
-<struct name="DIDResult">
- <description>Individual requested DID result and data</description>
- <param name="resultCode" type="Common.VehicleDataResultCode" mandatory="true">
- <description>Individual DID result code.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Location of raw data (the address from ReadDID request)</description>
- </param>
- <param name="data" type="String" maxlength="5000" mandatory="false">
- <description>Raw DID-based data returned for requested element.</description>
- </param>
-</struct>
-
-<struct name="HeadLampStatus">
- <param name="lowBeamsOn" type="Boolean" mandatory="true">
- <description>Status of the low beam lamps.</description>
- </param>
- <param name="highBeamsOn" type="Boolean" mandatory="true">
- <description>Status of the high beam lamps.</description>
- </param>
- <param name="ambientLightSensorStatus" type="Common.AmbientLightStatus" mandatory="true">
- <description>Status of the ambient light sensor.</description>
- </param>
-</struct>
-
-<struct name="TireStatus">
- <description>The status and pressure of the tires.</description>
- <param name="pressureTelltale" type="Common.WarningLightStatus" mandatory="false">
- <description>Status of the Tire Pressure Telltale. See WarningLightStatus.</description>
- </param>
- <param name="leftFront" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the left front tire.</description>
- </param>
- <param name="rightFront" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the right front tire.</description>
- </param>
- <param name="leftRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the left rear tire.</description>
- </param>
- <param name="rightRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the right rear tire.</description>
- </param>
- <param name="innerLeftRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the inner left rear.</description>
- </param>
- <param name="innerRightRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the inner right rear.</description>
- </param>
-</struct>
-
-<struct name="BeltStatus">
- <param name="driverBeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="driverBuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerChildDetected" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRearInflatableBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRearInflatableBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
-</struct>
-
-<struct name="BodyInformation">
- <param name="parkBrakeActive" type="Boolean" mandatory="true">
- <description>Must be true if the park brake is active</description>
- </param>
- <param name="ignitionStableStatus" type="Common.IgnitionStableStatus" mandatory="true">
- <description>Information about the ignition switch. See IgnitionStableStatus.</description>
- </param>
- <param name="ignitionStatus" type="Common.IgnitionStatus" mandatory="true">
- <description>The status of the ignition. See IgnitionStatus.</description>
- </param>
- <param name="driverDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatDrv_B_Actl".</description>
- </param>
- <param name="passengerDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatPsngr_B_Actl".</description>
- </param>
- <param name="rearLeftDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRl_B_Actl".</description>
- </param>
- <param name="rearRightDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRr_B_Actl".</description>
- </param>
-</struct>
-
-<struct name="DeviceStatus">
- <param name="voiceRecOn" type="Boolean" mandatory="false">
- <description>Must be true if the voice recording is on.</description>
- </param>
- <param name="btIconOn" type="Boolean" mandatory="false">
- <description>Must be true if Bluetooth icon is displayed.</description>
- </param>
- <param name="callActive" type="Boolean" mandatory="false">
- <description>Must be true if there is an active call..</description>
- </param>
- <param name="phoneRoaming" type="Boolean" mandatory="false">
- <description>Must be true if ther is a phone roaming.</description>
- </param>
- <param name="textMsgAvailable" type="Boolean" mandatory="false">
- <description>Must be true if the text message is available.</description>
- </param>
- <param name="battLevelStatus" type="Common.DeviceLevelStatus" mandatory="false">
- <description>Device battery level status. See DeviceLevelStatus.</description>
- </param>
- <param name="stereoAudioOutputMuted" type="Boolean" mandatory="false">
- <description>Must be true if stereo audio output is muted.</description>
- </param>
- <param name="monoAudioOutputMuted" type="Boolean" mandatory="false">
- <description>Must be true if mono audio output is muted.</description>
- </param>
- <param name="signalLevelStatus" type="Common.DeviceLevelStatus" mandatory="false">
- <description>Device signal level status. See DeviceLevelStatus.</description>
- </param>
- <param name="primaryAudioSource" type="Common.PrimaryAudioSource" mandatory="false">
- <description>See PrimaryAudioSource.</description>
- </param>
- <param name="eCallEventActive" type="Boolean" mandatory="false">
- <description>Must be true if emergency call event is active.</description>
- </param>
-</struct>
-
-<struct name="ECallInfo">
- <param name="eCallNotificationStatus" type="Common.VehicleDataNotificationStatus">
- <description>References signal "eCallNotification_4A". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="auxECallNotificationStatus" type="Common.VehicleDataNotificationStatus">
- <description>References signal "eCallNotification". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="eCallConfirmationStatus" type="Common.ECallConfirmationStatus">
- <description>References signal "eCallConfirmation". See ECallConfirmationStatus.</description>
- </param>
-</struct>
-
-<struct name="AirbagStatus">
- <param name="driverAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverSideAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsDrvSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverCurtainAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsDrvCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsPasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerCurtainAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsPasCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverKneeAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsKneeDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerSideAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsPasSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerKneeAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsKneePasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
-</struct>
-
-<struct name="EmergencyEvent">
- <param name="emergencyEventType" type="Common.EmergencyEventType">
- <description>References signal "VedsEvntType_D_Ltchd". See EmergencyEventType.</description>
- </param>
- <param name="fuelCutoffStatus" type="Common.FuelCutoffStatus">
- <description>References signal "RCM_FuelCutoff". See FuelCutoffStatus.</description>
- </param>
- <param name="rolloverEvent" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsEvntRoll_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="maximumChangeVelocity" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsMaxDeltaV_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="multipleEvents" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsMultiEvnt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
-</struct>
-
-<struct name="ClusterModeStatus">
- <param name="powerModeActive" type="Boolean">
- <description>References signal "PowerMode_UB".</description>
- </param>
- <param name="powerModeQualificationStatus" type="Common.PowerModeQualificationStatus">
- <description>References signal "PowerModeQF". See PowerModeQualificationStatus.</description>
- </param>
- <param name="carModeStatus" type="Common.CarModeStatus">
- <description>References signal "CarMode". See CarMode.</description>
- </param>
- <param name="powerModeStatus" type="Common.PowerModeStatus">
- <description>References signal "PowerMode". See PowerMode.</description>
- </param>
-</struct>
-
-<struct name="MyKey">
- <param name="e911Override" type="Common.VehicleDataStatus" mandatory="true">
- <description>Indicates whether e911 override is on. See VehicleDataStatus.</description>
- </param>
-</struct>
-<!--end of IVI part-->
-
-</interface>
-
-<interface name="Buttons" version="1.0" date="2013-04-12">
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system start-up. SDL requests the information about all supported hardware buttons and their capabilities</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="capabilities" type="Common.ButtonCapabilities" array="true" minsize="1" maxsize="100" mandatory="true">
- <description>Response must provide the names of available buttons and their capabilities.See ButtonCapabilities</description>
- </param>
- <param name="presetBankCapabilities" type="Common.PresetBankCapabilities" mandatory="false">
- <description>Must be returned if the platform supports custom on-screen Presets</description>
- </param>
- </function>
- <function name="OnButtonEvent" messagetype="notification">
- <description>HU system must notify about every UP/DOWN event for buttons</description>
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="mode" type="Common.ButtonEventMode" mandatory="true">
- <description>Indicates whether this is an UP or DOWN event.</description>
- </param>
- <param name="customButtonID" type="Integer" mandatory="false" minvalue="0" maxvalue="65536">
- <description>Must be provided if ButtonName is CUSTOM_BUTTON, this references the integer ID passed by a custom button. (e.g. softButtonName)</description>
- </param>
- </function>
- <function name="OnButtonPress" messagetype="notification">
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="mode" type="Common.ButtonPressMode" mandatory="true">
- <description>Indicates whether this is a LONG or SHORT button press event.</description>
- </param>
- <param name="customButtonID" type="Integer" mandatory="false" minvalue="0" maxvalue="65536">
- <description>Must be returned if ButtonName is CUSTOM_BUTTON, this references the string passed by a custom button. (e.g. softButtonName)</description>
- </param>
- </function>
-</interface>
-
-<interface name="BasicCommunication" version="1.0" date="2013-04-12">
- <function name="OnReady" messagetype="notification">
- <description>HMI must notify SDL about its readiness to start communication. In fact, this has to be the first message between SDL and HMI.</description>
- </function>
- <function name="OnStartDeviceDiscovery" messagetype="notification">
- <description>Initiated by HMI user for getting the list of connected devices.</description>
- </function>
- <function name="UpdateDeviceList" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change device list.</description>
- <param name="deviceList" type="Common.DeviceInfo" mandatory="true" array="true" minsize="0" maxsize="100">
- <description>The array of names/IDs of connected devices</description>
- </param>
- </function>
- <function name="UpdateDeviceList" messagetype="response">
- </function>
- <function name="OnUpdateDeviceList" messagetype="notification">
- <description>Notification from HMI to SDL sent when HMI requires update of device list (i.e. when user clicks 'Change Device' button)</description>
- </function>
- <function name="AllowDeviceToConnect" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get the permissions of new device connection.</description>
- <param name="device" type="Common.DeviceInfo" mandatory="true"/>
- </function>
- <function name="AllowDeviceToConnect" messagetype="response">
- <param name="allow" type="Boolean" mandatory="true"/>
- </function>
- <function name="OnDeviceChosen" messagetype="notification">
- <description>Notification must be initiated by HMI on user selecting device in the list of devices.</description>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="true">
- <description>The name and ID of the device chosen</description>
- </param>
- </function>
- <function name="OnFindApplications" messagetype="notification">
- <description>This method must be invoked by HMI to get list of registered apps.</description>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="false">
- <description>The name and ID of the device the list of registered applications is required for.</description>
- </param>
- </function>
- <function name="UpdateAppList" messagetype="request">
- <description>Issued by SDL to notify HMI about new applications registered.</description>
- <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="1" maxsize="100"/>
- </function>
- <function name="UpdateAppList" messagetype="response">
- </function>
- <function name="ActivateApp" messagetype="request">
- <description>Request from SDL to HMI to bring specified application to front on UI e.g make it HMI status 'FULL'.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of deactivated application.</description>
- </param>
- </function>
- <function name="ActivateApp" messagetype="response">
- </function>
- <function name="OnAppActivated" messagetype="notification">
- <description>Must be sent by HU system when the user clicks on app in the list of registered apps or on soft button with 'STEAL_FOCUS' action.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of selected application.</description>
- </param>
- </function>
- <function name="OnAppDeactivated" messagetype="notification">
- <description>Must be sent by HU system when the user switches to any functionality which is not other mobile application.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of deactivated application.</description>
- </param>
- <param name="reason" type="Common.DeactivateReason" mandatory="true">
- <description>Specifies the functionality the user has switched to.</description>
- </param>
- </function>
- <function name="OnAppRegistered" messagetype="notification">
- <description>Issued by SDL to notify HMI about new application registered.</description>
- <param name="application" type="Common.HMIApplication" mandatory="true">
- <description>The information about application registered. See HMIApplication. </description>
- </param>
- <param name="ttsName" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description> TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
- Needs to be unique over all applications.
- May not be empty.
- May not start with a new line character.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- </description>
- </param>
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Defines additional voice recognition commands.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- </description>
- </param>
- </function>
- <function name="OnAppUnregistered" messagetype="notification">
- <description>Issued by SDL to notify HMI about application unregistered. Application then to be removed from application list; all data connected with application has to be cleared up.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application unregistered</description>
- </param>
- </function>
- <function name="OnExitApplication" messagetype="notification">
- <description>Must be sent by HMI when the User chooses to exit the application..</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application to be exited.</description>
- </param>
- </function>
- <function name="OnExitAllApplications" messagetype="notification">
- <description>Sent by HMI to SDL to close all registered applications.</description>
- <param name="reason" type="Common.ApplicationsCloseReason" mandatory="true">
- <description>Specifies reason for exiting all apllications.</description>
- </param>
- </function>
- <function name="MixingAudioSupported" messagetype="request">
- <description>Request from SDL to HMI to find out if the last one supports mixing audio (i.e. recording TTS command and playing audio).</description>
- </function>
- <function name="MixingAudioSupported" messagetype="response">
- <description>If no response received SDL supposes that mixing audio is not supported</description>
- <param name="attenuatedSupported" type="Boolean" mandatory="true">
- <description>Must be true if supported</description>
- </param>
- </function>
- <function name="PlayTone" messagetype="notification">
- <description>Sent by SDL to HMI to notify that the tone should be played.</description>
- </function>
- <!-- Policies -->
- <function name="AllowAllApps" messagetype="request">
- <description>Initiated by SDL. Results by user/HMI allowing SDL functionality or disallowing access to all mobile apps.</description>
- </function>
- <function name="AllowAllApps" messagetype="response">
- <param name="allowed" type="Boolean" mandatory="true">
- <description>Must be true if allowed</description>
- </param>
- </function>
- <function name="AllowApp" messagetype="request">
- <description>Initiated by SDL for requesting the allowance for the application</description>
- <param name="app" type="Common.HMIApplication" mandatory="true">
- <description>Information about the application. See HMIApplication. </description>
- </param>
- <param name="appPermissions" type="String" array="true" minsize="1" maxsize="100" mandatory="false">
- <description>List of permissions required by application.</description>
- </param>
- </function>
- <function name="AllowApp" messagetype="response">
- <param name="allowed" type="Boolean" mandatory="true">
- <description>Must be true if allowed</description>
- </param>
- </function>
- <function name="OnSystemRequest" messagetype="notification" >
- <description>
- An asynchronous request from the system for specific data from the device or the cloud or response to a request from the device or cloud
- Binary data can be included in hybrid part of message for some requests (such as Authentication request responses)
- </description>
- <param name="requestType" type="Common.RequestType" mandatory="true">
- <description>The type of system request.</description>
- </param>
- <param name="url" type="String" maxlength="1000" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Optional array of URL(s) for HTTP requests.</description>
- </param>
- <param name="fileType" type="Common.FileType" mandatory="false">
- <description>Optional file type (meant for HTTP file requests).</description>
- </param>
- <param name="offset" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional offset in bytes for resuming partial data chunks</description>
- </param>
- <param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional length in bytes for resuming partial data chunks</description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="65535" mandatory="false">
- </param>
- </function>
- <function name="OnSDLClose" messagetype="notification">
- <description>SDL must notify HMI about finish working application</description>
- </function>
-</interface>
-
-<interface name="VR" version="1.0" date="2013-04-17">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response provides information about presence of VR module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if VR is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="Started" messagetype="notification">
- <description>Must be initiated by VR module to let SDL know that VR session has started.</description>
- </function>
- <function name="Stopped" messagetype="notification">
- <description>Must be initiated by VR module to let SDL know that VR session has stopped.</description>
- </function>
- <function name="AddCommand" messagetype="request">
- <description>Request from SDL to add a command(string with associated id) to VR.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of a command (further to be used in OnCommand notification).</description>
- </param>
- <param name="vrCommands" type="String" mandatory="true" maxlength="99" minsize="1" maxsize="100" array="true">
- <description>List of strings to be used as VR commands.</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- </function>
- <function name="DeleteCommand" messagetype="request">
- <description>Request from SDL to delete a command from VR.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>Id of a command (list of strings), previously sent by AddCommand.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- </function>
- <function name="OnCommand" messagetype="notification">
- <description>Notifies SDL about command trigerred via VR</description>
- <param name="cmdID" type="Integer" mandatory="true" minvalue="0" maxvalue="2000000000">
- <description>ID of of the command (list of strings)</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change language of VR.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language VR has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request">
- <description>Method is invoked at system start-up. Response must provide the information about VR supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in VR.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get currently active VR language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system startup by SDL to request information about VR capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="vrCapabilities" type="Common.VrCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Types of input recognized by VR module.</description>
- </param>
- </function>
-</interface>
-
-<interface name="TTS" version="1.0" date="2013-04-18">
- <description>RPCs for communication between TTS and SDL.</description>
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system start-up. SDL requests the information about all supported hardware and their capabilities</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="speechCapabilities" type="Common.SpeechCapabilities" minsize="1" maxsize="5" array="true" mandatory="true">
- <description>See SpeechCapabilities</description>
- </param>
- <param name="prerecordedSpeechCapabilities" type="Common.PrerecordedSpeech" minsize="1" maxsize="5" array="true" mandatory="true">
- <description>See PrerecordedSpeech</description>
- </param>
- </function>
- <function name="Started" messagetype="notification">
- <description>Must be initiated by TTS module to let SDL know that TTS session has started.</description>
- </function>
- <function name="Stopped" messagetype="notification">
- <description>Must be initiated by TTS module to let SDL know that TTS session has stopped.</description>
- </function>
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system start-up. Response must provide the information about presence of TTS module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if TTS is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="request">
- <description>Sets some properties for the application initiated request.</description>
- <param name="helpPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>The help prompt. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.</description>
- </param>
- <param name="initialPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- This is the intial prompt spoken to the user at the start of an interaction.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="timeoutPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Help text for a wait timeout. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.</description>
- </param>
- <param name="timeout" type="Integer" mandatory="true">
- <description>Timeout initiate timeoutPrompt</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- </function>
- <function name="Speak" messagetype="request">
- <description>RPC from SDL to TTS for speaking the text.</description>
- <param name="ttsChunks" type="Common.TTSChunk" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of strings to be spoken.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="Speak" messagetype="response">
- <description>Provides information about success of operation.</description>
- </function>
- <function name="StopSpeaking" messagetype="request">
- <description>Initiated by SDL to stop speaking the text.</description>
- </function>
- <function name="StopSpeaking" messagetype="response">
- </function>
- <function name="ChangeRegistration" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change language of TTS.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language TTS has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request">
- <description>Method is invoked at system start-up by SDL. Response must provide the information about TTS supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in TTS.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get currently active TTS language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="SetGlobalProperties" messagetype="request">
- <description>Sets some properties for the application initiated request.</description>
- <param name="helpPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- The help prompt.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="timeoutPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- Help text for a wait timeout.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- </function>
-</interface>
-
-<interface name="UI" version="1.0" date="2013-04-16">
- <function name="Alert" messagetype="request">
- <description>Request from SDL to show an alert message on the display.</description>
- <param name="alertStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="3">
- <description>Array of lines of alert text fields. See TextFieldStruct. Uses alertText1, alertText2, alertText3.</description>
- </param>
- <param name="duration" type="Integer" mandatory="true" minvalue="3000" maxvalue="10000" defvalue="5000">
- <description>Timeout in milliseconds.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" mandatory="false" minsize="0" maxsize="4" array="true">
- <description>App defined SoftButtons</description>
- </param>
- <param name="progressIndicator" type="Boolean" mandatory="false">
- <description>If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="Alert" messagetype="response">
- <param name="tryAgainTime" type="Integer" mandatory="false" minvalue="0" maxvalue="2000000000">
- <description>Amount of time (in milliseconds) that SDL must wait before resending an alert. Must be provided if another system event or overlay currently has a higher priority than this alert.</description>
- </param>
- </function>
- <function name="ShowNotification" messagetype="notification">
- <description>Initiated by SDL in order to notify user about some actions, i.e. while waiting for updates from server etc.</description>
- <param name="text" type="Common.TextFieldStruct" mandatory="true"/>
- <param name="icon" type="Common.Image" mandatory="false"/>
- <param name="timeout" type="Integer" mandatory="true">
- <description>Pop-up is expected to be shown before time specified with timeout is up and then closed by HMI or closed upon ClosePopUp request from SDL.</description>
- </param>
- </function>
- <function name="Show" messagetype="request">
- <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="7">
- <description>Array of lines of show text fields. See TextFieldStruct. Uses mainField1, mainField2, mainField3, mainField4. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
- mainField1: The text that should be displayed in a single or upper display line.
- mainField2: The text that should be displayed on the second display line.
- mainField3: The text that should be displayed on the second "page" first display line.
- mainField4: The text that should be displayed on the second "page" second display line.
- statusBar: statusBar.
- mediaClock: Text value for MediaClock field.
- mediaTrack: The text that should be displayed in the track field. This field is only valid for media applications on NGN type ACMs.
- </description>
- </param>
- <param name="alignment" type="Common.TextAlignment" mandatory="false">
- <description>Specifies how mainField1 and mainField2 texts should be aligned on the display.</description>
- <description>If omitted, texts must be centered</description>
- </param>
- <param name="graphic" type="Common.Image" mandatory="false">
- <description>Path to optional dynamic image or the static binary image itself. See Image. If omitted, the displayed graphic should not change.</description>
- </param>
- <param name="secondaryGraphic" type="Common.Image" mandatory="false">
- <description>
- Image struct determining whether static or dynamic secondary image to display in app.
- If omitted on supported displays, the displayed secondary graphic shall not change.
- </description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App defined SoftButtons.</description>
- <description>If omitted, the currently displayed SoftButton values should not change.</description>
- </param>
- <param name="customPresets" type="String" maxlength="500" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App labeled on-screen presets (i.e. GEN3 media presets or dynamic search suggestions).</description>
- <description>If omitted on supported displays, the presets will be shown as not defined.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application related to this RPC.</description>
- </param>
- </function>
- <function name="Show" messagetype="response">
- </function>
- <function name="AddCommand" messagetype="request">
- <description>Request from SDL to add a command to the application menu.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of the command to be added.</description>
- </param>
- <param name="menuParams" type="Common.MenuParams" mandatory="false">
- <description>Optional sub value containing parameters of the command (position, name, etc.). See MenuParams. If omitted the command should be added to the end of the list of commands.</description>
- </param>
- <param name="cmdIcon" type="Common.Image" mandatory="false">
- <description>Image to be displayed for representing the command. See Image.</description>
- <description>If omitted, no (or the default if applicable) icon should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- </function>
- <function name="DeleteCommand" messagetype="request">
- <description>Request from SDL to delete a command from the in-application menu with the specified command id.</description>
- <param name="cmdID" type="Integer" mandatory="true" minvalue="0" maxvalue="2000000000">
- <description>cmdId previously sent via AddCommand request - id of the command to be deleted.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- </function>
- <function name="AddSubMenu" messagetype="request">
- <description>Request from SDL to add a sub menu to the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="true">
- <description>ID of the sub menu to be added. Unique for the application.</description>
- </param>
- <param name="menuParams" type="Common.MenuParams" mandatory="true">
- <description>Position and name of menu to be added. 'parent' field is omitted for this RPC. </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="AddSubMenu" messagetype="response">
- </function>
- <function name="DeleteSubMenu" messagetype="request">
- <description>Request from SDL to delete a submenu from the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="true" >
- <description>The "menuID" of the sub-menu to be deleted. (See addSubMenu.menuID)</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DeleteSubMenu" messagetype="response">
- </function>
- <function name="PerformInteraction" messagetype="request">
- <description>Request from SDL for triggering an interaction (e.g. "Permit GPS?" - Yes, no, Always Allow).</description>
- <param name="initialText" type="Common.TextFieldStruct" mandatory="true">
- <description>Uses initialInteractionText. See TextFieldStruct.</description>
- </param>
- <param name="choiceSet" type="Common.Choice" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>The list of choices to be used for the interaction with the user</description>
- </param>
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>VR Help Title text.</description>
- <description>If omitted on supported displays, the default HU system help title should be used.</description>
- </param>
- <param name="vrHelp" type="Common.VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>VR Help Items. If omitted on supported displays, the default HU system generated help items should be used.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="5000" maxvalue="100000" defvalue="10000" mandatory="true">
- <description>Timeout in milliseconds.</description>
- </param>
- <param name="interactionLayout" type="Common.LayoutMode" mandatory="false">
- <description>See LayoutMode.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>ID of the choice that was selected in response to PerformInteraction.</description>
- </param>
- <param name="manualTextEntry" type="String" maxlength="500" mandatory="false">
- <description>
- Manually entered text selection, e.g. through keyboard
- Can be returned in lieu of choiceID, depending on trigger source
- </description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="request">
- <description>Sets the initial media clock value and automatic update method.</description>
- <param name="startTime" type="Common.TimeFormat" mandatory="false">
- <description>startTime should be ignored for "PAUSE", "RESUME", and "CLEAR"</description>
- </param>
- <param name="endTime" type="Common.TimeFormat" mandatory="false">
- <description>
- See TimeFormat.
- endTime can be provided for "COUNTUP" and "COUNTDOWN"; to be used to calculate any visual progress bar (if not provided, this feature is ignored)
- If endTime is greater then startTime for COUNTDOWN or less than startTime for COUNTUP, then the request will return an INVALID_DATA.
- endTime will be ignored for "PAUSE", "RESUME", and "CLEAR"
- </description>
- </param>
- <param name="updateMode" type="Common.ClockUpdateMode" mandatory="true">
- <description>The update method of the media clock.</description>
- <description>In case of pause, resume, or clear, the start time value is ignored and shall be left out. For resume, the time continues with the same value as it was when paused.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="response">
- </function>
- <function name="SetGlobalProperties" messagetype="request">
- <description>Request from SDL to set some properties for VR help.</description>
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>VR Help Title text.</description>
- <description>If omitted on supported displays, the default HU system help title should be used.</description>
- </param>
- <param name="vrHelp" type="Common.VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>VR Help Items. If omitted on supported displays, the default HU system generated help items should be used.</description>
- </param>
- <param name="menuTitle" maxlength="500" type="String" mandatory="false">
- <description>Optional text to label an app menu button (for certain touchscreen platforms).</description>
- </param>
- <param name="menuIcon" type="Common.Image" mandatory="false">
- <description>>Optional icon to draw on an app menu button (for certain touchscreen platforms).</description>
- </param>
- <param name="keyboardProperties" type="Common.KeyboardProperties" mandatory="false">
- <description>On-screen keybaord configuration (if available).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- </function>
- <function name="OnCommand" messagetype="notification">
- <description>Notification must be initiated by HMI on user choosing menu item.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>Command ID, which is related to a specific menu entry (previously sent with AddCommand).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that is related to this RPC.</description>
- </param>
- </function>
- <function name="OnSystemContext" messagetype="notification">
- <description>Notification must be initiated by HMI when the user changes the context of application: goes to menu (in-application menu or system menu); switches to VR; pop-up appears on screen etc.</description>
- <param name="systemContext" type="Common.SystemContext" mandatory="true">
- <description>The context the application is brought into.</description>
- </param>
- </function>
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system startup by SDL to request information about UI capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="true">
- <description>Information about the capabilities of the display: its type, text field supported, etc. See DisplayCapabilities. </description>
- </param>
- <param name="audioPassThruCapabilities" type="Common.AudioPassThruCapabilities" mandatory="true"/>
- <param name="hmiZoneCapabilities" type="Common.HmiZoneCapabilities" mandatory="true"/>
- <param name="softButtonCapabilities" type="Common.SoftButtonCapabilities" mandatory="false">
- <description>Must be returned if the platform supports on-screen SoftButtons.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change language for app.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language UI has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request">
- <description>Method should be invoked at system startup. Response provides information about UI supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in UI.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get currently active UI language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="OnDriverDistraction" messagetype="notification">
- <description>Notification must be sent from HMI to SDL when driver distraction state is changed. Driver distraction rules are defined by the platform.</description>
- <param name="state" type="Common.DriverDistractionState" mandatory="true">
- <description>See DriverDistractionState. </description>
- </param>
- </function>
- <function name="SetAppIcon" messagetype="request">
- <description>Used to set existing local file on SYNC as the app's icon.</description>
- <param name="syncFileName" type="Common.Image" mandatory="true">
- <description>Either the path to the dynamic image stored on HY or the static binary image itself. See Image</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetAppIcon" messagetype="response">
- </function>
- <function name="SetDisplayLayout" messagetype="request">
- <param name="displayLayout" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined screen layouts are defined.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetDisplayLayout" messagetype="response">
- <param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="false">
- <description>See DisplayCapabilities</description>
- </param>
- <param name="buttonCapabilities" type="Common.ButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See ButtonCapabilities</description >
- </param>
- <param name="softButtonCapabilities" type="Common.SoftButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>If returned, the platform supports on-screen SoftButtons; see SoftButtonCapabilities.</description >
- </param>
- <param name="presetBankCapabilities" type="Common.PresetBankCapabilities" mandatory="false">
- <description>If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.</description >
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="request">
- <description>Used to show a custom form; it can be a parent or child screen. If no parent screen is designated, it is set as a parent screen.</description>
- <param name="customFormID" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined forms are defined.
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "KEYBOARD_SEARCH" - Custom template containing app-configured on-screen keyboard with active search updating; user also can trigger voice search.
- "NAV_FULLSCREEN_MAP" - Custom root template screen containing full screen map with navigation controls.
- "NAV_POI_MENU" - Custom template containing app-defined POI options.
- "NAV_SEARCH_RESULTS" - Custom template containing a list of app-defined search results
- "NAV_POI_INFO" - Custom template containing app-defined POI information (and potentially map data).
- </description>
- </param>
- <param name="parentFormID" type="String" maxlength="500" defvalue="DEFAULT" mandatory="false">
- <description>
- Parent screen of predefined form to display.
- Currently only predefined forms are defined.
- If not provided, then set to "DEFAULT".
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "NAV_FULLSCREEN_MAP" - Custom template containing full screen map with navigation controls.
- </description>
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="response">
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="ShowKeyboard" messagetype="request">
- <description>Configures and populates on-screen keyboard.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The keyboard language.</description>
- </param>
- <param name="keyboardLayout" type="Common.KeyboardLayout" mandatory="true" >
- <description>Desired keyboard layout.</description>
- </param>
- <param name="sendDynamicEntry" type="Boolean" mandatory="false">
- <description>In this mode, all keypresses will be sent as they occur.</description>
- <description>If disabled, entire string of text will be returned only once submitted by user.</description>
- <description>If omitted, this value will be set to FALSE.</description>
- </param>
- <param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Array of keyboard characters to enable.</description>
- <description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
- </param>
- <param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
- <description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
- </function>
- <function name="ShowKeyboard" messagetype="response">
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="OnKeyboardInput" messagetype="notification">
- <description>On-screen keyboard event.</description>
- <description>Can be full string or individual keypresses depending on keyboard mode.</description>
- <param name="event" type="Common.KeyboardEvent" mandatory="true">
- <description>On-screen keyboard input data.</description>
- </param>
- <param name="data" type="String" maxlength="500" mandatory="false">
- <description>On-screen keyboard input data.</description>
- <description>For dynamic keypress events, this will be the current compounded string of entry text.</description>
- <description>For entry submission events, this will be the full text entry (this will always return regardless of the mode).</description>
- <description>For entry cancelled and entry aborted events, this data param will be omitted.</description>
- </param>
- </function>
- <function name="OnTouchEvent" messagetype="notification">
- <description>Notifies about touch events on the screen's prescribed area</description>
- <param name="type" type="Common.TouchType" mandatory="true">
- <description>The type of touch event.</description>
- </param>
- <param name="event" type="Common.TouchEvent" mandatory="true" minsize="1" maxsize="10" array="true">
- <description>List of all individual touches involved in this event.</description>
- </param>
- </function>
- <function name="Slider" messagetype="request">
- <description>Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.</description>
- <param name="numTicks" type="Integer" minvalue="2" maxvalue="26" mandatory="true">
- <description>Number of selectable items on a horizontal axis</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="26" mandatory="true">
- <description>Initial position of slider control (cannot exceed numTicks)</description>
- </param>
- <param name="sliderHeader" type="String" maxlength="500" mandatory="true">
- <description>Text header to be displayed.</description>
- </param>
- <param name="sliderFooter" type="String" maxlength="500" minsize="1" maxsize="26" array="true" mandatory="false">
- <description>Text footer to be displayed (meant to display min/max threshold descriptors).</description>
- <description>For a static text footer, only one footer string shall be provided in the array.</description>
- <description>For a dynamic text footer, the number of footer text string in the array must match the numTicks value.</description>
- <description>For a dynamic text footer, text array string should correlate with potential slider position index.</description>
- <description>If omitted on supported displays, no footer text shall be displayed.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="1000" maxvalue="65535" mandatory="true">
- <description>Timeout. The slider should be displayed until the defined amount of time has elapsed. </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="Slider" messagetype="response">
- <param name="sliderPosition" type="Integer" minvalue="1" maxvalue="26" mandatory="false">
- <description>Current slider position. Must be returned when the user has clicked the ‘Save’ or ‘Canceled’ button or by the timeout </description>
- </param>
- </function>
- <function name="ScrollableMessage" messagetype="request">
- <description>Creates a full screen overlay containing a large block of formatted text that can be scrolled with up to 8 SoftButtons defined</description>
- <param name="messageText" type="Common.TextFieldStruct" mandatory="true">
- <description>Body of text that can include newlines and tabs. Uses scrollableMessageBody.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="65535" defvalue="30000" mandatory="true">
- <description>Timeout in milliseconds. The message should be displayed until the time defined is up.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App defined SoftButtons.</description>
- <description>If omitted on supported displays, only the system defined "Close" SoftButton should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ScrollableMessage" messagetype="response">
- </function>
- <function name="PerformAudioPassThru" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- <param name="audioPassThruDisplayTexts" type="Common.TextFieldStruct" mandatory="true" minsize="0" maxsize="2" array="true">
- <description>Uses
- audioPassThruDisplayText1: First line of text displayed during audio capture.
- audioPassThruDisplayText2: Second line of text displayed during audio capture.</description>
- </param>
- <param name="maxDuration" type="Integer" minvalue="1" maxvalue="1000000" mandatory="true">
- <description>The maximum duration of audio recording in milliseconds. If not provided, the recording should be performed until EndAudioPassThru arrives.</description>
- </param>
- </function>
- <function name="PerformAudioPassThru" messagetype="response">
- </function>
- <function name="EndAudioPassThru" messagetype="request">
- <description>Request is sent by SDL to stop the audio capturing.</description>
- </function>
- <function name="EndAudioPassThru" messagetype="response">
- </function>
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response provides information about presence of UI module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if UI is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="ClosePopUp" messagetype="request">
- <description>Initiated by SDL to close currently active pop-up on HMI.</description>
- <param name="methodName" type="String" mandatory="false">
- <description>Method to be closed</description>
- </param>
- </function>
- <function name="ClosePopUp" messagetype="response">
- <description>Provides the result of operation.</description>
- </function>
- <function name="OnResetTimeout" messagetype="notification">
- <description>HMI must provide SDL with notifications specific to the current Turn-By-Turn client status on the module</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application that invoked notifcation.</description>
- </param>
- <param name="methodName" type="String" mandatory="true">
- <description>Currently used method name on which was triggered action</description>
- </param>
- </function>
-</interface>
-
-<interface name="Navigation" version="1.0" date="2013-05-22">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response must provide the information about presence of UI Navigation module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if Navigation is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="ShowConstantTBT" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to show info about navigation.</description>
- <param name="navigationTexts" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="5">
- <description>See TextFieldStruct. Uses:
- navigationText1
- navigationText2
- ETA
- totalDistance
- timeToDestination.
- </description>
- </param>
- <param name="turnIcon" type="Common.Image" mandatory="false">
- </param>
- <param name="nextTurnIcon" type="Common.Image" mandatory="false">
- </param>
- <param name="distanceToManeuver" type="Float" minvalue="0" maxvalue="1000000000" mandatory="true">
- <description>Fraction of distance till next maneuver (from previous maneuver).</description>
- <description>May be used to calculate progress bar.</description>
- </param>
- <param name="distanceToManeuverScale" type="Float" minvalue="0" maxvalue="1000000000" mandatory="true">
- <description>Fraction of distance till next maneuver (starting from when AlertManeuver is triggered).</description>
- <description>May be used to calculate progress bar.</description>
- </param>
- <param name="maneuverComplete" type="Boolean" mandatory="false">
- <description>If and when a maneuver has completed while an AlertManeuver is active, SDL will send this value set to TRUE in order to clear the AlertManeuver overlay.</description>
- <description>If omitted the value should be assumed as FALSE.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>Three dynamic SoftButtons available</description>
- <description>If omitted on supported displays, the currently displayed SoftButton values will not change.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ShowConstantTBT" messagetype="response">
- </function>
- <function name="AlertManeuver" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to announce navigation maneuver</description>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>If omitted, only the system defined "Close" SoftButton should be displayed.</description>
- </param>
- </function>
- <function name="AlertManeuver" messagetype="response">
- </function>
- <function name="UpdateTurnList" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to update turn list.</description>
- <param name="turnList" type="Common.Turn" minsize="1" maxsize="100" array="true" mandatory="true">
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="1" array="true" mandatory="false">
- <description>If omitted, app-defined SoftButton should be left blank.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="UpdateTurnList" messagetype="response">
- </function>
- <function name="OnTBTClientState" messagetype="notification">
- <description>HMI must provide SDL with notifications specific to the current Turn-By-Turn client status on the module</description>
- <param name="state" type="Common.TBTState" mandatory="true">
- <description>Current State of TBT client</description>
- </param>
- </function>
- <function name="StartStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing video streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
- <description>URL that HMI start playing.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StartStream" messagetype="response">
- </function>
- <function name="StopStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing video streaming.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StopStream" messagetype="response">
- </function>
- <function name="StartAudioStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing audio streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
- <description>URL that HMI start playing.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StartAudioStream" messagetype="response">
- </function>
- <function name="StopAudioStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing audio streaming.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StopAudioStream" messagetype="response">
- </function>
-
-</interface>
-
-<interface name="VehicleInfo" version="1.0" date="2013-04-21">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response should provide information about presence of any of vehicle information modules (ECU, GPS, etc) and their readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if vehicle data modules are present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="GetVehicleType" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to get info about the vehicle (type, model, etc.).</description>
- </function>
- <function name="GetVehicleType" messagetype="response">
- <param name="vehicleType" type="Common.VehicleType" mandatory="true"/>
- </function>
- <function name="ReadDID" messagetype="request">
- <description>Request from SDL for vehicle data reading.</description>
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" minsize="1" maxsize="1000" array="true" mandatory="true">
- <description>Get raw data from vehicle data DID location(s).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ReadDID" messagetype="response">
- <param name="didResult" type="Common.DIDResult" minsize="0" maxsize="1000" array="true" mandatory="false">
- <description>Array of requested DID results (with data if available).</description>
- </param>
- </function>
- <function name="GetDTCs" messagetype="request">
- <description>Vehicle module diagnostic trouble code request.</description>
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="dtcMask" type="Integer" minvalue="0" maxvalue="255" mandatory="false">
- <description>DTC Mask Byte to be sent in diagnostic request to module .</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="GetDTCs" messagetype="response">
- <param name="ecuHeader" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)</description>
- </param>
- <param name="dtc" type="String" mandatory="false" minsize="1" maxsize="15" maxlength="10" array="true">
- <description>
- Array of all reported DTCs on module. Each DTC is represented with 4 bytes:
- 3 bytes for data
- 1 byte for status
- </description>
- </param>
- </function>
- <function name="DiagnosticMessage" messagetype="request">
- <description>Non periodic vehicle diagnostic request</description>
- <param name="targetID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of target ECU.</description>
- </param>
- <param name="messageLength" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Length of message (in bytes).</description>
- </param>
- <param name="messageData" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message.
- </description>
- </param>
- </function>
- <function name="DiagnosticMessage" messagetype="response">
- <param name="messageDataResult" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message result.
- </description>
- </param>
- </function>
- <function name="SubscribeVehicleData" messagetype="request">
- <description>
- Subscribes for specific published data items.
- The data will be only sent if it has changed.
- The application will be notified by the onVehicleData notification whenever new data is available.
- To unsubscribe the notifications, use unsubscribe with the same subscriptionType.
- </description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="SubscribeVehicleData" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Common.VehicleDataResult" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Common.VehicleDataResult" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
- <description>The external temperature in degrees celsius.</description>
- </param>
- <param name="prndl" type="Common.VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Common.VehicleDataResult" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="UnsubscribeVehicleData" messagetype="request">
- <description>
- This function is used to unsubscribe the notifications from the subscribeVehicleData function.
- </description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius.</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="UnsubscribeVehicleData" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Common.VehicleDataResult" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Common.VehicleDataResult" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="prndl" type="Common.VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Common.VehicleDataResult" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Common.VehicleDataResult" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
- </function>
- <function name="GetVehicleData" messagetype="request">
- <description>Non periodic vehicle data read request.</description>
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="Boolean" mandatory="false">
- <description>Vehicle identification number</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including ignition status and internal temp</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetVehicleData" messagetype="response">
- <param name="gps" type="Common.GPSData" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="String" maxlength="17" mandatory="false">
- <description>Vehicle identification number</description>
- </param>
- <param name="prndl" type="Common.PRNDL" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.TireStatus" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.BeltStatus" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <param name="myKey" type="Common.MyKey" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <function name="OnVehicleData" messagetype="notification">
- <description>Callback for the periodic and non periodic vehicle data read function.</description>
- <param name="gps" type="Common.GPSData" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="String" maxlength="17" mandatory="false">
- <description>Vehicle identification number.</description>
- </param>
- <param name="prndl" type="Common.PRNDL" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Common.TireStatus" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Common.BeltStatus" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- <param name="myKey" type="Common.MyKey" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
-</interface>
-</interfaces>
diff --git a/SDL_Core/src/components/interfaces/Json_HMI_message_specification.txt b/SDL_Core/src/components/interfaces/Json_HMI_message_specification.txt
deleted file mode 100644
index 9f5b20a3c..000000000
--- a/SDL_Core/src/components/interfaces/Json_HMI_message_specification.txt
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
-* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-Version = 1.0
-
-This file describes message structure for communication between SDL and HMI.
-JSON RPC 2.0 format is taken as basis. Please refer to http://www.jsonrpc.org/specification. Additions to this format are marked as 'Additions' hereinafter. Blocks marked as 'Spec' are excerpt from oficial specification of JSON RPC 2.0. Samples are also provided.
-This document comes in pair with HMI_API.xml.
-
-#########################################################################################
-
-Notifications:
-
-/****
-
- * Spec (from http://www.jsonrpc.org/specification):
- A Notification is a Request object without an "id" member. A Request object that is a Notification signifies the Client's lack of interest in the corresponding Response object, and as such no Response object needs to be returned to the client. The Server MUST NOT reply to a Notification, including those that are within a batch request.
-***/
-
-//No params:
-{
- "jsonrpc" : "2.0",
- "method" : "UI.OnReady"
-}
-
-//With params:
-
-{
- "jsonrpc" : "2.0",
- "method" : "BasicCommunication.OnDeviceListUpdated",
- "params" :
- {
- "deviceList" : [ "XT910", "GT-I9300", "HTC Explorer A310e" ]
- }
-}
-
-{
- "jsonrpc" : "2.0",
- "method" : "Buttons.OnButtonPress",
- "params" :
- {
- "mode" : "SHORT",
- "name" : "OK"
- }
-}
-
-#########################################################################################
-
-/*****
- Request-response pairs
-
- * Spec (from http://www.jsonrpc.org/specification):
- Request object
- A rpc call is represented by sending a Request object to a Server. The Request object has the following members:
-
- jsonrpc
- A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".
- method
- A String containing the name of the method to be invoked. Method names that begin with the word rpc followed by a period character (U+002E or ASCII 46) are reserved for rpc-internal methods and extensions and MUST NOT be used for anything else.
- params
- A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.
- id
- An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null and Numbers SHOULD NOT contain fractional parts
-*****/
-
-//Params in request
-{
- "id" : 36,
- "jsonrpc" : "2.0",
- "method" : "UI.Alert",
- "params" :
- {
- "alertText1" : "Alert Line 1",
- "alertText2" : "Alert Line 2",
- "alertText3" : "Alert Line 3",
- "appId" : 65537,
- "duration" : 5000,
- "playTone" : true,
- "ttsChunks" :
- [
-
- {
- "text" : "Text to Speak"
- }
- ]
- }
-}
-
-//No params in request
-{
- "id" : 19,
- "jsonrpc" : "2.0",
- "method" : "Buttons.GetCapabilities"
-}
-
-/****
- * Spec (from http://www.jsonrpc.org/specification):
- Response object
- When a rpc call is made, the Server MUST reply with a Response, except for in the case of Notifications. The Response is expressed as a single JSON Object, with the following members:
-
- jsonrpc
- A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".
- result
- This member is REQUIRED on success.
- This member MUST NOT exist if there was an error invoking the method.
- The value of this member is determined by the method invoked on the Server.
- error
- This member is REQUIRED on error.
- This member MUST NOT exist if there was no error triggered during invocation.
- The value for this member MUST be an Object as defined below.
- id
- This member is REQUIRED.
- It MUST be the same as the value of the id member in the Request Object.
- If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
- * Additions:
- result MUST contain 'method' which has to be the same as in 'request'.
-
-
-****/
-
-/****
- * Error object
- When a rpc call encounters an error, the Response Object MUST contain the error member with a value that is a Object with the following members:
-
- code
- A Number that indicates the error type that occurred.
- This MUST be an integer.
- message
- A String providing a short description of the error.
- The message SHOULD be limited to a concise single sentence.
- data
- A Primitive or Structured value that contains additional information about the error.
- This may be omitted.
- The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
-
-
- * Additions:
- result along with error MUST contain 'code' which is value from Result enum provided in HMI_API.xml
- error MUST contain 'method' which is the same as 'method' in request for this error in field 'data'.
-****/
-
-//Response with no params in it (code and method are necessary)
-{
- "id" : 36,
- "jsonrpc" : "2.0",
- "result" :
- {
- "code" : 0,
- "method": "UI.Alert"
- }
-}
-
-// extra params in response
-{
- "id" : 19,
- "jsonrpc" : "2.0",
- "result" :
- {
- "capabilities" :
- [
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_0",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_1",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_2",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_3",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_4",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_5",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_6",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_7",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_8",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "PRESET_9",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "OK",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "SEEKLEFT",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "SEEKRIGHT",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "TUNEUP",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- },
-
- {
- "longPressAvailable" : true,
- "name" : "TUNEDOWN",
- "shortPressAvailable" : true,
- "upDownAvailable" : true
- }
- ],
- "presetBankCapabilities" :
- {
- "onScreenPresetsAvailable" : true
- },
- "code" : 0,
- "method" : "Buttons.GetCapabilities"
- }
-}
-
-//Erroneous response
-{
- "id" : 35,
- "jsonrpc" : "2.0",
- "error" :
- {
- "code" : 12,
- "message" : "File with this name is not available",
- "data" : {
- "method" : "Buttons.GetCapabilities"
- }
- }
-}
diff --git a/SDL_Core/src/components/interfaces/Json_Mobile_side_message_spec.txt b/SDL_Core/src/components/interfaces/Json_Mobile_side_message_spec.txt
deleted file mode 100644
index 02d1233bb..000000000
--- a/SDL_Core/src/components/interfaces/Json_Mobile_side_message_spec.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-Version = 1.0
-
-This file describes message structure for communication between SDL and Mobile SDK.
-
-Json string used for communication consists of parameter names and values which can be either objects, arrays or 'simple' values such as strings, numbers and boolean values.
-Example:
-{"syncFileName":"action.png","fileType":"GRAPHIC_PNG"}
-where
-- syncFileName - name of parameter with value of type string ("action.png")
-- fileType - name of parameter with value passed as type string ("GRAPHIC_PNG").
-{"resultCode" : "SUCCESS", "success" : true}
-- resultCode - name of parameter with value passed as type string("SUCCESS")
-- success - name of parameter with value of type boolean (true)
-
-Parameter names, types, fields of possible values are provided in specification stored in MOBILE_API.xml file.
-
-Each RPC described in this document can be represented in json format;
-RPC type (Request/Response/Notification) is passed in binary header which comes along with json string as well as ID representing particular RPC. For instance, according to MOBILE_API.xml PutFile RPC has functionID="PutFileID" which can be found in FunctionID enum with value equal to 32. Hence binary header for this RPC Request will contain RPC Type half-byte set to 0 (Request), RPC Function ID 3.5 bytes set to 32.
-PutFile RPC Request has mandatory params:
-syncFileName of type String
-fileType of enum type FileType
-and optional parameter:
-persistentFile of type Boolean.
-Hence with file name set to 'action.png' and file type to PNG, optional parameter ommited, json string of PutFile RPC Request will look like:
-{"syncFileName":"action.png","fileType":"GRAPHIC_PNG"}
-
-PutFile Response RPC as any other Response RPC in MOBILE_API.xml must have resultCode (with values from provided enum) and success (with value of type boolean) parameters and optional info parameter (with value of type string). PutFile Response RPC also has mandatory parameter spaceAvailable with value of type Integer in range from 0 to 2000000000.
-Hence, Json string for PutFile Response RPC can look like follows:
-{"resultCode":"SUCCESS","spaceAvailable":104845882,"success":true}
-for successful execution of RPC.
diff --git a/SDL_Core/src/components/interfaces/MOBILE_API.xml b/SDL_Core/src/components/interfaces/MOBILE_API.xml
deleted file mode 100644
index 78debb95e..000000000
--- a/SDL_Core/src/components/interfaces/MOBILE_API.xml
+++ /dev/null
@@ -1,4889 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<?xml-stylesheet type="text/xml" href="protocol2html.xsl"?>
-
-<interface name="Ford Sync RAPI" version="2.1B" date="2013-05-30">
-
- <enum name="Result" internal_scope="base">
- <element name="SUCCESS">
- <description>The request succeeded</description>
- </element>
- <element name="UNSUPPORTED_REQUEST">
- <description>The request is not supported by Sync</description>
- </element>
- <element name="UNSUPPORTED_RESOURCE">
- <description>
- A button that was requested for subscription is not supported under the current system.
- NOTE: could become a more generic UNSUPPORTED_RESOURCE by merging with VEHIVLE_DATA_NOT_AVAILABLE.
- </description>
- </element>
- <element name="DISALLOWED">
- <description>RPC is not authorized in local policy table.</description>
- </element>
- <element name="REJECTED">
- <description>
- The requested command was rejected, e.g. because mobile app is in background and cannot perform any HMI commands.
- Or an HMI command (e.g. Speak) is rejected because a higher priority HMI command (e.g. Alert) is playing.
- </description>
- </element>
- <element name="ABORTED">
- <description>
- A command was aborted, for example due to user interaction (e.g. user pressed button).
- Or an HMI command (e.g. Speak) is aborted because a higher priority HMI command (e.g. Alert) was requested.
- </description>
- </element>
- <element name="IGNORED">
- <description>
- A command was ignored, because the intended result is already in effect.
- For example, SetMediaClockTimer was used to pause the media clock although the clock is paused already.
- NOTE: potentially replaces SUBSCRIBED_ALREADY
- </description>
- </element>
- <element name="RETRY">
- <description>The user interrupted the RPC (e.g. PerformAudioPassThru) and indicated to start over. Note, the app must issue the new RPC.</description>
- </element>
- <element name="IN_USE">
- <description>
- The data may not be changed, because it is currently in use.
- For example when trying to delete a command set that is currently involved in an interaction.
- </description>
- </element>
- <element name="VEHICLE_DATA_NOT_AVAILABLE">
- <description>The requested vehicle data is not available on this vehicle or is not published.</description>
- </element>
- <element name="TIMED_OUT">
- <description>Overlay reached the maximum timeout and closed.</description>
- </element>
- <element name="INVALID_DATA">
- <description>
- The data sent is invalid. For example:
- Invalid Json syntax
- Parameters out of bounds (number or enum range)
- Mandatory parameters not provided
- Parameter provided with wrong type
- Invalid characters
- Empty string
- </description>
- </element>
- <element name="CHAR_LIMIT_EXCEEDED"/>
- <element name="INVALID_ID">
- <description>
- One of the provided IDs is not valid. For example
- This applies to CorrelationID, SubscriptionID [@TODO if SubscriptionID is used], CommandID, MenuID, [@TODO: missed one?]
- </description>
- </element>
- <element name="DUPLICATE_NAME">
- <description>There was a conflict with an registered name (application or menu item) or vr command</description>
- </element>
- <element name="APPLICATION_NOT_REGISTERED">
- <description>An command can not be executed because no application has been registered with RegisterApplication.</description>
- </element>
- <element name="WRONG_LANGUAGE">
- <description>
- The requested language is currently not supported.
- Might be because of a mismatch of the currently active language on Sync and the requested language
- </description>
- </element>
- <element name="OUT_OF_MEMORY">
- <description>The system could not process the request because the necessary memory couldn't be allocated</description>
- </element>
- <element name="TOO_MANY_PENDING_REQUESTS">
- <description>There are too many requests pending (means, that the response has not been delivered, yet).</description>
- <designdescription>There may be a maximum of 1000 pending requests at a time.</designdescription>
- </element>
- <element name="TOO_MANY_APPLICATIONS">
- <description>There are already too many registered applications</description>
- </element>
- <element name="APPLICATION_REGISTERED_ALREADY">
- <description>RegisterApplication has been called again, after a RegisterApplication was successful before.</description>
- </element>
- <element name="WARNINGS">
- <description>The RPC (e.g. SubscribeVehicleData) executed successfully but one or more items have a warning or failure.</description>
- </element>
- <element name="GENERIC_ERROR">
- <description>Provided data is valid but something went wrong in the lower layers.</description>
- </element>
- <element name="USER_DISALLOWED">
- <description>RPC is included in a functional group explicitly blocked by the user.</description>
- </element>
- <element name="UNSUPPORTED_VERSION">
- <description>Sync doesn't support the protocol that is requested by the mobile application</description>
- </element>
- <element name="VEHICLE_DATA_NOT_ALLOWED">
- <description>The user has turned off access to vehicle data, and it is globally unavailable to mobile applications.</description>
- </element>
- <element name="FILE_NOT_FOUND">
- <description>A specified file could not be found on Sync.</description>
- </element>
- <element name="CANCEL_ROUTE">
- <description>User selected to Cancel Route.</description>
- </element>
- <element name="TRUNCATED_DATA">
- <description>The RPC (e.g. ReadDID) executed successfully but the data exceeded the platform maximum threshold and thus, only part of the data is available.</description>
- </element>
- <element name="SAVED">
- <description>The RPC (e.g. Slider) executed successfully and the user elected to save the current position / value.</description>
- </element>
- <element name="INVALID_CERT">
- <description>The certificate provided during authentication is invalid.</description>
- </element>
- <element name="EXPIRED_CERT">
- <description>The certificate provided during authentication is expired.</description>
- </element>
- <element name="RESUME_FAILED">
- <description>The provided hash ID does not match the hash of the current set of registered data or the core could not resume the previous data.</description>
- </element>
- </enum>
-
- <enum name="ButtonPressMode">
- <element name="LONG">
- <description>
- A button was released, after it was pressed for a long time
- Actual timing is defined by Sync and may vary
- </description>
- </element>
- <element name="SHORT">
- <description>
- A button was released, after it was pressed for a short time
- Actual timing is defined by Sync and may vary
- </description>
- </element>
- </enum>
-
- <enum name="ButtonEventMode">
- <element name="BUTTONUP">
- <description>A button has been released up</description>
- </element>
- <element name="BUTTONDOWN">
- <description>A button has been pressed down</description>
- </element>
- </enum>
-
- <enum name="Language">
- <element name="EN-US" internal_name="EN_US">
- <description>English - US</description>
- </element>
- <element name="ES-MX" internal_name="ES_MX">
- <description>Spanish - Mexico</description>
- </element>
- <element name="FR-CA" internal_name="FR_CA">
- <description>French - Canada</description>
- </element>
- <element name="DE-DE" internal_name="DE_DE">
- <description>German - Germany</description>
- </element>
- <element name="ES-ES" internal_name="ES_ES">
- <description>Spanish - Spain</description>
- </element>
- <element name="EN-GB" internal_name="EN_GB">
- <description>English - GB</description>
- </element>
- <element name="RU-RU" internal_name="RU_RU">
- <description>Russian - Russia</description>
- </element>
- <element name="TR-TR" internal_name="TR_TR">
- <description>Turkish - Turkey</description>
- </element>
- <element name="PL-PL" internal_name="PL_PL">
- <description>Polish - Poland</description>
- </element>
- <element name="FR-FR" internal_name="FR_FR">
- <description>French - France</description>
- </element>
- <element name="IT-IT" internal_name="IT_IT">
- <description>Italian - Italy</description>
- </element>
- <element name="SV-SE" internal_name="SV_SE">
- <description>Swedish - Sweden</description>
- </element>
- <element name="PT-PT" internal_name="PT_PT">
- <description>Portuguese - Portugal</description>
- </element>
- <element name="NL-NL" internal_name="NL_NL">
- <description>Dutch (Standard) - Netherlands</description>
- </element>
- <element name="EN-AU" internal_name="EN_AU">
- <description>English - Australia</description>
- </element>
- <element name="ZH-CN" internal_name="ZH_CN">
- <description>Mandarin - China</description>
- </element>
- <element name="ZH-TW" internal_name="ZH_TW">
- <description>Mandarin - Taiwan</description>
- </element>
- <element name="JA-JP" internal_name="JA_JP">
- <description>Japanese - Japan</description>
- </element>
- <element name="AR-SA" internal_name="AR_SA">
- <description>Arabic - Saudi Arabia</description>
- </element>
- <element name="KO-KR" internal_name="KO_KR">
- <description>Korean - South Korea</description>
- </element>
- <element name="PT-BR" internal_name="PT_BR">
- <description>Portuguese - Brazil</description>
- </element>
- <element name="CS-CZ" internal_name="CS_CZ">
- <description>Czech - Czech Republic</description>
- </element>
- <element name="DA-DK" internal_name="DA_DK">
- <description>Danish - Denmark</description>
- </element>
- <element name="NO-NO" internal_name="NO_NO">
- <description>Norwegian - Norway</description>
- </element>
-</enum>
-
- <enum name="UpdateMode">
- <description>Describes how the media clock timer should behave on the platform</description>
- <element name="COUNTUP" />
- <description>Starts the media clock timer counting upwards, as in time elapsed.</description>
- <element name="COUNTDOWN" />
- <description>Starts the media clock timer counting downwards, as in time remaining.</description>
- <element name="PAUSE" />
- <description>Pauses the media clock timer</description>
- <element name="RESUME" />
- <description>Resume the media clock timer</description>
- <element name="CLEAR" />
- <description>Clears the media clock timer (previously done through Show->mediaClock)</description>
- </enum>
-
- <enum name="TimerMode">
- <element name="UP" />
- <description>Causes the media clock timer to update from 0:00 to a specified time</description>
- <element name="DOWN" />
- <description>Causes the media clock timer to update from a specified time to 0:00</description>
- <element name="NONE" />
- <description>Indicates to not use the media clock timer</description>
- </enum>
-
- <enum name="InteractionMode">
- <description>For application-requested interactions, this mode indicates the method in which the user is notified and uses the interaction.</description>
- <element name="MANUAL_ONLY" />
- <description>
- This mode causes the interaction to only occur on the display, meaning the choices are provided only via the display.
- Selections are made with the OK and Seek Right and Left, Tune Up and Down buttons.
- </description>
- <element name="VR_ONLY" />
- <description>
- This mode causes the interaction to only occur using V4.
- Selections are made by saying the command.
- </description>
- <element name="BOTH" />
- <description>
- This mode causes both a VR and display selection option for an interaction.
- Selections can be made either from the menu display or by speaking the command.
- </description>
- </enum>
-
- <enum name="LayoutMode">
- <description>For touchscreen interactions, the mode of how the choices are presented.</description>
- <element name="ICON_ONLY" />
- <description>
- This mode causes the interaction to display the previous set of choices as icons.
- </description>
- <element name="ICON_WITH_SEARCH" />
- <description>
- This mode causes the interaction to display the previous set of choices as icons along with a search field in the HMI.
- </description>
- <element name="LIST_ONLY" />
- <description>
- This mode causes the interaction to display the previous set of choices as a list.
- </description>
- <element name="LIST_WITH_SEARCH" />
- <description>
- This mode causes the interaction to display the previous set of choices as a list along with a search field in the HMI.
- </description>
- <element name="KEYBOARD" />
- <description>
- This mode causes the interaction to immediately display a keyboard entry through the HMI.
- </description>
- </enum>
-
- <enum name="HMILevel">
- <description>Enumeraction that describes current levels of HMI.</description>
- <element name="FULL" internal_name="HMI_FULL" />
- <element name="LIMITED" internal_name="HMI_LIMITED" />
- <element name="BACKGROUND" internal_name="HMI_BACKGROUND" />
- <element name="NONE" internal_name="HMI_NONE" />
- </enum>
-
- <enum name="AudioStreamingState">
- <description>Enumeraction that describes possible states of audio streaming.</description>
- <element name="AUDIBLE" />
- <element name="ATTENUATED" />
- <element name="NOT_AUDIBLE" />
- </enum>
-
- <enum name="SystemAction">
- <description>Enumeration that describes system actions that can be triggered.</description>
- <element name="DEFAULT_ACTION">
- <description>Default action occurs. Standard behavior (e.g. SoftButton clears overlay).</description>
- </element>
- <element name="STEAL_FOCUS">
- <description>App is brought into HMI_FULL.</description>
- </element>
- <element name="KEEP_CONTEXT">
- <description>Current system context is maintained. An overlay is persisted even though a SoftButton has been pressed and the notification sent.</description>
- </element>
- </enum>
-
- <enum name="SystemContext">
- <description>Enumeration that describes possible contexts an app's HMI might be in.</description>
- <description>Communicated to whichever app is in HMI FULL, except Alert.</description>
- <element name="MAIN" internal_name="SYSCTXT_MAIN">
- <description>The app's persistent display (whether media/non-media/navigation) is fully visible onscreen.</description>
- </element>
- <element name="VRSESSION" internal_name="SYSCTXT_VRSESSION">
- <description>The system is currently in a VR session (with whatever dedicated VR screen being overlaid onscreen).</description>
- </element>
- <element name="MENU" internal_name="SYSCTXT_MENU">
- <description>The system is currently displaying an in-App menu onscreen.</description>
- </element>
- <element name="HMI_OBSCURED" internal_name="SYSCTXT_HMI_OBSCURED">
- <description>The app's display HMI is currently being obscured by either a system or other app's overlay.</description>
- </element>
- <element name="ALERT" internal_name="SYSCTXT_ALERT">
- <description>Broadcast only to whichever app has an alert currently being displayed.</description>
- </element>
- </enum>
-
- <enum name="SoftButtonType">
- <description>Contains information about the SoftButton capabilities.</description>
- <element name="TEXT" internal_name="SBT_TEXT"/>
- <element name="IMAGE" internal_name="SBT_IMAGE"/>
- <element name="BOTH" internal_name="SBT_BOTH"/>
- </enum>
-
- <enum name="AppInterfaceUnregisteredReason">
- <description>Error code, which comes from sync side.</description>
- <element name="USER_EXIT" />
- <element name="IGNITION_OFF" />
- <element name="BLUETOOTH_OFF" />
- <element name="USB_DISCONNECTED" />
- <element name="REQUEST_WHILE_IN_NONE_HMI_LEVEL" />
- <element name="TOO_MANY_REQUESTS" />
- <element name="DRIVER_DISTRACTION_VIOLATION" />
- <element name="LANGUAGE_CHANGE" />
- <element name="MASTER_RESET" />
- <element name="FACTORY_DEFAULTS" />
- <element name="APP_UNAUTHORIZED" />
- </enum>
-
- <enum name="TriggerSource">
- <description>Indicates the source from where the command was triggered.</description>
- <element name="MENU" internal_name="TS_MENU" />
- <element name="VR" internal_name="TS_VR" />
- <element name="KEYBOARD" internal_name="TS_KEYBOARD" />
- </enum>
-
- <enum name="HmiZoneCapabilities">
- <description>Contains information about the HMI zone capabilities.</description>
- <description>For future use.</description>
- <element name="FRONT" />
- <element name="BACK" />
- </enum>
-
- <enum name="SpeechCapabilities">
- <description>Contains information about the TTS capabilities.</description>
- <element name="TEXT" internal_name="SC_TEXT"/>
- <element name="SAPI_PHONEMES" />
- <element name="LHPLUS_PHONEMES" />
- <element name="PRE_RECORDED" />
- <element name="SILENCE" />
- </enum>
-
- <enum name="VrCapabilities">
- <description>Contains information about the VR capabilities.</description>
- <element name="TEXT" internal_name="VR_TEXT"/>
- </enum>
-
- <enum name="PrerecordedSpeech">
- <description>Contains a list of prerecorded speech items present on the platform.</description>
- <element name="HELP_JINGLE" />
- <element name="INITIAL_JINGLE" />
- <element name="LISTEN_JINGLE" />
- <element name="POSITIVE_JINGLE" />
- <element name="NEGATIVE_JINGLE" />
- </enum>
-
- <enum name="SamplingRate">
- <description>Describes different sampling options for PerformAudioPassThru.</description>
- <element name="8KHZ" internal_name="SamplingRate_8KHZ"/>
- <element name="16KHZ" internal_name="SamplingRate_16KHZ"/>
- <element name="22KHZ" internal_name="SamplingRate_22KHZ"/>
- <element name="44KHZ" internal_name="SamplingRate_44KHZ"/>
- </enum>
-
- <enum name="BitsPerSample">
- <description>Describes different quality options for PerformAudioPassThru.</description>
- <element name="8_BIT" internal_name="BitsPerSample_8_BIT"/>
- <element name="16_BIT" internal_name="BitsPerSample_16_BIT"/>
- </enum>
-
- <enum name="AudioType">
- <description>Describes different audio type options for PerformAudioPassThru.</description>
- <element name="PCM" />
- </enum>
-
- <struct name="AudioPassThruCapabilities">
- <description>Describes different audio type configurations for PerformAudioPassThru.</description>
- <description>e.g. {8kHz,8-bit,PCM}</description>
- <param name="samplingRate" type="SamplingRate"/>
- <param name="bitsPerSample" type="BitsPerSample"/>
- <param name="audioType" type="AudioType"/>
- </struct>
-
- <enum name="VehicleDataType">
- <description>Defines the data types that can be published and subscribed to.</description>
- <element name="VEHICLEDATA_GPS">
- <description>Notifies GPSData may be subscribed</description>
- </element>
- <element name="VEHICLEDATA_SPEED" />
- <element name="VEHICLEDATA_RPM" />
- <element name="VEHICLEDATA_FUELLEVEL" />
- <element name="VEHICLEDATA_FUELLEVEL_STATE" />
- <element name="VEHICLEDATA_FUELCONSUMPTION" />
- <element name="VEHICLEDATA_EXTERNTEMP" />
- <element name="VEHICLEDATA_VIN" />
- <element name="VEHICLEDATA_PRNDL" />
- <element name="VEHICLEDATA_TIREPRESSURE" />
- <element name="VEHICLEDATA_ODOMETER" />
- <element name="VEHICLEDATA_BELTSTATUS" />
- <element name="VEHICLEDATA_BODYINFO" />
- <element name="VEHICLEDATA_DEVICESTATUS" />
- <element name="VEHICLEDATA_ECALLINFO" />
- <element name="VEHICLEDATA_AIRBAGSTATUS" />
- <element name="VEHICLEDATA_EMERGENCYEVENT" />
- <element name="VEHICLEDATA_CLUSTERMODESTATUS" />
- <element name="VEHICLEDATA_MYKEY" />
- <element name="VEHICLEDATA_BRAKING" />
- <element name="VEHICLEDATA_WIPERSTATUS" />
- <element name="VEHICLEDATA_HEADLAMPSTATUS" />
- <element name="VEHICLEDATA_BATTVOLTAGE" />
- <element name="VEHICLEDATA_ENGINETORQUE" />
- <element name="VEHICLEDATA_ACCPEDAL" />
- <element name="VEHICLEDATA_STEERINGWHEEL" />
- </enum>
-
- <enum name="ButtonName">
- <description>Defines the hard (physical) and soft (touchscreen) buttons available from SYNC</description>
- <element name="OK" />
- <element name="SEEKLEFT" />
- <element name="SEEKRIGHT" />
- <element name="TUNEUP" />
- <element name="TUNEDOWN" />
- <element name="PRESET_0" />
- <element name="PRESET_1" />
- <element name="PRESET_2" />
- <element name="PRESET_3" />
- <element name="PRESET_4" />
- <element name="PRESET_5" />
- <element name="PRESET_6" />
- <element name="PRESET_7" />
- <element name="PRESET_8" />
- <element name="PRESET_9" />
- <element name="CUSTOM_BUTTON" />
- <element name="SEARCH" />
- </enum>
-
- <enum name="MediaClockFormat">
- <element name="CLOCK1">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 19;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 19;maxMinutes = 59;maxSeconds = 59;
- used for Type II and CID headunits
- </description>
- </element>
- <element name="CLOCK2">
- <description>
- minutesFieldWidth = 3;minutesFieldMax = 199;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 59;maxMinutes = 59;maxSeconds = 59;
- used for Type V headunit
- </description>
- </element>
- <element name="CLOCK3">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 59;secondsFieldWidth = 2;secondsFieldMax = 59;maxHours = 9;maxMinutes = 59;maxSeconds = 59;
- used for GEN1.1 MFD3/4/5 headunits
- </description>
- </element>
- <element name="CLOCKTEXT1">
- <description>
- 5 characters possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters, see TypeII column in XLS. See [@TODO: create file ref]]
- :|sp : colon or space
- used for Type II headunit
- </description>
- </element>
- <element name="CLOCKTEXT2">
- <description>
- 5 chars possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters, see CID column in XLS. See [@TODO: create file ref]]
- :|sp : colon or space
- used for CID headunit
- NOTE: difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character set
- </description>
- </element>
- <element name="CLOCKTEXT3">
- <description>
- 6 chars possible
- Format: 1|sp c c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters, see Type 5 column in XLS]. See [@TODO: create file ref]
- :|sp : colon or space
- used for Type V headunit
- </description>
- </element>
- <element name="CLOCKTEXT4">
- <description>
- 6 chars possible
- Format: c :|sp c c : c c
- :|sp : colon or space
- c : character out of following character set: sp|0-9|[letters].
- used for GEN1.1 MFD3/4/5 headunits
- </description>
- </element>
- </enum>
-
- <enum name="DisplayType">
- <description>See DAES for further infos regarding the displays</description>
- <element name="CID"/>
- <element name="TYPE2" />
- <element name="TYPE5" />
- <element name="NGN" />
- <element name="GEN2_8_DMA" />
- <element name="GEN2_6_DMA" />
- <element name="MFD3" />
- <element name="MFD4" />
- <element name="MFD5" />
- <element name="GEN3_8-INCH" internal_name="GEN3_8_INCH" />
- </enum>
-
- <enum name="TextFieldName">
- <element name="mainField1">
- <description>The first line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
-
- <element name="mainField2">
- <description>The second line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
-
- <element name="mainField3">
- <description>The first line of second set of main fields of persistent display; applies to "Show"</description>
- </element>
-
- <element name="mainField4">
- <description>The second line of second set of main fields of the persistent display; applies to "Show"</description>
- </element>
-
- <element name="statusBar">
- <description>The status bar on NGN; applies to "Show"</description>
- </element>
-
- <element name="mediaClock">
- <description>Text value for MediaClock field; applies to "Show"</description>
- </element>
-
- <element name="mediaTrack">
- <description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
- </element>
-
- <element name="alertText1">
- <description>The first line of the alert text field; applies to "Alert"</description>
- </element>
-
- <element name="alertText2">
- <description>The second line of the alert text field; applies to "Alert"</description>
- </element>
-
- <element name="alertText3">
- <description>The third line of the alert text field; applies to "Alert"</description>
- </element>
-
- <element name="scrollableMessageBody">
- <description>Long form body of text that can include newlines and tabs; applies to "ScrollableMessage"</description>
- </element>
-
- <element name="initialInteractionText">
- <description> First line suggestion for a user response (in the case of VR enabled interaction)</description>
- </element>
-
- <element name="navigationText1">
- <description> First line of navigation text</description>
- </element>
-
- <element name="navigationText2">
- <description> Second line of navigation text</description>
- </element>
-
- <element name="ETA">
- <description> Estimated Time of Arrival time for navigation</description>
- </element>
-
- <element name="totalDistance">
- <description> Total distance to destination for navigation</description>
- </element>
-
- <element name="audioPassThruDisplayText1">
- <description> First line of text for audio pass thru</description>
- </element>
-
- <element name="audioPassThruDisplayText2">
- <description> Second line of text for audio pass thru</description>
- </element>
-
- <element name="sliderHeader">
- <description> Header text for slider</description>
- </element>
-
- <element name="sliderFooter">
- <description> Footer text for slider</description>
- </element>
-
- <element name="notificationText">
- <description> Footer text for slider</description>
- </element>
-
- <element name="menuName">
- <description> Primary text for Choice</description>
- </element>
-
- <element name="secondaryText">
- <description> Secondary text for Choice</description>
- </element>
-
- <element name="tertiaryText">
- <description> Tertiary text for Choice</description>
- </element>
-
- <element name="timeToDestination">
- <description> Time to destination</description>
- </element>
-
- <element name="turnText">
- <description> Turn text</description>
- </element>
-
- </enum>
-
- <enum name="ImageFieldName">
- <element name="softButtonImage">
- <description>The image field for SoftButton</description>
- </element>
-
- <element name="choiceImage">
- <description>The first image field for Choice</description>
- </element>
-
- <element name="choiceSecondaryImage">
- <description>The secondary image field for Choice</description>
- </element>
-
- <element name="vrHelpItem">
- <description>The image field for vrHelpItem</description>
- </element>
-
- <element name="turnIcon">
- <description>The image field for Turn</description>
- </element>
-
- <element name="menuIcon">
- <description>The image field for the menu icon in SetGlobalProperties</description>
- </element>
-
- <element name="cmdIcon">
- <description>The image field for AddCommand</description>
- </element>
-
- <element name="appIcon">
- <description>The image field for the app icon (set by setAppIcon)</description>
- </element>
-
- <element name="graphic">
- <description>The image field for Show</description>
- </element>
-
- <element name="showConstantTBTIcon">
- <description>The primary image field for ShowConstantTBT</description>
- </element>
-
- <element name="showConstantTBTNextTurnIcon">
- <description>The secondary image field for ShowConstantTBT</description>
- </element>
- </enum>
-
- <enum name="PredefinedLayout" platform="documentation">
- <description>Predefined screen layout.</description>
-
- <element name="DEFAULT" rootscreen="true">
- <description>
- Default media / non-media screen.
- Can be set as a root screen.
- </description>
- </element>
- <element name="MEDIA" rootscreen="true">
- <description>
- Default Media screen.
- Can be set as a root screen.
- </description>
- </element>
- <element name="NON_MEDIA" rootscreen="true">
- <description>
- Default Non-media screen.
- Can be set as a root screen.
- </description>
- </element>
- <element name="ONSCREEN_PRESETS" rootscreen="true">
- <description>
- Custom root media screen containing app-defined onscreen presets.
- Can be set as a root screen.
- </description>
- </element>
- <element name="NAV_FULLSCREEN_MAP" rootscreen="true" scope="partner">
- <description>
- Custom root template screen containing full screen map with navigation controls.
- Can be set as a root screen.
- </description>
- </element>
- <element name="NAV_LIST" rootscreen="true" scope="partner">
- <description>
- Custom root template screen containing video represented list.
- Can be set as a root screen.
- </description>
- </element>
- <element name="NAV_KEYBOARD" rootscreen="true" scope="partner">
- <description>
- Custom root template screen containing video represented keyboard.
- Can be set as a root screen.
- </description>
- </element>
- <element name="GRAPHIC_WITH_TEXT" rootscreen="true">
- <description>
- Custom root template screen containing half-screen graphic with lines of text.
- Can be set as a root screen.
- </description>
- </element>
- <element name="TEXT_WITH_GRAPHIC" rootscreen="true">
- <description>
- Custom root template screen containing lines of text with half-screen graphic.
- Can be set as a root screen.
- </description>
- </element>
- <element name="TILES_ONLY" rootscreen="true">
- <description>
- Custom root template screen containing only tiled SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="TEXTBUTTONS_ONLY" rootscreen="true">
- <description>
- Custom root template screen containing only text SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="GRAPHIC_WITH_TILES" rootscreen="true">
- <description>
- Custom root template screen containing half-screen graphic with tiled SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="TILES_WITH_GRAPHIC" rootscreen="true">
- <description>
- Custom root template screen containing tiled SoftButtons with half-screen graphic.
- Can be set as a root screen.
- </description>
- </element>
- <element name="GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS" rootscreen="true">
- <description>
- Custom root template screen containing half-screen graphic with text and SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC" rootscreen="true">
- <description>
- Custom root template screen containing text and SoftButtons with half-screen graphic.
- Can be set as a root screen.
- </description>
- </element>
- <element name="GRAPHIC_WITH_TEXTBUTTONS" rootscreen="true">
- <description>
- Custom root template screen containing half-screen graphic with text only SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="TEXTBUTTONS_WITH_GRAPHIC" rootscreen="true">
- <description>
- Custom root template screen containing text only SoftButtons with half-screen graphic.
- Can be set as a root screen.
- </description>
- </element>
- <element name="LARGE_GRAPHIC_WITH_SOFTBUTTONS" rootscreen="true">
- <description>
- Custom root template screen containing a large graphic and SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="DOUBLE_GRAPHIC_WITH_SOFTBUTTONS" rootscreen="true">
- <description>
- Custom root template screen containing two graphics and SoftButtons.
- Can be set as a root screen.
- </description>
- </element>
- <element name="LARGE_GRAPHIC_ONLY" rootscreen="true">
- <description>
- Custom root template screen containing only a large graphic.
- Can be set as a root screen.
- </description>
- </element>
- </enum>
-
- <enum name="CharacterSet">
- <description>The list of potential character sets</description>
- <element name="TYPE2SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="TYPE5SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="CID1SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="CID2SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <issue creator="rs">Real sets have not been defined yet?</issue>
- </enum>
-
- <enum name="TextAlignment">
- <description>The list of possible alignments, left, right, or centered</description>
- <element name="LEFT_ALIGNED" />
- <element name="RIGHT_ALIGNED" />
- <element name="CENTERED" />
- </enum>
-
- <enum name="TBTState">
- <description>Enumeration that describes possible states of turn-by-turn client or AppLink app.</description>
- <element name="ROUTE_UPDATE_REQUEST" />
- <element name="ROUTE_ACCEPTED" />
- <element name="ROUTE_REFUSED" />
- <element name="ROUTE_CANCELLED" />
- <element name="ETA_REQUEST" />
- <element name="NEXT_TURN_REQUEST" />
- <element name="ROUTE_STATUS_REQUEST" />
- <element name="ROUTE_SUMMARY_REQUEST" />
- <element name="TRIP_STATUS_REQUEST" />
- <element name="ROUTE_UPDATE_REQUEST_TIMEOUT" />
- </enum>
-
- <enum name="DriverDistractionState">
- <description>Enumeration that describes possible states of driver distraction.</description>
- <element name="DD_ON" />
- <element name="DD_OFF" />
- </enum>
-
- <enum name="ImageType">
- <description>Contains information about the type of image.</description>
- <element name="STATIC" />
- <element name="DYNAMIC" />
- </enum>
-
- <struct name="Image">
- <param name="value" minlength="0" maxlength="65535" type="String">
- <description>Either the static hex icon value or the binary image file name identifier (sent by PutFile).</description>
- </param>
- <param name="imageType" type="ImageType">
- <description>Describes, whether it is a static or dynamic image.</description>
- </param>
- </struct>
-
- <struct name="SoftButton">
- <param name="type" type="SoftButtonType">
- <description>Describes, whether it is text, highlighted text, icon, or dynamic image. See softButtonType</description>
- </param>
- <param name="text" minlength="0" maxlength="500" type="String" mandatory="false">
- <description>Optional text to display (if defined as TEXT or BOTH)</description>
- </param>
- <param name="image" type="Image" mandatory="false">
- <description>Optional image struct for SoftButton (if defined as IMAGE or BOTH)</description>
- </param>
- <param name="isHighlighted" type="Boolean" defvalue="false" mandatory="false">
- <description>
- True, if highlighted
- False, if not highlighted
- </description>
- </param>
- <param name="softButtonID" type="Integer" minvalue="0" maxvalue="65535">
- <description>Value which is returned via OnButtonPress / OnButtonEvent</description>
- </param>
- <param name="systemAction" type="SystemAction" defvalue="DEFAULT_ACTION" mandatory="false">
- <description>Parameter indicating whether selecting a SoftButton shall call a specific system action. This is intended to allow Notifications to bring the callee into full / focus; or in the case of persistent overlays, the overlay can persist when a SoftButton is pressed.</description>
- </param>
- </struct>
-
- <struct name="Choice">
- <description>A choice is an option given to the user, which can be selected either by menu, or through voice recognition system.</description>
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="65535" />
- <param name="menuName" type="String" maxlength="500" />
- <param name="vrCommands" type="String" minsize="1" maxsize="100" maxlength="99" array="true" />
- <param name="image" type="Image" mandatory="false"/>
- <param name="secondaryText" maxlength="500" type="String" mandatory="false" scope="partner">
- <description>Optional secondary text to display; e.g. address of POI in a search result entry</description>
- </param>
- <param name="tertiaryText" maxlength="500" type="String" mandatory="false" scope="partner">
- <description>Optional tertiary text to display; e.g. distance to POI for a search result entry</description>
- </param>
- <param name="secondaryImage" type="Image" mandatory="false" scope="partner">
- <description>Optional secondary image struct for choice</description>
- </param>
- </struct>
-
- <struct name="VrHelpItem">
- <param name="text" maxlength="500" type="String">
- <description>Text to display for VR Help item</description>
- </param>
- <param name="image" type="Image" mandatory="false">
- <description>Image struct for VR Help item</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="100">
- <description>Position to display item in VR Help list</description>
- </param>
- </struct>
-
- <struct name="SyncMsgVersion">
- <description>Specifies the version number of the SYNC V4 protocol, that is supported by the mobile application</description>
-
- <param name="majorVersion" type="Integer" minvalue="1" maxvalue="10">
- <description>The major version indicates versions that is not-compatible to previous versions.</description>
- </param>
- <param name="minorVersion" type="Integer" minvalue="0" maxvalue="1000">
- <description>The minor version indicates a change to a previous version that should still allow to be run on an older version (with limited functionality)</description>
- </param>
- </struct>
-
- <enum name="GlobalProperty">
- <description>The different global properties.</description>
- <element name="HELPPROMPT">
- <description>The property helpPrompt of setGlobalProperties</description>
- </element>
- <element name="TIMEOUTPROMPT">
- <description>The property timeoutPrompt of setGlobalProperties</description>
- </element>
- <element name="VRHELPTITLE">
- <description>The property vrHelpTitle of setGlobalProperties</description>
- </element>
- <element name="VRHELPITEMS">
- <description>The property array of vrHelp of setGlobalProperties</description>
- </element>
- <element name="MENUNAME" scope="partner">
- <description>The property in-app menu name of setGlobalProperties</description>
- </element>
- <element name="MENUICON" scope="partner">
- <description>The property in-app menu icon of setGlobalProperties</description>
- </element>
- <element name="KEYBOARDPROPERTIES" scope="partner">
- <description>The on-screen keyboard configuration of setGlobalProperties</description>
- </element>
- </enum>
-
- <enum name="CompassDirection">
- <description>The list of potential compass directions</description>
- <element name="NORTH">
- </element>
- <element name="NORTHWEST">
- </element>
- <element name="WEST">
- </element>
- <element name="SOUTHWEST">
- </element>
- <element name="SOUTH">
- </element>
- <element name="SOUTHEAST">
- </element>
- <element name="EAST">
- </element>
- <element name="NORTHEAST">
- </element>
- </enum>
-
- <enum name="Dimension">
- <description>The supported dimensions of the GPS</description>
- <element name="NO_FIX" internal_name="Dimension_NO_FIX">
- <description>No GPS at all</description>
- </element>
- <element name="2D" internal_name="Dimension_2D">
- <description>Longitude and lattitude</description>
- </element>
- <element name="3D" internal_name="Dimension_3D">
- <description>Longitude and lattitude and altitude</description>
- </element>
- </enum>
-
- <enum name="PRNDL">
- <description>The selected gear.</description>
- <element name="PARK">
- <description>Parking</description>
- </element>
- <element name="REVERSE">
- <description>Reverse gear</description>
- </element>
- <element name="NEUTRAL">
- <description>No gear</description>
- </element>
- <element name="DRIVE">
- </element>
- <element name="SPORT">
- <description>Drive Sport mode</description>
- </element>
- <element name="LOWGEAR">
- <description>1st gear hold</description>
- </element>
- <element name="FIRST">
- </element>
- <element name="SECOND">
- </element>
- <element name="THIRD">
- </element>
- <element name="FOURTH">
- </element>
- <element name="FIFTH">
- </element>
- <element name="SIXTH">
- </element>
- <element name="SEVENTH">
- </element>
- <element name="EIGHTH">
- </element>
- <element name="UNKNOWN">
- </element>
- <element name="FAULT">
- </element>
- </enum>
-
- <enum name="ComponentVolumeStatus">
- <description>The volume status of a vehicle component.</description>
- <element name="UNKNOWN" internal_name="CVS_UNKNOWN">
- </element>
- <element name="NORMAL" internal_name="CVS_NORMAL">
- </element>
- <element name="LOW" internal_name="CVS_LOW">
- </element>
- <element name="FAULT" internal_name="CVS_FAULT">
- </element>
- <element name="ALERT" internal_name="CVS_ALERT">
- </element>
- <element name="NOT_SUPPORTED" internal_name="CVS_NOT_SUPPORTED">
- </element>
- </enum>
-
- <struct name="SingleTireStatus">
- <param name="status" type="ComponentVolumeStatus">
- <description>See ComponentVolumeStatus.</description>
- </param>
- </struct>
-
- <enum name="WarningLightStatus">
- <description>Reflects the status of a cluster instrument warning light.</description>
- <element name="OFF" internal_name="WLS_OFF">
- </element>
- <element name="ON" internal_name="WLS_ON">
- </element>
- <element name="FLASH" internal_name="WLS_FLASH">
- </element>
- <element name="NOT_USED" internal_name="WLS_NOT_USED">
- </element>
- </enum>
-
- <enum name="VehicleDataNotificationStatus">
- <description>Reflects the status of a vehicle data notification.</description>
- <element name="NOT_SUPPORTED" internal_name="VDNS_NOT_SUPPORTED">
- </element>
- <element name="NORMAL" internal_name="VDNS_NORMAL">
- </element>
- <element name="ACTIVE" internal_name="VDNS_ACTIVE">
- </element>
- <element name="NOT_USED" internal_name="VDNS_NOT_USED">
- </element>
- </enum>
-
- <enum name="IgnitionStableStatus">
- <description>Reflects the ignition switch stability.</description>
- <element name="IGNITION_SWITCH_NOT_STABLE">
- </element>
- <element name="IGNITION_SWITCH_STABLE">
- </element>
- <element name="MISSING_FROM_TRANSMITTER">
- </element>
- </enum>
-
- <enum name="IgnitionStatus">
- <description>Reflects the status of ignition.</description>
- <element name="UNKNOWN" internal_name="IS_UNKNOWN">
- </element>
- <element name="OFF" internal_name="IS_OFF">
- </element>
- <element name="ACCESSORY" internal_name="IS_ACCESSORY">
- </element>
- <element name="RUN" internal_name="IS_RUN">
- </element>
- <element name="START" internal_name="IS_START">
- </element>
- <element name="INVALID" internal_name="IS_INVALID">
- </element>
- </enum>
-
- <enum name="VehicleDataEventStatus">
- <description>Reflects the status of a vehicle data event; e.g. a seat belt event status.</description>
- <element name="NO_EVENT" internal_name="VDES_NO_EVENT">
- </element>
- <element name="NO" internal_name="VDES_NO">
- </element>
- <element name="YES" internal_name="VDES_YES">
- </element>
- <element name="NOT_SUPPORTED" internal_name="VDES_NOT_SUPPORTED">
- </element>
- <element name="FAULT" internal_name="VDES_FAULT">
- </element>
- </enum>
-
- <enum name="DeviceLevelStatus">
- <description>Reflects the reported battery status of the connected device, if reported.</description>
- <element name="ZERO_LEVEL_BARS">
- </element>
- <element name="ONE_LEVEL_BARS">
- </element>
- <element name="TWO_LEVEL_BARS">
- </element>
- <element name="THREE_LEVEL_BARS">
- </element>
- <element name="FOUR_LEVEL_BARS">
- </element>
- <element name="NOT_PROVIDED">
- </element>
- </enum>
-
- <enum name="PrimaryAudioSource">
- <description>Reflects the current primary audio source (if selected).</description>
- <element name="NO_SOURCE_SELECTED">
- </element>
- <element name="USB">
- </element>
- <element name="USB2">
- </element>
- <element name="BLUETOOTH_STEREO_BTST">
- </element>
- <element name="LINE_IN">
- </element>
- <element name="IPOD">
- </element>
- <element name="MOBILE_APP">
- </element>
- </enum>
-
- <enum name="WiperStatus">
- <description>Reflects the status of the wipers.</description>
- <element name="OFF" />
- <element name="AUTO_OFF" />
- <element name="OFF_MOVING" />
- <element name="MAN_INT_OFF" />
- <element name="MAN_INT_ON" />
- <element name="MAN_LOW" />
- <element name="MAN_HIGH" />
- <element name="MAN_FLICK" />
- <element name="WASH" />
- <element name="AUTO_LOW" />
- <element name="AUTO_HIGH" />
- <element name="COURTESYWIPE" />
- <element name="AUTO_ADJUST" />
- <element name="STALLED" />
- <element name="NO_DATA_EXISTS" />
- </enum>
-
- <enum name="VehicleDataStatus">
- <description>Reflects the status of a binary vehicle data item.</description>
- <element name="NO_DATA_EXISTS" internal_name="VDS_NO_DATA_EXISTS">
- </element>
- <element name="OFF" internal_name="VDS_OFF">
- </element>
- <element name="ON" internal_name="VDS_ON">
- </element>
- </enum>
-
- <enum name="MaintenanceModeStatus">
- <description>Reflects the status of a vehicle maintenance mode.</description>
- <element name="NORMAL" internal_name="MMS_NORMAL">
- </element>
- <element name="NEAR" internal_name="MMS_NEAR">
- </element>
- <element name="ACTIVE" internal_name="MMS_ACTIVE">
- </element>
- <element name="FEATURE_NOT_PRESENT" internal_name="MMS_FEATURE_NOT_PRESENT">
- </element>
- </enum>
-
- <enum name="VehicleDataActiveStatus">
- <description>Reflects the status of given vehicle component.</description>
- <element name="INACTIVE_NOT_CONFIRMED" internal_name="VDAS_INACTIVE_NOT_CONFIRMED">
- </element>
- <element name="INACTIVE_CONFIRMED" internal_name="VDAS_INACTIVE_CONFIRMED">
- </element>
- <element name="ACTIVE_NOT_CONFIRMED" internal_name="VDAS_ACTIVE_NOT_CONFIRMED">
- </element>
- <element name="ACTIVE_CONFIRMED" internal_name="VDAS_ACTIVE_CONFIRMED">
- </element>
- <element name="FAULT" internal_name="VDAS_FAULT">
- </element>
- </enum>
-
- <enum name="AmbientLightStatus">
- <description>Reflects the status of the ambient light sensor.</description>
- <element name="NIGHT" />
- <element name="TWILIGHT_1" />
- <element name="TWILIGHT_2" />
- <element name="TWILIGHT_3" />
- <element name="TWILIGHT_4" />
- <element name="DAY" />
- <element name="UNKNOWN" />
- <element name="INVALID" />
- </enum>
-
- <struct name="BeltStatus">
- <param name="driverBeltDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsDrvBelt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBeltDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsPasBelt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw1PasBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverBuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw1DrvBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow2BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw2lBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerChildDetected" type="VehicleDataEventStatus">
- <description>References signal "VedsRw1PasChld_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow2BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw2rBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow2BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw2mBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow3BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw3mBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow3BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw3lBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow3BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw3rBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRearInflatableBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw2lRib_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRearInflatableBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw2rRib_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BeltDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsRw1mBelt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BuckleBelted" type="VehicleDataEventStatus">
- <description>References signal "VedsRw1mBckl_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- </struct>
-
- <struct name="BodyInformation">
- <param name="parkBrakeActive" type="Boolean">
- <description>References signal "PrkBrkActv_B_Actl".</description>
- </param>
- <param name="ignitionStableStatus" type="IgnitionStableStatus">
- <description>References signal "Ignition_Switch_Stable". See IgnitionStableStatus.</description>
- </param>
- <param name="ignitionStatus" type="IgnitionStatus">
- <description>References signal "Ignition_status". See IgnitionStatus.</description>
- </param>
- <param name="driverDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatDrv_B_Actl".</description>
- </param>
- <param name="passengerDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatPsngr_B_Actl".</description>
- </param>
- <param name="rearLeftDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRl_B_Actl".</description>
- </param>
- <param name="rearRightDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRr_B_Actl".</description>
- </param>
- </struct>
-
- <struct name="DeviceStatus">
- <param name="voiceRecOn" type="Boolean">
- <description>References signal "CPM_VoiceRec_STAT".</description>
- </param>
- <param name="btIconOn" type="Boolean">
- <description>References signal "BT_ICON".</description>
- </param>
- <param name="callActive" type="Boolean">
- <description>References signal "CPM_Call_Active_STAT".</description>
- </param>
- <param name="phoneRoaming" type="Boolean">
- <description>References signal "CPM_Phone_Roaming_STAT".</description>
- </param>
- <param name="textMsgAvailable" type="Boolean">
- <description>References signal "CPM_TextMsg_AVAL".</description>
- </param>
- <param name="battLevelStatus" type="DeviceLevelStatus">
- <description>Device battery level status. References signal "CPM_Batt_Level_STAT". See DeviceLevelStatus.</description>
- </param>
- <param name="stereoAudioOutputMuted" type="Boolean">
- <description>References signal "CPM_Stereo_Audio_Output".</description>
- </param>
- <param name="monoAudioOutputMuted" type="Boolean">
- <description>References signal "CPM_Mono_Audio_Output".</description>
- </param>
- <param name="signalLevelStatus" type="DeviceLevelStatus">
- <description>Device signal level status. References signal "CPM_Signal_Strength_STAT". See DeviceLevelStatus.</description>
- </param>
- <param name="primaryAudioSource" type="PrimaryAudioSource">
- <description>References signal "CPM_Stereo_PAS_Source". See PrimaryAudioSource.</description>
- </param>
- <param name="eCallEventActive" type="Boolean">
- <description>References signal "eCall_Event".</description>
- </param>
- </struct>
-
- <struct name="HeadLampStatus">
- <param name="lowBeamsOn" type="Boolean">
- <description>Status of the low beam lamps. References signal "HeadLampLoActv_B_Stat".</description>
- </param>
- <param name="highBeamsOn" type="Boolean">
- <description>Status of the high beam lamps. References signal "HeadLghtHiOn_B_Stat".</description>
- </param>
- <param name="ambientLightSensorStatus" type="AmbientLightStatus">
- <description>Status of the ambient light sensor.</description>
- </param>
- </struct>
-
- <struct name="engineInfo">
- <param name="electricFuelConsumption" type="Float" minvalue="0" maxvalue="30000">
- <description>
- Indicates the electric fuel consumption in terms of gasoline equivalent volume to support fuel economy equivalent calculations.
- Note:Plug-in vehicle use only!
- References signal "ElFuelFlw_Vl_Dsply".
- </description>
- </param>
- <param name="stateOfCharge" type="Float" minvalue="0" maxvalue="100">
- <description>Percent state of charge for the high voltage battery. References signal "BattTracSoc_Pc_Dsply".</description>
- </param>
- <param name="fuelMaintenanceMode" type="MaintenanceModeStatus">
- <description>Current status of fuel maintenance mode (if present on hybrid vehicles). References signal "FuelMaintMde_D_Dsply".</description>
- </param>
- <param name="distanceToEmpty" type="Float" minvalue="0" maxvalue="1000">
- <description>
- Electric range (DTE) in km. References signal "VehElRnge_L_Dsply".
- 0xFFE = No Data Exists
- 0xFFF = Fault
- </description>
- </param>
- </struct>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ -->
-<!-- Ford Specific Data Items -->
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <enum name="FuelCutoffStatus" scope="internal">
- <description>Reflects the status of the RCM fuel cutoff.</description>
- <element name="TERMINATE_FUEL" internal_name="FCS_TERMINATE_FUEL">
- </element>
- <element name="NORMAL_OPERATION" internal_name="FCS_NORMAL_OPERATION">
- </element>
- <element name="FAULT" internal_name="FCS_FAULT">
- </element>
- </enum>
-
- <enum name="EmergencyEventType" scope="internal">
- <description>Reflects the emergency event status of the vehicle.</description>
- <element name="NO_EVENT" internal_name="EET_NO_EVENT">
- </element>
- <element name="FRONTAL" internal_name="EET_FRONTAL">
- </element>
- <element name="SIDE" internal_name="EET_SIDE">
- </element>
- <element name="REAR" internal_name="EET_REAR">
- </element>
- <element name="ROLLOVER" internal_name="EET_ROLLOVER">
- </element>
- <element name="NOT_SUPPORTED" internal_name="EET_NOT_SUPPORTED">
- </element>
- <element name="FAULT" internal_name="EET_FAULT">
- </element>
- </enum>
-
- <enum name="ECallConfirmationStatus" scope="internal">
- <description>Reflects the status of the eCall Notification.</description>
- <element name="NORMAL" internal_name="ECCS_NORMAL">
- </element>
- <element name="CALL_IN_PROGRESS" internal_name="ECCS_CALL_IN_PROGRESS">
- </element>
- <element name="CALL_CANCELLED" internal_name="ECCS_CALL_CANCELLED">
- </element>
- <element name="CALL_COMPLETED">
- </element>
- <element name="CALL_UNSUCCESSFUL" internal_name="ECCS_CALL_UNSUCCESSFUL">
- </element>
- <element name="ECALL_CONFIGURED_OFF" internal_name="ECCS_ECALL_CONFIGURED_OFF">
- </element>
- <element name="CALL_COMPLETE_DTMF_TIMEOUT" internal_name="ECCS_CALL_COMPLETE_DTMF_TIMEOUT">
- </element>
- </enum>
-
- <enum name="FileType">
- <description>Enumeration listing possible file types.</description>
- <element name="GRAPHIC_BMP" />
- <element name="GRAPHIC_JPEG" />
- <element name="GRAPHIC_PNG" />
- <element name="AUDIO_WAVE" />
- <element name="AUDIO_MP3" />
- <element name="AUDIO_AAC" />
- <element name="BINARY" />
- <element name="JSON" />
- </enum>
-
- <enum name="PowerModeQualificationStatus" scope="internal">
- <description>Reflects the status of the current power mode qualification.</description>
- <element name="POWER_MODE_UNDEFINED">
- </element>
- <element name="POWER_MODE_EVALUATION_IN_PROGRESS">
- </element>
- <element name="NOT_DEFINED">
- </element>
- <element name="POWER_MODE_OK">
- </element>
- </enum>
-
- <enum name="PowerModeStatus" scope="internal">
- <description>Reflects the status of the current power mode.</description>
- <element name="KEY_OUT">
- </element>
- <element name="KEY_RECENTLY_OUT">
- </element>
- <element name="KEY_APPROVED_0">
- </element>
- <element name="POST_ACCESORY_0">
- </element>
- <element name="ACCESORY_1">
- </element>
- <element name="POST_IGNITION_1">
- </element>
- <element name="IGNITION_ON_2">
- </element>
- <element name="RUNNING_2">
- </element>
- <element name="CRANK_3">
- </element>
- </enum>
-
- <enum name="CarModeStatus" scope="internal">
- <description>Reflects the status of the current car mode.</description>
- <element name="NORMAL" internal_name="CMS_NORMAL">
- </element>
- <element name="FACTORY" internal_name="CMS_FACTORY">
- </element>
- <element name="TRANSPORT" internal_name="CMS_TRANSPORT">
- </element>
- <element name="CRASH" internal_name="CMS_CRASH">
- </element>
- </enum>
-
- <struct name="ECallInfo" scope="internal">
- <param name="eCallNotificationStatus" type="VehicleDataNotificationStatus">
- <description>References signal "eCallNotification_4A". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="auxECallNotificationStatus" type="VehicleDataNotificationStatus">
- <description>References signal "eCallNotification". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="eCallConfirmationStatus" type="ECallConfirmationStatus">
- <description>References signal "eCallConfirmation". See ECallConfirmationStatus.</description>
- </param>
- </struct>
-
- <struct name="AirbagStatus" scope="internal">
- <param name="driverAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverSideAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsDrvSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverCurtainAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsDrvCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsPasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerCurtainAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsPasCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverKneeAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsKneeDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerSideAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsPasSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerKneeAirbagDeployed" type="VehicleDataEventStatus">
- <description>References signal "VedsKneePasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- </struct>
-
- <struct name="EmergencyEvent" scope="internal">
- <param name="emergencyEventType" type="EmergencyEventType">
- <description>References signal "VedsEvntType_D_Ltchd". See EmergencyEventType.</description>
- </param>
- <param name="fuelCutoffStatus" type="FuelCutoffStatus">
- <description>References signal "RCM_FuelCutoff". See FuelCutoffStatus.</description>
- </param>
- <param name="rolloverEvent" type="VehicleDataEventStatus">
- <description>References signal "VedsEvntRoll_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
-
- <param name="maximumChangeVelocity" type="Integer" minvalue="0" maxvalue="255">
- <description>References signal "VedsMaxDeltaV_D_Ltchd". Change in velocity in KPH. Additional reserved values:
- 0x00 No event
- 0xFE Not supported
- 0xFF Fault
- </description>
- </param>
- <param name="multipleEvents" type="VehicleDataEventStatus">
- <description>References signal "VedsMultiEvnt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- </struct>
-
- <struct name="ClusterModeStatus" scope="internal">
- <param name="powerModeActive" type="Boolean">
- <description>References signal "PowerMode_UB".</description>
- </param>
- <param name="powerModeQualificationStatus" type="PowerModeQualificationStatus">
- <description>References signal "PowerModeQF". See PowerModeQualificationStatus.</description>
- </param>
- <param name="carModeStatus" type="CarModeStatus">
- <description>References signal "CarMode". See CarMode.</description>
- </param>
- <param name="powerModeStatus" type="PowerModeStatus">
- <description>References signal "PowerMode". See PowerMode.</description>
- </param>
- </struct>
-
- <struct name="MyKey" scope="partner">
- <param name="e911Override" type="VehicleDataStatus">
- <description>Indicates whether e911 override is on. References signal "MyKey_e911Override_St". See VehicleDataStatus.</description>
- </param>
- </struct>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-<!-- / Ford Specific Data Items -->
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <enum name="VehicleDataResultCode">
- <description>Enumeration that describes possible result codes of a vehicle data entry request.</description>
- <element name="SUCCESS" internal_name="VDRC_SUCCESS"/>
- <element name="TRUNCATED_DATA" internal_name="VDRC_TRUNCATED_DATA"/>
- <element name="DISALLOWED" internal_name="VDRC_DISALLOWED"/>
- <element name="USER_DISALLOWED" internal_name="VDRC_USER_DISALLOWED"/>
- <element name="INVALID_ID" internal_name="VDRC_INVALID_ID"/>
- <element name="VEHICLE_DATA_NOT_AVAILABLE" internal_name="VDRC_DATA_NOT_AVAILABLE"/>
- <element name="DATA_ALREADY_SUBSCRIBED" internal_name="VDRC_DATA_ALREADY_SUBSCRIBED"/>
- <element name="DATA_NOT_SUBSCRIBED" internal_name="VDRC_DATA_NOT_SUBSCRIBED"/>
- <element name="IGNORED" internal_name="VDRC_IGNORED"/>
- </enum>
-
- <struct name="TireStatus">
- <description>The status and pressure of the tires.</description>
-
- <param name="pressureTelltale" type="WarningLightStatus">
- <description>Status of the Tire Pressure Telltale. See WarningLightStatus.</description>
- </param>
- <param name="leftFront" type="SingleTireStatus">
- <description>The status of the left front tire.</description>
- </param>
- <param name="rightFront" type="SingleTireStatus">
- <description>The status of the right front tire.</description>
- </param>
- <param name="leftRear" type="SingleTireStatus">
- <description>The status of the left rear tire.</description>
- </param>
- <param name="rightRear" type="SingleTireStatus">
- <description>The status of the right rear tire.</description>
- </param>
- <param name="innerLeftRear" type="SingleTireStatus">
- <description>The status of the inner left rear.</description>
- </param>
- <param name="innerRightRear" type="SingleTireStatus">
- <description>The status of the inner right rear.</description>
- </param>
- </struct>
-
- <struct name="GPSData">
- <description>Struct with the GPS data.</description>
- <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180">
- </param>
- <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90">
- </param>
- <param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100">
- <description>The current UTC year.</description>
- </param>
- <param name="utcMonth" type="Integer" minvalue="1" maxvalue="12">
- <description>The current UTC month.</description>
- </param>
- <param name="utcDay" type="Integer" minvalue="1" maxvalue="31">
- <description>The current UTC day.</description>
- </param>
- <param name="utcHours" type="Integer" minvalue="0" maxvalue="23">
- <description>The current UTC hour.</description>
- </param>
- <param name="utcMinutes" type="Integer" minvalue="0" maxvalue="59">
- <description>The current UTC minute.</description>
- </param>
- <param name="utcSeconds" type="Integer" minvalue="0" maxvalue="59">
- <description>The current UTC second.</description>
- </param>
- <param name="compassDirection" type="CompassDirection">
- <description>See CompassDirection.</description>
- </param>
- <param name="pdop" type="Float" minvalue="0" maxvalue="10">
- <description>PDOP.</description>
- </param>
- <param name="hdop" type="Float" minvalue="0" maxvalue="10">
- <description>HDOP.</description>
- </param>
- <param name="vdop" type="Float" minvalue="0" maxvalue="10">
- <description>VDOP.</description>
- </param>
- <param name="actual" type="Boolean">
- <description>
- True, if actual.
- False, if infered.
- </description>
- </param>
- <param name="satellites" type="Integer" minvalue="0" maxvalue="31">
- <description>Number of satellites in view</description>
- </param>
- <param name="dimension" type="Dimension">
- <description>See Dimension</description>
- </param>
- <param name="altitude" type="Float" minvalue="-10000" maxvalue="10000">
- <description>Altitude in meters</description>
- </param>
- <param name="heading" type="Float" minvalue="0" maxvalue="359.99">
- <description>The heading. North is 0. Resolution is 0.01</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="500">
- <description>The speed in KPH</description>
- </param>
- </struct>
-
- <struct name="VehicleDataResult">
- <description>Individual published data request result</description>
- <param name="dataType" type="VehicleDataType">
- <description>Defined published data element type.</description>
- </param>
- <param name="resultCode" type="VehicleDataResultCode">
- <description>Published data result code.</description>
- </param>
- </struct>
-
- <struct name="DIDResult">
- <description>Individual requested DID result and data</description>
- <param name="resultCode" type="VehicleDataResultCode">
- <description>Individual DID result code.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Location of raw data from vehicle data DID</description>
- </param>
- <param name="data" type="String" maxlength="5000" mandatory="false">
- <description>Raw DID-based data returned for requested element.</description>
- </param>
- </struct>
-
- <struct name="StartTime">
- <param name="hours" type="Integer" minvalue="0" maxvalue="59">
- <description>
- The hour of the media clock.
- Some radios only support a max of 19 hours. If out of range, it will be rejected.
- </description>
- </param>
- <param name="minutes" type="Integer" minvalue="0" maxvalue="59" />
- <param name="seconds" type="Integer" minvalue="0" maxvalue="59" />
- </struct>
-
- <struct name="TextField">
- <param name="name" type="TextFieldName">
- <description>The name that identifies the field. See TextFieldName.</description>
- </param>
- <param name="characterSet" type="CharacterSet">
- <description>The character set that is supported in this field. See CharacterSet.</description>
- </param>
- <param name="width" type="Integer" minvalue="1" maxvalue="500">
- <description>The number of characters in one row of this field.</description>
- </param>
- <param name="rows" type="Integer" minvalue="1" maxvalue="3">
- <description>The number of rows of this field.</description>
- </param>
- </struct>
-
- <struct name="ImageResolution">
- <param name="resolutionWidth" type="Integer" minvalue="1" maxvalue="10000">
- <description>The image resolution width.</description>
- </param>
- <param name="resolutionHeight" type="Integer" minvalue="1" maxvalue="10000">
- <description>The image resolution height.</description>
- </param>
- </struct>
-
- <struct name="ImageField">
- <param name="name" type="ImageFieldName">
- <description>The name that identifies the field. See ImageFieldName.</description>
- </param>
- <param name="imageTypeSupported" type="FileType" array="true">
- <description>The image types that are supported in this field. See FileType.</description>
- </param>
- <param name="imageResolution" type="ImageResolution">
- <description>The image resolution of this field.</description>
- </param>
- </struct>
-
- <struct name="TouchCoord">
- <param name="x" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The x coordinate of the touch.</description>
- </param>
- <param name="y" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The y coordinate of the touch.</description>
- </param>
- </struct>
-
- <enum name="TouchType">
- <element name="BEGIN"/>
- <element name="MOVE"/>
- <element name="END"/>
- </enum>
-
- <struct name="TouchEvent">
- <param name="id" type="Integer" mandatory="true" minvalue="0" maxvalue="9">
- <description>
- A touch's unique identifier. The application can track the current touch events by id.
- If a touch event has type begin, the id should be added to the set of touches.
- If a touch event has type end, the id should be removed from the set of touches.
- </description>
- </param>
- <param name="ts" type="Integer" mandatory="true" array="true" minvalue="0" maxvalue="2147483647" minsize="1" maxsize="1000">
- <description>
- The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds.
- The timestamp is used to determined the rate of change of position of a touch.
- The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user.
- If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array.
- </description>
- </param>
- <param name="c" type="TouchCoord" mandatory="true" array="true" minsize="1" maxsize="1000">
- </param>
- </struct>
-
- <struct name="Coordinate">
- <param name="xCoord" type="Integer" mandatory="true">
- </param>
- <param name="yCoord" type="Integer" mandatory="true">
- </param>
- </struct>
-
- <struct name="TouchArea">
- <param name="rotationAngle" type="Float" mandatory="false" minvalue="0" maxvalue="360">
- </param>
- <param name="radiusCoord" type="Coordinate" mandatory="true">
- </param>
- </struct>
-
- <struct name="TouchEventCapabilities">
- <param name="pressAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="multiTouchAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="doublePressAvailable" type="Boolean" mandatory="true">
- </param>
- </struct>
-
- <struct name="ScreenParams" scope="partner">
- <param name="resolution" type="ImageResolution" mandatory="true">
- <description>The resolution of the prescribed screen area.</description>
- </param>
- <param name="touchEventAvailable" type="TouchEventCapabilities" mandatory="false">
- <description>Types of screen touch events available in screen area.</description>
- </param>
- </struct>
-
- <enum name="PermissionStatus">
- <description>Enumeration that describes possible permission states of a policy table entry.</description>
- <element name="ALLOWED" internal_name="PS_ALLOWED"/>
- <element name="DISALLOWED" internal_name="PS_DISALLOWED"/>
- <element name="USER_DISALLOWED" internal_name="PS_USER_DISALLOWED"/>
- <element name="USER_CONSENT_PENDING" internal_name="PS_USER_CONSENT_PENDING"/>
- </enum>
-
- <struct name="HMIPermissions">
- <param name="allowed" type="HMILevel" minsize="0" maxsize="100" array="true">
- <description>A set of all HMI levels that are permitted for this given RPC.</description>
- </param>
- <param name="userDisallowed" type="HMILevel" minsize="0" maxsize="100" array="true">
- <description>A set of all HMI levels that are prohibited for this given RPC.</description>
- </param>
- </struct>
-
- <struct name="ParameterPermissions">
- <param name="allowed" type="String" minsize="0" maxsize="100" maxlength = "100" array="true">
- <description>A set of all parameters that are permitted for this given RPC.</description>
- </param>
- <param name="userDisallowed" type="String" minsize="0" maxsize="100" maxlength = "100" array="true">
- <description>A set of all parameters that are prohibited for this given RPC.</description>
- </param>
- </struct>
-
- <struct name="PermissionItem">
- <param name="rpcName" type="String" maxlength="100">
- <description>Name of the individual RPC in the policy table.</description>
- </param>
- <param name="hmiPermissions" type="HMIPermissions" />
- <param name="parameterPermissions" type="ParameterPermissions" />
- </struct>
-
- <struct name="DisplayCapabilities">
- <description>Contains information about the display capabilities.</description>
- <param name="displayType" type="DisplayType">
- <description>The type of the display. See DisplayType</description>
- </param>
- <param name="textFields" type="TextField" minsize="1" maxsize="100" array="true">
- <description>A set of all fields that support text data. See TextField</description>
- </param>
- <param name="imageFields" type="ImageField" minsize="1" maxsize="100" array="true">
- <description>A set of all fields that support images. See ImageField</description>
- </param>
- <param name="mediaClockFormats" type="MediaClockFormat" minsize="1" maxsize="100" array="true">
- <description>A set of all supported formats of the media clock. See MediaClockFormat</description>
- </param>
- <param name="graphicSupported" type="Boolean">
- <description>The display's persistent screen supports referencing a static or dynamic image.</description>
- </param>
- <param name="templatesAvailable" type="String" minsize="0" maxsize="100" maxlength="100" array="true" scope="partner">
- <description>A set of all predefined persistent display templates available on headunit. To be referenced in SetDisplayLayout.</description>
- </param>
- <param name="screenParams" type="ScreenParams" mandatory="false">
- <description>A set of all parameters related to a prescribed screen area (e.g. for video / touch input).</description>
- </param>
- <param name="numCustomPresetsAvailable" type="Integer" minvalue="1" maxvalue="100" mandatory="false">
- <description>The number of on-screen custom presets available (if any); otherwise omitted.</description>
- </param>
- </struct>
-
- <struct name="ButtonCapabilities">
- <description>Contains information about a button's capabilities.</description>
- <param name="name" type="ButtonName">
- <description>The name of the button. See ButtonName.</description>
- </param>
- <param name="shortPressAvailable" type="Boolean">
- <description>
- The button supports a short press.
- Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.
- </description>
- </param>
- <param name="longPressAvailable" type="Boolean">
- <description>
- The button supports a LONG press.
- Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.
- </description>
- </param>
- <param name="upDownAvailable" type="Boolean">
- <description>
- The button supports "button down" and "button up".
- Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.
- Whenever the button is released, onButtonEvent( UP) will be invoked.
- </description>
- </param>
- </struct>
-
- <struct name="SoftButtonCapabilities">
- <description>Contains information about a SoftButton's capabilities.</description>
- <param name="shortPressAvailable" type="Boolean">
- <description>
- The button supports a short press.
- Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.
- </description>
- </param>
- <param name="longPressAvailable" type="Boolean">
- <description>
- The button supports a LONG press.
- Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.
- </description>
- </param>
- <param name="upDownAvailable" type="Boolean">
- <description>
- The button supports "button down" and "button up".
- Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.
- Whenever the button is released, onButtonEvent( UP) will be invoked.
- </description>
- </param>
- <param name="imageSupported" type="Boolean">
- <description>The button supports referencing a static or dynamic image.</description>
- </param>
- </struct>
-
- <struct name="PresetBankCapabilities">
- <description>Contains information about on-screen preset capabilities.</description>
- <param name="onScreenPresetsAvailable" type="Boolean">
- <description>Onscreen custom presets are available.</description>
- </param>
- </struct>
-
- <struct name="MenuParams">
- <param name="parentID" type="Integer" minvalue="0" maxvalue="2000000000" defvalue="0" mandatory="false">
- <description>
- unique ID of the sub menu, the command will be added to.
- If not provided, it will be provided to the top level of the in application menu.
- </description>
- </param>
-
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
- <description>
- Position within the items that are are at top level of the in application menu.
- 0 will insert at the front.
- 1 will insert at the second position.
- if position is greater or equal than the number of items on top level, the sub menu will be appended to the end.
- If this param was omitted the entry will be added at the end.
- </description>
- </param>
-
- <param name="menuName" type="String" maxlength="500">
- <description>Text to show in the menu for this sub menu.</description>
- </param>
- </struct>
-
- <struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to speak and the type (like text or SAPI)</description>
- <param name="text" maxlength="500" type="String">
- <description>
- The text or phonemes to speak.
- May not be empty.
- </description>
- </param>
- <param name="type" type="SpeechCapabilities">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities</description>
- </param>
- </struct>
-
- <struct name="Turn">
- <param name="navigationText" type="String" maxlength="500" mandatory="false">
- </param>
- <param name="turnIcon" type="Image" mandatory="false">
- </param>
- </struct>
-
- <struct name="VehicleType">
- <param name="make" type="String" maxlength="500" mandatory="false">
- <description>Make of the vehicle, e.g. Ford</description>
- </param>
- <param name="model" type="String" maxlength="500" mandatory="false">
- <description>Model of the vehicle, e.g. Fiesta</description>
- </param>
- <param name="modelYear" type="String" maxlength="500" mandatory="false">
- <description>Model Year of the vehicle, e.g. 2013</description>
- </param>
- <param name="trim" type="String" maxlength="500" mandatory="false">
- <description>Trim of the vehicle, e.g. SE</description>
- </param>
- </struct>
-
- <enum name="KeyboardLayout" scope="partner">
- <description>Enumeration listing possible keyboard layouts.</description>
- <element name="QWERTY" />
- <element name="QWERTZ" />
- <element name="AZERTY" />
- </enum>
-
- <enum name="KeyboardEvent" platform="MobileNav">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="KEYPRESS" />
- <element name="ENTRY_SUBMITTED" />
- <element name="ENTRY_CANCELLED" />
- <element name="ENTRY_ABORTED" />
- </enum>
-
- <enum name="KeypressMode" scope="partner">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="SINGLE_KEYPRESS">
- <description>Each keypress is individually sent as the user presses the keyboard keys.</description>
- </element>
- <element name="QUEUE_KEYPRESSES">
- <description>The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.</description>
- </element>
- <element name="RESEND_CURRENT_ENTRY">
- <description>The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.</description>
- </element>
- </enum>
-
- <struct name="KeyboardProperties">
- <description>Configuration of on-screen keyboard (if available).</description>
-
- <param name="language" type="Language" mandatory="false">
- <description>The keyboard language.</description>
- </param>
-
- <param name="keyboardLayout" type="KeyboardLayout" mandatory="false" >
- <description>Desired keyboard layout.</description>
- </param>
-
- <param name="keypressMode" type="KeypressMode" mandatory="false" >
- <description>
- Desired keypress mode.
- If omitted, this value will be set to RESEND_CURRENT_ENTRY.
- </description>
- </param>
-
- <param name="sendDynamicEntry" type="Boolean" mandatory="false">
- <description>In this mode, all keypresses will be sent as they occur.</description>
- <description>If disabled, entire string of text will be returned only once submitted by user.</description>
- <description>If omitted, this value will be set to FALSE.</description>
- </param>
-
- <param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Array of keyboard characters to enable.</description>
- <description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
- </param>
-
- <param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
- <description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
- </struct>
-
- <enum name="RequestType">
- <description>Enumeration listing possible asynchronous requests.</description>
- <element name="HTTP" />
- <element name="FILE_RESUME" />
- <element name="AUTH_REQUEST" />
- <element name="AUTH_CHALLENGE" />
- <element name="AUTH_ACK" />
- </enum>
-
- <enum name="AppHMIType">
- <description>Enumeration listing possible app types.</description>
- <element name="DEFAULT" />
- <element name="COMMUNICATION" />
- <element name="MEDIA" />
- <element name="MESSAGING" />
- <element name="NAVIGATION" />
- <element name="INFORMATION" />
- <element name="SOCIAL" />
- <element name="BACKGROUND_PROCESS" />
- <element name="TESTING" />
- <element name="SYSTEM" />
- </enum>
-
- <enum name="FunctionID" internal_scope="base">
- <description>Enumeration linking function names with function IDs in AppLink protocol.</description>
- <description>Assumes enumeration starts at value 0.</description>
- <element name="RESERVED" value="0" />
-<!--
- Base Request / Response RPCs
- Range = 0x 0000 0001 - 0x 0000 7FFF
--->
- <element name="RegisterAppInterfaceID" value="1" hexvalue="1" />
- <element name="UnregisterAppInterfaceID" value="2" hexvalue="2" />
- <element name="SetGlobalPropertiesID" value="3" hexvalue="3" />
- <element name="ResetGlobalPropertiesID" value="4" hexvalue="4" />
- <element name="AddCommandID" value="5" hexvalue="5" />
- <element name="DeleteCommandID" value="6" hexvalue="6" />
- <element name="AddSubMenuID" value="7" hexvalue="7" />
- <element name="DeleteSubMenuID" value="8" hexvalue="8" />
- <element name="CreateInteractionChoiceSetID" value="9" hexvalue="9" />
- <element name="PerformInteractionID" value="10" hexvalue="A" />
- <element name="DeleteInteractionChoiceSetID" value="11" hexvalue="B" />
- <element name="AlertID" value="12" hexvalue="C" />
- <element name="ShowID" value="13" hexvalue="D" />
- <element name="SpeakID" value="14" hexvalue="E" />
- <element name="SetMediaClockTimerID" value="15" hexvalue="F" />
- <element name="PerformAudioPassThruID" value="16" hexvalue="10" />
- <element name="EndAudioPassThruID" value="17" hexvalue="11" />
- <element name="SubscribeButtonID" value="18" hexvalue="12" />
- <element name="UnsubscribeButtonID" value="19" hexvalue="13" />
- <element name="SubscribeVehicleDataID" value="20" hexvalue="14" />
- <element name="UnsubscribeVehicleDataID" value="21" hexvalue="15" />
- <element name="GetVehicleDataID" value="22" hexvalue="16" />
- <element name="ReadDIDID" value="23" hexvalue="17" />
- <element name="GetDTCsID" value="24" hexvalue="18" />
- <element name="ScrollableMessageID" value="25" hexvalue="19" />
- <element name="SliderID" value="26" hexvalue="1A" />
- <element name="ShowConstantTBTID" value="27" hexvalue="1B" />
- <element name="AlertManeuverID" value="28" hexvalue="1C" />
- <element name="UpdateTurnListID" value="29" hexvalue="1D" />
- <element name="ChangeRegistrationID" value="30" hexvalue="1E" />
- <element name="GenericResponseID" value="31" hexvalue="1F" />
- <element name="PutFileID" value="32" hexvalue="20" />
- <element name="DeleteFileID" value="33" hexvalue="21" />
- <element name="ListFilesID" value="34" hexvalue="22" />
- <element name="SetAppIconID" value="35" hexvalue="23" />
- <element name="SetDisplayLayoutID" value="36" hexvalue="24" />
- <element name="DiagnosticMessageID" value="37" hexvalue="25" />
- <element name="SystemRequestID" value="38" hexvalue="26" />
-
-
-
-<!--
- Base Notifications
- Range = 0x 0000 8000 - 0x 0000 FFFF
--->
-
- <element name="OnHMIStatusID" value="32768" hexvalue="8000" />
- <element name="OnAppInterfaceUnregisteredID" value="32769" hexvalue="8001" />
- <element name="OnButtonEventID" value="32770" hexvalue="8002" />
- <element name="OnButtonPressID" value="32771" hexvalue="8003" />
- <element name="OnVehicleDataID" value="32772" hexvalue="8004" />
- <element name="OnCommandID" value="32773" hexvalue="8005" />
- <element name="OnTBTClientStateID" value="32774" hexvalue="8006" />
- <element name="OnDriverDistractionID" value="32775" hexvalue="8007" />
- <element name="OnPermissionsChangeID" value="32776" hexvalue="8008" />
- <element name="OnAudioPassThruID" value="32777" hexvalue="8009" />
- <element name="OnLanguageChangeID" value="32778" hexvalue="800A" />
- <element name="OnKeyboardInputID" value="32779" hexvalue="800B" />
- <element name="OnTouchEventID" value="32780" hexvalue="800C" />
- <element name="OnSystemRequestID" value="32781" hexvalue="800D" />
- <element name="OnHashChangeID" value="32782" hexvalue="800E" />
-<!--
- Ford Specific Request / Response RPCs
- Range = 0x 0001 0000 - 0x 0001 7FFF
--->
-
- <element name="EncodedSyncPDataID" value="65536" hexvalue="10000" />
- <element name="SyncPDataID" value="65537" hexvalue="10001" />
-
-
-<!--
- Ford Specific Notifications
- Range = 0x 0001 8000 - 0x 0001 FFFF
--->
-
- <element name="OnEncodedSyncPDataID" value="98304" hexvalue="18000" />
- <element name="OnSyncPDataID" value="98305" hexvalue="18001" />
-
- </enum>
-
- <enum name="messageType">
- <description>
- Enumeration linking message types with function types in WiPro protocol.
- Assumes enumeration starts at value 0.
- </description>
- <element name="request" value="0" />
- <element name="response" value="1" />
- <element name="notification" value="2" />
- </enum>
-
- <!-- Requests/Responses -->
-
- <function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="request">
- <description>
- Establishes an interface with a mobile application.
- Before registerAppInterface no other commands will be accepted/executed.
- </description>
-
- <param name="syncMsgVersion" type="SyncMsgVersion">
- <description>See SyncMsgVersion</description>
- </param>
-
- <param name="appName" type="String" maxlength="100">
- <description>
- The mobile application name, e.g. "Ford Drive Green".
- Needs to be unique over all applications.
- May not be empty.
- May not start with a new line character.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- Needs to be unique over all applications. Applications with the same name will be rejected.
- Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.
- </description>
- </param>
-
- <param name="ttsName" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".
- Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
- Needs to be unique over all applications.
- May not be empty.
- May not start with a new line character.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- Needs to be unique over all applications. Applications with the same name will be rejected.
- Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.
- </description>
- </param>
-
- <param name="ngnMediaScreenAppName" type="String" maxlength="100" mandatory="false">
- <description>
- Provides an abbreviated version of the app name (if needed), that will be displayed on the NGN media screen.
- If not provided, the appName is used instead (and will be truncated if too long)
- Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.
- </description>
- </param>
-
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Defines an additional voice recognition command.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.
- </description>
- </param>
-
- <param name="isMediaApplication" type="Boolean">
- <description>
- Indicates if the application is a media or a non-media application.
- Only media applications will be able to stream audio to Sync that is audible outside of the BT media source.
- </description>
- </param>
- <param name="languageDesired" type="Language" mandatory="true">
- <description>
- See Language
- Current app’s expected VR+TTS language
- If there is a mismatch with SYNC, the app will be able to change this registration with changeRegistration prior to app being brought into focus.
- </description>
- </param>
- <param name="hmiDisplayLanguageDesired" type="Language" mandatory="true">
- <description>
- See Language
- Current app’s expected display language
- If there is a mismatch with SYNC, the app will be able to change this registration with changeRegistration prior to app being brought into focus.
- </description>
- </param>
- <param name="appHMIType" type="AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- See AppHMIType
- List of all applicable app HMI types stating which HMI classifications to be given to the app.
- e.g. for platforms like GEN2, this will determine which "corner(s)" the app can populate.
- </description>
- </param>
- <param name="hashID" type="String" maxlength="100" mandatory="false">
- <description>
- ID used to uniquely identify current state of all app data that can persist through connection cycles (e.g. ignition cycles).
- This registered data (commands, submenus, choice sets, etc.) can be reestablished without needing to explicitly reregister each piece.
- If omitted, then the previous state of an app's commands, etc. will not be restored.
- </description>
- </param>
- <param name="appID" type="String" maxlength="100" mandatory="true">
- <description>ID used to validate app with policy table entries</description>
- </param>
- </function>
-
- <function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="response">
- <description>The response to registerAppInterface</description>
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="GENERIC_ERROR"/>
- <element name="DUPLICATE_NAME"/>
- <element name="TOO_MANY_APPLICATIONS"/>
- <element name="APPLICATION_REGISTERED_ALREADY"/>
- <element name="UNSUPPORTED_VERSION"/>
- <element name="WRONG_LANGUAGE"/>
- <element name="DISALLOWED"/>
- <element name="WARNINGS"/>
- <element name="RESUME_FAILED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="syncMsgVersion" type="SyncMsgVersion" mandatory="false">
- <description>See SyncMsgVersion</description>
- </param>
-
- <param name="language" type="Language" mandatory="false">
- <description>The currently active VR+TTS language on Sync. See "Language" for options.</description>
- </param>
-
- <param name="hmiDisplayLanguage" type="Language" mandatory="false">
- <description>The currently active display language on Sync. See "Language" for options.</description>
- </param>
-
- <param name="displayCapabilities" type="DisplayCapabilities" mandatory="false">
- <description>See DisplayCapabilities</description>
- </param>
-
- <param name="buttonCapabilities" type="ButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See ButtonCapabilities</description >
- </param>
-
- <param name="softButtonCapabilities" type="SoftButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>If returned, the platform supports on-screen SoftButtons; see SoftButtonCapabilities.</description >
- </param>
-
- <param name="presetBankCapabilities" type="PresetBankCapabilities" mandatory="false">
- <description>If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.</description >
- </param>
-
- <param name="hmiZoneCapabilities" type="HmiZoneCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <issue creator="rs">If not used yet => remove</issue>
- <description>See HmiZoneCapabilities</description>
- </param>
-
- <param name="speechCapabilities" type="SpeechCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See SpeechCapabilities</description>
- </param>
-
- <param name="vrCapabilities" type="VrCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See VrCapabilities</description>
- </param>
-
- <param name="audioPassThruCapabilities" type="AudioPassThruCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See AudioPassThruCapability</description>
- </param>
-
- <param name="vehicleType" type="VehicleType" mandatory="false">
- <description>Specifies the vehicle's type. See VehicleType.</description>
- </param>
-
- <param name="prerecordedSpeech" type="PrerecordedSpeech" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See PrerecordedSpeech</description>
- </param>
-
- <param name="supportedDiagModes" type="Integer" minvalue="0" maxvalue="255" array="true" minsize="1" maxsize="100" mandatory="false" scope="internal">
- <description>
- Specifies the white-list of supported diagnostic modes (0x00-0xFF) capable for DiagnosticMessage requests.
- If a mode outside this list is requested, it will be rejected.
- </description>
- </param>
-
- </function>
-
- <function name="UnregisterAppInterface" functionID="UnregisterAppInterfaceID" messagetype="request">
- <description>
- Closes an interface from a mobile application.
- After unregisterAppInterface, no commands other than registerAppInterface will be accepted/executed.
- Will fail, if no registerAppInterface was completed successfully before.
- </description>
- </function>
-
- <function name="UnregisterAppInterface" functionID="UnregisterAppInterfaceID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="SetGlobalProperties" functionID="SetGlobalPropertiesID" messagetype="request">
- <description>Allows setting global properties.</description>
-
- <param name="helpPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- The help prompt.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- <param name="timeoutPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- Help text for a wait timeout.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>
- VR Help Title text.
- If omitted on supported displays, the default SYNC help title shall be used.
- If omitted and one or more vrHelp items are provided, the request will be rejected.
- </description>
- </param>
-
- <param name="vrHelp" type="VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- VR Help Items.
- If omitted on supported displays, the default AppLink VR help / What Can I Say? screen shall be used.
- If the list of VR Help Items contains nonsequential positions (e.g. [1,2,4]), the RPC shall be rejected.
- If omitted and a vrHelpTitle is provided, the request will be rejected.
- </description>
- </param>
- <param name="menuTitle" maxlength="500" type="String" mandatory="false" scope="partner">
- <description>Optional text to label an app menu button (for certain touchscreen platforms).</description>
- </param>
-
- <param name="menuIcon" type="Image" mandatory="false" scope="partner">
- <description>>Optional icon to draw on an app menu button (for certain touchscreen platforms).</description>
- </param>
-
- <param name="keyboardProperties" type="KeyboardProperties" mandatory="false" scope="partner">
- <description>On-screen keybaord configuration (if available).</description>
- </param>
- </function>
-
- <function name="SetGlobalProperties" functionID="SetGlobalPropertiesID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="ResetGlobalProperties" functionID="ResetGlobalPropertiesID" messagetype="request">
- <description>Allows resetting global properties.</description>
-
- <param name="properties" type="GlobalProperty" minsize="1" maxsize="100" array="true" >
- <description>Contains the names of all global properties (like timeoutPrompt) that should be unset. Resetting means, that they have the same value as at start up (default)</description>
- </param>
- </function>
-
- <function name="ResetGlobalProperties" functionID="ResetGlobalPropertiesID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="AddCommand" functionID="AddCommandID" messagetype="request">
- <description>
- Adds a command to the in application menu.
- Either menuParams or vrCommands must be provided.
- </description>
-
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>unique ID of the command to add.</description>
- </param>
-
- <param name="menuParams" type="MenuParams" mandatory="false">
- <description>Optional sub value containing menu parameters</description>
- </param>
-
- <param name="vrCommands" type="String" minsize="1" maxsize="100" maxlength="99" array="true" mandatory="false">
- <description>
- An array of strings to be used as VR synonyms for this command.
- If this array is provided, it may not be empty.
- </description>
- </param>
-
- <param name="cmdIcon" type="Image" mandatory="false">
- <description>
- Image struct determining whether static or dynamic icon.
- If omitted on supported displays, no (or the default if applicable) icon shall be displayed.
- </description>
- </param>
-
- </function>
-
- <function name="AddCommand" functionID="AddCommandID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="DeleteCommand" functionID="DeleteCommandID" messagetype="request">
- <description>Deletes all commands from the in-application menu with the specified command id.</description>
-
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>ID of the command(s) to delete.</description>
- </param>
-
- </function>
-
- <function name="DeleteCommand" functionID="DeleteCommandID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="IN_USE"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="AddSubMenu" functionID="AddSubMenuID" messagetype="request">
- <description>Adds a sub menu to the in-application menu.</description>
-
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000">
- <description>unique ID of the sub menu to add.</description>
- </param>
-
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" defvalue="1000" mandatory="false">
- <description>
- Position within the items that are are at top level of the in application menu.
- 0 will insert at the front.
- 1 will insert at the second position.
- If position is greater or equal than the number of items on top level, the sub menu will be appended to the end.
- Position of any submenu will always be located before the return and exit options
- If this param was omitted the entry will be added at the end.
- </description>
- </param>
-
- <param name="menuName" maxlength="500" type="String">
- <description>Text to show in the menu for this sub menu.</description>
- </param>
- </function>
-
- <function name="AddSubMenu" functionID="AddSubMenuID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="DeleteSubMenu" functionID="DeleteSubMenuID" messagetype="request">
- <description>Deletes a submenu from the in-application menu.</description>
-
- <param name="menuID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>The "menuID" of the submenu to delete. (See addSubMenu.menuID)</description>
- </param>
-
- </function>
-
- <function name="DeleteSubMenu" functionID="DeleteSubMenuID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="IN_USE"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="CreateInteractionChoiceSet" functionID="CreateInteractionChoiceSetID" messagetype="request">
- <description>creates interaction choice set to be used later by performInteraction</description>
-
- <param name="interactionChoiceSetID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Unique ID used for this interaction choice set.</description>
- </param>
-
- <param name="choiceSet" type="Choice" minsize="1" maxsize="100" array="true" />
- </function>
-
- <function name="CreateInteractionChoiceSet" functionID="CreateInteractionChoiceSetID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="PerformInteraction" functionID="PerformInteractionID" messagetype="request">
- <description>Triggers an interaction (e.g. "Permit GPS?" - Yes, no, Always Allow).</description>
-
- <param name="initialText" type="String" maxlength="500" >
- <description>Text to be displayed first.</description>
- </param>
-
- <param name="initialPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true">
- <description>
- This is the intial prompt spoken to the user at the start of an interaction.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- <param name="interactionMode" type="InteractionMode">
- <description>See InteractionMode.</description>
- </param>
-
- <param name="interactionChoiceSetIDList" type="Integer" minsize="0" maxsize="100" minvalue="0" maxvalue="2000000000" array="true">
- <description>List of interaction choice set IDs to use with an interaction.</description>
- </param>
-
- <param name="helpPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Help text. This is the spoken string when a user speaks "help" when the interaction is occuring.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- <param name="timeoutPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Timeout text. This text is spoken when a VR interaction times out.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- <param name="timeout" type="Integer" minvalue="5000" maxvalue="100000" defvalue="10000" mandatory="false">
- <description>
- Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.
- Applies only to the menu portion of the interaction. The VR timeout will be handled by the platform.
- </description>
- </param>
-
- <param name="vrHelp" type="VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Ability to send suggested VR Help Items to display on-screen during Perform Interaction.
- If omitted on supported displays, the default SYNC generated list of suggested choices shall be displayed.
- </description>
- </param>
-
- <param name="interactionLayout" type="LayoutMode" mandatory="false" scope="partner">
- <description>See LayoutMode.</description>
- </param>
-
- </function>
-
- <function name="PerformInteraction" functionID="PerformInteractionID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- <element name="TIMED_OUT"/>
- <element name="ABORTED"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="WARNINGS"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>
- ID of the choice that was selected in response to PerformInteraction.
- Only is valid if resultCode is SUCCESS.
- </description>
- </param>
-
- <param name="manualTextEntry" type="String" maxlength="500" mandatory="false">
- <description>
- Manually entered text selection, e.g. through keyboard
- Can be returned in lieu of choiceID, depending on trigger source
- </description>
- </param>
-
- <param name="triggerSource" type="TriggerSource" mandatory="false">
- <description>
- See TriggerSource
- Only is valid if resultCode is SUCCESS.
- </description>
- </param>
-
- </function>
-
- <function name="DeleteInteractionChoiceSet" functionID="DeleteInteractionChoiceSetID" messagetype="request">
- <description>Deletes interaction choice set that has been created with "CreateInteractionChoiceSet".</description>
- <description>The interaction may only be deleted when not currently in use by a "performInteraction".</description>
-
- <param name="interactionChoiceSetID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>ID of the interaction choice set to delete.</description>
- </param>
- </function>
-
- <function name="DeleteInteractionChoiceSet" functionID="DeleteInteractionChoiceSetID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="IN_USE"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="Alert" functionID="AlertID" messagetype="request">
- <description>Shows an alert which typically consists of text-to-speech message and text on the display. At least either alertText1, alertText2 or TTSChunks need to be provided.</description>
-
- <param name="alertText1" type="String" maxlength="500" mandatory="false">
- <description>The first line of the alert text field</description>
- </param>
-
- <param name="alertText2" type="String" maxlength="500" mandatory="false">
- <description>The second line of the alert text field</description>
- </param>
-
- <param name="alertText3" type="String" maxlength="500" mandatory="false">
- <description>The optional third line of the alert text field</description>
- </param>
-
- <param name="ttsChunks" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- <param name="duration" type="Integer" minvalue="3000" maxvalue="10000" defvalue="5000" mandatory="false">
- <description>
- Timeout in milliseconds.
- Typical timeouts are 3-5 seconds.
- If omitted, timeout is set to 5s.
- </description>
- </param>
-
- <param name="playTone" type="Boolean" mandatory="false">
- <description>
- Defines if tone should be played. Tone is played before TTS.
- If omitted, no tone is played.
- </description>
- </param>
-
- <param name="progressIndicator" type="Boolean" mandatory="false" platform="MobileNav">
- <description>
- If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.
- </description>
- </param>
-
- <param name="softButtons" type="SoftButton" minsize="0" maxsize="4" array="true" mandatory="false">
- <description>
- App defined SoftButtons.
- If omitted on supported displays, the displayed alert shall not have any SoftButtons.
- </description>
- </param>
-
- </function>
-
- <function name="Alert" functionID="AlertID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="ABORTED"/>
- <element name="DISALLOWED"/>
- <element name="USER_DISALLOWED"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="WARNINGS"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="tryAgainTime" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>
- Amount of time (in seconds) that an app must wait before resending an alert.
- If provided, another system event or overlay currently has a higher priority than this alert.
- An app must not send an alert without waiting at least the amount of time dictated.
- </description>
- </param>
-
- </function>
-
- <function name="Show" functionID="ShowID" messagetype="request">
- <description>Updates the persistent display. Supported fields depend on display capabilities.</description>
-
- <param name="mainField1" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- The text that should be displayed in a single or upper display line.
- If this text is not set, the text of mainField1 stays unchanged.
- If this text is empty "", the field will be cleared.
- </description>
- </param>
-
- <param name="mainField2" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- The text that should be displayed on the second display line.
- If this text is not set, the text of mainField2 stays unchanged.
- If this text is empty "", the field will be cleared.
- </description>
- </param>
-
- <param name="mainField3" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- The text that should be displayed on the second "page" first display line.
- If this text is not set, the text of mainField3 stays unchanged.
- If this text is empty "", the field will be cleared.
- </description>
- </param>
-
- <param name="mainField4" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- The text that should be displayed on the second "page" second display line.
- If this text is not set, the text of mainField4 stays unchanged.
- If this text is empty "", the field will be cleared.
- </description>
- </param>
-
- <param name="alignment" type="TextAlignment" mandatory="false">
- <description>
- Specifies how mainField1 and mainField2 texts should be aligned on display.
- If omitted, texts will be centered.
- </description>
- </param>
-
- <param name="statusBar" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>Requires investigation regarding the nav display capabilities. Potentially lower lowerStatusBar, upperStatusBar, titleBar, etc.</description>
- </param>
-
- <param name="mediaClock" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- Text value for MediaClock field. Has to be properly formatted by Mobile App according to Sync capabilities.
- If this text is set, any automatic media clock updates previously set with SetMediaClockTimer will be stopped.
- </description>
- </param>
-
- <param name="mediaTrack" type="String" minlength="0" maxlength="500" mandatory="false">
- <description>
- The text that should be displayed in the track field.
- This field is only valid for media applications on NGN type ACMs.
- If this text is not set, the text of mediaTrack stays unchanged.
- If this text is empty "", the field will be cleared.
- </description>
- </param>
-
- <param name="graphic" type="Image" mandatory="false">
- <description>
- Image struct determining whether static or dynamic image to display in app.
- If omitted on supported displays, the displayed graphic shall not change.
- </description>
- </param>
-
- <param name="secondaryGraphic" type="Image" mandatory="false">
- <description>
- Image struct determining whether static or dynamic secondary image to display in app.
- If omitted on supported displays, the displayed secondary graphic shall not change.
- </description>
- </param>
-
-
- <param name="softButtons" type="SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>
- App defined SoftButtons.
- If omitted on supported displays, the currently displayed SoftButton values will not change.
- </description>
- </param>
-
- <param name="customPresets" type="String" maxlength="500" minsize="0" maxsize="6" array="true" mandatory="false">
- <description>
- App labeled on-screen presets (i.e. GEN2).
- If omitted on supported displays, the presets will be shown as not defined.
- </description>
- </param>
-
- </function>
-
- <function name="Show" functionID="ShowID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="ABORTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="Speak" functionID="SpeakID" messagetype="request">
- <description>Speaks a text.</description>
-
- <param name="ttsChunks" type="TTSChunk" minsize="1" maxsize="100" array="true">
- <description>
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
-
- </function>
-
- <function name="Speak" functionID="SpeakID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="ABORTED"/>
- <element name="WARNINGS"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="SetMediaClockTimer" functionID="SetMediaClockTimerID" messagetype="request">
- <description>Sets the initial media clock value and automatic update method.</description>
-
- <param name="startTime" type="StartTime" mandatory="false">
- <description>
- See StartTime.
- startTime must be provided for "COUNTUP" and "COUNTDOWN".
- startTime will be ignored for "PAUSE", "RESUME", and "CLEAR"
- </description>
- </param>
-
- <param name="endTime" type="StartTime" mandatory="false">
- <description>
- See StartTime.
- endTime can be provided for "COUNTUP" and "COUNTDOWN"; to be used to calculate any visual progress bar (if not provided, this feature is ignored)
- If endTime is greater then startTime for COUNTDOWN or less than startTime for COUNTUP, then the request will return an INVALID_DATA.
- endTime will be ignored for "PAUSE", "RESUME", and "CLEAR"
- </description>
- </param>
-
- <param name="updateMode" type="UpdateMode" mandatory="true">
- <description>
- Enumeration to control the media clock.
- In case of pause, resume, or clear, the start time value is ignored and shall be left out. For resume, the time continues with the same value as it was when paused.
- </description>
- </param>
- </function>
-
- <function name="SetMediaClockTimer" functionID="SetMediaClockTimerID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="IGNORED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="PerformAudioPassThru" functionID="PerformAudioPassThruID" messagetype="request">
- <description>Starts audio pass thru session </description>
- <param name="initialPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- SYNC will speak this prompt before opening the audio pass thru session.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- If omitted, then no initial prompt is spoken.
- </description>
- </param>
- <param name="audioPassThruDisplayText1" type="String" mandatory="false" maxlength="500">
- <description>First line of text displayed during audio capture.</description>
- </param>
- <param name="audioPassThruDisplayText2" type="String" mandatory="false" maxlength="500">
- <description>Second line of text displayed during audio capture.</description>
- </param>
- <param name="samplingRate" type="SamplingRate" mandatory="true">
- <description> This value shall be allowed at 8 khz or 16 or 22 or 44 khz.</description>
- </param>
- <param name="maxDuration" type="Integer" minvalue="1" maxvalue="1000000" mandatory="true">
- <description>The maximum duration of audio recording in milliseconds. </description>
- </param>
- <param name="bitsPerSample" type="BitsPerSample" mandatory="true">
- <description>Specifies the quality the audio is recorded. Currently 8 bit or 16 bit.</description>
- </param>
- <param name="audioType" type="AudioType" mandatory="true">
- <description>Specifies the type of audio data being requested.</description>
- </param>
- <param name="muteAudio" type="Boolean" mandatory="false">
- <description>
- Defines if the current audio source should be muted during the APT session. If not, the audio source will play without interruption.
- If omitted, the value is set to true.
- </description>
- </param>
- </function>
-
- <function name="PerformAudioPassThru" functionID="PerformAudioPassThruID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="DISALLOWED"/>
- <element name="REJECTED"/>
- <element name="ABORTED"/>
- <element name="RETRY"/>
- <element name="WARNINGS"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="EndAudioPassThru" functionID="EndAudioPassThruID" messagetype="request">
- <description>When this request is invoked, the audio capture stops.</description>
- </function>
-
- <function name="EndAudioPassThru" functionID="EndAudioPassThruID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="SubscribeButton" functionID="SubscribeButtonID" messagetype="request">
- <description>
- Subscribes to built-in HMI buttons.
- The application will be notified by the OnButtonEvent and OnButtonPress.
- To unsubscribe the notifications, use unsubscribeButton.
- </description>
-
- <param name="buttonName" type="ButtonName">
- <description>Name of the button to subscribe.</description>
- </param>
- </function>
-
- <function name="SubscribeButton" functionID="SubscribeButtonID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="UNSUPPORTED_RESOURCE" />
- <element name="IGNORED" />
- <element name="REJECTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="UnsubscribeButton" functionID="UnsubscribeButtonID" messagetype="request">
- <description>Unsubscribes from built-in HMI buttons.</description>
-
- <param name="buttonName" type="ButtonName">
- <description>Name of the button to unsubscribe.</description>
- </param>
- </function>
-
- <function name="UnsubscribeButton" functionID="UnsubscribeButtonID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="UNSUPPORTED_RESOURCE" />
- <element name="IGNORED" />
- <element name="REJECTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="SubscribeVehicleData" functionID="SubscribeVehicleDataID" messagetype="request">
- <description>
- Subscribes for specific published data items.
- The data will be only sent if it has changed.
- The application will be notified by the onVehicleData notification whenever new data is available.
- To unsubscribe the notifications, use unsubscribe with the same subscriptionType.
- </description>
-
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false" scope="internal">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false" scope="internal">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false" scope="partner">
- <description>Information related to the MyKey feature</description>
- </param>
-
- <!-- / Ford Specific Data Items -->
-
- </function>
-
- <function name="SubscribeVehicleData" functionID="SubscribeVehicleDataID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="WARNINGS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="IGNORED" />
- <element name="DISALLOWED"/>
- <element name="USER_DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="gps" type="VehicleDataResult" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="VehicleDataResult" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="VehicleDataResult" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="VehicleDataResult" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="VehicleDataResult" mandatory="false">
- <description>The external temperature in degrees celsius.</description>
- </param>
- <param name="prndl" type="VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="VehicleDataResult" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="VehicleDataResult" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="VehicleDataResult" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="VehicleDataResult" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="VehicleDataResult" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="VehicleDataResult" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="VehicleDataResult" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="VehicleDataResult" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="VehicleDataResult" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="VehicleDataResult" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="VehicleDataResult" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="VehicleDataResult" mandatory="false" scope="internal">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="VehicleDataResult" mandatory="false" scope="internal">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="VehicleDataResult" mandatory="false" scope="internal">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModes" type="VehicleDataResult" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="VehicleDataResult" mandatory="false" scope="partner">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
-
- </function>
-
- <function name="UnsubscribeVehicleData" functionID="UnsubscribeVehicleDataID" messagetype="request">
- <description>This function is used to unsubscribe the notifications from the subscribeVehicleData function.</description>
-
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius.</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false" scope="internal">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false" scope="internal">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false" scope="partner">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
-
- </function>
-
- <function name="UnsubscribeVehicleData" functionID="UnsubscribeVehicleDataID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="WARNINGS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="IGNORED" />
- <element name="DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="gps" type="VehicleDataResult" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="VehicleDataResult" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="VehicleDataResult" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="VehicleDataResult" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="VehicleDataResult" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="prndl" type="VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="VehicleDataResult" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="VehicleDataResult" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="VehicleDataResult" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="VehicleDataResult" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="VehicleDataResult" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="VehicleDataResult" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="VehicleDataResult" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="VehicleDataResult" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="VehicleDataResult" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="VehicleDataResult" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="VehicleDataResult" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="VehicleDataResult" mandatory="false" scope="internal">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="VehicleDataResult" mandatory="false" scope="internal">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModes" type="VehicleDataResult" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="VehicleDataResult" mandatory="false" scope="partner">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
-
- </function>
-
- <function name="GetVehicleData" functionID="GetVehicleDataID" messagetype="request">
- <description>Non periodic vehicle data read request.</description>
-
- <param name="gps" type="Boolean" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Boolean" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Boolean" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Boolean" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Boolean" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="Boolean" mandatory="false">
- <description>Vehicle identification number</description>
- </param>
- <param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="Boolean" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Boolean" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="Boolean" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="Boolean" mandatory="false">
- <description>The body information including ignition status and internal temp</description>
- </param>
- <param name="deviceStatus" type="Boolean" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="Boolean" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="Boolean" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="Boolean" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Boolean" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Boolean" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Boolean" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="Boolean" mandatory="false" scope="internal">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="Boolean" mandatory="false" scope="internal">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="Boolean" mandatory="false" scope="internal">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="Boolean" mandatory="false" scope="partner">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
-
- </function>
-
- <function name="GetVehicleData" functionID="GetVehicleDataID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="VEHICLE_DATA_NOT_ALLOWED"/>
- <element name="VEHICLE_DATA_NOT_AVAILABLE"/>
- <element name="USER_DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="gps" type="GPSData" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="String" maxlength="17" mandatory="false">
- <description>Vehicle identification number</description>
- </param>
- <param name="prndl" type="PRNDL" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="TireStatus" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="BeltStatus" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="BodyInformation" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="DeviceStatus" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="VehicleDataEventStatus" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="WiperStatus" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="HeadLampStatus" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Data Items -->
- <param name="eCallInfo" type="ECallInfo" mandatory="false" scope="internal">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="AirbagStatus" mandatory="false" scope="internal">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="EmergencyEvent" mandatory="false" scope="internal">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="ClusterModeStatus" mandatory="false" scope="internal">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="MyKey" mandatory="false" scope="partner">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Data Items -->
-
- </function>
-
- <function name="ReadDID" functionID="ReadDIDID" messagetype="request" scope="partner">
- <description>Non periodic vehicle data read request</description>
-
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" minsize="1" maxsize="1000" array="true" mandatory="true">
- <description>Get raw data from vehicle data DID location(s)</description>
- </param>
- </function>
-
- <function name="ReadDID" functionID="ReadDIDID" messagetype="response" scope="partner">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="USER_DISALLOWED"/>
- <element name="TRUNCATED_DATA"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="didResult" type="DIDResult" minsize="0" maxsize="1000" array="true" mandatory="false">
- <description>Array of requested DID results (with data if available).</description>
- </param>
-
- </function>
-
- <function name="GetDTCs" functionID="GetDTCsID" messagetype="request">
- <description>Vehicle module diagnostic trouble code request.</description>
-
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
-
- <param name="dtcMask" type="Integer" minvalue="0" maxvalue="255" mandatory="false">
- <description>DTC Mask Byte to be sent in diagnostic request to module .</description>
- </param>
-
- </function>
-
- <function name="GetDTCs" functionID="GetDTCsID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="USER_DISALLOWED"/>
- <element name="TRUNCATED_DATA"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="ecuHeader" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)</description>
- </param>
-
- <param name="dtc" type="String" mandatory="false" minsize="1" maxsize="15" maxlength="10" array="true">
- <description>
- Array of all reported DTCs on module (ecuHeader contains information if list is truncated).
- Each DTC is represented by 4 bytes (3 bytes of data and 1 byte status as defined in VHR_Layout_Specification_DTCs.pdf).
- </description>
- </param>
-
- </function>
-
- <function name="DiagnosticMessage" functionID="DiagnosticMessageID" messagetype="request" scope="internal">
- <description>Non periodic vehicle diagnostic request</description>
-
- <param name="targetID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of target ECU.</description>
- </param>
-
- <param name="messageLength" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Length of message (in bytes).</description>
- </param>
-
- <param name="messageData" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message.
- </description>
- </param>
- </function>
-
- <function name="DiagnosticMessage" functionID="DiagnosticMessageID" messagetype="response" scope="internal">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="USER_DISALLOWED"/>
- <element name="TRUNCATED_DATA"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="messageDataResult" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message result.
- </description>
- </param>
-
- </function>
-
- <function name="ScrollableMessage" functionID="ScrollableMessageID" messagetype="request">
- <description>Creates a full screen overlay containing a large block of formatted text that can be scrolled with up to 8 SoftButtons defined</description>
- <param name="scrollableMessageBody" type="String" maxlength="500">
- <description>Body of text that can include newlines and tabs.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="1000" maxvalue="65535" defvalue="30000" mandatory="false">
- <description>App defined timeout. Indicates how long of a timeout from the last action (i.e. scrolling message resets timeout).</description>
- </param>
- <param name="softButtons" type="SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>
- App defined SoftButtons.
- If omitted on supported displays, only the system defined "Close" SoftButton will be displayed.
- </description>
- </param>
- </function>
-
- <function name="ScrollableMessage" functionID="ScrollableMessageID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="CHAR_LIMIT_EXCEEDED"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="DISALLOWED"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="REJECTED"/>
- <element name="ABORTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="Slider" functionID="SliderID" messagetype="request">
- <description>Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.</description>
- <param name="numTicks" type="Integer" minvalue="2" maxvalue="26" mandatory="true">
- <description>Number of selectable items on a horizontal axis</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="26" mandatory="true">
- <description>Initial position of slider control (cannot exceed numTicks)</description>
- </param>
- <param name="sliderHeader" type="String" maxlength="500" mandatory="true">
- <description>Text header to display</description>
- </param>
- <param name="sliderFooter" type="String" maxlength="500" minsize="1" maxsize="26" array="true" mandatory="false">
- <description>
- Text footer to display (meant to display min/max threshold descriptors).
- For a static text footer, only one footer string shall be provided in the array.
- For a dynamic text footer, the number of footer text string in the array must match the numTicks value.
- For a dynamic text footer, text array string should correlate with potential slider position index.
- If omitted on supported displays, no footer text shall be displayed.
- </description>
- </param>
- <param name="timeout" type="Integer" minvalue="1000" maxvalue="65535" defvalue="10000" mandatory="false">
- <description>
- App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout).
- If omitted, the value is set to 10000.
- </description>
- </param>
- </function>
-
- <function name="Slider" functionID="SliderID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="SAVED"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="DISALLOWED"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="REJECTED"/>
- <element name="ABORTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- <param name="sliderPosition" type="Integer" minvalue="1" maxvalue="26" mandatory="false">
- <description>
- Current slider value returned when saved or canceled (aborted)
- This value is only returned for resultCodes "SAVED" or "ABORTED"
- </description>
- </param>
- </function>
-
- <function name="ShowConstantTBT" functionID="ShowConstantTBTID" messagetype="request">
- <param name="navigationText1" type="String" minlength="0" maxlength="500" mandatory="false">
- </param>
- <param name="navigationText2" type="String" minlength="0" maxlength="500" mandatory="false">
- </param>
- <param name="eta" type="String" minlength="0" maxlength="500" mandatory="false">
- </param>
- <param name="timeToDestination" type="String" minlength="0" maxlength="500" mandatory="false" scope="partner">
- </param>
- <param name="totalDistance" type="String" minlength="0" maxlength="500" mandatory="false">
- </param>
- <param name="turnIcon" type="Image" mandatory="false">
- </param>
- <param name="nextTurnIcon" type="Image" mandatory="false">
- </param>
- <param name="distanceToManeuver" type="Float" minvalue="0" maxvalue="1000000000" mandatory="false">
- <description>
- Fraction of distance till next maneuver (starting from when AlertManeuver is triggered).
- Used to calculate progress bar.
- </description>
- </param>
- <param name="distanceToManeuverScale" type="Float" minvalue="0" maxvalue="1000000000" mandatory="false">
- <description>
- Distance till next maneuver (starting from) from previous maneuver.
- Used to calculate progress bar.
- </description>
- </param>
- <param name="maneuverComplete" type="Boolean" mandatory="false">
- <description>
- If and when a maneuver has completed while an AlertManeuver is active, the app must send this value set to TRUE in order to clear the AlertManeuver overlay.
- If omitted the value will be assumed as FALSE.
- </description>
- </param>
- <param name="softButtons" type="SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>
- Three dynamic SoftButtons available (first SoftButton is fixed to "Turns").
- If omitted on supported displays, the currently displayed SoftButton values will not change.
- </description>
- </param>
- </function>
-
- <function name="ShowConstantTBT" functionID="ShowConstantTBTID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="AlertManeuver" functionID="AlertManeuverID" messagetype="request">
- <param name="ttsChunks" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- </param>
- <param name="softButtons" type="SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>If omitted on supported displays, only the system defined "Close" SoftButton shall be displayed.</description>
- </param>
- </function>
-
- <function name="AlertManeuver" functionID="AlertManeuverID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="IGNORED"/>
- <element name="DISALLOWED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- <element name="ABORTED"/>
- <element name="WARNINGS"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="UpdateTurnList" functionID="UpdateTurnListID" messagetype="request">
- <param name="turnList" type="Turn" minsize="1" maxsize="100" array="true">
- </param>
- <param name="softButtons" type="SoftButton" minsize="0" maxsize="1" array="true">
- <description>If omitted on supported displays, app-defined SoftButton will be left blank.</description>
- </param>
- </function>
-
- <function name="UpdateTurnList" functionID="UpdateTurnListID" messagetype="response">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- <element name="UNSUPPORTED_RESOURCE"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="ChangeRegistration" functionID="ChangeRegistrationID" messagetype="request">
- <param name="language" type="Language" mandatory="true">
- <description>Requested SYNC voice engine (VR+TTS) language registration</description>
- </param>
- <param name="hmiDisplayLanguage" type="Language" mandatory="true">
- <description>Request display language registration</description>
- </param>
- </function>
-
- <function name="ChangeRegistration" functionID="ChangeRegistrationID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description>
- true, if successful
- false, if failed
- </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="DISALLOWED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="GenericResponse" functionID="GenericResponseID" messagetype="response">
- <description>
- Generic Response is sent, when the name of a received msg cannot be retrieved. Only used in case of an error.
- Currently, only resultCode INVALID_DATA is used.
- </description>
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="INVALID_DATA"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="PutFile" functionID="PutFileID" messagetype="request">
- <description>
- Used to push a binary data onto the SYNC module from a mobile device, such as icons and album art
- Not supported on first generation SYNC vehicles.
- Binary data is in binary part of hybrid msg.
- </description>
-
- <param name="syncFileName" type="String" maxlength="255" mandatory="true">
- <description>File reference name.</description>
- </param>
-
- <param name="fileType" type="FileType" mandatory="true">
- <description>Selected file type.</description>
- </param>
-
- <param name="persistentFile" type="Boolean" defvalue="false" mandatory="false">
- <description>
- Indicates if the file is meant to persist between sessions / ignition cycles.
- If set to TRUE, then the system will aim to persist this file through session / cycles.
- While files with this designation will have priority over others, they are subject to deletion by the system at any time.
- In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file.
- If omitted, the value will be set to false.
- </description>
- </param>
-
- </function>
-
- <function name="PutFile" functionID="PutFileID" messagetype="response">
- <description>Response is sent, when the file data was copied (success case). Or when an error occured.</description>
- <description>Not supported on First generation SYNC vehicles. </description>
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- </param>
-
- <param name="spaceAvailable" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Provides the total local space available on SYNC for the registered app.</description>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="DeleteFile" functionID="DeleteFileID" messagetype="request">
- <description>
- Used to delete a file resident on the SYNC module in the app's local cache.
- Not supported on first generation SYNC vehicles.
- </description>
-
- <param name="syncFileName" type="String" maxlength="255" mandatory="true">
- <description>File reference name.</description>
- </param>
-
- </function>
-
- <function name="DeleteFile" functionID="DeleteFileID" messagetype="response">
- <description>
- Response is sent, when the file data was deleted (success case). Or when an error occured.
- Not supported on First generation SYNC vehicles.
- </description>
- <param name="success" type="Boolean" platform="documentation">
- <description> true if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- </param>
-
- <param name="spaceAvailable" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Provides the total local space available on SYNC for the registered app.</description>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="ListFiles" functionID="ListFilesID" messagetype="request">
- <description>
- Requests the current list of resident filenames for the registered app.
- Not supported on first generation SYNC vehicles.
- </description>
- </function>
-
- <function name="ListFiles" functionID="ListFilesID" messagetype="response">
- <description>
- Returns the current list of resident filenames for the registered app along with the current space available
- Not supported on First generation SYNC vehicles.
- </description>
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- </param>
-
- <param name="filenames" type="String" maxlength="500" minsize="0" maxsize="1000" array="true" mandatory="false">
- <description>
- An array of all filenames resident on SYNC for the given registered app.
- If omitted, then no files currently reside on the system.
- </description>
- </param>
-
- <param name="spaceAvailable" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Provides the total local space available on SYNC for the registered app.</description>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="SetAppIcon" functionID="SetAppIconID" messagetype="request">
- <description>
- Used to set existing local file on SYNC as the app's icon
- Not supported on first generation SYNC vehicles.
- </description>
-
- <param name="syncFileName" type="String" maxlength="255" mandatory="true">
- <description>File reference name.</description>
- </param>
-
- </function>
-
- <function name="SetAppIcon" functionID="SetAppIconID" messagetype="response">
- <description>
- Response is sent, when the file data was copied (success case). Or when an error occured.
- Not supported on First generation SYNC vehicles.
- </description>
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="request">
- <description>
- Used to set an alternate display layout.
- If not sent, default screen for given platform will be shown
- </description>
-
- <param name="displayLayout" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined screen layouts are defined.
- </description>
- </param>
- </function>
-
- <function name="OnHashChange" functionID="OnHashChangeID" messagetype="notification">
- <description>
- Notification containing an updated hashID which can be used over connection cycles (i.e. loss of connection, ignition cycles, etc.).
- Sent after initial registration and subsequently after any change in the calculated hash of all persisted app data.
- </description>
-
- <param name="hashID" type="String" maxlength="100" mandatory="true">
- <description>Calculated hash ID to be referenced during RegisterAppInterface.</description>
- </param>
- </function>
-
- <function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="response">
-
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="UNSUPPORTED_REQUEST"/>
- </param>
-
- <param name="displayCapabilities" type="DisplayCapabilities" mandatory="false">
- <description>See DisplayCapabilities</description>
- </param>
-
- <param name="buttonCapabilities" type="ButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See ButtonCapabilities</description >
- </param>
-
- <param name="softButtonCapabilities" type="SoftButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>If returned, the platform supports on-screen SoftButtons; see SoftButtonCapabilities.</description >
- </param>
-
- <param name="presetBankCapabilities" type="PresetBankCapabilities" mandatory="false">
- <description>If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.</description >
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
-
- </function>
-
- <function name="SystemRequest" functionID="SystemRequestID" messagetype="request" scope="partner">
- <description>An asynchronous request from the device; binary data can be included in hybrid part of message for some requests (such as Authentication requests)</description>
- <param name="requestType" type="RequestType" mandatory="true">
- <description>The type of system request.</description>
- </param>
- </function>
-
- <function name="SystemRequest" functionID="SystemRequestID" messagetype="response" scope="partner">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_CERT"/>
- <element name="EXPIRED_CERT"/>
- </param>
- </function>
-
-
- <!-- Notifications -->
-
- <function name="OnHMIStatus" functionID="OnHMIStatusID" messagetype="notification">
- <param name="hmiLevel" type="HMILevel">
- <description>See HMILevel</description>
- </param>
-
- <param name="audioStreamingState" type="AudioStreamingState">
- <description>See AudioStreamingState</description>
- </param>
-
- <param name="systemContext" type="SystemContext">
- <description>See SystemContext</description>
- </param>
- </function>
-
- <function name="OnAppInterfaceUnregistered" functionID="OnAppInterfaceUnregisteredID" messagetype="notification">
- <param name="reason" type="AppInterfaceUnregisteredReason">
- <description>See AppInterfaceUnregisteredReason</description>
- </param>
- </function>
-
- <function name="OnButtonEvent" functionID="OnButtonEventID" messagetype="notification">
- <description>Notifies application of UP/DOWN events for buttons to which the application is subscribed.</description>
- <param name="buttonName" type="ButtonName"/>
- <param name="buttonEventMode" type="ButtonEventMode">
- <description>Indicates whether this is an UP or DOWN event.</description>
- </param>
- <param name="customButtonID" type="Integer" minvalue="0" maxvalue="65536" mandatory="false">
- <description>If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID)</description>
- </param>
- </function>
-
- <function name="OnButtonPress" functionID="OnButtonPressID" messagetype="notification">
- <description>Notifies application of LONG/SHORT press events for buttons to which the application is subscribed.</description>
- <param name="buttonName" type="ButtonName"/>
- <param name="buttonPressMode" type="ButtonPressMode">
- <description>Indicates whether this is a LONG or SHORT button press event.</description>
- </param>
- <param name="customButtonID" type="Integer" minvalue="0" maxvalue="65536" mandatory="false">
- <description>If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID)</description>
- </param>
- </function>
-
- <function name="OnVehicleData" functionID="OnVehicleDataID" messagetype="notification">
- <description>Callback for the periodic and non periodic vehicle data read function.</description>
- <param name="gps" type="GPSData" mandatory="false">
- <description>See GPSData</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- <param name="fuelLevel_State" type="ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
- </param>
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
- <description>The external temperature in degrees celsius</description>
- </param>
- <param name="vin" type="String" maxlength="17" mandatory="false">
- <description>Vehicle identification number.</description>
- </param>
- <param name="prndl" type="PRNDL" mandatory="false">
- <description>See PRNDL</description>
- </param>
- <param name="tirePressure" type="TireStatus" mandatory="false">
- <description>See TireStatus</description>
- </param>
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false">
- <description>Odometer in km</description>
- </param>
- <param name="beltStatus" type="BeltStatus" mandatory="false">
- <description>The status of the seat belts</description>
- </param>
- <param name="bodyInformation" type="BodyInformation" mandatory="false">
- <description>The body information including power modes</description>
- </param>
- <param name="deviceStatus" type="DeviceStatus" mandatory="false">
- <description>The device status including signal and battery strength</description>
- </param>
- <param name="driverBraking" type="VehicleDataEventStatus" mandatory="false">
- <description>The status of the brake pedal</description>
- </param>
- <param name="wiperStatus" type="WiperStatus" mandatory="false">
- <description>The status of the wipers</description>
- </param>
- <param name="headLampStatus" type="HeadLampStatus" mandatory="false">
- <description>Status of the head lamps</description>
- </param>
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
-
- <!-- Ford Specific Vehicle Data -->
- <param name="eCallInfo" type="ECallInfo" mandatory="false">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- <param name="airbagStatus" type="AirbagStatus" mandatory="false">
- <description>The status of the air bags</description>
- </param>
- <param name="emergencyEvent" type="EmergencyEvent" mandatory="false">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- <param name="clusterModeStatus" type="ClusterModeStatus" mandatory="false">
- <description>The status modes of the cluster</description>
- </param>
- <param name="myKey" type="MyKey" mandatory="false">
- <description>Information related to the MyKey feature</description>
- </param>
- <!-- / Ford Specific Vehicle Data -->
-
- </function>
-
- <function name="OnCommand" functionID="OnCommandID" messagetype="notification">
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Command ID, which is related to a specific menu entry</description>
- </param>
-
- <param name="triggerSource" type="TriggerSource">
- <description>See TriggerSource</description>
- </param>
- </function>
-
- <function name="OnTBTClientState" functionID="OnTBTClientStateID" messagetype="notification" >
- <description>Provides applications with notifications specific to the current TBT client status on the module</description>
- <param name="state" type="TBTState">
- <description>Current State of TBT client</description>
- </param>
- </function>
-
- <function name="OnDriverDistraction" functionID="OnDriverDistractionID" messagetype="notification" >
- <description>Provides driver distraction state to mobile applications</description>
- <param name="state" type="DriverDistractionState">
- <description>Current State of Driver Distraction</description>
- </param>
- </function>
-
- <function name="OnPermissionsChange" functionID="OnPermissionsChangeID" messagetype="notification" >
- <description>Provides update to app of which policy-table-enabled functions are available</description>
- <param name="permissionItem" type="PermissionItem" minsize="0" maxsize="500" array="true">
- <description>Change in permissions for a given set of RPCs</description>
- </param>
- </function>
-
- <function name="OnAudioPassThru" functionID="OnAudioPassThruID" messagetype="notification">
- <description>Binary data is in binary part of hybrid msg</description>
- </function>
-
- <function name="OnLanguageChange" functionID="OnLanguageChangeID" messagetype="notification">
- <param name="language" type="Language">
- <description>Current SYNC voice engine (VR+TTS) language</description>
- </param>
- <param name="hmiDisplayLanguage" type="Language">
- <description>Current display language</description>
- </param>
- </function>
-
- <function name="OnKeyboardInput" functionID="OnKeyboardInputID" messagetype="notification" platform="MobileNav">
-
- <description>On-screen keyboard event.</description>
- <description>Can be full string or individual keypresses depending on keyboard mode.</description>
-
- <param name="event" type="KeyboardEvent" mandatory="true">
- <description>On-screen keyboard input data.</description>
- </param>
-
- <param name="data" type="String" maxlength="500" mandatory="false">
- <description>On-screen keyboard input data.</description>
- <description>For dynamic keypress events, this will be the current compounded string of entry text.</description>
- <description>For entry submission events, this will be the full text entry (this will always return regardless of the mode).</description>
- <description>For entry cancelled and entry aborted events, this data param will be omitted.</description>
- </param>
-
- </function>
-
-
- <function name="OnTouchEvent" functionID="OnTouchEventID" messagetype="notification" platform="MobileNav">
- <description>Notifies about touch events on the screen's prescribed area</description>
- <param name="type" type="TouchType" mandatory="true">
- <description>The type of touch event.</description>
- </param>
- <param name="event" type="TouchEvent" mandatory="true" minsize="1" maxsize="10" array="true">
- <description>List of all individual touches involved in this event.</description>
- </param>
- </function>
-
- <function name="OnSystemRequest" functionID="OnSystemRequestID" messagetype="notification" scope="partner">
- <description> An asynchronous request from the system for specific data from the device or the cloud or response to a request from the device or cloud Binary data can be included in hybrid part of message for some requests (such as Authentication request responses)
- </description>
- <param name="requestType" type="RequestType" mandatory="true">
- <description>The type of system request.</description>
- </param>
- <param name="url" type="String" maxlength="1000" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Optional array of URL(s) for HTTP requests.
- If blank, the binary data shall be forwarded to the app.
- If not blank, the binary data shall be forwarded to the url(s) with a provided timeout in seconds.
- </description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>
- Optional timeout for HTTP requests
- Required if a URL is provided
- </description>
- </param>
- <param name="fileType" type="FileType" mandatory="false">
- <description>Optional file type (meant for HTTP file requests).</description>
- </param>
- <param name="offset" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional offset in bytes for resuming partial data chunks</description>
- </param>
- <param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional length in bytes for resuming partial data chunks</description>
- </param>
- </function>
-
-<!-- ~~~~~~~~~~~~~~~~~~ -->
-<!-- Ford Specific APIs -->
-<!-- ~~~~~~~~~~~~~~~~~~ -->
-
- <function name="EncodedSyncPData" functionID="EncodedSyncPDataID" messagetype="request" scope="partner">
- <description>
- Allows encoded data in the form of SyncP packets to be sent to the SYNC module.
- Legacy / v1 Protocol implementation; use SyncPData instead.
- </description>
-
- <param name="data" type="String" maxlength="1000000" minsize="1" maxsize="100" array="true" mandatory="true">
- <description>Contains base64 encoded string of SyncP packets.</description>
- <todo>What is the maxlength?</todo>
- </param>
- </function>
-
- <function name="EncodedSyncPData" functionID="EncodedSyncPDataID" messagetype="response" scope="partner">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="SyncPData" functionID="SyncPDataID" messagetype="request" scope="partner">
- <description>
- Allows binary data in the form of SyncP packets to be sent to the SYNC module.
- Binary data is in binary part of hybrid msg.
- </description>
-
- </function>
-
- <function name="SyncPData" functionID="SyncPDataID" messagetype="response" scope="partner">
- <param name="success" type="Boolean" platform="documentation">
- <description> true, if successful; false, if failed </description>
- </param>
-
- <param name="resultCode" type="Result" platform="documentation">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- </param>
-
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
-
- <function name="OnEncodedSyncPData" functionID="OnEncodedSyncPDataID" messagetype="notification" scope="partner">
- <description>
- Callback including encoded data of any SyncP packets that SYNC needs to send back to the mobile device.
- Legacy / v1 Protocol implementation; responds to EncodedSyncPData.
- </description>
- <param name="data" type="String" maxlength="1000000" minsize="1" maxsize="100" mandatory="true" array="true">
- <description>Contains base64 encoded string of SyncP packets.</description>
- </param>
- <param name="URL" type="String" maxlength="1000" mandatory="false">
- <description>
- If blank, the SyncP data shall be forwarded to the app.
- If not blank, the SyncP data shall be forwarded to the provided URL.
- </description>
- </param>
- <param name="Timeout" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>
- If blank, the SyncP data shall be forwarded to the app.
- If not blank, the SyncP data shall be forwarded with the provided timeout in seconds.
- </description>
- </param>
- </function>
-
- <function name="OnSyncPData" functionID="OnSyncPDataID" messagetype="notification" scope="partner">
- <description>
- Callback including binary data of any SyncP packets that SYNC needs to send back to the mobile device.
- Responds to SyncPData.
- Binary data is in binary part of hybrid msg.
- </description>
-
- <param name="URL" type="String" maxlength="1000" mandatory="false">
- <description>
- If blank, the SyncP data shall be forwarded to the app.
- If not blank, the SyncP data shall be forwarded to the provided URL.
- </description>
- </param>
- <param name="Timeout" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>
- If blank, the SyncP data shall be forwarded to the app.
- If not blank, the SyncP data shall be forwarded with the provided timeout in seconds.
- </description>
- </param>
-
- </function>
-
- </interface>
diff --git a/SDL_Core/src/components/interfaces/QT_HMI_API.xml b/SDL_Core/src/components/interfaces/QT_HMI_API.xml
deleted file mode 100644
index c3252f0e0..000000000
--- a/SDL_Core/src/components/interfaces/QT_HMI_API.xml
+++ /dev/null
@@ -1,3756 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-
-<!--
-* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE. -->
-
-
-<interfaces name="SmartDeviceLink HMI API">
-
-<interface name="Common" version="1.1" date="2013-10-02">
-
-<enum name="Result">
- <element name="SUCCESS" value="0"/>
- <element name="UNSUPPORTED_REQUEST" value="1"/>
- <element name="UNSUPPORTED_RESOURCE" value="2"/>
- <element name="DISALLOWED" value="3"/>
- <element name="REJECTED" value="4"/>
- <element name="ABORTED" value="5"/>
- <element name="IGNORED" value="6"/>
- <element name="RETRY" value="7"/>
- <element name="IN_USE" value="8"/>
- <element name="DATA_NOT_AVAILABLE" value="9"/>
- <element name="TIMED_OUT" value="10"/>
- <element name="INVALID_DATA" value="11"/>
- <element name="CHAR_LIMIT_EXCEEDED" value="12"/>
- <element name="INVALID_ID" value="13"/>
- <element name="DUPLICATE_NAME" value="14"/>
- <element name="APPLICATION_NOT_REGISTERED" value="15"/>
- <element name="WRONG_LANGUAGE" value="16"/>
- <element name="OUT_OF_MEMORY" value="17"/>
- <element name="TOO_MANY_PENDING_REQUESTS" value="18"/>
- <element name="NO_APPS_REGISTERED" value="19"/>
- <element name="NO_DEVICES_CONNECTED" value="20"/>
- <element name="WARNINGS" value="21"/>
- <element name="GENERIC_ERROR" value="22"/>
- <element name="USER_DISALLOWED" value="23"/>
-</enum>
-
-<enum name="ButtonName">
- <description>Defines the hard (physical) and soft (touchscreen) buttons available from SYNC</description>
- <element name="OK"/>
- <element name="SEEKLEFT"/>
- <element name="SEEKRIGHT"/>
- <element name="TUNEUP"/>
- <element name="TUNEDOWN"/>
- <element name="PRESET_0"/>
- <element name="PRESET_1"/>
- <element name="PRESET_2"/>
- <element name="PRESET_3"/>
- <element name="PRESET_4"/>
- <element name="PRESET_5"/>
- <element name="PRESET_6"/>
- <element name="PRESET_7"/>
- <element name="PRESET_8"/>
- <element name="PRESET_9"/>
- <element name="CUSTOM_BUTTON"/>
- <element name="SEARCH"/>
-</enum>
-
-<enum name="ButtonEventMode">
- <element name="BUTTONUP">
- <description>A button has been released up</description>
- </element>
- <element name="BUTTONDOWN">
- <description>A button has been pressed down</description>
- </element>
-</enum>
-
-<enum name="ButtonPressMode">
- <element name="LONG">
- <description>A button was released, after it was pressed for a long time. Actual timing is defined by head unit and may vary</description>
- </element>
- <element name="SHORT">
- <description>A button was released, after it was pressed for a short time. Actual timing is defined by head unit and may vary</description>
- </element>
-</enum>
-
- <enum name="Language">
- <element name="EN-US" internal_name="EN_US">
- <description>English - US</description>
- </element>
- <element name="ES-MX" internal_name="ES_MX">
- <description>Spanish - Mexico</description>
- </element>
- <element name="FR-CA" internal_name="FR_CA">
- <description>French - Canada</description>
- </element>
- <element name="DE-DE" internal_name="DE_DE">
- <description>German - Germany</description>
- </element>
- <element name="ES-ES" internal_name="ES_ES">
- <description>Spanish - Spain</description>
- </element>
- <element name="EN-GB" internal_name="EN_GB">
- <description>English - GB</description>
- </element>
- <element name="RU-RU" internal_name="RU_RU">
- <description>Russian - Russia</description>
- </element>
- <element name="TR-TR" internal_name="TR_TR">
- <description>Turkish - Turkey</description>
- </element>
- <element name="PL-PL" internal_name="PL_PL">
- <description>Polish - Poland</description>
- </element>
- <element name="FR-FR" internal_name="FR_FR">
- <description>French - France</description>
- </element>
- <element name="IT-IT" internal_name="IT_IT">
- <description>Italian - Italy</description>
- </element>
- <element name="SV-SE" internal_name="SV_SE">
- <description>Swedish - Sweden</description>
- </element>
- <element name="PT-PT" internal_name="PT_PT">
- <description>Portuguese - Portugal</description>
- </element>
- <element name="NL-NL" internal_name="NL_NL">
- <description>Dutch (Standard) - Netherlands</description>
- </element>
- <element name="EN-AU" internal_name="EN_AU">
- <description>English - Australia</description>
- </element>
- <element name="ZH-CN" internal_name="ZH_CN">
- <description>Mandarin - China</description>
- </element>
- <element name="ZH-TW" internal_name="ZH_TW">
- <description>Mandarin - Taiwan</description>
- </element>
- <element name="JA-JP" internal_name="JA_JP">
- <description>Japanese - Japan</description>
- </element>
- <element name="AR-SA" internal_name="AR_SA">
- <description>Arabic - Saudi Arabia</description>
- </element>
- <element name="KO-KR" internal_name="KO_KR">
- <description>Korean - South Korea</description>
- </element>
- <element name="PT-BR" internal_name="PT_BR">
- <description>Portuguese - Brazil</description>
- </element>
- <element name="CS-CZ" internal_name="CS_CZ">
- <description>Czech - Czech Republic</description>
- </element>
- <element name="DA-DK" internal_name="DA_DK">
- <description>Danish - Denmark</description>
- </element>
- <element name="NO-NO" internal_name="NO_NO">
- <description>Norwegian - Norway</description>
- </element>
-</enum>
-
-<enum name="SoftButtonType">
- <description>Contains information about the SoftButton capabilities.</description>
- <element name="TEXT" internal_name="SBT_TEXT"/>
- <element name="IMAGE" internal_name="SBT_IMAGE"/>
- <element name="BOTH" internal_name="SBT_BOTH"/>
-</enum>
-
-<enum name="SystemAction">
- <description>Enumeration that describes system actions that can be triggered.</description>
- <element name="DEFAULT_ACTION">
- <description>Default action occurs. Standard behavior (e.g. SoftButton clears overlay).</description>
- </element>
- <element name="STEAL_FOCUS">
- <description>The calling app's dialog or related event should clear and the app should be brought into HMI_FULL.</description>
- </element>
- <element name="KEEP_CONTEXT">
- <description>Current system context is maintained. An overlay is persisted even though a SoftButton has been pressed and the notification sent.</description>
- </element>
-</enum>
-
-<enum name="AppHMIType">
- <description>Enumeration listing possible app types.</description>
- <element name="DEFAULT" />
- <element name="COMMUNICATION" />
- <element name="MEDIA" />
- <element name="MESSAGING" />
- <element name="NAVIGATION" />
- <element name="INFORMATION" />
- <element name="SOCIAL" />
- <element name="BACKGROUND_PROCESS" />
- <element name="TESTING" />
- <element name="SYSTEM" />
-</enum>
-
-<enum name="LayoutMode">
- <description>For touchscreen interactions, the mode of how the choices are presented.</description>
- <element name="ICON_ONLY" />
- <description>This mode causes the interaction to display the previous set of choices as icons.</description>
- <element name="ICON_WITH_SEARCH" />
- <description>This mode causes the interaction to display the previous set of choices as icons along with a search field in the HMI.</description>
- <element name="LIST_ONLY" />
- <description>This mode causes the interaction to display the previous set of choices as a list.</description>
- <element name="LIST_WITH_SEARCH" />
- <description>This mode causes the interaction to display the previous set of choices as a list along with a search field in the HMI.</description>
- <element name="KEYBOARD" />
- <description>This mode causes the interaction to immediately display a keyboard entry through the HMI.</description>
-</enum>
-
-<enum name="DeactivateReason">
- <description>Specifies the functionality the User has switched to.</description>
- <element name="AUDIO">
- <description>Navigated to audio(radio, etc)</description>
- </element>
- <element name="PHONECALL">
- <description>Navigated to make a call.</description>
- </element>
- <element name="NAVIGATIONMAP">
- <description>Navigated to navigation screen.</description>
- </element>
- <element name="PHONEMENU">
- <description>Navigated to phone menu.</description>
- </element>
- <element name="SYNCSETTINGS">
- <description>Navigated to settings menu.</description>
- </element>
- <element name="GENERAL">
- <description>Other screens navigation apart from other mobile app.</description>
- </element>
-</enum>
-
-<enum name="ClockUpdateMode">
- <description>Describes how the media clock timer should behave on the platform</description>
- <element name="COUNTUP" />
- <description>Starts the media clock timer counting upwards, as in time elapsed.</description>
- <element name="COUNTDOWN" />
- <description>Starts the media clock timer counting downwards, as in time remaining.</description>
- <element name="PAUSE" />
- <description>Pauses the media clock timer</description>
- <element name="RESUME" />
- <description>Resume the media clock timer</description>
- <element name="CLEAR" />
- <description>Clears the media clock timer (previously done through Show->mediaClock)</description>
-</enum>
-
-<enum name="SystemContext">
- <description>Enumeration that describes possible contexts the application might be in on HU.</description>
- <description>Communicated to whichever app is in HMI FULL, except Alert.</description>
- <element name="MAIN" internal_name="SYSCTXT_MAIN">
- <description>The app's persistent display (whether media/non-media/navigation) is fully visible onscreen.</description>
- <description> There is currently no user interaction (user-initiated or app-initiated) with the head-unit</description>
- </element>
- <element name="VRSESSION" internal_name="SYSCTXT_VRSESSION">
- <description>The system is currently in a VR session (with whatever dedicated VR screen being overlaid onscreen).</description>
- </element>
- <element name="MENU" internal_name="SYSCTXT_MENU">
- <description>The system is currently displaying a system or in-App menu onscreen.</description>
- </element>
- <element name="HMI_OBSCURED" internal_name="SYSCTXT_HMI_OBSCURED">
- <description>The app's display HMI is currently obscuring with either a system or other app's overlay (except of Alert element).</description>
- </element>
- <element name="ALERT" internal_name="SYSCTXT_ALERT">
- <description>Broadcast only to whichever app has an alert currently being displayed.</description>
- </element>
-</enum>
-
-<enum name="HmiZoneCapabilities">
- <description>Contains information about the HMI zone capabilities.</description>
- <description>For future use.</description>
- <element name="FRONT" />
- <element name="BACK" />
-</enum>
-
-<enum name="SpeechCapabilities">
- <description>Contains information about the TTS capabilities.</description>
- <element name="TEXT" internal_name="SC_TEXT" />
- <element name="SAPI_PHONEMES" />
- <element name="LHPLUS_PHONEMES" />
- <element name="PRE_RECORDED" />
- <element name="SILENCE" />
-</enum>
-
-<enum name="VrCapabilities">
- <description>Contains information about the VR capabilities.</description>
- <element name="TEXT" internal_name="VR_TEXT" />
-</enum>
-
-<enum name="PrerecordedSpeech">
- <description>Contains a list of prerecorded speech items present on the platform.</description>
- <element name="HELP_JINGLE" />
- <element name="INITIAL_JINGLE" />
- <element name="LISTEN_JINGLE" />
- <element name="POSITIVE_JINGLE" />
- <element name="NEGATIVE_JINGLE" />
-</enum>
-
-<enum name="TBTState">
- <description>Enumeration that describes possible states of turn-by-turn client or SmartDeviceLink app.</description>
- <element name="ROUTE_UPDATE_REQUEST" />
- <element name="ROUTE_ACCEPTED" />
- <element name="ROUTE_REFUSED" />
- <element name="ROUTE_CANCELLED" />
- <element name="ETA_REQUEST" />
- <element name="NEXT_TURN_REQUEST" />
- <element name="ROUTE_STATUS_REQUEST" />
- <element name="ROUTE_SUMMARY_REQUEST" />
- <element name="TRIP_STATUS_REQUEST" />
- <element name="ROUTE_UPDATE_REQUEST_TIMEOUT" />
-</enum>
-
-<enum name="ApplicationsCloseReason">
- <description>Describes the reasons for exiting all of applications.</description>
- <element name="IGNITION_OFF" />
- <element name="MASTER_RESET" />
- <element name="FACTORY_DEFAULTS" />
-</enum>
-
-<enum name="DisplayType">
- <description>The possible types of HU display.</description>
- <element name="CID">
- <description> A 2-line x 20 character "dot matrix" display </description>
- </element>
- <element name="TYPE2">
- <description> 1 line older radio head unit.</description>
- </element>
- <element name="TYPE5">
- <description> Old radio head unit.</description>
- </element>
- <element name="NGN">
- <description> Next Generation Navigation display.</description>
- </element>
- <element name="GEN2_8_DMA">
- <description> GEN-2, 8 inch display.</description>
- </element>
- <element name="GEN2_6_DMA">
- <description> GEN-2, 6 inch display.</description>
- </element>
- <element name="MFD3">
- <description> 3 inch GEN1.1 display </description>
- </element>
- <element name="MFD4">
- <description> 4 inch GEN1.1 display </description>
- </element>
- <element name="MFD5">
- <description> 5 inch GEN1.1 display </description>
- </element>
- <element name="GEN3_8-INCH" internal_name="GEN3_8_INCH" />
- </enum>
-
-<enum name="ImageType">
- <description>Contains information about the type of image.</description>
- <element name="STATIC" />
- <element name="DYNAMIC" />
-</enum>
-
-<enum name="TextFieldName">
- <element name="mainField1">
- <description>The first line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="mainField2">
- <description>The second line of first set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="mainField3">
- <description>The first line of second set of main fields of persistent display; applies to "Show"</description>
- </element>
- <element name="mainField4">
- <description>The second line of second set of main fields of the persistent display; applies to "Show"</description>
- </element>
- <element name="statusBar">
- <description>The status bar on NGN; applies to "Show"</description>
- </element>
- <element name="mediaClock">
- <description>Text value for MediaClock field; applies to "Show"</description>
- </element>
- <element name="mediaTrack">
- <description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
- </element>
- <element name="alertText1">
- <description>The first line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="alertText2">
- <description>The second line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="alertText3">
- <description>The third line of the alert text field; applies to "Alert"</description>
- </element>
- <element name="scrollableMessageBody">
- <description>Long form body of text that can include newlines and tabs; applies to "ScrollableMessage"</description>
- </element>
- <element name="initialInteractionText">
- <description> First line suggestion for a user response (in the case of VR enabled interaction</description>
- </element>
- <element name="navigationText1">
- <description> First line of navigation text</description>
- </element>
- <element name="navigationText2">
- <description> Second line of navigation text</description>
- </element>
- <element name="ETA">
- <description> Estimated Time of Arrival time for navigation</description>
- </element>
- <element name="totalDistance">
- <description> Total distance to destination for navigation</description>
- </element>
- <element name="navigationText">
- <description>Navigation text for UpdateTurnList.</description>
- </element>
- <element name="audioPassThruDisplayText1">
- <description> First line of text for audio pass thru</description>
- </element>
- <element name="audioPassThruDisplayText2">
- <description> Second line of text for audio pass thru</description>
- </element>
- <element name="sliderHeader">
- <description> Header text for slider</description>
- </element>
- <element name="sliderFooter">
- <description> Footer text for slider</description>
- </element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
- <element name="menuName">
- <description> Primary text for Choice</description>
- </element>
- <element name="secondaryText">
- <description> Secondary text for Choice</description>
- </element>
- <element name="tertiaryText">
- <description> Tertiary text for Choice</description>
- </element>
- <element name="timeToDestination"/>
- <!-- TO DO to be removed -->
- <element name="turnText"/>
-</enum>
-
-<enum name="ImageFieldName">
- <element name="softButtonImage">
- <description>The image field for SoftButton</description>
- </element>
- <element name="choiceImage">
- <description>The first image field for Choice</description>
- </element>
- <element name="choiceSecondaryImage">
- <description>The secondary image field for Choice</description>
- </element>
- <element name="vrHelpItem">
- <description>The image field for vrHelpItem</description>
- </element>
- <element name="turnIcon">
- <description>The image field for Turn</description>
- </element>
- <element name="menuIcon">
- <description>The image field for the menu icon in SetGlobalProperties</description>
- </element>
- <element name="cmdIcon">
- <description>The image field for AddCommand</description>
- </element>
- <element name="appIcon">
- <description>The image field for the app icon (set by setAppIcon)</description>
- </element>
- <element name="graphic">
- <description>The image field for Show</description>
- </element>
- <element name="showConstantTBTIcon">
- <description>The primary image field for ShowConstantTBT</description>
- </element>
- <element name="showConstantTBTNextTurnIcon">
- <description>The secondary image field for ShowConstantTBT</description>
- </element>
-</enum>
-
-<enum name="TextAlignment">
- <description>The list of possible alignments, left, right, or centered</description>
- <element name="LEFT_ALIGNED" />
- <element name="RIGHT_ALIGNED" />
- <element name="CENTERED" />
-</enum>
-
-<enum name="DriverDistractionState">
- <description>Enumeration that describes possible states of driver distraction.</description>
- <element name="DD_ON" />
- <element name="DD_OFF" />
-</enum>
-
-<enum name="MediaClockFormat">
- <element name="CLOCK1">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 19;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 19;maxMinutes = 59;maxSeconds = 59;
- Is used for Type II, NGN and CID head units.
- </description>
- </element>
- <element name="CLOCK2">
- <description>
- minutesFieldWidth = 3;minutesFieldMax = 199;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 59;maxMinutes = 59;maxSeconds = 59;
- Is used for Type V head units.
- </description>
- </element>
- <element name="CLOCK3">
- <description>
- minutesFieldWidth = 2;minutesFieldMax = 59;secondsFieldWidth = 2;secondsFieldMax = 59;maxHours = 9;maxMinutes = 59;maxSeconds = 59;
- Is used for GEN1.1 (i.e. MFD3/4/5) head units.
- </description>
- </element>
- <element name="CLOCKTEXT1">
- <description>
- 5 characters possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for Type II head unit
- </description>
- </element>
- <element name="CLOCKTEXT2">
- <description>
- 5 chars possible
- Format: 1|sp c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for CID and NGN head unit
- </description>
- </element>
- <element name="CLOCKTEXT3">
- <description>
- 6 chars possible
- Format: 1|sp c c :|sp c c
- 1|sp : digit "1" or space
- c : character out of following character set: sp|0-9|[letters
- :|sp : colon or space
- Is used for Type V head unit
- </description>
- </element>
- <element name="CLOCKTEXT4">
- <description>
- 6 chars possible
- Format: c :|sp c c : c c
- :|sp : colon or space
- c : character out of following character set: sp|0-9|[letters].
- Is used for GEN1.1 (i.e. MFD3/4/5) head units
- </description>
- </element>
-</enum>
-
-<!--IVI part-->
-<enum name="ComponentVolumeStatus">
- <description>The volume status of a vehicle component.</description>
- <element name="UNKNOWN" internal_name="CVS_UNKNOWN">
- <description> The data is unknown.</description>
- </element>
- <element name="NORMAL" internal_name="CVS_NORMAL">
- <description> The volume is normal.</description>
- </element>
- <element name="LOW" internal_name="CVS_LOW">
- <description> The volume is low.</description>
- </element>
- <element name="FAULT" internal_name="CVS_FAULT">
- <description> The module/sensor is currently faulted. </description>
- </element>
- <element name="ALERT" internal_name="CVS_ALERT">
- <description> The component`s volume is in critical level.</description>
- </element>
- <element name="NOT_SUPPORTED" internal_name="CVS_NOT_SUPPORTED">
- <description> The data is not supported.</description>
- </element>
-</enum>
-
-<enum name="PRNDL">
- <description>The selected gear.</description>
- <element name="PARK">
- <description>Parking</description>
- </element>
- <element name="REVERSE">
- <description>Reverse gear</description>
- </element>
- <element name="NEUTRAL">
- <description>No gear</description>
- </element>
- <element name="DRIVE">
- </element>
- <element name="SPORT">
- <description>Drive Sport mode</description>
- </element>
- <element name="LOWGEAR">
- <description>1st gear hold</description>
- </element>
- <element name="FIRST">
- </element>
- <element name="SECOND">
- </element>
- <element name="THIRD">
- </element>
- <element name="FOURTH">
- </element>
- <element name="FIFTH">
- </element>
- <element name="SIXTH">
- </element>
- <element name="SEVENTH">
- </element>
- <element name="EIGHTH">
- </element>
- <element name="FAULT">
- </element>
-</enum>
-
-<enum name="VehicleDataEventStatus">
- <description>Reflects the status of a vehicle data event; e.g. a seat belt event status.</description>
- <element name="NO_EVENT" internal_name="VDES_NO_EVENT">
- <description> The system does not have the adequate information to send valid YES or NO states.</description>
- </element>
- <element name="NO" internal_name="VDES_NO">
- <description> The requested event is in NO state.</description>
- </element>
- <element name="YES" internal_name="VDES_YES">
- <description> The requested event is in YES state.</description>
- </element>
- <element name="NOT_SUPPORTED" internal_name="VDES_NOT_SUPPORTED">
- <description> The requested data is not supported </description>
- </element>
- <element name="FAULT" internal_name="VDES_FAULT">
- <description> The module/sensor is currently faulted.</description>
- </element>
-</enum>
-
-<enum name="VehicleDataStatus">
- <description>Reflects the status of a binary vehicle data item.</description>
- <element name="NO_DATA_EXISTS" internal_name="VDS_NO_DATA_EXISTS">
- </element>
- <element name="OFF" internal_name="VDS_OFF">
- </element>
- <element name="ON" internal_name="VDS_ON">
- </element>
-</enum>
-
-<enum name="IgnitionStableStatus">
- <description>Reflects the ignition switch stability.</description>
- <element name="IGNITION_SWITCH_NOT_STABLE">
- </element>
- <element name="IGNITION_SWITCH_STABLE">
- </element>
- <element name="MISSING_FROM_TRANSMITTER">
- <description> Either the data is not accessible or the sensor is broken.</description>
- </element>
-</enum>
-
-<enum name="IgnitionStatus">
- <description>Reflects the status of ignition.</description>
- <element name="UNKNOWN" internal_name="IS_UNKNOWN">
- <description> The information is not acceptable. </description>
- </element>
- <element name="OFF" internal_name="IS_OFF">
- <description> The ignition is off.</description>
- </element>
- <element name="ACCESSORY" internal_name="IS_ACCESSORY">
- <description> The accessories are active (power windows, audio, display, etc.).</description>
- </element>
- <element name="RUN" internal_name="IS_RUN">
- <description> Ignition is active.</description>
- </element>
- <element name="START" internal_name="IS_START">
- <description> Starter is switched.</description>
- </element>
- <element name="INVALID" internal_name="IS_INVALID">
- <description> The data is provided, but there is some sort of fault or problem.</description>
- </element>
-</enum>
-
-<enum name="DeviceLevelStatus">
- <description>Reflects the reported component status of the connected device, if reported.</description>
- <element name="ZERO_LEVEL_BARS">
- </element>
- <element name="ONE_LEVEL_BARS">
- </element>
- <element name="TWO_LEVEL_BARS">
- </element>
- <element name="THREE_LEVEL_BARS">
- </element>
- <element name="FOUR_LEVEL_BARS">
- </element>
- <element name="NOT_PROVIDED">
- </element>
-</enum>
-
-<enum name="PrimaryAudioSource">
- <description>Reflects the current primary audio source (if selected).</description>
- <element name="NO_SOURCE_SELECTED">
- </element>
- <element name="USB">
- </element>
- <element name="USB2">
- </element>
- <element name="BLUETOOTH_STEREO_BTST">
- </element>
- <element name="LINE_IN">
- </element>
- <element name="IPOD">
- </element>
- <element name="MOBILE_APP">
- </element>
-</enum>
-
-<enum name="CompassDirection">
- <description>The list of potential compass directions</description>
- <element name="NORTH">
- </element>
- <element name="NORTHWEST">
- </element>
- <element name="WEST">
- </element>
- <element name="SOUTHWEST">
- </element>
- <element name="SOUTH">
- </element>
- <element name="SOUTHEAST">
- </element>
- <element name="EAST">
- </element>
- <element name="NORTHEAST">
- </element>
-</enum>
-
-<enum name="Dimension">
- <description>The supported dimensions of the GPS</description>
- <element name="NO_FIX" internal_name="Dimension_NO_FIX">
- <description>No GPS at all</description>
- </element>
- <element name="2D" internal_name="Dimension_2D">
- <description>Longitude and lattitude</description>
- </element>
- <element name="3D" internal_name="Dimension_3D">
- <description>Longitude and lattitude and altitude</description>
- </element>
-</enum>
-
-<enum name="TouchType">
- <element name="BEGIN"/>
- <element name="MOVE"/>
- <element name="END"/>
-</enum>
-
-<enum name="WarningLightStatus">
- <description>Reflects the status of a cluster instrument warning light.</description>
- <element name="OFF" internal_name="WLS_OFF">
- </element>
- <element name="ON" internal_name="WLS_ON">
- </element>
- <element name="FLASH" internal_name="WLS_FLASH">
- </element>
- <element name="NOT_USED" internal_name="WLS_NOT_USED">
- </element>
-</enum>
-
-<enum name="VehicleDataResultCode">
- <description>Enumeration that describes possible result codes of a vehicle data entry request.</description>
- <element name="SUCCESS" internal_name="VDRC_SUCCESS"/>
- <element name="TRUNCATED_DATA" internal_name="VDRC_TRUNCATED_DATA"/>
- <element name="DISALLOWED" internal_name="VDRC_DISALLOWED"/>
- <element name="USER_DISALLOWED" internal_name="VDRC_USER_DISALLOWED"/>
- <element name="INVALID_ID" internal_name="VDRC_INVALID_ID"/>
- <element name="VEHICLE_DATA_NOT_AVAILABLE" internal_name="VDRC_DATA_NOT_AVAILABLE"/>
- <element name="DATA_ALREADY_SUBSCRIBED" internal_name="VDRC_DATA_ALREADY_SUBSCRIBED"/>
- <element name="DATA_NOT_SUBSCRIBED" internal_name="VDRC_DATA_NOT_SUBSCRIBED"/>
- <element name="IGNORED" internal_name="VDRC_IGNORED"/>
-</enum>
-
-<enum name="VehicleDataType">
- <description>Defines the data types that can be published and subscribed to.</description>
- <element name="VEHICLEDATA_GPS">
- <description>Notifies GPSData may be subscribed</description>
- </element>
- <element name="VEHICLEDATA_SPEED" />
- <element name="VEHICLEDATA_RPM" />
- <element name="VEHICLEDATA_FUELLEVEL" />
- <element name="VEHICLEDATA_FUELLEVEL_STATE" />
- <element name="VEHICLEDATA_FUELCONSUMPTION" />
- <element name="VEHICLEDATA_EXTERNTEMP" />
- <element name="VEHICLEDATA_VIN" />
- <element name="VEHICLEDATA_PRNDL" />
- <element name="VEHICLEDATA_TIREPRESSURE" />
- <element name="VEHICLEDATA_ODOMETER" />
- <element name="VEHICLEDATA_BELTSTATUS" />
- <element name="VEHICLEDATA_BODYINFO" />
- <element name="VEHICLEDATA_DEVICESTATUS" />
- <element name="VEHICLEDATA_ECALLINFO" />
- <element name="VEHICLEDATA_AIRBAGSTATUS" />
- <element name="VEHICLEDATA_EMERGENCYEVENT" />
- <element name="VEHICLEDATA_CLUSTERMODESTATUS" />
- <element name="VEHICLEDATA_MYKEY" />
- <element name="VEHICLEDATA_BRAKING" />
- <element name="VEHICLEDATA_WIPERSTATUS" />
- <element name="VEHICLEDATA_HEADLAMPSTATUS" />
- <element name="VEHICLEDATA_BATTVOLTAGE" />
- <element name="VEHICLEDATA_ENGINETORQUE" />
- <element name="VEHICLEDATA_ACCPEDAL" />
- <element name="VEHICLEDATA_STEERINGWHEEL" />
-</enum>
-
-<enum name="WiperStatus">
- <description>Reflects the status of the wipers.</description>
- <element name="OFF">
- <description> The wipers are off.</description>
- </element>
- <element name="AUTO_OFF">
- <description> The wipers are automatically off </description>
- </element>
- <element name="OFF_MOVING">
- <description> Means that though set to off, somehow the wipers have been engaged (physically moved enough to engage a wiping motion).</description>
- </element>
- <element name="MAN_INT_OFF">
- <description> The wipers are manually off after having been working.</description>
- </element>
- <element name="MAN_INT_ON">
- <description> The wipers are manually on.</description>
- </element>
- <element name="MAN_LOW">
- <description> The wipers are manually set to low speed.</description>
- </element>
- <element name="MAN_HIGH">
- <description> The wipers are manually set to high speed.</description>
- </element>
- <element name="MAN_FLICK">
- <description> The wipers are manually set for doing a flick.</description>
- </element>
- <element name="WASH">
- <description> The wipers are set to use the water from vehicle washer bottle for cleaning the windscreen.</description>
- </element>
- <element name="AUTO_LOW">
- <description> The wipers are automatically set to low speed.</description>
- </element>
- <element name="AUTO_HIGH">
- <description> The wipers are automatically set to high speed.</description>
- </element>
- <element name="COURTESYWIPE">
- <description> This is for when a user has just initiated a WASH and several seconds later a secondary wipe is automatically initiated to clear remaining fluid.</description>
- </element>
- <element name="AUTO_ADJUST">
- <description> This is set as the user moves between possible automatic wiper speeds.</description>
- </element>
- <element name="STALLED">
- <description> The wiper is stalled to its place. </description>
- </element>
- <element name="NO_DATA_EXISTS">
- <description> The sensor / module cannot provide any information for wiper.</description>
- </element>
-</enum>
-
-<enum name="SamplingRate">
- <description>Describes different sampling options for PerformAudioPassThru.</description>
- <element name="8KHZ" internal_name="RATE_8KHZ"/>
- <element name="16KHZ" internal_name="RATE_16KHZ"/>
- <element name="22KHZ" internal_name="RATE_22KHZ"/>
- <element name="44KHZ" internal_name="RATE_44KHZ"/>
-</enum>
-
-<enum name="BitsPerSample">
- <description>Describes different quality options for PerformAudioPassThru.</description>
- <element name="8_BIT" internal_name="RATE_8_BIT"/>
- <element name="16_BIT" internal_name="RATE_16_BIT"/>
-</enum>
-
-<enum name="AudioType">
- <description>Describes different audio type options for PerformAudioPassThru.</description>
- <element name="PCM" />
-</enum>
-
-<enum name="KeyboardLayout">
- <description>Enumeration listing possible keyboard layouts.</description>
- <element name="QWERTY" />
- <element name="QWERTZ" />
- <element name="AZERTY" />
-</enum>
-
-<enum name="KeyboardEvent">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="KEYPRESS" />
- <element name="ENTRY_SUBMITTED" />
- <element name="ENTRY_CANCELLED" />
- <element name="ENTRY_ABORTED" />
-</enum>
-
-<enum name="KeypressMode">
- <description>Enumeration listing possible keyboard events.</description>
- <element name="SINGLE_KEYPRESS">
- <description>Each keypress is individually sent as the user presses the keyboard keys.</description>
- </element>
- <element name="QUEUE_KEYPRESSES">
- <description>The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.</description>
- </element>
- <element name="RESEND_CURRENT_ENTRY">
- <description>The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.</description>
- </element>
-</enum>
-
-<enum name="AmbientLightStatus">
- <description>Reflects the status of the ambient light sensor.</description>
- <element name="NIGHT" />
- <element name="TWILIGHT_1" />
- <element name="TWILIGHT_2" />
- <element name="TWILIGHT_3" />
- <element name="TWILIGHT_4" />
- <element name="DAY" />
- <element name="UNKNOWN" />
- <element name="INVALID" />
-</enum>
-
-<enum name="FileType">
- <description>Enumeration listing possible file types.</description>
- <element name="GRAPHIC_BMP" />
- <element name="GRAPHIC_JPEG" />
- <element name="GRAPHIC_PNG" />
- <element name="AUDIO_WAVE" />
- <element name="AUDIO_MP3" />
- <element name="AUDIO_AAC" />
- <element name="BINARY" />
- <element name="JSON" />
-</enum>
-
-<enum name="RequestType">
- <description>Enumeration listing possible asynchronous requests.</description>
- <element name="HTTP" />
- <element name="FILE_RESUME" />
- <element name="AUTH_REQUEST" />
- <element name="AUTH_CHALLENGE" />
- <element name="AUTH_ACK" />
- </enum>
-
-<enum name="ECallConfirmationStatus">
- <description>Reflects the status of the eCall Notification.</description>
- <element name="NORMAL" internal_name="ECCS_NORMAL">
- </element>
- <element name="CALL_IN_PROGRESS" internal_name="ECCS_CALL_IN_PROGRESS">
- </element>
- <element name="CALL_CANCELLED" internal_name="ECCS_CALL_CANCELLED">
- </element>
- <element name="CALL_COMPLETED">
- </element>
- <element name="CALL_UNSUCCESSFUL" internal_name="ECCS_CALL_UNSUCCESSFUL">
- </element>
- <element name="ECALL_CONFIGURED_OFF" internal_name="ECCS_ECALL_CONFIGURED_OFF">
- </element>
- <element name="CALL_COMPLETE_DTMF_TIMEOUT" internal_name="ECCS_CALL_COMPLETE_DTMF_TIMEOUT">
- </element>
-</enum>
-
-<enum name="VehicleDataNotificationStatus">
- <description>Reflects the status of a vehicle data notification.</description>
- <element name="NOT_SUPPORTED" internal_name="VDNS_NOT_SUPPORTED">
- </element>
- <element name="NORMAL" internal_name="VDNS_NORMAL">
- </element>
- <element name="ACTIVE" internal_name="VDNS_ACTIVE">
- </element>
- <element name="NOT_USED" internal_name="VDNS_NOT_USED">
- </element>
-</enum>
-
-<enum name="EmergencyEventType">
- <description>Reflects the emergency event status of the vehicle.</description>
- <element name="NO_EVENT" internal_name="EET_NO_EVENT">
- </element>
- <element name="FRONTAL" internal_name="EET_FRONTAL">
- </element>
- <element name="SIDE" internal_name="EET_SIDE">
- </element>
- <element name="REAR" internal_name="EET_REAR">
- </element>
- <element name="ROLLOVER" internal_name="EET_ROLLOVER">
- </element>
- <element name="NOT_SUPPORTED" internal_name="EET_NOT_SUPPORTED">
- </element>
- <element name="FAULT" internal_name="EET_FAULT">
- </element>
-</enum>
-
-<enum name="FuelCutoffStatus">
- <description>Reflects the status of the RCM fuel cutoff.</description>
- <element name="TERMINATE_FUEL" internal_name="FCS_TERMINATE_FUEL">
- </element>
- <element name="NORMAL_OPERATION" internal_name="FCS_NORMAL_OPERATION">
- </element>
- <element name="FAULT" internal_name="FCS_FAULT">
- </element>
-</enum>
-
-<enum name="PowerModeQualificationStatus">
- <description>Reflects the status of the current power mode qualification.</description>
- <element name="POWER_MODE_UNDEFINED">
- </element>
- <element name="POWER_MODE_EVALUATION_IN_PROGRESS">
- </element>
- <element name="NOT_DEFINED">
- </element>
- <element name="POWER_MODE_OK">
- </element>
-</enum>
-
-<enum name="CarModeStatus">
- <description>Reflects the status of the current car mode.</description>
- <element name="NORMAL" internal_name="CMS_NORMAL">
- </element>
- <element name="FACTORY" internal_name="CMS_FACTORY">
- </element>
- <element name="TRANSPORT" internal_name="CMS_TRANSPORT">
- </element>
- <element name="CRASH" internal_name="CMS_CRASH">
- </element>
-</enum>
-
-<enum name="PowerModeStatus">
- <description>Reflects the status of the current power mode.</description>
- <element name="KEY_OUT">
- </element>
- <element name="KEY_RECENTLY_OUT">
- </element>
- <element name="KEY_APPROVED_0">
- </element>
- <element name="POST_ACCESORY_0">
- </element>
- <element name="ACCESORY_1">
- </element>
- <element name="POST_IGNITION_1">
- </element>
- <element name="IGNITION_ON_2">
- </element>
- <element name="RUNNING_2">
- </element>
- <element name="CRANK_3">
- </element>
-</enum>
-
-<!-- End of IVI part-->
-
-<struct name="ButtonCapabilities">
- <description>Contains the information about capabilities of a button.</description>
- <param name="name" type="Common.ButtonName" mandatory="true">
- <description>The name of the Button from the ButtonName enum</description>
- </param>
- <param name="shortPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a short press. Whenever the button is pressed short, onButtonPressed(SHORT) should be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a LONG press. Whenever the button is pressed long, onButtonPressed(LONG) should be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean" mandatory="true">
- <description>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent(DOWN) should be invoked. Whenever the button is released, onButtonEvent(UP) should be invoked.</description>
- </param>
-</struct>
-
-<struct name="VehicleDataResult">
- <description>Individual published data request result</description>
- <param name="dataType" type="Common.VehicleDataType">
- <description>Defined published data element type.</description>
- </param>
- <param name="resultCode" type="Common.VehicleDataResultCode">
- <description>Published data result code.</description>
- </param>
-</struct>
-
-<struct name="TouchCoord">
- <param name="x" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The x coordinate of the touch.</description>
- </param>
- <param name="y" type="Integer" mandatory="true" minvalue="0" maxvalue="10000">
- <description>The y coordinate of the touch.</description>
- </param>
-</struct>
-
-<struct name="TouchEvent">
- <param name="id" type="Integer" mandatory="true" minvalue="0" maxvalue="9">
- <description>
- A touch's unique identifier. The application can track the current touch events by id.
- If a touch event has type begin, the id should be added to the set of touches.
- If a touch event has type end, the id should be removed from the set of touches.
- </description>
- </param>
- <param name="ts" type="Integer" mandatory="true" array="true" minvalue="0" maxvalue="2147483647" minsize="1" maxsize="1000">
- <description>
- The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds.
- The timestamp is used to determined the rate of change of position of a touch.
- The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user.
- If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array.
- </description>
- </param>
- <param name="c" type="Common.TouchCoord" mandatory="true" array="true" minsize="1" maxsize="1000">
- </param>
-</struct>
-
-<struct name="PresetBankCapabilities">
- <description>Contains information about on-screen preset capabilities (whether the HW preset buttons could be duplicated with onscreen buttons).</description>
- <param name="onScreenPresetsAvailable" type="Boolean" mandatory="true">
- <description>Must be true if onscreen custom presets are available.</description>
- </param>
-</struct>
-
-<struct name="Image">
- <param name="value" maxlength="65535" type="String" mandatory="true">
- <description>The path to the dynamic image stored on HU or the static binary image itself.</description>
- </param>
- <param name="imageType" type="Common.ImageType" mandatory="true">
- <description>Describes, whether it is a static or dynamic image.</description>
- </param>
-</struct>
-
-<struct name="SoftButton">
- <param name="type" type="Common.SoftButtonType" mandatory="true">
- <description>Describes, whether text, icon or both text and image should be displayed on the soft button. See softButtonType</description>
- </param>
- <param name="text" maxlength="500" type="String" mandatory="false">
- <description>Optional text to be displayed (if defined as TEXT or BOTH)</description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description>Optional image struct for SoftButton (if defined as IMAGE or BOTH)</description>
- </param>
- <param name="isHighlighted" type="Boolean" mandatory="false">
- <description>If true, must be highlighted</description>
- <description>If false, must be not</description>
- </param>
- <param name="softButtonID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Value which must be returned via OnButtonPress / OnButtonEvent</description>
- </param>
- <param name="systemAction" type="Common.SystemAction" mandatory="false">
- <description>Parameter indicates whether clicking a SoftButton must call a specific system action. See SystemAction</description>
- </param>
- </struct>
-
-<struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to be spoken</description>
- <param name="text" type="String" mandatory="true" maxlength="500">
- <description>The text or phonemes to be spoken.</description>
- </param>
- <param name="type" type="Common.SpeechCapabilities" mandatory="true">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities.</description>
- </param>
-</struct>
-
-<struct name="HMIApplication">
- <description>Data type containing information about application needed by HMI.</description>
- <param name="appName" type="String" maxlength="100" mandatory="true">
- <description>The mobile application name, e.g. "Ford Drive Green".</description>
- </param>
- <param name="ngnMediaScreenAppName" type="String" maxlength="100" mandatory="false">
- <description>Provides an abbreviated version of the app name (if needed), that may be displayed on the NGN media screen.</description>
- <description>If not provided, the appName should be used instead (and may be truncated if too long)</description>
- </param>
- <param name="icon" type="String" mandatory="false">
- <description>Path to application icon stored on HU.</description>
- </param>
- <param name="deviceName" type="String" mandatory="true">
- <description>The name of device which the provided application is running on.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Unique (during ignition cycle) id of the application. To be used in all RPCs sent by both HU system and SDL</description>
- </param>
- <param name="hmiDisplayLanguageDesired" type="Common.Language" mandatory="true">
- <description>The language the application intends to use on HU </description>
- </param>
- <param name="isMediaApplication" type="Boolean" mandatory="true">
- <description>Indicates whether it is a media or a non-media application.</description>
- </param>
- <param name="appType" type="Common.AppHMIType" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>List of all applicable app types stating which classifications to be given to the app.</description>
- <description>e.g. for platforms like GEN2, this determines which "corner(s)" the app can populate.</description>
- </param>
-</struct>
-
-<struct name="MenuParams">
- <param name="parentID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>unique ID of the sub menu, the command must be added to.</description>
- <description>If not provided, the command must be added to the top level of the in application menu.</description>
- </param>
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
- <description>Position within the items that are at the top level of the in application menu.</description>
- <description>0 should insert at the front.</description>
- <description>1 should insert at the second position.</description>
- <description>if position is greater than or equal to the number of items on the top level, the the sub menu/command should be appended to the end.</description>
- <description>If this param is omitted the entry should be added at the end.</description>
- </param>
- <param name="menuName" type="String" maxlength="500" mandatory="true">
- <description>The name of the sub menu/command.</description>
- </param>
-</struct>
-
-<struct name="Choice">
- <description>A choice is an option given to the user which can be selected either by menu, or through voice recognition system.</description>
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description> The unique within the concerned application identifier for this choice </description>
- </param>
- <param name="menuName" type="String" maxlength="500" mandatory="false">
- <description> The name of the choice </description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description> The image for representing the choice </description>
- </param>
- <param name="secondaryText" maxlength="500" type="String" mandatory="false">
- <description>Optional secondary text to display; e.g. address of POI in a search result entry</description>
- </param>
- <param name="tertiaryText" maxlength="500" type="String" mandatory="false">
- <description>Optional tertiary text to display; e.g. distance to POI for a search result entry</description>
- </param>
- <param name="secondaryImage" type="Image" mandatory="false">
- <description>Optional secondary image struct for choice</description>
- </param>
-</struct>
-
-<struct name="VrHelpItem">
- <param name="text" maxlength="500" type="String" mandatory="true">
- <description>Text to display for VR Help item</description>
- </param>
- <param name="image" type="Common.Image" mandatory="false">
- <description>Image struct for VR Help item</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="100" mandatory="true">
- <description>Position to display item in VR Help list</description>
- </param>
-</struct>
-
-<struct name="TimeFormat">
- <param name="hours" type="Integer" minvalue="0" maxvalue="59" mandatory="true">
- <description>The hour of the media clock.</description>
- <description>Some units only support a max of 19 hours. If out of range, it should be rejected.</description>
- </param>
- <param name="minutes" type="Integer" minvalue="0" maxvalue="59" mandatory="true"/>
- <param name="seconds" type="Integer" minvalue="0" maxvalue="59" mandatory="true"/>
-</struct>
-
-<struct name="TouchEventCapabilities">
- <param name="pressAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="multiTouchAvailable" type="Boolean" mandatory="true">
- </param>
- <param name="doublePressAvailable" type="Boolean" mandatory="true">
- </param>
-</struct>
-
-<struct name="ImageResolution">
- <param name="resolutionWidth" type="Integer" minvalue="1" maxvalue="10000" mandatory="true">
- <description>The image resolution width.</description>
- </param>
- <param name="resolutionHeight" type="Integer" minvalue="1" maxvalue="10000" mandatory="true">
- <description>The image resolution height.</description>
- </param>
-</struct>
-
-<struct name="ScreenParams">
- <param name="resolution" type="Common.ImageResolution" mandatory="true">
- <description>The resolution of the prescribed screen area.</description>
- </param>
- <param name="touchEventAvailable" type="Common.TouchEventCapabilities" mandatory="false">
- <description>Types of screen touch events available in screen area.</description>
- </param>
-</struct>
-
-<struct name="ImageField">
- <param name="name" type="Common.ImageFieldName" mandatory="true">
- <description>The name that identifies the field. See ImageFieldName.</description>
- </param>
- <param name="imageTypeSupported" type="Common.FileType" maxsize="100" array="true" mandatory="false" minsize="1">
- <description>The image types that are supported in this field. See FileType.</description>
- </param>
- <param name="imageResolution" type="Common.ImageResolution" mandatory="false">
- <description>The image resolution of this field.</description>
- </param>
-</struct>
-
-<struct name="DisplayCapabilities">
- <description>Contains information about the display capabilities.</description>
- <param name="displayType" type="Common.DisplayType" mandatory="true">
- <description>The type of the display. See DisplayType</description>
- </param>
- <param name="textFields" type="Common.TextFieldName" minsize="0" maxsize="100" array="true" mandatory="true">
- <description>A set of all fields for text displaying supported by HU. See TextFieldName.</description>
- <description>If there are no textfields supported, the empty array must be returned</description>
- </param>
- <param name="imageFields" type="Common.ImageField" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>A set of all fields that support images. See ImageField</description>
- </param>
- <param name="mediaClockFormats" type="Common.MediaClockFormat" minsize="1" maxsize="100" array="true" mandatory="true">
- <description>A set of all supported formats of the media clock. See MediaClockFormat</description>
- </param>
- <param name="imageCapabilities" type="Common.ImageType" array="true" minsize="0" maxsize="2" mandatory="false">
- </param>
- <param name="graphicSupported" type="Boolean" mandatory="true">
- <description>The display's persistent screen supports referencing a static or dynamic image.</description>
- </param>
- <param name="templatesAvailable" type="String" minsize="0" maxsize="100" maxlength="100" array="true" mandatory="true">
- <description>A set of all predefined persistent display templates available on headunit. To be referenced in SetDisplayLayout.</description>
- </param>
- <param name="screenParams" type="Common.ScreenParams" mandatory="false">
- <description>A set of all parameters related to a prescribed screen area (e.g. for video / touch input).</description>
- </param>
- <param name="numCustomPresetsAvailable" type="Integer" minvalue="1" maxvalue="100" mandatory="false">
- <description>The number of on-screen custom presets available (if any); otherwise omitted.</description>
- </param>
-</struct>
-
-<struct name="SoftButtonCapabilities">
- <description>Contains information about a SoftButton's capabilities.</description>
- <param name="shortPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a short press.</description>
- <description>Whenever the button is pressed short, onButtonPressed( SHORT) must be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean" mandatory="true">
- <description>The button supports a LONG press.</description>
- <description>Whenever the button is pressed long, onButtonPressed( LONG) must be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean" mandatory="true">
- <description>The button supports "button down" and "button up".</description>
- <description>Whenever the button is pressed, onButtonEvent( DOWN) must be invoked.</description>
- <description>Whenever the button is released, onButtonEvent( UP) must be invoked.</description>
- </param>
- <param name="imageSupported" type="Boolean" mandatory="true">
- <description>Must be true if the button supports referencing a static or dynamic image.</description>
- </param>
-</struct>
-
-<struct name="AudioPassThruCapabilities">
- <description>
- Describes different audio type configurations for PerformAudioPassThru.
- e.g. 8kHz,8-bit,PCM
- </description>
- <param name="samplingRate" type="Common.SamplingRate" mandatory="true"/>
- <param name="bitsPerSample" type="Common.BitsPerSample" mandatory="true"/>
- <param name="audioType" type="Common.AudioType" mandatory="true"/>
-</struct>
-
-<struct name="Coordinate">
- <param name="xCoord" type="Integer" mandatory="true">
- </param>
- <param name="yCoord" type="Integer" mandatory="true">
- </param>
-</struct>
-
-<struct name="TouchArea">
- <param name="rotationAngle" type="Float" mandatory="false" minvalue="0" maxvalue="360">
- </param>
- <param name="radiusCoord" type="Common.Coordinate" mandatory="true">
- </param>
-</struct>
-
-<struct name="TextFieldStruct">
- <param name="fieldName" type="Common.TextFieldName" mandatory="true">
- <description>The name of the field for displaying the text.</description>
- </param>
- <param name="fieldText" type="String" maxlength="500" mandatory="true">
- <description>The text itself.</description>
- </param>
-</struct>
-
-<struct name="KeyboardProperties">
- <description>Configuration of on-screen keyboard (if available).</description>
- <param name="language" type="Common.Language" mandatory="false">
- <description>The keyboard language.</description>
- </param>
- <param name="keyboardLayout" type="Common.KeyboardLayout" mandatory="false" >
- <description>Desired keyboard layout.</description>
- </param>
- <param name="keypressMode" type="Common.KeypressMode" mandatory="false" >
- <description>
- Desired keypress mode.
- If omitted, this value will be set to RESEND_CURRENT_ENTRY.
- </description>
- </param>
- <param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Array of keyboard characters to enable.</description>
- <description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
- </param>
- <param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
- <description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
-</struct>
-
-<struct name="Turn">
- <param name="navigationText" type="Common.TextFieldStruct" mandatory="false">
- <description>Uses navigationText from TextFieldStruct.</description>
- </param>
- <param name="turnIcon" type="Common.Image" mandatory="false">
- </param>
-</struct>
-
-<struct name="VehicleType">
- <param name="make" type="String" maxlength="500" mandatory="false">
- <description>Make of the vehicle</description>
- <description>e.g. Ford</description>
- </param>
- <param name="model" type="String" maxlength="500" mandatory="false">
- <description>Model of the vehicle</description>
- <description>e.g. Fiesta</description>
- </param>
- <param name="modelYear" type="String" maxlength="500" mandatory="false">
- <description>Model Year of the vehicle</description>
- <description>e.g. 2013</description>
- </param>
- <param name="trim" type="String" maxlength="500" mandatory="false">
- <description>Trim of the vehicle</description>
- <description>e.g. SE</description>
- </param>
-</struct>
-
-<struct name="DeviceInfo">
- <param name="name" type="String" mandatory="true">
- <description>The name of the device connected.</description>
- </param>
- <param name="id" type="Integer" mandatory="true">
- <description>The ID of the device connected</description>
- </param>
-</struct>
-
-<!--IVI part-->
-<struct name="GPSData">
- <description>Struct with the GPS data.</description>
- <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="false">
- </param>
- <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="false">
- </param>
- <param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100" mandatory="false">
- <description>The current UTC year.</description>
- </param>
- <param name="utcMonth" type="Integer" minvalue="1" maxvalue="12" mandatory="false">
- <description>The current UTC month.</description>
- </param>
- <param name="utcDay" type="Integer" minvalue="1" maxvalue="31" mandatory="false">
- <description>The current UTC day.</description>
- </param>
- <param name="utcHours" type="Integer" minvalue="0" maxvalue="23" mandatory="false">
- <description>The current UTC hour.</description>
- </param>
- <param name="utcMinutes" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC minute.</description>
- </param>
- <param name="utcSeconds" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC second.</description>
- </param>
- <param name="compassDirection" type="Common.CompassDirection" mandatory="false">
- <description>See CompassDirection.</description>
- </param>
- <param name="pdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>PDOP.</description>
- </param>
- <param name="hdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>HDOP.</description>
- </param>
- <param name="vdop" type="Float" minvalue="0" maxvalue="10" mandatory="false">
- <description>VDOP.</description>
- </param>
- <param name="actual" type="Boolean" mandatory="false">
- <description>
- True, if actual.
- False, if infered.
- </description>
- </param>
- <param name="satellites" type="Integer" minvalue="0" maxvalue="31" mandatory="false">
- <description>Number of satellites in view</description>
- </param>
- <param name="dimension" type="Common.Dimension" mandatory="false">
- <description>See Dimension</description>
- </param>
- <param name="altitude" type="Float" minvalue="-10000" maxvalue="10000" mandatory="false">
- <description>Altitude in meters</description>
- </param>
- <param name="heading" type="Float" minvalue="0" maxvalue="359.99" mandatory="false">
- <description>The heading. North is 0. Resolution is 0.01</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="false">
- <description>The speed in KPH</description>
- </param>
-</struct>
-
-<struct name="SingleTireStatus">
- <param name="status" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The status of component volume. See ComponentVolumeStatus.</description>
-</param>
-</struct>
-
-<struct name="DIDResult">
- <description>Individual requested DID result and data</description>
- <param name="resultCode" type="Common.VehicleDataResultCode" mandatory="true">
- <description>Individual DID result code.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Location of raw data (the address from ReadDID request)</description>
- </param>
- <param name="data" type="String" maxlength="5000" mandatory="false">
- <description>Raw DID-based data returned for requested element.</description>
- </param>
-</struct>
-
-<struct name="HeadLampStatus">
- <param name="lowBeamsOn" type="Boolean" mandatory="true">
- <description>Status of the low beam lamps.</description>
- </param>
- <param name="highBeamsOn" type="Boolean" mandatory="true">
- <description>Status of the high beam lamps.</description>
- </param>
- <param name="ambientLightSensorStatus" type="Common.AmbientLightStatus" mandatory="true">
- <description>Status of the ambient light sensor.</description>
- </param>
-</struct>
-
-<struct name="TireStatus">
- <description>The status and pressure of the tires.</description>
- <param name="pressureTelltale" type="Common.WarningLightStatus" mandatory="false">
- <description>Status of the Tire Pressure Telltale. See WarningLightStatus.</description>
- </param>
- <param name="leftFront" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the left front tire.</description>
- </param>
- <param name="rightFront" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the right front tire.</description>
- </param>
- <param name="leftRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the left rear tire.</description>
- </param>
- <param name="rightRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the right rear tire.</description>
- </param>
- <param name="innerLeftRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the inner left rear.</description>
- </param>
- <param name="innerRightRear" type="Common.SingleTireStatus" mandatory="false">
- <description>The status of the inner right rear.</description>
- </param>
-</struct>
-
-<struct name="BeltStatus">
- <param name="driverBeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerBuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="driverBuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerChildDetected" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow2BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRow3BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="leftRearInflatableBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="rightRearInflatableBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BeltDeployed" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
- <param name="middleRow1BuckleBelted" type="Common.VehicleDataEventStatus" mandatory="false">
- <description>See VehicleDataEventStatus.</description>
- </param>
-</struct>
-
-<struct name="BodyInformation">
- <param name="parkBrakeActive" type="Boolean" mandatory="true">
- <description>Must be true if the park brake is active</description>
- </param>
- <param name="ignitionStableStatus" type="Common.IgnitionStableStatus" mandatory="true">
- <description>Information about the ignition switch. See IgnitionStableStatus.</description>
- </param>
- <param name="ignitionStatus" type="Common.IgnitionStatus" mandatory="true">
- <description>The status of the ignition. See IgnitionStatus.</description>
- </param>
- <param name="driverDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatDrv_B_Actl".</description>
- </param>
- <param name="passengerDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatPsngr_B_Actl".</description>
- </param>
- <param name="rearLeftDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRl_B_Actl".</description>
- </param>
- <param name="rearRightDoorAjar" type="Boolean" mandatory="false">
- <description>References signal "DrStatRr_B_Actl".</description>
- </param>
-</struct>
-
-<struct name="DeviceStatus">
- <param name="voiceRecOn" type="Boolean" mandatory="false">
- <description>Must be true if the voice recording is on.</description>
- </param>
- <param name="btIconOn" type="Boolean" mandatory="false">
- <description>Must be true if Bluetooth icon is displayed.</description>
- </param>
- <param name="callActive" type="Boolean" mandatory="false">
- <description>Must be true if there is an active call..</description>
- </param>
- <param name="phoneRoaming" type="Boolean" mandatory="false">
- <description>Must be true if ther is a phone roaming.</description>
- </param>
- <param name="textMsgAvailable" type="Boolean" mandatory="false">
- <description>Must be true if the text message is available.</description>
- </param>
- <param name="battLevelStatus" type="Common.DeviceLevelStatus" mandatory="false">
- <description>Device battery level status. See DeviceLevelStatus.</description>
- </param>
- <param name="stereoAudioOutputMuted" type="Boolean" mandatory="false">
- <description>Must be true if stereo audio output is muted.</description>
- </param>
- <param name="monoAudioOutputMuted" type="Boolean" mandatory="false">
- <description>Must be true if mono audio output is muted.</description>
- </param>
- <param name="signalLevelStatus" type="Common.DeviceLevelStatus" mandatory="false">
- <description>Device signal level status. See DeviceLevelStatus.</description>
- </param>
- <param name="primaryAudioSource" type="Common.PrimaryAudioSource" mandatory="false">
- <description>See PrimaryAudioSource.</description>
- </param>
- <param name="eCallEventActive" type="Boolean" mandatory="false">
- <description>Must be true if emergency call event is active.</description>
- </param>
-</struct>
-
-<struct name="ECallInfo">
- <param name="eCallNotificationStatus" type="Common.VehicleDataNotificationStatus">
- <description>References signal "eCallNotification_4A". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="auxECallNotificationStatus" type="Common.VehicleDataNotificationStatus">
- <description>References signal "eCallNotification". See VehicleDataNotificationStatus.</description>
- </param>
- <param name="eCallConfirmationStatus" type="Common.ECallConfirmationStatus">
- <description>References signal "eCallConfirmation". See ECallConfirmationStatus.</description>
- </param>
-</struct>
-
-<struct name="AirbagStatus">
- <param name="driverAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverSideAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsDrvSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverCurtainAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsDrvCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsPasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerCurtainAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsPasCrtnBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="driverKneeAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsKneeDrvBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerSideAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsPasSideBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="passengerKneeAirbagDeployed" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsKneePasBag_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
-</struct>
-
-<struct name="EmergencyEvent">
- <param name="emergencyEventType" type="Common.EmergencyEventType">
- <description>References signal "VedsEvntType_D_Ltchd". See EmergencyEventType.</description>
- </param>
- <param name="fuelCutoffStatus" type="Common.FuelCutoffStatus">
- <description>References signal "RCM_FuelCutoff". See FuelCutoffStatus.</description>
- </param>
- <param name="rolloverEvent" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsEvntRoll_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="maximumChangeVelocity" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsMaxDeltaV_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
- <param name="multipleEvents" type="Common.VehicleDataEventStatus">
- <description>References signal "VedsMultiEvnt_D_Ltchd". See VehicleDataEventStatus.</description>
- </param>
-</struct>
-
-<struct name="ClusterModeStatus">
- <param name="powerModeActive" type="Boolean">
- <description>References signal "PowerMode_UB".</description>
- </param>
- <param name="powerModeQualificationStatus" type="Common.PowerModeQualificationStatus">
- <description>References signal "PowerModeQF". See PowerModeQualificationStatus.</description>
- </param>
- <param name="carModeStatus" type="Common.CarModeStatus">
- <description>References signal "CarMode". See CarMode.</description>
- </param>
- <param name="powerModeStatus" type="Common.PowerModeStatus">
- <description>References signal "PowerMode". See PowerMode.</description>
- </param>
-</struct>
-
-<struct name="MyKey">
- <param name="e911Override" type="Common.VehicleDataStatus" mandatory="true">
- <description>Indicates whether e911 override is on. See VehicleDataStatus.</description>
- </param>
-</struct>
-<!--end of IVI part-->
-
-</interface>
-
-<interface name="Buttons" version="1.0" date="2013-04-12">
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system start-up. SDL requests the information about all supported hardware buttons and their capabilities</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="capabilities" type="Common.ButtonCapabilities" array="true" minsize="1" maxsize="100" mandatory="true">
- <description>Response must provide the names of available buttons and their capabilities.See ButtonCapabilities</description>
- </param>
- <param name="presetBankCapabilities" type="Common.PresetBankCapabilities" mandatory="false">
- <description>Must be returned if the platform supports custom on-screen Presets</description>
- </param>
- </function>
- <function name="OnButtonEvent" messagetype="notification">
- <description>HU system must notify about every UP/DOWN event for buttons</description>
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="mode" type="Common.ButtonEventMode" mandatory="true">
- <description>Indicates whether this is an UP or DOWN event.</description>
- </param>
- <param name="customButtonID" type="Integer" mandatory="false" minvalue="0" maxvalue="65536">
- <description>Must be provided if ButtonName is CUSTOM_BUTTON, this references the integer ID passed by a custom button. (e.g. softButtonName)</description>
- </param>
- </function>
- <function name="OnButtonPress" messagetype="notification">
- <param name="name" type="Common.ButtonName" mandatory="true"/>
- <param name="mode" type="Common.ButtonPressMode" mandatory="true">
- <description>Indicates whether this is a LONG or SHORT button press event.</description>
- </param>
- <param name="customButtonID" type="Integer" mandatory="false" minvalue="0" maxvalue="65536">
- <description>Must be returned if ButtonName is CUSTOM_BUTTON, this references the string passed by a custom button. (e.g. softButtonName)</description>
- </param>
- </function>
-</interface>
-
-<interface name="BasicCommunication" version="1.0" date="2013-04-12">
- <function name="OnReady" messagetype="notification">
- <description>HMI must notify SDL about its readiness to start communication. In fact, this has to be the first message between SDL and HMI.</description>
- </function>
- <function name="OnStartDeviceDiscovery" messagetype="notification">
- <description>Initiated by HMI user for getting the list of connected devices.</description>
- </function>
- <function name="UpdateDeviceList" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change device list.</description>
- <param name="deviceList" type="Common.DeviceInfo" mandatory="true" array="true" minsize="0" maxsize="100">
- <description>The array of names/IDs of connected devices</description>
- </param>
- </function>
- <function name="UpdateDeviceList" messagetype="response">
- </function>
- <function name="OnUpdateDeviceList" messagetype="notification">
- <description>Notification from HMI to SDL sent when HMI requires update of device list (i.e. when user clicks 'Change Device' button)</description>
- </function>
- <function name="AllowDeviceToConnect" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get the permissions of new device connection.</description>
- <param name="device" type="Common.DeviceInfo" mandatory="true"/>
- </function>
- <function name="AllowDeviceToConnect" messagetype="response">
- <param name="allow" type="Boolean" mandatory="true"/>
- </function>
- <function name="OnDeviceChosen" messagetype="notification">
- <description>Notification must be initiated by HMI on user selecting device in the list of devices.</description>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="true">
- <description>The name and ID of the device chosen</description>
- </param>
- </function>
- <function name="OnFindApplications" messagetype="notification">
- <description>This method must be invoked by HMI to get list of registered apps.</description>
- <param name="deviceInfo" type="Common.DeviceInfo" mandatory="false">
- <description>The name and ID of the device the list of registered applications is required for.</description>
- </param>
- </function>
- <function name="UpdateAppList" messagetype="request">
- <description>Issued by SDL to notify HMI about new applications registered.</description>
- <param name="applications" type="Common.HMIApplication" mandatory="true" array="true" minsize="1" maxsize="100"/>
- </function>
- <function name="UpdateAppList" messagetype="response">
- </function>
- <function name="ActivateApp" messagetype="request">
- <description>Request from SDL to HMI to bring specified application to front on UI e.g make it HMI status 'FULL'.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of deactivated application.</description>
- </param>
- </function>
- <function name="ActivateApp" messagetype="response">
- </function>
- <function name="OnAppActivated" messagetype="notification">
- <description>Must be sent by HU system when the user clicks on app in the list of registered apps or on soft button with 'STEAL_FOCUS' action.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of selected application.</description>
- </param>
- </function>
- <function name="OnAppDeactivated" messagetype="notification">
- <description>Must be sent by HU system when the user switches to any functionality which is not other mobile application.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of deactivated application.</description>
- </param>
- <param name="reason" type="Common.DeactivateReason" mandatory="true">
- <description>Specifies the functionality the user has switched to.</description>
- </param>
- </function>
- <function name="OnAppRegistered" messagetype="notification">
- <description>Issued by SDL to notify HMI about new application registered.</description>
- <param name="application" type="Common.HMIApplication" mandatory="true">
- <description>The information about application registered. See HMIApplication. </description>
- </param>
- <param name="ttsName" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description> TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
- Needs to be unique over all applications.
- May not be empty.
- May not start with a new line character.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- </description>
- </param>
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- Defines additional voice recognition commands.
- May not interfere with any name or synonym of previously registered applications and any predefined blacklist of words (global commands)
- </description>
- </param>
- </function>
- <function name="OnAppUnregistered" messagetype="notification">
- <description>Issued by SDL to notify HMI about application unregistered. Application then to be removed from application list; all data connected with application has to be cleared up.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application unregistered</description>
- </param>
- </function>
- <function name="OnExitApplication" messagetype="notification">
- <description>Must be sent by HMI when the User chooses to exit the application..</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of the application to be exited.</description>
- </param>
- </function>
- <function name="OnExitAllApplications" messagetype="notification">
- <description>Sent by HMI to SDL to close all registered applications.</description>
- <param name="reason" type="Common.ApplicationsCloseReason" mandatory="true">
- <description>Specifies reason for exiting all apllications.</description>
- </param>
- </function>
- <function name="MixingAudioSupported" messagetype="request">
- <description>Request from SDL to HMI to find out if the last one supports mixing audio (i.e. recording TTS command and playing audio).</description>
- </function>
- <function name="MixingAudioSupported" messagetype="response">
- <description>If no response received SDL supposes that mixing audio is not supported</description>
- <param name="attenuatedSupported" type="Boolean" mandatory="true">
- <description>Must be true if supported</description>
- </param>
- </function>
- <function name="PlayTone" messagetype="notification">
- <description>Sent by SDL to HMI to notify that the tone should be played.</description>
- </function>
- <!-- Policies -->
- <function name="AllowAllApps" messagetype="request">
- <description>Initiated by SDL. Results by user/HMI allowing SDL functionality or disallowing access to all mobile apps.</description>
- </function>
- <function name="AllowAllApps" messagetype="response">
- <param name="allowed" type="Boolean" mandatory="true">
- <description>Must be true if allowed</description>
- </param>
- </function>
- <function name="AllowApp" messagetype="request">
- <description>Initiated by SDL for requesting the allowance for the application</description>
- <param name="app" type="Common.HMIApplication" mandatory="true">
- <description>Information about the application. See HMIApplication. </description>
- </param>
- <param name="appPermissions" type="String" array="true" minsize="1" maxsize="100" mandatory="false">
- <description>List of permissions required by application.</description>
- </param>
- </function>
- <function name="AllowApp" messagetype="response">
- <param name="allowed" type="Boolean" mandatory="true">
- <description>Must be true if allowed</description>
- </param>
- </function>
- <function name="OnSystemRequest" messagetype="notification" >
- <description>
- An asynchronous request from the system for specific data from the device or the cloud or response to a request from the device or cloud
- Binary data can be included in hybrid part of message for some requests (such as Authentication request responses)
- </description>
- <param name="requestType" type="Common.RequestType" mandatory="true">
- <description>The type of system request.</description>
- </param>
- <param name="url" type="String" maxlength="1000" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Optional array of URL(s) for HTTP requests.</description>
- </param>
- <param name="fileType" type="Common.FileType" mandatory="false">
- <description>Optional file type (meant for HTTP file requests).</description>
- </param>
- <param name="offset" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional offset in bytes for resuming partial data chunks</description>
- </param>
- <param name="length" type="Integer" minvalue="0" maxvalue="100000000000" mandatory="false">
- <description>Optional length in bytes for resuming partial data chunks</description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="65535" mandatory="false">
- </param>
- </function>
- <function name="OnSDLClose" messagetype="notification">
- <description>SDL must notify HMI about finish working application</description>
- </function>
-</interface>
-
-<interface name="VR" version="1.0" date="2013-04-17">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response provides information about presence of VR module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if VR is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="Started" messagetype="notification">
- <description>Must be initiated by VR module to let SDL know that VR session has started.</description>
- </function>
- <function name="Stopped" messagetype="notification">
- <description>Must be initiated by VR module to let SDL know that VR session has stopped.</description>
- </function>
- <function name="AddCommand" messagetype="request">
- <description>Request from SDL to add a command(string with associated id) to VR.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of a command (further to be used in OnCommand notification).</description>
- </param>
- <param name="vrCommands" type="String" mandatory="true" maxlength="99" minsize="1" maxsize="100" array="true">
- <description>List of strings to be used as VR commands.</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- </function>
- <function name="DeleteCommand" messagetype="request">
- <description>Request from SDL to delete a command from VR.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>Id of a command (list of strings), previously sent by AddCommand.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- </function>
- <function name="OnCommand" messagetype="notification">
- <description>Notifies SDL about command trigerred via VR</description>
- <param name="cmdID" type="Integer" mandatory="true" minvalue="0" maxvalue="2000000000">
- <description>ID of of the command (list of strings)</description>
- </param>
- <param name="appID" type="Integer" mandatory="false">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change language of VR.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language VR has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request">
- <description>Method is invoked at system start-up. Response must provide the information about VR supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in VR.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get currently active VR language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system startup by SDL to request information about VR capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="vrCapabilities" type="Common.VrCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Types of input recognized by VR module.</description>
- </param>
- </function>
-</interface>
-
-<interface name="TTS" version="1.0" date="2013-04-18">
- <description>RPCs for communication between TTS and SDL.</description>
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system start-up. SDL requests the information about all supported hardware and their capabilities</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="speechCapabilities" type="Common.SpeechCapabilities" minsize="1" maxsize="5" array="true" mandatory="true">
- <description>See SpeechCapabilities</description>
- </param>
- <param name="prerecordedSpeechCapabilities" type="Common.PrerecordedSpeech" minsize="1" maxsize="5" array="true" mandatory="true">
- <description>See PrerecordedSpeech</description>
- </param>
- </function>
- <function name="Started" messagetype="notification">
- <description>Must be initiated by TTS module to let SDL know that TTS session has started.</description>
- </function>
- <function name="Stopped" messagetype="notification">
- <description>Must be initiated by TTS module to let SDL know that TTS session has stopped.</description>
- </function>
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system start-up. Response must provide the information about presence of TTS module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if TTS is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="request">
- <description>Sets some properties for the application initiated request.</description>
- <param name="helpPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>The help prompt. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.</description>
- </param>
- <param name="initialPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>
- This is the intial prompt spoken to the user at the start of an interaction.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="timeoutPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Help text for a wait timeout. An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.</description>
- </param>
- <param name="timeout" type="Integer" mandatory="true">
- <description>Timeout initiate timeoutPrompt</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- </function>
- <function name="Speak" messagetype="request">
- <description>RPC from SDL to TTS for speaking the text.</description>
- <param name="ttsChunks" type="Common.TTSChunk" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of strings to be spoken.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="Speak" messagetype="response">
- <description>Provides information about success of operation.</description>
- </function>
- <function name="StopSpeaking" messagetype="request">
- <description>Initiated by SDL to stop speaking the text.</description>
- </function>
- <function name="StopSpeaking" messagetype="response">
- </function>
- <function name="ChangeRegistration" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change language of TTS.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language TTS has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request">
- <description>Method is invoked at system start-up by SDL. Response must provide the information about TTS supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in TTS.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get currently active TTS language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="SetGlobalProperties" messagetype="request">
- <description>Sets some properties for the application initiated request.</description>
- <param name="helpPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- The help prompt.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="timeoutPrompt" type="Common.TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" >
- <description>
- Help text for a wait timeout.
- An array of text chunks of type TTSChunk. See TTSChunk.
- The array must have at least one item.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- </function>
-</interface>
-
-<interface name="UI" version="1.0" date="2013-04-16">
- <function name="Alert" messagetype="request">
- <description>Request from SDL to show an alert message on the display.</description>
- <param name="alertStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="3">
- <description>Array of lines of alert text fields. See TextFieldStruct. Uses alertText1, alertText2, alertText3.</description>
- </param>
- <param name="duration" type="Integer" mandatory="true" minvalue="3000" maxvalue="10000" defvalue="5000">
- <description>Timeout in milliseconds.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" mandatory="false" minsize="0" maxsize="4" array="true">
- <description>App defined SoftButtons</description>
- </param>
- <param name="progressIndicator" type="Boolean" mandatory="false">
- <description>If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="Alert" messagetype="response">
- <param name="tryAgainTime" type="Integer" mandatory="false" minvalue="0" maxvalue="2000000000">
- <description>Amount of time (in milliseconds) that SDL must wait before resending an alert. Must be provided if another system event or overlay currently has a higher priority than this alert.</description>
- </param>
- </function>
- <function name="ShowNotification" messagetype="notification">
- <description>Initiated by SDL in order to notify user about some actions, i.e. while waiting for updates from server etc.</description>
- <param name="text" type="Common.TextFieldStruct" mandatory="true"/>
- <param name="icon" type="Common.Image" mandatory="false"/>
- <param name="timeout" type="Integer" mandatory="true">
- <description>Pop-up is expected to be shown before time specified with timeout is up and then closed by HMI or closed upon ClosePopUp request from SDL.</description>
- </param>
- </function>
- <function name="Show" messagetype="request">
- <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="7">
- <description>Array of lines of show text fields. See TextFieldStruct. Uses mainField1, mainField2, mainField3, mainField4. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
- mainField1: The text that should be displayed in a single or upper display line.
- mainField2: The text that should be displayed on the second display line.
- mainField3: The text that should be displayed on the second "page" first display line.
- mainField4: The text that should be displayed on the second "page" second display line.
- statusBar: statusBar.
- mediaClock: Text value for MediaClock field.
- mediaTrack: The text that should be displayed in the track field. This field is only valid for media applications on NGN type ACMs.
- </description>
- </param>
- <param name="alignment" type="Common.TextAlignment" mandatory="false">
- <description>Specifies how mainField1 and mainField2 texts should be aligned on the display.</description>
- <description>If omitted, texts must be centered</description>
- </param>
- <param name="graphic" type="Common.Image" mandatory="false">
- <description>Path to optional dynamic image or the static binary image itself. See Image. If omitted, the displayed graphic should not change.</description>
- </param>
- <param name="secondaryGraphic" type="Common.Image" mandatory="false">
- <description>
- Image struct determining whether static or dynamic secondary image to display in app.
- If omitted on supported displays, the displayed secondary graphic shall not change.
- </description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App defined SoftButtons.</description>
- <description>If omitted, the currently displayed SoftButton values should not change.</description>
- </param>
- <param name="customPresets" type="String" maxlength="500" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App labeled on-screen presets (i.e. GEN3 media presets or dynamic search suggestions).</description>
- <description>If omitted on supported displays, the presets will be shown as not defined.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application related to this RPC.</description>
- </param>
- </function>
- <function name="Show" messagetype="response">
- </function>
- <function name="AddCommand" messagetype="request">
- <description>Request from SDL to add a command to the application menu.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>ID of the command to be added.</description>
- </param>
- <param name="menuParams" type="Common.MenuParams" mandatory="false">
- <description>Optional sub value containing parameters of the command (position, name, etc.). See MenuParams. If omitted the command should be added to the end of the list of commands.</description>
- </param>
- <param name="cmdIcon" type="Common.Image" mandatory="false">
- <description>Image to be displayed for representing the command. See Image.</description>
- <description>If omitted, no (or the default if applicable) icon should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- </function>
- <function name="DeleteCommand" messagetype="request">
- <description>Request from SDL to delete a command from the in-application menu with the specified command id.</description>
- <param name="cmdID" type="Integer" mandatory="true" minvalue="0" maxvalue="2000000000">
- <description>cmdId previously sent via AddCommand request - id of the command to be deleted.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- </function>
- <function name="AddSubMenu" messagetype="request">
- <description>Request from SDL to add a sub menu to the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="true">
- <description>ID of the sub menu to be added. Unique for the application.</description>
- </param>
- <param name="menuParams" type="Common.MenuParams" mandatory="true">
- <description>Position and name of menu to be added. 'parent' field is omitted for this RPC. </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="AddSubMenu" messagetype="response">
- </function>
- <function name="DeleteSubMenu" messagetype="request">
- <description>Request from SDL to delete a submenu from the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="true" >
- <description>The "menuID" of the sub-menu to be deleted. (See addSubMenu.menuID)</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="DeleteSubMenu" messagetype="response">
- </function>
- <function name="PerformInteraction" messagetype="request">
- <description>Request from SDL for triggering an interaction (e.g. "Permit GPS?" - Yes, no, Always Allow).</description>
- <param name="initialText" type="Common.TextFieldStruct" mandatory="true">
- <description>Uses initialInteractionText. See TextFieldStruct.</description>
- </param>
- <param name="choiceSet" type="Common.Choice" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>The list of choices to be used for the interaction with the user</description>
- </param>
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>VR Help Title text.</description>
- <description>If omitted on supported displays, the default HU system help title should be used.</description>
- </param>
- <param name="vrHelp" type="Common.VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>VR Help Items. If omitted on supported displays, the default HU system generated help items should be used.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="5000" maxvalue="100000" defvalue="10000" mandatory="true">
- <description>Timeout in milliseconds.</description>
- </param>
- <param name="interactionLayout" type="Common.LayoutMode" mandatory="false">
- <description>See LayoutMode.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>ID of the choice that was selected in response to PerformInteraction.</description>
- </param>
- <param name="manualTextEntry" type="String" maxlength="500" mandatory="false">
- <description>
- Manually entered text selection, e.g. through keyboard
- Can be returned in lieu of choiceID, depending on trigger source
- </description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="request">
- <description>Sets the initial media clock value and automatic update method.</description>
- <param name="startTime" type="Common.TimeFormat" mandatory="false">
- <description>startTime should be ignored for "PAUSE", "RESUME", and "CLEAR"</description>
- </param>
- <param name="endTime" type="Common.TimeFormat" mandatory="false">
- <description>
- See TimeFormat.
- endTime can be provided for "COUNTUP" and "COUNTDOWN"; to be used to calculate any visual progress bar (if not provided, this feature is ignored)
- If endTime is greater then startTime for COUNTDOWN or less than startTime for COUNTUP, then the request will return an INVALID_DATA.
- endTime will be ignored for "PAUSE", "RESUME", and "CLEAR"
- </description>
- </param>
- <param name="updateMode" type="Common.ClockUpdateMode" mandatory="true">
- <description>The update method of the media clock.</description>
- <description>In case of pause, resume, or clear, the start time value is ignored and shall be left out. For resume, the time continues with the same value as it was when paused.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="response">
- </function>
- <function name="SetGlobalProperties" messagetype="request">
- <description>Request from SDL to set some properties for VR help.</description>
- <param name="vrHelpTitle" type="String" maxlength="500" mandatory="false">
- <description>VR Help Title text.</description>
- <description>If omitted on supported displays, the default HU system help title should be used.</description>
- </param>
- <param name="vrHelp" type="Common.VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>VR Help Items. If omitted on supported displays, the default HU system generated help items should be used.</description>
- </param>
- <param name="menuTitle" maxlength="500" type="String" mandatory="false">
- <description>Optional text to label an app menu button (for certain touchscreen platforms).</description>
- </param>
- <param name="menuIcon" type="Common.Image" mandatory="false">
- <description>>Optional icon to draw on an app menu button (for certain touchscreen platforms).</description>
- </param>
- <param name="keyboardProperties" type="Common.KeyboardProperties" mandatory="false">
- <description>On-screen keybaord configuration (if available).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- </function>
- <function name="OnCommand" messagetype="notification">
- <description>Notification must be initiated by HMI on user choosing menu item.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
- <description>Command ID, which is related to a specific menu entry (previously sent with AddCommand).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that is related to this RPC.</description>
- </param>
- </function>
- <function name="OnSystemContext" messagetype="notification">
- <description>Notification must be initiated by HMI when the user changes the context of application: goes to menu (in-application menu or system menu); switches to VR; pop-up appears on screen etc.</description>
- <param name="systemContext" type="Common.SystemContext" mandatory="true">
- <description>The context the application is brought into.</description>
- </param>
- </function>
- <function name="GetCapabilities" messagetype="request">
- <description>Method is invoked at system startup by SDL to request information about UI capabilities of HMI.</description>
- </function>
- <function name="GetCapabilities" messagetype="response">
- <param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="true">
- <description>Information about the capabilities of the display: its type, text field supported, etc. See DisplayCapabilities. </description>
- </param>
- <param name="audioPassThruCapabilities" type="Common.AudioPassThruCapabilities" mandatory="true"/>
- <param name="hmiZoneCapabilities" type="Common.HmiZoneCapabilities" mandatory="true"/>
- <param name="softButtonCapabilities" type="Common.SoftButtonCapabilities" mandatory="false">
- <description>Must be returned if the platform supports on-screen SoftButtons.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to change language for app.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The language application wants to switch to.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="ChangeRegistration" messagetype="response">
- </function>
- <function name="OnLanguageChange" messagetype="notification">
- <description>Notification from HMI to SmartDeviceLink about change of language.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>Language UI has switched to.</description>
- </param>
- </function>
- <function name="GetSupportedLanguages" messagetype="request">
- <description>Method should be invoked at system startup. Response provides information about UI supported languages.</description>
- </function>
- <function name="GetSupportedLanguages" messagetype="response">
- <param name="languages" type="Common.Language" mandatory="true" array="true" minsize="1" maxsize="100">
- <description>List of languages supported in UI.</description>
- </param>
- </function>
- <function name="GetLanguage" messagetype="request">
- <description>Request from SmartDeviceLink to HMI to get currently active UI language</description>
- </function>
- <function name="GetLanguage" messagetype="response">
- <param name="language" type="Common.Language" mandatory="true"/>
- </function>
- <function name="OnDriverDistraction" messagetype="notification">
- <description>Notification must be sent from HMI to SDL when driver distraction state is changed. Driver distraction rules are defined by the platform.</description>
- <param name="state" type="Common.DriverDistractionState" mandatory="true">
- <description>See DriverDistractionState. </description>
- </param>
- </function>
- <function name="SetAppIcon" messagetype="request">
- <description>Used to set existing local file on SYNC as the app's icon.</description>
- <param name="syncFileName" type="Common.Image" mandatory="true">
- <description>Either the path to the dynamic image stored on HY or the static binary image itself. See Image</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetAppIcon" messagetype="response">
- </function>
- <function name="SetDisplayLayout" messagetype="request">
- <param name="displayLayout" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined screen layouts are defined.
- </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="SetDisplayLayout" messagetype="response">
- <param name="displayCapabilities" type="Common.DisplayCapabilities" mandatory="false">
- <description>See DisplayCapabilities</description>
- </param>
- <param name="buttonCapabilities" type="Common.ButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See ButtonCapabilities</description >
- </param>
- <param name="softButtonCapabilities" type="Common.SoftButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>If returned, the platform supports on-screen SoftButtons; see SoftButtonCapabilities.</description >
- </param>
- <param name="presetBankCapabilities" type="Common.PresetBankCapabilities" mandatory="false">
- <description>If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.</description >
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="request">
- <description>Used to show a custom form; it can be a parent or child screen. If no parent screen is designated, it is set as a parent screen.</description>
- <param name="customFormID" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined forms are defined.
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "KEYBOARD_SEARCH" - Custom template containing app-configured on-screen keyboard with active search updating; user also can trigger voice search.
- "NAV_FULLSCREEN_MAP" - Custom root template screen containing full screen map with navigation controls.
- "NAV_POI_MENU" - Custom template containing app-defined POI options.
- "NAV_SEARCH_RESULTS" - Custom template containing a list of app-defined search results
- "NAV_POI_INFO" - Custom template containing app-defined POI information (and potentially map data).
- </description>
- </param>
- <param name="parentFormID" type="String" maxlength="500" defvalue="DEFAULT" mandatory="false">
- <description>
- Parent screen of predefined form to display.
- Currently only predefined forms are defined.
- If not provided, then set to "DEFAULT".
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "NAV_FULLSCREEN_MAP" - Custom template containing full screen map with navigation controls.
- </description>
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="response">
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="ShowKeyboard" messagetype="request">
- <description>Configures and populates on-screen keyboard.</description>
- <param name="language" type="Common.Language" mandatory="true">
- <description>The keyboard language.</description>
- </param>
- <param name="keyboardLayout" type="Common.KeyboardLayout" mandatory="true" >
- <description>Desired keyboard layout.</description>
- </param>
- <param name="sendDynamicEntry" type="Boolean" mandatory="false">
- <description>In this mode, all keypresses will be sent as they occur.</description>
- <description>If disabled, entire string of text will be returned only once submitted by user.</description>
- <description>If omitted, this value will be set to FALSE.</description>
- </param>
- <param name="limitedCharacterList" type="String" maxlength="1" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Array of keyboard characters to enable.</description>
- <description>All omitted characters will be greyed out (disabled) on the keyboard.</description>
- <description>If omitted, the entire keyboard will be enabled.</description>
- </param>
- <param name="autoCompleteText" type="String" maxlength="1000" mandatory="false">
- <description>Allows an app to prepopulate the text field with a suggested or completed entry as the user types</description>
- </param>
- </function>
- <function name="ShowKeyboard" messagetype="response">
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="OnKeyboardInput" messagetype="notification">
- <description>On-screen keyboard event.</description>
- <description>Can be full string or individual keypresses depending on keyboard mode.</description>
- <param name="event" type="Common.KeyboardEvent" mandatory="true">
- <description>On-screen keyboard input data.</description>
- </param>
- <param name="data" type="String" maxlength="500" mandatory="false">
- <description>On-screen keyboard input data.</description>
- <description>For dynamic keypress events, this will be the current compounded string of entry text.</description>
- <description>For entry submission events, this will be the full text entry (this will always return regardless of the mode).</description>
- <description>For entry cancelled and entry aborted events, this data param will be omitted.</description>
- </param>
- </function>
- <function name="OnTouchEvent" messagetype="notification">
- <description>Notifies about touch events on the screen's prescribed area</description>
- <param name="type" type="Common.TouchType" mandatory="true">
- <description>The type of touch event.</description>
- </param>
- <param name="event" type="Common.TouchEvent" mandatory="true" minsize="1" maxsize="10" array="true">
- <description>List of all individual touches involved in this event.</description>
- </param>
- </function>
- <function name="Slider" messagetype="request">
- <description>Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.</description>
- <param name="numTicks" type="Integer" minvalue="2" maxvalue="26" mandatory="true">
- <description>Number of selectable items on a horizontal axis</description>
- </param>
- <param name="position" type="Integer" minvalue="1" maxvalue="26" mandatory="true">
- <description>Initial position of slider control (cannot exceed numTicks)</description>
- </param>
- <param name="sliderHeader" type="String" maxlength="500" mandatory="true">
- <description>Text header to be displayed.</description>
- </param>
- <param name="sliderFooter" type="String" maxlength="500" minsize="1" maxsize="26" array="true" mandatory="false">
- <description>Text footer to be displayed (meant to display min/max threshold descriptors).</description>
- <description>For a static text footer, only one footer string shall be provided in the array.</description>
- <description>For a dynamic text footer, the number of footer text string in the array must match the numTicks value.</description>
- <description>For a dynamic text footer, text array string should correlate with potential slider position index.</description>
- <description>If omitted on supported displays, no footer text shall be displayed.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="1000" maxvalue="65535" mandatory="true">
- <description>Timeout. The slider should be displayed until the defined amount of time has elapsed. </description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that concerns this RPC.</description>
- </param>
- </function>
- <function name="Slider" messagetype="response">
- <param name="sliderPosition" type="Integer" minvalue="1" maxvalue="26" mandatory="false">
- <description>Current slider position. Must be returned when the user has clicked the ‘Save’ or ‘Canceled’ button or by the timeout </description>
- </param>
- </function>
- <function name="ScrollableMessage" messagetype="request">
- <description>Creates a full screen overlay containing a large block of formatted text that can be scrolled with up to 8 SoftButtons defined</description>
- <param name="messageText" type="Common.TextFieldStruct" mandatory="true">
- <description>Body of text that can include newlines and tabs. Uses scrollableMessageBody.</description>
- </param>
- <param name="timeout" type="Integer" minvalue="0" maxvalue="65535" defvalue="30000" mandatory="true">
- <description>Timeout in milliseconds. The message should be displayed until the time defined is up.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="8" array="true" mandatory="false">
- <description>App defined SoftButtons.</description>
- <description>If omitted on supported displays, only the system defined "Close" SoftButton should be displayed.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ScrollableMessage" messagetype="response">
- </function>
- <function name="PerformAudioPassThru" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- <param name="audioPassThruDisplayTexts" type="Common.TextFieldStruct" mandatory="true" minsize="0" maxsize="2" array="true">
- <description>Uses
- audioPassThruDisplayText1: First line of text displayed during audio capture.
- audioPassThruDisplayText2: Second line of text displayed during audio capture.</description>
- </param>
- <param name="maxDuration" type="Integer" minvalue="1" maxvalue="1000000" mandatory="true">
- <description>The maximum duration of audio recording in milliseconds. If not provided, the recording should be performed until EndAudioPassThru arrives.</description>
- </param>
- </function>
- <function name="PerformAudioPassThru" messagetype="response">
- </function>
- <function name="EndAudioPassThru" messagetype="request">
- <description>Request is sent by SDL to stop the audio capturing.</description>
- </function>
- <function name="EndAudioPassThru" messagetype="response">
- </function>
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response provides information about presence of UI module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if UI is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="ClosePopUp" messagetype="request">
- <description>Initiated by SDL to close currently active pop-up on HMI.</description>
- <param name="methodName" type="String" mandatory="false">
- <description>Method to be closed</description>
- </param>
- </function>
- <function name="ClosePopUp" messagetype="response">
- <description>Provides the result of operation.</description>
- </function>
- <function name="OnResetTimeout" messagetype="notification">
- <description>HMI must provide SDL with notifications specific to the current Turn-By-Turn client status on the module</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>Id of application that invoked notifcation.</description>
- </param>
- <param name="methodName" type="String" mandatory="true">
- <description>Currently used method name on which was triggered action</description>
- </param>
- </function>
-</interface>
-
-<interface name="Navigation" version="1.0" date="2013-05-22">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response must provide the information about presence of UI Navigation module and its readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if Navigation is present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="ShowConstantTBT" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to show info about navigation.</description>
- <param name="navigationTexts" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="5">
- <description>See TextFieldStruct. Uses:
- navigationText1
- navigationText2
- ETA
- totalDistance
- timeToDestination.
- </description>
- </param>
- <param name="turnIcon" type="Common.Image" mandatory="false">
- </param>
- <param name="nextTurnIcon" type="Common.Image" mandatory="false">
- </param>
- <param name="distanceToManeuver" type="Float" minvalue="0" maxvalue="1000000000" mandatory="true">
- <description>Fraction of distance till next maneuver (from previous maneuver).</description>
- <description>May be used to calculate progress bar.</description>
- </param>
- <param name="distanceToManeuverScale" type="Float" minvalue="0" maxvalue="1000000000" mandatory="true">
- <description>Fraction of distance till next maneuver (starting from when AlertManeuver is triggered).</description>
- <description>May be used to calculate progress bar.</description>
- </param>
- <param name="maneuverComplete" type="Boolean" mandatory="false">
- <description>If and when a maneuver has completed while an AlertManeuver is active, SDL will send this value set to TRUE in order to clear the AlertManeuver overlay.</description>
- <description>If omitted the value should be assumed as FALSE.</description>
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>Three dynamic SoftButtons available</description>
- <description>If omitted on supported displays, the currently displayed SoftButton values will not change.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ShowConstantTBT" messagetype="response">
- </function>
- <function name="AlertManeuver" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to announce navigation maneuver</description>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
- <description>If omitted, only the system defined "Close" SoftButton should be displayed.</description>
- </param>
- </function>
- <function name="AlertManeuver" messagetype="response">
- </function>
- <function name="UpdateTurnList" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to update turn list.</description>
- <param name="turnList" type="Common.Turn" minsize="1" maxsize="100" array="true" mandatory="true">
- </param>
- <param name="softButtons" type="Common.SoftButton" minsize="0" maxsize="1" array="true" mandatory="false">
- <description>If omitted, app-defined SoftButton should be left blank.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="UpdateTurnList" messagetype="response">
- </function>
- <function name="OnTBTClientState" messagetype="notification">
- <description>HMI must provide SDL with notifications specific to the current Turn-By-Turn client status on the module</description>
- <param name="state" type="Common.TBTState" mandatory="true">
- <description>Current State of TBT client</description>
- </param>
- </function>
- <function name="StartStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing video streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
- <description>URL that HMI start playing.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StartStream" messagetype="response">
- </function>
- <function name="StopStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing video streaming.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StopStream" messagetype="response">
- </function>
- <function name="StartAudioStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing audio streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
- <description>URL that HMI start playing.</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StartAudioStream" messagetype="response">
- </function>
- <function name="StopAudioStream" messagetype="request">
- <description>Notification from SmartDeviceLinkCore to HMI to start playing audio streaming.</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="StopAudioStream" messagetype="response">
- </function>
-
-</interface>
-
-<interface name="VehicleInfo" version="1.0" date="2013-04-21">
- <function name="IsReady" messagetype="request">
- <description>Method is invoked at system startup. Response should provide information about presence of any of vehicle information modules (ECU, GPS, etc) and their readiness to cooperate with SDL.</description>
- </function>
- <function name="IsReady" messagetype="response">
- <param name="available" type="Boolean" mandatory="true">
- <description>Must be true if vehicle data modules are present and ready to communicate with SDL.</description>
- </param>
- </function>
- <function name="GetVehicleType" messagetype="request">
- <description>Request from SmartDeviceLinkCore to HMI to get info about the vehicle (type, model, etc.).</description>
- </function>
- <function name="GetVehicleType" messagetype="response">
- <param name="vehicleType" type="Common.VehicleType" mandatory="true"/>
- </function>
- <function name="ReadDID" messagetype="request">
- <description>Request from SDL for vehicle data reading.</description>
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="didLocation" type="Integer" minvalue="0" maxvalue="65535" minsize="1" maxsize="1000" array="true" mandatory="true">
- <description>Get raw data from vehicle data DID location(s).</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application related to this RPC.</description>
- </param>
- </function>
- <function name="ReadDID" messagetype="response">
- <param name="didResult" type="Common.DIDResult" minsize="0" maxsize="1000" array="true" mandatory="false">
- <description>Array of requested DID results (with data if available).</description>
- </param>
- </function>
- <function name="GetDTCs" messagetype="request">
- <description>Vehicle module diagnostic trouble code request.</description>
- <param name="ecuName" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of ECU.</description>
- </param>
- <param name="dtcMask" type="Integer" minvalue="0" maxvalue="255" mandatory="false">
- <description>DTC Mask Byte to be sent in diagnostic request to module .</description>
- </param>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
- </function>
- <function name="GetDTCs" messagetype="response">
- <param name="ecuHeader" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)</description>
- </param>
- <param name="dtc" type="String" mandatory="false" minsize="1" maxsize="15" maxlength="10" array="true">
- <description>
- Array of all reported DTCs on module. Each DTC is represented with 4 bytes:
- 3 bytes for data
- 1 byte for status
- </description>
- </param>
- </function>
- <function name="DiagnosticMessage" messagetype="request">
- <description>Non periodic vehicle diagnostic request</description>
- <param name="targetID" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Name of target ECU.</description>
- </param>
- <param name="messageLength" type="Integer" minvalue="0" maxvalue="65535" mandatory="true">
- <description>Length of message (in bytes).</description>
- </param>
- <param name="messageData" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message.
- </description>
- </param>
- </function>
- <function name="DiagnosticMessage" messagetype="response">
- <param name="messageDataResult" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true">
- <description>
- Array of bytes comprising CAN message result.
- </description>
- </param>
- </function>
-
-<!--Qt HMI version of GetVehicleData-->
- <function name="GetGpsData" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetGpsData" messagetype="response">
- <param name="gps" type="Common.GPSData" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
-
- <function name="GetSpeed" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetSpeed" messagetype="response">
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
-
- <function name="GetRpm" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetRpm" messagetype="response">
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
-
- <function name="GetFuelLevel" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
-
- <function name="GetFuelLevelState" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetFuelLevelState" messagetype="response">
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
-
- <function name="GetInstantFuelConsumption" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
-
- <function name="GetExternalTemperature" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
-
- <function name="GetVin" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
-
- <function name="GetPrndl" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetPrndl" messagetype="response">
- <param name="prndl" type="Common.PRNDL" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
-
- <function name="GetTirePressure" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.TireStatus" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
-
- <function name="GetOdometer" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetOdometer" messagetype="response">
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
-
- <function name="GetBeltStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.BeltStatus" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
-
- <function name="GetBodyInformation" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
-
- <function name="GetDeviceStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
-
- <function name="GetDriverBraking" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
-
- <function name="GetWiperStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
-
- <function name="GetHeadLampStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
-
- <function name="GetEngineTorque" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetEngineTorque" messagetype="response">
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
-
- <function name="GetAccPedalPosition" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
-
- <function name="GetSteeringWheelAngle" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
-
- <function name="GetECallInfo" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.ECallInfo" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- </function>
-
- <function name="GetAirbagStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.AirbagStatus" mandatory="true">
- <description>The status of the air bags</description>
- </param>
- </function>
-
- <function name="GetEmergencyEvent" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- </function>
-
- <function name="GetClusterModeStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="true">
- <description>The status modes of the cluster</description>
- </param>
- </function>
-
- <function name="GetMyKey" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="GetMyKey" messagetype="response">
- <param name="myKey" type="Common.MyKey" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
-<!--end Qt HMI version of GetVehicleData-->
-
-<!--Qt HMI version of OnVehicleData-->
- <function name="OnGpsData" messagetype="notification">
- <param name="gps" type="Common.GPSData" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
-
- <function name="OnSpeed" messagetype="notification">
- <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
-
- <function name="OnRpm" messagetype="notification">
- <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
-
- <function name="OnFuelLevel" messagetype="notification">
- <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
-
- <function name="OnFuelLevelState" messagetype="notification">
- <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
-
- <function name="OnInstantFuelConsumption" messagetype="notification">
- <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
-
- <function name="OnExternalTemperature" messagetype="notification">
- <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
-
- <function name="OnVin" messagetype="notification">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number.</description>
- </param>
- </function>
-
- <function name="OnPrndl" messagetype="notification">
- <param name="prndl" type="Common.PRNDL" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
-
- <function name="OnTirePressure" messagetype="notification">
- <param name="tirePressure" type="Common.TireStatus" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
-
- <function name="OnOdometer" messagetype="notification">
- <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
-
- <function name="OnBeltStatus" messagetype="notification">
- <param name="beltStatus" type="Common.BeltStatus" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
-
- <function name="OnBodyInformation" messagetype="notification">
- <param name="bodyInformation" type="Common.BodyInformation" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
-
- <function name="OnDeviceStatus" messagetype="notification">
- <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
-
- <function name="OnDriverBraking" messagetype="notification">
- <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
-
- <function name="OnWiperStatus" messagetype="notification">
- <param name="wiperStatus" type="Common.WiperStatus" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
-
- <function name="OnHeadLampStatus" messagetype="notification">
- <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
-
- <function name="OnEngineTorque" messagetype="notification">
- <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
-
- <function name="OnAccPedalPosition" messagetype="notification">
- <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
-
- <function name="OnSteeringWheelAngle" messagetype="notification">
- <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
-
- <function name="OnMyKey" messagetype="notification">
- <param name="myKey" type="Common.MyKey" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
-<!--end Qt HMI version of OnVehicleData-->
-
-<!--Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData-->
- <function name="SubscribeGps" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeGps" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
- <function name="UnsubscribeGps" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeGps" messagetype="response">
- <param name="gps" type="Common.VehicleDataResult" mandatory="true">
- <description>See GPSData</description>
- </param>
- </function>
-
- <function name="SubscribeSpeed" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeSpeed" messagetype="response">
- <param name="speed" type="Common.VehicleDataResult" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
- <function name="UnsubscribeSpeed" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeSpeed" messagetype="response">
- <param name="speed" type="Common.VehicleDataResult" mandatory="true">
- <description>The vehicle speed in kilometers per hour</description>
- </param>
- </function>
-
- <function name="SubscribeRpm" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeRpm" messagetype="response">
- <param name="rpm" type="Common.VehicleDataResult" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
- <function name="UnsubscribeRpm" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeRpm" messagetype="response">
- <param name="rpm" type="Common.VehicleDataResult" mandatory="true">
- <description>The number of revolutions per minute of the engine</description>
- </param>
- </function>
-
- <function name="SubscribeFuelLevel" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
- <function name="UnsubscribeFuelLevel" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeFuelLevel" messagetype="response">
- <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level in the tank (percentage)</description>
- </param>
- </function>
-
- <function name="SubscribeFuelLevel_State" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeFuelLevel_State" messagetype="response">
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
- <function name="UnsubscribeFuelLevel_State" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeFuelLevel_State" messagetype="response">
- <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true">
- <description>The fuel level state</description>
- </param>
- </function>
-
- <function name="SubscribeInstantFuelConsumption" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
- <function name="UnsubscribeInstantFuelConsumption" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeInstantFuelConsumption" messagetype="response">
- <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true">
- <description>The instantaneous fuel consumption in microlitres</description>
- </param>
- </function>
-
- <function name="SubscribeExternalTemperature" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
- <function name="UnsubscribeExternalTemperature" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeExternalTemperature" messagetype="response">
- <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true">
- <description>The external temperature in degrees celsius</description>
- </param>
- </function>
-
- <function name="SubscribePrndl" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribePrndl" messagetype="response">
- <param name="prndl" type="Common.VehicleDataResult" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
- <function name="UnsubscribePrndl" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribePrndl" messagetype="response">
- <param name="prndl" type="Common.VehicleDataResult" mandatory="true">
- <description>See PRNDL</description>
- </param>
- </function>
-
- <function name="SubscribeVin" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
- <function name="UnsubscribeVin" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeVin" messagetype="response">
- <param name="vin" type="String" maxlength="17" mandatory="true">
- <description>Vehicle identification number</description>
- </param>
- </function>
-
- <function name="SubscribeTirePressure" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
- <function name="UnsubscribeTirePressure" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeTirePressure" messagetype="response">
- <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true">
- <description>See TireStatus</description>
- </param>
- </function>
-
- <function name="SubscribeOdometer" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeOdometer" messagetype="response">
- <param name="odometer" type="Common.VehicleDataResult" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
- <function name="UnsubscribeOdometer" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeOdometer" messagetype="response">
- <param name="odometer" type="Common.VehicleDataResult" mandatory="true">
- <description>Odometer in km</description>
- </param>
- </function>
-
- <function name="SubscribeBeltStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
- <function name="UnsubscribeBeltStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeBeltStatus" messagetype="response">
- <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the seat belts</description>
- </param>
- </function>
-
- <function name="SubscribeBodyInformation" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
- <function name="UnsubscribeBodyInformation" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeBodyInformation" messagetype="response">
- <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true">
- <description>The body information including power modes</description>
- </param>
- </function>
-
- <function name="SubscribeDeviceStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
- <function name="UnsubscribeDeviceStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeDeviceStatus" messagetype="response">
- <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The device status including signal and battery strength</description>
- </param>
- </function>
-
- <function name="SubscribeDriverBraking" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
- <function name="UnsubscribeDriverBraking" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeDriverBraking" messagetype="response">
- <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the brake pedal</description>
- </param>
- </function>
-
- <function name="SubscribeWiperStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
- <function name="UnsubscribeWiperStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeWiperStatus" messagetype="response">
- <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the wipers</description>
- </param>
- </function>
-
- <function name="SubscribeHeadLampStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
- <function name="UnsubscribeHeadLampStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeHeadLampStatus" messagetype="response">
- <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>Status of the head lamps</description>
- </param>
- </function>
-
- <function name="SubscribeEngineTorque" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeEngineTorque" messagetype="response">
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
- <function name="UnsubscribeEngineTorque" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeEngineTorque" messagetype="response">
- <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true">
- <description>Torque value for engine (in Nm) on non-diesel variants</description>
- </param>
- </function>
-
- <function name="SubscribeAccPedalPosition" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
- <function name="UnsubscribeAccPedalPosition" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeAccPedalPosition" messagetype="response">
- <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true">
- <description>Accelerator pedal position (percentage depressed)</description>
- </param>
- </function>
-
- <function name="SubscribeSteeringWheelAngle" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
- <function name="UnsubscribeSteeringWheelAngle" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeSteeringWheelAngle" messagetype="response">
- <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true">
- <description>Current angle of the steering wheel (in deg)</description>
- </param>
- </function>
-
- <function name="SubscribeECallInfo" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- </function>
- <function name="UnsubscribeECallInfo" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeECallInfo" messagetype="response">
- <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true">
- <description>Emergency Call notification and confirmation data</description>
- </param>
- </function>
-
- <function name="SubscribeAirbagStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the air bags</description>
- </param>
- </function>
- <function name="UnsubscribeAirbagStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeAirbagStatus" messagetype="response">
- <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status of the air bags</description>
- </param>
- </function>
-
- <function name="SubscribeEmergencyEvent" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- </function>
- <function name="UnsubscribeEmergencyEvent" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeEmergencyEvent" messagetype="response">
- <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to an emergency event (and if it occurred)</description>
- </param>
- </function>
-
- <function name="SubscribeClusterModeStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status modes of the cluster</description>
- </param>
- </function>
- <function name="UnsubscribeClusterModeStatus" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeClusterModeStatus" messagetype="response">
- <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true">
- <description>The status modes of the cluster</description>
- </param>
- </function>
-
- <function name="SubscribeMyKey" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="SubscribeMyKey" messagetype="response">
- <param name="myKey" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
- <function name="UnsubscribeMyKey" messagetype="request">
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application requested this RPC.</description>
- </param>
- </function>
- <function name="UnsubscribeMyKey" messagetype="response">
- <param name="myKey" type="Common.VehicleDataResult" mandatory="true">
- <description>Information related to the MyKey feature</description>
- </param>
- </function>
-<!--end Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData-->
-
-</interface>
-</interfaces>
diff --git a/SDL_Core/src/components/interfaces/v4_protocol_v1_2_no_extra.xml b/SDL_Core/src/components/interfaces/v4_protocol_v1_2_no_extra.xml
deleted file mode 100755
index ead8596ee..000000000
--- a/SDL_Core/src/components/interfaces/v4_protocol_v1_2_no_extra.xml
+++ /dev/null
@@ -1,1153 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!-- edited with XMLSpy v2011 rel. 3 sp1 (x64) (http://www.altova.com) by Olesksandr Leshchenko (HP) -->
-<?xml-stylesheet type="text/xml" href="protocol2html.xsl"?>
-<interface name="Ford Sync RAPI" version="1.2" date="2011-05-17">
- <enum name="Result">
- <element name="SUCCESS">
- <description>The request succeeded</description>
- </element>
- <element name="INVALID_DATA">
- <description>The data sent is invalid. For example</description>
- <description>Invalid Json syntax</description>
- <description>Parameters out of bounds (number or enum range)</description>
- <description>Mandatory parameters not provided</description>
- <description>Parameter provided with wrong type</description>
- <description>Invalid characters</description>
- <description>Empty string</description>
- </element>
- <element name="UNSUPPORTED_REQUEST">
- <description>The request is not supported by Sync</description>
- </element>
- <element name="OUT_OF_MEMORY">
- <description>The system could not process the request because the necessary memory couldn't be allocated</description>
- </element>
- <element name="TOO_MANY_PENDING_REQUESTS">
- <description>There are too many requests pending (means, that the response has not been delivered, yet).</description>
- <designdescription>There may be a maximum of 1000 pending requests at a time.</designdescription>
- </element>
- <element name="INVALID_ID">
- <description>One of the provided IDs is not valid. For example</description>
- <description>This applies to CorrelationID, SubscriptionID [@TODO if SubscriptionID is used], CommandID, MenuID, [@TODO: missed one?]</description>
- </element>
- <element name="DUPLICATE_NAME">
- <description>There was a conflict with an registered name (application or menu item) or vr command</description>
- </element>
- <element name="TOO_MANY_APPLICATIONS">
- <description>There are already too many registered applications</description>
- </element>
- <element name="APPLICATION_REGISTERED_ALREADY">
- <description>RegisterApplication has been called again, after a RegisterApplication was successful before.</description>
- </element>
- <element name="UNSUPPORTED_VERSION">
- <description>Sync doesn't support the protocol that is requested by the mobile application</description>
- </element>
- <element name="WRONG_LANGUAGE">
- <description>The requested language is currently not supported.</description>
- <description>Might be because of a mismatch of the currently active language on Sync and the requested language</description>
- </element>
- <element name="APPLICATION_NOT_REGISTERED">
- <description>An command can not be executed because no application has been registered with RegisterApplication.</description>
- </element>
- <element name="IN_USE">
- <description>The data may not be changed, because it is currently in use.</description>
- <description>For example when trying to delete a command set that is currently involved in an interaction.</description>
- </element>
- <element name="SUBSCRIBED_ALREADY">
- <description>The item to subscribe to is already subscribed to.</description>
- </element>
- <element name="REJECTED">
- <description>The requested command was rejected, e.g. because mobile app is in background and cannot perform any HMI commands.</description>
- <description>Or an HMI command (e.g. Speak) is rejected because a higher priority HMI command (e.g. Alert) is playing.</description>
- </element>
- <element name="ABORTED">
- <description>A command was aborted, for example due to user interaction (e.g. user pressed button).</description>
- <description>Or an HMI command (e.g. Speak) is aborted because a higher priority HMI command (e.g. Alert) was requested.</description>
- </element>
- <element name="IGNORED">
- <description>A command was ignored, because the intended result is already in effect.</description>
- <description>For example, SetMediaClockTimer was used to pause the media clock although the clock is paused already.</description>
- <description>NOTE: potentially replaces SUBSCRIBED_ALREADY</description>
- </element>
- <element name="UNSUPPORTED_BUTTON">
- <description>A button that was requested for subscription is not supported under the current system.</description>
- <description>NOTE: could become a more generic UNSUPPORTED_RESOURCE by merging with VEHIVLE_DATA_NOT_AVAILABLE.</description>
- </element>
- <element name="FILE_NOT_FOUND">
- <description>A specified file could not be found on Sync.</description>
- </element>
- <element name="GENERIC_ERROR">
- <description>Provided data is valid but something went wrong in the lower layers.</description>
- </element>
- </enum>
- <enum name="ButtonPressMode">
- <element name="LONG">
- <description>A button was released, after it was pressed for a long time</description>
- <description>Actual timing is defined by Sync and may vary</description>
- </element>
- <element name="SHORT">
- <description>A button was released, after it was pressed for a short time</description>
- <description>Actual timing is defined by Sync and may vary</description>
- </element>
- </enum>
- <enum name="ButtonEventMode">
- <element name="BUTTONUP">
- <description>A button has been released up</description>
- </element>
- <element name="BUTTONDOWN">
- <description>A button has been pressed down</description>
- </element>
- </enum>
- <enum name="Language">
- <description>The set of potential languages</description>
- <element name="EN-US" internal_name="EN_US">
- <description>US English</description>
- </element>
- <element name="ES-MX" internal_name="ES_MX">
- <description>Mexican Spanish</description>
- </element>
- <element name="FR-CA" internal_name="FR_CA">
- <description>Canadian French</description>
- </element>
- </enum>
- <enum name="UpdateMode">
- <description>Describes how the media clock timer should behave on the platform</description>
- <element name="COUNTUP"/>
- <description>Starts the media clock timer counting upwards, as in time elapsed.</description>
- <element name="COUNTDOWN"/>
- <description>Starts the media clock timer counting downwards, as in time remaining.</description>
- <element name="PAUSE"/>
- <description>Pauses the media clock timer</description>
- <element name="RESUME"/>
- <description>Resume the media clock timer</description>
- </enum>
- <enum name="InteractionMode">
- <description>For application-requested interactions, this mode indicates the method in which the user is notified and uses the interaction.</description>
- <element name="MANUAL_ONLY"/>
- <description>This mode causes the interaction to only occur on the display, meaning the choices are provided only via the display.</description>
- <description>Selections are made with the OK and Seek Right and Left, Tune Up and Down buttons.</description>
- <element name="VR_ONLY"/>
- <description>This mode causes the interaction to only occur using V4.</description>
- <description>Selections are made by saying the command.</description>
- <element name="BOTH"/>
- <description>This mode causes both a VR and display selection option for an interaction.</description>
- <description>Selections can be made either from the menu display or by speaking the command.</description>
- </enum>
- <enum name="HMILevel">
- <description>Enumeraction that describes current levels of HMI.</description>
- <element name="FULL" internal_name="HMI_FULL"/>
- <element name="LIMITED" internal_name="HMI_LIMITED"/>
- <element name="BACKGROUND" internal_name="HMI_BACKGROUND"/>
- <element name="NONE" internal_name="HMI_NONE"/>
- </enum>
- <enum name="AudioStreamingState">
- <description>Enumeraction that describes possible states of audio streaming.</description>
- <element name="AUDIBLE"/>
- <element name="NOT_AUDIBLE"/>
- </enum>
- <enum name="SystemContext">
- <description>Enumeraction that describes possible contexts and app's HMI might be in.</description>
- <element name="MAIN" internal_name="SYSCTXT_MAIN"/>
- <element name="VRSESSION" internal_name="SYSCTXT_VRSESSION"/>
- <element name="MENU" internal_name="SYSCTXT_MENU"/>
- </enum>
- <enum name="AppInterfaceUnregisteredReason">
- <description>Error code, which comes from sync side.</description>
- <element name="USER_EXIT"/>
- <element name="IGNITION_OFF"/>
- <element name="BLUETOOTH_OFF"/>
- <element name="USB_DISCONNECTED"/>
- <element name="REQUEST_WHILE_IN_NONE_HMI_LEVEL"/>
- <element name="TOO_MANY_REQUESTS"/>
- <element name="DRIVER_DISTRACTION_VIOLATION"/>
- <element name="LANGUAGE_CHANGE"/>
- <element name="MASTER_RESET"/>
- <element name="FACTORY_DEFAULTS"/>
- </enum>
- <enum name="TriggerSource">
- <description>Indicates the source from where the command was triggered.</description>
- <element name="MENU" internal_name="TS_MENU"/>
- <element name="VR" internal_name="TS_VR"/>
- </enum>
- <enum name="HmiZoneCapabilities">
- <description>Contains information about the HMI zone capabilities.</description>
- <description>For future use.</description>
- <element name="FRONT"/>
- <element name="BACK"/>
- </enum>
- <enum name="SpeechCapabilities">
- <description>Contains information about the TTS capabilities.</description>
- <element name="TEXT"/>
- <element name="SAPI_PHONEMES"/>
- <element name="LHPLUS_PHONEMES"/>
- <element name="PRE_RECORDED"/>
- <element name="SILENCE"/>
- </enum>
- <enum name="VrCapabilities">
- <description>Contains information about the VR capabilities.</description>
- <element name="Text"/>
- </enum>
- <enum name="AudioCaptureQuality" platform="pending">
- <description>Describes different quality options for PerformAudioCapture.</description>
- <element name="8KHZ" internal_name="QUALITY_8KHZ"/>
- <element name="16KHZ" internal_name="QUALITY_16KHZ"/>
- </enum>
- <enum name="ButtonName">
- <description>Defines the hard (physical) and soft (touchscreen) buttons available from SYNC</description>
- <element name="OK"/>
- <element name="SEEKLEFT"/>
- <element name="SEEKRIGHT"/>
- <element name="TUNEUP"/>
- <element name="TUNEDOWN"/>
- <element name="PRESET_0"/>
- <element name="PRESET_1"/>
- <element name="PRESET_2"/>
- <element name="PRESET_3"/>
- <element name="PRESET_4"/>
- <element name="PRESET_5"/>
- <element name="PRESET_6"/>
- <element name="PRESET_7"/>
- <element name="PRESET_8"/>
- <element name="PRESET_9"/>
- <issue creator="rs">Are these all supported buttons?</issue>
- </enum>
- <enum name="MediaClockFormat">
- <element name="CLOCK1">
- <description>minutesFieldWidth = 2;minutesFieldMax = 19;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 19;maxMinutes = 59;maxSeconds = 59;</description>
- <description>used for Type II and CID headunits</description>
- </element>
- <element name="CLOCK2">
- <description>minutesFieldWidth = 3;minutesFieldMax = 199;secondsFieldWidth = 2;secondsFieldMax = 99;maxHours = 59;maxMinutes = 59;maxSeconds = 59;</description>
- <description>used for Type V headunit</description>
- </element>
- <element name="CLOCKTEXT1">
- <description>5 characters possible</description>
- <description>Format: 1|sp c :|sp c c</description>
- <description>1|sp : digit "1" or space</description>
- <description>c : character out of following character set: sp|0-9|[letters, see TypeII column in XLS. See [@TODO: create file ref]]</description>
- <description>:|sp : colon or space</description>
- <description>used for Type II headunit</description>
- </element>
- <element name="CLOCKTEXT2">
- <description>5 chars possible</description>
- <description>Format: 1|sp c :|sp c c</description>
- <description>1|sp : digit "1" or space</description>
- <description>c : character out of following character set: sp|0-9|[letters, see CID column in XLS. See [@TODO: create file ref]]</description>
- <description>:|sp : colon or space</description>
- <description>used for CID headunit</description>
- <description>NOTE: difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character set</description>
- </element>
- <element name="CLOCKTEXT3">
- <description>6 chars possible</description>
- <description>Format: 1|sp c c :|sp c c</description>
- <description>1|sp : digit "1" or space</description>
- <description>c : character out of following character set: sp|0-9|[letters, see Type 5 column in XLS]. See [@TODO: create file ref]</description>
- <description>:|sp : colon or space</description>
- <description>used for Type V headunit</description>
- </element>
- <issue creator="mf">First complete values draft. Review needed.</issue>
- </enum>
- <enum name="DisplayType">
- <description>See DAES for further infos regarding the displays]</description>
- <issue creator="rs">Meaningful description is missing</issue>
- <element name="CID"/>
- <element name="TYPE2"/>
- <element name="TYPE5"/>
- <element name="NGN"/>
- <element name="GEN2_8_DMA"/>
- <element name="GEN2_6_DMA"/>
- <element name="MFD3"/>
- <element name="MFD4"/>
- <element name="MFD5"/>
- </enum>
- <enum name="TextFieldName">
- <element name="mainField1">
- <description>The first line of the main field of persistent display</description>
- <description>Applies to "Show"</description>
- </element>
- <element name="mainField2">
- <description>The second line of the main field of persistent display</description>
- <description>Applies to "Show"</description>
- </element>
- <element name="statusBar">
- <description>The status bar on Nav</description>
- <description>Applies to "Show"</description>
- </element>
- <element name="mediaClock">
- <description>Text value for MediaClock field. Has to be properly formatted by Mobile App according to Sync capabilities.</description>
- <description>Applies to "Show"</description>
- </element>
- <element name="mediaTrack">
- <description>The track field of NGN type ACMs.</description>
- <description>This field is only available for media applications.</description>
- <description>Applies to "Show"</description>
- </element>
- <element name="alertText1">
- <description>The first line of the alert text field</description>
- <description>Applies to "Alert"</description>
- </element>
- <element name="alertText2">
- <description>The second line of the alert text field</description>
- <description>Applies to "Alert"</description>
- </element>
- </enum>
- <enum name="CharacterSet">
- <description>The list of potential character sets</description>
- <element name="TYPE2SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="TYPE5SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="CID1SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <element name="CID2SET">
- <description>See [@TODO: create file ref]</description>
- </element>
- <issue creator="rs">Real sets have not been defined yet?</issue>
- </enum>
- <enum name="TextAlignment">
- <description>The list of possible alignments, left, right, or centered</description>
- <element name="LEFT_ALIGNED"/>
- <element name="RIGHT_ALIGNED"/>
- <element name="CENTERED"/>
- </enum>
- <enum name="TBTState">
- <description>Enumeration that describes possible states of turn-by-turn module.</description>
- <element name="ROUTE_UPDATE_REQUEST"/>
- <element name="ROUTE_ACCEPTED"/>
- <element name="ROUTE_REFUSED"/>
- <element name="ROUTE_CANCELLED"/>
- </enum>
- <enum name="DriverDistractionState">
- <description>Enumeration that describes possible states of driver distraction.</description>
- <element name="DD_ON"/>
- <element name="DD_OFF"/>
- </enum>
- <struct name="Choice">
- <description>A choice is an option given to the user, which can be selected either by menu, or through voice recognition system.</description>
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="65535"/>
- <param name="menuName" type="String" maxlength="500"/>
- <param name="vrCommands" type="String" minsize="1" maxsize="100" maxlength="99" array="true"/>
- </struct>
- <struct name="SyncMsgVersion">
- <description>Specifies the version number of the SYNC V4 protocol, that is supported by the mobile application</description>
- <param name="majorVersion" type="Integer" minvalue="1" maxvalue="1">
- <description>The major version indicates versions that is not-compatible to previous versions.</description>
- </param>
- <param name="minorVersion" type="Integer" minvalue="0" maxvalue="1000">
- <description>The minor version indicates a change to a previous version that should still allow to be run on an older version (with limited functionality)</description>
- </param>
- </struct>
- <enum name="GlobalProperty">
- <description>The different global properties.</description>
- <element name="HELPPROMPT">
- <description>The property helpPrompt of setGlobalProperties</description>
- </element>
- <element name="TIMEOUTPROMPT">
- <description>The property timeoutPrompt of setGlobalProperties</description>
- </element>
- </enum>
- <struct name="StartTime">
- <param name="hours" type="Integer" minvalue="0" maxvalue="59">
- <description>The hour of the media clock.</description>
- <description>Some radios only support a max of 19 hours. If out of range, it will be rejected.</description>
- </param>
- <param name="minutes" type="Integer" minvalue="0" maxvalue="59"/>
- <param name="seconds" type="Integer" minvalue="0" maxvalue="59"/>
- </struct>
- <struct name="TextField">
- <param name="name" type="TextFieldName">
- <description>The name that identifies the field. See TextFieldName.</description>
- </param>
- <param name="characterSet" type="CharacterSet">
- <description>The character set that is supported in this field. See CharacterSet.</description>
- </param>
- <param name="width" type="Integer" minvalue="1" maxvalue="40">
- <description>The number of characters in one row of this field.</description>
- </param>
- <param name="rows" type="Integer" minvalue="1" maxvalue="3">
- <description>The number of rows of this field.</description>
- </param>
- </struct>
- <struct name="DisplayCapabilities">
- <description>Contains information about the display capabilities.</description>
- <param name="displayType" type="DisplayType">
- <description>The type of the display. See DisplayType</description>
- </param>
- <param name="textFields" type="TextField" minsize="1" maxsize="100" array="true">
- <description>A set of all fields that support text data. See TextField</description>
- </param>
- <param name="mediaClockFormats" type="MediaClockFormat" minsize="1" maxsize="100" array="true">
- <description>A set of all supported formats of the media clock. See MediaClockFormat</description>
- </param>
- </struct>
- <struct name="ButtonCapabilities">
- <description>Contains information about a buttons capabilities.</description>
- <param name="name" type="ButtonName">
- <description>The name of the button. See ButtonName.</description>
- </param>
- <param name="shortPressAvailable" type="Boolean">
- <description>The button supports a short press.</description>
- <description>Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.</description>
- </param>
- <param name="longPressAvailable" type="Boolean">
- <description>The button supports a LONG press.</description>
- <description>Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.</description>
- </param>
- <param name="upDownAvailable" type="Boolean">
- <description>The button supports "button down" and "button up".</description>
- <description>Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.</description>
- <description>Whenever the button is released, onButtonEvent( UP) will be invoked.</description>
- </param>
- </struct>
- <struct name="MenuParams">
- <param name="parentID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>unique ID of the sub menu, the command will be added to.</description>
- <description>If not provided, it will be provided to the top level of the in application menu.</description>
- </param>
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
- <description>Position within the items that are are at top level of the in application menu.</description>
- <description>0 will insert at the front.</description>
- <description>1 will insert at the second position.</description>
- <description>if position is greater or equal than the number of items on top level, the sub menu will be appended to the end.</description>
- <description>If this param was omitted the entry will be added at the end.</description>
- </param>
- <param name="menuName" type="String" maxlength="500">
- <description>Text to show in the menu for this sub menu.</description>
- </param>
- </struct>
- <struct name="TTSChunk">
- <description>A TTS chunk, that consists of the text/phonemes to speak and the type (like text or SAPI)</description>
- <param name="text" maxlength="500" type="String">
- <description>The text or phonemes to speak.</description>
- <description>May not be empty.</description>
- </param>
- <param name="type" type="SpeechCapabilities">
- <description>Describes, whether it is text or a specific phoneme set. See SpeechCapabilities</description>
- </param>
- </struct>
- <!-- Requests/Responses -->
- <function name="RegisterAppInterface" messagetype="request">
- <description>Establishes an interface with a mobile application.</description>
- <description>Before registerAppInterface no other commands will be accepted/executed.</description>
- <param name="syncMsgVersion" type="SyncMsgVersion">
- <description>See SyncMsgVersion</description>
- </param>
- <param name="appName" type="String" maxlength="100">
- <description>The mobile application name, e.g. "Ford Drive Green".</description>
- <description>Needs to be unique over all applications.</description>
- <description>May not be empty.</description>
- <description>May not start with a new line character.</description>
- <description>May not interfere with any name or synonym of previously registered applications and the following list of words @TODO: Create list(global commands)</description>
- <description>Needs to be unique over all applications. Applications with the same name will be rejected.</description>
- <description>Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.</description>
- </param>
- <param name="ngnMediaScreenAppName" type="String" maxlength="100" mandatory="false">
- <description>Provides an abbreviated version of the app name (if needed), that will be displayed on the NGN media screen.</description>
- <description>If not provided, the appName is used instead (and will be truncated if too long)</description>
- <description>Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.</description>
- </param>
- <param name="vrSynonyms" type="String" maxlength="40" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Defines an additional voice recognition command.</description>
- <description>May not interfere with any name or synonym of previously registered applications and the following list of words @TODO: Create list(global commands)</description>
- <description>Only characters from char set [@TODO: Create char set (character/hex value) for each ACM and refer to] are supported.</description>
- </param>
- <param name="usesVehicleData" type="Boolean" platform="pending" mandatory="false">
- <description>If not provided, the default is equal to False"</description>
- <description>Indicates if the mobile application wants to use vehicle data like GPS or speed.</description>
- </param>
- <param name="isMediaApplication" type="Boolean">
- <description>Indicates if the application is a media or a non-media application.</description>
- <description>Only media applications will be able to stream audio to Sync that is audible outside of the BT media source.</description>
- </param>
- <param name="languageDesired" type="Language">
- <description>See Language</description>
- <description>If the language doesn't match the active language on Sync, it will be rejected.</description>
- <description>If the language is changed, while an app is registered, it will get disconnected.</description>
- </param>
- <param name="autoActivateID" type="String" maxlength="16" mandatory="false">
- <description>Used to support auto activation after an initial successful registerAppInterface (for example after an ignition cycle).</description>
- <description>The app should always provide the id that was provided by the most recent registerAppInterface response.</description>
- <description>If this is the first call to registerAppInterface, then do not provide this parameter at all.</description>
- <description>If not provided or not matching with the id of the last registerAppInterface response, the app will not be automatically put into foreground on startup.</description>
- </param>
- </function>
- <function name="RegisterAppInterface" messagetype="response">
- <description>The response to registerAppInterface</description>
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="GENERIC_ERROR"/>
- <element name="DUPLICATE_NAME"/>
- <element name="TOO_MANY_APPLICATIONS"/>
- <element name="APPLICATION_REGISTERED_ALREADY"/>
- <element name="UNSUPPORTED_VERSION"/>
- <element name="WRONG_LANGUAGE"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- <param name="syncMsgVersion" type="SyncMsgVersion" mandatory="false">
- <description>See SyncMsgVersion</description>
- </param>
- <param name="autoActivateID" type="String" maxlength="16" mandatory="false">
- <description>Provides an id that the app may use on a subsequent registerAppInterface to allow for auto activation (for example after an ignition cycle).</description>
- </param>
- <param name="language" type="Language" mandatory="false">
- <description>The currently active language on Sync. See "Language" for options.</description>
- </param>
- <param name="displayCapabilities" type="DisplayCapabilities" mandatory="false">
- <description>See DisplayCapabilities</description>
- </param>
- <param name="buttonCapabilities" type="ButtonCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See ButtonCapabilities</description>
- </param>
- <param name="hmiZoneCapabilities" type="HmiZoneCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <issue creator="rs">If not used yet => remove</issue>
- <description>See HmiZoneCapabilities</description>
- </param>
- <param name="speechCapabilities" type="SpeechCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See SpeechCapabilities</description>
- </param>
- <param name="vrCapabilities" type="VrCapabilities" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>See VrCapabilities</description>
- </param>
- </function>
- <function name="UnregisterAppInterface" messagetype="request">
- <description>Closes an interface from a mobile application.</description>
- <description>After unregisterAppInterface, no commands other than registerAppInterface will be accepted/executed.</description>
- <description>Will fail, if no registerAppInterface was completed successfully before.</description>
- </function>
- <function name="UnregisterAppInterface" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="SetGlobalProperties" messagetype="request">
- <description>Allows setting global properties.</description>
- <param name="helpPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>The help prompt.</description>
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- <param name="timeoutPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Help text for a wait timeout.</description>
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- <issue creator="rs">Do we want to add VR threshold params?</issue>
- </function>
- <function name="SetGlobalProperties" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="ResetGlobalProperties" messagetype="request">
- <description>Allows resetting global properties.</description>
- <param name="properties" type="GlobalProperty" minsize="1" maxsize="100" array="true">
- <description>Contains the names of all global properties (like timeoutPrompt) that should be unset. Resetting means, that they have the same value as at start up (default)</description>
- </param>
- </function>
- <function name="ResetGlobalProperties" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="request">
- <description>Adds a command to the in application menu.</description>
- <description>Either menuParams or vrCommands must be provided.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>unique ID of the command to add.</description>
- </param>
- <param name="menuParams" type="MenuParams" mandatory="false">
- <description>Optional sub value containing menu parameters</description>
- </param>
- <param name="vrCommands" type="String" minsize="1" maxsize="100" maxlength="99" array="true" mandatory="false">
- <description>An array of strings to be used as VR sysnonyms for this command.</description>
- <description>If this array is provided, it may not be empty.</description>
- </param>
- </function>
- <function name="AddCommand" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="request">
- <description>Deletes all commands from the in-application menu with the specified command id.</description>
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>ID of the command(s) to delete.</description>
- </param>
- </function>
- <function name="DeleteCommand" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="IN_USE"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="AddSubMenu" messagetype="request">
- <description>Adds a sub menu to the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>unique ID of the sub menu to add.</description>
- </param>
- <param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
- <description>Position within the items that are are at top level of the in application menu.</description>
- <description>0 will insert at the front.</description>
- <description>1 will insert at the second position.</description>
- <description>If position is greater or equal than the number of items on top level, the sub menu will be appended to the end.</description>
- <description>Position of any submenu will always be located before the return and exit options</description>
- <description>If this param was omitted the entry will be added at the end.</description>
- </param>
- <param name="menuName" maxlength="500" type="String">
- <description>Text to show in the menu for this sub menu.</description>
- </param>
- </function>
- <function name="AddSubMenu" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="DeleteSubMenu" messagetype="request">
- <description>Deletes a submenu from the in-application menu.</description>
- <param name="menuID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>The "menuID" of the submenu to delete. (See addSubMenu.menuID)</description>
- </param>
- </function>
- <function name="DeleteSubMenu" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="IN_USE"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="CreateInteractionChoiceSet" messagetype="request">
- <description>creates interaction choice set to be used later by performInteraction</description>
- <param name="interactionChoiceSetID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Unique ID used for this interaction choice set.</description>
- </param>
- <param name="choiceSet" type="Choice" minsize="1" maxsize="100" array="true"/>
- </function>
- <function name="CreateInteractionChoiceSet" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="request">
- <description>Triggers an interaction (e.g. "Permit GPS?" - Yes, no, Always Allow).</description>
- <param name="initialText" type="String" maxlength="500">
- <description>Text to be displayed first.</description>
- </param>
- <param name="initialPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true">
- <description>This is the intial prompt spoken to the user at the start of an interaction</description>
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- <param name="interactionMode" type="InteractionMode">
- <description>See InteractionMode.</description>
- </param>
- <param name="interactionChoiceSetIDList" type="Integer" minsize="1" maxsize="100" minvalue="0" maxvalue="2000000000" array="true">
- <description>List of interaction choice set IDs to use with an interaction.</description>
- </param>
- <param name="helpPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Help text. This is the spoken string when a user speaks "help" when the interaction is occuring.</description>
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- <param name="timeoutPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>Timeout text. This text is spoken when a VR interaction times out.</description>
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- <param name="timeout" type="Integer" minvalue="5000" maxvalue="100000" mandatory="false">
- <description>Timeout in milliseconds.</description>
- <description>If omitted a standard value of 10000 milliseconds is used.</description>
- </param>
- </function>
- <function name="PerformInteraction" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="DUPLICATE_NAME"/>
- <element name="ABORTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- <param name="choiceID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
- <description>ID of the choice that was selected in response to PerformInteraction.</description>
- </param>
- <param name="triggerSource" type="TriggerSource" mandatory="false">
- <description>See TriggerSource</description>
- </param>
- </function>
- <function name="DeleteInteractionChoiceSet" messagetype="request">
- <description>Deletes interaction choice set that has been created with "CreateInteractionChoiceSet".</description>
- <description>The interaction may only be deleted when not currently in use by a "performInteraction".</description>
- <param name="interactionChoiceSetID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>ID of the interaction choice set to delete.</description>
- </param>
- </function>
- <function name="DeleteInteractionChoiceSet" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="INVALID_ID"/>
- <element name="IN_USE"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="Alert" messagetype="request">
- <description>Shows an alert which typically consists of text-to-speech message and text on the display. At least either alertText1, alertText2 or TTSChunks need to be provided.</description>
- <param name="alertText1" type="String" maxlength="500" mandatory="false">
- <description>The first line of the alert text field</description>
- </param>
- <param name="alertText2" type="String" maxlength="500" mandatory="false">
- <description>The second line of the alert text field</description>
- </param>
- <param name="ttsChunks" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false">
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- <param name="duration" type="Integer" minvalue="3000" maxvalue="10000" mandatory="false">
- <description>Timeout in milliseconds.</description>
- <description>Typical timeouts are 3-5 seconds</description>
- <description>If omitted, timeout is set to 5s.</description>
- </param>
- <param name="playTone" type="Boolean" mandatory="false">
- <description>Defines if tone should be played. Tone is played before TTS.</description>
- <description>If omitted, no tone is played.</description>
- </param>
- </function>
- <function name="Alert" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="ABORTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="Show" messagetype="request">
- <description>Updates the persistent display. Supported fields depend on display capabilities.</description>
- <param name="mainField1" type="String" maxlength="500" mandatory="false">
- <description>The text that should be displayed in a single or upper display line.</description>
- <description>If this text is not set, the text of mainField1 stays unchanged.</description>
- <description>If this text is empty "", the field will be cleared.</description>
- </param>
- <param name="mainField2" type="String" maxlength="500" mandatory="false">
- <description>The text that should be displayed on the second dispay line.</description>
- <description>If this text is not set, the text of mainField2 stays unchanged.</description>
- <description>If this text is empty "", the field will be cleared.</description>
- </param>
- <param name="alignment" type="TextAlignment" mandatory="false">
- <description>Specifies how mainField1 and mainField2 texts should be aligned on display.</description>
- <description>If omitted, texts will be centered</description>
- </param>
- <param name="statusBar" type="String" maxlength="500" mandatory="false">
- <description>Requires investigation regarding the nav display capabilities. Potentially lower lowerStatusBar, upperStatusBar, titleBar, etc.</description>
- </param>
- <param name="mediaClock" type="String" maxlength="500" mandatory="false">
- <description>Text value for MediaClock field. Has to be properly formatted by Mobile App according to Sync capabilities.</description>
- <description>If this text is set, any automatic media clock updates previously set with SetMediaClockTimer will be stopped.</description>
- </param>
- <param name="mediaTrack" type="String" maxlength="500" mandatory="false">
- <description>The text that should be displayed in the track field.</description>
- <description>This field is only valid for media applications on NGN type ACMs.</description>
- <description>If this text is not set, the text of mediaTrack stays unchanged.</description>
- <description>If this text is empty "", the field will be cleared.</description>
- </param>
- </function>
- <function name="Show" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="Speak" messagetype="request">
- <description>Speaks a text.</description>
- <param name="ttsChunks" type="TTSChunk" minsize="1" maxsize="100" array="true">
- <description>An array of text chunks of type TTSChunk. See TTSChunk</description>
- <description>The array must have at least one item</description>
- </param>
- </function>
- <function name="Speak" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="ABORTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="request">
- <description>Sets the initial media clock value and automatic update method.</description>
- <param name="startTime" type="StartTime" mandatory="false">
- <description>See StartTime</description>
- <description>startTime must be provided for "run"</description>
- <description>startTime will be ignored for "pause" and "resum"</description>
- </param>
- <param name="updateMode" type="UpdateMode">
- <description>Enumeration to control the media clock.</description>
- <description>In case of pause or resume, the start time value is ignored and shall be left out. For resume, the time continues with the same value as it was when paused.</description>
- </param>
- </function>
- <function name="SetMediaClockTimer" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- <element name="IGNORED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="EncodedSyncPData" messagetype="request">
- <description>Allows encoded data in the form of SyncP packets to be sent to the SYNC module</description>
- <param name="data" type="String" maxlength="10000" minsize="1" maxsize="100" array="true" mandatory="true">
- <description>Contains base64 encoded string of SyncP packets.</description>
- <todo>What is the maxlength</todo>
- </param>
- </function>
- <function name="EncodedSyncPData" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="REJECTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="SubscribeButton" messagetype="request">
- <description>Subscribes to built-in HMI buttons.</description>
- <description>The application will be notified by the OnButtonEvent and OnButtonPress.</description>
- <description>To unsubscribe the notifications, use unsubscribeButton.</description>
- <param name="buttonName" type="ButtonName">
- <description>Name of the button to subscribe.</description>
- </param>
- </function>
- <function name="SubscribeButton" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="UNSUPPORTED_BUTTON"/>
- <element name="IGNORED"/>
- <element name="REJECTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="UnsubscribeButton" messagetype="request">
- <description>Unsubscribes from built-in HMI buttons.</description>
- <param name="buttonName" type="ButtonName">
- <description>Name of the button to unsubscribe.</description>
- </param>
- </function>
- <function name="UnsubscribeButton" messagetype="response">
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="SUCCESS"/>
- <element name="INVALID_DATA"/>
- <element name="OUT_OF_MEMORY"/>
- <element name="TOO_MANY_PENDING_REQUESTS"/>
- <element name="APPLICATION_NOT_REGISTERED"/>
- <element name="GENERIC_ERROR"/>
- <element name="UNSUPPORTED_BUTTON"/>
- <element name="IGNORED"/>
- <element name="REJECTED"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <function name="GenericResponse" messagetype="response">
- <description>Generic Response is sent, when the name of a received msg cannot be retrieved. Only used in case of an error.</description>
- <description>Currently, only resultCode INVALID_DATA is used.</description>
- <param name="success" type="Boolean">
- <description>true, if successful</description>
- <description>false, if failed</description>
- </param>
- <param name="resultCode" type="Result">
- <description>See Result</description>
- <element name="INVALID_DATA"/>
- </param>
- <param name="info" type="String" maxlength="1000" mandatory="false">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
- <!-- Notifications -->
- <function name="OnHMIStatus" messagetype="notification">
- <param name="hmiLevel" type="HMILevel">
- <description>See HMILevel</description>
- </param>
- <param name="audioStreamingState" type="AudioStreamingState">
- <description>See AudioStreamingState</description>
- </param>
- <param name="systemContext" type="SystemContext">
- <description>See SystemContext</description>
- </param>
- </function>
- <function name="OnAppInterfaceUnregistered" messagetype="notification">
- <param name="reason" type="AppInterfaceUnregisteredReason">
- <description>See AppInterfaceUnregisteredReason</description>
- </param>
- </function>
- <function name="OnButtonEvent" messagetype="notification">
- <description>Notifies application of UP/DOWN events for buttons to which the application is subscribed.</description>
- <param name="buttonName" type="ButtonName"/>
- <param name="buttonEventMode" type="ButtonEventMode">
- <description>Indicates whether this is an UP or DOWN event.</description>
- </param>
- </function>
- <function name="OnButtonPress" messagetype="notification">
- <description>Notifies application of LONG/SHORT press events for buttons to which the application is subscribed.</description>
- <param name="buttonName" type="ButtonName"/>
- <param name="buttonPressMode" type="ButtonPressMode">
- <description>Indicates whether this is a LONG or SHORT button press event.</description>
- </param>
- </function>
- <function name="OnCommand" messagetype="notification">
- <param name="cmdID" type="Integer" minvalue="0" maxvalue="2000000000">
- <description>Command ID, which is related to a specific menu entry.</description>
- </param>
- <param name="triggerSource" type="TriggerSource">
- <description>See TriggerSource</description>
- </param>
- </function>
- <function name="OnEncodedSyncPData" messagetype="notification">
- <description>Callback including encoded data of any SyncP packets that SYNC needs to send back to the mobile device.</description>
- <param name="data" type="String" maxlength="10000" minsize="1" maxsize="100" mandatory="true" array="true">
- <description>Contains base64 encoded string of SyncP packets.</description>
- </param>
- </function>
- <function name="OnTBTClientState" messagetype="notification">
- <description>Provides applications with notifications specific to the current TBT client status on the module</description>
- <param name="state" type="TBTState">
- <description>Current State of TBT client</description>
- </param>
- </function>
- <function name="OnDriverDistraction" messagetype="notification">
- <description>Provides driver distraction state to mobile applications</description>
- <param name="state" type="DriverDistractionState">
- <description>Current State of Driver Distraction</description>
- </param>
- </function>
-
-
-</interface>
diff --git a/SDL_Core/src/components/media_manager/CMakeLists.txt b/SDL_Core/src/components/media_manager/CMakeLists.txt
deleted file mode 100644
index 2d631fd5b..000000000
--- a/SDL_Core/src/components/media_manager/CMakeLists.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-if (EXTENDED_MEDIA_MODE)
-find_package(Gstreamer-1.0 REQUIRED)
-find_package(Glib-2.0 REQUIRED)
-find_package(PkgConfig)
-pkg_check_modules(GLIB2 REQUIRED glib-2.0)
-add_definitions(${GLIB2_CFLAGS})
-set(default_includes
- ${GSTREAMER_gst_INCLUDE_DIR}
- ${GLIB_glib_2_INCLUDE_DIR}
-)
-set(default_sources
- ./src/audio/a2dp_source_player_adapter.cc
- ./src/audio/from_mic_recorder_adapter.cc
- ./src/audio/from_mic_to_file_recorder_thread.cc
- ./src/audio/socket_audio_streamer_adapter.cc
- ./src/audio/pipe_audio_streamer_adapter.cc
- ./src/video/socket_video_streamer_adapter.cc
- ./src/video/pipe_video_streamer_adapter.cc
- ./src/video/video_stream_to_file_adapter.cc
- ./src/pipe_streamer_adapter.cc
- ./src/socket_streamer_adapter.cc
-)
-set(LIBRARIES
- ${GSTREAMER_gstreamer_LIBRARY}
- pulse-simple
- pulse
- gobject-2.0
- glib-2.0
-)
-else(EXTENDED_MEDIA_MODE)
-set(default_includes
-)
-set(default_sources
- ./src/video/video_stream_to_file_adapter.cc
- ./src/audio/socket_audio_streamer_adapter.cc
- ./src/audio/pipe_audio_streamer_adapter.cc
- ./src/video/socket_video_streamer_adapter.cc
- ./src/video/pipe_video_streamer_adapter.cc
- ./src/video/video_stream_to_file_adapter.cc
- ./src/pipe_streamer_adapter.cc
- ./src/socket_streamer_adapter.cc
-)
-set(LIBRARIES
-)
-endif()
-
-include_directories (
- ./include
- ./include/audio/
- ./include/video/
- ../utils/include/
- ../protocol_handler/include/
- ../connection_handler/include/
- ../transport_manager/include/
- ../application_manager/include/
- ../smart_objects/include/
- ../hmi_message_handler/include/
- ../request_watchdog/include/
- ../formatters/include
- ../config_profile/include/
- ../../thirdPartyLibs/jsoncpp/include/
- ${CMAKE_BINARY_DIR}/src/components/
- ${default_includes}
-)
-
-set (SOURCES
- ./src/media_adapter_impl.cc
- ./src/audio/from_mic_recorder_listener.cc
- ./src/audio/audio_stream_sender_thread.cc
- ./src/streamer_listener.cc
- ./src/media_manager_impl.cc
-)
-
-add_library("MediaManager" ${SOURCES} ${default_sources})
-target_link_libraries("MediaManager" ${LIBRARIES})
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h
deleted file mode 100644
index ae8433509..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/a2dp_source_player_adapter.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_A2DP_SOURCE_PLAYER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_A2DP_SOURCE_PLAYER_ADAPTER_H_
-
-#include <map>
-#include "protocol_handler/raw_message.h"
-#include "media_manager/media_adapter_impl.h"
-#include "utils/logger.h"
-
-namespace threads {
-class Thread;
-}
-
-namespace media_manager {
-
-class A2DPSourcePlayerAdapter : public MediaAdapterImpl {
- public:
- A2DPSourcePlayerAdapter();
- ~A2DPSourcePlayerAdapter();
- void SendData(int32_t application_key,
- const protocol_handler::RawMessagePtr& message) {}
- void StartActivity(int32_t application_key);
- void StopActivity(int32_t application_key);
- bool is_app_performing_activity(int32_t application_key);
-
- private:
- class A2DPSourcePlayerThread;
-
- std::map<int32_t, threads::Thread*> sources_;
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(A2DPSourcePlayerAdapter);
-};
-
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_A2DP_SOURCE_PLAYER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
deleted file mode 100644
index c5ee3231e..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_AUDIO_STREAM_SENDER_THREAD_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_AUDIO_STREAM_SENDER_THREAD_H_
-
-#include <string>
-#include "utils/logger.h"
-#include "utils/macro.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/lock.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-}
-}
-
-namespace media_manager {
-
-typedef enum {
- SR_INVALID = -1,
- SR_8KHZ = 0,
- SR_16KHZ = 1,
- SR_22KHZ = 2,
- SR_44KHZ = 3
-} SamplingRate;
-
-typedef enum {
- ACQ_INVALID = -1,
- ACQ_8_BIT = 0,
- ACQ_16_BIT = 1
-} AudioCaptureQuality;
-
-typedef enum {
- AT_INVALID = -1,
- AT_PCM = 0
-} AudioType;
-
-/*
- * @brief AudioStreamSenderThread class used to read binary data written from microphone
- * and send it every 1 second to mobile device.
- */
-class AudioStreamSenderThread : public threads::ThreadDelegate {
- public:
- /*
- * @brief AudioStreamSenderThread class constructor
- *
- * @param session_key Session key of connection for Mobile side
- * @param correlation_id Correlation id for response for Mobile side
- */
- AudioStreamSenderThread(const std::string fileName,
- uint32_t session_key);
-
- /*
- * @brief AudioStreamSenderThread class destructor
- */
- ~AudioStreamSenderThread();
-
- /**
- * @brief Thread procedure.
- */
- void threadMain();
-
- /*
- * @brief Retrieve session key
- *
- * @return Stored session key
- */
- uint32_t session_key() const;
-
- bool exitThreadMain();
-
- private:
- /*
- * @brief Sends AudioPassThru request
- */
- bool SendEndAudioPassThru();
-
- void sendAudioChunkToMobile();
-
- /*
- * @brief Creates command for corresponding smart object
- *
- * @param cmd Smart object representing command
- */
- void FactoryCreateCommand(
- NsSmartDeviceLink::NsSmartObjects::SmartObject* cmd);
-
- bool getShouldBeStopped();
- void setShouldBeStopped(bool should_stop);
-
- uint32_t session_key_;
- const std::string fileName_;
- int32_t offset_;
- bool shouldBeStoped_;
- sync_primitives::Lock shouldBeStoped_lock_;
-
- static const int32_t kAudioPassThruTimeout;
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioStreamSenderThread);
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_AUDIO_STREAM_SENDER_THREAD_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
deleted file mode 100644
index f49526a0f..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/media_adapter_impl.h"
-#include "utils/logger.h"
-
-namespace threads {
-class Thread;
-}
-
-namespace media_manager {
-
-class FromMicRecorderAdapter : public MediaAdapterImpl {
- public:
- FromMicRecorderAdapter();
- ~FromMicRecorderAdapter();
- void SendData(int32_t application_key,
- const protocol_handler::RawMessagePtr& message) {}
- void StartActivity(int32_t application_key);
- void StopActivity(int32_t application_key);
- bool is_app_performing_activity(int32_t application_key);
- void set_output_file(const std::string& output_file);
- void set_duration(int32_t duration);
- private:
- threads::Thread* recorder_thread_;
- std::string output_file_;
- int32_t duration_;
- const int32_t kDefaultDuration;
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(FromMicRecorderAdapter);
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h
deleted file mode 100644
index 37896b385..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_recorder_listener.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_LISTENER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_LISTENER_H_
-
-#include <string>
-#include "media_manager/media_adapter_listener.h"
-
-namespace threads {
-class Thread;
-}
-
-namespace media_manager {
-class FromMicRecorderListener : public MediaAdapterListener {
- public:
- explicit FromMicRecorderListener(
- const std::string& file_name);
- ~FromMicRecorderListener();
- virtual void OnDataReceived(
- int32_t application_key,
- const DataForListener& data);
- virtual void OnErrorReceived(
- int32_t application_key,
- const DataForListener& data);
- virtual void OnActivityStarted(int32_t application_key);
- virtual void OnActivityEnded(int32_t application_key);
-
- private:
- threads::Thread* reader_;
- std::string file_name_;
- int32_t current_application_;
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(FromMicRecorderListener);
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_LISTENER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
deleted file mode 100644
index ff0af43e4..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_TO_FILE_RECORDER_THREAD_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_TO_FILE_RECORDER_THREAD_H_
-
-#include <net/if.h>
-#include <gst/gst.h>
-#include <string>
-
-#include "utils/lock.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-
-namespace media_manager {
-
-class FromMicToFileRecorderThread : public threads::ThreadDelegate {
- public:
- FromMicToFileRecorderThread(const std::string& output_file,
- int32_t duration);
-
- void threadMain();
-
- bool exitThreadMain();
-
- void set_output_file(const std::string& output_file);
- void set_record_duration(int32_t duration);
-
- private:
- static log4cxx::LoggerPtr logger_;
-
- int32_t argc_;
- gchar** argv_;
-
- const std::string oKey_;
- const std::string tKey_;
-
- static GMainLoop* loop;
- threads::Thread* sleepThread_;
- bool shouldBeStoped_;
- sync_primitives::Lock stopFlagLock_;
-
- std::string outputFileName_, durationString_;
-
- typedef struct {
- GstElement* pipeline;
- gint duration;
- } GstTimeout;
-
- void initArgs();
-
- void psleep(void* timeout);
-
- class SleepThreadDelegate : public threads::ThreadDelegate {
- public:
- explicit SleepThreadDelegate(GstTimeout timeout);
-
- void threadMain();
-
- private:
- GstTimeout timeout_;
-
- DISALLOW_COPY_AND_ASSIGN(SleepThreadDelegate);
- };
-
- DISALLOW_COPY_AND_ASSIGN(FromMicToFileRecorderThread);
-};
-
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_TO_FILE_RECORDER_THREAD_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h
deleted file mode 100644
index 9e2159446..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/pipe_audio_streamer_adapter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_PIPE_AUDIO_STREAMER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_PIPE_AUDIO_STREAMER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/pipe_streamer_adapter.h"
-
-namespace media_manager {
-class PipeAudioStreamerAdapter : public PipeStreamerAdapter {
- public:
- PipeAudioStreamerAdapter();
- ~PipeAudioStreamerAdapter();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PipeAudioStreamerAdapter);
-};
-
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_PIPE_AUDIO_STREAMER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h
deleted file mode 100644
index e9c4031ab..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/audio/socket_audio_streamer_adapter.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_SOCKET_AUDIO_STREAMER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_SOCKET_AUDIO_STREAMER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/socket_streamer_adapter.h"
-
-namespace media_manager {
-class SocketAudioStreamerAdapter : public SocketStreamerAdapter {
- public:
- SocketAudioStreamerAdapter();
- virtual ~SocketAudioStreamerAdapter();
- private:
- DISALLOW_COPY_AND_ASSIGN(SocketAudioStreamerAdapter);
-};
-} // namespace media_manager
-
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_SOCKET_AUDIO_STREAMER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/media_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/media_adapter.h
deleted file mode 100644
index d2c62a468..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/media_adapter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_H_
-
-namespace media_manager {
-
-class MediaAdapter {
- public:
- virtual void SendData(int32_t application_key,
- const protocol_handler::RawMessagePtr& message) = 0;
- virtual void StartActivity(int32_t application_key) = 0;
- virtual void StopActivity(int32_t application_key) = 0;
- virtual bool is_app_performing_activity(int32_t application_key) = 0;
-
- virtual ~MediaAdapter(){}
-};
-
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/media_adapter_impl.h b/SDL_Core/src/components/media_manager/include/media_manager/media_adapter_impl.h
deleted file mode 100644
index 20d44b423..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/media_adapter_impl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_IMPL_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_IMPL_H_
-
-#include <set>
-#include "protocol_handler/raw_message.h"
-#include "media_manager/media_adapter.h"
-#include "media_manager/media_adapter_listener.h"
-#include "utils/macro.h"
-#include "utils/logger.h"
-
-namespace media_manager {
-
-typedef utils::SharedPtr<MediaAdapterListener> MediaListenerPtr;
-
-class MediaAdapterImpl : public MediaAdapter {
- public:
- virtual ~MediaAdapterImpl();
- virtual void AddListener(const MediaListenerPtr& listener);
- virtual void RemoveListener(const MediaListenerPtr& listener);
-
- protected:
- MediaAdapterImpl();
- std::set<MediaListenerPtr> media_listeners_;
- int32_t current_application_;
-
- private:
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaAdapterImpl);
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_IMPL_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/media_adapter_listener.h b/SDL_Core/src/components/media_manager/include/media_manager/media_adapter_listener.h
deleted file mode 100644
index 1a462dd9d..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/media_adapter_listener.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_LISTENER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_LISTENER_H_
-
-#include <stdint.h>
-
-namespace media_manager {
-
-typedef int32_t DataForListener;
-
-class MediaAdapterListener {
- public:
- virtual void OnDataReceived(
- int32_t application_key,
- const DataForListener& data) = 0;
- virtual void OnErrorReceived(
- int32_t application_key,
- const DataForListener& data) = 0;
- virtual void OnActivityStarted(int32_t application_key) = 0;
- virtual void OnActivityEnded(int32_t application_key) = 0;
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_ADAPTER_LISTENER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/media_manager.h b/SDL_Core/src/components/media_manager/include/media_manager/media_manager.h
deleted file mode 100644
index 458481ca2..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/media_manager.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_H_
-
-#include <string>
-
-namespace media_manager {
-class MediaManager {
- public:
- virtual void PlayA2DPSource(int32_t application_key) = 0;
- virtual void StopA2DPSource(int32_t application_key) = 0;
- virtual void StartMicrophoneRecording(int32_t application_key,
- const std::string& outputFileName,
- int32_t duration) = 0;
- virtual void StopMicrophoneRecording(int32_t application_key) = 0;
- virtual void StartVideoStreaming(int32_t application_key) = 0;
- virtual void StopVideoStreaming(int32_t application_key) = 0;
- virtual void StartAudioStreaming(int32_t application_key) = 0;
- virtual void StopAudioStreaming(int32_t application_key) = 0;
-
- virtual ~MediaManager(){}
-};
-} // namespace media_manager
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/media_manager_impl.h b/SDL_Core/src/components/media_manager/include/media_manager/media_manager_impl.h
deleted file mode 100644
index 87f948af2..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/media_manager_impl.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
-
-#include <string>
-#include "utils/singleton.h"
-#include "protocol_handler/protocol_observer.h"
-#include "protocol_handler/protocol_handler.h"
-#include "protocol_handler/service_type.h"
-#include "media_manager/media_manager.h"
-#include "media_manager/media_adapter_impl.h"
-#include "media_manager/media_adapter_listener.h"
-
-namespace media_manager {
-
-class MediaManagerImpl : public MediaManager,
- public protocol_handler::ProtocolObserver,
- public utils::Singleton<MediaManagerImpl> {
- public:
- virtual ~MediaManagerImpl();
- virtual void SetProtocolHandler(
- protocol_handler::ProtocolHandler* protocol_handler);
- virtual void PlayA2DPSource(int32_t application_key);
- virtual void StopA2DPSource(int32_t application_key);
- virtual void StartMicrophoneRecording(int32_t application_key,
- const std::string& outputFileName,
- int32_t duration);
- virtual void StopMicrophoneRecording(int32_t application_key);
- virtual void StartVideoStreaming(int32_t application_key);
- virtual void StopVideoStreaming(int32_t application_key);
- virtual void StartAudioStreaming(int32_t application_key);
- virtual void StopAudioStreaming(int32_t application_key);
- virtual void OnMessageReceived(
- const protocol_handler::RawMessagePtr& message);
- virtual void OnMobileMessageSent(
- const protocol_handler::RawMessagePtr& message);
- virtual void FramesProcessed(int32_t application_key, int32_t frame_number);
-
- protected:
- MediaManagerImpl();
- virtual void Init();
- protocol_handler::ProtocolHandler* protocol_handler_;
- MediaAdapter* a2dp_player_;
- MediaAdapterImpl* from_mic_recorder_;
- MediaListenerPtr from_mic_listener_;
- MediaAdapterImpl* video_streamer_;
- MediaAdapterImpl* audio_streamer_;
- MediaListenerPtr video_streamer_listener_;
- MediaListenerPtr audio_streamer_listener_;
- bool video_stream_active_;
- bool audio_stream_active_;
-
- private:
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(MediaManagerImpl);
-
- FRIEND_BASE_SINGLETON_CLASS(MediaManagerImpl);
-};
-
-} // namespace media_manager
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h
deleted file mode 100644
index a1b98071a..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/pipe_streamer_adapter.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_PIPE_STREAMER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_PIPE_STREAMER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/media_adapter_impl.h"
-#include "utils/shared_ptr.h"
-#include "utils/message_queue.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-
-namespace media_manager {
-class PipeStreamerAdapter : public MediaAdapterImpl {
- public:
- PipeStreamerAdapter();
- virtual ~PipeStreamerAdapter();
- virtual void SendData(int32_t application_key,
- const protocol_handler::RawMessagePtr& message);
- virtual void StartActivity(int32_t application_key);
- virtual void StopActivity(int32_t application_key);
- virtual bool is_app_performing_activity(int32_t application_key);
-
- protected:
- std::string named_pipe_path_;
-
- /*
- * @brief Start streamer thread
- */
- virtual void Init();
-
- private:
- class Streamer : public threads::ThreadDelegate {
- public:
- /*
- * Default constructor
- *
- * @param server Server pointer
- */
- explicit Streamer(PipeStreamerAdapter* server);
-
- /*
- * Destructor
- */
- ~Streamer();
-
- /*
- * @brief Function called by thread on start
- */
- void threadMain();
-
- /*
- * @brief Function called by thread on exit
- */
- bool exitThreadMain();
-
- /*
- * @brief Opens pipe
- */
- void open();
-
- /*
- * @brief Closes pipe
- */
- void close();
-
- private:
- PipeStreamerAdapter* server_;
- int32_t pipe_fd_;
- volatile bool stop_flag_;
-
- DISALLOW_COPY_AND_ASSIGN(Streamer);
- };
-
- bool is_ready_;
- threads::Thread* thread_;
- MessageQueue<protocol_handler::RawMessagePtr> messages_;
-
- DISALLOW_COPY_AND_ASSIGN(PipeStreamerAdapter);
-};
-
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_PIPE_STREAMER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/socket_streamer_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/socket_streamer_adapter.h
deleted file mode 100644
index 899e3ed26..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/socket_streamer_adapter.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_SOCKET_STREAMER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_SOCKET_STREAMER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/media_adapter_impl.h"
-#include "utils/logger.h"
-#include "utils/shared_ptr.h"
-#include "utils/message_queue.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-
-namespace media_manager {
-class SocketStreamerAdapter : public MediaAdapterImpl {
- public:
- SocketStreamerAdapter();
- virtual ~SocketStreamerAdapter();
- virtual void SendData(int32_t application_key,
- const protocol_handler::RawMessagePtr& message);
- virtual void StartActivity(int32_t application_key);
- virtual void StopActivity(int32_t application_key);
- virtual bool is_app_performing_activity(int32_t application_key);
-
- protected:
-
- /*
- * @brief Start streamer thread
- */
- virtual void Init();
-
- int32_t port_;
- std::string ip_;
-
- private:
- class Streamer : public threads::ThreadDelegate {
- public:
- /*
- * Default constructor
- *
- * @param server Server pointer
- */
- explicit Streamer(SocketStreamerAdapter* const server);
-
- /*
- * Destructor
- */
- ~Streamer();
-
- /*
- * Function called by thread on start
- */
- void threadMain();
-
- /*
- * Function called by thread on exit
- */
- bool exitThreadMain();
-
- /*
- * Checks if server is ready
- *
- * @return TRUE if socket is ready otherwise FALSE
- */
- bool is_ready() const;
-
- /*
- * Starts server
- *
- */
- void start();
-
- /*
- * Stops server
- *
- */
- void stop();
-
- /*
- * Sends data to connected client
- *
- * @param block Pointer to the data
- */
- bool send(const protocol_handler::RawMessagePtr& msg);
-
- private:
- SocketStreamerAdapter* const server_;
- int32_t new_socket_fd_;
- bool is_first_loop_;
- volatile bool is_client_connected_;
- volatile bool stop_flag_;
-
- DISALLOW_COPY_AND_ASSIGN(Streamer);
- };
-
- int32_t socket_fd_;
- bool is_ready_;
- threads::Thread* thread_;
- MessageQueue<protocol_handler::RawMessagePtr> messages_;
-
- DISALLOW_COPY_AND_ASSIGN(SocketStreamerAdapter);
-};
-} // namespace media_manager
-
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_SOCKET_STREAMER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/streamer_listener.h b/SDL_Core/src/components/media_manager/include/media_manager/streamer_listener.h
deleted file mode 100644
index df9da33e2..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/streamer_listener.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_STREAMER_LISTENER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_STREAMER_LISTENER_H_
-
-#include <stdint.h>
-#include "media_manager/media_adapter_listener.h"
-#include "utils/macro.h"
-#include "utils/logger.h"
-
-namespace media_manager {
-class StreamerListener : public MediaAdapterListener {
- public:
- StreamerListener();
- ~StreamerListener();
- virtual void OnDataReceived(
- int32_t application_key,
- const DataForListener& data);
- virtual void OnErrorReceived(
- int32_t application_key,
- const DataForListener& data);
- virtual void OnActivityStarted(int32_t application_key);
- virtual void OnActivityEnded(int32_t application_key);
- private:
- int32_t current_application_;
- static log4cxx::LoggerPtr logger_;
- DISALLOW_COPY_AND_ASSIGN(StreamerListener);
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_STREAMER_LISTENER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h
deleted file mode 100644
index 50328cc43..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/video/pipe_video_streamer_adapter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_PIPE_VIDEO_STREAMER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_PIPE_VIDEO_STREAMER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/pipe_streamer_adapter.h"
-
-namespace media_manager {
-class PipeVideoStreamerAdapter : public PipeStreamerAdapter {
- public:
- PipeVideoStreamerAdapter();
- ~PipeVideoStreamerAdapter();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PipeVideoStreamerAdapter);
-};
-
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_PIPE_VIDEO_STREAMER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h
deleted file mode 100644
index 8752efc5e..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/video/socket_video_streamer_adapter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_SOCKET_VIDEO_STREAMER_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_SOCKET_VIDEO_STREAMER_ADAPTER_H_
-
-#include <string>
-#include "media_manager/socket_streamer_adapter.h"
-
-namespace media_manager {
-class SocketVideoStreamerAdapter : public SocketStreamerAdapter {
- public:
- SocketVideoStreamerAdapter();
- virtual ~SocketVideoStreamerAdapter();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SocketVideoStreamerAdapter);
-};
-} // namespace media_manager
-
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_SOCKET_VIDEO_STREAMER_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h b/SDL_Core/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h
deleted file mode 100644
index 77441f8ee..000000000
--- a/SDL_Core/src/components/media_manager/include/media_manager/video/video_stream_to_file_adapter.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_VIDEO_STREAM_TO_FILE_ADAPTER_H_
-#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_VIDEO_STREAM_TO_FILE_ADAPTER_H_
-
-#include <string>
-#include <fstream>
-#include "media_manager/media_adapter_impl.h"
-#include "utils/message_queue.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-
-namespace media_manager {
-
-class VideoStreamToFileAdapter : public MediaAdapterImpl {
- public:
- explicit VideoStreamToFileAdapter(const std::string& file_name);
- virtual ~VideoStreamToFileAdapter();
- virtual void SendData(int32_t application_key,
- const protocol_handler::RawMessagePtr& message);
- virtual void StartActivity(int32_t application_key);
- virtual void StopActivity(int32_t application_key);
- virtual bool is_app_performing_activity(int32_t application_key);
-
- /*
- * @brief Start streamer thread
- */
- virtual void Init();
-
- private:
- class Streamer : public threads::ThreadDelegate {
- public:
- /*
- * Default constructor
- *
- * @param server Server pointer
- */
- explicit Streamer(VideoStreamToFileAdapter* server);
-
- /*
- * Destructor
- */
- ~Streamer();
-
- /*
- * @brief Function called by thread on start
- */
- void threadMain();
-
- /*
- * @brief Function called by thread on exit
- */
- bool exitThreadMain();
-
- /*
- * @brief Opens file
- */
- void open();
-
- /*
- * @brief Closes file
- */
- void close();
-
- private:
- VideoStreamToFileAdapter* server_;
- volatile bool stop_flag_;
- std::ofstream* file_stream_;
-
- DISALLOW_COPY_AND_ASSIGN(Streamer);
- };
-
- private:
- std::string file_name_;
- bool is_ready_;
- threads::Thread* thread_;
- MessageQueue<protocol_handler::RawMessagePtr> messages_;
-};
-} // namespace media_manager
-
-#endif // SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_VIDEO_VIDEO_STREAM_TO_FILE_ADAPTER_H_
diff --git a/SDL_Core/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc b/SDL_Core/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
deleted file mode 100644
index 892c6387c..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
+++ /dev/null
@@ -1,284 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-#include <net/if.h>
-#include <pulse/simple.h>
-#include <pulse/error.h>
-#include <string.h>
-#include <utility>
-#include "utils/threads/thread.h"
-#include "media_manager/audio/a2dp_source_player_adapter.h"
-#include "utils/lock.h"
-#include "utils/threads/thread_delegate.h"
-#include "connection_handler/connection_handler_impl.h"
-
-namespace media_manager {
-
-log4cxx::LoggerPtr A2DPSourcePlayerAdapter::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("A2DPSourcePlayerAdapter"));
-
-class A2DPSourcePlayerAdapter::A2DPSourcePlayerThread
- : public threads::ThreadDelegate {
- public:
- explicit A2DPSourcePlayerThread(const std::string& device);
-
- void threadMain();
-
- bool exitThreadMain();
-
- private:
- static log4cxx::LoggerPtr logger_;
-
- // The Sample format to use
- static const pa_sample_spec sSampleFormat_;
-
- const int32_t BUFSIZE_;
- pa_simple* s_in, *s_out;
- std::string device_;
- bool should_be_stopped_;
- sync_primitives::Lock should_be_stopped_lock_;
-
- void freeStreams();
-
- DISALLOW_COPY_AND_ASSIGN(A2DPSourcePlayerThread);
-};
-
-A2DPSourcePlayerAdapter::A2DPSourcePlayerAdapter() {
-}
-
-A2DPSourcePlayerAdapter::~A2DPSourcePlayerAdapter() {
- for (std::map<int32_t, threads::Thread*>::iterator it = sources_.begin();
- sources_.end() != it;
- ++it) {
- if (NULL != it->second) {
- if (it->second->is_running()) {
- it->second->stop();
- }
- delete(it->second);
- }
- }
- sources_.clear();
-}
-
-void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(logger_, "Starting a2dp playing music for "
- << application_key << " application.");
- if (application_key != current_application_) {
- current_application_ = application_key;
-
- std::map<int32_t, threads::Thread*>::iterator it =
- sources_.find(application_key);
- if (sources_.end() != it) {
- if (NULL != it->second && !it->second->is_running()) {
- it->second->start();
- } else {
- current_application_ = 0;
- }
- } else {
- uint32_t device_id = 0;
- connection_handler::ConnectionHandlerImpl::instance()->
- GetDataOnSessionKey(application_key, 0, NULL, &device_id);
- std::string mac_adddress;
- connection_handler::ConnectionHandlerImpl::instance()->GetDataOnDeviceID(
- device_id,
- NULL,
- NULL,
- &mac_adddress);
-
- // TODO(PK): Convert mac_adddress to the
- // following format : "bluez_source.XX_XX_XX_XX_XX_XX" if needed
- // before passing to the A2DPSourcePlayerThread constructor
-
- threads::Thread* new_activity = new threads::Thread(
- mac_adddress.c_str(),
- new A2DPSourcePlayerAdapter::A2DPSourcePlayerThread(mac_adddress));
- if (NULL != new_activity) {
- sources_.insert(std::pair<int32_t, threads::Thread*>(
- application_key, new_activity));
-
- new_activity->start();
- } else {
- current_application_ = 0;
- }
- }
- }
-}
-
-void A2DPSourcePlayerAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger_, "Stopping 2dp playing for "
- << application_key << " application.");
- if (application_key != current_application_) {
- return;
- }
- std::map<int32_t, threads::Thread*>::iterator it =
- sources_.find(application_key);
- if (sources_.end() != it) {
- LOG4CXX_DEBUG(logger_, "Source exists.");
- if (NULL != it->second) {
- LOG4CXX_DEBUG(logger_, "Sources thread was allocated");
- if ((*it).second->is_running()) {
- // Sources thread was started - stop it
- LOG4CXX_DEBUG(logger_, "Sources thread was started - stop it");
- (*it).second->stop();
- }
- }
- current_application_ = 0;
- }
-}
-
-bool A2DPSourcePlayerAdapter::is_app_performing_activity(int32_t
- application_key) {
- return (application_key == current_application_);
-}
-
-log4cxx::LoggerPtr A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("A2DPSourcePlayerThread"));
-
-const pa_sample_spec A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::
-sSampleFormat_ = {
- /*format*/ PA_SAMPLE_S16LE,
- /*rate*/ 44100,
- /*channels*/ 2
-};
-
-A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::A2DPSourcePlayerThread(
- const std::string& device)
- : threads::ThreadDelegate(),
- device_(device),
- BUFSIZE_(32) {
-}
-
-void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::freeStreams() {
- LOG4CXX_INFO(logger_, "Free streams in A2DPSourcePlayerThread.");
- if (s_in) {
- pa_simple_free(s_in);
- }
-
- if (s_out) {
- pa_simple_free(s_out);
- }
-}
-
-bool A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::exitThreadMain() {
- sync_primitives::AutoLock auto_lock(should_be_stopped_lock_);
- should_be_stopped_ = true;
- return true;
-}
-
-void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
- LOG4CXX_INFO(logger_, "Main thread of A2DPSourcePlayerThread.");
-
- {
- sync_primitives::AutoLock auto_lock(should_be_stopped_lock_);
- should_be_stopped_ = false;
- }
-
- int32_t error;
-
- const char* a2dpSource = device_.c_str();
-
- LOG4CXX_DEBUG(logger_, device_);
-
- LOG4CXX_DEBUG(logger_, "Creating streams");
-
- /* Create a new playback stream */
- if (!(s_out = pa_simple_new(NULL, "AudioManager", PA_STREAM_PLAYBACK, NULL,
- "playback", &sSampleFormat_, NULL, NULL, &error))) {
- LOG4CXX_ERROR(logger_, "pa_simple_new() failed: " << pa_strerror(error));
- freeStreams();
- return;
- }
-
- if (!(s_in = pa_simple_new(NULL, "AudioManager", PA_STREAM_RECORD, a2dpSource,
- "record", &sSampleFormat_, NULL, NULL, &error))) {
- LOG4CXX_ERROR(logger_, "pa_simple_new() failed: " << pa_strerror(error));
- freeStreams();
- return;
- }
-
- LOG4CXX_DEBUG(logger_, "Entering main loop");
-
- for (;;) {
- uint8_t buf[BUFSIZE_];
- ssize_t r;
-
- pa_usec_t latency;
-
- if ((latency = pa_simple_get_latency(s_in, &error)) == (pa_usec_t) - 1) {
- LOG4CXX_ERROR(logger_, "pa_simple_get_latency() failed: "
- << pa_strerror(error));
- break;
- }
-
- // LOG4CXX_INFO(logger_, "In: " << static_cast<float>(latency));
-
- if ((latency = pa_simple_get_latency(s_out, &error)) == (pa_usec_t) - 1) {
- LOG4CXX_ERROR(logger_, "pa_simple_get_latency() failed: "
- << pa_strerror(error));
- break;
- }
-
- // LOG4CXX_INFO(logger_, "Out: " << static_cast<float>(latency));
-
- if (pa_simple_read(s_in, buf, sizeof(buf), &error) < 0) {
- LOG4CXX_ERROR(logger_, "read() failed: " << strerror(error));
- break;
- }
-
- /* ... and play it */
- if (pa_simple_write(s_out, buf, sizeof(buf), &error) < 0) {
- LOG4CXX_ERROR(logger_, "pa_simple_write() failed: "
- << pa_strerror(error));
- break;
- }
-
- bool should_be_stopped;
- {
- sync_primitives::AutoLock auto_lock(should_be_stopped_lock_);
- should_be_stopped = should_be_stopped_;
- }
-
- if (should_be_stopped) {
- break;
- }
- }
-
- /* Make sure that every single sample was played */
- if (pa_simple_drain(s_out, &error) < 0) {
- LOG4CXX_ERROR(logger_, "pa_simple_drain() failed: " << pa_strerror(error));
- freeStreams();
- return;
- }
-
- freeStreams();
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/audio/audio_stream_sender_thread.cc b/SDL_Core/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
deleted file mode 100644
index 14b03336f..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-//
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-
-
-#if defined(OS_POSIX) && defined(OS_LINUX)
-#include <pthread.h> // TODO(DK): Need to remove
-#include <unistd.h>
-#endif
-
-
-#include <string>
-#include <unistd.h>
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/mobile_command_factory.h"
-#include "application_manager/application_impl.h"
-#include "smart_objects/smart_object.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/file_system.h"
-
-#include "media_manager/audio/audio_stream_sender_thread.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/message.h"
-
-namespace media_manager {
-using sync_primitives::AutoLock;
-
-const int32_t AudioStreamSenderThread::kAudioPassThruTimeout = 1;
-log4cxx::LoggerPtr AudioStreamSenderThread::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("AudioPassThruThread"));
-
-AudioStreamSenderThread::AudioStreamSenderThread(
- const std::string fileName, uint32_t session_key)
- : session_key_(session_key),
- shouldBeStoped_(false),
- fileName_(fileName) {
- LOG4CXX_TRACE_ENTER(logger_);
-}
-
-AudioStreamSenderThread::~AudioStreamSenderThread() {
-}
-
-void AudioStreamSenderThread::threadMain() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- offset_ = 0;
-
- setShouldBeStopped(false);
-
- while (true) {
- if (getShouldBeStopped()) {
- break;
- }
-
- sendAudioChunkToMobile();
-
- if (getShouldBeStopped()) {
- break;
- }
- }
-}
-
-void AudioStreamSenderThread::sendAudioChunkToMobile() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- std::vector<uint8_t> binaryData;
- std::vector<uint8_t>::iterator from;
- std::vector<uint8_t>::iterator to;
-
- usleep(kAudioPassThruTimeout * 1000000);
-
- if (!file_system::ReadBinaryFile(fileName_, binaryData)) {
- LOG4CXX_ERROR_EXT(logger_, "Unable to read file." << fileName_);
-
- return;
- }
-
- if (binaryData.empty()) {
- LOG4CXX_ERROR_EXT(logger_, "Binary data is empty.");
- return;
- }
-
- LOG4CXX_INFO_EXT(logger_, "offset = " << offset_);
-
- from = binaryData.begin() + offset_;
- to = binaryData.end();
-
- if (from < binaryData.end() /*from != binaryData.end()*/) {
- LOG4CXX_INFO_EXT(logger_, "from != binaryData.end()");
-
- offset_ = offset_ + to - from;
-
- application_manager::ApplicationManagerImpl::instance()->
- SendAudioPassThroughNotification(session_key_,
- std::vector<uint8_t>(from, to));
- binaryData.clear();
- }
-#if !defined(EXTENDED_MEDIA)
- // without recording stream restart reading 1-sec file
- offset_ = 0;
-#endif
-}
-
-bool AudioStreamSenderThread::getShouldBeStopped() {
- AutoLock auto_lock(shouldBeStoped_lock_);
- return shouldBeStoped_;
-}
-
-void AudioStreamSenderThread::setShouldBeStopped(bool should_stop) {
- AutoLock auto_lock(shouldBeStoped_lock_);
- shouldBeStoped_ = should_stop;
-}
-
-bool AudioStreamSenderThread::exitThreadMain() {
- LOG4CXX_INFO(logger_, "AudioStreamSenderThread::exitThreadMain");
- setShouldBeStopped(true);
- return true;
-}
-
-uint32_t AudioStreamSenderThread::session_key() const {
- return session_key_;
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc b/SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
deleted file mode 100644
index 94fec1887..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <string>
-#include "utils/threads/thread.h"
-#include "media_manager/audio/from_mic_to_file_recorder_thread.h"
-#include "media_manager/audio/from_mic_recorder_adapter.h"
-
-namespace media_manager {
-
-log4cxx::LoggerPtr FromMicRecorderAdapter::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("FromMicRecorderAdapter"));
-
-FromMicRecorderAdapter::FromMicRecorderAdapter()
- : recorder_thread_(NULL)
- , output_file_("default_recorded_audio.wav")
- , kDefaultDuration(1000)
- , duration_(0) {
- duration_ = kDefaultDuration;
-}
-
-FromMicRecorderAdapter::~FromMicRecorderAdapter() {
- LOG4CXX_INFO(logger_, "FromMicRecorderAdapter::~FromMicRecorderAdapter()");
- StopActivity(current_application_);
-}
-
-void FromMicRecorderAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(logger_, "FromMicRecorderAdapter::StartActivity "
- << application_key);
- if (application_key == current_application_) {
- LOG4CXX_WARN(logger_, "Running recording from mic for "
- << current_application_);
- return;
- }
- if (!recorder_thread_) {
- FromMicToFileRecorderThread* thread_delegate =
- new FromMicToFileRecorderThread(
- output_file_, duration_);
- recorder_thread_ = new threads::Thread("MicrophoneRecorder",
- thread_delegate);
- }
- if (NULL != recorder_thread_) {
- recorder_thread_->start();
- current_application_ = application_key;
- }
-}
-
-void FromMicRecorderAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger_, "FromMicRecorderAdapter::StopActivity "
- << application_key);
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger_, "Running activity on other app key "
- << current_application_);
- return;
- }
-
- if (NULL != recorder_thread_) {
- recorder_thread_->stop();
- delete recorder_thread_;
- recorder_thread_ = NULL;
- }
- current_application_ = 0;
-}
-
-bool FromMicRecorderAdapter::is_app_performing_activity(int32_t
- application_key) {
- return (application_key == current_application_);
-}
-
-void FromMicRecorderAdapter::set_output_file(const std::string& output_file) {
- output_file_ = output_file;
-}
-
-void FromMicRecorderAdapter::set_duration(int32_t duration) {
- duration_ = duration;
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_listener.cc b/SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
deleted file mode 100644
index a64e47661..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/threads/thread.h"
-#include "media_manager/audio/from_mic_recorder_listener.h"
-#include "media_manager/audio/audio_stream_sender_thread.h"
-
-namespace media_manager {
-
-log4cxx::LoggerPtr FromMicRecorderListener::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("FromMicRecorderListener"));
-
-FromMicRecorderListener::FromMicRecorderListener(
- const std::string& file_name)
- : reader_(NULL)
- , file_name_(file_name) {
-}
-
-FromMicRecorderListener::~FromMicRecorderListener() {
- if (reader_) {
- reader_->stop();
- delete reader_;
- reader_ = NULL;
- }
-}
-
-void FromMicRecorderListener::OnDataReceived(
- int32_t application_key,
- const DataForListener& data) {
-}
-
-void FromMicRecorderListener::OnErrorReceived(
- int32_t application_key,
- const DataForListener& data) {
-}
-
-void FromMicRecorderListener::OnActivityStarted(int32_t application_key) {
- LOG4CXX_INFO(logger_, "FromMicRecorderListener::OnActivityStarted "
- << application_key);
- if (application_key == current_application_) {
- return;
- }
- if (!reader_) {
- AudioStreamSenderThread* thread_delegate =
- new AudioStreamSenderThread(file_name_, application_key);
- reader_ = new threads::Thread("FromMicRecorderSender", thread_delegate);
- }
- if (reader_) {
- reader_->start();
- current_application_ = application_key;
- }
-}
-
-void FromMicRecorderListener::OnActivityEnded(int32_t application_key) {
- LOG4CXX_INFO(logger_, "FromMicRecorderListener::OnActivityEnded "
- << application_key);
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger_, "Not performing activity on " << application_key
- << " but on " << current_application_);
- return;
- }
- if (reader_) {
- reader_->stop();
- delete reader_;
- reader_ = NULL;
- }
- current_application_ = 0;
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc b/SDL_Core/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
deleted file mode 100644
index 1763957dd..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <unistd.h>
-
-#include "media_manager/audio/from_mic_to_file_recorder_thread.h"
-
-namespace media_manager {
-
-log4cxx::LoggerPtr FromMicToFileRecorderThread::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("FromMicToFileRecorderThread"));
-
-GMainLoop* FromMicToFileRecorderThread::loop = NULL;
-
-FromMicToFileRecorderThread::FromMicToFileRecorderThread(
- const std::string& output_file, int32_t duration)
- : threads::ThreadDelegate(),
- argc_(5),
- oKey_("-o"),
- tKey_("-t"),
- sleepThread_(NULL),
- outputFileName_(output_file) {
- LOG4CXX_TRACE_ENTER(logger_);
- set_record_duration(duration);
-}
-
-void FromMicToFileRecorderThread::set_output_file(
- const std::string& output_file) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- outputFileName_ = output_file;
-}
-
-void FromMicToFileRecorderThread::set_record_duration(int32_t duration) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- std::stringstream stringStream;
- stringStream << duration / 1000;
- durationString_ = stringStream.str();
-}
-
-void FromMicToFileRecorderThread::initArgs() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- argv_ = new gchar*[argc_];
-
- argv_[0] = new gchar[14];
- argv_[1] = new gchar[3];
- argv_[2] = new gchar[outputFileName_.length() + 1];
- argv_[3] = new gchar[3];
- argv_[4] = new gchar[durationString_.length() + 1];
-
- argv_[0] = const_cast<gchar*>(std::string("AudioManager").c_str());
- argv_[1] = const_cast<gchar*>(oKey_.c_str());
- argv_[2] = const_cast<gchar*>(outputFileName_.c_str());
- argv_[3] = const_cast<gchar*>(tKey_.c_str());
- argv_[4] = const_cast<gchar*>(durationString_.c_str());
-}
-
-void FromMicToFileRecorderThread::threadMain() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- sync_primitives::AutoLock auto_lock(stopFlagLock_);
- shouldBeStoped_ = false;
- }
-
- initArgs();
-
- GstElement* pipeline;
- GstElement* alsasrc, *panorama, *wavenc, *filesink;
- GstBus* bus;
-
- const gchar* device = "hw:0,0";
- gchar* outfile = NULL;
- gint duration = -1;
- GOptionContext* context = NULL;
- GError* err = NULL;
- GOptionEntry entries[] = { {
- "device", 'd', 0, G_OPTION_ARG_FILENAME, &device,
- "device file (Default: hw:0,0)", "SRC"
- }, {
- "output", 'o', 0, G_OPTION_ARG_FILENAME, &outfile,
- "save output of the stream to DEST", "DEST"
- }, {
- "duration", 't', 0, G_OPTION_ARG_INT, &duration,
- "length of time in seconds to capture", "int32_t"
- }, {
- NULL
- }
- };
-
- pthread_t wait;
- int32_t retcode;
-
- if (!g_thread_supported()) {
- g_thread_init(NULL);
- }
-
- // Parse the arguments
- context = g_option_context_new("-- M-AUDIO RAW");
- g_option_context_add_main_entries(context, entries, NULL);
- g_option_context_add_group(context, gst_init_get_option_group());
- if (!g_option_context_parse(context, &argc_, &argv_, &err)) {
- g_error("%s\n", err->message);
- }
-
- // Check for proper arguments
- if (outfile == NULL) {
- g_error("Must supply destination (-d FILE)\n");
- }
-
- LOG4CXX_TRACE(logger_, "Reading from device: " << device);
- LOG4CXX_TRACE(logger_, "Saving pipeline output to: " << outfile);
- LOG4CXX_TRACE(logger_, "Duration set to: " << duration);
-
- // Initialize gstreamer and setup the main loop information
- gst_init(&argc_, &argv_);
-
- pipeline = gst_pipeline_new("vga2usb-h264");
-
- // Set up error handling
- bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
- gst_bus_add_watch(bus,
- reinterpret_cast<int32_t (*)(_GstBus*, _GstMessage*, void*)>
- (recvmsg),
- NULL);
- gst_object_unref(bus);
-
- // Create all of the elements to be added to the pipeline
- alsasrc = gst_element_factory_make("alsasrc", "alsasrc0");
- panorama = gst_element_factory_make("audiopanorama", "panorama0");
- wavenc = gst_element_factory_make("wavenc", "wavenc0");
- filesink = gst_element_factory_make("filesink", "filesink0");
-
- // Assert that all the elements were created
- if (!alsasrc || !panorama || !wavenc || !filesink) {
- g_error("Failed creating one or more of the pipeline elements.\n");
- }
-
- // Set input and output destinations
- g_object_set(G_OBJECT(alsasrc), "device", device, NULL);
- g_object_set(G_OBJECT(panorama), "panorama", 0.5, NULL);
- g_object_set(G_OBJECT(filesink), "location", outfile, NULL);
-
- // Add the elements to the pipeline
- gst_bin_add_many(GST_BIN(pipeline), alsasrc,
- panorama, wavenc, filesink, NULL);
-
- // Link the elements
- gst_element_link_many(alsasrc, panorama, wavenc, filesink, NULL);
-
- gst_element_set_state(pipeline, GST_STATE_PLAYING);
-
- LOG4CXX_TRACE(logger_, "Initializing pipeline ...");
- while (GST_STATE(pipeline) != GST_STATE_PLAYING) {
- LOG4CXX_TRACE(logger_, "GST_STATE(pipeline) != GST_STATE_PLAYING");
-
- bool shouldBeStoped;
- {
- sync_primitives::AutoLock auto_lock(stopFlagLock_);
- shouldBeStoped = shouldBeStoped_;
- }
-
- if (shouldBeStoped) {
- return;
- }
- }
-
- LOG4CXX_TRACE(logger_, "Pipeline started ...\n");
-
- // Start up a timer for the pipeline
- if (duration > 0) {
- GstTimeout timeout;
- timeout.pipeline = pipeline;
- timeout.duration = duration;
-
- sleepThread_ = new threads::Thread("SleepThread"
- , new SleepThreadDelegate(timeout));
-
- if (NULL != sleepThread_) {
- sleepThread_->start();
- }
- }
-
- loop = g_main_loop_new(NULL, FALSE);
-
- g_main_loop_run(loop);
-
- gst_element_set_state(pipeline, GST_STATE_NULL);
-
- LOG4CXX_TRACE(logger_, "Deleting pipeline\n");
- gst_object_unref(GST_OBJECT(pipeline));
- g_main_loop_unref(loop);
-
- loop = NULL;
-}
-
-FromMicToFileRecorderThread::SleepThreadDelegate::SleepThreadDelegate(GstTimeout
- timeout)
- : threads::ThreadDelegate(),
- timeout_(timeout) {
-}
-
-void FromMicToFileRecorderThread::SleepThreadDelegate::threadMain() {
- LOG4CXX_TRACE(logger_, "Sleep for " << timeout_.duration << " seconds");
-
- sleep(timeout_.duration);
-
- if (NULL != loop) {
- if (g_main_loop_is_running(loop)) {
- gst_element_send_event(timeout_.pipeline, gst_event_new_eos());
- }
- }
-}
-
-bool FromMicToFileRecorderThread::exitThreadMain() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- if (NULL != loop) {
- if (g_main_loop_is_running(loop)) {
- LOG4CXX_TRACE(logger_, "Quit loop\n");
- g_main_loop_quit(loop);
- }
- }
-
- if (NULL != sleepThread_) {
- LOG4CXX_TRACE(logger_, "Stop sleep thread\n");
- sleepThread_->stop();
- delete sleepThread_;
- sleepThread_ = NULL;
- }
-
- LOG4CXX_TRACE(logger_, "Set should be stopped flag\n");
- {
- sync_primitives::AutoLock auto_lock(stopFlagLock_);
- shouldBeStoped_ = true;
- }
-
- return true;
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc b/SDL_Core/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc
deleted file mode 100644
index 80b699cb7..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/pipe_audio_streamer_adapter.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "media_manager/audio/pipe_audio_streamer_adapter.h"
-#include "config_profile/profile.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("PipeAudioStreamerAdapter"));
-}
-
-PipeAudioStreamerAdapter::PipeAudioStreamerAdapter() {
- LOG4CXX_INFO(logger, "PipeAudioStreamerAdapter::PipeAudioStreamerAdapter");
- named_pipe_path_ = profile::Profile::instance()->named_audio_pipe_path();
-
- Init();
-}
-
-PipeAudioStreamerAdapter::~PipeAudioStreamerAdapter() {
- LOG4CXX_INFO(logger, "PipeAudioStreamerAdapter::~PipeAudioStreamerAdapter");
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc b/SDL_Core/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc
deleted file mode 100644
index 0f6218e67..000000000
--- a/SDL_Core/src/components/media_manager/src/audio/socket_audio_streamer_adapter.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config_profile/profile.h"
-#include "media_manager/audio/socket_audio_streamer_adapter.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("SocketAudioStreamerAdapter"));
-}
-
-
-SocketAudioStreamerAdapter::SocketAudioStreamerAdapter() {
- LOG4CXX_INFO(logger, "SocketAudioStreamerAdapter::SocketAudioStreamerAdapter");
- port_ = profile::Profile::instance()->audio_streaming_port();
- ip_ = profile::Profile::instance()->server_address();
-
- Init();
-}
-
-SocketAudioStreamerAdapter::~SocketAudioStreamerAdapter() {
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/media_adapter_impl.cc b/SDL_Core/src/components/media_manager/src/media_adapter_impl.cc
deleted file mode 100644
index 24e25a635..000000000
--- a/SDL_Core/src/components/media_manager/src/media_adapter_impl.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "media_manager/media_adapter_impl.h"
-
-namespace media_manager {
-
-log4cxx::LoggerPtr MediaAdapterImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("MediaAdapterImpl"));
-
-MediaAdapterImpl::MediaAdapterImpl()
- : current_application_(0) {
-}
-
-MediaAdapterImpl::~MediaAdapterImpl() {
- media_listeners_.clear();
-}
-
-void MediaAdapterImpl::AddListener(const MediaListenerPtr& listener) {
- LOG4CXX_INFO(logger_, "MediaAdapterImpl::AddListener");
- media_listeners_.insert(listener);
-}
-
-void MediaAdapterImpl::RemoveListener(const MediaListenerPtr& listener) {
- LOG4CXX_INFO(logger_, "MediaAdapterImpl::RemoveListener");
- media_listeners_.erase(listener);
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/media_manager_impl.cc b/SDL_Core/src/components/media_manager/src/media_manager_impl.cc
deleted file mode 100644
index e692d887e..000000000
--- a/SDL_Core/src/components/media_manager/src/media_manager_impl.cc
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config_profile/profile.h"
-#include "media_manager/media_manager_impl.h"
-#include "media_manager/audio/from_mic_recorder_listener.h"
-#include "media_manager/streamer_listener.h"
-#include "application_manager/message_helper.h"
-#include "application_manager/application.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
-#include "utils/file_system.h"
-#if defined(EXTENDED_MEDIA_MODE)
-#include "media_manager/audio/a2dp_source_player_adapter.h"
-#include "media_manager/audio/from_mic_recorder_adapter.h"
-#endif
-#include "media_manager/video/socket_video_streamer_adapter.h"
-#include "media_manager/audio/socket_audio_streamer_adapter.h"
-#include "media_manager/video/pipe_video_streamer_adapter.h"
-#include "media_manager/audio/pipe_audio_streamer_adapter.h"
-#include "media_manager/video/video_stream_to_file_adapter.h"
-
-
-namespace media_manager {
-
-log4cxx::LoggerPtr MediaManagerImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("MediaManagerImpl"));
-
-MediaManagerImpl::MediaManagerImpl()
- : protocol_handler_(NULL)
- , a2dp_player_(NULL)
- , from_mic_recorder_(NULL)
- , video_streamer_(NULL)
- , audio_streamer_(NULL)
- , video_stream_active_(false)
- , audio_stream_active_(false) {
- Init();
-}
-
-MediaManagerImpl::~MediaManagerImpl() {
- if (a2dp_player_) {
- delete a2dp_player_;
- a2dp_player_ = NULL;
- }
-
- if (from_mic_recorder_) {
- delete from_mic_recorder_;
- from_mic_recorder_ = NULL;
- }
-
- if (video_streamer_) {
- delete video_streamer_;
- video_streamer_ = NULL;
- }
-
- if (audio_streamer_) {
- delete audio_streamer_;
- audio_streamer_ = NULL;
- }
-}
-
-void MediaManagerImpl::SetProtocolHandler(
- protocol_handler::ProtocolHandler* protocol_handler) {
- protocol_handler_ = protocol_handler;
-}
-
-void MediaManagerImpl::Init() {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::Init()");
-
-#if defined(EXTENDED_MEDIA_MODE)
- LOG4CXX_INFO(logger_, "Called Init with default configuration.");
- a2dp_player_ = new A2DPSourcePlayerAdapter();
- from_mic_recorder_ = new FromMicRecorderAdapter();
-#endif
-
- if ("socket" == profile::Profile::instance()->video_server_type()) {
- video_streamer_ = new SocketVideoStreamerAdapter();
- } else if ("pipe" == profile::Profile::instance()->video_server_type()) {
- video_streamer_ = new PipeVideoStreamerAdapter();
- } else if ("file" == profile::Profile::instance()->video_server_type()) {
- video_streamer_ = new VideoStreamToFileAdapter(
- profile::Profile::instance()->video_stream_file());
- }
-
- if ("socket" == profile::Profile::instance()->audio_server_type()) {
- audio_streamer_ = new SocketAudioStreamerAdapter();
- } else if ("pipe" == profile::Profile::instance()->audio_server_type()) {
- audio_streamer_ = new PipeAudioStreamerAdapter();
- } else if ("file" == profile::Profile::instance()->audio_server_type()) {
- audio_streamer_ = new VideoStreamToFileAdapter(
- profile::Profile::instance()->audio_stream_file());
- }
-
- video_streamer_listener_ = new StreamerListener();
- audio_streamer_listener_ = new StreamerListener();
-
- if (NULL != video_streamer_) {
- video_streamer_->AddListener(video_streamer_listener_);
- }
-
- if (NULL != audio_streamer_) {
- audio_streamer_->AddListener(audio_streamer_listener_);
- }
-}
-
-void MediaManagerImpl::PlayA2DPSource(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::PlayA2DPSource");
- if (a2dp_player_) {
- a2dp_player_->StartActivity(application_key);
- }
-}
-
-void MediaManagerImpl::StopA2DPSource(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StopA2DPSource");
- if (a2dp_player_) {
- a2dp_player_->StopActivity(application_key);
- }
-}
-
-void MediaManagerImpl::StartMicrophoneRecording(
- int32_t application_key,
- const std::string& output_file,
- int32_t duration) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StartMicrophoneRecording to "
- << output_file);
- application_manager::ApplicationSharedPtr app =
- application_manager::ApplicationManagerImpl::instance()->
- application(application_key);
- std::string relative_file_path =
- file_system::CreateDirectory(app->name());
- relative_file_path += "/";
- relative_file_path += output_file;
- from_mic_listener_ = new FromMicRecorderListener(relative_file_path);
-#if defined(EXTENDED_MEDIA_MODE)
- if (from_mic_recorder_) {
- from_mic_recorder_->AddListener(from_mic_listener_);
- (static_cast<FromMicRecorderAdapter*>(from_mic_recorder_))
- ->set_output_file(relative_file_path);
- (static_cast<FromMicRecorderAdapter*>(from_mic_recorder_))
- ->set_duration(duration);
- from_mic_recorder_->StartActivity(application_key);
- }
-#else
- if (file_system::FileExists(relative_file_path)) {
- LOG4CXX_INFO(logger_, "File " << output_file << " exists, removing");
- if (file_system::DeleteFile(relative_file_path)) {
- LOG4CXX_INFO(logger_, "File " << output_file << " removed");
- }
- else {
- LOG4CXX_WARN(logger_, "Could not remove file " << output_file);
- }
- }
- const std::string predefined_rec_file = "audio.8bit.wav";
- std::vector<uint8_t> buf;
- if (file_system::ReadBinaryFile(predefined_rec_file, buf)) {
- if (file_system::Write(relative_file_path, buf)) {
- LOG4CXX_INFO(logger_,
- "File " << predefined_rec_file << " copied to " << output_file);
- }
- else {
- LOG4CXX_WARN(logger_, "Could not write to file " << output_file);
- }
- }
- else {
- LOG4CXX_WARN(logger_, "Could not read file " << predefined_rec_file);
- }
-#endif
- from_mic_listener_->OnActivityStarted(application_key);
-}
-
-void MediaManagerImpl::StopMicrophoneRecording(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StopMicrophoneRecording");
-#if defined(EXTENDED_MEDIA_MODE)
- if (from_mic_recorder_) {
- from_mic_recorder_->StopActivity(application_key);
- }
-#endif
- if (from_mic_listener_) {
- from_mic_listener_->OnActivityEnded(application_key);
- }
-}
-
-void MediaManagerImpl::StartVideoStreaming(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StartVideoStreaming");
-
- if (video_streamer_) {
- if (!video_stream_active_) {
- video_stream_active_ = true;
- video_streamer_->StartActivity(application_key);
-
- char url[100] = {'\0'};
-
-
- if ("socket" == profile::Profile::instance()->video_server_type()) {
- snprintf(url, sizeof(url) / sizeof(url[0]), "http://%s:%d",
- profile::Profile::instance()->server_address().c_str(),
- profile::Profile::instance()->video_streaming_port());
- } else if ("pipe" == profile::Profile::instance()->video_server_type()) {
- snprintf(url, sizeof(url) / sizeof(url[0]), "%s",
- profile::Profile::instance()->named_video_pipe_path().c_str());
- } else {
- DCHECK(snprintf(url, sizeof(url) / sizeof(url[0]), "%s", file_system::FullPath(
- profile::Profile::instance()->video_stream_file()).c_str()));
- }
- application_manager::MessageHelper::SendNaviStartStream(url,
- application_key);
- }
- }
-}
-
-void MediaManagerImpl::StopVideoStreaming(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StopVideoStreaming");
- if (video_streamer_) {
- video_stream_active_ = false;
- application_manager::MessageHelper::SendNaviStopStream(application_key);
- video_streamer_->StopActivity(application_key);
- }
-}
-
-void MediaManagerImpl::StartAudioStreaming(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StartAudioStreaming");
-
- if (audio_streamer_) {
- if (!audio_stream_active_) {
- audio_stream_active_ = true;
- audio_streamer_->StartActivity(application_key);
-
- char url[100] = {'\0'};
-
- if ("socket" == profile::Profile::instance()->audio_server_type()) {
- snprintf(url, sizeof(url) / sizeof(url[0]), "http://%s:%d",
- profile::Profile::instance()->server_address().c_str(),
- profile::Profile::instance()->audio_streaming_port());
- } else if ("pipe" == profile::Profile::instance()->audio_server_type()) {
- snprintf(url, sizeof(url) / sizeof(url[0]), "%s",
- profile::Profile::instance()->named_audio_pipe_path().c_str());
- } else {
- DCHECK(snprintf(url, sizeof(url) / sizeof(url[0]), "%s",
- file_system::FullPath(profile::Profile::instance()->
- audio_stream_file()).c_str()));
- }
-
- application_manager::MessageHelper::SendAudioStartStream(url,
- application_key);
- }
- }
-}
-
-void MediaManagerImpl::StopAudioStreaming(int32_t application_key) {
- LOG4CXX_INFO(logger_, "MediaManagerImpl::StopAudioStreaming");
- if (audio_streamer_) {
- audio_stream_active_ = false;
- application_manager::MessageHelper::SendAudioStopStream(application_key);
- audio_streamer_->StopActivity(application_key);
- }
-}
-
-
-void MediaManagerImpl::OnMessageReceived(
- const protocol_handler::RawMessagePtr& message) {
- if (message->service_type()
- == protocol_handler::kMobileNav) {
- if (!(application_manager::ApplicationManagerImpl::instance()->
- IsVideoStreamingAllowed(message->connection_key()))) {
- return;
- }
- if (video_streamer_) {
- video_streamer_->SendData(message->connection_key(), message);
- }
- } else if (message->service_type()
- == protocol_handler::kAudio) {
- if (!(application_manager::ApplicationManagerImpl::instance()->
- IsAudioStreamingAllowed(message->connection_key()))) {
- return;
- }
- if (audio_streamer_) {
- audio_streamer_->SendData(message->connection_key(), message);
- }
- }
-}
-
-void MediaManagerImpl::OnMobileMessageSent(
- const protocol_handler::RawMessagePtr& message) {
-}
-
-void MediaManagerImpl::FramesProcessed(int32_t application_key,
- int32_t frame_number) {
- if (protocol_handler_) {
- /*protocol_handler_->SendFramesNumber(application_key,
- frame_number);*/
- }
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/pipe_streamer_adapter.cc b/SDL_Core/src/components/media_manager/src/pipe_streamer_adapter.cc
deleted file mode 100644
index 5c24a240e..000000000
--- a/SDL_Core/src/components/media_manager/src/pipe_streamer_adapter.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include "utils/logger.h"
-#include "config_profile/profile.h"
-#include "media_manager/pipe_streamer_adapter.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("PipeStreamerAdapter"));
-}
-
-PipeStreamerAdapter::PipeStreamerAdapter()
- : is_ready_(false),
- messages_(),
- thread_(NULL){
- LOG4CXX_INFO(logger, "PipeStreamerAdapter::PipeStreamerAdapter");
-}
-
-PipeStreamerAdapter::~PipeStreamerAdapter() {
- LOG4CXX_INFO(logger, "PipeStreamerAdapter::~PipeStreamerAdapter");
-
- if ((0 != current_application_ ) && (is_ready_)) {
- StopActivity(current_application_);
- }
-
- thread_->stop();
- delete thread_;
-}
-
-void PipeStreamerAdapter::SendData(
- int32_t application_key,
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger, "PipeStreamerAdapter::SendData");
-
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Wrong application " << application_key);
- return;
- }
-
- if (is_ready_) {
- messages_.push(message);
- }
-}
-
-void PipeStreamerAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(logger, "PipeStreamerAdapter::StartActivity");
-
- if (application_key == current_application_) {
- LOG4CXX_WARN(logger, "Already started activity for " << application_key);
- return;
- }
-
- current_application_ = application_key;
- is_ready_ = true;
-
- for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
- media_listeners_.end() != it;
- ++it) {
- (*it)->OnActivityStarted(application_key);
- }
-
- LOG4CXX_TRACE(logger, "Pipe was opened for writing " << named_pipe_path_);
-}
-
-void PipeStreamerAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger, "PipeStreamerAdapter::StopActivity");
-
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Not performing activity for " << application_key);
- return;
- }
-
- is_ready_ = false;
- current_application_ = 0;
-
- for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
- media_listeners_.end() != it;
- ++it) {
- (*it)->OnActivityEnded(application_key);
- }
-}
-
-bool PipeStreamerAdapter::is_app_performing_activity(
- int32_t application_key) {
- return (application_key == current_application_);
-}
-
-void PipeStreamerAdapter::Init() {
- if (!thread_) {
- LOG4CXX_INFO(logger, "Create and start sending thread");
- thread_ = new threads::Thread("PipeStreamerAdapter", new Streamer(this));
- const size_t kStackSize = 16384;
- thread_->startWithOptions(threads::ThreadOptions(kStackSize));
- }
-}
-
-PipeStreamerAdapter::Streamer::Streamer(
- PipeStreamerAdapter* server)
- : server_(server),
- pipe_fd_(0),
- stop_flag_(false) {
-}
-
-PipeStreamerAdapter::Streamer::~Streamer() {
- server_ = NULL;
-}
-
-void PipeStreamerAdapter::Streamer::threadMain() {
- LOG4CXX_INFO(logger, "Streamer::threadMain");
-
- open();
-
- while (!stop_flag_) {
- while (!server_->messages_.empty()) {
- protocol_handler::RawMessagePtr msg = server_->messages_.pop();
- if (!msg) {
- LOG4CXX_ERROR(logger, "Null pointer message");
- continue;
- }
-
- ssize_t ret = write(pipe_fd_, msg.get()->data(),
- msg.get()->data_size());
-
- if (ret == -1) {
- LOG4CXX_ERROR(logger, "Failed writing data to pipe "
- << server_->named_pipe_path_);
-
- std::set<MediaListenerPtr>::iterator it =
- server_->media_listeners_.begin();
- for (;server_->media_listeners_.end() != it; ++it) {
- (*it)->OnErrorReceived(server_->current_application_, -1);
- }
- } else if (ret != msg.get()->data_size()) {
- LOG4CXX_WARN(logger, "Couldn't write all the data to pipe "
- << server_->named_pipe_path_);
- }
-
- static int32_t messsages_for_session = 0;
- ++messsages_for_session;
-
- LOG4CXX_INFO(logger, "Handling map streaming message. This is "
- << messsages_for_session << " the message for "
- << server_->current_application_);
- std::set<MediaListenerPtr>::iterator it =
- server_->media_listeners_.begin();
- for (; server_->media_listeners_.end() != it; ++it) {
- (*it)->OnDataReceived(server_->current_application_,
- messsages_for_session);
- }
- }
- server_->messages_.wait();
- }
- close();
-}
-
-bool PipeStreamerAdapter::Streamer::exitThreadMain() {
- LOG4CXX_INFO(logger, "Streamer::exitThreadMain");
- stop_flag_ = true;
- server_->messages_.Shutdown();
- return false;
-}
-
-void PipeStreamerAdapter::Streamer::open() {
-
- LOG4CXX_INFO(logger, "Streamer::open()" << server_->named_pipe_path_.c_str());
-
- if ((mkfifo(server_->named_pipe_path_.c_str(),
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0)
- && (errno != EEXIST)) {
- LOG4CXX_ERROR(logger, "Cannot create pipe " << server_->named_pipe_path_);
- return;
- }
-
- pipe_fd_ = ::open(server_->named_pipe_path_.c_str(), O_RDWR, 0);
- if (-1 == pipe_fd_) {
- LOG4CXX_ERROR(logger, "Cannot open pipe for writing "
- << server_->named_pipe_path_);
- return;
- }
-
- LOG4CXX_TRACE(logger, "Pipe " << server_->named_pipe_path_
- << " was successfully created");
-}
-
-void PipeStreamerAdapter::Streamer::close() {
- ::close(pipe_fd_);
- unlink(server_->named_pipe_path_.c_str());
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/socket_streamer_adapter.cc b/SDL_Core/src/components/media_manager/src/socket_streamer_adapter.cc
deleted file mode 100644
index 65e823de5..000000000
--- a/SDL_Core/src/components/media_manager/src/socket_streamer_adapter.cc
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <string.h>
-#include "config_profile/profile.h"
-#include "media_manager/video/socket_video_streamer_adapter.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("SocketStreamerAdapter"));
-}
-
-SocketStreamerAdapter::SocketStreamerAdapter()
- : socket_fd_(0),
- is_ready_(false),
- messages_(),
- thread_(NULL) {
-}
-
-SocketStreamerAdapter::~SocketStreamerAdapter() {
- thread_->stop();
- delete thread_;
- if (socket_fd_ != -1) {
- ::close(socket_fd_);
- }
-}
-
-void SocketStreamerAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(logger, "SocketStreamerAdapter::start");
-
- if (application_key == current_application_) {
- LOG4CXX_INFO(logger, "Already running for app " << application_key);
- return;
- }
-
- is_ready_ = true;
- current_application_ = application_key;
-
- for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
- media_listeners_.end() != it;
- ++it) {
- (*it)->OnActivityStarted(application_key);
- }
-}
-
-void SocketStreamerAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger, "SocketStreamerAdapter::stop");
-
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Streaming is not active for " << application_key);
- return;
- }
-
- is_ready_ = false;
- current_application_ = 0;
-
- for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
- media_listeners_.end() != it;
- ++it) {
- (*it)->OnActivityEnded(application_key);
- }
-}
-
-bool SocketStreamerAdapter::is_app_performing_activity(
- int32_t application_key) {
- return (application_key == current_application_);
-}
-
-void SocketStreamerAdapter::Init() {
- if (!thread_) {
- LOG4CXX_INFO(logger, "Create and start sending thread");
- thread_ = new threads::Thread("PipeStreamerAdapter", new Streamer(this));
- const size_t kStackSize = 16384;
- thread_->startWithOptions(threads::ThreadOptions(kStackSize));
- }
-}
-
-void SocketStreamerAdapter::SendData(
- int32_t application_key,
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger, "SocketStreamerAdapter::sendData");
-
-
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Currently working with other app "
- << current_application_);
- return;
- }
-
- if (is_ready_) {
- messages_.push(message);
- }
-}
-
-SocketStreamerAdapter::Streamer::Streamer(
- SocketStreamerAdapter* const server)
- : server_(server),
- new_socket_fd_(0),
- is_first_loop_(true),
- is_client_connected_(false),
- stop_flag_(false) {
-}
-
-SocketStreamerAdapter::Streamer::~Streamer() {
- stop();
-}
-
-void SocketStreamerAdapter::Streamer::threadMain() {
- LOG4CXX_INFO(logger, "Streamer::threadMain");
-
- start();
-
- while (!stop_flag_) {
- new_socket_fd_ = accept(server_->socket_fd_, NULL, NULL);
-
- if (0 > new_socket_fd_) {
- LOG4CXX_ERROR(logger, "Socket is closed");
- sleep(1);
- continue;
- }
-
- is_client_connected_ = true;
- while (is_client_connected_) {
- while (!server_->messages_.empty()) {
- protocol_handler::RawMessagePtr msg = server_->messages_.pop();
- if (!msg) {
- LOG4CXX_ERROR(logger, "Null pointer message");
- continue;
- }
-
- is_client_connected_ = send(msg);
- static int32_t messsages_for_session = 0;
- ++messsages_for_session;
-
- LOG4CXX_INFO(logger, "Handling map streaming message. This is "
- << messsages_for_session << " the message for "
- << server_->current_application_);
- std::set<MediaListenerPtr>::iterator it =
- server_->media_listeners_.begin();
- for (; server_->media_listeners_.end() != it; ++it) {
- (*it)->OnDataReceived(server_->current_application_,
- messsages_for_session);
- }
- }
- server_->messages_.wait();
- is_client_connected_ = is_ready();
- }
-
- stop();
- }
-}
-
-bool SocketStreamerAdapter::Streamer::exitThreadMain() {
- LOG4CXX_INFO(logger, "Streamer::exitThreadMain");
- stop_flag_ = true;
- stop();
- server_->messages_.Shutdown();
- return false;
-}
-
-void SocketStreamerAdapter::Streamer::start() {
- server_->socket_fd_ = socket(AF_INET, SOCK_STREAM, 0);
-
- if (0 >= server_->socket_fd_) {
- LOG4CXX_ERROR_EXT(logger, "Server open error");
- return;
- }
-
- int32_t optval = 1;
- if (-1 == setsockopt(server_->socket_fd_, SOL_SOCKET, SO_REUSEADDR,
- &optval, sizeof optval)) {
- LOG4CXX_ERROR_EXT(logger, "Unable to set sockopt");
- return;
- }
-
- struct sockaddr_in serv_addr_;
- memset(&serv_addr_, 0, sizeof(serv_addr_));
- serv_addr_.sin_addr.s_addr = inet_addr(server_->ip_.c_str());
- serv_addr_.sin_family = AF_INET;
- serv_addr_.sin_port = htons(server_->port_);
-
- if (-1 == bind(server_->socket_fd_,
- reinterpret_cast<struct sockaddr*>(&serv_addr_),
- sizeof(serv_addr_))) {
- LOG4CXX_ERROR_EXT(logger, "Unable to bind");
- return;
- }
-
- LOG4CXX_INFO(logger, "SocketStreamerAdapter::listen for connections");
- if (-1 == listen(server_->socket_fd_, 5)) {
- LOG4CXX_ERROR_EXT(logger, "Unable to listen");
- return;
- }
-}
-
-void SocketStreamerAdapter::Streamer::stop() {
- is_client_connected_ = false;
- if (!new_socket_fd_) {
- return;
- }
-
- if (-1 == shutdown(new_socket_fd_, SHUT_RDWR)) {
- LOG4CXX_ERROR(logger, "Unable to shutdown socket");
- return;
- }
-
- if (-1 == ::close(new_socket_fd_)) {
- LOG4CXX_ERROR(logger, "Unable to close socket");
- return;
- }
-
- new_socket_fd_ = -1;
-}
-
-bool SocketStreamerAdapter::Streamer::is_ready() const {
- bool result = true;
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(new_socket_fd_, &fds);
- struct timeval tv;
- tv.tv_sec = 5; // set a 5 second timeout
- tv.tv_usec = 0;
-
- int32_t retval = 0;
- retval = select(new_socket_fd_ + 1, 0, &fds, 0, &tv);
-
- if (-1 == retval) {
- LOG4CXX_ERROR_EXT(logger, "An error occurred");
- result = false;
- } else if (0 == retval) {
- LOG4CXX_ERROR_EXT(logger, "The timeout expired");
- result = false;
- }
-
- return result;
-}
-
-bool SocketStreamerAdapter::Streamer::send(
- const protocol_handler::RawMessagePtr& msg) {
- if (!is_ready()) {
- LOG4CXX_ERROR_EXT(logger, " Socket is not ready");
- return false;
- }
-
- if (is_first_loop_) {
- is_first_loop_ = false;
- char hdr[] = {"HTTP/1.1 200 OK\r\n "
- "Connection: Keep-Alive\r\n"
- "Keep-Alive: timeout=15, max=300\r\n"
- "Server: SDL\r\n"
- "Content-Type: video/mp4\r\n\r\n"
- };
-#ifdef OS_MACOSX
- if (-1 == ::send(new_socket_fd_, hdr, strlen(hdr), SO_NOSIGPIPE)) {
-#else
- if (-1 == ::send(new_socket_fd_, hdr, strlen(hdr), MSG_NOSIGNAL)) {
-#endif
- LOG4CXX_ERROR_EXT(logger, " Unable to send");
- return false;
- }
- }
-#ifdef OS_MACOSX
- if (-1 == ::send(new_socket_fd_, (*msg).data(),
- (*msg).data_size(), SO_NOSIGPIPE)) {
-#else
- if (-1 == ::send(new_socket_fd_, (*msg).data(),
- (*msg).data_size(), MSG_NOSIGNAL)) {
-#endif
- LOG4CXX_ERROR_EXT(logger, " Unable to send");
- return false;
- }
-
- LOG4CXX_INFO(logger, "Streamer::sent " << (*msg).data_size());
- return true;
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/streamer_listener.cc b/SDL_Core/src/components/media_manager/src/streamer_listener.cc
deleted file mode 100644
index 656476bee..000000000
--- a/SDL_Core/src/components/media_manager/src/streamer_listener.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- Copyright (c) 2013, Ford Motor Company
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following
- disclaimer in the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Ford Motor Company nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "media_manager/streamer_listener.h"
-#include "media_manager/media_manager_impl.h"
-
-namespace media_manager {
-
-log4cxx::LoggerPtr StreamerListener::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("StreamerListener"));
-
-StreamerListener::StreamerListener()
- : current_application_(0) {
-}
-
-StreamerListener::~StreamerListener() {
- OnActivityEnded(current_application_);
-}
-
-void StreamerListener::OnDataReceived(
- int32_t application_key,
- const DataForListener& data) {
- MediaManagerImpl::instance()->FramesProcessed(application_key, data);
-}
-
-void StreamerListener::OnErrorReceived(
- int32_t application_key,
- const DataForListener& data) {
- LOG4CXX_ERROR(logger_, "StreamerListener::OnErrorReceived");
-}
-
-void StreamerListener::OnActivityStarted(int32_t application_key) {
- LOG4CXX_INFO(logger_, "StreamerListener::OnActivityStarted");
- if (current_application_ == application_key) {
- LOG4CXX_WARN(logger_, "Already performing activity for "
- << application_key);
- return;
- }
- current_application_ = application_key;
-}
-
-void StreamerListener::OnActivityEnded(int32_t application_key) {
- LOG4CXX_INFO(logger_, "StreamerListener::OnActivityEnded");
- if (current_application_ != application_key) {
- LOG4CXX_WARN(logger_, "Already not performing activity for "
- << application_key);
- return;
- }
- current_application_ = 0;
-}
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc b/SDL_Core/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc
deleted file mode 100644
index 9444ddfeb..000000000
--- a/SDL_Core/src/components/media_manager/src/video/pipe_video_streamer_adapter.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "media_manager/video/pipe_video_streamer_adapter.h"
-#include "config_profile/profile.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("PipeVideoStreamerAdapter"));
-}
-
-PipeVideoStreamerAdapter::PipeVideoStreamerAdapter() {
- LOG4CXX_INFO(logger, "PipeVideoStreamerAdapter::PipeVideoStreamerAdapter");
- named_pipe_path_ = profile::Profile::instance()->named_video_pipe_path();
-
- Init();
-}
-
-PipeVideoStreamerAdapter::~PipeVideoStreamerAdapter() {
- LOG4CXX_INFO(logger, "PipeVideoStreamerAdapter::~PipeVideoStreamerAdapter");
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/video/socket_video_streamer_adapter.cc b/SDL_Core/src/components/media_manager/src/video/socket_video_streamer_adapter.cc
deleted file mode 100644
index 72463b3e1..000000000
--- a/SDL_Core/src/components/media_manager/src/video/socket_video_streamer_adapter.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config_profile/profile.h"
-#include "media_manager/video/socket_video_streamer_adapter.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("SocketVideoStreamerAdapter"));
-}
-
-SocketVideoStreamerAdapter::SocketVideoStreamerAdapter() {
- LOG4CXX_INFO(logger, "SocketVideoStreamerAdapter::SocketVideoStreamerAdapter");
- port_ = profile::Profile::instance()->video_streaming_port();
- ip_ = profile::Profile::instance()->server_address();
-
- Init();
-}
-
-SocketVideoStreamerAdapter::~SocketVideoStreamerAdapter() {
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/media_manager/src/video/video_stream_to_file_adapter.cc b/SDL_Core/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
deleted file mode 100644
index 6d063eb44..000000000
--- a/SDL_Core/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "media_manager/video/video_stream_to_file_adapter.h"
-#include "utils/file_system.h"
-
-namespace media_manager {
-
-namespace {
-log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("VideoStreamToFileAdapter"));
-}
-
-VideoStreamToFileAdapter::VideoStreamToFileAdapter(const std::string& file_name)
- : file_name_(file_name),
- is_ready_(false),
- thread_(NULL) {
- Init();
-}
-
-VideoStreamToFileAdapter::~VideoStreamToFileAdapter() {
- if ((0 != current_application_ ) && (is_ready_)) {
- StopActivity(current_application_);
- }
-
- thread_->stop();
- delete thread_;
-}
-
-void VideoStreamToFileAdapter::Init() {
- if (!thread_) {
- LOG4CXX_INFO(logger, "Create and start sending thread");
- thread_ = new threads::Thread("VideoStreamToFileAdapter",
- new Streamer(this));
- const size_t kStackSize = 16384;
- thread_->startWithOptions(threads::ThreadOptions(kStackSize));
- }
-}
-
-void VideoStreamToFileAdapter::SendData(
- int32_t application_key,
- const protocol_handler::RawMessagePtr& message) {
- LOG4CXX_INFO(logger, "VideoStreamToFileAdapter::SendData "
- << application_key);
-
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Wrong application " << application_key);
- return;
- }
-
- if (is_ready_) {
- messages_.push(message);
- }
-}
-
-void VideoStreamToFileAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(logger, "VideoStreamToFileAdapter::StartActivity "
- << application_key);
- if (application_key == current_application_) {
- LOG4CXX_WARN(logger, "Already running video stream to file for "
- << application_key);
- return;
- }
-
- current_application_ = application_key;
- is_ready_ = true;
-
- for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
- media_listeners_.end() != it;
- ++it) {
- (*it)->OnActivityStarted(application_key);
- }
-}
-
-void VideoStreamToFileAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger, "VideoStreamToFileAdapter::StopActivity "
- << application_key);
- if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Performing activity for another key "
- << current_application_);
- return;
- }
-
- is_ready_ = false;
- current_application_ = 0;
-
- for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
- media_listeners_.end() != it;
- ++it) {
- (*it)->OnActivityEnded(application_key);
- }
-}
-
-bool VideoStreamToFileAdapter::is_app_performing_activity(int32_t
- application_key) {
- return (application_key == current_application_ && is_ready_);
-}
-
-VideoStreamToFileAdapter::Streamer::Streamer(
- VideoStreamToFileAdapter* server)
- : server_(server),
- stop_flag_(false),
- file_stream_(NULL) {
-}
-
-VideoStreamToFileAdapter::Streamer::~Streamer() {
- server_ = NULL;
- file_stream_ = NULL;
-}
-
-void VideoStreamToFileAdapter::Streamer::threadMain() {
- LOG4CXX_INFO(logger, "Streamer::threadMain");
-
- open();
-
- while (!stop_flag_) {
- while (!server_->messages_.empty()) {
- protocol_handler::RawMessagePtr msg = server_->messages_.pop();
- if (!msg) {
- LOG4CXX_ERROR(logger, "Null pointer message");
- continue;
- }
-
- if (file_stream_) {
- file_system::Write(file_stream_, msg->data(), msg->data_size());
-
- static int32_t messsages_for_session = 0;
- ++messsages_for_session;
- std::set<MediaListenerPtr>::iterator it =
- server_->media_listeners_.begin();
- for (; server_->media_listeners_.end() != it; ++it) {
- (*it)->OnDataReceived(server_->current_application_,
- messsages_for_session);
- }
- } else {
- LOG4CXX_WARN(logger, "Can't open File stream! " << server_->file_name_);
- }
- }
- server_->messages_.wait();
- }
-
- close();
-}
-
-bool VideoStreamToFileAdapter::Streamer::exitThreadMain() {
- LOG4CXX_INFO(logger, "Streamer::exitThreadMain");
- stop_flag_ = true;
- server_->messages_.Shutdown();
- return false;
-}
-
-void VideoStreamToFileAdapter::Streamer::open() {
- LOG4CXX_INFO(logger, "Streamer::open()" << server_->file_name_.c_str());
-
- file_stream_ = file_system::Open(server_->file_name_);
- if (!file_stream_) {
- LOG4CXX_WARN(logger, "Can't open file stream! " << server_->file_name_);
- } else {
- LOG4CXX_INFO(logger, "file_stream_ opened :" << file_stream_);
- }
-}
-
-void VideoStreamToFileAdapter::Streamer::close() {
- if (file_stream_) {
- file_system::Close(file_stream_);
- delete file_stream_;
- file_stream_ = NULL;
- }
- file_system::DeleteFile(server_->file_name_);
-}
-
-} // namespace media_manager
diff --git a/SDL_Core/src/components/policies/CMakeLists.txt b/SDL_Core/src/components/policies/CMakeLists.txt
deleted file mode 100644
index 8e43b970a..000000000
--- a/SDL_Core/src/components/policies/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-include_directories (
- ./include
- ../application_manager/include/
- ../utils/include/
- ../smart_objects/include/
- ../formatters/include/
- ../../thirdPartyLibs/jsoncpp/include/
- ${CMAKE_BINARY_DIR}/src/components/
-)
-
-set (SOURCES
- ./src/policy_manager_impl.cc
- ./src/policy_configuration.cc
- ./src/policy_table.cc
- ./src/policy_table_schema.cc
- ./src/preloaded_pt_schema.cc
- ./src/permissions_calculator.cc
-)
-
-
-add_library("policies" ${SOURCES})
-target_link_libraries ("policies" formatters jsoncpp SmartObjects) \ No newline at end of file
diff --git a/SDL_Core/src/components/policies/include/policies/permissions_calculator.h b/SDL_Core/src/components/policies/include/policies/permissions_calculator.h
deleted file mode 100644
index c96ebaac4..000000000
--- a/SDL_Core/src/components/policies/include/policies/permissions_calculator.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * @file permissions_calculator.h
- * @brief Permissions calculator header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_PERMISSIONS_CALCULATOR_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_PERMISSIONS_CALCULATOR_H_
-
-#include <vector>
-#include <string>
-#include "policies/policy_manager.h"
-#include "interfaces/MOBILE_API.h"
-#include "utils/logger.h"
-
-namespace policies {
-
-class PermissionsCalculator {
- public:
- /**
- * @brief Calculate permissions for application.
- *
- * @param pt_object Policy Table as smart object
- * @param app_id Application identifier
- * @param rpc Remote procedure call
- * @param hmi_status HMI level status
- *
- * @return result of check permission
- */
- static PermissionResult CalcPermissions(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& pt_object,
- uint32_t app_id,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status);
-
- /**
- * @brief Get priority for app_id
- *
- * @param pt_object Policy Table as smart object
- * @param app_id Application Id
- *
- * @return priority for app_id
- */
- static Priority::eType GetPriority(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& pt_object,
- uint32_t app_id);
-
- private:
- /**
- * @brief Find all RPCs in groups listed under section functional_groupings
- *
- * @param pt_object Policy Table as smart object
- * @param rpc_groups Groups of RPCs
- * @param rpc Remote procedure call
- * @param hmi_status HMI level status
- *
- * @return Map of rpc to all possible HMI levels amongst all
- * functional groups where RPC is found.
- * Returned value must be freed by the caller.
- */
- static PermissionResult CalcPermissionsByGroups(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& pt_object,
- const std::vector<std::string>& rpc_groups,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status);
-
- /**
- * @brief Returns a smart object containing an <app_id> section of PolicyTable
- *
- * If app_id is not found in the "app_policies" the "default" section is
- * returned.
- * @param pt_object Policy Table as a SmartObject
- * @param app_id Application ID
- *
- * @return SmartObject that contains either <app_id> or "default" section
- * of "app_policies".
- */
- static const NsSmartDeviceLink::NsSmartObjects::SmartObject&
- GetPolicyTableAppIdSection(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& pt_object,
- uint32_t app_id);
-
- /**
- * @brief Convert HMI level value (as number) to string
- *
- * @param hmi_status HMI level status
- * @param hmi_level_string Pointer to a string where the result is
- * retunred.
- */
- static void ConvertHMILevel2String(
- mobile_apis::HMILevel::eType hmi_status,
- std::string* hmi_level_string);
-
- /**
- * @breif Convert smart object to vector of strings
- *
- * @param object Smart object
- * @param v_strings Pointer to a verctor of strings where result is
- * returned.
- */
- static void ConvertSmartArray2VectorStrings(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- std::vector<std::string>* v_strings);
- /**
- * @brief Logger
- */
- static log4cxx::LoggerPtr logger_;
-};
-
-} // namespace policies
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_PERMISSIONS_CALCULATOR_H_
diff --git a/SDL_Core/src/components/policies/include/policies/policy_configuration.h b/SDL_Core/src/components/policies/include/policies/policy_configuration.h
deleted file mode 100644
index 8fae80d42..000000000
--- a/SDL_Core/src/components/policies/include/policies/policy_configuration.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * @file policy_configuration.h
- * @brief Policy configuration header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_CONFIGURATION_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_CONFIGURATION_H_
-
-#include <string>
-#include "smart_objects/smart_object.h"
-#include "smart_objects/smart_schema.h"
-
-namespace policies {
-
-/**
- * @brief Class contains configuration for policy table
- */
-class PolicyConfiguration {
- public:
- /**
- * @brief Constructor
- */
- PolicyConfiguration();
-
- /**
- * @brief set file path (with name) for policy table
- *
- * @param pt_file_path File path
- */
- void set_pt_file_name(const std::string& pt_file_path);
-
- /**
- * @brief set file path (with name) for preload policy table
- *
- * @param preload_pt_file_path File path
- **/
- void set_preload_pt_file_name(const std::string& preload_pt_file_path);
-
- /**
- * @brief Get file path of policy table
- *
- * @return File path
- */
- const std::string& pt_file_name() const;
-
- /**
- * @brief Get file path of preload policy table
- *
- * @return File path
- **/
- const std::string& preload_pt_file_name() const;
-
- private:
- /**
- * @brief policy table file name
- */
- std::string pt_file_name_;
-
- /**
- * @brief Preload policy table file name
- **/
- std::string preload_pt_file_name_;
-};
-
-} // namespace policies
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_CONFIGURATION_H_
diff --git a/SDL_Core/src/components/policies/include/policies/policy_manager.h b/SDL_Core/src/components/policies/include/policies/policy_manager.h
deleted file mode 100644
index b47867ad7..000000000
--- a/SDL_Core/src/components/policies/include/policies/policy_manager.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * @file policy_manager.h
- * @brief Policy Manager header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_MANAGER_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_MANAGER_H_
-
-#include "interfaces/MOBILE_API.h"
-#include "policies/policy_configuration.h"
-#include "smart_objects/smart_object.h"
-
-namespace policies {
-
- /**
- * @brief enumeration of result for asking permissions by application
- **/
-enum PermissionResult {
- /**
- * @brief RPC is allowed.
- */
- PERMISSION_ALLOWED = 0,
- /**
- * @brief Initialization of Policy Manager failed.
- */
- PERMISSION_INIT_FAILED,
- /**
- * @brief Verification of Policy Table failed.
- *
- * Policy Table as smart object has failed in verification against schema.
- */
- PERMISSION_PT_VERIFICATION_FAILED,
- /**
- * @brief RPC is allowed by the PT(backend), but disallowed by the user.
- */
- PERMISSION_USER_DISALLOWED,
- /**
- * @brief RPC is not allowed by the PT(backend).
- */
- PERMISSION_DISALLOWED,
- /**
- * @brief RPC is allowed by PT(backend), but user has not been prompted yet.
- */
- PERMISSION_PENDING_USER_CONSENT
-};
-
-// Namespace is neseccary because it is used for automatic string<->enum
-// convertion using schema
-namespace Priority {
-enum eType {
- /**
- * @brief Mandatory item. Used for enum<->string convertion
- */
- INVALID_ENUM = -1,
- /**
- * @brief NONE
- */
- PRIORITY_NONE = 0,
- /**
- * @brief NORMAL
- */
- PRIORITY_NORMAL,
- /**
- * @brief COMMUNICATION
- */
- PRIORITY_COMMUNICATION,
- /**
- * @brief NAVIGATION
- */
- PRIORITY_NAVIGATION,
- /**
- * @brief EMERGENCY
- */
- PRIORITY_EMERGENCY,
-};
-} // namespace Priority
-
-/**
- * @brief Init() result enumeration
- **/
-enum InitResult {
- /**
- * @brief PT file loaded successfully
- **/
- INIT_OK = 0,
- /**
- * @brief Initialization has failed
- *
- * Possible reason: Policy Table file missing, failed verification
- *
- **/
- INIT_FAILED
-};
-
-/**
- * @brief Enumeration for state wich reflects states of User consent procedure
- * @TODO (anyone) for future use
- */
-enum eType {
- /**
- * @brief User was not asked for consent
- */
- STATE_IDLE = 0,
- /**
- * @brief User was asked just now for consent
- */
- STATE_PENDING_CONSENT,
- /**
- * @brief User answered 'YES' just now
- */
- STATE_CONSENT_YES,
- /**
- * @brief User answered 'NO' just now
- */
- STATE_CONSENT_NO
-};
-
-/**
- * @biref Struct contains data of result to return when Policy Manager
- * is requested for CheckPermission()
- */
-struct CheckPermissionResult {
- /**
- * @brief Permission result
- */
- PermissionResult result;
- /**
- * @brief Stored priority for current application
- */
- Priority::eType priority;
-};
-
-/**
- * @brief Interface class of policy manager.
- */
-class PolicyManager {
- public:
- /**
- * @brief Destructor
- *
- **/
- virtual ~PolicyManager() {}
-
- /**
- * @brief Initialization method
- *
- * @param config PolicyManager configuration
- */
- virtual InitResult Init(const PolicyConfiguration& config) = 0;
-
- /**
- * @brief Checking permissions for application whether rpc is allowed.
- *
- * @param app_id Application identifier
- * @param rpc Remote procedure call
- * @param hmi_status HMI level status
- *
- * @return result of check permission
- */
- virtual CheckPermissionResult CheckPermission(uint32_t app_id,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status) = 0;
-};
-
-} // namespace policies
-
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_MANAGER_H_
diff --git a/SDL_Core/src/components/policies/include/policies/policy_manager_impl.h b/SDL_Core/src/components/policies/include/policies/policy_manager_impl.h
deleted file mode 100644
index adfddf834..000000000
--- a/SDL_Core/src/components/policies/include/policies/policy_manager_impl.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * @file policy_manager_impl.h
- * @brief Policy Manager implementation header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_MANAGER_IMPL_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_MANAGER_IMPL_H_
-
-#include "policies/policy_manager.h"
-#include "policies/policy_table.h"
-#include "utils/logger.h"
-#include "utils/singleton.h"
-
-namespace policies {
-
-/**
- * @brief Interface implementation class of Policy Manager.
- */
-class PolicyManagerImpl : public PolicyManager,
- public utils::Singleton<PolicyManagerImpl> {
- public:
- /**
- * @brief Destructor
- *
- **/
- virtual ~PolicyManagerImpl(void);
-
- /**
- * @brief Initialization method
- *
- * @param config PolicyManager configuration
- *
- */
- virtual InitResult Init(const PolicyConfiguration& config);
-
- /**
- * @brief Checking permissions for application whether rpc is allowed.
- *
- * @param app_id Application identifier
- * @param rpc Remote procedure call
- * @param hmi_status HMI level status
- *
- * @return result of check permission
- */
- virtual CheckPermissionResult CheckPermission(uint32_t app_id,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status);
-
- protected:
- /**
- * @brief Hidden constructor.
- */
- PolicyManagerImpl();
-
- /**
- * @brief Store policy table to filesystem
- *
- * @return true if PolicyTable is successfully saved, false - othewise.
- */
- bool StorePolicyTable();
-
- /**
- * @brief Get PolicyTable pointer (for testing purposes)
- *
- * @return PolicyTable* ptr.
- **/
- PolicyTable* policy_table() const;
-
- private:
- /**
- * @brief Policy configuration
- */
- PolicyConfiguration policy_config_;
-
- /**
- * @brief Policy table
- */
- PolicyTable* policy_table_;
-
- /**
- * @brief Logger
- */
- static log4cxx::LoggerPtr logger_;
-
- /**
- * @brief Result of call of public method Init()
- */
- InitResult init_result_;
-
- DISALLOW_COPY_AND_ASSIGN(PolicyManagerImpl);
-
- FRIEND_BASE_SINGLETON_CLASS(PolicyManagerImpl);
-};
-
-} // namespace policies
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_MANAGER_IMPL_H_
diff --git a/SDL_Core/src/components/policies/include/policies/policy_table.h b/SDL_Core/src/components/policies/include/policies/policy_table.h
deleted file mode 100644
index a3feacab2..000000000
--- a/SDL_Core/src/components/policies/include/policies/policy_table.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * @file policy_table.h
- * @brief Policy table header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_TABLE_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_TABLE_H_
-
-#include <string>
-#include "smart_objects/smart_object.h"
-#include "smart_objects/smart_schema.h"
-
-namespace policies {
-
-enum PTValidationResult {
- VALIDATION_OK = 0,
- VALIDATION_FAILED_BAD_JSON,
- VALIDATION_FAILED
-};
-
-enum PolicyTableType {
- TYPE_POLICY_TABLE = 0,
- TYPE_PT_PRELOAD
-};
-
-class PolicyTable {
- public:
- /**
- * @brief Constructor
- *
- * @param policy_table_string String containing policy table
- * @param pt_type PolicyTable type (PT or Preload)
- **/
- PolicyTable(const std::string& policy_table_string,
- PolicyTableType pt_type);
-
- /**
- * @brief Destructor
- */
- ~PolicyTable();
-
- /**
- * @brief Get policy table as smart object
- *
- * @return Policy table as smart object
- */
- NsSmartDeviceLink::NsSmartObjects::SmartObject& AsSmartObject();
-
- /**
- * @brief Get policy table as a string
- *
- * @param policy_table_string pointer to the string where PolicyTable
- * will be written.
- *
- * @return true if PolicyTable correctly converted to string and the string
- * is returned in "policy_table_string"
- */
- bool AsString(std::string* policy_table_string) const;
-
- /**
- * @brief Validate policy table.
- *
- * Validates policy table against smart schema which should be set before.
- *
- * @return validation result as enum
- **/
- PTValidationResult Validate();
-
- /**
- * @brief Tells wether Policy Table is Preload
- *
- * @return whether Policy Table Preload
- */
- bool IsPTPreload();
-
- private:
- /**
- * @brief is Policy Table valid
- **/
- PTValidationResult pt_validation_result_;
-
- /**
- * @brief PolicyTable type
- **/
- PolicyTableType pt_type_;
-
- /**
- * @brief Schema to verify policy table
- */
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema schema_;
-
- /**
- * @brief policy table as smart object
- */
- NsSmartDeviceLink::NsSmartObjects::SmartObject pt_smart_object_;
-};
-
-} // namespace policies
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_TABLE_H_
diff --git a/SDL_Core/src/components/policies/include/policies/policy_table_schema.h b/SDL_Core/src/components/policies/include/policies/policy_table_schema.h
deleted file mode 100644
index 85247cc8b..000000000
--- a/SDL_Core/src/components/policies/include/policies/policy_table_schema.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * @file policy_table_schema.h
- * @brief Policy table schema header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_TABLE_SCHEMA_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_TABLE_SCHEMA_H_
-
-#include <string>
-
-#include "smart_objects/smart_schema.h"
-#include "smart_objects/schema_item.h"
-#include "utils/shared_ptr.h"
-
-namespace policies {
-
-class PolicyTableSchema {
- public:
- /**
- * @brief Creates schema for Policy Table
- *
- * @note CSmartSchema is a lightweith wrapper around
- * "SharedPtr<ISchemaItem>". There's no overhead in returning it by value.
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema Create(void);
-
-
- // TODO(YS): might need to move these constants to the more
- // appropriate place
- /**
- * @brief String constant for "policy_table" section.
- */
- static const char* kStrPolicyTable;
-
- /**
- * @brief String constant for "module_config" section.
- */
- static const char* kStrModuleConfig;
-
- /**
- * @brief String constant for "functional_groupings" section.
- */
- static const char* kStrFunctionalGroupings;
-
- /**
- * @brief String constant for "app_policies" section.
- */
- static const char* kStrAppPolicies;
-
- /**
- * @brief String constant for "endpoints" section.
- */
- static const char* kStrEndpoints;
-
- /**
- * @brief String constant for "default" section.
- */
- static const char* kStrDefault;
-
- /**
- * @brief String constant for "user_consent_prompt" section.
- */
- static const char* kStrUserConsentPrompt;
-
- /**
- * @brief String constant for "rpcs" section.
- */
- static const char* kStrRpcs;
-
- /**
- * @brief String constant for "hmi_levels" section.
- */
- static const char* kStrHmiLevels;
-
- /**
- * @brief String constant for "parameters" section.
- */
- static const char* kStrParameters;
-
- /**
- * @brief String constant for "groups" section.
- */
- static const char* kStrGroups;
-
- /**
- * @brief String constant for "nicknames" section.
- */
- static const char* kStrNicknames;
-
- /**
- * @brief String constant for "priority" section.
- */
- static const char* kStrPriority;
-
- protected:
- /**
- * @brief Hidden constructor to prevent missuse. Only called from inside.
- */
- PolicyTableSchema(void);
-
- /**
- * @brief Virtual destructor.
- */
- virtual ~PolicyTableSchema(void) {}
-
- /**
- * @brief Returns a schema.
- *
- * If schema hasn't been created yet the method creates it and returns
- * a newly created schema.
- *
- * @note CSmartSchema is a lightweith wrapper around
- * "SharedPtr<ISchemaItem>". There's no overhead in returning it by value.
- *
- * @return If the schema has already been created just returns it,
- * otherwise creates it and returns it.
- */
- virtual NsSmartDeviceLink::NsSmartObjects::CSmartSchema GetSchema(void);
-
- /**
- * @brief Creates schema for Policy Table
- *
- * @brief Root schema item of the newly created schema.
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateSchema(void);
-
- /**
- * @brief Creates "module_config" schema item
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateModuleConfig(void);
-
- /**
- * @brief Creates "functional_groupings" schema item
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateFunctionalGroupings(void);
-
- /**
- * @brief Creates "app_policies" schema item
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateAppPolicies(void);
-
- /**
- * @brief Creates "<app_id>" schema item
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateAppId(void);
-
- /**
- * @brief Creates "priority" schema item for <app_id> and "default" sections
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreatePriority(void);
-
- /**
- * @brief Creates "default" schema item of "app_policies"
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateAppPoliciesDefault(void);
-
- private:
- /**
- * @brief Contains a schema if it is already been created
- */
- utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> schema_;
-};
-
-} // namespace policies
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_POLICY_TABLE_SCHEMA_H_
diff --git a/SDL_Core/src/components/policies/include/policies/preloaded_pt_schema.h b/SDL_Core/src/components/policies/include/policies/preloaded_pt_schema.h
deleted file mode 100644
index 805364089..000000000
--- a/SDL_Core/src/components/policies/include/policies/preloaded_pt_schema.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file preloaded_pt_schema.h
- * @brief Policy table preload schema header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_PRELOADED_PT_SCHEMA_H_
-#define SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_PRELOADED_PT_SCHEMA_H_
-
-#include "policies/policy_table_schema.h"
-
-namespace policies {
-
-class PreloadedPTSchema : public PolicyTableSchema {
- public:
- /**
- * @brief Creates schema for preloaded Policy Table
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema Create(void);
-
- protected:
- /**
- * @brief Hidden constructor to prevent missuse. Only called from inside.
- */
- PreloadedPTSchema(void) {}
-
- /**
- * @brief Virtual destructor.
- */
- virtual ~PreloadedPTSchema(void) {}
-
- /**
- * @brief Creates "<app_id>" schema item
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateAppId(void);
-
- /**
- * @brief Creates "app_policies" schema item
- */
- virtual utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem>
- CreateAppPolicies(void);
-};
-
-} // namespace policies
-
-#endif // SRC_COMPONENTS_POLICIES_INCLUDE_POLICIES_PRELOADED_PT_SCHEMA_H_
diff --git a/SDL_Core/src/components/policies/src/permissions_calculator.cc b/SDL_Core/src/components/policies/src/permissions_calculator.cc
deleted file mode 100644
index 240ed1304..000000000
--- a/SDL_Core/src/components/policies/src/permissions_calculator.cc
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * @file permissions_calculator.cc
- * @brief Permissions calculator source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include <map>
-#include "policies/permissions_calculator.h"
-#include "policies/policy_table_schema.h"
-#include "formatters/CSmartFactory.hpp"
-#include "smart_objects/enum_schema_item.h"
-#include "utils/macro.h"
-
-
-namespace policies {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-namespace jsonhandler = NsSmartDeviceLink::NsJSONHandler;
-
-using ::NsSmartDeviceLink::NsSmartObjects::SmartObject;
-using ::NsSmartDeviceLink::NsSmartObjects::SmartType;
-
-log4cxx::LoggerPtr PermissionsCalculator::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("Policies"));
-
-//----------------------------------------------------------------------------
-
-const SmartObject& PermissionsCalculator::GetPolicyTableAppIdSection(
- const SmartObject& pt_object,
- uint32_t app_id) {
-//
- const uint8_t kBuffSize = 16;
- char app_id_string[kBuffSize];
- snprintf(app_id_string, kBuffSize, "%d", app_id);
-
- const SmartObject& app_policies =
- pt_object.getElement(PolicyTableSchema::kStrPolicyTable)
- .getElement(PolicyTableSchema::kStrAppPolicies);
-
- // look for <app_id> section within app_policies
- if ((true == app_policies.keyExists(std::string(app_id_string)))) {
- const SmartObject& pt_app_id =
- app_policies.getElement(app_id_string);
-
- if (SmartType::SmartType_Map == pt_app_id.getType()) {
- return pt_app_id;
- } else {
- LOG4CXX_ERROR(logger_,
- "Section app_policies|<app_id> neither exists nor is a map");
- } // look for default section within app_policies
- } else if (SmartType::SmartType_Map ==
- app_policies.getElement(PolicyTableSchema::kStrDefault).getType()) {
- // returning "default" section of "app_policies"
- return app_policies.getElement(PolicyTableSchema::kStrDefault);
- } else {
- LOG4CXX_ERROR(logger_,
- "Section app_policies|default neither exists nor is a map");
- }
-
- return smart_objects::invalid_object_value;
-}
-
-//----------------------------------------------------------------------------
-
-PermissionResult PermissionsCalculator::CalcPermissions(
- const SmartObject& pt_object,
- uint32_t app_id,
- const SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status) {
-//
- std::vector<std::string> rpc_groups;
- const SmartObject& pt_app_id = GetPolicyTableAppIdSection(pt_object, app_id);
-
- const SmartObject& pt_groups =
- pt_app_id.getElement(PolicyTableSchema::kStrGroups);
-
- if (SmartType::SmartType_Array == pt_groups.getType()) {
- ConvertSmartArray2VectorStrings(pt_groups, &rpc_groups);
- } else {
- LOG4CXX_ERROR(logger_,
- "Section app_policies|<app_id>|groups either not exists or not array");
- }
-
- if (rpc_groups.size() > 0) {
- return CalcPermissionsByGroups(pt_object, rpc_groups, rpc, hmi_status);
- }
-
- return PermissionResult::PERMISSION_DISALLOWED;
-}
-
-//----------------------------------------------------------------------------
-
-Priority::eType PermissionsCalculator::GetPriority(
- const SmartObject& pt_object,
- uint32_t app_id) {
-//
- const SmartObject& pt_app_id = GetPolicyTableAppIdSection(pt_object, app_id);
-
- const SmartObject& priority =
- pt_app_id.getElement(PolicyTableSchema::kStrPriority);
-
- if (SmartType::SmartType_Integer == priority.getType()) {
- return static_cast<Priority::eType>( priority.asInt() );
- } else {
- LOG4CXX_ERROR(logger_, "Section 'priority' is not an enum");
- }
-
- return Priority::PRIORITY_NONE;
-}
-
-//----------------------------------------------------------------------------
-
-PermissionResult
- PermissionsCalculator::CalcPermissionsByGroups(
- const SmartObject& pt_object,
- const std::vector<std::string>& rpc_groups,
- const SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status) {
-//
- SmartObject rpc_object(rpc);
- // unapply schema to convert FunctionID from enum (number) to string
- rpc_object.getSchema().unapplySchema(rpc_object);
-
- const SmartObject &function_id =
- rpc_object.getElement(jsonhandler::strings::S_PARAMS)
- .getElement(jsonhandler::strings::S_FUNCTION_ID);
- if (function_id.asString().length() == 0) {
- return PermissionResult::PERMISSION_DISALLOWED;
- }
-
- const SmartObject& functional_groupings_object =
- pt_object.getElement(PolicyTableSchema::kStrPolicyTable)
- .getElement(PolicyTableSchema::kStrFunctionalGroupings);
- if (smart_objects::SmartType::SmartType_Map !=
- functional_groupings_object.getType()) {
- return PermissionResult::PERMISSION_DISALLOWED;
- }
-
- for (std::vector<std::string>::const_iterator it = rpc_groups.begin() ;
- it != rpc_groups.end(); ++it) {
- if (functional_groupings_object.keyExists(*it)) {
- const SmartObject& fgroup = functional_groupings_object.getElement(*it);
- if (fgroup.getElement(PolicyTableSchema::kStrRpcs)
- .keyExists(function_id.asString())) {
- std::string hmi_status_string;
- ConvertHMILevel2String(hmi_status, &hmi_status_string);
-
- smart_objects::SmartObject hmi_levels =
- fgroup.getElement(PolicyTableSchema::kStrRpcs)
- .getElement(function_id.asString())
- .getElement(PolicyTableSchema::kStrHmiLevels);
- for (uint16_t n = 0; n < hmi_levels.length(); n++) {
- if (hmi_levels[n].getType() ==
- smart_objects::SmartType::SmartType_String) {
- if (hmi_status_string.compare(hmi_levels[n].asString()) == 0) {
- return PermissionResult::PERMISSION_ALLOWED;
- }
- }
- }
- } else {
- continue;
- }
- }
- }
-
- return PermissionResult::PERMISSION_DISALLOWED;
-}
-
-//----------------------------------------------------------------------------
-
-void PermissionsCalculator::ConvertHMILevel2String(
- mobile_apis::HMILevel::eType hmi_status,
- std::string* hmi_level_string) {
- DCHECK(hmi_level_string);
-
- const std::map<mobile_apis::HMILevel::eType, std::string>
- elementsStringRepresentation =
- smart_objects::TEnumSchemaItem<mobile_apis::HMILevel::eType>::
- getEnumElementsStringRepresentation();
-
- std::map<mobile_apis::HMILevel::eType, std::string>::const_iterator i =
- elementsStringRepresentation.find(hmi_status);
-
- if (i != elementsStringRepresentation.end()) {
- *hmi_level_string = i->second;
- }
-}
-
-//----------------------------------------------------------------------------
-
-void PermissionsCalculator::ConvertSmartArray2VectorStrings(
- const SmartObject& object,
- std::vector<std::string>* v_strings) {
- DCHECK(v_strings);
-
- if (object.getType() == smart_objects::SmartType::SmartType_Array) {
- for (uint32_t i = 0; i < object.length(); i++) {
- const SmartObject & item = object.getElement(i);
- if (item.getType() == smart_objects::SmartType::SmartType_String) {
- v_strings->push_back(item.asString());
- }
- }
- }
-}
-
-} // namespace policies
diff --git a/SDL_Core/src/components/policies/src/policy_configuration.cc b/SDL_Core/src/components/policies/src/policy_configuration.cc
deleted file mode 100644
index 2b08f3f31..000000000
--- a/SDL_Core/src/components/policies/src/policy_configuration.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file policy_configuration.cc
- * @brief Policy configuration source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "policies/policy_configuration.h"
-
-//----------------------------------------------------------------------------
-
-policies::PolicyConfiguration::PolicyConfiguration()
- : pt_file_name_()
- , preload_pt_file_name_() {
-}
-
-//-----------------------------------------------------------------------------
-
-void policies::PolicyConfiguration::set_pt_file_name(
- const std::string& pt_file_path) {
- pt_file_name_ = pt_file_path;
-}
-
-//-----------------------------------------------------------------------------
-
-const std::string& policies::PolicyConfiguration::pt_file_name() const {
- return pt_file_name_;
-}
-
-//-----------------------------------------------------------------------------
-
-void policies::PolicyConfiguration::set_preload_pt_file_name(
- const std::string& preload_pt_file_path) {
- preload_pt_file_name_ = preload_pt_file_path;
-}
-
-//-----------------------------------------------------------------------------
-
-const std::string& policies::PolicyConfiguration::preload_pt_file_name() const {
- return preload_pt_file_name_;
-}
diff --git a/SDL_Core/src/components/policies/src/policy_manager_impl.cc b/SDL_Core/src/components/policies/src/policy_manager_impl.cc
deleted file mode 100644
index 095cdc0c9..000000000
--- a/SDL_Core/src/components/policies/src/policy_manager_impl.cc
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * @file policy_manager_impl.cc
- * @brief Policy Manager implementation source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "policies/policy_manager_impl.h"
-#include "policies/permissions_calculator.h"
-#include "utils/file_system.h"
-#include "utils/macro.h"
-
-namespace policies {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-log4cxx::LoggerPtr PolicyManagerImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("Policies"));
-
-//---------------------------------------------------------------
-
-PolicyManagerImpl::PolicyManagerImpl()
- : PolicyManager()
- , policy_config_()
- , policy_table_(NULL)
- , init_result_(InitResult::INIT_FAILED) {
-}
-
-//---------------------------------------------------------------
-
-PolicyManagerImpl::~PolicyManagerImpl() {
- if (NULL != policy_table_) {
- delete policy_table_;
- policy_table_ = NULL;
- }
-}
-
-//---------------------------------------------------------------
-
-InitResult PolicyManagerImpl::Init(
- const PolicyConfiguration& config) {
- // TODO(anyone): Provide some mechanism for recovery (from Preload???)
- // if PT file corrupted (e.g. bad json)
- policy_config_ = config;
-
- std::string pt_string;
- if (NULL == policy_table_) {
- if (true == file_system::ReadFile(policy_config_.pt_file_name(),
- pt_string)) {
- policy_table_ = new PolicyTable(pt_string,
- PolicyTableType::TYPE_POLICY_TABLE);
- init_result_ = InitResult::INIT_OK;
- } else {
- LOG4CXX_WARN(logger_, "Can't read policy table file "
- << policy_config_.pt_file_name());
- if (true == file_system::ReadFile(
- policy_config_.preload_pt_file_name(), pt_string)) {
- policy_table_ = new PolicyTable(
- pt_string, PolicyTableType::TYPE_PT_PRELOAD);
- init_result_ = InitResult::INIT_OK;
- } else {
- init_result_ = InitResult::INIT_FAILED;
- LOG4CXX_ERROR(logger_, "Can't read Preload policy table file "
- << policy_config_.preload_pt_file_name());
- }
- }
- } else {
- init_result_ = InitResult::INIT_OK;
- LOG4CXX_WARN(logger_, "Policy table is already created.");
- }
- return init_result_;
-}
-
-//---------------------------------------------------------------
-
-CheckPermissionResult
- PolicyManagerImpl::CheckPermission(
- uint32_t app_id,
- const smart_objects::SmartObject& rpc,
- mobile_apis::HMILevel::eType hmi_status) {
-//
- CheckPermissionResult result =
- {PermissionResult::PERMISSION_DISALLOWED, Priority::PRIORITY_NONE};
- PolicyTable* pt = policy_table();
-
- if (init_result_ == InitResult::INIT_FAILED) {
- result.result = PermissionResult::PERMISSION_INIT_FAILED;
- } else if (NULL != pt
- && PTValidationResult::VALIDATION_OK == pt->Validate()) {
- smart_objects::SmartObject& pt_object = pt->AsSmartObject();
-
- result.result = PermissionsCalculator::CalcPermissions(pt_object,
- app_id,
- rpc,
- hmi_status);
-
- result.priority = PermissionsCalculator::GetPriority(pt_object, app_id);
- } else {
- result.result = PermissionResult::PERMISSION_PT_VERIFICATION_FAILED;
- }
-
- return result;
-}
-
-//---------------------------------------------------------------
-
-bool PolicyManagerImpl::StorePolicyTable() {
- if (NULL == policy_table_) {
- LOG4CXX_WARN(logger_, "PolicyTable is NULL."
- "It seems like Init hasn't been called");
- NOTREACHED();
- return false;
- }
-
- if (smart_objects::SmartType_Map !=
- policy_table_->AsSmartObject().getType()) {
- LOG4CXX_WARN(logger_, "PolicyTable is empty. Nothing to store");
- return false;
- }
-
- std::string pt_string;
- if (false == policy_table_->AsString(&pt_string)) {
- LOG4CXX_ERROR(logger_, "Can't convert PolicyTable to string.");
- return false;
- }
-
- const std::vector<uint8_t> char_vector_pdata(
- pt_string.begin(), pt_string.end());
-
- if (false == file_system::Write(policy_config_.pt_file_name(),
- char_vector_pdata)) {
- LOG4CXX_ERROR(logger_, "Can't write policy table file "
- << policy_config_.pt_file_name());
- return false;
- }
- return true;
-}
-
-//---------------------------------------------------------------
-
-PolicyTable* PolicyManagerImpl::policy_table() const {
- if (NULL == policy_table_) {
- LOG4CXX_ERROR(logger_, "Accessing not initialized policy table.");
- }
- return policy_table_;
-}
-
-} // namespace policies
diff --git a/SDL_Core/src/components/policies/src/policy_table.cc b/SDL_Core/src/components/policies/src/policy_table.cc
deleted file mode 100644
index 94f3c3592..000000000
--- a/SDL_Core/src/components/policies/src/policy_table.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * @file policy_table.cc
- * @brief Policy table source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "policies/policy_table.h"
-#include "formatters/generic_json_formatter.h"
-#include "policies/policy_table_schema.h"
-#include "utils/macro.h"
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-
-
-//---------------------------------------------------------------------------
-
-policies::PolicyTable::PolicyTable(
- const std::string& policy_table_string,
- PolicyTableType pt_type)
- : pt_validation_result_(PTValidationResult::VALIDATION_FAILED)
- , pt_type_(pt_type)
- , schema_(policies::PolicyTableSchema::Create())
- , pt_smart_object_() {
-//
- if (false == formatters::GenericJsonFormatter::FromString(
- policy_table_string, pt_smart_object_)) {
- pt_validation_result_ = PTValidationResult::VALIDATION_FAILED_BAD_JSON;
- } else {
- // By applying schema the enums are converted from strings into ints
- pt_smart_object_.setSchema(schema_);
- schema_.applySchema(pt_smart_object_);
- }
-}
-
-//---------------------------------------------------------------------------
-
-policies::PolicyTable::~PolicyTable() {
-}
-
-//---------------------------------------------------------------------------
-
-smart_objects::SmartObject& policies::PolicyTable::AsSmartObject() {
- return pt_smart_object_;
-}
-
-//---------------------------------------------------------------------------
-
-bool policies::PolicyTable::AsString(std::string* policy_table_string) const {
- DCHECK(policy_table_string);
-
- if (PTValidationResult::VALIDATION_FAILED_BAD_JSON == pt_validation_result_) {
- return false;
- }
-
- formatters::GenericJsonFormatter::ToString(pt_smart_object_,
- *policy_table_string);
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-
-policies::PTValidationResult policies::PolicyTable::Validate() {
- // TODO(_): distinct between PT and Preload PolicyTable types (use pt_type_)
- if (PTValidationResult::VALIDATION_FAILED_BAD_JSON == pt_validation_result_) {
- return pt_validation_result_;
- }
-
- if (smart_objects::Errors::OK == schema_.validate(pt_smart_object_)) {
- pt_validation_result_ = PTValidationResult::VALIDATION_OK;
- return pt_validation_result_;
- }
-
- pt_validation_result_ = PTValidationResult::VALIDATION_FAILED;
- return pt_validation_result_;
-}
-
-//---------------------------------------------------------------------------
-
-bool policies::PolicyTable::IsPTPreload() {
- // evaluate 'preloaded_pt' in 'module_config'
- return false;
-}
-
diff --git a/SDL_Core/src/components/policies/src/policy_table_schema.cc b/SDL_Core/src/components/policies/src/policy_table_schema.cc
deleted file mode 100644
index 56b04af75..000000000
--- a/SDL_Core/src/components/policies/src/policy_table_schema.cc
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * @file policy_table_schema.cc
- * @brief Policy table schema source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "policies/policy_table_schema.h"
-
-#include <map>
-#include <string>
-
-#include "policies/policy_manager.h"
-#include "smart_objects/object_optional_schema_item.h"
-#include "smart_objects/array_schema_item.h"
-#include "smart_objects/string_schema_item.h"
-#include "smart_objects/enum_schema_item.h"
-
-
-namespace policies {
-
-using ::NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CSmartSchema;
-using ::NsSmartDeviceLink::NsSmartObjects::ISchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CAlwaysTrueSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::ObjectOptionalSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CArraySchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CStringSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::TEnumSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::TSchemaItemParameter;
-
-typedef utils::SharedPtr<ISchemaItem> SchemaItemPtr;
-
-//-----------------------------------------------------------------------------
-
-const char* PolicyTableSchema::kStrPolicyTable = "policy_table";
-const char* PolicyTableSchema::kStrModuleConfig = "module_config";
-const char* PolicyTableSchema::kStrFunctionalGroupings = "functional_groupings";
-const char* PolicyTableSchema::kStrAppPolicies = "app_policies";
-const char* PolicyTableSchema::kStrEndpoints = "endpoints";
-const char* PolicyTableSchema::kStrDefault = "default";
-const char* PolicyTableSchema::kStrUserConsentPrompt = "user_consent_prompt";
-const char* PolicyTableSchema::kStrRpcs = "rpcs";
-const char* PolicyTableSchema::kStrHmiLevels = "hmi_levels";
-const char* PolicyTableSchema::kStrParameters = "parameters";
-const char* PolicyTableSchema::kStrGroups = "groups";
-const char* PolicyTableSchema::kStrNicknames = "nicknames";
-const char* PolicyTableSchema::kStrPriority = "priority";
-
-//-----------------------------------------------------------------------------
-
-PolicyTableSchema::PolicyTableSchema(void)
- : schema_() {
-}
-
-//-----------------------------------------------------------------------------
-
-CSmartSchema PolicyTableSchema::Create(void) {
- static PolicyTableSchema schema;
-
- return schema.GetSchema();
-}
-
-//-----------------------------------------------------------------------------
-
-CSmartSchema PolicyTableSchema::GetSchema(void) {
- if (false == schema_.valid()) {
- schema_ = CreateSchema();
- }
-
- return CSmartSchema(schema_);
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreateSchema(void) {
- SchemaItemPtr root_schema_item;
- std::map<std::string, CObjectSchemaItem::SMember> root_member_map;
- std::map<std::string, CObjectSchemaItem::SMember> policy_table_member_map;
-
- policy_table_member_map[kStrModuleConfig] = CObjectSchemaItem::SMember(
- CreateModuleConfig(),
- true);
-
- policy_table_member_map[kStrFunctionalGroupings] =
- CObjectSchemaItem::SMember(CreateFunctionalGroupings(), true);
-
- policy_table_member_map[kStrAppPolicies] = CObjectSchemaItem::SMember(
- CreateAppPolicies(),
- true);
-
- root_member_map[kStrPolicyTable] = CObjectSchemaItem::SMember(
- CObjectSchemaItem::create(policy_table_member_map),
- true);
-
- root_schema_item = CObjectSchemaItem::create(root_member_map);
-
- return root_schema_item;
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreateModuleConfig(void) {
- std::map<std::string, CObjectSchemaItem::SMember> service_type_map;
- service_type_map[kStrDefault] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> endpoint_map;
-
- endpoint_map[ObjectOptionalSchemaItem::kOptionalGenericFieldName] =
- CObjectSchemaItem::SMember(
- CObjectSchemaItem::create(service_type_map), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> module_config_map;
- module_config_map[kStrEndpoints] = CObjectSchemaItem::SMember(
- ObjectOptionalSchemaItem::create(endpoint_map), true);
-
- return CObjectSchemaItem::create(module_config_map);
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreateFunctionalGroupings(void) {
- std::map<std::string, CObjectSchemaItem::SMember> rpc_map;
-
- rpc_map[kStrHmiLevels] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()) );
-
- rpc_map[kStrParameters] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), false);
-
- std::map<std::string, CObjectSchemaItem::SMember> rpcs_map;
- rpcs_map[ObjectOptionalSchemaItem::kOptionalGenericFieldName] =
- CObjectSchemaItem::SMember(CObjectSchemaItem::create(rpc_map), false);
-
- std::map<std::string, CObjectSchemaItem::SMember> functional_grouping_map;
-
- functional_grouping_map[kStrUserConsentPrompt] =
- CObjectSchemaItem::SMember(CStringSchemaItem::create(), false);
- functional_grouping_map[kStrRpcs] = CObjectSchemaItem::SMember(
- ObjectOptionalSchemaItem::create(rpcs_map), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> functional_groupings_map;
-
- functional_groupings_map[
- ObjectOptionalSchemaItem::kOptionalGenericFieldName] =
- CObjectSchemaItem::SMember(
- CObjectSchemaItem::create(functional_grouping_map), false);
-
- return ObjectOptionalSchemaItem::create(functional_groupings_map);
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreatePriority(void) {
- std::set<Priority::eType> allowed_priorities;
-
- allowed_priorities.insert(Priority::PRIORITY_NONE);
- allowed_priorities.insert(Priority::PRIORITY_NORMAL);
- allowed_priorities.insert(Priority::PRIORITY_COMMUNICATION);
- allowed_priorities.insert(Priority::PRIORITY_NAVIGATION);
- allowed_priorities.insert(Priority::PRIORITY_EMERGENCY);
-
- SchemaItemPtr priority =
- TEnumSchemaItem<Priority::eType>::create(allowed_priorities);
-
- return priority;
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreateAppId(void) {
- std::map<std::string, CObjectSchemaItem::SMember> app_id_map;
-
- app_id_map[kStrGroups] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), true);
- app_id_map[kStrNicknames] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), true);
- app_id_map[kStrPriority] = CObjectSchemaItem::SMember(
- CreatePriority(), true);
-
- return CObjectSchemaItem::create(app_id_map);
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreateAppPoliciesDefault(void) {
- std::map<std::string, CObjectSchemaItem::SMember> default_map;
-
- default_map[kStrPriority] = CObjectSchemaItem::SMember(
- CreatePriority(), true);
- default_map[kStrGroups] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), true);
-
- return CObjectSchemaItem::create(default_map);
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PolicyTableSchema::CreateAppPolicies(void) {
- std::map<std::string, CObjectSchemaItem::SMember> app_policies_map;
-
- app_policies_map[kStrDefault] =
- CObjectSchemaItem::SMember(CreateAppPoliciesDefault(), true);
- app_policies_map[ObjectOptionalSchemaItem::kOptionalGenericFieldName] =
- CObjectSchemaItem::SMember(CreateAppId(), true);
-
- return ObjectOptionalSchemaItem::create(app_policies_map);
-}
-
-} // namespace policies
-
-//-------------- String to value enum mapping ----------------
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-template <>
-const std::map<policies::Priority::eType, std::string>&
- TEnumSchemaItem<policies::Priority::eType>::
- getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<policies::Priority::eType, std::string>
- enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(
- std::make_pair(policies::Priority::PRIORITY_NONE, "NONE"));
- enum_string_representation.insert(
- std::make_pair(policies::Priority::PRIORITY_NORMAL, "NORMAL"));
- enum_string_representation.insert(
- std::make_pair(policies::Priority::PRIORITY_COMMUNICATION,
- "COMMUNICATION"));
- enum_string_representation.insert(
- std::make_pair(policies::Priority::PRIORITY_NAVIGATION, "NAVIGATION"));
- enum_string_representation.insert(
- std::make_pair(policies::Priority::PRIORITY_EMERGENCY, "EMERGENCY"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/policies/src/preloaded_pt_schema.cc b/SDL_Core/src/components/policies/src/preloaded_pt_schema.cc
deleted file mode 100644
index 146b2ac32..000000000
--- a/SDL_Core/src/components/policies/src/preloaded_pt_schema.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @file preloaded_pt_schema.cc
- * @brief Policy table preloaded schema source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "policies/preloaded_pt_schema.h"
-
-#include <map>
-#include <string>
-
-#include "smart_objects/object_optional_schema_item.h"
-#include "smart_objects/array_schema_item.h"
-#include "smart_objects/string_schema_item.h"
-
-
-namespace policies {
-
-using ::NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CSmartSchema;
-using ::NsSmartDeviceLink::NsSmartObjects::ISchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::ObjectOptionalSchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CArraySchemaItem;
-using ::NsSmartDeviceLink::NsSmartObjects::CStringSchemaItem;
-
-typedef utils::SharedPtr<ISchemaItem> SchemaItemPtr;
-
-//-----------------------------------------------------------------------------
-
-CSmartSchema PreloadedPTSchema::Create(void) {
- static PreloadedPTSchema schema;
-
- return schema.GetSchema();
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PreloadedPTSchema::CreateAppId(void) {
- std::map<std::string, CObjectSchemaItem::SMember> app_id_map;
-
- app_id_map[kStrGroups] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), true);
- app_id_map[kStrNicknames] = CObjectSchemaItem::SMember(
- CArraySchemaItem::create(CStringSchemaItem::create()), false);
- app_id_map[kStrPriority] = CObjectSchemaItem::SMember(
- CStringSchemaItem::create(), true);
-
- return CObjectSchemaItem::create(app_id_map);
-}
-
-//-----------------------------------------------------------------------------
-
-SchemaItemPtr PreloadedPTSchema::CreateAppPolicies(void) {
- std::map<std::string, CObjectSchemaItem::SMember> app_policies_map;
-
- app_policies_map[kStrDefault] =
- CObjectSchemaItem::SMember(CreateAppPoliciesDefault(), true);
- app_policies_map[ObjectOptionalSchemaItem::kOptionalGenericFieldName] =
- CObjectSchemaItem::SMember(CreateAppId(), false);
-
- return ObjectOptionalSchemaItem::create(app_policies_map);
-}
-
-} // namespace policies
diff --git a/SDL_Core/src/components/protocol_handler/CMakeLists.txt b/SDL_Core/src/components/protocol_handler/CMakeLists.txt
deleted file mode 100644
index 2ca4de0e5..000000000
--- a/SDL_Core/src/components/protocol_handler/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-include_directories (
- ./include
- ../utils/include/
- ../transport_manager/include/
- ../connection_handler/include/
- ../config_profile/include/
-)
-
-set (SOURCES
- ./src/applink_protocol.cc
- ./src/rpc_type.cc
- ./src/raw_message.cc
- ./src/protocol_handler_impl.cc
- ./src/protocol_packet.cc
- ./src/protocol_payload.cc
- ./src/message_priority.cc
- ./src/service_type.cc
-)
-
-add_library("ProtocolHandler" ${SOURCES})
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/applink_protocol.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/applink_protocol.h
deleted file mode 100644
index 01d617c4b..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/applink_protocol.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_APPLINK_PROTOCOL_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_APPLINK_PROTOCOL_H_
-
-#include <stdint.h>
-
-namespace protocol_handler {
-
-enum FrameType {
- kFtControlFrame = 0x0,
- kFtSingleFrame = 0x1,
- kFtFirstFrame = 0x2,
- kFtConsecutiveFrame = 0x3,
- kFtReserved
-};
-
-enum ControlFrameType {
- kCftHeartBeat = 0x00,
- kCftStartService = 0x01,
- kCftStartServiceAck = 0x02,
- kCftStartServiceNAck = 0x03,
- kCftEndService = 0x04,
- kCftEndServiceAck = 0x05,
- kCftEndServiceNAck = 0x06,
- kCftReserved,
- kCftServiceDataAck = 0xFE,
- kCftHeartBeatAck = 0xFF
-};
-
-enum SingleFrameType {
- kSftValue = 0x00,
- kSftReserved
-};
-
-enum FirstFrameType {
- kFftValue = 0x00,
- kFftReserved
-};
-
-typedef uint8_t ConsecutiveFrameType;
-static const uint8_t kConsecutiveFrameLast = 0x00;
-
-typedef uint8_t SessionIdType;
-
-enum ControlFrameDataSizeType {
- kCfDsValue = 0x00,
- kCfDsReserved
-};
-
-enum FirstFrameDataSizeType {
- kFfDsValue = 0x08,
- kFfDsIncorrectValue
-};
-
-typedef uint32_t SingleFrameDataSizeType;
-typedef uint32_t ConsecutiveFrameDataSizeType;
-static const SingleFrameDataSizeType kSingleFrameDataSizeIncorrectValue = 0x0;
-static const ConsecutiveFrameDataSizeType kConsecutiveFrameDataSizeIncorrectValue = 0x0;
-
-typedef uint32_t MessageIdType;
-static const MessageIdType kMessageIdIncorrectValue = 0x0;
-
-typedef uint32_t SessionHashCode;
-static const SessionHashCode SessionHashCodeIncorrectValue = 0x0;
-
-struct ControlFrameHeartBeat {
- SessionIdType session_id;
- MessageIdType message_id;
-};
-
-struct ControlFrameHeartBeatAck {
- SessionIdType session_id;
- MessageIdType message_id;
-};
-
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_APPLINK_PROTOCOL_H_
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/message_priority.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/message_priority.h
deleted file mode 100644
index aca01de7a..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/message_priority.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_MESSAGE_PRIORITY_H
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_MESSAGE_PRIORITY_H
-
-#include <cstddef>
-
-#include "protocol_handler/service_type.h"
-
-namespace protocol_handler {
-
-// Class for calculating and tracking message priorities in the system
-// It was decided to wrap simple priority number into trivial class to
-// Have all priority value calculations in single place and
-// prevent random priorities assignment in the code
-class MessagePriority {
- public:
- // Default (in other words non-prioritized) priority value
- static const MessagePriority kDefault;
- // Static constructor to get priority value of Service type
- static MessagePriority FromServiceType(ServiceType service_type);
-
- // Trivial inline copy constructor
- MessagePriority(const MessagePriority& that): value_(that.value_) {}
-
- // Ordering value which is used by queues to order messages
- // Higher value means higher prioirty
- size_t OrderingValue() { return value_; }
- private:
- // Constructor is private to prevent creation
- // of random priorities in the code please use static constructor if you
- // need priority value
- explicit MessagePriority(int32_t value): value_(value) {}
- size_t value_;
-};
-
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_MESSAGE_PRIORITY_H
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler.h
deleted file mode 100644
index 31c5e8d0b..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * \file protocol_handler.h
- * \brief ProtocolHandler class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER
-
-#include "protocol_handler/raw_message.h"
-
-/**
- *\namespace NsProtocolHandler
- *\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
- */
-namespace protocol_handler {
-
-class ProtocolObserver;
-
-/**
- * \class ProtocolHandler
- * \brief Interface for component parsing protocol header
- * on the messages between SDL and mobile application.
- */
-class ProtocolHandler {
- public:
- /**
- * \brief Adds pointer to higher layer handler for message exchange
- * \param observer Pointer to object of the class implementing
- * IProtocolObserver
- */
- virtual void AddProtocolObserver(ProtocolObserver* observer) = 0;
-
- /**
- * \brief Removes pointer to higher layer handler for message exchange
- * \param observer Pointer to object of the class implementing
- * IProtocolObserver.
- */
- virtual void RemoveProtocolObserver(ProtocolObserver* observer) = 0;
-
- /**
- * \brief Method for sending message to Mobile Application.
- * \param message RawMessage with params to be sent to Mobile App.
- * \param final_message tells whether message's
- * connection must be closed when message is processed
- */
- virtual void SendMessageToMobileApp(const RawMessagePtr& message,
- bool final_message) = 0;
-
- /**
- * \brief Sends number of processed frames in case of binary nav streaming
- * \param connection_key Id of connection over which message is to be sent
- * \param number_of_frames Number of frames processed by
- * streaming server and displayed to user.
- */
- virtual void SendFramesNumber(int32_t connection_key, int32_t number_of_frames) = 0;
-
- protected:
- /**
- * \brief Destructor
- */
- virtual ~ProtocolHandler() {
- }
-};
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
deleted file mode 100644
index 745370019..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/**
- * \file protocol_handler.h
- * \brief ProtocolHandlerImpl class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER_IMPL_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER_IMPL_H_
-
-#include <map>
-#include <set>
-#include "utils/logger.h"
-#include "utils/prioritized_queue.h"
-#include "utils/message_queue.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/message_loop_thread.h"
-#include "utils/shared_ptr.h"
-
-#include "protocol_handler/protocol_handler.h"
-#include "protocol_handler/protocol_packet.h"
-#include "protocol_handler/session_observer.h"
-#include "protocol_handler/protocol_observer.h"
-#include "transport_manager/common.h"
-#include "transport_manager/transport_manager.h"
-#include "transport_manager/transport_manager_listener_empty.h"
-
-/**
- *\namespace NsProtocolHandler
- *\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
- */
-namespace protocol_handler {
-class ProtocolObserver;
-class SessionObserver;
-
-class MessagesFromMobileAppHandler;
-class MessagesToMobileAppHandler;
-
-using transport_manager::TransportManagerListenerEmpty;
-
-/**
- * @brief Type definition for variable that hold shared pointer to raw message.
- */
-typedef utils::SharedPtr<protocol_handler::ProtocolPacket> ProtocolFramePtr;
-
-typedef std::multimap<int32_t, RawMessagePtr> MessagesOverNaviMap;
-typedef std::set<ProtocolObserver*> ProtocolObservers;
-typedef transport_manager::ConnectionUID ConnectionID;
-
-namespace impl {
-/*
- * These dummy classes are here to locally impose strong typing on different
- * kinds of messages
- * Currently there is no type difference between incoming and outgoing messages
- * TODO(ik): replace these with globally defined message types
- * when we have them.
- */
-struct RawFordMessageFromMobile: public ProtocolFramePtr {
- explicit RawFordMessageFromMobile(const ProtocolFramePtr& message)
- : ProtocolFramePtr(message) {}
- // PrioritizedQueue requires this method to decide which priority to assign
- size_t PriorityOrder() const { return MessagePriority::FromServiceType(ServiceTypeFromByte(
- get()->service_type())).OrderingValue(); }
-};
-
-struct RawFordMessageToMobile: public ProtocolFramePtr {
- explicit RawFordMessageToMobile(const ProtocolFramePtr& message, bool final_message)
- : ProtocolFramePtr(message), is_final(final_message) {}
- // PrioritizedQueue requires this method to decide which priority to assign
- size_t PriorityOrder() const { return MessagePriority::FromServiceType(ServiceTypeFromByte(
- get()->service_type())).OrderingValue(); }
- // Signals whether connection to mobile must be closed after processing this message
- bool is_final;
-};
-
-// Short type names for prioritized message queues
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<RawFordMessageFromMobile> > FromMobileQueue;
-typedef threads::MessageLoopThread<
- utils::PrioritizedQueue<RawFordMessageToMobile> > ToMobileQueue;
-}
-
-/**
- * \class ProtocolHandlerImpl
- * \brief Class for handling message exchange between Transport and higher
- * layers. Receives message in form of array of bytes, parses its protocol,
- * handles according to parsing results (version number, start/end session etc
- * and if needed passes message to JSON Handler or notifies Connection Handler
- * about activities around sessions.
- */
-class ProtocolHandlerImpl
- : public ProtocolHandler,
- public TransportManagerListenerEmpty,
- public impl::FromMobileQueue::Handler,
- public impl::ToMobileQueue::Handler {
- public:
- /**
- * \brief Constructor
- * \param transportManager Pointer to Transport layer handler for
- * message exchange.
- */
- explicit ProtocolHandlerImpl(
- transport_manager::TransportManager* transport_manager_param);
-
- /**
- * \brief Destructor
- */
- ~ProtocolHandlerImpl();
-
- /**
- * \brief Adds pointer to higher layer handler for message exchange
- * \param observer Pointer to object of the class implementing
- * IProtocolObserver
- */
- void AddProtocolObserver(ProtocolObserver* observer);
-
- /**
- * \brief Removes pointer to higher layer handler for message exchange
- * \param observer Pointer to object of the class implementing
- * IProtocolObserver.
- */
- void RemoveProtocolObserver(ProtocolObserver* observer);
-
- /**
- * \brief Sets pointer for Connection Handler layer for managing sessions
- * \param observer Pointer to object of the class implementing
- * ISessionObserver
- */
- void set_session_observer(SessionObserver* observer);
-
- /**
- * \brief Method for sending message to Mobile Application
- * \param message Message with params to be sent to Mobile App
- */
- void SendMessageToMobileApp(const RawMessagePtr& message,
- bool final_message) OVERRIDE;
-
- /**
- * \brief Sends number of processed frames in case of binary nav streaming
- * \param connection_key Id of connection over which message is to be sent
- * \param number_of_frames Number of frames processed by
- * streaming server and displayed to user.
- */
- void SendFramesNumber(int32_t connection_key, int32_t number_of_frames);
-
- protected:
-
- /**
- * \brief Sends acknowledgement of starting session to mobile application
- * with session number and hash code for second version of protocol
- * \param connection_handle Identifier of connection within which session
- * was started
- * \param session_id ID of session to be sent to mobile application
- * \param protocol_version Version of protocol used for communication
- * \param hash_code For second version of protocol: identifier of session
- * to be sent to
- * mobile app for using when ending session
- * \param service_type Type of session: RPC or BULK Data. RPC by default
- */
- void SendStartSessionAck(
- ConnectionID connection_id,
- uint8_t session_id,
- uint8_t protocol_version,
- uint32_t hash_code = 0,
- uint8_t service_type = SERVICE_TYPE_RPC);
-
- /**
- * \brief Sends fail of starting session to mobile application
- * \param connection_handle Identifier of connection within which session
- * ment to be started
- * \param session_id ID of session to be sent to mobile application
- * \param protocol_version Version of protocol used for communication
- * \param service_type Type of session: RPC or BULK Data. RPC by default
- */
- void SendStartSessionNAck(
- ConnectionID connection_id,
- uint8_t session_id,
- uint8_t protocol_version,
- uint8_t service_type = SERVICE_TYPE_RPC);
-
- /**
- * \brief Sends acknowledgement of end session/service to mobile application
- * with session number and hash code for second version of protocol
- * \param connection_handle Identifier of connection within which session
- * was started
- * \param session_id ID of session to be sent to mobile application
- * \param protocol_version Version of protocol used for communication
- * \param hash_code For second version of protocol: identifier of session
- * to be sent to
- * mobile app for using when ending session.
- * \param service_type Type of session: RPC or BULK Data. RPC by default
- */
- void SendEndSessionAck(
- ConnectionID connection_id ,
- uint8_t session_id,
- uint8_t protocol_version,
- uint32_t hash_code = 0,
- uint8_t service_type = SERVICE_TYPE_RPC);
-
- /**
- * \brief Sends fail of ending session to mobile application
- * \param connection_handle Identifier of connection within which
- * session exists
- * \param session_id ID of session ment to be ended
- * \param protocol_version Version of protocol used for communication
- * \param service_type Type of session: RPC or BULK Data. RPC by default
- */
- void SendEndSessionNAck(
- ConnectionID connection_id ,
- uint32_t session_id,
- uint8_t protocol_version,
- uint8_t service_type = SERVICE_TYPE_RPC);
-
- private:
- /*
- * Prepare and send heartbeat acknowledge message
- */
- RESULT_CODE SendHeartBeatAck(ConnectionID connection_id,
- uint8_t session_id,
- uint32_t message_id);
-
- /**
- * @brief Notifies about receiving message from TM.
- *
- * @param message Received message
- **/
- virtual void OnTMMessageReceived(
- const RawMessagePtr message);
-
- /**
- * @brief Notifies about error on receiving message from TM.
- *
- * @param error Occurred error
- **/
- virtual void OnTMMessageReceiveFailed(
- const transport_manager::DataReceiveError& error);
-
- /**
- * @brief Notifies about successfully sending message.
- *
- **/
- virtual void OnTMMessageSend(const RawMessagePtr message);
-
- /**
- * @brief Notifies about error occurred during
- * sending message.
- *
- * @param error Describes occurred error.
- * @param message Message during sending which error occurred.
- **/
- virtual void OnTMMessageSendFailed(
- const transport_manager::DataSendError& error,
- const RawMessagePtr& message);
-
- /**
- * @brief Notifies subscribers about message
- * recieved from mobile device.
- * @param message Message with already parsed header.
- */
- void NotifySubscribers(const RawMessagePtr& message);
-
- /**
- * \brief Sends message which size permits to send it in one frame.
- * \param connection_handle Identifier of connection through which message
- * is to be sent.
- * \param session_id ID of session through which message is to be sent.
- * \param protocol_version Version of Protocol used in message.
- * \param service_type Type of session, RPC or BULK Data
- * \param data_size Size of message excluding protocol header
- * \param data Message string
- * \param compress Compression flag
- * \return \saRESULT_CODE Status of operation
- */
- RESULT_CODE SendSingleFrameMessage(
- ConnectionID connection_id,
- const uint8_t session_id,
- uint32_t protocol_version,
- const uint8_t service_type,
- const uint32_t data_size,
- const uint8_t* data,
- const bool compress);
-
- /**
- * \brief Sends message which size doesn't permit to send it in one frame.
- * \param connection_handle Identifier of connection through which message
- * is to be sent.
- * \param session_id ID of session through which message is to be sent.
- * \param protocol_version Version of Protocol used in message.
- * \param service_type Type of session, RPC or BULK Data
- * \param data_size Size of message excluding protocol header
- * \param data Message string
- * \param compress Compression flag
- * \param max_data_size Maximum allowed size of single frame.
- * \return \saRESULT_CODE Status of operation
- */
- RESULT_CODE SendMultiFrameMessage(
- ConnectionID connection_id,
- const uint8_t session_id,
- uint32_t protocol_version,
- const uint8_t service_type,
- const uint32_t data_size,
- const uint8_t* data,
- const bool compress,
- const uint32_t max_data_size);
-
- /**
- * \brief Sends message already containing protocol header.
- * \param connection_handle Identifier of connection through which message
- * is to be sent.
- * \param packet Message with protocol header.
- * \return \saRESULT_CODE Status of operation
- */
- RESULT_CODE SendFrame(
- ConnectionID connection_id,
- const ProtocolPacket& packet);
-
- /**
- * \brief Handles received message.
- * \param connection_handle Identifier of connection through which message
- * is received.
- * \param packet Received message with protocol header.
- * \return \saRESULT_CODE Status of operation
- */
- RESULT_CODE HandleMessage(
- ConnectionID connection_id ,
- const ProtocolFramePtr& packet);
-
- /**
- * \brief Handles message received in multiple frames. Collects all frames
- * of message.
- * \param connection_handle Identifier of connection through which message
- * is received.
- * \param packet Current frame of message with protocol header.
- * \return \saRESULT_CODE Status of operation
- */
- RESULT_CODE HandleMultiFrameMessage(
- ConnectionID connection_id ,
- const ProtocolFramePtr& packet);
-
- /**
- * \brief Handles message received in single frame.
- * \param connection_handle Identifier of connection through which message
- * is received.
- * \param packet Received message with protocol header.
- * \return \saRESULT_CODE Status of operation
- */
- RESULT_CODE HandleControlMessage(
- ConnectionID connection_id ,
- const ProtocolFramePtr& packet);
-
- RESULT_CODE HandleControlMessageEndSession(
- ConnectionID connection_id ,
- const ProtocolPacket& packet);
-
- RESULT_CODE HandleControlMessageStartSession(
- ConnectionID connection_id ,
- const ProtocolPacket& packet);
-
- RESULT_CODE HandleControlMessageHeartBeat(
- ConnectionID connection_id ,
- const ProtocolPacket& packet);
-
- /**
- * \brief Sends Mobile Navi Ack message
- */
- RESULT_CODE SendMobileNaviAck(
- ConnectionID connection_id ,
- int32_t connection_key);
-
- // threads::MessageLoopThread<*>::Handler implementations
- // CALLED ON raw_ford_messages_from_mobile_ thread!
- void Handle(const impl::RawFordMessageFromMobile& message);
- // CALLED ON raw_ford_messages_to_mobile_ thread!
- void Handle(const impl::RawFordMessageToMobile& message);
- private:
- /**
- * \brief For logging.
- */
- static log4cxx::LoggerPtr logger_;
-
- /**
- *\brief Pointer on instance of class implementing IProtocolObserver
- *\brief (JSON Handler)
- */
- ProtocolObservers protocol_observers_;
-
- /**
- *\brief Pointer on instance of class implementing ISessionObserver
- *\brief (Connection Handler)
- */
- SessionObserver* session_observer_;
-
- /**
- *\brief Pointer on instance of Transport layer handler for message exchange.
- */
- transport_manager::TransportManager* transport_manager_;
-
- /**
- *\brief Map of frames for messages received in multiple frames.
- */
- std::map<int32_t, ProtocolFramePtr> incomplete_multi_frame_messages_;
-
- /**
- * \brief Map of messages (frames) recieved over mobile nave session
- * for map streaming.
- */
- MessagesOverNaviMap message_over_navi_session_;
-
- /**
- * \brief Untill specified otherwise, amount of message recievied
- * over streaming session to send Ack
- */
- const uint32_t kPeriodForNaviAck;
-
- /**
- *\brief Counter of messages sent in each session.
- */
- std::map<uint8_t, uint32_t> message_counters_;
-
- // Thread that pumps non-parsed messages coming from mobile side.
- impl::FromMobileQueue raw_ford_messages_from_mobile_;
- // Thread that pumps messages prepared to being sent to mobile side.
- impl::ToMobileQueue raw_ford_messages_to_mobile_;
-};
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER_IMPL_H_
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_observer.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_observer.h
deleted file mode 100644
index e2dcf8320..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_observer.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * \file IProtocolObserver.h
- * \brief IProtocolObserver class header.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_OBSERVER_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_OBSERVER_H_
-
-#include "protocol_handler/raw_message.h"
-#include "utils/shared_ptr.h"
-
-/**
- *\namespace NsProtocolHandler
- *\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
- */
-namespace protocol_handler {
-
-typedef utils::SharedPtr<RawMessage> RawMessagePtr;
-
-/**
- * \class IProtocolObserver
- * \brief Interface for making a bridge between
- * ProtocolHandler and JSONHandler components.
- */
-class ProtocolObserver {
- public:
- /**
- * \brief Callback function which is used by ProtocolHandler
- * when new message is received from Mobile Application.
- * \param message Message with supporting params received
- */
- virtual void OnMessageReceived(const RawMessagePtr& message) = 0;
-
- virtual void OnMobileMessageSent(const RawMessagePtr& message) = 0;
-
-
- protected:
- /**
- * \brief Destructor
- */
- virtual ~ProtocolObserver() {
- }
-};
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_OBSERVER_H_
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_packet.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
deleted file mode 100644
index 3775439fb..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/**
- * \file ProtocolPacket.h
- * \brief ProtocolPacket class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PACKET_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PACKET_H_
-
-#include "utils/macro.h"
-
-/**
- *\namespace NsProtocolHandler
- *\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
- */
-namespace protocol_handler {
-/**
- *\brief Size of protocol header for first version of protocol.
- */
-const uint8_t PROTOCOL_HEADER_V1_SIZE = 8;
-
-/**
- *\brief Size of protocol header for second version of protocol.
- */
-const uint8_t PROTOCOL_HEADER_V2_SIZE = 12;
-
-/**
- *\brief Constant: number of protocol version (1).
- */
-const uint8_t PROTOCOL_VERSION_1 = 0x01;
-
-/**
- *\brief Constant: number of protocol version (2).
- */
-const uint8_t PROTOCOL_VERSION_2 = 0x02;
-
-/**
- *\brief Constant: flag of no compression
- */
-const bool COMPRESS_OFF = false;
-
-/**
- *\brief Constant: Control type of frame used in protocol header.
- */
-const uint8_t FRAME_TYPE_CONTROL = 0x00;
-
-/**
- *\brief Constant: Single type of frame used in protocol header.
- */
-const uint8_t FRAME_TYPE_SINGLE = 0x01;
-
-/**
- *\brief Constant: First frame for multiple frames used in protocol header.
- */
-const uint8_t FRAME_TYPE_FIRST = 0x02;
-
-/**
- *\brief Constant: Consecutive type of frame for multiple frames used in
- *\brief protocol header.
- */
-const uint8_t FRAME_TYPE_CONSECUTIVE = 0x03;
-
-
-/**
- *\brief Constant: Frame type for HeartBeat
- */
-const uint8_t SERVICE_TYPE_ZERO = 0x00;
-
-/**
- *\brief Constant: RPC type of session
- */
-const uint8_t SERVICE_TYPE_RPC = 0x07;
-
-/**
- *\brief Constant: Raw PCM audio service
- */
-const uint8_t SERVICE_TYPE_AUDIO = 0x0A;
-
-/**
- * \brief Constant: Mobile Navi type of session for map streaming
- */
-const uint8_t SERVICE_TYPE_NAVI = 0x0B;
-
-/**
- *\brief Constant: Bulk data type of session (hybrid)
- */
-const uint8_t SERVICE_TYPE_BULK = 0x0F;
-
-/**
- *\brief Unused: If FRAME_TYPE_CONTROL: Constant: Frame is for heart beat.
- */
-const uint8_t FRAME_DATA_HEART_BEAT = 0x00;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: Start service frame
- */
-const uint8_t FRAME_DATA_START_SERVICE = 0x01;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: Start service acknowledgement frame
- */
-const uint8_t FRAME_DATA_START_SERVICE_ACK = 0x02;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: Start service not acknowledgement
- *\brief frame
- */
-const uint8_t FRAME_DATA_START_SERVICE_NACK = 0x03;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: End service request frame
- */
-const uint8_t FRAME_DATA_END_SERVICE = 0x04;
-
-/**
- * \brief if FRAME_TYPE_CONTROL: Constant: End service acknowledgement frame
- */
-const uint8_t FRAME_DATA_END_SERVICE_ACK = 0x05;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: End service not acknowledgement frame
- */
-const uint8_t FRAME_DATA_END_SERVICE_NACK = 0x06;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: Service data ACK frame
- */
-const uint8_t FRAME_DATA_SERVICE_DATA_ACK = 0xFE;
-
-/**
- *\brief Unused: If FRAME_TYPE_CONTROL: Constant: Frame is for heart beat ack.
- */
-const uint8_t FRAME_DATA_HEART_BEAT_ACK = 0xFF;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: Maximum of consecutive frame numbers
- * after which count has to roll over to 0x01
- */
-const uint8_t FRAME_DATA_MAX_VALUE = 0xFF;
-
-/**
- *\brief If FRAME_TYPE_CONTROL: Constant: Maximum size of one frame excluding
- *\brief frame header.
- */
-const uint32_t MAXIMUM_FRAME_DATA_SIZE = 1488;
-
-/**
- *\brief If FRAME_TYPE_CONSECUTIVE: Constant: Marks last frame in mutliframe
- *\brief message.
- */
-const uint8_t FRAME_DATA_LAST_FRAME = 0x00;
-
-/**
- *\brief If FRAME_TYPE_CONSECUTIVE: Constant: Size of first frame in
- *\brief mutliframe message.
- */
-const uint8_t FIRST_FRAME_DATA_SIZE = 0x08;
-
-/**
- *\enum RESULT_CODE
- *\brief Return type for operations with message handling.
- */
-enum RESULT_CODE {
- RESULT_OK = 1,
- RESULT_FAIL = 2,
- RESULT_NUMBER_BUSY = 3,
- RESULT_CONNECTION_LOST = 4,
- RESULT_DISCONNECTED = 5,
- RESULT_NOTFOUND = 6,
- RESULT_TIMEOUT = 7,
- RESULT_WRONG_SEQUENCE = 8,
- RESULT_AGAIN = 9,
- RESULT_WRONG_FRAME_SEQUENCE = 10,
- RESULT_IN_PROGRESS = 11,
- RESULT_REASSIGN = 12,
- RESULT_XML_PARSING = 13,
- RESULT_RESEND_ACK = 14,
- RESULT_DEFRERRED = 15,
- RESULT_UNKNOWN = 255
-};
-
-/**
- * \struct ProtocolHeader
- * \brief Used for storing protocol header of a message.
- */
-// TODO(AK): Can we move this to cc file?
-struct ProtocolHeader {
- /**
- * \brief Constructor
- */
- ProtocolHeader()
- : version(0x00),
- compress(0x00),
- frameType(0x00),
- serviceType(0x00),
- frameData(0x00),
- sessionId(0x00),
- dataSize(0x00),
- messageId(0x00) {
- }
-
- /**
- *\brief Version of protocol
- */
- uint8_t version;
-
- /**
- *\brief Compression flag
- */
- bool compress;
-
- /**
- *\brief Type of frame (Single/First/Consecutive)
- */
- uint8_t frameType;
-
- /**
- *\brief Type of service (RPC/Buld data)
- */
- uint8_t serviceType;
-
- /**
- *\brief Data about frame (Start/End session etc)
- */
- uint8_t frameData;
-
- /**
- *\brief Session number withing connection
- */
- uint8_t sessionId;
-
- /**
- *\brief Size of message itself, excluding size of header
- */
- uint32_t dataSize;
-
- /**
- *\brief Used only in second versin of protocol: Message ID
- */
- uint32_t messageId;
-};
-
-/**
- * \struct ProtocolData
- * \brief Used for storing message and its size.
- */
-struct ProtocolData {
- ProtocolData()
- : data(0),
- totalDataBytes(0x00) {
- }
-
- uint8_t* data;
- uint32_t totalDataBytes;
-};
-
-/**
- * \class ProtocolPacket
- * \brief Class for forming/parsing protocol headers of the message and
- * handling multiple frames of the message.
- */
-class ProtocolPacket {
- public:
- /**
- * \brief Default constructor
- */
- ProtocolPacket();
-
- /**
- * \brief Cconstructor
- *
- * \param connectionKey Identifier of connection within wich message
- * is transferred
- * \param data Message string
- * \param dataSize Message size
- */
- ProtocolPacket(uint8_t connection_key, uint8_t* data_param,
- uint32_t data_size);
-
- /**
- * \brief Constructor
- * \param version Version of protocol
- * \param compress Compression flag
- * \param frameType Type of frame (Single/First/Consecutive)
- * \param serviceType Type of session (RPC/Bulk data)
- * \param frameData Information about frame: start/end session, number of
- * frame, etc
- * \param sessionID Number of frame within connection
- * \param dataSize Size of message string
- * \param messageID ID of message or hash code - only for second protocol
- * \param data Message string if provided
- */
- ProtocolPacket(uint8_t connection_key,
- uint8_t version, bool compress, uint8_t frameType,
- uint8_t serviceType, uint8_t frameData,
- uint8_t sessionId, uint32_t dataSize,
- uint32_t messageID, const uint8_t* data = 0,
- uint32_t packet_id = 0);
- /**
- * \brief Destructor
- */
- ~ProtocolPacket();
-
- /*Serialization*/
- /**
- * \brief Serializes info about message into protocol header.
- * \param version Version of protocol
- * \param compress Compression flag
- * \param frameType Type of frame (Single/First/Consecutive)
- * \param serviceType Type of session (RPC/Bulk data)
- * \param frameData Information about frame: start/end session, number of
- * frame, etc
- * \param sessionID Number of frame within connection
- * \param dataSize Size of message string
- * \param messageID ID of message or hash code - only for second protocol
- * \param data Message string if provided
- * \return \saRESULT_CODE Status of serialization
- */
- RESULT_CODE serializePacket(uint8_t version, bool compress,
- uint8_t frameType,
- uint8_t serviceType,
- uint8_t frameData, uint8_t sessionId,
- uint32_t dataSize, uint32_t messageID,
- const uint8_t* data = 0);
-
- /**
- * \brief Appends message frame to existing message in
- * recieving multiframe messages.
- * \param chunkData Current frame's message string
- * \param chunkDataSize Size of current message string
- * \return \saRESULT_CODE Status of serialization
- */
- RESULT_CODE appendData(uint8_t* chunkData, uint32_t chunkDataSize);
-
- /**
- * \brief Getter of serialized message with protocol header
- * \return uint8_t * Message string or 0 if not serialized properly.
- */
- uint8_t* packet() const;
-
- /**
- * \brief Getter of message ID
- * \return uint32_t size of message string
- */
- uint32_t packet_size() const;
-
- /**
- * \brief Getter of message size including protocol header
- * \return uint32_t size of message string
- */
- uint32_t packet_id() const;
-
- /*End of Serialization*/
-
- /*Deserialization*/
-
- /**
- * \brief Parses protocol header
- * \param message Incoming message string containing both header and
- * message body
- * \param messageSize Incoming message size
- * \return \saRESULT_CODE Status of serialization
- */
- RESULT_CODE deserializePacket(const uint8_t* message,
- uint32_t messageSize);
-
- /**
- * \brief Getter of protocol version.
- */
- uint8_t protocol_version() const;
-
- /**
- * \brief Getter of compression flag
- */
- bool is_compress() const;
-
- /**
- * \brief Getter of frame type (single/first/etc)
- */
- uint8_t frame_type() const;
-
- /**
- *\brief Getter of service type (RPC/Bulk data)
- */
- uint8_t service_type() const;
-
- /**
- *\brief Getter of frame data (start/end session, number of frame etc)
- */
- uint8_t frame_data() const;
-
- /**
- *\brief Getter of session number
- */
- uint8_t session_id() const;
-
- /**
- *\brief Getter of size of message body
- */
- uint32_t data_size() const;
-
- /**
- *\brief Getter of message id for second version of protocol
- */
- uint32_t message_id() const;
-
- /**
- *\brief Getter of message string
- */
- uint8_t* data() const;
-
- /**
- *\brief Setter for size of multiframe message
- */
- void set_total_data_bytes(uint32_t dataBytes);
-
- /**
- *\brief Getter for size of multiframe message
- */
- uint32_t total_data_bytes() const;
- /*End of Deserialization*/
-
- /**
- * \brief Getter for Connection Identifier
- */
- uint8_t connection_key() const;
-
- private:
- /**
- *\brief Serialized message string
- */
- uint8_t* packet_;
-
- /**
- *\brief Serialized message string size
- */
- uint32_t total_packet_size_;
-
- /**
- *\brief Protocol header
- */
- ProtocolHeader packet_header_;
-
- /**
- *\brief Message body
- */
- ProtocolData packet_data_;
-
- /**
- *\brief Offset for multiframe messages
- */
- uint32_t data_offset_;
-
- /**
- *\brief ID for multiframe messages
- */
- uint32_t packet_id_;
-
- /**
- * \brief Connection Identifier
- * Obtained from connection_handler
- */
- uint8_t connection_key_;
-
- DISALLOW_COPY_AND_ASSIGN(ProtocolPacket);
-};
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PACKET_H_
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_payload.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_payload.h
deleted file mode 100644
index 2454e62cb..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/protocol_payload.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PAYLOAD_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PAYLOAD_H_
-
-#include <stdint.h>
-#include <ostream>
-#include <string>
-#include <vector>
-
-#include "protocol_handler/rpc_type.h"
-
-namespace utils {
-class BitStream;
-}
-
-namespace protocol_handler {
-
-// Applink Protocolv5 4.1.2 Protocol Payload Binary header
-struct ProtocolPayloadHeaderV2 {
- ProtocolPayloadHeaderV2()
- : rpc_type(kRpcTypeReserved),
- rpc_function_id(0), corellation_id(0), json_size(0) {}
- RpcType rpc_type;
- uint32_t rpc_function_id;
- uint32_t corellation_id;
- uint32_t json_size;
-};
-
-// Applink Protocolv5 4.1.1 Protocol Message Payload
-struct ProtocolPayloadV2 {
- ProtocolPayloadHeaderV2 header;
- std::string json;
- std::vector<uint8_t> data;
-};
-
-// Procedures that extract and validate defined protocol structures from
-// a bit stream.
-// If error during parsing is detected, bit stream is marked as invalid
-void Extract(utils::BitStream* bs, ProtocolPayloadHeaderV2* headerv2);
-void Extract(utils::BitStream* bs, ProtocolPayloadV2* payload, size_t payload_size);
-
-std::ostream& operator<<(std::ostream& os, const ProtocolPayloadHeaderV2& payload_header);
-std::ostream& operator<<(std::ostream& os, const ProtocolPayloadV2& payload);
-
-} // namespace protocol_handler
-
-#endif /* SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PAYLOAD_H_ */
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/raw_message.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/raw_message.h
deleted file mode 100644
index 6b712b8a0..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/raw_message.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * \file SmartDeviceLinkRawMessage.h
- * \brief SmartDeviceLinkRawMessage class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_RAW_MESSAGE_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_RAW_MESSAGE_H_
-
-#include "utils/macro.h"
-#include "utils/shared_ptr.h"
-#include "protocol_handler/service_type.h"
-#include "protocol_handler/message_priority.h"
-
-/**
- *\namespace NsProtocolHandler
- *\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
- */
-
-namespace protocol_handler {
-/**
- * \class SmartDeviceLinkRawMessage
- * \brief Class-wraper for information about message for interchanging
- * between components.
- */
-class RawMessage {
- public:
- /**
- * \brief Constructor
- * \param connectionKey Identifier of connection within wich message
- * is transferred
- * \param protocolVersion Version of protocol of the message
- * \param data Message string
- * \param dataSize Message size
- */
- RawMessage(int32_t connectionKey, uint32_t protocolVersion,
- uint8_t* data_param, uint32_t dataSize,
- uint8_t type = ServiceType::kRpc);
-
- /**
- * \brief Destructor
- */
- ~RawMessage();
-
- /**
- * \brief Getter for connection identifier
- */
- int32_t connection_key() const;
-
- void set_connection_key(uint32_t);
-
- /**
- * \brief Getter for message string
- */
- uint8_t* data() const;
-
- /**
- * \brief Getter for message size
- */
- uint32_t data_size() const;
-
- /**
- * \brief Getter for protocol version
- */
- uint32_t protocol_version() const;
-
- /**
- * \brief Getter for service type
- */
- ServiceType service_type() const {
- return service_type_;
- }
-
- bool IsWaiting() const;
-
- void set_waiting(bool v);
-
- /*
- * \brief Priority of this message based on it's service type
- */
- MessagePriority Priority() const;
-
- private:
- /**
- * \brief Connection Identifier
- * Obtained from \saCconnection_handler
- */
- int32_t connection_key_;
-
- /**
- * \brief Message string
- */
- uint8_t* data_;
-
- /**
- * \brief Size of message
- */
- uint32_t data_size_;
-
- /**
- * \brief Version of SmartDeviceLink protocol (currently 1,2)
- * used for tranferring message.
- */
- uint32_t protocol_version_;
-
- /**
- * \brief Type of service message belongs to
- */
- ServiceType service_type_;
-
- /**
- * specifies current state of message in queue. if false message is "ready to be processed"
- * otherwise it is "waiting for response"
- *
- */
- bool waiting_;
-
- /**
- * \brief Specifies if this is binary data
- * (used by ProtocolObserver).
- */
- bool fully_binary_;
-
- /**
- * \brief Id of connection (for service messages like start/end session)
- *
- */
-
- DISALLOW_COPY_AND_ASSIGN(RawMessage);
-};
-
-typedef utils::SharedPtr<RawMessage> RawMessagePtr;
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_RAW_MESSAGE_H_
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/rpc_type.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/rpc_type.h
deleted file mode 100644
index 85dcdd1cb..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/rpc_type.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_RPC_TYPE_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_RPC_TYPE_H_
-
-#include <stdint.h>
-#include <ostream>
-
-namespace protocol_handler {
-
-// AppLink protocol 4.1.3 RpcType field
-enum RpcType {
- kRpcTypeRequest = 0x0,
- kRpcTypeResponse = 0x1,
- kRpcTypeNotification = 0x2,
- kRpcTypeReserved
-};
-
-// Validate and map byte value to RPC type
-RpcType RpcTypeFromByte(uint8_t byte);
-// Check and convert RpcType to byte value ready to be transmitted
-uint8_t RpcTypeToByte(RpcType type);
-
-const char* RpcTypeToString(RpcType type);
-
-std::ostream& operator<<(std::ostream& os, RpcType rpc_type);
-
-} // namespace protocol_handler
-
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_RPC_TYPE_H_
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/service_type.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/service_type.h
deleted file mode 100644
index 32a29836b..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/service_type.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_SERVICE_TYPE_H
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_SERVICE_TYPE_H
-
-#include <stdint.h>
-
-#include "protocol_handler/protocol_packet.h"
-
-namespace protocol_handler {
-
-/**
- * \brief Enum describing possible types of sessions: RPC for API messages,
- Navi for video streaming, bulk for PutFile.
- */
-enum ServiceType {
- kZero = SERVICE_TYPE_ZERO,
- kRpc = SERVICE_TYPE_RPC,
- kAudio = SERVICE_TYPE_AUDIO,
- kMobileNav = SERVICE_TYPE_NAVI,
- kBulk = SERVICE_TYPE_BULK,
- kInvalidServiceType
-};
-
-/*
- * Service type conversion functions that are used to read and output
- * Service types to binary stream
- */
-ServiceType ServiceTypeFromByte(uint8_t type);
-uint8_t ServiceTypeToByte(ServiceType type);
-
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_SERVICE_TYPE_H
diff --git a/SDL_Core/src/components/protocol_handler/include/protocol_handler/session_observer.h b/SDL_Core/src/components/protocol_handler/include/protocol_handler/session_observer.h
deleted file mode 100644
index 9151b9dcc..000000000
--- a/SDL_Core/src/components/protocol_handler/include/protocol_handler/session_observer.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * \file ISessionObserver.h
- * \brief ISessionObserver class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_SESSION_OBSERVER_H_
-#define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_SESSION_OBSERVER_H_
-
-#include <list>
-#include <string>
-#include "transport_manager/transport_manager.h"
-#include "connection_handler/connection_handler.h"
-
-/**
- *\namespace NsProtocolHandler
- *\brief Namespace for SmartDeviceLink ProtocolHandler related functionality.
- */
-namespace protocol_handler {
-/**
- * \class SessionObserver
- * \brief Interface for making a bridge between ProtocolHandler and
- * ConnectionHandler components.
- */
-class SessionObserver {
- public:
- /**
- * \brief Callback function used by ProtocolHandler
- * when Mobile Application initiates start of new session.
- * \param connection_handle Connection identifier whithin which session
- * has to be started.
- * \param sessionId Identifier of the session to be ended
- * \return int32_t Id (number) of new session if successful otherwise -1.
- */
- virtual int32_t OnSessionStartedCallback(
- const transport_manager::ConnectionUID& connection_handle,
- const uint8_t& sessionId,
- const ServiceType& service_type) = 0;
-
- /**
- * \brief Callback function used by ProtocolHandler
- * when Mobile Application initiates session ending.
- * \param connection_handle Connection identifier whithin which session exists
- * \param sessionId Identifier of the session to be ended
- * \param hashCode Hash used only in second version of SmartDeviceLink protocol.
- * If not equal to hash assigned to session on start then operation fails.
- * \return uint32_t 0 if operation fails session key otherwise
- */
- virtual uint32_t OnSessionEndedCallback(
- const transport_manager::ConnectionUID& connection_handle,
- const uint8_t& sessionId,
- const uint32_t& hashCode,
- const ServiceType& service_type) = 0;
-
- /**
- * \brief Creates unique identifier of session (can be used as hash)
- * from given connection identifier
- * whithin which session exists and session number.
- * \param connection_handle Connection identifier whithin which session exists
- * \param sessionId Identifier of the session
- * \return uint32_t Unique key for session
- */
- virtual uint32_t KeyFromPair(
- transport_manager::ConnectionUID connection_handle,
- uint8_t sessionId) = 0;
-
- /**
- * \brief Returns connection identifier and session number from given
- * session key
- * \param key Unique key used by other components as session identifier
- * \param connection_handle Returned: Connection identifier whithin which
- * session exists
- * \param sessionId Returned: Number of session
- */
- virtual void PairFromKey(
- uint32_t key,
- transport_manager::ConnectionUID* connection_handle,
- uint8_t* sessionId) = 0;
-
- /**
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- virtual int32_t GetDataOnSessionKey(uint32_t key,
- uint32_t* app_id,
- std::list<int32_t>* sessions_list,
- uint32_t* device_id) = 0;
-
- /**
- * \brief information about given Connection Key.
- * \param key Unique key used by other components as session identifier
- * \param app_id Returned: ApplicationID
- * \param sessions_list Returned: List of session keys
- * \param device_id Returned: DeviceID
- * \return int32_t -1 in case of error or 0 in case of success
- */
- virtual int32_t GetDataOnDeviceID(
- uint32_t device_handle,
- std::string* device_name,
- std::list<uint32_t>* applications_list,
- std::string* mac_address) = 0;
-
- protected:
- /**
- * \brief Destructor
- */
- virtual ~SessionObserver() {
- }
-};
-} // namespace protocol_handler
-
-#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_SESSION_OBSERVER_H_
diff --git a/SDL_Core/src/components/protocol_handler/src/applink_protocol.cc b/SDL_Core/src/components/protocol_handler/src/applink_protocol.cc
deleted file mode 100644
index ed22420a2..000000000
--- a/SDL_Core/src/components/protocol_handler/src/applink_protocol.cc
+++ /dev/null
@@ -1 +0,0 @@
-#include "protocol_handler/applink_protocol.h"
diff --git a/SDL_Core/src/components/protocol_handler/src/message_priority.cc b/SDL_Core/src/components/protocol_handler/src/message_priority.cc
deleted file mode 100644
index 7a9c30d68..000000000
--- a/SDL_Core/src/components/protocol_handler/src/message_priority.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "protocol_handler/service_type.h"
-#include "protocol_handler/message_priority.h"
-
-#include "utils/logger.h"
-#include "utils/macro.h"
-
-namespace {
-log4cxx::LoggerPtr g_logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ConnectionHandler"));
-}
-
-namespace protocol_handler {
-
-// static
-const MessagePriority MessagePriority::kDefault = MessagePriority(0);
-
-// static
-MessagePriority MessagePriority::FromServiceType(ServiceType service_type) {
- size_t message_priority_value = size_t(service_type);
- DCHECK(message_priority_value <= 0xFF);
- // According to Applink Protocol Specification v5 service with numerically
- // lower service type identifiers have higher priority
- return MessagePriority(0xFF - service_type);
-}
-
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/protocol_handler/src/protocol_handler_impl.cc b/SDL_Core/src/components/protocol_handler/src/protocol_handler_impl.cc
deleted file mode 100644
index 3eb4b6861..000000000
--- a/SDL_Core/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ /dev/null
@@ -1,781 +0,0 @@
-/**
- * \file ProtocolHandler.cpp
- * \brief ProtocolHandler class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "protocol_handler/protocol_handler_impl.h"
-
-#include <memory.h>
-
-#include "connection_handler/connection_handler_impl.h"
-#include "config_profile/profile.h"
-
-namespace protocol_handler {
-
-log4cxx::LoggerPtr ProtocolHandlerImpl::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ProtocolHandler"));
-
-
-/**
- * Function return packet data as std::string.
- * If packet data is not printable return error message
- */
-std::string ConvertPacketDataToString(const uint8_t *data,
- const std::size_t data_size);
-
-const size_t kStackSize = 32768;
-
-ProtocolHandlerImpl::ProtocolHandlerImpl(
- transport_manager::TransportManager* transport_manager_param)
- : protocol_observers_(),
- session_observer_(0),
- transport_manager_(transport_manager_param),
- kPeriodForNaviAck(5),
- raw_ford_messages_from_mobile_(
- "MessagesFromMobileAppHandler", this,
- threads::ThreadOptions(kStackSize)),
- raw_ford_messages_to_mobile_(
- "MessagesToMobileAppHandler", this,
- threads::ThreadOptions(kStackSize)) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-ProtocolHandlerImpl::~ProtocolHandlerImpl() {
- if (!protocol_observers_.empty()) {
- LOG4CXX_WARN(logger_, "Not all observers have unsubscribed"
- " from ProtocolHandlerImpl");
- }
-}
-
-void ProtocolHandlerImpl::AddProtocolObserver(ProtocolObserver* observer) {
- if (!observer) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to IProtocolObserver.");
- return;
- }
-
- protocol_observers_.insert(observer);
-}
-
-void ProtocolHandlerImpl::RemoveProtocolObserver(ProtocolObserver* observer) {
- if (!observer) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to IProtocolObserver.");
- return;
- }
-
- protocol_observers_.erase(observer);
-}
-
-void ProtocolHandlerImpl::set_session_observer(SessionObserver* observer) {
- if (!observer) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to ISessionObserver.");
- return;
- }
-
- session_observer_ = observer;
-}
-
-void ProtocolHandlerImpl::SendStartSessionAck(ConnectionID connection_id,
- uint8_t session_id,
- uint8_t protocol_version,
- uint32_t hash_code,
- uint8_t service_type) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- PROTOCOL_VERSION_2, COMPRESS_OFF, FRAME_TYPE_CONTROL,
- service_type, FRAME_DATA_START_SERVICE_ACK, session_id,
- 0, hash_code));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- LOG4CXX_INFO(logger_,
- "sendStartSessionAck() for connection " << connection_id
- << " for service_type " << static_cast<int32_t>(service_type)
- << " session_id " << static_cast<int32_t>(session_id));
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
- uint8_t session_id,
- uint8_t protocol_version,
- uint8_t service_type) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- protocol_version, COMPRESS_OFF, FRAME_TYPE_CONTROL,
- service_type, FRAME_DATA_START_SERVICE_NACK,
- session_id, 0, 0));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- LOG4CXX_INFO(logger_,
- "sendStartSessionNAck() for connection " << connection_id
- << " for service_type " << static_cast<int32_t>(service_type)
- << " session_id " << static_cast<int32_t>(session_id));
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id,
- uint32_t session_id,
- uint8_t protocol_version,
- uint8_t service_type) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- protocol_version, COMPRESS_OFF, FRAME_TYPE_CONTROL,
- service_type, FRAME_DATA_END_SERVICE_NACK,
- session_id, 0, 0));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- LOG4CXX_INFO(logger_, "SendEndSessionNAck() for connection " << connection_id
- << " for service_type " << static_cast<int32_t>(service_type)
- << " session_id " << static_cast<int32_t>(session_id));
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
- uint8_t session_id,
- uint8_t protocol_version,
- uint32_t hash_code,
- uint8_t service_type) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- protocol_version, COMPRESS_OFF, FRAME_TYPE_CONTROL,
- service_type, FRAME_DATA_END_SERVICE_ACK, session_id, 0,
- hash_code));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- LOG4CXX_INFO(logger_,
- "SendEndSessionAck() for connection " << connection_id
- << " for service_type " << static_cast<int32_t>(service_type)
- << " session_id " << static_cast<int32_t>(session_id));
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
- uint8_t session_id,
- uint32_t message_id) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- PROTOCOL_VERSION_2, COMPRESS_OFF, FRAME_TYPE_CONTROL,
- SERVICE_TYPE_ZERO, FRAME_DATA_HEART_BEAT_ACK, session_id,
- 0, message_id));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_OK;
-}
-
-void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr& message,
- bool final_message) {
- LOG4CXX_TRACE_ENTER(logger_);
- if (!message) {
- LOG4CXX_ERROR(logger_,
- "Invalid message for sending to mobile app is received.");
- LOG4CXX_TRACE_EXIT(logger_);
- return;
- }
-
- uint32_t maxDataSize = 0;
- if (PROTOCOL_VERSION_1 == message->protocol_version()) {
- maxDataSize = MAXIMUM_FRAME_DATA_SIZE - PROTOCOL_HEADER_V1_SIZE;
- } else if (PROTOCOL_VERSION_2 == message->protocol_version()) {
- maxDataSize = MAXIMUM_FRAME_DATA_SIZE - PROTOCOL_HEADER_V2_SIZE;
- }
-
- if (!session_observer_) {
- LOG4CXX_ERROR(
- logger_,
- "Cannot handle message to mobile app:" <<
- " ISessionObserver doesn't exist.");
- return;
- }
- uint32_t connection_handle = 0;
- uint8_t sessionID = 0;
- session_observer_->PairFromKey(message->connection_key(), &connection_handle,
- &sessionID);
-
- if (message->data_size() <= maxDataSize) {
- RESULT_CODE result = SendSingleFrameMessage(connection_handle, sessionID,
- message->protocol_version(),
- SERVICE_TYPE_RPC,
- message->data_size(),
- message->data(), false);
- if (result != RESULT_OK) {
- LOG4CXX_ERROR(logger_,
- "ProtocolHandler failed to send single frame message.");
- }
- } else {
- LOG4CXX_INFO_EXT(
- logger_,
- "Message will be sent in multiple frames; max size is " << maxDataSize);
-
- RESULT_CODE result = SendMultiFrameMessage(connection_handle, sessionID,
- message->protocol_version(),
- SERVICE_TYPE_RPC,
- message->data_size(),
- message->data(), false,
- maxDataSize);
- if (result != RESULT_OK) {
- LOG4CXX_ERROR(logger_,
- "ProtocolHandler failed to send multiframe messages.");
- }
- }
-
- if (final_message)
- transport_manager_->Disconnect(connection_handle);
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr message) {
- LOG4CXX_TRACE_ENTER(logger_);
- connection_handler::ConnectionHandlerImpl* connection_handler =
- connection_handler::ConnectionHandlerImpl::instance();
- // Connection handler should be accessed from TM thread only
- connection_handler->KeepConnectionAlive(message->connection_key());
-
- if (message.valid()) {
- LOG4CXX_INFO_EXT(
- logger_,
- "Received from TM " << message->data() <<
- " with connection id " << message->connection_key()
- << " msg data_size " << message->data_size());
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(
- message->connection_key(), message->data(), message->data_size()));
-
- raw_ford_messages_from_mobile_.PostMessage(
- impl::RawFordMessageFromMobile(ptr));
- } else {
- LOG4CXX_ERROR(
- logger_,
- "Invalid incoming message received in"
- << " ProtocolHandler from Transport Manager.");
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ProtocolHandlerImpl::OnTMMessageReceiveFailed(
- const transport_manager::DataReceiveError& error) {
- // TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Received error on attemping to recieve message.");
-}
-
-void ProtocolHandlerImpl::NotifySubscribers(const RawMessagePtr& message) {
- for (ProtocolObservers::iterator it = protocol_observers_.begin();
- protocol_observers_.end() != it; ++it) {
- (*it)->OnMessageReceived(message);
- }
-}
-
-void ProtocolHandlerImpl::OnTMMessageSend(const RawMessagePtr message) {
- LOG4CXX_INFO(logger_, "Sending message finished successfully.");
-
- for (ProtocolObservers::iterator it = protocol_observers_.begin();
- protocol_observers_.end() != it; ++it) {
- (*it)->OnMobileMessageSent(message);
- }
-}
-
-void ProtocolHandlerImpl::OnTMMessageSendFailed(
- const transport_manager::DataSendError& error,
- const RawMessagePtr& message) {
- // TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Sending message " <<
- message-> data() << " failed.");
-}
-
-RESULT_CODE ProtocolHandlerImpl::SendFrame(ConnectionID connection_id,
- const ProtocolPacket& packet) {
- LOG4CXX_TRACE_ENTER(logger_);
- if (!packet.packet()) {
- LOG4CXX_ERROR(logger_, "Failed to create packet.");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- LOG4CXX_INFO_EXT(
- logger_,
- "Packet to be sent: " << packet.packet() <<
- " of size: " << packet.packet_size());
-
- if (!session_observer_) {
- LOG4CXX_WARN(logger_, "No session_observer_ set.");
- return RESULT_FAIL;
- }
-
- RawMessagePtr message_to_send(
- new RawMessage(connection_id, packet.protocol_version(), packet.packet(),
- packet.packet_size()));
-
- LOG4CXX_INFO(logger_,
- "Message to send with connection id " << connection_id);
-
- if (transport_manager_) {
- if (transport_manager::E_SUCCESS !=
- transport_manager_->SendMessageToDevice(message_to_send)) {
- LOG4CXX_WARN(logger_, "Can't send message to device");
- return RESULT_FAIL;
- };
- } else {
- LOG4CXX_WARN(logger_, "No Transport Manager found.");
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_OK;
-}
-
-RESULT_CODE ProtocolHandlerImpl::SendSingleFrameMessage(
- ConnectionID connection_id, const uint8_t session_id,
- uint32_t protocol_version, const uint8_t service_type,
- const uint32_t data_size, const uint8_t* data, const bool compress) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- uint8_t versionF = PROTOCOL_VERSION_1;
- if (2 == protocol_version) {
- versionF = PROTOCOL_VERSION_2;
- }
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- versionF, compress, FRAME_TYPE_SINGLE, service_type, 0,
- session_id, data_size, message_counters_[session_id]++, data));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_OK;
-}
-
-RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
- ConnectionID connection_id, const uint8_t session_id,
- uint32_t protocol_version, const uint8_t service_type,
- const uint32_t data_size, const uint8_t* data, const bool compress,
- const uint32_t maxdata_size) {
- LOG4CXX_TRACE_ENTER(logger_);
- RESULT_CODE retVal = RESULT_OK;
-
- LOG4CXX_INFO_EXT(
- logger_, " data size " << data_size << " maxdata_size " << maxdata_size);
-
- uint8_t versionF = PROTOCOL_VERSION_1;
- if (2 == protocol_version) {
- versionF = PROTOCOL_VERSION_2;
- }
-
- int32_t numOfFrames = 0;
- int32_t lastdata_size = 0;
-
- if (data_size % maxdata_size) {
- numOfFrames = (data_size / maxdata_size) + 1;
- lastdata_size = data_size % maxdata_size;
- } else {
- numOfFrames = data_size / maxdata_size;
- lastdata_size = maxdata_size;
- }
-
- LOG4CXX_INFO_EXT(
- logger_,
- "Data size " << data_size << " of " << numOfFrames <<
- " frames with last frame " << lastdata_size);
-
- uint8_t* outDataFirstFrame = new uint8_t[FIRST_FRAME_DATA_SIZE];
- outDataFirstFrame[0] = data_size >> 24;
- outDataFirstFrame[1] = data_size >> 16;
- outDataFirstFrame[2] = data_size >> 8;
- outDataFirstFrame[3] = data_size;
-
- outDataFirstFrame[4] = numOfFrames >> 24;
- outDataFirstFrame[5] = numOfFrames >> 16;
- outDataFirstFrame[6] = numOfFrames >> 8;
- outDataFirstFrame[7] = numOfFrames;
-
- ProtocolFramePtr firstPacket(new protocol_handler::ProtocolPacket(connection_id,
- versionF, compress, FRAME_TYPE_FIRST, service_type, 0,
- session_id, FIRST_FRAME_DATA_SIZE, ++message_counters_[session_id],
- outDataFirstFrame));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(firstPacket, false));
- LOG4CXX_INFO_EXT(logger_, "First frame is sent.");
-
- uint8_t* outDataFrame = new uint8_t[maxdata_size];
- for (uint32_t i = 0; i < numOfFrames; i++) {
- if (i != (numOfFrames - 1)) {
- memcpy(outDataFrame, data + (maxdata_size * i), maxdata_size);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- versionF, compress, FRAME_TYPE_CONSECUTIVE,
- service_type, ((i % FRAME_DATA_MAX_VALUE) + 1), session_id,
- maxdata_size, message_counters_[session_id], outDataFrame));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-
- } else {
- memcpy(outDataFrame, data + (maxdata_size * i), lastdata_size);
-
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- versionF, compress, FRAME_TYPE_CONSECUTIVE,
- service_type, 0x0, session_id, lastdata_size,
- message_counters_[session_id], outDataFrame));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
- }
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
- return retVal;
-}
-
-RESULT_CODE ProtocolHandlerImpl::HandleMessage(ConnectionID connection_id,
- const ProtocolFramePtr& packet) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- switch (packet->frame_type()) {
- case FRAME_TYPE_CONTROL: {
- LOG4CXX_INFO(logger_, "handleMessage(1) - case FRAME_TYPE_CONTROL");
- LOG4CXX_TRACE_EXIT(logger_);
- return HandleControlMessage(connection_id, packet);
- }
- case FRAME_TYPE_SINGLE: {
- LOG4CXX_INFO(
- logger_,
- "FRAME_TYPE_SINGLE message of size " << packet->data_size() << "; message "
- << ConvertPacketDataToString(packet->data(), packet->data_size()));
-
- if (!session_observer_) {
- LOG4CXX_ERROR(
- logger_,
- "Cannot handle message from Transport"
- << " Manager: ISessionObserver doesn't exist.");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- int32_t connection_key = session_observer_->KeyFromPair(
- connection_id, packet->session_id());
-
- RawMessagePtr raw_message(
- new RawMessage(connection_key, packet->protocol_version(), packet->data(),
- packet->data_size(), packet->service_type()));
-
- NotifySubscribers(raw_message);
- break;
- }
- case FRAME_TYPE_FIRST:
- case FRAME_TYPE_CONSECUTIVE: {
- LOG4CXX_INFO(logger_, "handleMessage() - case FRAME_TYPE_CONSECUTIVE");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return HandleMultiFrameMessage(connection_id, packet);
- }
- default: {
- LOG4CXX_WARN(logger_, "handleMessage() - case default!!!");
- return RESULT_FAIL;
- }
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_OK;
-}
-
-RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
- ConnectionID connection_id, const ProtocolFramePtr& packet) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- if (!session_observer_) {
- LOG4CXX_ERROR(logger_, "No ISessionObserver set.");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- int32_t key = session_observer_->KeyFromPair(connection_id,
- packet->session_id());
- LOG4CXX_INFO_EXT(
- logger_,
- "Packet " << packet << "; session id " << static_cast<int32_t>(key));
-
- if (packet->frame_type() == FRAME_TYPE_FIRST) {
- LOG4CXX_INFO(logger_, "handleMultiFrameMessage() - FRAME_TYPE_FIRST "
- << packet->data_size());
- incomplete_multi_frame_messages_[key] = packet;
- } else {
- LOG4CXX_INFO(logger_, "handleMultiFrameMessage() - Consecutive frame");
-
- std::map<int32_t, ProtocolFramePtr>::iterator it =
- incomplete_multi_frame_messages_.find(key);
-
- if (it == incomplete_multi_frame_messages_.end()) {
- LOG4CXX_ERROR(
- logger_, "Frame of multiframe message for non-existing session id");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- if (it->second->appendData(packet->data(), packet->data_size())
- != RESULT_OK) {
- LOG4CXX_ERROR(logger_,
- "Failed to append frame for multiframe message.");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- if (packet->frame_data() == FRAME_DATA_LAST_FRAME) {
-
- LOG4CXX_INFO(
- logger_,
- "Last frame of multiframe message size " << packet->data_size()
- << "; connection key " << key);
-
- if (protocol_observers_.empty()) {
- LOG4CXX_ERROR(
- logger_,
- "Cannot handle multiframe message: no IProtocolObserver is set.");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- ProtocolPacket* completePacket = it->second.get();
- RawMessage* rawMessage = new RawMessage(
- key, completePacket->protocol_version(), completePacket->data(),
- completePacket->total_data_bytes(), completePacket->service_type());
-
- NotifySubscribers(rawMessage);
-
- incomplete_multi_frame_messages_.erase(it);
- }
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_OK;
-}
-
-RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
- ConnectionID connection_id, const ProtocolFramePtr& packet) {
- if (!session_observer_) {
- LOG4CXX_ERROR(logger_, "ISessionObserver is not set.");
-
- LOG4CXX_TRACE_EXIT(logger_);
- return RESULT_FAIL;
- }
-
- switch (packet->frame_data()) {
- case FRAME_DATA_START_SERVICE:
- return HandleControlMessageStartSession(connection_id, *(packet.get()));
- case FRAME_DATA_END_SERVICE:
- return HandleControlMessageEndSession(connection_id, *(packet.get()));
- case FRAME_DATA_HEART_BEAT: {
- LOG4CXX_INFO(logger_,
- "Received heart beat for connection " << connection_id);
- return HandleControlMessageHeartBeat(connection_id, *(packet.get()));
- }
- default:
- LOG4CXX_WARN(
- logger_,
- "Control message of type " << int32_t(packet->frame_data())
- << " ignored");
- return RESULT_OK;
- }
-}
-
-RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndSession(
- ConnectionID connection_id, const ProtocolPacket& packet) {
- LOG4CXX_INFO(logger_,
- "ProtocolHandlerImpl::HandleControlMessageEndSession()");
-
- uint8_t current_session_id = packet.session_id();
-
- uint32_t hash_code = 0;
- if (packet.protocol_version() == 2) {
- hash_code = packet.message_id();
- }
-
- bool success = true;
- int32_t session_hash_code = session_observer_->OnSessionEndedCallback(
- connection_id, current_session_id, hash_code,
- ServiceTypeFromByte(packet.service_type()));
-
- if (-1 != session_hash_code) {
- if (2 == packet.protocol_version()) {
- if (packet.message_id() != session_hash_code) {
- success = false;
- }
- }
- } else {
- success = false;
- }
-
- if (success) {
- SendEndSessionAck(
- connection_id, current_session_id, packet.protocol_version(),
- session_observer_->KeyFromPair(connection_id, current_session_id),
- packet.service_type());
- message_counters_.erase(current_session_id);
- } else {
- LOG4CXX_INFO_EXT(
- logger_,
- "Refused to end session " << packet.service_type() << " type.");
- SendEndSessionNAck(connection_id, current_session_id, packet.protocol_version(),
- packet.service_type());
- }
- return RESULT_OK;
-}
-
-RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
- ConnectionID connection_id, const ProtocolPacket& packet) {
- LOG4CXX_INFO(logger_,
- "ProtocolHandlerImpl::HandleControlMessageStartSession"
- << (int) packet.protocol_version() );
- LOG4CXX_INFO_EXT(logger_,
- "Version 2 " << (packet.protocol_version() == PROTOCOL_VERSION_2));
-
- int32_t session_id = session_observer_->OnSessionStartedCallback(
- connection_id, packet.session_id(),
- ServiceTypeFromByte(packet.service_type()));
-
- if (-1 != session_id) {
- SendStartSessionAck(
- connection_id, session_id, packet.protocol_version(),
- session_observer_->KeyFromPair(connection_id, session_id),
- packet.service_type());
- } else {
- LOG4CXX_INFO_EXT(
- logger_,
- "Refused to create service " <<
- static_cast<int32_t>(packet.service_type()) << " type.");
-
- SendStartSessionNAck(connection_id, packet.session_id(), packet.protocol_version(),
- packet.service_type());
- }
- return RESULT_OK;
-}
-
-RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat(
- ConnectionID connection_id, const ProtocolPacket& packet) {
- LOG4CXX_INFO(
- logger_,
- "Sending heart beat acknowledgment for connection " << connection_id);
- return SendHeartBeatAck(connection_id, packet.session_id(),
- packet.message_id());
-}
-
-void ProtocolHandlerImpl::Handle(
- const impl::RawFordMessageFromMobile& message) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- if (((0 != message->data()) && (0 != message->data_size())) ||
- FRAME_TYPE_CONTROL == message->frame_type() ||
- FRAME_TYPE_FIRST == message->frame_type()) {
-
- LOG4CXX_INFO_EXT(logger_, "Packet: dataSize " << message->data_size());
- HandleMessage(message->connection_key(), message);
- } else {
- LOG4CXX_WARN(logger_,
- "handleMessagesFromMobileApp() - incorrect or NULL data");
- }
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ProtocolHandlerImpl::Handle(const impl::RawFordMessageToMobile& message) {
- LOG4CXX_INFO_EXT(
- logger_,
- "Message to mobile app: connection " << message->connection_key() << ";"
- " dataSize: " << message->data_size() << " ;"
- " protocolVersion " << message->protocol_version());
-
- SendFrame(message->connection_key(), (*message.get()));
-}
-
-void ProtocolHandlerImpl::SendFramesNumber(int32_t connection_key,
- int32_t number_of_frames) {
- LOG4CXX_INFO(logger_,
- "SendFramesNumber MobileNaviAck for session " << connection_key);
-
- transport_manager::ConnectionUID connection_id = 0;
- uint8_t session_id = 0;
- session_observer_->PairFromKey(connection_key, &connection_id, &session_id);
- ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
- PROTOCOL_VERSION_2, COMPRESS_OFF, FRAME_TYPE_CONTROL,
- SERVICE_TYPE_NAVI, FRAME_DATA_SERVICE_DATA_ACK,
- session_id, 0, number_of_frames));
-
- raw_ford_messages_to_mobile_.PostMessage(
- impl::RawFordMessageToMobile(ptr, false));
-}
-
-std::string ConvertPacketDataToString(const uint8_t* data,
- const std::size_t data_size) {
- if (0 == data_size)
- return std::string();
- bool is_printable_array = true;
- std::locale loc;
- const char* text = reinterpret_cast<const char*>(data);
- // Check data for printability
- for (int i = 0; i < data_size; ++i) {
- if (!std::isprint(text[i], loc)) {
- is_printable_array = false;
- break;
- }
- }
- return is_printable_array ? std::string(text) : std::string("is raw data");
-}
-
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/protocol_handler/src/protocol_packet.cc b/SDL_Core/src/components/protocol_handler/src/protocol_packet.cc
deleted file mode 100644
index 0dfb1e7d2..000000000
--- a/SDL_Core/src/components/protocol_handler/src/protocol_packet.cc
+++ /dev/null
@@ -1,304 +0,0 @@
-/**
- * \file ProtocolPacket.cpp
- * \brief ProtocolPacket class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include <stdint.h>
-#include <memory.h>
-#include "protocol_handler/protocol_packet.h"
-#include "utils/macro.h"
-
-namespace protocol_handler {
-
-ProtocolPacket::ProtocolPacket()
- : packet_(0),
- total_packet_size_(0),
- data_offset_(0),
- packet_id_(0),
- connection_key_(0) {
-}
-
-ProtocolPacket::ProtocolPacket(uint8_t connection_key,
- uint8_t version, bool compress,
- uint8_t frameType,
- uint8_t serviceType,
- uint8_t frameData, uint8_t sessionID,
- uint32_t dataSize, uint32_t messageID,
- const uint8_t* data,
- uint32_t packet_id)
- : packet_(0),
- total_packet_size_(0),
- data_offset_(0),
- packet_id_(packet_id),
- connection_key_(connection_key) {
- RESULT_CODE result = serializePacket(version, compress, frameType, serviceType, frameData,
- sessionID, dataSize, messageID, data);
- if (result != RESULT_OK) {
- NOTREACHED();
- }
-}
-
-ProtocolPacket::ProtocolPacket(uint8_t connection_key, uint8_t* data_param,
- uint32_t data_size)
- : packet_(0),
- total_packet_size_(0),
- data_offset_(0),
- packet_id_(0),
- connection_key_(connection_key) {
- RESULT_CODE result = deserializePacket(data_param, data_size);
- if (result != RESULT_OK) {
- NOTREACHED();
- }
-}
-
-ProtocolPacket::~ProtocolPacket() {
- packet_ = 0;
- total_packet_size_ = 0;
- packet_id_ = 0;
- if (packet_data_.data) {
- delete packet_data_.data;
- packet_data_.data = 0;
- }
-}
-
-// Serialization
-RESULT_CODE ProtocolPacket::serializePacket(uint8_t version,
- bool compress,
- uint8_t frameType,
- uint8_t serviceType,
- uint8_t frameData,
- uint8_t sessionID,
- uint32_t dataSize,
- uint32_t messageID,
- const uint8_t* data) {
-
- if (packet_) {
- delete[] packet_;
- packet_ = 0;
- total_packet_size_ = 0;
- }
-
- uint8_t offset = 0;
- uint8_t compressF = 0x0;
- packet_ = new uint8_t[MAXIMUM_FRAME_DATA_SIZE];
- if (compress) {
- compressF = 0x1;
- }
- uint8_t firstByte = ((version << 4) & 0xF0) | ((compressF << 3) & 0x08)
- | (frameType & 0x07);
-
- packet_[offset++] = firstByte;
- packet_[offset++] = serviceType;
- packet_[offset++] = frameData;
- packet_[offset++] = sessionID;
-
- packet_[offset++] = dataSize >> 24;
- packet_[offset++] = dataSize >> 16;
- packet_[offset++] = dataSize >> 8;
- packet_[offset++] = dataSize;
-
- if (version == PROTOCOL_VERSION_2) {
- packet_[offset++] = messageID >> 24;
- packet_[offset++] = messageID >> 16;
- packet_[offset++] = messageID >> 8;
- packet_[offset++] = messageID;
- }
-
- total_packet_size_ = offset;
-
- if (data) {
- if ((offset + dataSize) <= MAXIMUM_FRAME_DATA_SIZE) {
- memcpy(packet_ + offset, data, dataSize);
- total_packet_size_ += dataSize;
- } else {
- delete[] packet_;
- packet_ = 0;
- total_packet_size_ = 0;
- return RESULT_FAIL;
- }
- }
-
- return RESULT_OK;
-}
-
-uint8_t * ProtocolPacket::packet() const {
- return packet_;
-}
-
-uint32_t ProtocolPacket::packet_size() const {
- return total_packet_size_;
-}
-
-uint32_t ProtocolPacket::packet_id() const {
- return packet_id_;
-}
-
-RESULT_CODE ProtocolPacket::appendData(uint8_t* chunkData,
- uint32_t chunkDataSize) {
- if (data_offset_ + chunkDataSize <= packet_data_.totalDataBytes) {
- if (chunkData) {
- if (packet_data_.data) {
- memcpy(packet_data_.data + data_offset_, chunkData, chunkDataSize);
- data_offset_ += chunkDataSize;
- return RESULT_OK;
- }
- }
- }
-
- return RESULT_FAIL;
-}
-
-RESULT_CODE ProtocolPacket::deserializePacket(const uint8_t* message,
- uint32_t messageSize) {
- uint8_t offset = 0;
- uint8_t firstByte = message[offset];
- offset++;
-
- packet_header_.version = firstByte >> 4u;
-
- if (firstByte & 0x08u) {
- packet_header_.compress = true;
- } else {
- packet_header_.compress = false;
- }
-
- packet_header_.frameType = firstByte & 0x07u;
-
- packet_header_.serviceType = message[offset++];
- packet_header_.frameData = message[offset++];
- packet_header_.sessionId = message[offset++];
-
- packet_header_.dataSize = message[offset++] << 24u;
- packet_header_.dataSize |= message[offset++] << 16u;
- packet_header_.dataSize |= message[offset++] << 8u;
- packet_header_.dataSize |= message[offset++];
-
- if (packet_header_.version == PROTOCOL_VERSION_2) {
- packet_header_.messageId = message[offset++] << 24u;
- packet_header_.messageId |= message[offset++] << 16u;
- packet_header_.messageId |= message[offset++] << 8u;
- packet_header_.messageId |= message[offset++];
- } else {
- packet_header_.messageId = 0u;
- }
-
- packet_data_.totalDataBytes = packet_header_.dataSize;
-
- uint32_t dataPayloadSize = 0;
- if ((offset < messageSize) &&
- packet_header_.frameType != FRAME_TYPE_FIRST) {
- dataPayloadSize = messageSize - offset;
- }
-
- uint8_t * data = 0;
- if (dataPayloadSize) {
- data = new uint8_t[dataPayloadSize];
- if (data) {
- memcpy(data, message + offset, dataPayloadSize);
- data_offset_ = dataPayloadSize;
- } else {
- return RESULT_FAIL;
- }
- }
-
- if (packet_header_.frameType == FRAME_TYPE_FIRST) {
- data_offset_ = 0;
- const uint8_t* data = message + offset;
- uint32_t total_data_bytes = data[0] << 24;
- total_data_bytes |= data[1] << 16;
- total_data_bytes |= data[2] << 8;
- total_data_bytes |= data[3];
- set_total_data_bytes(total_data_bytes);
- } else {
- packet_data_.data = data;
- }
-
- return RESULT_OK;
-}
-
-uint8_t ProtocolPacket::protocol_version() const {
- return packet_header_.version;
-}
-
-bool ProtocolPacket::is_compress() const {
- return packet_header_.compress;
-}
-
-uint8_t ProtocolPacket::frame_type() const {
- return packet_header_.frameType;
-}
-
-uint8_t ProtocolPacket::service_type() const {
- return packet_header_.serviceType;
-}
-
-uint8_t ProtocolPacket::frame_data() const {
- return packet_header_.frameData;
-}
-
-uint8_t ProtocolPacket::session_id() const {
- return packet_header_.sessionId;
-}
-
-uint32_t ProtocolPacket::data_size() const {
- return packet_header_.dataSize;
-}
-
-uint32_t ProtocolPacket::message_id() const {
- return packet_header_.messageId;
-}
-
-uint8_t* ProtocolPacket::data() const {
- return packet_data_.data;
-}
-
-void ProtocolPacket::set_total_data_bytes(uint32_t dataBytes) {
- if (dataBytes) {
- if (packet_data_.data) {
- delete[] packet_data_.data;
- packet_data_.data = 0;
- }
- packet_data_.data = new uint8_t[dataBytes];
- packet_data_.totalDataBytes = dataBytes;
- }
-}
-
-uint32_t ProtocolPacket::total_data_bytes() const {
- return packet_data_.totalDataBytes;
-}
-
-uint8_t ProtocolPacket::connection_key() const {
- return connection_key_;
-}
-
-// End of Deserialization
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/protocol_handler/src/protocol_payload.cc b/SDL_Core/src/components/protocol_handler/src/protocol_payload.cc
deleted file mode 100644
index 3fff217a5..000000000
--- a/SDL_Core/src/components/protocol_handler/src/protocol_payload.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "protocol_handler/protocol_payload.h"
-
-#include <climits>
-
-#include "utils/bitstream.h"
-#include "utils/macro.h"
-
-namespace {
-// Protocol header field sizes
-static const size_t kRpcTypeBits = 4;
-static const size_t kRpcFunctionIdBits = 32 - kRpcTypeBits;
-static const size_t kCorellationIdBits = 32;
-static const size_t kJsonSizeBits = 32;
-static const size_t PayloadHeaderBits =
- kRpcTypeBits + kRpcFunctionIdBits + kCorellationIdBits + kJsonSizeBits;
-}
-
-namespace protocol_handler {
-
-void Extract(utils::BitStream* bs, ProtocolPayloadHeaderV2* headerv2) {
- DCHECK(bs && headerv2);
- if (*bs) {
- uint8_t rpc_type;
- utils::Extract(bs, &rpc_type, kRpcTypeBits);
- headerv2->rpc_type = RpcTypeFromByte(rpc_type);
- if (headerv2->rpc_type == kRpcTypeReserved) {
- bs->MarkBad();
- return;
- }
- utils::Extract(bs, &headerv2->rpc_function_id, kRpcFunctionIdBits);
- utils::Extract(bs, &headerv2->corellation_id); // kCorellationIdBits
- utils::Extract(bs, &headerv2->json_size); // kJsonSizeBits
- }
-}
-
-void Extract(utils::BitStream* bs, ProtocolPayloadV2* payload,
- size_t payload_size) {
- DCHECK(bs && payload);
- if (*bs) {
- Extract(bs, &payload->header);
- utils::Extract(bs, &payload->json, payload->header.json_size);
- size_t data_size = payload_size - payload->header.json_size -
- PayloadHeaderBits / CHAR_BIT;
- DCHECK(data_size < payload_size); // Make sure data_size didn't underflow
- utils::Extract(bs, &payload->data, data_size);
- }
-}
-
-std::ostream& operator<<(std::ostream& os, const ProtocolPayloadHeaderV2& payload_header) {
- return os<<"(ProtocolPayloadHeaderV2"
- <<" rpc_type: "<<payload_header.rpc_type
- <<", rpc_function_id: "<<payload_header.rpc_function_id
- <<", corellation_id: "<<payload_header.corellation_id
- <<", json_size: "<<payload_header.json_size
- <<")";
-}
-
-std::ostream& operator<<(std::ostream& os, const ProtocolPayloadV2& payload) {
- return os<<"(ProtocolPayloadV2"
- <<" header: "<<payload.header
- <<", json (bytes): "<<payload.json.size()
- <<", data (bytes): "<<payload.data.size()
- <<")";
-}
-
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/protocol_handler/src/raw_message.cc b/SDL_Core/src/components/protocol_handler/src/raw_message.cc
deleted file mode 100644
index fabafac3d..000000000
--- a/SDL_Core/src/components/protocol_handler/src/raw_message.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * \file SmartDeviceLinkRawMessage.cpp
- * \brief SmartDeviceLinkRawMessage class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "protocol_handler/raw_message.h"
-
-#include "protocol_handler/message_priority.h"
-
-namespace protocol_handler {
-
-RawMessage::RawMessage(int32_t connectionKey, uint32_t protocolVersion,
- uint8_t* data_param, uint32_t data_sz,
- uint8_t type)
- : connection_key_(connectionKey),
- protocol_version_(protocolVersion),
- service_type_(ServiceTypeFromByte(type)),
- waiting_(false),
- fully_binary_(false),
- data_size_(data_sz) {
- if (data_sz > 0) {
- data_ = new uint8_t[data_sz];
- for (uint32_t i = 0; i < data_sz; ++i) {
- data_[i] = data_param[i];
- }
- } else {
- data_ = 0;
- }
-}
-
-RawMessage::~RawMessage() {
- if (data_) {
- delete[] data_;
- data_ = 0;
- }
-}
-
-int32_t RawMessage::connection_key() const {
- return connection_key_;
-}
-
-void RawMessage::set_connection_key(uint32_t key) {
- connection_key_ = key;
-}
-
-uint8_t* RawMessage::data() const {
- return data_;
-}
-
-uint32_t RawMessage::data_size() const {
- return data_size_;
-}
-
-uint32_t RawMessage::protocol_version() const {
- return protocol_version_;
-}
-
-bool RawMessage::IsWaiting() const {
- return waiting_;
-}
-
-void RawMessage::set_waiting(bool v) {
- waiting_ = v;
-}
-
-MessagePriority RawMessage::Priority() const {
- return MessagePriority::FromServiceType(this->service_type());
-}
-
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/protocol_handler/src/rpc_type.cc b/SDL_Core/src/components/protocol_handler/src/rpc_type.cc
deleted file mode 100644
index 10aab374b..000000000
--- a/SDL_Core/src/components/protocol_handler/src/rpc_type.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "protocol_handler/rpc_type.h"
-
-#include "utils/logger.h"
-#include "utils/macro.h"
-
-namespace protocol_handler {
-
-namespace {
-log4cxx::LoggerPtr g_logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ProtocolHandler"));
-
-bool IsSupported(RpcType rpc_type) {
- switch (rpc_type) {
- case kRpcTypeRequest:
- case kRpcTypeResponse:
- case kRpcTypeNotification:
- return true;
- default:
- return false;
- }
-}
-} // namespace
-
-RpcType RpcTypeFromByte(uint8_t byte) {
- RpcType type = RpcType(byte);
- bool supported_type = IsSupported(type);
- if (!supported_type) {
- LOG4CXX_INFO(g_logger, "Invalid service type: "<<int32_t(byte))
- }
- return supported_type ? type : kRpcTypeReserved;
-}
-
-uint8_t RpcTypeToByte(RpcType type) {
- DCHECK(IsSupported(type));
- return uint8_t(type);
-}
-
-const char* RpcTypeToString(RpcType type) {
- switch (type) {
- case kRpcTypeRequest:
- return "kRpcTypeRequest";
- case kRpcTypeResponse:
- return "kRpcTypeResponse";
- case kRpcTypeNotification:
- return "kRpcTypeNotification";
- default:
- return "kRpcTypeReserved";
- }
-}
-
-std::ostream& operator<<(std::ostream& os, RpcType rpc_type) {
- return os<<RpcTypeToString(rpc_type);
-}
-
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/protocol_handler/src/service_type.cc b/SDL_Core/src/components/protocol_handler/src/service_type.cc
deleted file mode 100644
index 6bc4896b2..000000000
--- a/SDL_Core/src/components/protocol_handler/src/service_type.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "protocol_handler/service_type.h"
-#include "protocol_handler/protocol_packet.h"
-
-#include "utils/logger.h"
-#include "utils/macro.h"
-
-
-namespace protocol_handler {
-
-namespace {
-log4cxx::LoggerPtr g_logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("ConnectionHandler"));
-
-// Check if provided service value is one of the specified
-bool IsValid(ServiceType service_type) {
- switch (service_type) {
- case kZero:
- case kRpc:
- case kAudio:
- case kMobileNav:
- case kBulk:
- return true;
- default:
- return false;
- }
-}
-} // namespace
-
-ServiceType ServiceTypeFromByte(uint8_t byte) {
- ServiceType type = ServiceType(byte);
- bool valid_type = IsValid(type);
- if (!valid_type) {
- LOG4CXX_INFO(g_logger, "Invalid service type: "<<int32_t(byte))
- }
- return valid_type ? type : kInvalidServiceType;
-}
-
-uint8_t ServiceTypeToByte(ServiceType type) {
- DCHECK(IsValid(type));
- return uint8_t(type);
-}
-
-} // namespace protocol_handler
diff --git a/SDL_Core/src/components/qt_hmi/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/CMakeLists.txt
deleted file mode 100644
index e77a1e23b..000000000
--- a/SDL_Core/src/components/qt_hmi/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-add_subdirectory(./qml_plugins)
-
-if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- add_subdirectory(./qml_model_qt4)
-else ()
- add_subdirectory(./qml_model_qt5)
-endif ()
diff --git a/SDL_Core/src/components/qt_hmi/Readme.txt b/SDL_Core/src/components/qt_hmi/Readme.txt
deleted file mode 100644
index 55e85db8e..000000000
--- a/SDL_Core/src/components/qt_hmi/Readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-How to view QML HMI.
-
-1) Run setup_env.sh from root folder of SDL project (this will install right version of Qt and CMake)
-2) Run CMake with option HMI2=ON “cmake -DHMI2=ON <root_SDL_folder>†(this will build core+dbus adapter and QML HMI+ dbus adapter)
-3) Run “<QT510_INSTALL_PATH>/qmlscene <root_SDL_folder>/src/components/qt_hmi/qml_model_qt5/MainWindow.qmlâ€
-4) Run SDL
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/EVALUATION USE LICENSE AGREEMENT.doc b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/EVALUATION USE LICENSE AGREEMENT.doc
deleted file mode 100644
index e041888df..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/EVALUATION USE LICENSE AGREEMENT.doc
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Bold.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Bold.ttf
deleted file mode 100644
index 8b82f0ae0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Md.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Md.ttf
deleted file mode 100644
index 3595f7013..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Md.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Roman.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Roman.ttf
deleted file mode 100644
index 7be067d90..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeue FinalDeliveryCorrect_13112011/HelveticaNeueLTStd-Roman.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-Lt.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-Lt.ttf
deleted file mode 100644
index 4ae24370a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-Lt.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-LtCn.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-LtCn.ttf
deleted file mode 100644
index 2186efad6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-LtCn.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-ThCn.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-ThCn.ttf
deleted file mode 100644
index c0232d069..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTCom-ThCn.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Bold.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Bold.ttf
deleted file mode 100644
index 8b82f0ae0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Md.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Md.ttf
deleted file mode 100644
index 3595f7013..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Md.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Roman.ttf b/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Roman.ttf
deleted file mode 100644
index 7be067d90..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Fonts/HelveticaNeueLTStd-Roman.ttf
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/ImageHardkey.qml b/SDL_Core/src/components/qt_hmi/References/Look/ImageHardkey.qml
deleted file mode 100644
index e39bb4160..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/ImageHardkey.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FHardwareKey {
- width: 50
- height: 50
-
- property alias image : theImage.source
-
- Rectangle {
- anchors.fill: parent
- border.color: "black"
- border.width: 1
- radius: 10
- smooth: true
-
- gradient: Gradient {
- GradientStop {
- id: s1
- color: "#FF646464"
- position: 0.0
- }
- GradientStop {
- id: s2
- color: "#FF484848"
- position: 0.8
- }
- GradientStop {
- id: s3
- color: "#FF323232"
- position: 1.0
- }
- }
- }
-
- FWdgtImage {
- id: theImage
- //anchors.fill: parent
- anchors.centerIn: parent
- //fillMode: Image.PreserveAspectFit
- smooth: true
- }
-
-
- FViewUseCaseSimple {
- condition: pressed === true
- PropertyChanges { target: s1; position: 1.0 }
- PropertyChanges { target: s2; position: 0.2}
- PropertyChanges { target: s3; position: 0.0 }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/AlphaSortLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/AlphaSortLayout.qml
deleted file mode 100644
index 3ee2761be..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/AlphaSortLayout.qml
+++ /dev/null
@@ -1,378 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: alphaLayout
- width: 800
- height: 480
-
-
- property alias a: aBtn.touchBtn
- property alias b: bBtn.touchBtn
- property alias c: cBtn.touchBtn
- property alias d: dBtn.touchBtn
- property alias e: eBtn.touchBtn
- property alias f: fBtn.touchBtn
- property alias g: gBtn.touchBtn
- property alias h: hBtn.touchBtn
- property alias i: iBtn.touchBtn
- property alias j: jBtn.touchBtn
- property alias k: kBtn.touchBtn
- property alias l: lBtn.touchBtn
- property alias m: mBtn.touchBtn
- property alias n: nBtn.touchBtn
- property alias o: oBtn.touchBtn
- property alias p: pBtn.touchBtn
- property alias q: qBtn.touchBtn
- property alias r: rBtn.touchBtn
- property alias s: sBtn.touchBtn
- property alias t: tBtn.touchBtn
- property alias u: uBtn.touchBtn
- property alias v: vBtn.touchBtn
- property alias w: wBtn.touchBtn
- property alias xB: xBtn.touchBtn
- property alias yB: yBtn.touchBtn
- property alias zB: zBtn.touchBtn
- property alias num: numBtn.touchBtn
- property alias close: closeTouch
-
- property string phonEntry: ""
-
-// BaseText{
-// id: phoneEntry
-// x:25
-// y:115
-// text: phonEntry
-// theFont: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
-// pxSize: 45
-// horAlignment: Text.AlignLeft
-// vertAlignment: Text.AlignTop
-// }
-
- TouchButtonClimatePCA{
- id: aBtn
- x:48
- y:131
- text: "A"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: jBtn
- x:48
- y:212
- text: "J"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: sBtn
- x:48
- y:293
- text: "S"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: bBtn
- x:129
- y:131
- text: "B"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: kBtn
- x:129
- y:212
- text: "K"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: tBtn
- x:129
- y:293
- text: "T"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: cBtn
- x:210
- y:131
- text: "C"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: lBtn
- x:210
- y:212
- text: "L"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: uBtn
- x:210
- y:293
- text: "U"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: dBtn
- x:291
- y:131
- text: "D"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: mBtn
- x:291
- y:212
- text: "M"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: vBtn
- x:291
- y:293
- text: "V"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: eBtn
- x:372
- y:131
- text: "E"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: nBtn
- x:372
- y:212
- text: "N"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: wBtn
- x:372
- y:293
- text: "W"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: fBtn
- x:453
- y:131
- text: "F"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: oBtn
- x:453
- y:212
- text: "O"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: xBtn
- x:453
- y:293
- text: "X"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: gBtn
- x:534
- y:131
- text: "G"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: pBtn
- x:534
- y:212
- text: "P"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: yBtn
- x:534
- y:293
- text: "Y"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: hBtn
- x:615
- y:131
- text: "H"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: qBtn
- x:615
- y:212
- text: "Q"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: zBtn
- x:615
- y:293
- text: "Z"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: iBtn
- x:696
- y:131
- text: "I"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: rBtn
- x:696
- y:212
- text: "R"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: numBtn
- x:696
- y:293
- text: "123"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- BaseText{
- id: closeTxt
- anchors.horizontalCenter: alphaLayout.horizontalCenter
- y:430
- horAlignment: Text.AlignHCenter
- vertAlignment: Text.AlignTop
- text: "CLOSE"
- color: "#1d81d5"
- pxSize: 22
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
-
- }
-
- FWdgtTouchArea{
- id: closeTouch
- height: 75
- width: 750
- y:430
- anchors.horizontalCenter: alphaLayout.horizontalCenter
- }
-
- FViewUseCase{condition: closeTouch.pressed === true
- //FActScriptCall { onScript: { FLogger.debug("Test color should change") } }
- PropertyChanges {
- target: closeTxt; color: "white"
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/BlankLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/BlankLayout.qml
deleted file mode 100644
index 2a1b2aa5f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/BlankLayout.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FLayout {
- width: 800
- height: 480
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ChromeLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ChromeLayout.qml
deleted file mode 100644
index 14daa544b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ChromeLayout.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: chromelayout
- width: 800
- height: 480
-
- property alias button1: button1
- property alias button2: button2
- property alias button3: button3
-
-
-
- FWdgtTouchArea {
- id: blockClockTouch
- anchors.top: chromelayout.top
- anchors.horizontalCenter: chromelayout.horizontalCenter
- height: 60
- width: 160
- }
-
- Rectangle{
- id: clockBackground
- anchors.fill: blockClockTouch
- color: "red"
- }
-
- BaseText{
- id: clock
- anchors.centerIn: blockClockTouch
- text: "clock"
- horAlignment: Text.AlignHCenter
- }
-
- TouchButton{
- id: button1
- anchors.top: blockClockTouch.top
- anchors.right: blockClockTouch.left
- anchors.rightMargin: -5
- height: blockClockTouch.height
- width: 75
- text: "Button 1"
- unpressedColor: "darkRed"
- }
-
- TouchButton{
- id: button2
- anchors.top: blockClockTouch.top
- anchors.left: blockClockTouch.right
- anchors.leftMargin: -5
- height:blockClockTouch.height
- width: 75
- text: "Button 2"
- unpressedColor:"darkRed"
- }
-
- TouchButton{
- id: button3
- anchors.bottom: chromelayout.bottom
- anchors.horizontalCenter: chromelayout.horizontalCenter
- height:blockClockTouch.height
- width: 225
- text: "Button 3"
- unpressedColor: "red"
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ClimatePCALayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ClimatePCALayout.qml
deleted file mode 100644
index 6b6a2761c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ClimatePCALayout.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: climateLayout
- width: 800
- height: 480
-
- property alias dualBtn: dualBtn.touchBtn
- property alias drvHeatSeat: drvHeatSeat.touchBtn
- property alias drvCoolSeat: drvCoolSeat.touchBtn
- property alias passCoolSeat: passCoolSeat.touchBtn
- property alias passHeatSeat: passHeatSeat.touchBtn
- property alias heatWheel: heatWheel.touchBtn
- property alias heatWinSheild: heatWinSheild.touchBtn
- property alias defrost: defrost.touchBtn
- property alias pannel: pannel.touchBtn
- property alias floor: floor.touchBtn
-
- property alias dualBtnSt: dualBtn.selected
- property alias drvHeatSeatSt: drvHeatSeat.selected
- property alias drvCoolSeatSt: drvCoolSeat.selected
- property alias passCoolSeatSt: passCoolSeat.selected
- property alias passHeatSeatSt: passHeatSeat.selected
- property alias heatWheelSt: heatWheel.selected
- property alias heatWinSheildSt: heatWinSheild.selected
- property alias defrostSt: defrost.selected
- property alias pannelSt: pannel.selected
- property alias floorSt: floor.selected
-
-
-
- TouchButtonClimatePCA{
- id: drvHeatSeat
- x:105
- y:178
- bitmap: "climate/heated seat icon.png"
- bitmap2: "climate/heated seat iconBlack.png"
- }
- TouchButtonClimatePCA{
- id: drvCoolSeat
- x:105
- y:273
- bitmap: "climate/A_C icon.png"
- bitmap2: "climate/A_C iconBlack.png"
- }
- TouchButtonClimatePCA{
- id: heatWheel
- x:200
- y:178
- bitmap: "climate/wheel icon.png"
- bitmap2: "climate/wheel iconBlack.png"
- }
- TouchButtonClimatePCA{
- id: heatWinSheild
- x:200
- y:273
- bitmap: "climate/headed dashBlue.png"
- bitmap2: "climate/headed dash.png"
- }
-
- TouchButtonClimatePCA{
- id: defrost
- x:360
- y:130
- bitmap: "climate/defrost iconBlue.png"
- bitmap2: "climate/defrost icon.png"
- }
-
- TouchButtonClimatePCA{
- id: pannel
- x:360
- y:226
- bitmap: "climate/face icon.png"
- bitmap2: "climate/face iconBlack.png"
- }
-
- TouchButtonClimatePCA{
- id: floor
- x:360
- y:322
- bitmap: "climate/feet icon.png"
- bitmap2: "climate/feet iconBlack.png"
- }
-
-
- TouchButtonClimatePCA{
- id: dualBtn
- y:225
- x:528
- text: "Dual"
- }
-
- TouchButtonClimatePCA{
- id: passHeatSeat
- x:615
- y:178
- bitmap: "climate/heated seat icon.png"
- bitmap2: "climate/heated seat iconBlack.png"
- }
- TouchButtonClimatePCA{
- id: passCoolSeat
- x:615
- y:273
- bitmap: "climate/A_C icon.png"
- bitmap2: "climate/A_C iconBlack.png"
- }
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ControlMirrorLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ControlMirrorLayout.qml
deleted file mode 100644
index 0abc7db4b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ControlMirrorLayout.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: alphaLayout
- width: 800
- height: 480
-
-
- Item {
- id: _fg
-
- width: 800; height: 480
- x:0
- y:0
-
- FWdgtTouchArea{
- id: blockTouch
- x:0
- y:0
- height: 480
- width: 800
- }
-
- Rectangle{
- anchors.fill: blockTouch
- color: "black"
- opacity: 0.8
- }
-
- FWdgtImage{
- id: popupBg
- anchors.centerIn: blockTouch
- bitmap: "climate/ring.png"
- }
-
- BaseText{
- id:curTemp
- anchors.centerIn: popupBg
- text: dataPool.drvTemp + "\xBA"
- pxSize: 96
- }
-
- BaseText{
- id:drvPass
- anchors.horizontalCenter: popupBg.horizontalCenter
- anchors.bottom: curTemp.top
- horAlignment: Text.AlignHCenter
- text: "Driver"
- pxSize: 28
- }
-
- }
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayout.qml
deleted file mode 100644
index 8057ff2e7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayout.qml
+++ /dev/null
@@ -1,217 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: fmLayout
- width: 800
- height: 480
-
- property alias sourceBtn: sourceBtn
- property alias browseBtn: browseBtn
- property alias albumInfoBtn: albumInfoBtn
- property alias albumInfoImg: stationLogoImg
- property alias stationTxt: stationTxt
- property alias trackTxt: trackTxt
- property alias artistTxt: artistTxt
- property alias alertBtn: alertBtn
- property alias preset1Btn: preset1Btn
- property alias preset2Btn: preset2Btn
- property alias preset3Btn: preset3Btn
- property alias preset4Btn: preset4Btn
- property alias preset5Btn: preset5Btn
- property alias preset6Btn: preset6Btn
- property alias replayBtn: replayBtn
- property alias tuneBtn: tuneBtn
- property alias presetsBtn: presetsBtn
- property bool artShown: true
-
-
- TouchButton{
- id: sourceBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 140
- anchors.left: fmLayout.left
- anchors.leftMargin: 10
- height:25
- width: 130
- text: "Source"
- }
-
- TouchButton{
- id: browseBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 180
- anchors.left: fmLayout.left
- anchors.leftMargin: 10
- height:25
- width: 130
- text: "Browse"
- }
-
- TouchButton{
- id: albumInfoBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 95
- anchors.left: fmLayout.left
- anchors.leftMargin: 190
- height:130
- width: 130
- text: "Album"
- vis: false
-
- }
-
- FWdgtImage{
- id: stationLogoImg
- anchors.top: fmLayout.top
- anchors.topMargin: 95
- anchors.left: fmLayout.left
- anchors.leftMargin: 190
- height:70
- width: 130
- bitmap: ""
- }
-
- TouchButton{
- id: alertBtn
- anchors.top: albumInfoImg.bottom
- anchors.topMargin: 20
- anchors.left: albumInfoImg.left
- height:25
- width: 90
- text: "Alert"
- }
-
- BaseText{
- id: stationTxt
- anchors.verticalCenter: trackTxt.verticalCenter
- anchors.verticalCenterOffset: -45
- anchors.left: trackTxt.left
- text: "Ch 22 / Pearl Jam Radio"
- }
-
- BaseText{
- id: trackTxt
- anchors.verticalCenter: albumInfoBtn.verticalCenter
- anchors.left: albumInfoBtn.right
- anchors.leftMargin: 15
- pxSize: 34
- text: "State of Love ..."
-
- }
-
- BaseText{
- id: artistTxt
- anchors.verticalCenter: trackTxt.verticalCenter
- anchors.verticalCenterOffset: 45
- anchors.left: trackTxt.left
- text: "Pearl Jam"
- }
-
- TouchButton{
- id: preset1Btn
- anchors.top: fmLayout.top
- anchors.topMargin: 280
- anchors.left: browseBtn.left
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset2Btn
- anchors.top: preset1Btn.bottom
- anchors.left: preset1Btn.left
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset3Btn
- anchors.top: preset1Btn.top
- anchors.left: preset1Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset4Btn
- anchors.top: preset2Btn.top
- anchors.left: preset2Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset5Btn
- anchors.top: preset3Btn.top
- anchors.left: preset3Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset6Btn
- anchors.top: preset4Btn.top
- anchors.left: preset4Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: replayBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.verticalCenterOffset: 35
- anchors.left: fmLayout.left
- anchors.leftMargin: 725
- height:40
- width: 55
- text: "rply"
- }
-
- TouchButton{
- id: tuneBtn
- anchors.top: preset1Btn.top
- anchors.right: replayBtn.right
- height:40
- width: 120
- text: "tune"
- }
-
- TouchButton{
- id: presetsBtn
- anchors.bottom: preset6Btn.bottom
- anchors.right: replayBtn.right
- height:60
- width: 120
- text: "presets"
- }
-
- FViewUseCaseGroup{
- FViewUseCase{
- condition: dataPool.hasArt === 0
- PropertyChanges { target: albumInfoBtn; vis: false;}
- PropertyChanges { target: albumInfoImg; visible: false;}
- PropertyChanges { target: trackTxt; anchors.left: albumInfoBtn.left;}
- PropertyChanges { target: alertBtn; vis: false;}
- }
- FViewUseCase{
- condition: dataPool.hasArt === 1
- PropertyChanges { target: albumInfoBtn; vis: false;}
- PropertyChanges { target: albumInfoImg; visible: false;}
- PropertyChanges { target: trackTxt; anchors.left: albumInfoBtn.left;}
- PropertyChanges { target: alertBtn; vis: false;}
- }
- FViewUseCase{
- condition: dataPool.hasArt === 2
- PropertyChanges { target: albumInfoImg; visible: true;}
- PropertyChanges { target: albumInfoBtn; vis: true;}
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayoutPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayoutPCA.qml
deleted file mode 100644
index fd211b3c9..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/FMLayoutPCA.qml
+++ /dev/null
@@ -1,152 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: fmLayout
- width: 800
- height: 480
-
- property alias sourceBtn: sourceBtn
- property alias tuneBtn: tuneBtn
- property alias hdBtn: hdBtn
- property alias stationTxt: stationTxt.text
- property alias freqId: freqId.text
- property alias listModel: thePresets.listModel
- property alias artist: artistTxt.text
- property alias curHD: hdBtn.curHD
- property alias totHD: hdBtn.totHD
- property alias curPreset: thePresets.currPreset
- property alias moving: thePresets.moving
- property alias direction: thePresets.direction
- property bool page1: true
-
-
-
-
-
- FWdgtImage{
- bitmap: "Radio/Ford-HMI-PCA-audio_fm_sirius.png"
- visible: false
- }
-
- TouchButton_PCA{
- id: sourceBtn
- x:25
- y:80
- textWidth: 100
- text: "FM Radio"
-
- }
-
- TouchButton_PCA{
- id: tuneBtn
- anchors.right: fmLayout.right
- anchors.rightMargin: 25
- y:80
- textWidth: 55
- text: "Tune"
-
- }
-
- BaseText{
- id: stationTxt
- x:25
- y:155
- pxSize: 45
- text: "96.3"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTCom-Lt.ttf"
-
- }
-
- BaseText{
- id: freqId
- anchors.left: stationTxt.right
- anchors.leftMargin: 5
- anchors.bottom: stationTxt.bottom
- anchors.bottomMargin: 4
- text: "FM"
- color: "#1d81d5"
- pxSize: 22
- theFont: "../Fonts/HelveticaNeueLTCom-Lt.ttf"
-
- }
-
- BaseText{
- id: trackTxt
- x:25
- y:212
- text: "So Far Around The Bend"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- pxSize: 22
-
-
- }
-
- BaseText{
- id: artistTxt
- x:25
- y:240
- text: "The National"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- pxSize: 22
- }
-
- TouchButtonSpecial_PCA{
- id: hdBtn
- x:25
- y:288
- textWidth: 120
- bitmap: "Radio/HD Logo.png"
- bitmap2: "Radio/HD Logo1.png"
- imageShift: -9
- spacing: 0
- text: " 1 "
- text1: "2"
- text2: " 3 4"
-
- }
-
- Rectangle{
- x:25
- y: 365
- height:1
- width: 750
- color: "#1d81d5"
- }
-
-
- PresetsGridPCA{
- id: thePresets
- x:0
- y:365
-
- }
-
- FWdgtImage{
- id: swipeIcon1
- bitmap: "Radio/whiteBall.png"
- x: 389
- y: 381
- }
-
- FWdgtImage{
- id: swipeIcon2
- bitmap: "Radio/blueBall.png"
- x: 404
- y: 381
- }
-
- FViewUseCaseSimple{condition: fmLayout.page1===false
- PropertyChanges{
- target: swipeIcon2; bitmap: "Radio/whiteBall.png"
- }
- PropertyChanges{
- target: swipeIcon1; bitmap: "Radio/blueBall.png"
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/HomeLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/HomeLayout.qml
deleted file mode 100644
index 375f96894..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/HomeLayout.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: home
- width: 800
- height: 480
-
- property alias button1: button1
- property alias button2: button2
- property alias button3: button3
- property alias button4: button4
-
-
-
-
- TouchButton{
- id: button1
- anchors.top: home.top
- anchors.left: home.left
- height:235
- width: 395
- text: "Button 1"
- }
-
- TouchButton{
- id: button2
- anchors.top: home.top
- anchors.right: home.right
- height:235
- width: 395
- text: "Button 2"
- }
-
- TouchButton{
- id: button3
- anchors.bottom: home.bottom
- anchors.left: home.left
- height:235
- width: 395
- text: "Button 3"
- }
-
- TouchButton{
- id: button4
- anchors.bottom: home.bottom
- anchors.right: home.right
- height:235
- width: 395
- text: "Button 4"
- }
-
- BaseText{
- id: title
- anchors.centerIn: home
- text: "Home"
- }
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ListLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ListLayout.qml
deleted file mode 100644
index 326d4feb0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/ListLayout.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-
-FLayout {
-
- id: theLayout
- width: 800
- height: 480
- x:10
- y:10
- property alias list : theListView
- property alias list_itemWidget: theListView.itemWidget
- property alias list_data: theListView.data
- Rectangle{
- anchors.fill:parent
- color:"white"
-
- }
-
-
- FWdgtListView {
-
- id: theListView
- anchors.fill: parent
- clip: true
-
- }
- FWdgtListView {
- x:400
- id: filteredListView
- clip: true
- data:filtermodel
- itemWidget:list_itemWidget
- width:100
- height:400
- }
- TextInput{
- text:"HelloWorld"
- x:200
- y:20
- onTextChanged: {
-
- if(text.length > 0 ) {
- dataPool.filter = text
- console.log(dataPool.filter)
-
- sortList.fillFilterModel(theListView.data)//Just backup original
- sortList.updateFilterModel(text)
-
- } else {
- sortList.fillFilterModel(theListView.data)
- }
- }
-
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavInRouteLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavInRouteLayout.qml
deleted file mode 100644
index d0f240f4b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavInRouteLayout.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: mapLayout
- width: 800
- height: 480
-
- property alias zoomIn: zoomIn.touchBtn
- property alias zoomOut: zoomOut.touchBtn
- property alias compass: compass.touchBtn
- property alias cancel: cancel.touchBtn
- property alias mute: mute.touchBtn
- property alias muteSt: mute.selected
- property alias options: options.touchBtn
-
-
-
- FWdgtImage{
- id: mapImg
- bitmap: "Nav/Map.png"
- anchors.fill: mapLayout
- }
-
- TouchButtonClimatePCA{
- id: zoomIn
- text: "+"
- x:25
- y:103
- image: "buttons/zoom_9_9.png"
- imageActive: "buttons/zoomSelected.png"
- imagePressed: "buttons/zoomPressed_9_9.png"
- txtColor: "white"
- txtSize: 40
-
- }
- TouchButtonClimatePCA{
- id: zoomOut
- text: "-"
- x:25
- y:223
- image: "buttons/zoom_9_9.png"
- imageActive: "buttons/zoomSelected.png"
- imagePressed: "buttons/zoomPressed_9_9.png"
- txtColor: "white"
- txtSize: 40
- }
- TouchButtonClimatePCA{
- id: options
- x:659
- y:80
- image: "Nav/Options_9_9.png"
- imageActive: "Nav/OptionsInActive.png"
- imagePressed: "Nav/OptionsPressed_9_9.png"
- }
- TouchButtonClimatePCA{
- id: compass
- x:34
- y:352
- image: "Nav/compass.png"
- imageActive: "Nav/compass.png"
- imagePressed: "Nav/compass.png"
- }
- TouchButtonClimatePCA{
- id: mute
- x:25
- y:419
- image: "buttons/mute_9_9.png"
- imageActive: "buttons/muteActive.png"
- imagePressed: "buttons/mutePressed_9_9.png"
- imageInActive: "buttons/muteInActive.png"
- }
- FWdgtImage{
- bitmap: "Nav/turnArrow.png"
- x:97
- y:428
- }
- BaseText{
- text: "0.2 mi on Cherry Hill Rd."
- pxSize: 22
- x:144
- y:434
- color: "white"
- }
-
- BaseText{
- text: "2 hrs 27 min"
- pxSize: 22
- anchors.right: cancel.left
- anchors.rightMargin: 26
- horAlignment: Text.AlignRight
- y:434
- color: "white"
- }
-
- TouchButtonSpecial_PCA{
- id: cancel
- x:621
- y:419
- textWidth: 110
- bitmap: "Nav/destIcon.png"
- bitmap2: "Nav/destIconBlack.png"
- imageShift: -9
- spacing: 0
- text: " Cancel"
- text1: ""
- text2: ""
- totHD: -1
-
- }
- FWdgtImage{
- id: currStBkgrnd
- bitmap: "Nav/current street.png"
- x:265
- y:349
- }
-
- BaseText{
- id: currentStreet
- x:312
- y:360
- text: "East Capital St. NE"
- pxSize: 18
- theFont: "../Fonts/HelveticaNeueLTCom-Lt.ttf"
- horAlignment: Text.AlignLeft
- vertAlignment: Text.AlignTop
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavKeyboardLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavKeyboardLayout.qml
deleted file mode 100644
index 6c7a03117..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavKeyboardLayout.qml
+++ /dev/null
@@ -1,547 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: alphaLayout
- width: 800
- height: 480
- property alias list : theListView
- property alias list_itemWidget: theListView.itemWidget
- property alias list_data: theListView.data
-
- property alias a: aBtn.touchBtn
- property alias b: bBtn.touchBtn
- property alias c: cBtn.touchBtn
- property alias d: dBtn.touchBtn
- property alias e: eBtn.touchBtn
- property alias f: fBtn.touchBtn
- property alias g: gBtn.touchBtn
- property alias h: hBtn.touchBtn
- property alias i: iBtn.touchBtn
- property alias j: jBtn.touchBtn
- property alias k: kBtn.touchBtn
- property alias l: lBtn.touchBtn
- property alias m: mBtn.touchBtn
- property alias n: nBtn.touchBtn
- property alias o: oBtn.touchBtn
- property alias p: pBtn.touchBtn
- property alias q: qBtn.touchBtn
- property alias r: rBtn.touchBtn
- property alias s: sBtn.touchBtn
- property alias t: tBtn.touchBtn
- property alias u: uBtn.touchBtn
- property alias v: vBtn.touchBtn
- property alias w: wBtn.touchBtn
- property alias xB: xBtn.touchBtn
- property alias yB: yBtn.touchBtn
- property alias zB: zBtn.touchBtn
- property alias num: numBtn.touchBtn
- property alias sym: symBtn.touchBtn
- property alias del: delBtn.touchBtn
- property alias clr: clrBtn.touchBtn
- property alias space: spaceBtn.touchBtn
- property alias close: closeTouch
- property string entry: ""
- property alias go: goBtn.touchBtn
- property alias listOpen: listOpen
-
- FWdgtListView {
- id: theListView
- anchors.fill: parent
- clip: true
- visible:false
- }
-
- FWdgtListView {
- x:400
- id: filteredListView
- clip: true
- data:filtermodel
- itemWidget:list_itemWidget
- width:100
- height:400
- visible: true
- }
- TextInput{ //Little Trick for Update on List
- text:dataPool.navEnrty
- x:200
- y:20
- onTextChanged: {
-
- if(text.length > 0 ) {
- dataPool.filter = text
- console.log(dataPool.filter)
- sortList.fillFilterModel(theListView.data)//Just backup original
- sortList.updateFilterModel(text)
-
- } else {
- sortList.fillFilterModel(theListView.data)
- dataPool.navList1stItem=""
-
- }
-
-
- }
-
- }
- BaseText{
- id: navEntry
- x:25
- y:65
- text: entry
- theFont: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
- pxSize: 45
- color: "#1d81d5"
- horAlignment: Text.AlignLeft
- vertAlignment: Text.AlignTop
- }
- BaseText{
- id: listFiltEntry
- x:25
- y:130
- color:"#1d81d5"
- text:dataPool.navList1stItem
- theFont: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
- pxSize: 45
- horAlignment: Text.AlignLeft
- vertAlignment: Text.AlignTop
- }
- Rectangle{
- id:rect
- x:20
- y:120
- height: 60
- radius:10
- width:650
- color:"transparent"
- border.color: "#1d81d5"
- border.width: 1
- visible: false
- }
-
- FWdgtTouchArea{
- id: listOpen
- anchors.fill: rect
- enabled: rect.visible
- }
-
- TouchButton_PCA{
- id: goBtn
- x:690
- y:115
- textWidth: 40
- text: "Go"
-
- }
-
-
- TouchButtonClimatePCA{
- id: qBtn
- x:61
- y:211
- text: "Q"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: wBtn
- x:130
- y:211
- text: "W"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: eBtn
- x:199
- y:211
- text: "E"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: rBtn
- x:268
- y:211
- text: "R"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: tBtn
- x:337
- y:211
- text: "T"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: yBtn
- x:406
- y:211
- text: "Y"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: uBtn
- x:475
- y:211
- text: "U"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: iBtn
- x:544
- y:211
- text: "I"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: oBtn
- x:613
- y:211
- text: "O"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: pBtn
- x:682
- y:211
- text: "P"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: numBtn
- x:27
- y:272
- text: "123"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 22
- }
-
- TouchButtonClimatePCA{
- id: aBtn
- x:96
- y:272
- text: "A"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: sBtn
- x:165
- y:272
- text: "S"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: dBtn
- x:234
- y:272
- text: "D"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: fBtn
- x:303
- y:272
- text: "F"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: gBtn
- x:372
- y:272
- text: "G"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: hBtn
- x:441
- y:272
- text: "H"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: jBtn
- x:510
- y:272
- text: "J"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: kBtn
- x:579
- y:272
- text: "K"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: lBtn
- x:648
- y:272
- text: "L"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: delBtn
- x:717
- y:272
- bitmap: "Nav/deleteIcon.png"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- }
-
- TouchButtonClimatePCA{
- id: symBtn
- x:61
- y:333
- text: "!@#"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 22
- }
-
- TouchButtonClimatePCA{
- id: zBtn
- x:130
- y:333
- text: "Z"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: xBtn
- x:199
- y:333
- text: "X"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: cBtn
- x:268
- y:333
- text: "C"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: vBtn
- x:337
- y:333
- text: "V"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: bBtn
- x:406
- y:333
- text: "B"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: nBtn
- x:475
- y:333
- text: "N"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: mBtn
- x:544
- y:333
- text: "M"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- txtSize: 30
- }
-
- TouchButtonClimatePCA{
- id: clrBtn
- x:613
- y:333
- text: "Clear"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- newFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- txtSize: 16
- }
-
- TouchButtonClimatePCA{
- id: spaceBtn
- x:682
- y:333
- text: "Space"
- image: "buttons/key_9_9.png"
- imagePressed: "buttons/keyPressed_9_9.png"
- imageActive: "buttons/keySelected.png"
- imageInActive: "buttons/keySelected.png"
- newFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- txtSize: 16
- }
-
- BaseText{
- id: closeTxt
- anchors.horizontalCenter: alphaLayout.horizontalCenter
- y:430
- horAlignment: Text.AlignHCenter
- vertAlignment: Text.AlignTop
- text: "CLOSE"
- color: "#1d81d5"
- pxSize: 22
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
-
- }
-
- FWdgtTouchArea{
- id: closeTouch
- height: 75
- width: 750
- y:430
- anchors.horizontalCenter: alphaLayout.horizontalCenter
- }
-
- FViewUseCase{condition: closeTouch.pressed === true
- //FActScriptCall { onScript: { FLogger.debug("Test color should change") } }
- PropertyChanges {
- target: closeTxt; color: "white"
- }
- }
-
- FViewUseCaseSimple{condition: listFiltEntry.text !== ""
- PropertyChanges {
- target: rect; visible: true
- }
- }
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavNoRouteLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavNoRouteLayout.qml
deleted file mode 100644
index 7c65e911a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/NavNoRouteLayout.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: mapLayout
- width: 800
- height: 480
-
- property alias zoomIn: zoomIn.touchBtn
- property alias zoomOut: zoomOut.touchBtn
- property alias compass: compass.touchBtn
- property alias destSearch: destSearch.touchBtn
- property alias options: options.touchBtn
-
-
-
- FWdgtImage{
- id: mapImg
- bitmap: "Nav/Map.png"
- anchors.fill: mapLayout
- }
-
- TouchButtonClimatePCA{
- id: zoomIn
- text: "+"
- x:25
- y:103
- image: "buttons/zoom_9_9.png"
- imageActive: "buttons/zoomSelected.png"
- imagePressed: "buttons/zoomPressed_9_9.png"
- txtColor: "white"
- txtSize: 40
-
- }
- TouchButtonClimatePCA{
- id: zoomOut
- text: "-"
- x:25
- y:223
- image: "buttons/zoom_9_9.png"
- imageActive: "buttons/zoomSelected.png"
- imagePressed: "buttons/zoomPressed_9_9.png"
- txtColor: "white"
- txtSize: 40
- }
- TouchButtonClimatePCA{
- id: options
- x:659
- y:80
- image: "Nav/Options_9_9.png"
- imageActive: "Nav/OptionsInActive.png"
- imagePressed: "Nav/OptionsPressed_9_9.png"
- }
- TouchButtonClimatePCA{
- id: compass
- x:34
- y:352
- image: "Nav/compass.png"
- imageActive: "Nav/compass.png"
- imagePressed: "Nav/compass.png"
- }
- TouchButtonSpecial_PCA{
- id: destSearch
- x:601
- y:419
- textWidth: 130
- bitmap: "Nav/destIcon.png"
- bitmap2: "Nav/destIconBlack.png"
- imageShift: -9
- spacing: 0
- text: " Destination"
- text1: ""
- text2: ""
- totHD: -1
-
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/OffLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/OffLayout.qml
deleted file mode 100644
index f5cc5d57a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/OffLayout.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FLayout {
- width: 800
- height: 480
-
- property alias offTouch: offTouch
-
- Rectangle {
- id: bk
- anchors.fill: parent
- color: "black"
- }
-
- FWdgtTouchArea{
- id: offTouch
- anchors.fill: bk
- }
-
-/* RectangularGlow {
- id: effect
- anchors.fill: rect
- glowRadius: 4
- spread: 0.7
- color: "#1d81d5"
- cornerRadius: rect.radius //+ glowRadius
- }
-
- Rectangle {
- id: rect
- color: "black"
- x:40
- y:40
- width: 160
- height: 45
- radius: 23
- border.width: 1
- border.color: "#1d81d5"
- }
-
- FWdgtImage{
- id: img
- x:40
- y:90
- bitmap: "OButton.png"
- }
-
- FWdgtImage{
- id: img
- x:40
- y:40
- bitmap: "Radio/ButtonEnd_8_8.png"
- }
-
- FWdgtImage{
- id: img1
- anchors.left: img.right
- anchors.top: img.top
- width:2
- fillMode: Image.Stretch
- bitmap: "Radio/ButtonCenter_0_8.png"
- }
-
- FWdgtImage{
- id: img2
- anchors.left: img1.right
- anchors.top: img1.top
- bitmap: "Radio/ButtonOtherEnd_8_8.png"
- }*/
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/PCAstatusBarLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/PCAstatusBarLayout.qml
deleted file mode 100644
index 1236ea420..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/PCAstatusBarLayout.qml
+++ /dev/null
@@ -1,123 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: statusLayout
- width: 800
- height: 480
-
- property alias menuTouch: menuTouch
-
- Rectangle{
- id: ln1
- anchors.horizontalCenter: statusLayout.horizontalCenter
- y:15
- height:1
- width: 14
- color: "#1d81d5"
- }
- Rectangle{
- id: ln2
- anchors.horizontalCenter: statusLayout.horizontalCenter
- y:19
- height:1
- width: 14
- color: "#1d81d5"
- }
- Rectangle{
- id: ln3
- anchors.horizontalCenter: statusLayout.horizontalCenter
- y:23
- height:1
- width: 14
- color: "#1d81d5"
- }
-
-
-
- BaseText{
- id: menuTxt
- anchors.horizontalCenter: statusLayout.horizontalCenter
- anchors.bottom: statusLayout.top
- anchors.bottomMargin: -50
- horAlignment: Text.AlignHCenter
- vertAlignment: Text.AlignBottom
- text: "MENU"
- color: "#1d81d5"
- pxSize: 22
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
-
- }
-
- BaseText{
- id: tempTxt
- x:25
- anchors.bottom: statusLayout.top
- anchors.bottomMargin: -50
- horAlignment: Text.AlignLeft
- vertAlignment: Text.AlignBottom
- text: "75" + "\xBA"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
- pxSize: 28
-
-
- }
-
- BaseText{
- id: clockTxt
- anchors.right: statusLayout.right
- anchors.rightMargin: 25
- anchors.bottom: statusLayout.top
- anchors.bottomMargin: -50
- horAlignment: Text.AlignRight
- vertAlignment: Text.AlignBottom
- text: "12:45"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
- pxSize: 28
- }
-
- FWdgtTouchArea{
- id: menuTouch
- height: 75
- width: 80
- y:0
- anchors.horizontalCenter: statusLayout.horizontalCenter
- }
-
- FViewUseCase{condition: menuTouch.pressed === true
- //FActScriptCall { onScript: { FLogger.debug("Test color should change") } }
- PropertyChanges {
- target: ln1; color: "white"
- }
- PropertyChanges {
- target: ln2; color: "white"
- }
- PropertyChanges {
- target: ln3; color: "white"
- }
- PropertyChanges {
- target: menuTxt; color: "white"
- }
- }
-
- FViewUseCase{
- condition: dataPool.mainPCAmenuShown ===true
- PropertyChanges {
- target: ln1; visible: false
- }
- PropertyChanges {
- target: ln2; visible: false
- }
- PropertyChanges {
- target: ln3; visible: false
- }
- PropertyChanges {
- target: menuTxt; visible: false
- }
- }
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/PhoneContactsLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/PhoneContactsLayout.qml
deleted file mode 100644
index 9e119d990..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/PhoneContactsLayout.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-
-FLayout {
-
- id: theLayout
- width: 800
- height: 480
-
- property alias list : theListPhoneView
- property alias list_itemWidget: theListPhoneView.itemWidget
- property alias list_data: theListPhoneView.data
- property alias back: back.touchBtn
- TouchButtonClimatePCA{
- id: back
- text: "+"
- x:25
- y:80
- image: "buttons/zoom_9_9.png"
- imageActive: "buttons/zoomSelected.png"
- imagePressed: "buttons/zoomPressed_9_9.png"
- txtColor: "white"
- txtSize: 40
- visible: false
-
- }
- FWdgtListView {
-
- width:600
- height:400
- id: theListPhoneView
- x:150
- y:80
- clip: true
- visible:true
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/SiriusLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/SiriusLayout.qml
deleted file mode 100644
index e275c055a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/SiriusLayout.qml
+++ /dev/null
@@ -1,195 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: fmLayout
- width: 800
- height: 480
-
- property alias sourceBtn: sourceBtn
- property alias browseBtn: browseBtn
- property alias albumInfoBtn: albumInfoBtn
- property alias albumInfoImg: stationLogoImg
- property alias stationTxt: stationTxt
- property alias trackTxt: trackTxt
- property alias artistTxt: artistTxt
- property alias alertBtn: alertBtn
- property alias preset1Btn: preset1Btn
- property alias preset2Btn: preset2Btn
- property alias preset3Btn: preset3Btn
- property alias preset4Btn: preset4Btn
- property alias preset5Btn: preset5Btn
- property alias preset6Btn: preset6Btn
- property alias replayBtn: replayBtn
- property alias tuneBtn: tuneBtn
- property alias presetsBtn: presetsBtn
-
-
- TouchButton{
- id: sourceBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 140
- anchors.left: fmLayout.left
- anchors.leftMargin: 10
- height:25
- width: 130
- text: "Source"
- }
-
- TouchButton{
- id: browseBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 180
- anchors.left: fmLayout.left
- anchors.leftMargin: 10
- height:25
- width: 130
- text: "Browse"
- }
-
- TouchButton{
- id: albumInfoBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 95
- anchors.left: fmLayout.left
- anchors.leftMargin: 190
- height:130
- width: 130
- text: "Album"
- vis: false
-
- }
-
- FWdgtImage{
- id: stationLogoImg
- anchors.top: fmLayout.top
- anchors.topMargin: 95
- anchors.left: fmLayout.left
- anchors.leftMargin: 190
- height:70
- width: 130
- bitmap: ""
- }
-
- TouchButton{
- id: alertBtn
- anchors.top: albumInfoImg.bottom
- anchors.topMargin: 20
- anchors.left: albumInfoImg.left
- height:25
- width: 90
- text: "Alert"
- }
-
- BaseText{
- id: stationTxt
- anchors.verticalCenter: trackTxt.verticalCenter
- anchors.verticalCenterOffset: -45
- anchors.left: trackTxt.left
- text: "Ch 22 / Pearl Jam Radio"
- }
-
- BaseText{
- id: trackTxt
- anchors.verticalCenter: albumInfoBtn.verticalCenter
- anchors.left: albumInfoBtn.right
- anchors.leftMargin: 15
- pxSize: 34
- text: "State of Love ..."
-
- }
-
- BaseText{
- id: artistTxt
- anchors.verticalCenter: trackTxt.verticalCenter
- anchors.verticalCenterOffset: 45
- anchors.left: trackTxt.left
- text: "Pearl Jam"
- }
-
- TouchButton{
- id: preset1Btn
- anchors.top: fmLayout.top
- anchors.topMargin: 280
- anchors.left: browseBtn.left
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset2Btn
- anchors.top: preset1Btn.bottom
- anchors.left: preset1Btn.left
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset3Btn
- anchors.top: preset1Btn.top
- anchors.left: preset1Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset4Btn
- anchors.top: preset2Btn.top
- anchors.left: preset2Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset5Btn
- anchors.top: preset3Btn.top
- anchors.left: preset3Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: preset6Btn
- anchors.top: preset4Btn.top
- anchors.left: preset4Btn.right
- height:60
- width: 208
- text: "WWWWWWWW"
- }
-
- TouchButton{
- id: replayBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.verticalCenterOffset: 35
- anchors.left: fmLayout.left
- anchors.leftMargin: 725
- height:40
- width: 55
- text: "rply"
- }
-
- TouchButton{
- id: tuneBtn
- anchors.top: preset1Btn.top
- anchors.right: replayBtn.right
- height:40
- width: 120
- text: "tune"
- }
-
- TouchButton{
- id: presetsBtn
- anchors.bottom: preset6Btn.bottom
- anchors.right: replayBtn.right
- height:60
- width: 120
- text: "presets"
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/StartLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/StartLayout.qml
deleted file mode 100644
index 396843844..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/StartLayout.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: chrome
- width: 800
- height: 480
-
- //property alias bg: _bg
- //property alias btnIndicatorState: button1.indicatorState
- property alias button1: button1
-
-
-
-
- BaseText{
- id: title
- anchors.centerIn: chrome
- text: "Chrome"
- }
-
- TouchButton{
- id: button1
- anchors.top: title.bottom
- anchors.horizontalCenter: title.horizontalCenter
- text: "Button 1"
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TC1_B1_Grid.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TC1_B1_Grid.qml
deleted file mode 100644
index d898a0c07..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TC1_B1_Grid.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- width: 800
- height: 480
-
- property alias m1: m1.children
- property alias list: listView
- property alias list_data: listView.list_data
- property alias list_itemWidget: listView.list_itemWidget
- property alias listWrap: listView.listWrap
- property alias fg: _fg
-
-
-
- Item {
- id: _fg
-
- width: 800; height: 480
-
- GridViewWidget {
- id: listView
- x: 135; y: 170
- width: 530; height: 200
- gridItemHeight: 100; gridItemWidth: 180
-
- }
-
- FWdgtContainer {
- id: m1
- width: 530; height: 55
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackImgLayoutPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackImgLayoutPCA.qml
deleted file mode 100644
index a1a0d3253..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackImgLayoutPCA.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: layout
- width: 800
- height: 480
-
- property alias m1: m1.children
- property alias list: listView
- property alias list_data: listView.list_data
- property alias list_itemWidget: listView.list_itemWidget
- property alias listWrap: listView.listWrap
- property alias fg: _fg
- property alias theX: listView.x
- property alias theY: listView.y
- property alias theWidth: listView.width
- property alias theHeight: listView.height
- property alias itemWidth: listView.gridItemWidth
- property alias itemHeight: listView.gridItemHeight
- property alias close: closeTouch
- property bool useClose: false
-
-
- Item {
- id: _fg
-
- width: 800; height: 480
-
-
- GridViewWidget {
- id: listView
- x: 0; y: 75
- width: 800; height: 356
- gridItemHeight: 178; gridItemWidth: 200
-
- }
-
- FWdgtContainer {
- id: m1
- width: 530; height: 55
- }
- }
- BaseText{
- id: closeTxt
- anchors.horizontalCenter: layout.horizontalCenter
- y:430
- horAlignment: Text.AlignHCenter
- vertAlignment: Text.AlignTop
- text: "CLOSE"
- color: "#1d81d5"
- pxSize: 22
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- visible: useClose
-
- }
-
- FWdgtTouchArea{
- id: closeTouch
- height: 75
- width: 750
- y:430
- anchors.horizontalCenter: layout.horizontalCenter
- visible: useClose
- enabled: useClose
- }
-
- FViewUseCase{condition: closeTouch.pressed === true
- //FActScriptCall { onScript: { FLogger.debug("Test color should change") } }
- PropertyChanges {
- target: closeTxt; color: "white"
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayout.qml
deleted file mode 100644
index 0aed708e3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayout.qml
+++ /dev/null
@@ -1,107 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: tileLayout
- width: 800
- height: 480
-
- property alias button1: button1
- property alias button2: button2
- property alias button3: button3
- property alias button4: button4
- property alias button5: button5
- property alias button6: button6
- property alias button7: button7
- property alias button8: button8
- property alias backBtn: backBtn
-
-
-
- Grid {
- id: theGrid
- flow: Grid.TopToBottom
- anchors.top: tileLayout.top
- anchors.topMargin: 130
- anchors.horizontalCenter: tileLayout.horizontalCenter
- anchors.leftMargin: 100
- columns: 4
- spacing: 20
- TouchButton{
- id: button1
- height:125
- width: 135
- text: "Button 1"
- }
-
- TouchButton{
- id: button2
- height:125
- width: 135
- text: "Button 2"
- }
-
- TouchButton{
- id: button3
- height:125
- width: 135
- text: "Button 3"
- }
-
- TouchButton{
- id: button4
- height:125
- width: 135
- text: "Button 4"
- }
-
- TouchButton{
- id: button5
- height:125
- width: 135
- text: "Button 5"
- }
-
- TouchButton{
- id: button6
- height:125
- width: 135
- text: "Button 6"
- }
-
- TouchButton{
- id: button7
- height:125
- width: 135
- text: "Button 7"
- }
-
- TouchButton{
- id: button8
- height:125
- width: 135
- text: "Button 8"
- }
- }
-
-
-
- BaseText{
- id: title
- anchors.top: tileLayout.top
- anchors.topMargin: 80
- anchors.horizontalCenter: tileLayout.horizontalCenter
- text: "Select a Source"
- }
-
- TouchButton{
- id: backBtn
- anchors.verticalCenter: title.verticalCenter
- anchors.left: tileLayout.left
- anchors.leftMargin: 20
- height:40
- width: 60
- text: "<"
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayoutPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayoutPCA.qml
deleted file mode 100644
index bc7545b6f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/TileBackLayoutPCA.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: layout
- width: 800
- height: 480
-
- property alias m1: m1.children
- property alias list: listView
- property alias list_data: listView.list_data
- property alias list_itemWidget: listView.list_itemWidget
- property alias listWrap: listView.listWrap
- property alias fg: _fg
- property alias theX: listView.x
- property alias theY: listView.y
- property alias theWidth: listView.width
- property alias theHeight: listView.height
- property alias itemWidth: listView.gridItemWidth
- property alias itemHeight: listView.gridItemHeight
- property alias close: closeTouch
- property bool useClose: true
-
-
-
-
- Item {
- id: _fg
-
- width: 800; height: 480
-
- GridViewWidget {
- id: listView
- x: 130; y: 170
- width: 540; height: 200
- gridItemHeight: 100; gridItemWidth: 180
-
- }
-
- FWdgtContainer {
- id: m1
- width: 530; height: 55
- }
-
-
- }
-
- BaseText{
- id: closeTxt
- anchors.horizontalCenter: layout.horizontalCenter
- y:430
- horAlignment: Text.AlignHCenter
- vertAlignment: Text.AlignTop
- text: "CLOSE"
- color: "#1d81d5"
- pxSize: 22
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- visible: useClose
-
- }
-
- FWdgtTouchArea{
- id: closeTouch
- height: 75
- width: 750
- y:430
- anchors.horizontalCenter: layout.horizontalCenter
- visible: useClose
- enabled: useClose
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayout.qml
deleted file mode 100644
index 178fe6fc1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayout.qml
+++ /dev/null
@@ -1,132 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: fmLayout
- width: 800
- height: 480
-
- property alias sourceBtn: sourceBtn
- property alias browseBtn: browseBtn
- property alias albumInfoBtn: albumInfoBtn
- property alias stationTxt: stationTxt
- property alias trackTxt: trackTxt
- property alias artistTxt: artistTxt
- property alias seekBkBtn: seekBkBtn
- property alias playBtn: playBtn
- property alias seekFdBtn: seekFdBtn
- property alias repeatBtn: repeatBtn
- property alias shuffleBtn: shuffleBtn
-
-
- TouchButton{
- id: sourceBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 140
- anchors.left: fmLayout.left
- anchors.leftMargin: 10
- height:25
- width: 130
- text: "Source"
- }
-
- TouchButton{
- id: browseBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 290
- anchors.left: fmLayout.left
- anchors.leftMargin: 10
- height:25
- width: 130
- text: "Browse"
- }
-
- TouchButton{
- id: albumInfoBtn
- anchors.top: fmLayout.top
- anchors.topMargin: 95
- anchors.left: fmLayout.left
- anchors.leftMargin: 190
- height:130
- width: 130
- text: "Album"
- }
-
- BaseText{
- id: stationTxt
- anchors.verticalCenter: trackTxt.verticalCenter
- anchors.verticalCenterOffset: -45
- anchors.left: trackTxt.left
- text: "Ch 22 / Pearl Jam Radio"
- }
-
- BaseText{
- id: trackTxt
- anchors.verticalCenter: albumInfoBtn.verticalCenter
- anchors.left: albumInfoBtn.right
- anchors.leftMargin: 15
- pxSize: 34
- text: "State of Love ..."
-
- }
-
- BaseText{
- id: artistTxt
- anchors.verticalCenter: trackTxt.verticalCenter
- anchors.verticalCenterOffset: 45
- anchors.left: trackTxt.left
- text: "Pearl Jam"
- }
-
- TouchButton{
- id: seekBkBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.horizontalCenter: playBtn.horizontalCenter
- anchors.horizontalCenterOffset: -150
- height:100
- width: 100
- text: "<<"
- }
-
- TouchButton{
- id: playBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.horizontalCenter: fmLayout.horizontalCenter
- height:120
- width: 120
- text: "||"
- }
-
- TouchButton{
- id: seekFdBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.horizontalCenter: playBtn.horizontalCenter
- anchors.horizontalCenterOffset: 150
- height:100
- width: 100
- text: ">>"
- }
-
- TouchButton{
- id: repeatBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.verticalCenterOffset: -35
- anchors.left: fmLayout.left
- anchors.leftMargin: 670
- height:40
- width: 55
- text: "rpt"
- }
-
- TouchButton{
- id: shuffleBtn
- anchors.verticalCenter: browseBtn.verticalCenter
- anchors.verticalCenterOffset: 35
- anchors.left: repeatBtn.left
- height:40
- width: 55
- text: "sfl"
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayoutPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayoutPCA.qml
deleted file mode 100644
index d82077b55..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Layouts/USBLayoutPCA.qml
+++ /dev/null
@@ -1,155 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: fmLayout
- width: 800
- height: 480
-
- property alias sourceBtn: sourceBtn
- property alias browseBtn: browseBtn
- property alias trackNumTxt: trackNumTxt.text
- property alias artist: artistTxt.text
- property alias play: play.touchBtn
- property alias pause: pause.touchBtn
- property bool playing: true
-
-
-
-
- FWdgtImage{
- id: albumArt
- x:25
- y:176
- bitmap: "USB/albumArt.png"
- }
-
- TouchButton_PCA{
- id: sourceBtn
- x:25
- y:80
- textWidth: 100
- text: "FM Radio"
-
- }
-
- TouchButton_PCA{
- id: browseBtn
- anchors.right: fmLayout.right
- anchors.rightMargin: 25
- y:80
- textWidth: 75
- text: "Browse"
-
- }
-
- BaseText{
- id: trackNumTxt
- x:181
- y:188
- pxSize: 22
- text: "Track 13/ 16"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTCom-Lt.ttf"
-
- }
-
- BaseText{
- id: trackTxt
- x:181
- y:225
- text: "The Dog Days Are Over"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- pxSize: 45
-
-
- }
-
- BaseText{
- id: artistTxt
- x:181
- y:280
- text: "Florence and the Machine"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- pxSize: 22
- }
-
-
- TouchButtonClimatePCA{
- id: play
- x:367
- y:390
- image: "USB/play_9_9.png"
- imagePressed: "USB/playPressed_9_9.png"
- visible: playing
- enabled: playing
- }
-
- TouchButtonClimatePCA{
- id: pause
- x:367
- y:390
- image: "USB/pause_9_9.png"
- imagePressed: "USB/pausePressed_9_9.png"
- visible: !playing
- enabled: !playing
- }
-
- TouchButtonClimatePCA{
- id: seekBack
- x:287
- y:399
- image: "USB/Prev_9_9.png"
- imagePressed: "USB/PrevPressed_9_9.png"
- }
-
- TouchButtonClimatePCA{
- id: seekNext
- x:463
- y:399
- image: "USB/Next_9_9.png"
- imagePressed: "USB/NextPressed_9_9.png"
- }
-
- Rectangle{
- x:92
- y: 365
- height:1
- width: 616
- color: "#1d81d5"
- }
-
- Rectangle{
- x:92
- y: 365
- height:1
- width: 138
- color: "white"
- }
-
- BaseText{
- id: elapsedTime
- x:25
- y:358
- text: "02:36"
- color: "white"
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- pxSize: 18
- }
-
- BaseText{
- id: totTime
- y:358
- anchors.right: fmLayout.right
- anchors.rightMargin: 25
- horAlignment: Text.AlignRight
- text: "04:23"
- color: "#1d81d5"
- theFont: "../Fonts/HelveticaNeueLTStd-Md.ttf"
- pxSize: 18
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qml b/SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qml
deleted file mode 100644
index 22e408c71..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qml
+++ /dev/null
@@ -1,373 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "Models"
-import "Widgets"
-import "Styles"
-
-Rectangle {
- width: 1360
- height: 768
- color: "black"
-
- // global events
- FEvent { id: cornerClicked }
- FEvent { id: closeNormalScreens }
-
- //global timers
- FTimer {id: testTimer; interval: 5000; repeat: false}
-
- // global datapools
- FDataPool {
- id: dataPool
-
- property string version: "V1.0.0"
- property string currSource: "FM"
- property string currStation: "91.9"
- property string currStatText: "WUOM"
- property string currSong: "Fresh Air"
- property string currAlbumArt: "album artRazorFish.png"
- property int layout: 2 //AM/FM:0, AMhd:1, FMhd:2, Sirius:3, USB:4, BT:5
- property int currFMpreset: 2
- property int currAMpreset: 1
- property int currSATpreset: 3
- property string curStationDT: ""
- property int statusBarChange: 0
- property int curFanSpeed: 1
- property int drvTemp: 70
- property int passTemp: 70
-
- property bool mainPCAmenuShown: false
-
-
- property string fm1pre1: "101.1"
- property string fm1pre2: "97.1"
- property string fm1pre3: "94.7"
- property string fm1pre4: "91.7"
- property string fm1pre5: "101.9"
- property string fm1pre6: "88.7"
-
- property string fm1stat1: "WRIF"
- property string fm1stat2: "WXYT"
- property string fm1stat3: "WCSX"
- property string fm1stat4: "WUOM"
- property string fm1stat5: "WDET"
- property string fm1stat6: "CIMX"
-
- property string fm1song1: "Ace of Spades"
- property string fm1song2: "Sports Talk"
- property string fm1song3: "Born to Run"
- property string fm1song4: "Fresh Air"
- property string fm1song5: "The Craig Fahle Show"
- property string fm1song6: "State of Love and Trust"
-
- property string fm2pre1: "101.1"
- property string fm2pre2: "97.1"
- property string fm2pre3: "94.7"
- property string fm2pre4: "91.7"
- property string fm2pre5: "101.9"
- property string fm2pre6: "88.7"
-
- property string fm2stat1: "WRIF"
- property string fm2stat2: "WXYT"
- property string fm2stat3: "WCSX"
- property string fm2stat4: "WUOM"
- property string fm2stat5: "WDET"
- property string fm2stat6: "CIMX"
-
- property string fm2song1: "Ace of Spades"
- property string fm2song2: "Sports Talk"
- property string fm2song3: "Born to Run"
- property string fm2song4: "Fresh Air"
- property string fm2song5: "The Craig Fahle Show"
- property string fm2song6: "State of Love and Trust"
-
- property string fm3pre1: "101.1"
- property string fm3pre2: "97.1"
- property string fm3pre3: "94.7"
- property string fm3pre4: "91.7"
- property string fm3pre5: "101.9"
- property string fm3pre6: "88.7"
-
- property string fm3stat1: "WRIF"
- property string fm3stat2: "WXYT"
- property string fm3stat3: "WCSX"
- property string fm3stat4: "WUOM"
- property string fm3stat5: "WDET"
- property string fm3stat6: "CIMX"
-
- property string fm3song1: "Ace of Spades"
- property string fm3song2: "Sports Talk"
- property string fm3song3: "Born to Run"
- property string fm3song4: "Fresh Air"
- property string fm3song5: "The Craig Fahle Show"
- property string fm3song6: "State of Love and Trust"
-
-
- /*List Filtered Variables*/
- property string navEnrty:""
- property string filter: ""
- property variant uniqueChars: undefined
- property string navList1stItem:""
- property string filterPhone:""
- }
-
- // global conditions
- FConditionPool {
- id: condPool
-
- property bool amfmActiveSource: true
- property bool settingsOpen: false
- property bool dualBtnSt: true
- property bool drvHeatSeatSt: false
- property bool drvCoolSeatSt: false
- property bool passCoolSeatSt: false
- property bool passHeatSeatSt: false
- property bool heatWheelSt: false
- property bool heatWinSheildSt: true
- property bool defrostSt: true
- property bool pannelSt: false
- property bool floorSt: false
-
- property bool showMenu: true
-
- }
-
-
- Component.onCompleted: {
- FThemeProvider.resourcePath = Qt.resolvedUrl("Resources");
- FThemeProvider.theme = "Theme1";
-
-
- }
- property QtObject filtermodel: ListModel {
- ListElement { staticItem: "Five Guys" }
- ListElement { staticItem: "Archers Of Loaf" }
- ListElement { staticItem: "Bob Mould" }
- ListElement { staticItem: "Cat Power" }
- ListElement { staticItem: "Cloud Nothings"}
- ListElement { staticItem: "Dentist"}
- ListElement { staticItem: "Dirty Frank's" }
- ListElement { staticItem: "Grouplove" }
- ListElement { staticItem: "Hudson Bell"}
- ListElement { staticItem: "Japandroids" }
- ListElement { staticItem: "Macklemore & Ryan Lewis"}
- ListElement { staticItem: "The National"}
- ListElement { staticItem: "Titus Andronicus" }
- ListElement { staticItem: "Tito" }
- ListElement { staticItem: "Tamal" }
- ListElement { staticItem: "Taco" }
- }
-
- QtObject{
- id:sortList
-
- //Check if char exist on Phone DataModel
- function existChar(model, character){
- //console.log(model.get(3).staticItem.charAt(0).toLowerCase())
- for (var i = 0; i < model.count; i++) {
- var u =model.get(i).staticItem.charAt(0).toLowerCase()
- if (character=== u){
- console.log(i)
- return i;
- }
-
- }
-
- }
-
- // Check whether given character exists in array
- function exist(array, character) {
- console.log(array[0]);
- for (var i = 0; i < array.length; i++) {
-
- if (array[i] == character) return true;
- }
- return false;
- }
-
- // Check whether given filter matches the string (e.g. "ce" would match "Cecilia")
- // The check is case-insensitive
- function checkFilter(filter, string) {
- if (filter.length > string.length) return false;
-
- var filterlower = filter.toLowerCase();
- var stringlower = string.toLowerCase();
-
- for (var i = 0; i < filter.length; i++) {
- if (filterlower[i] != stringlower[i])
- return false;
- }
-
- return true;
- }
-
- // Updates the filtermodel based on the current filter
- function updateFilterModel(name) {
- if (dataPool.filter.length > 0) {
- for (var i = filtermodel.count-1; i >= 0; i--) {
- if (!checkFilter(dataPool.filter, filtermodel.get(i).staticItem))
- filtermodel.remove(i)
- }
- }
-
- updateUniqueChars()
- }
-
- // Updates the array of unique first letters in the current index of the model
- function updateUniqueChars() {
-
- if (filtermodel.get(0) === undefined)
- {
- dataPool.navList1stItem=""
- return;
-
- }
-
- var characters = new Array();
-
- // If filter model has at most 1 item in it, no point in going
- // any further with filtering
- dataPool.navList1stItem=filtermodel.get(0).staticItem
- if (filtermodel.count > 1) {
-
- for (var i = 0; i < filtermodel.count; i++) {
- var name = filtermodel.get(i).staticItem;
-
- if (!exist(characters, name[dataPool.filter.length])) {
- characters.push(name[dataPool.filter.length])
- }
- }
-
- characters.sort()
-
-
- }
-
-
- dataPool.uniqueChars = characters
-
- }
-
-
- // Fills the filtermodel with contents from the source list's model
- function fillFilterModel(fullModel) {
- if (fullModel === undefined) return;
- filtermodel.clear();
- for (var i = 0; i < fullModel.count; i++) {
- filtermodel.append(fullModel.get(i))
- }
-
- }
-
- }
-
- FDisplay {
-
- /* modelPath:Qt.resolvedUrl(".")
- id: display
- //activeVariant: "ClassicTop"
- //activeVariant: "ClassicBottom"
- //activeVariant: "Tangier"
- viewCacheSize:0
-
- //width: 800
- //height: 480
-// xPixel: 800
-// yPixel: 480
- anchors.fill: parent
-// anchors { left: parent.left; top: parent.top;}
-
- priorityLayerCount: 9
- //initialView: "AutocompleteList"
- initialView: "Off"*/
-
-
-
- modelPath:Qt.resolvedUrl(".")
- id: display
- //activeVariant: "ClassicTop"
- //activeVariant: "ClassicBottom"
- //activeVariant: "Tangier"
- viewCacheSize:0
-
-
- width: 800
- height: 480
-
- xPixel: 800
- yPixel: 480
-
- anchors {
- horizontalCenter: parent.horizontalCenter;
- verticalCenter: parent.verticalCenter;
- verticalCenterOffset: 55
- }
-
- priorityLayerCount: 9
- initialView: "Off"
- //initialView: "NavTilesView"
- }
-
- Item
- {
- id: fHardwareKeybezel1
- width: 800
- height: 375
- x:10
- y:500
-
- // function keys
- TextHardkey {
- id: hk_OnOff
- width: 100
- height: 50
- anchors.left: parent.left
- anchors.leftMargin: 0
- anchors.top: parent.top
- anchors.topMargin: 0
- label: "On/Off"
- }
-
- BaseText {
- id: info
- text: dataPool.version
- color: "black"
- anchors.top: hk_OnOff.top
- anchors.left: hk_OnOff.right
- anchors.leftMargin: 20
- }
-
-
- FHardwareKey {
- id: buttonUp
- hardwareControlID: "buttonUp"
- //commName: "buttonBack"
-
- x:0
- y:0
- width: 60
- height:25
-
-
- keyboardKey: Qt.Key_Up
- visible: false
- }
-
- FHardwareKey {
- id: buttonDown
- hardwareControlID: "buttonDown"
- //commName: "buttonBack"
-
- x:0
- y:0
- width: 60
- height:25
-
-
- keyboardKey: Qt.Key_Down
- visible: false
- }
-
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qmlproject b/SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qmlproject
deleted file mode 100644
index e9402cbac..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/PCA_HMI_v1_0.qmlproject
+++ /dev/null
@@ -1,20 +0,0 @@
-/* File generated by Qt Creator, version 2.6.1 */
-
-import QmlProject 1.1
-
-Project {
- mainFile: "PCA_HMI_v1_0.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- importPaths: [ "plugins" ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/CButton.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/CButton.png
deleted file mode 100644
index aeebdb64c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/CButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Ford-HMI-PCA-phone_contacts.psd b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Ford-HMI-PCA-phone_contacts.psd
deleted file mode 100644
index 982bd5882..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Ford-HMI-PCA-phone_contacts.psd
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/HierarchicalListBG.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/HierarchicalListBG.png
deleted file mode 100644
index 805236eaf..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/HierarchicalListBG.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Map.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Map.png
deleted file mode 100644
index 4b39af9b2..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Map.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsInActive.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsInActive.png
deleted file mode 100644
index 601b242bb..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsInActive.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsPressed_9_9.png
deleted file mode 100644
index 42c352a7e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/OptionsPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Options_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Options_9_9.png
deleted file mode 100644
index 46887f106..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/Options_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/compass.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/compass.png
deleted file mode 100644
index b78041307..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/compass.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/current street.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/current street.png
deleted file mode 100644
index e289c054f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/current street.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIcon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIcon.png
deleted file mode 100644
index 826b5faac..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIcon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIconBlack.png
deleted file mode 100644
index 56e35c759..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/deleteIconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIcon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIcon.png
deleted file mode 100644
index dadcfe25c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIcon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIconBlack.png
deleted file mode 100644
index 75c99bc4a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/destIconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/turnArrow.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/turnArrow.png
deleted file mode 100644
index f37731f5a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Nav/turnArrow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/OButton.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/OButton.png
deleted file mode 100644
index 281177095..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/OButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonCenter_0_8.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonCenter_0_8.png
deleted file mode 100644
index 9933dbcc7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonCenter_0_8.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonEnd_8_8.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonEnd_8_8.png
deleted file mode 100644
index 672e57bf3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonEnd_8_8.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonOtherEnd_8_8.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonOtherEnd_8_8.png
deleted file mode 100644
index cc9cb83ed..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/ButtonOtherEnd_8_8.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/Ford-HMI-PCA-audio_fm_sirius.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/Ford-HMI-PCA-audio_fm_sirius.png
deleted file mode 100644
index efe0b7b58..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/Ford-HMI-PCA-audio_fm_sirius.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo.png
deleted file mode 100644
index dfc3d4ccf..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo1.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo1.png
deleted file mode 100644
index 80c9d58b4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HD Logo1.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HDBtn_8_8.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HDBtn_8_8.png
deleted file mode 100644
index 6ed0293aa..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/HDBtn_8_8.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/SourceBtn_8_8.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/SourceBtn_8_8.png
deleted file mode 100644
index 375195bec..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/SourceBtn_8_8.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/TuneBtn_8_8.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/TuneBtn_8_8.png
deleted file mode 100644
index 99f5e90c3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/TuneBtn_8_8.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/blueBall.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/blueBall.png
deleted file mode 100644
index d4db3f96a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/blueBall.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/menuIcon_2_2.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/menuIcon_2_2.png
deleted file mode 100644
index 1422e00b4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/menuIcon_2_2.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/perlJamIcon_0_0.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/perlJamIcon_0_0.png
deleted file mode 100644
index 3c1cad7c3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/perlJamIcon_0_0.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/whiteBall.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/whiteBall.png
deleted file mode 100644
index 952714ebe..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Radio/whiteBall.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/NextPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/NextPressed_9_9.png
deleted file mode 100644
index aab3df891..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/NextPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Next_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Next_9_9.png
deleted file mode 100644
index c432068d4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Next_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/PrevPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/PrevPressed_9_9.png
deleted file mode 100644
index c6eefc09c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/PrevPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Prev_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Prev_9_9.png
deleted file mode 100644
index acc2a71de..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/Prev_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/albumArt.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/albumArt.png
deleted file mode 100644
index 900068027..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/albumArt.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause.png
deleted file mode 100644
index 71a7574d2..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pausePressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pausePressed_9_9.png
deleted file mode 100644
index a26cf2e4e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pausePressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause_9_9.png
deleted file mode 100644
index 417bdbf24..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/pause_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/playPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/playPressed_9_9.png
deleted file mode 100644
index ecbb4f2ef..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/playPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/play_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/play_9_9.png
deleted file mode 100644
index f185e9446..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/USB/play_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/Ambient Lighti Icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/Ambient Lighti Icon.png
deleted file mode 100644
index 9b65fd5ce..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/Ambient Lighti Icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/EV Icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/EV Icon.png
deleted file mode 100644
index 0607fb864..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/EV Icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/MCS Icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/MCS Icon.png
deleted file mode 100644
index 1756d5fdf..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/MCS Icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/SYNC Services.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/SYNC Services.png
deleted file mode 100644
index 361e00fd7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/SYNC Services.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/cal.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/cal.png
deleted file mode 100644
index 94d5d44b5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/cal.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/folders.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/folders.png
deleted file mode 100644
index c5985043d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/folders.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/key_car.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/key_car.png
deleted file mode 100644
index a8e5d9d66..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/key_car.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/sun.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/sun.png
deleted file mode 100644
index 6424d9d21..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/Vehicle/sun.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/album artRazorFish.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/album artRazorFish.png
deleted file mode 100644
index 80c57b4ff..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/album artRazorFish.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keyPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keyPressed_9_9.png
deleted file mode 100644
index b0f886342..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keyPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keySelected.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keySelected.png
deleted file mode 100644
index d264e201a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/keySelected.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/key_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/key_9_9.png
deleted file mode 100644
index 3add8dd21..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/key_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteActive.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteActive.png
deleted file mode 100644
index e14b9fb75..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteActive.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteInActive.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteInActive.png
deleted file mode 100644
index a2c1cb831..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/muteInActive.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mutePressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mutePressed_9_9.png
deleted file mode 100644
index 9a9ae5934..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mutePressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mute_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mute_9_9.png
deleted file mode 100644
index f7306d96a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/mute_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetPressed_9_9.png
deleted file mode 100644
index fd7606fbd..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetSelected.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetSelected.png
deleted file mode 100644
index 2b567e237..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/presetSelected.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/preset_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/preset_9_9.png
deleted file mode 100644
index 58c296a4e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/preset_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomPressed_9_9.png
deleted file mode 100644
index c67d2c7c5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomSelected.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomSelected.png
deleted file mode 100644
index 36bba93d8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoomSelected.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoom_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoom_9_9.png
deleted file mode 100644
index 0df4d2510..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/buttons/zoom_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C icon.png
deleted file mode 100644
index 8554ddfb4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C iconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C iconBlack.png
deleted file mode 100644
index c549010d6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/A_C iconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonActive_0_0.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonActive_0_0.png
deleted file mode 100644
index 55e2cac50..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonActive_0_0.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonInActive_0_0.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonInActive_0_0.png
deleted file mode 100644
index 9f84a139e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonInActive_0_0.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonPressed_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonPressed_9_9.png
deleted file mode 100644
index 691f6e3bf..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ButtonPressed_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/Button_9_9.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/Button_9_9.png
deleted file mode 100644
index 411f00393..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/Button_9_9.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost icon.png
deleted file mode 100644
index 9b0fc7aa4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost iconBlue.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost iconBlue.png
deleted file mode 100644
index 22e384dbc..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/defrost iconBlue.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face icon.png
deleted file mode 100644
index 72448d6aa..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face iconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face iconBlack.png
deleted file mode 100644
index 4ed608980..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/face iconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet icon.png
deleted file mode 100644
index bac7bc9cf..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet iconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet iconBlack.png
deleted file mode 100644
index 6d7a3b7a1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/feet iconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dash.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dash.png
deleted file mode 100644
index c46b690f7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dash.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dashBlue.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dashBlue.png
deleted file mode 100644
index cf5168b55..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/headed dashBlue.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat icon.png
deleted file mode 100644
index 11a32048c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat iconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat iconBlack.png
deleted file mode 100644
index 8211eb79e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/heated seat iconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ring.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ring.png
deleted file mode 100644
index 9908bf71b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/ring.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel icon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel icon.png
deleted file mode 100644
index 5956f5a3d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel iconBlack.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel iconBlack.png
deleted file mode 100644
index af3c2598d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/climate/wheel iconBlack.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/dn-arrow.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/dn-arrow.png
deleted file mode 100644
index bb1322277..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/dn-arrow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/g136p.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/g136p.png
deleted file mode 100644
index 1d49f184a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/g136p.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/g137p.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/g137p.png
deleted file mode 100644
index 8e674d75b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/g137p.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/arrow.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/arrow.png
deleted file mode 100644
index 4c215b2bf..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/arrow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/car.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/car.png
deleted file mode 100644
index 18a21656d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/car.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/gear.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/gear.png
deleted file mode 100644
index b1eeba091..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/gear.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/notes.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/notes.png
deleted file mode 100644
index 8b4a92fff..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/notes.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/phone.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/phone.png
deleted file mode 100644
index 346f36cc3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/phone.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/snow.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/snow.png
deleted file mode 100644
index 54756bb2f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/menu/snow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDoff.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDoff.png
deleted file mode 100644
index 04bb2476c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDoff.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDon.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDon.png
deleted file mode 100644
index 56b9fe706..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/DNDon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/contacts.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/contacts.png
deleted file mode 100644
index a16d518ba..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/contacts.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/keypad.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/keypad.png
deleted file mode 100644
index 1792c8fac..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/keypad.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/messages.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/messages.png
deleted file mode 100644
index b5cbb8e8a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/messages.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/more.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/more.png
deleted file mode 100644
index 908ebf654..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/more.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/recent.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/recent.png
deleted file mode 100644
index db54c2f16..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/recent.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/texts.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/texts.png
deleted file mode 100644
index 31c024b1d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/phone/texts.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/scrollbar.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/scrollbar.png
deleted file mode 100644
index c849382ae..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/scrollbar.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/slider.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/slider.png
deleted file mode 100644
index 83c54f854..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/slider.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Resources/up-arrow.png b/SDL_Core/src/components/qt_hmi/References/Look/Resources/up-arrow.png
deleted file mode 100644
index b0e710a40..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Resources/up-arrow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/TextHardkey.qml b/SDL_Core/src/components/qt_hmi/References/Look/TextHardkey.qml
deleted file mode 100644
index b73b99116..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/TextHardkey.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "Widgets"
-
-FHardwareKey {
- width: 50
- height: 50
-
- property alias label : theText.text
-
- Rectangle {
- anchors.fill: parent
- border.color: "black"
- border.width: 1
- radius: 10
- smooth: true
-
- gradient: Gradient {
- GradientStop {
- id: s1
- color: "#FF646464"
- position: 0.0
- }
- GradientStop {
- id: s2
- color: "#FF484848"
- position: 0.8
- }
- GradientStop {
- id: s3
- color: "#FF323232"
- position: 1.0
- }
- }
- }
-
- CondText {
- id: theText
- anchors.fill: parent
- horizontalAlignment: Text.AlignHCenter
-
- }
-
-
- FViewUseCaseSimple {
- condition: pressed === true
- PropertyChanges { target: s1; position: 1.0 }
- PropertyChanges { target: s2; position: 0.2}
- PropertyChanges { target: s3; position: 0.0 }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/AM.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/AM.qml
deleted file mode 100644
index 2ed7d8085..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/AM.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: FMLayout {
- id:home
- albumInfoBtn.vis: false
- albumInfoImg.visible: false
- alertBtn.vis: false
- browseBtn.vis: false
- replayBtn.vis: false
- preset1Btn.text: "WJR"
- preset2Btn.text: "1130"
- preset3Btn.text: "950"
- preset4Btn.text: "WWJ"
- preset5Btn.text: "WXYZ"
- preset6Btn.text: "1330"
- artistTxt.text: ""
- stationTxt.text: ""
- trackTxt.text: "950"
-
-
- }
-
-
- }
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChange" }
- },
- FTrgTouchArea { touchArea:home.browseBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.albumInfoBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset1Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset2Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset3Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset4Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset5Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset6Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.replayBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.tuneBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.presetsBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/AMPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/AMPCA.qml
deleted file mode 100644
index 9a0a99f83..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/AMPCA.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- attachedViews: ["PCAstatusBar"]
-
-
-
-
- view: FView {
- id: v
-
- layout: FMLayoutPCA {
- id:home
- sourceBtn.text: "AM Radio"
- freqId: "AM"
- sourceBtn.textWidth: 100
- curPreset: dataPool.currAMpreset
- hdBtn.visible: false
-
- listModel: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- }
-
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: preset1; menuText: "1130"; menuData: false; }
- FMenuElement { id: preset2; menuText: "950"; menuData: false }
- FMenuElement { id: preset3; menuText: "760"; menuData: true }
- FMenuElement { id: preset4; menuText: "1270"; menuData: false }
- FMenuElement { id: preset5; menuText: "1310"; menuData: false }
- FMenuElement { id: preset6; menuText: "800"; menuData: false }
- FMenuElement { id: preset7; menuText: "610"; menuData: false }
- FMenuElement { id: preset8; menuText: "820"; menuData: false}
- }
- }
-
-
-
- triggers: [
-
-
-
- FTrgEntry{
- FGrdCondition{condition: dataPool.currAMpreset === 1
- FActScriptCall { onScript: home.stationTxt = "1130" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 2
- FActScriptCall { onScript: home.stationTxt = "950" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 3
- FActScriptCall { onScript: home.stationTxt = "760" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 4
- FActScriptCall { onScript: home.stationTxt = "1270" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 5
- FActScriptCall { onScript: home.stationTxt = "1310" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 6
- FActScriptCall { onScript: home.stationTxt = "800" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 7
- FActScriptCall { onScript: home.stationTxt = "610" }
- }
- FGrdCondition{condition: dataPool.currAMpreset === 8
- FActScriptCall { onScript: home.stationTxt = "820" }
- }
- },
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgMenuElement { menuElement: preset1
- FActScriptCall { onScript: home.stationTxt = "1130" }
- FActScriptCall { onScript: dataPool.currAMpreset = 1 }
- },
- FTrgMenuElement { menuElement: preset2
- FActScriptCall { onScript: home.stationTxt = "950" }
- FActScriptCall { onScript: dataPool.currAMpreset = 2 }
- },
- FTrgMenuElement { menuElement: preset3
- FActScriptCall { onScript: home.stationTxt = "760" }
- FActScriptCall { onScript: dataPool.currAMpreset = 3 }
- },
- FTrgMenuElement { menuElement: preset4
- FActScriptCall { onScript: home.stationTxt = "1270" }
- FActScriptCall { onScript: dataPool.currAMpreset = 4 }
- },
- FTrgMenuElement { menuElement: preset5
- FActScriptCall { onScript: home.stationTxt = "1310" }
- FActScriptCall { onScript: dataPool.currAMpreset = 5 }
- },
- FTrgMenuElement { menuElement: preset6
- FActScriptCall { onScript: home.stationTxt = "800" }
- FActScriptCall { onScript: dataPool.currAMpreset = 6 }
- },
- FTrgMenuElement { menuElement: preset7
- FActScriptCall { onScript: home.stationTxt = "610" }
- FActScriptCall { onScript: dataPool.currAMpreset = 7 }
- },
- FTrgMenuElement { menuElement: preset8
- FActScriptCall { onScript: home.stationTxt = "820" }
- FActScriptCall { onScript: dataPool.currAMpreset = 8 }
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/AlphaSortPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/AlphaSortPCA.qml
deleted file mode 100644
index 015845111..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/AlphaSortPCA.qml
+++ /dev/null
@@ -1,151 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- attachedViews: ["PCAstatusBar"]
-
-
-
-
- view: FView {
- id: v
-
- layout: AlphaSortLayout {
- id:home
- phonEntry: dataPool.filterPhone
-
- }
-
-
- }
-
- triggers: [
-
- FTrgEntry{
- FActScriptCall { onScript: dataPool.filterPhone= ""}
- },
- FTrgTouchArea { touchArea:home.a; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "a"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.b; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "b"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.c; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "c"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.d; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "d"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.e; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "e"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.f; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "f"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.g; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "g"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.h; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "h"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.i; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "i"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.j; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "j"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.k; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "k"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.l; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "l"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.m; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "m"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.n; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "n"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.o; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "o"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.p; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "p"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.q; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "q"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.r; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "r"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.s; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "s"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.t; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "t"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.u; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "u"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.v; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "v"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.w; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "w"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.xB; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "x"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.yB; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "y"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.zB; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "z"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.num; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.filterPhone= "a"}
- FActViewShow { view: "PhoneContactsListView" }
- },
- FTrgTouchArea { touchArea:home.close; touchAction: TA.Out
-
- FActViewShow { view: "PhonePCA" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/AuxPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/AuxPCA.qml
deleted file mode 100644
index 478d1e55d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/AuxPCA.qml
+++ /dev/null
@@ -1,41 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: FMLayoutPCA {
- id:home
- sourceBtn.text: "Line In"
- sourceBtn.textWidth: 90
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/BT_AudioPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/BT_AudioPCA.qml
deleted file mode 100644
index 83a83147f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/BT_AudioPCA.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: USBLayoutPCA {
- id:home
- sourceBtn.text: "BT Audio"
- sourceBtn.textWidth: 100
- playing: true
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgTouchArea { touchArea:home.play; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = false }
- },
- FTrgTouchArea { touchArea:home.pause; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = true }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/CDPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/CDPCA.qml
deleted file mode 100644
index bc6e6ab2f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/CDPCA.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: USBLayoutPCA {
- id:home
- sourceBtn.text: "CD"
- sourceBtn.textWidth: 40
- playing: true
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgTouchArea { touchArea:home.play; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = false }
- },
- FTrgTouchArea { touchArea:home.pause; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = true }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/Chrome.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/Chrome.qml
deleted file mode 100644
index e8029fb10..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/Chrome.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 8
-
-
-
- view: FView {
- id: v
-
- layout: ChromeLayout {
- id:chrome
- button2.indicatorState: condPool.settingsOpen
-
- }
-
-
- }
-
- /*FViewUseCaseSimple{condition:condPool.settingsOpen
- PropertyChanges {
- target: chrome.button2; indicatorState: true
- }
- }*/
-
- triggers: [
- FTrgEntry {
-
- },
-
- FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- FActEventFire { event: closeNormalScreens }
- FActViewShow { view: "Off" }
- },
- FTrgTouchArea { touchArea:chrome.button1; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:chrome.button2; touchAction: TA.Out
- FActViewShow { view: "List" }
- },
- FTrgTouchArea { touchArea:chrome.button3; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/ClimatePCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/ClimatePCA.qml
deleted file mode 100644
index 812e6afac..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/ClimatePCA.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
-
-
- view: FView {
- id: v
-
- layout: ClimatePCALayout {
- id:climate
- dualBtnSt: condPool.dualBtnSt
- drvHeatSeatSt: condPool.drvHeatSeatSt
- drvCoolSeatSt: condPool.drvCoolSeatSt
- passCoolSeatSt: condPool.passCoolSeatSt
- passHeatSeatSt: condPool.passHeatSeatSt
- heatWheelSt: condPool.heatWheelSt
- heatWinSheildSt: condPool.heatWinSheildSt
- defrostSt: condPool.defrostSt
- pannelSt: condPool.pannelSt
- floorSt: condPool.floorSt
-
- }
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:climate.dualBtn; touchAction: TA.Out
- FActScriptCall { onScript: condPool.dualBtnSt = !condPool.dualBtnSt }
- },
- FTrgTouchArea { touchArea:climate.drvHeatSeat; touchAction: TA.Out
- FActScriptCall { onScript: condPool.drvHeatSeatSt = !condPool.drvHeatSeatSt }
- },
- FTrgTouchArea { touchArea:climate.drvCoolSeat; touchAction: TA.Out
- FActScriptCall { onScript: condPool.drvCoolSeatSt = !condPool.drvCoolSeatSt }
- },
- FTrgTouchArea { touchArea:climate.passCoolSeat; touchAction: TA.Out
- FActScriptCall { onScript: condPool.passCoolSeatSt = !condPool.passCoolSeatSt }
- },
- FTrgTouchArea { touchArea:climate.passHeatSeat; touchAction: TA.Out
- FActScriptCall { onScript: condPool.passHeatSeatSt = !condPool.passHeatSeatSt }
- },
- FTrgTouchArea { touchArea:climate.heatWheel; touchAction: TA.Out
- FActScriptCall { onScript: condPool.heatWheelSt = !condPool.heatWheelSt }
- },
- FTrgTouchArea { touchArea:climate.heatWinSheild; touchAction: TA.Out
- FActScriptCall { onScript: condPool.heatWinSheildSt = !condPool.heatWinSheildSt }
- },
- FTrgTouchArea { touchArea:climate.defrost; touchAction: TA.Out
- FActScriptCall { onScript: condPool.defrostSt = !condPool.defrostSt }
- },
- FTrgTouchArea { touchArea:climate.pannel; touchAction: TA.Out
- FActScriptCall { onScript: condPool.pannelSt = !condPool.pannelSt }
- },
- FTrgTouchArea { touchArea:climate.floor; touchAction: TA.Out
- FActScriptCall { onScript: condPool.floorSt = !condPool.floorSt }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/ControlMirror.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/ControlMirror.qml
deleted file mode 100644
index 4cd1472c0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/ControlMirror.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 5
- property string dirTuneEntry: ""
-
-
- FTimer { id: popupEnd; interval: 2500; repeat: false }
-
- view: FView {
- id: v
-
- layout: ControlMirrorLayout {
- id:home
- }
-
-
- }
-
-
-
-
- triggers: [
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- },
- FTrgEntry{
- FActTimer { timer: popupEnd; action: TM.Start }
- },
- FTrgTimer{timer: popupEnd
- FActTimer { timer: popupEnd; action: TM.Stop }
- FActViewHide { }
- },
- FTrgHardwareKey { hardkeys: buttonUp; keyAction: HK.In
- FActTimer { timer: popupEnd; action: TM.Restart }
- // FActScriptCall { onScript: condPool.climateOnOff = true }
- FGrdCondition { condition: dataPool.drvTemp !== 80
- FActScriptCall { onScript: dataPool.drvTemp = (dataPool.drvTemp+1) }
- }
- },
- FTrgHardwareKey { hardkeys: buttonDown; keyAction: HK.In
- FActTimer { timer: popupEnd; action: TM.Restart }
- // FActScriptCall { onScript: condPool.climateOnOff = true }
- FGrdCondition { condition: dataPool.drvTemp !== 65
- FActScriptCall { onScript: dataPool.drvTemp = (dataPool.drvTemp-1) }
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/FM.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/FM.qml
deleted file mode 100644
index 6aa98303b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/FM.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: FMLayout {
- id:home
- preset1Btn.text: dataPool.fm1pre1
- preset2Btn.text: dataPool.fm1pre2
- preset3Btn.text: dataPool.fm1pre3
- preset4Btn.text: dataPool.fm1pre4
- preset5Btn.text: dataPool.fm1pre5
- preset6Btn.text: dataPool.fm1pre6
- trackTxt.text: dataPool.currStation
- stationTxt.text: dataPool.currStatText
- artistTxt.text: dataPool.currSong
- albumInfoBtn.bitmap: dataPool.currAlbumArt
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChange" }
- },
- FTrgTouchArea { touchArea:home.browseBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.albumInfoBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset1Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre1 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat1}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song1 }
- },
- FTrgTouchArea { touchArea:home.preset2Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre2 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat2}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song2 }
- },
- FTrgTouchArea { touchArea:home.preset3Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre3 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat3}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song3 }
- },
- FTrgTouchArea { touchArea:home.preset4Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre4 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat4}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song4 }
- },
- FTrgTouchArea { touchArea:home.preset5Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre5 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat5}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song5 }
- },
- FTrgTouchArea { touchArea:home.preset6Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre6 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat6}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song6 }
- },
- FTrgTouchArea { touchArea:home.replayBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.tuneBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.presetsBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/FMPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/FMPCA.qml
deleted file mode 100644
index 1e9a46a0b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/FMPCA.qml
+++ /dev/null
@@ -1,175 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- attachedViews: ["PCAstatusBar"]
- property int currHD: 1
- property int totalHD: 4
-
-
-
- view: FView {
- id: v
-
- layout: FMLayoutPCA {
- id:home
- sourceBtn.text: "FM Radio"
- sourceBtn.textWidth: 100
- freqId: "FM"
- curHD: currHD
- totHD: totalHD
- curPreset: dataPool.currFMpreset
-
- listModel: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- }
-
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: preset1; menuText: "96.3"; menuData: false; }
- FMenuElement { id: preset2; menuText: "107.9"; menuData: false }
- FMenuElement { id: preset3; menuText: "104.3"; menuData: false }
- FMenuElement { id: preset4; menuText: "101.9"; menuData: false }
- FMenuElement { id: preset5; menuText: "97.1"; menuData: false }
- FMenuElement { id: preset6; menuText: "91.7"; menuData: false }
- FMenuElement { id: preset7; menuText: "101.1"; menuData: false }
- FMenuElement { id: preset8; menuText: "91.9"; menuData: false}
- }
- }
-
-
- triggers: [
-
- FTrgCondition{ condition: home.moving === true
- FActScriptCall { onScript: home.page1=!home.page1 }
- },
- FTrgEntry{
- FGrdCondition{condition: dataPool.currFMpreset === 1
- FActScriptCall { onScript: home.stationTxt = "96.3" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 2
- FActScriptCall { onScript: home.stationTxt = "107.9" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 3
- FActScriptCall { onScript: home.stationTxt = "104.3" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 4
- FActScriptCall { onScript: home.stationTxt = "101.9" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 5
- FActScriptCall { onScript: home.stationTxt = "97.1" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 6
- FActScriptCall { onScript: home.stationTxt = "91.7" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 7
- FActScriptCall { onScript: home.stationTxt = "101.1" }
- }
- FGrdCondition{condition: dataPool.currFMpreset === 8
- FActScriptCall { onScript: home.stationTxt = "91.9" }
- }
- },
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgTouchArea { touchArea:home.hdBtn.touchBtn; touchAction: TA.Out
- FGrdCondition { condition: currHD === totalHD
- FActScriptCall { onScript: currHD = 1 }
- }
- FGrdCondition { condition: currHD !== totalHD
- FActScriptCall { onScript: currHD ++}
- }
- },
- FTrgMenuElement { menuElement: preset1
- FActScriptCall { onScript: home.stationTxt = "96.3" }
- FActScriptCall { onScript: dataPool.currFMpreset = 1 }
- },
- FTrgMenuElement { menuElement: preset2
- FActScriptCall { onScript: home.stationTxt = "107.9" }
- FActScriptCall { onScript: dataPool.currFMpreset = 2 }
- },
- FTrgMenuElement { menuElement: preset3
- FActScriptCall { onScript: home.stationTxt = "104.3" }
- FActScriptCall { onScript: dataPool.currFMpreset = 3 }
- },
- FTrgMenuElement { menuElement: preset4
- FActScriptCall { onScript: home.stationTxt = "101.9" }
- FActScriptCall { onScript: dataPool.currFMpreset = 4 }
- },
- FTrgMenuElement { menuElement: preset5
- FActScriptCall { onScript: home.stationTxt = "97.1" }
- FActScriptCall { onScript: dataPool.currFMpreset = 5 }
- },
- FTrgMenuElement { menuElement: preset6
- FActScriptCall { onScript: home.stationTxt = "91.7" }
- FActScriptCall { onScript: dataPool.currFMpreset = 6 }
- },
- FTrgMenuElement { menuElement: preset7
- FActScriptCall { onScript: home.stationTxt = "101.1" }
- FActScriptCall { onScript: dataPool.currFMpreset = 7 }
- },
- FTrgMenuElement { menuElement: preset8
- FActScriptCall { onScript: home.stationTxt = "91.9" }
- FActScriptCall { onScript: dataPool.currFMpreset = 8 }
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- /*FTrgTouchArea { touchArea:home.browseBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.albumInfoBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset1Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre1 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat1}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song1 }
- },
- FTrgTouchArea { touchArea:home.preset2Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre2 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat2}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song2 }
- },
- FTrgTouchArea { touchArea:home.preset3Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre3 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat3}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song3 }
- },
- FTrgTouchArea { touchArea:home.preset4Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre4 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat4}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song4 }
- },
- FTrgTouchArea { touchArea:home.preset5Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre5 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat5}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song5 }
- },
- FTrgTouchArea { touchArea:home.preset6Btn; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre6 }
- FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat6}
- FActScriptCall { onScript:dataPool.currSong=dataPool.fm1song6 }
- },
- FTrgTouchArea { touchArea:home.replayBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
-
- FTrgTouchArea { touchArea:home.presetsBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },*/
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/GenListHandling.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/GenListHandling.qml
deleted file mode 100644
index 9abdb899f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/GenListHandling.qml
+++ /dev/null
@@ -1,14 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FState {
-
-
- triggers: [
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/GridMenuPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/GridMenuPCA.qml
deleted file mode 100644
index fd43775f0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/GridMenuPCA.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FStateView {
- id:sv
- priority: 2
-
- view: FView {
- //viewClass: baseScreen
- layout: TileBackImgLayoutPCA {
- id:l
- itemWidth: 266
-
-
-
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewImgItemWidget {
- width: 266
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: climate; menuIcon: "menu/snow.png"}
- FMenuElement { id: phone; menuIcon: "menu/phone.png" }
- FMenuElement { id: navigation; menuIcon: "menu/arrow.png" }
- FMenuElement { id: myVeh; menuIcon: "menu/car.png" }
- FMenuElement { id: entertainment; menuIcon: "menu/notes.png" }
- FMenuElement { id: settings; menuIcon: "menu/gear.png" }
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
- }
-
- baseBehavior: GenListHandling {}
-
- triggers: [
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: climate
- FActViewShow { view: "ClimatePCA" }
- },
- FTrgMenuElement { menuElement: phone
- FActViewShow { view: "PhonePCA" }
- },
- FTrgMenuElement { menuElement: navigation
- FActViewShow { view: "NavNoRoute" }
- },
- FTrgMenuElement { menuElement: myVeh
- FActViewShow { view: "MyVehiclePCA" }
- },
- FTrgMenuElement { menuElement: entertainment
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: settings
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEntry {
- FActScriptCall { onScript: dataPool.mainPCAmenuShown = true }
- FActScriptCall { onScript: { FLogger.debug("Test", "Entry") } }
- },
- FTrgEntryComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "EntryComplete") } }
- },
- FTrgExit {
- FActScriptCall { onScript: dataPool.mainPCAmenuShown = false }
- FActScriptCall { onScript: { FLogger.debug("Test", "Exit") } }
- },
- FTrgExitComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "ExitComplete") } }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/Home.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/Home.qml
deleted file mode 100644
index 3a7edc353..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/Home.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: HomeLayout {
- id:home
-
- }
-
-
- }
-
- triggers: [
-
-
- /*FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- FActEventFire { event: closeNormalScreens }
- FActViewShow { view: "Off" }
- },*/
- FTrgTouchArea { touchArea:home.button1; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.button2; touchAction: TA.Out
- FActViewShow { view: "RadioEventHandling" }
- },
- FTrgTouchArea { touchArea:home.button3; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.button4; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/List.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/List.qml
deleted file mode 100644
index 5f63b7746..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/List.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
-
-
-
- view: FView {
- id: v
-
- layout: ListLayout {
- id:list
-
-
- listWrap: true
- list_data: menuItemData
- list_itemWidget: MenuListItemWidget { }
-
- }
-
-
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: menuAudio; menuText: "Audio Settings"; menuType: FMenuElement.Submenu
- FMenuElement { id: menuAudio1; menuText: "Audio 1"; menuType: FMenuElement.Submenu
- FMenuElement { id: menuAudio11; menuText: "Audio 11"; menuType: FMenuElement.Popup }
- FMenuElement { id: menuAudio12; menuText: "Audio 12"; menuType: FMenuElement.Popup }
- }
- FMenuElement { id: menuAudio2; menuText: "Audio 2"; menuType: FMenuElement.Popup }
- FMenuElement { id: menuAudio3; menuText: "Audio 3"; menuType: FMenuElement.Popup }
- }
- FMenuElement { id: menuVehicle; menuText: "Vehicle Settings"; menuType: FMenuElement.Submenu; isVisible: false }
- FMenuElement { id: menuClock; menuText: "Clock Settings"; menuType: FMenuElement.Submenu }
- FMenuElement { id: menuDisplay; menuText: "Display Settings"; menuType: FMenuElement.Submenu }
- FMenuElement { id: menuMC; menuText: "Message Centre"; menuType: FMenuElement.Popup }
- }
-
- triggers: [
- FTrgEntry {
- FActScriptCall {onScript: condPool.settingsOpen=true}
-
- },
- FTrgExit {
- FActScriptCall {onScript: condPool.settingsOpen=false}
- },
-
- /*FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- FActEventFire { event: closeNormalScreens }
- FActViewShow { view: "Off" }
- },*/
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- },
-
-
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: menuAudio
- FActScriptCall { onScript: menuAudio.isOpened = !menuAudio.isOpened }
- },
- // Example to use a list model trigger. This will work for all classes derived from FAbstractListModel (E.g. TreeModel, MenuModel)
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/MenuTopLevelGrid.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/MenuTopLevelGrid.qml
deleted file mode 100644
index ce477a12a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/MenuTopLevelGrid.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FStateView {
- id:sv
- priority: 2
-
- view: FView {
- //viewClass: baseScreen
- layout: TC1_B1_Grid {
- id:l
-
-
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewItemWidget {
-
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: menuAudio; menuText: "AM"; menuType: FMenuElement.Submenu}
- FMenuElement { id: menuVehicle; menuText: "FM"; menuType: FMenuElement.Submenu; isVisible: false}
- FMenuElement { id: menuClock; menuText: "Sirius"; menuType: FMenuElement.Submenu }
- FMenuElement { id: menuDisplay; menuText: "CD"; menuType: FMenuElement.Submenu }
- FMenuElement { id: menuMC; menuText: "BT Audio"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "USB"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 2"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 3"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 4"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 5"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 6"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 7"; menuType: FMenuElement.Popup }
- FMenuElement { menuText: "Dummy 8"; menuType: FMenuElement.Popup }
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
- }
-
- baseBehavior: GenListHandling {}
-
- triggers: [
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: menuAudio
- FGrdCondition { condition: menuAudio.isEnabled
- FActViewShow { view: "MenuAudioSettings"; animation: "AnimWiperRight" }
- }
- },
- FTrgMenuElement { menuElement: menuClock
- FActViewShow { view: "MenuTopLevelMenu" }
- },
- FTrgMenuElement { menuElement: menuVehicle
- FActViewShow { view: "MenuTopLevelMenu"; animation: "AnimWiperRight" }
- },
- // Example to use a list model trigger. This will work for all classes derived from FAbstractListModel (E.g. TreeModel, MenuModel)
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEntry {
- FActScriptCall { onScript: { FLogger.debug("Test", "Entry") } }
- },
- FTrgEntryComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "EntryComplete") } }
- },
- FTrgExit {
- FActScriptCall { onScript: { FLogger.debug("Test", "Exit") } }
- },
- FTrgExitComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "ExitComplete") } }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/MyVehiclePCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/MyVehiclePCA.qml
deleted file mode 100644
index 6ecc512b6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/MyVehiclePCA.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FStateView {
- id:sv
- priority: 2
-
- view: FView {
- //viewClass: baseScreen
- layout: TileBackImgLayoutPCA {
- id:l
-
-
- //useClose: true
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewImgItemWidget {
-
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: ev; menuIcon: "Vehicle/EV Icon.png"}
- FMenuElement { id: aLight; menuIcon: "Vehicle/Ambient Lighti Icon.png" }
- FMenuElement { id: mcs; menuIcon: "Vehicle/MCS Icon.png" }
- FMenuElement { id: weather; menuIcon: "Vehicle/sun.png" }
- FMenuElement { id: kepad; menuIcon: "Vehicle/key_car.png" }
- FMenuElement { id: calendar; menuIcon: "Vehicle/cal.png" }
- FMenuElement { id: browse; menuIcon: "Vehicle/folders.png" }
- FMenuElement { id: syncServices; menuIcon: "Vehicle/SYNC Services.png"}
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
- }
-
- baseBehavior: GenListHandling {}
-
- triggers: [
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: ev
- },
- FTrgMenuElement { menuElement: aLight
- },
- FTrgMenuElement { menuElement: mcs
- },
- FTrgMenuElement { menuElement: weather
- },
- FTrgMenuElement { menuElement: kepad
- },
- FTrgMenuElement { menuElement: calendar
- },
- FTrgMenuElement { menuElement: browse
- },
- FTrgMenuElement { menuElement: syncServices
- },
- FTrgTouchArea { touchArea:l.close; touchAction: TA.Out
- FActViewShow { view: "GridMenuPCA" }
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEntry {
- FActScriptCall { onScript: { FLogger.debug("Test", "Entry") } }
- },
- FTrgEntryComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "EntryComplete") } }
- },
- FTrgExit {
- FActScriptCall { onScript: { FLogger.debug("Test", "Exit") } }
- },
- FTrgExitComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "ExitComplete") } }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavInRoute.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/NavInRoute.qml
deleted file mode 100644
index e21d60a3c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavInRoute.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
-
-
- view: FView {
- id: v
-
- layout: NavInRouteLayout {
- id:map
-
-
- }
-
- }
-
-
-
- triggers: [
- FTrgTouchArea { touchArea:map.cancel; touchAction: TA.Out
- FActViewShow { view: "NavNoRoute" }
- },
- FTrgTouchArea { touchArea:map.mute; touchAction: TA.Out
- FActScriptCall { onScript: { map.muteSt = !map.muteSt} }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavKeyboardPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/NavKeyboardPCA.qml
deleted file mode 100644
index a3499f89d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavKeyboardPCA.qml
+++ /dev/null
@@ -1,159 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- attachedViews: ["PCAstatusBar"]
-
-
- view: FView {
- id: v
-
- layout: NavKeyboardLayout {
- id:nav
- entry:dataPool.navEnrty
- list_data:sItemData
- list_itemWidget: VerySimpleListItemWidget {
- vis: false
-
- }
- }
-
- }
- ListModel
- {
-
- id:sItemData
- ListElement { staticItem: "Five Guys" }
- ListElement { staticItem: "Archers Of Loaf" }
- ListElement { staticItem: "Bob Mould" }
- ListElement { staticItem: "Cat Power" }
- ListElement { staticItem: "Cloud Nothings"}
- ListElement { staticItem: "Dentist"}
- ListElement { staticItem: "Dirty Frank's" }
- ListElement { staticItem: "Grouplove" }
- ListElement { staticItem: "Hudson Bell"}
- ListElement { staticItem: "Japandroids" }
- ListElement { staticItem: "Macklemore & Ryan Lewis"}
- ListElement { staticItem: "The National"}
- ListElement { staticItem: "Titus Andronicus" }
- ListElement { staticItem: "Tito" }
- ListElement { staticItem: "Tamal" }
- ListElement { staticItem: "Taco" }
-
- }
-
- triggers: [
-
- FTrgTouchArea { touchArea:nav.listOpen; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= ""}
- FActViewShow { view: "NavInRoute" }
- },
- FTrgTouchArea { touchArea:nav.a; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"a"}
- },
- FTrgTouchArea { touchArea:nav.b; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"b"}
- },
- FTrgTouchArea { touchArea:nav.c; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"c"}
- },
- FTrgTouchArea { touchArea:nav.d; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"d"}
- },
- FTrgTouchArea { touchArea:nav.e; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"e"}
- },
- FTrgTouchArea { touchArea:nav.f; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"f"}
- },
- FTrgTouchArea { touchArea:nav.g; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"g"}
- },
- FTrgTouchArea { touchArea:nav.h; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"h"}
- },
- FTrgTouchArea { touchArea:nav.i; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"i"}
- },
- FTrgTouchArea { touchArea:nav.j; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"j"}
- },
- FTrgTouchArea { touchArea:nav.k; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"k"}
- },
- FTrgTouchArea { touchArea:nav.l; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"l"}
- },
- FTrgTouchArea { touchArea:nav.m; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"m"}
- },
- FTrgTouchArea { touchArea:nav.n; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"n"}
- },
- FTrgTouchArea { touchArea:nav.o; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"o"}
- },
- FTrgTouchArea { touchArea:nav.p; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"p"}
- },
- FTrgTouchArea { touchArea:nav.q; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"q"}
- },
- FTrgTouchArea { touchArea:nav.r; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"r"}
- },
- FTrgTouchArea { touchArea:nav.s; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"s"}
- },
- FTrgTouchArea { touchArea:nav.t; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"t"}
- },
- FTrgTouchArea { touchArea:nav.u; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"u"}
- },
- FTrgTouchArea { touchArea:nav.v; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"v"}
- },
- FTrgTouchArea { touchArea:nav.w; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"w"}
- },
- FTrgTouchArea { touchArea:nav.xB; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"x"}
- },
- FTrgTouchArea { touchArea:nav.yB; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"y"}
- },
- FTrgTouchArea { touchArea:nav.zB; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+"z"}
- },
- FTrgTouchArea { touchArea:nav.num; touchAction: TA.Out
- },
- FTrgTouchArea { touchArea:nav.clr; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= ""}
- },
- FTrgTouchArea { touchArea:nav.space; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty+" "}
- },
- FTrgTouchArea { touchArea:nav.del; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.navEnrty= dataPool.navEnrty.substring(0,dataPool.navEnrty.length-1)}
- },
- FTrgTouchArea { touchArea:nav.sym; touchAction: TA.Out
- },
- FTrgTouchArea { touchArea:nav.go; touchAction: TA.Out
- FActViewShow { view: "NavInRoute" }
- },
- FTrgTouchArea { touchArea:nav.close; touchAction: TA.Out
- FActViewShow { view: "NavNoRoute" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavMenu.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/NavMenu.qml
deleted file mode 100644
index 8d22aa77e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavMenu.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FStateView {
- id:sv
- priority: 2
-
- view: FView {
- //viewClass: baseScreen
- layout: TileBackLayoutPCA {
- id:l
-
-
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewItemWidget {
-
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: sourceAM; menuText: "Home"; }
- FMenuElement { id: sourceFM; menuText: "Work"; }
- FMenuElement { id: sourceCD; menuText: "Keyboard"; }
- FMenuElement { id: sourceSat; menuText: "Recent"; }
- FMenuElement { id: sourceBt; menuText: "Favorites"; }
- FMenuElement { id: sourceIpod; menuText: "POI"; }
- FMenuElement { id: sourceUSB; menuText: "Scout"; }
- FMenuElement { id: sourceLineIn; menuText: "Waze";}
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
- }
-
- baseBehavior: GenListHandling {}
-
- triggers: [
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: sourceAM
- },
- FTrgMenuElement { menuElement: sourceFM
- },
- FTrgMenuElement { menuElement: sourceSat
- },
- FTrgMenuElement { menuElement: sourceCD
- FActViewShow { view: "NavKeyboardPCA" }
- },
- FTrgMenuElement { menuElement: sourceBt
- },
- FTrgMenuElement { menuElement: sourceIpod
- },
- FTrgMenuElement { menuElement: sourceUSB
- },
- FTrgMenuElement { menuElement: sourceLineIn
- },
- FTrgTouchArea { touchArea:l.close; touchAction: TA.Out
- FActViewShow { view: "NavNoRoute" }
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEntry {
- FActScriptCall { onScript: { FLogger.debug("Test", "Entry") } }
- },
- FTrgEntryComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "EntryComplete") } }
- },
- FTrgExit {
- FActScriptCall { onScript: { FLogger.debug("Test", "Exit") } }
- },
- FTrgExitComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "ExitComplete") } }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavNoRoute.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/NavNoRoute.qml
deleted file mode 100644
index 0299c182e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/NavNoRoute.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
-
-
- view: FView {
- id: v
-
- layout: NavNoRouteLayout {
- id:map
-
-
- }
-
- }
-
-
-
- triggers: [
- FTrgTouchArea { touchArea:map.destSearch; touchAction: TA.Out
- FActViewShow { view: "NavMenu" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/Off.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/Off.qml
deleted file mode 100644
index 3e75999c6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/Off.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 1
-
- view: FView {
- layout: OffLayout {
- id:l
- }
- }
-
- triggers: [
- FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- FActViewShow { view: "On" }
- },
- FTrgTouchArea { touchArea:l.offTouch; touchAction: TA.Out
- FActViewShow { view: "On" }
- },
- /*FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- },*/
- FTrgEntry {
- //FActScriptCall { onScript: dataPool.phoneCrnIcons = false}
- //FActScriptCall { onScript: dataPool.phonePaired = false}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/On.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/On.qml
deleted file mode 100644
index 6e0953430..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/On.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 1
-
- view: FView {
- layout: OffLayout {
- id:l
- offTouch.enabled: false
- }
- }
-
- triggers: [
- FTrgEntry {
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewShow { view: "Off" }
- },
- FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- //FActViewShow { view: "Off" }
- FActEventFire{ event: closeNormalScreens }
- },
- FTrgHardwareKey { hardkeys: buttonUp; keyAction: HK.In
- FActViewShow { view: "ControlMirror" }
- },
- FTrgHardwareKey { hardkeys: buttonDown; keyAction: HK.In
- FActViewShow { view: "ControlMirror" }
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/PCAstatusBar.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/PCAstatusBar.qml
deleted file mode 100644
index e235f9c15..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/PCAstatusBar.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 8
-
-
- view: FView {
- id: v
-
- layout: PCAstatusBarLayout {
- id:statusBar
-
- }
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:statusBar.menuTouch; touchAction: TA.Out
- FActViewShow { view: "GridMenuPCA" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/PhoneContactsListView.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/PhoneContactsListView.qml
deleted file mode 100644
index f64062f3a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/PhoneContactsListView.qml
+++ /dev/null
@@ -1,104 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-
-FStateView {
- priority: 2
- view: FView {
- layout: PhoneContactsLayout {
- id:l
- list_data:phoneItemData
- list_itemWidget: PhoneContactListItemWdgt {
- itemClicked: childClicked
-
- }
- }
- }
-
- FEvent {id: browseSelected}
-
- ListModel
- {
-
- id:phoneItemData
- ListElement { staticItem: "Aaron" ; staticNumber:"(614)555-2444";type:"Mobile"}
- ListElement { staticItem: "Adrian" ; staticNumber:"(740)245-3434";type:"Mobile" }
- ListElement { staticItem: "Albert" ; staticNumber:"(614)245-5584";type:"Mobile" }
- ListElement { staticItem: "Alice" ; staticNumber:"(313)878-3566";type:"Office"}
- ListElement { staticItem: "Alec" ; staticNumber:"(917)608-2418";type:"Mobile"}
- ListElement { staticItem: "Alexander" ; staticNumber:"(614)608-2400";type:"Home"}
- ListElement { staticItem: "Alexander" ; staticNumber:"(614)608-2400";type:"Mobile"}
- ListElement { staticItem: "Amber" ; staticNumber:"(614)608-2111";type:"Mobile"}
- ListElement { staticItem: "Amy" ; staticNumber:"(440)245-3434";type:"Mobile" }
- ListElement { staticItem: "Andy" ; staticNumber:"(313)245-3434";type:"Mobile" }
- ListElement { staticItem: "Antje" ; staticNumber:"(567)245-3434";type:"Home" }
- ListElement { staticItem: "Barry" ; staticNumber:"(313)555-2211";type:"Mobile" }
- ListElement { staticItem: "Bea" ; staticNumber:"(614)455-3434";type:"Mobile" }
- ListElement { staticItem: "Ben" ; staticNumber:"(614)882-1843";type:"Office" }
- ListElement { staticItem: "Blake" ; staticNumber:"(330)149-7778";type:"Mobile" }
- ListElement { staticItem: "Bob Mould" ; staticNumber:"(313)245-3434";type:"Mobile" }
- ListElement { staticItem: "Brian" ; staticNumber:"(614)332-7499";type:"Mobile" }
- ListElement { staticItem: "Calvin" ; staticNumber:"(614)442-9974";type:"Mobile" }
- ListElement { staticItem: "Carl" ; staticNumber:"(567)773-3434";type:"Home" }
- ListElement { staticItem: "Cat Power" ; staticNumber:"(313)608-3434";type:"Home"}
- ListElement { staticItem: "Cathy" ; staticNumber:"(313)444-456";type:"Home"}
- ListElement { staticItem: "Chris" ; staticNumber:"(734)997-6514";type:"Home" }
- ListElement { staticItem: "Cloud Nothings"; staticNumber:"(444)608-543";type:"Mobile"}
- ListElement { staticItem: "Cody" ; staticNumber:"(567)365-8413";type:"Home" }
- ListElement { staticItem: "Curtis" ; staticNumber:"(614)245-1547";type:"Office" }
- ListElement { staticItem: "Dakota" ; staticNumber:"(567)555-4444";type:"Home" }
- ListElement { staticItem: "Dale" ; staticNumber:"(567)723-1974";type:"Mobile" }
- ListElement { staticItem: "Dallas"; staticNumber:"(614)556-879";type:"Home"}
- ListElement { staticItem: "Damian" ; staticNumber:"(614)245-3434";type:"Office" }
- ListElement { staticItem: "Daniel"; staticNumber:"(614)556-879";type:"Home"}
- ListElement { staticItem: "Darina"; staticNumber:"(313)895-888";type:"Mobile"}
- ListElement { staticItem: "Dee "; staticNumber:"(313)432-3434";type:"Home"}
- ListElement { staticItem: "Edward" ; staticNumber:"(917)608-975";type:"Office"}
- ListElement { staticItem: "Ferdinand" ; staticNumber:"(917)879-795";type:"Mobile"}
- ListElement { staticItem: "Gomez" ; staticNumber:"(313)455-543";type:"Mobile"}
- ListElement { staticItem: "Harry Potter"; staticNumber:"(313)888-432";type:"Home"}
- ListElement { staticItem: "Ivan"; staticNumber:"(313)996-225";type:"Home"}
- ListElement { staticItem: "James" ; staticNumber:"(917)608-3434";type:"Mobile"}
- ListElement { staticItem: "Karen"; staticNumber:"(313)998-332";type:"Home"}
- ListElement { staticItem: "Luis Torres"; staticNumber:"(313)779-111";type:"Home"}
- ListElement { staticItem: "Mary"; staticNumber:"(313)234-098";type:"Mobile"}
- ListElement { staticItem: "Neil"; staticNumber:"(313)444-112";type:"Mobile"}
- ListElement { staticItem: "Oswald"; staticNumber:"(313)456-921";type:"Mobile"}
- ListElement { staticItem: "Oscar"; staticNumber:"(313)332-778";type:"Home"}
- ListElement { staticItem: "Patrice"; staticNumber:"(313)789-111";type:"Mobile"}
- ListElement { staticItem: "Queen Elizabeth"; staticNumber:"(313)897-666";type:"Mobile"}
- ListElement { staticItem: "Rose"; staticNumber:"(313)111-211";type:"Mobile"}
- ListElement { staticItem: "Susell"; staticNumber:"(313)345-122";type:"Home"}
- ListElement { staticItem: "Susell"; staticNumber:"(313)345-122";type:"Home"}
- ListElement { staticItem: "Thomas"; staticNumber:"(917)608-342";type:"Mobile"}
- ListElement { staticItem: "Titus Andronicus" ; staticNumber:"(917)608-321";type:"Office"}
- ListElement { staticItem: "Toretto" ; staticNumber:"(917)608-3434";type:"Home"}
- ListElement { staticItem: "Uhl" ; staticNumber:"(313)444-654";type:"Office"}
- ListElement { staticItem: "Zara" ; staticNumber:"(313)231-009";type:"Mobile"}
-
- }
- FEvent { id: childClicked }
-
- triggers:[
- FTrgEntry {
- FActScriptCall{onScript: l.list.positionViewAtIndex(sortList.existChar(phoneItemData,dataPool.filterPhone),l.list.Beginning)}
- },
- FTrgTouchArea { touchArea:l.back; touchAction: TA.Out
- FActViewShow { view: "AlphaSortPCA" }
- },
- FTrgEvent { id: trig2; event: childClicked
- FActScriptCall { onScript:console.log(trig2.data) }
- }
-
-
-
- ]
-
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/PhonePCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/PhonePCA.qml
deleted file mode 100644
index 40969a3a6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/PhonePCA.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FStateView {
- id:sv
- priority: 2
-
- view: FView {
- //viewClass: baseScreen
- layout: TileBackImgLayoutPCA {
- id:l
-
- //useClose: true
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewImgItemWidget {
-
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: phone; menuIcon: "menu/phone.png"}
- FMenuElement { id: dnd; menuIcon: "phone/DNDoff.png" }
- FMenuElement { id: phoneBook; menuIcon: "phone/contacts.png" }
- FMenuElement { id: recent; menuIcon: "phone/recent.png" }
- FMenuElement { id: messages; menuIcon: "phone/messages.png" }
- FMenuElement { id: keyPad; menuIcon: "phone/keypad.png" }
- FMenuElement { id: textMsg; menuIcon: "phone/texts.png" }
- FMenuElement { id: more; menuIcon: "phone/more.png"}
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
- }
-
- baseBehavior: GenListHandling {}
-
- triggers: [
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: phone
- },
- FTrgMenuElement { menuElement: dnd
- },
- FTrgMenuElement { menuElement: phoneBook
- FActViewShow { view: "AlphaSortPCA" }
- },
- FTrgMenuElement { menuElement: recent
- },
- FTrgMenuElement { menuElement: more
- },
- FTrgMenuElement { menuElement: messages
- },
- FTrgMenuElement { menuElement: keyPad
- },
- FTrgMenuElement { menuElement: textMsg
- },
- FTrgTouchArea { touchArea:l.close; touchAction: TA.Out
- FActViewShow { view: "GridMenuPCA" }
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEntry {
- FActScriptCall { onScript: { FLogger.debug("Test", "Entry") } }
- },
- FTrgEntryComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "EntryComplete") } }
- },
- FTrgExit {
- FActScriptCall { onScript: { FLogger.debug("Test", "Exit") } }
- },
- FTrgExitComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "ExitComplete") } }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandling.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandling.qml
deleted file mode 100644
index ef693d924..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandling.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 0
-
- view: FView {
- layout: BlankLayout {
- id:l
- }
- }
-
- triggers: [
- FTrgEntry {
- FGrdCondition{ condition: dataPool.currSource==="FM"
- FActViewShow{ view: "FMPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="USB"
- FActViewShow{ view: "USB"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="AM"
- FActViewShow{ view: "AM"}
- FActViewHide{}
- }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandlingPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandlingPCA.qml
deleted file mode 100644
index 90bf0a801..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/RadioEventHandlingPCA.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 0
-
- view: FView {
- layout: BlankLayout {
- id:l
- }
- }
-
- triggers: [
- FTrgEntry {
- FGrdCondition{ condition: dataPool.currSource==="FM"
- FActViewShow{ view: "FMPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="USB"
- FActViewShow{ view: "USBPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="AM"
- FActViewShow{ view: "AMPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="Sirius"
- FActViewShow{ view: "SiriusPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="CD"
- FActViewShow{ view: "CDPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="BT_Audio"
- FActViewShow{ view: "BT_AudioPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="iPod"
- FActViewShow{ view: "iPodPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="LineIn"
- FActViewShow{ view: "AuxPCA"}
- FActViewHide{}
- }
- FGrdCondition{ condition: dataPool.currSource==="SDL_Music"
- FActViewShow{ view: "SDL_MusicPCA"}
- FActViewHide{}
- }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/SDL_MusicPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/SDL_MusicPCA.qml
deleted file mode 100644
index a68956518..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/SDL_MusicPCA.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: USBLayoutPCA {
- id:home
- sourceBtn.text: "SDL Music"
- sourceBtn.textWidth: 100
- playing: true
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgTouchArea { touchArea:home.play; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = false }
- },
- FTrgTouchArea { touchArea:home.pause; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = true }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/Sirius.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/Sirius.qml
deleted file mode 100644
index bf16b810a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/Sirius.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: SiriusLayout {
- id:home
-
- }
-
-
- }
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChange" }
- },
- FTrgTouchArea { touchArea:home.browseBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.albumInfoBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset1Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset2Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset3Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset4Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset5Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.preset6Btn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.replayBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.tuneBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.presetsBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/SiriusPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/SiriusPCA.qml
deleted file mode 100644
index afb5c42fc..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/SiriusPCA.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: FMLayoutPCA {
- id:home
- sourceBtn.text: "Sirius"
- sourceBtn.textWidth: 70
- freqId: ""
- curPreset: dataPool.currSATpreset
- hdBtn.visible: false
-
-
- listModel: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- }
-
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: preset1; menuText: "Lithium"; menuData: true; }
- FMenuElement { id: preset2; menuText: "Spectrum"; menuData: false }
- FMenuElement { id: preset3; menuText: "ESPN"; menuData: false }
- FMenuElement { id: preset4; menuText: "Alt Nation"; menuData: false }
- FMenuElement { id: preset5; menuText: "NHL"; menuData: false }
- FMenuElement { id: preset6; menuText: "the Highway"; menuData: false }
- FMenuElement { id: preset7; menuText: "SiriusXMU"; menuData: false }
- FMenuElement { id: preset8; menuText: "First Wave"; menuData: false}
- }
- }
-
- triggers: [
-
- FTrgEntry{
- FGrdCondition{condition: dataPool.currSATpreset === 1
- FActScriptCall { onScript: home.stationTxt = "Lithium" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 2
- FActScriptCall { onScript: home.stationTxt = "Spectrum" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 3
- FActScriptCall { onScript: home.stationTxt = "ESPN" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 4
- FActScriptCall { onScript: home.stationTxt = "Alt Nation" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 5
- FActScriptCall { onScript: home.stationTxt = "NHL" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 6
- FActScriptCall { onScript: home.stationTxt = "the Highway" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 7
- FActScriptCall { onScript: home.stationTxt = "SiriusXMU" }
- }
- FGrdCondition{condition: dataPool.currSATpreset === 8
- FActScriptCall { onScript: home.stationTxt = "First Wave" }
- }
- },
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgMenuElement { menuElement: preset1
- FActScriptCall { onScript: home.stationTxt = "Lithium" }
- FActScriptCall { onScript: dataPool.currSATpreset = 1 }
- },
- FTrgMenuElement { menuElement: preset2
- FActScriptCall { onScript: home.stationTxt = "Spectrum" }
- FActScriptCall { onScript: dataPool.currSATpreset = 2 }
- },
- FTrgMenuElement { menuElement: preset3
- FActScriptCall { onScript: home.stationTxt = "ESPN" }
- FActScriptCall { onScript: dataPool.currSATpreset = 3 }
- },
- FTrgMenuElement { menuElement: preset4
- FActScriptCall { onScript: home.stationTxt = "Alt Nation" }
- FActScriptCall { onScript: dataPool.currSATpreset = 4 }
- },
- FTrgMenuElement { menuElement: preset5
- FActScriptCall { onScript: home.stationTxt = "NHL" }
- FActScriptCall { onScript: dataPool.currSATpreset = 5 }
- },
- FTrgMenuElement { menuElement: preset6
- FActScriptCall { onScript: home.stationTxt = "the Highway" }
- FActScriptCall { onScript: dataPool.currSATpreset = 6 }
- },
- FTrgMenuElement { menuElement: preset7
- FActScriptCall { onScript: home.stationTxt = "SiriusXMU" }
- FActScriptCall { onScript: dataPool.currSATpreset = 7 }
- },
- FTrgMenuElement { menuElement: preset8
- FActScriptCall { onScript: home.stationTxt = "First Wave" }
- FActScriptCall { onScript: dataPool.currSATpreset = 8 }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChange.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChange.qml
deleted file mode 100644
index 42680f9e8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChange.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: TileBackLayout {
- id:source
- button1.text: "AM"
- button2.text: "FM"
- button3.text: "Sirius"
- button4.text: "USB"
- button5.text: "BT Audio"
- button6.text: "Line In"
- button7.vis: false
- button8.vis: false
- }
-
-
- }
-
- triggers: [
-
-
- /*FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- FActEventFire { event: closeNormalScreens }
- FActViewShow { view: "Off" }
- },*/
- FTrgTouchArea { touchArea:source.button1; touchAction: TA.Out
- FActScriptCall { onScript: dataPool.currSource = "AM" }
- FActViewShow { view: "RadioEventHandling" }
- },
- FTrgTouchArea { touchArea:source.button2; touchAction: TA.Out
- FActViewShow { view: "FM" }
- },
- FTrgTouchArea { touchArea:source.button3; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:source.button4; touchAction: TA.Out
- FActViewShow { view: "USB" }
- },
- FTrgTouchArea { touchArea:source.button5; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:source.button6; touchAction: TA.Out
- FActViewShow { view: "RadioEventHandling" }
- },
- FTrgTouchArea { touchArea:source.button7; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:source.button8; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:source.backBtn; touchAction: TA.Out
- FActViewShow { view: "RadioEventHandling" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChangePCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChangePCA.qml
deleted file mode 100644
index bb87d41c2..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/SourceChangePCA.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-
-FStateView {
- id:sv
- priority: 2
-
- view: FView {
- //viewClass: baseScreen
- layout: TileBackLayoutPCA {
- id:l
-
-
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewItemWidget {
-
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: sourceAM; menuText: "AM"; }
- FMenuElement { id: sourceFM; menuText: "FM"; }
- FMenuElement { id: sourceSat; menuText: "Sirius"; }
- FMenuElement { id: sourceCD; menuText: "CD"; }
- FMenuElement { id: sourceBt; menuText: "BT Audio"; }
- FMenuElement { id: sourceIpod; menuText: "iPod"; }
- FMenuElement { id: sourceUSB; menuText: "USB"; }
- FMenuElement { id: sourceLineIn; menuText: "Line In";}
- FMenuElement { id: sourceSDL; menuText: "SDL Music";}
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
- }
-
- baseBehavior: GenListHandling {}
-
- triggers: [
- // Example for a menu element trigger. This will only work for FMenuModels.
- FTrgMenuElement { menuElement: sourceAM
- FActScriptCall { onScript: dataPool.currSource = "AM" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceFM
- FActScriptCall { onScript: dataPool.currSource = "FM" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceSat
- FActScriptCall { onScript: dataPool.currSource = "Sirius" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceCD
- FActScriptCall { onScript: dataPool.currSource = "CD" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceBt
- FActScriptCall { onScript: dataPool.currSource = "BT_Audio" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceIpod
- FActScriptCall { onScript: dataPool.currSource = "iPod" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceUSB
- FActScriptCall { onScript: dataPool.currSource = "USB" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceLineIn
- FActScriptCall { onScript: dataPool.currSource = "LineIn" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgMenuElement { menuElement: sourceSDL
- FActScriptCall { onScript: dataPool.currSource = "SDL_Music" }
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgTouchArea { touchArea:l.close; touchAction: TA.Out
- FActViewShow { view: "RadioEventHandlingPCA" }
- },
- FTrgListModel { id: trgList; model: menuItemData
- FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
- },
- FTrgEntry {
- FActScriptCall { onScript: { FLogger.debug("Test", "Entry") } }
- },
- FTrgEntryComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "EntryComplete") } }
- },
- FTrgExit {
- FActScriptCall { onScript: { FLogger.debug("Test", "Exit") } }
- },
- FTrgExitComplete {
- FActScriptCall { onScript: { FLogger.debug("Test", "ExitComplete") } }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/Start.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/Start.qml
deleted file mode 100644
index 485847401..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/Start.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: StartLayout {
- id:corner
-
- }
-
-
- }
-
- triggers: [
- FTrgEntry {
-
- },
-
- /*FTrgHardwareKey { hardkeys: hk_OnOff; keyAction: HK.In
- FActEventFire { event: closeNormalScreens }
- FActViewShow { view: "Off" }
- },*/
- FTrgTouchArea { touchArea:corner.button1; touchAction: TA.Out
- FActViewShow { view: "Home" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/USB.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/USB.qml
deleted file mode 100644
index 8931d61ff..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/USB.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: USBLayout {
- id:home
-
- }
-
-
- }
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChange" }
- },
- FTrgTouchArea { touchArea:home.browseBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.albumInfoBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.seekBkBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.seekFdBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.playBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.shuffleBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgTouchArea { touchArea:home.repeatBtn; touchAction: TA.Out
- FActViewShow { view: "Start" }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/USBPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/USBPCA.qml
deleted file mode 100644
index 0b1b47270..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/USBPCA.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
-
- view: FView {
- id: v
-
- layout: USBLayoutPCA {
- id:home
- sourceBtn.text: "USB"
- sourceBtn.textWidth: 50
- playing: true
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgTouchArea { touchArea:home.play; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = false }
- },
- FTrgTouchArea { touchArea:home.pause; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = true }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Views/iPodPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Views/iPodPCA.qml
deleted file mode 100644
index f4d3f68b7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Views/iPodPCA.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Layouts"
-import "../Animations"
-import "../Widgets"
-import ".."
-
-FStateView {
- priority: 2
- //attachedViews: ["Chrome"]
-
-
-
- view: FView {
- id: v
-
- layout: USBLayoutPCA {
- id:home
- sourceBtn.text: "iPod"
- sourceBtn.textWidth: 50
- playing: true
- }
-
-
- }
-
-
-
- triggers: [
-
-
-
- FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
- FActViewShow { view: "SourceChangePCA" }
- },
- FTrgTouchArea { touchArea:home.play; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = false }
- },
- FTrgTouchArea { touchArea:home.pause; touchAction: TA.Out
- FActScriptCall { onScript: home.playing = true }
- },
- FTrgEvent { event: closeNormalScreens
- FActViewHide{}
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/FocusListViewLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/FocusListViewLayout.qml
deleted file mode 100644
index 2e89924a2..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/FocusListViewLayout.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: theLayout
-
- property alias list : theListView
- property alias list_itemWidget: theListView.itemWidget
- property alias list_data: theListView.data
- property bool listWrap: false
-
- FWdgtListView {
- id: theListView
- anchors.fill: theLayout
- clip: true
- //interactive: false
- highlightFollowsCurrentItem: true
- highlightMoveDuration: 100
- highlightMoveVelocity: -1
- keyNavigationWraps: listWrap
- highlight:
- Rectangle {
- id: focus
- height: 51
- width: theLayout.width
- radius: 10
- color: "transparent"
- border { color: "white"; width: 2 }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewImgItemLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewImgItemLayout.qml
deleted file mode 100644
index cbe173798..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewImgItemLayout.qml
+++ /dev/null
@@ -1,25 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: theItem
- width: 200
- height: 178
-
- property alias bitmap : _img.bitmap
- property alias touch: _touch
-
-
- FWdgtImage{
- id: _img
- anchors.centerIn: theItem
- }
-
- FWdgtTouchArea{
- id: _touch
- anchors.fill: theItem
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewItemLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewItemLayout.qml
deleted file mode 100644
index 2e7712a65..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewItemLayout.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: theItem
-
- property alias cx_text : _btn.text
- property int indentLevel: 0
- property alias touch: _btn.touchBtn
- property alias pressed: _btn.pressed
-
-
- TouchButton_PCA{
- id: _btn
- anchors.left: theItem.left
- anchors.leftMargin: 10
- anchors.top: theItem.top
- anchors.topMargin: 10
- textWidth: 100
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewLayout.qml
deleted file mode 100644
index d5fb96246..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewLayout.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: theLayout
-
- property alias list : theGridView
- property alias list_itemWidget: theGridView.itemWidget
- property alias list_data: theGridView.data
- property bool listWrap: false
- property alias gridItemHeight: theGridView.cellHeight
- property alias gridItemWidth: theGridView.cellWidth
-
- FWdgtGridView {
- id: theGridView
- anchors.fill: theLayout
- clip: true
- highlightFollowsCurrentItem: true
- highlightMoveDuration: 100
- keyNavigationWraps: listWrap
- flow: GridView.TopToBottom
- snapMode: GridView.SnapOneRow
-
-
-
-
- populate: Transition {
- id: populateTransition
- SequentialAnimation {
- PropertyAction { property: "opacity"; value: 0 }
- PauseAnimation { duration: populateTransition.ViewTransition.index * 100 }
- NumberAnimation { properties: "opacity"; from: 0; to: 1; duration: 300 }
- }
- }
-
- add: Transition {
- NumberAnimation { properties: "opacity"; from: 0; to: 1; duration: 200 }
- }
-
- addDisplaced: Transition {
- NumberAnimation { properties: "x"; duration: 200 }
- }
-
- remove: Transition {
- NumberAnimation { properties: "opacity"; from: 1; to: 0; duration: 200 }
- }
-
- removeDisplaced: Transition {
- NumberAnimation { properties: "x"; duration: 200 }
- }
-
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetItemLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetItemLayout.qml
deleted file mode 100644
index 9b28e961f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetItemLayout.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FLayout {
- id: theItem
-
- property alias presetName : _preset.presetName
- property alias presetNumber: _preset.presetNumber
- property alias pressed: _preset.active
- property alias touchBtn: _preset.touchBtn
-
-
- PresetPCA{
- id: _preset
- anchors.horizontalCenter: theItem.horizontalCenter
- anchors.horizontalCenterOffset: 0
- y:20
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetLayout.qml
deleted file mode 100644
index 82068b556..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/GridViewPresetLayout.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: theLayout
-
- property alias list : theGridView
- property alias list_itemWidget: theGridView.itemWidget
- property alias list_data: theGridView.data
- property bool listWrap: false
- property alias gridItemHeight: theGridView.cellHeight
- property alias gridItemWidth: theGridView.cellWidth
- property alias curItem: theGridView.currentIndex
- property alias moving: theGridView.moving
- property alias direction: theGridView.flickDeceleration
-
-
- FWdgtGridView {
- id: theGridView
- anchors.fill: theLayout
- clip: true
- highlightFollowsCurrentItem: true
- highlightMoveDuration: 100
- keyNavigationWraps: listWrap
- flow: GridView.TopToBottom
- snapMode: GridView.SnapToRow
-
-
-
-
-
- /* populate: Transition {
- id: populateTransition
- SequentialAnimation {
- PropertyAction { property: "opacity"; value: 0 }
- PauseAnimation { duration: populateTransition.ViewTransition.index * 100 }
- NumberAnimation { properties: "opacity"; from: 0; to: 1; duration: 300 }
- }
- }
-
- add: Transition {
- NumberAnimation { properties: "opacity"; from: 0; to: 1; duration: 200 }
- }
-
- addDisplaced: Transition {
- NumberAnimation { properties: "x"; duration: 200 }
- }
-
- remove: Transition {
- NumberAnimation { properties: "opacity"; from: 1; to: 0; duration: 200 }
- }
-
- removeDisplaced: Transition {
- NumberAnimation { properties: "x"; duration: 200 }
- }*/
-
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PhoneListWdgtLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PhoneListWdgtLayout.qml
deleted file mode 100644
index ee2c0369f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PhoneListWdgtLayout.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
-
- id: theItem
- height: 50; width: 50
-
- property alias cx_text: cx.text
- property alias cn_text: cn.text
- property alias ct_text: ct.text
- property alias touch:_touch
-
- FWdgtTouchArea {
- id: touch
- anchors.fill: theItem
- }
-
- Item{
-
-
- BaseText{
- color:"#9deaec"
- id: cx
- width: 100; height: 50
-
- }
- BaseText{
- color:"#9deaec"
- id: cn
- width: 302; height: 50
- x:300
- }
-
- BaseText{
- color:"#9deaec"
- id: ct
- width: 302; height: 50
- x:500
- }
-
- }
- FWdgtTouchArea {
- id: _touch
- height: 50; width: 600
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetGridLayoutPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetGridLayoutPCA.qml
deleted file mode 100644
index c927433f1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetGridLayoutPCA.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- width: 800
- height: 115
-
- property alias m1: m1.children
- property alias list: listView
- property alias list_data: listView.list_data
- property alias list_itemWidget: listView.list_itemWidget
- property alias listWrap: listView.listWrap
- property alias fg: _fg
- property alias gridCurItem: listView.gridCurItem
- property alias moving: listView.moving
- property alias direction: listView.direction
-
-
-
- Item {
- id: _fg
-
- width: 800; height: 115
-
- GridViewPresetWidget {
- id: listView
- x: 0; y: 0
- width: 800; height: 115
- gridItemHeight: 115; gridItemWidth: 200
-
- }
-
- FWdgtContainer {
- id: m1
- width: 676; height: 115
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetPCALayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetPCALayout.qml
deleted file mode 100644
index 2b832f487..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/PresetPCALayout.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: button
- property alias active: presetBtn.selected
- property alias text: presetBtn.text
- property alias touchBtn: presetBtn
- property alias presetText: presetTxt.text
-
-
- TouchButtonClimatePCA{
- id: presetBtn
- text: "X"
- image: "buttons/preset_9_9.png"
- imageActive: "buttons/presetSelected.png"
- imagePressed: "buttons/presetPressed_9_9.png"
- }
-
- BaseText{
- id: presetTxt
- anchors.horizontalCenter: presetBtn.horizontalCenter
- anchors.horizontalCenterOffset: -16
- y:59
- horAlignment: Text.AlignHCenter
- text: "104.3"
- color: "#1d81d5"
- }
-
- FViewUseCaseSimple{
- condition: presetBtn.active === true
- PropertyChanges {
- target: presetTxt; color: "white"
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/SimpleItemWdgLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/SimpleItemWdgLayout.qml
deleted file mode 100644
index d2dc8092b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/SimpleItemWdgLayout.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
-
- id: theItem
- height: 50; width: 50
- property bool vis: true
-
- property alias cx_text : cx.text
-
- Item{
-
- FWdgtText{
- color:"White"
- id: cx
- width: 302; height: 45
- visible: vis
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TGListItemLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TGListItemLayout.qml
deleted file mode 100644
index 7708d3ca5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TGListItemLayout.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: theItem
- height: 50; width: parent.width
-
- property alias cx_text : cx.text
- property alias cx_width : cx.width
- property alias ax_width : ax.width
- property alias ax_bitmap : ax.bitmap
- property alias activeMarker_visible: activeMarker.visible
- property alias touch: _touch
- property int indentLevel: 0
-
- Rectangle {
- id: activeMarker
- anchors.fill: theItem
- height: 50
- radius: 10
- color: "lightgray"
- }
-
- Item {
- x: 1; y: 0
- width: 502; height: 45
-
- BaseText {
- id: cx
- anchors.fill: parent
- anchors.leftMargin: 20*indentLevel+5
- vertAlignment: Text.AlignVCenter
- }
- }
-
- FWdgtImage {
- id: ax
- x: 549; y: 3
- width: 37; height: 45
- }
-
- FWdgtTouchArea {
- id: _touch
- width: 400
- height: 50
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonBackGroundPCALayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonBackGroundPCALayout.qml
deleted file mode 100644
index ff6671cef..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonBackGroundPCALayout.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: button
- property string bitmap: ""
- property bool selected: false
- property string text: ""
- property alias touchBtn: myButton
- property string image: "climate/Button_9_9.png"
- property string imageActive: "climate/ButtonActive_0_0.png"
- property string imagePressed: "climate/ButtonPressed_9_9.png"
- property string imageInActive: "climate/ButtonInActive_0_0.png"
- property bool active: true
-
-
- FWdgtImage{
- id: img
- x:-9
- y:-9
- bitmap: "Radio/PresetBtnNotSelected_9_9.png"
- }
-
- FWdgtImage{
- id: imgSelected
- x:-9
- y:-9
- bitmap: "Radio/PresetBtn_9_9.png"
- visible: false
- }
-
- FWdgtTouchArea {
- id: myButton
- anchors.fill: img
- }
-
- Rectangle {
- id: btnFill
- color: "#1d81d5"
- anchors.centerIn: myButton
- height: 46
- width: 46
- radius: 23
- visible: false
- }
-
- BaseText {
- id: btnTxt
- anchors.centerIn: myButton
- text: button.text
- color: "#1d81d5"
- }
-
-
- FViewUseCaseSimple{
- condition: button.selected === true
- PropertyChanges {
- target: img; visible: false
- }
- PropertyChanges {
- target: imgSelected; visible: true
- }
- PropertyChanges {
- target: btnTxt; color: "white"
- }
- PropertyChanges {
- target: btnFill; color: "white"
- }
- }
-
-
-
- FViewUseCaseGroup{
- FViewUseCase{condition: myButton.pressed === true
- PropertyChanges {
- target: btnFill; visible: true
- }
- PropertyChanges {
- target: btnTxt; color: "black"
- }
- }
- FViewUseCase{condition: myButton.indicatorState === true
- /* PropertyChanges {
- target: buttonArea; color: pressedColor
- }*/
- }
- FViewUseCase{condition: myButton.pressed === false
- PropertyChanges {
- target: btnFill; visible: false
- }
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonClimatePCALayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonClimatePCALayout.qml
deleted file mode 100644
index c03f89c18..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonClimatePCALayout.qml
+++ /dev/null
@@ -1,143 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: button
- property string bitmap: ""
- property string bitmap2: ""
- property bool selected: false
- property alias touchBtn: myButton
- property string text: ""
- property string image: "climate/Button_9_9.png"
- property string imageActive: "climate/ButtonActive_0_0.png"
- property string imagePressed: "climate/ButtonPressed_9_9.png"
- property string imageInActive: "climate/ButtonInActive_0_0.png"
- property bool active: true
- property string newFont: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
- property int txtSize: 24
- property string txtColor: "#1d81d5"
-
-
- FWdgtImage{
- id: img
- x:-9
- y:-9
- bitmap: image
- }
-
- FWdgtImage{
- id: imgSelected
- x:0
- y:0
- bitmap: imageActive
- visible: false
- }
-
- FWdgtImage{
- id: imgInBtn
- anchors.centerIn: imgSelected
- bitmap: button.bitmap
- visible: false
- //height: 10
- //width: 10
- }
-
- BaseText {
- id: btnTxt
- anchors.horizontalCenter: imgSelected.horizontalCenter
- anchors.verticalCenter: imgSelected.verticalCenter
- //anchors.verticalCenterOffset: -1
- vertAlignment: Text.AlignVCenter
- horAlignment: Text.AlignHCenter
- text: button.text
- color: button.txtColor
- visible: false
- theFont: button.newFont
- pxSize: button.txtSize
-
- }
-
- FWdgtTouchArea {
- id: myButton
- anchors.fill: imgSelected
- }
-
-
-
- FViewUseCaseSimple{
- condition: button.text !== ""
- PropertyChanges {
- target: btnTxt; visible: true
- }
- }
-
- FViewUseCaseSimple{
- condition: button.bitmap !== ""
- PropertyChanges {
- target: imgInBtn; visible: true
- }
- }
-
-
- FViewUseCaseGroup{
- FViewUseCase{condition: myButton.pressed === true
- PropertyChanges {
- target: img; bitmap: imagePressed
- }
- PropertyChanges {
- target: btnTxt; color: "black"
- }
- PropertyChanges {
- target: imgInBtn; bitmap: button.bitmap2
- }
- }
- FViewUseCase{
- condition: button.active === false
- PropertyChanges {
- target: img; visible: false
- }
- PropertyChanges {
- target: imgSelected; visible: true; bitmap: imageInActive
- }
- PropertyChanges {
- target: btnTxt; color: "black"
- }
- PropertyChanges {
- target: myButton; enabled: false
- }
- PropertyChanges {
- target: imgInBtn; bitmap: button.bitmap2
- }
- }
- FViewUseCase{
- condition: button.selected === true
- PropertyChanges {
- target: img; visible: false
- }
- PropertyChanges {
- target: imgSelected; visible: true
- }
- PropertyChanges {
- target: btnTxt; color: "black"
- }
- PropertyChanges {
- target: imgInBtn; bitmap: button.bitmap2
- }
- }
- FViewUseCase{condition: myButton.pressed === false
- PropertyChanges {
- target: img; bitmap: image
- }
- PropertyChanges {
- target: btnTxt; color: button.txtColor
- }
- PropertyChanges {
- target: imgInBtn; bitmap: button.bitmap
- }
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCALayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCALayout.qml
deleted file mode 100644
index db963dc75..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCALayout.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: button
- property string text: ""
- property int centerWidth: 2
- property alias touchBtn: myButton
- property alias pressed: myButton.pressed
-
- FWdgtImage{
- id: img
- x:-8
- y:-8
- bitmap: "Radio/ButtonEnd_8_8.png"
- }
-
- FWdgtImage{
- id: img1
- anchors.left: img.right
- anchors.top: img.top
- width: centerWidth
- fillMode: Image.Stretch
- bitmap: "Radio/ButtonCenter_0_8.png"
- }
-
- FWdgtImage{
- id: img2
- anchors.left: img1.right
- anchors.top: img1.top
- bitmap: "Radio/ButtonOtherEnd_8_8.png"
- }
-
- FWdgtTouchArea {
- id: myButton
- width:img1.width+44
- height: 46
- anchors.left: img1.left
- anchors.leftMargin: -22
- anchors.top: img1.top
- anchors.topMargin: 8
- }
-
- Rectangle {
- id: btnFill
- color: "#1d81d5"
- anchors.fill: myButton
- radius: 23
- border.width: 1
- border.color: "#1d81d5"
- visible: false
- }
-
- BaseText {
- id: btnTxt
- anchors.centerIn: btnFill
- text: button.text
- color: "#1d81d5"
- visible: false
- }
-
-
-
- FViewUseCaseSimple{
- condition: button.text !== ""
- PropertyChanges {
- target: btnTxt; visible: true
- }
- }
-
- FViewUseCaseGroup{
- FViewUseCase{condition: myButton.pressed === true
- PropertyChanges {
- target: btnFill; visible: true
- }
- PropertyChanges {
- target: btnTxt; color: "black"
- }
- }
- FViewUseCase{condition: indicatorState === true
- /* PropertyChanges {
- target: buttonArea; color: pressedColor
- }*/
- }
- FViewUseCase{condition: myButton.pressed === false
- PropertyChanges {
- target: btnFill; visible: false
- }
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCASpecialLayout.qml b/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCASpecialLayout.qml
deleted file mode 100644
index 35b27c056..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/WidgetLayouts/TouchButtonPCASpecialLayout.qml
+++ /dev/null
@@ -1,325 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-import "../Widgets"
-
-FLayout {
- id: button
- property string bitmap: ""
- property string bitmap2: ""
- property bool vis: true
- property string text: ""
- property string text1: ""
- property string text2: ""
- property int centerWidth: 2
- property alias touchBtn: myButton
- property int imageShift: 0
- property alias spacing: btnArea.spacing
- property alias pressed: myButton.pressed
- property int curHD: 4
- property int totHD: 4
-
- FWdgtImage{
- id: img
- x:-8
- y:-8
- bitmap: "Radio/ButtonEnd_8_8.png"
- }
-
- FWdgtImage{
- id: img1
- anchors.left: img.right
- anchors.top: img.top
- width: centerWidth
- fillMode: Image.Stretch
- bitmap: "Radio/ButtonCenter_0_8.png"
- }
-
- FWdgtImage{
- id: img2
- anchors.left: img1.right
- anchors.top: img1.top
- bitmap: "Radio/ButtonOtherEnd_8_8.png"
- }
-
- FWdgtTouchArea {
- id: myButton
- width:img1.width+44
- height: 46
- anchors.left: img1.left
- anchors.leftMargin: -22
- anchors.top: img1.top
- anchors.topMargin: 8
-
- }
-
- Rectangle {
- id: btnFill
- color: "#1d81d5"
- anchors.fill: myButton
- radius: 23
- border.width: 1
- border.color: "#1d81d5"
- visible: false
- }
-
-
- Row {
- id: btnArea
- anchors.fill: img1
- anchors.left: img1.left
- anchors.leftMargin: imageShift
- spacing: 2
-
-
- FWdgtImage{
- id: btnImg
- anchors.verticalCenter: btnArea.verticalCenter
- bitmap: button.bitmap
- visible: false
- }
-
- BaseText {
- id: btnTxt
- anchors.verticalCenter: btnArea.verticalCenter
- text: button.text
- color: "#1d81d5"
- visible: false
- }
-
- BaseText {
- id: btnTxt1
- anchors.verticalCenter: btnArea.verticalCenter
- text: button.text1
- color: "white"
- visible: false
- theFont: "../Fonts/HelveticaNeueLTStd-Bold.ttf"
- //boldTx: true
- }
-
- BaseText {
- id: btnTxt2
- anchors.verticalCenter: btnArea.verticalCenter
- text: button.text2
- color: "#1d81d5"
- visible: false
- }
-
-
- }
-
- FViewUseCaseSimple{
- condition: button.bitmap !== ""
- PropertyChanges {
- target: btnImg; visible: true
- }
- }
-
- FViewUseCaseSimple{
- condition: button.text !== ""
- PropertyChanges {
- target: btnTxt; visible: true
- }
- }
-
- FViewUseCaseSimple{
- condition: button.text1 !== ""
- PropertyChanges {
- target: btnTxt1; visible: true
- }
- }
-
- FViewUseCaseSimple{
- condition: button.text2 !== ""
- PropertyChanges {
- target: btnTxt2; visible: true
- }
- }
-
- FViewUseCaseGroup{
- FViewUseCase{condition: myButton.pressed === true
- PropertyChanges {
- target: btnFill; visible: true
- }
- PropertyChanges {
- target: btnTxt; color: "black"
- }
- PropertyChanges {
- target: btnTxt2; color: "black"
- }
- PropertyChanges {
- target: btnImg; bitmap: button.bitmap2
- }
- }
- FViewUseCase{condition: indicatorState === true
- /* PropertyChanges {
- target: buttonArea; color: pressedColor
- }*/
- }
- FViewUseCase{condition: myButton.pressed === false
- PropertyChanges {
- target: btnFill; visible: false
- }
- }
- }
-
-
- FViewUseCaseGroup{
- FViewUseCase{condition: totHD === -1
- PropertyChanges {
- target: button; visible: true
- }
- }
- FViewUseCase{condition: totHD === 0
- PropertyChanges {
- target: button; visible: false
- }
- }
- FViewUseCase{condition: totHD === 1
- PropertyChanges {
- target: myButton; enabled: false
- }
- PropertyChanges {
- target: btnTxt; text: ""
- }
- PropertyChanges {
- target: btnTxt1; text: ""
- }
- PropertyChanges {
- target: btnTxt2; text: ""
- }
- PropertyChanges {
- target: img1; width: 4
- }
- }
- FViewUseCase{condition: totHD === 2 && curHD === 1
- PropertyChanges {
- target: img1; width: 50
- }
- PropertyChanges {
- target: btnTxt; text: ""
- }
- PropertyChanges {
- target: btnTxt1; text: " 1"
- }
- PropertyChanges {
- target: btnTxt2; text: " 2"
- }
- }
- FViewUseCase{condition: totHD === 2 && curHD === 2
- PropertyChanges {
- target: img1; width: 50
- }
- PropertyChanges {
- target: btnTxt; text: " 1 "
- }
- PropertyChanges {
- target: btnTxt1; text: "2"
- }
- PropertyChanges {
- target: btnTxt2; text: ""
- }
- }
- FViewUseCase{condition: totHD === 3 && curHD === 1
- PropertyChanges {
- target: img1; width: 65
- }
- PropertyChanges {
- target: btnTxt; text: ""
- }
- PropertyChanges {
- target: btnTxt1; text: " 1"
- }
- PropertyChanges {
- target: btnTxt2; text: " 2 3"
- }
- }
- FViewUseCase{condition: totHD === 3 && curHD === 2
- PropertyChanges {
- target: img1; width: 65
- }
- PropertyChanges {
- target: btnTxt; text: " 1 "
- }
- PropertyChanges {
- target: btnTxt1; text: "2"
- }
- PropertyChanges {
- target: btnTxt2; text: " 3"
- }
- }
- FViewUseCase{condition: totHD === 3 && curHD === 3
- PropertyChanges {
- target: img1; width: 65
- }
- PropertyChanges {
- target: btnTxt; text: " 1 2 "
- }
- PropertyChanges {
- target: btnTxt1; text: "3"
- }
- PropertyChanges {
- target: btnTxt2; text: ""
- }
- }
- FViewUseCase{condition: totHD === 4 && curHD === 1
- PropertyChanges {
- target: img1; width: 85
- }
- PropertyChanges {
- target: btnTxt; text: ""
- }
- PropertyChanges {
- target: btnTxt1; text: " 1"
- }
- PropertyChanges {
- target: btnTxt2; text: " 2 3 4"
- }
- }
- FViewUseCase{condition: totHD === 4 && curHD === 2
- PropertyChanges {
- target: img1; width: 85
- }
- PropertyChanges {
- target: btnTxt; text: " 1 "
- }
- PropertyChanges {
- target: btnTxt1; text: "2"
- }
- PropertyChanges {
- target: btnTxt2; text: " 3 4"
- }
- }
- FViewUseCase{condition: totHD === 4 && curHD === 3
- PropertyChanges {
- target: img1; width: 85
- }
- PropertyChanges {
- target: btnTxt; text: " 1 2 "
- }
- PropertyChanges {
- target: btnTxt1; text: "3"
- }
- PropertyChanges {
- target: btnTxt2; text: " 4"
- }
- }
- FViewUseCase{condition: totHD === 4 && curHD === 4
- PropertyChanges {
- target: img1; width: 85
- }
- PropertyChanges {
- target: btnTxt; text: " 1 2 3 "
- }
- PropertyChanges {
- target: btnTxt1; text: "4"
- }
- PropertyChanges {
- target: btnTxt2; text: ""
- }
- }
-
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/BaseText.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/BaseText.qml
deleted file mode 100644
index b9bc380bd..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/BaseText.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FWdgtText {
- id: myText
-
- property bool enabled: true
- property bool secondary: false
- property double secondaryOpacity: 0.7
- property alias horAlignment: myText.horizontalAlignment
- property alias vertAlignment: myText.verticalAlignment
- property int pxSize: 24
- property bool boldTx: false
- property alias theFont: testFont.source
-
- color: "white"
- smooth: true
-
- property alias style: _styler.style
-
- FontLoader {
- id: testFont; source: "../Fonts/HelveticaNeueLTStd-Roman.ttf"
- }
-
- font.family: testFont.name
- font.pixelSize: pxSize
- font.bold: boldTx
- //horizontalAlignment: Text.AlignLeft
- //verticalAlignment: Text.AlignTop
-
- states: [
- State {
- name: "disabled"
- when: enabled === false
- PropertyChanges { target:myText; opacity: secondaryOpacity }
- },
-
- State {
- name: "secondary"
- when: secondary === true
- PropertyChanges { target:myText; opacity: secondaryOpacity }
- }
- ]
-
- FStyler {
- id: _styler
- styleTarget: myText
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/CondText.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/CondText.qml
deleted file mode 100644
index 7b8ae4ada..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/CondText.qml
+++ /dev/null
@@ -1,14 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-BaseText {
- FontLoader {
- id: testFont; source: "../Fonts/HelveticaNeueLTCom-LtCn.ttf"
- }
-
- font.family: testFont.name
- font.pixelSize: 30
-
- height: 51
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/FocusListViewWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/FocusListViewWidget.qml
deleted file mode 100644
index 082ebdf88..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/FocusListViewWidget.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../WidgetLayouts"
-
-FWidget {
- property alias focusNext: _focusNext
- property alias focusPrevious: _focusPrevious
- property alias selectElement: _selectElement
-
- property alias list: l.list
- property alias list_itemWidget: l.list_itemWidget
- property alias list_data: l.list_data
- property alias listWrap: l.listWrap
-
- FEvent { id: _focusNext; }
- FEvent { id: _focusPrevious; }
- FEvent { id: _selectElement; }
-
- layout: FocusListViewLayout {
- id: l
- anchors.fill: parent
- }
-
- triggers: [
- FTrgEvent { event: _focusPrevious
- FActScriptCall { onScript: {
- l.list.decrementCurrentIndex();
- }
- }
- },
- FTrgEvent { event: _focusNext
- FActScriptCall { onScript: {
- l.list.incrementCurrentIndex();
- }
- }
- },
- FTrgEvent { event: _selectElement
- FActScriptCall { onScript: {
- list_data.selectElement(l.list.currentIndex);
- }
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewImgItemWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewImgItemWidget.qml
deleted file mode 100644
index f76057722..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewImgItemWidget.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
- id: w
- height: 178
- width: 200
-
-
-
- layout: GridViewImgItemLayout {
- id: l
- bitmap: menuIcon
- }
-
- FViewUseCaseSimple {
- condition: isEnabled == false
- PropertyChanges { target: l
- opacity: 0.5
- }
- }
-
- triggers: [
- FTrgTouchArea { touchArea: l.touch; touchAction: TA.Out
- FActScriptCall { onScript: w.GridView.view.model.selectElement(index) }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewItemWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewItemWidget.qml
deleted file mode 100644
index 5b81d7e1b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewItemWidget.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
- id: w
- height: 55
- width: 200
-
-
-
- layout: GridViewItemLayout {
- id: l
- cx_text: menuText
- indentLevel: 0
- }
-
- FViewUseCaseSimple {
- condition: isEnabled == false
- PropertyChanges { target: l
- opacity: 0.5
- }
- }
-
- triggers: [
- FTrgTouchArea { touchArea: l.touch; touchAction: TA.Out
- FActScriptCall { onScript: w.GridView.view.model.selectElement(index) }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetItemWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetItemWidget.qml
deleted file mode 100644
index fa2cb4491..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetItemWidget.qml
+++ /dev/null
@@ -1,41 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
- id: w
- height: 115
- width: 169
-
- property int currPreset: 0
- property bool pressed: false
-
-
-
- layout: GridViewPresetItemLayout {
- id: l
- presetName: menuText
- pressed: w.pressed
- presetNumber: index + 1
- }
-
- FViewUseCaseSimple {
- condition: isEnabled == false
- PropertyChanges { target: l
- opacity: 0.5
- }
- }
-
- FViewUseCaseSimple {
- condition: w.currPreset===index+1
- PropertyChanges { target: w; pressed: true}
- }
-
- triggers: [
- FTrgTouchArea { touchArea: l.touchBtn.touchBtn; touchAction: TA.Out
- FActScriptCall { onScript: w.GridView.view.model.selectElement(index) }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetWidget.qml
deleted file mode 100644
index f232bf2c6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewPresetWidget.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../WidgetLayouts"
-
-FWidget {
-
- property alias selectElement: _selectElement
- property alias list: l.list
- property alias list_itemWidget: l.list_itemWidget
- property alias list_data: l.list_data
- property alias listWrap: l.listWrap
- property alias gridItemHeight: l.gridItemHeight
- property alias gridItemWidth: l.gridItemWidth
- property alias gridCurItem: l.curItem
- property alias moving: l.moving
- property alias direction: l.direction
-
-
- FEvent { id: _selectElement; }
-
- layout: GridViewPresetLayout {
- id: l
- anchors.fill: parent
- }
-
- triggers: [
- FTrgEvent { event: _selectElement
- FActScriptCall { onScript: {
- list_data.selectElement(l.list.currentIndex);
- }
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewWidget.qml
deleted file mode 100644
index cfbba6253..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/GridViewWidget.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../WidgetLayouts"
-
-FWidget {
-
- property alias selectElement: _selectElement
- property alias list: l.list
- property alias list_itemWidget: l.list_itemWidget
- property alias list_data: l.list_data
- property alias listWrap: l.listWrap
- property alias gridItemHeight: l.gridItemHeight
- property alias gridItemWidth: l.gridItemWidth
-
- FEvent { id: _selectElement; }
-
- layout: GridViewLayout {
- id: l
- anchors.fill: parent
- }
-
- triggers: [
- FTrgEvent { event: _selectElement
- FActScriptCall { onScript: {
- list_data.selectElement(l.list.currentIndex);
- }
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuListItemWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuListItemWidget.qml
deleted file mode 100644
index 48b3bff4a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuListItemWidget.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
- id: w
- height: 50
-
- layout: TGListItemLayout {
- id: l
- anchors.fill: parent
- ax_bitmap: ""
- cx_text: menuText
- activeMarker_visible: false
- indentLevel: level
- }
-
- FViewUseCaseSimple {
- condition: isEnabled == false
- PropertyChanges { target: l
- opacity: 0.5
- }
- }
-
- FViewUseCaseGroup {
- FViewUseCase {
- condition: menuType == FMenuElement.Popup
- PropertyChanges { target: l
- ax_bitmap: "../Resources/g137p.png"
- }
- }
-
- FViewUseCase {
- condition: menuType == FMenuElement.Submenu
- PropertyChanges { target: l
- ax_bitmap: "../Resources/g136p.png"
- }
- }
- }
-
- triggers: [
- FTrgTouchArea { touchArea: l.touch; touchAction: TA.In
- FActScriptCall { onScript: w.ListView.view.model.selectElement(index) }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuSubmenuListItemWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuSubmenuListItemWidget.qml
deleted file mode 100644
index df9632906..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/MenuSubmenuListItemWidget.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
- height: 50
-
- layout: TGListItemLayout {
- id: l
- anchors.fill: parent
- ax_bitmap: ""
- cx_text: menuItem
- activeMarker_visible: false
- }
-
- FViewUseCaseGroup {
- FViewUseCase {
- condition: type === "popup"
- PropertyChanges { target: l
- ax_bitmap: "../Resources/g137p.png"
- }
-
- }
-
- FViewUseCase {
- condition: type === "arrow"
- PropertyChanges { target: l
- ax_bitmap: "../Resources/g136p.png"
- }
- }
-
- FViewUseCase {
- condition: type === "tickboxChecked"
- PropertyChanges { target: l
- gx_bitmap: "../Resources/g134p.png"
- cx_width: ++ax_width
- }
- }
-
- FViewUseCase {
- condition: type === "tickboxUnchecked"
- PropertyChanges { target: l
- gx_bitmap: "../Resources/g135p.png"
- cx_width: ++ax_width
- }
- }
-
-
- FViewUseCase {
- condition: type === ""
- PropertyChanges { target: l
- visible: true
- ax_bitmap: ""
- cx_width: ++(ax_width+gx_width)
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PhoneContactListItemWdgt.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PhoneContactListItemWdgt.qml
deleted file mode 100644
index d357c50dc..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PhoneContactListItemWdgt.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-
-FWidget {
- id: w
- height: 50
-
- property FEvent itemClicked
-
- layout: PhoneListWdgtLayout {
- anchors.fill: parent
- id: l
- cx_text: staticItem
- cn_text: staticNumber
- ct_text: type
- }
- triggers: [
- FTrgTouchArea { touchArea: l.touch; touchAction: TA.Out
- FActEventFire{ event: itemClicked; data: index }
- FActScriptCall { onScript: console.log(staticItem) }
- }
- ]
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetPCA.qml
deleted file mode 100644
index a575ff91e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetPCA.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
-
- id:pcaButton
-
- property alias active: button.active
- property alias presetNumber: button.text
- property alias presetName: button.presetText
- property alias touchBtn: button.touchBtn
-
-
- clip: false
-
-
-
- layout: PresetPCALayout{
- id:button
- }
-
-
-
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetsGridPCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetsGridPCA.qml
deleted file mode 100644
index b23375f88..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/PresetsGridPCA.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-
-
-FWidget {
- id:sv
- property int currPreset: 2
- property alias listModel: l.list_data
- property alias gridCurItem: l.gridCurItem
- property alias moving: l.moving
- property alias direction: l.direction
-
-
- layout: PresetGridLayoutPCA {
- id:l
-
-
- listWrap: false
- list_data: FProxyListModel {
- id: menuProxy
- sourceModel: menuItemData
- }
- list_itemWidget: GridViewPresetItemWidget {
- currPreset: sv.currPreset
- }
- }
-
- FMenuModel {
- id: menuItemData
- FMenuElement { id: preset1; menuText: "96.3"; menuData: false; }
- FMenuElement { id: preset2; menuText: "107.9"; menuData: true }
- FMenuElement { id: preset3; menuText: "104.3"; menuData: false }
- FMenuElement { id: preset4; menuText: "101.9"; menuData: false }
- FMenuElement { id: preset5; menuText: "97.1"; menuData: false }
- FMenuElement { id: preset6; menuText: "91.7"; menuData: false }
- FMenuElement { id: preset7; menuText: "101.1"; menuData: false }
- FMenuElement { id: preset8; menuText: "91.9"; menuData: false}
- }
-
- FViewUseCaseSimple { condition: sv.isInEntry
- PropertyChanges { target: l; list_data: null }
- }
-
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/ScrollBar.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/ScrollBar.qml
deleted file mode 100644
index b1f67d043..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/ScrollBar.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-Item {
- id: scrollbar
- property variant target
-
- clip: true
-
- //anchors {top: target.top; bottom: target.bottom; right: target.right }
- visible: (track.height == slider.height) ? false : true //TODO: !visible -> width: 0 (but creates a binding loop)
-
- Timer {
- property int scrollAmount
-
- id: timer
- repeat: true
- interval: 20
- onTriggered: {
- target.contentY = Math.max(
- 0, Math.min(
- target.contentY + scrollAmount,
- target.contentHeight - target.height));
- }
- }
-
- MouseArea {
- anchors.fill: scrollbar
- onPressed: {
- timer.scrollAmount = target.height * (mouseY < slider.y ? -1 : 1) // scroll by a page
- timer.running = true;
- }
- onReleased: {
- timer.running = false;
- }
- }
-
- Rectangle {
- id: track
-
- color: "red"
- opacity: 0.3
- radius: 2
- smooth: true
-
- anchors.top: scrollbar.top
- anchors.bottom: scrollbar.bottom
- anchors.horizontalCenter: scrollbar.horizontalCenter
- width: 3
- }
-
- Rectangle {
- id:slider
-
- width: scrollbar.width
- color: "red"
- opacity: 0.7
- radius: 4
- smooth: true
-
- height: Math.min(target.height / target.contentHeight * track.height, track.height)
- y: target.visibleArea.yPosition * track.height
-
- MouseArea {
- anchors.fill: parent
- drag.target: parent
- drag.axis: Drag.YAxis
- drag.minimumY: 0
- drag.maximumY: track.height - height
-
- onPositionChanged: {
- if (pressedButtons == Qt.LeftButton) {
- target.contentY = slider.y * target.contentHeight / track.height
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton.qml
deleted file mode 100644
index c05e1ab52..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-
-FWdgtTouchArea {
- id: button
-
- property string text: "Text"
- property string bitmap: ""
- property int wrapText: Text.NoWrap
- property bool indicatorState: false
- property string unpressedColor: "gray"
- property string pressEventColor: "lightGray"
- property string pressedColor: "darkGray"
- property bool vis: true
-
-
- width: 120
- height: 40
- enabled: button.vis
-
-
-
- Rectangle {
- id: buttonArea
- radius: 10
- anchors.centerIn: parent
- width: button.width
- height: button.height
- color: "gray"
- visible: button.vis
-
- BaseText {
- id: st
- anchors.centerIn: parent
- text: button.text
- wrapMode: wrapText
- visible: button.vis
- }
-
- FWdgtImage{
- id: img
- anchors.fill: buttonArea
- bitmap: button.bitmap
- visible: false
- }
-
-
- }
-
- FViewUseCaseSimple{
- condition: button.bitmap !== ""
- PropertyChanges {
- target: img; visible: true
- }
- }
-
- FViewUseCaseGroup{
- FViewUseCase{condition: pressed === true
- PropertyChanges {
- target: buttonArea; color: pressEventColor
- }
- }
- FViewUseCase{condition: indicatorState === true
- PropertyChanges {
- target: buttonArea; color: pressedColor
- }
- }
- FViewUseCase{condition: pressed === false
- PropertyChanges {
- target: buttonArea; color: unpressedColor
- }
- }
- }
-
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton2.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton2.qml
deleted file mode 100644
index 2f3ca939a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton2.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import QtGraphicalEffects 1.0
-import "../Widgets"
-
-
-
-Item {
- width: 160
- height: 45
-
- RectangularGlow {
- id: effect
- anchors.fill: rect
- glowRadius: 10
- spread: 0.2
- color: "#1d81d5"
- cornerRadius: rect.radius + glowRadius
- }
-
- Rectangle {
- id: rect
- color: "black"
- anchors.centerIn: parent
- width: 160
- height: 45
- radius: 25
- border.color: "#1d81d5"
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonBackGround_PCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonBackGround_PCA.qml
deleted file mode 100644
index 6dbd6b125..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonBackGround_PCA.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
-
- id:pcaButton
-
- property alias bitmap:button.bitmap
- property alias active: button.selected
- property alias text: button.text
- property alias touchBtn: button.touchBtn
-
-
- clip: false
-
-
-
- layout: TouchButtonBackGroundPCALayout{
- id:button
- }
-
-
-
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonClimatePCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonClimatePCA.qml
deleted file mode 100644
index 401e53820..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonClimatePCA.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
-
- id:pcaButton
-
- property alias bitmap: button.bitmap
- property alias bitmap2: button.bitmap2
- property alias selected: button.selected
- property alias touchBtn: button.touchBtn
- property alias text: button.text
- property alias image: button.image
- property alias imageActive: button.imageActive
- property alias imagePressed: button.imagePressed
- property alias imageInActive: button.imageInActive
- property alias active: button.active
- property alias newFont: button.newFont
- property alias txtSize: button.txtSize
- property alias txtColor: button.txtColor
-
-
- height: 80
- width: 80
- clip: false
-
-
-
- layout: TouchButtonClimatePCALayout{
- id:button
- }
-
-
-
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonSpecial_PCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonSpecial_PCA.qml
deleted file mode 100644
index e48c5f276..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButtonSpecial_PCA.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
-
- id:pcaButton
-
- property alias bitmap:button.bitmap
- property alias bitmap2: button.bitmap2
- property alias text: button.text
- property alias text1: button.text1
- property alias text2:button.text2
- property alias textWidth: button.centerWidth
- property alias touchBtn: button.touchBtn
- property alias imageShift: button.imageShift
- property alias spacing: button.spacing
- property alias pressed: button.pressed
- property alias curHD: button.curHD
- property alias totHD: button.totHD
- width: 164
- clip: false
-
-
-
- layout: TouchButtonPCASpecialLayout{
- id:button
- }
-
-
-
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton_PCA.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton_PCA.qml
deleted file mode 100644
index e46dbf28c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/TouchButton_PCA.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-FWidget {
-
- id:pcaButton
-
-
- property alias text: button.text
- property alias textWidth: button.centerWidth
- property alias touchBtn: button.touchBtn
- property alias pressed: button.pressed
- width: textWidth+44
- clip: false
-
-
-
- layout: TouchButtonPCALayout{
- id:button
- }
-
-
-
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/VerySimpleListItemWidget.qml b/SDL_Core/src/components/qt_hmi/References/Look/Widgets/VerySimpleListItemWidget.qml
deleted file mode 100644
index 42049240f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/Widgets/VerySimpleListItemWidget.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-import "../Widgets"
-import "../WidgetLayouts"
-
-
-FWidget {
- id: w
- height: 50
- property alias vis: l.vis
-
- layout: SimpleItemWdgLayout {
- anchors.fill: parent
- id: l
- cx_text: staticItem
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/QtHMIFrameworkd.pdb b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/QtHMIFrameworkd.pdb
deleted file mode 100644
index b6a4d3183..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/QtHMIFrameworkd.pdb
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/plugin.qmltypes b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/plugin.qmltypes
deleted file mode 100644
index b03753aa5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/plugin.qmltypes
+++ /dev/null
@@ -1,682 +0,0 @@
-import QtQuick.tooling 1.1
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated with the command 'C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin\qmlplugindump.exe -notrelocatable com.ford.hmiframework 1.0 C:\HMIRepository\trunk\Framework\QtHMIFramework\output'.
-
-Module {
- Component {
- name: "FAbstractListElement"
- prototype: "QObject"
- exports: ["com.ford.hmiframework/FAbstractListElement 1.0"]
- Signal {
- name: "elementSelected"
- Parameter { name: "element"; type: "FAbstractListElement"; isPointer: true }
- }
- Method { name: "selectElement" }
- }
- Component {
- name: "FAbstractListModel"
- prototype: "QAbstractListModel"
- exports: ["com.ford.hmiframework/FAbstractListModel 1.0"]
- Signal {
- name: "elementSelected"
- Parameter { type: "FAbstractListElement"; isPointer: true }
- Parameter { type: "int" }
- }
- }
- Component {
- name: "FActAnimControl"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActAnimControl 1.0"]
- Property { name: "animation"; type: "FAnimation"; isPointer: true }
- Property { name: "animAction"; type: "int" }
- }
- Component {
- name: "FActEventFire"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActEventFire 1.0"]
- Property { name: "event"; type: "FEvent"; isPointer: true }
- Property { name: "data"; type: "QVariant" }
- }
- Component {
- name: "FActFunction"
- defaultProperty: "actions"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActFunction 1.0"]
- Property { name: "data"; type: "QVariant" }
- Property { name: "actions"; type: "FAction"; isList: true; isReadonly: true }
- }
- Component {
- name: "FActFunctionCall"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActFunctionCall 1.0"]
- Property { name: "func"; type: "FActFunction"; isPointer: true }
- Property { name: "data"; type: "QVariant" }
- }
- Component {
- name: "FActHistoryClear"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActHistoryClear 1.0"]
- Property { name: "queue"; type: "string" }
- }
- Component {
- name: "FActHistoryPop"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActHistoryPop 1.0"]
- Property { name: "queue"; type: "string" }
- }
- Component {
- name: "FActHistoryPush"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActHistoryPush 1.0"]
- Property { name: "queue"; type: "string" }
- Property { name: "animation"; type: "string" }
- Property { name: "data"; type: "QVariant" }
- }
- Component {
- name: "FActHistoryShow"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActHistoryShow 1.0"]
- Property { name: "queue"; type: "string" }
- Property { name: "animation"; type: "string" }
- Property { name: "skipMe"; type: "bool" }
- }
- Component {
- name: "FActViewHide"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActViewHide 1.0"]
- Property { name: "view"; type: "string" }
- Property { name: "animation"; type: "string" }
- }
- Component {
- name: "FActViewShow"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FActViewShow 1.0"]
- Property { name: "view"; type: "string" }
- Property { name: "animation"; type: "string" }
- Property { name: "data"; type: "QVariant" }
- }
- Component {
- name: "FAction"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FAction 1.0"]
- Property { name: "passed"; type: "bool" }
- Signal { name: "execute" }
- Method { name: "getDisplay"; type: "FDisplay*" }
- Method { name: "getStateView"; type: "FStateView*" }
- }
- Component {
- name: "FAnimView"
- defaultProperty: "data"
- prototype: "FAnimation"
- exports: ["com.ford.hmiframework/FAnimView 1.0"]
- Property { name: "inView"; type: "FStateView"; isPointer: true }
- Property { name: "outView"; type: "FStateView"; isPointer: true }
- Property { name: "ingoing"; type: "FLayout"; isReadonly: true; isPointer: true }
- Property { name: "outgoing"; type: "FLayout"; isReadonly: true; isPointer: true }
- }
- Component {
- name: "FAnimation"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["com.ford.hmiframework/FAnimation 1.0"]
- Property { name: "isRunning"; type: "bool"; isReadonly: true }
- Signal {
- name: "animationComplete"
- Parameter { name: "anim"; type: "FAnimation"; isPointer: true }
- }
- }
- Component {
- name: "FAnimationCoordinator"
- defaultProperty: "defaultAnims"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FAnimationCoordinator 1.0"]
- Property { name: "defaultAnims"; type: "FDefaultAnimation"; isList: true; isReadonly: true }
- }
- Component {
- name: "FDefaultAnimation"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FDefaultAnimation 1.0"]
- Property { name: "from"; type: "FViewClass"; isPointer: true }
- Property { name: "to"; type: "FViewClass"; isPointer: true }
- Property { name: "animation"; type: "string" }
- }
- Component {
- name: "FDisplay"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["com.ford.hmiframework/FDisplay 1.0"]
- Property { name: "xPixel"; type: "int" }
- Property { name: "yPixel"; type: "int" }
- Property { name: "initialView"; type: "string" }
- Property { name: "initialAnim"; type: "string" }
- Property { name: "modelPath"; type: "QUrl" }
- Property { name: "activeVariant"; type: "string" }
- Property { name: "priorityLayerCount"; type: "int" }
- Property { name: "minPriority"; type: "int" }
- Property { name: "priorityLayerDebug"; type: "QStringList"; isReadonly: true }
- Property { name: "viewCacheSize"; type: "int" }
- Signal { name: "preStartInit" }
- Method {
- name: "animationCompleted"
- Parameter { type: "FAnimation"; isPointer: true }
- }
- Method { name: "updateDebugInformation" }
- }
- Component {
- name: "FEvent"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FEvent 1.0"]
- Signal {
- name: "fire"
- Parameter { name: "data"; type: "QVariant" }
- }
- Method {
- name: "doFire"
- Parameter { name: "data"; type: "QVariant" }
- }
- }
- Component {
- name: "FGrdCondition"
- defaultProperty: "actions"
- prototype: "FGuard"
- exports: ["com.ford.hmiframework/FGrdCondition 1.0"]
- Property { name: "condition"; type: "bool" }
- }
- Component {
- name: "FGuard"
- defaultProperty: "actions"
- prototype: "FAction"
- exports: ["com.ford.hmiframework/FGuard 1.0"]
- Property { name: "actions"; type: "FAction"; isList: true; isReadonly: true }
- }
- Component {
- name: "FHardwareControl"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["com.ford.hmiframework/FHardwareControl 1.0"]
- Property { name: "hardwareControlID"; type: "string" }
- Signal {
- name: "checkKeyPressed"
- Parameter { name: "key"; type: "int" }
- }
- Signal {
- name: "checkKeyReleased"
- Parameter { name: "key"; type: "int" }
- }
- Method {
- name: "sendHardwareControlEvent"
- Parameter { name: "data"; type: "int" }
- }
- }
- Component {
- name: "FHardwareKey"
- defaultProperty: "data"
- prototype: "FHardwareControl"
- exports: ["com.ford.hmiframework/FHardwareKey 1.0"]
- Property { name: "pressed"; type: "bool" }
- Property { name: "keyboardKey"; type: "int" }
- Property { name: "longPressMSec"; type: "int" }
- Property { name: "repeatDelayMSec"; type: "int" }
- Property { name: "repeatIntervalMSec"; type: "int" }
- }
- Component {
- name: "FHardwareRotary"
- defaultProperty: "knob"
- prototype: "FHardwareControl"
- exports: ["com.ford.hmiframework/FHardwareRotary 1.0"]
- Property { name: "knob"; type: "QQuickItem"; isPointer: true }
- Property { name: "stepsPerRotation"; type: "int" }
- Property { name: "currentAbsPosition"; type: "int" }
- Property { name: "currentRelPosition"; type: "int" }
- Property { name: "generateEvents"; type: "bool" }
- Property { name: "updateInterval"; type: "int" }
- }
- Component {
- name: "FLayer"
- defaultProperty: "data"
- prototype: "FWidgetBase"
- exports: ["com.ford.hmiframework/FLayer 1.0"]
- Property { name: "layerID"; type: "int" }
- Property { name: "initialView"; type: "string" }
- Property { name: "activeViewName"; type: "string" }
- }
- Component {
- name: "FLayout"
- defaultProperty: "data"
- prototype: "FMetaInfoItem"
- exports: ["com.ford.hmiframework/FLayout 1.0"]
- Property { name: "viewX"; type: "double" }
- Property { name: "viewY"; type: "double" }
- Property { name: "viewZ"; type: "double" }
- }
- Component {
- name: "FLogHandlerItem"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["com.ford.hmiframework/FLogHandlerItem 1.0"]
- Signal {
- name: "newEntry"
- Parameter { name: "s"; type: "string" }
- }
- }
- Component {
- name: "FLogger"
- prototype: "QObject"
- exports: ["com.ford.hmiframework/FLogger 1.0"]
- Property { name: "perfStamp"; type: "bool" }
- Method {
- name: "debug"
- Parameter { name: "name"; type: "string" }
- Parameter { name: "s"; type: "string" }
- }
- Method {
- name: "warning"
- Parameter { name: "name"; type: "string" }
- Parameter { name: "s"; type: "string" }
- }
- Method {
- name: "error"
- Parameter { name: "name"; type: "string" }
- Parameter { name: "s"; type: "string" }
- }
- Method {
- name: "info"
- Parameter { name: "name"; type: "string" }
- Parameter { name: "s"; type: "string" }
- }
- Method {
- name: "perf"
- Parameter { name: "name"; type: "string" }
- Parameter { name: "s"; type: "string" }
- }
- }
- Component {
- name: "FLoggerConsole"
- prototype: "QObject"
- exports: ["com.ford.hmiframework/FLoggerConsole 1.0"]
- }
- Component {
- name: "FLoggerFile"
- prototype: "QObject"
- exports: ["com.ford.hmiframework/FLoggerFile 1.0"]
- Property { name: "file"; type: "string" }
- }
- Component {
- name: "FMenuElement"
- defaultProperty: "children"
- prototype: "FTreeElement"
- exports: ["com.ford.hmiframework/FMenuElement 1.0"]
- Enum {
- name: "MenuElementType"
- values: {
- "Undefined": 0,
- "Submenu": 1,
- "Popup": 2,
- "Hyperlink": 3,
- "Checkbox": 4,
- "Radiobutton": 5,
- "Multistate": 6
- }
- }
- Property { name: "isVisible"; type: "bool" }
- Property { name: "isEnabled"; type: "bool" }
- Property { name: "menuType"; type: "int" }
- Property { name: "menuText"; type: "string" }
- Property { name: "menuIcon"; type: "string" }
- Property { name: "menuStatus"; type: "int" }
- Property { name: "menuData"; type: "QVariant" }
- }
- Component {
- name: "FMenuModel"
- defaultProperty: "children"
- prototype: "FTreeModel"
- exports: ["com.ford.hmiframework/FMenuModel 1.0"]
- }
- Component {
- name: "FMetaInfoItem"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["com.ford.hmiframework/FMetaInfoItem 1.0"]
- Property { name: "metaInfo"; type: "string" }
- Property { name: "metaID"; type: "string" }
- Property { name: "metaVersion"; type: "string" }
- }
- Component {
- name: "FMetaInfoObject"
- prototype: "QObject"
- exports: ["com.ford.hmiframework/FMetaInfoObject 1.0"]
- Property { name: "metaInfo"; type: "string" }
- Property { name: "metaID"; type: "string" }
- Property { name: "metaVersion"; type: "string" }
- }
- Component {
- name: "FProxyListModel"
- prototype: "QIdentityProxyModel"
- exports: ["com.ford.hmiframework/FProxyListModel 1.0"]
- Property { name: "sourceModel"; type: "FAbstractListModel"; isPointer: true }
- Property { name: "isFrozen"; type: "bool" }
- Signal {
- name: "elementSelected"
- Parameter { type: "FAbstractListElement"; isPointer: true }
- Parameter { type: "int" }
- }
- Method {
- name: "selectElement"
- Parameter { name: "index"; type: "int" }
- }
- }
- Component {
- name: "FReactiveElementBase"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FReactiveElementBase 1.0"]
- Property { name: "triggers"; type: "FTrigger"; isList: true; isReadonly: true }
- }
- Component {
- name: "FState"
- prototype: "FStateBase"
- exports: ["com.ford.hmiframework/FState 1.0"]
- Property { name: "baseBehavior"; type: "FStateBase"; isPointer: true }
- }
- Component {
- name: "FStateBase"
- prototype: "FReactiveElementBase"
- exports: ["com.ford.hmiframework/FStateBase 1.0"]
- }
- Component {
- name: "FStateView"
- defaultProperty: "childObjects"
- prototype: "FState"
- exports: ["com.ford.hmiframework/FStateView 1.0"]
- Property { name: "priority"; type: "int" }
- Property { name: "visualPriority"; type: "int" }
- Property { name: "view"; type: "FView"; isPointer: true }
- Property { name: "preload"; type: "QVariant" }
- Property { name: "attachedViews"; type: "QStringList" }
- Property { name: "childObjects"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "isInEntry"; type: "bool"; isReadonly: true }
- Property { name: "isInExit"; type: "bool"; isReadonly: true }
- Signal {
- name: "entry"
- Parameter { name: "previousView"; type: "string" }
- Parameter { name: "data"; type: "QVariant" }
- }
- Signal { name: "entryComplete" }
- Signal { name: "exit" }
- Signal { name: "exitComplete" }
- }
- Component {
- name: "FThemeProvider"
- prototype: "QObject"
- exports: ["com.ford.hmiframework/FThemeProvider 1.0"]
- Property { name: "theme"; type: "string" }
- Property { name: "resourcePath"; type: "QUrl" }
- Method {
- name: "getFileSubPath"
- type: "string"
- Parameter { type: "string" }
- }
- Method {
- name: "getStyle"
- type: "FStyle*"
- Parameter { type: "string" }
- }
- Method {
- name: "applyStyle"
- Parameter { name: "target"; type: "QObject"; isPointer: true }
- Parameter { name: "styleName"; type: "string" }
- }
- }
- Component {
- name: "FTreeElement"
- defaultProperty: "children"
- prototype: "FAbstractListElement"
- exports: ["com.ford.hmiframework/FTreeElement 1.0"]
- Property { name: "children"; type: "FTreeElement"; isList: true; isReadonly: true }
- Property { name: "level"; type: "int"; isReadonly: true }
- Property { name: "isOpened"; type: "bool" }
- }
- Component {
- name: "FTreeModel"
- defaultProperty: "children"
- prototype: "FAbstractListModel"
- exports: ["com.ford.hmiframework/FTreeModel 1.0"]
- Property { name: "children"; type: "FTreeElement"; isList: true; isReadonly: true }
- Property { name: "root"; type: "FTreeElement"; isPointer: true }
- Property { name: "rootRoot"; type: "FTreeElement"; isReadonly: true; isPointer: true }
- Method {
- name: "openElement"
- Parameter { name: "numIndex"; type: "int" }
- }
- Method {
- name: "closeElement"
- Parameter { name: "numIndex"; type: "int" }
- }
- Method {
- name: "selectElement"
- Parameter { name: "index"; type: "int" }
- }
- }
- Component {
- name: "FTrgAnimCompleted"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgAnimCompleted 1.0"]
- Property { name: "animation"; type: "FAnimation"; isPointer: true }
- Method {
- name: "animCompleted"
- Parameter { type: "FAnimation"; isPointer: true }
- }
- }
- Component {
- name: "FTrgCondition"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgCondition 1.0"]
- Property { name: "condition"; type: "bool" }
- Property { name: "checkOnEntry"; type: "bool" }
- }
- Component {
- name: "FTrgEntry"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgEntry 1.0"]
- Property { name: "previousView"; type: "string"; isReadonly: true }
- Property { name: "data"; type: "QVariant"; isReadonly: true }
- Method {
- name: "entry"
- Parameter { name: "previousView"; type: "string" }
- Parameter { name: "data"; type: "QVariant" }
- }
- }
- Component {
- name: "FTrgEntryComplete"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgEntryComplete 1.0"]
- }
- Component {
- name: "FTrgEvent"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgEvent 1.0"]
- Property { name: "event"; type: "FEvent"; isPointer: true }
- Property { name: "data"; type: "QVariant" }
- Method {
- name: "eventTrigger"
- Parameter { name: "data"; type: "QVariant" }
- }
- }
- Component {
- name: "FTrgExit"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgExit 1.0"]
- }
- Component {
- name: "FTrgExitComplete"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgExitComplete 1.0"]
- }
- Component {
- name: "FTrgHardwareControl"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgHardwareControl 1.0"]
- Property { name: "hardControls"; type: "QVariant" }
- Signal {
- name: "handleHardwareControlEvent"
- Parameter { name: "action"; type: "int" }
- }
- }
- Component {
- name: "FTrgHardwareKey"
- defaultProperty: "actions"
- prototype: "FTrgHardwareControl"
- exports: ["com.ford.hmiframework/FTrgHardwareKey 1.0"]
- Property { name: "keyAction"; type: "int" }
- Property { name: "hardkeys"; type: "QVariant" }
- }
- Component {
- name: "FTrgHardwareRotary"
- defaultProperty: "actions"
- prototype: "FTrgHardwareControl"
- exports: ["com.ford.hmiframework/FTrgHardwareRotary 1.0"]
- Property { name: "valueChange"; type: "int" }
- Property { name: "rotary"; type: "QVariant" }
- }
- Component {
- name: "FTrgListModel"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgListModel 1.0"]
- Property { name: "model"; type: "FAbstractListModel"; isPointer: true }
- Property { name: "element"; type: "FAbstractListElement"; isReadonly: true; isPointer: true }
- Property { name: "index"; type: "int"; isReadonly: true }
- Method {
- name: "elementSelected"
- Parameter { type: "FAbstractListElement"; isPointer: true }
- Parameter { type: "int" }
- }
- }
- Component {
- name: "FTrgMenuElement"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgMenuElement 1.0"]
- Property { name: "menuElement"; type: "FMenuElement"; isPointer: true }
- Method {
- name: "elementSelected"
- Parameter { type: "FAbstractListElement"; isPointer: true }
- }
- }
- Component {
- name: "FTrgTouchArea"
- defaultProperty: "actions"
- prototype: "FTrigger"
- exports: ["com.ford.hmiframework/FTrgTouchArea 1.0"]
- Property { name: "touchArea"; type: "FWdgtTouchArea"; isPointer: true }
- Property { name: "touchAction"; type: "int" }
- Property { name: "xPos"; type: "int" }
- Property { name: "yPos"; type: "int" }
- Method {
- name: "touchEvent"
- Parameter { name: "action"; type: "int" }
- Parameter { name: "x"; type: "int" }
- Parameter { name: "y"; type: "int" }
- }
- }
- Component {
- name: "FTrigger"
- defaultProperty: "actions"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FTrigger 1.0"]
- Property { name: "initialized"; type: "bool" }
- Property { name: "actions"; type: "FAction"; isList: true; isReadonly: true }
- Signal {
- name: "init"
- Parameter { type: "FStateView"; isPointer: true }
- }
- Signal {
- name: "cleanup"
- Parameter { type: "FStateView"; isPointer: true }
- }
- Signal { name: "intializedChanged" }
- }
- Component {
- name: "FView"
- defaultProperty: "data"
- prototype: "FWidget"
- exports: ["com.ford.hmiframework/FView 1.0"]
- Property { name: "viewClass"; type: "FViewClass"; isPointer: true }
- }
- Component {
- name: "FViewClass"
- defaultProperty: "derivedClass"
- prototype: "FMetaInfoObject"
- exports: ["com.ford.hmiframework/FViewClass 1.0"]
- Property { name: "derivedClass"; type: "FViewClass"; isList: true; isReadonly: true }
- }
- Component {
- name: "FWdgtTouchArea"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["com.ford.hmiframework/FWdgtTouchArea 1.0"]
- Property { name: "pressed"; type: "bool" }
- Property { name: "enabled"; type: "bool" }
- Property { name: "longPressMSec"; type: "int" }
- Property { name: "repeatDelayMSec"; type: "int" }
- Property { name: "repeatIntervalMSec"; type: "int" }
- Signal {
- name: "touchEvent"
- Parameter { name: "event"; type: "int" }
- Parameter { name: "x"; type: "int" }
- Parameter { name: "y"; type: "int" }
- }
- }
- Component {
- name: "FWidget"
- defaultProperty: "data"
- prototype: "FWidgetBase"
- exports: ["com.ford.hmiframework/FWidget 1.0"]
- Property { name: "layout"; type: "FLayout"; isPointer: true }
- Property { name: "triggers"; type: "FTrigger"; isList: true; isReadonly: true }
- }
- Component { name: "FWidgetBase"; defaultProperty: "data"; prototype: "FMetaInfoItem" }
- Component {
- name: "QAbstractProxyModel"
- prototype: "QAbstractItemModel"
- Property { name: "sourceModel"; type: "QAbstractItemModel"; isPointer: true }
- }
- Component { name: "QIdentityProxyModel"; prototype: "QAbstractProxyModel" }
- Component {
- name: "QSortFilterProxyModel"
- prototype: "QAbstractProxyModel"
- exports: ["com.ford.hmiframework/FSortFilterProxyListModel 1.0"]
- Property { name: "filterRegExp"; type: "QRegExp" }
- Property { name: "filterKeyColumn"; type: "int" }
- Property { name: "dynamicSortFilter"; type: "bool" }
- Property { name: "filterCaseSensitivity"; type: "Qt::CaseSensitivity" }
- Property { name: "sortCaseSensitivity"; type: "Qt::CaseSensitivity" }
- Property { name: "isSortLocaleAware"; type: "bool" }
- Property { name: "sortRole"; type: "int" }
- Property { name: "filterRole"; type: "int" }
- Method {
- name: "setFilterRegExp"
- Parameter { name: "pattern"; type: "string" }
- }
- Method {
- name: "setFilterWildcard"
- Parameter { name: "pattern"; type: "string" }
- }
- Method {
- name: "setFilterFixedString"
- Parameter { name: "pattern"; type: "string" }
- }
- Method { name: "clear" }
- Method { name: "invalidate" }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml
deleted file mode 100644
index c95ebd319..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-BorderImage {
- property string bitmap: ""
- property bool themed: false
-
- onBitmapChanged: {
- applyThemedImage();
- }
-
- function applyThemedImage() {
- if (bitmap !== "") {
- if (themed) {
- source = FThemeProvider.resourcePath + "/" + FThemeProvider.theme + "/" + bitmap;
- }
- else {
- source = FThemeProvider.resourcePath + "/" + bitmap;
- }
- }
- else {
- source = "";
- }
- }
-
- Component.onCompleted: {
- if (themed)
- {
- FThemeProvider.themeChanged.connect(applyThemedImage);
- }
- }
-
- Component.onDestruction: {
- if (themed)
- {
- FThemeProvider.themeChanged.disconnect(applyThemedImage);
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtContainer.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtContainer.qml
deleted file mode 100644
index f0e4720cc..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtContainer.qml
+++ /dev/null
@@ -1,8 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-Item {
- id: container
-
- property alias widget: container.children
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtGridView.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtGridView.qml
deleted file mode 100644
index 61d1832db..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtGridView.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-GridView {
- id: theGrid
-
- property alias data : theGrid.model
- property alias itemWidget : theGrid.delegate
-
- /*
- Setting rows/columns fundamentally changes how children fit into the GridView.
- -Normal behaviour: Children have a fixed size (cellWidth/cellHeight) and the NUMBER of them
- that will fit into the GridView varies with the GridView's size.
- -Modified behaviour(setting rows and/or columns triggers this mode): A fixed number of children
- will fit into the GridView (determined by number of rows/columns) and their SIZE
- (cellWidth/cellHeight) will vary with the GridView's size
- -rows/columns determines the size of VISIBLE children and simply sets cellWidth/cellHeight at runtime.
- If the number of children is different than rows * columns, it will either scroll or not
- fill the GridView completely, same as normal.
- -the item_Widget component must be designed for fluid layout using anchors, not fixed sizes,
- for this to have any effect besides spacing
- */
- property int rows
- property int columns
-
- Component.onCompleted: {
- if (rows) {
- theGrid.cellHeight = theGrid.height/rows
- }
- if (columns) {
- theGrid.cellWidth = theGrid.width/columns
- }
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtImage.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtImage.qml
deleted file mode 100644
index 89e57bbf0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtImage.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-Image {
- property string bitmap: ""
- property bool themed: false
-
- fillMode: Image.PreserveAspectFit
- asynchronous: true
-
- onBitmapChanged: {
- applyThemedImage();
- }
-
- function applyThemedImage() {
- if (bitmap !== "") {
- if (themed) {
- source = FThemeProvider.resourcePath + "/" + FThemeProvider.getFileSubPath(bitmap) + bitmap;
- }
- else {
- source = FThemeProvider.resourcePath + "/" + bitmap;
- }
- }
- else {
- source = "";
- }
- }
-
- Component.onCompleted: {
- if (themed)
- {
- FThemeProvider.themeChanged.connect(applyThemedImage);
- }
- }
-
- Component.onDestruction: {
- if (themed)
- {
- FThemeProvider.themeChanged.disconnect(applyThemedImage);
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtListView.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtListView.qml
deleted file mode 100644
index 7e1ccd10a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtListView.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-ListView {
- id: theList
-
- property alias data : theList.model
- property alias itemWidget : theList.delegate
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtPathView.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtPathView.qml
deleted file mode 100644
index 08762015a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtPathView.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-PathView {
- id: thePathView
-
- property alias data : thePathView.model
- property alias itemWidget : thePathView.delegate
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollbar.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollbar.qml
deleted file mode 100644
index 74c1e27e9..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollbar.qml
+++ /dev/null
@@ -1,104 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-BorderImage {
- property variant target
-
- source: "../Resources/scrollbar.png"
- border {left: 0; top: 3; right: 0; bottom: 3}
- width: 17
-
- //anchors {top: target.top; bottom: target.bottom; right: target.right }
- visible: (track.height == slider.height) ? false : true //TODO: !visible -> width: 0 (but creates a binding loop)
-
- Item {
- anchors {fill: parent; margins: 1; rightMargin: 2; bottomMargin: 2}
-
- Image {
- id: upArrow
- source: "../Resources/up-arrow.png"
- anchors.top: parent.top
- MouseArea {
- anchors.fill: parent
- onPressed: {
- timer.scrollAmount = -10
- timer.running = true;
- }
- onReleased: {
- timer.running = false;
- }
- }
- }
-
- Timer {
- property int scrollAmount
-
- id: timer
- repeat: true
- interval: 20
- onTriggered: {
- target.contentY = Math.max(
- 0, Math.min(
- target.contentY + scrollAmount,
- target.contentHeight - target.height));
- }
- }
-
- Item {
- id: track
- anchors {top: upArrow.bottom; topMargin: 1; bottom: dnArrow.top;}
- width: parent.width
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- timer.scrollAmount = target.height * (mouseY < slider.y ? -1 : 1) // scroll by a page
- timer.running = true;
- }
- onReleased: {
- timer.running = false;
- }
- }
-
- BorderImage {
- id:slider
-
- source: "../Resources/slider.png"
- border {left: 0; top: 3; right: 0; bottom: 3}
- width: parent.width
-
- height: Math.min(target.height / target.contentHeight * track.height, track.height)
- y: target.visibleArea.yPosition * track.height
-
- MouseArea {
- anchors.fill: parent
- drag.target: parent
- drag.axis: Drag.YAxis
- drag.minimumY: 0
- drag.maximumY: track.height - height
-
- onPositionChanged: {
- if (pressedButtons == Qt.LeftButton) {
- target.contentY = slider.y * target.contentHeight / track.height
- }
- }
- }
- }
- }
- Image {
- id: dnArrow
- source: "../Resources/dn-arrow.png"
- anchors.bottom: parent.bottom
- MouseArea {
- anchors.fill: parent
- onPressed: {
- timer.scrollAmount = 10
- timer.running = true;
- }
- onReleased: {
- timer.running = false;
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollview.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollview.qml
deleted file mode 100644
index a42f74c9f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtScrollview.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-Flickable {
- id: theScrollView
- clip: true
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtText.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtText.qml
deleted file mode 100644
index 9e7a93773..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtText.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-Text {
- id: myText
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtTouchAreaEnums.js b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtTouchAreaEnums.js
deleted file mode 100644
index f21a45406..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtTouchAreaEnums.js
+++ /dev/null
@@ -1,12 +0,0 @@
-.pragma library
-
-var In = 1
-var Out = 2
-var Short = 4
-var Long = 8
-var Repeat = 16
-var InRepeat = 17
-var All = 31
-var Cancel = 32
-var DragOut = 64
-var DragIn = 128
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActScriptCall.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActScriptCall.qml
deleted file mode 100644
index 39862d6f2..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActScriptCall.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FAction {
- id: theAction
-
- signal script
-
- onExecute: {
- script();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActSystemModelCall.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActSystemModelCall.qml
deleted file mode 100644
index 5783286cc..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActSystemModelCall.qml
+++ /dev/null
@@ -1,14 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-
-FAction {
- id: theAction
-
- signal call
-
- onExecute: {
- call();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActTimer.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActTimer.qml
deleted file mode 100644
index e31937a2b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActTimer.qml
+++ /dev/null
@@ -1,25 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FAction {
- id: theAction
-
- property variant timer
- property int action: 1
-
- onExecute: {
- switch(action)
- {
- case TM.Start:
- timer.start();
- break;
- case TM.Restart:
- timer.restart();
- break;
- case TM.Stop:
- timer.stop();
- break;
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetCall.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetCall.qml
deleted file mode 100644
index 6e7048fe9..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetCall.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FAction {
- id: theAction
-
- signal call
-
- onExecute: {
- call();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetProperty.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetProperty.qml
deleted file mode 100644
index 040695d29..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FActWidgetProperty.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FAction {
- id: theAction
-
- signal change
-
- onExecute: {
- change();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimViewHide.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimViewHide.qml
deleted file mode 100644
index 4eef062be..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimViewHide.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-FAnimView {
- supportOutgoing: true
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimationEnums.js b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimationEnums.js
deleted file mode 100644
index 117cb9926..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FAnimationEnums.js
+++ /dev/null
@@ -1,7 +0,0 @@
-.pragma library
-
-var Start = 1
-var Restart = 2
-var Pause = 3
-var Resume = 4
-var Stop = 0
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FConditionPool.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FConditionPool.qml
deleted file mode 100644
index 97c502e51..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FConditionPool.qml
+++ /dev/null
@@ -1,5 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-QtObject {
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FDataPool.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FDataPool.qml
deleted file mode 100644
index 97c502e51..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FDataPool.qml
+++ /dev/null
@@ -1,5 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-QtObject {
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FEventPool.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FEventPool.qml
deleted file mode 100644
index add041317..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FEventPool.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-QtObject {
- id: theEventPool
- default property alias events: theEventPool._events
- property list<FEvent> _events
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FGaugeValue.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FGaugeValue.qml
deleted file mode 100644
index 1886d54af..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FGaugeValue.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-// The FGauge allows to transform an input value range into an output value rang using a smooth transition
-// it can be e.g. used to transfrom the speed of a vehicle into an angle of the pointer needle
-// The borders of the input and output ranges are mapped to each other and a linear transformation is executed
-
-Item {
- id: theGauge
-
- // the time required to move through the full range from e.g. min to max
- property int fullSweepTime: 1000
-
- // minimum border, the input value can reach
- property double minInput: 0.0
- // maximum value, the input can reach
- property double maxInput: 100.0
- // the current input value. Each change will trigger an animated change of the output
- property double currentInput: 50.0
-
- // minimum border, the output value can reach
- property double minOutput: 0.0
- // maximum value, the output can reach
- property double maxOutput: 100.0
- //
- property double currentOutput: 50.0
-
- // this is the targetted output. Changing this, will trigger the animation to be executed
- property double targetOutput
- // this is the time required to move to the target value
- property int targetTime
-
- PropertyAnimation { id: anim; target: theGauge; properties: "currentOutput"; to: theGauge.targetOutput; duration: theGauge.targetTime }
-
- onCurrentInputChanged: {
- // we need to calculate the target and the required time to reach it
- var target = (currentInput - minInput) * (maxOutput - minOutput) / (maxInput - minInput) + minOutput;
- if(target < minOutput) {
- target = minOutput;
- }
- else if (target > maxOutput) {
- target = maxOutput;
- }
-
- targetTime = Math.abs((target - currentOutput) / (maxOutput - minOutput)) * fullSweepTime;
- if(targetTime > 0) {
- targetOutput = target;
- anim.restart();
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FHardwareKeyEnums.js b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FHardwareKeyEnums.js
deleted file mode 100644
index ee1db632a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FHardwareKeyEnums.js
+++ /dev/null
@@ -1,9 +0,0 @@
-.pragma library
-
-var In = 1
-var Out = 2
-var Short = 4
-var Long = 8
-var Repeat = 16
-var InRepeat = 17
-var All = 31
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.js b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.js
deleted file mode 100644
index 1a1d2af58..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.js
+++ /dev/null
@@ -1,132 +0,0 @@
-var leadSection = ""
-var trailSection = ""
-var varName = ""
-var formatSection = ""
-
-var digits = 0
-var digitZeros = 0
-var decimals = 0
-var decimalsZeros = 0
-var decimalSymbol = "."
-
-function splitFormatString(format) {
- // we need to analyze the structure of the string first
- // a typical notation is like this: "{distance:#00.0#} km", where
- // "{" "}" variable limiters
- // "distance" variable name, this will be discarded and has not effect
- // "#" non-leading/-trailing zero character
- // "0" leading/trailing zero character
- // " km" additional text which will remain unchanged
- leadSection = ""
- trailSection = ""
- varName = ""
- formatSection = ""
-
- var startPos = 0;
- var searchStep = 0;
- for(var i = 0; i < format.length; ++i)
- {
- // search for the opening "{"
- if(searchStep === 0) {
- if(format.charAt(i)==='{') {
- leadSection = format.slice(startPos, i);
- startPos = i + 1;
- searchStep++;
- }
- }
- // search for the ":" or the closing "}"
- else if(searchStep === 1) {
- if(format.charAt(i) === '}') {
- formatSection = format.slice(startPos, i);
- startPos = i + 1;
- trailSection = format.slice(startPos)
- break;
- }
- else if(format.charAt(i) === ':') {
- varName = format.slice(startPos, i);
- startPos = i + 1;
- searchStep++;
- }
- }
- else if(searchStep === 2) {
- if(format.charAt(i) === '}') {
- formatSection = format.slice(startPos, i);
- startPos = i + 1;
- trailSection = format.slice(startPos)
- break;
- }
- }
- }
-
- // finally we need to create the formatting string for sprintf out of the formatSection
- digits = 0;
- digitZeros = 0;
- decimals = 0;
- decimalsZeros = 0;
- searchStep = 0;
- for(var i = 0; i < formatSection.length; ++i) {
- if(searchStep === 0) {
- if(formatSection.charAt(i) === '#') {
- digits++;
- }
- else if(formatSection.charAt(i) === '0') {
- digits++;
- digitZeros++;
- }
- else if(formatSection.charAt(i) === '.' || formatSection.charAt(i) === ',') {
- decimalSymbol = formatSection.charAt(i);
- searchStep++;
- }
- }
- else if(searchStep === 1) {
- if(formatSection.charAt(i) === '#') {
- decimals++;
- }
- else if(formatSection.charAt(i) === '0') {
- decimals++;
- decimalsZeros++;
- }
- }
- }
-}
-
-function formatOutput(data)
-{
- // format the output, first the digits
- var digitString = Math.floor(data).toString();
- if(digitString.length < digitZeros) {
- // zero pad the string
- var temp = "";
- for(var i = 0; i < digitZeros - digitString.length; ++i) {
- temp += '0';
- }
- digitString = temp + digitString;
- }
- else {
- digitString = digitString.slice(-digits);
- }
-
- var decimalString = (data - Math.floor(data)).toFixed(decimals).slice(2);
- if (decimalString.length > decimalsZeros) {
- for (var i = decimalString.length - 1; i >= decimalsZeros; i--)
- {
- if(decimalString.charAt(i) === '0')
- {
- decimalString = decimalString.slice(0, -1);
- }
- }
- }
- else {
- for (var i = decimalString.length; i < decimalsZeros; i++)
- {
- decimalString += '0';
- }
- }
-
- if (decimalString.length > 0) {
- return leadSection + digitString + decimalSymbol + decimalString + trailSection;
- }
- else {
- return leadSection + digitString + trailSection;
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.qml
deleted file mode 100644
index c3be3832f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStringFormat.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import "FStringFormat.js" as CB
-
-QtObject {
- // output string for which is used as output
- property string output
-
- // this string defines the format of the output
- property string format
-
- // this is the data to be formatted into the output
- property variant data
-
-
- onFormatChanged: {
- CB.splitFormatString(format);
- }
-
- onDataChanged: {
- doFormat();
- }
-
- function doFormat()
- {
- output = CB.formatOutput(data);
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyle.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyle.qml
deleted file mode 100644
index 5f9106f9a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyle.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-QtObject {
- id: _style
-
- Component.onCompleted: {
- FThemeProvider.themeChanged.connect(themeChanged);
- }
-
- // This property is used to assign a "style" filename to the style. This file loads the style data and updates the properties of the style
- property string styleFile: ""
-
- property bool themed: false
-
- onStyleFileChanged: {
- loadStyle(_style);
- }
-
- function themeChanged() {
- if (themed)
- {
- loadStyle(_style);
- }
- }
-
- // indicate, that the style has been updated to the attached widgets
- signal styleUpdated
-
- function loadStyle(style)
- {
- if(styleFile.length > 0) {
- console.log( "Loading style: " + styleFile + " (" + FThemeProvider.theme + ")")
- var xhr = new XMLHttpRequest();
- xhr.open("GET", FThemeProvider.resourcePath + FThemeProvider.getFileSubPath(styleFile + ".qmlstyle") + "/" + styleFile + ".qmlstyle");
- xhr.onreadystatechange = function() {
- if (xhr.readyState === XMLHttpRequest.DONE) {
- try {
- var a = JSON.parse(xhr.responseText);
- for (var b in a) {
- if (style.hasOwnProperty(b)) {
- style[b] = a[b];
- }
- }
- styleUpdated();
- }
- catch (ex) {
- console.log("Style exception (" + styleFile + "): " + ex);
- }
- }
- }
- xhr.send();
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyler.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyler.qml
deleted file mode 100644
index 3fb89882d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FStyler.qml
+++ /dev/null
@@ -1,41 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-QtObject {
- // this property can be FStyle, but only if the instance is created in place and not assigned. Otherwise we need to use variant
- //property FStyle style
- property variant style
- property variant styleTarget
-
- onStyleChanged: {
- if(style !== undefined && style !== null) {
- style.styleUpdated.connect(applyStyle);
- applyStyle();
- }
- }
-
- onStyleTargetChanged: {
- applyStyle();
- }
-
- function applyStyle()
- {
- if(style !== undefined && style !== null && styleTarget !== undefined && styleTarget !== null) {
- setStyledProperties(style, styleTarget)
- }
- }
-
- function setStyledProperties(style, target)
- {
- for(var prop in style) {
- // first filter unwanted properties
- if(prop !== "objectName" && prop.slice(-7) !== "Changed" ) {
- // process only properties owned by style & target
- if (target.hasOwnProperty(prop)) {
- // assign the value
- target[prop] = style[prop];
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimer.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimer.qml
deleted file mode 100644
index bc148998b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimer.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-Timer {
- triggeredOnStart: false
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimerEnums.js b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimerEnums.js
deleted file mode 100644
index d657de1f0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTimerEnums.js
+++ /dev/null
@@ -1,5 +0,0 @@
-.pragma library
-
-var Stop = 0
-var Start = 1
-var Restart = 2
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTrgTimer.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTrgTimer.qml
deleted file mode 100644
index b3ac5f8a1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FTrgTimer.qml
+++ /dev/null
@@ -1,19 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-import com.ford.hmiframework 1.0
-
-FTrigger {
- property QtObject timer
-
- onInit: {
- timer.triggered.connect(timerTrigger);
- }
-
- onCleanup: {
- timer.triggered.disconnect(timerTrigger);
- }
-
- function timerTrigger() {
- executeActions();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCase.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCase.qml
deleted file mode 100644
index 258a1da62..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCase.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-State {
- default property alias propertyChange: myState.changes
- property alias condition: myState.when
- id: myState
- when: true === true
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseGroup.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseGroup.qml
deleted file mode 100644
index 7b1fa6ba5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseGroup.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-StateGroup {
- id: myUseCaseGroup
- default property alias useCases: myUseCaseGroup.states
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseSimple.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseSimple.qml
deleted file mode 100644
index 44da5a5a7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseSimple.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-StateGroup {
- default property alias propertyChange: theState.changes
- property alias condition: theState.when
-
- states: [
- State {
- id: theState
- name: "*"
- when: true == true
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseTransition.qml b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseTransition.qml
deleted file mode 100644
index 24f6acfa4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/Framework/FViewUseCaseTransition.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
-import QtQuick 2.0
-
-Transition {
- to: "*"
-}
diff --git a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qmldir b/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qmldir
deleted file mode 100644
index 3ccd0e58e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qmldir
+++ /dev/null
@@ -1,35 +0,0 @@
-module com.ford.hmiframework
-plugin QtHMIFramework
-typeinfo plugin.qmltypes
-FActScriptCall 1.0 qml/Framework/FActScriptCall.qml
-FActSystemModelCall 1.0 qml/Framework/FActSystemModelCall.qml
-FActTimer 1.0 qml/Framework/FActTimer.qml
-FActWidgetCall 1.0 qml/Framework/FActWidgetCall.qml
-FActWidgetProperty 1.0 qml/Framework/FActWidgetProperty.qml
-FConditionPool 1.0 qml/Framework/FConditionPool.qml
-FDataPool 1.0 qml/Framework/FDataPool.qml
-FEventPool 1.0 qml/Framework/FEventPool.qml
-FGaugeValue 1.0 qml/Framework/FGaugeValue.qml
-FStringFormat 1.0 qml/Framework/FStringFormat.qml
-FStyle 1.0 qml/Framework/FStyle.qml
-FStyler 1.0 qml/Framework/FStyler.qml
-FTimer 1.0 qml/Framework/FTimer.qml
-FTrgTimer 1.0 qml/Framework/FTrgTimer.qml
-FViewUseCase 1.0 qml/Framework/FViewUseCase.qml
-FViewUseCaseGroup 1.0 qml/Framework/FViewUseCaseGroup.qml
-FViewUseCaseSimple 1.0 qml/Framework/FViewUseCaseSimple.qml
-FViewUseCaseTransition 1.0 qml/Framework/FViewUseCaseTransition.qml
-FWdgtBorderImage 1.0 qml/BaseWidgets/FWdgtBorderImage.qml
-FWdgtContainer 1.0 qml/BaseWidgets/FWdgtContainer.qml
-FWdgtImage 1.0 qml/BaseWidgets/FWdgtImage.qml
-FWdgtListView 1.0 qml/BaseWidgets/FWdgtListView.qml
-FWdgtPathView 1.0 qml/BaseWidgets/FWdgtPathView.qml
-FWdgtGridView 1.0 qml/BaseWidgets/FWdgtGridView.qml
-FWdgtScrollbar 1.0 qml/BaseWidgets/FWdgtScrollbar.qml
-FWdgtScrollview 1.0 qml/BaseWidgets/FWdgtScrollview.qml
-FWdgtScrollText 1.0 qml/BaseWidgets/FWdgtScrollText.qml
-FWdgtText 1.0 qml/BaseWidgets/FWdgtText.qml
-HK 1.0 qml/Framework/FHardwareKeyEnums.js
-TA 1.0 qml/BaseWidgets/FWdgtTouchAreaEnums.js
-ANIM 1.0 qml/Framework/FAnimationEnums.js
-TM 1.0 qml/Framework/FTimerEnums.js
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore
deleted file mode 100644
index ba926494c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.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
deleted file mode 100644
index c20d41ede..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/BananaSnacks.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
deleted file mode 100644
index a7bfa0111..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[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
deleted file mode 100644
index 707d5c4e8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas64.png
+++ /dev/null
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
deleted file mode 100644
index 6ad8096c4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas80.png
+++ /dev/null
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
deleted file mode 100644
index 5ced151d0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas_harmattan.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[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
deleted file mode 100644
index 993a4bf59..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-#### 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
deleted file mode 100644
index f9502d2a9..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/bananas.qmlproject
+++ /dev/null
@@ -1,19 +0,0 @@
-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
deleted file mode 100755
index 0f90baeb5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/fetch_plugins.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/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
deleted file mode 100755
index 0f094b527..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/load_env.sh
+++ /dev/null
@@ -1 +0,0 @@
-# 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
deleted file mode 100644
index faa3f175b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/main.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#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
deleted file mode 100644
index bb93f4093..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/mediacore/qmldir
+++ /dev/null
@@ -1,2 +0,0 @@
-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
deleted file mode 100644
index aaacfe020..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/navcore/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-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
deleted file mode 100644
index 861f2e223..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/phonecore/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-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
deleted file mode 100644
index da1a7b7f9..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/sdlcore/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-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
deleted file mode 100644
index 7111c7c93..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/AddIcon.png
+++ /dev/null
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
deleted file mode 100644
index d8e607968..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BackIcon.png
+++ /dev/null
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
deleted file mode 100644
index 1a65f0751..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BluetoothIcon.png
+++ /dev/null
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
deleted file mode 100644
index cfb6d6d59..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CMaxCal.png
+++ /dev/null
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
deleted file mode 100644
index 91ed3ef6e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeBottom.png
+++ /dev/null
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
deleted file mode 100644
index d7ba38ab8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeTop.png
+++ /dev/null
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
deleted file mode 100644
index 4555d71df..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Cloud.png
+++ /dev/null
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
deleted file mode 100644
index c21373f22..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CloudNight.png
+++ /dev/null
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
deleted file mode 100644
index 251db8a7a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/FunArtwork.png
+++ /dev/null
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
deleted file mode 100644
index 2f8dc5130..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/MapMich.png
+++ /dev/null
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
deleted file mode 100644
index 49a01feea..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/SiriusArtwork.png
+++ /dev/null
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
deleted file mode 100644
index 52430d8c5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Crosshairs.png
+++ /dev/null
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
deleted file mode 100644
index f47954968..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DeleteIcon.png
+++ /dev/null
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
deleted file mode 100644
index caa648915..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DndIcon.png
+++ /dev/null
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
deleted file mode 100644
index 6c5838989..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/EvIcon.png
+++ /dev/null
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
deleted file mode 100644
index 0871c5150..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/FavoritesIcon.png
+++ /dev/null
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
deleted file mode 100644
index 02548e946..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Forward.png
+++ /dev/null
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
deleted file mode 100644
index 2bdd652e0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/HomeIcon.png
+++ /dev/null
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
deleted file mode 100644
index c6797a440..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeyboardIcon.png
+++ /dev/null
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
deleted file mode 100644
index b9ca08ad0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadEntryIcon.png
+++ /dev/null
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
deleted file mode 100644
index a70ee397f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadIcon.png
+++ /dev/null
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
deleted file mode 100644
index 3847da93c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/LightingIcon.png
+++ /dev/null
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
deleted file mode 100644
index 4405a629c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Loop.png
+++ /dev/null
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
deleted file mode 100644
index 482b6821e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MediaTab.png
+++ /dev/null
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
deleted file mode 100644
index 5e86d80c7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MessagesIcon.png
+++ /dev/null
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
deleted file mode 100644
index 525e4b915..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MissingArtwork.png
+++ /dev/null
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
deleted file mode 100644
index 4bce72138..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/NavigationTab.png
+++ /dev/null
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
deleted file mode 100644
index 55498b913..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PandoraIcon.png
+++ /dev/null
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
deleted file mode 100644
index bbede1990..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Pause.png
+++ /dev/null
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
deleted file mode 100644
index 281e20a1f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneCornerIcons.png
+++ /dev/null
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
deleted file mode 100644
index e4071e093..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneIcons.png
+++ /dev/null
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
deleted file mode 100644
index 9b36907b3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneTab.png
+++ /dev/null
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
deleted file mode 100644
index 6af9c1046..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhonebookIcon.png
+++ /dev/null
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
deleted file mode 100644
index 1b665e363..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Play.png
+++ /dev/null
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
deleted file mode 100644
index b7b532db7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PoiIcon.png
+++ /dev/null
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
deleted file mode 100644
index f66061020..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RadioIcon.png
+++ /dev/null
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
deleted file mode 100644
index 16a31b29b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentCallsIcon.png
+++ /dev/null
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
deleted file mode 100644
index 4351243d4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentDestinationsIcon.png
+++ /dev/null
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
deleted file mode 100644
index 798f75480..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Rewind.png
+++ /dev/null
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
deleted file mode 100644
index b1d03d24a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RightTurn.png
+++ /dev/null
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
deleted file mode 100644
index 2c8e7cb2d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ScoutIcon.png
+++ /dev/null
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
deleted file mode 100644
index 571d06c97..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SearchIcon.png
+++ /dev/null
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
deleted file mode 100644
index caff60c58..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SeatsIcon.png
+++ /dev/null
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
deleted file mode 100644
index 63a5a6a9d..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ServicesIcon.png
+++ /dev/null
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
deleted file mode 100644
index 4b3fc65c6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Shuffle.png
+++ /dev/null
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
deleted file mode 100644
index 0ea120992..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SiriusIcon.png
+++ /dev/null
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
deleted file mode 100644
index f871a9654..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SpeedDialIcon.png
+++ /dev/null
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
deleted file mode 100644
index 8f0c759ed..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/UsbIcon.png
+++ /dev/null
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
deleted file mode 100644
index 79a277b18..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleCornerIcon.png
+++ /dev/null
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
deleted file mode 100644
index b6fb90276..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleTab.png
+++ /dev/null
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
deleted file mode 100644
index c27ac4a87..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VhrIcon.png
+++ /dev/null
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
deleted file mode 100644
index c3f91de70..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VoicemailIcon.png
+++ /dev/null
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
deleted file mode 100644
index e3277af0a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WallpaperIcon.png
+++ /dev/null
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
deleted file mode 100644
index 97ce15688..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WifiIcon.png
+++ /dev/null
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
deleted file mode 100644
index 69e50caa3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WorkIcon.png
+++ /dev/null
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
deleted file mode 100644
index 61f031181..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/BackButton.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-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
deleted file mode 100644
index 7f3c30126..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Button.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-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
deleted file mode 100644
index 713d00d1b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/CheckButton.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-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
deleted file mode 100644
index 2fdc97d7c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Clickable.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644
index 2e670682e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/GraphicalButton.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-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
deleted file mode 100644
index b68c7f0f1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H1.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-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
deleted file mode 100644
index 775838be0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H2.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-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
deleted file mode 100644
index 81c18a431..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/ImageButton.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index 7fe5dbab8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Key.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644
index fc5d26aa8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keyboard.qml
+++ /dev/null
@@ -1,129 +0,0 @@
-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
deleted file mode 100644
index 0dc0115ac..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keypad.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-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
deleted file mode 100644
index f0ef3ed2a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/MediaBrowser.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-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
deleted file mode 100644
index 314994361..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/OverflowableText.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-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
deleted file mode 100644
index 676d65be3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButton.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-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
deleted file mode 100644
index d4266d149..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButtonGroup.qml
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index 18b5c22f7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Section.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-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
deleted file mode 100644
index 4c52e05b2..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextBox.qml
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index 774894c13..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextEntry.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-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
deleted file mode 100644
index 0bcaf7720..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Weather.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-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
deleted file mode 100644
index 8fe6fcfd7..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/EmptyLayout.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index b0a7c2f6a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/LeftThirdSection.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index 767184de3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaLayout.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-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
deleted file mode 100644
index 797815d05..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaPlayerLayout.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-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
deleted file mode 100644
index 2ef47fa10..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/TitledLayout.qml
+++ /dev/null
@@ -1,14 +0,0 @@
-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
deleted file mode 100644
index a88c240c3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/.usb.qml.swp
+++ /dev/null
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
deleted file mode 100644
index af5804e72..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/Browse/artists.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-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
deleted file mode 100644
index 4f9d28196..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/applink.qml
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index 397b84469..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/bluetooth.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index b5f3ad1c8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/fm.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-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
deleted file mode 100644
index d9d951ef3..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/menu.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-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
deleted file mode 100644
index dfe9fc4d5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/sirius.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index 7236e98cb..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/usb.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-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
deleted file mode 100644
index 183438e03..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/.menu.qml.swp
+++ /dev/null
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
deleted file mode 100644
index db16b994b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/favorites.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-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
deleted file mode 100644
index 011c76164..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/keyboard_search.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-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
deleted file mode 100644
index 8b48efe78..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/map.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-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
deleted file mode 100644
index fdcae3f58..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/menu.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-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
deleted file mode 100644
index 0ecea8a11..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/poi.qml
+++ /dev/null
@@ -1,205 +0,0 @@
-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
deleted file mode 100644
index db16b994b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/recent_destinations.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-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
deleted file mode 100644
index 2f6b798d1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/video_moving_map.qml
+++ /dev/null
@@ -1,20 +0,0 @@
-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
deleted file mode 100644
index 1f409f58e..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/device_info.qml
+++ /dev/null
@@ -1,21 +0,0 @@
-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
deleted file mode 100644
index 5d7c51be6..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/discovery.qml
+++ /dev/null
@@ -1,23 +0,0 @@
-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
deleted file mode 100644
index fd5ed4ff0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/keypad.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-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
deleted file mode 100644
index cf62a9c28..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/manage_devices.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index 2d53656ba..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/menu.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-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
deleted file mode 100644
index 1873ed438..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/recent_calls.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-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
deleted file mode 100644
index b95bc52da..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Vehicle/menu.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-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
deleted file mode 100644
index f19539b9b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/alert.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-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
deleted file mode 100644
index b8f4f09d5..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/chrome.qml
+++ /dev/null
@@ -1,144 +0,0 @@
-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
deleted file mode 100644
index c45f66782..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-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
deleted file mode 100644
index 432e978b8..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home_corners.qml
+++ /dev/null
@@ -1,133 +0,0 @@
-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
deleted file mode 100644
index af33ddaff..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/media.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-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
deleted file mode 100644
index e26326b45..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/navigation.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-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
deleted file mode 100644
index 8c2987f2f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/phone.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-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
deleted file mode 100644
index 9687e7c46..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/vehicle.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-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
deleted file mode 100644
index c6f0b0e76..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/main.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-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
deleted file mode 100644
index 547602d83..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// 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
deleted file mode 100644
index baf67f247..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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
deleted file mode 100644
index 47f0e1ba0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.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
deleted file mode 100644
index ea541b24c..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/FordSdlCore.pro
+++ /dev/null
@@ -1,48 +0,0 @@
-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
deleted file mode 100644
index 5e86daa2f..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.cpp
+++ /dev/null
@@ -1,470 +0,0 @@
-#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
deleted file mode 100644
index c526c747a..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.h
+++ /dev/null
@@ -1,87 +0,0 @@
-#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
deleted file mode 100644
index 540b909e0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.cpp
+++ /dev/null
@@ -1,792 +0,0 @@
-#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
deleted file mode 100644
index 4bc095aa1..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.h
+++ /dev/null
@@ -1,170 +0,0 @@
-#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
deleted file mode 100644
index f52bda256..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------
-#
-# 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
deleted file mode 100644
index 306dcada0..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.vcproj
+++ /dev/null
@@ -1,328 +0,0 @@
-<?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
deleted file mode 100644
index a89d1efcb..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#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
deleted file mode 100644
index 655dcb517..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#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
deleted file mode 100644
index da1a7b7f9..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-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
deleted file mode 100644
index f625c16b4..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#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
deleted file mode 100644
index cb46236db..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#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
deleted file mode 100644
index 104b31abe..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#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
deleted file mode 100644
index 9b213e666..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#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
deleted file mode 100644
index 57cb8ac50..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-#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
deleted file mode 100644
index f2e7f1b2b..000000000
--- a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#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
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/.gitignore b/SDL_Core/src/components/qt_hmi/qml_model_qt4/.gitignore
deleted file mode 100644
index 3a4593b4d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.o
-*.pri
-*.so
-.DS_Store
-*.user
-Common.js
-
-Makefile
-moc_*.cpp
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_model_qt4/CMakeLists.txt
deleted file mode 100644
index e6eeb9e52..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/CMakeLists.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.11)
-
-set(components_dir ${CMAKE_CURRENT_SOURCE_DIR}/../..)
-set(dbus_dir ${components_dir}/dbus)
-set(codegen_dir ${dbus_dir}/codegen)
-set(codegen ${codegen_dir}/make_qml_dbus_qml.py)
-set(parser ${codegen_dir}/ford_xml_parser.py)
-set(interfaces_dir ${components_dir}/interfaces)
-set(api_xml ${interfaces_dir}/QT_HMI_API.xml)
-set(proxy_dir ${CMAKE_CURRENT_BINARY_DIR}/hmi_api)
-set(qml_dirs hmi_api controls models popups views)
-set(qml_files MainWindow.qml)
-
-add_custom_target(qml_auto ALL
- COMMAND python ${codegen} --infile ${api_xml} --version ${qt_version} --outdir ${proxy_dir}
- DEPENDS ${api_xml} ${codegen} ${parser}
- COMMENT "Generating files:
- ${proxy_dir}/BasicCommunicationProxy.qml
- ${proxy_dir}/ButtonsProxy.qml
- ${proxy_dir}/NavigationProxy.qml
- ${proxy_dir}/TTSProxy.qml
- ${proxy_dir}/UIProxy.qml
- ${proxy_dir}/VehicleInfoProxy.qml
- ${proxy_dir}/VRProxy.qml
- from:
- ${api_xml} ..."
-)
-
-add_custom_target(qml_copy_resources ALL
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../res ${CMAKE_CURRENT_BINARY_DIR}/res
- COMMENT "Copying resources")
-
-if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- foreach(qml_dir ${qml_dirs})
- add_custom_target(qml_copy_${qml_dir} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${qml_dir} ${CMAKE_CURRENT_BINARY_DIR}/${qml_dir}
- COMMENT "Copying directory ${qml_dir}")
- endforeach(qml_dir)
-
- add_dependencies(qml_auto qml_copy_hmi_api)
-
- foreach(qml_file ${qml_files})
- add_custom_target(qml_copy_${qml_file} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${qml_file} ${CMAKE_CURRENT_BINARY_DIR}/${qml_file}
- COMMENT "Copying file ${qml_file}")
- endforeach(qml_file)
-endif()
-
-install(DIRECTORY
- ${CMAKE_CURRENT_BINARY_DIR}/controls
- ${CMAKE_CURRENT_BINARY_DIR}/hmi_api
- ${CMAKE_CURRENT_BINARY_DIR}/models
- ${CMAKE_CURRENT_BINARY_DIR}/popups
- ${CMAKE_CURRENT_BINARY_DIR}/res
- ${CMAKE_CURRENT_BINARY_DIR}/views
- DESTINATION bin/hmi)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/MainWindow.qml DESTINATION bin/hmi)
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/MainWindow.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/MainWindow.qml
deleted file mode 100644
index 1a3b06fd4..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/MainWindow.qml
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * @file MainWindow.qml
- * @brief Implementation of main window.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import com.ford.sdl.hmi.dbus_adapter 1.0
-import com.ford.sdl.hmi.log4cxx 1.0
-import "./controls"
-import "./views"
-import "./hmi_api" as HmiApi
-import "./models"
-import "./popups"
-import "hmi_api/Common.js" as Common
-import "./models/Constants.js" as Constants
-import "models/Internal.js" as Internal
-
-Rectangle {
- width: 1280
- height: 768
- property string startQml: "./views/ApplicationListView.qml"
- property int minWidth: Constants.mainScreenMinWidth
- property int minHeight: Constants.mainScreenMiHeight
- color: Constants.secondaryColor
-
- DataStorage {
- id: dataContainer
-
- onSystemContextChanged: {
- sdlUI.onSystemContext(systemContext)
- }
-
- // Please note that applicationContext is changed only after setting currentApplication
- onApplicationContextChanged: {
- if (applicationContext) {
- sdlBasicCommunication.onAppActivated(currentApplication.appId)
- } else {
- sdlBasicCommunication.onAppDeactivated(currentApplication.appId, contentLoader.item.category)
- }
- }
- }
-
-// TODO(KKolodiy): find way for play sound
-// Audio {
-// id: beep
-// source: "res/initial.wav"
-// }
-
- SettingsStorage {
- id: settingsContainer
- }
-
- Item {
- id: mainScreen
- anchors.top: parent. top
- anchors.left: parent.left
- width: (parent.width - simulationScreen.width < minWidth) ?
- minWidth : parent.width - simulationScreen.width
- height: (parent.height - hardwareScreen.height < minHeight) ?
- minHeight : parent.height - hardwareScreen.height
- clip: true
- visible: false
-
- Item {
- anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height * 0.10
- width: parent.width
- HeaderMenu {}
- }
-
- Item {
- height: parent.height * 0.90
- width: parent.width
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
-
- Loader {
- id: contentLoader
- height: parent.height - Constants.margin
- width: parent.width - 2 * Constants.margin
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.leftMargin: Constants.margin
- anchors.rightMargin: Constants.margin
- anchors.bottomMargin: Constants.margin
-
-
- source:startQml
- property variant viewTransitionStack : []
-
- function reset() {
- viewTransitionStack = []
- }
-
- property string currentLocation
- function go(path, appId) {
- console.debug("enter:", path, ", appId:", appId)
- if (path) {
- if (currentLocation !== path) {
- viewTransitionStack.push({ uri: source.toString(), applicationContext: false })
- if (appId) {
- dataContainer.setCurrentApplication(appId)
- }
- currentLocation = path
- source = path
- }
- }
- console.debug("exit")
- }
-
- function back() {
- if (viewTransitionStack.length) {
- source = viewTransitionStack.pop().uri
- }
- currentLocation = ""
- }
-
- onStatusChanged: {
- if (status == Component.Ready) {
- if (!dataContainer.activeAlert) {
- dataContainer.applicationContext = item.applicationContext
- }
- else {
- dataContainer.applicationSavedContext = item.applicationContext
- }
- if (viewTransitionStack && viewTransitionStack.length) {
- viewTransitionStack[viewTransitionStack.length - 1].applicationContext = item.applicationContext
- }
- dataContainer.setSystemContext()
- }
- }
- }
- }
-
- WarningInfo { id: warningInfo }
-
- InteractionPopup {
- id: interactionPopup
- popUpName: "UI.PerformInteraction"
- anchors.centerIn: parent
- visible: false
- }
-
- SliderPopup {
- id: sliderPopup
- popUpName: "UI.Slider"
- anchors.centerIn: parent
- visible: false
- }
-
- PerformAudioPassThruPopup {
- id: performAudioPassThruPopup
- popUpName: "UI.PerformAudioPassThru"
- anchors.centerIn: parent
- visible: false
- }
-
- VRHelpPopup {
- id: vrHelpPopup
- popUpName: "UI.VrHelp"
- anchors.centerIn: parent
- visible: false
- }
-
- AlertWindow {
- id: alertWindow
- popUpName: "UI.Alert"
- objectName: "AlertWindow"
- anchors.fill: parent
- visible: false
- }
- }
-
- Item {
- id: simulationScreen
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.left: mainScreen.right
- width: simulationPanel.width
- clip: true
- SimulationView {
- id: simulationPanel
-
- VRPopUp {
- id: vrPopUp
- visible: false
- anchors.fill: parent
- }
-
- TTSPopUp {
- id: ttsPopUp
- anchors.top: parent.top
- anchors.right: parent.right
- visible: false
- }
- }
- }
-
- Item {
- id: hardwareScreen
- anchors.top: mainScreen.bottom
- anchors.left: parent.left
- anchors.right: simulationScreen.left
- height: hardwarePanel.height
- clip: true
- HardwareButtonsView { id: hardwarePanel }
- }
-
- HMIProxy {
- HmiApi.ButtonsProxy {
- id: sdlButtons
- objectName: "Buttons"
- }
- HmiApi.BasicCommunicationProxy {
- id: sdlBasicCommunication
- objectName: "BasicCommunication"
- }
- HmiApi.VRProxy {
- id: sdlVR
- objectName: "VR"
- }
- HmiApi.TTSProxy {
- id: sdlTTS
- objectName: "TTS"
- }
- HmiApi.NavigationProxy {
- id: sdlNavigation
- objectName: "Navigation"
- }
- HmiApi.VehicleInfoProxy {
- id: sdlVehicleInfo
- objectName: "VehicleInfo"
- }
- HmiApi.UIProxy {
- id: sdlUI
- objectName: "UI"
- }
- }
-
- SDLProxy {
- id: sdlProxy
-
- onAppRegistered: {
- dataContainer.addApplication(
- {
- appName: application.appName,
- ngnMediaScreenAppName: application.ngnMediaScreenAppName,
- icon: application.icon,
- deviceName: application.deviceName,
- appId: application.appId,
- hmiDisplayLanguageDesired: application.hmiDisplayLanguageDesired,
- isMediaApplication: application.isMediaApplication,
- appType: application.appType,
- hmiUIText: { },
- mediaClock: {
- "updateMode": Internal.MediaClockUpdateMode.MCU_COUNTUP,
- "runningMode": Internal.MediaClockRunningMode.MCR_STOPPED,
- "startTime": -1,
- "endTime": -1,
- "startTimeForProgress": -1
- }
- });
- }
-
- onAppUnregistered: {
- console.debug("enter")
- dataContainer.removeApplication(appId);
- if ((dataContainer.currentApplication.appId === appId)) {
- if (dataContainer.applicationContext) {
- contentLoader.go("views/ApplicationListView.qml");
- }
- if (contentLoader.viewTransitionStack.filter(function(x) { return x.applicationContext })) {
- contentLoader.reset();
- }
- dataContainer.currentApplication.reset()
- }
- console.debug("exit")
- }
-
- onPlayTone: {
- beep.play()
- }
-
- }
-
- Component.onCompleted: {
- dataContainer.hmiVRAvailable = true
- dataContainer.hmiTTSAvailable = true
- dataContainer.hmiNavigationAvailable = true
- dataContainer.hmiVehicleInfoAvailable = true
- dataContainer.hmiUIAvailable = true
-
- sdlBasicCommunication.onReady()
- }
-
- /*
- * Test Support Section
- *
- */
- function getSlider(){
- return sliderPopup
- }
-
- function getDataStorage(){
- return dataContainer
- }
-
- function getUIProxy(){
- return sdlUI
- }
-
- function getMainScreen(){
- return mainScreen
- }
-
- function getContentLoader(){
- return contentLoader
- }
-
- function getWarningInfo(){
- return warningInfo
- }
- /*
- * Test Support Section End
- */
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ArrowKeys.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ArrowKeys.qml
deleted file mode 100644
index 4f3396012..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ArrowKeys.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file ArrowKeys.qml
- * @brief Keys with arrow for cursor movement.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-Item {
- width: buttonOk.width
- height: buttonOk.height
-
- HardwareButton {
- id: arrowUp
- buttonId: Common.ButtonName.TUNEUP
- name: "Up"
- }
- HardwareButton {
- id: arrowDown
- buttonId: Common.ButtonName.TUNEDOWN
- name: "Down"
- }
- HardwareButton {
- id: arrowLeft
- buttonId: Common.ButtonName.SEEKLEFT
- name: "Left"
- }
- HardwareButton {
- id: arrowRight
- buttonId: Common.ButtonName.SEEKRIGHT
- name: "Right"
- }
- HardwareButton {
- id: buttonOk
- buttonId: Common.ButtonName.OK
- name: "Ok"
- longPressAvailable: false
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/BackButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/BackButton.qml
deleted file mode 100644
index 906b3098b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/BackButton.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file BackButton.qml
- * @brief Button "Back" that return to previous menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-OvalButton {
- text: "Back"
- onClicked: { contentLoader.back() }
- fontSize: Constants.fontSize
- opacity: 0
-
- NumberAnimation on opacity {
- to: 1;
- duration: Constants.animationDuration
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CheckBox.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CheckBox.qml
deleted file mode 100644
index 39d693b97..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CheckBox.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file CheckBox.qml
- * @brief Check box
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- property alias text: text.text
- property alias color: text.color
- property bool checked: false
-
- signal clicked
-
- onCheckedChanged: {
- selector.color = checked ? Constants.primaryColorPressed : Constants.transparentColor
- }
-
- height: checkbox.height + Constants.generalSpacing / 2
- width: checkbox.width + text.width + 1.5 * Constants.generalSpacing
-
- MouseArea {
- anchors.fill: parent
- onClicked: { checked = !checked; parent.clicked() }
- }
- Rectangle {
- id: checkbox
- width: text.font.pixelSize + Constants.generalSpacing / 2
- height: width
- anchors.left: parent.left
- border.color: Constants.controlsBorderColor
- border.width: Constants.controlsBorderWidth
- color: Constants.panelTextColor
- radius: Constants.controlsRadius
- Rectangle {
- id: selector
- anchors.fill: parent
- anchors.margins: checkbox.width / 8
- color: Constants.transparentColor
- }
- }
- Text {
- id: text
- anchors.left: checkbox.right
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenter: checkbox.verticalCenter
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CircleButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CircleButton.qml
deleted file mode 100644
index 818f07ffc..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/CircleButton.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * @file CircleButton.qml
- * @brief Parent class for circle button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Image {
- id: circleBtn
- source: imgOff
- property alias text: btnText.text
- property alias pixelSize: btnText.font.pixelSize
- property string dest: ""
- property bool isPressed: false
- property string imgOff: "../res/buttons/round_btn.png"
- property string imgOn: "../res/buttons/round_pressed_btn.png"
- property string textColorOnPressed: Constants.secondaryColor
- property string textColorDefault: Constants.primaryColor
-
- signal clicked()
- function wasClicked()
- {
- clicked()
- }
-
- Text {
- anchors.centerIn: parent
- id: btnText
- color: textColorDefault
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- console.log("CircleButton onPressed enter");
- source = imgOn
- btnText.color = textColorOnPressed
- isPressed = true
- console.log("CircleButton onPressed exit");
- }
- onReleased: {
- console.log("CircleButton onReleased enter");
- source = imgOff
- btnText.color = textColorDefault
- isPressed = false
- console.log("CircleButton onReleased exit");
- }
- onClicked: {
- console.log("CircleButton onClicked enter");
- if(dest !== ""){
- contentLoader.go(dest)
- }
- circleBtn.wasClicked()
- console.log("CircleButton onClicked enter");
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableImage.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableImage.qml
deleted file mode 100644
index f35f7c302..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableImage.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file ClickableImage.qml
- * @brief Clickable image item
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Image {
- signal pressed ()
- signal released ()
- signal canceled ()
- signal clicked()
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- parent.scale = Constants.pressedIconScale
- parent.pressed()
- }
-
- onReleased: {
- parent.scale = 1
- parent.released()
- }
-
- onCanceled: {
- parent.scale = 1
- parent.canceled()
- }
-
- onClicked: {
- parent.clicked()
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableText.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableText.qml
deleted file mode 100644
index e6b9fbf24..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClickableText.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file ClickableText.qml
- * @brief Clickable text item
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Text {
- property string defaultColor
- property string pressedColor
- signal pressed ()
- signal released ()
- signal canceled ()
- signal clicked ()
-
- color: defaultColor
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- press()
- parent.pressed()
- }
-
- onReleased: {
- release()
- parent.released()
- }
-
- onCanceled: {
- release()
- parent.canceled()
- }
-
- onClicked: {
- parent.clicked()
- }
- }
-
- function press () {
- color = pressedColor
- }
-
- function release () {
- color = defaultColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClimateControlBtn.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClimateControlBtn.qml
deleted file mode 100644
index abd344272..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ClimateControlBtn.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @file ClimateControlBtn.qml
- * @brief Round button, which is used at climat menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item
-{
- id: climateControlBtn
- width: climateBtnImg.width
- height: climateBtnImg.height
- property string name: ""
- property string txt: ""
- state: "off"
-
- Image {
- id: climateBtnImg
- source: climateControlBtn.state === "off" ? "../res/climate/climate_round_off_btn.png" : "../res/climate/climate_round_on_btn.png"
-
- Image {
- id: hoverImg
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- property string st: climateControlBtn.state === "off" ? "_off" : "_on"
- source: climateControlBtn.name === "" ? "": "../res/climate/" + climateControlBtn.name + st + ".png"
- }
-
- Text {
- id: hoverText
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- text: climateControlBtn.txt
- font.pixelSize: Constants.fontSize
- color: climateControlBtn.state === "off" ? Constants.primaryColor : Constants.secondaryColor
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if(climateControlBtn.state === "on") {
- climateControlBtn.state = "off"
- climateBtnImg.source = "../res/climate/climate_round_off_btn.png"
- if(climateControlBtn.txt != "") {
- hoverText.color = Constants.primaryColor
- }
- if(climateControlBtn.name != "") {
- hoverImg.source = "../res/climate/" + climateControlBtn.name + "_off.png"
- }
- } else {
- climateControlBtn.state = "on"
- climateBtnImg.source = "../res/climate/climate_round_on_btn.png"
- if(climateControlBtn.txt != "") {
- hoverText.color = Constants.secondaryColor
- }
- if(climateControlBtn.name != "") {
- hoverImg.source = "../res/climate/" + climateControlBtn.name + "_on.png"
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ComboBox.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ComboBox.qml
deleted file mode 100644
index d5129a2a1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ComboBox.qml
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * @file ComboBox.qml
- * @brief Combo box
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- id: container
- width: Constants.defaultComboboxWidth
- height: main.height
-
- property alias model: listView.model
- property alias currentIndex: listView.currentIndex
- property alias currentText: textMain.text
- property string textRole
-
- function choose(name) {
- var count = listView.count
- for (var i = 0; i < count; ++i) {
- if (name === listView.model.get(i).name) {
- listView.currentIndex = i
- break
- }
- }
-
- textMain.text = name
- }
-
- Rectangle {
- id: main
-
- anchors.left: parent.left
- anchors.right: parent.right
- height: label.font.pixelSize + Constants.generalSpacing
- color: Constants.panelTextColor
- border.color: Constants.controlsBorderColor
- border.width: Constants.controlsBorderWidth
- radius: Constants.controlsRadius
-
- Text {
- id: textMain
- anchors.left: parent.left
- anchors.right: arrow.left
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- color: Constants.secondaryColor
- verticalAlignment: Text.AlignVCenter
- anchors.leftMargin: Constants.generalSpacing
- anchors.rightMargin: Constants.generalSpacing
- elide: Text.ElideRight
- }
-
- Rectangle {
- id: arrow
- anchors.right: parent.right
- height: parent.height; width: height
-
- color: Constants.panelTextColor
- border.color: Constants.controlsBorderColor
- border.width: Constants.controlsBorderWidth
- radius: Constants.controlsRadius
-
- Text {
- anchors.fill: parent
- text: "v"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- color: Constants.secondaryColor
- }
- }
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- onClicked: listView.visible = !listView.visible
- }
- }
-
- ScrollableListView {
- id: listView
- anchors.top: main.bottom
- anchors.left: main.left
- anchors.right: main.right
- height: 150
- visible: false
- delegate: Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- height: label.font.pixelSize + Constants.generalSpacing
- color: Constants.panelTextColor
- border.color: Constants.controlsBorderColor
- border.width: Constants.controlsBorderWidth
- Text {
- id: label
- anchors.fill: parent
- anchors.leftMargin: Constants.generalSpacing
- anchors.rightMargin: Constants.generalSpacing
- verticalAlignment: Text.AlignVCenter
- text: model.name
- color: Constants.secondaryColor
- elide: Text.ElideRight
- }
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- onClicked: { choose(model.name); listView.visible = false }
- onEntered: { parent.color = Constants.primaryColorPressed }
- onExited: { parent.color = Constants.panelTextColor }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GradientRectangle.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GradientRectangle.qml
deleted file mode 100644
index 7b21bb456..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GradientRectangle.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file GradientRectangle.qml
- * @brief Rectangle with gradient.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-Rectangle {
- property string firstColor: "grey"
- property string secondColor: "#2E2E2E"
- property alias fontSize: text.font.pixelSize
- property alias text: text.text
- property int customButtonID
- property bool isCustomButton: false
- property bool clickProcessed
- signal pressed()
- signal released()
-
- radius: 5
- border.color: "#D3D3D3"
-
- Text {
- id: text
- anchors.fill: parent
- font.pixelSize: Constants.titleFontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- firstColor = "#2E2E2E"
- secondColor = "grey"
- parent.pressed()
- }
- onReleased: {
- firstColor = "grey"
- secondColor = "#2E2E2E"
- parent.released()
- }
- }
-
- Timer {
- id: timer
- interval: Constants.customButtonTimer
- repeat: false
- triggeredOnStart: false
- }
-
- onPressed: {
- if (isCustomButton) {
- timer.start()
- clickProcessed = false
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, customButtonID)
- }
- }
-
- onReleased: {
- if (isCustomButton) {
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, customButtonID)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, customButtonID)
- }
- }
- }
-
- Connections {
- target: timer
- onTriggered: {
- if (isCustomButton) {
- if(!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, customButtonID)
- clickProcessed = true
- }
- }
- }
- }
-
- gradient: Gradient {
- GradientStop {
- position: 0.1
- color: firstColor
- }
- GradientStop {
- position: 0.5
- color: secondColor
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GridItem.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GridItem.qml
deleted file mode 100644
index 84528ab80..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/GridItem.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file GridItem.qml
- * @brief Item with animation for GridMenu
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- id: item
- opacity: 0
- SequentialAnimation {
- id: animation
- PauseAnimation {duration: index * 100 }
- NumberAnimation {
- target: item
- duration: Constants.animationDuration
- property: "opacity"
- from: 0; to: 1;
- }
- }
- Component.onCompleted: {
- animation.start()
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HardwareButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HardwareButton.qml
deleted file mode 100644
index ea8e406c6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HardwareButton.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file HardwareButton.qml
- * @brief Parent class for hardware button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import com.ford.sdl.hmi.hw_buttons 1.0
-import "../hmi_api/Common.js" as Common
-
-MaskedContainer {
- property string name
- property int buttonId: Common.ButtonName.CUSTOM_BUTTON
- property bool upDownAvailable: true
- property bool shortPressAvailable: true
- property bool longPressAvailable: true
-
- signal hold
-
- Image {
- source: "../res/controlButtons/" + name + "Button.png"
- }
- Image {
- id: pressedImg
- source: "../res/controlButtons/" + name + "Button_pressed.png"
- visible: false
- Behavior on opacity {
- NumberAnimation { duration: 80 }
- }
- }
- Timer {
- id: timer
- interval: 2000
- repeat: false
- triggeredOnStart: false
- }
- property bool clickProcessed
- onPressed: {
- clickProcessed = false
- pressedImg.visible = true
- timer.start()
- if (upDownAvailable) {
- sdlButtons.onButtonEvent(buttonId, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
- }
-
- onReleased: {
- if (upDownAvailable) {
- sdlButtons.onButtonEvent(buttonId, Common.ButtonEventMode.BUTTONUP, undefined)
- }
- timer.stop()
- if (!clickProcessed && shortPressAvailable) {
- sdlButtons.onButtonPress(buttonId, Common.ButtonPressMode.SHORT, undefined)
- }
- pressedImg.visible = false
- }
-
- Connections {
- target: timer
- onTriggered: {
- if(!clickProcessed && longPressAvailable) {
- sdlButtons.onButtonPress(buttonId, Common.ButtonPressMode.LONG, undefined)
- clickProcessed = true
- hold()
- }
- }
- }
-
- Component.onCompleted: {
- if (buttonId !== Common.ButtonName.CUSTOM_BUTTON) {
- settingsContainer.buttonCapabilities.push(
- {
- name: buttonId,
- upDownAvailable: upDownAvailable,
- shortPressAvailable: shortPressAvailable,
- longPressAvailable: longPressAvailable
- });
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HeaderMenu.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HeaderMenu.qml
deleted file mode 100644
index 2b0b418c5..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/HeaderMenu.qml
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * @file HeaderMenu.qml
- * @brief Header menu view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- id: headerMenu
- anchors.fill: parent
-
- Text {
- anchors.leftMargin: Constants.margin
- anchors.topMargin: Constants.margin
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: "75°"
- }
-
- Item {
- width: menuText.width
- height: parent.height
- anchors.topMargin: Constants.margin
- anchors.horizontalCenter: headerMenu.horizontalCenter
- signal clicked ()
-
- ClickableText {
- id: menuLogo
- anchors.horizontalCenter: menuText.horizontalCenter
- anchors.bottom: parent.verticalCenter
- text: "≡"
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.fontSize
-
- onClicked: parent.clicked()
- onPressed: menuLogo.press()
- onReleased: menuLogo.release()
- onCanceled: menuLogo.release()
- }
-
- ClickableText {
- id: menuText
- anchors.top: parent.verticalCenter
- text: "MENU";
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.fontSize
-
- onClicked: parent.clicked()
- onPressed: menuText.press()
- onReleased: menuText.release()
- onCanceled: menuText.release()
- }
-
- onClicked: {
- contentLoader.go("./views/MainMenuView.qml")
- }
- }
-
- Row {
- id: clock
- height: childrenRect.height
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.rightMargin: Constants.margin
- anchors.topMargin: Constants.margin
- property date date: new Date()
-
- Timer {
- running: true
- repeat: true
- interval: 1000
- onTriggered: {
- clock.date = new Date();
- }
- }
-
- Text {
- text: Qt.formatTime(clock.date, "hh");
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
-
- Item {
- width: 10
- height: parent.height
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: clock.date.getSeconds() % 2 ? ":" : ""
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
- }
-
- Text {
- text: Qt.formatTime(clock.date, "mm");
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Icon.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Icon.qml
deleted file mode 100644
index d0bfdba78..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Icon.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * @file Navigation.qml
- * @brief Icon.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-Item {
- property variant source
-
- Image {
- anchors.fill: parent
- source: url(parent.source)
-
- function image(turnIcon) {
- if (turnIcon && turnIcon.imageType === Common.ImageType.STATIC) {
- return turnIcon.value;
- } else {
- return "";
- }
- }
-
- function url(turnIcon) {
- if (turnIcon && turnIcon.imageType === Common.ImageType.DYNAMIC) {
- return turnIcon.value;
- } else {
- return "";
- }
- }
- }
-
- function reset () {
- source = undefined
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ListItem.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ListItem.qml
deleted file mode 100644
index c87c24de4..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ListItem.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file Entry.qml
- * @brief Entry with icon and text for list.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: main
- color: Constants.transparentColor
-
- property alias text: label.text
- property alias fontSize: label.font.pixelSize
- property alias icon: image.source
-
- Icon {
- id: image
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
- anchors.left: parent.left
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenter: parent.verticalCenter
- visible: source ? true : false
- }
- Text {
- id: label
- anchors.verticalCenter: parent.verticalCenter
- height: image.height
- width: parent.width - image.width
- z: 50
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- text: "Name Entry"
- anchors.left: image.right
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenterOffset: 0
- visible: text !== ""
- color: Constants.primaryColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MaskedButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MaskedButton.qml
deleted file mode 100644
index d8a95d1a0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MaskedButton.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @file MaskedButton.qml
- * @brief Masked button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import com.ford.sdl.hmi.hw_buttons 1.0
-
-MaskedContainer {
- property string name
-
- Image {
- id: icon
- source: "../res/controlButtons/" + name + "Button.png"
- }
-
- onPressed: {
- state = "pressed";
- }
-
- onReleased: {
- state = "";
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: icon
- source: "../res/controlButtons/" + name + "Button_pressed.png"
- }
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MultiTouchArea.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MultiTouchArea.qml
deleted file mode 100644
index e86dcedc8..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/MultiTouchArea.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file MultiTouchArea.qml
- * @brief Area for multitouch.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-MultiPointTouchArea {
- readonly property int created: Date.now()
-
- signal pressed(var touchPoints)
- signal released(var touchPoints)
- signal canceled(var touchPoints)
- signal updated(var touchPoints)
-
- function fillEvent(touchPoints) {
- var event = []
- for (var i = 0; i < touchPoints.length; ++i) {
- event.push({
- id: touchPoints[i].pointId,
- ts: [Date.now() - created],
- c: [{ x: touchPoints.x, y: touchPoints.y }] // TODO(KKolodiy): need cast to int
- })
- }
- return event
- }
-
- minimumTouchPoints: 1
- maximumTouchPoints: 10
-
- onPressed: {
- sdlUI.onTouchEvent(Common.BEGIN, fillEvent(touchPoints))
- parent.pressed(touchPoints)
- }
- onReleased: {
- sdlUI.onTouchEvent(Common.END, fillEvent(touchPoints))
- parent.released(touchPoints)
- }
- onCanceled: {
- sdlUI.onTouchEvent(Common.END, fillEvent(touchPoints))
- parent.canceled(touchPoints)
- }
- onUpdated: {
- sdlUI.onTouchEvent(Common.MOVE, fillEvent(touchPoints))
- parent.updated(touchPoints)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/OvalButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/OvalButton.qml
deleted file mode 100644
index 59458499a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/OvalButton.qml
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * @file OvalButton.qml
- * @brief Oval button with flexible width.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import com.ford.sdl.hmi.hw_buttons 1.0
-import "../models/Constants.js" as Constants
-
-// Don't change constants. It break button
-// TODO (dchmerev@luxoft.com): make this comment more clear
-// todo (ykazakov): eliminate this problem and remove all such comments
-
-Item {
- id: main
- width: dynamic ? field.width + 2 * left.width : Constants.ovalButtonWidth
- height: Constants.ovalButtonHeight
-
- signal clicked;
- signal pressed;
- signal released;
- signal pressAndHold;
- property alias text: label.text
- property alias fontSize: label.font.pixelSize
- property alias icon: image.source
- property bool highlighted: false
- property bool dynamic: false
- property bool disabled: false
- property color colorizeColor
- property real colorizeStrength
-
- onDisabledChanged: colorize()
- onHighlightedChanged: colorize()
- Component.onCompleted: colorize()
-
- function colorize() {
- if (disabled) {
- colorizeColor = "gray";
- colorizeStrength = 1;
- } else if (highlighted) {
- colorizeColor = "cyan";
- colorizeStrength = 1;
- } else {
- colorizeStrength = 0;
- }
- }
-
- Item {
- id: buttonBorderImage
- visible: true
- anchors.fill: parent
- Image {
- id: left
- width: 31
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.top: parent.top
- source: "../res/buttons/oval_btn_left.png"
- effect: Colorize {
- color: main.colorizeColor
- strength: main.colorizeStrength
- }
- }
-
- Image {
- id: right
- width: 31
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- source: "../res/buttons/oval_btn_right.png"
- effect: Colorize {
- color: main.colorizeColor
- strength: main.colorizeStrength
- }
- }
-
- Image {
- id: top
- height: 10
- anchors.right: parent.right
- anchors.rightMargin: 31
- anchors.left: parent.left
- anchors.leftMargin: 31
- anchors.top: parent.top
- fillMode: Image.TileHorizontally
- source: "../res/buttons/oval_btn_top.png"
- effect: Colorize {
- color: main.colorizeColor
- strength: main.colorizeStrength
- }
- }
-
- Image {
- id: bottom
- height: 11
- anchors.right: parent.right
- anchors.rightMargin: 31
- anchors.left: parent.left
- anchors.leftMargin: 31
- anchors.bottom: parent.bottom
- fillMode: Image.TileHorizontally
- source: "../res/buttons/oval_btn_bottom.png"
- effect: Colorize {
- color: main.colorizeColor
- strength: main.colorizeStrength
- }
- }
- }
-
- Rectangle {
- id: background
- color: Constants.transparentColor
- anchors.fill: parent
- anchors.rightMargin: 31
- anchors.leftMargin: 31
- anchors.bottomMargin: 10
- anchors.topMargin: 10
- visible: true
- effect: Colorize {
- color: main.colorizeColor
- strength: main.colorizeStrength
- }
- }
-
- MouseArea {
- id: mousearea
- anchors.rightMargin: 15
- anchors.leftMargin: 15
- anchors.bottomMargin: 11
- anchors.topMargin: 10
- anchors.fill: parent
- enabled: !parent.disabled
- onPressed: {
- parent.state = "pressed";
- parent.pressed();
- }
- onReleased: {
- parent.state = "";
- parent.released();
- }
- onClicked: {
- parent.clicked();
- }
- onPressAndHold: {
- parent.pressAndHold();
- }
- onCanceled: {
- parent.state = "";
- }
- }
-
- Item {
- id: field
- anchors.fill: background
-
- Icon {
- id: image
- width: Constants.iconButtonSize
- height: Constants.iconButtonSize
- anchors.verticalCenter: parent.verticalCenter
- visible: source ? true : false
- }
- Text {
- id: label
- width: image.visible ? parent.width - image.width : parent.width
- color: Constants.primaryColor
- anchors.centerIn: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: Constants.ovalButtonFontSize
- visible: true
- elide: Text.ElideRight
- effect: Colorize {
- id: colorizeLabel
- color: main.colorizeColor
- strength: main.colorizeStrength
- }
- }
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: left
- source: "../res/buttons/oval_btn_pressed_left.png"
- }
-
- PropertyChanges {
- target: right
- source: "../res/buttons/oval_btn_pressed_right.png"
- }
-
- PropertyChanges {
- target: background
- color: Constants.primaryColor
- }
-
- PropertyChanges {
- target: label
- color: Constants.secondaryColor
- }
-
- PropertyChanges {
- target: colorizeLabel
- strength: 0
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PagedFlickable.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PagedFlickable.qml
deleted file mode 100644
index 6d40ad647..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PagedFlickable.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * @file PagedFlickable.qml
- * @brief Animated row.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Item
-{
- id: flickablePage
- height: container.height + pager.height
- default property alias content: containerRow.children
- property alias spacing: containerRow.spacing
- property int elementWidth
- property int snapTo
- property int count: 0
-
- Flickable {
- id: container
- anchors.bottom: parent.bottom
- maximumFlickVelocity: 1500
- contentWidth: containerRow.width
- height: containerRow.height
- width: parent.width
- interactive: contentWidth > width
-
- onMovementEnded: {
- var rest = contentX % snapTo
- var t = 0.25
- if (rest > parent.snapTo / 2) {
- rest = rest - parent.snapTo
- }
- var vel = 2 * rest / t
- flickDeceleration = Math.abs(vel) / t
- flick(vel, 0)
- flickDeceleration = 1500
- }
- Row {
- id: containerRow
- anchors.verticalCenter: parent.verticalCenter
- }
- }
-
- Pager {
- id: pager
- space: 7
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.top
-
- pages: {
- if ( (container.contentWidth % container.width) >= (flickablePage.elementWidth / 2 + flickablePage.spacing)) {
- return Math.ceil(container.contentWidth / container.width)
- }
- else {
- return Math.floor(container.contentWidth / container.width)
- }
- }
-
- activePage: {
- if (container.contentX <= 0) {
- return 0
- }
- else if ( (container.contentWidth - container.contentX) < container.width) {
- return pages -1
- }
- else {
- if ( (container.contentX % container.width) >= (flickablePage.elementWidth / 2 + flickablePage.spacing)) {
- return Math.ceil(container.contentX / container.width)
- }
- else if ( (container.contentX % container.width) > 0) {
- return Math.floor(container.contentX / container.width)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Pager.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Pager.qml
deleted file mode 100644
index 471d93211..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/Pager.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file Pager.qml
- * @brief Bubbles that indicate about page switch.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Row {
- id: pager
- property int pages
- property int activePage: 0
- property int space
- property int itemsInRowOnScreen: 3
-
- spacing: space
- visible: pages !== 1
-
- Repeater {
- model: pages
- Image {
- source: index === activePage ? "../res/white_ball.png" : "../res/blue_ball.png"
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PlayPauseButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PlayPauseButton.qml
deleted file mode 100644
index 825884cc1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PlayPauseButton.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file PlayPauseButton.qml
- * @brief Behavior of Play/Pause button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Image {
- id: playPauseButton
- property string sourceOnPressed: ""
- property string sourceOnReleased: ""
-
- signal clicked
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- playPauseButton.source = playPauseButton.sourceOnPressed
- }
- onReleased: {
- playPauseButton.source = playPauseButton.sourceOnReleased
- }
- onClicked: {
- playPauseButton.clicked()
- }
- }
- states: [
- State {
- name: "Play"
- PropertyChanges {
- target: playPauseButton
- source: "../res/buttons/player_play_btn.png"
- sourceOnPressed: "../res/buttons/player_play_pressed_btn.png"
- sourceOnReleased: "../res/buttons/player_pause_btn.png"
- }
- },
-
- State {
- name: "Pause"
- PropertyChanges {
- target: playPauseButton
- source: "../res/buttons/player_pause_btn.png"
- sourceOnPressed: "../res/buttons/player_pause_pressed_btn.png"
- sourceOnReleased: "../res/buttons/player_play_btn.png"
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PowerSwitchButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PowerSwitchButton.qml
deleted file mode 100644
index 2027e1f59..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PowerSwitchButton.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file PowerSwitchBtn.qml
- * @brief On/Off button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: powerSwitchBtn
- state: "Turn ON"
- width: 120
- height: 80
- radius: 5
- property bool pressed;
-
- gradient: Gradient {
- GradientStop { position: pressed ? 1.0 : 0.0; color: "#2c2c2c" }
- GradientStop { position: pressed ? 0.0 : 1.0; color: "black" }
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.pressed = true
- }
- onReleased: {
- parent.pressed = false
- parent.state = parent.state === "Turn ON" ? "Turn OFF" : "Turn ON"
- btnText.text = parent.state
- if (parent.state === "Turn OFF") {
- contentLoader.reset()
- mainScreen.visible = true
- warningInfo.showOkButton()
- }
- }
- }
-
- Text {
- id: btnText
- color: "red"
- text: parent.state
- anchors.centerIn: parent
- font.pixelSize: Constants.powerButtonFornSize
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PresetRow.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PresetRow.qml
deleted file mode 100644
index 1454ed812..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PresetRow.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * @file PresetRow.qml
- * @brief Animated row with radio stations.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- id: presetRow
- height: childrenRect.height
- property variant presets: []
- property int selectedIndex: 0
- signal presetSelected
- signal presetButtonPressed()
- signal presetButtonReleased()
- signal presetButtonClicked()
- signal presetButtonHold()
-
- Image {
- id: circleButton
- source: "../res/buttons/preset_pressed_btn.png"
- visible: false
- enabled: false
- }
-
- PagedFlickable {
- width: parent.width
- spacing: (width - (circleButton.width * 4)) / 3
- snapTo: spacing + circleButton.width
- elementWidth: circleButton.width
-
- Repeater {
- model: presetRow.presets.length
- delegate:
- Column {
- width: circleButton.width
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- source: presetRow.selectedIndex === index ? "../res/buttons/preset_pressed_btn.png" : "../res/buttons/preset_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- presetRow.selectedIndex = index;
- presetButtonPressed()
- }
- onReleased: {
- presetRow.selectedIndex = index;
- presetButtonReleased()
- }
- onClicked: {
- presetRow.selectedIndex = index
- presetButtonClicked()
- }
- onPressAndHold: {
- presetRow.selectedIndex = index;
- presetButtonHold()
- }
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- text: index + 1
- font.pixelSize: Constants.fontSize
- color: presetRow.selectedIndex === index ? Constants.secondaryColor : Constants.primaryColor
- }
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: presetRow.presets[index]
- font.pixelSize: Constants.fontSize
- color: "white"
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PushButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PushButton.qml
deleted file mode 100644
index 36ee9bbb3..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/PushButton.qml
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * @file PushButton.qml
- * @brief Simple button
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Rectangle {
- id: toggleButton
- width: 160
- height: 40
- radius: 2
- border.width: 2
- border.color: "#000000"
- gradient: grUnpressed
-
- property alias label : label.text
-
- signal pressed()
- signal unpressed()
- signal clicked()
-
- property bool toggleMode: false
-
- state: "unpressed"
- onStateChanged: {
- if (state == "pressed") {
- pressed();
- } else {
- unpressed();
- }
- }
-
- Text {
- id: label
- color: "white"
- text: "PushButton"
- font.pixelSize: 18
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.fill: parent
- }
- MouseArea {
- id: mouseArea
-
- anchors.fill: parent
- onPressed: {
- if (toggleMode) {
- if (parent.state == "unpressed") {
- parent.state = "pressed"
- } else {
- parent.state = "unpressed"
- }
- } else {
- parent.state = "pressed"
- }
- }
- onReleased: {
- if (!toggleMode) {
- parent.state = "unpressed"
- if (mouse.isClick) {
- parent.clicked()
- }
- }
- }
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: toggleButton
- gradient: grPressed
- }
- },
- State {
- name: "unpressed"
- PropertyChanges {
- target: toggleButton
- gradient: grUnpressed
- }
- }
- ]
-
- Gradient {
- id: grUnpressed
-
- GradientStop { position: 0.0; color: "#2c2c2c" }
- GradientStop { position: 1.0; color: "#0c0c0c" }
- }
-
- Gradient {
- id: grPressed
-
- GradientStop { position: 0.0; color: "black" }
- GradientStop { position: 1.0; color: "black" }
- }
-
- transitions: [
- Transition {
- from: "unpressed"
- to: "pressed"
- reversible: true
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableListView.qml
deleted file mode 100644
index cc26c8727..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableListView.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @file ScrollableListView.qml
- * @brief ListView with scrollbar on the right
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-ListView {
- clip: true
-
- Rectangle {
- visible: parent.height < parent.contentHeight
- anchors.right: parent.right
- y: parent.visibleArea.yPosition * parent.height
- width: Constants.scrollBarWidth
- height: parent.visibleArea.heightRatio * parent.height
- color: Constants.primaryColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableText.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableText.qml
deleted file mode 100644
index 82f568414..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/ScrollableText.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file ScrollableText.qml
- * @brief Text with scrollers if text more than zone
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- property alias text: text.text
- clip: true
-
- Flickable {
- id: flickable
- anchors.fill: parent
- contentWidth: text.width
- contentHeight: text.height
-
- Text {
- id: text
- color: Constants.popUpBorderColor
- font.pixelSize: Constants.ttsFontSize
- }
- }
- Rectangle {
- visible: flickable.height < flickable.contentHeight
- anchors.right: flickable.right
- y: flickable.visibleArea.yPosition * flickable.height
- width: Constants.scrollBarWidth
- height: flickable.visibleArea.heightRatio * flickable.height
- color: Constants.popUpBorderColor
- }
- Rectangle {
- visible: flickable.width < flickable.contentWidth
- anchors.bottom: flickable.bottom
- x: flickable.visibleArea.xPosition * flickable.width
- height: Constants.scrollBarWidth
- width: flickable.visibleArea.widthRatio * flickable.width
- color: Constants.popUpBorderColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.js b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.js
deleted file mode 100644
index 227f63836..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file SoftButton.js
- * @brief Soft button view constants
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-.pragma library
-
-var Action = {
- doOnClicked: 0,
- doOnReleased: 1
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.qml
deleted file mode 100644
index b92cd5126..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/SoftButton.qml
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * @file SoftButton.qml
- * @brief Soft button view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "SoftButton.js" as SoftButton
-
-OvalButton {
- property variant button
- property int appId
- visible: !!button
-
- signal defaultAction;
- signal stealFocus;
- signal keepContext;
-
- property int actionOrder: SoftButton.Action.doOnClicked
-
- highlighted: button ? button.isHighlighted : false
- onPressed: {
- actionOrder = SoftButton.Action.doOnClicked
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, button.softButtonID)
- }
-
- onReleased: {
- if (actionOrder === SoftButton.Action.doOnReleased) {
- switch (button.systemAction) {
- case Common.SystemAction.DEFAULT_ACTION:
- defaultAction();
- break;
- case Common.SystemAction.STEAL_FOCUS:
- if (dataContainer.currentApplication.isMediaApplication) {
- contentLoader.go("views/SDLPlayerView.qml", appId);
- } else {
- contentLoader.go("views/SDLNonMediaView.qml", appId);
- }
- stealFocus();
- break;
- case Common.SystemAction.KEEP_CONTEXT:
- keepContext();
- break;
- }
- }
-
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, button.softButtonID)
- }
-
- onClicked: {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, button.softButtonID);
- switch (button.systemAction) {
- case Common.SystemAction.DEFAULT_ACTION:
- defaultAction();
- break;
- case Common.SystemAction.STEAL_FOCUS:
- if (dataContainer.currentApplication.isMediaApplication) { contentLoader.go("views/SDLPlayerView.qml", appId); }
- else { contentLoader.go("views/SDLNonMediaView.qml", appId); }
- stealFocus();
- break;
- case Common.SystemAction.KEEP_CONTEXT:
- keepContext();
- break;
- }
- }
-
- onPressAndHold: {
- actionOrder = SoftButton.Action.doOnReleased; // action should be triggered on release
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, button.softButtonID);
- }
-
- onButtonChanged: {
- icon = button && button.type !== Common.SoftButtonType.SBT_TEXT ? button.image : undefined;
- text = button && button.type !== Common.SoftButtonType.SBT_IMAGE ? button.text : ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/StatusBar.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/StatusBar.qml
deleted file mode 100644
index a6d7640f3..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/controls/StatusBar.qml
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @file StatusBar.qml
- * @brief Status bar that contains text string.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Text {
- text: dataContainer.currentApplication.hmiUIText.statusBar
- color: Constants.primaryColor
- font.pixelSize: Constants.statusBarFontSize
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js
deleted file mode 100644
index ebc5bfa3c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js
+++ /dev/null
@@ -1,7 +0,0 @@
-.pragma library
-
-var async_uid = 1;
-
-function AsyncCall() {
- this.__async_uid = async_uid++;
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml
deleted file mode 100644
index 9d7e0432f..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * @file BasicCommunication.qml
- * @brief Implement of interface Basic Communication.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Item {
- function updateDeviceList (deviceList) {
- dataContainer.deviceList.clear();
- for(var i = 0; i < deviceList.length; i++) {
- dataContainer.deviceList.append({ name: deviceList[i].name, devid: deviceList[i].id })
- }
- }
-
- function updateAppList (applications) {
- dataContainer.applicationList.clear();
- for(var i = 0; i < applications.length; i++) {
- dataContainer.applicationList.append({
- appName: applications[i].appName,
- ngnMediaScreenAppName: applications[i].ngnMediaScreenAppName,
- icon: applications[i].icon,
- deviceName: applications[i].deviceName,
- appId: applications[i].appID,
- hmiDisplayLanguageDesired: applications[i].hmiDisplayLanguageDesired,
- isMediaApplication: applications[i].isMediaApplication,
- appType: applications[i].appType
- });
- }
- }
-
- function allowDeviceToConnect (device) {
- return {
- allow: true
- }
- }
-
- function mixingAudioSupported() {
- return {
- attenuatedSupport: true
- }
- }
-
- function allowAllApps() {
- return {
- allowed: true
- }
- }
-
- function allowApp(app, appPermissions) {
- return {
- allowed: true
- }
- }
-
- function activateApp() {
- contentLoader.go("views/SDLPlayerView.qml", appID);
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml
deleted file mode 100644
index 83ea933ed..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file Buttons.qml
- * @brief Implement of interface Buttons.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-Item
-{
- function getCapabilities()
- {
- return {
- capabilities: settingsContainer.buttonCapabilities,
- presetBankCapabilities: {
- onScreenPresetsAvailable: true
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml
deleted file mode 100644
index 3ec131c8c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @file Navigation.qml
- * @brief Navigation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "Common.js" as Common
-
-Item {
- function isReady () {
- return {
- available: dataContainer.hmiNavigationAvailable
- }
- }
-
- function showConstantTBT(navigationTexts, turnIcon, nextTurnIcon, distanceToManeuver,
- distanceToManeuverScale, maneuverComplete,
- softButtons, appID) {
- console.debug("enter")
- navigationTexts.forEach(fillTexts);
- dataContainer.navigationModel.turnIcon = turnIcon ? turnIcon.value : ""
- dataContainer.navigationModel.nextTurnIcon = nextTurnIcon ? nextTurnIcon.value : ""
- dataContainer.navigationModel.distanceToManeuver = distanceToManeuver;
- dataContainer.navigationModel.distanceToManeuverScale = distanceToManeuverScale;
- if (maneuverComplete !== undefined) {
- dataContainer.navigationModel.maneuverComplete = maneuverComplete;
- }
- if (softButtons !== undefined) {
- dataContainer.navigationModel.softButtons.clear();
- softButtons.forEach(fillSoftButtons, dataContainer.navigationModel.softButtons);
- }
- dataContainer.navigationModel.appId = appID;
- contentLoader.go("./views/TurnByTurnView.qml");
- console.debug("exit")
- }
-
- function alertManeuver(softButtons) {
- console.debug("enter")
- if (softButtons !== undefined) {
- dataContainer.navigationModel.alertManeuverSoftButtons.clear();
- softButtons.forEach(fillSoftButtons, dataContainer.navigationModel.alertManeuverSoftButtons);
- }
- console.debug("exit")
- }
-
- function updateTurnList(turnList, softButtons, appID) {
- console.debug("enter")
- if (turnList !== undefined) {
- dataContainer.getApplication(appID).turnList.clear();
- turnList.forEach(fillTurnList, dataContainer.getApplication(appID).turnList);
- }
- if (softButtons !== undefined) {
- dataContainer.getApplication(appID).turnListSoftButtons.clear();
- softButtons.forEach(fillSoftButtons, dataContainer.getApplication(appID).turnListSoftButtons);
- }
- dataContainer.navigationModel.appId = appID;
- console.debug("exit")
- }
-
- function fillTexts(element, index, array) {
- switch (element.fieldName) {
- case Common.TextFieldName.navigationText1:
- dataContainer.navigationModel.text1 = element.fieldText;
- break;
- case Common.TextFieldName.navigationText2:
- dataContainer.navigationModel.text2 = element.fieldText;
- break;
- case Common.TextFieldName.ETA:
- dataContainer.navigationModel.eta = element.fieldText;
- break;
- case Common.TextFieldName.totalDistance:
- dataContainer.navigationModel.totalDistance = element.fieldText;
- break;
- case Common.TextFieldName.timeToDestination:
- dataContainer.navigationModel.timeToDestination = element.fieldText;
- break;
- }
- }
-
- function fillSoftButtons(element, index, array) {
- this.append({
- type: element.type,
- text: element.text,
- image: element.image,
- isHighlighted: element.isHighlighted,
- buttonId: element.softButtonID,
- systemAction: element.systemAction
- });
- }
-
- function fillTurnList(element, index, array) {
- this.append({
- navigationText: element.navigationText,
- turnIcon: element.turnIcon
- });
- console.debug(element.navigationText)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml
deleted file mode 100644
index 96aa9b2c2..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "Common.js" as Common
-import "Async.js" as Async
-
-Item {
- function isReady() {
- return {
- available: dataContainer.hmiTTSAvailable
- }
- }
-
- function speak(ttsChunks, appID) {
- // appID unused
- console.debug('enter:', ttsChunks, appID);
- if (ttsPopUp.async) {
- console.log('speak send abort');
- throw Common.Result.ABORTED;
- }
-
- var message = ttsChunks.map(function(str) { return str.text }).join('\n');
- ttsPopUp.activate(message);
- ttsPopUp.async = new Async.AsyncCall();
- console.debug('exit');
- return ttsPopUp.async;
- }
-
- function stopSpeaking() {
- console.debug("enter");
- ttsPopUp.deactivate();
- console.debug("exit");
- }
-
- function getLanguage() {
- return {
- language: dataContainer.hmiTTSVRLanguage
- }
- }
-
- function getSupportedLanguages() {
- return {
- languages: settingsContainer.sdlLanguagesList
- }
- }
-
- function getCapabilities() {
- return {
- capabilities: Common.SpeechCapabilities.SC_TEXT
- }
- }
-
- function changeRegistration(language, appID) {
- console.debug("enter:", language, appID);
- dataContainer.changeRegistrationTTSVR(language, appID);
- console.debug("exit");
- }
-
- function setGlobalProperties(helpPrompt, timeoutPrompt, appID) {
- console.debug("enter: " + helpPrompt + ", " + timeoutPrompt + ", " + appID)
-
- var newHelpPropmt = helpPrompt ?
- helpPrompt.map(
- function (structure) {
- return structure.text
- }
- ).join(", ") :
- dataContainer.currentApplication.helpPrompt
-
- var newTimeoutPrompt = timeoutPrompt ?
- timeoutPrompt.map(
- function (structure) {
- return structure.text
- }
- ).join(", ") :
- dataContainer.currentApplication.timeoutPrompt
-
- dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, {
- helpPrompt: newHelpPropmt,
- timeoutPrompt: newTimeoutPrompt
- })
- console.debug("exit")
- }
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml
deleted file mode 100644
index 648cd1397..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml
+++ /dev/null
@@ -1,449 +0,0 @@
-/**
- * @file UI.qml
- * @brief UI interface implementation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "Common.js" as Common
-import "Async.js" as Async
-import "../models/Internal.js" as Internal
-
-Item {
- function filter (strings, fields) {
- console.debug("enter")
-// substrings for each allowed field
- var fieldSubstrings = {}
-// this cycle concatenates allowed lines sorting them by field
- for (var stringIndex = 0; stringIndex < strings.length; ++stringIndex) {
- for (var fieldIndex = 0; fieldIndex < fields.length; ++fieldIndex) {
- var fieldName = strings[stringIndex].fieldName
- if (fieldName === fields[fieldIndex]) {
- if (fieldSubstrings[fieldName] !== undefined) {
- fieldSubstrings[fieldName] += "\n";
- fieldSubstrings[fieldName] += strings[stringIndex].fieldText
- }
- else {
- fieldSubstrings[fieldName] = strings[stringIndex].fieldText
- }
- }
- }
- }
- console.debug("exit")
- return fieldSubstrings
- }
-
- function alert (alertStrings, duration, softButtons, progressIndicator, appID) {
- var fieldSubstrings = alertStrings
- .sort(function(a, b) { return a.fieldName - b.fieldName }) // sorting by fieldName
- .map(function(val) { return val.fieldText }); // mapping to array of strings
-
- var tryAgainTime = alertWindow.alert(fieldSubstrings, duration, progressIndicator, softButtons, appID)
- if (tryAgainTime === undefined) {
- alertWindow.async = new Async.AsyncCall();
- return alertWindow.async;
- }
- else {
- return {
- "__retCode": Common.Result.REJECTED,
- "tryAgainTime": tryAgainTime
- }
- }
- }
-
- function show (showStrings, alignment, graphic, softButtons, customPresets, appID) {
- console.debug("enter: " + showStrings + ", " + alignment + ", " + graphic + ", "+ softButtons + ", " + customPresets + ", " + appID)
- var app = dataContainer.getApplication(appID);
-
- if (softButtons) {
- app.softButtons.clear()
- softButtons.forEach(function(x) { app.softButtons.append(x); });
- }
-
- if (customPresets) {
- app.customPresets.clear()
- customPresets.forEach( function(x) { app.customPresets.append( {text: x} ); } )
- }
-
- var textAlignment
- switch (alignment) {
- case Common.TextAlignment.LEFT_ALIGNED:
- textAlignment = Text.AlignLeft
- break;
- case Common.TextAlignment.RIGHT_ALIGNED:
- textAlignment = Text.AlignRight
- break;
- case Common.TextAlignment.CENTERED:
- textAlignment = Text.AlignHCenter
- break;
- default:
- textAlignment = Text.AlignHCenter
- break;
- }
-
- // with this array we grab only the lines we need
- var showFields = [
- Common.TextFieldName.mainField1,
- Common.TextFieldName.mainField2,
- Common.TextFieldName.mainField3,
- Common.TextFieldName.mainField4,
- Common.TextFieldName.statusBar,
- Common.TextFieldName.mediaClock,
- Common.TextFieldName.mediaTrack
- ]
- var fieldSubstrings = filter(showStrings, showFields)
- var showData = { hmiUIText: {} }
- if (fieldSubstrings[Common.TextFieldName.mainField1] !== undefined) { showData.hmiUIText.mainField1 = fieldSubstrings[Common.TextFieldName.mainField1]; }
- if (fieldSubstrings[Common.TextFieldName.mainField2] !== undefined) { showData.hmiUIText.mainField2 = fieldSubstrings[Common.TextFieldName.mainField2]; }
- if (fieldSubstrings[Common.TextFieldName.mainField3] !== undefined) { showData.hmiUIText.mainField3 = fieldSubstrings[Common.TextFieldName.mainField3]; }
- if (fieldSubstrings[Common.TextFieldName.mainField4] !== undefined) { showData.hmiUIText.mainField4 = fieldSubstrings[Common.TextFieldName.mainField4]; }
- if (fieldSubstrings[Common.TextFieldName.statusBar] !== undefined) { showData.hmiUIText.statusBar = fieldSubstrings[Common.TextFieldName.statusBar]; }
- if (fieldSubstrings[Common.TextFieldName.mediaTrack] !== undefined) { showData.hmiUIText.mediaTrack = fieldSubstrings[Common.TextFieldName.mediaTrack]; }
- if (graphic) { showData.hmiUIText.image = graphic.value; }
- if (textAlignment) { showData.hmiUITextAlignment = textAlignment; }
- if (fieldSubstrings[Common.TextFieldName.mediaClock]) {
- showData.mediaClock = {
- "updateMode": Internal.MediaClockUpdateMode.MCU_COUNTUP,
- "runningMode": Internal.MediaClockRunningMode.MCR_STOPPED,
- "magic": Internal.stringToHmsTime(fieldSubstrings[Common.TextFieldName.mediaClock]),
- "total": 0
- }
- }
-
- dataContainer.setApplicationProperties(appID, showData);
- console.debug("exit")
- }
-
- function addCommand (cmdID, menuParams, cmdIcon, appID) {
- dataContainer.addCommand(cmdID, menuParams, cmdIcon, appID)
- }
-
- function deleteCommand (cmdID, appID) {
- dataContainer.deleteCommand(cmdID, appID)
- }
-
- function addSubMenu (menuID, menuParams, appID) {
- dataContainer.addSubMenu(menuID, menuParams, appID)
- }
-
- function deleteSubMenu (menuID, appID) {
- dataContainer.deleteSubMenu(menuID, appID)
- }
-
- function performInteraction (initialText, choiceSet, vrHelp, timeout, appID) {
- console.debug("enter")
- var async = dataContainer.interactionModel.performInteraction(initialText, choiceSet, vrHelp, timeout, appID)
- console.debug("exit")
- return async
- }
-
- function setMediaClockTimer (startTime, endTime, updateMode, appID) {
- console.debug("enter: {", startTime, ", ", endTime, ", ", updateMode, ", ", appID, "}")
-
- var app = dataContainer.getApplication(appID)
- var newStartTime
- var newEndTime
- var newUpdateMode
- var newRunningMode
- var newStartTimeForProgress
- var resultCode
- var sendErrorResponce = false
-
- switch (updateMode) {
- case Common.ClockUpdateMode.COUNTUP:
- if (startTime === undefined) {
- resultCode = Common.Result.INVALID_DATA
- sendErrorResponce = true
- break
- }
- newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
- newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTUP
- newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.COUNTDOWN:
- if (startTime === undefined) {
- resultCode = Common.Result.INVALID_DATA
- sendErrorResponce = true
- break
- }
- newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
- newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTDOWN
- newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.PAUSE:
- // Already paused or cleared
- if ((app.mediaClock.runningMode === Internal.MediaClockRunningMode.MCR_STOPPED)
- || (app.mediaClock.startTime === -1 && app.mediaClock.endTime === -1)) {
- resultCode = Common.Result.IGNORED
- sendErrorResponce = true
- break
- }
- newStartTime = app.mediaClock.startTime
- newEndTime = app.mediaClock.endTime
- newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- newUpdateMode = app.mediaClock.updateMode
- newStartTimeForProgress = app.mediaClock.startTime
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.RESUME:
- // Already resumed or cleared
- if ((app.mediaClock.runningMode === Internal.MediaClockRunningMode.MCR_RUNNING)
- || (app.mediaClock.startTime === -1 && app.mediaClock.endTime === -1)) {
- resultCode = Common.Result.IGNORED
- sendErrorResponce = true
- break
- }
- newStartTime = app.mediaClock.startTime
- newEndTime = app.mediaClock.endTime
- newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = app.mediaClock.startTime
- newUpdateMode = app.mediaClock.updateMode
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.CLEAR:
- newStartTime = -1
- newEndTime = -1
- newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- newUpdateMode = app.mediaClock.updateMode
- newStartTimeForProgress = -1
- resultCode = Common.Result.SUCCESS
- break
- }
-
- if (sendErrorResponce) {
- console.debug("exit with result code: ", resultCode)
- return { __retCode: resultCode }
- }
-
- dataContainer.setApplicationProperties(appID, {
- "mediaClock": {
- "updateMode": newUpdateMode,
- "runningMode": newRunningMode,
- "startTime": newStartTime,
- "endTime": newEndTime,
- "startTimeForProgress": newStartTimeForProgress
- }
- })
-
- console.debug("exit")
- return { __retCode: resultCode }
- }
-
- function setGlobalProperties (vrHelpTitle, vrHelp, menuTitle, menuIcon, keyboardProperties, appID) {
- console.debug("enter: " + vrHelpTitle + ", " + vrHelp + ", " + menuTitle + ", " + menuIcon + ", " + keyboardProperties + ", " + appID)
- if (vrHelpTitle) {
- vrHelpPopup.title = vrHelpTitle
- }
- dataContainer.setVrHelp(vrHelp)
- console.debug("exit")
- }
-
- function showVrHelp (vrHelpTitle, vrHelp, appID) {
- console.debug("enter: " + vrHelpTitle + ", " + vrHelp + ", " + appID)
- if (vrHelpTitle) {
- vrHelpPopup.title = vrHelpTitle
- }
- dataContainer.setVrHelp(vrHelp)
- vrHelpPopup.show()
- console.debug("exit")
- }
-
- function isReady () {
- return {
- available: dataContainer.hmiUIAvailable
- }
- }
-
- function getLanguage () {
- return {
- language: dataContainer.hmiUILanguage
- }
- }
-
- function getSupportedLanguages () {
- return {
- languages: settingsContainer.sdlLanguagesList
- }
- }
-
- function changeRegistration (language, appID) {
- dataContainer.changeRegistrationUI(language, appID)
- }
-
- function setAppIcon (syncFileName, appID) {
- dataContainer.setApplicationProperties(appID, { icon: syncFileName.value })
- }
-
- function slider (numTicks, position, sliderHeader, sliderFooter, timeout, appID) {
- console.debug("enter", numTicks, position, sliderHeader, sliderFooter, timeout, appID)
- if (dataContainer.uiSlider.running) {
- console.debug("aborted")
- return {__retCode: Common.Result.ABORTED, sliderPosition: position}
- }
-
- dataContainer.uiSlider.appName = dataContainer.getApplication(appID).appName
- dataContainer.uiSlider.header = sliderHeader
- dataContainer.uiSlider.footer = sliderFooter
- dataContainer.uiSlider.numTicks = numTicks
- dataContainer.uiSlider.position = position
- dataContainer.uiSlider.timeout = timeout
-
- if (timeout !== 0) {
- sliderPopup.showSlider()
- sliderPopup.async = new Async.AsyncCall();
- console.debug("exit")
- return sliderPopup.async;
- } else {
- return { sliderPosition: position }
- }
- }
-
- function scrollableMessage (messageText, timeout, softButtons, appID) {
- console.debug("scrollableMessage ", messageText, timeout, softButtons, appID)
- if(dataContainer.scrollableMessageModel.running){
- //send error response if long message already running
- console.debug("scrollableMessage throw")
- throw Common.Result.ABORTED
- }
-
- dataContainer.scrollableMessageModel.longMessageText = messageText.fieldText
- dataContainer.scrollableMessageModel.softButtons.clear();
- if (softButtons !== undefined) {
- softButtons.forEach(fillSoftButtons, dataContainer.scrollableMessageModel.softButtons);
- }
- dataContainer.scrollableMessageModel.timeout = timeout
- dataContainer.scrollableMessageModel.appId = appID
- dataContainer.scrollableMessageModel.async = new Async.AsyncCall()
- contentLoader.go("./views/ScrollableMessageView.qml")
- console.debug("scrollableMessage exit")
- return dataContainer.scrollableMessageModel.async
- }
-
- function getCapabilities() {
- return {
- "audioPassThruCapabilities": {
- "samplingRate": Common.SamplingRate.RATE_44KHZ,
- "bitsPerSample": Common.BitsPerSample.RATE_8_BIT,
- "audioType": Common.AudioType.PCM
- },
- "displayCapabilities": settingsContainer.displayCapabilities,
- "hmiZoneCapabilities": Common.HmiZoneCapabilities.FRONT,
- "softButtonCapabilities": settingsContainer.softButtonCapabilities
- }
- }
-
- function performAudioPassThru (audioPassThruDisplayTexts, timeout, appID) {
- console.debug("enter", audioPassThruDisplayTexts, timeout)
-
- if (dataContainer.uiAudioPassThru.running) {
- console.debug("aborted")
- throw Common.Result.ABORTED
- }
-
- dataContainer.uiAudioPassThru.appName = dataContainer.getApplication(appID).appName
- dataContainer.uiAudioPassThru.timeout = timeout
- if (audioPassThruDisplayTexts.length === 2) {
- dataContainer.uiAudioPassThru.firstLine = audioPassThruDisplayTexts[0].fieldText
- dataContainer.uiAudioPassThru.secondLine = audioPassThruDisplayTexts[1].fieldText
- }
- performAudioPassThruPopup.async = new Async.AsyncCall();
- performAudioPassThruPopup.showAudioPassThru()
- console.debug("exit")
- return performAudioPassThruPopup.async;
- }
-
- function endAudioPassThru () {
- console.debug("enter")
- if (!dataContainer.uiAudioPassThru.running) {
- console.debug("rejected")
- throw Common.Result.REJECTED
- }
- DBus.sendReply({__retCode: Common.Result.SUCCESS})
- performAudioPassThruPopup.complete(Common.Result.SUCCESS)
- console.debug("exit")
- }
-
- function closePopUp (methodName) {
- console.debug("enter")
- var popUpToClose
-
- if (dataContainer.activePopup.length === 0) {
- return { __retCode: Common.Result.ABORT, __message: "No active PopUps"}
- }
-
- if (methodName !== undefined) {
- popUpToClose = methodName
- } else {
- popUpToClose = dataContainer.activePopup[dataContain.activePopUp.length - 1]
- }
-
- switch (popUpToClose) {
- case "UI.PerformInteraction":
- interactionPopup.complete(Common.Result.SUCCESS)
- break
- case "UI.Slider":
- sliderPopup.complete(Common.Result.SUCCESS)
- break
- case "UI.PerformAudioPassThru":
- performAudioPassThruPopup.complete(Common.Result.SUCCESS)
- break
- case "UI.Alert":
- alertWindow.complete(Common.Result.SUCCESS)
- break
- case "UI.VrHelp":
- vrHelpPopup.complete(Common.Result.SUCCESS)
- break
- }
- console.debug("exit")
- }
-
- function fillSoftButtons(element, index, array) {
- this.append({
- type: element.type,
- text: element.text,
- image: element.image,
- isHighlighted: element.isHighlighted,
- softButtonID: element.softButtonID,
- systemAction: element.systemAction
- });
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml
deleted file mode 100644
index 37d19f6a4..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @file VR.qml
- * @brief Implement of interface VR.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "Common.js" as Common
-
-Item {
- function isReady() {
- return {
- available: dataContainer.hmiVRAvailable
- }
- }
-
- function addCommand(cmdID, vrCommands, appID) {
- console.log("VR.AddCommand: cmd ", cmdID, ", app ", appID);
- for (var i = 0; i < vrCommands.length; ++i) {
- dataContainer.vrCommands.append({
- cmdID: cmdID,
- command: vrCommands[i],
- appID: appID === undefined ? 0 : appID,
- });
- }
- console.log("exit")
- }
-
- function deleteCommand(cmdID, appID) {
- console.log("VR.DeleteCommand: cmd ", cmdID, ", app ", appID);
- for (var i = 0; i < dataContainer.vrCommands.count; ) {
- if ((dataContainer.vrCommands.get(i).cmdID === cmdID) &&
- ((appID === undefined) || (dataContainer.vrCommands.get(i).appID === appID))) {
- dataContainer.vrCommands.remove(i);
- continue;
- }
- ++i;
- }
- console.log("exit")
- }
-
- function getLanguage() {
- return {
- language: dataContainer.hmiTTSVRLanguage
- }
- }
-
- function getSupportedLanguages() {
- return {
- languages: settingsContainer.sdlLanguagesList
- }
- }
-
- function getCapabilities() {
- return {
- vrCapabilities: [ Common.VrCapabilities.VR_TEXT ]
- }
- }
-
- function changeRegistration(language, appID) {
- console.debug("enter:", language, appID);
- dataContainer.changeRegistrationTTSVR(language, appID);
- console.debug("exit");
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml
deleted file mode 100644
index 18f3a1ce9..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml
+++ /dev/null
@@ -1,749 +0,0 @@
-/**
- * @file VehicleInfo.qml
- * @brief Vehicle information interface realisation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "Common.js" as Common
-
-Item {
- function isReady () {
- return {
- available: dataContainer.hmiVehicleInfoAvailable
- }
- }
-
- function getVehicleType() {
- return {
- "vehicleType": {
- "make": "Ford",
- "model": "Fiesta",
- "modelYear": "2013",
- "trim": "SE"
- }
- }
- }
-
- function getGpsData(appID) {
- console.debug("enter")
- console.debug("exit")
- return { gps: dataContainer.vehicleInfoModel.gps }
- }
-
- function getSpeed(appID) {
- console.debug("enter")
- console.debug("exit")
- return { speed: dataContainer.vehicleInfoModel.speed }
- }
-
- function getRpm(appID) {
- console.debug("enter")
- console.debug("exit")
- return {
- rpm: dataContainer.vehicleInfoModel.rpm,
- __retCode: Common.Result.DATA_NOT_AVAILABLE
- }
- }
-
- function getFuelLevel(appID) {
- console.debug("enter")
- console.debug("exit")
- return { fuelLevel: dataContainer.vehicleInfoModel.fuelLevel }
- }
-
- function getFuelLevelState(appID) {
- console.debug("enter")
- console.debug("exit")
- return { fuelLevel_State: dataContainer.vehicleInfoModel.fuelLevel_State }
- }
-
- function getInstantFuelConsumption(appID) {
- console.debug("enter")
- console.debug("exit")
- return { instantFuelConsumption: dataContainer.vehicleInfoModel.instantFuelConsumption }
- }
-
- function getExternalTemperature(appID) {
- console.debug("enter")
- console.debug("exit")
- return { externalTemperature: dataContainer.vehicleInfoModel.externalTemperature }
- }
-
- function getVin(appID) {
- console.debug("enter")
- console.debug("exit")
- return { vin: dataContainer.vehicleInfoModel.vin }
- }
-
- function getPrndl(appID) {
- console.debug("enter")
- if (dataContainer.vehicleInfoModel.prndl === -1) { // Test value, to check response
- console.debug("exit")
- return {
- prndl: dataContainer.vehicleInfoModel.prndl,
- __retCode: Common.Result.DATA_NOT_AVAILABLE
- }
- }
- console.debug("exit")
- return { prndl: dataContainer.vehicleInfoModel.prndl }
- }
-
- function getTirePressure(appID) {
- console.debug("enter")
- console.debug("exit")
- return { tirePressure: dataContainer.vehicleInfoModel.tirePressure }
- }
-
- function getOdometer(appID) {
- console.debug("enter")
- console.debug("exit")
- return { odometer: dataContainer.vehicleInfoModel.odometer }
- }
-
- function getBeltStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { beltStatus: dataContainer.vehicleInfoModel.beltStatus }
- }
-
- function getBodyInformation(appID) {
- console.debug("enter")
- console.debug("exit")
- return { bodyInformation: dataContainer.vehicleInfoModel.bodyInformation }
- }
-
- function getDeviceStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { deviceStatus: dataContainer.vehicleInfoModel.deviceStatus }
- }
-
- function getDriverBraking(appID) {
- console.debug("enter")
- console.debug("exit")
- return { driverBraking: dataContainer.vehicleInfoModel.driverBraking }
- }
-
- function getWiperStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { wiperStatus: dataContainer.vehicleInfoModel.wiperStatus }
- }
-
- function getHeadLampStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { headLampStatus: dataContainer.vehicleInfoModel.headLampStatus }
- }
-
- function getEngineTorque(appID) {
- console.debug("enter")
- console.debug("exit")
- return { engineTorque: dataContainer.vehicleInfoModel.engineTorque }
- }
-
- function getAccPedalPosition(appID) {
- console.debug("enter")
- console.debug("exit")
- return { accPedalPosition: dataContainer.vehicleInfoModel.accPedalPosition }
- }
-
- function getSteeringWheelAngle(appID) {
- console.debug("enter")
- console.debug("exit")
- return { steeringWheelAngle: dataContainer.vehicleInfoModel.steeringWheelAngle }
- }
-
- function getECallInfo(appID) {
- console.debug("enter")
- console.debug("exit")
- return { eCallInfo: dataContainer.vehicleInfoModel.eCallInfo }
- }
-
- function getAirbagStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { airbagStatus: dataContainer.vehicleInfoModel.airbagStatus }
- }
-
- function getEmergencyEvent(appID) {
- console.debug("enter")
- console.debug("exit")
- return { emergencyEvent: dataContainer.vehicleInfoModel.emergencyEvent }
- }
-
- function getClusterModeStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { clusterModeStatus: dataContainer.vehicleInfoModel.clusterModeStatus }
- }
-
- function getMyKey(appID) {
- console.debug("enter")
- console.debug("exit")
- return { myKey: dataContainer.vehicleInfoModel.myKey }
- }
-
- function getDTCs(ecuName, dtcMask, appID) {
- var ecuHeader = 2
- var dtc = []
-
- for (var i = 0; i < 3; i++) {
- dtc.push("line" + i)
- }
- return {ecuHeader: ecuHeader, dtc: dtc}
- }
-
- function readDID(ecuName, didLocation, appID) {
- console.debug("Enter")
- //TODO{ALeshin}: refactoring of this function, when we'll have Vehicle Info module
- var didResult = []
-
- for (var i = 0; i < didLocation.length; i++) {
- if (i < 10) {
- didResult[i] = {}
- didResult[i].resultCode = Common.VehicleDataResultCode.VDRC_SUCCESS
- didResult[i].didLocation = didLocation[i]
- didResult[i].data = '0'
- }
- else {
- didResult[i] = {}
- didResult[i].resultCode = Common.VehicleDataResultCode.VDRC_DATA_NOT_AVAILABLE
- didResult[i].didLocation = didLocation[i]
- didResult[i].data = '0'
- }
- }
- console.debug("Exit")
- return {didResult: didResult}
- }
-
- function subscribeGps(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onGpsChanged.disconnect(model.sendGpsChange)
- model.onGpsChanged.connect(model.sendGpsChange)
- console.debug("exit")
- return {gps:
- { dataType: Common.VehicleDataType.VEHICLEDATA_GPS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS} }
- }
- function unsubscribeGps(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onGpsChanged.disconnect(model.sendGpsChange)
- console.debug("exit")
- return {gps:
- { dataType: Common.VehicleDataType.VEHICLEDATA_GPS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS} }
-
- }
-
- function subscribeSpeed(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSpeedChanged.disconnect(model.sendSpeedChange)
- model.onSpeedChanged.connect(model.sendSpeedChange)
- console.debug("exit")
- return { speed:
- { dataType: Common.VehicleDataType.VEHICLEDATA_SPEED,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeSpeed(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSpeedChanged.disconnect(model.sendSpeedChange)
- console.debug("exit")
- return { speed:
- { dataType: Common.VehicleDataType.VEHICLEDATA_SPEED,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeRpm(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onRpmChanged.disconnect(model.sendRpmChange)
- model.onRpmChanged.connect(model.sendRpmChange)
- console.debug("exit")
- return { rpm:
- { dataType: Common.VehicleDataType.VEHICLEDATA_RPM,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeRpm(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onRpmChanged.disconnect(model.sendRpmChange)
- console.debug("exit")
- return { rpm:
- { dataType: Common.VehicleDataType.VEHICLEDATA_RPM,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeFuelLevel(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevelChanged.disconnect(model.sendFuelLevelChange)
- model.onFuelLevelChanged.connect(model.sendFuelLevelChange)
- console.debug("exit")
- return { fuelLevel:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeFuelLevel(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevelChanged.disconnect(model.sendFuelLevelChange)
- console.debug("exit")
- return { fuelLevel:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeFuelLevel_State(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevel_StateChanged.disconnect(model.sendFuelLevel_StateChange)
- model.onFuelLevel_StateChanged.connect(model.sendFuelLevel_StateChange)
- console.debug("exit")
- return { fuelLevel_State:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeFuelLevel_State(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevel_StateChanged.disconnect(model.sendFuelLevel_StateChange)
- console.debug("exit")
- return { fuelLevel_State:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeInstantFuelConsumption(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onInstantFuelConsumptionChanged.disconnect(model.sendInstantFuelConsumptionChange)
- model.onInstantFuelConsumptionChanged.connect(model.sendInstantFuelConsumptionChange)
- console.debug("exit")
- return { instantFuelConsumption:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeInstantFuelConsumption(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onInstantFuelConsumptionChanged.disconnect(model.sendInstantFuelConsumptionChange)
- console.debug("exit")
- return { instantFuelConsumption:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeExternalTemperature(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onExternalTemperatureChanged.disconnect(model.sendExternalTemperatureChange)
- model.onExternalTemperatureChanged.connect(model.sendExternalTemperatureChange)
- console.debug("exit")
- return { externalTemperature:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EXTERNTEMP,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeExternalTemperature(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onExternalTemperatureChanged.disconnect(model.sendExternalTemperatureChange)
- console.debug("exit")
- return { externalTemperature:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EXTERNTEMP,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribePrndl(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onPrndlChanged.disconnect(model.sendPrndlChange)
- model.onPrndlChanged.connect(model.sendPrndlChange)
- console.debug("exit")
- return { prndl:
- { dataType: Common.VehicleDataType.VEHICLEDATA_PRNDL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribePrndl(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onPrndlChanged.disconnect(model.sendPrndlChange)
- console.debug("exit")
- return { prndl:
- { dataType: Common.VehicleDataType.VEHICLEDATA_PRNDL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeVin(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onVinChanged.disconnect(model.sendVinChange)
- model.onVinChanged.connect(model.sendVinChange)
- console.debug("exit")
- return { vin:
- { dataType: Common.VehicleDataType.VEHICLEDATA_VIN,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeVin(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onVinChanged.disconnect(model.sendVinChange)
- console.debug("exit")
- return { vin:
- { dataType: Common.VehicleDataType.VEHICLEDATA_VIN,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeTirePressure(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onTirePressureChanged.disconnect(model.sendTirePressureChange)
- model.onTirePressureChanged.connect(model.sendTirePressureChange)
- console.debug("exit")
- return { tirePressure:
- { dataType: Common.VehicleDataType.VEHICLEDATA_TIREPRESSURE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeTirePressure(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onTirePressureChanged.disconnect(model.sendTirePressureChange)
- console.debug("exit")
- return { tirePressure:
- { dataType: Common.VehicleDataType.VEHICLEDATA_TIREPRESSURE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeOdometer(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onOdometerChanged.disconnect(model.sendOdometerChange)
- model.onOdometerChanged.connect(model.sendOdometerChange)
- console.debug("exit")
- return { odometer:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ODOMETER,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeOdometer(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onOdometerChanged.disconnect(model.sendOdometerChange)
- console.debug("exit")
- return { odometer:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ODOMETER,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeBeltStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBeltStatusChanged.disconnect(model.sendBeltStatusChange)
- model.onBeltStatusChanged.connect(model.sendBeltStatusChange)
- console.debug("exit")
- return { beltStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BELTSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeBeltStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBeltStatusChanged.disconnect(model.sendBeltStatusChange)
- console.debug("exit")
- return { beltStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BELTSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeBodyInformation(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBodyInformationChanged.disconnect(model.sendBodyInformationChange)
- model.onBodyInformationChanged.connect(model.sendBodyInformationChange)
- console.debug("exit")
- return { bodyInformation:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BODYINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeBodyInformation(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBodyInformationChanged.disconnect(model.sendBodyInformationChange)
- console.debug("exit")
- return { bodyInformation:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BODYINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeDeviceStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDeviceStatusChanged.disconnect(model.sendDeviceStatusChange)
- model.onDeviceStatusChanged.connect(model.sendDeviceStatusChange)
- console.debug("exit")
- return { deviceStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_DEVICESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeDeviceStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDeviceStatusChanged.disconnect(model.sendDeviceStatusChange)
- console.debug("exit")
- return { deviceStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_DEVICESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeDriverBraking(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDriverBrakingChanged.disconnect(model.sendDriverBrakingChange)
- model.onDriverBrakingChanged.connect(model.sendDriverBrakingChange)
- console.debug("exit")
- return { driverBraking:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BRAKING,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeDriverBraking(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDriverBrakingChanged.disconnect(model.sendDriverBrakingChange)
- console.debug("exit")
- return { driverBraking:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BRAKING,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeWiperStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onWiperStatusChanged.disconnect(model.sendWiperStatusChange)
- model.onWiperStatusChanged.connect(model.sendWiperStatusChange)
- console.debug("exit")
- return { wiperStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_WIPERSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeWiperStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onWiperStatusChanged.disconnect(model.sendWiperStatusChange)
- console.debug("exit")
- return { wiperStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_WIPERSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeHeadLampStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onHeadLampStatusChanged.disconnect(model.sendHeadLampStatusChange)
- model.onHeadLampStatusChanged.connect(model.sendHeadLampStatusChange)
- console.debug("exit")
- return { headLampStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeHeadLampStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onHeadLampStatusChanged.disconnect(model.sendHeadLampStatusChange)
- console.debug("exit")
- return { headLampStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeEngineTorque(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEngineTorqueChanged.disconnect(model.sendEngineTorqueChange)
- model.onEngineTorqueChanged.connect(model.sendEngineTorqueChange)
- console.debug("exit")
- return { engineTorque:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ENGINETORQUE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeEngineTorque(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEngineTorqueChanged.disconnect(model.sendEngineTorqueChange)
- console.debug("exit")
- return { engineTorque:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ENGINETORQUE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeAccPedalPosition(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAccPedalPositionChanged.disconnect(model.sendAccPedalPositionChange)
- model.onAccPedalPositionChanged.connect(model.sendAccPedalPositionChange)
- console.debug("exit")
- return { accPedalPosition:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ACCPEDAL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeAccPedalPosition(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAccPedalPositionChanged.disconnect(model.sendAccPedalPositionChange)
- console.debug("exit")
- return { accPedalPosition:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ACCPEDAL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeSteeringWheelAngle(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSteeringWheelAngleChanged.disconnect(model.sendSteeringWheelAngleChange)
- model.onSteeringWheelAngleChanged.connect(model.sendSteeringWheelAngleChange)
- console.debug("exit")
- return { steeringWheelAngle:
- { dataType: Common.VehicleDataType.VEHICLEDATA_STEERINGWHEEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeSteeringWheelAngle(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSteeringWheelAngleChanged.disconnect(model.sendSteeringWheelAngleChange)
- console.debug("exit")
- return { steeringWheelAngle:
- { dataType: Common.VehicleDataType.VEHICLEDATA_STEERINGWHEEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeECallInfo(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onECallInfoChanged.disconnect(model.sendECallInfoChange)
- model.onECallInfoChanged.connect(model.sendECallInfoChange)
- console.debug("exit")
- return { eCallInfo:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ECALLINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeECallInfo(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onECallInfoChanged.disconnect(model.sendECallInfoChange)
- console.debug("exit")
- return { eCallInfo:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ECALLINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeAirbagStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAirbagStatusChanged.disconnect(model.sendAirbagStatusChange)
- model.onAirbagStatusChanged.connect(model.sendAirbagStatusChange)
- console.debug("exit")
- return { airbagStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeAirbagStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAirbagStatusChanged.disconnect(model.sendAirbagStatusChange)
- console.debug("exit")
- return { airbagStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeEmergencyEvent(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEmergencyEventChanged.disconnect(model.sendEmergencyEventChange)
- model.onEmergencyEventChanged.connect(model.sendEmergencyEventChange)
- console.debug("exit")
- return { emergencyEvent:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeEmergencyEvent(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEmergencyEventChanged.disconnect(model.sendEmergencyEventChange)
- console.debug("exit")
- return { emergencyEvent:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeClusterModeStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onClusterModeStatusChanged.disconnect(model.sendClusterModeStatusChange)
- model.onClusterModeStatusChanged.connect(model.sendClusterModeStatusChange)
- console.debug("exit")
- return { clusterModeStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeClusterModeStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onClusterModeStatusChanged.disconnect(model.sendClusterModeStatusChange)
- console.debug("exit")
- return { clusterModeStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeMyKey(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onMyKeyChanged.disconnect(model.sendMyKeyChange)
- model.onMyKeyChanged.connect(model.sendMyKeyChange)
- console.debug("exit")
- return { myKey:
- { dataType: Common.VehicleDataType.VEHICLEDATA_MYKEY,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeMyKey(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onMyKeyChanged.disconnect(model.sendMyKeyChange)
- console.debug("exit")
- return { myKey:
- { dataType: Common.VehicleDataType.VEHICLEDATA_MYKEY,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/log4cxx.properties b/SDL_Core/src/components/qt_hmi/qml_model_qt4/log4cxx.properties
deleted file mode 100644
index 0bc5ac8fd..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/log4cxx.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-# Socket logger
-log4j.appender.SocketHub=org.apache.log4j.net.SocketHubAppender
-log4j.appender.SocketHub.port=4555
-log4j.appender.SocketHub.locationInfo=true
-
-# Only ERROR and FATAL messages are logged to console
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.ImmediateFlush=true
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %m%n
-log4j.appender.Console.Threshold=ERROR
-
-# Log for all DBus plugin messages
-log4j.appender.DBusPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.DBusPluginLogFile.File=DBusPlugin.log
-log4j.appender.DBusPluginLogFile.append=false
-log4j.appender.DBusPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.DBusPluginLogFile.ImmediateFlush=true
-log4j.appender.DBusPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.DBusPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all HMI Framework plugin
-log4j.appender.HmiFrameworkPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.HmiFrameworkPluginLogFile.File=HmiFrameworkPlugin.log
-log4j.appender.HmiFrameworkPluginLogFile.append=false
-log4j.appender.HmiFrameworkPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.HmiFrameworkPluginLogFile.ImmediateFlush=true
-log4j.appender.HmiFrameworkPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.HmiFrameworkPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all Qt HMI
-log4j.rootLogger=ALL, Console
-
-# Log for DBus plugin QtHMI
-log4j.logger.DBusPlugin=ALL, DBusPluginLogFile
-
-# Log for HMI Framework plugin
-log4j.logger.HmiFrameworkPlugin=ALL, HmiFrameworkPluginLogFile
-
-# Log by log4cxx plugin
-log4j.logger.Log4cxxPlugin=ALL, HmiFrameworkPluginLogFile
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationData.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationData.qml
deleted file mode 100644
index a50113095..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationData.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * @file ApplicationData.qml
- * @brief Model for Application.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-QtObject {
- property string mainField1
- property string mainField2
- property string mainField3
- property string mainField4
- property string statusBar
- property string mediaTrack
- property string image
-
- function reset () {
- console.debug("enter")
- mainField1 = ""
- mainField2 = ""
- mainField3 = ""
- mainField4 = ""
- statusBar = ""
- mediaTrack = ""
- image = ""
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationModel.qml
deleted file mode 100644
index 206eaa918..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ApplicationModel.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * @file ApplicationModel.qml
- * @brief Own fields for each application.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-
-QtObject {
- property int appId
- property string appName
- property string ngnMediaScreenAppName
- property Icon appIcon: Icon { }
- property string deviceName
- property int hmiDisplayLanguageDesired
- property bool isMediaApplication
- property variant appType
- property int hmiUITextAlignment
-
- // media player
- property string playPauseState
- property ApplicationData hmiUIText: ApplicationData { }
- property MediaClockModel mediaClock: MediaClockModel { }
-
- property string helpPrompt
- property string timeoutPrompt
- property ListModel options: ListModel { }
-
- property ListModel currentSubMenu: options
- property ListModel turnList
- property ListModel softButtons
- property ListModel turnListSoftButtons
- property ListModel customPresets
- property int languageTTSVR
- // This place is for adding new properties
-
- function reset () {
- console.debug("enter")
- appId = -1
- appName = ""
- ngnMediaScreenAppName = ""
- appIcon.reset()
- deviceName = ""
- hmiDisplayLanguageDesired = -1
- isMediaApplication = false
- appType = undefined
- playPauseState = ""
- hmiUIText.reset()
-// no need to reset mediaClock
- helpPrompt = ""
- timeoutPrompt = ""
- options.clear()
- currentSubMenu = options
- turnList = null
- softButtons = null
- turnListSoftButtons = null
- customPresets = null
- languageTTSVR = -1
- hmiUITextAlignment = null
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/CarMenuModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/CarMenuModel.qml
deleted file mode 100644
index f636d1e79..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/CarMenuModel.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file CarMenuModel.qml
- * @brief Car menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-
-ListModel
-{
- ListElement {
- name: "ambient"
- icon: "../res/vehicle/Ambient Lighti Icon.png"
- qml: ""
- }
- ListElement {
- name: "cal"
- icon: "../res/vehicle/cal.png"
- qml: ""
- }
- ListElement {
- name: "ev"
- icon: "../res/vehicle/EV Icon.png"
- qml: ""
- }
- ListElement {
- name: "folders"
- icon: "../res/vehicle/folders.png"
- qml: ""
- }
- ListElement {
- name: "key"
- icon: "../res/vehicle/key_car.png"
- qml: ""
- }
- ListElement {
- name: "mcs"
- icon: "../res/vehicle/MCS Icon.png"
- qml: ""
- }
- ListElement {
- name: "sun"
- icon: "../res/vehicle/sun.png"
- qml: ""
- }
- ListElement {
- name: "sync"
- icon: "../res/vehicle/SYNC Services.png"
- qml: ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Constants.js b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Constants.js
deleted file mode 100644
index 1bc5c558b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Constants.js
+++ /dev/null
@@ -1,249 +0,0 @@
-/**
- * @file Constants.js
- * @brief Namespace of constants.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-.pragma library
-
-// Colors
-
-// Main color of HMI model(now it ~lightblue). Buttons, text, icons of this color.
-var primaryColor = "#1d81d5"
-
-// Color of pressed buttons, text, icons etc.
-var primaryColorPressed = "#8ec0ea"
-
-// Secondary color of HMI model, backgroud of this color.
-var secondaryColor = "black"
-
-// Color of text at buttonts that are inactive (at phone keyboard, when no any contact started with current letter).
-var inactiveButtonTextColor = "grey"
-
-// Color of text at buttonts that are inactive but nevertheless pressed (at phone keyboard, when no any contact started with current letter).
-var inactiveButtonTextColorPressed = "lightgrey"
-
-// Color of text at contact list screen view (Name, number and number type).
-var contactTextColor = "lightblue"
-
-// Color of text at buttons, when they are pressed.
-var pressedButtonTextColor = "black"
-
-// Color of text at "white" buttons, for all other buttons (which most) use primaryColor.
-var releasedButtonTextColor = "white"
-
-// Transparent background.
-var transparentColor = "#00000000"
-
-// "Warning" word color
-var warningColor = "red"
-
-// Color for PopUp
-var popUpBorderColor = "white"
-
-// Color for hardware and simulation panels
-var panelColor = "#003"
-
-// Color for text in hardware and simulation panels
-var panelTextColor = "white"
-
-// Audio pass thru PopUp text color
-var audioPassThruTextColor = "white"
-
-// Color for border of controls
-var controlsBorderColor = "#ababab"
-
-//--------------------------------------------------------------------------------------
-
-// Font sizes of different elements
-
-// Font size for most of text in HMI model.
-var fontSize = 20
-
-// Font size for text inside oval buttons.
-var ovalButtonFontSize = 15
-
-// Title font size
-var titleFontSize = 35
-
-// Power on/off button font size
-var powerButtonFornSize = 25
-
-// Font size of status bar
-var statusBarFontSize = 15
-
-// Size icon for buttons
-var iconButtonSize = 30
-
-// Size icon for item list
-var iconItemListSize = 40
-
-// font size fo TTS popup
-var ttsFontSize = 12
-
-// Font size for list of applications
-var appListFontSize = 40
-
-// Size of contact list fields
-var contactListNameFieldSize = 0.4
-var contactListPhoneFieldSize = 0.3
-var contactListDescriptionFieldSize = 0.3
-
-//--------------------------------------------------------------------------------------
-
-// Sizes of buttons, menus, screen, etc
-
-// Minimal width and height of screen (screen wont resize, if height and width are lower).
-var mainScreenMinWidth = 800
-var mainScreenMiHeight = 600
-
-// Width for long oval button
-var ovalButtonWidth = 163
-
-// Height for oval button
-var ovalButtonHeight = 65
-
-// Height item list
-var itemListHeight = 60
-
-// Width for TTS popup
-var ttsPopUpWidth = 250
-
-// Height for TTS popup
-var ttsPopUpHeight = 100
-
-// Width for popup view
-var popupWidth = 700
-
-// Width for alert window
-var alertWidth = 360
-
-// Height for popup view
-var popupHeigth = 500
-
-// Width for combobox
-var defaultComboboxWidth = 150
-
-// Size icon for list of applications
-var appListIconSize = 100
-
-// DistanceBar height
-var distanceBarHeight = 1
-
-
-//---------------------------------------------------------------------------------------
-
-// Other
-
-// Offset from the edges of the screen.
-var margin = 20
-
-// Offset from the edges of the popup
-var popupMargin = 15
-
-// Spacing between contacts at contact screen view.
-var contactListSpacing = 30
-
-// Duration of appearance of icon/button at icon/button menus.
-var animationDuration = 500
-
-// Duration of appearence of "OK" button at warning screen view, when HMI starts.
-var warningScreenDuration = 1000
-
-// Timer to check how long preset button is pressed.
-var presetButtonTimer = 800
-
-// Spacing between icon and item in list
-var iconItemListSpacing = 20
-
-// Spacing between item on views
-var generalSpacing = 10
-
-// Width of scrollBar
-var scrollBarWidth = 5
-
-// Speak text for a given time
-var ttsSpeakTime = 2000
-
-// Maximal number of submenus
-var maximumSubmenus = 1000
-
-// Maximal number of commands in submenu or root menu
-var maximumCommandsPerSubmenu = 1000
-
-// padding for popup view
-var popUpPadding = 20
-
-// Padding for TTS popup
-var ttsPopUpPadding = 10
-
-// -------------------------
-var sliderBarWidth = 400
-var sliderBarHeight = 50
-var sliderBarRadius = 3
-var sliderBarBorderWidth = 1
-var sliderTextColor = "white"
-var sliderBarBorderColor = "white"
-var sliderBarFillColor = "white"
-
-// -------------------------
-var scrollableMessageTextColor = "white"
-var scrollableMessageScrollBarColor = "gray"
-var scrollableMessageScrollBarWidth = 10
-
-// Padding for hardware and simulation panels
-var panelPadding = 20
-
-// Scale for pressed icon in menu
-var pressedIconScale = 1.1
-
-// Values of color effect for highlighted button
-var highlightedButtonHue = 0.9
-var highlightedButtonSaturation = 0.0
-var highlightedButtonLightness = 0.1
-
-// Values of color effect for disabled button
-var disabledButtonHue = 0.0
-var disabledButtonSaturation = -1.0
-var disabledButtonLightness = 0.1
-
-// Count of rows for grid menu
-var menuRowCount = 2
-
-// Count of columns for grid menu
-var menuColumnCount = 3
-
-// Radius of controls
-var controlsRadius = 2
-
-// Width of border of controls
-var controlsBorderWidth = 1
-// Position for element that came without position value (should be always at the end)
-var positionOfElementWithoutPosition = 1001
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ContactsListModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ContactsListModel.qml
deleted file mode 100644
index 348d30156..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ContactsListModel.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * @file ContactsListModel.qml
- * @brief List of contacts.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-
-ListModel
-{
- // TODO {ALeshin}: This list model should be sorted in ABC and Upper/lower case order,
- // when it will be filled dynamically.
- ListElement { name: "Aaron" ; phone:"(614)555-2444";type:"Mobile"}
- ListElement { name: "Adrian" ; phone:"(740)245-3434";type:"Mobile" }
- ListElement { name: "Albert" ; phone:"(614)245-5584";type:"Mobile" }
- ListElement { name: "Alice" ; phone:"(313)878-3566";type:"Office"}
- ListElement { name: "Alec" ; phone:"(917)608-2418";type:"Mobile"}
- ListElement { name: "Alexander" ; phone:"(614)608-2400";type:"Home"}
- ListElement { name: "Alexander Vasil'evich Michail Leontiy" ; phone:"(614)608-2400";type:"Mobile"}
- ListElement { name: "Amber" ; phone:"(614)608-2111";type:"Mobile"}
- ListElement { name: "Amy" ; phone:"(440)245-3434";type:"Mobile" }
- ListElement { name: "Andy" ; phone:"(313)245-3434";type:"Mobile" }
- ListElement { name: "Antje" ; phone:"(567)245-3434";type:"Home" }
- ListElement { name: "buddy" ; phone:"(614)813-6610";type:"Mobile" }
- ListElement { name: "Barry" ; phone:"(313)555-2211";type:"Mobile" }
- ListElement { name: "Bea" ; phone:"(614)455-3434";type:"Mobile" }
- ListElement { name: "Ben" ; phone:"(614)882-1843";type:"Office" }
- ListElement { name: "Blake" ; phone:"(330)149-7778";type:"Mobile" }
- ListElement { name: "Bob Mould" ; phone:"(313)245-3434";type:"Mobile" }
- ListElement { name: "Brian" ; phone:"(614)332-7499";type:"Mobile" }
- ListElement { name: "Calvin" ; phone:"(614)442-9974";type:"Mobile" }
- ListElement { name: "Carl" ; phone:"(567)773-3434";type:"Home" }
- ListElement { name: "Cat Power" ; phone:"(313)608-3434";type:"Home"}
- ListElement { name: "Cathy" ; phone:"(313)444-456";type:"Home"}
- ListElement { name: "Chris" ; phone:"(734)997-6514";type:"Home" }
- ListElement { name: "Cloud Nothings"; phone:"(444)608-543";type:"Mobile"}
- ListElement { name: "Cody" ; phone:"(567)365-8413";type:"Home" }
- ListElement { name: "Curtis" ; phone:"(614)245-1547";type:"Office" }
- ListElement { name: "Dakota" ; phone:"(567)555-4444";type:"Home" }
- ListElement { name: "Dale" ; phone:"(567)723-1974";type:"Mobile" }
- ListElement { name: "Dallas"; phone:"(614)556-879";type:"Home"}
- ListElement { name: "Damian" ; phone:"(614)245-3434";type:"Office" }
- ListElement { name: "Daniel"; phone:"(614)556-879";type:"Home"}
- ListElement { name: "Darina"; phone:"(313)895-888";type:"Mobile"}
- ListElement { name: "Dee "; phone:"(313)432-3434";type:"Home"}
-// ListElement { name: "Edward" ; phone:"(917)608-975";type:"Office"}
- ListElement { name: "Ferdinand" ; phone:"(917)879-795";type:"Mobile"}
- ListElement { name: "gomez" ; phone:"(313)455-543";type:"Mobile"}
- ListElement { name: "Harry Potter"; phone:"(313)888-432";type:"Home"}
- ListElement { name: "Ivan"; phone:"(313)996-225";type:"Home"}
-// ListElement { name: "James" ; phone:"(917)608-3434";type:"Mobile"}
- ListElement { name: "Karen"; phone:"(313)998-332";type:"Home"}
- ListElement { name: "Luis Torres"; phone:"(313)779-111";type:"Home"}
- ListElement { name: "Mary"; phone:"(313)234-098";type:"Mobile"}
- ListElement { name: "Neil"; phone:"(313)444-112";type:"Mobile"}
- ListElement { name: "Oswald"; phone:"(313)456-921";type:"Mobile"}
- ListElement { name: "Oscar"; phone:"(313)332-778";type:"Home"}
- ListElement { name: "~1123"; phone:"(313)1332";type:"Home"}
- ListElement { name: "Patrice"; phone:"(313)789-111";type:"Mobile"}
- ListElement { name: "Queen Elizabeth"; phone:"(313)897-666";type:"Mobile"}
- ListElement { name: "Rose"; phone:"(313)111-211";type:"Mobile"}
- ListElement { name: "Susell"; phone:"(313)345-122";type:"Home"}
- ListElement { name: "Thomas"; phone:"(917)608-342";type:"Mobile"}
- ListElement { name: "Titus Andronicus" ; phone:"(917)608-321";type:"Office"}
- ListElement { name: "Toretto" ; phone:"(917)608-3434";type:"Home"}
- ListElement { name: "Uhl" ; phone:"(313)444-654";type:"Office"}
- ListElement { name: "willi" ; phone:"(313)224-5712";type:"Office"}
- ListElement { name: "Wanda" ; phone:"(313)666-6969";type:"Office"}
- ListElement { name: "wanda" ; phone:"(313)666-6969";type:"Office"}
- ListElement { name: "Zara" ; phone:"(313)231-009";type:"Mobile"}
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/DataStorage.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/DataStorage.qml
deleted file mode 100644
index cc5f6fc21..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/DataStorage.qml
+++ /dev/null
@@ -1,510 +0,0 @@
-/**
- * @file DataStorage.qml
- * @brief Container for data.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "Internal.js" as Internal
-import "Constants.js" as Constants
-
-QtObject {
-
- property string contactsFirstLetter // first letter of contact's name that need to find at contact list
- property ApplicationModel currentApplication: ApplicationModel { }
- property SliderModel uiSlider: SliderModel { }
- property PerformAudioPassThruModel uiAudioPassThru: PerformAudioPassThruModel { }
-
- function getApplication(appId) {
- console.log("dataContainer getApplication enter");
- for(var i = 0; i < applicationList.count; i++) {
- if(applicationList.get(i).appId === appId) {
- console.log("Application found", applicationList.get(i));
- return applicationList.get(i);
- }
- }
- console.log("dataContainer getApplication exit");
- }
-
- onApplicationListChanged: {
- console.log("onApplicationListChanged()");
- setCurrentApplication(appId);
- }
-
- function setCurrentApplication(appId) {
- console.log("Enter setCurrentApplication function");
- var oldApplicationContext = applicationContext;
- if (currentApplication.appId !== appId) {
- applicationContext = false;
- }
-
- for(var i = 0; i < applicationList.count; i++) {
- if(applicationList.get(i).appId === appId) {
- currentApplication.appId = appId
- var application = applicationList.get(i)
- currentApplication.appName = application.appName
- currentApplication.appType = application.appType
- currentApplication.appIcon.source = application.icon
- currentApplication.playPauseState = application.playPauseState
- currentApplication.options = application.options
- currentApplication.softButtons = application.softButtons
- currentApplication.customPresets = application.customPresets
-
- if (application.hmiUIText.mainField1 !== undefined) {
- currentApplication.hmiUIText.mainField1 = application.hmiUIText.mainField1
- }
- if (application.hmiUIText.mainField2 !== undefined) {
- currentApplication.hmiUIText.mainField2 = application.hmiUIText.mainField2
- }
- if (application.hmiUIText.mainField3 !== undefined) {
- currentApplication.hmiUIText.mainField3 = application.hmiUIText.mainField3
- }
- if (application.hmiUIText.mainField4 !== undefined) {
- currentApplication.hmiUIText.mainField4 = application.hmiUIText.mainField4
- }
- if (application.hmiUIText.statusBar !== undefined) {
- currentApplication.hmiUIText.statusBar = application.hmiUIText.statusBar
- }
- if (application.hmiUIText.mediaTrack !== undefined) {
- currentApplication.hmiUIText.mediaTrack = application.hmiUIText.mediaTrack
- }
- if (application.hmiUIText.image !== undefined) {
- currentApplication.hmiUIText.image = application.hmiUIText.image
- }
- if (application.hmiUITextAlignment !== undefined) {
- currentApplication.hmiUITextAlignment = application.hmiUITextAlignment
- }
- if (application.helpPrompt !== undefined) {
- currentApplication.helpPrompt = application.helpPrompt
- }
- if (application.timeoutPrompt !== undefined) {
- currentApplication.timeoutPrompt = application.timeoutPrompt
- }
- // Check fields with mandatory = false
-
- currentApplication.deviceName = application.deviceName
- currentApplication.isMediaApplication = application.isMediaApplication
- currentApplication.turnList = application.turnList
- currentApplication.turnListSoftButtons = application.turnListSoftButtons
- currentApplication.mediaClock.updateMode = application.mediaClock.updateMode
- currentApplication.mediaClock.runningMode = application.mediaClock.runningMode
- currentApplication.mediaClock.startTimeForProgress = application.mediaClock.startTimeForProgress
- if (application.mediaClock.startTime !== undefined) {
- currentApplication.mediaClock.startTime = application.mediaClock.startTime
- }
- if (application.mediaClock.endTime !== undefined) {
- currentApplication.mediaClock.endTime = application.mediaClock.endTime
- }
- currentApplication.languageTTSVR = application.languageTTSVR
- currentApplication.hmiDisplayLanguageDesired = application.hmiDisplayLanguageDesired
- // This place is for adding new properties
- }
- }
- applicationContext = oldApplicationContext;
- currentApplicationChanged()
- console.log("Exit setCurrentApplication function")
- }
-
- function addApplication(app) {
- console.log("enter")
- applicationList.append({
- appName: app.appName,
- ngnMediaScreenAppName: app.ngnMediaScreenAppName,
- icon: app.icon,
- deviceName: app.deviceName,
- appId: app.appId,
- hmiDisplayLanguageDesired: app.hmiDisplayLanguageDesired,
- isMediaApplication: app.isMediaApplication,
- appType: app.appType,
- helpPrompt: "",
- timeoutPrompt: "",
- customPresets: app.customPresets ? app.customPresets : [],
- playPauseState: 'Pause',
- hmiUIText: app.hmiUIText,
- hmiUITextAlignment: app.hmiUITextAlignment,
- options: [],
- turnList: [],
- turnListSoftButtons: [],
- mediaClock: app.mediaClock,
- languageTTSVR: Common.Language.EN_US,
- softButtons: []
- // This place is for adding new properties
- })
-
- if (app.isMediaApplication) {
- musicSourceModel.insert(0, {
- "title": app.appName,
- "qml": "views/SDLPlayerView.qml",
- "appId": app.appId
- })
- }
-
- console.log("exit")
- }
-
- function setApplicationProperties(appId, props) {
- console.log("Enter setApplicationProperties function");
- var app = getApplication(appId)
- for (var p in props) {
- if (props[p] !== undefined) {
- app[p] = props[p]
- }
- }
- if (currentApplication.appId === appId) {
- setCurrentApplication(appId); // copy new values to current application
- }
- console.log("Exit setApplicationProperties function");
- }
-
- function removeApplication(appId) {
- console.log("enter");
- for (var j = 0; j < musicSourceModel.count; ++j) {
- if (musicSourceModel.get(j).appId === appId) {
- musicSourceModel.remove(j);
- break;
- }
- }
- for (var i = 0; i < applicationList.count; i++) {
- if (applicationList.get(i).appId === appId) {
- applicationList.remove(i);
- break;
- }
- }
- console.log("exit");
- }
-
- property int systemContext
- property int hmiContext
- property bool applicationContext: false
- property bool applicationSavedContext
- property string routeText: ""
- property PlayerState cdPlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState ipodPlayerState: PlayerState {
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- playPauseState: 'Pause'
- }
- property PlayerState usbPlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState linePlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState btPlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState amPlayerState: PlayerState {
- songName: "So Far Around The Bend"
- albumName: "The National"
- presets: [ "1130", "950", "760", "1270", "1400", "2100", "940", "1001" ]
- }
- property PlayerState fmPlayerState: PlayerState {
- songName: "So Far Around The Bend"
- albumName: "The National"
- presets: ["96.3", "107.9", "104.3", "101.9", "105.3", "100.5", "107.9", "103.4"]
- }
- property PlayerState siriusPlayerState: PlayerState {
- songName: "So Far Around The Bend"
- albumName: "The National"
- presets: [ "Lithium", "Spectrum", "ESPN", "Alt Nation", "Lithium", "Spectrum", "ESPN", "Alt Nation" ]
- }
-
- property bool hmiVRAvailable: false
- property bool hmiTTSAvailable: false
- property bool hmiNavigationAvailable: false
- property bool hmiVehicleInfoAvailable: false
- property bool hmiUIAvailable: false
-
- property int hmiUILanguage: Common.Language.EN_US
- property int hmiTTSVRLanguage: Common.Language.EN_US
-
- property ListModel deviceList: ListModel { }
- property ListModel applicationList: ListModel { }
-
- property ListModel vrCommands: ListModel {}
-
- property ListModel vrHelp: ListModel {}
-
- function reset () {
- console.log("dataContainer reset enter");
- routeText = ""
- console.log("dataContainer reset exit");
- }
-
- function changeRegistrationUI (language, appID) {
- console.log("dataContainer changeRegistrarionUI enter");
- setApplicationProperties(appID, { hmiDisplayLanguageDesired: language });
- console.log("dataContainer changeRegistrarionUI exit");
- }
-
- function changeRegistrationTTSVR(language, appID) {
- console.log("dataContainer changeRegistrationTTSVR enter");
- setApplicationProperties(appID, { languageTTSVR: language });
- console.log("dataContainer changeRegistrationTTSVR exit");
- }
-
- function addCommand (cmdID, menuParams, cmdIcon, appID) {
- console.debug("enter: " +
- cmdID +
- ", " +
- (menuParams ?
- "{" + menuParams.parentID + ", " + menuParams.position + ", " + menuParams.menuName + "}" : menuParams) +
- ", " +
- (cmdIcon ?
- "{" + cmdIcon.value + ", " + cmdIcon.imageType + "}" : cmdIcon) +
- ", " +
- appID
- )
- var commandToAddPosition
- var app = getApplication(appID)
- var currentMenu = app.options
- var maximumCommands = Constants.maximumCommandsPerSubmenu
- var index = 0
-
- if ((menuParams) && (menuParams.parentID)) { // Work with sub menu
- var parentNotFound = true
- for (var optionIndex = 0; optionIndex < app.options.count; ++optionIndex) {
- if ((app.options.get(optionIndex).type === Internal.MenuItemType.MI_SUBMENU) && (app.options.get(optionIndex).id === menuParams.parentID)) {
- currentMenu = app.options.get(optionIndex).subMenu
- parentNotFound = false
- maximumCommands += 1
- }
- }
- if (parentNotFound) {
- console.log("UI::addCommand(): parentID " + menuParams.parentID + " not found")
- }
- }
-
- if (currentMenu.count < maximumCommands) {
- if (menuParams && (menuParams.position !== undefined)) {
- commandToAddPosition = menuParams.position
- } else {
- commandToAddPosition = Constants.positionOfElementWithoutPosition
- }
- for (var i = 0; i < currentMenu.count; i++) {
- if (commandToAddPosition >= currentMenu.get(i).position) {
- index = i + 1
- } else {
- break
- }
- }
- currentMenu.insert( index,
- { id: cmdID,
- name: menuParams.menuName,
- type: Internal.MenuItemType.MI_NODE,
- position: commandToAddPosition,
- icon: cmdIcon ? cmdIcon : {},
- subMenu: []
- })
- } else {
- console.log("addCommand(): too many commands in menu: ", menuParams.parentID, " rejecting")
- throw Common.Result.REJECTED
- }
- console.debug("exit")
- }
-
- function deleteCommand (cmdID, appID) {
- console.debug("enter: " + cmdID + ", " + appID)
- for (var optionIndex = 0; optionIndex < getApplication(appID).options.count; ++optionIndex) {
- var option = getApplication(appID).options.get(optionIndex)
- if (option.type === Internal.MenuItemType.MI_NODE) {
- if (option.id === cmdID) {
- getApplication(appID).options.remove(optionIndex)
- break
- }
- }
- if (option.type === Internal.MenuItemType.MI_SUBMENU) {
- var subMenu = option.subMenu
- var idMatchFound = false
- for (var subOptionIndex = 0; subOptionIndex < subMenu.count; ++subOptionIndex) {
- if (subMenu.get(subOptionIndex).id === cmdID) {
- idMatchFound = true
- if (subMenu !== currentApplication.currentSubMenu) {
- subMenu.remove(subOptionIndex)
- }
- else {
- console.log("UI::deleteCommand(): cannot remove item from current submenu")
- throw Common.Result.IN_USE
- }
- break
- }
- }
- if (idMatchFound) {
- break
- }
- }
- }
- console.debug("exit")
- }
-
- function addSubMenu (menuID, menuParams, appID) {
- console.debug("enter: " + menuID + ", {" + menuParams.parentID + ", " + menuParams.position + ", " + menuParams.menuName + "}, " + appID)
- var app = getApplication(appID)
- var index = 0
- var count = app.options.count
- var subMenuToAddPosition
-
- if (count < Constants.maximumSubmenus) {
- if (menuParams.position !== undefined) {
- subMenuToAddPosition = menuParams.position
- } else {
- subMenuToAddPosition = Constants.positionOfElementWithoutPosition
- }
- for (var i = 0; i < count; i++) {
- if (subMenuToAddPosition >= app.options.get(i).position) {
- index = i + 1
- } else {
- break
- }
- }
- app.options.insert(index, {
- "id": menuID,
- "name": menuParams.menuName,
- "position": subMenuToAddPosition,
- "type": Internal.MenuItemType.MI_SUBMENU,
- "icon": undefined,
- "subMenu": [{
- "id": -1,
- "name": menuParams.menuName,
- "position": -1,
- "type": Internal.MenuItemType.MI_PARENT,
- "icon": {
- "imageType": Common.ImageType.DYNAMIC,
- "value": "../res/nav/turnArrow.png"
- },
- "subMenu": getApplication(appID).options
- }]
- })
- }
- else {
- console.log("addSubMenu(): too many submenus, rejecting")
- throw Common.Result.REJECTED
- }
- console.debug("exit")
- }
-
- function deleteSubMenu (menuID, appID) {
- console.debug("enter: " + menuID + ", " + appID)
- for (var optionIndex = 0; optionIndex < getApplication(appID).options.count; ++optionIndex) {
- var option = getApplication(appID).options.get(optionIndex)
- if ((option.type === Internal.MenuItemType.MI_SUBMENU) && (option.id === menuID)) {
- if (option.subMenu !== currentApplication.currentSubMenu) {
- getApplication(appID).options.remove(optionIndex)
- }
- else {
- console.log("UI::deleteSubMenu(): cannot remove current submenu")
- throw Common.Result.IN_USE
- }
- break
- }
- }
- console.debug("exit")
- }
-
- function setVrHelp (vrHelp) {
- this.vrHelp.clear()
- var index
- for (var i = 0; i < vrHelp.length; ++i) {
- index = 0
-// sort by simple inserts
- while ((index < this.vrHelp.count) && (this.vrHelp.get(index).position < vrHelp[i].position)) {
- ++index
- }
- this.vrHelp.insert(index, {
- "text": vrHelp[i].text,
- "icon": vrHelp[i].image ? vrHelp[i].image : {},
- "position": vrHelp[i].position
- })
- }
- }
-
- property NavigationModel navigationModel: NavigationModel { }
- property VehicleInfoModel vehicleInfoModel: VehicleInfoModel { }
- property ScrollableMessageModel scrollableMessageModel: ScrollableMessageModel { }
- property bool activeVR: false
-
- property InteractionModel interactionModel: InteractionModel {
- }
-
- property int driverDistractionState: Common.DriverDistractionState.DD_OFF
- onDriverDistractionStateChanged: {
- sdlUI.onDriverDistraction(driverDistractionState);
- }
- property bool activeTTS: false
- property variant activePopup
- property int popups: 0
-
- property bool activeAlert: false
-
- onActiveVRChanged: setSystemContext()
- onActiveAlertChanged: setSystemContext()
- onPopupsChanged: setSystemContext()
-
- function setSystemContext () {
- console.debug("enter")
- if (popups > 0) {
- systemContext = Common.SystemContext.SYSCTXT_HMI_OBSCURED
- }
- else if (activeAlert) {
- systemContext = Common.SystemContext.SYSCTXT_ALERT
- }
- else if (activeVR) {
- systemContext = Common.SystemContext.SYSCTXT_VRSESSION
- }
- else if (contentLoader.item !== null) {
- systemContext = contentLoader.item.systemContext
- }
- console.debug("exit")
- }
- property MusicSourceModel musicSourceModel: MusicSourceModel {
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/InteractionModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/InteractionModel.qml
deleted file mode 100644
index 8da8a035d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/InteractionModel.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file InteractionModel.qml
- * @brief Interaction model.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Async.js" as Async
-
-QtObject {
- property string initialText
- property ListModel choice: ListModel {
- }
- property int timeout
- property variant async
-
- function performInteraction (initialText, choiceSet, vrHelp, timeout, appID) {
- console.debug("enter")
- this.initialText = initialText.fieldText
- choice.clear()
- for (var i = 0; i < choiceSet.length; ++i) {
- choice.append({"id": choiceSet[i].choiceID, "name": choiceSet[i].menuName ? choiceSet[i].menuName : "choiceID = " + choiceSet[i].choiceID, image: choiceSet[i].image})
- }
- this.timeout = timeout
- interactionPopup.activate()
- async = new Async.AsyncCall()
- console.debug("exit")
- return async
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Internal.js b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Internal.js
deleted file mode 100644
index 4a1ebc625..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/Internal.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-var MenuItemType = {
- MI_NODE: 0,
- MI_SUBMENU: 1,
- MI_PARENT: 2
-}
-
-function activePageChoose(flickElement, pages) {
- if (flickElement.contentX <= 0) {
- return 0
- }
- else if ( (flickElement.contentWidth - flickElement.contentX) < flickElement.width) {
- return pages -1
- }
- else {
- if ( (flickElement.contentX % flickElement.width) >= (1/6 * flickElement.width)) {
- return Math.ceil(flickElement.contentX / flickElement.width)
- }
- else if ( (flickElement.contentX % flickElement.width) > 0) {
- return Math.floor(flickElement.contentX / flickElement.width)
- }
- }
-}
-
-var MediaClockUpdateMode = {
- MCU_COUNTUP: 0,
- MCU_COUNTDOWN: 1,
-}
-
-var MediaClockRunningMode = {
- MCR_RUNNING: 0,
- MCR_STOPPED: 1
-}
-
-function appendVrHelpItem (arrayElement, index, array) {
- this.append({
- text: arrayElement.text,
- image: arrayElement.image ? arrayElement.image : "",
- position: arrayElement.position
- })
-}
-
-function checkBit(value, bitPosition) {
- return (value & (1 << bitPosition))
-}
-
-function getArrayForPresetRow() {
- var array = []
- for (var i = 0; i < dataContainer.currentApplication.customPresets.count; i++) {
- array.push(dataContainer.currentApplication.customPresets.get(i).text)
- }
- return array
-}
-
-function pad (string, length, lead) {
- if (!lead) {
- lead = '0'
- }
- var paddedString = "" + string
- while (paddedString.length < length) {
- paddedString = lead + paddedString
- }
- return paddedString
-}
-
-function hmsTime (hours, minutes, seconds) {
- return 60 * (60 * hours + minutes) + seconds
-}
-
-function hmsTimeToString (hmsTime) {
- if (hmsTime === -1) {
- return "0:00:00"
- }
-
- var _time = hmsTime
- var seconds = _time % 60
- _time -= seconds
- _time /= 60
- var minutes = _time % 60
- _time -= minutes
- _time /= 60
- var hours = _time
- var string = ""
- string += hours
- string += ":"
- string += pad(minutes, 2)
- string += ":"
- string += pad(seconds, 2)
- return string
-}
-
-function stringToHmsTime (hmsString) {
- console.debug("enter: \"" + hmsString + "\"")
- var substrings = hmsString.split(":")
- var seconds = substrings.length > 0 ? parseInt(substrings.pop()) : 0
- if (seconds >= 60) {
- console.log("incorrect field \"seconds\": " + seconds)
- console.debug("exit")
- return 0
- }
- var minutes = substrings.length > 0 ? parseInt(substrings.pop()) : 0
- if (minutes >= 60) {
- console.log("incorrect field \"minutes\": " + minutes)
- console.debug("exit")
- return 0
- }
- var hours = substrings.length > 0 ? parseInt(substrings.pop()) : 0
- console.debug("exit")
- return hmsTime(hours, minutes, seconds)
-}
-
-function mediaClockUpdateModeToString (mediaClockUpdateMode) {
- switch (mediaClockUpdateMode) {
- case MediaClockUpdateMode.MCU_COUNTUP:
- return "Internal.MediaClockUpdateMode.MCU_COUNTUP"
- case MediaClockUpdateMode.MCU_COUNTDOWN:
- return "Internal.MediaClockUpdateMode.MCU_COUNTDOWN"
- default:
- return ""
- }
-}
-
-function mediaClockRunningModeToString (mediaClockRunningMode) {
- switch (mediaClockRunningMode) {
- case MediaClockRunningMode.MCR_RUNNING:
- return "Internal.MediaClockRunningMode.MCR_RUNNING"
- case MediaClockRunningMode.MCR_STOPPED:
- return "Internal.MediaClockRunningMode.MCR_STOPPED"
- default:
- return ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MainMenuListModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MainMenuListModel.qml
deleted file mode 100644
index 49b4e7fb9..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MainMenuListModel.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file MainMenuListModel.qml
- * @brief Main menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-
-ListModel
-{
- ListElement {
- name: "Climate"
- icon: "../res/snow.png"
- qml: "./views/ClimateControlView.qml"
- }
-
- ListElement {
- name: "Navigation"
- icon: "../res/arrow.png"
- qml: "./views/NavigationNoRouteGridView.qml"
- }
-
- ListElement {
- name: "Media"
- icon: "../res/notes.png"
- qml: "./views/MusicSourceView.qml"
- }
-
- ListElement {
- name: "Preferences"
- icon: "../res/gear.png"
- qml: ""
- }
-
- ListElement {
- name: "Apps"
- icon: "../res/apps.png"
- qml: "./views/ApplicationListView.qml"
- }
-
- ListElement {
- name: "Phone"
- icon: "../res/phone/phone.png"
- qml: "./views/PhoneMenuGridView.qml"
- }
-
- ListElement {
- name: "Car"
- icon: "../res/car.png"
- qml: "./views/CarMenuGridView.qml"
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MediaClockModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MediaClockModel.qml
deleted file mode 100644
index 8f062008a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MediaClockModel.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * @file MediaClockModel.qml
- * @brief Media clock model
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "Internal.js" as Internal
-
-QtObject {
- property int updateMode
- property int runningMode
- property int startTime
- property int endTime
- property int upperTimeLimit: 60 * 60 * 60 - 1
- property int startTimeForProgress
- property real progress
-
- property Timer timer: Timer {
- id: timer
- interval: 1000
- repeat: true
- onTriggered: onTimer()
- }
- onRunningModeChanged: {
- if (runningMode === Internal.MediaClockRunningMode.MCR_STOPPED) {
- timer.stop()
- } else {
- timer.start()
- }
- }
-
- onStartTimeChanged: {
- if (startTime === -1) {
- progress = 0
- } else {
- if (updateMode === Internal.MediaClockUpdateMode.MCU_COUNTUP) {
- progress = (endTime !== -1) ? (startTime / endTime) : (startTime / upperTimeLimit)
- } else {
- progress = (endTime !== -1) ? ( (startTime - endTime) / (startTimeForProgress - endTime) )
- : (startTime / startTimeForProgress)
- }
- }
- }
-
- function onTimer () {
- switch (updateMode) {
- case Internal.MediaClockUpdateMode.MCU_COUNTUP:
- if (endTime !== -1) {
- if (startTime < endTime) {
- startTime++
- } else {
- timer.stop()
- runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- console.debug("count Up timer stopped")
- }
- } else {
- if (startTime < upperTimeLimit) {
- startTime++
- } else {
- startTime = 0
- }
- }
- break
- case Internal.MediaClockUpdateMode.MCU_COUNTDOWN:
- console.debug("count down")
- if (--startTime === 0) {
- timer.stop()
- runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- startTime = endTime = -1
- console.debug("count Down timer stopped")
- }
- break
- }
- dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, {
- "mediaClock": {startTime: startTime,
- endTime: endTime,
- updateMode: updateMode,
- runningMode: runningMode,
- startTimeForProgress: startTimeForProgress
- }
- })
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MusicSourceModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MusicSourceModel.qml
deleted file mode 100644
index b01c4cf83..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/MusicSourceModel.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file MusicSourceModel.qml
- * @brief Music source menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-
-ListModel
-{
- ListElement {
- title: "FM"
- qml: "./views/FMPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "AM"
- qml: "./views/AMPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "BT Audio"
- qml: "./views/BTPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "Sirius"
- qml: "./views/SiriusPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "CD"
- qml: "./views/CDPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "iPod"
- qml: "./views/IPodPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "USB"
- qml: "./views/UsbPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "LineIn"
- qml: "./views/LineInPlayerView.qml"
- appId: 0
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationMenuModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationMenuModel.qml
deleted file mode 100644
index 963225719..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationMenuModel.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * @file NavigationMenuModel.qml
- * @brief Music source menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-ListModel
-{
- ListElement {
- title: "Home"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Keyboard"
- icon: "../res/buttons/long_oval_btn.png"
- qml: "./views/NavigationKeyboardView.qml"
- }
- ListElement {
- title: "Favorites"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Work"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Recent"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "POI"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Scout"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Waze"
- icon: "../res/buttons/long_oval_btn.png"
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationModel.qml
deleted file mode 100644
index f9203875d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/NavigationModel.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file NavigationModel.qml
- * @brief Model for Navigation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-QtObject {
- property string text1: ""
- property string text2: ""
- property string totalDistance: ""
- property string eta: ""
- property string timeToDestination: ""
- property variant turnIcon
- property variant nextTurnIcon
-
- property real distanceToManeuver: 0
- property real distanceToManeuverScale: 0
- property bool maneuverComplete
- property ListModel softButtons: ListModel {}
- property int appId: -1
- property ListModel alertManeuverSoftButtons: ListModel {}
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PerformAudioPassThruModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PerformAudioPassThruModel.qml
deleted file mode 100644
index 8b861d37a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PerformAudioPassThruModel.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @file PerformAudioPassThruModel.qml
- * @brief Data model audio pass thru.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-QtObject {
- property string appName: ""
- property string firstLine: ""
- property string secondLine: ""
- property int timeout: 0
- property bool running: false
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PhoneMenuModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PhoneMenuModel.qml
deleted file mode 100644
index a191f46e4..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PhoneMenuModel.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file PhoneMenuModel.qml
- * @brief Phone menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-
-ListModel
-{
- ListElement {
- name: "phone"
- icon: "../res/phone/phone.png"
- qml: ""
- }
- ListElement {
- name: "contacts"
- icon: "../res/phone/contacts.png"
- qml: "./views/PhoneKeyboardView.qml"
- }
- ListElement {
- name: "messages"
- icon: "../res/phone/messages.png"
- qml: ""
- }
- ListElement {
- name: "DND"
- icon: "../res/phone/dnd_off.png"
- qml: ""
- }
- ListElement {
- name: "texts"
- icon: "../res/phone/texts.png"
- qml: ""
- }
- ListElement {
- name: "recent"
- icon: "../res/phone/recent.png"
- qml: ""
- }
- ListElement {
- name: "keyboard"
- icon: "../res/phone/keypad.png"
- qml: ""
- }
- ListElement {
- name: "more"
- icon: "../res/phone/more.png"
- qml: ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PlayerState.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PlayerState.qml
deleted file mode 100644
index bbacd49f8..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/PlayerState.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file PlayerState.qml
- * @brief List of parameters for each player.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-
-// Player state for all players except SDL media player
-Item {
- // Media players
- property string playPauseState
- property string albumImage
- property string trackNumber
- property int songPosition
- property string trackName
-
- // Radio Players
- property variant presets: []
-
- // Both players
- property string songName
- property string albumName
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ScrollableMessageModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ScrollableMessageModel.qml
deleted file mode 100644
index 6fd441ac3..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/ScrollableMessageModel.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file ScrollableMessageModel.qml
- * @brief Model for Scrollable Message.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-QtObject {
- property string longMessageText: "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh"
- property ListModel softButtons: ListModel {}
- property int appId: -1
- property int timeout: 0
- property variant async
- property bool running: false
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SettingsStorage.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SettingsStorage.qml
deleted file mode 100644
index 7fb6cfcdd..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SettingsStorage.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file SettingsStorage.qml
- * @brief Storage for keeping settings.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-Item
-{
- property variant sdlLanguagesList: [
- Common.Language.EN_US,
- Common.Language.ES_MX,
- Common.Language.FR_CA,
- Common.Language.DE_DE,
- Common.Language.ES_ES,
- Common.Language.EN_GB,
- Common.Language.RU_RU,
- Common.Language.TR_TR,
- Common.Language.PL_PL,
- Common.Language.FR_FR,
- Common.Language.IT_IT,
- Common.Language.SV_SE,
- Common.Language.PT_PT,
- Common.Language.NL_NL,
- Common.Language.ZH_TW,
- Common.Language.JA_JP,
- Common.Language.AR_SA,
- Common.Language.KO_KR,
- Common.Language.PT_BR,
- Common.Language.CS_CZ,
- Common.Language.DA_DK,
- Common.Language.NO_NO
- ]
-
- property variant displayCapabilities: {
- "displayType": Common.DisplayType.GEN2_8_DMA,
- "textFields": [
- Common.TextFieldName.mainField1,
- Common.TextFieldName.mainField2,
- Common.TextFieldName.mainField3,
- Common.TextFieldName.mainField4,
- Common.TextFieldName.statusBar,
- Common.TextFieldName.mediaClock,
- Common.TextFieldName.mediaTrack,
- Common.TextFieldName.alertText1,
- Common.TextFieldName.alertText2,
- Common.TextFieldName.alertText3,
- Common.TextFieldName.scrollableMessageBody,
- Common.TextFieldName.initialInteractionText,
- Common.TextFieldName.navigationText1,
- Common.TextFieldName.navigationText2,
- Common.TextFieldName.ETA,
- Common.TextFieldName.totalDistance,
- Common.TextFieldName.navigationText,
- Common.TextFieldName.audioPassThruDisplayText1,
- Common.TextFieldName.audioPassThruDisplayText2,
- Common.TextFieldName.sliderHeader,
- Common.TextFieldName.sliderFooter,
- Common.TextFieldName.notificationText
- ],
- "mediaClockFormats": [
- Common.MediaClockFormat.CLOCK1,
- Common.MediaClockFormat.CLOCK2,
- Common.MediaClockFormat.CLOCK3,
- Common.MediaClockFormat.CLOCKTEXT1,
- Common.MediaClockFormat.CLOCKTEXT2,
- Common.MediaClockFormat.CLOCKTEXT3,
- Common.MediaClockFormat.CLOCKTEXT4
- ],
- "graphicSupported": true,
- "imageCapabilities": [ Common.ImageType.DYNAMIC ],
- "templatesAvailable": [ "" ],
- "screenParams": {
- "resolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 480
- },
- "touchEventAvailable": {
- "pressAvailable": true,
- "multiTouchAvailable": true,
- "doublePressAvailable": true
- }
- },
- "numCustomPresetsAvailable": 6
- }
-
- property variant softButtonCapabilities: {
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true,
- "imageSupported": true
- }
-
- property variant buttonCapabilities: []
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SliderModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SliderModel.qml
deleted file mode 100644
index d335c9eb2..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/SliderModel.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file SliderModel.qml
- * @brief Data model for slider.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-QtObject {
- property string appName: ""
- property string header: ""
- property variant footer: []
- property int numTicks: 0
- property int position: 0
- property int timeout: 0
- property bool running: false
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/VehicleInfoModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/VehicleInfoModel.qml
deleted file mode 100644
index f5c309880..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/models/VehicleInfoModel.qml
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * @file VehicleInfoModel.qml
- * @brief Data model for vehicle info.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-QtObject {
- id: vehicleInfo
- property real speed: 80.1
- property int rpm: 5000
- property real fuelLevel: 0.2
- property int fuelLevel_State: Common.ComponentVolumeStatus.CVS_LOW
- property real instantFuelConsumption: 2.2
- property int driverBraking: Common.VehicleDataEventStatus.VDES_NO_EVENT
- property int wiperStatus: Common.WiperStatus.OFF
- property real engineTorque: 2.5
- property real accPedalPosition: 0.5
- property real steeringWheelAngle: 1.2
- property real externalTemperature: 40.0
- property string vin: '52-452-52-752'
- property int odometer: 2
- property int prndl: Common.PRNDL.FIFTH
-
- property variant headLampStatus: {
- "lowBeamsOn": false,
- "highBeamsOn": false,
- "ambientLightSensorStatus": Common.AmbientLightStatus.TWILIGHT_1
- }
- property variant deviceStatus: {
- 'voiceRecOn': false,
- 'btIconOn': false,
- 'callActive': false,
- 'phoneRoaming': false,
- 'textMsgAvailable': false,
- 'battLevelStatus': Common.DeviceLevelStatus.ZERO_LEVEL_BARS,
- 'stereoAudioOutputMuted': false,
- 'monoAudioOutputMuted': false,
- 'signalLevelStatus': Common.DeviceLevelStatus.ZERO_LEVEL_BARS,
- 'primaryAudioSource': Common.PrimaryAudioSource.NO_SOURCE_SELECTED,
- 'eCallEventActive': false
- }
- property variant bodyInformation: {
- 'parkBrakeActive': false,
- 'ignitionStableStatus': Common.IgnitionStableStatus.IGNITION_SWITCH_NOT_STABLE,
- 'ignitionStatus': Common.IgnitionStatus.IS_UNKNOWN
- }
- property variant beltStatus: {
- 'driverBeltDeployed': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'passengerBeltDeployed': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'passengerBuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'driverBuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'leftRow2BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'passengerChildDetected': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'rightRow2BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow2BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow3BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'leftRow3BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'rightRow3BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'leftRearInflatableBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'rightRearInflatableBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow1BeltDeployed': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow1BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- }
- property variant tirePressure: {
- 'pressureTelltale': Common.WarningLightStatus.WLS_ON,
- 'leftFront': { status: Common.ComponentVolumeStatus.CVS_NORMAL},
- 'rightFront': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN },
- 'leftRear': { status: Common.ComponentVolumeStatus.CVS_NORMAL },
- 'rightRear': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN },
- 'innerLeftRear': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN },
- 'innerRightRear': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN }
- }
- property variant gps: {
- 'longitudeDegrees': 42.3293,
- 'latitudeDegrees': -83.0464,
- 'utcYear': 2013,
- 'utcMonth': 2,
- 'utcDay': 14,
- 'utcHours': 13,
- 'utcMinutes': 16,
- 'utcSeconds': 54,
- 'compassDirection': Common.CompassDirection.SOUTHWEST,
- 'pdop': 4,
- 'hdop': 5,
- 'vdop': 6,
- 'actual': false,
- 'satellites': 8,
- 'dimension': Common.Dimension.Dimension_2D,
- 'altitude': 7,
- 'heading': 173,
- 'speed': 2
- }
- property variant ecuDIDData: {
- 'data1': 'ECU 1 Test Data',
- 'data2': 'ECU 2 Test Data'
- }
- property variant eCallInfo: {
- "eCallNotificationStatus" : Common.VehicleDataNotificationStatus.VDNS_NORMAL,
- "auxECallNotificationStatus" : Common.VehicleDataNotificationStatus.VDNS_ACTIVE,
- "eCallConfirmationStatus" : Common.ECallConfirmationStatus.ECCS_NORMAL
- }
- property variant airbagStatus: {
- "driverAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NO_EVENT,
- "driverSideAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NO,
- "driverCurtainAirbagDeployed" : Common.VehicleDataEventStatus.VDES_YES,
- "passengerAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NOT_SUPPORTED,
- "passengerCurtainAirbagDeployed" : Common.VehicleDataEventStatus.VDES_FAULT,
- "driverKneeAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NO,
- "passengerSideAirbagDeployed" : Common.VehicleDataEventStatus.VDES_YES,
- "passengerKneeAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NOT_SUPPORTED
- }
- property variant emergencyEvent: {
- "emergencyEventType" : Common.EmergencyEventType.EET_NO_EVENT,
- "fuelCutoffStatus" : Common.EmergencyEventType.EET_FRONTAL,
- "rolloverEvent" : Common.EmergencyEventType.EET_SIDE,
- "maximumChangeVelocity" : Common.EmergencyEventType.EET_REAR,
- "multipleEvents" : Common.EmergencyEventType.EET_ROLLOVER
- }
- property variant clusterModeStatus: {
- "powerModeActive" : true,
- "powerModeQualificationStatus" : Common.PowerModeQualificationStatus.POWER_MODE_UNDEFINED,
- "carModeStatus" : Common.CarModeStatus.CMS_NORMAL,
- "powerModeStatus" : Common.PowerModeStatus.KEY_OUT
- }
- property variant myKey: {
- "e911Override": Common.VehicleDataStatus.VDS_NO_DATA_EXISTS
- }
-
-
- function sendGpsChange(){
- sdlVehicleInfo.onGps(vehicleInfo.gps)
- }
- function sendSpeedChange(){
- sdlVehicleInfo.onSpeed(vehicleInfo.speed)
- }
- function sendRpmChange(){
- sdlVehicleInfo.onRpm(vehicleInfo.rpm)
- }
- function sendFuelLevelChange(){
- sdlVehicleInfo.onFuelLevel(vehicleInfo.fuelLevel)
- }
- function sendFuelLevel_StateChange(){
- sdlVehicleInfo.onFuelLevel_State(vehicleInfo.fuelLevel_State)
- }
- function sendInstantFuelConsumptionChange(){
- sdlVehicleInfo.onInstantFuelConsumption(vehicleInfo.instantFuelConsumption)
- }
- function sendExternalTemperatureChange(){
- sdlVehicleInfo.onExternalTemperature(vehicleInfo.externalTemperature)
- }
- function sendPrndlChange() {
- if (dataContainer.vehicleInfoModel.prndl !== -1)
- {sdlVehicleInfo.onPrndl(vehicleInfo.prndl)}
- }
- function sendTirePressureChange(){
- sdlVehicleInfo.onTirePressure(vehicleInfo.tirePressure)
- }
- function sendOdometerChange(){
- sdlVehicleInfo.onOdometer(vehicleInfo.odometer)
- }
- function sendBeltStatusChange(){
- sdlVehicleInfo.onBeltStatus(vehicleInfo.beltStatus)
- }
- function sendBodyInformationChange(){
- sdlVehicleInfo.onBodyInformation(vehicleInfo.bodyInformation)
- }
- function sendDeviceStatusChange(){
- sdlVehicleInfo.onDeviceStatus(vehicleInfo.deviceStatus)
- }
- function sendDriverBrakingChange(){
- sdlVehicleInfo.onDriverBraking(vehicleInfo.driverBraking)
- }
- function sendWiperStatusChange(){
- sdlVehicleInfo.onWiperStatus(vehicleInfo.wiperStatus)
- }
- function sendHeadLampStatusChange(){
- sdlVehicleInfo.onHeadLampStatus(vehicleInfo.headLampStatus)
- }
- function sendEngineTorqueChange(){
- sdlVehicleInfo.onEngineTorque(vehicleInfo.engineTorque)
- }
- function sendAccPedalPositionChange(){
- sdlVehicleInfo.onAccPedalPosition(vehicleInfo.accPedalPosition)
- }
- function sendSteeringWheelAngleChange(){
- sdlVehicleInfo.onSteeringWheelAngle(vehicleInfo.steeringWheelAngle)
- }
- function sendECallInfoChange(){
- sdlVehicleInfo.onECallInfo(vehicleInfo.eCallInfo)
- }
- function sendAirbagStatusChange(){
- sdlVehicleInfo.onAirbagStatus(vehicleInfo.airbagStatus)
- }
- function sendEmergencyEventChange(){
- sdlVehicleInfo.onEmergencyEvent(vehicleInfo.emergencyEvent)
- }
- function sendClusterModeStatusChange(){
- sdlVehicleInfo.onClusterModeStatus(vehicleInfo.clusterModeStatus)
- }
- function sendMyKeyChange(){
- sdlVehicleInfo.onMyKey(vehicleInfo.myKey)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml
deleted file mode 100644
index 70e7ba29e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml
+++ /dev/null
@@ -1,285 +0,0 @@
-/**
- * @file AlertWindow.qml
- * @brief Alert popup window
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: alertWindow
- property date lastAlertTime
- property variant softButtons
- property int appId
- property string popUpName // TODO{ALESHIN}: No requerments for closePopUp, if alert couldn't be closed by closePopUp request - delete everywhere
-
- color: "transparent"
-
- property variant async
-
- Rectangle {
- id: rectangle
-
- anchors.centerIn: parent
- color: "black"
- border.color: "white"
-
- width: alertContent.width + 60
- height: alertContent.height + 60
-
- property alias alertString: alert.text
- property alias appNameString: appName.text
- property int duration
-
- Column {
- id: alertContent
- anchors.centerIn: parent
- spacing: 20
-
- Text {
- id: appName
- anchors.horizontalCenter: parent.horizontalCenter
- color: "white"
- font.pointSize: 16
- }
-
- Row {
- width: Constants.alertWidth
- spacing: 20
-
- Image {
- id: alertLogo
- source: "../res/warning.png"
- }
-
- Text {
- id: alert
- width: parent.width - alertLogo.width - parent.spacing
- clip: true
- color: "white"
- font.pointSize: 16
- }
- }
-
- Rectangle {
- id: progressIndicator
- color: "white"
- height: 10
- }
-
- Column {
- Item {
- width: Constants.alertWidth
- height: alertButton1.visible ? alertButton1.height : 0
-
- SoftButton {
- id: alertButton1
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 0 ? softButtons[0] : undefined
- anchors.left: parent.left
- anchors.right: alertButton2.visible ? alertButton2.left : parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- contentLoader.go("views/SDLPlayerView.qml", appId);
- alertWindow.complete(Common.Result.SUCCESS);
- }
- }
- SoftButton {
- id: alertButton2
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 1 ? softButtons[1] : undefined
- anchors.right: parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- contentLoader.go("views/SDLPlayerView.qml", appId);
- alertWindow.complete(Common.Result.SUCCESS);
- }
- }
- }
- Item {
- width: Constants.alertWidth
- height: alertButton3.visible ? childrenRect.height : 0
- SoftButton {
- id: alertButton3
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 2 ? softButtons[2] : undefined
- anchors.left: parent.left
- anchors.right: alertButton4.visible ? alertButton4.left : parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- contentLoader.go("views/SDLPlayerView.qml", appId);
- alertWindow.complete(Common.Result.SUCCESS);
- }
- }
- SoftButton {
- id: alertButton4
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 3 ? softButtons[3] : undefined
- anchors.right: parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- contentLoader.go("views/SDLPlayerView.qml", appId);
- alertWindow.complete(Common.Result.SUCCESS);
- }
- }
- }
- }
- }
-
- SequentialAnimation {
- id: animation
- PropertyAction { target: progressIndicator; property: "width"; value: alertContent.width }
- PropertyAnimation {
- id: shrinkProgressAnimation
- target: progressIndicator
- property: "width"
- to: 0
- duration: rectangle.duration
- }
- }
- }
-
- Timer {
- id: timer
- onTriggered: {
- complete(Common.Result.SUCCESS)
- }
- }
-
- function alert (alertStrings, duration, showIndicator, sButtons, applicationId) {
- if (timer.running) { // we have alert already
- var currentTime = new Date()
- var timeFromLastAlert = currentTime - lastAlertTime
- var timeLeft = timer.interval - timeFromLastAlert
- var discreteInMilliseconds = 1000 // wish to round left time to integer seconds
- var timeLeftRounded = discreteInMilliseconds * Math.ceil(timeLeft / discreteInMilliseconds)
- return timeLeftRounded
- }
- else {
- lastAlertTime = new Date();
- appId = applicationId
- rectangle.appNameString = dataContainer.getApplication(appId).appName;
- softButtons = sButtons;
- rectangle.alertString = alertStrings.join('\n');
- timer.interval = duration;
- rectangle.duration = duration;
- timer.start();
- show();
-
- progressIndicator.visible = !!showIndicator
- progressIndicator.width = alertContent.width
- console.log("ProgressIndicator.width:", progressIndicator.width)
- animation.start()
- }
- }
-
- function show () {
- dataContainer.activeAlert = true
- dataContainer.applicationSavedContext = dataContainer.applicationContext
- visible = true
- }
-
- function complete (reason, data) {
- if (!keep) {
- hide()
- switch (reason) {
- case Common.Result.SUCCESS:
- DBus.sendReply(async, { __retCode: Common.Result.SUCCESS, __message: "UI.Alert" })
- break
- // For other cases
- }
- }
- timer.stop()
- }
-
- function hide() {
- console.debug(popUpName, "HIDE")
- dataContainer.activeAlert = false
- dataContainer.applicationContext = dataContainer.applicationSavedContext
- visible = false
- }
-
- function restart() {
- animation.restart();
- timer.restart();
- }
-
- property bool keep: false
-
- onKeepChanged: {
- if (visible && !keep && !timer.running) {
- hide()
- }
- }
-
- onVisibleChanged: {
- if (visible) {
- dataContainer.activePopup.push(popUpName)
- } else {
- for (var i in dataContainer.activePopup) {
- if (dataContainer.activePopup[i] === popUpName) {
- dataContainer.activePopup.splice(i, 1)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml
deleted file mode 100644
index a1ef64144..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @file ContextPopup.qml
- * @brief Popup view with system context.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-
-PopUp {
- function show() {
- console.debug("enter")
- if (!visible) { // must not increment counter if show() called for visible popup
- visible = true;
- dataContainer.popups++
- }
- console.debug("exit")
- }
-
- function hide() {
- console.debug("enter")
- console.debug(popUpName, "HIDE")
- if (visible) { // must not decrement counter if hide() called for invisible popup
- visible = false;
- dataContainer.popups--
- }
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml
deleted file mode 100644
index 17e5de50b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * @file ExitAllApplicationsPopup.qml
- * @brief Popup "Exit all applications"
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-PopUp {
- function complete(reason){
- hide()
- }
-
- Item {
- ListModel {
- id: reasonExit
-
- Component.onCompleted: {
- for (var name in Common.ApplicationsCloseReason) {
- append({name: name});
- }
- }
- }
- }
-
- Column
- {
- anchors.centerIn: parent
- Row {
- Text {
- text: "Select reason: "
- color: "white"
- }
-
- ComboBox {
- id: reasonComboBox
- model: reasonExit
- }
- z: 1000
- }
- OvalButton {
- text: "Exit"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- sdlBasicCommunication.onExitAllApplications(Common.ApplicationsCloseReason[reasonComboBox.currentText])
- hide()
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml
deleted file mode 100644
index 7a5c53501..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * @file InteractionPopup.qml
- * @brief Interaction popup view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-ContextPopup {
- Text {
- id: initialText
- text: dataContainer.interactionModel.initialText
- anchors.top: parent.top
- anchors.topMargin: Constants.popupMargin
- anchors.left: parent.left
- anchors.leftMargin: Constants.popupMargin
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- ListView {
- anchors.top: initialText.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.popupMargin
- model: dataContainer.interactionModel.choice
- delegate: OvalButton {
- width: parent.width
- text: name
- icon: image
- onClicked: {
- complete(Common.Result.SUCCESS, {"choiceID": id})
- }
- }
- }
-
- Item {
- Timer {
- id: timer
- onTriggered: {
- complete(Common.Result.TIMED_OUT)
- }
- }
- }
-
- function activate () {
- console.debug("enter")
- timer.interval = dataContainer.interactionModel.timeout
- timer.start()
- show()
- console.debug("exit")
- }
-
- function complete (reason, data) {
- console.debug("enter")
- switch (reason) {
- case Common.Result.SUCCESS:
- DBus.sendReply(dataContainer.interactionModel.async, data)
- break
- case Common.Result.ABORTED:
- DBus.sendReply(dataContainer.interactionModel.async, { __retCode: Common.Result.ABORTED })
- break
- case Common.Result.TIMED_OUT:
- DBus.sendReply(dataContainer.interactionModel.async, { __retCode: Common.Result.TIMED_OUT })
- break
- }
- timer.stop()
- hide()
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml
deleted file mode 100644
index e65519d36..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * @file PerformAudioPassThruPopup.qml
- * @brief Popup for audio pass thru
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-ContextPopup {
- property variant async
-
- function showAudioPassThru(){
- console.debug("entered")
- dataContainer.uiAudioPassThru.running = true
- show()
- if (dataContainer.uiAudioPassThru.timeout) {
- timer.start()
- }
- console.debug("exited")
- }
-
- function complete(reason){
- console.debug("enter", reason)
- timer.stop()
- dataContainer.uiAudioPassThru.timeout = 0
- dataContainer.uiAudioPassThru.running = false
- switch (reason) {
- case Common.Result.ABORTED:
- console.debug("exit with abort")
- DBus.sendError(async, Common.Result.ABORTED)
- break;
- case Common.Result.SUCCESS:
- console.debug("exit with success")
- DBus.sendReply(async, {})
- break;
- case Common.Result.RETRY:
- console.debug("exit with retry")
- DBus.sendError(async, Common.Result.RETRY)
- break;
- }
- hide()
- }
-
-
- Column {
- spacing: Constants.generalSpacing
- anchors.centerIn: parent
- Timer {
- id: timer
- interval: dataContainer.uiAudioPassThru.timeout
- onTriggered: {
- complete(Common.Result.SUCCESS)
- }
- }
-
- Text {
- id: appNameText
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiAudioPassThru.appName
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- Row {
- spacing: Constants.generalSpacing
- Image {
- source: "../res/controlButtons/vrImage.png"
- }
-
- Column {
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiAudioPassThru.firstLine
- color: Constants.audioPassThruTextColor
- font.pixelSize: Constants.fontSize
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiAudioPassThru.secondLine
- color: Constants.audioPassThruTextColor
- font.pixelSize: Constants.fontSize
- }
- }
- }
-
-
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: Constants.generalSpacing
-
- OvalButton {
- text: "Retry"
- fontSize: Constants.fontSize
- onClicked: {
- complete(Common.Result.RETRY)
- }
- }
-
- OvalButton {
- text: "Done"
- fontSize: Constants.fontSize
- onClicked: {
- complete(Common.Result.SUCCESS)
- }
- }
- }
-
- OvalButton {
- text: "Close"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- console.debug("enter")
- complete(Common.Result.ABORTED)
- console.debug("exit")
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml
deleted file mode 100644
index 07f8c9801..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @file PopUp.qml
- * @brief General popup view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-Item {
- default property alias content: content.children
- property int padding: Constants.popUpPadding
- property string popUpName
-
- visible: false
-
- width: Constants.popupWidth
- height: Constants.popupHeigth
-
- MouseArea { anchors.fill: parent }
-
- Rectangle {
- width: parent.width - padding / 2
- height: parent.height - padding / 2
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- color: Constants.secondaryColor
- border.width: 1
- border.color: Constants.popUpBorderColor
- radius: padding
- Rectangle {
- id: content
- width: parent.width - padding
- height: parent.height - padding
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- color: Constants.transparentColor
- }
- }
-
- onVisibleChanged: {
- if (popUpName) {
- if (visible) {
- dataContainer.activePopup.push(popUpName)
- } else {
- for (var i in dataContainer.activePopup) {
- if (dataContainer.activePopup[i] === popUpName) {
- dataContainer.activePopup.splice(i, 1)
- }
- }
- }
- }
- }
-
- function show() {
- console.debug("enter");
- visible = true;
- console.debug("exit");
- }
-
- function hide() {
- console.debug("enter");
- visible = false;
- console.debug("exit");
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml
deleted file mode 100644
index 6dcd222ed..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * @file ExitAllApplicationsPopup.qml
- * @brief Popup "Exit all applications"
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-ContextPopup {
- property variant async
- property int position: 1
- /**
- * Test Support Section
- */
- property int resultCode: -1
- signal onReady
- /**
- * Test Support Section End
- */
-
- function showSlider(){
- console.debug("enter")
-
- dataContainer.uiSlider.running = true
- dataContainer.applicationSavedContext = dataContainer.applicationContext
- if(dataContainer.uiSlider.footer.length === 0 || dataContainer.uiSlider.position === 0 ) {
- footerText.text = ""
- } else {
- footerText.text = dataContainer.uiSlider.footer.length === 1 ? dataContainer.uiSlider.footer[0] : dataContainer.uiSlider.footer[dataContainer.uiSlider.position - 1]
- }
- position = dataContainer.uiSlider.position
- show()
- timer.start()
- onReady()
- console.debug("exit")
- }
-
- function complete(reason){
- console.debug("enter reason = ", reason)
- timer.stop()
- dataContainer.applicationContext = dataContainer.applicationSavedContext
- dataContainer.uiSlider.running = false
- switch(reason) {
- case Common.Result.ABORTED:
- console.debug("aborted position is", position)
- resultCode = Common.Result.ABORTED
- DBus.sendReply(async, {__retCode: resultCode, sliderPosition: position})
- break
- case Common.Result.SUCCESS:
- console.debug("send position", position)
- resultCode = Common.Result.SUCCESS
- dataContainer.uiSlider.position = position
- DBus.sendReply(async, {sliderPosition:position})
- break
- default:
- break
- }
- hide()
- position = 1
- console.debug("exit")
- }
-
-
- Column
- {
- spacing: Constants.generalSpacing
- anchors.centerIn: parent
- Timer {
- id: timer
- interval: dataContainer.uiSlider.timeout
- onTriggered: {
- console.debug("triggered")
- complete(Common.Result.SUCCESS)
- }
- }
-
- Text {
- id: appNameText
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiSlider.appName
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- Text {
- id: headerText
- width: borderRectangle.width
- elide: Text.ElideRight
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiSlider.header
- color: Constants.sliderTextColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- Rectangle {
- id: borderRectangle
- width: Constants.sliderBarWidth
- height: Constants.sliderBarHeight
- anchors.horizontalCenter: parent.horizontalCenter
- border.color: Constants.sliderBarBorderColor
- border.width: Constants.sliderBarBorderWidth
- radius: Constants.sliderBarRadius
- color: "black"
-
- Rectangle {
- id: rectangle
- color: Constants.sliderBarFillColor
- height: parent.height
- border.color: parent.border.color
- border.width: parent.border.width
- radius: parent.radius
-
- onVisibleChanged: {
- var tickWidth = borderRectangle.width / dataContainer.uiSlider.numTicks
- rectangle.width = dataContainer.uiSlider.position * tickWidth
- }
- }
-
- MouseArea{
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- onPositionChanged(mouse)
- }
-
- onPositionChanged: {
- if(mouseX <= 0){
- rectangle.width = borderRectangle.width / dataContainer.uiSlider.numTicks
- position = 1
- }
-
- if(mouseX > borderRectangle.width) {
- rectangle.width = borderRectangle.width
- position = dataContainer.uiSlider.numTicks
- }
-
- if(mouseX > 0 && mouseX < borderRectangle.width) {
- var tickWidth = borderRectangle.width / dataContainer.uiSlider.numTicks
- position = Math.ceil(mouseX / tickWidth)
- rectangle.width = position * tickWidth
- }
-
- if(dataContainer.uiSlider.footer.length > 1){
- footerText.text = dataContainer.uiSlider.footer[position - 1]
- }
- }
- }
- }
-
- Text {
- id:footerText
- width: borderRectangle.width
- elide: Text.ElideRight
- anchors.horizontalCenter: parent.horizontalCenter
- text: ""
- color: Constants.sliderTextColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- OvalButton {
- text: "Close"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- console.debug("enter")
- complete(Common.Result.ABORTED)
- console.debug("exit")
- }
- }
- }
-
- function getTimer() {
- return timer
- }
- function getBackButton() {
- return backButton
- }
- function getFooterText() {
- return footerText
- }
- function getBorderRectangle() {
- return borderRectangle
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml
deleted file mode 100644
index 9a833b19e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @file TBTClientStatePopUp.qml
- * @brief Popup view for TBT interface (list of states).
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-PopUp {
- Item {
- ListModel {
- id: tbtState
-
- Component.onCompleted: {
- for (var name in Common.TBTState) {
- append({name: name});
- }
- }
- }
- }
- Text {
- text: "TBT Client State"
- verticalAlignment: Text.AlignVCenter
- anchors.right: parent.right
- anchors.left: parent.left
- anchors.top: parent.top
- color: Constants.primaryColor
- }
- ComboBox {
- id: comboBox
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- model: tbtState
- onCurrentTextChanged: {
- console.log("Send signal onTBTClientState:", currentText);
- sdlNavigation.onTBTClientState(Common.TBTState[currentText]);
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml
deleted file mode 100644
index ce64a6be8..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file TTSPopUp.qml
- * @brief Popup view for TTS
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-PopUp {
- height: Constants.ttsPopUpHeight
- width: Constants.ttsPopUpWidth
- padding: Constants.ttsPopUpPadding
- property variant async
-
- ScrollableText {
- id: text
- anchors.fill: parent
- }
-
- resources: [
- Timer {
- id: timer
- interval: Constants.ttsSpeakTime
- onTriggered: deactivate()
- }
- ]
-
- function activate(message) {
- console.debug("Activate TTS popup:", message);
- dataContainer.activeTTS = true;
- text.text = message;
- show();
- timer.restart();
- console.debug("Exit");
- }
-
- function deactivate() {
- console.debug("Deactivate TTS popup");
- dataContainer.activeTTS = false;
- text.text = '';
- timer.stop();
- hide();
- DBus.sendReply(async, {});
- async = null;
- console.debug("Exit");
- }
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml
deleted file mode 100644
index 8718c8cd6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @file VRHelpPopup.qml
- * @brief Popup view for VR help
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-PopUp {
- Text {
- id: title
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.popupMargin
- text: "VR HELP" // default title
- font.pixelSize: Constants.titleFontSize
- color: Constants.primaryColor
- }
-
- ScrollableListView {
- anchors.top: title.bottom
- anchors.bottom: closeButton.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.popupMargin
-
- model: dataContainer.vrHelp
-
- delegate: Row {
- spacing: Constants.iconItemListSpacing
- Icon {
- source: model.icon
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
- }
-
- Text {
- text: model.text
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- }
- }
- }
-
- OvalButton {
- id: closeButton
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.margins: Constants.popupMargin
- width: Constants.ovalButtonWidth
- text: "Close"
- onClicked: complete()
- }
-
- property alias title: title.text
-
- function complete(reason, data) {
- hide()
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml
deleted file mode 100644
index 8a8be54be..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @file VRPopUp.qml
- * @brief Popup view for VR interface (list commands).
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../views"
-import "../controls"
-
-PopUp {
- Text {
- id: title
- anchors.left: parent.left
- anchors.top: parent.top
- height: voice.height
- width: parent.width - voice.width
- text: "Speak the command"
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- Image {
- id: voice
- anchors.top: parent.top
- anchors.right: parent.right
- source: "../res/controlButtons/vrImage.png"
- }
-
- ScrollableListView {
- anchors.bottomMargin: Constants.popupMargin
- anchors.rightMargin: Constants.popupMargin
- anchors.leftMargin: Constants.popupMargin
- anchors.top: voice.bottom
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.left: parent.left
-
- model: dataContainer.vrCommands
-
- delegate: OvalButton {
- width: parent.width
- text: command
- onClicked: {
- sdlVR.onCommand(cmdID, appID === 0 ? undefined : appID);
- }
- }
- }
-
- function activate() {
- dataContainer.activeVR = true;
- sdlVR.started();
- show();
- }
-
- function complete(reason) {
- dataContainer.activeVR = false;
- sdlVR.stopped();
- hide();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml
deleted file mode 100644
index f4582c28c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * @file VIPopUp.qml
- * @brief Pop up window with information about vehicle.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-PopUp {
- //TODO{ALeshin}: Redraw this window as ListView or Column, when we'll get requirements
- Column {
- anchors.fill: parent
- Text {
- id: viText
- width: parent.width
- height: 1/5 * parent.height
- text: "Vehicle Information"
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- color: Constants.primaryColor
- }
-
- Row {
- height: 1/5 * parent.height
- width: parent.width
-
- Text {
- width: 1/4 * parent.width
- height: 1/5 * parent.height
- anchors.verticalCenter: parent.verticalCenter
- text: "PRNDL: "
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- color: Constants.primaryColor
- }
-
- ComboBox {
- anchors.verticalCenter: parent.verticalCenter
- id: comboBox
- model: prndlList
-
- onCurrentIndexChanged: {
- console.debug("PRNDL:", currentIndex)
- dataContainer.vehicleInfoModel.prndl = model.get(currentIndex).id
- }
-
- textRole: "name"
- ListModel {
- id: prndlList
- Component.onCompleted: {
- append({ id: -1, name: "<NO DATA (prndl)>" })
- for (var name in Common.PRNDL) {
- append({ id: Common.PRNDL[name], name: name });
- }
- }
- }
- }
- z: 1000
- }
-
- Text {
- width: parent.width
- height: 1/5 * parent.height
- text: "ECU 1: " + dataContainer.vehicleInfoModel.ecuDIDData.data1
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- color: Constants.primaryColor
- }
-
- Text {
- width: parent.width
- height: 1/5 * parent.height
- text: "ECU 2: " + dataContainer.vehicleInfoModel.ecuDIDData.data2
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- color: Constants.primaryColor
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/qml_model.qmlproject b/SDL_Core/src/components/qt_hmi/qml_model_qt4/qml_model.qmlproject
deleted file mode 100644
index ea820e801..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/qml_model.qmlproject
+++ /dev/null
@@ -1,20 +0,0 @@
-/* File generated by Qt Creator, version 2.7.0 */
-
-import QmlProject 1.1
-
-Project {
- mainFile: "MainWindow.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "../res"
- }
- /* List of plugin directories passed to QML runtime */
- importPaths: [ "." ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/AMPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/AMPlayerView.qml
deleted file mode 100644
index 4a2916888..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/AMPlayerView.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file AMPlayerView.qml
- * @brief AM player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- RadioPlayer {
- id: amRadioPlayer
- anchors.fill: parent
- radioType: "AM"
- radioName: "AM Radio"
-
- playerState: dataContainer.amPlayerState
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ApplicationListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ApplicationListView.qml
deleted file mode 100644
index 19ecf4ca4..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ApplicationListView.qml
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @file ApplicationListView.qml
- * @brief Application list view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Column {
- anchors.fill: parent
- Item {
- // top 1/4 of screen
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- elementWidth: Constants.ovalButtonWidth
- snapTo: elementWidth + spacing
- spacing: (width - 4 * elementWidth) / 3
-
- OvalButton {
- text: "Find New Apps"
- }
-
- OvalButton {
- text: "Change device"
- onReleased: contentLoader.go("./views/ChangeDeviceView.qml")
- }
-
- OvalButton {
- text: "911 Assist"
- }
-
- OvalButton {
- text: "Vehicle Health Report"
- }
-
- OvalButton {
- text: "Install applications/Up"
- }
- }
- }
-
- Item {
- height: parent.height / 2
- width: parent.width
-
- ScrollableListView {
- id: applicationListView
- anchors.fill: parent
- model: dataContainer.applicationList
-
- delegate: Item {
- width: parent.width
- height: Math.max(applicationName.height, appIcon.height)
- Image {
- id: appIcon
- source: icon
- height: Constants.appListIconSize
- width: height
- }
- ClickableText {
- id: applicationName
- text: appName
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.appListFontSize
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: appIcon.right
- anchors.leftMargin: Constants.margin
- onClicked: {
- dataContainer.setCurrentApplication(appId)
- dataContainer.currentApplication.isMediaApplication ? contentLoader.go("./views/SDLPlayerView.qml", dataContainer.currentApplication.appId)
- : contentLoader.go("./views/SDLNonMediaView.qml", dataContainer.currentApplication.appId)
- }
- }
- }
- }
- }
-
- Item {
- // bottom 1/4 of screen
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/BTPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/BTPlayerView.qml
deleted file mode 100644
index 0a5390e92..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/BTPlayerView.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file BTPlayerView.qml
- * @brief FM player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: btPlayer
- playerName: "BT Audio"
- anchors.fill: parent
-
- playerState: dataContainer.btPlayerState
- image: playerState.albumImage
-
- buttons: [
- OvalButton {
- text: btPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CDPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CDPlayerView.qml
deleted file mode 100644
index f582ff2f7..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CDPlayerView.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @file CDPlayerView.qml
- * @brief CD player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: cdPlayer
- playerName: "CD"
- anchors.fill: parent
- image: playerState.albumImage
- playerState: dataContainer.cdPlayerState
-
- buttons: [
- OvalButton {
- text: cdPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CarMenuGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CarMenuGridView.qml
deleted file mode 100644
index 9b04b1bad..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/CarMenuGridView.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file CarMenuGridView.qml
- * @brief Car menu screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../models"
-import "../controls"
-
-GridMenu {
- id: menu
- model: CarMenuModel { }
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- ClickableImage {
- anchors.centerIn: parent
- source: icon
- onClicked: {
- if(qml !== "") {
- contentLoader.go(qml)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ChangeDeviceView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ChangeDeviceView.qml
deleted file mode 100644
index 643b07450..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ChangeDeviceView.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * @file ChangeDeviceView.qml
- * @brief Screen view with list of available devices.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- anchors.fill: parent
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- Text {
- id: searchDeviceText
- anchors.left: parent.left
- anchors.top: parent.top
- height: 1/4 * parent.height
- width: parent.width
- color: Constants.primaryColor
- font.pixelSize: Constants.titleFontSize
- text: "Devices available:"
- verticalAlignment: Text.AlignVCenter
- }
-
- ListView {
- id: changeDeviceListView
- anchors.left: parent.left
- anchors.top: searchDeviceText.bottom
- model: dataContainer.deviceList
- width:parent.width
- height:parent.height - searchDeviceText.height
-
- delegate: Text {
- MouseArea {
- anchors.fill: parent
- onClicked: {
- sdlBasicCommunication.onDeviceChosen({ name: name, id: devid });
- sdlBasicCommunication.onFindApplications({ name: name, id: devid })
- contentLoader.go("./views/ApplicationListView.qml")
- }
- }
- text: name
- color: Constants.primaryColor
- font.pixelSize: Constants.titleFontSize
- }
- }
- }
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
-
- Component.onCompleted: {
- console.log("ChangeDeviceView Component.onCompleted enter");
- sdlBasicCommunication.onStartDeviceDiscovery();
- console.log("ChangeDeviceView Component.onCompleted exit");
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ClimateControlView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ClimateControlView.qml
deleted file mode 100644
index 01c289b13..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ClimateControlView.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @file ClimateControlView.qml
- * @brief Screen view of climat menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-
-GeneralView {
- Item {
- id: climatMenu
- anchors.fill: parent
-
- Item {
- height: parent.height
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- Column {
- id: leftItem
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 1/4*parent.width - useThisToGetButtonSize.width
-
- Row {
- ClimateControlBtn {name: "heated_seat"}
- ClimateControlBtn {name: "heated_wheel"}
- }
- Row {
- ClimateControlBtn {name: "AC"}
- ClimateControlBtn {name: "headed_dash"}
- }
- }
-
- Column {
- id: centralItem
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
-
- ClimateControlBtn {id: useThisToGetButtonSize; name: "defrost"; state: "on"}
- ClimateControlBtn {name: "face"; state: "on"}
- ClimateControlBtn {name: "feet"}
- }
-
- Row {
- id: rightItem
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- anchors.rightMargin: 1/4*parent.width - useThisToGetButtonSize.width
-
- ClimateControlBtn {
- anchors.verticalCenter: parent.verticalCenter
- txt: "Dual"
- state: "on"
- }
-
- Column {
- ClimateControlBtn { name: "heated_seat" }
- ClimateControlBtn { name: "AC" }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ContactsListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ContactsListView.qml
deleted file mode 100644
index a2b2be590..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ContactsListView.qml
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * @file ContactsListView.qml
- * @brief Contact list screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- function setCurrent(firstLetter){
- for(var i = 0; i < contactsListView.count; i ++) {
- if (contactsListView.model.get(i).name[0].toUpperCase() === firstLetter) {
- contactsListView.positionViewAtIndex(i, ListView.Beginning)
- break;
- }
- }
- }
- Component.onCompleted: setCurrent(dataContainer.contactsFirstLetter)
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- ScrollableListView {
- id: contactsListView
- anchors.fill: parent
- clip: true
- spacing: 1/2 * Constants.fontSize
- model: ContactsListModel { }
-
- section.property: "name"
- section.criteria: ViewSection.FirstCharacter
- section.delegate: Text {
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: section.toUpperCase()
- }
-
- delegate: Item {
- anchors.left: parent.left
- width: parent.width - Constants.scrollBarWidth
- height: typeText.height
-
- Text {
- id: contactName
- anchors.left: parent.left
- text: name
- width: Constants.contactListNameFieldSize * parent.width
- color: Constants.contactTextColor
- font.pixelSize: Constants.fontSize
- elide: Text.ElideRight
- }
- Text {
- id: phoneText
- anchors.left: contactName.right
- width: Constants.contactListPhoneFieldSize * parent.width
- text: phone
- color: Constants.contactTextColor
- font.pixelSize: Constants.fontSize
- horizontalAlignment: Text.AlignHCenter
- }
- Text {
- id: typeText
- anchors.right: parent.right
- width: Constants.contactListDescriptionFieldSize * parent.width
- text: type
- color: Constants.contactTextColor
- font.pixelSize: Constants.fontSize
- horizontalAlignment: Text.AlignHCenter
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/FMPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/FMPlayerView.qml
deleted file mode 100644
index 5c3ca6a5a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/FMPlayerView.qml
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * @file FMPlayerView.qml
- * @brief FM player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- RadioPlayer {
- id: fmRadioPlayer
- anchors.fill: parent
- radioType: "FM"
- radioName: "FM Radio"
-
- playerState: dataContainer.fmPlayerState
-
- property int hdButtonValue: 1
-
- buttonHD: [
- Image {
- id: hdButton
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- source: "../res/buttons/long_oval_btn.png"
- property string textColor: Constants.primaryColor
-
- Row {
- anchors.centerIn: parent
- spacing: (hdButton.width - hdLogo.width - one.width - two.width - three.width - four.width) / 10
-
- Image {
- id: hdLogo
- anchors.verticalCenter: parent.verticalCenter
- source:"../res/hd_logo_on.png"
- }
-
- Text {
- id: one
- anchors.verticalCenter: parent.verticalCenter
- text: "1"
- color: fmRadioPlayer.hdButtonValue === 1 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- id: two
- anchors.verticalCenter: parent.verticalCenter
- text: "2"
- color: fmRadioPlayer.hdButtonValue === 2 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- id: three
- anchors.verticalCenter: parent.verticalCenter
- text: "3"
- color: fmRadioPlayer.hdButtonValue === 3 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- id: four
- anchors.verticalCenter: parent.verticalCenter
- text: "4"
- color: fmRadioPlayer.hdButtonValue === 4 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- hdLogo.source = "../res/hd_logo_off.png"
- hdButton.source = "../res/buttons/long_oval_pressed_btn.png"
- hdButton.textColor = Constants.secondaryColor
-
- }
- onReleased: {
- hdLogo.source = "../res/hd_logo_on.png"
- hdButton.source = "../res/buttons/long_oval_btn.png"
- hdButton.textColor = Constants.primaryColor
- fmRadioPlayer.hdButtonValue === 4 ? fmRadioPlayer.hdButtonValue = 1 : fmRadioPlayer.hdButtonValue++
- }
- }
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GeneralView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GeneralView.qml
deleted file mode 100644
index 40f809299..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GeneralView.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file GeneralView.qml
- * @brief Base view class. Defines properties and behavior common for all views
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-
-Item {
- /// HMI context view is related to
- property int systemContext: Common.SystemContext.SYSCTXT_MAIN
- /// True if view is in application context
- property bool applicationContext: false
- /// View category for AppDeactivated notification (reason)
- property int category: Common.DeactivateReason.GENERAL
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GridMenu.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GridMenu.qml
deleted file mode 100644
index 4cc2f4f61..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/GridMenu.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * @file GridMenu.qml
- * @brief Parent class for main menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-GeneralView {
- id: main
- property alias model: repeater.model
- property alias delegate: repeater.delegate
- property alias rows: grid.rows
- property int columnsOnPage: Constants.menuColumnCount
-
- Flickable {
- id: flicker
- anchors.fill: parent
- contentWidth: grid.width
- flickableDirection: Flickable.HorizontalFlick
-
- Grid {
- id: grid
- anchors.centerIn: parent
- rows: Constants.menuRowCount
- columns: Math.ceil(model.count / rows)
- flow: Grid.TopToBottom
- Repeater {
- id: repeater
- }
- }
-
- property int snapTo: width / parent.columnsOnPage
- onMovementEnded: {
- var rest = flicker.contentX % snapTo
- var time = 0.25
- if (rest > flicker.snapTo / 2) { rest = rest - flicker.snapTo }
- var vel = 2 * rest / time
- flickDeceleration = Math.abs(vel) / time
- flick(vel, 0)
- flickDeceleration = 1500
- }
- }
-
- Pager {
- id: pager
- space: 10
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.top
- anchors.topMargin: Constants.margin
-
- pages: Math.ceil(grid.columns / parent.columnsOnPage)
- activePage: Internal.activePageChoose(flicker, pager.pages)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/HardwareButtonsView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/HardwareButtonsView.qml
deleted file mode 100644
index 83f1ffcd0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/HardwareButtonsView.qml
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * @file HardwareButtonsView.qml
- * @brief Area of screen responsible for hardware buttons
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-Rectangle {
- height: row.height + row.anchors.margins
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.panelColor
-
- signal buttonDown(string name)
- signal buttonUp(string name)
-
- function pressButton(name) {
- buttonDown(name)
- }
-
- function longPressButton(name) {
- console.log("long press " + name)
- }
-
- function releaseButton(name) {
- buttonUp(name)
- }
-
- Row {
- id: row
- spacing: Constants.panelPadding
- anchors.centerIn: parent
- anchors.margins: Constants.panelPadding
-
- PowerSwitchButton {anchors.verticalCenter: parent.verticalCenter}
-
- MaskedButton {
- name: "vr"
- anchors.verticalCenter: parent.verticalCenter
- onReleased: {
- console.debug("Clicked VR button");
- if (!dataContainer.activeVR) {
- vrPopUp.activate();
- } else {
- vrPopUp.complete();
- }
- }
- }
-
- ArrowKeys {anchors.verticalCenter: parent.verticalCenter}
-
- Grid {
- columns: 5
- rows: 2
- spacing: 5
- anchors.verticalCenter: parent.verticalCenter
- Repeater {
- model: 10
- delegate : Rectangle {
- width: 40
- height: 40
- radius: 5
- gradient: Gradient {
- GradientStop
- {
- position: 0.0;
- color: "#2c2c2c"
- Behavior on position {
- NumberAnimation { duration: 80 }
- }
- }
-
- GradientStop
- {
- position: 1.0;
- color: "black"
- Behavior on position {
- NumberAnimation { duration: 80 }
- }
- }
- }
-
- Text {
- text: (1 + index) % 10
- font.pixelSize: 30
- color: Constants.panelTextColor
- anchors.centerIn: parent
- }
-
- Timer {
- id: timer
- interval: Constants.presetButtonTimer
- repeat: false
- triggeredOnStart: false
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- property bool clickProcessed
- onPressed: {
- parent.gradient.stops[0].position = 1.0
- parent.gradient.stops[1].position = 0.0
- clickProcessed = false
- timer.start()
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + index, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
- onReleased: {
- parent.gradient.stops[0].position = 0.0
- parent.gradient.stops[1].position = 1.0
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + index, Common.ButtonEventMode.BUTTONUP, undefined)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + index, Common.ButtonPressMode.SHORT, undefined)
- }
- }
- Connections {
- target: timer
- onTriggered: {
- if(!mouseArea.clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + index, Common.ButtonPressMode.LONG, undefined)
- mouseArea.clickProcessed = true
- }
- }
- }
- }
-
- Component.onCompleted: {
- settingsContainer.buttonCapabilities.push(
- {
- name: Common.ButtonName.PRESET_0 + index,
- upDownAvailable: true,
- shortPressAvailable: true,
- longPressAvailable: true
- });
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/IPodPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/IPodPlayerView.qml
deleted file mode 100644
index 4d9b8091d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/IPodPlayerView.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file IPodPlayerView.qml
- * @brief IPod player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: ipodPlayer
- playerName: "iPod"
- anchors.fill: parent
- image: playerState.albumImage
- playerState: dataContainer.ipodPlayerState
-
- buttons: [
- OvalButton {
- text: ipodPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/LineInPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/LineInPlayerView.qml
deleted file mode 100644
index eca575d6b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/LineInPlayerView.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file LineInPlayerView.qml
- * @brief LineIn player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: lineInPlayer
- playerName: "LineIn"
- anchors.fill: parent
- image: playerState.albumImage
- playerState: dataContainer.linePlayerState
-
- buttons: [
- OvalButton {
- text: lineInPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MainMenuView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MainMenuView.qml
deleted file mode 100644
index 321a67831..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MainMenuView.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file MainMenuView.qml
- * @brief Main menu screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../models"
-import "../controls"
-
-GridMenu {
- id: menu
- model: MainMenuListModel { }
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- ClickableImage {
- anchors.centerIn: parent
- source: icon
- onClicked: {
- if(qml !== "") {
- contentLoader.go(qml)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaClockView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaClockView.qml
deleted file mode 100644
index 183798eb4..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaClockView.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * @file MediaClockView.qml
- * @brief Media clock view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-Item {
- property alias time: timeText.text
- Text {
- id: timeText
- anchors.left: parent.left
- width: 1/10 * parent.width
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignRight
- color: "white"
- text: (mediaPlayerView.playerType === "SDL") ? Internal.hmsTimeToString(dataContainer.currentApplication.mediaClock.startTime)
- : "02:36" //TODO {Aleshin}: get track time for all players except SDL
- font.pixelSize: 18
- }
-
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- height: parent.height
- width: 2/3 * parent.width
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- height: 2
- width: dataContainer.currentApplication.mediaClock.progress * parent.width
- color: "white"
- }
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- height: 2
- width: (1 - dataContainer.currentApplication.mediaClock.progress) * parent.width
- color: Constants.primaryColor
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaPlayer.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaPlayer.qml
deleted file mode 100644
index 866f5399c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MediaPlayer.qml
+++ /dev/null
@@ -1,325 +0,0 @@
-/**
- * @file MediaPlayerView.qml
- * @brief Parent for BT, IPod, CD players screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-Item {
- id: mediaPlayerView
-
- property string playerName: ""
- property string playerType: ""
-
- signal rewind
- signal forward
- signal play
- signal pause
-
- // Holds players state(song name, play/pause state, track number etc). For all players except SDL.
- property PlayerState playerState;
-
- property alias buttons: buttonsRow.content
- property alias buttonsSpacing: buttonsRow.spacing
- property alias image: image.source
-
- Item {
- // row of oval buttons
- id: ovalButtonsRow
- width: parent.width
- height: 1/5 * parent.height
- anchors.left: parent.left
- anchors.top: parent.top
-
- PagedFlickable {
- id: buttonsRow
- width: parent.width
- spacing: (mediaPlayerView.playerType === "SDL") ? ((width - 4 * elementWidth) / 3)
- : (width - 2 * elementWidth)
- anchors.verticalCenter: parent.verticalCenter
- snapTo: Constants.ovalButtonWidth + spacing
- elementWidth: Constants.ovalButtonWidth
- }
- }
-
- Item {
- id: spacingBetweenItems
- width: parent.width
- height: 1/10 * parent.height
- anchors.left: parent.left
- anchors.top: ovalButtonsRow.bottom
-
- Behavior on height {
- NumberAnimation {
- duration : Constants.animationDuration
- }
- }
- }
-
- Column {
- // Picture + text information + media clock
- id: mediaContent
- width: parent.width
- height: 2/5 * parent.height
- anchors.left: parent.left
- anchors.top: spacingBetweenItems.bottom
-
- Row {
- // picture + text info
- width: parent.width
- height: 3/4 * parent.height
- spacing: Constants.margin
-
- Image {
- id: image
- height: parent.height
- width: height
- }
-
- Column {
- // text info
- id: textInfo
- height: parent.height
- width: parent.width - image.width - parent.spacing
- spacing: (height - titleText.height - 3 * text.height) / 3
-
- Text {
- id: titleText
- anchors.left: parent.left
- anchors.right: parent.right
- horizontalAlignment: dataContainer.currentApplication.hmiUITextAlignment
- color: Constants.primaryColor
- text: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.hmiUIText.mainField1
- : playerState.trackName
- font.pixelSize: Constants.titleFontSize
- font.bold: true
- }
-
- Text {
- id: text
- anchors.left: parent.left
- anchors.right: parent.right
- horizontalAlignment: dataContainer.currentApplication.hmiUITextAlignment
- color: Constants.primaryColor
- text: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.hmiUIText.mainField2
- : playerState.albumName
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- horizontalAlignment: Text.AlignHCenter
- color: Constants.primaryColor
- text: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.hmiUIText.mediaTrack
- : playerState.trackNumber
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "Time to destination: " + dataContainer.navigationModel.timeToDestination
- font.pixelSize: Constants.fontSize
- horizontalAlignment: dataContainer.hmiUITextAlignment
- visible: mediaPlayerView.playerType === "SDL" && dataContainer.navigationModel.timeToDestination
- }
- }
- }
-
- MediaClockView {
- width: parent.width
- height: parent.height * 1/4
- }
- }
-
- Item {
- id: spacingBetweenItems2
- width: parent.width
- height: 1/10 * parent.height
- anchors.left: parent.left
- anchors.top: mediaContent.bottom
-
- Behavior on height {
- NumberAnimation {
- duration : Constants.animationDuration
- }
- }
- }
-
- Row {
- // Rewind, play, pause, forward buttons
- id: playPauseRewindForward
- width: parent.width
- height: 1/5 * parent.height - statusBar.height
- anchors.left: parent.left
- anchors.leftMargin: (width - playPauseButton.width - prevButton.width - nextButton.width) / 2
- anchors.top: spacingBetweenItems2.bottom
-
- Image {
- id: prevButton
- anchors.verticalCenter: parent.verticalCenter
- source: "../res/buttons/player_prev_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- prevButton.source = "../res/buttons/player_prev_pressed_btn.png"
- }
- onReleased: {
- prevButton.source = "../res/buttons/player_prev_btn.png"
- }
- }
- }
-
- PlayPauseButton {
- id: playPauseButton
- anchors.verticalCenter: parent.verticalCenter
- state: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.playPauseState : playerState.playPauseState
- onClicked: {
- (state == 'Play') ? play() : pause();
- var newState = state === "Play" ? "Pause" : "Play";
- (mediaPlayerView.playerType === "SDL") ? dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, { playPauseState: newState } )
- : playerState.playPauseState = newState
- }
- }
-
- Image {
- id: nextButton
- anchors.verticalCenter: parent.verticalCenter
- source: "../res/buttons/player_next_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- nextButton.source = "../res/buttons/player_next_pressed_btn.png"
- }
- onReleased: {
- nextButton.source = "../res/buttons/player_next_btn.png"
- }
- }
- }
- }
-
- Item {
- id: presetButtons
- width: parent.width
- height: 1/5 * parent.height
- anchors.top: playPauseRewindForward.bottom
- anchors.left: parent.left
-
- PresetRow {
- id: presetsRow
- anchors.top: parent.top
- anchors.left: parent.left
- presets: mediaPlayerView.playerType === "SDL" ? Internal.getArrayForPresetRow() : []
- width: parent.width
- property bool clickProcessed
-
- Timer {
- id: timer
- interval: Constants.presetButtonTimer
- repeat: false
- triggeredOnStart: false
- onTriggered: {
- console.log("preset button hold")
- presetsRow.clickProcessed = true
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + presetsRow.selectedIndex, Common.ButtonPressMode.LONG, undefined)
- }
- }
-
- onPresetButtonPressed: {
- console.log("preset button pressed")
- timer.start()
- clickProcessed = false
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
-
- onPresetButtonReleased: {
- console.log("preset button released")
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONUP, undefined)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.SHORT, undefined)
- }
- }
- }
- }
-
- StatusBar {
- id: statusBar
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- }
-
- states: [
- State {
- name: 'presetButtonsON'
- when: (dataContainer.currentApplication.customPresets.count > 0) && (mediaPlayerView.playerType === "SDL")
- PropertyChanges {
- target: spacingBetweenItems
- height: 1
- }
- PropertyChanges {
- target: spacingBetweenItems2
- height: 1
- }
- PropertyChanges {
- target: presetButtons
- visible: true
- enabled: true
- }
- },
-
- State {
- name: 'presetButtonsOFF'
- when: (dataContainer.currentApplication.customPresets.count === 0) || (mediaPlayerView.playerType !== "SDL")
- PropertyChanges {
- target: spacingBetweenItems
- height: 1/10 * mediaPlayerView.height
- }
- PropertyChanges {
- target: spacingBetweenItems2
- height: 1/10 * mediaPlayerView.height
- }
- PropertyChanges {
- target: presetButtons
- visible: false
- enabled: false
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MusicSourceView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MusicSourceView.qml
deleted file mode 100644
index c9c30e200..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/MusicSourceView.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file MusicSourceView.qml
- * @brief Music source screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../models"
-import "../controls"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- anchors.fill: parent
- GridMenu {
- id: menu
- model: dataContainer.musicSourceModel
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: bottomPanel.top
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- OvalButton {
- text: title
- onReleased: contentLoader.go(qml, appId)
- anchors.centerIn: parent
- fontSize: Constants.fontSize
- }
- }
- }
-
- Item {
- id: bottomPanel
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- height: 1/4 * parent.height
- width: parent.width
-
- BackButton { anchors.centerIn: parent }
- }
- }
-}
-
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationInRouteGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationInRouteGridView.qml
deleted file mode 100644
index 6d5ad5027..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationInRouteGridView.qml
+++ /dev/null
@@ -1,250 +0,0 @@
-/**
- * @file NavigationInRouteGridView.qml
- * @brief Navigation in route screen veiw.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-
-GeneralView {
- Item {
- id: navInRoute
- anchors.fill: parent
-
- Image {
- // 3/4 top screen
- id: map
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- source: "../res/nav/map.png"
-
- Image {
- id: compas
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 1/4 * compas.width
- anchors.left: parent.left
- anchors.leftMargin: 1/4 * compas.width
- source: "../res/nav/compass.png"
- }
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: compas.horizontalCenter
- spacing: 1/8 * parent.height
-
- // Zoom "+" button
- Image {
- id: zoomIn
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomInBtn
- anchors.centerIn: parent
- text: "+"
- color: Constants.releasedButtonTextColor
- font.pixelSize: 30
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomInBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomInBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
-
- // Zoom "-" button
- Image {
- id: zoomOut
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomOutBtn
- anchors.centerIn: parent
- text: "-"
- color: "white"
- font.pixelSize: 30
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomOutBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomOutBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
- } // column
-
- // Options button
- Image {
- id: navOptions
- anchors.top: parent.top
- anchors.right: parent.right
- source: "../res/nav/options.png"
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/nav/options_pressed.png"
- }
- onReleased: {
- parent.source = "../res/nav/options.png"
- }
- onClicked: {
- //Options screen
- }
- }
- }
- } //map
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- Image {
- id: muteBtnImg
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 1/4 * muteBtnImg.width
- source: "../res/nav/mute_off.png"
- MouseArea {
- anchors.fill: parent
- onClicked: if (muteBtnImg.state === "off") {
- muteBtnImg.state = "on"
- muteBtnImg.source = "../res/nav/mute_off.png"
- }
- else {
- muteBtnImg.source = "../res/nav/mute_on.png"
- muteBtnImg.state = "off"
- }
- }
- }
-
- Image {
- id: turnArrow
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: muteBtnImg.right
- anchors.leftMargin: 1/20 * contentLoader.width
- source: "../res/nav/turnArrow.png"
- }
-
- Text {
- id: street
- anchors.verticalCenter: cancel.verticalCenter
- anchors.left: turnArrow.right
- anchors.leftMargin: 1/20 * contentLoader.width
- text: "0.2 mi on Cherry Hill Rd."
- color: "White"
- font.pixelSize: 20
- }
-
- Text {
- id: timeToDest
- anchors.verticalCenter: cancel.verticalCenter
- anchors.right: cancel.left
- anchors.rightMargin: 1/20 * contentLoader.width
- text: "2 hrs 27 min"
- color: "White"
- font.pixelSize: 20
- }
-
- Image {
- id: cancel
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
-
- source: "../res/buttons/long_oval_btn.png"
-
- Image {
- id: destIcon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: cancel.left
- anchors.leftMargin: Constants.fontSize
- source: "../res/nav/dest_icon.png"
- }
-
- Text {
- id: cancelText
- anchors.centerIn: parent
- text: "Cancel"
- color: Constants.primaryColor
- font.pixelSize: 20
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- cancel.source = "../res/buttons/long_oval_pressed_btn.png"
- destIcon.source = "../res/nav/dest_icon_black.png"
- cancelText.color = Constants.pressedButtonTextColor
- }
-
- onReleased: {
- cancel.source = "../res/buttons/long_oval_btn.png"
- destIcon.source = "../res/nav/dest_icon.png"
- cancelText.color = Constants.primaryColor
- }
-
- onClicked: {
- contentLoader.go("./views/NavigationNoRouteGridView.qml")
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationKeyboardView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationKeyboardView.qml
deleted file mode 100644
index 3ef73ee67..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationKeyboardView.qml
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * @file NavigationKeyboardView.qml
- * @brief Navigation keyboard screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- id: navKeyboard
- anchors.fill: parent
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- // Text line with input text
- TextInput {
- id: inputText
- anchors.top:parent.top
- anchors.left:parent.left
- maximumLength: 30
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: dataContainer.routeText
- }
-
- // Keyboard
- Column {
- anchors.centerIn: parent
- Row {
- id: upperRow
- property string qWERTY : "QWERTYUIOP"
- anchors.horizontalCenter: parent.horizontalCenter
-
- Repeater {
- model: 10
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: upperRow.qWERTY.charAt(index)
- pixelSize: Constants.fontSize
-
- onClicked: {
- dataContainer.routeText += upperRow.qWERTY.charAt(index)
- }
- }
- }
- }
- Row {
- id: middleRow
- property string aSDFGH : "ASDFGHJKL"
- anchors.horizontalCenter: parent.horizontalCenter
-
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "123"
- pixelSize: 15
- }
- //--------------
- Repeater {
- model: 9
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: middleRow.aSDFGH.charAt(index)
- pixelSize: Constants.fontSize
-
- onClicked: {
- dataContainer.routeText += middleRow.aSDFGH.charAt(index)
- }
- }
- }
- //--------------
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- onIsPressedChanged: {
- hoverImg.source = isPressed ? "../res/nav/delete_icon_black.png" : "../res/nav/delete_icon.png";
- }
- Image {
- id: hoverImg
- anchors.centerIn: parent
- source: "../res/nav/delete_icon.png"
- }
-
- onClicked: {
- dataContainer.routeText = dataContainer.routeText.substring(0,dataContainer.routeText.length - 1)
- }
- }
- }
- Row {
- id: lowerRow
- property string zXCVBN : "ZXCVBNM"
- anchors.horizontalCenter: parent.horizontalCenter
-
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "!@#"
- pixelSize: 15
- }
- //-----------------
- Repeater {
- model: 7
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: lowerRow.zXCVBN.charAt(index)
- pixelSize: Constants.fontSize
-
- onClicked: {
- dataContainer.routeText += lowerRow.zXCVBN.charAt(index)
- }
- }
- }
- //----------------
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "Clear"
- pixelSize: 12
-
- onClicked: {
- dataContainer.routeText = ""
- }
- }
- //----------------
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "Space"
- pixelSize: 12
-
- onClicked: {
- dataContainer.routeText += " "
- }
- }
- }
-
- } // column
-
- Image {
- id: goBtn
- anchors.right: parent.right
- anchors.top: parent.top
- source: "../res/buttons/short_oval_btn.png"
-
- Text {
- id: goText
- anchors.centerIn: parent
- text: "Go"
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- goBtn.source = "../res/buttons/short_oval_btn_pressed.png"
- goText.color = Constants.pressedButtonTextColor
- }
-
- onReleased: {
- goBtn.source = "../res/buttons/short_oval_btn.png"
- goText.color = Constants.primaryColor
- }
-
- onClicked: {
- contentLoader.go("./views/NavigationInRouteGridView.qml")
- }
- }
- }
- } // 3/4 top screen
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- BackButton { anchors.centerIn: parent }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationMenuView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationMenuView.qml
deleted file mode 100644
index 5ceffe052..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationMenuView.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file NavigationMenuView.qml
- * @brief Navigation menu screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models"
-import "../controls"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- anchors.fill: parent
- GridMenu {
- id: menu
- model: NavigationMenuModel {}
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: bottomPanel.top
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- OvalButton {
- text: title
- onReleased: contentLoader.go(qml)
- anchors.centerIn: parent
- fontSize: Constants.fontSize
- }
- }
- }
-
- Item {
- id: bottomPanel
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- height: 1/4 * parent.height
- width: parent.width
-
- BackButton { anchors.centerIn: parent }
- }
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationNoRouteGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationNoRouteGridView.qml
deleted file mode 100644
index 312f07639..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/NavigationNoRouteGridView.qml
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * @file NavigationNoRouteGridView.qml
- * @brief Navigation no route screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- id: navNoRoute
- anchors.fill: parent
-
- Image {
- // 3/4 top screen
- id: map
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- source: "../res/nav/map.png"
-
- Image {
- id: compas
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 1/4 * compas.width
- anchors.left: parent.left
- anchors.leftMargin: 1/4 * compas.width
- source: "../res/nav/compass.png"
- }
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: compas.horizontalCenter
- spacing: 1/8 * parent.height
-
- // Zoom "+" button
- Image {
- id: zoomIn
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomInBtn
- anchors.centerIn: parent
- text: "+"
- color: "white"
- font.pixelSize: Constants.fontSize
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomInBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomInBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
-
- // Zoom "-" button
- Image {
- id: zoomOut
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomOutBtn
- anchors.centerIn: parent
- text: "-"
- color: "white"
- font.pixelSize: Constants.fontSize
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomOutBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomOutBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
- } // column
-
- // Options button
- Image {
- id: navOptions
- anchors.top: parent.top
- anchors.right: parent.right
- source: "../res/nav/options.png"
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/nav/options_pressed.png"
- }
- onReleased: {
- parent.source = "../res/nav/options.png"
- }
- onClicked: {
- //Options screen
- }
- }
- }
- } //map
-
- Item {
- // 1/4 bottom screen
- id: bottomPart
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- // Destination search button
- Image {
- id: destSearch
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- source: "../res/buttons/longest_oval_btn.png"
-
- Image {
- id: destIcon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 15
- source: "../res/nav/dest_icon.png"
- }
-
- Text {
- id: destText
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: destIcon.right
- anchors.leftMargin: 5
- text: "Destination"
- color: Constants.primaryColor
- font.pixelSize: 20
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- destSearch.source = "../res/buttons/longest_oval_btn_pressed.png"
- destIcon.source = "../res/nav/dest_icon_black.png"
- destText.color = Constants.pressedButtonTextColor
- }
-
- onReleased: {
- destSearch.source = "../res/buttons/longest_oval_btn.png"
- destIcon.source = "../res/nav/dest_icon.png"
- destText.color = Constants.primaryColor
- }
-
- onClicked: {
- contentLoader.go("./views/NavigationMenuView.qml")
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneKeyboardView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneKeyboardView.qml
deleted file mode 100644
index b328406d6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneKeyboardView.qml
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * @file PhoneKeyboardView.qml
- * @brief Phone keyboard screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView{
- Component.onCompleted: phoneKeyboard.changeColorOfActiveButtons()
-
- Item {
- function changeColorOfActiveButtons() {
- for (var i = 0; i < contactsListModel.count; i++) {
- activeButtons[contactsListModel.get(i).name[0].toUpperCase()] = true
- }
- }
-
- id: phoneKeyboard
- anchors.fill: parent
-
- property variant activeButtons: {
- "A": false, "B": false, "C": false, "D": false, "E": false,
- "F": false, "G": false, "H": false, "I": false, "J": false,
- "K": false, "L": false, "M": false, "N": false, "O": false,
- "P": false, "Q": false, "R": false, "S": false, "T": false,
- "U": false, "V": false, "W": false, "X": false, "Y": false, "Z": false
- }
-
- ContactsListModel {
- id: contactsListModel
- }
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
-
- Column {
- anchors.centerIn: parent
-
- Row {
- id: upperRow
- property string contentLoader : "ABCDEFGHI"
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: 9
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- textColorDefault: phoneKeyboard.activeButtons[upperRow.contentLoader.charAt(index)]
- ? Constants.primaryColor : Constants.inactiveButtonTextColor
- text: upperRow.contentLoader.charAt(index)
- pixelSize: Constants.fontSize
- onIsPressedChanged: {
- if (!isPressed){
- if (phoneKeyboard.activeButtons[upperRow.contentLoader.charAt(index)]) {
- dataContainer.contactsFirstLetter = text
- contentLoader.go("./views/ContactsListView.qml")
- }
- }
- }
- }
- }
- }
-
- Row {
- id: middleRow
- property string contentLoader : "JKLMNOPQR"
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: 9
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- textColorDefault: phoneKeyboard.activeButtons[middleRow.contentLoader.charAt(index)]
- ? Constants.primaryColor : Constants.inactiveButtonTextColor
- text: middleRow.contentLoader.charAt(index)
- pixelSize: Constants.fontSize
- onIsPressedChanged: {
- if (!isPressed){
- if (phoneKeyboard.activeButtons[middleRow.contentLoader.charAt(index)]) {
- dataContainer.contactsFirstLetter = text
- contentLoader.go("./views/ContactsListView.qml")
- }
- }
- }
- }
- }
- }
-
- Row {
- id: lowerRow
- property string contentLoader : "STUVWXYZ"
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: 8
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- textColorDefault: phoneKeyboard.activeButtons[lowerRow.contentLoader.charAt(index)]
- ? Constants.primaryColor : Constants.inactiveButtonTextColor
- text: lowerRow.contentLoader.charAt(index)
- pixelSize: Constants.fontSize
- onIsPressedChanged: {
- if (!isPressed){
- if (phoneKeyboard.activeButtons[lowerRow.contentLoader.charAt(index)]) {
- dataContainer.contactsFirstLetter = text
- contentLoader.go("./views/ContactsListView.qml")
- }
- }
- }
- }
- }
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "123"
- pixelSize: 20
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent}
- }
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneMenuGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneMenuGridView.qml
deleted file mode 100644
index 7d52b1223..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/PhoneMenuGridView.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * @file PhoneMenuGridView.qml
- * @brief View for phone menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../models"
-import "../controls"
-
-GridMenu {
- id: menu
- model: PhoneMenuModel {}
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- ClickableImage {
- anchors.centerIn: parent
- source: icon
- onClicked: {
- if(qml !== "") {
- contentLoader.go(qml)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/RadioPlayer.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/RadioPlayer.qml
deleted file mode 100644
index 1df65d423..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/RadioPlayer.qml
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @file RadioPlayerView.qml
- * @brief Parent for AM, FM, Sirius players screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-Item {
- id: radioPlayerView
-
- property string radioType: ""
- property string radioName: ""
- property alias buttonHD: bot.children
-
- property PlayerState playerState
-
- Item {
- // top 3/4 screen
- id: upperContent
- anchors.top: parent.top
- anchors.left: parent.left
- height: parent.height * 3/4
- width: parent.width
-
- Item {
- // top part for buttons
- id: top
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: parent.height * 1/4
-
- OvalButton {
- text: radioName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- }
-
- OvalButton {
- anchors.right: parent.right
- anchors.top: parent.top
- text: "Tune"
- fontSize: Constants.fontSize
- }
- }
-
- Item {
- // mid part for information about song
- id: mid
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- width: parent.width
- height: parent.height / 2
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
-
- Row {
- Text {
- id: radioChannelNameText
- color: Constants.primaryColor
- text: playerState.presets[0]
- font.pixelSize: 45
- }
- Text {
- anchors.bottom: radioChannelNameText.bottom
- color: Constants.primaryColor
- text: " " + radioType
- font.pixelSize: 25
- }
- }
-
- Text {
- color: Constants.primaryColor
- text: playerState.songName
- font.pixelSize: 25
- font.bold: true
- }
-
- Text {
- color: Constants.primaryColor
- text: playerState.albumName
- font.pixelSize: 25
- }
- }
- }
-
- Item {
- // bottom part for HD button (for FM radio)
- id: bot
- anchors.left: parent.left
- anchors.bottom: parent. bottom
- width: parent.width
- height: parent.height * 1/4
- }
- }
-
- Item {
- // bottom 1/4 screen
- id: lowerContent
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- // Line that divide screen in two parts
- Rectangle {
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 2
- color: Constants.primaryColor
- }
-
- PresetRow {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- presets: playerState.presets
- width: parent.width
- onSelectedIndexChanged: {
- radioChannelNameText.text = presets[selectedIndex];
- }
- }
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNavi.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNavi.qml
deleted file mode 100644
index 620b0434c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNavi.qml
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * @file SDLNavi.qml
- * @brief SDL navigation screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- applicationContext: true
-
- Item {
- anchors.fill: parent
- id: wholeWindow
-
- Row {
- // Top items
- id: topItems
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 1/6 * parent.height
- spacing: Constants.sdlNaviSpacing
-
- Rectangle {
- anchors.top: parent.top
- width: 1/5 * parent.width
- height: 4/5 * parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
-
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField1
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Rectangle {
- anchors.top: parent.top
- width: 3/5 * parent.width - 2 * parent.spacing
- height: parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
-
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField2
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Rectangle {
- id: rightRectOfTopItems
- anchors.top: parent.top
- width: 1/5 * parent.width
- height: 4/5 * parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField3 ? dataContainer.currentApplication.hmiUIText.mainField3 : "field3"
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-
- Column {
- // "+", "-" button at left
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- width: 1/12 * parent.width
- height: 2/10 * parent.height + spacing
- spacing: Constants.sdlNaviSpacing
-
- GradientRectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- text: "+"
- isCustomButton: true
- customButtonID: 3
- }
- GradientRectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- text: "-"
- isCustomButton: true
- customButtonID: 4
- }
- }
-
- Column {
- anchors.right: parent.right
- anchors.top: topItems.bottom
- width: 1/6 * parent.width
- height: 2/10 * parent.height + spacing
- spacing: Constants.sdlNaviSpacing
-
- Rectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: ""
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Rectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField4 ? dataContainer.currentApplication.hmiUIText.mainField4 : "mainField4"
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-
- Row {
- // bottom items
- id: bottomItems
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/6 * parent.height
- spacing: Constants.sdlNaviSpacing
-
- GradientRectangle {
- anchors.bottom: parent.bottom
- width: 1/3 * parent.width
- height: parent.height
- text: "Menu"
- isCustomButton: true
- customButtonID: 1
- }
- Rectangle {
- anchors.bottom: parent.bottom
- width: 1/3 * parent.width - 2 * parent.spacing
- height: parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: "mainField5"
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- GradientRectangle {
- anchors.bottom: parent.bottom
- width: 1/3 * parent.width
- height: parent.height
- text: "Custom Button"
- isCustomButton: true
- customButtonID: 2
- }
- }
-
- GradientRectangle {
- anchors.right: parent.right
- anchors.bottom: bottomItems.top
- anchors.bottomMargin: Constants.sdlNaviSpacing
- width: 1/6 * parent.width
- height: 1/10 * parent.height
- text: "Options"
- fontSize: Constants.fontSize
- onReleased: {
- contentLoader.go("./views/SDLPlayerOptionsListView.qml", dataContainer.currentApplication.appId)
- }
-
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNonMediaView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNonMediaView.qml
deleted file mode 100644
index bebfe9585..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLNonMediaView.qml
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * @file SDLNonMediaView.qml
- * @brief SDL non media screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-import QtQuick 1.1
-import "../models"
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- applicationContext: true
-
- Item {
- id: upperContent
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- Item {
- id: topButtonRow
- // top 1/4 of screen
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- elementWidth: Constants.ovalButtonWidth
- spacing: (width - 4 * elementWidth) / 3
- snapTo: elementWidth + spacing
-
- OvalButton {
- text: "Options"
- onClicked: { contentLoader.go("./views/SDLPlayerOptionsListView.qml") }
- }
-
- Repeater {
- model: dataContainer.currentApplication.softButtons ?
- dataContainer.currentApplication.softButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.softButtons.get(index)
- }
- }
- }
- }
-
- Column {
- id: midContent
- height: parent.height * 3/4
- width: parent.width
- anchors.top: topButtonRow.bottom
- anchors.left: parent.left
-
- Text {
- id: deviceName
- width: parent.width
- height: 1/5 * parent.height
- text: "Device: " + dataContainer.currentApplication.deviceName
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- Row {
- width: parent.width
- height: 4/5 * parent.height
- spacing: Constants.margin
-
- Image {
- id: image
- height: parent.height
- width: height
- source: dataContainer.currentApplication.hmiUIText.image
- }
-
- Column {
- height: parent.height
- width: parent.width - image.width - parent.spacing
- spacing: Constants.margin
-
- Text {
- id: text1
- width: parent.width
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: dataContainer.hmiUITextAlignment
- text: dataContainer.currentApplication.hmiUIText.mainField1
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- Text {
- width: parent.width
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: dataContainer.hmiUITextAlignment
- text: dataContainer.currentApplication.hmiUIText.mainField2
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
- }
- }
- }
- }
-
- Item {
- // bottom 1/4 screen
- id: lowerContent
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: parent.height * 1/4
-
- PresetRow {
- id: presetsRow
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- presets: Internal.getArrayForPresetRow()
- width: parent.width
- property bool clickProcessed
-
- Timer {
- id: timer
- interval: Constants.presetButtonTimer
- repeat: false
- triggeredOnStart: false
- }
-
- onPresetButtonPressed: {
- timer.start()
- clickProcessed = false
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
-
- onPresetButtonReleased: {
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONUP, undefined)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.SHORT, undefined)
- }
- }
-
- Connections {
- target: timer
- onTriggered: {
- if(!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.LONG, undefined)
- clickProcessed = true
- }
- }
- }
- }
- }
-
- StatusBar {
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerOptionsListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerOptionsListView.qml
deleted file mode 100644
index 076851b29..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerOptionsListView.qml
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * @file SDLPlayerOptionsListView.qml
- * @brief SDL player options screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-GeneralView {
- applicationContext: true
- systemContext: Common.SystemContext.SYSCTXT_MENU
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
-
- ListView {
- id: sdlPlayerOptionsListView
- anchors.horizontalCenter: parent.horizontalCenter
- width:parent.width
- height:parent.height
-
- model: dataContainer.currentApplication.currentSubMenu
-
- delegate: Row {
- spacing: Constants.iconItemListSpacing
- Icon {
- source: model.icon
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
-
- MouseArea {
- anchors.fill: parent
- enabled: model.icon.value !== undefined
-
- onPressed: text.press()
- onReleased: text.release()
- onCanceled: text.release()
- onClicked: text.click()
- }
- }
-
- ClickableText {
- id: text
- text: name + (type === Internal.MenuItemType.MI_SUBMENU ? " >" : "")
- width: sdlPlayerOptionsListView.width - x
- elide: Text.ElideRight
- defaultColor: type === Internal.MenuItemType.MI_PARENT ?
- Constants.inactiveButtonTextColor :
- Constants.primaryColor
- pressedColor: type === Internal.MenuItemType.MI_PARENT ?
- Constants.inactiveButtonTextColorPressed :
- Constants.primaryColorPressed
- font.pixelSize: Constants.titleFontSize
-
- function click() {
- console.debug("enter")
- switch (type) {
- case Internal.MenuItemType.MI_NODE:
- sdlUI.onCommand(model.id, dataContainer.currentApplication.appId)
- contentLoader.back()
- break;
- case Internal.MenuItemType.MI_SUBMENU:
- case Internal.MenuItemType.MI_PARENT:
- dataContainer.currentApplication.currentSubMenu = subMenu
- break;
- }
- console.debug("exit")
- }
- onClicked: click()
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerView.qml
deleted file mode 100644
index 0c1bd5b7e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SDLPlayerView.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file SDLPlayerView.qml
- * @brief SDL player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-GeneralView {
- applicationContext: true
- MediaPlayer {
- id: mediaPlayer
- onPlay: { sdlButtons.onButtonPress(Common.ButtonName.OK, Common.ButtonPressMode.SHORT, undefined) }
- onPause: { sdlButtons.onButtonPress(Common.ButtonName.OK, Common.ButtonPressMode.SHORT, undefined) }
- playerName: "SDL music"
- playerType: "SDL"
- image: dataContainer.currentApplication.hmiUIText.image
- anchors.fill: parent
-
- buttons: [
- OvalButton {
- text: dataContainer.currentApplication.appName
- onReleased: { contentLoader.go("./views/MusicSourceView.qml") }
- },
-
- OvalButton {
- text: "SDL Menu"
- onReleased: { contentLoader.go("./views/ApplicationListView.qml") }
- },
-
- OvalButton {
- text: "Options"
- onReleased: { contentLoader.go("./views/SDLPlayerOptionsListView.qml") }
- },
-
- Repeater {
- model: dataContainer.currentApplication.softButtons ?
- dataContainer.currentApplication.softButtons.count :
- 0
-
- delegate: SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.softButtons.get(index)
- }
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ScrollableMessageView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ScrollableMessageView.qml
deleted file mode 100644
index f7111906d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/ScrollableMessageView.qml
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * @file ScrollableMessageView.qml
- * @brief Scrollable Message View .
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models"
-import "../popups"
-
-GeneralView {
- applicationContext: true
- id: scrollableMessageView
-
- function complete(abort){
- console.debug("enter")
- timer.stop()
- dataContainer.scrollableMessageModel.running = false
-
- dataContainer.popups--
- dataContainer.applicationContext = dataContainer.applicationSavedContext
-
- if(abort) {
- console.debug("send error")
- DBus.sendError(dataContainer.scrollableMessageModel.async, Common.Result.ABORTED)
- } else {
- console.debug("send ok")
- DBus.sendReply(dataContainer.scrollableMessageModel.async, {})
- }
-
- contentLoader.back()
- console.debug("exit")
- }
-
-
- Connections {
- target: contentLoader
- onStatusChanged: {
- if (status == Component.Ready) {
- console.debug("enter")
- console.debug("timeout in timer", timer.interval)
- dataContainer.popups++
- dataContainer.applicationSavedContext = dataContainer.applicationContext
- dataContainer.scrollableMessageModel.running = true
- timer.start()
- console.debug("exit")
- }
- }
- }
-
- Rectangle {
- anchors.fill: parent
- color: Constants.secondaryColor
-
- Timer {
- id: timer
- interval: dataContainer.scrollableMessageModel.timeout
- onTriggered: {
- complete(false)
- }
- }
-
- Item {
- // top 1/6 of screen
- id: top
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: dataContainer.scrollableMessageModel.softButtons.count > 0 ? parent.height * 1/6 : 1
-
- OvalButton {
- //this button is used only to get item size for PagedFlickable
- id: fakeButton
- text: "defaultBtnSize"//remove this line when default size for btn will be introduced
- visible:false
- }
-
- PagedFlickable {
- id: flickRow
- width: top.width
- spacing: (width - fakeButton.width * 4) / 3
- snapTo: fakeButton.width + spacing
- elementWidth: fakeButton.width
-
-
- ListView {
- id: softButtons
- width: model.count * fakeButton.width + (model.count - 1) * flickRow.spacing
- height: fakeButton.height
- spacing: flickRow.spacing
-
- orientation: ListView.Horizontal
- interactive: false
- model: dataContainer.scrollableMessageModel.softButtons
-
- delegate: SoftButton {
- appId: dataContainer.currentApplication.appId
- button: model
- onKeepContext: timer.restart()
- onDefaultAction: scrollableMessageView.complete(true)
- }
- }
- }
- }
-
- Item {
- id: middle
- anchors.top: top.bottom
- anchors.left: parent.left
- anchors.bottom: bottom.top
- width: parent.width
-
- Flickable {
- id:flickable
- anchors.fill: middle
- flickableDirection: Flickable.VerticalFlick
- contentWidth: longMessageText.width
- contentHeight: longMessageText.height
- clip: true
-
-
- Text {
- id: longMessageText
- wrapMode: Text.Wrap
- width: middle.width
- text: dataContainer.scrollableMessageModel.longMessageText
- color: Constants.scrollableMessageTextColor
- font.pixelSize: Constants.fontSize
-
- }
- }
- Rectangle {
- id: scrollbar
- anchors.right: flickable.right
- y: flickable.visibleArea.yPosition * flickable.height
- width: Constants.scrollableMessageScrollBarWidth
- height: flickable.visibleArea.heightRatio * flickable.height
- visible: !(flickable.visibleArea.heightRatio > 1)
- color: Constants.scrollableMessageScrollBarColor
- }
-
- }
-
- Item {
- // 1/4 bottom screen
- id: bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton {
- id:backButton
- anchors.centerIn: parent
- onClicked: {
- console.debug("enter")
- complete(true)
- console.debug("exit")
- }
- }
- }
- }
- /**
- * Test Support Section
- *
- */
- function getTimer(){
- return timer
- }
- function getSoftButtonsListView(){
- return softButtons
- }
- function getScrollbar(){
- return scrollbar
- }
- function getTextArea(){
- return middle
- }
- function getBackButton(){
- return backButton
- }
- /**
- * Test Support Section End
- */
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SimulationView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SimulationView.qml
deleted file mode 100644
index c30d83f01..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SimulationView.qml
+++ /dev/null
@@ -1,284 +0,0 @@
-/**
- * @file SimulationView.qml
- * @brief Area of screen responsible for simulation actions
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../views"
-import "../popups"
-import "../models/Constants.js" as Constants
-
-Rectangle {
- width: controlArea.width + controlArea.anchors.margins
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- color: Constants.panelColor
-
- Item {
- id: showArea
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: parent.height - (controlArea.childrenRect.height + controlArea.anchors.margins)
-
- ExitAllApplicationsPopup {
- id: exitAllApplicationsPopup
- anchors.fill: parent
- visible: false
- }
-
- VehicleInfoPopUp {
- id: viPopUp
- anchors.fill: parent
- }
-
- TBTClientStatePopUp {
- id: tbtClientStatePopUp
- anchors.fill: parent
- visible: false
- }
- }
-
- Item {
- id: controlArea
- anchors.bottom: parent.bottom
- anchors.margins: Constants.panelPadding
- anchors.horizontalCenter: parent.horizontalCenter
- width: table.width
-
- ListModel {
- id: languagesList
-
- Component.onCompleted: {
- for (var name in Common.Language) {
- if (settingsContainer.sdlLanguagesList.indexOf(Common.Language[name]) != -1) {
- append({name: name.replace('_', '-')});
- }
- }
- }
- }
-
- Text {
- id: label
- text: "Languages"
- color: Constants.panelTextColor
- anchors.bottom: table.top
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Grid {
- id: table
- spacing: 5
- columns: 2
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: globalProperties.top
-
- Text {
- text: "HMI UI"
- color: Constants.panelTextColor
- }
-
- Text {
- text: "HMI TTS + VR"
- color: Constants.panelTextColor
- }
-
- ComboBox {
- width: table.width / table.columns - table.spacing
- model: languagesList
- onCurrentIndexChanged: {
- dataContainer.hmiUILanguage = settingsContainer.sdlLanguagesList[currentIndex];
- sdlUI.onLanguageChange(dataContainer.hmiUILanguage);
- }
- z: 1000
- }
-
- ComboBox {
- width: table.width / table.columns - table.spacing
- model: languagesList
- onCurrentIndexChanged: {
- dataContainer.hmiTTSVRLanguage = settingsContainer.sdlLanguagesList[currentIndex];
- sdlTTS.onLanguageChange(dataContainer.hmiTTSVRLanguage);
- sdlVR.onLanguageChange(dataContainer.hmiTTSVRLanguage);
- }
- z: 1000
- }
-
- Text {
- text: "Application UI"
- color: Constants.panelTextColor
- }
-
- Text {
- text: "Application TTS + VR"
- color: Constants.panelTextColor
- }
-
- Text {
- id: uiLanguageLabel
- color: Constants.panelTextColor
- text: " "
- Connections {
- target: dataContainer
- onCurrentApplicationChanged: {
- for (var s in Common.Language) {
- if (Common.Language[s] === dataContainer.currentApplication.hmiDisplayLanguageDesired) {
- uiLanguageLabel.text = s;
- }
- }
- }
- }
- }
-
- Text {
- id: ttsLanguageLabel
- color: Constants.panelTextColor
- text: " "
- Connections {
- target: dataContainer
- onCurrentApplicationChanged: {
- for (var s in Common.Language) {
- if (Common.Language[s] === dataContainer.currentApplication.languageTTSVR) {
- ttsLanguageLabel.text = s;
- }
- }
- }
- }
- }
-
- PushButton {
- id: vehicleInfo
- label: "Vehicle info"
- toggleMode: true
- onPressed: {
- viPopUp.show();
- }
- onUnpressed: {
- viPopUp.hide();
- }
- }
-
- PushButton {
- id: tbtClientState
- label: "TBT Client state"
- toggleMode: true
- onPressed: {
- tbtClientStatePopUp.show();
- }
- onUnpressed: {
- tbtClientStatePopUp.hide();
- }
- }
-
- PushButton {
- label: "Exit application"
- onClicked: {
- if (dataContainer.applicationContext) {
- sdlBasicCommunication.onExitApplication(dataContainer.currentApplication.appId)
- }
- }
- }
-
- PushButton {
- id: exitAllAppsButton
- label: "Exit all apps"
- toggleMode: true
- onPressed: {
- exitAllApplicationsPopup.show()
-
- }
- onUnpressed: {
- exitAllApplicationsPopup.hide()
- }
- Connections {
- target: exitAllApplicationsPopup
- onVisibleChanged: {
- if (!exitAllApplicationsPopup.visible) {
- exitAllAppsButton.state = "unpressed"
- }
- }
- }
- }
-
- CheckBox {
- color: Constants.panelTextColor
- text: "Use URL"
- }
-
- CheckBox {
- color: Constants.panelTextColor
- text: "DD"
-
- onClicked: {
- if (checked) {
- dataContainer.driverDistractionState =
- Common.DriverDistractionState.DD_ON;
- } else {
- dataContainer.driverDistractionState =
- Common.DriverDistractionState.DD_OFF;
- }
- }
- }
- }
-
- Rectangle {
- id: globalProperties
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: listGlobalProperties.height + Constants.panelPadding
- border.color: Constants.panelTextColor
- border.width: 1
- color: Constants.panelColor
- Column {
- id: listGlobalProperties
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.panelPadding / 4
- Text {
- text: "HELP_PROMPT: " + dataContainer.currentApplication.helpPrompt
- color: Constants.panelTextColor
- }
- Text {
- text: "TIMEOUT_PROMPT: " + dataContainer.currentApplication.timeoutPrompt
- color: Constants.panelTextColor
- }
- Text {
- text: "AUTOCOMPLETE_TEXT: " // TODO(ALeshin): Function didn' realized yet
- color: Constants.panelTextColor
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SiriusPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SiriusPlayerView.qml
deleted file mode 100644
index 14dd21130..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/SiriusPlayerView.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file SiriusPlayerView.qml
- * @brief Sirius player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../controls"
-
-GeneralView {
- RadioPlayer {
- id: siriusRadioPlayer
- anchors.fill: parent
- radioType: ""
- radioName: "Sirius"
-
- playerState: dataContainer.siriusPlayerState
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnByTurnView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnByTurnView.qml
deleted file mode 100644
index 630113334..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnByTurnView.qml
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * @file TurnByTurnView.qml
- * @brief View for TurnByTurn.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models"
-
-GeneralView {
- applicationContext: true
-
- Item {
- id: turnByTurnView
- anchors.fill: parent
-
- Item {
- // top 3/4 of screen
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: parent.height * 3/4
-
- Item {
- // row of oval buttons
- id: ovalButtonsRow
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- id: buttonsRow
- width: parent.width
- spacing: (width - 4 * elementWidth) / 3
- anchors.verticalCenter: parent.verticalCenter
- snapTo: Constants.ovalButtonWidth + spacing
- elementWidth: Constants.ovalButtonWidth
-
- OvalButton {
- id: turnListButton
- text: "TurnList"
- onClicked: {
- console.log("Go to TurnListView");
- contentLoader.go("./views/TurnListView.qml");
- }
- }
-
- Repeater {
- model: dataContainer.navigationModel.softButtons ?
- dataContainer.navigationModel.softButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.navigationModel.appId
- button: dataContainer.navigationModel.softButtons.get(index)
- }
- }
- }
- }
-
- Column {
- // Picture + text information + media clock
- id: mediaContent
- width: parent.width
- height: 3/4 * parent.height
- anchors.left: parent.left
- anchors.top: ovalButtonsRow.bottom
-
- Row {
- // picture + text info
- width: parent.width
- height: 3/4 * parent.height
- spacing: Constants.margin
-
- Image {
- id: image
- height: parent.height
- width: height
- source: dataContainer.navigationModel.turnIcon
- }
-
- Column {
- // text info
- id: textInfo
- height: parent.height
- width: parent.width - image.width - parent.spacing
- spacing: (height - 5 * navText1.height) / 4
-
- Text {
- id: navText1
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: dataContainer.navigationModel.text1
- font.pixelSize: Constants.fontSize
- visible: dataContainer.navigationModel.text1
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: dataContainer.navigationModel.text2
- font.pixelSize: Constants.fontSize
- visible: dataContainer.navigationModel.text2
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "Total distance: " + dataContainer.navigationModel.totalDistance
- font.pixelSize: Constants.fontSize
- visible: dataContainer.navigationModel.totalDistance
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "Time to destination: " + dataContainer.navigationModel.timeToDestination
- font.pixelSize: Constants.fontSize
- visible: dataContainer.navigationModel.timeToDestination
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "ETA: " + dataContainer.navigationModel.eta
- font.pixelSize: Constants.fontSize
- visible: dataContainer.navigationModel.eta
- }
- }
- }
-
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- height: 1/4 * parent.height
- width: 2/3 * parent.width
-
- Rectangle {
- id: coveredDistance
- anchors.verticalCenter: parent.verticalCenter
- height: Constants.distanceBarHeight
- width: dataContainer.navigationModel.distanceToManeuver / dataContainer.navigationModel.distanceToManeuverScale * parent.width
- color: "white"
- }
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- height: Constants.distanceBarHeight
- width: parent.width - coveredDistance.width
- color: Constants.primaryColor
- }
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnListView.qml
deleted file mode 100644
index 91ff02ea0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/TurnListView.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * @file TurnListView.qml
- * @brief View for TurnByTurn list.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- applicationContext: true
-
- Item {
- anchors.left: parent.left
- anchors.top: parent.top
- width: parent.width
- height: 3/4 * parent.height
-
- Item {
- id: sotfButtons
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- elementWidth: Constants.ovalButtonWidth
- snapTo: elementWidth + spacing
- spacing: (width - 4 * elementWidth) / 3
-
- Repeater {
- model: dataContainer.currentApplication.turnListSoftButtons ?
- dataContainer.currentApplication.turnListSoftButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.turnListSoftButtons.get(index)
- }
- }
- }
- }
-
- ScrollableListView {
- id: scrollableList
- anchors.top: sotfButtons.bottom
- anchors.left: parent.left
- width: parent.width
- height: 3/4 * parent.height
-
- model: dataContainer.currentApplication.turnList
-
- delegate:
- ListItem {
- width: scrollableList.width
- height: Constants.iconItemListSize
- text: dataContainer.currentApplication.turnList.get(index).navigationText.fieldText
- fontSize: Constants.fontSize
- icon: dataContainer.currentApplication.turnList.get(index).turnIcon
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- id: back
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/UsbPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/UsbPlayerView.qml
deleted file mode 100644
index 4b17b55c1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/UsbPlayerView.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file UsbPlayerView.qml
- * @brief USB player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 1.1
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: usbPlayer
- playerName: "USB"
- anchors.fill: parent
- playerState: dataContainer.usbPlayerState
- image: playerState.albumImage
-
- buttons: [
- OvalButton {
- text: usbPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/WarningInfo.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/WarningInfo.qml
deleted file mode 100644
index e096cb80d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt4/views/WarningInfo.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @file WarningInfo.qml
- * @brief Screen with warning information.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 1.1
-import "../controls"
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: warningInfo
- anchors.fill: parent
- color: Constants.secondaryColor
- Text {
- anchors.top: parent.top
- anchors.left: parent.left
- height: 1/4 * parent.height
- width: parent.width
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-
- text: "WARNING!"
- color: Constants.warningColor
- font.pixelSize: Constants.titleFontSize
- font.bold: true
- style: Text.Raised
- styleColor: "gray"
- }
-
- Text {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.margin
- height: 1/2 * parent.height
- width: parent.width
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- wrapMode: Text.WordWrap
-
- text: "This application is intended to be used as a demonstrative aid only, "
- + "while the vehicle is parked. Don't use it while driving. <br /><br />"
- + "Use extreme caution when using any device that takes your attention off the road. "
- + "Ford recommends against the use of any hand-held device while driving and that you comply "
- + "with all applicable laws. Your primary responsibility is the safe operation of the vehicle."
- color: "white"
- font.pixelSize: 25
- font.bold: true
- }
-
- function showOkButton() {
- okButtonAnimation.start()
- }
-
- Item {
- id: ok
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- opacity: 0
-
- SequentialAnimation
- {
- id: okButtonAnimation
- // Decrease this value while debugging
- PauseAnimation { duration: Constants.warningScreenDuration }
- NumberAnimation {
- target: ok
- duration: Constants.animationDuration
- property: "opacity"
- from: 0; to: 1;
- }
- }
-
- Image {
- id: okButton
- anchors.centerIn: parent
- source: "../res/buttons/longest_oval_btn.png"
-
- Text {
- id: text
- anchors.centerIn: parent
- text: "OK"
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/longest_oval_btn_pressed.png"
- text.color = Constants.secondaryColor
- }
- onReleased: {
- parent.source = "../res/buttons/longest_oval_btn.png"
- text.color = Constants.primaryColor
- }
- onClicked: {
- console.log("WarningInfo OkButton - on clicked enter");
- warningInfo.visible = false
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/.gitignore b/SDL_Core/src/components/qt_hmi/qml_model_qt5/.gitignore
deleted file mode 100644
index 3a4593b4d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.o
-*.pri
-*.so
-.DS_Store
-*.user
-Common.js
-
-Makefile
-moc_*.cpp
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_model_qt5/CMakeLists.txt
deleted file mode 100644
index e6eeb9e52..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/CMakeLists.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.11)
-
-set(components_dir ${CMAKE_CURRENT_SOURCE_DIR}/../..)
-set(dbus_dir ${components_dir}/dbus)
-set(codegen_dir ${dbus_dir}/codegen)
-set(codegen ${codegen_dir}/make_qml_dbus_qml.py)
-set(parser ${codegen_dir}/ford_xml_parser.py)
-set(interfaces_dir ${components_dir}/interfaces)
-set(api_xml ${interfaces_dir}/QT_HMI_API.xml)
-set(proxy_dir ${CMAKE_CURRENT_BINARY_DIR}/hmi_api)
-set(qml_dirs hmi_api controls models popups views)
-set(qml_files MainWindow.qml)
-
-add_custom_target(qml_auto ALL
- COMMAND python ${codegen} --infile ${api_xml} --version ${qt_version} --outdir ${proxy_dir}
- DEPENDS ${api_xml} ${codegen} ${parser}
- COMMENT "Generating files:
- ${proxy_dir}/BasicCommunicationProxy.qml
- ${proxy_dir}/ButtonsProxy.qml
- ${proxy_dir}/NavigationProxy.qml
- ${proxy_dir}/TTSProxy.qml
- ${proxy_dir}/UIProxy.qml
- ${proxy_dir}/VehicleInfoProxy.qml
- ${proxy_dir}/VRProxy.qml
- from:
- ${api_xml} ..."
-)
-
-add_custom_target(qml_copy_resources ALL
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../res ${CMAKE_CURRENT_BINARY_DIR}/res
- COMMENT "Copying resources")
-
-if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- foreach(qml_dir ${qml_dirs})
- add_custom_target(qml_copy_${qml_dir} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${qml_dir} ${CMAKE_CURRENT_BINARY_DIR}/${qml_dir}
- COMMENT "Copying directory ${qml_dir}")
- endforeach(qml_dir)
-
- add_dependencies(qml_auto qml_copy_hmi_api)
-
- foreach(qml_file ${qml_files})
- add_custom_target(qml_copy_${qml_file} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${qml_file} ${CMAKE_CURRENT_BINARY_DIR}/${qml_file}
- COMMENT "Copying file ${qml_file}")
- endforeach(qml_file)
-endif()
-
-install(DIRECTORY
- ${CMAKE_CURRENT_BINARY_DIR}/controls
- ${CMAKE_CURRENT_BINARY_DIR}/hmi_api
- ${CMAKE_CURRENT_BINARY_DIR}/models
- ${CMAKE_CURRENT_BINARY_DIR}/popups
- ${CMAKE_CURRENT_BINARY_DIR}/res
- ${CMAKE_CURRENT_BINARY_DIR}/views
- DESTINATION bin/hmi)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/MainWindow.qml DESTINATION bin/hmi)
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/MainWindow.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/MainWindow.qml
deleted file mode 100644
index 1e952330a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/MainWindow.qml
+++ /dev/null
@@ -1,409 +0,0 @@
-/**
- * @file MainWindow.qml
- * @brief Implementation of main window.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtMultimedia 5.0
-import com.ford.sdl.hmi.dbus_adapter 1.0
-import com.ford.sdl.hmi.log4cxx 1.0
-import com.ford.sdl.hmi.named_pipe_notifier 1.0
-import "./controls"
-import "./views"
-import "./hmi_api" as HmiApi
-import "./models"
-import "./popups"
-import "hmi_api/Common.js" as Common
-import "./models/Constants.js" as Constants
-import "models/Internal.js" as Internal
-
-Rectangle {
- width: 1280
- height: 768
- property string startQml: "./views/ApplicationListView.qml"
- property int minWidth: Constants.mainScreenMinWidth
- property int minHeight: Constants.mainScreenMiHeight
- color: Constants.secondaryColor
-
- DataStorage {
- id: dataContainer
-
- onSystemContextChanged: {
- sdlUI.onSystemContext(systemContext)
- }
-
- // Please note that applicationContext is changed only after setting currentApplication
- onApplicationContextChanged: {
- if (applicationContext) {
- sdlBasicCommunication.onAppActivated(currentApplication.appId)
- } else {
- sdlBasicCommunication.onAppDeactivated(currentApplication.appId, contentLoader.item.category)
- }
- }
- }
-
- Audio {
- id: beep
- source: "res/initial.wav"
- }
-
- Audio {
- id: stream
-
- property real bufferProgress: 0.0
- }
-
- SettingsStorage {
- id: settingsContainer
- }
-
- Item {
- id: mainScreen
- anchors.top: parent. top
- anchors.left: parent.left
- width: (parent.width - simulationScreen.width < minWidth) ?
- minWidth : parent.width - simulationScreen.width
- height: (parent.height - hardwareScreen.height < minHeight) ?
- minHeight : parent.height - hardwareScreen.height
- clip: true
- visible: false
-
- Item {
- anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height * 0.10
- width: parent.width
- HeaderMenu {}
- }
-
- Item {
- height: parent.height * 0.90
- width: parent.width
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
-
- Video {
- id: player
- anchors.fill: parent
- visible: {
- var naviString = new RegExp("SDLNavi\.qml")
- return naviString.test(contentLoader.source);
- }
-
- NamedPipeNotifier {
- id: notifier
- onReadyRead: {
- player.source = name
- player.play()
- }
- }
-
- Component.onCompleted: {
- notifier.start()
- }
- onStopped: {
- notifier.start()
-
- }
- function startStream(url) {
- notifier.name = url
- notifier.start()
- }
- }
-
- Loader {
- id: contentLoader
- height: parent.height - Constants.margin
- width: parent.width - 2 * Constants.margin
- asynchronous: true
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.leftMargin: Constants.margin
- anchors.rightMargin: Constants.margin
- anchors.bottomMargin: Constants.margin
-
-
- source:startQml
- property var viewTransitionStack : []
-
- function reset() {
- viewTransitionStack = []
- }
-
- property string currentLocation
- function go(path, appId) {
- console.debug("enter:", path, ", appId:", appId)
- if (path) {
- if (currentLocation !== path) {
- viewTransitionStack.push({ uri: source.toString(), applicationContext: false })
- if (appId) {
- dataContainer.setCurrentApplication(appId)
- }
- item.leaveScreen()
- currentLocation = path
- source = path
- }
- }
- console.debug("exit")
- }
-
- function back() {
- if (viewTransitionStack.length) {
- item.leaveScreen()
- source = viewTransitionStack.pop().uri
- }
- currentLocation = ""
- }
-
- onStatusChanged: {
- if (status == Component.Ready) {
- if (!dataContainer.activeAlert) {
- dataContainer.applicationContext = item.applicationContext
- }
- else {
- dataContainer.applicationSavedContext = item.applicationContext
- }
- if (viewTransitionStack && viewTransitionStack.length) {
- viewTransitionStack[viewTransitionStack.length - 1].applicationContext = item.applicationContext
- }
- dataContainer.setSystemContext()
- }
- }
- }
- }
-
- WarningInfo { id: warningInfo }
-
- VRHelpPopup {
- id: vrHelpPopup
- popUpName: "UI.VrHelp"
- anchors.centerIn: parent
- visible: false
- }
-
- InteractionPopup {
- id: interactionPopup
- popUpName: "UI.PerformInteraction"
- anchors.centerIn: parent
- visible: false
- }
-
- SliderPopup {
- id: sliderPopup
- popUpName: "UI.Slider"
- anchors.centerIn: parent
- visible: false
- }
-
- PerformAudioPassThruPopup {
- id: performAudioPassThruPopup
- popUpName: "UI.PerformAudioPassThru"
- anchors.centerIn: parent
- visible: false
- }
-
- AlertWindow {
- id: alertWindow
- popUpName: "UI.Alert"
- objectName: "AlertWindow"
- anchors.fill: parent
- visible: false
- }
- }
-
- Item {
- id: simulationScreen
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.left: mainScreen.right
- width: simulationPanel.width
- clip: true
- SimulationView {
- id: simulationPanel
-
- VRPopUp {
- id: vrPopUp
- visible: false
- anchors.fill: parent
- }
-
- TTSPopUp {
- id: ttsPopUp
- anchors.top: parent.top
- anchors.right: parent.right
- visible: false
- }
- }
- }
-
- Item {
- id: hardwareScreen
- anchors.top: mainScreen.bottom
- anchors.left: parent.left
- anchors.right: simulationScreen.left
- height: hardwarePanel.height
- clip: true
- HardwareButtonsView { id: hardwarePanel }
- }
-
- HMIProxy {
- HmiApi.ButtonsProxy {
- id: sdlButtons
- objectName: "Buttons"
- }
- HmiApi.BasicCommunicationProxy {
- id: sdlBasicCommunication
- objectName: "BasicCommunication"
- }
- HmiApi.VRProxy {
- id: sdlVR
- objectName: "VR"
- }
- HmiApi.TTSProxy {
- id: sdlTTS
- objectName: "TTS"
- }
- HmiApi.NavigationProxy {
- id: sdlNavigation
- objectName: "Navigation"
- }
- HmiApi.VehicleInfoProxy {
- id: sdlVehicleInfo
- objectName: "VehicleInfo"
- }
- HmiApi.UIProxy {
- id: sdlUI
- objectName: "UI"
- }
- }
-
- SDLProxy {
- id: sdlProxy
-
- onAppRegistered: {
- var appTypeToAdd = 0
- if (application.appType !== undefined) {
- for (var index in application.appType) {
- if (application.appType[index] > 31) {
- return { __retCode: Common.Result.GENERIC_ERROR, __message: "Apptype value > 31" }
- }
- appTypeToAdd |= 1 << application.appType[index]
- }
- }
-
- dataContainer.addApplication(
- {
- appName: application.appName,
- ngnMediaScreenAppName: application.ngnMediaScreenAppName,
- icon: application.icon,
- deviceName: application.deviceName,
- appId: application.appId,
- hmiDisplayLanguageDesired: application.hmiDisplayLanguageDesired,
- isMediaApplication: application.isMediaApplication,
- appType: appTypeToAdd,
- hmiUIText: { },
- mediaClock: {
- "updateMode": Internal.MediaClockUpdateMode.MCU_COUNTUP,
- "runningMode": Internal.MediaClockRunningMode.MCR_STOPPED,
- "startTime": -1,
- "endTime": -1,
- "startTimeForProgress": -1
- }
- });
- }
-
- onAppUnregistered: {
- console.debug("enter")
- console.debug("Resume unregister:", resume)
- if (resume) {
- dataContainer.stashApplication(appId);
- }
- dataContainer.removeApplication(appId);
- if ((dataContainer.currentApplication.appId === appId)) {
- if (dataContainer.applicationContext) {
- contentLoader.go("views/ApplicationListView.qml");
- }
- if (contentLoader.viewTransitionStack.filter(function(x) { return x.applicationContext })) {
- contentLoader.reset();
- }
- dataContainer.currentApplication.reset()
- }
- console.debug("exit")
- }
-
- onPlayTone: {
- beep.play()
- }
-
- }
-
- Component.onCompleted: {
- dataContainer.hmiVRAvailable = true
- dataContainer.hmiTTSAvailable = true
- dataContainer.hmiNavigationAvailable = true
- dataContainer.hmiVehicleInfoAvailable = true
- dataContainer.hmiUIAvailable = true
-
- sdlBasicCommunication.onReady()
- }
-
- /*
- * Test Support Section
- *
- */
- function getSlider(){
- return sliderPopup
- }
-
- function getDataStorage(){
- return dataContainer
- }
-
- function getUIProxy(){
- return sdlUI
- }
-
- function getMainScreen(){
- return mainScreen
- }
-
- function getContentLoader(){
- return contentLoader
- }
-
- function getWarningInfo(){
- return warningInfo
- }
- /*
- * Test Support Section End
- */
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml
deleted file mode 100644
index 58cba1770..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file ArrowKeys.qml
- * @brief Keys with arrow for cursor movement.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-Item {
- width: buttonOk.width
- height: buttonOk.height
-
- HardwareButton {
- id: arrowUp
- buttonId: Common.ButtonName.TUNEUP
- name: "Up"
- }
- HardwareButton {
- id: arrowDown
- buttonId: Common.ButtonName.TUNEDOWN
- name: "Down"
- }
- HardwareButton {
- id: arrowLeft
- buttonId: Common.ButtonName.SEEKLEFT
- name: "Left"
- }
- HardwareButton {
- id: arrowRight
- buttonId: Common.ButtonName.SEEKRIGHT
- name: "Right"
- }
- HardwareButton {
- id: buttonOk
- buttonId: Common.ButtonName.OK
- name: "Ok"
- longPressAvailable: false
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml
deleted file mode 100644
index 5d82f1559..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file BackButton.qml
- * @brief Button "Back" that return to previous menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-OvalButton {
- text: "Back"
- onClicked: { contentLoader.back() }
- fontSize: Constants.fontSize
- opacity: 0
-
- NumberAnimation on opacity {
- to: 1;
- duration: Constants.animationDuration
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml
deleted file mode 100644
index f0755b398..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * @file CircleButton.qml
- * @brief Parent class for circle button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Image {
- id: circleBtn
- source: imgOff
- property alias text: btnText.text
- property alias pixelSize: btnText.font.pixelSize
- property string dest: ""
- property bool isPressed: false
- property string imgOff: "../res/buttons/round_btn.png"
- property string imgOn: "../res/buttons/round_pressed_btn.png"
- property string textColorOnPressed: Constants.secondaryColor
- property string textColorDefault: Constants.primaryColor
-
- signal clicked()
- function wasClicked()
- {
- clicked()
- }
-
- Text {
- anchors.centerIn: parent
- id: btnText
- color: textColorDefault
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- console.log("CircleButton onPressed enter");
- source = imgOn
- btnText.color = textColorOnPressed
- isPressed = true
- console.log("CircleButton onPressed exit");
- }
- onReleased: {
- console.log("CircleButton onReleased enter");
- source = imgOff
- btnText.color = textColorDefault
- isPressed = false
- console.log("CircleButton onReleased exit");
- }
- onClicked: {
- console.log("CircleButton onClicked enter");
- if(dest !== ""){
- contentLoader.go(dest)
- }
- circleBtn.wasClicked()
- console.log("CircleButton onClicked enter");
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml
deleted file mode 100644
index dc1231570..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file ClickableImage.qml
- * @brief Clickable image item
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Image {
- signal pressed ()
- signal released ()
- signal canceled ()
- signal clicked()
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- parent.scale = Constants.pressedIconScale
- parent.pressed()
- }
-
- onReleased: {
- parent.scale = 1
- parent.released()
- }
-
- onCanceled: {
- parent.scale = 1
- parent.canceled()
- }
-
- onClicked: {
- parent.clicked()
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml
deleted file mode 100644
index c56e3dc13..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file ClickableText.qml
- * @brief Clickable text item
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Text {
- property string defaultColor
- property string pressedColor
- signal pressed ()
- signal released ()
- signal canceled ()
- signal clicked ()
-
- color: defaultColor
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- press()
- parent.pressed()
- }
-
- onReleased: {
- release()
- parent.released()
- }
-
- onCanceled: {
- release()
- parent.canceled()
- }
-
- onClicked: {
- parent.clicked()
- }
- }
-
- function press () {
- color = pressedColor
- }
-
- function release () {
- color = defaultColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml
deleted file mode 100644
index 9211ac1ba..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @file ClimateControlBtn.qml
- * @brief Round button, which is used at climat menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item
-{
- id: climateControlBtn
- width: climateBtnImg.width
- height: climateBtnImg.height
- property string name: ""
- property string txt: ""
- state: "off"
-
- Image {
- id: climateBtnImg
- source: climateControlBtn.state === "off" ? "../res/climate/climate_round_off_btn.png" : "../res/climate/climate_round_on_btn.png"
-
- Image {
- id: hoverImg
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- property string st: climateControlBtn.state === "off" ? "_off" : "_on"
- source: climateControlBtn.name === "" ? "": "../res/climate/" + climateControlBtn.name + st + ".png"
- }
-
- Text {
- id: hoverText
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- text: climateControlBtn.txt
- font.pixelSize: Constants.fontSize
- color: climateControlBtn.state === "off" ? Constants.primaryColor : Constants.secondaryColor
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if(climateControlBtn.state === "on") {
- climateControlBtn.state = "off"
- climateBtnImg.source = "../res/climate/climate_round_off_btn.png"
- if(climateControlBtn.txt != "") {
- hoverText.color = Constants.primaryColor
- }
- if(climateControlBtn.name != "") {
- hoverImg.source = "../res/climate/" + climateControlBtn.name + "_off.png"
- }
- } else {
- climateControlBtn.state = "on"
- climateBtnImg.source = "../res/climate/climate_round_on_btn.png"
- if(climateControlBtn.txt != "") {
- hoverText.color = Constants.secondaryColor
- }
- if(climateControlBtn.name != "") {
- hoverImg.source = "../res/climate/" + climateControlBtn.name + "_on.png"
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml
deleted file mode 100644
index 3695070df..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file GradientRectangle.qml
- * @brief Rectangle with gradient.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-Rectangle {
- property string firstColor: "grey"
- property string secondColor: "#2E2E2E"
- property alias fontSize: text.font.pixelSize
- property alias text: text.text
- property int customButtonID
- property bool isCustomButton: false
- property bool clickProcessed
- signal pressed()
- signal released()
-
- radius: 5
- border.color: "#D3D3D3"
-
- Text {
- id: text
- anchors.fill: parent
- font.pixelSize: Constants.titleFontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- firstColor = "#2E2E2E"
- secondColor = "grey"
- parent.pressed()
- }
- onReleased: {
- firstColor = "grey"
- secondColor = "#2E2E2E"
- parent.released()
- }
- }
-
- Timer {
- id: timer
- interval: Constants.customButtonTimer
- repeat: false
- triggeredOnStart: false
- }
-
- onPressed: {
- if (isCustomButton) {
- timer.start()
- clickProcessed = false
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, customButtonID)
- }
- }
-
- onReleased: {
- if (isCustomButton) {
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, customButtonID)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, customButtonID)
- }
- }
- }
-
- Connections {
- target: timer
- onTriggered: {
- if (isCustomButton) {
- if(!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, customButtonID)
- clickProcessed = true
- }
- }
- }
- }
-
- gradient: Gradient {
- GradientStop {
- position: 0.1
- color: firstColor
- }
- GradientStop {
- position: 0.5
- color: secondColor
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml
deleted file mode 100644
index 39e1f0d7c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file GridItem.qml
- * @brief Item with animation for GridMenu
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- id: item
- opacity: 0
- SequentialAnimation {
- id: animation
- PauseAnimation {duration: index * 100 }
- NumberAnimation {
- target: item
- duration: Constants.animationDuration
- property: "opacity"
- from: 0; to: 1;
- }
- }
- Component.onCompleted: {
- animation.start()
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml
deleted file mode 100644
index 47f034082..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file HardwareButton.qml
- * @brief Parent class for hardware button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import com.ford.sdl.hmi.hw_buttons 1.0
-import "../hmi_api/Common.js" as Common
-
-MaskedContainer {
- property string name
- property int buttonId: Common.ButtonName.CUSTOM_BUTTON
- property bool upDownAvailable: true
- property bool shortPressAvailable: true
- property bool longPressAvailable: true
-
- signal hold
-
- Image {
- source: "../res/controlButtons/" + name + "Button.png"
- }
- Image {
- id: pressedImg
- source: "../res/controlButtons/" + name + "Button_pressed.png"
- visible: false
- Behavior on opacity {
- NumberAnimation { duration: 80 }
- }
- }
- Timer {
- id: timer
- interval: 2000
- repeat: false
- triggeredOnStart: false
- }
- property bool clickProcessed
- onPressed: {
- clickProcessed = false
- pressedImg.visible = true
- timer.start()
- if (upDownAvailable) {
- sdlButtons.onButtonEvent(buttonId, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
- }
-
- onReleased: {
- if (upDownAvailable) {
- sdlButtons.onButtonEvent(buttonId, Common.ButtonEventMode.BUTTONUP, undefined)
- }
- timer.stop()
- if (!clickProcessed && shortPressAvailable) {
- sdlButtons.onButtonPress(buttonId, Common.ButtonPressMode.SHORT, undefined)
- }
- pressedImg.visible = false
- }
-
- Connections {
- target: timer
- onTriggered: {
- if(!clickProcessed && longPressAvailable) {
- sdlButtons.onButtonPress(buttonId, Common.ButtonPressMode.LONG, undefined)
- clickProcessed = true
- hold()
- }
- }
- }
-
- Component.onCompleted: {
- if (buttonId !== Common.ButtonName.CUSTOM_BUTTON) {
- settingsContainer.buttonCapabilities.push(
- {
- name: buttonId,
- upDownAvailable: upDownAvailable,
- shortPressAvailable: shortPressAvailable,
- longPressAvailable: longPressAvailable
- });
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml
deleted file mode 100644
index afc6ea0ca..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * @file HeaderMenu.qml
- * @brief Header menu view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- id: headerMenu
- anchors.fill: parent
-
- Text {
- anchors.leftMargin: Constants.margin
- anchors.topMargin: Constants.margin
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: "75°"
- }
-
- Item {
- width: menuText.width
- height: parent.height
- anchors.topMargin: Constants.margin
- anchors.horizontalCenter: headerMenu.horizontalCenter
- signal clicked ()
-
- ClickableText {
- id: menuLogo
- anchors.horizontalCenter: menuText.horizontalCenter
- anchors.bottom: parent.verticalCenter
- text: "≡"
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.fontSize
-
- onClicked: parent.clicked()
- onPressed: menuText.press()
- onReleased: menuText.release()
- onCanceled: menuText.release()
- }
-
- ClickableText {
- id: menuText
- anchors.top: parent.verticalCenter
- text: "MENU";
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.fontSize
-
- onClicked: parent.clicked()
- onPressed: menuLogo.press()
- onReleased: menuLogo.release()
- onCanceled: menuLogo.release()
- }
-
- onClicked: {
- contentLoader.go("./views/MainMenuView.qml")
- }
- }
-
- Row {
- id: clock
- height: childrenRect.height
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.rightMargin: Constants.margin
- anchors.topMargin: Constants.margin
- property date date: new Date()
-
- Timer {
- running: true
- repeat: true
- interval: 1000
- onTriggered: {
- clock.date = new Date();
- }
- }
-
- Text {
- text: Qt.formatTime(clock.date, "hh");
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
-
- Item {
- width: 10
- height: parent.height
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: clock.date.getSeconds() % 2 ? ":" : ""
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
- }
-
- Text {
- text: Qt.formatTime(clock.date, "mm");
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml
deleted file mode 100644
index 2aa701942..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * @file Navigation.qml
- * @brief Icon.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-Item {
- property var source
-
- Image {
- anchors.fill: parent
- source: url(parent.source)
-
- function image(turnIcon) {
- if (turnIcon && turnIcon.imageType === Common.ImageType.STATIC) {
- return turnIcon.value;
- } else {
- return "";
- }
- }
-
- function url(turnIcon) {
- if (turnIcon && turnIcon.imageType === Common.ImageType.DYNAMIC) {
- return turnIcon.value;
- } else {
- return "";
- }
- }
- }
-
- function reset () {
- source = undefined
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml
deleted file mode 100644
index 637323724..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file Entry.qml
- * @brief Entry with icon and text for list.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: main
- color: Constants.transparentColor
-
- property alias text: label.text
- property alias fontSize: label.font.pixelSize
- property alias icon: image.source
-
- Icon {
- id: image
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
- anchors.left: parent.left
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenter: parent.verticalCenter
- visible: source ? true : false
- }
- Text {
- id: label
- anchors.verticalCenter: parent.verticalCenter
- height: image.height
- width: parent.width - image.width
- z: 50
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- text: "Name Entry"
- anchors.left: image.right
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenterOffset: 0
- visible: text !== ""
- color: Constants.primaryColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml
deleted file mode 100644
index a7f91dd39..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @file MaskedButton.qml
- * @brief Masked button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import com.ford.sdl.hmi.hw_buttons 1.0
-
-MaskedContainer {
- property string name
-
- Image {
- id: icon
- source: "../res/controlButtons/" + name + "Button.png"
- }
-
- onPressed: {
- state = "pressed";
- }
-
- onReleased: {
- state = "";
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: icon
- source: "../res/controlButtons/" + name + "Button_pressed.png"
- }
- }
-
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml
deleted file mode 100644
index 32626d292..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-MultiPointTouchArea {
- property date created
-
- minimumTouchPoints: 1
- maximumTouchPoints: 10
-
- MouseArea {
- anchors.fill: parent
-
- function mouseTouchEvent() {
- var now = new Date()
- var touchEvents = [
- {
- id: 0,
- ts: [now.valueOf() - created.valueOf()],
- c: [{x: mouseX, y: mouseY}]
- }
- ]
- return touchEvents
- }
-
- onPressed: {
- sdlUI.onTouchEvent(Common.TouchType.BEGIN, mouseTouchEvent())
- }
- onReleased: {
- sdlUI.onTouchEvent(Common.TouchType.END, mouseTouchEvent())
- }
- onCanceled: {
- sdlUI.onTouchEvent(Common.TouchType.END, mouseTouchEvent())
- }
- onPositionChanged: {
- sdlUI.onTouchEvent(Common.TouchType.MOVE, mouseTouchEvent())
- }
- }
-
- function touchEvents() {
- var now = new Date()
- var touchEvents = []
- for (var i = 0; i < touchPoints.length; ++i) {
- touchEvents.push(
- {
-// pointId is guaranteed to be unique but is not guaranteed to fit in range
-// perhaps we will have to edit protocol xml
- id: touchPoints[i].pointId,
- ts: [now.valueOf() - created.valueOf()],
- c: [{x: touchPoints[i].x, y: touchPoints[i].y}]
- }
- )
- }
- return touchEvents
- }
-
- onPressed: {
- sdlUI.onTouchEvent(Common.TouchType.BEGIN, touchEvents())
- }
- onReleased: {
- sdlUI.onTouchEvent(Common.TouchType.END, touchEvents())
- }
- onCanceled: {
- sdlUI.onTouchEvent(Common.TouchType.END, touchEvents())
- }
- onUpdated: {
- sdlUI.onTouchEvent(Common.TouchType.MOVE, touchEvents())
- }
- Component.onCompleted: {
- created = new Date()
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml
deleted file mode 100644
index 6d68a9096..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * @file OvalButton.qml
- * @brief Oval button with flexible width.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-import "../models/Constants.js" as Constants
-
-// Don't change constants. It break button
-// TODO (dchmerev@luxoft.com): make this comment more clear
-// todo (ykazakov): eliminate this problem and remove all such comments
-
-Item {
- id: main
- width: dynamic ? field.width + 2 * left.width : Constants.ovalButtonWidth
- height: Constants.ovalButtonHeight
-
- signal clicked;
- signal pressed;
- signal released;
- signal pressAndHold;
- property alias text: label.text
- property alias fontSize: label.font.pixelSize
- property alias icon: image.source
- property bool highlighted: false
- property bool dynamic: false
- property bool disabled: false
-
- function hue() {
- var ret = 0;
- if (disabled) {
- ret = Constants.disabledButtonHue;
- } else if (highlighted) {
- ret = Constants.highlightedButtonHue;
- }
- return ret;
- }
-
- function saturation() {
- var ret = 0;
- if (disabled) {
- ret = Constants.disabledButtonSaturation;
- } else if (highlighted) {
- ret = Constants.highlightedButtonSaturation;
- }
- return ret;
- }
-
- function lightness() {
- var ret = 0;
- if (disabled) {
- ret = Constants.disabledButtonLightness;
- } else if (highlighted) {
- ret = Constants.highlightedButtonLightness;
- }
- return ret;
- }
-
- Item {
- id: buttonBorderImage
- visible: false
- anchors.fill: parent
- Image {
- id: left
- width: 31
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.top: parent.top
- source: "../res/buttons/oval_btn_left.png"
- }
-
- Image {
- id: right
- width: 31
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- source: "../res/buttons/oval_btn_right.png"
- }
-
- Image {
- id: top
- height: 10
- anchors.right: parent.right
- anchors.rightMargin: 31
- anchors.left: parent.left
- anchors.leftMargin: 31
- anchors.top: parent.top
- fillMode: Image.TileHorizontally
- source: "../res/buttons/oval_btn_top.png"
- }
-
- Image {
- id: bottom
- height: 11
- anchors.right: parent.right
- anchors.rightMargin: 31
- anchors.left: parent.left
- anchors.leftMargin: 31
- anchors.bottom: parent.bottom
- fillMode: Image.TileHorizontally
- source: "../res/buttons/oval_btn_bottom.png"
- }
- }
-
- HueSaturation {
- anchors.fill: buttonBorderImage
- source: buttonBorderImage
- hue: main.hue()
- saturation: main.saturation()
- lightness: main.lightness()
- }
-
- Rectangle {
- id: background
- color: Constants.transparentColor
- anchors.fill: parent
- anchors.rightMargin: 31
- anchors.leftMargin: 31
- anchors.bottomMargin: 10
- anchors.topMargin: 10
- visible: false
- }
-
- HueSaturation {
- anchors.fill: background
- source: background
- hue: main.hue()
- saturation: main.saturation()
- lightness: main.lightness()
- }
-
- MouseArea {
- id: mousearea
- anchors.rightMargin: 15
- anchors.leftMargin: 15
- anchors.bottomMargin: 11
- anchors.topMargin: 10
- anchors.fill: parent
- enabled: !parent.disabled
- onPressed: {
- parent.state = "pressed";
- parent.pressed();
- }
- onReleased: {
- parent.state = "";
- parent.released();
- }
- onClicked: {
- parent.clicked();
- }
- onPressAndHold: {
- parent.pressAndHold();
- }
- onCanceled: {
- parent.state = "";
- }
- }
-
- Item {
- id: field
- anchors.fill: background
-
- Icon {
- id: image
- width: Constants.iconButtonSize
- height: Constants.iconButtonSize
- anchors.verticalCenter: parent.verticalCenter
- visible: source ? true : false
- }
- Text {
- id: label
- width: image.visible ? parent.width - image.width : parent.width
- color: Constants.primaryColor
- anchors.centerIn: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: Constants.ovalButtonFontSize
- visible: false
- elide: Text.ElideRight
- }
- HueSaturation {
- anchors.fill: label
- source: label
- hue: main.hue()
- saturation: main.saturation()
- lightness: main.lightness()
- visible: label.text !== ""
- }
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: left
- source: "../res/buttons/oval_btn_pressed_left.png"
- }
-
- PropertyChanges {
- target: right
- source: "../res/buttons/oval_btn_pressed_right.png"
- }
-
- PropertyChanges {
- target: background
- color: Constants.primaryColor
- }
-
- PropertyChanges {
- target: label
- color: Constants.secondaryColor
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml
deleted file mode 100644
index 5b150d560..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * @file PagedFlickable.qml
- * @brief Animated row.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Item
-{
- id: flickablePage
- height: container.height + pager.height
- default property alias content: containerRow.children
- property alias spacing: containerRow.spacing
- property int elementWidth
- property int snapTo
- property int count: 0
-
- Flickable {
- id: container
- anchors.bottom: parent.bottom
- maximumFlickVelocity: 1500
- contentWidth: containerRow.width
- height: containerRow.height
- width: parent.width
- interactive: contentWidth > width
-
- onMovementEnded: {
- var rest = contentX % snapTo
- var t = 0.25
- if (rest > parent.snapTo / 2) {
- rest = rest - parent.snapTo
- }
- var vel = 2 * rest / t
- flickDeceleration = Math.abs(vel) / t
- flick(vel, 0)
- flickDeceleration = 1500
- }
- Row {
- id: containerRow
- anchors.verticalCenter: parent.verticalCenter
- }
- }
-
- Pager {
- id: pager
- space: 7
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.top
-
- pages: {
- if ( (container.contentWidth % container.width) >= (flickablePage.elementWidth / 2 + flickablePage.spacing)) {
- return Math.ceil(container.contentWidth / container.width)
- }
- else {
- return Math.floor(container.contentWidth / container.width)
- }
- }
-
- activePage: {
- if (container.contentX <= 0) {
- return 0
- }
- else if ( (container.contentWidth - container.contentX) < container.width) {
- return pages -1
- }
- else {
- if ( (container.contentX % container.width) >= (flickablePage.elementWidth / 2 + flickablePage.spacing)) {
- return Math.ceil(container.contentX / container.width)
- }
- else if ( (container.contentX % container.width) > 0) {
- return Math.floor(container.contentX / container.width)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml
deleted file mode 100644
index 53d99436c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file Pager.qml
- * @brief Bubbles that indicate about page switch.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Row {
- id: pager
- property int pages
- property int activePage: 0
- property int space
- property int itemsInRowOnScreen: 3
-
- spacing: space
- visible: pages !== 1
-
- Repeater {
- model: pages
- Image {
- source: index === activePage ? "../res/white_ball.png" : "../res/blue_ball.png"
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml
deleted file mode 100644
index bb1cb3838..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file PlayPauseButton.qml
- * @brief Behavior of Play/Pause button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Image {
- id: playPauseButton
- property string sourceOnPressed: ""
- property string sourceOnReleased: ""
-
- signal clicked
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- playPauseButton.source = playPauseButton.sourceOnPressed
- }
- onReleased: {
- playPauseButton.source = playPauseButton.sourceOnReleased
- }
- onClicked: {
- playPauseButton.clicked()
- }
- }
- states: [
- State {
- name: "Play"
- PropertyChanges {
- target: playPauseButton
- source: "../res/buttons/player_play_btn.png"
- sourceOnPressed: "../res/buttons/player_play_pressed_btn.png"
- sourceOnReleased: "../res/buttons/player_pause_btn.png"
- }
- },
-
- State {
- name: "Pause"
- PropertyChanges {
- target: playPauseButton
- source: "../res/buttons/player_pause_btn.png"
- sourceOnPressed: "../res/buttons/player_pause_pressed_btn.png"
- sourceOnReleased: "../res/buttons/player_play_btn.png"
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml
deleted file mode 100644
index 95a751c39..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file PowerSwitchBtn.qml
- * @brief On/Off button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: powerSwitchBtn
- state: "Turn ON"
- width: 120
- height: 80
- radius: 5
- property bool pressed;
-
- gradient: Gradient {
- GradientStop { position: pressed ? 1.0 : 0.0; color: "#2c2c2c" }
- GradientStop { position: pressed ? 0.0 : 1.0; color: "black" }
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.pressed = true
- }
- onReleased: {
- parent.pressed = false
- parent.state = parent.state === "Turn ON" ? "Turn OFF" : "Turn ON"
- btnText.text = parent.state
- if (parent.state === "Turn OFF") {
- contentLoader.reset()
- mainScreen.visible = true
- warningInfo.showOkButton()
- }
- }
- }
-
- Text {
- id: btnText
- color: "red"
- text: parent.state
- anchors.centerIn: parent
- font.pixelSize: Constants.powerButtonFornSize
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml
deleted file mode 100644
index 32e74d71b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * @file PresetRow.qml
- * @brief Animated row with radio stations.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- id: presetRow
- height: childrenRect.height
- property variant presets: []
- property int selectedIndex: 0
- signal presetSelected
- signal presetButtonPressed()
- signal presetButtonReleased()
- signal presetButtonClicked()
- signal presetButtonHold()
-
- Image {
- id: circleButton
- source: "../res/buttons/preset_pressed_btn.png"
- visible: false
- enabled: false
- }
-
- PagedFlickable {
- width: parent.width
- spacing: (width - (circleButton.width * 4)) / 3
- snapTo: spacing + circleButton.width
- elementWidth: circleButton.width
-
- Repeater {
- model: presetRow.presets.length
- delegate:
- Column {
- width: circleButton.width
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- source: presetRow.selectedIndex === index ? "../res/buttons/preset_pressed_btn.png" : "../res/buttons/preset_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- presetRow.selectedIndex = index;
- presetButtonPressed()
- }
- onReleased: {
- presetRow.selectedIndex = index;
- presetButtonReleased()
- }
- onClicked: {
- presetRow.selectedIndex = index
- presetButtonClicked()
- }
- onPressAndHold: {
- presetRow.selectedIndex = index;
- presetButtonHold()
- }
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- text: index + 1
- font.pixelSize: Constants.fontSize
- color: presetRow.selectedIndex === index ? Constants.secondaryColor : Constants.primaryColor
- }
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: presetRow.presets[index]
- font.pixelSize: Constants.fontSize
- color: "white"
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml
deleted file mode 100644
index f83370a20..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * @file PushButton.qml
- * @brief Simple button
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Rectangle {
- id: toggleButton
- width: 160
- height: 40
- radius: 2
- border.width: 2
- border.color: "#000000"
- gradient: grUnpressed
-
- property alias label : label.text
-
- signal pressed()
- signal unpressed()
- signal clicked()
-
- property bool toggleMode: false
-
- state: "unpressed"
- onStateChanged: {
- if (state == "pressed") {
- pressed();
- } else {
- unpressed();
- }
- }
-
- Text {
- id: label
- color: "white"
- text: "PushButton"
- font.pixelSize: 18
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.fill: parent
- }
- MouseArea {
- id: mouseArea
-
- anchors.fill: parent
- onPressed: {
- if (toggleMode) {
- if (parent.state == "unpressed") {
- parent.state = "pressed"
- } else {
- parent.state = "unpressed"
- }
- } else {
- parent.state = "pressed"
- }
- }
- onReleased: {
- if (!toggleMode) {
- parent.state = "unpressed"
- if (mouse.isClick) {
- parent.clicked()
- }
- }
- }
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: toggleButton
- gradient: grPressed
- }
- },
- State {
- name: "unpressed"
- PropertyChanges {
- target: toggleButton
- gradient: grUnpressed
- }
- }
- ]
-
- Gradient {
- id: grUnpressed
-
- GradientStop { position: 0.0; color: "#2c2c2c" }
- GradientStop { position: 1.0; color: "#0c0c0c" }
- }
-
- Gradient {
- id: grPressed
-
- GradientStop { position: 0.0; color: "black" }
- GradientStop { position: 1.0; color: "black" }
- }
-
- transitions: [
- Transition {
- from: "unpressed"
- to: "pressed"
- reversible: true
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml
deleted file mode 100644
index a63960d16..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @file ScrollableListView.qml
- * @brief ListView with scrollbar on the right
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-ListView {
- clip: true
-
- Rectangle {
- visible: parent.height < parent.contentHeight
- anchors.right: parent.right
- y: parent.visibleArea.yPosition * parent.height
- width: Constants.scrollBarWidth
- height: parent.visibleArea.heightRatio * parent.height
- color: Constants.primaryColor
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js
deleted file mode 100644
index 227f63836..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file SoftButton.js
- * @brief Soft button view constants
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-.pragma library
-
-var Action = {
- doOnClicked: 0,
- doOnReleased: 1
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
deleted file mode 100644
index 0f3cfd714..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file SoftButton.qml
- * @brief Soft button view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "SoftButton.js" as SoftButton
-
-OvalButton {
- property var button
- property int appId
- visible: !!button
-
- signal defaultAction;
- signal stealFocus;
- signal keepContext;
-
- property int actionOrder: SoftButton.Action.doOnClicked
-
- highlighted: button ? button.isHighlighted : false
- onPressed: {
- actionOrder = SoftButton.Action.doOnClicked
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, button.softButtonID)
- }
-
- onReleased: {
- if (actionOrder === SoftButton.Action.doOnReleased) {
- switch (button.systemAction) {
- case Common.SystemAction.DEFAULT_ACTION:
- defaultAction();
- break;
- case Common.SystemAction.STEAL_FOCUS:
- stealFocus();
- break;
- case Common.SystemAction.KEEP_CONTEXT:
- keepContext();
- break;
- }
- }
-
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, button.softButtonID)
- }
-
- onClicked: {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, button.softButtonID);
- switch (button.systemAction) {
- case Common.SystemAction.DEFAULT_ACTION:
- defaultAction();
- break;
- case Common.SystemAction.STEAL_FOCUS:
- stealFocus();
- break;
- case Common.SystemAction.KEEP_CONTEXT:
- keepContext();
- break;
- }
- }
-
- onPressAndHold: {
- actionOrder = SoftButton.Action.doOnReleased; // action should be triggered on release
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, button.softButtonID);
- }
-
- onButtonChanged: {
- icon = button && button.type !== Common.SoftButtonType.SBT_TEXT ? button.image : undefined;
- text = button && button.type !== Common.SoftButtonType.SBT_IMAGE ? button.text : ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml
deleted file mode 100644
index c06ebc45e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @file StatusBar.qml
- * @brief Status bar that contains text string.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Text {
- text: dataContainer.currentApplication.hmiUIText.statusBar
- color: Constants.primaryColor
- font.pixelSize: Constants.statusBarFontSize
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Async.js b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Async.js
deleted file mode 100644
index ebc5bfa3c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Async.js
+++ /dev/null
@@ -1,7 +0,0 @@
-.pragma library
-
-var async_uid = 1;
-
-function AsyncCall() {
- this.__async_uid = async_uid++;
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/BasicCommunication.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/BasicCommunication.qml
deleted file mode 100644
index 04b369283..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/BasicCommunication.qml
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * @file BasicCommunication.qml
- * @brief Implement of interface Basic Communication.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Item {
- function updateDeviceList (deviceList) {
- var deviceListLog = "";
- if (deviceList) {
- for (var i = 0; i < deviceList.length; i++) {
- deviceListLog += "{name: '" + deviceList[i].name + "', " +
- "id: '" + deviceList[i].id + "'},";
- }
- }
- console.log("Message Received - {method: 'BasicCommunication.UpdateDeviceList', params:{ " +
- "deviceList: [" + deviceListLog + "]" +
- "}}")
- dataContainer.deviceList.clear();
- for(var i = 0; i < deviceList.length; i++) {
- dataContainer.deviceList.append({ name: deviceList[i].name, devid: deviceList[i].id })
- }
- }
-
- function updateAppList (applications) {
- var applicationsLog = "",
- appTypeLog = "";
- if (applications) {
- for (var i = 0; i < applications.length; i++) {
- appTypeLog = "";
-
- for (var j = 0; j < applications[i].appType.length; i++) {
- appTypeLog += "'" + applications[i].appType + "', "
- }
-
- applicationsLog += "{name: '" + applications[i].name + "', " +
- "appName: '" + applications[i].appName + "', " +
- "ngnMediaScreenAppName: '" + applications[i].ngnMediaScreenAppName + "', " +
- "icon: '" + applications[i].icon + "', " +
- "deviceName: '" + applications[i].deviceName + "', " +
- "appID: " + applications[i].appID + ", " +
- "hmiDisplayLanguageDesired: '" + applications[i].hmiDisplayLanguageDesired + "', " +
- "isMediaApplication: " + applications[i].isMediaApplication + ", " +
- "appType: [" + applications[i].deviceName + "]" +
- "},";
- }
- }
- console.log("Message Received - {method: 'BasicCommunication.UpdateAppList', params:{ " +
- "applications: [" + applicationsLog + "]" +
- "}}")
-
-
- dataContainer.applicationList.clear();
- for(var i = 0; i < applications.length; i++) {
- dataContainer.applicationList.append({
- appName: applications[i].appName,
- ngnMediaScreenAppName: applications[i].ngnMediaScreenAppName,
- icon: applications[i].icon,
- deviceName: applications[i].deviceName,
- appId: applications[i].appID,
- hmiDisplayLanguageDesired: applications[i].hmiDisplayLanguageDesired,
- isMediaApplication: applications[i].isMediaApplication,
- appType: applications[i].appType
- });
- }
- }
-
- function getResumeResult (appID) {
- return dataContainer.getResumeResult(appID)
- }
-
- function allowDeviceToConnect (device) {
- console.log("Message Received - {method: 'BasicCommunication.AllowDeviceToConnect', params:{ " +
- "device: {name: '" + device.name + "', " +
- "id: '" + device.id + "'}," +
- "}}")
- return {
- allow: true
- }
- }
-
- function mixingAudioSupported() {
- console.log("Message Received - {method: 'BasicCommunication.MixingAudioSupported'}")
- return {
- attenuatedSupport: true
- }
- }
-
- function allowAllApps() {
- console.log("Message Received - {method: 'BasicCommunication.AllowAllApps'}")
- return {
- allowed: true
- }
- }
-
- function allowApp(app, appPermissions) {
- console.log("Message Received - {method: 'BasicCommunication.AllowApp'}")
- return {
- allowed: true
- }
- }
-
- function activateApp() {
- console.log("Message Received - {method: 'BasicCommunication.ActivateApp', params:{ " +
- //"appID: " + appID +
- "}}")
- contentLoader.go("views/SDLPlayerView.qml", appID);
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Buttons.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Buttons.qml
deleted file mode 100644
index b8b3da593..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Buttons.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file Buttons.qml
- * @brief Implement of interface Buttons.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-Item
-{
- function getCapabilities() {
- console.log("Message Received - {method: 'Buttons.GetCapabilities'}")
- return {
- capabilities: settingsContainer.buttonCapabilities,
- presetBankCapabilities: {
- onScreenPresetsAvailable: true
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Navigation.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Navigation.qml
deleted file mode 100644
index bab54220b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/Navigation.qml
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * @file Navigation.qml
- * @brief Navigation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "Common.js" as Common
-
-Item {
- function isReady () {
- console.log("Message Received - {method: 'Navigation.IsReady'}")
- return {
- available: dataContainer.hmiNavigationAvailable
- }
- }
-
- function showConstantTBT(navigationTexts, turnIcon, nextTurnIcon, distanceToManeuver,
- distanceToManeuverScale, maneuverComplete,
- softButtons, appID) {
- console.debug("enter")
- var navigationTextsLog = "",
- softButtonsLog = "",
- turnIconLogs = "",
- nextTurnIconLogs = "";
- if (navigationTexts) {
- for (var i = 0; i < navigationTexts.length; i++) {
- navigationTextsLog += "{fieldName: '" + navigationTexts[i].fieldName + "', " +
- "fieldText: '" + navigationTexts[i].fieldText + "'},";
- }
- }
- if (softButtons) {
- for (var i = 0; i < softButtons.length; i++) {
- softButtonsLog += "{type: '" + softButtons[i].type + "', " +
- "text: " + softButtons[i].text + "', ";
- softButtons[i].image ? softButtonsLog += "image: " + "{value: '" + softButtons[i].image.value + "', imageType: " + softButtons[i].image.imageType + "}, " : softButtonsLog += "";
- softButtonsLog += "isHighlighted: " + softButtons[i].isHighlighted + "', " +
- "softButtonID: " + softButtons[i].softButtonID + "', " +
- "systemAction: " + softButtons[i].systemAction +
- "},";
- }
- }
- if (turnIcon) {
- turnIconLogs = "{value: '" + turnIcon.value + "', imageType: " + turnIcon.imageType + "}";
- }
- if (nextTurnIcon) {
- nextTurnIconLogs = "{value: '" + nextTurnIcon.value + "', imageType: " + nextTurnIcon.imageType + "}";
- }
- console.log("Message Received - {method: 'Navigation.ShowConstantTBT', params:{ " +
- "navigationTexts: [" + navigationTextsLog + "], " +
- "turnIcon: " + turnIconLogs + ", " +
- "nextTurnIcon: " + nextTurnIconLogs + ", " +
- "distanceToManeuver: " + distanceToManeuver + ", " +
- "distanceToManeuverScale: " + distanceToManeuverScale + ", " +
- "maneuverComplete: " + maneuverComplete + ", " +
- "softButtons: [" + softButtonsLog + "], " +
- "appID: " + appID +
- "}}")
-
- var app = dataContainer.getApplication(appID)
- var dataToUpdate = {}
-
- navigationTexts.forEach(fillTexts, dataToUpdate)
- if (turnIcon !== undefined) { dataToUpdate.turnIcon = turnIcon }
- if (nextTurnIcon !== undefined) { dataToUpdate.nextTurnIcon = nextTurnIcon }
- if (distanceToManeuver !== undefined) {
- dataToUpdate.distanceToManeuver = distanceToManeuver
- } else {
- DBus.sendReply( {__retCode: Common.Result.INVALID_DATA, __message: "distanceToManeuver absence"} )
- }
- if (distanceToManeuverScale !== undefined) {
- dataToUpdate.distanceToManeuverScale = distanceToManeuverScale
- } else {
- DBus.sendReply( {__retCode: Common.Result.INVALID_DATA, __message: "distanceToManeuverScale absence"} )
- }
- if (maneuverComplete !== undefined) {
- dataToUpdate.maneuverComplete = maneuverComplete
- }
- if (softButtons !== undefined) {
- app.navigationSoftButtons.clear()
- softButtons.forEach(function(x) { app.navigationSoftButtons.append(x); });
- }
- if (appID !== undefined) {
- dataToUpdate.appID = appID
- } else {
- dBus.sendReply( {__retCode: Common.Result.INVALID_DATA, __message: "appID absence"} )
- }
-
- dataContainer.setApplicationProperties(appID, { navigationModel : dataToUpdate } )
- contentLoader.go("./views/TurnByTurnView.qml", appID)
- }
-
- function alertManeuver(softButtons) {
- console.debug("enter")
- var softButtonsLog = "";
-
- if (softButtons) {
- for (var i = 0; i < softButtons.length; i++) {
- softButtonsLog += "{type: '" + softButtons[i].type + "', " +
- "text: " + softButtons[i].text + "', ";
- softButtons[i].image ? softButtonsLog += "image: " + "{value: '" + softButtons[i].image.value + "', imageType: " + softButtons[i].image.imageType + "}, " : softButtonsLog += "";
- softButtonsLog += "isHighlighted: " + softButtons[i].isHighlighted + "', " +
- "softButtonID: " + softButtons[i].softButtonID + "', " +
- "systemAction: " + softButtons[i].systemAction +
- "},";
- }
- }
- console.log("Message Received - {method: 'Navigation.AlertManeuver', params:{ " +
- "softButtons: [" + softButtonsLog + "]" +
- "}}")
-
- console.debug("exit")
- return { __retCode: Common.Result.SUCCESS }
- }
-
- function updateTurnList(turnList, softButtons, appID) {
- console.debug("enter")
- var turnListLog = "",
- softButtonsLog = "";
- if (turnList) {
- for (var i = 0; i < turnList.length; i++) {
- turnList[i].navigationText ? turnListLog += "{navigationText: {fieldName: '" + turnList[i].navigationText.fieldName + "', fieldText: '" + turnList[i].navigationText.fieldText + "'}," : turnListLog += "{";
- turnList[i].turnIcon ? turnListLog += "turnIcon: " + "{value: '" + turnList[i].turnIcon.value + "', imageType: " + turnList[i].turnIcon.imageType + "}}, " : turnListLog += "},";
- }
- }
- if (softButtons) {
- softButtonsLog += "{type: '" + softButtons[0].type + "', " +
- "text: '" + softButtons[0].text + "', ";
- softButtons[0].image ? softButtonsLog += "image: " + "{value: '" + softButtons[0].image.value + "', imageType: " + softButtons[0].image.imageType + "}, " : softButtonsLog += "";
- softButtonsLog += "isHighlighted: " + softButtons[0].isHighlighted + "', " +
- "softButtonID: " + softButtons[0].softButtonID + "', " +
- "systemAction: " + softButtons[0].systemAction +
- "},";
- }
- console.log("Message Received - {method: 'Navigation.UpdateTurnList', params:{ " +
- "softButtons: [" + softButtonsLog + "], " +
- "turnList: [" + turnListLog + "], " +
- "appID: " + appID +
- "}}")
- if (turnList !== undefined) {
- dataContainer.getApplication(appID).turnList.clear();
- turnList.forEach(fillTurnList, dataContainer.getApplication(appID).turnList);
- }
- if (softButtons !== undefined) {
- dataContainer.getApplication(appID).turnListSoftButtons.clear();
- softButtons.forEach(fillSoftButtons, dataContainer.getApplication(appID).turnListSoftButtons);
- }
- dataContainer.navigationModel.appId = appID;
- console.debug("exit")
- }
-
- function fillTexts(element, index, array) {
- switch (element.fieldName) {
- case Common.TextFieldName.navigationText1:
- this.text1 = element.fieldText;
- break;
- case Common.TextFieldName.navigationText2:
- this.text2 = element.fieldText;
- break;
- case Common.TextFieldName.ETA:
- this.eta = element.fieldText;
- break;
- case Common.TextFieldName.totalDistance:
- this.totalDistance = element.fieldText;
- break;
- case Common.TextFieldName.timeToDestination:
- this.timeToDestination = element.fieldText;
- break;
- }
- }
-
- function startStream(url, appID) {
- console.debug("enter")
- player.startStream(url)
- console.debug("exit")
- }
-
- function stopStream(appID) {
- console.debug("enter")
- player.stop()
- console.debug("exit")
- }
-
- function startAudioStream(url, appID) {
- console.log("Message Received - {method: 'Navigation.StartAudioStream', params:{ " +
- "url: '" + url + "'" +
- "appID: " + appID +
- "}}")
- stream.source = url;
- stream.play();
- }
-
- function stopAudioStream(appID) {
- console.log("Message Received - {method: 'Navigation.StopAudioStream', params:{ " +
- "appID: " + appID +
- "}}")
- stream.stop();
- }
-
- function fillSoftButtons(element, index, array) {
- this.append({
- type: element.type,
- text: element.text,
- image: element.image,
- isHighlighted: element.isHighlighted,
- buttonId: element.softButtonID,
- systemAction: element.systemAction
- });
- }
-
- function fillTurnList(element, index, array) {
- this.append({
- navigationText: element.navigationText,
- turnIcon: element.turnIcon
- });
- console.debug(element.navigationText)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/TTS.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/TTS.qml
deleted file mode 100644
index 7884b3109..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/TTS.qml
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "Common.js" as Common
-import "Async.js" as Async
-
-Item {
- function ttsChunksToString(ttsChunks){
- return ttsChunks.map(function(str) { return str.text }).join('\n')
- }
-
- function isReady() {
- console.log("Message Received - {method: 'TTS.IsReady'}")
- return {
- available: dataContainer.hmiTTSAvailable
- }
- }
-
- function speak(ttsChunks, appID) {
- // appID unused
- console.debug('enter:', ttsChunks, appID);
- var ttsChunksLog = "";
- if (ttsChunks) {
- for (var i = 0; i < ttsChunks.length; i++) {
- ttsChunksLog += "{type: " + ttsChunks[i].type + ", " +
- "text: '" + ttsChunks[i].text + "'}, ";
- }
- }
- console.log("Message Received - {method: 'TTS.Speak', params:{ " +
- "ttsChunks: [" + ttsChunksLog + "], " +
- "appID: " + appID + "', " +
- "}}")
- if (ttsPopUp.async) {
- console.log('speak send abort');
- throw Common.Result.ABORTED;
- }
- var message = ttsChunksToString(ttsChunks);
- ttsPopUp.activate(message);
- ttsPopUp.async = new Async.AsyncCall();
- console.debug('exit');
- return ttsPopUp.async;
- }
-
- function stopSpeaking() {
- console.debug("enter");
- console.log("Message Received - {method: 'TTS.StopSpeaking'}")
- ttsPopUp.deactivate();
- console.debug("exit");
- }
-
- function getLanguage() {
- console.log("Message Received - {method: 'TTS.GetLanguage'}")
- return {
- language: dataContainer.hmiTTSVRLanguage
- }
- }
-
- function getSupportedLanguages() {
- console.log("Message Received - {method: 'TTS.GetSupportedLanguages'}")
- return {
- languages: settingsContainer.sdlLanguagesList
- }
- }
-
- function getCapabilities() {
- console.log("Message Received - {method: 'TTS.GetCapabilities'}")
- return {
- speechCapabilities: [
- Common.SpeechCapabilities.SC_TEXT,
- Common.SpeechCapabilities.PRE_RECORDED
- ],
- prerecordedSpeechCapabilities: [
- Common.PrerecordedSpeech.HELP_JINGLE,
- Common.PrerecordedSpeech.INITIAL_JINGLE,
- Common.PrerecordedSpeech.LISTEN_JINGLE,
- Common.PrerecordedSpeech.POSITIVE_JINGLE,
- Common.PrerecordedSpeech.NEGATIVE_JINGLE
- ]
- }
- }
-
- function performInteraction(helpPrompt, initialPrompt, timeoutPrompt, timeout) {
- console.debug("enter");
- var helpttsChunksLog = "",
- initialttsChunkLog = "",
- timeoutttsChunkLog = "";
-
- if (helpPrompt) {
- for (var i = 0; i < helpPrompt.length; i++) {
- helpttsChunksLog += "{type: " + helpPrompt[i].type + ", " +
- "text: '" + helpPrompt[i].text + "'}, ";
- }
- }
- if (initialPrompt) {
- for (var i = 0; i < initialPrompt.length; i++) {
- initialttsChunkLog += "{type: " + initialPrompt[i].type + ", " +
- "text: '" + initialPrompt[i].text + "'}, ";
- }
- }
- if (timeoutPrompt) {
- for (var i = 0; i < timeoutPrompt.length; i++) {
- timeoutttsChunkLog += "{type: " + timeoutPrompt[i].type + ", " +
- "text: '" + timeoutPrompt[i].text + "'}, ";
- }
- }
- console.log("Message Received - {method: 'TTS.PerformInteraction', params:{ " +
- "helpPrompt: [" + helpttsChunksLog + "], " +
- "initialPrompt: [" + initialttsChunkLog + "], " +
- "timeoutPrompt: [" + timeoutttsChunkLog + "], " +
- "timeout: " + timeout +
- "}}")
- ttsPopUp.performInteraction(ttsChunksToString(helpPrompt),
- ttsChunksToString(initialPrompt),
- ttsChunksToString(timeoutPrompt),
- timeout)
- console.debug("exit");
- }
-
- function changeRegistration(language, appID) {
- console.debug("enter:", language, appID);
- console.log("Message Received - {method: 'TTS.ChangeRegistration', params:{ " +
- "language: " + language + ", " +
- "appID: " + appID +
- "}}")
- dataContainer.changeRegistrationTTSVR(language, appID);
- console.debug("exit");
- }
-
- function setGlobalProperties(helpPrompt, timeoutPrompt, appID) {
- var helpPromptLog = "",
- timeoutPromptLog = "";
- if (helpPrompt) {
- for (var i = 0; i < helpPrompt.length; i++) {
- helpPromptLog += "{type: " + helpPrompt[i].type + ", " +
- "text: '" + helpPrompt[i].text + "'}, ";
- }
- }
- if (timeoutPrompt) {
- for (var i = 0; i < timeoutPrompt.length; i++) {
- timeoutPromptLog += "{type: " + timeoutPrompt[i].type + ", " +
- "text: '" + timeoutPrompt[i].text + "'}, ";
- }
- }
- console.log("Message Received - {method: 'TTS.SetGlobalProperties', params:{ " +
- "appID:" + appID + ", " +
- "helpPrompt: [" + helpPromptLog + "], " +
- "timeoutPrompt: [" + timeoutPromptLog + "]" +
- "}}")
-
- var newHelpPropmt = helpPrompt ?
- helpPrompt.map(
- function (structure) {
- return structure.text
- }
- ).join(", ") :
- dataContainer.currentApplication.helpPrompt
-
- var newTimeoutPrompt = timeoutPrompt ?
- timeoutPrompt.map(
- function (structure) {
- return structure.text
- }
- ).join(", ") :
- dataContainer.currentApplication.timeoutPrompt
-
- dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, {
- helpPrompt: newHelpPropmt,
- timeoutPrompt: newTimeoutPrompt
- })
- console.debug("exit")
- }
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml
deleted file mode 100644
index 770856a6a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/UI.qml
+++ /dev/null
@@ -1,721 +0,0 @@
-/**
- * @file UI.qml
- * @brief UI interface implementation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "Common.js" as Common
-import "Async.js" as Async
-import "../models/Internal.js" as Internal
-
-Item {
- function filter (strings, fields) {
- console.debug("enter")
-// substrings for each allowed field
- var fieldSubstrings = {}
-// this cycle concatenates allowed lines sorting them by field
- for (var stringIndex = 0; stringIndex < strings.length; ++stringIndex) {
- for (var fieldIndex = 0; fieldIndex < fields.length; ++fieldIndex) {
- var fieldName = strings[stringIndex].fieldName
- if (fieldName === fields[fieldIndex]) {
- if (fieldSubstrings[fieldName] !== undefined) {
- fieldSubstrings[fieldName] += "\n";
- fieldSubstrings[fieldName] += strings[stringIndex].fieldText
- }
- else {
- fieldSubstrings[fieldName] = strings[stringIndex].fieldText
- }
- }
- }
- }
- console.debug("exit")
- return fieldSubstrings
- }
-
- function alert (alertStrings, duration, softButtons, progressIndicator, appID) {
- var softButtonsLog = "",
- alertStringsLog = "";
- if (alertStrings) {
- for (var i = 0; i < alertStrings.length; i++) {
- alertStringsLog += "{fieldName: '" + alertStrings[i].fieldName + "', " +
- "fieldText: '" + alertStrings[i].fieldText + "'},";
- }
- }
- if (softButtons) {
- for (var i = 0; i < softButtons.length; i++) {
- softButtonsLog += "{type: '" + softButtons[i].type + "', " +
- "text: " + softButtons[i].text + "', ";
- softButtons[i].image ? softButtonsLog += "image: " + "{value: '" + softButtons[i].image.value + "', imageType: " + softButtons[i].image.imageType + "}, " : softButtonsLog += "";
- softButtonsLog += "isHighlighted: " + softButtons[i].isHighlighted + "', " +
- "softButtonID: " + softButtons[i].softButtonID + "', " +
- "systemAction: " + softButtons[i].systemAction +
- "},";
- }
- }
- console.log("Message Received - {method: 'UI.Alert', params:{ " +
- "alertStrings: [" + alertStringsLog + "]," +
- "duration: " + duration + "', " +
- "softButtons: [" + softButtonsLog + "]," +
- "progressIndicator: " + progressIndicator + "', " +
- "appID: " + appID + "', " +
- "}}")
- var fieldSubstrings = alertStrings
- .sort(function(a, b) { return a.fieldName - b.fieldName }) // sorting by fieldName
- .map(function(val) { return val.fieldText }); // mapping to array of strings
-
- var tryAgainTime = alertWindow.alert(fieldSubstrings, duration, progressIndicator, softButtons, appID)
- if (tryAgainTime === undefined) {
- alertWindow.async = new Async.AsyncCall();
- return alertWindow.async;
- }
- else {
- return {
- "__retCode": Common.Result.REJECTED,
- "tryAgainTime": tryAgainTime
- }
- }
- }
-
- function show (showStrings, alignment, graphic, softButtons, customPresets, appID) {
- var softButtonsLog = "",
- showStringsLog = "",
- customPresetsLog = "",
- graphiLog = "";
- if (showStrings) {
- for (var i = 0; i < showStrings.length; i++) {
- showStringsLog += "{fieldName: '" + showStrings[i].fieldName + "', " +
- "fieldText: '" + showStrings[i].fieldText + "'},";
- }
- }
- if (customPresets) {
- for (var i = 0; i < customPresets.length; i++) {
- customPresetsLog += "'" + customPresets[i] + "', ";
- }
- }
- if (softButtons) {
- for (var i = 0; i < softButtons.length; i++) {
- softButtonsLog += "{type: '" + softButtons[i].type + "', " +
- "text: " + softButtons[i].text + "', ";
- softButtons[i].image ? softButtonsLog += "image: " + "{value: '" + softButtons[i].image.value + "', imageType: " + softButtons[i].image.imageType + "}, " : softButtonsLog += "";
- softButtonsLog += "isHighlighted: " + softButtons[i].isHighlighted + "', " +
- "softButtonID: " + softButtons[i].softButtonID + "', " +
- "systemAction: " + softButtons[i].systemAction +
- "},";
- }
- }
- if (graphic) {
- graphiLog = "{value: '" + graphic.value + "', imageType: " + graphic.imageType + "}";
- }
-
- console.log("Message Received - {method: 'UI.Show', params:{ " +
- "showStrings: [" + showStringsLog + "], " +
- "alignment: " + alignment + "', " +
- "graphic: " + graphiLog + ", " +
- "softButtons: [" + softButtonsLog + "], " +
- "customPresets: [" + customPresetsLog + "], " +
- "appID: " + appID +
- "}}")
- var app = dataContainer.getApplication(appID);
-
- app.softButtons.clear()
- if (softButtons) {
- softButtons.forEach(function(x) { app.softButtons.append(x); });
- }
-
- app.customPresets.clear()
- if (customPresets) {
- customPresets.forEach( function(x) { app.customPresets.append( {text: x} ); } )
- }
-
- var textAlignment
- switch (alignment) {
- case Common.TextAlignment.LEFT_ALIGNED:
- textAlignment = Text.AlignLeft
- break;
- case Common.TextAlignment.RIGHT_ALIGNED:
- textAlignment = Text.AlignRight
- break;
- case Common.TextAlignment.CENTERED:
- textAlignment = Text.AlignHCenter
- break;
- default:
- textAlignment = Text.AlignHCenter
- break;
- }
-
- // with this array we grab only the lines we need
- var showFields = [
- Common.TextFieldName.mainField1,
- Common.TextFieldName.mainField2,
- Common.TextFieldName.mainField3,
- Common.TextFieldName.mainField4,
- Common.TextFieldName.statusBar,
- Common.TextFieldName.mediaClock,
- Common.TextFieldName.mediaTrack
- ]
- var fieldSubstrings = filter(showStrings, showFields)
- var showData = { hmiUIText: {} }
- if (fieldSubstrings[Common.TextFieldName.mainField1] !== undefined) { showData.hmiUIText.mainField1 = fieldSubstrings[Common.TextFieldName.mainField1]; }
- if (fieldSubstrings[Common.TextFieldName.mainField2] !== undefined) { showData.hmiUIText.mainField2 = fieldSubstrings[Common.TextFieldName.mainField2]; }
- if (fieldSubstrings[Common.TextFieldName.mainField3] !== undefined) { showData.hmiUIText.mainField3 = fieldSubstrings[Common.TextFieldName.mainField3]; }
- if (fieldSubstrings[Common.TextFieldName.mainField4] !== undefined) { showData.hmiUIText.mainField4 = fieldSubstrings[Common.TextFieldName.mainField4]; }
- if (fieldSubstrings[Common.TextFieldName.statusBar] !== undefined) { showData.hmiUIText.statusBar = fieldSubstrings[Common.TextFieldName.statusBar]; }
- if (fieldSubstrings[Common.TextFieldName.mediaTrack] !== undefined) { showData.hmiUIText.mediaTrack = fieldSubstrings[Common.TextFieldName.mediaTrack]; }
- if (graphic) { showData.hmiUIText.image = graphic.value; }
- if (textAlignment) { showData.hmiUITextAlignment = textAlignment; }
- if (fieldSubstrings[Common.TextFieldName.mediaClock]) {
- showData.mediaClock = {
- "updateMode": Internal.MediaClockUpdateMode.MCU_COUNTUP,
- "runningMode": Internal.MediaClockRunningMode.MCR_STOPPED,
- "magic": Internal.stringToHmsTime(fieldSubstrings[Common.TextFieldName.mediaClock]),
- "startTimeForProgress": -1
- }
- }
-
- dataContainer.setApplicationProperties(appID, showData);
- console.debug("exit")
- }
-
- function addCommand (cmdID, menuParams, cmdIcon, appID) {
- var cmdIconLogs = "",
- menuParamsLogs = "";
-
- if (cmdIcon) {
- cmdIconLogs = "{value: '" + cmdIcon.value + "', imageType: " + cmdIcon.imageType + "}";
- }
- if (menuParams) {
- menuParamsLogs = "{parentID: " + menuParams.parentID + ", position: " + menuParams.position + "}";
- }
- console.log("Message Received - {method: 'UI.AddCommand', params:{ " +
- "appID: " + appID + ", " +
- "cmdID: " + cmdID + ", " +
- "cmdIcon: " + cmdIconLogs + ", " +
- "menuParams: " + menuParamsLogs +
- "}}")
- dataContainer.addCommand(cmdID, menuParams, cmdIcon, appID)
- }
-
- function deleteCommand (cmdID, appID) {
- console.log("Message Received - {method: 'UI.DeleteCommand', params:{ " +
- "appID: " + appID + ", " +
- "cmdID: " + cmdID +
- "}}")
- dataContainer.deleteCommand(cmdID, appID)
- }
-
- function addSubMenu (menuID, menuParams, appID) {
- var menuParamsLogs = "";
-
- if (menuParams) {
- menuParamsLogs = "{parentID: " + menuParams.parentID + ", position: " + menuParams.position + "}";
- }
- console.log("Message Received - {method: 'UI.AddSubMenu', params:{ " +
- "appID: " + appID + ", " +
- "menuID: " + menuID + ", " +
- "menuParams: " + menuParamsLogs +
- "}}")
- dataContainer.addSubMenu(menuID, menuParams, appID)
- }
-
- function deleteSubMenu (menuID, appID) {
- console.log("Message Received - {method: 'UI.DeleteSubMenu', params:{ " +
- "appID:" + appID + ", " +
- "menuID: " + menuID +
- "}}")
- dataContainer.deleteSubMenu(menuID, appID)
- }
-
- function performInteraction (initialText, choiceSet, vrHelpTitle, vrHelp, timeout, interactionLayout, appID) {
- console.debug("enter")
- var choiseLog = "",
- vrHelpLog = "",
- initialTextLog = "";
- if (choiceSet) {
- for (var i = 0; i < choiceSet.length; i++) {
- choiseLog += "{choiceID: " + choiceSet[i].choiceID + ", " +
- "menuName: '" + choiceSet[i].menuName + "', " +
- "image: {value: '" + choiceSet[i].image.value + "', imageType: " + choiceSet[i].image.imageType + "}, " +
- "secondaryText: '" + choiceSet[i].secondaryText + "', " +
- "tertiaryText: '" + choiceSet[i].tertiaryText + "', " +
- "secondaryImage: {value: '" + choiceSet[i].image.value + "', imageType: " + choiceSet[i].image.imageType + "}},";
- }
- }
- if (vrHelp) {
- for (var i = 0; i < vrHelp.length; i++) {
- var vrHelpImageLog = "";
- if (vrHelp[i].image) {
- vrHelpImageLog = "{value: '" + vrHelp[i].image.value + "', imageType: " + vrHelp[i].image.imageType + "}";
- }
-
- vrHelpLog += "{text: '" + vrHelp[i].text + "', " +
- "image: " + vrHelpImageLog + ", " +
- "position: " + vrHelp[i].position +
- "},";
- }
- }
- if (initialText) {
- initialTextLog = "{fieldName: " + initialText.fieldName + ", fieldText: '" + initialText.fieldText + "'}";
- }
-
- console.log("Message Received - {method: 'UI.PerformInteraction', params:{ " +
- "appID:" + appID + ", " +
- "initialText: " + initialTextLog + ", " +
- "choiceSet: [" + choiseLog + "], " +
- "vrHelpTitle: '" + vrHelpTitle + "', " +
- "vrHelp: [" + vrHelpLog + "], " +
- "timeout: " + timeout + ", " +
- "interactionLayout: " + interactionLayout +
- "}}")
- var async = interactionPopup.performInteraction(initialText, choiceSet, vrHelpTitle, vrHelp, timeout, interactionLayout, appID)
- console.debug("exit")
- return async
- }
-
- function setMediaClockTimer (startTime, endTime, updateMode, appID) {
- var startTimeLog = "",
- endTimeLog = "";
- if (startTime) {
- startTimeLog = "hours: " + startTime.hours + ", minutes: " + startTime.minutes + ", seconds: " + startTime.seconds;
- }
- if (endTime) {
- endTimeLog = "hours: " + endTime.hours + ", minutes: " + endTime.minutes + ", seconds: " + endTime.seconds;
- }
-
- console.log("Message Received - {method: 'UI.SetMediaClockTimer', params:{ " +
- "startTime: {" + startTimeLog + "}, " +
- "endTime: {" + endTimeLog + "}, " +
- "updateMode: " + updateMode + ", " +
- "appID: " + appID +
- "}}")
- var app = dataContainer.getApplication(appID)
- var newStartTime
- var newEndTime
- var newUpdateMode
- var newRunningMode
- var newStartTimeForProgress
- var resultCode
- var sendErrorResponce = false
-
- switch (updateMode) {
- case Common.ClockUpdateMode.COUNTUP:
- if (startTime === undefined) {
- resultCode = Common.Result.INVALID_DATA
- sendErrorResponce = true
- break
- }
- newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
- newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTUP
- newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.COUNTDOWN:
- if (startTime === undefined) {
- resultCode = Common.Result.INVALID_DATA
- sendErrorResponce = true
- break
- }
- newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
- newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTDOWN
- newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.PAUSE:
- // Already paused or cleared
- if ((app.mediaClock.runningMode === Internal.MediaClockRunningMode.MCR_STOPPED)
- || (app.mediaClock.startTime === -1 && app.mediaClock.endTime === -1)) {
- resultCode = Common.Result.IGNORED
- sendErrorResponce = true
- break
- }
- newStartTime = app.mediaClock.startTime
- newEndTime = app.mediaClock.endTime
- newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- newUpdateMode = app.mediaClock.updateMode
- newStartTimeForProgress = app.mediaClock.startTime
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.RESUME:
- // Already resumed or cleared
- if ((app.mediaClock.runningMode === Internal.MediaClockRunningMode.MCR_RUNNING)
- || (app.mediaClock.startTime === -1 && app.mediaClock.endTime === -1)) {
- resultCode = Common.Result.IGNORED
- sendErrorResponce = true
- break
- }
- newStartTime = app.mediaClock.startTime
- newEndTime = app.mediaClock.endTime
- newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
- newStartTimeForProgress = app.mediaClock.startTime
- newUpdateMode = app.mediaClock.updateMode
- resultCode = Common.Result.SUCCESS
- break
-
- case Common.ClockUpdateMode.CLEAR:
- newStartTime = -1
- newEndTime = -1
- newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- newUpdateMode = app.mediaClock.updateMode
- newStartTimeForProgress = -1
- resultCode = Common.Result.SUCCESS
- break
- }
-
- if (sendErrorResponce) {
- console.debug("exit with result code: ", resultCode)
- return { __retCode: resultCode }
- }
-
- dataContainer.setApplicationProperties(appID, {
- "mediaClock": {
- "updateMode": newUpdateMode,
- "runningMode": newRunningMode,
- "startTime": newStartTime,
- "endTime": newEndTime,
- "startTimeForProgress": newStartTimeForProgress
- }
- })
-
- console.debug("exit")
- return { __retCode: resultCode }
- }
-
- function setGlobalProperties (vrHelpTitle, vrHelp, menuTitle, menuIcon, keyboardProperties, appID) {
- console.debug("enter")
- var vrHelpLog = "",
- menuIconLog = "",
- keyboardPropertiesLog = "";
- if (vrHelp) {
- for (var i = 0; i < vrHelp.length; i++) {
- var vrHelpImageLog = "";
- if (vrHelp[i].image) {
- vrHelpImageLog = "{value: '" + vrHelp[i].image.value + "', imageType: " + vrHelp[i].image.imageType + "}";
- }
- vrHelpLog += "{text: '" + vrHelp[i].text + "', " +
- "image: " + vrHelpImageLog + ", " +
- "position: " + vrHelp[i].position +
- "},";
- }
- }
- if (menuIcon) {
- menuIconLog = "{value: '" + menuIcon.value + "', imageType: " + menuIcon.imageType + "}";
- }
- if (keyboardProperties) {
- keyboardPropertiesLog = "{language: '" + keyboardProperties.language + "', keyboardLayout: '" + keyboardProperties.language +
- "', sendDynamicEntry: '" + keyboardProperties.sendDynamicEntry + "', keypressMode: '" + keyboardProperties.keypressMode +
- "', limitedCharacterList: '" + keyboardProperties.limitedCharacterList + "', autoCompleteText: '" + keyboardProperties.autoCompleteText + "'}";
- }
-
- console.log("Message Received - {method: 'UI.SetGlobalProperties', params:{ " +
- "appID:" + appID + ", " +
- "vrHelpTitle: '" + vrHelpTitle + "', " +
- "vrHelp: [" + vrHelpLog + "], " +
- "menuTitle: '" + menuTitle + "', " +
- "menuIcon: " + menuIconLog + ", " +
- "keyboardProperties: " + keyboardPropertiesLog +
- "}}")
- var app = dataContainer.getApplication(appID)
- var dataToUpdate = {}
-
- if (vrHelpTitle !== undefined) {
- dataToUpdate.vrHelpTitle = vrHelpTitle
- } else if ( (vrHelp !== undefined) && (vrHelp.length >= 1) ) {
- return { __retCode: Common.Result.REJECTED, __message: "vrHelpTitle - undefined, vrHelpItem - provided" }
- }
-
- if (vrHelp !== undefined) {
- var checkSequentialPosition = vrHelp[0].position
- for (var index = 0; index < vrHelp.length; index++) {
- if (vrHelp[index].position !== checkSequentialPosition) {
- return { __retCode: Common.Result.REJECTED, __message: "Nonsequential positions of VrHelpItems" }
- }
- checkSequentialPosition++
- }
-
- if (app.vrHelpItems.count !== 0) {
- app.vrHelpItems.clear()
- }
- vrHelp.forEach( Internal.appendVrHelpItem, app.vrHelpItems )
- } else {
- if (vrHelpTitle !== undefined) {
- return { __retCode: Common.Result.REJECTED, __message: "vrHelpItems - undefined, vrHelpTitle - provided" }
- }
- }
- if (menuTitle !== undefined) {
- dataToUpdate.menuTitle = menuTitle
- }
- if (menuIcon !== undefined) {
- dataToUpdate.menuIcon = menuIcon
- }
- dataContainer.setApplicationProperties(appID, dataToUpdate)
- console.debug("exit")
- }
-
- function isReady () {
- console.log("Message Received - {method: 'UI.IsReady'}")
- return {
- available: dataContainer.hmiUIAvailable
- }
- }
-
- function getLanguage () {
- console.log("Message Received - {method: 'UI.GetLanguage'}")
- return {
- language: dataContainer.hmiUILanguage
- }
- }
-
- function getSupportedLanguages () {
- console.log("Message Received - {method: 'UI.GetSupportedLanguages'}")
- return {
- languages: settingsContainer.sdlLanguagesList
- }
- }
-
- function changeRegistration (language, appID) {
- console.log("Message Received - {method: 'UI.ChangeRegistration', params:{ " +
- "language: " + language + ", " +
- "appID: " + appID +
- "}}")
- dataContainer.changeRegistrationUI(language, appID)
- }
-
- function setAppIcon (syncFileName, appID) {
- var syncFileNameLog = "";
- if (syncFileName) {
- syncFileNameLog = "{value: '" + syncFileName.value + "', imageType: " + syncFileName.imageType + "}";
- }
-
- console.log("Message Received - {method: 'UI.SetAppIcon', params:{ " +
- "syncFileName: " + syncFileNameLog + ", " +
- "appID: " + appID +
- "}}")
- dataContainer.setApplicationProperties(appID, { icon: syncFileName.value })
- }
-
- function slider (numTicks, position, sliderHeader, sliderFooter, timeout, appID) {
- console.log("Message Received - {method: 'UI.Slider', params:{ " +
- "numTicks: " + numTicks + "', " +
- "position: " + position + "', " +
- "sliderHeader: '" + sliderHeader + "', " +
- "sliderFooter: [" + sliderFooter + "], " +
- "timeout: " + timeout + ", " +
- "appID: " + appID +
- "}}")
- if (dataContainer.uiSlider.running) {
- console.debug("aborted")
- return {__retCode: Common.Result.ABORTED, sliderPosition: position}
- }
-
- dataContainer.uiSlider.appName = dataContainer.getApplication(appID).appName
- dataContainer.uiSlider.header = sliderHeader
- dataContainer.uiSlider.footer = sliderFooter
- dataContainer.uiSlider.numTicks = numTicks
- dataContainer.uiSlider.position = position
- dataContainer.uiSlider.timeout = timeout
-
- if (timeout !== 0) {
- sliderPopup.showSlider()
- sliderPopup.async = new Async.AsyncCall();
- console.debug("exit")
- return sliderPopup.async;
- } else {
- console.debug("exit")
- return { sliderPosition: position }
- }
- }
-
- function scrollableMessage (messageText, timeout, softButtons, appID) {
-
- var softButtonsLog = "",
- messageTextLog = "";
- if (softButtons) {
- for (var i = 0; i < softButtons.length; i++) {
- softButtonsLog += "{type: '" + softButtons[i].type + "', " +
- "text: " + softButtons[i].text + "', ";
- softButtons[i].image ? softButtonsLog += "image: " + "{value: '" + softButtons[i].image.value + "', imageType: " + softButtons[i].image.imageType + "}, " : softButtonsLog += "";
- softButtonsLog += "isHighlighted: " + softButtons[i].isHighlighted + "', " +
- "softButtonID: " + softButtons[i].softButtonID + "', " +
- "systemAction: " + softButtons[i].systemAction +
- "},";
- }
- }
- if (messageText) {
- messageTextLog = "{fieldName: " + messageText.fieldName + ", fieldText: '" + messageText.fieldText + "'}";
- }
-
- console.log("Message Received - {method: 'UI.ScrollableMessage', params:{ " +
- "messageText: " + messageTextLog + ", " +
- "timeout: " + timeout + "', " +
- "softButtons: [" + softButtonsLog + "]," +
- "appID: " + appID + "', " +
- "}}")
-
- // TODO{ALeshin}: Also check HMILevel, when it will be available. It should be FULL otherwise - REJECTED
- if (contentLoader.item.systemContext !== Common.SystemContext.SYSCTXT_MAIN) {
- return { __retCode: Common.Result.REJECTED, __message: "System Context isn't MAIN" }
- }
- if(dataContainer.scrollableMessageModel.running){
- //send error response if scrollable message already running
- return { __retCode: Common.Result.ABORTED, __message: "ScrollableMessage already running" }
- }
-
- dataContainer.scrollableMessageModel.longMessageText = messageText.fieldText
- if (timeout === 0) {
- return { __retCode: Common.Result.SUCCESS, __message: "Timeout = 0" }
- } else {
- dataContainer.scrollableMessageModel.timeout = timeout
- }
-
- dataContainer.scrollableMessageModel.softButtons.clear();
- if (softButtons !== undefined) {
- softButtons.forEach(fillSoftButtons, dataContainer.scrollableMessageModel.softButtons);
- }
- dataContainer.scrollableMessageModel.appId = appID
- dataContainer.scrollableMessageModel.async = new Async.AsyncCall()
- contentLoader.go("./views/ScrollableMessageView.qml")
- console.debug("exit")
- return dataContainer.scrollableMessageModel.async
- }
-
- function getCapabilities() {
- console.log("Message Received - {method: 'UI.GetCapabilities'}")
- return {
- "audioPassThruCapabilities": {
- "samplingRate": Common.SamplingRate.RATE_44KHZ,
- "bitsPerSample": Common.BitsPerSample.RATE_8_BIT,
- "audioType": Common.AudioType.PCM
- },
- "displayCapabilities": settingsContainer.displayCapabilities,
- "hmiZoneCapabilities": Common.HmiZoneCapabilities.FRONT,
- "softButtonCapabilities": settingsContainer.softButtonCapabilities
- }
- }
-
- function performAudioPassThru (audioPassThruDisplayTexts, timeout, appID) {
- var displayTextsLog = "";
- if (audioPassThruDisplayTexts) {
- for (var i = 0; i < audioPassThruDisplayTexts.length; i++) {
- displayTextsLog += "{fieldName: '" + audioPassThruDisplayTexts[i].fieldName + "', " +
- "fieldText: " + audioPassThruDisplayTexts[i].fieldText + "'},";
- }
- }
- console.log("Message Received - {method: 'UI.PerformAudioPassThru', params:{ " +
- "audioPassThruDisplayTexts: [" + displayTextsLog + "], " +
- "maxDuration: " + timeout +
- "}}")
-
- if (dataContainer.uiAudioPassThru.running) {
- console.debug("aborted")
- throw Common.Result.ABORTED
- }
-
- dataContainer.uiAudioPassThru.appName = dataContainer.getApplication(appID).appName
- dataContainer.uiAudioPassThru.timeout = timeout
- if (audioPassThruDisplayTexts.length === 2) {
- dataContainer.uiAudioPassThru.firstLine = audioPassThruDisplayTexts[0].fieldText
- dataContainer.uiAudioPassThru.secondLine = audioPassThruDisplayTexts[1].fieldText
- }
- performAudioPassThruPopup.async = new Async.AsyncCall();
- performAudioPassThruPopup.showAudioPassThru()
- console.debug("exit")
- return performAudioPassThruPopup.async;
- }
-
- function endAudioPassThru () {
- console.debug("enter")
- console.log("Message Received - {method: 'UI.EndAudioPassThru'}")
-
- if (!dataContainer.uiAudioPassThru.running) {
- console.debug("rejected")
- throw Common.Result.REJECTED
- }
- DBus.sendReply({__retCode: Common.Result.SUCCESS})
- performAudioPassThruPopup.complete(Common.Result.SUCCESS)
- console.debug("exit")
- }
-
- function closePopUp (methodName) {
- console.debug("enter")
- console.log("Message Received - {method: 'UI.ClosePopUp', params:{ " +
- "methodName: " + methodName +
- "}}")
- var popUpToClose
-
- if (dataContainer.activePopup.length === 0) {
- return { __retCode: Common.Result.ABORT, __message: "No active PopUps"}
- }
-
- if (methodName !== undefined) {
- popUpToClose = methodName
- } else {
- popUpToClose = dataContainer.activePopup[dataContain.activePopUp.length - 1]
- }
-
- switch (popUpToClose) {
- case "UI.PerformInteraction":
- interactionPopup.complete(Common.Result.SUCCESS)
- break
- case "UI.Slider":
- sliderPopup.complete(Common.Result.SUCCESS)
- break
- case "UI.PerformAudioPassThru":
- performAudioPassThruPopup.complete(Common.Result.SUCCESS)
- break
- case "UI.Alert":
- alertWindow.complete(Common.Result.SUCCESS)
- break
- case "UI.VrHelp":
- vrHelpPopup.complete(Common.Result.SUCCESS)
- break
- }
- console.debug("exit")
- }
-
- function fillSoftButtons(element, index, array) {
- this.append({
- type: element.type,
- text: element.text,
- image: element.image,
- isHighlighted: element.isHighlighted,
- softButtonID: element.softButtonID,
- systemAction: element.systemAction
- });
- }
-
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
deleted file mode 100644
index 8a426197e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * @file VR.qml
- * @brief Implement of interface VR.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "Common.js" as Common
-
-Item {
- function isReady() {
- console.log("Message Received - {method: 'VR.IsReady'}")
- return {
- available: dataContainer.hmiVRAvailable
- }
- }
-
- function addCommand(cmdID, vrCommands, appID) {
- var vrCommandsLog = "";
- if (vrCommands) {
- for (var i = 0; i < vrCommands.length; i++) {
- vrCommandsLog += "'" + vrCommands[i] + "', ";
- }
- }
- console.log("Message Received - {method: 'VR.AddCommand', params:{ " +
- "vrCommands: [" + vrCommandsLog + "], " +
- "cmdID: " + cmdID + ", " +
- "appID: " + appID +
- "}}")
- for (var i = 0; i < vrCommands.length; ++i) {
- dataContainer.vrCommands.append({
- cmdID: cmdID,
- command: vrCommands[i],
- appID: appID === undefined ? 0 : appID,
- });
- }
- console.log("exit")
- }
-
- function deleteCommand(cmdID, appID) {
- console.log("Message Received - {method: 'VR.DeleteCommand', params:{ " +
- "appID: " + appID + ", " +
- "cmdID: " + cmdID +
- "}}")
- for (var i = 0; i < dataContainer.vrCommands.count; ) {
- if ((dataContainer.vrCommands.get(i).cmdID === cmdID) &&
- ((appID === undefined) || (dataContainer.vrCommands.get(i).appID === appID))) {
- dataContainer.vrCommands.remove(i);
- continue;
- }
- ++i;
- }
- console.log("exit")
- }
-
- function getLanguage() {
- console.log("Message Received - {method: 'VR.GetLanguage'}")
- return {
- language: dataContainer.hmiTTSVRLanguage
- }
- }
-
- function getSupportedLanguages() {
- console.log("Message Received - {method: 'VR.GetSupportedLanguages'}")
- return {
- languages: settingsContainer.sdlLanguagesList
- }
- }
-
- function getCapabilities() {
- console.log("Message Received - {method: 'UI.GetCapabilities'}")
- return {
- vrCapabilities: [ Common.VrCapabilities.VR_TEXT ]
- }
- }
-
- function changeRegistration(language, appID) {
- console.debug("enter");
- console.log("Message Received - {method: 'VR.ChangeRegistration', params:{ " +
- "language: " + language + ", " +
- "appID: " + appID +
- "}}")
- dataContainer.changeRegistrationTTSVR(language, appID);
- console.debug("exit");
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VehicleInfo.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VehicleInfo.qml
deleted file mode 100644
index ab91ea920..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/hmi_api/VehicleInfo.qml
+++ /dev/null
@@ -1,761 +0,0 @@
-/**
- * @file VehicleInfo.qml
- * @brief Vehicle information interface realisation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "Common.js" as Common
-
-Item {
- function isReady () {
- console.log("Message Received - {method: 'VehicleInfo.IsReady'}")
- return {
- available: dataContainer.hmiVehicleInfoAvailable
- }
- }
-
- function getVehicleType() {
- console.log("Message Received - {method: 'VehicleInfo.GetVehicleType'}")
- return {
- "vehicleType": {
- "make": "Ford",
- "model": "Fiesta",
- "modelYear": "2013",
- "trim": "SE"
- }
- }
- }
-
- function getGpsData(appID) {
- console.debug("enter")
- console.debug("exit")
- return { gps: dataContainer.vehicleInfoModel.gps }
- }
-
- function getSpeed(appID) {
- console.debug("enter")
- console.debug("exit")
- return { speed: dataContainer.vehicleInfoModel.speed }
- }
-
- function getRpm(appID) {
- console.debug("enter")
- console.debug("exit")
- return {
- rpm: dataContainer.vehicleInfoModel.rpm,
- __retCode: Common.Result.DATA_NOT_AVAILABLE
- }
- }
-
- function getFuelLevel(appID) {
- console.debug("enter")
- console.debug("exit")
- return { fuelLevel: dataContainer.vehicleInfoModel.fuelLevel }
- }
-
- function getFuelLevelState(appID) {
- console.debug("enter")
- console.debug("exit")
- return { fuelLevel_State: dataContainer.vehicleInfoModel.fuelLevel_State }
- }
-
- function getInstantFuelConsumption(appID) {
- console.debug("enter")
- console.debug("exit")
- return { instantFuelConsumption: dataContainer.vehicleInfoModel.instantFuelConsumption }
- }
-
- function getExternalTemperature(appID) {
- console.debug("enter")
- console.debug("exit")
- return { externalTemperature: dataContainer.vehicleInfoModel.externalTemperature }
- }
-
- function getVin(appID) {
- console.debug("enter")
- console.debug("exit")
- return { vin: dataContainer.vehicleInfoModel.vin }
- }
-
- function getPrndl(appID) {
- console.debug("enter")
- if (dataContainer.vehicleInfoModel.prndl === -1) { // Test value, to check response
- console.debug("exit")
- return {
- prndl: dataContainer.vehicleInfoModel.prndl,
- __retCode: Common.Result.DATA_NOT_AVAILABLE
- }
- }
- console.debug("exit")
- return { prndl: dataContainer.vehicleInfoModel.prndl }
- }
-
- function getTirePressure(appID) {
- console.debug("enter")
- console.debug("exit")
- return { tirePressure: dataContainer.vehicleInfoModel.tirePressure }
- }
-
- function getOdometer(appID) {
- console.debug("enter")
- console.debug("exit")
- return { odometer: dataContainer.vehicleInfoModel.odometer }
- }
-
- function getBeltStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { beltStatus: dataContainer.vehicleInfoModel.beltStatus }
- }
-
- function getBodyInformation(appID) {
- console.debug("enter")
- console.debug("exit")
- return { bodyInformation: dataContainer.vehicleInfoModel.bodyInformation }
- }
-
- function getDeviceStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { deviceStatus: dataContainer.vehicleInfoModel.deviceStatus }
- }
-
- function getDriverBraking(appID) {
- console.debug("enter")
- console.debug("exit")
- return { driverBraking: dataContainer.vehicleInfoModel.driverBraking }
- }
-
- function getWiperStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { wiperStatus: dataContainer.vehicleInfoModel.wiperStatus }
- }
-
- function getHeadLampStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { headLampStatus: dataContainer.vehicleInfoModel.headLampStatus }
- }
-
- function getEngineTorque(appID) {
- console.debug("enter")
- console.debug("exit")
- return { engineTorque: dataContainer.vehicleInfoModel.engineTorque }
- }
-
- function getAccPedalPosition(appID) {
- console.debug("enter")
- console.debug("exit")
- return { accPedalPosition: dataContainer.vehicleInfoModel.accPedalPosition }
- }
-
- function getSteeringWheelAngle(appID) {
- console.debug("enter")
- console.debug("exit")
- return { steeringWheelAngle: dataContainer.vehicleInfoModel.steeringWheelAngle }
- }
-
- function getECallInfo(appID) {
- console.debug("enter")
- console.debug("exit")
- return { eCallInfo: dataContainer.vehicleInfoModel.eCallInfo }
- }
-
- function getAirbagStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { airbagStatus: dataContainer.vehicleInfoModel.airbagStatus }
- }
-
- function getEmergencyEvent(appID) {
- console.debug("enter")
- console.debug("exit")
- return { emergencyEvent: dataContainer.vehicleInfoModel.emergencyEvent }
- }
-
- function getClusterModeStatus(appID) {
- console.debug("enter")
- console.debug("exit")
- return { clusterModeStatus: dataContainer.vehicleInfoModel.clusterModeStatus }
- }
-
- function getMyKey(appID) {
- console.debug("enter")
- console.debug("exit")
- return { myKey: dataContainer.vehicleInfoModel.myKey }
- }
-
- function getDTCs(ecuName, dtcMask, appID) {
- console.log("Message Received - {method: 'VehicleInfo.GetDTCs', params:{ " +
- "ecuName: " + ecuName + ", " +
- "dtcMask: " + dtcMask + ", " +
- "appID: " + appID +
- "}}")
- var ecuHeader = 2
- var dtc = []
-
- for (var i = 0; i < 3; i++) {
- dtc.push("line" + i)
- }
- return {ecuHeader: ecuHeader, dtc: dtc}
- }
-
- function readDID(ecuName, didLocation, appID) {
- console.debug("Enter")
- console.log("Message Received - {method: 'VehicleInfo.ReadDID', params:{ " +
- "ecuName: " + ecuName + ", " +
- "didLocation: " + didLocation + ", " +
- "appID: " + appID +
- "}}")
- //TODO{ALeshin}: refactoring of this function, when we'll have Vehicle Info module
- var didResult = []
-
- for (var i = 0; i < didLocation.length; i++) {
- if (i < 10) {
- didResult[i] = {}
- didResult[i].resultCode = Common.VehicleDataResultCode.VDRC_SUCCESS
- didResult[i].didLocation = didLocation[i]
- didResult[i].data = '0'
- }
- else {
- didResult[i] = {}
- didResult[i].resultCode = Common.VehicleDataResultCode.VDRC_DATA_NOT_AVAILABLE
- didResult[i].didLocation = didLocation[i]
- didResult[i].data = '0'
- }
- }
- console.debug("Exit")
- return {didResult: didResult}
- }
-
- function subscribeGps(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onGpsChanged.disconnect(model.sendGpsChange)
- model.onGpsChanged.connect(model.sendGpsChange)
- console.debug("exit")
- return {gps:
- { dataType: Common.VehicleDataType.VEHICLEDATA_GPS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS} }
- }
- function unsubscribeGps(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onGpsChanged.disconnect(model.sendGpsChange)
- console.debug("exit")
- return {gps:
- { dataType: Common.VehicleDataType.VEHICLEDATA_GPS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS} }
-
- }
-
- function subscribeSpeed(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSpeedChanged.disconnect(model.sendSpeedChange)
- model.onSpeedChanged.connect(model.sendSpeedChange)
- console.debug("exit")
- return { speed:
- { dataType: Common.VehicleDataType.VEHICLEDATA_SPEED,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeSpeed(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSpeedChanged.disconnect(model.sendSpeedChange)
- console.debug("exit")
- return { speed:
- { dataType: Common.VehicleDataType.VEHICLEDATA_SPEED,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeRpm(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onRpmChanged.disconnect(model.sendRpmChange)
- model.onRpmChanged.connect(model.sendRpmChange)
- console.debug("exit")
- return { rpm:
- { dataType: Common.VehicleDataType.VEHICLEDATA_RPM,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeRpm(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onRpmChanged.disconnect(model.sendRpmChange)
- console.debug("exit")
- return { rpm:
- { dataType: Common.VehicleDataType.VEHICLEDATA_RPM,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeFuelLevel(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevelChanged.disconnect(model.sendFuelLevelChange)
- model.onFuelLevelChanged.connect(model.sendFuelLevelChange)
- console.debug("exit")
- return { fuelLevel:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeFuelLevel(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevelChanged.disconnect(model.sendFuelLevelChange)
- console.debug("exit")
- return { fuelLevel:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeFuelLevel_State(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevel_StateChanged.disconnect(model.sendFuelLevel_StateChange)
- model.onFuelLevel_StateChanged.connect(model.sendFuelLevel_StateChange)
- console.debug("exit")
- return { fuelLevel_State:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeFuelLevel_State(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onFuelLevel_StateChanged.disconnect(model.sendFuelLevel_StateChange)
- console.debug("exit")
- return { fuelLevel_State:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeInstantFuelConsumption(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onInstantFuelConsumptionChanged.disconnect(model.sendInstantFuelConsumptionChange)
- model.onInstantFuelConsumptionChanged.connect(model.sendInstantFuelConsumptionChange)
- console.debug("exit")
- return { instantFuelConsumption:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeInstantFuelConsumption(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onInstantFuelConsumptionChanged.disconnect(model.sendInstantFuelConsumptionChange)
- console.debug("exit")
- return { instantFuelConsumption:
- { dataType: Common.VehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeExternalTemperature(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onExternalTemperatureChanged.disconnect(model.sendExternalTemperatureChange)
- model.onExternalTemperatureChanged.connect(model.sendExternalTemperatureChange)
- console.debug("exit")
- return { externalTemperature:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EXTERNTEMP,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeExternalTemperature(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onExternalTemperatureChanged.disconnect(model.sendExternalTemperatureChange)
- console.debug("exit")
- return { externalTemperature:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EXTERNTEMP,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribePrndl(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onPrndlChanged.disconnect(model.sendPrndlChange)
- model.onPrndlChanged.connect(model.sendPrndlChange)
- console.debug("exit")
- return { prndl:
- { dataType: Common.VehicleDataType.VEHICLEDATA_PRNDL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribePrndl(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onPrndlChanged.disconnect(model.sendPrndlChange)
- console.debug("exit")
- return { prndl:
- { dataType: Common.VehicleDataType.VEHICLEDATA_PRNDL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeVin(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onVinChanged.disconnect(model.sendVinChange)
- model.onVinChanged.connect(model.sendVinChange)
- console.debug("exit")
- return { vin:
- { dataType: Common.VehicleDataType.VEHICLEDATA_VIN,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeVin(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onVinChanged.disconnect(model.sendVinChange)
- console.debug("exit")
- return { vin:
- { dataType: Common.VehicleDataType.VEHICLEDATA_VIN,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeTirePressure(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onTirePressureChanged.disconnect(model.sendTirePressureChange)
- model.onTirePressureChanged.connect(model.sendTirePressureChange)
- console.debug("exit")
- return { tirePressure:
- { dataType: Common.VehicleDataType.VEHICLEDATA_TIREPRESSURE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeTirePressure(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onTirePressureChanged.disconnect(model.sendTirePressureChange)
- console.debug("exit")
- return { tirePressure:
- { dataType: Common.VehicleDataType.VEHICLEDATA_TIREPRESSURE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeOdometer(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onOdometerChanged.disconnect(model.sendOdometerChange)
- model.onOdometerChanged.connect(model.sendOdometerChange)
- console.debug("exit")
- return { odometer:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ODOMETER,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeOdometer(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onOdometerChanged.disconnect(model.sendOdometerChange)
- console.debug("exit")
- return { odometer:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ODOMETER,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeBeltStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBeltStatusChanged.disconnect(model.sendBeltStatusChange)
- model.onBeltStatusChanged.connect(model.sendBeltStatusChange)
- console.debug("exit")
- return { beltStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BELTSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeBeltStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBeltStatusChanged.disconnect(model.sendBeltStatusChange)
- console.debug("exit")
- return { beltStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BELTSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeBodyInformation(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBodyInformationChanged.disconnect(model.sendBodyInformationChange)
- model.onBodyInformationChanged.connect(model.sendBodyInformationChange)
- console.debug("exit")
- return { bodyInformation:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BODYINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeBodyInformation(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onBodyInformationChanged.disconnect(model.sendBodyInformationChange)
- console.debug("exit")
- return { bodyInformation:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BODYINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeDeviceStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDeviceStatusChanged.disconnect(model.sendDeviceStatusChange)
- model.onDeviceStatusChanged.connect(model.sendDeviceStatusChange)
- console.debug("exit")
- return { deviceStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_DEVICESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeDeviceStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDeviceStatusChanged.disconnect(model.sendDeviceStatusChange)
- console.debug("exit")
- return { deviceStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_DEVICESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeDriverBraking(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDriverBrakingChanged.disconnect(model.sendDriverBrakingChange)
- model.onDriverBrakingChanged.connect(model.sendDriverBrakingChange)
- console.debug("exit")
- return { driverBraking:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BRAKING,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeDriverBraking(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onDriverBrakingChanged.disconnect(model.sendDriverBrakingChange)
- console.debug("exit")
- return { driverBraking:
- { dataType: Common.VehicleDataType.VEHICLEDATA_BRAKING,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeWiperStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onWiperStatusChanged.disconnect(model.sendWiperStatusChange)
- model.onWiperStatusChanged.connect(model.sendWiperStatusChange)
- console.debug("exit")
- return { wiperStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_WIPERSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeWiperStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onWiperStatusChanged.disconnect(model.sendWiperStatusChange)
- console.debug("exit")
- return { wiperStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_WIPERSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeHeadLampStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onHeadLampStatusChanged.disconnect(model.sendHeadLampStatusChange)
- model.onHeadLampStatusChanged.connect(model.sendHeadLampStatusChange)
- console.debug("exit")
- return { headLampStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeHeadLampStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onHeadLampStatusChanged.disconnect(model.sendHeadLampStatusChange)
- console.debug("exit")
- return { headLampStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeEngineTorque(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEngineTorqueChanged.disconnect(model.sendEngineTorqueChange)
- model.onEngineTorqueChanged.connect(model.sendEngineTorqueChange)
- console.debug("exit")
- return { engineTorque:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ENGINETORQUE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeEngineTorque(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEngineTorqueChanged.disconnect(model.sendEngineTorqueChange)
- console.debug("exit")
- return { engineTorque:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ENGINETORQUE,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeAccPedalPosition(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAccPedalPositionChanged.disconnect(model.sendAccPedalPositionChange)
- model.onAccPedalPositionChanged.connect(model.sendAccPedalPositionChange)
- console.debug("exit")
- return { accPedalPosition:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ACCPEDAL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeAccPedalPosition(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAccPedalPositionChanged.disconnect(model.sendAccPedalPositionChange)
- console.debug("exit")
- return { accPedalPosition:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ACCPEDAL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeSteeringWheelAngle(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSteeringWheelAngleChanged.disconnect(model.sendSteeringWheelAngleChange)
- model.onSteeringWheelAngleChanged.connect(model.sendSteeringWheelAngleChange)
- console.debug("exit")
- return { steeringWheelAngle:
- { dataType: Common.VehicleDataType.VEHICLEDATA_STEERINGWHEEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeSteeringWheelAngle(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onSteeringWheelAngleChanged.disconnect(model.sendSteeringWheelAngleChange)
- console.debug("exit")
- return { steeringWheelAngle:
- { dataType: Common.VehicleDataType.VEHICLEDATA_STEERINGWHEEL,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeECallInfo(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onECallInfoChanged.disconnect(model.sendECallInfoChange)
- model.onECallInfoChanged.connect(model.sendECallInfoChange)
- console.debug("exit")
- return { eCallInfo:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ECALLINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeECallInfo(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onECallInfoChanged.disconnect(model.sendECallInfoChange)
- console.debug("exit")
- return { eCallInfo:
- { dataType: Common.VehicleDataType.VEHICLEDATA_ECALLINFO,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeAirbagStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAirbagStatusChanged.disconnect(model.sendAirbagStatusChange)
- model.onAirbagStatusChanged.connect(model.sendAirbagStatusChange)
- console.debug("exit")
- return { airbagStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeAirbagStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onAirbagStatusChanged.disconnect(model.sendAirbagStatusChange)
- console.debug("exit")
- return { airbagStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeEmergencyEvent(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEmergencyEventChanged.disconnect(model.sendEmergencyEventChange)
- model.onEmergencyEventChanged.connect(model.sendEmergencyEventChange)
- console.debug("exit")
- return { emergencyEvent:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeEmergencyEvent(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onEmergencyEventChanged.disconnect(model.sendEmergencyEventChange)
- console.debug("exit")
- return { emergencyEvent:
- { dataType: Common.VehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeClusterModeStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onClusterModeStatusChanged.disconnect(model.sendClusterModeStatusChange)
- model.onClusterModeStatusChanged.connect(model.sendClusterModeStatusChange)
- console.debug("exit")
- return { clusterModeStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeClusterModeStatus(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onClusterModeStatusChanged.disconnect(model.sendClusterModeStatusChange)
- console.debug("exit")
- return { clusterModeStatus:
- { dataType: Common.VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-
- function subscribeMyKey(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onMyKeyChanged.disconnect(model.sendMyKeyChange)
- model.onMyKeyChanged.connect(model.sendMyKeyChange)
- console.debug("exit")
- return { myKey:
- { dataType: Common.VehicleDataType.VEHICLEDATA_MYKEY,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
- function unsubscribeMyKey(appID) {
- console.debug("enter")
- var model = dataContainer.vehicleInfoModel;
- model.onMyKeyChanged.disconnect(model.sendMyKeyChange)
- console.debug("exit")
- return { myKey:
- { dataType: Common.VehicleDataType.VEHICLEDATA_MYKEY,
- resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/log4cxx.properties b/SDL_Core/src/components/qt_hmi/qml_model_qt5/log4cxx.properties
deleted file mode 100644
index 0bc5ac8fd..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/log4cxx.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-# Socket logger
-log4j.appender.SocketHub=org.apache.log4j.net.SocketHubAppender
-log4j.appender.SocketHub.port=4555
-log4j.appender.SocketHub.locationInfo=true
-
-# Only ERROR and FATAL messages are logged to console
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.ImmediateFlush=true
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %m%n
-log4j.appender.Console.Threshold=ERROR
-
-# Log for all DBus plugin messages
-log4j.appender.DBusPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.DBusPluginLogFile.File=DBusPlugin.log
-log4j.appender.DBusPluginLogFile.append=false
-log4j.appender.DBusPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.DBusPluginLogFile.ImmediateFlush=true
-log4j.appender.DBusPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.DBusPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all HMI Framework plugin
-log4j.appender.HmiFrameworkPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.HmiFrameworkPluginLogFile.File=HmiFrameworkPlugin.log
-log4j.appender.HmiFrameworkPluginLogFile.append=false
-log4j.appender.HmiFrameworkPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.HmiFrameworkPluginLogFile.ImmediateFlush=true
-log4j.appender.HmiFrameworkPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.HmiFrameworkPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all Qt HMI
-log4j.rootLogger=ALL, Console
-
-# Log for DBus plugin QtHMI
-log4j.logger.DBusPlugin=ALL, DBusPluginLogFile
-
-# Log for HMI Framework plugin
-log4j.logger.HmiFrameworkPlugin=ALL, HmiFrameworkPluginLogFile
-
-# Log by log4cxx plugin
-log4j.logger.Log4cxxPlugin=ALL, HmiFrameworkPluginLogFile
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationData.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationData.qml
deleted file mode 100644
index 524ed02b0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationData.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * @file ApplicationData.qml
- * @brief Model for Application.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-QtObject {
- property string mainField1
- property string mainField2
- property string mainField3
- property string mainField4
- property string statusBar
- property string mediaTrack
- property string image
-
- function reset () {
- console.debug("enter")
- mainField1 = ""
- mainField2 = ""
- mainField3 = ""
- mainField4 = ""
- statusBar = ""
- mediaTrack = ""
- image = ""
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationModel.qml
deleted file mode 100644
index 81bfaef96..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ApplicationModel.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * @file ApplicationModel.qml
- * @brief Own fields for each application.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-
-QtObject {
- property int appId
- property string appName
- property string ngnMediaScreenAppName
- property Icon appIcon: Icon { }
- property string deviceName
- property int hmiDisplayLanguageDesired
- property bool isMediaApplication
- property int appType
- property int hmiUITextAlignment
- property string vrHelpTitle
- property string vrHelpTitleDefault: "VR HELP"
- property string vrHelpTitlePerformInteraction
- property string menuTitle
- property Icon menuIcon: Icon { }
-
- // media player
- property string playPauseState
- property ApplicationData hmiUIText: ApplicationData { }
- property MediaClockModel mediaClock: MediaClockModel { }
- property NavigationModel navigationModel: NavigationModel { }
-
- property string helpPrompt
- property string timeoutPrompt
- property ListModel vrHelpItems: ListModel { }
- property ListModel vrHelpItemsDefault: VrHelpItemsDefault { }
- property ListModel vrHelpItemsPerformInteraction: ListModel { }
- property ListModel options: ListModel { }
- property ListModel currentSubMenu: options
- property ListModel turnList
- property ListModel softButtons
- property ListModel turnListSoftButtons
- property ListModel navigationSoftButtons
- property ListModel alertManeuverSoftButtons
- property ListModel customPresets
- property int languageTTSVR
- // This place is for adding new properties
-
- function reset () {
- console.debug("enter")
- appId = -1
- appName = ""
- ngnMediaScreenAppName = ""
- appIcon.reset()
- deviceName = ""
- hmiDisplayLanguageDesired = -1
- isMediaApplication = false
- playPauseState = ""
- hmiUIText.reset()
-// no need to reset mediaClock
- helpPrompt = ""
- timeoutPrompt = ""
- options.clear()
- currentSubMenu = options
- turnList = null
- softButtons = null
- navigationSoftButtons = null
- alertManeuverSoftButtons = null
- turnListSoftButtons = null
- customPresets = null
- languageTTSVR = -1
- hmiUITextAlignment = -1
- appType = 0
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/CarMenuModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/CarMenuModel.qml
deleted file mode 100644
index c715ae091..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/CarMenuModel.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file CarMenuModel.qml
- * @brief Car menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-ListModel
-{
- ListElement {
- name: "ambient"
- icon: "../res/vehicle/Ambient Lighti Icon.png"
- qml: ""
- }
- ListElement {
- name: "cal"
- icon: "../res/vehicle/cal.png"
- qml: ""
- }
- ListElement {
- name: "ev"
- icon: "../res/vehicle/EV Icon.png"
- qml: ""
- }
- ListElement {
- name: "folders"
- icon: "../res/vehicle/folders.png"
- qml: ""
- }
- ListElement {
- name: "key"
- icon: "../res/vehicle/key_car.png"
- qml: ""
- }
- ListElement {
- name: "mcs"
- icon: "../res/vehicle/MCS Icon.png"
- qml: ""
- }
- ListElement {
- name: "sun"
- icon: "../res/vehicle/sun.png"
- qml: ""
- }
- ListElement {
- name: "sync"
- icon: "../res/vehicle/SYNC Services.png"
- qml: ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Constants.js b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Constants.js
deleted file mode 100644
index 0b4a3191d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Constants.js
+++ /dev/null
@@ -1,250 +0,0 @@
-/**
- * @file Constants.js
- * @brief Namespace of constants.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-.pragma library
-
-// Colors
-
-// Main color of HMI model(now it ~lightblue). Buttons, text, icons of this color.
-var primaryColor = "#1d81d5"
-
-// Color of pressed buttons, text, icons etc.
-var primaryColorPressed = "#8ec0ea"
-
-// Secondary color of HMI model, backgroud of this color.
-var secondaryColor = "black"
-
-// Color of text at buttonts that are inactive (at phone keyboard, when no any contact started with current letter).
-var inactiveButtonTextColor = "grey"
-
-// Color of text at buttonts that are inactive but nevertheless pressed (at phone keyboard, when no any contact started with current letter).
-var inactiveButtonTextColorPressed = "lightgrey"
-
-// Color of text at contact list screen view (Name, number and number type).
-var contactTextColor = "lightblue"
-
-// Color of text at buttons, when they are pressed.
-var pressedButtonTextColor = "black"
-
-// Color of text at "white" buttons, for all other buttons (which most) use primaryColor.
-var releasedButtonTextColor = "white"
-
-// Transparent background.
-var transparentColor = "#00000000"
-
-// "Warning" word color
-var warningColor = "red"
-
-// Color for PopUp
-var popUpBorderColor = "white"
-
-// Color for hardware and simulation panels
-var panelColor = "#003"
-
-// Color for text in hardware and simulation panels
-var panelTextColor = "white"
-
-// Audio pass thru PopUp text color
-var audioPassThruTextColor = "white"
-
-// Semi transparent color of item in SDL Navi menu
-var sdlNaviTransparentItemColor = "#30C0C0C0"
-
-//--------------------------------------------------------------------------------------
-
-// Font sizes of different elements
-
-// Font size for most of text in HMI model.
-var fontSize = 20
-
-// Font size for text inside oval buttons.
-var ovalButtonFontSize = 15
-
-// Title font size
-var titleFontSize = 35
-
-// Power on/off button font size
-var powerButtonFornSize = 25
-
-// Font size of status bar
-var statusBarFontSize = 15
-
-// Size icon for buttons
-var iconButtonSize = 30
-
-// Size icon for item list
-var iconItemListSize = 40
-
-// font size fo TTS popup
-var ttsFontSize = 12
-
-// Font size for list of applications
-var appListFontSize = 40
-
-// Size of contact list fields
-var contactListNameFieldSize = 0.4
-var contactListPhoneFieldSize = 0.3
-var contactListDescriptionFieldSize = 0.3
-
-//--------------------------------------------------------------------------------------
-
-// Sizes of buttons, menus, screen, etc
-
-// Minimal width and height of screen (screen wont resize, if height and width are lower).
-var mainScreenMinWidth = 800
-var mainScreenMiHeight = 600
-
-// Width for long oval button
-var ovalButtonWidth = 163
-
-// Height for oval button
-var ovalButtonHeight = 65
-
-// Height item list
-var itemListHeight = 60
-
-// Width for TTS popup
-var ttsPopUpWidth = 250
-
-// Height for TTS popup
-var ttsPopUpHeight = 100
-
-// Width for popup view
-var popupWidth = 700
-
-// Width for alert window
-var alertWidth = 360
-
-// Height for popup view
-var popupHeigth = 500
-
-// Width for combobox
-var defaultComboboxWidth = 150
-
-// Size icon for list of applications
-var appListIconSize = 100
-
-// DistanceBar height
-var distanceBarHeight = 1
-
-
-//---------------------------------------------------------------------------------------
-
-// Other
-
-// Offset from the edges of the screen.
-var margin = 20
-
-// Offset from the edges of the popup
-var popupMargin = 15
-
-// Spacing between items in SDLNavi view
-var sdlNaviSpacing = 5
-
-// Spacing between contacts at contact screen view.
-var contactListSpacing = 30
-
-// Duration of appearance of icon/button at icon/button menus.
-var animationDuration = 500
-
-// Duration of appearence of "OK" button at warning screen view, when HMI starts.
-var warningScreenDuration = 1000
-
-// Timer to check how long preset button is pressed.
-var presetButtonTimer = 800
-
-// Timer to check got long custom button is pressed.
-var customButtonTimer = 2000
-
-// Spacing between icon and item in list
-var iconItemListSpacing = 20
-
-// Spacing between item on views
-var generalSpacing = 10
-
-// Width of scrollBar
-var scrollBarWidth = 5
-
-// Speak text for a given time
-var ttsSpeakTime = 2000
-
-// Maximal number of submenus
-var maximumSubmenus = 1000
-
-// Maximal number of commands in submenu or root menu
-var maximumCommandsPerSubmenu = 1000
-
-// padding for popup view
-var popUpPadding = 20
-
-// Padding for TTS popup
-var ttsPopUpPadding = 10
-
-// -------------------------
-var sliderBarWidth = 400
-var sliderBarHeight = 50
-var sliderBarRadius = 3
-var sliderBarBorderWidth = 1
-var sliderTextColor = "white"
-var sliderBarBorderColor = "white"
-var sliderBarFillColor = "white"
-
-// -------------------------
-var scrollableMessageTextColor = "white"
-var scrollableMessageScrollBarColor = "gray"
-var scrollableMessageScrollBarWidth = 10
-
-// Padding for hardware and simulation panels
-var panelPadding = 20
-
-// Scale for pressed icon in menu
-var pressedIconScale = 1.1
-
-// Values of color effect for highlighted button
-var highlightedButtonHue = 0.9
-var highlightedButtonSaturation = 0.0
-var highlightedButtonLightness = 0.1
-
-// Values of color effect for disabled button
-var disabledButtonHue = 0.0
-var disabledButtonSaturation = -1.0
-var disabledButtonLightness = 0.1
-
-// Count of rows for grid menu
-var menuRowCount = 2
-
-// Count of columns for grid menu
-var menuColumnCount = 3
-
-// Position for element that came without position value (should be always at the end)
-var positionOfElementWithoutPosition = 1001
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ContactsListModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ContactsListModel.qml
deleted file mode 100644
index 7e9326e9d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ContactsListModel.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * @file ContactsListModel.qml
- * @brief List of contacts.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-ListModel
-{
- // TODO {ALeshin}: This list model should be sorted in ABC and Upper/lower case order,
- // when it will be filled dynamically.
- ListElement { name: "Aaron" ; phone:"(614)555-2444";type:"Mobile"}
- ListElement { name: "Adrian" ; phone:"(740)245-3434";type:"Mobile" }
- ListElement { name: "Albert" ; phone:"(614)245-5584";type:"Mobile" }
- ListElement { name: "Alice" ; phone:"(313)878-3566";type:"Office"}
- ListElement { name: "Alec" ; phone:"(917)608-2418";type:"Mobile"}
- ListElement { name: "Alexander" ; phone:"(614)608-2400";type:"Home"}
- ListElement { name: "Alexander Vasil'evich Michail Leontiy" ; phone:"(614)608-2400";type:"Mobile"}
- ListElement { name: "Amber" ; phone:"(614)608-2111";type:"Mobile"}
- ListElement { name: "Amy" ; phone:"(440)245-3434";type:"Mobile" }
- ListElement { name: "Andy" ; phone:"(313)245-3434";type:"Mobile" }
- ListElement { name: "Antje" ; phone:"(567)245-3434";type:"Home" }
- ListElement { name: "buddy" ; phone:"(614)813-6610";type:"Mobile" }
- ListElement { name: "Barry" ; phone:"(313)555-2211";type:"Mobile" }
- ListElement { name: "Bea" ; phone:"(614)455-3434";type:"Mobile" }
- ListElement { name: "Ben" ; phone:"(614)882-1843";type:"Office" }
- ListElement { name: "Blake" ; phone:"(330)149-7778";type:"Mobile" }
- ListElement { name: "Bob Mould" ; phone:"(313)245-3434";type:"Mobile" }
- ListElement { name: "Brian" ; phone:"(614)332-7499";type:"Mobile" }
- ListElement { name: "Calvin" ; phone:"(614)442-9974";type:"Mobile" }
- ListElement { name: "Carl" ; phone:"(567)773-3434";type:"Home" }
- ListElement { name: "Cat Power" ; phone:"(313)608-3434";type:"Home"}
- ListElement { name: "Cathy" ; phone:"(313)444-456";type:"Home"}
- ListElement { name: "Chris" ; phone:"(734)997-6514";type:"Home" }
- ListElement { name: "Cloud Nothings"; phone:"(444)608-543";type:"Mobile"}
- ListElement { name: "Cody" ; phone:"(567)365-8413";type:"Home" }
- ListElement { name: "Curtis" ; phone:"(614)245-1547";type:"Office" }
- ListElement { name: "Dakota" ; phone:"(567)555-4444";type:"Home" }
- ListElement { name: "Dale" ; phone:"(567)723-1974";type:"Mobile" }
- ListElement { name: "Dallas"; phone:"(614)556-879";type:"Home"}
- ListElement { name: "Damian" ; phone:"(614)245-3434";type:"Office" }
- ListElement { name: "Daniel"; phone:"(614)556-879";type:"Home"}
- ListElement { name: "Darina"; phone:"(313)895-888";type:"Mobile"}
- ListElement { name: "Dee "; phone:"(313)432-3434";type:"Home"}
-// ListElement { name: "Edward" ; phone:"(917)608-975";type:"Office"}
- ListElement { name: "Ferdinand" ; phone:"(917)879-795";type:"Mobile"}
- ListElement { name: "gomez" ; phone:"(313)455-543";type:"Mobile"}
- ListElement { name: "Harry Potter"; phone:"(313)888-432";type:"Home"}
- ListElement { name: "Ivan"; phone:"(313)996-225";type:"Home"}
-// ListElement { name: "James" ; phone:"(917)608-3434";type:"Mobile"}
- ListElement { name: "Karen"; phone:"(313)998-332";type:"Home"}
- ListElement { name: "Luis Torres"; phone:"(313)779-111";type:"Home"}
- ListElement { name: "Mary"; phone:"(313)234-098";type:"Mobile"}
- ListElement { name: "Neil"; phone:"(313)444-112";type:"Mobile"}
- ListElement { name: "Oswald"; phone:"(313)456-921";type:"Mobile"}
- ListElement { name: "Oscar"; phone:"(313)332-778";type:"Home"}
- ListElement { name: "~1123"; phone:"(313)1332";type:"Home"}
- ListElement { name: "Patrice"; phone:"(313)789-111";type:"Mobile"}
- ListElement { name: "Queen Elizabeth"; phone:"(313)897-666";type:"Mobile"}
- ListElement { name: "Rose"; phone:"(313)111-211";type:"Mobile"}
- ListElement { name: "Susell"; phone:"(313)345-122";type:"Home"}
- ListElement { name: "Thomas"; phone:"(917)608-342";type:"Mobile"}
- ListElement { name: "Titus Andronicus" ; phone:"(917)608-321";type:"Office"}
- ListElement { name: "Toretto" ; phone:"(917)608-3434";type:"Home"}
- ListElement { name: "Uhl" ; phone:"(313)444-654";type:"Office"}
- ListElement { name: "willi" ; phone:"(313)224-5712";type:"Office"}
- ListElement { name: "Wanda" ; phone:"(313)666-6969";type:"Office"}
- ListElement { name: "wanda" ; phone:"(313)666-6969";type:"Office"}
- ListElement { name: "Zara" ; phone:"(313)231-009";type:"Mobile"}
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml
deleted file mode 100644
index 619776832..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/DataStorage.qml
+++ /dev/null
@@ -1,651 +0,0 @@
-/**
- * @file DataStorage.qml
- * @brief Container for data.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "Internal.js" as Internal
-import "Constants.js" as Constants
-
-QtObject {
- property string contactsFirstLetter // first letter of contact's name that need to find at contact list
- property ApplicationModel currentApplication: ApplicationModel { }
- property SliderModel uiSlider: SliderModel { }
- property PerformAudioPassThruModel uiAudioPassThru: PerformAudioPassThruModel { }
- property ScrollableMessageModel scrollableMessageModel: ScrollableMessageModel { }
-
- function getApplication(appId) {
- console.log("enter");
- for(var i = 0; i < applicationList.count; i++) {
- if(applicationList.get(i).appId === appId) {
- console.log("Application found", applicationList.get(i));
- return applicationList.get(i);
- }
- }
- console.log("exit");
- }
-
- function getStashedApplication(appId) {
- console.log("enter getStashedApplication function");
- for(var i = 0; i < stashedApplicationsList.count; i++) {
- if(stashedApplicationsList.get(i).appId === appId) {
- console.log("Application found", stashedApplicationsList.get(i));
- return stashedApplicationsList.get(i);
- }
- }
- console.log("exit getStashedApplication: application was not found");
- }
-
- onApplicationListChanged: {
- console.log("onApplicationListChanged()");
- setCurrentApplication(appId);
- }
-
- function setCurrentApplication(appId) {
- console.log("Enter setCurrentApplication function");
- var oldApplicationContext = applicationContext;
- if (currentApplication.appId !== appId) {
- applicationContext = false;
- }
-
- for(var i = 0; i < applicationList.count; i++) {
- if(applicationList.get(i).appId === appId) {
- currentApplication.appId = appId
- var application = applicationList.get(i)
-
- currentApplication.appName = application.appName
- currentApplication.appType = application.appType
- currentApplication.appIcon.source = application.icon
- currentApplication.playPauseState = application.playPauseState
- currentApplication.options = application.options
- currentApplication.softButtons = application.softButtons
- currentApplication.navigationSoftButtons = application.navigationSoftButtons
- currentApplication.alertManeuverSoftButtons = application.alertManeuverSoftButtons
- currentApplication.customPresets = application.customPresets
-
- if (application.navigationModel.text1 !== undefined) {
- currentApplication.navigationModel.text1 = application.navigationModel.text1
- }
- if (application.navigationModel.text2 !== undefined) {
- currentApplication.navigationModel.text2 = application.navigationModel.text2
- }
- if (application.navigationModel.totalDistance !== undefined) {
- currentApplication.navigationModel.totalDistance = application.navigationModel.totalDistance
- }
- if (application.navigationModel.eta !== undefined) {
- currentApplication.navigationModel.eta = application.navigationModel.eta
- }
- if (application.navigationModel.timeToDestination !== undefined) {
- currentApplication.navigationModel.timeToDestination = application.navigationModel.timeToDestination
- }
- if (application.navigationModel.turnIcon !== undefined) {
- currentApplication.navigationModel.turnIcon = application.navigationModel.turnIcon
- }
- if (application.navigationModel.nextTurnIcon !== undefined) {
- currentApplication.navigationModel.nextTurnIcon = application.navigationModel.nextTurnIcon
- }
- if (application.navigationModel.distanceToManeuver !== undefined) {
- currentApplication.navigationModel.distanceToManeuver = application.navigationModel.distanceToManeuver
- }
- if (application.navigationModel.distanceToManeuverScale !== undefined) {
- currentApplication.navigationModel.distanceToManeuverScale = application.navigationModel.distanceToManeuverScale
- }
- if (application.navigationModel.maneuverComplete !== undefined) {
- currentApplication.navigationModel.maneuverComplete = application.navigationModel.maneuverComplete
- }
- if (application.navigationModel.appID !== undefined) {
- currentApplication.navigationModel.appID = application.navigationModel.appID
- }
- if (application.hmiUIText.mainField1 !== undefined) {
- currentApplication.hmiUIText.mainField1 = application.hmiUIText.mainField1
- }
- if (application.hmiUIText.mainField2 !== undefined) {
- currentApplication.hmiUIText.mainField2 = application.hmiUIText.mainField2
- }
- if (application.hmiUIText.mainField3 !== undefined) {
- currentApplication.hmiUIText.mainField3 = application.hmiUIText.mainField3
- }
- if (application.hmiUIText.mainField4 !== undefined) {
- currentApplication.hmiUIText.mainField4 = application.hmiUIText.mainField4
- }
- if (application.hmiUIText.statusBar !== undefined) {
- currentApplication.hmiUIText.statusBar = application.hmiUIText.statusBar
- }
- if (application.hmiUIText.mediaTrack !== undefined) {
- currentApplication.hmiUIText.mediaTrack = application.hmiUIText.mediaTrack
- }
- if (application.hmiUIText.image !== undefined) {
- currentApplication.hmiUIText.image = application.hmiUIText.image
- }
- if (application.hmiUITextAlignment !== undefined) {
- currentApplication.hmiUITextAlignment = application.hmiUITextAlignment
- }
- if (application.helpPrompt !== undefined) {
- currentApplication.helpPrompt = application.helpPrompt
- }
- if (application.timeoutPrompt !== undefined) {
- currentApplication.timeoutPrompt = application.timeoutPrompt
- }
- if (application.mediaClock.startTime !== undefined) {
- currentApplication.mediaClock.startTime = application.mediaClock.startTime
- }
- if (application.mediaClock.endTime !== undefined) {
- currentApplication.mediaClock.endTime = application.mediaClock.endTime
- }
- // Check fields with mandatory = false
-
- if (application.menuIcon !== undefined) {
- currentApplication.menuIcon.source = application.menuIcon
- }
- currentApplication.vrHelpTitle = application.vrHelpTitle
- currentApplication.vrHelpTitleDefault = application.vrHelpTitleDefault
- currentApplication.vrHelpTitlePerformInteraction = application.vrHelpTitlePerformInteraction
- currentApplication.menuTitle = application.menuTitle
- currentApplication.vrHelpItems = application.vrHelpItems
- currentApplication.vrHelpItemsPerformInteraction = application.vrHelpItemsPerformInteraction
- currentApplication.deviceName = application.deviceName
- currentApplication.isMediaApplication = application.isMediaApplication
- currentApplication.turnList = application.turnList
- currentApplication.turnListSoftButtons = application.turnListSoftButtons
- currentApplication.mediaClock.updateMode = application.mediaClock.updateMode
- currentApplication.mediaClock.runningMode = application.mediaClock.runningMode
- if (application.startTimeForProgress !== undefined) {
- currentApplication.mediaClock.startTimeForProgress = application.mediaClock.startTimeForProgress
- }
- currentApplication.languageTTSVR = application.languageTTSVR
- currentApplication.hmiDisplayLanguageDesired = application.hmiDisplayLanguageDesired
- // This place is for adding new properties
- }
- }
- applicationContext = oldApplicationContext;
- currentApplicationChanged()
- console.log("Exit setCurrentApplication function")
- }
-
- function addApplication(app) {
- console.log("enter")
- applicationList.append({
- appName: app.appName,
- ngnMediaScreenAppName: app.ngnMediaScreenAppName,
- icon: app.icon,
- menuIcon: {
- value: "",
- imageType: 1
- },
- deviceName: app.deviceName,
- appId: app.appId,
- hmiDisplayLanguageDesired: app.hmiDisplayLanguageDesired,
- isMediaApplication: app.isMediaApplication,
- appType: app.appType,
- helpPrompt: "",
- timeoutPrompt: "",
- customPresets: app.customPresets ? app.customPresets : [],
- playPauseState: 'Pause',
- hmiUIText: app.hmiUIText,
- hmiUITextAlignment: app.hmiUITextAlignment,
- options: [],
- turnList: [],
- turnListSoftButtons: [],
- mediaClock: app.mediaClock,
- languageTTSVR: Common.Language.EN_US,
- softButtons: [],
- vrHelpTitle: "",
- vrHelpTitlePerformInteraction: "",
- vrHelpTitleDefault: "VR HELP",
- menuTitle: "",
- keyboardProperties: [],
- vrHelpItems: [],
- vrHelpItemsPerformInteraction: [],
- vrHelpItemsDefault: {
- text: "VrHelpItems - defaultText1",
- image: "",
- position: 1
- },
- navigationSoftButtons: [],
- alertManeuverSoftButtons: [],
- navigationModel: {
- appID: -1,
- text1: "",
- text2: "",
- totalDistance: "",
- eta: "",
- timeToDestination: "",
- turnIcon: {
- value: "",
- imageType: -1
- },
- nextTurnIcon: {
- value: "",
- imageType: -1
- },
- distanceToManeuver: 0,
- distanceToManeuverScale: 0,
- maneuverComplete: null
- }
- // This place is for adding new properties
- })
- if (app.isMediaApplication) {
- musicSourceModel.insert(0, {
- "title": app.appName,
- "qml": "views/SDLPlayerView.qml",
- "appId": app.appId
- })
- }
-
- console.log("exit")
- }
-
- function setApplicationProperties(appId, props) {
- console.log("Enter setApplicationProperties function");
-
- var app = getApplication(appId)
- for (var p in props) {
- console.debug(p)
- if (props[p] !== undefined) {
- app[p] = props[p]
- }
- }
- if (currentApplication.appId === appId) {
- setCurrentApplication(appId); // copy new values to current application
- }
- console.log("Exit setApplicationProperties function");
- }
-
- function removeApplication(appId) {
- console.log("enter");
- for (var j = 0; j < musicSourceModel.count; ++j) {
- if (musicSourceModel.get(j).appId === appId) {
- musicSourceModel.remove(j);
- break;
- }
- }
- for (var i = 0; i < applicationList.count; i++) {
- if (applicationList.get(i).appId === appId) {
- applicationList.remove(i);
- break;
- }
- }
- console.log("exit");
- }
-
- function stashApplication(appId) {
- console.log("stashApplication enter");
- stashedApplicationsList.append(getApplication(appId))
- console.log("stashApplication exit");
- }
-
- function getResumeResult (appID) {
-
- if (getStashedApplication(appId) && getApplication(appID)) {
- var stashedApp = getStashedApplication(appId),
- app = getApplication(appID);
- if (stashedApp.options.count == app.options.count) {
- for (var optionIndex = 0; optionIndex < stashedApp.options.count; ++optionIndex) {
- if (app.options.get(optionIndex).type === Internal.MenuItemType.MI_SUBMENU) {
- //comparison subMenu compare
-
- if ( !((app.options.get(optionIndex).id === stashedApp.options.get(optionIndex).id) &&
- (app.options.get(optionIndex).name === stashedApp.options.get(optionIndex).name) &&
- (app.options.get(optionIndex).position === stashedApp.options.get(optionIndex).position) &&
- (app.options.get(optionIndex).icon === stashedApp.options.get(optionIndex).icon))) {
- return {
- result: false
- }
- }
-
- var stashedAppSubMenu = stashedApp.options.get(optionIndex).subMenu,
- appSubMenuArray = app.options.get(optionIndex).subMenu;
-
- if (stashedAppSubMenu.length != appSubMenuArray.length) {
- return {
- result: false
- }
- }
-
- for (var subMenuIndex = 0; subMenuIndex < stashedAppSubMenu.length; subMenuIndex++) {
- if ( !((appSubMenuArray[subMenuIndex].id === stashedAppSubMenu[subMenuIndex].id) &&
- (appSubMenuArray[subMenuIndex].name === stashedAppSubMenu[subMenuIndex].name) &&
- (appSubMenuArray[subMenuIndex].position === stashedAppSubMenu[subMenuIndex].position) &&
- (appSubMenuArray[subMenuIndex].icon === stashedAppSubMenu[subMenuIndex].icon)
- )) {
- return {
- result: false
- }
- }
- }
- } else {
- //comparison Command compare
- if ( !((app.options.get(optionIndex).id === stashedApp.options.get(optionIndex).id) &&
- (app.options.get(optionIndex).name === stashedApp.options.get(optionIndex).name) &&
- (app.options.get(optionIndex).position === stashedApp.options.get(optionIndex).position) &&
- (app.options.get(optionIndex).icon === stashedApp.options.get(optionIndex).icon)
- )) {
- return {
- result: false
- }
- }
- }
- }
- // if all commands and subMenus were same
- // rerturn SUCCESS result
- return {
- result: true
- }
- }
- }
-
- return {
- result: false
- }
- }
-
- property int systemContext
- property int hmiContext
- property bool applicationContext: false
- property bool applicationSavedContext
- property string routeText: ""
- property PlayerState cdPlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState ipodPlayerState: PlayerState {
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- playPauseState: 'Pause'
- }
- property PlayerState usbPlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState linePlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState btPlayerState: PlayerState {
- playPauseState: 'Pause'
- albumImage: "../res/album_art.png"
- trackNumber: "13/16"
- trackName: "The Dog Days Are Over"
- albumName: "Florence and the Machine"
- }
- property PlayerState amPlayerState: PlayerState {
- songName: "So Far Around The Bend"
- albumName: "The National"
- presets: [ "1130", "950", "760", "1270", "1400", "2100", "940", "1001" ]
- }
- property PlayerState fmPlayerState: PlayerState {
- songName: "So Far Around The Bend"
- albumName: "The National"
- presets: ["96.3", "107.9", "104.3", "101.9", "105.3", "100.5", "107.9", "103.4"]
- }
- property PlayerState siriusPlayerState: PlayerState {
- songName: "So Far Around The Bend"
- albumName: "The National"
- presets: [ "Lithium", "Spectrum", "ESPN", "Alt Nation", "Lithium", "Spectrum", "ESPN", "Alt Nation" ]
- }
-
- property bool hmiVRAvailable: false
- property bool hmiTTSAvailable: false
- property bool hmiNavigationAvailable: false
- property bool hmiVehicleInfoAvailable: false
- property bool hmiUIAvailable: false
-
- property int hmiUILanguage: Common.Language.EN_US
- property int hmiTTSVRLanguage: Common.Language.EN_US
-
- property ListModel deviceList: ListModel { }
- property ListModel applicationList: ListModel { }
- property ListModel stashedApplicationsList: ListModel { }
- property ListModel vrCommands: ListModel {}
-
- function reset () {
- console.log("dataContainer reset enter");
- routeText = ""
- console.log("dataContainer reset exit");
- }
-
- function changeRegistrationUI (language, appID) {
- console.log("dataContainer changeRegistrarionUI enter");
- setApplicationProperties(appID, { hmiDisplayLanguageDesired: language });
- console.log("dataContainer changeRegistrarionUI exit");
- }
-
- function changeRegistrationTTSVR(language, appID) {
- console.log("dataContainer changeRegistrationTTSVR enter");
- setApplicationProperties(appID, { languageTTSVR: language });
- console.log("dataContainer changeRegistrationTTSVR exit");
- }
-
- function addCommand (cmdID, menuParams, cmdIcon, appID) {
- console.debug("enter: " +
- cmdID +
- ", " +
- (menuParams ?
- "{" + menuParams.parentID + ", " + menuParams.position + ", " + menuParams.menuName + "}" : menuParams) +
- ", " +
- (cmdIcon ?
- "{" + cmdIcon.value + ", " + cmdIcon.imageType + "}" : cmdIcon) +
- ", " +
- appID
- )
- var commandToAddPosition
- var app = getApplication(appID)
- var currentMenu = app.options
- var maximumCommands = Constants.maximumCommandsPerSubmenu
- var index = 0
-
- if ((menuParams) && (menuParams.parentID)) { // Work with sub menu
- var parentNotFound = true
- for (var optionIndex = 0; optionIndex < app.options.count; ++optionIndex) {
- if ((app.options.get(optionIndex).type === Internal.MenuItemType.MI_SUBMENU) && (app.options.get(optionIndex).id === menuParams.parentID)) {
- currentMenu = app.options.get(optionIndex).subMenu
- parentNotFound = false
- maximumCommands += 1
- }
- }
- if (parentNotFound) {
- console.log("UI::addCommand(): parentID " + menuParams.parentID + " not found")
- }
- }
-
- if (currentMenu.count < maximumCommands) {
- if (menuParams && (menuParams.position !== undefined)) {
- commandToAddPosition = menuParams.position
- } else {
- commandToAddPosition = Constants.positionOfElementWithoutPosition
- }
- for (var i = 0; i < currentMenu.count; i++) {
- if (commandToAddPosition >= currentMenu.get(i).position) {
- index = i + 1
- } else {
- break
- }
- }
- currentMenu.insert( index,
- { id: cmdID,
- name: menuParams.menuName,
- type: Internal.MenuItemType.MI_NODE,
- position: commandToAddPosition,
- icon: cmdIcon ? cmdIcon : {},
- subMenu: []
- })
- } else {
- console.log("addCommand(): too many commands in menu: ", menuParams.parentID, " rejecting")
- throw Common.Result.REJECTED
- }
- console.debug("exit")
- }
-
- function deleteCommand (cmdID, appID) {
- console.debug("enter: " + cmdID + ", " + appID)
- for (var optionIndex = 0; optionIndex < getApplication(appID).options.count; ++optionIndex) {
- var option = getApplication(appID).options.get(optionIndex)
- if (option.type === Internal.MenuItemType.MI_NODE) {
- if (option.id === cmdID) {
- getApplication(appID).options.remove(optionIndex)
- break
- }
- }
- if (option.type === Internal.MenuItemType.MI_SUBMENU) {
- var subMenu = option.subMenu
- var idMatchFound = false
- for (var subOptionIndex = 0; subOptionIndex < subMenu.count; ++subOptionIndex) {
- if (subMenu.get(subOptionIndex).id === cmdID) {
- idMatchFound = true
- if (subMenu !== currentApplication.currentSubMenu) {
- subMenu.remove(subOptionIndex)
- }
- else {
- console.log("UI::deleteCommand(): cannot remove item from current submenu")
- throw Common.Result.IN_USE
- }
- break
- }
- }
- if (idMatchFound) {
- break
- }
- }
- }
- console.debug("exit")
- }
-
- function addSubMenu (menuID, menuParams, appID) {
- console.debug("enter: " + menuID + ", {" + menuParams.parentID + ", " + menuParams.position + ", " + menuParams.menuName + "}, " + appID)
- var app = getApplication(appID)
- var index = 0
- var count = app.options.count
- var subMenuToAddPosition
-
- if (count < Constants.maximumSubmenus) {
- if (menuParams.position !== undefined) {
- subMenuToAddPosition = menuParams.position
- } else {
- subMenuToAddPosition = Constants.positionOfElementWithoutPosition
- }
- for (var i = 0; i < count; i++) {
- if (subMenuToAddPosition >= app.options.get(i).position) {
- index = i + 1
- } else {
- break
- }
- }
- app.options.insert(index, {
- "id": menuID,
- "name": menuParams.menuName,
- "position": subMenuToAddPosition,
- "type": Internal.MenuItemType.MI_SUBMENU,
- "icon": undefined,
- "subMenu": [{
- "id": -1,
- "name": menuParams.menuName,
- "position": -1,
- "type": Internal.MenuItemType.MI_PARENT,
- "icon": {
- "imageType": Common.ImageType.DYNAMIC,
- "value": "../res/nav/turnArrow.png"
- },
- "subMenu": getApplication(appID).options
- }]
- })
- }
- else {
- console.log("addSubMenu(): too many submenus, rejecting")
- throw Common.Result.REJECTED
- }
- console.debug("exit")
- }
-
- function deleteSubMenu (menuID, appID) {
- console.debug("enter: " + menuID + ", " + appID)
- for (var optionIndex = 0; optionIndex < getApplication(appID).options.count; ++optionIndex) {
- var option = getApplication(appID).options.get(optionIndex)
- if ((option.type === Internal.MenuItemType.MI_SUBMENU) && (option.id === menuID)) {
- if (option.subMenu !== currentApplication.currentSubMenu) {
- getApplication(appID).options.remove(optionIndex)
- }
- else {
- console.log("UI::deleteSubMenu(): cannot remove current submenu")
- throw Common.Result.IN_USE
- }
- break
- }
- }
- console.debug("exit")
- }
- property VehicleInfoModel vehicleInfoModel: VehicleInfoModel { }
- property bool activeVR: false
- property int driverDistractionState: Common.DriverDistractionState.DD_OFF
- onDriverDistractionStateChanged: {
- sdlUI.onDriverDistraction(driverDistractionState);
- }
- property bool activeTTS: false
- property var activePopup: [] // Stack of names of active pop ups
- property int popups: 0
-
- property bool activeAlert: false
-
- onActiveVRChanged: setSystemContext()
- onActiveAlertChanged: setSystemContext()
- onPopupsChanged: setSystemContext()
-
- function setSystemContext () {
- console.debug("enter")
- if (popups > 0) {
- systemContext = Common.SystemContext.SYSCTXT_HMI_OBSCURED
- }
- else if (activeAlert) {
- systemContext = Common.SystemContext.SYSCTXT_ALERT
- }
- else if (activeVR) {
- systemContext = Common.SystemContext.SYSCTXT_VRSESSION
- }
- else if (contentLoader.item !== null) {
- systemContext = contentLoader.item.systemContext
- }
- console.debug("exit")
- }
- property MusicSourceModel musicSourceModel: MusicSourceModel {
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Internal.js b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Internal.js
deleted file mode 100644
index 53d764013..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/Internal.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-.pragma library
-.import "../hmi_api/Common.js" as Common
-
-var MenuItemType = {
- MI_NODE: 0,
- MI_SUBMENU: 1,
- MI_PARENT: 2
-}
-
-function activePageChoose(flickElement, pages) {
- if (flickElement.contentX <= 0) {
- return 0
- }
- else if ( (flickElement.contentWidth - flickElement.contentX) < flickElement.width) {
- return pages -1
- }
- else {
- if ( (flickElement.contentX % flickElement.width) >= (1/6 * flickElement.width)) {
- return Math.ceil(flickElement.contentX / flickElement.width)
- }
- else if ( (flickElement.contentX % flickElement.width) > 0) {
- return Math.floor(flickElement.contentX / flickElement.width)
- }
- }
-}
-
-var MediaClockUpdateMode = {
- MCU_COUNTUP: 0,
- MCU_COUNTDOWN: 1,
-}
-
-var MediaClockRunningMode = {
- MCR_RUNNING: 0,
- MCR_STOPPED: 1
-}
-
-function chooseAppStartScreen(appType, isMediaApplication) {
- if (checkBit(appType, Common.AppHMIType.NAVIGATION)) {
- return "./views/SDLNavi.qml"
- } else if (isMediaApplication) {
- return "./views/SDLPlayerView.qml"
- } else {
- return "./views/SDLNonMediaView.qml"
- }
-}
-
-function appendVrHelpItem (arrayElement, index, array) {
- this.append({
- text: arrayElement.text,
- image: arrayElement.image ? arrayElement.image : "",
- position: arrayElement.position
- })
-}
-
-function checkBit(value, bitPosition) {
- return (value & (1 << bitPosition))
-}
-
-function getArrayForPresetRow(app) {
- var array = []
- for (var i = 0; i < app.customPresets.count; i++) {
- array.push(app.customPresets.get(i).text)
- }
- return array
-}
-
-function pad (string, length, lead) {
- if (!lead) {
- lead = '0'
- }
- var paddedString = "" + string
- while (paddedString.length < length) {
- paddedString = lead + paddedString
- }
- return paddedString
-}
-
-function hmsTime (hours, minutes, seconds) {
- return 60 * (60 * hours + minutes) + seconds
-}
-
-function hmsTimeToString (hmsTime) {
- if (hmsTime === -1) {
- return "0:00:00"
- }
-
- var _time = hmsTime
- var seconds = _time % 60
- _time -= seconds
- _time /= 60
- var minutes = _time % 60
- _time -= minutes
- _time /= 60
- var hours = _time
- var string = ""
- string += hours
- string += ":"
- string += pad(minutes, 2)
- string += ":"
- string += pad(seconds, 2)
- return string
-}
-
-function stringToHmsTime (hmsString) {
- console.debug("enter: \"" + hmsString + "\"")
- var substrings = hmsString.split(":")
- var seconds = substrings.length > 0 ? parseInt(substrings.pop()) : 0
- if (seconds >= 60) {
- console.log("incorrect field \"seconds\": " + seconds)
- console.debug("exit")
- return 0
- }
- var minutes = substrings.length > 0 ? parseInt(substrings.pop()) : 0
- if (minutes >= 60) {
- console.log("incorrect field \"minutes\": " + minutes)
- console.debug("exit")
- return 0
- }
- var hours = substrings.length > 0 ? parseInt(substrings.pop()) : 0
- console.debug("exit")
- return hmsTime(hours, minutes, seconds)
-}
-
-function mediaClockUpdateModeToString (mediaClockUpdateMode) {
- switch (mediaClockUpdateMode) {
- case MediaClockUpdateMode.MCU_COUNTUP:
- return "Internal.MediaClockUpdateMode.MCU_COUNTUP"
- case MediaClockUpdateMode.MCU_COUNTDOWN:
- return "Internal.MediaClockUpdateMode.MCU_COUNTDOWN"
- default:
- return ""
- }
-}
-
-function mediaClockRunningModeToString (mediaClockRunningMode) {
- switch (mediaClockRunningMode) {
- case MediaClockRunningMode.MCR_RUNNING:
- return "Internal.MediaClockRunningMode.MCR_RUNNING"
- case MediaClockRunningMode.MCR_STOPPED:
- return "Internal.MediaClockRunningMode.MCR_STOPPED"
- default:
- return ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MainMenuListModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MainMenuListModel.qml
deleted file mode 100644
index c880f989d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MainMenuListModel.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file MainMenuListModel.qml
- * @brief Main menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-ListModel
-{
- ListElement {
- name: "Climate"
- icon: "../res/snow.png"
- qml: "./views/ClimateControlView.qml"
- }
-
- ListElement {
- name: "Navigation"
- icon: "../res/arrow.png"
- qml: "./views/NavigationNoRouteGridView.qml"
- }
-
- ListElement {
- name: "Media"
- icon: "../res/notes.png"
- qml: "./views/MusicSourceView.qml"
- }
-
- ListElement {
- name: "Preferences"
- icon: "../res/gear.png"
- qml: ""
- }
-
- ListElement {
- name: "Apps"
- icon: "../res/apps.png"
- qml: "./views/ApplicationListView.qml"
- }
-
- ListElement {
- name: "Phone"
- icon: "../res/phone/phone.png"
- qml: "./views/PhoneMenuGridView.qml"
- }
-
- ListElement {
- name: "Car"
- icon: "../res/car.png"
- qml: "./views/CarMenuGridView.qml"
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml
deleted file mode 100644
index 233863823..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MediaClockModel.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * @file MediaClockModel.qml
- * @brief Media clock model
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "Internal.js" as Internal
-
-QtObject {
- property int updateMode
- property int runningMode
- property int startTime
- property int endTime
- property int upperTimeLimit: 60 * 60 * 60 - 1
- property int startTimeForProgress
- property real progress
-
- property Timer timer: Timer {
- id: timer
- interval: 1000
- repeat: true
- onTriggered: onTimer()
- }
- onRunningModeChanged: {
- if (runningMode === Internal.MediaClockRunningMode.MCR_STOPPED) {
- timer.stop()
- } else {
- timer.start()
- }
- }
-
- onStartTimeChanged: {
- if (startTime === -1) {
- progress = 0
- } else {
- if (updateMode === Internal.MediaClockUpdateMode.MCU_COUNTUP) {
- progress = (endTime !== -1) ? (startTime / endTime) : (startTime / upperTimeLimit)
- } else {
- progress = (endTime !== -1) ? ( (startTime - endTime) / (startTimeForProgress - endTime) )
- : (startTime / startTimeForProgress)
- }
- }
- }
-
- function onTimer () {
- switch (updateMode) {
- case Internal.MediaClockUpdateMode.MCU_COUNTUP:
- if (endTime !== -1) {
- if (startTime < endTime) {
- startTime++
- } else {
- timer.stop()
- runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- console.debug("count Up timer stopped")
- }
- } else {
- if (startTime < upperTimeLimit) {
- startTime++
- } else {
- startTime = 0
- }
- }
- break
- case Internal.MediaClockUpdateMode.MCU_COUNTDOWN:
- console.debug("count down")
- if (--startTime === 0) {
- timer.stop()
- runningMode = Internal.MediaClockRunningMode.MCR_STOPPED
- startTime = endTime = -1
- console.debug("count Down timer stopped")
- }
- break
- }
- dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, {
- "mediaClock": {startTime: startTime,
- endTime: endTime,
- updateMode: updateMode,
- runningMode: runningMode,
- startTimeForProgress: startTimeForProgress
- }
- })
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MusicSourceModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MusicSourceModel.qml
deleted file mode 100644
index 7497d987d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/MusicSourceModel.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file MusicSourceModel.qml
- * @brief Music source menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-ListModel
-{
- ListElement {
- title: "FM"
- qml: "./views/FMPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "AM"
- qml: "./views/AMPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "BT Audio"
- qml: "./views/BTPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "Sirius"
- qml: "./views/SiriusPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "CD"
- qml: "./views/CDPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "iPod"
- qml: "./views/IPodPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "USB"
- qml: "./views/UsbPlayerView.qml"
- appId: 0
- }
- ListElement {
- title: "LineIn"
- qml: "./views/LineInPlayerView.qml"
- appId: 0
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationMenuModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationMenuModel.qml
deleted file mode 100644
index 6e434495a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationMenuModel.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * @file NavigationMenuModel.qml
- * @brief Model for navigation menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-ListModel
-{
- ListElement {
- title: "Home"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Keyboard"
- icon: "../res/buttons/long_oval_btn.png"
- qml: "./views/NavigationKeyboardView.qml"
- }
- ListElement {
- title: "Favorites"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Work"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Recent"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "POI"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Scout"
- icon: "../res/buttons/long_oval_btn.png"
- }
- ListElement {
- title: "Waze"
- icon: "../res/buttons/long_oval_btn.png"
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationModel.qml
deleted file mode 100644
index 524de403b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/NavigationModel.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * @file NavigationModel.qml
- * @brief Model for Navigation.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-QtObject {
- property string text1: ""
- property string text2: ""
- property string totalDistance: ""
- property string eta: ""
- property string timeToDestination: ""
- property var turnIcon
- property var nextTurnIcon
-
- property real distanceToManeuver: 0
- property real distanceToManeuverScale: 0
- property bool maneuverComplete: null
- property int appID: -1
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PerformAudioPassThruModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PerformAudioPassThruModel.qml
deleted file mode 100644
index 0952b7d8a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PerformAudioPassThruModel.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @file PerformAudioPassThruModel.qml
- * @brief Data model audio pass thru.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-QtObject {
- property string appName: ""
- property string firstLine: ""
- property string secondLine: ""
- property int timeout: 0
- property bool running: false
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PhoneMenuModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PhoneMenuModel.qml
deleted file mode 100644
index 519f48a80..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PhoneMenuModel.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file PhoneMenuModel.qml
- * @brief Phone menu list of elements.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-ListModel
-{
- ListElement {
- name: "phone"
- icon: "../res/phone/phone.png"
- qml: ""
- }
- ListElement {
- name: "contacts"
- icon: "../res/phone/contacts.png"
- qml: "./views/PhoneKeyboardView.qml"
- }
- ListElement {
- name: "messages"
- icon: "../res/phone/messages.png"
- qml: ""
- }
- ListElement {
- name: "DND"
- icon: "../res/phone/dnd_off.png"
- qml: ""
- }
- ListElement {
- name: "texts"
- icon: "../res/phone/texts.png"
- qml: ""
- }
- ListElement {
- name: "recent"
- icon: "../res/phone/recent.png"
- qml: ""
- }
- ListElement {
- name: "keyboard"
- icon: "../res/phone/keypad.png"
- qml: ""
- }
- ListElement {
- name: "more"
- icon: "../res/phone/more.png"
- qml: ""
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PlayerState.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PlayerState.qml
deleted file mode 100644
index 9707f3519..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/PlayerState.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file PlayerState.qml
- * @brief List of parameters for each player.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-// Player state for all players except SDL media player
-Item {
- // Media players
- property string playPauseState
- property string albumImage
- property string trackNumber
- property int songPosition
- property string trackName
-
- // Radio Players
- property var presets: []
-
- // Both players
- property string songName
- property string albumName
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ScrollableMessageModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ScrollableMessageModel.qml
deleted file mode 100644
index 9f45a5d06..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/ScrollableMessageModel.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file ScrollableMessageModel.qml
- * @brief Model for Scrollable Message.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-QtObject {
- property string longMessageText: "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh" +
- "ffsdjjjjjjjjj jjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjj jjjjiiiiiiiiiiiii iiiiiiiiiiii iiiiiiiii iiiiiiiiiiiii iiiiiiiiiiiiioooooo ooooooooo oooooooooooooooo ooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooo ooooooohhhhhhhhhh hhhhhhhhhhhhh hhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhh hhhhh"
- property ListModel softButtons: ListModel {}
- property int appId: -1
- property int timeout: 0
- property var async
- property bool running: false
- property int result: -1
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SettingsStorage.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SettingsStorage.qml
deleted file mode 100644
index afddbd5c1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SettingsStorage.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file SettingsStorage.qml
- * @brief Storage for keeping settings.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-Item
-{
- property var sdlLanguagesList: [
- Common.Language.EN_US,
- Common.Language.ES_MX,
- Common.Language.FR_CA,
- Common.Language.DE_DE,
- Common.Language.ES_ES,
- Common.Language.EN_GB,
- Common.Language.RU_RU,
- Common.Language.TR_TR,
- Common.Language.PL_PL,
- Common.Language.FR_FR,
- Common.Language.IT_IT,
- Common.Language.SV_SE,
- Common.Language.PT_PT,
- Common.Language.NL_NL,
- Common.Language.ZH_TW,
- Common.Language.JA_JP,
- Common.Language.AR_SA,
- Common.Language.KO_KR,
- Common.Language.PT_BR,
- Common.Language.CS_CZ,
- Common.Language.DA_DK,
- Common.Language.NO_NO
- ]
-
- property var displayCapabilities: {
- "displayType": Common.DisplayType.GEN2_8_DMA,
- "textFields": [
- Common.TextFieldName.mainField1,
- Common.TextFieldName.mainField2,
- Common.TextFieldName.mainField3,
- Common.TextFieldName.mainField4,
- Common.TextFieldName.statusBar,
- Common.TextFieldName.mediaClock,
- Common.TextFieldName.mediaTrack,
- Common.TextFieldName.alertText1,
- Common.TextFieldName.alertText2,
- Common.TextFieldName.alertText3,
- Common.TextFieldName.scrollableMessageBody,
- Common.TextFieldName.initialInteractionText,
- Common.TextFieldName.navigationText1,
- Common.TextFieldName.navigationText2,
- Common.TextFieldName.ETA,
- Common.TextFieldName.totalDistance,
- Common.TextFieldName.navigationText,
- Common.TextFieldName.audioPassThruDisplayText1,
- Common.TextFieldName.audioPassThruDisplayText2,
- Common.TextFieldName.sliderHeader,
- Common.TextFieldName.sliderFooter,
- Common.TextFieldName.notificationText
- ],
- "mediaClockFormats": [
- Common.MediaClockFormat.CLOCK1,
- Common.MediaClockFormat.CLOCK2,
- Common.MediaClockFormat.CLOCK3,
- Common.MediaClockFormat.CLOCKTEXT1,
- Common.MediaClockFormat.CLOCKTEXT2,
- Common.MediaClockFormat.CLOCKTEXT3,
- Common.MediaClockFormat.CLOCKTEXT4
- ],
- "graphicSupported": true,
- "imageCapabilities": [ Common.ImageType.DYNAMIC ],
- "templatesAvailable": [ "" ],
- "screenParams": {
- "resolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 480
- },
- "touchEventAvailable": {
- "pressAvailable": true,
- "multiTouchAvailable": true,
- "doublePressAvailable": true
- }
- },
- "numCustomPresetsAvailable": 6
- }
-
- property var softButtonCapabilities: {
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true,
- "imageSupported": true
- }
-
- property var buttonCapabilities: []
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SliderModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SliderModel.qml
deleted file mode 100644
index 359eb5d59..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/SliderModel.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file SliderModel.qml
- * @brief Data model for slider.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-QtObject {
- property string appName: ""
- property string header: ""
- property var footer: []
- property int numTicks: 0
- property int position: 0
- property int timeout: 0
- property bool running: false
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VehicleInfoModel.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VehicleInfoModel.qml
deleted file mode 100644
index 997ce1ee0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VehicleInfoModel.qml
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * @file VehicleInfoModel.qml
- * @brief Data model for vehicle info.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-QtObject {
- id: vehicleInfo
- property real speed: 80.1
- property int rpm: 5000
- property real fuelLevel: 0.2
- property int fuelLevel_State: Common.ComponentVolumeStatus.CVS_LOW
- property real instantFuelConsumption: 2.2
- property int driverBraking: Common.VehicleDataEventStatus.VDES_NO_EVENT
- property int wiperStatus: Common.WiperStatus.OFF
- property real engineTorque: 2.5
- property real accPedalPosition: 0.5
- property real steeringWheelAngle: 1.2
- property real externalTemperature: 40.0
- property string vin: '52-452-52-752'
- property int odometer: 2
- property int prndl: Common.PRNDL.FIFTH
-
- property var headLampStatus: {
- "lowBeamsOn": false,
- "highBeamsOn": false,
- "ambientLightSensorStatus": Common.AmbientLightStatus.TWILIGHT_1
- }
- property var deviceStatus: {
- 'voiceRecOn': false,
- 'btIconOn': false,
- 'callActive': false,
- 'phoneRoaming': false,
- 'textMsgAvailable': false,
- 'battLevelStatus': Common.DeviceLevelStatus.ZERO_LEVEL_BARS,
- 'stereoAudioOutputMuted': false,
- 'monoAudioOutputMuted': false,
- 'signalLevelStatus': Common.DeviceLevelStatus.ZERO_LEVEL_BARS,
- 'primaryAudioSource': Common.PrimaryAudioSource.NO_SOURCE_SELECTED,
- 'eCallEventActive': false
- }
- property var bodyInformation: {
- 'parkBrakeActive': false,
- 'ignitionStableStatus': Common.IgnitionStableStatus.IGNITION_SWITCH_NOT_STABLE,
- 'ignitionStatus': Common.IgnitionStatus.IS_UNKNOWN
- }
- property var beltStatus: {
- 'driverBeltDeployed': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'passengerBeltDeployed': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'passengerBuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'driverBuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'leftRow2BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'passengerChildDetected': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'rightRow2BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow2BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow3BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'leftRow3BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'rightRow3BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'leftRearInflatableBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'rightRearInflatableBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow1BeltDeployed': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- 'middleRow1BuckleBelted': Common.VehicleDataEventStatus.VDES_NO_EVENT,
- }
- property var tirePressure: {
- 'pressureTelltale': Common.WarningLightStatus.WLS_ON,
- 'leftFront': { status: Common.ComponentVolumeStatus.CVS_NORMAL},
- 'rightFront': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN },
- 'leftRear': { status: Common.ComponentVolumeStatus.CVS_NORMAL },
- 'rightRear': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN },
- 'innerLeftRear': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN },
- 'innerRightRear': { status: Common.ComponentVolumeStatus.CVS_UNKNOWN }
- }
- property var gps: {
- 'longitudeDegrees': 42.3293,
- 'latitudeDegrees': -83.0464,
- 'utcYear': 2013,
- 'utcMonth': 2,
- 'utcDay': 14,
- 'utcHours': 13,
- 'utcMinutes': 16,
- 'utcSeconds': 54,
- 'compassDirection': Common.CompassDirection.SOUTHWEST,
- 'pdop': 4,
- 'hdop': 5,
- 'vdop': 6,
- 'actual': false,
- 'satellites': 8,
- 'dimension': Common.Dimension.Dimension_2D,
- 'altitude': 7,
- 'heading': 173,
- 'speed': 2
- }
- property var ecuDIDData: {
- 'data1': 'ECU 1 Test Data',
- 'data2': 'ECU 2 Test Data'
- }
- property var eCallInfo: {
- "eCallNotificationStatus" : Common.VehicleDataNotificationStatus.VDNS_NORMAL,
- "auxECallNotificationStatus" : Common.VehicleDataNotificationStatus.VDNS_ACTIVE,
- "eCallConfirmationStatus" : Common.ECallConfirmationStatus.ECCS_NORMAL
- }
- property var airbagStatus: {
- "driverAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NO_EVENT,
- "driverSideAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NO,
- "driverCurtainAirbagDeployed" : Common.VehicleDataEventStatus.VDES_YES,
- "passengerAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NOT_SUPPORTED,
- "passengerCurtainAirbagDeployed" : Common.VehicleDataEventStatus.VDES_FAULT,
- "driverKneeAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NO,
- "passengerSideAirbagDeployed" : Common.VehicleDataEventStatus.VDES_YES,
- "passengerKneeAirbagDeployed" : Common.VehicleDataEventStatus.VDES_NOT_SUPPORTED
- }
- property var emergencyEvent: {
- "emergencyEventType" : Common.EmergencyEventType.EET_NO_EVENT,
- "fuelCutoffStatus" : Common.EmergencyEventType.EET_FRONTAL,
- "rolloverEvent" : Common.EmergencyEventType.EET_SIDE,
- "maximumChangeVelocity" : Common.EmergencyEventType.EET_REAR,
- "multipleEvents" : Common.EmergencyEventType.EET_ROLLOVER
- }
- property var clusterModeStatus: {
- "powerModeActive" : true,
- "powerModeQualificationStatus" : Common.PowerModeQualificationStatus.POWER_MODE_UNDEFINED,
- "carModeStatus" : Common.CarModeStatus.CMS_NORMAL,
- "powerModeStatus" : Common.PowerModeStatus.KEY_OUT
- }
- property var myKey: {
- "e911Override": Common.VehicleDataStatus.VDS_NO_DATA_EXISTS
- }
-
-
- function sendGpsChange(){
- sdlVehicleInfo.onGps(vehicleInfo.gps)
- }
- function sendSpeedChange(){
- sdlVehicleInfo.onSpeed(vehicleInfo.speed)
- }
- function sendRpmChange(){
- sdlVehicleInfo.onRpm(vehicleInfo.rpm)
- }
- function sendFuelLevelChange(){
- sdlVehicleInfo.onFuelLevel(vehicleInfo.fuelLevel)
- }
- function sendFuelLevel_StateChange(){
- sdlVehicleInfo.onFuelLevel_State(vehicleInfo.fuelLevel_State)
- }
- function sendInstantFuelConsumptionChange(){
- sdlVehicleInfo.onInstantFuelConsumption(vehicleInfo.instantFuelConsumption)
- }
- function sendExternalTemperatureChange(){
- sdlVehicleInfo.onExternalTemperature(vehicleInfo.externalTemperature)
- }
- function sendPrndlChange() {
- if (dataContainer.vehicleInfoModel.prndl !== -1)
- {sdlVehicleInfo.onPrndl(vehicleInfo.prndl)}
- }
- function sendTirePressureChange(){
- sdlVehicleInfo.onTirePressure(vehicleInfo.tirePressure)
- }
- function sendOdometerChange(){
- sdlVehicleInfo.onOdometer(vehicleInfo.odometer)
- }
- function sendBeltStatusChange(){
- sdlVehicleInfo.onBeltStatus(vehicleInfo.beltStatus)
- }
- function sendBodyInformationChange(){
- sdlVehicleInfo.onBodyInformation(vehicleInfo.bodyInformation)
- }
- function sendDeviceStatusChange(){
- sdlVehicleInfo.onDeviceStatus(vehicleInfo.deviceStatus)
- }
- function sendDriverBrakingChange(){
- sdlVehicleInfo.onDriverBraking(vehicleInfo.driverBraking)
- }
- function sendWiperStatusChange(){
- sdlVehicleInfo.onWiperStatus(vehicleInfo.wiperStatus)
- }
- function sendHeadLampStatusChange(){
- sdlVehicleInfo.onHeadLampStatus(vehicleInfo.headLampStatus)
- }
- function sendEngineTorqueChange(){
- sdlVehicleInfo.onEngineTorque(vehicleInfo.engineTorque)
- }
- function sendAccPedalPositionChange(){
- sdlVehicleInfo.onAccPedalPosition(vehicleInfo.accPedalPosition)
- }
- function sendSteeringWheelAngleChange(){
- sdlVehicleInfo.onSteeringWheelAngle(vehicleInfo.steeringWheelAngle)
- }
- function sendECallInfoChange(){
- sdlVehicleInfo.onECallInfo(vehicleInfo.eCallInfo)
- }
- function sendAirbagStatusChange(){
- sdlVehicleInfo.onAirbagStatus(vehicleInfo.airbagStatus)
- }
- function sendEmergencyEventChange(){
- sdlVehicleInfo.onEmergencyEvent(vehicleInfo.emergencyEvent)
- }
- function sendClusterModeStatusChange(){
- sdlVehicleInfo.onClusterModeStatus(vehicleInfo.clusterModeStatus)
- }
- function sendMyKeyChange(){
- sdlVehicleInfo.onMyKey(vehicleInfo.myKey)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VrHelpItemsDefault.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VrHelpItemsDefault.qml
deleted file mode 100644
index 3dc6ad563..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/models/VrHelpItemsDefault.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file VrHelpItemsDefault.qml
- * @brief Default voice recognition help items.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-
-ListModel {
- id: vrHelpItemsDefault
-
- Component.onCompleted: {
- vrHelpItemsDefault.append({
- text: "Default VR Help Text1",
- image: {
- value: "",
- imageType: 1
- },
- position: 1
- });
- vrHelpItemsDefault.append({
- text: "Default VR Help Text2",
- image: {
- value: "",
- imageType: 1
- },
- position: 2
- });
- vrHelpItemsDefault.append({
- text: "Default VR Help Text3",
- image: {
- value: "",
- imageType: 1
- },
- position: 3
- });
- }
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/AlertWindow.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/AlertWindow.qml
deleted file mode 100644
index c9eefbbaf..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/AlertWindow.qml
+++ /dev/null
@@ -1,290 +0,0 @@
-/**
- * @file AlertWindow.qml
- * @brief Alert popup window
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-Rectangle {
- id: alertWindow
- property date lastAlertTime
- property var softButtons
- property int appId
- property string popUpName // TODO{ALESHIN}: No requerments for closePopUp, if alert couldn't be closed by closePopUp request - delete everywhere
-
- color: "transparent"
-
- property var async
-
- Rectangle {
- id: rectangle
-
- anchors.centerIn: parent
- color: "black"
- border.color: "white"
-
- width: alertContent.width + 60
- height: alertContent.height + 60
-
- property alias alertString: alert.text
- property alias appNameString: appName.text
- property int duration
-
- Column {
- id: alertContent
- anchors.centerIn: parent
- spacing: 20
-
- Text {
- id: appName
- anchors.horizontalCenter: parent.horizontalCenter
- color: "white"
- font.pointSize: 16
- }
-
- Row {
- width: Constants.alertWidth
- spacing: 20
-
- Image {
- id: alertLogo
- source: "../res/warning.png"
- }
-
- Text {
- id: alert
- width: parent.width - alertLogo.width - parent.spacing
- clip: true
- color: "white"
- font.pointSize: 16
- }
- }
-
- Rectangle {
- id: progressIndicator
- color: "white"
- height: 10
- }
-
- Column {
- Item {
- width: Constants.alertWidth
- height: alertButton1.visible ? alertButton1.height : 0
-
- SoftButton {
- id: alertButton1
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 0 ? softButtons[0] : undefined
- anchors.left: parent.left
- anchors.right: alertButton2.visible ? alertButton2.left : parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- alertWindow.complete(Common.Result.SUCCESS);
- contentLoader.go( Internal.chooseAppStartScreen(dataContainer.currentApplication.appType,
- dataContainer.currentApplication.isMediaApplication), appId )
- }
- }
- SoftButton {
- id: alertButton2
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 1 ? softButtons[1] : undefined
- anchors.right: parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- alertWindow.complete(Common.Result.SUCCESS);
- contentLoader.go( Internal.chooseAppStartScreen(dataContainer.currentApplication.appType,
- dataContainer.currentApplication.isMediaApplication), appId )
- }
- }
- }
- Item {
- width: Constants.alertWidth
- height: alertButton3.visible ? childrenRect.height : 0
- SoftButton {
- id: alertButton3
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 2 ? softButtons[2] : undefined
- anchors.left: parent.left
- anchors.right: alertButton4.visible ? alertButton4.left : parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- alertWindow.complete(Common.Result.SUCCESS);
- contentLoader.go( Internal.chooseAppStartScreen(dataContainer.currentApplication.appType,
- dataContainer.currentApplication.isMediaApplication), appId )
- }
- }
- SoftButton {
- id: alertButton4
- appId: alertWindow.appId
- button: softButtons && softButtons.length > 3 ? softButtons[3] : undefined
- anchors.right: parent.right
- width: Constants.alertWidth / 2
- onPressed: { alertWindow.keep = true; }
- onReleased: { alertWindow.keep = false; }
- onKeepContext: {
- alertWindow.restart();
- sdlUI.onResetTimeout(appId, "UI.Alert")
- }
- onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); }
- onStealFocus: {
- alertWindow.complete(Common.Result.SUCCESS);
- contentLoader.go( Internal.chooseAppStartScreen(dataContainer.currentApplication.appType,
- dataContainer.currentApplication.isMediaApplication), appId )
- }
- }
- }
- }
- }
-
- SequentialAnimation {
- id: animation
- PropertyAction { target: progressIndicator; property: "width"; value: alertContent.width }
- PropertyAnimation {
- id: shrinkProgressAnimation
- target: progressIndicator
- property: "width"
- to: 0
- duration: rectangle.duration
- }
- }
- }
-
- Timer {
- id: timer
- onTriggered: {
- complete(Common.Result.SUCCESS)
- }
- }
-
- function alert (alertStrings, duration, showIndicator, sButtons, applicationId) {
- if (timer.running) { // we have alert already
- var currentTime = new Date()
- var timeFromLastAlert = currentTime - lastAlertTime
- var timeLeft = timer.interval - timeFromLastAlert
- var discreteInMilliseconds = 1000 // wish to round left time to integer seconds
- var timeLeftRounded = discreteInMilliseconds * Math.ceil(timeLeft / discreteInMilliseconds)
- return timeLeftRounded
- }
- else {
- lastAlertTime = new Date();
- appId = applicationId
- rectangle.appNameString = dataContainer.getApplication(appId).appName;
- softButtons = sButtons;
- rectangle.alertString = alertStrings.join('\n');
- timer.interval = duration;
- rectangle.duration = duration;
- timer.start();
- show();
-
- progressIndicator.visible = !!showIndicator
- progressIndicator.width = alertContent.width
- console.log("ProgressIndicator.width:", progressIndicator.width)
- animation.start()
- }
- }
-
- function show () {
- dataContainer.activeAlert = true
- dataContainer.applicationSavedContext = dataContainer.applicationContext
- visible = true
- }
-
- function complete (reason, data) {
- if (!keep) {
- hide()
- switch (reason) {
- case Common.Result.SUCCESS:
- DBus.sendReply(async, { __retCode: Common.Result.SUCCESS, __message: "UI.Alert" })
- break
- // For other cases
- }
- }
- timer.stop()
- }
-
- function hide() {
- console.debug(popUpName, "HIDE")
- dataContainer.activeAlert = false
- dataContainer.applicationContext = dataContainer.applicationSavedContext
- visible = false
- }
-
- function restart() {
- animation.restart();
- timer.restart();
- }
-
- property bool keep: false
-
- onKeepChanged: {
- if (visible && !keep && !timer.running) {
- hide()
- }
- }
-
- onVisibleChanged: {
- if (visible) {
- dataContainer.activePopup.push(popUpName)
- } else {
- for (var i in dataContainer.activePopup) {
- if (dataContainer.activePopup[i] === popUpName) {
- dataContainer.activePopup.splice(i, 1)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ContextPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ContextPopup.qml
deleted file mode 100644
index 92e9d7442..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ContextPopup.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @file ContextPopup.qml
- * @brief Popup view with system context.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-
-PopUp {
- function show() {
- console.debug("enter")
- if (!visible) { // must not increment counter if show() called for visible popup
- visible = true;
- dataContainer.popups++
- }
- console.debug("exit")
- }
-
- function hide() {
- console.debug("enter")
- console.debug(popUpName, "HIDE")
- if (visible) { // must not decrement counter if hide() called for invisible popup
- visible = false;
- dataContainer.popups--
- }
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ExitAllApplicationsPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ExitAllApplicationsPopup.qml
deleted file mode 100644
index bf88366ea..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/ExitAllApplicationsPopup.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @file ExitAllApplicationsPopup.qml
- * @brief Popup "Exit all applications"
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-PopUp {
- function complete(reason){
- hide()
- }
-
- Item {
- ListModel {
- id: reasonExit
-
- Component.onCompleted: {
- for (var name in Common.ApplicationsCloseReason) {
- append({name: name});
- }
- }
- }
- }
-
- Column
- {
- anchors.centerIn: parent
- Row {
- Text {
- text: "Select reason: "
- color: "white"
- }
-
- ComboBox {
- id: reasonComboBox
- model: reasonExit
- }
- z: 1000
- }
- OvalButton {
- text: "Exit"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- sdlBasicCommunication.onExitAllApplications(Common.ApplicationsCloseReason[reasonComboBox.currentText])
- hide()
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml
deleted file mode 100644
index 782fd76c1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/InteractionPopup.qml
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * @file InteractionPopup.qml
- * @brief Interaction popup view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../hmi_api/Async.js" as Async
-import "../models/Internal.js" as Internal
-
-ContextPopup {
- id: piPopUp
- property ListModel choiceSet: ListModel { }
- property int timeout
- property int appID
- property int interactionLayout
- property var async
- property bool performInteractionIsActiveNow
-
- Text {
- id: initialText
- anchors.top: parent.top
- anchors.topMargin: Constants.popupMargin
- anchors.left: parent.left
- anchors.leftMargin: Constants.popupMargin
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- ListView {
- anchors.top: initialText.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.popupMargin
- model: choiceSet
- delegate: OvalButton {
- width: parent.width
- text: menuName
- icon: image
- onClicked: {
- complete(Common.Result.SUCCESS, {"choiceID": model.choiceID})
- }
- }
- }
-
- Item {
- Timer {
- id: timer
- onTriggered: {
- complete(Common.Result.TIMED_OUT)
- }
- }
- }
-
- function performInteraction(initialText, choiceSet, vrHelpTitle, vrHelp, timeout, interactionLayout, appID) {
- console.debug("enter")
- var app = dataContainer.getApplication(appID)
- var dataToUpdate = {}
-
- performInteractionIsActiveNow = true
- initialText.text = initialText.fieldText
- this.timeout = timeout
- this.appID = appID
-
- this.choiceSet.clear()
- if (choiceSet !== undefined) {
- choiceSet.forEach( function(arrayElement) {
- piPopUp.choiceSet.append({
- choiceID: arrayElement.choiceID,
- menuName: arrayElement.menuName ? arrayElement.menuName : "",
- image: arrayElement.image ? arrayElement.image : "",
- secondaryText: arrayElement.secondaryText ? arrayElement.secondaryText : "",
- tertiaryText: arrayElement.tertiaryText ? arrayElement.tertiaryText: "",
- secondaryImage: arrayElement.secondaryImage ? arrayElement.secondaryImage : ""
- })
- })
- }
- if (vrHelpTitle !== undefined) {
- dataToUpdate.vrHelpTitlePerformInteraction = vrHelpTitle
- }
-
- app.vrHelpItemsPerformInteraction.clear()
-
- if (vrHelp !== undefined) {
- vrHelp.forEach( Internal.appendVrHelpItem, app.vrHelpItemsPerformInteraction )
- }
- if (interactionLayout !== undefined) {
- this.interactionLayout = interactionLayout
- }
- dataContainer.setApplicationProperties(appID, dataToUpdate)
- async = new Async.AsyncCall()
- if (piPopUp.choiceSet.count !== 0) {
- activate()
- }
- console.debug("exit")
- return async
- }
-
- function activate () {
- console.debug("enter")
- timer.interval = timeout
- timer.start()
- show()
- console.debug("exit")
- }
-
- function complete (reason, data) {
- console.debug("enter")
- switch (reason) {
- case Common.Result.SUCCESS:
- DBus.sendReply(async, data)
- break
- case Common.Result.ABORTED:
- DBus.sendReply(async, { __retCode: Common.Result.ABORTED })
- break
- case Common.Result.TIMED_OUT:
- DBus.sendReply(async, { __retCode: Common.Result.TIMED_OUT })
- break
- }
- timer.stop()
- hide()
- performInteractionIsActiveNow = false
- console.debug("exit")
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PerformAudioPassThruPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PerformAudioPassThruPopup.qml
deleted file mode 100644
index 2cb0212a3..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PerformAudioPassThruPopup.qml
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * @file PerformAudioPassThruPopup.qml
- * @brief Popup for audio pass thru
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-ContextPopup {
- property var async
-
- function showAudioPassThru(){
- console.debug("entered")
- dataContainer.uiAudioPassThru.running = true
- show()
- if (dataContainer.uiAudioPassThru.timeout) {
- timer.start()
- }
- console.debug("exited")
- }
-
- function complete(reason){
- console.debug("enter", reason)
- timer.stop()
- dataContainer.uiAudioPassThru.timeout = 0
- dataContainer.uiAudioPassThru.running = false
- switch (reason) {
- case Common.Result.ABORTED:
- console.debug("exit with abort")
- DBus.sendError(async, Common.Result.ABORTED)
- break;
- case Common.Result.SUCCESS:
- console.debug("exit with success")
- DBus.sendReply(async, {})
- break;
- case Common.Result.RETRY:
- console.debug("exit with retry")
- DBus.sendError(async, Common.Result.RETRY)
- break;
- }
- hide()
- }
-
-
- Column {
- spacing: Constants.generalSpacing
- anchors.centerIn: parent
- Timer {
- id: timer
- interval: dataContainer.uiAudioPassThru.timeout
- onTriggered: {
- complete(Common.Result.SUCCESS)
- }
- }
-
- Text {
- id: appNameText
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiAudioPassThru.appName
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- Row {
- spacing: Constants.generalSpacing
- Image {
- source: "../res/controlButtons/vrImage.png"
- }
-
- Column {
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiAudioPassThru.firstLine
- color: Constants.audioPassThruTextColor
- font.pixelSize: Constants.fontSize
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiAudioPassThru.secondLine
- color: Constants.audioPassThruTextColor
- font.pixelSize: Constants.fontSize
- }
- }
- }
-
-
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: Constants.generalSpacing
-
- OvalButton {
- text: "Retry"
- fontSize: Constants.fontSize
- onClicked: {
- complete(Common.Result.RETRY)
- }
- }
-
- OvalButton {
- text: "Done"
- fontSize: Constants.fontSize
- onClicked: {
- complete(Common.Result.SUCCESS)
- }
- }
- }
-
- OvalButton {
- text: "Close"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- console.debug("enter")
- complete(Common.Result.ABORTED)
- console.debug("exit")
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PopUp.qml
deleted file mode 100644
index 544852638..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/PopUp.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @file PopUp.qml
- * @brief General popup view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- default property alias content: content.children
- property int padding: Constants.popUpPadding
- property string popUpName
-
- visible: false
-
- width: Constants.popupWidth
- height: Constants.popupHeigth
-
- MouseArea { anchors.fill: parent }
-
- Rectangle {
- width: parent.width - padding / 2
- height: parent.height - padding / 2
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- color: Constants.secondaryColor
- border.width: 1
- border.color: Constants.popUpBorderColor
- radius: padding
- Rectangle {
- id: content
- width: parent.width - padding
- height: parent.height - padding
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- color: Constants.transparentColor
- }
- }
-
- onVisibleChanged: {
- if (popUpName) {
- if (visible) {
- dataContainer.activePopup.push(popUpName)
- } else {
- for (var i in dataContainer.activePopup) {
- if (dataContainer.activePopup[i] === popUpName) {
- dataContainer.activePopup.splice(i, 1)
- }
- }
- }
- }
- }
-
- function show() {
- console.debug("enter");
- visible = true;
- console.debug("exit");
- }
-
- function hide() {
- console.debug("enter");
- visible = false;
- console.debug("exit");
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/SliderPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/SliderPopup.qml
deleted file mode 100644
index 38f866797..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/SliderPopup.qml
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * @file ExitAllApplicationsPopup.qml
- * @brief Popup "Exit all applications"
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-
-ContextPopup {
- property var async
- property int position: 1
- /**
- * Test Support Section
- */
- property int resultCode: -1
- signal onReady
- /**
- * Test Support Section End
- */
-
- function showSlider(){
- console.debug("enter")
-
- dataContainer.uiSlider.running = true
- dataContainer.applicationSavedContext = dataContainer.applicationContext
- if(dataContainer.uiSlider.footer === undefined ||
- dataContainer.uiSlider.footer.length === 0 ||
- dataContainer.uiSlider.position === 0 ) {
- footerText.text = ""
- } else {
- footerText.text = dataContainer.uiSlider.footer.length === 1 ? dataContainer.uiSlider.footer[0] : dataContainer.uiSlider.footer[dataContainer.uiSlider.position - 1]
- }
- position = dataContainer.uiSlider.position
- show()
- timer.start()
- onReady()
- console.debug("exit")
- }
-
- function complete(reason){
- console.debug("enter reason = ", reason)
- timer.stop()
- dataContainer.applicationContext = dataContainer.applicationSavedContext
- dataContainer.uiSlider.running = false
- switch(reason) {
- case Common.Result.ABORTED:
- console.debug("aborted position is", position)
- resultCode = Common.Result.ABORTED
- DBus.sendReply(async, {__retCode: resultCode, sliderPosition: position})
- break
- case Common.Result.SUCCESS:
- console.debug("send position", position)
- resultCode = Common.Result.SUCCESS
- dataContainer.uiSlider.position = position
- DBus.sendReply(async, {sliderPosition:position})
- break
- default:
- break
- }
- hide()
- position = 1
- console.debug("exit")
- }
-
-
- Column
- {
- spacing: Constants.generalSpacing
- anchors.centerIn: parent
- Timer {
- id: timer
- interval: dataContainer.uiSlider.timeout
- onTriggered: {
- console.debug("triggered")
- complete(Common.Result.SUCCESS)
- }
- }
-
- Text {
- id: appNameText
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiSlider.appName
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- Text {
- id: headerText
- width: borderRectangle.width
- elide: Text.ElideRight
- anchors.horizontalCenter: parent.horizontalCenter
- text: dataContainer.uiSlider.header
- color: Constants.sliderTextColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- Rectangle {
- id: borderRectangle
- width: Constants.sliderBarWidth
- height: Constants.sliderBarHeight
- anchors.horizontalCenter: parent.horizontalCenter
- border.color: Constants.sliderBarBorderColor
- border.width: Constants.sliderBarBorderWidth
- radius: Constants.sliderBarRadius
- color: "black"
-
- Rectangle {
- id: rectangle
- color: Constants.sliderBarFillColor
- height: parent.height
- border.color: parent.border.color
- border.width: parent.border.width
- radius: parent.radius
-
- onVisibleChanged: {
- var tickWidth = borderRectangle.width / dataContainer.uiSlider.numTicks
- rectangle.width = dataContainer.uiSlider.position * tickWidth
- }
- }
-
- MouseArea{
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- onPositionChanged(mouse)
- }
-
- onPositionChanged: {
- if(mouseX <= 0){
- rectangle.width = borderRectangle.width / dataContainer.uiSlider.numTicks
- position = 1
- }
-
- if(mouseX > borderRectangle.width) {
- rectangle.width = borderRectangle.width
- position = dataContainer.uiSlider.numTicks
- }
-
- if(mouseX > 0 && mouseX < borderRectangle.width) {
- var tickWidth = borderRectangle.width / dataContainer.uiSlider.numTicks
- position = Math.ceil(mouseX / tickWidth)
- rectangle.width = position * tickWidth
- }
-
- if(dataContainer.uiSlider.footer.length > 1){
- footerText.text = dataContainer.uiSlider.footer[position - 1]
- }
- }
- }
- }
-
- Text {
- id:footerText
- width: borderRectangle.width
- elide: Text.ElideRight
- anchors.horizontalCenter: parent.horizontalCenter
- text: ""
- color: Constants.sliderTextColor
- font.pixelSize: Constants.fontSize * 2
- }
-
- OvalButton {
- text: "Close"
- anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- console.debug("enter")
- complete(Common.Result.ABORTED)
- console.debug("exit")
- }
- }
- }
-
- function getTimer() {
- return timer
- }
- function getBackButton() {
- return backButton
- }
- function getFooterText() {
- return footerText
- }
- function getBorderRectangle() {
- return borderRectangle
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TBTClientStatePopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TBTClientStatePopUp.qml
deleted file mode 100644
index 5cd49bdd5..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TBTClientStatePopUp.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @file TBTClientStatePopUp.qml
- * @brief Popup view for TBT interface (list of states).
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-PopUp {
- Item {
- ListModel {
- id: tbtState
-
- Component.onCompleted: {
- for (var name in Common.TBTState) {
- append({name: name});
- }
- }
- }
- }
- Text {
- text: "TBT Client State"
- verticalAlignment: Text.AlignVCenter
- anchors.right: parent.right
- anchors.left: parent.left
- anchors.top: parent.top
- color: Constants.primaryColor
- }
- ComboBox {
- id: comboBox
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- model: tbtState
- onCurrentTextChanged: {
- console.log("Send signal onTBTClientState:", currentText);
- sdlNavigation.onTBTClientState(Common.TBTState[currentText]);
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml
deleted file mode 100644
index 33f82013b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/TTSPopUp.qml
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * @file TTSPopUp.qml
- * @brief Popup view for TTS
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-PopUp {
- height: Constants.ttsPopUpHeight
- width: Constants.ttsPopUpWidth
- padding: Constants.ttsPopUpPadding
- property var async
-
- ScrollView {
- anchors.fill: parent
- Text {
- id: text
- anchors.fill: parent
- color: Constants.popUpBorderColor
- font.pixelSize: Constants.ttsFontSize
- }
- }
-
- resources: [
- Timer {
- id: timer
- interval: Constants.ttsSpeakTime
- onTriggered: deactivate()
- },
-
- Timer {
- id: ttsPerformInteractionTimer
- interval: Constants.ttsSpeakTime
- onTriggered: activate(message)
- property var message: undefined
- }
- ]
-
- function performInteraction(helpPrompt, initialPrompt, timeoutPrompt, timeout) {
- activate(initialPrompt);
- if (timeout * 2 - Constants.ttsSpeakTime > 0) {
- ttsPerformInteractionTimer.message = timeoutPrompt;
- ttsPerformInteractionTimer.interval = timeout - Constants.ttsSpeakTime;
- ttsPerformInteractionTimer.restart()
- }
- }
-
- function activate(message) {
- console.debug("Activate TTS popup:", message);
- dataContainer.activeTTS = true;
- sdlTTS.started();
- console.debug("TTS started");
- text.text = message;
- show();
- timer.restart();
- console.debug("Exit");
- }
-
- function deactivate() {
- console.debug("Deactivate TTS popup");
- dataContainer.activeTTS = false;
- sdlTTS.stopped();
- console.debug("TTS stopped");
- text.text = '';
- timer.stop();
- hide();
- DBus.sendReply(async, {});
- async = null;
- console.debug("Exit");
- }
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRHelpPopup.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRHelpPopup.qml
deleted file mode 100644
index c699f0f51..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRHelpPopup.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * @file VRHelpPopup.qml
- * @brief Popup view for VR help
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-PopUp {
- property alias title: title.text
- Text {
- id: title
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.popupMargin
- text: {
- // not in application
- if (!dataContainer.applicationContext) {
- return dataContainer.currentApplication.vrHelpTitleDefault
- // in application
- } else {
- if (interactionPopup.performInteractionIsActiveNow) {
- return dataContainer.currentApplication.vrHelpTitlePerformInteraction
- } else if (dataContainer.currentApplication.vrHelpTitle) {
- return dataContainer.currentApplication.vrHelpTitle
- } else {
- return dataContainer.currentApplication.vrHelpTitleDefault
- }
- }
- }
- font.pixelSize: Constants.titleFontSize
- color: Constants.primaryColor
- }
-
- ScrollableListView {
- anchors.top: title.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.popupMargin
-
- model: {
- // not in application
- if (!dataContainer.applicationContext) {
- return dataContainer.currentApplication.vrHelpItemsDefault
- // in application
- } else {
- if (interactionPopup.performInteractionIsActiveNow) {
- return dataContainer.currentApplication.vrHelpItemsPerformInteraction
- } else if (dataContainer.currentApplication.vrHelpItems.count > 0) {
- return dataContainer.currentApplication.vrHelpItems
- } else {
- return dataContainer.currentApplication.vrHelpItemsDefault
- }
- }
- }
-
- delegate:
- Row {
- spacing: Constants.iconItemListSpacing
- Icon {
- source: model.image
- anchors.verticalCenter: parent.verticalCenter
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
- }
-
- Text {
- id: text
- anchors.verticalCenter: parent.verticalCenter
- text: model.text
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- }
- }
- }
-
- function complete(reason, data) {
- hide()
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml
deleted file mode 100644
index f796ad2b1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VRPopUp.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @file VRPopUp.qml
- * @brief Popup view for VR interface (list commands).
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../views"
-import "../controls"
-
-PopUp {
- Text {
- id: title
- anchors.left: parent.left
- anchors.top: parent.top
- height: voice.height
- width: parent.width - voice.width
- text: "Speak the command"
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- Image {
- id: voice
- anchors.top: parent.top
- anchors.right: parent.right
- source: "../res/controlButtons/vrImage.png"
- }
-
- ScrollableListView {
- anchors.bottomMargin: Constants.popupMargin
- anchors.rightMargin: Constants.popupMargin
- anchors.leftMargin: Constants.popupMargin
- anchors.top: voice.bottom
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.left: parent.left
-
- model: dataContainer.vrCommands
-
- delegate: OvalButton {
- width: parent.width
- text: command
- onClicked: {
- sdlVR.onCommand(cmdID, appID === 0 ? undefined : appID);
- }
- }
- }
-
- function activate() {
- dataContainer.activeVR = true;
- sdlVR.started();
- show();
- }
-
- function complete(reason) {
- dataContainer.activeVR = false;
- sdlVR.stopped();
- hide();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VehicleInfoPopUp.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VehicleInfoPopUp.qml
deleted file mode 100644
index a97f34671..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/popups/VehicleInfoPopUp.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * @file VIPopUp.qml
- * @brief Pop up window with information about vehicle.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-import "../controls"
-import QtQuick.Controls 1.0
-
-PopUp {
- //TODO{ALeshin}: Redraw this window as ListView or Column, when we'll get requirements
- Column {
- anchors.fill: parent
- Text {
- id: viText
- width: parent.width
- height: 1/5 * parent.height
- text: "Vehicle Information"
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- color: Constants.primaryColor
- }
-
- Row {
- height: 1/5 * parent.height
- width: parent.width
-
- Text {
- width: 1/4 * parent.width
- height: 1/5 * parent.height
- anchors.verticalCenter: parent.verticalCenter
- text: "PRNDL: "
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- color: Constants.primaryColor
- }
-
- ComboBox {
- anchors.verticalCenter: parent.verticalCenter
- id: comboBox
- model: prndlList
-
- onCurrentIndexChanged: {
- console.debug("PRNDL:", currentIndex)
- dataContainer.vehicleInfoModel.prndl = model.get(currentIndex).id
- }
-
- textRole: "name"
- ListModel {
- id: prndlList
- Component.onCompleted: {
- append({ id: -1, name: "<NO DATA (prndl)>" })
- for (var name in Common.PRNDL) {
- append({ id: Common.PRNDL[name], name: name });
- }
- }
- }
- }
- z: 1000
- }
-
- Text {
- width: parent.width
- height: 1/5 * parent.height
- text: "ECU 1: " + dataContainer.vehicleInfoModel.ecuDIDData.data1
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- color: Constants.primaryColor
- }
-
- Text {
- width: parent.width
- height: 1/5 * parent.height
- text: "ECU 2: " + dataContainer.vehicleInfoModel.ecuDIDData.data2
- font.pixelSize: Constants.fontSize
- verticalAlignment: Text.AlignVCenter
- color: Constants.primaryColor
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/qml_model.qmlproject b/SDL_Core/src/components/qt_hmi/qml_model_qt5/qml_model.qmlproject
deleted file mode 100644
index ea820e801..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/qml_model.qmlproject
+++ /dev/null
@@ -1,20 +0,0 @@
-/* File generated by Qt Creator, version 2.7.0 */
-
-import QmlProject 1.1
-
-Project {
- mainFile: "MainWindow.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "../res"
- }
- /* List of plugin directories passed to QML runtime */
- importPaths: [ "." ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/AMPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/AMPlayerView.qml
deleted file mode 100644
index ad0c9d190..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/AMPlayerView.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file AMPlayerView.qml
- * @brief AM player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- RadioPlayer {
- id: amRadioPlayer
- anchors.fill: parent
- radioType: "AM"
- radioName: "AM Radio"
-
- playerState: dataContainer.amPlayerState
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ApplicationListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ApplicationListView.qml
deleted file mode 100644
index 602354d45..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ApplicationListView.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file ApplicationListView.qml
- * @brief Application list view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-GeneralView {
- Column {
- anchors.fill: parent
- Item {
- // top 1/4 of screen
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- elementWidth: Constants.ovalButtonWidth
- snapTo: elementWidth + spacing
- spacing: (width - 4 * elementWidth) / 3
-
- OvalButton {
- text: "Find New Apps"
- }
-
- OvalButton {
- text: "Change device"
- onReleased: contentLoader.go("./views/ChangeDeviceView.qml")
- }
-
- OvalButton {
- text: "911 Assist"
- }
-
- OvalButton {
- text: "Vehicle Health Report"
- }
-
- OvalButton {
- text: "Install applications/Up"
- }
- }
- }
-
- Item {
- height: parent.height / 2
- width: parent.width
-
- ScrollableListView {
- id: applicationListView
- anchors.fill: parent
- model: dataContainer.applicationList
-
- delegate: Item {
- width: parent.width
- height: Math.max(applicationName.height, appIcon.height)
- Image {
- id: appIcon
- source: icon
- height: Constants.appListIconSize
- width: height
- }
- ClickableText {
- id: applicationName
- text: appName
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.appListFontSize
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: appIcon.right
- anchors.leftMargin: Constants.margin
- onClicked: {
- dataContainer.setCurrentApplication(appId)
- contentLoader.go( Internal.chooseAppStartScreen(dataContainer.currentApplication.appType,
- dataContainer.currentApplication.isMediaApplication), appId )
- }
- }
- }
- }
- }
-
- Item {
- // bottom 1/4 of screen
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/BTPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/BTPlayerView.qml
deleted file mode 100644
index a1d8c43a3..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/BTPlayerView.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file BTPlayerView.qml
- * @brief FM player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: btPlayer
- playerName: "BT Audio"
- anchors.fill: parent
-
- playerState: dataContainer.btPlayerState
- image: playerState.albumImage
-
- buttons: [
- OvalButton {
- text: btPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CDPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CDPlayerView.qml
deleted file mode 100644
index 8cf1c3f72..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CDPlayerView.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @file CDPlayerView.qml
- * @brief CD player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: cdPlayer
- playerName: "CD"
- anchors.fill: parent
- image: playerState.albumImage
- playerState: dataContainer.cdPlayerState
-
- buttons: [
- OvalButton {
- text: cdPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CarMenuGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CarMenuGridView.qml
deleted file mode 100644
index e61bac1d0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/CarMenuGridView.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file CarMenuGridView.qml
- * @brief Car menu screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../models"
-import "../controls"
-
-GridMenu {
- id: menu
- model: CarMenuModel { }
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- ClickableImage {
- anchors.centerIn: parent
- source: icon
- onClicked: {
- if(qml !== "") {
- contentLoader.go(qml)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ChangeDeviceView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ChangeDeviceView.qml
deleted file mode 100644
index 84a751efe..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ChangeDeviceView.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * @file ChangeDeviceView.qml
- * @brief Screen view with list of available devices.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- anchors.fill: parent
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- Text {
- id: searchDeviceText
- anchors.left: parent.left
- anchors.top: parent.top
- height: 1/4 * parent.height
- width: parent.width
- color: Constants.primaryColor
- font.pixelSize: Constants.titleFontSize
- text: "Devices available:"
- verticalAlignment: Text.AlignVCenter
- }
-
- ListView {
- id: changeDeviceListView
- anchors.left: parent.left
- anchors.top: searchDeviceText.bottom
- model: dataContainer.deviceList
- width:parent.width
- height:parent.height - searchDeviceText.height
-
- delegate: Text {
- MouseArea {
- anchors.fill: parent
- onClicked: {
- sdlBasicCommunication.onDeviceChosen({ name: name, id: devid });
- sdlBasicCommunication.onFindApplications({ name: name, id: devid })
- contentLoader.go("./views/ApplicationListView.qml")
- }
- }
- text: name
- color: Constants.primaryColor
- font.pixelSize: Constants.titleFontSize
- }
- }
- }
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
-
- Component.onCompleted: {
- console.log("ChangeDeviceView Component.onCompleted enter");
- sdlBasicCommunication.onStartDeviceDiscovery();
- console.log("ChangeDeviceView Component.onCompleted exit");
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ClimateControlView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ClimateControlView.qml
deleted file mode 100644
index 41b0c32ef..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ClimateControlView.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @file ClimateControlView.qml
- * @brief Screen view of climat menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-
-GeneralView {
- Item {
- id: climatMenu
- anchors.fill: parent
-
- Item {
- height: parent.height
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- Column {
- id: leftItem
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 1/4*parent.width - useThisToGetButtonSize.width
-
- Row {
- ClimateControlBtn {name: "heated_seat"}
- ClimateControlBtn {name: "heated_wheel"}
- }
- Row {
- ClimateControlBtn {name: "AC"}
- ClimateControlBtn {name: "headed_dash"}
- }
- }
-
- Column {
- id: centralItem
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
-
- ClimateControlBtn {id: useThisToGetButtonSize; name: "defrost"; state: "on"}
- ClimateControlBtn {name: "face"; state: "on"}
- ClimateControlBtn {name: "feet"}
- }
-
- Row {
- id: rightItem
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- anchors.rightMargin: 1/4*parent.width - useThisToGetButtonSize.width
-
- ClimateControlBtn {
- anchors.verticalCenter: parent.verticalCenter
- txt: "Dual"
- state: "on"
- }
-
- Column {
- ClimateControlBtn { name: "heated_seat" }
- ClimateControlBtn { name: "AC" }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ContactsListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ContactsListView.qml
deleted file mode 100644
index 90f817036..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ContactsListView.qml
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * @file ContactsListView.qml
- * @brief Contact list screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- function setCurrent(firstLetter){
- for(var i = 0; i < contactsListView.count; i ++) {
- if (contactsListView.model.get(i).name[0].toUpperCase() === firstLetter) {
- contactsListView.positionViewAtIndex(i, ListView.Beginning)
- break;
- }
- }
- }
- Component.onCompleted: setCurrent(dataContainer.contactsFirstLetter)
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- ScrollableListView {
- id: contactsListView
- anchors.fill: parent
- clip: true
- spacing: 1/2 * Constants.fontSize
- model: ContactsListModel { }
-
- section.property: "name"
- section.criteria: ViewSection.FirstCharacter
- section.delegate: Text {
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: section.toUpperCase()
- }
-
- delegate: Item {
- anchors.left: parent.left
- width: parent.width - Constants.scrollBarWidth
- height: typeText.height
-
- Text {
- id: contactName
- anchors.left: parent.left
- text: name
- width: Constants.contactListNameFieldSize * parent.width
- color: Constants.contactTextColor
- font.pixelSize: Constants.fontSize
- elide: Text.ElideRight
- }
- Text {
- id: phoneText
- anchors.left: contactName.right
- width: Constants.contactListPhoneFieldSize * parent.width
- text: phone
- color: Constants.contactTextColor
- font.pixelSize: Constants.fontSize
- horizontalAlignment: Text.AlignHCenter
- }
- Text {
- id: typeText
- anchors.right: parent.right
- width: Constants.contactListDescriptionFieldSize * parent.width
- text: type
- color: Constants.contactTextColor
- font.pixelSize: Constants.fontSize
- horizontalAlignment: Text.AlignHCenter
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/FMPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/FMPlayerView.qml
deleted file mode 100644
index ae117ccd0..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/FMPlayerView.qml
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * @file FMPlayerView.qml
- * @brief FM player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- RadioPlayer {
- id: fmRadioPlayer
- anchors.fill: parent
- radioType: "FM"
- radioName: "FM Radio"
-
- playerState: dataContainer.fmPlayerState
-
- property int hdButtonValue: 1
-
- buttonHD: [
- Image {
- id: hdButton
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- source: "../res/buttons/long_oval_btn.png"
- property string textColor: Constants.primaryColor
-
- Row {
- anchors.centerIn: parent
- spacing: (hdButton.width - hdLogo.width - one.width - two.width - three.width - four.width) / 10
-
- Image {
- id: hdLogo
- anchors.verticalCenter: parent.verticalCenter
- source:"../res/hd_logo_on.png"
- }
-
- Text {
- id: one
- anchors.verticalCenter: parent.verticalCenter
- text: "1"
- color: fmRadioPlayer.hdButtonValue === 1 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- id: two
- anchors.verticalCenter: parent.verticalCenter
- text: "2"
- color: fmRadioPlayer.hdButtonValue === 2 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- id: three
- anchors.verticalCenter: parent.verticalCenter
- text: "3"
- color: fmRadioPlayer.hdButtonValue === 3 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- id: four
- anchors.verticalCenter: parent.verticalCenter
- text: "4"
- color: fmRadioPlayer.hdButtonValue === 4 ? "white" : hdButton.textColor
- font.pixelSize: Constants.fontSize
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- hdLogo.source = "../res/hd_logo_off.png"
- hdButton.source = "../res/buttons/long_oval_pressed_btn.png"
- hdButton.textColor = Constants.secondaryColor
-
- }
- onReleased: {
- hdLogo.source = "../res/hd_logo_on.png"
- hdButton.source = "../res/buttons/long_oval_btn.png"
- hdButton.textColor = Constants.primaryColor
- fmRadioPlayer.hdButtonValue === 4 ? fmRadioPlayer.hdButtonValue = 1 : fmRadioPlayer.hdButtonValue++
- }
- }
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GeneralView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GeneralView.qml
deleted file mode 100644
index ca6eb12e8..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GeneralView.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file GeneralView.qml
- * @brief Base view class. Defines properties and behavior common for all views
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-Item {
- /// HMI context view is related to
- property int systemContext: Common.SystemContext.SYSCTXT_MAIN
- /// True if view is in application context
- property bool applicationContext: false
- /// View category for AppDeactivated notification (reason)
- property int category: Common.DeactivateReason.GENERAL
-
- signal enterScreen
- signal leaveScreen
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GridMenu.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GridMenu.qml
deleted file mode 100644
index f935b030c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/GridMenu.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * @file GridMenu.qml
- * @brief Parent class for main menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-GeneralView {
- id: main
- property alias model: repeater.model
- property alias delegate: repeater.delegate
- property alias rows: grid.rows
- property int columnsOnPage: Constants.menuColumnCount
-
- Flickable {
- id: flicker
- anchors.fill: parent
- contentWidth: grid.width
- flickableDirection: Flickable.HorizontalFlick
-
- Grid {
- id: grid
- anchors.centerIn: parent
- rows: Constants.menuRowCount
- columns: Math.ceil(model.count / rows)
- flow: Grid.TopToBottom
- Repeater {
- id: repeater
- }
- }
-
- property int snapTo: width / parent.columnsOnPage
- onMovementEnded: {
- var rest = flicker.contentX % snapTo
- var time = 0.25
- if (rest > flicker.snapTo / 2) { rest = rest - flicker.snapTo }
- var vel = 2 * rest / time
- flickDeceleration = Math.abs(vel) / time
- flick(vel, 0)
- flickDeceleration = 1500
- }
- }
-
- Pager {
- id: pager
- space: 10
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.top
- anchors.topMargin: Constants.margin
-
- pages: Math.ceil(grid.columns / parent.columnsOnPage)
- activePage: Internal.activePageChoose(flicker, pager.pages)
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/HardwareButtonsView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/HardwareButtonsView.qml
deleted file mode 100644
index 1a162f2ca..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/HardwareButtonsView.qml
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * @file HardwareButtonsView.qml
- * @brief Area of screen responsible for hardware buttons
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-Rectangle {
- height: row.height + row.anchors.margins
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.panelColor
-
- signal buttonDown(string name)
- signal buttonUp(string name)
-
- function pressButton(name) {
- buttonDown(name)
- }
-
- function longPressButton(name) {
- console.log("long press " + name)
- }
-
- function releaseButton(name) {
- buttonUp(name)
- }
-
- Row {
- id: row
- spacing: Constants.panelPadding
- anchors.centerIn: parent
- anchors.margins: Constants.panelPadding
-
- PowerSwitchButton {anchors.verticalCenter: parent.verticalCenter}
-
- MaskedButton {
- name: "vr"
- anchors.verticalCenter: parent.verticalCenter
- onReleased: {
- console.debug("Clicked VR button");
- if (!dataContainer.activeVR) {
- vrPopUp.activate();
- vrHelpPopup.show();
- } else {
- vrPopUp.complete();
- vrHelpPopup.hide()
- }
- }
- }
-
- ArrowKeys {anchors.verticalCenter: parent.verticalCenter}
-
- Grid {
- columns: 5
- rows: 2
- spacing: 5
- anchors.verticalCenter: parent.verticalCenter
- Repeater {
- model: 10
- delegate : Rectangle {
- width: 40
- height: 40
- radius: 5
- gradient: Gradient {
- GradientStop
- {
- position: 0.0;
- color: "#2c2c2c"
- Behavior on position {
- NumberAnimation { duration: 80 }
- }
- }
-
- GradientStop
- {
- position: 1.0;
- color: "black"
- Behavior on position {
- NumberAnimation { duration: 80 }
- }
- }
- }
-
- Text {
- text: (1 + index) % 10
- font.pixelSize: 30
- color: Constants.panelTextColor
- anchors.centerIn: parent
- }
-
- Timer {
- id: timer
- interval: Constants.presetButtonTimer
- repeat: false
- triggeredOnStart: false
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- property bool clickProcessed
- onPressed: {
- parent.gradient.stops[0].position = 1.0
- parent.gradient.stops[1].position = 0.0
- clickProcessed = false
- timer.start()
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + index, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
- onReleased: {
- parent.gradient.stops[0].position = 0.0
- parent.gradient.stops[1].position = 1.0
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + index, Common.ButtonEventMode.BUTTONUP, undefined)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + index, Common.ButtonPressMode.SHORT, undefined)
- }
- }
- Connections {
- target: timer
- onTriggered: {
- if(!mouseArea.clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + index, Common.ButtonPressMode.LONG, undefined)
- mouseArea.clickProcessed = true
- }
- }
- }
- }
-
- Component.onCompleted: {
- settingsContainer.buttonCapabilities.push(
- {
- name: Common.ButtonName.PRESET_0 + index,
- upDownAvailable: true,
- shortPressAvailable: true,
- longPressAvailable: true
- });
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/IPodPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/IPodPlayerView.qml
deleted file mode 100644
index 65a667702..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/IPodPlayerView.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file IPodPlayerView.qml
- * @brief IPod player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: ipodPlayer
- playerName: "iPod"
- anchors.fill: parent
- image: playerState.albumImage
- playerState: dataContainer.ipodPlayerState
-
- buttons: [
- OvalButton {
- text: ipodPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/LineInPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/LineInPlayerView.qml
deleted file mode 100644
index 70f3e0477..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/LineInPlayerView.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file LineInPlayerView.qml
- * @brief LineIn player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: lineInPlayer
- playerName: "LineIn"
- anchors.fill: parent
- image: playerState.albumImage
- playerState: dataContainer.linePlayerState
-
- buttons: [
- OvalButton {
- text: lineInPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MainMenuView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MainMenuView.qml
deleted file mode 100644
index 7ed435b13..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MainMenuView.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file MainMenuView.qml
- * @brief Main menu screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../models"
-import "../controls"
-
-GridMenu {
- id: menu
- model: MainMenuListModel { }
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- ClickableImage {
- anchors.centerIn: parent
- source: icon
- onClicked: {
- if(qml !== "") {
- contentLoader.go(qml)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaClockView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaClockView.qml
deleted file mode 100644
index 5178d979c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaClockView.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * @file MediaClockView.qml
- * @brief Media clock view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-Item {
- property alias time: timeText.text
- Text {
- id: timeText
- anchors.left: parent.left
- width: 1/10 * parent.width
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignRight
- color: "white"
- text: (mediaPlayerView.playerType === "SDL") ? Internal.hmsTimeToString(dataContainer.currentApplication.mediaClock.startTime)
- : "02:36" //TODO {Aleshin}: get track time for all players except SDL
- font.pixelSize: 18
- }
-
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- height: parent.height
- width: 2/3 * parent.width
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- height: 2
- width: dataContainer.currentApplication.mediaClock.progress * parent.width
- color: "white"
- }
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- height: 2
- width: (1 - dataContainer.currentApplication.mediaClock.progress) * parent.width
- color: Constants.primaryColor
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaPlayer.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaPlayer.qml
deleted file mode 100644
index a92908192..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MediaPlayer.qml
+++ /dev/null
@@ -1,312 +0,0 @@
-/**
- * @file MediaPlayerView.qml
- * @brief Parent for BT, IPod, CD players screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-Item {
- id: mediaPlayerView
-
- property string playerName: ""
- property string playerType: ""
-
- signal rewind
- signal forward
- signal play
- signal pause
-
- // Holds players state(song name, play/pause state, track number etc). For all players except SDL.
- property PlayerState playerState;
-
- property alias buttons: buttonsRow.content
- property alias buttonsSpacing: buttonsRow.spacing
- property alias image: image.source
-
- Item {
- // row of oval buttons
- id: ovalButtonsRow
- width: parent.width
- height: 1/5 * parent.height
- anchors.left: parent.left
- anchors.top: parent.top
-
- PagedFlickable {
- id: buttonsRow
- width: parent.width
- spacing: (mediaPlayerView.playerType === "SDL") ? ((width - 4 * elementWidth) / 3)
- : (width - 2 * elementWidth)
- anchors.verticalCenter: parent.verticalCenter
- snapTo: Constants.ovalButtonWidth + spacing
- elementWidth: Constants.ovalButtonWidth
- }
- }
-
- Item {
- id: spacingBetweenItems
- width: parent.width
- height: 1/10 * parent.height
- anchors.left: parent.left
- anchors.top: ovalButtonsRow.bottom
-
- Behavior on height {
- NumberAnimation {
- duration : Constants.animationDuration
- }
- }
- }
-
- Column {
- // Picture + text information + media clock
- id: mediaContent
- width: parent.width
- height: 2/5 * parent.height
- anchors.left: parent.left
- anchors.top: spacingBetweenItems.bottom
-
- Row {
- // picture + text info
- width: parent.width
- height: 3/4 * parent.height
- spacing: Constants.margin
-
- Image {
- id: image
- height: parent.height
- width: height
- }
-
- Column {
- // text info
- id: textInfo
- height: parent.height
- width: parent.width - image.width - parent.spacing
- spacing: (height - titleText.height - 3 * text.height) / 3
-
- Text {
- id: titleText
- anchors.left: parent.left
- anchors.right: parent.right
- horizontalAlignment: dataContainer.currentApplication.hmiUITextAlignment
- color: Constants.primaryColor
- text: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.hmiUIText.mainField1
- : playerState.trackName
- font.pixelSize: Constants.titleFontSize
- font.bold: true
- }
-
- Text {
- id: text
- anchors.left: parent.left
- anchors.right: parent.right
- horizontalAlignment: dataContainer.currentApplication.hmiUITextAlignment
- color: Constants.primaryColor
- text: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.hmiUIText.mainField2
- : playerState.albumName
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- horizontalAlignment: Text.AlignHCenter
- color: Constants.primaryColor
- text: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.hmiUIText.mediaTrack
- : playerState.trackNumber
- font.pixelSize: Constants.fontSize
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "Time to destination: " + dataContainer.currentApplication.navigationModel.timeToDestination
- font.pixelSize: Constants.fontSize
- horizontalAlignment: dataContainer.hmiUITextAlignment
- visible: mediaPlayerView.playerType === "SDL" && dataContainer.currentApplication.navigationModel.timeToDestination
- }
- }
- }
-
- MediaClockView {
- width: parent.width
- height: parent.height * 1/4
- }
- }
-
- Item {
- id: spacingBetweenItems2
- width: parent.width
- height: 1/10 * parent.height
- anchors.left: parent.left
- anchors.top: mediaContent.bottom
-
- Behavior on height {
- NumberAnimation {
- duration : Constants.animationDuration
- }
- }
- }
-
- Row {
- // Rewind, play, pause, forward buttons
- id: playPauseRewindForward
- width: parent.width
- height: 1/5 * parent.height - statusBar.height
- anchors.left: parent.left
- anchors.leftMargin: (width - playPauseButton.width - prevButton.width - nextButton.width) / 2
- anchors.top: spacingBetweenItems2.bottom
-
- Image {
- id: prevButton
- anchors.verticalCenter: parent.verticalCenter
- source: "../res/buttons/player_prev_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- prevButton.source = "../res/buttons/player_prev_pressed_btn.png"
- }
- onReleased: {
- prevButton.source = "../res/buttons/player_prev_btn.png"
- }
- }
- }
-
- PlayPauseButton {
- id: playPauseButton
- anchors.verticalCenter: parent.verticalCenter
- state: (mediaPlayerView.playerType === "SDL") ? dataContainer.currentApplication.playPauseState : playerState.playPauseState
- onClicked: {
- (state == 'Play') ? play() : pause();
- var newState = state === "Play" ? "Pause" : "Play";
- (mediaPlayerView.playerType === "SDL") ? dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, { playPauseState: newState } )
- : playerState.playPauseState = newState
- }
- }
-
- Image {
- id: nextButton
- anchors.verticalCenter: parent.verticalCenter
- source: "../res/buttons/player_next_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- nextButton.source = "../res/buttons/player_next_pressed_btn.png"
- }
- onReleased: {
- nextButton.source = "../res/buttons/player_next_btn.png"
- }
- }
- }
- }
-
- Item {
- id: presetButtons
- width: parent.width
- height: 1/5 * parent.height
- anchors.top: playPauseRewindForward.bottom
- anchors.left: parent.left
-
- PresetRow {
- id: presetsRow
- anchors.top: parent.top
- anchors.left: parent.left
- presets: mediaPlayerView.playerType === "SDL" ? Internal.getArrayForPresetRow(dataContainer.currentApplication) : []
- width: parent.width
-
- onPresetButtonPressed: {
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
-
- onPresetButtonReleased: {
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONUP, undefined)
- }
-
- onPresetButtonClicked: {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.SHORT, undefined)
- }
-
- onPresetButtonHold: {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.LONG, undefined)
- }
- }
- }
-
- StatusBar {
- id: statusBar
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- }
-
- states: [
- State {
- name: 'presetButtonsON'
- when: (dataContainer.currentApplication.customPresets.count > 0) && (mediaPlayerView.playerType === "SDL")
- PropertyChanges {
- target: spacingBetweenItems
- height: 1
- }
- PropertyChanges {
- target: spacingBetweenItems2
- height: 1
- }
- PropertyChanges {
- target: presetButtons
- visible: true
- enabled: true
- }
- },
-
- State {
- name: 'presetButtonsOFF'
- when: (dataContainer.currentApplication.customPresets.count === 0) || (mediaPlayerView.playerType !== "SDL")
- PropertyChanges {
- target: spacingBetweenItems
- height: 1/10 * mediaPlayerView.height
- }
- PropertyChanges {
- target: spacingBetweenItems2
- height: 1/10 * mediaPlayerView.height
- }
- PropertyChanges {
- target: presetButtons
- visible: false
- enabled: false
- }
- }
- ]
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MusicSourceView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MusicSourceView.qml
deleted file mode 100644
index 08f1d76b6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/MusicSourceView.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file MusicSourceView.qml
- * @brief Music source screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../models"
-import "../controls"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- anchors.fill: parent
- GridMenu {
- id: menu
- model: dataContainer.musicSourceModel
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: bottomPanel.top
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- OvalButton {
- text: title
- onReleased: contentLoader.go(qml, appId)
- anchors.centerIn: parent
- fontSize: Constants.fontSize
- }
- }
- }
-
- Item {
- id: bottomPanel
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- height: 1/4 * parent.height
- width: parent.width
-
- BackButton { anchors.centerIn: parent }
- }
- }
-}
-
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationInRouteGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationInRouteGridView.qml
deleted file mode 100644
index 99f1877a5..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationInRouteGridView.qml
+++ /dev/null
@@ -1,250 +0,0 @@
-/**
- * @file NavigationInRouteGridView.qml
- * @brief Navigation in route screen veiw.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-
-GeneralView {
- Item {
- id: navInRoute
- anchors.fill: parent
-
- Image {
- // 3/4 top screen
- id: map
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- source: "../res/nav/map.png"
-
- Image {
- id: compas
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 1/4 * compas.width
- anchors.left: parent.left
- anchors.leftMargin: 1/4 * compas.width
- source: "../res/nav/compass.png"
- }
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: compas.horizontalCenter
- spacing: 1/8 * parent.height
-
- // Zoom "+" button
- Image {
- id: zoomIn
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomInBtn
- anchors.centerIn: parent
- text: "+"
- color: Constants.releasedButtonTextColor
- font.pixelSize: 30
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomInBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomInBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
-
- // Zoom "-" button
- Image {
- id: zoomOut
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomOutBtn
- anchors.centerIn: parent
- text: "-"
- color: "white"
- font.pixelSize: 30
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomOutBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomOutBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
- } // column
-
- // Options button
- Image {
- id: navOptions
- anchors.top: parent.top
- anchors.right: parent.right
- source: "../res/nav/options.png"
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/nav/options_pressed.png"
- }
- onReleased: {
- parent.source = "../res/nav/options.png"
- }
- onClicked: {
- //Options screen
- }
- }
- }
- } //map
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- Image {
- id: muteBtnImg
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 1/4 * muteBtnImg.width
- source: "../res/nav/mute_off.png"
- MouseArea {
- anchors.fill: parent
- onClicked: if (muteBtnImg.state === "off") {
- muteBtnImg.state = "on"
- muteBtnImg.source = "../res/nav/mute_off.png"
- }
- else {
- muteBtnImg.source = "../res/nav/mute_on.png"
- muteBtnImg.state = "off"
- }
- }
- }
-
- Image {
- id: turnArrow
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: muteBtnImg.right
- anchors.leftMargin: 1/20 * contentLoader.width
- source: "../res/nav/turnArrow.png"
- }
-
- Text {
- id: street
- anchors.verticalCenter: cancel.verticalCenter
- anchors.left: turnArrow.right
- anchors.leftMargin: 1/20 * contentLoader.width
- text: "0.2 mi on Cherry Hill Rd."
- color: "White"
- font.pixelSize: 20
- }
-
- Text {
- id: timeToDest
- anchors.verticalCenter: cancel.verticalCenter
- anchors.right: cancel.left
- anchors.rightMargin: 1/20 * contentLoader.width
- text: "2 hrs 27 min"
- color: "White"
- font.pixelSize: 20
- }
-
- Image {
- id: cancel
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
-
- source: "../res/buttons/long_oval_btn.png"
-
- Image {
- id: destIcon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: cancel.left
- anchors.leftMargin: Constants.fontSize
- source: "../res/nav/dest_icon.png"
- }
-
- Text {
- id: cancelText
- anchors.centerIn: parent
- text: "Cancel"
- color: Constants.primaryColor
- font.pixelSize: 20
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- cancel.source = "../res/buttons/long_oval_pressed_btn.png"
- destIcon.source = "../res/nav/dest_icon_black.png"
- cancelText.color = Constants.pressedButtonTextColor
- }
-
- onReleased: {
- cancel.source = "../res/buttons/long_oval_btn.png"
- destIcon.source = "../res/nav/dest_icon.png"
- cancelText.color = Constants.primaryColor
- }
-
- onClicked: {
- contentLoader.go("./views/NavigationNoRouteGridView.qml")
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationKeyboardView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationKeyboardView.qml
deleted file mode 100644
index f5d19e762..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationKeyboardView.qml
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * @file NavigationKeyboardView.qml
- * @brief Navigation keyboard screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- id: navKeyboard
- anchors.fill: parent
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- // Text line with input text
- TextInput {
- id: inputText
- anchors.top:parent.top
- anchors.left:parent.left
- maximumLength: 30
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: dataContainer.routeText
- }
-
- // Keyboard
- Column {
- anchors.centerIn: parent
- Row {
- id: upperRow
- property string qWERTY : "QWERTYUIOP"
- anchors.horizontalCenter: parent.horizontalCenter
-
- Repeater {
- model: 10
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: upperRow.qWERTY.charAt(index)
- pixelSize: Constants.fontSize
-
- onClicked: {
- dataContainer.routeText += upperRow.qWERTY.charAt(index)
- }
- }
- }
- }
- Row {
- id: middleRow
- property string aSDFGH : "ASDFGHJKL"
- anchors.horizontalCenter: parent.horizontalCenter
-
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "123"
- pixelSize: 15
- }
- //--------------
- Repeater {
- model: 9
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: middleRow.aSDFGH.charAt(index)
- pixelSize: Constants.fontSize
-
- onClicked: {
- dataContainer.routeText += middleRow.aSDFGH.charAt(index)
- }
- }
- }
- //--------------
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- onIsPressedChanged: {
- hoverImg.source = isPressed ? "../res/nav/delete_icon_black.png" : "../res/nav/delete_icon.png";
- }
- Image {
- id: hoverImg
- anchors.centerIn: parent
- source: "../res/nav/delete_icon.png"
- }
-
- onClicked: {
- dataContainer.routeText = dataContainer.routeText.substring(0,dataContainer.routeText.length - 1)
- }
- }
- }
- Row {
- id: lowerRow
- property string zXCVBN : "ZXCVBNM"
- anchors.horizontalCenter: parent.horizontalCenter
-
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "!@#"
- pixelSize: 15
- }
- //-----------------
- Repeater {
- model: 7
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: lowerRow.zXCVBN.charAt(index)
- pixelSize: Constants.fontSize
-
- onClicked: {
- dataContainer.routeText += lowerRow.zXCVBN.charAt(index)
- }
- }
- }
- //----------------
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "Clear"
- pixelSize: 12
-
- onClicked: {
- dataContainer.routeText = ""
- }
- }
- //----------------
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "Space"
- pixelSize: 12
-
- onClicked: {
- dataContainer.routeText += " "
- }
- }
- }
-
- } // column
-
- Image {
- id: goBtn
- anchors.right: parent.right
- anchors.top: parent.top
- source: "../res/buttons/short_oval_btn.png"
-
- Text {
- id: goText
- anchors.centerIn: parent
- text: "Go"
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- goBtn.source = "../res/buttons/short_oval_btn_pressed.png"
- goText.color = Constants.pressedButtonTextColor
- }
-
- onReleased: {
- goBtn.source = "../res/buttons/short_oval_btn.png"
- goText.color = Constants.primaryColor
- }
-
- onClicked: {
- contentLoader.go("./views/NavigationInRouteGridView.qml")
- }
- }
- }
- } // 3/4 top screen
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- BackButton { anchors.centerIn: parent }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationMenuView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationMenuView.qml
deleted file mode 100644
index 8b8b7ef26..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationMenuView.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file NavigationMenuView.qml
- * @brief Navigation menu screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models"
-import "../controls"
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- anchors.fill: parent
- GridMenu {
- id: menu
- model: NavigationMenuModel {}
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: bottomPanel.top
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- OvalButton {
- text: title
- onReleased: contentLoader.go(qml)
- anchors.centerIn: parent
- fontSize: Constants.fontSize
- }
- }
- }
-
- Item {
- id: bottomPanel
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- height: 1/4 * parent.height
- width: parent.width
-
- BackButton { anchors.centerIn: parent }
- }
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationNoRouteGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationNoRouteGridView.qml
deleted file mode 100644
index d4fbb9f4e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/NavigationNoRouteGridView.qml
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * @file NavigationNoRouteGridView.qml
- * @brief Navigation no route screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-GeneralView {
- Item {
- id: navNoRoute
- anchors.fill: parent
-
- Image {
- // 3/4 top screen
- id: map
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- source: "../res/nav/map.png"
-
- Image {
- id: compas
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 1/4 * compas.width
- anchors.left: parent.left
- anchors.leftMargin: 1/4 * compas.width
- source: "../res/nav/compass.png"
- }
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: compas.horizontalCenter
- spacing: 1/8 * parent.height
-
- // Zoom "+" button
- Image {
- id: zoomIn
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomInBtn
- anchors.centerIn: parent
- text: "+"
- color: "white"
- font.pixelSize: Constants.fontSize
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomInBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomInBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
-
- // Zoom "-" button
- Image {
- id: zoomOut
- source: "../res/buttons/zoom.png"
-
- Text {
- id: zoomOutBtn
- anchors.centerIn: parent
- text: "-"
- color: "white"
- font.pixelSize: Constants.fontSize
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/zoom_pressed.png"
- zoomOutBtn.color = Constants.pressedButtonTextColor
- }
- onReleased: {
- parent.source = "../res/buttons/zoom.png"
- zoomOutBtn.color = Constants.releasedButtonTextColor
- }
-
- onClicked: {
- //Some behavior
- }
- }
- }
- } // column
-
- // Options button
- Image {
- id: navOptions
- anchors.top: parent.top
- anchors.right: parent.right
- source: "../res/nav/options.png"
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/nav/options_pressed.png"
- }
- onReleased: {
- parent.source = "../res/nav/options.png"
- }
- onClicked: {
- //Options screen
- }
- }
- }
- } //map
-
- Item {
- // 1/4 bottom screen
- id: bottomPart
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- // Destination search button
- Image {
- id: destSearch
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- source: "../res/buttons/longest_oval_btn.png"
-
- Image {
- id: destIcon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 15
- source: "../res/nav/dest_icon.png"
- }
-
- Text {
- id: destText
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: destIcon.right
- anchors.leftMargin: 5
- text: "Destination"
- color: Constants.primaryColor
- font.pixelSize: 20
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- destSearch.source = "../res/buttons/longest_oval_btn_pressed.png"
- destIcon.source = "../res/nav/dest_icon_black.png"
- destText.color = Constants.pressedButtonTextColor
- }
-
- onReleased: {
- destSearch.source = "../res/buttons/longest_oval_btn.png"
- destIcon.source = "../res/nav/dest_icon.png"
- destText.color = Constants.primaryColor
- }
-
- onClicked: {
- contentLoader.go("./views/NavigationMenuView.qml")
- }
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneKeyboardView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneKeyboardView.qml
deleted file mode 100644
index 4b217cf9f..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneKeyboardView.qml
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * @file PhoneKeyboardView.qml
- * @brief Phone keyboard screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-GeneralView{
- Component.onCompleted: phoneKeyboard.changeColorOfActiveButtons()
-
- Item {
- function changeColorOfActiveButtons() {
- for (var i = 0; i < contactsListModel.count; i++) {
- activeButtons[contactsListModel.get(i).name[0].toUpperCase()] = true
- }
- }
-
- id: phoneKeyboard
- anchors.fill: parent
-
- property var activeButtons: {
- "A": false, "B": false, "C": false, "D": false, "E": false,
- "F": false, "G": false, "H": false, "I": false, "J": false,
- "K": false, "L": false, "M": false, "N": false, "O": false,
- "P": false, "Q": false, "R": false, "S": false, "T": false,
- "U": false, "V": false, "W": false, "X": false, "Y": false, "Z": false
- }
-
- ContactsListModel {
- id: contactsListModel
- }
-
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
-
- Column {
- anchors.centerIn: parent
-
- Row {
- id: upperRow
- property string contentLoader : "ABCDEFGHI"
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: 9
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- textColorDefault: phoneKeyboard.activeButtons[upperRow.contentLoader.charAt(index)]
- ? Constants.primaryColor : Constants.inactiveButtonTextColor
- text: upperRow.contentLoader.charAt(index)
- pixelSize: Constants.fontSize
- onIsPressedChanged: {
- if (!isPressed){
- if (phoneKeyboard.activeButtons[upperRow.contentLoader.charAt(index)]) {
- dataContainer.contactsFirstLetter = text
- contentLoader.go("./views/ContactsListView.qml")
- }
- }
- }
- }
- }
- }
-
- Row {
- id: middleRow
- property string contentLoader : "JKLMNOPQR"
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: 9
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- textColorDefault: phoneKeyboard.activeButtons[middleRow.contentLoader.charAt(index)]
- ? Constants.primaryColor : Constants.inactiveButtonTextColor
- text: middleRow.contentLoader.charAt(index)
- pixelSize: Constants.fontSize
- onIsPressedChanged: {
- if (!isPressed){
- if (phoneKeyboard.activeButtons[middleRow.contentLoader.charAt(index)]) {
- dataContainer.contactsFirstLetter = text
- contentLoader.go("./views/ContactsListView.qml")
- }
- }
- }
- }
- }
- }
-
- Row {
- id: lowerRow
- property string contentLoader : "STUVWXYZ"
- anchors.horizontalCenter: parent.horizontalCenter
- Repeater {
- model: 8
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- textColorDefault: phoneKeyboard.activeButtons[lowerRow.contentLoader.charAt(index)]
- ? Constants.primaryColor : Constants.inactiveButtonTextColor
- text: lowerRow.contentLoader.charAt(index)
- pixelSize: Constants.fontSize
- onIsPressedChanged: {
- if (!isPressed){
- if (phoneKeyboard.activeButtons[lowerRow.contentLoader.charAt(index)]) {
- dataContainer.contactsFirstLetter = text
- contentLoader.go("./views/ContactsListView.qml")
- }
- }
- }
- }
- }
- CircleButton {
- imgOff: "../res/buttons/preset_btn.png"
- imgOn: "../res/buttons/preset_pressed_btn.png"
- text: "123"
- pixelSize: 20
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent}
- }
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneMenuGridView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneMenuGridView.qml
deleted file mode 100644
index 5cfdc5a30..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/PhoneMenuGridView.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * @file PhoneMenuGridView.qml
- * @brief View for phone menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../models"
-import "../controls"
-
-GridMenu {
- id: menu
- model: PhoneMenuModel {}
- delegate: GridItem {
- width: menu.width / menu.columnsOnPage
- height: menu.height / menu.rows
- ClickableImage {
- anchors.centerIn: parent
- source: icon
- onClicked: {
- if(qml !== "") {
- contentLoader.go(qml)
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/RadioPlayer.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/RadioPlayer.qml
deleted file mode 100644
index f673327c6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/RadioPlayer.qml
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @file RadioPlayerView.qml
- * @brief Parent for AM, FM, Sirius players screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models"
-import "../models/Constants.js" as Constants
-
-Item {
- id: radioPlayerView
-
- property string radioType: ""
- property string radioName: ""
- property alias buttonHD: bot.children
-
- property PlayerState playerState
-
- Item {
- // top 3/4 screen
- id: upperContent
- anchors.top: parent.top
- anchors.left: parent.left
- height: parent.height * 3/4
- width: parent.width
-
- Item {
- // top part for buttons
- id: top
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: parent.height * 1/4
-
- OvalButton {
- text: radioName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- }
-
- OvalButton {
- anchors.right: parent.right
- anchors.top: parent.top
- text: "Tune"
- fontSize: Constants.fontSize
- }
- }
-
- Item {
- // mid part for information about song
- id: mid
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- width: parent.width
- height: parent.height / 2
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
-
- Row {
- Text {
- id: radioChannelNameText
- color: Constants.primaryColor
- text: playerState.presets[0]
- font.pixelSize: 45
- }
- Text {
- anchors.bottom: radioChannelNameText.bottom
- color: Constants.primaryColor
- text: " " + radioType
- font.pixelSize: 25
- }
- }
-
- Text {
- color: Constants.primaryColor
- text: playerState.songName
- font.pixelSize: 25
- font.bold: true
- }
-
- Text {
- color: Constants.primaryColor
- text: playerState.albumName
- font.pixelSize: 25
- }
- }
- }
-
- Item {
- // bottom part for HD button (for FM radio)
- id: bot
- anchors.left: parent.left
- anchors.bottom: parent. bottom
- width: parent.width
- height: parent.height * 1/4
- }
- }
-
- Item {
- // bottom 1/4 screen
- id: lowerContent
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- // Line that divide screen in two parts
- Rectangle {
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 2
- color: Constants.primaryColor
- }
-
- PresetRow {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- presets: playerState.presets
- width: parent.width
- onSelectedIndexChanged: {
- radioChannelNameText.text = presets[selectedIndex];
- }
- }
- }
-}
-
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNavi.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNavi.qml
deleted file mode 100644
index ef98ffb10..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNavi.qml
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * @file SDLNavi.qml
- * @brief SDL navigation screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtMultimedia 5.0
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- applicationContext: true
-
- MultiTouchArea {
- anchors.fill: parent
- id: wholeWindow
-
- Row {
- // Top items
- id: topItems
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 1/6 * parent.height
- spacing: Constants.sdlNaviSpacing
-
- Rectangle {
- anchors.top: parent.top
- width: 1/5 * parent.width
- height: 4/5 * parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
-
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField1
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Rectangle {
- anchors.top: parent.top
- width: 3/5 * parent.width - 2 * parent.spacing
- height: parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
-
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField2
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Rectangle {
- id: rightRectOfTopItems
- anchors.top: parent.top
- width: 1/5 * parent.width
- height: 4/5 * parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField3 ? dataContainer.currentApplication.hmiUIText.mainField3 : "field3"
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-
- Column {
- // "+", "-" button at left
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- width: 1/12 * parent.width
- height: 2/10 * parent.height + spacing
- spacing: Constants.sdlNaviSpacing
-
- GradientRectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- text: "+"
- isCustomButton: true
- customButtonID: 3
- }
- GradientRectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- text: "-"
- isCustomButton: true
- customButtonID: 4
- }
- }
-
- Column {
- anchors.right: parent.right
- anchors.top: topItems.bottom
- width: 1/6 * parent.width
- height: 2/10 * parent.height + spacing
- spacing: Constants.sdlNaviSpacing
-
- Rectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: ""
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Rectangle {
- width: parent.width
- height: 1/10 * wholeWindow.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: dataContainer.currentApplication.hmiUIText.mainField4 ? dataContainer.currentApplication.hmiUIText.mainField4 : "mainField4"
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-
- Row {
- // bottom items
- id: bottomItems
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/6 * parent.height
- spacing: Constants.sdlNaviSpacing
-
- GradientRectangle {
- anchors.bottom: parent.bottom
- width: 1/3 * parent.width
- height: parent.height
- text: "Menu"
- isCustomButton: true
- customButtonID: 1
- }
- Rectangle {
- anchors.bottom: parent.bottom
- width: 1/3 * parent.width - 2 * parent.spacing
- height: parent.height
- color: Constants.sdlNaviTransparentItemColor
- radius: 5
- Text {
- text: "mainField5"
- anchors.fill: parent
- font.pixelSize: Constants.fontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- GradientRectangle {
- anchors.bottom: parent.bottom
- width: 1/3 * parent.width
- height: parent.height
- text: "Custom Button"
- isCustomButton: true
- customButtonID: 2
- }
- }
-
- GradientRectangle {
- anchors.right: parent.right
- anchors.bottom: bottomItems.top
- anchors.bottomMargin: Constants.sdlNaviSpacing
- width: 1/6 * parent.width
- height: 1/10 * parent.height
- text: "Options"
- fontSize: Constants.fontSize
- onReleased: {
- contentLoader.go("./views/SDLPlayerOptionsListView.qml", dataContainer.currentApplication.appId)
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNonMediaView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNonMediaView.qml
deleted file mode 100644
index 422474f4a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLNonMediaView.qml
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * @file SDLNonMediaView.qml
- * @brief SDL non media screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-import QtQuick 2.0
-import "../models"
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- applicationContext: true
-
- Item {
- id: upperContent
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
-
- Item {
- id: topButtonRow
- // top 1/4 of screen
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- elementWidth: Constants.ovalButtonWidth
- spacing: (width - 4 * elementWidth) / 3
- snapTo: elementWidth + spacing
-
- OvalButton {
- text: "Options"
- onClicked: { contentLoader.go("./views/SDLPlayerOptionsListView.qml") }
- }
-
- Repeater {
- model: dataContainer.currentApplication.softButtons ?
- dataContainer.currentApplication.softButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.softButtons.get(index)
- }
- }
- }
- }
-
- Column {
- id: midContent
- height: parent.height * 3/4
- width: parent.width
- anchors.top: topButtonRow.bottom
- anchors.left: parent.left
-
- Text {
- id: deviceName
- width: parent.width
- height: 1/5 * parent.height
- text: "Device: " + dataContainer.currentApplication.deviceName
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- Row {
- width: parent.width
- height: 4/5 * parent.height
- spacing: Constants.margin
-
- Image {
- id: image
- height: parent.height
- width: height
- source: dataContainer.currentApplication.hmiUIText.image
- }
-
- Column {
- height: parent.height
- width: parent.width - image.width - parent.spacing
- spacing: Constants.margin
-
- Text {
- id: text1
- width: parent.width
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: dataContainer.hmiUITextAlignment
- text: dataContainer.currentApplication.hmiUIText.mainField1
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- Text {
- width: parent.width
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: dataContainer.hmiUITextAlignment
- text: dataContainer.currentApplication.hmiUIText.mainField2
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
- }
- }
- }
- }
-
- Item {
- // bottom 1/4 screen
- id: lowerContent
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: parent.height * 1/4
-
- PresetRow {
- id: presetsRow
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- presets: Internal.getArrayForPresetRow(dataContainer.currentApplication)
- width: parent.width
- property bool clickProcessed
-
- onPresetButtonPressed: {
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
-
- onPresetButtonReleased: {
- sdlButtons.onButtonEvent(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonEventMode.BUTTONUP, undefined)
- }
-
- onPresetButtonClicked: {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.SHORT, undefined)
- }
-
- onPresetButtonHold: {
- sdlButtons.onButtonPress(Common.ButtonName.PRESET_0 + selectedIndex, Common.ButtonPressMode.LONG, undefined)
- }
- }
- }
-
- StatusBar {
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml
deleted file mode 100644
index 8f3a0a17b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerOptionsListView.qml
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * @file SDLPlayerOptionsListView.qml
- * @brief SDL player options screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models/Internal.js" as Internal
-
-GeneralView {
- applicationContext: true
- systemContext: Common.SystemContext.SYSCTXT_MENU
- Item {
- // 3/4 top screen
- height: parent.height * 3/4
- width: parent.width
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
-
- ListView {
- id: sdlPlayerOptionsListView
- anchors.horizontalCenter: parent.horizontalCenter
- width:parent.width
- height:parent.height
-
- model: dataContainer.currentApplication.currentSubMenu
-
- delegate: Row {
- spacing: Constants.iconItemListSpacing
- Icon {
- source: model.icon
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
-
- MouseArea {
- anchors.fill: parent
- enabled: model.icon.value !== undefined
-
- onPressed: text.press()
- onReleased: text.release()
- onCanceled: text.release()
- onClicked: text.click()
- }
- }
-
- ClickableText {
- id: text
- text: name + (type === Internal.MenuItemType.MI_SUBMENU ? " >" : "")
- width: sdlPlayerOptionsListView.width - x
- elide: Text.ElideRight
- defaultColor: type === Internal.MenuItemType.MI_PARENT ?
- Constants.inactiveButtonTextColor :
- Constants.primaryColor
- pressedColor: type === Internal.MenuItemType.MI_PARENT ?
- Constants.inactiveButtonTextColorPressed :
- Constants.primaryColorPressed
- font.pixelSize: Constants.titleFontSize
-
- function click() {
- console.debug("enter")
- switch (type) {
- case Internal.MenuItemType.MI_NODE:
- sdlUI.onCommand(model.id, dataContainer.currentApplication.appId)
- contentLoader.back()
- break;
- case Internal.MenuItemType.MI_SUBMENU:
- case Internal.MenuItemType.MI_PARENT:
- dataContainer.currentApplication.currentSubMenu = subMenu
- break;
- }
- console.debug("exit")
- }
- onClicked: click()
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerView.qml
deleted file mode 100644
index 4fff5aa82..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SDLPlayerView.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file SDLPlayerView.qml
- * @brief SDL player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-
-GeneralView {
- applicationContext: true
- MediaPlayer {
- id: mediaPlayer
- onPlay: { sdlButtons.onButtonPress(Common.ButtonName.OK, Common.ButtonPressMode.SHORT, undefined) }
- onPause: { sdlButtons.onButtonPress(Common.ButtonName.OK, Common.ButtonPressMode.SHORT, undefined) }
- playerName: "SDL music"
- playerType: "SDL"
- image: dataContainer.currentApplication.hmiUIText.image
- anchors.fill: parent
-
- buttons: [
- OvalButton {
- text: dataContainer.currentApplication.appName
- onReleased: { contentLoader.go("./views/MusicSourceView.qml") }
- },
-
- OvalButton {
- text: "SDL Menu"
- onReleased: { contentLoader.go("./views/ApplicationListView.qml") }
- },
-
- OvalButton {
- text: "Options"
- onReleased: { contentLoader.go("./views/SDLPlayerOptionsListView.qml") }
- },
-
- Repeater {
- model: dataContainer.currentApplication.softButtons ?
- dataContainer.currentApplication.softButtons.count :
- 0
-
- delegate: SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.softButtons.get(index)
- }
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml
deleted file mode 100644
index 72ca59688..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/ScrollableMessageView.qml
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * @file ScrollableMessageView.qml
- * @brief Scrollable Message View.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../hmi_api/Async.js" as Async
-import "../models/Constants.js" as Constants
-import "../models"
-import "../popups"
-
-GeneralView {
- applicationContext: true
- onLeaveScreen: {
- timer.stop()
- dataContainer.scrollableMessageModel.running = false
- DBus.sendReply(dataContainer.scrollableMessageModel.async, { __retCode: dataContainer.scrollableMessageModel.result })
- }
- Component.onCompleted: {
- dataContainer.scrollableMessageModel.running = true
- timer.start()
- }
- Timer {
- id: timer
- interval: dataContainer.scrollableMessageModel.timeout
- onTriggered: {
- dataContainer.scrollableMessageModel.result = Common.Result.SUCCESS
- contentLoader.back()
- }
- }
-
- Rectangle {
- anchors.fill: parent
- color: Constants.secondaryColor
-
- Item {
- // top 1/5 of screen
- id: top
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: dataContainer.scrollableMessageModel.softButtons.count > 0 ? parent.height * 1/5 : 1
-
- PagedFlickable {
- id: flickRow
- width: top.width
- spacing: (width - elementWidth * 4) / 3
- snapTo: Constants.ovalButtonWidth + spacing
- elementWidth: Constants.ovalButtonWidth
- Repeater {
- model: dataContainer.scrollableMessageModel.softButtons ?
- dataContainer.scrollableMessageModel.softButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.scrollableMessageModel.appId
- button: dataContainer.scrollableMessageModel.softButtons.get(index)
- onKeepContext: { timer.restart() }
- onDefaultAction: {
- dataContainer.scrollableMessageModel.result = Common.Result.ABORTED
- contentLoader.back()
- }
- }
- }
- }
- }
-
- Item {
- id: middle
- anchors.top: top.bottom
- anchors.left: parent.left
- anchors.bottom: bottom.top
- width: parent.width
- clip: true
-
- Flickable {
- id:flickable
- anchors.fill: middle
- flickableDirection: Flickable.VerticalFlick
- contentWidth: longMessageText.width
- contentHeight: longMessageText.height
- clip: true
-
- Text {
- id: longMessageText
- wrapMode: Text.Wrap
- width: middle.width
- text: dataContainer.scrollableMessageModel.longMessageText
- color: Constants.scrollableMessageTextColor
- font.pixelSize: Constants.fontSize
- }
- }
- Rectangle {
- id: scrollbar
- anchors.right: flickable.right
- y: flickable.visibleArea.yPosition * flickable.height
- width: Constants.scrollableMessageScrollBarWidth
- height: flickable.visibleArea.heightRatio * flickable.height
- visible: !(flickable.visibleArea.heightRatio > 1)
- color: Constants.scrollableMessageScrollBarColor
- }
- }
- Item {
- // 1/5 bottom screen
- id: bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/5 * parent.height
- OvalButton {
- anchors.centerIn: parent
- text: "Close"
- onClicked: {
- dataContainer.scrollableMessageModel.result = Common.Result.ABORTED
- contentLoader.back()
- }
- }
- }
- }
- /**
- * Test Support Section
- *
- */
- function getTimer(){
- return timer
- }
- function getSoftButtonsListView(){
- return softButtons
- }
- function getScrollbar(){
- return scrollbar
- }
- function getTextArea(){
- return middle
- }
- function getBackButton(){
- return backButton
- }
- /**
- * Test Support Section End
- */
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SimulationView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SimulationView.qml
deleted file mode 100644
index b79cddf8c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SimulationView.qml
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * @file SimulationView.qml
- * @brief Area of screen responsible for simulation actions
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../views"
-import "../popups"
-import "../models/Constants.js" as Constants
-
-Rectangle {
- width: controlArea.width + controlArea.anchors.margins
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- color: Constants.panelColor
-
- Item {
- id: showArea
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: parent.height - (controlArea.childrenRect.height + controlArea.anchors.margins)
-
- ExitAllApplicationsPopup {
- id: exitAllApplicationsPopup
- anchors.fill: parent
- visible: false
- }
-
- VehicleInfoPopUp {
- id: viPopUp
- anchors.fill: parent
- }
-
- TBTClientStatePopUp {
- id: tbtClientStatePopUp
- anchors.fill: parent
- visible: false
- }
- }
-
- Item {
- id: controlArea
- anchors.bottom: parent.bottom
- anchors.margins: Constants.panelPadding
- anchors.horizontalCenter: parent.horizontalCenter
- width: table.width
-
- ListModel {
- id: languagesList
-
- Component.onCompleted: {
- for (var name in Common.Language) {
- if (settingsContainer.sdlLanguagesList.indexOf(Common.Language[name]) != -1) {
- append({name: name.replace('_', '-')});
- }
- }
- }
- }
-
- Text {
- id: label
- text: "Languages"
- color: Constants.panelTextColor
- anchors.bottom: table.top
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Grid {
- id: table
- spacing: 5
- columns: 2
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: globalProperties.top
-
- Text {
- text: "HMI UI"
- color: Constants.panelTextColor
- }
-
- Text {
- text: "HMI TTS + VR"
- color: Constants.panelTextColor
- }
-
- ComboBox {
- width: table.width / table.columns - table.spacing
- model: languagesList
- onCurrentIndexChanged: {
- dataContainer.hmiUILanguage = settingsContainer.sdlLanguagesList[currentIndex];
- sdlUI.onLanguageChange(dataContainer.hmiUILanguage);
- }
- z: 1000
- }
-
- ComboBox {
- width: table.width / table.columns - table.spacing
- model: languagesList
- onCurrentIndexChanged: {
- dataContainer.hmiTTSVRLanguage = settingsContainer.sdlLanguagesList[currentIndex];
- sdlTTS.onLanguageChange(dataContainer.hmiTTSVRLanguage);
- sdlVR.onLanguageChange(dataContainer.hmiTTSVRLanguage);
- }
- z: 1000
- }
-
- Text {
- text: "Application UI"
- color: Constants.panelTextColor
- }
-
- Text {
- text: "Application TTS + VR"
- color: Constants.panelTextColor
- }
-
- Text {
- id: uiLanguageLabel
- color: Constants.panelTextColor
- text: " "
- Connections {
- target: dataContainer
- onCurrentApplicationChanged: {
- for (var s in Common.Language) {
- if (Common.Language[s] === dataContainer.currentApplication.hmiDisplayLanguageDesired) {
- uiLanguageLabel.text = s;
- }
- }
- }
- }
- }
-
- Text {
- id: ttsLanguageLabel
- color: Constants.panelTextColor
- text: " "
- Connections {
- target: dataContainer
- onCurrentApplicationChanged: {
- for (var s in Common.Language) {
- if (Common.Language[s] === dataContainer.currentApplication.languageTTSVR) {
- ttsLanguageLabel.text = s;
- }
- }
- }
- }
- }
-
- PushButton {
- id: vehicleInfo
- label: "Vehicle info"
- toggleMode: true
- onPressed: {
- viPopUp.show();
- }
- onUnpressed: {
- viPopUp.hide();
- }
- }
-
- PushButton {
- id: tbtClientState
- label: "TBT Client state"
- toggleMode: true
- onPressed: {
- tbtClientStatePopUp.show();
- }
- onUnpressed: {
- tbtClientStatePopUp.hide();
- }
- }
-
- PushButton {
- label: "Exit application"
- onClicked: {
- if (dataContainer.applicationContext) {
- sdlBasicCommunication.onExitApplication(dataContainer.currentApplication.appId)
- }
- }
- }
-
- PushButton {
- id: exitAllAppsButton
- label: "Exit all apps"
- toggleMode: true
- onPressed: {
- exitAllApplicationsPopup.show()
-
- }
- onUnpressed: {
- exitAllApplicationsPopup.hide()
- }
- Connections {
- target: exitAllApplicationsPopup
- onVisibleChanged: {
- if (!exitAllApplicationsPopup.visible) {
- exitAllAppsButton.state = "unpressed"
- }
- }
- }
- }
-
- CheckBox {
- style: CheckBoxStyle {
- label: Text {
- color: Constants.panelTextColor
- text: "Use URL"
- }
- }
- }
-
- CheckBox {
- style: CheckBoxStyle {
- label: Text {
- color: Constants.panelTextColor
- text: "DD"
- }
- }
- onClicked: {
- if (checked) {
- dataContainer.driverDistractionState =
- Common.DriverDistractionState.DD_ON;
- } else {
- dataContainer.driverDistractionState =
- Common.DriverDistractionState.DD_OFF;
- }
- }
- }
- }
-
- Rectangle {
- id: globalProperties
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: listGlobalProperties.height + Constants.panelPadding
- border.color: Constants.panelTextColor
- border.width: 1
- color: Constants.panelColor
- Column {
- id: listGlobalProperties
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.panelPadding / 4
- Text {
- text: "HELP_PROMPT: " + dataContainer.currentApplication.helpPrompt
- color: Constants.panelTextColor
- }
- Text {
- text: "TIMEOUT_PROMPT: " + dataContainer.currentApplication.timeoutPrompt
- color: Constants.panelTextColor
- }
- Text {
- text: "AUTOCOMPLETE_TEXT: " // TODO(ALeshin): Function didn' realized yet
- color: Constants.panelTextColor
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SiriusPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SiriusPlayerView.qml
deleted file mode 100644
index e5d214954..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/SiriusPlayerView.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file SiriusPlayerView.qml
- * @brief Sirius player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../controls"
-
-GeneralView {
- RadioPlayer {
- id: siriusRadioPlayer
- anchors.fill: parent
- radioType: ""
- radioName: "Sirius"
-
- playerState: dataContainer.siriusPlayerState
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnByTurnView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnByTurnView.qml
deleted file mode 100644
index a69a86a40..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnByTurnView.qml
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * @file TurnByTurnView.qml
- * @brief View for TurnByTurn.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../models"
-
-GeneralView {
- applicationContext: true
-
- Item {
- id: turnByTurnView
- anchors.fill: parent
-
- Item {
- // top 3/4 of screen
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: parent.height * 3/4
-
- Item {
- // row of oval buttons
- id: ovalButtonsRow
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- id: buttonsRow
- width: parent.width
- spacing: (width - 4 * elementWidth) / 3
- anchors.verticalCenter: parent.verticalCenter
- snapTo: Constants.ovalButtonWidth + spacing
- elementWidth: Constants.ovalButtonWidth
-
- OvalButton {
- id: turnListButton
- text: "TurnList"
- onClicked: {
- console.log("Go to TurnListView");
- contentLoader.go("./views/TurnListView.qml");
- }
- }
-
- Repeater {
- model: dataContainer.currentApplication.navigationSoftButtons ?
- dataContainer.currentApplication.navigationSoftButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.navigationSoftButtons.get(index)
- }
- }
- }
- }
-
- Column {
- // Picture + text information + media clock
- id: mediaContent
- width: parent.width
- height: 3/4 * parent.height
- anchors.left: parent.left
- anchors.top: ovalButtonsRow.bottom
-
- Row {
- // picture + text info
- width: parent.width
- height: 3/4 * parent.height
- spacing: Constants.margin
-
- Icon {
- id: image
- height: parent.height
- width: height
- source: dataContainer.currentApplication.navigationModel.turnIcon
- }
-
- Column {
- // text info
- id: textInfo
- height: parent.height
- width: parent.width - image.width - parent.spacing
- spacing: (height - 5 * navText1.height) / 4
-
- Text {
- id: navText1
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: dataContainer.currentApplication.navigationModel.text1
- font.pixelSize: Constants.fontSize
- visible: dataContainer.currentApplication.navigationModel.text1
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: dataContainer.currentApplication.navigationModel.text2
- font.pixelSize: Constants.fontSize
- visible: dataContainer.currentApplication.navigationModel.text2
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "Total distance: " + dataContainer.currentApplication.navigationModel.totalDistance
- font.pixelSize: Constants.fontSize
- visible: dataContainer.currentApplication.navigationModel.totalDistance
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "Time to destination: " + dataContainer.currentApplication.navigationModel.timeToDestination
- font.pixelSize: Constants.fontSize
- visible: dataContainer.currentApplication.navigationModel.timeToDestination
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- color: Constants.primaryColor
- text: "ETA: " + dataContainer.currentApplication.navigationModel.eta
- font.pixelSize: Constants.fontSize
- visible: dataContainer.currentApplication.navigationModel.eta
- }
- }
- }
-
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- height: 1/4 * parent.height
- width: 2/3 * parent.width
-
- Rectangle {
- id: coveredDistance
- anchors.verticalCenter: parent.verticalCenter
- height: Constants.distanceBarHeight
- width: dataContainer.currentApplication.navigationModel.distanceToManeuver /
- dataContainer.currentApplication.navigationModel.distanceToManeuverScale * parent.width
- color: "white"
- }
-
- Rectangle {
- anchors.verticalCenter: parent.verticalCenter
- height: Constants.distanceBarHeight
- width: parent.width - coveredDistance.width
- color: Constants.primaryColor
- }
- }
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnListView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnListView.qml
deleted file mode 100644
index bdd0b3d6c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/TurnListView.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * @file TurnListView.qml
- * @brief View for TurnByTurn list.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-GeneralView {
- applicationContext: true
-
- Item {
- anchors.left: parent.left
- anchors.top: parent.top
- width: parent.width
- height: 3/4 * parent.height
-
- Item {
- id: sotfButtons
- width: parent.width
- height: 1/4 * parent.height
-
- PagedFlickable {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- elementWidth: Constants.ovalButtonWidth
- snapTo: elementWidth + spacing
- spacing: (width - 4 * elementWidth) / 3
-
- Repeater {
- model: dataContainer.currentApplication.turnListSoftButtons ?
- dataContainer.currentApplication.turnListSoftButtons.count :
- 0
- delegate:
- SoftButton {
- appId: dataContainer.currentApplication.appId
- button: dataContainer.currentApplication.turnListSoftButtons.get(index)
- }
- }
- }
- }
-
- ScrollableListView {
- id: scrollableList
- anchors.top: sotfButtons.bottom
- anchors.left: parent.left
- width: parent.width
- height: 3/4 * parent.height
-
- model: dataContainer.currentApplication.turnList
-
- delegate:
- ListItem {
- width: scrollableList.width
- height: Constants.iconItemListSize
- text: dataContainer.currentApplication.turnList.get(index).navigationText.fieldText
- fontSize: Constants.fontSize
- icon: dataContainer.currentApplication.turnList.get(index).turnIcon
- }
- }
- }
-
- Item {
- // 1/4 bottom screen
- id: back
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- BackButton { anchors.centerIn: parent }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/UsbPlayerView.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/UsbPlayerView.qml
deleted file mode 100644
index f8a2d3980..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/UsbPlayerView.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file UsbPlayerView.qml
- * @brief USB player screen view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "../models/Constants.js" as Constants
-import "../controls"
-
-GeneralView {
- category: Common.DeactivateReason.AUDIO
- MediaPlayer {
- id: usbPlayer
- playerName: "USB"
- anchors.fill: parent
- playerState: dataContainer.usbPlayerState
- image: playerState.albumImage
-
- buttons: [
- OvalButton {
- text: usbPlayer.playerName
- onReleased: contentLoader.go("./views/MusicSourceView.qml")
- fontSize: Constants.fontSize
- },
-
- OvalButton {
- text: "Browse"
- fontSize: Constants.fontSize
- }
- ]
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/WarningInfo.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/WarningInfo.qml
deleted file mode 100644
index 6228b63c7..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_model_qt5/views/WarningInfo.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @file WarningInfo.qml
- * @brief Screen with warning information.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-import QtQuick 2.0
-import "../controls"
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: warningInfo
- anchors.fill: parent
- color: Constants.secondaryColor
- Text {
- anchors.top: parent.top
- anchors.left: parent.left
- height: 1/4 * parent.height
- width: parent.width
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-
- text: "WARNING!"
- color: Constants.warningColor
- font.pixelSize: Constants.titleFontSize
- font.bold: true
- style: Text.Raised
- styleColor: "gray"
- }
-
- Text {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: Constants.margin
- height: 1/2 * parent.height
- width: parent.width
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- wrapMode: Text.WordWrap
-
- text: "This application is intended to be used as a demonstrative aid only, "
- + "while the vehicle is parked. Don't use it while driving. <br /><br />"
- + "Use extreme caution when using any device that takes your attention off the road. "
- + "Ford recommends against the use of any hand-held device while driving and that you comply "
- + "with all applicable laws. Your primary responsibility is the safe operation of the vehicle."
- color: "white"
- font.pixelSize: 25
- font.bold: true
- }
-
- function showOkButton() {
- okButtonAnimation.start()
- }
-
- Item {
- id: ok
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- width: parent.width
- height: 1/4 * parent.height
- opacity: 0
-
- SequentialAnimation
- {
- id: okButtonAnimation
- // Decrease this value while debugging
- PauseAnimation { duration: Constants.warningScreenDuration }
- NumberAnimation {
- target: ok
- duration: Constants.animationDuration
- property: "opacity"
- from: 0; to: 1;
- }
- }
-
- Image {
- id: okButton
- anchors.centerIn: parent
- source: "../res/buttons/longest_oval_btn.png"
-
- Text {
- id: text
- anchors.centerIn: parent
- text: "OK"
- font.pixelSize: Constants.fontSize
- color: Constants.primaryColor
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.source = "../res/buttons/longest_oval_btn_pressed.png"
- text.color = Constants.secondaryColor
- }
- onReleased: {
- parent.source = "../res/buttons/longest_oval_btn.png"
- text.color = Constants.primaryColor
- }
- onClicked: {
- console.log("WarningInfo OkButton - on clicked enter");
- warningInfo.visible = false
- }
- }
- }
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_plugins/CMakeLists.txt
deleted file mode 100644
index 6ff595315..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-# --- DBus plugin
-add_subdirectory(./dbus_adapter)
-
-# --- Hmi Framework plugin
-add_subdirectory(./hw_buttons)
-
-# --- Log4cxx plugin
-add_subdirectory(./log4cxx)
-
-# --- NamedPipeNotifier plugin
-add_subdirectory(./named_pipe_notifier)
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/CMakeLists.txt
deleted file mode 100644
index 2d970bbb7..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/CMakeLists.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.11)
-
-set(components_dir ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
-set(dbus_dir ${components_dir}/dbus)
-set(codegen_dir ${dbus_dir}/codegen)
-set(codegen ${codegen_dir}/make_qml_dbus_cpp.py)
-set(parser ${codegen_dir}/ford_xml_parser.py)
-set(interfaces_dir ${components_dir}/interfaces)
-set(api_xml ${interfaces_dir}/QT_HMI_API.xml)
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.cc ${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.h
- COMMAND python ${codegen} --infile ${api_xml} --version ${qt_version} --outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${api_xml} ${codegen} ${parser}
- COMMENT "Generating files:
- ${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.cc
- ${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.h
- from:
- ${api_xml} ..."
-)
-
-set(target DbusAdapter)
-set(destination com/ford/sdl/hmi/dbus_adapter)
-set(install_destination bin/hmi/plugins/${destination})
-set(library_name ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-set(CMAKE_AUTOMOC ON)
-set(SOURCES
- dbus_plugin.cc
- ${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.cc
- sdl_proxy.cc
- hmi_proxy.cc
- stream_qvariant.cc
- moc_qml_dbus.cpp
- dbus_controller.cc
-)
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_BINARY_DIR}/src/components
-)
-
-add_library(${target} SHARED ${SOURCES})
-
-if (${qt_version} MATCHES "4.8.5")
- qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.h moc_qml_dbus.cpp)
- qt4_use_modules(${target} Core DBus Declarative)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/${destination})
-elseif (${qt_version} MATCHES "5.1.0")
- qt5_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/qml_dbus.h moc_qml_dbus.cpp)
- qt5_use_modules(${target} Core DBus Qml)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/${destination})
-endif ()
-
-target_link_libraries(${target} apr-1 aprutil-1 log4cxx)
-
-add_custom_target(copy_library_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/${library_name}
- ${copy_destination}
- DEPENDS ${target}
- COMMENT "Copying library ${library_name}")
-file(COPY qmldir DESTINATION ${copy_destination})
-
-install(TARGETS ${target}
- DESTINATION ${install_destination}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
-)
-install(FILES qmldir DESTINATION ${install_destination})
-
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_custom_target(qmltypes_${target} ALL
- COMMAND ${qmlplugindump_binary} -nonrelocatable com.ford.sdl.hmi.dbus_adapter 1.0 ${model_dir} > ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes 2>/dev/null || true
- DEPENDS copy_library_${target}
- )
- add_custom_target(copy_qmltypes_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
- ${copy_destination}
- DEPENDS qmltypes_${target}
- )
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes DESTINATION ${install_destination})
-endif ()
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc
deleted file mode 100644
index 7882cfc6d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * \file dbus_controller.cpp
- * \brief DbusController class.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "dbus_controller.h"
-#include "interfaces/QT_HMI_API.h"
-#include <QtDBus/QDBusConnection>
-
-DBusController::DBusController(QObject *parent)
- : QObject(parent),
- message(NULL) {}
-
-void DBusController::addMessage(const QDBusMessage& message, fillRoutine fill,
- int async_uid) {
- delayedReply reply;
- reply.message = message;
- reply.fill = fill;
- replies_[async_uid] = reply;
-}
-
-void DBusController::sendReply(QVariant asyncObject, QVariant data) {
- int uid = asyncObject.toMap()["__async_uid"].toInt();
- std::map<int, delayedReply>::iterator it = replies_.find(uid);
- if (it != replies_.end()) {
- QDBusMessage msg = it->second.message.createReply();
- if (!it->second.fill(msg, data.toMap())) {
- QDBusConnection::sessionBus()
- .send(it->second.message.createErrorReply(QDBusError::InternalError,
- QString::number(hmi_apis::Common_Result::INVALID_DATA)));
- } else {
- QDBusConnection::sessionBus().send(msg);
- }
- replies_.erase(it);
- }
-}
-
-void DBusController::sendReply(QVariant data) {
- if (!message)
- return;
- QDBusMessage msg = message->createReply();
- if (!fill(msg, data.toMap())) {
- QDBusConnection::sessionBus()
- .send(message->createErrorReply(QDBusError::InternalError,
- QString::number(hmi_apis::Common_Result::INVALID_DATA)));
- } else {
- QDBusConnection::sessionBus().send(msg);
- }
-}
-
-void DBusController::sendError(QVariant asyncObject, QVariant data) {
- int uid = asyncObject.toMap()["__async_uid"].toInt();
- std::map<int, delayedReply>::iterator it = replies_.find(uid);
- if (it != replies_.end()) {
- QDBusMessage msg = it->second.message.createErrorReply(QDBusError::InternalError,
- data.toString());
- QDBusConnection::sessionBus().send(msg);
- replies_.erase(it);
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h
deleted file mode 100644
index 9fd1252b5..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_controller.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * \file dbus_controller.h
- * \brief DbusController class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_DBUS_CONTROLLER_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_DBUS_CONTROLLER_H_
-
-#include <QtDBus/QDBusMessage>
-#include <QtCore/QObject>
-#include <map>
-
-typedef bool (*fillRoutine)(QDBusMessage&, const QVariantMap&);
-
-class DBusController: public QObject {
- struct delayedReply {
- QDBusMessage message;
- fillRoutine fill;
- };
- Q_OBJECT
-
- public:
- explicit DBusController(QObject *parent = 0);
- void addMessage(const QDBusMessage& message, fillRoutine fill, int async_uid);
- Q_INVOKABLE void sendReply(QVariant asyncObject, QVariant data);
- Q_INVOKABLE void sendReply(QVariant data);
- Q_INVOKABLE void sendError(QVariant asyncObject, QVariant data);
- const QDBusMessage* message;
- fillRoutine fill;
-
- private:
- std::map<int, delayedReply> replies_;
-};
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_DBUS_CONTROLLER_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc
deleted file mode 100644
index 0ea0d9eca..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * \file dbus_plugin.cpp
- * \brief DbusPlugin class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "dbus_plugin.h"
-
-#include "hmi_proxy.h"
-#include "sdl_proxy.h"
-#include "optional_argument.h"
-#include "qml_dbus.h"
-#include "dbus_controller.h"
-
-#include <log4cxx/logger.h>
-#include <log4cxx/propertyconfigurator.h>
-
-#include <QtCore/QString>
-#include <QtDBus/QDBusConnection>
-
-#if QT_4
-# include <QtDeclarative/QDeclarativeContext>
-# include <QtDeclarative/QDeclarativeListReference>
-# include <QtDeclarative/QDeclarativeEngine>
-#elif QT_5
-# include <QtQml/QQmlContext>
-# include <QtQml/QQmlListReference>
-# include <QtQml/QQmlEngine>
-#endif // QT_VERSION
-log4cxx::LoggerPtr logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("DBusPlugin"));
-
-void DbusPlugin::registerTypes(const char *uri) {
- log4cxx::PropertyConfigurator::configure("log4cxx.properties");
-
- // @uri sdl.core.api
- qmlRegisterType<HmiProxy>(uri, 1, 0, "HMIProxy");
- qmlRegisterType<SdlProxy>(uri, 1, 0, "SDLProxy");
-
- RegisterDbusMetatypes();
- qDBusRegisterMetaType<OptionalArgument<int> >();
- qDBusRegisterMetaType<OptionalArgument<QList<int> > >();
- qDBusRegisterMetaType<OptionalArgument<QString> >();
- qDBusRegisterMetaType<OptionalArgument<QStringList> >();
- qDBusRegisterMetaType<OptionalArgument<bool> >();
- qDBusRegisterMetaType<OptionalArgument<QList<bool> > >();
- qDBusRegisterMetaType<OptionalArgument<double> >();
- qDBusRegisterMetaType<OptionalArgument<QList<double> > >();
-
- HmiProxy::api_adaptors_.Init(this);
-
- QDBusConnection::sessionBus().registerObject("/", this);
- QDBusConnection::sessionBus().registerService("com.ford.sdl.hmi");
-
- dbusController_ = new DBusController();
- HmiProxy::api_adaptors_.SetDBusController(dbusController_);
-}
-
-void DbusPlugin::initializeEngine(Engine *engine, const char *uri) {
- engine->rootContext()->setContextProperty("DBus", dbusController_);
-}
-
-#if QT_4
-Q_EXPORT_PLUGIN2(DbusAdapter, DbusPlugin)
-#endif // QT_4
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h
deleted file mode 100644
index fb3deb5ce..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/dbus_plugin.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * \file dbus_plugin.h
- * \brief DbusPlugin class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_DBUS_PLUGIN_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_DBUS_PLUGIN_H_
-
-#include "qt_version.h"
-
-#if QT_4
-# include <QtDeclarative/QDeclarativeExtensionPlugin>
-typedef QDeclarativeExtensionPlugin ExtensionPlugin;
-typedef QDeclarativeEngine Engine;
-#elif QT_5
-# include <QtQml/QQmlExtensionPlugin>
-typedef QQmlExtensionPlugin ExtensionPlugin;
-typedef QQmlEngine Engine;
-#endif // QT_VERSION
-#include <QtDBus/QDBusContext>
-
-class DBusController;
-
-class DbusPlugin : public ExtensionPlugin, public QDBusContext {
- Q_OBJECT
-
-#if QT_5
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-#endif // QT_5
-
- DBusController *dbusController_;
-
- public:
- void registerTypes(const char *uri);
- void initializeEngine(Engine *engine, const char *uri);
-};
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_DBUS_PLUGIN_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc
deleted file mode 100644
index bd9e6efea..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * \file hmiproxy.cpp
- * \brief HmiProxy class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "hmi_proxy.h"
-#include <QtDBus/QDBusConnection>
-
-ApiAdaptors HmiProxy::api_adaptors_;
-
-HmiProxy::HmiProxy(Item *parent)
- : Item(parent) {}
-
-void HmiProxy::componentComplete() {
- Item::componentComplete();
- api_adaptors_.SetApi(this);
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h
deleted file mode 100644
index 7fa0e49bf..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/hmi_proxy.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * \file hmiproxy.h
- * \brief HmiProxy class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_HMI_PROXY_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_HMI_PROXY_H_
-
-#include "qt_version.h"
-#include "qml_dbus.h"
-
-#if QT_4
-# include <QtDeclarative/QDeclarativeItem>
-typedef QDeclarativeItem Item;
-#elif QT_5
-# include <QtQuick/QQuickItem>
-typedef QQuickItem Item;
-#endif // QT_VERSION
-
-class HmiProxy : public Item {
- Q_OBJECT
- Q_DISABLE_COPY(HmiProxy)
-
- public:
- explicit HmiProxy(Item *parent = 0);
- static ApiAdaptors api_adaptors_;
-
- protected:
- virtual void componentComplete();
-};
-
-QML_DECLARE_TYPE(HmiProxy)
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_HMI_PROXY_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h
deleted file mode 100644
index 6f2b54fc5..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/metatype.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_METATYPE_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_METATYPE_H_
-
-#include <QMetaType>
-
-template<typename T>
-QMetaType::Type metatype();
-
-template<>
-inline QMetaType::Type metatype<int>() {
- return QMetaType::Int;
-}
-
-template<>
-inline QMetaType::Type metatype<QString>() {
- return QMetaType::QString;
-}
-
-template<>
-inline QMetaType::Type metatype<bool>() {
- return QMetaType::Bool;
-}
-
-template<>
-inline QMetaType::Type metatype<double>() {
- return QMetaType::Double;
-}
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_METATYPE_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h
deleted file mode 100644
index 61ed1c0b6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/optional_argument.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * \file optional_argument.h
- * \brief OptionalArgument struct header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_OPTIONAL_ARGUMENT_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_OPTIONAL_ARGUMENT_H_
-
-#include "qt_version.h"
-#include <QtDBus/QDBusArgument>
-
-template<class T>
-struct OptionalArgument {
- T val;
- bool presence;
- explicit OptionalArgument(const T& value)
- : val(value),
- presence(true) {}
- OptionalArgument()
- : presence(false) {}
-};
-
-template<class T>
-inline
-QDBusArgument& operator << (QDBusArgument& arg, const OptionalArgument<T>& o) {
- arg.beginStructure();
- arg << o.presence << o.val;
- arg.endStructure();
- return arg;
-}
-
-template<class T>
-inline
-const QDBusArgument& operator >> (const QDBusArgument& arg, OptionalArgument<T>& o) {
- arg.beginStructure();
- arg >> o.presence >> o.val;
- arg.endStructure();
- return arg;
-}
-
-#if QT_4
-Q_DECLARE_METATYPE(QList<int>)
-#endif // QT_4
-
-Q_DECLARE_METATYPE(OptionalArgument<int>)
-Q_DECLARE_METATYPE(OptionalArgument<QString>)
-Q_DECLARE_METATYPE(OptionalArgument<bool>)
-Q_DECLARE_METATYPE(OptionalArgument<double>)
-
-Q_DECLARE_METATYPE(OptionalArgument<QList<int> >)
-Q_DECLARE_METATYPE(OptionalArgument<QStringList>)
-Q_DECLARE_METATYPE(OptionalArgument<QList<bool> >)
-Q_DECLARE_METATYPE(OptionalArgument<QList<double> >)
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_OPTIONAL_ARGUMENT_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h
deleted file mode 100644
index 76e181882..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qml_dbus_common.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/**
- * \file qml_dbus_common.h
- * \brief Contain utilities for DBus plugin.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_QML_DBUS_COMMON_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_QML_DBUS_COMMON_H_
-
-#include <QtDBus/QDBusContext>
-#include "optional_argument.h"
-#include "stream_qvariant.h"
-#include "metatype.h"
-
-enum ErrorCode {
- Success = 0,
- UnsupportedRequest,
- UnsupportedResource,
- Disallowed,
- Rejected,
- Aborted,
- Ignored,
- Retry,
- InUse,
- DataNotAvailable,
- TimedOut,
- InvalidData,
- CharLimitExceeded,
- InvalidId,
- DuplicateName,
- ApplicationNotRegistered,
- WrongLanguage,
- OutOfMemory,
- TooManyPendingRequests,
- NoAppsRegistered,
- NoDevicesConnected,
- Warnings,
- GenericError,
- UserDisallowed
-};
-
-inline void RaiseDbusError(QObject* adaptor, int code) {
- QDBusContext* context = dynamic_cast<QDBusContext*>(adaptor->parent());
- if (context) {
- context->sendErrorReply(QDBusError::InternalError,
- QString::number(static_cast<int>(code)));
- }
-}
-
-template<typename T>
-inline void PutArgToMap(QVariantMap& map, const char* name, const T& v) {
- map.insert(name, QVariant::fromValue(v));
-}
-
-inline bool GetArgFromMap(const QVariantMap& map, const char* name, int& v) {
- QVariantMap::const_iterator it = map.find(name);
- if (map.end() == it) return false;
- if (it->type() != QVariant::Int) return false;
- v = it->toInt();
- return true;
-}
-
-inline bool GetArgFromMap(const QVariantMap& map, const char* name, QString& v) {
- QVariantMap::const_iterator it = map.find(name);
- if (map.end() == it) return false;
- if (it->type() != QVariant::String) return false;
- v = it->toString();
- return true;
-}
-
-inline bool GetArgFromMap(const QVariantMap& map, const char* name, bool& v) {
- QVariantMap::const_iterator it = map.find(name);
- if (map.end() == it) return false;
- if (it->type() != QVariant::Bool) return false;
- v = it->toBool();
- return true;
-}
-
-inline bool isNumber(QVariant v) {
- QVariant::Type t = v.type();
- return (t == QVariant::Double) || (t == QVariant::Int) ||
- (t == QVariant::UInt) || (t == QVariant::LongLong) ||
- (t == QVariant::ULongLong);
-}
-
-inline bool GetArgFromMap(const QVariantMap& map, const char* name, double& v) {
- QVariantMap::const_iterator it = map.find(name);
- if (map.end() == it) return false;
- if (!isNumber(*it)) return false;
- v = it->toDouble();
- return true;
-}
-
-inline bool VariantToValue(const QVariant& variant, int& v) {
- if (variant.type() != QVariant::Int) return false;
- v = variant.toInt();
- return true;
-}
-
-inline bool VariantToValue(const QVariant& variant, QString& v) {
- if (variant.type() != QVariant::String) return false;
- v = variant.toString();
- return true;
-}
-
-inline bool VariantToValue(const QVariant& variant, bool& v) {
- if (variant.type() != QVariant::Bool) return false;
- v = variant.toBool();
- return true;
-}
-
-inline bool VariantToValue(const QVariant& variant, double& v) {
- if (variant.type() != QVariant::Double) return false;
- v = variant.toDouble();
- return true;
-}
-
-inline bool VariantToValue(const QVariant& variant, QStringList& v) {
- if (variant.type() != QVariant::List) return false;
- QList<QVariant> list = variant.toList();
- for (QList<QVariant>::const_iterator i = list.begin(); i != list.end(); ++i) {
- if (i->type() != QVariant::String) return false;
- v.append(i->toString());
- }
- return true;
-}
-
-template<typename T>
-bool VariantToValue(const QVariant& variant, QList<T>& v) {
- if (variant.type() != QVariant::List) return false;
- QList<T> spare;
- QList<QVariant> list = variant.toList();
- for (QList<QVariant>::const_iterator i = list.begin(); i != list.end(); ++i) {
- QVariant::Type type = i->type();
-// Although this function is declared as returning QVariant::Type(obsolete),
-// the return value should be interpreted as QMetaType::Type.
-// (http://qt-project.org/doc/qt-5.0/qtcore/qvariant.html#type)
- QMetaType::Type type_casted = static_cast<QMetaType::Type>(type);
- if (type_casted != metatype<T>()) {
- return false;
- }
- spare.append(i->value<T>());
- }
- v.swap(spare);
- return true;
-}
-
-template<typename T>
-inline QVariant ValueToVariant(const T& v) {
- return QVariant::fromValue(v);
-}
-
-template<typename T>
-inline QVariant ValueToVariant(const QList<T>& v) {
- QList<QVariant> list;
- for (typename QList<T>::const_iterator i = v.begin(); i != v.end(); ++i)
- list.append(ValueToVariant(*i));
- return QVariant::fromValue(list);
-}
-
-template<typename T>
-inline void PutArgToMap(QVariantMap& map, const char* name, const QList<T>& v) {
- QList<QVariant> list;
- for (typename QList<T>::const_iterator i = v.begin(); i != v.end(); ++i)
- list.append(ValueToVariant(*i));
- map.insert(name, QVariant::fromValue(list));
-}
-
-template<typename T>
-inline bool GetArgFromMap(const QVariantMap& map, const char* name, QList<T>& v) {
- QVariantMap::const_iterator it = map.find(name);
- if (map.end() == it) return false;
- const QVariant& variant = *it;
- if (variant.type() != QVariant::List) return false;
- QList<QVariant> list = variant.toList();
- for (QList<QVariant>::const_iterator i = list.begin(); i != list.end(); ++i) {
- T t;
- bool ok = VariantToValue(*i, t);
- if (!ok) return false;
- v.append(t);
- }
- return true;
-}
-
-template<typename T>
-inline void PutArgToMap(QVariantMap& map, const char* name,
- const OptionalArgument<T>& v) {
- if (v.presence)
- map.insert(name, ValueToVariant(v.val));
-}
-
-template<typename T>
-inline bool GetArgFromMap(const QVariantMap& map, const char* name,
- OptionalArgument<T>& v) {
- QVariantMap::const_iterator it = map.find(name);
- if (map.end() == it || !it->isValid()) {
- v.presence = false;
- return true;
- }
- v.presence = true;
- return GetArgFromMap(map, name, v.val);
-}
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_QML_DBUS_COMMON_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qmldir b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qmldir
deleted file mode 100644
index 5f426d357..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module com.ford.sdl.hmi.dbus_adapter
-plugin DbusAdapter
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h
deleted file mode 100644
index cbad38ed5..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/qt_version.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file qt_version.h
- * @brief Defines for check Qt version.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_QT_VERSION_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_QT_VERSION_H_
-
-#include <qglobal.h>
-
-#define QT_4 ((QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)))
-
-#define QT_5 ((QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)))
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_QT_VERSION_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.cc
deleted file mode 100644
index c0b0a3d7f..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * \file sdlproxy.cpp
- * \brief SdlProxy class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "sdl_proxy.h"
-
-SdlProxy::SdlProxy(Item *parent)
- : Item(parent) {
-
- QDBusConnection::sessionBus().connect(
- "com.ford.sdl.core", "/", "com.ford.sdl.core.BasicCommunication",
- "OnAppRegistered", this, SLOT(OnAppRegistered(Common_HMIApplication)));
- QDBusConnection::sessionBus().connect(
- "com.ford.sdl.core", "/", "com.ford.sdl.core.BasicCommunication",
- "OnAppUnregistered", this, SLOT(OnAppUnregistered(int, OptionalArgument<bool>)));
- QDBusConnection::sessionBus().connect(
- "com.ford.sdl.core", "/", "com.ford.sdl.core.BasicCommunication",
- "PlayTone", this, SIGNAL(playTone()));
- QDBusConnection::sessionBus().connect(
- "com.ford.sdl.core", "/", "com.ford.sdl.core.UI", "ShowNotification",
- this, SLOT(OnShowNotification(Common_TextFieldStruct,
- OptionalArgument<Common_Image>, int)));
-}
-
-void SdlProxy::OnAppRegistered(Common_HMIApplication app) {
- QVariantMap appMap;
- appMap["appId"] = QVariant::fromValue(app.appID);
- appMap["appName"] = QVariant::fromValue(app.appName);
- appMap["deviceName"] = QVariant::fromValue(app.deviceName);
- appMap["hmiDisplayLanguageDesired"] = QVariant::fromValue(app.hmiDisplayLanguageDesired);
- appMap["isMediaApplication"] = QVariant::fromValue(app.isMediaApplication);
-
- if (app.appType.presence) {
- QList<QVariant> appType;
- for (QList<int>::const_iterator it = app.appType.val.begin();
- it != app.appType.val.end(); ++it) {
- appType.append(QVariant::fromValue(*it));
- }
- appMap["appType"] = appType;
- }
-
- if (app.ngnMediaScreenAppName.presence) {
- appMap["ngnMediaScreenAppName"] = QVariant::fromValue(app.ngnMediaScreenAppName.val);
- }
-
- if (app.icon.presence) {
- appMap["icon"] = QVariant::fromValue(app.icon.val);
- }
-
- emit appRegistered(QVariant(appMap));
-}
-
-void SdlProxy::OnShowNotification(Common_TextFieldStruct text,
- OptionalArgument<Common_Image> image,
- int timeout) {
- QVariantMap txtMap;
- QVariant img;
-
- txtMap["fieldName"] = text.fieldName;
- txtMap["fieldText"] = text.fieldText;
-
- if (image.presence) {
- QVariantMap imgMap;
- imgMap["imageType"] = image.val.imageType;
- imgMap["value"] = image.val.value;
- img = QVariant(imgMap);
- }
-
- emit showNotification(QVariant(txtMap), img, timeout);
-}
-
-void SdlProxy::OnAppUnregistered(int appId, OptionalArgument<bool> resume) {
- QVariant resume_arg;
-
- if (resume.presence) {
- resume_arg = QVariant::fromValue(resume.val);
- }
-
- emit appUnregistered(appId, resume_arg);
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.h
deleted file mode 100644
index 81c1ee986..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/sdl_proxy.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * \file sdlproxy.h
- * \brief SdlProxy class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_SDL_PROXY_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_SDL_PROXY_H_
-
-#include "qml_dbus.h"
-#include "qt_version.h"
-
-#include <QtDBus/QDBusInterface>
-#if QT_4
-# include <QtDeclarative/QDeclarativeItem>
-typedef QDeclarativeItem Item;
-#elif QT_5
-# include <QtQuick/QQuickItem>
-typedef QQuickItem Item;
-#endif // QT_VERSION
-
-class SdlProxy: public Item {
- Q_OBJECT
- Q_DISABLE_COPY(SdlProxy)
-
- public:
- explicit SdlProxy(Item* parent = 0);
-
- private:
- QDBusInterface *sdlBasicCommunicationInterface;
-
- signals:
- void appRegistered(QVariant application);
- void appUnregistered(int appId, QVariant resume);
- void playTone();
- void showNotification(QVariant text, QVariant icon, int timeout);
-
- private slots:
- void OnAppRegistered(Common_HMIApplication);
- void OnAppUnregistered(int appId, OptionalArgument<bool> resume);
- void OnShowNotification(Common_TextFieldStruct text,
- OptionalArgument<Common_Image> image,
- int timeout);
-};
-
-QML_DECLARE_TYPE(SdlProxy)
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_SDL_PROXY_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc
deleted file mode 100644
index a1ae3402c..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "stream_qvariant.h"
-
-std::basic_ostream<char>& operator<<(std::basic_ostream<char>& os,
- const QVariant& value) {
- switch (value.type()) {
- case QVariant::Map: {
- os << "{ ";
- QVariantMap structure = value.toMap();
- QMapIterator<QString, QVariant> i(structure);
- while (i.hasNext()) {
- i.next();
- os << i.key() << ":" << i.value();
- if (i.hasNext()) {
- os << ", ";
- }
- }
- os << " }";
- } break;
- case QVariant::List: {
- os << "[ ";
- QVariantList array = value.toList();
- QListIterator<QVariant> i(array);
- while (i.hasNext()) {
- os << i.next();
- if (i.hasNext()) {
- os << ", ";
- }
- }
- os << " ]";
- } break;
- default:
- os << value.toString().toLatin1().data();
- }
-
- return os;
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h b/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h
deleted file mode 100644
index 675b6d069..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/dbus_adapter/stream_qvariant.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_STREAM_QVARIANT_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_STREAM_QVARIANT_H_
-
-#include <QtCore/QVariant>
-#include <sstream>
-
-std::basic_ostream<char>& operator<<(std::basic_ostream<char>& os,
- const QVariant& value);
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_DBUS_ADAPTER_STREAM_QVARIANT_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/CMakeLists.txt
deleted file mode 100644
index 56a64b48b..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/CMakeLists.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.11)
-
-set(target HWButtons)
-set(destination com/ford/sdl/hmi/hw_buttons)
-set(install_destination bin/hmi/plugins/${destination})
-set(library_name ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-set(CMAKE_AUTOMOC ON)
-set(SOURCES
- attributed_mouse_event.cc
- hmi_hwbuttons.cc
- masked_container.cc
-)
-
-add_library(${target} SHARED ${SOURCES})
-
-if (${qt_version} MATCHES "4.8.5")
- qt4_use_modules(${target} Core Gui Declarative)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/${destination})
-elseif (${qt_version} MATCHES "5.1.0")
- qt5_use_modules(${target} Core Qml Quick)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/${destination})
-endif ()
-
-add_custom_target(copy_library_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/${library_name}
- ${copy_destination}
- DEPENDS ${target}
- COMMENT "Copying library ${library_name}")
-file(COPY qmldir DESTINATION ${copy_destination})
-
-install(TARGETS ${target}
- DESTINATION ${install_destination}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
-)
-install(FILES qmldir DESTINATION ${install_destination})
-
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_custom_target(qmltypes_${target} ALL
- COMMAND ${qmlplugindump_binary} -nonrelocatable com.ford.sdl.hmi.hw_buttons 1.0 ${model_dir} > ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes 2>/dev/null
- DEPENDS copy_library_${target}
- )
- add_custom_target(copy_qmltypes_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
- ${copy_destination}
- DEPENDS qmltypes_${target}
- )
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes DESTINATION ${install_destination})
-endif ()
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc
deleted file mode 100644
index 42e2e4f37..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * \file attributed_mouse_event.cpp
- * \brief AttributedMouseEvent class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "attributed_mouse_event.h"
-
-Item *AttributedMouseEvent::item() const {
- return item_;
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h
deleted file mode 100644
index b058e28f2..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/attributed_mouse_event.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * \file attributed_mouse_event.h
- * \brief AttributedMouseEvent class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_ATTRIBUTED_MOUSE_EVENT_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_ATTRIBUTED_MOUSE_EVENT_H_
-
-#include "qt_version.h"
-
-#include <QtCore/QObject>
-#if QT_4
-# include <QtDeclarative/QDeclarativeItem>
-typedef QDeclarativeItem Item;
-#elif QT_5
-# include <QtQuick/QQuickItem>
-typedef QQuickItem Item;
-#endif // QT_VERSION
-
-class AttributedMouseEvent : public QObject {
- Q_OBJECT
- Q_PROPERTY(Item* item READ item)
-
- public:
- explicit AttributedMouseEvent(Item *item) : item_(item) {}
-
- Item *item() const;
-
- private:
- Item *item_;
- Q_DISABLE_COPY(AttributedMouseEvent)
-};
-
-QML_DECLARE_TYPE(AttributedMouseEvent)
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_ATTRIBUTED_MOUSE_EVENT_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc
deleted file mode 100644
index 9f4f3b611..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * \file hmi_hwbuttons.cpp
- * \brief HmiHWButtons class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "hmi_hwbuttons.h"
-
-#if QT_4
-# include <QtDeclarative/qdeclarative.h>
-# include <QtGui/QGraphicsColorizeEffect>
-#elif QT_5
-# include <QtQml>
-#endif // QT_VERSION
-
-#include "masked_container.h"
-#include "attributed_mouse_event.h"
-
-void HmiHWButtons::registerTypes(const char *uri) {
- // @uri com.ford.hmi_framework
- qmlRegisterType<MaskedContainer>(uri, 1, 0, "MaskedContainer");
- qmlRegisterType<AttributedMouseEvent>();
-#if QT_4
- qmlRegisterType<QGraphicsColorizeEffect>(uri, 1, 0, "Colorize");
-#endif // QT_4
-}
-
-#if QT_4
-Q_EXPORT_PLUGIN2(HWButtons, HmiHWButtons)
-#endif // QT_4
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h
deleted file mode 100644
index ee5fa5302..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/hmi_hwbuttons.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * \file hmi_hwbuttons.h
- * \brief HmiHWButtons class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_HMI_HWBUTTONS_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_HMI_HWBUTTONS_H_
-
-#include "qt_version.h"
-
-#if QT_4
-# include <QtDeclarative/QDeclarativeExtensionPlugin>
-typedef QDeclarativeExtensionPlugin ExtensionPlugin;
-#elif QT_5
-# include <QtQml/QQmlExtensionPlugin>
-typedef QQmlExtensionPlugin ExtensionPlugin;
-#endif // QT_VERSION
-
-class HmiHWButtons : public ExtensionPlugin {
- Q_OBJECT
-#if QT_5
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-#endif // QT_5
-
- public:
- void registerTypes(const char *uri);
-};
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_HMI_HWBUTTONS_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc
deleted file mode 100644
index ac9aedacc..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.cc
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * \file masked_container.cpp
- * \brief MaskedContainer class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "masked_container.h"
-
-#if QT_4
-# include <QtCore/QPointF>
-# include <QtGui/QGraphicsSceneMouseEvent>
-# define IMAGE "QDeclarativeImage"
-#elif QT_5
-# include <QtGui/QImage>
-# include <QtCore/QEvent>
-# define IMAGE "QQuickImage"
-#endif // QT_VERSION
-
-MaskedContainer::MaskedContainer(Item *parent)
- : Item(parent),
- mask_(NULL) {
- setAcceptedMouseButtons(Qt::LeftButton);
-}
-
-void MaskedContainer::componentComplete() {
- Item::componentComplete();
-
- for (QObjectList::ConstIterator it = children().begin();
- it != children().end(); ++it) {
- Item *item = qobject_cast<Item*>(*it);
- if (item && item->inherits(IMAGE) && item->isVisible()) {
- images_.push_back(item);
- }
- }
-
- int height = this->height();
- int width =this->width();
-
- for (int i = 0; i < images_.size(); ++i) {
- Item *item = images_[i];
- int itemWidth = item->width();
- int itemHeight = item->height();
- int itemX = item->x();
- int itemY = item->y();
- if (height < itemHeight + itemY)
- height = itemHeight + itemY;
- if (width < itemWidth + itemX)
- width = itemWidth + itemX;
- }
-
- setHeight(height);
- setWidth(width);
-
- mask_ = new int[height * width];
- std::fill(mask_, mask_ + height * width, -1);
-
- for (int i = 0; i < images_.size(); ++i) {
- Item *item = images_[i];
- int itemWidth = item->width();
- int itemHeight = item->height();
- int itemX = item->x();
- int itemY = item->y();
-
- QUrl url = item->property("source").toUrl();
- QImage img(url.path());
- const QRgb* bits = reinterpret_cast<const QRgb*>(img.constBits());
- for (int x = 0; x < itemWidth; ++x) {
- for (int y = 0; y < itemHeight; ++y) {
- if (qAlpha(bits[y * itemWidth + x]) > 128) {
- mask_[(itemY + y) * width + (x + itemX)] = i;
- }
- }
- }
- }
-}
-
-void MaskedContainer::mousePressEvent(MouseEvent *mouse) {
-#if QT_4
- qreal x = mouse->pos().x();
- qreal y = mouse->pos().y();
-#elif QT_5
- int x = mouse->x();
- int y = mouse->y();
-#endif // QT_VERSION
-
- if (width() * y + x > width() * height()) {
- mouse->ignore();
- } else {
- int idx = mask_[indexOfMask(x, y)];
- if (idx >= 0) {
- AttributedMouseEvent ev(images_[idx]);
- emit pressed(&ev);
- grabMouse();
- mouse->accept();
- } else {
- mouse->ignore();
- }
- }
-}
-
-void MaskedContainer::mouseReleaseEvent(MouseEvent *mouse) {
-#if QT_4
- qreal x = mouse->pos().x();
- qreal y = mouse->pos().y();
-#elif QT_5
- int x = mouse->x();
- int y = mouse->y();
-#endif // QT_VERSION
-
- if (width() * y + x > width() * height()) {
- return;
- } else {
- int idx = mask_[indexOfMask(x, y)];
- if (idx >= 0) {
- AttributedMouseEvent ev(images_[idx]);
- emit released(&ev);
- } else {
- emit released(NULL);
- }
- }
- ungrabMouse();
-}
-
-MaskedContainer::~MaskedContainer() {
- delete[] mask_;
-}
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h
deleted file mode 100644
index 30e145aa3..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/masked_container.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * \file masked_container.h
- * \brief MaskedContainer class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_MASKED_CONTAINER_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_MASKED_CONTAINER_H_
-
-#include <vector>
-#include <QtCore/QString>
-
-#include "qt_version.h"
-
-#if QT_4
-# include <QtDeclarative/QDeclarativeItem>
-typedef QDeclarativeItem Item;
-typedef QGraphicsSceneMouseEvent MouseEvent;
-#elif QT_5
-# include <QtQuick/QQuickItem>
-typedef QQuickItem Item;
-typedef QMouseEvent MouseEvent;
-#endif
-
-#include "attributed_mouse_event.h"
-
-class MaskedContainer : public Item {
- Q_OBJECT
- Q_DISABLE_COPY(MaskedContainer)
-
- public:
- explicit MaskedContainer(Item *parent = 0);
- ~MaskedContainer();
-
- signals:
- void pressed(AttributedMouseEvent *attr);
- void released(AttributedMouseEvent *attr);
-
- protected:
- virtual void componentComplete();
- virtual void mousePressEvent(MouseEvent *event);
- virtual void mouseReleaseEvent(MouseEvent *event);
-
- private:
- std::vector<Item*> images_;
- int *mask_;
-
-#if QT_4
- int indexOfMask(qreal x, qreal y) const {
- return static_cast<int>(y * width() + x);
- }
-#elif QT_5
- int indexOfMask(int x, int y) const {
- return y * static_cast<int>(width()) + x;
- }
-#endif // QT_VERSION
-};
-
-QML_DECLARE_TYPE(MaskedContainer)
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_MASKED_CONTAINER_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qmldir b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qmldir
deleted file mode 100644
index a4bae8144..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module com.ford.sdl.hmi.hw_buttons
-plugin HWButtons
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h b/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h
deleted file mode 100644
index 6a277e386..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/hw_buttons/qt_version.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file qt_version.h
- * @brief Defines for check Qt version.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_QT_VERSION_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_QT_VERSION_H_
-
-#include <qglobal.h>
-
-#define QT_4 ((QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)))
-
-#define QT_5 ((QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)))
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_HW_BUTTONS_QT_VERSION_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/CMakeLists.txt
deleted file mode 100644
index 3153aff77..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/CMakeLists.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.11)
-
-set(target QmlLog4cxx)
-set(destination com/ford/sdl/hmi/log4cxx)
-set(install_destination bin/hmi/plugins/${destination})
-set(library_name ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-set(CMAKE_AUTOMOC ON)
-set(SOURCES log4cxx_plugin.cc)
-
-add_library(${target} SHARED ${SOURCES})
-
-if (${qt_version} MATCHES "4.8.5")
- qt4_use_modules(${target} Core Declarative)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/${destination})
-elseif (${qt_version} MATCHES "5.1.0")
- qt5_use_modules(${target} Core Qml)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/${destination})
-endif ()
-
-target_link_libraries(${target} apr-1 aprutil-1 log4cxx)
-
-add_custom_target(copy_library_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/${library_name}
- ${copy_destination}
- DEPENDS ${target}
- COMMENT "Copying library ${library_name}")
-file(COPY qmldir DESTINATION ${copy_destination})
-
-install(TARGETS ${target}
- DESTINATION ${install_destination}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
-)
-install(FILES qmldir DESTINATION ${install_destination})
-
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_custom_target(qmltypes_${target} ALL
- COMMAND ${qmlplugindump_binary} -nonrelocatable com.ford.sdl.hmi.log4cxx 1.0 ${model_dir} > ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes 2>/dev/null
- DEPENDS copy_library_${target}
- )
- add_custom_target(copy_qmltypes_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
- ${copy_destination}
- DEPENDS qmltypes_${target}
- )
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes DESTINATION ${install_destination})
-endif ()
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc
deleted file mode 100644
index 19eec3665..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.cc
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file log4cxx_plugin.cpp
- * @brief Log4cxxPlugin class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "log4cxx_plugin.h"
-
-#include <log4cxx/log4cxx.h>
-#include <log4cxx/propertyconfigurator.h>
-
-log4cxx::LoggerPtr logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("Log4cxxPlugin"));
-
-#if QT_4
-void smartLogger(QtMsgType type, const char *msg) {
- log4cxx::spi::LocationInfo location("", "", -1);
-
- switch (type) {
- case QtDebugMsg:
- (*logger_).debug(msg, location);
- break;
- case QtWarningMsg:
- (*logger_).warn(msg, location);
- break;
- case QtCriticalMsg:
- (*logger_).error(msg, location);
- break;
- case QtFatalMsg:
- (*logger_).fatal(msg, location);
- break;
- default:
- (*logger_).info(msg, location);
- break;
- }
-}
-#elif QT_5
-void smartLogger(QtMsgType type, const QMessageLogContext &context,
- const QString &msg) {
- log4cxx::spi::LocationInfo location(context.file,
- context.function ? context.function : "",
- context.line);
- switch (type) {
- case QtDebugMsg:
- (*logger_).debug(msg.toStdString(), location);
- break;
- case QtWarningMsg:
- (*logger_).warn(msg.toStdString(), location);
- break;
- case QtCriticalMsg:
- (*logger_).error(msg.toStdString(), location);
- break;
- case QtFatalMsg:
- (*logger_).fatal(msg.toStdString(), location);
- break;
- default:
- (*logger_).info(msg.toStdString(), location);
- break;
- }
-}
-#endif // QT_VERSION
-
-void Log4cxxPlugin::registerTypes(const char *uri) {
- log4cxx::PropertyConfigurator::configure("log4cxx.properties");
-
-#if QT_4
- qInstallMsgHandler(smartLogger);
-#elif QT_5
- qInstallMessageHandler(smartLogger);
-#endif // QT_VERSION
-
- // @uri com.ford.sdl.hmi.log4cxx
- qmlRegisterType<Logger>(uri, 1, 0, "Logger");
- // Use standart console API Javascript
- // See Debugging QML Applications in Qt documentation
-}
-
-#if QT_4
-Q_EXPORT_PLUGIN2(QmlLog4cxx, Log4cxxPlugin)
-#endif // QT_4
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h b/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h
deleted file mode 100644
index 00e136cf7..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/log4cxx_plugin.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file log4cxx_plugin.h
- * @brief Log4cxxPlugin class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_LOG4CXX_LOG4CXX_PLUGIN_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_LOG4CXX_LOG4CXX_PLUGIN_H_
-
-#include <qglobal.h>
-
-#define QT_4 ((QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)))
-
-#define QT_5 ((QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)))
-
-#if QT_4
-# include <QtDeclarative/qdeclarative.h>
-# include <QtDeclarative/QDeclarativeExtensionPlugin>
-typedef QDeclarativeExtensionPlugin ExtensionPlugin;
-#elif QT_5
-# include <QtQml/qqml.h>
-# include <QtQml/QQmlExtensionPlugin>
-typedef QQmlExtensionPlugin ExtensionPlugin;
-#endif // QT_VERSION
-
-class Logger : public QObject {
- Q_OBJECT
- Q_DISABLE_COPY(Logger)
-
- public:
- explicit Logger(QObject *parent = 0) : QObject(parent) {}
-};
-
-class Log4cxxPlugin : public ExtensionPlugin {
- Q_OBJECT
-#if QT_5
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-#endif // QT_5
-
- public:
- void registerTypes(const char *uri);
-};
-
-QML_DECLARE_TYPE(Logger)
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_LOG4CXX_LOG4CXX_PLUGIN_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/qmldir b/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/qmldir
deleted file mode 100644
index ddd7bc99a..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/log4cxx/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module com.ford.sdl.hmi.log4cxx
-plugin QmlLog4cxx
-
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/CMakeLists.txt b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/CMakeLists.txt
deleted file mode 100644
index e777e9526..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/CMakeLists.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright (c) 2013, Ford Motor Company
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided with the
-# distribution.
-#
-# Neither the name of the Ford Motor Company nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cmake_minimum_required(VERSION 2.8.11)
-
-set(target NamedPipeNotifier)
-set(destination com/ford/sdl/hmi/named_pipe_notifier)
-set(install_destination bin/hmi/plugins/${destination})
-set(library_name ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-set(CMAKE_AUTOMOC ON)
-set(SOURCES
- named_pipe_notifier.cc
- named_pipe_notifier_plugin.cc
-)
-
-add_library(${target} SHARED ${SOURCES})
-
-if (${qt_version} MATCHES "4.8.5")
- qt4_use_modules(${target} Core Declarative)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt4/${destination})
-elseif (${qt_version} MATCHES "5.1.0")
- qt5_use_modules(${target} Core Qml)
- set(model_dir ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/)
- set(copy_destination ${CMAKE_CURRENT_BINARY_DIR}/../../qml_model_qt5/${destination})
-endif ()
-
-add_custom_target(copy_library_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/${library_name}
- ${copy_destination}
- DEPENDS ${target}
- COMMENT "Copying library ${library_name}")
-file(COPY qmldir DESTINATION ${copy_destination})
-
-install(TARGETS ${target}
- DESTINATION ${install_destination}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE
-)
-install(FILES qmldir DESTINATION ${install_destination})
-
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_custom_target(qmltypes_${target} ALL
- COMMAND ${qmlplugindump_binary} -nonrelocatable com.ford.sdl.hmi.named_pipe_notifier 1.0 ${model_dir} > ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes 2>/dev/null
- DEPENDS copy_library_${target}
- )
- add_custom_target(copy_qmltypes_${target} ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
- ${copy_destination}
- DEPENDS qmltypes_${target}
- )
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes DESTINATION ${install_destination})
-endif ()
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc
deleted file mode 100644
index e231124fe..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * @file named_pipe_notifier.cc
- * @brief NamedPipeNotifier class implementation file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <fcntl.h>
-#include <sys/select.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#include "named_pipe_notifier.h"
-
-void NamedPipeNotifier::run() {
- int fd = ::open(name_.toLocal8Bit().constData(), O_RDONLY);
- if (-1 == fd) { // if open() fails
- if ((errno != ENOENT) // we can only manage lack of pipe
- || (-1 == ::mkfifo(name_.toLocal8Bit().constData(), 0666))
- || (-1 == (fd = ::open(name_.toLocal8Bit().constData(), O_RDONLY)))) {
- emit openFailed();
- return;
- }
- }
- ::fd_set readfds;
- FD_ZERO(&readfds);
- FD_SET(fd, &readfds);
-// this select() is supposed to block till pipe is empty
- if (::select(fd + 1, &readfds, 0, 0, 0) > 0) {
- emit readyRead();
- }
-}
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h
deleted file mode 100644
index 14bacd9b6..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * \file named_pipe_notifier.h
- * \brief NamedPipeNotifier class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_NAMED_PIPE_NOTIFIER_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_NAMED_PIPE_NOTIFIER_H_
-
-#include <QThread>
-
-class NamedPipeNotifier : public QThread {
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE set_name NOTIFY nameChanged)
- QString name_;
-
- public:
- explicit NamedPipeNotifier(QObject* parent = 0) : QThread(parent) {}
-
- const QString& name() const { return name_; }
- void set_name(const QString& name) {
- if (name_ != name) {
- name_ = name;
- emit nameChanged();
- }
- }
-
- protected:
- virtual void run();
-
- signals:
- void nameChanged();
- void readyRead();
- void openFailed();
-};
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_NAMED_PIPE_NOTIFIER_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc
deleted file mode 100644
index a423434c1..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * \file named_pipe_notifier_plugin.cc
- * \brief NamedPipeNotifierPlugin class implementation file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "named_pipe_notifier_plugin.h"
-
-#if QT_4
-# include <QtDeclarative/qdeclarative.h>
-#elif QT_5
-# include <QtQml/qqml.h>
-#endif // QT_VERSION
-
-#include "named_pipe_notifier.h"
-
-void NamedPipeNotifierPlugin::registerTypes(const char* uri) {
- // @uri com.ford.sdl.hmi.named_pipe_notifier
- qmlRegisterType<NamedPipeNotifier>(uri, 1, 0, "NamedPipeNotifier");
-}
-
-#if QT_4
-Q_EXPORT_PLUGIN2(NamedPipeNotifier, NamedPipeNotifierPlugin)
-#endif // QT_4
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h
deleted file mode 100644
index 36513aa93..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/named_pipe_notifier_plugin.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * \file named_pipe_notifier_plugin.h
- * \brief NamedPipeNotifierPlugin class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_NAMED_PIPE_NOTIFIER_PLUGIN_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_NAMED_PIPE_NOTIFIER_PLUGIN_H_
-
-#include "qt_version.h"
-
-#if QT_4
-# include <QtDeclarative/QDeclarativeExtensionPlugin>
-typedef QDeclarativeExtensionPlugin ExtensionPlugin;
-#elif QT_5
-# include <QtQml/QQmlExtensionPlugin>
-typedef QQmlExtensionPlugin ExtensionPlugin;
-#endif // QT_5
-
-class NamedPipeNotifierPlugin : public ExtensionPlugin {
- Q_OBJECT
-
-#if QT_5
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-#endif // QT_5
-
- public:
- void registerTypes(const char* uri);
-};
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_NAMED_PIPE_NOTIFIER_PLUGIN_H_
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qmldir b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qmldir
deleted file mode 100644
index 86ede716e..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qmldir
+++ /dev/null
@@ -1,2 +0,0 @@
-module com.ford.sdl.hmi.named_pipe_notifier
-plugin NamedPipeNotifier
diff --git a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h b/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h
deleted file mode 100644
index 42b4bcb9d..000000000
--- a/SDL_Core/src/components/qt_hmi/qml_plugins/named_pipe_notifier/qt_version.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file qt_version.h
- * @brief Defines for check Qt version.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_QT_VERSION_H_
-#define SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_QT_VERSION_H_
-
-#include <qglobal.h>
-
-#define QT_4 ((QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)))
-
-#define QT_5 ((QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && \
- (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)))
-
-#endif // SRC_COMPONENTS_QT_HMI_QML_PLUGINS_NAMED_PIPE_NOTIFIER_QT_VERSION_H_
-
diff --git a/SDL_Core/src/components/qt_hmi/res/SPT.png b/SDL_Core/src/components/qt_hmi/res/SPT.png
deleted file mode 100644
index efe0b43dc..000000000
--- a/SDL_Core/src/components/qt_hmi/res/SPT.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/album_art.png b/SDL_Core/src/components/qt_hmi/res/album_art.png
deleted file mode 100644
index 900068027..000000000
--- a/SDL_Core/src/components/qt_hmi/res/album_art.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/app_911_assist.png b/SDL_Core/src/components/qt_hmi/res/app_911_assist.png
deleted file mode 100644
index dc7d3c663..000000000
--- a/SDL_Core/src/components/qt_hmi/res/app_911_assist.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/app_vehicle_info.png b/SDL_Core/src/components/qt_hmi/res/app_vehicle_info.png
deleted file mode 100644
index 1542c787d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/app_vehicle_info.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/apps.png b/SDL_Core/src/components/qt_hmi/res/apps.png
deleted file mode 100644
index 48d8284b2..000000000
--- a/SDL_Core/src/components/qt_hmi/res/apps.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/arrow.png b/SDL_Core/src/components/qt_hmi/res/arrow.png
deleted file mode 100644
index 4c215b2bf..000000000
--- a/SDL_Core/src/components/qt_hmi/res/arrow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/blue_ball.png b/SDL_Core/src/components/qt_hmi/res/blue_ball.png
deleted file mode 100644
index d4db3f96a..000000000
--- a/SDL_Core/src/components/qt_hmi/res/blue_ball.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/long_oval_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/long_oval_btn.png
deleted file mode 100644
index 375195bec..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/long_oval_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/long_oval_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/long_oval_pressed_btn.png
deleted file mode 100644
index bd4ba813d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/long_oval_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn.png
deleted file mode 100644
index 6ed0293aa..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn_pressed.png b/SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn_pressed.png
deleted file mode 100644
index 73ee397da..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/longest_oval_btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_bottom.png b/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_bottom.png
deleted file mode 100644
index 4964b4787..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_bottom.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_left.png b/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_left.png
deleted file mode 100644
index 4818162a1..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_left.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_left.png b/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_left.png
deleted file mode 100644
index 29c47e189..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_left.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_right.png b/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_right.png
deleted file mode 100644
index c7d7d53ab..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_pressed_right.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_right.png b/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_right.png
deleted file mode 100644
index d566ac8ca..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_right.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_top.png b/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_top.png
deleted file mode 100644
index 787e0990e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/oval_btn_top.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_next_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_next_btn.png
deleted file mode 100644
index c432068d4..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_next_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_next_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_next_pressed_btn.png
deleted file mode 100644
index aab3df891..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_next_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_pause_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_pause_btn.png
deleted file mode 100644
index a9443feb8..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_pause_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_pause_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_pause_pressed_btn.png
deleted file mode 100644
index 9c409c8f1..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_pause_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_play_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_play_btn.png
deleted file mode 100644
index f185e9446..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_play_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_play_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_play_pressed_btn.png
deleted file mode 100644
index ecbb4f2ef..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_play_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_prev_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_prev_btn.png
deleted file mode 100644
index acc2a71de..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_prev_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/player_prev_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/player_prev_pressed_btn.png
deleted file mode 100644
index c6eefc09c..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/player_prev_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/preset_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/preset_btn.png
deleted file mode 100644
index 58c296a4e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/preset_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/preset_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/preset_pressed_btn.png
deleted file mode 100644
index fd7606fbd..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/preset_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/round_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/round_btn.png
deleted file mode 100644
index 3add8dd21..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/round_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/round_pressed_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/round_pressed_btn.png
deleted file mode 100644
index b0f886342..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/round_pressed_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn.png b/SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn.png
deleted file mode 100644
index 99f5e90c3..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn_pressed.png b/SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn_pressed.png
deleted file mode 100644
index 6b8bc61d8..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/short_oval_btn_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/zoom.png b/SDL_Core/src/components/qt_hmi/res/buttons/zoom.png
deleted file mode 100644
index 0df4d2510..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/zoom.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/buttons/zoom_pressed.png b/SDL_Core/src/components/qt_hmi/res/buttons/zoom_pressed.png
deleted file mode 100644
index c67d2c7c5..000000000
--- a/SDL_Core/src/components/qt_hmi/res/buttons/zoom_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/car.png b/SDL_Core/src/components/qt_hmi/res/car.png
deleted file mode 100644
index 18a21656d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/car.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/change_devices.png b/SDL_Core/src/components/qt_hmi/res/change_devices.png
deleted file mode 100644
index 24a43a0d3..000000000
--- a/SDL_Core/src/components/qt_hmi/res/change_devices.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/AC_off.png b/SDL_Core/src/components/qt_hmi/res/climate/AC_off.png
deleted file mode 100644
index 8554ddfb4..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/AC_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/AC_on.png b/SDL_Core/src/components/qt_hmi/res/climate/AC_on.png
deleted file mode 100644
index c549010d6..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/AC_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/climate_round_off_btn.png b/SDL_Core/src/components/qt_hmi/res/climate/climate_round_off_btn.png
deleted file mode 100644
index 411f00393..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/climate_round_off_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/climate_round_on_btn.png b/SDL_Core/src/components/qt_hmi/res/climate/climate_round_on_btn.png
deleted file mode 100644
index 691f6e3bf..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/climate_round_on_btn.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/defrost_off.png b/SDL_Core/src/components/qt_hmi/res/climate/defrost_off.png
deleted file mode 100644
index 22e384dbc..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/defrost_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/defrost_on.png b/SDL_Core/src/components/qt_hmi/res/climate/defrost_on.png
deleted file mode 100644
index 9b0fc7aa4..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/defrost_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/face_off.png b/SDL_Core/src/components/qt_hmi/res/climate/face_off.png
deleted file mode 100644
index 72448d6aa..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/face_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/face_on.png b/SDL_Core/src/components/qt_hmi/res/climate/face_on.png
deleted file mode 100644
index 4ed608980..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/face_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/feet_off.png b/SDL_Core/src/components/qt_hmi/res/climate/feet_off.png
deleted file mode 100644
index bac7bc9cf..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/feet_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/feet_on.png b/SDL_Core/src/components/qt_hmi/res/climate/feet_on.png
deleted file mode 100644
index 6d7a3b7a1..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/feet_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/headed_dash_off.png b/SDL_Core/src/components/qt_hmi/res/climate/headed_dash_off.png
deleted file mode 100644
index cf5168b55..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/headed_dash_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/headed_dash_on.png b/SDL_Core/src/components/qt_hmi/res/climate/headed_dash_on.png
deleted file mode 100644
index c46b690f7..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/headed_dash_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/heated_seat_off.png b/SDL_Core/src/components/qt_hmi/res/climate/heated_seat_off.png
deleted file mode 100644
index 11a32048c..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/heated_seat_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/heated_seat_on.png b/SDL_Core/src/components/qt_hmi/res/climate/heated_seat_on.png
deleted file mode 100644
index 8211eb79e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/heated_seat_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_off.png b/SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_off.png
deleted file mode 100644
index 5956f5a3d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_on.png b/SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_on.png
deleted file mode 100644
index af3c2598d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/climate/heated_wheel_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton.png
deleted file mode 100644
index fd44c5438..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton_pressed.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton_pressed.png
deleted file mode 100644
index 013672bbf..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/DownButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton.png
deleted file mode 100644
index e65dd5ce0..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton_pressed.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton_pressed.png
deleted file mode 100644
index 8df2e136e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/LeftButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton.png
deleted file mode 100644
index 9e82fe298..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton_pressed.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton_pressed.png
deleted file mode 100644
index 478d9ef7e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/OkButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton.png
deleted file mode 100644
index 24e0f50a8..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton_pressed.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton_pressed.png
deleted file mode 100644
index 9e70d8d72..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/RightButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton.png
deleted file mode 100644
index 3547a7fc7..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton_pressed.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton_pressed.png
deleted file mode 100644
index 2cbcfbe67..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/UpButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/backGroundControllButtons.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/backGroundControllButtons.png
deleted file mode 100644
index 041d49e7e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/backGroundControllButtons.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton.png
deleted file mode 100644
index af09282df..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton_pressed.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton_pressed.png
deleted file mode 100644
index 9206e42a9..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/vrButton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/controlButtons/vrImage.png b/SDL_Core/src/components/qt_hmi/res/controlButtons/vrImage.png
deleted file mode 100644
index 2f6bac2d9..000000000
--- a/SDL_Core/src/components/qt_hmi/res/controlButtons/vrImage.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/find_apps.png b/SDL_Core/src/components/qt_hmi/res/find_apps.png
deleted file mode 100644
index 55a9a2867..000000000
--- a/SDL_Core/src/components/qt_hmi/res/find_apps.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/gear.png b/SDL_Core/src/components/qt_hmi/res/gear.png
deleted file mode 100644
index b1eeba091..000000000
--- a/SDL_Core/src/components/qt_hmi/res/gear.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/hd_logo_off.png b/SDL_Core/src/components/qt_hmi/res/hd_logo_off.png
deleted file mode 100644
index 80c9d58b4..000000000
--- a/SDL_Core/src/components/qt_hmi/res/hd_logo_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/hd_logo_on.png b/SDL_Core/src/components/qt_hmi/res/hd_logo_on.png
deleted file mode 100644
index dfc3d4ccf..000000000
--- a/SDL_Core/src/components/qt_hmi/res/hd_logo_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/initial.wav b/SDL_Core/src/components/qt_hmi/res/initial.wav
deleted file mode 100644
index 61a549fbc..000000000
--- a/SDL_Core/src/components/qt_hmi/res/initial.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/install_apps.png b/SDL_Core/src/components/qt_hmi/res/install_apps.png
deleted file mode 100644
index dc33c0965..000000000
--- a/SDL_Core/src/components/qt_hmi/res/install_apps.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/compass.png b/SDL_Core/src/components/qt_hmi/res/nav/compass.png
deleted file mode 100644
index 15c73ee87..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/compass.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/current_street.png b/SDL_Core/src/components/qt_hmi/res/nav/current_street.png
deleted file mode 100644
index e289c054f..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/current_street.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/delete_icon.png b/SDL_Core/src/components/qt_hmi/res/nav/delete_icon.png
deleted file mode 100644
index 826b5faac..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/delete_icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/delete_icon_black.png b/SDL_Core/src/components/qt_hmi/res/nav/delete_icon_black.png
deleted file mode 100644
index 56e35c759..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/delete_icon_black.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/dest_icon.png b/SDL_Core/src/components/qt_hmi/res/nav/dest_icon.png
deleted file mode 100644
index dadcfe25c..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/dest_icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/dest_icon_black.png b/SDL_Core/src/components/qt_hmi/res/nav/dest_icon_black.png
deleted file mode 100644
index 75c99bc4a..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/dest_icon_black.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/map.png b/SDL_Core/src/components/qt_hmi/res/nav/map.png
deleted file mode 100644
index 328bca44c..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/map.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/mute_off.png b/SDL_Core/src/components/qt_hmi/res/nav/mute_off.png
deleted file mode 100644
index f7306d96a..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/mute_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/mute_on.png b/SDL_Core/src/components/qt_hmi/res/nav/mute_on.png
deleted file mode 100644
index de2a2bb5b..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/mute_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/options.png b/SDL_Core/src/components/qt_hmi/res/nav/options.png
deleted file mode 100644
index 46887f106..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/options.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/options_in_active.png b/SDL_Core/src/components/qt_hmi/res/nav/options_in_active.png
deleted file mode 100644
index 601b242bb..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/options_in_active.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/options_pressed.png b/SDL_Core/src/components/qt_hmi/res/nav/options_pressed.png
deleted file mode 100644
index 42c352a7e..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/options_pressed.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/nav/turnArrow.png b/SDL_Core/src/components/qt_hmi/res/nav/turnArrow.png
deleted file mode 100644
index f37731f5a..000000000
--- a/SDL_Core/src/components/qt_hmi/res/nav/turnArrow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/notes.png b/SDL_Core/src/components/qt_hmi/res/notes.png
deleted file mode 100644
index 8b4a92fff..000000000
--- a/SDL_Core/src/components/qt_hmi/res/notes.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/contacts.png b/SDL_Core/src/components/qt_hmi/res/phone/contacts.png
deleted file mode 100644
index a16d518ba..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/contacts.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/dnd_off.png b/SDL_Core/src/components/qt_hmi/res/phone/dnd_off.png
deleted file mode 100644
index 04bb2476c..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/dnd_off.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/dnd_on.png b/SDL_Core/src/components/qt_hmi/res/phone/dnd_on.png
deleted file mode 100644
index 56b9fe706..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/dnd_on.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/keypad.png b/SDL_Core/src/components/qt_hmi/res/phone/keypad.png
deleted file mode 100644
index 1792c8fac..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/keypad.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/messages.png b/SDL_Core/src/components/qt_hmi/res/phone/messages.png
deleted file mode 100644
index b5cbb8e8a..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/messages.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/more.png b/SDL_Core/src/components/qt_hmi/res/phone/more.png
deleted file mode 100644
index 908ebf654..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/more.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/phone.png b/SDL_Core/src/components/qt_hmi/res/phone/phone.png
deleted file mode 100644
index 346f36cc3..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/phone.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/recent.png b/SDL_Core/src/components/qt_hmi/res/phone/recent.png
deleted file mode 100644
index db54c2f16..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/recent.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/phone/texts.png b/SDL_Core/src/components/qt_hmi/res/phone/texts.png
deleted file mode 100644
index 31c024b1d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/phone/texts.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/snow.png b/SDL_Core/src/components/qt_hmi/res/snow.png
deleted file mode 100644
index 54756bb2f..000000000
--- a/SDL_Core/src/components/qt_hmi/res/snow.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/Ambient Lighti Icon.png b/SDL_Core/src/components/qt_hmi/res/vehicle/Ambient Lighti Icon.png
deleted file mode 100644
index 9b65fd5ce..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/Ambient Lighti Icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/EV Icon.png b/SDL_Core/src/components/qt_hmi/res/vehicle/EV Icon.png
deleted file mode 100644
index 0607fb864..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/EV Icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/MCS Icon.png b/SDL_Core/src/components/qt_hmi/res/vehicle/MCS Icon.png
deleted file mode 100644
index 1756d5fdf..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/MCS Icon.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/SYNC Services.png b/SDL_Core/src/components/qt_hmi/res/vehicle/SYNC Services.png
deleted file mode 100644
index 361e00fd7..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/SYNC Services.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/cal.png b/SDL_Core/src/components/qt_hmi/res/vehicle/cal.png
deleted file mode 100644
index 94d5d44b5..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/cal.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/folders.png b/SDL_Core/src/components/qt_hmi/res/vehicle/folders.png
deleted file mode 100644
index c5985043d..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/folders.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/key_car.png b/SDL_Core/src/components/qt_hmi/res/vehicle/key_car.png
deleted file mode 100644
index a8e5d9d66..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/key_car.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/vehicle/sun.png b/SDL_Core/src/components/qt_hmi/res/vehicle/sun.png
deleted file mode 100644
index 6424d9d21..000000000
--- a/SDL_Core/src/components/qt_hmi/res/vehicle/sun.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/warning.png b/SDL_Core/src/components/qt_hmi/res/warning.png
deleted file mode 100644
index c91cd31d3..000000000
--- a/SDL_Core/src/components/qt_hmi/res/warning.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/res/white_ball.png b/SDL_Core/src/components/qt_hmi/res/white_ball.png
deleted file mode 100644
index 952714ebe..000000000
--- a/SDL_Core/src/components/qt_hmi/res/white_ball.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/components/request_watchdog/CMakeLists.txt b/SDL_Core/src/components/request_watchdog/CMakeLists.txt
deleted file mode 100644
index fe885605b..000000000
--- a/SDL_Core/src/components/request_watchdog/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-include_directories (
- ./include
- ../utils/include/
- ../config_profile/include/
- ../../thirdPartyLibs/MessageBroker/include/
-)
-
-set (SOURCES
- ./src/watchdog.cc
- ./src/request_watchdog.cc
- ./src/request_info.cc
-)
-
-add_library("RequestWatchdog" ${SOURCES})
-target_link_libraries ("RequestWatchdog" Utils)
diff --git a/SDL_Core/src/components/request_watchdog/include/request_watchdog/request_info.h b/SDL_Core/src/components/request_watchdog/include/request_watchdog/request_info.h
deleted file mode 100644
index 48d0d4b6e..000000000
--- a/SDL_Core/src/components/request_watchdog/include/request_watchdog/request_info.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
-* \file request_info.h
-* \brief request information structure header file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_REQUEST_INFO_H_
-#define SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_REQUEST_INFO_H_
-
-#include <stdint.h>
-
-namespace request_watchdog {
-
-struct RequestInfo {
- RequestInfo(const int32_t& function_id, const int32_t& connection_id,
- const int32_t& correlation_id, const int32_t& custom_timeout,
- const int32_t& app_hmi_level);
-
- int32_t functionID_;
- int32_t connectionID_;
- int32_t correlationID_;
- int32_t customTimeout_;
- int32_t app_hmi_level_;
- bool delayed_delete_;
-
- friend bool operator==(const RequestInfo& left, const RequestInfo& right);
-
- friend bool operator<(const RequestInfo& left, const RequestInfo& right);
-};
-
-} // namespace request_watchdog
-
-#endif // SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_REQUEST_INFO_H_
diff --git a/SDL_Core/src/components/request_watchdog/include/request_watchdog/request_watchdog.h b/SDL_Core/src/components/request_watchdog/include/request_watchdog/request_watchdog.h
deleted file mode 100644
index 0310f84c5..000000000
--- a/SDL_Core/src/components/request_watchdog/include/request_watchdog/request_watchdog.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/**
-* \file request_watchdog.h
-* \brief RequestWatchdog class header file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_REQUEST_WATCHDOG_H_
-#define SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_REQUEST_WATCHDOG_H_
-
-#include <list>
-#include <map>
-#include "request_watchdog/watchdog.h"
-#include "utils/logger.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/date_time.h"
-#include "utils/lock.h"
-
-namespace request_watchdog {
-
-class RequestWatchdog : public Watchdog {
- public:
-
- //static Watchdog* instance();
-
- virtual void AddListener(WatchdogSubscriber* subscriber);
- virtual void RemoveListener(WatchdogSubscriber* subscriber);
- virtual void removeAllListeners();
-
- /*
- * @brief Adds request
- *
- * @brief requestInfo Request info (connection key, request correlation id,
- * request id, watchdog timeout for request, current application hmi level
- */
- virtual void addRequest(RequestInfo* requestInfo);
-
- /*
- * @brief Removes corresponding request
- *
- * @brief connection_key Application connection key
- * @brief correlation_id Mobile request correlation ID
- */
- virtual void removeRequest(int32_t connection_key,
- int32_t correlation_id);
-
- /*
- * @brief Update request watchdog timeout
- *
- * @brief connection_key Application connection key
- * @brief correlation_id Mobile request correlation ID
- * @brief new_timeout_value New value of request watchdog timeout
- */
- virtual void updateRequestTimeout(int32_t connection_key,
- int32_t correlation_id,
- int32_t new_timeout_value);
-
- /*
- * @brief Check if amount of requests during time scale for application
- * doesn't exceed limit.
- *
- * @brief connection_key Application ID
- * @brief app_time_scale Configured time scale for application
- * @brief max_request_per_time_scale Configured max request amount for
- * application time scale
- *
- * @return TRUE if amount of request doesn't exceed limit, otherwise FALSE
- */
- virtual bool checkTimeScaleMaxRequest(
- const int32_t& connection_key,
- const uint32_t& app_time_scale,
- const uint32_t& max_request_per_time_scale);
-
- /*
- * @brief Check if amount of requests during time scale for application in
- * specified hmi level doesn't exceed limit.
- *
- * @brief hmi_level Application hmi level(NONE)
- * @brief connection_key Application ID
- * @brief app_time_scale Configured time scale for application
- * @brief max_request_per_time_scale Configured max request amount for
- * application time scale
- *
- * @return TRUE if amount of request doesn't exceed limit, otherwise FALSE
- */
- virtual bool checkHMILevelTimeScaleMaxRequest(
- const int32_t& hmi_level,
- const int32_t& connection_key,
- const uint32_t& app_time_scale,
- const uint32_t& max_request_per_time_scale);
-
- /*
- * @brief Removes all requests
- */
- virtual void removeAllRequests();
-
- virtual int32_t getRegesteredRequestsNumber();
-
- ~RequestWatchdog();
-
- RequestWatchdog();
-
- private:
-
- void notifySubscribers(const RequestInfo& requestInfo);
-
- void startDispatcherThreadIfNeeded();
-
- void stopDispatcherThreadIfNeeded();
-
- friend class QueueDispatcherThreadDelegate;
-
- class QueueDispatcherThreadDelegate : public threads::ThreadDelegate {
- public:
- explicit QueueDispatcherThreadDelegate(RequestWatchdog *inRequestWatchdog);
-
- void threadMain();
-
- virtual bool exitThreadMain();
-
- private:
- volatile bool stop_flag_;
- RequestWatchdog* requestWatchdog_;
- DISALLOW_COPY_AND_ASSIGN(QueueDispatcherThreadDelegate);
- };
-
- /*
- * @brief Structure used in std algorithms to determine amount of request
- * during time scale
- */
- struct TimeScale {
- explicit TimeScale(const TimevalStruct& start, const TimevalStruct& end,
- const int32_t& connection_key)
- : start_(start),
- end_(end),
- connection_key_(connection_key) {};
-
- bool operator()(std::pair<RequestInfo*, TimevalStruct> mapEntry) {
- bool result = false;
- if (mapEntry.first->connectionID_ == connection_key_) {
- if (mapEntry.second.tv_sec >= start_.tv_sec &&
- mapEntry.second.tv_sec <= end_.tv_sec) {
- result = true;
- }
- }
- return result;
- };
-
- TimevalStruct start_;
- TimevalStruct end_;
- int32_t connection_key_;
- };
-
- /*
- * @brief Structure used in std algorithms to determine amount of request
- * during time scale for application in defined hmi level
- */
- struct HMILevelTimeScale {
- explicit HMILevelTimeScale(
- const TimevalStruct& start, const TimevalStruct& end,
- const int32_t& connection_key, const int32_t& hmi_level)
- : start_(start),
- end_(end),
- connection_key_(connection_key),
- hmi_level_(hmi_level) {};
-
- bool operator()(std::pair<RequestInfo*, TimevalStruct> mapEntry) {
- bool result = false;
- if (mapEntry.first->connectionID_ == connection_key_ &&
- mapEntry.first->app_hmi_level_ == hmi_level_) {
- if (mapEntry.second.tv_sec >= start_.tv_sec &&
- mapEntry.second.tv_sec <= end_.tv_sec) {
- result = true;
- }
- }
- return result;
- };
-
- TimevalStruct start_;
- TimevalStruct end_;
- int32_t connection_key_;
- int32_t hmi_level_;
- };
-
- static const int32_t DEFAULT_CYCLE_TIMEOUT = 250000;
- static log4cxx::LoggerPtr logger_;
- std::list<WatchdogSubscriber*> subscribers_;
- sync_primitives::Lock subscribersLock_;
- std::map<RequestInfo*, TimevalStruct> requests_;
- sync_primitives::Lock requestsLock_;
- threads::Thread queueDispatcherThread;
-
- DISALLOW_COPY_AND_ASSIGN(RequestWatchdog);
-};
-
-} // namespace request_watchdog
-
-#endif // SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_REQUEST_WATCHDOG_H_
diff --git a/SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog.h b/SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog.h
deleted file mode 100644
index c4ad65853..000000000
--- a/SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
-* \file watchdog.h
-* \brief Watchdog interface header file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_WATCHDOG_H_
-#define SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_WATCHDOG_H_
-
-#include <stdint.h>
-#include "request_watchdog/watchdog_subscriber.h"
-#include "request_watchdog/request_info.h"
-
-namespace request_watchdog {
-
-class Watchdog {
- public:
-
- /*
- * @brief Default constructor
- */
- Watchdog();
-
- /*
- * @brief Destructor
- */
- virtual ~Watchdog();
-
- virtual void AddListener(WatchdogSubscriber* subscriber) = 0;
- virtual void RemoveListener(WatchdogSubscriber* listener) = 0;
- virtual void removeAllListeners() = 0;
-
- /*
- * @brief Adds request
- *
- * @brief requestInfo Request info (connection key, request correlation id,
- * request id, watchdog timeout for request, current application hmi level
- */
- virtual void addRequest(RequestInfo* requestInfo) = 0;
-
- /*
- * @brief Removes corresponding request
- *
- * @brief connection_key Application connection key
- * @brief correlation_id Mobile request correlation ID
- */
- virtual void removeRequest(int32_t connection_key,
- int32_t correlation_id) = 0;
-
- /*
- * @brief Update request watchdog timeout
- *
- * @brief connection_key Application connection key
- * @brief correlation_id Mobile request correlation ID
- * @brief new_timeout_value New value of request watchdog timeout
- */
- virtual void updateRequestTimeout(int32_t connection_key,
- int32_t correlation_id,
- int32_t new_timeout_value) = 0;
-
- /*
- * @brief Check if amount of requests during time scale for application
- * doesn't exceed limit.
- *
- * @brief connection_key Application ID
- * @brief app_time_scale Configured time scale for application
- * @brief max_request_per_time_scale Configured max request amount for
- * application time scale
- *
- * @return TRUE if amount of request doesn't exceed limit, otherwise FALSE
- */
- virtual bool checkTimeScaleMaxRequest(
- const int32_t& connection_key,
- const uint32_t& app_time_scale,
- const uint32_t& max_request_per_time_scale) = 0;
-
- /*
- * @brief Check if amount of requests during time scale for application in
- * specified hmi level doesn't exceed limit.
- *
- * @brief hmi_level Application hmi level(NONE)
- * @brief connection_key Application ID
- * @brief app_time_scale Configured time scale for application
- * @brief max_request_per_time_scale Configured max request amount for
- * application time scale
- *
- * @return TRUE if amount of request doesn't exceed limit, otherwise FALSE
- */
- virtual bool checkHMILevelTimeScaleMaxRequest(
- const int32_t& hmi_level,
- const int32_t& connection_key,
- const uint32_t& app_time_scale,
- const uint32_t& max_request_per_time_scale) = 0;
-
- /*
- * @brief Removes all requests
- */
- virtual void removeAllRequests() = 0;
-
- virtual int32_t getRegesteredRequestsNumber() = 0;
-};
-
-} // namespace request_watchdog
-
-#endif // SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_WATCHDOG_H_
diff --git a/SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog_subscriber.h b/SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog_subscriber.h
deleted file mode 100644
index 26cb27204..000000000
--- a/SDL_Core/src/components/request_watchdog/include/request_watchdog/watchdog_subscriber.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
-* \file watchdog_subscriber.h
-* \brief watchdog subscriber interface header file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_WATCHDOG_SUBSCRIBER_H_
-#define SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_WATCHDOG_SUBSCRIBER_H_
-
-#include "request_watchdog/request_info.h"
-
-namespace request_watchdog {
-
-class WatchdogSubscriber {
- public:
- /*
- * When receiving this notification subscriber should remove expired entry
- * itself using Watchdog::removeRequest(int32_t connection_key,
- int32_t correlation_id)
- */
- virtual void onTimeoutExpired(const RequestInfo& info) = 0;
-
- virtual ~WatchdogSubscriber() {
- }
-};
-
-} // namespace request_watchdog
-
-#endif // SRC_COMPONENTS_REQUEST_WATCHDOG_INCLUDE_REQUEST_WATCHDOG_WATCHDOG_SUBSCRIBER_H_
diff --git a/SDL_Core/src/components/request_watchdog/src/request_info.cc b/SDL_Core/src/components/request_watchdog/src/request_info.cc
deleted file mode 100644
index e124d3617..000000000
--- a/SDL_Core/src/components/request_watchdog/src/request_info.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
-* \file request_info.h
-* \brief request information structure source file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "request_watchdog/request_info.h"
-
-namespace request_watchdog {
-
-RequestInfo::RequestInfo(const int32_t& function_id, const int32_t& connection_id,
- const int32_t& correlation_id, const int32_t& custom_timeout,
- const int32_t& app_hmi_level)
- : functionID_(function_id),
- connectionID_(connection_id),
- correlationID_(correlation_id),
- customTimeout_(custom_timeout),
- app_hmi_level_(app_hmi_level),
- delayed_delete_(false)
-{}
-
-bool operator==(const RequestInfo& left, const RequestInfo& right) {
- return left.connectionID_ == right.connectionID_ &&
- left.correlationID_ == right.correlationID_ ;
-}
-
-bool operator<(const RequestInfo& left, const RequestInfo& right) {
- if (left.connectionID_ == right.connectionID_) {
- return left.correlationID_ < right.correlationID_;
- } else {
- return left.connectionID_ < right.connectionID_;
- }
-}
-
-} // namespace request_watchdog
diff --git a/SDL_Core/src/components/request_watchdog/src/request_watchdog.cc b/SDL_Core/src/components/request_watchdog/src/request_watchdog.cc
deleted file mode 100644
index aafbdf3ee..000000000
--- a/SDL_Core/src/components/request_watchdog/src/request_watchdog.cc
+++ /dev/null
@@ -1,371 +0,0 @@
-/**
-* \file request_watchdog.cc
-* \brief RequetWatchdog class source file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <unistd.h>
-#include <iterator>
-#include <vector>
-#include <algorithm>
-#include <functional>
-#include <map>
-#include "request_watchdog/request_watchdog.h"
-
-namespace request_watchdog {
-using namespace sync_primitives;
-
-const int32_t RequestWatchdog::DEFAULT_CYCLE_TIMEOUT;
-
-log4cxx::LoggerPtr RequestWatchdog::logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("RequestWatchdog"));
-/*
-Watchdog* RequestWatchdog::instance() {
- static RequestWatchdog instnc;
- return &instnc;
-}
-*/
-RequestWatchdog::RequestWatchdog()
- : queueDispatcherThread("RequestQueueThread",
- new QueueDispatcherThreadDelegate(this)) {
- LOG4CXX_TRACE_ENTER(logger_);
- queueDispatcherThread.start();
-}
-
-RequestWatchdog::~RequestWatchdog() {
- //printf("\n\n\n after begin \n\n\n");
- LOG4CXX_INFO(logger_, "RequestWatchdog destructor.");
- stopDispatcherThreadIfNeeded();
- //printf("\n\n\n after join \n\n\n");
-}
-
-void RequestWatchdog::AddListener(WatchdogSubscriber* subscriber) {
- LOG4CXX_TRACE_ENTER(logger_);
- {
- AutoLock auto_lock(subscribersLock_);
-
- subscribers_.push_back(subscriber);
-
- LOG4CXX_INFO(logger_, "Subscriber " << subscriber << " was added.");
- }
-}
-
-void RequestWatchdog::RemoveListener(WatchdogSubscriber* subscriber) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- AutoLock auto_lock(subscribersLock_);
-
- subscribers_.remove(subscriber);
-
- LOG4CXX_INFO(logger_, "Subscriber " << subscriber << " was removed.");
- }
-}
-
-void RequestWatchdog::removeAllListeners() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- AutoLock auto_lock(subscribersLock_);
- subscribers_.clear();
- }
-
- queueDispatcherThread.stop();
-}
-
-void RequestWatchdog::notifySubscribers(const RequestInfo& requestInfo) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- AutoLock auto_lock(subscribersLock_);
- std::list<WatchdogSubscriber*>::iterator i = subscribers_.begin();
-
- while (i != subscribers_.end()) {
- (*i)->onTimeoutExpired(requestInfo);
- i++;
- }
- }
-}
-
-void RequestWatchdog::addRequest(RequestInfo* requestInfo) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- AutoLock auto_lock(requestsLock_);
- requests_.insert(std::pair<RequestInfo*, TimevalStruct>(requestInfo,
- date_time::DateTime::getCurrentTime()));
-
- LOG4CXX_INFO(logger_, "Add request "
- << "\n ConnectionID : " << requestInfo->connectionID_
- << "\n CorrelationID : " << requestInfo->correlationID_
- << "\n FunctionID : " << requestInfo->functionID_
- << "\n CustomTimeOut : " << requestInfo->customTimeout_
- << "\n");
- }
-}
-
-void RequestWatchdog::removeRequest(int32_t connection_key,
- int32_t correlation_id) {
- LOG4CXX_TRACE_ENTER(logger_);
- {
- AutoLock auto_lock(requestsLock_);
- for (std::map<RequestInfo*, TimevalStruct>::iterator it =
- requests_.begin();
- requests_.end() != it;
- ++it) {
- if (it->first->connectionID_ == connection_key
- && it->first->correlationID_ == correlation_id) {
- LOG4CXX_INFO(logger_, "Delete request "
- << "\n ConnectionID : " << it->first->connectionID_
- << "\n CorrelationID : " << it->first->correlationID_
- << "\n FunctionID : " << it->first->functionID_
- << "\n CustomTimeOut : " << it->first->customTimeout_
- << "\n");
- if (!it->first->delayed_delete_) {
- delete it->first;
- requests_.erase(it);
- }
- break;
- }
- }
- }
-}
-
-void RequestWatchdog::updateRequestTimeout(int32_t connection_key,
- int32_t correlation_id,
- int32_t new_timeout_value) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- AutoLock auto_lock(requestsLock_);
-
- for (std::map<RequestInfo*, TimevalStruct>::iterator it =
- requests_.begin();
- requests_.end() != it;
- ++it) {
- if (it->first->connectionID_ == connection_key
- && it->first->correlationID_ == correlation_id) {
- LOG4CXX_INFO(logger_, "Update request's expiration timeout "
- << "\n ConnectionID : " << it->first->connectionID_
- << "\n CorrelationID : " << it->first->correlationID_
- << "\n FunctionID : " << it->first->functionID_
- << "\n CustomTimeOut : " << it->first->customTimeout_
- << "\n");
- it->first->customTimeout_ = new_timeout_value;
- it->second = date_time::DateTime::getCurrentTime();
- it->first->delayed_delete_ = false;
- break;
- }
- }
-
- }
-}
-
-bool RequestWatchdog::checkTimeScaleMaxRequest(
- const int32_t& connection_key,
- const uint32_t& app_time_scale,
- const uint32_t& max_request_per_time_scale) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- bool result = true;
- {
- AutoLock auto_lock(requestsLock_);
- TimevalStruct end = date_time::DateTime::getCurrentTime();
- TimevalStruct start;
- start.tv_sec = end.tv_sec - app_time_scale;
-
- TimeScale scale(start, end, connection_key);
- int32_t count = 0;
-
- count = count_if (requests_.begin(), requests_.end(), scale);
-
- if (count == max_request_per_time_scale ) {
- LOG4CXX_ERROR(logger_, "Requests count " << count <<
- " exceed application limit" << max_request_per_time_scale);
- result = false;
- }
-
- }
-
- return result;
-}
-
-bool RequestWatchdog::checkHMILevelTimeScaleMaxRequest(
- const int32_t& hmi_level,
- const int32_t& connection_key,
- const uint32_t& app_time_scale,
- const uint32_t& max_request_per_time_scale) {
- LOG4CXX_TRACE_ENTER(logger_);
-
- bool result = true;
- {
- AutoLock auto_lock(requestsLock_);
- TimevalStruct end = date_time::DateTime::getCurrentTime();
- TimevalStruct start;
- start.tv_sec = end.tv_sec - app_time_scale;
-
- HMILevelTimeScale scale(start, end, connection_key, hmi_level);
- int32_t count = 0;
-
- count = count_if (requests_.begin(), requests_.end(), scale);
-
- if (count == max_request_per_time_scale ) {
- LOG4CXX_ERROR(logger_, "Requests count " << count <<
- " exceed application limit" << max_request_per_time_scale
- << " in hmi level " << hmi_level);
- result = false;
- }
-
- }
-
- return result;
-}
-
-void RequestWatchdog::removeAllRequests() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- {
- AutoLock auto_lock(requestsLock_);
- for (std::map<RequestInfo*, TimevalStruct>::iterator it = requests_.begin();
- requests_.end() != it; ++it) {
- delete it->first;
- }
- requests_.clear();
- }
- queueDispatcherThread.stop();
-}
-
-int32_t RequestWatchdog::getRegesteredRequestsNumber() {
- LOG4CXX_TRACE_ENTER(logger_);
- {
- AutoLock auto_lock(requestsLock_);
- return requests_.size();
- }
-}
-
-void RequestWatchdog::startDispatcherThreadIfNeeded() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- if (!requests_.empty() && !subscribers_.empty()) {
- queueDispatcherThread.start();
- }
-}
-
-void RequestWatchdog::stopDispatcherThreadIfNeeded() {
- LOG4CXX_INFO(logger_, "Stop Watchdog thread.");
- queueDispatcherThread.stop();
-}
-
-RequestWatchdog::QueueDispatcherThreadDelegate::QueueDispatcherThreadDelegate(RequestWatchdog* inRequestWatchdog)
- : threads::ThreadDelegate()
- , stop_flag_(false)
- ,requestWatchdog_(inRequestWatchdog)
-{
-}
-
-void RequestWatchdog::QueueDispatcherThreadDelegate::threadMain() {
- LOG4CXX_TRACE_ENTER(logger_);
- std::map<RequestInfo*, TimevalStruct>::iterator it;
- std::map<RequestInfo*, TimevalStruct>::iterator it_temp;
-
- int32_t cycleSleepInterval = DEFAULT_CYCLE_TIMEOUT;
-
- //RequestWatchdog* instnc = static_cast<RequestWatchdog*>(
- // RequestWatchdog::instance());
- if (!requestWatchdog_) {
- LOG4CXX_INFO(logger_, "Cannot get instance of RequestWatchdog.");
- return;
- }
-
- while (!stop_flag_) {
- usleep(cycleSleepInterval);
-
- {
- AutoLock auto_lock(requestWatchdog_->requestsLock_);
-
- it = requestWatchdog_->requests_.begin();
-
- while (it != requestWatchdog_->requests_.end()) {
- if (it->first->delayed_delete_) {
- if (requestWatchdog_->requests_.begin() == it) {
- delete it->first;
- requestWatchdog_->requests_.erase(it);
- it = requestWatchdog_->requests_.begin();
- } else {
- it_temp = --it;
- delete(++it)->first;
- requestWatchdog_->requests_.erase(it);
- it = ++it_temp;
- }
- continue;
- }
-/* LOG4CXX_INFO(logger_, "Checking timeout for the following request :"
- << "\n ConnectionID : " << (*it).first->connectionID_
- << "\n CorrelationID : " << (*it).first->correlationID_
- << "\n FunctionID : " << (*it).first->functionID_
- << "\n CustomTimeOut : " << (*it).first->customTimeout_
- << "\n");*/
-
- // hmi timeout delay
- int32_t const khmi_delay = 1000;
- if ((*it).first->customTimeout_ + khmi_delay <
- date_time::DateTime::calculateTimeSpan((*it).second)) {
- // Request is expired - notify all subscribers and remove request
-
- it->first->delayed_delete_ = true;
-
- LOG4CXX_INFO(logger_, "Timeout had expired for the following request :"
- << "\n ConnectionID : " << (*it).first->connectionID_
- << "\n CorrelationID : " << (*it).first->correlationID_
- << "\n FunctionID : " << (*it).first->functionID_
- << "\n CustomTimeOut : " << (*it).first->customTimeout_
- << "\n");
-
- {
- AutoUnlock auto_unlock(auto_lock);
- requestWatchdog_->notifySubscribers(*(it->first));
- }
-
- }
- it++;
- }
- }
-
- }
-}
-
-bool RequestWatchdog::QueueDispatcherThreadDelegate::exitThreadMain() {
- stop_flag_ = true;
- return true;
-}
-
-} // namespace request_watchdog
diff --git a/SDL_Core/src/components/request_watchdog/src/watchdog.cc b/SDL_Core/src/components/request_watchdog/src/watchdog.cc
deleted file mode 100644
index f76bb9ae2..000000000
--- a/SDL_Core/src/components/request_watchdog/src/watchdog.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
-* \file request_info.h
-* \brief request information structure source file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "request_watchdog/watchdog.h"
-
-namespace request_watchdog {
-
-Watchdog::Watchdog() {
-
-}
-
-Watchdog::~Watchdog() {
-
-}
-
-} // namespace request_watchdog
diff --git a/SDL_Core/src/components/resumption/CMakeLists.txt b/SDL_Core/src/components/resumption/CMakeLists.txt
deleted file mode 100644
index 28415b05c..000000000
--- a/SDL_Core/src/components/resumption/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-include_directories (
- ./include
- ../utils/include/
- ${CMAKE_SOURCE_DIR}/src/thirdPartyLibs/jsoncpp/include
-)
-
-set (SOURCES
- ./src/last_state.cc
-)
-
-add_library("Resumption" ${SOURCES})
diff --git a/SDL_Core/src/components/resumption/include/resumption/last_state.h b/SDL_Core/src/components/resumption/include/resumption/last_state.h
deleted file mode 100644
index 684cf4e99..000000000
--- a/SDL_Core/src/components/resumption/include/resumption/last_state.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_RESUMPTION_INCLUDE_RESUMPTION_LAST_STATE_H_
-#define SRC_COMPONENTS_RESUMPTION_INCLUDE_RESUMPTION_LAST_STATE_H_
-
-#include <string>
-
-#include "utils/macro.h"
-#include "utils/dict.h"
-#include "utils/singleton.h"
-#include "json/json.h"
-
-namespace resumption {
-
-class LastState : public utils::Singleton<LastState> {
- public:
-/**
- * @brief Typedef for string-driven dictionary
- */
- typedef utils::Dictionary<std::string, std::string> Dictionary;
-/**
- * @brief public dictionary
- */
- Dictionary dictionary;
-
- /**
- * @brief Convert utils::Dictionary<std::string, std::string> to Json
- * @param dict - input dictionary
- * @return created Json value
- */
- static Json::Value toJson(const Dictionary& dict);
-
- /**
- * @brief Convert Json to utils::Dictionary<std::string, std::string>
- * @param json_val - Json Kson
- * @return created Dictionary
- */
- static Dictionary fromJson(const Json::Value& json_val);
-
- private:
-
- /**
- * @brief File to save Dictionary
- */
- static const std::string filename;
-
- /**
- * @brief Saving dictionary to filesystem as Json
- */
- void SaveToFileSystem();
-
- /**
- * @brief Load dictionary from filesystem as Json
- */
- void LoadFromFileSystem();
-
- /**
- * @brief Private default constructor
- */
- LastState();
- ~LastState();
-
-
- DISALLOW_COPY_AND_ASSIGN(LastState);
-
- FRIEND_BASE_SINGLETON_CLASS(LastState);
-};
-
-} // namespace resumption
-
-#endif // SRC_COMPONENTS_RESUMPTION_INCLUDE_RESUMPTION_LAST_STATE_H_
diff --git a/SDL_Core/src/components/resumption/src/last_state.cc b/SDL_Core/src/components/resumption/src/last_state.cc
deleted file mode 100644
index 42383f1c8..000000000
--- a/SDL_Core/src/components/resumption/src/last_state.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "resumption/last_state.h"
-#include "utils/file_system.h"
-
-namespace resumption {
-
-
-Json::Value LastState::toJson(const Dictionary& dict) {
- Json::Value val;
- Dictionary::const_iterator it;
- Dictionary::rec_const_iterator rec_it;
-
- it = dict.begin();
- rec_it = dict.rec_begin();
-
- for ( ; rec_it != dict.rec_end() ;++rec_it) {
- std::string key = rec_it->first;
- std::string value = rec_it->second;
- val[key] = value;
- }
- for ( ; it != dict.end() ;++it) {
- std::string key = it->first;
- const Dictionary& value = it->second;
- val[key] = toJson(value);
- }
-
- return val;
-}
-
-LastState::Dictionary LastState::fromJson(const Json::Value& json_val) {
- Dictionary result;
-
- Json::Value::Members members = json_val.getMemberNames();
- Json::Value::Members::const_iterator it = members.begin();
- for ( ; it != members.end(); ++it) {
- std::string key = (*it);
- const Json::Value& value = json_val[key];
- if (value.isString()) {
- result.AddItem(key,value.asString());
- } else if(value.isObject()) {
- Dictionary sub_item = fromJson(value);
- result.AddSubitem(key, sub_item);
- } else {
- NOTREACHED();
- }
- }
-
- return result;
-}
-
-void LastState::SaveToFileSystem() {
- const Json::Value& val = toJson(dictionary);
- const std::string& str = val.toStyledString();
- const std::vector<uint8_t> char_vector_pdata(
- str.begin(), str.end());
- DCHECK(file_system::Write(filename, char_vector_pdata));
-}
-
-void LastState::LoadFromFileSystem() {
- std::string buffer;
- bool result = file_system::ReadFile(filename,buffer);
- if (result) {
- Json::Reader m_reader;
- Json::Value val;
- DCHECK(m_reader.parse(buffer,val));
- dictionary = fromJson(val);
- } else {
- // Error
- }
-}
-
-LastState::LastState() {
- LoadFromFileSystem();
-}
-
-LastState::~LastState() {
- SaveToFileSystem();
-}
-
-const std::string LastState::filename = "TM.dat";
-}
diff --git a/SDL_Core/src/components/rpc_base/CMakeLists.txt b/SDL_Core/src/components/rpc_base/CMakeLists.txt
deleted file mode 100644
index 8ca7d406b..000000000
--- a/SDL_Core/src/components/rpc_base/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-include_directories(
- include
- ${CMAKE_SOURCE_DIR}/src/thirdPartyLibs/jsoncpp/include
-)
-
-set (SOURCES
- src/rpc_base/rpc_message.cc
- src/rpc_base/rpc_base.cc
-)
-
-set (HEADERS
- include/rpc_base/rpc_message.h
- include/rpc_base/rpc_base.h
- include/rpc_base/rpc_base_inl.h
-)
-
-add_library(rpc_base ${HEADERS} ${SOURCES})
-target_link_libraries(rpc_base jsoncpp)
diff --git a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base.h b/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base.h
deleted file mode 100644
index 94e886995..000000000
--- a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef VALIDATED_TYPES_H_
-#define VALIDATED_TYPES_H_
-
-#include <stdint.h>
-#include <map>
-#include <string>
-#include <vector>
-
-namespace Json {
-class Value;
-} // namespace Json
-
-namespace rpc {
-template<typename T> class Range;
-class PrimitiveType;
-class CompositeType;
-class Boolean;
-template<typename T, T minval, T maxval> class Integer;
-template<int64_t minnum, int64_t maxnum,
- int64_t minden = 1, int64_t maxden = 1> class Float;
-template<size_t minlen, size_t maxlen> class String;
-template<typename T> class Enum;
-template<typename T, size_t minsize, size_t maxsize> class Array;
-template<typename T, size_t minsize, size_t maxsize> class Map;
-template<typename T> class Mandatory;
-template<typename T> class Optional;
-
-template<typename T>
-class Range {
- public:
- // Methods
- Range(const T min, const T max);
- T min() const;
- T max() const;
- template<typename U>
- bool Includes(U val) const;
- private:
- T min_;
- T max_;
-};
-
-/*
- * Base class for all primitive types, keeps a flag to
- * tell whether descendant object was initialized
- */
-class PrimitiveType {
- public:
- bool is_initialized() const;
- bool is_valid() const;
- protected:
- PrimitiveType(bool initialized, bool valid);
- protected:
- bool initialized_;
- bool valid_;
-};
-
-/*
- * Helper class for all composite types (arrays and all user-defined types)
- */
-class CompositeType {
- public:
- template<class T, size_t minsize, size_t maxsize>
- static void WriteJsonField(const char* field_name,
- const Array<T, minsize, maxsize>& field,
- Json::Value* json_value);
- template<class T, size_t minsize, size_t maxsize>
- static void WriteJsonField(const char* field_name,
- const Map<T, minsize, maxsize>& field,
- Json::Value* json_value);
- template<class T>
- static void WriteJsonField(const char* field_name, const Optional<T>& field,
- Json::Value* json_value);
- template<class T>
- static void WriteJsonField(const char* field_name, const Mandatory<T>& field,
- Json::Value* json_value);
-};
-
-/*
- * Class that holds primitive boolean value. It is always valid.
- */
-class Boolean : public PrimitiveType {
- public:
- // Types
- typedef bool ValueType;
- public:
- // Methods
- Boolean();
- explicit Boolean(bool value);
- explicit Boolean(const Json::Value& value);
- Boolean(const Json::Value& value, bool def_value);
- Boolean& operator=(bool new_val);
- operator bool() const;
- Json::Value ToJsonValue() const;
-
- private:
- // Fields
- ValueType value_;
-};
-
-template<typename T, T minval, T maxval>
-class Integer : public PrimitiveType {
- public:
- // Types
- typedef T IntType;
- public:
- // Methods
- Integer();
- explicit Integer(IntType value);
- explicit Integer(const Json::Value& value);
- Integer(const Json::Value& value, IntType def_value);
- Integer& operator=(IntType new_val);
- operator IntType() const;
- Json::Value ToJsonValue() const;
-
- private:
- IntType value_;
- static const Range<T> range_;
-};
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-class Float : public PrimitiveType {
- public:
- // Methods
- Float();
- explicit Float(double value);
- explicit Float(const Json::Value& value);
- Float(const Json::Value& value, double def_value);
- Float& operator=(double new_val);
- operator double() const;
- Json::Value ToJsonValue() const;
-
- private:
- double value_;
- static const Range<double> range_;
-};
-
-template<size_t minlen, size_t maxlen>
-class String : public PrimitiveType {
- public:
- // Methods
- String();
- explicit String(const std::string& value);
- explicit String(const char* value);
- explicit String(const Json::Value& value);
- String(const Json::Value& value, const std::string& def_value);
- String& operator=(const std::string& new_val);
- operator const std::string&() const;
- Json::Value ToJsonValue() const;
-
- private:
- std::string value_;
- static const Range<size_t> length_range_;
-};
-
-template<typename T>
-class Enum : public PrimitiveType {
- public:
- // Types
- typedef T EnumType;
- public:
- // Methods
- Enum();
- explicit Enum(EnumType value);
- explicit Enum(const Json::Value& value);
- Enum(const Json::Value& value, EnumType def_value);
- Enum& operator=(EnumType new_val);
- operator EnumType() const;
- Json::Value ToJsonValue() const;
-
- private:
- // Fields
- EnumType value_;
-};
-
-template<typename T, size_t minsize, size_t maxsize>
-class Array : public std::vector<T> {
- public:
- // Types
- typedef std::vector<T> ArrayType;
- public:
- // Methods
- Array();
- explicit Array(const Json::Value& value);
- template<typename U>
- explicit Array(const U& value);
- template<typename U>
- Array& operator=(const U& that);
- using ArrayType::push_back;
- template<typename U>
- void push_back(const U& value);
- Json::Value ToJsonValue() const;
-
- bool is_valid() const;
- bool is_initialized() const;
-};
-
-template<typename T, size_t minsize, size_t maxsize>
-class Map : public std::map<std::string, T> {
- public:
- // Types
- typedef std::map<std::string, T> MapType;
- public:
- // Methods
- Map();
- explicit Map(const Json::Value& value);
- template<typename U>
- explicit Map(const U& value);
- template<typename U>
- Map& operator=(const U& that);
- using MapType::insert;
- template<typename U>
- void insert(const std::pair<std::string, U>& value);
- Json::Value ToJsonValue() const;
-
- bool is_valid() const;
- bool is_initialized() const;
-};
-
-template<typename T>
-class Mandatory : public T {
- public:
- // Methods
- Mandatory();
- template<typename U>
- explicit Mandatory(const U& value);
- template<typename U>
- Mandatory(const Json::Value& value, const U& def_value);
- template<typename U>
- Mandatory& operator=(const U& new_val);
-
- bool is_valid() const;
-};
-
-template<typename T>
-class Optional {
- public:
- // Methods
- Optional();
- template<typename U>
- explicit Optional(const U& value);
- template<typename U>
- Optional(const Json::Value& value,const U& def_value);
-
- // Pointer semantics
- T& operator*();
- const T& operator*() const;
- T* operator->();
- const T* operator->() const;
- // For pointer-like 'if (optional_value)' tests
- // Better than operator bool because bool can be implicitly
- // casted to integral types
- operator const void*() const;
-
- bool is_valid() const;
- bool is_initialized() const;
- private:
- T value_;
-};
-
-} // namespace rpc
-
-// Template methods implementation
-#include "rpc_base_inl.h"
-
-#endif /* VALIDATED_TYPES_H_ */
diff --git a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_inl.h b/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
deleted file mode 100644
index 615acf929..000000000
--- a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/**
-* Copyright (c) 2014, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef VALIDATED_TYPES_INL_H_
-#define VALIDATED_TYPES_INL_H_
-
-#include "rpc_base.h"
-
-#include <cassert>
-
-namespace rpc {
-
-/*
- * Range helper class
- */
-template <typename T>
-Range<T>::Range(T min, T max)
- : min_(min),
- max_(max) {
-}
-
-template <typename T>
-T Range<T>::min() const {
- return min_;
-}
-
-template <typename T>
-T Range<T>::max() const {
- return max_;
-}
-
-template <typename T>
-template <typename U>
-bool Range<T>::Includes(U val) const {
- return min() <= val && val <= max();
-}
-
-inline PrimitiveType::PrimitiveType(bool initialized, bool valid)
- : initialized_(initialized), valid_(valid) {
-}
-
-inline bool PrimitiveType::is_initialized() const {
- return initialized_;
-}
-
-inline bool PrimitiveType::is_valid() const {
- return valid_;
-}
-
-/*
- * Boolean class
- */
-inline Boolean::Boolean()
- : PrimitiveType(false, false), value_(false) {
-}
-
-inline Boolean::Boolean(bool value)
- : PrimitiveType(true, true), value_(value) {
-}
-
-inline Boolean& Boolean::operator=(bool new_val) {
- value_ = new_val;
- initialized_ = true;
- valid_ = true;
- return *this;
-}
-
-inline Boolean::operator bool() const {
- return value_;
-}
-
-/*
- * Integer class
- */
-template<typename T, T minval, T maxval>
-const Range<T> Integer<T, minval, maxval>::range_(minval, maxval);
-
-template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>::Integer()
- : PrimitiveType(false, false),
- value_(range_.min()) {
-}
-
-template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>::Integer(IntType value)
- : PrimitiveType(true, range_.Includes(value)),
- value_(value) {
-}
-
-template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>& Integer<T, minval, maxval>::operator=(IntType new_val) {
- value_ = new_val;
- initialized_ = true;
- valid_ = range_.Includes(value_);
- return *this;
-}
-
-template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>::operator IntType() const {
- return value_;
-}
-
-/*
- * Float class
- */
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-const Range<double> Float<minnum, maxnum, minden, maxden>::range_(
- (double(minnum)/minden), (double(maxnum)/maxden));
-
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Float<minnum, maxnum, minden, maxden>::Float()
- : PrimitiveType(false, false),
- value_(range_.min()) {
-}
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Float<minnum, maxnum, minden, maxden>::Float(double value)
- : PrimitiveType(true, range_.Includes(value)),
- value_(value) {
-}
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Float<minnum, maxnum, minden, maxden>&
-Float<minnum, maxnum, minden, maxden>::operator=(double new_val) {
- value_ = new_val;
- initialized_ = true;
- valid_ = range_.Includes(new_val);
- return *this;
-}
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Float<minnum, maxnum, minden, maxden>::operator double() const {
- return value_;
-}
-
-/*
- * String class
- */
-template<size_t minlen, size_t maxlen>
-const Range<size_t> String<minlen, maxlen>::length_range_(minlen, maxlen);
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>::String()
- : PrimitiveType(false, false) {
-}
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>::String(const std::string& value)
- : PrimitiveType(true, length_range_.Includes(value.length())),
- value_(value) {
-}
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>::String(const char* value)
- : PrimitiveType(true, true),
- value_(value) {
- valid_ = length_range_.Includes(value_.length());
-}
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>& String<minlen, maxlen>::operator=(const std::string& new_val) {
- value_ = new_val;
- initialized_ = true;
- valid_ = length_range_.Includes(new_val.length());
- return *this;
-}
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>::operator const std::string&() const {
- return value_;
-}
-
-/*
- * Enum class
- */
-template<typename T>
-Enum<T>::Enum()
- : PrimitiveType(false, false),
- value_(EnumType()) {
-}
-
-template<typename T>
-Enum<T>::Enum(EnumType value)
- : PrimitiveType(true, IsValidEnum(value_)),
- value_(value) {
-}
-
-template<typename T>
-Enum<T>& Enum<T>::operator=(EnumType new_val) {
- value_ = new_val;
- initialized_ = true;
- valid_ = IsValidEnum(value_);
- return *this;
-}
-
-template<typename T>
-Enum<T>::operator EnumType() const {
- return value_;
-}
-
-/*
- * Array class
- */
-template<typename T, size_t minsize, size_t maxsize>
-Array<T, minsize, maxsize>::Array() {
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-template<typename U>
-Array<T, minsize, maxsize>::Array(const U& value)
- : ArrayType(value.begin(), value.end() ){
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-template<typename U>
-Array<T, minsize, maxsize>&
-Array<T, minsize, maxsize>::operator=(const U& that) {
- this->assign(that.begin(), that.end());
- return *this;
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-template<typename U>
-void Array<T, minsize, maxsize>::push_back(const U& value) {
- ArrayType::push_back(T(value));
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-bool Array<T, minsize, maxsize>::is_valid() const {
- if (!Range<size_t>(minsize, maxsize).Includes(this->size()))
- return false;
- for (typename ArrayType::const_iterator i = this->begin();
- i != this->end(); ++i) {
- if (!i->is_valid())
- return false;
- }
- return true;
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-bool Array<T, minsize, maxsize>::is_initialized() const {
- return !this->empty();
-}
-
-/*
- * Map class
- */
-template<typename T, size_t minsize, size_t maxsize>
-Map<T, minsize, maxsize>::Map() {
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-template<typename U>
-Map<T, minsize, maxsize>::Map(const U& value) {
- for (typename U::const_iterator i = value.begin(), e = value.end(); i != e;
- ++i) {
- // Explicitly convert that value to T because all rpc_types have explicit
- // constructors
- insert(typename MapType::value_type(i->first, T(i->second)));
- }
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-template<typename U>
-Map<T, minsize, maxsize>&
-Map<T, minsize, maxsize>::operator=(const U& that) {
- this->clear();
- for (typename U::const_iterator i = that.begin(), e = that.end(); i != e;
- ++i) {
- // Explicitly convert that value to T because all rpc_types have explicit
- // constructors
- insert(typename MapType::value_type(i->first, T(i->second)));
- }
- return *this;
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-template<typename U>
-void Map<T, minsize, maxsize>::insert(const std::pair<std::string, U>& value) {
- MapType::insert(typename MapType::value_type(value.first, T(value.second)));
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-bool Map<T, minsize, maxsize>::is_valid() const {
- if (!Range<size_t>(minsize, maxsize).Includes(this->size()))
- return false;
- for (typename Map::const_iterator i = this->begin();
- i != this->end(); ++i) {
- if (!i->second.is_valid())
- return false;
- }
- return true;
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-bool Map<T, minsize, maxsize>::is_initialized() const {
- return !this->empty();
-}
-
-/*
- * Mandatory class
- */
-template<typename T>
-Mandatory<T>::Mandatory() {
-}
-
-template<typename T>
-template<typename U>
-Mandatory<T>::Mandatory(const U& value)
- : T(value) {
-}
-
-template<typename T>
-template<typename U>
-Mandatory<T>& Mandatory<T>::operator=(const U& new_val) {
- this->T::operator=(new_val);
- return *this;
-}
-
-template<typename T>
-bool Mandatory<T>::is_valid() const {
- return T::is_initialized() && T::is_valid();
-}
-
-/*
- * Optional class
- */
-template<typename T>
-Optional<T>::Optional() {
-}
-
-template<typename T>
-template<typename U>
-Optional<T>::Optional(const U& value)
- : value_(value) {
-}
-
-template<typename T>
-T& Optional<T>::operator*() {
- return value_;
-}
-
-template<typename T>
-const T& Optional<T>::operator*() const {
- return value_;
-}
-
-template<typename T>
-T* Optional<T>::operator->() {
- return &value_;
-}
-
-template<typename T>
-const T* Optional<T>::operator->() const {
- return &value_;
-}
-
-template<typename T>
-Optional<T>::operator const void*() const {
- return is_initialized() ? &value_ : NULL;
-}
-
-template<typename T>
-bool Optional<T>::is_valid() const {
- return !value_.is_initialized() || value_.is_valid();
-}
-
-template<typename T>
-bool Optional<T>::is_initialized() const {
- return value_.is_initialized();
-}
-
-} // namespace rpc
-
-
-
-#endif /* VALIDATED_TYPES_INL_H_ */
diff --git a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h b/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
deleted file mode 100644
index 1b852c4aa..000000000
--- a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef VALIDATED_TYPES_JSON_INL_H_
-#define VALIDATED_TYPES_JSON_INL_H_
-
-#include "rpc_base/rpc_base.h"
-#include "json/value.h"
-
-namespace rpc {
-
-/*
- * Composite type
- */
-// static
-template<class T, size_t minsize, size_t maxsize>
-void CompositeType::WriteJsonField(const char* field_name,
- const Array<T, minsize, maxsize>& field,
- Json::Value* json_value) {
- if (field.is_initialized()) {
- (*json_value)[field_name] = field.ToJsonValue();
- }
-}
-
-// static
-template<class T, size_t minsize, size_t maxsize>
-void CompositeType::WriteJsonField(const char* field_name,
- const Map<T, minsize, maxsize>& field,
- Json::Value* json_value) {
- if (field.is_initialized()) {
- (*json_value)[field_name] = field.ToJsonValue();
- }
-}
-
-// static
-template<class T>
-void CompositeType::WriteJsonField(const char* field_name,
- const Optional<T>& field,
- Json::Value* json_value) {
- if (field.is_initialized()) {
- (*json_value)[field_name] = field->ToJsonValue();
- }
-}
-// static
-template<class T>
-void CompositeType::WriteJsonField(const char* field_name,
- const Mandatory<T>& field,
- Json::Value* json_value) {
- (*json_value)[field_name] = field.ToJsonValue();
-}
-
-
-inline Boolean::Boolean(const Json::Value& value)
- : PrimitiveType(!value.isNull(), value.isBool()),
- value_(valid_ ? value.asBool() : bool()) {
-}
-
-inline Boolean::Boolean(const Json::Value& value, bool def_value)
- : PrimitiveType(true, value.isBool() || value.isNull()),
- value_(value.isBool() ? value.asBool() : def_value) {
-}
-
-inline Json::Value Boolean::ToJsonValue() const {
- return Json::Value(value_);
-}
-
-template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>::Integer(const Json::Value& value)
- : PrimitiveType(!value.isNull(),
- value.isInt() && range_.Includes(value.asInt64())),
- value_(valid_ ? value.asInt64() : IntType()) {
-}
-
-template<typename T, T minval, T maxval>
-Integer<T, minval, maxval>::Integer(const Json::Value& value, IntType def_value)
- : PrimitiveType(true, (value.isInt() && range_.Includes(value.asInt64()))
- || value.isNull()),
- value_(value.isInt() ? value.asInt64() : def_value) {
-}
-
-// TODO: int64_t support
-template<typename T, T minval, T maxval>
-Json::Value Integer<T, minval, maxval>::ToJsonValue() const {
- return Json::Value(int32_t(value_));
-}
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Float<minnum, maxnum, minden, maxden>::Float(const Json::Value& value)
- : PrimitiveType(!value.isNull(),
- value.isDouble() && range_.Includes(value.asDouble())),
- value_(valid_ ? value.asDouble() : double()) {
-}
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Float<minnum, maxnum, minden, maxden>::Float(const Json::Value& value,
- double def_value)
- : PrimitiveType(true, (value.isDouble()
- && range_.Includes(value.asDouble()))
- || value.isNull()),
- value_(value.isDouble() ? value.asDouble() : def_value) {
-}
-
-template<int64_t minnum, int64_t maxnum, int64_t minden, int64_t maxden>
-Json::Value Float<minnum, maxnum, minden, maxden>::ToJsonValue() const {
- return Json::Value(value_);
-}
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>::String(const Json::Value& value)
- : PrimitiveType(!value.isNull(),
- (value.isString() &&
- length_range_.Includes(value.asString().length()))),
- value_(valid_ ? value.asString() : std::string()) {
-}
-
-template<size_t minlen, size_t maxlen>
-String<minlen, maxlen>::String(const Json::Value& value, const std::string& def_value)
- : PrimitiveType(true, (value.isString()
- && length_range_.Includes(value.asString().length()))
- || value.isNull()),
- value_(value.isString() ? value.asString() : def_value) {
-}
-
-template<size_t minlen, size_t maxlen>
-Json::Value String<minlen, maxlen>::ToJsonValue() const {
- return Json::Value(value_);
-}
-
-template<typename T>
-Enum<T>::Enum(const Json::Value& value)
- : PrimitiveType(!value.isNull(), value.isString()),
- value_(EnumType()) {
- if (valid_) {
- valid_ = EnumFromJsonString(value.asString(), &value_);
- }
-}
-
-template<typename T>
-Enum<T>::Enum(const Json::Value& value, EnumType def_value)
- : PrimitiveType(true, value.isString() || value.isNull()),
- value_(def_value) {
- if (value.isString()) {
- valid_ = EnumFromJsonString(value.asString(), &value_);
- }
-}
-
-template<typename T>
-Json::Value Enum<T>::ToJsonValue() const {
- return Json::Value(Json::StaticString(EnumToJsonString(value_)));
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-Array<T, minsize, maxsize>::Array(const Json::Value& value) {
- if (value.isArray()) {
- this->reserve(value.size());
- for (Json::Value::const_iterator i = value.begin(); i != value.end(); ++i) {
- push_back(*i);
- }
- } else if (value.isNull()) {
- // Do nothing, keep array empty and uninitialized
- } else {
- // In case of non-array value initialize array with null value
- // so it handled as initialized but invalid
- push_back(Json::Value());
- }
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-Json::Value Array<T, minsize, maxsize>::ToJsonValue() const {
- Json::Value array(Json::arrayValue);
- array.resize(this->size());
- for (size_t i = 0; i != this->size(); ++i) {
- array[Json::ArrayIndex(i)] = (this->operator [](i)).ToJsonValue();
- }
- return array;
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-Map<T, minsize, maxsize>::Map(const Json::Value& value) {
- if (value.isObject()) {
- for (Json::Value::const_iterator i = value.begin(); i != value.end(); ++i) {
- this->insert(typename MapType::value_type(i.key().asString(), T(*i)));
- }
- } else if (value.isNull()) {
- // Do nothing, keep array empty and uninitialized
- } else {
- // In case of non-array value initialize array with null value
- // so it handled as initialized but invalid
- this->insert(typename MapType::value_type("", T(Json::Value())));
- }
-}
-
-template<typename T, size_t minsize, size_t maxsize>
-Json::Value Map<T, minsize, maxsize>::ToJsonValue() const {
- Json::Value map(Json::objectValue);
- for (typename MapType::const_iterator i = this->begin(); i != this->end(); ++i) {
- map[i->first] = i->second.ToJsonValue();
- }
- return map;
-}
-
-template<typename T>
-template<typename U>
-Mandatory<T>::Mandatory(const Json::Value& value, const U& def_value)
- : T(value, def_value) {
-}
-
-template<typename T>
-template<typename U>
-Optional<T>::Optional(const Json::Value& value, const U& def_value)
- : value_(value, def_value) {
-}
-
-} // namespace rpc
-
-#endif /* VALIDATED_TYPES_JSON_INL_H_ */
diff --git a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_message.h b/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_message.h
deleted file mode 100644
index 25188e09d..000000000
--- a/SDL_Core/src/components/rpc_base/include/rpc_base/rpc_message.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* Copyright (c) 2014, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef TYPE_BASE_H_
-#define TYPE_BASE_H_
-
-#include "rpc_base.h"
-
-namespace Json {
-class Value;
-}
-
-namespace rpc {
-
-enum MessageType {
- kRequest = 0,
- kResponse = 1,
- kNotification = 2
-};
-
-// Base class for all RPC messages
-// Has methods to identify interface this message belongs to
-// And message ID
-class Message {
-public:
- // Type of message
- virtual MessageType message_type() const = 0;
- // Numerical function identifier, unique to the interface
- // Responses share function identifier with corresponding requests
- virtual int32_t function_id() const = 0;
- // Function string identifier as specified in original xml file
- virtual const char* function_string_id() const = 0;
- // Interface name as specified in original xml file
- virtual const char* interface_string_id() const = 0;
- // Serializes message to Json::Value
- virtual Json::Value ToJsonValue() const = 0;
- virtual ~Message() {}
-};
-
-// Base class for all interface-specific requests
-class RequestBase : public Message {
- public:
- // Message interface
- MessageType message_type() const { return kRequest; }
- virtual ~RequestBase() {}
-};
-
-// Base class for all interface-specific responses
-class ResponseBase : public Message {
- public:
- // Message interface
- MessageType message_type() const { return kResponse; }
- virtual ~ResponseBase() {}
-};
-
-// Base class for all interface-specific notifications
-class NotificationBase : public Message {
- public:
- MessageType message_type() const { return kNotification; }
- // Message interface
- virtual ~NotificationBase() {}
-};
-
-} // namespace rpc
-
-#endif /* TYPE_BASE_H_ */
diff --git a/SDL_Core/src/components/rpc_base/src/rpc_base/rpc_base.cc b/SDL_Core/src/components/rpc_base/src/rpc_base/rpc_base.cc
deleted file mode 100644
index 4e3a5d312..000000000
--- a/SDL_Core/src/components/rpc_base/src/rpc_base/rpc_base.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "rpc_base/rpc_base.h"
-
-namespace rpc {
-} // namespace rpc
diff --git a/SDL_Core/src/components/rpc_base/src/rpc_base/rpc_message.cc b/SDL_Core/src/components/rpc_base/src/rpc_base/rpc_message.cc
deleted file mode 100644
index 2411273e5..000000000
--- a/SDL_Core/src/components/rpc_base/src/rpc_base/rpc_message.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "rpc_base/rpc_message.h"
-
-#include "json/value.h"
-
-namespace rpc {
-
-} // namespace rpc
diff --git a/SDL_Core/src/components/smart_objects/CMakeLists.txt b/SDL_Core/src/components/smart_objects/CMakeLists.txt
deleted file mode 100644
index 02d4797e0..000000000
--- a/SDL_Core/src/components/smart_objects/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-include_directories (
- ./include
- ../utils/include/
-)
-
-set (SOURCES
- ./src/smart_object.cc
- ./src/smart_schema.cc
- ./src/schema_item.cc
- ./src/always_false_schema_item.cc
- ./src/always_true_schema_item.cc
- ./src/array_schema_item.cc
- ./src/bool_schema_item.cc
- ./src/object_schema_item.cc
- ./src/string_schema_item.cc
- ./src/enum_schema_item.cc
- ./src/number_schema_item.cc
- ./src/object_optional_schema_item.cc
-)
-
-add_library("SmartObjects" ${SOURCES})
-target_link_libraries ("SmartObjects" log4cxx)
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/always_false_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
deleted file mode 100644
index a4bfb5060..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_FALSE_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_FALSE_SCHEMA_ITEM_H_
-
-#include "utils/shared_ptr.h"
-#include "smart_objects/schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief Always false schema item.
- **/
-class CAlwaysFalseSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<CAlwaysFalseSchemaItem> create();
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return Errors::ERROR
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- virtual ~CAlwaysFalseSchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- **/
- CAlwaysFalseSchemaItem(void);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- CAlwaysFalseSchemaItem(const CAlwaysFalseSchemaItem& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- CAlwaysFalseSchemaItem & operator =(const CAlwaysFalseSchemaItem& Other);
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_FALSE_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/always_true_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
deleted file mode 100644
index 5616b0e1a..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_TRUE_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_TRUE_SCHEMA_ITEM_H_
-
-#include "utils/shared_ptr.h"
-#include "smart_objects/schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief Always true schema item.
- **/
-class CAlwaysTrueSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<CAlwaysTrueSchemaItem> create();
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- virtual ~CAlwaysTrueSchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- **/
- CAlwaysTrueSchemaItem();
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- CAlwaysTrueSchemaItem(const CAlwaysTrueSchemaItem& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- CAlwaysTrueSchemaItem & operator =(const CAlwaysTrueSchemaItem& Other);
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_TRUE_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/array_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/array_schema_item.h
deleted file mode 100644
index 8e5e3e23b..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/array_schema_item.h
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ARRAY_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ARRAY_SCHEMA_ITEM_H_
-
-#include <stddef.h>
-
-#include "utils/shared_ptr.h"
-#include "smart_objects/schema_item.h"
-#include "smart_objects/always_true_schema_item.h"
-#include "smart_objects/schema_item_parameter.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief Array schema item.
- **/
-class CArraySchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @param ElementSchemaItem SchemaItem for array elements.
- * @param MinSize Minimum allowed size.
- * @param MaxSize Maximum allowed size.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<CArraySchemaItem> create(
- const utils::SharedPtr<ISchemaItem> & ElementSchemaItem =
- CAlwaysTrueSchemaItem::create(),
- const TSchemaItemParameter<size_t> & MinSize =
- TSchemaItemParameter<size_t>(),
- const TSchemaItemParameter<size_t> & MaxSize =
- TSchemaItemParameter<size_t>());
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Apply schema.
- *
- * @param Object Object to apply schema.
- **/
- virtual void applySchema(SmartObject& Object);
-
- /**
- * @brief Unapply schema.
- *
- * @param Object Object to unapply schema.
- **/
- virtual void unapplySchema(SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object);
-
- virtual ~CArraySchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- *
- * @param ElementSchemaItem SchemaItem for array elements.
- * @param MinSize Minimum allowed size.
- * @param MaxSize Maximum allowed size.
- **/
- CArraySchemaItem(const utils::SharedPtr<ISchemaItem>& ElementSchemaItem,
- const TSchemaItemParameter<size_t>& MinSize,
- const TSchemaItemParameter<size_t>& MaxSize);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- CArraySchemaItem(const CArraySchemaItem& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- CArraySchemaItem & operator =(const CArraySchemaItem& Other);
-
- /**
- * @brief SchemaItem for array elements.
- **/
- const utils::SharedPtr<ISchemaItem> mElementSchemaItem;
-
- /**
- * @brief Minimum allowed size.
- **/
- const TSchemaItemParameter<size_t> mMinSize;
-
- /**
- * @brief Maximum allowed size.
- **/
- const TSchemaItemParameter<size_t> mMaxSize;
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ARRAY_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/bool_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/bool_schema_item.h
deleted file mode 100644
index 4479aeea9..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/bool_schema_item.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_BOOL_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_BOOL_SCHEMA_ITEM_H_
-
-#include "utils/shared_ptr.h"
-
-#include "smart_objects/schema_item_parameter.h"
-#include "smart_objects/schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief Bool schema item.
- **/
-class CBoolSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @param DefaultValue Default value of a parameter.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<CBoolSchemaItem> create(
- const TSchemaItemParameter<bool>& DefaultValue = TSchemaItemParameter<
- bool>());
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Set default value to an object.
- *
- * @param Object Object to set default value.
- *
- * @return true if default value was successfully set, false otherwise.
- **/
- virtual bool setDefaultValue(SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object);
-
- virtual ~CBoolSchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- *
- * @param DefaultValue Default value of a parameter.
- **/
- explicit CBoolSchemaItem(const TSchemaItemParameter<bool>& DefaultValue);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- CBoolSchemaItem(const CBoolSchemaItem& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- CBoolSchemaItem & operator =(const CBoolSchemaItem& Other);
-
- /**
- * @param DefaultValue Default value of a parameter.
- */
- const TSchemaItemParameter<bool> mDefaultValue;
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_BOOL_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/enum_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/enum_schema_item.h
deleted file mode 100644
index 15f5c5aab..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/enum_schema_item.h
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ENUM_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ENUM_SCHEMA_ITEM_H_
-
-#include <map>
-#include <set>
-#include <string>
-
-#include "utils/shared_ptr.h"
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/schema_item.h"
-#include "smart_objects/schema_item_parameter.h"
-
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief Enumeration schema item.
- *
- * @tparam EnumType Enumeration type.
- **/
-template<typename EnumType>
-class TEnumSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @param AllowedElements Set of allowed enumeration elements.
- * @param DefaultValue Default value.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<TEnumSchemaItem> create(
- const std::set<EnumType>& AllowedElements,
- const TSchemaItemParameter<EnumType> & DefaultValue =
- TSchemaItemParameter<EnumType>());
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Set default value to an object.
- *
- * @param Object Object to set default value.
- *
- * @return true if default value was successfully set, false otherwise.
- **/
- // TODO(cpplint): Is this a non-const reference?
- // If so, make const or use a pointer.
- virtual bool setDefaultValue(SmartObject& Object);
-
- /**
- * @brief Apply schema.
- *
- * This implementation checks if enumeration is represented as string
- * and tries to convert it to integer according to element-to-string
- * map provided by getEnumElementsStringRepresentation().
- *
- * @param Object Object to apply schema.
- **/
- // TODO(cpplint): Is this a non-const reference?
- // If so, make const or use a pointer.
- virtual void applySchema(SmartObject& Object);
-
- /**
- * @brief Unapply schema.
- *
- * @param Object Object to unapply schema.
- **/
- // TODO(cpplint): Is this a non-const reference?
- // If so, make const or use a pointer.
- virtual void unapplySchema(SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object);
-
- /**
- * @brief The method converts a string into the value of enum EnumType
- *
- * @param str String to convert
- * @param value the resulting enum value
- * @return true if the string is converted successfully
- */
- static bool stringToEnum(const std::string& str, EnumType &value);
-
- /**
- * @brief Get string representation of enumeration elements.
- *
- * @return Map of enum element to its string representation.
- **/
- static const std::map<EnumType, std::string>&
- getEnumElementsStringRepresentation();
-
- virtual ~TEnumSchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- *
- * @param AllowedElements Set of allowed enumeration elements.
- * @param DefaultValue Default value.
- **/
- TEnumSchemaItem(const std::set<EnumType>& AllowedElements,
- const TSchemaItemParameter<EnumType>& DefaultValue);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- TEnumSchemaItem(const TEnumSchemaItem<EnumType>& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- TEnumSchemaItem & operator =(const TEnumSchemaItem<EnumType>& Other);
-
- /**
- * @brief Set of allowed enumeration elements.
- **/
- const std::set<EnumType> mAllowedElements;
-
- /**
- * @brief Default value.
- **/
- const TSchemaItemParameter<EnumType> mDefaultValue;
-};
-
-template<typename EnumType>
-utils::SharedPtr<TEnumSchemaItem<EnumType> > TEnumSchemaItem<EnumType>::create(
- const std::set<EnumType>& AllowedElements,
- const TSchemaItemParameter<EnumType>& DefaultValue) {
- return new TEnumSchemaItem<EnumType>(AllowedElements, DefaultValue);
-}
-
-template<typename EnumType>
-Errors::eType TEnumSchemaItem<EnumType>::validate(const SmartObject& Object) {
- Errors::eType result = Errors::ERROR;
-
- if (SmartType_Integer == Object.getType()) {
- if (mAllowedElements.end()
- != mAllowedElements.find(static_cast<EnumType>(Object.asInt()))) {
- result = Errors::OK;
- } else {
- result = Errors::OUT_OF_RANGE;
- }
- } else {
- result = Errors::INVALID_VALUE;
- }
-
- return result;
-}
-
-// TODO(cpplint): Is this a non-const reference?
-// If so, make const or use a pointer.
-template<typename EnumType>
-bool TEnumSchemaItem<EnumType>::setDefaultValue(SmartObject& Object) {
- bool result = false;
- EnumType value;
-
- if (true == mDefaultValue.getValue(value)) {
- Object = static_cast<int32_t>(value);
- result = true;
- }
-
- return result;
-}
-
-// TODO(cpplint): Is this a non-const reference?
-// If so, make const or use a pointer.
-template<typename EnumType>
-void TEnumSchemaItem<EnumType>::applySchema(SmartObject& Object) {
- if (SmartType_String == Object.getType()) {
- std::string stringValue = Object.asString();
- const std::map<EnumType, std::string> elementsStringRepresentation =
- getEnumElementsStringRepresentation();
-
- for (typename std::map<EnumType, std::string>::const_iterator i =
- elementsStringRepresentation.begin();
- i != elementsStringRepresentation.end(); ++i) {
- if (i->second == stringValue) {
- Object = static_cast<int32_t>(i->first);
- break;
- }
- }
- }
-}
-
-// TODO(cpplint): Is this a non-const reference?
-// If so, make const or use a pointer.
-template<typename EnumType>
-void TEnumSchemaItem<EnumType>::unapplySchema(SmartObject& Object) {
- if (SmartType_Integer == Object.getType()) {
- int32_t integerValue = Object.asInt();
- const std::map<EnumType, std::string> elementsStringRepresentation =
- getEnumElementsStringRepresentation();
- typename std::map<EnumType, std::string>::const_iterator i =
- elementsStringRepresentation.find(static_cast<EnumType>(integerValue));
-
- if (i != elementsStringRepresentation.end()) {
- Object = i->second;
- }
- }
-}
-
-template<typename EnumType>
-void TEnumSchemaItem<EnumType>::BuildObjectBySchema(
- const SmartObject& pattern_object, SmartObject& result_object) {
-
- if (SmartType_Integer == pattern_object.getType()) {
- result_object = pattern_object; // TODO(AK): Check this...
- } else {
- bool result = setDefaultValue(result_object);
- if (false == result) {
- result_object = static_cast<EnumType>(EnumType::INVALID_ENUM);
- }
- }
-}
-
-template<typename EnumType>
-TEnumSchemaItem<EnumType>::TEnumSchemaItem(
- const std::set<EnumType> & AllowedElements,
- const TSchemaItemParameter<EnumType> & DefaultValue)
- : mAllowedElements(AllowedElements),
- mDefaultValue(DefaultValue) {
-}
-
-template<typename EnumType>
-bool TEnumSchemaItem<EnumType>::stringToEnum(const std::string& str,
- EnumType& value) {
- bool result = false;
- std::map<EnumType, std::string> enumMap =
- TEnumSchemaItem<EnumType>::getEnumElementsStringRepresentation();
-
- for (typename std::map<EnumType, std::string>::const_iterator it = enumMap
- .begin(); it != enumMap.end(); ++it) {
- if (str == it->second) {
- value = it->first;
- result = true;
- break;
- }
- }
-
- return result;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ENUM_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/errors.h b/SDL_Core/src/components/smart_objects/include/smart_objects/errors.h
deleted file mode 100644
index 04a939a37..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/errors.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ERRORS_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ERRORS_H_
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-namespace Errors {
-/**
- * @brief Enumeration that provides information about SmartObject validation errors
- **/
-enum eType {
- /**
- * @brief Success validation
- **/
- OK = 0,
-
- /**
- * @brief Invalid value.
- **/
- INVALID_VALUE,
-
- /**
- * @brief Value is out of allowed range.
- **/
- OUT_OF_RANGE,
-
- /**
- * @brief Mandatory parameter is missing.
- **/
- MISSING_MANDATORY_PARAMETER,
-
- /**
- * @brief Mandatory untitled (with any name) parameter is missing.
- **/
- MISSING_MANDATORY_UNTITLED_PARAMETER,
-
- /**
- * @brief Unexpected parameter.
- **/
- UNEXPECTED_PARAMETER,
-
- /**
- * @brief General validation error
- **/
- ERROR
-};
-} // namespace Errors
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ERRORS_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/number_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/number_schema_item.h
deleted file mode 100644
index eec29feb7..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/number_schema_item.h
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_NUMBER_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_NUMBER_SCHEMA_ITEM_H_
-
-#include <typeinfo>
-#include <string>
-
-#include "utils/shared_ptr.h"
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/schema_item.h"
-#include "smart_objects/schema_item_parameter.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-/**
- * @brief Number schema item.
- *
- * @tparam NumberType Number type.
- **/
-template<typename NumberType>
-class TNumberSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @param MinValue Minimum allowed value.
- * @param MaxValue Maximum allowed value.
- * @param DefaultValue Default value.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<TNumberSchemaItem> create(
- const TSchemaItemParameter<NumberType>& MinValue = TSchemaItemParameter<
- NumberType>(),
- const TSchemaItemParameter<NumberType>& MaxValue = TSchemaItemParameter<
- NumberType>(),
- const TSchemaItemParameter<NumberType>& DefaultValue =
- TSchemaItemParameter<NumberType>());
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Set default value to an object.
- *
- * @param Object Object to set default value.
- *
- * @return true if default value was successfully set, false otherwise.
- **/
- // TODO(cpplint): Is this a non-const reference?
- // If so, make const or use a pointer.
- virtual bool setDefaultValue(SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object);
-
- virtual ~TNumberSchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- *
- * @param MinValue Minimum allowed value.
- * @param MaxValue Maximum allowed value.
- * @param DefaultValue Default value.
- **/
- TNumberSchemaItem(const TSchemaItemParameter<NumberType>& MinValue,
- const TSchemaItemParameter<NumberType>& MaxValue,
- const TSchemaItemParameter<NumberType>& DefaultValue);
-
- /**
- * @brief Get smart type for this NumberType.
- *
- * @return Smart type for this NumberType.
- **/
- static SmartType getSmartType();
-
- bool isNumberType(SmartType type);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- TNumberSchemaItem(const TNumberSchemaItem<NumberType>& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- TNumberSchemaItem & operator =(const TNumberSchemaItem<NumberType>& Other);
-
- /**
- * @brief Minimum allowed value.
- **/
- const TSchemaItemParameter<NumberType> mMinValue;
-
- /**
- * @brief Maximum allowed value.
- **/
- const TSchemaItemParameter<NumberType> mMaxValue;
-
- /**
- * @brief Default value.
- **/
- const TSchemaItemParameter<NumberType> mDefaultValue;
-};
-
-/**
- * @brief Specialization of getSmartType for int32_t.
- *
- * @return SmartType_Integer.
- **/
-template<>
-SmartType TNumberSchemaItem<int32_t>::getSmartType();
-
-/**
- * @brief Specialization of getSmartType for long.
- *
- * @return SmartType_Integer.
- **/
-template<>
-SmartType TNumberSchemaItem<uint32_t>::getSmartType();
-
-/**
- * @brief Specialization of getSmartType for double.
- *
- * @return SmartType_Double.
- **/
-template<>
-SmartType TNumberSchemaItem<double>::getSmartType(void);
-
-template<typename NumberType>
-utils::SharedPtr<TNumberSchemaItem<NumberType> >
-TNumberSchemaItem<NumberType>::create(
- const TSchemaItemParameter<NumberType>& MinValue,
- const TSchemaItemParameter<NumberType>& MaxValue,
- const TSchemaItemParameter<NumberType>& DefaultValue) {
- return new TNumberSchemaItem<NumberType>(MinValue, MaxValue, DefaultValue);
-}
-
-template<typename NumberType>
-bool TNumberSchemaItem<NumberType>::isNumberType(SmartType type) {
- if (SmartType_Integer == type || SmartType_Double == type) {
- return true;
- }
-
- return false;
-}
-
-template<typename NumberType>
-Errors::eType TNumberSchemaItem<NumberType>::validate(
- const SmartObject& Object) {
- Errors::eType result = Errors::ERROR;
-
- if (isNumberType(Object.getType())) {
- result = Errors::OK;
- NumberType value;
-
- if (std::string("i") == typeid(value).name()) {
- value = Object.asInt();
- } else if (std::string("j") == typeid(value).name()) {
- value = Object.asUInt();
- } else if (std::string("d") == typeid(value).name()) {
- value = Object.asDouble();
- } else {
- NOTREACHED();
- }
-
- NumberType rangeLimit;
-
- if (true == mMinValue.getValue(rangeLimit)) {
- if (value < rangeLimit) {
- result = Errors::OUT_OF_RANGE;
- }
- }
-
- if ((Errors::OK == result) && (true == mMaxValue.getValue(rangeLimit))) {
- if (value > rangeLimit) {
- result = Errors::OUT_OF_RANGE;
- }
- }
- } else {
- result = Errors::INVALID_VALUE;
- }
-
- return result;
-}
-
-template<typename NumberType>
-bool TNumberSchemaItem<NumberType>::setDefaultValue(SmartObject& Object) {
- bool result = false;
- NumberType value;
-
- if (true == mDefaultValue.getValue(value)) {
- Object = value;
- result = true;
- }
-
- return result;
-}
-
-template<typename NumberType>
-void TNumberSchemaItem<NumberType>::BuildObjectBySchema(
- const SmartObject& pattern_object, SmartObject& result_object) {
-
- if (getSmartType() == pattern_object.getType()) {
- result_object = pattern_object; // TODO(AK): check this..
- } else {
- bool result = setDefaultValue(result_object);
- if (false == result) {
- result_object = static_cast<NumberType>(0);
- }
- }
-}
-
-template<typename NumberType>
-TNumberSchemaItem<NumberType>::TNumberSchemaItem(
- const TSchemaItemParameter<NumberType>& MinValue,
- const TSchemaItemParameter<NumberType>& MaxValue,
- const TSchemaItemParameter<NumberType>& DefaultValue)
- : mMinValue(MinValue),
- mMaxValue(MaxValue),
- mDefaultValue(DefaultValue) {
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_NUMBER_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/object_optional_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/object_optional_schema_item.h
deleted file mode 100644
index 92060ea29..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/object_optional_schema_item.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * @file CObjectSchemaItem.hpp
- * @brief CObjectSchemaItem header file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEORY
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_OPTIONAL_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_OPTIONAL_SCHEMA_ITEM_H_
-
-#include <map>
-#include <string>
-#include <set>
-
-#include "utils/shared_ptr.h"
-#include "smart_objects/schema_item.h"
-#include "smart_objects/object_schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-/**
- * @brief Object schema item for object which can have "optional"
- * parameter with any(unknown when describing schema) name.
- *
- * Please note that optional parameter can be also as mandatory.
- */
-class ObjectOptionalSchemaItem : public CObjectSchemaItem {
- public:
- /**
- * @brief Generic field name for optional members of smart object.
- *
- * Name should be uniqe, not to itersect with all possible regular names
- */
- static const char* kOptionalGenericFieldName;
-
- /**
- * @brief Create a new schema item.
- *
- * @param Members Map of member name to SMember structure
- * describing the object member.
- * @param ObjectHasOptioanalMembers Smart object can have
- * optioanal members
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<ObjectOptionalSchemaItem> create(
- const std::map<std::string, CObjectSchemaItem::SMember> & members);
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject & object);
-
- /**
- * @brief Apply schema.
- *
- * @param object Object to apply schema.
- **/
- virtual void applySchema(SmartObject & object);
-
- /**
- * @brief Unapply schema.
- *
- * @param object Object to unapply schema.
- **/
- virtual void unapplySchema(SmartObject & object);
-
- private:
- /**
- * @brief Constructor.
- *
- * @param Members Map of member name to SMember structure
- * describing the object member.
- * @param ObjectHasOptioanalMembers Smart object can have
- * any name members
- **/
- ObjectOptionalSchemaItem(const std::map<std::string,
- CObjectSchemaItem::SMember> & members);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- ObjectOptionalSchemaItem(const ObjectOptionalSchemaItem & Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- ObjectOptionalSchemaItem & operator =(
- const ObjectOptionalSchemaItem & Other);
-
- /**
- * @brief Tells whether name (normally schema item field name)
- * may have any string value
- *
- * @param name Name of field (key) in object
- *
- * @return Whether schema item with name may have any string value as name
- */
- bool IsOptionalName(const std::string& name);
-
- /**
- * @brief Extracts a set of sub object keys from the root object that are
- * optional.
- *
- * @param Object Object from which the sub object keys will be extracted.
- *
- * @return A set of keys of sub-objects that are optional.
- */
- std::set<std::string> GetOptionalObjectKeys(const SmartObject& root_obj);
-
- /**
- * @brief Method iterates over optional sub-objects.
- *
- * The method iterates over optional sub-objects in the root object
- * and performs action on each object.
- * The action is intended as either "applySchema" or "unapplySchema"
- *
- * @param object The root object. Can be modified by "action".
- * @param action Pointer to the method of ISchemaItem. Either "applySchema"
- * or "unapplySchema"
- */
- void IterateOverOptionalItems(SmartObject* object,
- void (ISchemaItem:: *action)(SmartObject&) );
-};
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_OPTIONAL_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/object_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/object_schema_item.h
deleted file mode 100644
index aa3ba7be8..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/object_schema_item.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_SCHEMA_ITEM_H_
-
-#include <map>
-#include <string>
-
-#include "utils/shared_ptr.h"
-
-#include "smart_objects/schema_item.h"
-#include "smart_objects/schema_item_parameter.h"
-
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief Object schema item.
- **/
-class CObjectSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Object member.
- **/
- struct SMember {
- /**
- * @brief Default constructor.
- **/
- SMember(void);
-
- /**
- * @brief Constructor.
- *
- * @param SchemaItem Member schema item.
- * @param IsMandatory true if member is mandatory, false
- * otherwise. Defaults to true.
- **/
- SMember(const utils::SharedPtr<ISchemaItem>& SchemaItem,
- const bool IsMandatory = true);
-
- /**
- * @brief Member schema item.
- **/
- utils::SharedPtr<ISchemaItem> mSchemaItem;
-
- /**
- * @brief true if member is mandatory, false otherwise.
- **/
- bool mIsMandatory;
- };
-
- /**
- * @brief Create a new schema item.
- *
- * @param Members Map of member name to SMember structure
- * describing the object member.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<CObjectSchemaItem> create(
- const std::map<std::string, SMember>& Members);
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Apply schema.
- *
- * @param Object Object to apply schema.
- **/
- virtual void applySchema(SmartObject& Object);
-
- /**
- * @brief Unapply schema.
- *
- * @param Object Object to unapply schema.
- **/
- virtual void unapplySchema(SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object);
-
- virtual ~CObjectSchemaItem() {
- }
-
- protected:
- /**
- * @brief Constructor.
- *
- * @param Members Map of member name to SMember structure
- * describing the object member.
- **/
- CObjectSchemaItem(const std::map<std::string, SMember>& Members);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- CObjectSchemaItem(const CObjectSchemaItem& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- CObjectSchemaItem & operator =(const CObjectSchemaItem& Other);
-
- /**
- * @brief Map of member name to SMember structure describing the object member.
- **/
- const std::map<std::string, SMember> mMembers;
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/schema_item.h
deleted file mode 100644
index a73ffc62e..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/schema_item.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_H_
-
-#include "smart_objects/errors.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-
-/**
- * @brief Base schema item.
- **/
-class ISchemaItem {
- public:
- /**
- * @brief Validate object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Set default value to an object.
- *
- * @param Object Object to set default value.
- *
- * @return true if default value was successfully set, false otherwise.
- **/
- virtual bool setDefaultValue(SmartObject& Object);
-
- /**
- * @brief Apply schema.
- *
- * @param Object Object to apply schema.
- **/
- virtual void applySchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& Object);
-
- /**
- * @brief Unapply schema.
- *
- * @param Object Object to unapply schema.
- **/
- virtual void unapplySchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& pattern_object,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& result_object);
-
- virtual ~ISchemaItem() {
- }
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/schema_item_parameter.h b/SDL_Core/src/components/smart_objects/include/smart_objects/schema_item_parameter.h
deleted file mode 100644
index d918ce227..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/schema_item_parameter.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_PARAMETER_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_PARAMETER_H_
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief SchemaItem parameter.
- *
- * Container for schema item parameter such as min/max value, size,
- * etc. which may be unspecified.
- *
- * @tparam ParameterType Type of a parameter.
- */
-template<typename ParameterType>
-class TSchemaItemParameter {
- public:
- /**
- * @brief Constructor.
- *
- * Initialize unspecified parameter.
- **/
- TSchemaItemParameter();
-
- /**
- * @brief Constructor.
- *
- * Initialize parameter with specified value.
- *
- * @param ParameterValue Value of a parameter.
- **/
- explicit TSchemaItemParameter(const ParameterType& ParameterValue);
-
- /**
- * @brief Get parameter value.
- *
- * Get the value of the parameter if it is specified.
- *
- * @param Value Reference to variable that must receive the
- * value of the parameter. If parameter is not
- * specified this variable is not modified.
- *
- * @return true if the parameter is specified and its value
- * has been stored in Value variable, false otherwise.
- **/
- bool getValue(ParameterType& Value) const;
-
- private:
- /**
- * @brief true if parameter is specified, false otherwise.
- **/
- const bool mIsSpecified;
-
- /**
- * @brief Parameter value.
- **/
- const ParameterType mValue;
-};
-
-template<typename ParameterType>
-TSchemaItemParameter<ParameterType>::TSchemaItemParameter(void)
- : mIsSpecified(false),
- mValue() {
-}
-
-template<typename ParameterType>
-TSchemaItemParameter<ParameterType>::TSchemaItemParameter(
- const ParameterType& ParameterValue)
- : mIsSpecified(true),
- mValue(ParameterValue) {
-}
-
-template<typename ParameterType>
-bool TSchemaItemParameter<ParameterType>::getValue(
- ParameterType& Value) const {
- if (true == mIsSpecified) {
- Value = mValue;
- }
-
- return mIsSpecified;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_PARAMETER_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/smart_object.h b/SDL_Core/src/components/smart_objects/include/smart_objects/smart_object.h
deleted file mode 100644
index f02a7d8a8..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/smart_object.h
+++ /dev/null
@@ -1,942 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_OBJECT_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_OBJECT_H_
-
-#include <set>
-#include <string>
-#include <vector>
-#include <map>
-
-#include "smart_objects/smart_schema.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-
-/**
- * @brief Enumeration with all types, supported by SmartObject
- **/
-enum SmartType {
- /**
- * @brief Null value. Act as initial value.
- **/
- SmartType_Null = 0,
-
- /**
- * @brief Boolean value.
- **/
- SmartType_Boolean = 1,
-
- /**
- * @brief Integer value.
- **/
- SmartType_Integer = 2,
-
- /**
- * @brief Character value.
- **/
- SmartType_Character = 3,
-
- /**
- * @brief String value.
- **/
- SmartType_String = 4,
-
- /**
- * @brief Double value.
- **/
- SmartType_Double = 5,
-
- /**
- * @brief Map value. Gives possibility for object to act like hashtable.
- **/
- SmartType_Map = 6,
-
- /**
- * @brief Array value. Gives possibility for object to act like array.
- **/
- SmartType_Array = 7,
-
- /**
- * @brief Binary data value. Gives possibility for object to store binary data.
- **/
- SmartType_Binary = 8,
-
- /**
- * @brief Invalid value. Represents invalid object that cannot change his type.
- **/
- SmartType_Invalid = -1
-};
-
-/**
- * @brief SmartArray type
- **/
-typedef std::vector<SmartObject> SmartArray;
-
-/**
- * @brief SmartMap type
- **/
-typedef std::map<std::string, SmartObject> SmartMap;
-
-/**
- * @brief SmartBinary type
- **/
-typedef std::vector<uint8_t> SmartBinary;
-
-/**
- * @brief Main SmartObject class
- *
- * This class act as Variant type from other languages and can be used as primitive type
- * like bool, int32_t, char, double, string and as complex type like array and map.
- **/
-class SmartObject {
- public:
- /**
- * @brief Constructor.
- *
- * Creates object with Null type.
- **/
- SmartObject();
-
- /**
- * @brief Copy constructor.
- *
- * @param Other Object to be copied from.
- **/
- SmartObject(const SmartObject& Other);
-
- /**
- * @brief Constructor for creating object of given primitive type.
- *
- * Only primitive types (bool, int32_t, char, double, string) are supported.
- *
- * @param type Type of the created object.
- **/
- explicit SmartObject(SmartType Type);
-
- /**
- * @brief Destructor
- *
- **/
- ~SmartObject();
-
- /**
- * @brief Assignment operator.
- *
- * @param Other Other SmartObject
- * @return SmartObject&
- **/
- SmartObject& operator=(const SmartObject& Other);
-
- /**
- * @brief Comparison operator
- *
- * @param Other Other SmartObject to be compared with
- * @return bool Result of comparison
- **/
- bool operator==(const SmartObject& Other) const;
-
- /**
- * @name Support of type: int32_t
- * @{
- */
- /**
- * @brief Constructor for creating object of type: int32_t
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(int32_t InitialValue);
-
- /**
- * @brief Returns current object converted to int32_t
- *
- * @return int32_t
- **/
- int32_t asInt() const;
-
- /**
- * @brief Assignment operator for type: int32_t
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(int32_t NewValue);
-
- /**
- * @brief Comparison operator for comparing object with integer value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(int32_t Value) const;
-
- // Support of type: uint32_t
- /**
- * @brief Constructor for creating object of type: int32_t
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(uint32_t InitialValue);
-
- /**
- * @brief Returns current object converted to uint32_t int32_t
- *
- * @return double
- **/
- uint32_t asUInt() const;
-
- /**
- * @brief Assignment operator for type: int32_t
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(uint32_t NewValue);
-
- /**
- * @brief Comparison operator for comparing object with uint32_t value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(uint32_t Value) const;
-
- /** @} */
-
- /**
- * @name Support of type: double
- * @{
- */
- /**
- * @brief Constructor for creating object of type: double
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(double InitialValue);
-
- /**
- * @brief Returns current object converted to double
- *
- * @return double
- **/
- double asDouble() const;
-
- /**
- * @brief Assignment operator for type: double
- *
- * @param new_value New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(double new_value);
-
- /**
- * @brief Comparison operator for comparing object with double value
- *
- * @param new_value Value to compare object with
- * @return bool
- **/
- bool operator==(double new_value) const;
- /** @} */
-
- /**
- * @name Support of type: bool
- * @{
- */
- /**
- * @brief Constructor for creating object of type: bool
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(bool InitialValue);
-
- /**
- * @brief Returns current object converted to bool
- *
- * @return bool
- **/
- bool asBool() const;
-
- /**
- * @brief Assignment operator for type: bool
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(bool NewValue);
-
- /**
- * @brief Comparison operator for comparing object with bool value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(bool Value) const;
- /** @} */
-
- /**
- * @name Support of type: char
- * @{
- */
- /**
- * @brief Constructor for creating object of type: char
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(char InitialValue);
-
- /**
- * @brief Conversion operator to type: char
- *
- * @return char Value of the object converted to bool type or invalid_char_value if
- * conversion is not possible
- **/
- // operator char() const;
- /**
- * @brief Returns current object converted to char
- *
- * @return char
- **/
- char asChar() const;
-
- /**
- * @brief Assignment operator for type: char
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(char NewValue);
-
- /**
- * @brief Comparison operator for comparing object with char value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(char Value) const;
- /** @} */
-
- /**
- * @name Support of type: string
- * @{
- */
- /**
- * @brief Constructor for creating object of type: string
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(const std::string& InitialValue);
-
- /**
- * @brief Constructor for creating object of type: string
- *
- * @param InitialValue Initial object value
- **/
- explicit SmartObject(char* InitialValue);
-
- /**
- * @brief Conversion operator to type: string
- *
- * @return std::string Value of the object converted to bool type or invalid_string_value if
- * conversion is not possible
- **/
- // operator std::string(void) const;
- /**
- * @brief Returns current object converted to string
- *
- * @return std::string
- **/
- std::string asString() const;
-
- /**
- * @brief Returns char array from SmartObject data if exist. Otherwise returns
- * empty string
- *
- * @return const char*
- **/
- const char* asCharArray() const;
-
- /**
- * @brief Assignment operator for type: string
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(const std::string& NewValue);
-
- /**
- * @brief Assignment operator for type: string
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(const char* NewValue);
-
- /**
- * @brief Comparison operator for comparing object with string value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(std::string Value) const;
-
- /**
- * @brief Comparison operator for comparing object with string value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(const char* Value) const;
- /** @} */
-
- /**
- * @name Support of type: binary
- * @{
- */
- /**
- * @brief Constructor for creating object of type: binary
- *
- * @param InitialValue Initial binary value
- **/
- explicit SmartObject(const SmartBinary& InitialValue);
-
- /**
- * @brief Conversion operator to type: binary
- *
- * @return SmartBinary Value of the object converted to binary type or invalid_binary_value if
- * conversion is not possible
- **/
- // operator SmartBinary(void) const;
- /**
- * @brief Returns current object converted to binary
- *
- * @return SmartBinary
- **/
- SmartBinary asBinary() const;
-
- /**
- * @brief Returns current object converted to array
- *
- * @return SmartArray
- **/
- SmartArray* asArray() const;
-
- /**
- * @brief Assignment operator for type: binary
- *
- * @param NewValue New object value
- * @return SmartObject&
- **/
- SmartObject& operator=(SmartBinary);
-
- /**
- * @brief Comparison operator for comparing object with binary value
- *
- * @param Value Value to compare object with
- * @return bool
- **/
- bool operator==(SmartBinary) const;
- /** @} */
-
- /**
- * @name Array interface support
- * @{
- */
- /**
- * @brief Support of array-like access
- *
- * @param Index index of element to return
- * @return SmartObject&
- **/
- SmartObject& operator[](int32_t Index);
- const SmartObject& operator[](int32_t Index) const;
-
- /**
- * @brief Get array element.
- *
- * This method does not automatically convert the object to an array or
- * add elements. If this object is not an array or index is out of
- * range then null object is returned.
- *
- * @param Index Index of an element.
- *
- * @return Element of array or null object if element can't be provided.
- **/
- const SmartObject & getElement(size_t Index) const;
-
- /** @} */
-
- /**
- * @name Map/Hashtable interface support
- * @{
- */
- /**
- * @brief Support of map-like access
- *
- * @param Key Key of element to return
- * @return SmartObject&
- **/
- SmartObject& operator[](const std::string Key);
- const SmartObject& operator[](const std::string Key) const;
-
- /**
- * @brief Support of map-like access
- *
- * @param Key Key of element to return
- * @return SmartObject&
- **/
- SmartObject& operator[](char* Key);
- const SmartObject& operator[](char* Key) const;
-
- /**
- * @brief Support of map-like access
- *
- * @param Key Key of element to return
- * @return SmartObject&
- **/
- SmartObject& operator[](const char* Key);
-
- /**
- * @brief Support of map-like access
- *
- * @param Key Key of element to return
- * @return const SmartObject&
- **/
- const SmartObject& operator[](const char* Key) const;
-
- /**
- * @brief Get map element.
- *
- * This method does not automatically convert the object to a map or
- * add elements. If this object is not a map or it does not contain
- * key then invalid object is returned.
- *
- * @param Key Key of an element.
- *
- * @return Element of map or null object if element can't be provided.
- **/
- const SmartObject & getElement(const std::string & Key) const;
-
- /**
- * @brief Enumerates content of the object when it behaves like a map.
- *
- * @return Set of map keys or empty set if object has type other than map
- **/
- std::set<std::string> enumerate() const;
-
- /**
- * @brief Checks for key presense when object is behaves like a map
- *
- * @param Key Key to check presense for
- * @return bool
- **/
- bool keyExists(const std::string & Key) const;
-
- /**
- * @brief Removes element from the map.
- *
- * @param Key Key of the element.
- *
- * @return true if success, false if there is no such element in the map
- */
- bool erase(const std::string & Key);
- /** @} */
-
- /**
- * @name Validation and schema support
- * @{
- */
- /**
- * @brief Validates object according to attached schema.
- *
- * @return bolean validation result
- **/
- bool isValid() const;
-
- /**
- * @brief Validates object according to attached schema.
- *
- * @return Result of validation.
- */
- Errors::eType validate();
-
- /**
- * @brief Sets new schema
- *
- * @param schema Schema for object validation
- * @return void
- **/
- void setSchema(CSmartSchema schema);
-
- /**
- * @brief Returns attached schema
- *
- * @return CSmartSchema
- **/
- CSmartSchema getSchema();
- /** @} */
-
- /**
- * @brief Returns current object type
- *
- * @return NsSmartObjects::SmartType
- **/
- SmartType getType() const;
-
- /**
- * @brief Returns length of object
- *
- * If object has type string, array or map then method returns corresponded
- * size. Otherwise returns zero.
- *
- * @note This method does not return size of binary data.
- *
- * @return size_t Length of the object
- **/
- size_t length() const;
-
- protected:
- static std::string OperatorToTransform(const SmartMap::value_type &pair) ;
- /**
- * @name Support of type: int32_t (internal)
- * @{
- */
- /**
- * @brief Sets new integer value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_integer(int32_t NewValue);
-
- /**
- * @brief Sets new integer value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_unsigned_int(uint32_t NewValue);
-
- /**
- * @brief Converts object to int32_t type
- *
- * @return int32_t Converted value or invalid_int_value if conversion not possible
- **/
- inline int32_t convert_int() const;
-
- /**
- * @brief Converts object to int32_t type
- *
- * @return int32_t Converted value or invalid_int_value if conversion not possible
- **/
- inline uint32_t convert_unsigned_int() const;
- /** @} */
-
- /**
- * @name Support of type: char (internal)
- * @{
- */
- /**
- * @brief Sets new char value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_char(char NewValue);
-
- /**
- * @brief Converts object to char type
- *
- * @return int32_t Converted value or invalid_char_value if conversion not possible
- **/
- inline char convert_char() const;
- /** @} */
-
- /**
- * @name Support of type: double (internal)
- * @{
- */
- /**
- * @brief Sets new double value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_double(double NewValue);
-
- /**
- * @brief Converts object to double type
- *
- * @return int32_t Converted value or invalid_double_value if conversion not possible
- **/
- inline double convert_double() const;
- /** @} */
-
- /**
- * @name Support of type: bool (internal)
- * @{
- */
- /**
- * @brief Sets new bool value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_bool(bool NewValue);
-
- /**
- * @brief Converts object to bool type
- *
- * @return int32_t Converted value or invalid_bool_value if conversion not possible
- **/
- inline bool convert_bool() const;
- /** @} */
-
- /**
- * @name Support of type: string (internal)
- * @{
- */
- /**
- * @brief Sets new string value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_string(const std::string& NewValue);
-
- /**
- * @brief Sets new string value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_cstr(const char* NewValue);
-
- /**
- * @brief Converts object to string type
- *
- * @return int32_t Converted value or invalid_string_value if conversion not possible
- **/
- inline std::string convert_string() const;
- /** @} */
-
- /**
- * @name Support of type: binary (internal)
- * @{
- */
- /**
- * @brief Sets new binary value to the object.
- *
- * This method changes also internal object type
- *
- * @param NewValue New object value
- * @return void
- **/
- inline void set_value_binary(SmartBinary NewValue);
-
- /**
- * @brief Converts object to binary type
- *
- * @return int32_t Converted value or invalid_binary_value if conversion not possible
- **/
- inline SmartBinary convert_binary() const;
- /** @} */
-
- /**
- * @name Array-like interface support (internal)
- * @{
- */
- /**
- * @brief Returns SmartObject from internal array data by it's index
- *
- * @param Index Index of element to retrieve
- * @return SmartObject&
- **/
- SmartObject& handle_array_access(int32_t Index);
- /** @} */
-
- /**
- * @name Map-like interface support (internal)
- * @{
- */
- /**
- * @brief Returns SmartObject from internal map data by it's key
- *
- * @param Key Key of element to retrieve
- * @return SmartObject&
- **/
- inline SmartObject& handle_map_access(std::string Key);
- /** @} */
-
- /**
- * @name Helper conversion methods
- * @{
- */
- /**
- * @brief Converts string to double
- *
- * @param Value Pointer to string to convert
- * @return double
- **/
- static double convert_string_to_double(const std::string* Value);
-
- /**
- * @brief Converts string to uint32_t
- *
- * @param Value Pointer to string to convert
- * @return uint32_t int32_t
- **/
- static uint32_t convert_string_to_unsigned_int(const std::string* Value);
-
- /**
- * @brief Converts double value to string
- *
- * @param Value Value to be converted
- * @return std::string
- **/
- static std::string convert_double_to_string(const double& Value);
- /** @} */
-
- /**
- * @brief Duplicates another SmartObject
- *
- * After calling that function current SmartObject will have the same
- * type, schema and data, as passed.
- *
- * @param OtherObject Object to be duplicated
- * @return void
- **/
- void duplicate(const SmartObject& OtherObject);
-
- /**
- * @brief Cleans up internal data for some types (like string, array or map)
- *
- * @return void
- **/
- void cleanup_data();
-
- /**
- * @brief Sets new internal type and cleans up if it changes
- *
- * @param NewType New object type
- * @return void
- **/
- void set_new_type(SmartType NewType);
-
- /**
- * @brief Current type of the object
- **/
- SmartType m_type;
-
- /**
- * @brief Union for holding actual internal object data
- **/
- typedef union {
- double double_value;
- bool bool_value;
- char char_value;
- int32_t int_value;
- // uint32_t unsigned_int_value;
- std::string* str_value;
- SmartArray* array_value;
- SmartMap* map_value;
- SmartBinary* binary_value;
- } SmartData;
-
- /**
- * @brief Current internal object data
- **/
- SmartData m_data;
-
- /**
- * @brief Validation schema, attached to the object
- **/
- CSmartSchema m_schema;
-};
-
-/**
- * @brief Value that is used as invalid value for bool type
- **/
-static const bool invalid_bool_value = false;
-
-/**
- * @brief Value that is used as invalid value for int32_t type
- **/
-static const int32_t invalid_int_value = -1;
-static const int32_t invalid_unsigned_int_value = 0;
-
-/**
- * @brief Value that is used as invalid value for char type
- **/
-static const char invalid_char_value = 0;
-
-/**
- * @brief Value that is used as invalid value for string type
- **/
-static const std::string invalid_string_value = "";
-
-/**
- * @brief Value that is used as invalid value for double type
- **/
-static const double invalid_double_value = -1;
-
-/**
- * @brief Value that is used as invalid value for string type
- **/
-static const char* invalid_cstr_value = "";
-
-/**
- * @brief Value that is used as invalid value for object type
- **/
-static SmartObject invalid_object_value(SmartType_Invalid);
-
-/**
- * @brief Value that is used as invalid value for object type
- **/
-static const SmartBinary invalid_binary_value;
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_OBJECT_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/smart_schema.h b/SDL_Core/src/components/smart_objects/include/smart_objects/smart_schema.h
deleted file mode 100644
index d00088962..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/smart_schema.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_SCHEMA_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_SCHEMA_H_
-
-#include "utils/shared_ptr.h"
-#include "smart_objects/schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-class SmartObject;
-
-/**
- * @brief Smart Schema.
- */
-class CSmartSchema {
- public:
- /**
- * @brief Constructor.
- *
- * Default constructor. Creates empty schema.
- */
- CSmartSchema();
-
- /**
- * @brief Constructor.
- *
- * Creates schema with given root schema item.
- *
- * @param SchemaItem Root schema item.
- */
- explicit CSmartSchema(utils::SharedPtr<ISchemaItem> SchemaItem);
-
- /**
- * @brief Validate smart object.
- *
- * @param Object SmartObject to validate.
- *
- * @return Result of validation.
- */
- Errors::eType validate(const SmartObject& Object) const;
-
- /**
- * @brief Set new root schema item.
- *
- * @param SchemaItem Root schema item.
- */
- void setSchemaItem(utils::SharedPtr<ISchemaItem> SchemaItem);
-
- /**
- * @brief Apply schema.
- *
- * @param Object Object to apply schema.
- **/
- virtual void applySchema(SmartObject& Object);
-
- /**
- * @brief The reverse SmartObject conversion using schema.
- *
- * @param object Object to convert.
- */
- // TODO(cpplint): Is this a non-const reference?
- // If so, make const or use a pointer.
- virtual void unapplySchema(SmartObject& object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) const;
-
- virtual ~CSmartSchema() {
- }
-
- protected:
- /**
- * @brief Root schema item.
- */
- utils::SharedPtr<ISchemaItem> mSchemaItem;
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_SCHEMA_H_
diff --git a/SDL_Core/src/components/smart_objects/include/smart_objects/string_schema_item.h b/SDL_Core/src/components/smart_objects/include/smart_objects/string_schema_item.h
deleted file mode 100644
index f934e7bd4..000000000
--- a/SDL_Core/src/components/smart_objects/include/smart_objects/string_schema_item.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_STRING_SCHEMA_ITEM_H_
-#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_STRING_SCHEMA_ITEM_H_
-
-#include <stddef.h>
-#include <string>
-
-#include "utils/shared_ptr.h"
-
-#include "smart_objects/schema_item.h"
-#include "smart_objects/schema_item_parameter.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-/**
- * @brief String schema item.
- **/
-class CStringSchemaItem : public ISchemaItem {
- public:
- /**
- * @brief Create a new schema item.
- *
- * @param MaxLength Maximum allowed string length.
- * @param DefaultValue Default value.
- *
- * @return Shared pointer to a new schema item.
- **/
- static utils::SharedPtr<CStringSchemaItem> create(
- const TSchemaItemParameter<size_t>& MinLength = TSchemaItemParameter<
- size_t>(),
- const TSchemaItemParameter<size_t>& MaxLength = TSchemaItemParameter<
- size_t>(),
- const TSchemaItemParameter<std::string>& DefaultValue =
- TSchemaItemParameter<std::string>());
-
- /**
- * @brief Validate smart object.
- *
- * @param Object Object to validate.
- *
- * @return NsSmartObjects::Errors::eType
- **/
- virtual Errors::eType validate(const SmartObject& Object);
-
- /**
- * @brief Set default value to an object.
- *
- * @param Object Object to set default value.
- *
- * @return true if default value was successfully set, false otherwise.
- **/
- virtual bool setDefaultValue(SmartObject& Object);
-
- /**
- * @brief Build smart object by smart schema having copied matched
- * parameters from pattern smart object
- *
- * @param pattern_object pattern object
- * @param result_object object to build
- */
- virtual void BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object);
-
- virtual ~CStringSchemaItem() {
- }
-
- private:
- /**
- * @brief Constructor.
- *
- * @param MaxLength Maximum allowed string length.
- * @param DefaultValue Default value.
- **/
- CStringSchemaItem(const TSchemaItemParameter<size_t>& MinLength,
- const TSchemaItemParameter<size_t>& MaxLength,
- const TSchemaItemParameter<std::string>& DefaultValue);
-
- /**
- * @brief Copy constructor.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- **/
- CStringSchemaItem(const CStringSchemaItem& Other);
-
- /**
- * @brief Assignment operator.
- *
- * Not implemented to prevent misuse.
- *
- * @param Other Other schema item.
- *
- * @return Not implemented.
- **/
- CStringSchemaItem & operator =(const CStringSchemaItem& Other);
-
- /**
- * @brief Minimum allowed string length.
- **/
- const TSchemaItemParameter<size_t> mMinLength;
-
- /**
- * @brief Maximum allowed string length.
- **/
- const TSchemaItemParameter<size_t> mMaxLength;
-
- /**
- * @brief Default value.
- **/
- const TSchemaItemParameter<std::string> mDefaultValue;
-};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
-#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_STRING_SCHEMA_ITEM_H_
diff --git a/SDL_Core/src/components/smart_objects/src/always_false_schema_item.cc b/SDL_Core/src/components/smart_objects/src/always_false_schema_item.cc
deleted file mode 100644
index 95209b7c7..000000000
--- a/SDL_Core/src/components/smart_objects/src/always_false_schema_item.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/always_false_schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-CAlwaysFalseSchemaItem::CAlwaysFalseSchemaItem(void) {
-}
-
-utils::SharedPtr<CAlwaysFalseSchemaItem> CAlwaysFalseSchemaItem::create(void) {
- return new CAlwaysFalseSchemaItem();
-}
-
-Errors::eType CAlwaysFalseSchemaItem::validate(const SmartObject& object) {
- return Errors::ERROR;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/always_true_schema_item.cc b/SDL_Core/src/components/smart_objects/src/always_true_schema_item.cc
deleted file mode 100644
index 8f486a15f..000000000
--- a/SDL_Core/src/components/smart_objects/src/always_true_schema_item.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/always_true_schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-CAlwaysTrueSchemaItem::CAlwaysTrueSchemaItem(void) {
-}
-
-utils::SharedPtr<CAlwaysTrueSchemaItem> CAlwaysTrueSchemaItem::create(void) {
- return new CAlwaysTrueSchemaItem();
-}
-
-Errors::eType CAlwaysTrueSchemaItem::validate(const SmartObject& object) {
- return Errors::OK;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/array_schema_item.cc b/SDL_Core/src/components/smart_objects/src/array_schema_item.cc
deleted file mode 100644
index 1888d3d79..000000000
--- a/SDL_Core/src/components/smart_objects/src/array_schema_item.cc
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/array_schema_item.h"
-#include "smart_objects/smart_object.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-utils::SharedPtr<CArraySchemaItem> CArraySchemaItem::create(
- const utils::SharedPtr<ISchemaItem> & ElementSchemaItem,
- const TSchemaItemParameter<size_t> & MinSize,
- const TSchemaItemParameter<size_t> & MaxSize) {
- return new CArraySchemaItem(ElementSchemaItem, MinSize, MaxSize);
-}
-
-Errors::eType CArraySchemaItem::validate(const SmartObject& Object) {
- Errors::eType result = Errors::ERROR;
-
- if (SmartType_Array == Object.getType()) {
- result = Errors::OK;
- size_t sizeLimit;
-
- if (true == mMinSize.getValue(sizeLimit)) {
- if (Object.length() < sizeLimit) {
- result = Errors::OUT_OF_RANGE;
- }
- }
-
- if ((Errors::OK == result) && (true == mMaxSize.getValue(sizeLimit))) {
- if (Object.length() > sizeLimit) {
- result = Errors::OUT_OF_RANGE;
- }
- }
-
- if (Errors::OK == result) {
- for (size_t i = 0U; i < Object.length(); ++i) {
- result = mElementSchemaItem->validate(Object.getElement(i));
-
- if (Errors::OK != result) {
- break;
- }
- }
- }
- } else {
- result = Errors::INVALID_VALUE;
- }
-
- return result;
-}
-
-void CArraySchemaItem::applySchema(SmartObject& Object) {
- if (SmartType_Array == Object.getType()) {
- for (size_t i = 0U; i < Object.length(); ++i) {
- mElementSchemaItem->applySchema(Object[i]);
- }
- }
-}
-
-void CArraySchemaItem::unapplySchema(SmartObject& Object) {
- if (SmartType_Array == Object.getType()) {
- for (size_t i = 0U; i < Object.length(); ++i) {
- mElementSchemaItem->unapplySchema(Object[i]);
- }
- }
-}
-
-void CArraySchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) {
- if (SmartType_Array == pattern_object.getType()) {
- int32_t array_len = pattern_object.length();
- if (array_len > 0) {
- for (int32_t i = 0; i < array_len; i++) {
- mElementSchemaItem->BuildObjectBySchema(pattern_object.getElement(i),
- result_object[i]);
- }
- return;
- }
- }
- // empty array
- result_object = SmartObject(SmartType_Array);
-}
-
-CArraySchemaItem::CArraySchemaItem(
- const utils::SharedPtr<ISchemaItem>& ElementSchemaItem,
- const TSchemaItemParameter<size_t>& MinSize,
- const TSchemaItemParameter<size_t>& MaxSize)
- : mElementSchemaItem(ElementSchemaItem),
- mMinSize(MinSize),
- mMaxSize(MaxSize) {
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/bool_schema_item.cc b/SDL_Core/src/components/smart_objects/src/bool_schema_item.cc
deleted file mode 100644
index 11d8c667f..000000000
--- a/SDL_Core/src/components/smart_objects/src/bool_schema_item.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/bool_schema_item.h"
-#include "smart_objects/smart_object.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-utils::SharedPtr<CBoolSchemaItem> CBoolSchemaItem::create(
- const TSchemaItemParameter<bool> & DefaultValue) {
- return new CBoolSchemaItem(DefaultValue);
-}
-
-Errors::eType CBoolSchemaItem::validate(const SmartObject& Object) {
- return
- (true == SmartType_Boolean == Object.getType()) ?
- Errors::OK : Errors::INVALID_VALUE;
-}
-
-bool CBoolSchemaItem::setDefaultValue(SmartObject& Object) {
- bool result = false;
- bool value = false;
-
- if (true == mDefaultValue.getValue(value)) {
- Object = value;
- result = true;
- }
-
- return result;
-}
-
-void CBoolSchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) {
- if (SmartType_Boolean == pattern_object.getType()) {
- result_object = pattern_object;
- } else {
- bool result = setDefaultValue(result_object);
- if (false == result) {
- result_object = false;
- }
- }
-}
-
-CBoolSchemaItem::CBoolSchemaItem(
- const TSchemaItemParameter<bool>& DefaultValue)
- : mDefaultValue(DefaultValue) {
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
diff --git a/SDL_Core/src/components/smart_objects/src/enum_schema_item.cc b/SDL_Core/src/components/smart_objects/src/enum_schema_item.cc
deleted file mode 100644
index ec2236b61..000000000
--- a/SDL_Core/src/components/smart_objects/src/enum_schema_item.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/enum_schema_item.h"
diff --git a/SDL_Core/src/components/smart_objects/src/number_schema_item.cc b/SDL_Core/src/components/smart_objects/src/number_schema_item.cc
deleted file mode 100644
index dc87da2df..000000000
--- a/SDL_Core/src/components/smart_objects/src/number_schema_item.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/number_schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-template<> SmartType TNumberSchemaItem<int32_t>::getSmartType() {
- return SmartType_Integer;
-}
-
-template<> SmartType TNumberSchemaItem<uint32_t>::getSmartType() {
- return SmartType_Integer;
-}
-
-template<> SmartType TNumberSchemaItem<double>::getSmartType() {
- return SmartType_Double;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/object_optional_schema_item.cc b/SDL_Core/src/components/smart_objects/src/object_optional_schema_item.cc
deleted file mode 100644
index 7765a0e3a..000000000
--- a/SDL_Core/src/components/smart_objects/src/object_optional_schema_item.cc
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * @file object_optional_schema_item.cc
- * @brief Schema item of object with optional parameters.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/object_optional_schema_item.h"
-#include "smart_objects/always_false_schema_item.h"
-#include "smart_objects/smart_object.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
-
-const char* smart_objects::ObjectOptionalSchemaItem::kOptionalGenericFieldName
- = "<-- @@@@$$$&&& uniqe1 uancdm,vn 991188 --->";
-
-
-//----------------------------------------------------------------------------
-
-utils::SharedPtr<smart_objects::ObjectOptionalSchemaItem>
- smart_objects::ObjectOptionalSchemaItem::create(
- const std::map<std::string,
- smart_objects::CObjectSchemaItem::SMember> & members) {
- return new ObjectOptionalSchemaItem(members);
-}
-
-//----------------------------------------------------------------------------
-
-smart_objects::Errors::eType smart_objects::ObjectOptionalSchemaItem::validate(
- const smart_objects::SmartObject & object) {
- smart_objects::Errors::eType result = smart_objects::Errors::ERROR;
-
- if (NsSmartDeviceLink::NsSmartObjects::SmartType_Map == object.getType()) {
- result = smart_objects::Errors::OK;
- const std::set<std::string> object_keys = object.enumerate();
-
- for (std::map<std::string, CObjectSchemaItem::SMember>
- ::const_iterator i = mMembers.begin(); i != mMembers.end(); ++i) {
- if (object_keys.end() != object_keys.find(i->first)) {
- result = i->second.mSchemaItem->validate(object.getElement(i->first));
- } else if (true == i->second.mIsMandatory
- && false == IsOptionalName(i->first)) {
- result = smart_objects::Errors::MISSING_MANDATORY_PARAMETER;
- }
- if (smart_objects::Errors::OK != result) {
- break;
- }
- }
-
- bool have_optional_parameter = false;
- std::map<std::string, CObjectSchemaItem::SMember>::const_iterator
- optional_iterator = mMembers.find(kOptionalGenericFieldName);
- if (smart_objects::Errors::OK == result) {
- for (std::set<std::string>::const_iterator k = object_keys.begin();
- k != object_keys.end(); ++k) {
- if (mMembers.end() == mMembers.find(*k)) {
- // this key is supposed as optional
- if (mMembers.end() != optional_iterator) {
- // validate optional (having any name) object member
- have_optional_parameter = true;
- result = optional_iterator->
- second.mSchemaItem->validate(object.getElement(*k));
- } else {
- result = smart_objects::Errors::UNEXPECTED_PARAMETER;
- break;
- }
- if (smart_objects::Errors::OK != result) {
- break;
- }
- }
- }
- if (false == have_optional_parameter
- && mMembers.end() != optional_iterator
- && true == optional_iterator->second.mIsMandatory) {
- result = smart_objects::Errors::MISSING_MANDATORY_UNTITLED_PARAMETER;
- }
- }
- } else {
- result = smart_objects::Errors::INVALID_VALUE;
- }
-
- return result;
-}
-
-//----------------------------------------------------------------------------
-
-bool smart_objects::ObjectOptionalSchemaItem::IsOptionalName(
- const std::string& name) {
- return (0 == name.compare(kOptionalGenericFieldName));
-}
-
-//----------------------------------------------------------------------------
-
-smart_objects::ObjectOptionalSchemaItem::ObjectOptionalSchemaItem(
- const std::map<std::string,
- smart_objects::CObjectSchemaItem::SMember> & members):
- CObjectSchemaItem(members) {
-}
-
-//----------------------------------------------------------------------------
-
-std::set<std::string>
-ObjectOptionalSchemaItem::GetOptionalObjectKeys(const SmartObject& root_obj) {
- std::set<std::string> optional_objects;
-
- const std::set<std::string> object_keys = root_obj.enumerate();
- typedef std::set<std::string>::const_iterator Iter;
- for (Iter k = object_keys.begin(); k != object_keys.end(); ++k) {
- // if an object is not among the schema items then it is optional
- if (mMembers.end() == mMembers.find(*k)) {
- optional_objects.insert(*k);
- }
- }
-
- return optional_objects;
-}
-
-//----------------------------------------------------------------------------
-
-void ObjectOptionalSchemaItem::IterateOverOptionalItems(SmartObject* object,
- void (ISchemaItem::* action)(SmartObject&) ) {
- if (0 == mMembers.count(kOptionalGenericFieldName)) {
- return; // There are no optional items
- }
-
- utils::SharedPtr<ISchemaItem> schema =
- mMembers.at(kOptionalGenericFieldName).mSchemaItem;
-
- // Then apply schema for all the optional objects
- std::set<std::string> optionals = GetOptionalObjectKeys(*object);
- typedef std::set<std::string>::const_iterator Iter;
- for (Iter key = optionals.begin(); key != optionals.end(); ++key) {
- (schema.get()->*action)((*object)[*key]);
- }
-}
-
-//----------------------------------------------------------------------------
-
-void ObjectOptionalSchemaItem::applySchema(SmartObject & object) {
- // At first apply schema for the regular objects
- CObjectSchemaItem::applySchema(object);
-
- IterateOverOptionalItems(&object, &ISchemaItem::applySchema);
-}
-
-//----------------------------------------------------------------------------
-
-void ObjectOptionalSchemaItem::unapplySchema(SmartObject & object) {
- CObjectSchemaItem::unapplySchema(object);
-
- IterateOverOptionalItems(&object, &ISchemaItem::unapplySchema);
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
-
diff --git a/SDL_Core/src/components/smart_objects/src/object_schema_item.cc b/SDL_Core/src/components/smart_objects/src/object_schema_item.cc
deleted file mode 100644
index 90591a488..000000000
--- a/SDL_Core/src/components/smart_objects/src/object_schema_item.cc
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/always_false_schema_item.h"
-#include "smart_objects/object_schema_item.h"
-#include "smart_objects/smart_object.h"
-
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-CObjectSchemaItem::SMember::SMember()
- : mSchemaItem(CAlwaysFalseSchemaItem::create()),
- mIsMandatory(true) {
-}
-
-CObjectSchemaItem::SMember::SMember(
- const utils::SharedPtr<CObjectSchemaItem::ISchemaItem>& SchemaItem,
- const bool IsMandatory)
- : mSchemaItem(SchemaItem),
- mIsMandatory(IsMandatory) {
-}
-
-utils::SharedPtr<CObjectSchemaItem> CObjectSchemaItem::create(
- const std::map<std::string, CObjectSchemaItem::SMember>& Members) {
- return new CObjectSchemaItem(Members);
-}
-
-Errors::eType CObjectSchemaItem::validate(const SmartObject& Object) {
- Errors::eType result = Errors::ERROR;
-
- if (SmartType_Map == Object.getType()) {
- result = Errors::OK;
- const std::set<std::string> objectKeys = Object.enumerate();
-
- for (std::map<std::string, CObjectSchemaItem::SMember>::const_iterator i =
- mMembers.begin(); i != mMembers.end(); ++i) {
- if (objectKeys.end() != objectKeys.find(i->first)) {
- result = i->second.mSchemaItem->validate(Object.getElement(i->first));
- } else {
- if (i->second.mIsMandatory) {
- result = Errors::MISSING_MANDATORY_PARAMETER;
- }
- }
-
- if (Errors::OK != result) {
- break;
- }
- }
-
- if (Errors::OK == result) {
- for (std::set<std::string>::const_iterator k = objectKeys.begin();
- k != objectKeys.end(); ++k) {
- if (mMembers.end() == mMembers.find(*k)) {
- result = Errors::UNEXPECTED_PARAMETER;
- break;
- }
- }
- }
- } else {
- result = Errors::INVALID_VALUE;
- }
-
- return result;
-}
-
-void CObjectSchemaItem::applySchema(SmartObject& Object) {
- if (SmartType_Map == Object.getType()) {
- for (std::map<std::string, CObjectSchemaItem::SMember>::const_iterator i =
- mMembers.begin(); i != mMembers.end(); ++i) {
- if (Object.keyExists(i->first)) {
- i->second.mSchemaItem->applySchema(Object[i->first]);
- }
- }
- }
-}
-
-void CObjectSchemaItem::unapplySchema(SmartObject& Object) {
- if (SmartType_Map == Object.getType()) {
- for (std::map<std::string, CObjectSchemaItem::SMember>::const_iterator i =
- mMembers.begin(); i != mMembers.end(); ++i) {
- if (Object.keyExists(i->first)) {
- i->second.mSchemaItem->unapplySchema(Object[i->first]);
- }
- }
- }
-}
-
-void CObjectSchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) {
- result_object = SmartObject(SmartType_Map);
-
- if (SmartType_Map == pattern_object.getType()) {
- for (std::map<std::string, CObjectSchemaItem::SMember>::const_iterator i =
- mMembers.begin(); i != mMembers.end(); ++i) { // for
- if (pattern_object.keyExists(i->first)) {
- i->second.mSchemaItem->BuildObjectBySchema(
- pattern_object.getElement(i->first), result_object[i->first]);
- } else if (i->second.mIsMandatory) {
- i->second.mSchemaItem->BuildObjectBySchema(SmartObject(),
- result_object[i->first]);
- }
- } // for
- } else {
- bool is_any_mandatory_field = false;
- for (std::map<std::string, CObjectSchemaItem::SMember>::const_iterator i =
- mMembers.begin(); i != mMembers.end(); ++i) { // for
- if (i->second.mIsMandatory) {
- is_any_mandatory_field = true;
- i->second.mSchemaItem->BuildObjectBySchema(SmartObject(),
- result_object[i->first]);
- }
- } // for
- }
-}
-
-CObjectSchemaItem::CObjectSchemaItem(
- const std::map<std::string, CObjectSchemaItem::SMember>& Members)
- : mMembers(Members) {
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/schema_item.cc b/SDL_Core/src/components/smart_objects/src/schema_item.cc
deleted file mode 100644
index 60386442c..000000000
--- a/SDL_Core/src/components/smart_objects/src/schema_item.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-Errors::eType ISchemaItem::validate(const SmartObject& object) {
- return Errors::ERROR;
-}
-
-bool ISchemaItem::setDefaultValue(SmartObject& Object) {
- return false;
-}
-
-void ISchemaItem::applySchema(SmartObject& Object) {
-}
-
-void ISchemaItem::unapplySchema(SmartObject& Object) {
-}
-
-void ISchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) {
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/smart_object.cc b/SDL_Core/src/components/smart_objects/src/smart_object.cc
deleted file mode 100644
index 581b324e9..000000000
--- a/SDL_Core/src/components/smart_objects/src/smart_object.cc
+++ /dev/null
@@ -1,1015 +0,0 @@
-/**
- * @file SmartObject.cpp
- * @brief SmartObject source file.
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/smart_object.h"
-
-#include <errno.h>
-#include <stdlib.h>
-#include <cstdio>
-#include <algorithm>
-#include <sstream>
-#include <iomanip>
-#include <iterator>
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-SmartObject::SmartObject()
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
-}
-
-SmartObject::SmartObject(const SmartObject& Other)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- duplicate(Other);
-}
-
-SmartObject::SmartObject(SmartType Type)
- : m_type(SmartType_Null),
- m_schema() {
- switch (Type) {
- case SmartType_Integer:
- set_value_unsigned_int(0);
- break;
- case SmartType_Double:
- set_value_double(0);
- break;
- case SmartType_Boolean:
- set_value_bool(false);
- break;
- case SmartType_Character:
- set_value_char(' ');
- break;
- case SmartType_String:
- set_value_string("");
- break;
- case SmartType_Map:
- m_data.map_value = new SmartMap();
- m_type = SmartType_Map;
- break;
- case SmartType_Array:
- m_data.array_value = new SmartArray();
- m_type = SmartType_Array;
- break;
- case SmartType_Binary:
- set_value_binary(SmartBinary());
- break;
- case SmartType_Invalid:
- m_type = SmartType_Invalid;
- break;
- default: {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- break;
- }
- }
-}
-
-SmartObject::~SmartObject() {
- cleanup_data();
-}
-
-SmartObject& SmartObject::operator=(const SmartObject& Other) {
- if (this != &Other)
- duplicate(Other);
- return *this;
-}
-
-bool SmartObject::operator==(const SmartObject& Other) const {
- if (m_type != Other.m_type)
- return false;
-
- switch (m_type) {
- case SmartType_Integer:
- return m_data.int_value == Other.m_data.int_value;
- case SmartType_Double:
- return m_data.double_value == Other.m_data.double_value;
- case SmartType_Boolean:
- return m_data.bool_value == Other.m_data.bool_value;
- case SmartType_Character:
- return m_data.char_value == Other.m_data.char_value;
- case SmartType_String:
- return *(m_data.str_value) == *(Other.m_data.str_value);
- case SmartType_Map:
- if (m_data.map_value == Other.m_data.map_value)
- return true;
- return std::equal(m_data.map_value->begin(), m_data.map_value->end(),
- Other.m_data.map_value->begin());
- case SmartType_Array:
- if (m_data.array_value == Other.m_data.array_value)
- return true;
- return std::equal(m_data.array_value->begin(), m_data.array_value->end(),
- Other.m_data.array_value->begin());
- case SmartType_Binary:
- if (m_data.binary_value == Other.m_data.binary_value)
- return true;
- return std::equal(m_data.binary_value->begin(),
- m_data.binary_value->end(),
- Other.m_data.binary_value->begin());
- case SmartType_Null:
- return true;
- case SmartType_Invalid:
- return true;
- default: {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- break;
- }
- }
- return false;
-}
-
-// =============================================================
-// INTEGER TYPE SUPPORT
-// =============================================================
-SmartObject::SmartObject(int32_t InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_integer(InitialValue);
-}
-
-int32_t SmartObject::asInt() const {
- return convert_int();
-}
-
-SmartObject& SmartObject::operator=(int32_t NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_integer(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(int32_t Value) const {
- int32_t comp = convert_int();
- if (comp == invalid_int_value) {
- return false;
- } else {
- return comp == Value;
- }
-}
-
-void SmartObject::set_value_integer(int32_t NewValue) {
- set_new_type(SmartType_Integer);
- m_data.int_value = NewValue;
-}
-
-int32_t SmartObject::convert_int() const {
- int32_t retval;
-
- switch (m_type) {
- case SmartType_String:
- retval = convert_string_to_unsigned_int(m_data.str_value);
- break;
- case SmartType_Boolean:
- retval = (m_data.bool_value == true) ? 1 : 0;
- break;
- case SmartType_Integer:
- retval = m_data.int_value;
- break;
- case SmartType_Double:
- retval = static_cast<uint32_t>(m_data.double_value);
- break;
- default: {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- retval = invalid_int_value;
- break;
- }
- }
-
- return static_cast<int32_t>(retval);
-}
-
-// =============================================================
-// uint32_t TYPE SUPPORT
-// =============================================================
-SmartObject::SmartObject(uint32_t InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_unsigned_int(InitialValue);
-}
-
-uint32_t SmartObject::asUInt() const {
- return convert_unsigned_int();
-}
-
-SmartObject& SmartObject::operator=(uint32_t NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_unsigned_int(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(uint32_t Value) const {
- int32_t comp = convert_unsigned_int();
- if (comp == invalid_int_value) {
- return false;
- } else {
- return comp == Value;
- }
-}
-
-void SmartObject::set_value_unsigned_int(uint32_t NewValue) {
- set_new_type(SmartType_Integer);
- m_data.int_value = NewValue;
-}
-
-uint32_t SmartObject::convert_unsigned_int() const {
- uint32_t retval;
-
- switch (m_type) {
- case SmartType_String:
- retval = convert_string_to_unsigned_int(m_data.str_value);
- break;
- case SmartType_Boolean:
- return (m_data.bool_value == true) ? 1 : 0;
- case SmartType_Integer:
- retval = m_data.int_value;
- break;
- case SmartType_Double:
- retval = static_cast<uint32_t>(m_data.double_value);
- break;
- default: {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_int_value;
- }
- }
-
- return retval;
-}
-
-// =============================================================
-// DOUBLE TYPE SUPPORT
-// =============================================================
-SmartObject::SmartObject(double InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_double(InitialValue);
-}
-
-double SmartObject::asDouble() const {
- return convert_double();
-}
-
-SmartObject& SmartObject::operator=(double NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_double(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(double Value) const {
- double comp = convert_double();
- if (comp == invalid_double_value) {
- return false;
- } else {
- return comp == Value;
- }
-}
-
-void SmartObject::set_value_double(double NewValue) {
- set_new_type(SmartType_Double);
- m_data.double_value = NewValue;
-}
-
-double SmartObject::convert_double(void) const {
- double retval;
-
- switch (m_type) {
- case SmartType_String:
- retval = convert_string_to_double(m_data.str_value);
- break;
- case SmartType_Boolean:
- retval = (m_data.bool_value) ? 1.0 : 0.0;
- break;
- case SmartType_Integer:
- retval = static_cast<double>(convert_int());
- break;
- case SmartType_Double:
- retval = m_data.double_value;
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- retval = invalid_double_value;
- break;
- }
-
- return retval;
-}
-
-// =============================================================
-// BOOL TYPE SUPPORT
-// =============================================================
-
-SmartObject::SmartObject(bool InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_bool(InitialValue);
-}
-
-bool SmartObject::asBool() const {
- return convert_bool();
-}
-
-SmartObject& SmartObject::operator=(bool NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_bool(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(bool Value) const {
- bool comp = convert_bool();
- if (comp == invalid_bool_value) {
- return false;
- } else {
- return comp == Value;
- }
-}
-
-void SmartObject::set_value_bool(bool NewValue) {
- set_new_type(SmartType_Boolean);
- m_data.bool_value = NewValue;
-}
-
-bool SmartObject::convert_bool() const {
- bool retval;
-
- switch (m_type) {
- case SmartType_Boolean:
- retval = m_data.bool_value;
- break;
- case SmartType_Integer:
- retval = (m_data.int_value != 0);
- break;
- case SmartType_Double:
- retval = (m_data.double_value != 0.0);
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- retval = invalid_bool_value;
- break;
- }
-
- return retval;
-}
-
-// =============================================================
-// CHAR TYPE SUPPORT
-// =============================================================
-
-SmartObject::SmartObject(char InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_char(InitialValue);
-}
-
-char SmartObject::asChar() const {
- return convert_char();
-}
-
-SmartObject& SmartObject::operator=(char NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_char(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(char Value) const {
- char comp = convert_char();
- if (comp == invalid_char_value) {
- return false;
- } else {
- return comp == Value;
- }
-}
-
-void SmartObject::set_value_char(char NewValue) {
- set_new_type(SmartType_Character);
- m_data.char_value = NewValue;
-}
-
-char SmartObject::convert_char() const {
- char retval;
-
- switch (m_type) {
- case SmartType_String:
- retval =
- (m_data.str_value->length() == 1) ?
- m_data.str_value->at(0) : invalid_char_value;
- break;
- case SmartType_Character:
- retval = m_data.char_value;
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- retval = invalid_char_value;
- break;
- }
-
- return retval;
-}
-
-// =============================================================
-// STD::STRING TYPE SUPPORT
-// =============================================================
-
-SmartObject::SmartObject(const std::string& InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_string(InitialValue);
-}
-
-std::string SmartObject::asString() const {
- return convert_string();
-}
-
-const char* SmartObject::asCharArray() const {
- if (m_data.str_value != NULL) {
- return m_data.str_value->c_str();
- }
-
- return "";
-}
-
-SmartObject& SmartObject::operator=(const std::string& NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_string(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(std::string Value) const {
- std::string comp = convert_string();
- if (comp == invalid_string_value) {
- return false;
- } else {
- return comp == Value;
- }
-}
-
-void SmartObject::set_value_string(const std::string& NewValue) {
- set_new_type(SmartType_String);
- m_data.str_value = new std::string(NewValue);
-}
-
-std::string SmartObject::convert_string(void) const {
- std::string retval;
-
- switch (m_type) {
- case SmartType_String:
- retval = *(m_data.str_value);
- break;
- case SmartType_Integer:
- char val[20];
- sprintf(val, "%d", m_data.int_value);
- retval = std::string(val);
- break;
- case SmartType_Character:
- retval = std::string(1, m_data.char_value);
- break;
- case SmartType_Double:
- retval = convert_double_to_string(m_data.double_value);
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- retval = invalid_cstr_value;
- break;
- }
- return retval;
-}
-
-// =============================================================
-// CHAR* TYPE SUPPORT
-// =============================================================
-
-SmartObject::SmartObject(char* InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_cstr(InitialValue);
- return;
-}
-
-SmartObject& SmartObject::operator=(const char* NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_cstr(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(const char* Value) const {
- std::string comp = convert_string();
- std::string val(Value);
- if (comp == invalid_string_value) {
- return false;
- } else {
- return comp == val;
- }
-}
-
-void SmartObject::set_value_cstr(const char* NewValue) {
- if (NewValue) {
- set_value_string(std::string(NewValue));
- } else {
- std::string tmp;
- set_value_string(tmp);
- }
-}
-
-// =============================================================
-// BINARY TYPE SUPPORT
-// =============================================================
-SmartObject::SmartObject(const SmartBinary& InitialValue)
- : m_type(SmartType_Null),
- m_schema() {
- m_data.str_value = NULL;
- set_value_binary(InitialValue);
-}
-
-SmartBinary SmartObject::asBinary() const {
- return convert_binary();
-}
-
-SmartArray* SmartObject::asArray() const {
- if (m_type != SmartType_Array) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return NULL;
- }
-
- return m_data.array_value;
-}
-
-SmartObject& SmartObject::operator=(SmartBinary NewValue) {
- if (m_type != SmartType_Invalid) {
- set_value_binary(NewValue);
- }
- return *this;
-}
-
-bool SmartObject::operator==(SmartBinary Value) const {
- SmartBinary comp = convert_binary();
- if (comp == invalid_binary_value) {
- return false;
- } else {
- return std::equal(comp.begin(), comp.end(), Value.begin());
- }
-}
-
-void SmartObject::set_value_binary(SmartBinary NewValue) {
- set_new_type(SmartType_Binary);
- m_data.binary_value = new SmartBinary(NewValue);
-}
-
-SmartBinary SmartObject::convert_binary(void) const {
- switch (m_type) {
- case SmartType_Binary:
- return *(m_data.binary_value);
- default: {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_binary_value;
- }
- }
-
- return invalid_binary_value;
-}
-
-// =============================================================
-// ARRAY INTERFACE SUPPORT
-// =============================================================
-
-SmartObject& SmartObject::operator[](int32_t Index) {
- return handle_array_access(Index);
-}
-
-const SmartObject& SmartObject::operator[](int32_t Index) const {
- return getElement(Index);
-}
-
-inline SmartObject& SmartObject::handle_array_access(int32_t Index) {
- if (m_type == SmartType_Invalid) {
- return *this;
- }
-
- if (m_type != SmartType_Array) {
- cleanup_data();
- m_type = SmartType_Array;
- m_data.array_value = new SmartArray();
- }
-
- int32_t sz = m_data.array_value->size();
- if (Index == -1) {
- Index = sz;
- }
- if (Index == sz) {
- SmartObject uc;
- m_data.array_value->push_back(uc);
- }
- if (Index > sz || Index < 0) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_object_value;
- }
- return m_data.array_value->at(Index);
-}
-
-// =============================================================
-// MAP INTERFACE SUPPORT
-// =============================================================
-
-SmartObject& SmartObject::operator[](const std::string Key) {
- return handle_map_access(Key);
-}
-
-const SmartObject& SmartObject::operator[] (const std::string Key) const {
- return getElement(Key);
-}
-
-SmartObject& SmartObject::operator[](char* Key) {
- std::string str(Key);
- return handle_map_access(str);
-}
-
-const SmartObject& SmartObject::operator[](char* Key) const {
- std::string str(Key);
- return getElement(str);
-}
-
-SmartObject& SmartObject::operator[](const char* Key) {
- std::string str(Key);
- return handle_map_access(str);
-}
-
-const SmartObject& SmartObject::operator[](const char* Key) const {
- return getElement(Key);
-}
-
-const SmartObject& SmartObject::getElement(size_t Index) const {
- if (SmartType_Array == m_type) {
- if (Index < m_data.array_value->size()) {
- return m_data.array_value->at(Index);
- }
- }
-
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_object_value;
-}
-
-const SmartObject& SmartObject::getElement(const std::string & Key) const {
- if (SmartType_Map == m_type) {
- SmartMap::const_iterator i = m_data.map_value->find(Key);
-
- if (i != m_data.map_value->end()) {
- return i->second;
- }
- }
-
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_object_value;
-}
-
-SmartObject& SmartObject::handle_map_access(const std::string Key) {
- if (m_type == SmartType_Invalid) {
- return *this;
- }
-
- // TODO(404): implement handling of non-existing keys similar to array
- if (m_type != SmartType_Map) {
- cleanup_data();
- m_type = SmartType_Map;
- m_data.map_value = new SmartMap();
- }
-
- // TODO(404): Add check for key presense
- return (*(m_data.map_value))[Key];
-}
-
-// =============================================================
-// OTHER METHODS
-// =============================================================
-void SmartObject::duplicate(const SmartObject& OtherObject) {
- SmartData newData;
- SmartType newType = OtherObject.m_type;
- CSmartSchema newSchema = OtherObject.m_schema;
-
- switch (newType) {
- case SmartType_Map:
- newData.map_value = new SmartMap(*OtherObject.m_data.map_value);
- break;
- case SmartType_Array:
- newData.array_value = new SmartArray(*OtherObject.m_data.array_value);
- break;
- case SmartType_Integer:
- newData.int_value = OtherObject.m_data.int_value;
- break;
- case SmartType_Double:
- newData.double_value = OtherObject.m_data.double_value;
- break;
- case SmartType_Boolean:
- newData.bool_value = OtherObject.m_data.bool_value;
- break;
- case SmartType_Character:
- newData.char_value = OtherObject.m_data.char_value;
- break;
- case SmartType_String:
- newData.str_value = new std::string(*OtherObject.m_data.str_value);
- break;
- case SmartType_Binary:
- newData.binary_value = new SmartBinary(*OtherObject.m_data.binary_value);
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- break;
- }
-
- cleanup_data();
-
- m_type = newType;
- m_data = newData;
- m_schema = newSchema;
-}
-
-void SmartObject::cleanup_data() {
- switch (m_type) {
- case SmartType_String:
- delete m_data.str_value;
- break;
- case SmartType_Map:
- delete m_data.map_value;
- break;
- case SmartType_Array:
- delete m_data.array_value;
- break;
- case SmartType_Binary:
- delete m_data.binary_value;
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- break;
- }
-}
-
-size_t SmartObject::length() const {
- size_t size = 0;
-
- switch (m_type) {
- case SmartType_String:
- size = m_data.str_value->size();
- break;
- case SmartType_Array:
- size = m_data.array_value->size();
- break;
- case SmartType_Map:
- size = m_data.map_value->size();
- break;
- default:
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- size = 0;
- break;
- }
-
- return size;
-}
-
-void SmartObject::set_new_type(SmartType NewType) {
- cleanup_data();
- m_type = NewType;
-}
-
-double SmartObject::convert_string_to_double(const std::string* Value) {
- if (0 == Value->size()) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_double_value;
- }
-
- char* ptr;
- errno = 0;
-
- double result = strtod(Value->c_str(), &ptr);
- if (errno || (ptr != (Value->c_str() + Value->length()))) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_double_value;
- }
-
- return result;
-}
-
-std::string SmartObject::convert_double_to_string(const double& Value) {
- std::stringstream ss;
-
- // convert double to string w fixed notation, hi precision
- ss << std::fixed << std::setprecision(10) << Value;
-
- // output to std::string
- std::string s = ss.str();
-
- // remove trailing 000s (123.1200 => 123.12, 123.000 => 123.)
- s.erase(s.find_last_not_of('0') + 1, std::string::npos);
- if (s[s.size() - 1] == '.') {
- // remove dangling decimal (123. => 123)
- s.erase(s.end() - 1);
- }
- return s;
-}
-
-uint32_t SmartObject::convert_string_to_unsigned_int(
- const std::string* Value) {
- if (0 == Value->size()) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_int_value;
- }
-
- char* ptr;
- errno = 0;
- uint32_t result = strtol(Value->c_str(), &ptr, 10);
- if (errno || (ptr != (Value->c_str() + Value->length()))) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return invalid_int_value;
- }
-
- return result;
-}
-
-SmartType SmartObject::getType() const {
- return m_type;
-}
-
-std::string NsSmartDeviceLink::NsSmartObjects::SmartObject::OperatorToTransform(const SmartMap::value_type &pair) {
- return pair.first;
-}
-
-std::set<std::string> SmartObject::enumerate() const {
- std::set<std::string> keys;
-
- if(m_type == SmartType_Map) {
- std::transform(
- m_data.map_value->begin(),
- m_data.map_value->end(),
- std::inserter(keys, keys.end()),
- //operator[](const SmartMap::value_type &pair){return pair.first;}
- &NsSmartDeviceLink::NsSmartObjects::SmartObject::OperatorToTransform
- );
- }
- return keys;
-}
-
-bool SmartObject::keyExists(const std::string & Key) const {
- if (m_type != SmartType_Map) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return false;
- }
-
- return m_data.map_value->count(Key);
-}
-
-bool SmartObject::erase(const std::string & Key) {
- if (m_type != SmartType_Map) {
-/*
-#if !defined UNIT_TESTS
- NOTREACHED();
-#endif
-*/
- return false;
- }
-
- return (1 == m_data.map_value->erase(Key));
-}
-
-bool SmartObject::isValid() const {
- return (Errors::OK == m_schema.validate(*this));
-}
-
-Errors::eType SmartObject::validate() {
- return m_schema.validate(*this);
-}
-
-void SmartObject::setSchema(CSmartSchema schema) {
- m_schema = schema;
-}
-
-CSmartSchema SmartObject::getSchema() {
- return m_schema;
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/smart_schema.cc b/SDL_Core/src/components/smart_objects/src/smart_schema.cc
deleted file mode 100644
index f956a5faa..000000000
--- a/SDL_Core/src/components/smart_objects/src/smart_schema.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-#include "smart_objects/smart_schema.h"
-#include "smart_objects/always_true_schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-CSmartSchema::CSmartSchema()
- : mSchemaItem(CAlwaysTrueSchemaItem::create()) {
-}
-
-CSmartSchema::CSmartSchema(utils::SharedPtr<ISchemaItem> SchemaItem)
- : mSchemaItem(SchemaItem) {
-}
-
-Errors::eType CSmartSchema::validate(const SmartObject& object) const {
- return mSchemaItem->validate(object);
-}
-
-void CSmartSchema::setSchemaItem(utils::SharedPtr<ISchemaItem> schemaItem) {
- mSchemaItem = schemaItem;
-}
-
-void CSmartSchema::applySchema(SmartObject& Object) {
- mSchemaItem->applySchema(Object);
-}
-
-void CSmartSchema::unapplySchema(SmartObject& Object) {
- mSchemaItem->unapplySchema(Object);
-}
-
-void CSmartSchema::BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) const {
- mSchemaItem->BuildObjectBySchema(pattern_object, result_object);
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/smart_objects/src/string_schema_item.cc b/SDL_Core/src/components/smart_objects/src/string_schema_item.cc
deleted file mode 100644
index 769cf14b8..000000000
--- a/SDL_Core/src/components/smart_objects/src/string_schema_item.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 'A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include "smart_objects/smart_object.h"
-#include "smart_objects/string_schema_item.h"
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-utils::SharedPtr<CStringSchemaItem> CStringSchemaItem::create(
- const TSchemaItemParameter<size_t>& MinLength,
- const TSchemaItemParameter<size_t>& MaxLength,
- const TSchemaItemParameter<std::string>& DefaultValue) {
- return new CStringSchemaItem(MinLength, MaxLength, DefaultValue);
-}
-
-Errors::eType CStringSchemaItem::validate(const SmartObject& Object) {
- Errors::eType result = Errors::ERROR;
-
- if (SmartType_String == Object.getType()) {
- result = Errors::OK;
-
- size_t minLength;
- size_t maxLength;
- std::string value = Object.asString();
-
- if (true == mMinLength.getValue(minLength)) {
- if (value.size() < minLength) {
- result = Errors::INVALID_VALUE;
- }
- }
-
- if (true == mMaxLength.getValue(maxLength)) {
- if (value.size() > maxLength) {
- result = Errors::OUT_OF_RANGE;
- }
- }
-
- } else {
- result = Errors::INVALID_VALUE;
- }
-
- return result;
-}
-
-bool CStringSchemaItem::setDefaultValue(SmartObject& Object) {
- bool result = false;
- std::string value;
-
- if (true == mDefaultValue.getValue(value)) {
- Object = value;
- result = true;
- }
-
- return result;
-}
-
-void CStringSchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
- SmartObject& result_object) {
- if (SmartType_String == pattern_object.getType()) {
- result_object = pattern_object;
- } else {
- bool result = setDefaultValue(result_object);
- if (false == result) {
- result_object = std::string("");
- }
- }
-}
-
-CStringSchemaItem::CStringSchemaItem(
- const TSchemaItemParameter<size_t>& MinLength,
- const TSchemaItemParameter<size_t>& MaxLength,
- const TSchemaItemParameter<std::string>& DefaultValue)
- : mMinLength(MinLength),
- mMaxLength(MaxLength),
- mDefaultValue(DefaultValue) {
-}
-
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
diff --git a/SDL_Core/src/components/transport_manager/CMakeLists.txt b/SDL_Core/src/components/transport_manager/CMakeLists.txt
deleted file mode 100644
index f614b32d7..000000000
--- a/SDL_Core/src/components/transport_manager/CMakeLists.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-include_directories (
- ./include
- ../utils/include/
- ../protocol_handler/include
- ../connection_handler/include
- ../config_profile/include
- ../resumption/include
- ${CMAKE_SOURCE_DIR}/src/thirdPartyLibs/jsoncpp/include
- ${CMAKE_SOURCE_DIR}/src/thirdPartyLibs/libusbx-1.0.16
-)
-if (BUILD_BT_SUPPORT)
- include_directories(
- )
-endif()
-
-
-set (SOURCES
- ./src/transport_manager_impl.cc
- ./src/transport_manager_default.cc
- ./src/transport_adapter/transport_adapter_listener_impl.cc
- ./src/transport_adapter/transport_adapter_impl.cc
- ./src/tcp/tcp_transport_adapter.cc
- ./src/transport_adapter/threaded_socket_connection.cc
- ./src/tcp/tcp_client_listener.cc
- ./src/tcp/tcp_device.cc
- ./src/transport_adapter/transport_adapter_event.cc
- ./src/tcp/tcp_socket_connection.cc
- ./src/tcp/tcp_connection_factory.cc
-)
-
-if (BUILD_AVAHI_SUPPORT)
- list (APPEND SOURCES
- ./src/tcp/dnssd_service_browser.cc
- )
-endif()
-if (BUILD_BT_SUPPORT)
- list (APPEND SOURCES
- ./src/bluetooth/bluetooth_device_scanner.cc
- ./src/bluetooth/bluetooth_transport_adapter.cc
- ./src/bluetooth/bluetooth_connection_factory.cc
- ./src/bluetooth/bluetooth_socket_connection.cc
- ./src/bluetooth/bluetooth_device.cc
- )
-endif()
-
-if (BUILD_USB_SUPPORT)
- list (APPEND SOURCES
- ./src/usb/usb_aoa_adapter.cc
- ./src/usb/usb_connection_factory.cc
- ./src/usb/usb_device_scanner.cc
- )
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list (APPEND SOURCES
- ./src/usb/libusb/usb_handler.cc
- ./src/usb/libusb/usb_connection.cc
- ./src/usb/libusb/platform_usb_device.cc
- )
- elseif(CMAKE_SYSTEM_NAME STREQUAL "QNX")
- list(APPEND SOURCES
- ./src/usb/qnx/usb_handler.cc
- ./src/usb/qnx/usb_connection.cc
- ./src/usb/qnx/platform_usb_device.cc
- )
- endif()
-endif(BUILD_USB_SUPPORT)
-
-add_library("TransportManager" ${SOURCES})
-
-if (BUILD_USB_SUPPORT)
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- target_link_libraries ("TransportManager" usbdi )
- endif()
-endif(BUILD_USB_SUPPORT)
-
-if (BUILD_AVAHI_SUPPORT)
- target_link_libraries ("TransportManager" avahi-common)
-endif()
-target_link_libraries ("TransportManager" log4cxx)
-if (BUILD_BT_SUPPORT)
- target_link_libraries("TransportManager" bluetooth)
-endif()
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h b/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h
deleted file mode 100644
index 1bf8cbbcb..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_connection_factory.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * \file bluetooth_connection_factory.h
- * \brief BluetoothConnectionFactory class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_CONNECTION_FACTORY_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_CONNECTION_FACTORY_H_
-
-#include "transport_manager/transport_adapter/server_connection_factory.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterController;
-
-/**
- * @brief Create connections.
- */
-class BluetoothConnectionFactory : public ServerConnectionFactory {
- public:
-
- /**
- * @brief Constructor.
- *
- * @param controller Pointer to the device adapter controller.
- */
- BluetoothConnectionFactory(TransportAdapterController* controller);
- protected:
-
- /**
- * @brief Start BT connection factory.
- */
- virtual TransportAdapter::Error Init();
-
- /**
- * @brief Create bluetooth socket connection.
- *
- * @param device_uid Device unique identifier.
- * @param ap_handle Handle of application.
- */
- virtual TransportAdapter::Error CreateConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief
- */
- virtual void Terminate();
-
- /**
- * @brief Check for initialization.
- *
- * @return true - initialized.
- * false - not initialized.
- */
- virtual bool IsInitialised() const;
-
- /**
- * @brief Destructor.
- */
- virtual ~BluetoothConnectionFactory();
- private:
- TransportAdapterController* controller_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_CONNECTION_FACTORY_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h b/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h
deleted file mode 100644
index f34fd089b..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * \file bluetooth_device.h
- * \brief BluetoothDevice class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_DEVICE_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_DEVICE_H_
-
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-#include <bluetooth/rfcomm.h>
-
-#include <vector>
-
-#include "transport_manager/common.h"
-#include "transport_manager/transport_adapter/device.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Type definition for vector that holds uint8_t variables.
- */
-typedef std::vector<uint8_t> RfcommChannelVector;
-
-/**
- * @brief Information about device that use bluetooth transport.
- */
-class BluetoothDevice : public Device {
- public:
-
- /**
- * @brief Return device unique identifier.
- *
- * @return string with device unique identifier.
- */
- static std::string GetUniqueDeviceId(const bdaddr_t& device_address);
-
- /**
- * @brief Constructor.
- *
- * @param address Bluetooth address.
- * @param name Human-readable device name.
- * @param rfcomm_channels List of RFCOMM channels where SmartDeviceLink service has been discovered.
- **/
- BluetoothDevice(const bdaddr_t& device_address, const char* device_name,
- const RfcommChannelVector& rfcomm_channels);
-
- /**
- * @brief Compare devices.
- *
- * This method checks whether two SBluetoothDevice structures
- * refer to the same device.
- *
- * @param other Device to compare with.
- *
- * @return true if devices are equal, false otherwise.
- **/
- virtual bool IsSameAs(const Device* other) const;
-
- bool GetRfcommChannel(const ApplicationHandle app_handle,
- uint8_t* channel_out);
-
- /**
- * @brief Update list of applications available on device.
- *
- * @return Container with list of applications.
- */
- virtual ApplicationList GetApplicationList() const;
-
- /**
- * @brief Return device bluetooth address.
- *
- * @return Device bluetooth address.
- */
- const bdaddr_t& address() const {
- return address_;
- }
-
- private:
- /**
- * @brief Device bluetooth address.
- **/
- bdaddr_t address_;
-
- /**
- * @brief List of RFCOMM channels where SmartDeviceLink service has been discovered.
- **/
- RfcommChannelVector rfcomm_channels_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_DEVICE_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h b/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h
deleted file mode 100644
index b89082209..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_device_scanner.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * \file bluetooth_device_scanner.h
- * \brief BluetoothDeviceScanner class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_DEVICE_SCANNER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_DEVICE_SCANNER_H_
-
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-#include <bluetooth/rfcomm.h>
-
-#include "transport_manager/transport_adapter/device_scanner.h"
-#include "utils/conditional_variable.h"
-#include "utils/lock.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterController;
-
-/**
- * @brief Scan for devices using bluetooth.
- */
-class BluetoothDeviceScanner : public DeviceScanner {
- public:
-
- /**
- * @brief Constructor.
- * @param controller Transport adapter controller
- * @param auto_repeat_search true - autorepeated or continous device search, false - search on demand
- * @param repeat_search_pause_sec - pause between device searches, 0 means continous search
- */
- BluetoothDeviceScanner(TransportAdapterController* controller,
- bool auto_repeat_search, int repeat_search_pause_sec);
-
- /**
- * @brief Destructor.
- */
- ~BluetoothDeviceScanner();
-
- /**
- * @brief Main thread initialization.
- */
- void Thread();
- protected:
-
- /**
- * @brief Start device scanner.
- *
- * @return Error information about reason of initialization failure.
- */
- virtual TransportAdapter::Error Init();
-
- /**
- * @brief Terminates device scanner thread
- */
- virtual void Terminate();
-
- /**
- * @brief Request device search
- *
- * @return Error information about reason of Scan failure.
- */
- virtual TransportAdapter::Error Scan();
-
- /**
- * @brief Check device scanner for initialization.
- *
- * @return true - initialized.
- * false - not initialized.
- */
- virtual bool IsInitialised() const;
- private:
-
- typedef std::vector<uint8_t> RfcommChannelVector;
-
- /**
- * @brief Waits for external scan request or time out for repeated search or terminate request
- */
- void TimedWaitForDeviceScanRequest();
-
- /**
- * @brief Finds RFCOMM-channels of SDL enabled applications for set of devices
- * @param device_addresses Bluetooth addresses to search on
- * @return List of RFCOMM-channels lists
- */
- std::vector<RfcommChannelVector> DiscoverSmartDeviceLinkRFCOMMChannels(
- const std::vector<bdaddr_t>& device_addresses);
-
- /**
- * @brief Finds RFCOMM-channels of SDL enabled applications for given device
- * @param[out] discovered List of RFCOMM-channels to fill
- * @return true - if search was OK, false if it failed
- */
- bool DiscoverSmartDeviceLinkRFCOMMChannels(const bdaddr_t& device_address,
- RfcommChannelVector* discovered);
-
- /**
- * @brief Summarizes the total list of devices (paired and scanned) and notifies controller
- */
- void UpdateTotalDeviceList();
-
- /**
- * @brief Performs search of SDL-enabled devices
- */
- void DoInquiry();
-
- /**
- * @brief Checks if given devices have SDL service and creates appropriate BluetoothDevice objects
- * @param bd_address List of bluetooth addresses to check
- * @param device_handle HCI handle
- * @param[out] discovered_devices List of created BluetoothDevice objects to fill
- */
- void CheckSDLServiceOnDevices(const std::vector<bdaddr_t>& bd_address,
- int device_handle,
- DeviceVector* discovered_devices);
-
- TransportAdapterController* controller_;
- pthread_t thread_;
- bool thread_started_;
- bool shutdown_requested_;
- bool device_scan_requested_;
- bool ready_;
- sync_primitives::Lock device_scan_requested_lock_;
- sync_primitives::ConditionalVariable device_scan_requested_cv_;
-
- std::vector<bdaddr_t> paired_devices_;
-
- DeviceVector paired_devices_with_sdl_;
- DeviceVector found_devices_with_sdl_;
-
- /**
- * @brief UUID of SmartDeviceLink service.
- **/
- uuid_t smart_device_link_service_uuid_;
-
- const bool auto_repeat_search_;
- const int auto_repeat_pause_sec_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* BLUETOOTH_DEVICE_SCANNER_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h b/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h
deleted file mode 100644
index e1606da87..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_socket_connection.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * \file bluetooth_socket_connection.h
- * \brief BluetoothSocketConnection class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_SOCKET_CONNECTION_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_SOCKET_CONNECTION_H_
-
-#include "transport_manager/transport_adapter/threaded_socket_connection.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterController;
-
-/**
- * @brief Class responsible for communication over bluetooth sockets.
- */
-class BluetoothSocketConnection : public ThreadedSocketConnection {
- public:
-
- /**
- * @brief Constructor.
- *
- * @param device_uid Device unique identifier.
- * @param app_handle Handle of device.
- * @param controller Pointer to the device adapter controller.
- */
- BluetoothSocketConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller);
-
- /**
- * @brief Destructor.
- */
- virtual ~BluetoothSocketConnection();
- protected:
-
- /**
- * @brief Establish connection.
- *
- * @param error Connection error.
- *
- * @return True - connection established.
- * false - connection not established.
- */
- virtual bool Establish(ConnectError** error);
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* BLUETOOTH_SOCKET_CONNECTION_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h b/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
deleted file mode 100644
index 2816581a2..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * \file bluetooth_transport_adapter.h
- * \brief BluetoothAdapter class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_ADAPTER_H
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_BLUETOOTH_ADAPTER_H
-
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Transport adapter that use bluetooth transport.
- */
-class BluetoothTransportAdapter : public TransportAdapterImpl {
- public:
- /**
- * @brief Constructor.
- */
- BluetoothTransportAdapter();
-
- /**
- * @brief Destructor.
- */
- virtual ~BluetoothTransportAdapter();
- protected:
-
- /**
- * @brief Return type of device.
- */
- virtual DeviceType GetDeviceType() const;
-
- /**
- * @brief Store adapter state in last state singleton
- */
- virtual void Store() const;
-
- /**
- * @brief Restore adapter state from last state singleton
- *
- * @return True on success false otherwise
- */
- virtual bool Restore();
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_BLUETOOTH_ADAPTER
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/common.h b/SDL_Core/src/components/transport_manager/include/transport_manager/common.h
deleted file mode 100644
index 62ee1ff12..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/common.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * \file common.h
- * \brief Common definitions.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_COMMON_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_COMMON_H_
-
-#include <set>
-#include <vector>
-#include <string>
-
-#include "protocol_handler/raw_message.h"
-#include "utils/shared_ptr.h"
-
-/**
- * @brief - transport_manager namespace
- */
-namespace transport_manager {
-
-/**
- * @brief Shared pointer for RawMessage class
- **/
-
-/**
- * @brief Type definition for variable that hold shared pointer to raw message.
- */
-typedef utils::SharedPtr<protocol_handler::RawMessage> RawMessageSptr;
-
-/**
- * @brief Type definition for variable that hold handle of device.
- */
-typedef unsigned int DeviceHandle;
-
-/**
- * @brief Type definition for variable that hold connection unique identifier.
- */
-typedef unsigned int ConnectionUID;
-
-/**
- * @brief Type definition for variable that hold device unique identifier.
- */
-typedef std::string DeviceUID;
-
-/**
- * @brief Type definition for variable that hold handle of application.
- */
-typedef int ApplicationHandle;
-
-/**
- * @brief Type definition for vector that contain ApplicationHandle variables.
- */
-typedef std::vector<ApplicationHandle> ApplicationList;
-
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_COMMON.H
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/error.h b/SDL_Core/src/components/transport_manager/include/transport_manager/error.h
deleted file mode 100644
index 43bcd1630..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/error.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * \file error.h
- * \brief Error classes header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_ERROR_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_ERROR_H_
-
-#include <string>
-
-namespace transport_manager {
-
-/**
- * @brief Class that hold information about error.
- */
-class BaseError {
- public:
- /**
- * @brief Constructor.
- */
- BaseError() {}
-
- /**
- * @brief Constructor.
- *
- * @param desc Description of error.
- */
- explicit BaseError(const std::string& desc) : description_(desc) {}
-
- /**
- * @brief Constructor.
- *
- * @param other Error class.
- */
- BaseError(const BaseError& other) : description_(other.description_) {}
-
- /**
- * @brief Destructor.
- */
- virtual ~BaseError() {}
-
- /**
- * @brief Return description of error.
- *
- * @return string with description of error.
- */
- virtual const std::string& text() const {
- return description_;
- }
-
- private:
- std::string description_;
-};
-
-/**
- * @brief Error that originates during device search.
- */
-class SearchDeviceError : public BaseError {
-};
-
-/**
- * @brief Error that originates during connection.
- */
-class ConnectError : public BaseError {
-};
-
-/**
- * @brief Error that originates during disconnection.
- */
-class DisconnectError : public BaseError {
-};
-
-/**
- * @brief Error that originates during device disconnection.
- */
-class DisconnectDeviceError : public BaseError {
-};
-
-/**
- * @brief Error that originates during data receive..
- */
-class DataReceiveError : public BaseError {
-};
-
-/**
- * @brief Error that originates during data send.
- */
-class DataSendError : public BaseError {
- public:
- /**
- * @brief Constructor.
- */
- DataSendError() : BaseError() {}
-
- /**
- * @brief Constructor.
- *
- * @param Error description.
- */
- explicit DataSendError(const std::string &desc) : BaseError(desc) {}
-};
-
-/**
- * @brief Error that originates during data sending timeout.
- */
-class DataSendTimeoutError : public DataSendError {
-};
-
-
-/**
- * @brief Error that originates during communication.
- */
-class CommunicationError : public BaseError {
-};
-
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_ERROR_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/info.h b/SDL_Core/src/components/transport_manager/include/transport_manager/info.h
deleted file mode 100644
index 21b8d9952..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/info.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * \file info.h
- * \brief Information classes header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_INFO_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_INFO_H_
-
-#include <string>
-#include "transport_manager/common.h"
-
-/**
- * @brief transport_manager name space
- */
-namespace transport_manager {
-
-/**
- * @brief Base information class.
- */
-class Info {
- protected:
-
- /**
- * @brief Variable that hold name.
- */
- std::string name_;
-
- public:
-
- /**
- * @brief Constructor.
- */
- Info() {}
-
- /**
- * @brief Constructor
- *
- * @param name Info class object name.
- */
- explicit Info(std::string name)
- : name_(name) {
- }
-
- /**
- * @brief Return string with name.
- */
- std::string name() const{
- return name_;
- }
-
- /**
- * @brief Destructor.
- */
- virtual ~Info() {}
-};
-
-/**
- * @brief Hold information about device.
- */
-class DeviceInfo : public Info {
- protected:
-
- /**
- * @brief Variable that hold MAC adress of device.
- */
- std::string mac_address_;
-
- /**
- * @brief Variable that hold handle of device.
- */
- DeviceHandle device_handle_;
-
- public:
-
- /**
- * @brief Constructor.
- *
- * @param device_handle Handle of device.
- * @param mac_adress MAC adress of device.
- * @param name Name of device.
- */
- DeviceInfo(DeviceHandle device_handle, std::string mac_address,
- std::string name)
- : Info(name),
- mac_address_(mac_address),
- device_handle_(device_handle) {
- }
-
- /**
- * @brief Return mac_adress.
- */
- std::string mac_address() const {
- return mac_address_;
- }
-
- /**
- * @brief Return device_handle field.
- */
- DeviceHandle device_handle() const {
- return device_handle_;
- }
-
- /**
- * @brief Overloaded operator "==".
- */
- friend bool operator ==(const DeviceInfo &first, const DeviceInfo &second);
-
- // Needed for std::set container
- bool operator <(const DeviceInfo& than) const {
- return device_handle_ < than.device_handle_;
- }
-};
-
-/**
- * @brief Assign fields of one DeviceInfo class to another.
- */
-inline bool operator ==(const DeviceInfo &first, const DeviceInfo &second) {
- return first.name_ == second.name_
- && first.mac_address_ == second.mac_address_
- && first.device_handle_ == second.device_handle_;
-}
-
-/**
- * @brief AdapterInfo class
- */
-class AdapterInfo : public Info {
-
-};
-}
-
-#endif /* SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_INFO_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h b/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h
deleted file mode 100644
index 9e8523f1b..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/dnssd_service_browser.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * \file dnssd_service_browser.h
- * \brief DnssdServiceBrowser class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_DNSSD_SERVICE_BROWSER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_DNSSD_SERVICE_BROWSER_H_
-
-#include <string>
-#include <vector>
-#include <pthread.h>
-#include <avahi-client/client.h>
-#include <avahi-client/lookup.h>
-#include <avahi-common/error.h>
-#include <avahi-common/thread-watch.h>
-
-#include "transport_manager/transport_adapter/device_scanner.h"
-#include "transport_manager/transport_adapter/transport_adapter.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-struct DnssdServiceRecord {
- AvahiIfIndex interface;
- AvahiProtocol protocol;
- std::string domain_name;
- std::string host_name;
- std::string name;
- std::string type;
- uint16_t port;
- uint32_t addr;
-};
-
-#define DNSSD_DEFAULT_SERVICE_TYPE "_ford-sdlapp._tcp"
-
-/**
- * @brief DNS service discovery class.
- */
-class DnssdServiceBrowser : public DeviceScanner {
- public:
- /**
- * @brief Constructor.
- *
- * @param controller Pointer to the device adapter controller.
- */
- DnssdServiceBrowser(class TransportAdapterController* controller);
- virtual ~DnssdServiceBrowser();
- protected:
- virtual TransportAdapter::Error Init();
- virtual TransportAdapter::Error Scan();
- virtual void Terminate();
- virtual bool IsInitialised() const;
- private:
- TransportAdapter::Error CreateAvahiClientAndBrowser();
- void AddService(AvahiIfIndex interface, AvahiProtocol protocol,
- const char *name, const char *type, const char *domain);
- void RemoveService(AvahiIfIndex interface, AvahiProtocol protocol,
- const char *name, const char *type, const char *domain);
-
- void OnClientConnected();
- void OnClientFailure();
-
- DeviceVector PrepareDeviceVector() const;
-
- void ServiceResolved(const DnssdServiceRecord& service_record);
- void ServiceResolveFailed(const DnssdServiceRecord& service_record);
-
- friend void AvahiClientCallback(AvahiClient *avahi_client,
- AvahiClientState avahi_client_state,
- void* data);
- friend void AvahiServiceBrowserCallback(
- AvahiServiceBrowser *avahi_service_browser, AvahiIfIndex interface,
- AvahiProtocol protocol, AvahiBrowserEvent event, const char *name,
- const char *type, const char *domain, AvahiLookupResultFlags flags,
- void* data);
-
- friend void AvahiServiceResolverCallback(
- AvahiServiceResolver* avahi_service_resolver, AvahiIfIndex interface,
- AvahiProtocol protocol, AvahiResolverEvent event, const char* name,
- const char* type, const char* domain, const char* host_name,
- const AvahiAddress* avahi_address, uint16_t port, AvahiStringList* txt,
- AvahiLookupResultFlags flags, void *data);
-
- TransportAdapterController* controller_;
-
- AvahiServiceBrowser* avahi_service_browser_;
- AvahiThreadedPoll* avahi_threaded_poll_;
- AvahiClient* avahi_client_;
-
- typedef std::vector<DnssdServiceRecord> ServiceRecords;
- ServiceRecords service_records_;
-
- pthread_mutex_t mutex_;
-
- bool initialised_;
-}
-;
-
-} // namespace
-} // namespace
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_DNSSD_SERVICE_BROWSER
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h b/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
deleted file mode 100644
index 499e7fee2..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * \file tcp_client_listener.h
- * \brief TcpClientListener class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
-
-#include "transport_manager/transport_adapter/client_connection_listener.h"
-
-#include <pthread.h>
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterController;
-
-/**
- * @brief Listener of device adapter that use TCP transport.
- */
-class TcpClientListener : public ClientConnectionListener {
- public:
-
- /**
- * @breaf Constructor.
- *
- * @param controller Pointer to the device adapter controller.
- * @param port Port No.
- */
- TcpClientListener(TransportAdapterController* controller, const uint16_t port);
-
- /**
- * @brief Start TCP client listener thread.
- */
- void Thread();
- protected:
-
- /**
- * @brief Destructor.
- */
- virtual ~TcpClientListener();
-
- /**
- * @brief Run TCP client listener.
- *
- * @return Error information about possible reason of starting TCP listener listener failure.
- */
- virtual TransportAdapter::Error Init();
-
- /**
- * @brief Stop TCP client listener.
- */
- virtual void Terminate();
-
- /**
- * @brief Check initialization.
- *
- * @return True if initialized.
- * @return False if not initialized.
- */
- virtual bool IsInitialised() const;
-
- /**
- * @brief
- *
- * @return Error information about possible reason of failure.
- */
- virtual TransportAdapter::Error StartListening();
-
- /**
- * @brief Terminate TCP client listener thread.
- */
- virtual TransportAdapter::Error StopListening();
- private:
- const uint16_t port_;
- TransportAdapterController* controller_;
- pthread_t thread_;
- int socket_;
- bool thread_started_;
- bool shutdown_requested_;
- bool thread_stop_requested_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* TCP_CLIENT_LISTENER_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h b/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h
deleted file mode 100644
index ac2ea74ac..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_connection_factory.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * \file tcp_connection_factory.h
- * \brief TcpConnectionFactory class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CONNECTION_FACTORY_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CONNECTION_FACTORY_H_
-
-#include "transport_manager/transport_adapter/server_connection_factory.h"
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Create connections.
- */
-class TcpConnectionFactory : public ServerConnectionFactory {
- public:
-
- /**
- * @brief Constructor.
- *
- * @param controller Pointer to the device adapter controller.
- */
- TcpConnectionFactory(TransportAdapterController* controller);
- protected:
-
- /**
- * @brief Start TCP connection factory.
- */
- virtual TransportAdapter::Error Init();
-
- /**
- * @brief Constructor.
- *
- * @param device_uid device unique identifier.
- * @param app_handle Handle of application.
- *
- * @return Error information about possible reason of failure.
- */
- virtual TransportAdapter::Error CreateConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief
- */
- virtual void Terminate();
-
- /**
- * @brief Check for initialization.
- *
- * @return true - initialized.
- * false - not initialized.
- */
- virtual bool IsInitialised() const;
-
- /**
- * @brief Destructor.
- */
- virtual ~TcpConnectionFactory();
- private:
- TransportAdapterController* controller_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_CONNECTION_FACTORY_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h b/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h
deleted file mode 100644
index c929fea09..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_device.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * \file tcp_device.h
- * \brief TcpDevice class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_DEVICE_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_DEVICE_H_
-
-#include "transport_manager/transport_adapter/device.h"
-
-#include <map>
-#include <memory.h>
-#include <signal.h>
-#include <errno.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <pthread.h>
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Information about device that use TCP transport.
- */
-class TcpDevice : public Device {
- public:
- /**
- * @brief Constructor.
- *
- * @param in_addr Address.
- * @param name Device Name.
- **/
- TcpDevice(const in_addr_t& in_addr, const std::string& name);
-
- virtual ~TcpDevice();
-
- /**
- * @brief Compare devices.
- *
- * @param other Device to compare with.
- *
- * @return True if devices are equal, false otherwise.
- **/
- virtual bool IsSameAs(const Device* other) const;
-
- /**
- * @brief Update list of applications available on device.
- *
- * @return Container with list of applications.
- */
- virtual ApplicationList GetApplicationList() const;
-
- /**
- * @brief Add an application to the container of applications.
- *
- * @param socket Value of socket.
- */
- ApplicationHandle AddIncomingApplication(int socket_fd);
-
- /**
- * @brief Add application that was discovered before.
- *
- * @param Port No.
- */
- ApplicationHandle AddDiscoveredApplication(int port);
-
- /**
- * @brief Remove application from the container of applications.
- *
- * @param app_handle Handle of application.
- */
- void RemoveApplication(const ApplicationHandle app_handle);
-
- /**
- * @brief Return application's socket value.
- *
- * @param app_handle Handle of application.
- *
- * @return Application's socket value.
- */
- int GetApplicationSocket(const ApplicationHandle app_handle) const;
-
- /**
- * @brief Return application's port No.
- *
- * @param app_handle Handle of application.
- *
- * @return Application's port No.
- */
- int GetApplicationPort(const ApplicationHandle app_handle) const;
-
- /**
- * @brief Return address.
- *
- * @return Address.
- */
- in_addr_t in_addr() const {
- return in_addr_;
- }
-
- private:
- struct Application {
- bool incoming;
- int socket;
- uint16_t port;
- };
- std::map<ApplicationHandle, Application> applications_;
- mutable pthread_mutex_t applications_mutex_;
- const in_addr_t in_addr_;
- const std::string name_;
- ApplicationHandle last_handle_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* TCP_DEVICE_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h b/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h
deleted file mode 100644
index 592c79109..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_socket_connection.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * \file tcp_socket_connection.h
- * \brief TcpSocketConnection class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_SOCKET_CONNECTION_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_SOCKET_CONNECTION_H_
-
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include "transport_manager/transport_adapter/threaded_socket_connection.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterController;
-
-/**
- * @brief Class responsible for communication over TCP sockets.
- */
-class TcpSocketConnection : public ThreadedSocketConnection {
- public:
-
- /**
- * @brief Constructor.
- *
- * @param device_uid Device unique identifier.
- * @param app_handle Handle of application.
- * @param controller Pointer to the TCP device adapter controller.
- */
- TcpSocketConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller);
-
- /**
- * @brief Destructor.
- */
- virtual ~TcpSocketConnection();
- protected:
-
- /**
- * @brief
- */
- virtual bool Establish(ConnectError** error);
-};
-
-/**
- * @brief Class responsible for communication over sockets that originated by server.
- */
-class TcpServerOiginatedSocketConnection : public ThreadedSocketConnection {
- public:
-
- /**
- * @brief Constructor.
- *
- * @param device_uid Device unique identifier.
- * @param app_handle Handle of application.
- * @param controller Pointer to the device adapter controller.
- */
- TcpServerOiginatedSocketConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller);
-
- /**
- * @brief Destructor.
- */
- virtual ~TcpServerOiginatedSocketConnection();
- protected:
-
- /**
- * @brief
- */
- virtual bool Establish(ConnectError** error);
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_SOCKET_CONNECTION_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h b/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
deleted file mode 100644
index 2d2f2a026..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/tcp/tcp_transport_adapter.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * \file tcp_transport_adapter.h
- * \brief TcpTransportAdapter class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_ADAPTER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_ADAPTER_H_
-
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Transport adapter that use TCP transport.
- */
-class TcpTransportAdapter : public TransportAdapterImpl {
- public:
- /**
- * @brief Constructor.
- */
- TcpTransportAdapter();
-
- /**
- * @brief Destructor.
- */
- virtual ~TcpTransportAdapter();
-
- /**
- * @brief Default port.
- */
- static const uint16_t default_port = 12345;
- protected:
-
- /**
- * @brief Return type of device.
- *
- * @return String with device type.
- */
- virtual DeviceType GetDeviceType() const;
-
- /**
- * @brief Store adapter state in last state singleton
- */
- virtual void Store() const;
-
- /**
- * @brief Restore adapter state from last state singleton
- *
- * @return True on success false otherwise
- */
- virtual bool Restore();
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_ADAPTER
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h
deleted file mode 100644
index 41658fb45..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * \file client_connection_listener.h
- * \brief ClientConnectionListener class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_CLIENT_CONNECTION_LISTENER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_CLIENT_CONNECTION_LISTENER_H_
-
-#include "transport_manager/transport_adapter/transport_adapter.h"
-
-
-namespace transport_manager {
-
-
-namespace transport_adapter {
-
-/**
- * @brief Abstract class for listener of client connection.
- */
-class ClientConnectionListener {
- public:
- /**
- * @brief Run client connection listener.
- *
- * @return Error information about possible reason of starting client listener failure.
- */
- virtual TransportAdapter::Error Init() = 0;
-
- /**
- * @brief Stop client connection listener.
- */
- virtual void Terminate() = 0;
-
- /**
- * @brief Check initialization.
- *
- * @return True if initialized.
- * @return False if not initialized.
- */
- virtual bool IsInitialised() const = 0;
-
- /**
- * @brief Start to listen for connection from client.
- */
- virtual TransportAdapter::Error StartListening() = 0;
-
- /**
- * @brief Stop to listen for connection from client.
- */
- virtual TransportAdapter::Error StopListening() = 0;
-
- /**
- * @brief Destructor.
- */
- virtual ~ClientConnectionListener() {
- }
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* CLIENT_CONNECTION_LISTENER_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h
deleted file mode 100644
index 3e82f7fd2..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * \file connection.h
- * \brief Connection class header.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_CONNECTION_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_CONNECTION_H_
-
-#include "utils/shared_ptr.h"
-#include "transport_manager/transport_adapter/transport_adapter.h"
-
-using utils::SharedPtr;
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-/**
- * @brief Application connection.
- **/
-class Connection {
- public:
- /**
- * @brief Constructor.
- */
- Connection() {}
- /**
- * @brief Destructor.
- **/
- virtual ~Connection() {}
-
- /**
- * @brief Send data frame.
- *
- * @param Message Smart pointer to the raw message.
- *
- * @return Error Information about possible reason of sending data failure.
- */
- virtual TransportAdapter::Error SendData(RawMessageSptr message) = 0;
-
- /**
- * @brief Disconnect the current connection.
- */
- virtual TransportAdapter::Error Disconnect() = 0;
-};
-
-/**
- * @typedef Type definition of smart pointer to the Connection class.
- */
-typedef utils::SharedPtr<Connection> ConnectionSptr;
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* CONNECTION_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device.h
deleted file mode 100644
index 8330a8208..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * \file device.h
- * \brief Device class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_DEVICE_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_DEVICE_H_
-
-#include <string>
-
-#include "transport_manager/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Internal class describing device.
- **/
-class Device {
- public:
- /**
- * @brief Constructor.
- *
- * @param name User-friendly device name.
- * @param unique_device_id device unique identifier.
- **/
- Device(const std::string& name, const DeviceUID& unique_device_id)
- : name_(name),
- unique_device_id_(unique_device_id),
- keep_on_disconnect_(false) {}
- /**
- * @brief Destructor.
- **/
- virtual ~Device() {}
-
- /**
- * @brief Compare devices.
- *
- * This method checks whether two SDevice structures
- * refer to the same device.
- *
- * @param other_Ddvice Device to compare with.
- *
- * @return true if devices are equal, false otherwise.
- **/
- virtual bool IsSameAs(const Device* other_device) const = 0;
-
- virtual ApplicationList GetApplicationList() const = 0;
-
- const DeviceUID& unique_device_id() const {
- return unique_device_id_;
- }
-
- /**
- * @brief Return name of device.
- */
- const std::string& name() const {
- return name_;
- }
-
- /**
- * @brief Get @link keep_on_disconnect_ @endlink value
- */
- bool keep_on_disconnect() const {
- return keep_on_disconnect_;
- }
-
- /**
- * @brief Set @link keep_on_disconnect_ @endlink value
- * @param keep_on_disconnect new value
- */
- void set_keep_on_disconnect(bool keep_on_disconnect) {
- keep_on_disconnect_ = keep_on_disconnect;
- }
-
- private:
- /**
- * @brief Device user-friendly name.
- **/
- std::string name_;
-
- /**
- * @brief Unique device identifier across all devices.
- **/
- DeviceUID unique_device_id_;
-
- /**
- * @brief If true, device will remain in list even if all its connections finished.
- **/
- bool keep_on_disconnect_;
-};
-
-typedef utils::SharedPtr<Device> DeviceSptr;
-typedef std::vector<DeviceSptr> DeviceVector;
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* DEVICE_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h
deleted file mode 100644
index 5b09a726e..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * \file device_scanner.h
- * \brief DeviceScanner class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_DEVICE_SCANNER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_DEVICE_SCANNER_H_
-
-#include "transport_manager/transport_adapter/device.h"
-#include "transport_manager/transport_adapter/transport_adapter.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Abstract class for device scanner.
- */
-class DeviceScanner {
- public:
- /**
- * @brief Start device scanner.
- *
- * @return Error information about reason of initialization failure.
- */
- virtual TransportAdapter::Error Init() = 0;
-
- /**
- * @brief
- *
- * @return Error information about reason of Scan failure.
- */
- virtual TransportAdapter::Error Scan() = 0;
-
- /**
- * @brief Stop device scanner.
- */
- virtual void Terminate() = 0;
-
- /**
- * @brief Check device scanner for initialization.
- *
- * @return true - initialized.
- * false - not initialized.
- */
- virtual bool IsInitialised() const = 0;
-
- /**
- * @brief Destructor.
- */
- virtual ~DeviceScanner() {
- }
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* DEVICE_SCANNER_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h
deleted file mode 100644
index d944594d8..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * \file server_connection_factory.h
- * \brief ServerConnectionFactory class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_SERVER_CONNECTION_FACTORY_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_SERVER_CONNECTION_FACTORY_H_
-
-#include "transport_manager/transport_adapter/transport_adapter.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-/**
- * @brief Implement transport dependent connection that was originated by the user.
- */
-class ServerConnectionFactory {
- public:
- /**
- * @brief Start server connection factory.
- *
- * @return Information about possible reason of error during initialization.
- */
- virtual TransportAdapter::Error Init() = 0;
-
- /**
- * @brief
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- *
- * @return Information about posible reason of error.
- */
- virtual TransportAdapter::Error CreateConnection(
- const DeviceUID& device_handle, const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief
- */
- virtual void Terminate() = 0;
-
- /**
- * @brief Check device scanner for initialization.
- *
- * @return true - initialized.
- * false - not initialized.
- */
- virtual bool IsInitialised() const = 0;
-
- /**
- * @brief Destructor.
- */
- virtual ~ServerConnectionFactory() {
- }
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* SERVER_CONNECTION_FACTORY_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h
deleted file mode 100644
index 1778e5ef1..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * \file threaded_socket_connection.h
- * \brief Header for classes responsible for communication over sockets.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_THREADED_SOCKET_CONNECTION_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_THREADED_SOCKET_CONNECTION_H_
-
-#include <poll.h>
-
-#include <queue>
-
-#include "utils/logger.h"
-#include "transport_manager/transport_adapter/connection.h"
-
-using ::transport_manager::transport_adapter::Connection;
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterController;
-
-/**
- * @brief Class responsible for communication over sockets.
- */
-class ThreadedSocketConnection : public Connection {
- public:
-
- /**
- * @brief Send data frame.
- *
- * @param message Smart pointer to the raw message.
- *
- * @return Error Information about possible reason of sending data failure.
- */
- TransportAdapter::Error SendData(RawMessageSptr message);
-
- /**
- * @brief Disconnect the current connection.
- *
- * @return Error Information about possible reason of Disconnect failure.
- */
- TransportAdapter::Error Disconnect();
-
- /**
- * @brief Start thread creation.
- *
- * @return Information about possible reason of thread creation error.
- */
- TransportAdapter::Error Start();
-
- /**
- * @brief Set variable that hold socket No.
- */
- void set_socket(int socket) {
- socket_ = socket;
- }
- protected:
-
- /**
- * @brief Constructor.
- *
- * @param device_uid Device unique identifier.
- * @param app_handle Handle of application.
- * @param controller Pointer to the device adapter controller.
- */
- ThreadedSocketConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller);
-
- /**
- * @brief Destructor.
- */
- virtual ~ThreadedSocketConnection();
-
-
- virtual bool Establish(ConnectError** error) = 0;
-
- /**
- * @brief Return pointer to the device adapter controller.
- */
- TransportAdapterController* controller() {
- return controller_;
- }
-
- /**
- * @brief Return device unique identifier.
- */
- DeviceUID device_handle() const {
- return device_uid_;
- }
-
- /**
- * @brief Return handle of application.
- */
- ApplicationHandle application_handle() const {
- return app_handle_;
- }
-
- private:
-
- int read_fd_;
- int write_fd_;
- void Thread();
- void Transmit();
- void Finalize();
- TransportAdapter::Error Notify() const;
- bool Receive();
- bool Send();
- void Abort();
-
- friend void* StartThreadedSocketConnection(void*);
-
- TransportAdapterController* controller_;
- /**
- * @brief Frames that must be sent to remote device.
- **/
- typedef std::queue<RawMessageSptr> FrameQueue;
- FrameQueue frames_to_send_;
- mutable pthread_mutex_t frames_to_send_mutex_;
-
- pthread_t thread_;
-
- int socket_;
- bool terminate_flag_;
- bool unexpected_disconnect_;
- const DeviceUID device_uid_;
- const ApplicationHandle app_handle_;
-};
-
-extern log4cxx::LoggerPtr logger_;
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif //SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_transport_adapter_SOCKET_COMMUNICATION
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter.h
deleted file mode 100644
index a65e64b8d..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * \file transport_adapter.h
- * \brief TransportAdapter class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_H_
-
-#include <string>
-#include <vector>
-#include <list>
-#include "utils/shared_ptr.h"
-#include "transport_manager/common.h"
-#include "transport_manager/error.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class TransportAdapterListener;
-typedef std::string DeviceType;
-typedef int ApplicationHandle;
-typedef std::vector<ApplicationHandle> ApplicationList;
-/**
- * @brief Type definition of container(vector) that holds device unique
- * identifiers.
- */
-typedef std::vector<DeviceUID> DeviceList;
-/**
- * @brief Type definition for container(list) that holds pointers to device
- * adapter listeners
- */
-typedef std::list<TransportAdapterListener*> TransportAdapterListenerList;
-
-class TransportAdapter {
- public:
- /**
- * @enum Available types of errors.
- */
- enum Error {
- OK,
- FAIL,
- NOT_SUPPORTED,
- ALREADY_EXISTS,
- BAD_STATE,
- BAD_PARAM
- };
-
- public:
- /**
- * @brief Destructor.
- */
- virtual ~TransportAdapter() {}
-
- /**
- * @brief
- */
- virtual DeviceType GetDeviceType() const = 0;
-
- /* TODO
- virtual Error LoadState(TransportAdapterState* state) = 0;
- virtual void SaveState(TransportAdapterState* state) = 0;
- */
-
- /**
- * @brief Check initialization.
- *
- * @return true if initialized.
- * @return false if not initialized.
- */
- virtual bool IsInitialised() const = 0;
-
- /**
- * @brief Run device adapter.
- *
- * Called from transport manager to start device adapter.
- *
- * @return Error information about possible reason of starting client listener
- *failure.
- **/
- virtual Error Init() = 0;
-
- /**
- * @brief Add listener to the container(list) of device adapter listeners.
- *
- * @param listener Pointer to the device adapter listener.
- */
- virtual void AddListener(TransportAdapterListener* listener) = 0;
-
- /**
- * @brief Notify that device scanner is available.
- *
- * @return true - available, false - not available.
- */
- virtual bool IsSearchDevicesSupported() const = 0;
-
- /**
- * @brief Start scanning for new devices.
- *
- * List of new devices will be supplied in onDeviceListUpdated callback.
- *
- * @return Error information about possible reason of searching devices
- *failure.
- **/
- virtual Error SearchDevices() = 0;
-
- /**
- * @brief Notify that server connection factory is available.
- *
- * @return true - available, false - not available.
- */
- virtual bool IsServerOriginatedConnectSupported() const = 0;
-
- /**
- * @brief Connect to the specified application discovered on device.
- *
- * @param device_handle Handle of device to connect to.
- * @param app_handle Handle of application to connect to.
- *
- * @return Error information about possible reason of connection to the device
- *failure.
- **/
- virtual Error Connect(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Connect to all applications discovered on device
- * @param device_handle Handle of device
- * @return Error information about connecting applications on device
- */
- virtual Error ConnectDevice(const DeviceUID& device_handle) = 0;
-
- /**
- * @brief Notify that listener of client connection is available.
- *
- * @return true - available, false - not available.
- */
- virtual bool IsClientOriginatedConnectSupported() const = 0;
-
- /**
- * @brief Start client listener.
- *
- * @return Error information about possible reason of starting client listener
- *failure.
- */
- virtual Error StartClientListening() = 0;
-
- /**
- * @brief Stop client listener.
- *
- * @return Error information about possible reason of stopping client listener
- *failure.
- */
- virtual Error StopClientListening() = 0;
-
- /**
- * @brief Disconnect from specified session.
- *
- * @param device_handle Handle of device to Disconnect from.
- * @param app_handle Handle of application.
- *
- * @return Error information about possible reason of disconnection from the
- *device failure.
- **/
- virtual Error Disconnect(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Disconnect from all sessions on specified device.
- *
- * @param device_handle Device handle to Disconnect.
- *
- * @return Error information about possible reason of disconnecting from
- *device failure
- **/
- virtual Error DisconnectDevice(const DeviceUID& device_handle) = 0;
-
- /**
- * @brief Send frame.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param data Smart pointer to the raw message.
- *
- * @return Error information about possible reason of sending data failure.
- **/
- virtual Error SendData(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const RawMessageSptr data) = 0;
-
- /**
- * @brief Create container(vector) of device unique identifiers.
- *
- * @return container(vector) of device unique identifiers.
- */
- virtual DeviceList GetDeviceList() const = 0;
-
- /**
- * @brief Get container(vector) of application unique identifiers that
- *available at specified device.
- *
- * @param device_handle Device unique identifier.
- *
- * @return Container(vector) that holds application unique identifiers.
- */
- virtual ApplicationList GetApplicationList(const DeviceUID& device_handle)
- const = 0;
-
- /**
- * @brief Return name of device.
- *
- * @param device_id device unique identifier.
- *
- * @return string.
- */
- virtual std::string DeviceName(const DeviceUID& device_id) const = 0;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_transport_adapter_transport_adapter
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h
deleted file mode 100644
index 44565c84d..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_controller.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * \file transport_adapter_controller.h
- * \brief TransportAdapterController class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_CONTROLLER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_CONTROLLER_H_
-
-#include "transport_manager/transport_adapter/device.h"
-#include "transport_manager/transport_adapter/connection.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-
-class TransportAdapterController {
- public:
-
- virtual ~TransportAdapterController() {
- }
-
- /**
- * @brief Add device to the container(map), if container doesn't hold it yet.
- *
- * @param device Smart pointer to the device.
- *
- * @return Smart pointer to the device.
- */
- virtual DeviceSptr AddDevice(DeviceSptr device) = 0;
-
- /**
- * @brief Search for device in container of devices, if it is not there - adds it.
- *
- * @param devices Container(vector) of smart pointers to devices.
- */
- virtual void SearchDeviceDone(const DeviceVector& devices) = 0;
-
- /**
- * @brief Launch OnSearchDeviceFailed event in device adapter listener.
- *
- * @param error Error class that contains details of this error situation.
- */
- virtual void SearchDeviceFailed(const SearchDeviceError& error) = 0;
-
- /**
- * @brief Find device in the internal container(map).
- *
- * @param device_handle Device unique identifier.
- *
- * @return Smart pointer to the device.
- */
- virtual DeviceSptr FindDevice(const DeviceUID& device_handle) const = 0;
-
- /**
- * @brief Create connection and fill its parameters.
- *
- * @param connection Smart pointer to the connection.
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectionCreated(ConnectionSptr connection,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Make state of specified connection - ESTABLISHED and launch OnConnectDone event in device adapter listener.
- *
- * @param devcie_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Delete connection from the container of connections and launch OnConnectFailed event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectFailed(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const ConnectError& error) = 0;
-
- /**
- * @brief Make state of specified connection - FINILIZING.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectionFinished(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Set specified connection state to FINILIZING and launch OnUnexpectedDisconnect event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param error Error class that contains details of this error situation.
- */
- virtual void ConnectionAborted(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const CommunicationError& error) = 0;
-
- /**
- * @brief Delete specified connection from the container(map) of connections and launch event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void DisconnectDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Launch OnDataReceiveDone event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param message Smart pointer to the raw message.
- */
- virtual void DataReceiveDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- RawMessageSptr message) = 0;
-
- /**
- * @brief Launch OnDataReceiveFailed event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param error Class that contains details of this error situation.
- */
- virtual void DataReceiveFailed(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const DataReceiveError&) = 0;
-
- /**
- * @brief Launch OnDataSendDone event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param message Smart pointer to raw message.
- */
- virtual void DataSendDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- RawMessageSptr message) = 0;
-
- /**
- * @brief Launch OnDataSendFailed event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param message Smart pointer to raw message.
- * @param error Class that contains details of this error situation.
- */
- virtual void DataSendFailed(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- RawMessageSptr message, const DataSendError&) = 0;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif /* transport_adapter_CONTROLLER_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_event.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_event.h
deleted file mode 100644
index 05e3cbd48..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_event.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * \file transport_adapter_event.h
- * \brief TransportAdapterEvent class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_EVENT_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_EVENT_H_
-
-#include "transport_manager/common.h"
-#include "transport_manager/transport_adapter/transport_adapter.h"
-
-namespace transport_manager {
-
-class TransportAdapterEvent {
- public:
- /**
- * @brief Constructor.
- *
- * @param type Event type.
- * @param transport_adapter Transport adapter
- * @param device_handle Handle of device.
- * @param application_id Handle of application.
- * @param data Smart pointer to the raw message.
- * @param error Error class that contains details of this error situation.
- */
- TransportAdapterEvent(int type,
- transport_adapter::TransportAdapter *transport_adapter,
- const DeviceUID &device_handle,
- const ApplicationHandle &application_id,
- RawMessageSptr data, BaseError *error);
-
- /**
- * @brief Destructor.
- */
- ~TransportAdapterEvent();
-
- /**
- * @brief Set value that describe event type.
- *
- * @param type Type of the event.
- */
- void set_event_type(int type);
-
- /**
- * @brief Set connection unique identifier field.
- *
- * @param id Connection unique identifier.
- */
- void set_connection_uid(ConnectionUID id);
-
- /**
- * @brief Set device adapter field.
- *
- * @param transport_adapter Smart pointer to the device adapter.
- */
- void set_transport_adapter(
- transport_adapter::TransportAdapter *transport_adapter);
-
- /**
- * @brief Set pointer to the data.
- *
- * @param message Smart pointer to the raw message.
- */
- void set_data(RawMessageSptr message);
-
- /**
- * @brief Set field that responsible for the pointer to error.
- *
- * @param error Error class that contains details of this error situation.
- */
- void set_error(BaseError *error);
-
- /**
- * @brief Set device handle field.
- *
- * @param device_handle Device unique identifier.
- */
- void set_device_handle(const DeviceUID &device_handle);
-
- /**
- * @brief Return device unique identifier value.
- *
- * @return Device unique identifier.
- */
- const DeviceUID &device_uid() const;
-
- /**
- * @brief Return value that describe event type.
- *
- * @return Value that describe event type.
- */
- int event_type(void) const;
-
- /**
- * @brief Return handle of application value.
- *
- * @return Handle of application.
- */
- ApplicationHandle application_id(void) const;
-
- /**
- * @brief Return smart pointer to the device adapter.
- *
- * @return Transport adapter.
- */
- transport_adapter::TransportAdapter *transport_adapter(void) const;
-
- /**
- * @brief Return smart pointer to the raw message.
- *
- * @return Smart pointer to the raw message.
- */
- RawMessageSptr data(void) const;
-
- /**
- * @brief Return pointer to the class that contain details of error.
- *
- * @return Pointer to the class that contain details of error.
- */
- BaseError *event_error(void) const;
-
- private:
- DeviceUID device_uid_; /**< Device unique identifier. */
- int event_type_; /**< Value that describe event type. */
- ApplicationHandle application_id_; /**< Handle of application. */
- transport_adapter::TransportAdapter *transport_adapter_;
- RawMessageSptr event_data_; /**< Smart pointer to the raw message. */
- BaseError *event_error_; /** Pointer to the class that contain details of
- error */
-};
-
-} // namespace
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_transport_adapter_EVENT
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
deleted file mode 100644
index 664a5c8d5..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/**
- * \file transport_adapter_impl.h
- * \brief TransportAdapterImpl class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_IMPL_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_IMPL_H_
-
-#include <queue>
-#include <set>
-#include <memory>
-#include <string>
-
-#include "utils/logger.h"
-
-#include "transport_manager/transport_adapter/transport_adapter.h"
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/transport_adapter/connection.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class TransportAdapterListener;
-class DeviceScanner;
-class ServerConnectionFactory;
-class ClientConnectionListener;
-
-/*
- * @brief Implementation of device adapter class.
- **/
-class TransportAdapterImpl : public TransportAdapter,
- public TransportAdapterController {
- protected:
- /**
- * @brief Constructor.
- *
- * @param device_scanner Pointer to device scanner.
- * @param server_connection_factory Pointer to the factory that create
- *connections from server.
- * @param client_connection_listener Pointer to the listener of client
- *connection.
- **/
- TransportAdapterImpl(DeviceScanner* device_scanner,
- ServerConnectionFactory* server_connection_factory,
- ClientConnectionListener* client_connection_listener);
-
- /**
- * @brief Destructor.
- **/
- virtual ~TransportAdapterImpl();
-
- /**
- * @brief Check initialization.
- *
- * @return true if initialized.
- * @return false if not initialized.
- */
- virtual bool IsInitialised() const;
-
- public:
- /**
- * @brief Initiate device adapter.
- *
- * Called from transport manager to start device adapter.
- *
- * @return Error information about possible reason of starting client listener
- *failure.
- **/
- virtual TransportAdapter::Error Init();
-
- /**
- * @brief Add listener to the container(list) of device adapter listeners.
- *
- * @param listener Pointer to the device adapter listener.
- */
- virtual void AddListener(TransportAdapterListener* listener);
-
- /**
- * @brief Start scanning for new devices.
- *
- * List of new devices will be supplied in onDeviceListUpdated callback.
- *
- * @return Error information about possible reason of search devices failure.
- **/
- virtual TransportAdapter::Error SearchDevices();
-
- /**
- * @brief Connect to the specified application discovered on device.
- *
- * @param device_handle Device unique identifier to connect to.
- * @param app_handle Handle of application to connect to.
- *
- * @return Error information about possible reason of connecting to device
- *failure.
- **/
- virtual TransportAdapter::Error Connect(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief Connect to all applications discovered on device
- * @param device_handle Handle of device
- * @return Error information about connecting applications on device
- */
- virtual TransportAdapter::Error ConnectDevice(const DeviceUID& device_handle);
-
- /**
- * @brief Disconnect from specified session.
- *
- * @param devcie_handle Device unique identifier.
- * @param app_handle Handle of application.
- *
- * @return Error information about possible reason of disconnecting failure.
- **/
- virtual TransportAdapter::Error Disconnect(
- const DeviceUID& device_handle, const ApplicationHandle& app_handle);
-
- /**
- * @brief Disconnect from all sessions on specified device.
- *
- * @param device_handle Device handle to Disconnect.
- *
- * @return Error information about possible reason of disconnecting from
- *specified device failure.
- **/
- virtual TransportAdapter::Error DisconnectDevice(
- const DeviceUID& device_handle);
-
- /**
- * @brief Send frame of data.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param data Smart pointer to the raw message.
- *
- * @return Error information about possible reason of sending data failure
- **/
- virtual TransportAdapter::Error SendData(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const RawMessageSptr data);
-
- /**
- * @brief Start client listener.
- *
- * @return Error information about possible reason of starting client listener
- *failure.
- */
- virtual TransportAdapter::Error StartClientListening();
-
- /**
- * @brief Stop client listener.
- *
- * @return Error information about possible reason of stopping client listener
- *failure.
- */
- virtual TransportAdapter::Error StopClientListening();
-
- /**
- * @brief Notify that device scanner is available.
- *
- * @return True - available, false - not available.
- */
- virtual bool IsSearchDevicesSupported() const;
-
- /**
- * @brief Notify that server connection factory is available.
- *
- * @return True - available, false - not available.
- */
- virtual bool IsServerOriginatedConnectSupported() const;
-
- /**
- * @brief Notify that listener of client connection is available.
- *
- * @return True - available, false - not available.
- */
- virtual bool IsClientOriginatedConnectSupported() const;
-
- /**
- * @brief Create container(vector) of device unique identifiers.
- *
- * @return Container(vector) of device unique identifiers.
- */
- virtual DeviceList GetDeviceList() const;
-
- /**
- * @brief Get container(vector) of application unique identifiers that
- *available at specified device.
- *
- * @param device_handle Device unique identifier.
- *
- * @return Container(vector) that holds application unique identifiers.
- */
- virtual ApplicationList GetApplicationList(const DeviceUID& device_handle)
- const;
-
- /**
- * @brief Find device in the internal container(map).
- *
- * @param device_handle Device unique identifier.
- *
- * @return Smart pointer to device.
- */
- virtual DeviceSptr FindDevice(const DeviceUID& device_handle) const;
-
- /**
- * @brief Search for device in container of devices, if it is not there - adds
- *it.
- *
- * @param devices Container(vector) of smart pointers to devices.
- */
- virtual void SearchDeviceDone(const DeviceVector& devices);
-
- /**
- * @brief Launch OnSearchDeviceFailed event in device adapter listener.
- *
- * @param error Error class that contains details of this error situation.
- */
- virtual void SearchDeviceFailed(const SearchDeviceError& error);
-
- /**
- * @brief Add device to the container(map), if container doesn't hold it yet.
- *
- * @param device Smart pointer to the device.
- *
- * @return Smart pointer to the device.
- */
- virtual DeviceSptr AddDevice(DeviceSptr device);
-
- /**
- * @brief Create connection and fill its parameters.
- *
- * @param connection Smart pointer to the connection.
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectionCreated(ConnectionSptr connection,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief Set state of specified connection - FINILIZING.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectionFinished(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief Set specified connection state to FINILIZING and launch
- *OnUnexpectedDisconnect event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param error Error class that contains details of this error situation.
- */
- virtual void ConnectionAborted(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const CommunicationError& error);
-
- /**
- * @brief Set state of specified connection - ESTABLISHED and launch
- *OnConnectDone event in device adapter listener.
- *
- * @param devcie_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief Delete connection from the container of connections and launch
- *OnConnectFailed event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void ConnectFailed(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const ConnectError& error);
-
- /**
- * @brief Delete specified connection from the container(map) of connections
- *and launch event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void DisconnectDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief Launch OnDataReceiveDone event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param message Smart pointer to the raw message.
- */
- virtual void DataReceiveDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- RawMessageSptr message);
-
- /**
- * @brief Launch OnDataReceiveFailed event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param error Class that contains details of this error situation.
- */
- virtual void DataReceiveFailed(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const DataReceiveError& error);
-
- /**
- * @brief Launch OnDataSendDone event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param message Smart pointer to raw message.
- */
- virtual void DataSendDone(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- RawMessageSptr message);
-
- /**
- * @brief Launch OnDataSendFailed event in the device adapter listener.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- * @param message Smart pointer to raw message.
- * @param error Class that contains details of this error situation.
- */
- virtual void DataSendFailed(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- RawMessageSptr message,
- const DataSendError& error);
-
- /**
- * @brief Return name of device.
- *
- * @param device_id Device unique identifier.
- *
- * @return String with name.
- */
- virtual std::string DeviceName(const DeviceUID& device_id) const;
-
- protected:
-
- /**
- * @brief Store adapter state where applicable
- */
- virtual void Store() const;
-
- /**
- * @brief Restore adapter state where applicable
- *
- * @return True on success false otherwise (or vacuous true)
- */
- virtual bool Restore();
-
- /**
- * @brief Returns true if \a device is to be connected automatically
- */
- virtual bool ToBeAutoConnected(DeviceSptr device) const;
-
- private:
- /**
- * @brief Find connection that has state - ESTABLISHED.
- *
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- *
- * @return ConnectionSptr smart pointer to the connection.
- */
- ConnectionSptr FindEstablishedConnection(const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
- /**
- * @brief Connect to all applications discovered on device
- * @param device Pointer to device
- * @return Error information about connecting applications on device
- */
- TransportAdapter::Error ConnectDevice(DeviceSptr device);
-
- /**
- * @brief Listener for device adapter notifications.
- **/
- TransportAdapterListenerList listeners_;
-
- /**
- * @brief Flag variable that notify initialized device adapter or not.
- */
- bool initialised_;
-
- /**
- * @brief Type definition of container(map) that holds device unique
- *identifier(key value) and smart pointer to the device(mapped value).
- **/
- typedef std::map<DeviceUID, DeviceSptr> DeviceMap;
-
- /**
- * @brief Structure that holds information about connection.
- */
- struct ConnectionInfo {
- ConnectionSptr connection;
- DeviceUID device_id;
- ApplicationHandle app_handle;
- enum {
- NEW,
- ESTABLISHED,
- FINALISING
- } state;
- };
-
- /**
- * @brief Type definition of container(map) that holds pair<device unique
- * identifier, handle of application>(key value) and structure that holds
- * information
- * about connection(mapped value).
- */
- typedef std::map<std::pair<DeviceUID, ApplicationHandle>, ConnectionInfo>
- ConnectionMap;
-
- /**
- * @brief Map of device handle to device.
- *
- * This map contains all currently available devices.
- **/
- DeviceMap devices_;
-
- /**
- * @brief Mutex restricting access to device map.
- **/
- mutable pthread_mutex_t devices_mutex_;
-
- /**
- * @brief Container(map) of connections.
- **/
- ConnectionMap connections_;
-
- /**
- * @brief Mutex restricting access to connections map.
- **/
- mutable pthread_mutex_t connections_mutex_;
-
- protected:
- /**
- * @brief Pointer to the device scanner.
- */
- DeviceScanner* device_scanner_;
-
- /**
- * @brief Pointer to the factory if connections initiated from server.
- */
- ServerConnectionFactory* server_connection_factory_;
-
- /**
- * @brief Pointer to the factory of connections initiated from client.
- */
- ClientConnectionListener* client_connection_listener_;
-};
-
-extern log4cxx::LoggerPtr logger_;
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // #ifndef \
- // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_transport_adapter_IMPL_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h
deleted file mode 100644
index 186ed9967..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * \file transport_adapter_listener.h
- * \brief TransportAdapterListener class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_LISTENER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_LISTENER_H_
-
-#include "transport_manager/common.h"
-#include "transport_manager/error.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class TransportAdapter;
-
-/**
- * @brief Abstract class for device adapter listener.
- */
-class TransportAdapterListener {
- public:
- /**
- * @brief Destructor.
- */
- virtual ~TransportAdapterListener() {
- }
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available,
- * launch event ON_SEARCH_DONE in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- */
- virtual void OnSearchDeviceDone(
- const TransportAdapter* transport_adapter) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create search device error,
- * launch event ON_SEARCH_FAIL in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param error Error class with information about possible reason of search device failure.
- */
- virtual void OnSearchDeviceFailed(const TransportAdapter* transport_adapter,
- const SearchDeviceError& error) = 0;
-
- /**
- * @brief Notification by transport adapter that list of known devices has
- * changed. Updated list can be obtained using
- * TransportAdapter::GetDeviceList()
- *
- * @param transport_adapter Transport adapter that sent notifcation
- */
- virtual void OnDeviceListUpdated(
- const TransportAdapter* transport_adapter) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available,
- * launch event ON_CONNECT_DONE in transport manager.
- *
- * @param device_adater Pointer to the device adapter.
- * @param device_handle Device unique identifier.
- * @param app_id Handle of application.
- */
- virtual void OnConnectDone(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available,
- * launch event ON_CONNECT_FAIL in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of connect failure.
- */
- virtual void OnConnectFailed(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const ConnectError& error) = 0;
-
- /**
- * @brief
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void OnConnectRequested(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available,
- * launch event ON_UNEXPECTED_DISCONNECT in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of unexpected Disconnect.
- */
- virtual void OnUnexpectedDisconnect(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const CommunicationError& error) = 0;
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available,
- * launch event ON_DISCONNECT_DONE in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param devcie_id Device unique identifier.
- * @param app_id Handle of application.
- */
- virtual void OnDisconnectDone(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create Disconnect error,
- * launch event ON_DISCONNECT_FAIL in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of Disconnect failure.
- */
- virtual void OnDisconnectFailed(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const DisconnectError& error) = 0;
-
- /**
- * @brief
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param devic Device unique identifier.
- */
- virtual void OnDisconnectDeviceDone(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle) = 0;
-
- /**
- * @brief
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param error Error class with information about possible reason of Disconnect from device failure.
- */
- virtual void OnDisconnectDeviceFailed(
- const TransportAdapter* transport_adapter, const DeviceUID& device_handle,
- const DisconnectDeviceError& error) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create error,
- * launch event ON_RECEIVED_DONE in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param devcie Device unique identifier.
- * @param app_id Handle of application.
- * @param data_container Smart pointer to the raw message.
- */
- virtual void OnDataSendDone(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const RawMessageSptr data_container) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create data receive error,
- * launch event ON_RECEIVED_DONE in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of data receive failure.
- */
- virtual void OnDataSendFailed(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const RawMessageSptr data_container,
- const DataSendError& error) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create error,
- * launch event ON_SEND_DONE in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param data_container Smart pointer to the raw message.
- */
- virtual void OnDataReceiveDone(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const RawMessageSptr data_container) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create data send error,
- * launch event ON_SEND_FAIL in transport manager.
- */
- virtual void OnDataReceiveFailed(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle,
- const DataReceiveError& error) = 0;
-
- /**
- * @brief Search specified device adapter in the container of shared pointers to device adapters to be sure it is available, create error,
- * launch event ON_COMMUNICATION_ERROR in transport manager.
- *
- * @param transport_adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- */
- virtual void OnCommunicationError(const TransportAdapter* transport_adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) = 0;
-};
-
-} // transport_adapter namespace
-} // transport_manager namespace
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_transport_adapter_LISTENER
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h
deleted file mode 100644
index 3a9975e86..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_listener_impl.h
+++ /dev/null
@@ -1,303 +0,0 @@
-/**
- * \file transport_adapter_listener_impl.h
- * \brief TransportAdapterListenerImpl class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_LISTENER_IMPL_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_TRANSPORT_ADAPTER_LISTENER_IMPL_H_
-
-#include "transport_manager/common.h"
-#include "transport_manager/transport_adapter/transport_adapter_listener.h"
-#include "transport_manager/transport_adapter/transport_adapter.h"
-#include "utils/logger.h"
-
-using transport_manager::transport_adapter::TransportAdapter;
-
-namespace transport_manager {
-
-class TransportManagerImpl;
-
-/**
- * @brief Implementation of TransportAdapterListener class.
- */
-class TransportAdapterListenerImpl
- : public transport_adapter::TransportAdapterListener {
- public:
- /**
- * @enum Available types of events.
- */
- enum EventTypeEnum {
- ON_SEARCH_DONE = 0,
- ON_SEARCH_FAIL,
- ON_DEVICE_LIST_UPDATED,
- ON_CONNECT_DONE,
- ON_CONNECT_FAIL,
- ON_DISCONNECT_DONE,
- ON_DISCONNECT_FAIL,
- ON_SEND_DONE,
- ON_SEND_FAIL,
- ON_RECEIVED_DONE,
- ON_RECEIVED_FAIL,
- ON_COMMUNICATION_ERROR,
- ON_UNEXPECTED_DISCONNECT
- };
-
- /**
- * @brief Constructor.
- *
- * @param manager Pointer to the transport manager implementation class.
- * @param adapter Pointer to the transport adapter associated with listener.
- */
- TransportAdapterListenerImpl(TransportManagerImpl* manager,
- TransportAdapter* adapter);
-
- /**
- * @brief Dectructor.
- */
- virtual ~TransportAdapterListenerImpl();
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available,
- * launch event ON_SEARCH_DONE in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- */
- virtual void OnSearchDeviceDone(const TransportAdapter* adapter);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available, create search device error,
- * launch event ON_SEARCH_FAIL in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param error Error class with information about possible reason of search
- *device failure.
- */
- virtual void OnSearchDeviceFailed(const TransportAdapter* adapter,
- const SearchDeviceError& error);
-
- /**
- * @brief Passes notification to TransportManagerImpl
- *
- * @param adapter Transport adapter that sent notification
- */
- virtual void OnDeviceListUpdated(const TransportAdapter* adapter);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available,
- * launch event ON_CONNECT_DONE in transport manager.
- *
- * @param device_adater Pointer to the device adapter.
- * @param device_handle Device unique identifier.
- * @param app_id Handle of application.
- */
- virtual void OnConnectDone(const TransportAdapter* adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_id);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available,
- * launch event ON_CONNECT_FAIL in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of connect
- *failure.
- */
- virtual void OnConnectFailed(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const ConnectError& error);
-
- /**
- * @brief
- *
- * @param adapter Pointer to the device adapter.
- * @param device_handle Device unique identifier.
- * @param app_handle Handle of application.
- */
- virtual void OnConnectRequested(const TransportAdapter* adapter,
- const DeviceUID& device_handle,
- const ApplicationHandle& app_handle);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available,
- * launch event ON_UNEXPECTED_DISCONNECT in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of
- *unexpected Disconnect.
- */
- virtual void OnUnexpectedDisconnect(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const CommunicationError& error);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available,
- * launch event ON_DISCONNECT_DONE in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param devcie_id Device unique identifier.
- * @param app_id Handle of application.
- */
- virtual void OnDisconnectDone(const TransportAdapter* adapter,
- const DeviceUID& device_id,
- const ApplicationHandle& app_id);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available, create Disconnect error,
- * launch event ON_DISCONNECT_FAIL in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of
- *Disconnect failure.
- */
- virtual void OnDisconnectFailed(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const DisconnectError& error);
-
- /**
- * @brief
- *
- * @param adapter Pointer to the device adapter.
- * @param devic Device unique identifier.
- */
- virtual void OnDisconnectDeviceDone(const TransportAdapter* adapter,
- const DeviceUID& device);
-
- /**
- * @brief
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param error Error class with information about possible reason of
- *Disconnect from device failure.
- */
- virtual void OnDisconnectDeviceFailed(const TransportAdapter* adapter,
- const DeviceUID& device,
- const DisconnectDeviceError& error);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available, create error,
- * launch event ON_RECEIVED_DONE in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param devcie Device unique identifier.
- * @param app_id Handle of application.
- * @param data_container Smart pointer to the raw message.
- */
- virtual void OnDataReceiveDone(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const RawMessageSptr data_container);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available, create data receive error,
- * launch event ON_RECEIVED_DONE in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param error Error class with information about possible reason of data
- *receive failure.
- */
- virtual void OnDataReceiveFailed(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const DataReceiveError& error);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available, create error,
- * launch event ON_SEND_DONE in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- * @param data_container Smart pointer to the raw message.
- */
- virtual void OnDataSendDone(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const RawMessageSptr data_container);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- * to device adapters to be sure it is available, create data send error,
- * launch event ON_SEND_FAIL in transport manager.
- */
- virtual void OnDataSendFailed(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id,
- const RawMessageSptr data_container,
- const DataSendError& error);
-
- /**
- * @brief Search specified device adapter in the container of shared pointers
- *to device adapters to be sure it is available, create error,
- * launch event ON_COMMUNICATION_ERROR in transport manager.
- *
- * @param adapter Pointer to the device adapter.
- * @param device Device unique identifier.
- * @param app_id Handle of application.
- */
- virtual void OnCommunicationError(const TransportAdapter* adapter,
- const DeviceUID& device,
- const ApplicationHandle& app_id);
-
- private:
- /**
- * \brief For logging.
- */
- static log4cxx::LoggerPtr logger_;
- TransportManagerImpl* transport_manager_impl_;
- TransportAdapter* transport_adapter_;
-};
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_transport_adapter_transport_adapter_LISTENER_IMPL_H
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager.h
deleted file mode 100644
index 8ce2b1247..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * \file transport_manager.h
- * \brief TransportManager class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_H_
-
-#include "protocol_handler/protocol_handler.h" //YK: temp solution until B1.0 release
-#include "transport_manager/common.h"
-#include "transport_manager/info.h"
-
-namespace transport_manager {
-
-class TransportAdapterEvent;
-class TransportManagerListener;
-
-namespace transport_adapter {
-class TransportAdapter;
-} // namespace transport_adapter
-
-/**
- * @brief Interface of transport manager.
- **/
-class TransportManager {
- public:
- /**
- * @brief Destructor.
- **/
- virtual ~TransportManager() {}
-
- /**
- * @brief Initialize transport manager.
- * @return Error code.
- */
- virtual int Init() = 0;
-
- /**
- * @brief Start scanning for new devices.
- *
- * @return Code error.
- **/
- virtual int SearchDevices(void) = 0;
-
- /**
- * @brief Connect to all applications discovered on device.
- *
- * @param device_id Handle of device to connect to.
- *
- * @return Code error.
- **/
- virtual int ConnectDevice(const DeviceHandle &device_id) = 0;
-
- /**
- * @brief Disconnect from all applications connected on device.
- *
- * @param device_id Handle of device to Disconnect from.
- *
- * @return Code error.
- **/
- virtual int DisconnectDevice(const DeviceHandle &device_id) = 0;
-
- /**
- * @brief Disconnect from applications connected on device by connection
- *unique identifier.
- *
- * @param connection Connection unique identifier.
- *
- * @return Code error.
- **/
- virtual int Disconnect(const ConnectionUID &connection_id) = 0;
-
- /**
- * @brief Post new message in queue for massages destined to device.
- *
- * @param message Smart pointer to the raw massage.
- *
- * @return Code error.
- **/
- virtual int SendMessageToDevice(const RawMessageSptr message) = 0;
-
- /**
- * @brief Post event in the event queue.
- *
- * @param event Current event information.
- *
- * @return Code error.
- **/
- virtual int ReceiveEventFromDevice(const TransportAdapterEvent &event) = 0;
-
- /**
- * @brief Add transport adapter.
- *
- * @param transport_adapter Transport adapter
- *
- * @return Error code.
- **/
- virtual int AddTransportAdapter(
- transport_adapter::TransportAdapter *transport_adapter) = 0;
-
- /**
- * @brief Post listener to the container of transport manager listeners.
- *
- * @param listener Pointer to the transport manager listener.
- *
- * @return Code error.
- **/
- virtual int AddEventListener(TransportManagerListener *listener) = 0;
-
- /**
- * @brief Stop work finally. No new events guaranteed after method finish.
- *
- * @return Error code.
- **/
- virtual int Stop() = 0;
-
- /**
- * @brief Remove device from the container that hold devices.
- *
- * @param device Handle of device.
- *
- * @return Code error.
- **/
- virtual int RemoveDevice(const DeviceHandle &device_handle) = 0;
-
- /**
- * @brief Turns on or off visibility of SDL to mobile devices
- * when visibility is ON (on_off = true) mobile devices are able to connect
- * otherwise ((on_off = false)) SDL is not visible from outside
- *
- * @return Code error.
- */
- virtual int Visibility(const bool &on_off) const = 0;
-};
-}
-
-#endif
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_default.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_default.h
deleted file mode 100644
index 6857a5c67..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_default.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * \file transport_manager_default.h
- * \brief Transport manager default class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_DEFAULT_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_DEFAULT_H_
-
-#include "utils/singleton.h"
-
-#include "transport_manager/transport_manager_impl.h"
-
-namespace transport_manager {
-
-/**
- * @brief Default realization of transport_manager_impl class.
- */
-class TransportManagerDefault : public TransportManagerImpl,
- public utils::Singleton<TransportManagerDefault> {
-
- /**
- * @brief Initialize transport manager.
- *
- * @return Code error.
- */
- virtual int Init();
-
- /**
- * @brief Destructor.
- */
- virtual ~TransportManagerDefault();
-
- TransportManagerDefault();
-
- DISALLOW_COPY_AND_ASSIGN(TransportManagerDefault);
-
- FRIEND_BASE_SINGLETON_CLASS(TransportManagerDefault);
-};
-}
-
-#endif /* TRANSPORT_MANAGER_DEFAULT_H_ */
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_impl.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_impl.h
deleted file mode 100755
index c46301758..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_impl.h
+++ /dev/null
@@ -1,495 +0,0 @@
-/**
- * \file transport_manager_impl.h
- * \brief TransportManagerImpl class header file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_IMPL_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_IMPL_H_
-
-#include <pthread.h>
-
-#ifdef RWLOCK_SUPPORT
-# if (defined(OS_LINUX) && (defined(__USE_UNIX98) || defined(__USE_XOPEN2K))) || \
- (defined(OS_QNX) && (defined(__EXT_POSIX1_200112)))
-# define USE_RWLOCK
-# endif
-#endif
-
-#include <queue>
-#include <map>
-#include <list>
-#include <algorithm>
-#include <memory>
-
-#include "utils/logger.h"
-#include "utils/timer_thread.h"
-#include "transport_manager/common.h"
-#include "transport_manager/transport_manager.h"
-#include "transport_manager/transport_manager_listener.h"
-#include "transport_manager/transport_adapter/transport_adapter_listener_impl.h"
-
-using ::transport_manager::transport_adapter::TransportAdapterListener;
-
-namespace transport_manager {
-
-/**
- * @enum Transport manager states.
- */
-enum {
- E_SUCCESS = 0,
- E_TM_IS_NOT_INITIALIZED,
- E_INVALID_HANDLE,
- E_CONNECTION_IS_TO_SHUTDOWN,
- E_CONNECTION_EXISTS,
- E_ADAPTER_EXISTS,
- E_ADAPTERS_FAIL,
- E_INTERNAL_ERROR
-};
-
-/**
- * @brief Implementation of transport manager.
- */
-class TransportManagerImpl : public TransportManager {
- public:
- /**
- * @brief Hold connection parameters.
- */
- struct Connection {
- ConnectionUID id;
- DeviceUID device;
- ApplicationHandle application;
- };
-
- private:
- /**
- * @brief Structure that contains internal connection parameters
- */
- struct ConnectionInternal: public Connection {
- TransportManagerImpl* transport_manager;
- TransportAdapter* transport_adapter;
- typedef timer::TimerThread<ConnectionInternal> TimerInternal;
- typedef utils::SharedPtr<TimerInternal> TimerInternalSharedPointer;
- TimerInternalSharedPointer timer;
- bool shutDown;
- int messages_count;
-
- ConnectionInternal(TransportManagerImpl* transport_manager,
- TransportAdapter* transport_adapter,
- const ConnectionUID& id, const DeviceUID& dev_id,
- const ApplicationHandle& app_id)
- : transport_manager(transport_manager),
- transport_adapter(transport_adapter),
- timer(new TimerInternal(this, &ConnectionInternal::DisconnectFailedRoutine)),
- shutDown(false),
- messages_count(0) {
- Connection::id = id;
- Connection::device = dev_id;
- Connection::application = app_id;
- }
-
- void DisconnectFailedRoutine() {
- LOG4CXX_INFO(logger_, "Disconnection failed");
- transport_manager->RaiseEvent(&TransportManagerListener::OnDisconnectFailed,
- transport_manager->converter_.UidToHandle(device),
- DisconnectDeviceError());
- shutDown = false;
- timer->stop();
- }
-
- };
- public:
-
- /**
- * @brief Destructor.
- **/
- virtual ~TransportManagerImpl(void);
-
- /**
- * @brief Initialize transport manager.
- *
- * @return Code error.
- */
- virtual int Init();
-
- /**
- * @brief Start scanning for new devices.
- *
- * @return Code error.
- **/
- virtual int SearchDevices(void);
-
- /**
- * @brief Connect to all applications discovered on device.
- *
- * @param device_id Handle of device to connect to.
- *
- * @return Code error.
- **/
- virtual int ConnectDevice(const DeviceHandle& device_id);
-
- /**
- * @brief Disconnect from all applications connected on device.
- *
- * @param device_id Handle of device to Disconnect from.
- *
- * @return Code error.
- **/
- virtual int DisconnectDevice(const DeviceHandle& device_id);
-
- /**
- * @brief Disconnect from applications connected on device by connection
- *unique identifier.
- *
- * @param connection Connection unique identifier.
- *
- * @return Code error.
- **/
- virtual int Disconnect(const ConnectionUID& connection_id);
-
- /**
- * @brief Disconnect and clear all unreceived data.
- *
- * @param connection Connection unique identifier.
- */
- virtual int DisconnectForce(const ConnectionUID& connection_id);
- /**
- * @brief Post new message in queue for massages destined to device.
- *
- * @param message Smart pointer to the raw massage.
- *
- * @return Code error.
- **/
- virtual int SendMessageToDevice(const RawMessageSptr message);
-
- /**
- * @brief Post event in the event queue.
- *
- * @param event Current event information.
- *
- * @return Code error.
- **/
- virtual int ReceiveEventFromDevice(const TransportAdapterEvent& event);
-
- /**
- * @brief Post listener to the container of transport manager listeners.
- *
- * @param listener Pointer to the transport manager listener.
- *
- * @return Code error.
- **/
- virtual int AddEventListener(TransportManagerListener* listener);
-
- virtual int Stop();
-
- /**
- * @brief Add device adapter to the container of device adapters.
- *
- * @param transport_adapter Smart pointer to the device adapter.
- *
- * @return Code error.
- **/
- virtual int AddTransportAdapter(
- transport_adapter::TransportAdapter* transport_adapter);
-
- /**
- * @brief Remove device from the container that hold devices.
- *
- * @param device Handle of device.
- *
- * @return Code error.
- **/
- virtual int RemoveDevice(const DeviceHandle& device);
-
- /**
- * @brief Turns on or off visibility of SDL to mobile devices
- * when visibility is ON (on_off = true) mobile devices are able to connect
- * otherwise ((on_off = false)) SDL is not visible from outside
- *
- * @return Code error.
- */
- virtual int Visibility(const bool& on_off) const;
-
- /**
- * @brief Updates total device list with info from specific transport adapter.
- * @param ta Transport adapter
- */
- void UpdateDeviceList(TransportAdapter* ta);
-
- /**
- * @brief Constructor.
- **/
- TransportManagerImpl();
-
- protected:
-
- template <class Proc, class... Args>
- void RaiseEvent(Proc proc, Args... args) {
- for (TransportManagerListenerList::iterator it =
- transport_manager_listener_.begin();
- it != transport_manager_listener_.end(); ++it) {
- ((*it)->*proc)(args...);
- }
- }
-
- /**
- * @brief Put massage in the container of massages.
- *
- * @param message Smart pointer to the raw massage.
- **/
- void PostMessage(const RawMessageSptr message);
-
- /**
- * @brief update message in queue
- *
- * @param message shared pointer to raw massage
- *
- * @see @ref components_transportmanager_client_connection_management
- **/
- /*not clear when this function shall be used
- * void updateMessage(const RawMessageSptr old_message, const RawMessageSptr
- * new_message);*/
-
- /**
- * @brief Remove message from the container of massages.
- *
- * @param message Smart pointer to the raw massage.
- **/
- void RemoveMessage(const RawMessageSptr message);
-
- /**
- * @brief Post event to the container of events.
- *
- * @param event Event of device adapter.
- **/
- void PostEvent(const TransportAdapterEvent& event);
-
- /**
- * @brief Type definition of container that holds smart pointer to the raw
- *massages.
- **/
- typedef std::list<RawMessageSptr> MessageQueue;
-
- /**
- * @brief Type definition of container that holds events of device adapters.
- **/
- typedef std::vector<TransportAdapterEvent> EventQueue;
-
- static void* MessageQueueStartThread(void* data);
-
- /**
- * @brief Scan message's queue and pull messages according to priority and
- *serial number
- *
- * @param
- *
- * @see @ref components_transportmanager_client_connection_management
- */
- void MessageQueueThread(void);
-
- /**
- * @brief Launch EventListenerThread(void).
- */
- static void* EventListenerStartThread(void*);
- /**
- * @brief wait until event happens
- *
- * @param
- *
- * @see @ref components_transportmanager_client_connection_management
- */
- void EventListenerThread(void);
-
- /**
- * \brief For logging.
- */
- static log4cxx::LoggerPtr logger_;
-
- /**
- * @brief store messages
- *
- * @param
- *
- * @see @ref components_transportmanager_client_connection_management
- **/
- MessageQueue message_queue_;
-
- /**
- * @brief Mutex restricting access to messages.
- **/
-#ifdef USE_RWLOCK
- mutable pthread_rwlock_t message_queue_rwlock_;
-#endif
- mutable pthread_mutex_t message_queue_mutex_;
-
- pthread_cond_t message_queue_cond_;
-
- /**
- * @brief store events from comming device
- *
- * @param
- *
- * @see @ref components_transportmanager_client_connection_management
- **/
- EventQueue event_queue_;
-
- /**
- * @brief flag that indicates that thread is active
- * if it is false then threads exist main loop
- **/
- volatile bool all_thread_active_;
-
- typedef std::list<TransportManagerListener*> TransportManagerListenerList;
- /**
- * @brief listener that would be called when TM's event happened.
- **/
- TransportManagerListenerList transport_manager_listener_;
-
- /**
- * @brief ID of message queue processing thread
- **/
- pthread_t message_queue_thread_;
-
- /**
- * @brief Conditional event thread
- **/
- pthread_t event_queue_thread_;
-
- /**
- * @brief Condition variable to wake up event
- **/
- pthread_cond_t device_listener_thread_wakeup_;
-
- /**
- * @brief Mutex restricting access to events.
- **/
-#ifdef USE_RWLOCK
- mutable pthread_rwlock_t event_queue_rwlock_;
-#endif
- mutable pthread_mutex_t event_queue_mutex_;
-
- /**
- * @brief Flag that TM is initialized
- */
- bool is_initialized_;
-
- private:
- /**
- * @brief Returns size of frame to be formed from raw bytes.
- * expects first bytes of message which will be treated as frame header.
- */
- // TODO this function should be moved outside of TM to protocol handler or
- // somewhere else
- unsigned int GetPacketSize(unsigned int size, unsigned char* data);
-
- /**
- * @brief Structure that contains conversion functions (Device ID -> Device
- * Handle; Device Handle -> Device ID)
- */
- struct Handle2GUIDConverter {
- typedef std::vector<DeviceUID> ConversionTable;
-
- DeviceHandle UidToHandle(const DeviceUID& dev_uid) {
- bool is_new = true;
- return UidToHandle(dev_uid, is_new);
- }
-
- DeviceHandle UidToHandle(const DeviceUID& dev_uid, bool& is_new) {
- ConversionTable::iterator it = std::find(
- conversion_table_.begin(), conversion_table_.end(), dev_uid);
- if (it != conversion_table_.end()) {
- is_new = false;
- return std::distance(conversion_table_.begin(), it) +
- 1; // handle begin since 1 (one)
- }
- is_new = true;
- conversion_table_.push_back(dev_uid);
- return conversion_table_.size(); // handle begin since 1 (one)
- }
-
- DeviceUID HandleToUid(DeviceHandle handle) {
- if (handle == 0 || handle > conversion_table_.size()) {
- return DeviceUID();
- }
- return conversion_table_[handle - 1]; // handle begin since 1 (one)
- }
-
- ConversionTable conversion_table_;
- };
-
- /**
- * @brief Converter variable (Device ID -> Device Handle; Device Handle ->
- * Device ID)
- */
- Handle2GUIDConverter converter_;
-
- explicit TransportManagerImpl(const TransportManagerImpl&);
- int connection_id_counter_;
- std::vector<ConnectionInternal> connections_;
- std::map<DeviceUID, TransportAdapter*> device_to_adapter_map_;
- std::vector<TransportAdapter*> transport_adapters_;
- /** For keep listeners which were add TMImpl */
- std::map<TransportAdapter*, TransportAdapterListenerImpl*>
- transport_adapter_listeners_;
-
- typedef std::vector<std::pair<const TransportAdapter*, DeviceInfo> >
- DeviceList;
- DeviceList device_list_;
-
- class IncomingDataHandler;
- std::auto_ptr<IncomingDataHandler> incoming_data_handler_;
-
- void AddConnection(const ConnectionInternal& c);
- void RemoveConnection(int id);
- ConnectionInternal* GetConnection(const ConnectionUID& id);
- ConnectionInternal* GetConnection(const DeviceUID& device,
- const ApplicationHandle& application);
-
- void AddDataToContainer(
- ConnectionUID id,
- std::map<ConnectionUID, std::pair<unsigned int, unsigned char*> >&
- container,
- unsigned char* data, unsigned int data_size);
- bool GetFrameSize(unsigned char* data, unsigned int data_size,
- unsigned int& frame_size);
- bool GetFrame(std::map<ConnectionUID,
- std::pair<unsigned int, unsigned char*> >& container,
- ConnectionUID id, unsigned int frame_size,
- unsigned char** frame);
-
- void OnDeviceListUpdated(TransportAdapter* ta);
- static Connection convert(ConnectionInternal& p);
-};
-// class ;
-
-} // namespace transport_manager
-
-#endif
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener.h
deleted file mode 100644
index a4b240472..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * \file transport_manager_listener.h
- * \brief TransportManagerListener class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_H_
-
-#include "transport_manager/common.h"
-#include "transport_manager/info.h"
-#include "transport_manager/error.h"
-
-namespace transport_manager {
-
-class TransportManagerListener {
- public:
- /**
- * @brief Destructor.
- */
- virtual ~TransportManagerListener() {
- }
-
- /**
- * @brief Reaction to the event, when the list of devices is updated.
- *
- * @param Container that holds information about devices.
- */
- virtual void OnDeviceListUpdated(const std::vector<DeviceInfo>&) = 0;
-
- /**
- * @brief Reaction to the event, when the device is found.
- *
- * @param device_info Variable that hold information about device.
- */
- virtual void OnDeviceFound(const DeviceInfo &device_info) = 0;
- virtual void OnDeviceAdded(const DeviceInfo &device_info) = 0;
- virtual void OnDeviceRemoved(const DeviceInfo &device_info) = 0;
-
- /**
- * @brief Reaction to the event, when scanning of devices is finished.
- */
- virtual void OnScanDevicesFinished() = 0;
-
- /**
- * @brief Reaction to the event, when scanning of devices is failed.
- *
- * @param error Error information about possible reason of scanning of devices failure.
- */
- virtual void OnScanDevicesFailed(const SearchDeviceError& error) = 0;
-
- /**
- * @brief Reaction to the event, when connection is established.
- *
- * @param devcie_info Variable that hold information about device.
- * @param connection_id connection unique identifier.
- */
- virtual void OnConnectionEstablished(const DeviceInfo &device_info,
- const ConnectionUID &connection_id) = 0;
-
- /**
- * @brief Reaction to the event, when connection to the device is failed.
- *
- * @param device_info Variable that hold information about device.
- * @param error Error information about possible reason of connect failure.
- */
- virtual void OnConnectionFailed(const DeviceInfo &device_info,
- const ConnectError& error) = 0;
-
- /**
- * @brief Reaction to the event, when connection is closed.
- *
- * @param connection_id Connection unique identifier.
- */
- virtual void OnConnectionClosed(ConnectionUID connection_id) = 0;
-
- /**
- * @brief Called when connection is closed unexpectedly, i.e. disconnect was not requested
- *
- * @param connection_id Connection ID.
- * @param error Error information.
- */
- virtual void OnUnexpectedDisconnect(ConnectionUID connection_id,
- const CommunicationError& error) = 0;
-
- /**
- * @brief Reaction to the event, when connection close is failed.
- *
- * @param connection_id Connection unique identifier.
- * @param error Error information about possible reason of failure.
- */
- virtual void OnConnectionClosedFailure(ConnectionUID connection_id,
- const DisconnectError& error) = 0;
-
- /**
- * \brief Inform about losing connection with device.
- * \param device Handle of device.
- * \param error Error information about possible reason of loosing connection.
- */
- virtual void OnDeviceConnectionLost(const DeviceHandle& device,
- const DisconnectDeviceError& error) = 0;
-
- /**
- * \brief Inform about failure during DisconnectDevice procedure of transport manager.
- * \param device Handle of device.
- * \param error Error information about possible reason of disconnecting failure.
- */
- virtual void OnDisconnectFailed(const DeviceHandle& device,
- const DisconnectDeviceError& error) = 0;
- /**
- * @brief Notifies about recieving message from TM.
- *
- * @param message Recieved message
- **/
- virtual void OnTMMessageReceived(const RawMessageSptr message) = 0;
-
- /**
- * @brief Reaction to the event, when receiving of massage for transport manager is failed.
- *
- * @param connection_id connection unique identifier.
- * @param error Error information about possible reason of failure.
- */
- virtual void OnTMMessageReceiveFailed(ConnectionUID connection_id,
- const DataReceiveError& error) = 0;
-
- /**
- * @brief Reaction to the event, when transport manager sent a massage.
- */
- virtual void OnTMMessageSend(const RawMessageSptr message) = 0;
-
- /**
- * @brief Reaction to the event, when sending of massage by transport manager is failed.
- *
- * @param error Error information about possible reason of failure.
- * @param message Smart pointer to the raw massage.
- */
- virtual void OnTMMessageSendFailed(const DataSendError& error,
- const RawMessageSptr message) = 0;
-};
-} // namespace transport_manager
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener_empty.h b/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener_empty.h
deleted file mode 100644
index 5251a1c50..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/transport_manager_listener_empty.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * \file transport_manager_listener_empty.h
- * \brief TransportManagerListenerEmpty class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_EMPTY_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_EMPTY_H_
-
-#include "transport_manager/info.h"
-#include "transport_manager/transport_manager_listener.h"
-#include "transport_manager/transport_manager_impl.h"
-
-namespace transport_manager {
-
-/**
- * @brief Empty implementation class for transport manager listener.
- */
-class TransportManagerListenerEmpty : public TransportManagerListener {
- const TransportManagerImpl *transport_manager_;
- public:
-
- /**
- * @Destructor.
- */
- virtual ~TransportManagerListenerEmpty(){};
-
- /**
- * @brief Reaction to the event, when the list of devices is updated.
- *
- * @param Container that holds information about devices.
- */
- virtual void OnDeviceListUpdated(const std::vector<DeviceInfo>&) {
- }
-
- /**
- * @brief Reaction to the event, when the device is found.
- *
- * @param device_info Variable that hold information about device.
- */
- virtual void OnDeviceFound(const DeviceInfo& device_info) {
- }
- virtual void OnDeviceAdded(const DeviceInfo& device_info) {
- }
- virtual void OnDeviceRemoved(const DeviceInfo& device_info) {
- }
-
- /**
- * @brief Reaction to the event, when scanning of devices is finished.
- */
- virtual void OnScanDevicesFinished() {
- }
-
- /**
- * @brief Reaction to the event, when scanning of devices is failed.
- *
- * @param error Error information about possible reason of scanning of devices failure.
- */
- virtual void OnScanDevicesFailed(const SearchDeviceError& error) {
- }
-
- /**
- * @brief Reaction to the event, when connection is established.
- *
- * @param devcie_info Variable that hold information about device.
- * @param connection_id connection unique identifier.
- */
- virtual void OnConnectionEstablished(const DeviceInfo &device_info,
- const ConnectionUID &connection_id) {
- }
-
- /**
- * @brief Reaction to the event, when connection to the device is failed.
- *
- * @param device_info Variable that hold information about device.
- * @param error Error information about possible reason of connect failure.
- */
- virtual void OnConnectionFailed(const DeviceInfo &device_info,
- const ConnectError& error) {
- }
-
- /**
- * @brief Reaction to the event, when connection is closed.
- *
- * @param connection_id Connection unique identifier.
- */
- virtual void OnConnectionClosed(ConnectionUID connection_id) {
- }
-
- virtual void OnUnexpectedDisconnect(ConnectionUID connection_id,
- const CommunicationError& error) {
- }
-
- /**
- * @brief Reaction to the event, when connection close is failed.
- *
- * @param connection_id Connection unique identifier.
- * @param error Error information about possible reason of failure.
- */
- virtual void OnConnectionClosedFailure(ConnectionUID connection_id,
- const DisconnectError& error) {
- }
-
- /**
- * @brief Reaction to the event, when connection with the device is lost.
- *
- * @param device Handle of device.
- * @param error Error information about possible reason of lost connection.
- */
- virtual void OnDeviceConnectionLost(const DeviceHandle& device,
- const DisconnectDeviceError& error) {
- }
-
- /**
- * @brief Reaction to the event, when Disconnect is failed.
- *
- * @param device Handle of device.
- * @param error Error information about possible reason of Disconnect failure.
- */
- virtual void OnDisconnectFailed(const DeviceHandle& device,
- const DisconnectDeviceError& error) {
- }
-
- /**
- * @brief Reaction to the event, when transport manager received a massage.
- *
- * @param message Smart pointer to the raw massage.
- * @param connection_id Connection unique identifier.
- */
- virtual void OnTMMessageReceived(const RawMessageSptr message) {
- }
-
- /**
- * @brief Reaction to the event, when receiving of massage for transport manager is failed.
- *
- * @param connection_id connection unique identifier.
- * @param error Error information about possible reason of failure.
- */
- virtual void OnTMMessageReceiveFailed(ConnectionUID connection_id,
- const DataReceiveError& error) {
- }
-
- /**
- * @brief Reaction to the event, when transport manager sent a massage.
- */
- virtual void OnTMMessageSend(const RawMessageSptr message) {
- }
-
- /**
- * @brief Reaction to the event, when sending of massage by transport manager is failed.
- *
- * @param error Error information about possible reason of failure.
- * @param message Smart pointer to the raw massage.
- */
- virtual void OnTMMessageSendFailed(const DataSendError& error,
- const RawMessageSptr message) {
- }
-};
-} // namespace transport_manager
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_LISTENER_EMPTY_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/common.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/common.h
deleted file mode 100644
index 31ef25a24..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/common.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * \file common.h
- * \brief TM USB adapter common definitions
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_COMMON_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_COMMON_H_
-
-#include <cstdint>
-
-#include "utils/shared_ptr.h"
-
-#if defined(__QNX__) || (__QNXNTO__)
-#include "transport_manager/usb/qnx/usb_handler.h"
-#else
-#include "transport_manager/usb/libusb/usb_handler.h"
-#endif
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-static const uint16_t kAoaVid = 0x18d1;
-static const uint16_t kAoaPid1 = 0x2d00;
-static const uint16_t kAoaPid2 = 0x2d01;
-static const uint8_t kAoaInterfaceSubclass = 0xff;
-static const int kUsbConfiguration = 1;
-
-typedef utils::SharedPtr<UsbHandler> UsbHandlerSptr;
-
-class UsbDeviceListener {
- public:
- virtual ~UsbDeviceListener() {}
-
- UsbHandlerSptr GetUsbHandler() { return usb_handler_; }
-
- void SetUsbHandler(UsbHandlerSptr usb_handler) {
- usb_handler_ = usb_handler;
- usb_handler_->usb_device_listeners_.push_back(this);
- }
-
- virtual void OnDeviceArrived(PlatformUsbDevice* device) = 0;
- virtual void OnDeviceLeft(PlatformUsbDevice* device) = 0;
-
- private:
- UsbHandlerSptr usb_handler_;
-};
-
-} // namespace
-} // namespace
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_COMMON_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h
deleted file mode 100644
index d1f485c9d..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/platform_usb_device.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * \file platform_usb_device.h
- * \brief libusb PlatformUsbDevice class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_PLATFORM_USB_DEVICE_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_PLATFORM_USB_DEVICE_H_
-
-#include <string>
-#include <libusb/libusb.h>
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class PlatformUsbDevice {
- public:
- uint8_t bus_number() const { return bus_number_; }
- uint8_t address() const { return address_; }
- uint16_t vendor_id() const { return vendor_id_; }
- uint16_t product_id() const { return product_id_; }
- std::string GetManufacturer() const;
- std::string GetProductName() const;
- std::string GetSerialNumber() const;
- PlatformUsbDevice(uint8_t bus, uint8_t address,
- const libusb_device_descriptor& device_descriptor,
- libusb_device* device_libusb,
- libusb_device_handle* device_handle_libusb);
- libusb_device_handle* GetLibusbHandle() { return libusb_device_handle_; }
- libusb_device* GetLibusbDevice() { return libusb_device_; }
-
- private:
- std::string GetDescString(uint8_t index) const;
-
- private:
- uint8_t bus_number_;
- uint8_t address_;
- uint16_t vendor_id_;
- uint16_t product_id_;
- libusb_device_descriptor device_descriptor_;
- libusb_device_handle* libusb_device_handle_;
- libusb_device* libusb_device_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_PLATFORM_USB_DEVICE_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
deleted file mode 100644
index b6c050fa7..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * \file usb_connection.h
- * \brief UsbConnection class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_CONNECTION_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_CONNECTION_H_
-
-#include <pthread.h>
-
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/transport_adapter/connection.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class UsbConnection : public Connection {
- public:
- UsbConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller,
- const UsbHandlerSptr& usb_handler, PlatformUsbDevice* device);
-
- bool Init();
-
- virtual ~UsbConnection();
-
- protected:
- virtual TransportAdapter::Error SendData(RawMessageSptr message);
- virtual TransportAdapter::Error Disconnect();
-
- private:
- friend void InTransferCallback(struct libusb_transfer*);
- friend void OutTransferCallback(struct libusb_transfer*);
- bool FindEndpoints();
- void PopOutMessage();
- bool PostInTransfer();
- bool PostOutTransfer();
- void OnInTransfer(struct libusb_transfer*);
- void OnOutTransfer(struct libusb_transfer*);
- void Finalise();
-
- const DeviceUID device_uid_;
- const ApplicationHandle app_handle_;
- TransportAdapterController* controller_;
- UsbHandlerSptr usb_handler_;
- libusb_device* libusb_device_;
- libusb_device_handle* device_handle_;
- uint8_t in_endpoint_;
- uint16_t in_endpoint_max_packet_size_;
- uint8_t out_endpoint_;
- uint16_t out_endpoint_max_packet_size_;
- unsigned char* in_buffer_;
- libusb_transfer* in_transfer_;
- libusb_transfer* out_transfer_;
-
- std::list<RawMessageSptr> out_messages_;
- RawMessageSptr current_out_message_;
- pthread_mutex_t out_messages_mutex_;
- size_t bytes_sent_;
- bool disconnecting_;
- bool waiting_in_transfer_cancel_;
- bool waiting_out_transfer_cancel_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_CONNECTION_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
deleted file mode 100644
index e76f49f8e..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * \file usb_handler.h
- * \brief libusb USB handler class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_HANDLER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_HANDLER_H_
-
-#include <pthread.h>
-
-#include <libusb/libusb.h>
-
-#include "transport_manager/transport_adapter/transport_adapter.h"
-#include "transport_manager/usb/usb_control_transfer.h"
-#include "transport_manager/usb/libusb/platform_usb_device.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class UsbHandler {
- public:
- UsbHandler();
- ~UsbHandler();
- void StartControlTransferSequence(UsbControlTransferSequence* sequence,
- PlatformUsbDevice* device);
- TransportAdapter::Error Init();
-
- public:
- void CloseDeviceHandle(libusb_device_handle* device_handle);
-
- private:
- class ControlTransferSequenceState;
-
- void Thread();
- void DeviceArrived(libusb_device* device);
- void DeviceLeft(libusb_device* device);
-
- void ControlTransferCallback(libusb_transfer* transfer);
- void SubmitControlTransfer(ControlTransferSequenceState* sequence_state);
- friend void UsbTransferSequenceCallback(libusb_transfer* transfer);
-
- private:
- bool shutdown_requested_;
- pthread_t thread_;
-
- friend class UsbDeviceListener;
- std::list<class UsbDeviceListener*> usb_device_listeners_;
-
- typedef std::vector<PlatformUsbDevice*> Devices;
- Devices devices_;
-
- typedef std::list<ControlTransferSequenceState*> TransferSequences;
- TransferSequences transfer_sequences_;
- std::list<libusb_device_handle*> device_handles_to_close_;
- libusb_context* libusb_context_;
- libusb_hotplug_callback_handle arrived_callback_handle_;
- libusb_hotplug_callback_handle left_callback_handle_;
-
- friend void* UsbHandlerThread(void* data);
- friend int ArrivedCallback(libusb_context* context, libusb_device* device,
- libusb_hotplug_event event, void* data);
- friend int LeftCallback(libusb_context* context, libusb_device* device,
- libusb_hotplug_event event, void* data);
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_HANDLER_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h
deleted file mode 100644
index 939a8fcb3..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/platform_usb_device.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * \file platform_usb_device.h
- * \brief QNX PlatfromUsbDevice class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_PLATFORM_USB_DEVICE_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_PLATFORM_USB_DEVICE_H_
-
-#include <string>
-#include <sys/usbdi.h>
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class PlatformUsbDevice {
- public:
- uint8_t bus_number() const { return bus_number_; }
- uint8_t address() const { return address_; }
- uint16_t vendor_id() const { return vendor_id_; }
- uint16_t product_id() const { return product_id_; }
- std::string GetManufacturer() const;
- std::string GetProductName() const;
- std::string GetSerialNumber() const;
- PlatformUsbDevice(usbd_device_instance_t* instance, usbd_device* device,
- const usbd_device_descriptor_t& device_descriptor);
- const usbd_device_instance_t& GetDeviceInstance() {
- return usbd_device_instance_;
- }
- usbd_device* GetUsbdDevice() { return usbd_device_; }
-
- private:
- std::string GetDescString(uint8_t index) const;
-
- private:
- uint8_t bus_number_;
- uint8_t address_;
- uint16_t vendor_id_;
- uint16_t product_id_;
- usbd_device_descriptor_t device_descriptor_;
- usbd_device_instance_t usbd_device_instance_;
- usbd_device* usbd_device_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_PLATFORM_USB_DEVICE_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h
deleted file mode 100644
index 3cd52fade..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_connection.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * \file usb_connection.h
- * \brief UsbConnection class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_CONNECTION_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_CONNECTION_H_
-
-#include <pthread.h>
-
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/transport_adapter/connection.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class UsbConnection : public Connection {
- static const uint32_t kInBufferSize = 2048;
- public:
- UsbConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller,
- const UsbHandlerSptr& libusb_handler,
- PlatformUsbDevice* device);
-
- bool Init();
-
- virtual ~UsbConnection();
- protected:
- virtual TransportAdapter::Error SendData(RawMessageSptr message);
- virtual TransportAdapter::Error Disconnect();
- private:
- friend void InTransferCallback(usbd_urb* urb, usbd_pipe*, void*);
- friend void OutTransferCallback(usbd_urb* urb, usbd_pipe*, void*);
- bool OpenEndpoints();
- void PopOutMessage();
- bool PostInTransfer();
- bool PostOutTransfer();
- void OnInTransfer(usbd_urb* urb);
- void OnOutTransfer(usbd_urb* urb);
- void Finalise();
-
- const DeviceUID device_uid_;
- const ApplicationHandle app_handle_;
- TransportAdapterController* controller_;
- UsbHandlerSptr libusb_handler_;
- usbd_device* usbd_device_;
-
- usbd_pipe* in_pipe_;
- usbd_pipe* out_pipe_;
-
- unsigned char* in_buffer_;
- void* out_buffer_;
-
- usbd_urb* in_urb_;
- usbd_urb* out_urb_;
-
- std::list<RawMessageSptr> out_messages_;
- RawMessageSptr current_out_message_;
- pthread_mutex_t out_messages_mutex_;
- size_t bytes_sent_;
- bool disconnecting_;
- bool pending_in_transfer_;
- bool pending_out_transfer_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_CONNECTION_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h
deleted file mode 100644
index 26b00087f..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/qnx/usb_handler.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * \file usb_handler.h
- * \brief QNX USB handler class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_HANDLER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_HANDLER_H_
-
-#include <sys/usbdi.h>
-
-#include "transport_manager/transport_adapter/transport_adapter.h"
-#include "transport_manager/usb/usb_control_transfer.h"
-#include "transport_manager/usb/qnx/platform_usb_device.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class UsbHandler {
- public:
- UsbHandler();
- ~UsbHandler();
- void StartControlTransferSequence(UsbControlTransferSequence* sequence,
- PlatformUsbDevice* device);
- TransportAdapter::Error Init();
-
- private:
- void DeviceArrived(usbd_connection* connection,
- usbd_device_instance_t* instance);
- void DeviceLeft(usbd_device_instance_t* instance);
-
- private:
- friend class UsbDeviceListener;
- std::list<class UsbDeviceListener*> usb_device_listeners_;
-
- typedef std::vector<PlatformUsbDevice*> Devices;
- Devices devices_;
-
- struct usbd_connection* usbd_general_connection_;
- struct usbd_connection* usbd_aoa_connection_;
-
- friend void ArrivedCallback(usbd_connection* connection,
- usbd_device_instance_t* instance);
- friend void LeftCallback(usbd_connection* connection,
- usbd_device_instance_t* instance);
- friend void ArrivedAoaCallback(usbd_connection* connection,
- usbd_device_instance_t* instance);
- friend void LeftAoaCallback(usbd_connection* connection,
- usbd_device_instance_t* instance);
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_QNX_USB_HANDLER_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h
deleted file mode 100644
index 55fb028ef..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_aoa_adapter.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * \file usb_aoa_adapter.h
- * \brief UsbAoaAdapter class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_AOA_ADAPTER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_AOA_ADAPTER_H_
-
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class UsbAoaAdapter : public TransportAdapterImpl {
- public:
- UsbAoaAdapter();
- virtual ~UsbAoaAdapter();
-
- protected:
- virtual DeviceType GetDeviceType() const;
- virtual bool IsInitialised() const;
- virtual TransportAdapter::Error Init();
- virtual bool ToBeAutoConnected(DeviceSptr device) const;
-
- private:
- bool is_initialised_;
- UsbHandlerSptr usb_handler_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_AOA_ADAPTER
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h
deleted file mode 100644
index ed0fda91e..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_connection_factory.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * \file usb_connection_factory.h
- * \brief UsbConnectionFactory class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_CONNECTION_FACTORY_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_CONNECTION_FACTORY_H_
-
-#include "transport_manager/transport_adapter/server_connection_factory.h"
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class UsbConnectionFactory : public ServerConnectionFactory {
- public:
- UsbConnectionFactory(TransportAdapterController* controller);
- void SetUsbHandler(const UsbHandlerSptr& usb_handler);
-
- protected:
- virtual TransportAdapter::Error Init();
- virtual TransportAdapter::Error CreateConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle);
- virtual void Terminate();
- virtual bool IsInitialised() const;
- virtual ~UsbConnectionFactory();
-
- private:
- TransportAdapterController* controller_;
- UsbHandlerSptr usb_handler_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_CONNECTION_FACTORY_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h
deleted file mode 100644
index 8c4f8a9d4..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_control_transfer.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * \file aoa_common.h
- * \brief Google AOA protocol header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_CONTROL_TRANSFER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_CONTROL_TRANSFER_H_
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class UsbControlTransfer;
-class UsbControlInTransfer;
-class UsbControlOutTransfer;
-
-class UsbControlTransfer {
- public:
- enum TransferDirection {
- IN,
- OUT
- };
-
- enum RequestType {
- VENDOR
- };
-
- virtual ~UsbControlTransfer() {}
- virtual TransferDirection Direction() const = 0;
- virtual RequestType Type() const = 0;
- virtual uint8_t Request() const = 0;
- virtual uint16_t Value() const = 0;
- virtual uint16_t Index() const = 0;
- virtual uint16_t Length() const = 0;
-};
-
-class UsbControlInTransfer : public UsbControlTransfer {
- public:
- virtual ~UsbControlInTransfer() {}
- virtual TransferDirection Direction() const { return IN; }
- virtual bool OnCompleted(unsigned char* data) const = 0;
-};
-
-class UsbControlOutTransfer : public UsbControlTransfer {
- public:
- virtual ~UsbControlOutTransfer() {}
- virtual TransferDirection Direction() const { return OUT; }
- virtual const char* Data() const = 0;
-};
-
-class UsbControlTransferSequence {
- public:
- typedef std::list<UsbControlTransfer*> Transfers;
- const Transfers& transfers() const { return transfers_; }
-
- virtual ~UsbControlTransferSequence() {
- for (Transfers::iterator it = transfers_.begin(); it != transfers_.end();
- ++it) {
- delete *it;
- }
- }
-
- protected:
- void AddTransfer(UsbControlTransfer* transfer) {
- transfers_.push_back(transfer);
- }
-
- private:
- Transfers transfers_;
-};
-
-} // namespace
-} // namespace
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_CONTROL_TRANSFER_H_
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device.h
deleted file mode 100644
index 48c5867f9..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * \file usb_device.h
- * \brief UsbDevice class header file.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_DEVICE_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_DEVICE_H_
-
-#include "transport_manager/transport_adapter/device.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class UsbDevice : public Device {
- public:
- UsbDevice(PlatformUsbDevice* usb_device, const std::string& name,
- const DeviceUID& unique_device_id)
- : Device(name, unique_device_id), usb_device_(usb_device) {}
-
- PlatformUsbDevice* usb_device() const { return usb_device_; }
-
- protected:
- virtual ~UsbDevice() {}
-
- virtual bool IsSameAs(const Device* other_device) const {
- return unique_device_id() == other_device->unique_device_id();
- }
-
- virtual ApplicationList GetApplicationList() const {
- ApplicationList app_list;
- app_list.push_back(1);
- return app_list;
- }
-
- private:
- PlatformUsbDevice* usb_device_;
-};
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_USB_DEVICE
diff --git a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h b/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h
deleted file mode 100644
index 6cae52266..000000000
--- a/SDL_Core/src/components/transport_manager/include/transport_manager/usb/usb_device_scanner.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * \file usb_device_scanner.h
- * \brief UsbDeviceScanner class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_DEVICE_SCANNER_H_
-#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_DEVICE_SCANNER_H_
-
-#include <list>
-
-#include <pthread.h>
-
-#include "transport_manager/transport_adapter/device_scanner.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-class UsbDeviceScanner : public DeviceScanner, public UsbDeviceListener {
- public:
- UsbDeviceScanner(class TransportAdapterController* controller);
- virtual ~UsbDeviceScanner();
-
- protected:
- virtual TransportAdapter::Error Init();
- virtual TransportAdapter::Error Scan();
- virtual void Terminate();
- virtual bool IsInitialised() const;
- virtual void OnDeviceArrived(PlatformUsbDevice* device);
- virtual void OnDeviceLeft(PlatformUsbDevice* device);
-
- private:
- void UpdateList();
- void TurnIntoAccessoryMode(PlatformUsbDevice* device);
- void GoogleAccessoryFound(PlatformUsbDevice* device);
-
- TransportAdapterController* controller_;
-
- typedef std::list<PlatformUsbDevice*> Devices;
- Devices devices_;
- pthread_mutex_t devices_mutex_;
-};
-
-} // namespace
-} // namespace
-
-#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_DEVICE_SCANNER
diff --git a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc b/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
deleted file mode 100644
index 8d75c84b2..000000000
--- a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * \file bluetooth_connection_factory.cc
- * \brief BluetoothConnectionFactory class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/bluetooth/bluetooth_connection_factory.h"
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/bluetooth/bluetooth_socket_connection.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-BluetoothConnectionFactory::BluetoothConnectionFactory(
- TransportAdapterController* controller)
- : controller_(controller) {
-}
-
-TransportAdapter::Error BluetoothConnectionFactory::Init() {
- return TransportAdapter::OK;
-}
-
-TransportAdapter::Error BluetoothConnectionFactory::CreateConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- LOG4CXX_INFO(logger_, "enter");
- BluetoothSocketConnection* connection(
- new BluetoothSocketConnection(device_uid, app_handle, controller_));
- TransportAdapter::Error error = connection->Start();
- if (error != TransportAdapter::OK) {
- LOG4CXX_INFO(logger_, "connection::Start() failed");
- delete connection;
- }
- LOG4CXX_INFO(logger_, "exit");
- return error;
-}
-
-void BluetoothConnectionFactory::Terminate() {
-}
-
-bool BluetoothConnectionFactory::IsInitialised() const {
- return true;
-}
-
-BluetoothConnectionFactory::~BluetoothConnectionFactory() {
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device.cc b/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
deleted file mode 100644
index 472922ec4..000000000
--- a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * \file bluetooth_device.cc
- * \brief BluetoothDevice class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/bluetooth/bluetooth_device.h"
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <algorithm>
-#include <limits>
-
-namespace transport_manager {
-namespace transport_adapter {
-
-bool BluetoothDevice::GetRfcommChannel(const ApplicationHandle app_handle,
- uint8_t* channel_out) {
- if (app_handle < 0 || app_handle > std::numeric_limits<uint8_t>::max())
- return false;
- const uint8_t channel = static_cast<uint8_t>(app_handle);
- RfcommChannelVector::const_iterator it = std::find(rfcomm_channels_.begin(),
- rfcomm_channels_.end(),
- channel);
- if (it == rfcomm_channels_.end())
- return false;
- *channel_out = channel;
- return true;
-}
-
-std::string BluetoothDevice::GetUniqueDeviceId(const bdaddr_t& device_address) {
- char device_address_string[32];
- ba2str(&device_address, device_address_string);
- return std::string("BT-") + device_address_string;
-}
-
-BluetoothDevice::BluetoothDevice(const bdaddr_t& device_address, const char* device_name,
- const RfcommChannelVector& rfcomm_channels)
- : Device(device_name, GetUniqueDeviceId(device_address)),
- address_(device_address),
- rfcomm_channels_(rfcomm_channels) {
-}
-
-bool BluetoothDevice::IsSameAs(const Device* other) const {
- bool result = false;
-
- const BluetoothDevice* other_bluetooth_device =
- dynamic_cast<const BluetoothDevice*>(other);
-
- if (0 != other_bluetooth_device) {
- if (0
- == memcmp(&address_, &other_bluetooth_device->address_,
- sizeof(bdaddr_t))) {
- result = true;
- }
- }
-
- return result;
-}
-
-ApplicationList BluetoothDevice::GetApplicationList() const {
- return ApplicationList(rfcomm_channels_.begin(), rfcomm_channels_.end());
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
diff --git a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc b/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
deleted file mode 100644
index e1147fa52..000000000
--- a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
+++ /dev/null
@@ -1,487 +0,0 @@
-/**
- * \file bluetooth_device_scanner.cc
- * \brief BluetoothDeviceScanner class header file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/bluetooth/bluetooth_device_scanner.h"
-
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-#include <bluetooth/rfcomm.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <vector>
-#include <sstream>
-#include "transport_manager/bluetooth/bluetooth_transport_adapter.h"
-#include "transport_manager/bluetooth/bluetooth_device.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-namespace {
-char* SplitToAddr(char* dev_list_entry) {
- char* bl_address = strtok(dev_list_entry, "()");
- if (bl_address != NULL) {
- bl_address = strtok(NULL, "()");
- return bl_address;
- } else {
- return NULL;
- }
-}
-
-int FindPairedDevs(std::vector<bdaddr_t>* result) {
- DCHECK(result != NULL);
-
- const char* cmd = "bt-device -l";
-
- FILE* pipe = popen(cmd, "r");
- if (!pipe) {
- return -1;
- }
- char* buffer = new char[1028];
- size_t counter = 0;
- while (fgets(buffer, 1028, pipe) != NULL) {
- if (0 < counter++) { // skip first line
- char* bt_address = SplitToAddr(buffer);
- if (bt_address) {
- bdaddr_t address;
- str2ba(bt_address, &address);
- result->push_back(address);
- }
- }
- delete [] buffer;
- buffer = new char[1028];
- }
- pclose(pipe);
- return 0;
-}
-} // namespace
-
-BluetoothDeviceScanner::BluetoothDeviceScanner(
- TransportAdapterController* controller, bool auto_repeat_search,
- int auto_repeat_pause_sec)
- : controller_(controller),
- thread_(),
- thread_started_(false),
- shutdown_requested_(false),
- ready_(true),
- device_scan_requested_(false),
- device_scan_requested_lock_(),
- device_scan_requested_cv_(),
- auto_repeat_search_(auto_repeat_search),
- auto_repeat_pause_sec_(auto_repeat_pause_sec) {
- uint8_t smart_device_link_service_uuid_data[] = { 0x93, 0x6D, 0xA0, 0x1F,
- 0x9A, 0xBD, 0x4D, 0x9D, 0x80, 0xC7, 0x02, 0xAF, 0x85, 0xC8, 0x22, 0xA8
- };
- sdp_uuid128_create(&smart_device_link_service_uuid_,
- smart_device_link_service_uuid_data);
-}
-
-BluetoothDeviceScanner::~BluetoothDeviceScanner() {
-}
-
-void* bluetoothDeviceScannerThread(void* data) {
- LOG4CXX_TRACE_ENTER(logger_);
- BluetoothDeviceScanner* bluetoothDeviceScanner =
- static_cast<BluetoothDeviceScanner*>(data);
- assert(bluetoothDeviceScanner != 0);
- bluetoothDeviceScanner->Thread();
- LOG4CXX_TRACE_EXIT(logger_);
- return 0;
-}
-
-bool BluetoothDeviceScanner::IsInitialised() const {
- return thread_started_;
-}
-
-void BluetoothDeviceScanner::UpdateTotalDeviceList() {
- DeviceVector devices;
- devices.insert(devices.end(), paired_devices_with_sdl_.begin(),
- paired_devices_with_sdl_.end());
- devices.insert(devices.end(), found_devices_with_sdl_.begin(),
- found_devices_with_sdl_.end());
- controller_->SearchDeviceDone(devices);
-}
-
-void BluetoothDeviceScanner::DoInquiry() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- const int device_id = hci_get_route(0);
- if (device_id < 0) {
- LOG4CXX_INFO(logger_, "HCI device is not available");
- shutdown_requested_ = true;
- controller_->SearchDeviceFailed(SearchDeviceError());
- return;
- }
-
- int device_handle = hci_open_dev(device_id);
- if (device_handle < 0) {
- LOG4CXX_INFO(logger_, "device_handle < 0, exit DoInquiry");
- controller_->SearchDeviceFailed(SearchDeviceError());
- return;
- }
-
- if (paired_devices_.empty()) {
- LOG4CXX_INFO(logger_, "Searching for paired devices.");
- if (-1 == FindPairedDevs(&paired_devices_)) {
- LOG4CXX_ERROR(logger_, "Failed to retrieve list of paired devices.");
- controller_->SearchDeviceFailed(SearchDeviceError());
- }
- }
-
- LOG4CXX_INFO(logger_, "Check rfcomm channel on "
- << paired_devices_.size() << " paired devices.");
-
- paired_devices_with_sdl_.clear();
- CheckSDLServiceOnDevices(paired_devices_, device_handle,
- &paired_devices_with_sdl_);
- UpdateTotalDeviceList();
-
- LOG4CXX_INFO(logger_, "Starting hci_inquiry on device " << device_id);
- const uint8_t inquiry_time = 8u; // Time unit is 1.28 seconds
- const size_t max_devices = 256u;
- inquiry_info* inquiry_info_list = new inquiry_info[max_devices];
-
- const int number_of_devices = hci_inquiry(device_id, inquiry_time,
- max_devices, 0, &inquiry_info_list,
- IREQ_CACHE_FLUSH);
-
- if (number_of_devices >= 0) {
- LOG4CXX_INFO(logger_,
- "hci_inquiry: found " << number_of_devices << " devices");
- std::vector < bdaddr_t > found_devices(number_of_devices);
- for (int i = 0; i < number_of_devices; ++i) {
- found_devices[i] = inquiry_info_list[i].bdaddr;
- }
- found_devices_with_sdl_.clear();
- CheckSDLServiceOnDevices(found_devices, device_handle,
- &found_devices_with_sdl_);
- }
- UpdateTotalDeviceList();
-
- close(device_handle);
- delete[] inquiry_info_list;
-
- if (number_of_devices < 0) {
- LOG4CXX_INFO(logger_, "number_of_devices < 0");
- LOG4CXX_TRACE_EXIT(logger_);
- controller_->SearchDeviceFailed(SearchDeviceError());
- }
-
- LOG4CXX_INFO(logger_, "Bluetooth inquiry finished");
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void BluetoothDeviceScanner::CheckSDLServiceOnDevices(
- const std::vector<bdaddr_t>& bd_addresses, int device_handle,
- DeviceVector* discovered_devices) {
- std::vector<RfcommChannelVector> sdl_rfcomm_channels =
- DiscoverSmartDeviceLinkRFCOMMChannels(bd_addresses);
-
- for (size_t i = 0; i < bd_addresses.size(); ++i) {
- if (sdl_rfcomm_channels[i].empty()) {
- continue;
- }
-
- const bdaddr_t& bd_address = bd_addresses[i];
- char deviceName[256];
- int hci_read_remote_name_ret = hci_read_remote_name(
- device_handle, &bd_address, sizeof(deviceName) / sizeof(deviceName[0]),
- deviceName, 0);
-
- if (hci_read_remote_name_ret != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "hci_read_remote_name failed");
- strncpy(deviceName,
- BluetoothDevice::GetUniqueDeviceId(bd_address).c_str(),
- sizeof(deviceName) / sizeof(deviceName[0]));
- }
-
- Device* bluetooth_device = new BluetoothDevice(bd_address, deviceName,
- sdl_rfcomm_channels[i]);
- if (bluetooth_device) {
- LOG4CXX_INFO(logger_, "Bluetooth device created successfully");
- discovered_devices->push_back(bluetooth_device);
- } else {
- LOG4CXX_WARN(logger_, "Can't create bluetooth device " << deviceName);
- }
- }
-}
-
-std::vector<BluetoothDeviceScanner::RfcommChannelVector> BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
- const std::vector<bdaddr_t>& device_addresses) {
- LOG4CXX_TRACE_ENTER(logger_);
- const size_t size = device_addresses.size();
- std::vector<RfcommChannelVector> result(size);
-
- static const int attempts = 4;
- static const int attempt_timeout = 5;
- std::vector<bool> processed(size, false);
- unsigned processed_count = 0;
- for (int nattempt = 0; nattempt < attempts; ++nattempt) {
- for (size_t i = 0; i < size; ++i) {
- if (processed[i]) {
- continue;
- }
- const bool final = DiscoverSmartDeviceLinkRFCOMMChannels(
- device_addresses[i], &result[i]);
- if (final) {
- processed[i] = true;
- ++processed_count;
- }
- }
- if (++processed_count >= size) {
- break;
- }
- sleep(attempt_timeout);
- }
- return result;
-}
-
-bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
- const bdaddr_t& device_address, RfcommChannelVector* channels) {
- static bdaddr_t any_address = { { 0, 0, 0, 0, 0, 0 } };
-
- sdp_session_t* sdp_session = sdp_connect(
- &any_address, &device_address, SDP_RETRY_IF_BUSY | SDP_WAIT_ON_CLOSE);
- if (sdp_session == 0) {
- LOG4CXX_INFO(logger_, "sdp_connect errno " << errno);
- return !(errno == 31 || errno == 16 || errno == 117 || errno == 114);
- }
-
- sdp_list_t* search_list = sdp_list_append(0,
- &smart_device_link_service_uuid_);
- uint32_t range = 0x0000ffff;
- sdp_list_t* attr_list = sdp_list_append(0, &range);
- sdp_list_t* response_list = 0;
-
- if (0
- == sdp_service_search_attr_req(sdp_session, search_list,
- SDP_ATTR_REQ_RANGE, attr_list,
- &response_list)) {
- for (sdp_list_t* r = response_list; 0 != r; r = r->next) {
- sdp_record_t* sdp_record = static_cast<sdp_record_t*>(r->data);
- sdp_list_t* proto_list = 0;
-
- if (0 == sdp_get_access_protos(sdp_record, &proto_list)) {
- for (sdp_list_t* p = proto_list; 0 != p; p = p->next) {
- sdp_list_t* pdsList = static_cast<sdp_list_t*>(p->data);
-
- for (sdp_list_t* pds = pdsList; 0 != pds; pds = pds->next) {
- sdp_data_t* sdpData = static_cast<sdp_data_t*>(pds->data);
- int proto = 0;
-
- for (sdp_data_t* d = sdpData; 0 != d; d = d->next) {
- switch (d->dtd) {
- case SDP_UUID16:
- case SDP_UUID32:
- case SDP_UUID128:
- proto = sdp_uuid_to_proto(&d->val.uuid);
- break;
-
- case SDP_UINT8:
- if (RFCOMM_UUID == proto) {
- channels->push_back(d->val.uint8);
- }
- break;
- }
- }
- }
-
- sdp_list_free(pdsList, 0);
- }
-
- sdp_list_free(proto_list, 0);
- }
- }
- }
- sdp_list_free(search_list, 0);
- sdp_list_free(attr_list, 0);
- sdp_list_free(response_list, 0);
- sdp_close(sdp_session);
-
- if (!channels->empty()) {
- LOG4CXX_INFO(logger_, "channels not empty");
- std::stringstream rfcomm_channels_string;
-
- for (RfcommChannelVector::const_iterator it = channels->begin();
- it != channels->end(); ++it) {
- if (it != channels->begin()) {
- rfcomm_channels_string << ", ";
- }
- rfcomm_channels_string << static_cast<uint32_t>(*it);
- }
-
- LOG4CXX_INFO(
- logger_,
- "SmartDeviceLink service was discovered on device "
- << BluetoothDevice::GetUniqueDeviceId(device_address)
- << " at channel(s): " << rfcomm_channels_string.str().c_str());
- } else {
- LOG4CXX_INFO(
- logger_,
- "SmartDeviceLink service was not discovered on device "
- << BluetoothDevice::GetUniqueDeviceId(device_address));
- }
- LOG4CXX_TRACE_EXIT(logger_);
- return true;
-}
-
-void BluetoothDeviceScanner::Thread() {
- LOG4CXX_TRACE_ENTER(logger_);
- LOG4CXX_INFO(logger_, "Bluetooth adapter main thread initialized");
- ready_ = true;
- if (auto_repeat_search_) {
- while (!shutdown_requested_) {
- DoInquiry();
- device_scan_requested_ = false;
- TimedWaitForDeviceScanRequest();
- }
- } else { // search only on demand
- while (true) {
- {
- sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
- while (!(device_scan_requested_ || shutdown_requested_)) {
- device_scan_requested_cv_.Wait(auto_lock);
- }
- }
- if (shutdown_requested_) {
- break;
- }
- DoInquiry();
- device_scan_requested_ = false;
- }
- }
-
- LOG4CXX_INFO(logger_, "Bluetooth device scanner thread finished");
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void BluetoothDeviceScanner::TimedWaitForDeviceScanRequest() {
- LOG4CXX_TRACE_ENTER(logger_);
-
- if (auto_repeat_pause_sec_ == 0) {
- LOG4CXX_TRACE_EXIT(logger_);
- return;
- }
-
- {
- sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
- while (!(device_scan_requested_ || shutdown_requested_)) {
- const sync_primitives::ConditionalVariable::WaitStatus wait_status =
- device_scan_requested_cv_.WaitFor(auto_lock, auto_repeat_pause_sec_ * 1000);
- if (wait_status == sync_primitives::ConditionalVariable::kTimeout) {
- LOG4CXX_INFO(logger_, "Bluetooth scanner timeout, performing scan");
- device_scan_requested_ = true;
- }
- }
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-TransportAdapter::Error BluetoothDeviceScanner::Init() {
- LOG4CXX_TRACE_ENTER(logger_);
- const int thread_start_error = pthread_create(&thread_, 0,
- &bluetoothDeviceScannerThread,
- this);
-
- if (0 == thread_start_error) {
- thread_started_ = true;
- LOG4CXX_INFO(logger_, "Bluetooth device scanner thread started");
- } else {
- LOG4CXX_ERROR(
- logger_,
- "Bluetooth device scanner thread start failed, error code "
- << thread_start_error);
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::FAIL;
- }
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::OK;
-}
-
-void BluetoothDeviceScanner::Terminate() {
- LOG4CXX_TRACE_ENTER(logger_);
- shutdown_requested_ = true;
-
- if (true == thread_started_) {
- {
- sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
- device_scan_requested_ = false;
- device_scan_requested_cv_.NotifyOne();
- }
- LOG4CXX_INFO(logger_,
- "Waiting for bluetooth device scanner thread termination");
- pthread_join(thread_, 0);
- LOG4CXX_INFO(logger_, "Bluetooth device scanner thread terminated");
- }
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-TransportAdapter::Error BluetoothDeviceScanner::Scan() {
- LOG4CXX_TRACE_ENTER(logger_);
- if ((!thread_started_) || shutdown_requested_) {
- LOG4CXX_INFO(logger_, "bad state");
- return TransportAdapter::BAD_STATE;
- }
- if (auto_repeat_pause_sec_ == 0) {
- LOG4CXX_INFO(logger_, "no search pause, scan forcing not needed");
- return TransportAdapter::OK;
- }
- TransportAdapter::Error ret = TransportAdapter::OK;
-
- {
- sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
- if (false == device_scan_requested_) {
- LOG4CXX_INFO(logger_, "Requesting device Scan");
- device_scan_requested_ = true;
- device_scan_requested_cv_.NotifyOne();
- } else {
- ret = TransportAdapter::BAD_STATE;
- LOG4CXX_INFO(logger_, "Device Scan is currently in progress");
- }
- }
-
- LOG4CXX_TRACE_EXIT(logger_);
- return ret;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
diff --git a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc b/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
deleted file mode 100644
index 64e6f9d71..000000000
--- a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * \file bluetooth_socket_connection.cc
- * \brief BluetoothSocketConnection class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/bluetooth/bluetooth_socket_connection.h"
-
-#include <unistd.h>
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-#include <bluetooth/rfcomm.h>
-
-#include "transport_manager/bluetooth/bluetooth_device.h"
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-BluetoothSocketConnection::BluetoothSocketConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle,
- TransportAdapterController* controller)
- : ThreadedSocketConnection(device_uid, app_handle, controller) {
-}
-
-BluetoothSocketConnection::~BluetoothSocketConnection() {
-}
-
-bool BluetoothSocketConnection::Establish(ConnectError** error) {
- LOG4CXX_INFO(logger_, "enter (#" << pthread_self() << ")");
- DeviceSptr device = controller()->FindDevice(device_handle());
-
- BluetoothDevice* bluetooth_device =
- static_cast<BluetoothDevice*>(device.get());
-
- uint8_t rfcomm_channel;
- if (!bluetooth_device->GetRfcommChannel(application_handle(),
- &rfcomm_channel)) {
- LOG4CXX_ERROR(logger_,
- "Application " << application_handle() << " not found");
- *error = new ConnectError();
- LOG4CXX_INFO(logger_, "exit (#" << pthread_self() << ")");
- return false;
- }
-
- struct sockaddr_rc remoteSocketAddress = { 0 };
- remoteSocketAddress.rc_family = AF_BLUETOOTH;
- memcpy(&remoteSocketAddress.rc_bdaddr, &bluetooth_device->address(),
- sizeof(bdaddr_t));
- remoteSocketAddress.rc_channel = rfcomm_channel;
-
- int rfcomm_socket;
-
- int attempts = 4;
- int connect_status = 0;
- LOG4CXX_INFO(logger_, "start rfcomm Connect attempts");
- do {
- rfcomm_socket = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
- if (-1 == rfcomm_socket) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Failed to create RFCOMM socket for device " << device_handle());
- *error = new ConnectError();
- LOG4CXX_INFO(logger_, "exit (#" << pthread_self() << ")");
- return false;
- }
- connect_status = ::connect(rfcomm_socket,
- (struct sockaddr*) &remoteSocketAddress,
- sizeof(remoteSocketAddress));
- if (0 == connect_status) {
- LOG4CXX_INFO(logger_, "rfcomm Connect ok");
- break;
- }
- LOG4CXX_INFO(logger_, "rfcomm Connect errno " << errno);
- if (errno != 111 && errno != 104) {
- break;
- }
- if (errno) {
- close(rfcomm_socket);
- }
- sleep(2);
- } while (--attempts > 0);
- LOG4CXX_INFO(logger_, "rfcomm Connect attempts finished");
- if (0 != connect_status) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Failed to Connect to remote device " << BluetoothDevice::GetUniqueDeviceId(remoteSocketAddress.rc_bdaddr) << " for session " << this);
- *error = new ConnectError();
- LOG4CXX_INFO(logger_, "exit (#" << pthread_self() << ")");
- return false;
- }
-
- set_socket(rfcomm_socket);
- LOG4CXX_INFO(logger_, "exit (#" << pthread_self() << ")");
- return true;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
diff --git a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc b/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
deleted file mode 100644
index e16ba186f..000000000
--- a/SDL_Core/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * \file bluetooth_transport_adapter.cc
- * \brief BluetoothTransportAdapter class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-
-#include <iomanip>
-#include <set>
-#include <bluetooth/bluetooth.h>
-
-#include "resumption/last_state.h"
-
-#include "transport_manager/bluetooth/bluetooth_transport_adapter.h"
-#include "transport_manager/bluetooth/bluetooth_device_scanner.h"
-#include "transport_manager/bluetooth/bluetooth_connection_factory.h"
-#include "transport_manager/bluetooth/bluetooth_device.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-BluetoothTransportAdapter::~BluetoothTransportAdapter() {
-}
-
-BluetoothTransportAdapter::BluetoothTransportAdapter()
- : TransportAdapterImpl(new BluetoothDeviceScanner(this, true, 0),
- new BluetoothConnectionFactory(this), 0) {
-}
-
-DeviceType BluetoothTransportAdapter::GetDeviceType() const {
- return "sdl-bluetooth";
-}
-
-void BluetoothTransportAdapter::Store() const {
- LOG4CXX_TRACE_ENTER(logger_);
- resumption::LastState::Dictionary bluetooth_adapter_dictionary;
- DeviceList device_ids = GetDeviceList();
- for (DeviceList::const_iterator i = device_ids.begin(); i != device_ids.end(); ++i) {
- DeviceUID device_id = *i;
- DeviceSptr device = FindDevice(device_id);
- if (!device) { // device could have been disconnected
- continue;
- }
- utils::SharedPtr<BluetoothDevice> bluetooth_device =
- DeviceSptr::static_pointer_cast<BluetoothDevice>(device);
- resumption::LastState::Dictionary device_dictionary;
- char address[18];
- ba2str(&bluetooth_device->address(), address);
- device_dictionary.AddItem("address", std::string(address));
- resumption::LastState::Dictionary applications_dictionary;
- ApplicationList app_ids = bluetooth_device->GetApplicationList();
- for (ApplicationList::const_iterator j = app_ids.begin(); j != app_ids.end(); ++j) {
- ApplicationHandle app_handle = *j;
- uint8_t rfcomm_channel;
- bluetooth_device->GetRfcommChannel(app_handle, &rfcomm_channel);
- resumption::LastState::Dictionary application_dictionary;
- application_dictionary.AddItem("rfcomm_channel", std::to_string(rfcomm_channel));
- applications_dictionary.AddSubitem(std::to_string(rfcomm_channel), application_dictionary);
- }
- device_dictionary.AddSubitem("applications", applications_dictionary);
- bluetooth_adapter_dictionary.AddSubitem(bluetooth_device->name(), device_dictionary);
- }
- resumption::LastState::instance()->dictionary.AddSubitem(
- "BluetoothAdapter", bluetooth_adapter_dictionary
- );
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-bool BluetoothTransportAdapter::Restore() {
- LOG4CXX_TRACE_ENTER(logger_);
- bool errors_occured = false;
- resumption::LastState::Dictionary bluetooth_adapter_dictionary =
- resumption::LastState::instance()->dictionary.SubitemAt("BluetoothAdapter");
- for (resumption::LastState::Dictionary::const_iterator i =
- bluetooth_adapter_dictionary.begin(); i != bluetooth_adapter_dictionary.end(); ++i) {
- std::string name = i->first;
- resumption::LastState::Dictionary device_dictionary = i->second;
- std::string address_record = device_dictionary.ItemAt("address");
- bdaddr_t address;
- str2ba(address_record.c_str(), &address);
- RfcommChannelVector rfcomm_channels;
- resumption::LastState::Dictionary applications_dictionary =
- device_dictionary.SubitemAt("applications");
- for (resumption::LastState::Dictionary::const_iterator j =
- applications_dictionary.begin(); j != applications_dictionary.end(); ++j) {
- resumption::LastState::Dictionary application_dictionary = j->second;
- std::string rfcomm_channel_record =
- application_dictionary.ItemAt("rfcomm_channel");
- uint8_t rfcomm_channel =
- static_cast<uint8_t>(atoi(rfcomm_channel_record.c_str()));
- rfcomm_channels.push_back(rfcomm_channel);
- }
- BluetoothDevice* bluetooth_device =
- new BluetoothDevice(address, name.c_str(), rfcomm_channels);
- DeviceSptr device(bluetooth_device);
- AddDevice(device);
- for (RfcommChannelVector::const_iterator j =
- rfcomm_channels.begin(); j != rfcomm_channels.end(); ++j) {
- ApplicationHandle app_handle = *j; // for Bluetooth device app_handle is just RFCOMM channel
- if (Error::OK != Connect(device->unique_device_id(), app_handle)) {
- errors_occured = true;
- }
- }
- }
- LOG4CXX_TRACE_EXIT(logger_);
- return !errors_occured;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
diff --git a/SDL_Core/src/components/transport_manager/src/tcp/dnssd_service_browser.cc b/SDL_Core/src/components/transport_manager/src/tcp/dnssd_service_browser.cc
deleted file mode 100644
index 799348cfb..000000000
--- a/SDL_Core/src/components/transport_manager/src/tcp/dnssd_service_browser.cc
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * \file dnssd_service_browser.cc
- * \brief DnssdServiceBrowser class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <algorithm>
-#include <map>
-
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-#include "transport_manager/tcp/tcp_device.h"
-#include "transport_manager/tcp/dnssd_service_browser.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-bool operator==(const DnssdServiceRecord& a, const DnssdServiceRecord& b) {
- return a.name == b.name && a.type == b.type && a.interface == b.interface
- && a.protocol == b.protocol && a.domain_name == b.domain_name;
-}
-
-void DnssdServiceBrowser::Terminate() {
- if (0 != avahi_threaded_poll_)
- avahi_threaded_poll_stop(avahi_threaded_poll_);
- if (0 != avahi_service_browser_)
- avahi_service_browser_free(avahi_service_browser_);
- if (0 != avahi_client_)
- avahi_client_free(avahi_client_);
- if (0 != avahi_threaded_poll_)
- avahi_threaded_poll_free(avahi_threaded_poll_);
-}
-
-bool DnssdServiceBrowser::IsInitialised() const {
- return initialised_;
-}
-
-DnssdServiceBrowser::DnssdServiceBrowser(TransportAdapterController* controller)
- : controller_(controller),
- avahi_service_browser_(0),
- avahi_threaded_poll_(0),
- avahi_client_(0),
- service_records_(),
- mutex_(),
- initialised_(false) {
- pthread_mutex_init(&mutex_, 0);
-}
-
-DnssdServiceBrowser::~DnssdServiceBrowser() {
- pthread_mutex_destroy(&mutex_);
-}
-
-void DnssdServiceBrowser::OnClientConnected() {
- initialised_ = true;
- LOG4CXX_ERROR(logger_, "AvahiClient ready");
-}
-
-void DnssdServiceBrowser::OnClientFailure() {
- const int avahi_errno = avahi_client_errno(avahi_client_);
- if (avahi_errno == AVAHI_ERR_DISCONNECTED) {
- LOG4CXX_INFO(logger_, "AvahiClient disconnected");
- CreateAvahiClientAndBrowser();
- } else {
- LOG4CXX_ERROR(logger_,
- "AvahiClient failure: " << avahi_strerror(avahi_errno));
- }
-}
-
-void AvahiClientCallback(AvahiClient *avahi_client,
- AvahiClientState avahi_client_state, void* data) {
- DnssdServiceBrowser* dnssd_service_browser =
- static_cast<DnssdServiceBrowser*>(data);
-
- switch (avahi_client_state) {
- case AVAHI_CLIENT_S_RUNNING:
- dnssd_service_browser->OnClientConnected();
- break;
- case AVAHI_CLIENT_FAILURE:
- dnssd_service_browser->OnClientFailure();
- break;
- }
-}
-
-void AvahiServiceBrowserCallback(AvahiServiceBrowser *avahi_service_browser,
- AvahiIfIndex interface, AvahiProtocol protocol,
- AvahiBrowserEvent event, const char *name,
- const char *type, const char *domain,
- AvahiLookupResultFlags flags, void* data) {
- DnssdServiceBrowser* dnssd_service_browser =
- static_cast<DnssdServiceBrowser*>(data);
-
- int avahi_errno;
- switch (event) {
- case AVAHI_BROWSER_FAILURE:
- avahi_errno = avahi_client_errno(
- avahi_service_browser_get_client(avahi_service_browser));
- LOG4CXX_ERROR(
- logger_,
- "AvahiServiceBrowser failure: " << avahi_strerror(avahi_errno));
- break;
-
- case AVAHI_BROWSER_NEW:
- dnssd_service_browser->AddService(interface, protocol, name, type,
- domain);
- break;
-
- case AVAHI_BROWSER_REMOVE:
- dnssd_service_browser->RemoveService(interface, protocol, name, type,
- domain);
- break;
-
- case AVAHI_BROWSER_ALL_FOR_NOW:
- case AVAHI_BROWSER_CACHE_EXHAUSTED:
- break;
- }
-}
-
-void DnssdServiceBrowser::ServiceResolved(
- const DnssdServiceRecord& service_record) {
- pthread_mutex_lock(&mutex_);
- ServiceRecords::iterator service_record_it = std::find(
- service_records_.begin(), service_records_.end(), service_record);
- if (service_record_it != service_records_.end()) {
- *service_record_it = service_record;
- }
- DeviceVector device_vector = PrepareDeviceVector();
- controller_->SearchDeviceDone(device_vector);
- pthread_mutex_unlock(&mutex_);
-}
-
-void DnssdServiceBrowser::ServiceResolveFailed(
- const DnssdServiceRecord& service_record) {
- LOG4CXX_ERROR(logger_,
- "AvahiServiceResolver failure for: " << service_record.name);
- pthread_mutex_lock(&mutex_);
- ServiceRecords::iterator service_record_it = std::find(
- service_records_.begin(), service_records_.end(), service_record);
- if (service_record_it != service_records_.end()) {
- service_records_.erase(service_record_it);
- }
- pthread_mutex_unlock(&mutex_);
-}
-
-void AvahiServiceResolverCallback(AvahiServiceResolver* avahi_service_resolver,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiResolverEvent event, const char* name,
- const char* type, const char* domain,
- const char* host_name,
- const AvahiAddress* avahi_address,
- uint16_t port, AvahiStringList* txt,
- AvahiLookupResultFlags flags, void *data) {
- DnssdServiceBrowser* dnssd_service_browser =
- static_cast<DnssdServiceBrowser*>(data);
-
- DnssdServiceRecord service_record;
- service_record.interface = interface;
- service_record.protocol = protocol;
- service_record.domain_name = domain;
- service_record.host_name = host_name;
- service_record.name = name;
- service_record.type = type;
- switch (event) {
- case AVAHI_RESOLVER_FOUND:
- service_record.addr = avahi_address->data.ipv4.address;
- service_record.port = port;
- dnssd_service_browser->ServiceResolved(service_record);
- break;
- case AVAHI_RESOLVER_FAILURE:
- dnssd_service_browser->ServiceResolveFailed(service_record);
- break;
- }
-
- avahi_service_resolver_free(avahi_service_resolver);
-}
-
-TransportAdapter::Error DnssdServiceBrowser::CreateAvahiClientAndBrowser() {
- if (0 != avahi_service_browser_)
- avahi_service_browser_free(avahi_service_browser_);
- if (0 != avahi_client_)
- avahi_client_free(avahi_client_);
-
- int avahi_error;
- avahi_client_ = avahi_client_new(
- avahi_threaded_poll_get(avahi_threaded_poll_), AVAHI_CLIENT_NO_FAIL,
- AvahiClientCallback, this, &avahi_error);
- if (0 == avahi_client_) {
- LOG4CXX_ERROR(
- logger_,
- "Failed to create AvahiClient: " << avahi_strerror(avahi_error));
- return TransportAdapter::FAIL;
- }
-
- pthread_mutex_lock(&mutex_);
- service_records_.clear();
- pthread_mutex_unlock(&mutex_);
-
- avahi_service_browser_ = avahi_service_browser_new(
- avahi_client_, AVAHI_IF_UNSPEC, /* TODO use only required iface */
- AVAHI_PROTO_INET, DNSSD_DEFAULT_SERVICE_TYPE, NULL, /* use default domain */
- static_cast<AvahiLookupFlags>(0), AvahiServiceBrowserCallback, this);
-
- return TransportAdapter::OK;
-}
-
-TransportAdapter::Error DnssdServiceBrowser::Init() {
- avahi_threaded_poll_ = avahi_threaded_poll_new();
- if (0 == avahi_threaded_poll_) {
- LOG4CXX_ERROR(logger_, "Failed to create AvahiThreadedPoll");
- return TransportAdapter::FAIL;
- }
-
- const TransportAdapter::Error err = CreateAvahiClientAndBrowser();
- if (err != TransportAdapter::OK) {
- return err;
- }
-
- const int poll_start_status = avahi_threaded_poll_start(avahi_threaded_poll_);
- if (poll_start_status != 0) {
- LOG4CXX_ERROR(logger_, "Failed to start AvahiThreadedPoll");
- return TransportAdapter::FAIL;
- }
-
- return TransportAdapter::OK;
-}
-
-TransportAdapter::Error DnssdServiceBrowser::Scan() {
- return TransportAdapter::NOT_SUPPORTED;
-}
-
-void DnssdServiceBrowser::AddService(AvahiIfIndex interface,
- AvahiProtocol protocol, const char* name,
- const char* type, const char* domain) {
- DnssdServiceRecord record;
- record.interface = interface;
- record.protocol = protocol;
- record.domain_name = domain;
- record.name = name;
- record.type = type;
-
- pthread_mutex_lock(&mutex_);
- if (service_records_.end()
- == std::find(service_records_.begin(), service_records_.end(), record)) {
- service_records_.push_back(record);
- AvahiServiceResolver* avahi_service_resolver = avahi_service_resolver_new(
- avahi_client_, interface, protocol, name, type, domain,
- AVAHI_PROTO_INET, static_cast<AvahiLookupFlags>(0),
- AvahiServiceResolverCallback, this);
- }
- pthread_mutex_unlock(&mutex_);
-}
-
-void DnssdServiceBrowser::RemoveService(AvahiIfIndex interface,
- AvahiProtocol protocol,
- const char* name, const char* type,
- const char* domain) {
- DnssdServiceRecord record;
- record.interface = interface;
- record.protocol = protocol;
- record.name = name;
- record.type = type;
- record.domain_name = domain;
-
- pthread_mutex_lock(&mutex_);
- service_records_.erase(
- std::remove(service_records_.begin(), service_records_.end(), record),
- service_records_.end());
- pthread_mutex_unlock(&mutex_);
-}
-
-DeviceVector DnssdServiceBrowser::PrepareDeviceVector() const {
- std::map<uint32_t, TcpDevice*> devices;
- for (ServiceRecords::const_iterator it = service_records_.begin();
- it != service_records_.end(); ++it) {
- const DnssdServiceRecord& service_record = *it;
- if (service_record.host_name.empty()) continue;
- if (devices[service_record.addr] == 0) {
- devices[service_record.addr] = new TcpDevice(service_record.addr,
- service_record.host_name);
- }
- if (devices[service_record.addr] != 0) {
- devices[service_record.addr]->AddDiscoveredApplication(
- service_record.port);
- }
- }
- DeviceVector device_vector;
- device_vector.reserve(devices.size());
- for (std::map<uint32_t, TcpDevice*>::const_iterator it = devices.begin();
- it != devices.end(); ++it) {
- device_vector.push_back(DeviceSptr(it->second));
- }
- return device_vector;
-}
-
-} // namespace
-} // namespace
-
diff --git a/SDL_Core/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/SDL_Core/src/components/transport_manager/src/tcp/tcp_client_listener.cc
deleted file mode 100644
index d6fcf095b..000000000
--- a/SDL_Core/src/components/transport_manager/src/tcp/tcp_client_listener.cc
+++ /dev/null
@@ -1,261 +0,0 @@
-/**
- * \file tcp_client_listener.cc
- * \brief TcpClientListener class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/tcp/tcp_client_listener.h"
-
-#include <memory.h>
-#include <signal.h>
-#include <errno.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#include <sys/socket.h>
-#ifdef __linux__
-# include <linux/tcp.h>
-#else // __linux__
-# include <sys/time.h>
-# include <netinet/in.h>
-# include <netinet/tcp.h>
-//# include <netinet/tcp_var.h>
-#endif // __linux__
-
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/tcp/tcp_device.h"
-#include "transport_manager/tcp/tcp_socket_connection.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-TcpClientListener::TcpClientListener(TransportAdapterController* controller,
- const uint16_t port)
- : port_(port),
- controller_(controller),
- thread_(),
- socket_(-1),
- thread_started_(false),
- shutdown_requested_(false),
- thread_stop_requested_(false) {
-}
-
-void* tcpClientListenerThread(void* data) {
- TcpClientListener* tcpClientListener = static_cast<TcpClientListener*>(data);
- assert(tcpClientListener != 0);
- tcpClientListener->Thread();
- return 0;
-}
-
-TransportAdapter::Error TcpClientListener::Init() {
- return TransportAdapter::OK;
-}
-
-void TcpClientListener::Terminate() {
- shutdown_requested_ = true;
- if (TransportAdapter::OK != StopListening()) {
- LOG4CXX_ERROR(logger_, "Cannot stop listening TCP");
- }
-}
-
-bool TcpClientListener::IsInitialised() const {
- return true;
-}
-
-TcpClientListener::~TcpClientListener() {
- LOG4CXX_INFO(logger_, "destructor");
-}
-
-void TcpClientListener::Thread() {
- LOG4CXX_INFO(logger_, "Tcp client listener thread started");
-
- while (false == thread_stop_requested_) {
- sockaddr_in client_address;
- socklen_t client_address_size = sizeof(client_address);
- const int connection_fd = accept(socket_,
- (struct sockaddr*) &client_address,
- &client_address_size);
- if (thread_stop_requested_) break;
-
- if (connection_fd < 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "accept() failed");
- continue;
- }
-
- if (AF_INET != client_address.sin_family) {
- LOG4CXX_ERROR(logger_, "Address of connected client is invalid");
- continue;
- }
-
- char device_name[32];
- strncpy(device_name, inet_ntoa(client_address.sin_addr),
- sizeof(device_name) / sizeof(device_name[0]));
- LOG4CXX_INFO(logger_, "Connected client " << device_name);
-
- int yes = 1;
- int keepidle = 3; // 3 seconds to disconnection detecting
- int keepcnt = 5;
- int keepintvl = 1;
- int user_timeout = 7000; // milliseconds
-#ifdef __linux__
- setsockopt(connection_fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPIDLE, &keepidle, sizeof(keepidle));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPCNT, &keepcnt, sizeof(keepcnt));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPINTVL, &keepintvl, sizeof(keepintvl));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &user_timeout, sizeof(user_timeout));
-#elif OS_MACOSX
- setsockopt(connection_fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPALIVE, &keepidle, sizeof(keepidle));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPCNT, &keepcnt, sizeof(keepcnt));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPINTVL, &keepintvl, sizeof(keepintvl));
- setsockopt(connection_fd, IPPROTO_TCP, SO_RCVTIMEO, &user_timeout, sizeof(user_timeout));
- // NOTE: may need to set SO_SNDTIMEO
-#elif __QNX__
- // TODO (KKolodiy): Out of order!
- const int kMidLength = 4;
- int mib[kMidLength];
- timeval tval;
-
- mib[0] = CTL_NET;
- mib[1] = AF_INET;
- mib[2] = IPPROTO_TCP;
- mib[3] = TCPCTL_KEEPIDLE;
- sysctl(mib, kMidLength, NULL, NULL, &keepidle, sizeof(keepidle));
-
- mib[0] = CTL_NET;
- mib[1] = AF_INET;
- mib[2] = IPPROTO_TCP;
- mib[3] = TCPCTL_KEEPCNT;
- sysctl(mib, kMidLength, NULL, NULL, &keepcnt, sizeof(keepcnt));
-
- mib[0] = CTL_NET;
- mib[1] = AF_INET;
- mib[2] = IPPROTO_TCP;
- mib[3] = TCPCTL_KEEPINTVL;
- sysctl(mib, kMidLength, NULL, NULL, &keepintvl, sizeof(keepintvl));
-
- memset(&tval, sizeof(tval), 0);
- tval.tv_sec = keepidle;
- setsockopt(connection_fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
- setsockopt(connection_fd, IPPROTO_TCP, TCP_KEEPALIVE, &tval, sizeof(tval));
-#endif // __QNX__
-
- TcpDevice* tcp_device = new TcpDevice(client_address.sin_addr.s_addr, device_name);
- DeviceSptr device = controller_->AddDevice(tcp_device);
- tcp_device = static_cast<TcpDevice*>(device.get());
- const ApplicationHandle app_handle = tcp_device->AddIncomingApplication(
- connection_fd);
-
- TcpSocketConnection* connection(
- new TcpSocketConnection(device->unique_device_id(), app_handle,
- controller_));
- connection->set_socket(connection_fd);
- const TransportAdapter::Error error = connection->Start();
- if (error != TransportAdapter::OK) {
- delete connection;
- }
- }
-
- LOG4CXX_INFO(logger_, "Tcp client listener thread finished");
-}
-
-TransportAdapter::Error TcpClientListener::StartListening() {
- if (thread_started_)
- return TransportAdapter::BAD_STATE;
-
- socket_ = socket(AF_INET, SOCK_STREAM, 0);
-
- if (-1 == socket_) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create socket");
- return TransportAdapter::FAIL;
- }
-
- sockaddr_in server_address;
- memset(&server_address, 0, sizeof(server_address));
- server_address.sin_family = AF_INET;
- server_address.sin_port = htons(port_);
- server_address.sin_addr.s_addr = INADDR_ANY;
-
- int optval = 1;
- setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval));
-
- if (0 != bind(socket_, (sockaddr*) &server_address, sizeof(server_address))) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "bind() failed");
- return TransportAdapter::FAIL;
- }
-
- if (0 != listen(socket_, 128)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "listen() failed");
- return TransportAdapter::FAIL;
- }
-
- const int thread_start_error = pthread_create(&thread_, 0,
- &tcpClientListenerThread, this);
- if (0 == thread_start_error) {
- thread_started_ = true;
- LOG4CXX_INFO(logger_, "Tcp client listener thread started");
- } else {
- LOG4CXX_ERROR(
- logger_,
- "Tcp client listener thread start failed, error code "
- << thread_start_error);
- return TransportAdapter::FAIL;
- }
- return TransportAdapter::OK;
-}
-
-TransportAdapter::Error TcpClientListener::StopListening() {
- if (!thread_started_)
- return TransportAdapter::BAD_STATE;
-
- thread_stop_requested_ = true;
- int byebyesocket = socket(AF_INET, SOCK_STREAM, 0);
- sockaddr_in server_address;
- memset(&server_address, 0, sizeof(server_address));
- server_address.sin_family = AF_INET;
- server_address.sin_port = htons(port_);
- server_address.sin_addr.s_addr = INADDR_ANY;
- connect(byebyesocket, (sockaddr*)&server_address, sizeof(server_address));
- shutdown(byebyesocket, SHUT_RDWR);
- close(byebyesocket);
- pthread_join(thread_, 0);
- LOG4CXX_INFO(logger_, "Tcp client listener thread terminated");
- close(socket_);
- socket_ = -1;
- thread_started_ = false;
- thread_stop_requested_ = false;
- return TransportAdapter::OK;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/tcp/tcp_connection_factory.cc b/SDL_Core/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
deleted file mode 100644
index cb6f4c5b6..000000000
--- a/SDL_Core/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * \file tcp_connection_factory.cc
- * \brief TcpConnectionFactory class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/tcp/tcp_connection_factory.h"
-#include "transport_manager/tcp/tcp_socket_connection.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-TcpConnectionFactory::TcpConnectionFactory(TransportAdapterController* controller)
- : controller_(controller) {
-}
-
-TransportAdapter::Error TcpConnectionFactory::Init() {
- return TransportAdapter::OK;
-}
-
-TransportAdapter::Error TcpConnectionFactory::CreateConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- TcpServerOiginatedSocketConnection* connection(
- new TcpServerOiginatedSocketConnection(device_uid, app_handle,
- controller_));
- TransportAdapter::Error error = connection->Start();
- if (error != TransportAdapter::OK)
- delete connection;
- return error;
-}
-
-void TcpConnectionFactory::Terminate() {
-}
-
-bool TcpConnectionFactory::IsInitialised() const {
- return true;
-}
-
-TcpConnectionFactory::~TcpConnectionFactory() {
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/tcp/tcp_device.cc b/SDL_Core/src/components/transport_manager/src/tcp/tcp_device.cc
deleted file mode 100644
index d8d714f44..000000000
--- a/SDL_Core/src/components/transport_manager/src/tcp/tcp_device.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * \file tcp_device.cc
- * \brief TcpDevice class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/tcp/tcp_device.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-TcpDevice::TcpDevice(const in_addr_t& in_addr, const std::string& name)
- : Device(name, name),
- in_addr_(in_addr),
- last_handle_(0) {
- pthread_mutex_init(&applications_mutex_, 0);
-}
-
-bool TcpDevice::IsSameAs(const Device* other) const {
- const TcpDevice* other_tcp_device = static_cast<const TcpDevice*>(other);
- return other_tcp_device->in_addr_ == in_addr_;
-}
-
-ApplicationList TcpDevice::GetApplicationList() const {
- pthread_mutex_lock(&applications_mutex_);
- ApplicationList app_list;
- for (std::map<ApplicationHandle, Application>::const_iterator it =
- applications_.begin(); it != applications_.end(); ++it) {
- app_list.push_back(it->first);
- }
- pthread_mutex_unlock(&applications_mutex_);
- return app_list;
-}
-
-ApplicationHandle TcpDevice::AddIncomingApplication(int socket_fd) {
- Application app;
- app.incoming = true;
- app.socket = socket_fd;
- pthread_mutex_lock(&applications_mutex_);
- const ApplicationHandle app_handle = ++last_handle_;
- applications_[app_handle] = app;
- pthread_mutex_unlock(&applications_mutex_);
- return app_handle;
-}
-
-ApplicationHandle TcpDevice::AddDiscoveredApplication(int port) {
- Application app;
- app.incoming = false;
- app.port = port;
- pthread_mutex_lock(&applications_mutex_);
- const ApplicationHandle app_handle = ++last_handle_;
- applications_[app_handle] = app;
- pthread_mutex_unlock(&applications_mutex_);
- return app_handle;
-}
-
-
-void TcpDevice::RemoveApplication(const ApplicationHandle app_handle) {
- pthread_mutex_lock(&applications_mutex_);
- applications_.erase(app_handle);
- pthread_mutex_unlock(&applications_mutex_);
-}
-
-TcpDevice::~TcpDevice() {
- pthread_mutex_destroy(&applications_mutex_);
-}
-
-int TcpDevice::GetApplicationSocket(const ApplicationHandle app_handle) const {
- std::map<ApplicationHandle, Application>::const_iterator it = applications_.find(app_handle);
- if(applications_.end() == it) return -1;
- if(! it->second.incoming) return -1;
- return it->second.socket;
-}
-
-int TcpDevice::GetApplicationPort(const ApplicationHandle app_handle) const {
- std::map<ApplicationHandle, Application>::const_iterator it = applications_.find(app_handle);
- if(applications_.end() == it) return -1;
- if(it->second.incoming) return -1;
- return it->second.port;
-}
-
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/tcp/tcp_socket_connection.cc b/SDL_Core/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
deleted file mode 100644
index 321abb988..000000000
--- a/SDL_Core/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * \file tcp_socket_connection.cc
- * \brief TcpSocketConnection class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-#include "transport_manager/tcp/tcp_socket_connection.h"
-#include "transport_manager/tcp/tcp_device.h"
-
-#include <memory.h>
-#include <signal.h>
-#include <errno.h>
-
-namespace transport_manager {
-namespace transport_adapter {
-
-TcpSocketConnection::TcpSocketConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller)
- : ThreadedSocketConnection(device_uid, app_handle, controller) {
-}
-
-TcpSocketConnection::~TcpSocketConnection() {
-}
-
-bool TcpSocketConnection::Establish(ConnectError** error) {
- return true;
-}
-
-TcpServerOiginatedSocketConnection::TcpServerOiginatedSocketConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle,
- TransportAdapterController* controller)
- : ThreadedSocketConnection(device_uid, app_handle, controller) {
-}
-
-TcpServerOiginatedSocketConnection::~TcpServerOiginatedSocketConnection() {
-}
-
-bool TcpServerOiginatedSocketConnection::Establish(ConnectError** error) {
- DeviceSptr device = controller()->FindDevice(device_handle());
- if (!device.valid()) {
- LOG4CXX_ERROR(
- logger_,
- "Device " << device_handle() << " not found");
- *error = new ConnectError();
- return false;
- }
- TcpDevice* tcp_device = static_cast<TcpDevice*>(device.get());
-
- int port;
- if (-1 == (port = tcp_device->GetApplicationPort(application_handle()))) {
- LOG4CXX_ERROR(
- logger_,
- "Application port for " << application_handle() << " not found");
- *error = new ConnectError();
- return false;
- }
-
- const int socket = ::socket(AF_INET, SOCK_STREAM, 0);
- if (socket < 0) {
- LOG4CXX_ERROR(logger_, "Failed to create socket");
- *error = new ConnectError();
- return false;
- }
-
- struct sockaddr_in addr;
- memset((char*) &addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = tcp_device->in_addr();
- addr.sin_port = htons(port);
-
- LOG4CXX_INFO(logger_, "Connecting " << inet_ntoa(addr.sin_addr) << ":"
- << port);
- if (::connect(socket, (struct sockaddr*) &addr, sizeof(addr)) < 0) {
- LOG4CXX_ERROR(logger_, "Failed to connect for application "
- << application_handle() << ", error " << errno);
- *error = new ConnectError();
- return false;
- }
-
- set_socket(socket);
- return true;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
diff --git a/SDL_Core/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/SDL_Core/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
deleted file mode 100644
index d5fde5d26..000000000
--- a/SDL_Core/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * \file tcp_transport_adapter.cc
- * \brief TcpTransportAdapter class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <memory.h>
-#include <signal.h>
-#include <errno.h>
-#include <sstream>
-#include <cstdlib>
-
-#include "resumption/last_state.h"
-
-#include "transport_manager/tcp/tcp_transport_adapter.h"
-#include "transport_manager/tcp/tcp_client_listener.h"
-#include "transport_manager/tcp/tcp_connection_factory.h"
-#include "transport_manager/tcp/tcp_device.h"
-
-#ifdef AVAHI_SUPPORT
-#include "transport_manager/tcp/dnssd_service_browser.h"
-#endif
-
-namespace transport_manager {
-namespace transport_adapter {
-
-TcpTransportAdapter::TcpTransportAdapter()
- : TransportAdapterImpl(
-#ifdef AVAHI_SUPPORT
- new DnssdServiceBrowser(this)
-#else
- NULL
-#endif
- , new TcpConnectionFactory(this)
- , new TcpClientListener(this, default_port)) {
-}
-
-TcpTransportAdapter::~TcpTransportAdapter() {
-}
-
-DeviceType TcpTransportAdapter::GetDeviceType() const {
- return "sdl-tcp";
-}
-
-void TcpTransportAdapter::Store() const {
- LOG4CXX_TRACE_ENTER(logger_);
- resumption::LastState::Dictionary tcp_adapter_dictionary;
- DeviceList device_ids = GetDeviceList();
- for (DeviceList::const_iterator i = device_ids.begin(); i != device_ids.end(); ++i) {
- DeviceUID device_id = *i;
- DeviceSptr device = FindDevice(device_id);
- if (!device) { // device could have been disconnected
- continue;
- }
- utils::SharedPtr<TcpDevice> tcp_device =
- DeviceSptr::static_pointer_cast<TcpDevice>(device);
- resumption::LastState::Dictionary device_dictionary;
- struct in_addr address;
- address.s_addr = tcp_device->in_addr();
- device_dictionary.AddItem("address", std::string(inet_ntoa(address)));
- resumption::LastState::Dictionary applications_dictionary;
- ApplicationList app_ids = tcp_device->GetApplicationList();
- for (ApplicationList::const_iterator j = app_ids.begin(); j != app_ids.end(); ++j) {
- ApplicationHandle app_handle = *j;
- const int port = tcp_device->GetApplicationPort(app_handle);
- std::string port_string;
- std::stringstream stream(port_string);
- stream << port;
- if (port != -1) { // don't want to store incoming applications
- resumption::LastState::Dictionary application_dictionary;
- application_dictionary.AddItem("port", port_string);
- applications_dictionary.AddSubitem(port_string, application_dictionary);
- }
- }
- device_dictionary.AddSubitem("applications", applications_dictionary);
- tcp_adapter_dictionary.AddSubitem(tcp_device->name(), device_dictionary);
- }
- resumption::LastState::instance()->dictionary.AddSubitem(
- "TcpAdapter", tcp_adapter_dictionary
- );
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-bool TcpTransportAdapter::Restore() {
- LOG4CXX_TRACE_ENTER(logger_);
- bool errors_occured = false;
- resumption::LastState::Dictionary tcp_adapter_dictionary =
- resumption::LastState::instance()->dictionary.SubitemAt("TcpAdapter");
- for (resumption::LastState::Dictionary::const_iterator i =
- tcp_adapter_dictionary.begin(); i != tcp_adapter_dictionary.end(); ++i) {
- std::string name = i->first;
- resumption::LastState::Dictionary device_dictionary = i->second;
- std::string address_record = device_dictionary.ItemAt("address");
- in_addr_t address = inet_addr(address_record.c_str());
- TcpDevice* tcp_device = new TcpDevice(address, name);
- DeviceSptr device(tcp_device);
- AddDevice(device);
- resumption::LastState::Dictionary applications_dictionary =
- device_dictionary.SubitemAt("applications");
- for (resumption::LastState::Dictionary::const_iterator j =
- applications_dictionary.begin(); j != applications_dictionary.end(); ++j) {
- resumption::LastState::Dictionary application_dictionary = j->second;
- std::string port_record = application_dictionary.ItemAt("port");
- int port = atoi(port_record.c_str());
- ApplicationHandle app_handle = tcp_device->AddDiscoveredApplication(port);
- if (Error::OK != Connect(device->unique_device_id(), app_handle)) {
- errors_occured = true;
- }
- }
- }
- LOG4CXX_TRACE_EXIT(logger_);
- return !errors_occured;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
-
diff --git a/SDL_Core/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc b/SDL_Core/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
deleted file mode 100644
index 83aaa3a98..000000000
--- a/SDL_Core/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
+++ /dev/null
@@ -1,357 +0,0 @@
-/**
- * \file threaded_socket_connection.cc
- * \brief ThreadedSocketConnection class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <memory.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include "transport_manager/transport_adapter/threaded_socket_connection.h"
-#include "transport_manager/transport_adapter/transport_adapter_controller.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-ThreadedSocketConnection::ThreadedSocketConnection(
- const DeviceUID& device_id, const ApplicationHandle& app_handle,
- TransportAdapterController* controller)
- : read_fd_(-1), write_fd_(-1), controller_(controller),
- frames_to_send_(),
- frames_to_send_mutex_(),
- thread_(),
- socket_(-1),
- terminate_flag_(false),
- unexpected_disconnect_(false),
- device_uid_(device_id),
- app_handle_(app_handle) {
- pthread_mutex_init(&frames_to_send_mutex_, 0);
-}
-
-ThreadedSocketConnection::~ThreadedSocketConnection() {
- LOG4CXX_TRACE_ENTER(logger_);
- terminate_flag_ = true;
- Notify();
- pthread_join(thread_, 0);
- pthread_mutex_destroy(&frames_to_send_mutex_);
-
- if (-1 != read_fd_)
- close(read_fd_);
- if (-1 != write_fd_)
- close(write_fd_);
-
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ThreadedSocketConnection::Abort() {
- LOG4CXX_TRACE_ENTER(logger_);
- unexpected_disconnect_ = true;
- terminate_flag_ = true;
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void* StartThreadedSocketConnection(void* v) {
- LOG4CXX_TRACE_ENTER(logger_);
- ThreadedSocketConnection* connection =
- static_cast<ThreadedSocketConnection*>(v);
- connection->Thread();
- LOG4CXX_TRACE_EXIT(logger_);
- return 0;
-}
-
-TransportAdapter::Error ThreadedSocketConnection::Start() {
- LOG4CXX_TRACE_ENTER(logger_);
- int fds[2];
- const int pipe_ret = pipe(fds);
- if (0 == pipe_ret) {
- LOG4CXX_INFO(logger_, "pipe created(#" << pthread_self() << ")");
- read_fd_ = fds[0];
- write_fd_ = fds[1];
- } else {
- LOG4CXX_INFO(logger_, "pipe creation failed (#" << pthread_self() << ")");
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::FAIL;
- }
- const int fcntl_ret = fcntl(read_fd_, F_SETFL,
- fcntl(read_fd_, F_GETFL) | O_NONBLOCK);
- if (0 != fcntl_ret) {
- LOG4CXX_INFO(logger_, "fcntl failed (#" << pthread_self() << ")");
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::FAIL;
- }
-
- if (0 == pthread_create(&thread_, 0, &StartThreadedSocketConnection, this)) {
- LOG4CXX_INFO(logger_, "thread created (#" << pthread_self() << ")");
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::OK;
- } else {
- LOG4CXX_INFO(logger_, "thread creation failed (#" << pthread_self() << ")");
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::FAIL;
- }
-}
-
-void ThreadedSocketConnection::Finalize() {
- LOG4CXX_TRACE_ENTER(logger_);
- if (unexpected_disconnect_) {
- LOG4CXX_INFO(logger_, "unexpected_disconnect (#" << pthread_self() << ")");
- controller_->ConnectionAborted(device_handle(), application_handle(),
- CommunicationError());
- } else {
- LOG4CXX_INFO(logger_, "not unexpected_disconnect (#" << pthread_self() << ")");
- controller_->ConnectionFinished(device_handle(), application_handle());
- }
- close(socket_);
- LOG4CXX_INFO(logger_, "Connection finalized");
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-TransportAdapter::Error ThreadedSocketConnection::Notify() const {
- LOG4CXX_TRACE_ENTER(logger_);
- if (-1 == write_fd_) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_, "Failed to wake up connection thread for connection " << this);
- LOG4CXX_INFO(logger_, "exit");
- return TransportAdapter::BAD_STATE;
- }
- uint8_t c = 0;
- if (1 == write(write_fd_, &c, 1)) {
- LOG4CXX_INFO(logger_, "exit");
- return TransportAdapter::OK;
- } else {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_, "Failed to wake up connection thread for connection " << this);
- LOG4CXX_TRACE_EXIT(logger_);
- return TransportAdapter::FAIL;
- }
-}
-
-TransportAdapter::Error ThreadedSocketConnection::SendData(
- RawMessageSptr message) {
- LOG4CXX_TRACE_ENTER(logger_);
- pthread_mutex_lock(&frames_to_send_mutex_);
- frames_to_send_.push(message);
- pthread_mutex_unlock(&frames_to_send_mutex_);
- LOG4CXX_TRACE_EXIT(logger_);
- return Notify();
-}
-
-TransportAdapter::Error ThreadedSocketConnection::Disconnect() {
- LOG4CXX_TRACE_ENTER(logger_);
- terminate_flag_ = true;
- LOG4CXX_TRACE_EXIT(logger_);
- return Notify();
-}
-
-void ThreadedSocketConnection::Thread() {
- LOG4CXX_TRACE_ENTER(logger_);
- controller_->ConnectionCreated(this, device_uid_, app_handle_);
- ConnectError* connect_error = NULL;
- if (Establish(&connect_error)) {
- LOG4CXX_INFO(logger_, "Connection established (#" << pthread_self() << ")");
- controller_->ConnectDone(device_handle(), application_handle());
- while (!terminate_flag_) {
- Transmit();
- }
- LOG4CXX_INFO(logger_, "Connection is to finalize (#" << pthread_self() << ")");
- Finalize();
- while (!frames_to_send_.empty()) {
- LOG4CXX_INFO(logger_, "removing message (#" << pthread_self() << ")");
- RawMessageSptr message = frames_to_send_.front();
- frames_to_send_.pop();
- controller_->DataSendFailed(device_handle(), application_handle(),
- message, DataSendError());
- }
- controller_->DisconnectDone(device_handle(), application_handle());
- } else {
- LOG4CXX_INFO(logger_, "Connection Establish failed (#" << pthread_self() << ")");
- controller_->ConnectFailed(device_handle(), application_handle(),
- *connect_error);
- delete connect_error;
- }
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-void ThreadedSocketConnection::Transmit() {
- LOG4CXX_TRACE_ENTER(logger_);
- bool pipe_notified = false;
- bool pipe_terminated = false;
-
- const nfds_t poll_fds_size = 2;
- pollfd poll_fds[poll_fds_size];
- poll_fds[0].fd = socket_;
- poll_fds[0].events = POLLIN | POLLPRI | (frames_to_send_.empty() ? 0 : POLLOUT);
- poll_fds[1].fd = read_fd_;
- poll_fds[1].events = POLLIN | POLLPRI;
-
- LOG4CXX_INFO(logger_, "poll (#" << pthread_self() << ") " << this);
- if (-1 == poll(poll_fds, poll_fds_size, -1)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "poll failed for connection " << this);
- Abort();
- LOG4CXX_INFO(logger_, "exit");
- return;
- }
- LOG4CXX_INFO(logger_, "poll is ok (#" << pthread_self() << ") " << this << " revents0:" << std::hex << poll_fds[0].revents << " revents1:" << std::hex << poll_fds[1].revents);
- // error check
- if (0 != (poll_fds[1].revents & (POLLERR | POLLHUP | POLLNVAL))) {
- LOG4CXX_ERROR(logger_,
- "Notification pipe for connection " << this << " terminated");
- Abort();
- LOG4CXX_INFO(logger_, "exit");
- return;
- }
-
- if (0 != (poll_fds[0].revents & (POLLERR | POLLHUP | POLLNVAL))) {
- LOG4CXX_INFO(logger_, "Connection " << this << " terminated");
- Abort();
- LOG4CXX_INFO(logger_, "exit");
- return;
- }
-
- // clear notifications
- char buffer[256];
- ssize_t bytes_read = -1;
- do {
- bytes_read = read(read_fd_, buffer, sizeof(buffer));
- } while (bytes_read > 0);
- if ((bytes_read < 0) && (EAGAIN != errno)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to clear notification pipe");
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "poll failed for connection " << this);
- Abort();
- LOG4CXX_INFO(logger_, "exit");
- return;
- }
-
- // send data if possible
- if (!frames_to_send_.empty() && (poll_fds[0].revents | POLLOUT)) {
- LOG4CXX_INFO(logger_, "frames_to_send_ not empty() (#" << pthread_self() << ")");
-
- // send data
- const bool send_ok = Send();
- if (!send_ok) {
- LOG4CXX_INFO(logger_, "Send() failed (#" << pthread_self() << ")");
- Abort();
- LOG4CXX_INFO(logger_, "exit");
- return;
- }
- }
-
- // receive data
- if (0 != (poll_fds[0].revents & (POLLIN | POLLPRI))) {
- const bool receive_ok = Receive();
- if (!receive_ok) {
- LOG4CXX_INFO(logger_, "Receive() failed (#" << pthread_self() << ")");
- Abort();
- LOG4CXX_INFO(logger_, "exit");
- return;
- }
- }
- LOG4CXX_TRACE_EXIT(logger_);
-}
-
-bool ThreadedSocketConnection::Receive() {
- LOG4CXX_TRACE_ENTER(logger_);
- uint8_t buffer[4096];
- ssize_t bytes_read = -1;
-
- do {
- bytes_read = recv(socket_, buffer, sizeof(buffer), MSG_DONTWAIT);
-
- if (bytes_read > 0) {
- LOG4CXX_INFO(
- logger_,
- "Received " << bytes_read << " bytes for connection " << this);
-
- RawMessageSptr frame(
- new protocol_handler::RawMessage(0, 0, buffer, bytes_read));
- controller_->DataReceiveDone(device_handle(), application_handle(),
- frame);
- } else if (bytes_read < 0) {
- if (EAGAIN != errno && EWOULDBLOCK != errno) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "recv() failed for connection " << this);
- LOG4CXX_TRACE_EXIT(logger_);
- return false;
- }
- } else {
- LOG4CXX_INFO(logger_, "Connection " << this << " closed by remote peer");
- LOG4CXX_TRACE_EXIT(logger_);
- return false;
- }
- } while (bytes_read > 0);
- LOG4CXX_TRACE_EXIT(logger_);
- return true;
-}
-
-bool ThreadedSocketConnection::Send() {
- LOG4CXX_TRACE_ENTER(logger_);
- FrameQueue frames_to_send;
- pthread_mutex_lock(&frames_to_send_mutex_);
- std::swap(frames_to_send, frames_to_send_);
- pthread_mutex_unlock(&frames_to_send_mutex_);
-
- bool frame_sent = false;
- size_t offset = 0;
- while (!frames_to_send.empty()) {
- LOG4CXX_INFO(logger_, "frames_to_send is not empty" << pthread_self() << ")");
- RawMessageSptr frame = frames_to_send.front();
-
- const ssize_t bytes_sent = ::send(socket_, frame->data() + offset,
- frame->data_size() - offset, 0);
-
- if (bytes_sent >= 0) {
- LOG4CXX_INFO(logger_, "bytes_sent >= 0" << pthread_self() << ")");
- offset += bytes_sent;
- if (offset == frame->data_size()) {
- frames_to_send.pop();
- offset = 0;
- controller_->DataSendDone(device_handle(), application_handle(), frame);
- }
- } else {
- LOG4CXX_INFO(logger_, "bytes_sent < 0" << pthread_self() << ")");
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Send failed for connection " << this);
- frames_to_send.pop();
- offset = 0;
- controller_->DataSendFailed(device_handle(), application_handle(), frame,
- DataSendError());
- }
- }
- LOG4CXX_TRACE_EXIT(logger_);
- return true;
-}
-
-} // namespace
-} // namespace
-
diff --git a/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_event.cc b/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_event.cc
deleted file mode 100644
index 505b42a1a..000000000
--- a/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_event.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * \file transport_adapter_event.cc
- * \brief TransportAdapterEvent class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/error.h"
-#include "transport_manager/transport_adapter/transport_adapter_event.h"
-
-namespace transport_manager {
-
-TransportAdapterEvent::TransportAdapterEvent(
- int type, transport_adapter::TransportAdapter *transport_adapter,
- const DeviceUID &device_handle, const ApplicationHandle &application_id,
- RawMessageSptr data, BaseError *error)
- : event_type_(type),
- application_id_(application_id),
- transport_adapter_(transport_adapter),
- device_uid_(device_handle),
- event_data_(data) {
- set_error(error);
-}
-
-
-TransportAdapterEvent::~TransportAdapterEvent() {
- transport_adapter_ = NULL;
- event_error_ = NULL;
-}
-
-void TransportAdapterEvent::set_event_type(int type) { event_type_ = type; }
-
-void TransportAdapterEvent::set_transport_adapter(
- transport_adapter::TransportAdapter *transport_adapter) {
- transport_adapter_ = transport_adapter;
-}
-void TransportAdapterEvent::set_data(RawMessageSptr message) {
- event_data_ = message;
-}
-
-void TransportAdapterEvent::set_error(BaseError *error) {
- event_error_ = error;
-}
-
-int TransportAdapterEvent::event_type(void) const { return event_type_; }
-
-ApplicationHandle TransportAdapterEvent::application_id(void) const {
- return application_id_;
-}
-
-transport_adapter::TransportAdapter *TransportAdapterEvent::transport_adapter(
- void) const {
- return transport_adapter_;
-}
-
-RawMessageSptr TransportAdapterEvent::data(void) const { return event_data_; }
-
-const DeviceUID &TransportAdapterEvent::device_uid() const {
- return device_uid_;
-}
-
-BaseError *TransportAdapterEvent::event_error(void) const {
- return event_error_;
-}
-
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
deleted file mode 100644
index 6149670d9..000000000
--- a/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
+++ /dev/null
@@ -1,614 +0,0 @@
-/**
- * \file transport_adapter_impl.cc
- * \brief TransportAdapterImpl class source file.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config_profile/profile.h"
-
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-#include "transport_manager/transport_adapter/transport_adapter_listener.h"
-#include "transport_manager/transport_adapter/device_scanner.h"
-#include "transport_manager/transport_adapter/server_connection_factory.h"
-#include "transport_manager/transport_adapter/client_connection_listener.h"
-
-namespace transport_manager {
-
-namespace transport_adapter {
-
-log4cxx::LoggerPtr logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("TransportManager"));
-
-TransportAdapterImpl::TransportAdapterImpl(
- DeviceScanner* device_scanner,
- ServerConnectionFactory* server_connection_factory,
- ClientConnectionListener* client_connection_listener)
- : listeners_(),
- initialised_(0),
- devices_(),
- devices_mutex_(),
- connections_(),
- connections_mutex_(),
- device_scanner_(device_scanner),
- server_connection_factory_(server_connection_factory),
- client_connection_listener_(client_connection_listener) {
- pthread_mutex_init(&devices_mutex_, 0);
- pthread_mutex_init(&connections_mutex_, 0);
-}
-
-TransportAdapterImpl::~TransportAdapterImpl() {
- if (device_scanner_) {
- device_scanner_->Terminate();
- delete device_scanner_;
- }
- if (server_connection_factory_) {
- server_connection_factory_->Terminate();
- delete server_connection_factory_;
- }
- if (client_connection_listener_) {
- client_connection_listener_->Terminate();
- delete client_connection_listener_;
- }
-
- pthread_mutex_lock(&connections_mutex_);
- ConnectionMap connections;
- std::swap(connections, connections_);
- pthread_mutex_unlock(&connections_mutex_);
- connections.clear();
-
- pthread_mutex_lock(&devices_mutex_);
- DeviceMap devices;
- std::swap(devices, devices_);
- pthread_mutex_unlock(&devices_mutex_);
- devices.clear();
-
- pthread_mutex_destroy(&connections_mutex_);
- pthread_mutex_destroy(&devices_mutex_);
-}
-
-TransportAdapter::Error TransportAdapterImpl::Init() {
- LOG4CXX_INFO(logger_, "Initializing device adapter");
-
- Error error = OK;
-
- if ((error == OK) && device_scanner_) error = device_scanner_->Init();
- if ((error == OK) && server_connection_factory_)
- error = server_connection_factory_->Init();
- if ((error == OK) && client_connection_listener_)
- error = client_connection_listener_->Init();
-
- initialised_ = (error == OK);
-
- if (profile::Profile::instance()->use_last_state()) {
- if (!Restore()) {
- LOG4CXX_WARN(logger_, "could not restore transport adapter state");
- error = FAIL;
- }
- }
-
- return error;
-}
-
-TransportAdapter::Error TransportAdapterImpl::SearchDevices() {
- LOG4CXX_INFO(logger_, "enter");
- if (device_scanner_ == NULL) {
- LOG4CXX_INFO(logger_, "not supported");
- return NOT_SUPPORTED;
- } else if (!device_scanner_->IsInitialised()) {
- LOG4CXX_INFO(logger_, "bad state");
- return BAD_STATE;
- }
- LOG4CXX_INFO(logger_, "exit");
- return device_scanner_->Scan();
-}
-
-TransportAdapter::Error TransportAdapterImpl::Connect(
- const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- LOG4CXX_INFO(logger_,
- "enter TransportAdapter::Error TransportAdapterImpl::Connect");
- if (server_connection_factory_ == 0) {
- LOG4CXX_ERROR(logger_, "feature is NOT_SUPPORTED");
- return NOT_SUPPORTED;
- }
- if (!server_connection_factory_->IsInitialised()) {
- LOG4CXX_ERROR(logger_, "BAD_STATE");
- return BAD_STATE;
- }
-
- pthread_mutex_lock(&connections_mutex_);
- const bool already_exists =
- connections_.end() !=
- connections_.find(std::make_pair(device_id, app_handle));
- if (!already_exists) {
- ConnectionInfo& info = connections_[std::make_pair(device_id, app_handle)];
- info.app_handle = app_handle;
- info.device_id = device_id;
- info.state = ConnectionInfo::NEW;
- }
- pthread_mutex_unlock(&connections_mutex_);
- if (already_exists) {
- LOG4CXX_ERROR(logger_, "Connection for device " << device_id << ", channel "
- << app_handle
- << " already exists");
- return ALREADY_EXISTS;
- }
-
- const TransportAdapter::Error err =
- server_connection_factory_->CreateConnection(device_id, app_handle);
- if (TransportAdapter::OK != err) {
- pthread_mutex_lock(&connections_mutex_);
- connections_.erase(std::make_pair(device_id, app_handle));
- pthread_mutex_unlock(&connections_mutex_);
- }
- return err;
-}
-
-TransportAdapter::Error TransportAdapterImpl::ConnectDevice(
- const DeviceUID& device_handle) {
- DeviceSptr device = FindDevice(device_handle);
- if (device) {
- return ConnectDevice(device);
- }
- else {
- return BAD_PARAM;
- }
-}
-
-TransportAdapter::Error TransportAdapterImpl::Disconnect(
- const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- if (!initialised_) return BAD_STATE;
- ConnectionSptr connection = FindEstablishedConnection(device_id, app_handle);
- if (connection.valid()) {
- return connection->Disconnect();
- } else {
- return BAD_PARAM;
- }
-}
-
-TransportAdapter::Error TransportAdapterImpl::DisconnectDevice(
- const DeviceUID& device_id) {
- if (!initialised_) return BAD_STATE;
-
- Error error = OK;
- pthread_mutex_lock(&connections_mutex_);
- for (ConnectionMap::iterator it = connections_.begin();
- it != connections_.end(); ++it) {
-
- ConnectionInfo& info = it->second;
- if (info.device_id == device_id &&
- info.state != ConnectionInfo::FINALISING) {
- if (OK != info.connection->Disconnect()) {
- error = FAIL;
- }
- }
- }
- pthread_mutex_unlock(&connections_mutex_);
-
- return OK;
-}
-
-TransportAdapter::Error TransportAdapterImpl::SendData(
- const DeviceUID& device_id, const ApplicationHandle& app_handle,
- const RawMessageSptr data) {
- if (!initialised_) return BAD_STATE;
-
- ConnectionSptr connection = FindEstablishedConnection(device_id, app_handle);
- if (connection.get() != 0) {
- return connection->SendData(data);
- } else {
- return BAD_PARAM;
- }
-}
-
-TransportAdapter::Error TransportAdapterImpl::StartClientListening() {
- if (client_connection_listener_ == 0) return NOT_SUPPORTED;
- if (!client_connection_listener_->IsInitialised()) return BAD_STATE;
- return client_connection_listener_->StartListening();
-}
-
-TransportAdapter::Error TransportAdapterImpl::StopClientListening() {
- if (client_connection_listener_ == 0) return NOT_SUPPORTED;
- if (!client_connection_listener_->IsInitialised()) return BAD_STATE;
- return client_connection_listener_->StopListening();
-}
-
-DeviceList TransportAdapterImpl::GetDeviceList() const {
- DeviceList devices;
- pthread_mutex_lock(&devices_mutex_);
- for (DeviceMap::const_iterator it = devices_.begin(); it != devices_.end();
- ++it) {
- devices.push_back(it->first);
- }
- pthread_mutex_unlock(&devices_mutex_);
- return devices;
-}
-
-DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
- DeviceSptr existing_device;
- bool same_device_found = false;
- pthread_mutex_lock(&devices_mutex_);
- for (DeviceMap::const_iterator i = devices_.begin(); i != devices_.end();
- ++i) {
- existing_device = i->second;
- if (device->IsSameAs(existing_device.get())) {
- same_device_found = true;
- break;
- }
- }
- if (!same_device_found) {
- devices_[device->unique_device_id()] = device;
- }
- pthread_mutex_unlock(&devices_mutex_);
- if (same_device_found) {
- return existing_device;
- } else {
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it) {
- (*it)->OnDeviceListUpdated(this);
- }
- if (ToBeAutoConnected(device)) {
- ConnectDevice(device);
- }
- return device;
- }
-}
-
-void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
- DeviceMap new_devices;
- for (DeviceVector::const_iterator it = devices.begin(); it != devices.end();
- ++it) {
- DeviceSptr device = *it;
- bool device_found = false;
-
- pthread_mutex_lock(&devices_mutex_);
- for (DeviceMap::iterator it = devices_.begin(); it != devices_.end();
- ++it) {
- DeviceSptr existing_device = it->second;
- if (device->IsSameAs(existing_device.get())) {
- existing_device->set_keep_on_disconnect(true);
- device_found = true;
- break;
- }
- }
- pthread_mutex_unlock(&devices_mutex_);
-
- if (!device_found) {
- LOG4CXX_INFO(logger_, "Adding new device " << device->unique_device_id()
- << " (\"" << device->name()
- << "\")");
- }
-
- device->set_keep_on_disconnect(true);
- new_devices[device->unique_device_id()] = device;
- }
-
- pthread_mutex_lock(&connections_mutex_);
- std::set<DeviceUID> connected_devices;
- for (ConnectionMap::const_iterator it = connections_.begin();
- it != connections_.end(); ++it) {
- const ConnectionInfo& info = it->second;
- if (info.state != ConnectionInfo::FINALISING)
- connected_devices.insert(info.device_id);
- }
- pthread_mutex_unlock(&connections_mutex_);
-
- DeviceMap all_devices = new_devices;
- pthread_mutex_lock(&devices_mutex_);
- for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
- DeviceSptr existing_device = it->second;
-
- if (all_devices.end() == all_devices.find(it->first)) {
- if (connected_devices.end() != connected_devices.find(it->first)) {
- existing_device->set_keep_on_disconnect(false);
- all_devices[it->first] = existing_device;
- }
- }
- }
- devices_ = all_devices;
- pthread_mutex_unlock(&devices_mutex_);
-
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it) {
- (*it)->OnDeviceListUpdated(this);
- (*it)->OnSearchDeviceDone(this);
- }
-
- for (DeviceMap::iterator it = new_devices.begin(); it != new_devices.end(); ++it) {
- DeviceSptr device = it->second;
- if (ToBeAutoConnected(device)) {
- ConnectDevice(device);
- }
- }
-}
-
-void TransportAdapterImpl::SearchDeviceFailed(const SearchDeviceError& error) {
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnSearchDeviceFailed(this, error);
-}
-
-bool TransportAdapterImpl::IsSearchDevicesSupported() const {
- return device_scanner_ != 0;
-}
-
-bool TransportAdapterImpl::IsServerOriginatedConnectSupported() const {
- return server_connection_factory_ != 0;
-}
-
-bool TransportAdapterImpl::IsClientOriginatedConnectSupported() const {
- return client_connection_listener_ != 0;
-}
-
-void TransportAdapterImpl::ConnectionCreated(
- ConnectionSptr connection, const DeviceUID& device_id,
- const ApplicationHandle& app_handle) {
- pthread_mutex_lock(&connections_mutex_);
- ConnectionInfo& info = connections_[std::make_pair(device_id, app_handle)];
- info.app_handle = app_handle;
- info.device_id = device_id;
- info.connection = connection;
- info.state = ConnectionInfo::NEW;
- pthread_mutex_unlock(&connections_mutex_);
-}
-
-void TransportAdapterImpl::DisconnectDone(const DeviceUID& device_id,
- const ApplicationHandle& app_handle) {
- bool device_disconnected = true;
- pthread_mutex_lock(&connections_mutex_);
- for (ConnectionMap::const_iterator it = connections_.begin();
- it != connections_.end(); ++it) {
- const DeviceUID& current_device_id = it->first.first;
- const ApplicationHandle& current_app_handle = it->first.second;
- if (current_device_id == device_id && current_app_handle != app_handle) {
- device_disconnected = false;
- break;
- }
- }
- pthread_mutex_unlock(&connections_mutex_);
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it) {
- TransportAdapterListener* listener = *it;
- listener->OnDisconnectDone(this, device_id, app_handle);
- if (device_disconnected) listener->OnDisconnectDeviceDone(this, device_id);
- }
- pthread_mutex_lock(&connections_mutex_);
- connections_.erase(std::make_pair(device_id, app_handle));
- pthread_mutex_unlock(&connections_mutex_);
-
- if (device_disconnected) {
- pthread_mutex_lock(&devices_mutex_);
- DeviceMap::iterator it = devices_.find(device_id); //ykazakov: there is no erase for const iterator for QNX
- if (it != devices_.end()) {
- DeviceSptr device = it->second;
- if (!device->keep_on_disconnect()) {
- devices_.erase(it);
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it) {
- (*it)->OnDeviceListUpdated(this);
- }
- }
- }
- pthread_mutex_unlock(&devices_mutex_);
- }
-}
-
-void TransportAdapterImpl::DataReceiveDone(const DeviceUID& device_id,
- const ApplicationHandle& app_handle,
- RawMessageSptr message) {
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnDataReceiveDone(this, device_id, app_handle, message);
-}
-
-void TransportAdapterImpl::DataReceiveFailed(
- const DeviceUID& device_id, const ApplicationHandle& app_handle,
- const DataReceiveError& error) {
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnDataReceiveFailed(this, device_id, app_handle, error);
-}
-
-void TransportAdapterImpl::DataSendDone(const DeviceUID& device_id,
- const ApplicationHandle& app_handle,
- RawMessageSptr message) {
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnDataSendDone(this, device_id, app_handle, message);
-}
-
-void TransportAdapterImpl::DataSendFailed(const DeviceUID& device_id,
- const ApplicationHandle& app_handle,
- RawMessageSptr message,
- const DataSendError& error) {
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnDataSendFailed(this, device_id, app_handle, message, error);
-}
-
-DeviceSptr TransportAdapterImpl::FindDevice(const DeviceUID& device_id) const {
- DeviceSptr ret;
- pthread_mutex_lock(&devices_mutex_);
- LOG4CXX_INFO(logger_,
- "DeviceSptr TransportAdapterImpl::FindDevice(const DeviceUID& "
- "device_id) enter");
- DeviceMap::const_iterator it = devices_.find(device_id);
- LOG4CXX_INFO(logger_, "devices_.size() = " << devices_.size());
- if (it != devices_.end()) ret = it->second;
- pthread_mutex_unlock(&devices_mutex_);
- LOG4CXX_INFO(logger_,
- "DeviceSptr TransportAdapterImpl::FindDevice(const DeviceUID& "
- "device_id) exit");
- return ret;
-}
-
-void TransportAdapterImpl::ConnectDone(const DeviceUID& device_id,
- const ApplicationHandle& app_handle) {
- pthread_mutex_lock(&connections_mutex_);
- ConnectionMap::iterator it_conn =
- connections_.find(std::make_pair(device_id, app_handle));
- if (it_conn != connections_.end()) {
- ConnectionInfo& info = it_conn->second;
- info.state = ConnectionInfo::ESTABLISHED;
- }
- pthread_mutex_unlock(&connections_mutex_);
-
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnConnectDone(this, device_id, app_handle);
-}
-
-void TransportAdapterImpl::ConnectFailed(const DeviceUID& device_id,
- const ApplicationHandle& app_handle,
- const ConnectError& error) {
- pthread_mutex_lock(&connections_mutex_);
- connections_.erase(std::make_pair(device_id, app_handle));
- pthread_mutex_unlock(&connections_mutex_);
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnConnectFailed(this, device_id, app_handle, error);
-}
-
-void TransportAdapterImpl::AddListener(TransportAdapterListener* listener) {
- listeners_.push_back(listener);
-}
-
-ApplicationList TransportAdapterImpl::GetApplicationList(
- const DeviceUID& device_id) const {
- LOG4CXX_INFO(
- logger_,
- "ApplicationList TransportAdapterImpl::GetApplicationList enter");
- DeviceSptr device = FindDevice(device_id);
- if (device.valid()) {
- LOG4CXX_INFO(logger_, "device is valid");
- return device->GetApplicationList();
- }
-
- LOG4CXX_INFO(logger_, "device is NOT valid. Return empty list");
- return ApplicationList();
-}
-
-void TransportAdapterImpl::ConnectionFinished(
- const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- pthread_mutex_lock(&connections_mutex_);
- ConnectionMap::iterator it =
- connections_.find(std::make_pair(device_id, app_handle));
- if (it != connections_.end()) {
- ConnectionInfo& info = it->second;
- info.state = ConnectionInfo::FINALISING;
- }
- pthread_mutex_unlock(&connections_mutex_);
-}
-
-void TransportAdapterImpl::ConnectionAborted(
- const DeviceUID& device_id, const ApplicationHandle& app_handle,
- const CommunicationError& error) {
- ConnectionFinished(device_id, app_handle);
- for (TransportAdapterListenerList::iterator it = listeners_.begin();
- it != listeners_.end(); ++it)
- (*it)->OnUnexpectedDisconnect(this, device_id, app_handle, error);
-}
-
-bool TransportAdapterImpl::IsInitialised() const {
- if (!initialised_) return false;
- if (device_scanner_ && !device_scanner_->IsInitialised()) return false;
- if (server_connection_factory_ &&
- !server_connection_factory_->IsInitialised())
- return false;
- if (client_connection_listener_ &&
- !client_connection_listener_->IsInitialised())
- return false;
- return true;
-}
-
-std::string TransportAdapterImpl::DeviceName(const DeviceUID& device_id) const {
- DeviceSptr device = FindDevice(device_id);
- if (device.valid()) {
- return device->name();
- } else {
- return "";
- }
-}
-
-void TransportAdapterImpl::Store() const {
-}
-
-bool TransportAdapterImpl::Restore() {
- return true;
-}
-
-bool TransportAdapterImpl::ToBeAutoConnected(DeviceSptr device) const {
- return false;
-}
-
-ConnectionSptr TransportAdapterImpl::FindEstablishedConnection(
- const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- ConnectionSptr connection;
- pthread_mutex_lock(&connections_mutex_);
- ConnectionMap::iterator it =
- connections_.find(std::make_pair(device_id, app_handle));
- if (it != connections_.end()) {
- ConnectionInfo& info = it->second;
- if (info.state == ConnectionInfo::ESTABLISHED) connection = info.connection;
- }
- pthread_mutex_unlock(&connections_mutex_);
- return connection;
-}
-
-TransportAdapter::Error TransportAdapterImpl::ConnectDevice(DeviceSptr device) {
- DeviceUID device_id = device->unique_device_id();
- ApplicationList app_list = device->GetApplicationList();
- bool errors_occured = false;
- for (ApplicationList::iterator it = app_list.begin(); it != app_list.end(); ++it) {
- ApplicationHandle app_handle = *it;
- LOG4CXX_INFO(logger_, "Attempt to connect device " << device_id <<
- ", channel " << app_handle);
- Error error = Connect(device_id, app_handle);
- switch (error) {
- case OK:
- LOG4CXX_DEBUG(logger_, "OK");
- break;
- case ALREADY_EXISTS:
- LOG4CXX_INFO(logger_, "Already connected");
- break;
- default:
- LOG4CXX_ERROR(logger_, "Connect to device " << device_id <<
- ", channel " << app_handle <<
- " failed with error " << error);
- errors_occured = true;
- break;
- }
- }
- return errors_occured ? OK : FAIL;
-}
-
-} // namespace transport_adapter
-
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc b/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
deleted file mode 100644
index a4c9e000c..000000000
--- a/SDL_Core/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * \file transport_adapter_listener_impl.cc
- * \brief TransportAdapterListenerImpl class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/transport_adapter/transport_adapter_listener_impl.h"
-
-#include <algorithm>
-
-#include "transport_manager/transport_manager_impl.h"
-#include "transport_manager/transport_adapter/transport_adapter_event.h"
-
-namespace transport_manager {
-
-log4cxx::LoggerPtr TransportAdapterListenerImpl::logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("TransportManager"));
-
-TransportAdapterListenerImpl::~TransportAdapterListenerImpl() {}
-
-TransportAdapterListenerImpl::TransportAdapterListenerImpl(
- TransportManagerImpl* manager, TransportAdapter* adapter)
- : transport_manager_impl_(manager), transport_adapter_(adapter) {}
-
-void TransportAdapterListenerImpl::OnSearchDeviceDone(
- const TransportAdapter* adapter) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_SEARCH_DONE,
- transport_adapter_, "", 0, RawMessageSptr(), new BaseError());
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnSearchDeviceFailed(
- const TransportAdapter* adapter,
- const SearchDeviceError& error) {
- SearchDeviceError* err = new SearchDeviceError(error);
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_SEARCH_FAIL,
- transport_adapter_, "", 0, RawMessageSptr(), err);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDeviceListUpdated(
- const TransportAdapter* adapter) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_DEVICE_LIST_UPDATED,
- transport_adapter_, "", 0, RawMessageSptr(), NULL);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnConnectDone(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& application_id) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_CONNECT_DONE,
- transport_adapter_, device, application_id, RawMessageSptr(),
- new BaseError());
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnConnectFailed(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id, const ConnectError& error) {
- ConnectError* err = new ConnectError(error);
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_CONNECT_FAIL,
- transport_adapter_, device, app_id, RawMessageSptr(), err);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDisconnectDone(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_DISCONNECT_DONE,
- transport_adapter_, device, app_id, RawMessageSptr(), new BaseError());
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDisconnectFailed(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id, const DisconnectError& error) {
- DisconnectError* err = new DisconnectError(error);
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_DISCONNECT_FAIL,
- transport_adapter_, device, app_id, RawMessageSptr(), err);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDisconnectDeviceDone(
- const TransportAdapter* adapter, const DeviceUID& device) {}
-
-void TransportAdapterListenerImpl::OnDisconnectDeviceFailed(
- const TransportAdapter* adapter, const DeviceUID& device,
- const DisconnectDeviceError& error) {}
-
-void TransportAdapterListenerImpl::OnDataReceiveDone(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id, const RawMessageSptr data_container) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_RECEIVED_DONE,
- transport_adapter_, device, app_id, data_container, new BaseError());
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDataReceiveFailed(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id, const DataReceiveError& error) {
- DataReceiveError* err = new DataReceiveError(error);
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_RECEIVED_FAIL,
- transport_adapter_, device, app_id, RawMessageSptr(), err);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDataSendDone(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id, const RawMessageSptr data_container) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_SEND_DONE,
- transport_adapter_, device, app_id, data_container, new BaseError());
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnDataSendFailed(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id, const RawMessageSptr data_container,
- const DataSendError& error) {
- DataSendError* err = new DataSendError(error);
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_SEND_FAIL,
- transport_adapter_, device, app_id, data_container, err);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnConnectRequested(
- const TransportAdapter* adapter, const DeviceUID& device_handle,
- const ApplicationHandle& app_handle) {}
-
-void TransportAdapterListenerImpl::OnUnexpectedDisconnect(
- const TransportAdapter* adapter,
- const DeviceUID& device, const ApplicationHandle& application,
- const CommunicationError& error) {
- CommunicationError* err = new CommunicationError(error);
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_UNEXPECTED_DISCONNECT,
- transport_adapter_, device, application, RawMessageSptr(), err);
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-void TransportAdapterListenerImpl::OnCommunicationError(
- const TransportAdapter* adapter, const DeviceUID& device,
- const ApplicationHandle& app_id) {
- TransportAdapterEvent event(
- TransportAdapterListenerImpl::EventTypeEnum::ON_COMMUNICATION_ERROR,
- transport_adapter_, device, app_id, RawMessageSptr(), new BaseError());
-
- if (transport_manager::E_SUCCESS !=
- transport_manager_impl_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
- }
-}
-
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/transport_manager_default.cc b/SDL_Core/src/components/transport_manager/src/transport_manager_default.cc
deleted file mode 100644
index e2154b3ec..000000000
--- a/SDL_Core/src/components/transport_manager/src/transport_manager_default.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * \file transport_manager_default.cc
- * \brief TransportManagerDefault class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/transport_manager_default.h"
-#include "transport_manager/tcp/tcp_transport_adapter.h"
-
-#ifdef BLUETOOTH_SUPPORT
-#include "transport_manager/bluetooth/bluetooth_transport_adapter.h"
-#endif
-
-#ifdef USB_SUPPORT
-#include "transport_manager/usb/usb_aoa_adapter.h"
-#endif
-
-
-namespace transport_manager {
-
-int TransportManagerDefault::Init() {
- if (E_SUCCESS != TransportManagerImpl::Init()) {
- return E_TM_IS_NOT_INITIALIZED;
- }
-
-#ifdef BLUETOOTH_SUPPORT
- AddTransportAdapter(new transport_adapter::BluetoothTransportAdapter);
-#endif
- AddTransportAdapter(new transport_adapter::TcpTransportAdapter);
-#ifdef USB_SUPPORT
- AddTransportAdapter(new transport_adapter::UsbAoaAdapter);
-#endif
-
- return E_SUCCESS;
-}
-
-TransportManagerDefault::~TransportManagerDefault() {}
-
-TransportManagerDefault::TransportManagerDefault()
- : TransportManagerImpl() {}
-
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/transport_manager_impl.cc b/SDL_Core/src/components/transport_manager/src/transport_manager_impl.cc
deleted file mode 100644
index 62a970ccf..000000000
--- a/SDL_Core/src/components/transport_manager/src/transport_manager_impl.cc
+++ /dev/null
@@ -1,966 +0,0 @@
-/**
- * \file transport_manager_impl.cc
- * \brief TransportManagerImpl class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <pthread.h>
-#include <stdint.h>
-#include <cstring>
-#include <queue>
-#include <set>
-#include <algorithm>
-#include <limits>
-#include <functional>
-#include <sstream>
-#include "utils/macro.h"
-#include "protocol_handler/raw_message.h"
-#include "protocol_handler/protocol_packet.h"
-#include "transport_manager/transport_manager_impl.h"
-#include "transport_manager/transport_manager_listener.h"
-#include "transport_manager/transport_manager_listener_empty.h"
-#include "transport_manager/bluetooth/bluetooth_transport_adapter.h"
-#include "transport_manager/tcp/tcp_transport_adapter.h"
-#include "transport_manager/transport_adapter/transport_adapter.h"
-#include "config_profile/profile.h"
-#include "transport_manager/transport_adapter/transport_adapter_event.h"
-
-using ::transport_manager::transport_adapter::TransportAdapter;
-
-namespace transport_manager {
-
-log4cxx::LoggerPtr TransportManagerImpl::logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("TransportManager"));
-
-TransportManagerImpl::Connection TransportManagerImpl::convert(TransportManagerImpl::ConnectionInternal& p) {
- TransportManagerImpl::Connection c;
- c.application = p.application;
- c.device = p.device;
- c.id = p.id;
- return c;
-}
-
-class TransportManagerImpl::IncomingDataHandler {
- public:
- IncomingDataHandler(TransportManagerImpl* tm_impl)
- : connections_data_(), tm_impl_(tm_impl) {}
-
- bool ProcessData(ConnectionUID connection_id, uint8_t* data,
- std::size_t size) {
- LOG4CXX_TRACE(logger_, "Start of processing incoming data of size "
- << size << " for connection " << connection_id);
- const uint32_t kBytesForSizeDetection = 8;
- ConnectionsData::iterator it = connections_data_.find(connection_id);
- if (connections_data_.end() == it) {
- LOG4CXX_ERROR(logger_, "ProcessData requested for unknown connection");
- return false;
- }
- std::vector<uint8_t>& connection_data = it->second;
- connection_data.insert(connection_data.end(), data, data + size);
-
- LOG4CXX_TRACE(logger_, "Total data size for connection "
- << connection_id << " is "
- << connection_data.size());
- while (connection_data.size() >= kBytesForSizeDetection) {
- const uint32_t packet_size =
- tm_impl_->GetPacketSize(kBytesForSizeDetection, &connection_data[0]);
- if (0 == packet_size) {
- LOG4CXX_ERROR(logger_, "Failed to get packet size");
- return false;
- }
- LOG4CXX_TRACE(logger_, "Packet size " << packet_size);
- if (connection_data.size() >= packet_size) {
- RawMessageSptr raw_message(new protocol_handler::RawMessage(
- connection_id, 0, // It's not up to TM to know protocol version
- &connection_data[0], packet_size));
- tm_impl_->RaiseEvent(&TransportManagerListener::OnTMMessageReceived,
- raw_message);
- connection_data.erase(connection_data.begin(),
- connection_data.begin() + packet_size);
- LOG4CXX_TRACE(logger_,
- "Packet created and passed, new data size for connection "
- << connection_id << " is " << connection_data.size());
- } else {
- LOG4CXX_TRACE(logger_, "Packet data is not available yet");
- return true;
- }
- }
- return true;
- }
-
- void AddConnection(ConnectionUID connection_id) {
- connections_data_[connection_id];
- }
-
- void RemoveConnection(ConnectionUID connection_id) {
- connections_data_.erase(connection_id);
- }
-
- private:
- typedef std::map<ConnectionUID, std::vector<uint8_t> > ConnectionsData;
- ConnectionsData connections_data_;
- TransportManagerImpl* tm_impl_;
-};
-
-TransportManagerImpl::TransportManagerImpl()
- : message_queue_mutex_(),
- all_thread_active_(false),
- message_queue_thread_(),
- event_queue_thread_(),
- device_listener_thread_wakeup_(),
- is_initialized_(false),
- connection_id_counter_(0),
- incoming_data_handler_(new IncomingDataHandler(this)) {
- LOG4CXX_INFO(logger_, "==============================================");
-#ifdef USE_RWLOCK
- pthread_rwlock_init(&message_queue_rwlock_, NULL);
- pthread_rwlock_init(&event_queue_rwlock_, NULL);
-#endif
- pthread_mutex_init(&message_queue_mutex_, NULL);
- pthread_cond_init(&message_queue_cond_, NULL);
- pthread_mutex_init(&event_queue_mutex_, 0);
- pthread_cond_init(&device_listener_thread_wakeup_, NULL);
- LOG4CXX_INFO(logger_, "TransportManager object created");
-}
-
-TransportManagerImpl::~TransportManagerImpl() {
- LOG4CXX_INFO(logger_, "TransportManager object destroyed");
-
- for (std::vector<TransportAdapter*>::iterator it =
- transport_adapters_.begin();
- it != transport_adapters_.end(); ++it) {
- delete *it;
- }
-
- for (std::map<TransportAdapter*, TransportAdapterListenerImpl*>::iterator it =
- transport_adapter_listeners_.begin();
- it != transport_adapter_listeners_.end(); ++it) {
- delete it->second;
- }
-
- pthread_mutex_destroy(&message_queue_mutex_);
- pthread_cond_destroy(&message_queue_cond_);
- pthread_mutex_destroy(&event_queue_mutex_);
- pthread_cond_destroy(&device_listener_thread_wakeup_);
-}
-
-int TransportManagerImpl::ConnectDevice(const DeviceHandle& device_handle) {
- LOG4CXX_INFO(logger_, "Connect device called with arguments device_handle "
- << device_handle);
- if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- DeviceUID device_id = converter_.HandleToUid(device_handle);
- LOG4CXX_INFO(logger_, "Convert handle to id " << device_id);
-
- transport_adapter::TransportAdapter* ta = device_to_adapter_map_[device_id];
- if (NULL == ta) {
- LOG4CXX_ERROR(logger_, "No device adapter found by id " << device_id);
- return E_INVALID_HANDLE;
- }
-
- TransportAdapter::Error ta_error = ta->ConnectDevice(device_id);
- return (TransportAdapter::OK == ta_error) ? E_SUCCESS : E_INTERNAL_ERROR;
-}
-
-int TransportManagerImpl::DisconnectDevice(const DeviceHandle& device_handle) {
- LOG4CXX_INFO(logger_, "Disconnect device called");
- if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
- DeviceUID device_id = converter_.HandleToUid(device_handle);
- LOG4CXX_INFO(logger_, "Convert handle to id" << device_id);
-
- transport_adapter::TransportAdapter* ta = device_to_adapter_map_[device_id];
- if (NULL == ta) {
- LOG4CXX_ERROR(logger_, "No device adapter found by id " << device_id);
- return E_INVALID_HANDLE;
- }
- ta->DisconnectDevice(device_id);
- LOG4CXX_INFO(logger_, "Disconnected");
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::Disconnect(const ConnectionUID& cid) {
- if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- ConnectionInternal* connection = GetConnection(cid);
- if (connection == NULL) {
- LOG4CXX_ERROR(
- logger_,
- "TransportManagerImpl::Disconnect: Connection does not exist.");
- return E_INVALID_HANDLE;
- }
-
- pthread_mutex_lock(&event_queue_mutex_);
- int messages_count = 0;
- for (EventQueue::const_iterator it = event_queue_.begin();
- it != event_queue_.end();
- ++it) {
- if (it->application_id() == cid) {
- ++messages_count;
- }
- }
- pthread_mutex_unlock(&event_queue_mutex_);
-
- if (messages_count > 0) {
- connection->messages_count = messages_count;
- connection->shutDown = true;
- connection->timer->start(
- profile::Profile::instance()->transport_manager_disconnect_timeout()
- );
- } else {
- connection->transport_adapter->Disconnect(connection->device,
- connection->application);
- }
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::DisconnectForce(const ConnectionUID& cid) {
- if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
- pthread_mutex_lock(&event_queue_mutex_);
- // Clear messages for this connection
- // Note that MessageQueue typedef is assumed to be std::list,
- // or there is a problem here. One more point versus typedefs-everywhere
- MessageQueue::iterator e = message_queue_.begin();
- while (e != message_queue_.end()) {
- if ((*e)->connection_key() == cid) {
- RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
- DataSendTimeoutError(), *e);
- e = message_queue_.erase(e);
- } else {
- ++e;
- }
- }
- pthread_mutex_unlock(&event_queue_mutex_);
- const ConnectionInternal* connection = GetConnection(cid);
- if (connection == NULL) {
- LOG4CXX_ERROR(
- logger_,
- "TransportManagerImpl::DisconnectForce: Connection does not exist.");
- return E_INVALID_HANDLE;
- }
- connection->transport_adapter->Disconnect(connection->device,
- connection->application);
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::AddEventListener(TransportManagerListener* listener) {
- transport_manager_listener_.push_back(listener);
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::Stop() {
- if (!all_thread_active_) return E_TM_IS_NOT_INITIALIZED;
-
- all_thread_active_ = false;
-
- pthread_mutex_lock(&event_queue_mutex_);
- pthread_cond_signal(&device_listener_thread_wakeup_);
- pthread_mutex_unlock(&event_queue_mutex_);
-
- pthread_mutex_lock(&message_queue_mutex_);
- pthread_cond_signal(&message_queue_cond_);
- pthread_mutex_unlock(&message_queue_mutex_);
-
- pthread_join(message_queue_thread_, 0);
- pthread_join(event_queue_thread_, 0);
-
- LOG4CXX_INFO(logger_, "TransportManager object stopped");
-
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::SendMessageToDevice(const RawMessageSptr message) {
- LOG4CXX_INFO(logger_, "Send message to device called with arguments "
- << message.get());
- if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- const ConnectionInternal* connection =
- GetConnection(message->connection_key());
- if (connection == NULL) {
- LOG4CXX_ERROR(logger_, "Connection with id " << message->connection_key()
- << " does not exist.");
- return E_INVALID_HANDLE;
- }
-
- if (connection->shutDown) {
- LOG4CXX_ERROR(
- logger_,
- "TransportManagerImpl::Disconnect: Connection is to shut down.");
- return E_CONNECTION_IS_TO_SHUTDOWN;
- }
-
- this->PostMessage(message);
- LOG4CXX_INFO(logger_, "Message posted");
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::ReceiveEventFromDevice(
- const TransportAdapterEvent& event) {
- if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
- this->PostEvent(event);
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::RemoveDevice(const DeviceHandle& device_handle) {
- DeviceUID device_id = converter_.HandleToUid(device_handle);
- if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized.");
- return E_TM_IS_NOT_INITIALIZED;
- }
- device_to_adapter_map_.erase(device_id);
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::AddTransportAdapter(
- transport_adapter::TransportAdapter* transport_adapter) {
- LOG4CXX_INFO(logger_, "Add device adapter "
- << transport_adapter << "["
- << transport_adapter->GetDeviceType() << "]");
-
- if (transport_adapter_listeners_.find(transport_adapter) !=
- transport_adapter_listeners_.end()) {
- LOG4CXX_ERROR(logger_, "Adapter already exists.");
- return E_ADAPTER_EXISTS;
- }
- transport_adapter_listeners_[transport_adapter] =
- new TransportAdapterListenerImpl(this, transport_adapter);
- transport_adapter->AddListener(
- transport_adapter_listeners_[transport_adapter]);
-
- if (transport_adapter->IsInitialised() ||
- transport_adapter->Init() == TransportAdapter::OK) {
- transport_adapters_.push_back(transport_adapter);
- }
-
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::SearchDevices(void) {
- if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized");
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- LOG4CXX_INFO(logger_, "Search device called");
-
- bool success_occured = false;
-
- for (std::vector<TransportAdapter*>::iterator it =
- transport_adapters_.begin();
- it != transport_adapters_.end(); ++it) {
- LOG4CXX_INFO(logger_, "Iterating over transport adapters");
- TransportAdapter::Error scanResult = (*it)->SearchDevices();
- if (transport_adapter::TransportAdapter::OK == scanResult) {
- success_occured = true;
- }
- else {
- LOG4CXX_ERROR(logger_, "Transport Adapter search failed "
- << *it << "[" << (*it)->GetDeviceType()
- << "]");
- switch (scanResult) {
- case transport_adapter::TransportAdapter::NOT_SUPPORTED: {
- LOG4CXX_ERROR(logger_, "Search feature is not supported "
- << *it << "[" << (*it)->GetDeviceType()
- << "]");
- break;
- }
- case transport_adapter::TransportAdapter::BAD_STATE: {
- LOG4CXX_ERROR(logger_, "Transport Adapter has bad state "
- << *it << "[" << (*it)->GetDeviceType()
- << "]");
- break;
- }
- }
- }
- }
-
- LOG4CXX_INFO(logger_, "SearchDevices() function is complete");
-
- return (success_occured || transport_adapters_.empty())
- ? E_SUCCESS
- : E_ADAPTERS_FAIL;
-}
-
-int TransportManagerImpl::Init(void) {
- LOG4CXX_INFO(logger_, "Init is called");
- all_thread_active_ = true;
-
- int error_code =
- pthread_create(&message_queue_thread_, 0, &MessageQueueStartThread, this);
-
- if (0 != error_code) {
- LOG4CXX_ERROR(logger_,
- "Message queue thread is not created exit with error code "
- << error_code);
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- error_code =
- pthread_create(&event_queue_thread_, 0, &EventListenerStartThread, this);
-
- if (0 != error_code) {
- LOG4CXX_ERROR(logger_,
- "Event queue thread is not created exit with error code "
- << error_code);
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- is_initialized_ = true;
- LOG4CXX_INFO(logger_, "Init complete");
- return E_SUCCESS;
-}
-
-int TransportManagerImpl::Visibility(const bool& on_off) const {
- TransportAdapter::Error ret;
-
- LOG4CXX_INFO(logger_, "Visibility change requested to " << on_off);
- if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized");
- return E_TM_IS_NOT_INITIALIZED;
- }
-
- for (std::vector<TransportAdapter*>::const_iterator it =
- transport_adapters_.begin();
- it != transport_adapters_.end(); ++it) {
- if (on_off) {
- ret = (*it)->StartClientListening();
- } else {
- ret = (*it)->StopClientListening();
- }
- if (TransportAdapter::Error::NOT_SUPPORTED == ret) {
- LOG4CXX_INFO(logger_, "Visibility change is not supported for adapter "
- << *it << "[" << (*it)->GetDeviceType() << "]");
- }
- }
-
- LOG4CXX_INFO(logger_, "Visibility change requested complete");
- return E_SUCCESS;
-}
-
-void TransportManagerImpl::UpdateDeviceList(TransportAdapter* ta) {
- std::set<DeviceInfo> old_devices;
- for (DeviceList::iterator it = device_list_.begin();
- it != device_list_.end();) {
- if (it->first == ta) {
- old_devices.insert(it->second);
- it = device_list_.erase(it);
- } else {
- ++it;
- }
- }
-
- std::set<DeviceInfo> new_devices;
- const transport_adapter::DeviceList dev_list = ta->GetDeviceList();
- for (transport_adapter::DeviceList::const_iterator it = dev_list.begin();
- it != dev_list.end(); ++it) {
- DeviceHandle device_handle = converter_.UidToHandle(*it);
- DeviceInfo info(device_handle, *it, ta->DeviceName(*it));
- device_list_.push_back(std::make_pair(ta, info));
- new_devices.insert(info);
- }
-
- std::set<DeviceInfo> added_devices;
- std::set_difference(new_devices.begin(), new_devices.end(),
- old_devices.begin(), old_devices.end(),
- std::inserter(added_devices, added_devices.begin()));
- for(std::set<DeviceInfo>::const_iterator it = added_devices.begin();
- it != added_devices.end();
- ++it) {
- RaiseEvent(&TransportManagerListener::OnDeviceAdded, *it);
- }
-
- std::set<DeviceInfo> removed_devices;
- std::set_difference(old_devices.begin(), old_devices.end(),
- new_devices.begin(), new_devices.end(),
- std::inserter(removed_devices, removed_devices.begin()));
-
- for(std::set<DeviceInfo>::const_iterator it = removed_devices.begin();
- it != removed_devices.end();
- ++it) {
- RaiseEvent(&TransportManagerListener::OnDeviceRemoved, *it);
- }
-}
-
-void TransportManagerImpl::PostMessage(const RawMessageSptr message) {
- LOG4CXX_INFO(logger_, "Post message called serial number " << message.get());
-
-#ifdef USE_RWLOCK
- pthread_rwlock_wrlock(&message_queue_rwlock_);
-#else
- pthread_mutex_lock(&message_queue_mutex_);
-#endif
- message_queue_.push_back(message);
- pthread_cond_signal(&message_queue_cond_);
-#ifdef USE_RWLOCK
- pthread_rwlock_unlock(&message_queue_rwlock_);
-#else
- pthread_mutex_unlock(&message_queue_mutex_);
-#endif
- LOG4CXX_INFO(logger_, "Post message complete");
-}
-
-void TransportManagerImpl::RemoveMessage(const RawMessageSptr message) {
- // TODO: Reconsider necessity of this method, remove if it's useless,
- // make to work otherwise.
- // 2013-08-21 dchmerev@luxoft.com
- LOG4CXX_INFO(logger_, "Remove message called " << message.get());
-#ifdef USE_RWLOCK
- pthread_rwlock_wrlock(&message_queue_rwlock_);
-#else
- pthread_mutex_lock(&message_queue_mutex_);
-#endif
- std::remove(message_queue_.begin(), message_queue_.end(), message);
-#ifdef USE_RWLOCK
- pthread_rwlock_unlock(&message_queue_rwlock_);
-#else
- pthread_mutex_unlock(&message_queue_mutex_);
-#endif
- LOG4CXX_INFO(logger_, "Remove message from queue complete");
-}
-
-void TransportManagerImpl::PostEvent(const TransportAdapterEvent& event) {
-#ifdef USE_RWLOCK
- pthread_rwlock_wrlock(&event_queue_rwlock_);
-#else
- pthread_mutex_lock(&event_queue_mutex_);
-#endif
- event_queue_.push_back(event);
- pthread_cond_signal(&device_listener_thread_wakeup_);
-#ifdef USE_RWLOCK
- pthread_rwlock_unlock(&event_queue_rwlock_);
-#else
- pthread_mutex_unlock(&event_queue_mutex_);
-#endif
-}
-
-void* TransportManagerImpl::EventListenerStartThread(void* data) {
- if (NULL != data) {
- static_cast<TransportManagerImpl*>(data)->EventListenerThread();
- }
- return 0;
-}
-
-void TransportManagerImpl::AddConnection(const ConnectionInternal& c) {
- connections_.push_back(c);
- incoming_data_handler_->AddConnection(c.id);
-}
-
-void TransportManagerImpl::RemoveConnection(int id) {
- for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
- it != connections_.end(); ++it) {
- if (it->id == id) {
- connections_.erase(it);
- break;
- }
- }
- incoming_data_handler_->RemoveConnection(id);
-}
-
-TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
- const ConnectionUID& id) {
- for (std::vector<ConnectionInternal>::iterator it = connections_.begin(); it != connections_.end(); ++it) {
- if (it->id == id) {
- return &*it;
- }
- }
- return NULL;
-}
-
-TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
- const DeviceUID& device, const ApplicationHandle& application) {
- for (std::vector<ConnectionInternal>::iterator it = connections_.begin(); it != connections_.end(); ++it) {
- if (it->device == device && it->application == application) {
- return &*it;
- }
- }
- return NULL;
-}
-
-// TODO this function should be moved outside of TM to protocol handler or
-// somewhere else
-unsigned int TransportManagerImpl::GetPacketSize(unsigned int data_size,
- unsigned char* first_bytes) {
- DCHECK(first_bytes);
- unsigned char offset = sizeof(uint32_t);
- if (data_size < 2 * offset) {
- LOG4CXX_ERROR(logger_, "Received bytes are not enough to parse fram size.");
- return 0;
- }
-
- unsigned char* received_bytes = first_bytes;
- DCHECK(received_bytes);
-
- unsigned char version = received_bytes[0] >> 4u;
- uint32_t frame_body_size = received_bytes[offset++] << 24u;
- frame_body_size |= received_bytes[offset++] << 16u;
- frame_body_size |= received_bytes[offset++] << 8u;
- frame_body_size |= received_bytes[offset++];
-
- unsigned int required_size = frame_body_size;
- switch (version) {
- case protocol_handler::PROTOCOL_VERSION_1:
- required_size += protocol_handler::PROTOCOL_HEADER_V1_SIZE;
- break;
- case protocol_handler::PROTOCOL_VERSION_2:
- required_size += protocol_handler::PROTOCOL_HEADER_V2_SIZE;
- break;
- default:
- LOG4CXX_ERROR(logger_, "Unknown protocol version.");
- return 0;
- }
-
- return required_size;
-}
-
-void TransportManagerImpl::OnDeviceListUpdated(TransportAdapter* ta) {
- const transport_adapter::DeviceList device_list = ta->GetDeviceList();
- LOG4CXX_INFO(logger_, "DEVICE_LIST_UPDATED " << device_list.size());
- for (transport_adapter::DeviceList::const_iterator it = device_list.begin();
- it != device_list.end(); ++it) {
- device_to_adapter_map_.insert(std::make_pair(*it, ta));
- DeviceHandle device_handle = converter_.UidToHandle(*it);
- DeviceInfo info(device_handle, *it, ta->DeviceName(*it));
- RaiseEvent(&TransportManagerListener::OnDeviceFound, info);
- }
- UpdateDeviceList(ta);
- std::vector<DeviceInfo> device_infos;
- for (DeviceList::const_iterator it = device_list_.begin();
- it != device_list_.end(); ++it) {
- device_infos.push_back(it->second);
- }
- RaiseEvent(&TransportManagerListener::OnDeviceListUpdated, device_infos);
-}
-
-void TransportManagerImpl::EventListenerThread(void) {
-#ifndef USE_RWLOCK
- pthread_mutex_lock(&event_queue_mutex_);
-#endif
- LOG4CXX_INFO(logger_, "Event listener thread started");
- while (true) {
- while (event_queue_.size() > 0) {
-#ifdef USE_RWLOCK
- pthread_rwlock_rdlock(&event_queue_rwlock_);
-#endif
- LOG4CXX_INFO(logger_, "Event listener queue pushed to process events");
- EventQueue::iterator current = event_queue_.begin();
- TransportAdapter* ta = current->transport_adapter();
- ApplicationHandle app_handle = current->application_id();
- DeviceUID device_id = current->device_uid();
- DeviceHandle device_handle;
- BaseError* error = current->event_error();
- RawMessageSptr data = current->data();
-
- int event_type = current->event_type();
- event_queue_.erase(current);
-#ifdef USE_RWLOCK
- pthread_rwlock_unlock(&event_queue_rwlock_);
-#else
- pthread_mutex_unlock(&event_queue_mutex_);
-#endif
- transport_adapter::DeviceList dev_list;
- ConnectionInternal* connection = GetConnection(device_id, app_handle);
- std::vector<DeviceInfo>::iterator device_info_iterator;
-
- switch (event_type) {
- case TransportAdapterListenerImpl::EventTypeEnum::ON_SEARCH_DONE: {
- LOG4CXX_INFO(logger_, "Event ON_SEARCH_DONE");
- RaiseEvent(&TransportManagerListener::OnScanDevicesFinished);
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_SEARCH_FAIL: {
- LOG4CXX_INFO(logger_, "Event ON_SEARCH_FAIL");
- // error happened in real search process (external error)
- RaiseEvent(&TransportManagerListener::OnScanDevicesFailed,
- *static_cast<SearchDeviceError*>(error));
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_DEVICE_LIST_UPDATED
- : {
- OnDeviceListUpdated(ta);
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_CONNECT_DONE: {
- LOG4CXX_INFO(logger_, "Event ON_CONNECT_DONE");
- AddConnection(ConnectionInternal(this, ta, ++connection_id_counter_,
- device_id, app_handle));
- device_handle = converter_.UidToHandle(device_id);
- RaiseEvent(
- &TransportManagerListener::OnConnectionEstablished,
- DeviceInfo(device_handle, device_id, ta->DeviceName(device_id)),
- connection_id_counter_);
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_CONNECT_FAIL: {
- LOG4CXX_INFO(logger_, "Event ON_CONNECT_FAIL");
- RaiseEvent(&TransportManagerListener::OnConnectionFailed,
- DeviceInfo(converter_.UidToHandle(device_id), device_id,
- ta->DeviceName(device_id)),
- ConnectError());
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_DISCONNECT_DONE: {
- LOG4CXX_INFO(logger_, "Event ON_DISCONNECT_DONE");
- if (connection == NULL) {
- LOG4CXX_ERROR(logger_, "Connection ('" << device_id << ", "
- << app_handle
- << ") not found");
- break;
- }
- RaiseEvent(&TransportManagerListener::OnConnectionClosed,
- connection->id);
- RemoveConnection(connection->id);
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_DISCONNECT_FAIL: {
- LOG4CXX_INFO(logger_, "Event ON_DISCONNECT_FAIL");
- device_handle = converter_.UidToHandle(device_id);
- RaiseEvent(&TransportManagerListener::OnDisconnectFailed,
- device_handle, DisconnectDeviceError());
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_SEND_DONE: {
- LOG4CXX_INFO(logger_, "Event ON_SEND_DONE");
- if (connection == NULL) {
- LOG4CXX_ERROR(logger_, "Connection ('" << device_id << ", "
- << app_handle
- << ") not found");
- break;
- }
- RaiseEvent(&TransportManagerListener::OnTMMessageSend, data);
- this->RemoveMessage(data);
- if (connection->shutDown && --connection->messages_count == 0) {
- connection->timer->stop();
- connection->transport_adapter->Disconnect(connection->device,
- connection->application);
- }
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_SEND_FAIL: {
- LOG4CXX_INFO(logger_, "Event ON_SEND_FAIL");
- if (connection == NULL) {
- LOG4CXX_ERROR(logger_, "Connection ('" << device_id << ", "
- << app_handle
- << ") not found");
- break;
- }
-
- // TODO(YK): start timer here to wait before notify caller
- // and remove unsent messages
- LOG4CXX_ERROR(logger_, "Transport adapter failed to send data");
- // TODO(YK): potential error case -> thread unsafe
- // update of message content
- data->set_waiting(true);
- if (data.valid()) {
- data->set_waiting(true);
- } else {
- LOG4CXX_ERROR(logger_, "Data is invalid");
- }
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_RECEIVED_DONE: {
- LOG4CXX_INFO(logger_, "Event ON_RECEIVED_DONE");
- if (connection == NULL) {
- LOG4CXX_ERROR(logger_, "Connection ('" << device_id << ", "
- << app_handle
- << ") not found");
- break;
- }
- const bool ok = incoming_data_handler_->ProcessData(
- connection->id, data->data(), data->data_size());
- if (!ok) {
- LOG4CXX_ERROR(
- logger_,
- "Incoming data processing failed. Terminating connection.");
- DisconnectForce(connection->id);
- }
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_RECEIVED_FAIL: {
- LOG4CXX_INFO(logger_, "Event ON_RECEIVED_FAIL");
- if (connection == NULL) {
- LOG4CXX_ERROR(logger_, "Connection ('" << device_id << ", "
- << app_handle
- << ") not found");
- break;
- }
-
- RaiseEvent(&TransportManagerListener::OnTMMessageReceiveFailed,
- connection->id, *static_cast<DataReceiveError*>(error));
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::ON_COMMUNICATION_ERROR
- : {
- LOG4CXX_INFO(logger_, "Event ON_COMMUNICATION_ERROR");
- break;
- }
- case TransportAdapterListenerImpl::EventTypeEnum::
- ON_UNEXPECTED_DISCONNECT: {
- LOG4CXX_INFO(logger_, "Event ON_UNEXPECTED_DISCONNECT");
- if (connection) {
- RaiseEvent(&TransportManagerListener::OnUnexpectedDisconnect,
- connection->id,
- *static_cast<CommunicationError*>(error));
- } else {
- LOG4CXX_ERROR(logger_, "Connection ('" << device_id << ", "
- << app_handle
- << ") not found");
- }
- break;
- }
- } // switch
- delete error;
-#ifndef USE_RWLOCK
- pthread_mutex_lock(&event_queue_mutex_);
-#endif
- } // while (event_queue_.size() > 0)
-
- if (all_thread_active_)
- pthread_cond_wait(&device_listener_thread_wakeup_, &event_queue_mutex_);
- else
- break;
- } // while (true)
-
- pthread_mutex_unlock(&event_queue_mutex_);
-
- LOG4CXX_INFO(logger_, "Event listener thread finished");
-}
-void* TransportManagerImpl::MessageQueueStartThread(void* data) {
- if (NULL != data) {
- static_cast<TransportManagerImpl*>(data)->MessageQueueThread();
- }
- return 0;
-}
-
-void TransportManagerImpl::MessageQueueThread(void) {
- LOG4CXX_INFO(logger_, "Message queue thread started");
-
-#ifndef USE_RWLOCK
- pthread_mutex_lock(&message_queue_mutex_);
-#endif
-
- while (all_thread_active_) {
- // TODO(YK): add priority processing
-
- while (message_queue_.size() > 0) {
-#ifdef USE_RWLOCK
- pthread_rwlock_rdlock(&message_queue_rwlock_);
-#endif
- MessageQueue::iterator it = message_queue_.begin();
- while (it != message_queue_.end() && it->valid() && (*it)->IsWaiting()) {
- ++it;
- }
- if (it == message_queue_.end()) {
-#ifdef USE_RWLOCK
- pthread_rwlock_unlock(&message_queue_rwlock_);
-#endif
- break;
- }
- RawMessageSptr active_msg = *it;
-#ifdef USE_RWLOCK
- pthread_rwlock_unlock(&message_queue_rwlock_);
-#else
- pthread_mutex_unlock(&message_queue_mutex_);
-#endif
- if (active_msg.valid() && !active_msg->IsWaiting()) {
- ConnectionInternal* connection =
- GetConnection(active_msg->connection_key());
- if (connection == NULL) {
- std::stringstream ss;
- ss << "Connection " << active_msg->connection_key() << " not found";
- LOG4CXX_ERROR(logger_, ss.str());
- RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
- DataSendError(ss.str()), active_msg);
- message_queue_.remove(active_msg);
- continue;
- }
- TransportAdapter* transport_adapter = connection->transport_adapter;
- LOG4CXX_INFO(logger_, "Got adapter "
- << transport_adapter << "["
- << transport_adapter->GetDeviceType() << "]"
- << " by session id "
- << active_msg->connection_key());
-
- if (NULL == transport_adapter) {
- std::string error_text =
- "Transport adapter is not found - message removed";
- LOG4CXX_ERROR(logger_, error_text);
- RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
- DataSendError(error_text), active_msg);
- message_queue_.remove(active_msg);
- } else {
- if (TransportAdapter::OK ==
- transport_adapter->SendData(
- connection->device, connection->application, active_msg)) {
- LOG4CXX_INFO(logger_, "Data sent to adapter");
- active_msg->set_waiting(true);
- } else {
- LOG4CXX_ERROR(logger_, "Data sent error");
- RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
- DataSendError("Send failed - message removed"),
- active_msg);
- message_queue_.remove(active_msg);
- }
- }
- }
-#ifndef USE_RWLOCK
- pthread_mutex_lock(&message_queue_mutex_);
-#endif
- }
- pthread_cond_wait(&message_queue_cond_, &message_queue_mutex_);
- } // while(true)
-
- message_queue_.clear();
-
- pthread_mutex_unlock(&message_queue_mutex_);
- LOG4CXX_INFO(logger_, "Message queue thread finished");
-}
-
-} // namespace transport_manager
-
-
diff --git a/SDL_Core/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc b/SDL_Core/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
deleted file mode 100644
index 2110ac3fc..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * \file platform_usb_device.cc
- * \brief Libusb PlatformUsbDevice class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/usb/libusb/platform_usb_device.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-PlatformUsbDevice::PlatformUsbDevice(
- uint8_t bus_number, uint8_t address,
- const libusb_device_descriptor& device_descriptor,
- libusb_device* device_libusb, libusb_device_handle* device_handle_libusb)
- : bus_number_(bus_number),
- address_(address),
- vendor_id_(device_descriptor.idVendor),
- product_id_(device_descriptor.idProduct),
- device_descriptor_(device_descriptor),
- libusb_device_handle_(device_handle_libusb),
- libusb_device_(device_libusb) {}
-
-std::string PlatformUsbDevice::GetDescString(uint8_t index) const {
- unsigned char buf[128];
- const int libusb_ret = libusb_get_string_descriptor_ascii(
- libusb_device_handle_, index, buf, sizeof(buf));
- if (libusb_ret < 0) {
- LOG4CXX_INFO(logger_, "Failed to get USB string descriptor: "
- << libusb_error_name(libusb_ret));
- return "";
- }
- return std::string(reinterpret_cast<char*>(buf));
-}
-
-std::string PlatformUsbDevice::GetManufacturer() const {
- return GetDescString(device_descriptor_.iManufacturer);
-}
-
-std::string PlatformUsbDevice::GetProductName() const {
- return GetDescString(device_descriptor_.iProduct);
-}
-
-std::string PlatformUsbDevice::GetSerialNumber() const {
- return GetDescString(device_descriptor_.iSerialNumber);
-}
-
-} // namespace
-} // namespace
diff --git a/SDL_Core/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/SDL_Core/src/components/transport_manager/src/usb/libusb/usb_connection.cc
deleted file mode 100644
index 00c792de8..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/libusb/usb_connection.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-/**
- * \file usb_connection.cc
- * \brief UsbConnection class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <iomanip>
-
-#include <libusb/libusb.h>
-
-#include "transport_manager/usb/libusb/usb_connection.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-UsbConnection::UsbConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller,
- const UsbHandlerSptr& usb_handler,
- PlatformUsbDevice* device)
- : device_uid_(device_uid),
- app_handle_(app_handle),
- controller_(controller),
- usb_handler_(usb_handler),
- libusb_device_(device->GetLibusbDevice()),
- device_handle_(device->GetLibusbHandle()),
- in_endpoint_(0),
- in_endpoint_max_packet_size_(0),
- out_endpoint_(0),
- out_endpoint_max_packet_size_(0),
- in_buffer_(0),
- in_transfer_(0),
- out_transfer_(0),
- out_messages_(),
- current_out_message_(),
- out_messages_mutex_(),
- bytes_sent_(0),
- disconnecting_(false),
- waiting_in_transfer_cancel_(false),
- waiting_out_transfer_cancel_(false) {
- pthread_mutex_init(&out_messages_mutex_, 0);
-}
-
-UsbConnection::~UsbConnection() {
- Finalise();
- if (in_transfer_) {
- libusb_free_transfer(in_transfer_);
- }
- if (in_buffer_) {
- delete[] in_buffer_;
- }
- pthread_mutex_destroy(&out_messages_mutex_);
-}
-
-void InTransferCallback(libusb_transfer* transfer) {
- static_cast<UsbConnection*>(transfer->user_data)->OnInTransfer(transfer);
-}
-
-void OutTransferCallback(libusb_transfer* transfer) {
- static_cast<UsbConnection*>(transfer->user_data)->OnOutTransfer(transfer);
-}
-
-bool UsbConnection::PostInTransfer() {
- libusb_fill_bulk_transfer(in_transfer_, device_handle_, in_endpoint_,
- in_buffer_, in_endpoint_max_packet_size_,
- InTransferCallback, this, 0);
- const int libusb_ret = libusb_submit_transfer(in_transfer_);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_, "libusb_submit_transfer failed: "
- << libusb_error_name(libusb_ret));
- return false;
- }
- return true;
-}
-
-void UsbConnection::OnInTransfer(libusb_transfer* transfer) {
- if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
- if (logger_->isTraceEnabled()) {
- std::ostringstream hexdata;
- for (int i = 0; i < transfer->actual_length; ++i) {
- hexdata << " " << std::hex << std::setw(2) << std::setfill('0')
- << (int)transfer->buffer[i];
- }
- LOG4CXX_TRACE(logger_, "USB incoming transfer, size:"
- << transfer->actual_length
- << ", data:" << hexdata.str());
- }
- RawMessageSptr data(new protocol_handler::RawMessage(
- 0, 0, in_buffer_, transfer->actual_length));
- controller_->DataReceiveDone(device_uid_, app_handle_, data);
- } else {
- LOG4CXX_ERROR(logger_, "USB transfer failed: " << transfer->status);
- controller_->DataReceiveFailed(device_uid_, app_handle_,
- DataReceiveError());
- }
- if (disconnecting_) {
- waiting_in_transfer_cancel_ = false;
- } else {
- if (!PostInTransfer()) {
- controller_->ConnectionAborted(device_uid_, app_handle_,
- CommunicationError());
- Disconnect();
- }
- }
-}
-
-void UsbConnection::PopOutMessage() {
- bytes_sent_ = 0;
- if (out_messages_.empty()) {
- current_out_message_.reset();
- } else {
- current_out_message_ = out_messages_.front();
- out_messages_.pop_front();
- PostOutTransfer();
- }
-}
-
-bool UsbConnection::PostOutTransfer() {
- out_transfer_ = libusb_alloc_transfer(0);
- if (0 == out_transfer_) {
- LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed");
- return false;
- }
- libusb_fill_bulk_transfer(out_transfer_, device_handle_, out_endpoint_,
- current_out_message_->data() + bytes_sent_,
- current_out_message_->data_size() - bytes_sent_,
- OutTransferCallback, this, 0);
- const int libusb_ret = libusb_submit_transfer(out_transfer_);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_, "libusb_submit_transfer failed: "
- << libusb_error_name(libusb_ret));
- controller_->ConnectionAborted(device_uid_, app_handle_,
- CommunicationError());
- Disconnect();
- return false;
- }
- return true;
-}
-
-void UsbConnection::OnOutTransfer(libusb_transfer* transfer) {
- pthread_mutex_lock(&out_messages_mutex_);
- if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
- bytes_sent_ += transfer->actual_length;
- if (bytes_sent_ == current_out_message_->data_size()) {
- LOG4CXX_INFO(logger_, "USB out transfer, data sent: "
- << current_out_message_.get());
- controller_->DataSendDone(device_uid_, app_handle_, current_out_message_);
- PopOutMessage();
- }
- } else {
- LOG4CXX_ERROR(logger_, "USB transfer failed: " << transfer->status);
- controller_->DataSendFailed(device_uid_, app_handle_, current_out_message_,
- DataSendError());
- PopOutMessage();
- }
- libusb_free_transfer(transfer);
- out_transfer_ = 0;
- pthread_mutex_unlock(&out_messages_mutex_);
- waiting_out_transfer_cancel_ = false;
-}
-
-TransportAdapter::Error UsbConnection::SendData(RawMessageSptr message) {
- if (disconnecting_) {
- return TransportAdapter::BAD_STATE;
- }
- pthread_mutex_lock(&out_messages_mutex_);
- if (current_out_message_.valid()) {
- out_messages_.push_back(message);
- } else {
- current_out_message_ = message;
- if (!PostOutTransfer()) {
- controller_->DataSendFailed(device_uid_, app_handle_, message,
- DataSendError());
- }
- }
- pthread_mutex_unlock(&out_messages_mutex_);
- return TransportAdapter::OK;
-}
-
-void UsbConnection::Finalise() {
- LOG4CXX_INFO(logger_, "Finalise USB connection " << device_uid_);
- pthread_mutex_lock(&out_messages_mutex_);
- disconnecting_ = true;
- if (out_transfer_) {
- waiting_out_transfer_cancel_ = true;
- if (LIBUSB_SUCCESS != libusb_cancel_transfer(out_transfer_)) {
- waiting_out_transfer_cancel_ = false;
- }
- }
- if (in_transfer_) {
- waiting_in_transfer_cancel_ = true;
- if (LIBUSB_SUCCESS != libusb_cancel_transfer(in_transfer_)) {
- waiting_in_transfer_cancel_ = false;
- }
- }
- for (std::list<RawMessageSptr>::iterator it = out_messages_.begin();
- it != out_messages_.end(); it = out_messages_.erase(it)) {
- controller_->DataSendFailed(device_uid_, app_handle_, *it, DataSendError());
- }
- pthread_mutex_unlock(&out_messages_mutex_);
-
- while (waiting_in_transfer_cancel_ || waiting_out_transfer_cancel_) {
- pthread_yield();
- }
-}
-
-TransportAdapter::Error UsbConnection::Disconnect() {
- Finalise();
- LOG4CXX_INFO(logger_, "USB disconnect done " << device_uid_);
- controller_->DisconnectDone(device_uid_, app_handle_);
- return TransportAdapter::OK;
-}
-
-bool UsbConnection::Init() {
- if (!FindEndpoints()) {
- return false;
- }
-
- in_buffer_ = new unsigned char[in_endpoint_max_packet_size_];
- if (0 == in_buffer_) {
- LOG4CXX_ERROR(logger_, "in buffer allocation failed (size "
- << in_endpoint_max_packet_size_ << ")");
- return false;
- }
-
- in_transfer_ = libusb_alloc_transfer(0);
- if (0 == in_transfer_) {
- LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed");
- return false;
- }
-
- controller_->ConnectDone(device_uid_, app_handle_);
- if (!PostInTransfer()) {
- controller_->ConnectionAborted(device_uid_, app_handle_,
- CommunicationError());
- return true;
- }
-
- return true;
-}
-
-bool UsbConnection::FindEndpoints() {
- struct libusb_config_descriptor* config;
- const int libusb_ret =
- libusb_get_active_config_descriptor(libusb_device_, &config);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_, "libusb_get_active_config_descriptor failed: "
- << libusb_error_name(libusb_ret));
- return false;
- }
-
- bool find_in_endpoint = true;
- bool find_out_endpoint = true;
-
- for (int i = 0; i < config->bNumInterfaces; ++i) {
- const libusb_interface& interface = config->interface[i];
- for (int i = 0; i < interface.num_altsetting; ++i) {
- const libusb_interface_descriptor& iface_desc = interface.altsetting[i];
- for (int i = 0; i < iface_desc.bNumEndpoints; ++i) {
- const libusb_endpoint_descriptor& endpoint_desc =
- iface_desc.endpoint[i];
-
- const uint8_t endpoint_dir =
- endpoint_desc.bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK;
- if (find_in_endpoint && endpoint_dir == LIBUSB_ENDPOINT_IN) {
- in_endpoint_ = endpoint_desc.bEndpointAddress;
- in_endpoint_max_packet_size_ = endpoint_desc.wMaxPacketSize;
- find_in_endpoint = false;
- } else if (find_out_endpoint && endpoint_dir == LIBUSB_ENDPOINT_OUT) {
- out_endpoint_ = endpoint_desc.bEndpointAddress;
- out_endpoint_max_packet_size_ = endpoint_desc.wMaxPacketSize;
- find_out_endpoint = false;
- }
- }
- }
- }
- libusb_free_config_descriptor(config);
-
- return !(find_in_endpoint || find_out_endpoint);
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/usb/libusb/usb_handler.cc b/SDL_Core/src/components/transport_manager/src/usb/libusb/usb_handler.cc
deleted file mode 100644
index 88c4ee1da..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/libusb/usb_handler.cc
+++ /dev/null
@@ -1,418 +0,0 @@
-/**
- * \file usb_handler.cc
- * \brief UsbHandler class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <cstring>
-#include <cstdlib>
-
-#include "transport_manager/usb/common.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class UsbHandler::ControlTransferSequenceState {
- public:
- ControlTransferSequenceState(class UsbHandler* usb_handler,
- UsbControlTransferSequence* sequence,
- PlatformUsbDevice* device);
- ~ControlTransferSequenceState();
- void Finish();
- bool Finished() const { return finished_; }
- UsbControlTransfer* CurrentTransfer();
- UsbControlTransfer* Next();
- UsbHandler* usb_handler() const { return usb_handler_; }
- PlatformUsbDevice* device() const { return device_; }
-
- private:
- UsbHandler* usb_handler_;
- PlatformUsbDevice* device_;
- bool finished_;
- UsbControlTransferSequence* sequence_;
- UsbControlTransferSequence::Transfers::const_iterator current_transfer_;
-};
-
-UsbHandler::UsbHandler()
- : shutdown_requested_(false),
- thread_(),
- usb_device_listeners_(),
- devices_(),
- transfer_sequences_(),
- device_handles_to_close_(),
- libusb_context_(NULL),
- arrived_callback_handle_(),
- left_callback_handle_() {}
-
-UsbHandler::~UsbHandler() {
- shutdown_requested_ = true;
- if (libusb_context_ != 0) {
- libusb_hotplug_deregister_callback(libusb_context_,
- arrived_callback_handle_);
- libusb_hotplug_deregister_callback(libusb_context_, left_callback_handle_);
- }
- pthread_join(thread_, 0);
- LOG4CXX_INFO(logger_, "UsbHandler thread finished");
- if (libusb_context_) {
- libusb_exit(libusb_context_);
- libusb_context_ = 0;
- }
-}
-
-void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
- const uint8_t bus_number = libusb_get_bus_number(device_libusb);
- const uint8_t device_address = libusb_get_device_address(device_libusb);
- libusb_device_descriptor descriptor;
- int libusb_ret = libusb_get_device_descriptor(device_libusb, &descriptor);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_get_device_descriptor failed: " << libusb_ret);
- return;
- }
-
- libusb_device_handle* device_handle_libusb;
- libusb_ret = libusb_open(device_libusb, &device_handle_libusb);
- if (libusb_ret != LIBUSB_SUCCESS) {
- LOG4CXX_ERROR(logger_,
- "libusb_open failed: " << libusb_error_name(libusb_ret));
- return;
- }
-
- int configuration;
- libusb_ret = libusb_get_configuration(device_handle_libusb, &configuration);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_INFO(
- logger_,
- "libusb_get_configuration failed: " << libusb_error_name(libusb_ret));
- return;
- }
-
- if (configuration != kUsbConfiguration) {
- libusb_ret = libusb_set_configuration(device_handle_libusb, kUsbConfiguration);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_INFO(
- logger_,
- "libusb_set_configuration failed: " << libusb_error_name(libusb_ret));
- return;
- }
- }
-
- libusb_ret = libusb_claim_interface(device_handle_libusb, 0);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_INFO(logger_, "libusb_claim_interface failed: "
- << libusb_error_name(libusb_ret));
- CloseDeviceHandle(device_handle_libusb);
- return;
- }
-
- PlatformUsbDevice* device(new PlatformUsbDevice(bus_number, device_address,
- descriptor, device_libusb,
- device_handle_libusb));
- devices_.push_back(device);
-
- for (std::list<UsbDeviceListener*>::iterator it =
- usb_device_listeners_.begin();
- it != usb_device_listeners_.end(); ++it) {
- (*it)->OnDeviceArrived(device);
- }
-}
-
-void UsbHandler::DeviceLeft(libusb_device* device_libusb) {
- PlatformUsbDevice* device = NULL;
- for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
- if ((*it)->GetLibusbDevice() == device_libusb) {
- device = *it;
- break;
- }
- }
- if (NULL == device) {
- return;
- }
-
- for (std::list<UsbDeviceListener*>::iterator it =
- usb_device_listeners_.begin();
- it != usb_device_listeners_.end(); ++it) {
- (*it)->OnDeviceLeft(device);
- }
-
- for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
- if ((*it)->GetLibusbDevice() == device_libusb) {
- devices_.erase(it);
- break;
- }
- }
-
- if (device->GetLibusbHandle()) {
- libusb_release_interface(device->GetLibusbHandle(), 0);
- CloseDeviceHandle(device->GetLibusbHandle());
- }
- delete device;
-}
-
-void UsbHandler::StartControlTransferSequence(
- UsbControlTransferSequence* sequence, PlatformUsbDevice* device) {
- TransferSequences::iterator it = transfer_sequences_.insert(
- transfer_sequences_.end(),
- new ControlTransferSequenceState(this, sequence, device));
- SubmitControlTransfer(*it);
-}
-
-void UsbHandler::CloseDeviceHandle(libusb_device_handle* device_handle) {
- device_handles_to_close_.push_back(device_handle);
-}
-
-void* UsbHandlerThread(void* data) {
- static_cast<UsbHandler*>(data)->Thread();
- return 0;
-}
-
-int ArrivedCallback(libusb_context* context, libusb_device* device,
- libusb_hotplug_event event, void* data) {
- LOG4CXX_INFO(logger_, "libusb device arrived (bus number "
- << static_cast<int>(libusb_get_bus_number(device))
- << ", device address "
- << static_cast<int>(
- libusb_get_device_address(device)) << ")");
- UsbHandler* usb_handler = static_cast<UsbHandler*>(data);
- usb_handler->DeviceArrived(device);
- return 0;
-}
-
-int LeftCallback(libusb_context* context, libusb_device* device,
- libusb_hotplug_event event, void* data) {
- LOG4CXX_INFO(logger_, "libusb device left (bus number "
- << static_cast<int>(libusb_get_bus_number(device))
- << ", device address "
- << static_cast<int>(
- libusb_get_device_address(device)) << ")");
- UsbHandler* usb_handler = static_cast<UsbHandler*>(data);
- usb_handler->DeviceLeft(device);
- return 0;
-}
-
-TransportAdapter::Error UsbHandler::Init() {
- int libusb_ret = libusb_init(&libusb_context_);
-
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_, "libusb_init failed: " << libusb_ret);
- return TransportAdapter::FAIL;
- }
-
- if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- LOG4CXX_ERROR(logger_, "LIBUSB_CAP_HAS_HOTPLUG not supported");
- return TransportAdapter::FAIL;
- }
-
- libusb_ret = libusb_hotplug_register_callback(
- libusb_context_, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED,
- LIBUSB_HOTPLUG_ENUMERATE, LIBUSB_HOTPLUG_MATCH_ANY,
- LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, ArrivedCallback, this,
- &arrived_callback_handle_);
-
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_hotplug_register_callback failed: " << libusb_ret);
- return TransportAdapter::FAIL;
- }
-
- libusb_ret = libusb_hotplug_register_callback(
- libusb_context_, LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT,
- static_cast<libusb_hotplug_flag>(0), LIBUSB_HOTPLUG_MATCH_ANY,
- LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, LeftCallback, this,
- &left_callback_handle_);
-
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_hotplug_register_callback failed: " << libusb_ret);
- return TransportAdapter::FAIL;
- }
-
- const int thread_start_error =
- pthread_create(&thread_, 0, &UsbHandlerThread, this);
- if (0 == thread_start_error) {
- LOG4CXX_INFO(logger_, "UsbHandler thread started");
- return TransportAdapter::OK;
- } else {
- LOG4CXX_ERROR(logger_, "USB device scanner thread start failed, error code "
- << thread_start_error);
- return TransportAdapter::FAIL;
- }
-}
-
-void UsbHandler::Thread() {
- int completed = 0;
- while (!shutdown_requested_) {
- libusb_handle_events_completed(libusb_context_, &completed);
-
- for (TransferSequences::iterator it = transfer_sequences_.begin();
- it != transfer_sequences_.end();) {
- ControlTransferSequenceState* sequence_state = *it;
- if (sequence_state->Finished()) {
- delete *it;
- it = transfer_sequences_.erase(it);
- } else {
- ++it;
- }
- }
-
- for (std::list<libusb_device_handle*>::iterator it =
- device_handles_to_close_.begin();
- it != device_handles_to_close_.end();
- it = device_handles_to_close_.erase(it)) {
- libusb_close(*it);
- }
- }
-}
-
-void UsbTransferSequenceCallback(libusb_transfer* transfer) {
- UsbHandler::ControlTransferSequenceState* sequence_state =
- static_cast<UsbHandler::ControlTransferSequenceState*>(transfer->user_data);
- sequence_state->usb_handler()->ControlTransferCallback(transfer);
-}
-
-void UsbHandler::SubmitControlTransfer(
- ControlTransferSequenceState* sequence_state) {
- UsbControlTransfer* transfer = sequence_state->CurrentTransfer();
- if (NULL == transfer) return;
-
- libusb_transfer* libusb_transfer = libusb_alloc_transfer(0);
- if (0 == libusb_transfer) {
- LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed");
- sequence_state->Finish();
- return;
- }
-
- assert(transfer->Type() == UsbControlTransfer::VENDOR);
- const libusb_request_type request_type = LIBUSB_REQUEST_TYPE_VENDOR;
-
- libusb_endpoint_direction endpoint_direction;
- if (transfer->Direction() == UsbControlTransfer::IN) {
- endpoint_direction = LIBUSB_ENDPOINT_IN;
- } else if (transfer->Direction() == UsbControlTransfer::OUT) {
- endpoint_direction = LIBUSB_ENDPOINT_OUT;
- } else {
- assert(0);
- }
- const uint8_t request = transfer->Request();
- const uint16_t value = transfer->Value();
- const uint16_t index = transfer->Index();
- const uint16_t length = transfer->Length();
-
- unsigned char* buffer =
- static_cast<unsigned char*>(malloc(length + LIBUSB_CONTROL_SETUP_SIZE));
- if (NULL == buffer) {
- LOG4CXX_ERROR(logger_, "buffer allocation failed");
- libusb_free_transfer(libusb_transfer);
- sequence_state->Finish();
- return;
- }
-
- libusb_fill_control_setup(buffer, request_type | endpoint_direction, request,
- value, index, length);
-
- if (0 != length && endpoint_direction == LIBUSB_ENDPOINT_OUT) {
- const char* data = static_cast<UsbControlOutTransfer*>(transfer)->Data();
- memcpy(buffer + LIBUSB_CONTROL_SETUP_SIZE, data, length);
- }
- libusb_fill_control_transfer(
- libusb_transfer, sequence_state->device()->GetLibusbHandle(), buffer,
- UsbTransferSequenceCallback, sequence_state, 0);
- libusb_transfer->flags = LIBUSB_TRANSFER_FREE_BUFFER;
-
- const int libusb_ret = libusb_submit_transfer(libusb_transfer);
- if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_, "libusb_submit_transfer failed: "
- << libusb_error_name(libusb_ret));
- libusb_free_transfer(libusb_transfer);
- sequence_state->Finish();
- }
-}
-
-void UsbHandler::ControlTransferCallback(libusb_transfer* transfer) {
- ControlTransferSequenceState* sequence_state =
- static_cast<ControlTransferSequenceState*>(transfer->user_data);
- if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
- LOG4CXX_INFO(logger_, "USB control transfer completed");
- UsbControlTransfer* current_transfer = sequence_state->CurrentTransfer();
- bool submit_next = true;
- if (current_transfer &&
- current_transfer->Direction() == UsbControlTransfer::IN) {
- submit_next =
- static_cast<UsbControlInTransfer*>(current_transfer)
- ->OnCompleted(libusb_control_transfer_get_data(transfer));
- }
-
- sequence_state->Next();
- if (submit_next && !sequence_state->Finished()) {
- SubmitControlTransfer(sequence_state);
- } else {
- sequence_state->Finish();
- }
- } else {
- LOG4CXX_ERROR(logger_, "USB control transfer failed: " << transfer->status);
- sequence_state->Finish();
- }
- libusb_free_transfer(transfer);
-}
-
-UsbHandler::ControlTransferSequenceState::ControlTransferSequenceState(
- UsbHandler* usb_handler, UsbControlTransferSequence* sequence,
- PlatformUsbDevice* device)
- : usb_handler_(usb_handler),
- device_(device),
- finished_(false),
- sequence_(sequence),
- current_transfer_(sequence->transfers().begin()) {}
-
-UsbHandler::ControlTransferSequenceState::~ControlTransferSequenceState() {
- delete sequence_;
-}
-
-UsbControlTransfer* UsbHandler::ControlTransferSequenceState::Next() {
- if (finished_) return NULL;
- if (++current_transfer_ == sequence_->transfers().end()) {
- Finish();
- return NULL;
- } else {
- return *current_transfer_;
- }
-}
-
-UsbControlTransfer* UsbHandler::ControlTransferSequenceState::CurrentTransfer() {
- return finished_ ? NULL : *current_transfer_;
-}
-
-void UsbHandler::ControlTransferSequenceState::Finish() { finished_ = true; }
-
-} // namespace
-} // namespace
diff --git a/SDL_Core/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc b/SDL_Core/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
deleted file mode 100644
index c17c2aab6..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * \file platform_usb_device.cc
- * \brief QNX PlatformUsbDevice class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/usb/qnx/platform_usb_device.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-PlatformUsbDevice::PlatformUsbDevice(
- usbd_device_instance_t* instance, usbd_device* device,
- const usbd_device_descriptor_t& device_descriptor)
- : bus_number_(instance->path),
- address_(instance->devno),
- vendor_id_(instance->ident.vendor),
- product_id_(instance->ident.device),
- device_descriptor_(device_descriptor),
- usbd_device_instance_(*instance),
- usbd_device_(device) {}
-
-std::string PlatformUsbDevice::GetDescString(uint8_t index) const {
- char* str = usbd_string(usbd_device_, index, 0);
- if (NULL == str) {
- LOG4CXX_INFO(logger_, "Failed to get USB string descriptor");
- return "";
- }
- return std::string(str);
-}
-
-std::string PlatformUsbDevice::GetManufacturer() const {
- return GetDescString(device_descriptor_.iManufacturer);
-}
-
-std::string PlatformUsbDevice::GetProductName() const {
- return GetDescString(device_descriptor_.iProduct);
-}
-
-std::string PlatformUsbDevice::GetSerialNumber() const {
- return GetDescString(device_descriptor_.iSerialNumber);
-}
-
-} // namespace
-} // namespace
diff --git a/SDL_Core/src/components/transport_manager/src/usb/qnx/usb_connection.cc b/SDL_Core/src/components/transport_manager/src/usb/qnx/usb_connection.cc
deleted file mode 100644
index dec5267ba..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/qnx/usb_connection.cc
+++ /dev/null
@@ -1,399 +0,0 @@
-/**
- * \file usb_connection.cc
- * \brief UsbConnection class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sched.h>
-#include <cstring>
-
-#include "transport_manager/usb/qnx/usb_connection.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-UsbConnection::UsbConnection(const DeviceUID& device_uid,
- const ApplicationHandle& app_handle,
- TransportAdapterController* controller,
- const UsbHandlerSptr& libusb_handler,
- PlatformUsbDevice* device)
- : device_uid_(device_uid),
- app_handle_(app_handle),
- controller_(controller),
- libusb_handler_(libusb_handler),
- usbd_device_(device->GetUsbdDevice()),
- in_pipe_(NULL),
- out_pipe_(NULL),
- in_buffer_(NULL),
- in_urb_(NULL),
- out_urb_(NULL),
- out_messages_(),
- current_out_message_(),
- out_messages_mutex_(),
- bytes_sent_(0),
- disconnecting_(false),
- pending_in_transfer_(false),
- pending_out_transfer_(false) {
- pthread_mutex_init(&out_messages_mutex_, 0);
-}
-
-UsbConnection::~UsbConnection() {
- Finalise();
- if (in_urb_) usbd_free_urb(in_urb_);
- if (out_urb_) usbd_free_urb(out_urb_);
-
- if (in_pipe_) {
- const int close_pipe_rc = usbd_close_pipe(in_pipe_);
- if (EOK != close_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Failed to close pipe: " << close_pipe_rc);
- }
- }
- if (out_pipe_) {
- const int close_pipe_rc = usbd_close_pipe(out_pipe_);
- if (EOK != close_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Failed to close pipe: " << close_pipe_rc);
- }
- }
-
- pthread_mutex_destroy(&out_messages_mutex_);
-}
-
-void InTransferCallback(usbd_urb* urb, usbd_pipe*, void* data) {
- static_cast<UsbConnection*>(data)->OnInTransfer(urb);
-}
-
-void OutTransferCallback(usbd_urb* urb, usbd_pipe*, void* data) {
- static_cast<UsbConnection*>(data)->OnOutTransfer(urb);
-}
-
-bool UsbConnection::PostInTransfer() {
- usbd_setup_bulk(in_urb_, URB_DIR_IN, in_buffer_, kInBufferSize);
- pending_in_transfer_ = true;
- const int io_rc =
- usbd_io(in_urb_, in_pipe_, InTransferCallback, this, USBD_TIME_INFINITY);
- if (EOK != io_rc) {
- pending_in_transfer_ = false;
- LOG4CXX_ERROR(logger_, "Failed to post in transfer: " << io_rc);
- return false;
- }
- return true;
-}
-
-void UsbConnection::OnInTransfer(usbd_urb* urb) {
- uint32_t status = 0;
- uint32_t len = 0;
- bool error = false;
- const int urb_status_rc = usbd_urb_status(urb, &status, &len);
- if (EOK != urb_status_rc && EIO != urb_status_rc) { // EIO is OK
- LOG4CXX_ERROR(logger_, "Get in urb status failed: " << urb_status_rc);
- error = true;
- }
- LOG4CXX_INFO(logger_, "USB in transfer, status " << std::hex << status
- << ", length " << std::dec
- << len);
-
- if (!error) {
- const uint32_t urb_status = status & USBD_URB_STATUS_MASK;
- switch (status) {
- case USBD_STATUS_CMP:
- case USBD_STATUS_CMP_ERR | USBD_STATUS_DATA_UNDERRUN:
- error = false;
- break;
- default:
- error = true;
- break;
- }
- }
-
- if (error) {
- LOG4CXX_ERROR(logger_, "USB in transfer failed");
- controller_->DataReceiveFailed(device_uid_, app_handle_,
- DataReceiveError());
- } else {
- RawMessageSptr msg(new protocol_handler::RawMessage(0, 0, in_buffer_, len));
- controller_->DataReceiveDone(device_uid_, app_handle_, msg);
- }
-
- pending_in_transfer_ = false;
- if (!disconnecting_) {
- if (!PostInTransfer()) {
- controller_->ConnectionAborted(device_uid_, app_handle_,
- CommunicationError());
- Disconnect();
- }
- }
-}
-
-void UsbConnection::PopOutMessage() {
- bytes_sent_ = 0;
- if (out_messages_.empty()) {
- current_out_message_.reset();
- } else {
- current_out_message_ = out_messages_.front();
- out_messages_.pop_front();
- }
-}
-
-bool UsbConnection::PostOutTransfer() {
- const int len = current_out_message_->data_size() - bytes_sent_;
- out_buffer_ = usbd_alloc(len);
- memmove(out_buffer_, current_out_message_->data() + bytes_sent_, len);
- usbd_setup_bulk(out_urb_, URB_DIR_OUT, out_buffer_, len);
- LOG4CXX_INFO(logger_, "out transfer :" << len);
- pending_out_transfer_ = true;
- const int io_rc = usbd_io(out_urb_, out_pipe_, OutTransferCallback, this,
- USBD_TIME_INFINITY);
- if (EOK != io_rc) {
- pending_out_transfer_ = false;
- usbd_free(out_buffer_);
- LOG4CXX_ERROR(logger_, "Failed to post out transfer: " << io_rc);
- return false;
- }
- return true;
-}
-
-void UsbConnection::OnOutTransfer(usbd_urb* urb) {
- usbd_free(out_buffer_);
- uint32_t status = 0;
- uint32_t len = 0;
- bool error = false;
- const int urb_status_rc = usbd_urb_status(urb, &status, &len);
- if (EOK != urb_status_rc && EIO != urb_status_rc) { // EIO is OK
- LOG4CXX_ERROR(logger_, "Get out urb status failed: " << urb_status_rc);
- error = true;
- }
- LOG4CXX_INFO(logger_, "USB out transfer, status " << std::hex << status
- << ", length " << std::dec
- << len);
-
- if (!error) {
- const uint32_t urb_status = status & USBD_URB_STATUS_MASK;
- switch (status) {
- case USBD_STATUS_CMP:
- case USBD_STATUS_CMP_ERR | USBD_STATUS_DATA_UNDERRUN:
- error = false;
- break;
- default:
- error = true;
- break;
- }
- }
-
- pthread_mutex_lock(&out_messages_mutex_);
-
- if (error) {
- LOG4CXX_ERROR(logger_, "USB out transfer failed");
- controller_->DataSendFailed(device_uid_, app_handle_, current_out_message_,
- DataSendError());
- PopOutMessage();
- } else {
- bytes_sent_ += len;
- if (bytes_sent_ == current_out_message_->data_size()) {
- LOG4CXX_INFO(logger_, "USB out transfer, data sent: "
- << current_out_message_.get());
- controller_->DataSendDone(device_uid_, app_handle_, current_out_message_);
- PopOutMessage();
- }
- }
-
- if ((!disconnecting_) && current_out_message_.valid()) {
- PostOutTransfer();
- } else {
- pending_out_transfer_ = false;
- }
- pthread_mutex_unlock(&out_messages_mutex_);
-}
-
-TransportAdapter::Error UsbConnection::SendData(RawMessageSptr message) {
- if (disconnecting_) {
- return TransportAdapter::BAD_STATE;
- }
- pthread_mutex_lock(&out_messages_mutex_);
- if (current_out_message_.valid()) {
- out_messages_.push_back(message);
- } else {
- current_out_message_ = message;
- if (!PostOutTransfer()) {
- controller_->DataSendFailed(device_uid_, app_handle_, message,
- DataSendError());
- }
- }
- pthread_mutex_unlock(&out_messages_mutex_);
- return TransportAdapter::OK;
-}
-
-void UsbConnection::Finalise() {
- LOG4CXX_INFO(logger_, "Finalising");
- pthread_mutex_lock(&out_messages_mutex_);
- disconnecting_ = true;
- usbd_abort_pipe(in_pipe_);
- usbd_abort_pipe(out_pipe_);
- for (std::list<RawMessageSptr>::iterator it = out_messages_.begin();
- it != out_messages_.end(); it = out_messages_.erase(it)) {
- controller_->DataSendFailed(device_uid_, app_handle_, *it, DataSendError());
- }
- pthread_mutex_unlock(&out_messages_mutex_);
- while (pending_in_transfer_ || pending_out_transfer_) sched_yield();
-}
-
-TransportAdapter::Error UsbConnection::Disconnect() {
- LOG4CXX_INFO(logger_, "Disconnecting");
- Finalise();
- controller_->DisconnectDone(device_uid_, app_handle_);
- return TransportAdapter::OK;
-}
-
-bool UsbConnection::Init() {
- if (!OpenEndpoints()) return false;
-
- in_urb_ = usbd_alloc_urb(NULL);
- out_urb_ = usbd_alloc_urb(NULL);
- if (NULL == in_urb_ || NULL == out_urb_) {
- LOG4CXX_ERROR(logger_, "usbd_alloc_urb failed");
- return false;
- }
-
- in_buffer_ = static_cast<unsigned char*>(usbd_alloc(kInBufferSize));
- if (NULL == in_buffer_) {
- LOG4CXX_ERROR(logger_, "usbd_alloc failed");
- return false;
- }
-
- controller_->ConnectDone(device_uid_, app_handle_);
-
- if (!PostInTransfer()) {
- controller_->ConnectionAborted(device_uid_, app_handle_,
- CommunicationError());
- return true;
- }
-
- return true;
-}
-
-bool UsbConnection::OpenEndpoints() {
- usbd_descriptors_t* in_endpoint_desc = NULL;
- usbd_descriptors_t* out_endpoint_desc = NULL;
-
- usbd_desc_node* device_desc_node = NULL;
- usbd_device_descriptor_t* device_desc =
- usbd_device_descriptor(usbd_device_, &device_desc_node);
- if (0 == device_desc) {
- LOG4CXX_ERROR(logger_, "Device descriptor not found");
- return false;
- }
- usbd_desc_node* cfg_desc_node = NULL;
- usbd_descriptors_t* config_desc = NULL;
- usbd_descriptors_t* iface_desc = NULL;
- int cfg = 0;
- bool found = false;
- while (!found) {
- config_desc =
- usbd_parse_descriptors(usbd_device_, device_desc_node,
- USB_DESC_CONFIGURATION, cfg++, &cfg_desc_node);
- if (config_desc == NULL) {
- break;
- }
- LOG4CXX_INFO(logger_, "USB configuration "
- << static_cast<int>(config_desc->configuration
- .bConfigurationValue));
- int iface = 0;
- usbd_desc_node* iface_desc_node;
- while (!found) {
- iface_desc =
- usbd_parse_descriptors(usbd_device_, cfg_desc_node,
- USB_DESC_INTERFACE, iface++, &iface_desc_node);
- if (iface_desc == NULL) {
- break;
- }
- const uint8_t interface_number = iface_desc->interface.bInterfaceNumber;
- const uint8_t interface_subclass =
- iface_desc->interface.bInterfaceSubClass;
- LOG4CXX_INFO(logger_, "USB interface number "
- << static_cast<int>(interface_number)
- << ", subclass " << std::hex
- << static_cast<int>(interface_subclass)
- << std::dec);
- if (interface_subclass != 0xff) {
- continue;
- }
- int endpoint = 0;
- in_endpoint_desc = NULL;
- out_endpoint_desc = NULL;
- while (true) {
- usbd_descriptors_t* endpoint_desc = usbd_parse_descriptors(
- usbd_device_, iface_desc_node, USB_DESC_ENDPOINT, endpoint++, NULL);
- if (NULL == endpoint_desc) break;
- const uint8_t attributes = endpoint_desc->endpoint.bmAttributes;
- if ((attributes & 0x03) == USB_ATTRIB_BULK) {
- const uint8_t endpoint_address =
- endpoint_desc->endpoint.bEndpointAddress;
- LOG4CXX_INFO(logger_, "Endpoint with address "
- << std::hex
- << static_cast<int>(endpoint_address)
- << std::dec << " found");
- if (endpoint_address & USB_ENDPOINT_IN) {
- if (NULL == in_endpoint_desc) {
- in_endpoint_desc = endpoint_desc;
- }
- } else {
- if (NULL == out_endpoint_desc) {
- out_endpoint_desc = endpoint_desc;
- }
- }
- }
- }
- if (in_endpoint_desc != NULL && out_endpoint_desc != NULL) {
- found = true;
- }
- }
- }
-
- if (!found) return false;
-
- int open_pipe_rc = usbd_open_pipe(usbd_device_, in_endpoint_desc, &in_pipe_);
- if (EOK != open_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Cannot open input pipe, error " << open_pipe_rc);
- return false;
- }
-
- open_pipe_rc = usbd_open_pipe(usbd_device_, out_endpoint_desc, &out_pipe_);
- if (EOK != open_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Cannot open output pipe, error " << open_pipe_rc);
- return false;
- }
-
- return true;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/usb/qnx/usb_handler.cc b/SDL_Core/src/components/transport_manager/src/usb/qnx/usb_handler.cc
deleted file mode 100644
index ccb9cd0d5..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/qnx/usb_handler.cc
+++ /dev/null
@@ -1,296 +0,0 @@
-/**
- * \file usb_handler.cc
- * \brief UsbHandler class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <cstring>
-#include <cstdlib>
-
-#include "transport_manager/usb/common.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-namespace {
-UsbHandler* usb_handler;
-}
-
-UsbHandler::UsbHandler()
- : usb_device_listeners_(),
- devices_(),
- usbd_general_connection_(NULL),
- usbd_aoa_connection_(NULL) {
- usb_handler = this;
-}
-
-UsbHandler::~UsbHandler() {
- usb_handler = NULL;
- if (usbd_general_connection_) {
- const int disconnect_rc = usbd_disconnect(usbd_general_connection_);
- if (EOK != disconnect_rc) {
- LOG4CXX_ERROR(logger_, "usbd_disconnect failed, error code "
- << disconnect_rc);
- }
- }
- if (usbd_aoa_connection_) {
- const int disconnect_rc = usbd_disconnect(usbd_aoa_connection_);
- if (EOK != disconnect_rc) {
- LOG4CXX_ERROR(logger_, "usbd_disconnect failed, error code "
- << disconnect_rc);
- }
- }
-}
-
-bool operator==(const usbd_device_instance_t& a,
- const usbd_device_instance_t& b) {
- return a.path == b.path && a.devno == b.devno;
-}
-
-void UsbHandler::DeviceArrived(usbd_connection* connection,
- usbd_device_instance_t* instance) {
- for (Devices::const_iterator it = devices_.begin(); it != devices_.end();
- ++it) {
- if ((*it)->GetDeviceInstance() == *instance) return;
- }
- usbd_device* device_usbd = 0;
- const int attach_rc = usbd_attach(connection, instance, 0, &device_usbd);
- if (EOK != attach_rc) {
- LOG4CXX_ERROR(logger_, "usbd_attach failed: " << attach_rc);
- return;
- }
-
- usbd_desc_node* node;
- usbd_device_descriptor_t* descriptor =
- usbd_device_descriptor(device_usbd, &node);
- if (NULL == descriptor) {
- LOG4CXX_ERROR(logger_, "usbd_device_descriptor failed");
- return;
- }
-
- PlatformUsbDevice* device(
- new PlatformUsbDevice(instance, device_usbd, *descriptor));
- devices_.push_back(device);
- for (std::list<UsbDeviceListener*>::iterator it =
- usb_device_listeners_.begin();
- it != usb_device_listeners_.end(); ++it) {
- (*it)->OnDeviceArrived(device);
- }
-}
-
-void UsbHandler::DeviceLeft(usbd_device_instance_t* instance) {
- PlatformUsbDevice* device = NULL;
- for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
- if (((*it)->GetDeviceInstance()) == *instance) {
- device = *it;
- break;
- }
- }
- if (NULL == device) {
- return;
- }
-
- for (std::list<UsbDeviceListener*>::iterator it =
- usb_device_listeners_.begin();
- it != usb_device_listeners_.end(); ++it) {
- (*it)->OnDeviceLeft(device);
- }
-
- for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
- if ((*it)->GetDeviceInstance() == *instance) {
- const int detach_rc = usbd_detach((*it)->GetUsbdDevice());
- if (EOK != detach_rc)
- LOG4CXX_ERROR(logger_, "usbd_detach failed: " << detach_rc);
- devices_.erase(it);
- break;
- }
- }
-
- delete device;
-}
-
-void UsbHandler::StartControlTransferSequence(
- UsbControlTransferSequence* sequence, PlatformUsbDevice* device) {
- usbd_descriptors_t* descriptor = usbd_parse_descriptors(
- device->GetUsbdDevice(), NULL, USB_DESC_DEVICE, 0, NULL);
- if (NULL == descriptor) {
- LOG4CXX_ERROR(logger_, "usbd_parse_descriptors failed");
- }
-
- usbd_pipe* usb_pipe = 0;
- const int open_pipe_rc =
- usbd_open_pipe(device->GetUsbdDevice(), descriptor, &usb_pipe);
- if (EOK != open_pipe_rc) {
- LOG4CXX_ERROR(logger_, "usbd_open_pipe failed, error " << open_pipe_rc);
- return;
- }
-
- for (UsbControlTransferSequence::Transfers::const_iterator it =
- sequence->transfers().begin();
- it != sequence->transfers().end(); ++it) {
- UsbControlTransfer* transfer = *it;
-
- usbd_urb* urb = usbd_alloc_urb(NULL);
- if (NULL == urb) {
- LOG4CXX_ERROR(logger_, "usbd_alloc_urb failed");
- break;
- }
-
- unsigned char* buf =
- static_cast<unsigned char*>(usbd_alloc(transfer->Length()));
- if (NULL == buf) {
- LOG4CXX_ERROR(logger_, "usbd_alloc failed");
- break;
- }
-
- uint32_t flags = 0;
- if (transfer->Direction() == UsbControlTransfer::IN) {
- flags = URB_DIR_IN;
- } else if (transfer->Direction() == UsbControlTransfer::OUT) {
- flags = URB_DIR_OUT;
- UsbControlOutTransfer* out_transfer =
- static_cast<UsbControlOutTransfer*>(transfer);
- std::copy(out_transfer->Data(),
- out_transfer->Data() + out_transfer->Length(), buf);
- } else {
- assert(0);
- }
-
- assert(transfer->Type() == UsbControlTransfer::VENDOR);
-
- usbd_setup_vendor(urb, flags, transfer->Request(), USB_TYPE_VENDOR,
- transfer->Value(), transfer->Index(), buf,
- transfer->Length());
- const int io_rc = usbd_io(urb, usb_pipe, 0, 0, USBD_TIME_DEFAULT);
-
- bool submit_next = true;
- if (io_rc == EOK) {
- if (transfer->Direction() == UsbControlTransfer::IN) {
- submit_next =
- static_cast<UsbControlInTransfer*>(transfer)->OnCompleted(buf);
- }
- } else {
- LOG4CXX_ERROR(logger_, "usbd_io failed, error " << io_rc);
- submit_next = false;
- }
- usbd_free(buf);
- usbd_free_urb(urb);
- if (!submit_next) break;
- }
- usbd_close_pipe(usb_pipe);
-
- delete sequence;
-}
-
-void ArrivedCallback(usbd_connection* connection,
- usbd_device_instance_t* instance) {
- if (kAoaVid == instance->ident.vendor) return;
- LOG4CXX_INFO(logger_, "USB device arrived (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
- usb_handler->DeviceArrived(connection, instance);
-}
-
-void ArrivedAoaCallback(usbd_connection* connection,
- usbd_device_instance_t* instance) {
- if (kAoaVid != instance->ident.vendor) return;
- LOG4CXX_INFO(logger_, "USB AOA device arrived (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
- usb_handler->DeviceArrived(connection, instance);
-}
-
-void LeftCallback(usbd_connection* connection,
- usbd_device_instance_t* instance) {
- if (kAoaVid == instance->ident.vendor) return;
- LOG4CXX_INFO(logger_, "USB device left (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
- usb_handler->DeviceLeft(instance);
-}
-
-void LeftAoaCallback(usbd_connection* connection,
- usbd_device_instance_t* instance) {
- if (kAoaVid != instance->ident.vendor) return;
- LOG4CXX_INFO(logger_, "USB AOA device left (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
- usb_handler->DeviceLeft(instance);
-}
-
-TransportAdapter::Error UsbHandler::Init() {
- {
- usbd_device_ident_t interest = {
- USBD_CONNECT_WILDCARD, USBD_CONNECT_WILDCARD, kAoaInterfaceSubclass,
- USBD_CONNECT_WILDCARD, USBD_CONNECT_WILDCARD};
- usbd_funcs_t funcs = {_USBDI_NFUNCS, ArrivedCallback, LeftCallback, NULL};
- usbd_connect_parm_t cparms = {NULL, USB_VERSION, USBD_VERSION, 0, 0,
- NULL, 0, &interest, &funcs};
-
- const int connect_rc = usbd_connect(&cparms, &usbd_general_connection_);
-
- if (EOK != connect_rc) {
- LOG4CXX_ERROR(logger_, "usbd_connect failed, error code " << connect_rc);
- return TransportAdapter::FAIL;
- }
- }
- {
- usbd_device_ident_t interest = {
- kAoaVid, USBD_CONNECT_WILDCARD, USBD_CONNECT_WILDCARD,
- kAoaInterfaceSubclass, USBD_CONNECT_WILDCARD};
- usbd_funcs_t funcs = {_USBDI_NFUNCS, ArrivedAoaCallback,
- LeftAoaCallback, NULL};
- usbd_connect_parm_t cparms = {NULL, USB_VERSION, USBD_VERSION, 0, 0,
- NULL, 0, &interest, &funcs};
-
- const int connect_rc = usbd_connect(&cparms, &usbd_aoa_connection_);
-
- if (EOK != connect_rc) {
- LOG4CXX_ERROR(logger_, "usbd_connect failed, error code " << connect_rc);
- return TransportAdapter::FAIL;
- }
- }
-
- return TransportAdapter::OK;
-}
-
-} // namespace
-} // namespace
diff --git a/SDL_Core/src/components/transport_manager/src/usb/usb_aoa_adapter.cc b/SDL_Core/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
deleted file mode 100644
index 88487bcc1..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * \file usb_aoa_adapter.cpp
- * \brief UsbAoaAdapter class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/usb/usb_aoa_adapter.h"
-#include "transport_manager/usb/usb_device_scanner.h"
-#include "transport_manager/usb/usb_connection_factory.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-UsbAoaAdapter::UsbAoaAdapter()
- : TransportAdapterImpl(new UsbDeviceScanner(this),
- new UsbConnectionFactory(this), 0),
- is_initialised_(false),
- usb_handler_(new UsbHandler()) {
- static_cast<UsbDeviceScanner*>(device_scanner_)->SetUsbHandler(usb_handler_);
- static_cast<UsbConnectionFactory*>(server_connection_factory_)
- ->SetUsbHandler(usb_handler_);
-}
-
-UsbAoaAdapter::~UsbAoaAdapter() {}
-
-DeviceType UsbAoaAdapter::GetDeviceType() const { return "sdl-usb-aoa"; }
-
-bool UsbAoaAdapter::IsInitialised() const {
- return is_initialised_ && TransportAdapterImpl::IsInitialised();
-}
-
-TransportAdapter::Error UsbAoaAdapter::Init() {
- TransportAdapter::Error error = usb_handler_->Init();
- if (error != TransportAdapter::OK) {
- return error;
- }
- error = TransportAdapterImpl::Init();
- if (error != TransportAdapter::OK) {
- return error;
- }
- is_initialised_ = true;
- return TransportAdapter::OK;
-}
-
-bool UsbAoaAdapter::ToBeAutoConnected(DeviceSptr device) const {
- return true;
-}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/usb/usb_connection_factory.cc b/SDL_Core/src/components/transport_manager/src/usb/usb_connection_factory.cc
deleted file mode 100644
index 4081ac40f..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/usb_connection_factory.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * \file usb_connection_factory.cc
- * \brief UsbConnectionFactory class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "transport_manager/usb/usb_connection_factory.h"
-#include "transport_manager/usb/usb_device.h"
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-
-#if defined(__QNX__) || defined(__QNXNTO__)
-#include "transport_manager/usb/qnx/usb_connection.h"
-#else
-#include "transport_manager/usb/libusb/usb_connection.h"
-#endif
-
-namespace transport_manager {
-namespace transport_adapter {
-
-UsbConnectionFactory::UsbConnectionFactory(
- TransportAdapterController* controller)
- : controller_(controller), usb_handler_() {}
-
-TransportAdapter::Error UsbConnectionFactory::Init() {
- return TransportAdapter::OK;
-}
-
-void UsbConnectionFactory::SetUsbHandler(const UsbHandlerSptr& usb_handler) {
- usb_handler_ = usb_handler;
-}
-
-TransportAdapter::Error UsbConnectionFactory::CreateConnection(
- const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- DeviceSptr device = controller_->FindDevice(device_uid);
- if (!device.valid()) {
- LOG4CXX_ERROR(logger_, "device " << device_uid << " not found");
- return TransportAdapter::BAD_PARAM;
- }
-
- UsbDevice* usb_device = static_cast<UsbDevice*>(device.get());
- UsbConnection* usb_connection =
- new UsbConnection(device_uid, app_handle, controller_, usb_handler_,
- usb_device->usb_device());
- ConnectionSptr connection(usb_connection);
-
- controller_->ConnectionCreated(connection, device_uid, app_handle);
- if (!usb_connection->Init()) {
- return TransportAdapter::FAIL;
- }
- LOG4CXX_INFO(logger_, "Usb connection initialised");
-
- return TransportAdapter::OK;
-}
-
-void UsbConnectionFactory::Terminate() {}
-
-bool UsbConnectionFactory::IsInitialised() const { return true; }
-
-UsbConnectionFactory::~UsbConnectionFactory() {}
-
-} // namespace transport_adapter
-} // namespace transport_manager
diff --git a/SDL_Core/src/components/transport_manager/src/usb/usb_device_scanner.cc b/SDL_Core/src/components/transport_manager/src/usb/usb_device_scanner.cc
deleted file mode 100644
index 78358d419..000000000
--- a/SDL_Core/src/components/transport_manager/src/usb/usb_device_scanner.cc
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * \file usb_device_scanner.cc
- * \brief UsbDeviceScanner class source file.
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sstream>
-
-#include "transport_manager/transport_adapter/transport_adapter_impl.h"
-#include "transport_manager/usb/usb_device_scanner.h"
-#include "transport_manager/usb/usb_device.h"
-#include "transport_manager/usb/common.h"
-
-namespace transport_manager {
-namespace transport_adapter {
-
-class AoaInitSequence : public UsbControlTransferSequence {
- public:
- AoaInitSequence();
- virtual ~AoaInitSequence() {}
-
- private:
- class AoaGetProtocolRequest;
- class AoaSendIdString;
- class AoaTurnIntoAccessoryMode;
-};
-
-bool IsGoogleAccessory(uint16_t vid, uint16_t pid) {
- return (vid == kAoaVid) && (pid == kAoaPid1 || pid == kAoaPid2);
-}
-
-void UsbDeviceScanner::OnDeviceArrived(PlatformUsbDevice* device) {
- if (IsGoogleAccessory(device->vendor_id(), device->product_id())) {
- GoogleAccessoryFound(device);
- } else {
- TurnIntoAccessoryMode(device);
- }
-}
-
-void UsbDeviceScanner::OnDeviceLeft(PlatformUsbDevice* device) {
- bool list_changed = false;
- pthread_mutex_lock(&devices_mutex_);
- for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
- if (device == *it) {
- devices_.erase(it);
- list_changed = true;
- break;
- }
- }
- pthread_mutex_unlock(&devices_mutex_);
- if (list_changed) UpdateList();
-}
-
-UsbDeviceScanner::UsbDeviceScanner(TransportAdapterController* controller)
- : controller_(controller) {
- pthread_mutex_init(&devices_mutex_, 0);
-}
-
-UsbDeviceScanner::~UsbDeviceScanner() {
- pthread_mutex_destroy(&devices_mutex_);
-}
-
-class AoaInitSequence::AoaGetProtocolRequest : public UsbControlInTransfer {
- virtual ~AoaGetProtocolRequest() {}
- virtual RequestType Type() const { return VENDOR; }
- virtual uint8_t Request() const { return 51; }
- virtual uint16_t Value() const { return 0; }
- virtual uint16_t Index() const { return 0; }
- virtual uint16_t Length() const { return 2; }
- virtual bool OnCompleted(unsigned char* data) const {
- const int protocol_version = data[1] << 8 | data[0];
- LOG4CXX_INFO(logger_, "AOA protocol version " << protocol_version);
- if (protocol_version == 0) {
- // AOA protocol not supported
- return false;
- }
- return true;
- }
-};
-
-class AoaInitSequence::AoaSendIdString : public UsbControlOutTransfer {
- public:
- AoaSendIdString(uint16_t index, const char* string, uint16_t length)
- : index_(index), string_(string), length_(length) {}
-
- private:
- virtual ~AoaSendIdString() {}
- virtual RequestType Type() const { return VENDOR; }
- virtual uint8_t Request() const { return 52; }
- virtual uint16_t Value() const { return 0; }
- virtual uint16_t Index() const { return index_; }
- virtual uint16_t Length() const { return length_; }
- virtual const char* Data() const { return string_; }
- uint16_t index_;
- const char* string_;
- uint16_t length_;
-};
-
-class AoaInitSequence::AoaTurnIntoAccessoryMode : public UsbControlOutTransfer {
- virtual ~AoaTurnIntoAccessoryMode() {}
- virtual RequestType Type() const { return VENDOR; }
- virtual uint8_t Request() const { return 53; }
- virtual uint16_t Value() const { return 0; }
- virtual uint16_t Index() const { return 0; }
- virtual uint16_t Length() const { return 0; }
- virtual const char* Data() const { return 0; }
-};
-
-static char manufacturer[] = "Ford";
-static char model_name[] = "HMI";
-static char description[] = "Human machine interface";
-static char version[] = "1.0";
-static char uri[] = "http://www.ford.com";
-static char serial_num[] = "N000000";
-
-AoaInitSequence::AoaInitSequence() : UsbControlTransferSequence() {
- AddTransfer(new AoaGetProtocolRequest);
- AddTransfer(new AoaSendIdString(0, manufacturer, sizeof(manufacturer)));
- AddTransfer(new AoaSendIdString(1, model_name, sizeof(model_name)));
- AddTransfer(new AoaSendIdString(2, description, sizeof(description)));
- AddTransfer(new AoaSendIdString(3, version, sizeof(version)));
- AddTransfer(new AoaSendIdString(4, uri, sizeof(uri)));
- AddTransfer(new AoaSendIdString(5, serial_num, sizeof(serial_num)));
- AddTransfer(new AoaTurnIntoAccessoryMode);
-}
-
-void UsbDeviceScanner::TurnIntoAccessoryMode(PlatformUsbDevice* device) {
- LOG4CXX_INFO(logger_, "USB device VID:" << device->vendor_id()
- << " PID:" << device->product_id()
- << " turning into accessory mode");
- GetUsbHandler()->StartControlTransferSequence(new AoaInitSequence, device);
-}
-
-void UsbDeviceScanner::GoogleAccessoryFound(PlatformUsbDevice* device) {
- LOG4CXX_INFO(logger_, "Google accessory found");
-
- pthread_mutex_lock(&devices_mutex_);
- devices_.push_back(device);
- pthread_mutex_unlock(&devices_mutex_);
- LOG4CXX_INFO(logger_, "Google accessory (bus number "
- << static_cast<int>(device->bus_number())
- << ", address "
- << static_cast<int>(device->address())
- << ") identified as: " << device->GetManufacturer()
- << ", " << device->GetProductName());
- UpdateList();
-}
-
-TransportAdapter::Error UsbDeviceScanner::Init() {
- return TransportAdapter::OK;
-}
-
-TransportAdapter::Error UsbDeviceScanner::Scan() {
- return TransportAdapter::OK;
-}
-
-void UsbDeviceScanner::UpdateList() {
- DeviceVector device_vector;
- pthread_mutex_lock(&devices_mutex_);
- for (Devices::const_iterator it = devices_.begin(); it != devices_.end();
- ++it) {
- const std::string device_name =
- (*it)->GetManufacturer() + " " + (*it)->GetProductName();
- std::ostringstream oss;
- oss << (*it)->GetManufacturer() << ":" << (*it)->GetProductName() << ":"
- << (*it)->GetSerialNumber() << ":"
- << static_cast<int>((*it)->bus_number()) << ":"
- << static_cast<int>((*it)->address());
- const DeviceUID device_uid = oss.str();
- DeviceSptr device(new UsbDevice(*it, device_name, device_uid));
- device_vector.push_back(device);
- }
- pthread_mutex_unlock(&devices_mutex_);
-
- LOG4CXX_INFO(logger_, "USB search done " << device_vector.size());
- controller_->SearchDeviceDone(device_vector);
-}
-
-void UsbDeviceScanner::Terminate() {}
-
-bool UsbDeviceScanner::IsInitialised() const { return true; }
-
-} // namespace
-} // namespace
diff --git a/SDL_Core/src/components/utils/CMakeLists.txt b/SDL_Core/src/components/utils/CMakeLists.txt
deleted file mode 100644
index 726e6ad45..000000000
--- a/SDL_Core/src/components/utils/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-include_directories (
- ./include
- ../config_profile/include
- ../media_manager/include/
- ../protocol_handler/include/
-)
-
-set (SOURCES
- ./src/bitstream.cc
- ./src/conditional_variable_posix.cc
- ./src/file_system.cc
- ./src/threads/posix_thread.cc
- ./src/threads/thread_manager.cc
- ./src/threads/thread_validator.cc
- ./src/lock_posix.cc
- ./src/date_time.cc
- ./src/signals_linux.cc
-)
-
-if (BUILD_BACKTRACE_SUPPORT)
- list(APPEND SOURCES
- ./src/back_trace.cc
- )
-endif()
-
-add_library("Utils" ${SOURCES})
-
-IF(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
- target_link_libraries ("Utils" log4cxx apr-1 aprutil-1)
-ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- target_link_libraries ("Utils" log4cxx apr-1 aprutil-1 rt)
-ELSE()
- target_link_libraries ("Utils" log4cxx apr-1 aprutil-1)
-endif()
diff --git a/SDL_Core/src/components/utils/include/utils/atomic.h b/SDL_Core/src/components/utils/include/utils/atomic.h
deleted file mode 100644
index bf5b4baf8..000000000
--- a/SDL_Core/src/components/utils/include/utils/atomic.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifdef __QNXNTO__
-#include <atomic.h>
-#endif
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_ATOMIC_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_ATOMIC_H_
-
-#if defined(__QNXNTO__)
-#define atomic_post_inc(ptr) atomic_add_value((ptr), 1)
-#elif defined(__GNUG__)
-#define atomic_post_inc(ptr) __sync_fetch_and_add((ptr), 1)
-#else
-#warning "atomic_post_inc() implementation is not atomic"
-#define atomic_post_inc(ptr) (*(ptr))++
-#endif
-
-#if defined(__QNXNTO__)
-#define atomic_post_dec(ptr) atomic_sub_value((ptr), 1)
-#elif defined(__GNUG__)
-#define atomic_post_dec(ptr) __sync_fetch_and_sub((ptr), 1)
-#else
-#warning "atomic_post_dec() implementation is not atomic"
-#define atomic_post_dec(ptr) (*(ptr))--
-#endif
-
-#if defined(_QNXNTO__)
-// on QNX pointer assignment is believed to be atomic
-#define atomic_pointer_assign(dst, src) (dst) = (src)
-#elif defined(__GNUG__)
-// with g++ pointer assignment is believed to be atomic
-#define atomic_pointer_assign(dst, src) (dst) = (src)
-#else
-#warning atomic_pointer_assign() implementation may be non-atomic
-#define atomic_pointer_assign(dst, src) (dst) = (src)
-#endif
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_ATOMIC_H_
diff --git a/SDL_Core/src/components/utils/include/utils/back_trace.h b/SDL_Core/src/components/utils/include/utils/back_trace.h
deleted file mode 100644
index 7f8912faf..000000000
--- a/SDL_Core/src/components/utils/include/utils/back_trace.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BACK_TRACE_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BACK_TRACE_H_
-
-#include <ostream>
-#include <vector>
-#include <string>
-#include "utils/threads/thread.h"
-
-namespace utils {
-
-/*
- * Class that captures stack trace in place where it was created.
- * Can be stored and passed for further processing
- * ostream output operator is available for these objects so stacktrace
- * here and now can be easily printed as
- *
- * std::cout<<utils::Backtrace()<<std::endl;
- */
-class Backtrace {
- public:
- // Inspect stack up to 128 calls back
- static const int32_t kDefaultDepth = 128;
- static const int32_t kSkipTop = 0;
- /* Capture backtrace and store. Limit captured stack length to
- * count symbols and remove first skip_top elements from it
- * (to avoid polluting stack trace with debugging function names)
- */
- Backtrace(int32_t count = kDefaultDepth, int32_t skip_top = kSkipTop);
- ~Backtrace();
-
- // Captured symbols in order from topmost stack frame to last captured
- std::vector<std::string> CallStack() const;
- threads::Thread::Id ThreadId() const;
-
- private:
- threads::Thread::Id thread_id_;
- std::vector<void*> backtrace_;
-};
-
-std::ostream& operator<< (std::ostream& os, const Backtrace& bt);
-
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BACK_TRACE_H_
diff --git a/SDL_Core/src/components/utils/include/utils/bitstream.h b/SDL_Core/src/components/utils/include/utils/bitstream.h
deleted file mode 100644
index cba15abd8..000000000
--- a/SDL_Core/src/components/utils/include/utils/bitstream.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BITSTREAM_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BITSTREAM_H_
-
-#include "stdint.h"
-
-#include <climits>
-#include <cstring>
-#include <string>
-#include <vector>
-
-#include "utils/macro.h"
-
-namespace utils {
-
-// Big endian input bitstream class
-// Tool to read and parse incoming data in a recursive way
-// Has sublte similarity to standard stream classes in a way
-// it handles stream parsing errors:
-// If error while parsing stream occurs, whole stream is marked as
-// "bad" and all subsequent parsing is stopped.
-class BitStream {
- public:
- BitStream(uint8_t* bytes, size_t bytes_count);
- ~BitStream();
-
- // Mark stream as badly-formed.
- // Should be called by Extract* family of procedures if they decide
- // that stream is invalid
- void MarkBad() { bad_ = true; }
- // Predicates to check whether there were errors while parsing
- // Stream is good when it is created
- bool IsGood() { return !bad_; }
- bool IsBad() { return bad_; }
- operator bool() { return IsGood(); }
- private:
- // These two functions are used for internal stream checks only
- // Stream parser procedures must not define their logic depending on
- // amount of data left in particular bit stream
-
- // Amount of full bytes left in stream
- size_t FullBytesLeft();
- // Amount of total bits left in stream
- size_t BitsLeft();
-
- // These stream extractors are helpers for direct friend extractors
- // of this class.
-
- // Extract single value, amount of bits read from stream depends on T size
- // If there is not enough data in the stream, stream is marked bad
- template<typename T>
- void Extract(T& val);
-
- // Read single value, amount of bits read from stream is signaled by |bits|
- // parameter. T must be wide enough to hold this amount of bits.
- // If there is not enough data in the stream, stream is marked bad
- template<typename T>
- void ExtractBits(T& val, size_t bits);
-
- // Extract |length| bytes from the stream. Stream read position
- // must be byte aligned when it is called, stream is marked bad otherwise.
- // If there is not enough data in the stream, it is marked bad.
- void ExtractBytes(void* buffer, size_t length);
-
- private:
- const uint8_t* bytes_;
- const size_t bytes_count_;
- size_t byte_offset_;
- size_t bit_offset_;
- bool bad_;
- private:
- friend void Extract(BitStream*, uint8_t*);
- friend void Extract(BitStream*, uint8_t*, size_t);
- friend void Extract(BitStream*, uint32_t*);
- friend void Extract(BitStream*, uint32_t*, size_t);
- friend void Extract(BitStream*, std::string*, size_t);
- friend void Extract(BitStream*, std::vector<uint8_t>*, size_t);
-
-};
-
-// Extract single byte from stream
-// If there is not enough data in the stream it is marked bad.
-void Extract(BitStream* bs, uint8_t* val);
-
-// Extract defined amount of |bits| from stream and store them
-// in a byte size |val|. Hence |bits| must be less than 8.
-void Extract(BitStream* bs, uint8_t* val, size_t bits);
-
-// Extract 32 bit word from stream.
-// If there is not enough data in the stream it is marked bad.
-void Extract(BitStream* bs, uint32_t* val);
-
-// Extract up to 32 |bits| from stream and store them in a |val|
-// If there is not enough data in the stream it is marked bad.
-void Extract(BitStream* bs, uint32_t* val, size_t bits);
-
-// Extract |length| bytes from stream and store them to the
-// string |str|. If stream is too short it is marked bad.
-// String must not contain zero bytes.
-void Extract(BitStream* bs, std::string* str, size_t length);
-
-// Extract |length| bytes from stream and store them to the
-// vector |data|. If stream is too short it is marked bad.
-void Extract(BitStream* bs, std::vector<uint8_t>* data, size_t length);
-
-
-// Template member definitions
-template<typename T>
-void BitStream::Extract(T& val) {
- // Slow but simple implementation
- // It's a space for bit stream reading optimization
- ExtractBits(val, sizeof(val) * CHAR_BIT);
-}
-
-template<typename T>
-void BitStream::ExtractBits(T& val, size_t bits) {
- DCHECK(sizeof(val) * CHAR_BIT >= bits);
- if (IsGood()) {
- if (bits > BitsLeft()) {
- MarkBad();
- return;
- }
- val = T(); // Clear value
- for (size_t i = 0; i < bits; ++i) {
- size_t next_bit_number = CHAR_BIT - 1 - bit_offset_;
- uint8_t nextbit = (bytes_[byte_offset_] >> next_bit_number) & 1;
- val = (val << 1) | nextbit;
- ++bit_offset_;
- if (bit_offset_ == CHAR_BIT) {
- ++byte_offset_;
- bit_offset_ = 0;
- }
- }
- }
-}
-
-} // namespace utils
-
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_BITSTREAM_H_
diff --git a/SDL_Core/src/components/utils/include/utils/conditional_variable.h b/SDL_Core/src/components/utils/include/utils/conditional_variable.h
deleted file mode 100644
index 433f8d7c0..000000000
--- a/SDL_Core/src/components/utils/include/utils/conditional_variable.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_CONDITIONAL_VARIABLE_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_CONDITIONAL_VARIABLE_H_
-
-#if defined(OS_POSIX)
-#include <pthread.h>
-#else
-#error Please implement conditional variable for your OS
-#endif
-#include <stdint.h>
-
-#include "utils/macro.h"
-
-namespace sync_primitives {
-class AutoLock;
-
-namespace impl {
-#if defined(OS_POSIX)
-typedef pthread_cond_t PlatformConditionalVariable;
-#endif
-} // namespace impl
-
-/*
- * Conditional variable wrapper
- * Conditional variable is a thing that can be waited on
- * Wait is finished when other thread puts that thing in a signaled state
- * (or when timeout is over).
- * Data that is conditionally accessed should be protected by
- * a Lock and that lock must be taken before starting to Wait.
- * When wait is performed, Lock is temporarly released.
- * When wait is finished, Lock is captured back.
- * WARNING: Beware of Spurious wakeups
- * http://en.wikipedia.org/wiki/Spurious_wakeup
- * Thread can wake up from wait spuriously, without conditional
- * variable being actually set by other thread. This means
- * additional check should be made right after thread awakening
- * and if check fails thread should continue waiting.
- *
- * while(!DataReady()) cond_var.Wait(auto_lock);
- *
- */
-class ConditionalVariable {
- public:
- enum WaitStatus { kNoTimeout, kTimeout };
- ConditionalVariable();
- ~ConditionalVariable();
- // Wakes up single thread that is waiting on this conditional variable
- void NotifyOne();
- // Wakes up all waiting threads
- void Broadcast();
-
- // Wait forever or up to milliseconds time limit
- void Wait(AutoLock& auto_lock);
- WaitStatus WaitFor(AutoLock& auto_lock, int32_t milliseconds );
- private:
- impl::PlatformConditionalVariable cond_var_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ConditionalVariable);
-};
-
-} // namespace sync_primitives
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_CONDITIONAL_VARIABLE_H_
diff --git a/SDL_Core/src/components/utils/include/utils/date_time.h b/SDL_Core/src/components/utils/include/utils/date_time.h
deleted file mode 100644
index df2d067ac..000000000
--- a/SDL_Core/src/components/utils/include/utils/date_time.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
-* \file request_watchdog.h
-* \brief DateTime class header file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_DATE_TIME_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_DATE_TIME_H_
-
-#if defined(OS_POSIX)
-#include <sys/time.h>
-typedef struct timeval TimevalStruct;
-#endif
-
-namespace date_time {
-
-class DateTime {
- public:
- static const int32_t MILLISECONDS_IN_SECOND = 1000;
- static const int32_t MICROSECONDS_IN_MILLISECONDS = 1000;
-
- static TimevalStruct getCurrentTime();
- static int32_t calculateTimeSpan(TimevalStruct sinceTime);
-};
-
-} // namespace date_time
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_DATE_TIME_H_
diff --git a/SDL_Core/src/components/utils/include/utils/dict.h b/SDL_Core/src/components/utils/include/utils/dict.h
deleted file mode 100644
index bb60390d1..000000000
--- a/SDL_Core/src/components/utils/include/utils/dict.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_H_
-
-#include <map>
-
-namespace utils {
-
-template<typename Key, typename Record>
-class Dictionary {
- private:
- typedef std::map<Key, Record> ItemContainer;
- typedef std::map<Key, Dictionary> SubitemContainer;
-
- public:
-/**
- * @brief Typedef for subitems iterator
- */
- typedef typename SubitemContainer::iterator iterator;
-/**
- * @brief Typedef for subitems const iterator
- */
- typedef typename SubitemContainer::const_iterator const_iterator;
-
-/**
- * @brief Typedef for items iterator
- */
- typedef typename ItemContainer::iterator rec_iterator;
-/**
- * @brief Typedef for items const iterator
- */
- typedef typename ItemContainer::const_iterator rec_const_iterator;
-
-/**
- * @brief add an item to the dictionary
- * @param key - item key
- * @param record - item value
- */
- void AddItem(const Key& key, const Record& record);
-/**
- * @brief add a subitem to the dictionary
- * @param key - subitem key
- * @param subitem - subitem dictionary
- */
- void AddSubitem(const Key& key, const Dictionary& subitem);
-/**
- * @brief item under specified key
- * @param key - item key
- * @return item with specified key of default-constructed item
- */
- Record& ItemAt(const Key& key);
-/**
- * @brief item under specified key
- * @param key - item key
- * @return item with specified key of default-constructed item
- */
- const Record& ItemAt(const Key& key) const;
-/**
- * @brief subitem under specified key
- * @param key - subitem key
- * @return subitem with specified key of default-constructed dictionary
- */
- Dictionary& SubitemAt(const Key& key);
-/**
- * @brief subitem under specified key
- * @param key - subitem key
- * @return subitem with specified key of default-constructed dictionary
- */
- const Dictionary& SubitemAt(const Key& key) const;
-/**
- * @brief first subitem
- * @return iterator pointing to the first subitem
- */
- iterator begin();
-
-/**
- * @brief first subitem
- * @return const iterator pointing to the first subitem
- */
- const_iterator begin() const;
-
-/**
- * @brief first item
- * @return iterator pointing to the first item
- */
- rec_iterator rec_begin();
-
-/**
- * @brief first item
- * @return iterator pointing to the first item
- */
- rec_const_iterator rec_begin() const;
-
-/**
- * @brief end of subitem list
- * @return iterator pointing to the end of subitem list
- */
- iterator end();
-/**
- * @brief end of subitem list
- * @return const iterator pointing to the end of subitem list
- */
- const_iterator end() const;
-
- /**
- * @brief end of item list
- * @return iterator pointing to the end of item list
- */
- rec_iterator rec_end();
-
- /**
- * @brief end of item list
- * @return const iterator pointing to the end of item list
- */
- rec_const_iterator rec_end() const;
-
-private:
- ItemContainer items_;
- SubitemContainer subitems_;
-};
-
-template<typename Key, typename Record>
-void Dictionary<Key, Record>::AddItem(const Key& key, const Record& record) {
- items_.insert(std::make_pair(key, record));
-}
-
-template<typename Key, typename Record>
-void Dictionary<Key, Record>::AddSubitem(const Key& key, const Dictionary& subitem) {
- subitems_.insert(std::make_pair(key, subitem));
-}
-
-template<typename Key, typename Record>
-Record& Dictionary<Key, Record>::ItemAt(const Key& key) {
- return items_.at(key);
-}
-
-template<typename Key, typename Record>
-const Record& Dictionary<Key, Record>::ItemAt(const Key& key) const {
- return items_.at(key);
-}
-
-template<typename Key, typename Record>
-Dictionary<Key, Record>& Dictionary<Key, Record>::SubitemAt(const Key& key) {
- return subitems_.at(key);
-}
-
-template<typename Key, typename Record>
-const Dictionary<Key, Record>& Dictionary<Key, Record>::SubitemAt(const Key& key) const {
- return subitems_.at(key);
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::iterator Dictionary<Key, Record>::begin() {
- return subitems_.begin();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::const_iterator Dictionary<Key, Record>::begin() const {
- return subitems_.begin();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::rec_iterator Dictionary<Key, Record>::rec_begin() {
- return items_.begin();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::rec_const_iterator Dictionary<Key, Record>::rec_begin() const {
- return items_.begin();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::iterator Dictionary<Key, Record>::end() {
- return subitems_.end();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::const_iterator Dictionary<Key, Record>::end() const {
- return subitems_.end();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::rec_iterator Dictionary<Key, Record>::rec_end() {
- return items_.end();
-}
-
-template<typename Key, typename Record>
-typename Dictionary<Key, Record>::rec_const_iterator Dictionary<Key, Record>::rec_end() const {
- return items_.end();
-}
-
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_H_
diff --git a/SDL_Core/src/components/utils/include/utils/file_system.h b/SDL_Core/src/components/utils/include/utils/file_system.h
deleted file mode 100644
index c40c15f39..000000000
--- a/SDL_Core/src/components/utils/include/utils/file_system.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_
-
-#include <string.h>
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include <iostream>
-#include "utils/logger.h"
-
-namespace file_system {
-
-
-/**
- * @brief Get available disc space.
- *
- * @return free disc space.
- */
-uint64_t GetAvailableDiskSpace();
-
-/*
- * @brief Get size of current directory
- *
- * @param path to directory
- */
-uint32_t DirectorySize(const std::string& path);
-
-/*
- * @brief Get size of current file
- *
- * @param path to file
- * @return size of file, return 0 if file not exist
- */
-uint32_t FileSize(const std::string& path);
-
-
-/**
- * @brief Get available app space
- * @param name of app
- * @return free app space.
- */
-uint32_t GetAvailableSpaceForApp(const std::string& name);
-
-/**
- * @brief Creates directory
- * @param name path to directory
- * @return path to created directory.
- */
-std::string CreateDirectory(const std::string& name);
-
-/**
- * @brief Checks the file to see whether the file is a directory
- * @param name path to file
- * @return returns true if file is directory.
- */
-bool IsDirectory(const std::string& name);
-
-/**
- * @brief Is directory exist
- * @param name path to directory
- * @return returns true if directory is exists.
- */
-bool DirectoryExists(const std::string& name);
-
-/**
- * @brief Is file exist
- * @param name path to file
- * @return returns true if file is exists.
- */
-bool FileExists(const std::string& name);
-
-/**
- * @brief Writes to file
- *
- * @remark - create file if it doesn't exist
- * @param name path to file
- * @param data data to write
- * @return returns true if the operation is successfully.
- */
-bool Write(const std::string& file_name,
- const std::vector<uint8_t>& data,
- std::ios_base::openmode mode = std::ios_base::out);
-
-/**
- * @brief Opens file stream for writing
- * @param file_name path to file to write data to
- * @return returns pointer to opened stream in case of success;
- * otherwise returns NULL
- */
-std::ofstream* Open(const std::string& file_name,
- std::ios_base::openmode mode = std::ios_base::out);
-
-/**
- * @brief Writes to file stream
- * @param file_stream file stream to be written to
- * @param data data to be written to file
- * @param data_size size of data to be written to file
- * @return returns true if the operation is successfully.
- */
-bool Write(std::ofstream* const file_stream,
- const uint8_t* data,
- uint32_t data_size);
-
-/**
- * @brief Closes file stream
- * @param file_stream file stream to be closed
- */
-void Close(std::ofstream* file_stream);
-
-/**
- * @brief Returns full file path
- *
- * @param name file name
- * @return returns full file path.
- */
-std::string FullPath(const std::string& name);
-
-/**
- * @brief Removes file
- *
- * @param name path to file
- * @return returns true if the file is successfully deleted.
- */
-bool DeleteFile(const std::string& name);
-
-/**
- * @brief Removes directory.
- *
- * @param name path to directory.
- * @param is_recursively true if you need delete directory recursively, otherwise false.
- * @return returns true if the directory is successfully deleted.
- */
-bool RemoveDirectory(const std::string& directory_name,
- bool is_recursively = true);
-
-/**
- * @brief Check access rights
- *
- * @param name path to file.
- * @param how Read/write attribute.
- * @return returns true if file has the given mode.
- */
-bool IsAccessible(const std::string& name, int32_t how);
-
-/**
- * @brief Lists all files in given directory
- *
- * @param name path to directory.
- * @return returns list of files.
- */
-std::vector<std::string> ListFiles(const std::string& directory_name);
-
-/**
- * @brief Reads from file
- *
- * @param name path to file
- * @param result read data
- * @return returns true if the operation is successfully.
- */
-bool ReadBinaryFile(const std::string& name,
- std::vector<uint8_t>& result);
-
-bool ReadFile(const std::string& name, std::string& result);
-
-/**
- * @brief Convert special symbols in system path to percent-encoded
- *
- * @param name path to file
- * @return returns converted path.
-*/
-const std::string ConvertPathForURL(const std::string& path);
-
-} // namespace file_system
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_
diff --git a/SDL_Core/src/components/utils/include/utils/lock.h b/SDL_Core/src/components/utils/include/utils/lock.h
deleted file mode 100644
index 2aaddbbc6..000000000
--- a/SDL_Core/src/components/utils/include/utils/lock.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOCK_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOCK_H_
-
-#if defined(OS_POSIX)
-#include <pthread.h>
-#else
-#error Please implement lock for your OS
-#endif
-
-#include "utils/macro.h"
-
-namespace sync_primitives {
-
-namespace impl {
-#if defined(OS_POSIX)
-typedef pthread_mutex_t PlatformMutex;
-#endif
-} // namespace impl
-
-/* Platform-indepenednt NON-RECURSIVE lock (mutex) wrapper
- Please use AutoLock to ackquire and (automatically) release it
- It eases balancing of multple lock taking/releasing and makes it
- Impossible to forget to release the lock:
- ...
- ConcurentlyAccessedData data_;
- sync_primitives::Lock data_lock_;
- ...
- {
- sync_primitives::AutoLock auto_lock(data_lock_);
- data_.ReadOrWriteData();
- } // lock is automatically released here
-*/
-class Lock {
- public:
- Lock();
- ~Lock();
-
- // Ackquire the lock. Must be called only once on a thread.
- // Please consider using AutoLock to capture it.
- void Ackquire();
- // Release the lock. Must be called only once on a thread after lock.
- // was acquired. Please consider using AutoLock to automatically release
- // the lock
- void Release();
- // Try if lock can be captured and lock it if it was possible.
- // If it captured, lock must be manually released calling to Release
- // when protected resource access was finished.
- // @returns wether lock was captured.
- bool Try();
-
- private:
- impl::PlatformMutex mutex_;
-
-#ifndef NDEBUG
- // Basic debugging aid, a flag that signals wether this lock is currently taken
- // Allows detection of abandoned and recursively captured mutexes
- bool lock_taken_;
- void AssertFreeAndMarkTaken();
- void AssertTakenAndMarkFree();
-#else
- void AssertFreeAndMarkTaken() {}
- void AssertTakenAndMarkFree() {}
-#endif
-
- private:
- friend class ConditionalVariable;
- DISALLOW_COPY_AND_ASSIGN(Lock);
-};
-
-// This class is used to automatically acquire and release the a lock
-class AutoLock {
- public:
- explicit AutoLock(Lock& lock)
- : lock_(lock) { lock_.Ackquire(); }
- ~AutoLock() { lock_.Release(); }
- private:
- Lock& GetLock(){ return lock_; }
- Lock& lock_;
-
- private:
- friend class AutoUnlock;
- friend class ConditionalVariable;
- DISALLOW_COPY_AND_ASSIGN(AutoLock);
-};
-
-// This class is used to temporarly unlock autolocked lock
-class AutoUnlock {
- public:
- explicit AutoUnlock(AutoLock& lock)
- : lock_(lock.GetLock()) { lock_.Release(); }
- ~AutoUnlock() { lock_.Ackquire(); }
- private:
- Lock& lock_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
-};
-
-} // sync_primitives
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOCK_H_
diff --git a/SDL_Core/src/components/utils/include/utils/logger.h b/SDL_Core/src/components/utils/include/utils/logger.h
deleted file mode 100644
index a88c6aa16..000000000
--- a/SDL_Core/src/components/utils/include/utils/logger.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * \file LOG4CXXLogger.hpp
- * \brief Definitions required by logger.
- * Stores device information
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LOG4CXXLOGGER_HPP_
- #include <errno.h>
- #include <string.h>
- #include <log4cxx/logger.h>
- #include <log4cxx/propertyconfigurator.h>
-
-namespace log4cxx
-{
- #define LOG4CXX_INFO_EXT(logger, logEvent) LOG4CXX_INFO(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
- #define LOG4CXX_INFO_STR_EXT(logger, logEvent) LOG4CXX_INFO_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
-
- #define LOG4CXX_TRACE_EXT(logger, logEvent) LOG4CXX_TRACE(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
- #define LOG4CXX_TRACE_STR_EXT(logger, logEvent) LOG4CXX_TRACE_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
-
- #define LOG4CXX_DEBUG_EXT(logger, logEvent) LOG4CXX_DEBUG(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
- #define LOG4CXX_DEBUG_STR_EXT(logger, logEvent) LOG4CXX_DEBUG_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
-
- #define LOG4CXX_WARN_EXT(logger, logEvent) LOG4CXX_WARN(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
- #define LOG4CXX_WARN_STR_EXT(logger, logEvent) LOG4CXX_WARN_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
-
- #define LOG4CXX_ERROR_EXT(logger, logEvent) LOG4CXX_ERROR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
- #define LOG4CXX_ERROR_STR_EXT(logger, logEvent) LOG4CXX_ERROR_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
-
- #define LOG4CXX_FATAL_EXT(logger, logEvent) LOG4CXX_FATAL(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
- #define LOG4CXX_FATAL_STR_EXT(logger, logEvent) LOG4CXX_FATAL_STR(logger, __PRETTY_FUNCTION__ << ": " << logEvent)
-
- #define LOG4CXX_TRACE_ENTER(logger) LOG4CXX_TRACE(logger, "ENTER: " << __PRETTY_FUNCTION__ )
- #define LOG4CXX_TRACE_EXIT(logger) LOG4CXX_TRACE(logger, "EXIT: " << __PRETTY_FUNCTION__ )
-
- #define LOG4CXX_ERROR_WITH_ERRNO(logger, message) LOG4CXX_ERROR(logger, message << ", error code " << errno << " (" << strerror(errno) << ")")
-}
-
-#define LOG4CXXLOGGER_HPP_
-
-
-#endif /* LOG4CXXLOGGER_HPP_ */
diff --git a/SDL_Core/src/components/utils/include/utils/macro.h b/SDL_Core/src/components/utils/include/utils/macro.h
deleted file mode 100644
index 738f5f4eb..000000000
--- a/SDL_Core/src/components/utils/include/utils/macro.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MACRO_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MACRO_H_
-
-#include <assert.h>
-#include <stdio.h>
-
-// A macro to disallow the copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
-// A macro to allow utils::Singleton call derivative constructor and destructor
-#define FRIEND_BASE_SINGLETON_CLASS(TypeName) \
- friend class utils::Singleton<TypeName>
-
-// A macro to allow utils::deleters::Deleter::~Deleter() call class destructor
-#define FRIEND_DELETER_DESTRUCTOR(TypeName) \
- friend utils::deleters::Deleter<TypeName>::~Deleter()
-
-#define DCHECK(condition) \
- if (!(condition)) { \
- printf("\nDCHECK [%s:%d][%s]", __FILE__, __LINE__, __FUNCTION__); \
- printf("[Check failed: " #condition); \
- printf("]\n\n"); \
- assert(false); \
- }
-
-#define NOTREACHED() DCHECK(false)
-
-// Allows to perform static check that virtual function from base class is
-// actually being overriden if compiler support is available
-#if __cplusplus >= 201103L
-#define OVERRIDE override
-#else
-#define OVERRIDE
-#endif
-
-/*
-* @brief Calculate size of na array
-* @param arr array, which size need to calculate
-*/
-#define ARRAYSIZE(arr) sizeof (arr) / sizeof(*arr)
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MACRO_H_
diff --git a/SDL_Core/src/components/utils/include/utils/memory_barrier.h b/SDL_Core/src/components/utils/include/utils/memory_barrier.h
deleted file mode 100644
index 9ac935a21..000000000
--- a/SDL_Core/src/components/utils/include/utils/memory_barrier.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MEMORY_BARRIER_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MEMORY_BARRIER_H_
-
-#ifdef __QNXNTO__
-#include <sys/cpuinline.h>
-#endif
-
-namespace utils {
-
-inline void memory_barrier() {
-#if defined(__QNXNTO__)
- __cpu_membarrier();
-#elif defined(__GNUG__)
- __sync_synchronize();
-#else
-#warning "memory_barrier() implementation does nothing"
-#endif
-}
-
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_MEMORY_BARRIER_H_
diff --git a/SDL_Core/src/components/utils/include/utils/message_queue.h b/SDL_Core/src/components/utils/include/utils/message_queue.h
deleted file mode 100644
index e043440d6..000000000
--- a/SDL_Core/src/components/utils/include/utils/message_queue.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MESSAGE_QUEUE_CLASS
-#define MESSAGE_QUEUE_CLASS
-
-#include <queue>
-
-#include "utils/conditional_variable.h"
-#include "utils/lock.h"
-#include "utils/logger.h"
-#include "utils/prioritized_queue.h"
-
-/**
- * \class MessageQueue
- * \brief Wrapper for multithreading queue.
- */
-
-template<typename T, class Q = std::queue<T> > class MessageQueue {
- public:
- typedef Q Queue;
- /**
- * \brief Default constructor
- */
- MessageQueue();
-
- /**
- * \brief Destructor
- */
- ~MessageQueue();
-
- /**
- * \brief Returns size of the queue.
- * \return Size of the queue.
- */
- int32_t size() const;
-
- /**
- * \brief If queue is empty.
- * \return Is queue empty.
- */
- bool empty() const;
-
- /**
- * \brief Tells if queue is being shut down
- */
- bool IsShuttingDown() const;
-
- /**
- * \brief Adds element to the queue.
- * \param element Element to be added to the queue.n
- */
- void push(const T& element);
-
- /**
- * \brief Removes element from the queue and returns it.
- * \return To element of the queue.
- */
- T pop();
-
- /**
- * \brief Conditional wait.
- */
- void wait();
-
- /**
- * \brief Shutdown the queue.
- * This leads to waking up everyone waiting on the queue
- * Queue being shut down can be drained ( with pop() )
- * But nothing must be added to the queue after it began
- * shutting down
- */
- void Shutdown();
- private:
-
- /**
- *\brief Queue
- */
- Queue queue_;
- volatile bool shutting_down_;
- /**
- *\brief Platform specific syncronisation variable
- */
- mutable sync_primitives::Lock queue_lock_;
- mutable sync_primitives::ConditionalVariable queue_new_items_;
-};
-
-template<typename T, class Q> MessageQueue<T, Q>::MessageQueue()
- : shutting_down_(false) {
-}
-
-template<typename T, class Q> MessageQueue<T, Q>::~MessageQueue() {
- if (!queue_.empty()) {
- log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
- LOG4CXX_ERROR(logger, "Destruction of non-drained queue");
- }
-}
-
-template<typename T, class Q> void MessageQueue<T, Q>::wait() {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- while (!shutting_down_ && queue_.empty()) {
- queue_new_items_.Wait(auto_lock);
- }
-}
-
-template<typename T, class Q> int32_t MessageQueue<T, Q>::size() const {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- return queue_.size();
-}
-
-template<typename T, class Q> bool MessageQueue<T, Q>::empty() const {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- return queue_.empty();
-}
-
-template<typename T, class Q> bool MessageQueue<T, Q>::IsShuttingDown() const {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- return shutting_down_;
-}
-
-template<typename T, class Q> void MessageQueue<T, Q>::push(const T& element) {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- if (shutting_down_) {
- log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
- LOG4CXX_ERROR(logger, "Runtime error, pushing into queue"
- " that is being shut down");
- }
- queue_.push(element);
- queue_new_items_.Broadcast();
-}
-
-template<typename T, class Q> T MessageQueue<T, Q>::pop() {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- if (queue_.empty()) {
- log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
- LOG4CXX_ERROR(logger, "Runtime error, popping out of empty que");
- }
- T result = queue_.front();
- queue_.pop();
- return result;
-}
-
-template<typename T, class Q> void MessageQueue<T, Q>::Shutdown() {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- shutting_down_ = true;
- queue_new_items_.Broadcast();
-}
-
-#endif // MESSAGE_QUEUE_CLASS
diff --git a/SDL_Core/src/components/utils/include/utils/prioritized_queue.h b/SDL_Core/src/components/utils/include/utils/prioritized_queue.h
deleted file mode 100644
index 0023c2bdb..000000000
--- a/SDL_Core/src/components/utils/include/utils/prioritized_queue.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_PRIORITIZED_QUEUE_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_PRIORITIZED_QUEUE_H_
-
-#include <queue>
-#include <map>
-#include <iostream>
-
-#include "utils/macro.h"
-
-namespace utils {
-
-/*
- * Template queue class that gives out messages respecting their priority
- * Message class must have size_t PriorityOrder() method implemented
- */
-template < typename M >
-class PrioritizedQueue {
- public:
- typedef M value_type;
- // std::map guarantees it's contents is sorted by key
- typedef std::map<size_t, std::queue<value_type> > QueuesMap;
- PrioritizedQueue()
- : total_size_(0) {
- }
- // All api mimics usual std queue interface
- void push(const value_type& message) {
- size_t message_priority = message.PriorityOrder();
- queues_[message_priority].push(message);
- ++total_size_;
- }
- size_t size() const {
- return total_size_;
- }
- bool empty() const {
- return queues_.empty();
- }
- value_type front() {
- DCHECK(!queues_.empty() && !queues_.rbegin()->second.empty());
- return queues_.rbegin()->second.front();
- }
- void pop() {
- DCHECK(!queues_.empty() && !queues_.rbegin()->second.empty());
- typename QueuesMap::iterator last = --queues_.end();
- last->second.pop();
- --total_size_;
- if (last->second.empty()) {
- queues_.erase(last);
- }
- }
- private:
- QueuesMap queues_;
- size_t total_size_;
-};
-
-}
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_
diff --git a/SDL_Core/src/components/utils/include/utils/shared_ptr.h b/SDL_Core/src/components/utils/include/utils/shared_ptr.h
deleted file mode 100644
index 0e06d62c6..000000000
--- a/SDL_Core/src/components/utils/include/utils/shared_ptr.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SHARED_PTR_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SHARED_PTR_H_
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include "macro.h"
-#include "atomic.h"
-
-namespace utils {
-/**
- * @brief Shared pointer.
- *
- * Pointer to an object with reference counting.
- * Object will be automatically deallocated when last shared
- * pointer is destroyed.
- *
- * @tparam ObjectType Type of wrapped object.
- **/
-template<typename ObjectType>
-class SharedPtr {
- public:
- /**
- * @brief Constructor.
- *
- * Initialize shared pointer with wrapped object.
- * Reference counter will be initialized to 1.
- *
- * @param Object Wrapped object.
- **/
- SharedPtr(ObjectType* Object);
-
- SharedPtr();
-
- /**
- * @brief Copy constructor.
- *
- * Initialize shared pointer with another shared pointer.
- * Reference counter will be incremented.
- *
- * @param Other Other shared pointer.
- **/
- SharedPtr(const SharedPtr<ObjectType>& Other);
-
- /**
- * @brief Copy constructor.
- *
- * Initialize shared pointer with another shared pointer.
- * Reference counter will be incremented.
- *
- * @tparam OtherObjectType Type of other object pointer. This
- * allows creating a shared pointer to an
- * intstance of a base class from a shared
- * pointer to an instance of a class
- * inherited from this base class.
- * If OtherObjectType is not implicitly
- * convertible to ObjectType it will
- * cause a compile error.
- *
- * @param Other Other shared pointer.
- **/
- template<typename OtherObjectType>
- SharedPtr(const SharedPtr<OtherObjectType>& Other);
-
- /**
- * @brief Destructor.
- *
- * Decrement reference counter and destroy wrapped object
- * if reference counter reaches zero.
- **/
- ~SharedPtr(void);
-
- /**
- * @brief Assignment operator.
- *
- * Drop reference to currently referenced object and add
- * reference to assigned object.
- *
- * @param Other Shared pointer to an object
- * that must be referenced.
- *
- * @return Reference to this shared pointer.
- **/
- SharedPtr<ObjectType>& operator =(const SharedPtr<ObjectType>& Other);
-
- bool operator ==(const SharedPtr<ObjectType>& Other) const;
-
- bool operator< (const SharedPtr<ObjectType>& other) const;
-
- /**
- * @brief Assignment operator.
- *
- * Drop reference to currently referenced object and add
- * reference to assigned object.
- *
- * @tparam OtherObjectType Type of other object pointer. This
- * allows creating a shared pointer to an
- * intstance of a base class from a shared
- * pointer to an instance of a class
- * inherited from this base class.
- * If OtherObjectType is not implicitly
- * convertible to ObjectType it will
- * cause a compile error.
- *
- * @param Other Shared pointer to an object
- * that must be referenced.
- *
- * @return Reference to this shared pointer.
- **/
- template<typename OtherObjectType>
- SharedPtr<ObjectType>& operator =(const SharedPtr<OtherObjectType>& Other);
-
- template<typename OtherObjectType>
- static SharedPtr<OtherObjectType> static_pointer_cast(
- const SharedPtr<ObjectType>& pointer);
-
- /**
- * @brief Member access operator.
- *
- * @return Wrapped object.
- **/
- ObjectType* operator->(void) const;
-
- ObjectType& operator*() const;
- operator bool() const;
- void reset();
- void reset(ObjectType* other);
- ObjectType* get() const;
-
- /**
- * @return true if mObject not NULL
- */
- bool valid() const;
-
- private:
- void reset_impl(ObjectType* other);
-
- // TSharedPtr needs access to other TSharedPtr private members
- // for shared pointers type casts.
- template<typename OtherObjectType>
- friend class SharedPtr;
-
- /**
- * @brief Drop reference to wrapped object.
- *
- * If reference counter reaches zero object and its reference
- * counter will be deallocated.
- **/
- void dropReference(void);
-
- /**
- * @brief Wrapped object.
- **/
- ObjectType* mObject;
-
- /**
- * @brief Pointer to reference counter.
- **/
- uint32_t* mReferenceCounter;
-};
-
-template<typename ObjectType>
-inline utils::SharedPtr<ObjectType>::SharedPtr(ObjectType* Object)
- : mObject(NULL),
- mReferenceCounter(new uint32_t(1)) {
- DCHECK(Object != NULL);
- mObject = Object;
-}
-
-template<typename ObjectType>
-inline utils::SharedPtr<ObjectType>::SharedPtr()
- : mObject(0),
- mReferenceCounter(0) {
-}
-
-template<typename ObjectType>
-inline utils::SharedPtr<ObjectType>::SharedPtr(
- const SharedPtr<ObjectType>& Other)
- : mObject(0),
- mReferenceCounter(0) {
- *this = Other;
-}
-
-template<typename ObjectType>
-template<typename OtherObjectType>
-inline utils::SharedPtr<ObjectType>::SharedPtr(
- const SharedPtr<OtherObjectType>& Other)
- : mObject(0),
- mReferenceCounter(0) {
- *this = Other;
-}
-
-template<typename ObjectType>
-inline utils::SharedPtr<ObjectType>::~SharedPtr(void) {
- dropReference();
-}
-
-template<typename ObjectType>
-inline utils::SharedPtr<ObjectType>&
-utils::SharedPtr<ObjectType>::operator=(const SharedPtr<ObjectType>& Other) {
- return operator=<ObjectType>(Other);
-}
-
-template<typename ObjectType>
-inline bool utils::SharedPtr<ObjectType>::operator ==(
- const SharedPtr<ObjectType>& Other) const {
- return (mObject == Other.mObject);
-}
-
-template<typename ObjectType>
-inline bool utils::SharedPtr<ObjectType>::operator< (
- const SharedPtr<ObjectType>& other) const {
- return (mObject < other.mObject);
-}
-
-template<typename ObjectType>
-template<typename OtherObjectType>
-inline utils::SharedPtr<ObjectType>&
-utils::SharedPtr<ObjectType>::operator=(
- const SharedPtr<OtherObjectType>& Other) {
- dropReference();
-
- mObject = Other.mObject;
- mReferenceCounter = Other.mReferenceCounter;
-
- if (0 != mReferenceCounter) {
- atomic_post_inc(mReferenceCounter);
- }
-
- return *this;
-}
-
-template<typename ObjectType>
-template<typename OtherObjectType>
-utils::SharedPtr<OtherObjectType> utils::SharedPtr<ObjectType>::static_pointer_cast(const SharedPtr<ObjectType>& pointer) {
- SharedPtr<OtherObjectType> casted_pointer;
- casted_pointer.mObject = static_cast<OtherObjectType*>(pointer.mObject);
- casted_pointer.mReferenceCounter = pointer.mReferenceCounter;
-
- if (0 != casted_pointer.mReferenceCounter) {
- atomic_post_inc(casted_pointer.mReferenceCounter);
- }
-
- return casted_pointer;
-}
-
-template<typename ObjectType> ObjectType*
-utils::SharedPtr<ObjectType>::operator->(void) const {
- return mObject;
-}
-
-template<typename ObjectType> ObjectType&
-utils::SharedPtr<ObjectType>::operator*() const {
- DCHECK(mObject);
- return *mObject;
-}
-
-template<typename ObjectType>
-utils::SharedPtr<ObjectType>::operator bool() const {
- return 0 != mObject;
-}
-
-template<typename ObjectType> void
-utils::SharedPtr<ObjectType>::reset() {
- reset_impl(0);
-}
-
-template<typename ObjectType> void
-utils::SharedPtr<ObjectType>::reset(ObjectType* other) {
- DCHECK(other != NULL);
- reset_impl(other);
-}
-
-template<typename ObjectType> void
-utils::SharedPtr<ObjectType>::reset_impl(ObjectType* other) {
- dropReference();
- mObject = other;
- mReferenceCounter = new uint32_t(1);
-}
-
-template<typename ObjectType>
-inline void SharedPtr<ObjectType>::dropReference(void) {
- if (0 != mReferenceCounter) {
- if (1 == atomic_post_dec(mReferenceCounter)) {
-
- delete mObject;
- mObject = 0;
-
- delete mReferenceCounter;
- mReferenceCounter = 0;
- }
- }
-}
-
-template<typename ObjectType>
-ObjectType* SharedPtr<ObjectType>::get() const {
- return mObject;
-}
-
-template<typename ObjectType>
-inline bool SharedPtr<ObjectType>::valid() const {
- return (mObject != NULL);
-}
-
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SHARED_PTR_H_
-
-// vim: set ts=2 sw=2 et:
diff --git a/SDL_Core/src/components/utils/include/utils/signals.h b/SDL_Core/src/components/utils/include/utils/signals.h
deleted file mode 100644
index ad2a2d183..000000000
--- a/SDL_Core/src/components/utils/include/utils/signals.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
-* \file signals.h
-* \brief Signal (i.e. SIGINT) handling.
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SIGNALS_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SIGNALS_H_
-
-namespace utils {
-bool SubscribeToTerminateSignal(void (*func)(int32_t p));
-bool ResetSubscribeToTerminateSignal();
-void ForwardSignal();
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SIGNALS_H_
diff --git a/SDL_Core/src/components/utils/include/utils/singleton.h b/SDL_Core/src/components/utils/include/utils/singleton.h
deleted file mode 100644
index 35ad50393..000000000
--- a/SDL_Core/src/components/utils/include/utils/singleton.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
-
-#include "lock.h"
-#include "memory_barrier.h"
-#include "atomic.h"
-
-namespace utils {
-
-namespace deleters {
-
-class DummyDeleter {
- public:
- void grab(void* pointer) {
- }
-};
-
-template<typename T>
-class Deleter {
- public:
- Deleter() : pointer_(0) {
- }
- ~Deleter() {
- if (pointer_) {
- delete pointer_;
- }
- }
- void grab(T* pointer) {
- pointer_ = pointer;
- }
- private:
- T* pointer_;
-};
-
-} // namespace deleters
-
-template<typename T, class Deleter = deleters::DummyDeleter>
-class Singleton {
-/**
- * @brief Singleton template
- * Singleton classes must derive from this template specialized with class itself:
- *
- * class MySingleton : public Singleton<MySingleton> {...};
- *
- * All such classes must declare instance() method as friend
- * by adding FRIEND_BASE_SINGLETON_CLASS macro from macro.h to class definition:
- *
- * FRIEND_BASE_SINGLETON_CLASS(MySingleton);
- *
- * Instance of this class (if created) can be deleted by Deleter destructor
- * which is called after main() (or from exit())
- * This requires T destructor to be accessible for Deleter (e.g. public)
- * Deleter template parameter can be specified with any class
- * with public default constructor, destructor and method
- * void grab(T*);
- * However, default Deleter specification does nothing
- *
- * Also instance can be deleted explicitly by calling destroy() method
- *
- * Both instance() and destroy() methods are thread safe
- * but not thread safety between simultaneous calls
- * of instance() and destroy() is cared about
- */
- public:
-/**
- * @brief Returns the singleton of class
- */
- static T* instance();
-/**
- * @brief Destroys the singleton (if it had been created)
- */
- static void destroy();
-/**
- * @brief Checks whether the singleton exists
- */
- static bool exists();
-
- private:
-
- static T** instance_pointer();
- static Deleter* deleter();
-};
-
-template<typename T, class Deleter>
-T* Singleton<T, Deleter>::instance() {
- static sync_primitives::Lock lock;
-
- T* local_instance;
- atomic_pointer_assign(local_instance, *instance_pointer());
- memory_barrier();
-
- if (!local_instance) {
- lock.Ackquire();
- local_instance = *instance_pointer();
- if (!local_instance) {
- local_instance = new T();
- memory_barrier();
- atomic_pointer_assign(*instance_pointer(), local_instance);
- deleter()->grab(local_instance);
- }
- lock.Release();
- }
-
- return local_instance;
-}
-
-template<typename T, class Deleter>
-void Singleton<T, Deleter>::destroy() {
- static sync_primitives::Lock lock;
-
- T* local_instance;
- atomic_pointer_assign(local_instance, *instance_pointer());
- memory_barrier();
-
- if (local_instance) {
- lock.Ackquire();
- local_instance = *instance_pointer();
- if (local_instance) {
- atomic_pointer_assign(*instance_pointer(), 0);
- memory_barrier();
- delete local_instance;
- deleter()->grab(0);
- }
- lock.Release();
- }
-}
-
-template<typename T, class Deleter>
-bool Singleton<T, Deleter>::exists() {
- return *instance_pointer() != 0;
-}
-
-template<typename T, class Deleter>
-T** Singleton<T, Deleter>::instance_pointer() {
- static T* instance = 0;
- return &instance;
-}
-
-template<typename T, class Deleter>
-Deleter* Singleton<T, Deleter>::deleter() {
- static Deleter deleter;
- return &deleter;
-}
-
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_SINGLETON_H_
diff --git a/SDL_Core/src/components/utils/include/utils/stl_utils.h b/SDL_Core/src/components/utils/include/utils/stl_utils.h
deleted file mode 100644
index f525c6429..000000000
--- a/SDL_Core/src/components/utils/include/utils/stl_utils.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_STL_UTILS_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_STL_UTILS_H_
-
-#include "utils/macro.h"
-
-namespace utils {
-
-/*
- * Utility class that automatically deletes STL collection of
- * freestore objects
- */
-template<class T>
-class StlCollectionDeleter {
- public:
- typedef T Collection;
- StlCollectionDeleter(T* collection): collection_(collection) {
- DCHECK(collection_);
- }
- ~StlCollectionDeleter() {
- for (typename Collection::iterator i = collection_->begin(),
- end = collection_->end();
- i != end; ++i) {
- delete *i;
- }
- }
- private:
- Collection* collection_;
-};
-
-template<class T>
-class StlMapDeleter {
- public:
- typedef T Collection;
- StlMapDeleter(T* collection): collection_(collection) {
- DCHECK(collection_);
- }
- ~StlMapDeleter() {
- for (typename Collection::iterator i = collection_->begin(),
- end = collection_->end();
- i != end; ++i) {
- delete i->second;
- }
- }
- private:
- Collection* collection_;
-};
-
-} // namespace utils
-
-#endif /* SRC_COMPONENTS_UTILS_INCLUDE_UTILS_STL_UTILS_H_ */
diff --git a/SDL_Core/src/components/utils/include/utils/threads/message_loop_thread.h b/SDL_Core/src/components/utils/include/utils/threads/message_loop_thread.h
deleted file mode 100644
index b2ff91f7b..000000000
--- a/SDL_Core/src/components/utils/include/utils/threads/message_loop_thread.h
+++ /dev/null
@@ -1,136 +0,0 @@
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_MESSAGE_LOOP_THREAD_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_MESSAGE_LOOP_THREAD_H_
-
-#include <string>
-#include <queue>
-
-#include "utils/logger.h"
-#include "utils/macro.h"
-#include "utils/message_queue.h"
-#include "utils/threads/thread.h"
-
-namespace threads {
-
-/*
- * Class that handles a thread which sole purpose is to pump messages pushed
- * to it's queue. To handle messages someone, Handler must be implemented and
- * passed to MessageLoopThread constructor.
- */
-template < class Q >
-class MessageLoopThread {
- public:
- typedef Q Queue;
- typedef typename Queue::value_type Message;
- /*
- * Handler interface. It is called from a thread that is
- * owned by MessageLoopThread so make sure is only accesses
- * thread-safe data
- */
- struct Handler {
- /*
- * Method called by MessageLoopThread to process single message
- * from it's queue. After calling this method message is discarded.
- */
- virtual void Handle(const Message& message) = 0;
- };
-
- /*
- * Constructs new MessageLoopThread. Must be named to aid debugging.
- */
- MessageLoopThread(const std::string& name,
- Handler* handler,
- const ThreadOptions& thread_opts = ThreadOptions());
- ~MessageLoopThread();
-
- // Places a message to the therad's queue. Thread-safe.
- void PostMessage(const Message& message);
- private:
-
- /*
- * Implementation of ThreadDelegate that actually pumps the queue and is
- * able to correctly shut it down
- */
- struct LoopThreadDelegate : public threads::ThreadDelegate {
- LoopThreadDelegate(MessageQueue<Message, Queue>* message_queue,
- Handler* handler);
-
- // threads::ThreadDelegate overrides
- virtual void threadMain() OVERRIDE;
- virtual bool exitThreadMain() OVERRIDE;
- private:
- // Handle all messages that are in the queue until it is empty
- void DrainQue();
- private:
- // Handler that processes messages
- Handler& handler_;
- // Message queue that is actually owned by MessageLoopThread
- MessageQueue<Message, Queue>& message_queue_;
- };
- private:
- MessageQueue<Message, Queue> message_queue_;
- threads::Thread thread_;
-};
-
-///////// Implementation
-
-template<class Q>
-MessageLoopThread<Q>::MessageLoopThread(const std::string& name,
- Handler* handler,
- const ThreadOptions& thread_opts)
- : thread_(name.c_str(), new LoopThreadDelegate(&message_queue_, handler)) {
- bool started = thread_.startWithOptions(thread_opts);
- if (!started) {
- log4cxx::LoggerPtr logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
- LOG4CXX_ERROR(logger, "Failed to start thread " << name);
- }
-}
-
-template<class Q>
-MessageLoopThread<Q>::~MessageLoopThread() {
- // this will join us with the thread while it drains message queue
- thread_.stop();
-}
-
-template <class Q>
-void MessageLoopThread<Q>::PostMessage(const Message& message) {
- message_queue_.push(message);
-}
-
-//////////
-template<class Q>
-MessageLoopThread<Q>::LoopThreadDelegate::LoopThreadDelegate(
- MessageQueue<Message, Queue>* message_queue, Handler* handler)
- : handler_(*handler),
- message_queue_(*message_queue) {
- DCHECK(handler != NULL);
- DCHECK(message_queue != NULL);
-}
-
-template<class Q>
-void MessageLoopThread<Q>::LoopThreadDelegate::threadMain() {
- while(!message_queue_.IsShuttingDown()){
- DrainQue();
- message_queue_.wait();
- }
- // Process leftover messages
- DrainQue();
-}
-
-template<class Q>
-bool MessageLoopThread<Q>::LoopThreadDelegate::exitThreadMain() {
- message_queue_.Shutdown();
- // Prevent canceling thread until queue is drained
- return true;
-}
-
-template<class Q>
-void MessageLoopThread<Q>::LoopThreadDelegate::DrainQue() {
- while(!message_queue_.empty()) {
- handler_.Handle(message_queue_.pop());
- }
-}
-
-} // namespace utils
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_MESSAGE_LOOP_THREAD_H_
diff --git a/SDL_Core/src/components/utils/include/utils/threads/thread.h b/SDL_Core/src/components/utils/include/utils/threads/thread.h
deleted file mode 100644
index bbe0acde3..000000000
--- a/SDL_Core/src/components/utils/include/utils/threads/thread.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * \file thread.h
- * \brief
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_H_
-
-#if defined(OS_POSIX)
-#include <pthread.h>
-#endif
-
-#include <ostream>
-#include <string>
-
-#include "utils/macro.h"
-#include "utils/logger.h"
-#include "utils/threads/thread_delegate.h"
-#include "utils/threads/thread_options.h"
-
-namespace threads {
-
-namespace impl {
-#if defined(OS_POSIX)
-typedef pthread_t PlatformThreadHandle;
-#else
-#error Please implement thread for your OS
-#endif
-}
-
-/**
- * Non platform specific thread abstraction that establishes a
- * threads::ThreadDelegate on a new thread.
- *
- * ThreadDelegate example:
- * class TestThread : public threads::ThreadDelegate {
- * public:
- * void threadMain() {
- * printf("Hello, thread!\n");
- * sleep(2);
- * }
- * };
- *
- * Example usage:
- * threads::Thread thread("test thread", new TestThread());
- * thread.startWithOptions(
- * threads::ThreadOptions(threads::Thread::kMinStackSize));
- * printf("join!\n");
- * thread.join();
- * printf("ok!\n");
- */
-class Thread {
- public:
-
- /*
- * Class that represents unique in-process thread identifier
- * due to restriction of pthread API it only allows checks
- * for equality to different thread id and no ordering.
- *
- * ostream<< operator is provided for this class which
- * outputs thread name associated to an identifier.
- */
- class Id {
- public:
- explicit Id(const impl::PlatformThreadHandle& id): id_(id) {}
- bool operator==(const Id that) const;
- private:
- impl::PlatformThreadHandle id_;
- friend class Thread;
- };
-
- // Get unique ID of currently executing thread
- static Id CurrentId();
-
- // Get name associated with thread identified by thread_id
- static std::string NameFromId(Id thread_id);
-
- // Give thread thread_id a name, helpful for debugging
- static void SetNameForId(Id thread_id, const std::string& name);
-
- /**
- * Ctor.
- * @param name - display string to identify the thread.
- * @param delegate - thread procedure delegate. Look for
- * 'threads/thread_delegate.h' for details.
- * NOTE: delegate will be deleted by destructor.
- */
- Thread(const char* name, ThreadDelegate* delegate);
-
- /**
- * Dtor.
- */
- virtual ~Thread();
-
- /**
- * Starts the thread.
- * @return true if the thread was successfully started.
- */
- bool start();
-
- /**
- * Starts the thread. Behaves exactly like Start in addition to
- * allow to override the default options.
- * @param options - thread options. Look for 'threads/thread_options.h'
- * for details.
- * @return true if the thread was successfully started.
- */
- bool startWithOptions(const ThreadOptions& options);
-
- /**
- * Signals the thread to exit and returns once the thread has exited.
- * After this method returns, the Thread object is completely reset and may
- * be used as if it were newly constructed (i.e., Start may be called again).
- *
- * Stop may be called multiple times and is simply ignored if the thread is
- * already stopped.
- */
- void stop();
-
- /**
- * Joins with a thread created via the Create function.
- * This function blocks the caller until the designated thread exits.
- * This will invalidate |thread_handle|.
- */
- void join();
-
- /**
- * Get thread name.
- * @return thread name
- */
- const std::string &thread_name() {
- return name_;
- }
-
- /**
- * Returns true if the thread has been started, and not yet stopped.
- * When a thread is running, the thread_id_ is non-zero.
- * @return true if the thread has been started, and not yet stopped.
- */
- bool is_running() const {
- return isThreadRunning_;
- }
-
- /**
- * Is thread joinable?
- * @return - Returns true if the thread is joinable.
- */
- bool is_joinable() const {
- return thread_options_.is_joinable();
- }
-
- /**
- * Thread stack size
- * @return thread stack size
- */
- size_t stack_size() const {
- return thread_options_.stack_size();
- }
-
- /**
- * The native thread handle.
- * @return thread handle.
- */
- impl::PlatformThreadHandle thread_handle() const {
- return thread_handle_;
- }
-
- /**
- * Thread id.
- * @return return thread id.
- */
- Id thread_id() const {
- return Id(thread_handle());
- }
-
- /**
- * Thread options.
- * @return thread options.
- */
- const ThreadOptions& thread_options() const {
- return thread_options_;
- }
-
- /**
- * Minimum size of thread stack for specific platform.
- */
- static size_t kMinStackSize;
-
- protected:
- std::string name_;
- ThreadDelegate* delegate_;
- impl::PlatformThreadHandle thread_handle_;
- ThreadOptions thread_options_;
- bool isThreadRunning_;
-
- static log4cxx::LoggerPtr logger_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Thread);
-};
-
-inline bool operator!= (Thread::Id left, Thread::Id right) {return !(left == right); }
-std::ostream& operator<<(std::ostream& os, Thread::Id thread_id);
-
-} // namespace threads
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_H_
diff --git a/SDL_Core/src/components/utils/include/utils/threads/thread_delegate.h b/SDL_Core/src/components/utils/include/utils/threads/thread_delegate.h
deleted file mode 100644
index 963eb3bf8..000000000
--- a/SDL_Core/src/components/utils/include/utils/threads/thread_delegate.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * \file thread_delegate.h
- * \brief
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_DELEGATE_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_DELEGATE_H_
-
-#include <pthread.h>
-
-namespace threads {
-
-/**
- * Thread procedure interface.
- * Look for "threads/thread.h" for example
- */
-class ThreadDelegate {
- public:
- /**
- * Dtor.
- */
- virtual ~ThreadDelegate() {
- }
-
- /**
- * Thread procedure.
- */
- virtual void threadMain() = 0;
-
- /**
- * Should be called to free all resources allocated in threadMain
- * and exiting threadMain
- */
- virtual bool exitThreadMain() {
- return false;
- }
-};
-
-} // namespace threads
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_DELEGATE_H_
diff --git a/SDL_Core/src/components/utils/include/utils/threads/thread_manager.h b/SDL_Core/src/components/utils/include/utils/threads/thread_manager.h
deleted file mode 100644
index 03330170e..000000000
--- a/SDL_Core/src/components/utils/include/utils/threads/thread_manager.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_MANAGER_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_MANAGER_H_
-
-#include "utils/threads/thread.h"
-#include "utils/lock.h"
-
-#include <map>
-#include <string>
-#include <set>
-
-#include "utils/macro.h"
-#include "utils/singleton.h"
-
-namespace threads {
-namespace impl {
-
-/*
- * Generates short and unique names for unnamed threads
- * and remembers association between thread handle and that short name
- */
-class UnnamedThreadRegistry {
- public:
- UnnamedThreadRegistry();
- ~UnnamedThreadRegistry();
- /*
- * Returns a name for given unnamed thread id.
- * If id is first seen, new name is generated and memorized
- * If id is already known, previously generated name is returned
- */
- std::string GetUniqueName(PlatformThreadHandle id);
- private:
- typedef std::map<PlatformThreadHandle, std::string> IdNameMap;
- IdNameMap id_number_;
- int32_t last_thread_number_;
- sync_primitives::Lock state_lock_;
-};
-
-/*
- * This class is here currently to remember names associated to threads.
- * It manages raw impl::PlatformHandles because Thread::Id's do not provide
- * comparison operator. Current linux implementation relies on fact that
- * pthread_t is just an integer and every thread has single unique value
- * associated with it.
- * OS provides it's own facilities to name threads but
- */
-class ThreadManager : public utils::Singleton<ThreadManager> {
- public:
- // Name a thread. Should be called only once for every thread.
- // Threads can't be renamed
- void RegisterName(PlatformThreadHandle id, const std::string& name);
-
- // Get a name for previously registered thread
- std::string GetName(PlatformThreadHandle id) const;
-
- // Forget a name of (possibly destroyed) thread
- // Make sure to call it after thread is finished
- // Because thread id's can be recycled
- void Unregister(PlatformThreadHandle id);
- private:
- ThreadManager();
- ~ThreadManager();
-
- private:
- typedef std::set<std::string> NamesSet;
- typedef std::map<PlatformThreadHandle, std::string> IdNamesMap;
- // Set of thread names for fast checking if name is unique
- NamesSet names_;
- // Map from system handle to the thread name
- IdNamesMap id_names_;
- mutable sync_primitives::Lock state_lock_;
-
- // Generator of shorter sequental names for unnamed threads
- // Has to memorize every generated name this is why it is mutable
- mutable UnnamedThreadRegistry unnamed_thread_namer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ThreadManager);
-
- FRIEND_BASE_SINGLETON_CLASS(ThreadManager);
-};
-
-} // namespace impl
-} // namespace threads
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_MANAGER_H_
diff --git a/SDL_Core/src/components/utils/include/utils/threads/thread_options.h b/SDL_Core/src/components/utils/include/utils/threads/thread_options.h
deleted file mode 100644
index bdeaa367f..000000000
--- a/SDL_Core/src/components/utils/include/utils/threads/thread_options.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * \file thread_options.h
- * \brief
- *
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_OPTIONS_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_OPTIONS_H_
-
-namespace threads {
-
-/**
- * @breif Startup options for thread.
- * Look for "threads/thread.h" for example
- */
-class ThreadOptions {
- public:
- /**
- * Ctor
- * @param stack_size - thread stack size. If stack size less than
- * threads::Thread::kMinStackSize the default value is used.
- * 0 - default stack size for current platform.
- * @param is_joinable - is thread joinable?
- */
- explicit ThreadOptions(size_t stack_size = 0, bool is_joinable = true)
- : stack_size_(stack_size),
- is_joinable_(is_joinable) {
- }
-
- /**
- * Dtor.
- */
- virtual ~ThreadOptions() {
- }
-
- /**
- * Copy ctor.
- * @param options - new options.
- */
- ThreadOptions(const ThreadOptions& options) {
- *this = options;
- }
-
- /**
- * Assign operator.
- * @param options - new options.
- * @return new options.
- */
- ThreadOptions& operator=(const ThreadOptions& options ) {
- stack_size_ = options.stack_size();
- is_joinable_ = options.is_joinable();
- return *this;
- }
-
- /**
- * Stack size.
- * @return Stack size for thread.
- */
- size_t stack_size() const {
- return stack_size_;
- }
-
- /**
- * Is thread joinable?
- * @return - Returns true if the thread is joinable.
- */
- bool is_joinable() const {
- return is_joinable_;
- }
-
- protected:
- size_t stack_size_;
- bool is_joinable_;
-};
-
-} // namespace threads
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_THREADS_THREAD_OPTIONS_H_
diff --git a/SDL_Core/src/components/utils/include/utils/threads/thread_validator.h b/SDL_Core/src/components/utils/include/utils/threads/thread_validator.h
deleted file mode 100644
index def1994b7..000000000
--- a/SDL_Core/src/components/utils/include/utils/threads/thread_validator.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_THREADS_THREAD_VALIDATOR_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_THREADS_THREAD_VALIDATOR_H_
-
-#include "utils/threads/thread.h"
-
-namespace threads {
-/*
- * Use objects of this class to validate (in run-time) access
- * to single-threaded objects. It remembers the thread it was
- * created on and then allows to easily check whether an object is
- * being accessed from different thread and log an error in that case
- *
- * Put a member of type SingleThreadValidator in your class and call
- * AssertRunningOnCreationThread in it's every public method
- *
- * class MySingleThreadedThing {
- * .....
- * public:
- * void DoSomeWork();
- * .....
- * private:
- * SingleThreadValidator thread_validator_;
- * .....
- * };
- *
- * void MySingleThreadedThing::DoSomeWork() {
- * thread_validator_.AssertRunningOnCreationThread();
- * .....
- * }
- */
-class SingleThreadSimpleValidator {
- public:
- SingleThreadSimpleValidator();
- ~SingleThreadSimpleValidator();
-
- // This method should be called in every public method
- // of classes being checked for absence of concurrent access
- void AssertRunningOnCreationThread() const;
- private:
- const Thread::Id creation_thread_id_;
-};
-
-
-/*
- * This is bit more sophisticated debug helper which allows
- * objects being checked to be transferred between threads.
- * Make sure to pass ownership calling PassToThread before
- * object is accessed from that thread!
- *
- * It's better to virtually inherit it to make PassToThread publicly
- * available to code that uses objects of your classes and make sure
- * that if your object consists of different thread-validated
- * parts you'll need not to call PassToThread proxy method for
- * every part of your composite object
- */
-class SingleThreadValidator {
- public:
- SingleThreadValidator();
- ~SingleThreadValidator();
-
- // Must be called prior to transferring object being validated to
- // another thread or when passing it back
- void PassToThread(Thread::Id thread_id) const;
- // This method should be called in every public method
- // of classes being checked for absence of unintended concurrent
- // access
- void AssertRunningOnValidThread() const;
- private:
- mutable Thread::Id owning_thread_id_;
-};
-
-} // namespace threads
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_THREADS_THREAD_VALIDATOR_H_
diff --git a/SDL_Core/src/components/utils/include/utils/timer_thread.h b/SDL_Core/src/components/utils/include/utils/timer_thread.h
deleted file mode 100644
index 0da5616e7..000000000
--- a/SDL_Core/src/components/utils/include/utils/timer_thread.h
+++ /dev/null
@@ -1,336 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_THREAD
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_THREAD
-
-#include <time.h>
-
-#include "utils/conditional_variable.h"
-#include "utils/lock.h"
-#include "utils/logger.h"
-#include "utils/macro.h"
-#include "utils/timer_thread.h"
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_delegate.h"
-
-namespace timer {
-
-class TimerDelegate;
-
-/*
- * The TimerThread class provide possibility to run timer in a separate thread.
- * The client should specify callee and const callback function.
- * Example usage:
- *
- * Create timer in mobile request
- *
- * timer::TimerThread<MobileRequest> timer(this, &MobileRequest::onTimeOut);
- * timer.start(10);
- *
- * some actions
- *
- * To stop timer call timer.stop();
- *
- */
-template <class T>
-class TimerThread {
- public:
-
- friend class TimerDelegate;
- friend class TimerLooperDelegate;
-
- /*
- * @brief Default constructor
- *
- * @param callee A class that use timer
- * @param f CallBackFunction which will be called on timeout
- * Atantion! "f()" will be called not in main thread but in timer thread
- * Never use stop() and start() methods inside f
- * @param is_looper Define this timer as looer,
- * if true, TimerThread will call "f()" function every time out
- * until stop()
- */
- TimerThread(T* callee , void (T::*f)(),bool is_looper = false);
-
- /*
- * @brief Destructor
- */
- virtual ~TimerThread();
-
- /*
- * @brief Starts timer for specified timeout.
- * Previously started timeout will be set to new value.
- * On timeout TimerThread::onTimeOut interface will be called.
- * Must not be used in callback function!
- *
- * @param timeout_seconds Timeout in seconds to be set
- */
- virtual void start(uint32_t timeout_seconds);
-
- /*
- * @brief Stops timer execution
- * Must not be used in callback function!
- */
- virtual void stop();
-
- protected:
-
- /*
- * @brief Interface called by delegator on timeout
- */
- void onTimeOut() const;
-
- private:
-
- /**
- * @brief Delegate release timer, will call callback function one time
- */
- class TimerDelegate : public threads::ThreadDelegate {
- public:
-
- /*
- * @brief Default constructor
- *
- * @param timer_thread The Timer_thread pointer
- * @param timeout Timeout to be set
- */
- TimerDelegate(const TimerThread* timer_thread);
-
- /*
- * @brief Destructor
- */
- virtual ~TimerDelegate();
-
- /*
- * @brief Thread main function.
- */
- virtual void threadMain();
-
- /*
- * @brief Called by thread::thread to free all allocated resources.
- */
- virtual bool exitThreadMain();
-
- /*
- * @brief Restart timer
- *
- * @param timeout_seconds New timeout to be set
- */
- virtual void setTimeOut(uint32_t timeout_seconds);
-
- protected:
- const TimerThread* timer_thread_;
- uint32_t timeout_seconds_;
- sync_primitives::Lock state_lock_;
- sync_primitives::ConditionalVariable termination_condition_;
- volatile bool stop_flag_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TimerDelegate);
- };
-
-
- /**
- * @brief Delegate release looper timer.
- * Will call delegate every timeot function while stop()
- * won't be called
- */
- class TimerLooperDelegate : public TimerDelegate {
- public:
-
- /*
- * @brief Default constructor
- *
- * @param timer_thread The Timer_thread pointer
- * @param timeout Timeout to be set
- */
- TimerLooperDelegate(const TimerThread* timer_thread);
-
- /*
- * @brief Thread main function.
- */
- virtual void threadMain();
- private:
- DISALLOW_COPY_AND_ASSIGN(TimerLooperDelegate);
- };
- void (T::*callback_)();
- T* callee_;
- TimerDelegate* delegate_;
- threads::Thread* thread_;
- mutable bool is_running_;
-
- DISALLOW_COPY_AND_ASSIGN(TimerThread);
-};
-
-template <class T>
-TimerThread<T>::TimerThread(T* callee, void (T::*f)(), bool is_looper)
- : callback_(f),
- callee_(callee),
- delegate_(NULL),
- thread_(NULL),
- is_running_(false) {
- if (is_looper) {
- delegate_ = new TimerLooperDelegate(this);
- } else {
- delegate_ = new TimerDelegate(this);
- }
-
- if (delegate_) {
- thread_ = new threads::Thread("TimerThread", delegate_);
- }
-}
-
-template <class T>
-TimerThread<T>::~TimerThread() {
- if (is_running_) {
- stop();
- }
- callback_ = NULL;
- callee_ = NULL;
- delete thread_;
- // delegate_ will be deleted by thread_
- thread_ = NULL;
- delegate_ = NULL;
-}
-
-template <class T>
-void TimerThread<T>::start(uint32_t timeout_seconds) {
- if (is_running_) {
- stop();
- }
-
- delegate_->setTimeOut(timeout_seconds);
- if (delegate_ && thread_) {
- is_running_ = true;
- const size_t kStackSize = 16384;
- thread_->startWithOptions(threads::ThreadOptions(kStackSize));
- }
-}
-
-template <class T>
-void TimerThread<T>::stop() {
- if (delegate_ && thread_) {
- thread_->stop();
- is_running_ = false;
- }
-}
-
-template <class T>
-void TimerThread<T>::onTimeOut() const {
- if (callee_ && callback_) {
- (callee_->*callback_)();
- is_running_ = false;
- }
-}
-
-template <class T>
-TimerThread<T>::TimerDelegate::TimerDelegate(const TimerThread* timer_thread)
- : timer_thread_(timer_thread),
- timeout_seconds_(0),
- stop_flag_(false) {
- DCHECK(timer_thread_);
-}
-
-template <class T>
-TimerThread<T>::TimerLooperDelegate::TimerLooperDelegate(const TimerThread* timer_thread)
- : TimerDelegate(timer_thread) {
-}
-
-template <class T>
-TimerThread<T>::TimerDelegate::~TimerDelegate() {
- timer_thread_ = NULL;
-}
-
-template <class T>
-void TimerThread<T>::TimerDelegate::threadMain() {
- using sync_primitives::ConditionalVariable;
- sync_primitives::AutoLock auto_lock(state_lock_);
- const time_t end_time = time(NULL) + timeout_seconds_;
- int32_t wait_seconds_left = int32_t(difftime(end_time, time(NULL)));
- while (!stop_flag_) {
- // Sleep
- ConditionalVariable::WaitStatus wait_status =
- termination_condition_.WaitFor(auto_lock, wait_seconds_left * 1000);
- wait_seconds_left = int32_t(difftime(end_time, time(NULL)));
- // Quit sleeping or continue sleeping in case of spurious wake up
- if (ConditionalVariable::kTimeout == wait_status ||
- wait_seconds_left <= 0) {
- break;
- }
- }
- if (!stop_flag_) {
- timer_thread_->onTimeOut();
- }
- stop_flag_ = false;
-}
-
-template <class T>
-void TimerThread<T>::TimerLooperDelegate::threadMain() {
- using sync_primitives::ConditionalVariable;
- sync_primitives::AutoLock auto_lock(TimerDelegate::state_lock_);
- time_t end_time = time(NULL) + TimerDelegate::timeout_seconds_;
- int32_t wait_seconds_left = int32_t(difftime(end_time, time(NULL)));
- while (!TimerDelegate::stop_flag_) {
- // Sleep
- ConditionalVariable::WaitStatus wait_status =
- TimerDelegate::termination_condition_.WaitFor(auto_lock, wait_seconds_left * 1000);
- wait_seconds_left = int32_t(difftime(end_time, time(NULL)));
- // Quit sleeping or continue sleeping in case of spurious wake up
- if (ConditionalVariable::kTimeout == wait_status ||
- wait_seconds_left <= 0) {
- TimerDelegate::timer_thread_->onTimeOut();
- end_time = time(NULL) + TimerDelegate::timeout_seconds_;
- }
- }
- TimerDelegate::stop_flag_ = false;
-}
-
-
-template <class T>
-bool TimerThread<T>::TimerDelegate::exitThreadMain() {
- {
- sync_primitives::AutoLock auto_lock(state_lock_);
- stop_flag_ = true;
- }
- termination_condition_.NotifyOne();
- return true;
-}
-
-template <class T>
-void TimerThread<T>::TimerDelegate::setTimeOut(uint32_t timeout_seconds) {
- timeout_seconds_ = timeout_seconds;
-}
-
-} // namespace timer
-
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_TIMER_THREAD
diff --git a/SDL_Core/src/components/utils/src/back_trace.cc b/SDL_Core/src/components/utils/src/back_trace.cc
deleted file mode 100644
index 23b1b4d1e..000000000
--- a/SDL_Core/src/components/utils/src/back_trace.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/back_trace.h"
-
-#include <algorithm>
-#include <vector>
-#include <sstream>
-
-#include <cxxabi.h>
-#include <execinfo.h>
-
-#include "utils/macro.h"
-
-using std::ostream;
-using std::string;
-using std::vector;
-using threads::Thread;
-
-namespace utils {
-
-namespace {
-string demangle(const char* symbol) {
- char temp[2048];
- if (1 == sscanf(symbol, "%*[^(]%*[^_]%2047[^)+]", temp)) {
- size_t size;
- int32_t status;
- char* demangled = abi::__cxa_demangle(temp, NULL, &size, &status);
- if (demangled != NULL) {
- string result(demangled);
- free(demangled);
- return result;
- }
- }
- return symbol;
-}
-}
-
-Backtrace::Backtrace(int32_t count, int32_t skip_top)
- : thread_id_(threads::Thread::CurrentId()) {
- int32_t skip = skip_top + 1; // Skip this constructor
- vector<void*> full_trace (count + skip);
- int32_t captured = backtrace(&full_trace.front(), count + skip);
- int32_t first_call = std::min(captured, skip);
- int32_t last_call = std::min(first_call + count, captured);
- backtrace_.assign(full_trace.begin() + first_call, full_trace.begin() + last_call);
-}
-
-Backtrace::~Backtrace() {
-}
-
-vector<string> Backtrace::CallStack() const {
- vector<string> callstack;
- callstack.reserve(backtrace_.size());
- char** mangled = backtrace_symbols(&backtrace_.front(), backtrace_.size());
- for (size_t i = 0; i != backtrace_.size(); ++i) {
- callstack.push_back(demangle(mangled[i]));
- }
- free(mangled);
- return callstack;
-}
-
-Thread::Id Backtrace::ThreadId() const {
- return thread_id_;
-}
-
-ostream& operator<< (ostream& os, const Backtrace& bt) {
- const vector<string> symbols = bt.CallStack();
- os<<"Stack trace ("<<bt.ThreadId()<<")\n";
- if (symbols.empty()) {
- os<<"Not available"<<std::endl;
- } else for (size_t i = 0; i < symbols.size(); ++i) {
- os<<symbols[i]<<std::endl;
- }
- return os;
-}
-
-} // namespace utils
diff --git a/SDL_Core/src/components/utils/src/bitstream.cc b/SDL_Core/src/components/utils/src/bitstream.cc
deleted file mode 100644
index faa94fb61..000000000
--- a/SDL_Core/src/components/utils/src/bitstream.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "utils/bitstream.h"
-
-namespace utils {
-
-BitStream::BitStream(uint8_t* bytes, size_t bytes_count)
- : bytes_(bytes),
- bytes_count_(bytes_count),
- byte_offset_(0),
- bit_offset_(0),
- bad_(false) {
-}
-
-BitStream::~BitStream() {
-}
-
-size_t BitStream::FullBytesLeft() {
- size_t left = bytes_count_ - byte_offset_;
- if (bit_offset_ != 0)
- left -= 1;
- return left;
-}
-
-size_t BitStream::BitsLeft() {
- return (bytes_count_ - byte_offset_) * CHAR_BIT - bit_offset_;
-}
-
-void BitStream::ExtractBytes(void* buffer, size_t length) {
- DCHECK(length == 0 || buffer != NULL);
- if (IsGood()) {
- if (bit_offset_ != 0 || // bytes can be extracted only when
- FullBytesLeft() < length) { // stream is byte-aligned
- MarkBad();
- return;
- }
- }
- memcpy(buffer, &bytes_[byte_offset_], length);
- byte_offset_ += length;
-}
-
-void Extract(BitStream* bs, uint8_t* val) {
- DCHECK(bs && val);
- if (*bs) {
- bs->Extract(*val);
- }
-}
-
-void Extract(BitStream* bs, uint8_t* val, size_t bits) {
- DCHECK(bs && val);
- if (*bs) {
- bs->ExtractBits(*val, bits);
- }
-}
-
-void Extract(BitStream* bs, uint32_t* val) {
- DCHECK(bs && val);
- if (*bs) {
- bs->Extract(*val);
- }
-}
-
-void Extract(BitStream* bs, uint32_t* val, size_t bits) {
- DCHECK(bs && val);
- if (*bs) {
- bs->ExtractBits(*val, bits);
- }
-}
-
-void Extract(BitStream* bs, std::string* str, size_t length) {
- DCHECK(bs && str);
- if (*bs) {
- // Prevent memory over-allocation
- if (bs->FullBytesLeft() < length) {
- bs->MarkBad();
- return;
- }
- str->resize(length+1);
- void* stringdata = &(*str)[0];
- bs->ExtractBytes(stringdata, length);
- str->resize(length);
- }
-}
-
-void Extract(BitStream* bs, std::vector<uint8_t>* data, size_t length) {
- DCHECK(bs && data);
- if (*bs) {
- // Prevent memory over-allocation
- if (bs->FullBytesLeft() < length) {
- bs->MarkBad();
- return;
- }
- data->resize(length);
-
- // Don't call vector::front() on an empty vector (it's undefined)
- if (length != 0)
- {
- void* dataptr = &data->front();
- bs->ExtractBytes(dataptr, length);
- }
- }
-}
-
-} // namespace utils
-
diff --git a/SDL_Core/src/components/utils/src/conditional_variable_posix.cc b/SDL_Core/src/components/utils/src/conditional_variable_posix.cc
deleted file mode 100644
index c11b063d0..000000000
--- a/SDL_Core/src/components/utils/src/conditional_variable_posix.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "utils/conditional_variable.h"
-
-#include <errno.h>
-#include <time.h>
-
-#include "utils/lock.h"
-#include "utils/logger.h"
-
-namespace {
-log4cxx::LoggerPtr g_logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
-
-const long kNanosecondsPerSecond = 1000000000;
-const long kMillisecondsPerSecond = 1000;
-const long kNanosecondsPerMillisecond = 1000000;
-}
-
-namespace sync_primitives {
-
-ConditionalVariable::ConditionalVariable() {
- pthread_condattr_t attrs;
- int32_t initialized = pthread_condattr_init(&attrs);
- if (initialized != 0)
- LOG4CXX_ERROR(g_logger, "Failed to initialize "
- "conditional variable attributes");
-#ifdef __linux__
- pthread_condattr_setclock(&attrs, CLOCK_MONOTONIC); // Default (non linux) will use the CPU clock
-#endif
- initialized = pthread_cond_init(&cond_var_, &attrs);
- if (initialized != 0)
- LOG4CXX_ERROR(g_logger, "Failed to initialize "
- "conditional variable");
- int32_t rv = pthread_condattr_destroy(&attrs);
- if (rv != 0)
- LOG4CXX_ERROR(g_logger, "Failed to destroy "
- "conditional variable attributes");
-}
-
-ConditionalVariable::~ConditionalVariable() {
- pthread_cond_destroy(&cond_var_);
-
-}
-
-void ConditionalVariable::NotifyOne() {
- int32_t signaled = pthread_cond_signal(&cond_var_);
- if (signaled != 0)
- LOG4CXX_ERROR(g_logger, "Failed to signal conditional variable");
-
-}
-
-void ConditionalVariable::Broadcast() {
- int32_t signaled = pthread_cond_broadcast(&cond_var_);
- if (signaled != 0)
- LOG4CXX_ERROR(g_logger, "Failed to broadcast conditional variable");
-
-}
-
-void ConditionalVariable::Wait(AutoLock& auto_lock) {
- Lock& lock = auto_lock.GetLock();
- lock.AssertTakenAndMarkFree();
- int32_t wait_status = pthread_cond_wait(&cond_var_,
- &lock.mutex_);
- lock.AssertFreeAndMarkTaken();
- if (wait_status != 0)
- LOG4CXX_ERROR(g_logger, "Failed to wait for conditional variable");
-}
-
-#ifdef OS_LINUX
-static void current_time(struct timespec *ts) {
- clock_gettime(CLOCK_MONOTONIC, ts);
-}
-#elif OS_MACOSX
-#include <mach/clock.h>
-#include <mach/mach.h>
-static void current_time(struct timespec *ts) {
- clock_serv_t cclock;
- mach_timespec_t mts;
- host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
- clock_get_time(cclock, &mts);
- mach_port_deallocate(mach_task_self(), cclock);
- ts->tv_sec = mts.tv_sec;
- ts->tv_nsec = mts.tv_nsec;
-}
-#endif
-
-ConditionalVariable::WaitStatus ConditionalVariable::WaitFor(
- AutoLock& auto_lock, int32_t milliseconds){
- struct timespec now;
- current_time(&now);
- timespec wait_interval;
- wait_interval.tv_sec = now.tv_sec +
- (milliseconds / kMillisecondsPerSecond);
- wait_interval.tv_nsec = now.tv_nsec +
- (milliseconds % kMillisecondsPerSecond) * kNanosecondsPerMillisecond;
- wait_interval.tv_sec += wait_interval.tv_nsec / kNanosecondsPerSecond;
- wait_interval.tv_nsec %= kNanosecondsPerSecond;
-
- Lock& lock = auto_lock.GetLock();
- lock.AssertTakenAndMarkFree();
- int32_t timedwait_status = pthread_cond_timedwait(&cond_var_,
- &lock.mutex_,
- &wait_interval);
- lock.AssertFreeAndMarkTaken();
- WaitStatus wait_status = kNoTimeout;
- switch(timedwait_status) {
- case 0: {
- wait_status = kNoTimeout;
- } break;
- case EINTR: {
- wait_status = kNoTimeout;
- } break;
- case ETIMEDOUT: {
- wait_status = kTimeout;
- } break;
- default: {
- LOG4CXX_ERROR(g_logger, "Failed to timewait for conditional variable");
- }
- }
-
- return wait_status;
-}
-
-} // namespace sync_primitives
diff --git a/SDL_Core/src/components/utils/src/date_time.cc b/SDL_Core/src/components/utils/src/date_time.cc
deleted file mode 100644
index 644e938a9..000000000
--- a/SDL_Core/src/components/utils/src/date_time.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
-* \file request_watchdog.h
-* \brief DateTime class source file.
-*
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <sys/time.h>
-#include <stdint.h>
-#include "utils/date_time.h"
-
-namespace date_time {
-
-int32_t const DateTime::MILLISECONDS_IN_SECOND;
-int32_t const DateTime::MICROSECONDS_IN_MILLISECONDS;
-
-struct timeval DateTime::getCurrentTime() {
- struct timeval currentTime;
- struct timezone timeZone;
-
- gettimeofday(&currentTime, &timeZone);
-
- return currentTime;
-}
-
-int32_t DateTime::calculateTimeSpan(struct timeval sinceTime) {
- struct timeval currentTime, timeDifference;
- struct timezone timeZone;
-
- gettimeofday(&currentTime, &timeZone);
-
- timeDifference.tv_sec = currentTime.tv_sec - sinceTime.tv_sec;
-
- timeDifference.tv_usec = currentTime.tv_usec - sinceTime.tv_usec;
-
- if ( timeDifference.tv_usec < 0 ) {
- timeDifference.tv_sec--;
- timeDifference.tv_usec += MILLISECONDS_IN_SECOND
- * MICROSECONDS_IN_MILLISECONDS;
- }
-
- return timeDifference.tv_sec * MILLISECONDS_IN_SECOND
- + timeDifference.tv_usec / MICROSECONDS_IN_MILLISECONDS;
-}
-
-} // namespace date_time
diff --git a/SDL_Core/src/components/utils/src/file_system.cc b/SDL_Core/src/components/utils/src/file_system.cc
deleted file mode 100644
index 2e5b909af..000000000
--- a/SDL_Core/src/components/utils/src/file_system.cc
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/file_system.h"
-
-#include <sys/statvfs.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <dirent.h>
-#include <unistd.h>
-// TODO(VS): lint error: Streams are highly discouraged.
-#include <fstream>
-#include <cstddef>
-#include <algorithm>
-#include "config_profile/profile.h"
-
-uint64_t file_system::GetAvailableDiskSpace() {
- char currentAppPath[FILENAME_MAX];
- memset(reinterpret_cast<void*>(currentAppPath), 0, FILENAME_MAX);
- getcwd(currentAppPath, FILENAME_MAX - 1);
-
- struct statvfs fsInfo;
- memset(reinterpret_cast<void*>(&fsInfo), 0, sizeof(fsInfo));
- if( statvfs(currentAppPath, &fsInfo) == 0) {
- return fsInfo.f_bsize * fsInfo.f_bfree;
- } else {
- return 0;
- }
-}
-
-uint32_t file_system::FileSize(const std::string &path) {
- if (file_system::FileExists(path)) {
- struct stat file_info;
- memset(reinterpret_cast<void*>(&file_info), 0, sizeof(file_info));
- stat(path.c_str(), &file_info);
- return file_info.st_size;
- }
- return 0;
-}
-
-uint32_t file_system::DirectorySize(const std::string& path) {
- uint32_t size = 0;
- int32_t return_code = 0;
- DIR* directory = NULL;
-
-#ifndef __QNXNTO__
- struct dirent dir_element_;
- struct dirent* dir_element = &dir_element_;
-#else
- char* direntbuffer =
- new char[offsetof(struct dirent, d_name) +
- pathconf(path.c_str(), _PC_NAME_MAX) + 1];
- struct dirent* dir_element = new(direntbuffer) dirent;
-#endif
- struct dirent* result = NULL;
- struct stat file_info;
- directory = opendir(path.c_str());
- if (NULL != directory) {
- return_code = readdir_r(directory, dir_element, &result);
- for (; NULL != result && 0 == return_code;
- return_code = readdir_r(directory, dir_element, &result)) {
- if (0 == strcmp(result->d_name, "..")
- || 0 == strcmp(result->d_name, ".")) {
- continue;
- }
- std::string full_element_path = path + "/" + result->d_name;
- if (file_system::IsDirectory(full_element_path)) {
- size += DirectorySize(full_element_path);
- } else {
- memset(reinterpret_cast<void*>(&file_info), 0, sizeof(file_info));
- stat(full_element_path.c_str(), &file_info);
- size += file_info.st_size;
- }
- }
- }
- closedir(directory);
-#ifdef __QNXNTO__
- delete[] direntbuffer;
-#endif
- return size;
-}
-
-uint32_t file_system::GetAvailableSpaceForApp(const std::string& app_name) {
- const uint32_t app_quota = profile::Profile::instance()->app_dir_quota();
- if (DirectoryExists(app_name)) {
- std::string full_path = FullPath(app_name);
- uint32_t size_of_directory = DirectorySize(full_path);
- if (app_quota < size_of_directory) {
- return 0;
- }
- uint32_t current_app_quota = app_quota - size_of_directory;
- uint32_t available_disk_space = GetAvailableDiskSpace();
- if (current_app_quota > available_disk_space) {
- return available_disk_space;
- } else {
- return current_app_quota;
- }
- } else {
- return app_quota;
- }
-}
-
-std::string file_system::CreateDirectory(const std::string& name) {
- if (!DirectoryExists(name)) {
- mkdir(name.c_str(), S_IRWXU);
- }
-
- return name;
-}
-
-bool file_system::IsDirectory(const std::string& name) {
- struct stat status;
- memset(&status, 0, sizeof(status));
-
- if (-1 == stat(name.c_str(), &status)) {
- return false;
- }
-
- return S_ISDIR(status.st_mode);
-}
-
-bool file_system::DirectoryExists(const std::string& name) {
- struct stat status;
- memset(&status, 0, sizeof(status));
-
- if (-1 == stat(name.c_str(), &status) || !S_ISDIR(status.st_mode)) {
- return false;
- }
-
- return true;
-}
-
-bool file_system::FileExists(const std::string& name) {
- struct stat status;
- memset(&status, 0, sizeof(status));
-
- if (-1 == stat(name.c_str(), &status)) {
- return false;
- }
- return true;
-}
-
-bool file_system::Write(
- const std::string& file_name, const std::vector<uint8_t>& data,
- std::ios_base::openmode mode) {
- std::ofstream file(file_name.c_str(), std::ios_base::binary | mode);
- if (file.is_open()) {
- for (int32_t i = 0; i < data.size(); ++i) {
- file << data[i];
- }
- file.close();
- return true;
- }
- return false;
-}
-
-
-
-std::ofstream* file_system::Open(const std::string& file_name,
- std::ios_base::openmode mode) {
-
-
- std::ofstream* file = new std::ofstream();
- file->open( file_name.c_str(),std::ios_base::binary | mode);
- if (file->is_open()) {
-
- return file;
- }
-
- return NULL;
-}
-
-bool file_system::Write(std::ofstream* const file_stream,
- const uint8_t* data,
- uint32_t data_size) {
- bool result = false;
- if (file_stream) {
- for (size_t i = 0; i < data_size; ++i) {
- (*file_stream) << data[i];
- }
- result = true;
- }
- return result;
-}
-
-void file_system::Close(std::ofstream* file_stream) {
- if (file_stream) {
- file_stream->close();
- }
-}
-
-std::string file_system::FullPath(const std::string& file) {
- // FILENAME_MAX defined stdio_lim.h was replaced with less value
- // since it seems, that is caused overflow in some cases
-
- size_t filename_max_lenght = 1024;
- char currentAppPath[filename_max_lenght];
- memset(currentAppPath, 0, filename_max_lenght);
- getcwd(currentAppPath, filename_max_lenght);
-
- char path[filename_max_lenght];
- memset(path, 0, filename_max_lenght);
- snprintf(path, filename_max_lenght - 1, "%s/%s", currentAppPath, file.c_str());
- return std::string(path);
-}
-
-bool file_system::DeleteFile(const std::string& name) {
- if (FileExists(name) && IsAccessible(name, W_OK)) {
- return !remove(name.c_str());
- }
- return false;
-}
-
-void remove_directory_content(const std::string& directory_name) {
- int32_t return_code = 0;
- DIR* directory = NULL;
-#ifndef __QNXNTO__
- struct dirent dir_element_;
- struct dirent* dir_element = &dir_element_;
-#else
- char* direntbuffer =
- new char[offsetof(struct dirent, d_name) +
- pathconf(directory_name.c_str(), _PC_NAME_MAX) + 1];
- struct dirent* dir_element = new(direntbuffer) dirent;
-#endif
- struct dirent* result = NULL;
-
- directory = opendir(directory_name.c_str());
-
- if (NULL != directory) {
- return_code = readdir_r(directory, dir_element, &result);
-
- for (; NULL != result && 0 == return_code;
- return_code = readdir_r(directory, dir_element, &result)) {
- if (0 == strcmp(result->d_name, "..")
- || 0 == strcmp(result->d_name, ".")) {
- continue;
- }
-
- std::string full_element_path = directory_name + "/" + result->d_name;
-
- if (file_system::IsDirectory(full_element_path)) {
- remove_directory_content(full_element_path);
- rmdir(full_element_path.c_str());
- } else {
- remove(full_element_path.c_str());
- }
- }
- }
-
- closedir(directory);
-#ifdef __QNXNTO__
- delete[] direntbuffer;
-#endif
-}
-
-bool file_system::RemoveDirectory(const std::string& directory_name,
- bool is_recursively) {
- if (DirectoryExists(directory_name)
- && IsAccessible(directory_name, W_OK)) {
- if (is_recursively) {
- remove_directory_content(directory_name);
- }
-
- return !rmdir(directory_name.c_str());
- }
- return false;
-}
-
-bool file_system::IsAccessible(const std::string& name, int32_t how) {
- return !access(name.c_str(), how);
-}
-
-std::vector<std::string> file_system::ListFiles(
- const std::string& directory_name) {
- std::vector<std::string> listFiles;
- if (!DirectoryExists(directory_name)) {
- return listFiles;
- }
-
- int32_t return_code = 0;
- DIR* directory = NULL;
-#ifndef __QNXNTO__
- struct dirent dir_element_;
- struct dirent* dir_element = &dir_element_;
-#else
- char* direntbuffer =
- new char[offsetof(struct dirent, d_name) +
- pathconf(directory_name.c_str(), _PC_NAME_MAX) + 1];
- struct dirent* dir_element = new(direntbuffer) dirent;
-#endif
- struct dirent* result = NULL;
-
- directory = opendir(directory_name.c_str());
- if (NULL != directory) {
- return_code = readdir_r(directory, dir_element, &result);
-
- for (; NULL != result && 0 == return_code;
- return_code = readdir_r(directory, dir_element, &result)) {
- if (0 == strcmp(result->d_name, "..")
- || 0 == strcmp(result->d_name, ".")) {
- continue;
- }
-
- listFiles.push_back(std::string(result->d_name));
- }
-
- closedir(directory);
-#ifdef __QNXNTO__
- delete[] direntbuffer;
-#endif
- }
-
- return listFiles;
-}
-
-bool file_system::ReadBinaryFile(const std::string& name,
- std::vector<uint8_t>& result) {
- if (!FileExists(name) || !IsAccessible(name, R_OK)) {
- return false;
- }
-
- std::ifstream file(name.c_str(), std::ios_base::binary);
- std::ostringstream ss;
- ss << file.rdbuf();
- const std::string& s = ss.str();
-
- result.resize(s.length());
- std::copy(s.begin(), s.end(), result.begin());
- return true;
-}
-
-bool file_system::ReadFile(const std::string& name, std::string& result) {
- if (!FileExists(name) || !IsAccessible(name, R_OK)) {
- return false;
- }
-
- std::ifstream file(name.c_str());
- std::ostringstream ss;
- ss << file.rdbuf();
- result = ss.str();
- return true;
-}
-
-const std::string file_system::ConvertPathForURL(const std::string& path) {
- std::string::const_iterator it_path = path.begin();
- std::string::const_iterator it_path_end = path.end();
-
- const std::string reserved_symbols = "!#$&'()*+,:;=?@[] ";
- std::string::const_iterator it_sym = reserved_symbols.begin();
- std::string::const_iterator it_sym_end = reserved_symbols.end();
-
- std::string converted_path;
- while (it_path != it_path_end) {
-
- it_sym = reserved_symbols.begin();
- for (; it_sym != it_sym_end; ++it_sym) {
-
- if (*it_path == *it_sym) {
- size_t size = 100;
- char percent_value[size];
- snprintf(percent_value, size, "%%%x", *it_path);
- converted_path += percent_value;
- ++it_path;
- continue;
- }
- }
-
- converted_path += *it_path;
- ++it_path;
- }
-
- return converted_path;
-}
diff --git a/SDL_Core/src/components/utils/src/lock_posix.cc b/SDL_Core/src/components/utils/src/lock_posix.cc
deleted file mode 100644
index be292f3e6..000000000
--- a/SDL_Core/src/components/utils/src/lock_posix.cc
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/lock.h"
-
-#include <errno.h>
-
-#include "utils/logger.h"
-
-namespace {
-log4cxx::LoggerPtr g_logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
-}
-
-namespace sync_primitives {
-
-Lock::Lock()
-#ifndef NDEBUG
- : lock_taken_(false)
-#endif // NDEBUG
-{
- int32_t status = pthread_mutex_init(&mutex_, NULL);
- if (status != 0) {
- LOG4CXX_ERROR(g_logger, "Failed to initialize mutex");
- }
-}
-
-Lock::~Lock() {
-#ifndef NDEBUG
- if (lock_taken_) {
- LOG4CXX_ERROR(g_logger, "Destroying non-released mutex");
- }
-#endif
- int32_t status = pthread_mutex_destroy(&mutex_);
- if (status != 0) {
- LOG4CXX_ERROR(g_logger, "Failed to destroy mutex");
- }
-}
-
-void Lock::Ackquire() {
- int32_t status = pthread_mutex_lock(&mutex_);
- if (status != 0) {
- LOG4CXX_ERROR(g_logger, "Failed to acquire mutex");
- }
- AssertFreeAndMarkTaken();
-}
-
-void Lock::Release() {
- AssertTakenAndMarkFree();
- int32_t status = pthread_mutex_unlock(&mutex_);
- if (status != 0) {
- LOG4CXX_ERROR(g_logger, "Failed to unlock mutex");
- }
-}
-
-bool Lock::Try() {
- bool ackquired = false;
-#ifndef NDEBUG
- if (lock_taken_) {
- LOG4CXX_ERROR(g_logger, "Trying to lock already taken mutex");
- }
-#endif
- switch(pthread_mutex_trylock(&mutex_)) {
- case 0: {
- ackquired = true;
-#ifndef NDEBUG
- lock_taken_ = true;
-#endif
- } break;
- case EBUSY: {
- ackquired = false;
- } break;
- default: {
- ackquired = false;
- LOG4CXX_ERROR(g_logger, "Failed to try lock the mutex");
- }
- }
- return ackquired;
-}
-
-#ifndef NDEBUG
-void Lock::AssertFreeAndMarkTaken() {
- if (lock_taken_) {
- LOG4CXX_ERROR(g_logger, "Locking already taken mutex");
- }
- lock_taken_ = true;
-}
-void Lock::AssertTakenAndMarkFree() {
- if (!lock_taken_) {
- LOG4CXX_ERROR(g_logger, "Unlocking a mutex that is not taken");
- }
- lock_taken_ = false;
-}
-#endif
-
-
-} // namespace sync_primitives
diff --git a/SDL_Core/src/components/utils/src/signals_linux.cc b/SDL_Core/src/components/utils/src/signals_linux.cc
deleted file mode 100644
index 1821f6fbe..000000000
--- a/SDL_Core/src/components/utils/src/signals_linux.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
-* \file signals.cc
-* \brief Signal (i.e. SIGINT) handling.
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-#include <csignal>
-#include <stdint.h>
-
-namespace utils {
-
-bool SubscribeToTerminateSignal(void (*func)(int32_t p)) {
- void (*prev_func)(int32_t p);
-
- prev_func = signal(SIGINT, func);
- return (SIG_ERR != prev_func);
-}
-
-bool ResetSubscribeToTerminateSignal() {
- void (*prev_func)(int32_t p);
- prev_func = signal(SIGINT, SIG_DFL);
- return (SIG_ERR != prev_func);
-}
-
-void ForwardSignal() {
- int32_t signal_id = SIGINT;
- raise(signal_id);
-}
-
-} // namespace utils
diff --git a/SDL_Core/src/components/utils/src/threads/posix_thread.cc b/SDL_Core/src/components/utils/src/threads/posix_thread.cc
deleted file mode 100644
index 719b3d4a5..000000000
--- a/SDL_Core/src/components/utils/src/threads/posix_thread.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <limits.h>
-#include <stddef.h>
-
-#include "utils/threads/thread.h"
-#include "utils/threads/thread_manager.h"
-
-using namespace std;
-using namespace threads::impl;
-
-namespace {
-static void* threadFunc(void* closure) {
- threads::ThreadDelegate* delegate =
- static_cast<threads::ThreadDelegate*>(closure);
- delegate->threadMain();
- return NULL;
-}
-}
-
-namespace threads {
-size_t Thread::kMinStackSize = PTHREAD_STACK_MIN; /* Ubuntu : 16384 ; QNX : 256; */
-log4cxx::LoggerPtr Thread::logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("threads::Thread"));
-
-bool Thread::Id::operator==(const Thread::Id other) const {
- return pthread_equal(id_, other.id_) != 0;
-}
-
-// static
-Thread::Id Thread::CurrentId() {
- return Id(pthread_self());
-}
-
-//static
-std::string Thread::NameFromId(Id thread_id) {
- return ThreadManager::instance()->GetName(thread_id.id_);
-}
-
-//static
-void Thread::SetNameForId(Id thread_id, const std::string& name) {
- ThreadManager::instance()->RegisterName(thread_id.id_, name);
-}
-
-
-Thread::Thread(const char* name, ThreadDelegate* delegate)
- : name_("undefined"),
- delegate_(delegate),
- thread_handle_(0),
- thread_options_(),
- isThreadRunning_(false) {
- if (name) {
- name_ = name;
- }
-}
-
-Thread::~Thread() {
- ThreadManager::instance()->Unregister(thread_handle_);
- if (delegate_) {
- delete delegate_;
- }
-}
-
-bool Thread::start() {
- return startWithOptions(thread_options_);
-}
-
-bool Thread::startWithOptions(const ThreadOptions& options) {
- if (!delegate_) {
- NOTREACHED();
- return false;
- }
-
- thread_options_ = options;
-
- bool success = false;
- pthread_attr_t attributes;
- int pthread_result = pthread_attr_init(&attributes);
- if (pthread_result != 0) {
- LOG4CXX_INFO(logger_,"Couldn't init pthread attributes."
- " Error code = " << pthread_result);
- }
- if (!thread_options_.is_joinable()) {
- pthread_result = pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
- if (pthread_result != 0) {
- LOG4CXX_INFO(logger_,"Couldn't set detach state attribute. Error code = " << pthread_result);
- }
- }
-
- // 0 - default value
- if (thread_options_.stack_size() > 0
- && thread_options_.stack_size() >= Thread::kMinStackSize) {
- pthread_result = pthread_attr_setstacksize(&attributes, thread_options_.stack_size());
- if (pthread_result != 0) {
- LOG4CXX_INFO(logger_,"Couldn't set stacksize = " << thread_options_.stack_size() <<
- "Error code = " << pthread_result);
- }
- }
- success = !pthread_create(&thread_handle_, &attributes, threadFunc,
- delegate_);
- if (success) {
-#ifdef __linux__
- pthread_result = pthread_setname_np(thread_handle_, name_.c_str());
-#elif OS_MACOSX
- pthread_result = pthread_setname_np(name_.c_str());
-#endif
-# ifdef __QNXNTO__
- if (pthread_result != EOK) {
- LOG4CXX_INFO(logger_,"Couldn't set pthread name"
- " Error code = " << pthread_result);
- }
-# endif
- LOG4CXX_INFO(logger_,"Created thread: " << name_);
- ThreadManager::instance()->RegisterName(thread_handle_, name_);
- }
-
- isThreadRunning_ = success;
-
- pthread_result = pthread_attr_destroy(&attributes);
- if (pthread_result != 0) {
- LOG4CXX_INFO(logger_,"Couldn't destroy pthread attributes."
- " Error code = " << pthread_result);
- }
- return success;
-}
-
-void Thread::stop() {
- if (!is_running()) {
- return;
- }
-
- if (NULL != delegate_) {
- if (!delegate_->exitThreadMain()) {
- if (thread_handle_ != pthread_self()) {
- pthread_cancel(thread_handle_);
- }
- }
- }
-
- // Wait for the thread to exit. It should already have terminated but make
- // sure this assumption is valid.
-
- join();
-}
-
-void Thread::join() {
- int pthread_result = pthread_join(thread_handle_, NULL);
- if (pthread_result != 0) {
- LOG4CXX_INFO(logger_,"Couldn't join thread "
- " Error code = " << pthread_result);
- }
- isThreadRunning_ = false;
-}
-
-std::ostream& operator<<(std::ostream& os, Thread::Id thread_id) {
- return os<<Thread::NameFromId(thread_id);
-}
-
-} // namespace threads
diff --git a/SDL_Core/src/components/utils/src/threads/thread_manager.cc b/SDL_Core/src/components/utils/src/threads/thread_manager.cc
deleted file mode 100644
index e4b96aa51..000000000
--- a/SDL_Core/src/components/utils/src/threads/thread_manager.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/threads/thread_manager.h"
-
-#include <sstream>
-
-#if defined(OS_LINUX)
-#include <sys/syscall.h>
-#include <unistd.h>
-#endif
-
-namespace threads {
-namespace impl {
-using namespace std;
-using namespace sync_primitives;
-
-namespace {
-
-const char* kUnknownName = "UnnamedThread";
-
-log4cxx::LoggerPtr g_logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
-
-} // namespace
-
-UnnamedThreadRegistry::UnnamedThreadRegistry() {
-
-}
-
-UnnamedThreadRegistry::~UnnamedThreadRegistry() {
-
-}
-
-std::string UnnamedThreadRegistry::GetUniqueName(PlatformThreadHandle id) {
- AutoLock auto_lock(state_lock_);
- IdNameMap::iterator found = id_number_.find(id);
- if (found != id_number_.end()) {
- return found->second;
- } else {
- ++last_thread_number_;
- std::stringstream namestream;
- namestream<<kUnknownName<<last_thread_number_;
- return id_number_[id] = namestream.str();
- }
-}
-
-ThreadManager::ThreadManager() {
- names_.insert(kUnknownName);
-}
-
-ThreadManager::~ThreadManager() {
-}
-
-void ThreadManager::RegisterName(PlatformThreadHandle id, const string& name) {
- AutoLock auto_lock(state_lock_);
- if (names_.count(name) == 0) {
- names_.insert(name);
- pair<IdNamesMap::iterator, bool> inserted =
- id_names_.insert(make_pair(id, name));
- if (!inserted.second) {
- LOG4CXX_ERROR(g_logger, "Trying to register thread name " << name
- <<", but it is already registered with name "
- <<inserted.first->second);
- }
- } else {
- LOG4CXX_ERROR(g_logger, "Ignoring duplicate thread name: " + name);
- }
-}
-
-string ThreadManager::GetName(PlatformThreadHandle id) const {
- AutoLock auto_lock(state_lock_);
- IdNamesMap::const_iterator found = id_names_.find(id);
- if (found != id_names_.end()) {
- return found->second;
- } else {
- LOG4CXX_WARN(g_logger, "Thread doesn't have associated name");
- return unnamed_thread_namer_.GetUniqueName(id);
- }
-}
-
-void ThreadManager::Unregister(PlatformThreadHandle id) {
- AutoLock auto_lock(state_lock_);
- string name = id_names_[id];
- names_.erase(name);
- id_names_.erase(id);
-}
-
-
-} // namespace impl
-} // namespace threads
diff --git a/SDL_Core/src/components/utils/src/threads/thread_validator.cc b/SDL_Core/src/components/utils/src/threads/thread_validator.cc
deleted file mode 100644
index 5bc66f138..000000000
--- a/SDL_Core/src/components/utils/src/threads/thread_validator.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "utils/threads/thread_validator.h"
-
-#include "utils/logger.h"
-#include "utils/back_trace.h"
-
-namespace threads {
-
-namespace {
-log4cxx::LoggerPtr g_logger =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger("Utils"));
-}
-
-SingleThreadSimpleValidator::SingleThreadSimpleValidator()
- : creation_thread_id_(Thread::CurrentId()) {
-}
-
-SingleThreadSimpleValidator::~SingleThreadSimpleValidator() {
-}
-
-void SingleThreadSimpleValidator::AssertRunningOnCreationThread() const {
- Thread::Id current_id = Thread::CurrentId();
- if (creation_thread_id_ != current_id) {
- LOG4CXX_ERROR(g_logger, "Single-threaded object created at thread "
- << creation_thread_id_
- <<" is accessed from thread "
- << current_id
-#ifdef BACKTRACE_SUPPORT
- << "\n"
- << utils::Backtrace()
-#endif
- );
- }
-}
-
-
-SingleThreadValidator::SingleThreadValidator()
- : owning_thread_id_(Thread::CurrentId()){
-}
-
-SingleThreadValidator::~SingleThreadValidator() {
-}
-
-void SingleThreadValidator::PassToThread(Thread::Id thread_id) const {
- owning_thread_id_ = thread_id;
-}
-
-void SingleThreadValidator::AssertRunningOnValidThread() const {
- Thread::Id current_id = Thread::CurrentId();
- if (owning_thread_id_ != current_id) {
- LOG4CXX_ERROR(g_logger, "Single-threaded object owned by thread "
- << owning_thread_id_
- << " is accessed from thread "
- << current_id << "\n"
-#ifdef BACKTRACE_SUPPORT
- << utils::Backtrace()
-#endif
- );
- }
-}
-
-
-} // namespace threads
-
-// vim: set ts=2 sw=2 et:
diff --git a/SDL_Core/src/thirdPartyLibs/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/CMakeLists.txt
deleted file mode 100644
index 1d5f27fcf..000000000
--- a/SDL_Core/src/thirdPartyLibs/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# --- jsoncpp
-add_subdirectory(./jsoncpp)
-
-# --- MessageBroker
-add_subdirectory(./MessageBroker)
-
-# --- encryption
-add_subdirectory(./encryption)
-
-if (BUILD_USB_SUPPORT)
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-add_subdirectory(./libusbx-1.0.16)
-endif()
-endif()
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/MessageBroker/CMakeLists.txt
deleted file mode 100644
index 1d8671144..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-include_directories (
- ./include/
- ../jsoncpp/include
-)
-
-set (MESSAGE_BROKER_SOURCES
- ./src/lib_messagebroker/CMessageBroker.cpp
- ./src/lib_messagebroker/CMessageBrokerRegistry.cpp
- ./src/lib_messagebroker/md5.cpp
- ./src/lib_messagebroker/system.cpp
- ./src/lib_messagebroker/websocket_handler.cpp
-)
-
-set (MESSAGE_BROKER_CLIENT_SOURCES
- ./src/client/mb_client.cpp
- ./src/client/mb_tcpclient.cpp
- ./src/client/mb_controller.cpp
-)
-
-set (MESSAGE_BROKER_SERVER_SOURCES
- ./src/server/mb_server.cpp
- ./src/server/mb_tcpserver.cpp
- ./src/server/networking.cpp
-)
-
-add_library("MessageBroker" ${MESSAGE_BROKER_SOURCES})
-
-add_library("MessageBrokerClient" ${MESSAGE_BROKER_CLIENT_SOURCES})
-target_link_libraries("MessageBrokerClient" "MessageBroker")
-
-add_library("MessageBrokerServer" ${MESSAGE_BROKER_SERVER_SOURCES})
-target_link_libraries("MessageBrokerServer" "MessageBroker") \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBroker.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBroker.hpp
deleted file mode 100644
index 4de9022ae..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBroker.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * \file CMessageBroker.hpp
- * \brief CMessageBroker singletone class header.
- * \author AKara
- */
-
-#ifndef CMESSAGEBROKER_H
-#define CMESSAGEBROKER_H
-
-#include <string>
-
-#include "CSender.hpp"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \enum ErrorCode
- * \brief MessageBroker error codes.
- * \note Value from -32099 to -32000 are reserved for implementation-defined server-errors.
- */
- enum ErrorCode
- {
- CONTROLLER_EXISTS = -32000, /**< Controller has been already registered. */
- SUBSCRIBTION_EXISTS = -32001, /**< Property has been already subscribed by this controller. */
- PARSING_ERROR = -32700, /**< Invalid JSON. An error occurred on the server while parsing the JSON text. */
- INVALID_REQUEST = -32600, /**< The received JSON not a valid MessageBroker Request. */
- METHOD_NOT_FOUND = -32601, /**< The requested remote-procedure does not exist / is not available. */
- INVALID_PARAMS = -32602, /**< Invalid method parameters. */
- INTERNAL_ERROR = -32603, /**< Internal MessageBroker error. */
- UNSUPPORTED_RESOURCE = 2 /**< Controller doesn't registered. */
- };
-
- /**
- * \brief Forward declaration of the private class.
- */
- class CMessageBroker_Private;
-
- /**
- * \class CMessageBroker
- * \brief Singletone CMessageBroker class implementation.
- */
- class CMessageBroker
- {
- public:
- /**
- * \brief Singletone instantiator.
- * \return pointer to CMessageBroker instance.
- */
- static CMessageBroker* getInstance();
-
- /**
- * \brief Destructor.
- */
- ~CMessageBroker();
-
- /**
- * \brief Receive data from TCP server (from client).
- * \param fd FileDescriptor of socket.
- * \param aJSONData JSON string.
- */
- void onMessageReceived(int fd, std::string& aJSONData);
-
- /**
- * \brief Test of buffer parsing.
- */
- void Test();
-
-
- /**
- * \brief Starts MessageBroker.
- */
- void startMessageBroker(CSender* pSender);
-
- /**
- * \brief Stops MessageBroker.
- */
- void stopMessageBroker();
-
- /**
- * \brief Method for thread with que processing.
- */
- void* MethodForThread(void * arg);
-
- private:
- /**
- * \brief Private constructor.
- */
- CMessageBroker();
-
- /**
- * \brief The PIMPL of the class.
- */
- CMessageBroker_Private *p;
- };
-} /* namespace NsMessageBroker */
-
-#endif // CMESSAGEBROKER_H
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBrokerRegistry.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBrokerRegistry.hpp
deleted file mode 100644
index 81d7f79c7..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CMessageBrokerRegistry.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef CMESSAGEBROKERREGISTRY_H
-#define CMESSAGEBROKERREGISTRY_H
-
-#include <map>
-#include <vector>
-#include <iostream>
-#include <string>
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
-
- /**
- * \class CMessageBrokerRegistry
- * \brief Singletone CMessageBrokerRegistry class implementation.
- */
- class CMessageBrokerRegistry
- {
- public:
- /**
- * \brief Singletone instantiator.
- * \return pointer to CMessageBroker instance
- */
- static CMessageBrokerRegistry* getInstance();
-
- /**
- * \brief Destructor.
- */
- ~CMessageBrokerRegistry();
-
- /**
- * \brief adds controller to the registry.
- * \param fd file descriptor of controller.
- * \param name name of controller.
- * \return false if already exist.
- */
- bool addController(int fd, std::string name);
-
- /**
- * \brief deletes controller from the registry.
- * \param name name of controller.
- */
- void deleteController(std::string name);
-
- /**
- * \brief adds notification subscriber to the registry.
- * \param fd file descriptor of controller.
- * \param name name of property which should be observed.
- * \return false if already exist.
- */
- bool addSubscriber(int fd, std::string name);
-
- /**
- * \brief deletes notification subscriber from the registry.
- * \param fd file descriptor of controller.
- * \param name name of property which should be observed.
- */
- void deleteSubscriber(int fd, std::string name);
-
- /**
- * \brief gets controller fd from the registry by name.
- * \param name name of controller.
- * \return file descriptor of controller.
- */
- int getDestinationFd(std::string name);
-
- /**
- * \brief gets subscribers fd's.
- * \param name name of property.
- * \param result vector for results.
- * \return count of subscribers.
- */
- int getSubscribersFd(std::string name, std::vector<int>& result);
- private:
- /**
- * \brief Constructor.
- */
- CMessageBrokerRegistry();
-
- /**
- * \brief Map to store controllers information like ComponentName:socketFd.
- * For example PhoneController:1080
- */
- std::map <std::string, int> mControllersList;
-
- /**
- * \brief Map to store subscribers information like ComponentName.PropertyName:socketFd:.
- * For example PhoneController.onPhoneBookChanged:1080
- */
- std::multimap <std::string, int> mSubscribersList;
- };
-} /* namespace NsMessageBroker */
-
-#endif // CMESSAGEBROKERREGISTRY_H
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CSender.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CSender.hpp
deleted file mode 100644
index 78faf7dad..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/CSender.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * \file CSender.hpp
- * \brief CSender class header.
- * \author AKara
- */
-
-#ifndef CSENDER_H
-#define CSENDER_H
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-typedef int ssize_t;
-#endif
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \class CSender
- * \brief CSender interface class implementation.
- */
- class CSender
- {
- public:
- /**
- * \brief Constructor.
- */
- CSender()
- {
- }
-
- /**
- * \brief Destructor.
- */
- ~CSender()
- {
- }
-
- /**
- * \brief Send data.
- * \param fd file descriptor of the client TCP socket
- * \param data data to send
- * \return number of bytes sent or -1 if error
- */
- virtual ssize_t Send(int fd, const std::string& data)=0;
- };
-} /* namespace NsMessageBroker */
-
-#endif // CSENDER_H
-
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/MBDebugHelper.h b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/MBDebugHelper.h
deleted file mode 100644
index fa835da3f..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/MBDebugHelper.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * \file MBDebugHelper.h
- * \brief DebugHelper.
- * \author AKara
- */
-
-#ifndef MB_DEBUG_HELPER_H
-#define MB_DEBUG_HELPER_H
-
-#include <cstdio>
-
-/**
-* \def DEBUG_ON
-* \brief Switches on debug messages.
-*/
-//#define DEBUG_ON
-
-#ifdef DEBUG_ON
-/**
-* \def DBG_MSG
-* \brief Debug message output with file name and line number.
-* \param x formatted debug message.
-* \return printf construction.
-*/
-#define DBG_MSG(x) printf("%s:%d ", __FILE__, __LINE__);\
- printf x
-#else
-#define DBG_MSG(x)
-#endif
-
-/**
-* \def DBG_MSG_ERROR
-* \brief Debug ERROR message output with file name and line number.
-* \param x formatted debug message.
-* \return printf construction.
-*/
-#define DBG_MSG_ERROR(x) printf("ERROR!!! %s:%d ", __FILE__, __LINE__);\
- printf x
-
-#endif /*MB_DEBUG_HELPER_H*/
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_client.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_client.hpp
deleted file mode 100644
index cd70a31cd..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_client.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * \file mb_client.hpp
- * \brief MessageBroker client.
- * \author AKara
- */
-
-#ifndef MB_CLIENT_H
-#define MB_CLIENT_H
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-typedef int ssize_t;
-#endif
-
-#include "networking.h"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
-
- /**
- * \class Client
- * \brief Abstract MessageBroker client.
- */
- class Client
- {
- public:
- /**
- * \brief Constructor.
- * \param address remote network address or FQDN to contact
- * \param port remote local port to contact
- */
- Client(const std::string& address, uint16_t port);
-
- /**
- * \brief Destructor.
- */
- virtual ~Client();
-
- /**
- * \brief Get socket descriptor.
- * \return socket descriptor.
- */
- int GetSocket() const;
-
- /**
- * \brief Get the address.
- * \return address or FQDN
- */
- std::string GetAddress() const;
-
- /**
- * \brief Get the port.
- * \return local port
- */
- uint16_t GetPort() const;
-
- /**
- * \brief Connect to the remote machine
- * \return true if success, false otherwise
- * \note on connectionless protocol like UDP, this function
- * always returns true even if remote peer is not reachable.
- */
- virtual bool Connect();
-
- /**
- * \brief Receive data from the network.
- * \param data if data is received it will put in this reference
- * \return number of bytes received or -1 if error
- * \note This method will blocked until data comes.
- */
- virtual ssize_t Recv(std::string& data) = 0;
-
- /**
- * \brief Close socket.
- */
- virtual void Close();
-
- protected:
- /**
- * \brief Socket descriptor.
- */
- int m_sock;
-
- /**
- * \brief Transport protocol of the socket.
- */
- enum networking::TransportProtocol m_protocol;
-
- /**
- * \brief Remote socket address.
- */
- struct sockaddr_storage m_sockaddr;
-
- /**
- * \brief Remote socket address length.
- */
- socklen_t m_sockaddrlen;
-
- /**
- * \brief Protected constructor so our inherited classes
- * don't need to call the default constructor
- */
- Client();
-
- /**
- * \brief Protected SetAddress so out inherited classes
- * don't need to call the default constructor
- */
- void SetAddress(const std::string& address);
-
- /**
- * \brief Protected SetPort so out inherited classes
- * don't need to call the default constructor
- */
- void SetPort(uint16_t port);
-
- private:
-
- /**
- * \brief Network address or FQDN.
- */
- std::string m_address;
-
- /**
- * \brief Local port.
- */
- uint16_t m_port;
- };
-
-} /* namespace NsMessageBroker */
-
-#endif /* MB_CLIENT_H */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_controller.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_controller.hpp
deleted file mode 100644
index d3dd305d9..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_controller.hpp
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * \file mb_controller.hpp
- * \brief MessageBroker Controller.
- * \author AKara
- */
-
-#ifndef MB_CONTROLLER_H
-#define MB_CONTROLLER_H
-
-#include <iostream>
-
-#include "json/json.h"
-
-#include "mb_tcpclient.hpp"
-
-#include <cstring>
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
-
- /**
- * \class CMessageBrokerController
- * \brief MessageBroker Controller.
- */
- class CMessageBrokerController : public TcpClient
- {
- public:
- /**
- * \brief Constructor.
- * \param address remote network address or FQDN
- * \param port remote local port
- * \param name name of component
- */
- CMessageBrokerController(const std::string& address, uint16_t port, std::string name);
-
- /**
- * \brief Destructor.
- */
- ~CMessageBrokerController();
-
- /**
- * \brief Receive data from the network.
- * \param data if data is received it will put in this reference
- * \return number of bytes received or -1 if error
- * \note This method will blocked until data comes.
- */
- virtual ssize_t Recv(std::string& data);
-
- /**
- * \brief Send data.
- * \param data data to send
- * \return number of bytes sent or -1 if error
- */
- ssize_t Send(const std::string& data);
-
- /**
- * \brief send Json message.
- * \param message JSON message.
- */
- void sendJsonMessage(Json::Value& message);
-
- /**
- * \brief generates new message id from diapason mControllersIdStart - (mControllersIdStart+999).
- * \return next id for message
- */
- int getNextMessageId();
-
- /**
- * \brief generates new message with id, jsonrpc version.
- * \param root container for prepared message
- */
- void prepareMessage(Json::Value& root);
-
- /**
- * \brief generates new message with id, jsonrpc version.
- * \note Doesn't change/add fields id and jsonrpc
- * \param errCode error code
- * \param errMessage string of message
- * \param error container for prepared error message
- */
- void prepareErrorMessage(int errCode, std::string errMessage, Json::Value& error);
-
- /**
- * \brief gets destination component name.
- * \param root JSON message.
- * \return string destination component name.
- */
- std::string getDestinationComponentName(Json::Value& root);
-
- /**
- * \brief gets method name.
- * \param root JSON message.
- * \return string method name.
- */
- std::string getMethodName(Json::Value& root);
-
- /**
- * \brief checks is message notification or not.
- * \param root JSON message.
- * \return true if notification.
- */
- bool isNotification(Json::Value& root);
-
- /**
- * \brief checks is message response or not.
- * \param root JSON message.
- * \return true if response.
- */
- bool isResponse(Json::Value& root);
-
- /**
- * \brief searches Method by id in mWaitResponseQueue.
- * \param id id of incoming JSON message.
- * \return string method name or "" in case not found.
- */
- std::string findMethodById(std::string id);
-
- /**
- * \brief register controller on the server.
- * \param id message id for JSON message due the id diapason hasn't been received.
- */
- void registerController(int id = 0);
-
- /**
- * \brief unregister controller on the server.
- */
- void unregisterController();
-
- /**
- * \brief subscribes controller to the property changing.
- * \param property property name in format ComponentName.PropertyName.
- */
- void subscribeTo(std::string property);
-
- /**
- * \brief unsubscribes controller from the property changing.
- * \param property property name in format ComponentName.PropertyName.
- */
- void unsubscribeFrom(std::string property);
-
- /**
- * \brief pure virtual method to process response.
- * \param method method name which has been called.
- * \param root JSON message.
- */
- virtual void processResponse(std::string method, Json::Value& root) = 0;
-
- /**
- * \brief pure virtual method to process request.
- * \param root JSON message.
- */
- virtual void processRequest(Json::Value& root) = 0;
-
- /**
- * \brief Process notification message.
- * \brief Notify subscribers about property change.
- * expected notification format example:
- * \code
- * {"jsonrpc": "2.0", "method": "<ComponentName>.<NotificationName>", "params": <list of params>}
- * \endcode
- * \param root JSON message.
- */
- virtual void processNotification(Json::Value& root) = 0;
-
- /**
- * \brief Checks message.
- * \param root JSON message.
- * \param error JSON message to fill in case of any errors.
- * \return true if message is good.
- */
- bool checkMessage(Json::Value& root, Json::Value& error);
-
- /**
- * \brief Returns name of Controller.
- * \return name of controller.
- */
- std::string getControllersName();
-
- /**
- * \brief Method for receiving thread.
- */
- void* MethodForReceiverThread(void * arg);
- private:
- /**
- * \brief Method for receiving messages without tcp packeting.
- * \param message received data
- */
- void onMessageReceived(Json::Value message);
- private:
- /**
- * \brief Start value of id's diapason.
- */
- std::string m_receivingBuffer;
-
- /**
- * \brief Start value of id's diapason.
- */
- int mControllersIdStart;
-
- /**
- * \brief Current id's value.
- */
- int mControllersIdCurrent;
-
- /**
- * \brief Already sent messages Methods to recognize esponses: MessageId:MethodName.
- */
- std::map<std::string, std::string> mWaitResponseQueue;
-
- /**
- * \brief Name of component.
- */
- std::string mControllersName;
-
- /**
- * \brief JSON reader.
- */
- Json::Reader m_reader;
-
- /**
- * \brief JSON writer.
- */
- Json::FastWriter m_writer;
-
- /**
- * \brief JSON writer.
- */
- Json::FastWriter m_receiverWriter;
-
- };
-} /* namespace NsMessageBroker */
-#endif /* MB_CONTROLLER_H */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_server.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_server.hpp
deleted file mode 100644
index 684a89055..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_server.hpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * \file mb_server.hpp
- * \brief MessageBroker server.
- * \author AKara
- */
-
-#ifndef MB_SERVER_H
-#define MB_SERVER_H
-
-#include "networking.h"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
-
- /**
- * \class Server
- * \brief Abstract MessageBroker server.
- */
- class Server
- {
- public:
- /**
- * \brief Constructor.
- * \param address network address or FQDN to bind
- * \param port local port to bind
- */
- Server(const std::string& address, uint16_t port);
-
- /**
- * \brief Destructor.
- */
- virtual ~Server();
-
- /**
- * \brief Wait message.
- *
- * This function do a select() on the socket and Process() immediately
- * the message.
- * \param ms millisecond to wait (0 means infinite)
- */
- virtual void WaitMessage(uint32_t ms) = 0;
-
- /**
- * \brief Get socket descriptor.
- * \return socket descriptor.
- */
- int GetSocket() const;
-
- /**
- * \brief Get the address.
- * \return address or FQDN
- */
- std::string GetAddress() const;
-
- /**
- * \brief Get the port.
- * \return local port
- */
- uint16_t GetPort() const;
-
- /**
- * \brief Bind the socket.
- * \return true if success, false otherwise
- */
- bool Bind();
-
- /**
- * \brief Receive data from the network and process it.
- * \param fd file descriptor on which receive
- * \return true if message has been correctly received, processed and
- * response sent, false otherwise (mainly send/receive error)
- * \note This method will blocked until data comes.
- */
- virtual bool Recv(int fd) = 0;
-
- /**
- * \brief Close socket.
- * \note It should be overriden for connection-oriented protocol
- * like TCP to properly close all client sockets.
- */
- virtual void Close();
-
- protected:
- /**
- * \brief Socket descriptor.
- */
- int m_sock;
-
- /**
- * \brief Transport protocol of the socket.
- */
- enum networking::TransportProtocol m_protocol;
-
- /**
- * \brief Transport protocol of the socket.
- */
-
- private:
- /**
- * \brief Network address or FQDN.
- */
- std::string m_address;
-
- /**
- * \brief Local port.
- */
- uint16_t m_port;
-
- /**
- * \brief Encapsulated format.
- */
- };
-
-} /* namespace NsMessageBroker */
-
-#endif /* MB_SERVER_H */
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpclient.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpclient.hpp
deleted file mode 100644
index 07697dbde..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpclient.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * \file mb_tcpclient.hpp
- * \brief MessageBroker TCP client.
- * \author AKara
- */
-
-#ifndef MB_TCPCLIENT_H
-#define MB_TCPCLIENT_H
-
-#include <iostream>
-
-#include "mb_client.hpp"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
-
- /**
- * \class TcpClient
- * \brief MessageBroker TCP client.
- */
- class TcpClient : public Client
- {
- public:
- /**
- * \brief Constructor.
- * \param address remote network address or FQDN
- * \param port remote local port
- */
- TcpClient(const std::string& address, uint16_t port);
-
- /**
- * \brief Destructor.
- */
- virtual ~TcpClient();
-
- /**
- * \brief Receive data from the network.
- * \param data if data is received it will put in this reference
- * \return number of bytes received or -1 if error
- * \note This method will blocked until data comes.
- */
- virtual ssize_t Recv(std::string& data);
-
- /**
- * \brief Send data.
- * \param data data to send
- * \return number of bytes sent or -1 if error
- */
- ssize_t Send(const std::string& data);
- };
-
-} /* namespace NsMessageBroker */
-
-#endif /* MB_TCPCLIENT_H */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpserver.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpserver.hpp
deleted file mode 100644
index 8ab2ce6a6..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/mb_tcpserver.hpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * \file mb_tcpserver.hpp
- * \brief MessageBroker TCP server.
- * \author AKara
- */
-
-#ifndef MB_TCPSERVER_H
-#define MB_TCPSERVER_H
-
-#include <list>
-#include <map>
-
-#include "mb_server.hpp"
-#include "CMessageBroker.hpp"
-#include "CSender.hpp"
-#include "websocket_handler.hpp"
-
-#define RECV_BUFFER_LENGTH 4097
-#define MAX_RECV_BUFFER_LENGTH 100000
-#define MAX_RECV_DATA 4096
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \class TcpServer
- * \brief MessageBroker TCP server implementation.
- */
- class TcpServer : public Server, public CSender
- {
- public:
- /**
- * \brief Constructor.
- * \param address network address or FQDN to bind
- * \param port local port to bind
- * \param pMessageBroker pointer to MessageBroker
- */
- TcpServer(const std::string& address, uint16_t port, NsMessageBroker::CMessageBroker* pMessageBroker);
-
- /**
- * \brief Destructor.
- */
- virtual ~TcpServer();
-
- /**
- * \brief Receive data from the network and process it.
- * \param fd socket descriptor to receive data
- * \return true if message has been correctly received, processed and
- * response sent, false otherwise (mainly send/recv error)
- * \note This method will blocked until data comes.
- */
- virtual bool Recv(int fd);
-
- /**
- * \brief Send data.
- * \param fd file descriptor of the client TCP socket
- * \param data data to send
- * \return number of bytes sent or -1 if error
- */
- virtual ssize_t Send(int fd, const std::string& data);
-
- /**
- * \brief Wait message.
- *
- * This function do a select() on the socket and Process() immediately
- * the message.
- * \param ms millisecond to wait (0 means infinite)
- */
- virtual void WaitMessage(uint32_t ms);
-
- /**
- * \brief Put the TCP socket in LISTEN state.
- */
- bool Listen() const;
-
- /**
- * \brief Accept a new client socket.
- * \return -1 if error, 0 otherwise
- */
- bool Accept();
-
- /**
- * \brief Close listen socket and all client sockets.
- */
- void Close();
-
- /**
- * \brief Method for thread with WaitMessage.
- */
- void* MethodForThread(void * arg);
-
- private:
- /**
- * \brief Checks if incoming messages are websocket request.
- * \param fd
- * \param pReceivingBuffer string receiving buffer pointer
- * \return true if it is a websocket handshake
- */
- bool checkWebSocketHandShake(int fd, std::string* pReceivingBuffer);
-
- /**
- * \brief Checks if incoming messages are websocket request.
- * \param fd file descriptor of the client TCP socket
- * \return true if it is a websocket
- */
- bool isWebSocket(int fd);
-
- /**
- * \brief Gets buffer for socket which received data.
- * \param fd socket file descriptor
- */
- std::string* getBufferFor(int fd);
- private:
- /**
- * \brief WebSocket clients fd's list.
- */
- std::list<int> m_WebSocketClients;
-
- /**
- * \brief Just accepted clients fd's list.
- */
- std::list<int> m_AcceptedClients;
-
- /**
- * \brief Receiving buffers map SocketFd:bufferPointer.
- */
- std::map <int, std::string*> m_receivingBuffers;
-
- /**
- * \brief List of disconnected sockets to be purged.
- */
- std::list<int> m_purge;
-
- /**
- * \brief MessageBroker pointer.
- */
- NsMessageBroker::CMessageBroker* mpMessageBroker;
-
- /**
- * \brief WebSocket handler.
- */
- CWebSocketHandler mWebSocketHandler;
- };
-
-} /* namespace NsMessageBroker */
-
-#endif /* MB_TCPSERVER_H */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/networking.h b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/networking.h
deleted file mode 100644
index a08853bb3..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/networking.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * JsonRpc-Cpp - JSON-RPC implementation.
- * Copyright (C) 2008-2011 Sebastien Vincent <sebastien.vincent@cppextrem.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * \file networking.h
- * \brief Networking utils.
- * \author Sebastien Vincent
- */
-
-#ifndef NETWORKING_H
-#define NETWORKING_H
-
-#ifdef _WIN32
-
-#ifndef _MSC_VER
-#include <stdint.h>
-#endif //_MSC_VER
-
-#include <winsock2.h>
-#include <windows.h>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-#define snprintf _snprintf
-#endif //_MSC_VER >= 1400
-
-/* to use getaddrinfo, _WIN32_WINNT have to
- * equal at least 0x0501
- */
-#define OLD_WIN32_WINNT _WIN32_WINNT
-
-#if (_WIN32_WINNT < 0x0501)
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x501
-#endif //(_WIN32_WINNT < 0x0501)
-
-#include <ws2tcpip.h>
-
-#if (_WIN32_WINNT != OLD_WIN32_WINNT)
-#undef _WIN32_WINNT
-#define _WIN32_WINNT OLD_WIN32_WINNT
-#endif //(_WIN32_WINNT != OLD_WIN32_WINNT)
-
-typedef int socklen_t;
-#define close closesocket
-
-#else //_WIN32
-
-#include <stdint.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-
-#include <unistd.h>
-
-#include <netinet/in.h>
-
-#include <netdb.h>
-
-#endif //_WIN32
-
-#include <string>
-
-/**
- * \namespace networking
- * \brief Networking related functions.
- */
-namespace networking
-{
- /**
- * \enum TransportProtocol
- * \brief Transport protocol.
- */
- enum TransportProtocol
- {
- UDP = IPPROTO_UDP, /**< UDP protocol. */
- TCP = IPPROTO_TCP /**< TCP protocol. */
- };
-
- /**
- * \brief Initialize networking.
- * \return true if network is correctly initialized, false otherwise
- * \note On MS Windows, this step is mandatory to use
- * socket API (socket(), bind(), recvfrom(), ...).
- */
- bool init();
-
- /**
- * \brief Cleanup networking.
- * \note On MS Windows, after calling this function,
- * it will be impossible to use socket API.
- */
- void cleanup();
-
- /**
- * \brief Connect to remote machine.
- * \param protocol transport protocol used
- * \param address remote address
- * \param port remote port
- * \param sockaddr if function succeed, sockaddr
- * representation of address/port
- * \param addrlen if function succeed, length of sockaddr
- * \return socket descriptor if success, -1 otherwise
- */
- int connect(enum TransportProtocol protocol, const std::string& address, uint16_t port, struct sockaddr_storage* sockaddr, socklen_t* addrlen);
-
- /**
- * \brief Bind on a local address.
- * \param protocol transport protocol used
- * \param address local address
- * \param port local port
- * \param sockaddr if function succeed, sockaddr
- * representation of address/port
- * \param addrlen if function succeed, length of sockaddr
- * \return socket descriptor if success, -1 otherwise
- */
- int bind(enum TransportProtocol protocol, const std::string& address, uint16_t port, struct sockaddr_storage* sockaddr, socklen_t* addrlen);
-
-} /* namespace networking */
-
-#endif /* NETWORKING_H */
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/system.h b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/system.h
deleted file mode 100644
index fac4f7926..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/system.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/**
- * \file system.h
- * \brief System utils.
- * \author Sebastien Vincent
- */
-
-#ifndef SYSTEM_H
-#define SYSTEM_H
-
-#ifdef _WIN32
-
-#include <windows.h>
-
-#else
-
-#include <pthread.h>
-
-#endif
-
-/**
- * \namespace System
- * \brief System related class (thread, ...).
- */
-namespace System
-{
-
- /**
- * \brief Sleep for x milliseconds
- * \param ms millisecond to sleep
- */
- void msleep(unsigned long ms);
-
- /**
- * \class ThreadArg
- * \brief Abstract class to represent thread argument.
- * \see ThreadArgImpl
- * \see Thread
- */
- class ThreadArg
- {
- public:
- /**
- * \brief Destructor.
- */
- virtual ~ThreadArg();
-
- /**
- * \brief Call the method.
- * \note Have to be implemented by subclasses
- */
- virtual void* Call() = 0;
- };
-
- /**
- * \class ThreadArgImpl
- * \brief Template class that represent thread argument.
- *
- * This class is used to provide callback function within
- * an object. The method which will be called during thread
- * execution must be of the form <code>void* MyMethod(void* arg)</code>.
- * Inside this method you are free to called any method of the object.
- *
- * \warning As class keep pointer of object reference, you should take
- * care at the lifetime of object you pass in ThreadArgImpl constructor,
- * else it could lead to crash your program.\n See Thread class documentation
- * for an example of how to use ThreadArgImpl class.
- * \see Thread
- */
- template<class T> class ThreadArgImpl : public ThreadArg
- {
- public:
- /**
- * \typedef Method
- * \brief T method signature.
- */
- typedef void* (T::*Method)(void*);
-
- /**
- * \brief Constructor.
- * \param obj object
- * \param method class method
- * \param arg argument to method
- */
- ThreadArgImpl(T& obj, Method method, void* arg)
- {
- m_obj = &obj;
- m_method = method;
- m_arg = arg;
- }
-
- /**
- * \brief Call the method.
- */
- virtual void* Call()
- {
- return (m_obj->*m_method)(m_arg);
- }
-
- private:
- /**
- * \brief Object pointer.
- */
- T* m_obj;
-
- /**
- * \brief Method of T class.
- */
- Method m_method;
-
- /**
- * \brief Argument of method.
- */
- void* m_arg;
- };
-
- /**
- * \class Thread
- * \brief Thread implementation.
- *
- * Preferred use of this class is to construct ThreadArgImpl inside
- * another class and pass <code>*this</code> as obj parameter:\n
- * \n
- * \code
- * class MyClass
- * {
- * public:
- * void MyMethod()
- * {
- * ThreadArg* arg = new ThreadArgImpl<MyClass>(*this, &MyClass::MethodForThread, NULL);
- * Thread th(arg);
- * th.Start();
- * }
- *
- * void* MethodForThread(void * arg)
- * {
- * // do stuff
- * }
- * };
- * \endcode
- *
- */
- class Thread
- {
- public:
- /**
- * \brief Constructor.
- * \param arg thread argument (MUST be dynamically allocated using new)
- * \note System::Thread object takes care of freeing method memory.\n
- * The way of calling constructor is:
- * <code>
- * Thread thread(new ThreadArgImpl<MyClass>(instanceOfMyClass, &MyClass::Method));
- * </code>
- * \warning You should take care of the object (instanceOfMyClass) lifetime pass
- * into ThreadArgImpl constructor, else it could lead to a crash because ThreadArgImpl
- * keep pointer of the reference.
- * \warning The "arg" parameter MUST be dynamically allocated (using new).
- * \see ThreadArgImpl
- */
- Thread(ThreadArg* arg);
-
- /**
- * \brief Destructor.
- */
- virtual ~Thread();
-
- /**
- * \brief Start thread.
- * \param detach if set to true, the thread will be in detach state so
- * you do not have to call join on this type of thread.
- * \return true if success, false otherwise
- * \warning Do NOT <code>Join</code> a detached thread.
- */
- bool Start(bool detach);
-
- /**
- * \brief Stop thread.
- * \return true if success, false otherwise
- * \warning Calling this method could lead callback object to an
- * incoherent state. You should call it really in desperate situations when
- * you really want to stop thread and do not care about the rest.
- * \warning With POSIX thread implementation, calling Stop (one or more times)
- * will leak 28 bytes of memory.
- */
- bool Stop();
-
- /**
- * \brief Join thread.
- * \param ret pointer to return code of the joined thread
- * \return true if success, false otherwise
- * \warning Do NOT <code>Join</code> a detached thread.
- */
- bool Join(void** ret = NULL);
-
-#ifdef _WIN32
- HANDLE
-#else
- pthread_t
-#endif
- GetId() const {
- return m_id;
- }
-
- private:
- /**
- * \brief Entry point of thread before calling specific
- * callback.
- * \param arg thread argument
- * \return result of ThreadArg callback
- */
-#ifdef _WIN32
- static DWORD WINAPI Call(LPVOID arg);
-#else
- static void* Call(void* arg);
-#endif
- /**
- * \brief Thread identifier.
- */
-#ifdef _WIN32 /* Win32 thread */
- HANDLE m_id;
-#else /* POSIX thread */
- pthread_t m_id;
-#endif
-
- /**
- * \brief Thread argument.
- */
- ThreadArg* m_arg;
- };
-
- /**
- * \class Mutex
- * \brief Mutex implementation.
- */
- class Mutex
- {
- public:
- /**
- * \brief Constructor.
- */
- Mutex();
-
- /**
- * \brief Destructor.
- */
- ~Mutex();
-
- /**
- * \brief Lock the mutex.
- * \return true if mutex is locked, false if error
- */
- bool Lock();
-
- /**
- * \brief Unlock the mutex.
- * \return true if mutex is unlocked, false if error
- */
- bool Unlock();
-
- private:
- /**
- * \brief The mutex.
- */
-#ifdef _WIN32
- HANDLE m_mutex;
-#else
- pthread_mutex_t m_mutex;
-#endif
- };
-
-#ifdef _WIN32
-#warning "BinarySemaphore is implemented for POSIX systems only"
-#else
- /**
- * \class BinarySemaphore
- * \brief Binary semaphore implementation.
- */
- class BinarySemaphore {
- public:
- /**
- * \brief Constructor.
- */
- BinarySemaphore();
-
- /**
- * \brief Destructor.
- */
- ~BinarySemaphore();
-
- /**
- * \brief Wait until the semaphore is unlocked.
- */
- void Wait();
-
- /**
- * \brief Notify the semaphore.
- */
- void Notify();
-
- private:
- /**
- * \brief Mutex to prevent concurrent access to the flag.
- */
- pthread_mutex_t m_mutex;
-
- /**
- * \brief Conditional variable to block threads.
- */
- pthread_cond_t m_cond;
-
- /**
- * \brief Semaphore state: false = down, true = up.
- */
- bool m_isUp;
- };
-#endif /* _WIN32 */
-
-} /* namespace System */
-
-#endif /* SYSTEM_H */
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/websocket_handler.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/include/websocket_handler.hpp
deleted file mode 100644
index 8bed00743..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/include/websocket_handler.hpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * \file websocket_handler.hpp
- * \brief WebSocket Handler.
- * Supports RFC6455 standard of protocol
- * Protocol specification:
- * http://tools.ietf.org/html/rfc6455
- * \author AKara
- */
-
-#ifndef WEBSOCKET_HANDLER_H
-#define WEBSOCKET_HANDLER_H
-
-#include <cstring>
-#include <iostream>
-#include <vector>
-
-#define MAX_WEBSOCKET_04_KEY_LEN 128 /**< Max WS key length */
-
-#define K(t) _K[(t) / 20] /**< K(t) */
-#define F0(b, c, d) (((b) & (c)) | ((~(b)) & (d))) /**< F0(b, c, d) */
-#define F1(b, c, d) (((b) ^ (c)) ^ (d)) /**< F1(b, c, d) */
-#define F2(b, c, d) (((b) & (c)) | ((b) & (d)) | ((c) & (d))) /**< F2(b, c, d) */
-#define F3(b, c, d) (((b) ^ (c)) ^ (d)) /**< F3(b, c, d) */
-
-#define S(n, x) (((x) << (n)) | ((x) >> (32 - n))) /**< S(n, x) */
-#define H(n) (ctxt->h.b32[(n)]) /**< H(n) */
-#define COUNT (ctxt->count) /**< COUNT */
-#define W(n) (ctxt->m.b32[(n)]) /**< W(n) */
-
-#define PUTPAD(x) { \
- ctxt->m.b8[(COUNT % 64)] = (x); \
- COUNT++; \
- COUNT %= 64; \
- if (COUNT % 64 == 0) \
- sha1_step(ctxt); \
- } /**< PUTPAD(x) */
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \brief sha1_ctxt txt structure.
- */
- struct sha1_ctxt
- {
- union {
- unsigned char b8[20];
- unsigned int b32[5];
- } h; /**< h */
- union {
- unsigned char b8[8];
- unsigned long long b64[1];
- } c; /**< c */
- union {
- unsigned char b8[64];
- unsigned int b32[16];
- } m; /**< m */
- unsigned char count; /**< count */
- };
-
-
- /**
- * \brief Constant table.
- */
- const unsigned int _K[] = { 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 };
-
- /**
- * \brief Constant table.
- */
- const char encode[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz0123456789+/";
-
- /**
- * \brief Constant table.
- */
- const char decode[] = "|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW"
- "$$$$$$XYZ[\\]^_`abcdefghijklmnopq";
-
- /**
- * \brief Type to present raw bytes.
- */
- typedef std::vector<char> rawBytes;
-
-
- /**
- * \class CWebSocketHandler
- * \brief WebSocket messages handler.
- */
- class CWebSocketHandler
- {
- public:
- /**
- * \brief Constructor.
- */
- CWebSocketHandler()
- {
- }
-
- /**
- * \brief Destructor.
- */
- ~CWebSocketHandler()
- {
- }
-
- /**
- * \brief Generates Sec-WebSocket-Accept key
- * \param key Sec-WebSocket-Key from client
- */
- void handshake_0405(std::string &key);
-
- /**
- * \brief Generates accept key for older (hybi-00) WebSocket protocol version.
- * \param key1 The first key of the client's handshake (a string)
- * \param key2 The second key of the client's handshake (a string)
- * \param key3 The third key of the client's handshake (raw bytes), must be 8 bytes long
- * \return Raw bytes of the generated accept key, or no bytes if error
- */
- rawBytes handshake_hybi00(const std::string &key1, const std::string &key2, const rawBytes &key3);
-
- /**
- * \brief Parses WebSocket data header to retrieve packet size
- * \param Buffer input buffer
- * \param b_size buffer size
- * \return Packet size
- */
- unsigned int parseWebSocketDataLength(const char* Buffer, unsigned int& b_size);
-
- /**
- * \brief Parses WebSocket data
- * \param Buffer input buffer
- * \param b_size buffer size
- * \return -1 in case of issues, data length in case of success
- */
- int parseWebSocketData(char* Buffer, unsigned int& b_size);
-
- /**
- * \brief Prepares WebSocket data
- * \param Buffer input buffer
- * \param b_size buffer size
- * \return -1 in case of issues, data length in case of success
- */
- int prepareWebSocketDataHeader(unsigned char* Buffer, unsigned long long b_size);
- private:
- /**
- * \brief SHA1 hash calculator.
- * \param d input buffer
- * \param n size of buffer
- * \param md mask buffer
- * \return pointer to result
- */
- unsigned char * SHA1(const unsigned char *d, size_t n, unsigned char *md);
-
- /**
- * \brief base 64 encode string.
- * \param in input buffer
- * \param in_len size of buffer
- * \param out output buffer
- * \param out_size size of buffer
- * \return -1 in case of errors
- */
- int lws_b64_encode_string(const char *in, int in_len, char *out, int out_size);
-
- /**
- * \brief base 64 decode string.
- * \param in input buffer
- * \param out output buffer
- * \param out_size size of buffer
- * \return -1 in case of errors
- */
- int lws_b64_decode_string(const char *in, char *out, int out_size);
-
- /**
- * \brief one step of SHA1.
- * \param ctxt input txt structure
- */
- void sha1_step(struct sha1_ctxt *ctxt);
-
- /**
- * \brief init step of SHA1.
- * \param ctxt input txt structure
- */
- void sha1_init(struct sha1_ctxt *ctxt);
-
- /**
- * \brief pad step of SHA1.
- * \param ctxt input txt structure
- */
- void sha1_pad(struct sha1_ctxt *ctxt);
-
- /**
- * \brief loop step of SHA1.
- * \param ctxt input txt structure
- * \param input input buffer buffer
- * \param len length of input buffer
- */
- void sha1_loop(struct sha1_ctxt *ctxt, const unsigned char *input, size_t len);
-
- /**
- * \brief result step of SHA1.
- * \param ctxt input txt structure
- * \param digest0 buffer
- */
- void sha1_result(struct sha1_ctxt *ctxt, unsigned char* digest0);
-
- /**
- * \brief base 64 test.
- * \return -1 in case of errors
- */
- int lws_b64_selftest(void);
-
- /**
- * \brief Extracts and processes the number from key,
- * according to the WebSocket hybi-00 specification.
- * \param key Key to extract the number from
- * \return The number, or 0 if error
- */
- unsigned long extractNumber(const std::string &key) const;
- };
-
-} /* namespace NsMessageBroker */
-
-#endif /* WEBSOCKET_HANDLER_H */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_client.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_client.cpp
deleted file mode 100644
index f0e8bf5e8..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_client.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * \file mb_client.cpp
- * \brief MessageBroker client.
- * \author AKara
- */
-
-#include <cstring>
-
-#include "mb_client.hpp"
-
-namespace NsMessageBroker
-{
-
- Client::Client()
- {
- }
-
- Client::Client(const std::string& address, uint16_t port)
- {
- m_sock = -1;
- m_address = address;
- m_port = port;
- memset(&m_sockaddr, 0x00, sizeof(struct sockaddr_storage));
- m_sockaddrlen = 0;
- }
-
- Client::~Client()
- {
- if(m_sock != -1)
- {
- Close();
- }
- }
-
- int Client::GetSocket() const
- {
- return m_sock;
- }
-
- std::string Client::GetAddress() const
- {
- return m_address;
- }
-
- void Client::SetAddress(const std::string& address)
- {
- m_address = address;
- }
-
- void Client::SetPort(uint16_t port)
- {
- m_port = port;
- }
-
- uint16_t Client::GetPort() const
- {
- return m_port;
- }
-
- bool Client::Connect()
- {
- m_sock = networking::connect(m_protocol, GetAddress(), GetPort(), &m_sockaddr, &m_sockaddrlen);
-
- return (m_sock != -1) ? true : false;
- }
-
- void Client::Close()
- {
- ::close(m_sock);
- m_sock = -1;
- }
-
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_controller.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_controller.cpp
deleted file mode 100644
index f4bc87d54..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_controller.cpp
+++ /dev/null
@@ -1,342 +0,0 @@
-/**
- * \file mb_controller.cpp
- * \brief MessageBroker Controller.
- * \author AKara
- */
-
-#include "mb_controller.hpp"
-
-#include "MBDebugHelper.h"
-#include "CMessageBroker.hpp"
-
-namespace NsMessageBroker
-{
- CMessageBrokerController::CMessageBrokerController(const std::string& address, uint16_t port, std::string name):
- TcpClient(address, port),
- m_receivingBuffer(""),
- mControllersIdStart(-1),
- mControllersIdCurrent(0)
- {
- mControllersName = name;
- }
-
- std::string CMessageBrokerController::getControllersName()
- {
- return mControllersName;
- }
-
- CMessageBrokerController::~CMessageBrokerController()
- {
- }
-
- ssize_t CMessageBrokerController::Recv(std::string& data)
- {
- DBG_MSG(("CMessageBrokerController::Recv()\n"));
- ssize_t recv = TcpClient::Recv(data);
- DBG_MSG(("Received message: %s\n", data.c_str()));
- m_receivingBuffer += data;
- while (1)
- {
- Json::Value root;
- if (!m_reader.parse(m_receivingBuffer, root))
- {
- DBG_MSG(("Received not JSON string! %s\n", m_receivingBuffer.c_str()));
- return recv;
- }
- std::string wmes = m_receiverWriter.write(root);
- DBG_MSG(("Parsed JSON string:%s; length: %d\n", wmes.c_str(), wmes.length()));
- DBG_MSG(("Buffer is:%s\n", m_receivingBuffer.c_str()));
- ssize_t beginpos = m_receivingBuffer.find(wmes);
- if (-1 != beginpos)
- {
- m_receivingBuffer.erase(0, beginpos + wmes.length());
- DBG_MSG(("Buffer after cut is:%s\n", m_receivingBuffer.c_str()));
- } else
- {
- m_receivingBuffer.clear();
- }
- onMessageReceived(root);
- }
- return recv;
- }
-
- void CMessageBrokerController::onMessageReceived(Json::Value message)
- {
- // Determine message type and process...
- Json::Value error;
- if (checkMessage(message, error))
- {
- if (isNotification(message))
- {
- DBG_MSG(("Message is notification!\n"));
- processNotification(message);
- } else if (isResponse(message))
- {
- std::string id = message["id"].asString();
- std::string method = findMethodById(id);
- DBG_MSG(("Message is response on: %s\n", method.c_str()));
- if ("" != method)
- {
- if ("MB.registerComponent" == method)
- { // initialize mControllersIdStart
- if (message.isMember("result") && message["result"].isInt())
- {
- mControllersIdStart = message["result"].asInt();
- } else
- {
- DBG_MSG_ERROR(("Not possible to initialize mControllersIdStart!\n"));
- }
- } else if ("MB.subscribeTo" == method || "MB.unregisterComponent" == method || "MB.unsubscribeFrom" == method)
- {
- //nothing to do for now
- } else
- {
- processResponse(method, message);
- }
- } else
- {
- DBG_MSG_ERROR(("Request with id %s has not been found!\n", id.c_str()));
- }
- } else
- {
- DBG_MSG(("Message is request!\n"));
- processRequest(message);
- }
- } else
- {
- DBG_MSG_ERROR(("Message contains wrong data!\n"));
- }
- }
-
- ssize_t CMessageBrokerController::Send(const std::string& data)
- {
- return TcpClient::Send(data);
- }
-
- void CMessageBrokerController::sendJsonMessage(Json::Value& message)
- {
- DBG_MSG(("CMessageBrokerController::sendJsonMessage()\n"));
- std::string mes = m_writer.write(message);
- if (!isNotification(message) && !isResponse(message))
- {// not notification, not a response, store id and method name to recognize an answer
- mWaitResponseQueue.insert(std::map<std::string, std::string>::value_type(message["id"].asString(), message["method"].asString()));
- }
- int bytesSent = Send(mes);
- bytesSent = bytesSent; // to prevent compiler warnings in case DBG_MSG off
- DBG_MSG(("Length:%d, Sent: %d bytes\n", mes.length(), bytesSent));
- }
-
- std::string CMessageBrokerController::findMethodById(std::string id)
- {
- DBG_MSG(("CMessageBrokerController::findMethodById()\n"));
- std::string res = "";
- std::map <std::string, std::string>::iterator it;
- it = mWaitResponseQueue.find(id);
- if (it != mWaitResponseQueue.end())
- {
- res = (*it).second;
- mWaitResponseQueue.erase(it);
- }
- return res;
- }
-
- int CMessageBrokerController::getNextMessageId()
- {
- if (mControllersIdCurrent < (mControllersIdStart+1000))
- {
- return mControllersIdCurrent++;
- } else
- {
- return mControllersIdCurrent = mControllersIdStart;
- }
- }
-
- void CMessageBrokerController::prepareMessage(Json::Value& root)
- {
- root["jsonrpc"] = "2.0";
- root["id"] = getNextMessageId();
- }
-
- void CMessageBrokerController::prepareErrorMessage(int errCode, std::string errMessage, Json::Value& error)
- {
- DBG_MSG(("CMessageBrokerController::prepareErrorMessage()\n"));
- Json::Value err;
- err["code"] = errCode;
- err["message"] = errMessage;
- error["error"] = err;
- }
-
- std::string CMessageBrokerController::getDestinationComponentName(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerController::getDestinationComponentName()\n"));
- std::string ret = "";
- std::string method = root["method"].asString();
- int pos = method.find(".");
- if (-1 != pos)
- {
- ret = method.substr(0, pos);
- }
- DBG_MSG(("Destination component is: %s\n", ret.c_str()));
- return ret;
- }
-
- std::string CMessageBrokerController::getMethodName(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerController::getMethodName()\n"));
- std::string ret = "";
- std::string method = root["method"].asString();
- int pos = method.find(".");
- if (-1 != pos)
- {
- ret = method.substr(pos+1);
- }
- DBG_MSG(("Method is: %s\n", ret.c_str()));
- return ret;
- }
-
- bool CMessageBrokerController::isNotification(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerController::isNotification()\n"));
- bool ret = false;
- if (false == root.isMember("id"))
- {
- ret = true;
- }
- DBG_MSG(("Result: %d\n", ret));
- return ret;
- }
-
- bool CMessageBrokerController::isResponse(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerController::isResponse()\n"));
- bool ret = false;
- if ((true == root.isMember("result")) || (true == root.isMember("error")))
- {
- ret = true;
- }
- DBG_MSG(("Result: %d\n", ret));
- return ret;
- }
-
- void CMessageBrokerController::registerController(int id)
- {
- DBG_MSG(("CMessageBrokerController::registerController()\n"));
- Json::Value root;
- Json::Value params;
- prepareMessage(root);
- root["id"] = id;
- root["method"] = "MB.registerComponent";
- params["componentName"] = mControllersName;
- root["params"] = params;
- sendJsonMessage(root);
- }
-
- void CMessageBrokerController::unregisterController()
- {
- DBG_MSG(("CMessageBrokerController::unregisterController()\n"));
- Json::Value root;
- Json::Value params;
- prepareMessage(root);
- root["method"] = "MB.unregisterComponent";
- params["componentName"] = mControllersName;
- root["params"] = params;
- sendJsonMessage(root);
- }
-
- void CMessageBrokerController::subscribeTo(std::string property)
- {
- DBG_MSG(("CMessageBrokerController::subscribeTo()\n"));
- Json::Value root;
- Json::Value params;
- prepareMessage(root);
- root["method"] = "MB.subscribeTo";
- params["propertyName"] = property;
- root["params"] = params;
- sendJsonMessage(root);
- }
-
- void CMessageBrokerController::unsubscribeFrom(std::string property)
- {
- DBG_MSG(("CMessageBrokerController::unsubscribeFrom()\n"));
- Json::Value root;
- Json::Value params;
- prepareMessage(root);
- root["method"] = "MB.unsubscribeFrom";
- params["propertyName"] = property;
- root["params"] = params;
- sendJsonMessage(root);
- }
-
- void* CMessageBrokerController::MethodForReceiverThread(void * arg)
- {
- arg = arg; // to avoid compiler warnings
- while(1)
- {
- std::string data = "";
- Recv(data);
- }
- return NULL;
- }
-
- bool CMessageBrokerController::checkMessage(Json::Value& root, Json::Value& error)
- {
- DBG_MSG(("CMessageBrokerController::checkMessage()\n"));
- Json::Value err;
-
- try
- {
- /* check the JSON-RPC version => 2.0 */
- if (!root.isObject() || !root.isMember("jsonrpc") || root["jsonrpc"] != "2.0")
- {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = NsMessageBroker::INVALID_REQUEST;
- err["message"] = "Invalid MessageBroker request.";
- error["error"] = err;
- return false;
- }
-
- if (root.isMember("id") && (root["id"].isArray() || root["id"].isObject()))
- {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = NsMessageBroker::INVALID_REQUEST;
- err["message"] = "Invalid MessageBroker request.";
- error["error"] = err;
- return false;
- }
-
- if (root.isMember("method"))
- {
- if (!root["method"].isString())
- {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = NsMessageBroker::INVALID_REQUEST;
- err["message"] = "Invalid MessageBroker request.";
- error["error"] = err;
- return false;
- }
- /* Check the params is an object*/
- if (root.isMember("params") && !root["params"].isObject())
- {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Invalid JSONRPC params.";
- error["error"] = err;
- return false;
- }
- } else if (!root.isMember("result") && !root.isMember("error"))
- {
- return false;
- }
- return true;
- } catch (...)
- {
- DBG_MSG_ERROR(("CMessageBrokerController::checkMessage() EXCEPTION has been caught!\n"));
- return false;
- }
- }
-
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_tcpclient.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_tcpclient.cpp
deleted file mode 100644
index 02db417c2..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/client/mb_tcpclient.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * \file mb_tcpclient.cpp
- * \brief MessageBroker TCP client.
- * \author AKara
- */
-
-#include "mb_tcpclient.hpp"
-#include "MBDebugHelper.h"
-
-namespace NsMessageBroker
-{
-
- TcpClient::TcpClient(const std::string& address, uint16_t port) : Client(address, port)
- {
- m_protocol = networking::TCP;
- }
-
- TcpClient::~TcpClient()
- {
- }
-
- ssize_t TcpClient::Send(const std::string& data)
- {
- std::string rep = data;
- int bytesToSend = rep.length();
- const char* ptrBuffer = rep.c_str();
- do
- {
- int retVal = send(m_sock, ptrBuffer, bytesToSend, 0);
- if(retVal == -1)
- {
- return -1;
- }
- bytesToSend -= retVal;
- ptrBuffer += retVal;
- }while(bytesToSend > 0);
- return rep.length();
- }
-
- ssize_t TcpClient::Recv(std::string& data)
- {
- char buf[1500];
- ssize_t nb = -1;
-
- if((nb = ::recv(m_sock, buf, sizeof(buf), 0)) == -1)
- {
- std::cerr << "Error while receiving" << std::endl;
- return -1;
- }
-
- data = std::string(buf, nb);
- DBG_MSG(("Received from server: %s\n", data.c_str()));
-
- return nb;
- }
-
-} /* namespace NsMessageBroker */
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.cpp
deleted file mode 100644
index 77ab1ca2c..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * \file MessageBrokerControllerAVA.cpp
- * \brief MessageBroker Controller for Avatar.
- * \author AKara
- */
-
-#include <ctime>
-
-#include "MessageBrokerControllerAVA.hpp"
-
-#include "MBDebugHelper.h"
-
-extern int start;
-
-namespace NsMessageBroker
-{
- CMessageBrokerControllerAVA::CMessageBrokerControllerAVA(const std::string& address, uint16_t port):
- CMessageBrokerController(address, port, "AVA")
- {
- }
-
- CMessageBrokerControllerAVA::~CMessageBrokerControllerAVA()
- {
- }
-
- void CMessageBrokerControllerAVA::processRequest(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerAVA::processRequest()\n"));
- root=root;//to prevent compiler warning
- }
-
- void CMessageBrokerControllerAVA::processNotification(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerAVA::processNotification()\n"));
- root=root;//to prevent compiler warning
- }
-
- void CMessageBrokerControllerAVA::processResponse(std::string method, Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerAVA::processResponse()\n"));
- DWORD stop = GetTickCount();
- int diff = stop - start;
- std::string id = root["id"].asString();
- printf("Execution time for id %s is %d ms!\n", id.c_str(), diff);
- root=root;//to prevent compiler warning
- method=method;//to prevent compiler warning
- }
-
- void CMessageBrokerControllerAVA::makeCall(std::string phoneNumber)
- {
- DBG_MSG(("CMessageBrokerControllerAVA::makeCall()\n"));
- Json::Value request, params;
- prepareMessage(request);
- request["method"] = "Phone.makeCall";
- params["phoneNumber"] = phoneNumber;
- request["params"] = params;
- sendJsonMessage(request);
- }
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.hpp
deleted file mode 100644
index fed3ee58a..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerAVA.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * \file MessageBrokerControllerAVA.hpp
- * \brief MessageBroker Controller AVA.
- * \author AKara
- */
-
-#ifndef MB_CONTROLLERAVA_H
-#define MB_CONTROLLERAVA_H
-
-#include <iostream>
-
-#include "json/json.h"
-
-#include "mb_controller.hpp"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \class CMessageBrokerControllerAVA
- * \brief MessageBroker Controller.
- */
- class CMessageBrokerControllerAVA : public CMessageBrokerController
- {
- public:
- /**
- * \brief Constructor.
- * \param address remote network address or FQDN
- * \param port remote local port
- */
- CMessageBrokerControllerAVA(const std::string& address, uint16_t port);
-
- /**
- * \brief Destructor.
- */
- ~CMessageBrokerControllerAVA();
-
- /**
- * \brief process request.
- * \param root JSON message.
- */
- void processRequest(Json::Value& root);
-
- /**
- * \brief process notification.
- * \param root JSON message.
- */
- void processNotification(Json::Value& root);
-
- /**
- * \brief process response.
- * \param method method name which has been called.
- * \param root JSON message.
- */
- void processResponse(std::string method, Json::Value& root);
-
- /**
- * \brief sends message to the phone to make call.
- * \param phoneNumber number for call.
- */
- void makeCall(std::string phoneNumber);
-
- };
-}/* namespace NsMessageBroker */
-#endif /* MB_CONTROLLERAVA_H */ \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.cpp
deleted file mode 100644
index cbbe39492..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * \file MessageBrokerControllerBackend.cpp
- * \brief MessageBroker Controller for Backend.
- * \author AKara
- */
-
-#include "MessageBrokerControllerBackend.hpp"
-
-#include "MBDebugHelper.h"
-
-namespace NsMessageBroker
-{
- CMessageBrokerControllerBackend::CMessageBrokerControllerBackend(const std::string& address, unsigned short port):
-CMessageBrokerController(address, port, std::string("Backend"))
- {
- }
-
- CMessageBrokerControllerBackend::~CMessageBrokerControllerBackend()
- {
- }
-
- void CMessageBrokerControllerBackend::processRequest(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::processRequest()\n"));
- if (getControllersName() == getDestinationComponentName(root))
- {
- Json::Value response;
- response["jsonrpc"] = root["jsonrpc"];
- response["id"] = root["id"];
- if ("isFirstStart" == getMethodName(root))
- {
- isFirstStart(response);
- } else if ("isFullScreen" == getMethodName(root))
- {
- isFullScreen(response);
- } else if ("getWindowSize" == getMethodName(root))
- {
- getWindowSize(response);
- } else if ("getWindowDensity" == getMethodName(root))
- {
- getWindowDensity(response);
- } else if ("getOSInfo" == getMethodName(root))
- {
- getOSInfo(response);
- } else if ("logToOS" == getMethodName(root))
- {
- logToOS(response);
- } else
- {
- DBG_MSG_ERROR(("Method has not been found!\n"));
- Json::Value err;
- err["code"] = NsMessageBroker::INVALID_REQUEST;
- err["message"] = "Method has not been found.";
- response["error"] = err;
- }
- sendJsonMessage(response);
- } else
- {
- DBG_MSG_ERROR(("Wrong message destination!\n"));
- }
- }
-
- void CMessageBrokerControllerBackend::processNotification(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::processNotification()\n"));
- root=root;//to prevent compiler warning
- }
-
- void CMessageBrokerControllerBackend::processResponse(std::string method, Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::processResponse()\n"));
- root=root;//to prevent compiler warning
- method=method;//to prevent compiler warning
- }
-
- void CMessageBrokerControllerBackend::isFirstStart(Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::isFirstStart()\n"));
- Json::Value res;
- res["isFirstStart"] = false;
- response["result"] = res;
- }
-
- void CMessageBrokerControllerBackend::isFullScreen(Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::isFullScreen()\n"));
- Json::Value res;
- res["isFullScreen"] = false;
- response["result"] = res;
- }
-
- void CMessageBrokerControllerBackend::getWindowSize(Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::getWindowSize()\n"));
- Json::Value res;
- res["width"] = 800;
- res["height"] = 480;
- response["result"] = res;
- }
-
- void CMessageBrokerControllerBackend::getWindowDensity(Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::getWindowDensity()\n"));
- Json::Value res;
- res["windowDensity"] = 1;
- response["result"] = res;
- }
-
- void CMessageBrokerControllerBackend::getOSInfo(Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::getOSInfo()\n"));
- Json::Value res;
- res["osType"] = "";
- res["osVersion"] = "";
- res["isNativeApplication"] = true;
- response["result"] = res;
- }
-
- void CMessageBrokerControllerBackend::logToOS(Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerBackend::logToOS()\n"));
- response["result"] = "";
- }
-
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.hpp
deleted file mode 100644
index bda828bee..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerBackend.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * \file MessageBrokerControllerBackend.hpp
- * \brief MessageBroker Controller Backend.
- * \author AKara
- */
-#pragma once
-
-#include <iostream>
-
-#include "json/json.h"
-
-#include "mb_controller.hpp"
-#include "CMessageBroker.hpp"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \class CMessageBrokerControllerBackend
- * \brief MessageBroker Controller.
- */
-
- class CMessageBrokerControllerBackend : public CMessageBrokerController
- {
- public:
- /**
- * \brief Constructor.
- * \param address remote network address or FQDN
- * \param port remote local port
- */
- CMessageBrokerControllerBackend(const std::string& address, unsigned short port);
-
- /**
- * \brief Destructor.
- */
- ~CMessageBrokerControllerBackend();
-
- /**
- * \brief process request.
- * \param root JSON message.
- */
- void processRequest(Json::Value& root);
-
- /**
- * \brief process notification.
- * \param root JSON message.
- */
- void processNotification(Json::Value& root);
-
- /**
- * \brief process response.
- * \param method method name which has been called.
- * \param root JSON message.
- */
- void processResponse(std::string method, Json::Value& root);
- private:
- /**
- * \brief Checks first start.
- * \param response container for response
- */
- void isFirstStart(Json::Value& response);
-
- /**
- * \brief Checks first start.
- * \param response container for response
- */
- void isFullScreen(Json::Value& response);
-
- /**
- * \brief Checks first start.
- * \param response container for response
- */
- void getWindowSize(Json::Value& response);
-
- /**
- * \brief Checks first start.
- * \param response container for response
- */
- void getWindowDensity(Json::Value& response);
-
- /**
- * \brief Checks first start.
- * \param response container for response
- */
- void getOSInfo(Json::Value& response);
-
- /**
- * \brief Checks first start.
- * \param response container for response
- */
- void logToOS(Json::Value& response);
- };
-}/* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.cpp
deleted file mode 100644
index 6f308e71c..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * \file MessageBrokerControllerPhone.cpp
- * \brief MessageBroker Controller for Phone.
- * \author AKara
- */
-
-#include "MessageBrokerControllerPhone.hpp"
-
-#include "CMessageBroker.hpp"
-
-#include "MBDebugHelper.h"
-
-namespace NsMessageBroker
-{
- CMessageBrokerControllerPhone::CMessageBrokerControllerPhone(const std::string& address, uint16_t port):
- CMessageBrokerController(address, port, "Phone")
- {
- }
-
- CMessageBrokerControllerPhone::~CMessageBrokerControllerPhone()
- {
- }
-
- void CMessageBrokerControllerPhone::processRequest(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::processRequest()\n"));
- if (getControllersName() == getDestinationComponentName(root))
- {
- Json::Value response;
- response["jsonrpc"] = root["jsonrpc"];
- response["id"] = root["id"];
- if ("makeCall" == getMethodName(root))
- {
- if (root.isMember("params"))
- {
- Json::Value params = root["params"];
- if (params.isMember("phoneNumber") && params["phoneNumber"].isString())
- {
- makeCall(params["phoneNumber"].asString(), response);
- } else
- {
- DBG_MSG_ERROR(("Wrong params!\n"));
- prepareErrorMessage(NsMessageBroker::INVALID_PARAMS, "Wrong params!", response);
- }
- } else
- {
- DBG_MSG_ERROR(("Not possible to parse phone number!\n"));
- prepareErrorMessage(NsMessageBroker::INVALID_PARAMS, "Not possible to parse phone number!", response);
- }
- } else if ("endCall" == getMethodName(root))
- {
- endCall(root["params"].asString(), response);
- } else if ("holdCall" == getMethodName(root))
- {
- holdCall(root["params"].asString(), response);
- } else if ("getContacts" == getMethodName(root))
- {
- if (root.isMember("params"))
- {
- Json::Value params = root["params"];
- if (params.isMember("firstLetter") && params["firstLetter"].isString()
- && params.isMember("offset") && params["offset"].isInt()
- && params.isMember("numberOfItems") && params["numberOfItems"].isInt())
- {
- getContacts(params["firstLetter"].asString(), params["offset"].asInt(), params["numberOfItems"].asInt(), response);
- } else
- {
- DBG_MSG_ERROR(("Wrong params of getContacts()!\n"));
- prepareErrorMessage(NsMessageBroker::INVALID_PARAMS, "Wrong params of getContacts()!", response);
- }
- } else
- {
- DBG_MSG_ERROR(("Params is not an object!\n"));
- prepareErrorMessage(NsMessageBroker::INVALID_PARAMS, "Params is not an object!", response);
- }
- } else if ("getHistory" == getMethodName(root))
- {
- if (root.isMember("params"))
- {
- Json::Value params = root["params"];
- if (params.isMember("typeOfContacts") && params["typeOfContacts"].isString()
- && params.isMember("offset") && params["offset"].isInt()
- && params.isMember("numberOfItems") && params["numberOfItems"].isInt())
- {
- getHistory(params["typeOfContacts"].asString(), params["offset"].asInt(), params["numberOfItems"].asInt(), response);
- } else
- {
- DBG_MSG_ERROR(("Wrong params of getHistory()!\n"));
- prepareErrorMessage(NsMessageBroker::INVALID_PARAMS, "Wrong params of getHistory()!", response);
- }
- } else
- {
- DBG_MSG_ERROR(("Params is not an object!\n"));
- prepareErrorMessage(NsMessageBroker::INVALID_PARAMS, "Params is not an object!", response);
- }
- } else
- {
- DBG_MSG_ERROR(("Method has not been found!\n"));
- Json::Value err;
- err["code"] = NsMessageBroker::INVALID_REQUEST;
- err["message"] = "Method has not been found.";
- response["error"] = err;
- }
- sendJsonMessage(response);
- } else
- {
- DBG_MSG_ERROR(("Wrong message destination!\n"));
- }
- }
-
- void CMessageBrokerControllerPhone::makeCall(std::string phoneNumber, Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::makeCall()\n"));
- phoneNumber = phoneNumber; // to avoid compiler's warning
- response["result"] = "OK";
- }
-
- void CMessageBrokerControllerPhone::endCall(std::string phoneNumber, Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::endCall()\n"));
- phoneNumber = phoneNumber; // to avoid compiler's warning
- response["result"] = "OK";
- }
-
- void CMessageBrokerControllerPhone::holdCall(std::string phoneNumber, Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::holdCall()\n"));
- phoneNumber = phoneNumber; // to avoid compiler's warning
- response["result"] = "OK";
- }
-
- void CMessageBrokerControllerPhone::getContacts(std::string firstLetter, int offset, int numberOfItems, Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::getContacts()\n"));
- firstLetter = firstLetter; // to avoid compiler's warning
- offset = offset; // to avoid compiler's warning
- numberOfItems = numberOfItems; // to avoid compiler's warning
- response["result"] = "OK";
- }
-
- void CMessageBrokerControllerPhone::getHistory(std::string firstLetter, int offset, int numberOfItems, Json::Value& response)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::getHistory()\n"));
- firstLetter = firstLetter; // to avoid compiler's warning
- offset = offset; // to avoid compiler's warning
- numberOfItems = numberOfItems; // to avoid compiler's warning
- response["result"] = "OK";
- }
-
- void CMessageBrokerControllerPhone::onCallStatusChanged(int callStatus)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::onCallStatusChanged()\n"));
- Json::Value request, params;
- request["jsonrpc"] = "2.0";
- request["method"] = "Phone.onCallStatusChanged";
- params["callStatus"] = callStatus;
- request["params"] = params;
- sendJsonMessage(request);
- }
-
- void CMessageBrokerControllerPhone::onContactsUpdated()
- {
- DBG_MSG(("CMessageBrokerControllerPhone::onContactsUpdated()\n"));
- Json::Value request;
- request["jsonrpc"] = "2.0";
- request["method"] = "Phone.onContactsUpdated";
- sendJsonMessage(request);
- }
-
- void CMessageBrokerControllerPhone::onHistoryUpdated()
- {
- DBG_MSG(("CMessageBrokerControllerPhone::onHistoryUpdated()\n"));
- Json::Value request;
- request["jsonrpc"] = "2.0";
- request["method"] = "Phone.onHistoryUpdated";
- sendJsonMessage(request);
- }
-
- void CMessageBrokerControllerPhone::processNotification(Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::processNotification()\n"));
- root=root;//to prevent compiler warning
- }
-
- void CMessageBrokerControllerPhone::processResponse(std::string method, Json::Value& root)
- {
- DBG_MSG(("CMessageBrokerControllerPhone::processResponse()\n"));
- root=root;//to prevent compiler warning
- method = method;
- }
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.hpp
deleted file mode 100644
index 899d1a289..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerControllerPhone.hpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * \file MessageBrokerControllerPhone.hpp
- * \brief MessageBroker Controller Phone.
- * \author AKara
- */
-
-#ifndef MB_CONTROLLERPHONE_H
-#define MB_CONTROLLERPHONE_H
-
-#include <iostream>
-
-#include "json/json.h"
-
-#include "mb_controller.hpp"
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
- /**
- * \class CMessageBrokerControllerPhone
- * \brief MessageBroker Controller Phone.
- */
- class CMessageBrokerControllerPhone : public CMessageBrokerController
- {
- public:
- /**
- * \brief Constructor.
- * \param address remote network address or FQDN
- * \param port remote local port
- */
- CMessageBrokerControllerPhone(const std::string& address, uint16_t port);
-
- /**
- * \brief Destructor.
- */
- ~CMessageBrokerControllerPhone();
-
- /**
- * \brief process request.
- * \param root JSON message.
- */
- void processRequest(Json::Value& root);
-
- /**
- * \brief process notification.
- * \param root JSON message.
- */
- void processNotification(Json::Value& root);
-
- /**
- * \brief process response.
- * \param method method name which has been called.
- * \param root JSON message.
- */
- void processResponse(std::string method, Json::Value& root);
- public://Notifications
- /**
- * \brief Notifies Call Status changing.
- * \param callStatus status of current active call
- */
- void onCallStatusChanged(int callStatus);
-
- /**
- * \brief Notifies Contacts list updated.
- */
- void onContactsUpdated();
-
- /**
- * \brief Notifies History list updated.
- */
- void onHistoryUpdated();
- private:
- /**
- * \brief Makes call.
- * \param phoneNumber number for call.
- * \param response container for response
- */
- void makeCall(std::string phoneNumber, Json::Value& response);
-
- /**
- * \brief Ends call.
- * \param phoneNumber number of call.
- * \param response container for response
- */
- void endCall(std::string phoneNumber, Json::Value& response);
-
- /**
- * \brief Holds call.
- * \param phoneNumber number of call.
- * \param response container for response
- */
- void holdCall(std::string phoneNumber, Json::Value& response);
-
- /**
- * \brief Gets contacts.
- * \param firstLetter first letter of list.
- * \param offset offset from first item
- * \param numberOfItems number of expected items
- * \param response container for response
- */
- void getContacts(std::string firstLetter, int offset, int numberOfItems, Json::Value& response);
-
- /**
- * \brief Gets history.
- * \param typeOfContacts type of contacts (incoming/outgoing/missed/all calls).
- * \param offset offset from first item
- * \param numberOfItems number of expected items
- * \param response container for response
- */
- void getHistory(std::string typeOfContacts, int offset, int numberOfItems, Json::Value& response);
-
- };
-}/* namespace NsMessageBroker */
-#endif /* MB_CONTROLLERPHONE_H */ \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.cpp
deleted file mode 100644
index 405b3fcbd..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * \file MessageBrokerServer.cpp
- * \brief MessageBrokerServer sources
- * \author AKara
- */
-
-#include <cstdio>
-#include <cstdlib>
-#include <csignal>
-#include <iostream>
-#include <ctime>
-
-#include "system.h"
-
-#include "MBDebugHelper.h"
-
-#include "mb_tcpserver.hpp"
-#include "mb_tcpclient.hpp"
-#include "CMessageBroker.hpp"
-
-#include "MessageBrokerControllerAVA.hpp"
-#include "MessageBrokerControllerPhone.hpp"
-#include "MessageBrokerControllerBackend.hpp"
-
-/**
- * \brief Signal management.
- * \param code signal code
- */
- static void signal_handler(int code)
- {
- switch(code)
- {
- case SIGINT:
- case SIGTERM:
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief stores start time of test operation.
- */
-int start;
-
-/**
- * \brief Entry point of the program.
- * \param argc number of argument
- * \param argv array of arguments
- * \return EXIT_SUCCESS or EXIT_FAILURE
- */
-int main(int argc, char** argv)
-{
- NsMessageBroker::CMessageBroker* mpMessageBroker = NsMessageBroker::CMessageBroker::getInstance();
- if (!mpMessageBroker)
- {
- DBG_MSG_ERROR(("NULL pointer\n"));
- exit(EXIT_FAILURE);
- }
-
-
- NsMessageBroker::TcpServer server(std::string("127.0.0.1"), 8086, mpMessageBroker);
-
- DBG_MSG(("Start MessageBroker component\n"));
- mpMessageBroker->startMessageBroker(&server);
-
- NsMessageBroker::CMessageBrokerControllerAVA tcpControllerAVA(std::string("127.0.0.1"), 8086);
- NsMessageBroker::CMessageBrokerControllerPhone tcpControllerPhone(std::string("127.0.0.1"), 8086);
- NsMessageBroker::CMessageBrokerControllerBackend tcpControllerBackend(std::string("127.0.0.1"), 8086);
-
- /* avoid compilation warnings */
- argc = argc;
- argv = argv;
-
- if(!networking::init())
- {
- DBG_MSG_ERROR(("Networking initialization failed!\n"));
-
- }
-
- if(signal(SIGTERM, signal_handler) == SIG_ERR)
- {
- DBG_MSG_ERROR(("Error signal SIGTERM will not be handled!\n"));
- }
-
- if(signal(SIGINT, signal_handler) == SIG_ERR)
- {
- DBG_MSG_ERROR(("Error signal SIGINT will not be handled!\n"));
- }
-
- if(!server.Bind())
- {
- DBG_MSG_ERROR(("Bind failed!\n"));
- exit(EXIT_FAILURE);
- } else
- {
- DBG_MSG(("Bind successful!\n"));
- }
-
- if(!server.Listen())
- {
- DBG_MSG_ERROR(("Listen failed!\n"));
- exit(EXIT_FAILURE);
- } else
- {
- DBG_MSG(("Listen successful!\n"));
- }
-
- if(!tcpControllerAVA.Connect())
- {
- DBG_MSG_ERROR(("Cannot connect to remote peer!\n"));
- exit(EXIT_FAILURE);
- } else
- {
- DBG_MSG(("ClientAVA connected to the server! SocketID = %d\n", tcpControllerAVA.GetSocket()));
- }
-
- if(!tcpControllerPhone.Connect())
- {
- DBG_MSG_ERROR(("Cannot connect to remote peer!\n"));
- exit(EXIT_FAILURE);
- } else
- {
- DBG_MSG(("ClientPhone connected to the server! SocketID = %d\n",tcpControllerPhone.GetSocket()));
- }
-
- if(!tcpControllerBackend.Connect())
- {
- DBG_MSG_ERROR(("Cannot connect to remote peer!\n"));
- exit(EXIT_FAILURE);
- } else
- {
- DBG_MSG(("ClientBackend connected to the server! SocketID = %d\n",tcpControllerBackend.GetSocket()));
- }
-
- DBG_MSG(("Start CMessageBroker thread!\n"));
- System::Thread th1(new System::ThreadArgImpl<NsMessageBroker::CMessageBroker>(*mpMessageBroker, &NsMessageBroker::CMessageBroker::MethodForThread, NULL));
- th1.Start(false);
-
- DBG_MSG(("Start MessageBroker TCP server thread!\n"));
- System::Thread th2(new System::ThreadArgImpl<NsMessageBroker::TcpServer>(server, &NsMessageBroker::TcpServer::MethodForThread, NULL));
- th2.Start(false);
-
- DBG_MSG(("Start tcpControllerAVA receiver thread!\n"));
- System::Thread th3(new System::ThreadArgImpl<NsMessageBroker::CMessageBrokerControllerAVA>(tcpControllerAVA, &NsMessageBroker::CMessageBrokerControllerAVA::MethodForReceiverThread, NULL));
- th3.Start(false);
-
- DBG_MSG(("Start tcpControllerPhone receiver thread!\n"));
- System::Thread th4(new System::ThreadArgImpl<NsMessageBroker::CMessageBrokerControllerPhone>(tcpControllerPhone, &NsMessageBroker::CMessageBrokerControllerPhone::MethodForReceiverThread, NULL));
- th4.Start(false);
-
- DBG_MSG(("Start tcpControllerBackend receiver thread!\n"));
- System::Thread th5(new System::ThreadArgImpl<NsMessageBroker::CMessageBrokerControllerBackend>(tcpControllerBackend, &NsMessageBroker::CMessageBrokerControllerBackend::MethodForReceiverThread, NULL));
- th5.Start(false);
-
- bool loop = true;
- while(loop)
- {
- DBG_MSG(("Enter command code:\n"));
- int i;
- std::cin >> i;
- switch(i)
- {
- case 0:
- {
- DBG_MSG(("Exit!\n"));
- mpMessageBroker->stopMessageBroker();
- th1.Stop();
- th2.Stop();
- th3.Stop();
- th4.Stop();
- server.Close();
- loop = false;
- break;
- }
- case 1:// register component
- {
- DBG_MSG(("tcpControllerAVA.register()\n"));
- tcpControllerAVA.registerController(0);
- DBG_MSG(("tcpControllerPhone.register()\n"));
- tcpControllerPhone.registerController(1);
- DBG_MSG(("tcpControllerBackend.register()\n"));
- tcpControllerBackend.registerController(2);
- break;
- }
- case 2:// external message
- {
- DBG_MSG(("tcpControllerAVA.Phone.Call()\n"));
- start = GetTickCount();
- tcpControllerAVA.makeCall("+380677639550");
- break;
- }
- case 3://subscribe
- {
- DBG_MSG(("tcpControllerAVA.subscribeTo()\n"));
- tcpControllerAVA.subscribeTo("Phone.onContactsUpdated");
- break;
- }
- case 4://notify
- {
- DBG_MSG(("tcpControllerPhone.onContactsUpdated()\n"));
- tcpControllerPhone.onContactsUpdated();
- break;
- }
- case 5: //unsubscribe
- {
- DBG_MSG(("tcpControllerAVA.unsubscribeFrom()\n"));
- tcpControllerAVA.unsubscribeFrom("Phone.onContactsUpdated");
- break;
- }
- case 6: //unregister
- {
- DBG_MSG(("tcpControllerPhone.unregister()\n"));
- tcpControllerPhone.unregisterController();
- break;
- }
- case 7: //stress test
- {
-
- DBG_MSG(("tcpControllerAVA.Phone.Call() 500 times\n"));
- start = GetTickCount();
- for (int c =0; c<1000; c++)
- {
- tcpControllerAVA.makeCall("+380677639550");
- }
- int stop = GetTickCount();
- int diff = stop - start;
- printf("Requests execution time is %d ms!\n", diff);
- break;
- }
- case 8: //parser test
- {
- DBG_MSG(("Parser test\n"));
- mpMessageBroker->Test();
- break;
- }
- default:
- {
- DBG_MSG(("Entered: %d\n", i));
- break;
- }
- }
- }
- return EXIT_SUCCESS;
-} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.hpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.hpp
deleted file mode 100644
index 884ed0309..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/example/MessageBrokerServer.hpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * \file MessageBrokerServer.hpp
- * \brief MessageBrokerServer header
- * \author AKara
- */
-
-#ifndef MESSAGEBROKERSERVER_H
-#define MESSAGEBROKERSERVER_H
-
-/**
- * \namespace NsMessageBroker
- * \brief MessageBroker related functions.
- */
-namespace NsMessageBroker
-{
-
-} /* namespace NsMessageBroker */
-
-#endif /* MESSAGEBROKERSERVER_H */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBroker.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBroker.cpp
deleted file mode 100644
index b7df5c0cc..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBroker.cpp
+++ /dev/null
@@ -1,778 +0,0 @@
-/**
- * \file CMessageBroker.cpp
- * \brief CMessageBroker singletone class implementation.
- * \author AKara
- */
-
-#include <stdio.h>
-#include <vector>
-
-#include <string>
-
-#include "CMessageBroker.hpp"
-#include "CMessageBrokerRegistry.hpp"
-
-#include "system.h"
-
-#include "json/json.h"
-
-#include "libMBDebugHelper.h"
-
-namespace NsMessageBroker {
-/**
- * \class CMessage
- * \brief CMessage class implementation.
- */
-class CMessage {
- public:
- /**
- * \brief Constructor.
- */
- CMessage(int aSenderFp, Json::Value aMessage) {
- mSenderFd = aSenderFp;
- mMessage = aMessage;
- }
-
- /**
- * \brief Destructor.
- */
- ~CMessage() {
- }
-
- /**
- * \brief getter for Json::Value message.
- * \return Json::Value message.
- */
- Json::Value getMessage() const {
- return mMessage;
- }
-
- /**
- * \brief getter for sender FileDescriptor.
- * \return sender FileDescriptor.
- */
- int getSenderFd() const {
- return mSenderFd;
- }
- private:
- /**
- * \brief sender FileDescriptor.
- */
- int mSenderFd;
-
- /**
- * \brief Json::Value message.
- */
- Json::Value mMessage;
-};
-
-
-class CMessageBroker_Private {
- public:
- /**
- * \brief Constructor.
- */
- CMessageBroker_Private();
-
- /**
- * \brief Check if que empty (Thread safe).
- * \return True when empty.
- */
- bool isEventQueueEmpty();
-
- /**
- * \brief Pop message from que (Thread safe).
- * \return Pointer to CMessage.
- */
- CMessage* popMessage();
-
- /**
- * \brief Push message to que (Thread safe).
- * \param pMessage pointer to new CMessage object.
- */
- void pushMessage(CMessage* pMessage);
-
- /**
- * \brief gets destination component name.
- * \param pMessage JSON message.
- * \return string destination component name.
- */
- std::string getDestinationComponentName(CMessage* pMessage);
-
- /**
- * \brief gets method name.
- * \param pMessage JSON message.
- * \return string method name.
- */
- std::string getMethodName(CMessage* pMessage);
-
- /**
- * \brief checks is message notification or not.
- * \param pMessage JSON message.
- * \return true if notification.
- */
- bool isNotification(CMessage* pMessage);
-
- /**
- * \brief checks is message response or not.
- * \param pMessage JSON message.
- * \return true if response.
- */
- bool isResponse(CMessage* pMessage);
-
- /**
- * \brief checks message.
- * \param pMessage JSON message.
- * \param error JSON message to fill in case of any errors.
- * \return true if message is good.
- */
- bool checkMessage(CMessage* pMessage, Json::Value& error);
-
- /**
- * \brief Process internal MessageBrocker message
- *
- * \brief Register controller in MessageBroker.
- * Use following JSON command to register new component:
- * \code
- * {"jsonrpc": "2.0", "method": "MB.registerComponent", "params": "<ComponentName>"}
- * \endcode
- *
- * \brief Unregister controller in MessageBroker.
- * Use following JSON command to unregister component:
- * \code
- * {"jsonrpc": "2.0", "method": "MB.unregisterComponent", "params": "<ComponentName>"}
- * \endcode
- *
- * \brief Subscribe controller on property change.
- * Use following JSON command to subscribe to notifications:
- * \code
- * {"jsonrpc": "2.0", "method": "MB.subscribeTo", "params": "<ComponentName>.<NotificationName>"}
- * \endcode
- *
- * \brief Unsubscribe controller from property change.
- * Use following JSON command to unsubscribe from notifications:
- * \code
- * {"jsonrpc": "2.0", "method": "MB.unsubscribeFrom", "params": "<ComponentName>.<NotificationName>"}
- * \endcode
- *
- * \param pMessage JSON message.
- */
- void processInternalMessage(CMessage* pMessage);
-
- /**
- * \brief process external message.
- * \param pMessage JSON message.
- */
- void processExternalMessage(CMessage* pMessage);
-
- /**
- * \brief process response.
- * \param pMessage JSON message.
- */
- void processResponse(CMessage* pMessage);
-
- /**
- * \brief Process notification message.
- * \brief Notify subscribers about property change.
- * expected notification format example:
- * \code
- * {"jsonrpc": "2.0", "method": "<ComponentName>.<NotificationName>", "params": <list of params>}
- * \endcode
- * \param pMessage JSON message.
- */
- void processNotification(CMessage* pMessage);
-
- /**
- * \brief send error message.
- * \param pMessage JSON message.
- */
- void processError(CMessage* pMessage);
-
- /**
- * \brief send Json message.
- * \param fd FileDescriptor of socket.
- * \param message JSON message.
- */
- void sendJsonMessage(int fd, Json::Value message);
-
- /**
- * \brief push message to wait response que.
- * \param pMessage JSON message.
- */
- void pushMessageToWaitQue(CMessage* pMessage);
-
- /**
- * \brief Returns start position for Id's generator of controller.
- * \return start position for Id's generator of controller (1000 id's).
- */
- int getNextControllerIdDiapason() {
- return 1000 * mControllersIdCounter++;
- }
-
- /**
- * \brief pop message from wait response que.
- * \param pMessage JSON message.
- */
- int popMessageFromWaitQue(CMessage* pMessage);
-
- /**
- * \brief Que of messages.
- */
- std::deque<CMessage*> mMessagesQueue;
-
- /**
- * \brief Counter of messages Id's diapason for the next controllers
- * From mControllersIdCounter*1000 to mControllersIdCounter*1000+999.
- */
- int mControllersIdCounter;
-
- /**
- * \brief Que of messages which are waiting the response in format: MessageId:SenderFd.
- */
- std::map<int, int> mWaitResponseQueue;
-
- /**
- * \brief Pointer to sender.
- */
- CSender* mpSender;
-
- /**
- * \brief Pointer to registry.
- */
- CMessageBrokerRegistry* mpRegistry;
-
- /**
- * \brief JSON reader.
- */
- Json::Reader m_reader;
-
- /**
- * \brief JSON writer.
- */
- Json::FastWriter m_writer;
-
- /**
- * \brief JSON writer for receiver.
- */
- Json::FastWriter m_recieverWriter;
-
- /**
- * \brief Messages que mutex.
- */
- System::Mutex mMessagesQueueMutex;
-
- /**
- * \brief Binary semaphore that is used to notify the
- * messaging thread that a new message is available.
- */
- System::BinarySemaphore m_messageQueueSemaphore;
-};
-
-CMessageBroker_Private::CMessageBroker_Private() :
- mControllersIdCounter(1),
- mpSender(NULL) {
- mpRegistry = CMessageBrokerRegistry::getInstance();
-}
-
-
-CMessageBroker::CMessageBroker() :
- p(new CMessageBroker_Private()) {
-}
-
-CMessageBroker::~CMessageBroker() {
- delete p, p = 0;
-}
-
-CMessageBroker* CMessageBroker::getInstance() {
- static CMessageBroker instance;
- return &instance;
-}
-
-void CMessageBroker::onMessageReceived(int fd, std::string& aJSONData) {
- DBG_MSG(("CMessageBroker::onMessageReceived()\n"));
- while (!aJSONData.empty())
- {
- Json::Value root;
- if (!p->m_reader.parse(aJSONData, root)) {
- DBG_MSG(("Received not JSON string! %s\n", aJSONData.c_str()));
- return;
- }
- if(root["jsonrpc"]!="2.0")
- {
- DBG_MSG(("\t Json::Reader::parce didn't set up jsonrpc! jsonrpc = '%s'\n", root["jsonrpc"].asString().c_str()));
- return;
- }
- std::string wmes = p->m_recieverWriter.write(root);
- DBG_MSG(("Parsed JSON string:%s; length: %d\n", wmes.c_str(), wmes.length()));
- DBG_MSG(("Buffer is:%s\n", aJSONData.c_str()));
- if (aJSONData.length() > wmes.length()) {
- // wmes string length can differ from buffer substr length
- size_t offset = wmes.length();
- char msg_begin = '{';
- if (aJSONData.at(offset) != msg_begin) {
- offset = aJSONData.find_last_of(msg_begin, offset);
- }
- aJSONData.erase(aJSONData.begin(), aJSONData.begin() + offset);
- DBG_MSG(("Buffer after cut is:%s\n", aJSONData.c_str()));
- } else {
- aJSONData = "";
- }
- p->pushMessage(new CMessage(fd, root));
- }
-}
-
-void CMessageBroker::Test() {
- Json::Value root, err;
- std::string ReceivingBuffer =
- "{\"id\":0,\"jsonrpc\":\"2.0\",\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"AVA\"}}123{\"id\":0,\"jsonrpc\":\"2.0\",\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"AVA\"}}";
- DBG_MSG(("String is:%s\n", ReceivingBuffer.c_str()));
- while (1) {
- if (!p->m_reader.parse(ReceivingBuffer, root)) {
- DBG_MSG_ERROR(("Received not JSON string! %s\n", ReceivingBuffer.c_str()));
- return;
- }
- std::string wmes = p->m_recieverWriter.write(root);
- DBG_MSG(("Parsed JSON string:%s; length: %d\n", wmes.c_str(), wmes.length()));
- DBG_MSG(("Buffer is:%s\n", ReceivingBuffer.c_str()));
- ssize_t beginpos = ReceivingBuffer.find(wmes);
- ReceivingBuffer.erase(0, beginpos + wmes.length());
- DBG_MSG(("Buffer after cut is:%s\n", ReceivingBuffer.c_str()));
- CMessage message(0, root);
- if (p->checkMessage(&message, err)) {
- //here put message to que
- } else {
- DBG_MSG_ERROR(("Wrong message:%s\n", wmes.c_str()));
- }
- }
-}
-
-void CMessageBroker::startMessageBroker(CSender* pSender) {
- DBG_MSG(("CMessageBroker::startMessageBroker()\n"));
- p->mpSender = pSender;
-}
-
-void CMessageBroker::stopMessageBroker() {
- p->mpSender = NULL;
- DBG_MSG(("CMessageBroker::stopMessageBroker()\n"));
-}
-
-CMessage* CMessageBroker_Private::popMessage() {
- CMessage* ret = NULL;
- DBG_MSG(("CMessageBroker::popMessage()\n"));
- mMessagesQueueMutex.Lock();
- if (false == mMessagesQueue.empty()) {
- ret = mMessagesQueue.front();
- mMessagesQueue.pop_front();// delete message from que
- } else {
- DBG_MSG(("Que is empty!\n"));
- }
- mMessagesQueueMutex.Unlock();
- return ret;
-}
-
-void CMessageBroker_Private::pushMessage(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::pushMessage()\n"));
- mMessagesQueueMutex.Lock();
- if (pMessage) {
- mMessagesQueue.push_back(pMessage);
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
- mMessagesQueueMutex.Unlock();
-
- m_messageQueueSemaphore.Notify();
-}
-
-bool CMessageBroker_Private::isEventQueueEmpty() {
- bool bResult = true;
- mMessagesQueueMutex.Lock();
- bResult = mMessagesQueue.empty();
- mMessagesQueueMutex.Unlock();
- return bResult;
-}
-
-std::string CMessageBroker_Private::getDestinationComponentName(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::getDestinationComponentName()\n"));
- std::string ret = "";
- if (pMessage) {
- Json::Value mes = pMessage->getMessage();
- std::string method = mes["method"].asString();
- int pos = method.find(".");
- if (-1 != pos) {
- ret = method.substr(0, pos);
- }
- DBG_MSG(("Destination component is: %s\n", ret.c_str()));
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
- return ret;
-}
-
-std::string CMessageBroker_Private::getMethodName(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::getMethodName()\n"));
- std::string ret = "";
- if (pMessage) {
- Json::Value mes = pMessage->getMessage();
- std::string method = mes["method"].asString();
- int pos = method.find(".");
- if (-1 != pos) {
- ret = method.substr(pos + 1);
- }
- DBG_MSG(("Method is: %s\n", ret.c_str()));
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
- return ret;
-}
-
-bool CMessageBroker_Private::isNotification(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::isNotification()\n"));
- bool ret = false;
- Json::Value mes = pMessage->getMessage();
- if (false == mes.isMember("id")) {
- ret = true;
- }
- DBG_MSG(("Result: %d\n", ret));
- return ret;
-}
-
-bool CMessageBroker_Private::isResponse(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::isResponse()\n"));
- bool ret = false;
- Json::Value mes = pMessage->getMessage();
- if ((true == mes.isMember("result")) || (true == mes.isMember("error"))) {
- ret = true;
- }
- DBG_MSG(("Result: %d\n", ret));
- return ret;
-}
-
-void CMessageBroker_Private::pushMessageToWaitQue(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::pushMessageToWaitQue()\n"));
- if (pMessage) {
- Json::Value root = pMessage->getMessage();
- mWaitResponseQueue.insert(std::map<int, int>::value_type(root["id"].asInt(), pMessage->getSenderFd()));
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
-}
-
-int CMessageBroker_Private::popMessageFromWaitQue(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::popMessageFromWaitQue()\n"));
- int result = -1;
- if (pMessage) {
- Json::Value root = pMessage->getMessage();
- int messageId = root["id"].asInt();
- std::map <int, int>::iterator it;
- it = mWaitResponseQueue.find(messageId);
- if (it != mWaitResponseQueue.end()) {
- result = (*it).second;
- mWaitResponseQueue.erase(it);
- }
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
- DBG_MSG(("Senders Fd: %d\n", result));
- return result;
-}
-
-void CMessageBroker_Private::processInternalMessage(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::processInternalMessage()\n"));
- if (pMessage) {
- std::string amethodName = getMethodName(pMessage);
- DBG_MSG(("Method: %s\n", amethodName.c_str()));
- Json::Value root = pMessage->getMessage();
- if ("registerComponent" == amethodName) {
- Json::Value params = root["params"];
- if (params.isMember("componentName") && params["componentName"].isString()) {
- std::string controllerName = params["componentName"].asString();
- if (mpRegistry->addController(pMessage->getSenderFd(), controllerName)) {
- Json::Value response;
- response["id"] = root["id"];
- response["jsonrpc"] = "2.0";
- response["result"] = getNextControllerIdDiapason();
- sendJsonMessage(pMessage->getSenderFd(), response);
- } else {
- Json::Value error, err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = CONTROLLER_EXISTS;
- err["message"] = "Controller has been already registered.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else {
- Json::Value error, err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Wrong method parameter.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else if ("subscribeTo" == amethodName) {
- Json::Value params = root["params"];
- if (params.isMember("propertyName") && params["propertyName"].isString()) {
- std::string propertyName = params["propertyName"].asString();
- if (mpRegistry->addSubscriber(pMessage->getSenderFd(), propertyName)) {
- Json::Value response;
- response["id"] = root["id"];
- response["jsonrpc"] = "2.0";
- response["result"] = "OK";
- sendJsonMessage(pMessage->getSenderFd(), response);
- } else {
- Json::Value error, err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = CONTROLLER_EXISTS;
- err["message"] = "Subscribe has been already registered.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else {
- Json::Value error, err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Wrong method parameter.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else if ("unregisterComponent" == amethodName) {
- Json::Value params = root["params"];
- if (params.isMember("componentName") && params["componentName"].isString()) {
- std::string controllerName = params["componentName"].asString();
- mpRegistry->deleteController(controllerName);
- Json::Value response;
- response["id"] = root["id"];
- response["jsonrpc"] = "2.0";
- response["result"] = "OK";
- sendJsonMessage(pMessage->getSenderFd(), response);
- } else {
- Json::Value error, err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Wrong method parameter.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else if ("unsubscribeFrom" == amethodName) {
- Json::Value params = root["params"];
- if (params.isMember("propertyName") && params["propertyName"].isString()) {
- std::string propertyName = params["propertyName"].asString();
- mpRegistry->deleteSubscriber(pMessage->getSenderFd(), propertyName);
- Json::Value response;
- response["id"] = root["id"];
- response["jsonrpc"] = "2.0";
- response["result"] = "OK";
- sendJsonMessage(pMessage->getSenderFd(), response);
- } else {
- Json::Value error, err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Wrong method parameter.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else {
- DBG_MSG(("Unknown method!\n"));
- Json::Value error;
- Json::Value err;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Invalid MessageBroker method.";
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
-}
-
-void CMessageBroker_Private::processExternalMessage(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::processExternalMessage()\n"));
- if (pMessage) {
- std::string destComponentName = getDestinationComponentName(pMessage);
- int destFd = mpRegistry->getDestinationFd(destComponentName);
- Json::Value root = pMessage->getMessage();
- if (0 < destFd) {
- sendJsonMessage(destFd, root);
- pushMessageToWaitQue(pMessage);
- } else {
- // error, controller not found in the registry
- DBG_MSG(("Unknown method!\n"));
- Json::Value error;
- Json::Value err;
- Json::Value error_data;
- error["id"] = root["id"];
- error["jsonrpc"] = "2.0";
- err["code"] = UNSUPPORTED_RESOURCE;
- err["message"] = "Destination controller not found!";
- error_data["method"] = root["method"];
- err["data"] = error_data;
- error["error"] = err;
- processError(new CMessage(pMessage->getSenderFd(), error));
- }
- } else {
- DBG_MSG_ERROR(("NULL pointer\n"));
- }
-}
-
-void CMessageBroker_Private::processResponse(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::processResponse()\n"));
- if (pMessage) {
- int senderFd = popMessageFromWaitQue(pMessage);
- if (-1 != senderFd) {
- sendJsonMessage(senderFd, pMessage->getMessage());
- }
- } else {
- DBG_MSG_ERROR(("NULL pointer\n"));
- }
-}
-
-void CMessageBroker_Private::processNotification(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::processNotification()\n"));
- if (pMessage) {
- Json::Value root = pMessage->getMessage();
- std::string methodName = root["method"].asString();
- DBG_MSG(("Property: %s\n", methodName.c_str()));
- std::vector<int> result;
- int subscribersCount = mpRegistry->getSubscribersFd(methodName, result);
- if (0 < subscribersCount) {
- std::vector<int>::iterator it;
- for (it = result.begin(); it != result.end(); it++) {
- sendJsonMessage(*it, root);
- }
- } else {
- DBG_MSG(("No subscribers for this property!\n"));
- }
- } else {
- DBG_MSG_ERROR(("NULL pointer\n"));
- }
-}
-
-void CMessageBroker_Private::processError(CMessage* pMessage) {
- DBG_MSG(("CMessageBroker::processError()\n"));
- if (pMessage) {
- sendJsonMessage(pMessage->getSenderFd(), pMessage->getMessage());
- delete pMessage;// delete CMessage object with error description!!!
- } else {
- DBG_MSG_ERROR(("NULL pointer\n"));
- }
-}
-
-void CMessageBroker_Private::sendJsonMessage(int fd, Json::Value message) {
- DBG_MSG(("CMessageBroker::sendJsonMessage()\n"));
- if (mpSender) {
- std::string mes = m_writer.write(message);
- int retVal = mpSender->Send(fd, mes);
- if (retVal == -1) {
- DBG_MSG_ERROR(("Message hasn't been sent!\n"));
- return;
- }
- DBG_MSG(("Length:%d, Sent: %d bytes\n", mes.length(), retVal));
- } else {
- DBG_MSG_ERROR(("mpSender NULL pointer\n"));
- }
-}
-
-void* CMessageBroker::MethodForThread(void* arg) {
- arg = arg; // to avoid compiler warnings
- while (1) {
- while (!p->isEventQueueEmpty()) {
- CMessage* message = p->popMessage();
- if (message) {
- Json::Value error;
- if (p->checkMessage(message, error)) {
- if (p->isNotification(message)) {
- DBG_MSG(("Message is notification!\n"));
- p->processNotification(message);
- } else if (p->isResponse(message)) {
- DBG_MSG(("Message is response!\n"));
- p->processResponse(message);
- } else {
- if ("MB" == p->getDestinationComponentName(message)) {
- DBG_MSG(("Internal MessageBroker method!\n"));
- p->processInternalMessage(message);
- } else {
- DBG_MSG(("Not MessageBroker method!\n"));
- p->processExternalMessage(message);
- }
- }
- } else {
- DBG_MSG_ERROR(("Message contains wrong data!\n"));
- CMessage* errMessage = new CMessage(message->getSenderFd(), error);
- if (NULL != errMessage) {
- p->processError(errMessage);
- } else {
- DBG_MSG_ERROR(("NULL pointer!\n"));
- }
- }
- delete message;// delete message object
- }
- }
- p->m_messageQueueSemaphore.Wait();
- }
-
- return NULL;
-}
-
-bool CMessageBroker_Private::checkMessage(CMessage* pMessage, Json::Value& error) {
- DBG_MSG(("CMessageBroker::checkMessage()\n"));
- Json::Value root;
- root = pMessage->getMessage();
- Json::Value err;
-
- /* check the JSON-RPC version => 2.0 */
- if (!root.isObject() || !root.isMember("jsonrpc") || root["jsonrpc"] != "2.0") {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Invalid JSON RPC version.";
- error["error"] = err;
- return false;
- }
-
- /* Check the id of message */
- if (root.isMember("id") && (root["id"].isArray() || root["id"].isObject() || root["id"].isString())) {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Invalid ID of message.";
- error["error"] = err;
- return false;
- }
-
- /* extract "method" attribute */
- if (root.isMember("method")) {
- if (!root["method"].isString()) {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Invalid JSONRPC method.";
- error["error"] = err;
- return false;
- }
- /* Check the params is an object*/
- if (root.isMember("params") && !root["params"].isObject()) {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Invalid JSONRPC params.";
- error["error"] = err;
- return false;
- }
- } else if (!(root.isMember("result") || root.isMember("error"))) {
- error["id"] = Json::Value::null;
- error["jsonrpc"] = "2.0";
- err["code"] = INVALID_REQUEST;
- err["message"] = "Unknwn message type.";
- error["error"] = err;
- return false;
- }
- return true;
-}
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp
deleted file mode 100644
index 43006b237..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * \file CMessageBrokerRegistry.cpp
- * \brief CMessageBrokerRegistry singletone class implementation.
- * \author AKara
- */
-
-#include "CMessageBrokerRegistry.hpp"
-
-#include "libMBDebugHelper.h"
-
-#include <vector>
-#include <string>
-
-namespace NsMessageBroker
-{
- CMessageBrokerRegistry::CMessageBrokerRegistry()
- {
- }
-
- CMessageBrokerRegistry::~CMessageBrokerRegistry()
- {
- }
-
- CMessageBrokerRegistry* CMessageBrokerRegistry::getInstance()
- {
- static CMessageBrokerRegistry instance;
- return &instance;
- }
-
- bool CMessageBrokerRegistry::addController(int fd, std::string name)
- {
- DBG_MSG(("CMessageBrokerRegistry::addController()\n"));
- bool result = false;
- std::map <std::string, int>::iterator it;
- it = mControllersList.find(name);
- if (it == mControllersList.end())
- {
- mControllersList.insert(std::map <std::string, int>::value_type(name, fd));
- result = true;
- } else
- {
- DBG_MSG(("Controller already exists!\n"));
- }
- DBG_MSG(("Count of controllers: %d\n", mControllersList.size()));
- return result;
- }
-
- void CMessageBrokerRegistry::deleteController(std::string name)
- {
- DBG_MSG(("CMessageBrokerRegistry::deleteController()\n"));
- std::map <std::string, int>::iterator it;
- it = mControllersList.find(name);
- if (it != mControllersList.end())
- {
- mControllersList.erase(it);
- } else
- {
- DBG_MSG(("No such controller in the list!\n"));
- }
- DBG_MSG(("Count of controllers: %d\n", mControllersList.size()));
- }
-
- bool CMessageBrokerRegistry::addSubscriber(int fd, std::string name)
- {
- DBG_MSG(("CMessageBrokerRegistry::addSubscriber()\n"));
- bool result = true;
- std::pair<std::multimap <std::string, int>::iterator, std::multimap <std::string, int>::iterator> p = mSubscribersList.equal_range(name);
- if (p.first != p.second)
- {
- std::multimap <std::string, int>::iterator itr;
- for (itr = p.first; itr != p.second; itr++)
- {
- if (fd == itr->second)
- {
- result = false;
- DBG_MSG(("Subscriber already exists!\n"));
- }
- }
- }
- if (result)
- {
- mSubscribersList.insert(std::map <std::string, int>::value_type(name, fd));
- }
- DBG_MSG(("Count of subscribers: %d\n", mSubscribersList.size()));
- return result;
- }
-
- void CMessageBrokerRegistry::deleteSubscriber(int fd, std::string name)
- {
- DBG_MSG(("CMessageBrokerRegistry::deleteSubscriber()\n"));
- std::pair<std::multimap <std::string, int>::iterator, std::multimap <std::string, int>::iterator> p = mSubscribersList.equal_range(name);
- if (p.first != p.second)
- {
- std::multimap <std::string, int>::iterator itr;
- for (itr = p.first; itr != p.second; itr++)
- {
- if (fd == itr->second)
- {
- mSubscribersList.erase(itr);
- }
- }
- }
- DBG_MSG(("Count of subscribers: %d\n", mSubscribersList.size()));
- }
-
- int CMessageBrokerRegistry::getDestinationFd(std::string name)
- {
- DBG_MSG(("CMessageBrokerRegistry::getDestinationFd()\n"));
- int result = -1;
- std::map <std::string, int>::iterator it;
- it = mControllersList.find(name);
- if (it != mControllersList.end())
- {
- result = it->second;
- }
- DBG_MSG(("Controllers Fd: %d\n", result));
- return result;
- }
-
- int CMessageBrokerRegistry::getSubscribersFd(std::string name, std::vector<int>& result)
- {
- DBG_MSG(("CMessageBrokerRegistry::getSubscribersFd()\n"));
- int res = 0;
- std::map <std::string, int>::iterator it;
- std::pair<std::multimap <std::string, int>::iterator, std::multimap <std::string, int>::iterator> p = mSubscribersList.equal_range(name);
- if (p.first != p.second)
- {
- std::multimap <std::string, int>::iterator itr;
- for (itr = p.first; itr != p.second; itr++)
- {
- result.push_back(itr->second);
- DBG_MSG(("Controllers Fd: %d\n", itr->second));
- }
- }
- res = result.size();
- DBG_MSG(("Result vector size: %d\n", res));
- return res;
- }
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/libMBDebugHelper.h b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/libMBDebugHelper.h
deleted file mode 100644
index 0d5260cdd..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/libMBDebugHelper.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * \file libMBDebugHelper.h
- * \brief DebugHelper.
- * \author AKara
- */
-
-#ifndef MB_DEBUG_HELPER_H
-#define MB_DEBUG_HELPER_H
-
-#include <cstdio>
-
-/**
-* \def DEBUG_MB_ON
-* \brief Switches on MessageBroker debug messages.
-*/
-#ifdef DEBUG_MB_ON
-
-/**
-* \def DBG_MSG
-* \brief Debug message output with file name and line number.
-* \param x formatted debug message.
-* \return printf construction.
-*/
-#define DBG_MSG(x) printf("%s:%d_lib ", __FILE__, __LINE__);\
- printf x
-
-/**
- * \def DBG_MSG_ERROR
- * \brief Debug ERROR message output with file name and line number.
- * \param x formatted debug message.
- * \return printf construction.
- */
-#define DBG_MSG_ERROR(x) printf("ERROR!!! %s:%d_lib ", __FILE__, __LINE__);\
- printf x
-
-#else
-
-#define DBG_MSG(x)
-#define DBG_MSG_ERROR(x)
-
-#endif
-
-#endif /*MB_DEBUG_HELPER_H*/
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.cpp
deleted file mode 100644
index b3e347d9d..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.cpp
+++ /dev/null
@@ -1,373 +0,0 @@
-/* MD5
- converted to C++ class by Frank Thilo (thilo@unix-ag.org)
- for bzflag (http://www.bzflag.org)
-
- based on:
-
- md5.h and md5.c
- reference implemantion of RFC 1321
-
- Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD5 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
-
- */
-
-/* interface header */
-#include "md5.h"
-
-/* system implementation headers */
-#include <stdio.h>
-#include <memory.h>
-
-// Constants for MD5Transform routine.
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-///////////////////////////////////////////////
-
-// F, G, H and I are basic MD5 functions.
-inline MD5::uint4 MD5::F(uint4 x, uint4 y, uint4 z) {
- return (x&y) | (~x&z);
-}
-
-inline MD5::uint4 MD5::G(uint4 x, uint4 y, uint4 z) {
- return (x&z) | (y&~z);
-}
-
-inline MD5::uint4 MD5::H_(uint4 x, uint4 y, uint4 z) {
- return x^y^z;
-}
-
-inline MD5::uint4 MD5::I(uint4 x, uint4 y, uint4 z) {
- return y ^ (x | ~z);
-}
-
-// rotate_left rotates x left n bits.
-inline MD5::uint4 MD5::rotate_left(uint4 x, int n) {
- return (x << n) | (x >> (32-n));
-}
-
-// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
-// Rotation is separate from addition to prevent recomputation.
-inline void MD5::FF(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) {
- a = rotate_left(a+ F(b,c,d) + x + ac, s) + b;
-}
-
-inline void MD5::GG(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) {
- a = rotate_left(a + G(b,c,d) + x + ac, s) + b;
-}
-
-inline void MD5::HH(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) {
- a = rotate_left(a + H_(b,c,d) + x + ac, s) + b;
-}
-
-inline void MD5::II(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) {
- a = rotate_left(a + I(b,c,d) + x + ac, s) + b;
-}
-
-//////////////////////////////////////////////
-
-// default ctor, just initailize
-MD5::MD5()
-{
- init();
-}
-
-//////////////////////////////////////////////
-
-// nifty shortcut ctor, compute MD5 for string and finalize it right away
-MD5::MD5(const std::string &text)
-{
- init();
- update(text.c_str(), text.length());
- finalize();
-}
-
-//////////////////////////////
-
-void MD5::init()
-{
- finalized=false;
-
- count[0] = 0;
- count[1] = 0;
-
- // load magic initialization constants.
- state[0] = 0x67452301;
- state[1] = 0xefcdab89;
- state[2] = 0x98badcfe;
- state[3] = 0x10325476;
-}
-
-//////////////////////////////
-
-// decodes input (unsigned char) into output (uint4). Assumes len is a multiple of 4.
-void MD5::decode(uint4 output[], const uint1 input[], size_type len)
-{
- for (unsigned int i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((uint4)input[j]) | (((uint4)input[j+1]) << 8) |
- (((uint4)input[j+2]) << 16) | (((uint4)input[j+3]) << 24);
-}
-
-//////////////////////////////
-
-// encodes input (uint4) into output (unsigned char). Assumes len is
-// a multiple of 4.
-void MD5::encode(uint1 output[], const uint4 input[], size_type len)
-{
- for (size_type i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = input[i] & 0xff;
- output[j+1] = (input[i] >> 8) & 0xff;
- output[j+2] = (input[i] >> 16) & 0xff;
- output[j+3] = (input[i] >> 24) & 0xff;
- }
-}
-
-//////////////////////////////
-
-// apply MD5 algo on a block
-void MD5::transform(const uint1 block[blocksize])
-{
- uint4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
- decode (x, block, blocksize);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- // Zeroize sensitive information.
- memset(x, 0, sizeof x);
-}
-
-//////////////////////////////
-
-// MD5 block update operation. Continues an MD5 message-digest
-// operation, processing another message block
-void MD5::update(const unsigned char input[], size_type length)
-{
- // compute number of bytes mod 64
- size_type index = count[0] / 8 % blocksize;
-
- // Update number of bits
- if ((count[0] += (length << 3)) < (length << 3))
- count[1]++;
- count[1] += (length >> 29);
-
- // number of bytes we need to fill in buffer
- size_type firstpart = 64 - index;
-
- size_type i;
-
- // transform as many times as possible.
- if (length >= firstpart)
- {
- // fill buffer first, transform
- memcpy(&buffer[index], input, firstpart);
- transform(buffer);
-
- // transform chunks of blocksize (64 bytes)
- for (i = firstpart; i + blocksize <= length; i += blocksize)
- transform(&input[i]);
-
- index = 0;
- }
- else
- i = 0;
-
- // buffer remaining input
- memcpy(&buffer[index], &input[i], length-i);
-}
-
-//////////////////////////////
-
-// for convenience provide a verson with signed char
-void MD5::update(const char input[], size_type length)
-{
- update((const unsigned char*)input, length);
-}
-
-//////////////////////////////
-
-// MD5 finalization. Ends an MD5 message-digest operation, writing the
-// the message digest and zeroizing the context.
-MD5& MD5::finalize()
-{
- static unsigned char padding[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- if (!finalized) {
- // Save number of bits
- unsigned char bits[8];
- encode(bits, count, 8);
-
- // pad out to 56 mod 64.
- size_type index = count[0] / 8 % 64;
- size_type padLen = (index < 56) ? (56 - index) : (120 - index);
- update(padding, padLen);
-
- // Append length (before padding)
- update(bits, 8);
-
- // Store state in digest
- encode(digest, state, 16);
-
- // Zeroize sensitive information.
- memset(buffer, 0, sizeof buffer);
- memset(count, 0, sizeof count);
-
- finalized=true;
- }
-
- return *this;
-}
-
-//////////////////////////////
-
-void MD5::getdigest(char *digest) const
-{
- if (!finalized)
- return;
-
- if (digest == NULL)
- return;
-
- memcpy(digest, this->digest, 16);
-}
-
-// return hex representation of digest as string
-std::string MD5::hexdigest() const
-{
- if (!finalized)
- return "";
-
- char buf[33];
- for (int i=0; i<16; i++)
- sprintf(buf+i*2, "%02x", digest[i]);
- buf[32]=0;
-
- return std::string(buf);
-}
-
-//////////////////////////////
-
-std::ostream& operator<<(std::ostream& out, MD5 md5)
-{
- return out << md5.hexdigest();
-}
-
-//////////////////////////////
-
-std::string md5(const std::string str)
-{
- MD5 md5 = MD5(str);
-
- return md5.hexdigest();
-} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.h b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.h
deleted file mode 100644
index 2c54c03b1..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/md5.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* MD5
- converted to C++ class by Frank Thilo (thilo@unix-ag.org)
- for bzflag (http://www.bzflag.org)
-
- based on:
-
- md5.h and md5.c
- reference implementation of RFC 1321
-
- Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD5 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
-
- */
-
-#ifndef BZF_MD5_H
-#define BZF_MD5_H
-
-#include <string>
-#include <iostream>
-
-// a small class for calculating MD5 hashes of strings or byte arrays
-// it is not meant to be fast or secure
-//
-// usage: 1) feed it blocks of uchars with update()
-// 2) finalize()
-// 3) get hexdigest() string
-// or
-// MD5(std::string).hexdigest()
-//
-// assumes that char is 8 bit and int is 32 bit
-class MD5
-{
-public:
- typedef unsigned int size_type; // must be 32bit
-
- MD5();
- MD5(const std::string& text);
- void update(const unsigned char *buf, size_type length);
- void update(const char *buf, size_type length);
- MD5& finalize();
- void getdigest(char *digest) const; // digest must be 16 bytes long
- std::string hexdigest() const;
- friend std::ostream& operator<<(std::ostream&, MD5 md5);
-
-private:
- void init();
- typedef unsigned char uint1; // 8bit
- typedef unsigned int uint4; // 32bit
- enum {blocksize = 64}; // VC6 won't eat a const static int here
-
- void transform(const uint1 block[blocksize]);
- static void decode(uint4 output[], const uint1 input[], size_type len);
- static void encode(uint1 output[], const uint4 input[], size_type len);
-
- bool finalized;
- uint1 buffer[blocksize]; // bytes that didn't fit in last 64 byte chunk
- uint4 count[2]; // 64bit counter for number of bits (lo, hi)
- uint4 state[4]; // digest so far
- uint1 digest[16]; // the result
-
- // low level logic operations
- static inline uint4 F(uint4 x, uint4 y, uint4 z);
- static inline uint4 G(uint4 x, uint4 y, uint4 z);
- static inline uint4 H_(uint4 x, uint4 y, uint4 z);
- static inline uint4 I(uint4 x, uint4 y, uint4 z);
- static inline uint4 rotate_left(uint4 x, int n);
- static inline void FF(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
- static inline void GG(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
- static inline void HH(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
- static inline void II(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
-};
-
-std::string md5(const std::string str);
-
-#endif \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/system.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/system.cpp
deleted file mode 100644
index 5fda014db..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/system.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * JsonRpc-Cpp - JSON-RPC implementation.
- * Copyright (C) 2008-2011 Sebastien Vincent <sebastien.vincent@cppextrem.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * \file system.cpp
- * \brief System utils.
- * \author Sebastien Vincent
- */
-
-#include <time.h>
-
-#include "system.h"
-
-namespace System {
-
-void msleep(unsigned long ms) {
-#ifdef _WIN32
- Sleep(ms);
-#else
- /* Unix */
- struct timespec req;
- req.tv_sec = ms / 1000;
- req.tv_nsec = (ms % 1000) * 1000000;
- nanosleep(&req, NULL);
-#endif
-}
-
-ThreadArg::~ThreadArg() {
-}
-
-#ifndef WIN32
-
-/* POSIX specific part for thread and mutex */
-
-Thread::Thread(ThreadArg* arg) {
- m_arg = arg;
-}
-
-Thread::~Thread() {
- delete m_arg;
-}
-
-bool Thread::Start(bool detach) {
- pthread_attr_t attr;
- int ret = -1;
-
- /* must have valid object argument */
- if (m_arg == NULL) {
- return false;
- }
-
- /* set the detach state value */
- if (pthread_attr_init(&attr) != 0) {
- return false;
- }
-
- if (pthread_attr_setdetachstate(&attr, detach ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE) != 0) {
- pthread_attr_destroy(&attr);
- return false;
- }
-
- /* create thread */
- ret = pthread_create(&m_id, &attr, &Thread::Call, this);
- pthread_attr_destroy(&attr);
- return ret == 0;
-}
-
-bool Thread::Stop() {
- pthread_cancel(m_id);
- return false;// Android does not support 'pthread_cancel';
-}
-
-bool Thread::Join(void** ret) {
- return pthread_join(m_id, ret) == 0;
-}
-
-void* Thread::Call(void* arg) {
- Thread* thread = static_cast<Thread*>(arg);
-
- /* call our specific object method */
- return thread->m_arg->Call();
-}
-
-Mutex::Mutex() {
- pthread_mutexattr_t attr;
-
- pthread_mutexattr_init(&attr);
- pthread_mutex_init(&m_mutex, &attr);
- pthread_mutexattr_destroy(&attr);
-}
-
-Mutex::~Mutex() {
- pthread_mutex_destroy(&m_mutex);
-}
-
-bool Mutex::Lock() {
- return !pthread_mutex_lock(&m_mutex);
-}
-
-bool Mutex::Unlock() {
- return !pthread_mutex_unlock(&m_mutex);
-}
-
-
-// Based on Binary Semaphores example at
-// http://www.mathcs.emory.edu/~cheung/Courses/455/Syllabus/5c-pthreads/sync.html
-BinarySemaphore::BinarySemaphore() :
- m_mutex(PTHREAD_MUTEX_INITIALIZER),
- m_cond(PTHREAD_COND_INITIALIZER),
- m_isUp(false) {
- pthread_mutex_init(&m_mutex, NULL);
- pthread_cond_init(&m_cond, NULL);
-}
-
-BinarySemaphore::~BinarySemaphore() {
- pthread_cond_destroy(&m_cond);
- pthread_mutex_destroy(&m_mutex);
-}
-
-void BinarySemaphore::Wait() {
- // try to get exclusive access to the flag
- pthread_mutex_lock(&m_mutex);
- // success: no other thread can get here unless
- // the current thread unlocks the mutex
-
- // wait until the flag is up
- while (!m_isUp) {
- pthread_cond_wait(&m_cond, &m_mutex);
- // when the current thread executes this, it will be
- // blocked on m_cond, and automatically unlocks the
- // mutex! Unlocking the mutex will let other threads
- // in to test the flag.
- }
-
- // here we know that flag is upand this thread has now
- // successfully passed the semaphore
-
- // this will cause all other threads that execute the Wait()
- // call to wait in the above loop
- m_isUp = false;
-
- // release the exclusive access to the flag
- pthread_mutex_unlock(&m_mutex);
-}
-
-void BinarySemaphore::Notify() {
- // try to get exclusive access to the flag
- pthread_mutex_lock(&m_mutex);
-
- // this call may resume a thread that is blocked on m_cond
- // (in the Wait() call). if there was none, this does nothing
- pthread_cond_signal(&m_cond);
-
- // up the flag
- m_isUp = true;
-
- // release the exclusive access to the flag
- pthread_mutex_unlock(&m_mutex);
-}
-
-#else
-
-/* Windows specific part for thread and mutex */
-
-Thread::Thread(ThreadArg* arg) {
- m_arg = arg;
-}
-
-Thread::~Thread() {
- delete m_arg;
-}
-
-bool Thread::Start(bool detach) {
- detach = detach; /* unused parameter */
-
- m_id = CreateThread(NULL, /* default security attributes */
- 0, /* use default stack size */
- &Thread::Call, /* thread function name */
- this, /* argument to thread function */
- 0, /* use default creation flags */
- NULL); /* returns the thread identifier */
-
- return m_id != NULL;
-}
-
-bool Thread::Stop() {
- return TerminateThread(m_id, (DWORD) - 1);
-}
-
-bool Thread::Join(void** ret) {
- DWORD val = 0;
- WaitForSingleObject(m_id, INFINITE);
- GetExitCodeThread(m_id, &val);
- CloseHandle(m_id);
- m_id = NULL;
- *ret = (void*)val;
- return true;
-}
-
-DWORD WINAPI Thread::Call(LPVOID arg) {
- Thread* thread = static_cast<Thread*>(arg);
-
- /* call our specific object method */
-#ifdef _WIN64
- return (DWORD64)thread->m_arg->Call();
-#else
- return (DWORD)thread->m_arg->Call();
-#endif
-}
-
-Mutex::Mutex() {
- m_mutex = CreateMutex(NULL, /* no security attribute */
- 0, /* not initial owner (i.e. no first lock) */
- NULL); /* no name */
-}
-
-Mutex::~Mutex() {
- /* free mutex */
- if (m_mutex) {
- CloseHandle(m_mutex);
- }
-}
-
-bool Mutex::Lock() {
- if (!m_mutex) {
- return false;
- }
-
- return (WaitForSingleObject(m_mutex, INFINITE) == WAIT_OBJECT_0);
-}
-
-bool Mutex::Unlock() {
- if (!m_mutex) {
- return false;
- }
-
- return ReleaseMutex(m_mutex);
-}
-
-#endif
-
-} /* namespace System */
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/websocket_handler.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
deleted file mode 100644
index 18a07a1b4..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
+++ /dev/null
@@ -1,655 +0,0 @@
-/**
- * \file websocket_handler.cpp
- * \brief WebSocket Handler.
- * \author AKara
- */
-
-#include <cstdio>
-
-#include <cstring>
-#include <sstream>
-#include <netinet/in.h>
-
-#ifdef _WIN32
-#include <winsock2.h>
-#endif//_WIN32
-
-#include "websocket_handler.hpp"
-
-#include "libMBDebugHelper.h"
-#include "md5.h"
-
-namespace NsMessageBroker
-{
-
- unsigned int CWebSocketHandler::parseWebSocketDataLength(
- const char* Buffer, unsigned int& b_size) {
-
- unsigned char payload =
- (unsigned char)((Buffer[1] & 0x40) | (Buffer[1] & 0x20) |
- (Buffer[1] & 0x10) | (Buffer[1] & 0x08) | (Buffer[1] & 0x04) |
- (Buffer[1] & 0x02) | (Buffer[1] & 0x01));
- unsigned long length = 0;
- unsigned char position = 2; // current buffer position
-
- switch(payload) {
- case 126:
- {
- length = (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- break;
- }
- case 127:
- {
- length = (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- length <<=8;
- length |= (unsigned char)Buffer[position++];
- break;
- }
- default:
- {
- length = payload;
- return length;
- }
- }
-
- return length;
- }
-
- int CWebSocketHandler::parseWebSocketData(char* Buffer, unsigned int& b_size)
- {
- // Please see RFC6455 standard protocol specification:
- //http://tools.ietf.org/html/rfc6455
- // Chapter 5.2
- DBG_MSG(("CWebSocketHandler::parseWebSocketData()b_size = %d\n", b_size));
- char* recBuffer = Buffer;
- unsigned int parsedBufferPosition = 0;
- unsigned char position = 0; // current buffer position
-
- while (0 < b_size) {
-
- bool fin = ((recBuffer[0] & 0x80) | (recBuffer[0] & 0x01)) == 0x81;
- bool rsv1 = (recBuffer[0] & 0x40) == 0x40;
- bool rsv2 = (recBuffer[0] & 0x20) == 0x20;
- bool rsv3 = (recBuffer[0] & 0x10) == 0x10;
- unsigned char opCode = ((recBuffer[0] & 0x08) | (recBuffer[0] & 0x04) |
- (recBuffer[0] & 0x02) | (recBuffer[0] & 0x01));
- bool mask = (recBuffer[1] & 0x80) == 0x80;
-
- DBG_MSG(("CWebSocketHandler::fin = %d recBuffer[0] = 0x%02X\n"
- " parsedlength = %d b_size= %d parsedBufferPosition = %d\n",
- fin, recBuffer[0], parsedBufferPosition + position,
- b_size, parsedBufferPosition));
-
-
- if (false == fin) {
- break;
- }
-
- unsigned char payload = (unsigned char)
- ((recBuffer[1] & 0x40) | (recBuffer[1] & 0x20) | (recBuffer[1] & 0x10) |
- (recBuffer[1] & 0x08) | (recBuffer[1] & 0x04) | (recBuffer[1] & 0x02) |
- (recBuffer[1] & 0x01));
-
- unsigned int size = b_size;
- unsigned long length = parseWebSocketDataLength(recBuffer, size);
- position = 2;
-
- if (length > size) {
- break;
- }
-
- switch(payload) {
- case 126:
- {
- position +=2;
- break;
- }
- case 127:
- {
- position +=8;
- break;
- }
- default:
- {
- break;
- }
- }
-
- if (mask)
- {
- unsigned char maskKeys[4];
- maskKeys[0] = recBuffer[position++];
- maskKeys[1] = recBuffer[position++];
- maskKeys[2] = recBuffer[position++];
- maskKeys[3] = recBuffer[position++];
- DBG_MSG(("CWebSocketHandler::parseWebSocketData()maskKeys[0]:0x%02X;"
- " maskKeys[1]:0x%02X; maskKeys[2]:0x%02X; maskKeys[3]:0x%02X\n"
- , maskKeys[0], maskKeys[1], maskKeys[2], maskKeys[3]));
- for( unsigned long i = position; i < position+length; i++)
- {
- recBuffer[i] = recBuffer[i] ^ maskKeys[(i-position)%4];
- }
- }
- DBG_MSG(("CWebSocketHandler::parseWebSocketData()length:%d; size:%d;"
- " position:%d\n", (int)length, size, position));
-
- for( unsigned long i = position; i < size, i < position+length; i++)
- {
- Buffer[parsedBufferPosition++] = recBuffer[i];
- }
-
- recBuffer += length+position;
- b_size -= length+position;
-
- }
- b_size = parsedBufferPosition;
- return b_size;
- }
-
- int CWebSocketHandler::prepareWebSocketDataHeader(unsigned char* Buffer,
- unsigned long long b_size)
- {
- unsigned int headerLength = 2;
- unsigned char payload;
-
- memset(Buffer, 0, headerLength);
- Buffer[0] = 0x81; // 129
-
- if (b_size <= 125)
- {
- payload = b_size;
- Buffer[1] = b_size; // string length
- } else if (b_size >= 126 && b_size <= 65535)
- {
- headerLength += 2;
- payload = 126;
- Buffer[1] = 0x7E; // 126
- } else
- {
- headerLength += 8;
- payload = 127;
- Buffer[1] = 0x7F; // 127
- }
-
-
- if (payload == 126)
- {
- Buffer[2] = (b_size>>8);
- Buffer[3] = b_size;
- } else if (payload == 127)
- {
- Buffer[9] = (b_size & 0xFF);
- Buffer[8] = ((b_size>>8) & 0xFF);
- Buffer[7] = ((b_size>>16) & 0xFF);
- Buffer[6] = ((b_size>>24) & 0xFF);
- Buffer[5] = ((b_size>>32) & 0xFF);
- Buffer[4] = ((b_size>>40) & 0xFF);
- Buffer[3] = ((b_size>>48) & 0xFF);
- Buffer[2] = ((b_size>>56) & 0xFF);
- }
- return headerLength;
-}
-
- void CWebSocketHandler::handshake_0405(std::string &key)
- {
- static const char *websocket_magic_guid_04 =
- "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
- char accept_buf[MAX_WEBSOCKET_04_KEY_LEN + 37];
- unsigned char hash[20] = {0xb3, 0x7a, 0x4f, 0x2c, 0xc0, 0x62, 0x4f, 0x16, 0x90, 0xf6, 0x46, 0x06, 0xcf, 0x38, 0x59, 0x45, 0xb2, 0xbe, 0xc4, 0xea};
- int accept_len;
-
- strcpy(accept_buf, key.c_str());
- strcpy(accept_buf + key.length(), websocket_magic_guid_04);
-
- SHA1((unsigned char *)accept_buf, key.length() + strlen(websocket_magic_guid_04), hash);
-
- accept_len = lws_b64_encode_string((char *)hash, 20, accept_buf, sizeof accept_buf);
- if (accept_len < 0)
- {
- fprintf(stderr, "Base64 encoded hash too long\n");
- }
- fprintf(stderr, "accept_buf: %s\n", accept_buf);
- key = accept_buf;
- }
-
- void CWebSocketHandler::sha1_step(struct sha1_ctxt *ctxt)
- {
- unsigned int a, b, c, d, e;
- size_t t, s;
- unsigned int tmp;
-
- struct sha1_ctxt tctxt;
-
- memcpy(&tctxt.m.b8[0], &ctxt->m.b8[0], 64);
- ctxt->m.b8[0] = tctxt.m.b8[3]; ctxt->m.b8[1] = tctxt.m.b8[2];
- ctxt->m.b8[2] = tctxt.m.b8[1]; ctxt->m.b8[3] = tctxt.m.b8[0];
- ctxt->m.b8[4] = tctxt.m.b8[7]; ctxt->m.b8[5] = tctxt.m.b8[6];
- ctxt->m.b8[6] = tctxt.m.b8[5]; ctxt->m.b8[7] = tctxt.m.b8[4];
- ctxt->m.b8[8] = tctxt.m.b8[11]; ctxt->m.b8[9] = tctxt.m.b8[10];
- ctxt->m.b8[10] = tctxt.m.b8[9]; ctxt->m.b8[11] = tctxt.m.b8[8];
- ctxt->m.b8[12] = tctxt.m.b8[15]; ctxt->m.b8[13] = tctxt.m.b8[14];
- ctxt->m.b8[14] = tctxt.m.b8[13]; ctxt->m.b8[15] = tctxt.m.b8[12];
- ctxt->m.b8[16] = tctxt.m.b8[19]; ctxt->m.b8[17] = tctxt.m.b8[18];
- ctxt->m.b8[18] = tctxt.m.b8[17]; ctxt->m.b8[19] = tctxt.m.b8[16];
- ctxt->m.b8[20] = tctxt.m.b8[23]; ctxt->m.b8[21] = tctxt.m.b8[22];
- ctxt->m.b8[22] = tctxt.m.b8[21]; ctxt->m.b8[23] = tctxt.m.b8[20];
- ctxt->m.b8[24] = tctxt.m.b8[27]; ctxt->m.b8[25] = tctxt.m.b8[26];
- ctxt->m.b8[26] = tctxt.m.b8[25]; ctxt->m.b8[27] = tctxt.m.b8[24];
- ctxt->m.b8[28] = tctxt.m.b8[31]; ctxt->m.b8[29] = tctxt.m.b8[30];
- ctxt->m.b8[30] = tctxt.m.b8[29]; ctxt->m.b8[31] = tctxt.m.b8[28];
- ctxt->m.b8[32] = tctxt.m.b8[35]; ctxt->m.b8[33] = tctxt.m.b8[34];
- ctxt->m.b8[34] = tctxt.m.b8[33]; ctxt->m.b8[35] = tctxt.m.b8[32];
- ctxt->m.b8[36] = tctxt.m.b8[39]; ctxt->m.b8[37] = tctxt.m.b8[38];
- ctxt->m.b8[38] = tctxt.m.b8[37]; ctxt->m.b8[39] = tctxt.m.b8[36];
- ctxt->m.b8[40] = tctxt.m.b8[43]; ctxt->m.b8[41] = tctxt.m.b8[42];
- ctxt->m.b8[42] = tctxt.m.b8[41]; ctxt->m.b8[43] = tctxt.m.b8[40];
- ctxt->m.b8[44] = tctxt.m.b8[47]; ctxt->m.b8[45] = tctxt.m.b8[46];
- ctxt->m.b8[46] = tctxt.m.b8[45]; ctxt->m.b8[47] = tctxt.m.b8[44];
- ctxt->m.b8[48] = tctxt.m.b8[51]; ctxt->m.b8[49] = tctxt.m.b8[50];
- ctxt->m.b8[50] = tctxt.m.b8[49]; ctxt->m.b8[51] = tctxt.m.b8[48];
- ctxt->m.b8[52] = tctxt.m.b8[55]; ctxt->m.b8[53] = tctxt.m.b8[54];
- ctxt->m.b8[54] = tctxt.m.b8[53]; ctxt->m.b8[55] = tctxt.m.b8[52];
- ctxt->m.b8[56] = tctxt.m.b8[59]; ctxt->m.b8[57] = tctxt.m.b8[58];
- ctxt->m.b8[58] = tctxt.m.b8[57]; ctxt->m.b8[59] = tctxt.m.b8[56];
- ctxt->m.b8[60] = tctxt.m.b8[63]; ctxt->m.b8[61] = tctxt.m.b8[62];
- ctxt->m.b8[62] = tctxt.m.b8[61]; ctxt->m.b8[63] = tctxt.m.b8[60];
-
- a = H(0); b = H(1); c = H(2); d = H(3); e = H(4);
-
- for (t = 0; t < 20; t++)
- {
- s = t & 0x0f;
- if (t >= 16)
- W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^
- W((s+2) & 0x0f) ^ W(s));
-
- tmp = S(5, a) + F0(b, c, d) + e + W(s) + K(t);
- e = d; d = c; c = S(30, b); b = a; a = tmp;
- }
- for (t = 20; t < 40; t++)
- {
- s = t & 0x0f;
- W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^
- W((s+2) & 0x0f) ^ W(s));
- tmp = S(5, a) + F1(b, c, d) + e + W(s) + K(t);
- e = d; d = c; c = S(30, b); b = a; a = tmp;
- }
- for (t = 40; t < 60; t++)
- {
- s = t & 0x0f;
- W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^
- W((s+2) & 0x0f) ^ W(s));
- tmp = S(5, a) + F2(b, c, d) + e + W(s) + K(t);
- e = d; d = c; c = S(30, b); b = a; a = tmp;
- }
- for (t = 60; t < 80; t++)
- {
- s = t & 0x0f;
- W(s) = S(1, W((s+13) & 0x0f) ^ W((s+8) & 0x0f) ^
- W((s+2) & 0x0f) ^ W(s));
- tmp = S(5, a) + F3(b, c, d) + e + W(s) + K(t);
- e = d; d = c; c = S(30, b); b = a; a = tmp;
- }
-
- H(0) = H(0) + a;
- H(1) = H(1) + b;
- H(2) = H(2) + c;
- H(3) = H(3) + d;
- H(4) = H(4) + e;
-
- memset(&ctxt->m.b8[0], 0, 64);
- }
-
- void CWebSocketHandler::sha1_init(struct sha1_ctxt *ctxt)
- {
- memset(ctxt, 0, sizeof(struct sha1_ctxt));
- H(0) = 0x67452301;
- H(1) = 0xefcdab89;
- H(2) = 0x98badcfe;
- H(3) = 0x10325476;
- H(4) = 0xc3d2e1f0;
- }
-
- void CWebSocketHandler::sha1_pad(struct sha1_ctxt *ctxt)
- {
- size_t padlen; /*pad length in bytes*/
- size_t padstart;
-
- PUTPAD(0x80);
-
- padstart = COUNT % 64;
- padlen = 64 - padstart;
- if (padlen < 8)
- {
- memset(&ctxt->m.b8[padstart], 0, padlen);
- COUNT += padlen;
- COUNT %= 64;
- sha1_step(ctxt);
- padstart = COUNT % 64; /* should be 0 */
- padlen = 64 - padstart; /* should be 64 */
- }
- memset(&ctxt->m.b8[padstart], 0, padlen - 8);
- COUNT += (padlen - 8);
- COUNT %= 64;
-
- PUTPAD(ctxt->c.b8[7]); PUTPAD(ctxt->c.b8[6]);
- PUTPAD(ctxt->c.b8[5]); PUTPAD(ctxt->c.b8[4]);
- PUTPAD(ctxt->c.b8[3]); PUTPAD(ctxt->c.b8[2]);
- PUTPAD(ctxt->c.b8[1]); PUTPAD(ctxt->c.b8[0]);
- }
-
- void CWebSocketHandler::sha1_loop(struct sha1_ctxt *ctxt, const unsigned char *input, size_t len)
- {
- size_t gaplen;
- size_t gapstart;
- size_t off;
- size_t copysiz;
-
- off = 0;
-
- while (off < len)
- {
- gapstart = COUNT % 64;
- gaplen = 64 - gapstart;
-
- copysiz = (gaplen < len - off) ? gaplen : len - off;
- memcpy(&ctxt->m.b8[gapstart], &input[off], copysiz);
- COUNT += copysiz;
- COUNT %= 64;
- ctxt->c.b64[0] += copysiz * 8;
- if (COUNT % 64 == 0)
- sha1_step(ctxt);
- off += copysiz;
- }
- }
-
- void CWebSocketHandler::sha1_result(struct sha1_ctxt *ctxt, unsigned char* digest0)
- {
- unsigned char *digest;
-
- digest = (unsigned char *)digest0;
- sha1_pad(ctxt);
- digest[0] = ctxt->h.b8[3]; digest[1] = ctxt->h.b8[2];
- digest[2] = ctxt->h.b8[1]; digest[3] = ctxt->h.b8[0];
- digest[4] = ctxt->h.b8[7]; digest[5] = ctxt->h.b8[6];
- digest[6] = ctxt->h.b8[5]; digest[7] = ctxt->h.b8[4];
- digest[8] = ctxt->h.b8[11]; digest[9] = ctxt->h.b8[10];
- digest[10] = ctxt->h.b8[9]; digest[11] = ctxt->h.b8[8];
- digest[12] = ctxt->h.b8[15]; digest[13] = ctxt->h.b8[14];
- digest[14] = ctxt->h.b8[13]; digest[15] = ctxt->h.b8[12];
- digest[16] = ctxt->h.b8[19]; digest[17] = ctxt->h.b8[18];
- digest[18] = ctxt->h.b8[17]; digest[19] = ctxt->h.b8[16];
- }
-
- /*
- * This should look and work like the libcrypto implementation
- */
-
- unsigned char * CWebSocketHandler::SHA1(const unsigned char *d, size_t n, unsigned char *md)
- {
- struct sha1_ctxt ctx;
-
- sha1_init(&ctx);
- sha1_loop(&ctx, d, n);
- sha1_result(&ctx, (unsigned char*)md);
-
- return md;
- }
-
- int CWebSocketHandler::lws_b64_encode_string(const char *in, int in_len, char *out, int out_size)
- {
- unsigned char triple[3];
- int i;
- int len;
- int line = 0;
- int done = 0;
-
- while (in_len)
- {
- len = 0;
- for (i = 0; i < 3; i++)
- {
- if (in_len)
- {
- triple[i] = *in++;
- len++;
- in_len--;
- } else
- triple[i] = 0;
- }
- if (len)
- {
-
- if (done + 4 >= out_size)
- return -1;
-
- *out++ = encode[triple[0] >> 2];
- *out++ = encode[((triple[0] & 0x03) << 4) |
- ((triple[1] & 0xf0) >> 4)];
- *out++ = (len > 1 ? encode[((triple[1] & 0x0f) << 2) |
- ((triple[2] & 0xc0) >> 6)] : '=');
- *out++ = (len > 2 ? encode[triple[2] & 0x3f] : '=');
-
- done += 4;
- line += 4;
- }
- if (line >= 72)
- {
-
- if (done + 2 >= out_size)
- return -1;
-
- *out++ = '\r';
- *out++ = '\n';
- done += 2;
- line = 0;
- }
- }
-
- if (done + 1 >= out_size)
- return -1;
-
- *out++ = '\0';
-
- return done;
- }
-
- /*
- * returns length of decoded string in out, or -1 if out was too small
- * according to out_size
- */
-
- int CWebSocketHandler::lws_b64_decode_string(const char *in, char *out, int out_size)
- {
- int len;
- int i;
- int done = 0;
- unsigned char v;
- unsigned char quad[4];
-
- while (*in)
- {
-
- len = 0;
- for (i = 0; i < 4 && *in; i++)
- {
-
- v = 0;
- while (*in && !v)
- {
-
- v = *in++;
- v = (v < 43 || v > 122) ? 0 : decode[v - 43];
- if (v)
- v = (v == '$') ? 0 : v - 61;
- if (*in)
- {
- len++;
- if (v)
- quad[i] = v - 1;
- } else
- quad[i] = 0;
- }
- }
- if (!len)
- continue;
-
- if (out_size < (done + len - 1))
- /* out buffer is too small */
- return -1;
-
- if (len >= 2)
- *out++ = quad[0] << 2 | quad[1] >> 4;
- if (len >= 3)
- *out++ = quad[1] << 4 | quad[2] >> 2;
- if (len >= 4)
- *out++ = ((quad[2] << 6) & 0xc0) | quad[3];
-
- done += len - 1;
- }
-
- if (done + 1 >= out_size)
- return -1;
-
- *out++ = '\0';
-
- return done;
- }
-
- int CWebSocketHandler::lws_b64_selftest(void)
- {
- char buf[64];
- int n;
- unsigned int test;
- static const char *plaintext[] = {"sanity check base 64"};
- static const char *coded[] = {"c2FuaXR5IGNoZWNrIGJhc2UgNjQ="};
-
- for (test = 0; test < sizeof plaintext / sizeof(plaintext[0]); test++)
- {
-
- buf[sizeof(buf) - 1] = '\0';
- n = lws_b64_encode_string(plaintext[test],
- strlen(plaintext[test]), buf, sizeof buf);
- if (n != (int)strlen(coded[test]) || strcmp(buf, coded[test]))
- {
- fprintf(stderr, "Failed lws_b64 encode selftest "
- "%d result '%s' %d\n", test, buf, n);
- return -1;
- }
-
- buf[sizeof(buf) - 1] = '\0';
- n = lws_b64_decode_string(coded[test], buf, sizeof buf);
- if (n != (int)strlen(plaintext[test]) ||
- strcmp(buf, plaintext[test]))
- {
- fprintf(stderr, "Failed lws_b64 decode selftest "
- "%d result '%s' %d\n", test, buf, n);
- return -1;
- }
- }
-
- return 0;
- }
-
- rawBytes CWebSocketHandler::handshake_hybi00(const std::string &key1, const std::string &key2, const rawBytes &key3)
- {
- if (key3.size() < 8)
- {
- DBG_MSG_ERROR(("key3's size is %d, less than 8 bytes\n", key3.size()));
- return rawBytes();
- }
-
- unsigned long number1 = extractNumber(key1);
- unsigned long number2 = extractNumber(key2);
- DBG_MSG(("number1 is %ld, number2 is %ld\n", number1, number2));
-
- if ((number1 == 0) || (number2 == 0))
- {
- return rawBytes();
- }
-
- // represent the numbers in big-endian format (network-byte order)
- unsigned long bigEndianNumber1 = htonl(number1);
- unsigned long bigEndianNumber2 = htonl(number2);
-
- // the temporary key consists of bytes of the first and second numbers
- // and the key3
- rawBytes key(8);
- memcpy(&key[0], &bigEndianNumber1, 4);
- memcpy(&key[4], &bigEndianNumber2, 4);
- key.insert(key.end(), key3.begin(), key3.begin() + 8);
-
- MD5 md5(std::string(key.begin(), key.end()));
- char digest[16];
- md5.getdigest(digest);
- rawBytes resultBytes(&digest[0], &digest[16]);
-
- return resultBytes;
- }
-
- unsigned long CWebSocketHandler::extractNumber(const std::string &key) const
- {
- // leave digits only
- // and count the number of spaces in the key
- std::string keyDigits;
- int spacesCountKey = 0;
- for (unsigned int index = 0; index < key.length(); ++index)
- {
- char keyChar = key[index];
- if (keyChar == ' ')
- {
- ++spacesCountKey;
- }
- else if (isdigit(keyChar))
- {
- keyDigits += keyChar;
- }
- }
-
- unsigned long result = 0;
-
- // convert string to number
- long long numberKey;
- if (std::stringstream(keyDigits) >> numberKey)
- {
- if (spacesCountKey != 0)
- {
- if (numberKey % spacesCountKey == 0)
- {
- // divide the number by the count
- result = numberKey / spacesCountKey;
- }
- else
- {
- // key is not an integral multiple of spaces count
- }
- }
- else
- {
- // the denominator is 0
- }
- }
- else
- {
- // couldn't convert
- }
-
- return result;
- }
-
-} /* namespace NsMessageBroker */
-
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_server.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_server.cpp
deleted file mode 100644
index 6c499aa91..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_server.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * \file mb_server.cpp
- * \brief MessageBroker server.
- * \author AKara
- */
-
-#include "mb_server.hpp"
-
-namespace NsMessageBroker
-{
-
- Server::Server(const std::string& address, uint16_t port)
- {
- m_sock = -1;
- m_address = address;
- m_port = port;
- }
-
- Server::~Server()
- {
- if(m_sock != -1)
- {
- Close();
- }
- }
-
- int Server::GetSocket() const
- {
- return m_sock;
- }
-
- std::string Server::GetAddress() const
- {
- return m_address;
- }
-
- uint16_t Server::GetPort() const
- {
- return m_port;
- }
-
- bool Server::Bind()
- {
- m_sock = networking::bind(m_protocol, m_address, m_port, NULL, NULL);
-
- return (m_sock != -1) ? true : false;
- }
-
- void Server::Close()
- {
- ::close(m_sock);
- m_sock = -1;
- }
-
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_tcpserver.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_tcpserver.cpp
deleted file mode 100644
index 506f35959..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/mb_tcpserver.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/**
- * \file mb_tcpserver.cpp
- * \brief MessageBroker TCP server.
- * \author AKara
- */
-
-#include <cstring>
-#include <cerrno>
-#include <iostream>
-#include <algorithm>
-#include <assert.h>
-
-#include "MBDebugHelper.h"
-
-#include "mb_tcpserver.hpp"
-#include "CMessageBroker.hpp"
-
-namespace NsMessageBroker
-{
-
- TcpServer::TcpServer(const std::string& address, uint16_t port, NsMessageBroker::CMessageBroker* pMessageBroker) :
- Server(address, port)
- {
- m_protocol = networking::TCP;
- mpMessageBroker = pMessageBroker;
- }
-
- TcpServer::~TcpServer()
- {
- if(m_sock != -1)
- {
- Close();
- }
- }
-
- ssize_t TcpServer::Send(int fd, const std::string& data)
- {
- DBG_MSG(("Send to %d: %s\n", fd, data.c_str()));
- std::string rep = data;
- if (isWebSocket(fd))
- {
- unsigned char buf[10] = {'\0'};
- ssize_t headerlen = mWebSocketHandler.prepareWebSocketDataHeader(
- (unsigned char*)buf, (unsigned long)rep.length());
- std::string header = std::string((char*)buf, headerlen);
- rep = header + rep;
- }
- int bytesToSend = rep.length();
- const char* ptrBuffer = rep.c_str();
- do
- {
- int retVal = send(fd, ptrBuffer, bytesToSend, 0);
- if(retVal == -1)
- {
- return -1;
- }
- bytesToSend -= retVal;
- ptrBuffer += retVal;
- } while (bytesToSend > 0);
- return rep.length();
- }
-
- bool TcpServer::Recv(int fd)
- {
- DBG_MSG(("TcpServer::Recv(int fd)\n"));
- ssize_t nb = -1;
-
- std::string* pReceivingBuffer = getBufferFor(fd);
- //char buf[RECV_BUFFER_LENGTH] = {'\0'};
- char* buf = (char*)calloc(RECV_BUFFER_LENGTH + pReceivingBuffer->size(),sizeof(char));
- DBG_MSG(("Left in pReceivingBuffer: %d : %s\n", pReceivingBuffer->size(),pReceivingBuffer->c_str()));
- memcpy(buf, pReceivingBuffer->c_str(), pReceivingBuffer->size());
- nb = recv(fd, buf+ pReceivingBuffer->size(), MAX_RECV_DATA , 0);
- DBG_MSG(("Recieved %d from %d\n", nb, fd));
- nb += pReceivingBuffer->size();
- DBG_MSG(("Recieved with buffer %d from %d\n", nb, fd));
-
- if (nb > 0)
- {
- unsigned int recieved_data = nb;
- char* data = buf;
- if (isWebSocket(fd))
- {
- const unsigned int data_length =
- mWebSocketHandler.parseWebSocketDataLength(buf, recieved_data);
-
- DBG_MSG(("Received %d actual data length %d\n",
- recieved_data, data_length));
- if (data_length > RECV_BUFFER_LENGTH) {
- char buf_tmp[MAX_RECV_BUFFER_LENGTH];
- memset(buf_tmp, 0 , MAX_RECV_BUFFER_LENGTH);
- memcpy(buf_tmp, buf, MAX_RECV_DATA);
- ssize_t recv_data = 0;
- while ((data_length > recieved_data) &&
- (0 < (recv_data =
- recv(fd, buf_tmp + recieved_data, MAX_RECV_DATA, 0)))) {
- recieved_data += recv_data;
- }
- nb = recieved_data;
- data = buf_tmp;
- }
-
- mWebSocketHandler.parseWebSocketData(data, (unsigned int&)nb);
- }
-
- *pReceivingBuffer = std::string(data,nb);
- free(buf);
- DBG_MSG(("pReceivingBuffer before onMessageReceived:%d : %s", pReceivingBuffer->size(), pReceivingBuffer->c_str()));
- // we need to check websocket clients here
- if (!checkWebSocketHandShake(fd, pReceivingBuffer))
- {//JSON MESSAGE received. Send data in CMessageBroker.
- if (mpMessageBroker)
- {
- mpMessageBroker->onMessageReceived(fd, *pReceivingBuffer);
- } else {
- return false;
- }
- } else
- { // client is a websocket
- std::string handshakeResponse =
- "HTTP/1.1 101 Switching Protocols\r\nUpgrade: WebSocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: ";
- ssize_t webSocketKeyPos = pReceivingBuffer->find("Sec-WebSocket-Key: ");
- if (-1 != webSocketKeyPos)
- {
- std::string wsKey = pReceivingBuffer->substr(webSocketKeyPos+19, 24);
- mWebSocketHandler.handshake_0405(wsKey);
- handshakeResponse += wsKey;
- handshakeResponse += "\r\n\r\n";
- pReceivingBuffer->clear();
- std::list<int>::iterator acceptedClientIt = find(m_AcceptedClients.begin(), m_AcceptedClients.end(), fd);
- if (m_AcceptedClients.end() != acceptedClientIt)
- {
- m_AcceptedClients.erase(acceptedClientIt);
- }
- Send(fd, handshakeResponse);
- m_WebSocketClients.push_back(fd);
- }
- }
-
- return true;
- }
- else
- {
- m_purge.push_back(fd);
- return false;
- }
- }
-
- bool TcpServer::checkWebSocketHandShake(int fd, std::string* pReceivingBuffer)
- {
- bool result = false;
- std::list<int>::iterator acceptedClientIt = find(m_AcceptedClients.begin(), m_AcceptedClients.end(), fd);
- if (m_AcceptedClients.end() != acceptedClientIt)
- {
- ssize_t httpheader =pReceivingBuffer->find("GET / HTTP/1.1");
- if (-1 != httpheader)
- { // here is a header
- DBG_MSG(("HTTP header detected!\n"));
- result = true;
- } else
- {// not winsocket client
- m_AcceptedClients.erase(acceptedClientIt);
- }
- }
- DBG_MSG(("TcpServer::checkWebSocket(): %d!\n", result));
- return result;
- }
-
- bool TcpServer::isWebSocket(int fd)
- {
- bool result = false;
- std::list<int>::iterator wsClientIt = find(m_WebSocketClients.begin(), m_WebSocketClients.end(), fd);
- if (m_WebSocketClients.end() != wsClientIt)
- {
- result = true;
- }
- return result;
- }
-
- std::string* TcpServer::getBufferFor(int fd)
- {
- std::string* res = 0;
- std::map <int, std::string*>::iterator it;
- it = m_receivingBuffers.find(fd);
- if (it != m_receivingBuffers.end())
- {
- res = (*it).second;
- } else
- {// create a new buffer...
- res = new std::string("");
- printf("getBufferFor method!\n");
- m_receivingBuffers.insert(std::map<int, std::string*>::value_type(fd, res));
- }
-
- return res;
- }
-
- void TcpServer::WaitMessage(uint32_t ms)
- {
- fd_set fdsr;
- struct timeval tv;
- int max_sock = m_sock;
-
- tv.tv_sec = ms / 1000;
- tv.tv_usec = (ms % 1000 ) / 1000;
-
- FD_ZERO(&fdsr);
-
-#ifdef _WIN32
- /* on Windows, a socket is not an int but a SOCKET (unsigned int) */
- FD_SET((SOCKET)m_sock, &fdsr);
-#else
- FD_SET(m_sock, &fdsr);
-#endif
-
- for(std::map<int, std::string*>::iterator it = m_receivingBuffers.begin() ; it != m_receivingBuffers.end() ; it++)
- {
-#ifdef _WIN32
- FD_SET((SOCKET)((*it).first), &fdsr);
-#else
- FD_SET(((*it).first), &fdsr);
-#endif
-
- if(((*it).first) > max_sock)
- {
- max_sock = ((*it).first);
- }
- }
-
- max_sock++;
-
- if(select(max_sock, &fdsr, NULL, NULL, ms ? &tv : NULL) > 0)
- {
- if(FD_ISSET(m_sock, &fdsr))
- {
- Accept();
- }
-
- for(std::map<int, std::string*>::iterator it = m_receivingBuffers.begin() ; it != m_receivingBuffers.end() ; it++)
- {
- if(FD_ISSET(((*it).first), &fdsr))
- {
- Recv((*it).first);
- }
- }
-
- /* remove disconnect socket descriptor */
- for(std::list<int>::iterator it = m_purge.begin() ; it != m_purge.end() ; it++)
- {
- std::map <int, std::string*>::iterator itr;
- itr = m_receivingBuffers.find((*it));
- if (itr != m_receivingBuffers.end())
- {// delete receiving buffer of disconnected client
- delete (*itr).second;
- m_receivingBuffers.erase(itr);
- }
- }
-
- /* purge disconnected list */
- m_purge.erase(m_purge.begin(), m_purge.end());
- }
- else
- {
- /* error */
- }
- }
-
- bool TcpServer::Listen() const
- {
- if(m_sock == -1)
- {
- return false;
- }
-
- if(listen(m_sock, 5) == -1)
- {
- return false;
- }
-
- return true;
- }
-
- bool TcpServer::Accept()
- {
-
- int client = -1;
- socklen_t addrlen = sizeof(struct sockaddr_storage);
-
- if(m_sock == -1)
- {
- return false;
- }
-
- client = accept(m_sock, 0, &addrlen);
-
- if(client == -1)
- {
- return false;
- }
-
- std::string* res = new std::string("");
- m_receivingBuffers.insert(std::map<int, std::string*>::value_type(client, res));
- m_AcceptedClients.push_back(client);
- return true;
- }
-
- void TcpServer::Close()
- {
- /* close all client sockets */
- for(std::map<int, std::string*>::iterator it = m_receivingBuffers.begin() ; it != m_receivingBuffers.end() ; it++)
- {
- ::close((*it).first);
- if ((*it).second)
- {
- delete (*it).second;
- }
- }
- m_receivingBuffers.clear();
- Server::Close();
- /* listen socket should be closed in Server destructor */
- }
-
- void* TcpServer::MethodForThread(void * arg)
- {
- arg = arg;
- while(1)
- {
- WaitMessage(1000);
- }
- return NULL;
- }
-
-} /* namespace NsMessageBroker */
diff --git a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/networking.cpp b/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/networking.cpp
deleted file mode 100644
index 190aea4a9..000000000
--- a/SDL_Core/src/thirdPartyLibs/MessageBroker/src/server/networking.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * JsonRpc-Cpp - JSON-RPC implementation.
- * Copyright (C) 2008-2011 Sebastien Vincent <sebastien.vincent@cppextrem.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * \file networking.cpp
- * \brief Networking utils.
- * \author Sebastien Vincent
- */
-
-#include <cstdio>
-#include <cstring>
-
-#include "networking.h"
-
-namespace networking
-{
-#ifdef _WIN32
- /**
- * \var wsaData
- * \brief MS Windows object to start
- * networking stuff.
- */
- static WSAData wsaData;
-#endif
-
- bool init()
- {
- bool ret = false;
-
-#ifdef _WIN32
- ret = (WSAStartup(MAKEWORD(2, 0), &wsaData) == 0);
-#else
- /* unix-like */
- ret = true;
-#endif
-
- return ret;
- }
-
- void cleanup()
- {
-#ifdef _WIN32
- WSACleanup();
-#endif
- }
-
- int connect(enum TransportProtocol protocol, const std::string& address, uint16_t port, struct sockaddr_storage* sockaddr, socklen_t* addrlen)
- {
- struct addrinfo hints;
- struct addrinfo* res = NULL;
- struct addrinfo* p = NULL;
- char service[8];
- int sock = -1;
-
- if(!port || address == "")
- {
- return -1;
- }
-
- snprintf(service, sizeof(service), "%u", port);
- service[sizeof(service)-1] = 0x00;
-
- memset(&hints, 0, sizeof(struct addrinfo));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = protocol == UDP ? SOCK_DGRAM : SOCK_STREAM;
- hints.ai_protocol = protocol;
- hints.ai_flags = 0;
-
- if(getaddrinfo(address.c_str(), service, &hints, &res) != 0)
- {
- return -1;
- }
-
- for(p = res ; p ; p = p->ai_next)
- {
- sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
-
- if(sock == -1)
- {
- continue;
- }
-
- if(protocol == TCP && ::connect(sock, (struct sockaddr*)p->ai_addr, p->ai_addrlen) == -1)
- {
- ::close(sock);
- sock = -1;
- continue;
- }
-
- if(sockaddr)
- {
- memcpy(sockaddr, p->ai_addr, p->ai_addrlen);
- }
-
- if(addrlen)
- {
- *addrlen = p->ai_addrlen;
- }
-
- /* ok so now we have a socket bound, break the loop */
- break;
- }
-
- freeaddrinfo(res);
- p = NULL;
-
- return sock;
- }
-
- int bind(enum TransportProtocol protocol, const std::string& address, uint16_t port, struct sockaddr_storage* sockaddr, socklen_t* addrlen)
- {
- struct addrinfo hints;
- struct addrinfo* res = NULL;
- struct addrinfo* p = NULL;
- char service[8];
- int sock = -1;
-
- if(!port || address == "")
- {
- return -1;
- }
-
- snprintf(service, sizeof(service), "%u", port);
- service[sizeof(service)-1] = 0x00;
-
- memset(&hints, 0, sizeof(struct addrinfo));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = protocol == UDP ? SOCK_DGRAM : SOCK_STREAM;
- hints.ai_protocol = protocol;
- hints.ai_flags = AI_PASSIVE;
-
- if(getaddrinfo(address.c_str(), service, &hints, &res) != 0)
- {
- return -1;
- }
-
- for(p = res ; p ; p = p->ai_next)
- {
- int on = 1;
- on=on;
-
- sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
-
- if(sock == -1)
- {
- continue;
- }
-
-#ifndef _WIN32
- setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int));
-
- /* accept IPv6 OR IPv4 on the same socket */
- on = 1;
- setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on));
-#else
- on = 0;
-#endif
-
- if(::bind(sock, p->ai_addr, p->ai_addrlen) == -1)
- {
- ::close(sock);
- sock = -1;
- continue;
- }
-
- if(sockaddr)
- {
- memcpy(sockaddr, p->ai_addr, p->ai_addrlen);
- }
-
- if(addrlen)
- {
- *addrlen = p->ai_addrlen;
- }
-
- /* ok so now we have a socket bound, break the loop */
- break;
- }
-
- freeaddrinfo(res);
- p = NULL;
-
- return sock;
- }
-
-} /* namespace networking */
-
diff --git a/SDL_Core/src/thirdPartyLibs/encryption/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/encryption/CMakeLists.txt
deleted file mode 100644
index f28fd862c..000000000
--- a/SDL_Core/src/thirdPartyLibs/encryption/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-include_directories (
- ./include
-)
-
-set (SOURCES
- ./src/Base64.cpp
-)
-
-add_library("encryption" ${SOURCES})
diff --git a/SDL_Core/src/thirdPartyLibs/encryption/include/encryption/Base64.h b/SDL_Core/src/thirdPartyLibs/encryption/include/encryption/Base64.h
deleted file mode 100644
index 645ca5b7d..000000000
--- a/SDL_Core/src/thirdPartyLibs/encryption/include/encryption/Base64.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef BASE64_H
-#define BASE64_H
-
-#include <string>
-
-std::string base64_encode(unsigned char const* , unsigned int len);
-std::string base64_decode(std::string const& s);
-
-#endif // BASE64_H
diff --git a/SDL_Core/src/thirdPartyLibs/encryption/src/Base64.cpp b/SDL_Core/src/thirdPartyLibs/encryption/src/Base64.cpp
deleted file mode 100644
index 0f7c936a2..000000000
--- a/SDL_Core/src/thirdPartyLibs/encryption/src/Base64.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- base64.cpp and base64.h
-
- Copyright (C) 2004-2008 René Nyffenegger
-
- This source code is provided 'as-is', without any express or implied
- warranty. In no event will the author be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this source code must not be misrepresented; you must not
- claim that you wrote the original source code. If you use this source code
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original source code.
-
- 3. This notice may not be removed or altered from any source distribution.
-
- René Nyffenegger rene.nyffenegger@adp-gmbh.ch
-
-*/
-
-#include "encryption/Base64.h"
-#include <iostream>
-
-static const std::string base64_chars =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789+/";
-
-
-static inline bool is_base64(unsigned char c) {
- return (isalnum(c) || (c == '+') || (c == '/'));
-}
-
-std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) {
- std::string ret;
- int i = 0;
- int j = 0;
- unsigned char char_array_3[3];
- unsigned char char_array_4[4];
-
- while (in_len--) {
- char_array_3[i++] = *(bytes_to_encode++);
- if (i == 3) {
- char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
- char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
- char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
- char_array_4[3] = char_array_3[2] & 0x3f;
-
- for(i = 0; (i <4) ; i++)
- ret += base64_chars[char_array_4[i]];
- i = 0;
- }
- }
-
- if (i)
- {
- for(j = i; j < 3; j++)
- char_array_3[j] = '\0';
-
- char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
- char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
- char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
- char_array_4[3] = char_array_3[2] & 0x3f;
-
- for (j = 0; (j < i + 1); j++)
- ret += base64_chars[char_array_4[j]];
-
- while((i++ < 3))
- ret += '=';
-
- }
-
- return ret;
-
-}
-
-std::string base64_decode(std::string const& encoded_string) {
- int in_len = encoded_string.size();
- int i = 0;
- int j = 0;
- int in_ = 0;
- unsigned char char_array_4[4], char_array_3[3];
- std::string ret;
-
- while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) {
- char_array_4[i++] = encoded_string[in_]; in_++;
- if (i ==4) {
- for (i = 0; i <4; i++)
- char_array_4[i] = base64_chars.find(char_array_4[i]);
-
- char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
- char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
- char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
-
- for (i = 0; (i < 3); i++)
- ret += char_array_3[i];
- i = 0;
- }
- }
-
- if (i) {
- for (j = i; j <4; j++)
- char_array_4[j] = 0;
-
- for (j = 0; j <4; j++)
- char_array_4[j] = base64_chars.find(char_array_4[j]);
-
- char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
- char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
- char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
-
- for (j = 0; (j < i - 1); j++) ret += char_array_3[j];
- }
-
- return ret;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CHANGES b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CHANGES
deleted file mode 100644
index 90f88a599..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CHANGES
+++ /dev/null
@@ -1,92 +0,0 @@
-Changes for 1.6.0:
-
-* Compilation is much faster and uses much less memory, especially
- when the constructor and destructor of a mock class are moved out of
- the class body.
-* New matchers: Pointwise(), Each().
-* New actions: ReturnPointee() and ReturnRefOfCopy().
-* CMake support.
-* Project files for Visual Studio 2010.
-* AllOf() and AnyOf() can handle up-to 10 arguments now.
-* Google Mock doctor understands Clang error messages now.
-* SetArgPointee<> now accepts string literals.
-* gmock_gen.py handles storage specifier macros and template return
- types now.
-* Compatibility fixes.
-* Bug fixes and implementation clean-ups.
-* Potentially incompatible changes: disables the harmful 'make install'
- command in autotools.
-
-Potentially breaking changes:
-
-* The description string for MATCHER*() changes from Python-style
- interpolation to an ordinary C++ string expression.
-* SetArgumentPointee is deprecated in favor of SetArgPointee.
-* Some non-essential project files for Visual Studio 2005 are removed.
-
-Changes for 1.5.0:
-
- * New feature: Google Mock can be safely used in multi-threaded tests
- on platforms having pthreads.
- * New feature: function for printing a value of arbitrary type.
- * New feature: function ExplainMatchResult() for easy definition of
- composite matchers.
- * The new matcher API lets user-defined matchers generate custom
- explanations more directly and efficiently.
- * Better failure messages all around.
- * NotNull() and IsNull() now work with smart pointers.
- * Field() and Property() now work when the matcher argument is a pointer
- passed by reference.
- * Regular expression matchers on all platforms.
- * Added GCC 4.0 support for Google Mock Doctor.
- * Added gmock_all_test.cc for compiling most Google Mock tests
- in a single file.
- * Significantly cleaned up compiler warnings.
- * Bug fixes, better test coverage, and implementation clean-ups.
-
- Potentially breaking changes:
-
- * Custom matchers defined using MatcherInterface or MakePolymorphicMatcher()
- need to be updated after upgrading to Google Mock 1.5.0; matchers defined
- using MATCHER or MATCHER_P* aren't affected.
- * Dropped support for 'make install'.
-
-Changes for 1.4.0 (we skipped 1.2.* and 1.3.* to match the version of
-Google Test):
-
- * Works in more environments: Symbian and minGW, Visual C++ 7.1.
- * Lighter weight: comes with our own implementation of TR1 tuple (no
- more dependency on Boost!).
- * New feature: --gmock_catch_leaked_mocks for detecting leaked mocks.
- * New feature: ACTION_TEMPLATE for defining templatized actions.
- * New feature: the .After() clause for specifying expectation order.
- * New feature: the .With() clause for for specifying inter-argument
- constraints.
- * New feature: actions ReturnArg<k>(), ReturnNew<T>(...), and
- DeleteArg<k>().
- * New feature: matchers Key(), Pair(), Args<...>(), AllArgs(), IsNull(),
- and Contains().
- * New feature: utility class MockFunction<F>, useful for checkpoints, etc.
- * New feature: functions Value(x, m) and SafeMatcherCast<T>(m).
- * New feature: copying a mock object is rejected at compile time.
- * New feature: a script for fusing all Google Mock and Google Test
- source files for easy deployment.
- * Improved the Google Mock doctor to diagnose more diseases.
- * Improved the Google Mock generator script.
- * Compatibility fixes for Mac OS X and gcc.
- * Bug fixes and implementation clean-ups.
-
-Changes for 1.1.0:
-
- * New feature: ability to use Google Mock with any testing framework.
- * New feature: macros for easily defining new matchers
- * New feature: macros for easily defining new actions.
- * New feature: more container matchers.
- * New feature: actions for accessing function arguments and throwing
- exceptions.
- * Improved the Google Mock doctor script for diagnosing compiler errors.
- * Bug fixes and implementation clean-ups.
-
-Changes for 1.0.0:
-
- * Initial Open Source release of Google Mock
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CMakeLists.txt
deleted file mode 100644
index 061c2fc5a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CMakeLists.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-########################################################################
-# CMake build script for Google Mock.
-#
-# To run the tests for Google Mock itself on Linux, use 'make test' or
-# ctest. You can select which tests to run using 'ctest -R regex'.
-# For more options, run 'ctest --help'.
-
-# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
-# make it prominent in the GUI.
-option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
-
-# Forces BUILD_SHARED_LIBS to OFF as Google Mock currently does not support
-# working in a DLL.
-# TODO(vladl@google.com): Implement building gMock as a DLL.
-set(BUILD_SHARED_LIBS OFF)
-
-option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
-
-# A directory to find Google Test sources.
-if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt")
- set(gtest_dir gtest)
-else()
- set(gtest_dir ../gtest)
-endif()
-
-# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
-include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL)
-
-if (COMMAND pre_project_set_up_hermetic_build)
- # Google Test also calls hermetic setup functions from add_subdirectory,
- # although its changes will not affect things at the current scope.
- pre_project_set_up_hermetic_build()
-endif()
-
-########################################################################
-#
-# Project-wide settings
-
-# Name of the project.
-#
-# CMake files in this project can refer to the root source directory
-# as ${gmock_SOURCE_DIR} and to the root binary directory as
-# ${gmock_BINARY_DIR}.
-# Language "C" is required for find_package(Threads).
-project(gmock CXX C)
-cmake_minimum_required(VERSION 2.6.2)
-
-if (COMMAND set_up_hermetic_build)
- set_up_hermetic_build()
-endif()
-
-# Instructs CMake to process Google Test's CMakeLists.txt and add its
-# targets to the current scope. We are placing Google Test's binary
-# directory in a subdirectory of our own as VC compilation may break
-# if they are the same (the default).
-add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest")
-
-# Although Google Test's CMakeLists.txt calls this function, the
-# changes there don't affect the current scope. Therefore we have to
-# call it again here.
-config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
-
-# Adds Google Mock's and Google Test's header directories to the search path.
-include_directories("${gmock_SOURCE_DIR}/include"
- "${gmock_SOURCE_DIR}"
- "${gtest_SOURCE_DIR}/include"
- # This directory is needed to build directly from Google
- # Test sources.
- "${gtest_SOURCE_DIR}")
-
-########################################################################
-#
-# Defines the gmock & gmock_main libraries. User tests should link
-# with one of them.
-
-# Google Mock libraries. We build them using more strict warnings than what
-# are used for other targets, to ensure that Google Mock can be compiled by
-# a user aggressive about warnings.
-cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
-target_link_libraries(gmock gtest)
-
-cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
-target_link_libraries(gmock_main gmock)
-
-########################################################################
-#
-# Google Mock's own tests.
-#
-# You can skip this section if you aren't interested in testing
-# Google Mock itself.
-#
-# The tests are not built by default. To build them, set the
-# gmock_build_tests option to ON. You can do it by running ccmake
-# or specifying the -Dgmock_build_tests=ON flag when running cmake.
-
-if (gmock_build_tests)
- # This must be set in the root directory for the tests to be run by
- # 'make test' or ctest.
- enable_testing()
-
- ############################################################
- # C++ tests built with standard compiler flags.
-
- cxx_test(gmock-actions_test gmock_main)
- cxx_test(gmock-cardinalities_test gmock_main)
- cxx_test(gmock-generated-actions_test gmock_main)
- cxx_test(gmock-generated-function-mockers_test gmock_main)
- cxx_test(gmock-generated-internal-utils_test gmock_main)
- cxx_test(gmock-generated-matchers_test gmock_main)
- cxx_test(gmock-internal-utils_test gmock_main)
- cxx_test(gmock-matchers_test gmock_main)
- cxx_test(gmock-more-actions_test gmock_main)
- cxx_test(gmock-nice-strict_test gmock_main)
- cxx_test(gmock-port_test gmock_main)
- cxx_test(gmock-spec-builders_test gmock_main)
- cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc)
- # cxx_test(gmock_stress_test gmock)
- cxx_test(gmock_test gmock_main)
-
- # gmock_all_test is commented to save time building and running tests.
- # Uncomment if necessary.
- # cxx_test(gmock_all_test gmock_main)
-
- ############################################################
- # C++ tests built with non-standard compiler flags.
-
- cxx_library(gmock_main_no_exception "${cxx_no_exception}"
- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
- cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
- cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}"
- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
-
- cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}"
- gmock_main_no_exception test/gmock-more-actions_test.cc)
-
- cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}"
- gmock_main_no_rtti test/gmock-spec-builders_test.cc)
-
- cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}"
- gmock_main_use_own_tuple test/gmock-spec-builders_test.cc)
-
- ############################################################
- # Python tests.
-
- cxx_executable(gmock_leak_test_ test gmock_main)
- py_test(gmock_leak_test)
-
- cxx_executable(gmock_output_test_ test gmock)
- py_test(gmock_output_test)
-endif()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CONTRIBUTORS b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CONTRIBUTORS
deleted file mode 100644
index 6e9ae362b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/CONTRIBUTORS
+++ /dev/null
@@ -1,40 +0,0 @@
-# This file contains a list of people who've made non-trivial
-# contribution to the Google C++ Mocking Framework project. People
-# who commit code to the project are encouraged to add their names
-# here. Please keep the list sorted by first names.
-
-Benoit Sigoure <tsuna@google.com>
-Bogdan Piloca <boo@google.com>
-Chandler Carruth <chandlerc@google.com>
-Dave MacLachlan <dmaclach@gmail.com>
-David Anderson <danderson@google.com>
-Dean Sturtevant
-Gene Volovich <gv@cite.com>
-Hal Burch <gmock@hburch.com>
-Jeffrey Yasskin <jyasskin@google.com>
-Jim Keller <jimkeller@google.com>
-Joe Walnes <joe@truemesh.com>
-Jon Wray <jwray@google.com>
-Keir Mierle <mierle@gmail.com>
-Keith Ray <keith.ray@gmail.com>
-Kostya Serebryany <kcc@google.com>
-Lev Makhlis
-Manuel Klimek <klimek@google.com>
-Mario Tanev <radix@google.com>
-Mark Paskin
-Markus Heule <markus.heule@gmail.com>
-Matthew Simmons <simmonmt@acm.org>
-Mike Bland <mbland@google.com>
-Neal Norwitz <nnorwitz@gmail.com>
-Nermin Ozkiranartli <nermin@google.com>
-Owen Carlsen <ocarlsen@google.com>
-Paneendra Ba <paneendra@google.com>
-Paul Menage <menage@google.com>
-Piotr Kaminski <piotrk@google.com>
-Russ Rufer <russ@pentad.com>
-Sverre Sundsdal <sundsdal@gmail.com>
-Takeshi Yoshino <tyoshino@google.com>
-Vadim Berman <vadimb@google.com>
-Vlad Losev <vladl@google.com>
-Wolfgang Klier <wklier@google.com>
-Zhanyong Wan <wan@google.com>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/COPYING b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/COPYING
deleted file mode 100644
index 1941a11f8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/COPYING
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright 2008, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.am b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.am
deleted file mode 100644
index adc21d7fb..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.am
+++ /dev/null
@@ -1,209 +0,0 @@
-# Automake file
-
-# Nonstandard package files for distribution.
-EXTRA_DIST =
-
-# We may need to build our internally packaged gtest. If so, it will be
-# included in the 'subdirs' variable.
-SUBDIRS = $(subdirs)
-
-# This is generated by the configure script, so clean it for distribution.
-DISTCLEANFILES = scripts/gmock-config
-
-# We define the global AM_CPPFLAGS as everything we compile includes from these
-# directories.
-AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
-
-# Modifies compiler and linker flags for pthreads compatibility.
-if HAVE_PTHREADS
- AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
- AM_LIBS = @PTHREAD_LIBS@
-endif
-
-# Build rules for libraries.
-lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
-
-lib_libgmock_la_SOURCES = src/gmock-all.cc
-
-pkginclude_HEADERS = \
- include/gmock/gmock-actions.h \
- include/gmock/gmock-cardinalities.h \
- include/gmock/gmock-generated-actions.h \
- include/gmock/gmock-generated-function-mockers.h \
- include/gmock/gmock-generated-matchers.h \
- include/gmock/gmock-generated-nice-strict.h \
- include/gmock/gmock-matchers.h \
- include/gmock/gmock-more-actions.h \
- include/gmock/gmock-spec-builders.h \
- include/gmock/gmock.h
-
-pkginclude_internaldir = $(pkgincludedir)/internal
-pkginclude_internal_HEADERS = \
- include/gmock/internal/gmock-generated-internal-utils.h \
- include/gmock/internal/gmock-internal-utils.h \
- include/gmock/internal/gmock-port.h
-
-lib_libgmock_main_la_SOURCES = src/gmock_main.cc
-lib_libgmock_main_la_LIBADD = lib/libgmock.la
-
-# Build rules for tests. Automake's naming for some of these variables isn't
-# terribly obvious, so this is a brief reference:
-#
-# TESTS -- Programs run automatically by "make check"
-# check_PROGRAMS -- Programs built by "make check" but not necessarily run
-
-TESTS=
-check_PROGRAMS=
-AM_LDFLAGS = $(GTEST_LDFLAGS)
-
-# This exercises all major components of Google Mock. It also
-# verifies that libgmock works.
-TESTS += test/gmock-spec-builders_test
-check_PROGRAMS += test/gmock-spec-builders_test
-test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc
-test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la
-
-# This tests using Google Mock in multiple translation units. It also
-# verifies that libgmock_main and libgmock work.
-TESTS += test/gmock_link_test
-check_PROGRAMS += test/gmock_link_test
-test_gmock_link_test_SOURCES = \
- test/gmock_link2_test.cc \
- test/gmock_link_test.cc \
- test/gmock_link_test.h
-test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la lib/libgmock.la
-
-# Tests that fused gmock files compile and work.
-TESTS += test/gmock_fused_test
-check_PROGRAMS += test/gmock_fused_test
-test_gmock_fused_test_SOURCES = \
- fused-src/gmock-gtest-all.cc \
- fused-src/gmock/gmock.h \
- fused-src/gmock_main.cc \
- fused-src/gtest/gtest.h \
- test/gmock_test.cc
-test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
-
-# Google Mock source files that we don't compile directly.
-GMOCK_SOURCE_INGLUDES = \
- src/gmock-cardinalities.cc \
- src/gmock-internal-utils.cc \
- src/gmock-matchers.cc \
- src/gmock-spec-builders.cc \
- src/gmock.cc
-
-EXTRA_DIST += $(GMOCK_SOURCE_INGLUDES)
-
-# C++ tests that we don't compile using autotools.
-EXTRA_DIST += \
- test/gmock-actions_test.cc \
- test/gmock-cardinalities_test.cc \
- test/gmock-generated-actions_test.cc \
- test/gmock-generated-function-mockers_test.cc \
- test/gmock-generated-internal-utils_test.cc \
- test/gmock-generated-matchers_test.cc \
- test/gmock-internal-utils_test.cc \
- test/gmock-matchers_test.cc \
- test/gmock-more-actions_test.cc \
- test/gmock-nice-strict_test.cc \
- test/gmock-port_test.cc \
- test/gmock_all_test.cc
-
-# Python tests, which we don't run using autotools.
-EXTRA_DIST += \
- test/gmock_leak_test.py \
- test/gmock_leak_test_.cc \
- test/gmock_output_test.py \
- test/gmock_output_test_.cc \
- test/gmock_output_test_golden.txt \
- test/gmock_test_utils.py
-
-# Nonstandard package files for distribution.
-EXTRA_DIST += \
- CHANGES \
- CONTRIBUTORS \
- make/Makefile
-
-# Pump scripts for generating Google Mock headers.
-# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
-EXTRA_DIST += \
- include/gmock/gmock-generated-actions.h.pump \
- include/gmock/gmock-generated-function-mockers.h.pump \
- include/gmock/gmock-generated-matchers.h.pump \
- include/gmock/gmock-generated-nice-strict.h.pump \
- include/gmock/internal/gmock-generated-internal-utils.h.pump
-
-# Script for fusing Google Mock and Google Test source files.
-EXTRA_DIST += scripts/fuse_gmock_files.py
-
-# The Google Mock Generator tool from the cppclean project.
-EXTRA_DIST += \
- scripts/generator/COPYING \
- scripts/generator/README \
- scripts/generator/README.cppclean \
- scripts/generator/cpp/__init__.py \
- scripts/generator/cpp/ast.py \
- scripts/generator/cpp/gmock_class.py \
- scripts/generator/cpp/keywords.py \
- scripts/generator/cpp/tokenize.py \
- scripts/generator/cpp/utils.py \
- scripts/generator/gmock_gen.py
-
-# CMake scripts.
-EXTRA_DIST += \
- CMakeLists.txt
-
-# Microsoft Visual Studio 2005 projects.
-EXTRA_DIST += \
- msvc/2005/gmock.sln \
- msvc/2005/gmock.vcproj \
- msvc/2005/gmock_config.vsprops \
- msvc/2005/gmock_main.vcproj \
- msvc/2005/gmock_test.vcproj
-
-# Microsoft Visual Studio 2010 projects.
-EXTRA_DIST += \
- msvc/2010/gmock.sln \
- msvc/2010/gmock.vcxproj \
- msvc/2010/gmock_config.props \
- msvc/2010/gmock_main.vcxproj \
- msvc/2010/gmock_test.vcxproj
-
-# gmock_test.cc does not really depend on files generated by the
-# fused-gmock-internal rule. However, gmock_test.o does, and it is
-# important to include test/gmock_test.cc as part of this rule in order to
-# prevent compiling gmock_test.o until all dependent files have been
-# generated.
-$(test_gmock_fused_test_SOURCES): fused-gmock-internal
-
-# TODO(vladl@google.com): Find a way to add Google Tests's sources here.
-fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
- $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
- $(lib_libgmock_main_la_SOURCES) \
- scripts/fuse_gmock_files.py
- mkdir -p "$(srcdir)/fused-src"
- chmod -R u+w "$(srcdir)/fused-src"
- rm -f "$(srcdir)/fused-src/gtest/gtest.h"
- rm -f "$(srcdir)/fused-src/gmock/gmock.h"
- rm -f "$(srcdir)/fused-src/gmock-gtest-all.cc"
- "$(srcdir)/scripts/fuse_gmock_files.py" "$(srcdir)/fused-src"
- cp -f "$(srcdir)/src/gmock_main.cc" "$(srcdir)/fused-src"
-
-maintainer-clean-local:
- rm -rf "$(srcdir)/fused-src"
-
-# Death tests may produce core dumps in the build directory. In case
-# this happens, clean them to keep distcleancheck happy.
-CLEANFILES = core
-
-# Disables 'make install' as installing a compiled version of Google
-# Mock can lead to undefined behavior due to violation of the
-# One-Definition Rule.
-
-install-exec-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
- false
-
-install-data-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
- false
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.in b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.in
deleted file mode 100644
index 2d69a871c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/Makefile.in
+++ /dev/null
@@ -1,1321 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Automake file
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-TESTS = test/gmock-spec-builders_test$(EXEEXT) \
- test/gmock_link_test$(EXEEXT) test/gmock_fused_test$(EXEEXT)
-check_PROGRAMS = test/gmock-spec-builders_test$(EXEEXT) \
- test/gmock_link_test$(EXEEXT) test/gmock_fused_test$(EXEEXT)
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \
- $(pkginclude_internal_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/build-aux/config.h.in \
- $(top_srcdir)/configure $(top_srcdir)/scripts/gmock-config.in \
- COPYING build-aux/config.guess build-aux/config.sub \
- build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
- build-aux/missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/gtest/m4/acx_pthread.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/build-aux/config.h
-CONFIG_CLEAN_FILES = scripts/gmock-config
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" \
- "$(DESTDIR)$(pkginclude_internaldir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-lib_libgmock_la_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_lib_libgmock_la_OBJECTS = src/gmock-all.lo
-lib_libgmock_la_OBJECTS = $(am_lib_libgmock_la_OBJECTS)
-lib_libgmock_main_la_DEPENDENCIES = lib/libgmock.la
-am_lib_libgmock_main_la_OBJECTS = src/gmock_main.lo
-lib_libgmock_main_la_OBJECTS = $(am_lib_libgmock_main_la_OBJECTS)
-am_test_gmock_spec_builders_test_OBJECTS = \
- test/gmock-spec-builders_test.$(OBJEXT)
-test_gmock_spec_builders_test_OBJECTS = \
- $(am_test_gmock_spec_builders_test_OBJECTS)
-am__DEPENDENCIES_1 =
-test_gmock_spec_builders_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- lib/libgmock.la
-am_test_gmock_fused_test_OBJECTS = \
- fused-src/test_gmock_fused_test-gmock-gtest-all.$(OBJEXT) \
- fused-src/test_gmock_fused_test-gmock_main.$(OBJEXT) \
- test/test_gmock_fused_test-gmock_test.$(OBJEXT)
-test_gmock_fused_test_OBJECTS = $(am_test_gmock_fused_test_OBJECTS)
-test_gmock_fused_test_LDADD = $(LDADD)
-am_test_gmock_link_test_OBJECTS = test/gmock_link2_test.$(OBJEXT) \
- test/gmock_link_test.$(OBJEXT)
-test_gmock_link_test_OBJECTS = $(am_test_gmock_link_test_OBJECTS)
-test_gmock_link_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- lib/libgmock_main.la lib/libgmock.la
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/build-aux
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(lib_libgmock_la_SOURCES) $(lib_libgmock_main_la_SOURCES) \
- $(test_gmock_spec_builders_test_SOURCES) \
- $(test_gmock_fused_test_SOURCES) \
- $(test_gmock_link_test_SOURCES)
-DIST_SOURCES = $(lib_libgmock_la_SOURCES) \
- $(lib_libgmock_main_la_SOURCES) \
- $(test_gmock_spec_builders_test_SOURCES) \
- $(test_gmock_fused_test_SOURCES) \
- $(test_gmock_link_test_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
-HEADERS = $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
-am__relativize = \
- dir0=`pwd`; \
- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
- sed_rest='s,^[^/]*/*,,'; \
- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
- sed_butlast='s,/*[^/]*$$,,'; \
- while test -n "$$dir1"; do \
- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
- if test "$$first" != "."; then \
- if test "$$first" = ".."; then \
- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
- else \
- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
- if test "$$first2" = "$$first"; then \
- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
- else \
- dir2="../$$dir2"; \
- fi; \
- dir0="$$dir0"/"$$first"; \
- fi; \
- fi; \
- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
- done; \
- reldir="$$dir2"
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
-GTEST_VERSION = @GTEST_VERSION@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-acx_pthread_config = @acx_pthread_config@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# Nonstandard package files for distribution.
-
-# C++ tests that we don't compile using autotools.
-
-# Python tests, which we don't run using autotools.
-
-# Nonstandard package files for distribution.
-
-# Pump scripts for generating Google Mock headers.
-# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
-
-# Script for fusing Google Mock and Google Test source files.
-
-# The Google Mock Generator tool from the cppclean project.
-
-# CMake scripts.
-
-# Microsoft Visual Studio 2005 projects.
-
-# Microsoft Visual Studio 2010 projects.
-EXTRA_DIST = $(GMOCK_SOURCE_INGLUDES) test/gmock-actions_test.cc \
- test/gmock-cardinalities_test.cc \
- test/gmock-generated-actions_test.cc \
- test/gmock-generated-function-mockers_test.cc \
- test/gmock-generated-internal-utils_test.cc \
- test/gmock-generated-matchers_test.cc \
- test/gmock-internal-utils_test.cc test/gmock-matchers_test.cc \
- test/gmock-more-actions_test.cc test/gmock-nice-strict_test.cc \
- test/gmock-port_test.cc test/gmock_all_test.cc \
- test/gmock_leak_test.py test/gmock_leak_test_.cc \
- test/gmock_output_test.py test/gmock_output_test_.cc \
- test/gmock_output_test_golden.txt test/gmock_test_utils.py \
- CHANGES CONTRIBUTORS make/Makefile \
- include/gmock/gmock-generated-actions.h.pump \
- include/gmock/gmock-generated-function-mockers.h.pump \
- include/gmock/gmock-generated-matchers.h.pump \
- include/gmock/gmock-generated-nice-strict.h.pump \
- include/gmock/internal/gmock-generated-internal-utils.h.pump \
- scripts/fuse_gmock_files.py scripts/generator/COPYING \
- scripts/generator/README scripts/generator/README.cppclean \
- scripts/generator/cpp/__init__.py scripts/generator/cpp/ast.py \
- scripts/generator/cpp/gmock_class.py \
- scripts/generator/cpp/keywords.py \
- scripts/generator/cpp/tokenize.py \
- scripts/generator/cpp/utils.py scripts/generator/gmock_gen.py \
- CMakeLists.txt msvc/2005/gmock.sln msvc/2005/gmock.vcproj \
- msvc/2005/gmock_config.vsprops msvc/2005/gmock_main.vcproj \
- msvc/2005/gmock_test.vcproj msvc/2010/gmock.sln \
- msvc/2010/gmock.vcxproj msvc/2010/gmock_config.props \
- msvc/2010/gmock_main.vcxproj msvc/2010/gmock_test.vcxproj
-
-# We may need to build our internally packaged gtest. If so, it will be
-# included in the 'subdirs' variable.
-SUBDIRS = $(subdirs)
-
-# This is generated by the configure script, so clean it for distribution.
-DISTCLEANFILES = scripts/gmock-config
-
-# We define the global AM_CPPFLAGS as everything we compile includes from these
-# directories.
-AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
-
-# Modifies compiler and linker flags for pthreads compatibility.
-@HAVE_PTHREADS_TRUE@AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
-@HAVE_PTHREADS_TRUE@AM_LIBS = @PTHREAD_LIBS@
-
-# Build rules for libraries.
-lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
-lib_libgmock_la_SOURCES = src/gmock-all.cc
-pkginclude_HEADERS = \
- include/gmock/gmock-actions.h \
- include/gmock/gmock-cardinalities.h \
- include/gmock/gmock-generated-actions.h \
- include/gmock/gmock-generated-function-mockers.h \
- include/gmock/gmock-generated-matchers.h \
- include/gmock/gmock-generated-nice-strict.h \
- include/gmock/gmock-matchers.h \
- include/gmock/gmock-more-actions.h \
- include/gmock/gmock-spec-builders.h \
- include/gmock/gmock.h
-
-pkginclude_internaldir = $(pkgincludedir)/internal
-pkginclude_internal_HEADERS = \
- include/gmock/internal/gmock-generated-internal-utils.h \
- include/gmock/internal/gmock-internal-utils.h \
- include/gmock/internal/gmock-port.h
-
-lib_libgmock_main_la_SOURCES = src/gmock_main.cc
-lib_libgmock_main_la_LIBADD = lib/libgmock.la
-AM_LDFLAGS = $(GTEST_LDFLAGS)
-test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc
-test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la
-test_gmock_link_test_SOURCES = \
- test/gmock_link2_test.cc \
- test/gmock_link_test.cc \
- test/gmock_link_test.h
-
-test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la lib/libgmock.la
-test_gmock_fused_test_SOURCES = \
- fused-src/gmock-gtest-all.cc \
- fused-src/gmock/gmock.h \
- fused-src/gmock_main.cc \
- fused-src/gtest/gtest.h \
- test/gmock_test.cc
-
-test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
-
-# Google Mock source files that we don't compile directly.
-GMOCK_SOURCE_INGLUDES = \
- src/gmock-cardinalities.cc \
- src/gmock-internal-utils.cc \
- src/gmock-matchers.cc \
- src/gmock-spec-builders.cc \
- src/gmock.cc
-
-
-# Death tests may produce core dumps in the build directory. In case
-# this happens, clean them to keep distcleancheck happy.
-CLEANFILES = core
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .cc .lo .o .obj
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-build-aux/config.h: build-aux/stamp-h1
- @if test ! -f $@; then \
- rm -f build-aux/stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) build-aux/stamp-h1; \
- else :; fi
-
-build-aux/stamp-h1: $(top_srcdir)/build-aux/config.h.in $(top_builddir)/config.status
- @rm -f build-aux/stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status build-aux/config.h
-$(top_srcdir)/build-aux/config.h.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f build-aux/stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f build-aux/config.h build-aux/stamp-h1
-scripts/gmock-config: $(top_builddir)/config.status $(top_srcdir)/scripts/gmock-config.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- }
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-src/$(am__dirstamp):
- @$(MKDIR_P) src
- @: > src/$(am__dirstamp)
-src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) src/$(DEPDIR)
- @: > src/$(DEPDIR)/$(am__dirstamp)
-src/gmock-all.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
-lib/$(am__dirstamp):
- @$(MKDIR_P) lib
- @: > lib/$(am__dirstamp)
-lib/libgmock.la: $(lib_libgmock_la_OBJECTS) $(lib_libgmock_la_DEPENDENCIES) lib/$(am__dirstamp)
- $(CXXLINK) -rpath $(libdir) $(lib_libgmock_la_OBJECTS) $(lib_libgmock_la_LIBADD) $(LIBS)
-src/gmock_main.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
-lib/libgmock_main.la: $(lib_libgmock_main_la_OBJECTS) $(lib_libgmock_main_la_DEPENDENCIES) lib/$(am__dirstamp)
- $(CXXLINK) -rpath $(libdir) $(lib_libgmock_main_la_OBJECTS) $(lib_libgmock_main_la_LIBADD) $(LIBS)
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-test/$(am__dirstamp):
- @$(MKDIR_P) test
- @: > test/$(am__dirstamp)
-test/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) test/$(DEPDIR)
- @: > test/$(DEPDIR)/$(am__dirstamp)
-test/gmock-spec-builders_test.$(OBJEXT): test/$(am__dirstamp) \
- test/$(DEPDIR)/$(am__dirstamp)
-test/gmock-spec-builders_test$(EXEEXT): $(test_gmock_spec_builders_test_OBJECTS) $(test_gmock_spec_builders_test_DEPENDENCIES) test/$(am__dirstamp)
- @rm -f test/gmock-spec-builders_test$(EXEEXT)
- $(CXXLINK) $(test_gmock_spec_builders_test_OBJECTS) $(test_gmock_spec_builders_test_LDADD) $(LIBS)
-fused-src/$(am__dirstamp):
- @$(MKDIR_P) fused-src
- @: > fused-src/$(am__dirstamp)
-fused-src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) fused-src/$(DEPDIR)
- @: > fused-src/$(DEPDIR)/$(am__dirstamp)
-fused-src/test_gmock_fused_test-gmock-gtest-all.$(OBJEXT): \
- fused-src/$(am__dirstamp) fused-src/$(DEPDIR)/$(am__dirstamp)
-fused-src/test_gmock_fused_test-gmock_main.$(OBJEXT): \
- fused-src/$(am__dirstamp) fused-src/$(DEPDIR)/$(am__dirstamp)
-test/test_gmock_fused_test-gmock_test.$(OBJEXT): test/$(am__dirstamp) \
- test/$(DEPDIR)/$(am__dirstamp)
-test/gmock_fused_test$(EXEEXT): $(test_gmock_fused_test_OBJECTS) $(test_gmock_fused_test_DEPENDENCIES) test/$(am__dirstamp)
- @rm -f test/gmock_fused_test$(EXEEXT)
- $(CXXLINK) $(test_gmock_fused_test_OBJECTS) $(test_gmock_fused_test_LDADD) $(LIBS)
-test/gmock_link2_test.$(OBJEXT): test/$(am__dirstamp) \
- test/$(DEPDIR)/$(am__dirstamp)
-test/gmock_link_test.$(OBJEXT): test/$(am__dirstamp) \
- test/$(DEPDIR)/$(am__dirstamp)
-test/gmock_link_test$(EXEEXT): $(test_gmock_link_test_OBJECTS) $(test_gmock_link_test_DEPENDENCIES) test/$(am__dirstamp)
- @rm -f test/gmock_link_test$(EXEEXT)
- $(CXXLINK) $(test_gmock_link_test_OBJECTS) $(test_gmock_link_test_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
- -rm -f fused-src/test_gmock_fused_test-gmock-gtest-all.$(OBJEXT)
- -rm -f fused-src/test_gmock_fused_test-gmock_main.$(OBJEXT)
- -rm -f src/gmock-all.$(OBJEXT)
- -rm -f src/gmock-all.lo
- -rm -f src/gmock_main.$(OBJEXT)
- -rm -f src/gmock_main.lo
- -rm -f test/gmock-spec-builders_test.$(OBJEXT)
- -rm -f test/gmock_link2_test.$(OBJEXT)
- -rm -f test/gmock_link_test.$(OBJEXT)
- -rm -f test/test_gmock_fused_test-gmock_test.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmock-all.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmock_main.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock-spec-builders_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_link2_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_link_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Po@am__quote@
-
-.cc.o:
-@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cc.obj:
-@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cc.lo:
-@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-fused-src/test_gmock_fused_test-gmock-gtest-all.o: fused-src/gmock-gtest-all.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/test_gmock_fused_test-gmock-gtest-all.o -MD -MP -MF fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Tpo -c -o fused-src/test_gmock_fused_test-gmock-gtest-all.o `test -f 'fused-src/gmock-gtest-all.cc' || echo '$(srcdir)/'`fused-src/gmock-gtest-all.cc
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Tpo fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gmock-gtest-all.cc' object='fused-src/test_gmock_fused_test-gmock-gtest-all.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/test_gmock_fused_test-gmock-gtest-all.o `test -f 'fused-src/gmock-gtest-all.cc' || echo '$(srcdir)/'`fused-src/gmock-gtest-all.cc
-
-fused-src/test_gmock_fused_test-gmock-gtest-all.obj: fused-src/gmock-gtest-all.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/test_gmock_fused_test-gmock-gtest-all.obj -MD -MP -MF fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Tpo -c -o fused-src/test_gmock_fused_test-gmock-gtest-all.obj `if test -f 'fused-src/gmock-gtest-all.cc'; then $(CYGPATH_W) 'fused-src/gmock-gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gmock-gtest-all.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Tpo fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gmock-gtest-all.cc' object='fused-src/test_gmock_fused_test-gmock-gtest-all.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/test_gmock_fused_test-gmock-gtest-all.obj `if test -f 'fused-src/gmock-gtest-all.cc'; then $(CYGPATH_W) 'fused-src/gmock-gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gmock-gtest-all.cc'; fi`
-
-fused-src/test_gmock_fused_test-gmock_main.o: fused-src/gmock_main.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/test_gmock_fused_test-gmock_main.o -MD -MP -MF fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Tpo -c -o fused-src/test_gmock_fused_test-gmock_main.o `test -f 'fused-src/gmock_main.cc' || echo '$(srcdir)/'`fused-src/gmock_main.cc
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Tpo fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gmock_main.cc' object='fused-src/test_gmock_fused_test-gmock_main.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/test_gmock_fused_test-gmock_main.o `test -f 'fused-src/gmock_main.cc' || echo '$(srcdir)/'`fused-src/gmock_main.cc
-
-fused-src/test_gmock_fused_test-gmock_main.obj: fused-src/gmock_main.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/test_gmock_fused_test-gmock_main.obj -MD -MP -MF fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Tpo -c -o fused-src/test_gmock_fused_test-gmock_main.obj `if test -f 'fused-src/gmock_main.cc'; then $(CYGPATH_W) 'fused-src/gmock_main.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gmock_main.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Tpo fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gmock_main.cc' object='fused-src/test_gmock_fused_test-gmock_main.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/test_gmock_fused_test-gmock_main.obj `if test -f 'fused-src/gmock_main.cc'; then $(CYGPATH_W) 'fused-src/gmock_main.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gmock_main.cc'; fi`
-
-test/test_gmock_fused_test-gmock_test.o: test/gmock_test.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/test_gmock_fused_test-gmock_test.o -MD -MP -MF test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo -c -o test/test_gmock_fused_test-gmock_test.o `test -f 'test/gmock_test.cc' || echo '$(srcdir)/'`test/gmock_test.cc
-@am__fastdepCXX_TRUE@ $(am__mv) test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test/gmock_test.cc' object='test/test_gmock_fused_test-gmock_test.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/test_gmock_fused_test-gmock_test.o `test -f 'test/gmock_test.cc' || echo '$(srcdir)/'`test/gmock_test.cc
-
-test/test_gmock_fused_test-gmock_test.obj: test/gmock_test.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/test_gmock_fused_test-gmock_test.obj -MD -MP -MF test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo -c -o test/test_gmock_fused_test-gmock_test.obj `if test -f 'test/gmock_test.cc'; then $(CYGPATH_W) 'test/gmock_test.cc'; else $(CYGPATH_W) '$(srcdir)/test/gmock_test.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test/gmock_test.cc' object='test/test_gmock_fused_test-gmock_test.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/test_gmock_fused_test-gmock_test.obj `if test -f 'test/gmock_test.cc'; then $(CYGPATH_W) 'test/gmock_test.cc'; else $(CYGPATH_W) '$(srcdir)/test/gmock_test.cc'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
- -rm -rf lib/.libs lib/_libs
- -rm -rf src/.libs src/_libs
- -rm -rf test/.libs test/_libs
-
-distclean-libtool:
- -rm -f libtool config.lt
-install-pkgincludeHEADERS: $(pkginclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
- done
-
-uninstall-pkgincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
-install-pkginclude_internalHEADERS: $(pkginclude_internal_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkginclude_internaldir)" || $(MKDIR_P) "$(DESTDIR)$(pkginclude_internaldir)"
- @list='$(pkginclude_internal_HEADERS)'; test -n "$(pkginclude_internaldir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkginclude_internaldir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkginclude_internaldir)" || exit $$?; \
- done
-
-uninstall-pkginclude_internalHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_internal_HEADERS)'; test -n "$(pkginclude_internaldir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkginclude_internaldir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkginclude_internaldir)" && rm -f $$files
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
- else \
- echo "$$red$$dashes"; \
- fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- test -d "$(distdir)" || mkdir "$(distdir)"
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
- $(am__relativize); \
- new_distdir=$$reldir; \
- dir1=$$subdir; dir2="$(top_distdir)"; \
- $(am__relativize); \
- new_top_distdir=$$reldir; \
- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
- ($(am__cd) $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$new_top_distdir" \
- distdir="$$new_distdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- am__skip_mode_fix=: \
- distdir) \
- || exit 1; \
- fi; \
- done
- -test -n "$(am__skip_mode_fix)" \
- || find "$(distdir)" -type d ! -perm -755 \
- -exec chmod u+rwx,go+rx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r "$(distdir)"
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
-
-dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
- *.tar.xz*) \
- xz -dc $(distdir).tar.xz | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- test -d $(distdir)/_build || exit 0; \
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
- && cd "$$am__cwd" \
- || exit 1
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
- @$(am__cd) '$(distuninstallcheck_dir)' \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-recursive
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkginclude_internaldir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -rm -f fused-src/$(DEPDIR)/$(am__dirstamp)
- -rm -f fused-src/$(am__dirstamp)
- -rm -f lib/$(am__dirstamp)
- -rm -f src/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/$(am__dirstamp)
- -rm -f test/$(DEPDIR)/$(am__dirstamp)
- -rm -f test/$(am__dirstamp)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
- clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf fused-src/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-data-local install-pkgincludeHEADERS \
- install-pkginclude_internalHEADERS
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am: install-exec-local install-libLTLIBRARIES
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf fused-src/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic \
- maintainer-clean-local
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \
- uninstall-pkginclude_internalHEADERS
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
- ctags-recursive install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
- clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-data install-data-am \
- install-data-local install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-local install-html \
- install-html-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-pdf install-pdf-am \
- install-pkgincludeHEADERS install-pkginclude_internalHEADERS \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-local mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \
- uninstall-pkginclude_internalHEADERS
-
-
-# gmock_test.cc does not really depend on files generated by the
-# fused-gmock-internal rule. However, gmock_test.o does, and it is
-# important to include test/gmock_test.cc as part of this rule in order to
-# prevent compiling gmock_test.o until all dependent files have been
-# generated.
-$(test_gmock_fused_test_SOURCES): fused-gmock-internal
-
-# TODO(vladl@google.com): Find a way to add Google Tests's sources here.
-fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
- $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
- $(lib_libgmock_main_la_SOURCES) \
- scripts/fuse_gmock_files.py
- mkdir -p "$(srcdir)/fused-src"
- chmod -R u+w "$(srcdir)/fused-src"
- rm -f "$(srcdir)/fused-src/gtest/gtest.h"
- rm -f "$(srcdir)/fused-src/gmock/gmock.h"
- rm -f "$(srcdir)/fused-src/gmock-gtest-all.cc"
- "$(srcdir)/scripts/fuse_gmock_files.py" "$(srcdir)/fused-src"
- cp -f "$(srcdir)/src/gmock_main.cc" "$(srcdir)/fused-src"
-
-maintainer-clean-local:
- rm -rf "$(srcdir)/fused-src"
-
-# Disables 'make install' as installing a compiled version of Google
-# Mock can lead to undefined behavior due to violation of the
-# One-Definition Rule.
-
-install-exec-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
- false
-
-install-data-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
- false
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/README b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/README
deleted file mode 100644
index aa3283d7e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/README
+++ /dev/null
@@ -1,354 +0,0 @@
-Google C++ Mocking Framework
-============================
-
-http://code.google.com/p/googlemock/
-
-Overview
---------
-
-Google's framework for writing and using C++ mock classes on a variety
-of platforms (Linux, Mac OS X, Windows, Windows CE, Symbian, etc).
-Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
-specifics in mind, it can help you derive better designs of your
-system and write better tests.
-
-Google Mock:
-
-- provides a declarative syntax for defining mocks,
-- can easily define partial (hybrid) mocks, which are a cross of real
- and mock objects,
-- handles functions of arbitrary types and overloaded functions,
-- comes with a rich set of matchers for validating function arguments,
-- uses an intuitive syntax for controlling the behavior of a mock,
-- does automatic verification of expectations (no record-and-replay
- needed),
-- allows arbitrary (partial) ordering constraints on
- function calls to be expressed,
-- lets a user extend it by defining new matchers and actions.
-- does not use exceptions, and
-- is easy to learn and use.
-
-Please see the project page above for more information as well as the
-mailing list for questions, discussions, and development. There is
-also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
-join us!
-
-Please note that code under scripts/generator/ is from the cppclean
-project (http://code.google.com/p/cppclean/) and under the Apache
-License, which is different from Google Mock's license.
-
-Requirements for End Users
---------------------------
-
-Google Mock is implemented on top of the Google Test C++ testing
-framework (http://code.google.com/p/googletest/), and includes the
-latter as part of the SVN repositary and distribution package. You
-must use the bundled version of Google Test when using Google Mock, or
-you may get compiler/linker errors.
-
-You can also easily configure Google Mock to work with another testing
-framework of your choice; although it will still need Google Test as
-an internal dependency. Please read
-http://code.google.com/p/googlemock/wiki/ForDummies#Using_Google_Mock_with_Any_Testing_Framework
-for how to do it.
-
-Google Mock depends on advanced C++ features and thus requires a more
-modern compiler. The following are needed to use Google Mock:
-
-### Linux Requirements ###
-
-These are the base requirements to build and use Google Mock from a source
-package (as described below):
-
- * GNU-compatible Make or "gmake"
- * POSIX-standard shell
- * POSIX(-2) Regular Expressions (regex.h)
- * C++98-standard-compliant compiler (e.g. GCC 3.4 or newer)
-
-### Windows Requirements ###
-
- * Microsoft Visual C++ 8.0 SP1 or newer
-
-### Mac OS X Requirements ###
-
- * Mac OS X 10.4 Tiger or newer
- * Developer Tools Installed
-
-Requirements for Contributors
------------------------------
-
-We welcome patches. If you plan to contribute a patch, you need to
-build Google Mock and its own tests from an SVN checkout (described
-below), which has further requirements:
-
- * Automake version 1.9 or newer
- * Autoconf version 2.59 or newer
- * Libtool / Libtoolize
- * Python version 2.3 or newer (for running some of the tests and
- re-generating certain source files from templates)
-
-Getting the Source
-------------------
-
-There are two primary ways of getting Google Mock's source code: you
-can download a stable source release in your preferred archive format,
-or directly check out the source from our Subversion (SVN) repositary.
-The SVN checkout requires a few extra steps and some extra software
-packages on your system, but lets you track development and make
-patches much more easily, so we highly encourage it.
-
-### Source Package ###
-
-Google Mock is released in versioned source packages which can be
-downloaded from the download page [1]. Several different archive
-formats are provided, but the only difference is the tools needed to
-extract their contents, and the size of the resulting file. Download
-whichever you are most comfortable with.
-
- [1] http://code.google.com/p/googlemock/downloads/list
-
-Once downloaded expand the archive using whichever tools you prefer
-for that type. This will always result in a new directory with the
-name "gmock-X.Y.Z" which contains all of the source code. Here are
-some examples on Linux:
-
- tar -xvzf gmock-X.Y.Z.tar.gz
- tar -xvjf gmock-X.Y.Z.tar.bz2
- unzip gmock-X.Y.Z.zip
-
-### SVN Checkout ###
-
-To check out the main branch (also known as the "trunk") of Google
-Mock, run the following Subversion command:
-
- svn checkout http://googlemock.googlecode.com/svn/trunk/ gmock-svn
-
-If you are using a *nix system and plan to use the GNU Autotools build
-system to build Google Mock (described below), you'll need to
-configure it now. Otherwise you are done with getting the source
-files.
-
-To prepare the Autotools build system, enter the target directory of
-the checkout command you used ('gmock-svn') and proceed with the
-following command:
-
- autoreconf -fvi
-
-Once you have completed this step, you are ready to build the library.
-Note that you should only need to complete this step once. The
-subsequent 'make' invocations will automatically re-generate the bits
-of the build system that need to be changed.
-
-If your system uses older versions of the autotools, the above command
-will fail. You may need to explicitly specify a version to use. For
-instance, if you have both GNU Automake 1.4 and 1.9 installed and
-'automake' would invoke the 1.4, use instead:
-
- AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi
-
-Make sure you're using the same version of automake and aclocal.
-
-Setting up the Build
---------------------
-
-To build Google Mock and your tests that use it, you need to tell your
-build system where to find its headers and source files. The exact
-way to do it depends on which build system you use, and is usually
-straightforward.
-
-### Generic Build Instructions ###
-
-This section shows how you can integrate Google Mock into your
-existing build system.
-
-Suppose you put Google Mock in directory ${GMOCK_DIR} and Google Test
-in ${GTEST_DIR} (the latter is ${GMOCK_DIR}/gtest by default). To
-build Google Mock, create a library build target (or a project as
-called by Visual Studio and Xcode) to compile
-
- ${GTEST_DIR}/src/gtest-all.cc and ${GMOCK_DIR}/src/gmock-all.cc
-
-with
-
- ${GTEST_DIR}/include, ${GTEST_DIR}, ${GMOCK_DIR}/include, and ${GMOCK_DIR}
-
-in the header search path. Assuming a Linux-like system and gcc,
-something like the following will do:
-
- g++ -I${GTEST_DIR}/include -I${GTEST_DIR} -I${GMOCK_DIR}/include \
- -I${GMOCK_DIR} -c ${GTEST_DIR}/src/gtest-all.cc
- g++ -I${GTEST_DIR}/include -I${GTEST_DIR} -I${GMOCK_DIR}/include \
- -I${GMOCK_DIR} -c ${GMOCK_DIR}/src/gmock-all.cc
- ar -rv libgmock.a gtest-all.o gmock-all.o
-
-Next, you should compile your test source file with
-${GTEST_DIR}/include and ${GMOCK_DIR}/include in the header search
-path, and link it with gmock and any other necessary libraries:
-
- g++ -I${GTEST_DIR}/include -I${GMOCK_DIR}/include \
- path/to/your_test.cc libgmock.a -o your_test
-
-As an example, the make/ directory contains a Makefile that you can
-use to build Google Mock on systems where GNU make is available
-(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
-Mock's own tests. Instead, it just builds the Google Mock library and
-a sample test. You can use it as a starting point for your own build
-script.
-
-If the default settings are correct for your environment, the
-following commands should succeed:
-
- cd ${GMOCK_DIR}/make
- make
- ./gmock_test
-
-If you see errors, try to tweak the contents of make/Makefile to make
-them go away. There are instructions in make/Makefile on how to do
-it.
-
-### Windows ###
-
-The msvc/2005 directory contains VC++ 2005 projects and the msvc/2010
-directory contains VC++ 2010 projects for building Google Mock and
-selected tests.
-
-Change to the appropriate directory and run "msbuild gmock.sln" to
-build the library and tests (or open the gmock.sln in the MSVC IDE).
-If you want to create your own project to use with Google Mock, you'll
-have to configure it to use the gmock_config propety sheet. For that:
-
- * Open the Property Manager window (View | Other Windows | Property Manager)
- * Right-click on your project and select "Add Existing Property Sheet..."
- * Navigate to gmock_config.vsprops or gmock_config.props and select it.
- * In Project Properties | Configuration Properties | General | Additional
- Include Directories, type <path to Google Mock>/include.
-
-Tweaking Google Mock
---------------------
-
-Google Mock can be used in diverse environments. The default
-configuration may not work (or may not work well) out of the box in
-some environments. However, you can easily tweak Google Mock by
-defining control macros on the compiler command line. Generally,
-these macros are named like GTEST_XYZ and you define them to either 1
-or 0 to enable or disable a certain feature.
-
-We list the most frequently used macros below. For a complete list,
-see file ${GTEST_DIR}/include/gtest/internal/gtest-port.h.
-
-### Choosing a TR1 Tuple Library ###
-
-Google Mock uses the C++ Technical Report 1 (TR1) tuple library
-heavily. Unfortunately TR1 tuple is not yet widely available with all
-compilers. The good news is that Google Test 1.4.0+ implements a
-subset of TR1 tuple that's enough for Google Mock's need. Google Mock
-will automatically use that implementation when the compiler doesn't
-provide TR1 tuple.
-
-Usually you don't need to care about which tuple library Google Test
-and Google Mock use. However, if your project already uses TR1 tuple,
-you need to tell Google Test and Google Mock to use the same TR1 tuple
-library the rest of your project uses, or the two tuple
-implementations will clash. To do that, add
-
- -DGTEST_USE_OWN_TR1_TUPLE=0
-
-to the compiler flags while compiling Google Test, Google Mock, and
-your tests. If you want to force Google Test and Google Mock to use
-their own tuple library, just add
-
- -DGTEST_USE_OWN_TR1_TUPLE=1
-
-to the compiler flags instead.
-
-If you want to use Boost's TR1 tuple library with Google Mock, please
-refer to the Boost website (http://www.boost.org/) for how to obtain
-it and set it up.
-
-### Tweaking Google Test ###
-
-Most of Google Test's control macros apply to Google Mock as well.
-Please see file ${GTEST_DIR}/README for how to tweak them.
-
-Upgrading from an Earlier Version
----------------------------------
-
-We strive to keep Google Mock releases backward compatible.
-Sometimes, though, we have to make some breaking changes for the
-users' long-term benefits. This section describes what you'll need to
-do if you are upgrading from an earlier version of Google Mock.
-
-### Upgrading from 1.1.0 or Earlier ###
-
-You may need to explicitly enable or disable Google Test's own TR1
-tuple library. See the instructions in section "Choosing a TR1 Tuple
-Library".
-
-### Upgrading from 1.4.0 or Earlier ###
-
-On platforms where the pthread library is available, Google Test and
-Google Mock use it in order to be thread-safe. For this to work, you
-may need to tweak your compiler and/or linker flags. Please see the
-"Multi-threaded Tests" section in file ${GTEST_DIR}/README for what
-you may need to do.
-
-If you have custom matchers defined using MatcherInterface or
-MakePolymorphicMatcher(), you'll need to update their definitions to
-use the new matcher API [2]. Matchers defined using MATCHER() or
-MATCHER_P*() aren't affected.
-
- [2] http://code.google.com/p/googlemock/wiki/CookBook#Writing_New_Monomorphic_Matchers,
- http://code.google.com/p/googlemock/wiki/CookBook#Writing_New_Polymorphic_Matchers
-
-Developing Google Mock
-----------------------
-
-This section discusses how to make your own changes to Google Mock.
-
-### Testing Google Mock Itself ###
-
-To make sure your changes work as intended and don't break existing
-functionality, you'll want to compile and run Google Test's own tests.
-For that you'll need Autotools. First, make sure you have followed
-the instructions in section "SVN Checkout" to configure Google Mock.
-Then, create a build output directory and enter it. Next,
-
- ${GMOCK_DIR}/configure # Standard GNU configure script, --help for more info
-
-Once you have successfully configured Google Mock, the build steps are
-standard for GNU-style OSS packages.
-
- make # Standard makefile following GNU conventions
- make check # Builds and runs all tests - all should pass.
-
-Note that when building your project against Google Mock, you are building
-against Google Test as well. There is no need to configure Google Test
-separately.
-
-### Regenerating Source Files ###
-
-Some of Google Mock's source files are generated from templates (not
-in the C++ sense) using a script. A template file is named FOO.pump,
-where FOO is the name of the file it will generate. For example, the
-file include/gmock/gmock-generated-actions.h.pump is used to generate
-gmock-generated-actions.h in the same directory.
-
-Normally you don't need to worry about regenerating the source files,
-unless you need to modify them. In that case, you should modify the
-corresponding .pump files instead and run the 'pump' script (for Pump
-is Useful for Meta Programming) to regenerate them. You can find
-pump.py in the ${GTEST_DIR}/scripts/ directory. Read the Pump manual
-[3] for how to use it.
-
- [3] http://code.google.com/p/googletest/wiki/PumpManual.
-
-### Contributing a Patch ###
-
-We welcome patches. Please read the Google Mock developer's guide [4]
-for how you can contribute. In particular, make sure you have signed
-the Contributor License Agreement, or we won't be able to accept the
-patch.
-
- [4] http://code.google.com/p/googlemock/wiki/DevGuide
-
-Happy testing!
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/aclocal.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/aclocal.m4
deleted file mode 100644
index e40b8dd20..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/aclocal.m4
+++ /dev/null
@@ -1,9139 +0,0 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
- lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
- ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
- lt_cl_success=:
- test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
- exec AS_MESSAGE_LOG_FD>/dev/null
- $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
- exec AS_MESSAGE_LOG_FD>>config.log
- $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_XSI_SHELLFNS
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-[$]*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
- [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[[3-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
- [shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[[3-9]]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
- [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[[4-9]]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xlc* | xlC*)
- # IBM XL 8.0 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix[[4-9]]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- linux* | k*bsd*-gnu)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(compiler_needs_object, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[[3-9]]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_sharedflag='--shared' ;;
- xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
- LDFLAGS="$save_LDFLAGS"
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
- [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
- library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
- [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- xl*)
- # IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
- [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${F77-"f77"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
- GCC=$G77
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${FC-"f95"}
- compiler=$CC
- GCC=$ac_cv_fc_compiler_gnu
-
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]+=\$[2]"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
- ;;
- esac
-])
-
-# Helper functions for option handling. -*- Autoconf -*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it. Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
- _LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME. If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
- dnl
- dnl Simply set some default values (i.e off) if boolean options were not
- dnl specified:
- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
- ])
- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
- ])
- dnl
- dnl If no reference was made to various pairs of opposing options, then
- dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
- dnl archives by default:
- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
- [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
- [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
- [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
- [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
- [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
- [$#], [2], [[$2]],
- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
- [m4_foreach([_Lt_suffix],
- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
- [lt_append([$1], [$2], [$3])$4],
- [$5])],
- [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in.
-
-# serial 3017 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else. This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too. Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- am__universal=false
- m4_case([$1], [CC],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac],
- [CXX],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac])
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 16
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------------------------
-# Adds support for distributing Python modules and packages. To
-# install modules, copy them to $(pythondir), using the python_PYTHON
-# automake variable. To install a package with the same name as the
-# automake package, install to $(pkgpythondir), or use the
-# pkgpython_PYTHON automake variable.
-#
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
-# locations to install python extension modules (shared libraries).
-# Another macro is required to find the appropriate flags to compile
-# extension modules.
-#
-# If your package is configured with a different prefix to python,
-# users will have to add the install directory to the PYTHONPATH
-# environment variable, or create a .pth file (see the python
-# documentation for details).
-#
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
-# cause an error if the version of python installed on the system
-# doesn't meet the requirement. MINIMUM-VERSION should consist of
-# numbers and dots only.
-AC_DEFUN([AM_PATH_PYTHON],
- [
- dnl Find a Python interpreter. Python versions prior to 2.0 are not
- dnl supported. (2.0 was released on October 16, 2000).
- m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
- [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0])
-
- m4_if([$1],[],[
- dnl No version check is needed.
- # Find any Python interpreter.
- if test -z "$PYTHON"; then
- AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
- fi
- am_display_PYTHON=python
- ], [
- dnl A version check is needed.
- if test -n "$PYTHON"; then
- # If the user set $PYTHON, use it and don't search something else.
- AC_MSG_CHECKING([whether $PYTHON version >= $1])
- AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_ERROR(too old)])
- am_display_PYTHON=$PYTHON
- else
- # Otherwise, try each interpreter until we find one that satisfies
- # VERSION.
- AC_CACHE_CHECK([for a Python interpreter with version >= $1],
- [am_cv_pathless_PYTHON],[
- for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
- test "$am_cv_pathless_PYTHON" = none && break
- AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
- done])
- # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
- if test "$am_cv_pathless_PYTHON" = none; then
- PYTHON=:
- else
- AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
- fi
- am_display_PYTHON=$am_cv_pathless_PYTHON
- fi
- ])
-
- if test "$PYTHON" = :; then
- dnl Run any user-specified action, or abort.
- m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
- else
-
- dnl Query Python for its version number. Getting [:3] seems to be
- dnl the best way to do this; it's what "site.py" does in the standard
- dnl library.
-
- AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
- [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
- AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
-
- dnl Use the values of $prefix and $exec_prefix for the corresponding
- dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
- dnl distinct variables so they can be overridden if need be. However,
- dnl general consensus is that you shouldn't need this ability.
-
- AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
- AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
-
- dnl At times (like when building shared libraries) you may want
- dnl to know which OS platform Python thinks this is.
-
- AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
- [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
- AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
-
-
- dnl Set up 4 directories:
-
- dnl pythondir -- where to install python scripts. This is the
- dnl site-packages directory, not the python standard library
- dnl directory like in previous automake betas. This behavior
- dnl is more consistent with lispdir.m4 for example.
- dnl Query distutils for this directory. distutils does not exist in
- dnl Python 1.5, so we fall back to the hardcoded directory if it
- dnl doesn't work.
- AC_CACHE_CHECK([for $am_display_PYTHON script directory],
- [am_cv_python_pythondir],
- [if test "x$prefix" = xNONE
- then
- am_py_prefix=$ac_default_prefix
- else
- am_py_prefix=$prefix
- fi
- am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
- case $am_cv_python_pythondir in
- $am_py_prefix*)
- am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
- ;;
- *)
- case $am_py_prefix in
- /usr|/System*) ;;
- *)
- am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
- ;;
- esac
- ;;
- esac
- ])
- AC_SUBST([pythondir], [$am_cv_python_pythondir])
-
- dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
- dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
- dnl more consistent with the rest of automake.
-
- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
-
- dnl pyexecdir -- directory for installing python extension modules
- dnl (shared libraries)
- dnl Query distutils for this directory. distutils does not exist in
- dnl Python 1.5, so we fall back to the hardcoded directory if it
- dnl doesn't work.
- AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
- [am_cv_python_pyexecdir],
- [if test "x$exec_prefix" = xNONE
- then
- am_py_exec_prefix=$am_py_prefix
- else
- am_py_exec_prefix=$exec_prefix
- fi
- am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
- echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
- case $am_cv_python_pyexecdir in
- $am_py_exec_prefix*)
- am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
- am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
- ;;
- *)
- case $am_py_exec_prefix in
- /usr|/System*) ;;
- *)
- am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
- ;;
- esac
- ;;
- esac
- ])
- AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
-
- dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-
- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
-
- dnl Run any user-specified action.
- $2
- fi
-
-])
-
-
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------------------
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
-# Run ACTION-IF-FALSE otherwise.
-# This test uses sys.hexversion instead of the string equivalent (first
-# word of sys.version), in order to cope with versions such as 2.2c1.
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys
-# split strings by '.' and convert to numeric. Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
-sys.exit(sys.hexversion < minverhex)"
- AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_RUN_LOG(COMMAND)
-# -------------------
-# Run COMMAND, save the exit status in ac_status, and log it.
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
-AC_DEFUN([AM_RUN_LOG],
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
- ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- (exit $ac_status); }])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[[\\\"\#\$\&\'\`$am_lf]]*)
- AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
- *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.guess b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.guess
deleted file mode 100644
index e3a2116a7..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.guess
+++ /dev/null
@@ -1,1533 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
-
-timestamp='2009-06-10'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd | genuineintel)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.h.in b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.h.in
deleted file mode 100644
index 843b5b10c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.h.in
+++ /dev/null
@@ -1,69 +0,0 @@
-/* build-aux/config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to necessary symbol if this constant uses a non-standard name on
- your system. */
-#undef PTHREAD_CREATE_JOINABLE
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.sub b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.sub
deleted file mode 100644
index eb0389a69..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/config.sub
+++ /dev/null
@@ -1,1693 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
-
-timestamp='2009-06-11'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- tile*)
- basic_machine=tile-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -kopensolaris* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/depcomp b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/depcomp
deleted file mode 100644
index df8eea7e4..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/depcomp
+++ /dev/null
@@ -1,630 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
- echo "depcomp: Variables source, object and depmode must be set" 1>&2
- exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags. We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write. Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
- # HP compiler uses -M and no extra arg.
- gccflag=-M
- depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
-fi
-
-cygpath_u="cygpath -u -f -"
-if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u="sed s,\\\\\\\\,/,g"
- depmode=msvisualcpp
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay! Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff. Hmm.
-## Unfortunately, FreeBSD c89 acceptance of flags depends upon
-## the command line argument order; so add the flags where they
-## appear in depend2.am. Note that the slowdown incurred here
-## affects only configure: in makefiles, %FASTDEP% shortcuts this.
- for arg
- do
- case $arg in
- -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
- *) set fnord "$@" "$arg" ;;
- esac
- shift # fnord
- shift # $arg
- done
- "$@"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- mv "$tmpdepfile" "$depfile"
- ;;
-
-gcc)
-## There are various ways to get dependency output from gcc. Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-## up in a subdir. Having to rename by hand is ugly.
-## (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-## than renaming).
- if test -z "$gccflag"; then
- gccflag=-MD,
- fi
- "$@" -Wp,"$gccflag$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
- sed -e 's/^[^:]*: / /' \
- -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header). We avoid this by adding
-## dummy dependencies for each header file. Too bad gcc doesn't do
-## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
- echo >> "$depfile"
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-aix)
- # The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
- # start of each line; $object doesn't have directory information.
- # Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- if test "$libtool" = yes; then
- tmpdepfile1=$dir$base.u
- tmpdepfile2=$base.u
- tmpdepfile3=$dir.libs/$base.u
- "$@" -Wc,-M
- else
- tmpdepfile1=$dir$base.u
- tmpdepfile2=$dir$base.u
- tmpdepfile3=$dir$base.u
- "$@" -M
- fi
- stat=$?
-
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
-
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp2)
- # The "hp" stanza above does not work with aCC (C++) and HP's ia64
- # compilers, which have integrated preprocessors. The correct option
- # to use with these is +Maked; it writes dependencies to a file named
- # 'foo.d', which lands next to the object file, wherever that
- # happens to be.
- # Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- if test "$libtool" = yes; then
- tmpdepfile1=$dir$base.d
- tmpdepfile2=$dir.libs/$base.d
- "$@" -Wc,+Maked
- else
- tmpdepfile1=$dir$base.d
- tmpdepfile2=$dir$base.d
- "$@" +Maked
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
- sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile" "$tmpdepfile2"
- ;;
-
-tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-#nosideeffect)
- # This comment above is used by automake to tell side-effect
- # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
- # in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
- "$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-dashXmstdout)
- # This case only exists to satisfy depend.m4. It is never actually
- # run, as this mode is specially recognized in the preamble.
- exit 1
- ;;
-
-makedepend)
- "$@" || exit $?
- # Remove any Libtool call
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
- # X makedepend
- shift
- cleared=no eat=no
- for arg
- do
- case $cleared in
- no)
- set ""; shift
- cleared=yes ;;
- esac
- if test $eat = yes; then
- eat=no
- continue
- fi
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift ;;
- # Strip any option that makedepend may not understand. Remove
- # the object too, otherwise makedepend will parse it as a source file.
- -arch)
- eat=yes ;;
- -*|$object)
- ;;
- *)
- set fnord "$@" "$arg"; shift ;;
- esac
- done
- obj_suffix=`echo "$object" | sed 's/^.*\././'`
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile" "$tmpdepfile".bak
- ;;
-
-cpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- cat < "$tmpdepfile" >> "$depfile"
- sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvisualcpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- IFS=" "
- for arg
- do
- case "$arg" in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
- esac
- done
- "$@" -E 2>/dev/null |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvcmsys)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-none)
- exec "$@"
- ;;
-
-*)
- echo "Unknown depmode $depmode" 1>&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/install-sh b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/install-sh
deleted file mode 100644
index 6781b987b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/install-sh
+++ /dev/null
@@ -1,520 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2009-04-28.21; # UTC
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/ltmain.sh b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/ltmain.sh
deleted file mode 100755
index 7ed280bc9..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/ltmain.sh
+++ /dev/null
@@ -1,8413 +0,0 @@
-# Generated from ltmain.m4sh.
-
-# ltmain.sh (GNU libtool) 2.2.6b
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-# --config show all configuration variables
-# --debug enable verbose shell tracing
-# -n, --dry-run display commands without modifying any files
-# --features display basic configuration information and exit
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print informational messages (default)
-# --version print version information
-# -h, --help print short or long help message
-#
-# MODE must be one of the following:
-#
-# clean remove files from the build directory
-# compile compile a source file into a libtool object
-# execute automatically set library path, then run a program
-# finish complete the installation of libtool libraries
-# install install libraries or executables
-# link create a library or an executable
-# uninstall remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-# host-triplet: $host
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
-# automake: $automake_version
-# autoconf: $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
-TIMESTAMP=""
-package_revision=1.3017
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
- lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
- fi"
-done
-
-$lt_unset CDPATH
-
-
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/bin/sed"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# Generated shell functions inserted here.
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
- -*) progname=./$progname ;;
-esac
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
- [\\/]*|[A-Za-z]:\\*) ;;
- *[\\/]*)
- progdir=$func_dirname_result
- progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
- ;;
- *)
- save_IFS="$IFS"
- IFS=:
- for progdir in $PATH; do
- IFS="$save_IFS"
- test -x "$progdir/$progname" && break
- done
- IFS="$save_IFS"
- test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
- s/$bs4/&\\
-/g
- s/^$bs2$dollar/$bs&/
- s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
- s/\n//g"
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-opt_warning=:
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
- $ECHO "$progname${mode+: }$mode: $*"
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
- $opt_verbose && func_echo ${1+"$@"}
-
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
-
- # bash bug again:
- :
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information." ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
- $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
- my_directory_path="$1"
- my_dir_list=
-
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
- esac
-
- # While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
- # ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
-
- # If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
-
- # ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
- done
- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
-
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
- # try to create one of the directories concurrently. Don't
- # stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
- done
- IFS="$save_mkdir_p_IFS"
-
- # Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
- fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
-
- if test "$opt_dry_run" = ":"; then
- # Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
- else
-
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
-
- save_mktempdir_umask=`umask`
- umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
- fi
-
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
- fi
-
- $ECHO "X$my_tmpdir" | $Xsed
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
-
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
- ;;
- *)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
- esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
- case $1 in
- *[\\\`\"]*)
- my_arg=`$ECHO "X$1" | $Xsed \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- my_arg="$1" ;;
- esac
-
- case $my_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
- ;;
- esac
-
- func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it. Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$lt_user_locale
- $my_cmd"
- my_status=$?
- eval "$lt_safe_locale"
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
- $SED -n '/^# Usage:/,/# -h/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- $ECHO
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$host*'"$host"'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
- func_error "missing argument for $1"
- exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-
-
-
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell, and then maybe $ECHO will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
- func_error ${1+"$@"}
- func_error "See the $PACKAGE documentation for more information."
- func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
- re_begincf='^# ### BEGIN LIBTOOL'
- re_endcf='^# ### END LIBTOOL'
-
- # Default configuration.
- $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
- done
-
- exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_features ()
-{
- $ECHO "host: $host"
- if test "$build_libtool_libs" = yes; then
- $ECHO "enable shared libraries"
- else
- $ECHO "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $ECHO "enable static libraries"
- else
- $ECHO "disable static libraries"
- fi
-
- exit $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
- # Global variable:
- tagname="$1"
-
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
-
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
- *)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
-}
-
-# Parse options once, thoroughly. This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
-
- # Shorthand for --mode=foo, only valid as the first argument
- case $1 in
- clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
- compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
- execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
- finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
- install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
- link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
- esac
-
- # Parse non-mode specific arguments:
- while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --config) func_config ;;
-
- --debug) preserve_args="$preserve_args $opt"
- func_echo "enabling shell trace mode"
- opt_debug='set -x'
- $opt_debug
- ;;
-
- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
- execute_dlfiles="$execute_dlfiles $1"
- shift
- ;;
-
- --dry-run | -n) opt_dry_run=: ;;
- --features) func_features ;;
- --finish) mode="finish" ;;
-
- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
- case $1 in
- # Valid mode arguments:
- clean) ;;
- compile) ;;
- execute) ;;
- finish) ;;
- install) ;;
- link) ;;
- relink) ;;
- uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $opt"
- exit_cmd=exit
- break
- ;;
- esac
-
- mode="$1"
- shift
- ;;
-
- --preserve-dup-deps)
- opt_duplicate_deps=: ;;
-
- --quiet|--silent) preserve_args="$preserve_args $opt"
- opt_silent=:
- ;;
-
- --verbose| -v) preserve_args="$preserve_args $opt"
- opt_silent=false
- ;;
-
- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
- preserve_args="$preserve_args $opt $1"
- func_enable_tag "$1" # tagname is set here
- shift
- ;;
-
- # Separate optargs to long options:
- -dlopen=*|--mode=*|--tag=*)
- func_opt_split "$opt"
- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
- shift
- ;;
-
- -\?|-h) func_usage ;;
- --help) opt_help=: ;;
- --version) func_version ;;
-
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
-
- *) nonopt="$opt"
- break
- ;;
- esac
- done
-
-
- case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
- ;;
- esac
-
- # Having warned about all mis-specified options, bail out if
- # anything was wrong.
- $exit_cmd $EXIT_FAILURE
-}
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
- fi
-
- exit $EXIT_MISMATCH
- fi
-}
-
-
-## ----------- ##
-## Main. ##
-## ----------- ##
-
-$opt_help || {
- # Sanity checks first:
- func_check_version_match
-
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- func_fatal_configuration "not configured to build any kind of library"
- fi
-
- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
-
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- func_error "unrecognized option \`-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$progname --help --mode=$mode' for more information."
-}
-
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
- test -f "$1" &&
- $SED -e 4q "$1" 2>/dev/null \
- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs. To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
- lalib_p=no
- if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
- for lalib_p_l in 1 2 3 4
- do
- read lalib_p_line
- case "$lalib_p_line" in
- \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
- esac
- done
- exec 0<&5 5<&-
- fi
- test "$lalib_p" = yes
-}
-
-# func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_script_p ()
-{
- func_lalib_p "$1"
-}
-
-# func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_executable_p ()
-{
- func_ltwrapper_exec_suffix=
- case $1 in
- *.exe) ;;
- *) func_ltwrapper_exec_suffix=.exe ;;
- esac
- $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-}
-
-# func_ltwrapper_scriptname file
-# Assumes file is an ltwrapper_executable
-# uses $file to determine the appropriate filename for a
-# temporary ltwrapper_script.
-func_ltwrapper_scriptname ()
-{
- func_ltwrapper_scriptname_result=""
- if func_ltwrapper_executable_p "$1"; then
- func_dirname_and_basename "$1" "" "."
- func_stripname '' '.exe' "$func_basename_result"
- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
- fi
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
- func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
- $opt_debug
- save_ifs=$IFS; IFS='~'
- for cmd in $1; do
- IFS=$save_ifs
- eval cmd=\"$cmd\"
- func_show_eval "$cmd" "${2-:}"
- done
- IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
- $opt_debug
- case $1 in
- */* | *\\*) . "$1" ;;
- *) . "./$1" ;;
- esac
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- $opt_debug
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with \`--tag'"
-# else
-# func_verbose "using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
-{
- write_libobj=${1}
- if test "$build_libtool_libs" = yes; then
- write_lobj=\'${2}\'
- else
- write_lobj=none
- fi
-
- if test "$build_old_libs" = yes; then
- write_oldobj=\'${3}\'
- else
- write_oldobj=none
- fi
-
- $opt_dry_run || {
- cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
- $MV "${write_libobj}T" "${write_libobj}"
- }
-}
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
- $opt_debug
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
- pie_flag=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- test -n "$libobj" && \
- func_fatal_error "you cannot specify \`-o' more than once"
- arg_mode=target
- continue
- ;;
-
- -pie | -fpie | -fPIE)
- pie_flag="$pie_flag $arg"
- continue
- ;;
-
- -shared | -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$arg"
- lastarg="$lastarg $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$lastarg"
- lastarg=$func_stripname_result
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- *)
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- func_quote_for_eval "$lastarg"
- base_compile="$base_compile $func_quote_for_eval_result"
- done # for arg
-
- case $arg_mode in
- arg)
- func_fatal_error "you must specify an argument for -Xcompile"
- ;;
- target)
- func_fatal_error "you must specify a target with \`-o'"
- ;;
- *)
- # Get the name of the library object.
- test -z "$libobj" && {
- func_basename "$srcfile"
- libobj="$func_basename_result"
- }
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- case $libobj in
- *.[cCFSifmso] | \
- *.ada | *.adb | *.ads | *.asm | \
- *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx)
- func_xform "$libobj"
- libobj=$func_xform_result
- ;;
- esac
-
- case $libobj in
- *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
- *)
- func_fatal_error "cannot determine name of library object from \`$libobj'"
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- continue
- ;;
-
- -static)
- build_libtool_libs=no
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- func_quote_for_eval "$libobj"
- test "X$libobj" != "X$func_quote_for_eval_result" \
- && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name \`$libobj' may not contain shell special characters."
- func_dirname_and_basename "$obj" "/" ""
- objname="$func_basename_result"
- xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
-
- test -z "$base_compile" && \
- func_fatal_help "you must specify a compilation command"
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
- pic_mode=default
- ;;
- esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
- else
- output_obj=
- need_locks=no
- lockfile=
- fi
-
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
- until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
- func_echo "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
- $ECHO "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
- removelist="$removelist $output_obj"
- $ECHO "$srcfile" > "$lockfile"
- fi
-
- $opt_dry_run || $RM $removelist
- removelist="$removelist $lockfile"
- trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- func_quote_for_eval "$srcfile"
- qsrcfile=$func_quote_for_eval_result
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
- # Without this assignment, base_compile gets emptied.
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- func_mkdir_p "$xdir$objdir"
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- func_show_eval_locale "$command" \
- 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- func_show_eval '$MV "$output_obj" "$lobj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
- command="$base_compile $qsrcfile$pie_flag"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- func_show_eval_locale "$command" \
- '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- func_show_eval '$MV "$output_obj" "$obj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
- fi
-
- $opt_dry_run || {
- func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- removelist=$lockfile
- $RM "$lockfile"
- fi
- }
-
- exit $EXIT_SUCCESS
-}
-
-$opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
- # We need to display help for each of the modes.
- case $mode in
- "")
- # Generic help is extracted from the usage comments
- # at the start of this file.
- func_help
- ;;
-
- clean)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
- compile)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -no-suppress do not suppress compiler output for multiple passes
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -shared do not build a \`.o' file suitable for static linking
- -static only build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
- execute)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
- finish)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
- install)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The following components of INSTALL-COMMAND are treated specially:
-
- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
- link)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -shared only do dynamic linking of libtool libraries
- -shrext SUFFIX override the standard shared library file extension
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
- -weak LIBNAME declare that the target provides the LIBNAME interface
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
- uninstall)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
- *)
- func_fatal_help "invalid operation mode \`$mode'"
- ;;
- esac
-
- $ECHO
- $ECHO "Try \`$progname --help' for more information about other modes."
-
- exit $?
-}
-
- # Now that we've collected a possible --mode arg, show help if necessary
- $opt_help && func_mode_help
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
- $opt_debug
- # The first argument is the command name.
- cmd="$nonopt"
- test -z "$cmd" && \
- func_fatal_help "you must specify a COMMAND"
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- test -f "$file" \
- || func_fatal_help "\`$file' is not a file"
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$lib' is not a valid libtool archive"
-
- # Read the libtool library.
- dlname=
- library_names=
- func_source "$file"
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && \
- func_warning "\`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- if test ! -f "$dir/$dlname"; then
- func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
- fi
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- ;;
-
- *)
- func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if func_ltwrapper_script_p "$file"; then
- func_source "$file"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- elif func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- func_source "$func_ltwrapper_scriptname_result"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- func_quote_for_eval "$file"
- args="$args $func_quote_for_eval_result"
- done
-
- if test "X$opt_dry_run" = Xfalse; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- else
- $lt_unset $lt_var
- fi"
- done
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
- $ECHO "export $shlibpath_var"
- fi
- $ECHO "$cmd$args"
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
- $opt_debug
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- $opt_silent && exit $EXIT_SUCCESS
-
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- $ECHO "Libraries have been installed in:"
- for libdir in $libdirs; do
- $ECHO " $libdir"
- done
- $ECHO
- $ECHO "If you ever happen to want to link against installed libraries"
- $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
- $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $ECHO "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $ECHO " during execution"
- fi
- if test -n "$runpath_var"; then
- $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
- $ECHO " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $ECHO " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $ECHO " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $ECHO
-
- $ECHO "See any operating system documentation about shared libraries for"
- case $host in
- solaris2.[6789]|solaris2.1[0-9])
- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
- $ECHO "pages."
- ;;
- *)
- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
- ;;
- esac
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- exit $EXIT_SUCCESS
-}
-
-test "$mode" = finish && func_mode_finish ${1+"$@"}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
- $opt_debug
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
- # Aesthetically quote it.
- func_quote_for_eval "$nonopt"
- install_prog="$func_quote_for_eval_result "
- arg=$1
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- func_quote_for_eval "$arg"
- install_prog="$install_prog$func_quote_for_eval_result"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o)
- prev=$arg
- ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- func_quote_for_eval "$arg"
- install_prog="$install_prog $func_quote_for_eval_result"
- done
-
- test -z "$install_prog" && \
- func_fatal_help "you must specify an install program"
-
- test -n "$prev" && \
- func_fatal_help "the \`$prev' option requires an argument"
-
- if test -z "$files"; then
- if test -z "$dest"; then
- func_fatal_help "no file or destination specified"
- else
- func_fatal_help "you must specify a destination"
- fi
- fi
-
- # Strip any trailing slash from the destination.
- func_stripname '' '/' "$dest"
- dest=$func_stripname_result
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- func_dirname_and_basename "$dest" "" "."
- destdir="$func_dirname_result"
- destname="$func_basename_result"
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files; shift
- test "$#" -gt 1 && \
- func_fatal_help "\`$dest' is not a directory"
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- func_fatal_help "\`$destdir' must be an absolute directory name"
- ;;
- esac
- done
- ;;
- esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$file' is not a valid libtool archive"
-
- library_names=
- old_library=
- relink_command=
- func_source "$file"
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- func_dirname "$file" "/" ""
- dir="$func_dirname_result"
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
- fi
-
- func_warning "relinking \`$file'"
- func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
- fi
-
- # See the names of the shared library.
- set dummy $library_names; shift
- if test -n "$1"; then
- realname="$1"
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
- 'exit $?'
- tstripme="$stripme"
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- case $realname in
- *.dll.a)
- tstripme=""
- ;;
- esac
- ;;
- esac
- if test -n "$tstripme" && test -n "$striplib"; then
- func_show_eval "$striplib $destdir/$realname" 'exit $?'
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- test "$linkname" != "$realname" \
- && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- func_execute_cmds "$postinstall_cmds" 'exit $?'
- fi
-
- # Install the pseudo-library for information purposes.
- func_basename "$file"
- name="$func_basename_result"
- instname="$dir/$name"i
- func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- func_lo2o "$destfile"
- staticdest=$func_lo2o_result
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- func_fatal_help "cannot copy a libtool object to \`$destfile'"
- ;;
- esac
-
- # Install the libtool object if requested.
- test -n "$destfile" && \
- func_show_eval "$install_prog $file $destfile" 'exit $?'
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- func_lo2o "$file"
- staticobj=$func_lo2o_result
- func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin* | *mingw*)
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- wrapper=$func_ltwrapper_scriptname_result
- else
- func_stripname '' '.exe' "$file"
- wrapper=$func_stripname_result
- fi
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if func_ltwrapper_script_p "$wrapper"; then
- notinst_deplibs=
- relink_command=
-
- func_source "$wrapper"
-
- # Check the variables that should have been set.
- test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- func_source "$lib"
- fi
- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "\`$lib' has not been installed in \`$libdir'"
- finalize=no
- fi
- done
-
- relink_command=
- func_source "$wrapper"
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- $opt_dry_run || {
- if test "$finalize" = yes; then
- tmpdir=`func_mktempdir`
- func_basename "$file$stripped_ext"
- file="$func_basename_result"
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $opt_silent || {
- func_quote_for_expand "$relink_command"
- eval "func_echo $func_quote_for_expand_result"
- }
- if eval "$relink_command"; then :
- else
- func_error "error: relink \`$file' with the above command before installing it"
- $opt_dry_run || ${RM}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- func_warning "cannot relink \`$file'"
- fi
- }
- else
- # Install the binary that we compiled earlier.
- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- func_stripname '' '.exe' "$destfile"
- destfile=$func_stripname_result
- ;;
- esac
- ;;
- esac
- func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
- $opt_dry_run || if test -n "$outputname"; then
- ${RM}r "$tmpdir"
- fi
- ;;
- esac
- done
-
- for file in $staticlibs; do
- func_basename "$file"
- name="$func_basename_result"
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
- fi
-
- # Do each command in the postinstall commands.
- func_execute_cmds "$old_postinstall_cmds" 'exit $?'
- done
-
- test -n "$future_libdirs" && \
- func_warning "remember to run \`$progname --finish$future_libdirs'"
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- $opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = install && func_mode_install ${1+"$@"}
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
- $opt_debug
- my_outputname="$1"
- my_originator="$2"
- my_pic_p="${3-no}"
- my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
- my_dlsyms=
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms="${my_outputname}S.c"
- else
- func_error "not configured to extract global symbols from dlpreopened files"
- fi
- fi
-
- if test -n "$my_dlsyms"; then
- case $my_dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${my_outputname}.nm"
-
- func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
- # Parse the name list into a source file.
- func_verbose "creating $output_objdir/$my_dlsyms"
-
- $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- func_verbose "generating symbol list for \`$output'"
-
- $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for progfile in $progfiles; do
- func_verbose "extracting global C symbols from \`$progfile'"
- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $opt_dry_run || {
- eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- if test -n "$export_symbols_regex"; then
- $opt_dry_run || {
- eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $opt_dry_run || {
- $RM $export_symbols
- eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- else
- $opt_dry_run || {
- eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- case $host in
- *cygwin | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- fi
- fi
-
- for dlprefile in $dlprefiles; do
- func_verbose "extracting global C symbols from \`$dlprefile'"
- func_basename "$dlprefile"
- name="$func_basename_result"
- $opt_dry_run || {
- eval '$ECHO ": $name " >> "$nlist"'
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
- }
- done
-
- $opt_dry_run || {
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $MV "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if $GREP -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- $GREP -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
- else
- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
- fi
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols. */
-typedef struct {
- const char *name;
- void *address;
-} lt_dlsymlist;
-"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs. */"
- lt_dlsym_const= ;;
- *osf5*)
- echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
- lt_dlsym_const= ;;
- *)
- lt_dlsym_const=const ;;
- esac
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
- { \"$my_originator\", (void *) 0 },"
-
- case $need_lib_prefix in
- no)
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- *)
- eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- esac
- $ECHO >> "$output_objdir/$my_dlsyms" "\
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- } # !$opt_dry_run
-
- pic_flag_for_symtable=
- case "$compile_command " in
- *" -static "*) ;;
- *)
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
- *-*-hpux*)
- pic_flag_for_symtable=" $pic_flag" ;;
- *)
- if test "X$my_pic_p" != Xno; then
- pic_flag_for_symtable=" $pic_flag"
- fi
- ;;
- esac
- ;;
- esac
- symtab_cflags=
- for arg in $LTCFLAGS; do
- case $arg in
- -pie | -fpie | -fPIE) ;;
- *) symtab_cflags="$symtab_cflags $arg" ;;
- esac
- done
-
- # Now compile the dynamic symbol file.
- func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
- # Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
- # Transform the symbol file into the correct name.
- symfileobj="$output_objdir/${my_outputname}S.$objext"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- if test -f "$output_objdir/$my_outputname.def"; then
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- else
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- fi
- ;;
- *)
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- ;;
- esac
- ;;
- *)
- func_fatal_error "unknown suffix for \`$my_dlsyms'"
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
- fi
-}
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- $opt_debug
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 |
- $SED -n -e '
- 1,100{
- / I /{
- s,.*,import,
- p
- q
- }
- }'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $ECHO "$win32_libid_type"
-}
-
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- $opt_debug
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
- fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- $opt_debug
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- func_basename "$my_xlib"
- my_xlib="$func_basename_result"
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- func_arith $extracted_serial + 1
- extracted_serial=$func_arith_result
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
-
- func_mkdir_p "$my_xdir"
-
- case $host in
- *-darwin*)
- func_verbose "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- $opt_dry_run || {
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`basename "$darwin_archive"`
- darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
- if test -n "$darwin_arches"; then
- darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- $LIPO -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- $RM -rf unfat-$$
- cd "$darwin_orig_dir"
- else
- cd $darwin_orig_dir
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- } # !$opt_dry_run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
-
- func_extract_archives_result="$my_oldobjs"
-}
-
-
-
-# func_emit_wrapper_part1 [arg=no]
-#
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
- func_emit_wrapper_part1_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part1_arg1=$1
- fi
-
- $ECHO "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
- generated_by_libtool_version='$macro_version'
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$ECHO are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- ECHO=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$ECHO works!
- :
- else
- # Restart under the correct shell, and then maybe \$ECHO will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $ECHO "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
- func_emit_wrapper_part2_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part2_arg1=$1
- fi
-
- $ECHO "\
-
- # Usually 'no', except on cygwin/mingw when embedded into
- # the cwrapper.
- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
- if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
- # special case for '.'
- if test \"\$thisdir\" = \".\"; then
- thisdir=\`pwd\`
- fi
- # remove .libs from thisdir
- case \"\$thisdir\" in
- *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
- $objdir ) thisdir=. ;;
- esac
- fi
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $ECHO "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" ||
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $MKDIR \"\$progdir\"
- else
- $RM \"\$progdir/\$file\"
- fi"
-
- $ECHO "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $ECHO \"\$relink_command_output\" >&2
- $RM \"\$progdir/\$file\"
- exit 1
- fi
- fi
-
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $RM \"\$progdir/\$program\";
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $RM \"\$progdir/\$file\"
- fi"
- else
- $ECHO "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $ECHO "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $ECHO "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $ECHO "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $ECHO "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2* | *-cegcc*)
- $ECHO "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $ECHO "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $ECHO "\
- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
- exit 1
- fi
- else
- # The program doesn't exist.
- \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
- $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
- exit 1
- fi
-fi\
-"
-}
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable. Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take. If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory. This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
- func_emit_wrapper_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_arg1=$1
- fi
-
- # split this up so that func_emit_cwrapperexe_src
- # can call each part independently.
- func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
- func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin. Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
- func_to_host_path_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- case $build in
- *mingw* ) # actually, msys
- # awkward: cmd appends spaces to result
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_path_tmp1=`( cmd //c echo "$1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_path_tmp1=`cygpath -w "$1"`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # Unfortunately, winepath does not exit with a non-zero
- # error code, so we are forced to check the contents of
- # stdout. On the other hand, if the command is not
- # found, the shell will set an exit code of 127 and print
- # *an error message* to stdout. So we must check for both
- # error code of zero AND non-empty stdout, which explains
- # the odd construction:
- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- else
- # Allow warning below.
- func_to_host_path_result=""
- fi
- ;;
- esac
- if test -z "$func_to_host_path_result" ; then
- func_error "Could not determine host path corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback:
- func_to_host_path_result="$1"
- fi
- ;;
- esac
- fi
-}
-# end: func_to_host_path
-
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
- func_to_host_pathlist_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- # Remove leading and trailing path separator characters from
- # ARG. msys behavior is inconsistent here, cygpath turns them
- # into '.;' and ';.', and winepath ignores them completely.
- func_to_host_pathlist_tmp2="$1"
- # Once set for this call, this variable should not be
- # reassigned. It is used in tha fallback case.
- func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e 's|^:*||' -e 's|:*$||'`
- case $build in
- *mingw* ) # Actually, msys.
- # Awkward: cmd appends spaces to result.
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # unfortunately, winepath doesn't convert pathlists
- func_to_host_pathlist_result=""
- func_to_host_pathlist_oldIFS=$IFS
- IFS=:
- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
- IFS=$func_to_host_pathlist_oldIFS
- if test -n "$func_to_host_pathlist_f" ; then
- func_to_host_path "$func_to_host_pathlist_f"
- if test -n "$func_to_host_path_result" ; then
- if test -z "$func_to_host_pathlist_result" ; then
- func_to_host_pathlist_result="$func_to_host_path_result"
- else
- func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
- fi
- fi
- fi
- IFS=:
- done
- IFS=$func_to_host_pathlist_oldIFS
- ;;
- esac
- if test -z "$func_to_host_pathlist_result" ; then
- func_error "Could not determine the host path(s) corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback. This may break if $1 contains DOS-style drive
- # specifications. The fix is not to complicate the expression
- # below, but for the user to provide a working wine installation
- # with winepath so that path translation in the cross-to-mingw
- # case works properly.
- lt_replace_pathsep_nix_to_dos="s|:|;|g"
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_replace_pathsep_nix_to_dos"`
- fi
- # Now, add the leading and trailing path separators back
- case "$1" in
- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
- ;;
- esac
- case "$1" in
- *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
- ;;
- esac
- ;;
- esac
- fi
-}
-# end: func_to_host_pathlist
-
-# func_emit_cwrapperexe_src
-# emit the source code for a wrapper executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_cwrapperexe_src ()
-{
- cat <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "$SHELL $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat <<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-# define setmode _setmode
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-# include <io.h>
-# define HAVE_SETENV
-# ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-# endif
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef S_IXOTH
-# define S_IXOTH 0
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0
-#endif
-
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-# define intptr_t int
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# define FOPEN_WB "wb"
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef _O_BINARY
-# define _O_BINARY 0
-#endif
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
- va_list args;
- va_start (args, fmt);
- (void) vfprintf (stderr, fmt, args);
- va_end (args);
-}
-#else
-# define LTWRAPPER_DEBUGPRINTF(args)
-#endif
-
-const char *program_name = NULL;
-
-void *xmalloc (size_t num);
-char *xstrdup (const char *string);
-const char *base_name (const char *name);
-char *find_executable (const char *wrapper);
-char *chase_symlinks (const char *pathspec);
-int make_executable (const char *path);
-int check_executable (const char *path);
-char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-void lt_setenv (const char *name, const char *value);
-char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
- func_emit_wrapper_part1 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
- cat <<EOF
-
-static const char *script_text_part2 =
-EOF
- func_emit_wrapper_part2 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
-
- cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- func_to_host_pathlist "$temp_rpath"
- cat <<EOF
-const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * LIB_PATH_VALUE = "";
-EOF
- fi
-
- if test -n "$dllsearchpath"; then
- func_to_host_pathlist "$dllsearchpath:"
- cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE = "";
-EOF
- fi
-
- if test "$fast_install" = yes; then
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
- else
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
- fi
-
-
- cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
-
-static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
-static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
- /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
- /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
- /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int newargc;
- char *tmp_pathspec;
- char *actual_cwrapper_path;
- char *actual_cwrapper_name;
- char *target_name;
- char *lt_argv_zero;
- intptr_t rval = 127;
-
- int i;
-
- program_name = (char *) xstrdup (base_name (argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
-
- /* very simple arg parsing; don't want to rely on getopt */
- for (i = 1; i < argc; i++)
- {
- if (strcmp (argv[i], dumpscript_opt) == 0)
- {
-EOF
- case "$host" in
- *mingw* | *cygwin* )
- # make stdout use "unix" line endings
- echo " setmode(1,_O_BINARY);"
- ;;
- esac
-
- cat <<"EOF"
- printf ("%s", script_text_part1);
- printf ("%s", script_text_part2);
- return 0;
- }
- }
-
- newargz = XMALLOC (char *, argc + 1);
- tmp_pathspec = find_executable (argv[0]);
- if (tmp_pathspec == NULL)
- lt_fatal ("Couldn't find %s", argv[0]);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
- tmp_pathspec));
-
- actual_cwrapper_path = chase_symlinks (tmp_pathspec);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
- actual_cwrapper_path));
- XFREE (tmp_pathspec);
-
- actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
- strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
- /* wrapper name transforms */
- strendzap (actual_cwrapper_name, ".exe");
- tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
- XFREE (actual_cwrapper_name);
- actual_cwrapper_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- /* target_name transforms -- use actual target program name; might have lt- prefix */
- target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
- strendzap (target_name, ".exe");
- tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
- XFREE (target_name);
- target_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
- target_name));
-EOF
-
- cat <<EOF
- newargz[0] =
- XMALLOC (char, (strlen (actual_cwrapper_path) +
- strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
- strcpy (newargz[0], actual_cwrapper_path);
- strcat (newargz[0], "$objdir");
- strcat (newargz[0], "/");
-EOF
-
- cat <<"EOF"
- /* stop here, and copy so we don't have to do this twice */
- tmp_pathspec = xstrdup (newargz[0]);
-
- /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
- strcat (newargz[0], actual_cwrapper_name);
-
- /* DO want the lt- prefix here if it exists, so use target_name */
- lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
- XFREE (tmp_pathspec);
- tmp_pathspec = NULL;
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- {
- char* p;
- while ((p = strchr (newargz[0], '\\')) != NULL)
- {
- *p = '/';
- }
- while ((p = strchr (lt_argv_zero, '\\')) != NULL)
- {
- *p = '/';
- }
- }
-EOF
- ;;
- esac
-
- cat <<"EOF"
- XFREE (target_name);
- XFREE (actual_cwrapper_path);
- XFREE (actual_cwrapper_name);
-
- lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
- lt_setenv ("DUALCASE", "1"); /* for MSK sh */
- lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
- lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-
- newargc=0;
- for (i = 1; i < argc; i++)
- {
- if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
- {
- if (argv[i][env_set_opt_len] == '=')
- {
- const char *p = argv[i] + env_set_opt_len + 1;
- lt_opt_process_env_set (p);
- }
- else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_set (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_set_opt);
- continue;
- }
- if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
- {
- if (argv[i][env_prepend_opt_len] == '=')
- {
- const char *p = argv[i] + env_prepend_opt_len + 1;
- lt_opt_process_env_prepend (p);
- }
- else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_prepend (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_prepend_opt);
- continue;
- }
- if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
- {
- if (argv[i][env_append_opt_len] == '=')
- {
- const char *p = argv[i] + env_append_opt_len + 1;
- lt_opt_process_env_append (p);
- }
- else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_append (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_append_opt);
- continue;
- }
- if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
- {
- /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
- namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
- report an error. Otherwise, targets might begin to believe
- they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
- namespace. The first time any user complains about this, we'll
- need to make LTWRAPPER_OPTION_PREFIX a configure-time option
- or a configure.ac-settable value.
- */
- lt_fatal ("Unrecognized option in %s namespace: '%s'",
- ltwrapper_option_prefix, argv[i]);
- }
- /* otherwise ... */
- newargz[++newargc] = xstrdup (argv[i]);
- }
- newargz[++newargc] = NULL;
-
- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
- for (i = 0; i < newargc; i++)
- {
- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
- }
-
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- /* execv doesn't actually work on mingw as expected on unix */
- rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
- if (rval == -1)
- {
- /* failed to start process */
- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
- return 127;
- }
- return rval;
-EOF
- ;;
- *)
- cat <<"EOF"
- execv (lt_argv_zero, newargz);
- return rval; /* =127, but avoids unused variable warning */
-EOF
- ;;
- esac
-
- cat <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
- void *p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
- string) : NULL;
-}
-
-const char *
-base_name (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char) name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return base;
-}
-
-int
-check_executable (const char *path)
-{
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0)
- && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
- return 1;
- else
- return 0;
-}
-
-int
-make_executable (const char *path)
-{
- int rval = 0;
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if (stat (path, &st) >= 0)
- {
- rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
- }
- return rval;
-}
-
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise
- Does not chase symlinks, even on platforms that support them.
-*/
-char *
-find_executable (const char *wrapper)
-{
- int has_slash = 0;
- const char *p;
- const char *p_next;
- /* static buffer for getcwd */
- char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char *concat_name;
-
- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
-
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
-#endif
-
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char *path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char *q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR (*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name =
- XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name =
- XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- return NULL;
-}
-
-char *
-chase_symlinks (const char *pathspec)
-{
-#ifndef S_ISLNK
- return xstrdup (pathspec);
-#else
- char buf[LT_PATHMAX];
- struct stat s;
- char *tmp_pathspec = xstrdup (pathspec);
- char *p;
- int has_symlinks = 0;
- while (strlen (tmp_pathspec) && !has_symlinks)
- {
- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
- tmp_pathspec));
- if (lstat (tmp_pathspec, &s) == 0)
- {
- if (S_ISLNK (s.st_mode) != 0)
- {
- has_symlinks = 1;
- break;
- }
-
- /* search backwards for last DIR_SEPARATOR */
- p = tmp_pathspec + strlen (tmp_pathspec) - 1;
- while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- p--;
- if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- {
- /* no more DIR_SEPARATORS left */
- break;
- }
- *p = '\0';
- }
- else
- {
- char *errstr = strerror (errno);
- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
- }
- }
- XFREE (tmp_pathspec);
-
- if (!has_symlinks)
- {
- return xstrdup (pathspec);
- }
-
- tmp_pathspec = realpath (pathspec, buf);
- if (tmp_pathspec == 0)
- {
- lt_fatal ("Could not follow symlinks for %s", pathspec);
- }
- return xstrdup (tmp_pathspec);
-#endif
-}
-
-char *
-strendzap (char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert (str != NULL);
- assert (pat != NULL);
-
- len = strlen (str);
- patlen = strlen (pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp (str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char *mode,
- const char *message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
- {
-#ifdef HAVE_SETENV
- /* always make a copy, for consistency with !HAVE_SETENV */
- char *str = xstrdup (value);
- setenv (name, str, 1);
-#else
- int len = strlen (name) + 1 + strlen (value) + 1;
- char *str = XMALLOC (char, len);
- sprintf (str, "%s=%s", name, value);
- if (putenv (str) != EXIT_SUCCESS)
- {
- XFREE (str);
- }
-#endif
- }
-}
-
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
- char *new_value;
- if (orig_value && *orig_value)
- {
- int orig_value_len = strlen (orig_value);
- int add_len = strlen (add);
- new_value = XMALLOC (char, add_len + orig_value_len + 1);
- if (to_end)
- {
- strcpy (new_value, orig_value);
- strcpy (new_value + orig_value_len, add);
- }
- else
- {
- strcpy (new_value, add);
- strcpy (new_value + add_len, orig_value);
- }
- }
- else
- {
- new_value = xstrdup (add);
- }
- return new_value;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
- const char *p;
- int len;
- if (!arg || !*arg)
- return 1;
-
- p = strchr (arg, (int)'=');
-
- if (!p)
- return 1;
-
- *value = xstrdup (++p);
-
- len = strlen (arg) - strlen (*value);
- *name = XMALLOC (char, len);
- strncpy (*name, arg, len-1);
- (*name)[len - 1] = '\0';
-
- return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
- }
-
- lt_setenv (name, value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 1);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- /* some systems can't cope with a ':'-terminated path #' */
- int len = strlen (new_value);
- while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
- {
- new_value[len-1] = '\0';
- }
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-void
-lt_update_lib_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# func_mode_link arg...
-func_mode_link ()
-{
- $opt_debug
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- # It is impossible to link a dll without this setting, and
- # we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
- # flag for every libtool invocation.
- # allow_undefined=no
-
- # FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
- # even a static library is built. For now, we need to specify
- # -no-undefined on the libtool link line when we can be certain
- # that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
- ;;
- *)
- allow_undefined=yes
- ;;
- esac
- libtool_args=$nonopt
- base_compile="$nonopt $@"
- compile_command=$nonopt
- finalize_command=$nonopt
-
- compile_rpath=
- finalize_rpath=
- compile_shlibpath=
- finalize_shlibpath=
- convenience=
- old_convenience=
- deplibs=
- old_deplibs=
- compiler_flags=
- linker_flags=
- dllsearchpath=
- lib_search_path=`pwd`
- inst_prefix_dir=
- new_inherited_linker_flags=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
- weak_libs=
- single_module="${wl}-single_module"
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- break
- ;;
- -all-static | -static | -static-libtool-libs)
- case $arg in
- -all-static)
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- func_warning "complete static linking is impossible in this configuration"
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- -static)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=built
- ;;
- -static-libtool-libs)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- esac
- build_libtool_libs=no
- build_old_libs=yes
- break
- ;;
- esac
- done
-
- # See if our shared archives depend on static archives.
- test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
- # Go through the arguments, transforming them on the way.
- while test "$#" -gt 0; do
- arg="$1"
- shift
- func_quote_for_eval "$arg"
- qarg=$func_quote_for_eval_unquoted_result
- func_append libtool_args " $func_quote_for_eval_result"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- func_append compile_command " @OUTPUT@"
- func_append finalize_command " @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- func_append compile_command " @SYMFILE@"
- func_append finalize_command " @SYMFILE@"
- preload=yes
- fi
- case $arg in
- *.la | *.lo) ;; # We handle these cases below.
- force)
- if test "$dlself" = no; then
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- self)
- if test "$prev" = dlprefiles; then
- dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
- dlself=yes
- else
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- *)
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- else
- dlprefiles="$dlprefiles $arg"
- fi
- prev=
- continue
- ;;
- esac
- ;;
- expsyms)
- export_symbols="$arg"
- test -f "$arg" \
- || func_fatal_error "symbol file \`$arg' does not exist"
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- framework)
- case $host in
- *-*-darwin*)
- case "$deplibs " in
- *" $qarg.ltframework "*) ;;
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
- ;;
- esac
- ;;
- esac
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat "$save_arg"`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- done
- else
- func_fatal_error "link input file \`$arg' does not exist"
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- if test "$prev" = rpath; then
- case "$rpath " in
- *" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
- esac
- else
- case "$xrpath " in
- *" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
- esac
- fi
- prev=
- continue
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- weak)
- weak_libs="$weak_libs $arg"
- prev=
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- func_append compile_command " $wl$qarg"
- func_append finalize_command " $wl$qarg"
- continue
- ;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
- fi # test -n "$prev"
-
- prevarg="$arg"
-
- case $arg in
- -all-static)
- if test -n "$link_static_flag"; then
- # See comment for -static flag below, for more details.
- func_append compile_command " $link_static_flag"
- func_append finalize_command " $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- func_fatal_error "\`-allow-undefined' must not be used because it is the default"
- ;;
-
- -avoid-version)
- avoid_version=yes
- continue
- ;;
-
- -dlopen)
- prev=dlfiles
- continue
- ;;
-
- -dlpreopen)
- prev=dlprefiles
- continue
- ;;
-
- -export-dynamic)
- export_dynamic=yes
- continue
- ;;
-
- -export-symbols | -export-symbols-regex)
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- func_fatal_error "more than one -exported-symbols argument is not allowed"
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework)
- prev=framework
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- continue
- ;;
-
- # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
- # so, if we see these flags be careful not to treat them like -L
- -L[A-Z][A-Z]*:*)
- case $with_gcc/$host in
- no/*-*-irix* | /*-*-irix*)
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- func_stripname '-L' '' "$arg"
- dir=$func_stripname_result
- if test -z "$dir"; then
- if test "$#" -gt 0; then
- func_fatal_error "require no space between \`-L' and \`$1'"
- else
- func_fatal_error "need path for \`-L' option"
- fi
- fi
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of \`$dir'"
- dir="$absdir"
- ;;
- esac
- case "$deplibs " in
- *" -L$dir "*) ;;
- *)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- ::) dllsearchpath=$dir;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs System.ltframework"
- continue
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
- ;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- # Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- case "$new_inherited_linker_flags " in
- *" $arg "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
- esac
- continue
- ;;
-
- -multi_module)
- single_module="${wl}-multi_module"
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
- # The PATH hackery in wrapper scripts is required on Windows
- # and Darwin in order for the loader to find any dlls it needs.
- func_warning "\`-no-install' is ignored for $host"
- func_warning "assuming \`-no-fast-install' instead"
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- func_stripname '-R' '' "$arg"
- dir=$func_stripname_result
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -shared)
- # The effects of -shared are defined in a previous loop.
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -static | -static-libtool-libs)
- # The effects of -static are defined in a previous loop.
- # We used to do the same as -all-static on platforms that
- # didn't have a PIC flag, but the assumption that the effects
- # would be equivalent was wrong. It would break on at least
- # Digital Unix and AIX.
- continue
- ;;
-
- -thread-safe)
- thread_safe=yes
- continue
- ;;
-
- -version-info)
- prev=vinfo
- continue
- ;;
-
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -weak)
- prev=weak
- continue
- ;;
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Wl,*)
- func_stripname '-Wl,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
- linker_flags="$linker_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # -msg_* for osf cc
- -msg_*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- compiler_flags="$compiler_flags $arg"
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- ;;
-
- *.$libext)
- # An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
- continue
- ;;
-
- *.la)
- # A libtool-controlled library.
-
- if test "$prev" = dlfiles; then
- # This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
- prev=
- elif test "$prev" = dlprefiles; then
- # The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
- prev=
- else
- deplibs="$deplibs $arg"
- fi
- continue
- ;;
-
- # Some other compiler argument.
- *)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
- done # argument parsing loop
-
- test -n "$prev" && \
- func_fatal_help "the \`$prevarg' option requires an argument"
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- func_basename "$output"
- outputname="$func_basename_result"
- libobjs_save="$libobjs"
-
- if test -n "$shlibpath_var"; then
- # get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
- else
- shlib_search_path=
- fi
- eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
- func_dirname "$output" "/" ""
- output_objdir="$func_dirname_result$objdir"
- # Create the object directory.
- func_mkdir_p "$output_objdir"
-
- # Determine the type of output
- case $output in
- "")
- func_fatal_help "you must specify an output file"
- ;;
- *.$libext) linkmode=oldlib ;;
- *.lo | *.$objext) linkmode=obj ;;
- *.la) linkmode=lib ;;
- *) linkmode=prog ;; # Anything else should be a program.
- esac
-
- specialdeplibs=
-
- libs=
- # Find all interdependent deplibs by searching for libraries
- # that are linked more than once (e.g. -la -lb -la)
- for deplib in $deplibs; do
- if $opt_duplicate_deps ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if $opt_duplicate_compiler_generated_deps; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- deplibs=
- newdependency_libs=
- newlib_search_path=
- need_relink=no # whether we're linking any uninstalled libtool libraries
- notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
-
- case $linkmode in
- lib)
- passes="conv dlpreopen link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
- ;;
- esac
- done
- ;;
- prog)
- compile_deplibs=
- finalize_deplibs=
- alldeplibs=no
- newdlfiles=
- newdlprefiles=
- passes="conv scan dlopen dlpreopen link"
- ;;
- *) passes="conv"
- ;;
- esac
-
- for pass in $passes; do
- # The preopen pass in lib mode reverses $deplibs; put it back here
- # so that -L comes before libs that need it for instance...
- if test "$linkmode,$pass" = "lib,link"; then
- ## FIXME: Find the place where the list is rebuilt in the wrong
- ## order, and fix it there properly
- tmp_deplibs=
- for deplib in $deplibs; do
- tmp_deplibs="$deplib $tmp_deplibs"
- done
- deplibs="$tmp_deplibs"
- fi
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
- esac
- fi
- if test "$linkmode,$pass" = "lib,dlpreopen"; then
- # Collect and forward deplibs of preopened libtool libs
- for lib in $dlprefiles; do
- # Ignore non-libtool-libs
- dependency_libs=
- case $lib in
- *.la) func_source "$lib" ;;
- esac
-
- # Collect preopened libtool deplibs, except any this library
- # has declared as weak libs
- for deplib in $dependency_libs; do
- deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
- case " $weak_libs " in
- *" $deplib_base "*) ;;
- *) deplibs="$deplibs $deplib" ;;
- esac
- done
- done
- libs="$dlprefiles"
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
-
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- func_warning "\`-l' is ignored for archives/objects"
- continue
- fi
- func_stripname '-l' '' "$deplib"
- name=$func_stripname_result
- if test "$linkmode" = lib; then
- searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
- else
- searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
- fi
- for searchdir in $searchdirs; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if func_lalib_p "$lib"; then
- library_names=
- old_library=
- func_source "$lib"
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
- lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- fi
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- *.ltframework)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- *)
- func_warning "\`-L' is ignored for archives/objects"
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- func_stripname '-R' '' "$deplib"
- dir=$func_stripname_result
- # Make sure the xrpath contains only unique directories.
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- fi
- deplibs="$deplib $deplibs"
- continue
- ;;
- *.la) lib="$deplib" ;;
- *.$libext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- case $linkmode in
- lib)
- # Linking convenience modules into shared libraries is allowed,
- # but linking other static libraries is non-portable.
- case " $dlpreconveniencelibs " in
- *" $deplib "*) ;;
- *)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $ECHO
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because the file extensions .$libext of this argument makes me believe"
- $ECHO "*** that it is just a static archive that I should not use here."
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- ;;
- esac
- continue
- ;;
- prog)
- if test "$pass" != link; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- continue
- ;;
- esac # linkmode
- ;; # *.$libext
- *.lo | *.$objext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
-
- if test "$found" = yes || test -f "$lib"; then :
- else
- func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
- fi
-
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$lib" \
- || func_fatal_error "\`$lib' is not a valid libtool archive"
-
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- inherited_linker_flags=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- func_source "$lib"
-
- # Convert "-framework foo" to "foo.ltframework"
- if test -n "$inherited_linker_flags"; then
- tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
- for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
- case " $new_inherited_linker_flags " in
- *" $tmp_inherited_linker_flag "*) ;;
- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
- esac
- done
- fi
- dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
- fi
-
- if test "$pass" = conv; then
- # Only check for convenience libraries
- deplibs="$lib $deplibs"
- if test -z "$libdir"; then
- if test -z "$old_library"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
- # It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- func_fatal_error "\`$lib' is not a convenience library"
- fi
- continue
- fi # $pass = conv
-
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
- if test -z "$linklib"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
- fi
- if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- else
- newdlfiles="$newdlfiles $lib"
- fi
- continue
- fi # $pass = dlopen
-
- # We need an absolute path.
- case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
- *)
- abs_ladir=`cd "$ladir" && pwd`
- if test -z "$abs_ladir"; then
- func_warning "cannot determine absolute directory name of \`$ladir'"
- func_warning "passing it literally to the linker, although it might fail"
- abs_ladir="$ladir"
- fi
- ;;
- esac
- func_basename "$lib"
- laname="$func_basename_result"
-
- # Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- func_stripname 'lib' '.la' "$laname"
- name=$func_stripname_result
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir" && test "$linkmode" = prog; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Keep a list of preopened convenience libraries to check
- # that they are being used correctly in the link pass.
- test -z "$libdir" && \
- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
- fi
- fi # $pass = dlpreopen
-
- if test -z "$libdir"; then
- # Link the convenience library
- if test "$linkmode" = lib; then
- deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$dir/$old_library $compile_deplibs"
- finalize_deplibs="$dir/$old_library $finalize_deplibs"
- else
- deplibs="$lib $deplibs" # used for prog,scan pass
- fi
- continue
- fi
-
-
- if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
- deplibs="$lib $deplibs"
-
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
- fi
-
- tmp_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- esac
- # Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
- deplibs="$deplib $deplibs"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$deplib $newdependency_libs"
- fi
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
- test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath:" in
- *"$absdir:"*) ;;
- *) temp_rpath="$temp_rpath$absdir:" ;;
- esac
- fi
-
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi # $linkmode,$pass = prog,link...
-
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
- fi
-
- link_static=no # Whether the deplib will be linked statically
- use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes; then
- use_static_libs=no
- fi
- if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw* | *cegcc*)
- # No point in relinking DLLs because paths are not encoded
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=no
- ;;
- *)
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- ;;
- esac
- # This is a shared library
-
- # Warn about portability, can't link against -module's on some
- # systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=""
- for dlpremoduletest in $dlprefiles; do
- if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule="$dlpremoduletest"
- break
- fi
- done
- if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
- $ECHO
- if test "$linkmode" = prog; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
- else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $ECHO "*** $linklib is not portable!"
- fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- shift
- realname="$1"
- shift
- libname=`eval "\\$ECHO \"$libname_spec\""`
- # use dlname if we got it. it's perfectly good, no?
- if test -n "$dlname"; then
- soname="$dlname"
- elif test -n "$soname_spec"; then
- # bleh windows
- case $host in
- *cygwin* | mingw* | *cegcc*)
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- func_basename "$soroot"
- soname="$func_basename_result"
- func_stripname 'lib' '.dll' "$soname"
- newlib=libimp-$func_stripname_result.a
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- func_verbose "extracting exported symbol list from \`$soname'"
- func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- func_verbose "generating import library for \`$soname'"
- func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
- fi
- # make sure the library variables are pointing to the new library
- dir=$output_objdir
- linklib=$newlib
- fi # test -n "$old_archive_from_expsyms_cmds"
-
- if test "$linkmode" = prog || test "$mode" != relink; then
- add_shlibpath=
- add_dir=
- add=
- lib_linked=yes
- case $hardcode_action in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
- case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
- *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a (non-dlopened) module then we can not
- # link against it, someone is ignoring the earlier warnings
- if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null ; then
- if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $ECHO
- $ECHO "*** And there doesn't seem to be a static archive available"
- $ECHO "*** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- elif test -n "$old_library"; then
- add="$dir/$old_library"
- fi
- fi
- esac
- elif test "$hardcode_minus_L" = no; then
- case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- func_fatal_configuration "unsupported hardcode properties"
- fi
-
- if test -n "$add_shlibpath"; then
- case :$compile_shlibpath: in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- if test "$linkmode" = prog; then
- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
- test -n "$add" && compile_deplibs="$add $compile_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes &&
- test "$hardcode_minus_L" != yes &&
- test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- fi
- fi
- fi
-
- if test "$linkmode" = prog || test "$mode" = relink; then
- add_shlibpath=
- add_dir=
- add=
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- fi
-
- if test "$linkmode" = prog; then
- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
- test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- fi
- fi
- elif test "$linkmode" = prog; then
- # Here we assume that one of hardcode_direct or hardcode_minus_L
- # is not unsupported. This is valid on all known static and
- # shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
- compile_deplibs="$dir/$linklib $compile_deplibs"
- finalize_deplibs="$dir/$linklib $finalize_deplibs"
- else
- compile_deplibs="-l$name -L$dir $compile_deplibs"
- finalize_deplibs="-l$name -L$dir $finalize_deplibs"
- fi
- elif test "$build_libtool_libs" = yes; then
- # Not a shared library
- if test "$deplibs_check_method" != pass_all; then
- # We're trying link a shared library against a static one
- # but the system doesn't support it.
-
- # Just print a warning and add the library to dependency_libs so
- # that the program can be linked against the static library.
- $ECHO
- $ECHO "*** Warning: This system can not link to static lib archive $lib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
- $ECHO "*** But as you try to build a module library, libtool will still create "
- $ECHO "*** a static module, that should work as long as the dlopening application"
- $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- else
- deplibs="$dir/$old_library $deplibs"
- link_static=yes
- fi
- fi # link shared/static library?
-
- if test "$linkmode" = lib; then
- if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
- # Extract -R from dependency_libs
- temp_deplibs=
- for libdir in $dependency_libs; do
- case $libdir in
- -R*) func_stripname '-R' '' "$libdir"
- temp_xrpath=$func_stripname_result
- case " $xrpath " in
- *" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
- esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
- esac
- done
- dependency_libs="$temp_deplibs"
- fi
-
- newlib_search_path="$newlib_search_path $absdir"
- # Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
- # ... and its dependency_libs
- tmp_libs=
- for deplib in $dependency_libs; do
- newdependency_libs="$deplib $newdependency_libs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
-
- if test "$link_all_deplibs" != no; then
- # Add the search paths of all dependency libraries
- for deplib in $dependency_libs; do
- path=
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- func_dirname "$deplib" "" "."
- dir="$func_dirname_result"
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of \`$dir'"
- absdir="$dir"
- fi
- ;;
- esac
- if $GREP "^installed=no" $deplib > /dev/null; then
- case $host in
- *-*-darwin*)
- depdepl=
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$absdir/$objdir/$depdepl" ; then
- depdepl="$absdir/$objdir/$depdepl"
- darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- if test -z "$darwin_install_name"; then
- darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- fi
- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
- path=
- fi
- fi
- ;;
- *)
- path="-L$absdir/$objdir"
- ;;
- esac
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
- func_warning "\`$deplib' seems to be moved"
-
- path="-L$absdir"
- fi
- ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- if test "$pass" = link; then
- if test "$linkmode" = "prog"; then
- compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
- finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
- else
- compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- fi
- fi
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
- # Link the dlpreopened libraries before other libraries
- for deplib in $save_deplibs; do
- deplibs="$deplib $deplibs"
- done
- fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
- # Make sure lib_search_path contains only unique directories.
- lib_search_path=
- for dir in $newlib_search_path; do
- case "$lib_search_path " in
- *" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
- esac
- done
- newlib_search_path=
- fi
-
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
- vars="compile_deplibs finalize_deplibs"
- fi
- for var in $vars dependency_libs; do
- # Add libraries to $var in reverse order
- eval tmp_libs=\"\$$var\"
- new_libs=
- for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
- *)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
- esac
- ;;
- esac
- done
- tmp_libs=
- for deplib in $new_libs; do
- case $deplib in
- -L*)
- case " $tmp_libs " in
- *" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- done
- eval $var=\"$tmp_libs\"
- done # for var
- fi
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- fi
- if test "$linkmode" = prog || test "$linkmode" = lib; then
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for archives"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for archives" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for archives"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for archives"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for archives"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for archives"
-
- test -n "$export_symbols$export_symbols_regex" && \
- func_warning "\`-export-symbols' is ignored for archives"
-
- # Now set the variables for building old libraries.
- build_libtool_libs=no
- oldlibs="$output"
- objs="$objs$old_deplibs"
- ;;
-
- lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
- case $outputname in
- lib*)
- func_stripname 'lib' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- test "$module" = no && \
- func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- func_stripname '' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- func_stripname '' '.la' "$outputname"
- libname=$func_stripname_result
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- test "$dlself" != no && \
- func_warning "\`-dlopen self' is ignored for libtool libraries"
-
- set dummy $rpath
- shift
- test "$#" -gt 1 && \
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for convenience libraries"
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- shift
- IFS="$save_ifs"
-
- test -n "$7" && \
- func_fatal_help "too many parameters to \`-version-info'"
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$1"
- number_minor="$2"
- number_revision="$3"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows|none)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_minor"
- lt_irix_increment=no
- ;;
- *)
- func_fatal_configuration "$modename: unknown library version type \`$version_type'"
- ;;
- esac
- ;;
- no)
- current="$1"
- revision="$2"
- age="$3"
- ;;
- esac
-
- # Check that each of the things are valid numbers.
- case $current in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "CURRENT \`$current' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "REVISION \`$revision' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "AGE \`$age' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- func_error "AGE \`$age' is greater than the current interface number \`$current'"
- func_fatal_error "\`$vinfo' is not valid version information"
- fi
-
- # Calculate the version variables.
- major=
- versuffix=
- verstring=
- case $version_type in
- none) ;;
-
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- func_arith $current + 1
- minor_current=$func_arith_result
- xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current"
- ;;
-
- irix | nonstopux)
- if test "X$lt_irix_increment" = "Xno"; then
- func_arith $current - $age
- else
- func_arith $current - $age + 1
- fi
- major=$func_arith_result
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- func_arith $revision - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- func_arith $current - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- qnx)
- major=".$current"
- versuffix=".$current"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
-
- *)
- func_fatal_configuration "unknown library version type \`$version_type'"
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- case $version_type in
- darwin)
- # we can't check for "0.0" in archive_cmds due to quoting
- # problems, so we reset it completely
- verstring=
- ;;
- *)
- verstring="0.0"
- ;;
- esac
- if test "$need_version" = no; then
- versuffix=
- else
- versuffix=".0.0"
- fi
- fi
-
- # Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
- major=
- versuffix=
- verstring=""
- fi
-
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- func_warning "undefined symbols not allowed in $host shared libraries"
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
-
- fi
-
- func_generate_dlsyms "$libname" "$libname" "yes"
- libobjs="$libobjs $symfileobj"
- test "X$libobjs" = "X " && libobjs=
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$ECHO "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext | *.gcno)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- test -n "$removelist" && \
- func_show_eval "${RM}r \$removelist"
- fi
-
- # Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
- # Transform .lo files to .o files.
- oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
- fi
-
- # Eliminate all temporary directories.
- #for path in $notinst_path; do
- # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
- # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
- # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
- #done
-
- if test -n "$xrpath"; then
- # If the user specified any rpath flags, then add them.
- temp_xrpath=
- for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
- dependency_libs="$temp_xrpath $dependency_libs"
- fi
- fi
-
- # Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
- dlfiles=
- for lib in $old_dlfiles; do
- case " $dlprefiles $dlfiles " in
- *" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
- esac
- done
-
- # Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
- dlprefiles=
- for lib in $old_dlprefiles; do
- case "$dlprefiles " in
- *" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
- esac
- done
-
- if test "$build_libtool_libs" = yes; then
- if test -n "$rpath"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs System.ltframework"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- ;;
- *)
- # Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
- fi
- ;;
- esac
- fi
-
- # Transform deplibs into only deplibs that can be linked in shared.
- name_save=$name
- libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- # I'm not sure if I'm treating the release correctly. I think
- # release should show up in the -l (ie -lgmp5) so we don't want to
- # add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
- newdeplibs=
- droppeddeps=no
- case $deplibs_check_method in
- pass_all)
- # Don't check for shared/static. Everything works.
- # This might be a little naive. We might want to check
- # whether the library exists or not. But this is on
- # osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behavior.
- newdeplibs=$deplibs
- ;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which I believe you do not have"
- $ECHO "*** because a test_compile did reveal that the linker did not use it for"
- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because a test_compile did reveal that the linker did not use this one"
- $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
- $ECHO "*** make it link in! You will probably need to install it or some"
- $ECHO "*** library that it depends on before this library will be fully"
- $ECHO "*** functional. Installing it before continuing would be even better."
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method; shift
- file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- # Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null |
- $GREP " -> " >/dev/null; then
- continue
- fi
- # The statement above tries to avoid entering an
- # endless loop below, in case of cyclic links.
- # We might still enter an endless loop, since a link
- # loop can be closed while we follow links,
- # but so what?
- potlib="$potent_lib"
- while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
- case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
- esac
- done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
- $SED -e 10q |
- $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
- $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
- -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
- done
- fi
- if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
- $GREP . >/dev/null; then
- $ECHO
- if test "X$deplibs_check_method" = "Xnone"; then
- $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
- else
- $ECHO "*** Warning: inter-library dependencies are not known to be supported."
- fi
- $ECHO "*** All declared inter-library dependencies are being dropped."
- droppeddeps=yes
- fi
- ;;
- esac
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
- libname=$libname_save
- name=$name_save
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library with the System framework
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
- $ECHO
- $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
- $ECHO "*** a static module, that should work as long as the dlopening"
- $ECHO "*** application is linked with the -dlopen flag."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- else
- $ECHO "*** The inter-library dependencies that have been dropped here will be"
- $ECHO "*** automatically added whenever a program is linked with this library"
- $ECHO "*** or is declared to -dlopen it."
-
- if test "$allow_undefined" = no; then
- $ECHO
- $ECHO "*** Since this library must not contain undefined symbols,"
- $ECHO "*** because either the platform does not support them or"
- $ECHO "*** it was explicitly requested with -no-undefined,"
- $ECHO "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- fi
- fi
- # Done checking deplibs!
- deplibs=$newdeplibs
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- case $host in
- *-*-darwin*)
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- deplibs="$new_libs"
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
-
- # Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
- fi
-
- # Get the real and link names of the library.
- eval shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- shift
- realname="$1"
- shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- test "X$libobjs" = "X " && libobjs=
-
- delfiles=
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols="$output_objdir/$libname.uexp"
- delfiles="$delfiles $export_symbols"
- fi
-
- orig_export_symbols=
- case $host_os in
- cygwin* | mingw* | cegcc*)
- if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
- # exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
- # and it's NOT already a .def file. Must figure out
- # which of the given symbols are data symbols and tag
- # them as such. So, trigger use of export_symbols_cmds.
- # export_symbols gets reassigned inside the "prepare
- # the list of exported symbols" if statement, so the
- # include_expsyms logic still works.
- orig_export_symbols="$export_symbols"
- export_symbols=
- always_export_symbols=yes
- fi
- fi
- ;;
- esac
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- func_len " $cmd"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- func_show_eval "$cmd" 'exit $?'
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- func_verbose "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec" &&
- test "$compiler_needs_object" = yes &&
- test -z "$libobjs"; then
- # extract the archives, so we have objects to list.
- # TODO: could optimize this to just extract one archive.
- whole_archive_flag_spec=
- fi
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
- fi
-
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
- eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
- fi
-
- # Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- func_len " $test_cmds" &&
- len=$func_len_result &&
- test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise
- # or, if using GNU ld and skipped_export is not :, use a linker
- # script.
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- last_robj=
- k=1
-
- if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
- output=${output_objdir}/${output_la}.lnkscript
- func_verbose "creating GNU ld script: $output"
- $ECHO 'INPUT (' > $output
- for obj in $save_libobjs
- do
- $ECHO "$obj" >> $output
- done
- $ECHO ')' >> $output
- delfiles="$delfiles $output"
- elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
- output=${output_objdir}/${output_la}.lnk
- func_verbose "creating linker input file list: $output"
- : > $output
- set x $save_libobjs
- shift
- firstobj=
- if test "$compiler_needs_object" = yes; then
- firstobj="$1 "
- shift
- fi
- for obj
- do
- $ECHO "$obj" >> $output
- done
- delfiles="$delfiles $output"
- output=$firstobj\"$file_list_spec$output\"
- else
- if test -n "$save_libobjs"; then
- func_verbose "creating reloadable object files..."
- output=$output_objdir/$output_la-${k}.$objext
- eval test_cmds=\"$reload_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
-
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- if test "X$objlist" = X ||
- test "$len" -lt "$max_cmd_len"; then
- func_append objlist " $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- func_arith $k + 1
- k=$func_arith_result
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- func_len " $last_robj"
- func_arith $len0 + $func_len_result
- len=$func_arith_result
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
- fi
- delfiles="$delfiles $output"
-
- else
- output=
- fi
-
- if ${skipped_export-false}; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
- fi
- fi
-
- test -n "$save_libobjs" &&
- func_verbose "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- if test -n "$export_symbols_regex" && ${skipped_export-false}; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
-
- if ${skipped_export-false}; then
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
- fi
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
- fi
-
- if test -n "$delfiles"; then
- # Append the command to remove temporary files to $cmds.
- eval cmds=\"\$cmds~\$RM $delfiles\"
- fi
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
-
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- func_show_eval '${RM}r "$gentop"'
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
- fi
- done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
- ;;
-
- obj)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for objects"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for objects" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for objects"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for objects"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for objects"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for objects"
-
- case $output in
- *.lo)
- test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
- libobj=$output
- func_lo2o "$libobj"
- obj=$func_lo2o_result
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $opt_dry_run || $RM $obj $libobj
-
- # Objects from convenience libraries. This assumes
- # single-version convenience libraries. Whenever we create
- # different ones for PIC/non-PIC, this we'll have to duplicate
- # the extraction.
- reload_conv_objs=
- gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec and hope we can get by with
- # turning comma into space..
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- fi
- fi
-
- # Create the old-style object.
- reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
- output="$obj"
- func_execute_cmds "$reload_cmds" 'exit $?'
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- # $show "echo timestamp > $libobj"
- # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test -n "$pic_flag" || test "$pic_mode" != default; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
- func_execute_cmds "$reload_cmds" 'exit $?'
- fi
-
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
- output=$func_stripname_result.exe;;
- esac
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for programs"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for programs"
-
- test "$preload" = yes \
- && test "$dlopen_support" = unknown \
- && test "$dlopen_self" = unknown \
- && test "$dlopen_self_static" = unknown && \
- func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- case $host in
- *-*-darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- # But is supposedly fixed on 10.4 or later (yay!).
- if test "$tagname" = CXX ; then
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[0123])
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $compile_deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $compile_deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- compile_deplibs="$new_libs"
-
-
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
-
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- ::) dllsearchpath=$libdir;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- fi
-
- func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
- # template prelinking step
- if test -n "$prelink_cmds"; then
- func_execute_cmds "$prelink_cmds" 'exit $?'
- fi
-
- wrappers_required=yes
- case $host in
- *cygwin* | *mingw* )
- if test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- *cegcc)
- # Disable wrappers for cegcc, we are cross compiling anyway.
- wrappers_required=no
- ;;
- *)
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- esac
- if test "$wrappers_required" = no; then
- # Replace the output file specification.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
-
- # We have no uninstalled library dependencies, so finalize right now.
- exit_status=0
- func_show_eval "$link_command" 'exit_status=$?'
-
- # Delete the generated files.
- if test -f "$output_objdir/${outputname}S.${objext}"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
- fi
-
- exit $exit_status
- fi
-
- if test -n "$compile_shlibpath$finalize_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
- fi
- if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
- fi
-
- compile_var=
- finalize_var=
- if test -n "$runpath_var"; then
- if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- if test -n "$finalize_perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
- done
- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- fi
-
- if test "$no_install" = yes; then
- # We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- # Delete the old output file.
- $opt_dry_run || $RM $output
- # Link the executable and exit
- func_show_eval "$link_command" 'exit $?'
- exit $EXIT_SUCCESS
- fi
-
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
-
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "\`$output' will be relinked during installation"
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
-
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
- # Delete the old output files.
- $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- func_show_eval "$link_command" 'exit $?'
-
- # Now create the wrapper script.
- func_verbose "creating $output"
-
- # Quote the relink command for shipping.
- if test -n "$relink_command"; then
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Quote $ECHO for shipping.
- if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Only actually do things if not in dry run mode.
- $opt_dry_run || {
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) func_stripname '' '.exe' "$output"
- output=$func_stripname_result ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- func_stripname '' '.exe' "$outputname"
- outputname=$func_stripname_result ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- func_dirname_and_basename "$output" "" "."
- output_name=$func_basename_result
- output_path=$func_dirname_result
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $RM $cwrappersource $cwrapper
- trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_cwrapperexe_src > $cwrappersource
-
- # The wrapper executable is built using the $host compiler,
- # because it contains $host paths and files. If cross-
- # compiling, it, like the target executable, must be
- # executed on the $host or under an emulation environment.
- $opt_dry_run || {
- $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
- $STRIP $cwrapper
- }
-
- # Now, create the wrapper script for func_source use:
- func_ltwrapper_scriptname $cwrapper
- $RM $func_ltwrapper_scriptname_result
- trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
- $opt_dry_run || {
- # note: this script will not be executed, so do not chmod.
- if test "x$build" = "x$host" ; then
- $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
- else
- func_emit_wrapper no > $func_ltwrapper_scriptname_result
- fi
- }
- ;;
- * )
- $RM $output
- trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_wrapper no > $output
- chmod +x $output
- ;;
- esac
- }
- exit $EXIT_SUCCESS
- ;;
- esac
-
- # See if we need to build an old-fashioned archive.
- for oldlib in $oldlibs; do
-
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save $symfileobj"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- if test "$preload" = yes && test -f "$symfileobj"; then
- oldobjs="$oldobjs $symfileobj"
- fi
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- func_basename "$obj"
- $ECHO "$func_basename_result"
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $ECHO "copying selected object files to avoid basename conflicts..."
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
- func_mkdir_p "$gentop"
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- func_basename "$obj"
- objbase="$func_basename_result"
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- func_arith $counter + 1
- counter=$func_arith_result
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
- eval cmds=\"$old_archive_cmds\"
-
- func_len " $cmds"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- func_verbose "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
- oldobjs=
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- eval test_cmds=\"$old_archive_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
- for obj in $save_oldobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- func_append objlist " $obj"
- if test "$len" -lt "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- len=$len0
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- func_execute_cmds "$cmds" 'exit $?'
- done
-
- test -n "$generated" && \
- func_show_eval "${RM}r$generated"
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- func_verbose "creating $output"
-
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
- # Only create the output if not a dry run.
- $opt_dry_run || {
- for installed in no yes; do
- if test "$installed" = yes; then
- if test -z "$install_libdir"; then
- break
- fi
- output="$output_objdir/$outputname"i
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- *.la)
- func_basename "$deplib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
-
- for lib in $dlfiles; do
- case $lib in
- *.la)
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlfiles="$newdlfiles $libdir/$name"
- ;;
- *) newdlfiles="$newdlfiles $lib" ;;
- esac
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- *.la)
- # Only pass preopened files to the pseudo-archive (for
- # eventual linking with the app. that links it) if we
- # didn't already link the preopened objects directly into
- # the library:
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlprefiles="$newdlprefiles $libdir/$name"
- ;;
- esac
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- done
- dlprefiles="$newdlprefiles"
- fi
- $RM $output
- # place dlname in correct position for cygwin
- tdlname=$dlname
- case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
- $ECHO >> $output "\
-relink_command=\"$relink_command\""
- fi
- done
- }
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
- ;;
- esac
- exit $EXIT_SUCCESS
-}
-
-{ test "$mode" = link || test "$mode" = relink; } &&
- func_mode_link ${1+"$@"}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
- $opt_debug
- RM="$nonopt"
- files=
- rmforce=
- exit_status=0
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- for arg
- do
- case $arg in
- -f) RM="$RM $arg"; rmforce=yes ;;
- -*) RM="$RM $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- test -z "$RM" && \
- func_fatal_help "you must specify an RM program"
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- if test "X$dir" = X.; then
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- func_basename "$file"
- name="$func_basename_result"
- test "$mode" = uninstall && objdir="$dir"
-
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
- case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
- esac
- fi
-
- # Don't error if the file doesn't exist and rm -f was used.
- if { test -L "$file"; } >/dev/null 2>&1 ||
- { test -h "$file"; } >/dev/null 2>&1 ||
- test -f "$file"; then
- :
- elif test -d "$file"; then
- exit_status=1
- continue
- elif test "$rmforce" = yes; then
- continue
- fi
-
- rmfiles="$file"
-
- case $name in
- *.la)
- # Possibly a libtool archive, so verify it.
- if func_lalib_p "$file"; then
- func_source $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
- done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
- case "$mode" in
- clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
- *" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
- esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- ;;
- uninstall)
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
- # FIXME: should reinstall the best remaining shared library.
- ;;
- esac
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if func_lalib_p "$file"; then
-
- # Read the .lo file
- func_source $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" &&
- test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" &&
- test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- func_stripname '' '.exe' "$name"
- noexename=$func_stripname_result
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if func_ltwrapper_p "$file"; then
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- relink_command=
- func_source $func_ltwrapper_scriptname_result
- rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
- else
- relink_command=
- func_source $dir/$noexename
- fi
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- func_show_eval "$RM $rmfiles" 'exit_status=1'
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- func_show_eval "rmdir $dir >/dev/null 2>&1"
- fi
- done
-
- exit $exit_status
-}
-
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
- func_mode_uninstall ${1+"$@"}
-
-test -z "$mode" && {
- help="$generic_help"
- func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode \`$mode'"
-
-if test -n "$exec_cmd"; then
- eval exec "$exec_cmd"
- exit $EXIT_FAILURE
-fi
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# vi:sw=2
-
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/missing b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/missing
deleted file mode 100644
index 28055d2ae..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/build-aux/missing
+++ /dev/null
@@ -1,376 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
-
-Send bug reports to <bug-automake@gnu.org>."
- exit $?
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
- exit $?
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
-esac
-
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar*)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar*)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure
deleted file mode 100644
index 048aed8cf..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure
+++ /dev/null
@@ -1,17795 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for Google C++ Mocking Framework 1.6.0.
-#
-# Report bugs to <googlemock@googlegroups.com>.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: googlemock@googlegroups.com about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
- fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-$*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='Google C++ Mocking Framework'
-PACKAGE_TARNAME='gmock'
-PACKAGE_VERSION='1.6.0'
-PACKAGE_STRING='Google C++ Mocking Framework 1.6.0'
-PACKAGE_BUGREPORT='googlemock@googlegroups.com'
-PACKAGE_URL=''
-
-ac_unique_file="./COPYING"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-enable_option_checking=no
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LTLIBOBJS
-LIBOBJS
-subdirs
-GTEST_VERSION
-GTEST_LIBS
-GTEST_LDFLAGS
-GTEST_CXXFLAGS
-GTEST_CPPFLAGS
-GTEST_CONFIG
-HAVE_PTHREADS_FALSE
-HAVE_PTHREADS_TRUE
-PTHREAD_CFLAGS
-PTHREAD_LIBS
-PTHREAD_CC
-acx_pthread_config
-HAVE_PYTHON_FALSE
-HAVE_PYTHON_TRUE
-PYTHON
-CXXCPP
-CPP
-OTOOL64
-OTOOL
-LIPO
-NMEDIT
-DSYMUTIL
-lt_ECHO
-RANLIB
-AR
-OBJDUMP
-LN_S
-NM
-ac_ct_DUMPBIN
-DUMPBIN
-LD
-FGREP
-EGREP
-GREP
-SED
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-LIBTOOL
-am__fastdepCXX_FALSE
-am__fastdepCXX_TRUE
-CXXDEPMODE
-ac_ct_CXX
-CXXFLAGS
-CXX
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_dependency_tracking
-enable_shared
-enable_static
-with_pic
-enable_fast_install
-with_gnu_ld
-enable_libtool_lock
-with_pthreads
-with_gtest
-enable_external_gtest
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-CPP
-CXXCPP
-GTEST_CONFIG
-GTEST_CPPFLAGS
-GTEST_CXXFLAGS
-GTEST_LDFLAGS
-GTEST_LIBS
-GTEST_VERSION'
-ac_subdirs_all='gtest'
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures Google C++ Mocking Framework 1.6.0 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/gmock]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of Google C++ Mocking Framework 1.6.0:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
- --disable-external-gtest
- Disables any detection or use of a system installed
- or user provided gtest. Any option to '--with-gtest'
- is ignored. (Default is enabled.)
-
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-pthreads use pthreads (default is yes)
- --with-gtest Specifies how to find the gtest package. If no
- arguments are given, the default behavior, a system
- installed gtest will be used if present, and an
- internal version built otherwise. If a path is
- provided, the gtest built or installed at that
- prefix will be used.
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- CPP C preprocessor
- CXXCPP C++ preprocessor
- GTEST_CONFIG
- The exact path of Google Test's 'gtest-config' script.
- GTEST_CPPFLAGS
- C-like preprocessor flags for Google Test.
- GTEST_CXXFLAGS
- C++ compile flags for Google Test.
- GTEST_LDFLAGS
- Linker path and option flags for Google Test.
- GTEST_LIBS Library linking flags for Google Test.
- GTEST_VERSION
- The version of Google Test available.
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <googlemock@googlegroups.com>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-Google C++ Mocking Framework configure 1.6.0
-generated by GNU Autoconf 2.65
-
-Copyright (C) 2009 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by Google C++ Mocking Framework $as_me 1.6.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Provide various options to initialize the Autoconf and configure processes.
-
-
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-ac_config_headers="$ac_config_headers build-aux/config.h"
-
-ac_config_files="$ac_config_files Makefile"
-
-ac_config_files="$ac_config_files scripts/gmock-config"
-
-
-# Initialize Automake with various options. We require at least v1.9, prevent
-# pedantic complaints about package files, and enable various distribution
-# targets.
-am__api_version='1.11'
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
- done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
- *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
- if test "${ac_cv_path_mkdir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in mkdir gmkdir; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
- 'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
- break 3;;
- esac
- done
- done
- done
-IFS=$as_save_IFS
-
-fi
-
- test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
- MKDIR_P="$ac_cv_path_mkdir -p"
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for MKDIR_P within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- MKDIR_P="$ac_install_sh -d"
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- am__isrc=' -I$(srcdir)'
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='gmock'
- VERSION='1.6.0'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-# Check for programs used in building Google Test.
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-depcc="$CC" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GXX=yes
-else
- GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-else
- CXXFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CXX" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.2.6b'
-macro_revision='1.3017'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DUMPBIN=$ac_ct_DUMPBIN
- fi
-fi
-
-
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4961: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:4964: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:4967: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[4-9]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[3-9]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 6173 "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_cc_needs_belf=yes
-else
- lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-
- case $host_os in
- rhapsody* | darwin*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DSYMUTIL"; then
- ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
- ac_ct_DSYMUTIL=$DSYMUTIL
- # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DSYMUTIL"; then
- ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DSYMUTIL" = x; then
- DSYMUTIL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DSYMUTIL=$ac_ct_DSYMUTIL
- fi
-else
- DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NMEDIT"; then
- ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
- ac_ct_NMEDIT=$NMEDIT
- # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NMEDIT"; then
- ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NMEDIT" = x; then
- NMEDIT=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- NMEDIT=$ac_ct_NMEDIT
- fi
-else
- NMEDIT="$ac_cv_prog_NMEDIT"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LIPO"; then
- ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LIPO"; then
- ac_ct_LIPO=$LIPO
- # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LIPO"; then
- ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LIPO" = x; then
- LIPO=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LIPO=$ac_ct_LIPO
- fi
-else
- LIPO="$ac_cv_prog_LIPO"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL"; then
- ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
- ac_ct_OTOOL=$OTOOL
- # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL"; then
- ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL" = x; then
- OTOOL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL=$ac_ct_OTOOL
- fi
-else
- OTOOL="$ac_cv_prog_OTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL64"; then
- ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
- ac_ct_OTOOL64=$OTOOL64
- # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL64"; then
- ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL64" = x; then
- OTOOL64=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL64=$ac_ct_OTOOL64
- fi
-else
- OTOOL64="$ac_cv_prog_OTOOL64"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&5
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_ld_exported_symbols_list=yes
-else
- lt_cv_ld_exported_symbols_list=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
- case $host_os in
- rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GXX=yes
-else
- GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-else
- CXXFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-depcc="$CXX" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
- CXXCPP=$ac_cv_prog_CXXCPP
-else
- ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-_lt_caught_CXX_error=yes; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-else
- _lt_caught_CXX_error=yes
-fi
-
-
-
-
-
-# Set options
-
-
-
- enable_dlopen=no
-
-
- enable_win32_dll=no
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
- withval=$with_pic; pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
- # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
- enableval=$enable_fast_install; p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_fast_install=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8226: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:8230: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='--shared'
- lt_prog_compiler_static='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-qpic'
- lt_prog_compiler_static='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8565: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:8569: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works=yes
- fi
- else
- lt_cv_prog_compiler_static_works=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8670: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:8674: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8725: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:8729: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- compiler_needs_object=no
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_direct_absolute=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu)
- link_all_deplibs=no
- ;;
- esac
-
- ld_shlibs=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- whole_archive_flag_spec=
- tmp_sharedflag='--shared' ;;
- xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld='-rpath $libdir'
- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = no; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- link_all_deplibs=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- export_dynamic_flag_spec='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
- ;;
-
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-
- else
- ld_shlibs=no
- fi
-
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo(void) {}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[lt_foo]++; }
- if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[4-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_shl_load=yes
-else
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_svld_dlopen=yes
-else
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_dld_link=yes
-else
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 11109 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 11205 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report which library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
-
-
-
-
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-compiler_needs_object_CXX=no
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_direct_absolute_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-inherit_rpath_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
- # save warnings/boilerplate of simple test code
- ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
- ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- compiler_CXX=$CC
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
- else
- lt_prog_compiler_no_builtin_flag_CXX=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_CXX=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
- ld_shlibs_CXX=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds_CXX=''
- hardcode_direct_CXX=yes
- hardcode_direct_absolute_CXX=yes
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- file_list_spec_CXX='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct_CXX=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L_CXX=yes
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- hardcode_libdir_separator_CXX=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- export_dynamic_flag_spec_CXX='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- always_export_symbols_CXX=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag_CXX='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' ${wl}-bernotok'
- allow_undefined_flag_CXX=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_CXX='$convenience'
- archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag_CXX=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- allow_undefined_flag_CXX=unsupported
- always_export_symbols_CXX=no
- enable_shared_with_static_runtimes_CXX=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc_CXX=no
- hardcode_direct_CXX=no
- hardcode_automatic_CXX=yes
- hardcode_shlibpath_var_CXX=unsupported
- whole_archive_flag_spec_CXX=''
- link_all_deplibs_CXX=yes
- allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-
- else
- ld_shlibs_CXX=no
- fi
-
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- freebsd[12]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- ld_shlibs_CXX=no
- ;;
-
- freebsd-elf*)
- archive_cmds_need_lc_CXX=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- ld_shlibs_CXX=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='${wl}-E'
- hardcode_direct_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- export_dynamic_flag_spec_CXX='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- ;;
- *)
- hardcode_direct_CXX=yes
- hardcode_direct_absolute_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- interix[3-9]*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- link_all_deplibs_CXX=yes
- ;;
- esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- inherit_rpath_CXX=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
- prelink_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- old_archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- xl*)
- # IBM XL 8.0 on PPC, with GNU ld
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object_CXX=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- ld_shlibs_CXX=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- ld_shlibs_CXX=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- hardcode_direct_absolute_CXX=yes
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- else
- ld_shlibs_CXX=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- cxx*)
- case $host in
- osf3*)
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- ;;
- esac
-
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- archive_cmds_need_lc_CXX=yes
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_shlibpath_var_CXX=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
- ;;
- esac
- link_all_deplibs_CXX=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='${wl}-z,text'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag_CXX='${wl}-z,text'
- allow_undefined_flag_CXX='${wl}-z,nodefs'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
-$as_echo "$ld_shlibs_CXX" >&6; }
- test "$ld_shlibs_CXX" = no && can_build_shared=no
-
- GCC_CXX="$GXX"
- LD_CXX="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- # Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-
-cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX="${prev}${p}"
- else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$postdeps_CXX"; then
- postdeps_CXX="${prev}${p}"
- else
- postdeps_CXX="${postdeps_CXX} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$predep_objects_CXX"; then
- predep_objects_CXX="$p"
- else
- predep_objects_CXX="$predep_objects_CXX $p"
- fi
- else
- if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX="$p"
- else
- postdep_objects_CXX="$postdep_objects_CXX $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix[3-9]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- predep_objects_CXX=
- postdep_objects_CXX=
- postdeps_CXX=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
- compiler_lib_search_dirs_CXX=
-if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_CXX='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- lt_prog_compiler_pic_CXX=
- ;;
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic_CXX=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic_CXX='-fPIC -shared'
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[4-9]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- else
- lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- lt_prog_compiler_pic_CXX='+Z'
- fi
- ;;
- aCC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_CXX='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fpic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- xlc* | xlC*)
- # IBM XL 8.0 on PPC
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-qpic'
- lt_prog_compiler_static_CXX='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- lt_prog_compiler_pic_CXX='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic_CXX='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- lt_prog_compiler_wl_CXX='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- lt_prog_compiler_pic_CXX='-pic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- lcc*)
- # Lucid
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- lt_prog_compiler_can_build_shared_CXX=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic_CXX=
- ;;
- *)
- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
-$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works_CXX=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13161: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:13165: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works_CXX=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
- case $lt_prog_compiler_pic_CXX in
- "" | " "*) ;;
- *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
- esac
-else
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works_CXX=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works_CXX=yes
- fi
- else
- lt_cv_prog_compiler_static_works_CXX=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
- :
-else
- lt_prog_compiler_static_CXX=
-fi
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13260: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:13264: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13312: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:13316: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix[4-9]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- export_symbols_cmds_CXX="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- linux* | k*bsd*-gnu)
- link_all_deplibs_CXX=no
- ;;
- *)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
- exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
-$as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-with_gnu_ld_CXX=$with_gnu_ld
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc_CXX=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds_CXX in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl_CXX
- pic_flag=$lt_prog_compiler_pic_CXX
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
- allow_undefined_flag_CXX=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- archive_cmds_need_lc_CXX=no
- else
- archive_cmds_need_lc_CXX=yes
- fi
- allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
-$as_echo "$archive_cmds_need_lc_CXX" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[4-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" ||
- test -n "$runpath_var_CXX" ||
- test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct_CXX" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
- test "$hardcode_minus_L_CXX" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action_CXX=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action_CXX=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action_CXX=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
-$as_echo "$hardcode_action_CXX" >&6; }
-
-if test "$hardcode_action_CXX" = relink ||
- test "$inherit_rpath_CXX" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
-
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-
-# TODO(chandlerc@google.com): Currently we aren't running the Python tests
-# against the interpreter detected by AM_PATH_PYTHON, and so we condition
-# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
-# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
-# hashbang.
-PYTHON= # We *do not* allow the user to specify a python interpreter
-# Extract the first word of "python", so it can be a program name with args.
-set dummy python; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PYTHON+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PYTHON in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON=":"
- ;;
-esac
-fi
-PYTHON=$ac_cv_path_PYTHON
-if test -n "$PYTHON"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
-$as_echo "$PYTHON" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "$PYTHON" != ":"; then :
- prog="import sys
-# split strings by '.' and convert to numeric. Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
-sys.exit(sys.hexversion < minverhex)"
- if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
- ($PYTHON -c "$prog") >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then :
- :
-else
- PYTHON=":"
-fi
-fi
- if test "$PYTHON" != ":"; then
- HAVE_PYTHON_TRUE=
- HAVE_PYTHON_FALSE='#'
-else
- HAVE_PYTHON_TRUE='#'
- HAVE_PYTHON_FALSE=
-fi
-
-
-# TODO(chandlerc@google.com) Check for the necessary system headers.
-
-# Configure pthreads.
-
-# Check whether --with-pthreads was given.
-if test "${with_pthreads+set}" = set; then :
- withval=$with_pthreads; with_pthreads=$withval
-else
- with_pthreads=check
-fi
-
-
-have_pthreads=no
-if test "x$with_pthreads" != "xno"; then :
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_join ();
-int
-main ()
-{
-return pthread_join ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- acx_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- case $flag in
- none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
- ;;
-
- -*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$acx_pthread_config"; then
- ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_acx_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
-fi
-fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- acx_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test "x$acx_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr=$attr; return attr;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- attr_name=$attr; break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
-
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
- flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- # More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
- for ac_prog in xlc_r cc_r
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
- else
- PTHREAD_CC=$CC
- fi
-
- # The next part tries to detect GCC inconsistency with -shared on some
- # architectures and systems. The problem is that in certain
- # configurations, when -shared is specified, GCC "forgets" to
- # internally use various flags which are still necessary.
-
- #
- # Prepare the flags
- #
- save_CFLAGS="$CFLAGS"
- save_LIBS="$LIBS"
- save_CC="$CC"
-
- # Try with the flags determined by the earlier checks.
- #
- # -Wl,-z,defs forces link-time symbol resolution, so that the
- # linking checks with -shared actually have any value
- #
- # FIXME: -fPIC is required for -shared on many architectures,
- # so we specify it here, but the right way would probably be to
- # properly detect whether it is actually required.
- CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CC="$PTHREAD_CC"
-
- # In order not to create several levels of indentation, we test
- # the value of "$done" until we find the cure or run out of ideas.
- done="no"
-
- # First, make sure the CFLAGS we added are actually accepted by our
- # compiler. If not (and OS X's ld, for instance, does not accept -z),
- # then we can't do this test.
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to check for GCC pthread/shared inconsistencies" >&5
-$as_echo_n "checking whether to check for GCC pthread/shared inconsistencies... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- fi
-
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -pthread is sufficient with -shared" >&5
-$as_echo_n "checking whether -pthread is sufficient with -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
-
- #
- # Linux gcc on some architectures such as mips/mipsel forgets
- # about -lpthread
- #
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lpthread fixes that" >&5
-$as_echo_n "checking whether -lpthread fixes that... " >&6; }
- LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
- #
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc_r fixes that" >&5
-$as_echo_n "checking whether -lc_r fixes that... " >&6; }
- LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- if test x"$done" = xno; then
- # OK, we have run out of ideas
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to determine how to use pthreads with shared libraries" >&5
-$as_echo "$as_me: WARNING: Impossible to determine how to use pthreads with shared libraries" >&2;}
-
- # so it's not safe to assume that we may use pthreads
- acx_pthread_ok=no
- fi
-
- CFLAGS="$save_CFLAGS"
- LIBS="$save_LIBS"
- CC="$save_CC"
-else
- PTHREAD_CC="$CC"
-fi
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-
- :
-else
- acx_pthread_ok=no
- if test "x$with_pthreads" != "xcheck"; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "--with-pthreads was specified, but unable to be used
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
- have_pthreads="$acx_pthread_ok"
-fi
- if test "x$have_pthreads" == "xyes"; then
- HAVE_PTHREADS_TRUE=
- HAVE_PTHREADS_FALSE='#'
-else
- HAVE_PTHREADS_TRUE='#'
- HAVE_PTHREADS_FALSE=
-fi
-
-
-
-
-# GoogleMock currently has hard dependencies upon GoogleTest above and beyond
-# running its own test suite, so we both provide our own version in
-# a subdirectory and provide some logic to use a custom version or a system
-# installed version.
-
-# Check whether --with-gtest was given.
-if test "${with_gtest+set}" = set; then :
- withval=$with_gtest;
-else
- with_gtest=yes
-fi
-
-# Check whether --enable-external-gtest was given.
-if test "${enable_external_gtest+set}" = set; then :
- enableval=$enable_external_gtest;
-else
- enable_external_gtest=yes
-fi
-
-if test "x$with_gtest" == "xno"; then :
- as_fn_error "Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard
-dependency upon GoogleTest to build, please provide a version, or allow
-GoogleMock to use any installed version and fall back upon its internal
-version." "$LINENO" 5
-fi
-
-# Setup various GTEST variables. TODO(chandlerc@google.com): When these are
-# used below, they should be used such that any pre-existing values always
-# trump values we set them to, so that they can be used to selectively override
-# details of the detection process.
-
-
-
-
-
-
-HAVE_BUILT_GTEST="no"
-
-GTEST_MIN_VERSION="1.6.0"
-
-if test "x${enable_external_gtest}" = "xyes"; then :
- # Begin filling in variables as we are able.
- if test "x${with_gtest}" != "xyes"; then :
- if test -x "${with_gtest}/scripts/gtest-config"; then :
- GTEST_CONFIG="${with_gtest}/scripts/gtest-config"
-else
- GTEST_CONFIG="${with_gtest}/bin/gtest-config"
-fi
- if test -x "${GTEST_CONFIG}"; then :
-
-else
- as_fn_error "Unable to locate either a built or installed Google Test at '${with_gtest}'." "$LINENO" 5
-
-fi
-fi
-
- if test -x "${GTEST_CONFIG}"; then :
-
-else
- # Extract the first word of "gtest-config", so it can be a program name with args.
-set dummy gtest-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GTEST_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $GTEST_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
-if test -n "$GTEST_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
-$as_echo "$GTEST_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
- if test -x "${GTEST_CONFIG}"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Google Test version >= ${GTEST_MIN_VERSION}" >&5
-$as_echo_n "checking for Google Test version >= ${GTEST_MIN_VERSION}... " >&6; }
- if ${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_BUILT_GTEST="yes"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-fi
-fi
-
-
-
-if test "x${HAVE_BUILT_GTEST}" = "xyes"; then :
- GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags`
- GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags`
- GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
- GTEST_LIBS=`${GTEST_CONFIG} --libs`
- GTEST_VERSION=`${GTEST_CONFIG} --version`
-else
- subdirs="$subdirs gtest"
-
- # GTEST_CONFIG needs to be executable both in a Makefile environmont and
- # in a shell script environment, so resolve an absolute path for it here.
- GTEST_CONFIG="`pwd -P`/gtest/scripts/gtest-config"
- GTEST_CPPFLAGS='-I$(top_srcdir)/gtest/include'
- GTEST_CXXFLAGS='-g'
- GTEST_LDFLAGS=''
- GTEST_LIBS='$(top_builddir)/gtest/lib/libgtest.la'
- GTEST_VERSION="${GTEST_MIN_VERSION}"
-fi
-
-# TODO(chandlerc@google.com) Check the types, structures, and other compiler
-# and architecture characteristics.
-
-# Output the generated files. No further autoconf macros may be used.
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
- if test -n "$EXEEXT"; then
- am__EXEEXT_TRUE=
- am__EXEEXT_FALSE='#'
-else
- am__EXEEXT_TRUE='#'
- am__EXEEXT_FALSE=
-fi
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
- as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${HAVE_PTHREADS_TRUE}" && test -z "${HAVE_PTHREADS_FALSE}"; then
- as_fn_error "conditional \"HAVE_PTHREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
- fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by Google C++ Mocking Framework $as_me 1.6.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <googlemock@googlegroups.com>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-Google C++ Mocking Framework config.status 1.6.0
-configured by $0, generated by GNU Autoconf 2.65,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2009 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
-LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-OBJDUMP \
-deplibs_check_method \
-file_magic_cmd \
-AR \
-AR_FLAGS \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
-lt_prog_compiler_pic \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-DSYMUTIL \
-NMEDIT \
-LIPO \
-OTOOL \
-OTOOL64 \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
-hardcode_libdir_separator \
-fix_srcfile_path \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-finish_eval \
-old_striplib \
-striplib \
-compiler_lib_search_dirs \
-predep_objects \
-postdep_objects \
-predeps \
-postdeps \
-compiler_lib_search_path \
-LD_CXX \
-compiler_CXX \
-lt_prog_compiler_no_builtin_flag_CXX \
-lt_prog_compiler_wl_CXX \
-lt_prog_compiler_pic_CXX \
-lt_prog_compiler_static_CXX \
-lt_cv_prog_compiler_c_o_CXX \
-export_dynamic_flag_spec_CXX \
-whole_archive_flag_spec_CXX \
-compiler_needs_object_CXX \
-with_gnu_ld_CXX \
-allow_undefined_flag_CXX \
-no_undefined_flag_CXX \
-hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
-hardcode_libdir_separator_CXX \
-fix_srcfile_path_CXX \
-exclude_expsyms_CXX \
-include_expsyms_CXX \
-file_list_spec_CXX \
-compiler_lib_search_dirs_CXX \
-predep_objects_CXX \
-postdep_objects_CXX \
-predeps_CXX \
-postdeps_CXX \
-compiler_lib_search_path_CXX; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
-old_archive_cmds_CXX \
-old_archive_from_new_cmds_CXX \
-old_archive_from_expsyms_cmds_CXX \
-archive_cmds_CXX \
-archive_expsym_cmds_CXX \
-module_cmds_CXX \
-module_expsym_cmds_CXX \
-export_symbols_cmds_CXX \
-prelink_cmds_CXX; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
- ;;
-esac
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'
-
-
-
-
-
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "build-aux/config.h") CONFIG_HEADERS="$CONFIG_HEADERS build-aux/config.h" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "scripts/gmock-config") CONFIG_FILES="$CONFIG_FILES scripts/gmock-config" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
-
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
- break
- elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
- ac_MKDIR_P=$MKDIR_P
- case $MKDIR_P in
- [\\/$]* | ?:[\\/]* ) ;;
- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
-
- case $ac_file$ac_mode in
- "scripts/gmock-config":F) chmod +x scripts/gmock-config ;;
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
- ;;
- "libtool":C)
-
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-# The names of the tagged configurations supported by this script.
-available_tags="CXX "
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# An object symbol dumper.
-OBJDUMP=$lt_OBJDUMP
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# Transform the output of nm in a C name address pair when lib prefix is needed.
-global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
-DSYMUTIL=$lt_DSYMUTIL
-
-# Tool to change global to local symbols on Mac OS X.
-NMEDIT=$lt_NMEDIT
-
-# Tool to manipulate fat objects and archives on Mac OS X.
-LIPO=$lt_LIPO
-
-# ldd/readelf like tool for Mach-O binaries on Mac OS X.
-OTOOL=$lt_OTOOL
-
-# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
-OTOOL64=$lt_OTOOL64
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects
-postdep_objects=$lt_postdep_objects
-predeps=$lt_predeps
-postdeps=$lt_postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1+=\$2"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1=\$$1\$2"
-}
-
-_LT_EOF
- ;;
- esac
-
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
-
- cat <<_LT_EOF >> "$ofile"
-
-# ### BEGIN LIBTOOL TAG CONFIG: CXX
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds_CXX
-
-# A language specific compiler.
-CC=$lt_compiler_CXX
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object_CXX
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld_CXX
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute_CXX
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic_CXX
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath_CXX
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_CXX
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds_CXX
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec_CXX
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects_CXX
-postdep_objects=$lt_postdep_objects_CXX
-predeps=$lt_predeps_CXX
-postdeps=$lt_postdeps_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# ### END LIBTOOL TAG CONFIG: CXX
-_LT_EOF
-
- ;;
-
- esac
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
-fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file, --srcdir, and --disable-option-checking arguments
- # so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- eval "set x $ac_configure_args"
- shift
- for ac_arg
- do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case $ac_arg in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
- | --c=*)
- ;;
- --config-cache | -C)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- ;;
- --disable-option-checking)
- ;;
- *)
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
- esac
- done
-
- # Always prepend --prefix to ensure using the same prefix
- # in subdir configurations.
- ac_arg="--prefix=$prefix"
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
- # Pass --silent
- if test "$silent" = yes; then
- ac_sub_configure_args="--silent $ac_sub_configure_args"
- fi
-
- # Always prepend --disable-option-checking to silence warnings, since
- # different subdirs can have different --enable and --with options.
- ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
- ac_popdir=`pwd`
- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- test -d "$srcdir/$ac_dir" || continue
-
- ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
- $as_echo "$ac_msg" >&6
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- cd "$ac_dir"
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- ac_sub_configure=$ac_srcdir/configure.gnu
- elif test -f "$ac_srcdir/configure"; then
- ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
- # Make the cache file name correct relative to the subdirectory.
- case $cache_file in
- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
- *) # Relative name.
- ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
- # The eval makes quoting arguments work.
- eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
- --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
- as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
- fi
-
- cd "$ac_popdir"
- done
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure.ac b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure.ac
deleted file mode 100644
index e8b65bdcd..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/configure.ac
+++ /dev/null
@@ -1,146 +0,0 @@
-m4_include(gtest/m4/acx_pthread.m4)
-
-AC_INIT([Google C++ Mocking Framework],
- [1.6.0],
- [googlemock@googlegroups.com],
- [gmock])
-
-# Provide various options to initialize the Autoconf and configure processes.
-AC_PREREQ([2.59])
-AC_CONFIG_SRCDIR([./COPYING])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_HEADERS([build-aux/config.h])
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
-
-# Initialize Automake with various options. We require at least v1.9, prevent
-# pedantic complaints about package files, and enable various distribution
-# targets.
-AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects])
-
-# Check for programs used in building Google Test.
-AC_PROG_CC
-AC_PROG_CXX
-AC_LANG([C++])
-AC_PROG_LIBTOOL
-
-# TODO(chandlerc@google.com): Currently we aren't running the Python tests
-# against the interpreter detected by AM_PATH_PYTHON, and so we condition
-# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
-# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
-# hashbang.
-PYTHON= # We *do not* allow the user to specify a python interpreter
-AC_PATH_PROG([PYTHON],[python],[:])
-AS_IF([test "$PYTHON" != ":"],
- [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])])
-AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"])
-
-# TODO(chandlerc@google.com) Check for the necessary system headers.
-
-# Configure pthreads.
-AC_ARG_WITH([pthreads],
- [AS_HELP_STRING([--with-pthreads],
- [use pthreads (default is yes)])],
- [with_pthreads=$withval],
- [with_pthreads=check])
-
-have_pthreads=no
-AS_IF([test "x$with_pthreads" != "xno"],
- [ACX_PTHREAD(
- [],
- [AS_IF([test "x$with_pthreads" != "xcheck"],
- [AC_MSG_FAILURE(
- [--with-pthreads was specified, but unable to be used])])])
- have_pthreads="$acx_pthread_ok"])
-AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_LIBS)
-
-# GoogleMock currently has hard dependencies upon GoogleTest above and beyond
-# running its own test suite, so we both provide our own version in
-# a subdirectory and provide some logic to use a custom version or a system
-# installed version.
-AC_ARG_WITH([gtest],
- [AS_HELP_STRING([--with-gtest],
- [Specifies how to find the gtest package. If no
- arguments are given, the default behavior, a
- system installed gtest will be used if present,
- and an internal version built otherwise. If a
- path is provided, the gtest built or installed at
- that prefix will be used.])],
- [],
- [with_gtest=yes])
-AC_ARG_ENABLE([external-gtest],
- [AS_HELP_STRING([--disable-external-gtest],
- [Disables any detection or use of a system
- installed or user provided gtest. Any option to
- '--with-gtest' is ignored. (Default is enabled.)])
- ], [], [enable_external_gtest=yes])
-AS_IF([test "x$with_gtest" == "xno"],
- [AC_MSG_ERROR([dnl
-Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard
-dependency upon GoogleTest to build, please provide a version, or allow
-GoogleMock to use any installed version and fall back upon its internal
-version.])])
-
-# Setup various GTEST variables. TODO(chandlerc@google.com): When these are
-# used below, they should be used such that any pre-existing values always
-# trump values we set them to, so that they can be used to selectively override
-# details of the detection process.
-AC_ARG_VAR([GTEST_CONFIG],
- [The exact path of Google Test's 'gtest-config' script.])
-AC_ARG_VAR([GTEST_CPPFLAGS],
- [C-like preprocessor flags for Google Test.])
-AC_ARG_VAR([GTEST_CXXFLAGS],
- [C++ compile flags for Google Test.])
-AC_ARG_VAR([GTEST_LDFLAGS],
- [Linker path and option flags for Google Test.])
-AC_ARG_VAR([GTEST_LIBS],
- [Library linking flags for Google Test.])
-AC_ARG_VAR([GTEST_VERSION],
- [The version of Google Test available.])
-HAVE_BUILT_GTEST="no"
-
-GTEST_MIN_VERSION="1.6.0"
-
-AS_IF([test "x${enable_external_gtest}" = "xyes"],
- [# Begin filling in variables as we are able.
- AS_IF([test "x${with_gtest}" != "xyes"],
- [AS_IF([test -x "${with_gtest}/scripts/gtest-config"],
- [GTEST_CONFIG="${with_gtest}/scripts/gtest-config"],
- [GTEST_CONFIG="${with_gtest}/bin/gtest-config"])
- AS_IF([test -x "${GTEST_CONFIG}"], [],
- [AC_MSG_ERROR([dnl
-Unable to locate either a built or installed Google Test at '${with_gtest}'.])
- ])])
-
- AS_IF([test -x "${GTEST_CONFIG}"], [],
- [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])])
- AS_IF([test -x "${GTEST_CONFIG}"],
- [AC_MSG_CHECKING([for Google Test version >= ${GTEST_MIN_VERSION}])
- AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}],
- [AC_MSG_RESULT([yes])
- HAVE_BUILT_GTEST="yes"],
- [AC_MSG_RESULT([no])])])])
-
-AS_IF([test "x${HAVE_BUILT_GTEST}" = "xyes"],
- [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags`
- GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags`
- GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
- GTEST_LIBS=`${GTEST_CONFIG} --libs`
- GTEST_VERSION=`${GTEST_CONFIG} --version`],
- [AC_CONFIG_SUBDIRS([gtest])
- # GTEST_CONFIG needs to be executable both in a Makefile environmont and
- # in a shell script environment, so resolve an absolute path for it here.
- GTEST_CONFIG="`pwd -P`/gtest/scripts/gtest-config"
- GTEST_CPPFLAGS='-I$(top_srcdir)/gtest/include'
- GTEST_CXXFLAGS='-g'
- GTEST_LDFLAGS=''
- GTEST_LIBS='$(top_builddir)/gtest/lib/libgtest.la'
- GTEST_VERSION="${GTEST_MIN_VERSION}"])
-
-# TODO(chandlerc@google.com) Check the types, structures, and other compiler
-# and architecture characteristics.
-
-# Output the generated files. No further autoconf macros may be used.
-AC_OUTPUT
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock-gtest-all.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock-gtest-all.cc
deleted file mode 100644
index f7ead682e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock-gtest-all.cc
+++ /dev/null
@@ -1,10554 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// Google C++ Testing Framework (Google Test)
-//
-// Sometimes it's desirable to build Google Test by compiling a single file.
-// This file serves this purpose.
-
-// This line ensures that gtest.h can be compiled on its own, even
-// when it's fused.
-#include "gtest/gtest.h"
-
-// The following lines pull in the real gtest *.cc files.
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Utilities for testing Google Test itself and code that uses Google Test
-// (e.g. frameworks built on top of Google Test).
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-
-
-namespace testing {
-
-// This helper class can be used to mock out Google Test failure reporting
-// so that we can test Google Test or code that builds on Google Test.
-//
-// An object of this class appends a TestPartResult object to the
-// TestPartResultArray object given in the constructor whenever a Google Test
-// failure is reported. It can either intercept only failures that are
-// generated in the same thread that created this object or it can intercept
-// all generated failures. The scope of this mock object can be controlled with
-// the second argument to the two arguments constructor.
-class GTEST_API_ ScopedFakeTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- // The two possible mocking modes of this object.
- enum InterceptMode {
- INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures.
- INTERCEPT_ALL_THREADS // Intercepts all failures.
- };
-
- // The c'tor sets this object as the test part result reporter used
- // by Google Test. The 'result' parameter specifies where to report the
- // results. This reporter will only catch failures generated in the current
- // thread. DEPRECATED
- explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);
-
- // Same as above, but you can choose the interception scope of this object.
- ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,
- TestPartResultArray* result);
-
- // The d'tor restores the previous test part result reporter.
- virtual ~ScopedFakeTestPartResultReporter();
-
- // Appends the TestPartResult object to the TestPartResultArray
- // received in the constructor.
- //
- // This method is from the TestPartResultReporterInterface
- // interface.
- virtual void ReportTestPartResult(const TestPartResult& result);
- private:
- void Init();
-
- const InterceptMode intercept_mode_;
- TestPartResultReporterInterface* old_reporter_;
- TestPartResultArray* const result_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter);
-};
-
-namespace internal {
-
-// A helper class for implementing EXPECT_FATAL_FAILURE() and
-// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring. If that's not the case, a
-// non-fatal failure will be generated.
-class GTEST_API_ SingleFailureChecker {
- public:
- // The constructor remembers the arguments.
- SingleFailureChecker(const TestPartResultArray* results,
- TestPartResult::Type type,
- const string& substr);
- ~SingleFailureChecker();
- private:
- const TestPartResultArray* const results_;
- const TestPartResult::Type type_;
- const string substr_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-// A set of macros for testing Google Test assertions or code that's expected
-// to generate Google Test fatal failures. It verifies that the given
-// statement will cause exactly one fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_FATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-// - 'statement' cannot reference local non-static variables or
-// non-static members of the current object.
-// - 'statement' cannot return a value.
-// - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works. The AcceptsMacroThatExpandsToUnprotectedComma test in
-// gtest_unittest.cc will fail to compile if we do that.
-#define EXPECT_FATAL_FAILURE(statement, substr) \
- do { \
- class GTestExpectFatalFailureHelper {\
- public:\
- static void Execute() { statement; }\
- };\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
- GTestExpectFatalFailureHelper::Execute();\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
- do { \
- class GTestExpectFatalFailureHelper {\
- public:\
- static void Execute() { statement; }\
- };\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ALL_THREADS, &gtest_failures);\
- GTestExpectFatalFailureHelper::Execute();\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-// A macro for testing Google Test assertions or code that's expected to
-// generate Google Test non-fatal failures. It asserts that the given
-// statement will cause exactly one non-fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// 'statement' is allowed to reference local variables and members of
-// the current object.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-// - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works. If we do that, the code won't compile when the user gives
-// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that
-// expands to code containing an unprotected comma. The
-// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc
-// catches that.
-//
-// For the same reason, we have to write
-// if (::testing::internal::AlwaysTrue()) { statement; }
-// instead of
-// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-// to avoid an MSVC warning on unreachable code.
-#define EXPECT_NONFATAL_FAILURE(statement, substr) \
- do {\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
- (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
- if (::testing::internal::AlwaysTrue()) { statement; }\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
- do {\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
- (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS,\
- &gtest_failures);\
- if (::testing::internal::AlwaysTrue()) { statement; }\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-
-#include <ctype.h>
-#include <math.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <wctype.h>
-
-#include <algorithm>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <vector>
-
-#if GTEST_OS_LINUX
-
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-
-# include <fcntl.h> // NOLINT
-# include <limits.h> // NOLINT
-# include <sched.h> // NOLINT
-// Declares vsnprintf(). This header is not available on Windows.
-# include <strings.h> // NOLINT
-# include <sys/mman.h> // NOLINT
-# include <sys/time.h> // NOLINT
-# include <unistd.h> // NOLINT
-# include <string>
-
-#elif GTEST_OS_SYMBIAN
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-
-#elif GTEST_OS_ZOS
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-
-// On z/OS we additionally need strings.h for strcasecmp.
-# include <strings.h> // NOLINT
-
-#elif GTEST_OS_WINDOWS_MOBILE // We are on Windows CE.
-
-# include <windows.h> // NOLINT
-
-#elif GTEST_OS_WINDOWS // We are on Windows proper.
-
-# include <io.h> // NOLINT
-# include <sys/timeb.h> // NOLINT
-# include <sys/types.h> // NOLINT
-# include <sys/stat.h> // NOLINT
-
-# if GTEST_OS_WINDOWS_MINGW
-// MinGW has gettimeofday() but not _ftime64().
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-// TODO(kenton@google.com): There are other ways to get the time on
-// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW
-// supports these. consider using them instead.
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-# endif // GTEST_OS_WINDOWS_MINGW
-
-// cpplint thinks that the header is already included, so we want to
-// silence it.
-# include <windows.h> // NOLINT
-
-#else
-
-// Assume other platforms have gettimeofday().
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-
-// cpplint thinks that the header is already included, so we want to
-// silence it.
-# include <sys/time.h> // NOLINT
-# include <unistd.h> // NOLINT
-
-#endif // GTEST_OS_LINUX
-
-#if GTEST_HAS_EXCEPTIONS
-# include <stdexcept>
-#endif
-
-#if GTEST_CAN_STREAM_RESULTS_
-# include <arpa/inet.h> // NOLINT
-# include <netdb.h> // NOLINT
-#endif
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Utility functions and classes used by the Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// This file contains purely Google Test's internal implementation. Please
-// DO NOT #INCLUDE IT IN A USER PROGRAM.
-
-#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_
-#define GTEST_SRC_GTEST_INTERNAL_INL_H_
-
-// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is
-// part of Google Test's implementation; otherwise it's undefined.
-#if !GTEST_IMPLEMENTATION_
-// A user is trying to include this from his code - just say no.
-# error "gtest-internal-inl.h is part of Google Test's internal implementation."
-# error "It must not be included except by Google Test itself."
-#endif // GTEST_IMPLEMENTATION_
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif // !_WIN32_WCE
-#include <stddef.h>
-#include <stdlib.h> // For strtoll/_strtoul64/malloc/free.
-#include <string.h> // For memmove.
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-
-#if GTEST_OS_WINDOWS
-# include <windows.h> // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-
-namespace testing {
-
-// Declares the flags.
-//
-// We don't want the users to modify this flag in the code, but want
-// Google Test's own unit tests to be able to access it. Therefore we
-// declare it here as opposed to in gtest.h.
-GTEST_DECLARE_bool_(death_test_use_fork);
-
-namespace internal {
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library. This is solely for testing GetTestTypeId().
-GTEST_API_ extern const TypeId kTestTypeIdInGoogleTest;
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests";
-const char kBreakOnFailureFlag[] = "break_on_failure";
-const char kCatchExceptionsFlag[] = "catch_exceptions";
-const char kColorFlag[] = "color";
-const char kFilterFlag[] = "filter";
-const char kListTestsFlag[] = "list_tests";
-const char kOutputFlag[] = "output";
-const char kPrintTimeFlag[] = "print_time";
-const char kRandomSeedFlag[] = "random_seed";
-const char kRepeatFlag[] = "repeat";
-const char kShuffleFlag[] = "shuffle";
-const char kStackTraceDepthFlag[] = "stack_trace_depth";
-const char kStreamResultToFlag[] = "stream_result_to";
-const char kThrowOnFailureFlag[] = "throw_on_failure";
-
-// A valid random seed must be in [1, kMaxRandomSeed].
-const int kMaxRandomSeed = 99999;
-
-// g_help_flag is true iff the --help flag or an equivalent form is
-// specified on the command line.
-GTEST_API_ extern bool g_help_flag;
-
-// Returns the current time in milliseconds.
-GTEST_API_ TimeInMillis GetTimeInMillis();
-
-// Returns true iff Google Test should use colors in the output.
-GTEST_API_ bool ShouldUseColor(bool stdout_is_tty);
-
-// Formats the given time in milliseconds as seconds.
-GTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms);
-
-// Parses a string for an Int32 flag, in the form of "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-GTEST_API_ bool ParseInt32Flag(
- const char* str, const char* flag, Int32* value);
-
-// Returns a random seed in range [1, kMaxRandomSeed] based on the
-// given --gtest_random_seed flag value.
-inline int GetRandomSeedFromFlag(Int32 random_seed_flag) {
- const unsigned int raw_seed = (random_seed_flag == 0) ?
- static_cast<unsigned int>(GetTimeInMillis()) :
- static_cast<unsigned int>(random_seed_flag);
-
- // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
- // it's easy to type.
- const int normalized_seed =
- static_cast<int>((raw_seed - 1U) %
- static_cast<unsigned int>(kMaxRandomSeed)) + 1;
- return normalized_seed;
-}
-
-// Returns the first valid random seed after 'seed'. The behavior is
-// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is
-// considered to be 1.
-inline int GetNextRandomSeed(int seed) {
- GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
- << "Invalid random seed " << seed << " - must be in [1, "
- << kMaxRandomSeed << "].";
- const int next_seed = seed + 1;
- return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
-}
-
-// This class saves the values of all Google Test flags in its c'tor, and
-// restores them in its d'tor.
-class GTestFlagSaver {
- public:
- // The c'tor.
- GTestFlagSaver() {
- also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests);
- break_on_failure_ = GTEST_FLAG(break_on_failure);
- catch_exceptions_ = GTEST_FLAG(catch_exceptions);
- color_ = GTEST_FLAG(color);
- death_test_style_ = GTEST_FLAG(death_test_style);
- death_test_use_fork_ = GTEST_FLAG(death_test_use_fork);
- filter_ = GTEST_FLAG(filter);
- internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);
- list_tests_ = GTEST_FLAG(list_tests);
- output_ = GTEST_FLAG(output);
- print_time_ = GTEST_FLAG(print_time);
- random_seed_ = GTEST_FLAG(random_seed);
- repeat_ = GTEST_FLAG(repeat);
- shuffle_ = GTEST_FLAG(shuffle);
- stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);
- stream_result_to_ = GTEST_FLAG(stream_result_to);
- throw_on_failure_ = GTEST_FLAG(throw_on_failure);
- }
-
- // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS.
- ~GTestFlagSaver() {
- GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;
- GTEST_FLAG(break_on_failure) = break_on_failure_;
- GTEST_FLAG(catch_exceptions) = catch_exceptions_;
- GTEST_FLAG(color) = color_;
- GTEST_FLAG(death_test_style) = death_test_style_;
- GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;
- GTEST_FLAG(filter) = filter_;
- GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;
- GTEST_FLAG(list_tests) = list_tests_;
- GTEST_FLAG(output) = output_;
- GTEST_FLAG(print_time) = print_time_;
- GTEST_FLAG(random_seed) = random_seed_;
- GTEST_FLAG(repeat) = repeat_;
- GTEST_FLAG(shuffle) = shuffle_;
- GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;
- GTEST_FLAG(stream_result_to) = stream_result_to_;
- GTEST_FLAG(throw_on_failure) = throw_on_failure_;
- }
- private:
- // Fields for saving the original values of flags.
- bool also_run_disabled_tests_;
- bool break_on_failure_;
- bool catch_exceptions_;
- String color_;
- String death_test_style_;
- bool death_test_use_fork_;
- String filter_;
- String internal_run_death_test_;
- bool list_tests_;
- String output_;
- bool print_time_;
- bool pretty_;
- internal::Int32 random_seed_;
- internal::Int32 repeat_;
- bool shuffle_;
- internal::Int32 stack_trace_depth_;
- String stream_result_to_;
- bool throw_on_failure_;
-} GTEST_ATTRIBUTE_UNUSED_;
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// The output buffer str must containt at least 32 characters.
-// The function returns the address of the output buffer.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'.
-GTEST_API_ char* CodePointToUtf8(UInt32 code_point, char* str);
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)
-// UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-GTEST_API_ String WideStringToUtf8(const wchar_t* str, int num_chars);
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded();
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (e.g., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-GTEST_API_ bool ShouldShard(const char* total_shards_str,
- const char* shard_index_str,
- bool in_subprocess_for_death_test);
-
-// Parses the environment variable var as an Int32. If it is unset,
-// returns default_val. If it is not an Int32, prints an error and
-// and aborts.
-GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val);
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true iff the test should be run on this shard. The test id is
-// some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-GTEST_API_ bool ShouldRunTestOnShard(
- int total_shards, int shard_index, int test_id);
-
-// STL container utilities.
-
-// Returns the number of elements in the given container that satisfy
-// the given predicate.
-template <class Container, typename Predicate>
-inline int CountIf(const Container& c, Predicate predicate) {
- // Implemented as an explicit loop since std::count_if() in libCstd on
- // Solaris has a non-standard signature.
- int count = 0;
- for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
- if (predicate(*it))
- ++count;
- }
- return count;
-}
-
-// Applies a function/functor to each element in the container.
-template <class Container, typename Functor>
-void ForEach(const Container& c, Functor functor) {
- std::for_each(c.begin(), c.end(), functor);
-}
-
-// Returns the i-th element of the vector, or default_value if i is not
-// in range [0, v.size()).
-template <typename E>
-inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
- return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];
-}
-
-// Performs an in-place shuffle of a range of the vector's elements.
-// 'begin' and 'end' are element indices as an STL-style range;
-// i.e. [begin, end) are shuffled, where 'end' == size() means to
-// shuffle to the end of the vector.
-template <typename E>
-void ShuffleRange(internal::Random* random, int begin, int end,
- std::vector<E>* v) {
- const int size = static_cast<int>(v->size());
- GTEST_CHECK_(0 <= begin && begin <= size)
- << "Invalid shuffle range start " << begin << ": must be in range [0, "
- << size << "].";
- GTEST_CHECK_(begin <= end && end <= size)
- << "Invalid shuffle range finish " << end << ": must be in range ["
- << begin << ", " << size << "].";
-
- // Fisher-Yates shuffle, from
- // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle
- for (int range_width = end - begin; range_width >= 2; range_width--) {
- const int last_in_range = begin + range_width - 1;
- const int selected = begin + random->Generate(range_width);
- std::swap((*v)[selected], (*v)[last_in_range]);
- }
-}
-
-// Performs an in-place shuffle of the vector's elements.
-template <typename E>
-inline void Shuffle(internal::Random* random, std::vector<E>* v) {
- ShuffleRange(random, 0, static_cast<int>(v->size()), v);
-}
-
-// A function for deleting an object. Handy for being used as a
-// functor.
-template <typename T>
-static void Delete(T* x) {
- delete x;
-}
-
-// A predicate that checks the key of a TestProperty against a known key.
-//
-// TestPropertyKeyIs is copyable.
-class TestPropertyKeyIs {
- public:
- // Constructor.
- //
- // TestPropertyKeyIs has NO default constructor.
- explicit TestPropertyKeyIs(const char* key)
- : key_(key) {}
-
- // Returns true iff the test name of test property matches on key_.
- bool operator()(const TestProperty& test_property) const {
- return String(test_property.key()).Compare(key_) == 0;
- }
-
- private:
- String key_;
-};
-
-// Class UnitTestOptions.
-//
-// This class contains functions for processing options the user
-// specifies when running the tests. It has only static members.
-//
-// In most cases, the user can specify an option using either an
-// environment variable or a command line flag. E.g. you can set the
-// test filter using either GTEST_FILTER or --gtest_filter. If both
-// the variable and the flag are present, the latter overrides the
-// former.
-class GTEST_API_ UnitTestOptions {
- public:
- // Functions for processing the gtest_output flag.
-
- // Returns the output format, or "" for normal printed output.
- static String GetOutputFormat();
-
- // Returns the absolute path of the requested output file, or the
- // default (test_detail.xml in the original working directory) if
- // none was explicitly specified.
- static String GetAbsolutePathToOutputFile();
-
- // Functions for processing the gtest_filter flag.
-
- // Returns true iff the wildcard pattern matches the string. The
- // first ':' or '\0' character in pattern marks the end of it.
- //
- // This recursive algorithm isn't very efficient, but is clear and
- // works well enough for matching test names, which are short.
- static bool PatternMatchesString(const char *pattern, const char *str);
-
- // Returns true iff the user-specified filter matches the test case
- // name and the test name.
- static bool FilterMatchesTest(const String &test_case_name,
- const String &test_name);
-
-#if GTEST_OS_WINDOWS
- // Function for supporting the gtest_catch_exception flag.
-
- // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
- // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
- // This function is useful as an __except condition.
- static int GTestShouldProcessSEH(DWORD exception_code);
-#endif // GTEST_OS_WINDOWS
-
- // Returns true if "name" matches the ':' separated list of glob-style
- // filters in "filter".
- static bool MatchesFilter(const String& name, const char* filter);
-};
-
-// Returns the current application's name, removing directory path if that
-// is present. Used by UnitTestOptions::GetOutputFile.
-GTEST_API_ FilePath GetCurrentExecutableName();
-
-// The role interface for getting the OS stack trace as a string.
-class OsStackTraceGetterInterface {
- public:
- OsStackTraceGetterInterface() {}
- virtual ~OsStackTraceGetterInterface() {}
-
- // Returns the current OS stack trace as a String. Parameters:
- //
- // max_depth - the maximum number of stack frames to be included
- // in the trace.
- // skip_count - the number of top frames to be skipped; doesn't count
- // against max_depth.
- virtual String CurrentStackTrace(int max_depth, int skip_count) = 0;
-
- // UponLeavingGTest() should be called immediately before Google Test calls
- // user code. It saves some information about the current stack that
- // CurrentStackTrace() will use to find and hide Google Test stack frames.
- virtual void UponLeavingGTest() = 0;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface);
-};
-
-// A working implementation of the OsStackTraceGetterInterface interface.
-class OsStackTraceGetter : public OsStackTraceGetterInterface {
- public:
- OsStackTraceGetter() : caller_frame_(NULL) {}
- virtual String CurrentStackTrace(int max_depth, int skip_count);
- virtual void UponLeavingGTest();
-
- // This string is inserted in place of stack frames that are part of
- // Google Test's implementation.
- static const char* const kElidedFramesMarker;
-
- private:
- Mutex mutex_; // protects all internal state
-
- // We save the stack frame below the frame that calls user code.
- // We do this because the address of the frame immediately below
- // the user code changes between the call to UponLeavingGTest()
- // and any calls to CurrentStackTrace() from within the user code.
- void* caller_frame_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter);
-};
-
-// Information about a Google Test trace point.
-struct TraceInfo {
- const char* file;
- int line;
- String message;
-};
-
-// This is the default global test part result reporter used in UnitTestImpl.
-// This class should only be used by UnitTestImpl.
-class DefaultGlobalTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);
- // Implements the TestPartResultReporterInterface. Reports the test part
- // result in the current test.
- virtual void ReportTestPartResult(const TestPartResult& result);
-
- private:
- UnitTestImpl* const unit_test_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter);
-};
-
-// This is the default per thread test part result reporter used in
-// UnitTestImpl. This class should only be used by UnitTestImpl.
-class DefaultPerThreadTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);
- // Implements the TestPartResultReporterInterface. The implementation just
- // delegates to the current global test part result reporter of *unit_test_.
- virtual void ReportTestPartResult(const TestPartResult& result);
-
- private:
- UnitTestImpl* const unit_test_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter);
-};
-
-// The private implementation of the UnitTest class. We don't protect
-// the methods under a mutex, as this class is not accessible by a
-// user and the UnitTest class that delegates work to this class does
-// proper locking.
-class GTEST_API_ UnitTestImpl {
- public:
- explicit UnitTestImpl(UnitTest* parent);
- virtual ~UnitTestImpl();
-
- // There are two different ways to register your own TestPartResultReporter.
- // You can register your own repoter to listen either only for test results
- // from the current thread or for results from all threads.
- // By default, each per-thread test result repoter just passes a new
- // TestPartResult to the global test result reporter, which registers the
- // test part result for the currently running test.
-
- // Returns the global test part result reporter.
- TestPartResultReporterInterface* GetGlobalTestPartResultReporter();
-
- // Sets the global test part result reporter.
- void SetGlobalTestPartResultReporter(
- TestPartResultReporterInterface* reporter);
-
- // Returns the test part result reporter for the current thread.
- TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();
-
- // Sets the test part result reporter for the current thread.
- void SetTestPartResultReporterForCurrentThread(
- TestPartResultReporterInterface* reporter);
-
- // Gets the number of successful test cases.
- int successful_test_case_count() const;
-
- // Gets the number of failed test cases.
- int failed_test_case_count() const;
-
- // Gets the number of all test cases.
- int total_test_case_count() const;
-
- // Gets the number of all test cases that contain at least one test
- // that should run.
- int test_case_to_run_count() const;
-
- // Gets the number of successful tests.
- int successful_test_count() const;
-
- // Gets the number of failed tests.
- int failed_test_count() const;
-
- // Gets the number of disabled tests.
- int disabled_test_count() const;
-
- // Gets the number of all tests.
- int total_test_count() const;
-
- // Gets the number of tests that should run.
- int test_to_run_count() const;
-
- // Gets the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns true iff the unit test passed (i.e. all test cases passed).
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the unit test failed (i.e. some test case failed
- // or something outside of all tests failed).
- bool Failed() const {
- return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
- }
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- const TestCase* GetTestCase(int i) const {
- const int index = GetElementOr(test_case_indices_, i, -1);
- return index < 0 ? NULL : test_cases_[i];
- }
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- TestCase* GetMutableTestCase(int i) {
- const int index = GetElementOr(test_case_indices_, i, -1);
- return index < 0 ? NULL : test_cases_[index];
- }
-
- // Provides access to the event listener list.
- TestEventListeners* listeners() { return &listeners_; }
-
- // Returns the TestResult for the test that's currently running, or
- // the TestResult for the ad hoc test if no test is running.
- TestResult* current_test_result();
-
- // Returns the TestResult for the ad hoc test.
- const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }
-
- // Sets the OS stack trace getter.
- //
- // Does nothing if the input and the current OS stack trace getter
- // are the same; otherwise, deletes the old getter and makes the
- // input the current getter.
- void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);
-
- // Returns the current OS stack trace getter if it is not NULL;
- // otherwise, creates an OsStackTraceGetter, makes it the current
- // getter, and returns it.
- OsStackTraceGetterInterface* os_stack_trace_getter();
-
- // Returns the current OS stack trace as a String.
- //
- // The maximum number of stack frames to be included is specified by
- // the gtest_stack_trace_depth flag. The skip_count parameter
- // specifies the number of top frames to be skipped, which doesn't
- // count against the number of frames to be included.
- //
- // For example, if Foo() calls Bar(), which in turn calls
- // CurrentOsStackTraceExceptTop(1), Foo() will be included in the
- // trace but Bar() and CurrentOsStackTraceExceptTop() won't.
- String CurrentOsStackTraceExceptTop(int skip_count);
-
- // Finds and returns a TestCase with the given name. If one doesn't
- // exist, creates one and returns it.
- //
- // Arguments:
- //
- // test_case_name: name of the test case
- // type_param: the name of the test's type parameter, or NULL if
- // this is not a typed or a type-parameterized test.
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- TestCase* GetTestCase(const char* test_case_name,
- const char* type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc);
-
- // Adds a TestInfo to the unit test.
- //
- // Arguments:
- //
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- // test_info: the TestInfo object
- void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc,
- TestInfo* test_info) {
- // In order to support thread-safe death tests, we need to
- // remember the original working directory when the test program
- // was first invoked. We cannot do this in RUN_ALL_TESTS(), as
- // the user may have changed the current directory before calling
- // RUN_ALL_TESTS(). Therefore we capture the current directory in
- // AddTestInfo(), which is called to register a TEST or TEST_F
- // before main() is reached.
- if (original_working_dir_.IsEmpty()) {
- original_working_dir_.Set(FilePath::GetCurrentDir());
- GTEST_CHECK_(!original_working_dir_.IsEmpty())
- << "Failed to get the current working directory.";
- }
-
- GetTestCase(test_info->test_case_name(),
- test_info->type_param(),
- set_up_tc,
- tear_down_tc)->AddTestInfo(test_info);
- }
-
-#if GTEST_HAS_PARAM_TEST
- // Returns ParameterizedTestCaseRegistry object used to keep track of
- // value-parameterized tests and instantiate and register them.
- internal::ParameterizedTestCaseRegistry& parameterized_test_registry() {
- return parameterized_test_registry_;
- }
-#endif // GTEST_HAS_PARAM_TEST
-
- // Sets the TestCase object for the test that's currently running.
- void set_current_test_case(TestCase* a_current_test_case) {
- current_test_case_ = a_current_test_case;
- }
-
- // Sets the TestInfo object for the test that's currently running. If
- // current_test_info is NULL, the assertion results will be stored in
- // ad_hoc_test_result_.
- void set_current_test_info(TestInfo* a_current_test_info) {
- current_test_info_ = a_current_test_info;
- }
-
- // Registers all parameterized tests defined using TEST_P and
- // INSTANTIATE_TEST_CASE_P, creating regular tests for each test/parameter
- // combination. This method can be called more then once; it has guards
- // protecting from registering the tests more then once. If
- // value-parameterized tests are disabled, RegisterParameterizedTests is
- // present but does nothing.
- void RegisterParameterizedTests();
-
- // Runs all tests in this UnitTest object, prints the result, and
- // returns true if all tests are successful. If any exception is
- // thrown during a test, this test is considered to be failed, but
- // the rest of the tests will still be run.
- bool RunAllTests();
-
- // Clears the results of all tests, except the ad hoc tests.
- void ClearNonAdHocTestResult() {
- ForEach(test_cases_, TestCase::ClearTestCaseResult);
- }
-
- // Clears the results of ad-hoc test assertions.
- void ClearAdHocTestResult() {
- ad_hoc_test_result_.Clear();
- }
-
- enum ReactionToSharding {
- HONOR_SHARDING_PROTOCOL,
- IGNORE_SHARDING_PROTOCOL
- };
-
- // Matches the full name of each test against the user-specified
- // filter to decide whether the test should run, then records the
- // result in each TestCase and TestInfo object.
- // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests
- // based on sharding variables in the environment.
- // Returns the number of tests that should run.
- int FilterTests(ReactionToSharding shard_tests);
-
- // Prints the names of the tests matching the user-specified filter flag.
- void ListTestsMatchingFilter();
-
- const TestCase* current_test_case() const { return current_test_case_; }
- TestInfo* current_test_info() { return current_test_info_; }
- const TestInfo* current_test_info() const { return current_test_info_; }
-
- // Returns the vector of environments that need to be set-up/torn-down
- // before/after the tests are run.
- std::vector<Environment*>& environments() { return environments_; }
-
- // Getters for the per-thread Google Test trace stack.
- std::vector<TraceInfo>& gtest_trace_stack() {
- return *(gtest_trace_stack_.pointer());
- }
- const std::vector<TraceInfo>& gtest_trace_stack() const {
- return gtest_trace_stack_.get();
- }
-
-#if GTEST_HAS_DEATH_TEST
- void InitDeathTestSubprocessControlInfo() {
- internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
- }
- // Returns a pointer to the parsed --gtest_internal_run_death_test
- // flag, or NULL if that flag was not specified.
- // This information is useful only in a death test child process.
- // Must not be called before a call to InitGoogleTest.
- const InternalRunDeathTestFlag* internal_run_death_test_flag() const {
- return internal_run_death_test_flag_.get();
- }
-
- // Returns a pointer to the current death test factory.
- internal::DeathTestFactory* death_test_factory() {
- return death_test_factory_.get();
- }
-
- void SuppressTestEventsIfInSubprocess();
-
- friend class ReplaceDeathTestFactory;
-#endif // GTEST_HAS_DEATH_TEST
-
- // Initializes the event listener performing XML output as specified by
- // UnitTestOptions. Must not be called before InitGoogleTest.
- void ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
- // Initializes the event listener for streaming test results to a socket.
- // Must not be called before InitGoogleTest.
- void ConfigureStreamingOutput();
-#endif
-
- // Performs initialization dependent upon flag values obtained in
- // ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to
- // ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest
- // this function is also called from RunAllTests. Since this function can be
- // called more than once, it has to be idempotent.
- void PostFlagParsingInit();
-
- // Gets the random seed used at the start of the current test iteration.
- int random_seed() const { return random_seed_; }
-
- // Gets the random number generator.
- internal::Random* random() { return &random_; }
-
- // Shuffles all test cases, and the tests within each test case,
- // making sure that death tests are still run first.
- void ShuffleTests();
-
- // Restores the test cases and tests to their order before the first shuffle.
- void UnshuffleTests();
-
- // Returns the value of GTEST_FLAG(catch_exceptions) at the moment
- // UnitTest::Run() starts.
- bool catch_exceptions() const { return catch_exceptions_; }
-
- private:
- friend class ::testing::UnitTest;
-
- // Used by UnitTest::Run() to capture the state of
- // GTEST_FLAG(catch_exceptions) at the moment it starts.
- void set_catch_exceptions(bool value) { catch_exceptions_ = value; }
-
- // The UnitTest object that owns this implementation object.
- UnitTest* const parent_;
-
- // The working directory when the first TEST() or TEST_F() was
- // executed.
- internal::FilePath original_working_dir_;
-
- // The default test part result reporters.
- DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;
- DefaultPerThreadTestPartResultReporter
- default_per_thread_test_part_result_reporter_;
-
- // Points to (but doesn't own) the global test part result reporter.
- TestPartResultReporterInterface* global_test_part_result_repoter_;
-
- // Protects read and write access to global_test_part_result_reporter_.
- internal::Mutex global_test_part_result_reporter_mutex_;
-
- // Points to (but doesn't own) the per-thread test part result reporter.
- internal::ThreadLocal<TestPartResultReporterInterface*>
- per_thread_test_part_result_reporter_;
-
- // The vector of environments that need to be set-up/torn-down
- // before/after the tests are run.
- std::vector<Environment*> environments_;
-
- // The vector of TestCases in their original order. It owns the
- // elements in the vector.
- std::vector<TestCase*> test_cases_;
-
- // Provides a level of indirection for the test case list to allow
- // easy shuffling and restoring the test case order. The i-th
- // element of this vector is the index of the i-th test case in the
- // shuffled order.
- std::vector<int> test_case_indices_;
-
-#if GTEST_HAS_PARAM_TEST
- // ParameterizedTestRegistry object used to register value-parameterized
- // tests.
- internal::ParameterizedTestCaseRegistry parameterized_test_registry_;
-
- // Indicates whether RegisterParameterizedTests() has been called already.
- bool parameterized_tests_registered_;
-#endif // GTEST_HAS_PARAM_TEST
-
- // Index of the last death test case registered. Initially -1.
- int last_death_test_case_;
-
- // This points to the TestCase for the currently running test. It
- // changes as Google Test goes through one test case after another.
- // When no test is running, this is set to NULL and Google Test
- // stores assertion results in ad_hoc_test_result_. Initially NULL.
- TestCase* current_test_case_;
-
- // This points to the TestInfo for the currently running test. It
- // changes as Google Test goes through one test after another. When
- // no test is running, this is set to NULL and Google Test stores
- // assertion results in ad_hoc_test_result_. Initially NULL.
- TestInfo* current_test_info_;
-
- // Normally, a user only writes assertions inside a TEST or TEST_F,
- // or inside a function called by a TEST or TEST_F. Since Google
- // Test keeps track of which test is current running, it can
- // associate such an assertion with the test it belongs to.
- //
- // If an assertion is encountered when no TEST or TEST_F is running,
- // Google Test attributes the assertion result to an imaginary "ad hoc"
- // test, and records the result in ad_hoc_test_result_.
- TestResult ad_hoc_test_result_;
-
- // The list of event listeners that can be used to track events inside
- // Google Test.
- TestEventListeners listeners_;
-
- // The OS stack trace getter. Will be deleted when the UnitTest
- // object is destructed. By default, an OsStackTraceGetter is used,
- // but the user can set this field to use a custom getter if that is
- // desired.
- OsStackTraceGetterInterface* os_stack_trace_getter_;
-
- // True iff PostFlagParsingInit() has been called.
- bool post_flag_parse_init_performed_;
-
- // The random number seed used at the beginning of the test run.
- int random_seed_;
-
- // Our random number generator.
- internal::Random random_;
-
- // How long the test took to run, in milliseconds.
- TimeInMillis elapsed_time_;
-
-#if GTEST_HAS_DEATH_TEST
- // The decomposed components of the gtest_internal_run_death_test flag,
- // parsed when RUN_ALL_TESTS is called.
- internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;
- internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_;
-#endif // GTEST_HAS_DEATH_TEST
-
- // A per-thread stack of traces created by the SCOPED_TRACE() macro.
- internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;
-
- // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests()
- // starts.
- bool catch_exceptions_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl);
-}; // class UnitTestImpl
-
-// Convenience function for accessing the global UnitTest
-// implementation object.
-inline UnitTestImpl* GetUnitTestImpl() {
- return UnitTest::GetInstance()->impl();
-}
-
-#if GTEST_USES_SIMPLE_RE
-
-// Internal helper functions for implementing the simple regular
-// expression matcher.
-GTEST_API_ bool IsInSet(char ch, const char* str);
-GTEST_API_ bool IsAsciiDigit(char ch);
-GTEST_API_ bool IsAsciiPunct(char ch);
-GTEST_API_ bool IsRepeat(char ch);
-GTEST_API_ bool IsAsciiWhiteSpace(char ch);
-GTEST_API_ bool IsAsciiWordChar(char ch);
-GTEST_API_ bool IsValidEscape(char ch);
-GTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch);
-GTEST_API_ bool ValidateRegex(const char* regex);
-GTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str);
-GTEST_API_ bool MatchRepetitionAndRegexAtHead(
- bool escaped, char ch, char repeat, const char* regex, const char* str);
-GTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str);
-
-#endif // GTEST_USES_SIMPLE_RE
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv);
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv);
-
-#if GTEST_HAS_DEATH_TEST
-
-// Returns the message describing the last system error, regardless of the
-// platform.
-GTEST_API_ String GetLastErrnoDescription();
-
-# if GTEST_OS_WINDOWS
-// Provides leak-safe Windows kernel handle ownership.
-class AutoHandle {
- public:
- AutoHandle() : handle_(INVALID_HANDLE_VALUE) {}
- explicit AutoHandle(HANDLE handle) : handle_(handle) {}
-
- ~AutoHandle() { Reset(); }
-
- HANDLE Get() const { return handle_; }
- void Reset() { Reset(INVALID_HANDLE_VALUE); }
- void Reset(HANDLE handle) {
- if (handle != handle_) {
- if (handle_ != INVALID_HANDLE_VALUE)
- ::CloseHandle(handle_);
- handle_ = handle;
- }
- }
-
- private:
- HANDLE handle_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle);
-};
-# endif // GTEST_OS_WINDOWS
-
-// Attempts to parse a string into a positive integer pointed to by the
-// number parameter. Returns true if that is possible.
-// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use
-// it here.
-template <typename Integer>
-bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
- // Fail fast if the given string does not begin with a digit;
- // this bypasses strtoXXX's "optional leading whitespace and plus
- // or minus sign" semantics, which are undesirable here.
- if (str.empty() || !IsDigit(str[0])) {
- return false;
- }
- errno = 0;
-
- char* end;
- // BiggestConvertible is the largest integer type that system-provided
- // string-to-number conversion routines can return.
-
-# if GTEST_OS_WINDOWS && !defined(__GNUC__)
-
- // MSVC and C++ Builder define __int64 instead of the standard long long.
- typedef unsigned __int64 BiggestConvertible;
- const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10);
-
-# else
-
- typedef unsigned long long BiggestConvertible; // NOLINT
- const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);
-
-# endif // GTEST_OS_WINDOWS && !defined(__GNUC__)
-
- const bool parse_success = *end == '\0' && errno == 0;
-
- // TODO(vladl@google.com): Convert this to compile time assertion when it is
- // available.
- GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));
-
- const Integer result = static_cast<Integer>(parsed);
- if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {
- *number = result;
- return true;
- }
- return false;
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// TestResult contains some private methods that should be hidden from
-// Google Test user but are required for testing. This class allow our tests
-// to access them.
-//
-// This class is supplied only for the purpose of testing Google Test's own
-// constructs. Do not use it in user tests, either directly or indirectly.
-class TestResultAccessor {
- public:
- static void RecordProperty(TestResult* test_result,
- const TestProperty& property) {
- test_result->RecordProperty(property);
- }
-
- static void ClearTestPartResults(TestResult* test_result) {
- test_result->ClearTestPartResults();
- }
-
- static const std::vector<testing::TestPartResult>& test_part_results(
- const TestResult& test_result) {
- return test_result.test_part_results();
- }
-};
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_
-#undef GTEST_IMPLEMENTATION_
-
-#if GTEST_OS_WINDOWS
-# define vsnprintf _vsnprintf
-#endif // GTEST_OS_WINDOWS
-
-namespace testing {
-
-using internal::CountIf;
-using internal::ForEach;
-using internal::GetElementOr;
-using internal::Shuffle;
-
-// Constants.
-
-// A test whose test case name or test name matches this filter is
-// disabled and not run.
-static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*";
-
-// A test case whose name matches this filter is considered a death
-// test case and will be run before test cases whose name doesn't
-// match this filter.
-static const char kDeathTestCaseFilter[] = "*DeathTest:*DeathTest/*";
-
-// A test filter that matches everything.
-static const char kUniversalFilter[] = "*";
-
-// The default output file for XML output.
-static const char kDefaultOutputFile[] = "test_detail.xml";
-
-// The environment variable name for the test shard index.
-static const char kTestShardIndex[] = "GTEST_SHARD_INDEX";
-// The environment variable name for the total number of test shards.
-static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS";
-// The environment variable name for the test shard status file.
-static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE";
-
-namespace internal {
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-const char kStackTraceMarker[] = "\nStack trace:\n";
-
-// g_help_flag is true iff the --help flag or an equivalent form is
-// specified on the command line.
-bool g_help_flag = false;
-
-} // namespace internal
-
-GTEST_DEFINE_bool_(
- also_run_disabled_tests,
- internal::BoolFromGTestEnv("also_run_disabled_tests", false),
- "Run disabled tests too, in addition to the tests normally being run.");
-
-GTEST_DEFINE_bool_(
- break_on_failure,
- internal::BoolFromGTestEnv("break_on_failure", false),
- "True iff a failed assertion should be a debugger break-point.");
-
-GTEST_DEFINE_bool_(
- catch_exceptions,
- internal::BoolFromGTestEnv("catch_exceptions", true),
- "True iff " GTEST_NAME_
- " should catch exceptions and treat them as test failures.");
-
-GTEST_DEFINE_string_(
- color,
- internal::StringFromGTestEnv("color", "auto"),
- "Whether to use colors in the output. Valid values: yes, no, "
- "and auto. 'auto' means to use colors if the output is "
- "being sent to a terminal and the TERM environment variable "
- "is set to xterm, xterm-color, xterm-256color, linux or cygwin.");
-
-GTEST_DEFINE_string_(
- filter,
- internal::StringFromGTestEnv("filter", kUniversalFilter),
- "A colon-separated list of glob (not regex) patterns "
- "for filtering the tests to run, optionally followed by a "
- "'-' and a : separated list of negative patterns (tests to "
- "exclude). A test is run if it matches one of the positive "
- "patterns and does not match any of the negative patterns.");
-
-GTEST_DEFINE_bool_(list_tests, false,
- "List all tests without running them.");
-
-GTEST_DEFINE_string_(
- output,
- internal::StringFromGTestEnv("output", ""),
- "A format (currently must be \"xml\"), optionally followed "
- "by a colon and an output file name or directory. A directory "
- "is indicated by a trailing pathname separator. "
- "Examples: \"xml:filename.xml\", \"xml::directoryname/\". "
- "If a directory is specified, output files will be created "
- "within that directory, with file-names based on the test "
- "executable's name and, if necessary, made unique by adding "
- "digits.");
-
-GTEST_DEFINE_bool_(
- print_time,
- internal::BoolFromGTestEnv("print_time", true),
- "True iff " GTEST_NAME_
- " should display elapsed time in text output.");
-
-GTEST_DEFINE_int32_(
- random_seed,
- internal::Int32FromGTestEnv("random_seed", 0),
- "Random number seed to use when shuffling test orders. Must be in range "
- "[1, 99999], or 0 to use a seed based on the current time.");
-
-GTEST_DEFINE_int32_(
- repeat,
- internal::Int32FromGTestEnv("repeat", 1),
- "How many times to repeat each test. Specify a negative number "
- "for repeating forever. Useful for shaking out flaky tests.");
-
-GTEST_DEFINE_bool_(
- show_internal_stack_frames, false,
- "True iff " GTEST_NAME_ " should include internal stack frames when "
- "printing test failure stack traces.");
-
-GTEST_DEFINE_bool_(
- shuffle,
- internal::BoolFromGTestEnv("shuffle", false),
- "True iff " GTEST_NAME_
- " should randomize tests' order on every run.");
-
-GTEST_DEFINE_int32_(
- stack_trace_depth,
- internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth),
- "The maximum number of stack frames to print when an "
- "assertion fails. The valid range is 0 through 100, inclusive.");
-
-GTEST_DEFINE_string_(
- stream_result_to,
- internal::StringFromGTestEnv("stream_result_to", ""),
- "This flag specifies the host name and the port number on which to stream "
- "test results. Example: \"localhost:555\". The flag is effective only on "
- "Linux.");
-
-GTEST_DEFINE_bool_(
- throw_on_failure,
- internal::BoolFromGTestEnv("throw_on_failure", false),
- "When this flag is specified, a failed assertion will throw an exception "
- "if exceptions are enabled or exit the program with a non-zero code "
- "otherwise.");
-
-namespace internal {
-
-// Generates a random number from [0, range), using a Linear
-// Congruential Generator (LCG). Crashes if 'range' is 0 or greater
-// than kMaxRange.
-UInt32 Random::Generate(UInt32 range) {
- // These constants are the same as are used in glibc's rand(3).
- state_ = (1103515245U*state_ + 12345U) % kMaxRange;
-
- GTEST_CHECK_(range > 0)
- << "Cannot generate a number in the range [0, 0).";
- GTEST_CHECK_(range <= kMaxRange)
- << "Generation of a number in [0, " << range << ") was requested, "
- << "but this can only generate numbers in [0, " << kMaxRange << ").";
-
- // Converting via modulus introduces a bit of downward bias, but
- // it's simple, and a linear congruential generator isn't too good
- // to begin with.
- return state_ % range;
-}
-
-// GTestIsInitialized() returns true iff the user has initialized
-// Google Test. Useful for catching the user mistake of not initializing
-// Google Test before calling RUN_ALL_TESTS().
-//
-// A user must call testing::InitGoogleTest() to initialize Google
-// Test. g_init_gtest_count is set to the number of times
-// InitGoogleTest() has been called. We don't protect this variable
-// under a mutex as it is only accessed in the main thread.
-int g_init_gtest_count = 0;
-static bool GTestIsInitialized() { return g_init_gtest_count != 0; }
-
-// Iterates over a vector of TestCases, keeping a running sum of the
-// results of calling a given int-returning method on each.
-// Returns the sum.
-static int SumOverTestCaseList(const std::vector<TestCase*>& case_list,
- int (TestCase::*method)() const) {
- int sum = 0;
- for (size_t i = 0; i < case_list.size(); i++) {
- sum += (case_list[i]->*method)();
- }
- return sum;
-}
-
-// Returns true iff the test case passed.
-static bool TestCasePassed(const TestCase* test_case) {
- return test_case->should_run() && test_case->Passed();
-}
-
-// Returns true iff the test case failed.
-static bool TestCaseFailed(const TestCase* test_case) {
- return test_case->should_run() && test_case->Failed();
-}
-
-// Returns true iff test_case contains at least one test that should
-// run.
-static bool ShouldRunTestCase(const TestCase* test_case) {
- return test_case->should_run();
-}
-
-// AssertHelper constructor.
-AssertHelper::AssertHelper(TestPartResult::Type type,
- const char* file,
- int line,
- const char* message)
- : data_(new AssertHelperData(type, file, line, message)) {
-}
-
-AssertHelper::~AssertHelper() {
- delete data_;
-}
-
-// Message assignment, for assertion streaming support.
-void AssertHelper::operator=(const Message& message) const {
- UnitTest::GetInstance()->
- AddTestPartResult(data_->type, data_->file, data_->line,
- AppendUserMessage(data_->message, message),
- UnitTest::GetInstance()->impl()
- ->CurrentOsStackTraceExceptTop(1)
- // Skips the stack frame for this function itself.
- ); // NOLINT
-}
-
-// Mutex for linked pointers.
-GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);
-
-// Application pathname gotten in InitGoogleTest.
-String g_executable_path;
-
-// Returns the current application's name, removing directory path if that
-// is present.
-FilePath GetCurrentExecutableName() {
- FilePath result;
-
-#if GTEST_OS_WINDOWS
- result.Set(FilePath(g_executable_path).RemoveExtension("exe"));
-#else
- result.Set(FilePath(g_executable_path));
-#endif // GTEST_OS_WINDOWS
-
- return result.RemoveDirectoryName();
-}
-
-// Functions for processing the gtest_output flag.
-
-// Returns the output format, or "" for normal printed output.
-String UnitTestOptions::GetOutputFormat() {
- const char* const gtest_output_flag = GTEST_FLAG(output).c_str();
- if (gtest_output_flag == NULL) return String("");
-
- const char* const colon = strchr(gtest_output_flag, ':');
- return (colon == NULL) ?
- String(gtest_output_flag) :
- String(gtest_output_flag, colon - gtest_output_flag);
-}
-
-// Returns the name of the requested output file, or the default if none
-// was explicitly specified.
-String UnitTestOptions::GetAbsolutePathToOutputFile() {
- const char* const gtest_output_flag = GTEST_FLAG(output).c_str();
- if (gtest_output_flag == NULL)
- return String("");
-
- const char* const colon = strchr(gtest_output_flag, ':');
- if (colon == NULL)
- return String(internal::FilePath::ConcatPaths(
- internal::FilePath(
- UnitTest::GetInstance()->original_working_dir()),
- internal::FilePath(kDefaultOutputFile)).ToString() );
-
- internal::FilePath output_name(colon + 1);
- if (!output_name.IsAbsolutePath())
- // TODO(wan@google.com): on Windows \some\path is not an absolute
- // path (as its meaning depends on the current drive), yet the
- // following logic for turning it into an absolute path is wrong.
- // Fix it.
- output_name = internal::FilePath::ConcatPaths(
- internal::FilePath(UnitTest::GetInstance()->original_working_dir()),
- internal::FilePath(colon + 1));
-
- if (!output_name.IsDirectory())
- return output_name.ToString();
-
- internal::FilePath result(internal::FilePath::GenerateUniqueFileName(
- output_name, internal::GetCurrentExecutableName(),
- GetOutputFormat().c_str()));
- return result.ToString();
-}
-
-// Returns true iff the wildcard pattern matches the string. The
-// first ':' or '\0' character in pattern marks the end of it.
-//
-// This recursive algorithm isn't very efficient, but is clear and
-// works well enough for matching test names, which are short.
-bool UnitTestOptions::PatternMatchesString(const char *pattern,
- const char *str) {
- switch (*pattern) {
- case '\0':
- case ':': // Either ':' or '\0' marks the end of the pattern.
- return *str == '\0';
- case '?': // Matches any single character.
- return *str != '\0' && PatternMatchesString(pattern + 1, str + 1);
- case '*': // Matches any string (possibly empty) of characters.
- return (*str != '\0' && PatternMatchesString(pattern, str + 1)) ||
- PatternMatchesString(pattern + 1, str);
- default: // Non-special character. Matches itself.
- return *pattern == *str &&
- PatternMatchesString(pattern + 1, str + 1);
- }
-}
-
-bool UnitTestOptions::MatchesFilter(const String& name, const char* filter) {
- const char *cur_pattern = filter;
- for (;;) {
- if (PatternMatchesString(cur_pattern, name.c_str())) {
- return true;
- }
-
- // Finds the next pattern in the filter.
- cur_pattern = strchr(cur_pattern, ':');
-
- // Returns if no more pattern can be found.
- if (cur_pattern == NULL) {
- return false;
- }
-
- // Skips the pattern separater (the ':' character).
- cur_pattern++;
- }
-}
-
-// TODO(keithray): move String function implementations to gtest-string.cc.
-
-// Returns true iff the user-specified filter matches the test case
-// name and the test name.
-bool UnitTestOptions::FilterMatchesTest(const String &test_case_name,
- const String &test_name) {
- const String& full_name = String::Format("%s.%s",
- test_case_name.c_str(),
- test_name.c_str());
-
- // Split --gtest_filter at '-', if there is one, to separate into
- // positive filter and negative filter portions
- const char* const p = GTEST_FLAG(filter).c_str();
- const char* const dash = strchr(p, '-');
- String positive;
- String negative;
- if (dash == NULL) {
- positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter
- negative = String("");
- } else {
- positive = String(p, dash - p); // Everything up to the dash
- negative = String(dash+1); // Everything after the dash
- if (positive.empty()) {
- // Treat '-test1' as the same as '*-test1'
- positive = kUniversalFilter;
- }
- }
-
- // A filter is a colon-separated list of patterns. It matches a
- // test if any pattern in it matches the test.
- return (MatchesFilter(full_name, positive.c_str()) &&
- !MatchesFilter(full_name, negative.c_str()));
-}
-
-#if GTEST_HAS_SEH
-// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
-// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
-// This function is useful as an __except condition.
-int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {
- // Google Test should handle a SEH exception if:
- // 1. the user wants it to, AND
- // 2. this is not a breakpoint exception, AND
- // 3. this is not a C++ exception (VC++ implements them via SEH,
- // apparently).
- //
- // SEH exception code for C++ exceptions.
- // (see http://support.microsoft.com/kb/185294 for more information).
- const DWORD kCxxExceptionCode = 0xe06d7363;
-
- bool should_handle = true;
-
- if (!GTEST_FLAG(catch_exceptions))
- should_handle = false;
- else if (exception_code == EXCEPTION_BREAKPOINT)
- should_handle = false;
- else if (exception_code == kCxxExceptionCode)
- should_handle = false;
-
- return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
-}
-#endif // GTEST_HAS_SEH
-
-} // namespace internal
-
-// The c'tor sets this object as the test part result reporter used by
-// Google Test. The 'result' parameter specifies where to report the
-// results. Intercepts only failures from the current thread.
-ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(
- TestPartResultArray* result)
- : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD),
- result_(result) {
- Init();
-}
-
-// The c'tor sets this object as the test part result reporter used by
-// Google Test. The 'result' parameter specifies where to report the
-// results.
-ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(
- InterceptMode intercept_mode, TestPartResultArray* result)
- : intercept_mode_(intercept_mode),
- result_(result) {
- Init();
-}
-
-void ScopedFakeTestPartResultReporter::Init() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
- old_reporter_ = impl->GetGlobalTestPartResultReporter();
- impl->SetGlobalTestPartResultReporter(this);
- } else {
- old_reporter_ = impl->GetTestPartResultReporterForCurrentThread();
- impl->SetTestPartResultReporterForCurrentThread(this);
- }
-}
-
-// The d'tor restores the test part result reporter used by Google Test
-// before.
-ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
- impl->SetGlobalTestPartResultReporter(old_reporter_);
- } else {
- impl->SetTestPartResultReporterForCurrentThread(old_reporter_);
- }
-}
-
-// Increments the test part result count and remembers the result.
-// This method is from the TestPartResultReporterInterface interface.
-void ScopedFakeTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- result_->Append(result);
-}
-
-namespace internal {
-
-// Returns the type ID of ::testing::Test. We should always call this
-// instead of GetTypeId< ::testing::Test>() to get the type ID of
-// testing::Test. This is to work around a suspected linker bug when
-// using Google Test as a framework on Mac OS X. The bug causes
-// GetTypeId< ::testing::Test>() to return different values depending
-// on whether the call is from the Google Test framework itself or
-// from user test code. GetTestTypeId() is guaranteed to always
-// return the same value, as it always calls GetTypeId<>() from the
-// gtest.cc, which is within the Google Test framework.
-TypeId GetTestTypeId() {
- return GetTypeId<Test>();
-}
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library. This is solely for testing GetTestTypeId().
-extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId();
-
-// This predicate-formatter checks that 'results' contains a test part
-// failure of the given type and that the failure message contains the
-// given substring.
-AssertionResult HasOneFailure(const char* /* results_expr */,
- const char* /* type_expr */,
- const char* /* substr_expr */,
- const TestPartResultArray& results,
- TestPartResult::Type type,
- const string& substr) {
- const String expected(type == TestPartResult::kFatalFailure ?
- "1 fatal failure" :
- "1 non-fatal failure");
- Message msg;
- if (results.size() != 1) {
- msg << "Expected: " << expected << "\n"
- << " Actual: " << results.size() << " failures";
- for (int i = 0; i < results.size(); i++) {
- msg << "\n" << results.GetTestPartResult(i);
- }
- return AssertionFailure() << msg;
- }
-
- const TestPartResult& r = results.GetTestPartResult(0);
- if (r.type() != type) {
- return AssertionFailure() << "Expected: " << expected << "\n"
- << " Actual:\n"
- << r;
- }
-
- if (strstr(r.message(), substr.c_str()) == NULL) {
- return AssertionFailure() << "Expected: " << expected << " containing \""
- << substr << "\"\n"
- << " Actual:\n"
- << r;
- }
-
- return AssertionSuccess();
-}
-
-// The constructor of SingleFailureChecker remembers where to look up
-// test part results, what type of failure we expect, and what
-// substring the failure message should contain.
-SingleFailureChecker:: SingleFailureChecker(
- const TestPartResultArray* results,
- TestPartResult::Type type,
- const string& substr)
- : results_(results),
- type_(type),
- substr_(substr) {}
-
-// The destructor of SingleFailureChecker verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring. If that's not the case, a
-// non-fatal failure will be generated.
-SingleFailureChecker::~SingleFailureChecker() {
- EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_);
-}
-
-DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter(
- UnitTestImpl* unit_test) : unit_test_(unit_test) {}
-
-void DefaultGlobalTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- unit_test_->current_test_result()->AddTestPartResult(result);
- unit_test_->listeners()->repeater()->OnTestPartResult(result);
-}
-
-DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter(
- UnitTestImpl* unit_test) : unit_test_(unit_test) {}
-
-void DefaultPerThreadTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result);
-}
-
-// Returns the global test part result reporter.
-TestPartResultReporterInterface*
-UnitTestImpl::GetGlobalTestPartResultReporter() {
- internal::MutexLock lock(&global_test_part_result_reporter_mutex_);
- return global_test_part_result_repoter_;
-}
-
-// Sets the global test part result reporter.
-void UnitTestImpl::SetGlobalTestPartResultReporter(
- TestPartResultReporterInterface* reporter) {
- internal::MutexLock lock(&global_test_part_result_reporter_mutex_);
- global_test_part_result_repoter_ = reporter;
-}
-
-// Returns the test part result reporter for the current thread.
-TestPartResultReporterInterface*
-UnitTestImpl::GetTestPartResultReporterForCurrentThread() {
- return per_thread_test_part_result_reporter_.get();
-}
-
-// Sets the test part result reporter for the current thread.
-void UnitTestImpl::SetTestPartResultReporterForCurrentThread(
- TestPartResultReporterInterface* reporter) {
- per_thread_test_part_result_reporter_.set(reporter);
-}
-
-// Gets the number of successful test cases.
-int UnitTestImpl::successful_test_case_count() const {
- return CountIf(test_cases_, TestCasePassed);
-}
-
-// Gets the number of failed test cases.
-int UnitTestImpl::failed_test_case_count() const {
- return CountIf(test_cases_, TestCaseFailed);
-}
-
-// Gets the number of all test cases.
-int UnitTestImpl::total_test_case_count() const {
- return static_cast<int>(test_cases_.size());
-}
-
-// Gets the number of all test cases that contain at least one test
-// that should run.
-int UnitTestImpl::test_case_to_run_count() const {
- return CountIf(test_cases_, ShouldRunTestCase);
-}
-
-// Gets the number of successful tests.
-int UnitTestImpl::successful_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count);
-}
-
-// Gets the number of failed tests.
-int UnitTestImpl::failed_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count);
-}
-
-// Gets the number of disabled tests.
-int UnitTestImpl::disabled_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count);
-}
-
-// Gets the number of all tests.
-int UnitTestImpl::total_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::total_test_count);
-}
-
-// Gets the number of tests that should run.
-int UnitTestImpl::test_to_run_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count);
-}
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// CurrentOsStackTraceExceptTop(1), Foo() will be included in the
-// trace but Bar() and CurrentOsStackTraceExceptTop() won't.
-String UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) {
- (void)skip_count;
- return String("");
-}
-
-// Returns the current time in milliseconds.
-TimeInMillis GetTimeInMillis() {
-#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__)
- // Difference between 1970-01-01 and 1601-01-01 in milliseconds.
- // http://analogous.blogspot.com/2005/04/epoch.html
- const TimeInMillis kJavaEpochToWinFileTimeDelta =
- static_cast<TimeInMillis>(116444736UL) * 100000UL;
- const DWORD kTenthMicrosInMilliSecond = 10000;
-
- SYSTEMTIME now_systime;
- FILETIME now_filetime;
- ULARGE_INTEGER now_int64;
- // TODO(kenton@google.com): Shouldn't this just use
- // GetSystemTimeAsFileTime()?
- GetSystemTime(&now_systime);
- if (SystemTimeToFileTime(&now_systime, &now_filetime)) {
- now_int64.LowPart = now_filetime.dwLowDateTime;
- now_int64.HighPart = now_filetime.dwHighDateTime;
- now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) -
- kJavaEpochToWinFileTimeDelta;
- return now_int64.QuadPart;
- }
- return 0;
-#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_
- __timeb64 now;
-
-# ifdef _MSC_VER
-
- // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996
- // (deprecated function) there.
- // TODO(kenton@google.com): Use GetTickCount()? Or use
- // SystemTimeToFileTime()
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
- _ftime64(&now);
-# pragma warning(pop) // Restores the warning state.
-# else
-
- _ftime64(&now);
-
-# endif // _MSC_VER
-
- return static_cast<TimeInMillis>(now.time) * 1000 + now.millitm;
-#elif GTEST_HAS_GETTIMEOFDAY_
- struct timeval now;
- gettimeofday(&now, NULL);
- return static_cast<TimeInMillis>(now.tv_sec) * 1000 + now.tv_usec / 1000;
-#else
-# error "Don't know how to get the current time on your system."
-#endif
-}
-
-// Utilities
-
-// class String
-
-// Returns the input enclosed in double quotes if it's not NULL;
-// otherwise returns "(null)". For example, "\"Hello\"" is returned
-// for input "Hello".
-//
-// This is useful for printing a C string in the syntax of a literal.
-//
-// Known issue: escape sequences are not handled yet.
-String String::ShowCStringQuoted(const char* c_str) {
- return c_str ? String::Format("\"%s\"", c_str) : String("(null)");
-}
-
-// Copies at most length characters from str into a newly-allocated
-// piece of memory of size length+1. The memory is allocated with new[].
-// A terminating null byte is written to the memory, and a pointer to it
-// is returned. If str is NULL, NULL is returned.
-static char* CloneString(const char* str, size_t length) {
- if (str == NULL) {
- return NULL;
- } else {
- char* const clone = new char[length + 1];
- posix::StrNCpy(clone, str, length);
- clone[length] = '\0';
- return clone;
- }
-}
-
-// Clones a 0-terminated C string, allocating memory using new. The
-// caller is responsible for deleting[] the return value. Returns the
-// cloned string, or NULL if the input is NULL.
-const char * String::CloneCString(const char* c_str) {
- return (c_str == NULL) ?
- NULL : CloneString(c_str, strlen(c_str));
-}
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Creates a UTF-16 wide string from the given ANSI string, allocating
-// memory using new. The caller is responsible for deleting the return
-// value using delete[]. Returns the wide string, or NULL if the
-// input is NULL.
-LPCWSTR String::AnsiToUtf16(const char* ansi) {
- if (!ansi) return NULL;
- const int length = strlen(ansi);
- const int unicode_length =
- MultiByteToWideChar(CP_ACP, 0, ansi, length,
- NULL, 0);
- WCHAR* unicode = new WCHAR[unicode_length + 1];
- MultiByteToWideChar(CP_ACP, 0, ansi, length,
- unicode, unicode_length);
- unicode[unicode_length] = 0;
- return unicode;
-}
-
-// Creates an ANSI string from the given wide string, allocating
-// memory using new. The caller is responsible for deleting the return
-// value using delete[]. Returns the ANSI string, or NULL if the
-// input is NULL.
-const char* String::Utf16ToAnsi(LPCWSTR utf16_str) {
- if (!utf16_str) return NULL;
- const int ansi_length =
- WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,
- NULL, 0, NULL, NULL);
- char* ansi = new char[ansi_length + 1];
- WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,
- ansi, ansi_length, NULL, NULL);
- ansi[ansi_length] = 0;
- return ansi;
-}
-
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Compares two C strings. Returns true iff they have the same content.
-//
-// Unlike strcmp(), this function can handle NULL argument(s). A NULL
-// C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::CStringEquals(const char * lhs, const char * rhs) {
- if ( lhs == NULL ) return rhs == NULL;
-
- if ( rhs == NULL ) return false;
-
- return strcmp(lhs, rhs) == 0;
-}
-
-#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
-
-// Converts an array of wide chars to a narrow string using the UTF-8
-// encoding, and streams the result to the given Message object.
-static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,
- Message* msg) {
- // TODO(wan): consider allowing a testing::String object to
- // contain '\0'. This will make it behave more like std::string,
- // and will allow ToUtf8String() to return the correct encoding
- // for '\0' s.t. we can get rid of the conditional here (and in
- // several other places).
- for (size_t i = 0; i != length; ) { // NOLINT
- if (wstr[i] != L'\0') {
- *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i));
- while (i != length && wstr[i] != L'\0')
- i++;
- } else {
- *msg << '\0';
- i++;
- }
- }
-}
-
-#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
-
-} // namespace internal
-
-#if GTEST_HAS_STD_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::std::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// AssertionResult constructors.
-// Used in EXPECT_TRUE/FALSE(assertion_result).
-AssertionResult::AssertionResult(const AssertionResult& other)
- : success_(other.success_),
- message_(other.message_.get() != NULL ?
- new ::std::string(*other.message_) :
- static_cast< ::std::string*>(NULL)) {
-}
-
-// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
-AssertionResult AssertionResult::operator!() const {
- AssertionResult negation(!success_);
- if (message_.get() != NULL)
- negation << *message_;
- return negation;
-}
-
-// Makes a successful assertion result.
-AssertionResult AssertionSuccess() {
- return AssertionResult(true);
-}
-
-// Makes a failed assertion result.
-AssertionResult AssertionFailure() {
- return AssertionResult(false);
-}
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << message.
-AssertionResult AssertionFailure(const Message& message) {
- return AssertionFailure() << message;
-}
-
-namespace internal {
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings. For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-// expected_expression: "foo"
-// actual_expression: "bar"
-// expected_value: "5"
-// actual_value: "6"
-//
-// The ignoring_case parameter is true iff the assertion is a
-// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-AssertionResult EqFailure(const char* expected_expression,
- const char* actual_expression,
- const String& expected_value,
- const String& actual_value,
- bool ignoring_case) {
- Message msg;
- msg << "Value of: " << actual_expression;
- if (actual_value != actual_expression) {
- msg << "\n Actual: " << actual_value;
- }
-
- msg << "\nExpected: " << expected_expression;
- if (ignoring_case) {
- msg << " (ignoring case)";
- }
- if (expected_value != expected_expression) {
- msg << "\nWhich is: " << expected_value;
- }
-
- return AssertionFailure() << msg;
-}
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-String GetBoolAssertionFailureMessage(const AssertionResult& assertion_result,
- const char* expression_text,
- const char* actual_predicate_value,
- const char* expected_predicate_value) {
- const char* actual_message = assertion_result.message();
- Message msg;
- msg << "Value of: " << expression_text
- << "\n Actual: " << actual_predicate_value;
- if (actual_message[0] != '\0')
- msg << " (" << actual_message << ")";
- msg << "\nExpected: " << expected_predicate_value;
- return msg.GetString();
-}
-
-// Helper function for implementing ASSERT_NEAR.
-AssertionResult DoubleNearPredFormat(const char* expr1,
- const char* expr2,
- const char* abs_error_expr,
- double val1,
- double val2,
- double abs_error) {
- const double diff = fabs(val1 - val2);
- if (diff <= abs_error) return AssertionSuccess();
-
- // TODO(wan): do not print the value of an expression if it's
- // already a literal.
- return AssertionFailure()
- << "The difference between " << expr1 << " and " << expr2
- << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n"
- << expr1 << " evaluates to " << val1 << ",\n"
- << expr2 << " evaluates to " << val2 << ", and\n"
- << abs_error_expr << " evaluates to " << abs_error << ".";
-}
-
-
-// Helper template for implementing FloatLE() and DoubleLE().
-template <typename RawType>
-AssertionResult FloatingPointLE(const char* expr1,
- const char* expr2,
- RawType val1,
- RawType val2) {
- // Returns success if val1 is less than val2,
- if (val1 < val2) {
- return AssertionSuccess();
- }
-
- // or if val1 is almost equal to val2.
- const FloatingPoint<RawType> lhs(val1), rhs(val2);
- if (lhs.AlmostEquals(rhs)) {
- return AssertionSuccess();
- }
-
- // Note that the above two checks will both fail if either val1 or
- // val2 is NaN, as the IEEE floating-point standard requires that
- // any predicate involving a NaN must return false.
-
- ::std::stringstream val1_ss;
- val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << val1;
-
- ::std::stringstream val2_ss;
- val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << val2;
-
- return AssertionFailure()
- << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n"
- << " Actual: " << StringStreamToString(&val1_ss) << " vs "
- << StringStreamToString(&val2_ss);
-}
-
-} // namespace internal
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-AssertionResult FloatLE(const char* expr1, const char* expr2,
- float val1, float val2) {
- return internal::FloatingPointLE<float>(expr1, expr2, val1, val2);
-}
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-AssertionResult DoubleLE(const char* expr1, const char* expr2,
- double val1, double val2) {
- return internal::FloatingPointLE<double>(expr1, expr2, val1, val2);
-}
-
-namespace internal {
-
-// The helper function for {ASSERT|EXPECT}_EQ with int or enum
-// arguments.
-AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual) {
- if (expected == actual) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- FormatForComparisonFailureMessage(expected, actual),
- FormatForComparisonFailureMessage(actual, expected),
- false);
-}
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here
-// just to avoid copy-and-paste of similar code.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- BiggestInt val1, BiggestInt val2) {\
- if (val1 op val2) {\
- return AssertionSuccess();\
- } else {\
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2\
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
- << " vs " << FormatForComparisonFailureMessage(val2, val1);\
- }\
-}
-
-// Implements the helper function for {ASSERT|EXPECT}_NE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(NE, !=)
-// Implements the helper function for {ASSERT|EXPECT}_LE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(LE, <=)
-// Implements the helper function for {ASSERT|EXPECT}_LT with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(LT, < )
-// Implements the helper function for {ASSERT|EXPECT}_GE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(GE, >=)
-// Implements the helper function for {ASSERT|EXPECT}_GT with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(GT, > )
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual) {
- if (String::CStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowCStringQuoted(expected),
- String::ShowCStringQuoted(actual),
- false);
-}
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual) {
- if (String::CaseInsensitiveCStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowCStringQuoted(expected),
- String::ShowCStringQuoted(actual),
- true);
-}
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2) {
- if (!String::CStringEquals(s1, s2)) {
- return AssertionSuccess();
- } else {
- return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
- << s2_expression << "), actual: \""
- << s1 << "\" vs \"" << s2 << "\"";
- }
-}
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2) {
- if (!String::CaseInsensitiveCStringEquals(s1, s2)) {
- return AssertionSuccess();
- } else {
- return AssertionFailure()
- << "Expected: (" << s1_expression << ") != ("
- << s2_expression << ") (ignoring case), actual: \""
- << s1 << "\" vs \"" << s2 << "\"";
- }
-}
-
-} // namespace internal
-
-namespace {
-
-// Helper functions for implementing IsSubString() and IsNotSubstring().
-
-// This group of overloaded functions return true iff needle is a
-// substring of haystack. NULL is considered a substring of itself
-// only.
-
-bool IsSubstringPred(const char* needle, const char* haystack) {
- if (needle == NULL || haystack == NULL)
- return needle == haystack;
-
- return strstr(haystack, needle) != NULL;
-}
-
-bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
- if (needle == NULL || haystack == NULL)
- return needle == haystack;
-
- return wcsstr(haystack, needle) != NULL;
-}
-
-// StringType here can be either ::std::string or ::std::wstring.
-template <typename StringType>
-bool IsSubstringPred(const StringType& needle,
- const StringType& haystack) {
- return haystack.find(needle) != StringType::npos;
-}
-
-// This function implements either IsSubstring() or IsNotSubstring(),
-// depending on the value of the expected_to_be_substring parameter.
-// StringType here can be const char*, const wchar_t*, ::std::string,
-// or ::std::wstring.
-template <typename StringType>
-AssertionResult IsSubstringImpl(
- bool expected_to_be_substring,
- const char* needle_expr, const char* haystack_expr,
- const StringType& needle, const StringType& haystack) {
- if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
- return AssertionSuccess();
-
- const bool is_wide_string = sizeof(needle[0]) > 1;
- const char* const begin_string_quote = is_wide_string ? "L\"" : "\"";
- return AssertionFailure()
- << "Value of: " << needle_expr << "\n"
- << " Actual: " << begin_string_quote << needle << "\"\n"
- << "Expected: " << (expected_to_be_substring ? "" : "not ")
- << "a substring of " << haystack_expr << "\n"
- << "Which is: " << begin_string_quote << haystack << "\"";
-}
-
-} // namespace
-
-// IsSubstring() and IsNotSubstring() check whether needle is a
-// substring of haystack (NULL is considered a substring of itself
-// only), and return an appropriate error message when they fail.
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-#if GTEST_HAS_STD_WSTRING
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-#if GTEST_OS_WINDOWS
-
-namespace {
-
-// Helper function for IsHRESULT{SuccessFailure} predicates
-AssertionResult HRESULTFailureHelper(const char* expr,
- const char* expected,
- long hr) { // NOLINT
-# if GTEST_OS_WINDOWS_MOBILE
-
- // Windows CE doesn't support FormatMessage.
- const char error_text[] = "";
-
-# else
-
- // Looks up the human-readable system message for the HRESULT code
- // and since we're not passing any params to FormatMessage, we don't
- // want inserts expanded.
- const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS;
- const DWORD kBufSize = 4096; // String::Format can't exceed this length.
- // Gets the system's human readable message string for this HRESULT.
- char error_text[kBufSize] = { '\0' };
- DWORD message_length = ::FormatMessageA(kFlags,
- 0, // no source, we're asking system
- hr, // the error
- 0, // no line width restrictions
- error_text, // output buffer
- kBufSize, // buf size
- NULL); // no arguments for inserts
- // Trims tailing white space (FormatMessage leaves a trailing cr-lf)
- for (; message_length && IsSpace(error_text[message_length - 1]);
- --message_length) {
- error_text[message_length - 1] = '\0';
- }
-
-# endif // GTEST_OS_WINDOWS_MOBILE
-
- const String error_hex(String::Format("0x%08X ", hr));
- return ::testing::AssertionFailure()
- << "Expected: " << expr << " " << expected << ".\n"
- << " Actual: " << error_hex << error_text << "\n";
-}
-
-} // namespace
-
-AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT
- if (SUCCEEDED(hr)) {
- return AssertionSuccess();
- }
- return HRESULTFailureHelper(expr, "succeeds", hr);
-}
-
-AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT
- if (FAILED(hr)) {
- return AssertionSuccess();
- }
- return HRESULTFailureHelper(expr, "fails", hr);
-}
-
-#endif // GTEST_OS_WINDOWS
-
-// Utility functions for encoding Unicode text (wide strings) in
-// UTF-8.
-
-// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8
-// like this:
-//
-// Code-point length Encoding
-// 0 - 7 bits 0xxxxxxx
-// 8 - 11 bits 110xxxxx 10xxxxxx
-// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx
-// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-
-// The maximum code-point a one-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint1 = (static_cast<UInt32>(1) << 7) - 1;
-
-// The maximum code-point a two-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1;
-
-// The maximum code-point a three-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1;
-
-// The maximum code-point a four-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1;
-
-// Chops off the n lowest bits from a bit pattern. Returns the n
-// lowest bits. As a side effect, the original bit pattern will be
-// shifted to the right by n bits.
-inline UInt32 ChopLowBits(UInt32* bits, int n) {
- const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);
- *bits >>= n;
- return low_bits;
-}
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// The output buffer str must containt at least 32 characters.
-// The function returns the address of the output buffer.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'.
-char* CodePointToUtf8(UInt32 code_point, char* str) {
- if (code_point <= kMaxCodePoint1) {
- str[1] = '\0';
- str[0] = static_cast<char>(code_point); // 0xxxxxxx
- } else if (code_point <= kMaxCodePoint2) {
- str[2] = '\0';
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
- } else if (code_point <= kMaxCodePoint3) {
- str[3] = '\0';
- str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
- } else if (code_point <= kMaxCodePoint4) {
- str[4] = '\0';
- str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
- } else {
- // The longest string String::Format can produce when invoked
- // with these parameters is 28 character long (not including
- // the terminating nul character). We are asking for 32 character
- // buffer just in case. This is also enough for strncpy to
- // null-terminate the destination string.
- posix::StrNCpy(
- str, String::Format("(Invalid Unicode 0x%X)", code_point).c_str(), 32);
- str[31] = '\0'; // Makes sure no change in the format to strncpy leaves
- // the result unterminated.
- }
- return str;
-}
-
-// The following two functions only make sense if the the system
-// uses UTF-16 for wide string encoding. All supported systems
-// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16.
-
-// Determines if the arguments constitute UTF-16 surrogate pair
-// and thus should be combined into a single Unicode code point
-// using CreateCodePointFromUtf16SurrogatePair.
-inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
- return sizeof(wchar_t) == 2 &&
- (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;
-}
-
-// Creates a Unicode code point from UTF16 surrogate pair.
-inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
- wchar_t second) {
- const UInt32 mask = (1 << 10) - 1;
- return (sizeof(wchar_t) == 2) ?
- (((first & mask) << 10) | (second & mask)) + 0x10000 :
- // This function should not be called when the condition is
- // false, but we provide a sensible default in case it is.
- static_cast<UInt32>(first);
-}
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)
-// UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-String WideStringToUtf8(const wchar_t* str, int num_chars) {
- if (num_chars == -1)
- num_chars = static_cast<int>(wcslen(str));
-
- ::std::stringstream stream;
- for (int i = 0; i < num_chars; ++i) {
- UInt32 unicode_code_point;
-
- if (str[i] == L'\0') {
- break;
- } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) {
- unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i],
- str[i + 1]);
- i++;
- } else {
- unicode_code_point = static_cast<UInt32>(str[i]);
- }
-
- char buffer[32]; // CodePointToUtf8 requires a buffer this big.
- stream << CodePointToUtf8(unicode_code_point, buffer);
- }
- return StringStreamToString(&stream);
-}
-
-// Converts a wide C string to a String using the UTF-8 encoding.
-// NULL will be converted to "(null)".
-String String::ShowWideCString(const wchar_t * wide_c_str) {
- if (wide_c_str == NULL) return String("(null)");
-
- return String(internal::WideStringToUtf8(wide_c_str, -1).c_str());
-}
-
-// Similar to ShowWideCString(), except that this function encloses
-// the converted string in double quotes.
-String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
- if (wide_c_str == NULL) return String("(null)");
-
- return String::Format("L\"%s\"",
- String::ShowWideCString(wide_c_str).c_str());
-}
-
-// Compares two wide C strings. Returns true iff they have the same
-// content.
-//
-// Unlike wcscmp(), this function can handle NULL argument(s). A NULL
-// C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) {
- if (lhs == NULL) return rhs == NULL;
-
- if (rhs == NULL) return false;
-
- return wcscmp(lhs, rhs) == 0;
-}
-
-// Helper function for *_STREQ on wide strings.
-AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const wchar_t* expected,
- const wchar_t* actual) {
- if (String::WideCStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowWideCStringQuoted(expected),
- String::ShowWideCStringQuoted(actual),
- false);
-}
-
-// Helper function for *_STRNE on wide strings.
-AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const wchar_t* s1,
- const wchar_t* s2) {
- if (!String::WideCStringEquals(s1, s2)) {
- return AssertionSuccess();
- }
-
- return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
- << s2_expression << "), actual: "
- << String::ShowWideCStringQuoted(s1)
- << " vs " << String::ShowWideCStringQuoted(s2);
-}
-
-// Compares two C strings, ignoring case. Returns true iff they have
-// the same content.
-//
-// Unlike strcasecmp(), this function can handle NULL argument(s). A
-// NULL C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) {
- if (lhs == NULL)
- return rhs == NULL;
- if (rhs == NULL)
- return false;
- return posix::StrCaseCmp(lhs, rhs) == 0;
-}
-
- // Compares two wide C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike wcscasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL wide C string,
- // including the empty string.
- // NB: The implementations on different platforms slightly differ.
- // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
- // environment variable. On GNU platform this method uses wcscasecmp
- // which compares according to LC_CTYPE category of the current locale.
- // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
- // current locale.
-bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs) {
- if (lhs == NULL) return rhs == NULL;
-
- if (rhs == NULL) return false;
-
-#if GTEST_OS_WINDOWS
- return _wcsicmp(lhs, rhs) == 0;
-#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID
- return wcscasecmp(lhs, rhs) == 0;
-#else
- // Android, Mac OS X and Cygwin don't define wcscasecmp.
- // Other unknown OSes may not define it either.
- wint_t left, right;
- do {
- left = towlower(*lhs++);
- right = towlower(*rhs++);
- } while (left && left == right);
- return left == right;
-#endif // OS selector
-}
-
-// Compares this with another String.
-// Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0
-// if this is greater than rhs.
-int String::Compare(const String & rhs) const {
- const char* const lhs_c_str = c_str();
- const char* const rhs_c_str = rhs.c_str();
-
- if (lhs_c_str == NULL) {
- return rhs_c_str == NULL ? 0 : -1; // NULL < anything except NULL
- } else if (rhs_c_str == NULL) {
- return 1;
- }
-
- const size_t shorter_str_len =
- length() <= rhs.length() ? length() : rhs.length();
- for (size_t i = 0; i != shorter_str_len; i++) {
- if (lhs_c_str[i] < rhs_c_str[i]) {
- return -1;
- } else if (lhs_c_str[i] > rhs_c_str[i]) {
- return 1;
- }
- }
- return (length() < rhs.length()) ? -1 :
- (length() > rhs.length()) ? 1 : 0;
-}
-
-// Returns true iff this String ends with the given suffix. *Any*
-// String is considered to end with a NULL or empty suffix.
-bool String::EndsWith(const char* suffix) const {
- if (suffix == NULL || CStringEquals(suffix, "")) return true;
-
- if (c_str() == NULL) return false;
-
- const size_t this_len = strlen(c_str());
- const size_t suffix_len = strlen(suffix);
- return (this_len >= suffix_len) &&
- CStringEquals(c_str() + this_len - suffix_len, suffix);
-}
-
-// Returns true iff this String ends with the given suffix, ignoring case.
-// Any String is considered to end with a NULL or empty suffix.
-bool String::EndsWithCaseInsensitive(const char* suffix) const {
- if (suffix == NULL || CStringEquals(suffix, "")) return true;
-
- if (c_str() == NULL) return false;
-
- const size_t this_len = strlen(c_str());
- const size_t suffix_len = strlen(suffix);
- return (this_len >= suffix_len) &&
- CaseInsensitiveCStringEquals(c_str() + this_len - suffix_len, suffix);
-}
-
-// Formats a list of arguments to a String, using the same format
-// spec string as for printf.
-//
-// We do not use the StringPrintf class as it is not universally
-// available.
-//
-// The result is limited to 4096 characters (including the tailing 0).
-// If 4096 characters are not enough to format the input, or if
-// there's an error, "<formatting error or buffer exceeded>" is
-// returned.
-String String::Format(const char * format, ...) {
- va_list args;
- va_start(args, format);
-
- char buffer[4096];
- const int kBufferSize = sizeof(buffer)/sizeof(buffer[0]);
-
- // MSVC 8 deprecates vsnprintf(), so we want to suppress warning
- // 4996 (deprecated function) there.
-#ifdef _MSC_VER // We are using MSVC.
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
-
- const int size = vsnprintf(buffer, kBufferSize, format, args);
-
-# pragma warning(pop) // Restores the warning state.
-#else // We are not using MSVC.
- const int size = vsnprintf(buffer, kBufferSize, format, args);
-#endif // _MSC_VER
- va_end(args);
-
- // vsnprintf()'s behavior is not portable. When the buffer is not
- // big enough, it returns a negative value in MSVC, and returns the
- // needed buffer size on Linux. When there is an output error, it
- // always returns a negative value. For simplicity, we lump the two
- // error cases together.
- if (size < 0 || size >= kBufferSize) {
- return String("<formatting error or buffer exceeded>");
- } else {
- return String(buffer, size);
- }
-}
-
-// Converts the buffer in a stringstream to a String, converting NUL
-// bytes to "\\0" along the way.
-String StringStreamToString(::std::stringstream* ss) {
- const ::std::string& str = ss->str();
- const char* const start = str.c_str();
- const char* const end = start + str.length();
-
- // We need to use a helper stringstream to do this transformation
- // because String doesn't support push_back().
- ::std::stringstream helper;
- for (const char* ch = start; ch != end; ++ch) {
- if (*ch == '\0') {
- helper << "\\0"; // Replaces NUL with "\\0";
- } else {
- helper.put(*ch);
- }
- }
-
- return String(helper.str().c_str());
-}
-
-// Appends the user-supplied message to the Google-Test-generated message.
-String AppendUserMessage(const String& gtest_msg,
- const Message& user_msg) {
- // Appends the user message if it's non-empty.
- const String user_msg_string = user_msg.GetString();
- if (user_msg_string.empty()) {
- return gtest_msg;
- }
-
- Message msg;
- msg << gtest_msg << "\n" << user_msg_string;
-
- return msg.GetString();
-}
-
-} // namespace internal
-
-// class TestResult
-
-// Creates an empty TestResult.
-TestResult::TestResult()
- : death_test_count_(0),
- elapsed_time_(0) {
-}
-
-// D'tor.
-TestResult::~TestResult() {
-}
-
-// Returns the i-th test part result among all the results. i can
-// range from 0 to total_part_count() - 1. If i is not in that range,
-// aborts the program.
-const TestPartResult& TestResult::GetTestPartResult(int i) const {
- if (i < 0 || i >= total_part_count())
- internal::posix::Abort();
- return test_part_results_.at(i);
-}
-
-// Returns the i-th test property. i can range from 0 to
-// test_property_count() - 1. If i is not in that range, aborts the
-// program.
-const TestProperty& TestResult::GetTestProperty(int i) const {
- if (i < 0 || i >= test_property_count())
- internal::posix::Abort();
- return test_properties_.at(i);
-}
-
-// Clears the test part results.
-void TestResult::ClearTestPartResults() {
- test_part_results_.clear();
-}
-
-// Adds a test part result to the list.
-void TestResult::AddTestPartResult(const TestPartResult& test_part_result) {
- test_part_results_.push_back(test_part_result);
-}
-
-// Adds a test property to the list. If a property with the same key as the
-// supplied property is already represented, the value of this test_property
-// replaces the old value for that key.
-void TestResult::RecordProperty(const TestProperty& test_property) {
- if (!ValidateTestProperty(test_property)) {
- return;
- }
- internal::MutexLock lock(&test_properites_mutex_);
- const std::vector<TestProperty>::iterator property_with_matching_key =
- std::find_if(test_properties_.begin(), test_properties_.end(),
- internal::TestPropertyKeyIs(test_property.key()));
- if (property_with_matching_key == test_properties_.end()) {
- test_properties_.push_back(test_property);
- return;
- }
- property_with_matching_key->SetValue(test_property.value());
-}
-
-// Adds a failure if the key is a reserved attribute of Google Test
-// testcase tags. Returns true if the property is valid.
-bool TestResult::ValidateTestProperty(const TestProperty& test_property) {
- internal::String key(test_property.key());
- if (key == "name" || key == "status" || key == "time" || key == "classname") {
- ADD_FAILURE()
- << "Reserved key used in RecordProperty(): "
- << key
- << " ('name', 'status', 'time', and 'classname' are reserved by "
- << GTEST_NAME_ << ")";
- return false;
- }
- return true;
-}
-
-// Clears the object.
-void TestResult::Clear() {
- test_part_results_.clear();
- test_properties_.clear();
- death_test_count_ = 0;
- elapsed_time_ = 0;
-}
-
-// Returns true iff the test failed.
-bool TestResult::Failed() const {
- for (int i = 0; i < total_part_count(); ++i) {
- if (GetTestPartResult(i).failed())
- return true;
- }
- return false;
-}
-
-// Returns true iff the test part fatally failed.
-static bool TestPartFatallyFailed(const TestPartResult& result) {
- return result.fatally_failed();
-}
-
-// Returns true iff the test fatally failed.
-bool TestResult::HasFatalFailure() const {
- return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
-}
-
-// Returns true iff the test part non-fatally failed.
-static bool TestPartNonfatallyFailed(const TestPartResult& result) {
- return result.nonfatally_failed();
-}
-
-// Returns true iff the test has a non-fatal failure.
-bool TestResult::HasNonfatalFailure() const {
- return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;
-}
-
-// Gets the number of all test parts. This is the sum of the number
-// of successful test parts and the number of failed test parts.
-int TestResult::total_part_count() const {
- return static_cast<int>(test_part_results_.size());
-}
-
-// Returns the number of the test properties.
-int TestResult::test_property_count() const {
- return static_cast<int>(test_properties_.size());
-}
-
-// class Test
-
-// Creates a Test object.
-
-// The c'tor saves the values of all Google Test flags.
-Test::Test()
- : gtest_flag_saver_(new internal::GTestFlagSaver) {
-}
-
-// The d'tor restores the values of all Google Test flags.
-Test::~Test() {
- delete gtest_flag_saver_;
-}
-
-// Sets up the test fixture.
-//
-// A sub-class may override this.
-void Test::SetUp() {
-}
-
-// Tears down the test fixture.
-//
-// A sub-class may override this.
-void Test::TearDown() {
-}
-
-// Allows user supplied key value pairs to be recorded for later output.
-void Test::RecordProperty(const char* key, const char* value) {
- UnitTest::GetInstance()->RecordPropertyForCurrentTest(key, value);
-}
-
-// Allows user supplied key value pairs to be recorded for later output.
-void Test::RecordProperty(const char* key, int value) {
- Message value_message;
- value_message << value;
- RecordProperty(key, value_message.GetString().c_str());
-}
-
-namespace internal {
-
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
- const String& message) {
- // This function is a friend of UnitTest and as such has access to
- // AddTestPartResult.
- UnitTest::GetInstance()->AddTestPartResult(
- result_type,
- NULL, // No info about the source file where the exception occurred.
- -1, // We have no info on which line caused the exception.
- message,
- String()); // No stack trace, either.
-}
-
-} // namespace internal
-
-// Google Test requires all tests in the same test case to use the same test
-// fixture class. This function checks if the current test has the
-// same fixture class as the first test in the current test case. If
-// yes, it returns true; otherwise it generates a Google Test failure and
-// returns false.
-bool Test::HasSameFixtureClass() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- const TestCase* const test_case = impl->current_test_case();
-
- // Info about the first test in the current test case.
- const TestInfo* const first_test_info = test_case->test_info_list()[0];
- const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;
- const char* const first_test_name = first_test_info->name();
-
- // Info about the current test.
- const TestInfo* const this_test_info = impl->current_test_info();
- const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;
- const char* const this_test_name = this_test_info->name();
-
- if (this_fixture_id != first_fixture_id) {
- // Is the first test defined using TEST?
- const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();
- // Is this test defined using TEST?
- const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();
-
- if (first_is_TEST || this_is_TEST) {
- // The user mixed TEST and TEST_F in this test case - we'll tell
- // him/her how to fix it.
-
- // Gets the name of the TEST and the name of the TEST_F. Note
- // that first_is_TEST and this_is_TEST cannot both be true, as
- // the fixture IDs are different for the two tests.
- const char* const TEST_name =
- first_is_TEST ? first_test_name : this_test_name;
- const char* const TEST_F_name =
- first_is_TEST ? this_test_name : first_test_name;
-
- ADD_FAILURE()
- << "All tests in the same test case must use the same test fixture\n"
- << "class, so mixing TEST_F and TEST in the same test case is\n"
- << "illegal. In test case " << this_test_info->test_case_name()
- << ",\n"
- << "test " << TEST_F_name << " is defined using TEST_F but\n"
- << "test " << TEST_name << " is defined using TEST. You probably\n"
- << "want to change the TEST to TEST_F or move it to another test\n"
- << "case.";
- } else {
- // The user defined two fixture classes with the same name in
- // two namespaces - we'll tell him/her how to fix it.
- ADD_FAILURE()
- << "All tests in the same test case must use the same test fixture\n"
- << "class. However, in test case "
- << this_test_info->test_case_name() << ",\n"
- << "you defined test " << first_test_name
- << " and test " << this_test_name << "\n"
- << "using two different test fixture classes. This can happen if\n"
- << "the two classes are from different namespaces or translation\n"
- << "units and have the same name. You should probably rename one\n"
- << "of the classes to put the tests into different test cases.";
- }
- return false;
- }
-
- return true;
-}
-
-#if GTEST_HAS_SEH
-
-// Adds an "exception thrown" fatal failure to the current test. This
-// function returns its result via an output parameter pointer because VC++
-// prohibits creation of objects with destructors on stack in functions
-// using __try (see error C2712).
-static internal::String* FormatSehExceptionMessage(DWORD exception_code,
- const char* location) {
- Message message;
- message << "SEH exception with code 0x" << std::setbase(16) <<
- exception_code << std::setbase(10) << " thrown in " << location << ".";
-
- return new internal::String(message.GetString());
-}
-
-#endif // GTEST_HAS_SEH
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Adds an "exception thrown" fatal failure to the current test.
-static internal::String FormatCxxExceptionMessage(const char* description,
- const char* location) {
- Message message;
- if (description != NULL) {
- message << "C++ exception with description \"" << description << "\"";
- } else {
- message << "Unknown C++ exception";
- }
- message << " thrown in " << location << ".";
-
- return message.GetString();
-}
-
-static internal::String PrintTestPartResultToString(
- const TestPartResult& test_part_result);
-
-// A failed Google Test assertion will throw an exception of this type when
-// GTEST_FLAG(throw_on_failure) is true (if exceptions are enabled). We
-// derive it from std::runtime_error, which is for errors presumably
-// detectable only at run time. Since std::runtime_error inherits from
-// std::exception, many testing frameworks know how to extract and print the
-// message inside it.
-class GoogleTestFailureException : public ::std::runtime_error {
- public:
- explicit GoogleTestFailureException(const TestPartResult& failure)
- : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {}
-};
-#endif // GTEST_HAS_EXCEPTIONS
-
-namespace internal {
-// We put these helper functions in the internal namespace as IBM's xlC
-// compiler rejects the code if they were declared static.
-
-// Runs the given method and handles SEH exceptions it throws, when
-// SEH is supported; returns the 0-value for type Result in case of an
-// SEH exception. (Microsoft compilers cannot handle SEH and C++
-// exceptions in the same function. Therefore, we provide a separate
-// wrapper function for handling SEH exceptions.)
-template <class T, typename Result>
-Result HandleSehExceptionsInMethodIfSupported(
- T* object, Result (T::*method)(), const char* location) {
-#if GTEST_HAS_SEH
- __try {
- return (object->*method)();
- } __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT
- GetExceptionCode())) {
- // We create the exception message on the heap because VC++ prohibits
- // creation of objects with destructors on stack in functions using __try
- // (see error C2712).
- internal::String* exception_message = FormatSehExceptionMessage(
- GetExceptionCode(), location);
- internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,
- *exception_message);
- delete exception_message;
- return static_cast<Result>(0);
- }
-#else
- (void)location;
- return (object->*method)();
-#endif // GTEST_HAS_SEH
-}
-
-// Runs the given method and catches and reports C++ and/or SEH-style
-// exceptions, if they are supported; returns the 0-value for type
-// Result in case of an SEH exception.
-template <class T, typename Result>
-Result HandleExceptionsInMethodIfSupported(
- T* object, Result (T::*method)(), const char* location) {
- // NOTE: The user code can affect the way in which Google Test handles
- // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
- // RUN_ALL_TESTS() starts. It is technically possible to check the flag
- // after the exception is caught and either report or re-throw the
- // exception based on the flag's value:
- //
- // try {
- // // Perform the test method.
- // } catch (...) {
- // if (GTEST_FLAG(catch_exceptions))
- // // Report the exception as failure.
- // else
- // throw; // Re-throws the original exception.
- // }
- //
- // However, the purpose of this flag is to allow the program to drop into
- // the debugger when the exception is thrown. On most platforms, once the
- // control enters the catch block, the exception origin information is
- // lost and the debugger will stop the program at the point of the
- // re-throw in this function -- instead of at the point of the original
- // throw statement in the code under test. For this reason, we perform
- // the check early, sacrificing the ability to affect Google Test's
- // exception handling in the method where the exception is thrown.
- if (internal::GetUnitTestImpl()->catch_exceptions()) {
-#if GTEST_HAS_EXCEPTIONS
- try {
- return HandleSehExceptionsInMethodIfSupported(object, method, location);
- } catch (const GoogleTestFailureException&) { // NOLINT
- // This exception doesn't originate in code under test. It makes no
- // sense to report it as a test failure.
- throw;
- } catch (const std::exception& e) { // NOLINT
- internal::ReportFailureInUnknownLocation(
- TestPartResult::kFatalFailure,
- FormatCxxExceptionMessage(e.what(), location));
- } catch (...) { // NOLINT
- internal::ReportFailureInUnknownLocation(
- TestPartResult::kFatalFailure,
- FormatCxxExceptionMessage(NULL, location));
- }
- return static_cast<Result>(0);
-#else
- return HandleSehExceptionsInMethodIfSupported(object, method, location);
-#endif // GTEST_HAS_EXCEPTIONS
- } else {
- return (object->*method)();
- }
-}
-
-} // namespace internal
-
-// Runs the test and updates the test result.
-void Test::Run() {
- if (!HasSameFixtureClass()) return;
-
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()");
- // We will run the test only if SetUp() was successful.
- if (!HasFatalFailure()) {
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &Test::TestBody, "the test body");
- }
-
- // However, we want to clean up as much as possible. Hence we will
- // always call TearDown(), even if SetUp() or the test body has
- // failed.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &Test::TearDown, "TearDown()");
-}
-
-// Returns true iff the current test has a fatal failure.
-bool Test::HasFatalFailure() {
- return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();
-}
-
-// Returns true iff the current test has a non-fatal failure.
-bool Test::HasNonfatalFailure() {
- return internal::GetUnitTestImpl()->current_test_result()->
- HasNonfatalFailure();
-}
-
-// class TestInfo
-
-// Constructs a TestInfo object. It assumes ownership of the test factory
-// object.
-// TODO(vladl@google.com): Make a_test_case_name and a_name const string&'s
-// to signify they cannot be NULLs.
-TestInfo::TestInfo(const char* a_test_case_name,
- const char* a_name,
- const char* a_type_param,
- const char* a_value_param,
- internal::TypeId fixture_class_id,
- internal::TestFactoryBase* factory)
- : test_case_name_(a_test_case_name),
- name_(a_name),
- type_param_(a_type_param ? new std::string(a_type_param) : NULL),
- value_param_(a_value_param ? new std::string(a_value_param) : NULL),
- fixture_class_id_(fixture_class_id),
- should_run_(false),
- is_disabled_(false),
- matches_filter_(false),
- factory_(factory),
- result_() {}
-
-// Destructs a TestInfo object.
-TestInfo::~TestInfo() { delete factory_; }
-
-namespace internal {
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// name: name of the test
-// type_param: the name of the test's type parameter, or NULL if
-// this is not a typed or a type-parameterized test.
-// value_param: text representation of the test's value parameter,
-// or NULL if this is not a value-parameterized test.
-// fixture_class_id: ID of the test fixture class
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-// factory: pointer to the factory that creates a test object.
-// The newly created TestInfo instance will assume
-// ownership of the factory object.
-TestInfo* MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- TypeId fixture_class_id,
- SetUpTestCaseFunc set_up_tc,
- TearDownTestCaseFunc tear_down_tc,
- TestFactoryBase* factory) {
- TestInfo* const test_info =
- new TestInfo(test_case_name, name, type_param, value_param,
- fixture_class_id, factory);
- GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);
- return test_info;
-}
-
-#if GTEST_HAS_PARAM_TEST
-void ReportInvalidTestCaseType(const char* test_case_name,
- const char* file, int line) {
- Message errors;
- errors
- << "Attempted redefinition of test case " << test_case_name << ".\n"
- << "All tests in the same test case must use the same test fixture\n"
- << "class. However, in test case " << test_case_name << ", you tried\n"
- << "to define a test using a fixture class different from the one\n"
- << "used earlier. This can happen if the two fixture classes are\n"
- << "from different namespaces and have the same name. You should\n"
- << "probably rename one of the classes to put the tests into different\n"
- << "test cases.";
-
- fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
- errors.GetString().c_str());
-}
-#endif // GTEST_HAS_PARAM_TEST
-
-} // namespace internal
-
-namespace {
-
-// A predicate that checks the test name of a TestInfo against a known
-// value.
-//
-// This is used for implementation of the TestCase class only. We put
-// it in the anonymous namespace to prevent polluting the outer
-// namespace.
-//
-// TestNameIs is copyable.
-class TestNameIs {
- public:
- // Constructor.
- //
- // TestNameIs has NO default constructor.
- explicit TestNameIs(const char* name)
- : name_(name) {}
-
- // Returns true iff the test name of test_info matches name_.
- bool operator()(const TestInfo * test_info) const {
- return test_info && internal::String(test_info->name()).Compare(name_) == 0;
- }
-
- private:
- internal::String name_;
-};
-
-} // namespace
-
-namespace internal {
-
-// This method expands all parameterized tests registered with macros TEST_P
-// and INSTANTIATE_TEST_CASE_P into regular tests and registers those.
-// This will be done just once during the program runtime.
-void UnitTestImpl::RegisterParameterizedTests() {
-#if GTEST_HAS_PARAM_TEST
- if (!parameterized_tests_registered_) {
- parameterized_test_registry_.RegisterTests();
- parameterized_tests_registered_ = true;
- }
-#endif
-}
-
-} // namespace internal
-
-// Creates the test object, runs it, records its result, and then
-// deletes it.
-void TestInfo::Run() {
- if (!should_run_) return;
-
- // Tells UnitTest where to store test result.
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->set_current_test_info(this);
-
- TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
-
- // Notifies the unit test event listeners that a test is about to start.
- repeater->OnTestStart(*this);
-
- const TimeInMillis start = internal::GetTimeInMillis();
-
- impl->os_stack_trace_getter()->UponLeavingGTest();
-
- // Creates the test object.
- Test* const test = internal::HandleExceptionsInMethodIfSupported(
- factory_, &internal::TestFactoryBase::CreateTest,
- "the test fixture's constructor");
-
- // Runs the test only if the test object was created and its
- // constructor didn't generate a fatal failure.
- if ((test != NULL) && !Test::HasFatalFailure()) {
- // This doesn't throw as all user code that can throw are wrapped into
- // exception handling code.
- test->Run();
- }
-
- // Deletes the test object.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- test, &Test::DeleteSelf_, "the test fixture's destructor");
-
- result_.set_elapsed_time(internal::GetTimeInMillis() - start);
-
- // Notifies the unit test event listener that a test has just finished.
- repeater->OnTestEnd(*this);
-
- // Tells UnitTest to stop associating assertion results to this
- // test.
- impl->set_current_test_info(NULL);
-}
-
-// class TestCase
-
-// Gets the number of successful tests in this test case.
-int TestCase::successful_test_count() const {
- return CountIf(test_info_list_, TestPassed);
-}
-
-// Gets the number of failed tests in this test case.
-int TestCase::failed_test_count() const {
- return CountIf(test_info_list_, TestFailed);
-}
-
-int TestCase::disabled_test_count() const {
- return CountIf(test_info_list_, TestDisabled);
-}
-
-// Get the number of tests in this test case that should run.
-int TestCase::test_to_run_count() const {
- return CountIf(test_info_list_, ShouldRunTest);
-}
-
-// Gets the number of all tests.
-int TestCase::total_test_count() const {
- return static_cast<int>(test_info_list_.size());
-}
-
-// Creates a TestCase with the given name.
-//
-// Arguments:
-//
-// name: name of the test case
-// a_type_param: the name of the test case's type parameter, or NULL if
-// this is not a typed or a type-parameterized test case.
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-TestCase::TestCase(const char* a_name, const char* a_type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc)
- : name_(a_name),
- type_param_(a_type_param ? new std::string(a_type_param) : NULL),
- set_up_tc_(set_up_tc),
- tear_down_tc_(tear_down_tc),
- should_run_(false),
- elapsed_time_(0) {
-}
-
-// Destructor of TestCase.
-TestCase::~TestCase() {
- // Deletes every Test in the collection.
- ForEach(test_info_list_, internal::Delete<TestInfo>);
-}
-
-// Returns the i-th test among all the tests. i can range from 0 to
-// total_test_count() - 1. If i is not in that range, returns NULL.
-const TestInfo* TestCase::GetTestInfo(int i) const {
- const int index = GetElementOr(test_indices_, i, -1);
- return index < 0 ? NULL : test_info_list_[index];
-}
-
-// Returns the i-th test among all the tests. i can range from 0 to
-// total_test_count() - 1. If i is not in that range, returns NULL.
-TestInfo* TestCase::GetMutableTestInfo(int i) {
- const int index = GetElementOr(test_indices_, i, -1);
- return index < 0 ? NULL : test_info_list_[index];
-}
-
-// Adds a test to this test case. Will delete the test upon
-// destruction of the TestCase object.
-void TestCase::AddTestInfo(TestInfo * test_info) {
- test_info_list_.push_back(test_info);
- test_indices_.push_back(static_cast<int>(test_indices_.size()));
-}
-
-// Runs every test in this TestCase.
-void TestCase::Run() {
- if (!should_run_) return;
-
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->set_current_test_case(this);
-
- TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
-
- repeater->OnTestCaseStart(*this);
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &TestCase::RunSetUpTestCase, "SetUpTestCase()");
-
- const internal::TimeInMillis start = internal::GetTimeInMillis();
- for (int i = 0; i < total_test_count(); i++) {
- GetMutableTestInfo(i)->Run();
- }
- elapsed_time_ = internal::GetTimeInMillis() - start;
-
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &TestCase::RunTearDownTestCase, "TearDownTestCase()");
-
- repeater->OnTestCaseEnd(*this);
- impl->set_current_test_case(NULL);
-}
-
-// Clears the results of all tests in this test case.
-void TestCase::ClearResult() {
- ForEach(test_info_list_, TestInfo::ClearTestResult);
-}
-
-// Shuffles the tests in this test case.
-void TestCase::ShuffleTests(internal::Random* random) {
- Shuffle(random, &test_indices_);
-}
-
-// Restores the test order to before the first shuffle.
-void TestCase::UnshuffleTests() {
- for (size_t i = 0; i < test_indices_.size(); i++) {
- test_indices_[i] = static_cast<int>(i);
- }
-}
-
-// Formats a countable noun. Depending on its quantity, either the
-// singular form or the plural form is used. e.g.
-//
-// FormatCountableNoun(1, "formula", "formuli") returns "1 formula".
-// FormatCountableNoun(5, "book", "books") returns "5 books".
-static internal::String FormatCountableNoun(int count,
- const char * singular_form,
- const char * plural_form) {
- return internal::String::Format("%d %s", count,
- count == 1 ? singular_form : plural_form);
-}
-
-// Formats the count of tests.
-static internal::String FormatTestCount(int test_count) {
- return FormatCountableNoun(test_count, "test", "tests");
-}
-
-// Formats the count of test cases.
-static internal::String FormatTestCaseCount(int test_case_count) {
- return FormatCountableNoun(test_case_count, "test case", "test cases");
-}
-
-// Converts a TestPartResult::Type enum to human-friendly string
-// representation. Both kNonFatalFailure and kFatalFailure are translated
-// to "Failure", as the user usually doesn't care about the difference
-// between the two when viewing the test result.
-static const char * TestPartResultTypeToString(TestPartResult::Type type) {
- switch (type) {
- case TestPartResult::kSuccess:
- return "Success";
-
- case TestPartResult::kNonFatalFailure:
- case TestPartResult::kFatalFailure:
-#ifdef _MSC_VER
- return "error: ";
-#else
- return "Failure\n";
-#endif
- default:
- return "Unknown result type";
- }
-}
-
-// Prints a TestPartResult to a String.
-static internal::String PrintTestPartResultToString(
- const TestPartResult& test_part_result) {
- return (Message()
- << internal::FormatFileLocation(test_part_result.file_name(),
- test_part_result.line_number())
- << " " << TestPartResultTypeToString(test_part_result.type())
- << test_part_result.message()).GetString();
-}
-
-// Prints a TestPartResult.
-static void PrintTestPartResult(const TestPartResult& test_part_result) {
- const internal::String& result =
- PrintTestPartResultToString(test_part_result);
- printf("%s\n", result.c_str());
- fflush(stdout);
- // If the test program runs in Visual Studio or a debugger, the
- // following statements add the test part result message to the Output
- // window such that the user can double-click on it to jump to the
- // corresponding source code location; otherwise they do nothing.
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- // We don't call OutputDebugString*() on Windows Mobile, as printing
- // to stdout is done by OutputDebugString() there already - we don't
- // want the same message printed twice.
- ::OutputDebugStringA(result.c_str());
- ::OutputDebugStringA("\n");
-#endif
-}
-
-// class PrettyUnitTestResultPrinter
-
-namespace internal {
-
-enum GTestColor {
- COLOR_DEFAULT,
- COLOR_RED,
- COLOR_GREEN,
- COLOR_YELLOW
-};
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
-
-// Returns the character attribute for the given color.
-WORD GetColorAttribute(GTestColor color) {
- switch (color) {
- case COLOR_RED: return FOREGROUND_RED;
- case COLOR_GREEN: return FOREGROUND_GREEN;
- case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN;
- default: return 0;
- }
-}
-
-#else
-
-// Returns the ANSI color code for the given color. COLOR_DEFAULT is
-// an invalid input.
-const char* GetAnsiColorCode(GTestColor color) {
- switch (color) {
- case COLOR_RED: return "1";
- case COLOR_GREEN: return "2";
- case COLOR_YELLOW: return "3";
- default: return NULL;
- };
-}
-
-#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
-
-// Returns true iff Google Test should use colors in the output.
-bool ShouldUseColor(bool stdout_is_tty) {
- const char* const gtest_color = GTEST_FLAG(color).c_str();
-
- if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
-#if GTEST_OS_WINDOWS
- // On Windows the TERM variable is usually not set, but the
- // console there does support colors.
- return stdout_is_tty;
-#else
- // On non-Windows platforms, we rely on the TERM variable.
- const char* const term = posix::GetEnv("TERM");
- const bool term_supports_color =
- String::CStringEquals(term, "xterm") ||
- String::CStringEquals(term, "xterm-color") ||
- String::CStringEquals(term, "xterm-256color") ||
- String::CStringEquals(term, "screen") ||
- String::CStringEquals(term, "linux") ||
- String::CStringEquals(term, "cygwin");
- return stdout_is_tty && term_supports_color;
-#endif // GTEST_OS_WINDOWS
- }
-
- return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
- String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
- String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
- String::CStringEquals(gtest_color, "1");
- // We take "yes", "true", "t", and "1" as meaning "yes". If the
- // value is neither one of these nor "auto", we treat it as "no" to
- // be conservative.
-}
-
-// Helpers for printing colored strings to stdout. Note that on Windows, we
-// cannot simply emit special characters and have the terminal change colors.
-// This routine must actually emit the characters rather than return a string
-// that would be colored when printed, as can be done on Linux.
-void ColoredPrintf(GTestColor color, const char* fmt, ...) {
- va_list args;
- va_start(args, fmt);
-
-#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
- const bool use_color = false;
-#else
- static const bool in_color_mode =
- ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
- const bool use_color = in_color_mode && (color != COLOR_DEFAULT);
-#endif // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
- // The '!= 0' comparison is necessary to satisfy MSVC 7.1.
-
- if (!use_color) {
- vprintf(fmt, args);
- va_end(args);
- return;
- }
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
-
- // Gets the current text color.
- CONSOLE_SCREEN_BUFFER_INFO buffer_info;
- GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
- const WORD old_color_attrs = buffer_info.wAttributes;
-
- // We need to flush the stream buffers into the console before each
- // SetConsoleTextAttribute call lest it affect the text that is already
- // printed but has not yet reached the console.
- fflush(stdout);
- SetConsoleTextAttribute(stdout_handle,
- GetColorAttribute(color) | FOREGROUND_INTENSITY);
- vprintf(fmt, args);
-
- fflush(stdout);
- // Restores the text color.
- SetConsoleTextAttribute(stdout_handle, old_color_attrs);
-#else
- printf("\033[0;3%sm", GetAnsiColorCode(color));
- vprintf(fmt, args);
- printf("\033[m"); // Resets the terminal to default.
-#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- va_end(args);
-}
-
-void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
- const char* const type_param = test_info.type_param();
- const char* const value_param = test_info.value_param();
-
- if (type_param != NULL || value_param != NULL) {
- printf(", where ");
- if (type_param != NULL) {
- printf("TypeParam = %s", type_param);
- if (value_param != NULL)
- printf(" and ");
- }
- if (value_param != NULL) {
- printf("GetParam() = %s", value_param);
- }
- }
-}
-
-// This class implements the TestEventListener interface.
-//
-// Class PrettyUnitTestResultPrinter is copyable.
-class PrettyUnitTestResultPrinter : public TestEventListener {
- public:
- PrettyUnitTestResultPrinter() {}
- static void PrintTestName(const char * test_case, const char * test) {
- printf("%s.%s", test_case, test);
- }
-
- // The following methods override what's in the TestEventListener class.
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestCaseStart(const TestCase& test_case);
- virtual void OnTestStart(const TestInfo& test_info);
- virtual void OnTestPartResult(const TestPartResult& result);
- virtual void OnTestEnd(const TestInfo& test_info);
- virtual void OnTestCaseEnd(const TestCase& test_case);
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
-
- private:
- static void PrintFailedTests(const UnitTest& unit_test);
-
- internal::String test_case_name_;
-};
-
- // Fired before each iteration of tests starts.
-void PrettyUnitTestResultPrinter::OnTestIterationStart(
- const UnitTest& unit_test, int iteration) {
- if (GTEST_FLAG(repeat) != 1)
- printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
-
- const char* const filter = GTEST_FLAG(filter).c_str();
-
- // Prints the filter if it's not *. This reminds the user that some
- // tests may be skipped.
- if (!internal::String::CStringEquals(filter, kUniversalFilter)) {
- ColoredPrintf(COLOR_YELLOW,
- "Note: %s filter = %s\n", GTEST_NAME_, filter);
- }
-
- if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
- const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
- ColoredPrintf(COLOR_YELLOW,
- "Note: This is test shard %d of %s.\n",
- static_cast<int>(shard_index) + 1,
- internal::posix::GetEnv(kTestTotalShards));
- }
-
- if (GTEST_FLAG(shuffle)) {
- ColoredPrintf(COLOR_YELLOW,
- "Note: Randomizing tests' orders with a seed of %d .\n",
- unit_test.random_seed());
- }
-
- ColoredPrintf(COLOR_GREEN, "[==========] ");
- printf("Running %s from %s.\n",
- FormatTestCount(unit_test.test_to_run_count()).c_str(),
- FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(
- const UnitTest& /*unit_test*/) {
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("Global test environment set-up.\n");
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
- test_case_name_ = test_case.name();
- const internal::String counts =
- FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("%s from %s", counts.c_str(), test_case_name_.c_str());
- if (test_case.type_param() == NULL) {
- printf("\n");
- } else {
- printf(", where TypeParam = %s\n", test_case.type_param());
- }
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {
- ColoredPrintf(COLOR_GREEN, "[ RUN ] ");
- PrintTestName(test_case_name_.c_str(), test_info.name());
- printf("\n");
- fflush(stdout);
-}
-
-// Called after an assertion failure.
-void PrettyUnitTestResultPrinter::OnTestPartResult(
- const TestPartResult& result) {
- // If the test part succeeded, we don't need to do anything.
- if (result.type() == TestPartResult::kSuccess)
- return;
-
- // Print failure message from the assertion (e.g. expected this and got that).
- PrintTestPartResult(result);
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) {
- if (test_info.result()->Passed()) {
- ColoredPrintf(COLOR_GREEN, "[ OK ] ");
- } else {
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- }
- PrintTestName(test_case_name_.c_str(), test_info.name());
- if (test_info.result()->Failed())
- PrintFullTestCommentIfPresent(test_info);
-
- if (GTEST_FLAG(print_time)) {
- printf(" (%s ms)\n", internal::StreamableToString(
- test_info.result()->elapsed_time()).c_str());
- } else {
- printf("\n");
- }
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) {
- if (!GTEST_FLAG(print_time)) return;
-
- test_case_name_ = test_case.name();
- const internal::String counts =
- FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("%s from %s (%s ms total)\n\n",
- counts.c_str(), test_case_name_.c_str(),
- internal::StreamableToString(test_case.elapsed_time()).c_str());
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart(
- const UnitTest& /*unit_test*/) {
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("Global test environment tear-down\n");
- fflush(stdout);
-}
-
-// Internal helper for printing the list of failed tests.
-void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {
- const int failed_test_count = unit_test.failed_test_count();
- if (failed_test_count == 0) {
- return;
- }
-
- for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
- const TestCase& test_case = *unit_test.GetTestCase(i);
- if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {
- continue;
- }
- for (int j = 0; j < test_case.total_test_count(); ++j) {
- const TestInfo& test_info = *test_case.GetTestInfo(j);
- if (!test_info.should_run() || test_info.result()->Passed()) {
- continue;
- }
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- printf("%s.%s", test_case.name(), test_info.name());
- PrintFullTestCommentIfPresent(test_info);
- printf("\n");
- }
- }
-}
-
-void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
- int /*iteration*/) {
- ColoredPrintf(COLOR_GREEN, "[==========] ");
- printf("%s from %s ran.",
- FormatTestCount(unit_test.test_to_run_count()).c_str(),
- FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
- if (GTEST_FLAG(print_time)) {
- printf(" (%s ms total)",
- internal::StreamableToString(unit_test.elapsed_time()).c_str());
- }
- printf("\n");
- ColoredPrintf(COLOR_GREEN, "[ PASSED ] ");
- printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str());
-
- int num_failures = unit_test.failed_test_count();
- if (!unit_test.Passed()) {
- const int failed_test_count = unit_test.failed_test_count();
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str());
- PrintFailedTests(unit_test);
- printf("\n%2d FAILED %s\n", num_failures,
- num_failures == 1 ? "TEST" : "TESTS");
- }
-
- int num_disabled = unit_test.disabled_test_count();
- if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) {
- if (!num_failures) {
- printf("\n"); // Add a spacer if no FAILURE banner is displayed.
- }
- ColoredPrintf(COLOR_YELLOW,
- " YOU HAVE %d DISABLED %s\n\n",
- num_disabled,
- num_disabled == 1 ? "TEST" : "TESTS");
- }
- // Ensure that Google Test output is printed before, e.g., heapchecker output.
- fflush(stdout);
-}
-
-// End PrettyUnitTestResultPrinter
-
-// class TestEventRepeater
-//
-// This class forwards events to other event listeners.
-class TestEventRepeater : public TestEventListener {
- public:
- TestEventRepeater() : forwarding_enabled_(true) {}
- virtual ~TestEventRepeater();
- void Append(TestEventListener *listener);
- TestEventListener* Release(TestEventListener* listener);
-
- // Controls whether events will be forwarded to listeners_. Set to false
- // in death test child processes.
- bool forwarding_enabled() const { return forwarding_enabled_; }
- void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; }
-
- virtual void OnTestProgramStart(const UnitTest& unit_test);
- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test);
- virtual void OnTestCaseStart(const TestCase& test_case);
- virtual void OnTestStart(const TestInfo& test_info);
- virtual void OnTestPartResult(const TestPartResult& result);
- virtual void OnTestEnd(const TestInfo& test_info);
- virtual void OnTestCaseEnd(const TestCase& test_case);
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test);
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
- virtual void OnTestProgramEnd(const UnitTest& unit_test);
-
- private:
- // Controls whether events will be forwarded to listeners_. Set to false
- // in death test child processes.
- bool forwarding_enabled_;
- // The list of listeners that receive events.
- std::vector<TestEventListener*> listeners_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater);
-};
-
-TestEventRepeater::~TestEventRepeater() {
- ForEach(listeners_, Delete<TestEventListener>);
-}
-
-void TestEventRepeater::Append(TestEventListener *listener) {
- listeners_.push_back(listener);
-}
-
-// TODO(vladl@google.com): Factor the search functionality into Vector::Find.
-TestEventListener* TestEventRepeater::Release(TestEventListener *listener) {
- for (size_t i = 0; i < listeners_.size(); ++i) {
- if (listeners_[i] == listener) {
- listeners_.erase(listeners_.begin() + i);
- return listener;
- }
- }
-
- return NULL;
-}
-
-// Since most methods are very similar, use macros to reduce boilerplate.
-// This defines a member that forwards the call to all listeners.
-#define GTEST_REPEATER_METHOD_(Name, Type) \
-void TestEventRepeater::Name(const Type& parameter) { \
- if (forwarding_enabled_) { \
- for (size_t i = 0; i < listeners_.size(); i++) { \
- listeners_[i]->Name(parameter); \
- } \
- } \
-}
-// This defines a member that forwards the call to all listeners in reverse
-// order.
-#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \
-void TestEventRepeater::Name(const Type& parameter) { \
- if (forwarding_enabled_) { \
- for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) { \
- listeners_[i]->Name(parameter); \
- } \
- } \
-}
-
-GTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest)
-GTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest)
-GTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase)
-GTEST_REPEATER_METHOD_(OnTestStart, TestInfo)
-GTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult)
-GTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestCase)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest)
-
-#undef GTEST_REPEATER_METHOD_
-#undef GTEST_REVERSE_REPEATER_METHOD_
-
-void TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test,
- int iteration) {
- if (forwarding_enabled_) {
- for (size_t i = 0; i < listeners_.size(); i++) {
- listeners_[i]->OnTestIterationStart(unit_test, iteration);
- }
- }
-}
-
-void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test,
- int iteration) {
- if (forwarding_enabled_) {
- for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) {
- listeners_[i]->OnTestIterationEnd(unit_test, iteration);
- }
- }
-}
-
-// End TestEventRepeater
-
-// This class generates an XML output file.
-class XmlUnitTestResultPrinter : public EmptyTestEventListener {
- public:
- explicit XmlUnitTestResultPrinter(const char* output_file);
-
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
-
- private:
- // Is c a whitespace character that is normalized to a space character
- // when it appears in an XML attribute value?
- static bool IsNormalizableWhitespace(char c) {
- return c == 0x9 || c == 0xA || c == 0xD;
- }
-
- // May c appear in a well-formed XML document?
- static bool IsValidXmlCharacter(char c) {
- return IsNormalizableWhitespace(c) || c >= 0x20;
- }
-
- // Returns an XML-escaped copy of the input string str. If
- // is_attribute is true, the text is meant to appear as an attribute
- // value, and normalizable whitespace is preserved by replacing it
- // with character references.
- static String EscapeXml(const char* str, bool is_attribute);
-
- // Returns the given string with all characters invalid in XML removed.
- static string RemoveInvalidXmlCharacters(const string& str);
-
- // Convenience wrapper around EscapeXml when str is an attribute value.
- static String EscapeXmlAttribute(const char* str) {
- return EscapeXml(str, true);
- }
-
- // Convenience wrapper around EscapeXml when str is not an attribute value.
- static String EscapeXmlText(const char* str) { return EscapeXml(str, false); }
-
- // Streams an XML CDATA section, escaping invalid CDATA sequences as needed.
- static void OutputXmlCDataSection(::std::ostream* stream, const char* data);
-
- // Streams an XML representation of a TestInfo object.
- static void OutputXmlTestInfo(::std::ostream* stream,
- const char* test_case_name,
- const TestInfo& test_info);
-
- // Prints an XML representation of a TestCase object
- static void PrintXmlTestCase(FILE* out, const TestCase& test_case);
-
- // Prints an XML summary of unit_test to output stream out.
- static void PrintXmlUnitTest(FILE* out, const UnitTest& unit_test);
-
- // Produces a string representing the test properties in a result as space
- // delimited XML attributes based on the property key="value" pairs.
- // When the String is not empty, it includes a space at the beginning,
- // to delimit this attribute from prior attributes.
- static String TestPropertiesAsXmlAttributes(const TestResult& result);
-
- // The output file.
- const String output_file_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter);
-};
-
-// Creates a new XmlUnitTestResultPrinter.
-XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)
- : output_file_(output_file) {
- if (output_file_.c_str() == NULL || output_file_.empty()) {
- fprintf(stderr, "XML output file may not be null\n");
- fflush(stderr);
- exit(EXIT_FAILURE);
- }
-}
-
-// Called after the unit test ends.
-void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
- int /*iteration*/) {
- FILE* xmlout = NULL;
- FilePath output_file(output_file_);
- FilePath output_dir(output_file.RemoveFileName());
-
- if (output_dir.CreateDirectoriesRecursively()) {
- xmlout = posix::FOpen(output_file_.c_str(), "w");
- }
- if (xmlout == NULL) {
- // TODO(wan): report the reason of the failure.
- //
- // We don't do it for now as:
- //
- // 1. There is no urgent need for it.
- // 2. It's a bit involved to make the errno variable thread-safe on
- // all three operating systems (Linux, Windows, and Mac OS).
- // 3. To interpret the meaning of errno in a thread-safe way,
- // we need the strerror_r() function, which is not available on
- // Windows.
- fprintf(stderr,
- "Unable to open file \"%s\"\n",
- output_file_.c_str());
- fflush(stderr);
- exit(EXIT_FAILURE);
- }
- PrintXmlUnitTest(xmlout, unit_test);
- fclose(xmlout);
-}
-
-// Returns an XML-escaped copy of the input string str. If is_attribute
-// is true, the text is meant to appear as an attribute value, and
-// normalizable whitespace is preserved by replacing it with character
-// references.
-//
-// Invalid XML characters in str, if any, are stripped from the output.
-// It is expected that most, if not all, of the text processed by this
-// module will consist of ordinary English text.
-// If this module is ever modified to produce version 1.1 XML output,
-// most invalid characters can be retained using character references.
-// TODO(wan): It might be nice to have a minimally invasive, human-readable
-// escaping scheme for invalid characters, rather than dropping them.
-String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_attribute) {
- Message m;
-
- if (str != NULL) {
- for (const char* src = str; *src; ++src) {
- switch (*src) {
- case '<':
- m << "&lt;";
- break;
- case '>':
- m << "&gt;";
- break;
- case '&':
- m << "&amp;";
- break;
- case '\'':
- if (is_attribute)
- m << "&apos;";
- else
- m << '\'';
- break;
- case '"':
- if (is_attribute)
- m << "&quot;";
- else
- m << '"';
- break;
- default:
- if (IsValidXmlCharacter(*src)) {
- if (is_attribute && IsNormalizableWhitespace(*src))
- m << String::Format("&#x%02X;", unsigned(*src));
- else
- m << *src;
- }
- break;
- }
- }
- }
-
- return m.GetString();
-}
-
-// Returns the given string with all characters invalid in XML removed.
-// Currently invalid characters are dropped from the string. An
-// alternative is to replace them with certain characters such as . or ?.
-string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const string& str) {
- string output;
- output.reserve(str.size());
- for (string::const_iterator it = str.begin(); it != str.end(); ++it)
- if (IsValidXmlCharacter(*it))
- output.push_back(*it);
-
- return output;
-}
-
-// The following routines generate an XML representation of a UnitTest
-// object.
-//
-// This is how Google Test concepts map to the DTD:
-//
-// <testsuites name="AllTests"> <-- corresponds to a UnitTest object
-// <testsuite name="testcase-name"> <-- corresponds to a TestCase object
-// <testcase name="test-name"> <-- corresponds to a TestInfo object
-// <failure message="...">...</failure>
-// <failure message="...">...</failure>
-// <failure message="...">...</failure>
-// <-- individual assertion failures
-// </testcase>
-// </testsuite>
-// </testsuites>
-
-// Formats the given time in milliseconds as seconds.
-std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
- ::std::stringstream ss;
- ss << ms/1000.0;
- return ss.str();
-}
-
-// Streams an XML CDATA section, escaping invalid CDATA sequences as needed.
-void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,
- const char* data) {
- const char* segment = data;
- *stream << "<![CDATA[";
- for (;;) {
- const char* const next_segment = strstr(segment, "]]>");
- if (next_segment != NULL) {
- stream->write(
- segment, static_cast<std::streamsize>(next_segment - segment));
- *stream << "]]>]]&gt;<![CDATA[";
- segment = next_segment + strlen("]]>");
- } else {
- *stream << segment;
- break;
- }
- }
- *stream << "]]>";
-}
-
-// Prints an XML representation of a TestInfo object.
-// TODO(wan): There is also value in printing properties with the plain printer.
-void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
- const char* test_case_name,
- const TestInfo& test_info) {
- const TestResult& result = *test_info.result();
- *stream << " <testcase name=\""
- << EscapeXmlAttribute(test_info.name()).c_str() << "\"";
-
- if (test_info.value_param() != NULL) {
- *stream << " value_param=\"" << EscapeXmlAttribute(test_info.value_param())
- << "\"";
- }
- if (test_info.type_param() != NULL) {
- *stream << " type_param=\"" << EscapeXmlAttribute(test_info.type_param())
- << "\"";
- }
-
- *stream << " status=\""
- << (test_info.should_run() ? "run" : "notrun")
- << "\" time=\""
- << FormatTimeInMillisAsSeconds(result.elapsed_time())
- << "\" classname=\"" << EscapeXmlAttribute(test_case_name).c_str()
- << "\"" << TestPropertiesAsXmlAttributes(result).c_str();
-
- int failures = 0;
- for (int i = 0; i < result.total_part_count(); ++i) {
- const TestPartResult& part = result.GetTestPartResult(i);
- if (part.failed()) {
- if (++failures == 1)
- *stream << ">\n";
- *stream << " <failure message=\""
- << EscapeXmlAttribute(part.summary()).c_str()
- << "\" type=\"\">";
- const string location = internal::FormatCompilerIndependentFileLocation(
- part.file_name(), part.line_number());
- const string message = location + "\n" + part.message();
- OutputXmlCDataSection(stream,
- RemoveInvalidXmlCharacters(message).c_str());
- *stream << "</failure>\n";
- }
- }
-
- if (failures == 0)
- *stream << " />\n";
- else
- *stream << " </testcase>\n";
-}
-
-// Prints an XML representation of a TestCase object
-void XmlUnitTestResultPrinter::PrintXmlTestCase(FILE* out,
- const TestCase& test_case) {
- fprintf(out,
- " <testsuite name=\"%s\" tests=\"%d\" failures=\"%d\" "
- "disabled=\"%d\" ",
- EscapeXmlAttribute(test_case.name()).c_str(),
- test_case.total_test_count(),
- test_case.failed_test_count(),
- test_case.disabled_test_count());
- fprintf(out,
- "errors=\"0\" time=\"%s\">\n",
- FormatTimeInMillisAsSeconds(test_case.elapsed_time()).c_str());
- for (int i = 0; i < test_case.total_test_count(); ++i) {
- ::std::stringstream stream;
- OutputXmlTestInfo(&stream, test_case.name(), *test_case.GetTestInfo(i));
- fprintf(out, "%s", StringStreamToString(&stream).c_str());
- }
- fprintf(out, " </testsuite>\n");
-}
-
-// Prints an XML summary of unit_test to output stream out.
-void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out,
- const UnitTest& unit_test) {
- fprintf(out, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- fprintf(out,
- "<testsuites tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
- "errors=\"0\" time=\"%s\" ",
- unit_test.total_test_count(),
- unit_test.failed_test_count(),
- unit_test.disabled_test_count(),
- FormatTimeInMillisAsSeconds(unit_test.elapsed_time()).c_str());
- if (GTEST_FLAG(shuffle)) {
- fprintf(out, "random_seed=\"%d\" ", unit_test.random_seed());
- }
- fprintf(out, "name=\"AllTests\">\n");
- for (int i = 0; i < unit_test.total_test_case_count(); ++i)
- PrintXmlTestCase(out, *unit_test.GetTestCase(i));
- fprintf(out, "</testsuites>\n");
-}
-
-// Produces a string representing the test properties in a result as space
-// delimited XML attributes based on the property key="value" pairs.
-String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
- const TestResult& result) {
- Message attributes;
- for (int i = 0; i < result.test_property_count(); ++i) {
- const TestProperty& property = result.GetTestProperty(i);
- attributes << " " << property.key() << "="
- << "\"" << EscapeXmlAttribute(property.value()) << "\"";
- }
- return attributes.GetString();
-}
-
-// End XmlUnitTestResultPrinter
-
-#if GTEST_CAN_STREAM_RESULTS_
-
-// Streams test results to the given port on the given host machine.
-class StreamingListener : public EmptyTestEventListener {
- public:
- // Escapes '=', '&', '%', and '\n' characters in str as "%xx".
- static string UrlEncode(const char* str);
-
- StreamingListener(const string& host, const string& port)
- : sockfd_(-1), host_name_(host), port_num_(port) {
- MakeConnection();
- Send("gtest_streaming_protocol_version=1.0\n");
- }
-
- virtual ~StreamingListener() {
- if (sockfd_ != -1)
- CloseConnection();
- }
-
- void OnTestProgramStart(const UnitTest& /* unit_test */) {
- Send("event=TestProgramStart\n");
- }
-
- void OnTestProgramEnd(const UnitTest& unit_test) {
- // Note that Google Test current only report elapsed time for each
- // test iteration, not for the entire test program.
- Send(String::Format("event=TestProgramEnd&passed=%d\n",
- unit_test.Passed()));
-
- // Notify the streaming server to stop.
- CloseConnection();
- }
-
- void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) {
- Send(String::Format("event=TestIterationStart&iteration=%d\n",
- iteration));
- }
-
- void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) {
- Send(String::Format("event=TestIterationEnd&passed=%d&elapsed_time=%sms\n",
- unit_test.Passed(),
- StreamableToString(unit_test.elapsed_time()).c_str()));
- }
-
- void OnTestCaseStart(const TestCase& test_case) {
- Send(String::Format("event=TestCaseStart&name=%s\n", test_case.name()));
- }
-
- void OnTestCaseEnd(const TestCase& test_case) {
- Send(String::Format("event=TestCaseEnd&passed=%d&elapsed_time=%sms\n",
- test_case.Passed(),
- StreamableToString(test_case.elapsed_time()).c_str()));
- }
-
- void OnTestStart(const TestInfo& test_info) {
- Send(String::Format("event=TestStart&name=%s\n", test_info.name()));
- }
-
- void OnTestEnd(const TestInfo& test_info) {
- Send(String::Format(
- "event=TestEnd&passed=%d&elapsed_time=%sms\n",
- (test_info.result())->Passed(),
- StreamableToString((test_info.result())->elapsed_time()).c_str()));
- }
-
- void OnTestPartResult(const TestPartResult& test_part_result) {
- const char* file_name = test_part_result.file_name();
- if (file_name == NULL)
- file_name = "";
- Send(String::Format("event=TestPartResult&file=%s&line=%d&message=",
- UrlEncode(file_name).c_str(),
- test_part_result.line_number()));
- Send(UrlEncode(test_part_result.message()) + "\n");
- }
-
- private:
- // Creates a client socket and connects to the server.
- void MakeConnection();
-
- // Closes the socket.
- void CloseConnection() {
- GTEST_CHECK_(sockfd_ != -1)
- << "CloseConnection() can be called only when there is a connection.";
-
- close(sockfd_);
- sockfd_ = -1;
- }
-
- // Sends a string to the socket.
- void Send(const string& message) {
- GTEST_CHECK_(sockfd_ != -1)
- << "Send() can be called only when there is a connection.";
-
- const int len = static_cast<int>(message.length());
- if (write(sockfd_, message.c_str(), len) != len) {
- GTEST_LOG_(WARNING)
- << "stream_result_to: failed to stream to "
- << host_name_ << ":" << port_num_;
- }
- }
-
- int sockfd_; // socket file descriptor
- const string host_name_;
- const string port_num_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener);
-}; // class StreamingListener
-
-// Checks if str contains '=', '&', '%' or '\n' characters. If yes,
-// replaces them by "%xx" where xx is their hexadecimal value. For
-// example, replaces "=" with "%3D". This algorithm is O(strlen(str))
-// in both time and space -- important as the input str may contain an
-// arbitrarily long test failure message and stack trace.
-string StreamingListener::UrlEncode(const char* str) {
- string result;
- result.reserve(strlen(str) + 1);
- for (char ch = *str; ch != '\0'; ch = *++str) {
- switch (ch) {
- case '%':
- case '=':
- case '&':
- case '\n':
- result.append(String::Format("%%%02x", static_cast<unsigned char>(ch)));
- break;
- default:
- result.push_back(ch);
- break;
- }
- }
- return result;
-}
-
-void StreamingListener::MakeConnection() {
- GTEST_CHECK_(sockfd_ == -1)
- << "MakeConnection() can't be called when there is already a connection.";
-
- addrinfo hints;
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC; // To allow both IPv4 and IPv6 addresses.
- hints.ai_socktype = SOCK_STREAM;
- addrinfo* servinfo = NULL;
-
- // Use the getaddrinfo() to get a linked list of IP addresses for
- // the given host name.
- const int error_num = getaddrinfo(
- host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);
- if (error_num != 0) {
- GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: "
- << gai_strerror(error_num);
- }
-
- // Loop through all the results and connect to the first we can.
- for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != NULL;
- cur_addr = cur_addr->ai_next) {
- sockfd_ = socket(
- cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol);
- if (sockfd_ != -1) {
- // Connect the client socket to the server socket.
- if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {
- close(sockfd_);
- sockfd_ = -1;
- }
- }
- }
-
- freeaddrinfo(servinfo); // all done with this structure
-
- if (sockfd_ == -1) {
- GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to "
- << host_name_ << ":" << port_num_;
- }
-}
-
-// End of class Streaming Listener
-#endif // GTEST_CAN_STREAM_RESULTS__
-
-// Class ScopedTrace
-
-// Pushes the given source file location and message onto a per-thread
-// trace stack maintained by Google Test.
-// L < UnitTest::mutex_
-ScopedTrace::ScopedTrace(const char* file, int line, const Message& message) {
- TraceInfo trace;
- trace.file = file;
- trace.line = line;
- trace.message = message.GetString();
-
- UnitTest::GetInstance()->PushGTestTrace(trace);
-}
-
-// Pops the info pushed by the c'tor.
-// L < UnitTest::mutex_
-ScopedTrace::~ScopedTrace() {
- UnitTest::GetInstance()->PopGTestTrace();
-}
-
-
-// class OsStackTraceGetter
-
-// Returns the current OS stack trace as a String. Parameters:
-//
-// max_depth - the maximum number of stack frames to be included
-// in the trace.
-// skip_count - the number of top frames to be skipped; doesn't count
-// against max_depth.
-//
-// L < mutex_
-// We use "L < mutex_" to denote that the function may acquire mutex_.
-String OsStackTraceGetter::CurrentStackTrace(int, int) {
- return String("");
-}
-
-// L < mutex_
-void OsStackTraceGetter::UponLeavingGTest() {
-}
-
-const char* const
-OsStackTraceGetter::kElidedFramesMarker =
- "... " GTEST_NAME_ " internal frames ...";
-
-} // namespace internal
-
-// class TestEventListeners
-
-TestEventListeners::TestEventListeners()
- : repeater_(new internal::TestEventRepeater()),
- default_result_printer_(NULL),
- default_xml_generator_(NULL) {
-}
-
-TestEventListeners::~TestEventListeners() { delete repeater_; }
-
-// Returns the standard listener responsible for the default console
-// output. Can be removed from the listeners list to shut down default
-// console output. Note that removing this object from the listener list
-// with Release transfers its ownership to the user.
-void TestEventListeners::Append(TestEventListener* listener) {
- repeater_->Append(listener);
-}
-
-// Removes the given event listener from the list and returns it. It then
-// becomes the caller's responsibility to delete the listener. Returns
-// NULL if the listener is not found in the list.
-TestEventListener* TestEventListeners::Release(TestEventListener* listener) {
- if (listener == default_result_printer_)
- default_result_printer_ = NULL;
- else if (listener == default_xml_generator_)
- default_xml_generator_ = NULL;
- return repeater_->Release(listener);
-}
-
-// Returns repeater that broadcasts the TestEventListener events to all
-// subscribers.
-TestEventListener* TestEventListeners::repeater() { return repeater_; }
-
-// Sets the default_result_printer attribute to the provided listener.
-// The listener is also added to the listener list and previous
-// default_result_printer is removed from it and deleted. The listener can
-// also be NULL in which case it will not be added to the list. Does
-// nothing if the previous and the current listener objects are the same.
-void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {
- if (default_result_printer_ != listener) {
- // It is an error to pass this method a listener that is already in the
- // list.
- delete Release(default_result_printer_);
- default_result_printer_ = listener;
- if (listener != NULL)
- Append(listener);
- }
-}
-
-// Sets the default_xml_generator attribute to the provided listener. The
-// listener is also added to the listener list and previous
-// default_xml_generator is removed from it and deleted. The listener can
-// also be NULL in which case it will not be added to the list. Does
-// nothing if the previous and the current listener objects are the same.
-void TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) {
- if (default_xml_generator_ != listener) {
- // It is an error to pass this method a listener that is already in the
- // list.
- delete Release(default_xml_generator_);
- default_xml_generator_ = listener;
- if (listener != NULL)
- Append(listener);
- }
-}
-
-// Controls whether events will be forwarded by the repeater to the
-// listeners in the list.
-bool TestEventListeners::EventForwardingEnabled() const {
- return repeater_->forwarding_enabled();
-}
-
-void TestEventListeners::SuppressEventForwarding() {
- repeater_->set_forwarding_enabled(false);
-}
-
-// class UnitTest
-
-// Gets the singleton UnitTest object. The first time this method is
-// called, a UnitTest object is constructed and returned. Consecutive
-// calls will return the same object.
-//
-// We don't protect this under mutex_ as a user is not supposed to
-// call this before main() starts, from which point on the return
-// value will never change.
-UnitTest * UnitTest::GetInstance() {
- // When compiled with MSVC 7.1 in optimized mode, destroying the
- // UnitTest object upon exiting the program messes up the exit code,
- // causing successful tests to appear failed. We have to use a
- // different implementation in this case to bypass the compiler bug.
- // This implementation makes the compiler happy, at the cost of
- // leaking the UnitTest object.
-
- // CodeGear C++Builder insists on a public destructor for the
- // default implementation. Use this implementation to keep good OO
- // design with private destructor.
-
-#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
- static UnitTest* const instance = new UnitTest;
- return instance;
-#else
- static UnitTest instance;
- return &instance;
-#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
-}
-
-// Gets the number of successful test cases.
-int UnitTest::successful_test_case_count() const {
- return impl()->successful_test_case_count();
-}
-
-// Gets the number of failed test cases.
-int UnitTest::failed_test_case_count() const {
- return impl()->failed_test_case_count();
-}
-
-// Gets the number of all test cases.
-int UnitTest::total_test_case_count() const {
- return impl()->total_test_case_count();
-}
-
-// Gets the number of all test cases that contain at least one test
-// that should run.
-int UnitTest::test_case_to_run_count() const {
- return impl()->test_case_to_run_count();
-}
-
-// Gets the number of successful tests.
-int UnitTest::successful_test_count() const {
- return impl()->successful_test_count();
-}
-
-// Gets the number of failed tests.
-int UnitTest::failed_test_count() const { return impl()->failed_test_count(); }
-
-// Gets the number of disabled tests.
-int UnitTest::disabled_test_count() const {
- return impl()->disabled_test_count();
-}
-
-// Gets the number of all tests.
-int UnitTest::total_test_count() const { return impl()->total_test_count(); }
-
-// Gets the number of tests that should run.
-int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }
-
-// Gets the elapsed time, in milliseconds.
-internal::TimeInMillis UnitTest::elapsed_time() const {
- return impl()->elapsed_time();
-}
-
-// Returns true iff the unit test passed (i.e. all test cases passed).
-bool UnitTest::Passed() const { return impl()->Passed(); }
-
-// Returns true iff the unit test failed (i.e. some test case failed
-// or something outside of all tests failed).
-bool UnitTest::Failed() const { return impl()->Failed(); }
-
-// Gets the i-th test case among all the test cases. i can range from 0 to
-// total_test_case_count() - 1. If i is not in that range, returns NULL.
-const TestCase* UnitTest::GetTestCase(int i) const {
- return impl()->GetTestCase(i);
-}
-
-// Gets the i-th test case among all the test cases. i can range from 0 to
-// total_test_case_count() - 1. If i is not in that range, returns NULL.
-TestCase* UnitTest::GetMutableTestCase(int i) {
- return impl()->GetMutableTestCase(i);
-}
-
-// Returns the list of event listeners that can be used to track events
-// inside Google Test.
-TestEventListeners& UnitTest::listeners() {
- return *impl()->listeners();
-}
-
-// Registers and returns a global test environment. When a test
-// program is run, all global test environments will be set-up in the
-// order they were registered. After all tests in the program have
-// finished, all global test environments will be torn-down in the
-// *reverse* order they were registered.
-//
-// The UnitTest object takes ownership of the given environment.
-//
-// We don't protect this under mutex_, as we only support calling it
-// from the main thread.
-Environment* UnitTest::AddEnvironment(Environment* env) {
- if (env == NULL) {
- return NULL;
- }
-
- impl_->environments().push_back(env);
- return env;
-}
-
-// Adds a TestPartResult to the current TestResult object. All Google Test
-// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call
-// this to report their results. The user code should use the
-// assertion macros instead of calling this directly.
-// L < mutex_
-void UnitTest::AddTestPartResult(TestPartResult::Type result_type,
- const char* file_name,
- int line_number,
- const internal::String& message,
- const internal::String& os_stack_trace) {
- Message msg;
- msg << message;
-
- internal::MutexLock lock(&mutex_);
- if (impl_->gtest_trace_stack().size() > 0) {
- msg << "\n" << GTEST_NAME_ << " trace:";
-
- for (int i = static_cast<int>(impl_->gtest_trace_stack().size());
- i > 0; --i) {
- const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1];
- msg << "\n" << internal::FormatFileLocation(trace.file, trace.line)
- << " " << trace.message;
- }
- }
-
- if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) {
- msg << internal::kStackTraceMarker << os_stack_trace;
- }
-
- const TestPartResult result =
- TestPartResult(result_type, file_name, line_number,
- msg.GetString().c_str());
- impl_->GetTestPartResultReporterForCurrentThread()->
- ReportTestPartResult(result);
-
- if (result_type != TestPartResult::kSuccess) {
- // gtest_break_on_failure takes precedence over
- // gtest_throw_on_failure. This allows a user to set the latter
- // in the code (perhaps in order to use Google Test assertions
- // with another testing framework) and specify the former on the
- // command line for debugging.
- if (GTEST_FLAG(break_on_failure)) {
-#if GTEST_OS_WINDOWS
- // Using DebugBreak on Windows allows gtest to still break into a debugger
- // when a failure happens and both the --gtest_break_on_failure and
- // the --gtest_catch_exceptions flags are specified.
- DebugBreak();
-#else
- // Dereference NULL through a volatile pointer to prevent the compiler
- // from removing. We use this rather than abort() or __builtin_trap() for
- // portability: Symbian doesn't implement abort() well, and some debuggers
- // don't correctly trap abort().
- *static_cast<volatile int*>(NULL) = 1;
-#endif // GTEST_OS_WINDOWS
- } else if (GTEST_FLAG(throw_on_failure)) {
-#if GTEST_HAS_EXCEPTIONS
- throw GoogleTestFailureException(result);
-#else
- // We cannot call abort() as it generates a pop-up in debug mode
- // that cannot be suppressed in VC 7.1 or below.
- exit(1);
-#endif
- }
- }
-}
-
-// Creates and adds a property to the current TestResult. If a property matching
-// the supplied value already exists, updates its value instead.
-void UnitTest::RecordPropertyForCurrentTest(const char* key,
- const char* value) {
- const TestProperty test_property(key, value);
- impl_->current_test_result()->RecordProperty(test_property);
-}
-
-// Runs all tests in this UnitTest object and prints the result.
-// Returns 0 if successful, or 1 otherwise.
-//
-// We don't protect this under mutex_, as we only support calling it
-// from the main thread.
-int UnitTest::Run() {
- // Captures the value of GTEST_FLAG(catch_exceptions). This value will be
- // used for the duration of the program.
- impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));
-
-#if GTEST_HAS_SEH
- const bool in_death_test_child_process =
- internal::GTEST_FLAG(internal_run_death_test).length() > 0;
-
- // Either the user wants Google Test to catch exceptions thrown by the
- // tests or this is executing in the context of death test child
- // process. In either case the user does not want to see pop-up dialogs
- // about crashes - they are expected.
- if (impl()->catch_exceptions() || in_death_test_child_process) {
-
-# if !GTEST_OS_WINDOWS_MOBILE
- // SetErrorMode doesn't exist on CE.
- SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
- SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
-# endif // !GTEST_OS_WINDOWS_MOBILE
-
-# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE
- // Death test children can be terminated with _abort(). On Windows,
- // _abort() can show a dialog with a warning message. This forces the
- // abort message to go to stderr instead.
- _set_error_mode(_OUT_TO_STDERR);
-# endif
-
-# if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
- // In the debug version, Visual Studio pops up a separate dialog
- // offering a choice to debug the aborted program. We need to suppress
- // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
- // executed. Google Test will notify the user of any unexpected
- // failure via stderr.
- //
- // VC++ doesn't define _set_abort_behavior() prior to the version 8.0.
- // Users of prior VC versions shall suffer the agony and pain of
- // clicking through the countless debug dialogs.
- // TODO(vladl@google.com): find a way to suppress the abort dialog() in the
- // debug mode when compiled with VC 7.1 or lower.
- if (!GTEST_FLAG(break_on_failure))
- _set_abort_behavior(
- 0x0, // Clear the following flags:
- _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump.
-# endif
-
- }
-#endif // GTEST_HAS_SEH
-
- return internal::HandleExceptionsInMethodIfSupported(
- impl(),
- &internal::UnitTestImpl::RunAllTests,
- "auxiliary test code (environments or event listeners)") ? 0 : 1;
-}
-
-// Returns the working directory when the first TEST() or TEST_F() was
-// executed.
-const char* UnitTest::original_working_dir() const {
- return impl_->original_working_dir_.c_str();
-}
-
-// Returns the TestCase object for the test that's currently running,
-// or NULL if no test is running.
-// L < mutex_
-const TestCase* UnitTest::current_test_case() const {
- internal::MutexLock lock(&mutex_);
- return impl_->current_test_case();
-}
-
-// Returns the TestInfo object for the test that's currently running,
-// or NULL if no test is running.
-// L < mutex_
-const TestInfo* UnitTest::current_test_info() const {
- internal::MutexLock lock(&mutex_);
- return impl_->current_test_info();
-}
-
-// Returns the random seed used at the start of the current test run.
-int UnitTest::random_seed() const { return impl_->random_seed(); }
-
-#if GTEST_HAS_PARAM_TEST
-// Returns ParameterizedTestCaseRegistry object used to keep track of
-// value-parameterized tests and instantiate and register them.
-// L < mutex_
-internal::ParameterizedTestCaseRegistry&
- UnitTest::parameterized_test_registry() {
- return impl_->parameterized_test_registry();
-}
-#endif // GTEST_HAS_PARAM_TEST
-
-// Creates an empty UnitTest.
-UnitTest::UnitTest() {
- impl_ = new internal::UnitTestImpl(this);
-}
-
-// Destructor of UnitTest.
-UnitTest::~UnitTest() {
- delete impl_;
-}
-
-// Pushes a trace defined by SCOPED_TRACE() on to the per-thread
-// Google Test trace stack.
-// L < mutex_
-void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) {
- internal::MutexLock lock(&mutex_);
- impl_->gtest_trace_stack().push_back(trace);
-}
-
-// Pops a trace from the per-thread Google Test trace stack.
-// L < mutex_
-void UnitTest::PopGTestTrace() {
- internal::MutexLock lock(&mutex_);
- impl_->gtest_trace_stack().pop_back();
-}
-
-namespace internal {
-
-UnitTestImpl::UnitTestImpl(UnitTest* parent)
- : parent_(parent),
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4355) // Temporarily disables warning 4355
- // (using this in initializer).
- default_global_test_part_result_reporter_(this),
- default_per_thread_test_part_result_reporter_(this),
-# pragma warning(pop) // Restores the warning state again.
-#else
- default_global_test_part_result_reporter_(this),
- default_per_thread_test_part_result_reporter_(this),
-#endif // _MSC_VER
- global_test_part_result_repoter_(
- &default_global_test_part_result_reporter_),
- per_thread_test_part_result_reporter_(
- &default_per_thread_test_part_result_reporter_),
-#if GTEST_HAS_PARAM_TEST
- parameterized_test_registry_(),
- parameterized_tests_registered_(false),
-#endif // GTEST_HAS_PARAM_TEST
- last_death_test_case_(-1),
- current_test_case_(NULL),
- current_test_info_(NULL),
- ad_hoc_test_result_(),
- os_stack_trace_getter_(NULL),
- post_flag_parse_init_performed_(false),
- random_seed_(0), // Will be overridden by the flag before first use.
- random_(0), // Will be reseeded before first use.
- elapsed_time_(0),
-#if GTEST_HAS_DEATH_TEST
- internal_run_death_test_flag_(NULL),
- death_test_factory_(new DefaultDeathTestFactory),
-#endif
- // Will be overridden by the flag before first use.
- catch_exceptions_(false) {
- listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);
-}
-
-UnitTestImpl::~UnitTestImpl() {
- // Deletes every TestCase.
- ForEach(test_cases_, internal::Delete<TestCase>);
-
- // Deletes every Environment.
- ForEach(environments_, internal::Delete<Environment>);
-
- delete os_stack_trace_getter_;
-}
-
-#if GTEST_HAS_DEATH_TEST
-// Disables event forwarding if the control is currently in a death test
-// subprocess. Must not be called before InitGoogleTest.
-void UnitTestImpl::SuppressTestEventsIfInSubprocess() {
- if (internal_run_death_test_flag_.get() != NULL)
- listeners()->SuppressEventForwarding();
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// Initializes event listeners performing XML output as specified by
-// UnitTestOptions. Must not be called before InitGoogleTest.
-void UnitTestImpl::ConfigureXmlOutput() {
- const String& output_format = UnitTestOptions::GetOutputFormat();
- if (output_format == "xml") {
- listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
- } else if (output_format != "") {
- printf("WARNING: unrecognized output format \"%s\" ignored.\n",
- output_format.c_str());
- fflush(stdout);
- }
-}
-
-#if GTEST_CAN_STREAM_RESULTS_
-// Initializes event listeners for streaming test results in String form.
-// Must not be called before InitGoogleTest.
-void UnitTestImpl::ConfigureStreamingOutput() {
- const string& target = GTEST_FLAG(stream_result_to);
- if (!target.empty()) {
- const size_t pos = target.find(':');
- if (pos != string::npos) {
- listeners()->Append(new StreamingListener(target.substr(0, pos),
- target.substr(pos+1)));
- } else {
- printf("WARNING: unrecognized streaming target \"%s\" ignored.\n",
- target.c_str());
- fflush(stdout);
- }
- }
-}
-#endif // GTEST_CAN_STREAM_RESULTS_
-
-// Performs initialization dependent upon flag values obtained in
-// ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to
-// ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest
-// this function is also called from RunAllTests. Since this function can be
-// called more than once, it has to be idempotent.
-void UnitTestImpl::PostFlagParsingInit() {
- // Ensures that this function does not execute more than once.
- if (!post_flag_parse_init_performed_) {
- post_flag_parse_init_performed_ = true;
-
-#if GTEST_HAS_DEATH_TEST
- InitDeathTestSubprocessControlInfo();
- SuppressTestEventsIfInSubprocess();
-#endif // GTEST_HAS_DEATH_TEST
-
- // Registers parameterized tests. This makes parameterized tests
- // available to the UnitTest reflection API without running
- // RUN_ALL_TESTS.
- RegisterParameterizedTests();
-
- // Configures listeners for XML output. This makes it possible for users
- // to shut down the default XML output before invoking RUN_ALL_TESTS.
- ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
- // Configures listeners for streaming test results to the specified server.
- ConfigureStreamingOutput();
-#endif // GTEST_CAN_STREAM_RESULTS_
- }
-}
-
-// A predicate that checks the name of a TestCase against a known
-// value.
-//
-// This is used for implementation of the UnitTest class only. We put
-// it in the anonymous namespace to prevent polluting the outer
-// namespace.
-//
-// TestCaseNameIs is copyable.
-class TestCaseNameIs {
- public:
- // Constructor.
- explicit TestCaseNameIs(const String& name)
- : name_(name) {}
-
- // Returns true iff the name of test_case matches name_.
- bool operator()(const TestCase* test_case) const {
- return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;
- }
-
- private:
- String name_;
-};
-
-// Finds and returns a TestCase with the given name. If one doesn't
-// exist, creates one and returns it. It's the CALLER'S
-// RESPONSIBILITY to ensure that this function is only called WHEN THE
-// TESTS ARE NOT SHUFFLED.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// type_param: the name of the test case's type parameter, or NULL if
-// this is not a typed or a type-parameterized test case.
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
- const char* type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc) {
- // Can we find a TestCase with the given name?
- const std::vector<TestCase*>::const_iterator test_case =
- std::find_if(test_cases_.begin(), test_cases_.end(),
- TestCaseNameIs(test_case_name));
-
- if (test_case != test_cases_.end())
- return *test_case;
-
- // No. Let's create one.
- TestCase* const new_test_case =
- new TestCase(test_case_name, type_param, set_up_tc, tear_down_tc);
-
- // Is this a death test case?
- if (internal::UnitTestOptions::MatchesFilter(String(test_case_name),
- kDeathTestCaseFilter)) {
- // Yes. Inserts the test case after the last death test case
- // defined so far. This only works when the test cases haven't
- // been shuffled. Otherwise we may end up running a death test
- // after a non-death test.
- ++last_death_test_case_;
- test_cases_.insert(test_cases_.begin() + last_death_test_case_,
- new_test_case);
- } else {
- // No. Appends to the end of the list.
- test_cases_.push_back(new_test_case);
- }
-
- test_case_indices_.push_back(static_cast<int>(test_case_indices_.size()));
- return new_test_case;
-}
-
-// Helpers for setting up / tearing down the given environment. They
-// are for use in the ForEach() function.
-static void SetUpEnvironment(Environment* env) { env->SetUp(); }
-static void TearDownEnvironment(Environment* env) { env->TearDown(); }
-
-// Runs all tests in this UnitTest object, prints the result, and
-// returns true if all tests are successful. If any exception is
-// thrown during a test, the test is considered to be failed, but the
-// rest of the tests will still be run.
-//
-// When parameterized tests are enabled, it expands and registers
-// parameterized tests first in RegisterParameterizedTests().
-// All other functions called from RunAllTests() may safely assume that
-// parameterized tests are ready to be counted and run.
-bool UnitTestImpl::RunAllTests() {
- // Makes sure InitGoogleTest() was called.
- if (!GTestIsInitialized()) {
- printf("%s",
- "\nThis test program did NOT call ::testing::InitGoogleTest "
- "before calling RUN_ALL_TESTS(). Please fix it.\n");
- return false;
- }
-
- // Do not run any test if the --help flag was specified.
- if (g_help_flag)
- return true;
-
- // Repeats the call to the post-flag parsing initialization in case the
- // user didn't call InitGoogleTest.
- PostFlagParsingInit();
-
- // Even if sharding is not on, test runners may want to use the
- // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
- // protocol.
- internal::WriteToShardStatusFileIfNeeded();
-
- // True iff we are in a subprocess for running a thread-safe-style
- // death test.
- bool in_subprocess_for_death_test = false;
-
-#if GTEST_HAS_DEATH_TEST
- in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL);
-#endif // GTEST_HAS_DEATH_TEST
-
- const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,
- in_subprocess_for_death_test);
-
- // Compares the full test names with the filter to decide which
- // tests to run.
- const bool has_tests_to_run = FilterTests(should_shard
- ? HONOR_SHARDING_PROTOCOL
- : IGNORE_SHARDING_PROTOCOL) > 0;
-
- // Lists the tests and exits if the --gtest_list_tests flag was specified.
- if (GTEST_FLAG(list_tests)) {
- // This must be called *after* FilterTests() has been called.
- ListTestsMatchingFilter();
- return true;
- }
-
- random_seed_ = GTEST_FLAG(shuffle) ?
- GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0;
-
- // True iff at least one test has failed.
- bool failed = false;
-
- TestEventListener* repeater = listeners()->repeater();
-
- repeater->OnTestProgramStart(*parent_);
-
- // How many times to repeat the tests? We don't want to repeat them
- // when we are inside the subprocess of a death test.
- const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat);
- // Repeats forever if the repeat count is negative.
- const bool forever = repeat < 0;
- for (int i = 0; forever || i != repeat; i++) {
- // We want to preserve failures generated by ad-hoc test
- // assertions executed before RUN_ALL_TESTS().
- ClearNonAdHocTestResult();
-
- const TimeInMillis start = GetTimeInMillis();
-
- // Shuffles test cases and tests if requested.
- if (has_tests_to_run && GTEST_FLAG(shuffle)) {
- random()->Reseed(random_seed_);
- // This should be done before calling OnTestIterationStart(),
- // such that a test event listener can see the actual test order
- // in the event.
- ShuffleTests();
- }
-
- // Tells the unit test event listeners that the tests are about to start.
- repeater->OnTestIterationStart(*parent_, i);
-
- // Runs each test case if there is at least one test to run.
- if (has_tests_to_run) {
- // Sets up all environments beforehand.
- repeater->OnEnvironmentsSetUpStart(*parent_);
- ForEach(environments_, SetUpEnvironment);
- repeater->OnEnvironmentsSetUpEnd(*parent_);
-
- // Runs the tests only if there was no fatal failure during global
- // set-up.
- if (!Test::HasFatalFailure()) {
- for (int test_index = 0; test_index < total_test_case_count();
- test_index++) {
- GetMutableTestCase(test_index)->Run();
- }
- }
-
- // Tears down all environments in reverse order afterwards.
- repeater->OnEnvironmentsTearDownStart(*parent_);
- std::for_each(environments_.rbegin(), environments_.rend(),
- TearDownEnvironment);
- repeater->OnEnvironmentsTearDownEnd(*parent_);
- }
-
- elapsed_time_ = GetTimeInMillis() - start;
-
- // Tells the unit test event listener that the tests have just finished.
- repeater->OnTestIterationEnd(*parent_, i);
-
- // Gets the result and clears it.
- if (!Passed()) {
- failed = true;
- }
-
- // Restores the original test order after the iteration. This
- // allows the user to quickly repro a failure that happens in the
- // N-th iteration without repeating the first (N - 1) iterations.
- // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in
- // case the user somehow changes the value of the flag somewhere
- // (it's always safe to unshuffle the tests).
- UnshuffleTests();
-
- if (GTEST_FLAG(shuffle)) {
- // Picks a new random seed for each iteration.
- random_seed_ = GetNextRandomSeed(random_seed_);
- }
- }
-
- repeater->OnTestProgramEnd(*parent_);
-
- return !failed;
-}
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded() {
- const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);
- if (test_shard_file != NULL) {
- FILE* const file = posix::FOpen(test_shard_file, "w");
- if (file == NULL) {
- ColoredPrintf(COLOR_RED,
- "Could not write to the test shard status file \"%s\" "
- "specified by the %s environment variable.\n",
- test_shard_file, kTestShardStatusFile);
- fflush(stdout);
- exit(EXIT_FAILURE);
- }
- fclose(file);
- }
-}
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (i.e., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-bool ShouldShard(const char* total_shards_env,
- const char* shard_index_env,
- bool in_subprocess_for_death_test) {
- if (in_subprocess_for_death_test) {
- return false;
- }
-
- const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1);
- const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1);
-
- if (total_shards == -1 && shard_index == -1) {
- return false;
- } else if (total_shards == -1 && shard_index != -1) {
- const Message msg = Message()
- << "Invalid environment variables: you have "
- << kTestShardIndex << " = " << shard_index
- << ", but have left " << kTestTotalShards << " unset.\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- } else if (total_shards != -1 && shard_index == -1) {
- const Message msg = Message()
- << "Invalid environment variables: you have "
- << kTestTotalShards << " = " << total_shards
- << ", but have left " << kTestShardIndex << " unset.\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- } else if (shard_index < 0 || shard_index >= total_shards) {
- const Message msg = Message()
- << "Invalid environment variables: we require 0 <= "
- << kTestShardIndex << " < " << kTestTotalShards
- << ", but you have " << kTestShardIndex << "=" << shard_index
- << ", " << kTestTotalShards << "=" << total_shards << ".\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- }
-
- return total_shards > 1;
-}
-
-// Parses the environment variable var as an Int32. If it is unset,
-// returns default_val. If it is not an Int32, prints an error
-// and aborts.
-Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
- const char* str_val = posix::GetEnv(var);
- if (str_val == NULL) {
- return default_val;
- }
-
- Int32 result;
- if (!ParseInt32(Message() << "The value of environment variable " << var,
- str_val, &result)) {
- exit(EXIT_FAILURE);
- }
- return result;
-}
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true iff the test should be run on this shard. The test id is
-// some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
- return (test_id % total_shards) == shard_index;
-}
-
-// Compares the name of each test with the user-specified filter to
-// decide whether the test should be run, then records the result in
-// each TestCase and TestInfo object.
-// If shard_tests == true, further filters tests based on sharding
-// variables in the environment - see
-// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide.
-// Returns the number of tests that should run.
-int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
- const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?
- Int32FromEnvOrDie(kTestTotalShards, -1) : -1;
- const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ?
- Int32FromEnvOrDie(kTestShardIndex, -1) : -1;
-
- // num_runnable_tests are the number of tests that will
- // run across all shards (i.e., match filter and are not disabled).
- // num_selected_tests are the number of tests to be run on
- // this shard.
- int num_runnable_tests = 0;
- int num_selected_tests = 0;
- for (size_t i = 0; i < test_cases_.size(); i++) {
- TestCase* const test_case = test_cases_[i];
- const String &test_case_name = test_case->name();
- test_case->set_should_run(false);
-
- for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
- TestInfo* const test_info = test_case->test_info_list()[j];
- const String test_name(test_info->name());
- // A test is disabled if test case name or test name matches
- // kDisableTestFilter.
- const bool is_disabled =
- internal::UnitTestOptions::MatchesFilter(test_case_name,
- kDisableTestFilter) ||
- internal::UnitTestOptions::MatchesFilter(test_name,
- kDisableTestFilter);
- test_info->is_disabled_ = is_disabled;
-
- const bool matches_filter =
- internal::UnitTestOptions::FilterMatchesTest(test_case_name,
- test_name);
- test_info->matches_filter_ = matches_filter;
-
- const bool is_runnable =
- (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) &&
- matches_filter;
-
- const bool is_selected = is_runnable &&
- (shard_tests == IGNORE_SHARDING_PROTOCOL ||
- ShouldRunTestOnShard(total_shards, shard_index,
- num_runnable_tests));
-
- num_runnable_tests += is_runnable;
- num_selected_tests += is_selected;
-
- test_info->should_run_ = is_selected;
- test_case->set_should_run(test_case->should_run() || is_selected);
- }
- }
- return num_selected_tests;
-}
-
-// Prints the names of the tests matching the user-specified filter flag.
-void UnitTestImpl::ListTestsMatchingFilter() {
- for (size_t i = 0; i < test_cases_.size(); i++) {
- const TestCase* const test_case = test_cases_[i];
- bool printed_test_case_name = false;
-
- for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
- const TestInfo* const test_info =
- test_case->test_info_list()[j];
- if (test_info->matches_filter_) {
- if (!printed_test_case_name) {
- printed_test_case_name = true;
- printf("%s.\n", test_case->name());
- }
- printf(" %s\n", test_info->name());
- }
- }
- }
- fflush(stdout);
-}
-
-// Sets the OS stack trace getter.
-//
-// Does nothing if the input and the current OS stack trace getter are
-// the same; otherwise, deletes the old getter and makes the input the
-// current getter.
-void UnitTestImpl::set_os_stack_trace_getter(
- OsStackTraceGetterInterface* getter) {
- if (os_stack_trace_getter_ != getter) {
- delete os_stack_trace_getter_;
- os_stack_trace_getter_ = getter;
- }
-}
-
-// Returns the current OS stack trace getter if it is not NULL;
-// otherwise, creates an OsStackTraceGetter, makes it the current
-// getter, and returns it.
-OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
- if (os_stack_trace_getter_ == NULL) {
- os_stack_trace_getter_ = new OsStackTraceGetter;
- }
-
- return os_stack_trace_getter_;
-}
-
-// Returns the TestResult for the test that's currently running, or
-// the TestResult for the ad hoc test if no test is running.
-TestResult* UnitTestImpl::current_test_result() {
- return current_test_info_ ?
- &(current_test_info_->result_) : &ad_hoc_test_result_;
-}
-
-// Shuffles all test cases, and the tests within each test case,
-// making sure that death tests are still run first.
-void UnitTestImpl::ShuffleTests() {
- // Shuffles the death test cases.
- ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_);
-
- // Shuffles the non-death test cases.
- ShuffleRange(random(), last_death_test_case_ + 1,
- static_cast<int>(test_cases_.size()), &test_case_indices_);
-
- // Shuffles the tests inside each test case.
- for (size_t i = 0; i < test_cases_.size(); i++) {
- test_cases_[i]->ShuffleTests(random());
- }
-}
-
-// Restores the test cases and tests to their order before the first shuffle.
-void UnitTestImpl::UnshuffleTests() {
- for (size_t i = 0; i < test_cases_.size(); i++) {
- // Unshuffles the tests in each test case.
- test_cases_[i]->UnshuffleTests();
- // Resets the index of each test case.
- test_case_indices_[i] = static_cast<int>(i);
- }
-}
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
- int skip_count) {
- // We pass skip_count + 1 to skip this wrapper function in addition
- // to what the user really wants to skip.
- return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
-}
-
-// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to
-// suppress unreachable code warnings.
-namespace {
-class ClassUniqueToAlwaysTrue {};
-}
-
-bool IsTrue(bool condition) { return condition; }
-
-bool AlwaysTrue() {
-#if GTEST_HAS_EXCEPTIONS
- // This condition is always false so AlwaysTrue() never actually throws,
- // but it makes the compiler think that it may throw.
- if (IsTrue(false))
- throw ClassUniqueToAlwaysTrue();
-#endif // GTEST_HAS_EXCEPTIONS
- return true;
-}
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false. None of pstr, *pstr, and prefix can be NULL.
-bool SkipPrefix(const char* prefix, const char** pstr) {
- const size_t prefix_len = strlen(prefix);
- if (strncmp(*pstr, prefix, prefix_len) == 0) {
- *pstr += prefix_len;
- return true;
- }
- return false;
-}
-
-// Parses a string as a command line flag. The string should have
-// the format "--flag=value". When def_optional is true, the "=value"
-// part can be omitted.
-//
-// Returns the value of the flag, or NULL if the parsing failed.
-const char* ParseFlagValue(const char* str,
- const char* flag,
- bool def_optional) {
- // str and flag must not be NULL.
- if (str == NULL || flag == NULL) return NULL;
-
- // The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
- const String flag_str = String::Format("--%s%s", GTEST_FLAG_PREFIX_, flag);
- const size_t flag_len = flag_str.length();
- if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;
-
- // Skips the flag name.
- const char* flag_end = str + flag_len;
-
- // When def_optional is true, it's OK to not have a "=value" part.
- if (def_optional && (flag_end[0] == '\0')) {
- return flag_end;
- }
-
- // If def_optional is true and there are more characters after the
- // flag name, or if def_optional is false, there must be a '=' after
- // the flag name.
- if (flag_end[0] != '=') return NULL;
-
- // Returns the string after "=".
- return flag_end + 1;
-}
-
-// Parses a string for a bool flag, in the form of either
-// "--flag=value" or "--flag".
-//
-// In the former case, the value is taken as true as long as it does
-// not start with '0', 'f', or 'F'.
-//
-// In the latter case, the value is taken as true.
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, true);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Converts the string value to a bool.
- *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
- return true;
-}
-
-// Parses a string for an Int32 flag, in the form of
-// "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- return ParseInt32(Message() << "The value of flag --" << flag,
- value_str, value);
-}
-
-// Parses a string for a string flag, in the form of
-// "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseStringFlag(const char* str, const char* flag, String* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- *value = value_str;
- return true;
-}
-
-// Determines whether a string has a prefix that Google Test uses for its
-// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.
-// If Google Test detects that a command line flag has its prefix but is not
-// recognized, it will print its help message. Flags starting with
-// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test
-// internal flags and do not trigger the help message.
-static bool HasGoogleTestFlagPrefix(const char* str) {
- return (SkipPrefix("--", &str) ||
- SkipPrefix("-", &str) ||
- SkipPrefix("/", &str)) &&
- !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) &&
- (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||
- SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));
-}
-
-// Prints a string containing code-encoded text. The following escape
-// sequences can be used in the string to control the text color:
-//
-// @@ prints a single '@' character.
-// @R changes the color to red.
-// @G changes the color to green.
-// @Y changes the color to yellow.
-// @D changes to the default terminal text color.
-//
-// TODO(wan@google.com): Write tests for this once we add stdout
-// capturing to Google Test.
-static void PrintColorEncoded(const char* str) {
- GTestColor color = COLOR_DEFAULT; // The current color.
-
- // Conceptually, we split the string into segments divided by escape
- // sequences. Then we print one segment at a time. At the end of
- // each iteration, the str pointer advances to the beginning of the
- // next segment.
- for (;;) {
- const char* p = strchr(str, '@');
- if (p == NULL) {
- ColoredPrintf(color, "%s", str);
- return;
- }
-
- ColoredPrintf(color, "%s", String(str, p - str).c_str());
-
- const char ch = p[1];
- str = p + 2;
- if (ch == '@') {
- ColoredPrintf(color, "@");
- } else if (ch == 'D') {
- color = COLOR_DEFAULT;
- } else if (ch == 'R') {
- color = COLOR_RED;
- } else if (ch == 'G') {
- color = COLOR_GREEN;
- } else if (ch == 'Y') {
- color = COLOR_YELLOW;
- } else {
- --str;
- }
- }
-}
-
-static const char kColorEncodedHelpMessage[] =
-"This program contains tests written using " GTEST_NAME_ ". You can use the\n"
-"following command line flags to control its behavior:\n"
-"\n"
-"Test Selection:\n"
-" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n"
-" List the names of all tests instead of running them. The name of\n"
-" TEST(Foo, Bar) is \"Foo.Bar\".\n"
-" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS"
- "[@G-@YNEGATIVE_PATTERNS]@D\n"
-" Run only the tests whose name matches one of the positive patterns but\n"
-" none of the negative patterns. '?' matches any single character; '*'\n"
-" matches any substring; ':' separates two patterns.\n"
-" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n"
-" Run all disabled tests too.\n"
-"\n"
-"Test Execution:\n"
-" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n"
-" Run the tests repeatedly; use a negative count to repeat forever.\n"
-" @G--" GTEST_FLAG_PREFIX_ "shuffle@D\n"
-" Randomize tests' orders on every iteration.\n"
-" @G--" GTEST_FLAG_PREFIX_ "random_seed=@Y[NUMBER]@D\n"
-" Random number seed to use for shuffling test orders (between 1 and\n"
-" 99999, or 0 to use a seed based on the current time).\n"
-"\n"
-"Test Output:\n"
-" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n"
-" Enable/disable colored output. The default is @Gauto@D.\n"
-" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n"
-" Don't print the elapsed time of each test.\n"
-" @G--" GTEST_FLAG_PREFIX_ "output=xml@Y[@G:@YDIRECTORY_PATH@G"
- GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n"
-" Generate an XML report in the given directory or with the given file\n"
-" name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\n"
-#if GTEST_CAN_STREAM_RESULTS_
-" @G--" GTEST_FLAG_PREFIX_ "stream_result_to=@YHOST@G:@YPORT@D\n"
-" Stream test results to the given server.\n"
-#endif // GTEST_CAN_STREAM_RESULTS_
-"\n"
-"Assertion Behavior:\n"
-#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS
-" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n"
-" Set the default death test style.\n"
-#endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS
-" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n"
-" Turn assertion failures into debugger break-points.\n"
-" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n"
-" Turn assertion failures into C++ exceptions.\n"
-" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions=0@D\n"
-" Do not report exceptions as test failures. Instead, allow them\n"
-" to crash the program or throw a pop-up (on Windows).\n"
-"\n"
-"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set "
- "the corresponding\n"
-"environment variable of a flag (all letters in upper-case). For example, to\n"
-"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_
- "color=no@D or set\n"
-"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n"
-"\n"
-"For more information, please read the " GTEST_NAME_ " documentation at\n"
-"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n"
-"(not one in your own code or tests), please report it to\n"
-"@G<" GTEST_DEV_EMAIL_ ">@D.\n";
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test. The type parameter CharType can be
-// instantiated to either char or wchar_t.
-template <typename CharType>
-void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
- for (int i = 1; i < *argc; i++) {
- const String arg_string = StreamableToString(argv[i]);
- const char* const arg = arg_string.c_str();
-
- using internal::ParseBoolFlag;
- using internal::ParseInt32Flag;
- using internal::ParseStringFlag;
-
- // Do we see a Google Test flag?
- if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag,
- &GTEST_FLAG(also_run_disabled_tests)) ||
- ParseBoolFlag(arg, kBreakOnFailureFlag,
- &GTEST_FLAG(break_on_failure)) ||
- ParseBoolFlag(arg, kCatchExceptionsFlag,
- &GTEST_FLAG(catch_exceptions)) ||
- ParseStringFlag(arg, kColorFlag, &GTEST_FLAG(color)) ||
- ParseStringFlag(arg, kDeathTestStyleFlag,
- &GTEST_FLAG(death_test_style)) ||
- ParseBoolFlag(arg, kDeathTestUseFork,
- &GTEST_FLAG(death_test_use_fork)) ||
- ParseStringFlag(arg, kFilterFlag, &GTEST_FLAG(filter)) ||
- ParseStringFlag(arg, kInternalRunDeathTestFlag,
- &GTEST_FLAG(internal_run_death_test)) ||
- ParseBoolFlag(arg, kListTestsFlag, &GTEST_FLAG(list_tests)) ||
- ParseStringFlag(arg, kOutputFlag, &GTEST_FLAG(output)) ||
- ParseBoolFlag(arg, kPrintTimeFlag, &GTEST_FLAG(print_time)) ||
- ParseInt32Flag(arg, kRandomSeedFlag, &GTEST_FLAG(random_seed)) ||
- ParseInt32Flag(arg, kRepeatFlag, &GTEST_FLAG(repeat)) ||
- ParseBoolFlag(arg, kShuffleFlag, &GTEST_FLAG(shuffle)) ||
- ParseInt32Flag(arg, kStackTraceDepthFlag,
- &GTEST_FLAG(stack_trace_depth)) ||
- ParseStringFlag(arg, kStreamResultToFlag,
- &GTEST_FLAG(stream_result_to)) ||
- ParseBoolFlag(arg, kThrowOnFailureFlag,
- &GTEST_FLAG(throw_on_failure))
- ) {
- // Yes. Shift the remainder of the argv list left by one. Note
- // that argv has (*argc + 1) elements, the last one always being
- // NULL. The following loop moves the trailing NULL element as
- // well.
- for (int j = i; j != *argc; j++) {
- argv[j] = argv[j + 1];
- }
-
- // Decrements the argument count.
- (*argc)--;
-
- // We also need to decrement the iterator as we just removed
- // an element.
- i--;
- } else if (arg_string == "--help" || arg_string == "-h" ||
- arg_string == "-?" || arg_string == "/?" ||
- HasGoogleTestFlagPrefix(arg)) {
- // Both help flag and unrecognized Google Test flags (excluding
- // internal ones) trigger help display.
- g_help_flag = true;
- }
- }
-
- if (g_help_flag) {
- // We print the help here instead of in RUN_ALL_TESTS(), as the
- // latter may not be called at all if the user is using Google
- // Test with another testing framework.
- PrintColorEncoded(kColorEncodedHelpMessage);
- }
-}
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
- ParseGoogleTestFlagsOnlyImpl(argc, argv);
-}
-void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
- ParseGoogleTestFlagsOnlyImpl(argc, argv);
-}
-
-// The internal implementation of InitGoogleTest().
-//
-// The type parameter CharType can be instantiated to either char or
-// wchar_t.
-template <typename CharType>
-void InitGoogleTestImpl(int* argc, CharType** argv) {
- g_init_gtest_count++;
-
- // We don't want to run the initialization code twice.
- if (g_init_gtest_count != 1) return;
-
- if (*argc <= 0) return;
-
- internal::g_executable_path = internal::StreamableToString(argv[0]);
-
-#if GTEST_HAS_DEATH_TEST
-
- g_argvs.clear();
- for (int i = 0; i != *argc; i++) {
- g_argvs.push_back(StreamableToString(argv[i]));
- }
-
-#endif // GTEST_HAS_DEATH_TEST
-
- ParseGoogleTestFlagsOnly(argc, argv);
- GetUnitTestImpl()->PostFlagParsingInit();
-}
-
-} // namespace internal
-
-// Initializes Google Test. This must be called before calling
-// RUN_ALL_TESTS(). In particular, it parses a command line for the
-// flags that Google Test recognizes. Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-void InitGoogleTest(int* argc, char** argv) {
- internal::InitGoogleTestImpl(argc, argv);
-}
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleTest(int* argc, wchar_t** argv) {
- internal::InitGoogleTestImpl(argc, argv);
-}
-
-} // namespace testing
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev)
-//
-// This file implements death tests.
-
-
-#if GTEST_HAS_DEATH_TEST
-
-# if GTEST_OS_MAC
-# include <crt_externs.h>
-# endif // GTEST_OS_MAC
-
-# include <errno.h>
-# include <fcntl.h>
-# include <limits.h>
-# include <stdarg.h>
-
-# if GTEST_OS_WINDOWS
-# include <windows.h>
-# else
-# include <sys/mman.h>
-# include <sys/wait.h>
-# endif // GTEST_OS_WINDOWS
-
-#endif // GTEST_HAS_DEATH_TEST
-
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-// Constants.
-
-// The default death test style.
-static const char kDefaultDeathTestStyle[] = "fast";
-
-GTEST_DEFINE_string_(
- death_test_style,
- internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle),
- "Indicates how to run a death test in a forked child process: "
- "\"threadsafe\" (child process re-executes the test binary "
- "from the beginning, running only the specific death test) or "
- "\"fast\" (child process runs the death test immediately "
- "after forking).");
-
-GTEST_DEFINE_bool_(
- death_test_use_fork,
- internal::BoolFromGTestEnv("death_test_use_fork", false),
- "Instructs to use fork()/_exit() instead of clone() in death tests. "
- "Ignored and always uses fork() on POSIX systems where clone() is not "
- "implemented. Useful when running under valgrind or similar tools if "
- "those do not support clone(). Valgrind 3.3.1 will just fail if "
- "it sees an unsupported combination of clone() flags. "
- "It is not recommended to use this flag w/o valgrind though it will "
- "work in 99% of the cases. Once valgrind is fixed, this flag will "
- "most likely be removed.");
-
-namespace internal {
-GTEST_DEFINE_string_(
- internal_run_death_test, "",
- "Indicates the file, line number, temporal index of "
- "the single death test to run, and a file descriptor to "
- "which a success code may be sent, all separated by "
- "colons. This flag is specified if and only if the current "
- "process is a sub-process launched for running a thread-safe "
- "death test. FOR INTERNAL USE ONLY.");
-} // namespace internal
-
-#if GTEST_HAS_DEATH_TEST
-
-// ExitedWithCode constructor.
-ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) {
-}
-
-// ExitedWithCode function-call operator.
-bool ExitedWithCode::operator()(int exit_status) const {
-# if GTEST_OS_WINDOWS
-
- return exit_status == exit_code_;
-
-# else
-
- return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;
-
-# endif // GTEST_OS_WINDOWS
-}
-
-# if !GTEST_OS_WINDOWS
-// KilledBySignal constructor.
-KilledBySignal::KilledBySignal(int signum) : signum_(signum) {
-}
-
-// KilledBySignal function-call operator.
-bool KilledBySignal::operator()(int exit_status) const {
- return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_;
-}
-# endif // !GTEST_OS_WINDOWS
-
-namespace internal {
-
-// Utilities needed for death tests.
-
-// Generates a textual description of a given exit code, in the format
-// specified by wait(2).
-static String ExitSummary(int exit_code) {
- Message m;
-
-# if GTEST_OS_WINDOWS
-
- m << "Exited with exit status " << exit_code;
-
-# else
-
- if (WIFEXITED(exit_code)) {
- m << "Exited with exit status " << WEXITSTATUS(exit_code);
- } else if (WIFSIGNALED(exit_code)) {
- m << "Terminated by signal " << WTERMSIG(exit_code);
- }
-# ifdef WCOREDUMP
- if (WCOREDUMP(exit_code)) {
- m << " (core dumped)";
- }
-# endif
-# endif // GTEST_OS_WINDOWS
-
- return m.GetString();
-}
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-bool ExitedUnsuccessfully(int exit_status) {
- return !ExitedWithCode(0)(exit_status);
-}
-
-# if !GTEST_OS_WINDOWS
-// Generates a textual failure message when a death test finds more than
-// one thread running, or cannot determine the number of threads, prior
-// to executing the given statement. It is the responsibility of the
-// caller not to pass a thread_count of 1.
-static String DeathTestThreadWarning(size_t thread_count) {
- Message msg;
- msg << "Death tests use fork(), which is unsafe particularly"
- << " in a threaded context. For this test, " << GTEST_NAME_ << " ";
- if (thread_count == 0)
- msg << "couldn't detect the number of threads.";
- else
- msg << "detected " << thread_count << " threads.";
- return msg.GetString();
-}
-# endif // !GTEST_OS_WINDOWS
-
-// Flag characters for reporting a death test that did not die.
-static const char kDeathTestLived = 'L';
-static const char kDeathTestReturned = 'R';
-static const char kDeathTestThrew = 'T';
-static const char kDeathTestInternalError = 'I';
-
-// An enumeration describing all of the possible ways that a death test can
-// conclude. DIED means that the process died while executing the test
-// code; LIVED means that process lived beyond the end of the test code;
-// RETURNED means that the test statement attempted to execute a return
-// statement, which is not allowed; THREW means that the test statement
-// returned control by throwing an exception. IN_PROGRESS means the test
-// has not yet concluded.
-// TODO(vladl@google.com): Unify names and possibly values for
-// AbortReason, DeathTestOutcome, and flag characters above.
-enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };
-
-// Routine for aborting the program which is safe to call from an
-// exec-style death test child process, in which case the error
-// message is propagated back to the parent process. Otherwise, the
-// message is simply printed to stderr. In either case, the program
-// then exits with status 1.
-void DeathTestAbort(const String& message) {
- // On a POSIX system, this function may be called from a threadsafe-style
- // death test child process, which operates on a very small stack. Use
- // the heap for any additional non-minuscule memory requirements.
- const InternalRunDeathTestFlag* const flag =
- GetUnitTestImpl()->internal_run_death_test_flag();
- if (flag != NULL) {
- FILE* parent = posix::FDOpen(flag->write_fd(), "w");
- fputc(kDeathTestInternalError, parent);
- fprintf(parent, "%s", message.c_str());
- fflush(parent);
- _exit(1);
- } else {
- fprintf(stderr, "%s", message.c_str());
- fflush(stderr);
- posix::Abort();
- }
-}
-
-// A replacement for CHECK that calls DeathTestAbort if the assertion
-// fails.
-# define GTEST_DEATH_TEST_CHECK_(expression) \
- do { \
- if (!::testing::internal::IsTrue(expression)) { \
- DeathTestAbort(::testing::internal::String::Format( \
- "CHECK failed: File %s, line %d: %s", \
- __FILE__, __LINE__, #expression)); \
- } \
- } while (::testing::internal::AlwaysFalse())
-
-// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for
-// evaluating any system call that fulfills two conditions: it must return
-// -1 on failure, and set errno to EINTR when it is interrupted and
-// should be tried again. The macro expands to a loop that repeatedly
-// evaluates the expression as long as it evaluates to -1 and sets
-// errno to EINTR. If the expression evaluates to -1 but errno is
-// something other than EINTR, DeathTestAbort is called.
-# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \
- do { \
- int gtest_retval; \
- do { \
- gtest_retval = (expression); \
- } while (gtest_retval == -1 && errno == EINTR); \
- if (gtest_retval == -1) { \
- DeathTestAbort(::testing::internal::String::Format( \
- "CHECK failed: File %s, line %d: %s != -1", \
- __FILE__, __LINE__, #expression)); \
- } \
- } while (::testing::internal::AlwaysFalse())
-
-// Returns the message describing the last system error in errno.
-String GetLastErrnoDescription() {
- return String(errno == 0 ? "" : posix::StrError(errno));
-}
-
-// This is called from a death test parent process to read a failure
-// message from the death test child process and log it with the FATAL
-// severity. On Windows, the message is read from a pipe handle. On other
-// platforms, it is read from a file descriptor.
-static void FailFromInternalError(int fd) {
- Message error;
- char buffer[256];
- int num_read;
-
- do {
- while ((num_read = posix::Read(fd, buffer, 255)) > 0) {
- buffer[num_read] = '\0';
- error << buffer;
- }
- } while (num_read == -1 && errno == EINTR);
-
- if (num_read == 0) {
- GTEST_LOG_(FATAL) << error.GetString();
- } else {
- const int last_error = errno;
- GTEST_LOG_(FATAL) << "Error while reading death test internal: "
- << GetLastErrnoDescription() << " [" << last_error << "]";
- }
-}
-
-// Death test constructor. Increments the running death test count
-// for the current test.
-DeathTest::DeathTest() {
- TestInfo* const info = GetUnitTestImpl()->current_test_info();
- if (info == NULL) {
- DeathTestAbort("Cannot run a death test outside of a TEST or "
- "TEST_F construct");
- }
-}
-
-// Creates and returns a death test by dispatching to the current
-// death test factory.
-bool DeathTest::Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test) {
- return GetUnitTestImpl()->death_test_factory()->Create(
- statement, regex, file, line, test);
-}
-
-const char* DeathTest::LastMessage() {
- return last_death_test_message_.c_str();
-}
-
-void DeathTest::set_last_death_test_message(const String& message) {
- last_death_test_message_ = message;
-}
-
-String DeathTest::last_death_test_message_;
-
-// Provides cross platform implementation for some death functionality.
-class DeathTestImpl : public DeathTest {
- protected:
- DeathTestImpl(const char* a_statement, const RE* a_regex)
- : statement_(a_statement),
- regex_(a_regex),
- spawned_(false),
- status_(-1),
- outcome_(IN_PROGRESS),
- read_fd_(-1),
- write_fd_(-1) {}
-
- // read_fd_ is expected to be closed and cleared by a derived class.
- ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); }
-
- void Abort(AbortReason reason);
- virtual bool Passed(bool status_ok);
-
- const char* statement() const { return statement_; }
- const RE* regex() const { return regex_; }
- bool spawned() const { return spawned_; }
- void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
- int status() const { return status_; }
- void set_status(int a_status) { status_ = a_status; }
- DeathTestOutcome outcome() const { return outcome_; }
- void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; }
- int read_fd() const { return read_fd_; }
- void set_read_fd(int fd) { read_fd_ = fd; }
- int write_fd() const { return write_fd_; }
- void set_write_fd(int fd) { write_fd_ = fd; }
-
- // Called in the parent process only. Reads the result code of the death
- // test child process via a pipe, interprets it to set the outcome_
- // member, and closes read_fd_. Outputs diagnostics and terminates in
- // case of unexpected codes.
- void ReadAndInterpretStatusByte();
-
- private:
- // The textual content of the code this object is testing. This class
- // doesn't own this string and should not attempt to delete it.
- const char* const statement_;
- // The regular expression which test output must match. DeathTestImpl
- // doesn't own this object and should not attempt to delete it.
- const RE* const regex_;
- // True if the death test child process has been successfully spawned.
- bool spawned_;
- // The exit status of the child process.
- int status_;
- // How the death test concluded.
- DeathTestOutcome outcome_;
- // Descriptor to the read end of the pipe to the child process. It is
- // always -1 in the child process. The child keeps its write end of the
- // pipe in write_fd_.
- int read_fd_;
- // Descriptor to the child's write end of the pipe to the parent process.
- // It is always -1 in the parent process. The parent keeps its end of the
- // pipe in read_fd_.
- int write_fd_;
-};
-
-// Called in the parent process only. Reads the result code of the death
-// test child process via a pipe, interprets it to set the outcome_
-// member, and closes read_fd_. Outputs diagnostics and terminates in
-// case of unexpected codes.
-void DeathTestImpl::ReadAndInterpretStatusByte() {
- char flag;
- int bytes_read;
-
- // The read() here blocks until data is available (signifying the
- // failure of the death test) or until the pipe is closed (signifying
- // its success), so it's okay to call this in the parent before
- // the child process has exited.
- do {
- bytes_read = posix::Read(read_fd(), &flag, 1);
- } while (bytes_read == -1 && errno == EINTR);
-
- if (bytes_read == 0) {
- set_outcome(DIED);
- } else if (bytes_read == 1) {
- switch (flag) {
- case kDeathTestReturned:
- set_outcome(RETURNED);
- break;
- case kDeathTestThrew:
- set_outcome(THREW);
- break;
- case kDeathTestLived:
- set_outcome(LIVED);
- break;
- case kDeathTestInternalError:
- FailFromInternalError(read_fd()); // Does not return.
- break;
- default:
- GTEST_LOG_(FATAL) << "Death test child process reported "
- << "unexpected status byte ("
- << static_cast<unsigned int>(flag) << ")";
- }
- } else {
- GTEST_LOG_(FATAL) << "Read from death test child process failed: "
- << GetLastErrnoDescription();
- }
- GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));
- set_read_fd(-1);
-}
-
-// Signals that the death test code which should have exited, didn't.
-// Should be called only in a death test child process.
-// Writes a status byte to the child's status file descriptor, then
-// calls _exit(1).
-void DeathTestImpl::Abort(AbortReason reason) {
- // The parent process considers the death test to be a failure if
- // it finds any data in our pipe. So, here we write a single flag byte
- // to the pipe, then exit.
- const char status_ch =
- reason == TEST_DID_NOT_DIE ? kDeathTestLived :
- reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned;
-
- GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1));
- // We are leaking the descriptor here because on some platforms (i.e.,
- // when built as Windows DLL), destructors of global objects will still
- // run after calling _exit(). On such systems, write_fd_ will be
- // indirectly closed from the destructor of UnitTestImpl, causing double
- // close if it is also closed here. On debug configurations, double close
- // may assert. As there are no in-process buffers to flush here, we are
- // relying on the OS to close the descriptor after the process terminates
- // when the destructors are not run.
- _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash)
-}
-
-// Returns an indented copy of stderr output for a death test.
-// This makes distinguishing death test output lines from regular log lines
-// much easier.
-static ::std::string FormatDeathTestOutput(const ::std::string& output) {
- ::std::string ret;
- for (size_t at = 0; ; ) {
- const size_t line_end = output.find('\n', at);
- ret += "[ DEATH ] ";
- if (line_end == ::std::string::npos) {
- ret += output.substr(at);
- break;
- }
- ret += output.substr(at, line_end + 1 - at);
- at = line_end + 1;
- }
- return ret;
-}
-
-// Assesses the success or failure of a death test, using both private
-// members which have previously been set, and one argument:
-//
-// Private data members:
-// outcome: An enumeration describing how the death test
-// concluded: DIED, LIVED, THREW, or RETURNED. The death test
-// fails in the latter three cases.
-// status: The exit status of the child process. On *nix, it is in the
-// in the format specified by wait(2). On Windows, this is the
-// value supplied to the ExitProcess() API or a numeric code
-// of the exception that terminated the program.
-// regex: A regular expression object to be applied to
-// the test's captured standard error output; the death test
-// fails if it does not match.
-//
-// Argument:
-// status_ok: true if exit_status is acceptable in the context of
-// this particular death test, which fails if it is false
-//
-// Returns true iff all of the above conditions are met. Otherwise, the
-// first failing condition, in the order given above, is the one that is
-// reported. Also sets the last death test message string.
-bool DeathTestImpl::Passed(bool status_ok) {
- if (!spawned())
- return false;
-
- const String error_message = GetCapturedStderr();
-
- bool success = false;
- Message buffer;
-
- buffer << "Death test: " << statement() << "\n";
- switch (outcome()) {
- case LIVED:
- buffer << " Result: failed to die.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case THREW:
- buffer << " Result: threw an exception.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case RETURNED:
- buffer << " Result: illegal return in test statement.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case DIED:
- if (status_ok) {
- const bool matched = RE::PartialMatch(error_message.c_str(), *regex());
- if (matched) {
- success = true;
- } else {
- buffer << " Result: died but not with expected error.\n"
- << " Expected: " << regex()->pattern() << "\n"
- << "Actual msg:\n" << FormatDeathTestOutput(error_message);
- }
- } else {
- buffer << " Result: died but not with expected exit code:\n"
- << " " << ExitSummary(status()) << "\n"
- << "Actual msg:\n" << FormatDeathTestOutput(error_message);
- }
- break;
- case IN_PROGRESS:
- default:
- GTEST_LOG_(FATAL)
- << "DeathTest::Passed somehow called before conclusion of test";
- }
-
- DeathTest::set_last_death_test_message(buffer.GetString());
- return success;
-}
-
-# if GTEST_OS_WINDOWS
-// WindowsDeathTest implements death tests on Windows. Due to the
-// specifics of starting new processes on Windows, death tests there are
-// always threadsafe, and Google Test considers the
-// --gtest_death_test_style=fast setting to be equivalent to
-// --gtest_death_test_style=threadsafe there.
-//
-// A few implementation notes: Like the Linux version, the Windows
-// implementation uses pipes for child-to-parent communication. But due to
-// the specifics of pipes on Windows, some extra steps are required:
-//
-// 1. The parent creates a communication pipe and stores handles to both
-// ends of it.
-// 2. The parent starts the child and provides it with the information
-// necessary to acquire the handle to the write end of the pipe.
-// 3. The child acquires the write end of the pipe and signals the parent
-// using a Windows event.
-// 4. Now the parent can release the write end of the pipe on its side. If
-// this is done before step 3, the object's reference count goes down to
-// 0 and it is destroyed, preventing the child from acquiring it. The
-// parent now has to release it, or read operations on the read end of
-// the pipe will not return when the child terminates.
-// 5. The parent reads child's output through the pipe (outcome code and
-// any possible error messages) from the pipe, and its stderr and then
-// determines whether to fail the test.
-//
-// Note: to distinguish Win32 API calls from the local method and function
-// calls, the former are explicitly resolved in the global namespace.
-//
-class WindowsDeathTest : public DeathTestImpl {
- public:
- WindowsDeathTest(const char* a_statement,
- const RE* a_regex,
- const char* file,
- int line)
- : DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {}
-
- // All of these virtual functions are inherited from DeathTest.
- virtual int Wait();
- virtual TestRole AssumeRole();
-
- private:
- // The name of the file in which the death test is located.
- const char* const file_;
- // The line number on which the death test is located.
- const int line_;
- // Handle to the write end of the pipe to the child process.
- AutoHandle write_handle_;
- // Child process handle.
- AutoHandle child_handle_;
- // Event the child process uses to signal the parent that it has
- // acquired the handle to the write end of the pipe. After seeing this
- // event the parent can release its own handles to make sure its
- // ReadFile() calls return when the child terminates.
- AutoHandle event_handle_;
-};
-
-// Waits for the child in a death test to exit, returning its exit
-// status, or 0 if no child process exists. As a side effect, sets the
-// outcome data member.
-int WindowsDeathTest::Wait() {
- if (!spawned())
- return 0;
-
- // Wait until the child either signals that it has acquired the write end
- // of the pipe or it dies.
- const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };
- switch (::WaitForMultipleObjects(2,
- wait_handles,
- FALSE, // Waits for any of the handles.
- INFINITE)) {
- case WAIT_OBJECT_0:
- case WAIT_OBJECT_0 + 1:
- break;
- default:
- GTEST_DEATH_TEST_CHECK_(false); // Should not get here.
- }
-
- // The child has acquired the write end of the pipe or exited.
- // We release the handle on our side and continue.
- write_handle_.Reset();
- event_handle_.Reset();
-
- ReadAndInterpretStatusByte();
-
- // Waits for the child process to exit if it haven't already. This
- // returns immediately if the child has already exited, regardless of
- // whether previous calls to WaitForMultipleObjects synchronized on this
- // handle or not.
- GTEST_DEATH_TEST_CHECK_(
- WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),
- INFINITE));
- DWORD status_code;
- GTEST_DEATH_TEST_CHECK_(
- ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);
- child_handle_.Reset();
- set_status(static_cast<int>(status_code));
- return status();
-}
-
-// The AssumeRole process for a Windows death test. It creates a child
-// process with the same executable as the current process to run the
-// death test. The child process is given the --gtest_filter and
-// --gtest_internal_run_death_test flags such that it knows to run the
-// current death test only.
-DeathTest::TestRole WindowsDeathTest::AssumeRole() {
- const UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const TestInfo* const info = impl->current_test_info();
- const int death_test_index = info->result()->death_test_count();
-
- if (flag != NULL) {
- // ParseInternalRunDeathTestFlag() has performed all the necessary
- // processing.
- set_write_fd(flag->write_fd());
- return EXECUTE_TEST;
- }
-
- // WindowsDeathTest uses an anonymous pipe to communicate results of
- // a death test.
- SECURITY_ATTRIBUTES handles_are_inheritable = {
- sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
- HANDLE read_handle, write_handle;
- GTEST_DEATH_TEST_CHECK_(
- ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable,
- 0) // Default buffer size.
- != FALSE);
- set_read_fd(::_open_osfhandle(reinterpret_cast<intptr_t>(read_handle),
- O_RDONLY));
- write_handle_.Reset(write_handle);
- event_handle_.Reset(::CreateEvent(
- &handles_are_inheritable,
- TRUE, // The event will automatically reset to non-signaled state.
- FALSE, // The initial state is non-signalled.
- NULL)); // The even is unnamed.
- GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL);
- const String filter_flag = String::Format("--%s%s=%s.%s",
- GTEST_FLAG_PREFIX_, kFilterFlag,
- info->test_case_name(),
- info->name());
- const String internal_flag = String::Format(
- "--%s%s=%s|%d|%d|%u|%Iu|%Iu",
- GTEST_FLAG_PREFIX_,
- kInternalRunDeathTestFlag,
- file_, line_,
- death_test_index,
- static_cast<unsigned int>(::GetCurrentProcessId()),
- // size_t has the same with as pointers on both 32-bit and 64-bit
- // Windows platforms.
- // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx.
- reinterpret_cast<size_t>(write_handle),
- reinterpret_cast<size_t>(event_handle_.Get()));
-
- char executable_path[_MAX_PATH + 1]; // NOLINT
- GTEST_DEATH_TEST_CHECK_(
- _MAX_PATH + 1 != ::GetModuleFileNameA(NULL,
- executable_path,
- _MAX_PATH));
-
- String command_line = String::Format("%s %s \"%s\"",
- ::GetCommandLineA(),
- filter_flag.c_str(),
- internal_flag.c_str());
-
- DeathTest::set_last_death_test_message("");
-
- CaptureStderr();
- // Flush the log buffers since the log streams are shared with the child.
- FlushInfoLog();
-
- // The child process will share the standard handles with the parent.
- STARTUPINFOA startup_info;
- memset(&startup_info, 0, sizeof(STARTUPINFO));
- startup_info.dwFlags = STARTF_USESTDHANDLES;
- startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE);
- startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);
- startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE);
-
- PROCESS_INFORMATION process_info;
- GTEST_DEATH_TEST_CHECK_(::CreateProcessA(
- executable_path,
- const_cast<char*>(command_line.c_str()),
- NULL, // Retuned process handle is not inheritable.
- NULL, // Retuned thread handle is not inheritable.
- TRUE, // Child inherits all inheritable handles (for write_handle_).
- 0x0, // Default creation flags.
- NULL, // Inherit the parent's environment.
- UnitTest::GetInstance()->original_working_dir(),
- &startup_info,
- &process_info) != FALSE);
- child_handle_.Reset(process_info.hProcess);
- ::CloseHandle(process_info.hThread);
- set_spawned(true);
- return OVERSEE_TEST;
-}
-# else // We are not on Windows.
-
-// ForkingDeathTest provides implementations for most of the abstract
-// methods of the DeathTest interface. Only the AssumeRole method is
-// left undefined.
-class ForkingDeathTest : public DeathTestImpl {
- public:
- ForkingDeathTest(const char* statement, const RE* regex);
-
- // All of these virtual functions are inherited from DeathTest.
- virtual int Wait();
-
- protected:
- void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
-
- private:
- // PID of child process during death test; 0 in the child process itself.
- pid_t child_pid_;
-};
-
-// Constructs a ForkingDeathTest.
-ForkingDeathTest::ForkingDeathTest(const char* a_statement, const RE* a_regex)
- : DeathTestImpl(a_statement, a_regex),
- child_pid_(-1) {}
-
-// Waits for the child in a death test to exit, returning its exit
-// status, or 0 if no child process exists. As a side effect, sets the
-// outcome data member.
-int ForkingDeathTest::Wait() {
- if (!spawned())
- return 0;
-
- ReadAndInterpretStatusByte();
-
- int status_value;
- GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0));
- set_status(status_value);
- return status_value;
-}
-
-// A concrete death test class that forks, then immediately runs the test
-// in the child process.
-class NoExecDeathTest : public ForkingDeathTest {
- public:
- NoExecDeathTest(const char* a_statement, const RE* a_regex) :
- ForkingDeathTest(a_statement, a_regex) { }
- virtual TestRole AssumeRole();
-};
-
-// The AssumeRole process for a fork-and-run death test. It implements a
-// straightforward fork, with a simple pipe to transmit the status byte.
-DeathTest::TestRole NoExecDeathTest::AssumeRole() {
- const size_t thread_count = GetThreadCount();
- if (thread_count != 1) {
- GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count);
- }
-
- int pipe_fd[2];
- GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
-
- DeathTest::set_last_death_test_message("");
- CaptureStderr();
- // When we fork the process below, the log file buffers are copied, but the
- // file descriptors are shared. We flush all log files here so that closing
- // the file descriptors in the child process doesn't throw off the
- // synchronization between descriptors and buffers in the parent process.
- // This is as close to the fork as possible to avoid a race condition in case
- // there are multiple threads running before the death test, and another
- // thread writes to the log file.
- FlushInfoLog();
-
- const pid_t child_pid = fork();
- GTEST_DEATH_TEST_CHECK_(child_pid != -1);
- set_child_pid(child_pid);
- if (child_pid == 0) {
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0]));
- set_write_fd(pipe_fd[1]);
- // Redirects all logging to stderr in the child process to prevent
- // concurrent writes to the log files. We capture stderr in the parent
- // process and append the child process' output to a log.
- LogToStderr();
- // Event forwarding to the listeners of event listener API mush be shut
- // down in death test subprocesses.
- GetUnitTestImpl()->listeners()->SuppressEventForwarding();
- return EXECUTE_TEST;
- } else {
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
- set_read_fd(pipe_fd[0]);
- set_spawned(true);
- return OVERSEE_TEST;
- }
-}
-
-// A concrete death test class that forks and re-executes the main
-// program from the beginning, with command-line flags set that cause
-// only this specific death test to be run.
-class ExecDeathTest : public ForkingDeathTest {
- public:
- ExecDeathTest(const char* a_statement, const RE* a_regex,
- const char* file, int line) :
- ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }
- virtual TestRole AssumeRole();
- private:
- // The name of the file in which the death test is located.
- const char* const file_;
- // The line number on which the death test is located.
- const int line_;
-};
-
-// Utility class for accumulating command-line arguments.
-class Arguments {
- public:
- Arguments() {
- args_.push_back(NULL);
- }
-
- ~Arguments() {
- for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();
- ++i) {
- free(*i);
- }
- }
- void AddArgument(const char* argument) {
- args_.insert(args_.end() - 1, posix::StrDup(argument));
- }
-
- template <typename Str>
- void AddArguments(const ::std::vector<Str>& arguments) {
- for (typename ::std::vector<Str>::const_iterator i = arguments.begin();
- i != arguments.end();
- ++i) {
- args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));
- }
- }
- char* const* Argv() {
- return &args_[0];
- }
- private:
- std::vector<char*> args_;
-};
-
-// A struct that encompasses the arguments to the child process of a
-// threadsafe-style death test process.
-struct ExecDeathTestArgs {
- char* const* argv; // Command-line arguments for the child's call to exec
- int close_fd; // File descriptor to close; the read end of a pipe
-};
-
-# if GTEST_OS_MAC
-inline char** GetEnviron() {
- // When Google Test is built as a framework on MacOS X, the environ variable
- // is unavailable. Apple's documentation (man environ) recommends using
- // _NSGetEnviron() instead.
- return *_NSGetEnviron();
-}
-# else
-// Some POSIX platforms expect you to declare environ. extern "C" makes
-// it reside in the global namespace.
-extern "C" char** environ;
-inline char** GetEnviron() { return environ; }
-# endif // GTEST_OS_MAC
-
-// The main function for a threadsafe-style death test child process.
-// This function is called in a clone()-ed process and thus must avoid
-// any potentially unsafe operations like malloc or libc functions.
-static int ExecDeathTestChildMain(void* child_arg) {
- ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));
-
- // We need to execute the test program in the same environment where
- // it was originally invoked. Therefore we change to the original
- // working directory first.
- const char* const original_dir =
- UnitTest::GetInstance()->original_working_dir();
- // We can safely call chdir() as it's a direct system call.
- if (chdir(original_dir) != 0) {
- DeathTestAbort(String::Format("chdir(\"%s\") failed: %s",
- original_dir,
- GetLastErrnoDescription().c_str()));
- return EXIT_FAILURE;
- }
-
- // We can safely call execve() as it's a direct system call. We
- // cannot use execvp() as it's a libc function and thus potentially
- // unsafe. Since execve() doesn't search the PATH, the user must
- // invoke the test program via a valid path that contains at least
- // one path separator.
- execve(args->argv[0], args->argv, GetEnviron());
- DeathTestAbort(String::Format("execve(%s, ...) in %s failed: %s",
- args->argv[0],
- original_dir,
- GetLastErrnoDescription().c_str()));
- return EXIT_FAILURE;
-}
-
-// Two utility routines that together determine the direction the stack
-// grows.
-// This could be accomplished more elegantly by a single recursive
-// function, but we want to guard against the unlikely possibility of
-// a smart compiler optimizing the recursion away.
-//
-// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining
-// StackLowerThanAddress into StackGrowsDown, which then doesn't give
-// correct answer.
-bool StackLowerThanAddress(const void* ptr) GTEST_NO_INLINE_;
-bool StackLowerThanAddress(const void* ptr) {
- int dummy;
- return &dummy < ptr;
-}
-
-bool StackGrowsDown() {
- int dummy;
- return StackLowerThanAddress(&dummy);
-}
-
-// A threadsafe implementation of fork(2) for threadsafe-style death tests
-// that uses clone(2). It dies with an error message if anything goes
-// wrong.
-static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
- ExecDeathTestArgs args = { argv, close_fd };
- pid_t child_pid = -1;
-
-# if GTEST_HAS_CLONE
- const bool use_fork = GTEST_FLAG(death_test_use_fork);
-
- if (!use_fork) {
- static const bool stack_grows_down = StackGrowsDown();
- const size_t stack_size = getpagesize();
- // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.
- void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE, -1, 0);
- GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED);
- void* const stack_top =
- static_cast<char*>(stack) + (stack_grows_down ? stack_size : 0);
-
- child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args);
-
- GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1);
- }
-# else
- const bool use_fork = true;
-# endif // GTEST_HAS_CLONE
-
- if (use_fork && (child_pid = fork()) == 0) {
- ExecDeathTestChildMain(&args);
- _exit(0);
- }
-
- GTEST_DEATH_TEST_CHECK_(child_pid != -1);
- return child_pid;
-}
-
-// The AssumeRole process for a fork-and-exec death test. It re-executes the
-// main program from the beginning, setting the --gtest_filter
-// and --gtest_internal_run_death_test flags to cause only the current
-// death test to be re-run.
-DeathTest::TestRole ExecDeathTest::AssumeRole() {
- const UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const TestInfo* const info = impl->current_test_info();
- const int death_test_index = info->result()->death_test_count();
-
- if (flag != NULL) {
- set_write_fd(flag->write_fd());
- return EXECUTE_TEST;
- }
-
- int pipe_fd[2];
- GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
- // Clear the close-on-exec flag on the write end of the pipe, lest
- // it be closed when the child process does an exec:
- GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1);
-
- const String filter_flag =
- String::Format("--%s%s=%s.%s",
- GTEST_FLAG_PREFIX_, kFilterFlag,
- info->test_case_name(), info->name());
- const String internal_flag =
- String::Format("--%s%s=%s|%d|%d|%d",
- GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag,
- file_, line_, death_test_index, pipe_fd[1]);
- Arguments args;
- args.AddArguments(GetArgvs());
- args.AddArgument(filter_flag.c_str());
- args.AddArgument(internal_flag.c_str());
-
- DeathTest::set_last_death_test_message("");
-
- CaptureStderr();
- // See the comment in NoExecDeathTest::AssumeRole for why the next line
- // is necessary.
- FlushInfoLog();
-
- const pid_t child_pid = ExecDeathTestFork(args.Argv(), pipe_fd[0]);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
- set_child_pid(child_pid);
- set_read_fd(pipe_fd[0]);
- set_spawned(true);
- return OVERSEE_TEST;
-}
-
-# endif // !GTEST_OS_WINDOWS
-
-// Creates a concrete DeathTest-derived class that depends on the
-// --gtest_death_test_style flag, and sets the pointer pointed to
-// by the "test" argument to its address. If the test should be
-// skipped, sets that pointer to NULL. Returns true, unless the
-// flag is set to an invalid value.
-bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
- const char* file, int line,
- DeathTest** test) {
- UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const int death_test_index = impl->current_test_info()
- ->increment_death_test_count();
-
- if (flag != NULL) {
- if (death_test_index > flag->index()) {
- DeathTest::set_last_death_test_message(String::Format(
- "Death test count (%d) somehow exceeded expected maximum (%d)",
- death_test_index, flag->index()));
- return false;
- }
-
- if (!(flag->file() == file && flag->line() == line &&
- flag->index() == death_test_index)) {
- *test = NULL;
- return true;
- }
- }
-
-# if GTEST_OS_WINDOWS
-
- if (GTEST_FLAG(death_test_style) == "threadsafe" ||
- GTEST_FLAG(death_test_style) == "fast") {
- *test = new WindowsDeathTest(statement, regex, file, line);
- }
-
-# else
-
- if (GTEST_FLAG(death_test_style) == "threadsafe") {
- *test = new ExecDeathTest(statement, regex, file, line);
- } else if (GTEST_FLAG(death_test_style) == "fast") {
- *test = new NoExecDeathTest(statement, regex);
- }
-
-# endif // GTEST_OS_WINDOWS
-
- else { // NOLINT - this is more readable than unbalanced brackets inside #if.
- DeathTest::set_last_death_test_message(String::Format(
- "Unknown death test style \"%s\" encountered",
- GTEST_FLAG(death_test_style).c_str()));
- return false;
- }
-
- return true;
-}
-
-// Splits a given string on a given delimiter, populating a given
-// vector with the fields. GTEST_HAS_DEATH_TEST implies that we have
-// ::std::string, so we can use it here.
-static void SplitString(const ::std::string& str, char delimiter,
- ::std::vector< ::std::string>* dest) {
- ::std::vector< ::std::string> parsed;
- ::std::string::size_type pos = 0;
- while (::testing::internal::AlwaysTrue()) {
- const ::std::string::size_type colon = str.find(delimiter, pos);
- if (colon == ::std::string::npos) {
- parsed.push_back(str.substr(pos));
- break;
- } else {
- parsed.push_back(str.substr(pos, colon - pos));
- pos = colon + 1;
- }
- }
- dest->swap(parsed);
-}
-
-# if GTEST_OS_WINDOWS
-// Recreates the pipe and event handles from the provided parameters,
-// signals the event, and returns a file descriptor wrapped around the pipe
-// handle. This function is called in the child process only.
-int GetStatusFileDescriptor(unsigned int parent_process_id,
- size_t write_handle_as_size_t,
- size_t event_handle_as_size_t) {
- AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,
- FALSE, // Non-inheritable.
- parent_process_id));
- if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) {
- DeathTestAbort(String::Format("Unable to open parent process %u",
- parent_process_id));
- }
-
- // TODO(vladl@google.com): Replace the following check with a
- // compile-time assertion when available.
- GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t));
-
- const HANDLE write_handle =
- reinterpret_cast<HANDLE>(write_handle_as_size_t);
- HANDLE dup_write_handle;
-
- // The newly initialized handle is accessible only in in the parent
- // process. To obtain one accessible within the child, we need to use
- // DuplicateHandle.
- if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,
- ::GetCurrentProcess(), &dup_write_handle,
- 0x0, // Requested privileges ignored since
- // DUPLICATE_SAME_ACCESS is used.
- FALSE, // Request non-inheritable handler.
- DUPLICATE_SAME_ACCESS)) {
- DeathTestAbort(String::Format(
- "Unable to duplicate the pipe handle %Iu from the parent process %u",
- write_handle_as_size_t, parent_process_id));
- }
-
- const HANDLE event_handle = reinterpret_cast<HANDLE>(event_handle_as_size_t);
- HANDLE dup_event_handle;
-
- if (!::DuplicateHandle(parent_process_handle.Get(), event_handle,
- ::GetCurrentProcess(), &dup_event_handle,
- 0x0,
- FALSE,
- DUPLICATE_SAME_ACCESS)) {
- DeathTestAbort(String::Format(
- "Unable to duplicate the event handle %Iu from the parent process %u",
- event_handle_as_size_t, parent_process_id));
- }
-
- const int write_fd =
- ::_open_osfhandle(reinterpret_cast<intptr_t>(dup_write_handle), O_APPEND);
- if (write_fd == -1) {
- DeathTestAbort(String::Format(
- "Unable to convert pipe handle %Iu to a file descriptor",
- write_handle_as_size_t));
- }
-
- // Signals the parent that the write end of the pipe has been acquired
- // so the parent can release its own write end.
- ::SetEvent(dup_event_handle);
-
- return write_fd;
-}
-# endif // GTEST_OS_WINDOWS
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
- if (GTEST_FLAG(internal_run_death_test) == "") return NULL;
-
- // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we
- // can use it here.
- int line = -1;
- int index = -1;
- ::std::vector< ::std::string> fields;
- SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);
- int write_fd = -1;
-
-# if GTEST_OS_WINDOWS
-
- unsigned int parent_process_id = 0;
- size_t write_handle_as_size_t = 0;
- size_t event_handle_as_size_t = 0;
-
- if (fields.size() != 6
- || !ParseNaturalNumber(fields[1], &line)
- || !ParseNaturalNumber(fields[2], &index)
- || !ParseNaturalNumber(fields[3], &parent_process_id)
- || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)
- || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
- DeathTestAbort(String::Format(
- "Bad --gtest_internal_run_death_test flag: %s",
- GTEST_FLAG(internal_run_death_test).c_str()));
- }
- write_fd = GetStatusFileDescriptor(parent_process_id,
- write_handle_as_size_t,
- event_handle_as_size_t);
-# else
-
- if (fields.size() != 4
- || !ParseNaturalNumber(fields[1], &line)
- || !ParseNaturalNumber(fields[2], &index)
- || !ParseNaturalNumber(fields[3], &write_fd)) {
- DeathTestAbort(String::Format(
- "Bad --gtest_internal_run_death_test flag: %s",
- GTEST_FLAG(internal_run_death_test).c_str()));
- }
-
-# endif // GTEST_OS_WINDOWS
-
- return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
-}
-
-} // namespace internal
-
-#endif // GTEST_HAS_DEATH_TEST
-
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: keith.ray@gmail.com (Keith Ray)
-
-
-#include <stdlib.h>
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h>
-#elif GTEST_OS_WINDOWS
-# include <direct.h>
-# include <io.h>
-#elif GTEST_OS_SYMBIAN || GTEST_OS_NACL
-// Symbian OpenC and NaCl have PATH_MAX in sys/syslimits.h
-# include <sys/syslimits.h>
-#else
-# include <limits.h>
-# include <climits> // Some Linux distributions define PATH_MAX here.
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_MAX_ _MAX_PATH
-#elif defined(PATH_MAX)
-# define GTEST_PATH_MAX_ PATH_MAX
-#elif defined(_XOPEN_PATH_MAX)
-# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX
-#else
-# define GTEST_PATH_MAX_ _POSIX_PATH_MAX
-#endif // GTEST_OS_WINDOWS
-
-
-namespace testing {
-namespace internal {
-
-#if GTEST_OS_WINDOWS
-// On Windows, '\\' is the standard path separator, but many tools and the
-// Windows API also accept '/' as an alternate path separator. Unless otherwise
-// noted, a file path can contain either kind of path separators, or a mixture
-// of them.
-const char kPathSeparator = '\\';
-const char kAlternatePathSeparator = '/';
-const char kPathSeparatorString[] = "\\";
-const char kAlternatePathSeparatorString[] = "/";
-# if GTEST_OS_WINDOWS_MOBILE
-// Windows CE doesn't have a current directory. You should not use
-// the current directory in tests on Windows CE, but this at least
-// provides a reasonable fallback.
-const char kCurrentDirectoryString[] = "\\";
-// Windows CE doesn't define INVALID_FILE_ATTRIBUTES
-const DWORD kInvalidFileAttributes = 0xffffffff;
-# else
-const char kCurrentDirectoryString[] = ".\\";
-# endif // GTEST_OS_WINDOWS_MOBILE
-#else
-const char kPathSeparator = '/';
-const char kPathSeparatorString[] = "/";
-const char kCurrentDirectoryString[] = "./";
-#endif // GTEST_OS_WINDOWS
-
-// Returns whether the given character is a valid path separator.
-static bool IsPathSeparator(char c) {
-#if GTEST_HAS_ALT_PATH_SEP_
- return (c == kPathSeparator) || (c == kAlternatePathSeparator);
-#else
- return c == kPathSeparator;
-#endif
-}
-
-// Returns the current working directory, or "" if unsuccessful.
-FilePath FilePath::GetCurrentDir() {
-#if GTEST_OS_WINDOWS_MOBILE
- // Windows CE doesn't have a current directory, so we just return
- // something reasonable.
- return FilePath(kCurrentDirectoryString);
-#elif GTEST_OS_WINDOWS
- char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
- return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
-#else
- char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
- return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-// Returns a copy of the FilePath with the case-insensitive extension removed.
-// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
-// FilePath("dir/file"). If a case-insensitive extension is not
-// found, returns a copy of the original FilePath.
-FilePath FilePath::RemoveExtension(const char* extension) const {
- String dot_extension(String::Format(".%s", extension));
- if (pathname_.EndsWithCaseInsensitive(dot_extension.c_str())) {
- return FilePath(String(pathname_.c_str(), pathname_.length() - 4));
- }
- return *this;
-}
-
-// Returns a pointer to the last occurence of a valid path separator in
-// the FilePath. On Windows, for example, both '/' and '\' are valid path
-// separators. Returns NULL if no path separator was found.
-const char* FilePath::FindLastPathSeparator() const {
- const char* const last_sep = strrchr(c_str(), kPathSeparator);
-#if GTEST_HAS_ALT_PATH_SEP_
- const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator);
- // Comparing two pointers of which only one is NULL is undefined.
- if (last_alt_sep != NULL &&
- (last_sep == NULL || last_alt_sep > last_sep)) {
- return last_alt_sep;
- }
-#endif
- return last_sep;
-}
-
-// Returns a copy of the FilePath with the directory part removed.
-// Example: FilePath("path/to/file").RemoveDirectoryName() returns
-// FilePath("file"). If there is no directory part ("just_a_file"), it returns
-// the FilePath unmodified. If there is no file part ("just_a_dir/") it
-// returns an empty FilePath ("").
-// On Windows platform, '\' is the path separator, otherwise it is '/'.
-FilePath FilePath::RemoveDirectoryName() const {
- const char* const last_sep = FindLastPathSeparator();
- return last_sep ? FilePath(String(last_sep + 1)) : *this;
-}
-
-// RemoveFileName returns the directory path with the filename removed.
-// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
-// If the FilePath is "a_file" or "/a_file", RemoveFileName returns
-// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
-// not have a file, like "just/a/dir/", it returns the FilePath unmodified.
-// On Windows platform, '\' is the path separator, otherwise it is '/'.
-FilePath FilePath::RemoveFileName() const {
- const char* const last_sep = FindLastPathSeparator();
- String dir;
- if (last_sep) {
- dir = String(c_str(), last_sep + 1 - c_str());
- } else {
- dir = kCurrentDirectoryString;
- }
- return FilePath(dir);
-}
-
-// Helper functions for naming files in a directory for xml output.
-
-// Given directory = "dir", base_name = "test", number = 0,
-// extension = "xml", returns "dir/test.xml". If number is greater
-// than zero (e.g., 12), returns "dir/test_12.xml".
-// On Windows platform, uses \ as the separator rather than /.
-FilePath FilePath::MakeFileName(const FilePath& directory,
- const FilePath& base_name,
- int number,
- const char* extension) {
- String file;
- if (number == 0) {
- file = String::Format("%s.%s", base_name.c_str(), extension);
- } else {
- file = String::Format("%s_%d.%s", base_name.c_str(), number, extension);
- }
- return ConcatPaths(directory, FilePath(file));
-}
-
-// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml".
-// On Windows, uses \ as the separator rather than /.
-FilePath FilePath::ConcatPaths(const FilePath& directory,
- const FilePath& relative_path) {
- if (directory.IsEmpty())
- return relative_path;
- const FilePath dir(directory.RemoveTrailingPathSeparator());
- return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator,
- relative_path.c_str()));
-}
-
-// Returns true if pathname describes something findable in the file-system,
-// either a file, directory, or whatever.
-bool FilePath::FileOrDirectoryExists() const {
-#if GTEST_OS_WINDOWS_MOBILE
- LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());
- const DWORD attributes = GetFileAttributes(unicode);
- delete [] unicode;
- return attributes != kInvalidFileAttributes;
-#else
- posix::StatStruct file_stat;
- return posix::Stat(pathname_.c_str(), &file_stat) == 0;
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-// Returns true if pathname describes a directory in the file-system
-// that exists.
-bool FilePath::DirectoryExists() const {
- bool result = false;
-#if GTEST_OS_WINDOWS
- // Don't strip off trailing separator if path is a root directory on
- // Windows (like "C:\\").
- const FilePath& path(IsRootDirectory() ? *this :
- RemoveTrailingPathSeparator());
-#else
- const FilePath& path(*this);
-#endif
-
-#if GTEST_OS_WINDOWS_MOBILE
- LPCWSTR unicode = String::AnsiToUtf16(path.c_str());
- const DWORD attributes = GetFileAttributes(unicode);
- delete [] unicode;
- if ((attributes != kInvalidFileAttributes) &&
- (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
- result = true;
- }
-#else
- posix::StatStruct file_stat;
- result = posix::Stat(path.c_str(), &file_stat) == 0 &&
- posix::IsDir(file_stat);
-#endif // GTEST_OS_WINDOWS_MOBILE
-
- return result;
-}
-
-// Returns true if pathname describes a root directory. (Windows has one
-// root directory per disk drive.)
-bool FilePath::IsRootDirectory() const {
-#if GTEST_OS_WINDOWS
- // TODO(wan@google.com): on Windows a network share like
- // \\server\share can be a root directory, although it cannot be the
- // current directory. Handle this properly.
- return pathname_.length() == 3 && IsAbsolutePath();
-#else
- return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);
-#endif
-}
-
-// Returns true if pathname describes an absolute path.
-bool FilePath::IsAbsolutePath() const {
- const char* const name = pathname_.c_str();
-#if GTEST_OS_WINDOWS
- return pathname_.length() >= 3 &&
- ((name[0] >= 'a' && name[0] <= 'z') ||
- (name[0] >= 'A' && name[0] <= 'Z')) &&
- name[1] == ':' &&
- IsPathSeparator(name[2]);
-#else
- return IsPathSeparator(name[0]);
-#endif
-}
-
-// Returns a pathname for a file that does not currently exist. The pathname
-// will be directory/base_name.extension or
-// directory/base_name_<number>.extension if directory/base_name.extension
-// already exists. The number will be incremented until a pathname is found
-// that does not already exist.
-// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
-// There could be a race condition if two or more processes are calling this
-// function at the same time -- they could both pick the same filename.
-FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
- const FilePath& base_name,
- const char* extension) {
- FilePath full_pathname;
- int number = 0;
- do {
- full_pathname.Set(MakeFileName(directory, base_name, number++, extension));
- } while (full_pathname.FileOrDirectoryExists());
- return full_pathname;
-}
-
-// Returns true if FilePath ends with a path separator, which indicates that
-// it is intended to represent a directory. Returns false otherwise.
-// This does NOT check that a directory (or file) actually exists.
-bool FilePath::IsDirectory() const {
- return !pathname_.empty() &&
- IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]);
-}
-
-// Create directories so that path exists. Returns true if successful or if
-// the directories already exist; returns false if unable to create directories
-// for any reason.
-bool FilePath::CreateDirectoriesRecursively() const {
- if (!this->IsDirectory()) {
- return false;
- }
-
- if (pathname_.length() == 0 || this->DirectoryExists()) {
- return true;
- }
-
- const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName());
- return parent.CreateDirectoriesRecursively() && this->CreateFolder();
-}
-
-// Create the directory so that path exists. Returns true if successful or
-// if the directory already exists; returns false if unable to create the
-// directory for any reason, including if the parent directory does not
-// exist. Not named "CreateDirectory" because that's a macro on Windows.
-bool FilePath::CreateFolder() const {
-#if GTEST_OS_WINDOWS_MOBILE
- FilePath removed_sep(this->RemoveTrailingPathSeparator());
- LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str());
- int result = CreateDirectory(unicode, NULL) ? 0 : -1;
- delete [] unicode;
-#elif GTEST_OS_WINDOWS
- int result = _mkdir(pathname_.c_str());
-#else
- int result = mkdir(pathname_.c_str(), 0777);
-#endif // GTEST_OS_WINDOWS_MOBILE
-
- if (result == -1) {
- return this->DirectoryExists(); // An error is OK if the directory exists.
- }
- return true; // No error.
-}
-
-// If input name has a trailing separator character, remove it and return the
-// name, otherwise return the name string unmodified.
-// On Windows platform, uses \ as the separator, other platforms use /.
-FilePath FilePath::RemoveTrailingPathSeparator() const {
- return IsDirectory()
- ? FilePath(String(pathname_.c_str(), pathname_.length() - 1))
- : *this;
-}
-
-// Removes any redundant separators that might be in the pathname.
-// For example, "bar///foo" becomes "bar/foo". Does not eliminate other
-// redundancies that might be in a pathname involving "." or "..".
-// TODO(wan@google.com): handle Windows network shares (e.g. \\server\share).
-void FilePath::Normalize() {
- if (pathname_.c_str() == NULL) {
- pathname_ = "";
- return;
- }
- const char* src = pathname_.c_str();
- char* const dest = new char[pathname_.length() + 1];
- char* dest_ptr = dest;
- memset(dest_ptr, 0, pathname_.length() + 1);
-
- while (*src != '\0') {
- *dest_ptr = *src;
- if (!IsPathSeparator(*src)) {
- src++;
- } else {
-#if GTEST_HAS_ALT_PATH_SEP_
- if (*dest_ptr == kAlternatePathSeparator) {
- *dest_ptr = kPathSeparator;
- }
-#endif
- while (IsPathSeparator(*src))
- src++;
- }
- dest_ptr++;
- }
- *dest_ptr = '\0';
- pathname_ = dest;
- delete[] dest;
-}
-
-} // namespace internal
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h> // For TerminateProcess()
-#elif GTEST_OS_WINDOWS
-# include <io.h>
-# include <sys/stat.h>
-#else
-# include <unistd.h>
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_OS_MAC
-# include <mach/mach_init.h>
-# include <mach/task.h>
-# include <mach/vm_map.h>
-#endif // GTEST_OS_MAC
-
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-namespace internal {
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
-const int kStdOutFileno = 1;
-const int kStdErrFileno = 2;
-#else
-const int kStdOutFileno = STDOUT_FILENO;
-const int kStdErrFileno = STDERR_FILENO;
-#endif // _MSC_VER
-
-#if GTEST_OS_MAC
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-size_t GetThreadCount() {
- const task_t task = mach_task_self();
- mach_msg_type_number_t thread_count;
- thread_act_array_t thread_list;
- const kern_return_t status = task_threads(task, &thread_list, &thread_count);
- if (status == KERN_SUCCESS) {
- // task_threads allocates resources in thread_list and we need to free them
- // to avoid leaks.
- vm_deallocate(task,
- reinterpret_cast<vm_address_t>(thread_list),
- sizeof(thread_t) * thread_count);
- return static_cast<size_t>(thread_count);
- } else {
- return 0;
- }
-}
-
-#else
-
-size_t GetThreadCount() {
- // There's no portable way to detect the number of threads, so we just
- // return 0 to indicate that we cannot detect it.
- return 0;
-}
-
-#endif // GTEST_OS_MAC
-
-#if GTEST_USES_POSIX_RE
-
-// Implements RE. Currently only needed for death tests.
-
-RE::~RE() {
- if (is_valid_) {
- // regfree'ing an invalid regex might crash because the content
- // of the regex is undefined. Since the regex's are essentially
- // the same, one cannot be valid (or invalid) without the other
- // being so too.
- regfree(&partial_regex_);
- regfree(&full_regex_);
- }
- free(const_cast<char*>(pattern_));
-}
-
-// Returns true iff regular expression re matches the entire str.
-bool RE::FullMatch(const char* str, const RE& re) {
- if (!re.is_valid_) return false;
-
- regmatch_t match;
- return regexec(&re.full_regex_, str, 1, &match, 0) == 0;
-}
-
-// Returns true iff regular expression re matches a substring of str
-// (including str itself).
-bool RE::PartialMatch(const char* str, const RE& re) {
- if (!re.is_valid_) return false;
-
- regmatch_t match;
- return regexec(&re.partial_regex_, str, 1, &match, 0) == 0;
-}
-
-// Initializes an RE from its string representation.
-void RE::Init(const char* regex) {
- pattern_ = posix::StrDup(regex);
-
- // Reserves enough bytes to hold the regular expression used for a
- // full match.
- const size_t full_regex_len = strlen(regex) + 10;
- char* const full_pattern = new char[full_regex_len];
-
- snprintf(full_pattern, full_regex_len, "^(%s)$", regex);
- is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;
- // We want to call regcomp(&partial_regex_, ...) even if the
- // previous expression returns false. Otherwise partial_regex_ may
- // not be properly initialized can may cause trouble when it's
- // freed.
- //
- // Some implementation of POSIX regex (e.g. on at least some
- // versions of Cygwin) doesn't accept the empty string as a valid
- // regex. We change it to an equivalent form "()" to be safe.
- if (is_valid_) {
- const char* const partial_regex = (*regex == '\0') ? "()" : regex;
- is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;
- }
- EXPECT_TRUE(is_valid_)
- << "Regular expression \"" << regex
- << "\" is not a valid POSIX Extended regular expression.";
-
- delete[] full_pattern;
-}
-
-#elif GTEST_USES_SIMPLE_RE
-
-// Returns true iff ch appears anywhere in str (excluding the
-// terminating '\0' character).
-bool IsInSet(char ch, const char* str) {
- return ch != '\0' && strchr(str, ch) != NULL;
-}
-
-// Returns true iff ch belongs to the given classification. Unlike
-// similar functions in <ctype.h>, these aren't affected by the
-// current locale.
-bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
-bool IsAsciiPunct(char ch) {
- return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~");
-}
-bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
-bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
-bool IsAsciiWordChar(char ch) {
- return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||
- ('0' <= ch && ch <= '9') || ch == '_';
-}
-
-// Returns true iff "\\c" is a supported escape sequence.
-bool IsValidEscape(char c) {
- return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW"));
-}
-
-// Returns true iff the given atom (specified by escaped and pattern)
-// matches ch. The result is undefined if the atom is invalid.
-bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
- if (escaped) { // "\\p" where p is pattern_char.
- switch (pattern_char) {
- case 'd': return IsAsciiDigit(ch);
- case 'D': return !IsAsciiDigit(ch);
- case 'f': return ch == '\f';
- case 'n': return ch == '\n';
- case 'r': return ch == '\r';
- case 's': return IsAsciiWhiteSpace(ch);
- case 'S': return !IsAsciiWhiteSpace(ch);
- case 't': return ch == '\t';
- case 'v': return ch == '\v';
- case 'w': return IsAsciiWordChar(ch);
- case 'W': return !IsAsciiWordChar(ch);
- }
- return IsAsciiPunct(pattern_char) && pattern_char == ch;
- }
-
- return (pattern_char == '.' && ch != '\n') || pattern_char == ch;
-}
-
-// Helper function used by ValidateRegex() to format error messages.
-String FormatRegexSyntaxError(const char* regex, int index) {
- return (Message() << "Syntax error at index " << index
- << " in simple regular expression \"" << regex << "\": ").GetString();
-}
-
-// Generates non-fatal failures and returns false if regex is invalid;
-// otherwise returns true.
-bool ValidateRegex(const char* regex) {
- if (regex == NULL) {
- // TODO(wan@google.com): fix the source file location in the
- // assertion failures to match where the regex is used in user
- // code.
- ADD_FAILURE() << "NULL is not a valid simple regular expression.";
- return false;
- }
-
- bool is_valid = true;
-
- // True iff ?, *, or + can follow the previous atom.
- bool prev_repeatable = false;
- for (int i = 0; regex[i]; i++) {
- if (regex[i] == '\\') { // An escape sequence
- i++;
- if (regex[i] == '\0') {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
- << "'\\' cannot appear at the end.";
- return false;
- }
-
- if (!IsValidEscape(regex[i])) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
- << "invalid escape sequence \"\\" << regex[i] << "\".";
- is_valid = false;
- }
- prev_repeatable = true;
- } else { // Not an escape sequence.
- const char ch = regex[i];
-
- if (ch == '^' && i > 0) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'^' can only appear at the beginning.";
- is_valid = false;
- } else if (ch == '$' && regex[i + 1] != '\0') {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'$' can only appear at the end.";
- is_valid = false;
- } else if (IsInSet(ch, "()[]{}|")) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'" << ch << "' is unsupported.";
- is_valid = false;
- } else if (IsRepeat(ch) && !prev_repeatable) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'" << ch << "' can only follow a repeatable token.";
- is_valid = false;
- }
-
- prev_repeatable = !IsInSet(ch, "^$?*+");
- }
- }
-
- return is_valid;
-}
-
-// Matches a repeated regex atom followed by a valid simple regular
-// expression. The regex atom is defined as c if escaped is false,
-// or \c otherwise. repeat is the repetition meta character (?, *,
-// or +). The behavior is undefined if str contains too many
-// characters to be indexable by size_t, in which case the test will
-// probably time out anyway. We are fine with this limitation as
-// std::string has it too.
-bool MatchRepetitionAndRegexAtHead(
- bool escaped, char c, char repeat, const char* regex,
- const char* str) {
- const size_t min_count = (repeat == '+') ? 1 : 0;
- const size_t max_count = (repeat == '?') ? 1 :
- static_cast<size_t>(-1) - 1;
- // We cannot call numeric_limits::max() as it conflicts with the
- // max() macro on Windows.
-
- for (size_t i = 0; i <= max_count; ++i) {
- // We know that the atom matches each of the first i characters in str.
- if (i >= min_count && MatchRegexAtHead(regex, str + i)) {
- // We have enough matches at the head, and the tail matches too.
- // Since we only care about *whether* the pattern matches str
- // (as opposed to *how* it matches), there is no need to find a
- // greedy match.
- return true;
- }
- if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i]))
- return false;
- }
- return false;
-}
-
-// Returns true iff regex matches a prefix of str. regex must be a
-// valid simple regular expression and not start with "^", or the
-// result is undefined.
-bool MatchRegexAtHead(const char* regex, const char* str) {
- if (*regex == '\0') // An empty regex matches a prefix of anything.
- return true;
-
- // "$" only matches the end of a string. Note that regex being
- // valid guarantees that there's nothing after "$" in it.
- if (*regex == '$')
- return *str == '\0';
-
- // Is the first thing in regex an escape sequence?
- const bool escaped = *regex == '\\';
- if (escaped)
- ++regex;
- if (IsRepeat(regex[1])) {
- // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so
- // here's an indirect recursion. It terminates as the regex gets
- // shorter in each recursion.
- return MatchRepetitionAndRegexAtHead(
- escaped, regex[0], regex[1], regex + 2, str);
- } else {
- // regex isn't empty, isn't "$", and doesn't start with a
- // repetition. We match the first atom of regex with the first
- // character of str and recurse.
- return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) &&
- MatchRegexAtHead(regex + 1, str + 1);
- }
-}
-
-// Returns true iff regex matches any substring of str. regex must be
-// a valid simple regular expression, or the result is undefined.
-//
-// The algorithm is recursive, but the recursion depth doesn't exceed
-// the regex length, so we won't need to worry about running out of
-// stack space normally. In rare cases the time complexity can be
-// exponential with respect to the regex length + the string length,
-// but usually it's must faster (often close to linear).
-bool MatchRegexAnywhere(const char* regex, const char* str) {
- if (regex == NULL || str == NULL)
- return false;
-
- if (*regex == '^')
- return MatchRegexAtHead(regex + 1, str);
-
- // A successful match can be anywhere in str.
- do {
- if (MatchRegexAtHead(regex, str))
- return true;
- } while (*str++ != '\0');
- return false;
-}
-
-// Implements the RE class.
-
-RE::~RE() {
- free(const_cast<char*>(pattern_));
- free(const_cast<char*>(full_pattern_));
-}
-
-// Returns true iff regular expression re matches the entire str.
-bool RE::FullMatch(const char* str, const RE& re) {
- return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);
-}
-
-// Returns true iff regular expression re matches a substring of str
-// (including str itself).
-bool RE::PartialMatch(const char* str, const RE& re) {
- return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);
-}
-
-// Initializes an RE from its string representation.
-void RE::Init(const char* regex) {
- pattern_ = full_pattern_ = NULL;
- if (regex != NULL) {
- pattern_ = posix::StrDup(regex);
- }
-
- is_valid_ = ValidateRegex(regex);
- if (!is_valid_) {
- // No need to calculate the full pattern when the regex is invalid.
- return;
- }
-
- const size_t len = strlen(regex);
- // Reserves enough bytes to hold the regular expression used for a
- // full match: we need space to prepend a '^', append a '$', and
- // terminate the string with '\0'.
- char* buffer = static_cast<char*>(malloc(len + 3));
- full_pattern_ = buffer;
-
- if (*regex != '^')
- *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'.
-
- // We don't use snprintf or strncpy, as they trigger a warning when
- // compiled with VC++ 8.0.
- memcpy(buffer, regex, len);
- buffer += len;
-
- if (len == 0 || regex[len - 1] != '$')
- *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'.
-
- *buffer = '\0';
-}
-
-#endif // GTEST_USES_POSIX_RE
-
-const char kUnknownFile[] = "unknown file";
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {
- const char* const file_name = file == NULL ? kUnknownFile : file;
-
- if (line < 0) {
- return String::Format("%s:", file_name).c_str();
- }
-#ifdef _MSC_VER
- return String::Format("%s(%d):", file_name, line).c_str();
-#else
- return String::Format("%s:%d:", file_name, line).c_str();
-#endif // _MSC_VER
-}
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-// Note that FormatCompilerIndependentFileLocation() does NOT append colon
-// to the file location it produces, unlike FormatFileLocation().
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
- const char* file, int line) {
- const char* const file_name = file == NULL ? kUnknownFile : file;
-
- if (line < 0)
- return file_name;
- else
- return String::Format("%s:%d", file_name, line).c_str();
-}
-
-
-GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)
- : severity_(severity) {
- const char* const marker =
- severity == GTEST_INFO ? "[ INFO ]" :
- severity == GTEST_WARNING ? "[WARNING]" :
- severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]";
- GetStream() << ::std::endl << marker << " "
- << FormatFileLocation(file, line).c_str() << ": ";
-}
-
-// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
-GTestLog::~GTestLog() {
- GetStream() << ::std::endl;
- if (severity_ == GTEST_FATAL) {
- fflush(stderr);
- posix::Abort();
- }
-}
-// Disable Microsoft deprecation warnings for POSIX functions called from
-// this class (creat, dup, dup2, and close)
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4996)
-#endif // _MSC_VER
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Object that captures an output stream (stdout/stderr).
-class CapturedStream {
- public:
- // The ctor redirects the stream to a temporary file.
- CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
-
-# if GTEST_OS_WINDOWS
- char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT
- char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT
-
- ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
- const UINT success = ::GetTempFileNameA(temp_dir_path,
- "gtest_redir",
- 0, // Generate unique file name.
- temp_file_path);
- GTEST_CHECK_(success != 0)
- << "Unable to create a temporary file in " << temp_dir_path;
- const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
- GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
- << temp_file_path;
- filename_ = temp_file_path;
-# else
- // There's no guarantee that a test has write access to the
- // current directory, so we create the temporary file in the /tmp
- // directory instead.
- char name_template[] = "/tmp/captured_stream.XXXXXX";
- const int captured_fd = mkstemp(name_template);
- filename_ = name_template;
-# endif // GTEST_OS_WINDOWS
- fflush(NULL);
- dup2(captured_fd, fd_);
- close(captured_fd);
- }
-
- ~CapturedStream() {
- remove(filename_.c_str());
- }
-
- String GetCapturedString() {
- if (uncaptured_fd_ != -1) {
- // Restores the original stream.
- fflush(NULL);
- dup2(uncaptured_fd_, fd_);
- close(uncaptured_fd_);
- uncaptured_fd_ = -1;
- }
-
- FILE* const file = posix::FOpen(filename_.c_str(), "r");
- const String content = ReadEntireFile(file);
- posix::FClose(file);
- return content;
- }
-
- private:
- // Reads the entire content of a file as a String.
- static String ReadEntireFile(FILE* file);
-
- // Returns the size (in bytes) of a file.
- static size_t GetFileSize(FILE* file);
-
- const int fd_; // A stream to capture.
- int uncaptured_fd_;
- // Name of the temporary file holding the stderr output.
- ::std::string filename_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream);
-};
-
-// Returns the size (in bytes) of a file.
-size_t CapturedStream::GetFileSize(FILE* file) {
- fseek(file, 0, SEEK_END);
- return static_cast<size_t>(ftell(file));
-}
-
-// Reads the entire content of a file as a string.
-String CapturedStream::ReadEntireFile(FILE* file) {
- const size_t file_size = GetFileSize(file);
- char* const buffer = new char[file_size];
-
- size_t bytes_last_read = 0; // # of bytes read in the last fread()
- size_t bytes_read = 0; // # of bytes read so far
-
- fseek(file, 0, SEEK_SET);
-
- // Keeps reading the file until we cannot read further or the
- // pre-determined file size is reached.
- do {
- bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);
- bytes_read += bytes_last_read;
- } while (bytes_last_read > 0 && bytes_read < file_size);
-
- const String content(buffer, bytes_read);
- delete[] buffer;
-
- return content;
-}
-
-# ifdef _MSC_VER
-# pragma warning(pop)
-# endif // _MSC_VER
-
-static CapturedStream* g_captured_stderr = NULL;
-static CapturedStream* g_captured_stdout = NULL;
-
-// Starts capturing an output stream (stdout/stderr).
-void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) {
- if (*stream != NULL) {
- GTEST_LOG_(FATAL) << "Only one " << stream_name
- << " capturer can exist at a time.";
- }
- *stream = new CapturedStream(fd);
-}
-
-// Stops capturing the output stream and returns the captured string.
-String GetCapturedStream(CapturedStream** captured_stream) {
- const String content = (*captured_stream)->GetCapturedString();
-
- delete *captured_stream;
- *captured_stream = NULL;
-
- return content;
-}
-
-// Starts capturing stdout.
-void CaptureStdout() {
- CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout);
-}
-
-// Starts capturing stderr.
-void CaptureStderr() {
- CaptureStream(kStdErrFileno, "stderr", &g_captured_stderr);
-}
-
-// Stops capturing stdout and returns the captured string.
-String GetCapturedStdout() { return GetCapturedStream(&g_captured_stdout); }
-
-// Stops capturing stderr and returns the captured string.
-String GetCapturedStderr() { return GetCapturedStream(&g_captured_stderr); }
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-#if GTEST_HAS_DEATH_TEST
-
-// A copy of all command line arguments. Set by InitGoogleTest().
-::std::vector<String> g_argvs;
-
-// Returns the command line as a vector of strings.
-const ::std::vector<String>& GetArgvs() { return g_argvs; }
-
-#endif // GTEST_HAS_DEATH_TEST
-
-#if GTEST_OS_WINDOWS_MOBILE
-namespace posix {
-void Abort() {
- DebugBreak();
- TerminateProcess(GetCurrentProcess(), 1);
-}
-} // namespace posix
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Returns the name of the environment variable corresponding to the
-// given flag. For example, FlagToEnvVar("foo") will return
-// "GTEST_FOO" in the open-source version.
-static String FlagToEnvVar(const char* flag) {
- const String full_flag =
- (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
-
- Message env_var;
- for (size_t i = 0; i != full_flag.length(); i++) {
- env_var << ToUpper(full_flag.c_str()[i]);
- }
-
- return env_var.GetString();
-}
-
-// Parses 'str' for a 32-bit signed integer. If successful, writes
-// the result to *value and returns true; otherwise leaves *value
-// unchanged and returns false.
-bool ParseInt32(const Message& src_text, const char* str, Int32* value) {
- // Parses the environment variable as a decimal integer.
- char* end = NULL;
- const long long_value = strtol(str, &end, 10); // NOLINT
-
- // Has strtol() consumed all characters in the string?
- if (*end != '\0') {
- // No - an invalid character was encountered.
- Message msg;
- msg << "WARNING: " << src_text
- << " is expected to be a 32-bit integer, but actually"
- << " has value \"" << str << "\".\n";
- printf("%s", msg.GetString().c_str());
- fflush(stdout);
- return false;
- }
-
- // Is the parsed value in the range of an Int32?
- const Int32 result = static_cast<Int32>(long_value);
- if (long_value == LONG_MAX || long_value == LONG_MIN ||
- // The parsed value overflows as a long. (strtol() returns
- // LONG_MAX or LONG_MIN when the input overflows.)
- result != long_value
- // The parsed value overflows as an Int32.
- ) {
- Message msg;
- msg << "WARNING: " << src_text
- << " is expected to be a 32-bit integer, but actually"
- << " has value " << str << ", which overflows.\n";
- printf("%s", msg.GetString().c_str());
- fflush(stdout);
- return false;
- }
-
- *value = result;
- return true;
-}
-
-// Reads and returns the Boolean environment variable corresponding to
-// the given flag; if it's not set, returns default_value.
-//
-// The value is considered true iff it's not "0".
-bool BoolFromGTestEnv(const char* flag, bool default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const string_value = posix::GetEnv(env_var.c_str());
- return string_value == NULL ?
- default_value : strcmp(string_value, "0") != 0;
-}
-
-// Reads and returns a 32-bit integer stored in the environment
-// variable corresponding to the given flag; if it isn't set or
-// doesn't represent a valid 32-bit integer, returns default_value.
-Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const string_value = posix::GetEnv(env_var.c_str());
- if (string_value == NULL) {
- // The environment variable is not set.
- return default_value;
- }
-
- Int32 result = default_value;
- if (!ParseInt32(Message() << "Environment variable " << env_var,
- string_value, &result)) {
- printf("The default value %s is used.\n",
- (Message() << default_value).GetString().c_str());
- fflush(stdout);
- return default_value;
- }
-
- return result;
-}
-
-// Reads and returns the string environment variable corresponding to
-// the given flag; if it's not set, returns default_value.
-const char* StringFromGTestEnv(const char* flag, const char* default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const value = posix::GetEnv(env_var.c_str());
- return value == NULL ? default_value : value;
-}
-
-} // namespace internal
-} // namespace testing
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// It uses the << operator when possible, and prints the bytes in the
-// object otherwise. A user can override its behavior for a class
-// type Foo by defining either operator<<(::std::ostream&, const Foo&)
-// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that
-// defines Foo.
-
-#include <ctype.h>
-#include <stdio.h>
-#include <ostream> // NOLINT
-#include <string>
-
-namespace testing {
-
-namespace {
-
-using ::std::ostream;
-
-#if GTEST_OS_WINDOWS_MOBILE // Windows CE does not define _snprintf_s.
-# define snprintf _snprintf
-#elif _MSC_VER >= 1400 // VC 8.0 and later deprecate snprintf and _snprintf.
-# define snprintf _snprintf_s
-#elif _MSC_VER
-# define snprintf _snprintf
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Prints a segment of bytes in the given object.
-void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,
- size_t count, ostream* os) {
- char text[5] = "";
- for (size_t i = 0; i != count; i++) {
- const size_t j = start + i;
- if (i != 0) {
- // Organizes the bytes into groups of 2 for easy parsing by
- // human.
- if ((j % 2) == 0)
- *os << ' ';
- else
- *os << '-';
- }
- snprintf(text, sizeof(text), "%02X", obj_bytes[j]);
- *os << text;
- }
-}
-
-// Prints the bytes in the given value to the given ostream.
-void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
- ostream* os) {
- // Tells the user how big the object is.
- *os << count << "-byte object <";
-
- const size_t kThreshold = 132;
- const size_t kChunkSize = 64;
- // If the object size is bigger than kThreshold, we'll have to omit
- // some details by printing only the first and the last kChunkSize
- // bytes.
- // TODO(wan): let the user control the threshold using a flag.
- if (count < kThreshold) {
- PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
- } else {
- PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
- *os << " ... ";
- // Rounds up to 2-byte boundary.
- const size_t resume_pos = (count - kChunkSize + 1)/2*2;
- PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
- }
- *os << ">";
-}
-
-} // namespace
-
-namespace internal2 {
-
-// Delegates to PrintBytesInObjectToImpl() to print the bytes in the
-// given object. The delegation simplifies the implementation, which
-// uses the << operator and thus is easier done outside of the
-// ::testing::internal namespace, which contains a << operator that
-// sometimes conflicts with the one in STL.
-void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,
- ostream* os) {
- PrintBytesInObjectToImpl(obj_bytes, count, os);
-}
-
-} // namespace internal2
-
-namespace internal {
-
-// Depending on the value of a char (or wchar_t), we print it in one
-// of three formats:
-// - as is if it's a printable ASCII (e.g. 'a', '2', ' '),
-// - as a hexidecimal escape sequence (e.g. '\x7F'), or
-// - as a special escape sequence (e.g. '\r', '\n').
-enum CharFormat {
- kAsIs,
- kHexEscape,
- kSpecialEscape
-};
-
-// Returns true if c is a printable ASCII character. We test the
-// value of c directly instead of calling isprint(), which is buggy on
-// Windows Mobile.
-inline bool IsPrintableAscii(wchar_t c) {
- return 0x20 <= c && c <= 0x7E;
-}
-
-// Prints a wide or narrow char c as a character literal without the
-// quotes, escaping it when necessary; returns how c was formatted.
-// The template argument UnsignedChar is the unsigned version of Char,
-// which is the type of c.
-template <typename UnsignedChar, typename Char>
-static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
- switch (static_cast<wchar_t>(c)) {
- case L'\0':
- *os << "\\0";
- break;
- case L'\'':
- *os << "\\'";
- break;
- case L'\\':
- *os << "\\\\";
- break;
- case L'\a':
- *os << "\\a";
- break;
- case L'\b':
- *os << "\\b";
- break;
- case L'\f':
- *os << "\\f";
- break;
- case L'\n':
- *os << "\\n";
- break;
- case L'\r':
- *os << "\\r";
- break;
- case L'\t':
- *os << "\\t";
- break;
- case L'\v':
- *os << "\\v";
- break;
- default:
- if (IsPrintableAscii(c)) {
- *os << static_cast<char>(c);
- return kAsIs;
- } else {
- *os << String::Format("\\x%X", static_cast<UnsignedChar>(c));
- return kHexEscape;
- }
- }
- return kSpecialEscape;
-}
-
-// Prints a char c as if it's part of a string literal, escaping it when
-// necessary; returns how c was formatted.
-static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
- switch (c) {
- case L'\'':
- *os << "'";
- return kAsIs;
- case L'"':
- *os << "\\\"";
- return kSpecialEscape;
- default:
- return PrintAsCharLiteralTo<wchar_t>(c, os);
- }
-}
-
-// Prints a char c as if it's part of a string literal, escaping it when
-// necessary; returns how c was formatted.
-static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
- return PrintAsWideStringLiteralTo(static_cast<unsigned char>(c), os);
-}
-
-// Prints a wide or narrow character c and its code. '\0' is printed
-// as "'\\0'", other unprintable characters are also properly escaped
-// using the standard C++ escape sequence. The template argument
-// UnsignedChar is the unsigned version of Char, which is the type of c.
-template <typename UnsignedChar, typename Char>
-void PrintCharAndCodeTo(Char c, ostream* os) {
- // First, print c as a literal in the most readable form we can find.
- *os << ((sizeof(c) > 1) ? "L'" : "'");
- const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
- *os << "'";
-
- // To aid user debugging, we also print c's code in decimal, unless
- // it's 0 (in which case c was printed as '\\0', making the code
- // obvious).
- if (c == 0)
- return;
- *os << " (" << String::Format("%d", c).c_str();
-
- // For more convenience, we print c's code again in hexidecimal,
- // unless c was already printed in the form '\x##' or the code is in
- // [1, 9].
- if (format == kHexEscape || (1 <= c && c <= 9)) {
- // Do nothing.
- } else {
- *os << String::Format(", 0x%X",
- static_cast<UnsignedChar>(c)).c_str();
- }
- *os << ")";
-}
-
-void PrintTo(unsigned char c, ::std::ostream* os) {
- PrintCharAndCodeTo<unsigned char>(c, os);
-}
-void PrintTo(signed char c, ::std::ostream* os) {
- PrintCharAndCodeTo<unsigned char>(c, os);
-}
-
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its code. L'\0' is printed as "L'\\0'".
-void PrintTo(wchar_t wc, ostream* os) {
- PrintCharAndCodeTo<wchar_t>(wc, os);
-}
-
-// Prints the given array of characters to the ostream.
-// The array starts at *begin, the length is len, it may include '\0' characters
-// and may not be null-terminated.
-static void PrintCharsAsStringTo(const char* begin, size_t len, ostream* os) {
- *os << "\"";
- bool is_previous_hex = false;
- for (size_t index = 0; index < len; ++index) {
- const char cur = begin[index];
- if (is_previous_hex && IsXDigit(cur)) {
- // Previous character is of '\x..' form and this character can be
- // interpreted as another hexadecimal digit in its number. Break string to
- // disambiguate.
- *os << "\" \"";
- }
- is_previous_hex = PrintAsNarrowStringLiteralTo(cur, os) == kHexEscape;
- }
- *os << "\"";
-}
-
-// Prints a (const) char array of 'len' elements, starting at address 'begin'.
-void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
- PrintCharsAsStringTo(begin, len, os);
-}
-
-// Prints the given array of wide characters to the ostream.
-// The array starts at *begin, the length is len, it may include L'\0'
-// characters and may not be null-terminated.
-static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
- ostream* os) {
- *os << "L\"";
- bool is_previous_hex = false;
- for (size_t index = 0; index < len; ++index) {
- const wchar_t cur = begin[index];
- if (is_previous_hex && isascii(cur) && IsXDigit(static_cast<char>(cur))) {
- // Previous character is of '\x..' form and this character can be
- // interpreted as another hexadecimal digit in its number. Break string to
- // disambiguate.
- *os << "\" L\"";
- }
- is_previous_hex = PrintAsWideStringLiteralTo(cur, os) == kHexEscape;
- }
- *os << "\"";
-}
-
-// Prints the given C string to the ostream.
-void PrintTo(const char* s, ostream* os) {
- if (s == NULL) {
- *os << "NULL";
- } else {
- *os << ImplicitCast_<const void*>(s) << " pointing to ";
- PrintCharsAsStringTo(s, strlen(s), os);
- }
-}
-
-// MSVC compiler can be configured to define whar_t as a typedef
-// of unsigned short. Defining an overload for const wchar_t* in that case
-// would cause pointers to unsigned shorts be printed as wide strings,
-// possibly accessing more memory than intended and causing invalid
-// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when
-// wchar_t is implemented as a native type.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Prints the given wide C string to the ostream.
-void PrintTo(const wchar_t* s, ostream* os) {
- if (s == NULL) {
- *os << "NULL";
- } else {
- *os << ImplicitCast_<const void*>(s) << " pointing to ";
- PrintWideCharsAsStringTo(s, wcslen(s), os);
- }
-}
-#endif // wchar_t is native
-
-// Prints a ::string object.
-#if GTEST_HAS_GLOBAL_STRING
-void PrintStringTo(const ::string& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-void PrintStringTo(const ::std::string& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-
-// Prints a ::wstring object.
-#if GTEST_HAS_GLOBAL_WSTRING
-void PrintWideStringTo(const ::wstring& s, ostream* os) {
- PrintWideCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
- PrintWideCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-} // namespace internal
-
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// The Google C++ Testing Framework (Google Test)
-
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-using internal::GetUnitTestImpl;
-
-// Gets the summary of the failure message by omitting the stack trace
-// in it.
-internal::String TestPartResult::ExtractSummary(const char* message) {
- const char* const stack_trace = strstr(message, internal::kStackTraceMarker);
- return stack_trace == NULL ? internal::String(message) :
- internal::String(message, stack_trace - message);
-}
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result) {
- return os
- << result.file_name() << ":" << result.line_number() << ": "
- << (result.type() == TestPartResult::kSuccess ? "Success" :
- result.type() == TestPartResult::kFatalFailure ? "Fatal failure" :
- "Non-fatal failure") << ":\n"
- << result.message() << std::endl;
-}
-
-// Appends a TestPartResult to the array.
-void TestPartResultArray::Append(const TestPartResult& result) {
- array_.push_back(result);
-}
-
-// Returns the TestPartResult at the given index (0-based).
-const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const {
- if (index < 0 || index >= size()) {
- printf("\nInvalid index (%d) into TestPartResultArray.\n", index);
- internal::posix::Abort();
- }
-
- return array_[index];
-}
-
-// Returns the number of TestPartResult objects in the array.
-int TestPartResultArray::size() const {
- return static_cast<int>(array_.size());
-}
-
-namespace internal {
-
-HasNewFatalFailureHelper::HasNewFatalFailureHelper()
- : has_new_fatal_failure_(false),
- original_reporter_(GetUnitTestImpl()->
- GetTestPartResultReporterForCurrentThread()) {
- GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);
-}
-
-HasNewFatalFailureHelper::~HasNewFatalFailureHelper() {
- GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(
- original_reporter_);
-}
-
-void HasNewFatalFailureHelper::ReportTestPartResult(
- const TestPartResult& result) {
- if (result.fatally_failed())
- has_new_fatal_failure_ = true;
- original_reporter_->ReportTestPartResult(result);
-}
-
-} // namespace internal
-
-} // namespace testing
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-namespace testing {
-namespace internal {
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// Skips to the first non-space char in str. Returns an empty string if str
-// contains only whitespace characters.
-static const char* SkipSpaces(const char* str) {
- while (IsSpace(*str))
- str++;
- return str;
-}
-
-// Verifies that registered_tests match the test names in
-// defined_test_names_; returns registered_tests if successful, or
-// aborts the program otherwise.
-const char* TypedTestCasePState::VerifyRegisteredTestNames(
- const char* file, int line, const char* registered_tests) {
- typedef ::std::set<const char*>::const_iterator DefinedTestIter;
- registered_ = true;
-
- // Skip initial whitespace in registered_tests since some
- // preprocessors prefix stringizied literals with whitespace.
- registered_tests = SkipSpaces(registered_tests);
-
- Message errors;
- ::std::set<String> tests;
- for (const char* names = registered_tests; names != NULL;
- names = SkipComma(names)) {
- const String name = GetPrefixUntilComma(names);
- if (tests.count(name) != 0) {
- errors << "Test " << name << " is listed more than once.\n";
- continue;
- }
-
- bool found = false;
- for (DefinedTestIter it = defined_test_names_.begin();
- it != defined_test_names_.end();
- ++it) {
- if (name == *it) {
- found = true;
- break;
- }
- }
-
- if (found) {
- tests.insert(name);
- } else {
- errors << "No test named " << name
- << " can be found in this test case.\n";
- }
- }
-
- for (DefinedTestIter it = defined_test_names_.begin();
- it != defined_test_names_.end();
- ++it) {
- if (tests.count(*it) == 0) {
- errors << "You forgot to list test " << *it << ".\n";
- }
- }
-
- const String& errors_str = errors.GetString();
- if (errors_str != "") {
- fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
- errors_str.c_str());
- fflush(stderr);
- posix::Abort();
- }
-
- return registered_tests;
-}
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Google C++ Mocking Framework (Google Mock)
-//
-// This file #includes all Google Mock implementation .cc files. The
-// purpose is to allow a user to build Google Mock by compiling this
-// file alone.
-
-// This line ensures that gmock.h can be compiled on its own, even
-// when it's fused.
-#include "gmock/gmock.h"
-
-// The following lines pull in the real gmock *.cc files.
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements cardinalities.
-
-
-#include <limits.h>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-
-namespace testing {
-
-namespace {
-
-// Implements the Between(m, n) cardinality.
-class BetweenCardinalityImpl : public CardinalityInterface {
- public:
- BetweenCardinalityImpl(int min, int max)
- : min_(min >= 0 ? min : 0),
- max_(max >= min_ ? max : min_) {
- std::stringstream ss;
- if (min < 0) {
- ss << "The invocation lower bound must be >= 0, "
- << "but is actually " << min << ".";
- internal::Expect(false, __FILE__, __LINE__, ss.str());
- } else if (max < 0) {
- ss << "The invocation upper bound must be >= 0, "
- << "but is actually " << max << ".";
- internal::Expect(false, __FILE__, __LINE__, ss.str());
- } else if (min > max) {
- ss << "The invocation upper bound (" << max
- << ") must be >= the invocation lower bound (" << min
- << ").";
- internal::Expect(false, __FILE__, __LINE__, ss.str());
- }
- }
-
- // Conservative estimate on the lower/upper bound of the number of
- // calls allowed.
- virtual int ConservativeLowerBound() const { return min_; }
- virtual int ConservativeUpperBound() const { return max_; }
-
- virtual bool IsSatisfiedByCallCount(int call_count) const {
- return min_ <= call_count && call_count <= max_ ;
- }
-
- virtual bool IsSaturatedByCallCount(int call_count) const {
- return call_count >= max_;
- }
-
- virtual void DescribeTo(::std::ostream* os) const;
- private:
- const int min_;
- const int max_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(BetweenCardinalityImpl);
-};
-
-// Formats "n times" in a human-friendly way.
-inline internal::string FormatTimes(int n) {
- if (n == 1) {
- return "once";
- } else if (n == 2) {
- return "twice";
- } else {
- std::stringstream ss;
- ss << n << " times";
- return ss.str();
- }
-}
-
-// Describes the Between(m, n) cardinality in human-friendly text.
-void BetweenCardinalityImpl::DescribeTo(::std::ostream* os) const {
- if (min_ == 0) {
- if (max_ == 0) {
- *os << "never called";
- } else if (max_ == INT_MAX) {
- *os << "called any number of times";
- } else {
- *os << "called at most " << FormatTimes(max_);
- }
- } else if (min_ == max_) {
- *os << "called " << FormatTimes(min_);
- } else if (max_ == INT_MAX) {
- *os << "called at least " << FormatTimes(min_);
- } else {
- // 0 < min_ < max_ < INT_MAX
- *os << "called between " << min_ << " and " << max_ << " times";
- }
-}
-
-} // Unnamed namespace
-
-// Describes the given call count to an ostream.
-void Cardinality::DescribeActualCallCountTo(int actual_call_count,
- ::std::ostream* os) {
- if (actual_call_count > 0) {
- *os << "called " << FormatTimes(actual_call_count);
- } else {
- *os << "never called";
- }
-}
-
-// Creates a cardinality that allows at least n calls.
-Cardinality AtLeast(int n) { return Between(n, INT_MAX); }
-
-// Creates a cardinality that allows at most n calls.
-Cardinality AtMost(int n) { return Between(0, n); }
-
-// Creates a cardinality that allows any number of calls.
-Cardinality AnyNumber() { return AtLeast(0); }
-
-// Creates a cardinality that allows between min and max calls.
-Cardinality Between(int min, int max) {
- return Cardinality(new BetweenCardinalityImpl(min, max));
-}
-
-// Creates a cardinality that allows exactly n calls.
-Cardinality Exactly(int n) { return Between(n, n); }
-
-} // namespace testing
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file defines some utilities useful for implementing Google
-// Mock. They are subject to change without notice, so please DO NOT
-// USE THEM IN USER CODE.
-
-
-#include <ctype.h>
-#include <ostream> // NOLINT
-#include <string>
-
-namespace testing {
-namespace internal {
-
-// Converts an identifier name to a space-separated list of lower-case
-// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
-// treated as one word. For example, both "FooBar123" and
-// "foo_bar_123" are converted to "foo bar 123".
-string ConvertIdentifierNameToWords(const char* id_name) {
- string result;
- char prev_char = '\0';
- for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) {
- // We don't care about the current locale as the input is
- // guaranteed to be a valid C++ identifier name.
- const bool starts_new_word = IsUpper(*p) ||
- (!IsAlpha(prev_char) && IsLower(*p)) ||
- (!IsDigit(prev_char) && IsDigit(*p));
-
- if (IsAlNum(*p)) {
- if (starts_new_word && result != "")
- result += ' ';
- result += ToLower(*p);
- }
- }
- return result;
-}
-
-// This class reports Google Mock failures as Google Test failures. A
-// user can define another class in a similar fashion if he intends to
-// use Google Mock with a testing framework other than Google Test.
-class GoogleTestFailureReporter : public FailureReporterInterface {
- public:
- virtual void ReportFailure(FailureType type, const char* file, int line,
- const string& message) {
- AssertHelper(type == FATAL ?
- TestPartResult::kFatalFailure :
- TestPartResult::kNonFatalFailure,
- file,
- line,
- message.c_str()) = Message();
- if (type == FATAL) {
- posix::Abort();
- }
- }
-};
-
-// Returns the global failure reporter. Will create a
-// GoogleTestFailureReporter and return it the first time called.
-FailureReporterInterface* GetFailureReporter() {
- // Points to the global failure reporter used by Google Mock. gcc
- // guarantees that the following use of failure_reporter is
- // thread-safe. We may need to add additional synchronization to
- // protect failure_reporter if we port Google Mock to other
- // compilers.
- static FailureReporterInterface* const failure_reporter =
- new GoogleTestFailureReporter();
- return failure_reporter;
-}
-
-// Protects global resources (stdout in particular) used by Log().
-static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);
-
-// Returns true iff a log with the given severity is visible according
-// to the --gmock_verbose flag.
-bool LogIsVisible(LogSeverity severity) {
- if (GMOCK_FLAG(verbose) == kInfoVerbosity) {
- // Always show the log if --gmock_verbose=info.
- return true;
- } else if (GMOCK_FLAG(verbose) == kErrorVerbosity) {
- // Always hide it if --gmock_verbose=error.
- return false;
- } else {
- // If --gmock_verbose is neither "info" nor "error", we treat it
- // as "warning" (its default value).
- return severity == WARNING;
- }
-}
-
-// Prints the given message to stdout iff 'severity' >= the level
-// specified by the --gmock_verbose flag. If stack_frames_to_skip >=
-// 0, also prints the stack trace excluding the top
-// stack_frames_to_skip frames. In opt mode, any positive
-// stack_frames_to_skip is treated as 0, since we don't know which
-// function calls will be inlined by the compiler and need to be
-// conservative.
-void Log(LogSeverity severity, const string& message,
- int stack_frames_to_skip) {
- if (!LogIsVisible(severity))
- return;
-
- // Ensures that logs from different threads don't interleave.
- MutexLock l(&g_log_mutex);
-
- // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is a
- // macro.
-
- if (severity == WARNING) {
- // Prints a GMOCK WARNING marker to make the warnings easily searchable.
- std::cout << "\nGMOCK WARNING:";
- }
- // Pre-pends a new-line to message if it doesn't start with one.
- if (message.empty() || message[0] != '\n') {
- std::cout << "\n";
- }
- std::cout << message;
- if (stack_frames_to_skip >= 0) {
-#ifdef NDEBUG
- // In opt mode, we have to be conservative and skip no stack frame.
- const int actual_to_skip = 0;
-#else
- // In dbg mode, we can do what the caller tell us to do (plus one
- // for skipping this function's stack frame).
- const int actual_to_skip = stack_frames_to_skip + 1;
-#endif // NDEBUG
-
- // Appends a new-line to message if it doesn't end with one.
- if (!message.empty() && *message.rbegin() != '\n') {
- std::cout << "\n";
- }
- std::cout << "Stack trace:\n"
- << ::testing::internal::GetCurrentOsStackTraceExceptTop(
- ::testing::UnitTest::GetInstance(), actual_to_skip);
- }
- std::cout << ::std::flush;
-}
-
-} // namespace internal
-} // namespace testing
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements Matcher<const string&>, Matcher<string>, and
-// utilities for defining matchers.
-
-
-#include <string.h>
-#include <sstream>
-#include <string>
-
-namespace testing {
-
-// Constructs a matcher that matches a const string& whose value is
-// equal to s.
-Matcher<const internal::string&>::Matcher(const internal::string& s) {
- *this = Eq(s);
-}
-
-// Constructs a matcher that matches a const string& whose value is
-// equal to s.
-Matcher<const internal::string&>::Matcher(const char* s) {
- *this = Eq(internal::string(s));
-}
-
-// Constructs a matcher that matches a string whose value is equal to s.
-Matcher<internal::string>::Matcher(const internal::string& s) { *this = Eq(s); }
-
-// Constructs a matcher that matches a string whose value is equal to s.
-Matcher<internal::string>::Matcher(const char* s) {
- *this = Eq(internal::string(s));
-}
-
-namespace internal {
-
-// Joins a vector of strings as if they are fields of a tuple; returns
-// the joined string.
-string JoinAsTuple(const Strings& fields) {
- switch (fields.size()) {
- case 0:
- return "";
- case 1:
- return fields[0];
- default:
- string result = "(" + fields[0];
- for (size_t i = 1; i < fields.size(); i++) {
- result += ", ";
- result += fields[i];
- }
- result += ")";
- return result;
- }
-}
-
-// Returns the description for a matcher defined using the MATCHER*()
-// macro where the user-supplied description string is "", if
-// 'negation' is false; otherwise returns the description of the
-// negation of the matcher. 'param_values' contains a list of strings
-// that are the print-out of the matcher's parameters.
-string FormatMatcherDescription(bool negation, const char* matcher_name,
- const Strings& param_values) {
- string result = ConvertIdentifierNameToWords(matcher_name);
- if (param_values.size() >= 1)
- result += " " + JoinAsTuple(param_values);
- return negation ? "not (" + result + ")" : result;
-}
-
-} // namespace internal
-} // namespace testing
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements the spec builder syntax (ON_CALL and
-// EXPECT_CALL).
-
-
-#include <stdlib.h>
-#include <iostream> // NOLINT
-#include <map>
-#include <set>
-#include <string>
-
-#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
-# include <unistd.h> // NOLINT
-#endif
-
-namespace testing {
-namespace internal {
-
-// Protects the mock object registry (in class Mock), all function
-// mockers, and all expectations.
-GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex);
-
-// Logs a message including file and line number information.
-void LogWithLocation(testing::internal::LogSeverity severity,
- const char* file, int line,
- const string& message) {
- ::std::ostringstream s;
- s << file << ":" << line << ": " << message << ::std::endl;
- Log(severity, s.str(), 0);
-}
-
-// Constructs an ExpectationBase object.
-ExpectationBase::ExpectationBase(const char* a_file,
- int a_line,
- const string& a_source_text)
- : file_(a_file),
- line_(a_line),
- source_text_(a_source_text),
- cardinality_specified_(false),
- cardinality_(Exactly(1)),
- call_count_(0),
- retired_(false),
- extra_matcher_specified_(false),
- repeated_action_specified_(false),
- retires_on_saturation_(false),
- last_clause_(kNone),
- action_count_checked_(false) {}
-
-// Destructs an ExpectationBase object.
-ExpectationBase::~ExpectationBase() {}
-
-// Explicitly specifies the cardinality of this expectation. Used by
-// the subclasses to implement the .Times() clause.
-void ExpectationBase::SpecifyCardinality(const Cardinality& a_cardinality) {
- cardinality_specified_ = true;
- cardinality_ = a_cardinality;
-}
-
-// Retires all pre-requisites of this expectation.
-void ExpectationBase::RetireAllPreRequisites() {
- if (is_retired()) {
- // We can take this short-cut as we never retire an expectation
- // until we have retired all its pre-requisites.
- return;
- }
-
- for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin();
- it != immediate_prerequisites_.end(); ++it) {
- ExpectationBase* const prerequisite = it->expectation_base().get();
- if (!prerequisite->is_retired()) {
- prerequisite->RetireAllPreRequisites();
- prerequisite->Retire();
- }
- }
-}
-
-// Returns true iff all pre-requisites of this expectation have been
-// satisfied.
-// L >= g_gmock_mutex
-bool ExpectationBase::AllPrerequisitesAreSatisfied() const {
- g_gmock_mutex.AssertHeld();
- for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin();
- it != immediate_prerequisites_.end(); ++it) {
- if (!(it->expectation_base()->IsSatisfied()) ||
- !(it->expectation_base()->AllPrerequisitesAreSatisfied()))
- return false;
- }
- return true;
-}
-
-// Adds unsatisfied pre-requisites of this expectation to 'result'.
-// L >= g_gmock_mutex
-void ExpectationBase::FindUnsatisfiedPrerequisites(
- ExpectationSet* result) const {
- g_gmock_mutex.AssertHeld();
- for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin();
- it != immediate_prerequisites_.end(); ++it) {
- if (it->expectation_base()->IsSatisfied()) {
- // If *it is satisfied and has a call count of 0, some of its
- // pre-requisites may not be satisfied yet.
- if (it->expectation_base()->call_count_ == 0) {
- it->expectation_base()->FindUnsatisfiedPrerequisites(result);
- }
- } else {
- // Now that we know *it is unsatisfied, we are not so interested
- // in whether its pre-requisites are satisfied. Therefore we
- // don't recursively call FindUnsatisfiedPrerequisites() here.
- *result += *it;
- }
- }
-}
-
-// Describes how many times a function call matching this
-// expectation has occurred.
-// L >= g_gmock_mutex
-void ExpectationBase::DescribeCallCountTo(::std::ostream* os) const {
- g_gmock_mutex.AssertHeld();
-
- // Describes how many times the function is expected to be called.
- *os << " Expected: to be ";
- cardinality().DescribeTo(os);
- *os << "\n Actual: ";
- Cardinality::DescribeActualCallCountTo(call_count(), os);
-
- // Describes the state of the expectation (e.g. is it satisfied?
- // is it active?).
- *os << " - " << (IsOverSaturated() ? "over-saturated" :
- IsSaturated() ? "saturated" :
- IsSatisfied() ? "satisfied" : "unsatisfied")
- << " and "
- << (is_retired() ? "retired" : "active");
-}
-
-// Checks the action count (i.e. the number of WillOnce() and
-// WillRepeatedly() clauses) against the cardinality if this hasn't
-// been done before. Prints a warning if there are too many or too
-// few actions.
-// L < mutex_
-void ExpectationBase::CheckActionCountIfNotDone() const {
- bool should_check = false;
- {
- MutexLock l(&mutex_);
- if (!action_count_checked_) {
- action_count_checked_ = true;
- should_check = true;
- }
- }
-
- if (should_check) {
- if (!cardinality_specified_) {
- // The cardinality was inferred - no need to check the action
- // count against it.
- return;
- }
-
- // The cardinality was explicitly specified.
- const int action_count = static_cast<int>(untyped_actions_.size());
- const int upper_bound = cardinality().ConservativeUpperBound();
- const int lower_bound = cardinality().ConservativeLowerBound();
- bool too_many; // True if there are too many actions, or false
- // if there are too few.
- if (action_count > upper_bound ||
- (action_count == upper_bound && repeated_action_specified_)) {
- too_many = true;
- } else if (0 < action_count && action_count < lower_bound &&
- !repeated_action_specified_) {
- too_many = false;
- } else {
- return;
- }
-
- ::std::stringstream ss;
- DescribeLocationTo(&ss);
- ss << "Too " << (too_many ? "many" : "few")
- << " actions specified in " << source_text() << "...\n"
- << "Expected to be ";
- cardinality().DescribeTo(&ss);
- ss << ", but has " << (too_many ? "" : "only ")
- << action_count << " WillOnce()"
- << (action_count == 1 ? "" : "s");
- if (repeated_action_specified_) {
- ss << " and a WillRepeatedly()";
- }
- ss << ".";
- Log(WARNING, ss.str(), -1); // -1 means "don't print stack trace".
- }
-}
-
-// Implements the .Times() clause.
-void ExpectationBase::UntypedTimes(const Cardinality& a_cardinality) {
- if (last_clause_ == kTimes) {
- ExpectSpecProperty(false,
- ".Times() cannot appear "
- "more than once in an EXPECT_CALL().");
- } else {
- ExpectSpecProperty(last_clause_ < kTimes,
- ".Times() cannot appear after "
- ".InSequence(), .WillOnce(), .WillRepeatedly(), "
- "or .RetiresOnSaturation().");
- }
- last_clause_ = kTimes;
-
- SpecifyCardinality(a_cardinality);
-}
-
-// Points to the implicit sequence introduced by a living InSequence
-// object (if any) in the current thread or NULL.
-ThreadLocal<Sequence*> g_gmock_implicit_sequence;
-
-// Reports an uninteresting call (whose description is in msg) in the
-// manner specified by 'reaction'.
-void ReportUninterestingCall(CallReaction reaction, const string& msg) {
- switch (reaction) {
- case ALLOW:
- Log(INFO, msg, 3);
- break;
- case WARN:
- Log(WARNING, msg, 3);
- break;
- default: // FAIL
- Expect(false, NULL, -1, msg);
- }
-}
-
-UntypedFunctionMockerBase::UntypedFunctionMockerBase()
- : mock_obj_(NULL), name_("") {}
-
-UntypedFunctionMockerBase::~UntypedFunctionMockerBase() {}
-
-// Sets the mock object this mock method belongs to, and registers
-// this information in the global mock registry. Will be called
-// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
-// method.
-// L < g_gmock_mutex
-void UntypedFunctionMockerBase::RegisterOwner(const void* mock_obj) {
- {
- MutexLock l(&g_gmock_mutex);
- mock_obj_ = mock_obj;
- }
- Mock::Register(mock_obj, this);
-}
-
-// Sets the mock object this mock method belongs to, and sets the name
-// of the mock function. Will be called upon each invocation of this
-// mock function.
-// L < g_gmock_mutex
-void UntypedFunctionMockerBase::SetOwnerAndName(
- const void* mock_obj, const char* name) {
- // We protect name_ under g_gmock_mutex in case this mock function
- // is called from two threads concurrently.
- MutexLock l(&g_gmock_mutex);
- mock_obj_ = mock_obj;
- name_ = name;
-}
-
-// Returns the name of the function being mocked. Must be called
-// after RegisterOwner() or SetOwnerAndName() has been called.
-// L < g_gmock_mutex
-const void* UntypedFunctionMockerBase::MockObject() const {
- const void* mock_obj;
- {
- // We protect mock_obj_ under g_gmock_mutex in case this mock
- // function is called from two threads concurrently.
- MutexLock l(&g_gmock_mutex);
- Assert(mock_obj_ != NULL, __FILE__, __LINE__,
- "MockObject() must not be called before RegisterOwner() or "
- "SetOwnerAndName() has been called.");
- mock_obj = mock_obj_;
- }
- return mock_obj;
-}
-
-// Returns the name of this mock method. Must be called after
-// SetOwnerAndName() has been called.
-// L < g_gmock_mutex
-const char* UntypedFunctionMockerBase::Name() const {
- const char* name;
- {
- // We protect name_ under g_gmock_mutex in case this mock
- // function is called from two threads concurrently.
- MutexLock l(&g_gmock_mutex);
- Assert(name_ != NULL, __FILE__, __LINE__,
- "Name() must not be called before SetOwnerAndName() has "
- "been called.");
- name = name_;
- }
- return name;
-}
-
-// Calculates the result of invoking this mock function with the given
-// arguments, prints it, and returns it. The caller is responsible
-// for deleting the result.
-// L < g_gmock_mutex
-const UntypedActionResultHolderBase*
-UntypedFunctionMockerBase::UntypedInvokeWith(const void* const untyped_args) {
- if (untyped_expectations_.size() == 0) {
- // No expectation is set on this mock method - we have an
- // uninteresting call.
-
- // We must get Google Mock's reaction on uninteresting calls
- // made on this mock object BEFORE performing the action,
- // because the action may DELETE the mock object and make the
- // following expression meaningless.
- const CallReaction reaction =
- Mock::GetReactionOnUninterestingCalls(MockObject());
-
- // True iff we need to print this call's arguments and return
- // value. This definition must be kept in sync with
- // the behavior of ReportUninterestingCall().
- const bool need_to_report_uninteresting_call =
- // If the user allows this uninteresting call, we print it
- // only when he wants informational messages.
- reaction == ALLOW ? LogIsVisible(INFO) :
- // If the user wants this to be a warning, we print it only
- // when he wants to see warnings.
- reaction == WARN ? LogIsVisible(WARNING) :
- // Otherwise, the user wants this to be an error, and we
- // should always print detailed information in the error.
- true;
-
- if (!need_to_report_uninteresting_call) {
- // Perform the action without printing the call information.
- return this->UntypedPerformDefaultAction(untyped_args, "");
- }
-
- // Warns about the uninteresting call.
- ::std::stringstream ss;
- this->UntypedDescribeUninterestingCall(untyped_args, &ss);
-
- // Calculates the function result.
- const UntypedActionResultHolderBase* const result =
- this->UntypedPerformDefaultAction(untyped_args, ss.str());
-
- // Prints the function result.
- if (result != NULL)
- result->PrintAsActionResult(&ss);
-
- ReportUninterestingCall(reaction, ss.str());
- return result;
- }
-
- bool is_excessive = false;
- ::std::stringstream ss;
- ::std::stringstream why;
- ::std::stringstream loc;
- const void* untyped_action = NULL;
-
- // The UntypedFindMatchingExpectation() function acquires and
- // releases g_gmock_mutex.
- const ExpectationBase* const untyped_expectation =
- this->UntypedFindMatchingExpectation(
- untyped_args, &untyped_action, &is_excessive,
- &ss, &why);
- const bool found = untyped_expectation != NULL;
-
- // True iff we need to print the call's arguments and return value.
- // This definition must be kept in sync with the uses of Expect()
- // and Log() in this function.
- const bool need_to_report_call = !found || is_excessive || LogIsVisible(INFO);
- if (!need_to_report_call) {
- // Perform the action without printing the call information.
- return
- untyped_action == NULL ?
- this->UntypedPerformDefaultAction(untyped_args, "") :
- this->UntypedPerformAction(untyped_action, untyped_args);
- }
-
- ss << " Function call: " << Name();
- this->UntypedPrintArgs(untyped_args, &ss);
-
- // In case the action deletes a piece of the expectation, we
- // generate the message beforehand.
- if (found && !is_excessive) {
- untyped_expectation->DescribeLocationTo(&loc);
- }
-
- const UntypedActionResultHolderBase* const result =
- untyped_action == NULL ?
- this->UntypedPerformDefaultAction(untyped_args, ss.str()) :
- this->UntypedPerformAction(untyped_action, untyped_args);
- if (result != NULL)
- result->PrintAsActionResult(&ss);
- ss << "\n" << why.str();
-
- if (!found) {
- // No expectation matches this call - reports a failure.
- Expect(false, NULL, -1, ss.str());
- } else if (is_excessive) {
- // We had an upper-bound violation and the failure message is in ss.
- Expect(false, untyped_expectation->file(),
- untyped_expectation->line(), ss.str());
- } else {
- // We had an expected call and the matching expectation is
- // described in ss.
- Log(INFO, loc.str() + ss.str(), 2);
- }
-
- return result;
-}
-
-// Returns an Expectation object that references and co-owns exp,
-// which must be an expectation on this mock function.
-Expectation UntypedFunctionMockerBase::GetHandleOf(ExpectationBase* exp) {
- for (UntypedExpectations::const_iterator it =
- untyped_expectations_.begin();
- it != untyped_expectations_.end(); ++it) {
- if (it->get() == exp) {
- return Expectation(*it);
- }
- }
-
- Assert(false, __FILE__, __LINE__, "Cannot find expectation.");
- return Expectation();
- // The above statement is just to make the code compile, and will
- // never be executed.
-}
-
-// Verifies that all expectations on this mock function have been
-// satisfied. Reports one or more Google Test non-fatal failures
-// and returns false if not.
-// L >= g_gmock_mutex
-bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked() {
- g_gmock_mutex.AssertHeld();
- bool expectations_met = true;
- for (UntypedExpectations::const_iterator it =
- untyped_expectations_.begin();
- it != untyped_expectations_.end(); ++it) {
- ExpectationBase* const untyped_expectation = it->get();
- if (untyped_expectation->IsOverSaturated()) {
- // There was an upper-bound violation. Since the error was
- // already reported when it occurred, there is no need to do
- // anything here.
- expectations_met = false;
- } else if (!untyped_expectation->IsSatisfied()) {
- expectations_met = false;
- ::std::stringstream ss;
- ss << "Actual function call count doesn't match "
- << untyped_expectation->source_text() << "...\n";
- // No need to show the source file location of the expectation
- // in the description, as the Expect() call that follows already
- // takes care of it.
- untyped_expectation->MaybeDescribeExtraMatcherTo(&ss);
- untyped_expectation->DescribeCallCountTo(&ss);
- Expect(false, untyped_expectation->file(),
- untyped_expectation->line(), ss.str());
- }
- }
- untyped_expectations_.clear();
- return expectations_met;
-}
-
-} // namespace internal
-
-// Class Mock.
-
-namespace {
-
-typedef std::set<internal::UntypedFunctionMockerBase*> FunctionMockers;
-
-// The current state of a mock object. Such information is needed for
-// detecting leaked mock objects and explicitly verifying a mock's
-// expectations.
-struct MockObjectState {
- MockObjectState()
- : first_used_file(NULL), first_used_line(-1), leakable(false) {}
-
- // Where in the source file an ON_CALL or EXPECT_CALL is first
- // invoked on this mock object.
- const char* first_used_file;
- int first_used_line;
- ::std::string first_used_test_case;
- ::std::string first_used_test;
- bool leakable; // true iff it's OK to leak the object.
- FunctionMockers function_mockers; // All registered methods of the object.
-};
-
-// A global registry holding the state of all mock objects that are
-// alive. A mock object is added to this registry the first time
-// Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It
-// is removed from the registry in the mock object's destructor.
-class MockObjectRegistry {
- public:
- // Maps a mock object (identified by its address) to its state.
- typedef std::map<const void*, MockObjectState> StateMap;
-
- // This destructor will be called when a program exits, after all
- // tests in it have been run. By then, there should be no mock
- // object alive. Therefore we report any living object as test
- // failure, unless the user explicitly asked us to ignore it.
- ~MockObjectRegistry() {
- // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is
- // a macro.
-
- if (!GMOCK_FLAG(catch_leaked_mocks))
- return;
-
- int leaked_count = 0;
- for (StateMap::const_iterator it = states_.begin(); it != states_.end();
- ++it) {
- if (it->second.leakable) // The user said it's fine to leak this object.
- continue;
-
- // TODO(wan@google.com): Print the type of the leaked object.
- // This can help the user identify the leaked object.
- std::cout << "\n";
- const MockObjectState& state = it->second;
- std::cout << internal::FormatFileLocation(state.first_used_file,
- state.first_used_line);
- std::cout << " ERROR: this mock object";
- if (state.first_used_test != "") {
- std::cout << " (used in test " << state.first_used_test_case << "."
- << state.first_used_test << ")";
- }
- std::cout << " should be deleted but never is. Its address is @"
- << it->first << ".";
- leaked_count++;
- }
- if (leaked_count > 0) {
- std::cout << "\nERROR: " << leaked_count
- << " leaked mock " << (leaked_count == 1 ? "object" : "objects")
- << " found at program exit.\n";
- std::cout.flush();
- ::std::cerr.flush();
- // RUN_ALL_TESTS() has already returned when this destructor is
- // called. Therefore we cannot use the normal Google Test
- // failure reporting mechanism.
- _exit(1); // We cannot call exit() as it is not reentrant and
- // may already have been called.
- }
- }
-
- StateMap& states() { return states_; }
- private:
- StateMap states_;
-};
-
-// Protected by g_gmock_mutex.
-MockObjectRegistry g_mock_object_registry;
-
-// Maps a mock object to the reaction Google Mock should have when an
-// uninteresting method is called. Protected by g_gmock_mutex.
-std::map<const void*, internal::CallReaction> g_uninteresting_call_reaction;
-
-// Sets the reaction Google Mock should have when an uninteresting
-// method of the given mock object is called.
-// L < g_gmock_mutex
-void SetReactionOnUninterestingCalls(const void* mock_obj,
- internal::CallReaction reaction) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_uninteresting_call_reaction[mock_obj] = reaction;
-}
-
-} // namespace
-
-// Tells Google Mock to allow uninteresting calls on the given mock
-// object.
-// L < g_gmock_mutex
-void Mock::AllowUninterestingCalls(const void* mock_obj) {
- SetReactionOnUninterestingCalls(mock_obj, internal::ALLOW);
-}
-
-// Tells Google Mock to warn the user about uninteresting calls on the
-// given mock object.
-// L < g_gmock_mutex
-void Mock::WarnUninterestingCalls(const void* mock_obj) {
- SetReactionOnUninterestingCalls(mock_obj, internal::WARN);
-}
-
-// Tells Google Mock to fail uninteresting calls on the given mock
-// object.
-// L < g_gmock_mutex
-void Mock::FailUninterestingCalls(const void* mock_obj) {
- SetReactionOnUninterestingCalls(mock_obj, internal::FAIL);
-}
-
-// Tells Google Mock the given mock object is being destroyed and its
-// entry in the call-reaction table should be removed.
-// L < g_gmock_mutex
-void Mock::UnregisterCallReaction(const void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_uninteresting_call_reaction.erase(mock_obj);
-}
-
-// Returns the reaction Google Mock will have on uninteresting calls
-// made on the given mock object.
-// L < g_gmock_mutex
-internal::CallReaction Mock::GetReactionOnUninterestingCalls(
- const void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- return (g_uninteresting_call_reaction.count(mock_obj) == 0) ?
- internal::WARN : g_uninteresting_call_reaction[mock_obj];
-}
-
-// Tells Google Mock to ignore mock_obj when checking for leaked mock
-// objects.
-// L < g_gmock_mutex
-void Mock::AllowLeak(const void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_mock_object_registry.states()[mock_obj].leakable = true;
-}
-
-// Verifies and clears all expectations on the given mock object. If
-// the expectations aren't satisfied, generates one or more Google
-// Test non-fatal failures and returns false.
-// L < g_gmock_mutex
-bool Mock::VerifyAndClearExpectations(void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- return VerifyAndClearExpectationsLocked(mock_obj);
-}
-
-// Verifies all expectations on the given mock object and clears its
-// default actions and expectations. Returns true iff the
-// verification was successful.
-// L < g_gmock_mutex
-bool Mock::VerifyAndClear(void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- ClearDefaultActionsLocked(mock_obj);
- return VerifyAndClearExpectationsLocked(mock_obj);
-}
-
-// Verifies and clears all expectations on the given mock object. If
-// the expectations aren't satisfied, generates one or more Google
-// Test non-fatal failures and returns false.
-// L >= g_gmock_mutex
-bool Mock::VerifyAndClearExpectationsLocked(void* mock_obj) {
- internal::g_gmock_mutex.AssertHeld();
- if (g_mock_object_registry.states().count(mock_obj) == 0) {
- // No EXPECT_CALL() was set on the given mock object.
- return true;
- }
-
- // Verifies and clears the expectations on each mock method in the
- // given mock object.
- bool expectations_met = true;
- FunctionMockers& mockers =
- g_mock_object_registry.states()[mock_obj].function_mockers;
- for (FunctionMockers::const_iterator it = mockers.begin();
- it != mockers.end(); ++it) {
- if (!(*it)->VerifyAndClearExpectationsLocked()) {
- expectations_met = false;
- }
- }
-
- // We don't clear the content of mockers, as they may still be
- // needed by ClearDefaultActionsLocked().
- return expectations_met;
-}
-
-// Registers a mock object and a mock method it owns.
-// L < g_gmock_mutex
-void Mock::Register(const void* mock_obj,
- internal::UntypedFunctionMockerBase* mocker) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_mock_object_registry.states()[mock_obj].function_mockers.insert(mocker);
-}
-
-// Tells Google Mock where in the source code mock_obj is used in an
-// ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this
-// information helps the user identify which object it is.
-// L < g_gmock_mutex
-void Mock::RegisterUseByOnCallOrExpectCall(
- const void* mock_obj, const char* file, int line) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- MockObjectState& state = g_mock_object_registry.states()[mock_obj];
- if (state.first_used_file == NULL) {
- state.first_used_file = file;
- state.first_used_line = line;
- const TestInfo* const test_info =
- UnitTest::GetInstance()->current_test_info();
- if (test_info != NULL) {
- // TODO(wan@google.com): record the test case name when the
- // ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or
- // TearDownTestCase().
- state.first_used_test_case = test_info->test_case_name();
- state.first_used_test = test_info->name();
- }
- }
-}
-
-// Unregisters a mock method; removes the owning mock object from the
-// registry when the last mock method associated with it has been
-// unregistered. This is called only in the destructor of
-// FunctionMockerBase.
-// L >= g_gmock_mutex
-void Mock::UnregisterLocked(internal::UntypedFunctionMockerBase* mocker) {
- internal::g_gmock_mutex.AssertHeld();
- for (MockObjectRegistry::StateMap::iterator it =
- g_mock_object_registry.states().begin();
- it != g_mock_object_registry.states().end(); ++it) {
- FunctionMockers& mockers = it->second.function_mockers;
- if (mockers.erase(mocker) > 0) {
- // mocker was in mockers and has been just removed.
- if (mockers.empty()) {
- g_mock_object_registry.states().erase(it);
- }
- return;
- }
- }
-}
-
-// Clears all ON_CALL()s set on the given mock object.
-// L >= g_gmock_mutex
-void Mock::ClearDefaultActionsLocked(void* mock_obj) {
- internal::g_gmock_mutex.AssertHeld();
-
- if (g_mock_object_registry.states().count(mock_obj) == 0) {
- // No ON_CALL() was set on the given mock object.
- return;
- }
-
- // Clears the default actions for each mock method in the given mock
- // object.
- FunctionMockers& mockers =
- g_mock_object_registry.states()[mock_obj].function_mockers;
- for (FunctionMockers::const_iterator it = mockers.begin();
- it != mockers.end(); ++it) {
- (*it)->ClearDefaultActionsLocked();
- }
-
- // We don't clear the content of mockers, as they may still be
- // needed by VerifyAndClearExpectationsLocked().
-}
-
-Expectation::Expectation() {}
-
-Expectation::Expectation(
- const internal::linked_ptr<internal::ExpectationBase>& an_expectation_base)
- : expectation_base_(an_expectation_base) {}
-
-Expectation::~Expectation() {}
-
-// Adds an expectation to a sequence.
-void Sequence::AddExpectation(const Expectation& expectation) const {
- if (*last_expectation_ != expectation) {
- if (last_expectation_->expectation_base() != NULL) {
- expectation.expectation_base()->immediate_prerequisites_
- += *last_expectation_;
- }
- *last_expectation_ = expectation;
- }
-}
-
-// Creates the implicit sequence if there isn't one.
-InSequence::InSequence() {
- if (internal::g_gmock_implicit_sequence.get() == NULL) {
- internal::g_gmock_implicit_sequence.set(new Sequence);
- sequence_created_ = true;
- } else {
- sequence_created_ = false;
- }
-}
-
-// Deletes the implicit sequence if it was created by the constructor
-// of this object.
-InSequence::~InSequence() {
- if (sequence_created_) {
- delete internal::g_gmock_implicit_sequence.get();
- internal::g_gmock_implicit_sequence.set(NULL);
- }
-}
-
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-namespace testing {
-
-// TODO(wan@google.com): support using environment variables to
-// control the flag values, like what Google Test does.
-
-GMOCK_DEFINE_bool_(catch_leaked_mocks, true,
- "true iff Google Mock should report leaked mock objects "
- "as failures.");
-
-GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity,
- "Controls how verbose Google Mock's output is."
- " Valid values:\n"
- " info - prints all messages.\n"
- " warning - prints warnings and errors.\n"
- " error - prints errors only.");
-
-namespace internal {
-
-// Parses a string as a command line flag. The string should have the
-// format "--gmock_flag=value". When def_optional is true, the
-// "=value" part can be omitted.
-//
-// Returns the value of the flag, or NULL if the parsing failed.
-static const char* ParseGoogleMockFlagValue(const char* str,
- const char* flag,
- bool def_optional) {
- // str and flag must not be NULL.
- if (str == NULL || flag == NULL) return NULL;
-
- // The flag must start with "--gmock_".
- const String flag_str = String::Format("--gmock_%s", flag);
- const size_t flag_len = flag_str.length();
- if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;
-
- // Skips the flag name.
- const char* flag_end = str + flag_len;
-
- // When def_optional is true, it's OK to not have a "=value" part.
- if (def_optional && (flag_end[0] == '\0')) {
- return flag_end;
- }
-
- // If def_optional is true and there are more characters after the
- // flag name, or if def_optional is false, there must be a '=' after
- // the flag name.
- if (flag_end[0] != '=') return NULL;
-
- // Returns the string after "=".
- return flag_end + 1;
-}
-
-// Parses a string for a Google Mock bool flag, in the form of
-// "--gmock_flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-static bool ParseGoogleMockBoolFlag(const char* str, const char* flag,
- bool* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseGoogleMockFlagValue(str, flag, true);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Converts the string value to a bool.
- *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
- return true;
-}
-
-// Parses a string for a Google Mock string flag, in the form of
-// "--gmock_flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-static bool ParseGoogleMockStringFlag(const char* str, const char* flag,
- String* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseGoogleMockFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- *value = value_str;
- return true;
-}
-
-// The internal implementation of InitGoogleMock().
-//
-// The type parameter CharType can be instantiated to either char or
-// wchar_t.
-template <typename CharType>
-void InitGoogleMockImpl(int* argc, CharType** argv) {
- // Makes sure Google Test is initialized. InitGoogleTest() is
- // idempotent, so it's fine if the user has already called it.
- InitGoogleTest(argc, argv);
- if (*argc <= 0) return;
-
- for (int i = 1; i != *argc; i++) {
- const String arg_string = StreamableToString(argv[i]);
- const char* const arg = arg_string.c_str();
-
- // Do we see a Google Mock flag?
- if (ParseGoogleMockBoolFlag(arg, "catch_leaked_mocks",
- &GMOCK_FLAG(catch_leaked_mocks)) ||
- ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose))) {
- // Yes. Shift the remainder of the argv list left by one. Note
- // that argv has (*argc + 1) elements, the last one always being
- // NULL. The following loop moves the trailing NULL element as
- // well.
- for (int j = i; j != *argc; j++) {
- argv[j] = argv[j + 1];
- }
-
- // Decrements the argument count.
- (*argc)--;
-
- // We also need to decrement the iterator as we just removed
- // an element.
- i--;
- }
- }
-}
-
-} // namespace internal
-
-// Initializes Google Mock. This must be called before running the
-// tests. In particular, it parses a command line for the flags that
-// Google Mock recognizes. Whenever a Google Mock flag is seen, it is
-// removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Mock flag variables are
-// updated.
-//
-// Since Google Test is needed for Google Mock to work, this function
-// also initializes Google Test and parses its flags, if that hasn't
-// been done.
-void InitGoogleMock(int* argc, char** argv) {
- internal::InitGoogleMockImpl(argc, argv);
-}
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleMock(int* argc, wchar_t** argv) {
- internal::InitGoogleMockImpl(argc, argv);
-}
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock/gmock.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock/gmock.h
deleted file mode 100644
index 2ce6dc15c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock/gmock.h
+++ /dev/null
@@ -1,12822 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This is the main header file a user should include.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_H_
-
-// This file implements the following syntax:
-//
-// ON_CALL(mock_object.Method(...))
-// .With(...) ?
-// .WillByDefault(...);
-//
-// where With() is optional and WillByDefault() must appear exactly
-// once.
-//
-// EXPECT_CALL(mock_object.Method(...))
-// .With(...) ?
-// .Times(...) ?
-// .InSequence(...) *
-// .WillOnce(...) *
-// .WillRepeatedly(...) ?
-// .RetiresOnSaturation() ? ;
-//
-// where all clauses are optional and WillOnce() can be repeated.
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used actions.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-
-#include <algorithm>
-#include <string>
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file defines some utilities useful for implementing Google
-// Mock. They are subject to change without notice, so please DO NOT
-// USE THEM IN USER CODE.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-
-#include <stdio.h>
-#include <ostream> // NOLINT
-#include <string>
-
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file contains template meta-programming utility classes needed
-// for implementing Google Mock.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vadimb@google.com (Vadim Berman)
-//
-// Low-level types and utilities for porting Google Mock to various
-// platforms. They are subject to change without notice. DO NOT USE
-// THEM IN USER CODE.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-
-#include <assert.h>
-#include <stdlib.h>
-#include <iostream>
-
-// Most of the types needed for porting Google Mock are also required
-// for Google Test and are defined in gtest-port.h.
-#include "gtest/gtest.h"
-
-// To avoid conditional compilation everywhere, we make it
-// gmock-port.h's responsibility to #include the header implementing
-// tr1/tuple. gmock-port.h does this via gtest-port.h, which is
-// guaranteed to pull in the tuple header.
-
-// For MS Visual C++, check the compiler version. At least VS 2003 is
-// required to compile Google Mock.
-#if defined(_MSC_VER) && _MSC_VER < 1310
-# error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
-#endif
-
-// Macro for referencing flags. This is public as we want the user to
-// use this syntax to reference Google Mock flags.
-#define GMOCK_FLAG(name) FLAGS_gmock_##name
-
-// Macros for declaring flags.
-#define GMOCK_DECLARE_bool_(name) extern bool GMOCK_FLAG(name)
-#define GMOCK_DECLARE_int32_(name) \
- extern ::testing::internal::Int32 GMOCK_FLAG(name)
-#define GMOCK_DECLARE_string_(name) \
- extern ::testing::internal::String GMOCK_FLAG(name)
-
-// Macros for defining flags.
-#define GMOCK_DEFINE_bool_(name, default_val, doc) \
- bool GMOCK_FLAG(name) = (default_val)
-#define GMOCK_DEFINE_int32_(name, default_val, doc) \
- ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val)
-#define GMOCK_DEFINE_string_(name, default_val, doc) \
- ::testing::internal::String GMOCK_FLAG(name) = (default_val)
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-
-namespace testing {
-
-template <typename T>
-class Matcher;
-
-namespace internal {
-
-// An IgnoredValue object can be implicitly constructed from ANY value.
-// This is used in implementing the IgnoreResult(a) action.
-class IgnoredValue {
- public:
- // This constructor template allows any value to be implicitly
- // converted to IgnoredValue. The object has no data member and
- // doesn't try to remember anything about the argument. We
- // deliberately omit the 'explicit' keyword in order to allow the
- // conversion to be implicit.
- template <typename T>
- IgnoredValue(const T&) {}
-};
-
-// MatcherTuple<T>::type is a tuple type where each field is a Matcher
-// for the corresponding field in tuple type T.
-template <typename Tuple>
-struct MatcherTuple;
-
-template <>
-struct MatcherTuple< ::std::tr1::tuple<> > {
- typedef ::std::tr1::tuple< > type;
-};
-
-template <typename A1>
-struct MatcherTuple< ::std::tr1::tuple<A1> > {
- typedef ::std::tr1::tuple<Matcher<A1> > type;
-};
-
-template <typename A1, typename A2>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2> > type;
-};
-
-template <typename A1, typename A2, typename A3>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
- Matcher<A4> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9, typename A10>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
- A10> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9>,
- Matcher<A10> > type;
-};
-
-// Template struct Function<F>, where F must be a function type, contains
-// the following typedefs:
-//
-// Result: the function's return type.
-// ArgumentN: the type of the N-th argument, where N starts with 1.
-// ArgumentTuple: the tuple type consisting of all parameters of F.
-// ArgumentMatcherTuple: the tuple type consisting of Matchers for all
-// parameters of F.
-// MakeResultVoid: the function type obtained by substituting void
-// for the return type of F.
-// MakeResultIgnoredValue:
-// the function type obtained by substituting Something
-// for the return type of F.
-template <typename F>
-struct Function;
-
-template <typename R>
-struct Function<R()> {
- typedef R Result;
- typedef ::std::tr1::tuple<> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid();
- typedef IgnoredValue MakeResultIgnoredValue();
-};
-
-template <typename R, typename A1>
-struct Function<R(A1)>
- : Function<R()> {
- typedef A1 Argument1;
- typedef ::std::tr1::tuple<A1> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1);
- typedef IgnoredValue MakeResultIgnoredValue(A1);
-};
-
-template <typename R, typename A1, typename A2>
-struct Function<R(A1, A2)>
- : Function<R(A1)> {
- typedef A2 Argument2;
- typedef ::std::tr1::tuple<A1, A2> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2);
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-struct Function<R(A1, A2, A3)>
- : Function<R(A1, A2)> {
- typedef A3 Argument3;
- typedef ::std::tr1::tuple<A1, A2, A3> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-struct Function<R(A1, A2, A3, A4)>
- : Function<R(A1, A2, A3)> {
- typedef A4 Argument4;
- typedef ::std::tr1::tuple<A1, A2, A3, A4> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-struct Function<R(A1, A2, A3, A4, A5)>
- : Function<R(A1, A2, A3, A4)> {
- typedef A5 Argument5;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-struct Function<R(A1, A2, A3, A4, A5, A6)>
- : Function<R(A1, A2, A3, A4, A5)> {
- typedef A6 Argument6;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7)>
- : Function<R(A1, A2, A3, A4, A5, A6)> {
- typedef A7 Argument7;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
- : Function<R(A1, A2, A3, A4, A5, A6, A7)> {
- typedef A8 Argument8;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
- : Function<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
- typedef A9 Argument9;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
- A9);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9,
- typename A10>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
- : Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
- typedef A10 Argument10;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
- A10> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
- A9, A10);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-
-namespace testing {
-namespace internal {
-
-// Converts an identifier name to a space-separated list of lower-case
-// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
-// treated as one word. For example, both "FooBar123" and
-// "foo_bar_123" are converted to "foo bar 123".
-string ConvertIdentifierNameToWords(const char* id_name);
-
-// PointeeOf<Pointer>::type is the type of a value pointed to by a
-// Pointer, which can be either a smart pointer or a raw pointer. The
-// following default implementation is for the case where Pointer is a
-// smart pointer.
-template <typename Pointer>
-struct PointeeOf {
- // Smart pointer classes define type element_type as the type of
- // their pointees.
- typedef typename Pointer::element_type type;
-};
-// This specialization is for the raw pointer case.
-template <typename T>
-struct PointeeOf<T*> { typedef T type; }; // NOLINT
-
-// GetRawPointer(p) returns the raw pointer underlying p when p is a
-// smart pointer, or returns p itself when p is already a raw pointer.
-// The following default implementation is for the smart pointer case.
-template <typename Pointer>
-inline typename Pointer::element_type* GetRawPointer(const Pointer& p) {
- return p.get();
-}
-// This overloaded version is for the raw pointer case.
-template <typename Element>
-inline Element* GetRawPointer(Element* p) { return p; }
-
-// This comparator allows linked_ptr to be stored in sets.
-template <typename T>
-struct LinkedPtrLessThan {
- bool operator()(const ::testing::internal::linked_ptr<T>& lhs,
- const ::testing::internal::linked_ptr<T>& rhs) const {
- return lhs.get() < rhs.get();
- }
-};
-
-// Symbian compilation can be done with wchar_t being either a native
-// type or a typedef. Using Google Mock with OpenC without wchar_t
-// should require the definition of _STLP_NO_WCHAR_T.
-//
-// MSVC treats wchar_t as a native type usually, but treats it as the
-// same as unsigned short when the compiler option /Zc:wchar_t- is
-// specified. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t
-// is a native type.
-#if (GTEST_OS_SYMBIAN && defined(_STLP_NO_WCHAR_T)) || \
- (defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
-// wchar_t is a typedef.
-#else
-# define GMOCK_WCHAR_T_IS_NATIVE_ 1
-#endif
-
-// signed wchar_t and unsigned wchar_t are NOT in the C++ standard.
-// Using them is a bad practice and not portable. So DON'T use them.
-//
-// Still, Google Mock is designed to work even if the user uses signed
-// wchar_t or unsigned wchar_t (obviously, assuming the compiler
-// supports them).
-//
-// To gcc,
-// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
-#ifdef __GNUC__
-// signed/unsigned wchar_t are valid types.
-# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
-#endif
-
-// In what follows, we use the term "kind" to indicate whether a type
-// is bool, an integer type (excluding bool), a floating-point type,
-// or none of them. This categorization is useful for determining
-// when a matcher argument type can be safely converted to another
-// type in the implementation of SafeMatcherCast.
-enum TypeKind {
- kBool, kInteger, kFloatingPoint, kOther
-};
-
-// KindOf<T>::value is the kind of type T.
-template <typename T> struct KindOf {
- enum { value = kOther }; // The default kind.
-};
-
-// This macro declares that the kind of 'type' is 'kind'.
-#define GMOCK_DECLARE_KIND_(type, kind) \
- template <> struct KindOf<type> { enum { value = kind }; }
-
-GMOCK_DECLARE_KIND_(bool, kBool);
-
-// All standard integer types.
-GMOCK_DECLARE_KIND_(char, kInteger);
-GMOCK_DECLARE_KIND_(signed char, kInteger);
-GMOCK_DECLARE_KIND_(unsigned char, kInteger);
-GMOCK_DECLARE_KIND_(short, kInteger); // NOLINT
-GMOCK_DECLARE_KIND_(unsigned short, kInteger); // NOLINT
-GMOCK_DECLARE_KIND_(int, kInteger);
-GMOCK_DECLARE_KIND_(unsigned int, kInteger);
-GMOCK_DECLARE_KIND_(long, kInteger); // NOLINT
-GMOCK_DECLARE_KIND_(unsigned long, kInteger); // NOLINT
-
-#if GMOCK_WCHAR_T_IS_NATIVE_
-GMOCK_DECLARE_KIND_(wchar_t, kInteger);
-#endif
-
-// Non-standard integer types.
-GMOCK_DECLARE_KIND_(Int64, kInteger);
-GMOCK_DECLARE_KIND_(UInt64, kInteger);
-
-// All standard floating-point types.
-GMOCK_DECLARE_KIND_(float, kFloatingPoint);
-GMOCK_DECLARE_KIND_(double, kFloatingPoint);
-GMOCK_DECLARE_KIND_(long double, kFloatingPoint);
-
-#undef GMOCK_DECLARE_KIND_
-
-// Evaluates to the kind of 'type'.
-#define GMOCK_KIND_OF_(type) \
- static_cast< ::testing::internal::TypeKind>( \
- ::testing::internal::KindOf<type>::value)
-
-// Evaluates to true iff integer type T is signed.
-#define GMOCK_IS_SIGNED_(T) (static_cast<T>(-1) < 0)
-
-// LosslessArithmeticConvertibleImpl<kFromKind, From, kToKind, To>::value
-// is true iff arithmetic type From can be losslessly converted to
-// arithmetic type To.
-//
-// It's the user's responsibility to ensure that both From and To are
-// raw (i.e. has no CV modifier, is not a pointer, and is not a
-// reference) built-in arithmetic types, kFromKind is the kind of
-// From, and kToKind is the kind of To; the value is
-// implementation-defined when the above pre-condition is violated.
-template <TypeKind kFromKind, typename From, TypeKind kToKind, typename To>
-struct LosslessArithmeticConvertibleImpl : public false_type {};
-
-// Converting bool to bool is lossless.
-template <>
-struct LosslessArithmeticConvertibleImpl<kBool, bool, kBool, bool>
- : public true_type {}; // NOLINT
-
-// Converting bool to any integer type is lossless.
-template <typename To>
-struct LosslessArithmeticConvertibleImpl<kBool, bool, kInteger, To>
- : public true_type {}; // NOLINT
-
-// Converting bool to any floating-point type is lossless.
-template <typename To>
-struct LosslessArithmeticConvertibleImpl<kBool, bool, kFloatingPoint, To>
- : public true_type {}; // NOLINT
-
-// Converting an integer to bool is lossy.
-template <typename From>
-struct LosslessArithmeticConvertibleImpl<kInteger, From, kBool, bool>
- : public false_type {}; // NOLINT
-
-// Converting an integer to another non-bool integer is lossless iff
-// the target type's range encloses the source type's range.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<kInteger, From, kInteger, To>
- : public bool_constant<
- // When converting from a smaller size to a larger size, we are
- // fine as long as we are not converting from signed to unsigned.
- ((sizeof(From) < sizeof(To)) &&
- (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) ||
- // When converting between the same size, the signedness must match.
- ((sizeof(From) == sizeof(To)) &&
- (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {}; // NOLINT
-
-#undef GMOCK_IS_SIGNED_
-
-// Converting an integer to a floating-point type may be lossy, since
-// the format of a floating-point number is implementation-defined.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<kInteger, From, kFloatingPoint, To>
- : public false_type {}; // NOLINT
-
-// Converting a floating-point to bool is lossy.
-template <typename From>
-struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kBool, bool>
- : public false_type {}; // NOLINT
-
-// Converting a floating-point to an integer is lossy.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kInteger, To>
- : public false_type {}; // NOLINT
-
-// Converting a floating-point to another floating-point is lossless
-// iff the target type is at least as big as the source type.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<
- kFloatingPoint, From, kFloatingPoint, To>
- : public bool_constant<sizeof(From) <= sizeof(To)> {}; // NOLINT
-
-// LosslessArithmeticConvertible<From, To>::value is true iff arithmetic
-// type From can be losslessly converted to arithmetic type To.
-//
-// It's the user's responsibility to ensure that both From and To are
-// raw (i.e. has no CV modifier, is not a pointer, and is not a
-// reference) built-in arithmetic types; the value is
-// implementation-defined when the above pre-condition is violated.
-template <typename From, typename To>
-struct LosslessArithmeticConvertible
- : public LosslessArithmeticConvertibleImpl<
- GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {}; // NOLINT
-
-// This interface knows how to report a Google Mock failure (either
-// non-fatal or fatal).
-class FailureReporterInterface {
- public:
- // The type of a failure (either non-fatal or fatal).
- enum FailureType {
- NONFATAL, FATAL
- };
-
- virtual ~FailureReporterInterface() {}
-
- // Reports a failure that occurred at the given source file location.
- virtual void ReportFailure(FailureType type, const char* file, int line,
- const string& message) = 0;
-};
-
-// Returns the failure reporter used by Google Mock.
-FailureReporterInterface* GetFailureReporter();
-
-// Asserts that condition is true; aborts the process with the given
-// message if condition is false. We cannot use LOG(FATAL) or CHECK()
-// as Google Mock might be used to mock the log sink itself. We
-// inline this function to prevent it from showing up in the stack
-// trace.
-inline void Assert(bool condition, const char* file, int line,
- const string& msg) {
- if (!condition) {
- GetFailureReporter()->ReportFailure(FailureReporterInterface::FATAL,
- file, line, msg);
- }
-}
-inline void Assert(bool condition, const char* file, int line) {
- Assert(condition, file, line, "Assertion failed.");
-}
-
-// Verifies that condition is true; generates a non-fatal failure if
-// condition is false.
-inline void Expect(bool condition, const char* file, int line,
- const string& msg) {
- if (!condition) {
- GetFailureReporter()->ReportFailure(FailureReporterInterface::NONFATAL,
- file, line, msg);
- }
-}
-inline void Expect(bool condition, const char* file, int line) {
- Expect(condition, file, line, "Expectation failed.");
-}
-
-// Severity level of a log.
-enum LogSeverity {
- INFO = 0,
- WARNING = 1
-};
-
-// Valid values for the --gmock_verbose flag.
-
-// All logs (informational and warnings) are printed.
-const char kInfoVerbosity[] = "info";
-// Only warnings are printed.
-const char kWarningVerbosity[] = "warning";
-// No logs are printed.
-const char kErrorVerbosity[] = "error";
-
-// Returns true iff a log with the given severity is visible according
-// to the --gmock_verbose flag.
-bool LogIsVisible(LogSeverity severity);
-
-// Prints the given message to stdout iff 'severity' >= the level
-// specified by the --gmock_verbose flag. If stack_frames_to_skip >=
-// 0, also prints the stack trace excluding the top
-// stack_frames_to_skip frames. In opt mode, any positive
-// stack_frames_to_skip is treated as 0, since we don't know which
-// function calls will be inlined by the compiler and need to be
-// conservative.
-void Log(LogSeverity severity, const string& message, int stack_frames_to_skip);
-
-// TODO(wan@google.com): group all type utilities together.
-
-// Type traits.
-
-// is_reference<T>::value is non-zero iff T is a reference type.
-template <typename T> struct is_reference : public false_type {};
-template <typename T> struct is_reference<T&> : public true_type {};
-
-// type_equals<T1, T2>::value is non-zero iff T1 and T2 are the same type.
-template <typename T1, typename T2> struct type_equals : public false_type {};
-template <typename T> struct type_equals<T, T> : public true_type {};
-
-// remove_reference<T>::type removes the reference from type T, if any.
-template <typename T> struct remove_reference { typedef T type; }; // NOLINT
-template <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT
-
-// Invalid<T>() returns an invalid value of type T. This is useful
-// when a value of type T is needed for compilation, but the statement
-// will not really be executed (or we don't care if the statement
-// crashes).
-template <typename T>
-inline T Invalid() {
- return *static_cast<typename remove_reference<T>::type*>(NULL);
-}
-template <>
-inline void Invalid<void>() {}
-
-// Given a raw type (i.e. having no top-level reference or const
-// modifier) RawContainer that's either an STL-style container or a
-// native array, class StlContainerView<RawContainer> has the
-// following members:
-//
-// - type is a type that provides an STL-style container view to
-// (i.e. implements the STL container concept for) RawContainer;
-// - const_reference is a type that provides a reference to a const
-// RawContainer;
-// - ConstReference(raw_container) returns a const reference to an STL-style
-// container view to raw_container, which is a RawContainer.
-// - Copy(raw_container) returns an STL-style container view of a
-// copy of raw_container, which is a RawContainer.
-//
-// This generic version is used when RawContainer itself is already an
-// STL-style container.
-template <class RawContainer>
-class StlContainerView {
- public:
- typedef RawContainer type;
- typedef const type& const_reference;
-
- static const_reference ConstReference(const RawContainer& container) {
- // Ensures that RawContainer is not a const type.
- testing::StaticAssertTypeEq<RawContainer,
- GTEST_REMOVE_CONST_(RawContainer)>();
- return container;
- }
- static type Copy(const RawContainer& container) { return container; }
-};
-
-// This specialization is used when RawContainer is a native array type.
-template <typename Element, size_t N>
-class StlContainerView<Element[N]> {
- public:
- typedef GTEST_REMOVE_CONST_(Element) RawElement;
- typedef internal::NativeArray<RawElement> type;
- // NativeArray<T> can represent a native array either by value or by
- // reference (selected by a constructor argument), so 'const type'
- // can be used to reference a const native array. We cannot
- // 'typedef const type& const_reference' here, as that would mean
- // ConstReference() has to return a reference to a local variable.
- typedef const type const_reference;
-
- static const_reference ConstReference(const Element (&array)[N]) {
- // Ensures that Element is not a const type.
- testing::StaticAssertTypeEq<Element, RawElement>();
-#if GTEST_OS_SYMBIAN
- // The Nokia Symbian compiler confuses itself in template instantiation
- // for this call without the cast to Element*:
- // function call '[testing::internal::NativeArray<char *>].NativeArray(
- // {lval} const char *[4], long, testing::internal::RelationToSource)'
- // does not match
- // 'testing::internal::NativeArray<char *>::NativeArray(
- // char *const *, unsigned int, testing::internal::RelationToSource)'
- // (instantiating: 'testing::internal::ContainsMatcherImpl
- // <const char * (&)[4]>::Matches(const char * (&)[4]) const')
- // (instantiating: 'testing::internal::StlContainerView<char *[4]>::
- // ConstReference(const char * (&)[4])')
- // (and though the N parameter type is mismatched in the above explicit
- // conversion of it doesn't help - only the conversion of the array).
- return type(const_cast<Element*>(&array[0]), N, kReference);
-#else
- return type(array, N, kReference);
-#endif // GTEST_OS_SYMBIAN
- }
- static type Copy(const Element (&array)[N]) {
-#if GTEST_OS_SYMBIAN
- return type(const_cast<Element*>(&array[0]), N, kCopy);
-#else
- return type(array, N, kCopy);
-#endif // GTEST_OS_SYMBIAN
- }
-};
-
-// This specialization is used when RawContainer is a native array
-// represented as a (pointer, size) tuple.
-template <typename ElementPointer, typename Size>
-class StlContainerView< ::std::tr1::tuple<ElementPointer, Size> > {
- public:
- typedef GTEST_REMOVE_CONST_(
- typename internal::PointeeOf<ElementPointer>::type) RawElement;
- typedef internal::NativeArray<RawElement> type;
- typedef const type const_reference;
-
- static const_reference ConstReference(
- const ::std::tr1::tuple<ElementPointer, Size>& array) {
- using ::std::tr1::get;
- return type(get<0>(array), get<1>(array), kReference);
- }
- static type Copy(const ::std::tr1::tuple<ElementPointer, Size>& array) {
- using ::std::tr1::get;
- return type(get<0>(array), get<1>(array), kCopy);
- }
-};
-
-// The following specialization prevents the user from instantiating
-// StlContainer with a reference type.
-template <typename T> class StlContainerView<T&>;
-
-} // namespace internal
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-
-namespace testing {
-
-// To implement an action Foo, define:
-// 1. a class FooAction that implements the ActionInterface interface, and
-// 2. a factory function that creates an Action object from a
-// const FooAction*.
-//
-// The two-level delegation design follows that of Matcher, providing
-// consistency for extension developers. It also eases ownership
-// management as Action objects can now be copied like plain values.
-
-namespace internal {
-
-template <typename F1, typename F2>
-class ActionAdaptor;
-
-// BuiltInDefaultValue<T>::Get() returns the "built-in" default
-// value for type T, which is NULL when T is a pointer type, 0 when T
-// is a numeric type, false when T is bool, or "" when T is string or
-// std::string. For any other type T, this value is undefined and the
-// function will abort the process.
-template <typename T>
-class BuiltInDefaultValue {
- public:
- // This function returns true iff type T has a built-in default value.
- static bool Exists() { return false; }
- static T Get() {
- Assert(false, __FILE__, __LINE__,
- "Default action undefined for the function return type.");
- return internal::Invalid<T>();
- // The above statement will never be reached, but is required in
- // order for this function to compile.
- }
-};
-
-// This partial specialization says that we use the same built-in
-// default value for T and const T.
-template <typename T>
-class BuiltInDefaultValue<const T> {
- public:
- static bool Exists() { return BuiltInDefaultValue<T>::Exists(); }
- static T Get() { return BuiltInDefaultValue<T>::Get(); }
-};
-
-// This partial specialization defines the default values for pointer
-// types.
-template <typename T>
-class BuiltInDefaultValue<T*> {
- public:
- static bool Exists() { return true; }
- static T* Get() { return NULL; }
-};
-
-// The following specializations define the default values for
-// specific types we care about.
-#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \
- template <> \
- class BuiltInDefaultValue<type> { \
- public: \
- static bool Exists() { return true; } \
- static type Get() { return value; } \
- }
-
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT
-#if GTEST_HAS_GLOBAL_STRING
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, "");
-#endif // GTEST_HAS_GLOBAL_STRING
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, "");
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0');
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0');
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0');
-
-// There's no need for a default action for signed wchar_t, as that
-// type is the same as wchar_t for gcc, and invalid for MSVC.
-//
-// There's also no need for a default action for unsigned wchar_t, as
-// that type is the same as unsigned int for gcc, and invalid for
-// MSVC.
-#if GMOCK_WCHAR_T_IS_NATIVE_
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT
-#endif
-
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0);
-
-#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
-
-} // namespace internal
-
-// When an unexpected function call is encountered, Google Mock will
-// let it return a default value if the user has specified one for its
-// return type, or if the return type has a built-in default value;
-// otherwise Google Mock won't know what value to return and will have
-// to abort the process.
-//
-// The DefaultValue<T> class allows a user to specify the
-// default value for a type T that is both copyable and publicly
-// destructible (i.e. anything that can be used as a function return
-// type). The usage is:
-//
-// // Sets the default value for type T to be foo.
-// DefaultValue<T>::Set(foo);
-template <typename T>
-class DefaultValue {
- public:
- // Sets the default value for type T; requires T to be
- // copy-constructable and have a public destructor.
- static void Set(T x) {
- delete value_;
- value_ = new T(x);
- }
-
- // Unsets the default value for type T.
- static void Clear() {
- delete value_;
- value_ = NULL;
- }
-
- // Returns true iff the user has set the default value for type T.
- static bool IsSet() { return value_ != NULL; }
-
- // Returns true if T has a default return value set by the user or there
- // exists a built-in default value.
- static bool Exists() {
- return IsSet() || internal::BuiltInDefaultValue<T>::Exists();
- }
-
- // Returns the default value for type T if the user has set one;
- // otherwise returns the built-in default value if there is one;
- // otherwise aborts the process.
- static T Get() {
- return value_ == NULL ?
- internal::BuiltInDefaultValue<T>::Get() : *value_;
- }
- private:
- static const T* value_;
-};
-
-// This partial specialization allows a user to set default values for
-// reference types.
-template <typename T>
-class DefaultValue<T&> {
- public:
- // Sets the default value for type T&.
- static void Set(T& x) { // NOLINT
- address_ = &x;
- }
-
- // Unsets the default value for type T&.
- static void Clear() {
- address_ = NULL;
- }
-
- // Returns true iff the user has set the default value for type T&.
- static bool IsSet() { return address_ != NULL; }
-
- // Returns true if T has a default return value set by the user or there
- // exists a built-in default value.
- static bool Exists() {
- return IsSet() || internal::BuiltInDefaultValue<T&>::Exists();
- }
-
- // Returns the default value for type T& if the user has set one;
- // otherwise returns the built-in default value if there is one;
- // otherwise aborts the process.
- static T& Get() {
- return address_ == NULL ?
- internal::BuiltInDefaultValue<T&>::Get() : *address_;
- }
- private:
- static T* address_;
-};
-
-// This specialization allows DefaultValue<void>::Get() to
-// compile.
-template <>
-class DefaultValue<void> {
- public:
- static bool Exists() { return true; }
- static void Get() {}
-};
-
-// Points to the user-set default value for type T.
-template <typename T>
-const T* DefaultValue<T>::value_ = NULL;
-
-// Points to the user-set default value for type T&.
-template <typename T>
-T* DefaultValue<T&>::address_ = NULL;
-
-// Implement this interface to define an action for function type F.
-template <typename F>
-class ActionInterface {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- ActionInterface() {}
- virtual ~ActionInterface() {}
-
- // Performs the action. This method is not const, as in general an
- // action can have side effects and be stateful. For example, a
- // get-the-next-element-from-the-collection action will need to
- // remember the current element.
- virtual Result Perform(const ArgumentTuple& args) = 0;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface);
-};
-
-// An Action<F> is a copyable and IMMUTABLE (except by assignment)
-// object that represents an action to be taken when a mock function
-// of type F is called. The implementation of Action<T> is just a
-// linked_ptr to const ActionInterface<T>, so copying is fairly cheap.
-// Don't inherit from Action!
-//
-// You can view an object implementing ActionInterface<F> as a
-// concrete action (including its current state), and an Action<F>
-// object as a handle to it.
-template <typename F>
-class Action {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- // Constructs a null Action. Needed for storing Action objects in
- // STL containers.
- Action() : impl_(NULL) {}
-
- // Constructs an Action from its implementation. A NULL impl is
- // used to represent the "do-default" action.
- explicit Action(ActionInterface<F>* impl) : impl_(impl) {}
-
- // Copy constructor.
- Action(const Action& action) : impl_(action.impl_) {}
-
- // This constructor allows us to turn an Action<Func> object into an
- // Action<F>, as long as F's arguments can be implicitly converted
- // to Func's and Func's return type can be implicitly converted to
- // F's.
- template <typename Func>
- explicit Action(const Action<Func>& action);
-
- // Returns true iff this is the DoDefault() action.
- bool IsDoDefault() const { return impl_.get() == NULL; }
-
- // Performs the action. Note that this method is const even though
- // the corresponding method in ActionInterface is not. The reason
- // is that a const Action<F> means that it cannot be re-bound to
- // another concrete action, not that the concrete action it binds to
- // cannot change state. (Think of the difference between a const
- // pointer and a pointer to const.)
- Result Perform(const ArgumentTuple& args) const {
- internal::Assert(
- !IsDoDefault(), __FILE__, __LINE__,
- "You are using DoDefault() inside a composite action like "
- "DoAll() or WithArgs(). This is not supported for technical "
- "reasons. Please instead spell out the default action, or "
- "assign the default action to an Action variable and use "
- "the variable in various places.");
- return impl_->Perform(args);
- }
-
- private:
- template <typename F1, typename F2>
- friend class internal::ActionAdaptor;
-
- internal::linked_ptr<ActionInterface<F> > impl_;
-};
-
-// The PolymorphicAction class template makes it easy to implement a
-// polymorphic action (i.e. an action that can be used in mock
-// functions of than one type, e.g. Return()).
-//
-// To define a polymorphic action, a user first provides a COPYABLE
-// implementation class that has a Perform() method template:
-//
-// class FooAction {
-// public:
-// template <typename Result, typename ArgumentTuple>
-// Result Perform(const ArgumentTuple& args) const {
-// // Processes the arguments and returns a result, using
-// // tr1::get<N>(args) to get the N-th (0-based) argument in the tuple.
-// }
-// ...
-// };
-//
-// Then the user creates the polymorphic action using
-// MakePolymorphicAction(object) where object has type FooAction. See
-// the definition of Return(void) and SetArgumentPointee<N>(value) for
-// complete examples.
-template <typename Impl>
-class PolymorphicAction {
- public:
- explicit PolymorphicAction(const Impl& impl) : impl_(impl) {}
-
- template <typename F>
- operator Action<F>() const {
- return Action<F>(new MonomorphicImpl<F>(impl_));
- }
-
- private:
- template <typename F>
- class MonomorphicImpl : public ActionInterface<F> {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return impl_.template Perform<Result>(args);
- }
-
- private:
- Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);
- };
-
- Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
-};
-
-// Creates an Action from its implementation and returns it. The
-// created Action object owns the implementation.
-template <typename F>
-Action<F> MakeAction(ActionInterface<F>* impl) {
- return Action<F>(impl);
-}
-
-// Creates a polymorphic action from its implementation. This is
-// easier to use than the PolymorphicAction<Impl> constructor as it
-// doesn't require you to explicitly write the template argument, e.g.
-//
-// MakePolymorphicAction(foo);
-// vs
-// PolymorphicAction<TypeOfFoo>(foo);
-template <typename Impl>
-inline PolymorphicAction<Impl> MakePolymorphicAction(const Impl& impl) {
- return PolymorphicAction<Impl>(impl);
-}
-
-namespace internal {
-
-// Allows an Action<F2> object to pose as an Action<F1>, as long as F2
-// and F1 are compatible.
-template <typename F1, typename F2>
-class ActionAdaptor : public ActionInterface<F1> {
- public:
- typedef typename internal::Function<F1>::Result Result;
- typedef typename internal::Function<F1>::ArgumentTuple ArgumentTuple;
-
- explicit ActionAdaptor(const Action<F2>& from) : impl_(from.impl_) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return impl_->Perform(args);
- }
-
- private:
- const internal::linked_ptr<ActionInterface<F2> > impl_;
-
- GTEST_DISALLOW_ASSIGN_(ActionAdaptor);
-};
-
-// Implements the polymorphic Return(x) action, which can be used in
-// any function that returns the type of x, regardless of the argument
-// types.
-//
-// Note: The value passed into Return must be converted into
-// Function<F>::Result when this action is cast to Action<F> rather than
-// when that action is performed. This is important in scenarios like
-//
-// MOCK_METHOD1(Method, T(U));
-// ...
-// {
-// Foo foo;
-// X x(&foo);
-// EXPECT_CALL(mock, Method(_)).WillOnce(Return(x));
-// }
-//
-// In the example above the variable x holds reference to foo which leaves
-// scope and gets destroyed. If copying X just copies a reference to foo,
-// that copy will be left with a hanging reference. If conversion to T
-// makes a copy of foo, the above code is safe. To support that scenario, we
-// need to make sure that the type conversion happens inside the EXPECT_CALL
-// statement, and conversion of the result of Return to Action<T(U)> is a
-// good place for that.
-//
-template <typename R>
-class ReturnAction {
- public:
- // Constructs a ReturnAction object from the value to be returned.
- // 'value' is passed by value instead of by const reference in order
- // to allow Return("string literal") to compile.
- explicit ReturnAction(R value) : value_(value) {}
-
- // This template type conversion operator allows Return(x) to be
- // used in ANY function that returns x's type.
- template <typename F>
- operator Action<F>() const {
- // Assert statement belongs here because this is the best place to verify
- // conditions on F. It produces the clearest error messages
- // in most compilers.
- // Impl really belongs in this scope as a local class but can't
- // because MSVC produces duplicate symbols in different translation units
- // in this case. Until MS fixes that bug we put Impl into the class scope
- // and put the typedef both here (for use in assert statement) and
- // in the Impl class. But both definitions must be the same.
- typedef typename Function<F>::Result Result;
- GTEST_COMPILE_ASSERT_(
- !internal::is_reference<Result>::value,
- use_ReturnRef_instead_of_Return_to_return_a_reference);
- return Action<F>(new Impl<F>(value_));
- }
-
- private:
- // Implements the Return(x) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- // The implicit cast is necessary when Result has more than one
- // single-argument constructor (e.g. Result is std::vector<int>) and R
- // has a type conversion operator template. In that case, value_(value)
- // won't compile as the compiler doesn't known which constructor of
- // Result to call. ImplicitCast_ forces the compiler to convert R to
- // Result without considering explicit constructors, thus resolving the
- // ambiguity. value_ is then initialized using its copy constructor.
- explicit Impl(R value)
- : value_(::testing::internal::ImplicitCast_<Result>(value)) {}
-
- virtual Result Perform(const ArgumentTuple&) { return value_; }
-
- private:
- GTEST_COMPILE_ASSERT_(!internal::is_reference<Result>::value,
- Result_cannot_be_a_reference_type);
- Result value_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- R value_;
-
- GTEST_DISALLOW_ASSIGN_(ReturnAction);
-};
-
-// Implements the ReturnNull() action.
-class ReturnNullAction {
- public:
- // Allows ReturnNull() to be used in any pointer-returning function.
- template <typename Result, typename ArgumentTuple>
- static Result Perform(const ArgumentTuple&) {
- GTEST_COMPILE_ASSERT_(internal::is_pointer<Result>::value,
- ReturnNull_can_be_used_to_return_a_pointer_only);
- return NULL;
- }
-};
-
-// Implements the Return() action.
-class ReturnVoidAction {
- public:
- // Allows Return() to be used in any void-returning function.
- template <typename Result, typename ArgumentTuple>
- static void Perform(const ArgumentTuple&) {
- CompileAssertTypesEqual<void, Result>();
- }
-};
-
-// Implements the polymorphic ReturnRef(x) action, which can be used
-// in any function that returns a reference to the type of x,
-// regardless of the argument types.
-template <typename T>
-class ReturnRefAction {
- public:
- // Constructs a ReturnRefAction object from the reference to be returned.
- explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT
-
- // This template type conversion operator allows ReturnRef(x) to be
- // used in ANY function that returns a reference to x's type.
- template <typename F>
- operator Action<F>() const {
- typedef typename Function<F>::Result Result;
- // Asserts that the function return type is a reference. This
- // catches the user error of using ReturnRef(x) when Return(x)
- // should be used, and generates some helpful error message.
- GTEST_COMPILE_ASSERT_(internal::is_reference<Result>::value,
- use_Return_instead_of_ReturnRef_to_return_a_value);
- return Action<F>(new Impl<F>(ref_));
- }
-
- private:
- // Implements the ReturnRef(x) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(T& ref) : ref_(ref) {} // NOLINT
-
- virtual Result Perform(const ArgumentTuple&) {
- return ref_;
- }
-
- private:
- T& ref_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- T& ref_;
-
- GTEST_DISALLOW_ASSIGN_(ReturnRefAction);
-};
-
-// Implements the polymorphic ReturnRefOfCopy(x) action, which can be
-// used in any function that returns a reference to the type of x,
-// regardless of the argument types.
-template <typename T>
-class ReturnRefOfCopyAction {
- public:
- // Constructs a ReturnRefOfCopyAction object from the reference to
- // be returned.
- explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT
-
- // This template type conversion operator allows ReturnRefOfCopy(x) to be
- // used in ANY function that returns a reference to x's type.
- template <typename F>
- operator Action<F>() const {
- typedef typename Function<F>::Result Result;
- // Asserts that the function return type is a reference. This
- // catches the user error of using ReturnRefOfCopy(x) when Return(x)
- // should be used, and generates some helpful error message.
- GTEST_COMPILE_ASSERT_(
- internal::is_reference<Result>::value,
- use_Return_instead_of_ReturnRefOfCopy_to_return_a_value);
- return Action<F>(new Impl<F>(value_));
- }
-
- private:
- // Implements the ReturnRefOfCopy(x) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const T& value) : value_(value) {} // NOLINT
-
- virtual Result Perform(const ArgumentTuple&) {
- return value_;
- }
-
- private:
- T value_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- const T value_;
-
- GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction);
-};
-
-// Implements the polymorphic DoDefault() action.
-class DoDefaultAction {
- public:
- // This template type conversion operator allows DoDefault() to be
- // used in any function.
- template <typename F>
- operator Action<F>() const { return Action<F>(NULL); }
-};
-
-// Implements the Assign action to set a given pointer referent to a
-// particular value.
-template <typename T1, typename T2>
-class AssignAction {
- public:
- AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {}
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& /* args */) const {
- *ptr_ = value_;
- }
-
- private:
- T1* const ptr_;
- const T2 value_;
-
- GTEST_DISALLOW_ASSIGN_(AssignAction);
-};
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Implements the SetErrnoAndReturn action to simulate return from
-// various system calls and libc functions.
-template <typename T>
-class SetErrnoAndReturnAction {
- public:
- SetErrnoAndReturnAction(int errno_value, T result)
- : errno_(errno_value),
- result_(result) {}
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& /* args */) const {
- errno = errno_;
- return result_;
- }
-
- private:
- const int errno_;
- const T result_;
-
- GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction);
-};
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Implements the SetArgumentPointee<N>(x) action for any function
-// whose N-th argument (0-based) is a pointer to x's type. The
-// template parameter kIsProto is true iff type A is ProtocolMessage,
-// proto2::Message, or a sub-class of those.
-template <size_t N, typename A, bool kIsProto>
-class SetArgumentPointeeAction {
- public:
- // Constructs an action that sets the variable pointed to by the
- // N-th function argument to 'value'.
- explicit SetArgumentPointeeAction(const A& value) : value_(value) {}
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& args) const {
- CompileAssertTypesEqual<void, Result>();
- *::std::tr1::get<N>(args) = value_;
- }
-
- private:
- const A value_;
-
- GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);
-};
-
-template <size_t N, typename Proto>
-class SetArgumentPointeeAction<N, Proto, true> {
- public:
- // Constructs an action that sets the variable pointed to by the
- // N-th function argument to 'proto'. Both ProtocolMessage and
- // proto2::Message have the CopyFrom() method, so the same
- // implementation works for both.
- explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) {
- proto_->CopyFrom(proto);
- }
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& args) const {
- CompileAssertTypesEqual<void, Result>();
- ::std::tr1::get<N>(args)->CopyFrom(*proto_);
- }
-
- private:
- const internal::linked_ptr<Proto> proto_;
-
- GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);
-};
-
-// Implements the InvokeWithoutArgs(f) action. The template argument
-// FunctionImpl is the implementation type of f, which can be either a
-// function pointer or a functor. InvokeWithoutArgs(f) can be used as an
-// Action<F> as long as f's type is compatible with F (i.e. f can be
-// assigned to a tr1::function<F>).
-template <typename FunctionImpl>
-class InvokeWithoutArgsAction {
- public:
- // The c'tor makes a copy of function_impl (either a function
- // pointer or a functor).
- explicit InvokeWithoutArgsAction(FunctionImpl function_impl)
- : function_impl_(function_impl) {}
-
- // Allows InvokeWithoutArgs(f) to be used as any action whose type is
- // compatible with f.
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple&) { return function_impl_(); }
-
- private:
- FunctionImpl function_impl_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeWithoutArgsAction);
-};
-
-// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action.
-template <class Class, typename MethodPtr>
-class InvokeMethodWithoutArgsAction {
- public:
- InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr)
- : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {}
-
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple&) const {
- return (obj_ptr_->*method_ptr_)();
- }
-
- private:
- Class* const obj_ptr_;
- const MethodPtr method_ptr_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeMethodWithoutArgsAction);
-};
-
-// Implements the IgnoreResult(action) action.
-template <typename A>
-class IgnoreResultAction {
- public:
- explicit IgnoreResultAction(const A& action) : action_(action) {}
-
- template <typename F>
- operator Action<F>() const {
- // Assert statement belongs here because this is the best place to verify
- // conditions on F. It produces the clearest error messages
- // in most compilers.
- // Impl really belongs in this scope as a local class but can't
- // because MSVC produces duplicate symbols in different translation units
- // in this case. Until MS fixes that bug we put Impl into the class scope
- // and put the typedef both here (for use in assert statement) and
- // in the Impl class. But both definitions must be the same.
- typedef typename internal::Function<F>::Result Result;
-
- // Asserts at compile time that F returns void.
- CompileAssertTypesEqual<void, Result>();
-
- return Action<F>(new Impl<F>(action_));
- }
-
- private:
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const A& action) : action_(action) {}
-
- virtual void Perform(const ArgumentTuple& args) {
- // Performs the action and ignores its result.
- action_.Perform(args);
- }
-
- private:
- // Type OriginalFunction is the same as F except that its return
- // type is IgnoredValue.
- typedef typename internal::Function<F>::MakeResultIgnoredValue
- OriginalFunction;
-
- const Action<OriginalFunction> action_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- const A action_;
-
- GTEST_DISALLOW_ASSIGN_(IgnoreResultAction);
-};
-
-// A ReferenceWrapper<T> object represents a reference to type T,
-// which can be either const or not. It can be explicitly converted
-// from, and implicitly converted to, a T&. Unlike a reference,
-// ReferenceWrapper<T> can be copied and can survive template type
-// inference. This is used to support by-reference arguments in the
-// InvokeArgument<N>(...) action. The idea was from "reference
-// wrappers" in tr1, which we don't have in our source tree yet.
-template <typename T>
-class ReferenceWrapper {
- public:
- // Constructs a ReferenceWrapper<T> object from a T&.
- explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT
-
- // Allows a ReferenceWrapper<T> object to be implicitly converted to
- // a T&.
- operator T&() const { return *pointer_; }
- private:
- T* pointer_;
-};
-
-// Allows the expression ByRef(x) to be printed as a reference to x.
-template <typename T>
-void PrintTo(const ReferenceWrapper<T>& ref, ::std::ostream* os) {
- T& value = ref;
- UniversalPrinter<T&>::Print(value, os);
-}
-
-// Does two actions sequentially. Used for implementing the DoAll(a1,
-// a2, ...) action.
-template <typename Action1, typename Action2>
-class DoBothAction {
- public:
- DoBothAction(Action1 action1, Action2 action2)
- : action1_(action1), action2_(action2) {}
-
- // This template type conversion operator allows DoAll(a1, ..., a_n)
- // to be used in ANY function of compatible type.
- template <typename F>
- operator Action<F>() const {
- return Action<F>(new Impl<F>(action1_, action2_));
- }
-
- private:
- // Implements the DoAll(...) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::MakeResultVoid VoidResult;
-
- Impl(const Action<VoidResult>& action1, const Action<F>& action2)
- : action1_(action1), action2_(action2) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- action1_.Perform(args);
- return action2_.Perform(args);
- }
-
- private:
- const Action<VoidResult> action1_;
- const Action<F> action2_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- Action1 action1_;
- Action2 action2_;
-
- GTEST_DISALLOW_ASSIGN_(DoBothAction);
-};
-
-} // namespace internal
-
-// An Unused object can be implicitly constructed from ANY value.
-// This is handy when defining actions that ignore some or all of the
-// mock function arguments. For example, given
-//
-// MOCK_METHOD3(Foo, double(const string& label, double x, double y));
-// MOCK_METHOD3(Bar, double(int index, double x, double y));
-//
-// instead of
-//
-// double DistanceToOriginWithLabel(const string& label, double x, double y) {
-// return sqrt(x*x + y*y);
-// }
-// double DistanceToOriginWithIndex(int index, double x, double y) {
-// return sqrt(x*x + y*y);
-// }
-// ...
-// EXEPCT_CALL(mock, Foo("abc", _, _))
-// .WillOnce(Invoke(DistanceToOriginWithLabel));
-// EXEPCT_CALL(mock, Bar(5, _, _))
-// .WillOnce(Invoke(DistanceToOriginWithIndex));
-//
-// you could write
-//
-// // We can declare any uninteresting argument as Unused.
-// double DistanceToOrigin(Unused, double x, double y) {
-// return sqrt(x*x + y*y);
-// }
-// ...
-// EXEPCT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin));
-// EXEPCT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin));
-typedef internal::IgnoredValue Unused;
-
-// This constructor allows us to turn an Action<From> object into an
-// Action<To>, as long as To's arguments can be implicitly converted
-// to From's and From's return type cann be implicitly converted to
-// To's.
-template <typename To>
-template <typename From>
-Action<To>::Action(const Action<From>& from)
- : impl_(new internal::ActionAdaptor<To, From>(from)) {}
-
-// Creates an action that returns 'value'. 'value' is passed by value
-// instead of const reference - otherwise Return("string literal")
-// will trigger a compiler error about using array as initializer.
-template <typename R>
-internal::ReturnAction<R> Return(R value) {
- return internal::ReturnAction<R>(value);
-}
-
-// Creates an action that returns NULL.
-inline PolymorphicAction<internal::ReturnNullAction> ReturnNull() {
- return MakePolymorphicAction(internal::ReturnNullAction());
-}
-
-// Creates an action that returns from a void function.
-inline PolymorphicAction<internal::ReturnVoidAction> Return() {
- return MakePolymorphicAction(internal::ReturnVoidAction());
-}
-
-// Creates an action that returns the reference to a variable.
-template <typename R>
-inline internal::ReturnRefAction<R> ReturnRef(R& x) { // NOLINT
- return internal::ReturnRefAction<R>(x);
-}
-
-// Creates an action that returns the reference to a copy of the
-// argument. The copy is created when the action is constructed and
-// lives as long as the action.
-template <typename R>
-inline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) {
- return internal::ReturnRefOfCopyAction<R>(x);
-}
-
-// Creates an action that does the default action for the give mock function.
-inline internal::DoDefaultAction DoDefault() {
- return internal::DoDefaultAction();
-}
-
-// Creates an action that sets the variable pointed by the N-th
-// (0-based) function argument to 'value'.
-template <size_t N, typename T>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value> >
-SetArgPointee(const T& x) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value>(x));
-}
-
-#if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN)
-// This overload allows SetArgPointee() to accept a string literal.
-// GCC prior to the version 4.0 and Symbian C++ compiler cannot distinguish
-// this overload from the templated version and emit a compile error.
-template <size_t N>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<N, const char*, false> >
-SetArgPointee(const char* p) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, const char*, false>(p));
-}
-
-template <size_t N>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<N, const wchar_t*, false> >
-SetArgPointee(const wchar_t* p) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, const wchar_t*, false>(p));
-}
-#endif
-
-// The following version is DEPRECATED.
-template <size_t N, typename T>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value> >
-SetArgumentPointee(const T& x) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value>(x));
-}
-
-// Creates an action that sets a pointer referent to a given value.
-template <typename T1, typename T2>
-PolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {
- return MakePolymorphicAction(internal::AssignAction<T1, T2>(ptr, val));
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Creates an action that sets errno and returns the appropriate error.
-template <typename T>
-PolymorphicAction<internal::SetErrnoAndReturnAction<T> >
-SetErrnoAndReturn(int errval, T result) {
- return MakePolymorphicAction(
- internal::SetErrnoAndReturnAction<T>(errval, result));
-}
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Various overloads for InvokeWithoutArgs().
-
-// Creates an action that invokes 'function_impl' with no argument.
-template <typename FunctionImpl>
-PolymorphicAction<internal::InvokeWithoutArgsAction<FunctionImpl> >
-InvokeWithoutArgs(FunctionImpl function_impl) {
- return MakePolymorphicAction(
- internal::InvokeWithoutArgsAction<FunctionImpl>(function_impl));
-}
-
-// Creates an action that invokes the given method on the given object
-// with no argument.
-template <class Class, typename MethodPtr>
-PolymorphicAction<internal::InvokeMethodWithoutArgsAction<Class, MethodPtr> >
-InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) {
- return MakePolymorphicAction(
- internal::InvokeMethodWithoutArgsAction<Class, MethodPtr>(
- obj_ptr, method_ptr));
-}
-
-// Creates an action that performs an_action and throws away its
-// result. In other words, it changes the return type of an_action to
-// void. an_action MUST NOT return void, or the code won't compile.
-template <typename A>
-inline internal::IgnoreResultAction<A> IgnoreResult(const A& an_action) {
- return internal::IgnoreResultAction<A>(an_action);
-}
-
-// Creates a reference wrapper for the given L-value. If necessary,
-// you can explicitly specify the type of the reference. For example,
-// suppose 'derived' is an object of type Derived, ByRef(derived)
-// would wrap a Derived&. If you want to wrap a const Base& instead,
-// where Base is a base class of Derived, just write:
-//
-// ByRef<const Base>(derived)
-template <typename T>
-inline internal::ReferenceWrapper<T> ByRef(T& l_value) { // NOLINT
- return internal::ReferenceWrapper<T>(l_value);
-}
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used cardinalities. More
-// cardinalities can be defined by the user implementing the
-// CardinalityInterface interface if necessary.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-
-#include <limits.h>
-#include <ostream> // NOLINT
-
-namespace testing {
-
-// To implement a cardinality Foo, define:
-// 1. a class FooCardinality that implements the
-// CardinalityInterface interface, and
-// 2. a factory function that creates a Cardinality object from a
-// const FooCardinality*.
-//
-// The two-level delegation design follows that of Matcher, providing
-// consistency for extension developers. It also eases ownership
-// management as Cardinality objects can now be copied like plain values.
-
-// The implementation of a cardinality.
-class CardinalityInterface {
- public:
- virtual ~CardinalityInterface() {}
-
- // Conservative estimate on the lower/upper bound of the number of
- // calls allowed.
- virtual int ConservativeLowerBound() const { return 0; }
- virtual int ConservativeUpperBound() const { return INT_MAX; }
-
- // Returns true iff call_count calls will satisfy this cardinality.
- virtual bool IsSatisfiedByCallCount(int call_count) const = 0;
-
- // Returns true iff call_count calls will saturate this cardinality.
- virtual bool IsSaturatedByCallCount(int call_count) const = 0;
-
- // Describes self to an ostream.
- virtual void DescribeTo(::std::ostream* os) const = 0;
-};
-
-// A Cardinality is a copyable and IMMUTABLE (except by assignment)
-// object that specifies how many times a mock function is expected to
-// be called. The implementation of Cardinality is just a linked_ptr
-// to const CardinalityInterface, so copying is fairly cheap.
-// Don't inherit from Cardinality!
-class Cardinality {
- public:
- // Constructs a null cardinality. Needed for storing Cardinality
- // objects in STL containers.
- Cardinality() {}
-
- // Constructs a Cardinality from its implementation.
- explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
-
- // Conservative estimate on the lower/upper bound of the number of
- // calls allowed.
- int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }
- int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); }
-
- // Returns true iff call_count calls will satisfy this cardinality.
- bool IsSatisfiedByCallCount(int call_count) const {
- return impl_->IsSatisfiedByCallCount(call_count);
- }
-
- // Returns true iff call_count calls will saturate this cardinality.
- bool IsSaturatedByCallCount(int call_count) const {
- return impl_->IsSaturatedByCallCount(call_count);
- }
-
- // Returns true iff call_count calls will over-saturate this
- // cardinality, i.e. exceed the maximum number of allowed calls.
- bool IsOverSaturatedByCallCount(int call_count) const {
- return impl_->IsSaturatedByCallCount(call_count) &&
- !impl_->IsSatisfiedByCallCount(call_count);
- }
-
- // Describes self to an ostream
- void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
-
- // Describes the given actual call count to an ostream.
- static void DescribeActualCallCountTo(int actual_call_count,
- ::std::ostream* os);
- private:
- internal::linked_ptr<const CardinalityInterface> impl_;
-};
-
-// Creates a cardinality that allows at least n calls.
-Cardinality AtLeast(int n);
-
-// Creates a cardinality that allows at most n calls.
-Cardinality AtMost(int n);
-
-// Creates a cardinality that allows any number of calls.
-Cardinality AnyNumber();
-
-// Creates a cardinality that allows between min and max calls.
-Cardinality Between(int min, int max);
-
-// Creates a cardinality that allows exactly n calls.
-Cardinality Exactly(int n);
-
-// Creates a cardinality from its implementation.
-inline Cardinality MakeCardinality(const CardinalityInterface* c) {
- return Cardinality(c);
-}
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic actions.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-
-
-namespace testing {
-namespace internal {
-
-// InvokeHelper<F> knows how to unpack an N-tuple and invoke an N-ary
-// function or method with the unpacked values, where F is a function
-// type that takes N arguments.
-template <typename Result, typename ArgumentTuple>
-class InvokeHelper;
-
-template <typename R>
-class InvokeHelper<R, ::std::tr1::tuple<> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<>&) {
- return function();
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<>&) {
- return (obj_ptr->*method_ptr)();
- }
-};
-
-template <typename R, typename A1>
-class InvokeHelper<R, ::std::tr1::tuple<A1> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1>& args) {
- using ::std::tr1::get;
- return function(get<0>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args));
- }
-};
-
-template <typename R, typename A1, typename A2>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2,
- A3>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3,
- A4>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6,
- A7>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7, A8>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7,
- A8>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7, A8, A9>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
- A9>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args),
- get<8>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9,
- typename A10>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
- A10> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7, A8, A9, A10>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
- get<9>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
- A9, A10>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args),
- get<8>(args), get<9>(args));
- }
-};
-
-// CallableHelper has static methods for invoking "callables",
-// i.e. function pointers and functors. It uses overloading to
-// provide a uniform interface for invoking different kinds of
-// callables. In particular, you can use:
-//
-// CallableHelper<R>::Call(callable, a1, a2, ..., an)
-//
-// to invoke an n-ary callable, where R is its return type. If an
-// argument, say a2, needs to be passed by reference, you should write
-// ByRef(a2) instead of a2 in the above expression.
-template <typename R>
-class CallableHelper {
- public:
- // Calls a nullary callable.
- template <typename Function>
- static R Call(Function function) { return function(); }
-
- // Calls a unary callable.
-
- // We deliberately pass a1 by value instead of const reference here
- // in case it is a C-string literal. If we had declared the
- // parameter as 'const A1& a1' and write Call(function, "Hi"), the
- // compiler would've thought A1 is 'char[3]', which causes trouble
- // when you need to copy a value of type A1. By declaring the
- // parameter as 'A1 a1', the compiler will correctly infer that A1
- // is 'const char*' when it sees Call(function, "Hi").
- //
- // Since this function is defined inline, the compiler can get rid
- // of the copying of the arguments. Therefore the performance won't
- // be hurt.
- template <typename Function, typename A1>
- static R Call(Function function, A1 a1) { return function(a1); }
-
- // Calls a binary callable.
- template <typename Function, typename A1, typename A2>
- static R Call(Function function, A1 a1, A2 a2) {
- return function(a1, a2);
- }
-
- // Calls a ternary callable.
- template <typename Function, typename A1, typename A2, typename A3>
- static R Call(Function function, A1 a1, A2 a2, A3 a3) {
- return function(a1, a2, a3);
- }
-
- // Calls a 4-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4) {
- return function(a1, a2, a3, a4);
- }
-
- // Calls a 5-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
- return function(a1, a2, a3, a4, a5);
- }
-
- // Calls a 6-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
- return function(a1, a2, a3, a4, a5, a6);
- }
-
- // Calls a 7-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7) {
- return function(a1, a2, a3, a4, a5, a6, a7);
- }
-
- // Calls a 8-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7, A8 a8) {
- return function(a1, a2, a3, a4, a5, a6, a7, a8);
- }
-
- // Calls a 9-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8,
- typename A9>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7, A8 a8, A9 a9) {
- return function(a1, a2, a3, a4, a5, a6, a7, a8, a9);
- }
-
- // Calls a 10-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8,
- typename A9, typename A10>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7, A8 a8, A9 a9, A10 a10) {
- return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
- }
-
-}; // class CallableHelper
-
-// An INTERNAL macro for extracting the type of a tuple field. It's
-// subject to change without notice - DO NOT USE IN USER CODE!
-#define GMOCK_FIELD_(Tuple, N) \
- typename ::std::tr1::tuple_element<N, Tuple>::type
-
-// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
-// type of an n-ary function whose i-th (1-based) argument type is the
-// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
-// type, and whose return type is Result. For example,
-// SelectArgs<int, ::std::tr1::tuple<bool, char, double, long>, 0, 3>::type
-// is int(bool, long).
-//
-// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
-// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
-// For example,
-// SelectArgs<int, ::std::tr1::tuple<bool, char, double>, 2, 0>::Select(
-// ::std::tr1::make_tuple(true, 'a', 2.5))
-// returns ::std::tr1::tuple (2.5, true).
-//
-// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
-// in the range [0, 10]. Duplicates are allowed and they don't have
-// to be in an ascending or descending order.
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7, int k8, int k9, int k10>
-class SelectArgs {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
- GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9),
- GMOCK_FIELD_(ArgumentTuple, k10));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
- get<k8>(args), get<k9>(args), get<k10>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple>
-class SelectArgs<Result, ArgumentTuple,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type();
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& /* args */) {
- using ::std::tr1::get;
- return SelectedArgs();
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1>
-class SelectArgs<Result, ArgumentTuple,
- k1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7, int k8>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, k8, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
- GMOCK_FIELD_(ArgumentTuple, k8));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
- get<k8>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7, int k8, int k9>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, k8, k9, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
- GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
- get<k8>(args), get<k9>(args));
- }
-};
-
-#undef GMOCK_FIELD_
-
-// Implements the WithArgs action.
-template <typename InnerAction, int k1 = -1, int k2 = -1, int k3 = -1,
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
- int k9 = -1, int k10 = -1>
-class WithArgsAction {
- public:
- explicit WithArgsAction(const InnerAction& action) : action_(action) {}
-
- template <typename F>
- operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
-
- private:
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const InnerAction& action) : action_(action) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return action_.Perform(SelectArgs<Result, ArgumentTuple, k1, k2, k3, k4,
- k5, k6, k7, k8, k9, k10>::Select(args));
- }
-
- private:
- typedef typename SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, k8, k9, k10>::type InnerFunctionType;
-
- Action<InnerFunctionType> action_;
- };
-
- const InnerAction action_;
-
- GTEST_DISALLOW_ASSIGN_(WithArgsAction);
-};
-
-// A macro from the ACTION* family (defined later in this file)
-// defines an action that can be used in a mock function. Typically,
-// these actions only care about a subset of the arguments of the mock
-// function. For example, if such an action only uses the second
-// argument, it can be used in any mock function that takes >= 2
-// arguments where the type of the second argument is compatible.
-//
-// Therefore, the action implementation must be prepared to take more
-// arguments than it needs. The ExcessiveArg type is used to
-// represent those excessive arguments. In order to keep the compiler
-// error messages tractable, we define it in the testing namespace
-// instead of testing::internal. However, this is an INTERNAL TYPE
-// and subject to change without notice, so a user MUST NOT USE THIS
-// TYPE DIRECTLY.
-struct ExcessiveArg {};
-
-// A helper class needed for implementing the ACTION* macros.
-template <typename Result, class Impl>
-class ActionHelper {
- public:
- static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0>(args, get<0>(args),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1>(args, get<0>(args),
- get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2>(args, get<0>(args),
- get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2,
- A3>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args, get<0>(args),
- get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3,
- A4>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
- get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
- get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6, A7>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,
- A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6, A7, A8>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,
- A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6, A7, A8, A9>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,
- A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
- get<9>(args));
- }
-};
-
-} // namespace internal
-
-// Various overloads for Invoke().
-
-// WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
-// the selected arguments of the mock function to an_action and
-// performs it. It serves as an adaptor between actions with
-// different argument lists. C++ doesn't support default arguments for
-// function templates, so we have to overload it.
-template <int k1, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1>(action);
-}
-
-template <int k1, int k2, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2>(action);
-}
-
-template <int k1, int k2, int k3, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3>(action);
-}
-
-template <int k1, int k2, int k3, int k4, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
- typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6,
- k7>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7,
- k8>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8, k9>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
- k9>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, int k10, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
- k9, k10>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
- k9, k10>(action);
-}
-
-// Creates an action that does actions a1, a2, ..., sequentially in
-// each invocation.
-template <typename Action1, typename Action2>
-inline internal::DoBothAction<Action1, Action2>
-DoAll(Action1 a1, Action2 a2) {
- return internal::DoBothAction<Action1, Action2>(a1, a2);
-}
-
-template <typename Action1, typename Action2, typename Action3>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- Action3> >
-DoAll(Action1 a1, Action2 a2, Action3 a3) {
- return DoAll(a1, DoAll(a2, a3));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, Action4> > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) {
- return DoAll(a1, DoAll(a2, a3, a4));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- Action5> > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) {
- return DoAll(a1, DoAll(a2, a3, a4, a5));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, Action6> > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- Action7> > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7,
- typename Action8>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- internal::DoBothAction<Action7, Action8> > > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7, Action8 a8) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7,
- typename Action8, typename Action9>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- internal::DoBothAction<Action7, internal::DoBothAction<Action8,
- Action9> > > > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7, Action8 a8, Action9 a9) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7,
- typename Action8, typename Action9, typename Action10>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- internal::DoBothAction<Action7, internal::DoBothAction<Action8,
- internal::DoBothAction<Action9, Action10> > > > > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7, Action8 a8, Action9 a9, Action10 a10) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10));
-}
-
-} // namespace testing
-
-// The ACTION* family of macros can be used in a namespace scope to
-// define custom actions easily. The syntax:
-//
-// ACTION(name) { statements; }
-//
-// will define an action with the given name that executes the
-// statements. The value returned by the statements will be used as
-// the return value of the action. Inside the statements, you can
-// refer to the K-th (0-based) argument of the mock function by
-// 'argK', and refer to its type by 'argK_type'. For example:
-//
-// ACTION(IncrementArg1) {
-// arg1_type temp = arg1;
-// return ++(*temp);
-// }
-//
-// allows you to write
-//
-// ...WillOnce(IncrementArg1());
-//
-// You can also refer to the entire argument tuple and its type by
-// 'args' and 'args_type', and refer to the mock function type and its
-// return type by 'function_type' and 'return_type'.
-//
-// Note that you don't need to specify the types of the mock function
-// arguments. However rest assured that your code is still type-safe:
-// you'll get a compiler error if *arg1 doesn't support the ++
-// operator, or if the type of ++(*arg1) isn't compatible with the
-// mock function's return type, for example.
-//
-// Sometimes you'll want to parameterize the action. For that you can use
-// another macro:
-//
-// ACTION_P(name, param_name) { statements; }
-//
-// For example:
-//
-// ACTION_P(Add, n) { return arg0 + n; }
-//
-// will allow you to write:
-//
-// ...WillOnce(Add(5));
-//
-// Note that you don't need to provide the type of the parameter
-// either. If you need to reference the type of a parameter named
-// 'foo', you can write 'foo_type'. For example, in the body of
-// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type
-// of 'n'.
-//
-// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support
-// multi-parameter actions.
-//
-// For the purpose of typing, you can view
-//
-// ACTION_Pk(Foo, p1, ..., pk) { ... }
-//
-// as shorthand for
-//
-// template <typename p1_type, ..., typename pk_type>
-// FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// In particular, you can provide the template type arguments
-// explicitly when invoking Foo(), as in Foo<long, bool>(5, false);
-// although usually you can rely on the compiler to infer the types
-// for you automatically. You can assign the result of expression
-// Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,
-// pk_type>. This can be useful when composing actions.
-//
-// You can also overload actions with different numbers of parameters:
-//
-// ACTION_P(Plus, a) { ... }
-// ACTION_P2(Plus, a, b) { ... }
-//
-// While it's tempting to always use the ACTION* macros when defining
-// a new action, you should also consider implementing ActionInterface
-// or using MakePolymorphicAction() instead, especially if you need to
-// use the action a lot. While these approaches require more work,
-// they give you more control on the types of the mock function
-// arguments and the action parameters, which in general leads to
-// better compiler error messages that pay off in the long run. They
-// also allow overloading actions based on parameter types (as opposed
-// to just based on the number of parameters).
-//
-// CAVEAT:
-//
-// ACTION*() can only be used in a namespace scope. The reason is
-// that C++ doesn't yet allow function-local types to be used to
-// instantiate templates. The up-coming C++0x standard will fix this.
-// Once that's done, we'll consider supporting using ACTION*() inside
-// a function.
-//
-// MORE INFORMATION:
-//
-// To learn more about using these macros, please search for 'ACTION'
-// on http://code.google.com/p/googlemock/wiki/CookBook.
-
-// An internal macro needed for implementing ACTION*().
-#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
- const args_type& args GTEST_ATTRIBUTE_UNUSED_,\
- arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_,\
- arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_,\
- arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_,\
- arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_,\
- arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_,\
- arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_,\
- arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_,\
- arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_,\
- arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_,\
- arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_
-
-// Sometimes you want to give an action explicit template parameters
-// that cannot be inferred from its value parameters. ACTION() and
-// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that
-// and can be viewed as an extension to ACTION() and ACTION_P*().
-//
-// The syntax:
-//
-// ACTION_TEMPLATE(ActionName,
-// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),
-// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }
-//
-// defines an action template that takes m explicit template
-// parameters and n value parameters. name_i is the name of the i-th
-// template parameter, and kind_i specifies whether it's a typename,
-// an integral constant, or a template. p_i is the name of the i-th
-// value parameter.
-//
-// Example:
-//
-// // DuplicateArg<k, T>(output) converts the k-th argument of the mock
-// // function to type T and copies it to *output.
-// ACTION_TEMPLATE(DuplicateArg,
-// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
-// AND_1_VALUE_PARAMS(output)) {
-// *output = T(std::tr1::get<k>(args));
-// }
-// ...
-// int n;
-// EXPECT_CALL(mock, Foo(_, _))
-// .WillOnce(DuplicateArg<1, unsigned char>(&n));
-//
-// To create an instance of an action template, write:
-//
-// ActionName<t1, ..., t_m>(v1, ..., v_n)
-//
-// where the ts are the template arguments and the vs are the value
-// arguments. The value argument types are inferred by the compiler.
-// If you want to explicitly specify the value argument types, you can
-// provide additional template arguments:
-//
-// ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)
-//
-// where u_i is the desired type of v_i.
-//
-// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
-// number of value parameters, but not on the number of template
-// parameters. Without the restriction, the meaning of the following
-// is unclear:
-//
-// OverloadedAction<int, bool>(x);
-//
-// Are we using a single-template-parameter action where 'bool' refers
-// to the type of x, or are we using a two-template-parameter action
-// where the compiler is asked to infer the type of x?
-//
-// Implementation notes:
-//
-// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and
-// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for
-// implementing ACTION_TEMPLATE. The main trick we use is to create
-// new macro invocations when expanding a macro. For example, we have
-//
-// #define ACTION_TEMPLATE(name, template_params, value_params)
-// ... GMOCK_INTERNAL_DECL_##template_params ...
-//
-// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)
-// to expand to
-//
-// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...
-//
-// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the
-// preprocessor will continue to expand it to
-//
-// ... typename T ...
-//
-// This technique conforms to the C++ standard and is portable. It
-// allows us to implement action templates using O(N) code, where N is
-// the maximum number of template/value parameters supported. Without
-// using it, we'd have to devote O(N^2) amount of code to implement all
-// combinations of m and n.
-
-// Declares the template parameters.
-#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0
-#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1) kind0 name0, kind1 name1
-#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2) kind0 name0, kind1 name1, kind2 name2
-#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
- kind3 name3
-#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
- kind2 name2, kind3 name3, kind4 name4
-#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
- kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5
-#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
- kind5 name5, kind6 name6
-#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
- kind4 name4, kind5 name5, kind6 name6, kind7 name7
-#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
- kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
- kind8 name8
-#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
- kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
- kind6 name6, kind7 name7, kind8 name8, kind9 name9
-
-// Lists the template parameters.
-#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0
-#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1) name0, name1
-#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2) name0, name1, name2
-#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3) name0, name1, name2, name3
-#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
- name4
-#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
- name2, name3, name4, name5
-#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6) name0, name1, name2, name3, name4, name5, name6
-#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7
-#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
- name6, name7, name8
-#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
- name3, name4, name5, name6, name7, name8, name9
-
-// Declares the types of value parameters.
-#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \
- typename p0##_type, typename p1##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \
- typename p0##_type, typename p1##_type, typename p2##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
- typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
- typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
- typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
- typename p2##_type, typename p3##_type, typename p4##_type, \
- typename p5##_type, typename p6##_type, typename p7##_type, \
- typename p8##_type, typename p9##_type
-
-// Initializes the value parameters.
-#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\
- ()
-#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\
- (p0##_type gmock_p0) : p0(gmock_p0)
-#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\
- (p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), p1(gmock_p1)
-#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\
- (p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2)
-#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3)
-#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4)
-#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5)
-#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6)
-#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7)
-#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8)
-#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
- p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8), p9(gmock_p9)
-
-// Declares the fields for storing the value parameters.
-#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;
-#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \
- p1##_type p1;
-#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \
- p1##_type p1; p2##_type p2;
-#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \
- p1##_type p1; p2##_type p2; p3##_type p3;
-#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
- p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;
-#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
- p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
- p5##_type p5;
-#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
- p5##_type p5; p6##_type p6;
-#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
- p5##_type p5; p6##_type p6; p7##_type p7;
-#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
- p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;
-#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
- p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
- p9##_type p9;
-
-// Lists the value parameters.
-#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0
-#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1
-#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2
-#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3
-#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \
- p2, p3, p4
-#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \
- p1, p2, p3, p4, p5
-#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) p0, p1, p2, p3, p4, p5, p6
-#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) p0, p1, p2, p3, p4, p5, p6, p7
-#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8
-#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9
-
-// Lists the value parameter types.
-#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \
- p1##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \
- p1##_type, p2##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
- p0##_type, p1##_type, p2##_type, p3##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
- p0##_type, p1##_type, p2##_type, p3##_type, p4##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
- p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
- p6##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, p8##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, p8##_type, p9##_type
-
-// Declares the value parameters.
-#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0
-#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \
- p1##_type p1
-#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \
- p1##_type p1, p2##_type p2
-#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \
- p1##_type p1, p2##_type p2, p3##_type p3
-#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
- p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4
-#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
- p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
- p5##_type p5
-#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
- p5##_type p5, p6##_type p6
-#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
- p5##_type p5, p6##_type p6, p7##_type p7
-#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8
-#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
- p9##_type p9
-
-// The suffix of the class template implementing the action template.
-#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P
-#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
-#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3
-#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4
-#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5
-#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6
-#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7
-#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) P8
-#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) P9
-#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) P10
-
-// The name of the class template implementing the action template.
-#define GMOCK_ACTION_CLASS_(name, value_params)\
- GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
-
-#define ACTION_TEMPLATE(name, template_params, value_params)\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- class GMOCK_ACTION_CLASS_(name, value_params) {\
- public:\
- GMOCK_ACTION_CLASS_(name, value_params)\
- GMOCK_INTERNAL_INIT_##value_params {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- GMOCK_INTERNAL_DEFN_##value_params\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(\
- new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\
- }\
- GMOCK_INTERNAL_DEFN_##value_params\
- private:\
- GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\
- };\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- inline GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\
- GMOCK_INTERNAL_DECL_##value_params) {\
- return GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params>(\
- GMOCK_INTERNAL_LIST_##value_params);\
- }\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type,\
- typename arg3_type, typename arg4_type, typename arg5_type,\
- typename arg6_type, typename arg7_type, typename arg8_type,\
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\
- gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION(name)\
- class name##Action {\
- public:\
- name##Action() {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl() {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>());\
- }\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##Action);\
- };\
- inline name##Action name() {\
- return name##Action();\
- }\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##Action::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P(name, p0)\
- template <typename p0##_type>\
- class name##ActionP {\
- public:\
- name##ActionP(p0##_type gmock_p0) : p0(gmock_p0) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- explicit gmock_Impl(p0##_type gmock_p0) : p0(gmock_p0) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0));\
- }\
- p0##_type p0;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP);\
- };\
- template <typename p0##_type>\
- inline name##ActionP<p0##_type> name(p0##_type p0) {\
- return name##ActionP<p0##_type>(p0);\
- }\
- template <typename p0##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP<p0##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P2(name, p0, p1)\
- template <typename p0##_type, typename p1##_type>\
- class name##ActionP2 {\
- public:\
- name##ActionP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
- p1(gmock_p1) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
- p1(gmock_p1) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP2);\
- };\
- template <typename p0##_type, typename p1##_type>\
- inline name##ActionP2<p0##_type, p1##_type> name(p0##_type p0, \
- p1##_type p1) {\
- return name##ActionP2<p0##_type, p1##_type>(p0, p1);\
- }\
- template <typename p0##_type, typename p1##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP2<p0##_type, p1##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P3(name, p0, p1, p2)\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- class name##ActionP3 {\
- public:\
- name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP3);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- inline name##ActionP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2) {\
- return name##ActionP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP3<p0##_type, p1##_type, \
- p2##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P4(name, p0, p1, p2, p3)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- class name##ActionP4 {\
- public:\
- name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP4);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- inline name##ActionP4<p0##_type, p1##_type, p2##_type, \
- p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3) {\
- return name##ActionP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, p1, \
- p2, p3);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP4<p0##_type, p1##_type, p2##_type, \
- p3##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P5(name, p0, p1, p2, p3, p4)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- class name##ActionP5 {\
- public:\
- name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, \
- p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), \
- p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP5);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- inline name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4) {\
- return name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>(p0, p1, p2, p3, p4);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- class name##ActionP6 {\
- public:\
- name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP6);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- inline name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3, p4##_type p4, p5##_type p5) {\
- return name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- class name##ActionP7 {\
- public:\
- name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
- p6(gmock_p6) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP7);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- inline name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
- p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6) {\
- return name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- class name##ActionP8 {\
- public:\
- name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, \
- p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), \
- p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \
- p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6, p7));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP8);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- inline name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6, p7##_type p7) {\
- return name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
- p6, p7);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, \
- p7##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- class name##ActionP9 {\
- public:\
- name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP9);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- inline name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, \
- p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
- p8##_type p8) {\
- return name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
- p3, p4, p5, p6, p7, p8);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, \
- p8##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- class name##ActionP10 {\
- public:\
- name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
- p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8, p9));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP10);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- inline name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
- p9##_type p9) {\
- return name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
- p1, p2, p3, p4, p5, p6, p7, p8, p9);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-// TODO(wan@google.com): move the following to a different .h file
-// such that we don't have to run 'pump' every time the code is
-// updated.
-namespace testing {
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Various overloads for InvokeArgument<N>().
-//
-// The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
-// (0-based) argument, which must be a k-ary callable, of the mock
-// function, with arguments a1, a2, ..., a_k.
-//
-// Notes:
-//
-// 1. The arguments are passed by value by default. If you need to
-// pass an argument by reference, wrap it inside ByRef(). For
-// example,
-//
-// InvokeArgument<1>(5, string("Hello"), ByRef(foo))
-//
-// passes 5 and string("Hello") by value, and passes foo by
-// reference.
-//
-// 2. If the callable takes an argument by reference but ByRef() is
-// not used, it will receive the reference to a copy of the value,
-// instead of the original value. For example, when the 0-th
-// argument of the mock function takes a const string&, the action
-//
-// InvokeArgument<0>(string("Hello"))
-//
-// makes a copy of the temporary string("Hello") object and passes a
-// reference of the copy, instead of the original temporary object,
-// to the callable. This makes it easy for a user to define an
-// InvokeArgument action from temporary values and have it performed
-// later.
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args));
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(p0)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_2_VALUE_PARAMS(p0, p1)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_3_VALUE_PARAMS(p0, p1, p2)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
-}
-
-// Various overloads for ReturnNew<T>().
-//
-// The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new
-// instance of type T, constructed on the heap with constructor arguments
-// a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_0_VALUE_PARAMS()) {
- return new T();
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_1_VALUE_PARAMS(p0)) {
- return new T(p0);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_2_VALUE_PARAMS(p0, p1)) {
- return new T(p0, p1);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_3_VALUE_PARAMS(p0, p1, p2)) {
- return new T(p0, p1, p2);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
- return new T(p0, p1, p2, p3);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
- return new T(p0, p1, p2, p3, p4);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
- return new T(p0, p1, p2, p3, p4, p5);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
- return new T(p0, p1, p2, p3, p4, p5, p6);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
- return new T(p0, p1, p2, p3, p4, p5, p6, p7);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
- return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
- return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-// This file was GENERATED by command:
-// pump.py gmock-generated-function-mockers.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements function mockers of various arities.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements the ON_CALL() and EXPECT_CALL() macros.
-//
-// A user can use the ON_CALL() macro to specify the default action of
-// a mock method. The syntax is:
-//
-// ON_CALL(mock_object, Method(argument-matchers))
-// .With(multi-argument-matcher)
-// .WillByDefault(action);
-//
-// where the .With() clause is optional.
-//
-// A user can use the EXPECT_CALL() macro to specify an expectation on
-// a mock method. The syntax is:
-//
-// EXPECT_CALL(mock_object, Method(argument-matchers))
-// .With(multi-argument-matchers)
-// .Times(cardinality)
-// .InSequence(sequences)
-// .After(expectations)
-// .WillOnce(action)
-// .WillRepeatedly(action)
-// .RetiresOnSaturation();
-//
-// where all clauses are optional, and .InSequence()/.After()/
-// .WillOnce() can appear any number of times.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-#include <vector>
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used argument matchers. More
-// matchers can be defined by the user implementing the
-// MatcherInterface<T> interface if necessary.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-
-#include <algorithm>
-#include <limits>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
-
-namespace testing {
-
-// To implement a matcher Foo for type T, define:
-// 1. a class FooMatcherImpl that implements the
-// MatcherInterface<T> interface, and
-// 2. a factory function that creates a Matcher<T> object from a
-// FooMatcherImpl*.
-//
-// The two-level delegation design makes it possible to allow a user
-// to write "v" instead of "Eq(v)" where a Matcher is expected, which
-// is impossible if we pass matchers by pointers. It also eases
-// ownership management as Matcher objects can now be copied like
-// plain values.
-
-// MatchResultListener is an abstract class. Its << operator can be
-// used by a matcher to explain why a value matches or doesn't match.
-//
-// TODO(wan@google.com): add method
-// bool InterestedInWhy(bool result) const;
-// to indicate whether the listener is interested in why the match
-// result is 'result'.
-class MatchResultListener {
- public:
- // Creates a listener object with the given underlying ostream. The
- // listener does not own the ostream.
- explicit MatchResultListener(::std::ostream* os) : stream_(os) {}
- virtual ~MatchResultListener() = 0; // Makes this class abstract.
-
- // Streams x to the underlying ostream; does nothing if the ostream
- // is NULL.
- template <typename T>
- MatchResultListener& operator<<(const T& x) {
- if (stream_ != NULL)
- *stream_ << x;
- return *this;
- }
-
- // Returns the underlying ostream.
- ::std::ostream* stream() { return stream_; }
-
- // Returns true iff the listener is interested in an explanation of
- // the match result. A matcher's MatchAndExplain() method can use
- // this information to avoid generating the explanation when no one
- // intends to hear it.
- bool IsInterested() const { return stream_ != NULL; }
-
- private:
- ::std::ostream* const stream_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener);
-};
-
-inline MatchResultListener::~MatchResultListener() {
-}
-
-// The implementation of a matcher.
-template <typename T>
-class MatcherInterface {
- public:
- virtual ~MatcherInterface() {}
-
- // Returns true iff the matcher matches x; also explains the match
- // result to 'listener', in the form of a non-restrictive relative
- // clause ("which ...", "whose ...", etc) that describes x. For
- // example, the MatchAndExplain() method of the Pointee(...) matcher
- // should generate an explanation like "which points to ...".
- //
- // You should override this method when defining a new matcher.
- //
- // It's the responsibility of the caller (Google Mock) to guarantee
- // that 'listener' is not NULL. This helps to simplify a matcher's
- // implementation when it doesn't care about the performance, as it
- // can talk to 'listener' without checking its validity first.
- // However, in order to implement dummy listeners efficiently,
- // listener->stream() may be NULL.
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0;
-
- // Describes this matcher to an ostream. The function should print
- // a verb phrase that describes the property a value matching this
- // matcher should have. The subject of the verb phrase is the value
- // being matched. For example, the DescribeTo() method of the Gt(7)
- // matcher prints "is greater than 7".
- virtual void DescribeTo(::std::ostream* os) const = 0;
-
- // Describes the negation of this matcher to an ostream. For
- // example, if the description of this matcher is "is greater than
- // 7", the negated description could be "is not greater than 7".
- // You are not required to override this when implementing
- // MatcherInterface, but it is highly advised so that your matcher
- // can produce good error messages.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "not (";
- DescribeTo(os);
- *os << ")";
- }
-};
-
-namespace internal {
-
-// A match result listener that ignores the explanation.
-class DummyMatchResultListener : public MatchResultListener {
- public:
- DummyMatchResultListener() : MatchResultListener(NULL) {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener);
-};
-
-// A match result listener that forwards the explanation to a given
-// ostream. The difference between this and MatchResultListener is
-// that the former is concrete.
-class StreamMatchResultListener : public MatchResultListener {
- public:
- explicit StreamMatchResultListener(::std::ostream* os)
- : MatchResultListener(os) {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener);
-};
-
-// A match result listener that stores the explanation in a string.
-class StringMatchResultListener : public MatchResultListener {
- public:
- StringMatchResultListener() : MatchResultListener(&ss_) {}
-
- // Returns the explanation heard so far.
- internal::string str() const { return ss_.str(); }
-
- private:
- ::std::stringstream ss_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener);
-};
-
-// An internal class for implementing Matcher<T>, which will derive
-// from it. We put functionalities common to all Matcher<T>
-// specializations here to avoid code duplication.
-template <typename T>
-class MatcherBase {
- public:
- // Returns true iff the matcher matches x; also explains the match
- // result to 'listener'.
- bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return impl_->MatchAndExplain(x, listener);
- }
-
- // Returns true iff this matcher matches x.
- bool Matches(T x) const {
- DummyMatchResultListener dummy;
- return MatchAndExplain(x, &dummy);
- }
-
- // Describes this matcher to an ostream.
- void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
-
- // Describes the negation of this matcher to an ostream.
- void DescribeNegationTo(::std::ostream* os) const {
- impl_->DescribeNegationTo(os);
- }
-
- // Explains why x matches, or doesn't match, the matcher.
- void ExplainMatchResultTo(T x, ::std::ostream* os) const {
- StreamMatchResultListener listener(os);
- MatchAndExplain(x, &listener);
- }
-
- protected:
- MatcherBase() {}
-
- // Constructs a matcher from its implementation.
- explicit MatcherBase(const MatcherInterface<T>* impl)
- : impl_(impl) {}
-
- virtual ~MatcherBase() {}
-
- private:
- // shared_ptr (util/gtl/shared_ptr.h) and linked_ptr have similar
- // interfaces. The former dynamically allocates a chunk of memory
- // to hold the reference count, while the latter tracks all
- // references using a circular linked list without allocating
- // memory. It has been observed that linked_ptr performs better in
- // typical scenarios. However, shared_ptr can out-perform
- // linked_ptr when there are many more uses of the copy constructor
- // than the default constructor.
- //
- // If performance becomes a problem, we should see if using
- // shared_ptr helps.
- ::testing::internal::linked_ptr<const MatcherInterface<T> > impl_;
-};
-
-} // namespace internal
-
-// A Matcher<T> is a copyable and IMMUTABLE (except by assignment)
-// object that can check whether a value of type T matches. The
-// implementation of Matcher<T> is just a linked_ptr to const
-// MatcherInterface<T>, so copying is fairly cheap. Don't inherit
-// from Matcher!
-template <typename T>
-class Matcher : public internal::MatcherBase<T> {
- public:
- // Constructs a null matcher. Needed for storing Matcher objects in STL
- // containers. A default-constructed matcher is not yet initialized. You
- // cannot use it until a valid value has been assigned to it.
- Matcher() {}
-
- // Constructs a matcher from its implementation.
- explicit Matcher(const MatcherInterface<T>* impl)
- : internal::MatcherBase<T>(impl) {}
-
- // Implicit constructor here allows people to write
- // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes
- Matcher(T value); // NOLINT
-};
-
-// The following two specializations allow the user to write str
-// instead of Eq(str) and "foo" instead of Eq("foo") when a string
-// matcher is expected.
-template <>
-class Matcher<const internal::string&>
- : public internal::MatcherBase<const internal::string&> {
- public:
- Matcher() {}
-
- explicit Matcher(const MatcherInterface<const internal::string&>* impl)
- : internal::MatcherBase<const internal::string&>(impl) {}
-
- // Allows the user to write str instead of Eq(str) sometimes, where
- // str is a string object.
- Matcher(const internal::string& s); // NOLINT
-
- // Allows the user to write "foo" instead of Eq("foo") sometimes.
- Matcher(const char* s); // NOLINT
-};
-
-template <>
-class Matcher<internal::string>
- : public internal::MatcherBase<internal::string> {
- public:
- Matcher() {}
-
- explicit Matcher(const MatcherInterface<internal::string>* impl)
- : internal::MatcherBase<internal::string>(impl) {}
-
- // Allows the user to write str instead of Eq(str) sometimes, where
- // str is a string object.
- Matcher(const internal::string& s); // NOLINT
-
- // Allows the user to write "foo" instead of Eq("foo") sometimes.
- Matcher(const char* s); // NOLINT
-};
-
-// The PolymorphicMatcher class template makes it easy to implement a
-// polymorphic matcher (i.e. a matcher that can match values of more
-// than one type, e.g. Eq(n) and NotNull()).
-//
-// To define a polymorphic matcher, a user should provide an Impl
-// class that has a DescribeTo() method and a DescribeNegationTo()
-// method, and define a member function (or member function template)
-//
-// bool MatchAndExplain(const Value& value,
-// MatchResultListener* listener) const;
-//
-// See the definition of NotNull() for a complete example.
-template <class Impl>
-class PolymorphicMatcher {
- public:
- explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {}
-
- // Returns a mutable reference to the underlying matcher
- // implementation object.
- Impl& mutable_impl() { return impl_; }
-
- // Returns an immutable reference to the underlying matcher
- // implementation object.
- const Impl& impl() const { return impl_; }
-
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new MonomorphicImpl<T>(impl_));
- }
-
- private:
- template <typename T>
- class MonomorphicImpl : public MatcherInterface<T> {
- public:
- explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- impl_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- impl_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return impl_.MatchAndExplain(x, listener);
- }
-
- private:
- const Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);
- };
-
- Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(PolymorphicMatcher);
-};
-
-// Creates a matcher from its implementation. This is easier to use
-// than the Matcher<T> constructor as it doesn't require you to
-// explicitly write the template argument, e.g.
-//
-// MakeMatcher(foo);
-// vs
-// Matcher<const string&>(foo);
-template <typename T>
-inline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {
- return Matcher<T>(impl);
-};
-
-// Creates a polymorphic matcher from its implementation. This is
-// easier to use than the PolymorphicMatcher<Impl> constructor as it
-// doesn't require you to explicitly write the template argument, e.g.
-//
-// MakePolymorphicMatcher(foo);
-// vs
-// PolymorphicMatcher<TypeOfFoo>(foo);
-template <class Impl>
-inline PolymorphicMatcher<Impl> MakePolymorphicMatcher(const Impl& impl) {
- return PolymorphicMatcher<Impl>(impl);
-}
-
-// In order to be safe and clear, casting between different matcher
-// types is done explicitly via MatcherCast<T>(m), which takes a
-// matcher m and returns a Matcher<T>. It compiles only when T can be
-// statically converted to the argument type of m.
-template <typename T, typename M>
-Matcher<T> MatcherCast(M m);
-
-// Implements SafeMatcherCast().
-//
-// We use an intermediate class to do the actual safe casting as Nokia's
-// Symbian compiler cannot decide between
-// template <T, M> ... (M) and
-// template <T, U> ... (const Matcher<U>&)
-// for function templates but can for member function templates.
-template <typename T>
-class SafeMatcherCastImpl {
- public:
- // This overload handles polymorphic matchers only since monomorphic
- // matchers are handled by the next one.
- template <typename M>
- static inline Matcher<T> Cast(M polymorphic_matcher) {
- return Matcher<T>(polymorphic_matcher);
- }
-
- // This overload handles monomorphic matchers.
- //
- // In general, if type T can be implicitly converted to type U, we can
- // safely convert a Matcher<U> to a Matcher<T> (i.e. Matcher is
- // contravariant): just keep a copy of the original Matcher<U>, convert the
- // argument from type T to U, and then pass it to the underlying Matcher<U>.
- // The only exception is when U is a reference and T is not, as the
- // underlying Matcher<U> may be interested in the argument's address, which
- // is not preserved in the conversion from T to U.
- template <typename U>
- static inline Matcher<T> Cast(const Matcher<U>& matcher) {
- // Enforce that T can be implicitly converted to U.
- GTEST_COMPILE_ASSERT_((internal::ImplicitlyConvertible<T, U>::value),
- T_must_be_implicitly_convertible_to_U);
- // Enforce that we are not converting a non-reference type T to a reference
- // type U.
- GTEST_COMPILE_ASSERT_(
- internal::is_reference<T>::value || !internal::is_reference<U>::value,
- cannot_convert_non_referentce_arg_to_reference);
- // In case both T and U are arithmetic types, enforce that the
- // conversion is not lossy.
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT;
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU;
- const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther;
- const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther;
- GTEST_COMPILE_ASSERT_(
- kTIsOther || kUIsOther ||
- (internal::LosslessArithmeticConvertible<RawT, RawU>::value),
- conversion_of_arithmetic_types_must_be_lossless);
- return MatcherCast<T>(matcher);
- }
-};
-
-template <typename T, typename M>
-inline Matcher<T> SafeMatcherCast(const M& polymorphic_matcher) {
- return SafeMatcherCastImpl<T>::Cast(polymorphic_matcher);
-}
-
-// A<T>() returns a matcher that matches any value of type T.
-template <typename T>
-Matcher<T> A();
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// If the explanation is not empty, prints it to the ostream.
-inline void PrintIfNotEmpty(const internal::string& explanation,
- std::ostream* os) {
- if (explanation != "" && os != NULL) {
- *os << ", " << explanation;
- }
-}
-
-// Returns true if the given type name is easy to read by a human.
-// This is used to decide whether printing the type of a value might
-// be helpful.
-inline bool IsReadableTypeName(const string& type_name) {
- // We consider a type name readable if it's short or doesn't contain
- // a template or function type.
- return (type_name.length() <= 20 ||
- type_name.find_first_of("<(") == string::npos);
-}
-
-// Matches the value against the given matcher, prints the value and explains
-// the match result to the listener. Returns the match result.
-// 'listener' must not be NULL.
-// Value cannot be passed by const reference, because some matchers take a
-// non-const argument.
-template <typename Value, typename T>
-bool MatchPrintAndExplain(Value& value, const Matcher<T>& matcher,
- MatchResultListener* listener) {
- if (!listener->IsInterested()) {
- // If the listener is not interested, we do not need to construct the
- // inner explanation.
- return matcher.Matches(value);
- }
-
- StringMatchResultListener inner_listener;
- const bool match = matcher.MatchAndExplain(value, &inner_listener);
-
- UniversalPrint(value, listener->stream());
-#if GTEST_HAS_RTTI
- const string& type_name = GetTypeName<Value>();
- if (IsReadableTypeName(type_name))
- *listener->stream() << " (of type " << type_name << ")";
-#endif
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
-
- return match;
-}
-
-// An internal helper class for doing compile-time loop on a tuple's
-// fields.
-template <size_t N>
-class TuplePrefix {
- public:
- // TuplePrefix<N>::Matches(matcher_tuple, value_tuple) returns true
- // iff the first N fields of matcher_tuple matches the first N
- // fields of value_tuple, respectively.
- template <typename MatcherTuple, typename ValueTuple>
- static bool Matches(const MatcherTuple& matcher_tuple,
- const ValueTuple& value_tuple) {
- using ::std::tr1::get;
- return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple)
- && get<N - 1>(matcher_tuple).Matches(get<N - 1>(value_tuple));
- }
-
- // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
- // describes failures in matching the first N fields of matchers
- // against the first N fields of values. If there is no failure,
- // nothing will be streamed to os.
- template <typename MatcherTuple, typename ValueTuple>
- static void ExplainMatchFailuresTo(const MatcherTuple& matchers,
- const ValueTuple& values,
- ::std::ostream* os) {
- using ::std::tr1::tuple_element;
- using ::std::tr1::get;
-
- // First, describes failures in the first N - 1 fields.
- TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
-
- // Then describes the failure (if any) in the (N - 1)-th (0-based)
- // field.
- typename tuple_element<N - 1, MatcherTuple>::type matcher =
- get<N - 1>(matchers);
- typedef typename tuple_element<N - 1, ValueTuple>::type Value;
- Value value = get<N - 1>(values);
- StringMatchResultListener listener;
- if (!matcher.MatchAndExplain(value, &listener)) {
- // TODO(wan): include in the message the name of the parameter
- // as used in MOCK_METHOD*() when possible.
- *os << " Expected arg #" << N - 1 << ": ";
- get<N - 1>(matchers).DescribeTo(os);
- *os << "\n Actual: ";
- // We remove the reference in type Value to prevent the
- // universal printer from printing the address of value, which
- // isn't interesting to the user most of the time. The
- // matcher's MatchAndExplain() method handles the case when
- // the address is interesting.
- internal::UniversalPrint(value, os);
- PrintIfNotEmpty(listener.str(), os);
- *os << "\n";
- }
- }
-};
-
-// The base case.
-template <>
-class TuplePrefix<0> {
- public:
- template <typename MatcherTuple, typename ValueTuple>
- static bool Matches(const MatcherTuple& /* matcher_tuple */,
- const ValueTuple& /* value_tuple */) {
- return true;
- }
-
- template <typename MatcherTuple, typename ValueTuple>
- static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */,
- const ValueTuple& /* values */,
- ::std::ostream* /* os */) {}
-};
-
-// TupleMatches(matcher_tuple, value_tuple) returns true iff all
-// matchers in matcher_tuple match the corresponding fields in
-// value_tuple. It is a compiler error if matcher_tuple and
-// value_tuple have different number of fields or incompatible field
-// types.
-template <typename MatcherTuple, typename ValueTuple>
-bool TupleMatches(const MatcherTuple& matcher_tuple,
- const ValueTuple& value_tuple) {
- using ::std::tr1::tuple_size;
- // Makes sure that matcher_tuple and value_tuple have the same
- // number of fields.
- GTEST_COMPILE_ASSERT_(tuple_size<MatcherTuple>::value ==
- tuple_size<ValueTuple>::value,
- matcher_and_value_have_different_numbers_of_fields);
- return TuplePrefix<tuple_size<ValueTuple>::value>::
- Matches(matcher_tuple, value_tuple);
-}
-
-// Describes failures in matching matchers against values. If there
-// is no failure, nothing will be streamed to os.
-template <typename MatcherTuple, typename ValueTuple>
-void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
- const ValueTuple& values,
- ::std::ostream* os) {
- using ::std::tr1::tuple_size;
- TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
- matchers, values, os);
-}
-
-// The MatcherCastImpl class template is a helper for implementing
-// MatcherCast(). We need this helper in order to partially
-// specialize the implementation of MatcherCast() (C++ allows
-// class/struct templates to be partially specialized, but not
-// function templates.).
-
-// This general version is used when MatcherCast()'s argument is a
-// polymorphic matcher (i.e. something that can be converted to a
-// Matcher but is not one yet; for example, Eq(value)).
-template <typename T, typename M>
-class MatcherCastImpl {
- public:
- static Matcher<T> Cast(M polymorphic_matcher) {
- return Matcher<T>(polymorphic_matcher);
- }
-};
-
-// This more specialized version is used when MatcherCast()'s argument
-// is already a Matcher. This only compiles when type T can be
-// statically converted to type U.
-template <typename T, typename U>
-class MatcherCastImpl<T, Matcher<U> > {
- public:
- static Matcher<T> Cast(const Matcher<U>& source_matcher) {
- return Matcher<T>(new Impl(source_matcher));
- }
-
- private:
- class Impl : public MatcherInterface<T> {
- public:
- explicit Impl(const Matcher<U>& source_matcher)
- : source_matcher_(source_matcher) {}
-
- // We delegate the matching logic to the source matcher.
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return source_matcher_.MatchAndExplain(static_cast<U>(x), listener);
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- source_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- source_matcher_.DescribeNegationTo(os);
- }
-
- private:
- const Matcher<U> source_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-};
-
-// This even more specialized version is used for efficiently casting
-// a matcher to its own type.
-template <typename T>
-class MatcherCastImpl<T, Matcher<T> > {
- public:
- static Matcher<T> Cast(const Matcher<T>& matcher) { return matcher; }
-};
-
-// Implements A<T>().
-template <typename T>
-class AnyMatcherImpl : public MatcherInterface<T> {
- public:
- virtual bool MatchAndExplain(
- T /* x */, MatchResultListener* /* listener */) const { return true; }
- virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; }
- virtual void DescribeNegationTo(::std::ostream* os) const {
- // This is mostly for completeness' safe, as it's not very useful
- // to write Not(A<bool>()). However we cannot completely rule out
- // such a possibility, and it doesn't hurt to be prepared.
- *os << "never matches";
- }
-};
-
-// Implements _, a matcher that matches any value of any
-// type. This is a polymorphic matcher, so we need a template type
-// conversion operator to make it appearing as a Matcher<T> for any
-// type T.
-class AnythingMatcher {
- public:
- template <typename T>
- operator Matcher<T>() const { return A<T>(); }
-};
-
-// Implements a matcher that compares a given value with a
-// pre-supplied value using one of the ==, <=, <, etc, operators. The
-// two values being compared don't have to have the same type.
-//
-// The matcher defined here is polymorphic (for example, Eq(5) can be
-// used to match an int, a short, a double, etc). Therefore we use
-// a template type conversion operator in the implementation.
-//
-// We define this as a macro in order to eliminate duplicated source
-// code.
-//
-// The following template definition assumes that the Rhs parameter is
-// a "bare" type (i.e. neither 'const T' nor 'T&').
-#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_( \
- name, op, relation, negated_relation) \
- template <typename Rhs> class name##Matcher { \
- public: \
- explicit name##Matcher(const Rhs& rhs) : rhs_(rhs) {} \
- template <typename Lhs> \
- operator Matcher<Lhs>() const { \
- return MakeMatcher(new Impl<Lhs>(rhs_)); \
- } \
- private: \
- template <typename Lhs> \
- class Impl : public MatcherInterface<Lhs> { \
- public: \
- explicit Impl(const Rhs& rhs) : rhs_(rhs) {} \
- virtual bool MatchAndExplain(\
- Lhs lhs, MatchResultListener* /* listener */) const { \
- return lhs op rhs_; \
- } \
- virtual void DescribeTo(::std::ostream* os) const { \
- *os << relation " "; \
- UniversalPrint(rhs_, os); \
- } \
- virtual void DescribeNegationTo(::std::ostream* os) const { \
- *os << negated_relation " "; \
- UniversalPrint(rhs_, os); \
- } \
- private: \
- Rhs rhs_; \
- GTEST_DISALLOW_ASSIGN_(Impl); \
- }; \
- Rhs rhs_; \
- GTEST_DISALLOW_ASSIGN_(name##Matcher); \
- }
-
-// Implements Eq(v), Ge(v), Gt(v), Le(v), Lt(v), and Ne(v)
-// respectively.
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Eq, ==, "is equal to", "isn't equal to");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ge, >=, "is >=", "isn't >=");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Gt, >, "is >", "isn't >");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Le, <=, "is <=", "isn't <=");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Lt, <, "is <", "isn't <");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ne, !=, "isn't equal to", "is equal to");
-
-#undef GMOCK_IMPLEMENT_COMPARISON_MATCHER_
-
-// Implements the polymorphic IsNull() matcher, which matches any raw or smart
-// pointer that is NULL.
-class IsNullMatcher {
- public:
- template <typename Pointer>
- bool MatchAndExplain(const Pointer& p,
- MatchResultListener* /* listener */) const {
- return GetRawPointer(p) == NULL;
- }
-
- void DescribeTo(::std::ostream* os) const { *os << "is NULL"; }
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "isn't NULL";
- }
-};
-
-// Implements the polymorphic NotNull() matcher, which matches any raw or smart
-// pointer that is not NULL.
-class NotNullMatcher {
- public:
- template <typename Pointer>
- bool MatchAndExplain(const Pointer& p,
- MatchResultListener* /* listener */) const {
- return GetRawPointer(p) != NULL;
- }
-
- void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "is NULL";
- }
-};
-
-// Ref(variable) matches any argument that is a reference to
-// 'variable'. This matcher is polymorphic as it can match any
-// super type of the type of 'variable'.
-//
-// The RefMatcher template class implements Ref(variable). It can
-// only be instantiated with a reference type. This prevents a user
-// from mistakenly using Ref(x) to match a non-reference function
-// argument. For example, the following will righteously cause a
-// compiler error:
-//
-// int n;
-// Matcher<int> m1 = Ref(n); // This won't compile.
-// Matcher<int&> m2 = Ref(n); // This will compile.
-template <typename T>
-class RefMatcher;
-
-template <typename T>
-class RefMatcher<T&> {
- // Google Mock is a generic framework and thus needs to support
- // mocking any function types, including those that take non-const
- // reference arguments. Therefore the template parameter T (and
- // Super below) can be instantiated to either a const type or a
- // non-const type.
- public:
- // RefMatcher() takes a T& instead of const T&, as we want the
- // compiler to catch using Ref(const_value) as a matcher for a
- // non-const reference.
- explicit RefMatcher(T& x) : object_(x) {} // NOLINT
-
- template <typename Super>
- operator Matcher<Super&>() const {
- // By passing object_ (type T&) to Impl(), which expects a Super&,
- // we make sure that Super is a super type of T. In particular,
- // this catches using Ref(const_value) as a matcher for a
- // non-const reference, as you cannot implicitly convert a const
- // reference to a non-const reference.
- return MakeMatcher(new Impl<Super>(object_));
- }
-
- private:
- template <typename Super>
- class Impl : public MatcherInterface<Super&> {
- public:
- explicit Impl(Super& x) : object_(x) {} // NOLINT
-
- // MatchAndExplain() takes a Super& (as opposed to const Super&)
- // in order to match the interface MatcherInterface<Super&>.
- virtual bool MatchAndExplain(
- Super& x, MatchResultListener* listener) const {
- *listener << "which is located @" << static_cast<const void*>(&x);
- return &x == &object_;
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "references the variable ";
- UniversalPrinter<Super&>::Print(object_, os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "does not reference the variable ";
- UniversalPrinter<Super&>::Print(object_, os);
- }
-
- private:
- const Super& object_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- T& object_;
-
- GTEST_DISALLOW_ASSIGN_(RefMatcher);
-};
-
-// Polymorphic helper functions for narrow and wide string matchers.
-inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
- return String::CaseInsensitiveCStringEquals(lhs, rhs);
-}
-
-inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs) {
- return String::CaseInsensitiveWideCStringEquals(lhs, rhs);
-}
-
-// String comparison for narrow or wide strings that can have embedded NUL
-// characters.
-template <typename StringType>
-bool CaseInsensitiveStringEquals(const StringType& s1,
- const StringType& s2) {
- // Are the heads equal?
- if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) {
- return false;
- }
-
- // Skip the equal heads.
- const typename StringType::value_type nul = 0;
- const size_t i1 = s1.find(nul), i2 = s2.find(nul);
-
- // Are we at the end of either s1 or s2?
- if (i1 == StringType::npos || i2 == StringType::npos) {
- return i1 == i2;
- }
-
- // Are the tails equal?
- return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1));
-}
-
-// String matchers.
-
-// Implements equality-based string matchers like StrEq, StrCaseNe, and etc.
-template <typename StringType>
-class StrEqualityMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- StrEqualityMatcher(const StringType& str, bool expect_eq,
- bool case_sensitive)
- : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {}
-
- // When expect_eq_ is true, returns true iff s is equal to string_;
- // otherwise returns true iff s is not equal to string_.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- if (s == NULL) {
- return !expect_eq_;
- }
- return MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- const bool eq = case_sensitive_ ? s == string_ :
- CaseInsensitiveStringEquals(s, string_);
- return expect_eq_ == eq;
- }
-
- void DescribeTo(::std::ostream* os) const {
- DescribeToHelper(expect_eq_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- DescribeToHelper(!expect_eq_, os);
- }
-
- private:
- void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {
- *os << (expect_eq ? "is " : "isn't ");
- *os << "equal to ";
- if (!case_sensitive_) {
- *os << "(ignoring case) ";
- }
- UniversalPrint(string_, os);
- }
-
- const StringType string_;
- const bool expect_eq_;
- const bool case_sensitive_;
-
- GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher);
-};
-
-// Implements the polymorphic HasSubstr(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class HasSubstrMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- explicit HasSubstrMatcher(const StringType& substring)
- : substring_(substring) {}
-
- // These overloaded methods allow HasSubstr(substring) to be used as a
- // Matcher<T> as long as T can be converted to string. Returns true
- // iff s contains substring_ as a substring.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- return s.find(substring_) != StringType::npos;
- }
-
- // Describes what this matcher matches.
- void DescribeTo(::std::ostream* os) const {
- *os << "has substring ";
- UniversalPrint(substring_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "has no substring ";
- UniversalPrint(substring_, os);
- }
-
- private:
- const StringType substring_;
-
- GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher);
-};
-
-// Implements the polymorphic StartsWith(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class StartsWithMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) {
- }
-
- // These overloaded methods allow StartsWith(prefix) to be used as a
- // Matcher<T> as long as T can be converted to string. Returns true
- // iff s starts with prefix_.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- return s.length() >= prefix_.length() &&
- s.substr(0, prefix_.length()) == prefix_;
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "starts with ";
- UniversalPrint(prefix_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't start with ";
- UniversalPrint(prefix_, os);
- }
-
- private:
- const StringType prefix_;
-
- GTEST_DISALLOW_ASSIGN_(StartsWithMatcher);
-};
-
-// Implements the polymorphic EndsWith(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class EndsWithMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {}
-
- // These overloaded methods allow EndsWith(suffix) to be used as a
- // Matcher<T> as long as T can be converted to string. Returns true
- // iff s ends with suffix_.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- return s.length() >= suffix_.length() &&
- s.substr(s.length() - suffix_.length()) == suffix_;
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "ends with ";
- UniversalPrint(suffix_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't end with ";
- UniversalPrint(suffix_, os);
- }
-
- private:
- const StringType suffix_;
-
- GTEST_DISALLOW_ASSIGN_(EndsWithMatcher);
-};
-
-// Implements polymorphic matchers MatchesRegex(regex) and
-// ContainsRegex(regex), which can be used as a Matcher<T> as long as
-// T can be converted to a string.
-class MatchesRegexMatcher {
- public:
- MatchesRegexMatcher(const RE* regex, bool full_match)
- : regex_(regex), full_match_(full_match) {}
-
- // These overloaded methods allow MatchesRegex(regex) to be used as
- // a Matcher<T> as long as T can be converted to string. Returns
- // true iff s matches regular expression regex. When full_match_ is
- // true, a full match is done; otherwise a partial match is done.
- bool MatchAndExplain(const char* s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(internal::string(s), listener);
- }
-
- bool MatchAndExplain(const internal::string& s,
- MatchResultListener* /* listener */) const {
- return full_match_ ? RE::FullMatch(s, *regex_) :
- RE::PartialMatch(s, *regex_);
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << (full_match_ ? "matches" : "contains")
- << " regular expression ";
- UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't " << (full_match_ ? "match" : "contain")
- << " regular expression ";
- UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
- }
-
- private:
- const internal::linked_ptr<const RE> regex_;
- const bool full_match_;
-
- GTEST_DISALLOW_ASSIGN_(MatchesRegexMatcher);
-};
-
-// Implements a matcher that compares the two fields of a 2-tuple
-// using one of the ==, <=, <, etc, operators. The two fields being
-// compared don't have to have the same type.
-//
-// The matcher defined here is polymorphic (for example, Eq() can be
-// used to match a tuple<int, short>, a tuple<const long&, double>,
-// etc). Therefore we use a template type conversion operator in the
-// implementation.
-//
-// We define this as a macro in order to eliminate duplicated source
-// code.
-#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op, relation) \
- class name##2Matcher { \
- public: \
- template <typename T1, typename T2> \
- operator Matcher< ::std::tr1::tuple<T1, T2> >() const { \
- return MakeMatcher(new Impl< ::std::tr1::tuple<T1, T2> >); \
- } \
- template <typename T1, typename T2> \
- operator Matcher<const ::std::tr1::tuple<T1, T2>&>() const { \
- return MakeMatcher(new Impl<const ::std::tr1::tuple<T1, T2>&>); \
- } \
- private: \
- template <typename Tuple> \
- class Impl : public MatcherInterface<Tuple> { \
- public: \
- virtual bool MatchAndExplain( \
- Tuple args, \
- MatchResultListener* /* listener */) const { \
- return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \
- } \
- virtual void DescribeTo(::std::ostream* os) const { \
- *os << "are " relation; \
- } \
- virtual void DescribeNegationTo(::std::ostream* os) const { \
- *os << "aren't " relation; \
- } \
- }; \
- }
-
-// Implements Eq(), Ge(), Gt(), Le(), Lt(), and Ne() respectively.
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Eq, ==, "an equal pair");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Ge, >=, "a pair where the first >= the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Gt, >, "a pair where the first > the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Le, <=, "a pair where the first <= the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Lt, <, "a pair where the first < the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ne, !=, "an unequal pair");
-
-#undef GMOCK_IMPLEMENT_COMPARISON2_MATCHER_
-
-// Implements the Not(...) matcher for a particular argument type T.
-// We do not nest it inside the NotMatcher class template, as that
-// will prevent different instantiations of NotMatcher from sharing
-// the same NotMatcherImpl<T> class.
-template <typename T>
-class NotMatcherImpl : public MatcherInterface<T> {
- public:
- explicit NotMatcherImpl(const Matcher<T>& matcher)
- : matcher_(matcher) {}
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return !matcher_.MatchAndExplain(x, listener);
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- matcher_.DescribeNegationTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- matcher_.DescribeTo(os);
- }
-
- private:
- const Matcher<T> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(NotMatcherImpl);
-};
-
-// Implements the Not(m) matcher, which matches a value that doesn't
-// match matcher m.
-template <typename InnerMatcher>
-class NotMatcher {
- public:
- explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {}
-
- // This template type conversion operator allows Not(m) to be used
- // to match any type m can match.
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new NotMatcherImpl<T>(SafeMatcherCast<T>(matcher_)));
- }
-
- private:
- InnerMatcher matcher_;
-
- GTEST_DISALLOW_ASSIGN_(NotMatcher);
-};
-
-// Implements the AllOf(m1, m2) matcher for a particular argument type
-// T. We do not nest it inside the BothOfMatcher class template, as
-// that will prevent different instantiations of BothOfMatcher from
-// sharing the same BothOfMatcherImpl<T> class.
-template <typename T>
-class BothOfMatcherImpl : public MatcherInterface<T> {
- public:
- BothOfMatcherImpl(const Matcher<T>& matcher1, const Matcher<T>& matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeTo(os);
- *os << ") and (";
- matcher2_.DescribeTo(os);
- *os << ")";
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeNegationTo(os);
- *os << ") or (";
- matcher2_.DescribeNegationTo(os);
- *os << ")";
- }
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- // If either matcher1_ or matcher2_ doesn't match x, we only need
- // to explain why one of them fails.
- StringMatchResultListener listener1;
- if (!matcher1_.MatchAndExplain(x, &listener1)) {
- *listener << listener1.str();
- return false;
- }
-
- StringMatchResultListener listener2;
- if (!matcher2_.MatchAndExplain(x, &listener2)) {
- *listener << listener2.str();
- return false;
- }
-
- // Otherwise we need to explain why *both* of them match.
- const internal::string s1 = listener1.str();
- const internal::string s2 = listener2.str();
-
- if (s1 == "") {
- *listener << s2;
- } else {
- *listener << s1;
- if (s2 != "") {
- *listener << ", and " << s2;
- }
- }
- return true;
- }
-
- private:
- const Matcher<T> matcher1_;
- const Matcher<T> matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(BothOfMatcherImpl);
-};
-
-// Used for implementing the AllOf(m_1, ..., m_n) matcher, which
-// matches a value that matches all of the matchers m_1, ..., and m_n.
-template <typename Matcher1, typename Matcher2>
-class BothOfMatcher {
- public:
- BothOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- // This template type conversion operator allows a
- // BothOfMatcher<Matcher1, Matcher2> object to match any type that
- // both Matcher1 and Matcher2 can match.
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new BothOfMatcherImpl<T>(SafeMatcherCast<T>(matcher1_),
- SafeMatcherCast<T>(matcher2_)));
- }
-
- private:
- Matcher1 matcher1_;
- Matcher2 matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(BothOfMatcher);
-};
-
-// Implements the AnyOf(m1, m2) matcher for a particular argument type
-// T. We do not nest it inside the AnyOfMatcher class template, as
-// that will prevent different instantiations of AnyOfMatcher from
-// sharing the same EitherOfMatcherImpl<T> class.
-template <typename T>
-class EitherOfMatcherImpl : public MatcherInterface<T> {
- public:
- EitherOfMatcherImpl(const Matcher<T>& matcher1, const Matcher<T>& matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeTo(os);
- *os << ") or (";
- matcher2_.DescribeTo(os);
- *os << ")";
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeNegationTo(os);
- *os << ") and (";
- matcher2_.DescribeNegationTo(os);
- *os << ")";
- }
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- // If either matcher1_ or matcher2_ matches x, we just need to
- // explain why *one* of them matches.
- StringMatchResultListener listener1;
- if (matcher1_.MatchAndExplain(x, &listener1)) {
- *listener << listener1.str();
- return true;
- }
-
- StringMatchResultListener listener2;
- if (matcher2_.MatchAndExplain(x, &listener2)) {
- *listener << listener2.str();
- return true;
- }
-
- // Otherwise we need to explain why *both* of them fail.
- const internal::string s1 = listener1.str();
- const internal::string s2 = listener2.str();
-
- if (s1 == "") {
- *listener << s2;
- } else {
- *listener << s1;
- if (s2 != "") {
- *listener << ", and " << s2;
- }
- }
- return false;
- }
-
- private:
- const Matcher<T> matcher1_;
- const Matcher<T> matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(EitherOfMatcherImpl);
-};
-
-// Used for implementing the AnyOf(m_1, ..., m_n) matcher, which
-// matches a value that matches at least one of the matchers m_1, ...,
-// and m_n.
-template <typename Matcher1, typename Matcher2>
-class EitherOfMatcher {
- public:
- EitherOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- // This template type conversion operator allows a
- // EitherOfMatcher<Matcher1, Matcher2> object to match any type that
- // both Matcher1 and Matcher2 can match.
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new EitherOfMatcherImpl<T>(
- SafeMatcherCast<T>(matcher1_), SafeMatcherCast<T>(matcher2_)));
- }
-
- private:
- Matcher1 matcher1_;
- Matcher2 matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(EitherOfMatcher);
-};
-
-// Used for implementing Truly(pred), which turns a predicate into a
-// matcher.
-template <typename Predicate>
-class TrulyMatcher {
- public:
- explicit TrulyMatcher(Predicate pred) : predicate_(pred) {}
-
- // This method template allows Truly(pred) to be used as a matcher
- // for type T where T is the argument type of predicate 'pred'. The
- // argument is passed by reference as the predicate may be
- // interested in the address of the argument.
- template <typename T>
- bool MatchAndExplain(T& x, // NOLINT
- MatchResultListener* /* listener */) const {
- // Without the if-statement, MSVC sometimes warns about converting
- // a value to bool (warning 4800).
- //
- // We cannot write 'return !!predicate_(x);' as that doesn't work
- // when predicate_(x) returns a class convertible to bool but
- // having no operator!().
- if (predicate_(x))
- return true;
- return false;
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "satisfies the given predicate";
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't satisfy the given predicate";
- }
-
- private:
- Predicate predicate_;
-
- GTEST_DISALLOW_ASSIGN_(TrulyMatcher);
-};
-
-// Used for implementing Matches(matcher), which turns a matcher into
-// a predicate.
-template <typename M>
-class MatcherAsPredicate {
- public:
- explicit MatcherAsPredicate(M matcher) : matcher_(matcher) {}
-
- // This template operator() allows Matches(m) to be used as a
- // predicate on type T where m is a matcher on type T.
- //
- // The argument x is passed by reference instead of by value, as
- // some matcher may be interested in its address (e.g. as in
- // Matches(Ref(n))(x)).
- template <typename T>
- bool operator()(const T& x) const {
- // We let matcher_ commit to a particular type here instead of
- // when the MatcherAsPredicate object was constructed. This
- // allows us to write Matches(m) where m is a polymorphic matcher
- // (e.g. Eq(5)).
- //
- // If we write Matcher<T>(matcher_).Matches(x) here, it won't
- // compile when matcher_ has type Matcher<const T&>; if we write
- // Matcher<const T&>(matcher_).Matches(x) here, it won't compile
- // when matcher_ has type Matcher<T>; if we just write
- // matcher_.Matches(x), it won't compile when matcher_ is
- // polymorphic, e.g. Eq(5).
- //
- // MatcherCast<const T&>() is necessary for making the code work
- // in all of the above situations.
- return MatcherCast<const T&>(matcher_).Matches(x);
- }
-
- private:
- M matcher_;
-
- GTEST_DISALLOW_ASSIGN_(MatcherAsPredicate);
-};
-
-// For implementing ASSERT_THAT() and EXPECT_THAT(). The template
-// argument M must be a type that can be converted to a matcher.
-template <typename M>
-class PredicateFormatterFromMatcher {
- public:
- explicit PredicateFormatterFromMatcher(const M& m) : matcher_(m) {}
-
- // This template () operator allows a PredicateFormatterFromMatcher
- // object to act as a predicate-formatter suitable for using with
- // Google Test's EXPECT_PRED_FORMAT1() macro.
- template <typename T>
- AssertionResult operator()(const char* value_text, const T& x) const {
- // We convert matcher_ to a Matcher<const T&> *now* instead of
- // when the PredicateFormatterFromMatcher object was constructed,
- // as matcher_ may be polymorphic (e.g. NotNull()) and we won't
- // know which type to instantiate it to until we actually see the
- // type of x here.
- //
- // We write MatcherCast<const T&>(matcher_) instead of
- // Matcher<const T&>(matcher_), as the latter won't compile when
- // matcher_ has type Matcher<T> (e.g. An<int>()).
- const Matcher<const T&> matcher = MatcherCast<const T&>(matcher_);
- StringMatchResultListener listener;
- if (MatchPrintAndExplain(x, matcher, &listener))
- return AssertionSuccess();
-
- ::std::stringstream ss;
- ss << "Value of: " << value_text << "\n"
- << "Expected: ";
- matcher.DescribeTo(&ss);
- ss << "\n Actual: " << listener.str();
- return AssertionFailure() << ss.str();
- }
-
- private:
- const M matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PredicateFormatterFromMatcher);
-};
-
-// A helper function for converting a matcher to a predicate-formatter
-// without the user needing to explicitly write the type. This is
-// used for implementing ASSERT_THAT() and EXPECT_THAT().
-template <typename M>
-inline PredicateFormatterFromMatcher<M>
-MakePredicateFormatterFromMatcher(const M& matcher) {
- return PredicateFormatterFromMatcher<M>(matcher);
-}
-
-// Implements the polymorphic floating point equality matcher, which
-// matches two float values using ULP-based approximation. The
-// template is meant to be instantiated with FloatType being either
-// float or double.
-template <typename FloatType>
-class FloatingEqMatcher {
- public:
- // Constructor for FloatingEqMatcher.
- // The matcher's input will be compared with rhs. The matcher treats two
- // NANs as equal if nan_eq_nan is true. Otherwise, under IEEE standards,
- // equality comparisons between NANs will always return false.
- FloatingEqMatcher(FloatType rhs, bool nan_eq_nan) :
- rhs_(rhs), nan_eq_nan_(nan_eq_nan) {}
-
- // Implements floating point equality matcher as a Matcher<T>.
- template <typename T>
- class Impl : public MatcherInterface<T> {
- public:
- Impl(FloatType rhs, bool nan_eq_nan) :
- rhs_(rhs), nan_eq_nan_(nan_eq_nan) {}
-
- virtual bool MatchAndExplain(T value,
- MatchResultListener* /* listener */) const {
- const FloatingPoint<FloatType> lhs(value), rhs(rhs_);
-
- // Compares NaNs first, if nan_eq_nan_ is true.
- if (nan_eq_nan_ && lhs.is_nan()) {
- return rhs.is_nan();
- }
-
- return lhs.AlmostEquals(rhs);
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- // os->precision() returns the previously set precision, which we
- // store to restore the ostream to its original configuration
- // after outputting.
- const ::std::streamsize old_precision = os->precision(
- ::std::numeric_limits<FloatType>::digits10 + 2);
- if (FloatingPoint<FloatType>(rhs_).is_nan()) {
- if (nan_eq_nan_) {
- *os << "is NaN";
- } else {
- *os << "never matches";
- }
- } else {
- *os << "is approximately " << rhs_;
- }
- os->precision(old_precision);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- // As before, get original precision.
- const ::std::streamsize old_precision = os->precision(
- ::std::numeric_limits<FloatType>::digits10 + 2);
- if (FloatingPoint<FloatType>(rhs_).is_nan()) {
- if (nan_eq_nan_) {
- *os << "isn't NaN";
- } else {
- *os << "is anything";
- }
- } else {
- *os << "isn't approximately " << rhs_;
- }
- // Restore original precision.
- os->precision(old_precision);
- }
-
- private:
- const FloatType rhs_;
- const bool nan_eq_nan_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- // The following 3 type conversion operators allow FloatEq(rhs) and
- // NanSensitiveFloatEq(rhs) to be used as a Matcher<float>, a
- // Matcher<const float&>, or a Matcher<float&>, but nothing else.
- // (While Google's C++ coding style doesn't allow arguments passed
- // by non-const reference, we may see them in code not conforming to
- // the style. Therefore Google Mock needs to support them.)
- operator Matcher<FloatType>() const {
- return MakeMatcher(new Impl<FloatType>(rhs_, nan_eq_nan_));
- }
-
- operator Matcher<const FloatType&>() const {
- return MakeMatcher(new Impl<const FloatType&>(rhs_, nan_eq_nan_));
- }
-
- operator Matcher<FloatType&>() const {
- return MakeMatcher(new Impl<FloatType&>(rhs_, nan_eq_nan_));
- }
- private:
- const FloatType rhs_;
- const bool nan_eq_nan_;
-
- GTEST_DISALLOW_ASSIGN_(FloatingEqMatcher);
-};
-
-// Implements the Pointee(m) matcher for matching a pointer whose
-// pointee matches matcher m. The pointer can be either raw or smart.
-template <typename InnerMatcher>
-class PointeeMatcher {
- public:
- explicit PointeeMatcher(const InnerMatcher& matcher) : matcher_(matcher) {}
-
- // This type conversion operator template allows Pointee(m) to be
- // used as a matcher for any pointer type whose pointee type is
- // compatible with the inner matcher, where type Pointer can be
- // either a raw pointer or a smart pointer.
- //
- // The reason we do this instead of relying on
- // MakePolymorphicMatcher() is that the latter is not flexible
- // enough for implementing the DescribeTo() method of Pointee().
- template <typename Pointer>
- operator Matcher<Pointer>() const {
- return MakeMatcher(new Impl<Pointer>(matcher_));
- }
-
- private:
- // The monomorphic implementation that works for a particular pointer type.
- template <typename Pointer>
- class Impl : public MatcherInterface<Pointer> {
- public:
- typedef typename PointeeOf<GTEST_REMOVE_CONST_( // NOLINT
- GTEST_REMOVE_REFERENCE_(Pointer))>::type Pointee;
-
- explicit Impl(const InnerMatcher& matcher)
- : matcher_(MatcherCast<const Pointee&>(matcher)) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "points to a value that ";
- matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "does not point to a value that ";
- matcher_.DescribeTo(os);
- }
-
- virtual bool MatchAndExplain(Pointer pointer,
- MatchResultListener* listener) const {
- if (GetRawPointer(pointer) == NULL)
- return false;
-
- *listener << "which points to ";
- return MatchPrintAndExplain(*pointer, matcher_, listener);
- }
-
- private:
- const Matcher<const Pointee&> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- const InnerMatcher matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PointeeMatcher);
-};
-
-// Implements the Field() matcher for matching a field (i.e. member
-// variable) of an object.
-template <typename Class, typename FieldType>
-class FieldMatcher {
- public:
- FieldMatcher(FieldType Class::*field,
- const Matcher<const FieldType&>& matcher)
- : field_(field), matcher_(matcher) {}
-
- void DescribeTo(::std::ostream* os) const {
- *os << "is an object whose given field ";
- matcher_.DescribeTo(os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "is an object whose given field ";
- matcher_.DescribeNegationTo(os);
- }
-
- template <typename T>
- bool MatchAndExplain(const T& value, MatchResultListener* listener) const {
- return MatchAndExplainImpl(
- typename ::testing::internal::
- is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
- value, listener);
- }
-
- private:
- // The first argument of MatchAndExplainImpl() is needed to help
- // Symbian's C++ compiler choose which overload to use. Its type is
- // true_type iff the Field() matcher is used to match a pointer.
- bool MatchAndExplainImpl(false_type /* is_not_pointer */, const Class& obj,
- MatchResultListener* listener) const {
- *listener << "whose given field is ";
- return MatchPrintAndExplain(obj.*field_, matcher_, listener);
- }
-
- bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
- MatchResultListener* listener) const {
- if (p == NULL)
- return false;
-
- *listener << "which points to an object ";
- // Since *p has a field, it must be a class/struct/union type and
- // thus cannot be a pointer. Therefore we pass false_type() as
- // the first argument.
- return MatchAndExplainImpl(false_type(), *p, listener);
- }
-
- const FieldType Class::*field_;
- const Matcher<const FieldType&> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(FieldMatcher);
-};
-
-// Implements the Property() matcher for matching a property
-// (i.e. return value of a getter method) of an object.
-template <typename Class, typename PropertyType>
-class PropertyMatcher {
- public:
- // The property may have a reference type, so 'const PropertyType&'
- // may cause double references and fail to compile. That's why we
- // need GTEST_REFERENCE_TO_CONST, which works regardless of
- // PropertyType being a reference or not.
- typedef GTEST_REFERENCE_TO_CONST_(PropertyType) RefToConstProperty;
-
- PropertyMatcher(PropertyType (Class::*property)() const,
- const Matcher<RefToConstProperty>& matcher)
- : property_(property), matcher_(matcher) {}
-
- void DescribeTo(::std::ostream* os) const {
- *os << "is an object whose given property ";
- matcher_.DescribeTo(os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "is an object whose given property ";
- matcher_.DescribeNegationTo(os);
- }
-
- template <typename T>
- bool MatchAndExplain(const T&value, MatchResultListener* listener) const {
- return MatchAndExplainImpl(
- typename ::testing::internal::
- is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
- value, listener);
- }
-
- private:
- // The first argument of MatchAndExplainImpl() is needed to help
- // Symbian's C++ compiler choose which overload to use. Its type is
- // true_type iff the Property() matcher is used to match a pointer.
- bool MatchAndExplainImpl(false_type /* is_not_pointer */, const Class& obj,
- MatchResultListener* listener) const {
- *listener << "whose given property is ";
- // Cannot pass the return value (for example, int) to MatchPrintAndExplain,
- // which takes a non-const reference as argument.
- RefToConstProperty result = (obj.*property_)();
- return MatchPrintAndExplain(result, matcher_, listener);
- }
-
- bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
- MatchResultListener* listener) const {
- if (p == NULL)
- return false;
-
- *listener << "which points to an object ";
- // Since *p has a property method, it must be a class/struct/union
- // type and thus cannot be a pointer. Therefore we pass
- // false_type() as the first argument.
- return MatchAndExplainImpl(false_type(), *p, listener);
- }
-
- PropertyType (Class::*property_)() const;
- const Matcher<RefToConstProperty> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PropertyMatcher);
-};
-
-// Type traits specifying various features of different functors for ResultOf.
-// The default template specifies features for functor objects.
-// Functor classes have to typedef argument_type and result_type
-// to be compatible with ResultOf.
-template <typename Functor>
-struct CallableTraits {
- typedef typename Functor::result_type ResultType;
- typedef Functor StorageType;
-
- static void CheckIsValid(Functor /* functor */) {}
- template <typename T>
- static ResultType Invoke(Functor f, T arg) { return f(arg); }
-};
-
-// Specialization for function pointers.
-template <typename ArgType, typename ResType>
-struct CallableTraits<ResType(*)(ArgType)> {
- typedef ResType ResultType;
- typedef ResType(*StorageType)(ArgType);
-
- static void CheckIsValid(ResType(*f)(ArgType)) {
- GTEST_CHECK_(f != NULL)
- << "NULL function pointer is passed into ResultOf().";
- }
- template <typename T>
- static ResType Invoke(ResType(*f)(ArgType), T arg) {
- return (*f)(arg);
- }
-};
-
-// Implements the ResultOf() matcher for matching a return value of a
-// unary function of an object.
-template <typename Callable>
-class ResultOfMatcher {
- public:
- typedef typename CallableTraits<Callable>::ResultType ResultType;
-
- ResultOfMatcher(Callable callable, const Matcher<ResultType>& matcher)
- : callable_(callable), matcher_(matcher) {
- CallableTraits<Callable>::CheckIsValid(callable_);
- }
-
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new Impl<T>(callable_, matcher_));
- }
-
- private:
- typedef typename CallableTraits<Callable>::StorageType CallableStorageType;
-
- template <typename T>
- class Impl : public MatcherInterface<T> {
- public:
- Impl(CallableStorageType callable, const Matcher<ResultType>& matcher)
- : callable_(callable), matcher_(matcher) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "is mapped by the given callable to a value that ";
- matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "is mapped by the given callable to a value that ";
- matcher_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(T obj, MatchResultListener* listener) const {
- *listener << "which is mapped by the given callable to ";
- // Cannot pass the return value (for example, int) to
- // MatchPrintAndExplain, which takes a non-const reference as argument.
- ResultType result =
- CallableTraits<Callable>::template Invoke<T>(callable_, obj);
- return MatchPrintAndExplain(result, matcher_, listener);
- }
-
- private:
- // Functors often define operator() as non-const method even though
- // they are actualy stateless. But we need to use them even when
- // 'this' is a const pointer. It's the user's responsibility not to
- // use stateful callables with ResultOf(), which does't guarantee
- // how many times the callable will be invoked.
- mutable CallableStorageType callable_;
- const Matcher<ResultType> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- }; // class Impl
-
- const CallableStorageType callable_;
- const Matcher<ResultType> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ResultOfMatcher);
-};
-
-// Implements an equality matcher for any STL-style container whose elements
-// support ==. This matcher is like Eq(), but its failure explanations provide
-// more detailed information that is useful when the container is used as a set.
-// The failure message reports elements that are in one of the operands but not
-// the other. The failure messages do not report duplicate or out-of-order
-// elements in the containers (which don't properly matter to sets, but can
-// occur if the containers are vectors or lists, for example).
-//
-// Uses the container's const_iterator, value_type, operator ==,
-// begin(), and end().
-template <typename Container>
-class ContainerEqMatcher {
- public:
- typedef internal::StlContainerView<Container> View;
- typedef typename View::type StlContainer;
- typedef typename View::const_reference StlContainerReference;
-
- // We make a copy of rhs in case the elements in it are modified
- // after this matcher is created.
- explicit ContainerEqMatcher(const Container& rhs) : rhs_(View::Copy(rhs)) {
- // Makes sure the user doesn't instantiate this class template
- // with a const or reference type.
- (void)testing::StaticAssertTypeEq<Container,
- GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>();
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "equals ";
- UniversalPrint(rhs_, os);
- }
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "does not equal ";
- UniversalPrint(rhs_, os);
- }
-
- template <typename LhsContainer>
- bool MatchAndExplain(const LhsContainer& lhs,
- MatchResultListener* listener) const {
- // GTEST_REMOVE_CONST_() is needed to work around an MSVC 8.0 bug
- // that causes LhsContainer to be a const type sometimes.
- typedef internal::StlContainerView<GTEST_REMOVE_CONST_(LhsContainer)>
- LhsView;
- typedef typename LhsView::type LhsStlContainer;
- StlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
- if (lhs_stl_container == rhs_)
- return true;
-
- ::std::ostream* const os = listener->stream();
- if (os != NULL) {
- // Something is different. Check for extra values first.
- bool printed_header = false;
- for (typename LhsStlContainer::const_iterator it =
- lhs_stl_container.begin();
- it != lhs_stl_container.end(); ++it) {
- if (internal::ArrayAwareFind(rhs_.begin(), rhs_.end(), *it) ==
- rhs_.end()) {
- if (printed_header) {
- *os << ", ";
- } else {
- *os << "which has these unexpected elements: ";
- printed_header = true;
- }
- UniversalPrint(*it, os);
- }
- }
-
- // Now check for missing values.
- bool printed_header2 = false;
- for (typename StlContainer::const_iterator it = rhs_.begin();
- it != rhs_.end(); ++it) {
- if (internal::ArrayAwareFind(
- lhs_stl_container.begin(), lhs_stl_container.end(), *it) ==
- lhs_stl_container.end()) {
- if (printed_header2) {
- *os << ", ";
- } else {
- *os << (printed_header ? ",\nand" : "which")
- << " doesn't have these expected elements: ";
- printed_header2 = true;
- }
- UniversalPrint(*it, os);
- }
- }
- }
-
- return false;
- }
-
- private:
- const StlContainer rhs_;
-
- GTEST_DISALLOW_ASSIGN_(ContainerEqMatcher);
-};
-
-// Implements Pointwise(tuple_matcher, rhs_container). tuple_matcher
-// must be able to be safely cast to Matcher<tuple<const T1&, const
-// T2&> >, where T1 and T2 are the types of elements in the LHS
-// container and the RHS container respectively.
-template <typename TupleMatcher, typename RhsContainer>
-class PointwiseMatcher {
- public:
- typedef internal::StlContainerView<RhsContainer> RhsView;
- typedef typename RhsView::type RhsStlContainer;
- typedef typename RhsStlContainer::value_type RhsValue;
-
- // Like ContainerEq, we make a copy of rhs in case the elements in
- // it are modified after this matcher is created.
- PointwiseMatcher(const TupleMatcher& tuple_matcher, const RhsContainer& rhs)
- : tuple_matcher_(tuple_matcher), rhs_(RhsView::Copy(rhs)) {
- // Makes sure the user doesn't instantiate this class template
- // with a const or reference type.
- (void)testing::StaticAssertTypeEq<RhsContainer,
- GTEST_REMOVE_REFERENCE_AND_CONST_(RhsContainer)>();
- }
-
- template <typename LhsContainer>
- operator Matcher<LhsContainer>() const {
- return MakeMatcher(new Impl<LhsContainer>(tuple_matcher_, rhs_));
- }
-
- template <typename LhsContainer>
- class Impl : public MatcherInterface<LhsContainer> {
- public:
- typedef internal::StlContainerView<
- GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView;
- typedef typename LhsView::type LhsStlContainer;
- typedef typename LhsView::const_reference LhsStlContainerReference;
- typedef typename LhsStlContainer::value_type LhsValue;
- // We pass the LHS value and the RHS value to the inner matcher by
- // reference, as they may be expensive to copy. We must use tuple
- // instead of pair here, as a pair cannot hold references (C++ 98,
- // 20.2.2 [lib.pairs]).
- typedef std::tr1::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
-
- Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)
- // mono_tuple_matcher_ holds a monomorphic version of the tuple matcher.
- : mono_tuple_matcher_(SafeMatcherCast<InnerMatcherArg>(tuple_matcher)),
- rhs_(rhs) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "contains " << rhs_.size()
- << " values, where each value and its corresponding value in ";
- UniversalPrinter<RhsStlContainer>::Print(rhs_, os);
- *os << " ";
- mono_tuple_matcher_.DescribeTo(os);
- }
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't contain exactly " << rhs_.size()
- << " values, or contains a value x at some index i"
- << " where x and the i-th value of ";
- UniversalPrint(rhs_, os);
- *os << " ";
- mono_tuple_matcher_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(LhsContainer lhs,
- MatchResultListener* listener) const {
- LhsStlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
- const size_t actual_size = lhs_stl_container.size();
- if (actual_size != rhs_.size()) {
- *listener << "which contains " << actual_size << " values";
- return false;
- }
-
- typename LhsStlContainer::const_iterator left = lhs_stl_container.begin();
- typename RhsStlContainer::const_iterator right = rhs_.begin();
- for (size_t i = 0; i != actual_size; ++i, ++left, ++right) {
- const InnerMatcherArg value_pair(*left, *right);
-
- if (listener->IsInterested()) {
- StringMatchResultListener inner_listener;
- if (!mono_tuple_matcher_.MatchAndExplain(
- value_pair, &inner_listener)) {
- *listener << "where the value pair (";
- UniversalPrint(*left, listener->stream());
- *listener << ", ";
- UniversalPrint(*right, listener->stream());
- *listener << ") at index #" << i << " don't match";
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return false;
- }
- } else {
- if (!mono_tuple_matcher_.Matches(value_pair))
- return false;
- }
- }
-
- return true;
- }
-
- private:
- const Matcher<InnerMatcherArg> mono_tuple_matcher_;
- const RhsStlContainer rhs_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- private:
- const TupleMatcher tuple_matcher_;
- const RhsStlContainer rhs_;
-
- GTEST_DISALLOW_ASSIGN_(PointwiseMatcher);
-};
-
-// Holds the logic common to ContainsMatcherImpl and EachMatcherImpl.
-template <typename Container>
-class QuantifierMatcherImpl : public MatcherInterface<Container> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef StlContainerView<RawContainer> View;
- typedef typename View::type StlContainer;
- typedef typename View::const_reference StlContainerReference;
- typedef typename StlContainer::value_type Element;
-
- template <typename InnerMatcher>
- explicit QuantifierMatcherImpl(InnerMatcher inner_matcher)
- : inner_matcher_(
- testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
-
- // Checks whether:
- // * All elements in the container match, if all_elements_should_match.
- // * Any element in the container matches, if !all_elements_should_match.
- bool MatchAndExplainImpl(bool all_elements_should_match,
- Container container,
- MatchResultListener* listener) const {
- StlContainerReference stl_container = View::ConstReference(container);
- size_t i = 0;
- for (typename StlContainer::const_iterator it = stl_container.begin();
- it != stl_container.end(); ++it, ++i) {
- StringMatchResultListener inner_listener;
- const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
-
- if (matches != all_elements_should_match) {
- *listener << "whose element #" << i
- << (matches ? " matches" : " doesn't match");
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return !all_elements_should_match;
- }
- }
- return all_elements_should_match;
- }
-
- protected:
- const Matcher<const Element&> inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(QuantifierMatcherImpl);
-};
-
-// Implements Contains(element_matcher) for the given argument type Container.
-// Symmetric to EachMatcherImpl.
-template <typename Container>
-class ContainsMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
- template <typename InnerMatcher>
- explicit ContainsMatcherImpl(InnerMatcher inner_matcher)
- : QuantifierMatcherImpl<Container>(inner_matcher) {}
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "contains at least one element that ";
- this->inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't contain any element that ";
- this->inner_matcher_.DescribeTo(os);
- }
-
- virtual bool MatchAndExplain(Container container,
- MatchResultListener* listener) const {
- return this->MatchAndExplainImpl(false, container, listener);
- }
-
- private:
- GTEST_DISALLOW_ASSIGN_(ContainsMatcherImpl);
-};
-
-// Implements Each(element_matcher) for the given argument type Container.
-// Symmetric to ContainsMatcherImpl.
-template <typename Container>
-class EachMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
- template <typename InnerMatcher>
- explicit EachMatcherImpl(InnerMatcher inner_matcher)
- : QuantifierMatcherImpl<Container>(inner_matcher) {}
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "only contains elements that ";
- this->inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "contains some element that ";
- this->inner_matcher_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(Container container,
- MatchResultListener* listener) const {
- return this->MatchAndExplainImpl(true, container, listener);
- }
-
- private:
- GTEST_DISALLOW_ASSIGN_(EachMatcherImpl);
-};
-
-// Implements polymorphic Contains(element_matcher).
-template <typename M>
-class ContainsMatcher {
- public:
- explicit ContainsMatcher(M m) : inner_matcher_(m) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- return MakeMatcher(new ContainsMatcherImpl<Container>(inner_matcher_));
- }
-
- private:
- const M inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ContainsMatcher);
-};
-
-// Implements polymorphic Each(element_matcher).
-template <typename M>
-class EachMatcher {
- public:
- explicit EachMatcher(M m) : inner_matcher_(m) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- return MakeMatcher(new EachMatcherImpl<Container>(inner_matcher_));
- }
-
- private:
- const M inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(EachMatcher);
-};
-
-// Implements Key(inner_matcher) for the given argument pair type.
-// Key(inner_matcher) matches an std::pair whose 'first' field matches
-// inner_matcher. For example, Contains(Key(Ge(5))) can be used to match an
-// std::map that contains at least one element whose key is >= 5.
-template <typename PairType>
-class KeyMatcherImpl : public MatcherInterface<PairType> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;
- typedef typename RawPairType::first_type KeyType;
-
- template <typename InnerMatcher>
- explicit KeyMatcherImpl(InnerMatcher inner_matcher)
- : inner_matcher_(
- testing::SafeMatcherCast<const KeyType&>(inner_matcher)) {
- }
-
- // Returns true iff 'key_value.first' (the key) matches the inner matcher.
- virtual bool MatchAndExplain(PairType key_value,
- MatchResultListener* listener) const {
- StringMatchResultListener inner_listener;
- const bool match = inner_matcher_.MatchAndExplain(key_value.first,
- &inner_listener);
- const internal::string explanation = inner_listener.str();
- if (explanation != "") {
- *listener << "whose first field is a value " << explanation;
- }
- return match;
- }
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "has a key that ";
- inner_matcher_.DescribeTo(os);
- }
-
- // Describes what the negation of this matcher does.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't have a key that ";
- inner_matcher_.DescribeTo(os);
- }
-
- private:
- const Matcher<const KeyType&> inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(KeyMatcherImpl);
-};
-
-// Implements polymorphic Key(matcher_for_key).
-template <typename M>
-class KeyMatcher {
- public:
- explicit KeyMatcher(M m) : matcher_for_key_(m) {}
-
- template <typename PairType>
- operator Matcher<PairType>() const {
- return MakeMatcher(new KeyMatcherImpl<PairType>(matcher_for_key_));
- }
-
- private:
- const M matcher_for_key_;
-
- GTEST_DISALLOW_ASSIGN_(KeyMatcher);
-};
-
-// Implements Pair(first_matcher, second_matcher) for the given argument pair
-// type with its two matchers. See Pair() function below.
-template <typename PairType>
-class PairMatcherImpl : public MatcherInterface<PairType> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;
- typedef typename RawPairType::first_type FirstType;
- typedef typename RawPairType::second_type SecondType;
-
- template <typename FirstMatcher, typename SecondMatcher>
- PairMatcherImpl(FirstMatcher first_matcher, SecondMatcher second_matcher)
- : first_matcher_(
- testing::SafeMatcherCast<const FirstType&>(first_matcher)),
- second_matcher_(
- testing::SafeMatcherCast<const SecondType&>(second_matcher)) {
- }
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "has a first field that ";
- first_matcher_.DescribeTo(os);
- *os << ", and has a second field that ";
- second_matcher_.DescribeTo(os);
- }
-
- // Describes what the negation of this matcher does.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "has a first field that ";
- first_matcher_.DescribeNegationTo(os);
- *os << ", or has a second field that ";
- second_matcher_.DescribeNegationTo(os);
- }
-
- // Returns true iff 'a_pair.first' matches first_matcher and 'a_pair.second'
- // matches second_matcher.
- virtual bool MatchAndExplain(PairType a_pair,
- MatchResultListener* listener) const {
- if (!listener->IsInterested()) {
- // If the listener is not interested, we don't need to construct the
- // explanation.
- return first_matcher_.Matches(a_pair.first) &&
- second_matcher_.Matches(a_pair.second);
- }
- StringMatchResultListener first_inner_listener;
- if (!first_matcher_.MatchAndExplain(a_pair.first,
- &first_inner_listener)) {
- *listener << "whose first field does not match";
- PrintIfNotEmpty(first_inner_listener.str(), listener->stream());
- return false;
- }
- StringMatchResultListener second_inner_listener;
- if (!second_matcher_.MatchAndExplain(a_pair.second,
- &second_inner_listener)) {
- *listener << "whose second field does not match";
- PrintIfNotEmpty(second_inner_listener.str(), listener->stream());
- return false;
- }
- ExplainSuccess(first_inner_listener.str(), second_inner_listener.str(),
- listener);
- return true;
- }
-
- private:
- void ExplainSuccess(const internal::string& first_explanation,
- const internal::string& second_explanation,
- MatchResultListener* listener) const {
- *listener << "whose both fields match";
- if (first_explanation != "") {
- *listener << ", where the first field is a value " << first_explanation;
- }
- if (second_explanation != "") {
- *listener << ", ";
- if (first_explanation != "") {
- *listener << "and ";
- } else {
- *listener << "where ";
- }
- *listener << "the second field is a value " << second_explanation;
- }
- }
-
- const Matcher<const FirstType&> first_matcher_;
- const Matcher<const SecondType&> second_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PairMatcherImpl);
-};
-
-// Implements polymorphic Pair(first_matcher, second_matcher).
-template <typename FirstMatcher, typename SecondMatcher>
-class PairMatcher {
- public:
- PairMatcher(FirstMatcher first_matcher, SecondMatcher second_matcher)
- : first_matcher_(first_matcher), second_matcher_(second_matcher) {}
-
- template <typename PairType>
- operator Matcher<PairType> () const {
- return MakeMatcher(
- new PairMatcherImpl<PairType>(
- first_matcher_, second_matcher_));
- }
-
- private:
- const FirstMatcher first_matcher_;
- const SecondMatcher second_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PairMatcher);
-};
-
-// Implements ElementsAre() and ElementsAreArray().
-template <typename Container>
-class ElementsAreMatcherImpl : public MatcherInterface<Container> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef internal::StlContainerView<RawContainer> View;
- typedef typename View::type StlContainer;
- typedef typename View::const_reference StlContainerReference;
- typedef typename StlContainer::value_type Element;
-
- // Constructs the matcher from a sequence of element values or
- // element matchers.
- template <typename InputIter>
- ElementsAreMatcherImpl(InputIter first, size_t a_count) {
- matchers_.reserve(a_count);
- InputIter it = first;
- for (size_t i = 0; i != a_count; ++i, ++it) {
- matchers_.push_back(MatcherCast<const Element&>(*it));
- }
- }
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- if (count() == 0) {
- *os << "is empty";
- } else if (count() == 1) {
- *os << "has 1 element that ";
- matchers_[0].DescribeTo(os);
- } else {
- *os << "has " << Elements(count()) << " where\n";
- for (size_t i = 0; i != count(); ++i) {
- *os << "element #" << i << " ";
- matchers_[i].DescribeTo(os);
- if (i + 1 < count()) {
- *os << ",\n";
- }
- }
- }
- }
-
- // Describes what the negation of this matcher does.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- if (count() == 0) {
- *os << "isn't empty";
- return;
- }
-
- *os << "doesn't have " << Elements(count()) << ", or\n";
- for (size_t i = 0; i != count(); ++i) {
- *os << "element #" << i << " ";
- matchers_[i].DescribeNegationTo(os);
- if (i + 1 < count()) {
- *os << ", or\n";
- }
- }
- }
-
- virtual bool MatchAndExplain(Container container,
- MatchResultListener* listener) const {
- StlContainerReference stl_container = View::ConstReference(container);
- const size_t actual_count = stl_container.size();
- if (actual_count != count()) {
- // The element count doesn't match. If the container is empty,
- // there's no need to explain anything as Google Mock already
- // prints the empty container. Otherwise we just need to show
- // how many elements there actually are.
- if (actual_count != 0) {
- *listener << "which has " << Elements(actual_count);
- }
- return false;
- }
-
- typename StlContainer::const_iterator it = stl_container.begin();
- // explanations[i] is the explanation of the element at index i.
- std::vector<internal::string> explanations(count());
- for (size_t i = 0; i != count(); ++it, ++i) {
- StringMatchResultListener s;
- if (matchers_[i].MatchAndExplain(*it, &s)) {
- explanations[i] = s.str();
- } else {
- // The container has the right size but the i-th element
- // doesn't match its expectation.
- *listener << "whose element #" << i << " doesn't match";
- PrintIfNotEmpty(s.str(), listener->stream());
- return false;
- }
- }
-
- // Every element matches its expectation. We need to explain why
- // (the obvious ones can be skipped).
- bool reason_printed = false;
- for (size_t i = 0; i != count(); ++i) {
- const internal::string& s = explanations[i];
- if (!s.empty()) {
- if (reason_printed) {
- *listener << ",\nand ";
- }
- *listener << "whose element #" << i << " matches, " << s;
- reason_printed = true;
- }
- }
-
- return true;
- }
-
- private:
- static Message Elements(size_t count) {
- return Message() << count << (count == 1 ? " element" : " elements");
- }
-
- size_t count() const { return matchers_.size(); }
- std::vector<Matcher<const Element&> > matchers_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcherImpl);
-};
-
-// Implements ElementsAre() of 0 arguments.
-class ElementsAreMatcher0 {
- public:
- ElementsAreMatcher0() {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&>* const matchers = NULL;
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 0));
- }
-};
-
-// Implements ElementsAreArray().
-template <typename T>
-class ElementsAreArrayMatcher {
- public:
- ElementsAreArrayMatcher(const T* first, size_t count) :
- first_(first), count_(count) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(first_, count_));
- }
-
- private:
- const T* const first_;
- const size_t count_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreArrayMatcher);
-};
-
-// Returns the description for a matcher defined using the MATCHER*()
-// macro where the user-supplied description string is "", if
-// 'negation' is false; otherwise returns the description of the
-// negation of the matcher. 'param_values' contains a list of strings
-// that are the print-out of the matcher's parameters.
-string FormatMatcherDescription(bool negation, const char* matcher_name,
- const Strings& param_values);
-
-} // namespace internal
-
-// Implements MatcherCast().
-template <typename T, typename M>
-inline Matcher<T> MatcherCast(M matcher) {
- return internal::MatcherCastImpl<T, M>::Cast(matcher);
-}
-
-// _ is a matcher that matches anything of any type.
-//
-// This definition is fine as:
-//
-// 1. The C++ standard permits using the name _ in a namespace that
-// is not the global namespace or ::std.
-// 2. The AnythingMatcher class has no data member or constructor,
-// so it's OK to create global variables of this type.
-// 3. c-style has approved of using _ in this case.
-const internal::AnythingMatcher _ = {};
-// Creates a matcher that matches any value of the given type T.
-template <typename T>
-inline Matcher<T> A() { return MakeMatcher(new internal::AnyMatcherImpl<T>()); }
-
-// Creates a matcher that matches any value of the given type T.
-template <typename T>
-inline Matcher<T> An() { return A<T>(); }
-
-// Creates a polymorphic matcher that matches anything equal to x.
-// Note: if the parameter of Eq() were declared as const T&, Eq("foo")
-// wouldn't compile.
-template <typename T>
-inline internal::EqMatcher<T> Eq(T x) { return internal::EqMatcher<T>(x); }
-
-// Constructs a Matcher<T> from a 'value' of type T. The constructed
-// matcher matches any value that's equal to 'value'.
-template <typename T>
-Matcher<T>::Matcher(T value) { *this = Eq(value); }
-
-// Creates a monomorphic matcher that matches anything with type Lhs
-// and equal to rhs. A user may need to use this instead of Eq(...)
-// in order to resolve an overloading ambiguity.
-//
-// TypedEq<T>(x) is just a convenient short-hand for Matcher<T>(Eq(x))
-// or Matcher<T>(x), but more readable than the latter.
-//
-// We could define similar monomorphic matchers for other comparison
-// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do
-// it yet as those are used much less than Eq() in practice. A user
-// can always write Matcher<T>(Lt(5)) to be explicit about the type,
-// for example.
-template <typename Lhs, typename Rhs>
-inline Matcher<Lhs> TypedEq(const Rhs& rhs) { return Eq(rhs); }
-
-// Creates a polymorphic matcher that matches anything >= x.
-template <typename Rhs>
-inline internal::GeMatcher<Rhs> Ge(Rhs x) {
- return internal::GeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything > x.
-template <typename Rhs>
-inline internal::GtMatcher<Rhs> Gt(Rhs x) {
- return internal::GtMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything <= x.
-template <typename Rhs>
-inline internal::LeMatcher<Rhs> Le(Rhs x) {
- return internal::LeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything < x.
-template <typename Rhs>
-inline internal::LtMatcher<Rhs> Lt(Rhs x) {
- return internal::LtMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything != x.
-template <typename Rhs>
-inline internal::NeMatcher<Rhs> Ne(Rhs x) {
- return internal::NeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches any NULL pointer.
-inline PolymorphicMatcher<internal::IsNullMatcher > IsNull() {
- return MakePolymorphicMatcher(internal::IsNullMatcher());
-}
-
-// Creates a polymorphic matcher that matches any non-NULL pointer.
-// This is convenient as Not(NULL) doesn't compile (the compiler
-// thinks that that expression is comparing a pointer with an integer).
-inline PolymorphicMatcher<internal::NotNullMatcher > NotNull() {
- return MakePolymorphicMatcher(internal::NotNullMatcher());
-}
-
-// Creates a polymorphic matcher that matches any argument that
-// references variable x.
-template <typename T>
-inline internal::RefMatcher<T&> Ref(T& x) { // NOLINT
- return internal::RefMatcher<T&>(x);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, where two NANs are considered unequal.
-inline internal::FloatingEqMatcher<double> DoubleEq(double rhs) {
- return internal::FloatingEqMatcher<double>(rhs, false);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, including NaN values when rhs is NaN.
-inline internal::FloatingEqMatcher<double> NanSensitiveDoubleEq(double rhs) {
- return internal::FloatingEqMatcher<double>(rhs, true);
-}
-
-// Creates a matcher that matches any float argument approximately
-// equal to rhs, where two NANs are considered unequal.
-inline internal::FloatingEqMatcher<float> FloatEq(float rhs) {
- return internal::FloatingEqMatcher<float>(rhs, false);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, including NaN values when rhs is NaN.
-inline internal::FloatingEqMatcher<float> NanSensitiveFloatEq(float rhs) {
- return internal::FloatingEqMatcher<float>(rhs, true);
-}
-
-// Creates a matcher that matches a pointer (raw or smart) that points
-// to a value that matches inner_matcher.
-template <typename InnerMatcher>
-inline internal::PointeeMatcher<InnerMatcher> Pointee(
- const InnerMatcher& inner_matcher) {
- return internal::PointeeMatcher<InnerMatcher>(inner_matcher);
-}
-
-// Creates a matcher that matches an object whose given field matches
-// 'matcher'. For example,
-// Field(&Foo::number, Ge(5))
-// matches a Foo object x iff x.number >= 5.
-template <typename Class, typename FieldType, typename FieldMatcher>
-inline PolymorphicMatcher<
- internal::FieldMatcher<Class, FieldType> > Field(
- FieldType Class::*field, const FieldMatcher& matcher) {
- return MakePolymorphicMatcher(
- internal::FieldMatcher<Class, FieldType>(
- field, MatcherCast<const FieldType&>(matcher)));
- // The call to MatcherCast() is required for supporting inner
- // matchers of compatible types. For example, it allows
- // Field(&Foo::bar, m)
- // to compile where bar is an int32 and m is a matcher for int64.
-}
-
-// Creates a matcher that matches an object whose given property
-// matches 'matcher'. For example,
-// Property(&Foo::str, StartsWith("hi"))
-// matches a Foo object x iff x.str() starts with "hi".
-template <typename Class, typename PropertyType, typename PropertyMatcher>
-inline PolymorphicMatcher<
- internal::PropertyMatcher<Class, PropertyType> > Property(
- PropertyType (Class::*property)() const, const PropertyMatcher& matcher) {
- return MakePolymorphicMatcher(
- internal::PropertyMatcher<Class, PropertyType>(
- property,
- MatcherCast<GTEST_REFERENCE_TO_CONST_(PropertyType)>(matcher)));
- // The call to MatcherCast() is required for supporting inner
- // matchers of compatible types. For example, it allows
- // Property(&Foo::bar, m)
- // to compile where bar() returns an int32 and m is a matcher for int64.
-}
-
-// Creates a matcher that matches an object iff the result of applying
-// a callable to x matches 'matcher'.
-// For example,
-// ResultOf(f, StartsWith("hi"))
-// matches a Foo object x iff f(x) starts with "hi".
-// callable parameter can be a function, function pointer, or a functor.
-// Callable has to satisfy the following conditions:
-// * It is required to keep no state affecting the results of
-// the calls on it and make no assumptions about how many calls
-// will be made. Any state it keeps must be protected from the
-// concurrent access.
-// * If it is a function object, it has to define type result_type.
-// We recommend deriving your functor classes from std::unary_function.
-template <typename Callable, typename ResultOfMatcher>
-internal::ResultOfMatcher<Callable> ResultOf(
- Callable callable, const ResultOfMatcher& matcher) {
- return internal::ResultOfMatcher<Callable>(
- callable,
- MatcherCast<typename internal::CallableTraits<Callable>::ResultType>(
- matcher));
- // The call to MatcherCast() is required for supporting inner
- // matchers of compatible types. For example, it allows
- // ResultOf(Function, m)
- // to compile where Function() returns an int32 and m is a matcher for int64.
-}
-
-// String matchers.
-
-// Matches a string equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrEq(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, true, true));
-}
-
-// Matches a string not equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrNe(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, false, true));
-}
-
-// Matches a string equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrCaseEq(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, true, false));
-}
-
-// Matches a string not equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrCaseNe(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, false, false));
-}
-
-// Creates a matcher that matches any string, std::string, or C string
-// that contains the given substring.
-inline PolymorphicMatcher<internal::HasSubstrMatcher<internal::string> >
- HasSubstr(const internal::string& substring) {
- return MakePolymorphicMatcher(internal::HasSubstrMatcher<internal::string>(
- substring));
-}
-
-// Matches a string that starts with 'prefix' (case-sensitive).
-inline PolymorphicMatcher<internal::StartsWithMatcher<internal::string> >
- StartsWith(const internal::string& prefix) {
- return MakePolymorphicMatcher(internal::StartsWithMatcher<internal::string>(
- prefix));
-}
-
-// Matches a string that ends with 'suffix' (case-sensitive).
-inline PolymorphicMatcher<internal::EndsWithMatcher<internal::string> >
- EndsWith(const internal::string& suffix) {
- return MakePolymorphicMatcher(internal::EndsWithMatcher<internal::string>(
- suffix));
-}
-
-// Matches a string that fully matches regular expression 'regex'.
-// The matcher takes ownership of 'regex'.
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
- const internal::RE* regex) {
- return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true));
-}
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
- const internal::string& regex) {
- return MatchesRegex(new internal::RE(regex));
-}
-
-// Matches a string that contains regular expression 'regex'.
-// The matcher takes ownership of 'regex'.
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
- const internal::RE* regex) {
- return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false));
-}
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
- const internal::string& regex) {
- return ContainsRegex(new internal::RE(regex));
-}
-
-#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
-// Wide string matchers.
-
-// Matches a string equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrEq(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, true, true));
-}
-
-// Matches a string not equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrNe(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, false, true));
-}
-
-// Matches a string equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrCaseEq(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, true, false));
-}
-
-// Matches a string not equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrCaseNe(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, false, false));
-}
-
-// Creates a matcher that matches any wstring, std::wstring, or C wide string
-// that contains the given substring.
-inline PolymorphicMatcher<internal::HasSubstrMatcher<internal::wstring> >
- HasSubstr(const internal::wstring& substring) {
- return MakePolymorphicMatcher(internal::HasSubstrMatcher<internal::wstring>(
- substring));
-}
-
-// Matches a string that starts with 'prefix' (case-sensitive).
-inline PolymorphicMatcher<internal::StartsWithMatcher<internal::wstring> >
- StartsWith(const internal::wstring& prefix) {
- return MakePolymorphicMatcher(internal::StartsWithMatcher<internal::wstring>(
- prefix));
-}
-
-// Matches a string that ends with 'suffix' (case-sensitive).
-inline PolymorphicMatcher<internal::EndsWithMatcher<internal::wstring> >
- EndsWith(const internal::wstring& suffix) {
- return MakePolymorphicMatcher(internal::EndsWithMatcher<internal::wstring>(
- suffix));
-}
-
-#endif // GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field == the second field.
-inline internal::Eq2Matcher Eq() { return internal::Eq2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field >= the second field.
-inline internal::Ge2Matcher Ge() { return internal::Ge2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field > the second field.
-inline internal::Gt2Matcher Gt() { return internal::Gt2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field <= the second field.
-inline internal::Le2Matcher Le() { return internal::Le2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field < the second field.
-inline internal::Lt2Matcher Lt() { return internal::Lt2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field != the second field.
-inline internal::Ne2Matcher Ne() { return internal::Ne2Matcher(); }
-
-// Creates a matcher that matches any value of type T that m doesn't
-// match.
-template <typename InnerMatcher>
-inline internal::NotMatcher<InnerMatcher> Not(InnerMatcher m) {
- return internal::NotMatcher<InnerMatcher>(m);
-}
-
-// Returns a matcher that matches anything that satisfies the given
-// predicate. The predicate can be any unary function or functor
-// whose return type can be implicitly converted to bool.
-template <typename Predicate>
-inline PolymorphicMatcher<internal::TrulyMatcher<Predicate> >
-Truly(Predicate pred) {
- return MakePolymorphicMatcher(internal::TrulyMatcher<Predicate>(pred));
-}
-
-// Returns a matcher that matches an equal container.
-// This matcher behaves like Eq(), but in the event of mismatch lists the
-// values that are included in one container but not the other. (Duplicate
-// values and order differences are not explained.)
-template <typename Container>
-inline PolymorphicMatcher<internal::ContainerEqMatcher< // NOLINT
- GTEST_REMOVE_CONST_(Container)> >
- ContainerEq(const Container& rhs) {
- // This following line is for working around a bug in MSVC 8.0,
- // which causes Container to be a const type sometimes.
- typedef GTEST_REMOVE_CONST_(Container) RawContainer;
- return MakePolymorphicMatcher(
- internal::ContainerEqMatcher<RawContainer>(rhs));
-}
-
-// Matches an STL-style container or a native array that contains the
-// same number of elements as in rhs, where its i-th element and rhs's
-// i-th element (as a pair) satisfy the given pair matcher, for all i.
-// TupleMatcher must be able to be safely cast to Matcher<tuple<const
-// T1&, const T2&> >, where T1 and T2 are the types of elements in the
-// LHS container and the RHS container respectively.
-template <typename TupleMatcher, typename Container>
-inline internal::PointwiseMatcher<TupleMatcher,
- GTEST_REMOVE_CONST_(Container)>
-Pointwise(const TupleMatcher& tuple_matcher, const Container& rhs) {
- // This following line is for working around a bug in MSVC 8.0,
- // which causes Container to be a const type sometimes.
- typedef GTEST_REMOVE_CONST_(Container) RawContainer;
- return internal::PointwiseMatcher<TupleMatcher, RawContainer>(
- tuple_matcher, rhs);
-}
-
-// Matches an STL-style container or a native array that contains at
-// least one element matching the given value or matcher.
-//
-// Examples:
-// ::std::set<int> page_ids;
-// page_ids.insert(3);
-// page_ids.insert(1);
-// EXPECT_THAT(page_ids, Contains(1));
-// EXPECT_THAT(page_ids, Contains(Gt(2)));
-// EXPECT_THAT(page_ids, Not(Contains(4)));
-//
-// ::std::map<int, size_t> page_lengths;
-// page_lengths[1] = 100;
-// EXPECT_THAT(page_lengths,
-// Contains(::std::pair<const int, size_t>(1, 100)));
-//
-// const char* user_ids[] = { "joe", "mike", "tom" };
-// EXPECT_THAT(user_ids, Contains(Eq(::std::string("tom"))));
-template <typename M>
-inline internal::ContainsMatcher<M> Contains(M matcher) {
- return internal::ContainsMatcher<M>(matcher);
-}
-
-// Matches an STL-style container or a native array that contains only
-// elements matching the given value or matcher.
-//
-// Each(m) is semantically equivalent to Not(Contains(Not(m))). Only
-// the messages are different.
-//
-// Examples:
-// ::std::set<int> page_ids;
-// // Each(m) matches an empty container, regardless of what m is.
-// EXPECT_THAT(page_ids, Each(Eq(1)));
-// EXPECT_THAT(page_ids, Each(Eq(77)));
-//
-// page_ids.insert(3);
-// EXPECT_THAT(page_ids, Each(Gt(0)));
-// EXPECT_THAT(page_ids, Not(Each(Gt(4))));
-// page_ids.insert(1);
-// EXPECT_THAT(page_ids, Not(Each(Lt(2))));
-//
-// ::std::map<int, size_t> page_lengths;
-// page_lengths[1] = 100;
-// page_lengths[2] = 200;
-// page_lengths[3] = 300;
-// EXPECT_THAT(page_lengths, Not(Each(Pair(1, 100))));
-// EXPECT_THAT(page_lengths, Each(Key(Le(3))));
-//
-// const char* user_ids[] = { "joe", "mike", "tom" };
-// EXPECT_THAT(user_ids, Not(Each(Eq(::std::string("tom")))));
-template <typename M>
-inline internal::EachMatcher<M> Each(M matcher) {
- return internal::EachMatcher<M>(matcher);
-}
-
-// Key(inner_matcher) matches an std::pair whose 'first' field matches
-// inner_matcher. For example, Contains(Key(Ge(5))) can be used to match an
-// std::map that contains at least one element whose key is >= 5.
-template <typename M>
-inline internal::KeyMatcher<M> Key(M inner_matcher) {
- return internal::KeyMatcher<M>(inner_matcher);
-}
-
-// Pair(first_matcher, second_matcher) matches a std::pair whose 'first' field
-// matches first_matcher and whose 'second' field matches second_matcher. For
-// example, EXPECT_THAT(map_type, ElementsAre(Pair(Ge(5), "foo"))) can be used
-// to match a std::map<int, string> that contains exactly one element whose key
-// is >= 5 and whose value equals "foo".
-template <typename FirstMatcher, typename SecondMatcher>
-inline internal::PairMatcher<FirstMatcher, SecondMatcher>
-Pair(FirstMatcher first_matcher, SecondMatcher second_matcher) {
- return internal::PairMatcher<FirstMatcher, SecondMatcher>(
- first_matcher, second_matcher);
-}
-
-// Returns a predicate that is satisfied by anything that matches the
-// given matcher.
-template <typename M>
-inline internal::MatcherAsPredicate<M> Matches(M matcher) {
- return internal::MatcherAsPredicate<M>(matcher);
-}
-
-// Returns true iff the value matches the matcher.
-template <typename T, typename M>
-inline bool Value(const T& value, M matcher) {
- return testing::Matches(matcher)(value);
-}
-
-// Matches the value against the given matcher and explains the match
-// result to listener.
-template <typename T, typename M>
-inline bool ExplainMatchResult(
- M matcher, const T& value, MatchResultListener* listener) {
- return SafeMatcherCast<const T&>(matcher).MatchAndExplain(value, listener);
-}
-
-// AllArgs(m) is a synonym of m. This is useful in
-//
-// EXPECT_CALL(foo, Bar(_, _)).With(AllArgs(Eq()));
-//
-// which is easier to read than
-//
-// EXPECT_CALL(foo, Bar(_, _)).With(Eq());
-template <typename InnerMatcher>
-inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; }
-
-// These macros allow using matchers to check values in Google Test
-// tests. ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher)
-// succeed iff the value matches the matcher. If the assertion fails,
-// the value and the description of the matcher will be printed.
-#define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\
- ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
-#define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\
- ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-
-namespace testing {
-
-// An abstract handle of an expectation.
-class Expectation;
-
-// A set of expectation handles.
-class ExpectationSet;
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// Implements a mock function.
-template <typename F> class FunctionMocker;
-
-// Base class for expectations.
-class ExpectationBase;
-
-// Implements an expectation.
-template <typename F> class TypedExpectation;
-
-// Helper class for testing the Expectation class template.
-class ExpectationTester;
-
-// Base class for function mockers.
-template <typename F> class FunctionMockerBase;
-
-// Protects the mock object registry (in class Mock), all function
-// mockers, and all expectations.
-//
-// The reason we don't use more fine-grained protection is: when a
-// mock function Foo() is called, it needs to consult its expectations
-// to see which one should be picked. If another thread is allowed to
-// call a mock function (either Foo() or a different one) at the same
-// time, it could affect the "retired" attributes of Foo()'s
-// expectations when InSequence() is used, and thus affect which
-// expectation gets picked. Therefore, we sequence all mock function
-// calls to ensure the integrity of the mock objects' states.
-GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex);
-
-// Untyped base class for ActionResultHolder<R>.
-class UntypedActionResultHolderBase;
-
-// Abstract base class of FunctionMockerBase. This is the
-// type-agnostic part of the function mocker interface. Its pure
-// virtual methods are implemented by FunctionMockerBase.
-class UntypedFunctionMockerBase {
- public:
- UntypedFunctionMockerBase();
- virtual ~UntypedFunctionMockerBase();
-
- // Verifies that all expectations on this mock function have been
- // satisfied. Reports one or more Google Test non-fatal failures
- // and returns false if not.
- // L >= g_gmock_mutex
- bool VerifyAndClearExpectationsLocked();
-
- // Clears the ON_CALL()s set on this mock function.
- // L >= g_gmock_mutex
- virtual void ClearDefaultActionsLocked() = 0;
-
- // In all of the following Untyped* functions, it's the caller's
- // responsibility to guarantee the correctness of the arguments'
- // types.
-
- // Performs the default action with the given arguments and returns
- // the action's result. The call description string will be used in
- // the error message to describe the call in the case the default
- // action fails.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformDefaultAction(
- const void* untyped_args,
- const string& call_description) const = 0;
-
- // Performs the given action with the given arguments and returns
- // the action's result.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformAction(
- const void* untyped_action,
- const void* untyped_args) const = 0;
-
- // Writes a message that the call is uninteresting (i.e. neither
- // explicitly expected nor explicitly unexpected) to the given
- // ostream.
- // L < g_gmock_mutex
- virtual void UntypedDescribeUninterestingCall(const void* untyped_args,
- ::std::ostream* os) const = 0;
-
- // Returns the expectation that matches the given function arguments
- // (or NULL is there's no match); when a match is found,
- // untyped_action is set to point to the action that should be
- // performed (or NULL if the action is "do default"), and
- // is_excessive is modified to indicate whether the call exceeds the
- // expected number.
- // L < g_gmock_mutex
- virtual const ExpectationBase* UntypedFindMatchingExpectation(
- const void* untyped_args,
- const void** untyped_action, bool* is_excessive,
- ::std::ostream* what, ::std::ostream* why) = 0;
-
- // Prints the given function arguments to the ostream.
- virtual void UntypedPrintArgs(const void* untyped_args,
- ::std::ostream* os) const = 0;
-
- // Sets the mock object this mock method belongs to, and registers
- // this information in the global mock registry. Will be called
- // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
- // method.
- // TODO(wan@google.com): rename to SetAndRegisterOwner().
- // L < g_gmock_mutex
- void RegisterOwner(const void* mock_obj);
-
- // Sets the mock object this mock method belongs to, and sets the
- // name of the mock function. Will be called upon each invocation
- // of this mock function.
- // L < g_gmock_mutex
- void SetOwnerAndName(const void* mock_obj, const char* name);
-
- // Returns the mock object this mock method belongs to. Must be
- // called after RegisterOwner() or SetOwnerAndName() has been
- // called.
- // L < g_gmock_mutex
- const void* MockObject() const;
-
- // Returns the name of this mock method. Must be called after
- // SetOwnerAndName() has been called.
- // L < g_gmock_mutex
- const char* Name() const;
-
- // Returns the result of invoking this mock function with the given
- // arguments. This function can be safely called from multiple
- // threads concurrently. The caller is responsible for deleting the
- // result.
- // L < g_gmock_mutex
- const UntypedActionResultHolderBase* UntypedInvokeWith(
- const void* untyped_args);
-
- protected:
- typedef std::vector<const void*> UntypedOnCallSpecs;
-
- typedef std::vector<internal::linked_ptr<ExpectationBase> >
- UntypedExpectations;
-
- // Returns an Expectation object that references and co-owns exp,
- // which must be an expectation on this mock function.
- Expectation GetHandleOf(ExpectationBase* exp);
-
- // Address of the mock object this mock method belongs to. Only
- // valid after this mock method has been called or
- // ON_CALL/EXPECT_CALL has been invoked on it.
- const void* mock_obj_; // Protected by g_gmock_mutex.
-
- // Name of the function being mocked. Only valid after this mock
- // method has been called.
- const char* name_; // Protected by g_gmock_mutex.
-
- // All default action specs for this function mocker.
- UntypedOnCallSpecs untyped_on_call_specs_;
-
- // All expectations for this function mocker.
- UntypedExpectations untyped_expectations_;
-}; // class UntypedFunctionMockerBase
-
-// Untyped base class for OnCallSpec<F>.
-class UntypedOnCallSpecBase {
- public:
- // The arguments are the location of the ON_CALL() statement.
- UntypedOnCallSpecBase(const char* a_file, int a_line)
- : file_(a_file), line_(a_line), last_clause_(kNone) {}
-
- // Where in the source file was the default action spec defined?
- const char* file() const { return file_; }
- int line() const { return line_; }
-
- protected:
- // Gives each clause in the ON_CALL() statement a name.
- enum Clause {
- // Do not change the order of the enum members! The run-time
- // syntax checking relies on it.
- kNone,
- kWith,
- kWillByDefault
- };
-
- // Asserts that the ON_CALL() statement has a certain property.
- void AssertSpecProperty(bool property, const string& failure_message) const {
- Assert(property, file_, line_, failure_message);
- }
-
- // Expects that the ON_CALL() statement has a certain property.
- void ExpectSpecProperty(bool property, const string& failure_message) const {
- Expect(property, file_, line_, failure_message);
- }
-
- const char* file_;
- int line_;
-
- // The last clause in the ON_CALL() statement as seen so far.
- // Initially kNone and changes as the statement is parsed.
- Clause last_clause_;
-}; // class UntypedOnCallSpecBase
-
-// This template class implements an ON_CALL spec.
-template <typename F>
-class OnCallSpec : public UntypedOnCallSpecBase {
- public:
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
-
- // Constructs an OnCallSpec object from the information inside
- // the parenthesis of an ON_CALL() statement.
- OnCallSpec(const char* a_file, int a_line,
- const ArgumentMatcherTuple& matchers)
- : UntypedOnCallSpecBase(a_file, a_line),
- matchers_(matchers),
- // By default, extra_matcher_ should match anything. However,
- // we cannot initialize it with _ as that triggers a compiler
- // bug in Symbian's C++ compiler (cannot decide between two
- // overloaded constructors of Matcher<const ArgumentTuple&>).
- extra_matcher_(A<const ArgumentTuple&>()) {
- }
-
- // Implements the .With() clause.
- OnCallSpec& With(const Matcher<const ArgumentTuple&>& m) {
- // Makes sure this is called at most once.
- ExpectSpecProperty(last_clause_ < kWith,
- ".With() cannot appear "
- "more than once in an ON_CALL().");
- last_clause_ = kWith;
-
- extra_matcher_ = m;
- return *this;
- }
-
- // Implements the .WillByDefault() clause.
- OnCallSpec& WillByDefault(const Action<F>& action) {
- ExpectSpecProperty(last_clause_ < kWillByDefault,
- ".WillByDefault() must appear "
- "exactly once in an ON_CALL().");
- last_clause_ = kWillByDefault;
-
- ExpectSpecProperty(!action.IsDoDefault(),
- "DoDefault() cannot be used in ON_CALL().");
- action_ = action;
- return *this;
- }
-
- // Returns true iff the given arguments match the matchers.
- bool Matches(const ArgumentTuple& args) const {
- return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
- }
-
- // Returns the action specified by the user.
- const Action<F>& GetAction() const {
- AssertSpecProperty(last_clause_ == kWillByDefault,
- ".WillByDefault() must appear exactly "
- "once in an ON_CALL().");
- return action_;
- }
-
- private:
- // The information in statement
- //
- // ON_CALL(mock_object, Method(matchers))
- // .With(multi-argument-matcher)
- // .WillByDefault(action);
- //
- // is recorded in the data members like this:
- //
- // source file that contains the statement => file_
- // line number of the statement => line_
- // matchers => matchers_
- // multi-argument-matcher => extra_matcher_
- // action => action_
- ArgumentMatcherTuple matchers_;
- Matcher<const ArgumentTuple&> extra_matcher_;
- Action<F> action_;
-}; // class OnCallSpec
-
-// Possible reactions on uninteresting calls. TODO(wan@google.com):
-// rename the enum values to the kFoo style.
-enum CallReaction {
- ALLOW,
- WARN,
- FAIL
-};
-
-} // namespace internal
-
-// Utilities for manipulating mock objects.
-class Mock {
- public:
- // The following public methods can be called concurrently.
-
- // Tells Google Mock to ignore mock_obj when checking for leaked
- // mock objects.
- static void AllowLeak(const void* mock_obj);
-
- // Verifies and clears all expectations on the given mock object.
- // If the expectations aren't satisfied, generates one or more
- // Google Test non-fatal failures and returns false.
- static bool VerifyAndClearExpectations(void* mock_obj);
-
- // Verifies all expectations on the given mock object and clears its
- // default actions and expectations. Returns true iff the
- // verification was successful.
- static bool VerifyAndClear(void* mock_obj);
- private:
- friend class internal::UntypedFunctionMockerBase;
-
- // Needed for a function mocker to register itself (so that we know
- // how to clear a mock object).
- template <typename F>
- friend class internal::FunctionMockerBase;
-
- template <typename M>
- friend class NiceMock;
-
- template <typename M>
- friend class StrictMock;
-
- // Tells Google Mock to allow uninteresting calls on the given mock
- // object.
- // L < g_gmock_mutex
- static void AllowUninterestingCalls(const void* mock_obj);
-
- // Tells Google Mock to warn the user about uninteresting calls on
- // the given mock object.
- // L < g_gmock_mutex
- static void WarnUninterestingCalls(const void* mock_obj);
-
- // Tells Google Mock to fail uninteresting calls on the given mock
- // object.
- // L < g_gmock_mutex
- static void FailUninterestingCalls(const void* mock_obj);
-
- // Tells Google Mock the given mock object is being destroyed and
- // its entry in the call-reaction table should be removed.
- // L < g_gmock_mutex
- static void UnregisterCallReaction(const void* mock_obj);
-
- // Returns the reaction Google Mock will have on uninteresting calls
- // made on the given mock object.
- // L < g_gmock_mutex
- static internal::CallReaction GetReactionOnUninterestingCalls(
- const void* mock_obj);
-
- // Verifies that all expectations on the given mock object have been
- // satisfied. Reports one or more Google Test non-fatal failures
- // and returns false if not.
- // L >= g_gmock_mutex
- static bool VerifyAndClearExpectationsLocked(void* mock_obj);
-
- // Clears all ON_CALL()s set on the given mock object.
- // L >= g_gmock_mutex
- static void ClearDefaultActionsLocked(void* mock_obj);
-
- // Registers a mock object and a mock method it owns.
- // L < g_gmock_mutex
- static void Register(const void* mock_obj,
- internal::UntypedFunctionMockerBase* mocker);
-
- // Tells Google Mock where in the source code mock_obj is used in an
- // ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this
- // information helps the user identify which object it is.
- // L < g_gmock_mutex
- static void RegisterUseByOnCallOrExpectCall(
- const void* mock_obj, const char* file, int line);
-
- // Unregisters a mock method; removes the owning mock object from
- // the registry when the last mock method associated with it has
- // been unregistered. This is called only in the destructor of
- // FunctionMockerBase.
- // L >= g_gmock_mutex
- static void UnregisterLocked(internal::UntypedFunctionMockerBase* mocker);
-}; // class Mock
-
-// An abstract handle of an expectation. Useful in the .After()
-// clause of EXPECT_CALL() for setting the (partial) order of
-// expectations. The syntax:
-//
-// Expectation e1 = EXPECT_CALL(...)...;
-// EXPECT_CALL(...).After(e1)...;
-//
-// sets two expectations where the latter can only be matched after
-// the former has been satisfied.
-//
-// Notes:
-// - This class is copyable and has value semantics.
-// - Constness is shallow: a const Expectation object itself cannot
-// be modified, but the mutable methods of the ExpectationBase
-// object it references can be called via expectation_base().
-// - The constructors and destructor are defined out-of-line because
-// the Symbian WINSCW compiler wants to otherwise instantiate them
-// when it sees this class definition, at which point it doesn't have
-// ExpectationBase available yet, leading to incorrect destruction
-// in the linked_ptr (or compilation errors if using a checking
-// linked_ptr).
-class Expectation {
- public:
- // Constructs a null object that doesn't reference any expectation.
- Expectation();
-
- ~Expectation();
-
- // This single-argument ctor must not be explicit, in order to support the
- // Expectation e = EXPECT_CALL(...);
- // syntax.
- //
- // A TypedExpectation object stores its pre-requisites as
- // Expectation objects, and needs to call the non-const Retire()
- // method on the ExpectationBase objects they reference. Therefore
- // Expectation must receive a *non-const* reference to the
- // ExpectationBase object.
- Expectation(internal::ExpectationBase& exp); // NOLINT
-
- // The compiler-generated copy ctor and operator= work exactly as
- // intended, so we don't need to define our own.
-
- // Returns true iff rhs references the same expectation as this object does.
- bool operator==(const Expectation& rhs) const {
- return expectation_base_ == rhs.expectation_base_;
- }
-
- bool operator!=(const Expectation& rhs) const { return !(*this == rhs); }
-
- private:
- friend class ExpectationSet;
- friend class Sequence;
- friend class ::testing::internal::ExpectationBase;
- friend class ::testing::internal::UntypedFunctionMockerBase;
-
- template <typename F>
- friend class ::testing::internal::FunctionMockerBase;
-
- template <typename F>
- friend class ::testing::internal::TypedExpectation;
-
- // This comparator is needed for putting Expectation objects into a set.
- class Less {
- public:
- bool operator()(const Expectation& lhs, const Expectation& rhs) const {
- return lhs.expectation_base_.get() < rhs.expectation_base_.get();
- }
- };
-
- typedef ::std::set<Expectation, Less> Set;
-
- Expectation(
- const internal::linked_ptr<internal::ExpectationBase>& expectation_base);
-
- // Returns the expectation this object references.
- const internal::linked_ptr<internal::ExpectationBase>&
- expectation_base() const {
- return expectation_base_;
- }
-
- // A linked_ptr that co-owns the expectation this handle references.
- internal::linked_ptr<internal::ExpectationBase> expectation_base_;
-};
-
-// A set of expectation handles. Useful in the .After() clause of
-// EXPECT_CALL() for setting the (partial) order of expectations. The
-// syntax:
-//
-// ExpectationSet es;
-// es += EXPECT_CALL(...)...;
-// es += EXPECT_CALL(...)...;
-// EXPECT_CALL(...).After(es)...;
-//
-// sets three expectations where the last one can only be matched
-// after the first two have both been satisfied.
-//
-// This class is copyable and has value semantics.
-class ExpectationSet {
- public:
- // A bidirectional iterator that can read a const element in the set.
- typedef Expectation::Set::const_iterator const_iterator;
-
- // An object stored in the set. This is an alias of Expectation.
- typedef Expectation::Set::value_type value_type;
-
- // Constructs an empty set.
- ExpectationSet() {}
-
- // This single-argument ctor must not be explicit, in order to support the
- // ExpectationSet es = EXPECT_CALL(...);
- // syntax.
- ExpectationSet(internal::ExpectationBase& exp) { // NOLINT
- *this += Expectation(exp);
- }
-
- // This single-argument ctor implements implicit conversion from
- // Expectation and thus must not be explicit. This allows either an
- // Expectation or an ExpectationSet to be used in .After().
- ExpectationSet(const Expectation& e) { // NOLINT
- *this += e;
- }
-
- // The compiler-generator ctor and operator= works exactly as
- // intended, so we don't need to define our own.
-
- // Returns true iff rhs contains the same set of Expectation objects
- // as this does.
- bool operator==(const ExpectationSet& rhs) const {
- return expectations_ == rhs.expectations_;
- }
-
- bool operator!=(const ExpectationSet& rhs) const { return !(*this == rhs); }
-
- // Implements the syntax
- // expectation_set += EXPECT_CALL(...);
- ExpectationSet& operator+=(const Expectation& e) {
- expectations_.insert(e);
- return *this;
- }
-
- int size() const { return static_cast<int>(expectations_.size()); }
-
- const_iterator begin() const { return expectations_.begin(); }
- const_iterator end() const { return expectations_.end(); }
-
- private:
- Expectation::Set expectations_;
-};
-
-
-// Sequence objects are used by a user to specify the relative order
-// in which the expectations should match. They are copyable (we rely
-// on the compiler-defined copy constructor and assignment operator).
-class Sequence {
- public:
- // Constructs an empty sequence.
- Sequence() : last_expectation_(new Expectation) {}
-
- // Adds an expectation to this sequence. The caller must ensure
- // that no other thread is accessing this Sequence object.
- void AddExpectation(const Expectation& expectation) const;
-
- private:
- // The last expectation in this sequence. We use a linked_ptr here
- // because Sequence objects are copyable and we want the copies to
- // be aliases. The linked_ptr allows the copies to co-own and share
- // the same Expectation object.
- internal::linked_ptr<Expectation> last_expectation_;
-}; // class Sequence
-
-// An object of this type causes all EXPECT_CALL() statements
-// encountered in its scope to be put in an anonymous sequence. The
-// work is done in the constructor and destructor. You should only
-// create an InSequence object on the stack.
-//
-// The sole purpose for this class is to support easy definition of
-// sequential expectations, e.g.
-//
-// {
-// InSequence dummy; // The name of the object doesn't matter.
-//
-// // The following expectations must match in the order they appear.
-// EXPECT_CALL(a, Bar())...;
-// EXPECT_CALL(a, Baz())...;
-// ...
-// EXPECT_CALL(b, Xyz())...;
-// }
-//
-// You can create InSequence objects in multiple threads, as long as
-// they are used to affect different mock objects. The idea is that
-// each thread can create and set up its own mocks as if it's the only
-// thread. However, for clarity of your tests we recommend you to set
-// up mocks in the main thread unless you have a good reason not to do
-// so.
-class InSequence {
- public:
- InSequence();
- ~InSequence();
- private:
- bool sequence_created_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(InSequence); // NOLINT
-} GTEST_ATTRIBUTE_UNUSED_;
-
-namespace internal {
-
-// Points to the implicit sequence introduced by a living InSequence
-// object (if any) in the current thread or NULL.
-extern ThreadLocal<Sequence*> g_gmock_implicit_sequence;
-
-// Base class for implementing expectations.
-//
-// There are two reasons for having a type-agnostic base class for
-// Expectation:
-//
-// 1. We need to store collections of expectations of different
-// types (e.g. all pre-requisites of a particular expectation, all
-// expectations in a sequence). Therefore these expectation objects
-// must share a common base class.
-//
-// 2. We can avoid binary code bloat by moving methods not depending
-// on the template argument of Expectation to the base class.
-//
-// This class is internal and mustn't be used by user code directly.
-class ExpectationBase {
- public:
- // source_text is the EXPECT_CALL(...) source that created this Expectation.
- ExpectationBase(const char* file, int line, const string& source_text);
-
- virtual ~ExpectationBase();
-
- // Where in the source file was the expectation spec defined?
- const char* file() const { return file_; }
- int line() const { return line_; }
- const char* source_text() const { return source_text_.c_str(); }
- // Returns the cardinality specified in the expectation spec.
- const Cardinality& cardinality() const { return cardinality_; }
-
- // Describes the source file location of this expectation.
- void DescribeLocationTo(::std::ostream* os) const {
- *os << FormatFileLocation(file(), line()) << " ";
- }
-
- // Describes how many times a function call matching this
- // expectation has occurred.
- // L >= g_gmock_mutex
- void DescribeCallCountTo(::std::ostream* os) const;
-
- // If this mock method has an extra matcher (i.e. .With(matcher)),
- // describes it to the ostream.
- virtual void MaybeDescribeExtraMatcherTo(::std::ostream* os) = 0;
-
- protected:
- friend class ::testing::Expectation;
- friend class UntypedFunctionMockerBase;
-
- enum Clause {
- // Don't change the order of the enum members!
- kNone,
- kWith,
- kTimes,
- kInSequence,
- kAfter,
- kWillOnce,
- kWillRepeatedly,
- kRetiresOnSaturation
- };
-
- typedef std::vector<const void*> UntypedActions;
-
- // Returns an Expectation object that references and co-owns this
- // expectation.
- virtual Expectation GetHandle() = 0;
-
- // Asserts that the EXPECT_CALL() statement has the given property.
- void AssertSpecProperty(bool property, const string& failure_message) const {
- Assert(property, file_, line_, failure_message);
- }
-
- // Expects that the EXPECT_CALL() statement has the given property.
- void ExpectSpecProperty(bool property, const string& failure_message) const {
- Expect(property, file_, line_, failure_message);
- }
-
- // Explicitly specifies the cardinality of this expectation. Used
- // by the subclasses to implement the .Times() clause.
- void SpecifyCardinality(const Cardinality& cardinality);
-
- // Returns true iff the user specified the cardinality explicitly
- // using a .Times().
- bool cardinality_specified() const { return cardinality_specified_; }
-
- // Sets the cardinality of this expectation spec.
- void set_cardinality(const Cardinality& a_cardinality) {
- cardinality_ = a_cardinality;
- }
-
- // The following group of methods should only be called after the
- // EXPECT_CALL() statement, and only when g_gmock_mutex is held by
- // the current thread.
-
- // Retires all pre-requisites of this expectation.
- // L >= g_gmock_mutex
- void RetireAllPreRequisites();
-
- // Returns true iff this expectation is retired.
- // L >= g_gmock_mutex
- bool is_retired() const {
- g_gmock_mutex.AssertHeld();
- return retired_;
- }
-
- // Retires this expectation.
- // L >= g_gmock_mutex
- void Retire() {
- g_gmock_mutex.AssertHeld();
- retired_ = true;
- }
-
- // Returns true iff this expectation is satisfied.
- // L >= g_gmock_mutex
- bool IsSatisfied() const {
- g_gmock_mutex.AssertHeld();
- return cardinality().IsSatisfiedByCallCount(call_count_);
- }
-
- // Returns true iff this expectation is saturated.
- // L >= g_gmock_mutex
- bool IsSaturated() const {
- g_gmock_mutex.AssertHeld();
- return cardinality().IsSaturatedByCallCount(call_count_);
- }
-
- // Returns true iff this expectation is over-saturated.
- // L >= g_gmock_mutex
- bool IsOverSaturated() const {
- g_gmock_mutex.AssertHeld();
- return cardinality().IsOverSaturatedByCallCount(call_count_);
- }
-
- // Returns true iff all pre-requisites of this expectation are satisfied.
- // L >= g_gmock_mutex
- bool AllPrerequisitesAreSatisfied() const;
-
- // Adds unsatisfied pre-requisites of this expectation to 'result'.
- // L >= g_gmock_mutex
- void FindUnsatisfiedPrerequisites(ExpectationSet* result) const;
-
- // Returns the number this expectation has been invoked.
- // L >= g_gmock_mutex
- int call_count() const {
- g_gmock_mutex.AssertHeld();
- return call_count_;
- }
-
- // Increments the number this expectation has been invoked.
- // L >= g_gmock_mutex
- void IncrementCallCount() {
- g_gmock_mutex.AssertHeld();
- call_count_++;
- }
-
- // Checks the action count (i.e. the number of WillOnce() and
- // WillRepeatedly() clauses) against the cardinality if this hasn't
- // been done before. Prints a warning if there are too many or too
- // few actions.
- // L < mutex_
- void CheckActionCountIfNotDone() const;
-
- friend class ::testing::Sequence;
- friend class ::testing::internal::ExpectationTester;
-
- template <typename Function>
- friend class TypedExpectation;
-
- // Implements the .Times() clause.
- void UntypedTimes(const Cardinality& a_cardinality);
-
- // This group of fields are part of the spec and won't change after
- // an EXPECT_CALL() statement finishes.
- const char* file_; // The file that contains the expectation.
- int line_; // The line number of the expectation.
- const string source_text_; // The EXPECT_CALL(...) source text.
- // True iff the cardinality is specified explicitly.
- bool cardinality_specified_;
- Cardinality cardinality_; // The cardinality of the expectation.
- // The immediate pre-requisites (i.e. expectations that must be
- // satisfied before this expectation can be matched) of this
- // expectation. We use linked_ptr in the set because we want an
- // Expectation object to be co-owned by its FunctionMocker and its
- // successors. This allows multiple mock objects to be deleted at
- // different times.
- ExpectationSet immediate_prerequisites_;
-
- // This group of fields are the current state of the expectation,
- // and can change as the mock function is called.
- int call_count_; // How many times this expectation has been invoked.
- bool retired_; // True iff this expectation has retired.
- UntypedActions untyped_actions_;
- bool extra_matcher_specified_;
- bool repeated_action_specified_; // True if a WillRepeatedly() was specified.
- bool retires_on_saturation_;
- Clause last_clause_;
- mutable bool action_count_checked_; // Under mutex_.
- mutable Mutex mutex_; // Protects action_count_checked_.
-
- GTEST_DISALLOW_ASSIGN_(ExpectationBase);
-}; // class ExpectationBase
-
-// Impements an expectation for the given function type.
-template <typename F>
-class TypedExpectation : public ExpectationBase {
- public:
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
- typedef typename Function<F>::Result Result;
-
- TypedExpectation(FunctionMockerBase<F>* owner,
- const char* a_file, int a_line, const string& a_source_text,
- const ArgumentMatcherTuple& m)
- : ExpectationBase(a_file, a_line, a_source_text),
- owner_(owner),
- matchers_(m),
- // By default, extra_matcher_ should match anything. However,
- // we cannot initialize it with _ as that triggers a compiler
- // bug in Symbian's C++ compiler (cannot decide between two
- // overloaded constructors of Matcher<const ArgumentTuple&>).
- extra_matcher_(A<const ArgumentTuple&>()),
- repeated_action_(DoDefault()) {}
-
- virtual ~TypedExpectation() {
- // Check the validity of the action count if it hasn't been done
- // yet (for example, if the expectation was never used).
- CheckActionCountIfNotDone();
- for (UntypedActions::const_iterator it = untyped_actions_.begin();
- it != untyped_actions_.end(); ++it) {
- delete static_cast<const Action<F>*>(*it);
- }
- }
-
- // Implements the .With() clause.
- TypedExpectation& With(const Matcher<const ArgumentTuple&>& m) {
- if (last_clause_ == kWith) {
- ExpectSpecProperty(false,
- ".With() cannot appear "
- "more than once in an EXPECT_CALL().");
- } else {
- ExpectSpecProperty(last_clause_ < kWith,
- ".With() must be the first "
- "clause in an EXPECT_CALL().");
- }
- last_clause_ = kWith;
-
- extra_matcher_ = m;
- extra_matcher_specified_ = true;
- return *this;
- }
-
- // Implements the .Times() clause.
- TypedExpectation& Times(const Cardinality& a_cardinality) {
- ExpectationBase::UntypedTimes(a_cardinality);
- return *this;
- }
-
- // Implements the .Times() clause.
- TypedExpectation& Times(int n) {
- return Times(Exactly(n));
- }
-
- // Implements the .InSequence() clause.
- TypedExpectation& InSequence(const Sequence& s) {
- ExpectSpecProperty(last_clause_ <= kInSequence,
- ".InSequence() cannot appear after .After(),"
- " .WillOnce(), .WillRepeatedly(), or "
- ".RetiresOnSaturation().");
- last_clause_ = kInSequence;
-
- s.AddExpectation(GetHandle());
- return *this;
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) {
- return InSequence(s1).InSequence(s2);
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
- const Sequence& s3) {
- return InSequence(s1, s2).InSequence(s3);
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
- const Sequence& s3, const Sequence& s4) {
- return InSequence(s1, s2, s3).InSequence(s4);
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
- const Sequence& s3, const Sequence& s4,
- const Sequence& s5) {
- return InSequence(s1, s2, s3, s4).InSequence(s5);
- }
-
- // Implements that .After() clause.
- TypedExpectation& After(const ExpectationSet& s) {
- ExpectSpecProperty(last_clause_ <= kAfter,
- ".After() cannot appear after .WillOnce(),"
- " .WillRepeatedly(), or "
- ".RetiresOnSaturation().");
- last_clause_ = kAfter;
-
- for (ExpectationSet::const_iterator it = s.begin(); it != s.end(); ++it) {
- immediate_prerequisites_ += *it;
- }
- return *this;
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2) {
- return After(s1).After(s2);
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
- const ExpectationSet& s3) {
- return After(s1, s2).After(s3);
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
- const ExpectationSet& s3, const ExpectationSet& s4) {
- return After(s1, s2, s3).After(s4);
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
- const ExpectationSet& s3, const ExpectationSet& s4,
- const ExpectationSet& s5) {
- return After(s1, s2, s3, s4).After(s5);
- }
-
- // Implements the .WillOnce() clause.
- TypedExpectation& WillOnce(const Action<F>& action) {
- ExpectSpecProperty(last_clause_ <= kWillOnce,
- ".WillOnce() cannot appear after "
- ".WillRepeatedly() or .RetiresOnSaturation().");
- last_clause_ = kWillOnce;
-
- untyped_actions_.push_back(new Action<F>(action));
- if (!cardinality_specified()) {
- set_cardinality(Exactly(static_cast<int>(untyped_actions_.size())));
- }
- return *this;
- }
-
- // Implements the .WillRepeatedly() clause.
- TypedExpectation& WillRepeatedly(const Action<F>& action) {
- if (last_clause_ == kWillRepeatedly) {
- ExpectSpecProperty(false,
- ".WillRepeatedly() cannot appear "
- "more than once in an EXPECT_CALL().");
- } else {
- ExpectSpecProperty(last_clause_ < kWillRepeatedly,
- ".WillRepeatedly() cannot appear "
- "after .RetiresOnSaturation().");
- }
- last_clause_ = kWillRepeatedly;
- repeated_action_specified_ = true;
-
- repeated_action_ = action;
- if (!cardinality_specified()) {
- set_cardinality(AtLeast(static_cast<int>(untyped_actions_.size())));
- }
-
- // Now that no more action clauses can be specified, we check
- // whether their count makes sense.
- CheckActionCountIfNotDone();
- return *this;
- }
-
- // Implements the .RetiresOnSaturation() clause.
- TypedExpectation& RetiresOnSaturation() {
- ExpectSpecProperty(last_clause_ < kRetiresOnSaturation,
- ".RetiresOnSaturation() cannot appear "
- "more than once.");
- last_clause_ = kRetiresOnSaturation;
- retires_on_saturation_ = true;
-
- // Now that no more action clauses can be specified, we check
- // whether their count makes sense.
- CheckActionCountIfNotDone();
- return *this;
- }
-
- // Returns the matchers for the arguments as specified inside the
- // EXPECT_CALL() macro.
- const ArgumentMatcherTuple& matchers() const {
- return matchers_;
- }
-
- // Returns the matcher specified by the .With() clause.
- const Matcher<const ArgumentTuple&>& extra_matcher() const {
- return extra_matcher_;
- }
-
- // Returns the action specified by the .WillRepeatedly() clause.
- const Action<F>& repeated_action() const { return repeated_action_; }
-
- // If this mock method has an extra matcher (i.e. .With(matcher)),
- // describes it to the ostream.
- virtual void MaybeDescribeExtraMatcherTo(::std::ostream* os) {
- if (extra_matcher_specified_) {
- *os << " Expected args: ";
- extra_matcher_.DescribeTo(os);
- *os << "\n";
- }
- }
-
- private:
- template <typename Function>
- friend class FunctionMockerBase;
-
- // Returns an Expectation object that references and co-owns this
- // expectation.
- virtual Expectation GetHandle() {
- return owner_->GetHandleOf(this);
- }
-
- // The following methods will be called only after the EXPECT_CALL()
- // statement finishes and when the current thread holds
- // g_gmock_mutex.
-
- // Returns true iff this expectation matches the given arguments.
- // L >= g_gmock_mutex
- bool Matches(const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
- return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
- }
-
- // Returns true iff this expectation should handle the given arguments.
- // L >= g_gmock_mutex
- bool ShouldHandleArguments(const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
-
- // In case the action count wasn't checked when the expectation
- // was defined (e.g. if this expectation has no WillRepeatedly()
- // or RetiresOnSaturation() clause), we check it when the
- // expectation is used for the first time.
- CheckActionCountIfNotDone();
- return !is_retired() && AllPrerequisitesAreSatisfied() && Matches(args);
- }
-
- // Describes the result of matching the arguments against this
- // expectation to the given ostream.
- // L >= g_gmock_mutex
- void ExplainMatchResultTo(const ArgumentTuple& args,
- ::std::ostream* os) const {
- g_gmock_mutex.AssertHeld();
-
- if (is_retired()) {
- *os << " Expected: the expectation is active\n"
- << " Actual: it is retired\n";
- } else if (!Matches(args)) {
- if (!TupleMatches(matchers_, args)) {
- ExplainMatchFailureTupleTo(matchers_, args, os);
- }
- StringMatchResultListener listener;
- if (!extra_matcher_.MatchAndExplain(args, &listener)) {
- *os << " Expected args: ";
- extra_matcher_.DescribeTo(os);
- *os << "\n Actual: don't match";
-
- internal::PrintIfNotEmpty(listener.str(), os);
- *os << "\n";
- }
- } else if (!AllPrerequisitesAreSatisfied()) {
- *os << " Expected: all pre-requisites are satisfied\n"
- << " Actual: the following immediate pre-requisites "
- << "are not satisfied:\n";
- ExpectationSet unsatisfied_prereqs;
- FindUnsatisfiedPrerequisites(&unsatisfied_prereqs);
- int i = 0;
- for (ExpectationSet::const_iterator it = unsatisfied_prereqs.begin();
- it != unsatisfied_prereqs.end(); ++it) {
- it->expectation_base()->DescribeLocationTo(os);
- *os << "pre-requisite #" << i++ << "\n";
- }
- *os << " (end of pre-requisites)\n";
- } else {
- // This line is here just for completeness' sake. It will never
- // be executed as currently the ExplainMatchResultTo() function
- // is called only when the mock function call does NOT match the
- // expectation.
- *os << "The call matches the expectation.\n";
- }
- }
-
- // Returns the action that should be taken for the current invocation.
- // L >= g_gmock_mutex
- const Action<F>& GetCurrentAction(const FunctionMockerBase<F>* mocker,
- const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
- const int count = call_count();
- Assert(count >= 1, __FILE__, __LINE__,
- "call_count() is <= 0 when GetCurrentAction() is "
- "called - this should never happen.");
-
- const int action_count = static_cast<int>(untyped_actions_.size());
- if (action_count > 0 && !repeated_action_specified_ &&
- count > action_count) {
- // If there is at least one WillOnce() and no WillRepeatedly(),
- // we warn the user when the WillOnce() clauses ran out.
- ::std::stringstream ss;
- DescribeLocationTo(&ss);
- ss << "Actions ran out in " << source_text() << "...\n"
- << "Called " << count << " times, but only "
- << action_count << " WillOnce()"
- << (action_count == 1 ? " is" : "s are") << " specified - ";
- mocker->DescribeDefaultActionTo(args, &ss);
- Log(WARNING, ss.str(), 1);
- }
-
- return count <= action_count ?
- *static_cast<const Action<F>*>(untyped_actions_[count - 1]) :
- repeated_action();
- }
-
- // Given the arguments of a mock function call, if the call will
- // over-saturate this expectation, returns the default action;
- // otherwise, returns the next action in this expectation. Also
- // describes *what* happened to 'what', and explains *why* Google
- // Mock does it to 'why'. This method is not const as it calls
- // IncrementCallCount(). A return value of NULL means the default
- // action.
- // L >= g_gmock_mutex
- const Action<F>* GetActionForArguments(const FunctionMockerBase<F>* mocker,
- const ArgumentTuple& args,
- ::std::ostream* what,
- ::std::ostream* why) {
- g_gmock_mutex.AssertHeld();
- if (IsSaturated()) {
- // We have an excessive call.
- IncrementCallCount();
- *what << "Mock function called more times than expected - ";
- mocker->DescribeDefaultActionTo(args, what);
- DescribeCallCountTo(why);
-
- // TODO(wan@google.com): allow the user to control whether
- // unexpected calls should fail immediately or continue using a
- // flag --gmock_unexpected_calls_are_fatal.
- return NULL;
- }
-
- IncrementCallCount();
- RetireAllPreRequisites();
-
- if (retires_on_saturation_ && IsSaturated()) {
- Retire();
- }
-
- // Must be done after IncrementCount()!
- *what << "Mock function call matches " << source_text() <<"...\n";
- return &(GetCurrentAction(mocker, args));
- }
-
- // All the fields below won't change once the EXPECT_CALL()
- // statement finishes.
- FunctionMockerBase<F>* const owner_;
- ArgumentMatcherTuple matchers_;
- Matcher<const ArgumentTuple&> extra_matcher_;
- Action<F> repeated_action_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TypedExpectation);
-}; // class TypedExpectation
-
-// A MockSpec object is used by ON_CALL() or EXPECT_CALL() for
-// specifying the default behavior of, or expectation on, a mock
-// function.
-
-// Note: class MockSpec really belongs to the ::testing namespace.
-// However if we define it in ::testing, MSVC will complain when
-// classes in ::testing::internal declare it as a friend class
-// template. To workaround this compiler bug, we define MockSpec in
-// ::testing::internal and import it into ::testing.
-
-// Logs a message including file and line number information.
-void LogWithLocation(testing::internal::LogSeverity severity,
- const char* file, int line,
- const string& message);
-
-template <typename F>
-class MockSpec {
- public:
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename internal::Function<F>::ArgumentMatcherTuple
- ArgumentMatcherTuple;
-
- // Constructs a MockSpec object, given the function mocker object
- // that the spec is associated with.
- explicit MockSpec(internal::FunctionMockerBase<F>* function_mocker)
- : function_mocker_(function_mocker) {}
-
- // Adds a new default action spec to the function mocker and returns
- // the newly created spec.
- internal::OnCallSpec<F>& InternalDefaultActionSetAt(
- const char* file, int line, const char* obj, const char* call) {
- LogWithLocation(internal::INFO, file, line,
- string("ON_CALL(") + obj + ", " + call + ") invoked");
- return function_mocker_->AddNewOnCallSpec(file, line, matchers_);
- }
-
- // Adds a new expectation spec to the function mocker and returns
- // the newly created spec.
- internal::TypedExpectation<F>& InternalExpectedAt(
- const char* file, int line, const char* obj, const char* call) {
- const string source_text(string("EXPECT_CALL(") + obj + ", " + call + ")");
- LogWithLocation(internal::INFO, file, line, source_text + " invoked");
- return function_mocker_->AddNewExpectation(
- file, line, source_text, matchers_);
- }
-
- private:
- template <typename Function>
- friend class internal::FunctionMocker;
-
- void SetMatchers(const ArgumentMatcherTuple& matchers) {
- matchers_ = matchers;
- }
-
- // The function mocker that owns this spec.
- internal::FunctionMockerBase<F>* const function_mocker_;
- // The argument matchers specified in the spec.
- ArgumentMatcherTuple matchers_;
-
- GTEST_DISALLOW_ASSIGN_(MockSpec);
-}; // class MockSpec
-
-// MSVC warns about using 'this' in base member initializer list, so
-// we need to temporarily disable the warning. We have to do it for
-// the entire class to suppress the warning, even though it's about
-// the constructor only.
-
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4355) // Temporarily disables warning 4355.
-#endif // _MSV_VER
-
-// C++ treats the void type specially. For example, you cannot define
-// a void-typed variable or pass a void value to a function.
-// ActionResultHolder<T> holds a value of type T, where T must be a
-// copyable type or void (T doesn't need to be default-constructable).
-// It hides the syntactic difference between void and other types, and
-// is used to unify the code for invoking both void-returning and
-// non-void-returning mock functions.
-
-// Untyped base class for ActionResultHolder<T>.
-class UntypedActionResultHolderBase {
- public:
- virtual ~UntypedActionResultHolderBase() {}
-
- // Prints the held value as an action's result to os.
- virtual void PrintAsActionResult(::std::ostream* os) const = 0;
-};
-
-// This generic definition is used when T is not void.
-template <typename T>
-class ActionResultHolder : public UntypedActionResultHolderBase {
- public:
- explicit ActionResultHolder(T a_value) : value_(a_value) {}
-
- // The compiler-generated copy constructor and assignment operator
- // are exactly what we need, so we don't need to define them.
-
- // Returns the held value and deletes this object.
- T GetValueAndDelete() const {
- T retval(value_);
- delete this;
- return retval;
- }
-
- // Prints the held value as an action's result to os.
- virtual void PrintAsActionResult(::std::ostream* os) const {
- *os << "\n Returns: ";
- // T may be a reference type, so we don't use UniversalPrint().
- UniversalPrinter<T>::Print(value_, os);
- }
-
- // Performs the given mock function's default action and returns the
- // result in a new-ed ActionResultHolder.
- template <typename F>
- static ActionResultHolder* PerformDefaultAction(
- const FunctionMockerBase<F>* func_mocker,
- const typename Function<F>::ArgumentTuple& args,
- const string& call_description) {
- return new ActionResultHolder(
- func_mocker->PerformDefaultAction(args, call_description));
- }
-
- // Performs the given action and returns the result in a new-ed
- // ActionResultHolder.
- template <typename F>
- static ActionResultHolder*
- PerformAction(const Action<F>& action,
- const typename Function<F>::ArgumentTuple& args) {
- return new ActionResultHolder(action.Perform(args));
- }
-
- private:
- T value_;
-
- // T could be a reference type, so = isn't supported.
- GTEST_DISALLOW_ASSIGN_(ActionResultHolder);
-};
-
-// Specialization for T = void.
-template <>
-class ActionResultHolder<void> : public UntypedActionResultHolderBase {
- public:
- void GetValueAndDelete() const { delete this; }
-
- virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
-
- // Performs the given mock function's default action and returns NULL;
- template <typename F>
- static ActionResultHolder* PerformDefaultAction(
- const FunctionMockerBase<F>* func_mocker,
- const typename Function<F>::ArgumentTuple& args,
- const string& call_description) {
- func_mocker->PerformDefaultAction(args, call_description);
- return NULL;
- }
-
- // Performs the given action and returns NULL.
- template <typename F>
- static ActionResultHolder* PerformAction(
- const Action<F>& action,
- const typename Function<F>::ArgumentTuple& args) {
- action.Perform(args);
- return NULL;
- }
-};
-
-// The base of the function mocker class for the given function type.
-// We put the methods in this class instead of its child to avoid code
-// bloat.
-template <typename F>
-class FunctionMockerBase : public UntypedFunctionMockerBase {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
-
- FunctionMockerBase() : current_spec_(this) {}
-
- // The destructor verifies that all expectations on this mock
- // function have been satisfied. If not, it will report Google Test
- // non-fatal failures for the violations.
- // L < g_gmock_mutex
- virtual ~FunctionMockerBase() {
- MutexLock l(&g_gmock_mutex);
- VerifyAndClearExpectationsLocked();
- Mock::UnregisterLocked(this);
- ClearDefaultActionsLocked();
- }
-
- // Returns the ON_CALL spec that matches this mock function with the
- // given arguments; returns NULL if no matching ON_CALL is found.
- // L = *
- const OnCallSpec<F>* FindOnCallSpec(
- const ArgumentTuple& args) const {
- for (UntypedOnCallSpecs::const_reverse_iterator it
- = untyped_on_call_specs_.rbegin();
- it != untyped_on_call_specs_.rend(); ++it) {
- const OnCallSpec<F>* spec = static_cast<const OnCallSpec<F>*>(*it);
- if (spec->Matches(args))
- return spec;
- }
-
- return NULL;
- }
-
- // Performs the default action of this mock function on the given arguments
- // and returns the result. Asserts with a helpful call descrption if there is
- // no valid return value. This method doesn't depend on the mutable state of
- // this object, and thus can be called concurrently without locking.
- // L = *
- Result PerformDefaultAction(const ArgumentTuple& args,
- const string& call_description) const {
- const OnCallSpec<F>* const spec =
- this->FindOnCallSpec(args);
- if (spec != NULL) {
- return spec->GetAction().Perform(args);
- }
- Assert(DefaultValue<Result>::Exists(), "", -1,
- call_description + "\n The mock function has no default action "
- "set, and its return type has no default value set.");
- return DefaultValue<Result>::Get();
- }
-
- // Performs the default action with the given arguments and returns
- // the action's result. The call description string will be used in
- // the error message to describe the call in the case the default
- // action fails. The caller is responsible for deleting the result.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformDefaultAction(
- const void* untyped_args, // must point to an ArgumentTuple
- const string& call_description) const {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- return ResultHolder::PerformDefaultAction(this, args, call_description);
- }
-
- // Performs the given action with the given arguments and returns
- // the action's result. The caller is responsible for deleting the
- // result.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformAction(
- const void* untyped_action, const void* untyped_args) const {
- // Make a copy of the action before performing it, in case the
- // action deletes the mock object (and thus deletes itself).
- const Action<F> action = *static_cast<const Action<F>*>(untyped_action);
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- return ResultHolder::PerformAction(action, args);
- }
-
- // Implements UntypedFunctionMockerBase::ClearDefaultActionsLocked():
- // clears the ON_CALL()s set on this mock function.
- // L >= g_gmock_mutex
- virtual void ClearDefaultActionsLocked() {
- g_gmock_mutex.AssertHeld();
- for (UntypedOnCallSpecs::const_iterator it =
- untyped_on_call_specs_.begin();
- it != untyped_on_call_specs_.end(); ++it) {
- delete static_cast<const OnCallSpec<F>*>(*it);
- }
- untyped_on_call_specs_.clear();
- }
-
- protected:
- template <typename Function>
- friend class MockSpec;
-
- typedef ActionResultHolder<Result> ResultHolder;
-
- // Returns the result of invoking this mock function with the given
- // arguments. This function can be safely called from multiple
- // threads concurrently.
- // L < g_gmock_mutex
- Result InvokeWith(const ArgumentTuple& args) {
- return static_cast<const ResultHolder*>(
- this->UntypedInvokeWith(&args))->GetValueAndDelete();
- }
-
- // Adds and returns a default action spec for this mock function.
- // L < g_gmock_mutex
- OnCallSpec<F>& AddNewOnCallSpec(
- const char* file, int line,
- const ArgumentMatcherTuple& m) {
- Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);
- OnCallSpec<F>* const on_call_spec = new OnCallSpec<F>(file, line, m);
- untyped_on_call_specs_.push_back(on_call_spec);
- return *on_call_spec;
- }
-
- // Adds and returns an expectation spec for this mock function.
- // L < g_gmock_mutex
- TypedExpectation<F>& AddNewExpectation(
- const char* file,
- int line,
- const string& source_text,
- const ArgumentMatcherTuple& m) {
- Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);
- TypedExpectation<F>* const expectation =
- new TypedExpectation<F>(this, file, line, source_text, m);
- const linked_ptr<ExpectationBase> untyped_expectation(expectation);
- untyped_expectations_.push_back(untyped_expectation);
-
- // Adds this expectation into the implicit sequence if there is one.
- Sequence* const implicit_sequence = g_gmock_implicit_sequence.get();
- if (implicit_sequence != NULL) {
- implicit_sequence->AddExpectation(Expectation(untyped_expectation));
- }
-
- return *expectation;
- }
-
- // The current spec (either default action spec or expectation spec)
- // being described on this function mocker.
- MockSpec<F>& current_spec() { return current_spec_; }
-
- private:
- template <typename Func> friend class TypedExpectation;
-
- // Some utilities needed for implementing UntypedInvokeWith().
-
- // Describes what default action will be performed for the given
- // arguments.
- // L = *
- void DescribeDefaultActionTo(const ArgumentTuple& args,
- ::std::ostream* os) const {
- const OnCallSpec<F>* const spec = FindOnCallSpec(args);
-
- if (spec == NULL) {
- *os << (internal::type_equals<Result, void>::value ?
- "returning directly.\n" :
- "returning default value.\n");
- } else {
- *os << "taking default action specified at:\n"
- << FormatFileLocation(spec->file(), spec->line()) << "\n";
- }
- }
-
- // Writes a message that the call is uninteresting (i.e. neither
- // explicitly expected nor explicitly unexpected) to the given
- // ostream.
- // L < g_gmock_mutex
- virtual void UntypedDescribeUninterestingCall(const void* untyped_args,
- ::std::ostream* os) const {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- *os << "Uninteresting mock function call - ";
- DescribeDefaultActionTo(args, os);
- *os << " Function call: " << Name();
- UniversalPrint(args, os);
- }
-
- // Returns the expectation that matches the given function arguments
- // (or NULL is there's no match); when a match is found,
- // untyped_action is set to point to the action that should be
- // performed (or NULL if the action is "do default"), and
- // is_excessive is modified to indicate whether the call exceeds the
- // expected number.
- //
- // Critical section: We must find the matching expectation and the
- // corresponding action that needs to be taken in an ATOMIC
- // transaction. Otherwise another thread may call this mock
- // method in the middle and mess up the state.
- //
- // However, performing the action has to be left out of the critical
- // section. The reason is that we have no control on what the
- // action does (it can invoke an arbitrary user function or even a
- // mock function) and excessive locking could cause a dead lock.
- // L < g_gmock_mutex
- virtual const ExpectationBase* UntypedFindMatchingExpectation(
- const void* untyped_args,
- const void** untyped_action, bool* is_excessive,
- ::std::ostream* what, ::std::ostream* why) {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- MutexLock l(&g_gmock_mutex);
- TypedExpectation<F>* exp = this->FindMatchingExpectationLocked(args);
- if (exp == NULL) { // A match wasn't found.
- this->FormatUnexpectedCallMessageLocked(args, what, why);
- return NULL;
- }
-
- // This line must be done before calling GetActionForArguments(),
- // which will increment the call count for *exp and thus affect
- // its saturation status.
- *is_excessive = exp->IsSaturated();
- const Action<F>* action = exp->GetActionForArguments(this, args, what, why);
- if (action != NULL && action->IsDoDefault())
- action = NULL; // Normalize "do default" to NULL.
- *untyped_action = action;
- return exp;
- }
-
- // Prints the given function arguments to the ostream.
- virtual void UntypedPrintArgs(const void* untyped_args,
- ::std::ostream* os) const {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- UniversalPrint(args, os);
- }
-
- // Returns the expectation that matches the arguments, or NULL if no
- // expectation matches them.
- // L >= g_gmock_mutex
- TypedExpectation<F>* FindMatchingExpectationLocked(
- const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
- for (typename UntypedExpectations::const_reverse_iterator it =
- untyped_expectations_.rbegin();
- it != untyped_expectations_.rend(); ++it) {
- TypedExpectation<F>* const exp =
- static_cast<TypedExpectation<F>*>(it->get());
- if (exp->ShouldHandleArguments(args)) {
- return exp;
- }
- }
- return NULL;
- }
-
- // Returns a message that the arguments don't match any expectation.
- // L >= g_gmock_mutex
- void FormatUnexpectedCallMessageLocked(const ArgumentTuple& args,
- ::std::ostream* os,
- ::std::ostream* why) const {
- g_gmock_mutex.AssertHeld();
- *os << "\nUnexpected mock function call - ";
- DescribeDefaultActionTo(args, os);
- PrintTriedExpectationsLocked(args, why);
- }
-
- // Prints a list of expectations that have been tried against the
- // current mock function call.
- // L >= g_gmock_mutex
- void PrintTriedExpectationsLocked(const ArgumentTuple& args,
- ::std::ostream* why) const {
- g_gmock_mutex.AssertHeld();
- const int count = static_cast<int>(untyped_expectations_.size());
- *why << "Google Mock tried the following " << count << " "
- << (count == 1 ? "expectation, but it didn't match" :
- "expectations, but none matched")
- << ":\n";
- for (int i = 0; i < count; i++) {
- TypedExpectation<F>* const expectation =
- static_cast<TypedExpectation<F>*>(untyped_expectations_[i].get());
- *why << "\n";
- expectation->DescribeLocationTo(why);
- if (count > 1) {
- *why << "tried expectation #" << i << ": ";
- }
- *why << expectation->source_text() << "...\n";
- expectation->ExplainMatchResultTo(args, why);
- expectation->DescribeCallCountTo(why);
- }
- }
-
- // The current spec (either default action spec or expectation spec)
- // being described on this function mocker.
- MockSpec<F> current_spec_;
-
- // There is no generally useful and implementable semantics of
- // copying a mock object, so copying a mock is usually a user error.
- // Thus we disallow copying function mockers. If the user really
- // wants to copy a mock object, he should implement his own copy
- // operation, for example:
- //
- // class MockFoo : public Foo {
- // public:
- // // Defines a copy constructor explicitly.
- // MockFoo(const MockFoo& src) {}
- // ...
- // };
- GTEST_DISALLOW_COPY_AND_ASSIGN_(FunctionMockerBase);
-}; // class FunctionMockerBase
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSV_VER
-
-// Implements methods of FunctionMockerBase.
-
-// Verifies that all expectations on this mock function have been
-// satisfied. Reports one or more Google Test non-fatal failures and
-// returns false if not.
-// L >= g_gmock_mutex
-
-// Reports an uninteresting call (whose description is in msg) in the
-// manner specified by 'reaction'.
-void ReportUninterestingCall(CallReaction reaction, const string& msg);
-
-} // namespace internal
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file. However, the MockSpec class template is
-// meant to be defined in the ::testing namespace. The following line
-// is just a trick for working around a bug in MSVC 8.0, which cannot
-// handle it if we define MockSpec in ::testing.
-using internal::MockSpec;
-
-// Const(x) is a convenient function for obtaining a const reference
-// to x. This is useful for setting expectations on an overloaded
-// const mock method, e.g.
-//
-// class MockFoo : public FooInterface {
-// public:
-// MOCK_METHOD0(Bar, int());
-// MOCK_CONST_METHOD0(Bar, int&());
-// };
-//
-// MockFoo foo;
-// // Expects a call to non-const MockFoo::Bar().
-// EXPECT_CALL(foo, Bar());
-// // Expects a call to const MockFoo::Bar().
-// EXPECT_CALL(Const(foo), Bar());
-template <typename T>
-inline const T& Const(const T& x) { return x; }
-
-// Constructs an Expectation object that references and co-owns exp.
-inline Expectation::Expectation(internal::ExpectationBase& exp) // NOLINT
- : expectation_base_(exp.GetHandle().expectation_base()) {}
-
-} // namespace testing
-
-// A separate macro is required to avoid compile errors when the name
-// of the method used in call is a result of macro expansion.
-// See CompilesWithMethodNameExpandedFromMacro tests in
-// internal/gmock-spec-builders_test.cc for more details.
-#define GMOCK_ON_CALL_IMPL_(obj, call) \
- ((obj).gmock_##call).InternalDefaultActionSetAt(__FILE__, __LINE__, \
- #obj, #call)
-#define ON_CALL(obj, call) GMOCK_ON_CALL_IMPL_(obj, call)
-
-#define GMOCK_EXPECT_CALL_IMPL_(obj, call) \
- ((obj).gmock_##call).InternalExpectedAt(__FILE__, __LINE__, #obj, #call)
-#define EXPECT_CALL(obj, call) GMOCK_EXPECT_CALL_IMPL_(obj, call)
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-
-namespace testing {
-namespace internal {
-
-template <typename F>
-class FunctionMockerBase;
-
-// Note: class FunctionMocker really belongs to the ::testing
-// namespace. However if we define it in ::testing, MSVC will
-// complain when classes in ::testing::internal declare it as a
-// friend class template. To workaround this compiler bug, we define
-// FunctionMocker in ::testing::internal and import it into ::testing.
-template <typename F>
-class FunctionMocker;
-
-template <typename R>
-class FunctionMocker<R()> : public
- internal::FunctionMockerBase<R()> {
- public:
- typedef R F();
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With() {
- return this->current_spec();
- }
-
- R Invoke() {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple());
- }
-};
-
-template <typename R, typename A1>
-class FunctionMocker<R(A1)> : public
- internal::FunctionMockerBase<R(A1)> {
- public:
- typedef R F(A1);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1));
- return this->current_spec();
- }
-
- R Invoke(A1 a1) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1));
- }
-};
-
-template <typename R, typename A1, typename A2>
-class FunctionMocker<R(A1, A2)> : public
- internal::FunctionMockerBase<R(A1, A2)> {
- public:
- typedef R F(A1, A2);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-class FunctionMocker<R(A1, A2, A3)> : public
- internal::FunctionMockerBase<R(A1, A2, A3)> {
- public:
- typedef R F(A1, A2, A3);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class FunctionMocker<R(A1, A2, A3, A4)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4)> {
- public:
- typedef R F(A1, A2, A3, A4);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5)> {
- public:
- typedef R F(A1, A2, A3, A4, A5);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4,
- m5));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7, A8);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7, m8));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
- const Matcher<A9>& m9) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7, m8, m9));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9,
- typename A10>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
- const Matcher<A9>& m9, const Matcher<A10>& m10) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7, m8, m9, m10));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9,
- A10 a10) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9,
- a10));
- }
-};
-
-} // namespace internal
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file. However, the FunctionMocker class template
-// is meant to be defined in the ::testing namespace. The following
-// line is just a trick for working around a bug in MSVC 8.0, which
-// cannot handle it if we define FunctionMocker in ::testing.
-using internal::FunctionMocker;
-
-// The result type of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_RESULT_(tn, F) tn ::testing::internal::Function<F>::Result
-
-// The type of argument N of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_ARG_(tn, F, N) tn ::testing::internal::Function<F>::Argument##N
-
-// The matcher type for argument N of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher<GMOCK_ARG_(tn, F, N)>&
-
-// The variable for mocking the given method.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MOCKER_(arity, constness, Method) \
- GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD0_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method() constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 0, \
- this_method_does_not_take_0_arguments); \
- GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method() constness { \
- GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(0, constness, Method).With(); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(0, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD1_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 1, \
- this_method_does_not_take_1_argument); \
- GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1) constness { \
- GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(1, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD2_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 2, \
- this_method_does_not_take_2_arguments); \
- GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2) constness { \
- GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(2, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD3_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 3, \
- this_method_does_not_take_3_arguments); \
- GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3) constness { \
- GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(3, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD4_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 4, \
- this_method_does_not_take_4_arguments); \
- GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4) constness { \
- GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(4, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD5_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 5, \
- this_method_does_not_take_5_arguments); \
- GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5) constness { \
- GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(5, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD6_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 6, \
- this_method_does_not_take_6_arguments); \
- GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6) constness { \
- GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(6, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD7_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 7, \
- this_method_does_not_take_7_arguments); \
- GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7) constness { \
- GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(7, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD8_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7, \
- GMOCK_ARG_(tn, F, 8) gmock_a8) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 8, \
- this_method_does_not_take_8_arguments); \
- GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7, \
- GMOCK_MATCHER_(tn, F, 8) gmock_a8) constness { \
- GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(8, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD9_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7, \
- GMOCK_ARG_(tn, F, 8) gmock_a8, \
- GMOCK_ARG_(tn, F, 9) gmock_a9) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 9, \
- this_method_does_not_take_9_arguments); \
- GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
- gmock_a9); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7, \
- GMOCK_MATCHER_(tn, F, 8) gmock_a8, \
- GMOCK_MATCHER_(tn, F, 9) gmock_a9) constness { \
- GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
- gmock_a9); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(9, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD10_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7, \
- GMOCK_ARG_(tn, F, 8) gmock_a8, \
- GMOCK_ARG_(tn, F, 9) gmock_a9, \
- GMOCK_ARG_(tn, F, 10) gmock_a10) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 10, \
- this_method_does_not_take_10_arguments); \
- GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
- gmock_a10); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7, \
- GMOCK_MATCHER_(tn, F, 8) gmock_a8, \
- GMOCK_MATCHER_(tn, F, 9) gmock_a9, \
- GMOCK_MATCHER_(tn, F, 10) gmock_a10) constness { \
- GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
- gmock_a10); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(10, constness, Method)
-
-#define MOCK_METHOD0(m, F) GMOCK_METHOD0_(, , , m, F)
-#define MOCK_METHOD1(m, F) GMOCK_METHOD1_(, , , m, F)
-#define MOCK_METHOD2(m, F) GMOCK_METHOD2_(, , , m, F)
-#define MOCK_METHOD3(m, F) GMOCK_METHOD3_(, , , m, F)
-#define MOCK_METHOD4(m, F) GMOCK_METHOD4_(, , , m, F)
-#define MOCK_METHOD5(m, F) GMOCK_METHOD5_(, , , m, F)
-#define MOCK_METHOD6(m, F) GMOCK_METHOD6_(, , , m, F)
-#define MOCK_METHOD7(m, F) GMOCK_METHOD7_(, , , m, F)
-#define MOCK_METHOD8(m, F) GMOCK_METHOD8_(, , , m, F)
-#define MOCK_METHOD9(m, F) GMOCK_METHOD9_(, , , m, F)
-#define MOCK_METHOD10(m, F) GMOCK_METHOD10_(, , , m, F)
-
-#define MOCK_CONST_METHOD0(m, F) GMOCK_METHOD0_(, const, , m, F)
-#define MOCK_CONST_METHOD1(m, F) GMOCK_METHOD1_(, const, , m, F)
-#define MOCK_CONST_METHOD2(m, F) GMOCK_METHOD2_(, const, , m, F)
-#define MOCK_CONST_METHOD3(m, F) GMOCK_METHOD3_(, const, , m, F)
-#define MOCK_CONST_METHOD4(m, F) GMOCK_METHOD4_(, const, , m, F)
-#define MOCK_CONST_METHOD5(m, F) GMOCK_METHOD5_(, const, , m, F)
-#define MOCK_CONST_METHOD6(m, F) GMOCK_METHOD6_(, const, , m, F)
-#define MOCK_CONST_METHOD7(m, F) GMOCK_METHOD7_(, const, , m, F)
-#define MOCK_CONST_METHOD8(m, F) GMOCK_METHOD8_(, const, , m, F)
-#define MOCK_CONST_METHOD9(m, F) GMOCK_METHOD9_(, const, , m, F)
-#define MOCK_CONST_METHOD10(m, F) GMOCK_METHOD10_(, const, , m, F)
-
-#define MOCK_METHOD0_T(m, F) GMOCK_METHOD0_(typename, , , m, F)
-#define MOCK_METHOD1_T(m, F) GMOCK_METHOD1_(typename, , , m, F)
-#define MOCK_METHOD2_T(m, F) GMOCK_METHOD2_(typename, , , m, F)
-#define MOCK_METHOD3_T(m, F) GMOCK_METHOD3_(typename, , , m, F)
-#define MOCK_METHOD4_T(m, F) GMOCK_METHOD4_(typename, , , m, F)
-#define MOCK_METHOD5_T(m, F) GMOCK_METHOD5_(typename, , , m, F)
-#define MOCK_METHOD6_T(m, F) GMOCK_METHOD6_(typename, , , m, F)
-#define MOCK_METHOD7_T(m, F) GMOCK_METHOD7_(typename, , , m, F)
-#define MOCK_METHOD8_T(m, F) GMOCK_METHOD8_(typename, , , m, F)
-#define MOCK_METHOD9_T(m, F) GMOCK_METHOD9_(typename, , , m, F)
-#define MOCK_METHOD10_T(m, F) GMOCK_METHOD10_(typename, , , m, F)
-
-#define MOCK_CONST_METHOD0_T(m, F) GMOCK_METHOD0_(typename, const, , m, F)
-#define MOCK_CONST_METHOD1_T(m, F) GMOCK_METHOD1_(typename, const, , m, F)
-#define MOCK_CONST_METHOD2_T(m, F) GMOCK_METHOD2_(typename, const, , m, F)
-#define MOCK_CONST_METHOD3_T(m, F) GMOCK_METHOD3_(typename, const, , m, F)
-#define MOCK_CONST_METHOD4_T(m, F) GMOCK_METHOD4_(typename, const, , m, F)
-#define MOCK_CONST_METHOD5_T(m, F) GMOCK_METHOD5_(typename, const, , m, F)
-#define MOCK_CONST_METHOD6_T(m, F) GMOCK_METHOD6_(typename, const, , m, F)
-#define MOCK_CONST_METHOD7_T(m, F) GMOCK_METHOD7_(typename, const, , m, F)
-#define MOCK_CONST_METHOD8_T(m, F) GMOCK_METHOD8_(typename, const, , m, F)
-#define MOCK_CONST_METHOD9_T(m, F) GMOCK_METHOD9_(typename, const, , m, F)
-#define MOCK_CONST_METHOD10_T(m, F) GMOCK_METHOD10_(typename, const, , m, F)
-
-#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD0_(, , ct, m, F)
-#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD1_(, , ct, m, F)
-#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD2_(, , ct, m, F)
-#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD3_(, , ct, m, F)
-#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD4_(, , ct, m, F)
-#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD5_(, , ct, m, F)
-#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD6_(, , ct, m, F)
-#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD7_(, , ct, m, F)
-#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD8_(, , ct, m, F)
-#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD9_(, , ct, m, F)
-#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD10_(, , ct, m, F)
-
-#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD0_(, const, ct, m, F)
-#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD1_(, const, ct, m, F)
-#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD2_(, const, ct, m, F)
-#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD3_(, const, ct, m, F)
-#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD4_(, const, ct, m, F)
-#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD5_(, const, ct, m, F)
-#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD6_(, const, ct, m, F)
-#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD7_(, const, ct, m, F)
-#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD8_(, const, ct, m, F)
-#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD9_(, const, ct, m, F)
-#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD10_(, const, ct, m, F)
-
-#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD0_(typename, , ct, m, F)
-#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD1_(typename, , ct, m, F)
-#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD2_(typename, , ct, m, F)
-#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD3_(typename, , ct, m, F)
-#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD4_(typename, , ct, m, F)
-#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD5_(typename, , ct, m, F)
-#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD6_(typename, , ct, m, F)
-#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD7_(typename, , ct, m, F)
-#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD8_(typename, , ct, m, F)
-#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD9_(typename, , ct, m, F)
-#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD10_(typename, , ct, m, F)
-
-#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD0_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD1_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD2_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD3_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD4_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD5_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD6_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD7_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD8_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD9_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD10_(typename, const, ct, m, F)
-
-// A MockFunction<F> class has one mock method whose type is F. It is
-// useful when you just want your test code to emit some messages and
-// have Google Mock verify the right messages are sent (and perhaps at
-// the right times). For example, if you are exercising code:
-//
-// Foo(1);
-// Foo(2);
-// Foo(3);
-//
-// and want to verify that Foo(1) and Foo(3) both invoke
-// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
-//
-// TEST(FooTest, InvokesBarCorrectly) {
-// MyMock mock;
-// MockFunction<void(string check_point_name)> check;
-// {
-// InSequence s;
-//
-// EXPECT_CALL(mock, Bar("a"));
-// EXPECT_CALL(check, Call("1"));
-// EXPECT_CALL(check, Call("2"));
-// EXPECT_CALL(mock, Bar("a"));
-// }
-// Foo(1);
-// check.Call("1");
-// Foo(2);
-// check.Call("2");
-// Foo(3);
-// }
-//
-// The expectation spec says that the first Bar("a") must happen
-// before check point "1", the second Bar("a") must happen after check
-// point "2", and nothing should happen between the two check
-// points. The explicit check points make it easy to tell which
-// Bar("a") is called by which call to Foo().
-template <typename F>
-class MockFunction;
-
-template <typename R>
-class MockFunction<R()> {
- public:
- MockFunction() {}
-
- MOCK_METHOD0_T(Call, R());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0>
-class MockFunction<R(A0)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD1_T(Call, R(A0));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1>
-class MockFunction<R(A0, A1)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD2_T(Call, R(A0, A1));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2>
-class MockFunction<R(A0, A1, A2)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD3_T(Call, R(A0, A1, A2));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3>
-class MockFunction<R(A0, A1, A2, A3)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD4_T(Call, R(A0, A1, A2, A3));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4>
-class MockFunction<R(A0, A1, A2, A3, A4)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD5_T(Call, R(A0, A1, A2, A3, A4));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5>
-class MockFunction<R(A0, A1, A2, A3, A4, A5)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD6_T(Call, R(A0, A1, A2, A3, A4, A5));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD7_T(Call, R(A0, A1, A2, A3, A4, A5, A6));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD8_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD9_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8,
- typename A9>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-// This file was GENERATED by command:
-// pump.py gmock-generated-matchers.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic matchers.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-
-#include <sstream>
-#include <string>
-#include <vector>
-
-namespace testing {
-namespace internal {
-
-// The type of the i-th (0-based) field of Tuple.
-#define GMOCK_FIELD_TYPE_(Tuple, i) \
- typename ::std::tr1::tuple_element<i, Tuple>::type
-
-// TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
-// tuple of type Tuple. It has two members:
-//
-// type: a tuple type whose i-th field is the ki-th field of Tuple.
-// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple.
-//
-// For example, in class TupleFields<tuple<bool, char, int>, 2, 0>, we have:
-//
-// type is tuple<int, bool>, and
-// GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true).
-
-template <class Tuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
- int k9 = -1>
-class TupleFields;
-
-// This generic version is used when there are 10 selectors.
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
- int k7, int k8, int k9>
-class TupleFields {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
- GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8),
- GMOCK_FIELD_TYPE_(Tuple, k9)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
- }
-};
-
-// The following specialization is used for 0 ~ 9 selectors.
-
-template <class Tuple>
-class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<> type;
- static type GetSelectedFields(const Tuple& /* t */) {
- using ::std::tr1::get;
- return type();
- }
-};
-
-template <class Tuple, int k0>
-class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t));
- }
-};
-
-template <class Tuple, int k0, int k1>
-class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2>
-class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3>
-class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
- int k7>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
- GMOCK_FIELD_TYPE_(Tuple, k7)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t), get<k7>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
- int k7, int k8>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
- GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
- }
-};
-
-#undef GMOCK_FIELD_TYPE_
-
-// Implements the Args() matcher.
-template <class ArgsTuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
- int k9 = -1>
-class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {
- public:
- // ArgsTuple may have top-level const or reference modifiers.
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple;
- typedef typename internal::TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5,
- k6, k7, k8, k9>::type SelectedArgs;
- typedef Matcher<const SelectedArgs&> MonomorphicInnerMatcher;
-
- template <typename InnerMatcher>
- explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
- : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
-
- virtual bool MatchAndExplain(ArgsTuple args,
- MatchResultListener* listener) const {
- const SelectedArgs& selected_args = GetSelectedArgs(args);
- if (!listener->IsInterested())
- return inner_matcher_.Matches(selected_args);
-
- PrintIndices(listener->stream());
- *listener << "are " << PrintToString(selected_args);
-
- StringMatchResultListener inner_listener;
- const bool match = inner_matcher_.MatchAndExplain(selected_args,
- &inner_listener);
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return match;
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "are a tuple ";
- PrintIndices(os);
- inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "are a tuple ";
- PrintIndices(os);
- inner_matcher_.DescribeNegationTo(os);
- }
-
- private:
- static SelectedArgs GetSelectedArgs(ArgsTuple args) {
- return TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,
- k9>::GetSelectedFields(args);
- }
-
- // Prints the indices of the selected fields.
- static void PrintIndices(::std::ostream* os) {
- *os << "whose fields (";
- const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 };
- for (int i = 0; i < 10; i++) {
- if (indices[i] < 0)
- break;
-
- if (i >= 1)
- *os << ", ";
-
- *os << "#" << indices[i];
- }
- *os << ") ";
- }
-
- const MonomorphicInnerMatcher inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl);
-};
-
-template <class InnerMatcher, int k0 = -1, int k1 = -1, int k2 = -1,
- int k3 = -1, int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1,
- int k8 = -1, int k9 = -1>
-class ArgsMatcher {
- public:
- explicit ArgsMatcher(const InnerMatcher& inner_matcher)
- : inner_matcher_(inner_matcher) {}
-
- template <typename ArgsTuple>
- operator Matcher<ArgsTuple>() const {
- return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, k0, k1, k2, k3, k4, k5,
- k6, k7, k8, k9>(inner_matcher_));
- }
-
- private:
- const InnerMatcher inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ArgsMatcher);
-};
-
-// Implements ElementsAre() of 1-10 arguments.
-
-template <typename T1>
-class ElementsAreMatcher1 {
- public:
- explicit ElementsAreMatcher1(const T1& e1) : e1_(e1) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- // Nokia's Symbian Compiler has a nasty bug where the object put
- // in a one-element local array is not destructed when the array
- // goes out of scope. This leads to obvious badness as we've
- // added the linked_ptr in it to our other linked_ptrs list.
- // Hence we implement ElementsAreMatcher1 specially to avoid using
- // a local array.
- const Matcher<const Element&> matcher =
- MatcherCast<const Element&>(e1_);
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(&matcher, 1));
- }
-
- private:
- const T1& e1_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher1);
-};
-
-template <typename T1, typename T2>
-class ElementsAreMatcher2 {
- public:
- ElementsAreMatcher2(const T1& e1, const T2& e2) : e1_(e1), e2_(e2) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 2));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher2);
-};
-
-template <typename T1, typename T2, typename T3>
-class ElementsAreMatcher3 {
- public:
- ElementsAreMatcher3(const T1& e1, const T2& e2, const T3& e3) : e1_(e1),
- e2_(e2), e3_(e3) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 3));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher3);
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-class ElementsAreMatcher4 {
- public:
- ElementsAreMatcher4(const T1& e1, const T2& e2, const T3& e3,
- const T4& e4) : e1_(e1), e2_(e2), e3_(e3), e4_(e4) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 4));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher4);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class ElementsAreMatcher5 {
- public:
- ElementsAreMatcher5(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 5));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher5);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class ElementsAreMatcher6 {
- public:
- ElementsAreMatcher6(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6) : e1_(e1), e2_(e2), e3_(e3), e4_(e4),
- e5_(e5), e6_(e6) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 6));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher6);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class ElementsAreMatcher7 {
- public:
- ElementsAreMatcher7(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7) : e1_(e1), e2_(e2), e3_(e3),
- e4_(e4), e5_(e5), e6_(e6), e7_(e7) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 7));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher7);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class ElementsAreMatcher8 {
- public:
- ElementsAreMatcher8(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8) : e1_(e1),
- e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6), e7_(e7), e8_(e8) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- MatcherCast<const Element&>(e8_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 8));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
- const T8& e8_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher8);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class ElementsAreMatcher9 {
- public:
- ElementsAreMatcher9(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8,
- const T9& e9) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6),
- e7_(e7), e8_(e8), e9_(e9) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- MatcherCast<const Element&>(e8_),
- MatcherCast<const Element&>(e9_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 9));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
- const T8& e8_;
- const T9& e9_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher9);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class ElementsAreMatcher10 {
- public:
- ElementsAreMatcher10(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
- const T10& e10) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6),
- e7_(e7), e8_(e8), e9_(e9), e10_(e10) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- MatcherCast<const Element&>(e8_),
- MatcherCast<const Element&>(e9_),
- MatcherCast<const Element&>(e10_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 10));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
- const T8& e8_;
- const T9& e9_;
- const T10& e10_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher10);
-};
-
-} // namespace internal
-
-// Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected
-// fields of it matches a_matcher. C++ doesn't support default
-// arguments for function templates, so we have to overload it.
-template <typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher>(matcher);
-}
-
-template <int k1, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1>(matcher);
-}
-
-template <int k1, int k2, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2>(matcher);
-}
-
-template <int k1, int k2, int k3, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
- typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6,
- k7>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7,
- k8>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
- k9>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, int k10, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9,
- k10>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
- k9, k10>(matcher);
-}
-
-// ElementsAre(e0, e1, ..., e_n) matches an STL-style container with
-// (n + 1) elements, where the i-th element in the container must
-// match the i-th argument in the list. Each argument of
-// ElementsAre() can be either a value or a matcher. We support up to
-// 10 arguments.
-//
-// NOTE: Since ElementsAre() cares about the order of the elements, it
-// must not be used with containers whose elements's order is
-// undefined (e.g. hash_map).
-
-inline internal::ElementsAreMatcher0 ElementsAre() {
- return internal::ElementsAreMatcher0();
-}
-
-template <typename T1>
-inline internal::ElementsAreMatcher1<T1> ElementsAre(const T1& e1) {
- return internal::ElementsAreMatcher1<T1>(e1);
-}
-
-template <typename T1, typename T2>
-inline internal::ElementsAreMatcher2<T1, T2> ElementsAre(const T1& e1,
- const T2& e2) {
- return internal::ElementsAreMatcher2<T1, T2>(e1, e2);
-}
-
-template <typename T1, typename T2, typename T3>
-inline internal::ElementsAreMatcher3<T1, T2, T3> ElementsAre(const T1& e1,
- const T2& e2, const T3& e3) {
- return internal::ElementsAreMatcher3<T1, T2, T3>(e1, e2, e3);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-inline internal::ElementsAreMatcher4<T1, T2, T3, T4> ElementsAre(const T1& e1,
- const T2& e2, const T3& e3, const T4& e4) {
- return internal::ElementsAreMatcher4<T1, T2, T3, T4>(e1, e2, e3, e4);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-inline internal::ElementsAreMatcher5<T1, T2, T3, T4,
- T5> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5) {
- return internal::ElementsAreMatcher5<T1, T2, T3, T4, T5>(e1, e2, e3, e4, e5);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-inline internal::ElementsAreMatcher6<T1, T2, T3, T4, T5,
- T6> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6) {
- return internal::ElementsAreMatcher6<T1, T2, T3, T4, T5, T6>(e1, e2, e3, e4,
- e5, e6);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-inline internal::ElementsAreMatcher7<T1, T2, T3, T4, T5, T6,
- T7> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7) {
- return internal::ElementsAreMatcher7<T1, T2, T3, T4, T5, T6, T7>(e1, e2, e3,
- e4, e5, e6, e7);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-inline internal::ElementsAreMatcher8<T1, T2, T3, T4, T5, T6, T7,
- T8> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
- return internal::ElementsAreMatcher8<T1, T2, T3, T4, T5, T6, T7, T8>(e1, e2,
- e3, e4, e5, e6, e7, e8);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-inline internal::ElementsAreMatcher9<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
- return internal::ElementsAreMatcher9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(e1,
- e2, e3, e4, e5, e6, e7, e8, e9);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-inline internal::ElementsAreMatcher10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
- const T10& e10) {
- return internal::ElementsAreMatcher10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10>(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
-}
-
-// ElementsAreArray(array) and ElementAreArray(array, count) are like
-// ElementsAre(), except that they take an array of values or
-// matchers. The former form infers the size of 'array', which must
-// be a static C-style array. In the latter form, 'array' can either
-// be a static array or a pointer to a dynamically created array.
-
-template <typename T>
-inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
- const T* first, size_t count) {
- return internal::ElementsAreArrayMatcher<T>(first, count);
-}
-
-template <typename T, size_t N>
-inline internal::ElementsAreArrayMatcher<T>
-ElementsAreArray(const T (&array)[N]) {
- return internal::ElementsAreArrayMatcher<T>(array, N);
-}
-
-// AllOf(m1, m2, ..., mk) matches any value that matches all of the given
-// sub-matchers. AllOf is called fully qualified to prevent ADL from firing.
-
-template <typename Matcher1, typename Matcher2>
-inline internal::BothOfMatcher<Matcher1, Matcher2>
-AllOf(Matcher1 m1, Matcher2 m2) {
- return internal::BothOfMatcher<Matcher1, Matcher2>(m1, m2);
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- Matcher3> >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, Matcher4> > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- Matcher5> > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, Matcher6> > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- Matcher7> > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- internal::BothOfMatcher<Matcher7, Matcher8> > > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7, m8));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- internal::BothOfMatcher<Matcher7, internal::BothOfMatcher<Matcher8,
- Matcher9> > > > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7, m8, m9));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9, typename Matcher10>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- internal::BothOfMatcher<Matcher7, internal::BothOfMatcher<Matcher8,
- internal::BothOfMatcher<Matcher9, Matcher10> > > > > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9, Matcher10 m10) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7, m8, m9,
- m10));
-}
-
-// AnyOf(m1, m2, ..., mk) matches any value that matches any of the given
-// sub-matchers. AnyOf is called fully qualified to prevent ADL from firing.
-
-template <typename Matcher1, typename Matcher2>
-inline internal::EitherOfMatcher<Matcher1, Matcher2>
-AnyOf(Matcher1 m1, Matcher2 m2) {
- return internal::EitherOfMatcher<Matcher1, Matcher2>(m1, m2);
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- Matcher3> >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, Matcher4> > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- Matcher5> > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, Matcher6> > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- Matcher7> > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- internal::EitherOfMatcher<Matcher7, Matcher8> > > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7, m8));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- internal::EitherOfMatcher<Matcher7, internal::EitherOfMatcher<Matcher8,
- Matcher9> > > > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7, m8, m9));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9, typename Matcher10>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- internal::EitherOfMatcher<Matcher7, internal::EitherOfMatcher<Matcher8,
- internal::EitherOfMatcher<Matcher9, Matcher10> > > > > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9, Matcher10 m10) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7, m8, m9,
- m10));
-}
-
-} // namespace testing
-
-
-// The MATCHER* family of macros can be used in a namespace scope to
-// define custom matchers easily.
-//
-// Basic Usage
-// ===========
-//
-// The syntax
-//
-// MATCHER(name, description_string) { statements; }
-//
-// defines a matcher with the given name that executes the statements,
-// which must return a bool to indicate if the match succeeds. Inside
-// the statements, you can refer to the value being matched by 'arg',
-// and refer to its type by 'arg_type'.
-//
-// The description string documents what the matcher does, and is used
-// to generate the failure message when the match fails. Since a
-// MATCHER() is usually defined in a header file shared by multiple
-// C++ source files, we require the description to be a C-string
-// literal to avoid possible side effects. It can be empty, in which
-// case we'll use the sequence of words in the matcher name as the
-// description.
-//
-// For example:
-//
-// MATCHER(IsEven, "") { return (arg % 2) == 0; }
-//
-// allows you to write
-//
-// // Expects mock_foo.Bar(n) to be called where n is even.
-// EXPECT_CALL(mock_foo, Bar(IsEven()));
-//
-// or,
-//
-// // Verifies that the value of some_expression is even.
-// EXPECT_THAT(some_expression, IsEven());
-//
-// If the above assertion fails, it will print something like:
-//
-// Value of: some_expression
-// Expected: is even
-// Actual: 7
-//
-// where the description "is even" is automatically calculated from the
-// matcher name IsEven.
-//
-// Argument Type
-// =============
-//
-// Note that the type of the value being matched (arg_type) is
-// determined by the context in which you use the matcher and is
-// supplied to you by the compiler, so you don't need to worry about
-// declaring it (nor can you). This allows the matcher to be
-// polymorphic. For example, IsEven() can be used to match any type
-// where the value of "(arg % 2) == 0" can be implicitly converted to
-// a bool. In the "Bar(IsEven())" example above, if method Bar()
-// takes an int, 'arg_type' will be int; if it takes an unsigned long,
-// 'arg_type' will be unsigned long; and so on.
-//
-// Parameterizing Matchers
-// =======================
-//
-// Sometimes you'll want to parameterize the matcher. For that you
-// can use another macro:
-//
-// MATCHER_P(name, param_name, description_string) { statements; }
-//
-// For example:
-//
-// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; }
-//
-// will allow you to write:
-//
-// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n));
-//
-// which may lead to this message (assuming n is 10):
-//
-// Value of: Blah("a")
-// Expected: has absolute value 10
-// Actual: -9
-//
-// Note that both the matcher description and its parameter are
-// printed, making the message human-friendly.
-//
-// In the matcher definition body, you can write 'foo_type' to
-// reference the type of a parameter named 'foo'. For example, in the
-// body of MATCHER_P(HasAbsoluteValue, value) above, you can write
-// 'value_type' to refer to the type of 'value'.
-//
-// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to
-// support multi-parameter matchers.
-//
-// Describing Parameterized Matchers
-// =================================
-//
-// The last argument to MATCHER*() is a string-typed expression. The
-// expression can reference all of the matcher's parameters and a
-// special bool-typed variable named 'negation'. When 'negation' is
-// false, the expression should evaluate to the matcher's description;
-// otherwise it should evaluate to the description of the negation of
-// the matcher. For example,
-//
-// using testing::PrintToString;
-//
-// MATCHER_P2(InClosedRange, low, hi,
-// string(negation ? "is not" : "is") + " in range [" +
-// PrintToString(low) + ", " + PrintToString(hi) + "]") {
-// return low <= arg && arg <= hi;
-// }
-// ...
-// EXPECT_THAT(3, InClosedRange(4, 6));
-// EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-// Expected: is in range [4, 6]
-// ...
-// Expected: is not in range [2, 4]
-//
-// If you specify "" as the description, the failure message will
-// contain the sequence of words in the matcher name followed by the
-// parameter values printed as a tuple. For example,
-//
-// MATCHER_P2(InClosedRange, low, hi, "") { ... }
-// ...
-// EXPECT_THAT(3, InClosedRange(4, 6));
-// EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-// Expected: in closed range (4, 6)
-// ...
-// Expected: not (in closed range (2, 4))
-//
-// Types of Matcher Parameters
-// ===========================
-//
-// For the purpose of typing, you can view
-//
-// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }
-//
-// as shorthand for
-//
-// template <typename p1_type, ..., typename pk_type>
-// FooMatcherPk<p1_type, ..., pk_type>
-// Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// When you write Foo(v1, ..., vk), the compiler infers the types of
-// the parameters v1, ..., and vk for you. If you are not happy with
-// the result of the type inference, you can specify the types by
-// explicitly instantiating the template, as in Foo<long, bool>(5,
-// false). As said earlier, you don't get to (or need to) specify
-// 'arg_type' as that's determined by the context in which the matcher
-// is used. You can assign the result of expression Foo(p1, ..., pk)
-// to a variable of type FooMatcherPk<p1_type, ..., pk_type>. This
-// can be useful when composing matchers.
-//
-// While you can instantiate a matcher template with reference types,
-// passing the parameters by pointer usually makes your code more
-// readable. If, however, you still want to pass a parameter by
-// reference, be aware that in the failure message generated by the
-// matcher you will see the value of the referenced object but not its
-// address.
-//
-// Explaining Match Results
-// ========================
-//
-// Sometimes the matcher description alone isn't enough to explain why
-// the match has failed or succeeded. For example, when expecting a
-// long string, it can be very helpful to also print the diff between
-// the expected string and the actual one. To achieve that, you can
-// optionally stream additional information to a special variable
-// named result_listener, whose type is a pointer to class
-// MatchResultListener:
-//
-// MATCHER_P(EqualsLongString, str, "") {
-// if (arg == str) return true;
-//
-// *result_listener << "the difference: "
-/// << DiffStrings(str, arg);
-// return false;
-// }
-//
-// Overloading Matchers
-// ====================
-//
-// You can overload matchers with different numbers of parameters:
-//
-// MATCHER_P(Blah, a, description_string1) { ... }
-// MATCHER_P2(Blah, a, b, description_string2) { ... }
-//
-// Caveats
-// =======
-//
-// When defining a new matcher, you should also consider implementing
-// MatcherInterface or using MakePolymorphicMatcher(). These
-// approaches require more work than the MATCHER* macros, but also
-// give you more control on the types of the value being matched and
-// the matcher parameters, which may leads to better compiler error
-// messages when the matcher is used wrong. They also allow
-// overloading matchers based on parameter types (as opposed to just
-// based on the number of parameters).
-//
-// MATCHER*() can only be used in a namespace scope. The reason is
-// that C++ doesn't yet allow function-local types to be used to
-// instantiate templates. The up-coming C++0x standard will fix this.
-// Once that's done, we'll consider supporting using MATCHER*() inside
-// a function.
-//
-// More Information
-// ================
-//
-// To learn more about using these macros, please search for 'MATCHER'
-// on http://code.google.com/p/googlemock/wiki/CookBook.
-
-#define MATCHER(name, description)\
- class name##Matcher {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl()\
- {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<>()));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>());\
- }\
- name##Matcher() {\
- }\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##Matcher);\
- };\
- inline name##Matcher name() {\
- return name##Matcher();\
- }\
- template <typename arg_type>\
- bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P(name, p0, description)\
- template <typename p0##_type>\
- class name##MatcherP {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- explicit gmock_Impl(p0##_type gmock_p0)\
- : p0(gmock_p0) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type>(p0)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0));\
- }\
- name##MatcherP(p0##_type gmock_p0) : p0(gmock_p0) {\
- }\
- p0##_type p0;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP);\
- };\
- template <typename p0##_type>\
- inline name##MatcherP<p0##_type> name(p0##_type p0) {\
- return name##MatcherP<p0##_type>(p0);\
- }\
- template <typename p0##_type>\
- template <typename arg_type>\
- bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P2(name, p0, p1, description)\
- template <typename p0##_type, typename p1##_type>\
- class name##MatcherP2 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
- : p0(gmock_p0), p1(gmock_p1) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type>(p0, p1)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1));\
- }\
- name##MatcherP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
- p1(gmock_p1) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP2);\
- };\
- template <typename p0##_type, typename p1##_type>\
- inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
- p1##_type p1) {\
- return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\
- }\
- template <typename p0##_type, typename p1##_type>\
- template <typename arg_type>\
- bool name##MatcherP2<p0##_type, \
- p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P3(name, p0, p1, p2, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- class name##MatcherP3 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
- p2)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2));\
- }\
- name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP3);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2) {\
- return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- template <typename arg_type>\
- bool name##MatcherP3<p0##_type, p1##_type, \
- p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P4(name, p0, p1, p2, p3, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- class name##MatcherP4 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, \
- p3##_type>(p0, p1, p2, p3)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3));\
- }\
- name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP4);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \
- p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3) {\
- return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
- p1, p2, p3);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- template <typename arg_type>\
- bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
- p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- class name##MatcherP5 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>(p0, p1, p2, p3, p4)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\
- }\
- name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, \
- p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP5);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4) {\
- return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>(p0, p1, p2, p3, p4);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- template <typename arg_type>\
- bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- class name##MatcherP6 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\
- }\
- name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP6);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3, p4##_type p4, p5##_type p5) {\
- return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- template <typename arg_type>\
- bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- class name##MatcherP7 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
- p6)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\
- }\
- name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
- p6(gmock_p6) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP7);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
- p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6) {\
- return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- template <typename arg_type>\
- bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- class name##MatcherP8 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
- p3, p4, p5, p6, p7)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\
- }\
- name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, \
- p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP8);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6, p7##_type p7) {\
- return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
- p6, p7);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- template <typename arg_type>\
- bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, \
- p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- class name##MatcherP9 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, \
- p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\
- }\
- name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP9);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, \
- p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
- p8##_type p8) {\
- return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
- p3, p4, p5, p6, p7, p8);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- template <typename arg_type>\
- bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, \
- p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- class name##MatcherP10 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
- p9##_type gmock_p9)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8), p9(gmock_p9) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\
- }\
- name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP10);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
- p9##_type p9) {\
- return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
- p1, p2, p3, p4, p5, p6, p7, p8, p9);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- template <typename arg_type>\
- bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some actions that depend on gmock-generated-actions.h.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-
-#include <algorithm>
-
-
-namespace testing {
-namespace internal {
-
-// Implements the Invoke(f) action. The template argument
-// FunctionImpl is the implementation type of f, which can be either a
-// function pointer or a functor. Invoke(f) can be used as an
-// Action<F> as long as f's type is compatible with F (i.e. f can be
-// assigned to a tr1::function<F>).
-template <typename FunctionImpl>
-class InvokeAction {
- public:
- // The c'tor makes a copy of function_impl (either a function
- // pointer or a functor).
- explicit InvokeAction(FunctionImpl function_impl)
- : function_impl_(function_impl) {}
-
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& args) {
- return InvokeHelper<Result, ArgumentTuple>::Invoke(function_impl_, args);
- }
-
- private:
- FunctionImpl function_impl_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeAction);
-};
-
-// Implements the Invoke(object_ptr, &Class::Method) action.
-template <class Class, typename MethodPtr>
-class InvokeMethodAction {
- public:
- InvokeMethodAction(Class* obj_ptr, MethodPtr method_ptr)
- : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {}
-
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& args) const {
- return InvokeHelper<Result, ArgumentTuple>::InvokeMethod(
- obj_ptr_, method_ptr_, args);
- }
-
- private:
- Class* const obj_ptr_;
- const MethodPtr method_ptr_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeMethodAction);
-};
-
-} // namespace internal
-
-// Various overloads for Invoke().
-
-// Creates an action that invokes 'function_impl' with the mock
-// function's arguments.
-template <typename FunctionImpl>
-PolymorphicAction<internal::InvokeAction<FunctionImpl> > Invoke(
- FunctionImpl function_impl) {
- return MakePolymorphicAction(
- internal::InvokeAction<FunctionImpl>(function_impl));
-}
-
-// Creates an action that invokes the given method on the given object
-// with the mock function's arguments.
-template <class Class, typename MethodPtr>
-PolymorphicAction<internal::InvokeMethodAction<Class, MethodPtr> > Invoke(
- Class* obj_ptr, MethodPtr method_ptr) {
- return MakePolymorphicAction(
- internal::InvokeMethodAction<Class, MethodPtr>(obj_ptr, method_ptr));
-}
-
-// WithoutArgs(inner_action) can be used in a mock function with a
-// non-empty argument list to perform inner_action, which takes no
-// argument. In other words, it adapts an action accepting no
-// argument to one that accepts (and ignores) arguments.
-template <typename InnerAction>
-inline internal::WithArgsAction<InnerAction>
-WithoutArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction>(action);
-}
-
-// WithArg<k>(an_action) creates an action that passes the k-th
-// (0-based) argument of the mock function to an_action and performs
-// it. It adapts an action accepting one argument to one that accepts
-// multiple arguments. For convenience, we also provide
-// WithArgs<k>(an_action) (defined below) as a synonym.
-template <int k, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k>
-WithArg(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k>(action);
-}
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Action ReturnArg<k>() returns the k-th argument of the mock function.
-ACTION_TEMPLATE(ReturnArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- return std::tr1::get<k>(args);
-}
-
-// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the
-// mock function to *pointer.
-ACTION_TEMPLATE(SaveArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(pointer)) {
- *pointer = ::std::tr1::get<k>(args);
-}
-
-// Action SaveArgPointee<k>(pointer) saves the value pointed to
-// by the k-th (0-based) argument of the mock function to *pointer.
-ACTION_TEMPLATE(SaveArgPointee,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(pointer)) {
- *pointer = *::std::tr1::get<k>(args);
-}
-
-// Action SetArgReferee<k>(value) assigns 'value' to the variable
-// referenced by the k-th (0-based) argument of the mock function.
-ACTION_TEMPLATE(SetArgReferee,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(value)) {
- typedef typename ::std::tr1::tuple_element<k, args_type>::type argk_type;
- // Ensures that argument #k is a reference. If you get a compiler
- // error on the next line, you are using SetArgReferee<k>(value) in
- // a mock function whose k-th (0-based) argument is not a reference.
- GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,
- SetArgReferee_must_be_used_with_a_reference_argument);
- ::std::tr1::get<k>(args) = value;
-}
-
-// Action SetArrayArgument<k>(first, last) copies the elements in
-// source range [first, last) to the array pointed to by the k-th
-// (0-based) argument, which can be either a pointer or an
-// iterator. The action does not take ownership of the elements in the
-// source range.
-ACTION_TEMPLATE(SetArrayArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_2_VALUE_PARAMS(first, last)) {
- // Microsoft compiler deprecates ::std::copy, so we want to suppress warning
- // 4996 (Function call with parameters that may be unsafe) there.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
-#endif
- ::std::copy(first, last, ::std::tr1::get<k>(args));
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-}
-
-// Action DeleteArg<k>() deletes the k-th (0-based) argument of the mock
-// function.
-ACTION_TEMPLATE(DeleteArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- delete ::std::tr1::get<k>(args);
-}
-
-// This action returns the value pointed to by 'pointer'.
-ACTION_P(ReturnPointee, pointer) { return *pointer; }
-
-// Action Throw(exception) can be used in a mock function of any type
-// to throw the given exception. Any copyable value can be thrown.
-#if GTEST_HAS_EXCEPTIONS
-
-// Suppresses the 'unreachable code' warning that VC generates in opt modes.
-# ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4702) // Temporarily disables warning 4702.
-# endif
-ACTION_P(Throw, exception) { throw exception; }
-# ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-# endif
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements class templates NiceMock and StrictMock.
-//
-// Given a mock class MockFoo that is created using Google Mock,
-// NiceMock<MockFoo> is a subclass of MockFoo that allows
-// uninteresting calls (i.e. calls to mock methods that have no
-// EXPECT_CALL specs), and StrictMock<MockFoo> is a subclass of
-// MockFoo that treats all uninteresting calls as errors.
-//
-// NiceMock and StrictMock "inherits" the constructors of their
-// respective base class, with up-to 10 arguments. Therefore you can
-// write NiceMock<MockFoo>(5, "a") to construct a nice mock where
-// MockFoo has a constructor that accepts (int, const char*), for
-// example.
-//
-// A known limitation is that NiceMock<MockFoo> and
-// StrictMock<MockFoo> only works for mock methods defined using the
-// MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. If a
-// mock method is defined in a base class of MockFoo, the "nice" or
-// "strict" modifier may not affect it, depending on the compiler. In
-// particular, nesting NiceMock and StrictMock is NOT supported.
-//
-// Another known limitation is that the constructors of the base mock
-// cannot have arguments passed by non-const reference, which are
-// banned by the Google C++ style guide anyway.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-
-
-namespace testing {
-
-template <class MockClass>
-class NiceMock : public MockClass {
- public:
- // We don't factor out the constructor body to a common method, as
- // we have to avoid a possible clash with members of MockClass.
- NiceMock() {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- // C++ doesn't (yet) allow inheritance of constructors, so we have
- // to define it for each arity.
- template <typename A1>
- explicit NiceMock(const A1& a1) : MockClass(a1) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
- template <typename A1, typename A2>
- NiceMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3>
- NiceMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4>
- NiceMock(const A1& a1, const A2& a2, const A3& a3,
- const A4& a4) : MockClass(a1, a2, a3, a4) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
- a6, a7) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
- a2, a3, a4, a5, a6, a7, a8) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8,
- const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9, typename A10>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
- const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- virtual ~NiceMock() {
- ::testing::Mock::UnregisterCallReaction(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock);
-};
-
-template <class MockClass>
-class StrictMock : public MockClass {
- public:
- // We don't factor out the constructor body to a common method, as
- // we have to avoid a possible clash with members of MockClass.
- StrictMock() {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1>
- explicit StrictMock(const A1& a1) : MockClass(a1) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
- template <typename A1, typename A2>
- StrictMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3>
- StrictMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4>
- StrictMock(const A1& a1, const A2& a2, const A3& a3,
- const A4& a4) : MockClass(a1, a2, a3, a4) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
- a6, a7) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
- a2, a3, a4, a5, a6, a7, a8) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8,
- const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9, typename A10>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
- const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- virtual ~StrictMock() {
- ::testing::Mock::UnregisterCallReaction(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock);
-};
-
-// The following specializations catch some (relatively more common)
-// user errors of nesting nice and strict mocks. They do NOT catch
-// all possible errors.
-
-// These specializations are declared but not defined, as NiceMock and
-// StrictMock cannot be nested.
-template <typename MockClass>
-class NiceMock<NiceMock<MockClass> >;
-template <typename MockClass>
-class NiceMock<StrictMock<MockClass> >;
-template <typename MockClass>
-class StrictMock<NiceMock<MockClass> >;
-template <typename MockClass>
-class StrictMock<StrictMock<MockClass> >;
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-
-namespace testing {
-
-// Declares Google Mock flags that we want a user to use programmatically.
-GMOCK_DECLARE_bool_(catch_leaked_mocks);
-GMOCK_DECLARE_string_(verbose);
-
-// Initializes Google Mock. This must be called before running the
-// tests. In particular, it parses the command line for the flags
-// that Google Mock recognizes. Whenever a Google Mock flag is seen,
-// it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Mock flag variables are
-// updated.
-//
-// Since Google Test is needed for Google Mock to work, this function
-// also initializes Google Test and parses its flags, if that hasn't
-// been done.
-void InitGoogleMock(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleMock(int* argc, wchar_t** argv);
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock_main.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock_main.cc
deleted file mode 100644
index 9d8aea224..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gmock_main.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include <iostream>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-// MS C++ compiler/linker has a bug on Windows (not on Windows CE), which
-// causes a link error when _tmain is defined in a static library and UNICODE
-// is enabled. For this reason instead of _tmain, main function is used on
-// Windows. See the following link to track the current status of this bug:
-// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT
-#if GTEST_OS_WINDOWS_MOBILE
-# include <tchar.h> // NOLINT
-
-int _tmain(int argc, TCHAR** argv) {
-#else
-int main(int argc, char** argv) {
-#endif // GTEST_OS_WINDOWS_MOBILE
- std::cout << "Running main() from gmock_main.cc\n";
- // Since Google Mock depends on Google Test, InitGoogleMock() is
- // also responsible for initializing Google Test. Therefore there's
- // no need for calling testing::InitGoogleTest() separately.
- testing::InitGoogleMock(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gtest/gtest.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gtest/gtest.h
deleted file mode 100644
index 3143bd679..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/fused-src/gtest/gtest.h
+++ /dev/null
@@ -1,19537 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the public API for Google Test. It should be
-// included by any test program that uses Google Test.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
-// program!
-//
-// Acknowledgment: Google Test borrowed the idea of automatic test
-// registration from Barthelemy Dagenais' (barthelemy@prologique.com)
-// easyUnit framework.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_H_
-
-#include <limits>
-#include <vector>
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file declares functions and macros used internally by
-// Google Test. They are subject to change without notice.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan)
-//
-// Low-level types and utilities for porting Google Test to various
-// platforms. They are subject to change without notice. DO NOT USE
-// THEM IN USER CODE.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-
-// The user can define the following macros in the build script to
-// control Google Test's behavior. If the user doesn't define a macro
-// in this list, Google Test will define it.
-//
-// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2)
-// is/isn't available.
-// GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions
-// are enabled.
-// GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string
-// is/isn't available (some systems define
-// ::string, which is different to std::string).
-// GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string
-// is/isn't available (some systems define
-// ::wstring, which is different to std::wstring).
-// GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular
-// expressions are/aren't available.
-// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h>
-// is/isn't available.
-// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't
-// enabled.
-// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that
-// std::wstring does/doesn't work (Google Test can
-// be used where std::wstring is unavailable).
-// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple
-// is/isn't available.
-// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the
-// compiler supports Microsoft's "Structured
-// Exception Handling".
-// GTEST_HAS_STREAM_REDIRECTION
-// - Define it to 1/0 to indicate whether the
-// platform supports I/O stream redirection using
-// dup() and dup2().
-// GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google
-// Test's own tr1 tuple implementation should be
-// used. Unused when the user sets
-// GTEST_HAS_TR1_TUPLE to 0.
-// GTEST_LINKED_AS_SHARED_LIBRARY
-// - Define to 1 when compiling tests that use
-// Google Test as a shared library (known as
-// DLL on Windows).
-// GTEST_CREATE_SHARED_LIBRARY
-// - Define to 1 when compiling Google Test itself
-// as a shared library.
-
-// This header defines the following utilities:
-//
-// Macros indicating the current platform (defined to 1 if compiled on
-// the given platform; otherwise undefined):
-// GTEST_OS_AIX - IBM AIX
-// GTEST_OS_CYGWIN - Cygwin
-// GTEST_OS_HPUX - HP-UX
-// GTEST_OS_LINUX - Linux
-// GTEST_OS_LINUX_ANDROID - Google Android
-// GTEST_OS_MAC - Mac OS X
-// GTEST_OS_NACL - Google Native Client (NaCl)
-// GTEST_OS_SOLARIS - Sun Solaris
-// GTEST_OS_SYMBIAN - Symbian
-// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
-// GTEST_OS_WINDOWS_DESKTOP - Windows Desktop
-// GTEST_OS_WINDOWS_MINGW - MinGW
-// GTEST_OS_WINDOWS_MOBILE - Windows Mobile
-// GTEST_OS_ZOS - z/OS
-//
-// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the
-// most stable support. Since core members of the Google Test project
-// don't have access to other platforms, support for them may be less
-// stable. If you notice any problems on your platform, please notify
-// googletestframework@googlegroups.com (patches for fixing them are
-// even more welcome!).
-//
-// Note that it is possible that none of the GTEST_OS_* macros are defined.
-//
-// Macros indicating available Google Test features (defined to 1 if
-// the corresponding feature is supported; otherwise undefined):
-// GTEST_HAS_COMBINE - the Combine() function (for value-parameterized
-// tests)
-// GTEST_HAS_DEATH_TEST - death tests
-// GTEST_HAS_PARAM_TEST - value-parameterized tests
-// GTEST_HAS_TYPED_TEST - typed tests
-// GTEST_HAS_TYPED_TEST_P - type-parameterized tests
-// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
-// GTEST_HAS_POSIX_RE (see above) which users can
-// define themselves.
-// GTEST_USES_SIMPLE_RE - our own simple regex is used;
-// the above two are mutually exclusive.
-// GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().
-//
-// Macros for basic C++ coding:
-// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
-// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a
-// variable don't have to be used.
-// GTEST_DISALLOW_ASSIGN_ - disables operator=.
-// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
-// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
-//
-// Synchronization:
-// Mutex, MutexLock, ThreadLocal, GetThreadCount()
-// - synchronization primitives.
-// GTEST_IS_THREADSAFE - defined to 1 to indicate that the above
-// synchronization primitives have real implementations
-// and Google Test is thread-safe; or 0 otherwise.
-//
-// Template meta programming:
-// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only.
-// IteratorTraits - partial implementation of std::iterator_traits, which
-// is not available in libCstd when compiled with Sun C++.
-//
-// Smart pointers:
-// scoped_ptr - as in TR2.
-//
-// Regular expressions:
-// RE - a simple regular expression class using the POSIX
-// Extended Regular Expression syntax on UNIX-like
-// platforms, or a reduced regular exception syntax on
-// other platforms, including Windows.
-//
-// Logging:
-// GTEST_LOG_() - logs messages at the specified severity level.
-// LogToStderr() - directs all log messages to stderr.
-// FlushInfoLog() - flushes informational log messages.
-//
-// Stdout and stderr capturing:
-// CaptureStdout() - starts capturing stdout.
-// GetCapturedStdout() - stops capturing stdout and returns the captured
-// string.
-// CaptureStderr() - starts capturing stderr.
-// GetCapturedStderr() - stops capturing stderr and returns the captured
-// string.
-//
-// Integer types:
-// TypeWithSize - maps an integer to a int type.
-// Int32, UInt32, Int64, UInt64, TimeInMillis
-// - integers of known sizes.
-// BiggestInt - the biggest signed integer type.
-//
-// Command-line utilities:
-// GTEST_FLAG() - references a flag.
-// GTEST_DECLARE_*() - declares a flag.
-// GTEST_DEFINE_*() - defines a flag.
-// GetArgvs() - returns the command line as a vector of strings.
-//
-// Environment variable utilities:
-// GetEnv() - gets the value of an environment variable.
-// BoolFromGTestEnv() - parses a bool environment variable.
-// Int32FromGTestEnv() - parses an Int32 environment variable.
-// StringFromGTestEnv() - parses a string environment variable.
-
-#include <ctype.h> // for isspace, etc
-#include <stddef.h> // for ptrdiff_t
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#ifndef _WIN32_WCE
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif // !_WIN32_WCE
-
-#include <iostream> // NOLINT
-#include <sstream> // NOLINT
-#include <string> // NOLINT
-
-#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
-#define GTEST_FLAG_PREFIX_ "gtest_"
-#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
-#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
-#define GTEST_NAME_ "Google Test"
-#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
-
-// Determines the version of gcc that is used to compile this.
-#ifdef __GNUC__
-// 40302 means version 4.3.2.
-# define GTEST_GCC_VER_ \
- (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
-#endif // __GNUC__
-
-// Determines the platform on which Google Test is compiled.
-#ifdef __CYGWIN__
-# define GTEST_OS_CYGWIN 1
-#elif defined __SYMBIAN32__
-# define GTEST_OS_SYMBIAN 1
-#elif defined _WIN32
-# define GTEST_OS_WINDOWS 1
-# ifdef _WIN32_WCE
-# define GTEST_OS_WINDOWS_MOBILE 1
-# elif defined(__MINGW__) || defined(__MINGW32__)
-# define GTEST_OS_WINDOWS_MINGW 1
-# else
-# define GTEST_OS_WINDOWS_DESKTOP 1
-# endif // _WIN32_WCE
-#elif defined __APPLE__
-# define GTEST_OS_MAC 1
-#elif defined __linux__
-# define GTEST_OS_LINUX 1
-# ifdef ANDROID
-# define GTEST_OS_LINUX_ANDROID 1
-# endif // ANDROID
-#elif defined __MVS__
-# define GTEST_OS_ZOS 1
-#elif defined(__sun) && defined(__SVR4)
-# define GTEST_OS_SOLARIS 1
-#elif defined(_AIX)
-# define GTEST_OS_AIX 1
-#elif defined(__hpux)
-# define GTEST_OS_HPUX 1
-#elif defined __native_client__
-# define GTEST_OS_NACL 1
-#endif // __CYGWIN__
-
-// Brings in definitions for functions used in the testing::internal::posix
-// namespace (read, write, close, chdir, isatty, stat). We do not currently
-// use them on Windows Mobile.
-#if !GTEST_OS_WINDOWS
-// This assumes that non-Windows OSes provide unistd.h. For OSes where this
-// is not the case, we need to include headers that provide the functions
-// mentioned above.
-# include <unistd.h>
-# if !GTEST_OS_NACL
-// TODO(vladl@google.com): Remove this condition when Native Client SDK adds
-// strings.h (tracked in
-// http://code.google.com/p/nativeclient/issues/detail?id=1175).
-# include <strings.h> // Native Client doesn't provide strings.h.
-# endif
-#elif !GTEST_OS_WINDOWS_MOBILE
-# include <direct.h>
-# include <io.h>
-#endif
-
-// Defines this to true iff Google Test can use POSIX regular expressions.
-#ifndef GTEST_HAS_POSIX_RE
-# define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
-#endif
-
-#if GTEST_HAS_POSIX_RE
-
-// On some platforms, <regex.h> needs someone to define size_t, and
-// won't compile otherwise. We can #include it here as we already
-// included <stdlib.h>, which is guaranteed to define size_t through
-// <stddef.h>.
-# include <regex.h> // NOLINT
-
-# define GTEST_USES_POSIX_RE 1
-
-#elif GTEST_OS_WINDOWS
-
-// <regex.h> is not available on Windows. Use our own simple regex
-// implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#else
-
-// <regex.h> may not be available on this platform. Use our own
-// simple regex implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#endif // GTEST_HAS_POSIX_RE
-
-#ifndef GTEST_HAS_EXCEPTIONS
-// The user didn't tell us whether exceptions are enabled, so we need
-// to figure it out.
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
-// macro to enable exceptions, so we'll do the same.
-// Assumes that exceptions are enabled by default.
-# ifndef _HAS_EXCEPTIONS
-# define _HAS_EXCEPTIONS 1
-# endif // _HAS_EXCEPTIONS
-# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
-# elif defined(__GNUC__) && __EXCEPTIONS
-// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__SUNPRO_CC)
-// Sun Pro CC supports exceptions. However, there is no compile-time way of
-// detecting whether they are enabled or not. Therefore, we assume that
-// they are enabled unless the user tells us otherwise.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__IBMCPP__) && __EXCEPTIONS
-// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__HP_aCC)
-// Exception handling is in effect by default in HP aCC compiler. It has to
-// be turned of by +noeh compiler option if desired.
-# define GTEST_HAS_EXCEPTIONS 1
-# else
-// For other compilers, we assume exceptions are disabled to be
-// conservative.
-# define GTEST_HAS_EXCEPTIONS 0
-# endif // defined(_MSC_VER) || defined(__BORLANDC__)
-#endif // GTEST_HAS_EXCEPTIONS
-
-#if !defined(GTEST_HAS_STD_STRING)
-// Even though we don't use this macro any longer, we keep it in case
-// some clients still depend on it.
-# define GTEST_HAS_STD_STRING 1
-#elif !GTEST_HAS_STD_STRING
-// The user told us that ::std::string isn't available.
-# error "Google Test cannot be used where ::std::string isn't available."
-#endif // !defined(GTEST_HAS_STD_STRING)
-
-#ifndef GTEST_HAS_GLOBAL_STRING
-// The user didn't tell us whether ::string is available, so we need
-// to figure it out.
-
-# define GTEST_HAS_GLOBAL_STRING 0
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#ifndef GTEST_HAS_STD_WSTRING
-// The user didn't tell us whether ::std::wstring is available, so we need
-// to figure it out.
-// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
-// is available.
-
-// Cygwin 1.7 and below doesn't support ::std::wstring.
-// Solaris' libc++ doesn't support it either. Android has
-// no support for it at least as recent as Froyo (2.2).
-# define GTEST_HAS_STD_WSTRING \
- (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
-
-#endif // GTEST_HAS_STD_WSTRING
-
-#ifndef GTEST_HAS_GLOBAL_WSTRING
-// The user didn't tell us whether ::wstring is available, so we need
-// to figure it out.
-# define GTEST_HAS_GLOBAL_WSTRING \
- (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// Determines whether RTTI is available.
-#ifndef GTEST_HAS_RTTI
-// The user didn't tell us whether RTTI is enabled, so we need to
-// figure it out.
-
-# ifdef _MSC_VER
-
-# ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled.
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif
-
-// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
-# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
-
-# ifdef __GXX_RTTI
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif // __GXX_RTTI
-
-// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
-// both the typeid and dynamic_cast features are present.
-# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
-
-# ifdef __RTTI_ALL__
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif
-
-# else
-
-// For all other compilers, we assume RTTI is enabled.
-# define GTEST_HAS_RTTI 1
-
-# endif // _MSC_VER
-
-#endif // GTEST_HAS_RTTI
-
-// It's this header's responsibility to #include <typeinfo> when RTTI
-// is enabled.
-#if GTEST_HAS_RTTI
-# include <typeinfo>
-#endif
-
-// Determines whether Google Test can use the pthreads library.
-#ifndef GTEST_HAS_PTHREAD
-// The user didn't tell us explicitly, so we assume pthreads support is
-// available on Linux and Mac.
-//
-// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
-// to your compiler flags.
-# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX)
-#endif // GTEST_HAS_PTHREAD
-
-#if GTEST_HAS_PTHREAD
-// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
-// true.
-# include <pthread.h> // NOLINT
-
-// For timespec and nanosleep, used below.
-# include <time.h> // NOLINT
-#endif
-
-// Determines whether Google Test can use tr1/tuple. You can define
-// this macro to 0 to prevent Google Test from using tuple (any
-// feature depending on tuple with be disabled in this mode).
-#ifndef GTEST_HAS_TR1_TUPLE
-// The user didn't tell us not to do it, so we assume it's OK.
-# define GTEST_HAS_TR1_TUPLE 1
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Determines whether Google Test's own tr1 tuple implementation
-// should be used.
-#ifndef GTEST_USE_OWN_TR1_TUPLE
-// The user didn't tell us, so we need to figure it out.
-
-// We use our own TR1 tuple if we aren't sure the user has an
-// implementation of it already. At this time, GCC 4.0.0+ and MSVC
-// 2010 are the only mainstream compilers that come with a TR1 tuple
-// implementation. NVIDIA's CUDA NVCC compiler pretends to be GCC by
-// defining __GNUC__ and friends, but cannot compile GCC's tuple
-// implementation. MSVC 2008 (9.0) provides TR1 tuple in a 323 MB
-// Feature Pack download, which we cannot assume the user has.
-# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000)) \
- || _MSC_VER >= 1600
-# define GTEST_USE_OWN_TR1_TUPLE 0
-# else
-# define GTEST_USE_OWN_TR1_TUPLE 1
-# endif
-
-#endif // GTEST_USE_OWN_TR1_TUPLE
-
-// To avoid conditional compilation everywhere, we make it
-// gtest-port.h's responsibility to #include the header implementing
-// tr1/tuple.
-#if GTEST_HAS_TR1_TUPLE
-
-# if GTEST_USE_OWN_TR1_TUPLE
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2009 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements a subset of TR1 tuple needed by Google Test and Google Mock.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-
-#include <utility> // For ::std::pair.
-
-// The compiler used in Symbian has a bug that prevents us from declaring the
-// tuple template as a friend (it complains that tuple is redefined). This
-// hack bypasses the bug by declaring the members that should otherwise be
-// private as public.
-// Sun Studio versions < 12 also have the above bug.
-#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:
-#else
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \
- template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
- private:
-#endif
-
-// GTEST_n_TUPLE_(T) is the type of an n-tuple.
-#define GTEST_0_TUPLE_(T) tuple<>
-#define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
- void, void, void>
-#define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
- void, void, void>
-#define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
- void, void, void>
-#define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
- void, void, void>
-#define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
- void, void, void>
-#define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
- void, void, void>
-#define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- void, void, void>
-#define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, void, void>
-#define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, T##8, void>
-#define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, T##8, T##9>
-
-// GTEST_n_TYPENAMES_(T) declares a list of n typenames.
-#define GTEST_0_TYPENAMES_(T)
-#define GTEST_1_TYPENAMES_(T) typename T##0
-#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1
-#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2
-#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3
-#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4
-#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5
-#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6
-#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, typename T##7
-#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, \
- typename T##7, typename T##8
-#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, \
- typename T##7, typename T##8, typename T##9
-
-// In theory, defining stuff in the ::std namespace is undefined
-// behavior. We can do this as we are playing the role of a standard
-// library vendor.
-namespace std {
-namespace tr1 {
-
-template <typename T0 = void, typename T1 = void, typename T2 = void,
- typename T3 = void, typename T4 = void, typename T5 = void,
- typename T6 = void, typename T7 = void, typename T8 = void,
- typename T9 = void>
-class tuple;
-
-// Anything in namespace gtest_internal is Google Test's INTERNAL
-// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.
-namespace gtest_internal {
-
-// ByRef<T>::type is T if T is a reference; otherwise it's const T&.
-template <typename T>
-struct ByRef { typedef const T& type; }; // NOLINT
-template <typename T>
-struct ByRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for ByRef.
-#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
-
-// AddRef<T>::type is T if T is a reference; otherwise it's T&. This
-// is the same as tr1::add_reference<T>::type.
-template <typename T>
-struct AddRef { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for AddRef.
-#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type
-
-// A helper for implementing get<k>().
-template <int k> class Get;
-
-// A helper for implementing tuple_element<k, T>. kIndexValid is true
-// iff k < the number of fields in tuple type T.
-template <bool kIndexValid, int kIndex, class Tuple>
-struct TupleElement;
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 0, GTEST_10_TUPLE_(T)> { typedef T0 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 1, GTEST_10_TUPLE_(T)> { typedef T1 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 2, GTEST_10_TUPLE_(T)> { typedef T2 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 3, GTEST_10_TUPLE_(T)> { typedef T3 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 4, GTEST_10_TUPLE_(T)> { typedef T4 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 5, GTEST_10_TUPLE_(T)> { typedef T5 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 6, GTEST_10_TUPLE_(T)> { typedef T6 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 7, GTEST_10_TUPLE_(T)> { typedef T7 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 8, GTEST_10_TUPLE_(T)> { typedef T8 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 9, GTEST_10_TUPLE_(T)> { typedef T9 type; };
-
-} // namespace gtest_internal
-
-template <>
-class tuple<> {
- public:
- tuple() {}
- tuple(const tuple& /* t */) {}
- tuple& operator=(const tuple& /* t */) { return *this; }
-};
-
-template <GTEST_1_TYPENAMES_(T)>
-class GTEST_1_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
-
- tuple(const tuple& t) : f0_(t.f0_) {}
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple& operator=(const GTEST_1_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {
- f0_ = t.f0_;
- return *this;
- }
-
- T0 f0_;
-};
-
-template <GTEST_2_TYPENAMES_(T)>
-class GTEST_2_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
- f1_(f1) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
- template <typename U0, typename U1>
- tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple& operator=(const GTEST_2_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
- template <typename U0, typename U1>
- tuple& operator=(const ::std::pair<U0, U1>& p) {
- f0_ = p.first;
- f1_ = p.second;
- return *this;
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
-};
-
-template <GTEST_3_TYPENAMES_(T)>
-class GTEST_3_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple& operator=(const GTEST_3_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
-};
-
-template <GTEST_4_TYPENAMES_(T)>
-class GTEST_4_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple& operator=(const GTEST_4_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
-};
-
-template <GTEST_5_TYPENAMES_(T)>
-class GTEST_5_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3,
- GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_) {}
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple& operator=(const GTEST_5_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
-};
-
-template <GTEST_6_TYPENAMES_(T)>
-class GTEST_6_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_) {}
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple& operator=(const GTEST_6_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
-};
-
-template <GTEST_7_TYPENAMES_(T)>
-class GTEST_7_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3), f4_(f4), f5_(f5), f6_(f6) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple& operator=(const GTEST_7_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
-};
-
-template <GTEST_8_TYPENAMES_(T)>
-class GTEST_8_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6,
- GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5), f6_(f6), f7_(f7) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple& operator=(const GTEST_8_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
-};
-
-template <GTEST_9_TYPENAMES_(T)>
-class GTEST_9_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
- GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5), f6_(f6), f7_(f7), f8_(f8) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple& operator=(const GTEST_9_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- f8_ = t.f8_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
- T8 f8_;
-};
-
-template <GTEST_10_TYPENAMES_(T)>
-class tuple {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
- f9_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
- GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {}
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_),
- f9_(t.f9_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple& operator=(const GTEST_10_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- f8_ = t.f8_;
- f9_ = t.f9_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
- T8 f8_;
- T9 f9_;
-};
-
-// 6.1.3.2 Tuple creation functions.
-
-// Known limitations: we don't support passing an
-// std::tr1::reference_wrapper<T> to make_tuple(). And we don't
-// implement tie().
-
-inline tuple<> make_tuple() { return tuple<>(); }
-
-template <GTEST_1_TYPENAMES_(T)>
-inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) {
- return GTEST_1_TUPLE_(T)(f0);
-}
-
-template <GTEST_2_TYPENAMES_(T)>
-inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) {
- return GTEST_2_TUPLE_(T)(f0, f1);
-}
-
-template <GTEST_3_TYPENAMES_(T)>
-inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) {
- return GTEST_3_TUPLE_(T)(f0, f1, f2);
-}
-
-template <GTEST_4_TYPENAMES_(T)>
-inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3) {
- return GTEST_4_TUPLE_(T)(f0, f1, f2, f3);
-}
-
-template <GTEST_5_TYPENAMES_(T)>
-inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4) {
- return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4);
-}
-
-template <GTEST_6_TYPENAMES_(T)>
-inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5) {
- return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5);
-}
-
-template <GTEST_7_TYPENAMES_(T)>
-inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6) {
- return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6);
-}
-
-template <GTEST_8_TYPENAMES_(T)>
-inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) {
- return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7);
-}
-
-template <GTEST_9_TYPENAMES_(T)>
-inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
- const T8& f8) {
- return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8);
-}
-
-template <GTEST_10_TYPENAMES_(T)>
-inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
- const T8& f8, const T9& f9) {
- return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
-}
-
-// 6.1.3.3 Tuple helper classes.
-
-template <typename Tuple> struct tuple_size;
-
-template <GTEST_0_TYPENAMES_(T)>
-struct tuple_size<GTEST_0_TUPLE_(T)> { static const int value = 0; };
-
-template <GTEST_1_TYPENAMES_(T)>
-struct tuple_size<GTEST_1_TUPLE_(T)> { static const int value = 1; };
-
-template <GTEST_2_TYPENAMES_(T)>
-struct tuple_size<GTEST_2_TUPLE_(T)> { static const int value = 2; };
-
-template <GTEST_3_TYPENAMES_(T)>
-struct tuple_size<GTEST_3_TUPLE_(T)> { static const int value = 3; };
-
-template <GTEST_4_TYPENAMES_(T)>
-struct tuple_size<GTEST_4_TUPLE_(T)> { static const int value = 4; };
-
-template <GTEST_5_TYPENAMES_(T)>
-struct tuple_size<GTEST_5_TUPLE_(T)> { static const int value = 5; };
-
-template <GTEST_6_TYPENAMES_(T)>
-struct tuple_size<GTEST_6_TUPLE_(T)> { static const int value = 6; };
-
-template <GTEST_7_TYPENAMES_(T)>
-struct tuple_size<GTEST_7_TUPLE_(T)> { static const int value = 7; };
-
-template <GTEST_8_TYPENAMES_(T)>
-struct tuple_size<GTEST_8_TUPLE_(T)> { static const int value = 8; };
-
-template <GTEST_9_TYPENAMES_(T)>
-struct tuple_size<GTEST_9_TUPLE_(T)> { static const int value = 9; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct tuple_size<GTEST_10_TUPLE_(T)> { static const int value = 10; };
-
-template <int k, class Tuple>
-struct tuple_element {
- typedef typename gtest_internal::TupleElement<
- k < (tuple_size<Tuple>::value), k, Tuple>::type type;
-};
-
-#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
-
-// 6.1.3.4 Element access.
-
-namespace gtest_internal {
-
-template <>
-class Get<0> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
- Field(Tuple& t) { return t.f0_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
- ConstField(const Tuple& t) { return t.f0_; }
-};
-
-template <>
-class Get<1> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
- Field(Tuple& t) { return t.f1_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
- ConstField(const Tuple& t) { return t.f1_; }
-};
-
-template <>
-class Get<2> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
- Field(Tuple& t) { return t.f2_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
- ConstField(const Tuple& t) { return t.f2_; }
-};
-
-template <>
-class Get<3> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
- Field(Tuple& t) { return t.f3_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
- ConstField(const Tuple& t) { return t.f3_; }
-};
-
-template <>
-class Get<4> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
- Field(Tuple& t) { return t.f4_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
- ConstField(const Tuple& t) { return t.f4_; }
-};
-
-template <>
-class Get<5> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
- Field(Tuple& t) { return t.f5_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
- ConstField(const Tuple& t) { return t.f5_; }
-};
-
-template <>
-class Get<6> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
- Field(Tuple& t) { return t.f6_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
- ConstField(const Tuple& t) { return t.f6_; }
-};
-
-template <>
-class Get<7> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
- Field(Tuple& t) { return t.f7_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
- ConstField(const Tuple& t) { return t.f7_; }
-};
-
-template <>
-class Get<8> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
- Field(Tuple& t) { return t.f8_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
- ConstField(const Tuple& t) { return t.f8_; }
-};
-
-template <>
-class Get<9> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
- Field(Tuple& t) { return t.f9_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
- ConstField(const Tuple& t) { return t.f9_; }
-};
-
-} // namespace gtest_internal
-
-template <int k, GTEST_10_TYPENAMES_(T)>
-GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
-get(GTEST_10_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::Field(t);
-}
-
-template <int k, GTEST_10_TYPENAMES_(T)>
-GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
-get(const GTEST_10_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::ConstField(t);
-}
-
-// 6.1.3.5 Relational operators
-
-// We only implement == and !=, as we don't have a need for the rest yet.
-
-namespace gtest_internal {
-
-// SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the
-// first k fields of t1 equals the first k fields of t2.
-// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if
-// k1 != k2.
-template <int kSize1, int kSize2>
-struct SameSizeTuplePrefixComparator;
-
-template <>
-struct SameSizeTuplePrefixComparator<0, 0> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {
- return true;
- }
-};
-
-template <int k>
-struct SameSizeTuplePrefixComparator<k, k> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& t1, const Tuple2& t2) {
- return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&
- ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);
- }
-};
-
-} // namespace gtest_internal
-
-template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
-inline bool operator==(const GTEST_10_TUPLE_(T)& t,
- const GTEST_10_TUPLE_(U)& u) {
- return gtest_internal::SameSizeTuplePrefixComparator<
- tuple_size<GTEST_10_TUPLE_(T)>::value,
- tuple_size<GTEST_10_TUPLE_(U)>::value>::Eq(t, u);
-}
-
-template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
-inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
- const GTEST_10_TUPLE_(U)& u) { return !(t == u); }
-
-// 6.1.4 Pairs.
-// Unimplemented.
-
-} // namespace tr1
-} // namespace std
-
-#undef GTEST_0_TUPLE_
-#undef GTEST_1_TUPLE_
-#undef GTEST_2_TUPLE_
-#undef GTEST_3_TUPLE_
-#undef GTEST_4_TUPLE_
-#undef GTEST_5_TUPLE_
-#undef GTEST_6_TUPLE_
-#undef GTEST_7_TUPLE_
-#undef GTEST_8_TUPLE_
-#undef GTEST_9_TUPLE_
-#undef GTEST_10_TUPLE_
-
-#undef GTEST_0_TYPENAMES_
-#undef GTEST_1_TYPENAMES_
-#undef GTEST_2_TYPENAMES_
-#undef GTEST_3_TYPENAMES_
-#undef GTEST_4_TYPENAMES_
-#undef GTEST_5_TYPENAMES_
-#undef GTEST_6_TYPENAMES_
-#undef GTEST_7_TYPENAMES_
-#undef GTEST_8_TYPENAMES_
-#undef GTEST_9_TYPENAMES_
-#undef GTEST_10_TYPENAMES_
-
-#undef GTEST_DECLARE_TUPLE_AS_FRIEND_
-#undef GTEST_BY_REF_
-#undef GTEST_ADD_REF_
-#undef GTEST_TUPLE_ELEMENT_
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-# elif GTEST_OS_SYMBIAN
-
-// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to
-// use STLport's tuple implementation, which unfortunately doesn't
-// work as the copy of STLport distributed with Symbian is incomplete.
-// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to
-// use its own tuple implementation.
-# ifdef BOOST_HAS_TR1_TUPLE
-# undef BOOST_HAS_TR1_TUPLE
-# endif // BOOST_HAS_TR1_TUPLE
-
-// This prevents <boost/tr1/detail/config.hpp>, which defines
-// BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>.
-# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
-# include <tuple>
-
-# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)
-// GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does
-// not conform to the TR1 spec, which requires the header to be <tuple>.
-
-# if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
-// Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
-// which is #included by <tr1/tuple>, to not compile when RTTI is
-// disabled. _TR1_FUNCTIONAL is the header guard for
-// <tr1/functional>. Hence the following #define is a hack to prevent
-// <tr1/functional> from being included.
-# define _TR1_FUNCTIONAL 1
-# include <tr1/tuple>
-# undef _TR1_FUNCTIONAL // Allows the user to #include
- // <tr1/functional> if he chooses to.
-# else
-# include <tr1/tuple> // NOLINT
-# endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
-
-# else
-// If the compiler is not GCC 4.0+, we assume the user is using a
-// spec-conforming TR1 implementation.
-# include <tuple> // NOLINT
-# endif // GTEST_USE_OWN_TR1_TUPLE
-
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Determines whether clone(2) is supported.
-// Usually it will only be available on Linux, excluding
-// Linux on the Itanium architecture.
-// Also see http://linux.die.net/man/2/clone.
-#ifndef GTEST_HAS_CLONE
-// The user didn't tell us, so we need to figure it out.
-
-# if GTEST_OS_LINUX && !defined(__ia64__)
-# define GTEST_HAS_CLONE 1
-# else
-# define GTEST_HAS_CLONE 0
-# endif // GTEST_OS_LINUX && !defined(__ia64__)
-
-#endif // GTEST_HAS_CLONE
-
-// Determines whether to support stream redirection. This is used to test
-// output correctness and to implement death tests.
-#ifndef GTEST_HAS_STREAM_REDIRECTION
-// By default, we assume that stream redirection is supported on all
-// platforms except known mobile ones.
-# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN
-# define GTEST_HAS_STREAM_REDIRECTION 0
-# else
-# define GTEST_HAS_STREAM_REDIRECTION 1
-# endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Determines whether to support death tests.
-// Google Test does not support death tests for VC 7.1 and earlier as
-// abort() in a VC 7.1 application compiled as GUI in debug config
-// pops up a dialog window that cannot be suppressed programmatically.
-#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
- (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
- GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX)
-# define GTEST_HAS_DEATH_TEST 1
-# include <vector> // NOLINT
-#endif
-
-// We don't support MSVC 7.1 with exceptions disabled now. Therefore
-// all the compilers we care about are adequate for supporting
-// value-parameterized tests.
-#define GTEST_HAS_PARAM_TEST 1
-
-// Determines whether to support type-driven tests.
-
-// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
-// Sun Pro CC, IBM Visual Age, and HP aCC support.
-#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
- defined(__IBMCPP__) || defined(__HP_aCC)
-# define GTEST_HAS_TYPED_TEST 1
-# define GTEST_HAS_TYPED_TEST_P 1
-#endif
-
-// Determines whether to support Combine(). This only makes sense when
-// value-parameterized tests are enabled. The implementation doesn't
-// work on Sun Studio since it doesn't understand templated conversion
-// operators.
-#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
-# define GTEST_HAS_COMBINE 1
-#endif
-
-// Determines whether the system compiler uses UTF-16 for encoding wide strings.
-#define GTEST_WIDE_STRING_USES_UTF16_ \
- (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
-
-// Determines whether test results can be streamed to a socket.
-#if GTEST_OS_LINUX
-# define GTEST_CAN_STREAM_RESULTS_ 1
-#endif
-
-// Defines some utility macros.
-
-// The GNU compiler emits a warning if nested "if" statements are followed by
-// an "else" statement and braces are not used to explicitly disambiguate the
-// "else" binding. This leads to problems with code like:
-//
-// if (gate)
-// ASSERT_*(condition) << "Some message";
-//
-// The "switch (0) case 0:" idiom is used to suppress this.
-#ifdef __INTEL_COMPILER
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_
-#else
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT
-#endif
-
-// Use this annotation at the end of a struct/class definition to
-// prevent the compiler from optimizing away instances that are never
-// used. This is useful when all interesting logic happens inside the
-// c'tor and / or d'tor. Example:
-//
-// struct Foo {
-// Foo() { ... }
-// } GTEST_ATTRIBUTE_UNUSED_;
-//
-// Also use it after a variable or parameter declaration to tell the
-// compiler the variable/parameter does not have to be used.
-#if defined(__GNUC__) && !defined(COMPILER_ICC)
-# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
-#else
-# define GTEST_ATTRIBUTE_UNUSED_
-#endif
-
-// A macro to disallow operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
-
-// A macro to disallow copy constructor and operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
-
-// Tell the compiler to warn about unused return values for functions declared
-// with this macro. The macro should be used on function declarations
-// following the argument list:
-//
-// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
-#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)
-# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
-#else
-# define GTEST_MUST_USE_RESULT_
-#endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC
-
-// Determine whether the compiler supports Microsoft's Structured Exception
-// Handling. This is supported by several Windows compilers but generally
-// does not exist on any other system.
-#ifndef GTEST_HAS_SEH
-// The user didn't tell us, so we need to figure it out.
-
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// These two compilers are known to support SEH.
-# define GTEST_HAS_SEH 1
-# else
-// Assume no SEH.
-# define GTEST_HAS_SEH 0
-# endif
-
-#endif // GTEST_HAS_SEH
-
-#ifdef _MSC_VER
-
-# if GTEST_LINKED_AS_SHARED_LIBRARY
-# define GTEST_API_ __declspec(dllimport)
-# elif GTEST_CREATE_SHARED_LIBRARY
-# define GTEST_API_ __declspec(dllexport)
-# endif
-
-#endif // _MSC_VER
-
-#ifndef GTEST_API_
-# define GTEST_API_
-#endif
-
-#ifdef __GNUC__
-// Ask the compiler to never inline a given function.
-# define GTEST_NO_INLINE_ __attribute__((noinline))
-#else
-# define GTEST_NO_INLINE_
-#endif
-
-namespace testing {
-
-class Message;
-
-namespace internal {
-
-class String;
-
-// The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-template <bool>
-struct CompileAssert {
-};
-
-#define GTEST_COMPILE_ASSERT_(expr, msg) \
- typedef ::testing::internal::CompileAssert<(bool(expr))> \
- msg[bool(expr) ? 1 : -1]
-
-// Implementation details of GTEST_COMPILE_ASSERT_:
-//
-// - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1
-// elements (and thus is invalid) when the expression is false.
-//
-// - The simpler definition
-//
-// #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1]
-//
-// does not work, as gcc supports variable-length arrays whose sizes
-// are determined at run-time (this is gcc's extension and not part
-// of the C++ standard). As a result, gcc fails to reject the
-// following code with the simple definition:
-//
-// int foo;
-// GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is
-// // not a compile-time constant.
-//
-// - By using the type CompileAssert<(bool(expr))>, we ensures that
-// expr is a compile-time constant. (Template arguments must be
-// determined at compile-time.)
-//
-// - The outter parentheses in CompileAssert<(bool(expr))> are necessary
-// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
-//
-// CompileAssert<bool(expr)>
-//
-// instead, these compilers will refuse to compile
-//
-// GTEST_COMPILE_ASSERT_(5 > 0, some_message);
-//
-// (They seem to think the ">" in "5 > 0" marks the end of the
-// template argument list.)
-//
-// - The array size is (bool(expr) ? 1 : -1), instead of simply
-//
-// ((expr) ? 1 : -1).
-//
-// This is to avoid running into a bug in MS VC 7.1, which
-// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
-
-// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.
-//
-// This template is declared, but intentionally undefined.
-template <typename T1, typename T2>
-struct StaticAssertTypeEqHelper;
-
-template <typename T>
-struct StaticAssertTypeEqHelper<T, T> {};
-
-#if GTEST_HAS_GLOBAL_STRING
-typedef ::string string;
-#else
-typedef ::std::string string;
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-typedef ::wstring wstring;
-#elif GTEST_HAS_STD_WSTRING
-typedef ::std::wstring wstring;
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// A helper for suppressing warnings on constant condition. It just
-// returns 'condition'.
-GTEST_API_ bool IsTrue(bool condition);
-
-// Defines scoped_ptr.
-
-// This implementation of scoped_ptr is PARTIAL - it only contains
-// enough stuff to satisfy Google Test's need.
-template <typename T>
-class scoped_ptr {
- public:
- typedef T element_type;
-
- explicit scoped_ptr(T* p = NULL) : ptr_(p) {}
- ~scoped_ptr() { reset(); }
-
- T& operator*() const { return *ptr_; }
- T* operator->() const { return ptr_; }
- T* get() const { return ptr_; }
-
- T* release() {
- T* const ptr = ptr_;
- ptr_ = NULL;
- return ptr;
- }
-
- void reset(T* p = NULL) {
- if (p != ptr_) {
- if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type.
- delete ptr_;
- }
- ptr_ = p;
- }
- }
- private:
- T* ptr_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr);
-};
-
-// Defines RE.
-
-// A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
-// Regular Expression syntax.
-class GTEST_API_ RE {
- public:
- // A copy constructor is required by the Standard to initialize object
- // references from r-values.
- RE(const RE& other) { Init(other.pattern()); }
-
- // Constructs an RE from a string.
- RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT
-
-#if GTEST_HAS_GLOBAL_STRING
-
- RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
- RE(const char* regex) { Init(regex); } // NOLINT
- ~RE();
-
- // Returns the string representation of the regex.
- const char* pattern() const { return pattern_; }
-
- // FullMatch(str, re) returns true iff regular expression re matches
- // the entire str.
- // PartialMatch(str, re) returns true iff regular expression re
- // matches a substring of str (including str itself).
- //
- // TODO(wan@google.com): make FullMatch() and PartialMatch() work
- // when str contains NUL characters.
- static bool FullMatch(const ::std::string& str, const RE& re) {
- return FullMatch(str.c_str(), re);
- }
- static bool PartialMatch(const ::std::string& str, const RE& re) {
- return PartialMatch(str.c_str(), re);
- }
-
-#if GTEST_HAS_GLOBAL_STRING
-
- static bool FullMatch(const ::string& str, const RE& re) {
- return FullMatch(str.c_str(), re);
- }
- static bool PartialMatch(const ::string& str, const RE& re) {
- return PartialMatch(str.c_str(), re);
- }
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
- static bool FullMatch(const char* str, const RE& re);
- static bool PartialMatch(const char* str, const RE& re);
-
- private:
- void Init(const char* regex);
-
- // We use a const char* instead of a string, as Google Test may be used
- // where string is not available. We also do not use Google Test's own
- // String type here, in order to simplify dependencies between the
- // files.
- const char* pattern_;
- bool is_valid_;
-
-#if GTEST_USES_POSIX_RE
-
- regex_t full_regex_; // For FullMatch().
- regex_t partial_regex_; // For PartialMatch().
-
-#else // GTEST_USES_SIMPLE_RE
-
- const char* full_pattern_; // For FullMatch();
-
-#endif
-
- GTEST_DISALLOW_ASSIGN_(RE);
-};
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
- int line);
-
-// Defines logging utilities:
-// GTEST_LOG_(severity) - logs messages at the specified severity level. The
-// message itself is streamed into the macro.
-// LogToStderr() - directs all log messages to stderr.
-// FlushInfoLog() - flushes informational log messages.
-
-enum GTestLogSeverity {
- GTEST_INFO,
- GTEST_WARNING,
- GTEST_ERROR,
- GTEST_FATAL
-};
-
-// Formats log entry severity, provides a stream object for streaming the
-// log message, and terminates the message with a newline when going out of
-// scope.
-class GTEST_API_ GTestLog {
- public:
- GTestLog(GTestLogSeverity severity, const char* file, int line);
-
- // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
- ~GTestLog();
-
- ::std::ostream& GetStream() { return ::std::cerr; }
-
- private:
- const GTestLogSeverity severity_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);
-};
-
-#define GTEST_LOG_(severity) \
- ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
- __FILE__, __LINE__).GetStream()
-
-inline void LogToStderr() {}
-inline void FlushInfoLog() { fflush(NULL); }
-
-// INTERNAL IMPLEMENTATION - DO NOT USE.
-//
-// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
-// is not satisfied.
-// Synopsys:
-// GTEST_CHECK_(boolean_condition);
-// or
-// GTEST_CHECK_(boolean_condition) << "Additional message";
-//
-// This checks the condition and if the condition is not satisfied
-// it prints message about the condition violation, including the
-// condition itself, plus additional message streamed into it, if any,
-// and then it aborts the program. It aborts the program irrespective of
-// whether it is built in the debug mode or not.
-#define GTEST_CHECK_(condition) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::IsTrue(condition)) \
- ; \
- else \
- GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
-
-// An all-mode assert to verify that the given POSIX-style function
-// call returns 0 (indicating success). Known limitation: this
-// doesn't expand to a balanced 'if' statement, so enclose the macro
-// in {} if you need to use it as the only statement in an 'if'
-// branch.
-#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
- if (const int gtest_error = (posix_call)) \
- GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
- << gtest_error
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Use ImplicitCast_ as a safe version of static_cast for upcasting in
-// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
-// const Foo*). When you use ImplicitCast_, the compiler checks that
-// the cast is safe. Such explicit ImplicitCast_s are necessary in
-// surprisingly many situations where C++ demands an exact type match
-// instead of an argument type convertable to a target type.
-//
-// The syntax for using ImplicitCast_ is the same as for static_cast:
-//
-// ImplicitCast_<ToType>(expr)
-//
-// ImplicitCast_ would have been part of the C++ standard library,
-// but the proposal was submitted too late. It will probably make
-// its way into the language in the future.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., implicit_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To>
-inline To ImplicitCast_(To x) { return x; }
-
-// When you upcast (that is, cast a pointer from type Foo to type
-// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
-// always succeed. When you downcast (that is, cast a pointer from
-// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
-// how do you know the pointer is really of type SubclassOfFoo? It
-// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
-// when you downcast, you should use this macro. In debug mode, we
-// use dynamic_cast<> to double-check the downcast is legal (we die
-// if it's not). In normal mode, we do the efficient static_cast<>
-// instead. Thus, it's important to test in debug mode to make sure
-// the cast is legal!
-// This is the only place in the code we should use dynamic_cast<>.
-// In particular, you SHOULDN'T be using dynamic_cast<> in order to
-// do RTTI (eg code like this:
-// if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
-// if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
-// You should design the code some other way not to need this.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., down_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To, typename From> // use like this: DownCast_<T*>(foo);
-inline To DownCast_(From* f) { // so we only accept pointers
- // Ensures that To is a sub-type of From *. This test is here only
- // for compile-time type checking, and has no overhead in an
- // optimized build at run-time, as it will be optimized away
- // completely.
- if (false) {
- const To to = NULL;
- ::testing::internal::ImplicitCast_<From*>(to);
- }
-
-#if GTEST_HAS_RTTI
- // RTTI: debug mode only!
- GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
-#endif
- return static_cast<To>(f);
-}
-
-// Downcasts the pointer of type Base to Derived.
-// Derived must be a subclass of Base. The parameter MUST
-// point to a class of type Derived, not any subclass of it.
-// When RTTI is available, the function performs a runtime
-// check to enforce this.
-template <class Derived, class Base>
-Derived* CheckedDowncastToActualType(Base* base) {
-#if GTEST_HAS_RTTI
- GTEST_CHECK_(typeid(*base) == typeid(Derived));
- return dynamic_cast<Derived*>(base); // NOLINT
-#else
- return static_cast<Derived*>(base); // Poor man's downcast.
-#endif
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Defines the stderr capturer:
-// CaptureStdout - starts capturing stdout.
-// GetCapturedStdout - stops capturing stdout and returns the captured string.
-// CaptureStderr - starts capturing stderr.
-// GetCapturedStderr - stops capturing stderr and returns the captured string.
-//
-GTEST_API_ void CaptureStdout();
-GTEST_API_ String GetCapturedStdout();
-GTEST_API_ void CaptureStderr();
-GTEST_API_ String GetCapturedStderr();
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-
-#if GTEST_HAS_DEATH_TEST
-
-// A copy of all command line arguments. Set by InitGoogleTest().
-extern ::std::vector<String> g_argvs;
-
-// GTEST_HAS_DEATH_TEST implies we have ::std::string.
-const ::std::vector<String>& GetArgvs();
-
-#endif // GTEST_HAS_DEATH_TEST
-
-// Defines synchronization primitives.
-
-#if GTEST_HAS_PTHREAD
-
-// Sleeps for (roughly) n milli-seconds. This function is only for
-// testing Google Test's own constructs. Don't use it in user tests,
-// either directly or indirectly.
-inline void SleepMilliseconds(int n) {
- const timespec time = {
- 0, // 0 seconds.
- n * 1000L * 1000L, // And n ms.
- };
- nanosleep(&time, NULL);
-}
-
-// Allows a controller thread to pause execution of newly created
-// threads until notified. Instances of this class must be created
-// and destroyed in the controller thread.
-//
-// This class is only for testing Google Test's own constructs. Do not
-// use it in user tests, either directly or indirectly.
-class Notification {
- public:
- Notification() : notified_(false) {}
-
- // Notifies all threads created with this notification to start. Must
- // be called from the controller thread.
- void Notify() { notified_ = true; }
-
- // Blocks until the controller thread notifies. Must be called from a test
- // thread.
- void WaitForNotification() {
- while(!notified_) {
- SleepMilliseconds(10);
- }
- }
-
- private:
- volatile bool notified_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
-};
-
-// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
-// Consequently, it cannot select a correct instantiation of ThreadWithParam
-// in order to call its Run(). Introducing ThreadWithParamBase as a
-// non-templated base class for ThreadWithParam allows us to bypass this
-// problem.
-class ThreadWithParamBase {
- public:
- virtual ~ThreadWithParamBase() {}
- virtual void Run() = 0;
-};
-
-// pthread_create() accepts a pointer to a function type with the C linkage.
-// According to the Standard (7.5/1), function types with different linkages
-// are different even if they are otherwise identical. Some compilers (for
-// example, SunStudio) treat them as different types. Since class methods
-// cannot be defined with C-linkage we need to define a free C-function to
-// pass into pthread_create().
-extern "C" inline void* ThreadFuncWithCLinkage(void* thread) {
- static_cast<ThreadWithParamBase*>(thread)->Run();
- return NULL;
-}
-
-// Helper class for testing Google Test's multi-threading constructs.
-// To use it, write:
-//
-// void ThreadFunc(int param) { /* Do things with param */ }
-// Notification thread_can_start;
-// ...
-// // The thread_can_start parameter is optional; you can supply NULL.
-// ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
-// thread_can_start.Notify();
-//
-// These classes are only for testing Google Test's own constructs. Do
-// not use them in user tests, either directly or indirectly.
-template <typename T>
-class ThreadWithParam : public ThreadWithParamBase {
- public:
- typedef void (*UserThreadFunc)(T);
-
- ThreadWithParam(
- UserThreadFunc func, T param, Notification* thread_can_start)
- : func_(func),
- param_(param),
- thread_can_start_(thread_can_start),
- finished_(false) {
- ThreadWithParamBase* const base = this;
- // The thread can be created only after all fields except thread_
- // have been initialized.
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
- }
- ~ThreadWithParam() { Join(); }
-
- void Join() {
- if (!finished_) {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0));
- finished_ = true;
- }
- }
-
- virtual void Run() {
- if (thread_can_start_ != NULL)
- thread_can_start_->WaitForNotification();
- func_(param_);
- }
-
- private:
- const UserThreadFunc func_; // User-supplied thread function.
- const T param_; // User-supplied parameter to the thread function.
- // When non-NULL, used to block execution until the controller thread
- // notifies.
- Notification* const thread_can_start_;
- bool finished_; // true iff we know that the thread function has finished.
- pthread_t thread_; // The native thread object.
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
-};
-
-// MutexBase and Mutex implement mutex on pthreads-based platforms. They
-// are used in conjunction with class MutexLock:
-//
-// Mutex mutex;
-// ...
-// MutexLock lock(&mutex); // Acquires the mutex and releases it at the end
-// // of the current scope.
-//
-// MutexBase implements behavior for both statically and dynamically
-// allocated mutexes. Do not use MutexBase directly. Instead, write
-// the following to define a static mutex:
-//
-// GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
-//
-// You can forward declare a static mutex like this:
-//
-// GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
-//
-// To create a dynamic mutex, just define an object of type Mutex.
-class MutexBase {
- public:
- // Acquires this mutex.
- void Lock() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
- owner_ = pthread_self();
- }
-
- // Releases this mutex.
- void Unlock() {
- // We don't protect writing to owner_ here, as it's the caller's
- // responsibility to ensure that the current thread holds the
- // mutex when this is called.
- owner_ = 0;
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
- }
-
- // Does nothing if the current thread holds the mutex. Otherwise, crashes
- // with high probability.
- void AssertHeld() const {
- GTEST_CHECK_(owner_ == pthread_self())
- << "The current thread is not holding the mutex @" << this;
- }
-
- // A static mutex may be used before main() is entered. It may even
- // be used before the dynamic initialization stage. Therefore we
- // must be able to initialize a static mutex object at link time.
- // This means MutexBase has to be a POD and its member variables
- // have to be public.
- public:
- pthread_mutex_t mutex_; // The underlying pthread mutex.
- pthread_t owner_; // The thread holding the mutex; 0 means no one holds it.
-};
-
-// Forward-declares a static mutex.
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
- extern ::testing::internal::MutexBase mutex
-
-// Defines and statically (i.e. at link time) initializes a static mutex.
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
- ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, 0 }
-
-// The Mutex class can only be used for mutexes created at runtime. It
-// shares its API with MutexBase otherwise.
-class Mutex : public MutexBase {
- public:
- Mutex() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
- owner_ = 0;
- }
- ~Mutex() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
-};
-
-// We cannot name this class MutexLock as the ctor declaration would
-// conflict with a macro named MutexLock, which is defined on some
-// platforms. Hence the typedef trick below.
-class GTestMutexLock {
- public:
- explicit GTestMutexLock(MutexBase* mutex)
- : mutex_(mutex) { mutex_->Lock(); }
-
- ~GTestMutexLock() { mutex_->Unlock(); }
-
- private:
- MutexBase* const mutex_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
-};
-
-typedef GTestMutexLock MutexLock;
-
-// Helpers for ThreadLocal.
-
-// pthread_key_create() requires DeleteThreadLocalValue() to have
-// C-linkage. Therefore it cannot be templatized to access
-// ThreadLocal<T>. Hence the need for class
-// ThreadLocalValueHolderBase.
-class ThreadLocalValueHolderBase {
- public:
- virtual ~ThreadLocalValueHolderBase() {}
-};
-
-// Called by pthread to delete thread-local data stored by
-// pthread_setspecific().
-extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
- delete static_cast<ThreadLocalValueHolderBase*>(value_holder);
-}
-
-// Implements thread-local storage on pthreads-based systems.
-//
-// // Thread 1
-// ThreadLocal<int> tl(100); // 100 is the default value for each thread.
-//
-// // Thread 2
-// tl.set(150); // Changes the value for thread 2 only.
-// EXPECT_EQ(150, tl.get());
-//
-// // Thread 1
-// EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value.
-// tl.set(200);
-// EXPECT_EQ(200, tl.get());
-//
-// The template type argument T must have a public copy constructor.
-// In addition, the default ThreadLocal constructor requires T to have
-// a public default constructor.
-//
-// An object managed for a thread by a ThreadLocal instance is deleted
-// when the thread exits. Or, if the ThreadLocal instance dies in
-// that thread, when the ThreadLocal dies. It's the user's
-// responsibility to ensure that all other threads using a ThreadLocal
-// have exited when it dies, or the per-thread objects for those
-// threads will not be deleted.
-//
-// Google Test only uses global ThreadLocal objects. That means they
-// will die after main() has returned. Therefore, no per-thread
-// object managed by Google Test will be leaked as long as all threads
-// using Google Test have exited when main() returns.
-template <typename T>
-class ThreadLocal {
- public:
- ThreadLocal() : key_(CreateKey()),
- default_() {}
- explicit ThreadLocal(const T& value) : key_(CreateKey()),
- default_(value) {}
-
- ~ThreadLocal() {
- // Destroys the managed object for the current thread, if any.
- DeleteThreadLocalValue(pthread_getspecific(key_));
-
- // Releases resources associated with the key. This will *not*
- // delete managed objects for other threads.
- GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
- }
-
- T* pointer() { return GetOrCreateValue(); }
- const T* pointer() const { return GetOrCreateValue(); }
- const T& get() const { return *pointer(); }
- void set(const T& value) { *pointer() = value; }
-
- private:
- // Holds a value of type T.
- class ValueHolder : public ThreadLocalValueHolderBase {
- public:
- explicit ValueHolder(const T& value) : value_(value) {}
-
- T* pointer() { return &value_; }
-
- private:
- T value_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
- };
-
- static pthread_key_t CreateKey() {
- pthread_key_t key;
- // When a thread exits, DeleteThreadLocalValue() will be called on
- // the object managed for that thread.
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_key_create(&key, &DeleteThreadLocalValue));
- return key;
- }
-
- T* GetOrCreateValue() const {
- ThreadLocalValueHolderBase* const holder =
- static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
- if (holder != NULL) {
- return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
- }
-
- ValueHolder* const new_holder = new ValueHolder(default_);
- ThreadLocalValueHolderBase* const holder_base = new_holder;
- GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
- return new_holder->pointer();
- }
-
- // A key pthreads uses for looking up per-thread values.
- const pthread_key_t key_;
- const T default_; // The default value for each thread.
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
-};
-
-# define GTEST_IS_THREADSAFE 1
-
-#else // GTEST_HAS_PTHREAD
-
-// A dummy implementation of synchronization primitives (mutex, lock,
-// and thread-local variable). Necessary for compiling Google Test where
-// mutex is not supported - using Google Test in multiple threads is not
-// supported on such platforms.
-
-class Mutex {
- public:
- Mutex() {}
- void AssertHeld() const {}
-};
-
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
- extern ::testing::internal::Mutex mutex
-
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
-
-class GTestMutexLock {
- public:
- explicit GTestMutexLock(Mutex*) {} // NOLINT
-};
-
-typedef GTestMutexLock MutexLock;
-
-template <typename T>
-class ThreadLocal {
- public:
- ThreadLocal() : value_() {}
- explicit ThreadLocal(const T& value) : value_(value) {}
- T* pointer() { return &value_; }
- const T* pointer() const { return &value_; }
- const T& get() const { return value_; }
- void set(const T& value) { value_ = value; }
- private:
- T value_;
-};
-
-// The above synchronization primitives have dummy implementations.
-// Therefore Google Test is not thread-safe.
-# define GTEST_IS_THREADSAFE 0
-
-#endif // GTEST_HAS_PTHREAD
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-GTEST_API_ size_t GetThreadCount();
-
-// Passing non-POD classes through ellipsis (...) crashes the ARM
-// compiler and generates a warning in Sun Studio. The Nokia Symbian
-// and the IBM XL C/C++ compiler try to instantiate a copy constructor
-// for objects passed through ellipsis (...), failing for uncopyable
-// objects. We define this to ensure that only POD is passed through
-// ellipsis on these systems.
-#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
-// We lose support for NULL detection where the compiler doesn't like
-// passing non-POD classes through ellipsis (...).
-# define GTEST_ELLIPSIS_NEEDS_POD_ 1
-#else
-# define GTEST_CAN_COMPARE_NULL 1
-#endif
-
-// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between
-// const T& and const T* in a function template. These compilers
-// _can_ decide between class template specializations for T and T*,
-// so a tr1::type_traits-like is_pointer works.
-#if defined(__SYMBIAN32__) || defined(__IBMCPP__)
-# define GTEST_NEEDS_IS_POINTER_ 1
-#endif
-
-template <bool bool_value>
-struct bool_constant {
- typedef bool_constant<bool_value> type;
- static const bool value = bool_value;
-};
-template <bool bool_value> const bool bool_constant<bool_value>::value;
-
-typedef bool_constant<false> false_type;
-typedef bool_constant<true> true_type;
-
-template <typename T>
-struct is_pointer : public false_type {};
-
-template <typename T>
-struct is_pointer<T*> : public true_type {};
-
-template <typename Iterator>
-struct IteratorTraits {
- typedef typename Iterator::value_type value_type;
-};
-
-template <typename T>
-struct IteratorTraits<T*> {
- typedef T value_type;
-};
-
-template <typename T>
-struct IteratorTraits<const T*> {
- typedef T value_type;
-};
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_SEP_ "\\"
-# define GTEST_HAS_ALT_PATH_SEP_ 1
-// The biggest signed integer type the compiler supports.
-typedef __int64 BiggestInt;
-#else
-# define GTEST_PATH_SEP_ "/"
-# define GTEST_HAS_ALT_PATH_SEP_ 0
-typedef long long BiggestInt; // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-// Utilities for char.
-
-// isspace(int ch) and friends accept an unsigned char or EOF. char
-// may be signed, depending on the compiler (or compiler flags).
-// Therefore we need to cast a char to unsigned char before calling
-// isspace(), etc.
-
-inline bool IsAlpha(char ch) {
- return isalpha(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsAlNum(char ch) {
- return isalnum(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsDigit(char ch) {
- return isdigit(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsLower(char ch) {
- return islower(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsSpace(char ch) {
- return isspace(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsUpper(char ch) {
- return isupper(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsXDigit(char ch) {
- return isxdigit(static_cast<unsigned char>(ch)) != 0;
-}
-
-inline char ToLower(char ch) {
- return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
-}
-inline char ToUpper(char ch) {
- return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
-}
-
-// The testing::internal::posix namespace holds wrappers for common
-// POSIX functions. These wrappers hide the differences between
-// Windows/MSVC and POSIX systems. Since some compilers define these
-// standard functions as macros, the wrapper cannot have the same name
-// as the wrapped function.
-
-namespace posix {
-
-// Functions with a different name on Windows.
-
-#if GTEST_OS_WINDOWS
-
-typedef struct _stat StatStruct;
-
-# ifdef __BORLANDC__
-inline int IsATTY(int fd) { return isatty(fd); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-# else // !__BORLANDC__
-# if GTEST_OS_WINDOWS_MOBILE
-inline int IsATTY(int /* fd */) { return 0; }
-# else
-inline int IsATTY(int fd) { return _isatty(fd); }
-# endif // GTEST_OS_WINDOWS_MOBILE
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return _stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return _strdup(src); }
-# endif // __BORLANDC__
-
-# if GTEST_OS_WINDOWS_MOBILE
-inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
-// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
-// time and thus not defined there.
-# else
-inline int FileNo(FILE* file) { return _fileno(file); }
-inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
-inline int RmDir(const char* dir) { return _rmdir(dir); }
-inline bool IsDir(const StatStruct& st) {
- return (_S_IFDIR & st.st_mode) != 0;
-}
-# endif // GTEST_OS_WINDOWS_MOBILE
-
-#else
-
-typedef struct stat StatStruct;
-
-inline int FileNo(FILE* file) { return fileno(file); }
-inline int IsATTY(int fd) { return isatty(fd); }
-inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return strcasecmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-inline int RmDir(const char* dir) { return rmdir(dir); }
-inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
-
-#endif // GTEST_OS_WINDOWS
-
-// Functions deprecated by MSVC 8.0.
-
-#ifdef _MSC_VER
-// Temporarily disable warning 4996 (deprecated function).
-# pragma warning(push)
-# pragma warning(disable:4996)
-#endif
-
-inline const char* StrNCpy(char* dest, const char* src, size_t n) {
- return strncpy(dest, src, n);
-}
-
-// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
-// StrError() aren't needed on Windows CE at this time and thus not
-// defined there.
-
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int ChDir(const char* dir) { return chdir(dir); }
-#endif
-inline FILE* FOpen(const char* path, const char* mode) {
- return fopen(path, mode);
-}
-#if !GTEST_OS_WINDOWS_MOBILE
-inline FILE *FReopen(const char* path, const char* mode, FILE* stream) {
- return freopen(path, mode, stream);
-}
-inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }
-#endif
-inline int FClose(FILE* fp) { return fclose(fp); }
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int Read(int fd, void* buf, unsigned int count) {
- return static_cast<int>(read(fd, buf, count));
-}
-inline int Write(int fd, const void* buf, unsigned int count) {
- return static_cast<int>(write(fd, buf, count));
-}
-inline int Close(int fd) { return close(fd); }
-inline const char* StrError(int errnum) { return strerror(errnum); }
-#endif
-inline const char* GetEnv(const char* name) {
-#if GTEST_OS_WINDOWS_MOBILE
- // We are on Windows CE, which has no environment variables.
- return NULL;
-#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
- // Environment variables which we programmatically clear will be set to the
- // empty string rather than unset (NULL). Handle that case.
- const char* const env = getenv(name);
- return (env != NULL && env[0] != '\0') ? env : NULL;
-#else
- return getenv(name);
-#endif
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Windows CE has no C library. The abort() function is used in
-// several places in Google Test. This implementation provides a reasonable
-// imitation of standard behaviour.
-void Abort();
-#else
-inline void Abort() { abort(); }
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-} // namespace posix
-
-// The maximum number a BiggestInt can represent. This definition
-// works no matter BiggestInt is represented in one's complement or
-// two's complement.
-//
-// We cannot rely on numeric_limits in STL, as __int64 and long long
-// are not part of standard C++ and numeric_limits doesn't need to be
-// defined for them.
-const BiggestInt kMaxBiggestInt =
- ~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1));
-
-// This template class serves as a compile-time function from size to
-// type. It maps a size in bytes to a primitive type with that
-// size. e.g.
-//
-// TypeWithSize<4>::UInt
-//
-// is typedef-ed to be unsigned int (unsigned integer made up of 4
-// bytes).
-//
-// Such functionality should belong to STL, but I cannot find it
-// there.
-//
-// Google Test uses this class in the implementation of floating-point
-// comparison.
-//
-// For now it only handles UInt (unsigned int) as that's all Google Test
-// needs. Other types can be easily added in the future if need
-// arises.
-template <size_t size>
-class TypeWithSize {
- public:
- // This prevents the user from using TypeWithSize<N> with incorrect
- // values of N.
- typedef void UInt;
-};
-
-// The specialization for size 4.
-template <>
-class TypeWithSize<4> {
- public:
- // unsigned int has size 4 in both gcc and MSVC.
- //
- // As base/basictypes.h doesn't compile on Windows, we cannot use
- // uint32, uint64, and etc here.
- typedef int Int;
- typedef unsigned int UInt;
-};
-
-// The specialization for size 8.
-template <>
-class TypeWithSize<8> {
- public:
-
-#if GTEST_OS_WINDOWS
- typedef __int64 Int;
- typedef unsigned __int64 UInt;
-#else
- typedef long long Int; // NOLINT
- typedef unsigned long long UInt; // NOLINT
-#endif // GTEST_OS_WINDOWS
-};
-
-// Integer types of known sizes.
-typedef TypeWithSize<4>::Int Int32;
-typedef TypeWithSize<4>::UInt UInt32;
-typedef TypeWithSize<8>::Int Int64;
-typedef TypeWithSize<8>::UInt UInt64;
-typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
-
-// Utilities for command line flags and environment variables.
-
-// Macro for referencing flags.
-#define GTEST_FLAG(name) FLAGS_gtest_##name
-
-// Macros for declaring flags.
-#define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
-#define GTEST_DECLARE_int32_(name) \
- GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
-#define GTEST_DECLARE_string_(name) \
- GTEST_API_ extern ::testing::internal::String GTEST_FLAG(name)
-
-// Macros for defining flags.
-#define GTEST_DEFINE_bool_(name, default_val, doc) \
- GTEST_API_ bool GTEST_FLAG(name) = (default_val)
-#define GTEST_DEFINE_int32_(name, default_val, doc) \
- GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
-#define GTEST_DEFINE_string_(name, default_val, doc) \
- GTEST_API_ ::testing::internal::String GTEST_FLAG(name) = (default_val)
-
-// Parses 'str' for a 32-bit signed integer. If successful, writes the result
-// to *value and returns true; otherwise leaves *value unchanged and returns
-// false.
-// TODO(chandlerc): Find a better way to refactor flag and environment parsing
-// out of both gtest-port.cc and gtest.cc to avoid exporting this utility
-// function.
-bool ParseInt32(const Message& src_text, const char* str, Int32* value);
-
-// Parses a bool/Int32/string from the environment variable
-// corresponding to the given Google Test flag.
-bool BoolFromGTestEnv(const char* flag, bool default_val);
-GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);
-const char* StringFromGTestEnv(const char* flag, const char* default_val);
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-
-#if GTEST_OS_LINUX
-# include <stdlib.h>
-# include <sys/types.h>
-# include <sys/wait.h>
-# include <unistd.h>
-#endif // GTEST_OS_LINUX
-
-#include <ctype.h>
-#include <string.h>
-#include <iomanip>
-#include <limits>
-#include <set>
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file declares the String class and functions used internally by
-// Google Test. They are subject to change without notice. They should not used
-// by code external to Google Test.
-//
-// This header file is #included by <gtest/internal/gtest-internal.h>.
-// It should not be #included by other files.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-
-#ifdef __BORLANDC__
-// string.h is not guaranteed to provide strcpy on C++ Builder.
-# include <mem.h>
-#endif
-
-#include <string.h>
-
-#include <string>
-
-namespace testing {
-namespace internal {
-
-// String - a UTF-8 string class.
-//
-// For historic reasons, we don't use std::string.
-//
-// TODO(wan@google.com): replace this class with std::string or
-// implement it in terms of the latter.
-//
-// Note that String can represent both NULL and the empty string,
-// while std::string cannot represent NULL.
-//
-// NULL and the empty string are considered different. NULL is less
-// than anything (including the empty string) except itself.
-//
-// This class only provides minimum functionality necessary for
-// implementing Google Test. We do not intend to implement a full-fledged
-// string class here.
-//
-// Since the purpose of this class is to provide a substitute for
-// std::string on platforms where it cannot be used, we define a copy
-// constructor and assignment operators such that we don't need
-// conditional compilation in a lot of places.
-//
-// In order to make the representation efficient, the d'tor of String
-// is not virtual. Therefore DO NOT INHERIT FROM String.
-class GTEST_API_ String {
- public:
- // Static utility methods
-
- // Returns the input enclosed in double quotes if it's not NULL;
- // otherwise returns "(null)". For example, "\"Hello\"" is returned
- // for input "Hello".
- //
- // This is useful for printing a C string in the syntax of a literal.
- //
- // Known issue: escape sequences are not handled yet.
- static String ShowCStringQuoted(const char* c_str);
-
- // Clones a 0-terminated C string, allocating memory using new. The
- // caller is responsible for deleting the return value using
- // delete[]. Returns the cloned string, or NULL if the input is
- // NULL.
- //
- // This is different from strdup() in string.h, which allocates
- // memory using malloc().
- static const char* CloneCString(const char* c_str);
-
-#if GTEST_OS_WINDOWS_MOBILE
- // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
- // able to pass strings to Win32 APIs on CE we need to convert them
- // to 'Unicode', UTF-16.
-
- // Creates a UTF-16 wide string from the given ANSI string, allocating
- // memory using new. The caller is responsible for deleting the return
- // value using delete[]. Returns the wide string, or NULL if the
- // input is NULL.
- //
- // The wide string is created using the ANSI codepage (CP_ACP) to
- // match the behaviour of the ANSI versions of Win32 calls and the
- // C runtime.
- static LPCWSTR AnsiToUtf16(const char* c_str);
-
- // Creates an ANSI string from the given wide string, allocating
- // memory using new. The caller is responsible for deleting the return
- // value using delete[]. Returns the ANSI string, or NULL if the
- // input is NULL.
- //
- // The returned string is created using the ANSI codepage (CP_ACP) to
- // match the behaviour of the ANSI versions of Win32 calls and the
- // C runtime.
- static const char* Utf16ToAnsi(LPCWSTR utf16_str);
-#endif
-
- // Compares two C strings. Returns true iff they have the same content.
- //
- // Unlike strcmp(), this function can handle NULL argument(s). A
- // NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool CStringEquals(const char* lhs, const char* rhs);
-
- // Converts a wide C string to a String using the UTF-8 encoding.
- // NULL will be converted to "(null)". If an error occurred during
- // the conversion, "(failed to convert from wide string)" is
- // returned.
- static String ShowWideCString(const wchar_t* wide_c_str);
-
- // Similar to ShowWideCString(), except that this function encloses
- // the converted string in double quotes.
- static String ShowWideCStringQuoted(const wchar_t* wide_c_str);
-
- // Compares two wide C strings. Returns true iff they have the same
- // content.
- //
- // Unlike wcscmp(), this function can handle NULL argument(s). A
- // NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
-
- // Compares two C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike strcasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool CaseInsensitiveCStringEquals(const char* lhs,
- const char* rhs);
-
- // Compares two wide C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike wcscasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL wide C string,
- // including the empty string.
- // NB: The implementations on different platforms slightly differ.
- // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
- // environment variable. On GNU platform this method uses wcscasecmp
- // which compares according to LC_CTYPE category of the current locale.
- // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
- // current locale.
- static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs);
-
- // Formats a list of arguments to a String, using the same format
- // spec string as for printf.
- //
- // We do not use the StringPrintf class as it is not universally
- // available.
- //
- // The result is limited to 4096 characters (including the tailing
- // 0). If 4096 characters are not enough to format the input,
- // "<buffer exceeded>" is returned.
- static String Format(const char* format, ...);
-
- // C'tors
-
- // The default c'tor constructs a NULL string.
- String() : c_str_(NULL), length_(0) {}
-
- // Constructs a String by cloning a 0-terminated C string.
- String(const char* a_c_str) { // NOLINT
- if (a_c_str == NULL) {
- c_str_ = NULL;
- length_ = 0;
- } else {
- ConstructNonNull(a_c_str, strlen(a_c_str));
- }
- }
-
- // Constructs a String by copying a given number of chars from a
- // buffer. E.g. String("hello", 3) creates the string "hel",
- // String("a\0bcd", 4) creates "a\0bc", String(NULL, 0) creates "",
- // and String(NULL, 1) results in access violation.
- String(const char* buffer, size_t a_length) {
- ConstructNonNull(buffer, a_length);
- }
-
- // The copy c'tor creates a new copy of the string. The two
- // String objects do not share content.
- String(const String& str) : c_str_(NULL), length_(0) { *this = str; }
-
- // D'tor. String is intended to be a final class, so the d'tor
- // doesn't need to be virtual.
- ~String() { delete[] c_str_; }
-
- // Allows a String to be implicitly converted to an ::std::string or
- // ::string, and vice versa. Converting a String containing a NULL
- // pointer to ::std::string or ::string is undefined behavior.
- // Converting a ::std::string or ::string containing an embedded NUL
- // character to a String will result in the prefix up to the first
- // NUL character.
- String(const ::std::string& str) {
- ConstructNonNull(str.c_str(), str.length());
- }
-
- operator ::std::string() const { return ::std::string(c_str(), length()); }
-
-#if GTEST_HAS_GLOBAL_STRING
- String(const ::string& str) {
- ConstructNonNull(str.c_str(), str.length());
- }
-
- operator ::string() const { return ::string(c_str(), length()); }
-#endif // GTEST_HAS_GLOBAL_STRING
-
- // Returns true iff this is an empty string (i.e. "").
- bool empty() const { return (c_str() != NULL) && (length() == 0); }
-
- // Compares this with another String.
- // Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0
- // if this is greater than rhs.
- int Compare(const String& rhs) const;
-
- // Returns true iff this String equals the given C string. A NULL
- // string and a non-NULL string are considered not equal.
- bool operator==(const char* a_c_str) const { return Compare(a_c_str) == 0; }
-
- // Returns true iff this String is less than the given String. A
- // NULL string is considered less than "".
- bool operator<(const String& rhs) const { return Compare(rhs) < 0; }
-
- // Returns true iff this String doesn't equal the given C string. A NULL
- // string and a non-NULL string are considered not equal.
- bool operator!=(const char* a_c_str) const { return !(*this == a_c_str); }
-
- // Returns true iff this String ends with the given suffix. *Any*
- // String is considered to end with a NULL or empty suffix.
- bool EndsWith(const char* suffix) const;
-
- // Returns true iff this String ends with the given suffix, not considering
- // case. Any String is considered to end with a NULL or empty suffix.
- bool EndsWithCaseInsensitive(const char* suffix) const;
-
- // Returns the length of the encapsulated string, or 0 if the
- // string is NULL.
- size_t length() const { return length_; }
-
- // Gets the 0-terminated C string this String object represents.
- // The String object still owns the string. Therefore the caller
- // should NOT delete the return value.
- const char* c_str() const { return c_str_; }
-
- // Assigns a C string to this object. Self-assignment works.
- const String& operator=(const char* a_c_str) {
- return *this = String(a_c_str);
- }
-
- // Assigns a String object to this object. Self-assignment works.
- const String& operator=(const String& rhs) {
- if (this != &rhs) {
- delete[] c_str_;
- if (rhs.c_str() == NULL) {
- c_str_ = NULL;
- length_ = 0;
- } else {
- ConstructNonNull(rhs.c_str(), rhs.length());
- }
- }
-
- return *this;
- }
-
- private:
- // Constructs a non-NULL String from the given content. This
- // function can only be called when c_str_ has not been allocated.
- // ConstructNonNull(NULL, 0) results in an empty string ("").
- // ConstructNonNull(NULL, non_zero) is undefined behavior.
- void ConstructNonNull(const char* buffer, size_t a_length) {
- char* const str = new char[a_length + 1];
- memcpy(str, buffer, a_length);
- str[a_length] = '\0';
- c_str_ = str;
- length_ = a_length;
- }
-
- const char* c_str_;
- size_t length_;
-}; // class String
-
-// Streams a String to an ostream. Each '\0' character in the String
-// is replaced with "\\0".
-inline ::std::ostream& operator<<(::std::ostream& os, const String& str) {
- if (str.c_str() == NULL) {
- os << "(null)";
- } else {
- const char* const c_str = str.c_str();
- for (size_t i = 0; i != str.length(); i++) {
- if (c_str[i] == '\0') {
- os << "\\0";
- } else {
- os << c_str[i];
- }
- }
- }
- return os;
-}
-
-// Gets the content of the stringstream's buffer as a String. Each '\0'
-// character in the buffer is replaced with "\\0".
-GTEST_API_ String StringStreamToString(::std::stringstream* stream);
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-
-// Declared here but defined in gtest.h, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable);
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: keith.ray@gmail.com (Keith Ray)
-//
-// Google Test filepath utilities
-//
-// This header file declares classes and functions used internally by
-// Google Test. They are subject to change without notice.
-//
-// This file is #included in <gtest/internal/gtest-internal.h>.
-// Do not include this header file separately!
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-
-
-namespace testing {
-namespace internal {
-
-// FilePath - a class for file and directory pathname manipulation which
-// handles platform-specific conventions (like the pathname separator).
-// Used for helper functions for naming files in a directory for xml output.
-// Except for Set methods, all methods are const or static, which provides an
-// "immutable value object" -- useful for peace of mind.
-// A FilePath with a value ending in a path separator ("like/this/") represents
-// a directory, otherwise it is assumed to represent a file. In either case,
-// it may or may not represent an actual file or directory in the file system.
-// Names are NOT checked for syntax correctness -- no checking for illegal
-// characters, malformed paths, etc.
-
-class GTEST_API_ FilePath {
- public:
- FilePath() : pathname_("") { }
- FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
-
- explicit FilePath(const char* pathname) : pathname_(pathname) {
- Normalize();
- }
-
- explicit FilePath(const String& pathname) : pathname_(pathname) {
- Normalize();
- }
-
- FilePath& operator=(const FilePath& rhs) {
- Set(rhs);
- return *this;
- }
-
- void Set(const FilePath& rhs) {
- pathname_ = rhs.pathname_;
- }
-
- String ToString() const { return pathname_; }
- const char* c_str() const { return pathname_.c_str(); }
-
- // Returns the current working directory, or "" if unsuccessful.
- static FilePath GetCurrentDir();
-
- // Given directory = "dir", base_name = "test", number = 0,
- // extension = "xml", returns "dir/test.xml". If number is greater
- // than zero (e.g., 12), returns "dir/test_12.xml".
- // On Windows platform, uses \ as the separator rather than /.
- static FilePath MakeFileName(const FilePath& directory,
- const FilePath& base_name,
- int number,
- const char* extension);
-
- // Given directory = "dir", relative_path = "test.xml",
- // returns "dir/test.xml".
- // On Windows, uses \ as the separator rather than /.
- static FilePath ConcatPaths(const FilePath& directory,
- const FilePath& relative_path);
-
- // Returns a pathname for a file that does not currently exist. The pathname
- // will be directory/base_name.extension or
- // directory/base_name_<number>.extension if directory/base_name.extension
- // already exists. The number will be incremented until a pathname is found
- // that does not already exist.
- // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
- // There could be a race condition if two or more processes are calling this
- // function at the same time -- they could both pick the same filename.
- static FilePath GenerateUniqueFileName(const FilePath& directory,
- const FilePath& base_name,
- const char* extension);
-
- // Returns true iff the path is NULL or "".
- bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; }
-
- // If input name has a trailing separator character, removes it and returns
- // the name, otherwise return the name string unmodified.
- // On Windows platform, uses \ as the separator, other platforms use /.
- FilePath RemoveTrailingPathSeparator() const;
-
- // Returns a copy of the FilePath with the directory part removed.
- // Example: FilePath("path/to/file").RemoveDirectoryName() returns
- // FilePath("file"). If there is no directory part ("just_a_file"), it returns
- // the FilePath unmodified. If there is no file part ("just_a_dir/") it
- // returns an empty FilePath ("").
- // On Windows platform, '\' is the path separator, otherwise it is '/'.
- FilePath RemoveDirectoryName() const;
-
- // RemoveFileName returns the directory path with the filename removed.
- // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
- // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
- // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
- // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
- // On Windows platform, '\' is the path separator, otherwise it is '/'.
- FilePath RemoveFileName() const;
-
- // Returns a copy of the FilePath with the case-insensitive extension removed.
- // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
- // FilePath("dir/file"). If a case-insensitive extension is not
- // found, returns a copy of the original FilePath.
- FilePath RemoveExtension(const char* extension) const;
-
- // Creates directories so that path exists. Returns true if successful or if
- // the directories already exist; returns false if unable to create
- // directories for any reason. Will also return false if the FilePath does
- // not represent a directory (that is, it doesn't end with a path separator).
- bool CreateDirectoriesRecursively() const;
-
- // Create the directory so that path exists. Returns true if successful or
- // if the directory already exists; returns false if unable to create the
- // directory for any reason, including if the parent directory does not
- // exist. Not named "CreateDirectory" because that's a macro on Windows.
- bool CreateFolder() const;
-
- // Returns true if FilePath describes something in the file-system,
- // either a file, directory, or whatever, and that something exists.
- bool FileOrDirectoryExists() const;
-
- // Returns true if pathname describes a directory in the file-system
- // that exists.
- bool DirectoryExists() const;
-
- // Returns true if FilePath ends with a path separator, which indicates that
- // it is intended to represent a directory. Returns false otherwise.
- // This does NOT check that a directory (or file) actually exists.
- bool IsDirectory() const;
-
- // Returns true if pathname describes a root directory. (Windows has one
- // root directory per disk drive.)
- bool IsRootDirectory() const;
-
- // Returns true if pathname describes an absolute path.
- bool IsAbsolutePath() const;
-
- private:
- // Replaces multiple consecutive separators with a single separator.
- // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
- // redundancies that might be in a pathname involving "." or "..".
- //
- // A pathname with multiple consecutive separators may occur either through
- // user error or as a result of some scripts or APIs that generate a pathname
- // with a trailing separator. On other platforms the same API or script
- // may NOT generate a pathname with a trailing "/". Then elsewhere that
- // pathname may have another "/" and pathname components added to it,
- // without checking for the separator already being there.
- // The script language and operating system may allow paths like "foo//bar"
- // but some of the functions in FilePath will not handle that correctly. In
- // particular, RemoveTrailingPathSeparator() only removes one separator, and
- // it is called in CreateDirectoriesRecursively() assuming that it will change
- // a pathname from directory syntax (trailing separator) to filename syntax.
- //
- // On Windows this method also replaces the alternate path separator '/' with
- // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
- // "bar\\foo".
-
- void Normalize();
-
- // Returns a pointer to the last occurence of a valid path separator in
- // the FilePath. On Windows, for example, both '/' and '\' are valid path
- // separators. Returns NULL if no path separator was found.
- const char* FindLastPathSeparator() const;
-
- String pathname_;
-}; // class FilePath
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-// This file was GENERATED by command:
-// pump.py gtest-type-util.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Type utilities needed for implementing typed and type-parameterized
-// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently we support at most 50 types in a list, and at most 50
-// type-parameterized tests in one type-parameterized test case.
-// Please contact googletestframework@googlegroups.com if you need
-// more.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-
-// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
-// libstdc++ (which is where cxxabi.h comes from).
-# ifdef __GLIBCXX__
-# include <cxxabi.h>
-# elif defined(__HP_aCC)
-# include <acxx_demangle.h>
-# endif // __GLIBCXX__
-
-namespace testing {
-namespace internal {
-
-// GetTypeName<T>() returns a human-readable name of type T.
-// NB: This function is also used in Google Mock, so don't move it inside of
-// the typed-test-only section below.
-template <typename T>
-String GetTypeName() {
-# if GTEST_HAS_RTTI
-
- const char* const name = typeid(T).name();
-# if defined(__GLIBCXX__) || defined(__HP_aCC)
- int status = 0;
- // gcc's implementation of typeid(T).name() mangles the type name,
- // so we have to demangle it.
-# ifdef __GLIBCXX__
- using abi::__cxa_demangle;
-# endif // __GLIBCXX__
- char* const readable_name = __cxa_demangle(name, 0, 0, &status);
- const String name_str(status == 0 ? readable_name : name);
- free(readable_name);
- return name_str;
-# else
- return name;
-# endif // __GLIBCXX__ || __HP_aCC
-
-# else
-
- return "<type>";
-
-# endif // GTEST_HAS_RTTI
-}
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
-// type. This can be used as a compile-time assertion to ensure that
-// two types are equal.
-
-template <typename T1, typename T2>
-struct AssertTypeEq;
-
-template <typename T>
-struct AssertTypeEq<T, T> {
- typedef bool type;
-};
-
-// A unique type used as the default value for the arguments of class
-// template Types. This allows us to simulate variadic templates
-// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
-// support directly.
-struct None {};
-
-// The following family of struct and struct templates are used to
-// represent type lists. In particular, TypesN<T1, T2, ..., TN>
-// represents a type list with N types (T1, T2, ..., and TN) in it.
-// Except for Types0, every struct in the family has two member types:
-// Head for the first type in the list, and Tail for the rest of the
-// list.
-
-// The empty type list.
-struct Types0 {};
-
-// Type lists of length 1, 2, 3, and so on.
-
-template <typename T1>
-struct Types1 {
- typedef T1 Head;
- typedef Types0 Tail;
-};
-template <typename T1, typename T2>
-struct Types2 {
- typedef T1 Head;
- typedef Types1<T2> Tail;
-};
-
-template <typename T1, typename T2, typename T3>
-struct Types3 {
- typedef T1 Head;
- typedef Types2<T2, T3> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-struct Types4 {
- typedef T1 Head;
- typedef Types3<T2, T3, T4> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-struct Types5 {
- typedef T1 Head;
- typedef Types4<T2, T3, T4, T5> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-struct Types6 {
- typedef T1 Head;
- typedef Types5<T2, T3, T4, T5, T6> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-struct Types7 {
- typedef T1 Head;
- typedef Types6<T2, T3, T4, T5, T6, T7> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-struct Types8 {
- typedef T1 Head;
- typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-struct Types9 {
- typedef T1 Head;
- typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-struct Types10 {
- typedef T1 Head;
- typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-struct Types11 {
- typedef T1 Head;
- typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-struct Types12 {
- typedef T1 Head;
- typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-struct Types13 {
- typedef T1 Head;
- typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-struct Types14 {
- typedef T1 Head;
- typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-struct Types15 {
- typedef T1 Head;
- typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-struct Types16 {
- typedef T1 Head;
- typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-struct Types17 {
- typedef T1 Head;
- typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-struct Types18 {
- typedef T1 Head;
- typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-struct Types19 {
- typedef T1 Head;
- typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-struct Types20 {
- typedef T1 Head;
- typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-struct Types21 {
- typedef T1 Head;
- typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-struct Types22 {
- typedef T1 Head;
- typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-struct Types23 {
- typedef T1 Head;
- typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-struct Types24 {
- typedef T1 Head;
- typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-struct Types25 {
- typedef T1 Head;
- typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-struct Types26 {
- typedef T1 Head;
- typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-struct Types27 {
- typedef T1 Head;
- typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-struct Types28 {
- typedef T1 Head;
- typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-struct Types29 {
- typedef T1 Head;
- typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-struct Types30 {
- typedef T1 Head;
- typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-struct Types31 {
- typedef T1 Head;
- typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-struct Types32 {
- typedef T1 Head;
- typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-struct Types33 {
- typedef T1 Head;
- typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-struct Types34 {
- typedef T1 Head;
- typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-struct Types35 {
- typedef T1 Head;
- typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-struct Types36 {
- typedef T1 Head;
- typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-struct Types37 {
- typedef T1 Head;
- typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-struct Types38 {
- typedef T1 Head;
- typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-struct Types39 {
- typedef T1 Head;
- typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-struct Types40 {
- typedef T1 Head;
- typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-struct Types41 {
- typedef T1 Head;
- typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-struct Types42 {
- typedef T1 Head;
- typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-struct Types43 {
- typedef T1 Head;
- typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-struct Types44 {
- typedef T1 Head;
- typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-struct Types45 {
- typedef T1 Head;
- typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-struct Types46 {
- typedef T1 Head;
- typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-struct Types47 {
- typedef T1 Head;
- typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-struct Types48 {
- typedef T1 Head;
- typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-struct Types49 {
- typedef T1 Head;
- typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-struct Types50 {
- typedef T1 Head;
- typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> Tail;
-};
-
-
-} // namespace internal
-
-// We don't want to require the users to write TypesN<...> directly,
-// as that would require them to count the length. Types<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Types<int>
-// will appear as Types<int, None, None, ..., None> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Types<T1, ..., TN>, and Google Test will translate
-// that to TypesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Types template.
-template <typename T1 = internal::None, typename T2 = internal::None,
- typename T3 = internal::None, typename T4 = internal::None,
- typename T5 = internal::None, typename T6 = internal::None,
- typename T7 = internal::None, typename T8 = internal::None,
- typename T9 = internal::None, typename T10 = internal::None,
- typename T11 = internal::None, typename T12 = internal::None,
- typename T13 = internal::None, typename T14 = internal::None,
- typename T15 = internal::None, typename T16 = internal::None,
- typename T17 = internal::None, typename T18 = internal::None,
- typename T19 = internal::None, typename T20 = internal::None,
- typename T21 = internal::None, typename T22 = internal::None,
- typename T23 = internal::None, typename T24 = internal::None,
- typename T25 = internal::None, typename T26 = internal::None,
- typename T27 = internal::None, typename T28 = internal::None,
- typename T29 = internal::None, typename T30 = internal::None,
- typename T31 = internal::None, typename T32 = internal::None,
- typename T33 = internal::None, typename T34 = internal::None,
- typename T35 = internal::None, typename T36 = internal::None,
- typename T37 = internal::None, typename T38 = internal::None,
- typename T39 = internal::None, typename T40 = internal::None,
- typename T41 = internal::None, typename T42 = internal::None,
- typename T43 = internal::None, typename T44 = internal::None,
- typename T45 = internal::None, typename T46 = internal::None,
- typename T47 = internal::None, typename T48 = internal::None,
- typename T49 = internal::None, typename T50 = internal::None>
-struct Types {
- typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
-};
-
-template <>
-struct Types<internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types0 type;
-};
-template <typename T1>
-struct Types<T1, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types1<T1> type;
-};
-template <typename T1, typename T2>
-struct Types<T1, T2, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types2<T1, T2> type;
-};
-template <typename T1, typename T2, typename T3>
-struct Types<T1, T2, T3, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types3<T1, T2, T3> type;
-};
-template <typename T1, typename T2, typename T3, typename T4>
-struct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types4<T1, T2, T3, T4> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-struct Types<T1, T2, T3, T4, T5, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types5<T1, T2, T3, T4, T5> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-struct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-struct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, internal::None, internal::None, internal::None> {
- typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, T48, internal::None, internal::None> {
- typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, T48, T49, internal::None> {
- typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49> type;
-};
-
-namespace internal {
-
-# define GTEST_TEMPLATE_ template <typename T> class
-
-// The template "selector" struct TemplateSel<Tmpl> is used to
-// represent Tmpl, which must be a class template with one type
-// parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
-// as the type Tmpl<T>. This allows us to actually instantiate the
-// template "selected" by TemplateSel<Tmpl>.
-//
-// This trick is necessary for simulating typedef for class templates,
-// which C++ doesn't support directly.
-template <GTEST_TEMPLATE_ Tmpl>
-struct TemplateSel {
- template <typename T>
- struct Bind {
- typedef Tmpl<T> type;
- };
-};
-
-# define GTEST_BIND_(TmplSel, T) \
- TmplSel::template Bind<T>::type
-
-// A unique struct template used as the default value for the
-// arguments of class template Templates. This allows us to simulate
-// variadic templates (e.g. Templates<int>, Templates<int, double>,
-// and etc), which C++ doesn't support directly.
-template <typename T>
-struct NoneT {};
-
-// The following family of struct and struct templates are used to
-// represent template lists. In particular, TemplatesN<T1, T2, ...,
-// TN> represents a list of N templates (T1, T2, ..., and TN). Except
-// for Templates0, every struct in the family has two member types:
-// Head for the selector of the first template in the list, and Tail
-// for the rest of the list.
-
-// The empty template list.
-struct Templates0 {};
-
-// Template lists of length 1, 2, 3, and so on.
-
-template <GTEST_TEMPLATE_ T1>
-struct Templates1 {
- typedef TemplateSel<T1> Head;
- typedef Templates0 Tail;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
-struct Templates2 {
- typedef TemplateSel<T1> Head;
- typedef Templates1<T2> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
-struct Templates3 {
- typedef TemplateSel<T1> Head;
- typedef Templates2<T2, T3> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4>
-struct Templates4 {
- typedef TemplateSel<T1> Head;
- typedef Templates3<T2, T3, T4> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
-struct Templates5 {
- typedef TemplateSel<T1> Head;
- typedef Templates4<T2, T3, T4, T5> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
-struct Templates6 {
- typedef TemplateSel<T1> Head;
- typedef Templates5<T2, T3, T4, T5, T6> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7>
-struct Templates7 {
- typedef TemplateSel<T1> Head;
- typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
-struct Templates8 {
- typedef TemplateSel<T1> Head;
- typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
-struct Templates9 {
- typedef TemplateSel<T1> Head;
- typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10>
-struct Templates10 {
- typedef TemplateSel<T1> Head;
- typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
-struct Templates11 {
- typedef TemplateSel<T1> Head;
- typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
-struct Templates12 {
- typedef TemplateSel<T1> Head;
- typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13>
-struct Templates13 {
- typedef TemplateSel<T1> Head;
- typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
-struct Templates14 {
- typedef TemplateSel<T1> Head;
- typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
-struct Templates15 {
- typedef TemplateSel<T1> Head;
- typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16>
-struct Templates16 {
- typedef TemplateSel<T1> Head;
- typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
-struct Templates17 {
- typedef TemplateSel<T1> Head;
- typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
-struct Templates18 {
- typedef TemplateSel<T1> Head;
- typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19>
-struct Templates19 {
- typedef TemplateSel<T1> Head;
- typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
-struct Templates20 {
- typedef TemplateSel<T1> Head;
- typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
-struct Templates21 {
- typedef TemplateSel<T1> Head;
- typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22>
-struct Templates22 {
- typedef TemplateSel<T1> Head;
- typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
-struct Templates23 {
- typedef TemplateSel<T1> Head;
- typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
-struct Templates24 {
- typedef TemplateSel<T1> Head;
- typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25>
-struct Templates25 {
- typedef TemplateSel<T1> Head;
- typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
-struct Templates26 {
- typedef TemplateSel<T1> Head;
- typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
-struct Templates27 {
- typedef TemplateSel<T1> Head;
- typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28>
-struct Templates28 {
- typedef TemplateSel<T1> Head;
- typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
-struct Templates29 {
- typedef TemplateSel<T1> Head;
- typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
-struct Templates30 {
- typedef TemplateSel<T1> Head;
- typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31>
-struct Templates31 {
- typedef TemplateSel<T1> Head;
- typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
-struct Templates32 {
- typedef TemplateSel<T1> Head;
- typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
-struct Templates33 {
- typedef TemplateSel<T1> Head;
- typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34>
-struct Templates34 {
- typedef TemplateSel<T1> Head;
- typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
-struct Templates35 {
- typedef TemplateSel<T1> Head;
- typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
-struct Templates36 {
- typedef TemplateSel<T1> Head;
- typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37>
-struct Templates37 {
- typedef TemplateSel<T1> Head;
- typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
-struct Templates38 {
- typedef TemplateSel<T1> Head;
- typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
-struct Templates39 {
- typedef TemplateSel<T1> Head;
- typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40>
-struct Templates40 {
- typedef TemplateSel<T1> Head;
- typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
-struct Templates41 {
- typedef TemplateSel<T1> Head;
- typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
-struct Templates42 {
- typedef TemplateSel<T1> Head;
- typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43>
-struct Templates43 {
- typedef TemplateSel<T1> Head;
- typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
-struct Templates44 {
- typedef TemplateSel<T1> Head;
- typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
-struct Templates45 {
- typedef TemplateSel<T1> Head;
- typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46>
-struct Templates46 {
- typedef TemplateSel<T1> Head;
- typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
-struct Templates47 {
- typedef TemplateSel<T1> Head;
- typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
-struct Templates48 {
- typedef TemplateSel<T1> Head;
- typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49>
-struct Templates49 {
- typedef TemplateSel<T1> Head;
- typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48, T49> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>
-struct Templates50 {
- typedef TemplateSel<T1> Head;
- typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48, T49, T50> Tail;
-};
-
-
-// We don't want to require the users to write TemplatesN<...> directly,
-// as that would require them to count the length. Templates<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Templates<list>
-// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Templates<T1, ..., TN>, and Google Test will translate
-// that to TemplatesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Templates template.
-template <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,
- GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,
- GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,
- GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,
- GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,
- GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,
- GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,
- GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,
- GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,
- GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,
- GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,
- GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,
- GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,
- GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,
- GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,
- GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,
- GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,
- GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,
- GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,
- GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,
- GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,
- GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,
- GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,
- GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,
- GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>
-struct Templates {
- typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
-};
-
-template <>
-struct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates0 type;
-};
-template <GTEST_TEMPLATE_ T1>
-struct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates1<T1> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
-struct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates2<T1, T2> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
-struct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates3<T1, T2, T3> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4>
-struct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates4<T1, T2, T3, T4> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
-struct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates5<T1, T2, T3, T4, T5> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
-struct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates6<T1, T2, T3, T4, T5, T6> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, NoneT, NoneT, NoneT> {
- typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, T48, NoneT, NoneT> {
- typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, T48, T49, NoneT> {
- typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48, T49> type;
-};
-
-// The TypeList template makes it possible to use either a single type
-// or a Types<...> list in TYPED_TEST_CASE() and
-// INSTANTIATE_TYPED_TEST_CASE_P().
-
-template <typename T>
-struct TypeList { typedef Types1<T> type; };
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-struct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> > {
- typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-// Due to C++ preprocessor weirdness, we need double indirection to
-// concatenate two tokens when one of them is __LINE__. Writing
-//
-// foo ## __LINE__
-//
-// will result in the token foo__LINE__, instead of foo followed by
-// the current line number. For more details, see
-// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
-#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
-#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
-
-// Google Test defines the testing::Message class to allow construction of
-// test messages via the << operator. The idea is that anything
-// streamable to std::ostream can be streamed to a testing::Message.
-// This allows a user to use his own types in Google Test assertions by
-// overloading the << operator.
-//
-// util/gtl/stl_logging-inl.h overloads << for STL containers. These
-// overloads cannot be defined in the std namespace, as that will be
-// undefined behavior. Therefore, they are defined in the global
-// namespace instead.
-//
-// C++'s symbol lookup rule (i.e. Koenig lookup) says that these
-// overloads are visible in either the std namespace or the global
-// namespace, but not other namespaces, including the testing
-// namespace which Google Test's Message class is in.
-//
-// To allow STL containers (and other types that has a << operator
-// defined in the global namespace) to be used in Google Test assertions,
-// testing::Message must access the custom << operator from the global
-// namespace. Hence this helper function.
-//
-// Note: Jeffrey Yasskin suggested an alternative fix by "using
-// ::operator<<;" in the definition of Message's operator<<. That fix
-// doesn't require a helper function, but unfortunately doesn't
-// compile with MSVC.
-template <typename T>
-inline void GTestStreamToHelper(std::ostream* os, const T& val) {
- *os << val;
-}
-
-class ProtocolMessage;
-namespace proto2 { class Message; }
-
-namespace testing {
-
-// Forward declarations.
-
-class AssertionResult; // Result of an assertion.
-class Message; // Represents a failure message.
-class Test; // Represents a test.
-class TestInfo; // Information about a test.
-class TestPartResult; // Result of a test part.
-class UnitTest; // A collection of test cases.
-
-template <typename T>
-::std::string PrintToString(const T& value);
-
-namespace internal {
-
-struct TraceInfo; // Information about a trace point.
-class ScopedTrace; // Implements scoped trace.
-class TestInfoImpl; // Opaque implementation of TestInfo
-class UnitTestImpl; // Opaque implementation of UnitTest
-
-// How many times InitGoogleTest() has been called.
-extern int g_init_gtest_count;
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-GTEST_API_ extern const char kStackTraceMarker[];
-
-// A secret type that Google Test users don't know about. It has no
-// definition on purpose. Therefore it's impossible to create a
-// Secret object, which is what we want.
-class Secret;
-
-// Two overloaded helpers for checking at compile time whether an
-// expression is a null pointer literal (i.e. NULL or any 0-valued
-// compile-time integral constant). Their return values have
-// different sizes, so we can use sizeof() to test which version is
-// picked by the compiler. These helpers have no implementations, as
-// we only need their signatures.
-//
-// Given IsNullLiteralHelper(x), the compiler will pick the first
-// version if x can be implicitly converted to Secret*, and pick the
-// second version otherwise. Since Secret is a secret and incomplete
-// type, the only expression a user can write that has type Secret* is
-// a null pointer literal. Therefore, we know that x is a null
-// pointer literal if and only if the first version is picked by the
-// compiler.
-char IsNullLiteralHelper(Secret* p);
-char (&IsNullLiteralHelper(...))[2]; // NOLINT
-
-// A compile-time bool constant that is true if and only if x is a
-// null pointer literal (i.e. NULL or any 0-valued compile-time
-// integral constant).
-#ifdef GTEST_ELLIPSIS_NEEDS_POD_
-// We lose support for NULL detection where the compiler doesn't like
-// passing non-POD classes through ellipsis (...).
-# define GTEST_IS_NULL_LITERAL_(x) false
-#else
-# define GTEST_IS_NULL_LITERAL_(x) \
- (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
-#endif // GTEST_ELLIPSIS_NEEDS_POD_
-
-// Appends the user-supplied message to the Google-Test-generated message.
-GTEST_API_ String AppendUserMessage(const String& gtest_msg,
- const Message& user_msg);
-
-// A helper class for creating scoped traces in user programs.
-class GTEST_API_ ScopedTrace {
- public:
- // The c'tor pushes the given source file location and message onto
- // a trace stack maintained by Google Test.
- ScopedTrace(const char* file, int line, const Message& message);
-
- // The d'tor pops the info pushed by the c'tor.
- //
- // Note that the d'tor is not virtual in order to be efficient.
- // Don't inherit from ScopedTrace!
- ~ScopedTrace();
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
-} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
- // c'tor and d'tor. Therefore it doesn't
- // need to be used otherwise.
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-// Declared here but defined in gtest.h, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable);
-
-// The Symbian compiler has a bug that prevents it from selecting the
-// correct overload of FormatForComparisonFailureMessage (see below)
-// unless we pass the first argument by reference. If we do that,
-// however, Visual Age C++ 10.1 generates a compiler error. Therefore
-// we only apply the work-around for Symbian.
-#if defined(__SYMBIAN32__)
-# define GTEST_CREF_WORKAROUND_ const&
-#else
-# define GTEST_CREF_WORKAROUND_
-#endif
-
-// When this operand is a const char* or char*, if the other operand
-// is a ::std::string or ::string, we print this operand as a C string
-// rather than a pointer (we do the same for wide strings); otherwise
-// we print it as a pointer to be safe.
-
-// This internal macro is used to avoid duplicated code.
-#define GTEST_FORMAT_IMPL_(operand2_type, operand1_printer)\
-inline String FormatForComparisonFailureMessage(\
- operand2_type::value_type* GTEST_CREF_WORKAROUND_ str, \
- const operand2_type& /*operand2*/) {\
- return operand1_printer(str);\
-}\
-inline String FormatForComparisonFailureMessage(\
- const operand2_type::value_type* GTEST_CREF_WORKAROUND_ str, \
- const operand2_type& /*operand2*/) {\
- return operand1_printer(str);\
-}
-
-GTEST_FORMAT_IMPL_(::std::string, String::ShowCStringQuoted)
-#if GTEST_HAS_STD_WSTRING
-GTEST_FORMAT_IMPL_(::std::wstring, String::ShowWideCStringQuoted)
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_FORMAT_IMPL_(::string, String::ShowCStringQuoted)
-#endif // GTEST_HAS_GLOBAL_STRING
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_FORMAT_IMPL_(::wstring, String::ShowWideCStringQuoted)
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#undef GTEST_FORMAT_IMPL_
-
-// The next four overloads handle the case where the operand being
-// printed is a char/wchar_t pointer and the other operand is not a
-// string/wstring object. In such cases, we just print the operand as
-// a pointer to be safe.
-#define GTEST_FORMAT_CHAR_PTR_IMPL_(CharType) \
- template <typename T> \
- String FormatForComparisonFailureMessage(CharType* GTEST_CREF_WORKAROUND_ p, \
- const T&) { \
- return PrintToString(static_cast<const void*>(p)); \
- }
-
-GTEST_FORMAT_CHAR_PTR_IMPL_(char)
-GTEST_FORMAT_CHAR_PTR_IMPL_(const char)
-GTEST_FORMAT_CHAR_PTR_IMPL_(wchar_t)
-GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t)
-
-#undef GTEST_FORMAT_CHAR_PTR_IMPL_
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings. For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-// expected_expression: "foo"
-// actual_expression: "bar"
-// expected_value: "5"
-// actual_value: "6"
-//
-// The ignoring_case parameter is true iff the assertion is a
-// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
- const char* actual_expression,
- const String& expected_value,
- const String& actual_value,
- bool ignoring_case);
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-GTEST_API_ String GetBoolAssertionFailureMessage(
- const AssertionResult& assertion_result,
- const char* expression_text,
- const char* actual_predicate_value,
- const char* expected_predicate_value);
-
-// This template class represents an IEEE floating-point number
-// (either single-precision or double-precision, depending on the
-// template parameters).
-//
-// The purpose of this class is to do more sophisticated number
-// comparison. (Due to round-off error, etc, it's very unlikely that
-// two floating-points will be equal exactly. Hence a naive
-// comparison by the == operation often doesn't work.)
-//
-// Format of IEEE floating-point:
-//
-// The most-significant bit being the leftmost, an IEEE
-// floating-point looks like
-//
-// sign_bit exponent_bits fraction_bits
-//
-// Here, sign_bit is a single bit that designates the sign of the
-// number.
-//
-// For float, there are 8 exponent bits and 23 fraction bits.
-//
-// For double, there are 11 exponent bits and 52 fraction bits.
-//
-// More details can be found at
-// http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
-//
-// Template parameter:
-//
-// RawType: the raw floating-point type (either float or double)
-template <typename RawType>
-class FloatingPoint {
- public:
- // Defines the unsigned integer type that has the same size as the
- // floating point number.
- typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;
-
- // Constants.
-
- // # of bits in a number.
- static const size_t kBitCount = 8*sizeof(RawType);
-
- // # of fraction bits in a number.
- static const size_t kFractionBitCount =
- std::numeric_limits<RawType>::digits - 1;
-
- // # of exponent bits in a number.
- static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
-
- // The mask for the sign bit.
- static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
-
- // The mask for the fraction bits.
- static const Bits kFractionBitMask =
- ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
-
- // The mask for the exponent bits.
- static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
-
- // How many ULP's (Units in the Last Place) we want to tolerate when
- // comparing two numbers. The larger the value, the more error we
- // allow. A 0 value means that two numbers must be exactly the same
- // to be considered equal.
- //
- // The maximum error of a single floating-point operation is 0.5
- // units in the last place. On Intel CPU's, all floating-point
- // calculations are done with 80-bit precision, while double has 64
- // bits. Therefore, 4 should be enough for ordinary use.
- //
- // See the following article for more details on ULP:
- // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm.
- static const size_t kMaxUlps = 4;
-
- // Constructs a FloatingPoint from a raw floating-point number.
- //
- // On an Intel CPU, passing a non-normalized NAN (Not a Number)
- // around may change its bits, although the new value is guaranteed
- // to be also a NAN. Therefore, don't expect this constructor to
- // preserve the bits in x when x is a NAN.
- explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
-
- // Static methods
-
- // Reinterprets a bit pattern as a floating-point number.
- //
- // This function is needed to test the AlmostEquals() method.
- static RawType ReinterpretBits(const Bits bits) {
- FloatingPoint fp(0);
- fp.u_.bits_ = bits;
- return fp.u_.value_;
- }
-
- // Returns the floating-point number that represent positive infinity.
- static RawType Infinity() {
- return ReinterpretBits(kExponentBitMask);
- }
-
- // Non-static methods
-
- // Returns the bits that represents this number.
- const Bits &bits() const { return u_.bits_; }
-
- // Returns the exponent bits of this number.
- Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
-
- // Returns the fraction bits of this number.
- Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
-
- // Returns the sign bit of this number.
- Bits sign_bit() const { return kSignBitMask & u_.bits_; }
-
- // Returns true iff this is NAN (not a number).
- bool is_nan() const {
- // It's a NAN if the exponent bits are all ones and the fraction
- // bits are not entirely zeros.
- return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
- }
-
- // Returns true iff this number is at most kMaxUlps ULP's away from
- // rhs. In particular, this function:
- //
- // - returns false if either number is (or both are) NAN.
- // - treats really large numbers as almost equal to infinity.
- // - thinks +0.0 and -0.0 are 0 DLP's apart.
- bool AlmostEquals(const FloatingPoint& rhs) const {
- // The IEEE standard says that any comparison operation involving
- // a NAN must return false.
- if (is_nan() || rhs.is_nan()) return false;
-
- return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
- <= kMaxUlps;
- }
-
- private:
- // The data type used to store the actual floating-point number.
- union FloatingPointUnion {
- RawType value_; // The raw floating-point number.
- Bits bits_; // The bits that represent the number.
- };
-
- // Converts an integer from the sign-and-magnitude representation to
- // the biased representation. More precisely, let N be 2 to the
- // power of (kBitCount - 1), an integer x is represented by the
- // unsigned number x + N.
- //
- // For instance,
- //
- // -N + 1 (the most negative number representable using
- // sign-and-magnitude) is represented by 1;
- // 0 is represented by N; and
- // N - 1 (the biggest number representable using
- // sign-and-magnitude) is represented by 2N - 1.
- //
- // Read http://en.wikipedia.org/wiki/Signed_number_representations
- // for more details on signed number representations.
- static Bits SignAndMagnitudeToBiased(const Bits &sam) {
- if (kSignBitMask & sam) {
- // sam represents a negative number.
- return ~sam + 1;
- } else {
- // sam represents a positive number.
- return kSignBitMask | sam;
- }
- }
-
- // Given two numbers in the sign-and-magnitude representation,
- // returns the distance between them as an unsigned number.
- static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,
- const Bits &sam2) {
- const Bits biased1 = SignAndMagnitudeToBiased(sam1);
- const Bits biased2 = SignAndMagnitudeToBiased(sam2);
- return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
- }
-
- FloatingPointUnion u_;
-};
-
-// Typedefs the instances of the FloatingPoint template class that we
-// care to use.
-typedef FloatingPoint<float> Float;
-typedef FloatingPoint<double> Double;
-
-// In order to catch the mistake of putting tests that use different
-// test fixture classes in the same test case, we need to assign
-// unique IDs to fixture classes and compare them. The TypeId type is
-// used to hold such IDs. The user should treat TypeId as an opaque
-// type: the only operation allowed on TypeId values is to compare
-// them for equality using the == operator.
-typedef const void* TypeId;
-
-template <typename T>
-class TypeIdHelper {
- public:
- // dummy_ must not have a const type. Otherwise an overly eager
- // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
- // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
- static bool dummy_;
-};
-
-template <typename T>
-bool TypeIdHelper<T>::dummy_ = false;
-
-// GetTypeId<T>() returns the ID of type T. Different values will be
-// returned for different types. Calling the function twice with the
-// same type argument is guaranteed to return the same ID.
-template <typename T>
-TypeId GetTypeId() {
- // The compiler is required to allocate a different
- // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
- // the template. Therefore, the address of dummy_ is guaranteed to
- // be unique.
- return &(TypeIdHelper<T>::dummy_);
-}
-
-// Returns the type ID of ::testing::Test. Always call this instead
-// of GetTypeId< ::testing::Test>() to get the type ID of
-// ::testing::Test, as the latter may give the wrong result due to a
-// suspected linker bug when compiling Google Test as a Mac OS X
-// framework.
-GTEST_API_ TypeId GetTestTypeId();
-
-// Defines the abstract factory interface that creates instances
-// of a Test object.
-class TestFactoryBase {
- public:
- virtual ~TestFactoryBase() {}
-
- // Creates a test instance to run. The instance is both created and destroyed
- // within TestInfoImpl::Run()
- virtual Test* CreateTest() = 0;
-
- protected:
- TestFactoryBase() {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);
-};
-
-// This class provides implementation of TeastFactoryBase interface.
-// It is used in TEST and TEST_F macros.
-template <class TestClass>
-class TestFactoryImpl : public TestFactoryBase {
- public:
- virtual Test* CreateTest() { return new TestClass; }
-};
-
-#if GTEST_OS_WINDOWS
-
-// Predicate-formatters for implementing the HRESULT checking macros
-// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
-// We pass a long instead of HRESULT to avoid causing an
-// include dependency for the HRESULT type.
-GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
- long hr); // NOLINT
-GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
- long hr); // NOLINT
-
-#endif // GTEST_OS_WINDOWS
-
-// Types of SetUpTestCase() and TearDownTestCase() functions.
-typedef void (*SetUpTestCaseFunc)();
-typedef void (*TearDownTestCaseFunc)();
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// name: name of the test
-// type_param the name of the test's type parameter, or NULL if
-// this is not a typed or a type-parameterized test.
-// value_param text representation of the test's value parameter,
-// or NULL if this is not a type-parameterized test.
-// fixture_class_id: ID of the test fixture class
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-// factory: pointer to the factory that creates a test object.
-// The newly created TestInfo instance will assume
-// ownership of the factory object.
-GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- TypeId fixture_class_id,
- SetUpTestCaseFunc set_up_tc,
- TearDownTestCaseFunc tear_down_tc,
- TestFactoryBase* factory);
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false. None of pstr, *pstr, and prefix can be NULL.
-GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// State of the definition of a type-parameterized test case.
-class GTEST_API_ TypedTestCasePState {
- public:
- TypedTestCasePState() : registered_(false) {}
-
- // Adds the given test name to defined_test_names_ and return true
- // if the test case hasn't been registered; otherwise aborts the
- // program.
- bool AddTestName(const char* file, int line, const char* case_name,
- const char* test_name) {
- if (registered_) {
- fprintf(stderr, "%s Test %s must be defined before "
- "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n",
- FormatFileLocation(file, line).c_str(), test_name, case_name);
- fflush(stderr);
- posix::Abort();
- }
- defined_test_names_.insert(test_name);
- return true;
- }
-
- // Verifies that registered_tests match the test names in
- // defined_test_names_; returns registered_tests if successful, or
- // aborts the program otherwise.
- const char* VerifyRegisteredTestNames(
- const char* file, int line, const char* registered_tests);
-
- private:
- bool registered_;
- ::std::set<const char*> defined_test_names_;
-};
-
-// Skips to the first non-space char after the first comma in 'str';
-// returns NULL if no comma is found in 'str'.
-inline const char* SkipComma(const char* str) {
- const char* comma = strchr(str, ',');
- if (comma == NULL) {
- return NULL;
- }
- while (IsSpace(*(++comma))) {}
- return comma;
-}
-
-// Returns the prefix of 'str' before the first comma in it; returns
-// the entire string if it contains no comma.
-inline String GetPrefixUntilComma(const char* str) {
- const char* comma = strchr(str, ',');
- return comma == NULL ? String(str) : String(str, comma - str);
-}
-
-// TypeParameterizedTest<Fixture, TestSel, Types>::Register()
-// registers a list of type-parameterized tests with Google Test. The
-// return value is insignificant - we just need to return something
-// such that we can call this function in a namespace scope.
-//
-// Implementation note: The GTEST_TEMPLATE_ macro declares a template
-// template parameter. It's defined in gtest-type-util.h.
-template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
-class TypeParameterizedTest {
- public:
- // 'index' is the index of the test in the type list 'Types'
- // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,
- // Types). Valid values for 'index' are [0, N - 1] where N is the
- // length of Types.
- static bool Register(const char* prefix, const char* case_name,
- const char* test_names, int index) {
- typedef typename Types::Head Type;
- typedef Fixture<Type> FixtureClass;
- typedef typename GTEST_BIND_(TestSel, Type) TestClass;
-
- // First, registers the first type-parameterized test in the type
- // list.
- MakeAndRegisterTestInfo(
- String::Format("%s%s%s/%d", prefix, prefix[0] == '\0' ? "" : "/",
- case_name, index).c_str(),
- GetPrefixUntilComma(test_names).c_str(),
- GetTypeName<Type>().c_str(),
- NULL, // No value parameter.
- GetTypeId<FixtureClass>(),
- TestClass::SetUpTestCase,
- TestClass::TearDownTestCase,
- new TestFactoryImpl<TestClass>);
-
- // Next, recurses (at compile time) with the tail of the type list.
- return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>
- ::Register(prefix, case_name, test_names, index + 1);
- }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, class TestSel>
-class TypeParameterizedTest<Fixture, TestSel, Types0> {
- public:
- static bool Register(const char* /*prefix*/, const char* /*case_name*/,
- const char* /*test_names*/, int /*index*/) {
- return true;
- }
-};
-
-// TypeParameterizedTestCase<Fixture, Tests, Types>::Register()
-// registers *all combinations* of 'Tests' and 'Types' with Google
-// Test. The return value is insignificant - we just need to return
-// something such that we can call this function in a namespace scope.
-template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
-class TypeParameterizedTestCase {
- public:
- static bool Register(const char* prefix, const char* case_name,
- const char* test_names) {
- typedef typename Tests::Head Head;
-
- // First, register the first test in 'Test' for each type in 'Types'.
- TypeParameterizedTest<Fixture, Head, Types>::Register(
- prefix, case_name, test_names, 0);
-
- // Next, recurses (at compile time) with the tail of the test list.
- return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>
- ::Register(prefix, case_name, SkipComma(test_names));
- }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, typename Types>
-class TypeParameterizedTestCase<Fixture, Templates0, Types> {
- public:
- static bool Register(const char* /*prefix*/, const char* /*case_name*/,
- const char* /*test_names*/) {
- return true;
- }
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-GTEST_API_ String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test,
- int skip_count);
-
-// Helpers for suppressing warnings on unreachable code or constant
-// condition.
-
-// Always returns true.
-GTEST_API_ bool AlwaysTrue();
-
-// Always returns false.
-inline bool AlwaysFalse() { return !AlwaysTrue(); }
-
-// Helper for suppressing false warning from Clang on a const char*
-// variable declared in a conditional expression always being NULL in
-// the else branch.
-struct GTEST_API_ ConstCharPtr {
- ConstCharPtr(const char* str) : value(str) {}
- operator bool() const { return true; }
- const char* value;
-};
-
-// A simple Linear Congruential Generator for generating random
-// numbers with a uniform distribution. Unlike rand() and srand(), it
-// doesn't use global state (and therefore can't interfere with user
-// code). Unlike rand_r(), it's portable. An LCG isn't very random,
-// but it's good enough for our purposes.
-class GTEST_API_ Random {
- public:
- static const UInt32 kMaxRange = 1u << 31;
-
- explicit Random(UInt32 seed) : state_(seed) {}
-
- void Reseed(UInt32 seed) { state_ = seed; }
-
- // Generates a random number from [0, range). Crashes if 'range' is
- // 0 or greater than kMaxRange.
- UInt32 Generate(UInt32 range);
-
- private:
- UInt32 state_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
-};
-
-// Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
-// compiler error iff T1 and T2 are different types.
-template <typename T1, typename T2>
-struct CompileAssertTypesEqual;
-
-template <typename T>
-struct CompileAssertTypesEqual<T, T> {
-};
-
-// Removes the reference from a type if it is a reference type,
-// otherwise leaves it unchanged. This is the same as
-// tr1::remove_reference, which is not widely available yet.
-template <typename T>
-struct RemoveReference { typedef T type; }; // NOLINT
-template <typename T>
-struct RemoveReference<T&> { typedef T type; }; // NOLINT
-
-// A handy wrapper around RemoveReference that works when the argument
-// T depends on template parameters.
-#define GTEST_REMOVE_REFERENCE_(T) \
- typename ::testing::internal::RemoveReference<T>::type
-
-// Removes const from a type if it is a const type, otherwise leaves
-// it unchanged. This is the same as tr1::remove_const, which is not
-// widely available yet.
-template <typename T>
-struct RemoveConst { typedef T type; }; // NOLINT
-template <typename T>
-struct RemoveConst<const T> { typedef T type; }; // NOLINT
-
-// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
-// definition to fail to remove the const in 'const int[3]' and 'const
-// char[3][4]'. The following specialization works around the bug.
-// However, it causes trouble with GCC and thus needs to be
-// conditionally compiled.
-#if defined(_MSC_VER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-template <typename T, size_t N>
-struct RemoveConst<const T[N]> {
- typedef typename RemoveConst<T>::type type[N];
-};
-#endif
-
-// A handy wrapper around RemoveConst that works when the argument
-// T depends on template parameters.
-#define GTEST_REMOVE_CONST_(T) \
- typename ::testing::internal::RemoveConst<T>::type
-
-// Turns const U&, U&, const U, and U all into U.
-#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
- GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
-
-// Adds reference to a type if it is not a reference type,
-// otherwise leaves it unchanged. This is the same as
-// tr1::add_reference, which is not widely available yet.
-template <typename T>
-struct AddReference { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddReference<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper around AddReference that works when the argument T
-// depends on template parameters.
-#define GTEST_ADD_REFERENCE_(T) \
- typename ::testing::internal::AddReference<T>::type
-
-// Adds a reference to const on top of T as necessary. For example,
-// it transforms
-//
-// char ==> const char&
-// const char ==> const char&
-// char& ==> const char&
-// const char& ==> const char&
-//
-// The argument T must depend on some template parameters.
-#define GTEST_REFERENCE_TO_CONST_(T) \
- GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
-
-// ImplicitlyConvertible<From, To>::value is a compile-time bool
-// constant that's true iff type From can be implicitly converted to
-// type To.
-template <typename From, typename To>
-class ImplicitlyConvertible {
- private:
- // We need the following helper functions only for their types.
- // They have no implementations.
-
- // MakeFrom() is an expression whose type is From. We cannot simply
- // use From(), as the type From may not have a public default
- // constructor.
- static From MakeFrom();
-
- // These two functions are overloaded. Given an expression
- // Helper(x), the compiler will pick the first version if x can be
- // implicitly converted to type To; otherwise it will pick the
- // second version.
- //
- // The first version returns a value of size 1, and the second
- // version returns a value of size 2. Therefore, by checking the
- // size of Helper(x), which can be done at compile time, we can tell
- // which version of Helper() is used, and hence whether x can be
- // implicitly converted to type To.
- static char Helper(To);
- static char (&Helper(...))[2]; // NOLINT
-
- // We have to put the 'public' section after the 'private' section,
- // or MSVC refuses to compile the code.
- public:
- // MSVC warns about implicitly converting from double to int for
- // possible loss of data, so we need to temporarily disable the
- // warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4244) // Temporarily disables warning 4244.
-
- static const bool value =
- sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
-# pragma warning(pop) // Restores the warning state.
-#elif defined(__BORLANDC__)
- // C++Builder cannot use member overload resolution during template
- // instantiation. The simplest workaround is to use its C++0x type traits
- // functions (C++Builder 2009 and above only).
- static const bool value = __is_convertible(From, To);
-#else
- static const bool value =
- sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
-#endif // _MSV_VER
-};
-template <typename From, typename To>
-const bool ImplicitlyConvertible<From, To>::value;
-
-// IsAProtocolMessage<T>::value is a compile-time bool constant that's
-// true iff T is type ProtocolMessage, proto2::Message, or a subclass
-// of those.
-template <typename T>
-struct IsAProtocolMessage
- : public bool_constant<
- ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value ||
- ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {
-};
-
-// When the compiler sees expression IsContainerTest<C>(0), if C is an
-// STL-style container class, the first overload of IsContainerTest
-// will be viable (since both C::iterator* and C::const_iterator* are
-// valid types and NULL can be implicitly converted to them). It will
-// be picked over the second overload as 'int' is a perfect match for
-// the type of argument 0. If C::iterator or C::const_iterator is not
-// a valid type, the first overload is not viable, and the second
-// overload will be picked. Therefore, we can determine whether C is
-// a container class by checking the type of IsContainerTest<C>(0).
-// The value of the expression is insignificant.
-//
-// Note that we look for both C::iterator and C::const_iterator. The
-// reason is that C++ injects the name of a class as a member of the
-// class itself (e.g. you can refer to class iterator as either
-// 'iterator' or 'iterator::iterator'). If we look for C::iterator
-// only, for example, we would mistakenly think that a class named
-// iterator is an STL container.
-//
-// Also note that the simpler approach of overloading
-// IsContainerTest(typename C::const_iterator*) and
-// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
-typedef int IsContainer;
-template <class C>
-IsContainer IsContainerTest(int /* dummy */,
- typename C::iterator* /* it */ = NULL,
- typename C::const_iterator* /* const_it */ = NULL) {
- return 0;
-}
-
-typedef char IsNotContainer;
-template <class C>
-IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
-
-// EnableIf<condition>::type is void when 'Cond' is true, and
-// undefined when 'Cond' is false. To use SFINAE to make a function
-// overload only apply when a particular expression is true, add
-// "typename EnableIf<expression>::type* = 0" as the last parameter.
-template<bool> struct EnableIf;
-template<> struct EnableIf<true> { typedef void type; }; // NOLINT
-
-// Utilities for native arrays.
-
-// ArrayEq() compares two k-dimensional native arrays using the
-// elements' operator==, where k can be any integer >= 0. When k is
-// 0, ArrayEq() degenerates into comparing a single pair of values.
-
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {
- return internal::ArrayEq(lhs, N, rhs);
-}
-
-// This helper reduces code bloat. If we instead put its logic inside
-// the previous ArrayEq() function, arrays with different sizes would
-// lead to different copies of the template code.
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
- for (size_t i = 0; i != size; i++) {
- if (!internal::ArrayEq(lhs[i], rhs[i]))
- return false;
- }
- return true;
-}
-
-// Finds the first element in the iterator range [begin, end) that
-// equals elem. Element may be a native array type itself.
-template <typename Iter, typename Element>
-Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
- for (Iter it = begin; it != end; ++it) {
- if (internal::ArrayEq(*it, elem))
- return it;
- }
- return end;
-}
-
-// CopyArray() copies a k-dimensional native array using the elements'
-// operator=, where k can be any integer >= 0. When k is 0,
-// CopyArray() degenerates into copying a single value.
-
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline void CopyArray(const T& from, U* to) { *to = from; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline void CopyArray(const T(&from)[N], U(*to)[N]) {
- internal::CopyArray(from, N, *to);
-}
-
-// This helper reduces code bloat. If we instead put its logic inside
-// the previous CopyArray() function, arrays with different sizes
-// would lead to different copies of the template code.
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to) {
- for (size_t i = 0; i != size; i++) {
- internal::CopyArray(from[i], to + i);
- }
-}
-
-// The relation between an NativeArray object (see below) and the
-// native array it represents.
-enum RelationToSource {
- kReference, // The NativeArray references the native array.
- kCopy // The NativeArray makes a copy of the native array and
- // owns the copy.
-};
-
-// Adapts a native array to a read-only STL-style container. Instead
-// of the complete STL container concept, this adaptor only implements
-// members useful for Google Mock's container matchers. New members
-// should be added as needed. To simplify the implementation, we only
-// support Element being a raw type (i.e. having no top-level const or
-// reference modifier). It's the client's responsibility to satisfy
-// this requirement. Element can be an array type itself (hence
-// multi-dimensional arrays are supported).
-template <typename Element>
-class NativeArray {
- public:
- // STL-style container typedefs.
- typedef Element value_type;
- typedef Element* iterator;
- typedef const Element* const_iterator;
-
- // Constructs from a native array.
- NativeArray(const Element* array, size_t count, RelationToSource relation) {
- Init(array, count, relation);
- }
-
- // Copy constructor.
- NativeArray(const NativeArray& rhs) {
- Init(rhs.array_, rhs.size_, rhs.relation_to_source_);
- }
-
- ~NativeArray() {
- // Ensures that the user doesn't instantiate NativeArray with a
- // const or reference type.
- static_cast<void>(StaticAssertTypeEqHelper<Element,
- GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>());
- if (relation_to_source_ == kCopy)
- delete[] array_;
- }
-
- // STL-style container methods.
- size_t size() const { return size_; }
- const_iterator begin() const { return array_; }
- const_iterator end() const { return array_ + size_; }
- bool operator==(const NativeArray& rhs) const {
- return size() == rhs.size() &&
- ArrayEq(begin(), size(), rhs.begin());
- }
-
- private:
- // Initializes this object; makes a copy of the input array if
- // 'relation' is kCopy.
- void Init(const Element* array, size_t a_size, RelationToSource relation) {
- if (relation == kReference) {
- array_ = array;
- } else {
- Element* const copy = new Element[a_size];
- CopyArray(array, a_size, copy);
- array_ = copy;
- }
- size_ = a_size;
- relation_to_source_ = relation;
- }
-
- const Element* array_;
- size_t size_;
- RelationToSource relation_to_source_;
-
- GTEST_DISALLOW_ASSIGN_(NativeArray);
-};
-
-} // namespace internal
-} // namespace testing
-
-#define GTEST_MESSAGE_AT_(file, line, message, result_type) \
- ::testing::internal::AssertHelper(result_type, file, line, message) \
- = ::testing::Message()
-
-#define GTEST_MESSAGE_(message, result_type) \
- GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
-
-#define GTEST_FATAL_FAILURE_(message) \
- return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
-
-#define GTEST_NONFATAL_FAILURE_(message) \
- GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
-
-#define GTEST_SUCCESS_(message) \
- GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
-
-// Suppresses MSVC warnings 4072 (unreachable code) for the code following
-// statement if it returns or throws (or doesn't return or throw in some
-// situations).
-#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
- if (::testing::internal::AlwaysTrue()) { statement; }
-
-#define GTEST_TEST_THROW_(statement, expected_exception, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::ConstCharPtr gtest_msg = "") { \
- bool gtest_caught_expected = false; \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (expected_exception const&) { \
- gtest_caught_expected = true; \
- } \
- catch (...) { \
- gtest_msg.value = \
- "Expected: " #statement " throws an exception of type " \
- #expected_exception ".\n Actual: it throws a different type."; \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
- } \
- if (!gtest_caught_expected) { \
- gtest_msg.value = \
- "Expected: " #statement " throws an exception of type " \
- #expected_exception ".\n Actual: it throws nothing."; \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \
- fail(gtest_msg.value)
-
-#define GTEST_TEST_NO_THROW_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (...) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
- fail("Expected: " #statement " doesn't throw an exception.\n" \
- " Actual: it throws.")
-
-#define GTEST_TEST_ANY_THROW_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- bool gtest_caught_any = false; \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (...) { \
- gtest_caught_any = true; \
- } \
- if (!gtest_caught_any) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
- fail("Expected: " #statement " throws an exception.\n" \
- " Actual: it doesn't.")
-
-
-// Implements Boolean test assertions such as EXPECT_TRUE. expression can be
-// either a boolean expression or an AssertionResult. text is a textual
-// represenation of expression as it was passed into the EXPECT_TRUE.
-#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar_ = \
- ::testing::AssertionResult(expression)) \
- ; \
- else \
- fail(::testing::internal::GetBoolAssertionFailureMessage(\
- gtest_ar_, text, #actual, #expected).c_str())
-
-#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
- fail("Expected: " #statement " doesn't generate new fatal " \
- "failures in the current thread.\n" \
- " Actual: it does.")
-
-// Expands to the name of the class that implements the given test.
-#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- test_case_name##_##test_name##_Test
-
-// Helper macro for defining tests.
-#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\
-class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
- public:\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
- private:\
- virtual void TestBody();\
- static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
-};\
-\
-::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
- ::test_info_ =\
- ::testing::internal::MakeAndRegisterTestInfo(\
- #test_case_name, #test_name, NULL, NULL, \
- (parent_id), \
- parent_class::SetUpTestCase, \
- parent_class::TearDownTestCase, \
- new ::testing::internal::TestFactoryImpl<\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
-void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the public API for death tests. It is
-// #included by gtest.h so a user doesn't need to include this
-// directly.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines internal utilities needed for implementing
-// death tests. They are subject to change without notice.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-
-
-#include <stdio.h>
-
-namespace testing {
-namespace internal {
-
-GTEST_DECLARE_string_(internal_run_death_test);
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kDeathTestStyleFlag[] = "death_test_style";
-const char kDeathTestUseFork[] = "death_test_use_fork";
-const char kInternalRunDeathTestFlag[] = "internal_run_death_test";
-
-#if GTEST_HAS_DEATH_TEST
-
-// DeathTest is a class that hides much of the complexity of the
-// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method
-// returns a concrete class that depends on the prevailing death test
-// style, as defined by the --gtest_death_test_style and/or
-// --gtest_internal_run_death_test flags.
-
-// In describing the results of death tests, these terms are used with
-// the corresponding definitions:
-//
-// exit status: The integer exit information in the format specified
-// by wait(2)
-// exit code: The integer code passed to exit(3), _exit(2), or
-// returned from main()
-class GTEST_API_ DeathTest {
- public:
- // Create returns false if there was an error determining the
- // appropriate action to take for the current death test; for example,
- // if the gtest_death_test_style flag is set to an invalid value.
- // The LastMessage method will return a more detailed message in that
- // case. Otherwise, the DeathTest pointer pointed to by the "test"
- // argument is set. If the death test should be skipped, the pointer
- // is set to NULL; otherwise, it is set to the address of a new concrete
- // DeathTest object that controls the execution of the current test.
- static bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test);
- DeathTest();
- virtual ~DeathTest() { }
-
- // A helper class that aborts a death test when it's deleted.
- class ReturnSentinel {
- public:
- explicit ReturnSentinel(DeathTest* test) : test_(test) { }
- ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }
- private:
- DeathTest* const test_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);
- } GTEST_ATTRIBUTE_UNUSED_;
-
- // An enumeration of possible roles that may be taken when a death
- // test is encountered. EXECUTE means that the death test logic should
- // be executed immediately. OVERSEE means that the program should prepare
- // the appropriate environment for a child process to execute the death
- // test, then wait for it to complete.
- enum TestRole { OVERSEE_TEST, EXECUTE_TEST };
-
- // An enumeration of the three reasons that a test might be aborted.
- enum AbortReason {
- TEST_ENCOUNTERED_RETURN_STATEMENT,
- TEST_THREW_EXCEPTION,
- TEST_DID_NOT_DIE
- };
-
- // Assumes one of the above roles.
- virtual TestRole AssumeRole() = 0;
-
- // Waits for the death test to finish and returns its status.
- virtual int Wait() = 0;
-
- // Returns true if the death test passed; that is, the test process
- // exited during the test, its exit status matches a user-supplied
- // predicate, and its stderr output matches a user-supplied regular
- // expression.
- // The user-supplied predicate may be a macro expression rather
- // than a function pointer or functor, or else Wait and Passed could
- // be combined.
- virtual bool Passed(bool exit_status_ok) = 0;
-
- // Signals that the death test did not die as expected.
- virtual void Abort(AbortReason reason) = 0;
-
- // Returns a human-readable outcome message regarding the outcome of
- // the last death test.
- static const char* LastMessage();
-
- static void set_last_death_test_message(const String& message);
-
- private:
- // A string containing a description of the outcome of the last death test.
- static String last_death_test_message_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);
-};
-
-// Factory interface for death tests. May be mocked out for testing.
-class DeathTestFactory {
- public:
- virtual ~DeathTestFactory() { }
- virtual bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test) = 0;
-};
-
-// A concrete DeathTestFactory implementation for normal use.
-class DefaultDeathTestFactory : public DeathTestFactory {
- public:
- virtual bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test);
-};
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
-
-// Traps C++ exceptions escaping statement and reports them as test
-// failures. Note that trapping SEH exceptions is not implemented here.
-# if GTEST_HAS_EXCEPTIONS
-# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } catch (const ::std::exception& gtest_exception) { \
- fprintf(\
- stderr, \
- "\n%s: Caught std::exception-derived exception escaping the " \
- "death test statement. Exception message: %s\n", \
- ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
- gtest_exception.what()); \
- fflush(stderr); \
- death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
- } catch (...) { \
- death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
- }
-
-# else
-# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-
-# endif
-
-// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
-// ASSERT_EXIT*, and EXPECT_EXIT*.
-# define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- const ::testing::internal::RE& gtest_regex = (regex); \
- ::testing::internal::DeathTest* gtest_dt; \
- if (!::testing::internal::DeathTest::Create(#statement, &gtest_regex, \
- __FILE__, __LINE__, &gtest_dt)) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
- } \
- if (gtest_dt != NULL) { \
- ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \
- gtest_dt_ptr(gtest_dt); \
- switch (gtest_dt->AssumeRole()) { \
- case ::testing::internal::DeathTest::OVERSEE_TEST: \
- if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
- } \
- break; \
- case ::testing::internal::DeathTest::EXECUTE_TEST: { \
- ::testing::internal::DeathTest::ReturnSentinel \
- gtest_sentinel(gtest_dt); \
- GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \
- gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
- break; \
- } \
- default: \
- break; \
- } \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \
- fail(::testing::internal::DeathTest::LastMessage())
-// The symbol "fail" here expands to something into which a message
-// can be streamed.
-
-// A class representing the parsed contents of the
-// --gtest_internal_run_death_test flag, as it existed when
-// RUN_ALL_TESTS was called.
-class InternalRunDeathTestFlag {
- public:
- InternalRunDeathTestFlag(const String& a_file,
- int a_line,
- int an_index,
- int a_write_fd)
- : file_(a_file), line_(a_line), index_(an_index),
- write_fd_(a_write_fd) {}
-
- ~InternalRunDeathTestFlag() {
- if (write_fd_ >= 0)
- posix::Close(write_fd_);
- }
-
- String file() const { return file_; }
- int line() const { return line_; }
- int index() const { return index_; }
- int write_fd() const { return write_fd_; }
-
- private:
- String file_;
- int line_;
- int index_;
- int write_fd_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
-};
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
-
-#else // GTEST_HAS_DEATH_TEST
-
-// This macro is used for implementing macros such as
-// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
-// death tests are not supported. Those macros must compile on such systems
-// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
-// systems that support death tests. This allows one to write such a macro
-// on a system that does not support death tests and be sure that it will
-// compile on a death-test supporting system.
-//
-// Parameters:
-// statement - A statement that a macro such as EXPECT_DEATH would test
-// for program termination. This macro has to make sure this
-// statement is compiled but not executed, to ensure that
-// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
-// parameter iff EXPECT_DEATH compiles with it.
-// regex - A regex that a macro such as EXPECT_DEATH would use to test
-// the output of statement. This parameter has to be
-// compiled but not evaluated by this macro, to ensure that
-// this macro only accepts expressions that a macro such as
-// EXPECT_DEATH would accept.
-// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
-// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
-// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
-// compile inside functions where ASSERT_DEATH doesn't
-// compile.
-//
-// The branch that has an always false condition is used to ensure that
-// statement and regex are compiled (and thus syntactically correct) but
-// never executed. The unreachable code macro protects the terminator
-// statement from generating an 'unreachable code' warning in case
-// statement unconditionally returns or throws. The Message constructor at
-// the end allows the syntax of streaming additional messages into the
-// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
-# define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- GTEST_LOG_(WARNING) \
- << "Death tests are not supported on this platform.\n" \
- << "Statement '" #statement "' cannot be verified."; \
- } else if (::testing::internal::AlwaysFalse()) { \
- ::testing::internal::RE::PartialMatch(".*", (regex)); \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- terminator; \
- } else \
- ::testing::Message()
-
-#endif // GTEST_HAS_DEATH_TEST
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-
-namespace testing {
-
-// This flag controls the style of death tests. Valid values are "threadsafe",
-// meaning that the death test child process will re-execute the test binary
-// from the start, running only a single death test, or "fast",
-// meaning that the child process will execute the test logic immediately
-// after forking.
-GTEST_DECLARE_string_(death_test_style);
-
-#if GTEST_HAS_DEATH_TEST
-
-// The following macros are useful for writing death tests.
-
-// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
-// executed:
-//
-// 1. It generates a warning if there is more than one active
-// thread. This is because it's safe to fork() or clone() only
-// when there is a single thread.
-//
-// 2. The parent process clone()s a sub-process and runs the death
-// test in it; the sub-process exits with code 0 at the end of the
-// death test, if it hasn't exited already.
-//
-// 3. The parent process waits for the sub-process to terminate.
-//
-// 4. The parent process checks the exit code and error message of
-// the sub-process.
-//
-// Examples:
-//
-// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
-// for (int i = 0; i < 5; i++) {
-// EXPECT_DEATH(server.ProcessRequest(i),
-// "Invalid request .* in ProcessRequest()")
-// << "Failed to die on request " << i);
-// }
-//
-// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
-//
-// bool KilledBySIGHUP(int exit_code) {
-// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
-// }
-//
-// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
-//
-// On the regular expressions used in death tests:
-//
-// On POSIX-compliant systems (*nix), we use the <regex.h> library,
-// which uses the POSIX extended regex syntax.
-//
-// On other platforms (e.g. Windows), we only support a simple regex
-// syntax implemented as part of Google Test. This limited
-// implementation should be enough most of the time when writing
-// death tests; though it lacks many features you can find in PCRE
-// or POSIX extended regex syntax. For example, we don't support
-// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
-// repetition count ("x{5,7}"), among others.
-//
-// Below is the syntax that we do support. We chose it to be a
-// subset of both PCRE and POSIX extended regex, so it's easy to
-// learn wherever you come from. In the following: 'A' denotes a
-// literal character, period (.), or a single \\ escape sequence;
-// 'x' and 'y' denote regular expressions; 'm' and 'n' are for
-// natural numbers.
-//
-// c matches any literal character c
-// \\d matches any decimal digit
-// \\D matches any character that's not a decimal digit
-// \\f matches \f
-// \\n matches \n
-// \\r matches \r
-// \\s matches any ASCII whitespace, including \n
-// \\S matches any character that's not a whitespace
-// \\t matches \t
-// \\v matches \v
-// \\w matches any letter, _, or decimal digit
-// \\W matches any character that \\w doesn't match
-// \\c matches any literal character c, which must be a punctuation
-// . matches any single character except \n
-// A? matches 0 or 1 occurrences of A
-// A* matches 0 or many occurrences of A
-// A+ matches 1 or many occurrences of A
-// ^ matches the beginning of a string (not that of each line)
-// $ matches the end of a string (not that of each line)
-// xy matches x followed by y
-//
-// If you accidentally use PCRE or POSIX extended regex features
-// not implemented by us, you will get a run-time failure. In that
-// case, please try to rewrite your regular expression within the
-// above syntax.
-//
-// This implementation is *not* meant to be as highly tuned or robust
-// as a compiled regex library, but should perform well enough for a
-// death test, which already incurs significant overhead by launching
-// a child process.
-//
-// Known caveats:
-//
-// A "threadsafe" style death test obtains the path to the test
-// program from argv[0] and re-executes it in the sub-process. For
-// simplicity, the current implementation doesn't search the PATH
-// when launching the sub-process. This means that the user must
-// invoke the test program via a path that contains at least one
-// path separator (e.g. path/to/foo_test and
-// /absolute/path/to/bar_test are fine, but foo_test is not). This
-// is rarely a problem as people usually don't put the test binary
-// directory in PATH.
-//
-// TODO(wan@google.com): make thread-safe death tests search the PATH.
-
-// Asserts that a given statement causes the program to exit, with an
-// integer exit status that satisfies predicate, and emitting error output
-// that matches regex.
-# define ASSERT_EXIT(statement, predicate, regex) \
- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
-
-// Like ASSERT_EXIT, but continues on to successive tests in the
-// test case, if any:
-# define EXPECT_EXIT(statement, predicate, regex) \
- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
-
-// Asserts that a given statement causes the program to exit, either by
-// explicitly exiting with a nonzero exit code or being killed by a
-// signal, and emitting error output that matches regex.
-# define ASSERT_DEATH(statement, regex) \
- ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
-
-// Like ASSERT_DEATH, but continues on to successive tests in the
-// test case, if any:
-# define EXPECT_DEATH(statement, regex) \
- EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
-
-// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
-
-// Tests that an exit code describes a normal exit with a given exit code.
-class GTEST_API_ ExitedWithCode {
- public:
- explicit ExitedWithCode(int exit_code);
- bool operator()(int exit_status) const;
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ExitedWithCode& other);
-
- const int exit_code_;
-};
-
-# if !GTEST_OS_WINDOWS
-// Tests that an exit code describes an exit due to termination by a
-// given signal.
-class GTEST_API_ KilledBySignal {
- public:
- explicit KilledBySignal(int signum);
- bool operator()(int exit_status) const;
- private:
- const int signum_;
-};
-# endif // !GTEST_OS_WINDOWS
-
-// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
-// The death testing framework causes this to have interesting semantics,
-// since the sideeffects of the call are only visible in opt mode, and not
-// in debug mode.
-//
-// In practice, this can be used to test functions that utilize the
-// LOG(DFATAL) macro using the following style:
-//
-// int DieInDebugOr12(int* sideeffect) {
-// if (sideeffect) {
-// *sideeffect = 12;
-// }
-// LOG(DFATAL) << "death";
-// return 12;
-// }
-//
-// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
-// int sideeffect = 0;
-// // Only asserts in dbg.
-// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
-//
-// #ifdef NDEBUG
-// // opt-mode has sideeffect visible.
-// EXPECT_EQ(12, sideeffect);
-// #else
-// // dbg-mode no visible sideeffect.
-// EXPECT_EQ(0, sideeffect);
-// #endif
-// }
-//
-// This will assert that DieInDebugReturn12InOpt() crashes in debug
-// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
-// appropriate fallback value (12 in this case) in opt mode. If you
-// need to test that a function has appropriate side-effects in opt
-// mode, include assertions against the side-effects. A general
-// pattern for this is:
-//
-// EXPECT_DEBUG_DEATH({
-// // Side-effects here will have an effect after this statement in
-// // opt mode, but none in debug mode.
-// EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
-// }, "death");
-//
-# ifdef NDEBUG
-
-# define EXPECT_DEBUG_DEATH(statement, regex) \
- do { statement; } while (::testing::internal::AlwaysFalse())
-
-# define ASSERT_DEBUG_DEATH(statement, regex) \
- do { statement; } while (::testing::internal::AlwaysFalse())
-
-# else
-
-# define EXPECT_DEBUG_DEATH(statement, regex) \
- EXPECT_DEATH(statement, regex)
-
-# define ASSERT_DEBUG_DEATH(statement, regex) \
- ASSERT_DEATH(statement, regex)
-
-# endif // NDEBUG for EXPECT_DEBUG_DEATH
-#endif // GTEST_HAS_DEATH_TEST
-
-// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
-// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
-// death tests are supported; otherwise they just issue a warning. This is
-// useful when you are combining death test assertions with normal test
-// assertions in one test.
-#if GTEST_HAS_DEATH_TEST
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- EXPECT_DEATH(statement, regex)
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- ASSERT_DEATH(statement, regex)
-#else
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
-#endif
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the Message class.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
-// program!
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-
-#include <limits>
-
-
-namespace testing {
-
-// The Message class works like an ostream repeater.
-//
-// Typical usage:
-//
-// 1. You stream a bunch of values to a Message object.
-// It will remember the text in a stringstream.
-// 2. Then you stream the Message object to an ostream.
-// This causes the text in the Message to be streamed
-// to the ostream.
-//
-// For example;
-//
-// testing::Message foo;
-// foo << 1 << " != " << 2;
-// std::cout << foo;
-//
-// will print "1 != 2".
-//
-// Message is not intended to be inherited from. In particular, its
-// destructor is not virtual.
-//
-// Note that stringstream behaves differently in gcc and in MSVC. You
-// can stream a NULL char pointer to it in the former, but not in the
-// latter (it causes an access violation if you do). The Message
-// class hides this difference by treating a NULL char pointer as
-// "(null)".
-class GTEST_API_ Message {
- private:
- // The type of basic IO manipulators (endl, ends, and flush) for
- // narrow streams.
- typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
-
- public:
- // Constructs an empty Message.
- // We allocate the stringstream separately because otherwise each use of
- // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's
- // stack frame leading to huge stack frames in some cases; gcc does not reuse
- // the stack space.
- Message() : ss_(new ::std::stringstream) {
- // By default, we want there to be enough precision when printing
- // a double to a Message.
- *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
- }
-
- // Copy constructor.
- Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
- *ss_ << msg.GetString();
- }
-
- // Constructs a Message from a C-string.
- explicit Message(const char* str) : ss_(new ::std::stringstream) {
- *ss_ << str;
- }
-
-#if GTEST_OS_SYMBIAN
- // Streams a value (either a pointer or not) to this object.
- template <typename T>
- inline Message& operator <<(const T& value) {
- StreamHelper(typename internal::is_pointer<T>::type(), value);
- return *this;
- }
-#else
- // Streams a non-pointer value to this object.
- template <typename T>
- inline Message& operator <<(const T& val) {
- ::GTestStreamToHelper(ss_.get(), val);
- return *this;
- }
-
- // Streams a pointer value to this object.
- //
- // This function is an overload of the previous one. When you
- // stream a pointer to a Message, this definition will be used as it
- // is more specialized. (The C++ Standard, section
- // [temp.func.order].) If you stream a non-pointer, then the
- // previous definition will be used.
- //
- // The reason for this overload is that streaming a NULL pointer to
- // ostream is undefined behavior. Depending on the compiler, you
- // may get "0", "(nil)", "(null)", or an access violation. To
- // ensure consistent result across compilers, we always treat NULL
- // as "(null)".
- template <typename T>
- inline Message& operator <<(T* const& pointer) { // NOLINT
- if (pointer == NULL) {
- *ss_ << "(null)";
- } else {
- ::GTestStreamToHelper(ss_.get(), pointer);
- }
- return *this;
- }
-#endif // GTEST_OS_SYMBIAN
-
- // Since the basic IO manipulators are overloaded for both narrow
- // and wide streams, we have to provide this specialized definition
- // of operator <<, even though its body is the same as the
- // templatized version above. Without this definition, streaming
- // endl or other basic IO manipulators to Message will confuse the
- // compiler.
- Message& operator <<(BasicNarrowIoManip val) {
- *ss_ << val;
- return *this;
- }
-
- // Instead of 1/0, we want to see true/false for bool values.
- Message& operator <<(bool b) {
- return *this << (b ? "true" : "false");
- }
-
- // These two overloads allow streaming a wide C string to a Message
- // using the UTF-8 encoding.
- Message& operator <<(const wchar_t* wide_c_str) {
- return *this << internal::String::ShowWideCString(wide_c_str);
- }
- Message& operator <<(wchar_t* wide_c_str) {
- return *this << internal::String::ShowWideCString(wide_c_str);
- }
-
-#if GTEST_HAS_STD_WSTRING
- // Converts the given wide string to a narrow string using the UTF-8
- // encoding, and streams the result to this Message object.
- Message& operator <<(const ::std::wstring& wstr);
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
- // Converts the given wide string to a narrow string using the UTF-8
- // encoding, and streams the result to this Message object.
- Message& operator <<(const ::wstring& wstr);
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
- // Gets the text streamed to this object so far as a String.
- // Each '\0' character in the buffer is replaced with "\\0".
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- internal::String GetString() const {
- return internal::StringStreamToString(ss_.get());
- }
-
- private:
-
-#if GTEST_OS_SYMBIAN
- // These are needed as the Nokia Symbian Compiler cannot decide between
- // const T& and const T* in a function template. The Nokia compiler _can_
- // decide between class template specializations for T and T*, so a
- // tr1::type_traits-like is_pointer works, and we can overload on that.
- template <typename T>
- inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) {
- if (pointer == NULL) {
- *ss_ << "(null)";
- } else {
- ::GTestStreamToHelper(ss_.get(), pointer);
- }
- }
- template <typename T>
- inline void StreamHelper(internal::false_type /*dummy*/, const T& value) {
- ::GTestStreamToHelper(ss_.get(), value);
- }
-#endif // GTEST_OS_SYMBIAN
-
- // We'll hold the text streamed to this object here.
- const internal::scoped_ptr< ::std::stringstream> ss_;
-
- // We declare (but don't implement) this to prevent the compiler
- // from implementing the assignment operator.
- void operator=(const Message&);
-};
-
-// Streams a Message to an ostream.
-inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
- return os << sb.GetString();
-}
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-// This file was GENERATED by command:
-// pump.py gtest-param-test.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: vladl@google.com (Vlad Losev)
-//
-// Macros and functions for implementing parameterized tests
-// in Google C++ Testing Framework (Google Test)
-//
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-
-
-// Value-parameterized tests allow you to test your code with different
-// parameters without writing multiple copies of the same test.
-//
-// Here is how you use value-parameterized tests:
-
-#if 0
-
-// To write value-parameterized tests, first you should define a fixture
-// class. It is usually derived from testing::TestWithParam<T> (see below for
-// another inheritance scheme that's sometimes useful in more complicated
-// class hierarchies), where the type of your parameter values.
-// TestWithParam<T> is itself derived from testing::Test. T can be any
-// copyable type. If it's a raw pointer, you are responsible for managing the
-// lifespan of the pointed values.
-
-class FooTest : public ::testing::TestWithParam<const char*> {
- // You can implement all the usual class fixture members here.
-};
-
-// Then, use the TEST_P macro to define as many parameterized tests
-// for this fixture as you want. The _P suffix is for "parameterized"
-// or "pattern", whichever you prefer to think.
-
-TEST_P(FooTest, DoesBlah) {
- // Inside a test, access the test parameter with the GetParam() method
- // of the TestWithParam<T> class:
- EXPECT_TRUE(foo.Blah(GetParam()));
- ...
-}
-
-TEST_P(FooTest, HasBlahBlah) {
- ...
-}
-
-// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
-// case with any set of parameters you want. Google Test defines a number
-// of functions for generating test parameters. They return what we call
-// (surprise!) parameter generators. Here is a summary of them, which
-// are all in the testing namespace:
-//
-//
-// Range(begin, end [, step]) - Yields values {begin, begin+step,
-// begin+step+step, ...}. The values do not
-// include end. step defaults to 1.
-// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
-// ValuesIn(container) - Yields values from a C-style array, an STL
-// ValuesIn(begin,end) container, or an iterator range [begin, end).
-// Bool() - Yields sequence {false, true}.
-// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
-// for the math savvy) of the values generated
-// by the N generators.
-//
-// For more details, see comments at the definitions of these functions below
-// in this file.
-//
-// The following statement will instantiate tests from the FooTest test case
-// each with parameter values "meeny", "miny", and "moe".
-
-INSTANTIATE_TEST_CASE_P(InstantiationName,
- FooTest,
- Values("meeny", "miny", "moe"));
-
-// To distinguish different instances of the pattern, (yes, you
-// can instantiate it more then once) the first argument to the
-// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
-// actual test case name. Remember to pick unique prefixes for different
-// instantiations. The tests from the instantiation above will have
-// these names:
-//
-// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
-// * InstantiationName/FooTest.DoesBlah/1 for "miny"
-// * InstantiationName/FooTest.DoesBlah/2 for "moe"
-// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
-// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
-// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
-//
-// You can use these names in --gtest_filter.
-//
-// This statement will instantiate all tests from FooTest again, each
-// with parameter values "cat" and "dog":
-
-const char* pets[] = {"cat", "dog"};
-INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
-
-// The tests from the instantiation above will have these names:
-//
-// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
-//
-// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
-// in the given test case, whether their definitions come before or
-// AFTER the INSTANTIATE_TEST_CASE_P statement.
-//
-// Please also note that generator expressions (including parameters to the
-// generators) are evaluated in InitGoogleTest(), after main() has started.
-// This allows the user on one hand, to adjust generator parameters in order
-// to dynamically determine a set of tests to run and on the other hand,
-// give the user a chance to inspect the generated tests with Google Test
-// reflection API before RUN_ALL_TESTS() is executed.
-//
-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
-// for more examples.
-//
-// In the future, we plan to publish the API for defining new parameter
-// generators. But for now this interface remains part of the internal
-// implementation and is subject to change.
-//
-//
-// A parameterized test fixture must be derived from testing::Test and from
-// testing::WithParamInterface<T>, where T is the type of the parameter
-// values. Inheriting from TestWithParam<T> satisfies that requirement because
-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
-// complicated hierarchies, however, it is occasionally useful to inherit
-// separately from Test and WithParamInterface. For example:
-
-class BaseTest : public ::testing::Test {
- // You can inherit all the usual members for a non-parameterized test
- // fixture here.
-};
-
-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
- // The usual test fixture members go here too.
-};
-
-TEST_F(BaseTest, HasFoo) {
- // This is an ordinary non-parameterized test.
-}
-
-TEST_P(DerivedTest, DoesBlah) {
- // GetParam works just the same here as if you inherit from TestWithParam.
- EXPECT_TRUE(foo.Blah(GetParam()));
-}
-
-#endif // 0
-
-
-#if !GTEST_OS_SYMBIAN
-# include <utility>
-#endif
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-
-#include <iterator>
-#include <utility>
-#include <vector>
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-// Copyright 2003 Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: Dan Egnor (egnor@google.com)
-//
-// A "smart" pointer type with reference tracking. Every pointer to a
-// particular object is kept on a circular linked list. When the last pointer
-// to an object is destroyed or reassigned, the object is deleted.
-//
-// Used properly, this deletes the object when the last reference goes away.
-// There are several caveats:
-// - Like all reference counting schemes, cycles lead to leaks.
-// - Each smart pointer is actually two pointers (8 bytes instead of 4).
-// - Every time a pointer is assigned, the entire list of pointers to that
-// object is traversed. This class is therefore NOT SUITABLE when there
-// will often be more than two or three pointers to a particular object.
-// - References are only tracked as long as linked_ptr<> objects are copied.
-// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS
-// will happen (double deletion).
-//
-// A good use of this class is storing object references in STL containers.
-// You can safely put linked_ptr<> in a vector<>.
-// Other uses may not be as good.
-//
-// Note: If you use an incomplete type with linked_ptr<>, the class
-// *containing* linked_ptr<> must have a constructor and destructor (even
-// if they do nothing!).
-//
-// Bill Gibbons suggested we use something like this.
-//
-// Thread Safety:
-// Unlike other linked_ptr implementations, in this implementation
-// a linked_ptr object is thread-safe in the sense that:
-// - it's safe to copy linked_ptr objects concurrently,
-// - it's safe to copy *from* a linked_ptr and read its underlying
-// raw pointer (e.g. via get()) concurrently, and
-// - it's safe to write to two linked_ptrs that point to the same
-// shared object concurrently.
-// TODO(wan@google.com): rename this to safe_linked_ptr to avoid
-// confusion with normal linked_ptr.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-
-#include <stdlib.h>
-#include <assert.h>
-
-
-namespace testing {
-namespace internal {
-
-// Protects copying of all linked_ptr objects.
-GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
-
-// This is used internally by all instances of linked_ptr<>. It needs to be
-// a non-template class because different types of linked_ptr<> can refer to
-// the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)).
-// So, it needs to be possible for different types of linked_ptr to participate
-// in the same circular linked list, so we need a single class type here.
-//
-// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr<T>.
-class linked_ptr_internal {
- public:
- // Create a new circle that includes only this instance.
- void join_new() {
- next_ = this;
- }
-
- // Many linked_ptr operations may change p.link_ for some linked_ptr
- // variable p in the same circle as this object. Therefore we need
- // to prevent two such operations from occurring concurrently.
- //
- // Note that different types of linked_ptr objects can coexist in a
- // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and
- // linked_ptr<Derived2>). Therefore we must use a single mutex to
- // protect all linked_ptr objects. This can create serious
- // contention in production code, but is acceptable in a testing
- // framework.
-
- // Join an existing circle.
- // L < g_linked_ptr_mutex
- void join(linked_ptr_internal const* ptr) {
- MutexLock lock(&g_linked_ptr_mutex);
-
- linked_ptr_internal const* p = ptr;
- while (p->next_ != ptr) p = p->next_;
- p->next_ = this;
- next_ = ptr;
- }
-
- // Leave whatever circle we're part of. Returns true if we were the
- // last member of the circle. Once this is done, you can join() another.
- // L < g_linked_ptr_mutex
- bool depart() {
- MutexLock lock(&g_linked_ptr_mutex);
-
- if (next_ == this) return true;
- linked_ptr_internal const* p = next_;
- while (p->next_ != this) p = p->next_;
- p->next_ = next_;
- return false;
- }
-
- private:
- mutable linked_ptr_internal const* next_;
-};
-
-template <typename T>
-class linked_ptr {
- public:
- typedef T element_type;
-
- // Take over ownership of a raw pointer. This should happen as soon as
- // possible after the object is created.
- explicit linked_ptr(T* ptr = NULL) { capture(ptr); }
- ~linked_ptr() { depart(); }
-
- // Copy an existing linked_ptr<>, adding ourselves to the list of references.
- template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }
- linked_ptr(linked_ptr const& ptr) { // NOLINT
- assert(&ptr != this);
- copy(&ptr);
- }
-
- // Assignment releases the old value and acquires the new.
- template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) {
- depart();
- copy(&ptr);
- return *this;
- }
-
- linked_ptr& operator=(linked_ptr const& ptr) {
- if (&ptr != this) {
- depart();
- copy(&ptr);
- }
- return *this;
- }
-
- // Smart pointer members.
- void reset(T* ptr = NULL) {
- depart();
- capture(ptr);
- }
- T* get() const { return value_; }
- T* operator->() const { return value_; }
- T& operator*() const { return *value_; }
-
- bool operator==(T* p) const { return value_ == p; }
- bool operator!=(T* p) const { return value_ != p; }
- template <typename U>
- bool operator==(linked_ptr<U> const& ptr) const {
- return value_ == ptr.get();
- }
- template <typename U>
- bool operator!=(linked_ptr<U> const& ptr) const {
- return value_ != ptr.get();
- }
-
- private:
- template <typename U>
- friend class linked_ptr;
-
- T* value_;
- linked_ptr_internal link_;
-
- void depart() {
- if (link_.depart()) delete value_;
- }
-
- void capture(T* ptr) {
- value_ = ptr;
- link_.join_new();
- }
-
- template <typename U> void copy(linked_ptr<U> const* ptr) {
- value_ = ptr->get();
- if (value_)
- link_.join(&ptr->link_);
- else
- link_.join_new();
- }
-};
-
-template<typename T> inline
-bool operator==(T* ptr, const linked_ptr<T>& x) {
- return ptr == x.get();
-}
-
-template<typename T> inline
-bool operator!=(T* ptr, const linked_ptr<T>& x) {
- return ptr != x.get();
-}
-
-// A function to convert T* into linked_ptr<T>
-// Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation
-// for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
-template <typename T>
-linked_ptr<T> make_linked_ptr(T* ptr) {
- return linked_ptr<T>(ptr);
-}
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// A user can teach this function how to print a class type T by
-// defining either operator<<() or PrintTo() in the namespace that
-// defines T. More specifically, the FIRST defined function in the
-// following list will be used (assuming T is defined in namespace
-// foo):
-//
-// 1. foo::PrintTo(const T&, ostream*)
-// 2. operator<<(ostream&, const T&) defined in either foo or the
-// global namespace.
-//
-// If none of the above is defined, it will print the debug string of
-// the value if it is a protocol buffer, or print the raw bytes in the
-// value otherwise.
-//
-// To aid debugging: when T is a reference type, the address of the
-// value is also printed; when T is a (const) char pointer, both the
-// pointer value and the NUL-terminated string it points to are
-// printed.
-//
-// We also provide some convenient wrappers:
-//
-// // Prints a value to a string. For a (const or not) char
-// // pointer, the NUL-terminated string (but not the pointer) is
-// // printed.
-// std::string ::testing::PrintToString(const T& value);
-//
-// // Prints a value tersely: for a reference type, the referenced
-// // value (but not the address) is printed; for a (const or not) char
-// // pointer, the NUL-terminated string (but not the pointer) is
-// // printed.
-// void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
-//
-// // Prints value using the type inferred by the compiler. The difference
-// // from UniversalTersePrint() is that this function prints both the
-// // pointer and the NUL-terminated string for a (const or not) char pointer.
-// void ::testing::internal::UniversalPrint(const T& value, ostream*);
-//
-// // Prints the fields of a tuple tersely to a string vector, one
-// // element for each field. Tuple support must be enabled in
-// // gtest-port.h.
-// std::vector<string> UniversalTersePrintTupleFieldsToStrings(
-// const Tuple& value);
-//
-// Known limitation:
-//
-// The print primitives print the elements of an STL-style container
-// using the compiler-inferred type of *iter where iter is a
-// const_iterator of the container. When const_iterator is an input
-// iterator but not a forward iterator, this inferred type may not
-// match value_type, and the print output may be incorrect. In
-// practice, this is rarely a problem as for most containers
-// const_iterator is a forward iterator. We'll fix this if there's an
-// actual need for it. Note that this fix cannot rely on value_type
-// being defined as many user-defined container types don't have
-// value_type.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
-namespace testing {
-
-// Definitions in the 'internal' and 'internal2' name spaces are
-// subject to change without notice. DO NOT USE THEM IN USER CODE!
-namespace internal2 {
-
-// Prints the given number of bytes in the given object to the given
-// ostream.
-GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
- size_t count,
- ::std::ostream* os);
-
-// For selecting which printer to use when a given type has neither <<
-// nor PrintTo().
-enum TypeKind {
- kProtobuf, // a protobuf type
- kConvertibleToInteger, // a type implicitly convertible to BiggestInt
- // (e.g. a named or unnamed enum type)
- kOtherType // anything else
-};
-
-// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
-// by the universal printer to print a value of type T when neither
-// operator<< nor PrintTo() is defined for T, where kTypeKind is the
-// "kind" of T as defined by enum TypeKind.
-template <typename T, TypeKind kTypeKind>
-class TypeWithoutFormatter {
- public:
- // This default version is called when kTypeKind is kOtherType.
- static void PrintValue(const T& value, ::std::ostream* os) {
- PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),
- sizeof(value), os);
- }
-};
-
-// We print a protobuf using its ShortDebugString() when the string
-// doesn't exceed this many characters; otherwise we print it using
-// DebugString() for better readability.
-const size_t kProtobufOneLinerMaxLength = 50;
-
-template <typename T>
-class TypeWithoutFormatter<T, kProtobuf> {
- public:
- static void PrintValue(const T& value, ::std::ostream* os) {
- const ::testing::internal::string short_str = value.ShortDebugString();
- const ::testing::internal::string pretty_str =
- short_str.length() <= kProtobufOneLinerMaxLength ?
- short_str : ("\n" + value.DebugString());
- *os << ("<" + pretty_str + ">");
- }
-};
-
-template <typename T>
-class TypeWithoutFormatter<T, kConvertibleToInteger> {
- public:
- // Since T has no << operator or PrintTo() but can be implicitly
- // converted to BiggestInt, we print it as a BiggestInt.
- //
- // Most likely T is an enum type (either named or unnamed), in which
- // case printing it as an integer is the desired behavior. In case
- // T is not an enum, printing it as an integer is the best we can do
- // given that it has no user-defined printer.
- static void PrintValue(const T& value, ::std::ostream* os) {
- const internal::BiggestInt kBigInt = value;
- *os << kBigInt;
- }
-};
-
-// Prints the given value to the given ostream. If the value is a
-// protocol message, its debug string is printed; if it's an enum or
-// of a type implicitly convertible to BiggestInt, it's printed as an
-// integer; otherwise the bytes in the value are printed. This is
-// what UniversalPrinter<T>::Print() does when it knows nothing about
-// type T and T has neither << operator nor PrintTo().
-//
-// A user can override this behavior for a class type Foo by defining
-// a << operator in the namespace where Foo is defined.
-//
-// We put this operator in namespace 'internal2' instead of 'internal'
-// to simplify the implementation, as much code in 'internal' needs to
-// use << in STL, which would conflict with our own << were it defined
-// in 'internal'.
-//
-// Note that this operator<< takes a generic std::basic_ostream<Char,
-// CharTraits> type instead of the more restricted std::ostream. If
-// we define it to take an std::ostream instead, we'll get an
-// "ambiguous overloads" compiler error when trying to print a type
-// Foo that supports streaming to std::basic_ostream<Char,
-// CharTraits>, as the compiler cannot tell whether
-// operator<<(std::ostream&, const T&) or
-// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
-// specific.
-template <typename Char, typename CharTraits, typename T>
-::std::basic_ostream<Char, CharTraits>& operator<<(
- ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
- TypeWithoutFormatter<T,
- (internal::IsAProtocolMessage<T>::value ? kProtobuf :
- internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?
- kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);
- return os;
-}
-
-} // namespace internal2
-} // namespace testing
-
-// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
-// magic needed for implementing UniversalPrinter won't work.
-namespace testing_internal {
-
-// Used to print a value that is not an STL-style container when the
-// user doesn't define PrintTo() for it.
-template <typename T>
-void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
- // With the following statement, during unqualified name lookup,
- // testing::internal2::operator<< appears as if it was declared in
- // the nearest enclosing namespace that contains both
- // ::testing_internal and ::testing::internal2, i.e. the global
- // namespace. For more details, refer to the C++ Standard section
- // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
- // testing::internal2::operator<< in case T doesn't come with a <<
- // operator.
- //
- // We cannot write 'using ::testing::internal2::operator<<;', which
- // gcc 3.3 fails to compile due to a compiler bug.
- using namespace ::testing::internal2; // NOLINT
-
- // Assuming T is defined in namespace foo, in the next statement,
- // the compiler will consider all of:
- //
- // 1. foo::operator<< (thanks to Koenig look-up),
- // 2. ::operator<< (as the current namespace is enclosed in ::),
- // 3. testing::internal2::operator<< (thanks to the using statement above).
- //
- // The operator<< whose type matches T best will be picked.
- //
- // We deliberately allow #2 to be a candidate, as sometimes it's
- // impossible to define #1 (e.g. when foo is ::std, defining
- // anything in it is undefined behavior unless you are a compiler
- // vendor.).
- *os << value;
-}
-
-} // namespace testing_internal
-
-namespace testing {
-namespace internal {
-
-// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
-// value to the given ostream. The caller must ensure that
-// 'ostream_ptr' is not NULL, or the behavior is undefined.
-//
-// We define UniversalPrinter as a class template (as opposed to a
-// function template), as we need to partially specialize it for
-// reference types, which cannot be done with function templates.
-template <typename T>
-class UniversalPrinter;
-
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os);
-
-// Used to print an STL-style container when the user doesn't define
-// a PrintTo() for it.
-template <typename C>
-void DefaultPrintTo(IsContainer /* dummy */,
- false_type /* is not a pointer */,
- const C& container, ::std::ostream* os) {
- const size_t kMaxCount = 32; // The maximum number of elements to print.
- *os << '{';
- size_t count = 0;
- for (typename C::const_iterator it = container.begin();
- it != container.end(); ++it, ++count) {
- if (count > 0) {
- *os << ',';
- if (count == kMaxCount) { // Enough has been printed.
- *os << " ...";
- break;
- }
- }
- *os << ' ';
- // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
- // handle *it being a native array.
- internal::UniversalPrint(*it, os);
- }
-
- if (count > 0) {
- *os << ' ';
- }
- *os << '}';
-}
-
-// Used to print a pointer that is neither a char pointer nor a member
-// pointer, when the user doesn't define PrintTo() for it. (A member
-// variable pointer or member function pointer doesn't really point to
-// a location in the address space. Their representation is
-// implementation-defined. Therefore they will be printed as raw
-// bytes.)
-template <typename T>
-void DefaultPrintTo(IsNotContainer /* dummy */,
- true_type /* is a pointer */,
- T* p, ::std::ostream* os) {
- if (p == NULL) {
- *os << "NULL";
- } else {
- // C++ doesn't allow casting from a function pointer to any object
- // pointer.
- //
- // IsTrue() silences warnings: "Condition is always true",
- // "unreachable code".
- if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
- // T is not a function type. We just call << to print p,
- // relying on ADL to pick up user-defined << for their pointer
- // types, if any.
- *os << p;
- } else {
- // T is a function type, so '*os << p' doesn't do what we want
- // (it just prints p as bool). We want to print p as a const
- // void*. However, we cannot cast it to const void* directly,
- // even using reinterpret_cast, as earlier versions of gcc
- // (e.g. 3.4.5) cannot compile the cast when p is a function
- // pointer. Casting to UInt64 first solves the problem.
- *os << reinterpret_cast<const void*>(
- reinterpret_cast<internal::UInt64>(p));
- }
- }
-}
-
-// Used to print a non-container, non-pointer value when the user
-// doesn't define PrintTo() for it.
-template <typename T>
-void DefaultPrintTo(IsNotContainer /* dummy */,
- false_type /* is not a pointer */,
- const T& value, ::std::ostream* os) {
- ::testing_internal::DefaultPrintNonContainerTo(value, os);
-}
-
-// Prints the given value using the << operator if it has one;
-// otherwise prints the bytes in it. This is what
-// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
-// or overloaded for type T.
-//
-// A user can override this behavior for a class type Foo by defining
-// an overload of PrintTo() in the namespace where Foo is defined. We
-// give the user this option as sometimes defining a << operator for
-// Foo is not desirable (e.g. the coding style may prevent doing it,
-// or there is already a << operator but it doesn't do what the user
-// wants).
-template <typename T>
-void PrintTo(const T& value, ::std::ostream* os) {
- // DefaultPrintTo() is overloaded. The type of its first two
- // arguments determine which version will be picked. If T is an
- // STL-style container, the version for container will be called; if
- // T is a pointer, the pointer version will be called; otherwise the
- // generic version will be called.
- //
- // Note that we check for container types here, prior to we check
- // for protocol message types in our operator<<. The rationale is:
- //
- // For protocol messages, we want to give people a chance to
- // override Google Mock's format by defining a PrintTo() or
- // operator<<. For STL containers, other formats can be
- // incompatible with Google Mock's format for the container
- // elements; therefore we check for container types here to ensure
- // that our format is used.
- //
- // The second argument of DefaultPrintTo() is needed to bypass a bug
- // in Symbian's C++ compiler that prevents it from picking the right
- // overload between:
- //
- // PrintTo(const T& x, ...);
- // PrintTo(T* x, ...);
- DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
-}
-
-// The following list of PrintTo() overloads tells
-// UniversalPrinter<T>::Print() how to print standard types (built-in
-// types, strings, plain arrays, and pointers).
-
-// Overloads for various char types.
-GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
-GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
-inline void PrintTo(char c, ::std::ostream* os) {
- // When printing a plain char, we always treat it as unsigned. This
- // way, the output won't be affected by whether the compiler thinks
- // char is signed or not.
- PrintTo(static_cast<unsigned char>(c), os);
-}
-
-// Overloads for other simple built-in types.
-inline void PrintTo(bool x, ::std::ostream* os) {
- *os << (x ? "true" : "false");
-}
-
-// Overload for wchar_t type.
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its decimal code (except for L'\0').
-// The L'\0' char is printed as "L'\\0'". The decimal code is printed
-// as signed integer when wchar_t is implemented by the compiler
-// as a signed type and is printed as an unsigned integer when wchar_t
-// is implemented as an unsigned type.
-GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
-
-// Overloads for C strings.
-GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
-inline void PrintTo(char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const char*>(s), os);
-}
-
-// signed/unsigned char is often used for representing binary data, so
-// we print pointers to it as void* to be safe.
-inline void PrintTo(const signed char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(signed char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(unsigned char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-
-// MSVC can be configured to define wchar_t as a typedef of unsigned
-// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
-// type. When wchar_t is a typedef, defining an overload for const
-// wchar_t* would cause unsigned short* be printed as a wide string,
-// possibly causing invalid memory accesses.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Overloads for wide C strings
-GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
-inline void PrintTo(wchar_t* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const wchar_t*>(s), os);
-}
-#endif
-
-// Overload for C arrays. Multi-dimensional arrays are printed
-// properly.
-
-// Prints the given number of elements in an array, without printing
-// the curly braces.
-template <typename T>
-void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
- UniversalPrint(a[0], os);
- for (size_t i = 1; i != count; i++) {
- *os << ", ";
- UniversalPrint(a[i], os);
- }
-}
-
-// Overloads for ::string and ::std::string.
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);
-inline void PrintTo(const ::string& s, ::std::ostream* os) {
- PrintStringTo(s, os);
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
-inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
- PrintStringTo(s, os);
-}
-
-// Overloads for ::wstring and ::std::wstring.
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::wstring& s, ::std::ostream* os) {
- PrintWideStringTo(s, os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
- PrintWideStringTo(s, os);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_TR1_TUPLE
-// Overload for ::std::tr1::tuple. Needed for printing function arguments,
-// which are packed as tuples.
-
-// Helper function for printing a tuple. T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T& t, ::std::ostream* os);
-
-// Overloaded PrintTo() for tuples of various arities. We support
-// tuples of up-to 10 fields. The following implementation works
-// regardless of whether tr1::tuple is implemented using the
-// non-standard variadic template feature or not.
-
-inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1>
-void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2>
-void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-void PrintTo(
- const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Overload for std::pair.
-template <typename T1, typename T2>
-void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
- *os << '(';
- // We cannot use UniversalPrint(value.first, os) here, as T1 may be
- // a reference type. The same for printing value.second.
- UniversalPrinter<T1>::Print(value.first, os);
- *os << ", ";
- UniversalPrinter<T2>::Print(value.second, os);
- *os << ')';
-}
-
-// Implements printing a non-reference type T by letting the compiler
-// pick the right overload of PrintTo() for T.
-template <typename T>
-class UniversalPrinter {
- public:
- // MSVC warns about adding const to a function type, so we want to
- // disable the warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4180) // Temporarily disables warning 4180.
-#endif // _MSC_VER
-
- // Note: we deliberately don't call this PrintTo(), as that name
- // conflicts with ::testing::internal::PrintTo in the body of the
- // function.
- static void Print(const T& value, ::std::ostream* os) {
- // By default, ::testing::internal::PrintTo() is used for printing
- // the value.
- //
- // Thanks to Koenig look-up, if T is a class and has its own
- // PrintTo() function defined in its namespace, that function will
- // be visible here. Since it is more specific than the generic ones
- // in ::testing::internal, it will be picked by the compiler in the
- // following statement - exactly what we want.
- PrintTo(value, os);
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSC_VER
-};
-
-// UniversalPrintArray(begin, len, os) prints an array of 'len'
-// elements, starting at address 'begin'.
-template <typename T>
-void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
- if (len == 0) {
- *os << "{}";
- } else {
- *os << "{ ";
- const size_t kThreshold = 18;
- const size_t kChunkSize = 8;
- // If the array has more than kThreshold elements, we'll have to
- // omit some details by printing only the first and the last
- // kChunkSize elements.
- // TODO(wan@google.com): let the user control the threshold using a flag.
- if (len <= kThreshold) {
- PrintRawArrayTo(begin, len, os);
- } else {
- PrintRawArrayTo(begin, kChunkSize, os);
- *os << ", ..., ";
- PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
- }
- *os << " }";
- }
-}
-// This overload prints a (const) char array compactly.
-GTEST_API_ void UniversalPrintArray(const char* begin,
- size_t len,
- ::std::ostream* os);
-
-// Implements printing an array type T[N].
-template <typename T, size_t N>
-class UniversalPrinter<T[N]> {
- public:
- // Prints the given array, omitting some elements when there are too
- // many.
- static void Print(const T (&a)[N], ::std::ostream* os) {
- UniversalPrintArray(a, N, os);
- }
-};
-
-// Implements printing a reference type T&.
-template <typename T>
-class UniversalPrinter<T&> {
- public:
- // MSVC warns about adding const to a function type, so we want to
- // disable the warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4180) // Temporarily disables warning 4180.
-#endif // _MSC_VER
-
- static void Print(const T& value, ::std::ostream* os) {
- // Prints the address of the value. We use reinterpret_cast here
- // as static_cast doesn't compile when T is a function type.
- *os << "@" << reinterpret_cast<const void*>(&value) << " ";
-
- // Then prints the value itself.
- UniversalPrint(value, os);
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSC_VER
-};
-
-// Prints a value tersely: for a reference type, the referenced value
-// (but not the address) is printed; for a (const) char pointer, the
-// NUL-terminated string (but not the pointer) is printed.
-template <typename T>
-void UniversalTersePrint(const T& value, ::std::ostream* os) {
- UniversalPrint(value, os);
-}
-inline void UniversalTersePrint(const char* str, ::std::ostream* os) {
- if (str == NULL) {
- *os << "NULL";
- } else {
- UniversalPrint(string(str), os);
- }
-}
-inline void UniversalTersePrint(char* str, ::std::ostream* os) {
- UniversalTersePrint(static_cast<const char*>(str), os);
-}
-
-// Prints a value using the type inferred by the compiler. The
-// difference between this and UniversalTersePrint() is that for a
-// (const) char pointer, this prints both the pointer and the
-// NUL-terminated string.
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os) {
- UniversalPrinter<T>::Print(value, os);
-}
-
-#if GTEST_HAS_TR1_TUPLE
-typedef ::std::vector<string> Strings;
-
-// This helper template allows PrintTo() for tuples and
-// UniversalTersePrintTupleFieldsToStrings() to be defined by
-// induction on the number of tuple fields. The idea is that
-// TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N
-// fields in tuple t, and can be defined in terms of
-// TuplePrefixPrinter<N - 1>.
-
-// The inductive case.
-template <size_t N>
-struct TuplePrefixPrinter {
- // Prints the first N fields of a tuple.
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
- TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os);
- *os << ", ";
- UniversalPrinter<typename ::std::tr1::tuple_element<N - 1, Tuple>::type>
- ::Print(::std::tr1::get<N - 1>(t), os);
- }
-
- // Tersely prints the first N fields of a tuple to a string vector,
- // one element for each field.
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
- TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings);
- ::std::stringstream ss;
- UniversalTersePrint(::std::tr1::get<N - 1>(t), &ss);
- strings->push_back(ss.str());
- }
-};
-
-// Base cases.
-template <>
-struct TuplePrefixPrinter<0> {
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}
-
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}
-};
-// We have to specialize the entire TuplePrefixPrinter<> class
-// template here, even though the definition of
-// TersePrintPrefixToStrings() is the same as the generic version, as
-// Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't
-// support specializing a method template of a class template.
-template <>
-struct TuplePrefixPrinter<1> {
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
- UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>::
- Print(::std::tr1::get<0>(t), os);
- }
-
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
- ::std::stringstream ss;
- UniversalTersePrint(::std::tr1::get<0>(t), &ss);
- strings->push_back(ss.str());
- }
-};
-
-// Helper function for printing a tuple. T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T& t, ::std::ostream* os) {
- *os << "(";
- TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>::
- PrintPrefixTo(t, os);
- *os << ")";
-}
-
-// Prints the fields of a tuple tersely to a string vector, one
-// element for each field. See the comment before
-// UniversalTersePrint() for how we define "tersely".
-template <typename Tuple>
-Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
- Strings result;
- TuplePrefixPrinter< ::std::tr1::tuple_size<Tuple>::value>::
- TersePrintPrefixToStrings(value, &result);
- return result;
-}
-#endif // GTEST_HAS_TR1_TUPLE
-
-} // namespace internal
-
-template <typename T>
-::std::string PrintToString(const T& value) {
- ::std::stringstream ss;
- internal::UniversalTersePrint(value, &ss);
- return ss.str();
-}
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-namespace internal {
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Outputs a message explaining invalid registration of different
-// fixture class for the same test case. This may happen when
-// TEST_P macro is used to define two tests with the same name
-// but in different namespaces.
-GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name,
- const char* file, int line);
-
-template <typename> class ParamGeneratorInterface;
-template <typename> class ParamGenerator;
-
-// Interface for iterating over elements provided by an implementation
-// of ParamGeneratorInterface<T>.
-template <typename T>
-class ParamIteratorInterface {
- public:
- virtual ~ParamIteratorInterface() {}
- // A pointer to the base generator instance.
- // Used only for the purposes of iterator comparison
- // to make sure that two iterators belong to the same generator.
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;
- // Advances iterator to point to the next element
- // provided by the generator. The caller is responsible
- // for not calling Advance() on an iterator equal to
- // BaseGenerator()->End().
- virtual void Advance() = 0;
- // Clones the iterator object. Used for implementing copy semantics
- // of ParamIterator<T>.
- virtual ParamIteratorInterface* Clone() const = 0;
- // Dereferences the current iterator and provides (read-only) access
- // to the pointed value. It is the caller's responsibility not to call
- // Current() on an iterator equal to BaseGenerator()->End().
- // Used for implementing ParamGenerator<T>::operator*().
- virtual const T* Current() const = 0;
- // Determines whether the given iterator and other point to the same
- // element in the sequence generated by the generator.
- // Used for implementing ParamGenerator<T>::operator==().
- virtual bool Equals(const ParamIteratorInterface& other) const = 0;
-};
-
-// Class iterating over elements provided by an implementation of
-// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
-// and implements the const forward iterator concept.
-template <typename T>
-class ParamIterator {
- public:
- typedef T value_type;
- typedef const T& reference;
- typedef ptrdiff_t difference_type;
-
- // ParamIterator assumes ownership of the impl_ pointer.
- ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}
- ParamIterator& operator=(const ParamIterator& other) {
- if (this != &other)
- impl_.reset(other.impl_->Clone());
- return *this;
- }
-
- const T& operator*() const { return *impl_->Current(); }
- const T* operator->() const { return impl_->Current(); }
- // Prefix version of operator++.
- ParamIterator& operator++() {
- impl_->Advance();
- return *this;
- }
- // Postfix version of operator++.
- ParamIterator operator++(int /*unused*/) {
- ParamIteratorInterface<T>* clone = impl_->Clone();
- impl_->Advance();
- return ParamIterator(clone);
- }
- bool operator==(const ParamIterator& other) const {
- return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
- }
- bool operator!=(const ParamIterator& other) const {
- return !(*this == other);
- }
-
- private:
- friend class ParamGenerator<T>;
- explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}
- scoped_ptr<ParamIteratorInterface<T> > impl_;
-};
-
-// ParamGeneratorInterface<T> is the binary interface to access generators
-// defined in other translation units.
-template <typename T>
-class ParamGeneratorInterface {
- public:
- typedef T ParamType;
-
- virtual ~ParamGeneratorInterface() {}
-
- // Generator interface definition
- virtual ParamIteratorInterface<T>* Begin() const = 0;
- virtual ParamIteratorInterface<T>* End() const = 0;
-};
-
-// Wraps ParamGeneratorInterface<T> and provides general generator syntax
-// compatible with the STL Container concept.
-// This class implements copy initialization semantics and the contained
-// ParamGeneratorInterface<T> instance is shared among all copies
-// of the original object. This is possible because that instance is immutable.
-template<typename T>
-class ParamGenerator {
- public:
- typedef ParamIterator<T> iterator;
-
- explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}
- ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}
-
- ParamGenerator& operator=(const ParamGenerator& other) {
- impl_ = other.impl_;
- return *this;
- }
-
- iterator begin() const { return iterator(impl_->Begin()); }
- iterator end() const { return iterator(impl_->End()); }
-
- private:
- linked_ptr<const ParamGeneratorInterface<T> > impl_;
-};
-
-// Generates values from a range of two comparable values. Can be used to
-// generate sequences of user-defined types that implement operator+() and
-// operator<().
-// This class is used in the Range() function.
-template <typename T, typename IncrementT>
-class RangeGenerator : public ParamGeneratorInterface<T> {
- public:
- RangeGenerator(T begin, T end, IncrementT step)
- : begin_(begin), end_(end),
- step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}
- virtual ~RangeGenerator() {}
-
- virtual ParamIteratorInterface<T>* Begin() const {
- return new Iterator(this, begin_, 0, step_);
- }
- virtual ParamIteratorInterface<T>* End() const {
- return new Iterator(this, end_, end_index_, step_);
- }
-
- private:
- class Iterator : public ParamIteratorInterface<T> {
- public:
- Iterator(const ParamGeneratorInterface<T>* base, T value, int index,
- IncrementT step)
- : base_(base), value_(value), index_(index), step_(step) {}
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
- return base_;
- }
- virtual void Advance() {
- value_ = value_ + step_;
- index_++;
- }
- virtual ParamIteratorInterface<T>* Clone() const {
- return new Iterator(*this);
- }
- virtual const T* Current() const { return &value_; }
- virtual bool Equals(const ParamIteratorInterface<T>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const int other_index =
- CheckedDowncastToActualType<const Iterator>(&other)->index_;
- return index_ == other_index;
- }
-
- private:
- Iterator(const Iterator& other)
- : ParamIteratorInterface<T>(),
- base_(other.base_), value_(other.value_), index_(other.index_),
- step_(other.step_) {}
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<T>* const base_;
- T value_;
- int index_;
- const IncrementT step_;
- }; // class RangeGenerator::Iterator
-
- static int CalculateEndIndex(const T& begin,
- const T& end,
- const IncrementT& step) {
- int end_index = 0;
- for (T i = begin; i < end; i = i + step)
- end_index++;
- return end_index;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const RangeGenerator& other);
-
- const T begin_;
- const T end_;
- const IncrementT step_;
- // The index for the end() iterator. All the elements in the generated
- // sequence are indexed (0-based) to aid iterator comparison.
- const int end_index_;
-}; // class RangeGenerator
-
-
-// Generates values from a pair of STL-style iterators. Used in the
-// ValuesIn() function. The elements are copied from the source range
-// since the source can be located on the stack, and the generator
-// is likely to persist beyond that stack frame.
-template <typename T>
-class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
- public:
- template <typename ForwardIterator>
- ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
- : container_(begin, end) {}
- virtual ~ValuesInIteratorRangeGenerator() {}
-
- virtual ParamIteratorInterface<T>* Begin() const {
- return new Iterator(this, container_.begin());
- }
- virtual ParamIteratorInterface<T>* End() const {
- return new Iterator(this, container_.end());
- }
-
- private:
- typedef typename ::std::vector<T> ContainerType;
-
- class Iterator : public ParamIteratorInterface<T> {
- public:
- Iterator(const ParamGeneratorInterface<T>* base,
- typename ContainerType::const_iterator iterator)
- : base_(base), iterator_(iterator) {}
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
- return base_;
- }
- virtual void Advance() {
- ++iterator_;
- value_.reset();
- }
- virtual ParamIteratorInterface<T>* Clone() const {
- return new Iterator(*this);
- }
- // We need to use cached value referenced by iterator_ because *iterator_
- // can return a temporary object (and of type other then T), so just
- // having "return &*iterator_;" doesn't work.
- // value_ is updated here and not in Advance() because Advance()
- // can advance iterator_ beyond the end of the range, and we cannot
- // detect that fact. The client code, on the other hand, is
- // responsible for not calling Current() on an out-of-range iterator.
- virtual const T* Current() const {
- if (value_.get() == NULL)
- value_.reset(new T(*iterator_));
- return value_.get();
- }
- virtual bool Equals(const ParamIteratorInterface<T>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- return iterator_ ==
- CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
- }
-
- private:
- Iterator(const Iterator& other)
- // The explicit constructor call suppresses a false warning
- // emitted by gcc when supplied with the -Wextra option.
- : ParamIteratorInterface<T>(),
- base_(other.base_),
- iterator_(other.iterator_) {}
-
- const ParamGeneratorInterface<T>* const base_;
- typename ContainerType::const_iterator iterator_;
- // A cached value of *iterator_. We keep it here to allow access by
- // pointer in the wrapping iterator's operator->().
- // value_ needs to be mutable to be accessed in Current().
- // Use of scoped_ptr helps manage cached value's lifetime,
- // which is bound by the lifespan of the iterator itself.
- mutable scoped_ptr<const T> value_;
- }; // class ValuesInIteratorRangeGenerator::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const ValuesInIteratorRangeGenerator& other);
-
- const ContainerType container_;
-}; // class ValuesInIteratorRangeGenerator
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Stores a parameter value and later creates tests parameterized with that
-// value.
-template <class TestClass>
-class ParameterizedTestFactory : public TestFactoryBase {
- public:
- typedef typename TestClass::ParamType ParamType;
- explicit ParameterizedTestFactory(ParamType parameter) :
- parameter_(parameter) {}
- virtual Test* CreateTest() {
- TestClass::SetParam(&parameter_);
- return new TestClass();
- }
-
- private:
- const ParamType parameter_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactoryBase is a base class for meta-factories that create
-// test factories for passing into MakeAndRegisterTestInfo function.
-template <class ParamType>
-class TestMetaFactoryBase {
- public:
- virtual ~TestMetaFactoryBase() {}
-
- virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactory creates test factories for passing into
-// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
-// ownership of test factory pointer, same factory object cannot be passed
-// into that method twice. But ParameterizedTestCaseInfo is going to call
-// it for each Test/Parameter value combination. Thus it needs meta factory
-// creator class.
-template <class TestCase>
-class TestMetaFactory
- : public TestMetaFactoryBase<typename TestCase::ParamType> {
- public:
- typedef typename TestCase::ParamType ParamType;
-
- TestMetaFactory() {}
-
- virtual TestFactoryBase* CreateTestFactory(ParamType parameter) {
- return new ParameterizedTestFactory<TestCase>(parameter);
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseInfoBase is a generic interface
-// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase
-// accumulates test information provided by TEST_P macro invocations
-// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations
-// and uses that information to register all resulting test instances
-// in RegisterTests method. The ParameterizeTestCaseRegistry class holds
-// a collection of pointers to the ParameterizedTestCaseInfo objects
-// and calls RegisterTests() on each of them when asked.
-class ParameterizedTestCaseInfoBase {
- public:
- virtual ~ParameterizedTestCaseInfoBase() {}
-
- // Base part of test case name for display purposes.
- virtual const string& GetTestCaseName() const = 0;
- // Test case id to verify identity.
- virtual TypeId GetTestCaseTypeId() const = 0;
- // UnitTest class invokes this method to register tests in this
- // test case right before running them in RUN_ALL_TESTS macro.
- // This method should not be called more then once on any single
- // instance of a ParameterizedTestCaseInfoBase derived class.
- virtual void RegisterTests() = 0;
-
- protected:
- ParameterizedTestCaseInfoBase() {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P
-// macro invocations for a particular test case and generators
-// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that
-// test case. It registers tests with all values generated by all
-// generators when asked.
-template <class TestCase>
-class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
- public:
- // ParamType and GeneratorCreationFunc are private types but are required
- // for declarations of public methods AddTestPattern() and
- // AddTestCaseInstantiation().
- typedef typename TestCase::ParamType ParamType;
- // A function that returns an instance of appropriate generator type.
- typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
-
- explicit ParameterizedTestCaseInfo(const char* name)
- : test_case_name_(name) {}
-
- // Test case base name for display purposes.
- virtual const string& GetTestCaseName() const { return test_case_name_; }
- // Test case id to verify identity.
- virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
- // TEST_P macro uses AddTestPattern() to record information
- // about a single test in a LocalTestInfo structure.
- // test_case_name is the base name of the test case (without invocation
- // prefix). test_base_name is the name of an individual test without
- // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
- // test case base name and DoBar is test base name.
- void AddTestPattern(const char* test_case_name,
- const char* test_base_name,
- TestMetaFactoryBase<ParamType>* meta_factory) {
- tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name,
- test_base_name,
- meta_factory)));
- }
- // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
- // about a generator.
- int AddTestCaseInstantiation(const string& instantiation_name,
- GeneratorCreationFunc* func,
- const char* /* file */,
- int /* line */) {
- instantiations_.push_back(::std::make_pair(instantiation_name, func));
- return 0; // Return value used only to run this method in namespace scope.
- }
- // UnitTest class invokes this method to register tests in this test case
- // test cases right before running tests in RUN_ALL_TESTS macro.
- // This method should not be called more then once on any single
- // instance of a ParameterizedTestCaseInfoBase derived class.
- // UnitTest has a guard to prevent from calling this method more then once.
- virtual void RegisterTests() {
- for (typename TestInfoContainer::iterator test_it = tests_.begin();
- test_it != tests_.end(); ++test_it) {
- linked_ptr<TestInfo> test_info = *test_it;
- for (typename InstantiationContainer::iterator gen_it =
- instantiations_.begin(); gen_it != instantiations_.end();
- ++gen_it) {
- const string& instantiation_name = gen_it->first;
- ParamGenerator<ParamType> generator((*gen_it->second)());
-
- Message test_case_name_stream;
- if ( !instantiation_name.empty() )
- test_case_name_stream << instantiation_name << "/";
- test_case_name_stream << test_info->test_case_base_name;
-
- int i = 0;
- for (typename ParamGenerator<ParamType>::iterator param_it =
- generator.begin();
- param_it != generator.end(); ++param_it, ++i) {
- Message test_name_stream;
- test_name_stream << test_info->test_base_name << "/" << i;
- MakeAndRegisterTestInfo(
- test_case_name_stream.GetString().c_str(),
- test_name_stream.GetString().c_str(),
- NULL, // No type parameter.
- PrintToString(*param_it).c_str(),
- GetTestCaseTypeId(),
- TestCase::SetUpTestCase,
- TestCase::TearDownTestCase,
- test_info->test_meta_factory->CreateTestFactory(*param_it));
- } // for param_it
- } // for gen_it
- } // for test_it
- } // RegisterTests
-
- private:
- // LocalTestInfo structure keeps information about a single test registered
- // with TEST_P macro.
- struct TestInfo {
- TestInfo(const char* a_test_case_base_name,
- const char* a_test_base_name,
- TestMetaFactoryBase<ParamType>* a_test_meta_factory) :
- test_case_base_name(a_test_case_base_name),
- test_base_name(a_test_base_name),
- test_meta_factory(a_test_meta_factory) {}
-
- const string test_case_base_name;
- const string test_base_name;
- const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
- };
- typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
- // Keeps pairs of <Instantiation name, Sequence generator creation function>
- // received from INSTANTIATE_TEST_CASE_P macros.
- typedef ::std::vector<std::pair<string, GeneratorCreationFunc*> >
- InstantiationContainer;
-
- const string test_case_name_;
- TestInfoContainer tests_;
- InstantiationContainer instantiations_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo);
-}; // class ParameterizedTestCaseInfo
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase
-// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P
-// macros use it to locate their corresponding ParameterizedTestCaseInfo
-// descriptors.
-class ParameterizedTestCaseRegistry {
- public:
- ParameterizedTestCaseRegistry() {}
- ~ParameterizedTestCaseRegistry() {
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- delete *it;
- }
- }
-
- // Looks up or creates and returns a structure containing information about
- // tests and instantiations of a particular test case.
- template <class TestCase>
- ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(
- const char* test_case_name,
- const char* file,
- int line) {
- ParameterizedTestCaseInfo<TestCase>* typed_test_info = NULL;
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- if ((*it)->GetTestCaseName() == test_case_name) {
- if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>()) {
- // Complain about incorrect usage of Google Test facilities
- // and terminate the program since we cannot guaranty correct
- // test case setup and tear-down in this case.
- ReportInvalidTestCaseType(test_case_name, file, line);
- posix::Abort();
- } else {
- // At this point we are sure that the object we found is of the same
- // type we are looking for, so we downcast it to that type
- // without further checks.
- typed_test_info = CheckedDowncastToActualType<
- ParameterizedTestCaseInfo<TestCase> >(*it);
- }
- break;
- }
- }
- if (typed_test_info == NULL) {
- typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name);
- test_case_infos_.push_back(typed_test_info);
- }
- return typed_test_info;
- }
- void RegisterTests() {
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- (*it)->RegisterTests();
- }
- }
-
- private:
- typedef ::std::vector<ParameterizedTestCaseInfoBase*> TestCaseInfoContainer;
-
- TestCaseInfoContainer test_case_infos_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry);
-};
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-// This file was GENERATED by command:
-// pump.py gtest-param-util-generated.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently Google Test supports at most 50 arguments in Values,
-// and at most 10 arguments in Combine. Please contact
-// googletestframework@googlegroups.com if you need more.
-// Please note that the number of arguments to Combine is limited
-// by the maximum arity of the implementation of tr1::tuple which is
-// currently set at 10.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Forward declarations of ValuesIn(), which is implemented in
-// include/gtest/gtest-param-test.h.
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end);
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]);
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container);
-
-namespace internal {
-
-// Used in the Values() function to provide polymorphic capabilities.
-template <typename T1>
-class ValueArray1 {
- public:
- explicit ValueArray1(T1 v1) : v1_(v1) {}
-
- template <typename T>
- operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray1& other);
-
- const T1 v1_;
-};
-
-template <typename T1, typename T2>
-class ValueArray2 {
- public:
- ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray2& other);
-
- const T1 v1_;
- const T2 v2_;
-};
-
-template <typename T1, typename T2, typename T3>
-class ValueArray3 {
- public:
- ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray3& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-class ValueArray4 {
- public:
- ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray4& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class ValueArray5 {
- public:
- ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray5& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class ValueArray6 {
- public:
- ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray6& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class ValueArray7 {
- public:
- ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray7& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class ValueArray8 {
- public:
- ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray8& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class ValueArray9 {
- public:
- ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray9& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class ValueArray10 {
- public:
- ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray10& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-class ValueArray11 {
- public:
- ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray11& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-class ValueArray12 {
- public:
- ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray12& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-class ValueArray13 {
- public:
- ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray13& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-class ValueArray14 {
- public:
- ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray14& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-class ValueArray15 {
- public:
- ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray15& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-class ValueArray16 {
- public:
- ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray16& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-class ValueArray17 {
- public:
- ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray17& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-class ValueArray18 {
- public:
- ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray18& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-class ValueArray19 {
- public:
- ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray19& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-class ValueArray20 {
- public:
- ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray20& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-class ValueArray21 {
- public:
- ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray21& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-class ValueArray22 {
- public:
- ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray22& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-class ValueArray23 {
- public:
- ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_,
- v23_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray23& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-class ValueArray24 {
- public:
- ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray24& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-class ValueArray25 {
- public:
- ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray25& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-class ValueArray26 {
- public:
- ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray26& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-class ValueArray27 {
- public:
- ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray27& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-class ValueArray28 {
- public:
- ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray28& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-class ValueArray29 {
- public:
- ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray29& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-class ValueArray30 {
- public:
- ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray30& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-class ValueArray31 {
- public:
- ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray31& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-class ValueArray32 {
- public:
- ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray32& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-class ValueArray33 {
- public:
- ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
- T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray33& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-class ValueArray34 {
- public:
- ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray34& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-class ValueArray35 {
- public:
- ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
- v32_(v32), v33_(v33), v34_(v34), v35_(v35) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_,
- v35_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray35& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-class ValueArray36 {
- public:
- ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
- v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray36& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-class ValueArray37 {
- public:
- ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
- v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
- v36_(v36), v37_(v37) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray37& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-class ValueArray38 {
- public:
- ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray38& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-class ValueArray39 {
- public:
- ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray39& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-class ValueArray40 {
- public:
- ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
- v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
- v40_(v40) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray40& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-class ValueArray41 {
- public:
- ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
- T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray41& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-class ValueArray42 {
- public:
- ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray42& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-class ValueArray43 {
- public:
- ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
- v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37),
- v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray43& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-class ValueArray44 {
- public:
- ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
- v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36),
- v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42),
- v43_(v43), v44_(v44) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray44& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-class ValueArray45 {
- public:
- ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
- v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
- v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41),
- v42_(v42), v43_(v43), v44_(v44), v45_(v45) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray45& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-class ValueArray46 {
- public:
- ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
- v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray46& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-class ValueArray47 {
- public:
- ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
- v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46),
- v47_(v47) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_,
- v47_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray47& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-class ValueArray48 {
- public:
- ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
- v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
- v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45),
- v46_(v46), v47_(v47), v48_(v48) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray48& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-class ValueArray49 {
- public:
- ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48,
- T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
- v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_, v49_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray49& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
- const T49 v49_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-class ValueArray50 {
- public:
- ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49,
- T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
- v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_, v49_, v50_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray50& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
- const T49 v49_;
- const T50 v50_;
-};
-
-# if GTEST_HAS_COMBINE
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Generates values from the Cartesian product of values produced
-// by the argument generators.
-//
-template <typename T1, typename T2>
-class CartesianProductGenerator2
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > {
- public:
- typedef ::std::tr1::tuple<T1, T2> ParamType;
-
- CartesianProductGenerator2(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2)
- : g1_(g1), g2_(g2) {}
- virtual ~CartesianProductGenerator2() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current2_;
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- ParamType current_value_;
- }; // class CartesianProductGenerator2::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator2& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
-}; // class CartesianProductGenerator2
-
-
-template <typename T1, typename T2, typename T3>
-class CartesianProductGenerator3
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3> ParamType;
-
- CartesianProductGenerator3(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3)
- : g1_(g1), g2_(g2), g3_(g3) {}
- virtual ~CartesianProductGenerator3() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current3_;
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- ParamType current_value_;
- }; // class CartesianProductGenerator3::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator3& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
-}; // class CartesianProductGenerator3
-
-
-template <typename T1, typename T2, typename T3, typename T4>
-class CartesianProductGenerator4
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;
-
- CartesianProductGenerator4(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
- virtual ~CartesianProductGenerator4() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current4_;
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- ParamType current_value_;
- }; // class CartesianProductGenerator4::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator4& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
-}; // class CartesianProductGenerator4
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class CartesianProductGenerator5
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;
-
- CartesianProductGenerator5(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
- virtual ~CartesianProductGenerator5() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current5_;
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- ParamType current_value_;
- }; // class CartesianProductGenerator5::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator5& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
-}; // class CartesianProductGenerator5
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class CartesianProductGenerator6
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,
- T6> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;
-
- CartesianProductGenerator6(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
- virtual ~CartesianProductGenerator6() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current6_;
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- ParamType current_value_;
- }; // class CartesianProductGenerator6::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator6& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
-}; // class CartesianProductGenerator6
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class CartesianProductGenerator7
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
-
- CartesianProductGenerator7(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
- virtual ~CartesianProductGenerator7() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current7_;
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- ParamType current_value_;
- }; // class CartesianProductGenerator7::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator7& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
-}; // class CartesianProductGenerator7
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class CartesianProductGenerator8
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
-
- CartesianProductGenerator8(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
- g8_(g8) {}
- virtual ~CartesianProductGenerator8() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current8_;
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- ParamType current_value_;
- }; // class CartesianProductGenerator8::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator8& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
-}; // class CartesianProductGenerator8
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class CartesianProductGenerator9
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8, T9> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
-
- CartesianProductGenerator9(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9) {}
- virtual ~CartesianProductGenerator9() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end(), g9_, g9_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8,
- const ParamGenerator<T9>& g9,
- const typename ParamGenerator<T9>::iterator& current9)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
- begin9_(g9.begin()), end9_(g9.end()), current9_(current9) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current9_;
- if (current9_ == end9_) {
- current9_ = begin9_;
- ++current8_;
- }
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_ &&
- current9_ == typed_other->current9_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_),
- begin9_(other.begin9_),
- end9_(other.end9_),
- current9_(other.current9_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_,
- *current9_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_ ||
- current9_ == end9_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- const typename ParamGenerator<T9>::iterator begin9_;
- const typename ParamGenerator<T9>::iterator end9_;
- typename ParamGenerator<T9>::iterator current9_;
- ParamType current_value_;
- }; // class CartesianProductGenerator9::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator9& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
- const ParamGenerator<T9> g9_;
-}; // class CartesianProductGenerator9
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class CartesianProductGenerator10
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8, T9, T10> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
-
- CartesianProductGenerator10(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9,
- const ParamGenerator<T10>& g10)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9), g10_(g10) {}
- virtual ~CartesianProductGenerator10() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end(), g9_, g9_.end(), g10_, g10_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8,
- const ParamGenerator<T9>& g9,
- const typename ParamGenerator<T9>::iterator& current9,
- const ParamGenerator<T10>& g10,
- const typename ParamGenerator<T10>::iterator& current10)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
- begin9_(g9.begin()), end9_(g9.end()), current9_(current9),
- begin10_(g10.begin()), end10_(g10.end()), current10_(current10) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current10_;
- if (current10_ == end10_) {
- current10_ = begin10_;
- ++current9_;
- }
- if (current9_ == end9_) {
- current9_ = begin9_;
- ++current8_;
- }
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_ &&
- current9_ == typed_other->current9_ &&
- current10_ == typed_other->current10_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_),
- begin9_(other.begin9_),
- end9_(other.end9_),
- current9_(other.current9_),
- begin10_(other.begin10_),
- end10_(other.end10_),
- current10_(other.current10_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_,
- *current9_, *current10_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_ ||
- current9_ == end9_ ||
- current10_ == end10_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- const typename ParamGenerator<T9>::iterator begin9_;
- const typename ParamGenerator<T9>::iterator end9_;
- typename ParamGenerator<T9>::iterator current9_;
- const typename ParamGenerator<T10>::iterator begin10_;
- const typename ParamGenerator<T10>::iterator end10_;
- typename ParamGenerator<T10>::iterator current10_;
- ParamType current_value_;
- }; // class CartesianProductGenerator10::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator10& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
- const ParamGenerator<T9> g9_;
- const ParamGenerator<T10> g10_;
-}; // class CartesianProductGenerator10
-
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Helper classes providing Combine() with polymorphic features. They allow
-// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
-// convertible to U.
-//
-template <class Generator1, class Generator2>
-class CartesianProductHolder2 {
- public:
-CartesianProductHolder2(const Generator1& g1, const Generator2& g2)
- : g1_(g1), g2_(g2) {}
- template <typename T1, typename T2>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2> >(
- new CartesianProductGenerator2<T1, T2>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder2& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
-}; // class CartesianProductHolder2
-
-template <class Generator1, class Generator2, class Generator3>
-class CartesianProductHolder3 {
- public:
-CartesianProductHolder3(const Generator1& g1, const Generator2& g2,
- const Generator3& g3)
- : g1_(g1), g2_(g2), g3_(g3) {}
- template <typename T1, typename T2, typename T3>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >(
- new CartesianProductGenerator3<T1, T2, T3>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder3& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
-}; // class CartesianProductHolder3
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4>
-class CartesianProductHolder4 {
- public:
-CartesianProductHolder4(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
- template <typename T1, typename T2, typename T3, typename T4>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >(
- new CartesianProductGenerator4<T1, T2, T3, T4>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder4& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
-}; // class CartesianProductHolder4
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5>
-class CartesianProductHolder5 {
- public:
-CartesianProductHolder5(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >(
- new CartesianProductGenerator5<T1, T2, T3, T4, T5>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder5& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
-}; // class CartesianProductHolder5
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6>
-class CartesianProductHolder6 {
- public:
-CartesianProductHolder6(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >(
- new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder6& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
-}; // class CartesianProductHolder6
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7>
-class CartesianProductHolder7 {
- public:
-CartesianProductHolder7(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >(
- new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder7& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
-}; // class CartesianProductHolder7
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8>
-class CartesianProductHolder8 {
- public:
-CartesianProductHolder8(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
- g8_(g8) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,
- T8> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(
- new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder8& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
-}; // class CartesianProductHolder8
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8, class Generator9>
-class CartesianProductHolder9 {
- public:
-CartesianProductHolder9(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8,
- const Generator9& g9)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> >(
- new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_),
- static_cast<ParamGenerator<T9> >(g9_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder9& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
- const Generator9 g9_;
-}; // class CartesianProductHolder9
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8, class Generator9, class Generator10>
-class CartesianProductHolder10 {
- public:
-CartesianProductHolder10(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8,
- const Generator9& g9, const Generator10& g10)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9), g10_(g10) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9, T10> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9, T10> >(
- new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_),
- static_cast<ParamGenerator<T9> >(g9_),
- static_cast<ParamGenerator<T10> >(g10_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder10& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
- const Generator9 g9_;
- const Generator10 g10_;
-}; // class CartesianProductHolder10
-
-# endif // GTEST_HAS_COMBINE
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Functions producing parameter generators.
-//
-// Google Test uses these generators to produce parameters for value-
-// parameterized tests. When a parameterized test case is instantiated
-// with a particular generator, Google Test creates and runs tests
-// for each element in the sequence produced by the generator.
-//
-// In the following sample, tests from test case FooTest are instantiated
-// each three times with parameter values 3, 5, and 8:
-//
-// class FooTest : public TestWithParam<int> { ... };
-//
-// TEST_P(FooTest, TestThis) {
-// }
-// TEST_P(FooTest, TestThat) {
-// }
-// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
-//
-
-// Range() returns generators providing sequences of values in a range.
-//
-// Synopsis:
-// Range(start, end)
-// - returns a generator producing a sequence of values {start, start+1,
-// start+2, ..., }.
-// Range(start, end, step)
-// - returns a generator producing a sequence of values {start, start+step,
-// start+step+step, ..., }.
-// Notes:
-// * The generated sequences never include end. For example, Range(1, 5)
-// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
-// returns a generator producing {1, 3, 5, 7}.
-// * start and end must have the same type. That type may be any integral or
-// floating-point type or a user defined type satisfying these conditions:
-// * It must be assignable (have operator=() defined).
-// * It must have operator+() (operator+(int-compatible type) for
-// two-operand version).
-// * It must have operator<() defined.
-// Elements in the resulting sequences will also have that type.
-// * Condition start < end must be satisfied in order for resulting sequences
-// to contain any elements.
-//
-template <typename T, typename IncrementT>
-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
- return internal::ParamGenerator<T>(
- new internal::RangeGenerator<T, IncrementT>(start, end, step));
-}
-
-template <typename T>
-internal::ParamGenerator<T> Range(T start, T end) {
- return Range(start, end, 1);
-}
-
-// ValuesIn() function allows generation of tests with parameters coming from
-// a container.
-//
-// Synopsis:
-// ValuesIn(const T (&array)[N])
-// - returns a generator producing sequences with elements from
-// a C-style array.
-// ValuesIn(const Container& container)
-// - returns a generator producing sequences with elements from
-// an STL-style container.
-// ValuesIn(Iterator begin, Iterator end)
-// - returns a generator producing sequences with elements from
-// a range [begin, end) defined by a pair of STL-style iterators. These
-// iterators can also be plain C pointers.
-//
-// Please note that ValuesIn copies the values from the containers
-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
-//
-// Examples:
-//
-// This instantiates tests from test case StringTest
-// each with C-string values of "foo", "bar", and "baz":
-//
-// const char* strings[] = {"foo", "bar", "baz"};
-// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
-//
-// This instantiates tests from test case StlStringTest
-// each with STL strings with values "a" and "b":
-//
-// ::std::vector< ::std::string> GetParameterStrings() {
-// ::std::vector< ::std::string> v;
-// v.push_back("a");
-// v.push_back("b");
-// return v;
-// }
-//
-// INSTANTIATE_TEST_CASE_P(CharSequence,
-// StlStringTest,
-// ValuesIn(GetParameterStrings()));
-//
-//
-// This will also instantiate tests from CharTest
-// each with parameter values 'a' and 'b':
-//
-// ::std::list<char> GetParameterChars() {
-// ::std::list<char> list;
-// list.push_back('a');
-// list.push_back('b');
-// return list;
-// }
-// ::std::list<char> l = GetParameterChars();
-// INSTANTIATE_TEST_CASE_P(CharSequence2,
-// CharTest,
-// ValuesIn(l.begin(), l.end()));
-//
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end) {
- typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
- ::value_type ParamType;
- return internal::ParamGenerator<ParamType>(
- new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
-}
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
- return ValuesIn(array, array + N);
-}
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container) {
- return ValuesIn(container.begin(), container.end());
-}
-
-// Values() allows generating tests from explicitly specified list of
-// parameters.
-//
-// Synopsis:
-// Values(T v1, T v2, ..., T vN)
-// - returns a generator producing sequences with elements v1, v2, ..., vN.
-//
-// For example, this instantiates tests from test case BarTest each
-// with values "one", "two", and "three":
-//
-// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
-//
-// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
-// The exact type of values will depend on the type of parameter in BazTest.
-//
-// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
-//
-// Currently, Values() supports from 1 to 50 parameters.
-//
-template <typename T1>
-internal::ValueArray1<T1> Values(T1 v1) {
- return internal::ValueArray1<T1>(v1);
-}
-
-template <typename T1, typename T2>
-internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {
- return internal::ValueArray2<T1, T2>(v1, v2);
-}
-
-template <typename T1, typename T2, typename T3>
-internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {
- return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {
- return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5) {
- return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6) {
- return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7) {
- return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
- v6, v7);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,
- v5, v6, v7, v8);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
- T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11) {
- return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
- T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12) {
- return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13) {
- return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16) {
- return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17) {
- return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18) {
- return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
- return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
- return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
- return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22) {
- return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23) {
- return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24) {
- return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
- v19, v20, v21, v22, v23, v24);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
- return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
- v18, v19, v20, v21, v22, v23, v24, v25);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26) {
- return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27) {
- return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28) {
- return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
- v28);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29) {
- return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
- v27, v28, v29);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
- return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
- v26, v27, v28, v29, v30);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
- return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
- v25, v26, v27, v28, v29, v30, v31);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32) {
- return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33) {
- return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
- T31 v31, T32 v32, T33 v33, T34 v34) {
- return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
- return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
- return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37) {
- return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36, v37);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37, T38 v38) {
- return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
- v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
- v33, v34, v35, v36, v37, v38);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37, T38 v38, T39 v39) {
- return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
- v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
- v32, v33, v34, v35, v36, v37, v38, v39);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
- T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
- T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
- return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
- v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
- return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
- v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42) {
- return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
- v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
- v42);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43) {
- return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
- v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
- v41, v42, v43);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44) {
- return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
- v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
- v40, v41, v42, v43, v44);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
- T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
- T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
- return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
- v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
- v39, v40, v41, v42, v43, v44, v45);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
- return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
- v38, v39, v40, v41, v42, v43, v44, v45, v46);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
- return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
- v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
- T48 v48) {
- return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
- v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
- T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
- T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
- T47 v47, T48 v48, T49 v49) {
- return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
- v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
- T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
- T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
- return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
- v48, v49, v50);
-}
-
-// Bool() allows generating tests with parameters in a set of (false, true).
-//
-// Synopsis:
-// Bool()
-// - returns a generator producing sequences with elements {false, true}.
-//
-// It is useful when testing code that depends on Boolean flags. Combinations
-// of multiple flags can be tested when several Bool()'s are combined using
-// Combine() function.
-//
-// In the following example all tests in the test case FlagDependentTest
-// will be instantiated twice with parameters false and true.
-//
-// class FlagDependentTest : public testing::TestWithParam<bool> {
-// virtual void SetUp() {
-// external_flag = GetParam();
-// }
-// }
-// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
-//
-inline internal::ParamGenerator<bool> Bool() {
- return Values(false, true);
-}
-
-# if GTEST_HAS_COMBINE
-// Combine() allows the user to combine two or more sequences to produce
-// values of a Cartesian product of those sequences' elements.
-//
-// Synopsis:
-// Combine(gen1, gen2, ..., genN)
-// - returns a generator producing sequences with elements coming from
-// the Cartesian product of elements from the sequences generated by
-// gen1, gen2, ..., genN. The sequence elements will have a type of
-// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
-// of elements from sequences produces by gen1, gen2, ..., genN.
-//
-// Combine can have up to 10 arguments. This number is currently limited
-// by the maximum number of elements in the tuple implementation used by Google
-// Test.
-//
-// Example:
-//
-// This will instantiate tests in test case AnimalTest each one with
-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
-// tuple("dog", BLACK), and tuple("dog", WHITE):
-//
-// enum Color { BLACK, GRAY, WHITE };
-// class AnimalTest
-// : public testing::TestWithParam<tuple<const char*, Color> > {...};
-//
-// TEST_P(AnimalTest, AnimalLooksNice) {...}
-//
-// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
-// Combine(Values("cat", "dog"),
-// Values(BLACK, WHITE)));
-//
-// This will instantiate tests in FlagDependentTest with all variations of two
-// Boolean flags:
-//
-// class FlagDependentTest
-// : public testing::TestWithParam<tuple(bool, bool)> > {
-// virtual void SetUp() {
-// // Assigns external_flag_1 and external_flag_2 values from the tuple.
-// tie(external_flag_1, external_flag_2) = GetParam();
-// }
-// };
-//
-// TEST_P(FlagDependentTest, TestFeature1) {
-// // Test your code using external_flag_1 and external_flag_2 here.
-// }
-// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
-// Combine(Bool(), Bool()));
-//
-template <typename Generator1, typename Generator2>
-internal::CartesianProductHolder2<Generator1, Generator2> Combine(
- const Generator1& g1, const Generator2& g2) {
- return internal::CartesianProductHolder2<Generator1, Generator2>(
- g1, g2);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3>
-internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3) {
- return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
- g1, g2, g3);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4>
-internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
- Generator4> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4) {
- return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
- Generator4>(
- g1, g2, g3, g4);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5>
-internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
- Generator4, Generator5> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5) {
- return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
- Generator4, Generator5>(
- g1, g2, g3, g4, g5);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6>
-internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6) {
- return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6>(
- g1, g2, g3, g4, g5, g6);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7>
-internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7) {
- return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7>(
- g1, g2, g3, g4, g5, g6, g7);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8>
-internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8) {
- return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8>(
- g1, g2, g3, g4, g5, g6, g7, g8);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8, typename Generator9>
-internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8,
- Generator9> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8, const Generator9& g9) {
- return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
- g1, g2, g3, g4, g5, g6, g7, g8, g9);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8, typename Generator9,
- typename Generator10>
-internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
- Generator10> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8, const Generator9& g9,
- const Generator10& g10) {
- return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
- Generator10>(
- g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
-}
-# endif // GTEST_HAS_COMBINE
-
-
-
-# define TEST_P(test_case_name, test_name) \
- class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- : public test_case_name { \
- public: \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
- virtual void TestBody(); \
- private: \
- static int AddToRegistry() { \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
- #test_case_name, \
- #test_name, \
- new ::testing::internal::TestMetaFactory< \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
- return 0; \
- } \
- static int gtest_registering_dummy_; \
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
- }; \
- int GTEST_TEST_CLASS_NAME_(test_case_name, \
- test_name)::gtest_registering_dummy_ = \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
- void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
- ::testing::internal::ParamGenerator<test_case_name::ParamType> \
- gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
- int gtest_##prefix##test_case_name##_dummy_ = \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
- #prefix, \
- &gtest_##prefix##test_case_name##_EvalGenerator_, \
- __FILE__, __LINE__)
-
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Google C++ Testing Framework definitions useful in production code.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-
-// When you need to test the private or protected members of a class,
-// use the FRIEND_TEST macro to declare your tests as friends of the
-// class. For example:
-//
-// class MyClass {
-// private:
-// void MyMethod();
-// FRIEND_TEST(MyClassTest, MyMethod);
-// };
-//
-// class MyClassTest : public testing::Test {
-// // ...
-// };
-//
-// TEST_F(MyClassTest, MyMethod) {
-// // Can call MyClass::MyMethod() here.
-// }
-
-#define FRIEND_TEST(test_case_name, test_name)\
-friend class test_case_name##_##test_name##_Test
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-
-#include <iosfwd>
-#include <vector>
-
-namespace testing {
-
-// A copyable object representing the result of a test part (i.e. an
-// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
-//
-// Don't inherit from TestPartResult as its destructor is not virtual.
-class GTEST_API_ TestPartResult {
- public:
- // The possible outcomes of a test part (i.e. an assertion or an
- // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
- enum Type {
- kSuccess, // Succeeded.
- kNonFatalFailure, // Failed but the test can continue.
- kFatalFailure // Failed and the test should be terminated.
- };
-
- // C'tor. TestPartResult does NOT have a default constructor.
- // Always use this constructor (with parameters) to create a
- // TestPartResult object.
- TestPartResult(Type a_type,
- const char* a_file_name,
- int a_line_number,
- const char* a_message)
- : type_(a_type),
- file_name_(a_file_name),
- line_number_(a_line_number),
- summary_(ExtractSummary(a_message)),
- message_(a_message) {
- }
-
- // Gets the outcome of the test part.
- Type type() const { return type_; }
-
- // Gets the name of the source file where the test part took place, or
- // NULL if it's unknown.
- const char* file_name() const { return file_name_.c_str(); }
-
- // Gets the line in the source file where the test part took place,
- // or -1 if it's unknown.
- int line_number() const { return line_number_; }
-
- // Gets the summary of the failure message.
- const char* summary() const { return summary_.c_str(); }
-
- // Gets the message associated with the test part.
- const char* message() const { return message_.c_str(); }
-
- // Returns true iff the test part passed.
- bool passed() const { return type_ == kSuccess; }
-
- // Returns true iff the test part failed.
- bool failed() const { return type_ != kSuccess; }
-
- // Returns true iff the test part non-fatally failed.
- bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
-
- // Returns true iff the test part fatally failed.
- bool fatally_failed() const { return type_ == kFatalFailure; }
- private:
- Type type_;
-
- // Gets the summary of the failure message by omitting the stack
- // trace in it.
- static internal::String ExtractSummary(const char* message);
-
- // The name of the source file where the test part took place, or
- // NULL if the source file is unknown.
- internal::String file_name_;
- // The line in the source file where the test part took place, or -1
- // if the line number is unknown.
- int line_number_;
- internal::String summary_; // The test failure summary.
- internal::String message_; // The test failure message.
-};
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result);
-
-// An array of TestPartResult objects.
-//
-// Don't inherit from TestPartResultArray as its destructor is not
-// virtual.
-class GTEST_API_ TestPartResultArray {
- public:
- TestPartResultArray() {}
-
- // Appends the given TestPartResult to the array.
- void Append(const TestPartResult& result);
-
- // Returns the TestPartResult at the given index (0-based).
- const TestPartResult& GetTestPartResult(int index) const;
-
- // Returns the number of TestPartResult objects in the array.
- int size() const;
-
- private:
- std::vector<TestPartResult> array_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);
-};
-
-// This interface knows how to report a test part result.
-class TestPartResultReporterInterface {
- public:
- virtual ~TestPartResultReporterInterface() {}
-
- virtual void ReportTestPartResult(const TestPartResult& result) = 0;
-};
-
-namespace internal {
-
-// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
-// statement generates new fatal failures. To do so it registers itself as the
-// current test part result reporter. Besides checking if fatal failures were
-// reported, it only delegates the reporting to the former result reporter.
-// The original result reporter is restored in the destructor.
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-class GTEST_API_ HasNewFatalFailureHelper
- : public TestPartResultReporterInterface {
- public:
- HasNewFatalFailureHelper();
- virtual ~HasNewFatalFailureHelper();
- virtual void ReportTestPartResult(const TestPartResult& result);
- bool has_new_fatal_failure() const { return has_new_fatal_failure_; }
- private:
- bool has_new_fatal_failure_;
- TestPartResultReporterInterface* original_reporter_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-
-// This header implements typed tests and type-parameterized tests.
-
-// Typed (aka type-driven) tests repeat the same test for types in a
-// list. You must know which types you want to test with when writing
-// typed tests. Here's how you do it:
-
-#if 0
-
-// First, define a fixture class template. It should be parameterized
-// by a type. Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- public:
- ...
- typedef std::list<T> List;
- static T shared_;
- T value_;
-};
-
-// Next, associate a list of types with the test case, which will be
-// repeated for each type in the list. The typedef is necessary for
-// the macro to parse correctly.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-TYPED_TEST_CASE(FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-// TYPED_TEST_CASE(FooTest, int);
-
-// Then, use TYPED_TEST() instead of TEST_F() to define as many typed
-// tests for this test case as you want.
-TYPED_TEST(FooTest, DoesBlah) {
- // Inside a test, refer to TypeParam to get the type parameter.
- // Since we are inside a derived class template, C++ requires use to
- // visit the members of FooTest via 'this'.
- TypeParam n = this->value_;
-
- // To visit static members of the fixture, add the TestFixture::
- // prefix.
- n += TestFixture::shared_;
-
- // To refer to typedefs in the fixture, add the "typename
- // TestFixture::" prefix.
- typename TestFixture::List values;
- values.push_back(n);
- ...
-}
-
-TYPED_TEST(FooTest, HasPropertyA) { ... }
-
-#endif // 0
-
-// Type-parameterized tests are abstract test patterns parameterized
-// by a type. Compared with typed tests, type-parameterized tests
-// allow you to define the test pattern without knowing what the type
-// parameters are. The defined pattern can be instantiated with
-// different types any number of times, in any number of translation
-// units.
-//
-// If you are designing an interface or concept, you can define a
-// suite of type-parameterized tests to verify properties that any
-// valid implementation of the interface/concept should have. Then,
-// each implementation can easily instantiate the test suite to verify
-// that it conforms to the requirements, without having to write
-// similar tests repeatedly. Here's an example:
-
-#if 0
-
-// First, define a fixture class template. It should be parameterized
-// by a type. Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- ...
-};
-
-// Next, declare that you will define a type-parameterized test case
-// (the _P suffix is for "parameterized" or "pattern", whichever you
-// prefer):
-TYPED_TEST_CASE_P(FooTest);
-
-// Then, use TYPED_TEST_P() to define as many type-parameterized tests
-// for this type-parameterized test case as you want.
-TYPED_TEST_P(FooTest, DoesBlah) {
- // Inside a test, refer to TypeParam to get the type parameter.
- TypeParam n = 0;
- ...
-}
-
-TYPED_TEST_P(FooTest, HasPropertyA) { ... }
-
-// Now the tricky part: you need to register all test patterns before
-// you can instantiate them. The first argument of the macro is the
-// test case name; the rest are the names of the tests in this test
-// case.
-REGISTER_TYPED_TEST_CASE_P(FooTest,
- DoesBlah, HasPropertyA);
-
-// Finally, you are free to instantiate the pattern with the types you
-// want. If you put the above code in a header file, you can #include
-// it in multiple C++ source files and instantiate it multiple times.
-//
-// To distinguish different instances of the pattern, the first
-// argument to the INSTANTIATE_* macro is a prefix that will be added
-// to the actual test case name. Remember to pick unique prefixes for
-// different instances.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-// INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int);
-
-#endif // 0
-
-
-// Implements typed tests.
-
-#if GTEST_HAS_TYPED_TEST
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the typedef for the type parameters of the
-// given test case.
-# define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_
-
-// The 'Types' template argument below must have spaces around it
-// since some compilers may choke on '>>' when passing a template
-// instance (e.g. Types<int>)
-# define TYPED_TEST_CASE(CaseName, Types) \
- typedef ::testing::internal::TypeList< Types >::type \
- GTEST_TYPE_PARAMS_(CaseName)
-
-# define TYPED_TEST(CaseName, TestName) \
- template <typename gtest_TypeParam_> \
- class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
- : public CaseName<gtest_TypeParam_> { \
- private: \
- typedef CaseName<gtest_TypeParam_> TestFixture; \
- typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
- }; \
- bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
- ::testing::internal::TypeParameterizedTest< \
- CaseName, \
- ::testing::internal::TemplateSel< \
- GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
- GTEST_TYPE_PARAMS_(CaseName)>::Register(\
- "", #CaseName, #TestName, 0); \
- template <typename gtest_TypeParam_> \
- void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody()
-
-#endif // GTEST_HAS_TYPED_TEST
-
-// Implements type-parameterized tests.
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the namespace name that the type-parameterized tests for
-// the given type-parameterized test case are defined in. The exact
-// name of the namespace is subject to change without notice.
-# define GTEST_CASE_NAMESPACE_(TestCaseName) \
- gtest_case_##TestCaseName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the variable used to remember the names of
-// the defined tests in the given test case.
-# define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \
- gtest_typed_test_case_p_state_##TestCaseName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
-//
-// Expands to the name of the variable used to remember the names of
-// the registered tests in the given test case.
-# define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \
- gtest_registered_test_names_##TestCaseName##_
-
-// The variables defined in the type-parameterized test macros are
-// static as typically these macros are used in a .h file that can be
-// #included in multiple translation units linked together.
-# define TYPED_TEST_CASE_P(CaseName) \
- static ::testing::internal::TypedTestCasePState \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName)
-
-# define TYPED_TEST_P(CaseName, TestName) \
- namespace GTEST_CASE_NAMESPACE_(CaseName) { \
- template <typename gtest_TypeParam_> \
- class TestName : public CaseName<gtest_TypeParam_> { \
- private: \
- typedef CaseName<gtest_TypeParam_> TestFixture; \
- typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
- }; \
- static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\
- __FILE__, __LINE__, #CaseName, #TestName); \
- } \
- template <typename gtest_TypeParam_> \
- void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody()
-
-# define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \
- namespace GTEST_CASE_NAMESPACE_(CaseName) { \
- typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
- } \
- static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
- __FILE__, __LINE__, #__VA_ARGS__)
-
-// The 'Types' template argument below must have spaces around it
-// since some compilers may choke on '>>' when passing a template
-// instance (e.g. Types<int>)
-# define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \
- bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \
- ::testing::internal::TypeParameterizedTestCase<CaseName, \
- GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \
- ::testing::internal::TypeList< Types >::type>::Register(\
- #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName))
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-
-// Depending on the platform, different string classes are available.
-// On Linux, in addition to ::std::string, Google also makes use of
-// class ::string, which has the same interface as ::std::string, but
-// has a different implementation.
-//
-// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
-// ::string is available AND is a distinct type to ::std::string, or
-// define it to 0 to indicate otherwise.
-//
-// If the user's ::std::string and ::string are the same class due to
-// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.
-//
-// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined
-// heuristically.
-
-namespace testing {
-
-// Declares the flags.
-
-// This flag temporary enables the disabled tests.
-GTEST_DECLARE_bool_(also_run_disabled_tests);
-
-// This flag brings the debugger on an assertion failure.
-GTEST_DECLARE_bool_(break_on_failure);
-
-// This flag controls whether Google Test catches all test-thrown exceptions
-// and logs them as failures.
-GTEST_DECLARE_bool_(catch_exceptions);
-
-// This flag enables using colors in terminal output. Available values are
-// "yes" to enable colors, "no" (disable colors), or "auto" (the default)
-// to let Google Test decide.
-GTEST_DECLARE_string_(color);
-
-// This flag sets up the filter to select by name using a glob pattern
-// the tests to run. If the filter is not given all tests are executed.
-GTEST_DECLARE_string_(filter);
-
-// This flag causes the Google Test to list tests. None of the tests listed
-// are actually run if the flag is provided.
-GTEST_DECLARE_bool_(list_tests);
-
-// This flag controls whether Google Test emits a detailed XML report to a file
-// in addition to its normal textual output.
-GTEST_DECLARE_string_(output);
-
-// This flags control whether Google Test prints the elapsed time for each
-// test.
-GTEST_DECLARE_bool_(print_time);
-
-// This flag specifies the random number seed.
-GTEST_DECLARE_int32_(random_seed);
-
-// This flag sets how many times the tests are repeated. The default value
-// is 1. If the value is -1 the tests are repeating forever.
-GTEST_DECLARE_int32_(repeat);
-
-// This flag controls whether Google Test includes Google Test internal
-// stack frames in failure stack traces.
-GTEST_DECLARE_bool_(show_internal_stack_frames);
-
-// When this flag is specified, tests' order is randomized on every iteration.
-GTEST_DECLARE_bool_(shuffle);
-
-// This flag specifies the maximum number of stack frames to be
-// printed in a failure message.
-GTEST_DECLARE_int32_(stack_trace_depth);
-
-// When this flag is specified, a failed assertion will throw an
-// exception if exceptions are enabled, or exit the program with a
-// non-zero code otherwise.
-GTEST_DECLARE_bool_(throw_on_failure);
-
-// When this flag is set with a "host:port" string, on supported
-// platforms test results are streamed to the specified port on
-// the specified host machine.
-GTEST_DECLARE_string_(stream_result_to);
-
-// The upper limit for valid stack trace depths.
-const int kMaxStackTraceDepth = 100;
-
-namespace internal {
-
-class AssertHelper;
-class DefaultGlobalTestPartResultReporter;
-class ExecDeathTest;
-class NoExecDeathTest;
-class FinalSuccessChecker;
-class GTestFlagSaver;
-class TestResultAccessor;
-class TestEventListenersAccessor;
-class TestEventRepeater;
-class WindowsDeathTest;
-class UnitTestImpl* GetUnitTestImpl();
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
- const String& message);
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-// Declared in gtest-internal.h but defined here, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable) {
- return (Message() << streamable).GetString();
-}
-
-} // namespace internal
-
-// The friend relationship of some of these classes is cyclic.
-// If we don't forward declare them the compiler might confuse the classes
-// in friendship clauses with same named classes on the scope.
-class Test;
-class TestCase;
-class TestInfo;
-class UnitTest;
-
-// A class for indicating whether an assertion was successful. When
-// the assertion wasn't successful, the AssertionResult object
-// remembers a non-empty message that describes how it failed.
-//
-// To create an instance of this class, use one of the factory functions
-// (AssertionSuccess() and AssertionFailure()).
-//
-// This class is useful for two purposes:
-// 1. Defining predicate functions to be used with Boolean test assertions
-// EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
-// 2. Defining predicate-format functions to be
-// used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
-//
-// For example, if you define IsEven predicate:
-//
-// testing::AssertionResult IsEven(int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess();
-// else
-// return testing::AssertionFailure() << n << " is odd";
-// }
-//
-// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
-// will print the message
-//
-// Value of: IsEven(Fib(5))
-// Actual: false (5 is odd)
-// Expected: true
-//
-// instead of a more opaque
-//
-// Value of: IsEven(Fib(5))
-// Actual: false
-// Expected: true
-//
-// in case IsEven is a simple Boolean predicate.
-//
-// If you expect your predicate to be reused and want to support informative
-// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
-// about half as often as positive ones in our tests), supply messages for
-// both success and failure cases:
-//
-// testing::AssertionResult IsEven(int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess() << n << " is even";
-// else
-// return testing::AssertionFailure() << n << " is odd";
-// }
-//
-// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
-//
-// Value of: IsEven(Fib(6))
-// Actual: true (8 is even)
-// Expected: false
-//
-// NB: Predicates that support negative Boolean assertions have reduced
-// performance in positive ones so be careful not to use them in tests
-// that have lots (tens of thousands) of positive Boolean assertions.
-//
-// To use this class with EXPECT_PRED_FORMAT assertions such as:
-//
-// // Verifies that Foo() returns an even number.
-// EXPECT_PRED_FORMAT1(IsEven, Foo());
-//
-// you need to define:
-//
-// testing::AssertionResult IsEven(const char* expr, int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess();
-// else
-// return testing::AssertionFailure()
-// << "Expected: " << expr << " is even\n Actual: it's " << n;
-// }
-//
-// If Foo() returns 5, you will see the following message:
-//
-// Expected: Foo() is even
-// Actual: it's 5
-//
-class GTEST_API_ AssertionResult {
- public:
- // Copy constructor.
- // Used in EXPECT_TRUE/FALSE(assertion_result).
- AssertionResult(const AssertionResult& other);
- // Used in the EXPECT_TRUE/FALSE(bool_expression).
- explicit AssertionResult(bool success) : success_(success) {}
-
- // Returns true iff the assertion succeeded.
- operator bool() const { return success_; } // NOLINT
-
- // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
- AssertionResult operator!() const;
-
- // Returns the text streamed into this AssertionResult. Test assertions
- // use it when they fail (i.e., the predicate's outcome doesn't match the
- // assertion's expectation). When nothing has been streamed into the
- // object, returns an empty string.
- const char* message() const {
- return message_.get() != NULL ? message_->c_str() : "";
- }
- // TODO(vladl@google.com): Remove this after making sure no clients use it.
- // Deprecated; please use message() instead.
- const char* failure_message() const { return message(); }
-
- // Streams a custom failure message into this object.
- template <typename T> AssertionResult& operator<<(const T& value) {
- AppendMessage(Message() << value);
- return *this;
- }
-
- // Allows streaming basic output manipulators such as endl or flush into
- // this object.
- AssertionResult& operator<<(
- ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {
- AppendMessage(Message() << basic_manipulator);
- return *this;
- }
-
- private:
- // Appends the contents of message to message_.
- void AppendMessage(const Message& a_message) {
- if (message_.get() == NULL)
- message_.reset(new ::std::string);
- message_->append(a_message.GetString().c_str());
- }
-
- // Stores result of the assertion predicate.
- bool success_;
- // Stores the message describing the condition in case the expectation
- // construct is not satisfied with the predicate's outcome.
- // Referenced via a pointer to avoid taking too much stack frame space
- // with test assertions.
- internal::scoped_ptr< ::std::string> message_;
-
- GTEST_DISALLOW_ASSIGN_(AssertionResult);
-};
-
-// Makes a successful assertion result.
-GTEST_API_ AssertionResult AssertionSuccess();
-
-// Makes a failed assertion result.
-GTEST_API_ AssertionResult AssertionFailure();
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << msg.
-GTEST_API_ AssertionResult AssertionFailure(const Message& msg);
-
-// The abstract class that all tests inherit from.
-//
-// In Google Test, a unit test program contains one or many TestCases, and
-// each TestCase contains one or many Tests.
-//
-// When you define a test using the TEST macro, you don't need to
-// explicitly derive from Test - the TEST macro automatically does
-// this for you.
-//
-// The only time you derive from Test is when defining a test fixture
-// to be used a TEST_F. For example:
-//
-// class FooTest : public testing::Test {
-// protected:
-// virtual void SetUp() { ... }
-// virtual void TearDown() { ... }
-// ...
-// };
-//
-// TEST_F(FooTest, Bar) { ... }
-// TEST_F(FooTest, Baz) { ... }
-//
-// Test is not copyable.
-class GTEST_API_ Test {
- public:
- friend class TestInfo;
-
- // Defines types for pointers to functions that set up and tear down
- // a test case.
- typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc;
- typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc;
-
- // The d'tor is virtual as we intend to inherit from Test.
- virtual ~Test();
-
- // Sets up the stuff shared by all tests in this test case.
- //
- // Google Test will call Foo::SetUpTestCase() before running the first
- // test in test case Foo. Hence a sub-class can define its own
- // SetUpTestCase() method to shadow the one defined in the super
- // class.
- static void SetUpTestCase() {}
-
- // Tears down the stuff shared by all tests in this test case.
- //
- // Google Test will call Foo::TearDownTestCase() after running the last
- // test in test case Foo. Hence a sub-class can define its own
- // TearDownTestCase() method to shadow the one defined in the super
- // class.
- static void TearDownTestCase() {}
-
- // Returns true iff the current test has a fatal failure.
- static bool HasFatalFailure();
-
- // Returns true iff the current test has a non-fatal failure.
- static bool HasNonfatalFailure();
-
- // Returns true iff the current test has a (either fatal or
- // non-fatal) failure.
- static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
-
- // Logs a property for the current test. Only the last value for a given
- // key is remembered.
- // These are public static so they can be called from utility functions
- // that are not members of the test fixture.
- // The arguments are const char* instead strings, as Google Test is used
- // on platforms where string doesn't compile.
- //
- // Note that a driving consideration for these RecordProperty methods
- // was to produce xml output suited to the Greenspan charting utility,
- // which at present will only chart values that fit in a 32-bit int. It
- // is the user's responsibility to restrict their values to 32-bit ints
- // if they intend them to be used with Greenspan.
- static void RecordProperty(const char* key, const char* value);
- static void RecordProperty(const char* key, int value);
-
- protected:
- // Creates a Test object.
- Test();
-
- // Sets up the test fixture.
- virtual void SetUp();
-
- // Tears down the test fixture.
- virtual void TearDown();
-
- private:
- // Returns true iff the current test has the same fixture class as
- // the first test in the current test case.
- static bool HasSameFixtureClass();
-
- // Runs the test after the test fixture has been set up.
- //
- // A sub-class must implement this to define the test logic.
- //
- // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
- // Instead, use the TEST or TEST_F macro.
- virtual void TestBody() = 0;
-
- // Sets up, executes, and tears down the test.
- void Run();
-
- // Deletes self. We deliberately pick an unusual name for this
- // internal method to avoid clashing with names used in user TESTs.
- void DeleteSelf_() { delete this; }
-
- // Uses a GTestFlagSaver to save and restore all Google Test flags.
- const internal::GTestFlagSaver* const gtest_flag_saver_;
-
- // Often a user mis-spells SetUp() as Setup() and spends a long time
- // wondering why it is never called by Google Test. The declaration of
- // the following method is solely for catching such an error at
- // compile time:
- //
- // - The return type is deliberately chosen to be not void, so it
- // will be a conflict if a user declares void Setup() in his test
- // fixture.
- //
- // - This method is private, so it will be another compiler error
- // if a user calls it from his test fixture.
- //
- // DO NOT OVERRIDE THIS FUNCTION.
- //
- // If you see an error about overriding the following function or
- // about it being private, you have mis-spelled SetUp() as Setup().
- struct Setup_should_be_spelled_SetUp {};
- virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
-
- // We disallow copying Tests.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);
-};
-
-typedef internal::TimeInMillis TimeInMillis;
-
-// A copyable object representing a user specified test property which can be
-// output as a key/value string pair.
-//
-// Don't inherit from TestProperty as its destructor is not virtual.
-class TestProperty {
- public:
- // C'tor. TestProperty does NOT have a default constructor.
- // Always use this constructor (with parameters) to create a
- // TestProperty object.
- TestProperty(const char* a_key, const char* a_value) :
- key_(a_key), value_(a_value) {
- }
-
- // Gets the user supplied key.
- const char* key() const {
- return key_.c_str();
- }
-
- // Gets the user supplied value.
- const char* value() const {
- return value_.c_str();
- }
-
- // Sets a new value, overriding the one supplied in the constructor.
- void SetValue(const char* new_value) {
- value_ = new_value;
- }
-
- private:
- // The key supplied by the user.
- internal::String key_;
- // The value supplied by the user.
- internal::String value_;
-};
-
-// The result of a single Test. This includes a list of
-// TestPartResults, a list of TestProperties, a count of how many
-// death tests there are in the Test, and how much time it took to run
-// the Test.
-//
-// TestResult is not copyable.
-class GTEST_API_ TestResult {
- public:
- // Creates an empty TestResult.
- TestResult();
-
- // D'tor. Do not inherit from TestResult.
- ~TestResult();
-
- // Gets the number of all test parts. This is the sum of the number
- // of successful test parts and the number of failed test parts.
- int total_part_count() const;
-
- // Returns the number of the test properties.
- int test_property_count() const;
-
- // Returns true iff the test passed (i.e. no test part failed).
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the test failed.
- bool Failed() const;
-
- // Returns true iff the test fatally failed.
- bool HasFatalFailure() const;
-
- // Returns true iff the test has a non-fatal failure.
- bool HasNonfatalFailure() const;
-
- // Returns the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns the i-th test part result among all the results. i can range
- // from 0 to test_property_count() - 1. If i is not in that range, aborts
- // the program.
- const TestPartResult& GetTestPartResult(int i) const;
-
- // Returns the i-th test property. i can range from 0 to
- // test_property_count() - 1. If i is not in that range, aborts the
- // program.
- const TestProperty& GetTestProperty(int i) const;
-
- private:
- friend class TestInfo;
- friend class UnitTest;
- friend class internal::DefaultGlobalTestPartResultReporter;
- friend class internal::ExecDeathTest;
- friend class internal::TestResultAccessor;
- friend class internal::UnitTestImpl;
- friend class internal::WindowsDeathTest;
-
- // Gets the vector of TestPartResults.
- const std::vector<TestPartResult>& test_part_results() const {
- return test_part_results_;
- }
-
- // Gets the vector of TestProperties.
- const std::vector<TestProperty>& test_properties() const {
- return test_properties_;
- }
-
- // Sets the elapsed time.
- void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
-
- // Adds a test property to the list. The property is validated and may add
- // a non-fatal failure if invalid (e.g., if it conflicts with reserved
- // key names). If a property is already recorded for the same key, the
- // value will be updated, rather than storing multiple values for the same
- // key.
- void RecordProperty(const TestProperty& test_property);
-
- // Adds a failure if the key is a reserved attribute of Google Test
- // testcase tags. Returns true if the property is valid.
- // TODO(russr): Validate attribute names are legal and human readable.
- static bool ValidateTestProperty(const TestProperty& test_property);
-
- // Adds a test part result to the list.
- void AddTestPartResult(const TestPartResult& test_part_result);
-
- // Returns the death test count.
- int death_test_count() const { return death_test_count_; }
-
- // Increments the death test count, returning the new count.
- int increment_death_test_count() { return ++death_test_count_; }
-
- // Clears the test part results.
- void ClearTestPartResults();
-
- // Clears the object.
- void Clear();
-
- // Protects mutable state of the property vector and of owned
- // properties, whose values may be updated.
- internal::Mutex test_properites_mutex_;
-
- // The vector of TestPartResults
- std::vector<TestPartResult> test_part_results_;
- // The vector of TestProperties
- std::vector<TestProperty> test_properties_;
- // Running count of death tests.
- int death_test_count_;
- // The elapsed time, in milliseconds.
- TimeInMillis elapsed_time_;
-
- // We disallow copying TestResult.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);
-}; // class TestResult
-
-// A TestInfo object stores the following information about a test:
-//
-// Test case name
-// Test name
-// Whether the test should be run
-// A function pointer that creates the test object when invoked
-// Test result
-//
-// The constructor of TestInfo registers itself with the UnitTest
-// singleton such that the RUN_ALL_TESTS() macro knows which tests to
-// run.
-class GTEST_API_ TestInfo {
- public:
- // Destructs a TestInfo object. This function is not virtual, so
- // don't inherit from TestInfo.
- ~TestInfo();
-
- // Returns the test case name.
- const char* test_case_name() const { return test_case_name_.c_str(); }
-
- // Returns the test name.
- const char* name() const { return name_.c_str(); }
-
- // Returns the name of the parameter type, or NULL if this is not a typed
- // or a type-parameterized test.
- const char* type_param() const {
- if (type_param_.get() != NULL)
- return type_param_->c_str();
- return NULL;
- }
-
- // Returns the text representation of the value parameter, or NULL if this
- // is not a value-parameterized test.
- const char* value_param() const {
- if (value_param_.get() != NULL)
- return value_param_->c_str();
- return NULL;
- }
-
- // Returns true if this test should run, that is if the test is not disabled
- // (or it is disabled but the also_run_disabled_tests flag has been specified)
- // and its full name matches the user-specified filter.
- //
- // Google Test allows the user to filter the tests by their full names.
- // The full name of a test Bar in test case Foo is defined as
- // "Foo.Bar". Only the tests that match the filter will run.
- //
- // A filter is a colon-separated list of glob (not regex) patterns,
- // optionally followed by a '-' and a colon-separated list of
- // negative patterns (tests to exclude). A test is run if it
- // matches one of the positive patterns and does not match any of
- // the negative patterns.
- //
- // For example, *A*:Foo.* is a filter that matches any string that
- // contains the character 'A' or starts with "Foo.".
- bool should_run() const { return should_run_; }
-
- // Returns the result of the test.
- const TestResult* result() const { return &result_; }
-
- private:
-
-#if GTEST_HAS_DEATH_TEST
- friend class internal::DefaultDeathTestFactory;
-#endif // GTEST_HAS_DEATH_TEST
- friend class Test;
- friend class TestCase;
- friend class internal::UnitTestImpl;
- friend TestInfo* internal::MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- internal::TypeId fixture_class_id,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc,
- internal::TestFactoryBase* factory);
-
- // Constructs a TestInfo object. The newly constructed instance assumes
- // ownership of the factory object.
- TestInfo(const char* test_case_name, const char* name,
- const char* a_type_param,
- const char* a_value_param,
- internal::TypeId fixture_class_id,
- internal::TestFactoryBase* factory);
-
- // Increments the number of death tests encountered in this test so
- // far.
- int increment_death_test_count() {
- return result_.increment_death_test_count();
- }
-
- // Creates the test object, runs it, records its result, and then
- // deletes it.
- void Run();
-
- static void ClearTestResult(TestInfo* test_info) {
- test_info->result_.Clear();
- }
-
- // These fields are immutable properties of the test.
- const std::string test_case_name_; // Test case name
- const std::string name_; // Test name
- // Name of the parameter type, or NULL if this is not a typed or a
- // type-parameterized test.
- const internal::scoped_ptr<const ::std::string> type_param_;
- // Text representation of the value parameter, or NULL if this is not a
- // value-parameterized test.
- const internal::scoped_ptr<const ::std::string> value_param_;
- const internal::TypeId fixture_class_id_; // ID of the test fixture class
- bool should_run_; // True iff this test should run
- bool is_disabled_; // True iff this test is disabled
- bool matches_filter_; // True if this test matches the
- // user-specified filter.
- internal::TestFactoryBase* const factory_; // The factory that creates
- // the test object
-
- // This field is mutable and needs to be reset before running the
- // test for the second time.
- TestResult result_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);
-};
-
-// A test case, which consists of a vector of TestInfos.
-//
-// TestCase is not copyable.
-class GTEST_API_ TestCase {
- public:
- // Creates a TestCase with the given name.
- //
- // TestCase does NOT have a default constructor. Always use this
- // constructor to create a TestCase object.
- //
- // Arguments:
- //
- // name: name of the test case
- // a_type_param: the name of the test's type parameter, or NULL if
- // this is not a type-parameterized test.
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- TestCase(const char* name, const char* a_type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc);
-
- // Destructor of TestCase.
- virtual ~TestCase();
-
- // Gets the name of the TestCase.
- const char* name() const { return name_.c_str(); }
-
- // Returns the name of the parameter type, or NULL if this is not a
- // type-parameterized test case.
- const char* type_param() const {
- if (type_param_.get() != NULL)
- return type_param_->c_str();
- return NULL;
- }
-
- // Returns true if any test in this test case should run.
- bool should_run() const { return should_run_; }
-
- // Gets the number of successful tests in this test case.
- int successful_test_count() const;
-
- // Gets the number of failed tests in this test case.
- int failed_test_count() const;
-
- // Gets the number of disabled tests in this test case.
- int disabled_test_count() const;
-
- // Get the number of tests in this test case that should run.
- int test_to_run_count() const;
-
- // Gets the number of all tests in this test case.
- int total_test_count() const;
-
- // Returns true iff the test case passed.
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the test case failed.
- bool Failed() const { return failed_test_count() > 0; }
-
- // Returns the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns the i-th test among all the tests. i can range from 0 to
- // total_test_count() - 1. If i is not in that range, returns NULL.
- const TestInfo* GetTestInfo(int i) const;
-
- private:
- friend class Test;
- friend class internal::UnitTestImpl;
-
- // Gets the (mutable) vector of TestInfos in this TestCase.
- std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
-
- // Gets the (immutable) vector of TestInfos in this TestCase.
- const std::vector<TestInfo*>& test_info_list() const {
- return test_info_list_;
- }
-
- // Returns the i-th test among all the tests. i can range from 0 to
- // total_test_count() - 1. If i is not in that range, returns NULL.
- TestInfo* GetMutableTestInfo(int i);
-
- // Sets the should_run member.
- void set_should_run(bool should) { should_run_ = should; }
-
- // Adds a TestInfo to this test case. Will delete the TestInfo upon
- // destruction of the TestCase object.
- void AddTestInfo(TestInfo * test_info);
-
- // Clears the results of all tests in this test case.
- void ClearResult();
-
- // Clears the results of all tests in the given test case.
- static void ClearTestCaseResult(TestCase* test_case) {
- test_case->ClearResult();
- }
-
- // Runs every test in this TestCase.
- void Run();
-
- // Runs SetUpTestCase() for this TestCase. This wrapper is needed
- // for catching exceptions thrown from SetUpTestCase().
- void RunSetUpTestCase() { (*set_up_tc_)(); }
-
- // Runs TearDownTestCase() for this TestCase. This wrapper is
- // needed for catching exceptions thrown from TearDownTestCase().
- void RunTearDownTestCase() { (*tear_down_tc_)(); }
-
- // Returns true iff test passed.
- static bool TestPassed(const TestInfo* test_info) {
- return test_info->should_run() && test_info->result()->Passed();
- }
-
- // Returns true iff test failed.
- static bool TestFailed(const TestInfo* test_info) {
- return test_info->should_run() && test_info->result()->Failed();
- }
-
- // Returns true iff test is disabled.
- static bool TestDisabled(const TestInfo* test_info) {
- return test_info->is_disabled_;
- }
-
- // Returns true if the given test should run.
- static bool ShouldRunTest(const TestInfo* test_info) {
- return test_info->should_run();
- }
-
- // Shuffles the tests in this test case.
- void ShuffleTests(internal::Random* random);
-
- // Restores the test order to before the first shuffle.
- void UnshuffleTests();
-
- // Name of the test case.
- internal::String name_;
- // Name of the parameter type, or NULL if this is not a typed or a
- // type-parameterized test.
- const internal::scoped_ptr<const ::std::string> type_param_;
- // The vector of TestInfos in their original order. It owns the
- // elements in the vector.
- std::vector<TestInfo*> test_info_list_;
- // Provides a level of indirection for the test list to allow easy
- // shuffling and restoring the test order. The i-th element in this
- // vector is the index of the i-th test in the shuffled test list.
- std::vector<int> test_indices_;
- // Pointer to the function that sets up the test case.
- Test::SetUpTestCaseFunc set_up_tc_;
- // Pointer to the function that tears down the test case.
- Test::TearDownTestCaseFunc tear_down_tc_;
- // True iff any test in this test case should run.
- bool should_run_;
- // Elapsed time, in milliseconds.
- TimeInMillis elapsed_time_;
-
- // We disallow copying TestCases.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase);
-};
-
-// An Environment object is capable of setting up and tearing down an
-// environment. The user should subclass this to define his own
-// environment(s).
-//
-// An Environment object does the set-up and tear-down in virtual
-// methods SetUp() and TearDown() instead of the constructor and the
-// destructor, as:
-//
-// 1. You cannot safely throw from a destructor. This is a problem
-// as in some cases Google Test is used where exceptions are enabled, and
-// we may want to implement ASSERT_* using exceptions where they are
-// available.
-// 2. You cannot use ASSERT_* directly in a constructor or
-// destructor.
-class Environment {
- public:
- // The d'tor is virtual as we need to subclass Environment.
- virtual ~Environment() {}
-
- // Override this to define how to set up the environment.
- virtual void SetUp() {}
-
- // Override this to define how to tear down the environment.
- virtual void TearDown() {}
- private:
- // If you see an error about overriding the following function or
- // about it being private, you have mis-spelled SetUp() as Setup().
- struct Setup_should_be_spelled_SetUp {};
- virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
-};
-
-// The interface for tracing execution of tests. The methods are organized in
-// the order the corresponding events are fired.
-class TestEventListener {
- public:
- virtual ~TestEventListener() {}
-
- // Fired before any test activity starts.
- virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;
-
- // Fired before each iteration of tests starts. There may be more than
- // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
- // index, starting from 0.
- virtual void OnTestIterationStart(const UnitTest& unit_test,
- int iteration) = 0;
-
- // Fired before environment set-up for each iteration of tests starts.
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;
-
- // Fired after environment set-up for each iteration of tests ends.
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;
-
- // Fired before the test case starts.
- virtual void OnTestCaseStart(const TestCase& test_case) = 0;
-
- // Fired before the test starts.
- virtual void OnTestStart(const TestInfo& test_info) = 0;
-
- // Fired after a failed assertion or a SUCCEED() invocation.
- virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;
-
- // Fired after the test ends.
- virtual void OnTestEnd(const TestInfo& test_info) = 0;
-
- // Fired after the test case ends.
- virtual void OnTestCaseEnd(const TestCase& test_case) = 0;
-
- // Fired before environment tear-down for each iteration of tests starts.
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;
-
- // Fired after environment tear-down for each iteration of tests ends.
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;
-
- // Fired after each iteration of tests finishes.
- virtual void OnTestIterationEnd(const UnitTest& unit_test,
- int iteration) = 0;
-
- // Fired after all test activities have ended.
- virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;
-};
-
-// The convenience class for users who need to override just one or two
-// methods and are not concerned that a possible change to a signature of
-// the methods they override will not be caught during the build. For
-// comments about each method please see the definition of TestEventListener
-// above.
-class EmptyTestEventListener : public TestEventListener {
- public:
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
- int /*iteration*/) {}
- virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {}
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}
- virtual void OnTestStart(const TestInfo& /*test_info*/) {}
- virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {}
- virtual void OnTestEnd(const TestInfo& /*test_info*/) {}
- virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}
- virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {}
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
- int /*iteration*/) {}
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
-};
-
-// TestEventListeners lets users add listeners to track events in Google Test.
-class GTEST_API_ TestEventListeners {
- public:
- TestEventListeners();
- ~TestEventListeners();
-
- // Appends an event listener to the end of the list. Google Test assumes
- // the ownership of the listener (i.e. it will delete the listener when
- // the test program finishes).
- void Append(TestEventListener* listener);
-
- // Removes the given event listener from the list and returns it. It then
- // becomes the caller's responsibility to delete the listener. Returns
- // NULL if the listener is not found in the list.
- TestEventListener* Release(TestEventListener* listener);
-
- // Returns the standard listener responsible for the default console
- // output. Can be removed from the listeners list to shut down default
- // console output. Note that removing this object from the listener list
- // with Release transfers its ownership to the caller and makes this
- // function return NULL the next time.
- TestEventListener* default_result_printer() const {
- return default_result_printer_;
- }
-
- // Returns the standard listener responsible for the default XML output
- // controlled by the --gtest_output=xml flag. Can be removed from the
- // listeners list by users who want to shut down the default XML output
- // controlled by this flag and substitute it with custom one. Note that
- // removing this object from the listener list with Release transfers its
- // ownership to the caller and makes this function return NULL the next
- // time.
- TestEventListener* default_xml_generator() const {
- return default_xml_generator_;
- }
-
- private:
- friend class TestCase;
- friend class TestInfo;
- friend class internal::DefaultGlobalTestPartResultReporter;
- friend class internal::NoExecDeathTest;
- friend class internal::TestEventListenersAccessor;
- friend class internal::UnitTestImpl;
-
- // Returns repeater that broadcasts the TestEventListener events to all
- // subscribers.
- TestEventListener* repeater();
-
- // Sets the default_result_printer attribute to the provided listener.
- // The listener is also added to the listener list and previous
- // default_result_printer is removed from it and deleted. The listener can
- // also be NULL in which case it will not be added to the list. Does
- // nothing if the previous and the current listener objects are the same.
- void SetDefaultResultPrinter(TestEventListener* listener);
-
- // Sets the default_xml_generator attribute to the provided listener. The
- // listener is also added to the listener list and previous
- // default_xml_generator is removed from it and deleted. The listener can
- // also be NULL in which case it will not be added to the list. Does
- // nothing if the previous and the current listener objects are the same.
- void SetDefaultXmlGenerator(TestEventListener* listener);
-
- // Controls whether events will be forwarded by the repeater to the
- // listeners in the list.
- bool EventForwardingEnabled() const;
- void SuppressEventForwarding();
-
- // The actual list of listeners.
- internal::TestEventRepeater* repeater_;
- // Listener responsible for the standard result output.
- TestEventListener* default_result_printer_;
- // Listener responsible for the creation of the XML output file.
- TestEventListener* default_xml_generator_;
-
- // We disallow copying TestEventListeners.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);
-};
-
-// A UnitTest consists of a vector of TestCases.
-//
-// This is a singleton class. The only instance of UnitTest is
-// created when UnitTest::GetInstance() is first called. This
-// instance is never deleted.
-//
-// UnitTest is not copyable.
-//
-// This class is thread-safe as long as the methods are called
-// according to their specification.
-class GTEST_API_ UnitTest {
- public:
- // Gets the singleton UnitTest object. The first time this method
- // is called, a UnitTest object is constructed and returned.
- // Consecutive calls will return the same object.
- static UnitTest* GetInstance();
-
- // Runs all tests in this UnitTest object and prints the result.
- // Returns 0 if successful, or 1 otherwise.
- //
- // This method can only be called from the main thread.
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- int Run() GTEST_MUST_USE_RESULT_;
-
- // Returns the working directory when the first TEST() or TEST_F()
- // was executed. The UnitTest object owns the string.
- const char* original_working_dir() const;
-
- // Returns the TestCase object for the test that's currently running,
- // or NULL if no test is running.
- const TestCase* current_test_case() const;
-
- // Returns the TestInfo object for the test that's currently running,
- // or NULL if no test is running.
- const TestInfo* current_test_info() const;
-
- // Returns the random seed used at the start of the current test run.
- int random_seed() const;
-
-#if GTEST_HAS_PARAM_TEST
- // Returns the ParameterizedTestCaseRegistry object used to keep track of
- // value-parameterized tests and instantiate and register them.
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- internal::ParameterizedTestCaseRegistry& parameterized_test_registry();
-#endif // GTEST_HAS_PARAM_TEST
-
- // Gets the number of successful test cases.
- int successful_test_case_count() const;
-
- // Gets the number of failed test cases.
- int failed_test_case_count() const;
-
- // Gets the number of all test cases.
- int total_test_case_count() const;
-
- // Gets the number of all test cases that contain at least one test
- // that should run.
- int test_case_to_run_count() const;
-
- // Gets the number of successful tests.
- int successful_test_count() const;
-
- // Gets the number of failed tests.
- int failed_test_count() const;
-
- // Gets the number of disabled tests.
- int disabled_test_count() const;
-
- // Gets the number of all tests.
- int total_test_count() const;
-
- // Gets the number of tests that should run.
- int test_to_run_count() const;
-
- // Gets the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const;
-
- // Returns true iff the unit test passed (i.e. all test cases passed).
- bool Passed() const;
-
- // Returns true iff the unit test failed (i.e. some test case failed
- // or something outside of all tests failed).
- bool Failed() const;
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- const TestCase* GetTestCase(int i) const;
-
- // Returns the list of event listeners that can be used to track events
- // inside Google Test.
- TestEventListeners& listeners();
-
- private:
- // Registers and returns a global test environment. When a test
- // program is run, all global test environments will be set-up in
- // the order they were registered. After all tests in the program
- // have finished, all global test environments will be torn-down in
- // the *reverse* order they were registered.
- //
- // The UnitTest object takes ownership of the given environment.
- //
- // This method can only be called from the main thread.
- Environment* AddEnvironment(Environment* env);
-
- // Adds a TestPartResult to the current TestResult object. All
- // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
- // eventually call this to report their results. The user code
- // should use the assertion macros instead of calling this directly.
- void AddTestPartResult(TestPartResult::Type result_type,
- const char* file_name,
- int line_number,
- const internal::String& message,
- const internal::String& os_stack_trace);
-
- // Adds a TestProperty to the current TestResult object. If the result already
- // contains a property with the same key, the value will be updated.
- void RecordPropertyForCurrentTest(const char* key, const char* value);
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- TestCase* GetMutableTestCase(int i);
-
- // Accessors for the implementation object.
- internal::UnitTestImpl* impl() { return impl_; }
- const internal::UnitTestImpl* impl() const { return impl_; }
-
- // These classes and funcions are friends as they need to access private
- // members of UnitTest.
- friend class Test;
- friend class internal::AssertHelper;
- friend class internal::ScopedTrace;
- friend Environment* AddGlobalTestEnvironment(Environment* env);
- friend internal::UnitTestImpl* internal::GetUnitTestImpl();
- friend void internal::ReportFailureInUnknownLocation(
- TestPartResult::Type result_type,
- const internal::String& message);
-
- // Creates an empty UnitTest.
- UnitTest();
-
- // D'tor
- virtual ~UnitTest();
-
- // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
- // Google Test trace stack.
- void PushGTestTrace(const internal::TraceInfo& trace);
-
- // Pops a trace from the per-thread Google Test trace stack.
- void PopGTestTrace();
-
- // Protects mutable state in *impl_. This is mutable as some const
- // methods need to lock it too.
- mutable internal::Mutex mutex_;
-
- // Opaque implementation object. This field is never changed once
- // the object is constructed. We don't mark it as const here, as
- // doing so will cause a warning in the constructor of UnitTest.
- // Mutable state in *impl_ is protected by mutex_.
- internal::UnitTestImpl* impl_;
-
- // We disallow copying UnitTest.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);
-};
-
-// A convenient wrapper for adding an environment for the test
-// program.
-//
-// You should call this before RUN_ALL_TESTS() is called, probably in
-// main(). If you use gtest_main, you need to call this before main()
-// starts for it to take effect. For example, you can define a global
-// variable like this:
-//
-// testing::Environment* const foo_env =
-// testing::AddGlobalTestEnvironment(new FooEnvironment);
-//
-// However, we strongly recommend you to write your own main() and
-// call AddGlobalTestEnvironment() there, as relying on initialization
-// of global variables makes the code harder to read and may cause
-// problems when you register multiple environments from different
-// translation units and the environments have dependencies among them
-// (remember that the compiler doesn't guarantee the order in which
-// global variables from different translation units are initialized).
-inline Environment* AddGlobalTestEnvironment(Environment* env) {
- return UnitTest::GetInstance()->AddEnvironment(env);
-}
-
-// Initializes Google Test. This must be called before calling
-// RUN_ALL_TESTS(). In particular, it parses a command line for the
-// flags that Google Test recognizes. Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-GTEST_API_ void InitGoogleTest(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);
-
-namespace internal {
-
-// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
-// operand to be used in a failure message. The type (but not value)
-// of the other operand may affect the format. This allows us to
-// print a char* as a raw pointer when it is compared against another
-// char*, and print it as a C string when it is compared against an
-// std::string object, for example.
-//
-// The default implementation ignores the type of the other operand.
-// Some specialized versions are used to handle formatting wide or
-// narrow C strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename T1, typename T2>
-String FormatForComparisonFailureMessage(const T1& value,
- const T2& /* other_operand */) {
- // C++Builder compiles this incorrectly if the namespace isn't explicitly
- // given.
- return ::testing::PrintToString(value);
-}
-
-// The helper function for {ASSERT|EXPECT}_EQ.
-template <typename T1, typename T2>
-AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual) {
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4389) // Temporarily disables warning on
- // signed/unsigned mismatch.
-#endif
-
- if (expected == actual) {
- return AssertionSuccess();
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-
- return EqFailure(expected_expression,
- actual_expression,
- FormatForComparisonFailureMessage(expected, actual),
- FormatForComparisonFailureMessage(actual, expected),
- false);
-}
-
-// With this overloaded version, we allow anonymous enums to be used
-// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums
-// can be implicitly cast to BiggestInt.
-GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual);
-
-// The helper class for {ASSERT|EXPECT}_EQ. The template argument
-// lhs_is_null_literal is true iff the first argument to ASSERT_EQ()
-// is a null pointer literal. The following default implementation is
-// for lhs_is_null_literal being false.
-template <bool lhs_is_null_literal>
-class EqHelper {
- public:
- // This templatized version is for the general case.
- template <typename T1, typename T2>
- static AssertionResult Compare(const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-
- // With this overloaded version, we allow anonymous enums to be used
- // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
- // enums can be implicitly cast to BiggestInt.
- //
- // Even though its body looks the same as the above version, we
- // cannot merge the two, as it will make anonymous enums unhappy.
- static AssertionResult Compare(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-};
-
-// This specialization is used when the first argument to ASSERT_EQ()
-// is a null pointer literal, like NULL, false, or 0.
-template <>
-class EqHelper<true> {
- public:
- // We define two overloaded versions of Compare(). The first
- // version will be picked when the second argument to ASSERT_EQ() is
- // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or
- // EXPECT_EQ(false, a_bool).
- template <typename T1, typename T2>
- static AssertionResult Compare(
- const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual,
- // The following line prevents this overload from being considered if T2
- // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr)
- // expands to Compare("", "", NULL, my_ptr), which requires a conversion
- // to match the Secret* in the other overload, which would otherwise make
- // this template match better.
- typename EnableIf<!is_pointer<T2>::value>::type* = 0) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-
- // This version will be picked when the second argument to ASSERT_EQ() is a
- // pointer, e.g. ASSERT_EQ(NULL, a_pointer).
- template <typename T>
- static AssertionResult Compare(
- const char* expected_expression,
- const char* actual_expression,
- // We used to have a second template parameter instead of Secret*. That
- // template parameter would deduce to 'long', making this a better match
- // than the first overload even without the first overload's EnableIf.
- // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to
- // non-pointer argument" (even a deduced integral argument), so the old
- // implementation caused warnings in user code.
- Secret* /* expected (NULL) */,
- T* actual) {
- // We already know that 'expected' is a null pointer.
- return CmpHelperEQ(expected_expression, actual_expression,
- static_cast<T*>(NULL), actual);
- }
-};
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste
-// of similar code.
-//
-// For each templatized helper function, we also define an overloaded
-// version for BiggestInt in order to reduce code bloat and allow
-// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled
-// with gcc 4.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-template <typename T1, typename T2>\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- const T1& val1, const T2& val2) {\
- if (val1 op val2) {\
- return AssertionSuccess();\
- } else {\
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2\
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
- << " vs " << FormatForComparisonFailureMessage(val2, val1);\
- }\
-}\
-GTEST_API_ AssertionResult CmpHelper##op_name(\
- const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-
-// Implements the helper function for {ASSERT|EXPECT}_NE
-GTEST_IMPL_CMP_HELPER_(NE, !=);
-// Implements the helper function for {ASSERT|EXPECT}_LE
-GTEST_IMPL_CMP_HELPER_(LE, <=);
-// Implements the helper function for {ASSERT|EXPECT}_LT
-GTEST_IMPL_CMP_HELPER_(LT, < );
-// Implements the helper function for {ASSERT|EXPECT}_GE
-GTEST_IMPL_CMP_HELPER_(GE, >=);
-// Implements the helper function for {ASSERT|EXPECT}_GT
-GTEST_IMPL_CMP_HELPER_(GT, > );
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual);
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual);
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2);
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2);
-
-
-// Helper function for *_STREQ on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const wchar_t* expected,
- const wchar_t* actual);
-
-// Helper function for *_STRNE on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const wchar_t* s1,
- const wchar_t* s2);
-
-} // namespace internal
-
-// IsSubstring() and IsNotSubstring() are intended to be used as the
-// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
-// themselves. They check whether needle is a substring of haystack
-// (NULL is considered a substring of itself only), and return an
-// appropriate error message when they fail.
-//
-// The {needle,haystack}_expr arguments are the stringified
-// expressions that generated the two real arguments.
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack);
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack);
-#endif // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-// Helper template function for comparing floating-points.
-//
-// Template parameter:
-//
-// RawType: the raw floating-point type (either float or double)
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename RawType>
-AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression,
- const char* actual_expression,
- RawType expected,
- RawType actual) {
- const FloatingPoint<RawType> lhs(expected), rhs(actual);
-
- if (lhs.AlmostEquals(rhs)) {
- return AssertionSuccess();
- }
-
- ::std::stringstream expected_ss;
- expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << expected;
-
- ::std::stringstream actual_ss;
- actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << actual;
-
- return EqFailure(expected_expression,
- actual_expression,
- StringStreamToString(&expected_ss),
- StringStreamToString(&actual_ss),
- false);
-}
-
-// Helper function for implementing ASSERT_NEAR.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,
- const char* expr2,
- const char* abs_error_expr,
- double val1,
- double val2,
- double abs_error);
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-// A class that enables one to stream messages to assertion macros
-class GTEST_API_ AssertHelper {
- public:
- // Constructor.
- AssertHelper(TestPartResult::Type type,
- const char* file,
- int line,
- const char* message);
- ~AssertHelper();
-
- // Message assignment is a semantic trick to enable assertion
- // streaming; see the GTEST_MESSAGE_ macro below.
- void operator=(const Message& message) const;
-
- private:
- // We put our data in a struct so that the size of the AssertHelper class can
- // be as small as possible. This is important because gcc is incapable of
- // re-using stack space even for temporary variables, so every EXPECT_EQ
- // reserves stack space for another AssertHelper.
- struct AssertHelperData {
- AssertHelperData(TestPartResult::Type t,
- const char* srcfile,
- int line_num,
- const char* msg)
- : type(t), file(srcfile), line(line_num), message(msg) { }
-
- TestPartResult::Type const type;
- const char* const file;
- int const line;
- String const message;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);
- };
-
- AssertHelperData* const data_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);
-};
-
-} // namespace internal
-
-#if GTEST_HAS_PARAM_TEST
-// The pure interface class that all value-parameterized tests inherit from.
-// A value-parameterized class must inherit from both ::testing::Test and
-// ::testing::WithParamInterface. In most cases that just means inheriting
-// from ::testing::TestWithParam, but more complicated test hierarchies
-// may need to inherit from Test and WithParamInterface at different levels.
-//
-// This interface has support for accessing the test parameter value via
-// the GetParam() method.
-//
-// Use it with one of the parameter generator defining functions, like Range(),
-// Values(), ValuesIn(), Bool(), and Combine().
-//
-// class FooTest : public ::testing::TestWithParam<int> {
-// protected:
-// FooTest() {
-// // Can use GetParam() here.
-// }
-// virtual ~FooTest() {
-// // Can use GetParam() here.
-// }
-// virtual void SetUp() {
-// // Can use GetParam() here.
-// }
-// virtual void TearDown {
-// // Can use GetParam() here.
-// }
-// };
-// TEST_P(FooTest, DoesBar) {
-// // Can use GetParam() method here.
-// Foo foo;
-// ASSERT_TRUE(foo.DoesBar(GetParam()));
-// }
-// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
-
-template <typename T>
-class WithParamInterface {
- public:
- typedef T ParamType;
- virtual ~WithParamInterface() {}
-
- // The current parameter value. Is also available in the test fixture's
- // constructor. This member function is non-static, even though it only
- // references static data, to reduce the opportunity for incorrect uses
- // like writing 'WithParamInterface<bool>::GetParam()' for a test that
- // uses a fixture whose parameter type is int.
- const ParamType& GetParam() const { return *parameter_; }
-
- private:
- // Sets parameter value. The caller is responsible for making sure the value
- // remains alive and unchanged throughout the current test.
- static void SetParam(const ParamType* parameter) {
- parameter_ = parameter;
- }
-
- // Static value used for accessing parameter during a test lifetime.
- static const ParamType* parameter_;
-
- // TestClass must be a subclass of WithParamInterface<T> and Test.
- template <class TestClass> friend class internal::ParameterizedTestFactory;
-};
-
-template <typename T>
-const T* WithParamInterface<T>::parameter_ = NULL;
-
-// Most value-parameterized classes can ignore the existence of
-// WithParamInterface, and can just inherit from ::testing::TestWithParam.
-
-template <typename T>
-class TestWithParam : public Test, public WithParamInterface<T> {
-};
-
-#endif // GTEST_HAS_PARAM_TEST
-
-// Macros for indicating success/failure in test code.
-
-// ADD_FAILURE unconditionally adds a failure to the current test.
-// SUCCEED generates a success - it doesn't automatically make the
-// current test successful, as a test is only successful when it has
-// no failure.
-//
-// EXPECT_* verifies that a certain condition is satisfied. If not,
-// it behaves like ADD_FAILURE. In particular:
-//
-// EXPECT_TRUE verifies that a Boolean condition is true.
-// EXPECT_FALSE verifies that a Boolean condition is false.
-//
-// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
-// that they will also abort the current function on failure. People
-// usually want the fail-fast behavior of FAIL and ASSERT_*, but those
-// writing data-driven tests often find themselves using ADD_FAILURE
-// and EXPECT_* more.
-//
-// Examples:
-//
-// EXPECT_TRUE(server.StatusIsOK());
-// ASSERT_FALSE(server.HasPendingRequest(port))
-// << "There are still pending requests " << "on port " << port;
-
-// Generates a nonfatal failure with a generic message.
-#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
-
-// Generates a nonfatal failure at the given source file location with
-// a generic message.
-#define ADD_FAILURE_AT(file, line) \
- GTEST_MESSAGE_AT_(file, line, "Failed", \
- ::testing::TestPartResult::kNonFatalFailure)
-
-// Generates a fatal failure with a generic message.
-#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
-
-// Define this macro to 1 to omit the definition of FAIL(), which is a
-// generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_FAIL
-# define FAIL() GTEST_FAIL()
-#endif
-
-// Generates a success with a generic message.
-#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
-
-// Define this macro to 1 to omit the definition of SUCCEED(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_SUCCEED
-# define SUCCEED() GTEST_SUCCEED()
-#endif
-
-// Macros for testing exceptions.
-//
-// * {ASSERT|EXPECT}_THROW(statement, expected_exception):
-// Tests that the statement throws the expected exception.
-// * {ASSERT|EXPECT}_NO_THROW(statement):
-// Tests that the statement doesn't throw any exception.
-// * {ASSERT|EXPECT}_ANY_THROW(statement):
-// Tests that the statement throws an exception.
-
-#define EXPECT_THROW(statement, expected_exception) \
- GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_NO_THROW(statement) \
- GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_ANY_THROW(statement) \
- GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_THROW(statement, expected_exception) \
- GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
-#define ASSERT_NO_THROW(statement) \
- GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
-#define ASSERT_ANY_THROW(statement) \
- GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)
-
-// Boolean assertions. Condition can be either a Boolean expression or an
-// AssertionResult. For more information on how to use AssertionResult with
-// these macros see comments on that class.
-#define EXPECT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
- GTEST_NONFATAL_FAILURE_)
-#define EXPECT_FALSE(condition) \
- GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
- GTEST_NONFATAL_FAILURE_)
-#define ASSERT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
- GTEST_FATAL_FAILURE_)
-#define ASSERT_FALSE(condition) \
- GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
- GTEST_FATAL_FAILURE_)
-
-// Includes the auto-generated header that implements a family of
-// generic predicate assertion macros.
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on 09/24/2010 by command
-// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
-//
-// Implements a family of generic predicate assertion macros.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-// Makes sure this header is not included before gtest.h.
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-# error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
-
-// This header implements a family of generic predicate assertion
-// macros:
-//
-// ASSERT_PRED_FORMAT1(pred_format, v1)
-// ASSERT_PRED_FORMAT2(pred_format, v1, v2)
-// ...
-//
-// where pred_format is a function or functor that takes n (in the
-// case of ASSERT_PRED_FORMATn) values and their source expression
-// text, and returns a testing::AssertionResult. See the definition
-// of ASSERT_EQ in gtest.h for an example.
-//
-// If you don't care about formatting, you can use the more
-// restrictive version:
-//
-// ASSERT_PRED1(pred, v1)
-// ASSERT_PRED2(pred, v1, v2)
-// ...
-//
-// where pred is an n-ary function or functor that returns bool,
-// and the values v1, v2, ..., must support the << operator for
-// streaming to std::ostream.
-//
-// We also define the EXPECT_* variations.
-//
-// For now we only support predicates whose arity is at most 5.
-// Please email googletestframework@googlegroups.com if you need
-// support for higher arities.
-
-// GTEST_ASSERT_ is the basic statement to which all of the assertions
-// in this file reduce. Don't use this in your code.
-
-#define GTEST_ASSERT_(expression, on_failure) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar = (expression)) \
- ; \
- else \
- on_failure(gtest_ar.failure_message())
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use
-// this in your code.
-template <typename Pred,
- typename T1>
-AssertionResult AssertPred1Helper(const char* pred_text,
- const char* e1,
- Pred pred,
- const T1& v1) {
- if (pred(v1)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, v1),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use
-// this in your code.
-#define GTEST_PRED1_(pred, v1, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
- #v1, \
- pred, \
- v1), on_failure)
-
-// Unary predicate assertion macros.
-#define EXPECT_PRED_FORMAT1(pred_format, v1) \
- GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED1(pred, v1) \
- GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT1(pred_format, v1) \
- GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED1(pred, v1) \
- GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2>
-AssertionResult AssertPred2Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- Pred pred,
- const T1& v1,
- const T2& v2) {
- if (pred(v1, v2)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use
-// this in your code.
-#define GTEST_PRED2_(pred, v1, v2, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
- #v1, \
- #v2, \
- pred, \
- v1, \
- v2), on_failure)
-
-// Binary predicate assertion macros.
-#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
- GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED2(pred, v1, v2) \
- GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
- GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED2(pred, v1, v2) \
- GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3>
-AssertionResult AssertPred3Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3) {
- if (pred(v1, v2, v3)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use
-// this in your code.
-#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- pred, \
- v1, \
- v2, \
- v3), on_failure)
-
-// Ternary predicate assertion macros.
-#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
- GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED3(pred, v1, v2, v3) \
- GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
- GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED3(pred, v1, v2, v3) \
- GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3,
- typename T4>
-AssertionResult AssertPred4Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4) {
- if (pred(v1, v2, v3, v4)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ", "
- << e4 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3
- << "\n" << e4 << " evaluates to " << v4;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use
-// this in your code.
-#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- #v4, \
- pred, \
- v1, \
- v2, \
- v3, \
- v4), on_failure)
-
-// 4-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
- GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED4(pred, v1, v2, v3, v4) \
- GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
- GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED4(pred, v1, v2, v3, v4) \
- GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5>
-AssertionResult AssertPred5Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const char* e5,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4,
- const T5& v5) {
- if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ", "
- << e4 << ", "
- << e5 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3
- << "\n" << e4 << " evaluates to " << v4
- << "\n" << e5 << " evaluates to " << v5;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use
-// this in your code.
-#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- #v4, \
- #v5, \
- pred, \
- v1, \
- v2, \
- v3, \
- v4, \
- v5), on_failure)
-
-// 5-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
- GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
- GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
- GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
- GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-
-
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-// Macros for testing equalities and inequalities.
-//
-// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual
-// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
-// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
-// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
-// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
-// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
-//
-// When they are not, Google Test prints both the tested expressions and
-// their actual values. The values must be compatible built-in types,
-// or you will get a compiler error. By "compatible" we mean that the
-// values can be compared by the respective operator.
-//
-// Note:
-//
-// 1. It is possible to make a user-defined type work with
-// {ASSERT|EXPECT}_??(), but that requires overloading the
-// comparison operators and is thus discouraged by the Google C++
-// Usage Guide. Therefore, you are advised to use the
-// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
-// equal.
-//
-// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
-// pointers (in particular, C strings). Therefore, if you use it
-// with two C strings, you are testing how their locations in memory
-// are related, not how their content is related. To compare two C
-// strings by content, use {ASSERT|EXPECT}_STR*().
-//
-// 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to
-// {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you
-// what the actual value is when it fails, and similarly for the
-// other comparisons.
-//
-// 4. Do not depend on the order in which {ASSERT|EXPECT}_??()
-// evaluate their arguments, which is undefined.
-//
-// 5. These macros evaluate their arguments exactly once.
-//
-// Examples:
-//
-// EXPECT_NE(5, Foo());
-// EXPECT_EQ(NULL, a_pointer);
-// ASSERT_LT(i, array_size);
-// ASSERT_GT(records.size(), 0) << "There is no record left.";
-
-#define EXPECT_EQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal:: \
- EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
- expected, actual)
-#define EXPECT_NE(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)
-#define EXPECT_LE(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define EXPECT_LT(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define EXPECT_GE(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define EXPECT_GT(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-#define GTEST_ASSERT_EQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal:: \
- EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
- expected, actual)
-#define GTEST_ASSERT_NE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
-#define GTEST_ASSERT_LE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define GTEST_ASSERT_LT(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define GTEST_ASSERT_GE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define GTEST_ASSERT_GT(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
-// ASSERT_XY(), which clashes with some users' own code.
-
-#if !GTEST_DONT_DEFINE_ASSERT_EQ
-# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_NE
-# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LE
-# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LT
-# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GE
-# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GT
-# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
-#endif
-
-// C String Comparisons. All tests treat NULL and any non-NULL string
-// as different. Two NULLs are equal.
-//
-// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2
-// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2
-// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
-// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
-//
-// For wide or narrow string objects, you can use the
-// {ASSERT|EXPECT}_??() macros.
-//
-// Don't depend on the order in which the arguments are evaluated,
-// which is undefined.
-//
-// These macros evaluate their arguments exactly once.
-
-#define EXPECT_STREQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
-#define EXPECT_STRNE(s1, s2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define EXPECT_STRCASEEQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
-#define EXPECT_STRCASENE(s1, s2)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-#define ASSERT_STREQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
-#define ASSERT_STRNE(s1, s2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define ASSERT_STRCASEEQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
-#define ASSERT_STRCASENE(s1, s2)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-// Macros for comparing floating-point numbers.
-//
-// * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual):
-// Tests that two float values are almost equal.
-// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual):
-// Tests that two double values are almost equal.
-// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
-// Tests that v1 and v2 are within the given distance to each other.
-//
-// Google Test uses ULP-based comparison to automatically pick a default
-// error bound that is appropriate for the operands. See the
-// FloatingPoint template class in gtest-internal.h if you are
-// interested in the implementation details.
-
-#define EXPECT_FLOAT_EQ(expected, actual)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
- expected, actual)
-
-#define EXPECT_DOUBLE_EQ(expected, actual)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
- expected, actual)
-
-#define ASSERT_FLOAT_EQ(expected, actual)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
- expected, actual)
-
-#define ASSERT_DOUBLE_EQ(expected, actual)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
- expected, actual)
-
-#define EXPECT_NEAR(val1, val2, abs_error)\
- EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
- val1, val2, abs_error)
-
-#define ASSERT_NEAR(val1, val2, abs_error)\
- ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
- val1, val2, abs_error)
-
-// These predicate format functions work on floating-point values, and
-// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
-//
-// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,
- float val1, float val2);
-GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
- double val1, double val2);
-
-
-#if GTEST_OS_WINDOWS
-
-// Macros that test for HRESULT failure and success, these are only useful
-// on Windows, and rely on Windows SDK macros and APIs to compile.
-//
-// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
-//
-// When expr unexpectedly fails or succeeds, Google Test prints the
-// expected result and the actual result with both a human-readable
-// string representation of the error, if available, as well as the
-// hex result code.
-# define EXPECT_HRESULT_SUCCEEDED(expr) \
- EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define ASSERT_HRESULT_SUCCEEDED(expr) \
- ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define EXPECT_HRESULT_FAILED(expr) \
- EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-# define ASSERT_HRESULT_FAILED(expr) \
- ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-#endif // GTEST_OS_WINDOWS
-
-// Macros that execute statement and check that it doesn't generate new fatal
-// failures in the current thread.
-//
-// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
-//
-// Examples:
-//
-// EXPECT_NO_FATAL_FAILURE(Process());
-// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
-//
-#define ASSERT_NO_FATAL_FAILURE(statement) \
- GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
-#define EXPECT_NO_FATAL_FAILURE(statement) \
- GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)
-
-// Causes a trace (including the source file path, the current line
-// number, and the given message) to be included in every test failure
-// message generated by code in the current scope. The effect is
-// undone when the control leaves the current scope.
-//
-// The message argument can be anything streamable to std::ostream.
-//
-// In the implementation, we include the current line number as part
-// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
-// to appear in the same block - as long as they are on different
-// lines.
-#define SCOPED_TRACE(message) \
- ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
- __FILE__, __LINE__, ::testing::Message() << (message))
-
-// Compile-time assertion for type equality.
-// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
-// the same type. The value it returns is not interesting.
-//
-// Instead of making StaticAssertTypeEq a class template, we make it a
-// function template that invokes a helper class template. This
-// prevents a user from misusing StaticAssertTypeEq<T1, T2> by
-// defining objects of that type.
-//
-// CAVEAT:
-//
-// When used inside a method of a class template,
-// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
-// instantiated. For example, given:
-//
-// template <typename T> class Foo {
-// public:
-// void Bar() { testing::StaticAssertTypeEq<int, T>(); }
-// };
-//
-// the code:
-//
-// void Test1() { Foo<bool> foo; }
-//
-// will NOT generate a compiler error, as Foo<bool>::Bar() is never
-// actually instantiated. Instead, you need:
-//
-// void Test2() { Foo<bool> foo; foo.Bar(); }
-//
-// to cause a compiler error.
-template <typename T1, typename T2>
-bool StaticAssertTypeEq() {
- (void)internal::StaticAssertTypeEqHelper<T1, T2>();
- return true;
-}
-
-// Defines a test.
-//
-// The first parameter is the name of the test case, and the second
-// parameter is the name of the test within the test case.
-//
-// The convention is to end the test case name with "Test". For
-// example, a test case for the Foo class can be named FooTest.
-//
-// The user should put his test code between braces after using this
-// macro. Example:
-//
-// TEST(FooTest, InitializesCorrectly) {
-// Foo foo;
-// EXPECT_TRUE(foo.StatusIsOK());
-// }
-
-// Note that we call GetTestTypeId() instead of GetTypeId<
-// ::testing::Test>() here to get the type ID of testing::Test. This
-// is to work around a suspected linker bug when using Google Test as
-// a framework on Mac OS X. The bug causes GetTypeId<
-// ::testing::Test>() to return different values depending on whether
-// the call is from the Google Test framework itself or from user test
-// code. GetTestTypeId() is guaranteed to always return the same
-// value, as it always calls GetTypeId<>() from the Google Test
-// framework.
-#define GTEST_TEST(test_case_name, test_name)\
- GTEST_TEST_(test_case_name, test_name, \
- ::testing::Test, ::testing::internal::GetTestTypeId())
-
-// Define this macro to 1 to omit the definition of TEST(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_TEST
-# define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
-#endif
-
-// Defines a test that uses a test fixture.
-//
-// The first parameter is the name of the test fixture class, which
-// also doubles as the test case name. The second parameter is the
-// name of the test within the test case.
-//
-// A test fixture class must be declared earlier. The user should put
-// his test code between braces after using this macro. Example:
-//
-// class FooTest : public testing::Test {
-// protected:
-// virtual void SetUp() { b_.AddElement(3); }
-//
-// Foo a_;
-// Foo b_;
-// };
-//
-// TEST_F(FooTest, InitializesCorrectly) {
-// EXPECT_TRUE(a_.StatusIsOK());
-// }
-//
-// TEST_F(FooTest, ReturnsElementCountCorrectly) {
-// EXPECT_EQ(0, a_.size());
-// EXPECT_EQ(1, b_.size());
-// }
-
-#define TEST_F(test_fixture, test_name)\
- GTEST_TEST_(test_fixture, test_name, test_fixture, \
- ::testing::internal::GetTypeId<test_fixture>())
-
-// Use this macro in main() to run all tests. It returns 0 if all
-// tests are successful, or 1 otherwise.
-//
-// RUN_ALL_TESTS() should be invoked after the command line has been
-// parsed by InitGoogleTest().
-
-#define RUN_ALL_TESTS()\
- (::testing::UnitTest::GetInstance()->Run())
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CHANGES b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CHANGES
deleted file mode 100644
index 591924583..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CHANGES
+++ /dev/null
@@ -1,130 +0,0 @@
-Changes for 1.6.0:
-
-* New feature: ADD_FAILURE_AT() for reporting a test failure at the
- given source location -- useful for writing testing utilities.
-* New feature: the universal value printer is moved from Google Mock
- to Google Test.
-* New feature: type parameters and value parameters are reported in
- the XML report now.
-* A gtest_disable_pthreads CMake option.
-* Colored output works in GNU Screen sessions now.
-* Parameters of value-parameterized tests are now printed in the
- textual output.
-* Failures from ad hoc test assertions run before RUN_ALL_TESTS() are
- now correctly reported.
-* Arguments of ASSERT_XY and EXPECT_XY no longer need to support << to
- ostream.
-* More complete handling of exceptions.
-* GTEST_ASSERT_XY can be used instead of ASSERT_XY in case the latter
- name is already used by another library.
-* --gtest_catch_exceptions is now true by default, allowing a test
- program to continue after an exception is thrown.
-* Value-parameterized test fixtures can now derive from Test and
- WithParamInterface<T> separately, easing conversion of legacy tests.
-* Death test messages are clearly marked to make them more
- distinguishable from other messages.
-* Compatibility fixes for Android, Google Native Client, MinGW, HP UX,
- PowerPC, Lucid autotools, libCStd, Sun C++, Borland C++ Builder (Code Gear),
- IBM XL C++ (Visual Age C++), and C++0x.
-* Bug fixes and implementation clean-ups.
-* Potentially incompatible changes: disables the harmful 'make install'
- command in autotools.
-
-Changes for 1.5.0:
-
- * New feature: assertions can be safely called in multiple threads
- where the pthreads library is available.
- * New feature: predicates used inside EXPECT_TRUE() and friends
- can now generate custom failure messages.
- * New feature: Google Test can now be compiled as a DLL.
- * New feature: fused source files are included.
- * New feature: prints help when encountering unrecognized Google Test flags.
- * Experimental feature: CMake build script (requires CMake 2.6.4+).
- * Experimental feature: the Pump script for meta programming.
- * double values streamed to an assertion are printed with enough precision
- to differentiate any two different values.
- * Google Test now works on Solaris and AIX.
- * Build and test script improvements.
- * Bug fixes and implementation clean-ups.
-
- Potentially breaking changes:
-
- * Stopped supporting VC++ 7.1 with exceptions disabled.
- * Dropped support for 'make install'.
-
-Changes for 1.4.0:
-
- * New feature: the event listener API
- * New feature: test shuffling
- * New feature: the XML report format is closer to junitreport and can
- be parsed by Hudson now.
- * New feature: when a test runs under Visual Studio, its failures are
- integrated in the IDE.
- * New feature: /MD(d) versions of VC++ projects.
- * New feature: elapsed time for the tests is printed by default.
- * New feature: comes with a TR1 tuple implementation such that Boost
- is no longer needed for Combine().
- * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
- * New feature: the Xcode project can now produce static gtest
- libraries in addition to a framework.
- * Compatibility fixes for Solaris, Cygwin, minGW, Windows Mobile,
- Symbian, gcc, and C++Builder.
- * Bug fixes and implementation clean-ups.
-
-Changes for 1.3.0:
-
- * New feature: death tests on Windows, Cygwin, and Mac.
- * New feature: ability to use Google Test assertions in other testing
- frameworks.
- * New feature: ability to run disabled test via
- --gtest_also_run_disabled_tests.
- * New feature: the --help flag for printing the usage.
- * New feature: access to Google Test flag values in user code.
- * New feature: a script that packs Google Test into one .h and one
- .cc file for easy deployment.
- * New feature: support for distributing test functions to multiple
- machines (requires support from the test runner).
- * Bug fixes and implementation clean-ups.
-
-Changes for 1.2.1:
-
- * Compatibility fixes for Linux IA-64 and IBM z/OS.
- * Added support for using Boost and other TR1 implementations.
- * Changes to the build scripts to support upcoming release of Google C++
- Mocking Framework.
- * Added Makefile to the distribution package.
- * Improved build instructions in README.
-
-Changes for 1.2.0:
-
- * New feature: value-parameterized tests.
- * New feature: the ASSERT/EXPECT_(NON)FATAL_FAILURE(_ON_ALL_THREADS)
- macros.
- * Changed the XML report format to match JUnit/Ant's.
- * Added tests to the Xcode project.
- * Added scons/SConscript for building with SCons.
- * Added src/gtest-all.cc for building Google Test from a single file.
- * Fixed compatibility with Solaris and z/OS.
- * Enabled running Python tests on systems with python 2.3 installed,
- e.g. Mac OS X 10.4.
- * Bug fixes.
-
-Changes for 1.1.0:
-
- * New feature: type-parameterized tests.
- * New feature: exception assertions.
- * New feature: printing elapsed time of tests.
- * Improved the robustness of death tests.
- * Added an Xcode project and samples.
- * Adjusted the output format on Windows to be understandable by Visual Studio.
- * Minor bug fixes.
-
-Changes for 1.0.1:
-
- * Added project files for Visual Studio 7.1.
- * Fixed issues with compiling on Mac OS X.
- * Fixed issues with compiling on Cygwin.
-
-Changes for 1.0.0:
-
- * Initial Open Source release of Google Test
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CMakeLists.txt
deleted file mode 100644
index 0fe26540b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CMakeLists.txt
+++ /dev/null
@@ -1,240 +0,0 @@
-########################################################################
-# CMake build script for Google Test.
-#
-# To run the tests for Google Test itself on Linux, use 'make test' or
-# ctest. You can select which tests to run using 'ctest -R regex'.
-# For more options, run 'ctest --help'.
-
-# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
-# make it prominent in the GUI.
-option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
-
-# When other libraries are using a shared version of runtime libraries,
-# Google Test also has to use one.
-option(
- gtest_force_shared_crt
- "Use shared (DLL) run-time lib even when Google Test is built as static lib."
- OFF)
-
-option(gtest_build_tests "Build all of gtest's own tests." OFF)
-
-option(gtest_build_samples "Build gtest's sample programs." OFF)
-
-option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
-
-# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
-include(cmake/hermetic_build.cmake OPTIONAL)
-
-if (COMMAND pre_project_set_up_hermetic_build)
- pre_project_set_up_hermetic_build()
-endif()
-
-########################################################################
-#
-# Project-wide settings
-
-# Name of the project.
-#
-# CMake files in this project can refer to the root source directory
-# as ${gtest_SOURCE_DIR} and to the root binary directory as
-# ${gtest_BINARY_DIR}.
-# Language "C" is required for find_package(Threads).
-project(gtest CXX C)
-cmake_minimum_required(VERSION 2.6.2)
-
-if (COMMAND set_up_hermetic_build)
- set_up_hermetic_build()
-endif()
-
-# Define helper functions and macros used by Google Test.
-include(cmake/internal_utils.cmake)
-
-config_compiler_and_linker() # Defined in internal_utils.cmake.
-
-# Where Google Test's .h files can be found.
-include_directories(
- ${gtest_SOURCE_DIR}/include
- ${gtest_SOURCE_DIR})
-
-# Where Google Test's libraries can be found.
-link_directories(${gtest_BINARY_DIR}/src)
-
-########################################################################
-#
-# Defines the gtest & gtest_main libraries. User tests should link
-# with one of them.
-
-# Google Test libraries. We build them using more strict warnings than what
-# are used for other targets, to ensure that gtest can be compiled by a user
-# aggressive about warnings.
-cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
-cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
-target_link_libraries(gtest_main gtest)
-
-########################################################################
-#
-# Samples on how to link user tests with gtest or gtest_main.
-#
-# They are not built by default. To build them, set the
-# gtest_build_samples option to ON. You can do it by running ccmake
-# or specifying the -Dbuild_gtest_samples=ON flag when running cmake.
-
-if (gtest_build_samples)
- cxx_executable(sample1_unittest samples gtest_main samples/sample1.cc)
- cxx_executable(sample2_unittest samples gtest_main samples/sample2.cc)
- cxx_executable(sample3_unittest samples gtest_main)
- cxx_executable(sample4_unittest samples gtest_main samples/sample4.cc)
- cxx_executable(sample5_unittest samples gtest_main samples/sample1.cc)
- cxx_executable(sample6_unittest samples gtest_main)
- cxx_executable(sample7_unittest samples gtest_main)
- cxx_executable(sample8_unittest samples gtest_main)
- cxx_executable(sample9_unittest samples gtest)
- cxx_executable(sample10_unittest samples gtest)
-endif()
-
-########################################################################
-#
-# Google Test's own tests.
-#
-# You can skip this section if you aren't interested in testing
-# Google Test itself.
-#
-# The tests are not built by default. To build them, set the
-# gtest_build_tests option to ON. You can do it by running ccmake
-# or specifying the -Dgtest_build_tests=ON flag when running cmake.
-
-if (gtest_build_tests)
- # This must be set in the root directory for the tests to be run by
- # 'make test' or ctest.
- enable_testing()
-
- ############################################################
- # C++ tests built with standard compiler flags.
-
- cxx_test(gtest-death-test_test gtest_main)
- cxx_test(gtest_environment_test gtest)
- cxx_test(gtest-filepath_test gtest_main)
- cxx_test(gtest-linked_ptr_test gtest_main)
- cxx_test(gtest-listener_test gtest_main)
- cxx_test(gtest_main_unittest gtest_main)
- cxx_test(gtest-message_test gtest_main)
- cxx_test(gtest_no_test_unittest gtest)
- cxx_test(gtest-options_test gtest_main)
- cxx_test(gtest-param-test_test gtest
- test/gtest-param-test2_test.cc)
- cxx_test(gtest-port_test gtest_main)
- cxx_test(gtest_pred_impl_unittest gtest_main)
- cxx_test(gtest-printers_test gtest_main)
- cxx_test(gtest_prod_test gtest_main
- test/production.cc)
- cxx_test(gtest_repeat_test gtest)
- cxx_test(gtest_sole_header_test gtest_main)
- cxx_test(gtest_stress_test gtest)
- cxx_test(gtest-test-part_test gtest_main)
- cxx_test(gtest_throw_on_failure_ex_test gtest)
- cxx_test(gtest-typed-test_test gtest_main
- test/gtest-typed-test2_test.cc)
- cxx_test(gtest_unittest gtest_main)
- cxx_test(gtest-unittest-api_test gtest)
-
- ############################################################
- # C++ tests built with non-standard compiler flags.
-
- cxx_library(gtest_no_exception "${cxx_no_exception}"
- src/gtest-all.cc)
- cxx_library(gtest_main_no_exception "${cxx_no_exception}"
- src/gtest-all.cc src/gtest_main.cc)
- cxx_library(gtest_main_no_rtti "${cxx_no_rtti}"
- src/gtest-all.cc src/gtest_main.cc)
-
- cxx_test_with_flags(gtest-death-test_ex_nocatch_test
- "${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0"
- gtest test/gtest-death-test_ex_test.cc)
- cxx_test_with_flags(gtest-death-test_ex_catch_test
- "${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"
- gtest test/gtest-death-test_ex_test.cc)
-
- cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
- gtest_main_no_rtti test/gtest_unittest.cc)
-
- cxx_shared_library(gtest_dll "${cxx_default}"
- src/gtest-all.cc src/gtest_main.cc)
-
- cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
- gtest_dll test/gtest_all_test.cc)
- set_target_properties(gtest_dll_test_
- PROPERTIES
- COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
-
- if (NOT MSVC OR NOT MSVC_VERSION EQUAL 1600)
- # The C++ Standard specifies tuple_element<int, class>.
- # Yet MSVC 10's <utility> declares tuple_element<size_t, class>.
- # That declaration conflicts with our own standard-conforming
- # tuple implementation. Therefore using our own tuple with
- # MSVC 10 doesn't compile.
- cxx_library(gtest_main_use_own_tuple "${cxx_use_own_tuple}"
- src/gtest-all.cc src/gtest_main.cc)
-
- cxx_test_with_flags(gtest-tuple_test "${cxx_use_own_tuple}"
- gtest_main_use_own_tuple test/gtest-tuple_test.cc)
-
- cxx_test_with_flags(gtest_use_own_tuple_test "${cxx_use_own_tuple}"
- gtest_main_use_own_tuple
- test/gtest-param-test_test.cc test/gtest-param-test2_test.cc)
- endif()
-
- ############################################################
- # Python tests.
-
- cxx_executable(gtest_break_on_failure_unittest_ test gtest)
- py_test(gtest_break_on_failure_unittest)
-
- cxx_executable_with_flags(
- gtest_catch_exceptions_no_ex_test_
- "${cxx_no_exception}"
- gtest_main_no_exception
- test/gtest_catch_exceptions_test_.cc)
- cxx_executable_with_flags(
- gtest_catch_exceptions_ex_test_
- "${cxx_exception}"
- gtest_main
- test/gtest_catch_exceptions_test_.cc)
- py_test(gtest_catch_exceptions_test)
-
- cxx_executable(gtest_color_test_ test gtest)
- py_test(gtest_color_test)
-
- cxx_executable(gtest_env_var_test_ test gtest)
- py_test(gtest_env_var_test)
-
- cxx_executable(gtest_filter_unittest_ test gtest)
- py_test(gtest_filter_unittest)
-
- cxx_executable(gtest_help_test_ test gtest_main)
- py_test(gtest_help_test)
-
- cxx_executable(gtest_list_tests_unittest_ test gtest)
- py_test(gtest_list_tests_unittest)
-
- cxx_executable(gtest_output_test_ test gtest)
- py_test(gtest_output_test)
-
- cxx_executable(gtest_shuffle_test_ test gtest)
- py_test(gtest_shuffle_test)
-
- cxx_executable(gtest_throw_on_failure_test_ test gtest_no_exception)
- set_target_properties(gtest_throw_on_failure_test_
- PROPERTIES
- COMPILE_FLAGS "${cxx_no_exception}")
- py_test(gtest_throw_on_failure_test)
-
- cxx_executable(gtest_uninitialized_test_ test gtest)
- py_test(gtest_uninitialized_test)
-
- cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
- cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
- py_test(gtest_xml_outfiles_test)
-
- cxx_executable(gtest_xml_output_unittest_ test gtest)
- py_test(gtest_xml_output_unittest)
-endif()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CONTRIBUTORS b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CONTRIBUTORS
deleted file mode 100644
index feae2fc04..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/CONTRIBUTORS
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file contains a list of people who've made non-trivial
-# contribution to the Google C++ Testing Framework project. People
-# who commit code to the project are encouraged to add their names
-# here. Please keep the list sorted by first names.
-
-Ajay Joshi <jaj@google.com>
-Balázs Dán <balazs.dan@gmail.com>
-Bharat Mediratta <bharat@menalto.com>
-Chandler Carruth <chandlerc@google.com>
-Chris Prince <cprince@google.com>
-Chris Taylor <taylorc@google.com>
-Dan Egnor <egnor@google.com>
-Eric Roman <eroman@chromium.org>
-Hady Zalek <hady.zalek@gmail.com>
-Jeffrey Yasskin <jyasskin@google.com>
-Jói Sigurðsson <joi@google.com>
-Keir Mierle <mierle@gmail.com>
-Keith Ray <keith.ray@gmail.com>
-Kenton Varda <kenton@google.com>
-Manuel Klimek <klimek@google.com>
-Markus Heule <markus.heule@gmail.com>
-Mika Raento <mikie@iki.fi>
-Miklós Fazekas <mfazekas@szemafor.com>
-Pasi Valminen <pasi.valminen@gmail.com>
-Patrick Hanna <phanna@google.com>
-Patrick Riley <pfr@google.com>
-Peter Kaminski <piotrk@google.com>
-Preston Jackson <preston.a.jackson@gmail.com>
-Rainer Klaffenboeck <rainer.klaffenboeck@dynatrace.com>
-Russ Cox <rsc@google.com>
-Russ Rufer <russ@pentad.com>
-Sean Mcafee <eefacm@gmail.com>
-Sigurður Ãsgeirsson <siggi@google.com>
-Tracy Bialik <tracy@pentad.com>
-Vadim Berman <vadimb@google.com>
-Vlad Losev <vladl@google.com>
-Zhanyong Wan <wan@google.com>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/COPYING b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/COPYING
deleted file mode 100644
index 1941a11f8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/COPYING
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright 2008, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.am b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.am
deleted file mode 100644
index cb350b75b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.am
+++ /dev/null
@@ -1,302 +0,0 @@
-# Automake file
-
-ACLOCAL_AMFLAGS = -I m4
-
-# Nonstandard package files for distribution
-EXTRA_DIST = \
- CHANGES \
- CONTRIBUTORS \
- include/gtest/gtest-param-test.h.pump \
- include/gtest/internal/gtest-param-util-generated.h.pump \
- include/gtest/internal/gtest-tuple.h.pump \
- include/gtest/internal/gtest-type-util.h.pump \
- make/Makefile \
- scripts/fuse_gtest_files.py \
- scripts/gen_gtest_pred_impl.py \
- scripts/pump.py \
- scripts/test/Makefile
-
-# gtest source files that we don't compile directly. They are
-# #included by gtest-all.cc.
-GTEST_SRC = \
- src/gtest-death-test.cc \
- src/gtest-filepath.cc \
- src/gtest-internal-inl.h \
- src/gtest-port.cc \
- src/gtest-printers.cc \
- src/gtest-test-part.cc \
- src/gtest-typed-test.cc \
- src/gtest.cc
-
-EXTRA_DIST += $(GTEST_SRC)
-
-# Sample files that we don't compile.
-EXTRA_DIST += \
- samples/prime_tables.h \
- samples/sample2_unittest.cc \
- samples/sample3_unittest.cc \
- samples/sample4_unittest.cc \
- samples/sample5_unittest.cc \
- samples/sample6_unittest.cc \
- samples/sample7_unittest.cc \
- samples/sample8_unittest.cc \
- samples/sample9_unittest.cc
-
-# C++ test files that we don't compile directly.
-EXTRA_DIST += \
- test/gtest-death-test_ex_test.cc \
- test/gtest-death-test_test.cc \
- test/gtest-filepath_test.cc \
- test/gtest-linked_ptr_test.cc \
- test/gtest-listener_test.cc \
- test/gtest-message_test.cc \
- test/gtest-options_test.cc \
- test/gtest-param-test2_test.cc \
- test/gtest-param-test2_test.cc \
- test/gtest-param-test_test.cc \
- test/gtest-param-test_test.cc \
- test/gtest-param-test_test.h \
- test/gtest-port_test.cc \
- test/gtest-printers_test.cc \
- test/gtest-test-part_test.cc \
- test/gtest-tuple_test.cc \
- test/gtest-typed-test2_test.cc \
- test/gtest-typed-test_test.cc \
- test/gtest-typed-test_test.h \
- test/gtest-unittest-api_test.cc \
- test/gtest_break_on_failure_unittest_.cc \
- test/gtest_catch_exceptions_test_.cc \
- test/gtest_color_test_.cc \
- test/gtest_env_var_test_.cc \
- test/gtest_environment_test.cc \
- test/gtest_filter_unittest_.cc \
- test/gtest_help_test_.cc \
- test/gtest_list_tests_unittest_.cc \
- test/gtest_main_unittest.cc \
- test/gtest_no_test_unittest.cc \
- test/gtest_output_test_.cc \
- test/gtest_pred_impl_unittest.cc \
- test/gtest_prod_test.cc \
- test/gtest_repeat_test.cc \
- test/gtest_shuffle_test_.cc \
- test/gtest_sole_header_test.cc \
- test/gtest_stress_test.cc \
- test/gtest_throw_on_failure_ex_test.cc \
- test/gtest_throw_on_failure_test_.cc \
- test/gtest_uninitialized_test_.cc \
- test/gtest_unittest.cc \
- test/gtest_unittest.cc \
- test/gtest_xml_outfile1_test_.cc \
- test/gtest_xml_outfile2_test_.cc \
- test/gtest_xml_output_unittest_.cc \
- test/production.cc \
- test/production.h
-
-# Python tests that we don't run.
-EXTRA_DIST += \
- test/gtest_break_on_failure_unittest.py \
- test/gtest_catch_exceptions_test.py \
- test/gtest_color_test.py \
- test/gtest_env_var_test.py \
- test/gtest_filter_unittest.py \
- test/gtest_help_test.py \
- test/gtest_list_tests_unittest.py \
- test/gtest_output_test.py \
- test/gtest_output_test_golden_lin.txt \
- test/gtest_shuffle_test.py \
- test/gtest_test_utils.py \
- test/gtest_throw_on_failure_test.py \
- test/gtest_uninitialized_test.py \
- test/gtest_xml_outfiles_test.py \
- test/gtest_xml_output_unittest.py \
- test/gtest_xml_test_utils.py
-
-# CMake script
-EXTRA_DIST += \
- CMakeLists.txt \
- cmake/internal_utils.cmake
-
-# MSVC project files
-EXTRA_DIST += \
- msvc/gtest-md.sln \
- msvc/gtest-md.vcproj \
- msvc/gtest.sln \
- msvc/gtest.vcproj \
- msvc/gtest_main-md.vcproj \
- msvc/gtest_main.vcproj \
- msvc/gtest_prod_test-md.vcproj \
- msvc/gtest_prod_test.vcproj \
- msvc/gtest_unittest-md.vcproj \
- msvc/gtest_unittest.vcproj
-
-# xcode project files
-EXTRA_DIST += \
- xcode/Config/DebugProject.xcconfig \
- xcode/Config/FrameworkTarget.xcconfig \
- xcode/Config/General.xcconfig \
- xcode/Config/ReleaseProject.xcconfig \
- xcode/Config/StaticLibraryTarget.xcconfig \
- xcode/Config/TestTarget.xcconfig \
- xcode/Resources/Info.plist \
- xcode/Scripts/runtests.sh \
- xcode/Scripts/versiongenerate.py \
- xcode/gtest.xcodeproj/project.pbxproj
-
-# xcode sample files
-EXTRA_DIST += \
- xcode/Samples/FrameworkSample/Info.plist \
- xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj \
- xcode/Samples/FrameworkSample/runtests.sh \
- xcode/Samples/FrameworkSample/widget.cc \
- xcode/Samples/FrameworkSample/widget.h \
- xcode/Samples/FrameworkSample/widget_test.cc
-
-# C++Builder project files
-EXTRA_DIST += \
- codegear/gtest.cbproj \
- codegear/gtest.groupproj \
- codegear/gtest_all.cc \
- codegear/gtest_link.cc \
- codegear/gtest_main.cbproj \
- codegear/gtest_unittest.cbproj
-
-# Distribute and install M4 macro
-m4datadir = $(datadir)/aclocal
-m4data_DATA = m4/gtest.m4
-EXTRA_DIST += $(m4data_DATA)
-
-# We define the global AM_CPPFLAGS as everything we compile includes from these
-# directories.
-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
-
-# Modifies compiler and linker flags for pthreads compatibility.
-if HAVE_PTHREADS
- AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
- AM_LIBS = @PTHREAD_LIBS@
-else
- AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
-endif
-
-# Build rules for libraries.
-lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
-
-lib_libgtest_la_SOURCES = src/gtest-all.cc
-
-pkginclude_HEADERS = \
- include/gtest/gtest-death-test.h \
- include/gtest/gtest-message.h \
- include/gtest/gtest-param-test.h \
- include/gtest/gtest-printers.h \
- include/gtest/gtest-spi.h \
- include/gtest/gtest-test-part.h \
- include/gtest/gtest-typed-test.h \
- include/gtest/gtest.h \
- include/gtest/gtest_pred_impl.h \
- include/gtest/gtest_prod.h
-
-pkginclude_internaldir = $(pkgincludedir)/internal
-pkginclude_internal_HEADERS = \
- include/gtest/internal/gtest-death-test-internal.h \
- include/gtest/internal/gtest-filepath.h \
- include/gtest/internal/gtest-internal.h \
- include/gtest/internal/gtest-linked_ptr.h \
- include/gtest/internal/gtest-param-util-generated.h \
- include/gtest/internal/gtest-param-util.h \
- include/gtest/internal/gtest-port.h \
- include/gtest/internal/gtest-string.h \
- include/gtest/internal/gtest-tuple.h \
- include/gtest/internal/gtest-type-util.h
-
-lib_libgtest_main_la_SOURCES = src/gtest_main.cc
-lib_libgtest_main_la_LIBADD = lib/libgtest.la
-
-# Bulid rules for samples and tests. Automake's naming for some of
-# these variables isn't terribly obvious, so this is a brief
-# reference:
-#
-# TESTS -- Programs run automatically by "make check"
-# check_PROGRAMS -- Programs built by "make check" but not necessarily run
-
-noinst_LTLIBRARIES = samples/libsamples.la
-
-samples_libsamples_la_SOURCES = \
- samples/sample1.cc \
- samples/sample1.h \
- samples/sample2.cc \
- samples/sample2.h \
- samples/sample3-inl.h \
- samples/sample4.cc \
- samples/sample4.h
-
-TESTS=
-TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
- GTEST_BUILD_DIR="$(top_builddir)/test"
-check_PROGRAMS=
-
-# A simple sample on using gtest.
-TESTS += samples/sample1_unittest
-check_PROGRAMS += samples/sample1_unittest
-samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
-samples_sample1_unittest_LDADD = lib/libgtest_main.la \
- lib/libgtest.la \
- samples/libsamples.la
-
-# Another sample. It also verifies that libgtest works.
-TESTS += samples/sample10_unittest
-check_PROGRAMS += samples/sample10_unittest
-samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
-samples_sample10_unittest_LDADD = lib/libgtest.la
-
-# This tests most constructs of gtest and verifies that libgtest_main
-# and libgtest work.
-TESTS += test/gtest_all_test
-check_PROGRAMS += test/gtest_all_test
-test_gtest_all_test_SOURCES = test/gtest_all_test.cc
-test_gtest_all_test_LDADD = lib/libgtest_main.la \
- lib/libgtest.la
-
-# Tests that fused gtest files compile and work.
-FUSED_GTEST_SRC = \
- fused-src/gtest/gtest-all.cc \
- fused-src/gtest/gtest.h \
- fused-src/gtest/gtest_main.cc
-
-TESTS += test/fused_gtest_test
-check_PROGRAMS += test/fused_gtest_test
-test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
- samples/sample1.cc samples/sample1_unittest.cc
-test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
-
-# Build rules for putting fused Google Test files into the distribution
-# package. The user can also create those files by manually running
-# scripts/fuse_gtest_files.py.
-$(test_fused_gtest_test_SOURCES): fused-gtest
-
-fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
- $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
- scripts/fuse_gtest_files.py
- mkdir -p "$(srcdir)/fused-src"
- chmod -R u+w "$(srcdir)/fused-src"
- rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
- rm -f "$(srcdir)/fused-src/gtest/gtest.h"
- "$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
- cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
-
-maintainer-clean-local:
- rm -rf "$(srcdir)/fused-src"
-
-# Death tests may produce core dumps in the build directory. In case
-# this happens, clean them to keep distcleancheck happy.
-CLEANFILES = core
-
-# Disables 'make install' as installing a compiled version of Google
-# Test can lead to undefined behavior due to violation of the
-# One-Definition Rule.
-
-install-exec-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
- false
-
-install-data-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
- false
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.in b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.in
deleted file mode 100644
index ed888925e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/Makefile.in
+++ /dev/null
@@ -1,1329 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Automake file
-
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-TESTS = samples/sample1_unittest$(EXEEXT) \
- samples/sample10_unittest$(EXEEXT) \
- test/gtest_all_test$(EXEEXT) test/fused_gtest_test$(EXEEXT)
-check_PROGRAMS = samples/sample1_unittest$(EXEEXT) \
- samples/sample10_unittest$(EXEEXT) \
- test/gtest_all_test$(EXEEXT) test/fused_gtest_test$(EXEEXT)
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \
- $(pkginclude_internal_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/build-aux/config.h.in \
- $(top_srcdir)/configure $(top_srcdir)/scripts/gtest-config.in \
- COPYING build-aux/config.guess build-aux/config.sub \
- build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
- build-aux/missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/build-aux/config.h
-CONFIG_CLEAN_FILES = scripts/gtest-config
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(m4datadir)" \
- "$(DESTDIR)$(pkgincludedir)" \
- "$(DESTDIR)$(pkginclude_internaldir)"
-LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-lib_libgtest_la_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_lib_libgtest_la_OBJECTS = src/gtest-all.lo
-lib_libgtest_la_OBJECTS = $(am_lib_libgtest_la_OBJECTS)
-lib_libgtest_main_la_DEPENDENCIES = lib/libgtest.la
-am_lib_libgtest_main_la_OBJECTS = src/gtest_main.lo
-lib_libgtest_main_la_OBJECTS = $(am_lib_libgtest_main_la_OBJECTS)
-samples_libsamples_la_LIBADD =
-am_samples_libsamples_la_OBJECTS = samples/sample1.lo \
- samples/sample2.lo samples/sample4.lo
-samples_libsamples_la_OBJECTS = $(am_samples_libsamples_la_OBJECTS)
-am_samples_sample10_unittest_OBJECTS = \
- samples/sample10_unittest.$(OBJEXT)
-samples_sample10_unittest_OBJECTS = \
- $(am_samples_sample10_unittest_OBJECTS)
-samples_sample10_unittest_DEPENDENCIES = lib/libgtest.la
-am_samples_sample1_unittest_OBJECTS = \
- samples/sample1_unittest.$(OBJEXT)
-samples_sample1_unittest_OBJECTS = \
- $(am_samples_sample1_unittest_OBJECTS)
-samples_sample1_unittest_DEPENDENCIES = lib/libgtest_main.la \
- lib/libgtest.la samples/libsamples.la
-am__objects_1 = \
- fused-src/gtest/test_fused_gtest_test-gtest-all.$(OBJEXT) \
- fused-src/gtest/test_fused_gtest_test-gtest_main.$(OBJEXT)
-am_test_fused_gtest_test_OBJECTS = $(am__objects_1) \
- samples/test_fused_gtest_test-sample1.$(OBJEXT) \
- samples/test_fused_gtest_test-sample1_unittest.$(OBJEXT)
-test_fused_gtest_test_OBJECTS = $(am_test_fused_gtest_test_OBJECTS)
-test_fused_gtest_test_LDADD = $(LDADD)
-am_test_gtest_all_test_OBJECTS = test/gtest_all_test.$(OBJEXT)
-test_gtest_all_test_OBJECTS = $(am_test_gtest_all_test_OBJECTS)
-test_gtest_all_test_DEPENDENCIES = lib/libgtest_main.la \
- lib/libgtest.la
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/build-aux
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(lib_libgtest_la_SOURCES) $(lib_libgtest_main_la_SOURCES) \
- $(samples_libsamples_la_SOURCES) \
- $(samples_sample10_unittest_SOURCES) \
- $(samples_sample1_unittest_SOURCES) \
- $(test_fused_gtest_test_SOURCES) \
- $(test_gtest_all_test_SOURCES)
-DIST_SOURCES = $(lib_libgtest_la_SOURCES) \
- $(lib_libgtest_main_la_SOURCES) \
- $(samples_libsamples_la_SOURCES) \
- $(samples_sample10_unittest_SOURCES) \
- $(samples_sample1_unittest_SOURCES) \
- $(test_fused_gtest_test_SOURCES) \
- $(test_gtest_all_test_SOURCES)
-DATA = $(m4data_DATA)
-HEADERS = $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-acx_pthread_config = @acx_pthread_config@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-ACLOCAL_AMFLAGS = -I m4
-
-# Nonstandard package files for distribution
-
-# Sample files that we don't compile.
-
-# C++ test files that we don't compile directly.
-
-# Python tests that we don't run.
-
-# CMake script
-
-# MSVC project files
-
-# xcode project files
-
-# xcode sample files
-
-# C++Builder project files
-EXTRA_DIST = CHANGES CONTRIBUTORS \
- include/gtest/gtest-param-test.h.pump \
- include/gtest/internal/gtest-param-util-generated.h.pump \
- include/gtest/internal/gtest-tuple.h.pump \
- include/gtest/internal/gtest-type-util.h.pump make/Makefile \
- scripts/fuse_gtest_files.py scripts/gen_gtest_pred_impl.py \
- scripts/pump.py scripts/test/Makefile $(GTEST_SRC) \
- samples/prime_tables.h samples/sample2_unittest.cc \
- samples/sample3_unittest.cc samples/sample4_unittest.cc \
- samples/sample5_unittest.cc samples/sample6_unittest.cc \
- samples/sample7_unittest.cc samples/sample8_unittest.cc \
- samples/sample9_unittest.cc test/gtest-death-test_ex_test.cc \
- test/gtest-death-test_test.cc test/gtest-filepath_test.cc \
- test/gtest-linked_ptr_test.cc test/gtest-listener_test.cc \
- test/gtest-message_test.cc test/gtest-options_test.cc \
- test/gtest-param-test2_test.cc test/gtest-param-test2_test.cc \
- test/gtest-param-test_test.cc test/gtest-param-test_test.cc \
- test/gtest-param-test_test.h test/gtest-port_test.cc \
- test/gtest-printers_test.cc test/gtest-test-part_test.cc \
- test/gtest-tuple_test.cc test/gtest-typed-test2_test.cc \
- test/gtest-typed-test_test.cc test/gtest-typed-test_test.h \
- test/gtest-unittest-api_test.cc \
- test/gtest_break_on_failure_unittest_.cc \
- test/gtest_catch_exceptions_test_.cc test/gtest_color_test_.cc \
- test/gtest_env_var_test_.cc test/gtest_environment_test.cc \
- test/gtest_filter_unittest_.cc test/gtest_help_test_.cc \
- test/gtest_list_tests_unittest_.cc test/gtest_main_unittest.cc \
- test/gtest_no_test_unittest.cc test/gtest_output_test_.cc \
- test/gtest_pred_impl_unittest.cc test/gtest_prod_test.cc \
- test/gtest_repeat_test.cc test/gtest_shuffle_test_.cc \
- test/gtest_sole_header_test.cc test/gtest_stress_test.cc \
- test/gtest_throw_on_failure_ex_test.cc \
- test/gtest_throw_on_failure_test_.cc \
- test/gtest_uninitialized_test_.cc test/gtest_unittest.cc \
- test/gtest_unittest.cc test/gtest_xml_outfile1_test_.cc \
- test/gtest_xml_outfile2_test_.cc \
- test/gtest_xml_output_unittest_.cc test/production.cc \
- test/production.h test/gtest_break_on_failure_unittest.py \
- test/gtest_catch_exceptions_test.py test/gtest_color_test.py \
- test/gtest_env_var_test.py test/gtest_filter_unittest.py \
- test/gtest_help_test.py test/gtest_list_tests_unittest.py \
- test/gtest_output_test.py \
- test/gtest_output_test_golden_lin.txt \
- test/gtest_shuffle_test.py test/gtest_test_utils.py \
- test/gtest_throw_on_failure_test.py \
- test/gtest_uninitialized_test.py \
- test/gtest_xml_outfiles_test.py \
- test/gtest_xml_output_unittest.py test/gtest_xml_test_utils.py \
- CMakeLists.txt cmake/internal_utils.cmake msvc/gtest-md.sln \
- msvc/gtest-md.vcproj msvc/gtest.sln msvc/gtest.vcproj \
- msvc/gtest_main-md.vcproj msvc/gtest_main.vcproj \
- msvc/gtest_prod_test-md.vcproj msvc/gtest_prod_test.vcproj \
- msvc/gtest_unittest-md.vcproj msvc/gtest_unittest.vcproj \
- xcode/Config/DebugProject.xcconfig \
- xcode/Config/FrameworkTarget.xcconfig \
- xcode/Config/General.xcconfig \
- xcode/Config/ReleaseProject.xcconfig \
- xcode/Config/StaticLibraryTarget.xcconfig \
- xcode/Config/TestTarget.xcconfig xcode/Resources/Info.plist \
- xcode/Scripts/runtests.sh xcode/Scripts/versiongenerate.py \
- xcode/gtest.xcodeproj/project.pbxproj \
- xcode/Samples/FrameworkSample/Info.plist \
- xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj \
- xcode/Samples/FrameworkSample/runtests.sh \
- xcode/Samples/FrameworkSample/widget.cc \
- xcode/Samples/FrameworkSample/widget.h \
- xcode/Samples/FrameworkSample/widget_test.cc \
- codegear/gtest.cbproj codegear/gtest.groupproj \
- codegear/gtest_all.cc codegear/gtest_link.cc \
- codegear/gtest_main.cbproj codegear/gtest_unittest.cbproj \
- $(m4data_DATA)
-
-# gtest source files that we don't compile directly. They are
-# #included by gtest-all.cc.
-GTEST_SRC = \
- src/gtest-death-test.cc \
- src/gtest-filepath.cc \
- src/gtest-internal-inl.h \
- src/gtest-port.cc \
- src/gtest-printers.cc \
- src/gtest-test-part.cc \
- src/gtest-typed-test.cc \
- src/gtest.cc
-
-
-# Distribute and install M4 macro
-m4datadir = $(datadir)/aclocal
-m4data_DATA = m4/gtest.m4
-
-# We define the global AM_CPPFLAGS as everything we compile includes from these
-# directories.
-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
-@HAVE_PTHREADS_FALSE@AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
-
-# Modifies compiler and linker flags for pthreads compatibility.
-@HAVE_PTHREADS_TRUE@AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
-@HAVE_PTHREADS_TRUE@AM_LIBS = @PTHREAD_LIBS@
-
-# Build rules for libraries.
-lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
-lib_libgtest_la_SOURCES = src/gtest-all.cc
-pkginclude_HEADERS = \
- include/gtest/gtest-death-test.h \
- include/gtest/gtest-message.h \
- include/gtest/gtest-param-test.h \
- include/gtest/gtest-printers.h \
- include/gtest/gtest-spi.h \
- include/gtest/gtest-test-part.h \
- include/gtest/gtest-typed-test.h \
- include/gtest/gtest.h \
- include/gtest/gtest_pred_impl.h \
- include/gtest/gtest_prod.h
-
-pkginclude_internaldir = $(pkgincludedir)/internal
-pkginclude_internal_HEADERS = \
- include/gtest/internal/gtest-death-test-internal.h \
- include/gtest/internal/gtest-filepath.h \
- include/gtest/internal/gtest-internal.h \
- include/gtest/internal/gtest-linked_ptr.h \
- include/gtest/internal/gtest-param-util-generated.h \
- include/gtest/internal/gtest-param-util.h \
- include/gtest/internal/gtest-port.h \
- include/gtest/internal/gtest-string.h \
- include/gtest/internal/gtest-tuple.h \
- include/gtest/internal/gtest-type-util.h
-
-lib_libgtest_main_la_SOURCES = src/gtest_main.cc
-lib_libgtest_main_la_LIBADD = lib/libgtest.la
-
-# Bulid rules for samples and tests. Automake's naming for some of
-# these variables isn't terribly obvious, so this is a brief
-# reference:
-#
-# TESTS -- Programs run automatically by "make check"
-# check_PROGRAMS -- Programs built by "make check" but not necessarily run
-noinst_LTLIBRARIES = samples/libsamples.la
-samples_libsamples_la_SOURCES = \
- samples/sample1.cc \
- samples/sample1.h \
- samples/sample2.cc \
- samples/sample2.h \
- samples/sample3-inl.h \
- samples/sample4.cc \
- samples/sample4.h
-
-TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
- GTEST_BUILD_DIR="$(top_builddir)/test"
-
-samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
-samples_sample1_unittest_LDADD = lib/libgtest_main.la \
- lib/libgtest.la \
- samples/libsamples.la
-
-samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
-samples_sample10_unittest_LDADD = lib/libgtest.la
-test_gtest_all_test_SOURCES = test/gtest_all_test.cc
-test_gtest_all_test_LDADD = lib/libgtest_main.la \
- lib/libgtest.la
-
-
-# Tests that fused gtest files compile and work.
-FUSED_GTEST_SRC = \
- fused-src/gtest/gtest-all.cc \
- fused-src/gtest/gtest.h \
- fused-src/gtest/gtest_main.cc
-
-test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
- samples/sample1.cc samples/sample1_unittest.cc
-
-test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
-
-# Death tests may produce core dumps in the build directory. In case
-# this happens, clean them to keep distcleancheck happy.
-CLEANFILES = core
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cc .lo .o .obj
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-build-aux/config.h: build-aux/stamp-h1
- @if test ! -f $@; then \
- rm -f build-aux/stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) build-aux/stamp-h1; \
- else :; fi
-
-build-aux/stamp-h1: $(top_srcdir)/build-aux/config.h.in $(top_builddir)/config.status
- @rm -f build-aux/stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status build-aux/config.h
-$(top_srcdir)/build-aux/config.h.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f build-aux/stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f build-aux/config.h build-aux/stamp-h1
-scripts/gtest-config: $(top_builddir)/config.status $(top_srcdir)/scripts/gtest-config.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- }
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-src/$(am__dirstamp):
- @$(MKDIR_P) src
- @: > src/$(am__dirstamp)
-src/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) src/$(DEPDIR)
- @: > src/$(DEPDIR)/$(am__dirstamp)
-src/gtest-all.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
-lib/$(am__dirstamp):
- @$(MKDIR_P) lib
- @: > lib/$(am__dirstamp)
-lib/libgtest.la: $(lib_libgtest_la_OBJECTS) $(lib_libgtest_la_DEPENDENCIES) lib/$(am__dirstamp)
- $(CXXLINK) -rpath $(libdir) $(lib_libgtest_la_OBJECTS) $(lib_libgtest_la_LIBADD) $(LIBS)
-src/gtest_main.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
-lib/libgtest_main.la: $(lib_libgtest_main_la_OBJECTS) $(lib_libgtest_main_la_DEPENDENCIES) lib/$(am__dirstamp)
- $(CXXLINK) -rpath $(libdir) $(lib_libgtest_main_la_OBJECTS) $(lib_libgtest_main_la_LIBADD) $(LIBS)
-samples/$(am__dirstamp):
- @$(MKDIR_P) samples
- @: > samples/$(am__dirstamp)
-samples/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) samples/$(DEPDIR)
- @: > samples/$(DEPDIR)/$(am__dirstamp)
-samples/sample1.lo: samples/$(am__dirstamp) \
- samples/$(DEPDIR)/$(am__dirstamp)
-samples/sample2.lo: samples/$(am__dirstamp) \
- samples/$(DEPDIR)/$(am__dirstamp)
-samples/sample4.lo: samples/$(am__dirstamp) \
- samples/$(DEPDIR)/$(am__dirstamp)
-samples/libsamples.la: $(samples_libsamples_la_OBJECTS) $(samples_libsamples_la_DEPENDENCIES) samples/$(am__dirstamp)
- $(CXXLINK) $(samples_libsamples_la_OBJECTS) $(samples_libsamples_la_LIBADD) $(LIBS)
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-samples/sample10_unittest.$(OBJEXT): samples/$(am__dirstamp) \
- samples/$(DEPDIR)/$(am__dirstamp)
-samples/sample10_unittest$(EXEEXT): $(samples_sample10_unittest_OBJECTS) $(samples_sample10_unittest_DEPENDENCIES) samples/$(am__dirstamp)
- @rm -f samples/sample10_unittest$(EXEEXT)
- $(CXXLINK) $(samples_sample10_unittest_OBJECTS) $(samples_sample10_unittest_LDADD) $(LIBS)
-samples/sample1_unittest.$(OBJEXT): samples/$(am__dirstamp) \
- samples/$(DEPDIR)/$(am__dirstamp)
-samples/sample1_unittest$(EXEEXT): $(samples_sample1_unittest_OBJECTS) $(samples_sample1_unittest_DEPENDENCIES) samples/$(am__dirstamp)
- @rm -f samples/sample1_unittest$(EXEEXT)
- $(CXXLINK) $(samples_sample1_unittest_OBJECTS) $(samples_sample1_unittest_LDADD) $(LIBS)
-fused-src/gtest/$(am__dirstamp):
- @$(MKDIR_P) fused-src/gtest
- @: > fused-src/gtest/$(am__dirstamp)
-fused-src/gtest/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) fused-src/gtest/$(DEPDIR)
- @: > fused-src/gtest/$(DEPDIR)/$(am__dirstamp)
-fused-src/gtest/test_fused_gtest_test-gtest-all.$(OBJEXT): \
- fused-src/gtest/$(am__dirstamp) \
- fused-src/gtest/$(DEPDIR)/$(am__dirstamp)
-fused-src/gtest/test_fused_gtest_test-gtest_main.$(OBJEXT): \
- fused-src/gtest/$(am__dirstamp) \
- fused-src/gtest/$(DEPDIR)/$(am__dirstamp)
-samples/test_fused_gtest_test-sample1.$(OBJEXT): \
- samples/$(am__dirstamp) samples/$(DEPDIR)/$(am__dirstamp)
-samples/test_fused_gtest_test-sample1_unittest.$(OBJEXT): \
- samples/$(am__dirstamp) samples/$(DEPDIR)/$(am__dirstamp)
-test/$(am__dirstamp):
- @$(MKDIR_P) test
- @: > test/$(am__dirstamp)
-test/fused_gtest_test$(EXEEXT): $(test_fused_gtest_test_OBJECTS) $(test_fused_gtest_test_DEPENDENCIES) test/$(am__dirstamp)
- @rm -f test/fused_gtest_test$(EXEEXT)
- $(CXXLINK) $(test_fused_gtest_test_OBJECTS) $(test_fused_gtest_test_LDADD) $(LIBS)
-test/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) test/$(DEPDIR)
- @: > test/$(DEPDIR)/$(am__dirstamp)
-test/gtest_all_test.$(OBJEXT): test/$(am__dirstamp) \
- test/$(DEPDIR)/$(am__dirstamp)
-test/gtest_all_test$(EXEEXT): $(test_gtest_all_test_OBJECTS) $(test_gtest_all_test_DEPENDENCIES) test/$(am__dirstamp)
- @rm -f test/gtest_all_test$(EXEEXT)
- $(CXXLINK) $(test_gtest_all_test_OBJECTS) $(test_gtest_all_test_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
- -rm -f fused-src/gtest/test_fused_gtest_test-gtest-all.$(OBJEXT)
- -rm -f fused-src/gtest/test_fused_gtest_test-gtest_main.$(OBJEXT)
- -rm -f samples/sample1.$(OBJEXT)
- -rm -f samples/sample1.lo
- -rm -f samples/sample10_unittest.$(OBJEXT)
- -rm -f samples/sample1_unittest.$(OBJEXT)
- -rm -f samples/sample2.$(OBJEXT)
- -rm -f samples/sample2.lo
- -rm -f samples/sample4.$(OBJEXT)
- -rm -f samples/sample4.lo
- -rm -f samples/test_fused_gtest_test-sample1.$(OBJEXT)
- -rm -f samples/test_fused_gtest_test-sample1_unittest.$(OBJEXT)
- -rm -f src/gtest-all.$(OBJEXT)
- -rm -f src/gtest-all.lo
- -rm -f src/gtest_main.$(OBJEXT)
- -rm -f src/gtest_main.lo
- -rm -f test/gtest_all_test.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample1.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample10_unittest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample1_unittest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gtest-all.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gtest_main.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gtest_all_test.Po@am__quote@
-
-.cc.o:
-@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cc.obj:
-@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cc.lo:
-@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-fused-src/gtest/test_fused_gtest_test-gtest-all.o: fused-src/gtest/gtest-all.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/gtest/test_fused_gtest_test-gtest-all.o -MD -MP -MF fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Tpo -c -o fused-src/gtest/test_fused_gtest_test-gtest-all.o `test -f 'fused-src/gtest/gtest-all.cc' || echo '$(srcdir)/'`fused-src/gtest/gtest-all.cc
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Tpo fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gtest/gtest-all.cc' object='fused-src/gtest/test_fused_gtest_test-gtest-all.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/gtest/test_fused_gtest_test-gtest-all.o `test -f 'fused-src/gtest/gtest-all.cc' || echo '$(srcdir)/'`fused-src/gtest/gtest-all.cc
-
-fused-src/gtest/test_fused_gtest_test-gtest-all.obj: fused-src/gtest/gtest-all.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/gtest/test_fused_gtest_test-gtest-all.obj -MD -MP -MF fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Tpo -c -o fused-src/gtest/test_fused_gtest_test-gtest-all.obj `if test -f 'fused-src/gtest/gtest-all.cc'; then $(CYGPATH_W) 'fused-src/gtest/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gtest/gtest-all.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Tpo fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gtest/gtest-all.cc' object='fused-src/gtest/test_fused_gtest_test-gtest-all.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/gtest/test_fused_gtest_test-gtest-all.obj `if test -f 'fused-src/gtest/gtest-all.cc'; then $(CYGPATH_W) 'fused-src/gtest/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gtest/gtest-all.cc'; fi`
-
-fused-src/gtest/test_fused_gtest_test-gtest_main.o: fused-src/gtest/gtest_main.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/gtest/test_fused_gtest_test-gtest_main.o -MD -MP -MF fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Tpo -c -o fused-src/gtest/test_fused_gtest_test-gtest_main.o `test -f 'fused-src/gtest/gtest_main.cc' || echo '$(srcdir)/'`fused-src/gtest/gtest_main.cc
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Tpo fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gtest/gtest_main.cc' object='fused-src/gtest/test_fused_gtest_test-gtest_main.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/gtest/test_fused_gtest_test-gtest_main.o `test -f 'fused-src/gtest/gtest_main.cc' || echo '$(srcdir)/'`fused-src/gtest/gtest_main.cc
-
-fused-src/gtest/test_fused_gtest_test-gtest_main.obj: fused-src/gtest/gtest_main.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fused-src/gtest/test_fused_gtest_test-gtest_main.obj -MD -MP -MF fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Tpo -c -o fused-src/gtest/test_fused_gtest_test-gtest_main.obj `if test -f 'fused-src/gtest/gtest_main.cc'; then $(CYGPATH_W) 'fused-src/gtest/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gtest/gtest_main.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Tpo fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fused-src/gtest/gtest_main.cc' object='fused-src/gtest/test_fused_gtest_test-gtest_main.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/gtest/test_fused_gtest_test-gtest_main.obj `if test -f 'fused-src/gtest/gtest_main.cc'; then $(CYGPATH_W) 'fused-src/gtest/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gtest/gtest_main.cc'; fi`
-
-samples/test_fused_gtest_test-sample1.o: samples/sample1.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT samples/test_fused_gtest_test-sample1.o -MD -MP -MF samples/$(DEPDIR)/test_fused_gtest_test-sample1.Tpo -c -o samples/test_fused_gtest_test-sample1.o `test -f 'samples/sample1.cc' || echo '$(srcdir)/'`samples/sample1.cc
-@am__fastdepCXX_TRUE@ $(am__mv) samples/$(DEPDIR)/test_fused_gtest_test-sample1.Tpo samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='samples/sample1.cc' object='samples/test_fused_gtest_test-sample1.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o samples/test_fused_gtest_test-sample1.o `test -f 'samples/sample1.cc' || echo '$(srcdir)/'`samples/sample1.cc
-
-samples/test_fused_gtest_test-sample1.obj: samples/sample1.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT samples/test_fused_gtest_test-sample1.obj -MD -MP -MF samples/$(DEPDIR)/test_fused_gtest_test-sample1.Tpo -c -o samples/test_fused_gtest_test-sample1.obj `if test -f 'samples/sample1.cc'; then $(CYGPATH_W) 'samples/sample1.cc'; else $(CYGPATH_W) '$(srcdir)/samples/sample1.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) samples/$(DEPDIR)/test_fused_gtest_test-sample1.Tpo samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='samples/sample1.cc' object='samples/test_fused_gtest_test-sample1.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o samples/test_fused_gtest_test-sample1.obj `if test -f 'samples/sample1.cc'; then $(CYGPATH_W) 'samples/sample1.cc'; else $(CYGPATH_W) '$(srcdir)/samples/sample1.cc'; fi`
-
-samples/test_fused_gtest_test-sample1_unittest.o: samples/sample1_unittest.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT samples/test_fused_gtest_test-sample1_unittest.o -MD -MP -MF samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Tpo -c -o samples/test_fused_gtest_test-sample1_unittest.o `test -f 'samples/sample1_unittest.cc' || echo '$(srcdir)/'`samples/sample1_unittest.cc
-@am__fastdepCXX_TRUE@ $(am__mv) samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Tpo samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='samples/sample1_unittest.cc' object='samples/test_fused_gtest_test-sample1_unittest.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o samples/test_fused_gtest_test-sample1_unittest.o `test -f 'samples/sample1_unittest.cc' || echo '$(srcdir)/'`samples/sample1_unittest.cc
-
-samples/test_fused_gtest_test-sample1_unittest.obj: samples/sample1_unittest.cc
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT samples/test_fused_gtest_test-sample1_unittest.obj -MD -MP -MF samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Tpo -c -o samples/test_fused_gtest_test-sample1_unittest.obj `if test -f 'samples/sample1_unittest.cc'; then $(CYGPATH_W) 'samples/sample1_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/samples/sample1_unittest.cc'; fi`
-@am__fastdepCXX_TRUE@ $(am__mv) samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Tpo samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='samples/sample1_unittest.cc' object='samples/test_fused_gtest_test-sample1_unittest.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_fused_gtest_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o samples/test_fused_gtest_test-sample1_unittest.obj `if test -f 'samples/sample1_unittest.cc'; then $(CYGPATH_W) 'samples/sample1_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/samples/sample1_unittest.cc'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
- -rm -rf lib/.libs lib/_libs
- -rm -rf samples/.libs samples/_libs
- -rm -rf src/.libs src/_libs
- -rm -rf test/.libs test/_libs
-
-distclean-libtool:
- -rm -f libtool config.lt
-install-m4dataDATA: $(m4data_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
- @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \
- done
-
-uninstall-m4dataDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(m4datadir)" && rm -f $$files
-install-pkgincludeHEADERS: $(pkginclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
- done
-
-uninstall-pkgincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
-install-pkginclude_internalHEADERS: $(pkginclude_internal_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkginclude_internaldir)" || $(MKDIR_P) "$(DESTDIR)$(pkginclude_internaldir)"
- @list='$(pkginclude_internal_HEADERS)'; test -n "$(pkginclude_internaldir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkginclude_internaldir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkginclude_internaldir)" || exit $$?; \
- done
-
-uninstall-pkginclude_internalHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_internal_HEADERS)'; test -n "$(pkginclude_internaldir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkginclude_internaldir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkginclude_internaldir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
- else \
- echo "$$red$$dashes"; \
- fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- test -d "$(distdir)" || mkdir "$(distdir)"
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- -test -n "$(am__skip_mode_fix)" \
- || find "$(distdir)" -type d ! -perm -755 \
- -exec chmod u+rwx,go+rx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r "$(distdir)"
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
-
-dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
- *.tar.xz*) \
- xz -dc $(distdir).tar.xz | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- test -d $(distdir)/_build || exit 0; \
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
- && cd "$$am__cwd" \
- || exit 1
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
- @$(am__cd) '$(distuninstallcheck_dir)' \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkginclude_internaldir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -rm -f fused-src/gtest/$(DEPDIR)/$(am__dirstamp)
- -rm -f fused-src/gtest/$(am__dirstamp)
- -rm -f lib/$(am__dirstamp)
- -rm -f samples/$(DEPDIR)/$(am__dirstamp)
- -rm -f samples/$(am__dirstamp)
- -rm -f src/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/$(am__dirstamp)
- -rm -f test/$(DEPDIR)/$(am__dirstamp)
- -rm -f test/$(am__dirstamp)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
- clean-libtool clean-noinstLTLIBRARIES mostlyclean-am
-
-distclean: distclean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf fused-src/gtest/$(DEPDIR) samples/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-data-local install-m4dataDATA \
- install-pkgincludeHEADERS install-pkginclude_internalHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-exec-local install-libLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf fused-src/gtest/$(DEPDIR) samples/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic \
- maintainer-clean-local
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-libLTLIBRARIES uninstall-m4dataDATA \
- uninstall-pkgincludeHEADERS \
- uninstall-pkginclude_internalHEADERS
-
-.MAKE: check-am install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
- clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
- clean-libtool clean-noinstLTLIBRARIES ctags dist dist-all \
- dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-compile \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-tags distcleancheck distdir distuninstallcheck dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-data-local install-dvi \
- install-dvi-am install-exec install-exec-am install-exec-local \
- install-html install-html-am install-info install-info-am \
- install-libLTLIBRARIES install-m4dataDATA install-man \
- install-pdf install-pdf-am install-pkgincludeHEADERS \
- install-pkginclude_internalHEADERS install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-local mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-libLTLIBRARIES \
- uninstall-m4dataDATA uninstall-pkgincludeHEADERS \
- uninstall-pkginclude_internalHEADERS
-
-
-# Build rules for putting fused Google Test files into the distribution
-# package. The user can also create those files by manually running
-# scripts/fuse_gtest_files.py.
-$(test_fused_gtest_test_SOURCES): fused-gtest
-
-fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
- $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
- scripts/fuse_gtest_files.py
- mkdir -p "$(srcdir)/fused-src"
- chmod -R u+w "$(srcdir)/fused-src"
- rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
- rm -f "$(srcdir)/fused-src/gtest/gtest.h"
- "$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
- cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
-
-maintainer-clean-local:
- rm -rf "$(srcdir)/fused-src"
-
-# Disables 'make install' as installing a compiled version of Google
-# Test can lead to undefined behavior due to violation of the
-# One-Definition Rule.
-
-install-exec-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
- false
-
-install-data-local:
- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
- false
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/README b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/README
deleted file mode 100644
index 51a9376db..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/README
+++ /dev/null
@@ -1,424 +0,0 @@
-Google C++ Testing Framework
-============================
-
-http://code.google.com/p/googletest/
-
-Overview
---------
-
-Google's framework for writing C++ tests on a variety of platforms
-(Linux, Mac OS X, Windows, Windows CE, Symbian, etc). Based on the
-xUnit architecture. Supports automatic test discovery, a rich set of
-assertions, user-defined assertions, death tests, fatal and non-fatal
-failures, various options for running the tests, and XML test report
-generation.
-
-Please see the project page above for more information as well as the
-mailing list for questions, discussions, and development. There is
-also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
-join us!
-
-Requirements for End Users
---------------------------
-
-Google Test is designed to have fairly minimal requirements to build
-and use with your projects, but there are some. Currently, we support
-Linux, Windows, Mac OS X, and Cygwin. We will also make our best
-effort to support other platforms (e.g. Solaris, AIX, and z/OS).
-However, since core members of the Google Test project have no access
-to these platforms, Google Test may have outstanding issues there. If
-you notice any problems on your platform, please notify
-googletestframework@googlegroups.com. Patches for fixing them are
-even more welcome!
-
-### Linux Requirements ###
-
-These are the base requirements to build and use Google Test from a source
-package (as described below):
- * GNU-compatible Make or gmake
- * POSIX-standard shell
- * POSIX(-2) Regular Expressions (regex.h)
- * A C++98-standard-compliant compiler
-
-### Windows Requirements ###
-
- * Microsoft Visual C++ 7.1 or newer
-
-### Cygwin Requirements ###
-
- * Cygwin 1.5.25-14 or newer
-
-### Mac OS X Requirements ###
-
- * Mac OS X 10.4 Tiger or newer
- * Developer Tools Installed
-
-Also, you'll need CMake 2.6.4 or higher if you want to build the
-samples using the provided CMake script, regardless of the platform.
-
-Requirements for Contributors
------------------------------
-
-We welcome patches. If you plan to contribute a patch, you need to
-build Google Test and its own tests from an SVN checkout (described
-below), which has further requirements:
-
- * Python version 2.3 or newer (for running some of the tests and
- re-generating certain source files from templates)
- * CMake 2.6.4 or newer
-
-Getting the Source
-------------------
-
-There are two primary ways of getting Google Test's source code: you
-can download a stable source release in your preferred archive format,
-or directly check out the source from our Subversion (SVN) repositary.
-The SVN checkout requires a few extra steps and some extra software
-packages on your system, but lets you track the latest development and
-make patches much more easily, so we highly encourage it.
-
-### Source Package ###
-
-Google Test is released in versioned source packages which can be
-downloaded from the download page [1]. Several different archive
-formats are provided, but the only difference is the tools used to
-manipulate them, and the size of the resulting file. Download
-whichever you are most comfortable with.
-
- [1] http://code.google.com/p/googletest/downloads/list
-
-Once the package is downloaded, expand it using whichever tools you
-prefer for that type. This will result in a new directory with the
-name "gtest-X.Y.Z" which contains all of the source code. Here are
-some examples on Linux:
-
- tar -xvzf gtest-X.Y.Z.tar.gz
- tar -xvjf gtest-X.Y.Z.tar.bz2
- unzip gtest-X.Y.Z.zip
-
-### SVN Checkout ###
-
-To check out the main branch (also known as the "trunk") of Google
-Test, run the following Subversion command:
-
- svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
-
-Setting up the Build
---------------------
-
-To build Google Test and your tests that use it, you need to tell your
-build system where to find its headers and source files. The exact
-way to do it depends on which build system you use, and is usually
-straightforward.
-
-### Generic Build Instructions ###
-
-Suppose you put Google Test in directory ${GTEST_DIR}. To build it,
-create a library build target (or a project as called by Visual Studio
-and Xcode) to compile
-
- ${GTEST_DIR}/src/gtest-all.cc
-
-with
-
- ${GTEST_DIR}/include and ${GTEST_DIR}
-
-in the header search path. Assuming a Linux-like system and gcc,
-something like the following will do:
-
- g++ -I${GTEST_DIR}/include -I${GTEST_DIR} -c ${GTEST_DIR}/src/gtest-all.cc
- ar -rv libgtest.a gtest-all.o
-
-Next, you should compile your test source file with
-${GTEST_DIR}/include in the header search path, and link it with gtest
-and any other necessary libraries:
-
- g++ -I${GTEST_DIR}/include path/to/your_test.cc libgtest.a -o your_test
-
-As an example, the make/ directory contains a Makefile that you can
-use to build Google Test on systems where GNU make is available
-(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
-Test's own tests. Instead, it just builds the Google Test library and
-a sample test. You can use it as a starting point for your own build
-script.
-
-If the default settings are correct for your environment, the
-following commands should succeed:
-
- cd ${GTEST_DIR}/make
- make
- ./sample1_unittest
-
-If you see errors, try to tweak the contents of make/Makefile to make
-them go away. There are instructions in make/Makefile on how to do
-it.
-
-### Using CMake ###
-
-Google Test comes with a CMake build script (CMakeLists.txt) that can
-be used on a wide range of platforms ("C" stands for cross-platofrm.).
-If you don't have CMake installed already, you can download it for
-free from http://www.cmake.org/.
-
-CMake works by generating native makefiles or build projects that can
-be used in the compiler environment of your choice. The typical
-workflow starts with:
-
- mkdir mybuild # Create a directory to hold the build output.
- cd mybuild
- cmake ${GTEST_DIR} # Generate native build scripts.
-
-If you want to build Google Test's samples, you should replace the
-last command with
-
- cmake -Dgtest_build_samples=ON ${GTEST_DIR}
-
-If you are on a *nix system, you should now see a Makefile in the
-current directory. Just type 'make' to build gtest.
-
-If you use Windows and have Vistual Studio installed, a gtest.sln file
-and several .vcproj files will be created. You can then build them
-using Visual Studio.
-
-On Mac OS X with Xcode installed, a .xcodeproj file will be generated.
-
-### Legacy Build Scripts ###
-
-Before settling on CMake, we have been providing hand-maintained build
-projects/scripts for Visual Studio, Xcode, and Autotools. While we
-continue to provide them for convenience, they are not actively
-maintained any more. We highly recommend that you follow the
-instructions in the previous two sections to integrate Google Test
-with your existing build system.
-
-If you still need to use the legacy build scripts, here's how:
-
-The msvc\ folder contains two solutions with Visual C++ projects.
-Open the gtest.sln or gtest-md.sln file using Visual Studio, and you
-are ready to build Google Test the same way you build any Visual
-Studio project. Files that have names ending with -md use DLL
-versions of Microsoft runtime libraries (the /MD or the /MDd compiler
-option). Files without that suffix use static versions of the runtime
-libraries (the /MT or the /MTd option). Please note that one must use
-the same option to compile both gtest and the test code. If you use
-Visual Studio 2005 or above, we recommend the -md version as /MD is
-the default for new projects in these versions of Visual Studio.
-
-On Mac OS X, open the gtest.xcodeproj in the xcode/ folder using
-Xcode. Build the "gtest" target. The universal binary framework will
-end up in your selected build directory (selected in the Xcode
-"Preferences..." -> "Building" pane and defaults to xcode/build).
-Alternatively, at the command line, enter:
-
- xcodebuild
-
-This will build the "Release" configuration of gtest.framework in your
-default build location. See the "xcodebuild" man page for more
-information about building different configurations and building in
-different locations.
-
-Tweaking Google Test
---------------------
-
-Google Test can be used in diverse environments. The default
-configuration may not work (or may not work well) out of the box in
-some environments. However, you can easily tweak Google Test by
-defining control macros on the compiler command line. Generally,
-these macros are named like GTEST_XYZ and you define them to either 1
-or 0 to enable or disable a certain feature.
-
-We list the most frequently used macros below. For a complete list,
-see file include/gtest/internal/gtest-port.h.
-
-### Choosing a TR1 Tuple Library ###
-
-Some Google Test features require the C++ Technical Report 1 (TR1)
-tuple library, which is not yet available with all compilers. The
-good news is that Google Test implements a subset of TR1 tuple that's
-enough for its own need, and will automatically use this when the
-compiler doesn't provide TR1 tuple.
-
-Usually you don't need to care about which tuple library Google Test
-uses. However, if your project already uses TR1 tuple, you need to
-tell Google Test to use the same TR1 tuple library the rest of your
-project uses, or the two tuple implementations will clash. To do
-that, add
-
- -DGTEST_USE_OWN_TR1_TUPLE=0
-
-to the compiler flags while compiling Google Test and your tests. If
-you want to force Google Test to use its own tuple library, just add
-
- -DGTEST_USE_OWN_TR1_TUPLE=1
-
-to the compiler flags instead.
-
-If you don't want Google Test to use tuple at all, add
-
- -DGTEST_HAS_TR1_TUPLE=0
-
-and all features using tuple will be disabled.
-
-### Multi-threaded Tests ###
-
-Google Test is thread-safe where the pthread library is available.
-After #include "gtest/gtest.h", you can check the GTEST_IS_THREADSAFE
-macro to see whether this is the case (yes if the macro is #defined to
-1, no if it's undefined.).
-
-If Google Test doesn't correctly detect whether pthread is available
-in your environment, you can force it with
-
- -DGTEST_HAS_PTHREAD=1
-
-or
-
- -DGTEST_HAS_PTHREAD=0
-
-When Google Test uses pthread, you may need to add flags to your
-compiler and/or linker to select the pthread library, or you'll get
-link errors. If you use the CMake script or the deprecated Autotools
-script, this is taken care of for you. If you use your own build
-script, you'll need to read your compiler and linker's manual to
-figure out what flags to add.
-
-### As a Shared Library (DLL) ###
-
-Google Test is compact, so most users can build and link it as a
-static library for the simplicity. You can choose to use Google Test
-as a shared library (known as a DLL on Windows) if you prefer.
-
-To compile *gtest* as a shared library, add
-
- -DGTEST_CREATE_SHARED_LIBRARY=1
-
-to the compiler flags. You'll also need to tell the linker to produce
-a shared library instead - consult your linker's manual for how to do
-it.
-
-To compile your *tests* that use the gtest shared library, add
-
- -DGTEST_LINKED_AS_SHARED_LIBRARY=1
-
-to the compiler flags.
-
-Note: while the above steps aren't technically necessary today when
-using some compilers (e.g. GCC), they may become necessary in the
-future, if we decide to improve the speed of loading the library (see
-http://gcc.gnu.org/wiki/Visibility for details). Therefore you are
-recommended to always add the above flags when using Google Test as a
-shared library. Otherwise a future release of Google Test may break
-your build script.
-
-### Avoiding Macro Name Clashes ###
-
-In C++, macros don't obey namespaces. Therefore two libraries that
-both define a macro of the same name will clash if you #include both
-definitions. In case a Google Test macro clashes with another
-library, you can force Google Test to rename its macro to avoid the
-conflict.
-
-Specifically, if both Google Test and some other code define macro
-FOO, you can add
-
- -DGTEST_DONT_DEFINE_FOO=1
-
-to the compiler flags to tell Google Test to change the macro's name
-from FOO to GTEST_FOO. Currently FOO can be FAIL, SUCCEED, or TEST.
-For example, with -DGTEST_DONT_DEFINE_TEST=1, you'll need to write
-
- GTEST_TEST(SomeTest, DoesThis) { ... }
-
-instead of
-
- TEST(SomeTest, DoesThis) { ... }
-
-in order to define a test.
-
-Upgrating from an Earlier Version
----------------------------------
-
-We strive to keep Google Test releases backward compatible.
-Sometimes, though, we have to make some breaking changes for the
-users' long-term benefits. This section describes what you'll need to
-do if you are upgrading from an earlier version of Google Test.
-
-### Upgrading from 1.3.0 or Earlier ###
-
-You may need to explicitly enable or disable Google Test's own TR1
-tuple library. See the instructions in section "Choosing a TR1 Tuple
-Library".
-
-### Upgrading from 1.4.0 or Earlier ###
-
-The Autotools build script (configure + make) is no longer officially
-supportted. You are encouraged to migrate to your own build system or
-use CMake. If you still need to use Autotools, you can find
-instructions in the README file from Google Test 1.4.0.
-
-On platforms where the pthread library is available, Google Test uses
-it in order to be thread-safe. See the "Multi-threaded Tests" section
-for what this means to your build script.
-
-If you use Microsoft Visual C++ 7.1 with exceptions disabled, Google
-Test will no longer compile. This should affect very few people, as a
-large portion of STL (including <string>) doesn't compile in this mode
-anyway. We decided to stop supporting it in order to greatly simplify
-Google Test's implementation.
-
-Developing Google Test
-----------------------
-
-This section discusses how to make your own changes to Google Test.
-
-### Testing Google Test Itself ###
-
-To make sure your changes work as intended and don't break existing
-functionality, you'll want to compile and run Google Test's own tests.
-For that you can use CMake:
-
- mkdir mybuild
- cd mybuild
- cmake -Dgtest_build_tests=ON ${GTEST_DIR}
-
-Make sure you have Python installed, as some of Google Test's tests
-are written in Python. If the cmake command complains about not being
-able to find Python ("Could NOT find PythonInterp (missing:
-PYTHON_EXECUTABLE)"), try telling it explicitly where your Python
-executable can be found:
-
- cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
-
-Next, you can build Google Test and all of its own tests. On *nix,
-this is usually done by 'make'. To run the tests, do
-
- make test
-
-All tests should pass.
-
-### Regenerating Source Files ###
-
-Some of Google Test's source files are generated from templates (not
-in the C++ sense) using a script. A template file is named FOO.pump,
-where FOO is the name of the file it will generate. For example, the
-file include/gtest/internal/gtest-type-util.h.pump is used to generate
-gtest-type-util.h in the same directory.
-
-Normally you don't need to worry about regenerating the source files,
-unless you need to modify them. In that case, you should modify the
-corresponding .pump files instead and run the pump.py Python script to
-regenerate them. You can find pump.py in the scripts/ directory.
-Read the Pump manual [2] for how to use it.
-
- [2] http://code.google.com/p/googletest/wiki/PumpManual
-
-### Contributing a Patch ###
-
-We welcome patches. Please read the Google Test developer's guide [3]
-for how you can contribute. In particular, make sure you have signed
-the Contributor License Agreement, or we won't be able to accept the
-patch.
-
- [3] http://code.google.com/p/googletest/wiki/GoogleTestDevGuide
-
-Happy testing!
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/aclocal.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/aclocal.m4
deleted file mode 100644
index 58917dc7a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/aclocal.m4
+++ /dev/null
@@ -1,1178 +0,0 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too. Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- am__universal=false
- m4_case([$1], [CC],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac],
- [CXX],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac])
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 16
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------------------------
-# Adds support for distributing Python modules and packages. To
-# install modules, copy them to $(pythondir), using the python_PYTHON
-# automake variable. To install a package with the same name as the
-# automake package, install to $(pkgpythondir), or use the
-# pkgpython_PYTHON automake variable.
-#
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
-# locations to install python extension modules (shared libraries).
-# Another macro is required to find the appropriate flags to compile
-# extension modules.
-#
-# If your package is configured with a different prefix to python,
-# users will have to add the install directory to the PYTHONPATH
-# environment variable, or create a .pth file (see the python
-# documentation for details).
-#
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
-# cause an error if the version of python installed on the system
-# doesn't meet the requirement. MINIMUM-VERSION should consist of
-# numbers and dots only.
-AC_DEFUN([AM_PATH_PYTHON],
- [
- dnl Find a Python interpreter. Python versions prior to 2.0 are not
- dnl supported. (2.0 was released on October 16, 2000).
- m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
- [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0])
-
- m4_if([$1],[],[
- dnl No version check is needed.
- # Find any Python interpreter.
- if test -z "$PYTHON"; then
- AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
- fi
- am_display_PYTHON=python
- ], [
- dnl A version check is needed.
- if test -n "$PYTHON"; then
- # If the user set $PYTHON, use it and don't search something else.
- AC_MSG_CHECKING([whether $PYTHON version >= $1])
- AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_ERROR(too old)])
- am_display_PYTHON=$PYTHON
- else
- # Otherwise, try each interpreter until we find one that satisfies
- # VERSION.
- AC_CACHE_CHECK([for a Python interpreter with version >= $1],
- [am_cv_pathless_PYTHON],[
- for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
- test "$am_cv_pathless_PYTHON" = none && break
- AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
- done])
- # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
- if test "$am_cv_pathless_PYTHON" = none; then
- PYTHON=:
- else
- AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
- fi
- am_display_PYTHON=$am_cv_pathless_PYTHON
- fi
- ])
-
- if test "$PYTHON" = :; then
- dnl Run any user-specified action, or abort.
- m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
- else
-
- dnl Query Python for its version number. Getting [:3] seems to be
- dnl the best way to do this; it's what "site.py" does in the standard
- dnl library.
-
- AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
- [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
- AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
-
- dnl Use the values of $prefix and $exec_prefix for the corresponding
- dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
- dnl distinct variables so they can be overridden if need be. However,
- dnl general consensus is that you shouldn't need this ability.
-
- AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
- AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
-
- dnl At times (like when building shared libraries) you may want
- dnl to know which OS platform Python thinks this is.
-
- AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
- [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
- AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
-
-
- dnl Set up 4 directories:
-
- dnl pythondir -- where to install python scripts. This is the
- dnl site-packages directory, not the python standard library
- dnl directory like in previous automake betas. This behavior
- dnl is more consistent with lispdir.m4 for example.
- dnl Query distutils for this directory. distutils does not exist in
- dnl Python 1.5, so we fall back to the hardcoded directory if it
- dnl doesn't work.
- AC_CACHE_CHECK([for $am_display_PYTHON script directory],
- [am_cv_python_pythondir],
- [if test "x$prefix" = xNONE
- then
- am_py_prefix=$ac_default_prefix
- else
- am_py_prefix=$prefix
- fi
- am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
- case $am_cv_python_pythondir in
- $am_py_prefix*)
- am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
- ;;
- *)
- case $am_py_prefix in
- /usr|/System*) ;;
- *)
- am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
- ;;
- esac
- ;;
- esac
- ])
- AC_SUBST([pythondir], [$am_cv_python_pythondir])
-
- dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
- dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
- dnl more consistent with the rest of automake.
-
- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
-
- dnl pyexecdir -- directory for installing python extension modules
- dnl (shared libraries)
- dnl Query distutils for this directory. distutils does not exist in
- dnl Python 1.5, so we fall back to the hardcoded directory if it
- dnl doesn't work.
- AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
- [am_cv_python_pyexecdir],
- [if test "x$exec_prefix" = xNONE
- then
- am_py_exec_prefix=$am_py_prefix
- else
- am_py_exec_prefix=$exec_prefix
- fi
- am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
- echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
- case $am_cv_python_pyexecdir in
- $am_py_exec_prefix*)
- am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
- am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
- ;;
- *)
- case $am_py_exec_prefix in
- /usr|/System*) ;;
- *)
- am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
- ;;
- esac
- ;;
- esac
- ])
- AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
-
- dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-
- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
-
- dnl Run any user-specified action.
- $2
- fi
-
-])
-
-
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------------------
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
-# Run ACTION-IF-FALSE otherwise.
-# This test uses sys.hexversion instead of the string equivalent (first
-# word of sys.version), in order to cope with versions such as 2.2c1.
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys
-# split strings by '.' and convert to numeric. Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
-sys.exit(sys.hexversion < minverhex)"
- AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_RUN_LOG(COMMAND)
-# -------------------
-# Run COMMAND, save the exit status in ac_status, and log it.
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
-AC_DEFUN([AM_RUN_LOG],
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
- ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- (exit $ac_status); }])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[[\\\"\#\$\&\'\`$am_lf]]*)
- AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
- *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
-m4_include([m4/lt~obsolete.m4])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.guess b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.guess
deleted file mode 100644
index e3a2116a7..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.guess
+++ /dev/null
@@ -1,1533 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
-
-timestamp='2009-06-10'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd | genuineintel)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.h.in b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.h.in
deleted file mode 100644
index 843b5b10c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.h.in
+++ /dev/null
@@ -1,69 +0,0 @@
-/* build-aux/config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to necessary symbol if this constant uses a non-standard name on
- your system. */
-#undef PTHREAD_CREATE_JOINABLE
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.sub b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.sub
deleted file mode 100644
index eb0389a69..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/config.sub
+++ /dev/null
@@ -1,1693 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
-
-timestamp='2009-06-11'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- tile*)
- basic_machine=tile-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -kopensolaris* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/depcomp b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/depcomp
deleted file mode 100644
index df8eea7e4..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/depcomp
+++ /dev/null
@@ -1,630 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
- echo "depcomp: Variables source, object and depmode must be set" 1>&2
- exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags. We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write. Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
- # HP compiler uses -M and no extra arg.
- gccflag=-M
- depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
-fi
-
-cygpath_u="cygpath -u -f -"
-if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u="sed s,\\\\\\\\,/,g"
- depmode=msvisualcpp
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay! Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff. Hmm.
-## Unfortunately, FreeBSD c89 acceptance of flags depends upon
-## the command line argument order; so add the flags where they
-## appear in depend2.am. Note that the slowdown incurred here
-## affects only configure: in makefiles, %FASTDEP% shortcuts this.
- for arg
- do
- case $arg in
- -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
- *) set fnord "$@" "$arg" ;;
- esac
- shift # fnord
- shift # $arg
- done
- "$@"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- mv "$tmpdepfile" "$depfile"
- ;;
-
-gcc)
-## There are various ways to get dependency output from gcc. Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-## up in a subdir. Having to rename by hand is ugly.
-## (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-## than renaming).
- if test -z "$gccflag"; then
- gccflag=-MD,
- fi
- "$@" -Wp,"$gccflag$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
- sed -e 's/^[^:]*: / /' \
- -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header). We avoid this by adding
-## dummy dependencies for each header file. Too bad gcc doesn't do
-## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
- echo >> "$depfile"
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-aix)
- # The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
- # start of each line; $object doesn't have directory information.
- # Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- if test "$libtool" = yes; then
- tmpdepfile1=$dir$base.u
- tmpdepfile2=$base.u
- tmpdepfile3=$dir.libs/$base.u
- "$@" -Wc,-M
- else
- tmpdepfile1=$dir$base.u
- tmpdepfile2=$dir$base.u
- tmpdepfile3=$dir$base.u
- "$@" -M
- fi
- stat=$?
-
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
-
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp2)
- # The "hp" stanza above does not work with aCC (C++) and HP's ia64
- # compilers, which have integrated preprocessors. The correct option
- # to use with these is +Maked; it writes dependencies to a file named
- # 'foo.d', which lands next to the object file, wherever that
- # happens to be.
- # Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- if test "$libtool" = yes; then
- tmpdepfile1=$dir$base.d
- tmpdepfile2=$dir.libs/$base.d
- "$@" -Wc,+Maked
- else
- tmpdepfile1=$dir$base.d
- tmpdepfile2=$dir$base.d
- "$@" +Maked
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
- sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile" "$tmpdepfile2"
- ;;
-
-tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-#nosideeffect)
- # This comment above is used by automake to tell side-effect
- # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
- # in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
- "$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-dashXmstdout)
- # This case only exists to satisfy depend.m4. It is never actually
- # run, as this mode is specially recognized in the preamble.
- exit 1
- ;;
-
-makedepend)
- "$@" || exit $?
- # Remove any Libtool call
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
- # X makedepend
- shift
- cleared=no eat=no
- for arg
- do
- case $cleared in
- no)
- set ""; shift
- cleared=yes ;;
- esac
- if test $eat = yes; then
- eat=no
- continue
- fi
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift ;;
- # Strip any option that makedepend may not understand. Remove
- # the object too, otherwise makedepend will parse it as a source file.
- -arch)
- eat=yes ;;
- -*|$object)
- ;;
- *)
- set fnord "$@" "$arg"; shift ;;
- esac
- done
- obj_suffix=`echo "$object" | sed 's/^.*\././'`
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile" "$tmpdepfile".bak
- ;;
-
-cpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- cat < "$tmpdepfile" >> "$depfile"
- sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvisualcpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- IFS=" "
- for arg
- do
- case "$arg" in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
- esac
- done
- "$@" -E 2>/dev/null |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvcmsys)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-none)
- exec "$@"
- ;;
-
-*)
- echo "Unknown depmode $depmode" 1>&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/install-sh b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/install-sh
deleted file mode 100644
index 6781b987b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/install-sh
+++ /dev/null
@@ -1,520 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2009-04-28.21; # UTC
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/ltmain.sh b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/ltmain.sh
deleted file mode 100755
index 7ed280bc9..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/ltmain.sh
+++ /dev/null
@@ -1,8413 +0,0 @@
-# Generated from ltmain.m4sh.
-
-# ltmain.sh (GNU libtool) 2.2.6b
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-# --config show all configuration variables
-# --debug enable verbose shell tracing
-# -n, --dry-run display commands without modifying any files
-# --features display basic configuration information and exit
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print informational messages (default)
-# --version print version information
-# -h, --help print short or long help message
-#
-# MODE must be one of the following:
-#
-# clean remove files from the build directory
-# compile compile a source file into a libtool object
-# execute automatically set library path, then run a program
-# finish complete the installation of libtool libraries
-# install install libraries or executables
-# link create a library or an executable
-# uninstall remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-# host-triplet: $host
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
-# automake: $automake_version
-# autoconf: $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
-TIMESTAMP=""
-package_revision=1.3017
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
- lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
- fi"
-done
-
-$lt_unset CDPATH
-
-
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/bin/sed"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# Generated shell functions inserted here.
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
- -*) progname=./$progname ;;
-esac
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
- [\\/]*|[A-Za-z]:\\*) ;;
- *[\\/]*)
- progdir=$func_dirname_result
- progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
- ;;
- *)
- save_IFS="$IFS"
- IFS=:
- for progdir in $PATH; do
- IFS="$save_IFS"
- test -x "$progdir/$progname" && break
- done
- IFS="$save_IFS"
- test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
- s/$bs4/&\\
-/g
- s/^$bs2$dollar/$bs&/
- s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
- s/\n//g"
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-opt_warning=:
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
- $ECHO "$progname${mode+: }$mode: $*"
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
- $opt_verbose && func_echo ${1+"$@"}
-
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
-
- # bash bug again:
- :
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information." ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
- $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
- my_directory_path="$1"
- my_dir_list=
-
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
- esac
-
- # While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
- # ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
-
- # If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
-
- # ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
- done
- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
-
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
- # try to create one of the directories concurrently. Don't
- # stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
- done
- IFS="$save_mkdir_p_IFS"
-
- # Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
- fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
-
- if test "$opt_dry_run" = ":"; then
- # Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
- else
-
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
-
- save_mktempdir_umask=`umask`
- umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
- fi
-
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
- fi
-
- $ECHO "X$my_tmpdir" | $Xsed
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
-
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
- ;;
- *)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
- esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
- case $1 in
- *[\\\`\"]*)
- my_arg=`$ECHO "X$1" | $Xsed \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- my_arg="$1" ;;
- esac
-
- case $my_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
- ;;
- esac
-
- func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it. Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$lt_user_locale
- $my_cmd"
- my_status=$?
- eval "$lt_safe_locale"
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
- $SED -n '/^# Usage:/,/# -h/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- $ECHO
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$host*'"$host"'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
- func_error "missing argument for $1"
- exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-
-
-
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell, and then maybe $ECHO will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
- func_error ${1+"$@"}
- func_error "See the $PACKAGE documentation for more information."
- func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
- re_begincf='^# ### BEGIN LIBTOOL'
- re_endcf='^# ### END LIBTOOL'
-
- # Default configuration.
- $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
- done
-
- exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_features ()
-{
- $ECHO "host: $host"
- if test "$build_libtool_libs" = yes; then
- $ECHO "enable shared libraries"
- else
- $ECHO "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $ECHO "enable static libraries"
- else
- $ECHO "disable static libraries"
- fi
-
- exit $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
- # Global variable:
- tagname="$1"
-
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
-
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
- *)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
-}
-
-# Parse options once, thoroughly. This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
-
- # Shorthand for --mode=foo, only valid as the first argument
- case $1 in
- clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
- compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
- execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
- finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
- install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
- link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
- esac
-
- # Parse non-mode specific arguments:
- while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --config) func_config ;;
-
- --debug) preserve_args="$preserve_args $opt"
- func_echo "enabling shell trace mode"
- opt_debug='set -x'
- $opt_debug
- ;;
-
- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
- execute_dlfiles="$execute_dlfiles $1"
- shift
- ;;
-
- --dry-run | -n) opt_dry_run=: ;;
- --features) func_features ;;
- --finish) mode="finish" ;;
-
- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
- case $1 in
- # Valid mode arguments:
- clean) ;;
- compile) ;;
- execute) ;;
- finish) ;;
- install) ;;
- link) ;;
- relink) ;;
- uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $opt"
- exit_cmd=exit
- break
- ;;
- esac
-
- mode="$1"
- shift
- ;;
-
- --preserve-dup-deps)
- opt_duplicate_deps=: ;;
-
- --quiet|--silent) preserve_args="$preserve_args $opt"
- opt_silent=:
- ;;
-
- --verbose| -v) preserve_args="$preserve_args $opt"
- opt_silent=false
- ;;
-
- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
- preserve_args="$preserve_args $opt $1"
- func_enable_tag "$1" # tagname is set here
- shift
- ;;
-
- # Separate optargs to long options:
- -dlopen=*|--mode=*|--tag=*)
- func_opt_split "$opt"
- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
- shift
- ;;
-
- -\?|-h) func_usage ;;
- --help) opt_help=: ;;
- --version) func_version ;;
-
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
-
- *) nonopt="$opt"
- break
- ;;
- esac
- done
-
-
- case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
- ;;
- esac
-
- # Having warned about all mis-specified options, bail out if
- # anything was wrong.
- $exit_cmd $EXIT_FAILURE
-}
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
- fi
-
- exit $EXIT_MISMATCH
- fi
-}
-
-
-## ----------- ##
-## Main. ##
-## ----------- ##
-
-$opt_help || {
- # Sanity checks first:
- func_check_version_match
-
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- func_fatal_configuration "not configured to build any kind of library"
- fi
-
- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
-
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- func_error "unrecognized option \`-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$progname --help --mode=$mode' for more information."
-}
-
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
- test -f "$1" &&
- $SED -e 4q "$1" 2>/dev/null \
- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs. To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
- lalib_p=no
- if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
- for lalib_p_l in 1 2 3 4
- do
- read lalib_p_line
- case "$lalib_p_line" in
- \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
- esac
- done
- exec 0<&5 5<&-
- fi
- test "$lalib_p" = yes
-}
-
-# func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_script_p ()
-{
- func_lalib_p "$1"
-}
-
-# func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_executable_p ()
-{
- func_ltwrapper_exec_suffix=
- case $1 in
- *.exe) ;;
- *) func_ltwrapper_exec_suffix=.exe ;;
- esac
- $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-}
-
-# func_ltwrapper_scriptname file
-# Assumes file is an ltwrapper_executable
-# uses $file to determine the appropriate filename for a
-# temporary ltwrapper_script.
-func_ltwrapper_scriptname ()
-{
- func_ltwrapper_scriptname_result=""
- if func_ltwrapper_executable_p "$1"; then
- func_dirname_and_basename "$1" "" "."
- func_stripname '' '.exe' "$func_basename_result"
- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
- fi
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
- func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
- $opt_debug
- save_ifs=$IFS; IFS='~'
- for cmd in $1; do
- IFS=$save_ifs
- eval cmd=\"$cmd\"
- func_show_eval "$cmd" "${2-:}"
- done
- IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
- $opt_debug
- case $1 in
- */* | *\\*) . "$1" ;;
- *) . "./$1" ;;
- esac
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- $opt_debug
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with \`--tag'"
-# else
-# func_verbose "using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
-{
- write_libobj=${1}
- if test "$build_libtool_libs" = yes; then
- write_lobj=\'${2}\'
- else
- write_lobj=none
- fi
-
- if test "$build_old_libs" = yes; then
- write_oldobj=\'${3}\'
- else
- write_oldobj=none
- fi
-
- $opt_dry_run || {
- cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
- $MV "${write_libobj}T" "${write_libobj}"
- }
-}
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
- $opt_debug
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
- pie_flag=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- test -n "$libobj" && \
- func_fatal_error "you cannot specify \`-o' more than once"
- arg_mode=target
- continue
- ;;
-
- -pie | -fpie | -fPIE)
- pie_flag="$pie_flag $arg"
- continue
- ;;
-
- -shared | -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$arg"
- lastarg="$lastarg $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$lastarg"
- lastarg=$func_stripname_result
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- *)
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- func_quote_for_eval "$lastarg"
- base_compile="$base_compile $func_quote_for_eval_result"
- done # for arg
-
- case $arg_mode in
- arg)
- func_fatal_error "you must specify an argument for -Xcompile"
- ;;
- target)
- func_fatal_error "you must specify a target with \`-o'"
- ;;
- *)
- # Get the name of the library object.
- test -z "$libobj" && {
- func_basename "$srcfile"
- libobj="$func_basename_result"
- }
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- case $libobj in
- *.[cCFSifmso] | \
- *.ada | *.adb | *.ads | *.asm | \
- *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx)
- func_xform "$libobj"
- libobj=$func_xform_result
- ;;
- esac
-
- case $libobj in
- *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
- *)
- func_fatal_error "cannot determine name of library object from \`$libobj'"
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- continue
- ;;
-
- -static)
- build_libtool_libs=no
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- func_quote_for_eval "$libobj"
- test "X$libobj" != "X$func_quote_for_eval_result" \
- && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name \`$libobj' may not contain shell special characters."
- func_dirname_and_basename "$obj" "/" ""
- objname="$func_basename_result"
- xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
-
- test -z "$base_compile" && \
- func_fatal_help "you must specify a compilation command"
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
- pic_mode=default
- ;;
- esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
- else
- output_obj=
- need_locks=no
- lockfile=
- fi
-
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
- until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
- func_echo "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
- $ECHO "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
- removelist="$removelist $output_obj"
- $ECHO "$srcfile" > "$lockfile"
- fi
-
- $opt_dry_run || $RM $removelist
- removelist="$removelist $lockfile"
- trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- func_quote_for_eval "$srcfile"
- qsrcfile=$func_quote_for_eval_result
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
- # Without this assignment, base_compile gets emptied.
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- func_mkdir_p "$xdir$objdir"
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- func_show_eval_locale "$command" \
- 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- func_show_eval '$MV "$output_obj" "$lobj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
- command="$base_compile $qsrcfile$pie_flag"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- func_show_eval_locale "$command" \
- '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- func_show_eval '$MV "$output_obj" "$obj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
- fi
-
- $opt_dry_run || {
- func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- removelist=$lockfile
- $RM "$lockfile"
- fi
- }
-
- exit $EXIT_SUCCESS
-}
-
-$opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
- # We need to display help for each of the modes.
- case $mode in
- "")
- # Generic help is extracted from the usage comments
- # at the start of this file.
- func_help
- ;;
-
- clean)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
- compile)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -no-suppress do not suppress compiler output for multiple passes
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -shared do not build a \`.o' file suitable for static linking
- -static only build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
- execute)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
- finish)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
- install)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The following components of INSTALL-COMMAND are treated specially:
-
- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
- link)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -shared only do dynamic linking of libtool libraries
- -shrext SUFFIX override the standard shared library file extension
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
- -weak LIBNAME declare that the target provides the LIBNAME interface
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
- uninstall)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
- *)
- func_fatal_help "invalid operation mode \`$mode'"
- ;;
- esac
-
- $ECHO
- $ECHO "Try \`$progname --help' for more information about other modes."
-
- exit $?
-}
-
- # Now that we've collected a possible --mode arg, show help if necessary
- $opt_help && func_mode_help
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
- $opt_debug
- # The first argument is the command name.
- cmd="$nonopt"
- test -z "$cmd" && \
- func_fatal_help "you must specify a COMMAND"
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- test -f "$file" \
- || func_fatal_help "\`$file' is not a file"
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$lib' is not a valid libtool archive"
-
- # Read the libtool library.
- dlname=
- library_names=
- func_source "$file"
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && \
- func_warning "\`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- if test ! -f "$dir/$dlname"; then
- func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
- fi
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- ;;
-
- *)
- func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if func_ltwrapper_script_p "$file"; then
- func_source "$file"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- elif func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- func_source "$func_ltwrapper_scriptname_result"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- func_quote_for_eval "$file"
- args="$args $func_quote_for_eval_result"
- done
-
- if test "X$opt_dry_run" = Xfalse; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- else
- $lt_unset $lt_var
- fi"
- done
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
- $ECHO "export $shlibpath_var"
- fi
- $ECHO "$cmd$args"
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
- $opt_debug
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- $opt_silent && exit $EXIT_SUCCESS
-
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- $ECHO "Libraries have been installed in:"
- for libdir in $libdirs; do
- $ECHO " $libdir"
- done
- $ECHO
- $ECHO "If you ever happen to want to link against installed libraries"
- $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
- $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $ECHO "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $ECHO " during execution"
- fi
- if test -n "$runpath_var"; then
- $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
- $ECHO " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $ECHO " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $ECHO " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $ECHO
-
- $ECHO "See any operating system documentation about shared libraries for"
- case $host in
- solaris2.[6789]|solaris2.1[0-9])
- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
- $ECHO "pages."
- ;;
- *)
- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
- ;;
- esac
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- exit $EXIT_SUCCESS
-}
-
-test "$mode" = finish && func_mode_finish ${1+"$@"}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
- $opt_debug
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
- # Aesthetically quote it.
- func_quote_for_eval "$nonopt"
- install_prog="$func_quote_for_eval_result "
- arg=$1
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- func_quote_for_eval "$arg"
- install_prog="$install_prog$func_quote_for_eval_result"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o)
- prev=$arg
- ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- func_quote_for_eval "$arg"
- install_prog="$install_prog $func_quote_for_eval_result"
- done
-
- test -z "$install_prog" && \
- func_fatal_help "you must specify an install program"
-
- test -n "$prev" && \
- func_fatal_help "the \`$prev' option requires an argument"
-
- if test -z "$files"; then
- if test -z "$dest"; then
- func_fatal_help "no file or destination specified"
- else
- func_fatal_help "you must specify a destination"
- fi
- fi
-
- # Strip any trailing slash from the destination.
- func_stripname '' '/' "$dest"
- dest=$func_stripname_result
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- func_dirname_and_basename "$dest" "" "."
- destdir="$func_dirname_result"
- destname="$func_basename_result"
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files; shift
- test "$#" -gt 1 && \
- func_fatal_help "\`$dest' is not a directory"
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- func_fatal_help "\`$destdir' must be an absolute directory name"
- ;;
- esac
- done
- ;;
- esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$file' is not a valid libtool archive"
-
- library_names=
- old_library=
- relink_command=
- func_source "$file"
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- func_dirname "$file" "/" ""
- dir="$func_dirname_result"
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
- fi
-
- func_warning "relinking \`$file'"
- func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
- fi
-
- # See the names of the shared library.
- set dummy $library_names; shift
- if test -n "$1"; then
- realname="$1"
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
- 'exit $?'
- tstripme="$stripme"
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- case $realname in
- *.dll.a)
- tstripme=""
- ;;
- esac
- ;;
- esac
- if test -n "$tstripme" && test -n "$striplib"; then
- func_show_eval "$striplib $destdir/$realname" 'exit $?'
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- test "$linkname" != "$realname" \
- && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- func_execute_cmds "$postinstall_cmds" 'exit $?'
- fi
-
- # Install the pseudo-library for information purposes.
- func_basename "$file"
- name="$func_basename_result"
- instname="$dir/$name"i
- func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- func_lo2o "$destfile"
- staticdest=$func_lo2o_result
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- func_fatal_help "cannot copy a libtool object to \`$destfile'"
- ;;
- esac
-
- # Install the libtool object if requested.
- test -n "$destfile" && \
- func_show_eval "$install_prog $file $destfile" 'exit $?'
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- func_lo2o "$file"
- staticobj=$func_lo2o_result
- func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin* | *mingw*)
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- wrapper=$func_ltwrapper_scriptname_result
- else
- func_stripname '' '.exe' "$file"
- wrapper=$func_stripname_result
- fi
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if func_ltwrapper_script_p "$wrapper"; then
- notinst_deplibs=
- relink_command=
-
- func_source "$wrapper"
-
- # Check the variables that should have been set.
- test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- func_source "$lib"
- fi
- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "\`$lib' has not been installed in \`$libdir'"
- finalize=no
- fi
- done
-
- relink_command=
- func_source "$wrapper"
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- $opt_dry_run || {
- if test "$finalize" = yes; then
- tmpdir=`func_mktempdir`
- func_basename "$file$stripped_ext"
- file="$func_basename_result"
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $opt_silent || {
- func_quote_for_expand "$relink_command"
- eval "func_echo $func_quote_for_expand_result"
- }
- if eval "$relink_command"; then :
- else
- func_error "error: relink \`$file' with the above command before installing it"
- $opt_dry_run || ${RM}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- func_warning "cannot relink \`$file'"
- fi
- }
- else
- # Install the binary that we compiled earlier.
- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- func_stripname '' '.exe' "$destfile"
- destfile=$func_stripname_result
- ;;
- esac
- ;;
- esac
- func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
- $opt_dry_run || if test -n "$outputname"; then
- ${RM}r "$tmpdir"
- fi
- ;;
- esac
- done
-
- for file in $staticlibs; do
- func_basename "$file"
- name="$func_basename_result"
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
- fi
-
- # Do each command in the postinstall commands.
- func_execute_cmds "$old_postinstall_cmds" 'exit $?'
- done
-
- test -n "$future_libdirs" && \
- func_warning "remember to run \`$progname --finish$future_libdirs'"
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- $opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = install && func_mode_install ${1+"$@"}
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
- $opt_debug
- my_outputname="$1"
- my_originator="$2"
- my_pic_p="${3-no}"
- my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
- my_dlsyms=
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms="${my_outputname}S.c"
- else
- func_error "not configured to extract global symbols from dlpreopened files"
- fi
- fi
-
- if test -n "$my_dlsyms"; then
- case $my_dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${my_outputname}.nm"
-
- func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
- # Parse the name list into a source file.
- func_verbose "creating $output_objdir/$my_dlsyms"
-
- $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- func_verbose "generating symbol list for \`$output'"
-
- $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for progfile in $progfiles; do
- func_verbose "extracting global C symbols from \`$progfile'"
- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $opt_dry_run || {
- eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- if test -n "$export_symbols_regex"; then
- $opt_dry_run || {
- eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $opt_dry_run || {
- $RM $export_symbols
- eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- else
- $opt_dry_run || {
- eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- case $host in
- *cygwin | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- fi
- fi
-
- for dlprefile in $dlprefiles; do
- func_verbose "extracting global C symbols from \`$dlprefile'"
- func_basename "$dlprefile"
- name="$func_basename_result"
- $opt_dry_run || {
- eval '$ECHO ": $name " >> "$nlist"'
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
- }
- done
-
- $opt_dry_run || {
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $MV "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if $GREP -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- $GREP -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
- else
- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
- fi
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols. */
-typedef struct {
- const char *name;
- void *address;
-} lt_dlsymlist;
-"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs. */"
- lt_dlsym_const= ;;
- *osf5*)
- echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
- lt_dlsym_const= ;;
- *)
- lt_dlsym_const=const ;;
- esac
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
- { \"$my_originator\", (void *) 0 },"
-
- case $need_lib_prefix in
- no)
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- *)
- eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- esac
- $ECHO >> "$output_objdir/$my_dlsyms" "\
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- } # !$opt_dry_run
-
- pic_flag_for_symtable=
- case "$compile_command " in
- *" -static "*) ;;
- *)
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
- *-*-hpux*)
- pic_flag_for_symtable=" $pic_flag" ;;
- *)
- if test "X$my_pic_p" != Xno; then
- pic_flag_for_symtable=" $pic_flag"
- fi
- ;;
- esac
- ;;
- esac
- symtab_cflags=
- for arg in $LTCFLAGS; do
- case $arg in
- -pie | -fpie | -fPIE) ;;
- *) symtab_cflags="$symtab_cflags $arg" ;;
- esac
- done
-
- # Now compile the dynamic symbol file.
- func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
- # Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
- # Transform the symbol file into the correct name.
- symfileobj="$output_objdir/${my_outputname}S.$objext"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- if test -f "$output_objdir/$my_outputname.def"; then
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- else
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- fi
- ;;
- *)
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- ;;
- esac
- ;;
- *)
- func_fatal_error "unknown suffix for \`$my_dlsyms'"
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
- fi
-}
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- $opt_debug
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 |
- $SED -n -e '
- 1,100{
- / I /{
- s,.*,import,
- p
- q
- }
- }'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $ECHO "$win32_libid_type"
-}
-
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- $opt_debug
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
- fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- $opt_debug
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- func_basename "$my_xlib"
- my_xlib="$func_basename_result"
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- func_arith $extracted_serial + 1
- extracted_serial=$func_arith_result
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
-
- func_mkdir_p "$my_xdir"
-
- case $host in
- *-darwin*)
- func_verbose "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- $opt_dry_run || {
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`basename "$darwin_archive"`
- darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
- if test -n "$darwin_arches"; then
- darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- $LIPO -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- $RM -rf unfat-$$
- cd "$darwin_orig_dir"
- else
- cd $darwin_orig_dir
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- } # !$opt_dry_run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
-
- func_extract_archives_result="$my_oldobjs"
-}
-
-
-
-# func_emit_wrapper_part1 [arg=no]
-#
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
- func_emit_wrapper_part1_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part1_arg1=$1
- fi
-
- $ECHO "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
- generated_by_libtool_version='$macro_version'
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$ECHO are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- ECHO=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$ECHO works!
- :
- else
- # Restart under the correct shell, and then maybe \$ECHO will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $ECHO "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
- func_emit_wrapper_part2_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part2_arg1=$1
- fi
-
- $ECHO "\
-
- # Usually 'no', except on cygwin/mingw when embedded into
- # the cwrapper.
- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
- if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
- # special case for '.'
- if test \"\$thisdir\" = \".\"; then
- thisdir=\`pwd\`
- fi
- # remove .libs from thisdir
- case \"\$thisdir\" in
- *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
- $objdir ) thisdir=. ;;
- esac
- fi
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $ECHO "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" ||
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $MKDIR \"\$progdir\"
- else
- $RM \"\$progdir/\$file\"
- fi"
-
- $ECHO "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $ECHO \"\$relink_command_output\" >&2
- $RM \"\$progdir/\$file\"
- exit 1
- fi
- fi
-
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $RM \"\$progdir/\$program\";
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $RM \"\$progdir/\$file\"
- fi"
- else
- $ECHO "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $ECHO "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $ECHO "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $ECHO "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $ECHO "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2* | *-cegcc*)
- $ECHO "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $ECHO "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $ECHO "\
- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
- exit 1
- fi
- else
- # The program doesn't exist.
- \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
- $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
- exit 1
- fi
-fi\
-"
-}
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable. Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take. If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory. This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
- func_emit_wrapper_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_arg1=$1
- fi
-
- # split this up so that func_emit_cwrapperexe_src
- # can call each part independently.
- func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
- func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin. Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
- func_to_host_path_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- case $build in
- *mingw* ) # actually, msys
- # awkward: cmd appends spaces to result
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_path_tmp1=`( cmd //c echo "$1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_path_tmp1=`cygpath -w "$1"`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # Unfortunately, winepath does not exit with a non-zero
- # error code, so we are forced to check the contents of
- # stdout. On the other hand, if the command is not
- # found, the shell will set an exit code of 127 and print
- # *an error message* to stdout. So we must check for both
- # error code of zero AND non-empty stdout, which explains
- # the odd construction:
- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- else
- # Allow warning below.
- func_to_host_path_result=""
- fi
- ;;
- esac
- if test -z "$func_to_host_path_result" ; then
- func_error "Could not determine host path corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback:
- func_to_host_path_result="$1"
- fi
- ;;
- esac
- fi
-}
-# end: func_to_host_path
-
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
- func_to_host_pathlist_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- # Remove leading and trailing path separator characters from
- # ARG. msys behavior is inconsistent here, cygpath turns them
- # into '.;' and ';.', and winepath ignores them completely.
- func_to_host_pathlist_tmp2="$1"
- # Once set for this call, this variable should not be
- # reassigned. It is used in tha fallback case.
- func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e 's|^:*||' -e 's|:*$||'`
- case $build in
- *mingw* ) # Actually, msys.
- # Awkward: cmd appends spaces to result.
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # unfortunately, winepath doesn't convert pathlists
- func_to_host_pathlist_result=""
- func_to_host_pathlist_oldIFS=$IFS
- IFS=:
- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
- IFS=$func_to_host_pathlist_oldIFS
- if test -n "$func_to_host_pathlist_f" ; then
- func_to_host_path "$func_to_host_pathlist_f"
- if test -n "$func_to_host_path_result" ; then
- if test -z "$func_to_host_pathlist_result" ; then
- func_to_host_pathlist_result="$func_to_host_path_result"
- else
- func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
- fi
- fi
- fi
- IFS=:
- done
- IFS=$func_to_host_pathlist_oldIFS
- ;;
- esac
- if test -z "$func_to_host_pathlist_result" ; then
- func_error "Could not determine the host path(s) corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback. This may break if $1 contains DOS-style drive
- # specifications. The fix is not to complicate the expression
- # below, but for the user to provide a working wine installation
- # with winepath so that path translation in the cross-to-mingw
- # case works properly.
- lt_replace_pathsep_nix_to_dos="s|:|;|g"
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_replace_pathsep_nix_to_dos"`
- fi
- # Now, add the leading and trailing path separators back
- case "$1" in
- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
- ;;
- esac
- case "$1" in
- *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
- ;;
- esac
- ;;
- esac
- fi
-}
-# end: func_to_host_pathlist
-
-# func_emit_cwrapperexe_src
-# emit the source code for a wrapper executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_cwrapperexe_src ()
-{
- cat <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "$SHELL $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat <<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-# define setmode _setmode
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-# include <io.h>
-# define HAVE_SETENV
-# ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-# endif
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef S_IXOTH
-# define S_IXOTH 0
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0
-#endif
-
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-# define intptr_t int
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# define FOPEN_WB "wb"
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef _O_BINARY
-# define _O_BINARY 0
-#endif
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
- va_list args;
- va_start (args, fmt);
- (void) vfprintf (stderr, fmt, args);
- va_end (args);
-}
-#else
-# define LTWRAPPER_DEBUGPRINTF(args)
-#endif
-
-const char *program_name = NULL;
-
-void *xmalloc (size_t num);
-char *xstrdup (const char *string);
-const char *base_name (const char *name);
-char *find_executable (const char *wrapper);
-char *chase_symlinks (const char *pathspec);
-int make_executable (const char *path);
-int check_executable (const char *path);
-char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-void lt_setenv (const char *name, const char *value);
-char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
- func_emit_wrapper_part1 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
- cat <<EOF
-
-static const char *script_text_part2 =
-EOF
- func_emit_wrapper_part2 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
-
- cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- func_to_host_pathlist "$temp_rpath"
- cat <<EOF
-const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * LIB_PATH_VALUE = "";
-EOF
- fi
-
- if test -n "$dllsearchpath"; then
- func_to_host_pathlist "$dllsearchpath:"
- cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE = "";
-EOF
- fi
-
- if test "$fast_install" = yes; then
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
- else
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
- fi
-
-
- cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
-
-static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
-static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
- /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
- /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
- /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int newargc;
- char *tmp_pathspec;
- char *actual_cwrapper_path;
- char *actual_cwrapper_name;
- char *target_name;
- char *lt_argv_zero;
- intptr_t rval = 127;
-
- int i;
-
- program_name = (char *) xstrdup (base_name (argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
-
- /* very simple arg parsing; don't want to rely on getopt */
- for (i = 1; i < argc; i++)
- {
- if (strcmp (argv[i], dumpscript_opt) == 0)
- {
-EOF
- case "$host" in
- *mingw* | *cygwin* )
- # make stdout use "unix" line endings
- echo " setmode(1,_O_BINARY);"
- ;;
- esac
-
- cat <<"EOF"
- printf ("%s", script_text_part1);
- printf ("%s", script_text_part2);
- return 0;
- }
- }
-
- newargz = XMALLOC (char *, argc + 1);
- tmp_pathspec = find_executable (argv[0]);
- if (tmp_pathspec == NULL)
- lt_fatal ("Couldn't find %s", argv[0]);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
- tmp_pathspec));
-
- actual_cwrapper_path = chase_symlinks (tmp_pathspec);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
- actual_cwrapper_path));
- XFREE (tmp_pathspec);
-
- actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
- strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
- /* wrapper name transforms */
- strendzap (actual_cwrapper_name, ".exe");
- tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
- XFREE (actual_cwrapper_name);
- actual_cwrapper_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- /* target_name transforms -- use actual target program name; might have lt- prefix */
- target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
- strendzap (target_name, ".exe");
- tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
- XFREE (target_name);
- target_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
- target_name));
-EOF
-
- cat <<EOF
- newargz[0] =
- XMALLOC (char, (strlen (actual_cwrapper_path) +
- strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
- strcpy (newargz[0], actual_cwrapper_path);
- strcat (newargz[0], "$objdir");
- strcat (newargz[0], "/");
-EOF
-
- cat <<"EOF"
- /* stop here, and copy so we don't have to do this twice */
- tmp_pathspec = xstrdup (newargz[0]);
-
- /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
- strcat (newargz[0], actual_cwrapper_name);
-
- /* DO want the lt- prefix here if it exists, so use target_name */
- lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
- XFREE (tmp_pathspec);
- tmp_pathspec = NULL;
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- {
- char* p;
- while ((p = strchr (newargz[0], '\\')) != NULL)
- {
- *p = '/';
- }
- while ((p = strchr (lt_argv_zero, '\\')) != NULL)
- {
- *p = '/';
- }
- }
-EOF
- ;;
- esac
-
- cat <<"EOF"
- XFREE (target_name);
- XFREE (actual_cwrapper_path);
- XFREE (actual_cwrapper_name);
-
- lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
- lt_setenv ("DUALCASE", "1"); /* for MSK sh */
- lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
- lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-
- newargc=0;
- for (i = 1; i < argc; i++)
- {
- if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
- {
- if (argv[i][env_set_opt_len] == '=')
- {
- const char *p = argv[i] + env_set_opt_len + 1;
- lt_opt_process_env_set (p);
- }
- else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_set (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_set_opt);
- continue;
- }
- if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
- {
- if (argv[i][env_prepend_opt_len] == '=')
- {
- const char *p = argv[i] + env_prepend_opt_len + 1;
- lt_opt_process_env_prepend (p);
- }
- else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_prepend (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_prepend_opt);
- continue;
- }
- if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
- {
- if (argv[i][env_append_opt_len] == '=')
- {
- const char *p = argv[i] + env_append_opt_len + 1;
- lt_opt_process_env_append (p);
- }
- else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_append (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_append_opt);
- continue;
- }
- if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
- {
- /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
- namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
- report an error. Otherwise, targets might begin to believe
- they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
- namespace. The first time any user complains about this, we'll
- need to make LTWRAPPER_OPTION_PREFIX a configure-time option
- or a configure.ac-settable value.
- */
- lt_fatal ("Unrecognized option in %s namespace: '%s'",
- ltwrapper_option_prefix, argv[i]);
- }
- /* otherwise ... */
- newargz[++newargc] = xstrdup (argv[i]);
- }
- newargz[++newargc] = NULL;
-
- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
- for (i = 0; i < newargc; i++)
- {
- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
- }
-
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- /* execv doesn't actually work on mingw as expected on unix */
- rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
- if (rval == -1)
- {
- /* failed to start process */
- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
- return 127;
- }
- return rval;
-EOF
- ;;
- *)
- cat <<"EOF"
- execv (lt_argv_zero, newargz);
- return rval; /* =127, but avoids unused variable warning */
-EOF
- ;;
- esac
-
- cat <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
- void *p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
- string) : NULL;
-}
-
-const char *
-base_name (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char) name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return base;
-}
-
-int
-check_executable (const char *path)
-{
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0)
- && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
- return 1;
- else
- return 0;
-}
-
-int
-make_executable (const char *path)
-{
- int rval = 0;
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if (stat (path, &st) >= 0)
- {
- rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
- }
- return rval;
-}
-
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise
- Does not chase symlinks, even on platforms that support them.
-*/
-char *
-find_executable (const char *wrapper)
-{
- int has_slash = 0;
- const char *p;
- const char *p_next;
- /* static buffer for getcwd */
- char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char *concat_name;
-
- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
-
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
-#endif
-
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char *path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char *q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR (*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name =
- XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name =
- XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- return NULL;
-}
-
-char *
-chase_symlinks (const char *pathspec)
-{
-#ifndef S_ISLNK
- return xstrdup (pathspec);
-#else
- char buf[LT_PATHMAX];
- struct stat s;
- char *tmp_pathspec = xstrdup (pathspec);
- char *p;
- int has_symlinks = 0;
- while (strlen (tmp_pathspec) && !has_symlinks)
- {
- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
- tmp_pathspec));
- if (lstat (tmp_pathspec, &s) == 0)
- {
- if (S_ISLNK (s.st_mode) != 0)
- {
- has_symlinks = 1;
- break;
- }
-
- /* search backwards for last DIR_SEPARATOR */
- p = tmp_pathspec + strlen (tmp_pathspec) - 1;
- while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- p--;
- if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- {
- /* no more DIR_SEPARATORS left */
- break;
- }
- *p = '\0';
- }
- else
- {
- char *errstr = strerror (errno);
- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
- }
- }
- XFREE (tmp_pathspec);
-
- if (!has_symlinks)
- {
- return xstrdup (pathspec);
- }
-
- tmp_pathspec = realpath (pathspec, buf);
- if (tmp_pathspec == 0)
- {
- lt_fatal ("Could not follow symlinks for %s", pathspec);
- }
- return xstrdup (tmp_pathspec);
-#endif
-}
-
-char *
-strendzap (char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert (str != NULL);
- assert (pat != NULL);
-
- len = strlen (str);
- patlen = strlen (pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp (str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char *mode,
- const char *message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
- {
-#ifdef HAVE_SETENV
- /* always make a copy, for consistency with !HAVE_SETENV */
- char *str = xstrdup (value);
- setenv (name, str, 1);
-#else
- int len = strlen (name) + 1 + strlen (value) + 1;
- char *str = XMALLOC (char, len);
- sprintf (str, "%s=%s", name, value);
- if (putenv (str) != EXIT_SUCCESS)
- {
- XFREE (str);
- }
-#endif
- }
-}
-
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
- char *new_value;
- if (orig_value && *orig_value)
- {
- int orig_value_len = strlen (orig_value);
- int add_len = strlen (add);
- new_value = XMALLOC (char, add_len + orig_value_len + 1);
- if (to_end)
- {
- strcpy (new_value, orig_value);
- strcpy (new_value + orig_value_len, add);
- }
- else
- {
- strcpy (new_value, add);
- strcpy (new_value + add_len, orig_value);
- }
- }
- else
- {
- new_value = xstrdup (add);
- }
- return new_value;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
- const char *p;
- int len;
- if (!arg || !*arg)
- return 1;
-
- p = strchr (arg, (int)'=');
-
- if (!p)
- return 1;
-
- *value = xstrdup (++p);
-
- len = strlen (arg) - strlen (*value);
- *name = XMALLOC (char, len);
- strncpy (*name, arg, len-1);
- (*name)[len - 1] = '\0';
-
- return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
- }
-
- lt_setenv (name, value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 1);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- /* some systems can't cope with a ':'-terminated path #' */
- int len = strlen (new_value);
- while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
- {
- new_value[len-1] = '\0';
- }
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-void
-lt_update_lib_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# func_mode_link arg...
-func_mode_link ()
-{
- $opt_debug
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- # It is impossible to link a dll without this setting, and
- # we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
- # flag for every libtool invocation.
- # allow_undefined=no
-
- # FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
- # even a static library is built. For now, we need to specify
- # -no-undefined on the libtool link line when we can be certain
- # that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
- ;;
- *)
- allow_undefined=yes
- ;;
- esac
- libtool_args=$nonopt
- base_compile="$nonopt $@"
- compile_command=$nonopt
- finalize_command=$nonopt
-
- compile_rpath=
- finalize_rpath=
- compile_shlibpath=
- finalize_shlibpath=
- convenience=
- old_convenience=
- deplibs=
- old_deplibs=
- compiler_flags=
- linker_flags=
- dllsearchpath=
- lib_search_path=`pwd`
- inst_prefix_dir=
- new_inherited_linker_flags=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
- weak_libs=
- single_module="${wl}-single_module"
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- break
- ;;
- -all-static | -static | -static-libtool-libs)
- case $arg in
- -all-static)
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- func_warning "complete static linking is impossible in this configuration"
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- -static)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=built
- ;;
- -static-libtool-libs)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- esac
- build_libtool_libs=no
- build_old_libs=yes
- break
- ;;
- esac
- done
-
- # See if our shared archives depend on static archives.
- test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
- # Go through the arguments, transforming them on the way.
- while test "$#" -gt 0; do
- arg="$1"
- shift
- func_quote_for_eval "$arg"
- qarg=$func_quote_for_eval_unquoted_result
- func_append libtool_args " $func_quote_for_eval_result"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- func_append compile_command " @OUTPUT@"
- func_append finalize_command " @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- func_append compile_command " @SYMFILE@"
- func_append finalize_command " @SYMFILE@"
- preload=yes
- fi
- case $arg in
- *.la | *.lo) ;; # We handle these cases below.
- force)
- if test "$dlself" = no; then
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- self)
- if test "$prev" = dlprefiles; then
- dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
- dlself=yes
- else
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- *)
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- else
- dlprefiles="$dlprefiles $arg"
- fi
- prev=
- continue
- ;;
- esac
- ;;
- expsyms)
- export_symbols="$arg"
- test -f "$arg" \
- || func_fatal_error "symbol file \`$arg' does not exist"
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- framework)
- case $host in
- *-*-darwin*)
- case "$deplibs " in
- *" $qarg.ltframework "*) ;;
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
- ;;
- esac
- ;;
- esac
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat "$save_arg"`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- done
- else
- func_fatal_error "link input file \`$arg' does not exist"
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- if test "$prev" = rpath; then
- case "$rpath " in
- *" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
- esac
- else
- case "$xrpath " in
- *" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
- esac
- fi
- prev=
- continue
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- weak)
- weak_libs="$weak_libs $arg"
- prev=
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- func_append compile_command " $wl$qarg"
- func_append finalize_command " $wl$qarg"
- continue
- ;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
- fi # test -n "$prev"
-
- prevarg="$arg"
-
- case $arg in
- -all-static)
- if test -n "$link_static_flag"; then
- # See comment for -static flag below, for more details.
- func_append compile_command " $link_static_flag"
- func_append finalize_command " $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- func_fatal_error "\`-allow-undefined' must not be used because it is the default"
- ;;
-
- -avoid-version)
- avoid_version=yes
- continue
- ;;
-
- -dlopen)
- prev=dlfiles
- continue
- ;;
-
- -dlpreopen)
- prev=dlprefiles
- continue
- ;;
-
- -export-dynamic)
- export_dynamic=yes
- continue
- ;;
-
- -export-symbols | -export-symbols-regex)
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- func_fatal_error "more than one -exported-symbols argument is not allowed"
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework)
- prev=framework
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- continue
- ;;
-
- # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
- # so, if we see these flags be careful not to treat them like -L
- -L[A-Z][A-Z]*:*)
- case $with_gcc/$host in
- no/*-*-irix* | /*-*-irix*)
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- func_stripname '-L' '' "$arg"
- dir=$func_stripname_result
- if test -z "$dir"; then
- if test "$#" -gt 0; then
- func_fatal_error "require no space between \`-L' and \`$1'"
- else
- func_fatal_error "need path for \`-L' option"
- fi
- fi
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of \`$dir'"
- dir="$absdir"
- ;;
- esac
- case "$deplibs " in
- *" -L$dir "*) ;;
- *)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- ::) dllsearchpath=$dir;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs System.ltframework"
- continue
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
- ;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- # Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- case "$new_inherited_linker_flags " in
- *" $arg "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
- esac
- continue
- ;;
-
- -multi_module)
- single_module="${wl}-multi_module"
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
- # The PATH hackery in wrapper scripts is required on Windows
- # and Darwin in order for the loader to find any dlls it needs.
- func_warning "\`-no-install' is ignored for $host"
- func_warning "assuming \`-no-fast-install' instead"
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- func_stripname '-R' '' "$arg"
- dir=$func_stripname_result
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -shared)
- # The effects of -shared are defined in a previous loop.
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -static | -static-libtool-libs)
- # The effects of -static are defined in a previous loop.
- # We used to do the same as -all-static on platforms that
- # didn't have a PIC flag, but the assumption that the effects
- # would be equivalent was wrong. It would break on at least
- # Digital Unix and AIX.
- continue
- ;;
-
- -thread-safe)
- thread_safe=yes
- continue
- ;;
-
- -version-info)
- prev=vinfo
- continue
- ;;
-
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -weak)
- prev=weak
- continue
- ;;
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Wl,*)
- func_stripname '-Wl,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
- linker_flags="$linker_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # -msg_* for osf cc
- -msg_*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- compiler_flags="$compiler_flags $arg"
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- ;;
-
- *.$libext)
- # An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
- continue
- ;;
-
- *.la)
- # A libtool-controlled library.
-
- if test "$prev" = dlfiles; then
- # This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
- prev=
- elif test "$prev" = dlprefiles; then
- # The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
- prev=
- else
- deplibs="$deplibs $arg"
- fi
- continue
- ;;
-
- # Some other compiler argument.
- *)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
- done # argument parsing loop
-
- test -n "$prev" && \
- func_fatal_help "the \`$prevarg' option requires an argument"
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- func_basename "$output"
- outputname="$func_basename_result"
- libobjs_save="$libobjs"
-
- if test -n "$shlibpath_var"; then
- # get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
- else
- shlib_search_path=
- fi
- eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
- func_dirname "$output" "/" ""
- output_objdir="$func_dirname_result$objdir"
- # Create the object directory.
- func_mkdir_p "$output_objdir"
-
- # Determine the type of output
- case $output in
- "")
- func_fatal_help "you must specify an output file"
- ;;
- *.$libext) linkmode=oldlib ;;
- *.lo | *.$objext) linkmode=obj ;;
- *.la) linkmode=lib ;;
- *) linkmode=prog ;; # Anything else should be a program.
- esac
-
- specialdeplibs=
-
- libs=
- # Find all interdependent deplibs by searching for libraries
- # that are linked more than once (e.g. -la -lb -la)
- for deplib in $deplibs; do
- if $opt_duplicate_deps ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if $opt_duplicate_compiler_generated_deps; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- deplibs=
- newdependency_libs=
- newlib_search_path=
- need_relink=no # whether we're linking any uninstalled libtool libraries
- notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
-
- case $linkmode in
- lib)
- passes="conv dlpreopen link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
- ;;
- esac
- done
- ;;
- prog)
- compile_deplibs=
- finalize_deplibs=
- alldeplibs=no
- newdlfiles=
- newdlprefiles=
- passes="conv scan dlopen dlpreopen link"
- ;;
- *) passes="conv"
- ;;
- esac
-
- for pass in $passes; do
- # The preopen pass in lib mode reverses $deplibs; put it back here
- # so that -L comes before libs that need it for instance...
- if test "$linkmode,$pass" = "lib,link"; then
- ## FIXME: Find the place where the list is rebuilt in the wrong
- ## order, and fix it there properly
- tmp_deplibs=
- for deplib in $deplibs; do
- tmp_deplibs="$deplib $tmp_deplibs"
- done
- deplibs="$tmp_deplibs"
- fi
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
- esac
- fi
- if test "$linkmode,$pass" = "lib,dlpreopen"; then
- # Collect and forward deplibs of preopened libtool libs
- for lib in $dlprefiles; do
- # Ignore non-libtool-libs
- dependency_libs=
- case $lib in
- *.la) func_source "$lib" ;;
- esac
-
- # Collect preopened libtool deplibs, except any this library
- # has declared as weak libs
- for deplib in $dependency_libs; do
- deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
- case " $weak_libs " in
- *" $deplib_base "*) ;;
- *) deplibs="$deplibs $deplib" ;;
- esac
- done
- done
- libs="$dlprefiles"
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
-
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- func_warning "\`-l' is ignored for archives/objects"
- continue
- fi
- func_stripname '-l' '' "$deplib"
- name=$func_stripname_result
- if test "$linkmode" = lib; then
- searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
- else
- searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
- fi
- for searchdir in $searchdirs; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if func_lalib_p "$lib"; then
- library_names=
- old_library=
- func_source "$lib"
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
- lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- fi
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- *.ltframework)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- *)
- func_warning "\`-L' is ignored for archives/objects"
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- func_stripname '-R' '' "$deplib"
- dir=$func_stripname_result
- # Make sure the xrpath contains only unique directories.
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- fi
- deplibs="$deplib $deplibs"
- continue
- ;;
- *.la) lib="$deplib" ;;
- *.$libext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- case $linkmode in
- lib)
- # Linking convenience modules into shared libraries is allowed,
- # but linking other static libraries is non-portable.
- case " $dlpreconveniencelibs " in
- *" $deplib "*) ;;
- *)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $ECHO
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because the file extensions .$libext of this argument makes me believe"
- $ECHO "*** that it is just a static archive that I should not use here."
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- ;;
- esac
- continue
- ;;
- prog)
- if test "$pass" != link; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- continue
- ;;
- esac # linkmode
- ;; # *.$libext
- *.lo | *.$objext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
-
- if test "$found" = yes || test -f "$lib"; then :
- else
- func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
- fi
-
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$lib" \
- || func_fatal_error "\`$lib' is not a valid libtool archive"
-
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- inherited_linker_flags=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- func_source "$lib"
-
- # Convert "-framework foo" to "foo.ltframework"
- if test -n "$inherited_linker_flags"; then
- tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
- for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
- case " $new_inherited_linker_flags " in
- *" $tmp_inherited_linker_flag "*) ;;
- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
- esac
- done
- fi
- dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
- fi
-
- if test "$pass" = conv; then
- # Only check for convenience libraries
- deplibs="$lib $deplibs"
- if test -z "$libdir"; then
- if test -z "$old_library"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
- # It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- func_fatal_error "\`$lib' is not a convenience library"
- fi
- continue
- fi # $pass = conv
-
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
- if test -z "$linklib"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
- fi
- if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- else
- newdlfiles="$newdlfiles $lib"
- fi
- continue
- fi # $pass = dlopen
-
- # We need an absolute path.
- case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
- *)
- abs_ladir=`cd "$ladir" && pwd`
- if test -z "$abs_ladir"; then
- func_warning "cannot determine absolute directory name of \`$ladir'"
- func_warning "passing it literally to the linker, although it might fail"
- abs_ladir="$ladir"
- fi
- ;;
- esac
- func_basename "$lib"
- laname="$func_basename_result"
-
- # Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- func_stripname 'lib' '.la' "$laname"
- name=$func_stripname_result
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir" && test "$linkmode" = prog; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Keep a list of preopened convenience libraries to check
- # that they are being used correctly in the link pass.
- test -z "$libdir" && \
- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
- fi
- fi # $pass = dlpreopen
-
- if test -z "$libdir"; then
- # Link the convenience library
- if test "$linkmode" = lib; then
- deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$dir/$old_library $compile_deplibs"
- finalize_deplibs="$dir/$old_library $finalize_deplibs"
- else
- deplibs="$lib $deplibs" # used for prog,scan pass
- fi
- continue
- fi
-
-
- if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
- deplibs="$lib $deplibs"
-
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
- fi
-
- tmp_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- esac
- # Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
- deplibs="$deplib $deplibs"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$deplib $newdependency_libs"
- fi
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
- test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath:" in
- *"$absdir:"*) ;;
- *) temp_rpath="$temp_rpath$absdir:" ;;
- esac
- fi
-
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi # $linkmode,$pass = prog,link...
-
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
- fi
-
- link_static=no # Whether the deplib will be linked statically
- use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes; then
- use_static_libs=no
- fi
- if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw* | *cegcc*)
- # No point in relinking DLLs because paths are not encoded
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=no
- ;;
- *)
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- ;;
- esac
- # This is a shared library
-
- # Warn about portability, can't link against -module's on some
- # systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=""
- for dlpremoduletest in $dlprefiles; do
- if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule="$dlpremoduletest"
- break
- fi
- done
- if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
- $ECHO
- if test "$linkmode" = prog; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
- else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $ECHO "*** $linklib is not portable!"
- fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- shift
- realname="$1"
- shift
- libname=`eval "\\$ECHO \"$libname_spec\""`
- # use dlname if we got it. it's perfectly good, no?
- if test -n "$dlname"; then
- soname="$dlname"
- elif test -n "$soname_spec"; then
- # bleh windows
- case $host in
- *cygwin* | mingw* | *cegcc*)
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- func_basename "$soroot"
- soname="$func_basename_result"
- func_stripname 'lib' '.dll' "$soname"
- newlib=libimp-$func_stripname_result.a
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- func_verbose "extracting exported symbol list from \`$soname'"
- func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- func_verbose "generating import library for \`$soname'"
- func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
- fi
- # make sure the library variables are pointing to the new library
- dir=$output_objdir
- linklib=$newlib
- fi # test -n "$old_archive_from_expsyms_cmds"
-
- if test "$linkmode" = prog || test "$mode" != relink; then
- add_shlibpath=
- add_dir=
- add=
- lib_linked=yes
- case $hardcode_action in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
- case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
- *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a (non-dlopened) module then we can not
- # link against it, someone is ignoring the earlier warnings
- if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null ; then
- if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $ECHO
- $ECHO "*** And there doesn't seem to be a static archive available"
- $ECHO "*** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- elif test -n "$old_library"; then
- add="$dir/$old_library"
- fi
- fi
- esac
- elif test "$hardcode_minus_L" = no; then
- case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- func_fatal_configuration "unsupported hardcode properties"
- fi
-
- if test -n "$add_shlibpath"; then
- case :$compile_shlibpath: in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- if test "$linkmode" = prog; then
- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
- test -n "$add" && compile_deplibs="$add $compile_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes &&
- test "$hardcode_minus_L" != yes &&
- test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- fi
- fi
- fi
-
- if test "$linkmode" = prog || test "$mode" = relink; then
- add_shlibpath=
- add_dir=
- add=
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- fi
-
- if test "$linkmode" = prog; then
- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
- test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- fi
- fi
- elif test "$linkmode" = prog; then
- # Here we assume that one of hardcode_direct or hardcode_minus_L
- # is not unsupported. This is valid on all known static and
- # shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
- compile_deplibs="$dir/$linklib $compile_deplibs"
- finalize_deplibs="$dir/$linklib $finalize_deplibs"
- else
- compile_deplibs="-l$name -L$dir $compile_deplibs"
- finalize_deplibs="-l$name -L$dir $finalize_deplibs"
- fi
- elif test "$build_libtool_libs" = yes; then
- # Not a shared library
- if test "$deplibs_check_method" != pass_all; then
- # We're trying link a shared library against a static one
- # but the system doesn't support it.
-
- # Just print a warning and add the library to dependency_libs so
- # that the program can be linked against the static library.
- $ECHO
- $ECHO "*** Warning: This system can not link to static lib archive $lib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
- $ECHO "*** But as you try to build a module library, libtool will still create "
- $ECHO "*** a static module, that should work as long as the dlopening application"
- $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- else
- deplibs="$dir/$old_library $deplibs"
- link_static=yes
- fi
- fi # link shared/static library?
-
- if test "$linkmode" = lib; then
- if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
- # Extract -R from dependency_libs
- temp_deplibs=
- for libdir in $dependency_libs; do
- case $libdir in
- -R*) func_stripname '-R' '' "$libdir"
- temp_xrpath=$func_stripname_result
- case " $xrpath " in
- *" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
- esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
- esac
- done
- dependency_libs="$temp_deplibs"
- fi
-
- newlib_search_path="$newlib_search_path $absdir"
- # Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
- # ... and its dependency_libs
- tmp_libs=
- for deplib in $dependency_libs; do
- newdependency_libs="$deplib $newdependency_libs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
-
- if test "$link_all_deplibs" != no; then
- # Add the search paths of all dependency libraries
- for deplib in $dependency_libs; do
- path=
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- func_dirname "$deplib" "" "."
- dir="$func_dirname_result"
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of \`$dir'"
- absdir="$dir"
- fi
- ;;
- esac
- if $GREP "^installed=no" $deplib > /dev/null; then
- case $host in
- *-*-darwin*)
- depdepl=
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$absdir/$objdir/$depdepl" ; then
- depdepl="$absdir/$objdir/$depdepl"
- darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- if test -z "$darwin_install_name"; then
- darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- fi
- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
- path=
- fi
- fi
- ;;
- *)
- path="-L$absdir/$objdir"
- ;;
- esac
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
- func_warning "\`$deplib' seems to be moved"
-
- path="-L$absdir"
- fi
- ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- if test "$pass" = link; then
- if test "$linkmode" = "prog"; then
- compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
- finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
- else
- compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- fi
- fi
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
- # Link the dlpreopened libraries before other libraries
- for deplib in $save_deplibs; do
- deplibs="$deplib $deplibs"
- done
- fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
- # Make sure lib_search_path contains only unique directories.
- lib_search_path=
- for dir in $newlib_search_path; do
- case "$lib_search_path " in
- *" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
- esac
- done
- newlib_search_path=
- fi
-
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
- vars="compile_deplibs finalize_deplibs"
- fi
- for var in $vars dependency_libs; do
- # Add libraries to $var in reverse order
- eval tmp_libs=\"\$$var\"
- new_libs=
- for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
- *)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
- esac
- ;;
- esac
- done
- tmp_libs=
- for deplib in $new_libs; do
- case $deplib in
- -L*)
- case " $tmp_libs " in
- *" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- done
- eval $var=\"$tmp_libs\"
- done # for var
- fi
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- fi
- if test "$linkmode" = prog || test "$linkmode" = lib; then
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for archives"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for archives" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for archives"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for archives"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for archives"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for archives"
-
- test -n "$export_symbols$export_symbols_regex" && \
- func_warning "\`-export-symbols' is ignored for archives"
-
- # Now set the variables for building old libraries.
- build_libtool_libs=no
- oldlibs="$output"
- objs="$objs$old_deplibs"
- ;;
-
- lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
- case $outputname in
- lib*)
- func_stripname 'lib' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- test "$module" = no && \
- func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- func_stripname '' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- func_stripname '' '.la' "$outputname"
- libname=$func_stripname_result
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- test "$dlself" != no && \
- func_warning "\`-dlopen self' is ignored for libtool libraries"
-
- set dummy $rpath
- shift
- test "$#" -gt 1 && \
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for convenience libraries"
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- shift
- IFS="$save_ifs"
-
- test -n "$7" && \
- func_fatal_help "too many parameters to \`-version-info'"
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$1"
- number_minor="$2"
- number_revision="$3"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows|none)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_minor"
- lt_irix_increment=no
- ;;
- *)
- func_fatal_configuration "$modename: unknown library version type \`$version_type'"
- ;;
- esac
- ;;
- no)
- current="$1"
- revision="$2"
- age="$3"
- ;;
- esac
-
- # Check that each of the things are valid numbers.
- case $current in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "CURRENT \`$current' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "REVISION \`$revision' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "AGE \`$age' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- func_error "AGE \`$age' is greater than the current interface number \`$current'"
- func_fatal_error "\`$vinfo' is not valid version information"
- fi
-
- # Calculate the version variables.
- major=
- versuffix=
- verstring=
- case $version_type in
- none) ;;
-
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- func_arith $current + 1
- minor_current=$func_arith_result
- xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current"
- ;;
-
- irix | nonstopux)
- if test "X$lt_irix_increment" = "Xno"; then
- func_arith $current - $age
- else
- func_arith $current - $age + 1
- fi
- major=$func_arith_result
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- func_arith $revision - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- func_arith $current - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- qnx)
- major=".$current"
- versuffix=".$current"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
-
- *)
- func_fatal_configuration "unknown library version type \`$version_type'"
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- case $version_type in
- darwin)
- # we can't check for "0.0" in archive_cmds due to quoting
- # problems, so we reset it completely
- verstring=
- ;;
- *)
- verstring="0.0"
- ;;
- esac
- if test "$need_version" = no; then
- versuffix=
- else
- versuffix=".0.0"
- fi
- fi
-
- # Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
- major=
- versuffix=
- verstring=""
- fi
-
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- func_warning "undefined symbols not allowed in $host shared libraries"
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
-
- fi
-
- func_generate_dlsyms "$libname" "$libname" "yes"
- libobjs="$libobjs $symfileobj"
- test "X$libobjs" = "X " && libobjs=
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$ECHO "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext | *.gcno)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- test -n "$removelist" && \
- func_show_eval "${RM}r \$removelist"
- fi
-
- # Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
- # Transform .lo files to .o files.
- oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
- fi
-
- # Eliminate all temporary directories.
- #for path in $notinst_path; do
- # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
- # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
- # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
- #done
-
- if test -n "$xrpath"; then
- # If the user specified any rpath flags, then add them.
- temp_xrpath=
- for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
- dependency_libs="$temp_xrpath $dependency_libs"
- fi
- fi
-
- # Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
- dlfiles=
- for lib in $old_dlfiles; do
- case " $dlprefiles $dlfiles " in
- *" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
- esac
- done
-
- # Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
- dlprefiles=
- for lib in $old_dlprefiles; do
- case "$dlprefiles " in
- *" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
- esac
- done
-
- if test "$build_libtool_libs" = yes; then
- if test -n "$rpath"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs System.ltframework"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- ;;
- *)
- # Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
- fi
- ;;
- esac
- fi
-
- # Transform deplibs into only deplibs that can be linked in shared.
- name_save=$name
- libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- # I'm not sure if I'm treating the release correctly. I think
- # release should show up in the -l (ie -lgmp5) so we don't want to
- # add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
- newdeplibs=
- droppeddeps=no
- case $deplibs_check_method in
- pass_all)
- # Don't check for shared/static. Everything works.
- # This might be a little naive. We might want to check
- # whether the library exists or not. But this is on
- # osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behavior.
- newdeplibs=$deplibs
- ;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which I believe you do not have"
- $ECHO "*** because a test_compile did reveal that the linker did not use it for"
- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because a test_compile did reveal that the linker did not use this one"
- $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
- $ECHO "*** make it link in! You will probably need to install it or some"
- $ECHO "*** library that it depends on before this library will be fully"
- $ECHO "*** functional. Installing it before continuing would be even better."
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method; shift
- file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- # Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null |
- $GREP " -> " >/dev/null; then
- continue
- fi
- # The statement above tries to avoid entering an
- # endless loop below, in case of cyclic links.
- # We might still enter an endless loop, since a link
- # loop can be closed while we follow links,
- # but so what?
- potlib="$potent_lib"
- while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
- case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
- esac
- done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
- $SED -e 10q |
- $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
- $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
- -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
- done
- fi
- if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
- $GREP . >/dev/null; then
- $ECHO
- if test "X$deplibs_check_method" = "Xnone"; then
- $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
- else
- $ECHO "*** Warning: inter-library dependencies are not known to be supported."
- fi
- $ECHO "*** All declared inter-library dependencies are being dropped."
- droppeddeps=yes
- fi
- ;;
- esac
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
- libname=$libname_save
- name=$name_save
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library with the System framework
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
- $ECHO
- $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
- $ECHO "*** a static module, that should work as long as the dlopening"
- $ECHO "*** application is linked with the -dlopen flag."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- else
- $ECHO "*** The inter-library dependencies that have been dropped here will be"
- $ECHO "*** automatically added whenever a program is linked with this library"
- $ECHO "*** or is declared to -dlopen it."
-
- if test "$allow_undefined" = no; then
- $ECHO
- $ECHO "*** Since this library must not contain undefined symbols,"
- $ECHO "*** because either the platform does not support them or"
- $ECHO "*** it was explicitly requested with -no-undefined,"
- $ECHO "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- fi
- fi
- # Done checking deplibs!
- deplibs=$newdeplibs
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- case $host in
- *-*-darwin*)
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- deplibs="$new_libs"
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
-
- # Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
- fi
-
- # Get the real and link names of the library.
- eval shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- shift
- realname="$1"
- shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- test "X$libobjs" = "X " && libobjs=
-
- delfiles=
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols="$output_objdir/$libname.uexp"
- delfiles="$delfiles $export_symbols"
- fi
-
- orig_export_symbols=
- case $host_os in
- cygwin* | mingw* | cegcc*)
- if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
- # exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
- # and it's NOT already a .def file. Must figure out
- # which of the given symbols are data symbols and tag
- # them as such. So, trigger use of export_symbols_cmds.
- # export_symbols gets reassigned inside the "prepare
- # the list of exported symbols" if statement, so the
- # include_expsyms logic still works.
- orig_export_symbols="$export_symbols"
- export_symbols=
- always_export_symbols=yes
- fi
- fi
- ;;
- esac
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- func_len " $cmd"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- func_show_eval "$cmd" 'exit $?'
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- func_verbose "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec" &&
- test "$compiler_needs_object" = yes &&
- test -z "$libobjs"; then
- # extract the archives, so we have objects to list.
- # TODO: could optimize this to just extract one archive.
- whole_archive_flag_spec=
- fi
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
- fi
-
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
- eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
- fi
-
- # Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- func_len " $test_cmds" &&
- len=$func_len_result &&
- test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise
- # or, if using GNU ld and skipped_export is not :, use a linker
- # script.
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- last_robj=
- k=1
-
- if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
- output=${output_objdir}/${output_la}.lnkscript
- func_verbose "creating GNU ld script: $output"
- $ECHO 'INPUT (' > $output
- for obj in $save_libobjs
- do
- $ECHO "$obj" >> $output
- done
- $ECHO ')' >> $output
- delfiles="$delfiles $output"
- elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
- output=${output_objdir}/${output_la}.lnk
- func_verbose "creating linker input file list: $output"
- : > $output
- set x $save_libobjs
- shift
- firstobj=
- if test "$compiler_needs_object" = yes; then
- firstobj="$1 "
- shift
- fi
- for obj
- do
- $ECHO "$obj" >> $output
- done
- delfiles="$delfiles $output"
- output=$firstobj\"$file_list_spec$output\"
- else
- if test -n "$save_libobjs"; then
- func_verbose "creating reloadable object files..."
- output=$output_objdir/$output_la-${k}.$objext
- eval test_cmds=\"$reload_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
-
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- if test "X$objlist" = X ||
- test "$len" -lt "$max_cmd_len"; then
- func_append objlist " $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- func_arith $k + 1
- k=$func_arith_result
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- func_len " $last_robj"
- func_arith $len0 + $func_len_result
- len=$func_arith_result
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
- fi
- delfiles="$delfiles $output"
-
- else
- output=
- fi
-
- if ${skipped_export-false}; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
- fi
- fi
-
- test -n "$save_libobjs" &&
- func_verbose "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- if test -n "$export_symbols_regex" && ${skipped_export-false}; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
-
- if ${skipped_export-false}; then
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
- fi
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
- fi
-
- if test -n "$delfiles"; then
- # Append the command to remove temporary files to $cmds.
- eval cmds=\"\$cmds~\$RM $delfiles\"
- fi
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
-
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- func_show_eval '${RM}r "$gentop"'
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
- fi
- done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
- ;;
-
- obj)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for objects"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for objects" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for objects"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for objects"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for objects"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for objects"
-
- case $output in
- *.lo)
- test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
- libobj=$output
- func_lo2o "$libobj"
- obj=$func_lo2o_result
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $opt_dry_run || $RM $obj $libobj
-
- # Objects from convenience libraries. This assumes
- # single-version convenience libraries. Whenever we create
- # different ones for PIC/non-PIC, this we'll have to duplicate
- # the extraction.
- reload_conv_objs=
- gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec and hope we can get by with
- # turning comma into space..
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- fi
- fi
-
- # Create the old-style object.
- reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
- output="$obj"
- func_execute_cmds "$reload_cmds" 'exit $?'
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- # $show "echo timestamp > $libobj"
- # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test -n "$pic_flag" || test "$pic_mode" != default; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
- func_execute_cmds "$reload_cmds" 'exit $?'
- fi
-
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
- output=$func_stripname_result.exe;;
- esac
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for programs"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for programs"
-
- test "$preload" = yes \
- && test "$dlopen_support" = unknown \
- && test "$dlopen_self" = unknown \
- && test "$dlopen_self_static" = unknown && \
- func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- case $host in
- *-*-darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- # But is supposedly fixed on 10.4 or later (yay!).
- if test "$tagname" = CXX ; then
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[0123])
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $compile_deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $compile_deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- compile_deplibs="$new_libs"
-
-
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
-
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- ::) dllsearchpath=$libdir;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- fi
-
- func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
- # template prelinking step
- if test -n "$prelink_cmds"; then
- func_execute_cmds "$prelink_cmds" 'exit $?'
- fi
-
- wrappers_required=yes
- case $host in
- *cygwin* | *mingw* )
- if test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- *cegcc)
- # Disable wrappers for cegcc, we are cross compiling anyway.
- wrappers_required=no
- ;;
- *)
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- esac
- if test "$wrappers_required" = no; then
- # Replace the output file specification.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
-
- # We have no uninstalled library dependencies, so finalize right now.
- exit_status=0
- func_show_eval "$link_command" 'exit_status=$?'
-
- # Delete the generated files.
- if test -f "$output_objdir/${outputname}S.${objext}"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
- fi
-
- exit $exit_status
- fi
-
- if test -n "$compile_shlibpath$finalize_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
- fi
- if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
- fi
-
- compile_var=
- finalize_var=
- if test -n "$runpath_var"; then
- if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- if test -n "$finalize_perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
- done
- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- fi
-
- if test "$no_install" = yes; then
- # We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- # Delete the old output file.
- $opt_dry_run || $RM $output
- # Link the executable and exit
- func_show_eval "$link_command" 'exit $?'
- exit $EXIT_SUCCESS
- fi
-
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
-
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "\`$output' will be relinked during installation"
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
-
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
- # Delete the old output files.
- $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- func_show_eval "$link_command" 'exit $?'
-
- # Now create the wrapper script.
- func_verbose "creating $output"
-
- # Quote the relink command for shipping.
- if test -n "$relink_command"; then
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Quote $ECHO for shipping.
- if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Only actually do things if not in dry run mode.
- $opt_dry_run || {
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) func_stripname '' '.exe' "$output"
- output=$func_stripname_result ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- func_stripname '' '.exe' "$outputname"
- outputname=$func_stripname_result ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- func_dirname_and_basename "$output" "" "."
- output_name=$func_basename_result
- output_path=$func_dirname_result
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $RM $cwrappersource $cwrapper
- trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_cwrapperexe_src > $cwrappersource
-
- # The wrapper executable is built using the $host compiler,
- # because it contains $host paths and files. If cross-
- # compiling, it, like the target executable, must be
- # executed on the $host or under an emulation environment.
- $opt_dry_run || {
- $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
- $STRIP $cwrapper
- }
-
- # Now, create the wrapper script for func_source use:
- func_ltwrapper_scriptname $cwrapper
- $RM $func_ltwrapper_scriptname_result
- trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
- $opt_dry_run || {
- # note: this script will not be executed, so do not chmod.
- if test "x$build" = "x$host" ; then
- $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
- else
- func_emit_wrapper no > $func_ltwrapper_scriptname_result
- fi
- }
- ;;
- * )
- $RM $output
- trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_wrapper no > $output
- chmod +x $output
- ;;
- esac
- }
- exit $EXIT_SUCCESS
- ;;
- esac
-
- # See if we need to build an old-fashioned archive.
- for oldlib in $oldlibs; do
-
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save $symfileobj"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- if test "$preload" = yes && test -f "$symfileobj"; then
- oldobjs="$oldobjs $symfileobj"
- fi
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- func_basename "$obj"
- $ECHO "$func_basename_result"
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $ECHO "copying selected object files to avoid basename conflicts..."
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
- func_mkdir_p "$gentop"
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- func_basename "$obj"
- objbase="$func_basename_result"
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- func_arith $counter + 1
- counter=$func_arith_result
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
- eval cmds=\"$old_archive_cmds\"
-
- func_len " $cmds"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- func_verbose "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
- oldobjs=
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- eval test_cmds=\"$old_archive_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
- for obj in $save_oldobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- func_append objlist " $obj"
- if test "$len" -lt "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- len=$len0
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- func_execute_cmds "$cmds" 'exit $?'
- done
-
- test -n "$generated" && \
- func_show_eval "${RM}r$generated"
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- func_verbose "creating $output"
-
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
- # Only create the output if not a dry run.
- $opt_dry_run || {
- for installed in no yes; do
- if test "$installed" = yes; then
- if test -z "$install_libdir"; then
- break
- fi
- output="$output_objdir/$outputname"i
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- *.la)
- func_basename "$deplib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
-
- for lib in $dlfiles; do
- case $lib in
- *.la)
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlfiles="$newdlfiles $libdir/$name"
- ;;
- *) newdlfiles="$newdlfiles $lib" ;;
- esac
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- *.la)
- # Only pass preopened files to the pseudo-archive (for
- # eventual linking with the app. that links it) if we
- # didn't already link the preopened objects directly into
- # the library:
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlprefiles="$newdlprefiles $libdir/$name"
- ;;
- esac
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- done
- dlprefiles="$newdlprefiles"
- fi
- $RM $output
- # place dlname in correct position for cygwin
- tdlname=$dlname
- case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
- $ECHO >> $output "\
-relink_command=\"$relink_command\""
- fi
- done
- }
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
- ;;
- esac
- exit $EXIT_SUCCESS
-}
-
-{ test "$mode" = link || test "$mode" = relink; } &&
- func_mode_link ${1+"$@"}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
- $opt_debug
- RM="$nonopt"
- files=
- rmforce=
- exit_status=0
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- for arg
- do
- case $arg in
- -f) RM="$RM $arg"; rmforce=yes ;;
- -*) RM="$RM $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- test -z "$RM" && \
- func_fatal_help "you must specify an RM program"
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- if test "X$dir" = X.; then
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- func_basename "$file"
- name="$func_basename_result"
- test "$mode" = uninstall && objdir="$dir"
-
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
- case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
- esac
- fi
-
- # Don't error if the file doesn't exist and rm -f was used.
- if { test -L "$file"; } >/dev/null 2>&1 ||
- { test -h "$file"; } >/dev/null 2>&1 ||
- test -f "$file"; then
- :
- elif test -d "$file"; then
- exit_status=1
- continue
- elif test "$rmforce" = yes; then
- continue
- fi
-
- rmfiles="$file"
-
- case $name in
- *.la)
- # Possibly a libtool archive, so verify it.
- if func_lalib_p "$file"; then
- func_source $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
- done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
- case "$mode" in
- clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
- *" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
- esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- ;;
- uninstall)
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
- # FIXME: should reinstall the best remaining shared library.
- ;;
- esac
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if func_lalib_p "$file"; then
-
- # Read the .lo file
- func_source $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" &&
- test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" &&
- test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- func_stripname '' '.exe' "$name"
- noexename=$func_stripname_result
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if func_ltwrapper_p "$file"; then
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- relink_command=
- func_source $func_ltwrapper_scriptname_result
- rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
- else
- relink_command=
- func_source $dir/$noexename
- fi
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- func_show_eval "$RM $rmfiles" 'exit_status=1'
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- func_show_eval "rmdir $dir >/dev/null 2>&1"
- fi
- done
-
- exit $exit_status
-}
-
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
- func_mode_uninstall ${1+"$@"}
-
-test -z "$mode" && {
- help="$generic_help"
- func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode \`$mode'"
-
-if test -n "$exec_cmd"; then
- eval exec "$exec_cmd"
- exit $EXIT_FAILURE
-fi
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# vi:sw=2
-
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/missing b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/missing
deleted file mode 100644
index 28055d2ae..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/build-aux/missing
+++ /dev/null
@@ -1,376 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
-
-Send bug reports to <bug-automake@gnu.org>."
- exit $?
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
- exit $?
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
-esac
-
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar*)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar*)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/cmake/internal_utils.cmake b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/cmake/internal_utils.cmake
deleted file mode 100644
index 7efc2ac79..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/cmake/internal_utils.cmake
+++ /dev/null
@@ -1,216 +0,0 @@
-# Defines functions and macros useful for building Google Test and
-# Google Mock.
-#
-# Note:
-#
-# - This file will be run twice when building Google Mock (once via
-# Google Test's CMakeLists.txt, and once via Google Mock's).
-# Therefore it shouldn't have any side effects other than defining
-# the functions and macros.
-#
-# - The functions/macros defined in this file may depend on Google
-# Test and Google Mock's option() definitions, and thus must be
-# called *after* the options have been defined.
-
-# Tweaks CMake's default compiler/linker settings to suit Google Test's needs.
-#
-# This must be a macro(), as inside a function string() can only
-# update variables in the function scope.
-macro(fix_default_compiler_settings_)
- if (MSVC)
- # For MSVC, CMake sets certain flags to defaults we want to override.
- # This replacement code is taken from sample in the CMake Wiki at
- # http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace.
- foreach (flag_var
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)
- # When Google Test is built as a shared library, it should also use
- # shared runtime libraries. Otherwise, it may end up with multiple
- # copies of runtime library data in different modules, resulting in
- # hard-to-find crashes. When it is built as a static library, it is
- # preferable to use CRT as static libraries, as we don't have to rely
- # on CRT DLLs being available. CMake always defaults to using shared
- # CRT libraries, so we override that default here.
- string(REPLACE "/MD" "-MT" ${flag_var} "${${flag_var}}")
- endif()
-
- # We prefer more strict warning checking for building Google Test.
- # Replaces /W3 with /W4 in defaults.
- string(REPLACE "/W3" "-W4" ${flag_var} "${${flag_var}}")
- endforeach()
- endif()
-endmacro()
-
-# Defines the compiler/linker flags used to build Google Test and
-# Google Mock. You can tweak these definitions to suit your need. A
-# variable's value is empty before it's explicitly assigned to.
-macro(config_compiler_and_linker)
- if (NOT gtest_disable_pthreads)
- # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
- find_package(Threads)
- endif()
-
- fix_default_compiler_settings_()
- if (MSVC)
- # Newlines inside flags variables break CMake's NMake generator.
- # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
- set(cxx_base_flags "-GS -W4 -WX -wd4127 -wd4251 -wd4275 -nologo -J -Zi")
- set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
- set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
- set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
- set(cxx_no_exception_flags "-D_HAS_EXCEPTIONS=0")
- set(cxx_no_rtti_flags "-GR-")
- elseif (CMAKE_COMPILER_IS_GNUCXX)
- set(cxx_base_flags "-Wall -Wshadow")
- set(cxx_exception_flags "-fexceptions")
- set(cxx_no_exception_flags "-fno-exceptions")
- # Until version 4.3.2, GCC doesn't define a macro to indicate
- # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
- # explicitly.
- set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
- set(cxx_strict_flags "-Wextra")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
- set(cxx_exception_flags "-features=except")
- # Sun Pro doesn't provide macros to indicate whether exceptions and
- # RTTI are enabled, so we define GTEST_HAS_* explicitly.
- set(cxx_no_exception_flags "-features=no%except -DGTEST_HAS_EXCEPTIONS=0")
- set(cxx_no_rtti_flags "-features=no%rtti -DGTEST_HAS_RTTI=0")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR
- CMAKE_CXX_COMPILER_ID STREQUAL "XL")
- # CMake 2.8 changes Visual Age's compiler ID to "XL".
- set(cxx_exception_flags "-qeh")
- set(cxx_no_exception_flags "-qnoeh")
- # Until version 9.0, Visual Age doesn't define a macro to indicate
- # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
- # explicitly.
- set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "HP")
- set(cxx_base_flags "-AA -mt")
- set(cxx_exception_flags "-DGTEST_HAS_EXCEPTIONS=1")
- set(cxx_no_exception_flags "+noeh -DGTEST_HAS_EXCEPTIONS=0")
- # RTTI can not be disabled in HP aCC compiler.
- set(cxx_no_rtti_flags "")
- endif()
-
- if (CMAKE_USE_PTHREADS_INIT) # The pthreads library is available and allowed.
- set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=1")
- else()
- set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=0")
- endif()
-
- # For building gtest's own tests and samples.
- set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}")
- set(cxx_no_exception
- "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_no_exception_flags}")
- set(cxx_default "${cxx_exception}")
- set(cxx_no_rtti "${cxx_default} ${cxx_no_rtti_flags}")
- set(cxx_use_own_tuple "${cxx_default} -DGTEST_USE_OWN_TR1_TUPLE=1")
-
- # For building the gtest libraries.
- set(cxx_strict "${cxx_default} ${cxx_strict_flags}")
-endmacro()
-
-# Defines the gtest & gtest_main libraries. User tests should link
-# with one of them.
-function(cxx_library_with_type name type cxx_flags)
- # type can be either STATIC or SHARED to denote a static or shared library.
- # ARGN refers to additional arguments after 'cxx_flags'.
- add_library(${name} ${type} ${ARGN})
- set_target_properties(${name}
- PROPERTIES
- COMPILE_FLAGS "${cxx_flags}")
- if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
- set_target_properties(${name}
- PROPERTIES
- COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1")
- endif()
- if (CMAKE_USE_PTHREADS_INIT)
- target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT})
- endif()
-endfunction()
-
-########################################################################
-#
-# Helper functions for creating build targets.
-
-function(cxx_shared_library name cxx_flags)
- cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN})
-endfunction()
-
-function(cxx_library name cxx_flags)
- cxx_library_with_type(${name} "" "${cxx_flags}" ${ARGN})
-endfunction()
-
-# cxx_executable_with_flags(name cxx_flags libs srcs...)
-#
-# creates a named C++ executable that depends on the given libraries and
-# is built from the given source files with the given compiler flags.
-function(cxx_executable_with_flags name cxx_flags libs)
- add_executable(${name} ${ARGN})
- if (cxx_flags)
- set_target_properties(${name}
- PROPERTIES
- COMPILE_FLAGS "${cxx_flags}")
- endif()
- if (BUILD_SHARED_LIBS)
- set_target_properties(${name}
- PROPERTIES
- COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
- endif()
- # To support mixing linking in static and dynamic libraries, link each
- # library in with an extra call to target_link_libraries.
- foreach (lib "${libs}")
- target_link_libraries(${name} ${lib})
- endforeach()
-endfunction()
-
-# cxx_executable(name dir lib srcs...)
-#
-# creates a named target that depends on the given libs and is built
-# from the given source files. dir/name.cc is implicitly included in
-# the source file list.
-function(cxx_executable name dir libs)
- cxx_executable_with_flags(
- ${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
-endfunction()
-
-# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
-find_package(PythonInterp)
-
-# cxx_test_with_flags(name cxx_flags libs srcs...)
-#
-# creates a named C++ test that depends on the given libs and is built
-# from the given source files with the given compiler flags.
-function(cxx_test_with_flags name cxx_flags libs)
- cxx_executable_with_flags(${name} "${cxx_flags}" "${libs}" ${ARGN})
- add_test(${name} ${name})
-endfunction()
-
-# cxx_test(name libs srcs...)
-#
-# creates a named test target that depends on the given libs and is
-# built from the given source files. Unlike cxx_test_with_flags,
-# test/name.cc is already implicitly included in the source file list.
-function(cxx_test name libs)
- cxx_test_with_flags("${name}" "${cxx_default}" "${libs}"
- "test/${name}.cc" ${ARGN})
-endfunction()
-
-# py_test(name)
-#
-# creates a Python test with the given name whose main module is in
-# test/name.py. It does nothing if Python is not installed.
-function(py_test name)
- # We are not supporting Python tests on Linux yet as they consider
- # all Linux environments to be google3 and try to use google3 features.
- if (PYTHONINTERP_FOUND)
- # ${CMAKE_BINARY_DIR} is known at configuration time, so we can
- # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
- # only at ctest runtime (by calling ctest -c <Configuration>), so
- # we have to escape $ to delay variable substitution here.
- add_test(${name}
- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
- --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
- endif()
-endfunction()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.cbproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.cbproj
deleted file mode 100644
index 95c3054b8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.cbproj
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{bca37a72-5b07-46cf-b44e-89f8e06451a2}</ProjectGuid>
- <Config Condition="'$(Config)'==''">Release</Config>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
- <Base>true</Base>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
- <Base>true</Base>
- <Cfg_1>true</Cfg_1>
- <CfgParent>Base</CfgParent>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
- <Base>true</Base>
- <Cfg_2>true</Cfg_2>
- <CfgParent>Base</CfgParent>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Base)'!=''">
- <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
- <OutputExt>lib</OutputExt>
- <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
- <Defines>NO_STRICT</Defines>
- <DynamicRTL>true</DynamicRTL>
- <UsePackages>true</UsePackages>
- <ProjectType>CppStaticLibrary</ProjectType>
- <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways>
- <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi</PackageImports>
- <BCC_wpar>false</BCC_wpar>
- <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</IncludePath>
- <AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs>
- <TLIB_PageSize>32</TLIB_PageSize>
- <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</ILINK_LibraryPath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_1)'!=''">
- <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
- <DCC_Optimize>false</DCC_Optimize>
- <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
- <Defines>_DEBUG;$(Defines)</Defines>
- <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
- <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
- <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
- <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
- <DCC_Define>DEBUG</DCC_Define>
- <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
- <IntermediateOutputDir>Debug</IntermediateOutputDir>
- <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
- <BCC_StackFrames>true</BCC_StackFrames>
- <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
- <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
- <TASM_Debugging>Full</TASM_Debugging>
- <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_2)'!=''">
- <Defines>NDEBUG;$(Defines)</Defines>
- <IntermediateOutputDir>Release</IntermediateOutputDir>
- <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
- <TASM_Debugging>None</TASM_Debugging>
- </PropertyGroup>
- <ProjectExtensions>
- <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality>
- <Borland.ProjectType>CppStaticLibrary</Borland.ProjectType>
- <BorlandProject>
-<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages>
-
-
- <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages>
- <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages>
- </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">1</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines><HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Count">1</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item0">32</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item1">16</HistoryLists_hlTLIB_PageSize></HistoryLists_hlTLIB_PageSize></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject>
- </ProjectExtensions>
- <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
- <ItemGroup>
- <None Include="..\include\gtest\gtest-death-test.h">
- <BuildOrder>3</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest-message.h">
- <BuildOrder>4</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest-param-test.h">
- <BuildOrder>5</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest-spi.h">
- <BuildOrder>6</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest-test-part.h">
- <BuildOrder>7</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest-typed-test.h">
- <BuildOrder>8</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest.h">
- <BuildOrder>0</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest_pred_impl.h">
- <BuildOrder>1</BuildOrder>
- </None>
- <None Include="..\include\gtest\gtest_prod.h">
- <BuildOrder>2</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-death-test-internal.h">
- <BuildOrder>9</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-filepath.h">
- <BuildOrder>10</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-internal.h">
- <BuildOrder>11</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-linked_ptr.h">
- <BuildOrder>12</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-param-util-generated.h">
- <BuildOrder>14</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-param-util.h">
- <BuildOrder>13</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-port.h">
- <BuildOrder>15</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-string.h">
- <BuildOrder>16</BuildOrder>
- </None>
- <None Include="..\include\gtest\internal\gtest-type-util.h">
- <BuildOrder>17</BuildOrder>
- </None>
- <CppCompile Include="gtest_all.cc">
- <BuildOrder>18</BuildOrder>
- </CppCompile>
- <BuildConfiguration Include="Debug">
- <Key>Cfg_1</Key>
- </BuildConfiguration>
- <BuildConfiguration Include="Release">
- <Key>Cfg_2</Key>
- </BuildConfiguration>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.groupproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.groupproj
deleted file mode 100644
index faf31cab6..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest.groupproj
+++ /dev/null
@@ -1,54 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{c1d923e0-6cba-4332-9b6f-3420acbf5091}</ProjectGuid>
- </PropertyGroup>
- <ItemGroup />
- <ItemGroup>
- <Projects Include="gtest.cbproj" />
- <Projects Include="gtest_main.cbproj" />
- <Projects Include="gtest_unittest.cbproj" />
- </ItemGroup>
- <ProjectExtensions>
- <Borland.Personality>Default.Personality</Borland.Personality>
- <Borland.ProjectType />
- <BorlandProject>
-<BorlandProject xmlns=""><Default.Personality></Default.Personality></BorlandProject></BorlandProject>
- </ProjectExtensions>
- <Target Name="gtest">
- <MSBuild Projects="gtest.cbproj" Targets="" />
- </Target>
- <Target Name="gtest:Clean">
- <MSBuild Projects="gtest.cbproj" Targets="Clean" />
- </Target>
- <Target Name="gtest:Make">
- <MSBuild Projects="gtest.cbproj" Targets="Make" />
- </Target>
- <Target Name="gtest_main">
- <MSBuild Projects="gtest_main.cbproj" Targets="" />
- </Target>
- <Target Name="gtest_main:Clean">
- <MSBuild Projects="gtest_main.cbproj" Targets="Clean" />
- </Target>
- <Target Name="gtest_main:Make">
- <MSBuild Projects="gtest_main.cbproj" Targets="Make" />
- </Target>
- <Target Name="gtest_unittest">
- <MSBuild Projects="gtest_unittest.cbproj" Targets="" />
- </Target>
- <Target Name="gtest_unittest:Clean">
- <MSBuild Projects="gtest_unittest.cbproj" Targets="Clean" />
- </Target>
- <Target Name="gtest_unittest:Make">
- <MSBuild Projects="gtest_unittest.cbproj" Targets="Make" />
- </Target>
- <Target Name="Build">
- <CallTarget Targets="gtest;gtest_main;gtest_unittest" />
- </Target>
- <Target Name="Clean">
- <CallTarget Targets="gtest:Clean;gtest_main:Clean;gtest_unittest:Clean" />
- </Target>
- <Target Name="Make">
- <CallTarget Targets="gtest:Make;gtest_main:Make;gtest_unittest:Make" />
- </Target>
- <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
-</Project> \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_all.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_all.cc
deleted file mode 100644
index 121b2d80e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_all.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: Josh Kelley (joshkel@gmail.com)
-//
-// Google C++ Testing Framework (Google Test)
-//
-// C++Builder's IDE cannot build a static library from files with hyphens
-// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 .
-// This file serves as a workaround.
-
-#include "src/gtest-all.cc"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_link.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_link.cc
deleted file mode 100644
index 918eccd19..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_link.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: Josh Kelley (joshkel@gmail.com)
-//
-// Google C++ Testing Framework (Google Test)
-//
-// Links gtest.lib and gtest_main.lib into the current project in C++Builder.
-// This means that these libraries can't be renamed, but it's the only way to
-// ensure that Debug versus Release test builds are linked against the
-// appropriate Debug or Release build of the libraries.
-
-#pragma link "gtest.lib"
-#pragma link "gtest_main.lib"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_main.cbproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_main.cbproj
deleted file mode 100644
index d76ce1398..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_main.cbproj
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{bca37a72-5b07-46cf-b44e-89f8e06451a2}</ProjectGuid>
- <Config Condition="'$(Config)'==''">Release</Config>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
- <Base>true</Base>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
- <Base>true</Base>
- <Cfg_1>true</Cfg_1>
- <CfgParent>Base</CfgParent>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
- <Base>true</Base>
- <Cfg_2>true</Cfg_2>
- <CfgParent>Base</CfgParent>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Base)'!=''">
- <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
- <OutputExt>lib</OutputExt>
- <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
- <Defines>NO_STRICT</Defines>
- <DynamicRTL>true</DynamicRTL>
- <UsePackages>true</UsePackages>
- <ProjectType>CppStaticLibrary</ProjectType>
- <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways>
- <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi</PackageImports>
- <BCC_wpar>false</BCC_wpar>
- <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</IncludePath>
- <AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs>
- <TLIB_PageSize>32</TLIB_PageSize>
- <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</ILINK_LibraryPath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_1)'!=''">
- <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
- <DCC_Optimize>false</DCC_Optimize>
- <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
- <Defines>_DEBUG;$(Defines)</Defines>
- <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
- <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
- <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
- <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
- <DCC_Define>DEBUG</DCC_Define>
- <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
- <IntermediateOutputDir>Debug</IntermediateOutputDir>
- <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
- <BCC_StackFrames>true</BCC_StackFrames>
- <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
- <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
- <TASM_Debugging>Full</TASM_Debugging>
- <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_2)'!=''">
- <Defines>NDEBUG;$(Defines)</Defines>
- <IntermediateOutputDir>Release</IntermediateOutputDir>
- <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
- <TASM_Debugging>None</TASM_Debugging>
- </PropertyGroup>
- <ProjectExtensions>
- <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality>
- <Borland.ProjectType>CppStaticLibrary</Borland.ProjectType>
- <BorlandProject>
-<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages>
- <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages>
- <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages>
- </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">1</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines><HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Count">1</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item0">32</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item1">16</HistoryLists_hlTLIB_PageSize></HistoryLists_hlTLIB_PageSize></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject>
- </ProjectExtensions>
- <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
- <ItemGroup>
- <CppCompile Include="..\src\gtest_main.cc">
- <BuildOrder>0</BuildOrder>
- </CppCompile>
- <BuildConfiguration Include="Debug">
- <Key>Cfg_1</Key>
- </BuildConfiguration>
- <BuildConfiguration Include="Release">
- <Key>Cfg_2</Key>
- </BuildConfiguration>
- </ItemGroup>
-</Project>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_unittest.cbproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_unittest.cbproj
deleted file mode 100644
index dc5db8e4d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/codegear/gtest_unittest.cbproj
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{eea63393-5ac5-4b9c-8909-d75fef2daa41}</ProjectGuid>
- <Config Condition="'$(Config)'==''">Release</Config>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
- <Base>true</Base>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
- <Base>true</Base>
- <Cfg_1>true</Cfg_1>
- <CfgParent>Base</CfgParent>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
- <Base>true</Base>
- <Cfg_2>true</Cfg_2>
- <CfgParent>Base</CfgParent>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Base)'!=''">
- <OutputExt>exe</OutputExt>
- <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
- <Defines>NO_STRICT</Defines>
- <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
- <DynamicRTL>true</DynamicRTL>
- <ILINK_ObjectSearchPath>..\test</ILINK_ObjectSearchPath>
- <UsePackages>true</UsePackages>
- <ProjectType>CppConsoleApplication</ProjectType>
- <NoVCL>true</NoVCL>
- <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways>
- <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi</PackageImports>
- <BCC_wpar>false</BCC_wpar>
- <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..</IncludePath>
- <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</ILINK_LibraryPath>
- <Multithreaded>true</Multithreaded>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_1)'!=''">
- <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
- <DCC_Optimize>false</DCC_Optimize>
- <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
- <Defines>_DEBUG;$(Defines)</Defines>
- <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
- <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
- <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
- <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
- <DCC_Define>DEBUG</DCC_Define>
- <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
- <IntermediateOutputDir>Debug</IntermediateOutputDir>
- <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
- <BCC_StackFrames>true</BCC_StackFrames>
- <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
- <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
- <TASM_Debugging>Full</TASM_Debugging>
- <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Cfg_2)'!=''">
- <Defines>NDEBUG;$(Defines)</Defines>
- <IntermediateOutputDir>Release</IntermediateOutputDir>
- <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
- <TASM_Debugging>None</TASM_Debugging>
- </PropertyGroup>
- <ProjectExtensions>
- <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality>
- <Borland.ProjectType>CppConsoleApplication</Borland.ProjectType>
- <BorlandProject>
-<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages>
-
-
- <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages>
- <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages>
- </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item1">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item2">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">2</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item1">STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject>
- </ProjectExtensions>
- <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
- <ItemGroup>
- <CppCompile Include="..\test\gtest_unittest.cc">
- <BuildOrder>0</BuildOrder>
- </CppCompile>
- <CppCompile Include="gtest_link.cc">
- <BuildOrder>1</BuildOrder>
- </CppCompile>
- <BuildConfiguration Include="Debug">
- <Key>Cfg_1</Key>
- </BuildConfiguration>
- <BuildConfiguration Include="Release">
- <Key>Cfg_2</Key>
- </BuildConfiguration>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure
deleted file mode 100644
index 15a7d9a62..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure
+++ /dev/null
@@ -1,17482 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for Google C++ Testing Framework 1.6.0.
-#
-# Report bugs to <googletestframework@googlegroups.com>.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: googletestframework@googlegroups.com about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
- fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-$*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='Google C++ Testing Framework'
-PACKAGE_TARNAME='gtest'
-PACKAGE_VERSION='1.6.0'
-PACKAGE_STRING='Google C++ Testing Framework 1.6.0'
-PACKAGE_BUGREPORT='googletestframework@googlegroups.com'
-PACKAGE_URL=''
-
-ac_unique_file="./COPYING"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LTLIBOBJS
-LIBOBJS
-HAVE_PTHREADS_FALSE
-HAVE_PTHREADS_TRUE
-PTHREAD_CFLAGS
-PTHREAD_LIBS
-PTHREAD_CC
-acx_pthread_config
-HAVE_PYTHON_FALSE
-HAVE_PYTHON_TRUE
-PYTHON
-CXXCPP
-CPP
-OTOOL64
-OTOOL
-LIPO
-NMEDIT
-DSYMUTIL
-lt_ECHO
-RANLIB
-AR
-OBJDUMP
-LN_S
-NM
-ac_ct_DUMPBIN
-DUMPBIN
-LD
-FGREP
-EGREP
-GREP
-SED
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-LIBTOOL
-am__fastdepCXX_FALSE
-am__fastdepCXX_TRUE
-CXXDEPMODE
-ac_ct_CXX
-CXXFLAGS
-CXX
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_dependency_tracking
-enable_shared
-enable_static
-with_pic
-enable_fast_install
-with_gnu_ld
-enable_libtool_lock
-with_pthreads
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-CPP
-CXXCPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures Google C++ Testing Framework 1.6.0 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/gtest]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of Google C++ Testing Framework 1.6.0:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-pthreads use pthreads (default is yes)
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- CPP C preprocessor
- CXXCPP C++ preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <googletestframework@googlegroups.com>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-Google C++ Testing Framework configure 1.6.0
-generated by GNU Autoconf 2.65
-
-Copyright (C) 2009 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by Google C++ Testing Framework $as_me 1.6.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Provide various options to initialize the Autoconf and configure processes.
-
-
-
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-ac_config_headers="$ac_config_headers build-aux/config.h"
-
-ac_config_files="$ac_config_files Makefile"
-
-ac_config_files="$ac_config_files scripts/gtest-config"
-
-
-# Initialize Automake with various options. We require at least v1.9, prevent
-# pedantic complaints about package files, and enable various distribution
-# targets.
-am__api_version='1.11'
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
- done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
- *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
- if test "${ac_cv_path_mkdir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in mkdir gmkdir; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
- 'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
- break 3;;
- esac
- done
- done
- done
-IFS=$as_save_IFS
-
-fi
-
- test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
- MKDIR_P="$ac_cv_path_mkdir -p"
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for MKDIR_P within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- MKDIR_P="$ac_install_sh -d"
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- am__isrc=' -I$(srcdir)'
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='gtest'
- VERSION='1.6.0'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-# Check for programs used in building Google Test.
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-depcc="$CC" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GXX=yes
-else
- GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-else
- CXXFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CXX" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.2.6b'
-macro_revision='1.3017'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DUMPBIN=$ac_ct_DUMPBIN
- fi
-fi
-
-
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4924: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:4927: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:4930: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[4-9]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[3-9]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 6136 "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_cc_needs_belf=yes
-else
- lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-
- case $host_os in
- rhapsody* | darwin*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DSYMUTIL"; then
- ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
- ac_ct_DSYMUTIL=$DSYMUTIL
- # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DSYMUTIL"; then
- ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DSYMUTIL" = x; then
- DSYMUTIL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DSYMUTIL=$ac_ct_DSYMUTIL
- fi
-else
- DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NMEDIT"; then
- ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
- ac_ct_NMEDIT=$NMEDIT
- # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NMEDIT"; then
- ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NMEDIT" = x; then
- NMEDIT=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- NMEDIT=$ac_ct_NMEDIT
- fi
-else
- NMEDIT="$ac_cv_prog_NMEDIT"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LIPO"; then
- ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LIPO"; then
- ac_ct_LIPO=$LIPO
- # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LIPO"; then
- ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LIPO" = x; then
- LIPO=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LIPO=$ac_ct_LIPO
- fi
-else
- LIPO="$ac_cv_prog_LIPO"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL"; then
- ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
- ac_ct_OTOOL=$OTOOL
- # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL"; then
- ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL" = x; then
- OTOOL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL=$ac_ct_OTOOL
- fi
-else
- OTOOL="$ac_cv_prog_OTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL64"; then
- ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
- ac_ct_OTOOL64=$OTOOL64
- # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL64"; then
- ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL64" = x; then
- OTOOL64=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL64=$ac_ct_OTOOL64
- fi
-else
- OTOOL64="$ac_cv_prog_OTOOL64"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&5
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_ld_exported_symbols_list=yes
-else
- lt_cv_ld_exported_symbols_list=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
- case $host_os in
- rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GXX=yes
-else
- GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-else
- CXXFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-depcc="$CXX" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
- CXXCPP=$ac_cv_prog_CXXCPP
-else
- ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-_lt_caught_CXX_error=yes; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-else
- _lt_caught_CXX_error=yes
-fi
-
-
-
-
-
-# Set options
-
-
-
- enable_dlopen=no
-
-
- enable_win32_dll=no
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
- withval=$with_pic; pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
- # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
- enableval=$enable_fast_install; p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_fast_install=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8193: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:8197: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='--shared'
- lt_prog_compiler_static='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-qpic'
- lt_prog_compiler_static='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8532: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:8536: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works=yes
- fi
- else
- lt_cv_prog_compiler_static_works=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8637: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:8641: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8692: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:8696: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- compiler_needs_object=no
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_direct_absolute=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu)
- link_all_deplibs=no
- ;;
- esac
-
- ld_shlibs=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- whole_archive_flag_spec=
- tmp_sharedflag='--shared' ;;
- xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld='-rpath $libdir'
- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = no; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- link_all_deplibs=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- export_dynamic_flag_spec='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
- ;;
-
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-
- else
- ld_shlibs=no
- fi
-
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo(void) {}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[lt_foo]++; }
- if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[4-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_shl_load=yes
-else
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_svld_dlopen=yes
-else
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_dld_link=yes
-else
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 11076 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 11172 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report which library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
-
-
-
-
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-compiler_needs_object_CXX=no
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_direct_absolute_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-inherit_rpath_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
- # save warnings/boilerplate of simple test code
- ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
- ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- compiler_CXX=$CC
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
- else
- lt_prog_compiler_no_builtin_flag_CXX=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_CXX=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
- ld_shlibs_CXX=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds_CXX=''
- hardcode_direct_CXX=yes
- hardcode_direct_absolute_CXX=yes
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- file_list_spec_CXX='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct_CXX=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L_CXX=yes
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- hardcode_libdir_separator_CXX=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- export_dynamic_flag_spec_CXX='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- always_export_symbols_CXX=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag_CXX='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' ${wl}-bernotok'
- allow_undefined_flag_CXX=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_CXX='$convenience'
- archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag_CXX=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- allow_undefined_flag_CXX=unsupported
- always_export_symbols_CXX=no
- enable_shared_with_static_runtimes_CXX=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc_CXX=no
- hardcode_direct_CXX=no
- hardcode_automatic_CXX=yes
- hardcode_shlibpath_var_CXX=unsupported
- whole_archive_flag_spec_CXX=''
- link_all_deplibs_CXX=yes
- allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-
- else
- ld_shlibs_CXX=no
- fi
-
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- freebsd[12]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- ld_shlibs_CXX=no
- ;;
-
- freebsd-elf*)
- archive_cmds_need_lc_CXX=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- ld_shlibs_CXX=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='${wl}-E'
- hardcode_direct_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- export_dynamic_flag_spec_CXX='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- ;;
- *)
- hardcode_direct_CXX=yes
- hardcode_direct_absolute_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- interix[3-9]*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- link_all_deplibs_CXX=yes
- ;;
- esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- inherit_rpath_CXX=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
- prelink_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- old_archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- xl*)
- # IBM XL 8.0 on PPC, with GNU ld
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object_CXX=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- ld_shlibs_CXX=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- ld_shlibs_CXX=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- hardcode_direct_absolute_CXX=yes
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- else
- ld_shlibs_CXX=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- cxx*)
- case $host in
- osf3*)
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- ;;
- esac
-
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- archive_cmds_need_lc_CXX=yes
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_shlibpath_var_CXX=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
- ;;
- esac
- link_all_deplibs_CXX=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='${wl}-z,text'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag_CXX='${wl}-z,text'
- allow_undefined_flag_CXX='${wl}-z,nodefs'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
-$as_echo "$ld_shlibs_CXX" >&6; }
- test "$ld_shlibs_CXX" = no && can_build_shared=no
-
- GCC_CXX="$GXX"
- LD_CXX="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- # Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-
-cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX="${prev}${p}"
- else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$postdeps_CXX"; then
- postdeps_CXX="${prev}${p}"
- else
- postdeps_CXX="${postdeps_CXX} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$predep_objects_CXX"; then
- predep_objects_CXX="$p"
- else
- predep_objects_CXX="$predep_objects_CXX $p"
- fi
- else
- if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX="$p"
- else
- postdep_objects_CXX="$postdep_objects_CXX $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix[3-9]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- predep_objects_CXX=
- postdep_objects_CXX=
- postdeps_CXX=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
- compiler_lib_search_dirs_CXX=
-if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_CXX='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- lt_prog_compiler_pic_CXX=
- ;;
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic_CXX=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic_CXX='-fPIC -shared'
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[4-9]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- else
- lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- lt_prog_compiler_pic_CXX='+Z'
- fi
- ;;
- aCC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_CXX='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fpic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- xlc* | xlC*)
- # IBM XL 8.0 on PPC
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-qpic'
- lt_prog_compiler_static_CXX='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- lt_prog_compiler_pic_CXX='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic_CXX='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- lt_prog_compiler_wl_CXX='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- lt_prog_compiler_pic_CXX='-pic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- lcc*)
- # Lucid
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- lt_prog_compiler_can_build_shared_CXX=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic_CXX=
- ;;
- *)
- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
-$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works_CXX=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13128: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:13132: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works_CXX=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
- case $lt_prog_compiler_pic_CXX in
- "" | " "*) ;;
- *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
- esac
-else
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works_CXX=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works_CXX=yes
- fi
- else
- lt_cv_prog_compiler_static_works_CXX=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
- :
-else
- lt_prog_compiler_static_CXX=
-fi
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13227: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:13231: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13279: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:13283: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix[4-9]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- export_symbols_cmds_CXX="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- linux* | k*bsd*-gnu)
- link_all_deplibs_CXX=no
- ;;
- *)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
- exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
-$as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-with_gnu_ld_CXX=$with_gnu_ld
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc_CXX=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds_CXX in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl_CXX
- pic_flag=$lt_prog_compiler_pic_CXX
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
- allow_undefined_flag_CXX=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- archive_cmds_need_lc_CXX=no
- else
- archive_cmds_need_lc_CXX=yes
- fi
- allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
-$as_echo "$archive_cmds_need_lc_CXX" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[4-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" ||
- test -n "$runpath_var_CXX" ||
- test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct_CXX" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
- test "$hardcode_minus_L_CXX" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action_CXX=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action_CXX=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action_CXX=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
-$as_echo "$hardcode_action_CXX" >&6; }
-
-if test "$hardcode_action_CXX" = relink ||
- test "$inherit_rpath_CXX" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
-
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-
-# TODO(chandlerc@google.com): Currently we aren't running the Python tests
-# against the interpreter detected by AM_PATH_PYTHON, and so we condition
-# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
-# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
-# hashbang.
-PYTHON= # We *do not* allow the user to specify a python interpreter
-# Extract the first word of "python", so it can be a program name with args.
-set dummy python; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PYTHON+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PYTHON in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON=":"
- ;;
-esac
-fi
-PYTHON=$ac_cv_path_PYTHON
-if test -n "$PYTHON"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
-$as_echo "$PYTHON" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "$PYTHON" != ":"; then :
- prog="import sys
-# split strings by '.' and convert to numeric. Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
-sys.exit(sys.hexversion < minverhex)"
- if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
- ($PYTHON -c "$prog") >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then :
- :
-else
- PYTHON=":"
-fi
-fi
- if test "$PYTHON" != ":"; then
- HAVE_PYTHON_TRUE=
- HAVE_PYTHON_FALSE='#'
-else
- HAVE_PYTHON_TRUE='#'
- HAVE_PYTHON_FALSE=
-fi
-
-
-# Configure pthreads.
-
-# Check whether --with-pthreads was given.
-if test "${with_pthreads+set}" = set; then :
- withval=$with_pthreads; with_pthreads=$withval
-else
- with_pthreads=check
-fi
-
-
-have_pthreads=no
-if test "x$with_pthreads" != "xno"; then :
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_join ();
-int
-main ()
-{
-return pthread_join ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- acx_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- case $flag in
- none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
- ;;
-
- -*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$acx_pthread_config"; then
- ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_acx_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
-fi
-fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- acx_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test "x$acx_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr=$attr; return attr;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- attr_name=$attr; break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
-
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
- flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- # More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
- for ac_prog in xlc_r cc_r
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
- else
- PTHREAD_CC=$CC
- fi
-
- # The next part tries to detect GCC inconsistency with -shared on some
- # architectures and systems. The problem is that in certain
- # configurations, when -shared is specified, GCC "forgets" to
- # internally use various flags which are still necessary.
-
- #
- # Prepare the flags
- #
- save_CFLAGS="$CFLAGS"
- save_LIBS="$LIBS"
- save_CC="$CC"
-
- # Try with the flags determined by the earlier checks.
- #
- # -Wl,-z,defs forces link-time symbol resolution, so that the
- # linking checks with -shared actually have any value
- #
- # FIXME: -fPIC is required for -shared on many architectures,
- # so we specify it here, but the right way would probably be to
- # properly detect whether it is actually required.
- CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CC="$PTHREAD_CC"
-
- # In order not to create several levels of indentation, we test
- # the value of "$done" until we find the cure or run out of ideas.
- done="no"
-
- # First, make sure the CFLAGS we added are actually accepted by our
- # compiler. If not (and OS X's ld, for instance, does not accept -z),
- # then we can't do this test.
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to check for GCC pthread/shared inconsistencies" >&5
-$as_echo_n "checking whether to check for GCC pthread/shared inconsistencies... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- fi
-
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -pthread is sufficient with -shared" >&5
-$as_echo_n "checking whether -pthread is sufficient with -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
-
- #
- # Linux gcc on some architectures such as mips/mipsel forgets
- # about -lpthread
- #
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lpthread fixes that" >&5
-$as_echo_n "checking whether -lpthread fixes that... " >&6; }
- LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
- #
- if test x"$done" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc_r fixes that" >&5
-$as_echo_n "checking whether -lc_r fixes that... " >&6; }
- LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$done" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- if test x"$done" = xno; then
- # OK, we have run out of ideas
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to determine how to use pthreads with shared libraries" >&5
-$as_echo "$as_me: WARNING: Impossible to determine how to use pthreads with shared libraries" >&2;}
-
- # so it's not safe to assume that we may use pthreads
- acx_pthread_ok=no
- fi
-
- CFLAGS="$save_CFLAGS"
- LIBS="$save_LIBS"
- CC="$save_CC"
-else
- PTHREAD_CC="$CC"
-fi
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-
- :
-else
- acx_pthread_ok=no
- if test "x$with_pthreads" != "xcheck"; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "--with-pthreads was specified, but unable to be used
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
- have_pthreads="$acx_pthread_ok"
-fi
- if test "x$have_pthreads" == "xyes"; then
- HAVE_PTHREADS_TRUE=
- HAVE_PTHREADS_FALSE='#'
-else
- HAVE_PTHREADS_TRUE='#'
- HAVE_PTHREADS_FALSE=
-fi
-
-
-
-
-# TODO(chandlerc@google.com) Check for the necessary system headers.
-
-# TODO(chandlerc@google.com) Check the types, structures, and other compiler
-# and architecture characteristics.
-
-# Output the generated files. No further autoconf macros may be used.
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
- if test -n "$EXEEXT"; then
- am__EXEEXT_TRUE=
- am__EXEEXT_FALSE='#'
-else
- am__EXEEXT_TRUE='#'
- am__EXEEXT_FALSE=
-fi
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
- as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${HAVE_PTHREADS_TRUE}" && test -z "${HAVE_PTHREADS_FALSE}"; then
- as_fn_error "conditional \"HAVE_PTHREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
- fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by Google C++ Testing Framework $as_me 1.6.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <googletestframework@googlegroups.com>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-Google C++ Testing Framework config.status 1.6.0
-configured by $0, generated by GNU Autoconf 2.65,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2009 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
-LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-OBJDUMP \
-deplibs_check_method \
-file_magic_cmd \
-AR \
-AR_FLAGS \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
-lt_prog_compiler_pic \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-DSYMUTIL \
-NMEDIT \
-LIPO \
-OTOOL \
-OTOOL64 \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
-hardcode_libdir_separator \
-fix_srcfile_path \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-finish_eval \
-old_striplib \
-striplib \
-compiler_lib_search_dirs \
-predep_objects \
-postdep_objects \
-predeps \
-postdeps \
-compiler_lib_search_path \
-LD_CXX \
-compiler_CXX \
-lt_prog_compiler_no_builtin_flag_CXX \
-lt_prog_compiler_wl_CXX \
-lt_prog_compiler_pic_CXX \
-lt_prog_compiler_static_CXX \
-lt_cv_prog_compiler_c_o_CXX \
-export_dynamic_flag_spec_CXX \
-whole_archive_flag_spec_CXX \
-compiler_needs_object_CXX \
-with_gnu_ld_CXX \
-allow_undefined_flag_CXX \
-no_undefined_flag_CXX \
-hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
-hardcode_libdir_separator_CXX \
-fix_srcfile_path_CXX \
-exclude_expsyms_CXX \
-include_expsyms_CXX \
-file_list_spec_CXX \
-compiler_lib_search_dirs_CXX \
-predep_objects_CXX \
-postdep_objects_CXX \
-predeps_CXX \
-postdeps_CXX \
-compiler_lib_search_path_CXX; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
-old_archive_cmds_CXX \
-old_archive_from_new_cmds_CXX \
-old_archive_from_expsyms_cmds_CXX \
-archive_cmds_CXX \
-archive_expsym_cmds_CXX \
-module_cmds_CXX \
-module_expsym_cmds_CXX \
-export_symbols_cmds_CXX \
-prelink_cmds_CXX; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
- ;;
-esac
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'
-
-
-
-
-
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "build-aux/config.h") CONFIG_HEADERS="$CONFIG_HEADERS build-aux/config.h" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "scripts/gtest-config") CONFIG_FILES="$CONFIG_FILES scripts/gtest-config" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
-
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
- break
- elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
- ac_MKDIR_P=$MKDIR_P
- case $MKDIR_P in
- [\\/$]* | ?:[\\/]* ) ;;
- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
-
- case $ac_file$ac_mode in
- "scripts/gtest-config":F) chmod +x scripts/gtest-config ;;
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
- ;;
- "libtool":C)
-
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-# The names of the tagged configurations supported by this script.
-available_tags="CXX "
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# An object symbol dumper.
-OBJDUMP=$lt_OBJDUMP
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# Transform the output of nm in a C name address pair when lib prefix is needed.
-global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
-DSYMUTIL=$lt_DSYMUTIL
-
-# Tool to change global to local symbols on Mac OS X.
-NMEDIT=$lt_NMEDIT
-
-# Tool to manipulate fat objects and archives on Mac OS X.
-LIPO=$lt_LIPO
-
-# ldd/readelf like tool for Mach-O binaries on Mac OS X.
-OTOOL=$lt_OTOOL
-
-# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
-OTOOL64=$lt_OTOOL64
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects
-postdep_objects=$lt_postdep_objects
-predeps=$lt_predeps
-postdeps=$lt_postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1+=\$2"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1=\$$1\$2"
-}
-
-_LT_EOF
- ;;
- esac
-
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
-
- cat <<_LT_EOF >> "$ofile"
-
-# ### BEGIN LIBTOOL TAG CONFIG: CXX
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds_CXX
-
-# A language specific compiler.
-CC=$lt_compiler_CXX
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object_CXX
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld_CXX
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute_CXX
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic_CXX
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath_CXX
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_CXX
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds_CXX
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec_CXX
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects_CXX
-postdep_objects=$lt_postdep_objects_CXX
-predeps=$lt_predeps_CXX
-postdeps=$lt_postdeps_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# ### END LIBTOOL TAG CONFIG: CXX
-_LT_EOF
-
- ;;
-
- esac
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure.ac b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure.ac
deleted file mode 100644
index fa6602901..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/configure.ac
+++ /dev/null
@@ -1,68 +0,0 @@
-m4_include(m4/acx_pthread.m4)
-
-# At this point, the Xcode project assumes the version string will be three
-# integers separated by periods and surrounded by square brackets (e.g.
-# "[1.0.1]"). It also asumes that there won't be any closing parenthesis
-# between "AC_INIT(" and the closing ")" including comments and strings.
-AC_INIT([Google C++ Testing Framework],
- [1.6.0],
- [googletestframework@googlegroups.com],
- [gtest])
-
-# Provide various options to initialize the Autoconf and configure processes.
-AC_PREREQ([2.59])
-AC_CONFIG_SRCDIR([./COPYING])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_HEADERS([build-aux/config.h])
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config])
-
-# Initialize Automake with various options. We require at least v1.9, prevent
-# pedantic complaints about package files, and enable various distribution
-# targets.
-AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects])
-
-# Check for programs used in building Google Test.
-AC_PROG_CC
-AC_PROG_CXX
-AC_LANG([C++])
-AC_PROG_LIBTOOL
-
-# TODO(chandlerc@google.com): Currently we aren't running the Python tests
-# against the interpreter detected by AM_PATH_PYTHON, and so we condition
-# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
-# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
-# hashbang.
-PYTHON= # We *do not* allow the user to specify a python interpreter
-AC_PATH_PROG([PYTHON],[python],[:])
-AS_IF([test "$PYTHON" != ":"],
- [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])])
-AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"])
-
-# Configure pthreads.
-AC_ARG_WITH([pthreads],
- [AS_HELP_STRING([--with-pthreads],
- [use pthreads (default is yes)])],
- [with_pthreads=$withval],
- [with_pthreads=check])
-
-have_pthreads=no
-AS_IF([test "x$with_pthreads" != "xno"],
- [ACX_PTHREAD(
- [],
- [AS_IF([test "x$with_pthreads" != "xcheck"],
- [AC_MSG_FAILURE(
- [--with-pthreads was specified, but unable to be used])])])
- have_pthreads="$acx_pthread_ok"])
-AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_LIBS)
-
-# TODO(chandlerc@google.com) Check for the necessary system headers.
-
-# TODO(chandlerc@google.com) Check the types, structures, and other compiler
-# and architecture characteristics.
-
-# Output the generated files. No further autoconf macros may be used.
-AC_OUTPUT
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest-all.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest-all.cc
deleted file mode 100644
index 5ced66a90..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest-all.cc
+++ /dev/null
@@ -1,9118 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// Google C++ Testing Framework (Google Test)
-//
-// Sometimes it's desirable to build Google Test by compiling a single file.
-// This file serves this purpose.
-
-// This line ensures that gtest.h can be compiled on its own, even
-// when it's fused.
-#include "gtest/gtest.h"
-
-// The following lines pull in the real gtest *.cc files.
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Utilities for testing Google Test itself and code that uses Google Test
-// (e.g. frameworks built on top of Google Test).
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-
-
-namespace testing {
-
-// This helper class can be used to mock out Google Test failure reporting
-// so that we can test Google Test or code that builds on Google Test.
-//
-// An object of this class appends a TestPartResult object to the
-// TestPartResultArray object given in the constructor whenever a Google Test
-// failure is reported. It can either intercept only failures that are
-// generated in the same thread that created this object or it can intercept
-// all generated failures. The scope of this mock object can be controlled with
-// the second argument to the two arguments constructor.
-class GTEST_API_ ScopedFakeTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- // The two possible mocking modes of this object.
- enum InterceptMode {
- INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures.
- INTERCEPT_ALL_THREADS // Intercepts all failures.
- };
-
- // The c'tor sets this object as the test part result reporter used
- // by Google Test. The 'result' parameter specifies where to report the
- // results. This reporter will only catch failures generated in the current
- // thread. DEPRECATED
- explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);
-
- // Same as above, but you can choose the interception scope of this object.
- ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,
- TestPartResultArray* result);
-
- // The d'tor restores the previous test part result reporter.
- virtual ~ScopedFakeTestPartResultReporter();
-
- // Appends the TestPartResult object to the TestPartResultArray
- // received in the constructor.
- //
- // This method is from the TestPartResultReporterInterface
- // interface.
- virtual void ReportTestPartResult(const TestPartResult& result);
- private:
- void Init();
-
- const InterceptMode intercept_mode_;
- TestPartResultReporterInterface* old_reporter_;
- TestPartResultArray* const result_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter);
-};
-
-namespace internal {
-
-// A helper class for implementing EXPECT_FATAL_FAILURE() and
-// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring. If that's not the case, a
-// non-fatal failure will be generated.
-class GTEST_API_ SingleFailureChecker {
- public:
- // The constructor remembers the arguments.
- SingleFailureChecker(const TestPartResultArray* results,
- TestPartResult::Type type,
- const string& substr);
- ~SingleFailureChecker();
- private:
- const TestPartResultArray* const results_;
- const TestPartResult::Type type_;
- const string substr_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-// A set of macros for testing Google Test assertions or code that's expected
-// to generate Google Test fatal failures. It verifies that the given
-// statement will cause exactly one fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_FATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-// - 'statement' cannot reference local non-static variables or
-// non-static members of the current object.
-// - 'statement' cannot return a value.
-// - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works. The AcceptsMacroThatExpandsToUnprotectedComma test in
-// gtest_unittest.cc will fail to compile if we do that.
-#define EXPECT_FATAL_FAILURE(statement, substr) \
- do { \
- class GTestExpectFatalFailureHelper {\
- public:\
- static void Execute() { statement; }\
- };\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
- GTestExpectFatalFailureHelper::Execute();\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
- do { \
- class GTestExpectFatalFailureHelper {\
- public:\
- static void Execute() { statement; }\
- };\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ALL_THREADS, &gtest_failures);\
- GTestExpectFatalFailureHelper::Execute();\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-// A macro for testing Google Test assertions or code that's expected to
-// generate Google Test non-fatal failures. It asserts that the given
-// statement will cause exactly one non-fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// 'statement' is allowed to reference local variables and members of
-// the current object.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-// - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works. If we do that, the code won't compile when the user gives
-// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that
-// expands to code containing an unprotected comma. The
-// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc
-// catches that.
-//
-// For the same reason, we have to write
-// if (::testing::internal::AlwaysTrue()) { statement; }
-// instead of
-// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-// to avoid an MSVC warning on unreachable code.
-#define EXPECT_NONFATAL_FAILURE(statement, substr) \
- do {\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
- (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
- if (::testing::internal::AlwaysTrue()) { statement; }\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
- do {\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
- (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS,\
- &gtest_failures);\
- if (::testing::internal::AlwaysTrue()) { statement; }\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-
-#include <ctype.h>
-#include <math.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <wctype.h>
-
-#include <algorithm>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <vector>
-
-#if GTEST_OS_LINUX
-
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-
-# include <fcntl.h> // NOLINT
-# include <limits.h> // NOLINT
-# include <sched.h> // NOLINT
-// Declares vsnprintf(). This header is not available on Windows.
-# include <strings.h> // NOLINT
-# include <sys/mman.h> // NOLINT
-# include <sys/time.h> // NOLINT
-# include <unistd.h> // NOLINT
-# include <string>
-
-#elif GTEST_OS_SYMBIAN
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-
-#elif GTEST_OS_ZOS
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-
-// On z/OS we additionally need strings.h for strcasecmp.
-# include <strings.h> // NOLINT
-
-#elif GTEST_OS_WINDOWS_MOBILE // We are on Windows CE.
-
-# include <windows.h> // NOLINT
-
-#elif GTEST_OS_WINDOWS // We are on Windows proper.
-
-# include <io.h> // NOLINT
-# include <sys/timeb.h> // NOLINT
-# include <sys/types.h> // NOLINT
-# include <sys/stat.h> // NOLINT
-
-# if GTEST_OS_WINDOWS_MINGW
-// MinGW has gettimeofday() but not _ftime64().
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-// TODO(kenton@google.com): There are other ways to get the time on
-// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW
-// supports these. consider using them instead.
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-# endif // GTEST_OS_WINDOWS_MINGW
-
-// cpplint thinks that the header is already included, so we want to
-// silence it.
-# include <windows.h> // NOLINT
-
-#else
-
-// Assume other platforms have gettimeofday().
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-
-// cpplint thinks that the header is already included, so we want to
-// silence it.
-# include <sys/time.h> // NOLINT
-# include <unistd.h> // NOLINT
-
-#endif // GTEST_OS_LINUX
-
-#if GTEST_HAS_EXCEPTIONS
-# include <stdexcept>
-#endif
-
-#if GTEST_CAN_STREAM_RESULTS_
-# include <arpa/inet.h> // NOLINT
-# include <netdb.h> // NOLINT
-#endif
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Utility functions and classes used by the Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// This file contains purely Google Test's internal implementation. Please
-// DO NOT #INCLUDE IT IN A USER PROGRAM.
-
-#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_
-#define GTEST_SRC_GTEST_INTERNAL_INL_H_
-
-// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is
-// part of Google Test's implementation; otherwise it's undefined.
-#if !GTEST_IMPLEMENTATION_
-// A user is trying to include this from his code - just say no.
-# error "gtest-internal-inl.h is part of Google Test's internal implementation."
-# error "It must not be included except by Google Test itself."
-#endif // GTEST_IMPLEMENTATION_
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif // !_WIN32_WCE
-#include <stddef.h>
-#include <stdlib.h> // For strtoll/_strtoul64/malloc/free.
-#include <string.h> // For memmove.
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-
-#if GTEST_OS_WINDOWS
-# include <windows.h> // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-
-namespace testing {
-
-// Declares the flags.
-//
-// We don't want the users to modify this flag in the code, but want
-// Google Test's own unit tests to be able to access it. Therefore we
-// declare it here as opposed to in gtest.h.
-GTEST_DECLARE_bool_(death_test_use_fork);
-
-namespace internal {
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library. This is solely for testing GetTestTypeId().
-GTEST_API_ extern const TypeId kTestTypeIdInGoogleTest;
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests";
-const char kBreakOnFailureFlag[] = "break_on_failure";
-const char kCatchExceptionsFlag[] = "catch_exceptions";
-const char kColorFlag[] = "color";
-const char kFilterFlag[] = "filter";
-const char kListTestsFlag[] = "list_tests";
-const char kOutputFlag[] = "output";
-const char kPrintTimeFlag[] = "print_time";
-const char kRandomSeedFlag[] = "random_seed";
-const char kRepeatFlag[] = "repeat";
-const char kShuffleFlag[] = "shuffle";
-const char kStackTraceDepthFlag[] = "stack_trace_depth";
-const char kStreamResultToFlag[] = "stream_result_to";
-const char kThrowOnFailureFlag[] = "throw_on_failure";
-
-// A valid random seed must be in [1, kMaxRandomSeed].
-const int kMaxRandomSeed = 99999;
-
-// g_help_flag is true iff the --help flag or an equivalent form is
-// specified on the command line.
-GTEST_API_ extern bool g_help_flag;
-
-// Returns the current time in milliseconds.
-GTEST_API_ TimeInMillis GetTimeInMillis();
-
-// Returns true iff Google Test should use colors in the output.
-GTEST_API_ bool ShouldUseColor(bool stdout_is_tty);
-
-// Formats the given time in milliseconds as seconds.
-GTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms);
-
-// Parses a string for an Int32 flag, in the form of "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-GTEST_API_ bool ParseInt32Flag(
- const char* str, const char* flag, Int32* value);
-
-// Returns a random seed in range [1, kMaxRandomSeed] based on the
-// given --gtest_random_seed flag value.
-inline int GetRandomSeedFromFlag(Int32 random_seed_flag) {
- const unsigned int raw_seed = (random_seed_flag == 0) ?
- static_cast<unsigned int>(GetTimeInMillis()) :
- static_cast<unsigned int>(random_seed_flag);
-
- // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
- // it's easy to type.
- const int normalized_seed =
- static_cast<int>((raw_seed - 1U) %
- static_cast<unsigned int>(kMaxRandomSeed)) + 1;
- return normalized_seed;
-}
-
-// Returns the first valid random seed after 'seed'. The behavior is
-// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is
-// considered to be 1.
-inline int GetNextRandomSeed(int seed) {
- GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
- << "Invalid random seed " << seed << " - must be in [1, "
- << kMaxRandomSeed << "].";
- const int next_seed = seed + 1;
- return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
-}
-
-// This class saves the values of all Google Test flags in its c'tor, and
-// restores them in its d'tor.
-class GTestFlagSaver {
- public:
- // The c'tor.
- GTestFlagSaver() {
- also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests);
- break_on_failure_ = GTEST_FLAG(break_on_failure);
- catch_exceptions_ = GTEST_FLAG(catch_exceptions);
- color_ = GTEST_FLAG(color);
- death_test_style_ = GTEST_FLAG(death_test_style);
- death_test_use_fork_ = GTEST_FLAG(death_test_use_fork);
- filter_ = GTEST_FLAG(filter);
- internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);
- list_tests_ = GTEST_FLAG(list_tests);
- output_ = GTEST_FLAG(output);
- print_time_ = GTEST_FLAG(print_time);
- random_seed_ = GTEST_FLAG(random_seed);
- repeat_ = GTEST_FLAG(repeat);
- shuffle_ = GTEST_FLAG(shuffle);
- stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);
- stream_result_to_ = GTEST_FLAG(stream_result_to);
- throw_on_failure_ = GTEST_FLAG(throw_on_failure);
- }
-
- // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS.
- ~GTestFlagSaver() {
- GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;
- GTEST_FLAG(break_on_failure) = break_on_failure_;
- GTEST_FLAG(catch_exceptions) = catch_exceptions_;
- GTEST_FLAG(color) = color_;
- GTEST_FLAG(death_test_style) = death_test_style_;
- GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;
- GTEST_FLAG(filter) = filter_;
- GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;
- GTEST_FLAG(list_tests) = list_tests_;
- GTEST_FLAG(output) = output_;
- GTEST_FLAG(print_time) = print_time_;
- GTEST_FLAG(random_seed) = random_seed_;
- GTEST_FLAG(repeat) = repeat_;
- GTEST_FLAG(shuffle) = shuffle_;
- GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;
- GTEST_FLAG(stream_result_to) = stream_result_to_;
- GTEST_FLAG(throw_on_failure) = throw_on_failure_;
- }
- private:
- // Fields for saving the original values of flags.
- bool also_run_disabled_tests_;
- bool break_on_failure_;
- bool catch_exceptions_;
- String color_;
- String death_test_style_;
- bool death_test_use_fork_;
- String filter_;
- String internal_run_death_test_;
- bool list_tests_;
- String output_;
- bool print_time_;
- bool pretty_;
- internal::Int32 random_seed_;
- internal::Int32 repeat_;
- bool shuffle_;
- internal::Int32 stack_trace_depth_;
- String stream_result_to_;
- bool throw_on_failure_;
-} GTEST_ATTRIBUTE_UNUSED_;
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// The output buffer str must containt at least 32 characters.
-// The function returns the address of the output buffer.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'.
-GTEST_API_ char* CodePointToUtf8(UInt32 code_point, char* str);
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)
-// UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-GTEST_API_ String WideStringToUtf8(const wchar_t* str, int num_chars);
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded();
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (e.g., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-GTEST_API_ bool ShouldShard(const char* total_shards_str,
- const char* shard_index_str,
- bool in_subprocess_for_death_test);
-
-// Parses the environment variable var as an Int32. If it is unset,
-// returns default_val. If it is not an Int32, prints an error and
-// and aborts.
-GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val);
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true iff the test should be run on this shard. The test id is
-// some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-GTEST_API_ bool ShouldRunTestOnShard(
- int total_shards, int shard_index, int test_id);
-
-// STL container utilities.
-
-// Returns the number of elements in the given container that satisfy
-// the given predicate.
-template <class Container, typename Predicate>
-inline int CountIf(const Container& c, Predicate predicate) {
- // Implemented as an explicit loop since std::count_if() in libCstd on
- // Solaris has a non-standard signature.
- int count = 0;
- for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
- if (predicate(*it))
- ++count;
- }
- return count;
-}
-
-// Applies a function/functor to each element in the container.
-template <class Container, typename Functor>
-void ForEach(const Container& c, Functor functor) {
- std::for_each(c.begin(), c.end(), functor);
-}
-
-// Returns the i-th element of the vector, or default_value if i is not
-// in range [0, v.size()).
-template <typename E>
-inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
- return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];
-}
-
-// Performs an in-place shuffle of a range of the vector's elements.
-// 'begin' and 'end' are element indices as an STL-style range;
-// i.e. [begin, end) are shuffled, where 'end' == size() means to
-// shuffle to the end of the vector.
-template <typename E>
-void ShuffleRange(internal::Random* random, int begin, int end,
- std::vector<E>* v) {
- const int size = static_cast<int>(v->size());
- GTEST_CHECK_(0 <= begin && begin <= size)
- << "Invalid shuffle range start " << begin << ": must be in range [0, "
- << size << "].";
- GTEST_CHECK_(begin <= end && end <= size)
- << "Invalid shuffle range finish " << end << ": must be in range ["
- << begin << ", " << size << "].";
-
- // Fisher-Yates shuffle, from
- // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle
- for (int range_width = end - begin; range_width >= 2; range_width--) {
- const int last_in_range = begin + range_width - 1;
- const int selected = begin + random->Generate(range_width);
- std::swap((*v)[selected], (*v)[last_in_range]);
- }
-}
-
-// Performs an in-place shuffle of the vector's elements.
-template <typename E>
-inline void Shuffle(internal::Random* random, std::vector<E>* v) {
- ShuffleRange(random, 0, static_cast<int>(v->size()), v);
-}
-
-// A function for deleting an object. Handy for being used as a
-// functor.
-template <typename T>
-static void Delete(T* x) {
- delete x;
-}
-
-// A predicate that checks the key of a TestProperty against a known key.
-//
-// TestPropertyKeyIs is copyable.
-class TestPropertyKeyIs {
- public:
- // Constructor.
- //
- // TestPropertyKeyIs has NO default constructor.
- explicit TestPropertyKeyIs(const char* key)
- : key_(key) {}
-
- // Returns true iff the test name of test property matches on key_.
- bool operator()(const TestProperty& test_property) const {
- return String(test_property.key()).Compare(key_) == 0;
- }
-
- private:
- String key_;
-};
-
-// Class UnitTestOptions.
-//
-// This class contains functions for processing options the user
-// specifies when running the tests. It has only static members.
-//
-// In most cases, the user can specify an option using either an
-// environment variable or a command line flag. E.g. you can set the
-// test filter using either GTEST_FILTER or --gtest_filter. If both
-// the variable and the flag are present, the latter overrides the
-// former.
-class GTEST_API_ UnitTestOptions {
- public:
- // Functions for processing the gtest_output flag.
-
- // Returns the output format, or "" for normal printed output.
- static String GetOutputFormat();
-
- // Returns the absolute path of the requested output file, or the
- // default (test_detail.xml in the original working directory) if
- // none was explicitly specified.
- static String GetAbsolutePathToOutputFile();
-
- // Functions for processing the gtest_filter flag.
-
- // Returns true iff the wildcard pattern matches the string. The
- // first ':' or '\0' character in pattern marks the end of it.
- //
- // This recursive algorithm isn't very efficient, but is clear and
- // works well enough for matching test names, which are short.
- static bool PatternMatchesString(const char *pattern, const char *str);
-
- // Returns true iff the user-specified filter matches the test case
- // name and the test name.
- static bool FilterMatchesTest(const String &test_case_name,
- const String &test_name);
-
-#if GTEST_OS_WINDOWS
- // Function for supporting the gtest_catch_exception flag.
-
- // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
- // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
- // This function is useful as an __except condition.
- static int GTestShouldProcessSEH(DWORD exception_code);
-#endif // GTEST_OS_WINDOWS
-
- // Returns true if "name" matches the ':' separated list of glob-style
- // filters in "filter".
- static bool MatchesFilter(const String& name, const char* filter);
-};
-
-// Returns the current application's name, removing directory path if that
-// is present. Used by UnitTestOptions::GetOutputFile.
-GTEST_API_ FilePath GetCurrentExecutableName();
-
-// The role interface for getting the OS stack trace as a string.
-class OsStackTraceGetterInterface {
- public:
- OsStackTraceGetterInterface() {}
- virtual ~OsStackTraceGetterInterface() {}
-
- // Returns the current OS stack trace as a String. Parameters:
- //
- // max_depth - the maximum number of stack frames to be included
- // in the trace.
- // skip_count - the number of top frames to be skipped; doesn't count
- // against max_depth.
- virtual String CurrentStackTrace(int max_depth, int skip_count) = 0;
-
- // UponLeavingGTest() should be called immediately before Google Test calls
- // user code. It saves some information about the current stack that
- // CurrentStackTrace() will use to find and hide Google Test stack frames.
- virtual void UponLeavingGTest() = 0;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface);
-};
-
-// A working implementation of the OsStackTraceGetterInterface interface.
-class OsStackTraceGetter : public OsStackTraceGetterInterface {
- public:
- OsStackTraceGetter() : caller_frame_(NULL) {}
- virtual String CurrentStackTrace(int max_depth, int skip_count);
- virtual void UponLeavingGTest();
-
- // This string is inserted in place of stack frames that are part of
- // Google Test's implementation.
- static const char* const kElidedFramesMarker;
-
- private:
- Mutex mutex_; // protects all internal state
-
- // We save the stack frame below the frame that calls user code.
- // We do this because the address of the frame immediately below
- // the user code changes between the call to UponLeavingGTest()
- // and any calls to CurrentStackTrace() from within the user code.
- void* caller_frame_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter);
-};
-
-// Information about a Google Test trace point.
-struct TraceInfo {
- const char* file;
- int line;
- String message;
-};
-
-// This is the default global test part result reporter used in UnitTestImpl.
-// This class should only be used by UnitTestImpl.
-class DefaultGlobalTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);
- // Implements the TestPartResultReporterInterface. Reports the test part
- // result in the current test.
- virtual void ReportTestPartResult(const TestPartResult& result);
-
- private:
- UnitTestImpl* const unit_test_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter);
-};
-
-// This is the default per thread test part result reporter used in
-// UnitTestImpl. This class should only be used by UnitTestImpl.
-class DefaultPerThreadTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);
- // Implements the TestPartResultReporterInterface. The implementation just
- // delegates to the current global test part result reporter of *unit_test_.
- virtual void ReportTestPartResult(const TestPartResult& result);
-
- private:
- UnitTestImpl* const unit_test_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter);
-};
-
-// The private implementation of the UnitTest class. We don't protect
-// the methods under a mutex, as this class is not accessible by a
-// user and the UnitTest class that delegates work to this class does
-// proper locking.
-class GTEST_API_ UnitTestImpl {
- public:
- explicit UnitTestImpl(UnitTest* parent);
- virtual ~UnitTestImpl();
-
- // There are two different ways to register your own TestPartResultReporter.
- // You can register your own repoter to listen either only for test results
- // from the current thread or for results from all threads.
- // By default, each per-thread test result repoter just passes a new
- // TestPartResult to the global test result reporter, which registers the
- // test part result for the currently running test.
-
- // Returns the global test part result reporter.
- TestPartResultReporterInterface* GetGlobalTestPartResultReporter();
-
- // Sets the global test part result reporter.
- void SetGlobalTestPartResultReporter(
- TestPartResultReporterInterface* reporter);
-
- // Returns the test part result reporter for the current thread.
- TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();
-
- // Sets the test part result reporter for the current thread.
- void SetTestPartResultReporterForCurrentThread(
- TestPartResultReporterInterface* reporter);
-
- // Gets the number of successful test cases.
- int successful_test_case_count() const;
-
- // Gets the number of failed test cases.
- int failed_test_case_count() const;
-
- // Gets the number of all test cases.
- int total_test_case_count() const;
-
- // Gets the number of all test cases that contain at least one test
- // that should run.
- int test_case_to_run_count() const;
-
- // Gets the number of successful tests.
- int successful_test_count() const;
-
- // Gets the number of failed tests.
- int failed_test_count() const;
-
- // Gets the number of disabled tests.
- int disabled_test_count() const;
-
- // Gets the number of all tests.
- int total_test_count() const;
-
- // Gets the number of tests that should run.
- int test_to_run_count() const;
-
- // Gets the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns true iff the unit test passed (i.e. all test cases passed).
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the unit test failed (i.e. some test case failed
- // or something outside of all tests failed).
- bool Failed() const {
- return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
- }
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- const TestCase* GetTestCase(int i) const {
- const int index = GetElementOr(test_case_indices_, i, -1);
- return index < 0 ? NULL : test_cases_[i];
- }
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- TestCase* GetMutableTestCase(int i) {
- const int index = GetElementOr(test_case_indices_, i, -1);
- return index < 0 ? NULL : test_cases_[index];
- }
-
- // Provides access to the event listener list.
- TestEventListeners* listeners() { return &listeners_; }
-
- // Returns the TestResult for the test that's currently running, or
- // the TestResult for the ad hoc test if no test is running.
- TestResult* current_test_result();
-
- // Returns the TestResult for the ad hoc test.
- const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }
-
- // Sets the OS stack trace getter.
- //
- // Does nothing if the input and the current OS stack trace getter
- // are the same; otherwise, deletes the old getter and makes the
- // input the current getter.
- void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);
-
- // Returns the current OS stack trace getter if it is not NULL;
- // otherwise, creates an OsStackTraceGetter, makes it the current
- // getter, and returns it.
- OsStackTraceGetterInterface* os_stack_trace_getter();
-
- // Returns the current OS stack trace as a String.
- //
- // The maximum number of stack frames to be included is specified by
- // the gtest_stack_trace_depth flag. The skip_count parameter
- // specifies the number of top frames to be skipped, which doesn't
- // count against the number of frames to be included.
- //
- // For example, if Foo() calls Bar(), which in turn calls
- // CurrentOsStackTraceExceptTop(1), Foo() will be included in the
- // trace but Bar() and CurrentOsStackTraceExceptTop() won't.
- String CurrentOsStackTraceExceptTop(int skip_count);
-
- // Finds and returns a TestCase with the given name. If one doesn't
- // exist, creates one and returns it.
- //
- // Arguments:
- //
- // test_case_name: name of the test case
- // type_param: the name of the test's type parameter, or NULL if
- // this is not a typed or a type-parameterized test.
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- TestCase* GetTestCase(const char* test_case_name,
- const char* type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc);
-
- // Adds a TestInfo to the unit test.
- //
- // Arguments:
- //
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- // test_info: the TestInfo object
- void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc,
- TestInfo* test_info) {
- // In order to support thread-safe death tests, we need to
- // remember the original working directory when the test program
- // was first invoked. We cannot do this in RUN_ALL_TESTS(), as
- // the user may have changed the current directory before calling
- // RUN_ALL_TESTS(). Therefore we capture the current directory in
- // AddTestInfo(), which is called to register a TEST or TEST_F
- // before main() is reached.
- if (original_working_dir_.IsEmpty()) {
- original_working_dir_.Set(FilePath::GetCurrentDir());
- GTEST_CHECK_(!original_working_dir_.IsEmpty())
- << "Failed to get the current working directory.";
- }
-
- GetTestCase(test_info->test_case_name(),
- test_info->type_param(),
- set_up_tc,
- tear_down_tc)->AddTestInfo(test_info);
- }
-
-#if GTEST_HAS_PARAM_TEST
- // Returns ParameterizedTestCaseRegistry object used to keep track of
- // value-parameterized tests and instantiate and register them.
- internal::ParameterizedTestCaseRegistry& parameterized_test_registry() {
- return parameterized_test_registry_;
- }
-#endif // GTEST_HAS_PARAM_TEST
-
- // Sets the TestCase object for the test that's currently running.
- void set_current_test_case(TestCase* a_current_test_case) {
- current_test_case_ = a_current_test_case;
- }
-
- // Sets the TestInfo object for the test that's currently running. If
- // current_test_info is NULL, the assertion results will be stored in
- // ad_hoc_test_result_.
- void set_current_test_info(TestInfo* a_current_test_info) {
- current_test_info_ = a_current_test_info;
- }
-
- // Registers all parameterized tests defined using TEST_P and
- // INSTANTIATE_TEST_CASE_P, creating regular tests for each test/parameter
- // combination. This method can be called more then once; it has guards
- // protecting from registering the tests more then once. If
- // value-parameterized tests are disabled, RegisterParameterizedTests is
- // present but does nothing.
- void RegisterParameterizedTests();
-
- // Runs all tests in this UnitTest object, prints the result, and
- // returns true if all tests are successful. If any exception is
- // thrown during a test, this test is considered to be failed, but
- // the rest of the tests will still be run.
- bool RunAllTests();
-
- // Clears the results of all tests, except the ad hoc tests.
- void ClearNonAdHocTestResult() {
- ForEach(test_cases_, TestCase::ClearTestCaseResult);
- }
-
- // Clears the results of ad-hoc test assertions.
- void ClearAdHocTestResult() {
- ad_hoc_test_result_.Clear();
- }
-
- enum ReactionToSharding {
- HONOR_SHARDING_PROTOCOL,
- IGNORE_SHARDING_PROTOCOL
- };
-
- // Matches the full name of each test against the user-specified
- // filter to decide whether the test should run, then records the
- // result in each TestCase and TestInfo object.
- // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests
- // based on sharding variables in the environment.
- // Returns the number of tests that should run.
- int FilterTests(ReactionToSharding shard_tests);
-
- // Prints the names of the tests matching the user-specified filter flag.
- void ListTestsMatchingFilter();
-
- const TestCase* current_test_case() const { return current_test_case_; }
- TestInfo* current_test_info() { return current_test_info_; }
- const TestInfo* current_test_info() const { return current_test_info_; }
-
- // Returns the vector of environments that need to be set-up/torn-down
- // before/after the tests are run.
- std::vector<Environment*>& environments() { return environments_; }
-
- // Getters for the per-thread Google Test trace stack.
- std::vector<TraceInfo>& gtest_trace_stack() {
- return *(gtest_trace_stack_.pointer());
- }
- const std::vector<TraceInfo>& gtest_trace_stack() const {
- return gtest_trace_stack_.get();
- }
-
-#if GTEST_HAS_DEATH_TEST
- void InitDeathTestSubprocessControlInfo() {
- internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
- }
- // Returns a pointer to the parsed --gtest_internal_run_death_test
- // flag, or NULL if that flag was not specified.
- // This information is useful only in a death test child process.
- // Must not be called before a call to InitGoogleTest.
- const InternalRunDeathTestFlag* internal_run_death_test_flag() const {
- return internal_run_death_test_flag_.get();
- }
-
- // Returns a pointer to the current death test factory.
- internal::DeathTestFactory* death_test_factory() {
- return death_test_factory_.get();
- }
-
- void SuppressTestEventsIfInSubprocess();
-
- friend class ReplaceDeathTestFactory;
-#endif // GTEST_HAS_DEATH_TEST
-
- // Initializes the event listener performing XML output as specified by
- // UnitTestOptions. Must not be called before InitGoogleTest.
- void ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
- // Initializes the event listener for streaming test results to a socket.
- // Must not be called before InitGoogleTest.
- void ConfigureStreamingOutput();
-#endif
-
- // Performs initialization dependent upon flag values obtained in
- // ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to
- // ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest
- // this function is also called from RunAllTests. Since this function can be
- // called more than once, it has to be idempotent.
- void PostFlagParsingInit();
-
- // Gets the random seed used at the start of the current test iteration.
- int random_seed() const { return random_seed_; }
-
- // Gets the random number generator.
- internal::Random* random() { return &random_; }
-
- // Shuffles all test cases, and the tests within each test case,
- // making sure that death tests are still run first.
- void ShuffleTests();
-
- // Restores the test cases and tests to their order before the first shuffle.
- void UnshuffleTests();
-
- // Returns the value of GTEST_FLAG(catch_exceptions) at the moment
- // UnitTest::Run() starts.
- bool catch_exceptions() const { return catch_exceptions_; }
-
- private:
- friend class ::testing::UnitTest;
-
- // Used by UnitTest::Run() to capture the state of
- // GTEST_FLAG(catch_exceptions) at the moment it starts.
- void set_catch_exceptions(bool value) { catch_exceptions_ = value; }
-
- // The UnitTest object that owns this implementation object.
- UnitTest* const parent_;
-
- // The working directory when the first TEST() or TEST_F() was
- // executed.
- internal::FilePath original_working_dir_;
-
- // The default test part result reporters.
- DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;
- DefaultPerThreadTestPartResultReporter
- default_per_thread_test_part_result_reporter_;
-
- // Points to (but doesn't own) the global test part result reporter.
- TestPartResultReporterInterface* global_test_part_result_repoter_;
-
- // Protects read and write access to global_test_part_result_reporter_.
- internal::Mutex global_test_part_result_reporter_mutex_;
-
- // Points to (but doesn't own) the per-thread test part result reporter.
- internal::ThreadLocal<TestPartResultReporterInterface*>
- per_thread_test_part_result_reporter_;
-
- // The vector of environments that need to be set-up/torn-down
- // before/after the tests are run.
- std::vector<Environment*> environments_;
-
- // The vector of TestCases in their original order. It owns the
- // elements in the vector.
- std::vector<TestCase*> test_cases_;
-
- // Provides a level of indirection for the test case list to allow
- // easy shuffling and restoring the test case order. The i-th
- // element of this vector is the index of the i-th test case in the
- // shuffled order.
- std::vector<int> test_case_indices_;
-
-#if GTEST_HAS_PARAM_TEST
- // ParameterizedTestRegistry object used to register value-parameterized
- // tests.
- internal::ParameterizedTestCaseRegistry parameterized_test_registry_;
-
- // Indicates whether RegisterParameterizedTests() has been called already.
- bool parameterized_tests_registered_;
-#endif // GTEST_HAS_PARAM_TEST
-
- // Index of the last death test case registered. Initially -1.
- int last_death_test_case_;
-
- // This points to the TestCase for the currently running test. It
- // changes as Google Test goes through one test case after another.
- // When no test is running, this is set to NULL and Google Test
- // stores assertion results in ad_hoc_test_result_. Initially NULL.
- TestCase* current_test_case_;
-
- // This points to the TestInfo for the currently running test. It
- // changes as Google Test goes through one test after another. When
- // no test is running, this is set to NULL and Google Test stores
- // assertion results in ad_hoc_test_result_. Initially NULL.
- TestInfo* current_test_info_;
-
- // Normally, a user only writes assertions inside a TEST or TEST_F,
- // or inside a function called by a TEST or TEST_F. Since Google
- // Test keeps track of which test is current running, it can
- // associate such an assertion with the test it belongs to.
- //
- // If an assertion is encountered when no TEST or TEST_F is running,
- // Google Test attributes the assertion result to an imaginary "ad hoc"
- // test, and records the result in ad_hoc_test_result_.
- TestResult ad_hoc_test_result_;
-
- // The list of event listeners that can be used to track events inside
- // Google Test.
- TestEventListeners listeners_;
-
- // The OS stack trace getter. Will be deleted when the UnitTest
- // object is destructed. By default, an OsStackTraceGetter is used,
- // but the user can set this field to use a custom getter if that is
- // desired.
- OsStackTraceGetterInterface* os_stack_trace_getter_;
-
- // True iff PostFlagParsingInit() has been called.
- bool post_flag_parse_init_performed_;
-
- // The random number seed used at the beginning of the test run.
- int random_seed_;
-
- // Our random number generator.
- internal::Random random_;
-
- // How long the test took to run, in milliseconds.
- TimeInMillis elapsed_time_;
-
-#if GTEST_HAS_DEATH_TEST
- // The decomposed components of the gtest_internal_run_death_test flag,
- // parsed when RUN_ALL_TESTS is called.
- internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;
- internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_;
-#endif // GTEST_HAS_DEATH_TEST
-
- // A per-thread stack of traces created by the SCOPED_TRACE() macro.
- internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;
-
- // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests()
- // starts.
- bool catch_exceptions_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl);
-}; // class UnitTestImpl
-
-// Convenience function for accessing the global UnitTest
-// implementation object.
-inline UnitTestImpl* GetUnitTestImpl() {
- return UnitTest::GetInstance()->impl();
-}
-
-#if GTEST_USES_SIMPLE_RE
-
-// Internal helper functions for implementing the simple regular
-// expression matcher.
-GTEST_API_ bool IsInSet(char ch, const char* str);
-GTEST_API_ bool IsAsciiDigit(char ch);
-GTEST_API_ bool IsAsciiPunct(char ch);
-GTEST_API_ bool IsRepeat(char ch);
-GTEST_API_ bool IsAsciiWhiteSpace(char ch);
-GTEST_API_ bool IsAsciiWordChar(char ch);
-GTEST_API_ bool IsValidEscape(char ch);
-GTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch);
-GTEST_API_ bool ValidateRegex(const char* regex);
-GTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str);
-GTEST_API_ bool MatchRepetitionAndRegexAtHead(
- bool escaped, char ch, char repeat, const char* regex, const char* str);
-GTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str);
-
-#endif // GTEST_USES_SIMPLE_RE
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv);
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv);
-
-#if GTEST_HAS_DEATH_TEST
-
-// Returns the message describing the last system error, regardless of the
-// platform.
-GTEST_API_ String GetLastErrnoDescription();
-
-# if GTEST_OS_WINDOWS
-// Provides leak-safe Windows kernel handle ownership.
-class AutoHandle {
- public:
- AutoHandle() : handle_(INVALID_HANDLE_VALUE) {}
- explicit AutoHandle(HANDLE handle) : handle_(handle) {}
-
- ~AutoHandle() { Reset(); }
-
- HANDLE Get() const { return handle_; }
- void Reset() { Reset(INVALID_HANDLE_VALUE); }
- void Reset(HANDLE handle) {
- if (handle != handle_) {
- if (handle_ != INVALID_HANDLE_VALUE)
- ::CloseHandle(handle_);
- handle_ = handle;
- }
- }
-
- private:
- HANDLE handle_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle);
-};
-# endif // GTEST_OS_WINDOWS
-
-// Attempts to parse a string into a positive integer pointed to by the
-// number parameter. Returns true if that is possible.
-// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use
-// it here.
-template <typename Integer>
-bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
- // Fail fast if the given string does not begin with a digit;
- // this bypasses strtoXXX's "optional leading whitespace and plus
- // or minus sign" semantics, which are undesirable here.
- if (str.empty() || !IsDigit(str[0])) {
- return false;
- }
- errno = 0;
-
- char* end;
- // BiggestConvertible is the largest integer type that system-provided
- // string-to-number conversion routines can return.
-
-# if GTEST_OS_WINDOWS && !defined(__GNUC__)
-
- // MSVC and C++ Builder define __int64 instead of the standard long long.
- typedef unsigned __int64 BiggestConvertible;
- const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10);
-
-# else
-
- typedef unsigned long long BiggestConvertible; // NOLINT
- const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);
-
-# endif // GTEST_OS_WINDOWS && !defined(__GNUC__)
-
- const bool parse_success = *end == '\0' && errno == 0;
-
- // TODO(vladl@google.com): Convert this to compile time assertion when it is
- // available.
- GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));
-
- const Integer result = static_cast<Integer>(parsed);
- if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {
- *number = result;
- return true;
- }
- return false;
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// TestResult contains some private methods that should be hidden from
-// Google Test user but are required for testing. This class allow our tests
-// to access them.
-//
-// This class is supplied only for the purpose of testing Google Test's own
-// constructs. Do not use it in user tests, either directly or indirectly.
-class TestResultAccessor {
- public:
- static void RecordProperty(TestResult* test_result,
- const TestProperty& property) {
- test_result->RecordProperty(property);
- }
-
- static void ClearTestPartResults(TestResult* test_result) {
- test_result->ClearTestPartResults();
- }
-
- static const std::vector<testing::TestPartResult>& test_part_results(
- const TestResult& test_result) {
- return test_result.test_part_results();
- }
-};
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_
-#undef GTEST_IMPLEMENTATION_
-
-#if GTEST_OS_WINDOWS
-# define vsnprintf _vsnprintf
-#endif // GTEST_OS_WINDOWS
-
-namespace testing {
-
-using internal::CountIf;
-using internal::ForEach;
-using internal::GetElementOr;
-using internal::Shuffle;
-
-// Constants.
-
-// A test whose test case name or test name matches this filter is
-// disabled and not run.
-static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*";
-
-// A test case whose name matches this filter is considered a death
-// test case and will be run before test cases whose name doesn't
-// match this filter.
-static const char kDeathTestCaseFilter[] = "*DeathTest:*DeathTest/*";
-
-// A test filter that matches everything.
-static const char kUniversalFilter[] = "*";
-
-// The default output file for XML output.
-static const char kDefaultOutputFile[] = "test_detail.xml";
-
-// The environment variable name for the test shard index.
-static const char kTestShardIndex[] = "GTEST_SHARD_INDEX";
-// The environment variable name for the total number of test shards.
-static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS";
-// The environment variable name for the test shard status file.
-static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE";
-
-namespace internal {
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-const char kStackTraceMarker[] = "\nStack trace:\n";
-
-// g_help_flag is true iff the --help flag or an equivalent form is
-// specified on the command line.
-bool g_help_flag = false;
-
-} // namespace internal
-
-GTEST_DEFINE_bool_(
- also_run_disabled_tests,
- internal::BoolFromGTestEnv("also_run_disabled_tests", false),
- "Run disabled tests too, in addition to the tests normally being run.");
-
-GTEST_DEFINE_bool_(
- break_on_failure,
- internal::BoolFromGTestEnv("break_on_failure", false),
- "True iff a failed assertion should be a debugger break-point.");
-
-GTEST_DEFINE_bool_(
- catch_exceptions,
- internal::BoolFromGTestEnv("catch_exceptions", true),
- "True iff " GTEST_NAME_
- " should catch exceptions and treat them as test failures.");
-
-GTEST_DEFINE_string_(
- color,
- internal::StringFromGTestEnv("color", "auto"),
- "Whether to use colors in the output. Valid values: yes, no, "
- "and auto. 'auto' means to use colors if the output is "
- "being sent to a terminal and the TERM environment variable "
- "is set to xterm, xterm-color, xterm-256color, linux or cygwin.");
-
-GTEST_DEFINE_string_(
- filter,
- internal::StringFromGTestEnv("filter", kUniversalFilter),
- "A colon-separated list of glob (not regex) patterns "
- "for filtering the tests to run, optionally followed by a "
- "'-' and a : separated list of negative patterns (tests to "
- "exclude). A test is run if it matches one of the positive "
- "patterns and does not match any of the negative patterns.");
-
-GTEST_DEFINE_bool_(list_tests, false,
- "List all tests without running them.");
-
-GTEST_DEFINE_string_(
- output,
- internal::StringFromGTestEnv("output", ""),
- "A format (currently must be \"xml\"), optionally followed "
- "by a colon and an output file name or directory. A directory "
- "is indicated by a trailing pathname separator. "
- "Examples: \"xml:filename.xml\", \"xml::directoryname/\". "
- "If a directory is specified, output files will be created "
- "within that directory, with file-names based on the test "
- "executable's name and, if necessary, made unique by adding "
- "digits.");
-
-GTEST_DEFINE_bool_(
- print_time,
- internal::BoolFromGTestEnv("print_time", true),
- "True iff " GTEST_NAME_
- " should display elapsed time in text output.");
-
-GTEST_DEFINE_int32_(
- random_seed,
- internal::Int32FromGTestEnv("random_seed", 0),
- "Random number seed to use when shuffling test orders. Must be in range "
- "[1, 99999], or 0 to use a seed based on the current time.");
-
-GTEST_DEFINE_int32_(
- repeat,
- internal::Int32FromGTestEnv("repeat", 1),
- "How many times to repeat each test. Specify a negative number "
- "for repeating forever. Useful for shaking out flaky tests.");
-
-GTEST_DEFINE_bool_(
- show_internal_stack_frames, false,
- "True iff " GTEST_NAME_ " should include internal stack frames when "
- "printing test failure stack traces.");
-
-GTEST_DEFINE_bool_(
- shuffle,
- internal::BoolFromGTestEnv("shuffle", false),
- "True iff " GTEST_NAME_
- " should randomize tests' order on every run.");
-
-GTEST_DEFINE_int32_(
- stack_trace_depth,
- internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth),
- "The maximum number of stack frames to print when an "
- "assertion fails. The valid range is 0 through 100, inclusive.");
-
-GTEST_DEFINE_string_(
- stream_result_to,
- internal::StringFromGTestEnv("stream_result_to", ""),
- "This flag specifies the host name and the port number on which to stream "
- "test results. Example: \"localhost:555\". The flag is effective only on "
- "Linux.");
-
-GTEST_DEFINE_bool_(
- throw_on_failure,
- internal::BoolFromGTestEnv("throw_on_failure", false),
- "When this flag is specified, a failed assertion will throw an exception "
- "if exceptions are enabled or exit the program with a non-zero code "
- "otherwise.");
-
-namespace internal {
-
-// Generates a random number from [0, range), using a Linear
-// Congruential Generator (LCG). Crashes if 'range' is 0 or greater
-// than kMaxRange.
-UInt32 Random::Generate(UInt32 range) {
- // These constants are the same as are used in glibc's rand(3).
- state_ = (1103515245U*state_ + 12345U) % kMaxRange;
-
- GTEST_CHECK_(range > 0)
- << "Cannot generate a number in the range [0, 0).";
- GTEST_CHECK_(range <= kMaxRange)
- << "Generation of a number in [0, " << range << ") was requested, "
- << "but this can only generate numbers in [0, " << kMaxRange << ").";
-
- // Converting via modulus introduces a bit of downward bias, but
- // it's simple, and a linear congruential generator isn't too good
- // to begin with.
- return state_ % range;
-}
-
-// GTestIsInitialized() returns true iff the user has initialized
-// Google Test. Useful for catching the user mistake of not initializing
-// Google Test before calling RUN_ALL_TESTS().
-//
-// A user must call testing::InitGoogleTest() to initialize Google
-// Test. g_init_gtest_count is set to the number of times
-// InitGoogleTest() has been called. We don't protect this variable
-// under a mutex as it is only accessed in the main thread.
-int g_init_gtest_count = 0;
-static bool GTestIsInitialized() { return g_init_gtest_count != 0; }
-
-// Iterates over a vector of TestCases, keeping a running sum of the
-// results of calling a given int-returning method on each.
-// Returns the sum.
-static int SumOverTestCaseList(const std::vector<TestCase*>& case_list,
- int (TestCase::*method)() const) {
- int sum = 0;
- for (size_t i = 0; i < case_list.size(); i++) {
- sum += (case_list[i]->*method)();
- }
- return sum;
-}
-
-// Returns true iff the test case passed.
-static bool TestCasePassed(const TestCase* test_case) {
- return test_case->should_run() && test_case->Passed();
-}
-
-// Returns true iff the test case failed.
-static bool TestCaseFailed(const TestCase* test_case) {
- return test_case->should_run() && test_case->Failed();
-}
-
-// Returns true iff test_case contains at least one test that should
-// run.
-static bool ShouldRunTestCase(const TestCase* test_case) {
- return test_case->should_run();
-}
-
-// AssertHelper constructor.
-AssertHelper::AssertHelper(TestPartResult::Type type,
- const char* file,
- int line,
- const char* message)
- : data_(new AssertHelperData(type, file, line, message)) {
-}
-
-AssertHelper::~AssertHelper() {
- delete data_;
-}
-
-// Message assignment, for assertion streaming support.
-void AssertHelper::operator=(const Message& message) const {
- UnitTest::GetInstance()->
- AddTestPartResult(data_->type, data_->file, data_->line,
- AppendUserMessage(data_->message, message),
- UnitTest::GetInstance()->impl()
- ->CurrentOsStackTraceExceptTop(1)
- // Skips the stack frame for this function itself.
- ); // NOLINT
-}
-
-// Mutex for linked pointers.
-GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);
-
-// Application pathname gotten in InitGoogleTest.
-String g_executable_path;
-
-// Returns the current application's name, removing directory path if that
-// is present.
-FilePath GetCurrentExecutableName() {
- FilePath result;
-
-#if GTEST_OS_WINDOWS
- result.Set(FilePath(g_executable_path).RemoveExtension("exe"));
-#else
- result.Set(FilePath(g_executable_path));
-#endif // GTEST_OS_WINDOWS
-
- return result.RemoveDirectoryName();
-}
-
-// Functions for processing the gtest_output flag.
-
-// Returns the output format, or "" for normal printed output.
-String UnitTestOptions::GetOutputFormat() {
- const char* const gtest_output_flag = GTEST_FLAG(output).c_str();
- if (gtest_output_flag == NULL) return String("");
-
- const char* const colon = strchr(gtest_output_flag, ':');
- return (colon == NULL) ?
- String(gtest_output_flag) :
- String(gtest_output_flag, colon - gtest_output_flag);
-}
-
-// Returns the name of the requested output file, or the default if none
-// was explicitly specified.
-String UnitTestOptions::GetAbsolutePathToOutputFile() {
- const char* const gtest_output_flag = GTEST_FLAG(output).c_str();
- if (gtest_output_flag == NULL)
- return String("");
-
- const char* const colon = strchr(gtest_output_flag, ':');
- if (colon == NULL)
- return String(internal::FilePath::ConcatPaths(
- internal::FilePath(
- UnitTest::GetInstance()->original_working_dir()),
- internal::FilePath(kDefaultOutputFile)).ToString() );
-
- internal::FilePath output_name(colon + 1);
- if (!output_name.IsAbsolutePath())
- // TODO(wan@google.com): on Windows \some\path is not an absolute
- // path (as its meaning depends on the current drive), yet the
- // following logic for turning it into an absolute path is wrong.
- // Fix it.
- output_name = internal::FilePath::ConcatPaths(
- internal::FilePath(UnitTest::GetInstance()->original_working_dir()),
- internal::FilePath(colon + 1));
-
- if (!output_name.IsDirectory())
- return output_name.ToString();
-
- internal::FilePath result(internal::FilePath::GenerateUniqueFileName(
- output_name, internal::GetCurrentExecutableName(),
- GetOutputFormat().c_str()));
- return result.ToString();
-}
-
-// Returns true iff the wildcard pattern matches the string. The
-// first ':' or '\0' character in pattern marks the end of it.
-//
-// This recursive algorithm isn't very efficient, but is clear and
-// works well enough for matching test names, which are short.
-bool UnitTestOptions::PatternMatchesString(const char *pattern,
- const char *str) {
- switch (*pattern) {
- case '\0':
- case ':': // Either ':' or '\0' marks the end of the pattern.
- return *str == '\0';
- case '?': // Matches any single character.
- return *str != '\0' && PatternMatchesString(pattern + 1, str + 1);
- case '*': // Matches any string (possibly empty) of characters.
- return (*str != '\0' && PatternMatchesString(pattern, str + 1)) ||
- PatternMatchesString(pattern + 1, str);
- default: // Non-special character. Matches itself.
- return *pattern == *str &&
- PatternMatchesString(pattern + 1, str + 1);
- }
-}
-
-bool UnitTestOptions::MatchesFilter(const String& name, const char* filter) {
- const char *cur_pattern = filter;
- for (;;) {
- if (PatternMatchesString(cur_pattern, name.c_str())) {
- return true;
- }
-
- // Finds the next pattern in the filter.
- cur_pattern = strchr(cur_pattern, ':');
-
- // Returns if no more pattern can be found.
- if (cur_pattern == NULL) {
- return false;
- }
-
- // Skips the pattern separater (the ':' character).
- cur_pattern++;
- }
-}
-
-// TODO(keithray): move String function implementations to gtest-string.cc.
-
-// Returns true iff the user-specified filter matches the test case
-// name and the test name.
-bool UnitTestOptions::FilterMatchesTest(const String &test_case_name,
- const String &test_name) {
- const String& full_name = String::Format("%s.%s",
- test_case_name.c_str(),
- test_name.c_str());
-
- // Split --gtest_filter at '-', if there is one, to separate into
- // positive filter and negative filter portions
- const char* const p = GTEST_FLAG(filter).c_str();
- const char* const dash = strchr(p, '-');
- String positive;
- String negative;
- if (dash == NULL) {
- positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter
- negative = String("");
- } else {
- positive = String(p, dash - p); // Everything up to the dash
- negative = String(dash+1); // Everything after the dash
- if (positive.empty()) {
- // Treat '-test1' as the same as '*-test1'
- positive = kUniversalFilter;
- }
- }
-
- // A filter is a colon-separated list of patterns. It matches a
- // test if any pattern in it matches the test.
- return (MatchesFilter(full_name, positive.c_str()) &&
- !MatchesFilter(full_name, negative.c_str()));
-}
-
-#if GTEST_HAS_SEH
-// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
-// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
-// This function is useful as an __except condition.
-int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {
- // Google Test should handle a SEH exception if:
- // 1. the user wants it to, AND
- // 2. this is not a breakpoint exception, AND
- // 3. this is not a C++ exception (VC++ implements them via SEH,
- // apparently).
- //
- // SEH exception code for C++ exceptions.
- // (see http://support.microsoft.com/kb/185294 for more information).
- const DWORD kCxxExceptionCode = 0xe06d7363;
-
- bool should_handle = true;
-
- if (!GTEST_FLAG(catch_exceptions))
- should_handle = false;
- else if (exception_code == EXCEPTION_BREAKPOINT)
- should_handle = false;
- else if (exception_code == kCxxExceptionCode)
- should_handle = false;
-
- return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
-}
-#endif // GTEST_HAS_SEH
-
-} // namespace internal
-
-// The c'tor sets this object as the test part result reporter used by
-// Google Test. The 'result' parameter specifies where to report the
-// results. Intercepts only failures from the current thread.
-ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(
- TestPartResultArray* result)
- : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD),
- result_(result) {
- Init();
-}
-
-// The c'tor sets this object as the test part result reporter used by
-// Google Test. The 'result' parameter specifies where to report the
-// results.
-ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(
- InterceptMode intercept_mode, TestPartResultArray* result)
- : intercept_mode_(intercept_mode),
- result_(result) {
- Init();
-}
-
-void ScopedFakeTestPartResultReporter::Init() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
- old_reporter_ = impl->GetGlobalTestPartResultReporter();
- impl->SetGlobalTestPartResultReporter(this);
- } else {
- old_reporter_ = impl->GetTestPartResultReporterForCurrentThread();
- impl->SetTestPartResultReporterForCurrentThread(this);
- }
-}
-
-// The d'tor restores the test part result reporter used by Google Test
-// before.
-ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
- impl->SetGlobalTestPartResultReporter(old_reporter_);
- } else {
- impl->SetTestPartResultReporterForCurrentThread(old_reporter_);
- }
-}
-
-// Increments the test part result count and remembers the result.
-// This method is from the TestPartResultReporterInterface interface.
-void ScopedFakeTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- result_->Append(result);
-}
-
-namespace internal {
-
-// Returns the type ID of ::testing::Test. We should always call this
-// instead of GetTypeId< ::testing::Test>() to get the type ID of
-// testing::Test. This is to work around a suspected linker bug when
-// using Google Test as a framework on Mac OS X. The bug causes
-// GetTypeId< ::testing::Test>() to return different values depending
-// on whether the call is from the Google Test framework itself or
-// from user test code. GetTestTypeId() is guaranteed to always
-// return the same value, as it always calls GetTypeId<>() from the
-// gtest.cc, which is within the Google Test framework.
-TypeId GetTestTypeId() {
- return GetTypeId<Test>();
-}
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library. This is solely for testing GetTestTypeId().
-extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId();
-
-// This predicate-formatter checks that 'results' contains a test part
-// failure of the given type and that the failure message contains the
-// given substring.
-AssertionResult HasOneFailure(const char* /* results_expr */,
- const char* /* type_expr */,
- const char* /* substr_expr */,
- const TestPartResultArray& results,
- TestPartResult::Type type,
- const string& substr) {
- const String expected(type == TestPartResult::kFatalFailure ?
- "1 fatal failure" :
- "1 non-fatal failure");
- Message msg;
- if (results.size() != 1) {
- msg << "Expected: " << expected << "\n"
- << " Actual: " << results.size() << " failures";
- for (int i = 0; i < results.size(); i++) {
- msg << "\n" << results.GetTestPartResult(i);
- }
- return AssertionFailure() << msg;
- }
-
- const TestPartResult& r = results.GetTestPartResult(0);
- if (r.type() != type) {
- return AssertionFailure() << "Expected: " << expected << "\n"
- << " Actual:\n"
- << r;
- }
-
- if (strstr(r.message(), substr.c_str()) == NULL) {
- return AssertionFailure() << "Expected: " << expected << " containing \""
- << substr << "\"\n"
- << " Actual:\n"
- << r;
- }
-
- return AssertionSuccess();
-}
-
-// The constructor of SingleFailureChecker remembers where to look up
-// test part results, what type of failure we expect, and what
-// substring the failure message should contain.
-SingleFailureChecker:: SingleFailureChecker(
- const TestPartResultArray* results,
- TestPartResult::Type type,
- const string& substr)
- : results_(results),
- type_(type),
- substr_(substr) {}
-
-// The destructor of SingleFailureChecker verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring. If that's not the case, a
-// non-fatal failure will be generated.
-SingleFailureChecker::~SingleFailureChecker() {
- EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_);
-}
-
-DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter(
- UnitTestImpl* unit_test) : unit_test_(unit_test) {}
-
-void DefaultGlobalTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- unit_test_->current_test_result()->AddTestPartResult(result);
- unit_test_->listeners()->repeater()->OnTestPartResult(result);
-}
-
-DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter(
- UnitTestImpl* unit_test) : unit_test_(unit_test) {}
-
-void DefaultPerThreadTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result);
-}
-
-// Returns the global test part result reporter.
-TestPartResultReporterInterface*
-UnitTestImpl::GetGlobalTestPartResultReporter() {
- internal::MutexLock lock(&global_test_part_result_reporter_mutex_);
- return global_test_part_result_repoter_;
-}
-
-// Sets the global test part result reporter.
-void UnitTestImpl::SetGlobalTestPartResultReporter(
- TestPartResultReporterInterface* reporter) {
- internal::MutexLock lock(&global_test_part_result_reporter_mutex_);
- global_test_part_result_repoter_ = reporter;
-}
-
-// Returns the test part result reporter for the current thread.
-TestPartResultReporterInterface*
-UnitTestImpl::GetTestPartResultReporterForCurrentThread() {
- return per_thread_test_part_result_reporter_.get();
-}
-
-// Sets the test part result reporter for the current thread.
-void UnitTestImpl::SetTestPartResultReporterForCurrentThread(
- TestPartResultReporterInterface* reporter) {
- per_thread_test_part_result_reporter_.set(reporter);
-}
-
-// Gets the number of successful test cases.
-int UnitTestImpl::successful_test_case_count() const {
- return CountIf(test_cases_, TestCasePassed);
-}
-
-// Gets the number of failed test cases.
-int UnitTestImpl::failed_test_case_count() const {
- return CountIf(test_cases_, TestCaseFailed);
-}
-
-// Gets the number of all test cases.
-int UnitTestImpl::total_test_case_count() const {
- return static_cast<int>(test_cases_.size());
-}
-
-// Gets the number of all test cases that contain at least one test
-// that should run.
-int UnitTestImpl::test_case_to_run_count() const {
- return CountIf(test_cases_, ShouldRunTestCase);
-}
-
-// Gets the number of successful tests.
-int UnitTestImpl::successful_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count);
-}
-
-// Gets the number of failed tests.
-int UnitTestImpl::failed_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count);
-}
-
-// Gets the number of disabled tests.
-int UnitTestImpl::disabled_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count);
-}
-
-// Gets the number of all tests.
-int UnitTestImpl::total_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::total_test_count);
-}
-
-// Gets the number of tests that should run.
-int UnitTestImpl::test_to_run_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count);
-}
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// CurrentOsStackTraceExceptTop(1), Foo() will be included in the
-// trace but Bar() and CurrentOsStackTraceExceptTop() won't.
-String UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) {
- (void)skip_count;
- return String("");
-}
-
-// Returns the current time in milliseconds.
-TimeInMillis GetTimeInMillis() {
-#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__)
- // Difference between 1970-01-01 and 1601-01-01 in milliseconds.
- // http://analogous.blogspot.com/2005/04/epoch.html
- const TimeInMillis kJavaEpochToWinFileTimeDelta =
- static_cast<TimeInMillis>(116444736UL) * 100000UL;
- const DWORD kTenthMicrosInMilliSecond = 10000;
-
- SYSTEMTIME now_systime;
- FILETIME now_filetime;
- ULARGE_INTEGER now_int64;
- // TODO(kenton@google.com): Shouldn't this just use
- // GetSystemTimeAsFileTime()?
- GetSystemTime(&now_systime);
- if (SystemTimeToFileTime(&now_systime, &now_filetime)) {
- now_int64.LowPart = now_filetime.dwLowDateTime;
- now_int64.HighPart = now_filetime.dwHighDateTime;
- now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) -
- kJavaEpochToWinFileTimeDelta;
- return now_int64.QuadPart;
- }
- return 0;
-#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_
- __timeb64 now;
-
-# ifdef _MSC_VER
-
- // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996
- // (deprecated function) there.
- // TODO(kenton@google.com): Use GetTickCount()? Or use
- // SystemTimeToFileTime()
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
- _ftime64(&now);
-# pragma warning(pop) // Restores the warning state.
-# else
-
- _ftime64(&now);
-
-# endif // _MSC_VER
-
- return static_cast<TimeInMillis>(now.time) * 1000 + now.millitm;
-#elif GTEST_HAS_GETTIMEOFDAY_
- struct timeval now;
- gettimeofday(&now, NULL);
- return static_cast<TimeInMillis>(now.tv_sec) * 1000 + now.tv_usec / 1000;
-#else
-# error "Don't know how to get the current time on your system."
-#endif
-}
-
-// Utilities
-
-// class String
-
-// Returns the input enclosed in double quotes if it's not NULL;
-// otherwise returns "(null)". For example, "\"Hello\"" is returned
-// for input "Hello".
-//
-// This is useful for printing a C string in the syntax of a literal.
-//
-// Known issue: escape sequences are not handled yet.
-String String::ShowCStringQuoted(const char* c_str) {
- return c_str ? String::Format("\"%s\"", c_str) : String("(null)");
-}
-
-// Copies at most length characters from str into a newly-allocated
-// piece of memory of size length+1. The memory is allocated with new[].
-// A terminating null byte is written to the memory, and a pointer to it
-// is returned. If str is NULL, NULL is returned.
-static char* CloneString(const char* str, size_t length) {
- if (str == NULL) {
- return NULL;
- } else {
- char* const clone = new char[length + 1];
- posix::StrNCpy(clone, str, length);
- clone[length] = '\0';
- return clone;
- }
-}
-
-// Clones a 0-terminated C string, allocating memory using new. The
-// caller is responsible for deleting[] the return value. Returns the
-// cloned string, or NULL if the input is NULL.
-const char * String::CloneCString(const char* c_str) {
- return (c_str == NULL) ?
- NULL : CloneString(c_str, strlen(c_str));
-}
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Creates a UTF-16 wide string from the given ANSI string, allocating
-// memory using new. The caller is responsible for deleting the return
-// value using delete[]. Returns the wide string, or NULL if the
-// input is NULL.
-LPCWSTR String::AnsiToUtf16(const char* ansi) {
- if (!ansi) return NULL;
- const int length = strlen(ansi);
- const int unicode_length =
- MultiByteToWideChar(CP_ACP, 0, ansi, length,
- NULL, 0);
- WCHAR* unicode = new WCHAR[unicode_length + 1];
- MultiByteToWideChar(CP_ACP, 0, ansi, length,
- unicode, unicode_length);
- unicode[unicode_length] = 0;
- return unicode;
-}
-
-// Creates an ANSI string from the given wide string, allocating
-// memory using new. The caller is responsible for deleting the return
-// value using delete[]. Returns the ANSI string, or NULL if the
-// input is NULL.
-const char* String::Utf16ToAnsi(LPCWSTR utf16_str) {
- if (!utf16_str) return NULL;
- const int ansi_length =
- WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,
- NULL, 0, NULL, NULL);
- char* ansi = new char[ansi_length + 1];
- WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,
- ansi, ansi_length, NULL, NULL);
- ansi[ansi_length] = 0;
- return ansi;
-}
-
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Compares two C strings. Returns true iff they have the same content.
-//
-// Unlike strcmp(), this function can handle NULL argument(s). A NULL
-// C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::CStringEquals(const char * lhs, const char * rhs) {
- if ( lhs == NULL ) return rhs == NULL;
-
- if ( rhs == NULL ) return false;
-
- return strcmp(lhs, rhs) == 0;
-}
-
-#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
-
-// Converts an array of wide chars to a narrow string using the UTF-8
-// encoding, and streams the result to the given Message object.
-static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,
- Message* msg) {
- // TODO(wan): consider allowing a testing::String object to
- // contain '\0'. This will make it behave more like std::string,
- // and will allow ToUtf8String() to return the correct encoding
- // for '\0' s.t. we can get rid of the conditional here (and in
- // several other places).
- for (size_t i = 0; i != length; ) { // NOLINT
- if (wstr[i] != L'\0') {
- *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i));
- while (i != length && wstr[i] != L'\0')
- i++;
- } else {
- *msg << '\0';
- i++;
- }
- }
-}
-
-#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
-
-} // namespace internal
-
-#if GTEST_HAS_STD_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::std::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// AssertionResult constructors.
-// Used in EXPECT_TRUE/FALSE(assertion_result).
-AssertionResult::AssertionResult(const AssertionResult& other)
- : success_(other.success_),
- message_(other.message_.get() != NULL ?
- new ::std::string(*other.message_) :
- static_cast< ::std::string*>(NULL)) {
-}
-
-// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
-AssertionResult AssertionResult::operator!() const {
- AssertionResult negation(!success_);
- if (message_.get() != NULL)
- negation << *message_;
- return negation;
-}
-
-// Makes a successful assertion result.
-AssertionResult AssertionSuccess() {
- return AssertionResult(true);
-}
-
-// Makes a failed assertion result.
-AssertionResult AssertionFailure() {
- return AssertionResult(false);
-}
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << message.
-AssertionResult AssertionFailure(const Message& message) {
- return AssertionFailure() << message;
-}
-
-namespace internal {
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings. For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-// expected_expression: "foo"
-// actual_expression: "bar"
-// expected_value: "5"
-// actual_value: "6"
-//
-// The ignoring_case parameter is true iff the assertion is a
-// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-AssertionResult EqFailure(const char* expected_expression,
- const char* actual_expression,
- const String& expected_value,
- const String& actual_value,
- bool ignoring_case) {
- Message msg;
- msg << "Value of: " << actual_expression;
- if (actual_value != actual_expression) {
- msg << "\n Actual: " << actual_value;
- }
-
- msg << "\nExpected: " << expected_expression;
- if (ignoring_case) {
- msg << " (ignoring case)";
- }
- if (expected_value != expected_expression) {
- msg << "\nWhich is: " << expected_value;
- }
-
- return AssertionFailure() << msg;
-}
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-String GetBoolAssertionFailureMessage(const AssertionResult& assertion_result,
- const char* expression_text,
- const char* actual_predicate_value,
- const char* expected_predicate_value) {
- const char* actual_message = assertion_result.message();
- Message msg;
- msg << "Value of: " << expression_text
- << "\n Actual: " << actual_predicate_value;
- if (actual_message[0] != '\0')
- msg << " (" << actual_message << ")";
- msg << "\nExpected: " << expected_predicate_value;
- return msg.GetString();
-}
-
-// Helper function for implementing ASSERT_NEAR.
-AssertionResult DoubleNearPredFormat(const char* expr1,
- const char* expr2,
- const char* abs_error_expr,
- double val1,
- double val2,
- double abs_error) {
- const double diff = fabs(val1 - val2);
- if (diff <= abs_error) return AssertionSuccess();
-
- // TODO(wan): do not print the value of an expression if it's
- // already a literal.
- return AssertionFailure()
- << "The difference between " << expr1 << " and " << expr2
- << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n"
- << expr1 << " evaluates to " << val1 << ",\n"
- << expr2 << " evaluates to " << val2 << ", and\n"
- << abs_error_expr << " evaluates to " << abs_error << ".";
-}
-
-
-// Helper template for implementing FloatLE() and DoubleLE().
-template <typename RawType>
-AssertionResult FloatingPointLE(const char* expr1,
- const char* expr2,
- RawType val1,
- RawType val2) {
- // Returns success if val1 is less than val2,
- if (val1 < val2) {
- return AssertionSuccess();
- }
-
- // or if val1 is almost equal to val2.
- const FloatingPoint<RawType> lhs(val1), rhs(val2);
- if (lhs.AlmostEquals(rhs)) {
- return AssertionSuccess();
- }
-
- // Note that the above two checks will both fail if either val1 or
- // val2 is NaN, as the IEEE floating-point standard requires that
- // any predicate involving a NaN must return false.
-
- ::std::stringstream val1_ss;
- val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << val1;
-
- ::std::stringstream val2_ss;
- val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << val2;
-
- return AssertionFailure()
- << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n"
- << " Actual: " << StringStreamToString(&val1_ss) << " vs "
- << StringStreamToString(&val2_ss);
-}
-
-} // namespace internal
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-AssertionResult FloatLE(const char* expr1, const char* expr2,
- float val1, float val2) {
- return internal::FloatingPointLE<float>(expr1, expr2, val1, val2);
-}
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-AssertionResult DoubleLE(const char* expr1, const char* expr2,
- double val1, double val2) {
- return internal::FloatingPointLE<double>(expr1, expr2, val1, val2);
-}
-
-namespace internal {
-
-// The helper function for {ASSERT|EXPECT}_EQ with int or enum
-// arguments.
-AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual) {
- if (expected == actual) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- FormatForComparisonFailureMessage(expected, actual),
- FormatForComparisonFailureMessage(actual, expected),
- false);
-}
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here
-// just to avoid copy-and-paste of similar code.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- BiggestInt val1, BiggestInt val2) {\
- if (val1 op val2) {\
- return AssertionSuccess();\
- } else {\
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2\
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
- << " vs " << FormatForComparisonFailureMessage(val2, val1);\
- }\
-}
-
-// Implements the helper function for {ASSERT|EXPECT}_NE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(NE, !=)
-// Implements the helper function for {ASSERT|EXPECT}_LE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(LE, <=)
-// Implements the helper function for {ASSERT|EXPECT}_LT with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(LT, < )
-// Implements the helper function for {ASSERT|EXPECT}_GE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(GE, >=)
-// Implements the helper function for {ASSERT|EXPECT}_GT with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(GT, > )
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual) {
- if (String::CStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowCStringQuoted(expected),
- String::ShowCStringQuoted(actual),
- false);
-}
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual) {
- if (String::CaseInsensitiveCStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowCStringQuoted(expected),
- String::ShowCStringQuoted(actual),
- true);
-}
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2) {
- if (!String::CStringEquals(s1, s2)) {
- return AssertionSuccess();
- } else {
- return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
- << s2_expression << "), actual: \""
- << s1 << "\" vs \"" << s2 << "\"";
- }
-}
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2) {
- if (!String::CaseInsensitiveCStringEquals(s1, s2)) {
- return AssertionSuccess();
- } else {
- return AssertionFailure()
- << "Expected: (" << s1_expression << ") != ("
- << s2_expression << ") (ignoring case), actual: \""
- << s1 << "\" vs \"" << s2 << "\"";
- }
-}
-
-} // namespace internal
-
-namespace {
-
-// Helper functions for implementing IsSubString() and IsNotSubstring().
-
-// This group of overloaded functions return true iff needle is a
-// substring of haystack. NULL is considered a substring of itself
-// only.
-
-bool IsSubstringPred(const char* needle, const char* haystack) {
- if (needle == NULL || haystack == NULL)
- return needle == haystack;
-
- return strstr(haystack, needle) != NULL;
-}
-
-bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
- if (needle == NULL || haystack == NULL)
- return needle == haystack;
-
- return wcsstr(haystack, needle) != NULL;
-}
-
-// StringType here can be either ::std::string or ::std::wstring.
-template <typename StringType>
-bool IsSubstringPred(const StringType& needle,
- const StringType& haystack) {
- return haystack.find(needle) != StringType::npos;
-}
-
-// This function implements either IsSubstring() or IsNotSubstring(),
-// depending on the value of the expected_to_be_substring parameter.
-// StringType here can be const char*, const wchar_t*, ::std::string,
-// or ::std::wstring.
-template <typename StringType>
-AssertionResult IsSubstringImpl(
- bool expected_to_be_substring,
- const char* needle_expr, const char* haystack_expr,
- const StringType& needle, const StringType& haystack) {
- if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
- return AssertionSuccess();
-
- const bool is_wide_string = sizeof(needle[0]) > 1;
- const char* const begin_string_quote = is_wide_string ? "L\"" : "\"";
- return AssertionFailure()
- << "Value of: " << needle_expr << "\n"
- << " Actual: " << begin_string_quote << needle << "\"\n"
- << "Expected: " << (expected_to_be_substring ? "" : "not ")
- << "a substring of " << haystack_expr << "\n"
- << "Which is: " << begin_string_quote << haystack << "\"";
-}
-
-} // namespace
-
-// IsSubstring() and IsNotSubstring() check whether needle is a
-// substring of haystack (NULL is considered a substring of itself
-// only), and return an appropriate error message when they fail.
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-#if GTEST_HAS_STD_WSTRING
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-#if GTEST_OS_WINDOWS
-
-namespace {
-
-// Helper function for IsHRESULT{SuccessFailure} predicates
-AssertionResult HRESULTFailureHelper(const char* expr,
- const char* expected,
- long hr) { // NOLINT
-# if GTEST_OS_WINDOWS_MOBILE
-
- // Windows CE doesn't support FormatMessage.
- const char error_text[] = "";
-
-# else
-
- // Looks up the human-readable system message for the HRESULT code
- // and since we're not passing any params to FormatMessage, we don't
- // want inserts expanded.
- const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS;
- const DWORD kBufSize = 4096; // String::Format can't exceed this length.
- // Gets the system's human readable message string for this HRESULT.
- char error_text[kBufSize] = { '\0' };
- DWORD message_length = ::FormatMessageA(kFlags,
- 0, // no source, we're asking system
- hr, // the error
- 0, // no line width restrictions
- error_text, // output buffer
- kBufSize, // buf size
- NULL); // no arguments for inserts
- // Trims tailing white space (FormatMessage leaves a trailing cr-lf)
- for (; message_length && IsSpace(error_text[message_length - 1]);
- --message_length) {
- error_text[message_length - 1] = '\0';
- }
-
-# endif // GTEST_OS_WINDOWS_MOBILE
-
- const String error_hex(String::Format("0x%08X ", hr));
- return ::testing::AssertionFailure()
- << "Expected: " << expr << " " << expected << ".\n"
- << " Actual: " << error_hex << error_text << "\n";
-}
-
-} // namespace
-
-AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT
- if (SUCCEEDED(hr)) {
- return AssertionSuccess();
- }
- return HRESULTFailureHelper(expr, "succeeds", hr);
-}
-
-AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT
- if (FAILED(hr)) {
- return AssertionSuccess();
- }
- return HRESULTFailureHelper(expr, "fails", hr);
-}
-
-#endif // GTEST_OS_WINDOWS
-
-// Utility functions for encoding Unicode text (wide strings) in
-// UTF-8.
-
-// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8
-// like this:
-//
-// Code-point length Encoding
-// 0 - 7 bits 0xxxxxxx
-// 8 - 11 bits 110xxxxx 10xxxxxx
-// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx
-// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-
-// The maximum code-point a one-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint1 = (static_cast<UInt32>(1) << 7) - 1;
-
-// The maximum code-point a two-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1;
-
-// The maximum code-point a three-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1;
-
-// The maximum code-point a four-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1;
-
-// Chops off the n lowest bits from a bit pattern. Returns the n
-// lowest bits. As a side effect, the original bit pattern will be
-// shifted to the right by n bits.
-inline UInt32 ChopLowBits(UInt32* bits, int n) {
- const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);
- *bits >>= n;
- return low_bits;
-}
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// The output buffer str must containt at least 32 characters.
-// The function returns the address of the output buffer.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'.
-char* CodePointToUtf8(UInt32 code_point, char* str) {
- if (code_point <= kMaxCodePoint1) {
- str[1] = '\0';
- str[0] = static_cast<char>(code_point); // 0xxxxxxx
- } else if (code_point <= kMaxCodePoint2) {
- str[2] = '\0';
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
- } else if (code_point <= kMaxCodePoint3) {
- str[3] = '\0';
- str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
- } else if (code_point <= kMaxCodePoint4) {
- str[4] = '\0';
- str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
- } else {
- // The longest string String::Format can produce when invoked
- // with these parameters is 28 character long (not including
- // the terminating nul character). We are asking for 32 character
- // buffer just in case. This is also enough for strncpy to
- // null-terminate the destination string.
- posix::StrNCpy(
- str, String::Format("(Invalid Unicode 0x%X)", code_point).c_str(), 32);
- str[31] = '\0'; // Makes sure no change in the format to strncpy leaves
- // the result unterminated.
- }
- return str;
-}
-
-// The following two functions only make sense if the the system
-// uses UTF-16 for wide string encoding. All supported systems
-// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16.
-
-// Determines if the arguments constitute UTF-16 surrogate pair
-// and thus should be combined into a single Unicode code point
-// using CreateCodePointFromUtf16SurrogatePair.
-inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
- return sizeof(wchar_t) == 2 &&
- (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;
-}
-
-// Creates a Unicode code point from UTF16 surrogate pair.
-inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
- wchar_t second) {
- const UInt32 mask = (1 << 10) - 1;
- return (sizeof(wchar_t) == 2) ?
- (((first & mask) << 10) | (second & mask)) + 0x10000 :
- // This function should not be called when the condition is
- // false, but we provide a sensible default in case it is.
- static_cast<UInt32>(first);
-}
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)
-// UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-String WideStringToUtf8(const wchar_t* str, int num_chars) {
- if (num_chars == -1)
- num_chars = static_cast<int>(wcslen(str));
-
- ::std::stringstream stream;
- for (int i = 0; i < num_chars; ++i) {
- UInt32 unicode_code_point;
-
- if (str[i] == L'\0') {
- break;
- } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) {
- unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i],
- str[i + 1]);
- i++;
- } else {
- unicode_code_point = static_cast<UInt32>(str[i]);
- }
-
- char buffer[32]; // CodePointToUtf8 requires a buffer this big.
- stream << CodePointToUtf8(unicode_code_point, buffer);
- }
- return StringStreamToString(&stream);
-}
-
-// Converts a wide C string to a String using the UTF-8 encoding.
-// NULL will be converted to "(null)".
-String String::ShowWideCString(const wchar_t * wide_c_str) {
- if (wide_c_str == NULL) return String("(null)");
-
- return String(internal::WideStringToUtf8(wide_c_str, -1).c_str());
-}
-
-// Similar to ShowWideCString(), except that this function encloses
-// the converted string in double quotes.
-String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
- if (wide_c_str == NULL) return String("(null)");
-
- return String::Format("L\"%s\"",
- String::ShowWideCString(wide_c_str).c_str());
-}
-
-// Compares two wide C strings. Returns true iff they have the same
-// content.
-//
-// Unlike wcscmp(), this function can handle NULL argument(s). A NULL
-// C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) {
- if (lhs == NULL) return rhs == NULL;
-
- if (rhs == NULL) return false;
-
- return wcscmp(lhs, rhs) == 0;
-}
-
-// Helper function for *_STREQ on wide strings.
-AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const wchar_t* expected,
- const wchar_t* actual) {
- if (String::WideCStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowWideCStringQuoted(expected),
- String::ShowWideCStringQuoted(actual),
- false);
-}
-
-// Helper function for *_STRNE on wide strings.
-AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const wchar_t* s1,
- const wchar_t* s2) {
- if (!String::WideCStringEquals(s1, s2)) {
- return AssertionSuccess();
- }
-
- return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
- << s2_expression << "), actual: "
- << String::ShowWideCStringQuoted(s1)
- << " vs " << String::ShowWideCStringQuoted(s2);
-}
-
-// Compares two C strings, ignoring case. Returns true iff they have
-// the same content.
-//
-// Unlike strcasecmp(), this function can handle NULL argument(s). A
-// NULL C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) {
- if (lhs == NULL)
- return rhs == NULL;
- if (rhs == NULL)
- return false;
- return posix::StrCaseCmp(lhs, rhs) == 0;
-}
-
- // Compares two wide C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike wcscasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL wide C string,
- // including the empty string.
- // NB: The implementations on different platforms slightly differ.
- // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
- // environment variable. On GNU platform this method uses wcscasecmp
- // which compares according to LC_CTYPE category of the current locale.
- // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
- // current locale.
-bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs) {
- if (lhs == NULL) return rhs == NULL;
-
- if (rhs == NULL) return false;
-
-#if GTEST_OS_WINDOWS
- return _wcsicmp(lhs, rhs) == 0;
-#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID
- return wcscasecmp(lhs, rhs) == 0;
-#else
- // Android, Mac OS X and Cygwin don't define wcscasecmp.
- // Other unknown OSes may not define it either.
- wint_t left, right;
- do {
- left = towlower(*lhs++);
- right = towlower(*rhs++);
- } while (left && left == right);
- return left == right;
-#endif // OS selector
-}
-
-// Compares this with another String.
-// Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0
-// if this is greater than rhs.
-int String::Compare(const String & rhs) const {
- const char* const lhs_c_str = c_str();
- const char* const rhs_c_str = rhs.c_str();
-
- if (lhs_c_str == NULL) {
- return rhs_c_str == NULL ? 0 : -1; // NULL < anything except NULL
- } else if (rhs_c_str == NULL) {
- return 1;
- }
-
- const size_t shorter_str_len =
- length() <= rhs.length() ? length() : rhs.length();
- for (size_t i = 0; i != shorter_str_len; i++) {
- if (lhs_c_str[i] < rhs_c_str[i]) {
- return -1;
- } else if (lhs_c_str[i] > rhs_c_str[i]) {
- return 1;
- }
- }
- return (length() < rhs.length()) ? -1 :
- (length() > rhs.length()) ? 1 : 0;
-}
-
-// Returns true iff this String ends with the given suffix. *Any*
-// String is considered to end with a NULL or empty suffix.
-bool String::EndsWith(const char* suffix) const {
- if (suffix == NULL || CStringEquals(suffix, "")) return true;
-
- if (c_str() == NULL) return false;
-
- const size_t this_len = strlen(c_str());
- const size_t suffix_len = strlen(suffix);
- return (this_len >= suffix_len) &&
- CStringEquals(c_str() + this_len - suffix_len, suffix);
-}
-
-// Returns true iff this String ends with the given suffix, ignoring case.
-// Any String is considered to end with a NULL or empty suffix.
-bool String::EndsWithCaseInsensitive(const char* suffix) const {
- if (suffix == NULL || CStringEquals(suffix, "")) return true;
-
- if (c_str() == NULL) return false;
-
- const size_t this_len = strlen(c_str());
- const size_t suffix_len = strlen(suffix);
- return (this_len >= suffix_len) &&
- CaseInsensitiveCStringEquals(c_str() + this_len - suffix_len, suffix);
-}
-
-// Formats a list of arguments to a String, using the same format
-// spec string as for printf.
-//
-// We do not use the StringPrintf class as it is not universally
-// available.
-//
-// The result is limited to 4096 characters (including the tailing 0).
-// If 4096 characters are not enough to format the input, or if
-// there's an error, "<formatting error or buffer exceeded>" is
-// returned.
-String String::Format(const char * format, ...) {
- va_list args;
- va_start(args, format);
-
- char buffer[4096];
- const int kBufferSize = sizeof(buffer)/sizeof(buffer[0]);
-
- // MSVC 8 deprecates vsnprintf(), so we want to suppress warning
- // 4996 (deprecated function) there.
-#ifdef _MSC_VER // We are using MSVC.
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
-
- const int size = vsnprintf(buffer, kBufferSize, format, args);
-
-# pragma warning(pop) // Restores the warning state.
-#else // We are not using MSVC.
- const int size = vsnprintf(buffer, kBufferSize, format, args);
-#endif // _MSC_VER
- va_end(args);
-
- // vsnprintf()'s behavior is not portable. When the buffer is not
- // big enough, it returns a negative value in MSVC, and returns the
- // needed buffer size on Linux. When there is an output error, it
- // always returns a negative value. For simplicity, we lump the two
- // error cases together.
- if (size < 0 || size >= kBufferSize) {
- return String("<formatting error or buffer exceeded>");
- } else {
- return String(buffer, size);
- }
-}
-
-// Converts the buffer in a stringstream to a String, converting NUL
-// bytes to "\\0" along the way.
-String StringStreamToString(::std::stringstream* ss) {
- const ::std::string& str = ss->str();
- const char* const start = str.c_str();
- const char* const end = start + str.length();
-
- // We need to use a helper stringstream to do this transformation
- // because String doesn't support push_back().
- ::std::stringstream helper;
- for (const char* ch = start; ch != end; ++ch) {
- if (*ch == '\0') {
- helper << "\\0"; // Replaces NUL with "\\0";
- } else {
- helper.put(*ch);
- }
- }
-
- return String(helper.str().c_str());
-}
-
-// Appends the user-supplied message to the Google-Test-generated message.
-String AppendUserMessage(const String& gtest_msg,
- const Message& user_msg) {
- // Appends the user message if it's non-empty.
- const String user_msg_string = user_msg.GetString();
- if (user_msg_string.empty()) {
- return gtest_msg;
- }
-
- Message msg;
- msg << gtest_msg << "\n" << user_msg_string;
-
- return msg.GetString();
-}
-
-} // namespace internal
-
-// class TestResult
-
-// Creates an empty TestResult.
-TestResult::TestResult()
- : death_test_count_(0),
- elapsed_time_(0) {
-}
-
-// D'tor.
-TestResult::~TestResult() {
-}
-
-// Returns the i-th test part result among all the results. i can
-// range from 0 to total_part_count() - 1. If i is not in that range,
-// aborts the program.
-const TestPartResult& TestResult::GetTestPartResult(int i) const {
- if (i < 0 || i >= total_part_count())
- internal::posix::Abort();
- return test_part_results_.at(i);
-}
-
-// Returns the i-th test property. i can range from 0 to
-// test_property_count() - 1. If i is not in that range, aborts the
-// program.
-const TestProperty& TestResult::GetTestProperty(int i) const {
- if (i < 0 || i >= test_property_count())
- internal::posix::Abort();
- return test_properties_.at(i);
-}
-
-// Clears the test part results.
-void TestResult::ClearTestPartResults() {
- test_part_results_.clear();
-}
-
-// Adds a test part result to the list.
-void TestResult::AddTestPartResult(const TestPartResult& test_part_result) {
- test_part_results_.push_back(test_part_result);
-}
-
-// Adds a test property to the list. If a property with the same key as the
-// supplied property is already represented, the value of this test_property
-// replaces the old value for that key.
-void TestResult::RecordProperty(const TestProperty& test_property) {
- if (!ValidateTestProperty(test_property)) {
- return;
- }
- internal::MutexLock lock(&test_properites_mutex_);
- const std::vector<TestProperty>::iterator property_with_matching_key =
- std::find_if(test_properties_.begin(), test_properties_.end(),
- internal::TestPropertyKeyIs(test_property.key()));
- if (property_with_matching_key == test_properties_.end()) {
- test_properties_.push_back(test_property);
- return;
- }
- property_with_matching_key->SetValue(test_property.value());
-}
-
-// Adds a failure if the key is a reserved attribute of Google Test
-// testcase tags. Returns true if the property is valid.
-bool TestResult::ValidateTestProperty(const TestProperty& test_property) {
- internal::String key(test_property.key());
- if (key == "name" || key == "status" || key == "time" || key == "classname") {
- ADD_FAILURE()
- << "Reserved key used in RecordProperty(): "
- << key
- << " ('name', 'status', 'time', and 'classname' are reserved by "
- << GTEST_NAME_ << ")";
- return false;
- }
- return true;
-}
-
-// Clears the object.
-void TestResult::Clear() {
- test_part_results_.clear();
- test_properties_.clear();
- death_test_count_ = 0;
- elapsed_time_ = 0;
-}
-
-// Returns true iff the test failed.
-bool TestResult::Failed() const {
- for (int i = 0; i < total_part_count(); ++i) {
- if (GetTestPartResult(i).failed())
- return true;
- }
- return false;
-}
-
-// Returns true iff the test part fatally failed.
-static bool TestPartFatallyFailed(const TestPartResult& result) {
- return result.fatally_failed();
-}
-
-// Returns true iff the test fatally failed.
-bool TestResult::HasFatalFailure() const {
- return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
-}
-
-// Returns true iff the test part non-fatally failed.
-static bool TestPartNonfatallyFailed(const TestPartResult& result) {
- return result.nonfatally_failed();
-}
-
-// Returns true iff the test has a non-fatal failure.
-bool TestResult::HasNonfatalFailure() const {
- return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;
-}
-
-// Gets the number of all test parts. This is the sum of the number
-// of successful test parts and the number of failed test parts.
-int TestResult::total_part_count() const {
- return static_cast<int>(test_part_results_.size());
-}
-
-// Returns the number of the test properties.
-int TestResult::test_property_count() const {
- return static_cast<int>(test_properties_.size());
-}
-
-// class Test
-
-// Creates a Test object.
-
-// The c'tor saves the values of all Google Test flags.
-Test::Test()
- : gtest_flag_saver_(new internal::GTestFlagSaver) {
-}
-
-// The d'tor restores the values of all Google Test flags.
-Test::~Test() {
- delete gtest_flag_saver_;
-}
-
-// Sets up the test fixture.
-//
-// A sub-class may override this.
-void Test::SetUp() {
-}
-
-// Tears down the test fixture.
-//
-// A sub-class may override this.
-void Test::TearDown() {
-}
-
-// Allows user supplied key value pairs to be recorded for later output.
-void Test::RecordProperty(const char* key, const char* value) {
- UnitTest::GetInstance()->RecordPropertyForCurrentTest(key, value);
-}
-
-// Allows user supplied key value pairs to be recorded for later output.
-void Test::RecordProperty(const char* key, int value) {
- Message value_message;
- value_message << value;
- RecordProperty(key, value_message.GetString().c_str());
-}
-
-namespace internal {
-
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
- const String& message) {
- // This function is a friend of UnitTest and as such has access to
- // AddTestPartResult.
- UnitTest::GetInstance()->AddTestPartResult(
- result_type,
- NULL, // No info about the source file where the exception occurred.
- -1, // We have no info on which line caused the exception.
- message,
- String()); // No stack trace, either.
-}
-
-} // namespace internal
-
-// Google Test requires all tests in the same test case to use the same test
-// fixture class. This function checks if the current test has the
-// same fixture class as the first test in the current test case. If
-// yes, it returns true; otherwise it generates a Google Test failure and
-// returns false.
-bool Test::HasSameFixtureClass() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- const TestCase* const test_case = impl->current_test_case();
-
- // Info about the first test in the current test case.
- const TestInfo* const first_test_info = test_case->test_info_list()[0];
- const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;
- const char* const first_test_name = first_test_info->name();
-
- // Info about the current test.
- const TestInfo* const this_test_info = impl->current_test_info();
- const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;
- const char* const this_test_name = this_test_info->name();
-
- if (this_fixture_id != first_fixture_id) {
- // Is the first test defined using TEST?
- const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();
- // Is this test defined using TEST?
- const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();
-
- if (first_is_TEST || this_is_TEST) {
- // The user mixed TEST and TEST_F in this test case - we'll tell
- // him/her how to fix it.
-
- // Gets the name of the TEST and the name of the TEST_F. Note
- // that first_is_TEST and this_is_TEST cannot both be true, as
- // the fixture IDs are different for the two tests.
- const char* const TEST_name =
- first_is_TEST ? first_test_name : this_test_name;
- const char* const TEST_F_name =
- first_is_TEST ? this_test_name : first_test_name;
-
- ADD_FAILURE()
- << "All tests in the same test case must use the same test fixture\n"
- << "class, so mixing TEST_F and TEST in the same test case is\n"
- << "illegal. In test case " << this_test_info->test_case_name()
- << ",\n"
- << "test " << TEST_F_name << " is defined using TEST_F but\n"
- << "test " << TEST_name << " is defined using TEST. You probably\n"
- << "want to change the TEST to TEST_F or move it to another test\n"
- << "case.";
- } else {
- // The user defined two fixture classes with the same name in
- // two namespaces - we'll tell him/her how to fix it.
- ADD_FAILURE()
- << "All tests in the same test case must use the same test fixture\n"
- << "class. However, in test case "
- << this_test_info->test_case_name() << ",\n"
- << "you defined test " << first_test_name
- << " and test " << this_test_name << "\n"
- << "using two different test fixture classes. This can happen if\n"
- << "the two classes are from different namespaces or translation\n"
- << "units and have the same name. You should probably rename one\n"
- << "of the classes to put the tests into different test cases.";
- }
- return false;
- }
-
- return true;
-}
-
-#if GTEST_HAS_SEH
-
-// Adds an "exception thrown" fatal failure to the current test. This
-// function returns its result via an output parameter pointer because VC++
-// prohibits creation of objects with destructors on stack in functions
-// using __try (see error C2712).
-static internal::String* FormatSehExceptionMessage(DWORD exception_code,
- const char* location) {
- Message message;
- message << "SEH exception with code 0x" << std::setbase(16) <<
- exception_code << std::setbase(10) << " thrown in " << location << ".";
-
- return new internal::String(message.GetString());
-}
-
-#endif // GTEST_HAS_SEH
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Adds an "exception thrown" fatal failure to the current test.
-static internal::String FormatCxxExceptionMessage(const char* description,
- const char* location) {
- Message message;
- if (description != NULL) {
- message << "C++ exception with description \"" << description << "\"";
- } else {
- message << "Unknown C++ exception";
- }
- message << " thrown in " << location << ".";
-
- return message.GetString();
-}
-
-static internal::String PrintTestPartResultToString(
- const TestPartResult& test_part_result);
-
-// A failed Google Test assertion will throw an exception of this type when
-// GTEST_FLAG(throw_on_failure) is true (if exceptions are enabled). We
-// derive it from std::runtime_error, which is for errors presumably
-// detectable only at run time. Since std::runtime_error inherits from
-// std::exception, many testing frameworks know how to extract and print the
-// message inside it.
-class GoogleTestFailureException : public ::std::runtime_error {
- public:
- explicit GoogleTestFailureException(const TestPartResult& failure)
- : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {}
-};
-#endif // GTEST_HAS_EXCEPTIONS
-
-namespace internal {
-// We put these helper functions in the internal namespace as IBM's xlC
-// compiler rejects the code if they were declared static.
-
-// Runs the given method and handles SEH exceptions it throws, when
-// SEH is supported; returns the 0-value for type Result in case of an
-// SEH exception. (Microsoft compilers cannot handle SEH and C++
-// exceptions in the same function. Therefore, we provide a separate
-// wrapper function for handling SEH exceptions.)
-template <class T, typename Result>
-Result HandleSehExceptionsInMethodIfSupported(
- T* object, Result (T::*method)(), const char* location) {
-#if GTEST_HAS_SEH
- __try {
- return (object->*method)();
- } __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT
- GetExceptionCode())) {
- // We create the exception message on the heap because VC++ prohibits
- // creation of objects with destructors on stack in functions using __try
- // (see error C2712).
- internal::String* exception_message = FormatSehExceptionMessage(
- GetExceptionCode(), location);
- internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,
- *exception_message);
- delete exception_message;
- return static_cast<Result>(0);
- }
-#else
- (void)location;
- return (object->*method)();
-#endif // GTEST_HAS_SEH
-}
-
-// Runs the given method and catches and reports C++ and/or SEH-style
-// exceptions, if they are supported; returns the 0-value for type
-// Result in case of an SEH exception.
-template <class T, typename Result>
-Result HandleExceptionsInMethodIfSupported(
- T* object, Result (T::*method)(), const char* location) {
- // NOTE: The user code can affect the way in which Google Test handles
- // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
- // RUN_ALL_TESTS() starts. It is technically possible to check the flag
- // after the exception is caught and either report or re-throw the
- // exception based on the flag's value:
- //
- // try {
- // // Perform the test method.
- // } catch (...) {
- // if (GTEST_FLAG(catch_exceptions))
- // // Report the exception as failure.
- // else
- // throw; // Re-throws the original exception.
- // }
- //
- // However, the purpose of this flag is to allow the program to drop into
- // the debugger when the exception is thrown. On most platforms, once the
- // control enters the catch block, the exception origin information is
- // lost and the debugger will stop the program at the point of the
- // re-throw in this function -- instead of at the point of the original
- // throw statement in the code under test. For this reason, we perform
- // the check early, sacrificing the ability to affect Google Test's
- // exception handling in the method where the exception is thrown.
- if (internal::GetUnitTestImpl()->catch_exceptions()) {
-#if GTEST_HAS_EXCEPTIONS
- try {
- return HandleSehExceptionsInMethodIfSupported(object, method, location);
- } catch (const GoogleTestFailureException&) { // NOLINT
- // This exception doesn't originate in code under test. It makes no
- // sense to report it as a test failure.
- throw;
- } catch (const std::exception& e) { // NOLINT
- internal::ReportFailureInUnknownLocation(
- TestPartResult::kFatalFailure,
- FormatCxxExceptionMessage(e.what(), location));
- } catch (...) { // NOLINT
- internal::ReportFailureInUnknownLocation(
- TestPartResult::kFatalFailure,
- FormatCxxExceptionMessage(NULL, location));
- }
- return static_cast<Result>(0);
-#else
- return HandleSehExceptionsInMethodIfSupported(object, method, location);
-#endif // GTEST_HAS_EXCEPTIONS
- } else {
- return (object->*method)();
- }
-}
-
-} // namespace internal
-
-// Runs the test and updates the test result.
-void Test::Run() {
- if (!HasSameFixtureClass()) return;
-
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()");
- // We will run the test only if SetUp() was successful.
- if (!HasFatalFailure()) {
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &Test::TestBody, "the test body");
- }
-
- // However, we want to clean up as much as possible. Hence we will
- // always call TearDown(), even if SetUp() or the test body has
- // failed.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &Test::TearDown, "TearDown()");
-}
-
-// Returns true iff the current test has a fatal failure.
-bool Test::HasFatalFailure() {
- return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();
-}
-
-// Returns true iff the current test has a non-fatal failure.
-bool Test::HasNonfatalFailure() {
- return internal::GetUnitTestImpl()->current_test_result()->
- HasNonfatalFailure();
-}
-
-// class TestInfo
-
-// Constructs a TestInfo object. It assumes ownership of the test factory
-// object.
-// TODO(vladl@google.com): Make a_test_case_name and a_name const string&'s
-// to signify they cannot be NULLs.
-TestInfo::TestInfo(const char* a_test_case_name,
- const char* a_name,
- const char* a_type_param,
- const char* a_value_param,
- internal::TypeId fixture_class_id,
- internal::TestFactoryBase* factory)
- : test_case_name_(a_test_case_name),
- name_(a_name),
- type_param_(a_type_param ? new std::string(a_type_param) : NULL),
- value_param_(a_value_param ? new std::string(a_value_param) : NULL),
- fixture_class_id_(fixture_class_id),
- should_run_(false),
- is_disabled_(false),
- matches_filter_(false),
- factory_(factory),
- result_() {}
-
-// Destructs a TestInfo object.
-TestInfo::~TestInfo() { delete factory_; }
-
-namespace internal {
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// name: name of the test
-// type_param: the name of the test's type parameter, or NULL if
-// this is not a typed or a type-parameterized test.
-// value_param: text representation of the test's value parameter,
-// or NULL if this is not a value-parameterized test.
-// fixture_class_id: ID of the test fixture class
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-// factory: pointer to the factory that creates a test object.
-// The newly created TestInfo instance will assume
-// ownership of the factory object.
-TestInfo* MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- TypeId fixture_class_id,
- SetUpTestCaseFunc set_up_tc,
- TearDownTestCaseFunc tear_down_tc,
- TestFactoryBase* factory) {
- TestInfo* const test_info =
- new TestInfo(test_case_name, name, type_param, value_param,
- fixture_class_id, factory);
- GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);
- return test_info;
-}
-
-#if GTEST_HAS_PARAM_TEST
-void ReportInvalidTestCaseType(const char* test_case_name,
- const char* file, int line) {
- Message errors;
- errors
- << "Attempted redefinition of test case " << test_case_name << ".\n"
- << "All tests in the same test case must use the same test fixture\n"
- << "class. However, in test case " << test_case_name << ", you tried\n"
- << "to define a test using a fixture class different from the one\n"
- << "used earlier. This can happen if the two fixture classes are\n"
- << "from different namespaces and have the same name. You should\n"
- << "probably rename one of the classes to put the tests into different\n"
- << "test cases.";
-
- fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
- errors.GetString().c_str());
-}
-#endif // GTEST_HAS_PARAM_TEST
-
-} // namespace internal
-
-namespace {
-
-// A predicate that checks the test name of a TestInfo against a known
-// value.
-//
-// This is used for implementation of the TestCase class only. We put
-// it in the anonymous namespace to prevent polluting the outer
-// namespace.
-//
-// TestNameIs is copyable.
-class TestNameIs {
- public:
- // Constructor.
- //
- // TestNameIs has NO default constructor.
- explicit TestNameIs(const char* name)
- : name_(name) {}
-
- // Returns true iff the test name of test_info matches name_.
- bool operator()(const TestInfo * test_info) const {
- return test_info && internal::String(test_info->name()).Compare(name_) == 0;
- }
-
- private:
- internal::String name_;
-};
-
-} // namespace
-
-namespace internal {
-
-// This method expands all parameterized tests registered with macros TEST_P
-// and INSTANTIATE_TEST_CASE_P into regular tests and registers those.
-// This will be done just once during the program runtime.
-void UnitTestImpl::RegisterParameterizedTests() {
-#if GTEST_HAS_PARAM_TEST
- if (!parameterized_tests_registered_) {
- parameterized_test_registry_.RegisterTests();
- parameterized_tests_registered_ = true;
- }
-#endif
-}
-
-} // namespace internal
-
-// Creates the test object, runs it, records its result, and then
-// deletes it.
-void TestInfo::Run() {
- if (!should_run_) return;
-
- // Tells UnitTest where to store test result.
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->set_current_test_info(this);
-
- TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
-
- // Notifies the unit test event listeners that a test is about to start.
- repeater->OnTestStart(*this);
-
- const TimeInMillis start = internal::GetTimeInMillis();
-
- impl->os_stack_trace_getter()->UponLeavingGTest();
-
- // Creates the test object.
- Test* const test = internal::HandleExceptionsInMethodIfSupported(
- factory_, &internal::TestFactoryBase::CreateTest,
- "the test fixture's constructor");
-
- // Runs the test only if the test object was created and its
- // constructor didn't generate a fatal failure.
- if ((test != NULL) && !Test::HasFatalFailure()) {
- // This doesn't throw as all user code that can throw are wrapped into
- // exception handling code.
- test->Run();
- }
-
- // Deletes the test object.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- test, &Test::DeleteSelf_, "the test fixture's destructor");
-
- result_.set_elapsed_time(internal::GetTimeInMillis() - start);
-
- // Notifies the unit test event listener that a test has just finished.
- repeater->OnTestEnd(*this);
-
- // Tells UnitTest to stop associating assertion results to this
- // test.
- impl->set_current_test_info(NULL);
-}
-
-// class TestCase
-
-// Gets the number of successful tests in this test case.
-int TestCase::successful_test_count() const {
- return CountIf(test_info_list_, TestPassed);
-}
-
-// Gets the number of failed tests in this test case.
-int TestCase::failed_test_count() const {
- return CountIf(test_info_list_, TestFailed);
-}
-
-int TestCase::disabled_test_count() const {
- return CountIf(test_info_list_, TestDisabled);
-}
-
-// Get the number of tests in this test case that should run.
-int TestCase::test_to_run_count() const {
- return CountIf(test_info_list_, ShouldRunTest);
-}
-
-// Gets the number of all tests.
-int TestCase::total_test_count() const {
- return static_cast<int>(test_info_list_.size());
-}
-
-// Creates a TestCase with the given name.
-//
-// Arguments:
-//
-// name: name of the test case
-// a_type_param: the name of the test case's type parameter, or NULL if
-// this is not a typed or a type-parameterized test case.
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-TestCase::TestCase(const char* a_name, const char* a_type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc)
- : name_(a_name),
- type_param_(a_type_param ? new std::string(a_type_param) : NULL),
- set_up_tc_(set_up_tc),
- tear_down_tc_(tear_down_tc),
- should_run_(false),
- elapsed_time_(0) {
-}
-
-// Destructor of TestCase.
-TestCase::~TestCase() {
- // Deletes every Test in the collection.
- ForEach(test_info_list_, internal::Delete<TestInfo>);
-}
-
-// Returns the i-th test among all the tests. i can range from 0 to
-// total_test_count() - 1. If i is not in that range, returns NULL.
-const TestInfo* TestCase::GetTestInfo(int i) const {
- const int index = GetElementOr(test_indices_, i, -1);
- return index < 0 ? NULL : test_info_list_[index];
-}
-
-// Returns the i-th test among all the tests. i can range from 0 to
-// total_test_count() - 1. If i is not in that range, returns NULL.
-TestInfo* TestCase::GetMutableTestInfo(int i) {
- const int index = GetElementOr(test_indices_, i, -1);
- return index < 0 ? NULL : test_info_list_[index];
-}
-
-// Adds a test to this test case. Will delete the test upon
-// destruction of the TestCase object.
-void TestCase::AddTestInfo(TestInfo * test_info) {
- test_info_list_.push_back(test_info);
- test_indices_.push_back(static_cast<int>(test_indices_.size()));
-}
-
-// Runs every test in this TestCase.
-void TestCase::Run() {
- if (!should_run_) return;
-
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->set_current_test_case(this);
-
- TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
-
- repeater->OnTestCaseStart(*this);
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &TestCase::RunSetUpTestCase, "SetUpTestCase()");
-
- const internal::TimeInMillis start = internal::GetTimeInMillis();
- for (int i = 0; i < total_test_count(); i++) {
- GetMutableTestInfo(i)->Run();
- }
- elapsed_time_ = internal::GetTimeInMillis() - start;
-
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &TestCase::RunTearDownTestCase, "TearDownTestCase()");
-
- repeater->OnTestCaseEnd(*this);
- impl->set_current_test_case(NULL);
-}
-
-// Clears the results of all tests in this test case.
-void TestCase::ClearResult() {
- ForEach(test_info_list_, TestInfo::ClearTestResult);
-}
-
-// Shuffles the tests in this test case.
-void TestCase::ShuffleTests(internal::Random* random) {
- Shuffle(random, &test_indices_);
-}
-
-// Restores the test order to before the first shuffle.
-void TestCase::UnshuffleTests() {
- for (size_t i = 0; i < test_indices_.size(); i++) {
- test_indices_[i] = static_cast<int>(i);
- }
-}
-
-// Formats a countable noun. Depending on its quantity, either the
-// singular form or the plural form is used. e.g.
-//
-// FormatCountableNoun(1, "formula", "formuli") returns "1 formula".
-// FormatCountableNoun(5, "book", "books") returns "5 books".
-static internal::String FormatCountableNoun(int count,
- const char * singular_form,
- const char * plural_form) {
- return internal::String::Format("%d %s", count,
- count == 1 ? singular_form : plural_form);
-}
-
-// Formats the count of tests.
-static internal::String FormatTestCount(int test_count) {
- return FormatCountableNoun(test_count, "test", "tests");
-}
-
-// Formats the count of test cases.
-static internal::String FormatTestCaseCount(int test_case_count) {
- return FormatCountableNoun(test_case_count, "test case", "test cases");
-}
-
-// Converts a TestPartResult::Type enum to human-friendly string
-// representation. Both kNonFatalFailure and kFatalFailure are translated
-// to "Failure", as the user usually doesn't care about the difference
-// between the two when viewing the test result.
-static const char * TestPartResultTypeToString(TestPartResult::Type type) {
- switch (type) {
- case TestPartResult::kSuccess:
- return "Success";
-
- case TestPartResult::kNonFatalFailure:
- case TestPartResult::kFatalFailure:
-#ifdef _MSC_VER
- return "error: ";
-#else
- return "Failure\n";
-#endif
- default:
- return "Unknown result type";
- }
-}
-
-// Prints a TestPartResult to a String.
-static internal::String PrintTestPartResultToString(
- const TestPartResult& test_part_result) {
- return (Message()
- << internal::FormatFileLocation(test_part_result.file_name(),
- test_part_result.line_number())
- << " " << TestPartResultTypeToString(test_part_result.type())
- << test_part_result.message()).GetString();
-}
-
-// Prints a TestPartResult.
-static void PrintTestPartResult(const TestPartResult& test_part_result) {
- const internal::String& result =
- PrintTestPartResultToString(test_part_result);
- printf("%s\n", result.c_str());
- fflush(stdout);
- // If the test program runs in Visual Studio or a debugger, the
- // following statements add the test part result message to the Output
- // window such that the user can double-click on it to jump to the
- // corresponding source code location; otherwise they do nothing.
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- // We don't call OutputDebugString*() on Windows Mobile, as printing
- // to stdout is done by OutputDebugString() there already - we don't
- // want the same message printed twice.
- ::OutputDebugStringA(result.c_str());
- ::OutputDebugStringA("\n");
-#endif
-}
-
-// class PrettyUnitTestResultPrinter
-
-namespace internal {
-
-enum GTestColor {
- COLOR_DEFAULT,
- COLOR_RED,
- COLOR_GREEN,
- COLOR_YELLOW
-};
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
-
-// Returns the character attribute for the given color.
-WORD GetColorAttribute(GTestColor color) {
- switch (color) {
- case COLOR_RED: return FOREGROUND_RED;
- case COLOR_GREEN: return FOREGROUND_GREEN;
- case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN;
- default: return 0;
- }
-}
-
-#else
-
-// Returns the ANSI color code for the given color. COLOR_DEFAULT is
-// an invalid input.
-const char* GetAnsiColorCode(GTestColor color) {
- switch (color) {
- case COLOR_RED: return "1";
- case COLOR_GREEN: return "2";
- case COLOR_YELLOW: return "3";
- default: return NULL;
- };
-}
-
-#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
-
-// Returns true iff Google Test should use colors in the output.
-bool ShouldUseColor(bool stdout_is_tty) {
- const char* const gtest_color = GTEST_FLAG(color).c_str();
-
- if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
-#if GTEST_OS_WINDOWS
- // On Windows the TERM variable is usually not set, but the
- // console there does support colors.
- return stdout_is_tty;
-#else
- // On non-Windows platforms, we rely on the TERM variable.
- const char* const term = posix::GetEnv("TERM");
- const bool term_supports_color =
- String::CStringEquals(term, "xterm") ||
- String::CStringEquals(term, "xterm-color") ||
- String::CStringEquals(term, "xterm-256color") ||
- String::CStringEquals(term, "screen") ||
- String::CStringEquals(term, "linux") ||
- String::CStringEquals(term, "cygwin");
- return stdout_is_tty && term_supports_color;
-#endif // GTEST_OS_WINDOWS
- }
-
- return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
- String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
- String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
- String::CStringEquals(gtest_color, "1");
- // We take "yes", "true", "t", and "1" as meaning "yes". If the
- // value is neither one of these nor "auto", we treat it as "no" to
- // be conservative.
-}
-
-// Helpers for printing colored strings to stdout. Note that on Windows, we
-// cannot simply emit special characters and have the terminal change colors.
-// This routine must actually emit the characters rather than return a string
-// that would be colored when printed, as can be done on Linux.
-void ColoredPrintf(GTestColor color, const char* fmt, ...) {
- va_list args;
- va_start(args, fmt);
-
-#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
- const bool use_color = false;
-#else
- static const bool in_color_mode =
- ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
- const bool use_color = in_color_mode && (color != COLOR_DEFAULT);
-#endif // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
- // The '!= 0' comparison is necessary to satisfy MSVC 7.1.
-
- if (!use_color) {
- vprintf(fmt, args);
- va_end(args);
- return;
- }
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
-
- // Gets the current text color.
- CONSOLE_SCREEN_BUFFER_INFO buffer_info;
- GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
- const WORD old_color_attrs = buffer_info.wAttributes;
-
- // We need to flush the stream buffers into the console before each
- // SetConsoleTextAttribute call lest it affect the text that is already
- // printed but has not yet reached the console.
- fflush(stdout);
- SetConsoleTextAttribute(stdout_handle,
- GetColorAttribute(color) | FOREGROUND_INTENSITY);
- vprintf(fmt, args);
-
- fflush(stdout);
- // Restores the text color.
- SetConsoleTextAttribute(stdout_handle, old_color_attrs);
-#else
- printf("\033[0;3%sm", GetAnsiColorCode(color));
- vprintf(fmt, args);
- printf("\033[m"); // Resets the terminal to default.
-#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- va_end(args);
-}
-
-void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
- const char* const type_param = test_info.type_param();
- const char* const value_param = test_info.value_param();
-
- if (type_param != NULL || value_param != NULL) {
- printf(", where ");
- if (type_param != NULL) {
- printf("TypeParam = %s", type_param);
- if (value_param != NULL)
- printf(" and ");
- }
- if (value_param != NULL) {
- printf("GetParam() = %s", value_param);
- }
- }
-}
-
-// This class implements the TestEventListener interface.
-//
-// Class PrettyUnitTestResultPrinter is copyable.
-class PrettyUnitTestResultPrinter : public TestEventListener {
- public:
- PrettyUnitTestResultPrinter() {}
- static void PrintTestName(const char * test_case, const char * test) {
- printf("%s.%s", test_case, test);
- }
-
- // The following methods override what's in the TestEventListener class.
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestCaseStart(const TestCase& test_case);
- virtual void OnTestStart(const TestInfo& test_info);
- virtual void OnTestPartResult(const TestPartResult& result);
- virtual void OnTestEnd(const TestInfo& test_info);
- virtual void OnTestCaseEnd(const TestCase& test_case);
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
-
- private:
- static void PrintFailedTests(const UnitTest& unit_test);
-
- internal::String test_case_name_;
-};
-
- // Fired before each iteration of tests starts.
-void PrettyUnitTestResultPrinter::OnTestIterationStart(
- const UnitTest& unit_test, int iteration) {
- if (GTEST_FLAG(repeat) != 1)
- printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
-
- const char* const filter = GTEST_FLAG(filter).c_str();
-
- // Prints the filter if it's not *. This reminds the user that some
- // tests may be skipped.
- if (!internal::String::CStringEquals(filter, kUniversalFilter)) {
- ColoredPrintf(COLOR_YELLOW,
- "Note: %s filter = %s\n", GTEST_NAME_, filter);
- }
-
- if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
- const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
- ColoredPrintf(COLOR_YELLOW,
- "Note: This is test shard %d of %s.\n",
- static_cast<int>(shard_index) + 1,
- internal::posix::GetEnv(kTestTotalShards));
- }
-
- if (GTEST_FLAG(shuffle)) {
- ColoredPrintf(COLOR_YELLOW,
- "Note: Randomizing tests' orders with a seed of %d .\n",
- unit_test.random_seed());
- }
-
- ColoredPrintf(COLOR_GREEN, "[==========] ");
- printf("Running %s from %s.\n",
- FormatTestCount(unit_test.test_to_run_count()).c_str(),
- FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(
- const UnitTest& /*unit_test*/) {
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("Global test environment set-up.\n");
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
- test_case_name_ = test_case.name();
- const internal::String counts =
- FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("%s from %s", counts.c_str(), test_case_name_.c_str());
- if (test_case.type_param() == NULL) {
- printf("\n");
- } else {
- printf(", where TypeParam = %s\n", test_case.type_param());
- }
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {
- ColoredPrintf(COLOR_GREEN, "[ RUN ] ");
- PrintTestName(test_case_name_.c_str(), test_info.name());
- printf("\n");
- fflush(stdout);
-}
-
-// Called after an assertion failure.
-void PrettyUnitTestResultPrinter::OnTestPartResult(
- const TestPartResult& result) {
- // If the test part succeeded, we don't need to do anything.
- if (result.type() == TestPartResult::kSuccess)
- return;
-
- // Print failure message from the assertion (e.g. expected this and got that).
- PrintTestPartResult(result);
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) {
- if (test_info.result()->Passed()) {
- ColoredPrintf(COLOR_GREEN, "[ OK ] ");
- } else {
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- }
- PrintTestName(test_case_name_.c_str(), test_info.name());
- if (test_info.result()->Failed())
- PrintFullTestCommentIfPresent(test_info);
-
- if (GTEST_FLAG(print_time)) {
- printf(" (%s ms)\n", internal::StreamableToString(
- test_info.result()->elapsed_time()).c_str());
- } else {
- printf("\n");
- }
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) {
- if (!GTEST_FLAG(print_time)) return;
-
- test_case_name_ = test_case.name();
- const internal::String counts =
- FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("%s from %s (%s ms total)\n\n",
- counts.c_str(), test_case_name_.c_str(),
- internal::StreamableToString(test_case.elapsed_time()).c_str());
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart(
- const UnitTest& /*unit_test*/) {
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("Global test environment tear-down\n");
- fflush(stdout);
-}
-
-// Internal helper for printing the list of failed tests.
-void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {
- const int failed_test_count = unit_test.failed_test_count();
- if (failed_test_count == 0) {
- return;
- }
-
- for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
- const TestCase& test_case = *unit_test.GetTestCase(i);
- if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {
- continue;
- }
- for (int j = 0; j < test_case.total_test_count(); ++j) {
- const TestInfo& test_info = *test_case.GetTestInfo(j);
- if (!test_info.should_run() || test_info.result()->Passed()) {
- continue;
- }
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- printf("%s.%s", test_case.name(), test_info.name());
- PrintFullTestCommentIfPresent(test_info);
- printf("\n");
- }
- }
-}
-
-void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
- int /*iteration*/) {
- ColoredPrintf(COLOR_GREEN, "[==========] ");
- printf("%s from %s ran.",
- FormatTestCount(unit_test.test_to_run_count()).c_str(),
- FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
- if (GTEST_FLAG(print_time)) {
- printf(" (%s ms total)",
- internal::StreamableToString(unit_test.elapsed_time()).c_str());
- }
- printf("\n");
- ColoredPrintf(COLOR_GREEN, "[ PASSED ] ");
- printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str());
-
- int num_failures = unit_test.failed_test_count();
- if (!unit_test.Passed()) {
- const int failed_test_count = unit_test.failed_test_count();
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str());
- PrintFailedTests(unit_test);
- printf("\n%2d FAILED %s\n", num_failures,
- num_failures == 1 ? "TEST" : "TESTS");
- }
-
- int num_disabled = unit_test.disabled_test_count();
- if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) {
- if (!num_failures) {
- printf("\n"); // Add a spacer if no FAILURE banner is displayed.
- }
- ColoredPrintf(COLOR_YELLOW,
- " YOU HAVE %d DISABLED %s\n\n",
- num_disabled,
- num_disabled == 1 ? "TEST" : "TESTS");
- }
- // Ensure that Google Test output is printed before, e.g., heapchecker output.
- fflush(stdout);
-}
-
-// End PrettyUnitTestResultPrinter
-
-// class TestEventRepeater
-//
-// This class forwards events to other event listeners.
-class TestEventRepeater : public TestEventListener {
- public:
- TestEventRepeater() : forwarding_enabled_(true) {}
- virtual ~TestEventRepeater();
- void Append(TestEventListener *listener);
- TestEventListener* Release(TestEventListener* listener);
-
- // Controls whether events will be forwarded to listeners_. Set to false
- // in death test child processes.
- bool forwarding_enabled() const { return forwarding_enabled_; }
- void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; }
-
- virtual void OnTestProgramStart(const UnitTest& unit_test);
- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test);
- virtual void OnTestCaseStart(const TestCase& test_case);
- virtual void OnTestStart(const TestInfo& test_info);
- virtual void OnTestPartResult(const TestPartResult& result);
- virtual void OnTestEnd(const TestInfo& test_info);
- virtual void OnTestCaseEnd(const TestCase& test_case);
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test);
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
- virtual void OnTestProgramEnd(const UnitTest& unit_test);
-
- private:
- // Controls whether events will be forwarded to listeners_. Set to false
- // in death test child processes.
- bool forwarding_enabled_;
- // The list of listeners that receive events.
- std::vector<TestEventListener*> listeners_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater);
-};
-
-TestEventRepeater::~TestEventRepeater() {
- ForEach(listeners_, Delete<TestEventListener>);
-}
-
-void TestEventRepeater::Append(TestEventListener *listener) {
- listeners_.push_back(listener);
-}
-
-// TODO(vladl@google.com): Factor the search functionality into Vector::Find.
-TestEventListener* TestEventRepeater::Release(TestEventListener *listener) {
- for (size_t i = 0; i < listeners_.size(); ++i) {
- if (listeners_[i] == listener) {
- listeners_.erase(listeners_.begin() + i);
- return listener;
- }
- }
-
- return NULL;
-}
-
-// Since most methods are very similar, use macros to reduce boilerplate.
-// This defines a member that forwards the call to all listeners.
-#define GTEST_REPEATER_METHOD_(Name, Type) \
-void TestEventRepeater::Name(const Type& parameter) { \
- if (forwarding_enabled_) { \
- for (size_t i = 0; i < listeners_.size(); i++) { \
- listeners_[i]->Name(parameter); \
- } \
- } \
-}
-// This defines a member that forwards the call to all listeners in reverse
-// order.
-#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \
-void TestEventRepeater::Name(const Type& parameter) { \
- if (forwarding_enabled_) { \
- for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) { \
- listeners_[i]->Name(parameter); \
- } \
- } \
-}
-
-GTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest)
-GTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest)
-GTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase)
-GTEST_REPEATER_METHOD_(OnTestStart, TestInfo)
-GTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult)
-GTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestCase)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest)
-
-#undef GTEST_REPEATER_METHOD_
-#undef GTEST_REVERSE_REPEATER_METHOD_
-
-void TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test,
- int iteration) {
- if (forwarding_enabled_) {
- for (size_t i = 0; i < listeners_.size(); i++) {
- listeners_[i]->OnTestIterationStart(unit_test, iteration);
- }
- }
-}
-
-void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test,
- int iteration) {
- if (forwarding_enabled_) {
- for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) {
- listeners_[i]->OnTestIterationEnd(unit_test, iteration);
- }
- }
-}
-
-// End TestEventRepeater
-
-// This class generates an XML output file.
-class XmlUnitTestResultPrinter : public EmptyTestEventListener {
- public:
- explicit XmlUnitTestResultPrinter(const char* output_file);
-
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
-
- private:
- // Is c a whitespace character that is normalized to a space character
- // when it appears in an XML attribute value?
- static bool IsNormalizableWhitespace(char c) {
- return c == 0x9 || c == 0xA || c == 0xD;
- }
-
- // May c appear in a well-formed XML document?
- static bool IsValidXmlCharacter(char c) {
- return IsNormalizableWhitespace(c) || c >= 0x20;
- }
-
- // Returns an XML-escaped copy of the input string str. If
- // is_attribute is true, the text is meant to appear as an attribute
- // value, and normalizable whitespace is preserved by replacing it
- // with character references.
- static String EscapeXml(const char* str, bool is_attribute);
-
- // Returns the given string with all characters invalid in XML removed.
- static string RemoveInvalidXmlCharacters(const string& str);
-
- // Convenience wrapper around EscapeXml when str is an attribute value.
- static String EscapeXmlAttribute(const char* str) {
- return EscapeXml(str, true);
- }
-
- // Convenience wrapper around EscapeXml when str is not an attribute value.
- static String EscapeXmlText(const char* str) { return EscapeXml(str, false); }
-
- // Streams an XML CDATA section, escaping invalid CDATA sequences as needed.
- static void OutputXmlCDataSection(::std::ostream* stream, const char* data);
-
- // Streams an XML representation of a TestInfo object.
- static void OutputXmlTestInfo(::std::ostream* stream,
- const char* test_case_name,
- const TestInfo& test_info);
-
- // Prints an XML representation of a TestCase object
- static void PrintXmlTestCase(FILE* out, const TestCase& test_case);
-
- // Prints an XML summary of unit_test to output stream out.
- static void PrintXmlUnitTest(FILE* out, const UnitTest& unit_test);
-
- // Produces a string representing the test properties in a result as space
- // delimited XML attributes based on the property key="value" pairs.
- // When the String is not empty, it includes a space at the beginning,
- // to delimit this attribute from prior attributes.
- static String TestPropertiesAsXmlAttributes(const TestResult& result);
-
- // The output file.
- const String output_file_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter);
-};
-
-// Creates a new XmlUnitTestResultPrinter.
-XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)
- : output_file_(output_file) {
- if (output_file_.c_str() == NULL || output_file_.empty()) {
- fprintf(stderr, "XML output file may not be null\n");
- fflush(stderr);
- exit(EXIT_FAILURE);
- }
-}
-
-// Called after the unit test ends.
-void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
- int /*iteration*/) {
- FILE* xmlout = NULL;
- FilePath output_file(output_file_);
- FilePath output_dir(output_file.RemoveFileName());
-
- if (output_dir.CreateDirectoriesRecursively()) {
- xmlout = posix::FOpen(output_file_.c_str(), "w");
- }
- if (xmlout == NULL) {
- // TODO(wan): report the reason of the failure.
- //
- // We don't do it for now as:
- //
- // 1. There is no urgent need for it.
- // 2. It's a bit involved to make the errno variable thread-safe on
- // all three operating systems (Linux, Windows, and Mac OS).
- // 3. To interpret the meaning of errno in a thread-safe way,
- // we need the strerror_r() function, which is not available on
- // Windows.
- fprintf(stderr,
- "Unable to open file \"%s\"\n",
- output_file_.c_str());
- fflush(stderr);
- exit(EXIT_FAILURE);
- }
- PrintXmlUnitTest(xmlout, unit_test);
- fclose(xmlout);
-}
-
-// Returns an XML-escaped copy of the input string str. If is_attribute
-// is true, the text is meant to appear as an attribute value, and
-// normalizable whitespace is preserved by replacing it with character
-// references.
-//
-// Invalid XML characters in str, if any, are stripped from the output.
-// It is expected that most, if not all, of the text processed by this
-// module will consist of ordinary English text.
-// If this module is ever modified to produce version 1.1 XML output,
-// most invalid characters can be retained using character references.
-// TODO(wan): It might be nice to have a minimally invasive, human-readable
-// escaping scheme for invalid characters, rather than dropping them.
-String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_attribute) {
- Message m;
-
- if (str != NULL) {
- for (const char* src = str; *src; ++src) {
- switch (*src) {
- case '<':
- m << "&lt;";
- break;
- case '>':
- m << "&gt;";
- break;
- case '&':
- m << "&amp;";
- break;
- case '\'':
- if (is_attribute)
- m << "&apos;";
- else
- m << '\'';
- break;
- case '"':
- if (is_attribute)
- m << "&quot;";
- else
- m << '"';
- break;
- default:
- if (IsValidXmlCharacter(*src)) {
- if (is_attribute && IsNormalizableWhitespace(*src))
- m << String::Format("&#x%02X;", unsigned(*src));
- else
- m << *src;
- }
- break;
- }
- }
- }
-
- return m.GetString();
-}
-
-// Returns the given string with all characters invalid in XML removed.
-// Currently invalid characters are dropped from the string. An
-// alternative is to replace them with certain characters such as . or ?.
-string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const string& str) {
- string output;
- output.reserve(str.size());
- for (string::const_iterator it = str.begin(); it != str.end(); ++it)
- if (IsValidXmlCharacter(*it))
- output.push_back(*it);
-
- return output;
-}
-
-// The following routines generate an XML representation of a UnitTest
-// object.
-//
-// This is how Google Test concepts map to the DTD:
-//
-// <testsuites name="AllTests"> <-- corresponds to a UnitTest object
-// <testsuite name="testcase-name"> <-- corresponds to a TestCase object
-// <testcase name="test-name"> <-- corresponds to a TestInfo object
-// <failure message="...">...</failure>
-// <failure message="...">...</failure>
-// <failure message="...">...</failure>
-// <-- individual assertion failures
-// </testcase>
-// </testsuite>
-// </testsuites>
-
-// Formats the given time in milliseconds as seconds.
-std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
- ::std::stringstream ss;
- ss << ms/1000.0;
- return ss.str();
-}
-
-// Streams an XML CDATA section, escaping invalid CDATA sequences as needed.
-void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,
- const char* data) {
- const char* segment = data;
- *stream << "<![CDATA[";
- for (;;) {
- const char* const next_segment = strstr(segment, "]]>");
- if (next_segment != NULL) {
- stream->write(
- segment, static_cast<std::streamsize>(next_segment - segment));
- *stream << "]]>]]&gt;<![CDATA[";
- segment = next_segment + strlen("]]>");
- } else {
- *stream << segment;
- break;
- }
- }
- *stream << "]]>";
-}
-
-// Prints an XML representation of a TestInfo object.
-// TODO(wan): There is also value in printing properties with the plain printer.
-void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
- const char* test_case_name,
- const TestInfo& test_info) {
- const TestResult& result = *test_info.result();
- *stream << " <testcase name=\""
- << EscapeXmlAttribute(test_info.name()).c_str() << "\"";
-
- if (test_info.value_param() != NULL) {
- *stream << " value_param=\"" << EscapeXmlAttribute(test_info.value_param())
- << "\"";
- }
- if (test_info.type_param() != NULL) {
- *stream << " type_param=\"" << EscapeXmlAttribute(test_info.type_param())
- << "\"";
- }
-
- *stream << " status=\""
- << (test_info.should_run() ? "run" : "notrun")
- << "\" time=\""
- << FormatTimeInMillisAsSeconds(result.elapsed_time())
- << "\" classname=\"" << EscapeXmlAttribute(test_case_name).c_str()
- << "\"" << TestPropertiesAsXmlAttributes(result).c_str();
-
- int failures = 0;
- for (int i = 0; i < result.total_part_count(); ++i) {
- const TestPartResult& part = result.GetTestPartResult(i);
- if (part.failed()) {
- if (++failures == 1)
- *stream << ">\n";
- *stream << " <failure message=\""
- << EscapeXmlAttribute(part.summary()).c_str()
- << "\" type=\"\">";
- const string location = internal::FormatCompilerIndependentFileLocation(
- part.file_name(), part.line_number());
- const string message = location + "\n" + part.message();
- OutputXmlCDataSection(stream,
- RemoveInvalidXmlCharacters(message).c_str());
- *stream << "</failure>\n";
- }
- }
-
- if (failures == 0)
- *stream << " />\n";
- else
- *stream << " </testcase>\n";
-}
-
-// Prints an XML representation of a TestCase object
-void XmlUnitTestResultPrinter::PrintXmlTestCase(FILE* out,
- const TestCase& test_case) {
- fprintf(out,
- " <testsuite name=\"%s\" tests=\"%d\" failures=\"%d\" "
- "disabled=\"%d\" ",
- EscapeXmlAttribute(test_case.name()).c_str(),
- test_case.total_test_count(),
- test_case.failed_test_count(),
- test_case.disabled_test_count());
- fprintf(out,
- "errors=\"0\" time=\"%s\">\n",
- FormatTimeInMillisAsSeconds(test_case.elapsed_time()).c_str());
- for (int i = 0; i < test_case.total_test_count(); ++i) {
- ::std::stringstream stream;
- OutputXmlTestInfo(&stream, test_case.name(), *test_case.GetTestInfo(i));
- fprintf(out, "%s", StringStreamToString(&stream).c_str());
- }
- fprintf(out, " </testsuite>\n");
-}
-
-// Prints an XML summary of unit_test to output stream out.
-void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out,
- const UnitTest& unit_test) {
- fprintf(out, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- fprintf(out,
- "<testsuites tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
- "errors=\"0\" time=\"%s\" ",
- unit_test.total_test_count(),
- unit_test.failed_test_count(),
- unit_test.disabled_test_count(),
- FormatTimeInMillisAsSeconds(unit_test.elapsed_time()).c_str());
- if (GTEST_FLAG(shuffle)) {
- fprintf(out, "random_seed=\"%d\" ", unit_test.random_seed());
- }
- fprintf(out, "name=\"AllTests\">\n");
- for (int i = 0; i < unit_test.total_test_case_count(); ++i)
- PrintXmlTestCase(out, *unit_test.GetTestCase(i));
- fprintf(out, "</testsuites>\n");
-}
-
-// Produces a string representing the test properties in a result as space
-// delimited XML attributes based on the property key="value" pairs.
-String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
- const TestResult& result) {
- Message attributes;
- for (int i = 0; i < result.test_property_count(); ++i) {
- const TestProperty& property = result.GetTestProperty(i);
- attributes << " " << property.key() << "="
- << "\"" << EscapeXmlAttribute(property.value()) << "\"";
- }
- return attributes.GetString();
-}
-
-// End XmlUnitTestResultPrinter
-
-#if GTEST_CAN_STREAM_RESULTS_
-
-// Streams test results to the given port on the given host machine.
-class StreamingListener : public EmptyTestEventListener {
- public:
- // Escapes '=', '&', '%', and '\n' characters in str as "%xx".
- static string UrlEncode(const char* str);
-
- StreamingListener(const string& host, const string& port)
- : sockfd_(-1), host_name_(host), port_num_(port) {
- MakeConnection();
- Send("gtest_streaming_protocol_version=1.0\n");
- }
-
- virtual ~StreamingListener() {
- if (sockfd_ != -1)
- CloseConnection();
- }
-
- void OnTestProgramStart(const UnitTest& /* unit_test */) {
- Send("event=TestProgramStart\n");
- }
-
- void OnTestProgramEnd(const UnitTest& unit_test) {
- // Note that Google Test current only report elapsed time for each
- // test iteration, not for the entire test program.
- Send(String::Format("event=TestProgramEnd&passed=%d\n",
- unit_test.Passed()));
-
- // Notify the streaming server to stop.
- CloseConnection();
- }
-
- void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) {
- Send(String::Format("event=TestIterationStart&iteration=%d\n",
- iteration));
- }
-
- void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) {
- Send(String::Format("event=TestIterationEnd&passed=%d&elapsed_time=%sms\n",
- unit_test.Passed(),
- StreamableToString(unit_test.elapsed_time()).c_str()));
- }
-
- void OnTestCaseStart(const TestCase& test_case) {
- Send(String::Format("event=TestCaseStart&name=%s\n", test_case.name()));
- }
-
- void OnTestCaseEnd(const TestCase& test_case) {
- Send(String::Format("event=TestCaseEnd&passed=%d&elapsed_time=%sms\n",
- test_case.Passed(),
- StreamableToString(test_case.elapsed_time()).c_str()));
- }
-
- void OnTestStart(const TestInfo& test_info) {
- Send(String::Format("event=TestStart&name=%s\n", test_info.name()));
- }
-
- void OnTestEnd(const TestInfo& test_info) {
- Send(String::Format(
- "event=TestEnd&passed=%d&elapsed_time=%sms\n",
- (test_info.result())->Passed(),
- StreamableToString((test_info.result())->elapsed_time()).c_str()));
- }
-
- void OnTestPartResult(const TestPartResult& test_part_result) {
- const char* file_name = test_part_result.file_name();
- if (file_name == NULL)
- file_name = "";
- Send(String::Format("event=TestPartResult&file=%s&line=%d&message=",
- UrlEncode(file_name).c_str(),
- test_part_result.line_number()));
- Send(UrlEncode(test_part_result.message()) + "\n");
- }
-
- private:
- // Creates a client socket and connects to the server.
- void MakeConnection();
-
- // Closes the socket.
- void CloseConnection() {
- GTEST_CHECK_(sockfd_ != -1)
- << "CloseConnection() can be called only when there is a connection.";
-
- close(sockfd_);
- sockfd_ = -1;
- }
-
- // Sends a string to the socket.
- void Send(const string& message) {
- GTEST_CHECK_(sockfd_ != -1)
- << "Send() can be called only when there is a connection.";
-
- const int len = static_cast<int>(message.length());
- if (write(sockfd_, message.c_str(), len) != len) {
- GTEST_LOG_(WARNING)
- << "stream_result_to: failed to stream to "
- << host_name_ << ":" << port_num_;
- }
- }
-
- int sockfd_; // socket file descriptor
- const string host_name_;
- const string port_num_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener);
-}; // class StreamingListener
-
-// Checks if str contains '=', '&', '%' or '\n' characters. If yes,
-// replaces them by "%xx" where xx is their hexadecimal value. For
-// example, replaces "=" with "%3D". This algorithm is O(strlen(str))
-// in both time and space -- important as the input str may contain an
-// arbitrarily long test failure message and stack trace.
-string StreamingListener::UrlEncode(const char* str) {
- string result;
- result.reserve(strlen(str) + 1);
- for (char ch = *str; ch != '\0'; ch = *++str) {
- switch (ch) {
- case '%':
- case '=':
- case '&':
- case '\n':
- result.append(String::Format("%%%02x", static_cast<unsigned char>(ch)));
- break;
- default:
- result.push_back(ch);
- break;
- }
- }
- return result;
-}
-
-void StreamingListener::MakeConnection() {
- GTEST_CHECK_(sockfd_ == -1)
- << "MakeConnection() can't be called when there is already a connection.";
-
- addrinfo hints;
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC; // To allow both IPv4 and IPv6 addresses.
- hints.ai_socktype = SOCK_STREAM;
- addrinfo* servinfo = NULL;
-
- // Use the getaddrinfo() to get a linked list of IP addresses for
- // the given host name.
- const int error_num = getaddrinfo(
- host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);
- if (error_num != 0) {
- GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: "
- << gai_strerror(error_num);
- }
-
- // Loop through all the results and connect to the first we can.
- for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != NULL;
- cur_addr = cur_addr->ai_next) {
- sockfd_ = socket(
- cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol);
- if (sockfd_ != -1) {
- // Connect the client socket to the server socket.
- if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {
- close(sockfd_);
- sockfd_ = -1;
- }
- }
- }
-
- freeaddrinfo(servinfo); // all done with this structure
-
- if (sockfd_ == -1) {
- GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to "
- << host_name_ << ":" << port_num_;
- }
-}
-
-// End of class Streaming Listener
-#endif // GTEST_CAN_STREAM_RESULTS__
-
-// Class ScopedTrace
-
-// Pushes the given source file location and message onto a per-thread
-// trace stack maintained by Google Test.
-// L < UnitTest::mutex_
-ScopedTrace::ScopedTrace(const char* file, int line, const Message& message) {
- TraceInfo trace;
- trace.file = file;
- trace.line = line;
- trace.message = message.GetString();
-
- UnitTest::GetInstance()->PushGTestTrace(trace);
-}
-
-// Pops the info pushed by the c'tor.
-// L < UnitTest::mutex_
-ScopedTrace::~ScopedTrace() {
- UnitTest::GetInstance()->PopGTestTrace();
-}
-
-
-// class OsStackTraceGetter
-
-// Returns the current OS stack trace as a String. Parameters:
-//
-// max_depth - the maximum number of stack frames to be included
-// in the trace.
-// skip_count - the number of top frames to be skipped; doesn't count
-// against max_depth.
-//
-// L < mutex_
-// We use "L < mutex_" to denote that the function may acquire mutex_.
-String OsStackTraceGetter::CurrentStackTrace(int, int) {
- return String("");
-}
-
-// L < mutex_
-void OsStackTraceGetter::UponLeavingGTest() {
-}
-
-const char* const
-OsStackTraceGetter::kElidedFramesMarker =
- "... " GTEST_NAME_ " internal frames ...";
-
-} // namespace internal
-
-// class TestEventListeners
-
-TestEventListeners::TestEventListeners()
- : repeater_(new internal::TestEventRepeater()),
- default_result_printer_(NULL),
- default_xml_generator_(NULL) {
-}
-
-TestEventListeners::~TestEventListeners() { delete repeater_; }
-
-// Returns the standard listener responsible for the default console
-// output. Can be removed from the listeners list to shut down default
-// console output. Note that removing this object from the listener list
-// with Release transfers its ownership to the user.
-void TestEventListeners::Append(TestEventListener* listener) {
- repeater_->Append(listener);
-}
-
-// Removes the given event listener from the list and returns it. It then
-// becomes the caller's responsibility to delete the listener. Returns
-// NULL if the listener is not found in the list.
-TestEventListener* TestEventListeners::Release(TestEventListener* listener) {
- if (listener == default_result_printer_)
- default_result_printer_ = NULL;
- else if (listener == default_xml_generator_)
- default_xml_generator_ = NULL;
- return repeater_->Release(listener);
-}
-
-// Returns repeater that broadcasts the TestEventListener events to all
-// subscribers.
-TestEventListener* TestEventListeners::repeater() { return repeater_; }
-
-// Sets the default_result_printer attribute to the provided listener.
-// The listener is also added to the listener list and previous
-// default_result_printer is removed from it and deleted. The listener can
-// also be NULL in which case it will not be added to the list. Does
-// nothing if the previous and the current listener objects are the same.
-void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {
- if (default_result_printer_ != listener) {
- // It is an error to pass this method a listener that is already in the
- // list.
- delete Release(default_result_printer_);
- default_result_printer_ = listener;
- if (listener != NULL)
- Append(listener);
- }
-}
-
-// Sets the default_xml_generator attribute to the provided listener. The
-// listener is also added to the listener list and previous
-// default_xml_generator is removed from it and deleted. The listener can
-// also be NULL in which case it will not be added to the list. Does
-// nothing if the previous and the current listener objects are the same.
-void TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) {
- if (default_xml_generator_ != listener) {
- // It is an error to pass this method a listener that is already in the
- // list.
- delete Release(default_xml_generator_);
- default_xml_generator_ = listener;
- if (listener != NULL)
- Append(listener);
- }
-}
-
-// Controls whether events will be forwarded by the repeater to the
-// listeners in the list.
-bool TestEventListeners::EventForwardingEnabled() const {
- return repeater_->forwarding_enabled();
-}
-
-void TestEventListeners::SuppressEventForwarding() {
- repeater_->set_forwarding_enabled(false);
-}
-
-// class UnitTest
-
-// Gets the singleton UnitTest object. The first time this method is
-// called, a UnitTest object is constructed and returned. Consecutive
-// calls will return the same object.
-//
-// We don't protect this under mutex_ as a user is not supposed to
-// call this before main() starts, from which point on the return
-// value will never change.
-UnitTest * UnitTest::GetInstance() {
- // When compiled with MSVC 7.1 in optimized mode, destroying the
- // UnitTest object upon exiting the program messes up the exit code,
- // causing successful tests to appear failed. We have to use a
- // different implementation in this case to bypass the compiler bug.
- // This implementation makes the compiler happy, at the cost of
- // leaking the UnitTest object.
-
- // CodeGear C++Builder insists on a public destructor for the
- // default implementation. Use this implementation to keep good OO
- // design with private destructor.
-
-#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
- static UnitTest* const instance = new UnitTest;
- return instance;
-#else
- static UnitTest instance;
- return &instance;
-#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
-}
-
-// Gets the number of successful test cases.
-int UnitTest::successful_test_case_count() const {
- return impl()->successful_test_case_count();
-}
-
-// Gets the number of failed test cases.
-int UnitTest::failed_test_case_count() const {
- return impl()->failed_test_case_count();
-}
-
-// Gets the number of all test cases.
-int UnitTest::total_test_case_count() const {
- return impl()->total_test_case_count();
-}
-
-// Gets the number of all test cases that contain at least one test
-// that should run.
-int UnitTest::test_case_to_run_count() const {
- return impl()->test_case_to_run_count();
-}
-
-// Gets the number of successful tests.
-int UnitTest::successful_test_count() const {
- return impl()->successful_test_count();
-}
-
-// Gets the number of failed tests.
-int UnitTest::failed_test_count() const { return impl()->failed_test_count(); }
-
-// Gets the number of disabled tests.
-int UnitTest::disabled_test_count() const {
- return impl()->disabled_test_count();
-}
-
-// Gets the number of all tests.
-int UnitTest::total_test_count() const { return impl()->total_test_count(); }
-
-// Gets the number of tests that should run.
-int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }
-
-// Gets the elapsed time, in milliseconds.
-internal::TimeInMillis UnitTest::elapsed_time() const {
- return impl()->elapsed_time();
-}
-
-// Returns true iff the unit test passed (i.e. all test cases passed).
-bool UnitTest::Passed() const { return impl()->Passed(); }
-
-// Returns true iff the unit test failed (i.e. some test case failed
-// or something outside of all tests failed).
-bool UnitTest::Failed() const { return impl()->Failed(); }
-
-// Gets the i-th test case among all the test cases. i can range from 0 to
-// total_test_case_count() - 1. If i is not in that range, returns NULL.
-const TestCase* UnitTest::GetTestCase(int i) const {
- return impl()->GetTestCase(i);
-}
-
-// Gets the i-th test case among all the test cases. i can range from 0 to
-// total_test_case_count() - 1. If i is not in that range, returns NULL.
-TestCase* UnitTest::GetMutableTestCase(int i) {
- return impl()->GetMutableTestCase(i);
-}
-
-// Returns the list of event listeners that can be used to track events
-// inside Google Test.
-TestEventListeners& UnitTest::listeners() {
- return *impl()->listeners();
-}
-
-// Registers and returns a global test environment. When a test
-// program is run, all global test environments will be set-up in the
-// order they were registered. After all tests in the program have
-// finished, all global test environments will be torn-down in the
-// *reverse* order they were registered.
-//
-// The UnitTest object takes ownership of the given environment.
-//
-// We don't protect this under mutex_, as we only support calling it
-// from the main thread.
-Environment* UnitTest::AddEnvironment(Environment* env) {
- if (env == NULL) {
- return NULL;
- }
-
- impl_->environments().push_back(env);
- return env;
-}
-
-// Adds a TestPartResult to the current TestResult object. All Google Test
-// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call
-// this to report their results. The user code should use the
-// assertion macros instead of calling this directly.
-// L < mutex_
-void UnitTest::AddTestPartResult(TestPartResult::Type result_type,
- const char* file_name,
- int line_number,
- const internal::String& message,
- const internal::String& os_stack_trace) {
- Message msg;
- msg << message;
-
- internal::MutexLock lock(&mutex_);
- if (impl_->gtest_trace_stack().size() > 0) {
- msg << "\n" << GTEST_NAME_ << " trace:";
-
- for (int i = static_cast<int>(impl_->gtest_trace_stack().size());
- i > 0; --i) {
- const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1];
- msg << "\n" << internal::FormatFileLocation(trace.file, trace.line)
- << " " << trace.message;
- }
- }
-
- if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) {
- msg << internal::kStackTraceMarker << os_stack_trace;
- }
-
- const TestPartResult result =
- TestPartResult(result_type, file_name, line_number,
- msg.GetString().c_str());
- impl_->GetTestPartResultReporterForCurrentThread()->
- ReportTestPartResult(result);
-
- if (result_type != TestPartResult::kSuccess) {
- // gtest_break_on_failure takes precedence over
- // gtest_throw_on_failure. This allows a user to set the latter
- // in the code (perhaps in order to use Google Test assertions
- // with another testing framework) and specify the former on the
- // command line for debugging.
- if (GTEST_FLAG(break_on_failure)) {
-#if GTEST_OS_WINDOWS
- // Using DebugBreak on Windows allows gtest to still break into a debugger
- // when a failure happens and both the --gtest_break_on_failure and
- // the --gtest_catch_exceptions flags are specified.
- DebugBreak();
-#else
- // Dereference NULL through a volatile pointer to prevent the compiler
- // from removing. We use this rather than abort() or __builtin_trap() for
- // portability: Symbian doesn't implement abort() well, and some debuggers
- // don't correctly trap abort().
- *static_cast<volatile int*>(NULL) = 1;
-#endif // GTEST_OS_WINDOWS
- } else if (GTEST_FLAG(throw_on_failure)) {
-#if GTEST_HAS_EXCEPTIONS
- throw GoogleTestFailureException(result);
-#else
- // We cannot call abort() as it generates a pop-up in debug mode
- // that cannot be suppressed in VC 7.1 or below.
- exit(1);
-#endif
- }
- }
-}
-
-// Creates and adds a property to the current TestResult. If a property matching
-// the supplied value already exists, updates its value instead.
-void UnitTest::RecordPropertyForCurrentTest(const char* key,
- const char* value) {
- const TestProperty test_property(key, value);
- impl_->current_test_result()->RecordProperty(test_property);
-}
-
-// Runs all tests in this UnitTest object and prints the result.
-// Returns 0 if successful, or 1 otherwise.
-//
-// We don't protect this under mutex_, as we only support calling it
-// from the main thread.
-int UnitTest::Run() {
- // Captures the value of GTEST_FLAG(catch_exceptions). This value will be
- // used for the duration of the program.
- impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));
-
-#if GTEST_HAS_SEH
- const bool in_death_test_child_process =
- internal::GTEST_FLAG(internal_run_death_test).length() > 0;
-
- // Either the user wants Google Test to catch exceptions thrown by the
- // tests or this is executing in the context of death test child
- // process. In either case the user does not want to see pop-up dialogs
- // about crashes - they are expected.
- if (impl()->catch_exceptions() || in_death_test_child_process) {
-
-# if !GTEST_OS_WINDOWS_MOBILE
- // SetErrorMode doesn't exist on CE.
- SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
- SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
-# endif // !GTEST_OS_WINDOWS_MOBILE
-
-# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE
- // Death test children can be terminated with _abort(). On Windows,
- // _abort() can show a dialog with a warning message. This forces the
- // abort message to go to stderr instead.
- _set_error_mode(_OUT_TO_STDERR);
-# endif
-
-# if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
- // In the debug version, Visual Studio pops up a separate dialog
- // offering a choice to debug the aborted program. We need to suppress
- // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
- // executed. Google Test will notify the user of any unexpected
- // failure via stderr.
- //
- // VC++ doesn't define _set_abort_behavior() prior to the version 8.0.
- // Users of prior VC versions shall suffer the agony and pain of
- // clicking through the countless debug dialogs.
- // TODO(vladl@google.com): find a way to suppress the abort dialog() in the
- // debug mode when compiled with VC 7.1 or lower.
- if (!GTEST_FLAG(break_on_failure))
- _set_abort_behavior(
- 0x0, // Clear the following flags:
- _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump.
-# endif
-
- }
-#endif // GTEST_HAS_SEH
-
- return internal::HandleExceptionsInMethodIfSupported(
- impl(),
- &internal::UnitTestImpl::RunAllTests,
- "auxiliary test code (environments or event listeners)") ? 0 : 1;
-}
-
-// Returns the working directory when the first TEST() or TEST_F() was
-// executed.
-const char* UnitTest::original_working_dir() const {
- return impl_->original_working_dir_.c_str();
-}
-
-// Returns the TestCase object for the test that's currently running,
-// or NULL if no test is running.
-// L < mutex_
-const TestCase* UnitTest::current_test_case() const {
- internal::MutexLock lock(&mutex_);
- return impl_->current_test_case();
-}
-
-// Returns the TestInfo object for the test that's currently running,
-// or NULL if no test is running.
-// L < mutex_
-const TestInfo* UnitTest::current_test_info() const {
- internal::MutexLock lock(&mutex_);
- return impl_->current_test_info();
-}
-
-// Returns the random seed used at the start of the current test run.
-int UnitTest::random_seed() const { return impl_->random_seed(); }
-
-#if GTEST_HAS_PARAM_TEST
-// Returns ParameterizedTestCaseRegistry object used to keep track of
-// value-parameterized tests and instantiate and register them.
-// L < mutex_
-internal::ParameterizedTestCaseRegistry&
- UnitTest::parameterized_test_registry() {
- return impl_->parameterized_test_registry();
-}
-#endif // GTEST_HAS_PARAM_TEST
-
-// Creates an empty UnitTest.
-UnitTest::UnitTest() {
- impl_ = new internal::UnitTestImpl(this);
-}
-
-// Destructor of UnitTest.
-UnitTest::~UnitTest() {
- delete impl_;
-}
-
-// Pushes a trace defined by SCOPED_TRACE() on to the per-thread
-// Google Test trace stack.
-// L < mutex_
-void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) {
- internal::MutexLock lock(&mutex_);
- impl_->gtest_trace_stack().push_back(trace);
-}
-
-// Pops a trace from the per-thread Google Test trace stack.
-// L < mutex_
-void UnitTest::PopGTestTrace() {
- internal::MutexLock lock(&mutex_);
- impl_->gtest_trace_stack().pop_back();
-}
-
-namespace internal {
-
-UnitTestImpl::UnitTestImpl(UnitTest* parent)
- : parent_(parent),
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4355) // Temporarily disables warning 4355
- // (using this in initializer).
- default_global_test_part_result_reporter_(this),
- default_per_thread_test_part_result_reporter_(this),
-# pragma warning(pop) // Restores the warning state again.
-#else
- default_global_test_part_result_reporter_(this),
- default_per_thread_test_part_result_reporter_(this),
-#endif // _MSC_VER
- global_test_part_result_repoter_(
- &default_global_test_part_result_reporter_),
- per_thread_test_part_result_reporter_(
- &default_per_thread_test_part_result_reporter_),
-#if GTEST_HAS_PARAM_TEST
- parameterized_test_registry_(),
- parameterized_tests_registered_(false),
-#endif // GTEST_HAS_PARAM_TEST
- last_death_test_case_(-1),
- current_test_case_(NULL),
- current_test_info_(NULL),
- ad_hoc_test_result_(),
- os_stack_trace_getter_(NULL),
- post_flag_parse_init_performed_(false),
- random_seed_(0), // Will be overridden by the flag before first use.
- random_(0), // Will be reseeded before first use.
- elapsed_time_(0),
-#if GTEST_HAS_DEATH_TEST
- internal_run_death_test_flag_(NULL),
- death_test_factory_(new DefaultDeathTestFactory),
-#endif
- // Will be overridden by the flag before first use.
- catch_exceptions_(false) {
- listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);
-}
-
-UnitTestImpl::~UnitTestImpl() {
- // Deletes every TestCase.
- ForEach(test_cases_, internal::Delete<TestCase>);
-
- // Deletes every Environment.
- ForEach(environments_, internal::Delete<Environment>);
-
- delete os_stack_trace_getter_;
-}
-
-#if GTEST_HAS_DEATH_TEST
-// Disables event forwarding if the control is currently in a death test
-// subprocess. Must not be called before InitGoogleTest.
-void UnitTestImpl::SuppressTestEventsIfInSubprocess() {
- if (internal_run_death_test_flag_.get() != NULL)
- listeners()->SuppressEventForwarding();
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// Initializes event listeners performing XML output as specified by
-// UnitTestOptions. Must not be called before InitGoogleTest.
-void UnitTestImpl::ConfigureXmlOutput() {
- const String& output_format = UnitTestOptions::GetOutputFormat();
- if (output_format == "xml") {
- listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
- } else if (output_format != "") {
- printf("WARNING: unrecognized output format \"%s\" ignored.\n",
- output_format.c_str());
- fflush(stdout);
- }
-}
-
-#if GTEST_CAN_STREAM_RESULTS_
-// Initializes event listeners for streaming test results in String form.
-// Must not be called before InitGoogleTest.
-void UnitTestImpl::ConfigureStreamingOutput() {
- const string& target = GTEST_FLAG(stream_result_to);
- if (!target.empty()) {
- const size_t pos = target.find(':');
- if (pos != string::npos) {
- listeners()->Append(new StreamingListener(target.substr(0, pos),
- target.substr(pos+1)));
- } else {
- printf("WARNING: unrecognized streaming target \"%s\" ignored.\n",
- target.c_str());
- fflush(stdout);
- }
- }
-}
-#endif // GTEST_CAN_STREAM_RESULTS_
-
-// Performs initialization dependent upon flag values obtained in
-// ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to
-// ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest
-// this function is also called from RunAllTests. Since this function can be
-// called more than once, it has to be idempotent.
-void UnitTestImpl::PostFlagParsingInit() {
- // Ensures that this function does not execute more than once.
- if (!post_flag_parse_init_performed_) {
- post_flag_parse_init_performed_ = true;
-
-#if GTEST_HAS_DEATH_TEST
- InitDeathTestSubprocessControlInfo();
- SuppressTestEventsIfInSubprocess();
-#endif // GTEST_HAS_DEATH_TEST
-
- // Registers parameterized tests. This makes parameterized tests
- // available to the UnitTest reflection API without running
- // RUN_ALL_TESTS.
- RegisterParameterizedTests();
-
- // Configures listeners for XML output. This makes it possible for users
- // to shut down the default XML output before invoking RUN_ALL_TESTS.
- ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
- // Configures listeners for streaming test results to the specified server.
- ConfigureStreamingOutput();
-#endif // GTEST_CAN_STREAM_RESULTS_
- }
-}
-
-// A predicate that checks the name of a TestCase against a known
-// value.
-//
-// This is used for implementation of the UnitTest class only. We put
-// it in the anonymous namespace to prevent polluting the outer
-// namespace.
-//
-// TestCaseNameIs is copyable.
-class TestCaseNameIs {
- public:
- // Constructor.
- explicit TestCaseNameIs(const String& name)
- : name_(name) {}
-
- // Returns true iff the name of test_case matches name_.
- bool operator()(const TestCase* test_case) const {
- return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;
- }
-
- private:
- String name_;
-};
-
-// Finds and returns a TestCase with the given name. If one doesn't
-// exist, creates one and returns it. It's the CALLER'S
-// RESPONSIBILITY to ensure that this function is only called WHEN THE
-// TESTS ARE NOT SHUFFLED.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// type_param: the name of the test case's type parameter, or NULL if
-// this is not a typed or a type-parameterized test case.
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
- const char* type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc) {
- // Can we find a TestCase with the given name?
- const std::vector<TestCase*>::const_iterator test_case =
- std::find_if(test_cases_.begin(), test_cases_.end(),
- TestCaseNameIs(test_case_name));
-
- if (test_case != test_cases_.end())
- return *test_case;
-
- // No. Let's create one.
- TestCase* const new_test_case =
- new TestCase(test_case_name, type_param, set_up_tc, tear_down_tc);
-
- // Is this a death test case?
- if (internal::UnitTestOptions::MatchesFilter(String(test_case_name),
- kDeathTestCaseFilter)) {
- // Yes. Inserts the test case after the last death test case
- // defined so far. This only works when the test cases haven't
- // been shuffled. Otherwise we may end up running a death test
- // after a non-death test.
- ++last_death_test_case_;
- test_cases_.insert(test_cases_.begin() + last_death_test_case_,
- new_test_case);
- } else {
- // No. Appends to the end of the list.
- test_cases_.push_back(new_test_case);
- }
-
- test_case_indices_.push_back(static_cast<int>(test_case_indices_.size()));
- return new_test_case;
-}
-
-// Helpers for setting up / tearing down the given environment. They
-// are for use in the ForEach() function.
-static void SetUpEnvironment(Environment* env) { env->SetUp(); }
-static void TearDownEnvironment(Environment* env) { env->TearDown(); }
-
-// Runs all tests in this UnitTest object, prints the result, and
-// returns true if all tests are successful. If any exception is
-// thrown during a test, the test is considered to be failed, but the
-// rest of the tests will still be run.
-//
-// When parameterized tests are enabled, it expands and registers
-// parameterized tests first in RegisterParameterizedTests().
-// All other functions called from RunAllTests() may safely assume that
-// parameterized tests are ready to be counted and run.
-bool UnitTestImpl::RunAllTests() {
- // Makes sure InitGoogleTest() was called.
- if (!GTestIsInitialized()) {
- printf("%s",
- "\nThis test program did NOT call ::testing::InitGoogleTest "
- "before calling RUN_ALL_TESTS(). Please fix it.\n");
- return false;
- }
-
- // Do not run any test if the --help flag was specified.
- if (g_help_flag)
- return true;
-
- // Repeats the call to the post-flag parsing initialization in case the
- // user didn't call InitGoogleTest.
- PostFlagParsingInit();
-
- // Even if sharding is not on, test runners may want to use the
- // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
- // protocol.
- internal::WriteToShardStatusFileIfNeeded();
-
- // True iff we are in a subprocess for running a thread-safe-style
- // death test.
- bool in_subprocess_for_death_test = false;
-
-#if GTEST_HAS_DEATH_TEST
- in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL);
-#endif // GTEST_HAS_DEATH_TEST
-
- const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,
- in_subprocess_for_death_test);
-
- // Compares the full test names with the filter to decide which
- // tests to run.
- const bool has_tests_to_run = FilterTests(should_shard
- ? HONOR_SHARDING_PROTOCOL
- : IGNORE_SHARDING_PROTOCOL) > 0;
-
- // Lists the tests and exits if the --gtest_list_tests flag was specified.
- if (GTEST_FLAG(list_tests)) {
- // This must be called *after* FilterTests() has been called.
- ListTestsMatchingFilter();
- return true;
- }
-
- random_seed_ = GTEST_FLAG(shuffle) ?
- GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0;
-
- // True iff at least one test has failed.
- bool failed = false;
-
- TestEventListener* repeater = listeners()->repeater();
-
- repeater->OnTestProgramStart(*parent_);
-
- // How many times to repeat the tests? We don't want to repeat them
- // when we are inside the subprocess of a death test.
- const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat);
- // Repeats forever if the repeat count is negative.
- const bool forever = repeat < 0;
- for (int i = 0; forever || i != repeat; i++) {
- // We want to preserve failures generated by ad-hoc test
- // assertions executed before RUN_ALL_TESTS().
- ClearNonAdHocTestResult();
-
- const TimeInMillis start = GetTimeInMillis();
-
- // Shuffles test cases and tests if requested.
- if (has_tests_to_run && GTEST_FLAG(shuffle)) {
- random()->Reseed(random_seed_);
- // This should be done before calling OnTestIterationStart(),
- // such that a test event listener can see the actual test order
- // in the event.
- ShuffleTests();
- }
-
- // Tells the unit test event listeners that the tests are about to start.
- repeater->OnTestIterationStart(*parent_, i);
-
- // Runs each test case if there is at least one test to run.
- if (has_tests_to_run) {
- // Sets up all environments beforehand.
- repeater->OnEnvironmentsSetUpStart(*parent_);
- ForEach(environments_, SetUpEnvironment);
- repeater->OnEnvironmentsSetUpEnd(*parent_);
-
- // Runs the tests only if there was no fatal failure during global
- // set-up.
- if (!Test::HasFatalFailure()) {
- for (int test_index = 0; test_index < total_test_case_count();
- test_index++) {
- GetMutableTestCase(test_index)->Run();
- }
- }
-
- // Tears down all environments in reverse order afterwards.
- repeater->OnEnvironmentsTearDownStart(*parent_);
- std::for_each(environments_.rbegin(), environments_.rend(),
- TearDownEnvironment);
- repeater->OnEnvironmentsTearDownEnd(*parent_);
- }
-
- elapsed_time_ = GetTimeInMillis() - start;
-
- // Tells the unit test event listener that the tests have just finished.
- repeater->OnTestIterationEnd(*parent_, i);
-
- // Gets the result and clears it.
- if (!Passed()) {
- failed = true;
- }
-
- // Restores the original test order after the iteration. This
- // allows the user to quickly repro a failure that happens in the
- // N-th iteration without repeating the first (N - 1) iterations.
- // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in
- // case the user somehow changes the value of the flag somewhere
- // (it's always safe to unshuffle the tests).
- UnshuffleTests();
-
- if (GTEST_FLAG(shuffle)) {
- // Picks a new random seed for each iteration.
- random_seed_ = GetNextRandomSeed(random_seed_);
- }
- }
-
- repeater->OnTestProgramEnd(*parent_);
-
- return !failed;
-}
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded() {
- const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);
- if (test_shard_file != NULL) {
- FILE* const file = posix::FOpen(test_shard_file, "w");
- if (file == NULL) {
- ColoredPrintf(COLOR_RED,
- "Could not write to the test shard status file \"%s\" "
- "specified by the %s environment variable.\n",
- test_shard_file, kTestShardStatusFile);
- fflush(stdout);
- exit(EXIT_FAILURE);
- }
- fclose(file);
- }
-}
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (i.e., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-bool ShouldShard(const char* total_shards_env,
- const char* shard_index_env,
- bool in_subprocess_for_death_test) {
- if (in_subprocess_for_death_test) {
- return false;
- }
-
- const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1);
- const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1);
-
- if (total_shards == -1 && shard_index == -1) {
- return false;
- } else if (total_shards == -1 && shard_index != -1) {
- const Message msg = Message()
- << "Invalid environment variables: you have "
- << kTestShardIndex << " = " << shard_index
- << ", but have left " << kTestTotalShards << " unset.\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- } else if (total_shards != -1 && shard_index == -1) {
- const Message msg = Message()
- << "Invalid environment variables: you have "
- << kTestTotalShards << " = " << total_shards
- << ", but have left " << kTestShardIndex << " unset.\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- } else if (shard_index < 0 || shard_index >= total_shards) {
- const Message msg = Message()
- << "Invalid environment variables: we require 0 <= "
- << kTestShardIndex << " < " << kTestTotalShards
- << ", but you have " << kTestShardIndex << "=" << shard_index
- << ", " << kTestTotalShards << "=" << total_shards << ".\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- }
-
- return total_shards > 1;
-}
-
-// Parses the environment variable var as an Int32. If it is unset,
-// returns default_val. If it is not an Int32, prints an error
-// and aborts.
-Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
- const char* str_val = posix::GetEnv(var);
- if (str_val == NULL) {
- return default_val;
- }
-
- Int32 result;
- if (!ParseInt32(Message() << "The value of environment variable " << var,
- str_val, &result)) {
- exit(EXIT_FAILURE);
- }
- return result;
-}
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true iff the test should be run on this shard. The test id is
-// some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
- return (test_id % total_shards) == shard_index;
-}
-
-// Compares the name of each test with the user-specified filter to
-// decide whether the test should be run, then records the result in
-// each TestCase and TestInfo object.
-// If shard_tests == true, further filters tests based on sharding
-// variables in the environment - see
-// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide.
-// Returns the number of tests that should run.
-int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
- const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?
- Int32FromEnvOrDie(kTestTotalShards, -1) : -1;
- const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ?
- Int32FromEnvOrDie(kTestShardIndex, -1) : -1;
-
- // num_runnable_tests are the number of tests that will
- // run across all shards (i.e., match filter and are not disabled).
- // num_selected_tests are the number of tests to be run on
- // this shard.
- int num_runnable_tests = 0;
- int num_selected_tests = 0;
- for (size_t i = 0; i < test_cases_.size(); i++) {
- TestCase* const test_case = test_cases_[i];
- const String &test_case_name = test_case->name();
- test_case->set_should_run(false);
-
- for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
- TestInfo* const test_info = test_case->test_info_list()[j];
- const String test_name(test_info->name());
- // A test is disabled if test case name or test name matches
- // kDisableTestFilter.
- const bool is_disabled =
- internal::UnitTestOptions::MatchesFilter(test_case_name,
- kDisableTestFilter) ||
- internal::UnitTestOptions::MatchesFilter(test_name,
- kDisableTestFilter);
- test_info->is_disabled_ = is_disabled;
-
- const bool matches_filter =
- internal::UnitTestOptions::FilterMatchesTest(test_case_name,
- test_name);
- test_info->matches_filter_ = matches_filter;
-
- const bool is_runnable =
- (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) &&
- matches_filter;
-
- const bool is_selected = is_runnable &&
- (shard_tests == IGNORE_SHARDING_PROTOCOL ||
- ShouldRunTestOnShard(total_shards, shard_index,
- num_runnable_tests));
-
- num_runnable_tests += is_runnable;
- num_selected_tests += is_selected;
-
- test_info->should_run_ = is_selected;
- test_case->set_should_run(test_case->should_run() || is_selected);
- }
- }
- return num_selected_tests;
-}
-
-// Prints the names of the tests matching the user-specified filter flag.
-void UnitTestImpl::ListTestsMatchingFilter() {
- for (size_t i = 0; i < test_cases_.size(); i++) {
- const TestCase* const test_case = test_cases_[i];
- bool printed_test_case_name = false;
-
- for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
- const TestInfo* const test_info =
- test_case->test_info_list()[j];
- if (test_info->matches_filter_) {
- if (!printed_test_case_name) {
- printed_test_case_name = true;
- printf("%s.\n", test_case->name());
- }
- printf(" %s\n", test_info->name());
- }
- }
- }
- fflush(stdout);
-}
-
-// Sets the OS stack trace getter.
-//
-// Does nothing if the input and the current OS stack trace getter are
-// the same; otherwise, deletes the old getter and makes the input the
-// current getter.
-void UnitTestImpl::set_os_stack_trace_getter(
- OsStackTraceGetterInterface* getter) {
- if (os_stack_trace_getter_ != getter) {
- delete os_stack_trace_getter_;
- os_stack_trace_getter_ = getter;
- }
-}
-
-// Returns the current OS stack trace getter if it is not NULL;
-// otherwise, creates an OsStackTraceGetter, makes it the current
-// getter, and returns it.
-OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
- if (os_stack_trace_getter_ == NULL) {
- os_stack_trace_getter_ = new OsStackTraceGetter;
- }
-
- return os_stack_trace_getter_;
-}
-
-// Returns the TestResult for the test that's currently running, or
-// the TestResult for the ad hoc test if no test is running.
-TestResult* UnitTestImpl::current_test_result() {
- return current_test_info_ ?
- &(current_test_info_->result_) : &ad_hoc_test_result_;
-}
-
-// Shuffles all test cases, and the tests within each test case,
-// making sure that death tests are still run first.
-void UnitTestImpl::ShuffleTests() {
- // Shuffles the death test cases.
- ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_);
-
- // Shuffles the non-death test cases.
- ShuffleRange(random(), last_death_test_case_ + 1,
- static_cast<int>(test_cases_.size()), &test_case_indices_);
-
- // Shuffles the tests inside each test case.
- for (size_t i = 0; i < test_cases_.size(); i++) {
- test_cases_[i]->ShuffleTests(random());
- }
-}
-
-// Restores the test cases and tests to their order before the first shuffle.
-void UnitTestImpl::UnshuffleTests() {
- for (size_t i = 0; i < test_cases_.size(); i++) {
- // Unshuffles the tests in each test case.
- test_cases_[i]->UnshuffleTests();
- // Resets the index of each test case.
- test_case_indices_[i] = static_cast<int>(i);
- }
-}
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
- int skip_count) {
- // We pass skip_count + 1 to skip this wrapper function in addition
- // to what the user really wants to skip.
- return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
-}
-
-// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to
-// suppress unreachable code warnings.
-namespace {
-class ClassUniqueToAlwaysTrue {};
-}
-
-bool IsTrue(bool condition) { return condition; }
-
-bool AlwaysTrue() {
-#if GTEST_HAS_EXCEPTIONS
- // This condition is always false so AlwaysTrue() never actually throws,
- // but it makes the compiler think that it may throw.
- if (IsTrue(false))
- throw ClassUniqueToAlwaysTrue();
-#endif // GTEST_HAS_EXCEPTIONS
- return true;
-}
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false. None of pstr, *pstr, and prefix can be NULL.
-bool SkipPrefix(const char* prefix, const char** pstr) {
- const size_t prefix_len = strlen(prefix);
- if (strncmp(*pstr, prefix, prefix_len) == 0) {
- *pstr += prefix_len;
- return true;
- }
- return false;
-}
-
-// Parses a string as a command line flag. The string should have
-// the format "--flag=value". When def_optional is true, the "=value"
-// part can be omitted.
-//
-// Returns the value of the flag, or NULL if the parsing failed.
-const char* ParseFlagValue(const char* str,
- const char* flag,
- bool def_optional) {
- // str and flag must not be NULL.
- if (str == NULL || flag == NULL) return NULL;
-
- // The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
- const String flag_str = String::Format("--%s%s", GTEST_FLAG_PREFIX_, flag);
- const size_t flag_len = flag_str.length();
- if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;
-
- // Skips the flag name.
- const char* flag_end = str + flag_len;
-
- // When def_optional is true, it's OK to not have a "=value" part.
- if (def_optional && (flag_end[0] == '\0')) {
- return flag_end;
- }
-
- // If def_optional is true and there are more characters after the
- // flag name, or if def_optional is false, there must be a '=' after
- // the flag name.
- if (flag_end[0] != '=') return NULL;
-
- // Returns the string after "=".
- return flag_end + 1;
-}
-
-// Parses a string for a bool flag, in the form of either
-// "--flag=value" or "--flag".
-//
-// In the former case, the value is taken as true as long as it does
-// not start with '0', 'f', or 'F'.
-//
-// In the latter case, the value is taken as true.
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, true);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Converts the string value to a bool.
- *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
- return true;
-}
-
-// Parses a string for an Int32 flag, in the form of
-// "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- return ParseInt32(Message() << "The value of flag --" << flag,
- value_str, value);
-}
-
-// Parses a string for a string flag, in the form of
-// "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseStringFlag(const char* str, const char* flag, String* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- *value = value_str;
- return true;
-}
-
-// Determines whether a string has a prefix that Google Test uses for its
-// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.
-// If Google Test detects that a command line flag has its prefix but is not
-// recognized, it will print its help message. Flags starting with
-// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test
-// internal flags and do not trigger the help message.
-static bool HasGoogleTestFlagPrefix(const char* str) {
- return (SkipPrefix("--", &str) ||
- SkipPrefix("-", &str) ||
- SkipPrefix("/", &str)) &&
- !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) &&
- (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||
- SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));
-}
-
-// Prints a string containing code-encoded text. The following escape
-// sequences can be used in the string to control the text color:
-//
-// @@ prints a single '@' character.
-// @R changes the color to red.
-// @G changes the color to green.
-// @Y changes the color to yellow.
-// @D changes to the default terminal text color.
-//
-// TODO(wan@google.com): Write tests for this once we add stdout
-// capturing to Google Test.
-static void PrintColorEncoded(const char* str) {
- GTestColor color = COLOR_DEFAULT; // The current color.
-
- // Conceptually, we split the string into segments divided by escape
- // sequences. Then we print one segment at a time. At the end of
- // each iteration, the str pointer advances to the beginning of the
- // next segment.
- for (;;) {
- const char* p = strchr(str, '@');
- if (p == NULL) {
- ColoredPrintf(color, "%s", str);
- return;
- }
-
- ColoredPrintf(color, "%s", String(str, p - str).c_str());
-
- const char ch = p[1];
- str = p + 2;
- if (ch == '@') {
- ColoredPrintf(color, "@");
- } else if (ch == 'D') {
- color = COLOR_DEFAULT;
- } else if (ch == 'R') {
- color = COLOR_RED;
- } else if (ch == 'G') {
- color = COLOR_GREEN;
- } else if (ch == 'Y') {
- color = COLOR_YELLOW;
- } else {
- --str;
- }
- }
-}
-
-static const char kColorEncodedHelpMessage[] =
-"This program contains tests written using " GTEST_NAME_ ". You can use the\n"
-"following command line flags to control its behavior:\n"
-"\n"
-"Test Selection:\n"
-" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n"
-" List the names of all tests instead of running them. The name of\n"
-" TEST(Foo, Bar) is \"Foo.Bar\".\n"
-" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS"
- "[@G-@YNEGATIVE_PATTERNS]@D\n"
-" Run only the tests whose name matches one of the positive patterns but\n"
-" none of the negative patterns. '?' matches any single character; '*'\n"
-" matches any substring; ':' separates two patterns.\n"
-" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n"
-" Run all disabled tests too.\n"
-"\n"
-"Test Execution:\n"
-" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n"
-" Run the tests repeatedly; use a negative count to repeat forever.\n"
-" @G--" GTEST_FLAG_PREFIX_ "shuffle@D\n"
-" Randomize tests' orders on every iteration.\n"
-" @G--" GTEST_FLAG_PREFIX_ "random_seed=@Y[NUMBER]@D\n"
-" Random number seed to use for shuffling test orders (between 1 and\n"
-" 99999, or 0 to use a seed based on the current time).\n"
-"\n"
-"Test Output:\n"
-" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n"
-" Enable/disable colored output. The default is @Gauto@D.\n"
-" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n"
-" Don't print the elapsed time of each test.\n"
-" @G--" GTEST_FLAG_PREFIX_ "output=xml@Y[@G:@YDIRECTORY_PATH@G"
- GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n"
-" Generate an XML report in the given directory or with the given file\n"
-" name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\n"
-#if GTEST_CAN_STREAM_RESULTS_
-" @G--" GTEST_FLAG_PREFIX_ "stream_result_to=@YHOST@G:@YPORT@D\n"
-" Stream test results to the given server.\n"
-#endif // GTEST_CAN_STREAM_RESULTS_
-"\n"
-"Assertion Behavior:\n"
-#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS
-" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n"
-" Set the default death test style.\n"
-#endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS
-" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n"
-" Turn assertion failures into debugger break-points.\n"
-" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n"
-" Turn assertion failures into C++ exceptions.\n"
-" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions=0@D\n"
-" Do not report exceptions as test failures. Instead, allow them\n"
-" to crash the program or throw a pop-up (on Windows).\n"
-"\n"
-"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set "
- "the corresponding\n"
-"environment variable of a flag (all letters in upper-case). For example, to\n"
-"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_
- "color=no@D or set\n"
-"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n"
-"\n"
-"For more information, please read the " GTEST_NAME_ " documentation at\n"
-"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n"
-"(not one in your own code or tests), please report it to\n"
-"@G<" GTEST_DEV_EMAIL_ ">@D.\n";
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test. The type parameter CharType can be
-// instantiated to either char or wchar_t.
-template <typename CharType>
-void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
- for (int i = 1; i < *argc; i++) {
- const String arg_string = StreamableToString(argv[i]);
- const char* const arg = arg_string.c_str();
-
- using internal::ParseBoolFlag;
- using internal::ParseInt32Flag;
- using internal::ParseStringFlag;
-
- // Do we see a Google Test flag?
- if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag,
- &GTEST_FLAG(also_run_disabled_tests)) ||
- ParseBoolFlag(arg, kBreakOnFailureFlag,
- &GTEST_FLAG(break_on_failure)) ||
- ParseBoolFlag(arg, kCatchExceptionsFlag,
- &GTEST_FLAG(catch_exceptions)) ||
- ParseStringFlag(arg, kColorFlag, &GTEST_FLAG(color)) ||
- ParseStringFlag(arg, kDeathTestStyleFlag,
- &GTEST_FLAG(death_test_style)) ||
- ParseBoolFlag(arg, kDeathTestUseFork,
- &GTEST_FLAG(death_test_use_fork)) ||
- ParseStringFlag(arg, kFilterFlag, &GTEST_FLAG(filter)) ||
- ParseStringFlag(arg, kInternalRunDeathTestFlag,
- &GTEST_FLAG(internal_run_death_test)) ||
- ParseBoolFlag(arg, kListTestsFlag, &GTEST_FLAG(list_tests)) ||
- ParseStringFlag(arg, kOutputFlag, &GTEST_FLAG(output)) ||
- ParseBoolFlag(arg, kPrintTimeFlag, &GTEST_FLAG(print_time)) ||
- ParseInt32Flag(arg, kRandomSeedFlag, &GTEST_FLAG(random_seed)) ||
- ParseInt32Flag(arg, kRepeatFlag, &GTEST_FLAG(repeat)) ||
- ParseBoolFlag(arg, kShuffleFlag, &GTEST_FLAG(shuffle)) ||
- ParseInt32Flag(arg, kStackTraceDepthFlag,
- &GTEST_FLAG(stack_trace_depth)) ||
- ParseStringFlag(arg, kStreamResultToFlag,
- &GTEST_FLAG(stream_result_to)) ||
- ParseBoolFlag(arg, kThrowOnFailureFlag,
- &GTEST_FLAG(throw_on_failure))
- ) {
- // Yes. Shift the remainder of the argv list left by one. Note
- // that argv has (*argc + 1) elements, the last one always being
- // NULL. The following loop moves the trailing NULL element as
- // well.
- for (int j = i; j != *argc; j++) {
- argv[j] = argv[j + 1];
- }
-
- // Decrements the argument count.
- (*argc)--;
-
- // We also need to decrement the iterator as we just removed
- // an element.
- i--;
- } else if (arg_string == "--help" || arg_string == "-h" ||
- arg_string == "-?" || arg_string == "/?" ||
- HasGoogleTestFlagPrefix(arg)) {
- // Both help flag and unrecognized Google Test flags (excluding
- // internal ones) trigger help display.
- g_help_flag = true;
- }
- }
-
- if (g_help_flag) {
- // We print the help here instead of in RUN_ALL_TESTS(), as the
- // latter may not be called at all if the user is using Google
- // Test with another testing framework.
- PrintColorEncoded(kColorEncodedHelpMessage);
- }
-}
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
- ParseGoogleTestFlagsOnlyImpl(argc, argv);
-}
-void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
- ParseGoogleTestFlagsOnlyImpl(argc, argv);
-}
-
-// The internal implementation of InitGoogleTest().
-//
-// The type parameter CharType can be instantiated to either char or
-// wchar_t.
-template <typename CharType>
-void InitGoogleTestImpl(int* argc, CharType** argv) {
- g_init_gtest_count++;
-
- // We don't want to run the initialization code twice.
- if (g_init_gtest_count != 1) return;
-
- if (*argc <= 0) return;
-
- internal::g_executable_path = internal::StreamableToString(argv[0]);
-
-#if GTEST_HAS_DEATH_TEST
-
- g_argvs.clear();
- for (int i = 0; i != *argc; i++) {
- g_argvs.push_back(StreamableToString(argv[i]));
- }
-
-#endif // GTEST_HAS_DEATH_TEST
-
- ParseGoogleTestFlagsOnly(argc, argv);
- GetUnitTestImpl()->PostFlagParsingInit();
-}
-
-} // namespace internal
-
-// Initializes Google Test. This must be called before calling
-// RUN_ALL_TESTS(). In particular, it parses a command line for the
-// flags that Google Test recognizes. Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-void InitGoogleTest(int* argc, char** argv) {
- internal::InitGoogleTestImpl(argc, argv);
-}
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleTest(int* argc, wchar_t** argv) {
- internal::InitGoogleTestImpl(argc, argv);
-}
-
-} // namespace testing
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev)
-//
-// This file implements death tests.
-
-
-#if GTEST_HAS_DEATH_TEST
-
-# if GTEST_OS_MAC
-# include <crt_externs.h>
-# endif // GTEST_OS_MAC
-
-# include <errno.h>
-# include <fcntl.h>
-# include <limits.h>
-# include <stdarg.h>
-
-# if GTEST_OS_WINDOWS
-# include <windows.h>
-# else
-# include <sys/mman.h>
-# include <sys/wait.h>
-# endif // GTEST_OS_WINDOWS
-
-#endif // GTEST_HAS_DEATH_TEST
-
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-// Constants.
-
-// The default death test style.
-static const char kDefaultDeathTestStyle[] = "fast";
-
-GTEST_DEFINE_string_(
- death_test_style,
- internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle),
- "Indicates how to run a death test in a forked child process: "
- "\"threadsafe\" (child process re-executes the test binary "
- "from the beginning, running only the specific death test) or "
- "\"fast\" (child process runs the death test immediately "
- "after forking).");
-
-GTEST_DEFINE_bool_(
- death_test_use_fork,
- internal::BoolFromGTestEnv("death_test_use_fork", false),
- "Instructs to use fork()/_exit() instead of clone() in death tests. "
- "Ignored and always uses fork() on POSIX systems where clone() is not "
- "implemented. Useful when running under valgrind or similar tools if "
- "those do not support clone(). Valgrind 3.3.1 will just fail if "
- "it sees an unsupported combination of clone() flags. "
- "It is not recommended to use this flag w/o valgrind though it will "
- "work in 99% of the cases. Once valgrind is fixed, this flag will "
- "most likely be removed.");
-
-namespace internal {
-GTEST_DEFINE_string_(
- internal_run_death_test, "",
- "Indicates the file, line number, temporal index of "
- "the single death test to run, and a file descriptor to "
- "which a success code may be sent, all separated by "
- "colons. This flag is specified if and only if the current "
- "process is a sub-process launched for running a thread-safe "
- "death test. FOR INTERNAL USE ONLY.");
-} // namespace internal
-
-#if GTEST_HAS_DEATH_TEST
-
-// ExitedWithCode constructor.
-ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) {
-}
-
-// ExitedWithCode function-call operator.
-bool ExitedWithCode::operator()(int exit_status) const {
-# if GTEST_OS_WINDOWS
-
- return exit_status == exit_code_;
-
-# else
-
- return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;
-
-# endif // GTEST_OS_WINDOWS
-}
-
-# if !GTEST_OS_WINDOWS
-// KilledBySignal constructor.
-KilledBySignal::KilledBySignal(int signum) : signum_(signum) {
-}
-
-// KilledBySignal function-call operator.
-bool KilledBySignal::operator()(int exit_status) const {
- return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_;
-}
-# endif // !GTEST_OS_WINDOWS
-
-namespace internal {
-
-// Utilities needed for death tests.
-
-// Generates a textual description of a given exit code, in the format
-// specified by wait(2).
-static String ExitSummary(int exit_code) {
- Message m;
-
-# if GTEST_OS_WINDOWS
-
- m << "Exited with exit status " << exit_code;
-
-# else
-
- if (WIFEXITED(exit_code)) {
- m << "Exited with exit status " << WEXITSTATUS(exit_code);
- } else if (WIFSIGNALED(exit_code)) {
- m << "Terminated by signal " << WTERMSIG(exit_code);
- }
-# ifdef WCOREDUMP
- if (WCOREDUMP(exit_code)) {
- m << " (core dumped)";
- }
-# endif
-# endif // GTEST_OS_WINDOWS
-
- return m.GetString();
-}
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-bool ExitedUnsuccessfully(int exit_status) {
- return !ExitedWithCode(0)(exit_status);
-}
-
-# if !GTEST_OS_WINDOWS
-// Generates a textual failure message when a death test finds more than
-// one thread running, or cannot determine the number of threads, prior
-// to executing the given statement. It is the responsibility of the
-// caller not to pass a thread_count of 1.
-static String DeathTestThreadWarning(size_t thread_count) {
- Message msg;
- msg << "Death tests use fork(), which is unsafe particularly"
- << " in a threaded context. For this test, " << GTEST_NAME_ << " ";
- if (thread_count == 0)
- msg << "couldn't detect the number of threads.";
- else
- msg << "detected " << thread_count << " threads.";
- return msg.GetString();
-}
-# endif // !GTEST_OS_WINDOWS
-
-// Flag characters for reporting a death test that did not die.
-static const char kDeathTestLived = 'L';
-static const char kDeathTestReturned = 'R';
-static const char kDeathTestThrew = 'T';
-static const char kDeathTestInternalError = 'I';
-
-// An enumeration describing all of the possible ways that a death test can
-// conclude. DIED means that the process died while executing the test
-// code; LIVED means that process lived beyond the end of the test code;
-// RETURNED means that the test statement attempted to execute a return
-// statement, which is not allowed; THREW means that the test statement
-// returned control by throwing an exception. IN_PROGRESS means the test
-// has not yet concluded.
-// TODO(vladl@google.com): Unify names and possibly values for
-// AbortReason, DeathTestOutcome, and flag characters above.
-enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };
-
-// Routine for aborting the program which is safe to call from an
-// exec-style death test child process, in which case the error
-// message is propagated back to the parent process. Otherwise, the
-// message is simply printed to stderr. In either case, the program
-// then exits with status 1.
-void DeathTestAbort(const String& message) {
- // On a POSIX system, this function may be called from a threadsafe-style
- // death test child process, which operates on a very small stack. Use
- // the heap for any additional non-minuscule memory requirements.
- const InternalRunDeathTestFlag* const flag =
- GetUnitTestImpl()->internal_run_death_test_flag();
- if (flag != NULL) {
- FILE* parent = posix::FDOpen(flag->write_fd(), "w");
- fputc(kDeathTestInternalError, parent);
- fprintf(parent, "%s", message.c_str());
- fflush(parent);
- _exit(1);
- } else {
- fprintf(stderr, "%s", message.c_str());
- fflush(stderr);
- posix::Abort();
- }
-}
-
-// A replacement for CHECK that calls DeathTestAbort if the assertion
-// fails.
-# define GTEST_DEATH_TEST_CHECK_(expression) \
- do { \
- if (!::testing::internal::IsTrue(expression)) { \
- DeathTestAbort(::testing::internal::String::Format( \
- "CHECK failed: File %s, line %d: %s", \
- __FILE__, __LINE__, #expression)); \
- } \
- } while (::testing::internal::AlwaysFalse())
-
-// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for
-// evaluating any system call that fulfills two conditions: it must return
-// -1 on failure, and set errno to EINTR when it is interrupted and
-// should be tried again. The macro expands to a loop that repeatedly
-// evaluates the expression as long as it evaluates to -1 and sets
-// errno to EINTR. If the expression evaluates to -1 but errno is
-// something other than EINTR, DeathTestAbort is called.
-# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \
- do { \
- int gtest_retval; \
- do { \
- gtest_retval = (expression); \
- } while (gtest_retval == -1 && errno == EINTR); \
- if (gtest_retval == -1) { \
- DeathTestAbort(::testing::internal::String::Format( \
- "CHECK failed: File %s, line %d: %s != -1", \
- __FILE__, __LINE__, #expression)); \
- } \
- } while (::testing::internal::AlwaysFalse())
-
-// Returns the message describing the last system error in errno.
-String GetLastErrnoDescription() {
- return String(errno == 0 ? "" : posix::StrError(errno));
-}
-
-// This is called from a death test parent process to read a failure
-// message from the death test child process and log it with the FATAL
-// severity. On Windows, the message is read from a pipe handle. On other
-// platforms, it is read from a file descriptor.
-static void FailFromInternalError(int fd) {
- Message error;
- char buffer[256];
- int num_read;
-
- do {
- while ((num_read = posix::Read(fd, buffer, 255)) > 0) {
- buffer[num_read] = '\0';
- error << buffer;
- }
- } while (num_read == -1 && errno == EINTR);
-
- if (num_read == 0) {
- GTEST_LOG_(FATAL) << error.GetString();
- } else {
- const int last_error = errno;
- GTEST_LOG_(FATAL) << "Error while reading death test internal: "
- << GetLastErrnoDescription() << " [" << last_error << "]";
- }
-}
-
-// Death test constructor. Increments the running death test count
-// for the current test.
-DeathTest::DeathTest() {
- TestInfo* const info = GetUnitTestImpl()->current_test_info();
- if (info == NULL) {
- DeathTestAbort("Cannot run a death test outside of a TEST or "
- "TEST_F construct");
- }
-}
-
-// Creates and returns a death test by dispatching to the current
-// death test factory.
-bool DeathTest::Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test) {
- return GetUnitTestImpl()->death_test_factory()->Create(
- statement, regex, file, line, test);
-}
-
-const char* DeathTest::LastMessage() {
- return last_death_test_message_.c_str();
-}
-
-void DeathTest::set_last_death_test_message(const String& message) {
- last_death_test_message_ = message;
-}
-
-String DeathTest::last_death_test_message_;
-
-// Provides cross platform implementation for some death functionality.
-class DeathTestImpl : public DeathTest {
- protected:
- DeathTestImpl(const char* a_statement, const RE* a_regex)
- : statement_(a_statement),
- regex_(a_regex),
- spawned_(false),
- status_(-1),
- outcome_(IN_PROGRESS),
- read_fd_(-1),
- write_fd_(-1) {}
-
- // read_fd_ is expected to be closed and cleared by a derived class.
- ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); }
-
- void Abort(AbortReason reason);
- virtual bool Passed(bool status_ok);
-
- const char* statement() const { return statement_; }
- const RE* regex() const { return regex_; }
- bool spawned() const { return spawned_; }
- void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
- int status() const { return status_; }
- void set_status(int a_status) { status_ = a_status; }
- DeathTestOutcome outcome() const { return outcome_; }
- void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; }
- int read_fd() const { return read_fd_; }
- void set_read_fd(int fd) { read_fd_ = fd; }
- int write_fd() const { return write_fd_; }
- void set_write_fd(int fd) { write_fd_ = fd; }
-
- // Called in the parent process only. Reads the result code of the death
- // test child process via a pipe, interprets it to set the outcome_
- // member, and closes read_fd_. Outputs diagnostics and terminates in
- // case of unexpected codes.
- void ReadAndInterpretStatusByte();
-
- private:
- // The textual content of the code this object is testing. This class
- // doesn't own this string and should not attempt to delete it.
- const char* const statement_;
- // The regular expression which test output must match. DeathTestImpl
- // doesn't own this object and should not attempt to delete it.
- const RE* const regex_;
- // True if the death test child process has been successfully spawned.
- bool spawned_;
- // The exit status of the child process.
- int status_;
- // How the death test concluded.
- DeathTestOutcome outcome_;
- // Descriptor to the read end of the pipe to the child process. It is
- // always -1 in the child process. The child keeps its write end of the
- // pipe in write_fd_.
- int read_fd_;
- // Descriptor to the child's write end of the pipe to the parent process.
- // It is always -1 in the parent process. The parent keeps its end of the
- // pipe in read_fd_.
- int write_fd_;
-};
-
-// Called in the parent process only. Reads the result code of the death
-// test child process via a pipe, interprets it to set the outcome_
-// member, and closes read_fd_. Outputs diagnostics and terminates in
-// case of unexpected codes.
-void DeathTestImpl::ReadAndInterpretStatusByte() {
- char flag;
- int bytes_read;
-
- // The read() here blocks until data is available (signifying the
- // failure of the death test) or until the pipe is closed (signifying
- // its success), so it's okay to call this in the parent before
- // the child process has exited.
- do {
- bytes_read = posix::Read(read_fd(), &flag, 1);
- } while (bytes_read == -1 && errno == EINTR);
-
- if (bytes_read == 0) {
- set_outcome(DIED);
- } else if (bytes_read == 1) {
- switch (flag) {
- case kDeathTestReturned:
- set_outcome(RETURNED);
- break;
- case kDeathTestThrew:
- set_outcome(THREW);
- break;
- case kDeathTestLived:
- set_outcome(LIVED);
- break;
- case kDeathTestInternalError:
- FailFromInternalError(read_fd()); // Does not return.
- break;
- default:
- GTEST_LOG_(FATAL) << "Death test child process reported "
- << "unexpected status byte ("
- << static_cast<unsigned int>(flag) << ")";
- }
- } else {
- GTEST_LOG_(FATAL) << "Read from death test child process failed: "
- << GetLastErrnoDescription();
- }
- GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));
- set_read_fd(-1);
-}
-
-// Signals that the death test code which should have exited, didn't.
-// Should be called only in a death test child process.
-// Writes a status byte to the child's status file descriptor, then
-// calls _exit(1).
-void DeathTestImpl::Abort(AbortReason reason) {
- // The parent process considers the death test to be a failure if
- // it finds any data in our pipe. So, here we write a single flag byte
- // to the pipe, then exit.
- const char status_ch =
- reason == TEST_DID_NOT_DIE ? kDeathTestLived :
- reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned;
-
- GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1));
- // We are leaking the descriptor here because on some platforms (i.e.,
- // when built as Windows DLL), destructors of global objects will still
- // run after calling _exit(). On such systems, write_fd_ will be
- // indirectly closed from the destructor of UnitTestImpl, causing double
- // close if it is also closed here. On debug configurations, double close
- // may assert. As there are no in-process buffers to flush here, we are
- // relying on the OS to close the descriptor after the process terminates
- // when the destructors are not run.
- _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash)
-}
-
-// Returns an indented copy of stderr output for a death test.
-// This makes distinguishing death test output lines from regular log lines
-// much easier.
-static ::std::string FormatDeathTestOutput(const ::std::string& output) {
- ::std::string ret;
- for (size_t at = 0; ; ) {
- const size_t line_end = output.find('\n', at);
- ret += "[ DEATH ] ";
- if (line_end == ::std::string::npos) {
- ret += output.substr(at);
- break;
- }
- ret += output.substr(at, line_end + 1 - at);
- at = line_end + 1;
- }
- return ret;
-}
-
-// Assesses the success or failure of a death test, using both private
-// members which have previously been set, and one argument:
-//
-// Private data members:
-// outcome: An enumeration describing how the death test
-// concluded: DIED, LIVED, THREW, or RETURNED. The death test
-// fails in the latter three cases.
-// status: The exit status of the child process. On *nix, it is in the
-// in the format specified by wait(2). On Windows, this is the
-// value supplied to the ExitProcess() API or a numeric code
-// of the exception that terminated the program.
-// regex: A regular expression object to be applied to
-// the test's captured standard error output; the death test
-// fails if it does not match.
-//
-// Argument:
-// status_ok: true if exit_status is acceptable in the context of
-// this particular death test, which fails if it is false
-//
-// Returns true iff all of the above conditions are met. Otherwise, the
-// first failing condition, in the order given above, is the one that is
-// reported. Also sets the last death test message string.
-bool DeathTestImpl::Passed(bool status_ok) {
- if (!spawned())
- return false;
-
- const String error_message = GetCapturedStderr();
-
- bool success = false;
- Message buffer;
-
- buffer << "Death test: " << statement() << "\n";
- switch (outcome()) {
- case LIVED:
- buffer << " Result: failed to die.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case THREW:
- buffer << " Result: threw an exception.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case RETURNED:
- buffer << " Result: illegal return in test statement.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case DIED:
- if (status_ok) {
- const bool matched = RE::PartialMatch(error_message.c_str(), *regex());
- if (matched) {
- success = true;
- } else {
- buffer << " Result: died but not with expected error.\n"
- << " Expected: " << regex()->pattern() << "\n"
- << "Actual msg:\n" << FormatDeathTestOutput(error_message);
- }
- } else {
- buffer << " Result: died but not with expected exit code:\n"
- << " " << ExitSummary(status()) << "\n"
- << "Actual msg:\n" << FormatDeathTestOutput(error_message);
- }
- break;
- case IN_PROGRESS:
- default:
- GTEST_LOG_(FATAL)
- << "DeathTest::Passed somehow called before conclusion of test";
- }
-
- DeathTest::set_last_death_test_message(buffer.GetString());
- return success;
-}
-
-# if GTEST_OS_WINDOWS
-// WindowsDeathTest implements death tests on Windows. Due to the
-// specifics of starting new processes on Windows, death tests there are
-// always threadsafe, and Google Test considers the
-// --gtest_death_test_style=fast setting to be equivalent to
-// --gtest_death_test_style=threadsafe there.
-//
-// A few implementation notes: Like the Linux version, the Windows
-// implementation uses pipes for child-to-parent communication. But due to
-// the specifics of pipes on Windows, some extra steps are required:
-//
-// 1. The parent creates a communication pipe and stores handles to both
-// ends of it.
-// 2. The parent starts the child and provides it with the information
-// necessary to acquire the handle to the write end of the pipe.
-// 3. The child acquires the write end of the pipe and signals the parent
-// using a Windows event.
-// 4. Now the parent can release the write end of the pipe on its side. If
-// this is done before step 3, the object's reference count goes down to
-// 0 and it is destroyed, preventing the child from acquiring it. The
-// parent now has to release it, or read operations on the read end of
-// the pipe will not return when the child terminates.
-// 5. The parent reads child's output through the pipe (outcome code and
-// any possible error messages) from the pipe, and its stderr and then
-// determines whether to fail the test.
-//
-// Note: to distinguish Win32 API calls from the local method and function
-// calls, the former are explicitly resolved in the global namespace.
-//
-class WindowsDeathTest : public DeathTestImpl {
- public:
- WindowsDeathTest(const char* a_statement,
- const RE* a_regex,
- const char* file,
- int line)
- : DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {}
-
- // All of these virtual functions are inherited from DeathTest.
- virtual int Wait();
- virtual TestRole AssumeRole();
-
- private:
- // The name of the file in which the death test is located.
- const char* const file_;
- // The line number on which the death test is located.
- const int line_;
- // Handle to the write end of the pipe to the child process.
- AutoHandle write_handle_;
- // Child process handle.
- AutoHandle child_handle_;
- // Event the child process uses to signal the parent that it has
- // acquired the handle to the write end of the pipe. After seeing this
- // event the parent can release its own handles to make sure its
- // ReadFile() calls return when the child terminates.
- AutoHandle event_handle_;
-};
-
-// Waits for the child in a death test to exit, returning its exit
-// status, or 0 if no child process exists. As a side effect, sets the
-// outcome data member.
-int WindowsDeathTest::Wait() {
- if (!spawned())
- return 0;
-
- // Wait until the child either signals that it has acquired the write end
- // of the pipe or it dies.
- const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };
- switch (::WaitForMultipleObjects(2,
- wait_handles,
- FALSE, // Waits for any of the handles.
- INFINITE)) {
- case WAIT_OBJECT_0:
- case WAIT_OBJECT_0 + 1:
- break;
- default:
- GTEST_DEATH_TEST_CHECK_(false); // Should not get here.
- }
-
- // The child has acquired the write end of the pipe or exited.
- // We release the handle on our side and continue.
- write_handle_.Reset();
- event_handle_.Reset();
-
- ReadAndInterpretStatusByte();
-
- // Waits for the child process to exit if it haven't already. This
- // returns immediately if the child has already exited, regardless of
- // whether previous calls to WaitForMultipleObjects synchronized on this
- // handle or not.
- GTEST_DEATH_TEST_CHECK_(
- WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),
- INFINITE));
- DWORD status_code;
- GTEST_DEATH_TEST_CHECK_(
- ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);
- child_handle_.Reset();
- set_status(static_cast<int>(status_code));
- return status();
-}
-
-// The AssumeRole process for a Windows death test. It creates a child
-// process with the same executable as the current process to run the
-// death test. The child process is given the --gtest_filter and
-// --gtest_internal_run_death_test flags such that it knows to run the
-// current death test only.
-DeathTest::TestRole WindowsDeathTest::AssumeRole() {
- const UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const TestInfo* const info = impl->current_test_info();
- const int death_test_index = info->result()->death_test_count();
-
- if (flag != NULL) {
- // ParseInternalRunDeathTestFlag() has performed all the necessary
- // processing.
- set_write_fd(flag->write_fd());
- return EXECUTE_TEST;
- }
-
- // WindowsDeathTest uses an anonymous pipe to communicate results of
- // a death test.
- SECURITY_ATTRIBUTES handles_are_inheritable = {
- sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
- HANDLE read_handle, write_handle;
- GTEST_DEATH_TEST_CHECK_(
- ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable,
- 0) // Default buffer size.
- != FALSE);
- set_read_fd(::_open_osfhandle(reinterpret_cast<intptr_t>(read_handle),
- O_RDONLY));
- write_handle_.Reset(write_handle);
- event_handle_.Reset(::CreateEvent(
- &handles_are_inheritable,
- TRUE, // The event will automatically reset to non-signaled state.
- FALSE, // The initial state is non-signalled.
- NULL)); // The even is unnamed.
- GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL);
- const String filter_flag = String::Format("--%s%s=%s.%s",
- GTEST_FLAG_PREFIX_, kFilterFlag,
- info->test_case_name(),
- info->name());
- const String internal_flag = String::Format(
- "--%s%s=%s|%d|%d|%u|%Iu|%Iu",
- GTEST_FLAG_PREFIX_,
- kInternalRunDeathTestFlag,
- file_, line_,
- death_test_index,
- static_cast<unsigned int>(::GetCurrentProcessId()),
- // size_t has the same with as pointers on both 32-bit and 64-bit
- // Windows platforms.
- // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx.
- reinterpret_cast<size_t>(write_handle),
- reinterpret_cast<size_t>(event_handle_.Get()));
-
- char executable_path[_MAX_PATH + 1]; // NOLINT
- GTEST_DEATH_TEST_CHECK_(
- _MAX_PATH + 1 != ::GetModuleFileNameA(NULL,
- executable_path,
- _MAX_PATH));
-
- String command_line = String::Format("%s %s \"%s\"",
- ::GetCommandLineA(),
- filter_flag.c_str(),
- internal_flag.c_str());
-
- DeathTest::set_last_death_test_message("");
-
- CaptureStderr();
- // Flush the log buffers since the log streams are shared with the child.
- FlushInfoLog();
-
- // The child process will share the standard handles with the parent.
- STARTUPINFOA startup_info;
- memset(&startup_info, 0, sizeof(STARTUPINFO));
- startup_info.dwFlags = STARTF_USESTDHANDLES;
- startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE);
- startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);
- startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE);
-
- PROCESS_INFORMATION process_info;
- GTEST_DEATH_TEST_CHECK_(::CreateProcessA(
- executable_path,
- const_cast<char*>(command_line.c_str()),
- NULL, // Retuned process handle is not inheritable.
- NULL, // Retuned thread handle is not inheritable.
- TRUE, // Child inherits all inheritable handles (for write_handle_).
- 0x0, // Default creation flags.
- NULL, // Inherit the parent's environment.
- UnitTest::GetInstance()->original_working_dir(),
- &startup_info,
- &process_info) != FALSE);
- child_handle_.Reset(process_info.hProcess);
- ::CloseHandle(process_info.hThread);
- set_spawned(true);
- return OVERSEE_TEST;
-}
-# else // We are not on Windows.
-
-// ForkingDeathTest provides implementations for most of the abstract
-// methods of the DeathTest interface. Only the AssumeRole method is
-// left undefined.
-class ForkingDeathTest : public DeathTestImpl {
- public:
- ForkingDeathTest(const char* statement, const RE* regex);
-
- // All of these virtual functions are inherited from DeathTest.
- virtual int Wait();
-
- protected:
- void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
-
- private:
- // PID of child process during death test; 0 in the child process itself.
- pid_t child_pid_;
-};
-
-// Constructs a ForkingDeathTest.
-ForkingDeathTest::ForkingDeathTest(const char* a_statement, const RE* a_regex)
- : DeathTestImpl(a_statement, a_regex),
- child_pid_(-1) {}
-
-// Waits for the child in a death test to exit, returning its exit
-// status, or 0 if no child process exists. As a side effect, sets the
-// outcome data member.
-int ForkingDeathTest::Wait() {
- if (!spawned())
- return 0;
-
- ReadAndInterpretStatusByte();
-
- int status_value;
- GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0));
- set_status(status_value);
- return status_value;
-}
-
-// A concrete death test class that forks, then immediately runs the test
-// in the child process.
-class NoExecDeathTest : public ForkingDeathTest {
- public:
- NoExecDeathTest(const char* a_statement, const RE* a_regex) :
- ForkingDeathTest(a_statement, a_regex) { }
- virtual TestRole AssumeRole();
-};
-
-// The AssumeRole process for a fork-and-run death test. It implements a
-// straightforward fork, with a simple pipe to transmit the status byte.
-DeathTest::TestRole NoExecDeathTest::AssumeRole() {
- const size_t thread_count = GetThreadCount();
- if (thread_count != 1) {
- GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count);
- }
-
- int pipe_fd[2];
- GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
-
- DeathTest::set_last_death_test_message("");
- CaptureStderr();
- // When we fork the process below, the log file buffers are copied, but the
- // file descriptors are shared. We flush all log files here so that closing
- // the file descriptors in the child process doesn't throw off the
- // synchronization between descriptors and buffers in the parent process.
- // This is as close to the fork as possible to avoid a race condition in case
- // there are multiple threads running before the death test, and another
- // thread writes to the log file.
- FlushInfoLog();
-
- const pid_t child_pid = fork();
- GTEST_DEATH_TEST_CHECK_(child_pid != -1);
- set_child_pid(child_pid);
- if (child_pid == 0) {
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0]));
- set_write_fd(pipe_fd[1]);
- // Redirects all logging to stderr in the child process to prevent
- // concurrent writes to the log files. We capture stderr in the parent
- // process and append the child process' output to a log.
- LogToStderr();
- // Event forwarding to the listeners of event listener API mush be shut
- // down in death test subprocesses.
- GetUnitTestImpl()->listeners()->SuppressEventForwarding();
- return EXECUTE_TEST;
- } else {
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
- set_read_fd(pipe_fd[0]);
- set_spawned(true);
- return OVERSEE_TEST;
- }
-}
-
-// A concrete death test class that forks and re-executes the main
-// program from the beginning, with command-line flags set that cause
-// only this specific death test to be run.
-class ExecDeathTest : public ForkingDeathTest {
- public:
- ExecDeathTest(const char* a_statement, const RE* a_regex,
- const char* file, int line) :
- ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }
- virtual TestRole AssumeRole();
- private:
- // The name of the file in which the death test is located.
- const char* const file_;
- // The line number on which the death test is located.
- const int line_;
-};
-
-// Utility class for accumulating command-line arguments.
-class Arguments {
- public:
- Arguments() {
- args_.push_back(NULL);
- }
-
- ~Arguments() {
- for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();
- ++i) {
- free(*i);
- }
- }
- void AddArgument(const char* argument) {
- args_.insert(args_.end() - 1, posix::StrDup(argument));
- }
-
- template <typename Str>
- void AddArguments(const ::std::vector<Str>& arguments) {
- for (typename ::std::vector<Str>::const_iterator i = arguments.begin();
- i != arguments.end();
- ++i) {
- args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));
- }
- }
- char* const* Argv() {
- return &args_[0];
- }
- private:
- std::vector<char*> args_;
-};
-
-// A struct that encompasses the arguments to the child process of a
-// threadsafe-style death test process.
-struct ExecDeathTestArgs {
- char* const* argv; // Command-line arguments for the child's call to exec
- int close_fd; // File descriptor to close; the read end of a pipe
-};
-
-# if GTEST_OS_MAC
-inline char** GetEnviron() {
- // When Google Test is built as a framework on MacOS X, the environ variable
- // is unavailable. Apple's documentation (man environ) recommends using
- // _NSGetEnviron() instead.
- return *_NSGetEnviron();
-}
-# else
-// Some POSIX platforms expect you to declare environ. extern "C" makes
-// it reside in the global namespace.
-extern "C" char** environ;
-inline char** GetEnviron() { return environ; }
-# endif // GTEST_OS_MAC
-
-// The main function for a threadsafe-style death test child process.
-// This function is called in a clone()-ed process and thus must avoid
-// any potentially unsafe operations like malloc or libc functions.
-static int ExecDeathTestChildMain(void* child_arg) {
- ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));
-
- // We need to execute the test program in the same environment where
- // it was originally invoked. Therefore we change to the original
- // working directory first.
- const char* const original_dir =
- UnitTest::GetInstance()->original_working_dir();
- // We can safely call chdir() as it's a direct system call.
- if (chdir(original_dir) != 0) {
- DeathTestAbort(String::Format("chdir(\"%s\") failed: %s",
- original_dir,
- GetLastErrnoDescription().c_str()));
- return EXIT_FAILURE;
- }
-
- // We can safely call execve() as it's a direct system call. We
- // cannot use execvp() as it's a libc function and thus potentially
- // unsafe. Since execve() doesn't search the PATH, the user must
- // invoke the test program via a valid path that contains at least
- // one path separator.
- execve(args->argv[0], args->argv, GetEnviron());
- DeathTestAbort(String::Format("execve(%s, ...) in %s failed: %s",
- args->argv[0],
- original_dir,
- GetLastErrnoDescription().c_str()));
- return EXIT_FAILURE;
-}
-
-// Two utility routines that together determine the direction the stack
-// grows.
-// This could be accomplished more elegantly by a single recursive
-// function, but we want to guard against the unlikely possibility of
-// a smart compiler optimizing the recursion away.
-//
-// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining
-// StackLowerThanAddress into StackGrowsDown, which then doesn't give
-// correct answer.
-bool StackLowerThanAddress(const void* ptr) GTEST_NO_INLINE_;
-bool StackLowerThanAddress(const void* ptr) {
- int dummy;
- return &dummy < ptr;
-}
-
-bool StackGrowsDown() {
- int dummy;
- return StackLowerThanAddress(&dummy);
-}
-
-// A threadsafe implementation of fork(2) for threadsafe-style death tests
-// that uses clone(2). It dies with an error message if anything goes
-// wrong.
-static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
- ExecDeathTestArgs args = { argv, close_fd };
- pid_t child_pid = -1;
-
-# if GTEST_HAS_CLONE
- const bool use_fork = GTEST_FLAG(death_test_use_fork);
-
- if (!use_fork) {
- static const bool stack_grows_down = StackGrowsDown();
- const size_t stack_size = getpagesize();
- // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.
- void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE, -1, 0);
- GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED);
- void* const stack_top =
- static_cast<char*>(stack) + (stack_grows_down ? stack_size : 0);
-
- child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args);
-
- GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1);
- }
-# else
- const bool use_fork = true;
-# endif // GTEST_HAS_CLONE
-
- if (use_fork && (child_pid = fork()) == 0) {
- ExecDeathTestChildMain(&args);
- _exit(0);
- }
-
- GTEST_DEATH_TEST_CHECK_(child_pid != -1);
- return child_pid;
-}
-
-// The AssumeRole process for a fork-and-exec death test. It re-executes the
-// main program from the beginning, setting the --gtest_filter
-// and --gtest_internal_run_death_test flags to cause only the current
-// death test to be re-run.
-DeathTest::TestRole ExecDeathTest::AssumeRole() {
- const UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const TestInfo* const info = impl->current_test_info();
- const int death_test_index = info->result()->death_test_count();
-
- if (flag != NULL) {
- set_write_fd(flag->write_fd());
- return EXECUTE_TEST;
- }
-
- int pipe_fd[2];
- GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
- // Clear the close-on-exec flag on the write end of the pipe, lest
- // it be closed when the child process does an exec:
- GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1);
-
- const String filter_flag =
- String::Format("--%s%s=%s.%s",
- GTEST_FLAG_PREFIX_, kFilterFlag,
- info->test_case_name(), info->name());
- const String internal_flag =
- String::Format("--%s%s=%s|%d|%d|%d",
- GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag,
- file_, line_, death_test_index, pipe_fd[1]);
- Arguments args;
- args.AddArguments(GetArgvs());
- args.AddArgument(filter_flag.c_str());
- args.AddArgument(internal_flag.c_str());
-
- DeathTest::set_last_death_test_message("");
-
- CaptureStderr();
- // See the comment in NoExecDeathTest::AssumeRole for why the next line
- // is necessary.
- FlushInfoLog();
-
- const pid_t child_pid = ExecDeathTestFork(args.Argv(), pipe_fd[0]);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
- set_child_pid(child_pid);
- set_read_fd(pipe_fd[0]);
- set_spawned(true);
- return OVERSEE_TEST;
-}
-
-# endif // !GTEST_OS_WINDOWS
-
-// Creates a concrete DeathTest-derived class that depends on the
-// --gtest_death_test_style flag, and sets the pointer pointed to
-// by the "test" argument to its address. If the test should be
-// skipped, sets that pointer to NULL. Returns true, unless the
-// flag is set to an invalid value.
-bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
- const char* file, int line,
- DeathTest** test) {
- UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const int death_test_index = impl->current_test_info()
- ->increment_death_test_count();
-
- if (flag != NULL) {
- if (death_test_index > flag->index()) {
- DeathTest::set_last_death_test_message(String::Format(
- "Death test count (%d) somehow exceeded expected maximum (%d)",
- death_test_index, flag->index()));
- return false;
- }
-
- if (!(flag->file() == file && flag->line() == line &&
- flag->index() == death_test_index)) {
- *test = NULL;
- return true;
- }
- }
-
-# if GTEST_OS_WINDOWS
-
- if (GTEST_FLAG(death_test_style) == "threadsafe" ||
- GTEST_FLAG(death_test_style) == "fast") {
- *test = new WindowsDeathTest(statement, regex, file, line);
- }
-
-# else
-
- if (GTEST_FLAG(death_test_style) == "threadsafe") {
- *test = new ExecDeathTest(statement, regex, file, line);
- } else if (GTEST_FLAG(death_test_style) == "fast") {
- *test = new NoExecDeathTest(statement, regex);
- }
-
-# endif // GTEST_OS_WINDOWS
-
- else { // NOLINT - this is more readable than unbalanced brackets inside #if.
- DeathTest::set_last_death_test_message(String::Format(
- "Unknown death test style \"%s\" encountered",
- GTEST_FLAG(death_test_style).c_str()));
- return false;
- }
-
- return true;
-}
-
-// Splits a given string on a given delimiter, populating a given
-// vector with the fields. GTEST_HAS_DEATH_TEST implies that we have
-// ::std::string, so we can use it here.
-static void SplitString(const ::std::string& str, char delimiter,
- ::std::vector< ::std::string>* dest) {
- ::std::vector< ::std::string> parsed;
- ::std::string::size_type pos = 0;
- while (::testing::internal::AlwaysTrue()) {
- const ::std::string::size_type colon = str.find(delimiter, pos);
- if (colon == ::std::string::npos) {
- parsed.push_back(str.substr(pos));
- break;
- } else {
- parsed.push_back(str.substr(pos, colon - pos));
- pos = colon + 1;
- }
- }
- dest->swap(parsed);
-}
-
-# if GTEST_OS_WINDOWS
-// Recreates the pipe and event handles from the provided parameters,
-// signals the event, and returns a file descriptor wrapped around the pipe
-// handle. This function is called in the child process only.
-int GetStatusFileDescriptor(unsigned int parent_process_id,
- size_t write_handle_as_size_t,
- size_t event_handle_as_size_t) {
- AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,
- FALSE, // Non-inheritable.
- parent_process_id));
- if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) {
- DeathTestAbort(String::Format("Unable to open parent process %u",
- parent_process_id));
- }
-
- // TODO(vladl@google.com): Replace the following check with a
- // compile-time assertion when available.
- GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t));
-
- const HANDLE write_handle =
- reinterpret_cast<HANDLE>(write_handle_as_size_t);
- HANDLE dup_write_handle;
-
- // The newly initialized handle is accessible only in in the parent
- // process. To obtain one accessible within the child, we need to use
- // DuplicateHandle.
- if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,
- ::GetCurrentProcess(), &dup_write_handle,
- 0x0, // Requested privileges ignored since
- // DUPLICATE_SAME_ACCESS is used.
- FALSE, // Request non-inheritable handler.
- DUPLICATE_SAME_ACCESS)) {
- DeathTestAbort(String::Format(
- "Unable to duplicate the pipe handle %Iu from the parent process %u",
- write_handle_as_size_t, parent_process_id));
- }
-
- const HANDLE event_handle = reinterpret_cast<HANDLE>(event_handle_as_size_t);
- HANDLE dup_event_handle;
-
- if (!::DuplicateHandle(parent_process_handle.Get(), event_handle,
- ::GetCurrentProcess(), &dup_event_handle,
- 0x0,
- FALSE,
- DUPLICATE_SAME_ACCESS)) {
- DeathTestAbort(String::Format(
- "Unable to duplicate the event handle %Iu from the parent process %u",
- event_handle_as_size_t, parent_process_id));
- }
-
- const int write_fd =
- ::_open_osfhandle(reinterpret_cast<intptr_t>(dup_write_handle), O_APPEND);
- if (write_fd == -1) {
- DeathTestAbort(String::Format(
- "Unable to convert pipe handle %Iu to a file descriptor",
- write_handle_as_size_t));
- }
-
- // Signals the parent that the write end of the pipe has been acquired
- // so the parent can release its own write end.
- ::SetEvent(dup_event_handle);
-
- return write_fd;
-}
-# endif // GTEST_OS_WINDOWS
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
- if (GTEST_FLAG(internal_run_death_test) == "") return NULL;
-
- // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we
- // can use it here.
- int line = -1;
- int index = -1;
- ::std::vector< ::std::string> fields;
- SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);
- int write_fd = -1;
-
-# if GTEST_OS_WINDOWS
-
- unsigned int parent_process_id = 0;
- size_t write_handle_as_size_t = 0;
- size_t event_handle_as_size_t = 0;
-
- if (fields.size() != 6
- || !ParseNaturalNumber(fields[1], &line)
- || !ParseNaturalNumber(fields[2], &index)
- || !ParseNaturalNumber(fields[3], &parent_process_id)
- || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)
- || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
- DeathTestAbort(String::Format(
- "Bad --gtest_internal_run_death_test flag: %s",
- GTEST_FLAG(internal_run_death_test).c_str()));
- }
- write_fd = GetStatusFileDescriptor(parent_process_id,
- write_handle_as_size_t,
- event_handle_as_size_t);
-# else
-
- if (fields.size() != 4
- || !ParseNaturalNumber(fields[1], &line)
- || !ParseNaturalNumber(fields[2], &index)
- || !ParseNaturalNumber(fields[3], &write_fd)) {
- DeathTestAbort(String::Format(
- "Bad --gtest_internal_run_death_test flag: %s",
- GTEST_FLAG(internal_run_death_test).c_str()));
- }
-
-# endif // GTEST_OS_WINDOWS
-
- return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
-}
-
-} // namespace internal
-
-#endif // GTEST_HAS_DEATH_TEST
-
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: keith.ray@gmail.com (Keith Ray)
-
-
-#include <stdlib.h>
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h>
-#elif GTEST_OS_WINDOWS
-# include <direct.h>
-# include <io.h>
-#elif GTEST_OS_SYMBIAN || GTEST_OS_NACL
-// Symbian OpenC and NaCl have PATH_MAX in sys/syslimits.h
-# include <sys/syslimits.h>
-#else
-# include <limits.h>
-# include <climits> // Some Linux distributions define PATH_MAX here.
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_MAX_ _MAX_PATH
-#elif defined(PATH_MAX)
-# define GTEST_PATH_MAX_ PATH_MAX
-#elif defined(_XOPEN_PATH_MAX)
-# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX
-#else
-# define GTEST_PATH_MAX_ _POSIX_PATH_MAX
-#endif // GTEST_OS_WINDOWS
-
-
-namespace testing {
-namespace internal {
-
-#if GTEST_OS_WINDOWS
-// On Windows, '\\' is the standard path separator, but many tools and the
-// Windows API also accept '/' as an alternate path separator. Unless otherwise
-// noted, a file path can contain either kind of path separators, or a mixture
-// of them.
-const char kPathSeparator = '\\';
-const char kAlternatePathSeparator = '/';
-const char kPathSeparatorString[] = "\\";
-const char kAlternatePathSeparatorString[] = "/";
-# if GTEST_OS_WINDOWS_MOBILE
-// Windows CE doesn't have a current directory. You should not use
-// the current directory in tests on Windows CE, but this at least
-// provides a reasonable fallback.
-const char kCurrentDirectoryString[] = "\\";
-// Windows CE doesn't define INVALID_FILE_ATTRIBUTES
-const DWORD kInvalidFileAttributes = 0xffffffff;
-# else
-const char kCurrentDirectoryString[] = ".\\";
-# endif // GTEST_OS_WINDOWS_MOBILE
-#else
-const char kPathSeparator = '/';
-const char kPathSeparatorString[] = "/";
-const char kCurrentDirectoryString[] = "./";
-#endif // GTEST_OS_WINDOWS
-
-// Returns whether the given character is a valid path separator.
-static bool IsPathSeparator(char c) {
-#if GTEST_HAS_ALT_PATH_SEP_
- return (c == kPathSeparator) || (c == kAlternatePathSeparator);
-#else
- return c == kPathSeparator;
-#endif
-}
-
-// Returns the current working directory, or "" if unsuccessful.
-FilePath FilePath::GetCurrentDir() {
-#if GTEST_OS_WINDOWS_MOBILE
- // Windows CE doesn't have a current directory, so we just return
- // something reasonable.
- return FilePath(kCurrentDirectoryString);
-#elif GTEST_OS_WINDOWS
- char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
- return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
-#else
- char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
- return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-// Returns a copy of the FilePath with the case-insensitive extension removed.
-// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
-// FilePath("dir/file"). If a case-insensitive extension is not
-// found, returns a copy of the original FilePath.
-FilePath FilePath::RemoveExtension(const char* extension) const {
- String dot_extension(String::Format(".%s", extension));
- if (pathname_.EndsWithCaseInsensitive(dot_extension.c_str())) {
- return FilePath(String(pathname_.c_str(), pathname_.length() - 4));
- }
- return *this;
-}
-
-// Returns a pointer to the last occurence of a valid path separator in
-// the FilePath. On Windows, for example, both '/' and '\' are valid path
-// separators. Returns NULL if no path separator was found.
-const char* FilePath::FindLastPathSeparator() const {
- const char* const last_sep = strrchr(c_str(), kPathSeparator);
-#if GTEST_HAS_ALT_PATH_SEP_
- const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator);
- // Comparing two pointers of which only one is NULL is undefined.
- if (last_alt_sep != NULL &&
- (last_sep == NULL || last_alt_sep > last_sep)) {
- return last_alt_sep;
- }
-#endif
- return last_sep;
-}
-
-// Returns a copy of the FilePath with the directory part removed.
-// Example: FilePath("path/to/file").RemoveDirectoryName() returns
-// FilePath("file"). If there is no directory part ("just_a_file"), it returns
-// the FilePath unmodified. If there is no file part ("just_a_dir/") it
-// returns an empty FilePath ("").
-// On Windows platform, '\' is the path separator, otherwise it is '/'.
-FilePath FilePath::RemoveDirectoryName() const {
- const char* const last_sep = FindLastPathSeparator();
- return last_sep ? FilePath(String(last_sep + 1)) : *this;
-}
-
-// RemoveFileName returns the directory path with the filename removed.
-// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
-// If the FilePath is "a_file" or "/a_file", RemoveFileName returns
-// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
-// not have a file, like "just/a/dir/", it returns the FilePath unmodified.
-// On Windows platform, '\' is the path separator, otherwise it is '/'.
-FilePath FilePath::RemoveFileName() const {
- const char* const last_sep = FindLastPathSeparator();
- String dir;
- if (last_sep) {
- dir = String(c_str(), last_sep + 1 - c_str());
- } else {
- dir = kCurrentDirectoryString;
- }
- return FilePath(dir);
-}
-
-// Helper functions for naming files in a directory for xml output.
-
-// Given directory = "dir", base_name = "test", number = 0,
-// extension = "xml", returns "dir/test.xml". If number is greater
-// than zero (e.g., 12), returns "dir/test_12.xml".
-// On Windows platform, uses \ as the separator rather than /.
-FilePath FilePath::MakeFileName(const FilePath& directory,
- const FilePath& base_name,
- int number,
- const char* extension) {
- String file;
- if (number == 0) {
- file = String::Format("%s.%s", base_name.c_str(), extension);
- } else {
- file = String::Format("%s_%d.%s", base_name.c_str(), number, extension);
- }
- return ConcatPaths(directory, FilePath(file));
-}
-
-// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml".
-// On Windows, uses \ as the separator rather than /.
-FilePath FilePath::ConcatPaths(const FilePath& directory,
- const FilePath& relative_path) {
- if (directory.IsEmpty())
- return relative_path;
- const FilePath dir(directory.RemoveTrailingPathSeparator());
- return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator,
- relative_path.c_str()));
-}
-
-// Returns true if pathname describes something findable in the file-system,
-// either a file, directory, or whatever.
-bool FilePath::FileOrDirectoryExists() const {
-#if GTEST_OS_WINDOWS_MOBILE
- LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());
- const DWORD attributes = GetFileAttributes(unicode);
- delete [] unicode;
- return attributes != kInvalidFileAttributes;
-#else
- posix::StatStruct file_stat;
- return posix::Stat(pathname_.c_str(), &file_stat) == 0;
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-// Returns true if pathname describes a directory in the file-system
-// that exists.
-bool FilePath::DirectoryExists() const {
- bool result = false;
-#if GTEST_OS_WINDOWS
- // Don't strip off trailing separator if path is a root directory on
- // Windows (like "C:\\").
- const FilePath& path(IsRootDirectory() ? *this :
- RemoveTrailingPathSeparator());
-#else
- const FilePath& path(*this);
-#endif
-
-#if GTEST_OS_WINDOWS_MOBILE
- LPCWSTR unicode = String::AnsiToUtf16(path.c_str());
- const DWORD attributes = GetFileAttributes(unicode);
- delete [] unicode;
- if ((attributes != kInvalidFileAttributes) &&
- (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
- result = true;
- }
-#else
- posix::StatStruct file_stat;
- result = posix::Stat(path.c_str(), &file_stat) == 0 &&
- posix::IsDir(file_stat);
-#endif // GTEST_OS_WINDOWS_MOBILE
-
- return result;
-}
-
-// Returns true if pathname describes a root directory. (Windows has one
-// root directory per disk drive.)
-bool FilePath::IsRootDirectory() const {
-#if GTEST_OS_WINDOWS
- // TODO(wan@google.com): on Windows a network share like
- // \\server\share can be a root directory, although it cannot be the
- // current directory. Handle this properly.
- return pathname_.length() == 3 && IsAbsolutePath();
-#else
- return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);
-#endif
-}
-
-// Returns true if pathname describes an absolute path.
-bool FilePath::IsAbsolutePath() const {
- const char* const name = pathname_.c_str();
-#if GTEST_OS_WINDOWS
- return pathname_.length() >= 3 &&
- ((name[0] >= 'a' && name[0] <= 'z') ||
- (name[0] >= 'A' && name[0] <= 'Z')) &&
- name[1] == ':' &&
- IsPathSeparator(name[2]);
-#else
- return IsPathSeparator(name[0]);
-#endif
-}
-
-// Returns a pathname for a file that does not currently exist. The pathname
-// will be directory/base_name.extension or
-// directory/base_name_<number>.extension if directory/base_name.extension
-// already exists. The number will be incremented until a pathname is found
-// that does not already exist.
-// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
-// There could be a race condition if two or more processes are calling this
-// function at the same time -- they could both pick the same filename.
-FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
- const FilePath& base_name,
- const char* extension) {
- FilePath full_pathname;
- int number = 0;
- do {
- full_pathname.Set(MakeFileName(directory, base_name, number++, extension));
- } while (full_pathname.FileOrDirectoryExists());
- return full_pathname;
-}
-
-// Returns true if FilePath ends with a path separator, which indicates that
-// it is intended to represent a directory. Returns false otherwise.
-// This does NOT check that a directory (or file) actually exists.
-bool FilePath::IsDirectory() const {
- return !pathname_.empty() &&
- IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]);
-}
-
-// Create directories so that path exists. Returns true if successful or if
-// the directories already exist; returns false if unable to create directories
-// for any reason.
-bool FilePath::CreateDirectoriesRecursively() const {
- if (!this->IsDirectory()) {
- return false;
- }
-
- if (pathname_.length() == 0 || this->DirectoryExists()) {
- return true;
- }
-
- const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName());
- return parent.CreateDirectoriesRecursively() && this->CreateFolder();
-}
-
-// Create the directory so that path exists. Returns true if successful or
-// if the directory already exists; returns false if unable to create the
-// directory for any reason, including if the parent directory does not
-// exist. Not named "CreateDirectory" because that's a macro on Windows.
-bool FilePath::CreateFolder() const {
-#if GTEST_OS_WINDOWS_MOBILE
- FilePath removed_sep(this->RemoveTrailingPathSeparator());
- LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str());
- int result = CreateDirectory(unicode, NULL) ? 0 : -1;
- delete [] unicode;
-#elif GTEST_OS_WINDOWS
- int result = _mkdir(pathname_.c_str());
-#else
- int result = mkdir(pathname_.c_str(), 0777);
-#endif // GTEST_OS_WINDOWS_MOBILE
-
- if (result == -1) {
- return this->DirectoryExists(); // An error is OK if the directory exists.
- }
- return true; // No error.
-}
-
-// If input name has a trailing separator character, remove it and return the
-// name, otherwise return the name string unmodified.
-// On Windows platform, uses \ as the separator, other platforms use /.
-FilePath FilePath::RemoveTrailingPathSeparator() const {
- return IsDirectory()
- ? FilePath(String(pathname_.c_str(), pathname_.length() - 1))
- : *this;
-}
-
-// Removes any redundant separators that might be in the pathname.
-// For example, "bar///foo" becomes "bar/foo". Does not eliminate other
-// redundancies that might be in a pathname involving "." or "..".
-// TODO(wan@google.com): handle Windows network shares (e.g. \\server\share).
-void FilePath::Normalize() {
- if (pathname_.c_str() == NULL) {
- pathname_ = "";
- return;
- }
- const char* src = pathname_.c_str();
- char* const dest = new char[pathname_.length() + 1];
- char* dest_ptr = dest;
- memset(dest_ptr, 0, pathname_.length() + 1);
-
- while (*src != '\0') {
- *dest_ptr = *src;
- if (!IsPathSeparator(*src)) {
- src++;
- } else {
-#if GTEST_HAS_ALT_PATH_SEP_
- if (*dest_ptr == kAlternatePathSeparator) {
- *dest_ptr = kPathSeparator;
- }
-#endif
- while (IsPathSeparator(*src))
- src++;
- }
- dest_ptr++;
- }
- *dest_ptr = '\0';
- pathname_ = dest;
- delete[] dest;
-}
-
-} // namespace internal
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h> // For TerminateProcess()
-#elif GTEST_OS_WINDOWS
-# include <io.h>
-# include <sys/stat.h>
-#else
-# include <unistd.h>
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_OS_MAC
-# include <mach/mach_init.h>
-# include <mach/task.h>
-# include <mach/vm_map.h>
-#endif // GTEST_OS_MAC
-
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-namespace internal {
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
-const int kStdOutFileno = 1;
-const int kStdErrFileno = 2;
-#else
-const int kStdOutFileno = STDOUT_FILENO;
-const int kStdErrFileno = STDERR_FILENO;
-#endif // _MSC_VER
-
-#if GTEST_OS_MAC
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-size_t GetThreadCount() {
- const task_t task = mach_task_self();
- mach_msg_type_number_t thread_count;
- thread_act_array_t thread_list;
- const kern_return_t status = task_threads(task, &thread_list, &thread_count);
- if (status == KERN_SUCCESS) {
- // task_threads allocates resources in thread_list and we need to free them
- // to avoid leaks.
- vm_deallocate(task,
- reinterpret_cast<vm_address_t>(thread_list),
- sizeof(thread_t) * thread_count);
- return static_cast<size_t>(thread_count);
- } else {
- return 0;
- }
-}
-
-#else
-
-size_t GetThreadCount() {
- // There's no portable way to detect the number of threads, so we just
- // return 0 to indicate that we cannot detect it.
- return 0;
-}
-
-#endif // GTEST_OS_MAC
-
-#if GTEST_USES_POSIX_RE
-
-// Implements RE. Currently only needed for death tests.
-
-RE::~RE() {
- if (is_valid_) {
- // regfree'ing an invalid regex might crash because the content
- // of the regex is undefined. Since the regex's are essentially
- // the same, one cannot be valid (or invalid) without the other
- // being so too.
- regfree(&partial_regex_);
- regfree(&full_regex_);
- }
- free(const_cast<char*>(pattern_));
-}
-
-// Returns true iff regular expression re matches the entire str.
-bool RE::FullMatch(const char* str, const RE& re) {
- if (!re.is_valid_) return false;
-
- regmatch_t match;
- return regexec(&re.full_regex_, str, 1, &match, 0) == 0;
-}
-
-// Returns true iff regular expression re matches a substring of str
-// (including str itself).
-bool RE::PartialMatch(const char* str, const RE& re) {
- if (!re.is_valid_) return false;
-
- regmatch_t match;
- return regexec(&re.partial_regex_, str, 1, &match, 0) == 0;
-}
-
-// Initializes an RE from its string representation.
-void RE::Init(const char* regex) {
- pattern_ = posix::StrDup(regex);
-
- // Reserves enough bytes to hold the regular expression used for a
- // full match.
- const size_t full_regex_len = strlen(regex) + 10;
- char* const full_pattern = new char[full_regex_len];
-
- snprintf(full_pattern, full_regex_len, "^(%s)$", regex);
- is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;
- // We want to call regcomp(&partial_regex_, ...) even if the
- // previous expression returns false. Otherwise partial_regex_ may
- // not be properly initialized can may cause trouble when it's
- // freed.
- //
- // Some implementation of POSIX regex (e.g. on at least some
- // versions of Cygwin) doesn't accept the empty string as a valid
- // regex. We change it to an equivalent form "()" to be safe.
- if (is_valid_) {
- const char* const partial_regex = (*regex == '\0') ? "()" : regex;
- is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;
- }
- EXPECT_TRUE(is_valid_)
- << "Regular expression \"" << regex
- << "\" is not a valid POSIX Extended regular expression.";
-
- delete[] full_pattern;
-}
-
-#elif GTEST_USES_SIMPLE_RE
-
-// Returns true iff ch appears anywhere in str (excluding the
-// terminating '\0' character).
-bool IsInSet(char ch, const char* str) {
- return ch != '\0' && strchr(str, ch) != NULL;
-}
-
-// Returns true iff ch belongs to the given classification. Unlike
-// similar functions in <ctype.h>, these aren't affected by the
-// current locale.
-bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
-bool IsAsciiPunct(char ch) {
- return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~");
-}
-bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
-bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
-bool IsAsciiWordChar(char ch) {
- return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||
- ('0' <= ch && ch <= '9') || ch == '_';
-}
-
-// Returns true iff "\\c" is a supported escape sequence.
-bool IsValidEscape(char c) {
- return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW"));
-}
-
-// Returns true iff the given atom (specified by escaped and pattern)
-// matches ch. The result is undefined if the atom is invalid.
-bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
- if (escaped) { // "\\p" where p is pattern_char.
- switch (pattern_char) {
- case 'd': return IsAsciiDigit(ch);
- case 'D': return !IsAsciiDigit(ch);
- case 'f': return ch == '\f';
- case 'n': return ch == '\n';
- case 'r': return ch == '\r';
- case 's': return IsAsciiWhiteSpace(ch);
- case 'S': return !IsAsciiWhiteSpace(ch);
- case 't': return ch == '\t';
- case 'v': return ch == '\v';
- case 'w': return IsAsciiWordChar(ch);
- case 'W': return !IsAsciiWordChar(ch);
- }
- return IsAsciiPunct(pattern_char) && pattern_char == ch;
- }
-
- return (pattern_char == '.' && ch != '\n') || pattern_char == ch;
-}
-
-// Helper function used by ValidateRegex() to format error messages.
-String FormatRegexSyntaxError(const char* regex, int index) {
- return (Message() << "Syntax error at index " << index
- << " in simple regular expression \"" << regex << "\": ").GetString();
-}
-
-// Generates non-fatal failures and returns false if regex is invalid;
-// otherwise returns true.
-bool ValidateRegex(const char* regex) {
- if (regex == NULL) {
- // TODO(wan@google.com): fix the source file location in the
- // assertion failures to match where the regex is used in user
- // code.
- ADD_FAILURE() << "NULL is not a valid simple regular expression.";
- return false;
- }
-
- bool is_valid = true;
-
- // True iff ?, *, or + can follow the previous atom.
- bool prev_repeatable = false;
- for (int i = 0; regex[i]; i++) {
- if (regex[i] == '\\') { // An escape sequence
- i++;
- if (regex[i] == '\0') {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
- << "'\\' cannot appear at the end.";
- return false;
- }
-
- if (!IsValidEscape(regex[i])) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
- << "invalid escape sequence \"\\" << regex[i] << "\".";
- is_valid = false;
- }
- prev_repeatable = true;
- } else { // Not an escape sequence.
- const char ch = regex[i];
-
- if (ch == '^' && i > 0) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'^' can only appear at the beginning.";
- is_valid = false;
- } else if (ch == '$' && regex[i + 1] != '\0') {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'$' can only appear at the end.";
- is_valid = false;
- } else if (IsInSet(ch, "()[]{}|")) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'" << ch << "' is unsupported.";
- is_valid = false;
- } else if (IsRepeat(ch) && !prev_repeatable) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'" << ch << "' can only follow a repeatable token.";
- is_valid = false;
- }
-
- prev_repeatable = !IsInSet(ch, "^$?*+");
- }
- }
-
- return is_valid;
-}
-
-// Matches a repeated regex atom followed by a valid simple regular
-// expression. The regex atom is defined as c if escaped is false,
-// or \c otherwise. repeat is the repetition meta character (?, *,
-// or +). The behavior is undefined if str contains too many
-// characters to be indexable by size_t, in which case the test will
-// probably time out anyway. We are fine with this limitation as
-// std::string has it too.
-bool MatchRepetitionAndRegexAtHead(
- bool escaped, char c, char repeat, const char* regex,
- const char* str) {
- const size_t min_count = (repeat == '+') ? 1 : 0;
- const size_t max_count = (repeat == '?') ? 1 :
- static_cast<size_t>(-1) - 1;
- // We cannot call numeric_limits::max() as it conflicts with the
- // max() macro on Windows.
-
- for (size_t i = 0; i <= max_count; ++i) {
- // We know that the atom matches each of the first i characters in str.
- if (i >= min_count && MatchRegexAtHead(regex, str + i)) {
- // We have enough matches at the head, and the tail matches too.
- // Since we only care about *whether* the pattern matches str
- // (as opposed to *how* it matches), there is no need to find a
- // greedy match.
- return true;
- }
- if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i]))
- return false;
- }
- return false;
-}
-
-// Returns true iff regex matches a prefix of str. regex must be a
-// valid simple regular expression and not start with "^", or the
-// result is undefined.
-bool MatchRegexAtHead(const char* regex, const char* str) {
- if (*regex == '\0') // An empty regex matches a prefix of anything.
- return true;
-
- // "$" only matches the end of a string. Note that regex being
- // valid guarantees that there's nothing after "$" in it.
- if (*regex == '$')
- return *str == '\0';
-
- // Is the first thing in regex an escape sequence?
- const bool escaped = *regex == '\\';
- if (escaped)
- ++regex;
- if (IsRepeat(regex[1])) {
- // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so
- // here's an indirect recursion. It terminates as the regex gets
- // shorter in each recursion.
- return MatchRepetitionAndRegexAtHead(
- escaped, regex[0], regex[1], regex + 2, str);
- } else {
- // regex isn't empty, isn't "$", and doesn't start with a
- // repetition. We match the first atom of regex with the first
- // character of str and recurse.
- return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) &&
- MatchRegexAtHead(regex + 1, str + 1);
- }
-}
-
-// Returns true iff regex matches any substring of str. regex must be
-// a valid simple regular expression, or the result is undefined.
-//
-// The algorithm is recursive, but the recursion depth doesn't exceed
-// the regex length, so we won't need to worry about running out of
-// stack space normally. In rare cases the time complexity can be
-// exponential with respect to the regex length + the string length,
-// but usually it's must faster (often close to linear).
-bool MatchRegexAnywhere(const char* regex, const char* str) {
- if (regex == NULL || str == NULL)
- return false;
-
- if (*regex == '^')
- return MatchRegexAtHead(regex + 1, str);
-
- // A successful match can be anywhere in str.
- do {
- if (MatchRegexAtHead(regex, str))
- return true;
- } while (*str++ != '\0');
- return false;
-}
-
-// Implements the RE class.
-
-RE::~RE() {
- free(const_cast<char*>(pattern_));
- free(const_cast<char*>(full_pattern_));
-}
-
-// Returns true iff regular expression re matches the entire str.
-bool RE::FullMatch(const char* str, const RE& re) {
- return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);
-}
-
-// Returns true iff regular expression re matches a substring of str
-// (including str itself).
-bool RE::PartialMatch(const char* str, const RE& re) {
- return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);
-}
-
-// Initializes an RE from its string representation.
-void RE::Init(const char* regex) {
- pattern_ = full_pattern_ = NULL;
- if (regex != NULL) {
- pattern_ = posix::StrDup(regex);
- }
-
- is_valid_ = ValidateRegex(regex);
- if (!is_valid_) {
- // No need to calculate the full pattern when the regex is invalid.
- return;
- }
-
- const size_t len = strlen(regex);
- // Reserves enough bytes to hold the regular expression used for a
- // full match: we need space to prepend a '^', append a '$', and
- // terminate the string with '\0'.
- char* buffer = static_cast<char*>(malloc(len + 3));
- full_pattern_ = buffer;
-
- if (*regex != '^')
- *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'.
-
- // We don't use snprintf or strncpy, as they trigger a warning when
- // compiled with VC++ 8.0.
- memcpy(buffer, regex, len);
- buffer += len;
-
- if (len == 0 || regex[len - 1] != '$')
- *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'.
-
- *buffer = '\0';
-}
-
-#endif // GTEST_USES_POSIX_RE
-
-const char kUnknownFile[] = "unknown file";
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {
- const char* const file_name = file == NULL ? kUnknownFile : file;
-
- if (line < 0) {
- return String::Format("%s:", file_name).c_str();
- }
-#ifdef _MSC_VER
- return String::Format("%s(%d):", file_name, line).c_str();
-#else
- return String::Format("%s:%d:", file_name, line).c_str();
-#endif // _MSC_VER
-}
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-// Note that FormatCompilerIndependentFileLocation() does NOT append colon
-// to the file location it produces, unlike FormatFileLocation().
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
- const char* file, int line) {
- const char* const file_name = file == NULL ? kUnknownFile : file;
-
- if (line < 0)
- return file_name;
- else
- return String::Format("%s:%d", file_name, line).c_str();
-}
-
-
-GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)
- : severity_(severity) {
- const char* const marker =
- severity == GTEST_INFO ? "[ INFO ]" :
- severity == GTEST_WARNING ? "[WARNING]" :
- severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]";
- GetStream() << ::std::endl << marker << " "
- << FormatFileLocation(file, line).c_str() << ": ";
-}
-
-// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
-GTestLog::~GTestLog() {
- GetStream() << ::std::endl;
- if (severity_ == GTEST_FATAL) {
- fflush(stderr);
- posix::Abort();
- }
-}
-// Disable Microsoft deprecation warnings for POSIX functions called from
-// this class (creat, dup, dup2, and close)
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4996)
-#endif // _MSC_VER
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Object that captures an output stream (stdout/stderr).
-class CapturedStream {
- public:
- // The ctor redirects the stream to a temporary file.
- CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
-
-# if GTEST_OS_WINDOWS
- char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT
- char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT
-
- ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
- const UINT success = ::GetTempFileNameA(temp_dir_path,
- "gtest_redir",
- 0, // Generate unique file name.
- temp_file_path);
- GTEST_CHECK_(success != 0)
- << "Unable to create a temporary file in " << temp_dir_path;
- const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
- GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
- << temp_file_path;
- filename_ = temp_file_path;
-# else
- // There's no guarantee that a test has write access to the
- // current directory, so we create the temporary file in the /tmp
- // directory instead.
- char name_template[] = "/tmp/captured_stream.XXXXXX";
- const int captured_fd = mkstemp(name_template);
- filename_ = name_template;
-# endif // GTEST_OS_WINDOWS
- fflush(NULL);
- dup2(captured_fd, fd_);
- close(captured_fd);
- }
-
- ~CapturedStream() {
- remove(filename_.c_str());
- }
-
- String GetCapturedString() {
- if (uncaptured_fd_ != -1) {
- // Restores the original stream.
- fflush(NULL);
- dup2(uncaptured_fd_, fd_);
- close(uncaptured_fd_);
- uncaptured_fd_ = -1;
- }
-
- FILE* const file = posix::FOpen(filename_.c_str(), "r");
- const String content = ReadEntireFile(file);
- posix::FClose(file);
- return content;
- }
-
- private:
- // Reads the entire content of a file as a String.
- static String ReadEntireFile(FILE* file);
-
- // Returns the size (in bytes) of a file.
- static size_t GetFileSize(FILE* file);
-
- const int fd_; // A stream to capture.
- int uncaptured_fd_;
- // Name of the temporary file holding the stderr output.
- ::std::string filename_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream);
-};
-
-// Returns the size (in bytes) of a file.
-size_t CapturedStream::GetFileSize(FILE* file) {
- fseek(file, 0, SEEK_END);
- return static_cast<size_t>(ftell(file));
-}
-
-// Reads the entire content of a file as a string.
-String CapturedStream::ReadEntireFile(FILE* file) {
- const size_t file_size = GetFileSize(file);
- char* const buffer = new char[file_size];
-
- size_t bytes_last_read = 0; // # of bytes read in the last fread()
- size_t bytes_read = 0; // # of bytes read so far
-
- fseek(file, 0, SEEK_SET);
-
- // Keeps reading the file until we cannot read further or the
- // pre-determined file size is reached.
- do {
- bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);
- bytes_read += bytes_last_read;
- } while (bytes_last_read > 0 && bytes_read < file_size);
-
- const String content(buffer, bytes_read);
- delete[] buffer;
-
- return content;
-}
-
-# ifdef _MSC_VER
-# pragma warning(pop)
-# endif // _MSC_VER
-
-static CapturedStream* g_captured_stderr = NULL;
-static CapturedStream* g_captured_stdout = NULL;
-
-// Starts capturing an output stream (stdout/stderr).
-void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) {
- if (*stream != NULL) {
- GTEST_LOG_(FATAL) << "Only one " << stream_name
- << " capturer can exist at a time.";
- }
- *stream = new CapturedStream(fd);
-}
-
-// Stops capturing the output stream and returns the captured string.
-String GetCapturedStream(CapturedStream** captured_stream) {
- const String content = (*captured_stream)->GetCapturedString();
-
- delete *captured_stream;
- *captured_stream = NULL;
-
- return content;
-}
-
-// Starts capturing stdout.
-void CaptureStdout() {
- CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout);
-}
-
-// Starts capturing stderr.
-void CaptureStderr() {
- CaptureStream(kStdErrFileno, "stderr", &g_captured_stderr);
-}
-
-// Stops capturing stdout and returns the captured string.
-String GetCapturedStdout() { return GetCapturedStream(&g_captured_stdout); }
-
-// Stops capturing stderr and returns the captured string.
-String GetCapturedStderr() { return GetCapturedStream(&g_captured_stderr); }
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-#if GTEST_HAS_DEATH_TEST
-
-// A copy of all command line arguments. Set by InitGoogleTest().
-::std::vector<String> g_argvs;
-
-// Returns the command line as a vector of strings.
-const ::std::vector<String>& GetArgvs() { return g_argvs; }
-
-#endif // GTEST_HAS_DEATH_TEST
-
-#if GTEST_OS_WINDOWS_MOBILE
-namespace posix {
-void Abort() {
- DebugBreak();
- TerminateProcess(GetCurrentProcess(), 1);
-}
-} // namespace posix
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Returns the name of the environment variable corresponding to the
-// given flag. For example, FlagToEnvVar("foo") will return
-// "GTEST_FOO" in the open-source version.
-static String FlagToEnvVar(const char* flag) {
- const String full_flag =
- (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
-
- Message env_var;
- for (size_t i = 0; i != full_flag.length(); i++) {
- env_var << ToUpper(full_flag.c_str()[i]);
- }
-
- return env_var.GetString();
-}
-
-// Parses 'str' for a 32-bit signed integer. If successful, writes
-// the result to *value and returns true; otherwise leaves *value
-// unchanged and returns false.
-bool ParseInt32(const Message& src_text, const char* str, Int32* value) {
- // Parses the environment variable as a decimal integer.
- char* end = NULL;
- const long long_value = strtol(str, &end, 10); // NOLINT
-
- // Has strtol() consumed all characters in the string?
- if (*end != '\0') {
- // No - an invalid character was encountered.
- Message msg;
- msg << "WARNING: " << src_text
- << " is expected to be a 32-bit integer, but actually"
- << " has value \"" << str << "\".\n";
- printf("%s", msg.GetString().c_str());
- fflush(stdout);
- return false;
- }
-
- // Is the parsed value in the range of an Int32?
- const Int32 result = static_cast<Int32>(long_value);
- if (long_value == LONG_MAX || long_value == LONG_MIN ||
- // The parsed value overflows as a long. (strtol() returns
- // LONG_MAX or LONG_MIN when the input overflows.)
- result != long_value
- // The parsed value overflows as an Int32.
- ) {
- Message msg;
- msg << "WARNING: " << src_text
- << " is expected to be a 32-bit integer, but actually"
- << " has value " << str << ", which overflows.\n";
- printf("%s", msg.GetString().c_str());
- fflush(stdout);
- return false;
- }
-
- *value = result;
- return true;
-}
-
-// Reads and returns the Boolean environment variable corresponding to
-// the given flag; if it's not set, returns default_value.
-//
-// The value is considered true iff it's not "0".
-bool BoolFromGTestEnv(const char* flag, bool default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const string_value = posix::GetEnv(env_var.c_str());
- return string_value == NULL ?
- default_value : strcmp(string_value, "0") != 0;
-}
-
-// Reads and returns a 32-bit integer stored in the environment
-// variable corresponding to the given flag; if it isn't set or
-// doesn't represent a valid 32-bit integer, returns default_value.
-Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const string_value = posix::GetEnv(env_var.c_str());
- if (string_value == NULL) {
- // The environment variable is not set.
- return default_value;
- }
-
- Int32 result = default_value;
- if (!ParseInt32(Message() << "Environment variable " << env_var,
- string_value, &result)) {
- printf("The default value %s is used.\n",
- (Message() << default_value).GetString().c_str());
- fflush(stdout);
- return default_value;
- }
-
- return result;
-}
-
-// Reads and returns the string environment variable corresponding to
-// the given flag; if it's not set, returns default_value.
-const char* StringFromGTestEnv(const char* flag, const char* default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const value = posix::GetEnv(env_var.c_str());
- return value == NULL ? default_value : value;
-}
-
-} // namespace internal
-} // namespace testing
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// It uses the << operator when possible, and prints the bytes in the
-// object otherwise. A user can override its behavior for a class
-// type Foo by defining either operator<<(::std::ostream&, const Foo&)
-// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that
-// defines Foo.
-
-#include <ctype.h>
-#include <stdio.h>
-#include <ostream> // NOLINT
-#include <string>
-
-namespace testing {
-
-namespace {
-
-using ::std::ostream;
-
-#if GTEST_OS_WINDOWS_MOBILE // Windows CE does not define _snprintf_s.
-# define snprintf _snprintf
-#elif _MSC_VER >= 1400 // VC 8.0 and later deprecate snprintf and _snprintf.
-# define snprintf _snprintf_s
-#elif _MSC_VER
-# define snprintf _snprintf
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Prints a segment of bytes in the given object.
-void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,
- size_t count, ostream* os) {
- char text[5] = "";
- for (size_t i = 0; i != count; i++) {
- const size_t j = start + i;
- if (i != 0) {
- // Organizes the bytes into groups of 2 for easy parsing by
- // human.
- if ((j % 2) == 0)
- *os << ' ';
- else
- *os << '-';
- }
- snprintf(text, sizeof(text), "%02X", obj_bytes[j]);
- *os << text;
- }
-}
-
-// Prints the bytes in the given value to the given ostream.
-void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
- ostream* os) {
- // Tells the user how big the object is.
- *os << count << "-byte object <";
-
- const size_t kThreshold = 132;
- const size_t kChunkSize = 64;
- // If the object size is bigger than kThreshold, we'll have to omit
- // some details by printing only the first and the last kChunkSize
- // bytes.
- // TODO(wan): let the user control the threshold using a flag.
- if (count < kThreshold) {
- PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
- } else {
- PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
- *os << " ... ";
- // Rounds up to 2-byte boundary.
- const size_t resume_pos = (count - kChunkSize + 1)/2*2;
- PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
- }
- *os << ">";
-}
-
-} // namespace
-
-namespace internal2 {
-
-// Delegates to PrintBytesInObjectToImpl() to print the bytes in the
-// given object. The delegation simplifies the implementation, which
-// uses the << operator and thus is easier done outside of the
-// ::testing::internal namespace, which contains a << operator that
-// sometimes conflicts with the one in STL.
-void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,
- ostream* os) {
- PrintBytesInObjectToImpl(obj_bytes, count, os);
-}
-
-} // namespace internal2
-
-namespace internal {
-
-// Depending on the value of a char (or wchar_t), we print it in one
-// of three formats:
-// - as is if it's a printable ASCII (e.g. 'a', '2', ' '),
-// - as a hexidecimal escape sequence (e.g. '\x7F'), or
-// - as a special escape sequence (e.g. '\r', '\n').
-enum CharFormat {
- kAsIs,
- kHexEscape,
- kSpecialEscape
-};
-
-// Returns true if c is a printable ASCII character. We test the
-// value of c directly instead of calling isprint(), which is buggy on
-// Windows Mobile.
-inline bool IsPrintableAscii(wchar_t c) {
- return 0x20 <= c && c <= 0x7E;
-}
-
-// Prints a wide or narrow char c as a character literal without the
-// quotes, escaping it when necessary; returns how c was formatted.
-// The template argument UnsignedChar is the unsigned version of Char,
-// which is the type of c.
-template <typename UnsignedChar, typename Char>
-static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
- switch (static_cast<wchar_t>(c)) {
- case L'\0':
- *os << "\\0";
- break;
- case L'\'':
- *os << "\\'";
- break;
- case L'\\':
- *os << "\\\\";
- break;
- case L'\a':
- *os << "\\a";
- break;
- case L'\b':
- *os << "\\b";
- break;
- case L'\f':
- *os << "\\f";
- break;
- case L'\n':
- *os << "\\n";
- break;
- case L'\r':
- *os << "\\r";
- break;
- case L'\t':
- *os << "\\t";
- break;
- case L'\v':
- *os << "\\v";
- break;
- default:
- if (IsPrintableAscii(c)) {
- *os << static_cast<char>(c);
- return kAsIs;
- } else {
- *os << String::Format("\\x%X", static_cast<UnsignedChar>(c));
- return kHexEscape;
- }
- }
- return kSpecialEscape;
-}
-
-// Prints a char c as if it's part of a string literal, escaping it when
-// necessary; returns how c was formatted.
-static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
- switch (c) {
- case L'\'':
- *os << "'";
- return kAsIs;
- case L'"':
- *os << "\\\"";
- return kSpecialEscape;
- default:
- return PrintAsCharLiteralTo<wchar_t>(c, os);
- }
-}
-
-// Prints a char c as if it's part of a string literal, escaping it when
-// necessary; returns how c was formatted.
-static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
- return PrintAsWideStringLiteralTo(static_cast<unsigned char>(c), os);
-}
-
-// Prints a wide or narrow character c and its code. '\0' is printed
-// as "'\\0'", other unprintable characters are also properly escaped
-// using the standard C++ escape sequence. The template argument
-// UnsignedChar is the unsigned version of Char, which is the type of c.
-template <typename UnsignedChar, typename Char>
-void PrintCharAndCodeTo(Char c, ostream* os) {
- // First, print c as a literal in the most readable form we can find.
- *os << ((sizeof(c) > 1) ? "L'" : "'");
- const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
- *os << "'";
-
- // To aid user debugging, we also print c's code in decimal, unless
- // it's 0 (in which case c was printed as '\\0', making the code
- // obvious).
- if (c == 0)
- return;
- *os << " (" << String::Format("%d", c).c_str();
-
- // For more convenience, we print c's code again in hexidecimal,
- // unless c was already printed in the form '\x##' or the code is in
- // [1, 9].
- if (format == kHexEscape || (1 <= c && c <= 9)) {
- // Do nothing.
- } else {
- *os << String::Format(", 0x%X",
- static_cast<UnsignedChar>(c)).c_str();
- }
- *os << ")";
-}
-
-void PrintTo(unsigned char c, ::std::ostream* os) {
- PrintCharAndCodeTo<unsigned char>(c, os);
-}
-void PrintTo(signed char c, ::std::ostream* os) {
- PrintCharAndCodeTo<unsigned char>(c, os);
-}
-
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its code. L'\0' is printed as "L'\\0'".
-void PrintTo(wchar_t wc, ostream* os) {
- PrintCharAndCodeTo<wchar_t>(wc, os);
-}
-
-// Prints the given array of characters to the ostream.
-// The array starts at *begin, the length is len, it may include '\0' characters
-// and may not be null-terminated.
-static void PrintCharsAsStringTo(const char* begin, size_t len, ostream* os) {
- *os << "\"";
- bool is_previous_hex = false;
- for (size_t index = 0; index < len; ++index) {
- const char cur = begin[index];
- if (is_previous_hex && IsXDigit(cur)) {
- // Previous character is of '\x..' form and this character can be
- // interpreted as another hexadecimal digit in its number. Break string to
- // disambiguate.
- *os << "\" \"";
- }
- is_previous_hex = PrintAsNarrowStringLiteralTo(cur, os) == kHexEscape;
- }
- *os << "\"";
-}
-
-// Prints a (const) char array of 'len' elements, starting at address 'begin'.
-void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
- PrintCharsAsStringTo(begin, len, os);
-}
-
-// Prints the given array of wide characters to the ostream.
-// The array starts at *begin, the length is len, it may include L'\0'
-// characters and may not be null-terminated.
-static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
- ostream* os) {
- *os << "L\"";
- bool is_previous_hex = false;
- for (size_t index = 0; index < len; ++index) {
- const wchar_t cur = begin[index];
- if (is_previous_hex && isascii(cur) && IsXDigit(static_cast<char>(cur))) {
- // Previous character is of '\x..' form and this character can be
- // interpreted as another hexadecimal digit in its number. Break string to
- // disambiguate.
- *os << "\" L\"";
- }
- is_previous_hex = PrintAsWideStringLiteralTo(cur, os) == kHexEscape;
- }
- *os << "\"";
-}
-
-// Prints the given C string to the ostream.
-void PrintTo(const char* s, ostream* os) {
- if (s == NULL) {
- *os << "NULL";
- } else {
- *os << ImplicitCast_<const void*>(s) << " pointing to ";
- PrintCharsAsStringTo(s, strlen(s), os);
- }
-}
-
-// MSVC compiler can be configured to define whar_t as a typedef
-// of unsigned short. Defining an overload for const wchar_t* in that case
-// would cause pointers to unsigned shorts be printed as wide strings,
-// possibly accessing more memory than intended and causing invalid
-// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when
-// wchar_t is implemented as a native type.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Prints the given wide C string to the ostream.
-void PrintTo(const wchar_t* s, ostream* os) {
- if (s == NULL) {
- *os << "NULL";
- } else {
- *os << ImplicitCast_<const void*>(s) << " pointing to ";
- PrintWideCharsAsStringTo(s, wcslen(s), os);
- }
-}
-#endif // wchar_t is native
-
-// Prints a ::string object.
-#if GTEST_HAS_GLOBAL_STRING
-void PrintStringTo(const ::string& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-void PrintStringTo(const ::std::string& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-
-// Prints a ::wstring object.
-#if GTEST_HAS_GLOBAL_WSTRING
-void PrintWideStringTo(const ::wstring& s, ostream* os) {
- PrintWideCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
- PrintWideCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-} // namespace internal
-
-} // namespace testing
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// The Google C++ Testing Framework (Google Test)
-
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-using internal::GetUnitTestImpl;
-
-// Gets the summary of the failure message by omitting the stack trace
-// in it.
-internal::String TestPartResult::ExtractSummary(const char* message) {
- const char* const stack_trace = strstr(message, internal::kStackTraceMarker);
- return stack_trace == NULL ? internal::String(message) :
- internal::String(message, stack_trace - message);
-}
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result) {
- return os
- << result.file_name() << ":" << result.line_number() << ": "
- << (result.type() == TestPartResult::kSuccess ? "Success" :
- result.type() == TestPartResult::kFatalFailure ? "Fatal failure" :
- "Non-fatal failure") << ":\n"
- << result.message() << std::endl;
-}
-
-// Appends a TestPartResult to the array.
-void TestPartResultArray::Append(const TestPartResult& result) {
- array_.push_back(result);
-}
-
-// Returns the TestPartResult at the given index (0-based).
-const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const {
- if (index < 0 || index >= size()) {
- printf("\nInvalid index (%d) into TestPartResultArray.\n", index);
- internal::posix::Abort();
- }
-
- return array_[index];
-}
-
-// Returns the number of TestPartResult objects in the array.
-int TestPartResultArray::size() const {
- return static_cast<int>(array_.size());
-}
-
-namespace internal {
-
-HasNewFatalFailureHelper::HasNewFatalFailureHelper()
- : has_new_fatal_failure_(false),
- original_reporter_(GetUnitTestImpl()->
- GetTestPartResultReporterForCurrentThread()) {
- GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);
-}
-
-HasNewFatalFailureHelper::~HasNewFatalFailureHelper() {
- GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(
- original_reporter_);
-}
-
-void HasNewFatalFailureHelper::ReportTestPartResult(
- const TestPartResult& result) {
- if (result.fatally_failed())
- has_new_fatal_failure_ = true;
- original_reporter_->ReportTestPartResult(result);
-}
-
-} // namespace internal
-
-} // namespace testing
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-namespace testing {
-namespace internal {
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// Skips to the first non-space char in str. Returns an empty string if str
-// contains only whitespace characters.
-static const char* SkipSpaces(const char* str) {
- while (IsSpace(*str))
- str++;
- return str;
-}
-
-// Verifies that registered_tests match the test names in
-// defined_test_names_; returns registered_tests if successful, or
-// aborts the program otherwise.
-const char* TypedTestCasePState::VerifyRegisteredTestNames(
- const char* file, int line, const char* registered_tests) {
- typedef ::std::set<const char*>::const_iterator DefinedTestIter;
- registered_ = true;
-
- // Skip initial whitespace in registered_tests since some
- // preprocessors prefix stringizied literals with whitespace.
- registered_tests = SkipSpaces(registered_tests);
-
- Message errors;
- ::std::set<String> tests;
- for (const char* names = registered_tests; names != NULL;
- names = SkipComma(names)) {
- const String name = GetPrefixUntilComma(names);
- if (tests.count(name) != 0) {
- errors << "Test " << name << " is listed more than once.\n";
- continue;
- }
-
- bool found = false;
- for (DefinedTestIter it = defined_test_names_.begin();
- it != defined_test_names_.end();
- ++it) {
- if (name == *it) {
- found = true;
- break;
- }
- }
-
- if (found) {
- tests.insert(name);
- } else {
- errors << "No test named " << name
- << " can be found in this test case.\n";
- }
- }
-
- for (DefinedTestIter it = defined_test_names_.begin();
- it != defined_test_names_.end();
- ++it) {
- if (tests.count(*it) == 0) {
- errors << "You forgot to list test " << *it << ".\n";
- }
- }
-
- const String& errors_str = errors.GetString();
- if (errors_str != "") {
- fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
- errors_str.c_str());
- fflush(stderr);
- posix::Abort();
- }
-
- return registered_tests;
-}
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest.h
deleted file mode 100644
index 3143bd679..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest.h
+++ /dev/null
@@ -1,19537 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the public API for Google Test. It should be
-// included by any test program that uses Google Test.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
-// program!
-//
-// Acknowledgment: Google Test borrowed the idea of automatic test
-// registration from Barthelemy Dagenais' (barthelemy@prologique.com)
-// easyUnit framework.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_H_
-
-#include <limits>
-#include <vector>
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file declares functions and macros used internally by
-// Google Test. They are subject to change without notice.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan)
-//
-// Low-level types and utilities for porting Google Test to various
-// platforms. They are subject to change without notice. DO NOT USE
-// THEM IN USER CODE.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-
-// The user can define the following macros in the build script to
-// control Google Test's behavior. If the user doesn't define a macro
-// in this list, Google Test will define it.
-//
-// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2)
-// is/isn't available.
-// GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions
-// are enabled.
-// GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string
-// is/isn't available (some systems define
-// ::string, which is different to std::string).
-// GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string
-// is/isn't available (some systems define
-// ::wstring, which is different to std::wstring).
-// GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular
-// expressions are/aren't available.
-// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h>
-// is/isn't available.
-// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't
-// enabled.
-// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that
-// std::wstring does/doesn't work (Google Test can
-// be used where std::wstring is unavailable).
-// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple
-// is/isn't available.
-// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the
-// compiler supports Microsoft's "Structured
-// Exception Handling".
-// GTEST_HAS_STREAM_REDIRECTION
-// - Define it to 1/0 to indicate whether the
-// platform supports I/O stream redirection using
-// dup() and dup2().
-// GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google
-// Test's own tr1 tuple implementation should be
-// used. Unused when the user sets
-// GTEST_HAS_TR1_TUPLE to 0.
-// GTEST_LINKED_AS_SHARED_LIBRARY
-// - Define to 1 when compiling tests that use
-// Google Test as a shared library (known as
-// DLL on Windows).
-// GTEST_CREATE_SHARED_LIBRARY
-// - Define to 1 when compiling Google Test itself
-// as a shared library.
-
-// This header defines the following utilities:
-//
-// Macros indicating the current platform (defined to 1 if compiled on
-// the given platform; otherwise undefined):
-// GTEST_OS_AIX - IBM AIX
-// GTEST_OS_CYGWIN - Cygwin
-// GTEST_OS_HPUX - HP-UX
-// GTEST_OS_LINUX - Linux
-// GTEST_OS_LINUX_ANDROID - Google Android
-// GTEST_OS_MAC - Mac OS X
-// GTEST_OS_NACL - Google Native Client (NaCl)
-// GTEST_OS_SOLARIS - Sun Solaris
-// GTEST_OS_SYMBIAN - Symbian
-// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
-// GTEST_OS_WINDOWS_DESKTOP - Windows Desktop
-// GTEST_OS_WINDOWS_MINGW - MinGW
-// GTEST_OS_WINDOWS_MOBILE - Windows Mobile
-// GTEST_OS_ZOS - z/OS
-//
-// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the
-// most stable support. Since core members of the Google Test project
-// don't have access to other platforms, support for them may be less
-// stable. If you notice any problems on your platform, please notify
-// googletestframework@googlegroups.com (patches for fixing them are
-// even more welcome!).
-//
-// Note that it is possible that none of the GTEST_OS_* macros are defined.
-//
-// Macros indicating available Google Test features (defined to 1 if
-// the corresponding feature is supported; otherwise undefined):
-// GTEST_HAS_COMBINE - the Combine() function (for value-parameterized
-// tests)
-// GTEST_HAS_DEATH_TEST - death tests
-// GTEST_HAS_PARAM_TEST - value-parameterized tests
-// GTEST_HAS_TYPED_TEST - typed tests
-// GTEST_HAS_TYPED_TEST_P - type-parameterized tests
-// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
-// GTEST_HAS_POSIX_RE (see above) which users can
-// define themselves.
-// GTEST_USES_SIMPLE_RE - our own simple regex is used;
-// the above two are mutually exclusive.
-// GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().
-//
-// Macros for basic C++ coding:
-// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
-// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a
-// variable don't have to be used.
-// GTEST_DISALLOW_ASSIGN_ - disables operator=.
-// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
-// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
-//
-// Synchronization:
-// Mutex, MutexLock, ThreadLocal, GetThreadCount()
-// - synchronization primitives.
-// GTEST_IS_THREADSAFE - defined to 1 to indicate that the above
-// synchronization primitives have real implementations
-// and Google Test is thread-safe; or 0 otherwise.
-//
-// Template meta programming:
-// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only.
-// IteratorTraits - partial implementation of std::iterator_traits, which
-// is not available in libCstd when compiled with Sun C++.
-//
-// Smart pointers:
-// scoped_ptr - as in TR2.
-//
-// Regular expressions:
-// RE - a simple regular expression class using the POSIX
-// Extended Regular Expression syntax on UNIX-like
-// platforms, or a reduced regular exception syntax on
-// other platforms, including Windows.
-//
-// Logging:
-// GTEST_LOG_() - logs messages at the specified severity level.
-// LogToStderr() - directs all log messages to stderr.
-// FlushInfoLog() - flushes informational log messages.
-//
-// Stdout and stderr capturing:
-// CaptureStdout() - starts capturing stdout.
-// GetCapturedStdout() - stops capturing stdout and returns the captured
-// string.
-// CaptureStderr() - starts capturing stderr.
-// GetCapturedStderr() - stops capturing stderr and returns the captured
-// string.
-//
-// Integer types:
-// TypeWithSize - maps an integer to a int type.
-// Int32, UInt32, Int64, UInt64, TimeInMillis
-// - integers of known sizes.
-// BiggestInt - the biggest signed integer type.
-//
-// Command-line utilities:
-// GTEST_FLAG() - references a flag.
-// GTEST_DECLARE_*() - declares a flag.
-// GTEST_DEFINE_*() - defines a flag.
-// GetArgvs() - returns the command line as a vector of strings.
-//
-// Environment variable utilities:
-// GetEnv() - gets the value of an environment variable.
-// BoolFromGTestEnv() - parses a bool environment variable.
-// Int32FromGTestEnv() - parses an Int32 environment variable.
-// StringFromGTestEnv() - parses a string environment variable.
-
-#include <ctype.h> // for isspace, etc
-#include <stddef.h> // for ptrdiff_t
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#ifndef _WIN32_WCE
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif // !_WIN32_WCE
-
-#include <iostream> // NOLINT
-#include <sstream> // NOLINT
-#include <string> // NOLINT
-
-#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
-#define GTEST_FLAG_PREFIX_ "gtest_"
-#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
-#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
-#define GTEST_NAME_ "Google Test"
-#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
-
-// Determines the version of gcc that is used to compile this.
-#ifdef __GNUC__
-// 40302 means version 4.3.2.
-# define GTEST_GCC_VER_ \
- (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
-#endif // __GNUC__
-
-// Determines the platform on which Google Test is compiled.
-#ifdef __CYGWIN__
-# define GTEST_OS_CYGWIN 1
-#elif defined __SYMBIAN32__
-# define GTEST_OS_SYMBIAN 1
-#elif defined _WIN32
-# define GTEST_OS_WINDOWS 1
-# ifdef _WIN32_WCE
-# define GTEST_OS_WINDOWS_MOBILE 1
-# elif defined(__MINGW__) || defined(__MINGW32__)
-# define GTEST_OS_WINDOWS_MINGW 1
-# else
-# define GTEST_OS_WINDOWS_DESKTOP 1
-# endif // _WIN32_WCE
-#elif defined __APPLE__
-# define GTEST_OS_MAC 1
-#elif defined __linux__
-# define GTEST_OS_LINUX 1
-# ifdef ANDROID
-# define GTEST_OS_LINUX_ANDROID 1
-# endif // ANDROID
-#elif defined __MVS__
-# define GTEST_OS_ZOS 1
-#elif defined(__sun) && defined(__SVR4)
-# define GTEST_OS_SOLARIS 1
-#elif defined(_AIX)
-# define GTEST_OS_AIX 1
-#elif defined(__hpux)
-# define GTEST_OS_HPUX 1
-#elif defined __native_client__
-# define GTEST_OS_NACL 1
-#endif // __CYGWIN__
-
-// Brings in definitions for functions used in the testing::internal::posix
-// namespace (read, write, close, chdir, isatty, stat). We do not currently
-// use them on Windows Mobile.
-#if !GTEST_OS_WINDOWS
-// This assumes that non-Windows OSes provide unistd.h. For OSes where this
-// is not the case, we need to include headers that provide the functions
-// mentioned above.
-# include <unistd.h>
-# if !GTEST_OS_NACL
-// TODO(vladl@google.com): Remove this condition when Native Client SDK adds
-// strings.h (tracked in
-// http://code.google.com/p/nativeclient/issues/detail?id=1175).
-# include <strings.h> // Native Client doesn't provide strings.h.
-# endif
-#elif !GTEST_OS_WINDOWS_MOBILE
-# include <direct.h>
-# include <io.h>
-#endif
-
-// Defines this to true iff Google Test can use POSIX regular expressions.
-#ifndef GTEST_HAS_POSIX_RE
-# define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
-#endif
-
-#if GTEST_HAS_POSIX_RE
-
-// On some platforms, <regex.h> needs someone to define size_t, and
-// won't compile otherwise. We can #include it here as we already
-// included <stdlib.h>, which is guaranteed to define size_t through
-// <stddef.h>.
-# include <regex.h> // NOLINT
-
-# define GTEST_USES_POSIX_RE 1
-
-#elif GTEST_OS_WINDOWS
-
-// <regex.h> is not available on Windows. Use our own simple regex
-// implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#else
-
-// <regex.h> may not be available on this platform. Use our own
-// simple regex implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#endif // GTEST_HAS_POSIX_RE
-
-#ifndef GTEST_HAS_EXCEPTIONS
-// The user didn't tell us whether exceptions are enabled, so we need
-// to figure it out.
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
-// macro to enable exceptions, so we'll do the same.
-// Assumes that exceptions are enabled by default.
-# ifndef _HAS_EXCEPTIONS
-# define _HAS_EXCEPTIONS 1
-# endif // _HAS_EXCEPTIONS
-# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
-# elif defined(__GNUC__) && __EXCEPTIONS
-// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__SUNPRO_CC)
-// Sun Pro CC supports exceptions. However, there is no compile-time way of
-// detecting whether they are enabled or not. Therefore, we assume that
-// they are enabled unless the user tells us otherwise.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__IBMCPP__) && __EXCEPTIONS
-// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__HP_aCC)
-// Exception handling is in effect by default in HP aCC compiler. It has to
-// be turned of by +noeh compiler option if desired.
-# define GTEST_HAS_EXCEPTIONS 1
-# else
-// For other compilers, we assume exceptions are disabled to be
-// conservative.
-# define GTEST_HAS_EXCEPTIONS 0
-# endif // defined(_MSC_VER) || defined(__BORLANDC__)
-#endif // GTEST_HAS_EXCEPTIONS
-
-#if !defined(GTEST_HAS_STD_STRING)
-// Even though we don't use this macro any longer, we keep it in case
-// some clients still depend on it.
-# define GTEST_HAS_STD_STRING 1
-#elif !GTEST_HAS_STD_STRING
-// The user told us that ::std::string isn't available.
-# error "Google Test cannot be used where ::std::string isn't available."
-#endif // !defined(GTEST_HAS_STD_STRING)
-
-#ifndef GTEST_HAS_GLOBAL_STRING
-// The user didn't tell us whether ::string is available, so we need
-// to figure it out.
-
-# define GTEST_HAS_GLOBAL_STRING 0
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#ifndef GTEST_HAS_STD_WSTRING
-// The user didn't tell us whether ::std::wstring is available, so we need
-// to figure it out.
-// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
-// is available.
-
-// Cygwin 1.7 and below doesn't support ::std::wstring.
-// Solaris' libc++ doesn't support it either. Android has
-// no support for it at least as recent as Froyo (2.2).
-# define GTEST_HAS_STD_WSTRING \
- (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
-
-#endif // GTEST_HAS_STD_WSTRING
-
-#ifndef GTEST_HAS_GLOBAL_WSTRING
-// The user didn't tell us whether ::wstring is available, so we need
-// to figure it out.
-# define GTEST_HAS_GLOBAL_WSTRING \
- (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// Determines whether RTTI is available.
-#ifndef GTEST_HAS_RTTI
-// The user didn't tell us whether RTTI is enabled, so we need to
-// figure it out.
-
-# ifdef _MSC_VER
-
-# ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled.
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif
-
-// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
-# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
-
-# ifdef __GXX_RTTI
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif // __GXX_RTTI
-
-// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
-// both the typeid and dynamic_cast features are present.
-# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
-
-# ifdef __RTTI_ALL__
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif
-
-# else
-
-// For all other compilers, we assume RTTI is enabled.
-# define GTEST_HAS_RTTI 1
-
-# endif // _MSC_VER
-
-#endif // GTEST_HAS_RTTI
-
-// It's this header's responsibility to #include <typeinfo> when RTTI
-// is enabled.
-#if GTEST_HAS_RTTI
-# include <typeinfo>
-#endif
-
-// Determines whether Google Test can use the pthreads library.
-#ifndef GTEST_HAS_PTHREAD
-// The user didn't tell us explicitly, so we assume pthreads support is
-// available on Linux and Mac.
-//
-// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
-// to your compiler flags.
-# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX)
-#endif // GTEST_HAS_PTHREAD
-
-#if GTEST_HAS_PTHREAD
-// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
-// true.
-# include <pthread.h> // NOLINT
-
-// For timespec and nanosleep, used below.
-# include <time.h> // NOLINT
-#endif
-
-// Determines whether Google Test can use tr1/tuple. You can define
-// this macro to 0 to prevent Google Test from using tuple (any
-// feature depending on tuple with be disabled in this mode).
-#ifndef GTEST_HAS_TR1_TUPLE
-// The user didn't tell us not to do it, so we assume it's OK.
-# define GTEST_HAS_TR1_TUPLE 1
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Determines whether Google Test's own tr1 tuple implementation
-// should be used.
-#ifndef GTEST_USE_OWN_TR1_TUPLE
-// The user didn't tell us, so we need to figure it out.
-
-// We use our own TR1 tuple if we aren't sure the user has an
-// implementation of it already. At this time, GCC 4.0.0+ and MSVC
-// 2010 are the only mainstream compilers that come with a TR1 tuple
-// implementation. NVIDIA's CUDA NVCC compiler pretends to be GCC by
-// defining __GNUC__ and friends, but cannot compile GCC's tuple
-// implementation. MSVC 2008 (9.0) provides TR1 tuple in a 323 MB
-// Feature Pack download, which we cannot assume the user has.
-# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000)) \
- || _MSC_VER >= 1600
-# define GTEST_USE_OWN_TR1_TUPLE 0
-# else
-# define GTEST_USE_OWN_TR1_TUPLE 1
-# endif
-
-#endif // GTEST_USE_OWN_TR1_TUPLE
-
-// To avoid conditional compilation everywhere, we make it
-// gtest-port.h's responsibility to #include the header implementing
-// tr1/tuple.
-#if GTEST_HAS_TR1_TUPLE
-
-# if GTEST_USE_OWN_TR1_TUPLE
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2009 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements a subset of TR1 tuple needed by Google Test and Google Mock.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-
-#include <utility> // For ::std::pair.
-
-// The compiler used in Symbian has a bug that prevents us from declaring the
-// tuple template as a friend (it complains that tuple is redefined). This
-// hack bypasses the bug by declaring the members that should otherwise be
-// private as public.
-// Sun Studio versions < 12 also have the above bug.
-#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:
-#else
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \
- template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
- private:
-#endif
-
-// GTEST_n_TUPLE_(T) is the type of an n-tuple.
-#define GTEST_0_TUPLE_(T) tuple<>
-#define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
- void, void, void>
-#define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
- void, void, void>
-#define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
- void, void, void>
-#define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
- void, void, void>
-#define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
- void, void, void>
-#define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
- void, void, void>
-#define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- void, void, void>
-#define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, void, void>
-#define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, T##8, void>
-#define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, T##8, T##9>
-
-// GTEST_n_TYPENAMES_(T) declares a list of n typenames.
-#define GTEST_0_TYPENAMES_(T)
-#define GTEST_1_TYPENAMES_(T) typename T##0
-#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1
-#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2
-#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3
-#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4
-#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5
-#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6
-#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, typename T##7
-#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, \
- typename T##7, typename T##8
-#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, \
- typename T##7, typename T##8, typename T##9
-
-// In theory, defining stuff in the ::std namespace is undefined
-// behavior. We can do this as we are playing the role of a standard
-// library vendor.
-namespace std {
-namespace tr1 {
-
-template <typename T0 = void, typename T1 = void, typename T2 = void,
- typename T3 = void, typename T4 = void, typename T5 = void,
- typename T6 = void, typename T7 = void, typename T8 = void,
- typename T9 = void>
-class tuple;
-
-// Anything in namespace gtest_internal is Google Test's INTERNAL
-// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.
-namespace gtest_internal {
-
-// ByRef<T>::type is T if T is a reference; otherwise it's const T&.
-template <typename T>
-struct ByRef { typedef const T& type; }; // NOLINT
-template <typename T>
-struct ByRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for ByRef.
-#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
-
-// AddRef<T>::type is T if T is a reference; otherwise it's T&. This
-// is the same as tr1::add_reference<T>::type.
-template <typename T>
-struct AddRef { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for AddRef.
-#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type
-
-// A helper for implementing get<k>().
-template <int k> class Get;
-
-// A helper for implementing tuple_element<k, T>. kIndexValid is true
-// iff k < the number of fields in tuple type T.
-template <bool kIndexValid, int kIndex, class Tuple>
-struct TupleElement;
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 0, GTEST_10_TUPLE_(T)> { typedef T0 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 1, GTEST_10_TUPLE_(T)> { typedef T1 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 2, GTEST_10_TUPLE_(T)> { typedef T2 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 3, GTEST_10_TUPLE_(T)> { typedef T3 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 4, GTEST_10_TUPLE_(T)> { typedef T4 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 5, GTEST_10_TUPLE_(T)> { typedef T5 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 6, GTEST_10_TUPLE_(T)> { typedef T6 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 7, GTEST_10_TUPLE_(T)> { typedef T7 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 8, GTEST_10_TUPLE_(T)> { typedef T8 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 9, GTEST_10_TUPLE_(T)> { typedef T9 type; };
-
-} // namespace gtest_internal
-
-template <>
-class tuple<> {
- public:
- tuple() {}
- tuple(const tuple& /* t */) {}
- tuple& operator=(const tuple& /* t */) { return *this; }
-};
-
-template <GTEST_1_TYPENAMES_(T)>
-class GTEST_1_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
-
- tuple(const tuple& t) : f0_(t.f0_) {}
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple& operator=(const GTEST_1_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {
- f0_ = t.f0_;
- return *this;
- }
-
- T0 f0_;
-};
-
-template <GTEST_2_TYPENAMES_(T)>
-class GTEST_2_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
- f1_(f1) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
- template <typename U0, typename U1>
- tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple& operator=(const GTEST_2_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
- template <typename U0, typename U1>
- tuple& operator=(const ::std::pair<U0, U1>& p) {
- f0_ = p.first;
- f1_ = p.second;
- return *this;
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
-};
-
-template <GTEST_3_TYPENAMES_(T)>
-class GTEST_3_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple& operator=(const GTEST_3_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
-};
-
-template <GTEST_4_TYPENAMES_(T)>
-class GTEST_4_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple& operator=(const GTEST_4_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
-};
-
-template <GTEST_5_TYPENAMES_(T)>
-class GTEST_5_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3,
- GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_) {}
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple& operator=(const GTEST_5_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
-};
-
-template <GTEST_6_TYPENAMES_(T)>
-class GTEST_6_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_) {}
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple& operator=(const GTEST_6_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
-};
-
-template <GTEST_7_TYPENAMES_(T)>
-class GTEST_7_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3), f4_(f4), f5_(f5), f6_(f6) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple& operator=(const GTEST_7_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
-};
-
-template <GTEST_8_TYPENAMES_(T)>
-class GTEST_8_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6,
- GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5), f6_(f6), f7_(f7) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple& operator=(const GTEST_8_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
-};
-
-template <GTEST_9_TYPENAMES_(T)>
-class GTEST_9_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
- GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5), f6_(f6), f7_(f7), f8_(f8) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple& operator=(const GTEST_9_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- f8_ = t.f8_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
- T8 f8_;
-};
-
-template <GTEST_10_TYPENAMES_(T)>
-class tuple {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
- f9_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
- GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {}
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_),
- f9_(t.f9_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple& operator=(const GTEST_10_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- f8_ = t.f8_;
- f9_ = t.f9_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
- T8 f8_;
- T9 f9_;
-};
-
-// 6.1.3.2 Tuple creation functions.
-
-// Known limitations: we don't support passing an
-// std::tr1::reference_wrapper<T> to make_tuple(). And we don't
-// implement tie().
-
-inline tuple<> make_tuple() { return tuple<>(); }
-
-template <GTEST_1_TYPENAMES_(T)>
-inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) {
- return GTEST_1_TUPLE_(T)(f0);
-}
-
-template <GTEST_2_TYPENAMES_(T)>
-inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) {
- return GTEST_2_TUPLE_(T)(f0, f1);
-}
-
-template <GTEST_3_TYPENAMES_(T)>
-inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) {
- return GTEST_3_TUPLE_(T)(f0, f1, f2);
-}
-
-template <GTEST_4_TYPENAMES_(T)>
-inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3) {
- return GTEST_4_TUPLE_(T)(f0, f1, f2, f3);
-}
-
-template <GTEST_5_TYPENAMES_(T)>
-inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4) {
- return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4);
-}
-
-template <GTEST_6_TYPENAMES_(T)>
-inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5) {
- return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5);
-}
-
-template <GTEST_7_TYPENAMES_(T)>
-inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6) {
- return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6);
-}
-
-template <GTEST_8_TYPENAMES_(T)>
-inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) {
- return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7);
-}
-
-template <GTEST_9_TYPENAMES_(T)>
-inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
- const T8& f8) {
- return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8);
-}
-
-template <GTEST_10_TYPENAMES_(T)>
-inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
- const T8& f8, const T9& f9) {
- return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
-}
-
-// 6.1.3.3 Tuple helper classes.
-
-template <typename Tuple> struct tuple_size;
-
-template <GTEST_0_TYPENAMES_(T)>
-struct tuple_size<GTEST_0_TUPLE_(T)> { static const int value = 0; };
-
-template <GTEST_1_TYPENAMES_(T)>
-struct tuple_size<GTEST_1_TUPLE_(T)> { static const int value = 1; };
-
-template <GTEST_2_TYPENAMES_(T)>
-struct tuple_size<GTEST_2_TUPLE_(T)> { static const int value = 2; };
-
-template <GTEST_3_TYPENAMES_(T)>
-struct tuple_size<GTEST_3_TUPLE_(T)> { static const int value = 3; };
-
-template <GTEST_4_TYPENAMES_(T)>
-struct tuple_size<GTEST_4_TUPLE_(T)> { static const int value = 4; };
-
-template <GTEST_5_TYPENAMES_(T)>
-struct tuple_size<GTEST_5_TUPLE_(T)> { static const int value = 5; };
-
-template <GTEST_6_TYPENAMES_(T)>
-struct tuple_size<GTEST_6_TUPLE_(T)> { static const int value = 6; };
-
-template <GTEST_7_TYPENAMES_(T)>
-struct tuple_size<GTEST_7_TUPLE_(T)> { static const int value = 7; };
-
-template <GTEST_8_TYPENAMES_(T)>
-struct tuple_size<GTEST_8_TUPLE_(T)> { static const int value = 8; };
-
-template <GTEST_9_TYPENAMES_(T)>
-struct tuple_size<GTEST_9_TUPLE_(T)> { static const int value = 9; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct tuple_size<GTEST_10_TUPLE_(T)> { static const int value = 10; };
-
-template <int k, class Tuple>
-struct tuple_element {
- typedef typename gtest_internal::TupleElement<
- k < (tuple_size<Tuple>::value), k, Tuple>::type type;
-};
-
-#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
-
-// 6.1.3.4 Element access.
-
-namespace gtest_internal {
-
-template <>
-class Get<0> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
- Field(Tuple& t) { return t.f0_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
- ConstField(const Tuple& t) { return t.f0_; }
-};
-
-template <>
-class Get<1> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
- Field(Tuple& t) { return t.f1_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
- ConstField(const Tuple& t) { return t.f1_; }
-};
-
-template <>
-class Get<2> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
- Field(Tuple& t) { return t.f2_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
- ConstField(const Tuple& t) { return t.f2_; }
-};
-
-template <>
-class Get<3> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
- Field(Tuple& t) { return t.f3_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
- ConstField(const Tuple& t) { return t.f3_; }
-};
-
-template <>
-class Get<4> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
- Field(Tuple& t) { return t.f4_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
- ConstField(const Tuple& t) { return t.f4_; }
-};
-
-template <>
-class Get<5> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
- Field(Tuple& t) { return t.f5_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
- ConstField(const Tuple& t) { return t.f5_; }
-};
-
-template <>
-class Get<6> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
- Field(Tuple& t) { return t.f6_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
- ConstField(const Tuple& t) { return t.f6_; }
-};
-
-template <>
-class Get<7> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
- Field(Tuple& t) { return t.f7_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
- ConstField(const Tuple& t) { return t.f7_; }
-};
-
-template <>
-class Get<8> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
- Field(Tuple& t) { return t.f8_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
- ConstField(const Tuple& t) { return t.f8_; }
-};
-
-template <>
-class Get<9> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
- Field(Tuple& t) { return t.f9_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
- ConstField(const Tuple& t) { return t.f9_; }
-};
-
-} // namespace gtest_internal
-
-template <int k, GTEST_10_TYPENAMES_(T)>
-GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
-get(GTEST_10_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::Field(t);
-}
-
-template <int k, GTEST_10_TYPENAMES_(T)>
-GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
-get(const GTEST_10_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::ConstField(t);
-}
-
-// 6.1.3.5 Relational operators
-
-// We only implement == and !=, as we don't have a need for the rest yet.
-
-namespace gtest_internal {
-
-// SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the
-// first k fields of t1 equals the first k fields of t2.
-// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if
-// k1 != k2.
-template <int kSize1, int kSize2>
-struct SameSizeTuplePrefixComparator;
-
-template <>
-struct SameSizeTuplePrefixComparator<0, 0> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {
- return true;
- }
-};
-
-template <int k>
-struct SameSizeTuplePrefixComparator<k, k> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& t1, const Tuple2& t2) {
- return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&
- ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);
- }
-};
-
-} // namespace gtest_internal
-
-template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
-inline bool operator==(const GTEST_10_TUPLE_(T)& t,
- const GTEST_10_TUPLE_(U)& u) {
- return gtest_internal::SameSizeTuplePrefixComparator<
- tuple_size<GTEST_10_TUPLE_(T)>::value,
- tuple_size<GTEST_10_TUPLE_(U)>::value>::Eq(t, u);
-}
-
-template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
-inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
- const GTEST_10_TUPLE_(U)& u) { return !(t == u); }
-
-// 6.1.4 Pairs.
-// Unimplemented.
-
-} // namespace tr1
-} // namespace std
-
-#undef GTEST_0_TUPLE_
-#undef GTEST_1_TUPLE_
-#undef GTEST_2_TUPLE_
-#undef GTEST_3_TUPLE_
-#undef GTEST_4_TUPLE_
-#undef GTEST_5_TUPLE_
-#undef GTEST_6_TUPLE_
-#undef GTEST_7_TUPLE_
-#undef GTEST_8_TUPLE_
-#undef GTEST_9_TUPLE_
-#undef GTEST_10_TUPLE_
-
-#undef GTEST_0_TYPENAMES_
-#undef GTEST_1_TYPENAMES_
-#undef GTEST_2_TYPENAMES_
-#undef GTEST_3_TYPENAMES_
-#undef GTEST_4_TYPENAMES_
-#undef GTEST_5_TYPENAMES_
-#undef GTEST_6_TYPENAMES_
-#undef GTEST_7_TYPENAMES_
-#undef GTEST_8_TYPENAMES_
-#undef GTEST_9_TYPENAMES_
-#undef GTEST_10_TYPENAMES_
-
-#undef GTEST_DECLARE_TUPLE_AS_FRIEND_
-#undef GTEST_BY_REF_
-#undef GTEST_ADD_REF_
-#undef GTEST_TUPLE_ELEMENT_
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-# elif GTEST_OS_SYMBIAN
-
-// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to
-// use STLport's tuple implementation, which unfortunately doesn't
-// work as the copy of STLport distributed with Symbian is incomplete.
-// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to
-// use its own tuple implementation.
-# ifdef BOOST_HAS_TR1_TUPLE
-# undef BOOST_HAS_TR1_TUPLE
-# endif // BOOST_HAS_TR1_TUPLE
-
-// This prevents <boost/tr1/detail/config.hpp>, which defines
-// BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>.
-# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
-# include <tuple>
-
-# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)
-// GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does
-// not conform to the TR1 spec, which requires the header to be <tuple>.
-
-# if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
-// Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
-// which is #included by <tr1/tuple>, to not compile when RTTI is
-// disabled. _TR1_FUNCTIONAL is the header guard for
-// <tr1/functional>. Hence the following #define is a hack to prevent
-// <tr1/functional> from being included.
-# define _TR1_FUNCTIONAL 1
-# include <tr1/tuple>
-# undef _TR1_FUNCTIONAL // Allows the user to #include
- // <tr1/functional> if he chooses to.
-# else
-# include <tr1/tuple> // NOLINT
-# endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
-
-# else
-// If the compiler is not GCC 4.0+, we assume the user is using a
-// spec-conforming TR1 implementation.
-# include <tuple> // NOLINT
-# endif // GTEST_USE_OWN_TR1_TUPLE
-
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Determines whether clone(2) is supported.
-// Usually it will only be available on Linux, excluding
-// Linux on the Itanium architecture.
-// Also see http://linux.die.net/man/2/clone.
-#ifndef GTEST_HAS_CLONE
-// The user didn't tell us, so we need to figure it out.
-
-# if GTEST_OS_LINUX && !defined(__ia64__)
-# define GTEST_HAS_CLONE 1
-# else
-# define GTEST_HAS_CLONE 0
-# endif // GTEST_OS_LINUX && !defined(__ia64__)
-
-#endif // GTEST_HAS_CLONE
-
-// Determines whether to support stream redirection. This is used to test
-// output correctness and to implement death tests.
-#ifndef GTEST_HAS_STREAM_REDIRECTION
-// By default, we assume that stream redirection is supported on all
-// platforms except known mobile ones.
-# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN
-# define GTEST_HAS_STREAM_REDIRECTION 0
-# else
-# define GTEST_HAS_STREAM_REDIRECTION 1
-# endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Determines whether to support death tests.
-// Google Test does not support death tests for VC 7.1 and earlier as
-// abort() in a VC 7.1 application compiled as GUI in debug config
-// pops up a dialog window that cannot be suppressed programmatically.
-#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
- (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
- GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX)
-# define GTEST_HAS_DEATH_TEST 1
-# include <vector> // NOLINT
-#endif
-
-// We don't support MSVC 7.1 with exceptions disabled now. Therefore
-// all the compilers we care about are adequate for supporting
-// value-parameterized tests.
-#define GTEST_HAS_PARAM_TEST 1
-
-// Determines whether to support type-driven tests.
-
-// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
-// Sun Pro CC, IBM Visual Age, and HP aCC support.
-#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
- defined(__IBMCPP__) || defined(__HP_aCC)
-# define GTEST_HAS_TYPED_TEST 1
-# define GTEST_HAS_TYPED_TEST_P 1
-#endif
-
-// Determines whether to support Combine(). This only makes sense when
-// value-parameterized tests are enabled. The implementation doesn't
-// work on Sun Studio since it doesn't understand templated conversion
-// operators.
-#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
-# define GTEST_HAS_COMBINE 1
-#endif
-
-// Determines whether the system compiler uses UTF-16 for encoding wide strings.
-#define GTEST_WIDE_STRING_USES_UTF16_ \
- (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
-
-// Determines whether test results can be streamed to a socket.
-#if GTEST_OS_LINUX
-# define GTEST_CAN_STREAM_RESULTS_ 1
-#endif
-
-// Defines some utility macros.
-
-// The GNU compiler emits a warning if nested "if" statements are followed by
-// an "else" statement and braces are not used to explicitly disambiguate the
-// "else" binding. This leads to problems with code like:
-//
-// if (gate)
-// ASSERT_*(condition) << "Some message";
-//
-// The "switch (0) case 0:" idiom is used to suppress this.
-#ifdef __INTEL_COMPILER
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_
-#else
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT
-#endif
-
-// Use this annotation at the end of a struct/class definition to
-// prevent the compiler from optimizing away instances that are never
-// used. This is useful when all interesting logic happens inside the
-// c'tor and / or d'tor. Example:
-//
-// struct Foo {
-// Foo() { ... }
-// } GTEST_ATTRIBUTE_UNUSED_;
-//
-// Also use it after a variable or parameter declaration to tell the
-// compiler the variable/parameter does not have to be used.
-#if defined(__GNUC__) && !defined(COMPILER_ICC)
-# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
-#else
-# define GTEST_ATTRIBUTE_UNUSED_
-#endif
-
-// A macro to disallow operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
-
-// A macro to disallow copy constructor and operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
-
-// Tell the compiler to warn about unused return values for functions declared
-// with this macro. The macro should be used on function declarations
-// following the argument list:
-//
-// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
-#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)
-# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
-#else
-# define GTEST_MUST_USE_RESULT_
-#endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC
-
-// Determine whether the compiler supports Microsoft's Structured Exception
-// Handling. This is supported by several Windows compilers but generally
-// does not exist on any other system.
-#ifndef GTEST_HAS_SEH
-// The user didn't tell us, so we need to figure it out.
-
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// These two compilers are known to support SEH.
-# define GTEST_HAS_SEH 1
-# else
-// Assume no SEH.
-# define GTEST_HAS_SEH 0
-# endif
-
-#endif // GTEST_HAS_SEH
-
-#ifdef _MSC_VER
-
-# if GTEST_LINKED_AS_SHARED_LIBRARY
-# define GTEST_API_ __declspec(dllimport)
-# elif GTEST_CREATE_SHARED_LIBRARY
-# define GTEST_API_ __declspec(dllexport)
-# endif
-
-#endif // _MSC_VER
-
-#ifndef GTEST_API_
-# define GTEST_API_
-#endif
-
-#ifdef __GNUC__
-// Ask the compiler to never inline a given function.
-# define GTEST_NO_INLINE_ __attribute__((noinline))
-#else
-# define GTEST_NO_INLINE_
-#endif
-
-namespace testing {
-
-class Message;
-
-namespace internal {
-
-class String;
-
-// The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-template <bool>
-struct CompileAssert {
-};
-
-#define GTEST_COMPILE_ASSERT_(expr, msg) \
- typedef ::testing::internal::CompileAssert<(bool(expr))> \
- msg[bool(expr) ? 1 : -1]
-
-// Implementation details of GTEST_COMPILE_ASSERT_:
-//
-// - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1
-// elements (and thus is invalid) when the expression is false.
-//
-// - The simpler definition
-//
-// #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1]
-//
-// does not work, as gcc supports variable-length arrays whose sizes
-// are determined at run-time (this is gcc's extension and not part
-// of the C++ standard). As a result, gcc fails to reject the
-// following code with the simple definition:
-//
-// int foo;
-// GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is
-// // not a compile-time constant.
-//
-// - By using the type CompileAssert<(bool(expr))>, we ensures that
-// expr is a compile-time constant. (Template arguments must be
-// determined at compile-time.)
-//
-// - The outter parentheses in CompileAssert<(bool(expr))> are necessary
-// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
-//
-// CompileAssert<bool(expr)>
-//
-// instead, these compilers will refuse to compile
-//
-// GTEST_COMPILE_ASSERT_(5 > 0, some_message);
-//
-// (They seem to think the ">" in "5 > 0" marks the end of the
-// template argument list.)
-//
-// - The array size is (bool(expr) ? 1 : -1), instead of simply
-//
-// ((expr) ? 1 : -1).
-//
-// This is to avoid running into a bug in MS VC 7.1, which
-// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
-
-// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.
-//
-// This template is declared, but intentionally undefined.
-template <typename T1, typename T2>
-struct StaticAssertTypeEqHelper;
-
-template <typename T>
-struct StaticAssertTypeEqHelper<T, T> {};
-
-#if GTEST_HAS_GLOBAL_STRING
-typedef ::string string;
-#else
-typedef ::std::string string;
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-typedef ::wstring wstring;
-#elif GTEST_HAS_STD_WSTRING
-typedef ::std::wstring wstring;
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// A helper for suppressing warnings on constant condition. It just
-// returns 'condition'.
-GTEST_API_ bool IsTrue(bool condition);
-
-// Defines scoped_ptr.
-
-// This implementation of scoped_ptr is PARTIAL - it only contains
-// enough stuff to satisfy Google Test's need.
-template <typename T>
-class scoped_ptr {
- public:
- typedef T element_type;
-
- explicit scoped_ptr(T* p = NULL) : ptr_(p) {}
- ~scoped_ptr() { reset(); }
-
- T& operator*() const { return *ptr_; }
- T* operator->() const { return ptr_; }
- T* get() const { return ptr_; }
-
- T* release() {
- T* const ptr = ptr_;
- ptr_ = NULL;
- return ptr;
- }
-
- void reset(T* p = NULL) {
- if (p != ptr_) {
- if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type.
- delete ptr_;
- }
- ptr_ = p;
- }
- }
- private:
- T* ptr_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr);
-};
-
-// Defines RE.
-
-// A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
-// Regular Expression syntax.
-class GTEST_API_ RE {
- public:
- // A copy constructor is required by the Standard to initialize object
- // references from r-values.
- RE(const RE& other) { Init(other.pattern()); }
-
- // Constructs an RE from a string.
- RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT
-
-#if GTEST_HAS_GLOBAL_STRING
-
- RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
- RE(const char* regex) { Init(regex); } // NOLINT
- ~RE();
-
- // Returns the string representation of the regex.
- const char* pattern() const { return pattern_; }
-
- // FullMatch(str, re) returns true iff regular expression re matches
- // the entire str.
- // PartialMatch(str, re) returns true iff regular expression re
- // matches a substring of str (including str itself).
- //
- // TODO(wan@google.com): make FullMatch() and PartialMatch() work
- // when str contains NUL characters.
- static bool FullMatch(const ::std::string& str, const RE& re) {
- return FullMatch(str.c_str(), re);
- }
- static bool PartialMatch(const ::std::string& str, const RE& re) {
- return PartialMatch(str.c_str(), re);
- }
-
-#if GTEST_HAS_GLOBAL_STRING
-
- static bool FullMatch(const ::string& str, const RE& re) {
- return FullMatch(str.c_str(), re);
- }
- static bool PartialMatch(const ::string& str, const RE& re) {
- return PartialMatch(str.c_str(), re);
- }
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
- static bool FullMatch(const char* str, const RE& re);
- static bool PartialMatch(const char* str, const RE& re);
-
- private:
- void Init(const char* regex);
-
- // We use a const char* instead of a string, as Google Test may be used
- // where string is not available. We also do not use Google Test's own
- // String type here, in order to simplify dependencies between the
- // files.
- const char* pattern_;
- bool is_valid_;
-
-#if GTEST_USES_POSIX_RE
-
- regex_t full_regex_; // For FullMatch().
- regex_t partial_regex_; // For PartialMatch().
-
-#else // GTEST_USES_SIMPLE_RE
-
- const char* full_pattern_; // For FullMatch();
-
-#endif
-
- GTEST_DISALLOW_ASSIGN_(RE);
-};
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
- int line);
-
-// Defines logging utilities:
-// GTEST_LOG_(severity) - logs messages at the specified severity level. The
-// message itself is streamed into the macro.
-// LogToStderr() - directs all log messages to stderr.
-// FlushInfoLog() - flushes informational log messages.
-
-enum GTestLogSeverity {
- GTEST_INFO,
- GTEST_WARNING,
- GTEST_ERROR,
- GTEST_FATAL
-};
-
-// Formats log entry severity, provides a stream object for streaming the
-// log message, and terminates the message with a newline when going out of
-// scope.
-class GTEST_API_ GTestLog {
- public:
- GTestLog(GTestLogSeverity severity, const char* file, int line);
-
- // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
- ~GTestLog();
-
- ::std::ostream& GetStream() { return ::std::cerr; }
-
- private:
- const GTestLogSeverity severity_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);
-};
-
-#define GTEST_LOG_(severity) \
- ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
- __FILE__, __LINE__).GetStream()
-
-inline void LogToStderr() {}
-inline void FlushInfoLog() { fflush(NULL); }
-
-// INTERNAL IMPLEMENTATION - DO NOT USE.
-//
-// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
-// is not satisfied.
-// Synopsys:
-// GTEST_CHECK_(boolean_condition);
-// or
-// GTEST_CHECK_(boolean_condition) << "Additional message";
-//
-// This checks the condition and if the condition is not satisfied
-// it prints message about the condition violation, including the
-// condition itself, plus additional message streamed into it, if any,
-// and then it aborts the program. It aborts the program irrespective of
-// whether it is built in the debug mode or not.
-#define GTEST_CHECK_(condition) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::IsTrue(condition)) \
- ; \
- else \
- GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
-
-// An all-mode assert to verify that the given POSIX-style function
-// call returns 0 (indicating success). Known limitation: this
-// doesn't expand to a balanced 'if' statement, so enclose the macro
-// in {} if you need to use it as the only statement in an 'if'
-// branch.
-#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
- if (const int gtest_error = (posix_call)) \
- GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
- << gtest_error
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Use ImplicitCast_ as a safe version of static_cast for upcasting in
-// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
-// const Foo*). When you use ImplicitCast_, the compiler checks that
-// the cast is safe. Such explicit ImplicitCast_s are necessary in
-// surprisingly many situations where C++ demands an exact type match
-// instead of an argument type convertable to a target type.
-//
-// The syntax for using ImplicitCast_ is the same as for static_cast:
-//
-// ImplicitCast_<ToType>(expr)
-//
-// ImplicitCast_ would have been part of the C++ standard library,
-// but the proposal was submitted too late. It will probably make
-// its way into the language in the future.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., implicit_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To>
-inline To ImplicitCast_(To x) { return x; }
-
-// When you upcast (that is, cast a pointer from type Foo to type
-// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
-// always succeed. When you downcast (that is, cast a pointer from
-// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
-// how do you know the pointer is really of type SubclassOfFoo? It
-// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
-// when you downcast, you should use this macro. In debug mode, we
-// use dynamic_cast<> to double-check the downcast is legal (we die
-// if it's not). In normal mode, we do the efficient static_cast<>
-// instead. Thus, it's important to test in debug mode to make sure
-// the cast is legal!
-// This is the only place in the code we should use dynamic_cast<>.
-// In particular, you SHOULDN'T be using dynamic_cast<> in order to
-// do RTTI (eg code like this:
-// if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
-// if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
-// You should design the code some other way not to need this.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., down_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To, typename From> // use like this: DownCast_<T*>(foo);
-inline To DownCast_(From* f) { // so we only accept pointers
- // Ensures that To is a sub-type of From *. This test is here only
- // for compile-time type checking, and has no overhead in an
- // optimized build at run-time, as it will be optimized away
- // completely.
- if (false) {
- const To to = NULL;
- ::testing::internal::ImplicitCast_<From*>(to);
- }
-
-#if GTEST_HAS_RTTI
- // RTTI: debug mode only!
- GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
-#endif
- return static_cast<To>(f);
-}
-
-// Downcasts the pointer of type Base to Derived.
-// Derived must be a subclass of Base. The parameter MUST
-// point to a class of type Derived, not any subclass of it.
-// When RTTI is available, the function performs a runtime
-// check to enforce this.
-template <class Derived, class Base>
-Derived* CheckedDowncastToActualType(Base* base) {
-#if GTEST_HAS_RTTI
- GTEST_CHECK_(typeid(*base) == typeid(Derived));
- return dynamic_cast<Derived*>(base); // NOLINT
-#else
- return static_cast<Derived*>(base); // Poor man's downcast.
-#endif
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Defines the stderr capturer:
-// CaptureStdout - starts capturing stdout.
-// GetCapturedStdout - stops capturing stdout and returns the captured string.
-// CaptureStderr - starts capturing stderr.
-// GetCapturedStderr - stops capturing stderr and returns the captured string.
-//
-GTEST_API_ void CaptureStdout();
-GTEST_API_ String GetCapturedStdout();
-GTEST_API_ void CaptureStderr();
-GTEST_API_ String GetCapturedStderr();
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-
-#if GTEST_HAS_DEATH_TEST
-
-// A copy of all command line arguments. Set by InitGoogleTest().
-extern ::std::vector<String> g_argvs;
-
-// GTEST_HAS_DEATH_TEST implies we have ::std::string.
-const ::std::vector<String>& GetArgvs();
-
-#endif // GTEST_HAS_DEATH_TEST
-
-// Defines synchronization primitives.
-
-#if GTEST_HAS_PTHREAD
-
-// Sleeps for (roughly) n milli-seconds. This function is only for
-// testing Google Test's own constructs. Don't use it in user tests,
-// either directly or indirectly.
-inline void SleepMilliseconds(int n) {
- const timespec time = {
- 0, // 0 seconds.
- n * 1000L * 1000L, // And n ms.
- };
- nanosleep(&time, NULL);
-}
-
-// Allows a controller thread to pause execution of newly created
-// threads until notified. Instances of this class must be created
-// and destroyed in the controller thread.
-//
-// This class is only for testing Google Test's own constructs. Do not
-// use it in user tests, either directly or indirectly.
-class Notification {
- public:
- Notification() : notified_(false) {}
-
- // Notifies all threads created with this notification to start. Must
- // be called from the controller thread.
- void Notify() { notified_ = true; }
-
- // Blocks until the controller thread notifies. Must be called from a test
- // thread.
- void WaitForNotification() {
- while(!notified_) {
- SleepMilliseconds(10);
- }
- }
-
- private:
- volatile bool notified_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
-};
-
-// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
-// Consequently, it cannot select a correct instantiation of ThreadWithParam
-// in order to call its Run(). Introducing ThreadWithParamBase as a
-// non-templated base class for ThreadWithParam allows us to bypass this
-// problem.
-class ThreadWithParamBase {
- public:
- virtual ~ThreadWithParamBase() {}
- virtual void Run() = 0;
-};
-
-// pthread_create() accepts a pointer to a function type with the C linkage.
-// According to the Standard (7.5/1), function types with different linkages
-// are different even if they are otherwise identical. Some compilers (for
-// example, SunStudio) treat them as different types. Since class methods
-// cannot be defined with C-linkage we need to define a free C-function to
-// pass into pthread_create().
-extern "C" inline void* ThreadFuncWithCLinkage(void* thread) {
- static_cast<ThreadWithParamBase*>(thread)->Run();
- return NULL;
-}
-
-// Helper class for testing Google Test's multi-threading constructs.
-// To use it, write:
-//
-// void ThreadFunc(int param) { /* Do things with param */ }
-// Notification thread_can_start;
-// ...
-// // The thread_can_start parameter is optional; you can supply NULL.
-// ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
-// thread_can_start.Notify();
-//
-// These classes are only for testing Google Test's own constructs. Do
-// not use them in user tests, either directly or indirectly.
-template <typename T>
-class ThreadWithParam : public ThreadWithParamBase {
- public:
- typedef void (*UserThreadFunc)(T);
-
- ThreadWithParam(
- UserThreadFunc func, T param, Notification* thread_can_start)
- : func_(func),
- param_(param),
- thread_can_start_(thread_can_start),
- finished_(false) {
- ThreadWithParamBase* const base = this;
- // The thread can be created only after all fields except thread_
- // have been initialized.
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
- }
- ~ThreadWithParam() { Join(); }
-
- void Join() {
- if (!finished_) {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0));
- finished_ = true;
- }
- }
-
- virtual void Run() {
- if (thread_can_start_ != NULL)
- thread_can_start_->WaitForNotification();
- func_(param_);
- }
-
- private:
- const UserThreadFunc func_; // User-supplied thread function.
- const T param_; // User-supplied parameter to the thread function.
- // When non-NULL, used to block execution until the controller thread
- // notifies.
- Notification* const thread_can_start_;
- bool finished_; // true iff we know that the thread function has finished.
- pthread_t thread_; // The native thread object.
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
-};
-
-// MutexBase and Mutex implement mutex on pthreads-based platforms. They
-// are used in conjunction with class MutexLock:
-//
-// Mutex mutex;
-// ...
-// MutexLock lock(&mutex); // Acquires the mutex and releases it at the end
-// // of the current scope.
-//
-// MutexBase implements behavior for both statically and dynamically
-// allocated mutexes. Do not use MutexBase directly. Instead, write
-// the following to define a static mutex:
-//
-// GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
-//
-// You can forward declare a static mutex like this:
-//
-// GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
-//
-// To create a dynamic mutex, just define an object of type Mutex.
-class MutexBase {
- public:
- // Acquires this mutex.
- void Lock() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
- owner_ = pthread_self();
- }
-
- // Releases this mutex.
- void Unlock() {
- // We don't protect writing to owner_ here, as it's the caller's
- // responsibility to ensure that the current thread holds the
- // mutex when this is called.
- owner_ = 0;
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
- }
-
- // Does nothing if the current thread holds the mutex. Otherwise, crashes
- // with high probability.
- void AssertHeld() const {
- GTEST_CHECK_(owner_ == pthread_self())
- << "The current thread is not holding the mutex @" << this;
- }
-
- // A static mutex may be used before main() is entered. It may even
- // be used before the dynamic initialization stage. Therefore we
- // must be able to initialize a static mutex object at link time.
- // This means MutexBase has to be a POD and its member variables
- // have to be public.
- public:
- pthread_mutex_t mutex_; // The underlying pthread mutex.
- pthread_t owner_; // The thread holding the mutex; 0 means no one holds it.
-};
-
-// Forward-declares a static mutex.
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
- extern ::testing::internal::MutexBase mutex
-
-// Defines and statically (i.e. at link time) initializes a static mutex.
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
- ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, 0 }
-
-// The Mutex class can only be used for mutexes created at runtime. It
-// shares its API with MutexBase otherwise.
-class Mutex : public MutexBase {
- public:
- Mutex() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
- owner_ = 0;
- }
- ~Mutex() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
-};
-
-// We cannot name this class MutexLock as the ctor declaration would
-// conflict with a macro named MutexLock, which is defined on some
-// platforms. Hence the typedef trick below.
-class GTestMutexLock {
- public:
- explicit GTestMutexLock(MutexBase* mutex)
- : mutex_(mutex) { mutex_->Lock(); }
-
- ~GTestMutexLock() { mutex_->Unlock(); }
-
- private:
- MutexBase* const mutex_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
-};
-
-typedef GTestMutexLock MutexLock;
-
-// Helpers for ThreadLocal.
-
-// pthread_key_create() requires DeleteThreadLocalValue() to have
-// C-linkage. Therefore it cannot be templatized to access
-// ThreadLocal<T>. Hence the need for class
-// ThreadLocalValueHolderBase.
-class ThreadLocalValueHolderBase {
- public:
- virtual ~ThreadLocalValueHolderBase() {}
-};
-
-// Called by pthread to delete thread-local data stored by
-// pthread_setspecific().
-extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
- delete static_cast<ThreadLocalValueHolderBase*>(value_holder);
-}
-
-// Implements thread-local storage on pthreads-based systems.
-//
-// // Thread 1
-// ThreadLocal<int> tl(100); // 100 is the default value for each thread.
-//
-// // Thread 2
-// tl.set(150); // Changes the value for thread 2 only.
-// EXPECT_EQ(150, tl.get());
-//
-// // Thread 1
-// EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value.
-// tl.set(200);
-// EXPECT_EQ(200, tl.get());
-//
-// The template type argument T must have a public copy constructor.
-// In addition, the default ThreadLocal constructor requires T to have
-// a public default constructor.
-//
-// An object managed for a thread by a ThreadLocal instance is deleted
-// when the thread exits. Or, if the ThreadLocal instance dies in
-// that thread, when the ThreadLocal dies. It's the user's
-// responsibility to ensure that all other threads using a ThreadLocal
-// have exited when it dies, or the per-thread objects for those
-// threads will not be deleted.
-//
-// Google Test only uses global ThreadLocal objects. That means they
-// will die after main() has returned. Therefore, no per-thread
-// object managed by Google Test will be leaked as long as all threads
-// using Google Test have exited when main() returns.
-template <typename T>
-class ThreadLocal {
- public:
- ThreadLocal() : key_(CreateKey()),
- default_() {}
- explicit ThreadLocal(const T& value) : key_(CreateKey()),
- default_(value) {}
-
- ~ThreadLocal() {
- // Destroys the managed object for the current thread, if any.
- DeleteThreadLocalValue(pthread_getspecific(key_));
-
- // Releases resources associated with the key. This will *not*
- // delete managed objects for other threads.
- GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
- }
-
- T* pointer() { return GetOrCreateValue(); }
- const T* pointer() const { return GetOrCreateValue(); }
- const T& get() const { return *pointer(); }
- void set(const T& value) { *pointer() = value; }
-
- private:
- // Holds a value of type T.
- class ValueHolder : public ThreadLocalValueHolderBase {
- public:
- explicit ValueHolder(const T& value) : value_(value) {}
-
- T* pointer() { return &value_; }
-
- private:
- T value_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
- };
-
- static pthread_key_t CreateKey() {
- pthread_key_t key;
- // When a thread exits, DeleteThreadLocalValue() will be called on
- // the object managed for that thread.
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_key_create(&key, &DeleteThreadLocalValue));
- return key;
- }
-
- T* GetOrCreateValue() const {
- ThreadLocalValueHolderBase* const holder =
- static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
- if (holder != NULL) {
- return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
- }
-
- ValueHolder* const new_holder = new ValueHolder(default_);
- ThreadLocalValueHolderBase* const holder_base = new_holder;
- GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
- return new_holder->pointer();
- }
-
- // A key pthreads uses for looking up per-thread values.
- const pthread_key_t key_;
- const T default_; // The default value for each thread.
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
-};
-
-# define GTEST_IS_THREADSAFE 1
-
-#else // GTEST_HAS_PTHREAD
-
-// A dummy implementation of synchronization primitives (mutex, lock,
-// and thread-local variable). Necessary for compiling Google Test where
-// mutex is not supported - using Google Test in multiple threads is not
-// supported on such platforms.
-
-class Mutex {
- public:
- Mutex() {}
- void AssertHeld() const {}
-};
-
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
- extern ::testing::internal::Mutex mutex
-
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
-
-class GTestMutexLock {
- public:
- explicit GTestMutexLock(Mutex*) {} // NOLINT
-};
-
-typedef GTestMutexLock MutexLock;
-
-template <typename T>
-class ThreadLocal {
- public:
- ThreadLocal() : value_() {}
- explicit ThreadLocal(const T& value) : value_(value) {}
- T* pointer() { return &value_; }
- const T* pointer() const { return &value_; }
- const T& get() const { return value_; }
- void set(const T& value) { value_ = value; }
- private:
- T value_;
-};
-
-// The above synchronization primitives have dummy implementations.
-// Therefore Google Test is not thread-safe.
-# define GTEST_IS_THREADSAFE 0
-
-#endif // GTEST_HAS_PTHREAD
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-GTEST_API_ size_t GetThreadCount();
-
-// Passing non-POD classes through ellipsis (...) crashes the ARM
-// compiler and generates a warning in Sun Studio. The Nokia Symbian
-// and the IBM XL C/C++ compiler try to instantiate a copy constructor
-// for objects passed through ellipsis (...), failing for uncopyable
-// objects. We define this to ensure that only POD is passed through
-// ellipsis on these systems.
-#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
-// We lose support for NULL detection where the compiler doesn't like
-// passing non-POD classes through ellipsis (...).
-# define GTEST_ELLIPSIS_NEEDS_POD_ 1
-#else
-# define GTEST_CAN_COMPARE_NULL 1
-#endif
-
-// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between
-// const T& and const T* in a function template. These compilers
-// _can_ decide between class template specializations for T and T*,
-// so a tr1::type_traits-like is_pointer works.
-#if defined(__SYMBIAN32__) || defined(__IBMCPP__)
-# define GTEST_NEEDS_IS_POINTER_ 1
-#endif
-
-template <bool bool_value>
-struct bool_constant {
- typedef bool_constant<bool_value> type;
- static const bool value = bool_value;
-};
-template <bool bool_value> const bool bool_constant<bool_value>::value;
-
-typedef bool_constant<false> false_type;
-typedef bool_constant<true> true_type;
-
-template <typename T>
-struct is_pointer : public false_type {};
-
-template <typename T>
-struct is_pointer<T*> : public true_type {};
-
-template <typename Iterator>
-struct IteratorTraits {
- typedef typename Iterator::value_type value_type;
-};
-
-template <typename T>
-struct IteratorTraits<T*> {
- typedef T value_type;
-};
-
-template <typename T>
-struct IteratorTraits<const T*> {
- typedef T value_type;
-};
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_SEP_ "\\"
-# define GTEST_HAS_ALT_PATH_SEP_ 1
-// The biggest signed integer type the compiler supports.
-typedef __int64 BiggestInt;
-#else
-# define GTEST_PATH_SEP_ "/"
-# define GTEST_HAS_ALT_PATH_SEP_ 0
-typedef long long BiggestInt; // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-// Utilities for char.
-
-// isspace(int ch) and friends accept an unsigned char or EOF. char
-// may be signed, depending on the compiler (or compiler flags).
-// Therefore we need to cast a char to unsigned char before calling
-// isspace(), etc.
-
-inline bool IsAlpha(char ch) {
- return isalpha(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsAlNum(char ch) {
- return isalnum(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsDigit(char ch) {
- return isdigit(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsLower(char ch) {
- return islower(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsSpace(char ch) {
- return isspace(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsUpper(char ch) {
- return isupper(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsXDigit(char ch) {
- return isxdigit(static_cast<unsigned char>(ch)) != 0;
-}
-
-inline char ToLower(char ch) {
- return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
-}
-inline char ToUpper(char ch) {
- return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
-}
-
-// The testing::internal::posix namespace holds wrappers for common
-// POSIX functions. These wrappers hide the differences between
-// Windows/MSVC and POSIX systems. Since some compilers define these
-// standard functions as macros, the wrapper cannot have the same name
-// as the wrapped function.
-
-namespace posix {
-
-// Functions with a different name on Windows.
-
-#if GTEST_OS_WINDOWS
-
-typedef struct _stat StatStruct;
-
-# ifdef __BORLANDC__
-inline int IsATTY(int fd) { return isatty(fd); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-# else // !__BORLANDC__
-# if GTEST_OS_WINDOWS_MOBILE
-inline int IsATTY(int /* fd */) { return 0; }
-# else
-inline int IsATTY(int fd) { return _isatty(fd); }
-# endif // GTEST_OS_WINDOWS_MOBILE
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return _stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return _strdup(src); }
-# endif // __BORLANDC__
-
-# if GTEST_OS_WINDOWS_MOBILE
-inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
-// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
-// time and thus not defined there.
-# else
-inline int FileNo(FILE* file) { return _fileno(file); }
-inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
-inline int RmDir(const char* dir) { return _rmdir(dir); }
-inline bool IsDir(const StatStruct& st) {
- return (_S_IFDIR & st.st_mode) != 0;
-}
-# endif // GTEST_OS_WINDOWS_MOBILE
-
-#else
-
-typedef struct stat StatStruct;
-
-inline int FileNo(FILE* file) { return fileno(file); }
-inline int IsATTY(int fd) { return isatty(fd); }
-inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return strcasecmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-inline int RmDir(const char* dir) { return rmdir(dir); }
-inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
-
-#endif // GTEST_OS_WINDOWS
-
-// Functions deprecated by MSVC 8.0.
-
-#ifdef _MSC_VER
-// Temporarily disable warning 4996 (deprecated function).
-# pragma warning(push)
-# pragma warning(disable:4996)
-#endif
-
-inline const char* StrNCpy(char* dest, const char* src, size_t n) {
- return strncpy(dest, src, n);
-}
-
-// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
-// StrError() aren't needed on Windows CE at this time and thus not
-// defined there.
-
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int ChDir(const char* dir) { return chdir(dir); }
-#endif
-inline FILE* FOpen(const char* path, const char* mode) {
- return fopen(path, mode);
-}
-#if !GTEST_OS_WINDOWS_MOBILE
-inline FILE *FReopen(const char* path, const char* mode, FILE* stream) {
- return freopen(path, mode, stream);
-}
-inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }
-#endif
-inline int FClose(FILE* fp) { return fclose(fp); }
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int Read(int fd, void* buf, unsigned int count) {
- return static_cast<int>(read(fd, buf, count));
-}
-inline int Write(int fd, const void* buf, unsigned int count) {
- return static_cast<int>(write(fd, buf, count));
-}
-inline int Close(int fd) { return close(fd); }
-inline const char* StrError(int errnum) { return strerror(errnum); }
-#endif
-inline const char* GetEnv(const char* name) {
-#if GTEST_OS_WINDOWS_MOBILE
- // We are on Windows CE, which has no environment variables.
- return NULL;
-#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
- // Environment variables which we programmatically clear will be set to the
- // empty string rather than unset (NULL). Handle that case.
- const char* const env = getenv(name);
- return (env != NULL && env[0] != '\0') ? env : NULL;
-#else
- return getenv(name);
-#endif
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Windows CE has no C library. The abort() function is used in
-// several places in Google Test. This implementation provides a reasonable
-// imitation of standard behaviour.
-void Abort();
-#else
-inline void Abort() { abort(); }
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-} // namespace posix
-
-// The maximum number a BiggestInt can represent. This definition
-// works no matter BiggestInt is represented in one's complement or
-// two's complement.
-//
-// We cannot rely on numeric_limits in STL, as __int64 and long long
-// are not part of standard C++ and numeric_limits doesn't need to be
-// defined for them.
-const BiggestInt kMaxBiggestInt =
- ~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1));
-
-// This template class serves as a compile-time function from size to
-// type. It maps a size in bytes to a primitive type with that
-// size. e.g.
-//
-// TypeWithSize<4>::UInt
-//
-// is typedef-ed to be unsigned int (unsigned integer made up of 4
-// bytes).
-//
-// Such functionality should belong to STL, but I cannot find it
-// there.
-//
-// Google Test uses this class in the implementation of floating-point
-// comparison.
-//
-// For now it only handles UInt (unsigned int) as that's all Google Test
-// needs. Other types can be easily added in the future if need
-// arises.
-template <size_t size>
-class TypeWithSize {
- public:
- // This prevents the user from using TypeWithSize<N> with incorrect
- // values of N.
- typedef void UInt;
-};
-
-// The specialization for size 4.
-template <>
-class TypeWithSize<4> {
- public:
- // unsigned int has size 4 in both gcc and MSVC.
- //
- // As base/basictypes.h doesn't compile on Windows, we cannot use
- // uint32, uint64, and etc here.
- typedef int Int;
- typedef unsigned int UInt;
-};
-
-// The specialization for size 8.
-template <>
-class TypeWithSize<8> {
- public:
-
-#if GTEST_OS_WINDOWS
- typedef __int64 Int;
- typedef unsigned __int64 UInt;
-#else
- typedef long long Int; // NOLINT
- typedef unsigned long long UInt; // NOLINT
-#endif // GTEST_OS_WINDOWS
-};
-
-// Integer types of known sizes.
-typedef TypeWithSize<4>::Int Int32;
-typedef TypeWithSize<4>::UInt UInt32;
-typedef TypeWithSize<8>::Int Int64;
-typedef TypeWithSize<8>::UInt UInt64;
-typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
-
-// Utilities for command line flags and environment variables.
-
-// Macro for referencing flags.
-#define GTEST_FLAG(name) FLAGS_gtest_##name
-
-// Macros for declaring flags.
-#define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
-#define GTEST_DECLARE_int32_(name) \
- GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
-#define GTEST_DECLARE_string_(name) \
- GTEST_API_ extern ::testing::internal::String GTEST_FLAG(name)
-
-// Macros for defining flags.
-#define GTEST_DEFINE_bool_(name, default_val, doc) \
- GTEST_API_ bool GTEST_FLAG(name) = (default_val)
-#define GTEST_DEFINE_int32_(name, default_val, doc) \
- GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
-#define GTEST_DEFINE_string_(name, default_val, doc) \
- GTEST_API_ ::testing::internal::String GTEST_FLAG(name) = (default_val)
-
-// Parses 'str' for a 32-bit signed integer. If successful, writes the result
-// to *value and returns true; otherwise leaves *value unchanged and returns
-// false.
-// TODO(chandlerc): Find a better way to refactor flag and environment parsing
-// out of both gtest-port.cc and gtest.cc to avoid exporting this utility
-// function.
-bool ParseInt32(const Message& src_text, const char* str, Int32* value);
-
-// Parses a bool/Int32/string from the environment variable
-// corresponding to the given Google Test flag.
-bool BoolFromGTestEnv(const char* flag, bool default_val);
-GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);
-const char* StringFromGTestEnv(const char* flag, const char* default_val);
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-
-#if GTEST_OS_LINUX
-# include <stdlib.h>
-# include <sys/types.h>
-# include <sys/wait.h>
-# include <unistd.h>
-#endif // GTEST_OS_LINUX
-
-#include <ctype.h>
-#include <string.h>
-#include <iomanip>
-#include <limits>
-#include <set>
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file declares the String class and functions used internally by
-// Google Test. They are subject to change without notice. They should not used
-// by code external to Google Test.
-//
-// This header file is #included by <gtest/internal/gtest-internal.h>.
-// It should not be #included by other files.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-
-#ifdef __BORLANDC__
-// string.h is not guaranteed to provide strcpy on C++ Builder.
-# include <mem.h>
-#endif
-
-#include <string.h>
-
-#include <string>
-
-namespace testing {
-namespace internal {
-
-// String - a UTF-8 string class.
-//
-// For historic reasons, we don't use std::string.
-//
-// TODO(wan@google.com): replace this class with std::string or
-// implement it in terms of the latter.
-//
-// Note that String can represent both NULL and the empty string,
-// while std::string cannot represent NULL.
-//
-// NULL and the empty string are considered different. NULL is less
-// than anything (including the empty string) except itself.
-//
-// This class only provides minimum functionality necessary for
-// implementing Google Test. We do not intend to implement a full-fledged
-// string class here.
-//
-// Since the purpose of this class is to provide a substitute for
-// std::string on platforms where it cannot be used, we define a copy
-// constructor and assignment operators such that we don't need
-// conditional compilation in a lot of places.
-//
-// In order to make the representation efficient, the d'tor of String
-// is not virtual. Therefore DO NOT INHERIT FROM String.
-class GTEST_API_ String {
- public:
- // Static utility methods
-
- // Returns the input enclosed in double quotes if it's not NULL;
- // otherwise returns "(null)". For example, "\"Hello\"" is returned
- // for input "Hello".
- //
- // This is useful for printing a C string in the syntax of a literal.
- //
- // Known issue: escape sequences are not handled yet.
- static String ShowCStringQuoted(const char* c_str);
-
- // Clones a 0-terminated C string, allocating memory using new. The
- // caller is responsible for deleting the return value using
- // delete[]. Returns the cloned string, or NULL if the input is
- // NULL.
- //
- // This is different from strdup() in string.h, which allocates
- // memory using malloc().
- static const char* CloneCString(const char* c_str);
-
-#if GTEST_OS_WINDOWS_MOBILE
- // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
- // able to pass strings to Win32 APIs on CE we need to convert them
- // to 'Unicode', UTF-16.
-
- // Creates a UTF-16 wide string from the given ANSI string, allocating
- // memory using new. The caller is responsible for deleting the return
- // value using delete[]. Returns the wide string, or NULL if the
- // input is NULL.
- //
- // The wide string is created using the ANSI codepage (CP_ACP) to
- // match the behaviour of the ANSI versions of Win32 calls and the
- // C runtime.
- static LPCWSTR AnsiToUtf16(const char* c_str);
-
- // Creates an ANSI string from the given wide string, allocating
- // memory using new. The caller is responsible for deleting the return
- // value using delete[]. Returns the ANSI string, or NULL if the
- // input is NULL.
- //
- // The returned string is created using the ANSI codepage (CP_ACP) to
- // match the behaviour of the ANSI versions of Win32 calls and the
- // C runtime.
- static const char* Utf16ToAnsi(LPCWSTR utf16_str);
-#endif
-
- // Compares two C strings. Returns true iff they have the same content.
- //
- // Unlike strcmp(), this function can handle NULL argument(s). A
- // NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool CStringEquals(const char* lhs, const char* rhs);
-
- // Converts a wide C string to a String using the UTF-8 encoding.
- // NULL will be converted to "(null)". If an error occurred during
- // the conversion, "(failed to convert from wide string)" is
- // returned.
- static String ShowWideCString(const wchar_t* wide_c_str);
-
- // Similar to ShowWideCString(), except that this function encloses
- // the converted string in double quotes.
- static String ShowWideCStringQuoted(const wchar_t* wide_c_str);
-
- // Compares two wide C strings. Returns true iff they have the same
- // content.
- //
- // Unlike wcscmp(), this function can handle NULL argument(s). A
- // NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
-
- // Compares two C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike strcasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool CaseInsensitiveCStringEquals(const char* lhs,
- const char* rhs);
-
- // Compares two wide C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike wcscasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL wide C string,
- // including the empty string.
- // NB: The implementations on different platforms slightly differ.
- // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
- // environment variable. On GNU platform this method uses wcscasecmp
- // which compares according to LC_CTYPE category of the current locale.
- // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
- // current locale.
- static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs);
-
- // Formats a list of arguments to a String, using the same format
- // spec string as for printf.
- //
- // We do not use the StringPrintf class as it is not universally
- // available.
- //
- // The result is limited to 4096 characters (including the tailing
- // 0). If 4096 characters are not enough to format the input,
- // "<buffer exceeded>" is returned.
- static String Format(const char* format, ...);
-
- // C'tors
-
- // The default c'tor constructs a NULL string.
- String() : c_str_(NULL), length_(0) {}
-
- // Constructs a String by cloning a 0-terminated C string.
- String(const char* a_c_str) { // NOLINT
- if (a_c_str == NULL) {
- c_str_ = NULL;
- length_ = 0;
- } else {
- ConstructNonNull(a_c_str, strlen(a_c_str));
- }
- }
-
- // Constructs a String by copying a given number of chars from a
- // buffer. E.g. String("hello", 3) creates the string "hel",
- // String("a\0bcd", 4) creates "a\0bc", String(NULL, 0) creates "",
- // and String(NULL, 1) results in access violation.
- String(const char* buffer, size_t a_length) {
- ConstructNonNull(buffer, a_length);
- }
-
- // The copy c'tor creates a new copy of the string. The two
- // String objects do not share content.
- String(const String& str) : c_str_(NULL), length_(0) { *this = str; }
-
- // D'tor. String is intended to be a final class, so the d'tor
- // doesn't need to be virtual.
- ~String() { delete[] c_str_; }
-
- // Allows a String to be implicitly converted to an ::std::string or
- // ::string, and vice versa. Converting a String containing a NULL
- // pointer to ::std::string or ::string is undefined behavior.
- // Converting a ::std::string or ::string containing an embedded NUL
- // character to a String will result in the prefix up to the first
- // NUL character.
- String(const ::std::string& str) {
- ConstructNonNull(str.c_str(), str.length());
- }
-
- operator ::std::string() const { return ::std::string(c_str(), length()); }
-
-#if GTEST_HAS_GLOBAL_STRING
- String(const ::string& str) {
- ConstructNonNull(str.c_str(), str.length());
- }
-
- operator ::string() const { return ::string(c_str(), length()); }
-#endif // GTEST_HAS_GLOBAL_STRING
-
- // Returns true iff this is an empty string (i.e. "").
- bool empty() const { return (c_str() != NULL) && (length() == 0); }
-
- // Compares this with another String.
- // Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0
- // if this is greater than rhs.
- int Compare(const String& rhs) const;
-
- // Returns true iff this String equals the given C string. A NULL
- // string and a non-NULL string are considered not equal.
- bool operator==(const char* a_c_str) const { return Compare(a_c_str) == 0; }
-
- // Returns true iff this String is less than the given String. A
- // NULL string is considered less than "".
- bool operator<(const String& rhs) const { return Compare(rhs) < 0; }
-
- // Returns true iff this String doesn't equal the given C string. A NULL
- // string and a non-NULL string are considered not equal.
- bool operator!=(const char* a_c_str) const { return !(*this == a_c_str); }
-
- // Returns true iff this String ends with the given suffix. *Any*
- // String is considered to end with a NULL or empty suffix.
- bool EndsWith(const char* suffix) const;
-
- // Returns true iff this String ends with the given suffix, not considering
- // case. Any String is considered to end with a NULL or empty suffix.
- bool EndsWithCaseInsensitive(const char* suffix) const;
-
- // Returns the length of the encapsulated string, or 0 if the
- // string is NULL.
- size_t length() const { return length_; }
-
- // Gets the 0-terminated C string this String object represents.
- // The String object still owns the string. Therefore the caller
- // should NOT delete the return value.
- const char* c_str() const { return c_str_; }
-
- // Assigns a C string to this object. Self-assignment works.
- const String& operator=(const char* a_c_str) {
- return *this = String(a_c_str);
- }
-
- // Assigns a String object to this object. Self-assignment works.
- const String& operator=(const String& rhs) {
- if (this != &rhs) {
- delete[] c_str_;
- if (rhs.c_str() == NULL) {
- c_str_ = NULL;
- length_ = 0;
- } else {
- ConstructNonNull(rhs.c_str(), rhs.length());
- }
- }
-
- return *this;
- }
-
- private:
- // Constructs a non-NULL String from the given content. This
- // function can only be called when c_str_ has not been allocated.
- // ConstructNonNull(NULL, 0) results in an empty string ("").
- // ConstructNonNull(NULL, non_zero) is undefined behavior.
- void ConstructNonNull(const char* buffer, size_t a_length) {
- char* const str = new char[a_length + 1];
- memcpy(str, buffer, a_length);
- str[a_length] = '\0';
- c_str_ = str;
- length_ = a_length;
- }
-
- const char* c_str_;
- size_t length_;
-}; // class String
-
-// Streams a String to an ostream. Each '\0' character in the String
-// is replaced with "\\0".
-inline ::std::ostream& operator<<(::std::ostream& os, const String& str) {
- if (str.c_str() == NULL) {
- os << "(null)";
- } else {
- const char* const c_str = str.c_str();
- for (size_t i = 0; i != str.length(); i++) {
- if (c_str[i] == '\0') {
- os << "\\0";
- } else {
- os << c_str[i];
- }
- }
- }
- return os;
-}
-
-// Gets the content of the stringstream's buffer as a String. Each '\0'
-// character in the buffer is replaced with "\\0".
-GTEST_API_ String StringStreamToString(::std::stringstream* stream);
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-
-// Declared here but defined in gtest.h, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable);
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: keith.ray@gmail.com (Keith Ray)
-//
-// Google Test filepath utilities
-//
-// This header file declares classes and functions used internally by
-// Google Test. They are subject to change without notice.
-//
-// This file is #included in <gtest/internal/gtest-internal.h>.
-// Do not include this header file separately!
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-
-
-namespace testing {
-namespace internal {
-
-// FilePath - a class for file and directory pathname manipulation which
-// handles platform-specific conventions (like the pathname separator).
-// Used for helper functions for naming files in a directory for xml output.
-// Except for Set methods, all methods are const or static, which provides an
-// "immutable value object" -- useful for peace of mind.
-// A FilePath with a value ending in a path separator ("like/this/") represents
-// a directory, otherwise it is assumed to represent a file. In either case,
-// it may or may not represent an actual file or directory in the file system.
-// Names are NOT checked for syntax correctness -- no checking for illegal
-// characters, malformed paths, etc.
-
-class GTEST_API_ FilePath {
- public:
- FilePath() : pathname_("") { }
- FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
-
- explicit FilePath(const char* pathname) : pathname_(pathname) {
- Normalize();
- }
-
- explicit FilePath(const String& pathname) : pathname_(pathname) {
- Normalize();
- }
-
- FilePath& operator=(const FilePath& rhs) {
- Set(rhs);
- return *this;
- }
-
- void Set(const FilePath& rhs) {
- pathname_ = rhs.pathname_;
- }
-
- String ToString() const { return pathname_; }
- const char* c_str() const { return pathname_.c_str(); }
-
- // Returns the current working directory, or "" if unsuccessful.
- static FilePath GetCurrentDir();
-
- // Given directory = "dir", base_name = "test", number = 0,
- // extension = "xml", returns "dir/test.xml". If number is greater
- // than zero (e.g., 12), returns "dir/test_12.xml".
- // On Windows platform, uses \ as the separator rather than /.
- static FilePath MakeFileName(const FilePath& directory,
- const FilePath& base_name,
- int number,
- const char* extension);
-
- // Given directory = "dir", relative_path = "test.xml",
- // returns "dir/test.xml".
- // On Windows, uses \ as the separator rather than /.
- static FilePath ConcatPaths(const FilePath& directory,
- const FilePath& relative_path);
-
- // Returns a pathname for a file that does not currently exist. The pathname
- // will be directory/base_name.extension or
- // directory/base_name_<number>.extension if directory/base_name.extension
- // already exists. The number will be incremented until a pathname is found
- // that does not already exist.
- // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
- // There could be a race condition if two or more processes are calling this
- // function at the same time -- they could both pick the same filename.
- static FilePath GenerateUniqueFileName(const FilePath& directory,
- const FilePath& base_name,
- const char* extension);
-
- // Returns true iff the path is NULL or "".
- bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; }
-
- // If input name has a trailing separator character, removes it and returns
- // the name, otherwise return the name string unmodified.
- // On Windows platform, uses \ as the separator, other platforms use /.
- FilePath RemoveTrailingPathSeparator() const;
-
- // Returns a copy of the FilePath with the directory part removed.
- // Example: FilePath("path/to/file").RemoveDirectoryName() returns
- // FilePath("file"). If there is no directory part ("just_a_file"), it returns
- // the FilePath unmodified. If there is no file part ("just_a_dir/") it
- // returns an empty FilePath ("").
- // On Windows platform, '\' is the path separator, otherwise it is '/'.
- FilePath RemoveDirectoryName() const;
-
- // RemoveFileName returns the directory path with the filename removed.
- // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
- // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
- // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
- // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
- // On Windows platform, '\' is the path separator, otherwise it is '/'.
- FilePath RemoveFileName() const;
-
- // Returns a copy of the FilePath with the case-insensitive extension removed.
- // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
- // FilePath("dir/file"). If a case-insensitive extension is not
- // found, returns a copy of the original FilePath.
- FilePath RemoveExtension(const char* extension) const;
-
- // Creates directories so that path exists. Returns true if successful or if
- // the directories already exist; returns false if unable to create
- // directories for any reason. Will also return false if the FilePath does
- // not represent a directory (that is, it doesn't end with a path separator).
- bool CreateDirectoriesRecursively() const;
-
- // Create the directory so that path exists. Returns true if successful or
- // if the directory already exists; returns false if unable to create the
- // directory for any reason, including if the parent directory does not
- // exist. Not named "CreateDirectory" because that's a macro on Windows.
- bool CreateFolder() const;
-
- // Returns true if FilePath describes something in the file-system,
- // either a file, directory, or whatever, and that something exists.
- bool FileOrDirectoryExists() const;
-
- // Returns true if pathname describes a directory in the file-system
- // that exists.
- bool DirectoryExists() const;
-
- // Returns true if FilePath ends with a path separator, which indicates that
- // it is intended to represent a directory. Returns false otherwise.
- // This does NOT check that a directory (or file) actually exists.
- bool IsDirectory() const;
-
- // Returns true if pathname describes a root directory. (Windows has one
- // root directory per disk drive.)
- bool IsRootDirectory() const;
-
- // Returns true if pathname describes an absolute path.
- bool IsAbsolutePath() const;
-
- private:
- // Replaces multiple consecutive separators with a single separator.
- // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
- // redundancies that might be in a pathname involving "." or "..".
- //
- // A pathname with multiple consecutive separators may occur either through
- // user error or as a result of some scripts or APIs that generate a pathname
- // with a trailing separator. On other platforms the same API or script
- // may NOT generate a pathname with a trailing "/". Then elsewhere that
- // pathname may have another "/" and pathname components added to it,
- // without checking for the separator already being there.
- // The script language and operating system may allow paths like "foo//bar"
- // but some of the functions in FilePath will not handle that correctly. In
- // particular, RemoveTrailingPathSeparator() only removes one separator, and
- // it is called in CreateDirectoriesRecursively() assuming that it will change
- // a pathname from directory syntax (trailing separator) to filename syntax.
- //
- // On Windows this method also replaces the alternate path separator '/' with
- // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
- // "bar\\foo".
-
- void Normalize();
-
- // Returns a pointer to the last occurence of a valid path separator in
- // the FilePath. On Windows, for example, both '/' and '\' are valid path
- // separators. Returns NULL if no path separator was found.
- const char* FindLastPathSeparator() const;
-
- String pathname_;
-}; // class FilePath
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-// This file was GENERATED by command:
-// pump.py gtest-type-util.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Type utilities needed for implementing typed and type-parameterized
-// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently we support at most 50 types in a list, and at most 50
-// type-parameterized tests in one type-parameterized test case.
-// Please contact googletestframework@googlegroups.com if you need
-// more.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-
-// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
-// libstdc++ (which is where cxxabi.h comes from).
-# ifdef __GLIBCXX__
-# include <cxxabi.h>
-# elif defined(__HP_aCC)
-# include <acxx_demangle.h>
-# endif // __GLIBCXX__
-
-namespace testing {
-namespace internal {
-
-// GetTypeName<T>() returns a human-readable name of type T.
-// NB: This function is also used in Google Mock, so don't move it inside of
-// the typed-test-only section below.
-template <typename T>
-String GetTypeName() {
-# if GTEST_HAS_RTTI
-
- const char* const name = typeid(T).name();
-# if defined(__GLIBCXX__) || defined(__HP_aCC)
- int status = 0;
- // gcc's implementation of typeid(T).name() mangles the type name,
- // so we have to demangle it.
-# ifdef __GLIBCXX__
- using abi::__cxa_demangle;
-# endif // __GLIBCXX__
- char* const readable_name = __cxa_demangle(name, 0, 0, &status);
- const String name_str(status == 0 ? readable_name : name);
- free(readable_name);
- return name_str;
-# else
- return name;
-# endif // __GLIBCXX__ || __HP_aCC
-
-# else
-
- return "<type>";
-
-# endif // GTEST_HAS_RTTI
-}
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
-// type. This can be used as a compile-time assertion to ensure that
-// two types are equal.
-
-template <typename T1, typename T2>
-struct AssertTypeEq;
-
-template <typename T>
-struct AssertTypeEq<T, T> {
- typedef bool type;
-};
-
-// A unique type used as the default value for the arguments of class
-// template Types. This allows us to simulate variadic templates
-// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
-// support directly.
-struct None {};
-
-// The following family of struct and struct templates are used to
-// represent type lists. In particular, TypesN<T1, T2, ..., TN>
-// represents a type list with N types (T1, T2, ..., and TN) in it.
-// Except for Types0, every struct in the family has two member types:
-// Head for the first type in the list, and Tail for the rest of the
-// list.
-
-// The empty type list.
-struct Types0 {};
-
-// Type lists of length 1, 2, 3, and so on.
-
-template <typename T1>
-struct Types1 {
- typedef T1 Head;
- typedef Types0 Tail;
-};
-template <typename T1, typename T2>
-struct Types2 {
- typedef T1 Head;
- typedef Types1<T2> Tail;
-};
-
-template <typename T1, typename T2, typename T3>
-struct Types3 {
- typedef T1 Head;
- typedef Types2<T2, T3> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-struct Types4 {
- typedef T1 Head;
- typedef Types3<T2, T3, T4> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-struct Types5 {
- typedef T1 Head;
- typedef Types4<T2, T3, T4, T5> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-struct Types6 {
- typedef T1 Head;
- typedef Types5<T2, T3, T4, T5, T6> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-struct Types7 {
- typedef T1 Head;
- typedef Types6<T2, T3, T4, T5, T6, T7> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-struct Types8 {
- typedef T1 Head;
- typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-struct Types9 {
- typedef T1 Head;
- typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-struct Types10 {
- typedef T1 Head;
- typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-struct Types11 {
- typedef T1 Head;
- typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-struct Types12 {
- typedef T1 Head;
- typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-struct Types13 {
- typedef T1 Head;
- typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-struct Types14 {
- typedef T1 Head;
- typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-struct Types15 {
- typedef T1 Head;
- typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-struct Types16 {
- typedef T1 Head;
- typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-struct Types17 {
- typedef T1 Head;
- typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-struct Types18 {
- typedef T1 Head;
- typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-struct Types19 {
- typedef T1 Head;
- typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-struct Types20 {
- typedef T1 Head;
- typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-struct Types21 {
- typedef T1 Head;
- typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-struct Types22 {
- typedef T1 Head;
- typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-struct Types23 {
- typedef T1 Head;
- typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-struct Types24 {
- typedef T1 Head;
- typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-struct Types25 {
- typedef T1 Head;
- typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-struct Types26 {
- typedef T1 Head;
- typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-struct Types27 {
- typedef T1 Head;
- typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-struct Types28 {
- typedef T1 Head;
- typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-struct Types29 {
- typedef T1 Head;
- typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-struct Types30 {
- typedef T1 Head;
- typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-struct Types31 {
- typedef T1 Head;
- typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-struct Types32 {
- typedef T1 Head;
- typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-struct Types33 {
- typedef T1 Head;
- typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-struct Types34 {
- typedef T1 Head;
- typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-struct Types35 {
- typedef T1 Head;
- typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-struct Types36 {
- typedef T1 Head;
- typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-struct Types37 {
- typedef T1 Head;
- typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-struct Types38 {
- typedef T1 Head;
- typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-struct Types39 {
- typedef T1 Head;
- typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-struct Types40 {
- typedef T1 Head;
- typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-struct Types41 {
- typedef T1 Head;
- typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-struct Types42 {
- typedef T1 Head;
- typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-struct Types43 {
- typedef T1 Head;
- typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-struct Types44 {
- typedef T1 Head;
- typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-struct Types45 {
- typedef T1 Head;
- typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-struct Types46 {
- typedef T1 Head;
- typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-struct Types47 {
- typedef T1 Head;
- typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-struct Types48 {
- typedef T1 Head;
- typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-struct Types49 {
- typedef T1 Head;
- typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-struct Types50 {
- typedef T1 Head;
- typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> Tail;
-};
-
-
-} // namespace internal
-
-// We don't want to require the users to write TypesN<...> directly,
-// as that would require them to count the length. Types<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Types<int>
-// will appear as Types<int, None, None, ..., None> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Types<T1, ..., TN>, and Google Test will translate
-// that to TypesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Types template.
-template <typename T1 = internal::None, typename T2 = internal::None,
- typename T3 = internal::None, typename T4 = internal::None,
- typename T5 = internal::None, typename T6 = internal::None,
- typename T7 = internal::None, typename T8 = internal::None,
- typename T9 = internal::None, typename T10 = internal::None,
- typename T11 = internal::None, typename T12 = internal::None,
- typename T13 = internal::None, typename T14 = internal::None,
- typename T15 = internal::None, typename T16 = internal::None,
- typename T17 = internal::None, typename T18 = internal::None,
- typename T19 = internal::None, typename T20 = internal::None,
- typename T21 = internal::None, typename T22 = internal::None,
- typename T23 = internal::None, typename T24 = internal::None,
- typename T25 = internal::None, typename T26 = internal::None,
- typename T27 = internal::None, typename T28 = internal::None,
- typename T29 = internal::None, typename T30 = internal::None,
- typename T31 = internal::None, typename T32 = internal::None,
- typename T33 = internal::None, typename T34 = internal::None,
- typename T35 = internal::None, typename T36 = internal::None,
- typename T37 = internal::None, typename T38 = internal::None,
- typename T39 = internal::None, typename T40 = internal::None,
- typename T41 = internal::None, typename T42 = internal::None,
- typename T43 = internal::None, typename T44 = internal::None,
- typename T45 = internal::None, typename T46 = internal::None,
- typename T47 = internal::None, typename T48 = internal::None,
- typename T49 = internal::None, typename T50 = internal::None>
-struct Types {
- typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
-};
-
-template <>
-struct Types<internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types0 type;
-};
-template <typename T1>
-struct Types<T1, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types1<T1> type;
-};
-template <typename T1, typename T2>
-struct Types<T1, T2, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types2<T1, T2> type;
-};
-template <typename T1, typename T2, typename T3>
-struct Types<T1, T2, T3, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types3<T1, T2, T3> type;
-};
-template <typename T1, typename T2, typename T3, typename T4>
-struct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types4<T1, T2, T3, T4> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-struct Types<T1, T2, T3, T4, T5, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types5<T1, T2, T3, T4, T5> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-struct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-struct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, internal::None, internal::None, internal::None> {
- typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, T48, internal::None, internal::None> {
- typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, T48, T49, internal::None> {
- typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49> type;
-};
-
-namespace internal {
-
-# define GTEST_TEMPLATE_ template <typename T> class
-
-// The template "selector" struct TemplateSel<Tmpl> is used to
-// represent Tmpl, which must be a class template with one type
-// parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
-// as the type Tmpl<T>. This allows us to actually instantiate the
-// template "selected" by TemplateSel<Tmpl>.
-//
-// This trick is necessary for simulating typedef for class templates,
-// which C++ doesn't support directly.
-template <GTEST_TEMPLATE_ Tmpl>
-struct TemplateSel {
- template <typename T>
- struct Bind {
- typedef Tmpl<T> type;
- };
-};
-
-# define GTEST_BIND_(TmplSel, T) \
- TmplSel::template Bind<T>::type
-
-// A unique struct template used as the default value for the
-// arguments of class template Templates. This allows us to simulate
-// variadic templates (e.g. Templates<int>, Templates<int, double>,
-// and etc), which C++ doesn't support directly.
-template <typename T>
-struct NoneT {};
-
-// The following family of struct and struct templates are used to
-// represent template lists. In particular, TemplatesN<T1, T2, ...,
-// TN> represents a list of N templates (T1, T2, ..., and TN). Except
-// for Templates0, every struct in the family has two member types:
-// Head for the selector of the first template in the list, and Tail
-// for the rest of the list.
-
-// The empty template list.
-struct Templates0 {};
-
-// Template lists of length 1, 2, 3, and so on.
-
-template <GTEST_TEMPLATE_ T1>
-struct Templates1 {
- typedef TemplateSel<T1> Head;
- typedef Templates0 Tail;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
-struct Templates2 {
- typedef TemplateSel<T1> Head;
- typedef Templates1<T2> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
-struct Templates3 {
- typedef TemplateSel<T1> Head;
- typedef Templates2<T2, T3> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4>
-struct Templates4 {
- typedef TemplateSel<T1> Head;
- typedef Templates3<T2, T3, T4> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
-struct Templates5 {
- typedef TemplateSel<T1> Head;
- typedef Templates4<T2, T3, T4, T5> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
-struct Templates6 {
- typedef TemplateSel<T1> Head;
- typedef Templates5<T2, T3, T4, T5, T6> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7>
-struct Templates7 {
- typedef TemplateSel<T1> Head;
- typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
-struct Templates8 {
- typedef TemplateSel<T1> Head;
- typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
-struct Templates9 {
- typedef TemplateSel<T1> Head;
- typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10>
-struct Templates10 {
- typedef TemplateSel<T1> Head;
- typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
-struct Templates11 {
- typedef TemplateSel<T1> Head;
- typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
-struct Templates12 {
- typedef TemplateSel<T1> Head;
- typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13>
-struct Templates13 {
- typedef TemplateSel<T1> Head;
- typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
-struct Templates14 {
- typedef TemplateSel<T1> Head;
- typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
-struct Templates15 {
- typedef TemplateSel<T1> Head;
- typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16>
-struct Templates16 {
- typedef TemplateSel<T1> Head;
- typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
-struct Templates17 {
- typedef TemplateSel<T1> Head;
- typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
-struct Templates18 {
- typedef TemplateSel<T1> Head;
- typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19>
-struct Templates19 {
- typedef TemplateSel<T1> Head;
- typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
-struct Templates20 {
- typedef TemplateSel<T1> Head;
- typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
-struct Templates21 {
- typedef TemplateSel<T1> Head;
- typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22>
-struct Templates22 {
- typedef TemplateSel<T1> Head;
- typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
-struct Templates23 {
- typedef TemplateSel<T1> Head;
- typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
-struct Templates24 {
- typedef TemplateSel<T1> Head;
- typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25>
-struct Templates25 {
- typedef TemplateSel<T1> Head;
- typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
-struct Templates26 {
- typedef TemplateSel<T1> Head;
- typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
-struct Templates27 {
- typedef TemplateSel<T1> Head;
- typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28>
-struct Templates28 {
- typedef TemplateSel<T1> Head;
- typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
-struct Templates29 {
- typedef TemplateSel<T1> Head;
- typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
-struct Templates30 {
- typedef TemplateSel<T1> Head;
- typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31>
-struct Templates31 {
- typedef TemplateSel<T1> Head;
- typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
-struct Templates32 {
- typedef TemplateSel<T1> Head;
- typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
-struct Templates33 {
- typedef TemplateSel<T1> Head;
- typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34>
-struct Templates34 {
- typedef TemplateSel<T1> Head;
- typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
-struct Templates35 {
- typedef TemplateSel<T1> Head;
- typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
-struct Templates36 {
- typedef TemplateSel<T1> Head;
- typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37>
-struct Templates37 {
- typedef TemplateSel<T1> Head;
- typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
-struct Templates38 {
- typedef TemplateSel<T1> Head;
- typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
-struct Templates39 {
- typedef TemplateSel<T1> Head;
- typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40>
-struct Templates40 {
- typedef TemplateSel<T1> Head;
- typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
-struct Templates41 {
- typedef TemplateSel<T1> Head;
- typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
-struct Templates42 {
- typedef TemplateSel<T1> Head;
- typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43>
-struct Templates43 {
- typedef TemplateSel<T1> Head;
- typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
-struct Templates44 {
- typedef TemplateSel<T1> Head;
- typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
-struct Templates45 {
- typedef TemplateSel<T1> Head;
- typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46>
-struct Templates46 {
- typedef TemplateSel<T1> Head;
- typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
-struct Templates47 {
- typedef TemplateSel<T1> Head;
- typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
-struct Templates48 {
- typedef TemplateSel<T1> Head;
- typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49>
-struct Templates49 {
- typedef TemplateSel<T1> Head;
- typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48, T49> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>
-struct Templates50 {
- typedef TemplateSel<T1> Head;
- typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48, T49, T50> Tail;
-};
-
-
-// We don't want to require the users to write TemplatesN<...> directly,
-// as that would require them to count the length. Templates<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Templates<list>
-// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Templates<T1, ..., TN>, and Google Test will translate
-// that to TemplatesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Templates template.
-template <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,
- GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,
- GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,
- GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,
- GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,
- GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,
- GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,
- GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,
- GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,
- GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,
- GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,
- GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,
- GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,
- GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,
- GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,
- GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,
- GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,
- GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,
- GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,
- GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,
- GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,
- GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,
- GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,
- GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,
- GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>
-struct Templates {
- typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
-};
-
-template <>
-struct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates0 type;
-};
-template <GTEST_TEMPLATE_ T1>
-struct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates1<T1> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
-struct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates2<T1, T2> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
-struct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates3<T1, T2, T3> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4>
-struct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates4<T1, T2, T3, T4> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
-struct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates5<T1, T2, T3, T4, T5> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
-struct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates6<T1, T2, T3, T4, T5, T6> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, NoneT, NoneT, NoneT> {
- typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, T48, NoneT, NoneT> {
- typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, T48, T49, NoneT> {
- typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48, T49> type;
-};
-
-// The TypeList template makes it possible to use either a single type
-// or a Types<...> list in TYPED_TEST_CASE() and
-// INSTANTIATE_TYPED_TEST_CASE_P().
-
-template <typename T>
-struct TypeList { typedef Types1<T> type; };
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-struct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> > {
- typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-// Due to C++ preprocessor weirdness, we need double indirection to
-// concatenate two tokens when one of them is __LINE__. Writing
-//
-// foo ## __LINE__
-//
-// will result in the token foo__LINE__, instead of foo followed by
-// the current line number. For more details, see
-// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
-#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
-#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
-
-// Google Test defines the testing::Message class to allow construction of
-// test messages via the << operator. The idea is that anything
-// streamable to std::ostream can be streamed to a testing::Message.
-// This allows a user to use his own types in Google Test assertions by
-// overloading the << operator.
-//
-// util/gtl/stl_logging-inl.h overloads << for STL containers. These
-// overloads cannot be defined in the std namespace, as that will be
-// undefined behavior. Therefore, they are defined in the global
-// namespace instead.
-//
-// C++'s symbol lookup rule (i.e. Koenig lookup) says that these
-// overloads are visible in either the std namespace or the global
-// namespace, but not other namespaces, including the testing
-// namespace which Google Test's Message class is in.
-//
-// To allow STL containers (and other types that has a << operator
-// defined in the global namespace) to be used in Google Test assertions,
-// testing::Message must access the custom << operator from the global
-// namespace. Hence this helper function.
-//
-// Note: Jeffrey Yasskin suggested an alternative fix by "using
-// ::operator<<;" in the definition of Message's operator<<. That fix
-// doesn't require a helper function, but unfortunately doesn't
-// compile with MSVC.
-template <typename T>
-inline void GTestStreamToHelper(std::ostream* os, const T& val) {
- *os << val;
-}
-
-class ProtocolMessage;
-namespace proto2 { class Message; }
-
-namespace testing {
-
-// Forward declarations.
-
-class AssertionResult; // Result of an assertion.
-class Message; // Represents a failure message.
-class Test; // Represents a test.
-class TestInfo; // Information about a test.
-class TestPartResult; // Result of a test part.
-class UnitTest; // A collection of test cases.
-
-template <typename T>
-::std::string PrintToString(const T& value);
-
-namespace internal {
-
-struct TraceInfo; // Information about a trace point.
-class ScopedTrace; // Implements scoped trace.
-class TestInfoImpl; // Opaque implementation of TestInfo
-class UnitTestImpl; // Opaque implementation of UnitTest
-
-// How many times InitGoogleTest() has been called.
-extern int g_init_gtest_count;
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-GTEST_API_ extern const char kStackTraceMarker[];
-
-// A secret type that Google Test users don't know about. It has no
-// definition on purpose. Therefore it's impossible to create a
-// Secret object, which is what we want.
-class Secret;
-
-// Two overloaded helpers for checking at compile time whether an
-// expression is a null pointer literal (i.e. NULL or any 0-valued
-// compile-time integral constant). Their return values have
-// different sizes, so we can use sizeof() to test which version is
-// picked by the compiler. These helpers have no implementations, as
-// we only need their signatures.
-//
-// Given IsNullLiteralHelper(x), the compiler will pick the first
-// version if x can be implicitly converted to Secret*, and pick the
-// second version otherwise. Since Secret is a secret and incomplete
-// type, the only expression a user can write that has type Secret* is
-// a null pointer literal. Therefore, we know that x is a null
-// pointer literal if and only if the first version is picked by the
-// compiler.
-char IsNullLiteralHelper(Secret* p);
-char (&IsNullLiteralHelper(...))[2]; // NOLINT
-
-// A compile-time bool constant that is true if and only if x is a
-// null pointer literal (i.e. NULL or any 0-valued compile-time
-// integral constant).
-#ifdef GTEST_ELLIPSIS_NEEDS_POD_
-// We lose support for NULL detection where the compiler doesn't like
-// passing non-POD classes through ellipsis (...).
-# define GTEST_IS_NULL_LITERAL_(x) false
-#else
-# define GTEST_IS_NULL_LITERAL_(x) \
- (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
-#endif // GTEST_ELLIPSIS_NEEDS_POD_
-
-// Appends the user-supplied message to the Google-Test-generated message.
-GTEST_API_ String AppendUserMessage(const String& gtest_msg,
- const Message& user_msg);
-
-// A helper class for creating scoped traces in user programs.
-class GTEST_API_ ScopedTrace {
- public:
- // The c'tor pushes the given source file location and message onto
- // a trace stack maintained by Google Test.
- ScopedTrace(const char* file, int line, const Message& message);
-
- // The d'tor pops the info pushed by the c'tor.
- //
- // Note that the d'tor is not virtual in order to be efficient.
- // Don't inherit from ScopedTrace!
- ~ScopedTrace();
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
-} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
- // c'tor and d'tor. Therefore it doesn't
- // need to be used otherwise.
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-// Declared here but defined in gtest.h, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable);
-
-// The Symbian compiler has a bug that prevents it from selecting the
-// correct overload of FormatForComparisonFailureMessage (see below)
-// unless we pass the first argument by reference. If we do that,
-// however, Visual Age C++ 10.1 generates a compiler error. Therefore
-// we only apply the work-around for Symbian.
-#if defined(__SYMBIAN32__)
-# define GTEST_CREF_WORKAROUND_ const&
-#else
-# define GTEST_CREF_WORKAROUND_
-#endif
-
-// When this operand is a const char* or char*, if the other operand
-// is a ::std::string or ::string, we print this operand as a C string
-// rather than a pointer (we do the same for wide strings); otherwise
-// we print it as a pointer to be safe.
-
-// This internal macro is used to avoid duplicated code.
-#define GTEST_FORMAT_IMPL_(operand2_type, operand1_printer)\
-inline String FormatForComparisonFailureMessage(\
- operand2_type::value_type* GTEST_CREF_WORKAROUND_ str, \
- const operand2_type& /*operand2*/) {\
- return operand1_printer(str);\
-}\
-inline String FormatForComparisonFailureMessage(\
- const operand2_type::value_type* GTEST_CREF_WORKAROUND_ str, \
- const operand2_type& /*operand2*/) {\
- return operand1_printer(str);\
-}
-
-GTEST_FORMAT_IMPL_(::std::string, String::ShowCStringQuoted)
-#if GTEST_HAS_STD_WSTRING
-GTEST_FORMAT_IMPL_(::std::wstring, String::ShowWideCStringQuoted)
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_FORMAT_IMPL_(::string, String::ShowCStringQuoted)
-#endif // GTEST_HAS_GLOBAL_STRING
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_FORMAT_IMPL_(::wstring, String::ShowWideCStringQuoted)
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#undef GTEST_FORMAT_IMPL_
-
-// The next four overloads handle the case where the operand being
-// printed is a char/wchar_t pointer and the other operand is not a
-// string/wstring object. In such cases, we just print the operand as
-// a pointer to be safe.
-#define GTEST_FORMAT_CHAR_PTR_IMPL_(CharType) \
- template <typename T> \
- String FormatForComparisonFailureMessage(CharType* GTEST_CREF_WORKAROUND_ p, \
- const T&) { \
- return PrintToString(static_cast<const void*>(p)); \
- }
-
-GTEST_FORMAT_CHAR_PTR_IMPL_(char)
-GTEST_FORMAT_CHAR_PTR_IMPL_(const char)
-GTEST_FORMAT_CHAR_PTR_IMPL_(wchar_t)
-GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t)
-
-#undef GTEST_FORMAT_CHAR_PTR_IMPL_
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings. For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-// expected_expression: "foo"
-// actual_expression: "bar"
-// expected_value: "5"
-// actual_value: "6"
-//
-// The ignoring_case parameter is true iff the assertion is a
-// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
- const char* actual_expression,
- const String& expected_value,
- const String& actual_value,
- bool ignoring_case);
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-GTEST_API_ String GetBoolAssertionFailureMessage(
- const AssertionResult& assertion_result,
- const char* expression_text,
- const char* actual_predicate_value,
- const char* expected_predicate_value);
-
-// This template class represents an IEEE floating-point number
-// (either single-precision or double-precision, depending on the
-// template parameters).
-//
-// The purpose of this class is to do more sophisticated number
-// comparison. (Due to round-off error, etc, it's very unlikely that
-// two floating-points will be equal exactly. Hence a naive
-// comparison by the == operation often doesn't work.)
-//
-// Format of IEEE floating-point:
-//
-// The most-significant bit being the leftmost, an IEEE
-// floating-point looks like
-//
-// sign_bit exponent_bits fraction_bits
-//
-// Here, sign_bit is a single bit that designates the sign of the
-// number.
-//
-// For float, there are 8 exponent bits and 23 fraction bits.
-//
-// For double, there are 11 exponent bits and 52 fraction bits.
-//
-// More details can be found at
-// http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
-//
-// Template parameter:
-//
-// RawType: the raw floating-point type (either float or double)
-template <typename RawType>
-class FloatingPoint {
- public:
- // Defines the unsigned integer type that has the same size as the
- // floating point number.
- typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;
-
- // Constants.
-
- // # of bits in a number.
- static const size_t kBitCount = 8*sizeof(RawType);
-
- // # of fraction bits in a number.
- static const size_t kFractionBitCount =
- std::numeric_limits<RawType>::digits - 1;
-
- // # of exponent bits in a number.
- static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
-
- // The mask for the sign bit.
- static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
-
- // The mask for the fraction bits.
- static const Bits kFractionBitMask =
- ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
-
- // The mask for the exponent bits.
- static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
-
- // How many ULP's (Units in the Last Place) we want to tolerate when
- // comparing two numbers. The larger the value, the more error we
- // allow. A 0 value means that two numbers must be exactly the same
- // to be considered equal.
- //
- // The maximum error of a single floating-point operation is 0.5
- // units in the last place. On Intel CPU's, all floating-point
- // calculations are done with 80-bit precision, while double has 64
- // bits. Therefore, 4 should be enough for ordinary use.
- //
- // See the following article for more details on ULP:
- // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm.
- static const size_t kMaxUlps = 4;
-
- // Constructs a FloatingPoint from a raw floating-point number.
- //
- // On an Intel CPU, passing a non-normalized NAN (Not a Number)
- // around may change its bits, although the new value is guaranteed
- // to be also a NAN. Therefore, don't expect this constructor to
- // preserve the bits in x when x is a NAN.
- explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
-
- // Static methods
-
- // Reinterprets a bit pattern as a floating-point number.
- //
- // This function is needed to test the AlmostEquals() method.
- static RawType ReinterpretBits(const Bits bits) {
- FloatingPoint fp(0);
- fp.u_.bits_ = bits;
- return fp.u_.value_;
- }
-
- // Returns the floating-point number that represent positive infinity.
- static RawType Infinity() {
- return ReinterpretBits(kExponentBitMask);
- }
-
- // Non-static methods
-
- // Returns the bits that represents this number.
- const Bits &bits() const { return u_.bits_; }
-
- // Returns the exponent bits of this number.
- Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
-
- // Returns the fraction bits of this number.
- Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
-
- // Returns the sign bit of this number.
- Bits sign_bit() const { return kSignBitMask & u_.bits_; }
-
- // Returns true iff this is NAN (not a number).
- bool is_nan() const {
- // It's a NAN if the exponent bits are all ones and the fraction
- // bits are not entirely zeros.
- return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
- }
-
- // Returns true iff this number is at most kMaxUlps ULP's away from
- // rhs. In particular, this function:
- //
- // - returns false if either number is (or both are) NAN.
- // - treats really large numbers as almost equal to infinity.
- // - thinks +0.0 and -0.0 are 0 DLP's apart.
- bool AlmostEquals(const FloatingPoint& rhs) const {
- // The IEEE standard says that any comparison operation involving
- // a NAN must return false.
- if (is_nan() || rhs.is_nan()) return false;
-
- return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
- <= kMaxUlps;
- }
-
- private:
- // The data type used to store the actual floating-point number.
- union FloatingPointUnion {
- RawType value_; // The raw floating-point number.
- Bits bits_; // The bits that represent the number.
- };
-
- // Converts an integer from the sign-and-magnitude representation to
- // the biased representation. More precisely, let N be 2 to the
- // power of (kBitCount - 1), an integer x is represented by the
- // unsigned number x + N.
- //
- // For instance,
- //
- // -N + 1 (the most negative number representable using
- // sign-and-magnitude) is represented by 1;
- // 0 is represented by N; and
- // N - 1 (the biggest number representable using
- // sign-and-magnitude) is represented by 2N - 1.
- //
- // Read http://en.wikipedia.org/wiki/Signed_number_representations
- // for more details on signed number representations.
- static Bits SignAndMagnitudeToBiased(const Bits &sam) {
- if (kSignBitMask & sam) {
- // sam represents a negative number.
- return ~sam + 1;
- } else {
- // sam represents a positive number.
- return kSignBitMask | sam;
- }
- }
-
- // Given two numbers in the sign-and-magnitude representation,
- // returns the distance between them as an unsigned number.
- static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,
- const Bits &sam2) {
- const Bits biased1 = SignAndMagnitudeToBiased(sam1);
- const Bits biased2 = SignAndMagnitudeToBiased(sam2);
- return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
- }
-
- FloatingPointUnion u_;
-};
-
-// Typedefs the instances of the FloatingPoint template class that we
-// care to use.
-typedef FloatingPoint<float> Float;
-typedef FloatingPoint<double> Double;
-
-// In order to catch the mistake of putting tests that use different
-// test fixture classes in the same test case, we need to assign
-// unique IDs to fixture classes and compare them. The TypeId type is
-// used to hold such IDs. The user should treat TypeId as an opaque
-// type: the only operation allowed on TypeId values is to compare
-// them for equality using the == operator.
-typedef const void* TypeId;
-
-template <typename T>
-class TypeIdHelper {
- public:
- // dummy_ must not have a const type. Otherwise an overly eager
- // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
- // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
- static bool dummy_;
-};
-
-template <typename T>
-bool TypeIdHelper<T>::dummy_ = false;
-
-// GetTypeId<T>() returns the ID of type T. Different values will be
-// returned for different types. Calling the function twice with the
-// same type argument is guaranteed to return the same ID.
-template <typename T>
-TypeId GetTypeId() {
- // The compiler is required to allocate a different
- // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
- // the template. Therefore, the address of dummy_ is guaranteed to
- // be unique.
- return &(TypeIdHelper<T>::dummy_);
-}
-
-// Returns the type ID of ::testing::Test. Always call this instead
-// of GetTypeId< ::testing::Test>() to get the type ID of
-// ::testing::Test, as the latter may give the wrong result due to a
-// suspected linker bug when compiling Google Test as a Mac OS X
-// framework.
-GTEST_API_ TypeId GetTestTypeId();
-
-// Defines the abstract factory interface that creates instances
-// of a Test object.
-class TestFactoryBase {
- public:
- virtual ~TestFactoryBase() {}
-
- // Creates a test instance to run. The instance is both created and destroyed
- // within TestInfoImpl::Run()
- virtual Test* CreateTest() = 0;
-
- protected:
- TestFactoryBase() {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);
-};
-
-// This class provides implementation of TeastFactoryBase interface.
-// It is used in TEST and TEST_F macros.
-template <class TestClass>
-class TestFactoryImpl : public TestFactoryBase {
- public:
- virtual Test* CreateTest() { return new TestClass; }
-};
-
-#if GTEST_OS_WINDOWS
-
-// Predicate-formatters for implementing the HRESULT checking macros
-// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
-// We pass a long instead of HRESULT to avoid causing an
-// include dependency for the HRESULT type.
-GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
- long hr); // NOLINT
-GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
- long hr); // NOLINT
-
-#endif // GTEST_OS_WINDOWS
-
-// Types of SetUpTestCase() and TearDownTestCase() functions.
-typedef void (*SetUpTestCaseFunc)();
-typedef void (*TearDownTestCaseFunc)();
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// name: name of the test
-// type_param the name of the test's type parameter, or NULL if
-// this is not a typed or a type-parameterized test.
-// value_param text representation of the test's value parameter,
-// or NULL if this is not a type-parameterized test.
-// fixture_class_id: ID of the test fixture class
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-// factory: pointer to the factory that creates a test object.
-// The newly created TestInfo instance will assume
-// ownership of the factory object.
-GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- TypeId fixture_class_id,
- SetUpTestCaseFunc set_up_tc,
- TearDownTestCaseFunc tear_down_tc,
- TestFactoryBase* factory);
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false. None of pstr, *pstr, and prefix can be NULL.
-GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// State of the definition of a type-parameterized test case.
-class GTEST_API_ TypedTestCasePState {
- public:
- TypedTestCasePState() : registered_(false) {}
-
- // Adds the given test name to defined_test_names_ and return true
- // if the test case hasn't been registered; otherwise aborts the
- // program.
- bool AddTestName(const char* file, int line, const char* case_name,
- const char* test_name) {
- if (registered_) {
- fprintf(stderr, "%s Test %s must be defined before "
- "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n",
- FormatFileLocation(file, line).c_str(), test_name, case_name);
- fflush(stderr);
- posix::Abort();
- }
- defined_test_names_.insert(test_name);
- return true;
- }
-
- // Verifies that registered_tests match the test names in
- // defined_test_names_; returns registered_tests if successful, or
- // aborts the program otherwise.
- const char* VerifyRegisteredTestNames(
- const char* file, int line, const char* registered_tests);
-
- private:
- bool registered_;
- ::std::set<const char*> defined_test_names_;
-};
-
-// Skips to the first non-space char after the first comma in 'str';
-// returns NULL if no comma is found in 'str'.
-inline const char* SkipComma(const char* str) {
- const char* comma = strchr(str, ',');
- if (comma == NULL) {
- return NULL;
- }
- while (IsSpace(*(++comma))) {}
- return comma;
-}
-
-// Returns the prefix of 'str' before the first comma in it; returns
-// the entire string if it contains no comma.
-inline String GetPrefixUntilComma(const char* str) {
- const char* comma = strchr(str, ',');
- return comma == NULL ? String(str) : String(str, comma - str);
-}
-
-// TypeParameterizedTest<Fixture, TestSel, Types>::Register()
-// registers a list of type-parameterized tests with Google Test. The
-// return value is insignificant - we just need to return something
-// such that we can call this function in a namespace scope.
-//
-// Implementation note: The GTEST_TEMPLATE_ macro declares a template
-// template parameter. It's defined in gtest-type-util.h.
-template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
-class TypeParameterizedTest {
- public:
- // 'index' is the index of the test in the type list 'Types'
- // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,
- // Types). Valid values for 'index' are [0, N - 1] where N is the
- // length of Types.
- static bool Register(const char* prefix, const char* case_name,
- const char* test_names, int index) {
- typedef typename Types::Head Type;
- typedef Fixture<Type> FixtureClass;
- typedef typename GTEST_BIND_(TestSel, Type) TestClass;
-
- // First, registers the first type-parameterized test in the type
- // list.
- MakeAndRegisterTestInfo(
- String::Format("%s%s%s/%d", prefix, prefix[0] == '\0' ? "" : "/",
- case_name, index).c_str(),
- GetPrefixUntilComma(test_names).c_str(),
- GetTypeName<Type>().c_str(),
- NULL, // No value parameter.
- GetTypeId<FixtureClass>(),
- TestClass::SetUpTestCase,
- TestClass::TearDownTestCase,
- new TestFactoryImpl<TestClass>);
-
- // Next, recurses (at compile time) with the tail of the type list.
- return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>
- ::Register(prefix, case_name, test_names, index + 1);
- }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, class TestSel>
-class TypeParameterizedTest<Fixture, TestSel, Types0> {
- public:
- static bool Register(const char* /*prefix*/, const char* /*case_name*/,
- const char* /*test_names*/, int /*index*/) {
- return true;
- }
-};
-
-// TypeParameterizedTestCase<Fixture, Tests, Types>::Register()
-// registers *all combinations* of 'Tests' and 'Types' with Google
-// Test. The return value is insignificant - we just need to return
-// something such that we can call this function in a namespace scope.
-template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
-class TypeParameterizedTestCase {
- public:
- static bool Register(const char* prefix, const char* case_name,
- const char* test_names) {
- typedef typename Tests::Head Head;
-
- // First, register the first test in 'Test' for each type in 'Types'.
- TypeParameterizedTest<Fixture, Head, Types>::Register(
- prefix, case_name, test_names, 0);
-
- // Next, recurses (at compile time) with the tail of the test list.
- return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>
- ::Register(prefix, case_name, SkipComma(test_names));
- }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, typename Types>
-class TypeParameterizedTestCase<Fixture, Templates0, Types> {
- public:
- static bool Register(const char* /*prefix*/, const char* /*case_name*/,
- const char* /*test_names*/) {
- return true;
- }
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-GTEST_API_ String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test,
- int skip_count);
-
-// Helpers for suppressing warnings on unreachable code or constant
-// condition.
-
-// Always returns true.
-GTEST_API_ bool AlwaysTrue();
-
-// Always returns false.
-inline bool AlwaysFalse() { return !AlwaysTrue(); }
-
-// Helper for suppressing false warning from Clang on a const char*
-// variable declared in a conditional expression always being NULL in
-// the else branch.
-struct GTEST_API_ ConstCharPtr {
- ConstCharPtr(const char* str) : value(str) {}
- operator bool() const { return true; }
- const char* value;
-};
-
-// A simple Linear Congruential Generator for generating random
-// numbers with a uniform distribution. Unlike rand() and srand(), it
-// doesn't use global state (and therefore can't interfere with user
-// code). Unlike rand_r(), it's portable. An LCG isn't very random,
-// but it's good enough for our purposes.
-class GTEST_API_ Random {
- public:
- static const UInt32 kMaxRange = 1u << 31;
-
- explicit Random(UInt32 seed) : state_(seed) {}
-
- void Reseed(UInt32 seed) { state_ = seed; }
-
- // Generates a random number from [0, range). Crashes if 'range' is
- // 0 or greater than kMaxRange.
- UInt32 Generate(UInt32 range);
-
- private:
- UInt32 state_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
-};
-
-// Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
-// compiler error iff T1 and T2 are different types.
-template <typename T1, typename T2>
-struct CompileAssertTypesEqual;
-
-template <typename T>
-struct CompileAssertTypesEqual<T, T> {
-};
-
-// Removes the reference from a type if it is a reference type,
-// otherwise leaves it unchanged. This is the same as
-// tr1::remove_reference, which is not widely available yet.
-template <typename T>
-struct RemoveReference { typedef T type; }; // NOLINT
-template <typename T>
-struct RemoveReference<T&> { typedef T type; }; // NOLINT
-
-// A handy wrapper around RemoveReference that works when the argument
-// T depends on template parameters.
-#define GTEST_REMOVE_REFERENCE_(T) \
- typename ::testing::internal::RemoveReference<T>::type
-
-// Removes const from a type if it is a const type, otherwise leaves
-// it unchanged. This is the same as tr1::remove_const, which is not
-// widely available yet.
-template <typename T>
-struct RemoveConst { typedef T type; }; // NOLINT
-template <typename T>
-struct RemoveConst<const T> { typedef T type; }; // NOLINT
-
-// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
-// definition to fail to remove the const in 'const int[3]' and 'const
-// char[3][4]'. The following specialization works around the bug.
-// However, it causes trouble with GCC and thus needs to be
-// conditionally compiled.
-#if defined(_MSC_VER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-template <typename T, size_t N>
-struct RemoveConst<const T[N]> {
- typedef typename RemoveConst<T>::type type[N];
-};
-#endif
-
-// A handy wrapper around RemoveConst that works when the argument
-// T depends on template parameters.
-#define GTEST_REMOVE_CONST_(T) \
- typename ::testing::internal::RemoveConst<T>::type
-
-// Turns const U&, U&, const U, and U all into U.
-#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
- GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
-
-// Adds reference to a type if it is not a reference type,
-// otherwise leaves it unchanged. This is the same as
-// tr1::add_reference, which is not widely available yet.
-template <typename T>
-struct AddReference { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddReference<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper around AddReference that works when the argument T
-// depends on template parameters.
-#define GTEST_ADD_REFERENCE_(T) \
- typename ::testing::internal::AddReference<T>::type
-
-// Adds a reference to const on top of T as necessary. For example,
-// it transforms
-//
-// char ==> const char&
-// const char ==> const char&
-// char& ==> const char&
-// const char& ==> const char&
-//
-// The argument T must depend on some template parameters.
-#define GTEST_REFERENCE_TO_CONST_(T) \
- GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
-
-// ImplicitlyConvertible<From, To>::value is a compile-time bool
-// constant that's true iff type From can be implicitly converted to
-// type To.
-template <typename From, typename To>
-class ImplicitlyConvertible {
- private:
- // We need the following helper functions only for their types.
- // They have no implementations.
-
- // MakeFrom() is an expression whose type is From. We cannot simply
- // use From(), as the type From may not have a public default
- // constructor.
- static From MakeFrom();
-
- // These two functions are overloaded. Given an expression
- // Helper(x), the compiler will pick the first version if x can be
- // implicitly converted to type To; otherwise it will pick the
- // second version.
- //
- // The first version returns a value of size 1, and the second
- // version returns a value of size 2. Therefore, by checking the
- // size of Helper(x), which can be done at compile time, we can tell
- // which version of Helper() is used, and hence whether x can be
- // implicitly converted to type To.
- static char Helper(To);
- static char (&Helper(...))[2]; // NOLINT
-
- // We have to put the 'public' section after the 'private' section,
- // or MSVC refuses to compile the code.
- public:
- // MSVC warns about implicitly converting from double to int for
- // possible loss of data, so we need to temporarily disable the
- // warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4244) // Temporarily disables warning 4244.
-
- static const bool value =
- sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
-# pragma warning(pop) // Restores the warning state.
-#elif defined(__BORLANDC__)
- // C++Builder cannot use member overload resolution during template
- // instantiation. The simplest workaround is to use its C++0x type traits
- // functions (C++Builder 2009 and above only).
- static const bool value = __is_convertible(From, To);
-#else
- static const bool value =
- sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
-#endif // _MSV_VER
-};
-template <typename From, typename To>
-const bool ImplicitlyConvertible<From, To>::value;
-
-// IsAProtocolMessage<T>::value is a compile-time bool constant that's
-// true iff T is type ProtocolMessage, proto2::Message, or a subclass
-// of those.
-template <typename T>
-struct IsAProtocolMessage
- : public bool_constant<
- ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value ||
- ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {
-};
-
-// When the compiler sees expression IsContainerTest<C>(0), if C is an
-// STL-style container class, the first overload of IsContainerTest
-// will be viable (since both C::iterator* and C::const_iterator* are
-// valid types and NULL can be implicitly converted to them). It will
-// be picked over the second overload as 'int' is a perfect match for
-// the type of argument 0. If C::iterator or C::const_iterator is not
-// a valid type, the first overload is not viable, and the second
-// overload will be picked. Therefore, we can determine whether C is
-// a container class by checking the type of IsContainerTest<C>(0).
-// The value of the expression is insignificant.
-//
-// Note that we look for both C::iterator and C::const_iterator. The
-// reason is that C++ injects the name of a class as a member of the
-// class itself (e.g. you can refer to class iterator as either
-// 'iterator' or 'iterator::iterator'). If we look for C::iterator
-// only, for example, we would mistakenly think that a class named
-// iterator is an STL container.
-//
-// Also note that the simpler approach of overloading
-// IsContainerTest(typename C::const_iterator*) and
-// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
-typedef int IsContainer;
-template <class C>
-IsContainer IsContainerTest(int /* dummy */,
- typename C::iterator* /* it */ = NULL,
- typename C::const_iterator* /* const_it */ = NULL) {
- return 0;
-}
-
-typedef char IsNotContainer;
-template <class C>
-IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
-
-// EnableIf<condition>::type is void when 'Cond' is true, and
-// undefined when 'Cond' is false. To use SFINAE to make a function
-// overload only apply when a particular expression is true, add
-// "typename EnableIf<expression>::type* = 0" as the last parameter.
-template<bool> struct EnableIf;
-template<> struct EnableIf<true> { typedef void type; }; // NOLINT
-
-// Utilities for native arrays.
-
-// ArrayEq() compares two k-dimensional native arrays using the
-// elements' operator==, where k can be any integer >= 0. When k is
-// 0, ArrayEq() degenerates into comparing a single pair of values.
-
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {
- return internal::ArrayEq(lhs, N, rhs);
-}
-
-// This helper reduces code bloat. If we instead put its logic inside
-// the previous ArrayEq() function, arrays with different sizes would
-// lead to different copies of the template code.
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
- for (size_t i = 0; i != size; i++) {
- if (!internal::ArrayEq(lhs[i], rhs[i]))
- return false;
- }
- return true;
-}
-
-// Finds the first element in the iterator range [begin, end) that
-// equals elem. Element may be a native array type itself.
-template <typename Iter, typename Element>
-Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
- for (Iter it = begin; it != end; ++it) {
- if (internal::ArrayEq(*it, elem))
- return it;
- }
- return end;
-}
-
-// CopyArray() copies a k-dimensional native array using the elements'
-// operator=, where k can be any integer >= 0. When k is 0,
-// CopyArray() degenerates into copying a single value.
-
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline void CopyArray(const T& from, U* to) { *to = from; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline void CopyArray(const T(&from)[N], U(*to)[N]) {
- internal::CopyArray(from, N, *to);
-}
-
-// This helper reduces code bloat. If we instead put its logic inside
-// the previous CopyArray() function, arrays with different sizes
-// would lead to different copies of the template code.
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to) {
- for (size_t i = 0; i != size; i++) {
- internal::CopyArray(from[i], to + i);
- }
-}
-
-// The relation between an NativeArray object (see below) and the
-// native array it represents.
-enum RelationToSource {
- kReference, // The NativeArray references the native array.
- kCopy // The NativeArray makes a copy of the native array and
- // owns the copy.
-};
-
-// Adapts a native array to a read-only STL-style container. Instead
-// of the complete STL container concept, this adaptor only implements
-// members useful for Google Mock's container matchers. New members
-// should be added as needed. To simplify the implementation, we only
-// support Element being a raw type (i.e. having no top-level const or
-// reference modifier). It's the client's responsibility to satisfy
-// this requirement. Element can be an array type itself (hence
-// multi-dimensional arrays are supported).
-template <typename Element>
-class NativeArray {
- public:
- // STL-style container typedefs.
- typedef Element value_type;
- typedef Element* iterator;
- typedef const Element* const_iterator;
-
- // Constructs from a native array.
- NativeArray(const Element* array, size_t count, RelationToSource relation) {
- Init(array, count, relation);
- }
-
- // Copy constructor.
- NativeArray(const NativeArray& rhs) {
- Init(rhs.array_, rhs.size_, rhs.relation_to_source_);
- }
-
- ~NativeArray() {
- // Ensures that the user doesn't instantiate NativeArray with a
- // const or reference type.
- static_cast<void>(StaticAssertTypeEqHelper<Element,
- GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>());
- if (relation_to_source_ == kCopy)
- delete[] array_;
- }
-
- // STL-style container methods.
- size_t size() const { return size_; }
- const_iterator begin() const { return array_; }
- const_iterator end() const { return array_ + size_; }
- bool operator==(const NativeArray& rhs) const {
- return size() == rhs.size() &&
- ArrayEq(begin(), size(), rhs.begin());
- }
-
- private:
- // Initializes this object; makes a copy of the input array if
- // 'relation' is kCopy.
- void Init(const Element* array, size_t a_size, RelationToSource relation) {
- if (relation == kReference) {
- array_ = array;
- } else {
- Element* const copy = new Element[a_size];
- CopyArray(array, a_size, copy);
- array_ = copy;
- }
- size_ = a_size;
- relation_to_source_ = relation;
- }
-
- const Element* array_;
- size_t size_;
- RelationToSource relation_to_source_;
-
- GTEST_DISALLOW_ASSIGN_(NativeArray);
-};
-
-} // namespace internal
-} // namespace testing
-
-#define GTEST_MESSAGE_AT_(file, line, message, result_type) \
- ::testing::internal::AssertHelper(result_type, file, line, message) \
- = ::testing::Message()
-
-#define GTEST_MESSAGE_(message, result_type) \
- GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
-
-#define GTEST_FATAL_FAILURE_(message) \
- return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
-
-#define GTEST_NONFATAL_FAILURE_(message) \
- GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
-
-#define GTEST_SUCCESS_(message) \
- GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
-
-// Suppresses MSVC warnings 4072 (unreachable code) for the code following
-// statement if it returns or throws (or doesn't return or throw in some
-// situations).
-#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
- if (::testing::internal::AlwaysTrue()) { statement; }
-
-#define GTEST_TEST_THROW_(statement, expected_exception, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::ConstCharPtr gtest_msg = "") { \
- bool gtest_caught_expected = false; \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (expected_exception const&) { \
- gtest_caught_expected = true; \
- } \
- catch (...) { \
- gtest_msg.value = \
- "Expected: " #statement " throws an exception of type " \
- #expected_exception ".\n Actual: it throws a different type."; \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
- } \
- if (!gtest_caught_expected) { \
- gtest_msg.value = \
- "Expected: " #statement " throws an exception of type " \
- #expected_exception ".\n Actual: it throws nothing."; \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \
- fail(gtest_msg.value)
-
-#define GTEST_TEST_NO_THROW_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (...) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
- fail("Expected: " #statement " doesn't throw an exception.\n" \
- " Actual: it throws.")
-
-#define GTEST_TEST_ANY_THROW_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- bool gtest_caught_any = false; \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (...) { \
- gtest_caught_any = true; \
- } \
- if (!gtest_caught_any) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
- fail("Expected: " #statement " throws an exception.\n" \
- " Actual: it doesn't.")
-
-
-// Implements Boolean test assertions such as EXPECT_TRUE. expression can be
-// either a boolean expression or an AssertionResult. text is a textual
-// represenation of expression as it was passed into the EXPECT_TRUE.
-#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar_ = \
- ::testing::AssertionResult(expression)) \
- ; \
- else \
- fail(::testing::internal::GetBoolAssertionFailureMessage(\
- gtest_ar_, text, #actual, #expected).c_str())
-
-#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
- fail("Expected: " #statement " doesn't generate new fatal " \
- "failures in the current thread.\n" \
- " Actual: it does.")
-
-// Expands to the name of the class that implements the given test.
-#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- test_case_name##_##test_name##_Test
-
-// Helper macro for defining tests.
-#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\
-class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
- public:\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
- private:\
- virtual void TestBody();\
- static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
-};\
-\
-::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
- ::test_info_ =\
- ::testing::internal::MakeAndRegisterTestInfo(\
- #test_case_name, #test_name, NULL, NULL, \
- (parent_id), \
- parent_class::SetUpTestCase, \
- parent_class::TearDownTestCase, \
- new ::testing::internal::TestFactoryImpl<\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
-void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the public API for death tests. It is
-// #included by gtest.h so a user doesn't need to include this
-// directly.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines internal utilities needed for implementing
-// death tests. They are subject to change without notice.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-
-
-#include <stdio.h>
-
-namespace testing {
-namespace internal {
-
-GTEST_DECLARE_string_(internal_run_death_test);
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kDeathTestStyleFlag[] = "death_test_style";
-const char kDeathTestUseFork[] = "death_test_use_fork";
-const char kInternalRunDeathTestFlag[] = "internal_run_death_test";
-
-#if GTEST_HAS_DEATH_TEST
-
-// DeathTest is a class that hides much of the complexity of the
-// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method
-// returns a concrete class that depends on the prevailing death test
-// style, as defined by the --gtest_death_test_style and/or
-// --gtest_internal_run_death_test flags.
-
-// In describing the results of death tests, these terms are used with
-// the corresponding definitions:
-//
-// exit status: The integer exit information in the format specified
-// by wait(2)
-// exit code: The integer code passed to exit(3), _exit(2), or
-// returned from main()
-class GTEST_API_ DeathTest {
- public:
- // Create returns false if there was an error determining the
- // appropriate action to take for the current death test; for example,
- // if the gtest_death_test_style flag is set to an invalid value.
- // The LastMessage method will return a more detailed message in that
- // case. Otherwise, the DeathTest pointer pointed to by the "test"
- // argument is set. If the death test should be skipped, the pointer
- // is set to NULL; otherwise, it is set to the address of a new concrete
- // DeathTest object that controls the execution of the current test.
- static bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test);
- DeathTest();
- virtual ~DeathTest() { }
-
- // A helper class that aborts a death test when it's deleted.
- class ReturnSentinel {
- public:
- explicit ReturnSentinel(DeathTest* test) : test_(test) { }
- ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }
- private:
- DeathTest* const test_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);
- } GTEST_ATTRIBUTE_UNUSED_;
-
- // An enumeration of possible roles that may be taken when a death
- // test is encountered. EXECUTE means that the death test logic should
- // be executed immediately. OVERSEE means that the program should prepare
- // the appropriate environment for a child process to execute the death
- // test, then wait for it to complete.
- enum TestRole { OVERSEE_TEST, EXECUTE_TEST };
-
- // An enumeration of the three reasons that a test might be aborted.
- enum AbortReason {
- TEST_ENCOUNTERED_RETURN_STATEMENT,
- TEST_THREW_EXCEPTION,
- TEST_DID_NOT_DIE
- };
-
- // Assumes one of the above roles.
- virtual TestRole AssumeRole() = 0;
-
- // Waits for the death test to finish and returns its status.
- virtual int Wait() = 0;
-
- // Returns true if the death test passed; that is, the test process
- // exited during the test, its exit status matches a user-supplied
- // predicate, and its stderr output matches a user-supplied regular
- // expression.
- // The user-supplied predicate may be a macro expression rather
- // than a function pointer or functor, or else Wait and Passed could
- // be combined.
- virtual bool Passed(bool exit_status_ok) = 0;
-
- // Signals that the death test did not die as expected.
- virtual void Abort(AbortReason reason) = 0;
-
- // Returns a human-readable outcome message regarding the outcome of
- // the last death test.
- static const char* LastMessage();
-
- static void set_last_death_test_message(const String& message);
-
- private:
- // A string containing a description of the outcome of the last death test.
- static String last_death_test_message_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);
-};
-
-// Factory interface for death tests. May be mocked out for testing.
-class DeathTestFactory {
- public:
- virtual ~DeathTestFactory() { }
- virtual bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test) = 0;
-};
-
-// A concrete DeathTestFactory implementation for normal use.
-class DefaultDeathTestFactory : public DeathTestFactory {
- public:
- virtual bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test);
-};
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
-
-// Traps C++ exceptions escaping statement and reports them as test
-// failures. Note that trapping SEH exceptions is not implemented here.
-# if GTEST_HAS_EXCEPTIONS
-# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } catch (const ::std::exception& gtest_exception) { \
- fprintf(\
- stderr, \
- "\n%s: Caught std::exception-derived exception escaping the " \
- "death test statement. Exception message: %s\n", \
- ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
- gtest_exception.what()); \
- fflush(stderr); \
- death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
- } catch (...) { \
- death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
- }
-
-# else
-# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-
-# endif
-
-// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
-// ASSERT_EXIT*, and EXPECT_EXIT*.
-# define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- const ::testing::internal::RE& gtest_regex = (regex); \
- ::testing::internal::DeathTest* gtest_dt; \
- if (!::testing::internal::DeathTest::Create(#statement, &gtest_regex, \
- __FILE__, __LINE__, &gtest_dt)) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
- } \
- if (gtest_dt != NULL) { \
- ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \
- gtest_dt_ptr(gtest_dt); \
- switch (gtest_dt->AssumeRole()) { \
- case ::testing::internal::DeathTest::OVERSEE_TEST: \
- if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
- } \
- break; \
- case ::testing::internal::DeathTest::EXECUTE_TEST: { \
- ::testing::internal::DeathTest::ReturnSentinel \
- gtest_sentinel(gtest_dt); \
- GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \
- gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
- break; \
- } \
- default: \
- break; \
- } \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \
- fail(::testing::internal::DeathTest::LastMessage())
-// The symbol "fail" here expands to something into which a message
-// can be streamed.
-
-// A class representing the parsed contents of the
-// --gtest_internal_run_death_test flag, as it existed when
-// RUN_ALL_TESTS was called.
-class InternalRunDeathTestFlag {
- public:
- InternalRunDeathTestFlag(const String& a_file,
- int a_line,
- int an_index,
- int a_write_fd)
- : file_(a_file), line_(a_line), index_(an_index),
- write_fd_(a_write_fd) {}
-
- ~InternalRunDeathTestFlag() {
- if (write_fd_ >= 0)
- posix::Close(write_fd_);
- }
-
- String file() const { return file_; }
- int line() const { return line_; }
- int index() const { return index_; }
- int write_fd() const { return write_fd_; }
-
- private:
- String file_;
- int line_;
- int index_;
- int write_fd_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
-};
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
-
-#else // GTEST_HAS_DEATH_TEST
-
-// This macro is used for implementing macros such as
-// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
-// death tests are not supported. Those macros must compile on such systems
-// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
-// systems that support death tests. This allows one to write such a macro
-// on a system that does not support death tests and be sure that it will
-// compile on a death-test supporting system.
-//
-// Parameters:
-// statement - A statement that a macro such as EXPECT_DEATH would test
-// for program termination. This macro has to make sure this
-// statement is compiled but not executed, to ensure that
-// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
-// parameter iff EXPECT_DEATH compiles with it.
-// regex - A regex that a macro such as EXPECT_DEATH would use to test
-// the output of statement. This parameter has to be
-// compiled but not evaluated by this macro, to ensure that
-// this macro only accepts expressions that a macro such as
-// EXPECT_DEATH would accept.
-// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
-// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
-// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
-// compile inside functions where ASSERT_DEATH doesn't
-// compile.
-//
-// The branch that has an always false condition is used to ensure that
-// statement and regex are compiled (and thus syntactically correct) but
-// never executed. The unreachable code macro protects the terminator
-// statement from generating an 'unreachable code' warning in case
-// statement unconditionally returns or throws. The Message constructor at
-// the end allows the syntax of streaming additional messages into the
-// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
-# define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- GTEST_LOG_(WARNING) \
- << "Death tests are not supported on this platform.\n" \
- << "Statement '" #statement "' cannot be verified."; \
- } else if (::testing::internal::AlwaysFalse()) { \
- ::testing::internal::RE::PartialMatch(".*", (regex)); \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- terminator; \
- } else \
- ::testing::Message()
-
-#endif // GTEST_HAS_DEATH_TEST
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-
-namespace testing {
-
-// This flag controls the style of death tests. Valid values are "threadsafe",
-// meaning that the death test child process will re-execute the test binary
-// from the start, running only a single death test, or "fast",
-// meaning that the child process will execute the test logic immediately
-// after forking.
-GTEST_DECLARE_string_(death_test_style);
-
-#if GTEST_HAS_DEATH_TEST
-
-// The following macros are useful for writing death tests.
-
-// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
-// executed:
-//
-// 1. It generates a warning if there is more than one active
-// thread. This is because it's safe to fork() or clone() only
-// when there is a single thread.
-//
-// 2. The parent process clone()s a sub-process and runs the death
-// test in it; the sub-process exits with code 0 at the end of the
-// death test, if it hasn't exited already.
-//
-// 3. The parent process waits for the sub-process to terminate.
-//
-// 4. The parent process checks the exit code and error message of
-// the sub-process.
-//
-// Examples:
-//
-// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
-// for (int i = 0; i < 5; i++) {
-// EXPECT_DEATH(server.ProcessRequest(i),
-// "Invalid request .* in ProcessRequest()")
-// << "Failed to die on request " << i);
-// }
-//
-// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
-//
-// bool KilledBySIGHUP(int exit_code) {
-// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
-// }
-//
-// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
-//
-// On the regular expressions used in death tests:
-//
-// On POSIX-compliant systems (*nix), we use the <regex.h> library,
-// which uses the POSIX extended regex syntax.
-//
-// On other platforms (e.g. Windows), we only support a simple regex
-// syntax implemented as part of Google Test. This limited
-// implementation should be enough most of the time when writing
-// death tests; though it lacks many features you can find in PCRE
-// or POSIX extended regex syntax. For example, we don't support
-// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
-// repetition count ("x{5,7}"), among others.
-//
-// Below is the syntax that we do support. We chose it to be a
-// subset of both PCRE and POSIX extended regex, so it's easy to
-// learn wherever you come from. In the following: 'A' denotes a
-// literal character, period (.), or a single \\ escape sequence;
-// 'x' and 'y' denote regular expressions; 'm' and 'n' are for
-// natural numbers.
-//
-// c matches any literal character c
-// \\d matches any decimal digit
-// \\D matches any character that's not a decimal digit
-// \\f matches \f
-// \\n matches \n
-// \\r matches \r
-// \\s matches any ASCII whitespace, including \n
-// \\S matches any character that's not a whitespace
-// \\t matches \t
-// \\v matches \v
-// \\w matches any letter, _, or decimal digit
-// \\W matches any character that \\w doesn't match
-// \\c matches any literal character c, which must be a punctuation
-// . matches any single character except \n
-// A? matches 0 or 1 occurrences of A
-// A* matches 0 or many occurrences of A
-// A+ matches 1 or many occurrences of A
-// ^ matches the beginning of a string (not that of each line)
-// $ matches the end of a string (not that of each line)
-// xy matches x followed by y
-//
-// If you accidentally use PCRE or POSIX extended regex features
-// not implemented by us, you will get a run-time failure. In that
-// case, please try to rewrite your regular expression within the
-// above syntax.
-//
-// This implementation is *not* meant to be as highly tuned or robust
-// as a compiled regex library, but should perform well enough for a
-// death test, which already incurs significant overhead by launching
-// a child process.
-//
-// Known caveats:
-//
-// A "threadsafe" style death test obtains the path to the test
-// program from argv[0] and re-executes it in the sub-process. For
-// simplicity, the current implementation doesn't search the PATH
-// when launching the sub-process. This means that the user must
-// invoke the test program via a path that contains at least one
-// path separator (e.g. path/to/foo_test and
-// /absolute/path/to/bar_test are fine, but foo_test is not). This
-// is rarely a problem as people usually don't put the test binary
-// directory in PATH.
-//
-// TODO(wan@google.com): make thread-safe death tests search the PATH.
-
-// Asserts that a given statement causes the program to exit, with an
-// integer exit status that satisfies predicate, and emitting error output
-// that matches regex.
-# define ASSERT_EXIT(statement, predicate, regex) \
- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
-
-// Like ASSERT_EXIT, but continues on to successive tests in the
-// test case, if any:
-# define EXPECT_EXIT(statement, predicate, regex) \
- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
-
-// Asserts that a given statement causes the program to exit, either by
-// explicitly exiting with a nonzero exit code or being killed by a
-// signal, and emitting error output that matches regex.
-# define ASSERT_DEATH(statement, regex) \
- ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
-
-// Like ASSERT_DEATH, but continues on to successive tests in the
-// test case, if any:
-# define EXPECT_DEATH(statement, regex) \
- EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
-
-// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
-
-// Tests that an exit code describes a normal exit with a given exit code.
-class GTEST_API_ ExitedWithCode {
- public:
- explicit ExitedWithCode(int exit_code);
- bool operator()(int exit_status) const;
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ExitedWithCode& other);
-
- const int exit_code_;
-};
-
-# if !GTEST_OS_WINDOWS
-// Tests that an exit code describes an exit due to termination by a
-// given signal.
-class GTEST_API_ KilledBySignal {
- public:
- explicit KilledBySignal(int signum);
- bool operator()(int exit_status) const;
- private:
- const int signum_;
-};
-# endif // !GTEST_OS_WINDOWS
-
-// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
-// The death testing framework causes this to have interesting semantics,
-// since the sideeffects of the call are only visible in opt mode, and not
-// in debug mode.
-//
-// In practice, this can be used to test functions that utilize the
-// LOG(DFATAL) macro using the following style:
-//
-// int DieInDebugOr12(int* sideeffect) {
-// if (sideeffect) {
-// *sideeffect = 12;
-// }
-// LOG(DFATAL) << "death";
-// return 12;
-// }
-//
-// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
-// int sideeffect = 0;
-// // Only asserts in dbg.
-// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
-//
-// #ifdef NDEBUG
-// // opt-mode has sideeffect visible.
-// EXPECT_EQ(12, sideeffect);
-// #else
-// // dbg-mode no visible sideeffect.
-// EXPECT_EQ(0, sideeffect);
-// #endif
-// }
-//
-// This will assert that DieInDebugReturn12InOpt() crashes in debug
-// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
-// appropriate fallback value (12 in this case) in opt mode. If you
-// need to test that a function has appropriate side-effects in opt
-// mode, include assertions against the side-effects. A general
-// pattern for this is:
-//
-// EXPECT_DEBUG_DEATH({
-// // Side-effects here will have an effect after this statement in
-// // opt mode, but none in debug mode.
-// EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
-// }, "death");
-//
-# ifdef NDEBUG
-
-# define EXPECT_DEBUG_DEATH(statement, regex) \
- do { statement; } while (::testing::internal::AlwaysFalse())
-
-# define ASSERT_DEBUG_DEATH(statement, regex) \
- do { statement; } while (::testing::internal::AlwaysFalse())
-
-# else
-
-# define EXPECT_DEBUG_DEATH(statement, regex) \
- EXPECT_DEATH(statement, regex)
-
-# define ASSERT_DEBUG_DEATH(statement, regex) \
- ASSERT_DEATH(statement, regex)
-
-# endif // NDEBUG for EXPECT_DEBUG_DEATH
-#endif // GTEST_HAS_DEATH_TEST
-
-// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
-// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
-// death tests are supported; otherwise they just issue a warning. This is
-// useful when you are combining death test assertions with normal test
-// assertions in one test.
-#if GTEST_HAS_DEATH_TEST
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- EXPECT_DEATH(statement, regex)
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- ASSERT_DEATH(statement, regex)
-#else
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
-#endif
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the Message class.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
-// program!
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-
-#include <limits>
-
-
-namespace testing {
-
-// The Message class works like an ostream repeater.
-//
-// Typical usage:
-//
-// 1. You stream a bunch of values to a Message object.
-// It will remember the text in a stringstream.
-// 2. Then you stream the Message object to an ostream.
-// This causes the text in the Message to be streamed
-// to the ostream.
-//
-// For example;
-//
-// testing::Message foo;
-// foo << 1 << " != " << 2;
-// std::cout << foo;
-//
-// will print "1 != 2".
-//
-// Message is not intended to be inherited from. In particular, its
-// destructor is not virtual.
-//
-// Note that stringstream behaves differently in gcc and in MSVC. You
-// can stream a NULL char pointer to it in the former, but not in the
-// latter (it causes an access violation if you do). The Message
-// class hides this difference by treating a NULL char pointer as
-// "(null)".
-class GTEST_API_ Message {
- private:
- // The type of basic IO manipulators (endl, ends, and flush) for
- // narrow streams.
- typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
-
- public:
- // Constructs an empty Message.
- // We allocate the stringstream separately because otherwise each use of
- // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's
- // stack frame leading to huge stack frames in some cases; gcc does not reuse
- // the stack space.
- Message() : ss_(new ::std::stringstream) {
- // By default, we want there to be enough precision when printing
- // a double to a Message.
- *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
- }
-
- // Copy constructor.
- Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
- *ss_ << msg.GetString();
- }
-
- // Constructs a Message from a C-string.
- explicit Message(const char* str) : ss_(new ::std::stringstream) {
- *ss_ << str;
- }
-
-#if GTEST_OS_SYMBIAN
- // Streams a value (either a pointer or not) to this object.
- template <typename T>
- inline Message& operator <<(const T& value) {
- StreamHelper(typename internal::is_pointer<T>::type(), value);
- return *this;
- }
-#else
- // Streams a non-pointer value to this object.
- template <typename T>
- inline Message& operator <<(const T& val) {
- ::GTestStreamToHelper(ss_.get(), val);
- return *this;
- }
-
- // Streams a pointer value to this object.
- //
- // This function is an overload of the previous one. When you
- // stream a pointer to a Message, this definition will be used as it
- // is more specialized. (The C++ Standard, section
- // [temp.func.order].) If you stream a non-pointer, then the
- // previous definition will be used.
- //
- // The reason for this overload is that streaming a NULL pointer to
- // ostream is undefined behavior. Depending on the compiler, you
- // may get "0", "(nil)", "(null)", or an access violation. To
- // ensure consistent result across compilers, we always treat NULL
- // as "(null)".
- template <typename T>
- inline Message& operator <<(T* const& pointer) { // NOLINT
- if (pointer == NULL) {
- *ss_ << "(null)";
- } else {
- ::GTestStreamToHelper(ss_.get(), pointer);
- }
- return *this;
- }
-#endif // GTEST_OS_SYMBIAN
-
- // Since the basic IO manipulators are overloaded for both narrow
- // and wide streams, we have to provide this specialized definition
- // of operator <<, even though its body is the same as the
- // templatized version above. Without this definition, streaming
- // endl or other basic IO manipulators to Message will confuse the
- // compiler.
- Message& operator <<(BasicNarrowIoManip val) {
- *ss_ << val;
- return *this;
- }
-
- // Instead of 1/0, we want to see true/false for bool values.
- Message& operator <<(bool b) {
- return *this << (b ? "true" : "false");
- }
-
- // These two overloads allow streaming a wide C string to a Message
- // using the UTF-8 encoding.
- Message& operator <<(const wchar_t* wide_c_str) {
- return *this << internal::String::ShowWideCString(wide_c_str);
- }
- Message& operator <<(wchar_t* wide_c_str) {
- return *this << internal::String::ShowWideCString(wide_c_str);
- }
-
-#if GTEST_HAS_STD_WSTRING
- // Converts the given wide string to a narrow string using the UTF-8
- // encoding, and streams the result to this Message object.
- Message& operator <<(const ::std::wstring& wstr);
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
- // Converts the given wide string to a narrow string using the UTF-8
- // encoding, and streams the result to this Message object.
- Message& operator <<(const ::wstring& wstr);
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
- // Gets the text streamed to this object so far as a String.
- // Each '\0' character in the buffer is replaced with "\\0".
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- internal::String GetString() const {
- return internal::StringStreamToString(ss_.get());
- }
-
- private:
-
-#if GTEST_OS_SYMBIAN
- // These are needed as the Nokia Symbian Compiler cannot decide between
- // const T& and const T* in a function template. The Nokia compiler _can_
- // decide between class template specializations for T and T*, so a
- // tr1::type_traits-like is_pointer works, and we can overload on that.
- template <typename T>
- inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) {
- if (pointer == NULL) {
- *ss_ << "(null)";
- } else {
- ::GTestStreamToHelper(ss_.get(), pointer);
- }
- }
- template <typename T>
- inline void StreamHelper(internal::false_type /*dummy*/, const T& value) {
- ::GTestStreamToHelper(ss_.get(), value);
- }
-#endif // GTEST_OS_SYMBIAN
-
- // We'll hold the text streamed to this object here.
- const internal::scoped_ptr< ::std::stringstream> ss_;
-
- // We declare (but don't implement) this to prevent the compiler
- // from implementing the assignment operator.
- void operator=(const Message&);
-};
-
-// Streams a Message to an ostream.
-inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
- return os << sb.GetString();
-}
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-// This file was GENERATED by command:
-// pump.py gtest-param-test.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: vladl@google.com (Vlad Losev)
-//
-// Macros and functions for implementing parameterized tests
-// in Google C++ Testing Framework (Google Test)
-//
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-
-
-// Value-parameterized tests allow you to test your code with different
-// parameters without writing multiple copies of the same test.
-//
-// Here is how you use value-parameterized tests:
-
-#if 0
-
-// To write value-parameterized tests, first you should define a fixture
-// class. It is usually derived from testing::TestWithParam<T> (see below for
-// another inheritance scheme that's sometimes useful in more complicated
-// class hierarchies), where the type of your parameter values.
-// TestWithParam<T> is itself derived from testing::Test. T can be any
-// copyable type. If it's a raw pointer, you are responsible for managing the
-// lifespan of the pointed values.
-
-class FooTest : public ::testing::TestWithParam<const char*> {
- // You can implement all the usual class fixture members here.
-};
-
-// Then, use the TEST_P macro to define as many parameterized tests
-// for this fixture as you want. The _P suffix is for "parameterized"
-// or "pattern", whichever you prefer to think.
-
-TEST_P(FooTest, DoesBlah) {
- // Inside a test, access the test parameter with the GetParam() method
- // of the TestWithParam<T> class:
- EXPECT_TRUE(foo.Blah(GetParam()));
- ...
-}
-
-TEST_P(FooTest, HasBlahBlah) {
- ...
-}
-
-// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
-// case with any set of parameters you want. Google Test defines a number
-// of functions for generating test parameters. They return what we call
-// (surprise!) parameter generators. Here is a summary of them, which
-// are all in the testing namespace:
-//
-//
-// Range(begin, end [, step]) - Yields values {begin, begin+step,
-// begin+step+step, ...}. The values do not
-// include end. step defaults to 1.
-// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
-// ValuesIn(container) - Yields values from a C-style array, an STL
-// ValuesIn(begin,end) container, or an iterator range [begin, end).
-// Bool() - Yields sequence {false, true}.
-// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
-// for the math savvy) of the values generated
-// by the N generators.
-//
-// For more details, see comments at the definitions of these functions below
-// in this file.
-//
-// The following statement will instantiate tests from the FooTest test case
-// each with parameter values "meeny", "miny", and "moe".
-
-INSTANTIATE_TEST_CASE_P(InstantiationName,
- FooTest,
- Values("meeny", "miny", "moe"));
-
-// To distinguish different instances of the pattern, (yes, you
-// can instantiate it more then once) the first argument to the
-// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
-// actual test case name. Remember to pick unique prefixes for different
-// instantiations. The tests from the instantiation above will have
-// these names:
-//
-// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
-// * InstantiationName/FooTest.DoesBlah/1 for "miny"
-// * InstantiationName/FooTest.DoesBlah/2 for "moe"
-// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
-// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
-// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
-//
-// You can use these names in --gtest_filter.
-//
-// This statement will instantiate all tests from FooTest again, each
-// with parameter values "cat" and "dog":
-
-const char* pets[] = {"cat", "dog"};
-INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
-
-// The tests from the instantiation above will have these names:
-//
-// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
-//
-// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
-// in the given test case, whether their definitions come before or
-// AFTER the INSTANTIATE_TEST_CASE_P statement.
-//
-// Please also note that generator expressions (including parameters to the
-// generators) are evaluated in InitGoogleTest(), after main() has started.
-// This allows the user on one hand, to adjust generator parameters in order
-// to dynamically determine a set of tests to run and on the other hand,
-// give the user a chance to inspect the generated tests with Google Test
-// reflection API before RUN_ALL_TESTS() is executed.
-//
-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
-// for more examples.
-//
-// In the future, we plan to publish the API for defining new parameter
-// generators. But for now this interface remains part of the internal
-// implementation and is subject to change.
-//
-//
-// A parameterized test fixture must be derived from testing::Test and from
-// testing::WithParamInterface<T>, where T is the type of the parameter
-// values. Inheriting from TestWithParam<T> satisfies that requirement because
-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
-// complicated hierarchies, however, it is occasionally useful to inherit
-// separately from Test and WithParamInterface. For example:
-
-class BaseTest : public ::testing::Test {
- // You can inherit all the usual members for a non-parameterized test
- // fixture here.
-};
-
-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
- // The usual test fixture members go here too.
-};
-
-TEST_F(BaseTest, HasFoo) {
- // This is an ordinary non-parameterized test.
-}
-
-TEST_P(DerivedTest, DoesBlah) {
- // GetParam works just the same here as if you inherit from TestWithParam.
- EXPECT_TRUE(foo.Blah(GetParam()));
-}
-
-#endif // 0
-
-
-#if !GTEST_OS_SYMBIAN
-# include <utility>
-#endif
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-
-#include <iterator>
-#include <utility>
-#include <vector>
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-// Copyright 2003 Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: Dan Egnor (egnor@google.com)
-//
-// A "smart" pointer type with reference tracking. Every pointer to a
-// particular object is kept on a circular linked list. When the last pointer
-// to an object is destroyed or reassigned, the object is deleted.
-//
-// Used properly, this deletes the object when the last reference goes away.
-// There are several caveats:
-// - Like all reference counting schemes, cycles lead to leaks.
-// - Each smart pointer is actually two pointers (8 bytes instead of 4).
-// - Every time a pointer is assigned, the entire list of pointers to that
-// object is traversed. This class is therefore NOT SUITABLE when there
-// will often be more than two or three pointers to a particular object.
-// - References are only tracked as long as linked_ptr<> objects are copied.
-// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS
-// will happen (double deletion).
-//
-// A good use of this class is storing object references in STL containers.
-// You can safely put linked_ptr<> in a vector<>.
-// Other uses may not be as good.
-//
-// Note: If you use an incomplete type with linked_ptr<>, the class
-// *containing* linked_ptr<> must have a constructor and destructor (even
-// if they do nothing!).
-//
-// Bill Gibbons suggested we use something like this.
-//
-// Thread Safety:
-// Unlike other linked_ptr implementations, in this implementation
-// a linked_ptr object is thread-safe in the sense that:
-// - it's safe to copy linked_ptr objects concurrently,
-// - it's safe to copy *from* a linked_ptr and read its underlying
-// raw pointer (e.g. via get()) concurrently, and
-// - it's safe to write to two linked_ptrs that point to the same
-// shared object concurrently.
-// TODO(wan@google.com): rename this to safe_linked_ptr to avoid
-// confusion with normal linked_ptr.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-
-#include <stdlib.h>
-#include <assert.h>
-
-
-namespace testing {
-namespace internal {
-
-// Protects copying of all linked_ptr objects.
-GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
-
-// This is used internally by all instances of linked_ptr<>. It needs to be
-// a non-template class because different types of linked_ptr<> can refer to
-// the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)).
-// So, it needs to be possible for different types of linked_ptr to participate
-// in the same circular linked list, so we need a single class type here.
-//
-// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr<T>.
-class linked_ptr_internal {
- public:
- // Create a new circle that includes only this instance.
- void join_new() {
- next_ = this;
- }
-
- // Many linked_ptr operations may change p.link_ for some linked_ptr
- // variable p in the same circle as this object. Therefore we need
- // to prevent two such operations from occurring concurrently.
- //
- // Note that different types of linked_ptr objects can coexist in a
- // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and
- // linked_ptr<Derived2>). Therefore we must use a single mutex to
- // protect all linked_ptr objects. This can create serious
- // contention in production code, but is acceptable in a testing
- // framework.
-
- // Join an existing circle.
- // L < g_linked_ptr_mutex
- void join(linked_ptr_internal const* ptr) {
- MutexLock lock(&g_linked_ptr_mutex);
-
- linked_ptr_internal const* p = ptr;
- while (p->next_ != ptr) p = p->next_;
- p->next_ = this;
- next_ = ptr;
- }
-
- // Leave whatever circle we're part of. Returns true if we were the
- // last member of the circle. Once this is done, you can join() another.
- // L < g_linked_ptr_mutex
- bool depart() {
- MutexLock lock(&g_linked_ptr_mutex);
-
- if (next_ == this) return true;
- linked_ptr_internal const* p = next_;
- while (p->next_ != this) p = p->next_;
- p->next_ = next_;
- return false;
- }
-
- private:
- mutable linked_ptr_internal const* next_;
-};
-
-template <typename T>
-class linked_ptr {
- public:
- typedef T element_type;
-
- // Take over ownership of a raw pointer. This should happen as soon as
- // possible after the object is created.
- explicit linked_ptr(T* ptr = NULL) { capture(ptr); }
- ~linked_ptr() { depart(); }
-
- // Copy an existing linked_ptr<>, adding ourselves to the list of references.
- template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }
- linked_ptr(linked_ptr const& ptr) { // NOLINT
- assert(&ptr != this);
- copy(&ptr);
- }
-
- // Assignment releases the old value and acquires the new.
- template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) {
- depart();
- copy(&ptr);
- return *this;
- }
-
- linked_ptr& operator=(linked_ptr const& ptr) {
- if (&ptr != this) {
- depart();
- copy(&ptr);
- }
- return *this;
- }
-
- // Smart pointer members.
- void reset(T* ptr = NULL) {
- depart();
- capture(ptr);
- }
- T* get() const { return value_; }
- T* operator->() const { return value_; }
- T& operator*() const { return *value_; }
-
- bool operator==(T* p) const { return value_ == p; }
- bool operator!=(T* p) const { return value_ != p; }
- template <typename U>
- bool operator==(linked_ptr<U> const& ptr) const {
- return value_ == ptr.get();
- }
- template <typename U>
- bool operator!=(linked_ptr<U> const& ptr) const {
- return value_ != ptr.get();
- }
-
- private:
- template <typename U>
- friend class linked_ptr;
-
- T* value_;
- linked_ptr_internal link_;
-
- void depart() {
- if (link_.depart()) delete value_;
- }
-
- void capture(T* ptr) {
- value_ = ptr;
- link_.join_new();
- }
-
- template <typename U> void copy(linked_ptr<U> const* ptr) {
- value_ = ptr->get();
- if (value_)
- link_.join(&ptr->link_);
- else
- link_.join_new();
- }
-};
-
-template<typename T> inline
-bool operator==(T* ptr, const linked_ptr<T>& x) {
- return ptr == x.get();
-}
-
-template<typename T> inline
-bool operator!=(T* ptr, const linked_ptr<T>& x) {
- return ptr != x.get();
-}
-
-// A function to convert T* into linked_ptr<T>
-// Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation
-// for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
-template <typename T>
-linked_ptr<T> make_linked_ptr(T* ptr) {
- return linked_ptr<T>(ptr);
-}
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// A user can teach this function how to print a class type T by
-// defining either operator<<() or PrintTo() in the namespace that
-// defines T. More specifically, the FIRST defined function in the
-// following list will be used (assuming T is defined in namespace
-// foo):
-//
-// 1. foo::PrintTo(const T&, ostream*)
-// 2. operator<<(ostream&, const T&) defined in either foo or the
-// global namespace.
-//
-// If none of the above is defined, it will print the debug string of
-// the value if it is a protocol buffer, or print the raw bytes in the
-// value otherwise.
-//
-// To aid debugging: when T is a reference type, the address of the
-// value is also printed; when T is a (const) char pointer, both the
-// pointer value and the NUL-terminated string it points to are
-// printed.
-//
-// We also provide some convenient wrappers:
-//
-// // Prints a value to a string. For a (const or not) char
-// // pointer, the NUL-terminated string (but not the pointer) is
-// // printed.
-// std::string ::testing::PrintToString(const T& value);
-//
-// // Prints a value tersely: for a reference type, the referenced
-// // value (but not the address) is printed; for a (const or not) char
-// // pointer, the NUL-terminated string (but not the pointer) is
-// // printed.
-// void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
-//
-// // Prints value using the type inferred by the compiler. The difference
-// // from UniversalTersePrint() is that this function prints both the
-// // pointer and the NUL-terminated string for a (const or not) char pointer.
-// void ::testing::internal::UniversalPrint(const T& value, ostream*);
-//
-// // Prints the fields of a tuple tersely to a string vector, one
-// // element for each field. Tuple support must be enabled in
-// // gtest-port.h.
-// std::vector<string> UniversalTersePrintTupleFieldsToStrings(
-// const Tuple& value);
-//
-// Known limitation:
-//
-// The print primitives print the elements of an STL-style container
-// using the compiler-inferred type of *iter where iter is a
-// const_iterator of the container. When const_iterator is an input
-// iterator but not a forward iterator, this inferred type may not
-// match value_type, and the print output may be incorrect. In
-// practice, this is rarely a problem as for most containers
-// const_iterator is a forward iterator. We'll fix this if there's an
-// actual need for it. Note that this fix cannot rely on value_type
-// being defined as many user-defined container types don't have
-// value_type.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
-namespace testing {
-
-// Definitions in the 'internal' and 'internal2' name spaces are
-// subject to change without notice. DO NOT USE THEM IN USER CODE!
-namespace internal2 {
-
-// Prints the given number of bytes in the given object to the given
-// ostream.
-GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
- size_t count,
- ::std::ostream* os);
-
-// For selecting which printer to use when a given type has neither <<
-// nor PrintTo().
-enum TypeKind {
- kProtobuf, // a protobuf type
- kConvertibleToInteger, // a type implicitly convertible to BiggestInt
- // (e.g. a named or unnamed enum type)
- kOtherType // anything else
-};
-
-// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
-// by the universal printer to print a value of type T when neither
-// operator<< nor PrintTo() is defined for T, where kTypeKind is the
-// "kind" of T as defined by enum TypeKind.
-template <typename T, TypeKind kTypeKind>
-class TypeWithoutFormatter {
- public:
- // This default version is called when kTypeKind is kOtherType.
- static void PrintValue(const T& value, ::std::ostream* os) {
- PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),
- sizeof(value), os);
- }
-};
-
-// We print a protobuf using its ShortDebugString() when the string
-// doesn't exceed this many characters; otherwise we print it using
-// DebugString() for better readability.
-const size_t kProtobufOneLinerMaxLength = 50;
-
-template <typename T>
-class TypeWithoutFormatter<T, kProtobuf> {
- public:
- static void PrintValue(const T& value, ::std::ostream* os) {
- const ::testing::internal::string short_str = value.ShortDebugString();
- const ::testing::internal::string pretty_str =
- short_str.length() <= kProtobufOneLinerMaxLength ?
- short_str : ("\n" + value.DebugString());
- *os << ("<" + pretty_str + ">");
- }
-};
-
-template <typename T>
-class TypeWithoutFormatter<T, kConvertibleToInteger> {
- public:
- // Since T has no << operator or PrintTo() but can be implicitly
- // converted to BiggestInt, we print it as a BiggestInt.
- //
- // Most likely T is an enum type (either named or unnamed), in which
- // case printing it as an integer is the desired behavior. In case
- // T is not an enum, printing it as an integer is the best we can do
- // given that it has no user-defined printer.
- static void PrintValue(const T& value, ::std::ostream* os) {
- const internal::BiggestInt kBigInt = value;
- *os << kBigInt;
- }
-};
-
-// Prints the given value to the given ostream. If the value is a
-// protocol message, its debug string is printed; if it's an enum or
-// of a type implicitly convertible to BiggestInt, it's printed as an
-// integer; otherwise the bytes in the value are printed. This is
-// what UniversalPrinter<T>::Print() does when it knows nothing about
-// type T and T has neither << operator nor PrintTo().
-//
-// A user can override this behavior for a class type Foo by defining
-// a << operator in the namespace where Foo is defined.
-//
-// We put this operator in namespace 'internal2' instead of 'internal'
-// to simplify the implementation, as much code in 'internal' needs to
-// use << in STL, which would conflict with our own << were it defined
-// in 'internal'.
-//
-// Note that this operator<< takes a generic std::basic_ostream<Char,
-// CharTraits> type instead of the more restricted std::ostream. If
-// we define it to take an std::ostream instead, we'll get an
-// "ambiguous overloads" compiler error when trying to print a type
-// Foo that supports streaming to std::basic_ostream<Char,
-// CharTraits>, as the compiler cannot tell whether
-// operator<<(std::ostream&, const T&) or
-// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
-// specific.
-template <typename Char, typename CharTraits, typename T>
-::std::basic_ostream<Char, CharTraits>& operator<<(
- ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
- TypeWithoutFormatter<T,
- (internal::IsAProtocolMessage<T>::value ? kProtobuf :
- internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?
- kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);
- return os;
-}
-
-} // namespace internal2
-} // namespace testing
-
-// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
-// magic needed for implementing UniversalPrinter won't work.
-namespace testing_internal {
-
-// Used to print a value that is not an STL-style container when the
-// user doesn't define PrintTo() for it.
-template <typename T>
-void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
- // With the following statement, during unqualified name lookup,
- // testing::internal2::operator<< appears as if it was declared in
- // the nearest enclosing namespace that contains both
- // ::testing_internal and ::testing::internal2, i.e. the global
- // namespace. For more details, refer to the C++ Standard section
- // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
- // testing::internal2::operator<< in case T doesn't come with a <<
- // operator.
- //
- // We cannot write 'using ::testing::internal2::operator<<;', which
- // gcc 3.3 fails to compile due to a compiler bug.
- using namespace ::testing::internal2; // NOLINT
-
- // Assuming T is defined in namespace foo, in the next statement,
- // the compiler will consider all of:
- //
- // 1. foo::operator<< (thanks to Koenig look-up),
- // 2. ::operator<< (as the current namespace is enclosed in ::),
- // 3. testing::internal2::operator<< (thanks to the using statement above).
- //
- // The operator<< whose type matches T best will be picked.
- //
- // We deliberately allow #2 to be a candidate, as sometimes it's
- // impossible to define #1 (e.g. when foo is ::std, defining
- // anything in it is undefined behavior unless you are a compiler
- // vendor.).
- *os << value;
-}
-
-} // namespace testing_internal
-
-namespace testing {
-namespace internal {
-
-// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
-// value to the given ostream. The caller must ensure that
-// 'ostream_ptr' is not NULL, or the behavior is undefined.
-//
-// We define UniversalPrinter as a class template (as opposed to a
-// function template), as we need to partially specialize it for
-// reference types, which cannot be done with function templates.
-template <typename T>
-class UniversalPrinter;
-
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os);
-
-// Used to print an STL-style container when the user doesn't define
-// a PrintTo() for it.
-template <typename C>
-void DefaultPrintTo(IsContainer /* dummy */,
- false_type /* is not a pointer */,
- const C& container, ::std::ostream* os) {
- const size_t kMaxCount = 32; // The maximum number of elements to print.
- *os << '{';
- size_t count = 0;
- for (typename C::const_iterator it = container.begin();
- it != container.end(); ++it, ++count) {
- if (count > 0) {
- *os << ',';
- if (count == kMaxCount) { // Enough has been printed.
- *os << " ...";
- break;
- }
- }
- *os << ' ';
- // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
- // handle *it being a native array.
- internal::UniversalPrint(*it, os);
- }
-
- if (count > 0) {
- *os << ' ';
- }
- *os << '}';
-}
-
-// Used to print a pointer that is neither a char pointer nor a member
-// pointer, when the user doesn't define PrintTo() for it. (A member
-// variable pointer or member function pointer doesn't really point to
-// a location in the address space. Their representation is
-// implementation-defined. Therefore they will be printed as raw
-// bytes.)
-template <typename T>
-void DefaultPrintTo(IsNotContainer /* dummy */,
- true_type /* is a pointer */,
- T* p, ::std::ostream* os) {
- if (p == NULL) {
- *os << "NULL";
- } else {
- // C++ doesn't allow casting from a function pointer to any object
- // pointer.
- //
- // IsTrue() silences warnings: "Condition is always true",
- // "unreachable code".
- if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
- // T is not a function type. We just call << to print p,
- // relying on ADL to pick up user-defined << for their pointer
- // types, if any.
- *os << p;
- } else {
- // T is a function type, so '*os << p' doesn't do what we want
- // (it just prints p as bool). We want to print p as a const
- // void*. However, we cannot cast it to const void* directly,
- // even using reinterpret_cast, as earlier versions of gcc
- // (e.g. 3.4.5) cannot compile the cast when p is a function
- // pointer. Casting to UInt64 first solves the problem.
- *os << reinterpret_cast<const void*>(
- reinterpret_cast<internal::UInt64>(p));
- }
- }
-}
-
-// Used to print a non-container, non-pointer value when the user
-// doesn't define PrintTo() for it.
-template <typename T>
-void DefaultPrintTo(IsNotContainer /* dummy */,
- false_type /* is not a pointer */,
- const T& value, ::std::ostream* os) {
- ::testing_internal::DefaultPrintNonContainerTo(value, os);
-}
-
-// Prints the given value using the << operator if it has one;
-// otherwise prints the bytes in it. This is what
-// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
-// or overloaded for type T.
-//
-// A user can override this behavior for a class type Foo by defining
-// an overload of PrintTo() in the namespace where Foo is defined. We
-// give the user this option as sometimes defining a << operator for
-// Foo is not desirable (e.g. the coding style may prevent doing it,
-// or there is already a << operator but it doesn't do what the user
-// wants).
-template <typename T>
-void PrintTo(const T& value, ::std::ostream* os) {
- // DefaultPrintTo() is overloaded. The type of its first two
- // arguments determine which version will be picked. If T is an
- // STL-style container, the version for container will be called; if
- // T is a pointer, the pointer version will be called; otherwise the
- // generic version will be called.
- //
- // Note that we check for container types here, prior to we check
- // for protocol message types in our operator<<. The rationale is:
- //
- // For protocol messages, we want to give people a chance to
- // override Google Mock's format by defining a PrintTo() or
- // operator<<. For STL containers, other formats can be
- // incompatible with Google Mock's format for the container
- // elements; therefore we check for container types here to ensure
- // that our format is used.
- //
- // The second argument of DefaultPrintTo() is needed to bypass a bug
- // in Symbian's C++ compiler that prevents it from picking the right
- // overload between:
- //
- // PrintTo(const T& x, ...);
- // PrintTo(T* x, ...);
- DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
-}
-
-// The following list of PrintTo() overloads tells
-// UniversalPrinter<T>::Print() how to print standard types (built-in
-// types, strings, plain arrays, and pointers).
-
-// Overloads for various char types.
-GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
-GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
-inline void PrintTo(char c, ::std::ostream* os) {
- // When printing a plain char, we always treat it as unsigned. This
- // way, the output won't be affected by whether the compiler thinks
- // char is signed or not.
- PrintTo(static_cast<unsigned char>(c), os);
-}
-
-// Overloads for other simple built-in types.
-inline void PrintTo(bool x, ::std::ostream* os) {
- *os << (x ? "true" : "false");
-}
-
-// Overload for wchar_t type.
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its decimal code (except for L'\0').
-// The L'\0' char is printed as "L'\\0'". The decimal code is printed
-// as signed integer when wchar_t is implemented by the compiler
-// as a signed type and is printed as an unsigned integer when wchar_t
-// is implemented as an unsigned type.
-GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
-
-// Overloads for C strings.
-GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
-inline void PrintTo(char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const char*>(s), os);
-}
-
-// signed/unsigned char is often used for representing binary data, so
-// we print pointers to it as void* to be safe.
-inline void PrintTo(const signed char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(signed char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(unsigned char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-
-// MSVC can be configured to define wchar_t as a typedef of unsigned
-// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
-// type. When wchar_t is a typedef, defining an overload for const
-// wchar_t* would cause unsigned short* be printed as a wide string,
-// possibly causing invalid memory accesses.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Overloads for wide C strings
-GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
-inline void PrintTo(wchar_t* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const wchar_t*>(s), os);
-}
-#endif
-
-// Overload for C arrays. Multi-dimensional arrays are printed
-// properly.
-
-// Prints the given number of elements in an array, without printing
-// the curly braces.
-template <typename T>
-void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
- UniversalPrint(a[0], os);
- for (size_t i = 1; i != count; i++) {
- *os << ", ";
- UniversalPrint(a[i], os);
- }
-}
-
-// Overloads for ::string and ::std::string.
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);
-inline void PrintTo(const ::string& s, ::std::ostream* os) {
- PrintStringTo(s, os);
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
-inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
- PrintStringTo(s, os);
-}
-
-// Overloads for ::wstring and ::std::wstring.
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::wstring& s, ::std::ostream* os) {
- PrintWideStringTo(s, os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
- PrintWideStringTo(s, os);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_TR1_TUPLE
-// Overload for ::std::tr1::tuple. Needed for printing function arguments,
-// which are packed as tuples.
-
-// Helper function for printing a tuple. T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T& t, ::std::ostream* os);
-
-// Overloaded PrintTo() for tuples of various arities. We support
-// tuples of up-to 10 fields. The following implementation works
-// regardless of whether tr1::tuple is implemented using the
-// non-standard variadic template feature or not.
-
-inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1>
-void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2>
-void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-void PrintTo(
- const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Overload for std::pair.
-template <typename T1, typename T2>
-void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
- *os << '(';
- // We cannot use UniversalPrint(value.first, os) here, as T1 may be
- // a reference type. The same for printing value.second.
- UniversalPrinter<T1>::Print(value.first, os);
- *os << ", ";
- UniversalPrinter<T2>::Print(value.second, os);
- *os << ')';
-}
-
-// Implements printing a non-reference type T by letting the compiler
-// pick the right overload of PrintTo() for T.
-template <typename T>
-class UniversalPrinter {
- public:
- // MSVC warns about adding const to a function type, so we want to
- // disable the warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4180) // Temporarily disables warning 4180.
-#endif // _MSC_VER
-
- // Note: we deliberately don't call this PrintTo(), as that name
- // conflicts with ::testing::internal::PrintTo in the body of the
- // function.
- static void Print(const T& value, ::std::ostream* os) {
- // By default, ::testing::internal::PrintTo() is used for printing
- // the value.
- //
- // Thanks to Koenig look-up, if T is a class and has its own
- // PrintTo() function defined in its namespace, that function will
- // be visible here. Since it is more specific than the generic ones
- // in ::testing::internal, it will be picked by the compiler in the
- // following statement - exactly what we want.
- PrintTo(value, os);
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSC_VER
-};
-
-// UniversalPrintArray(begin, len, os) prints an array of 'len'
-// elements, starting at address 'begin'.
-template <typename T>
-void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
- if (len == 0) {
- *os << "{}";
- } else {
- *os << "{ ";
- const size_t kThreshold = 18;
- const size_t kChunkSize = 8;
- // If the array has more than kThreshold elements, we'll have to
- // omit some details by printing only the first and the last
- // kChunkSize elements.
- // TODO(wan@google.com): let the user control the threshold using a flag.
- if (len <= kThreshold) {
- PrintRawArrayTo(begin, len, os);
- } else {
- PrintRawArrayTo(begin, kChunkSize, os);
- *os << ", ..., ";
- PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
- }
- *os << " }";
- }
-}
-// This overload prints a (const) char array compactly.
-GTEST_API_ void UniversalPrintArray(const char* begin,
- size_t len,
- ::std::ostream* os);
-
-// Implements printing an array type T[N].
-template <typename T, size_t N>
-class UniversalPrinter<T[N]> {
- public:
- // Prints the given array, omitting some elements when there are too
- // many.
- static void Print(const T (&a)[N], ::std::ostream* os) {
- UniversalPrintArray(a, N, os);
- }
-};
-
-// Implements printing a reference type T&.
-template <typename T>
-class UniversalPrinter<T&> {
- public:
- // MSVC warns about adding const to a function type, so we want to
- // disable the warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4180) // Temporarily disables warning 4180.
-#endif // _MSC_VER
-
- static void Print(const T& value, ::std::ostream* os) {
- // Prints the address of the value. We use reinterpret_cast here
- // as static_cast doesn't compile when T is a function type.
- *os << "@" << reinterpret_cast<const void*>(&value) << " ";
-
- // Then prints the value itself.
- UniversalPrint(value, os);
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSC_VER
-};
-
-// Prints a value tersely: for a reference type, the referenced value
-// (but not the address) is printed; for a (const) char pointer, the
-// NUL-terminated string (but not the pointer) is printed.
-template <typename T>
-void UniversalTersePrint(const T& value, ::std::ostream* os) {
- UniversalPrint(value, os);
-}
-inline void UniversalTersePrint(const char* str, ::std::ostream* os) {
- if (str == NULL) {
- *os << "NULL";
- } else {
- UniversalPrint(string(str), os);
- }
-}
-inline void UniversalTersePrint(char* str, ::std::ostream* os) {
- UniversalTersePrint(static_cast<const char*>(str), os);
-}
-
-// Prints a value using the type inferred by the compiler. The
-// difference between this and UniversalTersePrint() is that for a
-// (const) char pointer, this prints both the pointer and the
-// NUL-terminated string.
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os) {
- UniversalPrinter<T>::Print(value, os);
-}
-
-#if GTEST_HAS_TR1_TUPLE
-typedef ::std::vector<string> Strings;
-
-// This helper template allows PrintTo() for tuples and
-// UniversalTersePrintTupleFieldsToStrings() to be defined by
-// induction on the number of tuple fields. The idea is that
-// TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N
-// fields in tuple t, and can be defined in terms of
-// TuplePrefixPrinter<N - 1>.
-
-// The inductive case.
-template <size_t N>
-struct TuplePrefixPrinter {
- // Prints the first N fields of a tuple.
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
- TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os);
- *os << ", ";
- UniversalPrinter<typename ::std::tr1::tuple_element<N - 1, Tuple>::type>
- ::Print(::std::tr1::get<N - 1>(t), os);
- }
-
- // Tersely prints the first N fields of a tuple to a string vector,
- // one element for each field.
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
- TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings);
- ::std::stringstream ss;
- UniversalTersePrint(::std::tr1::get<N - 1>(t), &ss);
- strings->push_back(ss.str());
- }
-};
-
-// Base cases.
-template <>
-struct TuplePrefixPrinter<0> {
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}
-
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}
-};
-// We have to specialize the entire TuplePrefixPrinter<> class
-// template here, even though the definition of
-// TersePrintPrefixToStrings() is the same as the generic version, as
-// Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't
-// support specializing a method template of a class template.
-template <>
-struct TuplePrefixPrinter<1> {
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
- UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>::
- Print(::std::tr1::get<0>(t), os);
- }
-
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
- ::std::stringstream ss;
- UniversalTersePrint(::std::tr1::get<0>(t), &ss);
- strings->push_back(ss.str());
- }
-};
-
-// Helper function for printing a tuple. T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T& t, ::std::ostream* os) {
- *os << "(";
- TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>::
- PrintPrefixTo(t, os);
- *os << ")";
-}
-
-// Prints the fields of a tuple tersely to a string vector, one
-// element for each field. See the comment before
-// UniversalTersePrint() for how we define "tersely".
-template <typename Tuple>
-Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
- Strings result;
- TuplePrefixPrinter< ::std::tr1::tuple_size<Tuple>::value>::
- TersePrintPrefixToStrings(value, &result);
- return result;
-}
-#endif // GTEST_HAS_TR1_TUPLE
-
-} // namespace internal
-
-template <typename T>
-::std::string PrintToString(const T& value) {
- ::std::stringstream ss;
- internal::UniversalTersePrint(value, &ss);
- return ss.str();
-}
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-namespace internal {
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Outputs a message explaining invalid registration of different
-// fixture class for the same test case. This may happen when
-// TEST_P macro is used to define two tests with the same name
-// but in different namespaces.
-GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name,
- const char* file, int line);
-
-template <typename> class ParamGeneratorInterface;
-template <typename> class ParamGenerator;
-
-// Interface for iterating over elements provided by an implementation
-// of ParamGeneratorInterface<T>.
-template <typename T>
-class ParamIteratorInterface {
- public:
- virtual ~ParamIteratorInterface() {}
- // A pointer to the base generator instance.
- // Used only for the purposes of iterator comparison
- // to make sure that two iterators belong to the same generator.
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;
- // Advances iterator to point to the next element
- // provided by the generator. The caller is responsible
- // for not calling Advance() on an iterator equal to
- // BaseGenerator()->End().
- virtual void Advance() = 0;
- // Clones the iterator object. Used for implementing copy semantics
- // of ParamIterator<T>.
- virtual ParamIteratorInterface* Clone() const = 0;
- // Dereferences the current iterator and provides (read-only) access
- // to the pointed value. It is the caller's responsibility not to call
- // Current() on an iterator equal to BaseGenerator()->End().
- // Used for implementing ParamGenerator<T>::operator*().
- virtual const T* Current() const = 0;
- // Determines whether the given iterator and other point to the same
- // element in the sequence generated by the generator.
- // Used for implementing ParamGenerator<T>::operator==().
- virtual bool Equals(const ParamIteratorInterface& other) const = 0;
-};
-
-// Class iterating over elements provided by an implementation of
-// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
-// and implements the const forward iterator concept.
-template <typename T>
-class ParamIterator {
- public:
- typedef T value_type;
- typedef const T& reference;
- typedef ptrdiff_t difference_type;
-
- // ParamIterator assumes ownership of the impl_ pointer.
- ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}
- ParamIterator& operator=(const ParamIterator& other) {
- if (this != &other)
- impl_.reset(other.impl_->Clone());
- return *this;
- }
-
- const T& operator*() const { return *impl_->Current(); }
- const T* operator->() const { return impl_->Current(); }
- // Prefix version of operator++.
- ParamIterator& operator++() {
- impl_->Advance();
- return *this;
- }
- // Postfix version of operator++.
- ParamIterator operator++(int /*unused*/) {
- ParamIteratorInterface<T>* clone = impl_->Clone();
- impl_->Advance();
- return ParamIterator(clone);
- }
- bool operator==(const ParamIterator& other) const {
- return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
- }
- bool operator!=(const ParamIterator& other) const {
- return !(*this == other);
- }
-
- private:
- friend class ParamGenerator<T>;
- explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}
- scoped_ptr<ParamIteratorInterface<T> > impl_;
-};
-
-// ParamGeneratorInterface<T> is the binary interface to access generators
-// defined in other translation units.
-template <typename T>
-class ParamGeneratorInterface {
- public:
- typedef T ParamType;
-
- virtual ~ParamGeneratorInterface() {}
-
- // Generator interface definition
- virtual ParamIteratorInterface<T>* Begin() const = 0;
- virtual ParamIteratorInterface<T>* End() const = 0;
-};
-
-// Wraps ParamGeneratorInterface<T> and provides general generator syntax
-// compatible with the STL Container concept.
-// This class implements copy initialization semantics and the contained
-// ParamGeneratorInterface<T> instance is shared among all copies
-// of the original object. This is possible because that instance is immutable.
-template<typename T>
-class ParamGenerator {
- public:
- typedef ParamIterator<T> iterator;
-
- explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}
- ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}
-
- ParamGenerator& operator=(const ParamGenerator& other) {
- impl_ = other.impl_;
- return *this;
- }
-
- iterator begin() const { return iterator(impl_->Begin()); }
- iterator end() const { return iterator(impl_->End()); }
-
- private:
- linked_ptr<const ParamGeneratorInterface<T> > impl_;
-};
-
-// Generates values from a range of two comparable values. Can be used to
-// generate sequences of user-defined types that implement operator+() and
-// operator<().
-// This class is used in the Range() function.
-template <typename T, typename IncrementT>
-class RangeGenerator : public ParamGeneratorInterface<T> {
- public:
- RangeGenerator(T begin, T end, IncrementT step)
- : begin_(begin), end_(end),
- step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}
- virtual ~RangeGenerator() {}
-
- virtual ParamIteratorInterface<T>* Begin() const {
- return new Iterator(this, begin_, 0, step_);
- }
- virtual ParamIteratorInterface<T>* End() const {
- return new Iterator(this, end_, end_index_, step_);
- }
-
- private:
- class Iterator : public ParamIteratorInterface<T> {
- public:
- Iterator(const ParamGeneratorInterface<T>* base, T value, int index,
- IncrementT step)
- : base_(base), value_(value), index_(index), step_(step) {}
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
- return base_;
- }
- virtual void Advance() {
- value_ = value_ + step_;
- index_++;
- }
- virtual ParamIteratorInterface<T>* Clone() const {
- return new Iterator(*this);
- }
- virtual const T* Current() const { return &value_; }
- virtual bool Equals(const ParamIteratorInterface<T>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const int other_index =
- CheckedDowncastToActualType<const Iterator>(&other)->index_;
- return index_ == other_index;
- }
-
- private:
- Iterator(const Iterator& other)
- : ParamIteratorInterface<T>(),
- base_(other.base_), value_(other.value_), index_(other.index_),
- step_(other.step_) {}
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<T>* const base_;
- T value_;
- int index_;
- const IncrementT step_;
- }; // class RangeGenerator::Iterator
-
- static int CalculateEndIndex(const T& begin,
- const T& end,
- const IncrementT& step) {
- int end_index = 0;
- for (T i = begin; i < end; i = i + step)
- end_index++;
- return end_index;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const RangeGenerator& other);
-
- const T begin_;
- const T end_;
- const IncrementT step_;
- // The index for the end() iterator. All the elements in the generated
- // sequence are indexed (0-based) to aid iterator comparison.
- const int end_index_;
-}; // class RangeGenerator
-
-
-// Generates values from a pair of STL-style iterators. Used in the
-// ValuesIn() function. The elements are copied from the source range
-// since the source can be located on the stack, and the generator
-// is likely to persist beyond that stack frame.
-template <typename T>
-class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
- public:
- template <typename ForwardIterator>
- ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
- : container_(begin, end) {}
- virtual ~ValuesInIteratorRangeGenerator() {}
-
- virtual ParamIteratorInterface<T>* Begin() const {
- return new Iterator(this, container_.begin());
- }
- virtual ParamIteratorInterface<T>* End() const {
- return new Iterator(this, container_.end());
- }
-
- private:
- typedef typename ::std::vector<T> ContainerType;
-
- class Iterator : public ParamIteratorInterface<T> {
- public:
- Iterator(const ParamGeneratorInterface<T>* base,
- typename ContainerType::const_iterator iterator)
- : base_(base), iterator_(iterator) {}
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
- return base_;
- }
- virtual void Advance() {
- ++iterator_;
- value_.reset();
- }
- virtual ParamIteratorInterface<T>* Clone() const {
- return new Iterator(*this);
- }
- // We need to use cached value referenced by iterator_ because *iterator_
- // can return a temporary object (and of type other then T), so just
- // having "return &*iterator_;" doesn't work.
- // value_ is updated here and not in Advance() because Advance()
- // can advance iterator_ beyond the end of the range, and we cannot
- // detect that fact. The client code, on the other hand, is
- // responsible for not calling Current() on an out-of-range iterator.
- virtual const T* Current() const {
- if (value_.get() == NULL)
- value_.reset(new T(*iterator_));
- return value_.get();
- }
- virtual bool Equals(const ParamIteratorInterface<T>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- return iterator_ ==
- CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
- }
-
- private:
- Iterator(const Iterator& other)
- // The explicit constructor call suppresses a false warning
- // emitted by gcc when supplied with the -Wextra option.
- : ParamIteratorInterface<T>(),
- base_(other.base_),
- iterator_(other.iterator_) {}
-
- const ParamGeneratorInterface<T>* const base_;
- typename ContainerType::const_iterator iterator_;
- // A cached value of *iterator_. We keep it here to allow access by
- // pointer in the wrapping iterator's operator->().
- // value_ needs to be mutable to be accessed in Current().
- // Use of scoped_ptr helps manage cached value's lifetime,
- // which is bound by the lifespan of the iterator itself.
- mutable scoped_ptr<const T> value_;
- }; // class ValuesInIteratorRangeGenerator::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const ValuesInIteratorRangeGenerator& other);
-
- const ContainerType container_;
-}; // class ValuesInIteratorRangeGenerator
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Stores a parameter value and later creates tests parameterized with that
-// value.
-template <class TestClass>
-class ParameterizedTestFactory : public TestFactoryBase {
- public:
- typedef typename TestClass::ParamType ParamType;
- explicit ParameterizedTestFactory(ParamType parameter) :
- parameter_(parameter) {}
- virtual Test* CreateTest() {
- TestClass::SetParam(&parameter_);
- return new TestClass();
- }
-
- private:
- const ParamType parameter_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactoryBase is a base class for meta-factories that create
-// test factories for passing into MakeAndRegisterTestInfo function.
-template <class ParamType>
-class TestMetaFactoryBase {
- public:
- virtual ~TestMetaFactoryBase() {}
-
- virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactory creates test factories for passing into
-// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
-// ownership of test factory pointer, same factory object cannot be passed
-// into that method twice. But ParameterizedTestCaseInfo is going to call
-// it for each Test/Parameter value combination. Thus it needs meta factory
-// creator class.
-template <class TestCase>
-class TestMetaFactory
- : public TestMetaFactoryBase<typename TestCase::ParamType> {
- public:
- typedef typename TestCase::ParamType ParamType;
-
- TestMetaFactory() {}
-
- virtual TestFactoryBase* CreateTestFactory(ParamType parameter) {
- return new ParameterizedTestFactory<TestCase>(parameter);
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseInfoBase is a generic interface
-// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase
-// accumulates test information provided by TEST_P macro invocations
-// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations
-// and uses that information to register all resulting test instances
-// in RegisterTests method. The ParameterizeTestCaseRegistry class holds
-// a collection of pointers to the ParameterizedTestCaseInfo objects
-// and calls RegisterTests() on each of them when asked.
-class ParameterizedTestCaseInfoBase {
- public:
- virtual ~ParameterizedTestCaseInfoBase() {}
-
- // Base part of test case name for display purposes.
- virtual const string& GetTestCaseName() const = 0;
- // Test case id to verify identity.
- virtual TypeId GetTestCaseTypeId() const = 0;
- // UnitTest class invokes this method to register tests in this
- // test case right before running them in RUN_ALL_TESTS macro.
- // This method should not be called more then once on any single
- // instance of a ParameterizedTestCaseInfoBase derived class.
- virtual void RegisterTests() = 0;
-
- protected:
- ParameterizedTestCaseInfoBase() {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P
-// macro invocations for a particular test case and generators
-// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that
-// test case. It registers tests with all values generated by all
-// generators when asked.
-template <class TestCase>
-class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
- public:
- // ParamType and GeneratorCreationFunc are private types but are required
- // for declarations of public methods AddTestPattern() and
- // AddTestCaseInstantiation().
- typedef typename TestCase::ParamType ParamType;
- // A function that returns an instance of appropriate generator type.
- typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
-
- explicit ParameterizedTestCaseInfo(const char* name)
- : test_case_name_(name) {}
-
- // Test case base name for display purposes.
- virtual const string& GetTestCaseName() const { return test_case_name_; }
- // Test case id to verify identity.
- virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
- // TEST_P macro uses AddTestPattern() to record information
- // about a single test in a LocalTestInfo structure.
- // test_case_name is the base name of the test case (without invocation
- // prefix). test_base_name is the name of an individual test without
- // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
- // test case base name and DoBar is test base name.
- void AddTestPattern(const char* test_case_name,
- const char* test_base_name,
- TestMetaFactoryBase<ParamType>* meta_factory) {
- tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name,
- test_base_name,
- meta_factory)));
- }
- // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
- // about a generator.
- int AddTestCaseInstantiation(const string& instantiation_name,
- GeneratorCreationFunc* func,
- const char* /* file */,
- int /* line */) {
- instantiations_.push_back(::std::make_pair(instantiation_name, func));
- return 0; // Return value used only to run this method in namespace scope.
- }
- // UnitTest class invokes this method to register tests in this test case
- // test cases right before running tests in RUN_ALL_TESTS macro.
- // This method should not be called more then once on any single
- // instance of a ParameterizedTestCaseInfoBase derived class.
- // UnitTest has a guard to prevent from calling this method more then once.
- virtual void RegisterTests() {
- for (typename TestInfoContainer::iterator test_it = tests_.begin();
- test_it != tests_.end(); ++test_it) {
- linked_ptr<TestInfo> test_info = *test_it;
- for (typename InstantiationContainer::iterator gen_it =
- instantiations_.begin(); gen_it != instantiations_.end();
- ++gen_it) {
- const string& instantiation_name = gen_it->first;
- ParamGenerator<ParamType> generator((*gen_it->second)());
-
- Message test_case_name_stream;
- if ( !instantiation_name.empty() )
- test_case_name_stream << instantiation_name << "/";
- test_case_name_stream << test_info->test_case_base_name;
-
- int i = 0;
- for (typename ParamGenerator<ParamType>::iterator param_it =
- generator.begin();
- param_it != generator.end(); ++param_it, ++i) {
- Message test_name_stream;
- test_name_stream << test_info->test_base_name << "/" << i;
- MakeAndRegisterTestInfo(
- test_case_name_stream.GetString().c_str(),
- test_name_stream.GetString().c_str(),
- NULL, // No type parameter.
- PrintToString(*param_it).c_str(),
- GetTestCaseTypeId(),
- TestCase::SetUpTestCase,
- TestCase::TearDownTestCase,
- test_info->test_meta_factory->CreateTestFactory(*param_it));
- } // for param_it
- } // for gen_it
- } // for test_it
- } // RegisterTests
-
- private:
- // LocalTestInfo structure keeps information about a single test registered
- // with TEST_P macro.
- struct TestInfo {
- TestInfo(const char* a_test_case_base_name,
- const char* a_test_base_name,
- TestMetaFactoryBase<ParamType>* a_test_meta_factory) :
- test_case_base_name(a_test_case_base_name),
- test_base_name(a_test_base_name),
- test_meta_factory(a_test_meta_factory) {}
-
- const string test_case_base_name;
- const string test_base_name;
- const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
- };
- typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
- // Keeps pairs of <Instantiation name, Sequence generator creation function>
- // received from INSTANTIATE_TEST_CASE_P macros.
- typedef ::std::vector<std::pair<string, GeneratorCreationFunc*> >
- InstantiationContainer;
-
- const string test_case_name_;
- TestInfoContainer tests_;
- InstantiationContainer instantiations_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo);
-}; // class ParameterizedTestCaseInfo
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase
-// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P
-// macros use it to locate their corresponding ParameterizedTestCaseInfo
-// descriptors.
-class ParameterizedTestCaseRegistry {
- public:
- ParameterizedTestCaseRegistry() {}
- ~ParameterizedTestCaseRegistry() {
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- delete *it;
- }
- }
-
- // Looks up or creates and returns a structure containing information about
- // tests and instantiations of a particular test case.
- template <class TestCase>
- ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(
- const char* test_case_name,
- const char* file,
- int line) {
- ParameterizedTestCaseInfo<TestCase>* typed_test_info = NULL;
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- if ((*it)->GetTestCaseName() == test_case_name) {
- if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>()) {
- // Complain about incorrect usage of Google Test facilities
- // and terminate the program since we cannot guaranty correct
- // test case setup and tear-down in this case.
- ReportInvalidTestCaseType(test_case_name, file, line);
- posix::Abort();
- } else {
- // At this point we are sure that the object we found is of the same
- // type we are looking for, so we downcast it to that type
- // without further checks.
- typed_test_info = CheckedDowncastToActualType<
- ParameterizedTestCaseInfo<TestCase> >(*it);
- }
- break;
- }
- }
- if (typed_test_info == NULL) {
- typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name);
- test_case_infos_.push_back(typed_test_info);
- }
- return typed_test_info;
- }
- void RegisterTests() {
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- (*it)->RegisterTests();
- }
- }
-
- private:
- typedef ::std::vector<ParameterizedTestCaseInfoBase*> TestCaseInfoContainer;
-
- TestCaseInfoContainer test_case_infos_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry);
-};
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-// This file was GENERATED by command:
-// pump.py gtest-param-util-generated.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently Google Test supports at most 50 arguments in Values,
-// and at most 10 arguments in Combine. Please contact
-// googletestframework@googlegroups.com if you need more.
-// Please note that the number of arguments to Combine is limited
-// by the maximum arity of the implementation of tr1::tuple which is
-// currently set at 10.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Forward declarations of ValuesIn(), which is implemented in
-// include/gtest/gtest-param-test.h.
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end);
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]);
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container);
-
-namespace internal {
-
-// Used in the Values() function to provide polymorphic capabilities.
-template <typename T1>
-class ValueArray1 {
- public:
- explicit ValueArray1(T1 v1) : v1_(v1) {}
-
- template <typename T>
- operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray1& other);
-
- const T1 v1_;
-};
-
-template <typename T1, typename T2>
-class ValueArray2 {
- public:
- ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray2& other);
-
- const T1 v1_;
- const T2 v2_;
-};
-
-template <typename T1, typename T2, typename T3>
-class ValueArray3 {
- public:
- ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray3& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-class ValueArray4 {
- public:
- ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray4& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class ValueArray5 {
- public:
- ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray5& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class ValueArray6 {
- public:
- ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray6& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class ValueArray7 {
- public:
- ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray7& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class ValueArray8 {
- public:
- ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray8& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class ValueArray9 {
- public:
- ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray9& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class ValueArray10 {
- public:
- ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray10& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-class ValueArray11 {
- public:
- ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray11& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-class ValueArray12 {
- public:
- ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray12& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-class ValueArray13 {
- public:
- ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray13& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-class ValueArray14 {
- public:
- ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray14& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-class ValueArray15 {
- public:
- ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray15& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-class ValueArray16 {
- public:
- ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray16& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-class ValueArray17 {
- public:
- ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray17& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-class ValueArray18 {
- public:
- ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray18& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-class ValueArray19 {
- public:
- ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray19& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-class ValueArray20 {
- public:
- ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray20& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-class ValueArray21 {
- public:
- ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray21& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-class ValueArray22 {
- public:
- ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray22& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-class ValueArray23 {
- public:
- ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_,
- v23_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray23& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-class ValueArray24 {
- public:
- ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray24& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-class ValueArray25 {
- public:
- ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray25& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-class ValueArray26 {
- public:
- ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray26& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-class ValueArray27 {
- public:
- ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray27& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-class ValueArray28 {
- public:
- ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray28& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-class ValueArray29 {
- public:
- ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray29& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-class ValueArray30 {
- public:
- ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray30& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-class ValueArray31 {
- public:
- ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray31& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-class ValueArray32 {
- public:
- ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray32& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-class ValueArray33 {
- public:
- ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
- T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray33& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-class ValueArray34 {
- public:
- ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray34& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-class ValueArray35 {
- public:
- ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
- v32_(v32), v33_(v33), v34_(v34), v35_(v35) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_,
- v35_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray35& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-class ValueArray36 {
- public:
- ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
- v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray36& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-class ValueArray37 {
- public:
- ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
- v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
- v36_(v36), v37_(v37) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray37& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-class ValueArray38 {
- public:
- ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray38& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-class ValueArray39 {
- public:
- ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray39& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-class ValueArray40 {
- public:
- ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
- v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
- v40_(v40) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray40& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-class ValueArray41 {
- public:
- ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
- T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray41& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-class ValueArray42 {
- public:
- ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray42& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-class ValueArray43 {
- public:
- ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
- v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37),
- v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray43& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-class ValueArray44 {
- public:
- ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
- v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36),
- v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42),
- v43_(v43), v44_(v44) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray44& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-class ValueArray45 {
- public:
- ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
- v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
- v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41),
- v42_(v42), v43_(v43), v44_(v44), v45_(v45) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray45& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-class ValueArray46 {
- public:
- ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
- v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray46& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-class ValueArray47 {
- public:
- ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
- v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46),
- v47_(v47) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_,
- v47_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray47& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-class ValueArray48 {
- public:
- ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
- v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
- v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45),
- v46_(v46), v47_(v47), v48_(v48) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray48& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-class ValueArray49 {
- public:
- ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48,
- T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
- v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_, v49_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray49& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
- const T49 v49_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-class ValueArray50 {
- public:
- ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49,
- T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
- v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_, v49_, v50_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray50& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
- const T49 v49_;
- const T50 v50_;
-};
-
-# if GTEST_HAS_COMBINE
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Generates values from the Cartesian product of values produced
-// by the argument generators.
-//
-template <typename T1, typename T2>
-class CartesianProductGenerator2
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > {
- public:
- typedef ::std::tr1::tuple<T1, T2> ParamType;
-
- CartesianProductGenerator2(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2)
- : g1_(g1), g2_(g2) {}
- virtual ~CartesianProductGenerator2() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current2_;
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- ParamType current_value_;
- }; // class CartesianProductGenerator2::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator2& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
-}; // class CartesianProductGenerator2
-
-
-template <typename T1, typename T2, typename T3>
-class CartesianProductGenerator3
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3> ParamType;
-
- CartesianProductGenerator3(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3)
- : g1_(g1), g2_(g2), g3_(g3) {}
- virtual ~CartesianProductGenerator3() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current3_;
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- ParamType current_value_;
- }; // class CartesianProductGenerator3::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator3& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
-}; // class CartesianProductGenerator3
-
-
-template <typename T1, typename T2, typename T3, typename T4>
-class CartesianProductGenerator4
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;
-
- CartesianProductGenerator4(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
- virtual ~CartesianProductGenerator4() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current4_;
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- ParamType current_value_;
- }; // class CartesianProductGenerator4::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator4& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
-}; // class CartesianProductGenerator4
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class CartesianProductGenerator5
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;
-
- CartesianProductGenerator5(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
- virtual ~CartesianProductGenerator5() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current5_;
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- ParamType current_value_;
- }; // class CartesianProductGenerator5::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator5& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
-}; // class CartesianProductGenerator5
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class CartesianProductGenerator6
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,
- T6> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;
-
- CartesianProductGenerator6(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
- virtual ~CartesianProductGenerator6() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current6_;
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- ParamType current_value_;
- }; // class CartesianProductGenerator6::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator6& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
-}; // class CartesianProductGenerator6
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class CartesianProductGenerator7
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
-
- CartesianProductGenerator7(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
- virtual ~CartesianProductGenerator7() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current7_;
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- ParamType current_value_;
- }; // class CartesianProductGenerator7::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator7& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
-}; // class CartesianProductGenerator7
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class CartesianProductGenerator8
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
-
- CartesianProductGenerator8(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
- g8_(g8) {}
- virtual ~CartesianProductGenerator8() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current8_;
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- ParamType current_value_;
- }; // class CartesianProductGenerator8::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator8& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
-}; // class CartesianProductGenerator8
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class CartesianProductGenerator9
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8, T9> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
-
- CartesianProductGenerator9(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9) {}
- virtual ~CartesianProductGenerator9() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end(), g9_, g9_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8,
- const ParamGenerator<T9>& g9,
- const typename ParamGenerator<T9>::iterator& current9)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
- begin9_(g9.begin()), end9_(g9.end()), current9_(current9) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current9_;
- if (current9_ == end9_) {
- current9_ = begin9_;
- ++current8_;
- }
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_ &&
- current9_ == typed_other->current9_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_),
- begin9_(other.begin9_),
- end9_(other.end9_),
- current9_(other.current9_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_,
- *current9_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_ ||
- current9_ == end9_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- const typename ParamGenerator<T9>::iterator begin9_;
- const typename ParamGenerator<T9>::iterator end9_;
- typename ParamGenerator<T9>::iterator current9_;
- ParamType current_value_;
- }; // class CartesianProductGenerator9::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator9& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
- const ParamGenerator<T9> g9_;
-}; // class CartesianProductGenerator9
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class CartesianProductGenerator10
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8, T9, T10> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
-
- CartesianProductGenerator10(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9,
- const ParamGenerator<T10>& g10)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9), g10_(g10) {}
- virtual ~CartesianProductGenerator10() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end(), g9_, g9_.end(), g10_, g10_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8,
- const ParamGenerator<T9>& g9,
- const typename ParamGenerator<T9>::iterator& current9,
- const ParamGenerator<T10>& g10,
- const typename ParamGenerator<T10>::iterator& current10)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
- begin9_(g9.begin()), end9_(g9.end()), current9_(current9),
- begin10_(g10.begin()), end10_(g10.end()), current10_(current10) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current10_;
- if (current10_ == end10_) {
- current10_ = begin10_;
- ++current9_;
- }
- if (current9_ == end9_) {
- current9_ = begin9_;
- ++current8_;
- }
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_ &&
- current9_ == typed_other->current9_ &&
- current10_ == typed_other->current10_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_),
- begin9_(other.begin9_),
- end9_(other.end9_),
- current9_(other.current9_),
- begin10_(other.begin10_),
- end10_(other.end10_),
- current10_(other.current10_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_,
- *current9_, *current10_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_ ||
- current9_ == end9_ ||
- current10_ == end10_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- const typename ParamGenerator<T9>::iterator begin9_;
- const typename ParamGenerator<T9>::iterator end9_;
- typename ParamGenerator<T9>::iterator current9_;
- const typename ParamGenerator<T10>::iterator begin10_;
- const typename ParamGenerator<T10>::iterator end10_;
- typename ParamGenerator<T10>::iterator current10_;
- ParamType current_value_;
- }; // class CartesianProductGenerator10::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator10& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
- const ParamGenerator<T9> g9_;
- const ParamGenerator<T10> g10_;
-}; // class CartesianProductGenerator10
-
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Helper classes providing Combine() with polymorphic features. They allow
-// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
-// convertible to U.
-//
-template <class Generator1, class Generator2>
-class CartesianProductHolder2 {
- public:
-CartesianProductHolder2(const Generator1& g1, const Generator2& g2)
- : g1_(g1), g2_(g2) {}
- template <typename T1, typename T2>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2> >(
- new CartesianProductGenerator2<T1, T2>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder2& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
-}; // class CartesianProductHolder2
-
-template <class Generator1, class Generator2, class Generator3>
-class CartesianProductHolder3 {
- public:
-CartesianProductHolder3(const Generator1& g1, const Generator2& g2,
- const Generator3& g3)
- : g1_(g1), g2_(g2), g3_(g3) {}
- template <typename T1, typename T2, typename T3>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >(
- new CartesianProductGenerator3<T1, T2, T3>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder3& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
-}; // class CartesianProductHolder3
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4>
-class CartesianProductHolder4 {
- public:
-CartesianProductHolder4(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
- template <typename T1, typename T2, typename T3, typename T4>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >(
- new CartesianProductGenerator4<T1, T2, T3, T4>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder4& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
-}; // class CartesianProductHolder4
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5>
-class CartesianProductHolder5 {
- public:
-CartesianProductHolder5(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >(
- new CartesianProductGenerator5<T1, T2, T3, T4, T5>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder5& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
-}; // class CartesianProductHolder5
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6>
-class CartesianProductHolder6 {
- public:
-CartesianProductHolder6(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >(
- new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder6& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
-}; // class CartesianProductHolder6
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7>
-class CartesianProductHolder7 {
- public:
-CartesianProductHolder7(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >(
- new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder7& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
-}; // class CartesianProductHolder7
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8>
-class CartesianProductHolder8 {
- public:
-CartesianProductHolder8(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
- g8_(g8) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,
- T8> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(
- new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder8& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
-}; // class CartesianProductHolder8
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8, class Generator9>
-class CartesianProductHolder9 {
- public:
-CartesianProductHolder9(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8,
- const Generator9& g9)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> >(
- new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_),
- static_cast<ParamGenerator<T9> >(g9_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder9& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
- const Generator9 g9_;
-}; // class CartesianProductHolder9
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8, class Generator9, class Generator10>
-class CartesianProductHolder10 {
- public:
-CartesianProductHolder10(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8,
- const Generator9& g9, const Generator10& g10)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9), g10_(g10) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9, T10> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9, T10> >(
- new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_),
- static_cast<ParamGenerator<T9> >(g9_),
- static_cast<ParamGenerator<T10> >(g10_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder10& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
- const Generator9 g9_;
- const Generator10 g10_;
-}; // class CartesianProductHolder10
-
-# endif // GTEST_HAS_COMBINE
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Functions producing parameter generators.
-//
-// Google Test uses these generators to produce parameters for value-
-// parameterized tests. When a parameterized test case is instantiated
-// with a particular generator, Google Test creates and runs tests
-// for each element in the sequence produced by the generator.
-//
-// In the following sample, tests from test case FooTest are instantiated
-// each three times with parameter values 3, 5, and 8:
-//
-// class FooTest : public TestWithParam<int> { ... };
-//
-// TEST_P(FooTest, TestThis) {
-// }
-// TEST_P(FooTest, TestThat) {
-// }
-// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
-//
-
-// Range() returns generators providing sequences of values in a range.
-//
-// Synopsis:
-// Range(start, end)
-// - returns a generator producing a sequence of values {start, start+1,
-// start+2, ..., }.
-// Range(start, end, step)
-// - returns a generator producing a sequence of values {start, start+step,
-// start+step+step, ..., }.
-// Notes:
-// * The generated sequences never include end. For example, Range(1, 5)
-// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
-// returns a generator producing {1, 3, 5, 7}.
-// * start and end must have the same type. That type may be any integral or
-// floating-point type or a user defined type satisfying these conditions:
-// * It must be assignable (have operator=() defined).
-// * It must have operator+() (operator+(int-compatible type) for
-// two-operand version).
-// * It must have operator<() defined.
-// Elements in the resulting sequences will also have that type.
-// * Condition start < end must be satisfied in order for resulting sequences
-// to contain any elements.
-//
-template <typename T, typename IncrementT>
-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
- return internal::ParamGenerator<T>(
- new internal::RangeGenerator<T, IncrementT>(start, end, step));
-}
-
-template <typename T>
-internal::ParamGenerator<T> Range(T start, T end) {
- return Range(start, end, 1);
-}
-
-// ValuesIn() function allows generation of tests with parameters coming from
-// a container.
-//
-// Synopsis:
-// ValuesIn(const T (&array)[N])
-// - returns a generator producing sequences with elements from
-// a C-style array.
-// ValuesIn(const Container& container)
-// - returns a generator producing sequences with elements from
-// an STL-style container.
-// ValuesIn(Iterator begin, Iterator end)
-// - returns a generator producing sequences with elements from
-// a range [begin, end) defined by a pair of STL-style iterators. These
-// iterators can also be plain C pointers.
-//
-// Please note that ValuesIn copies the values from the containers
-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
-//
-// Examples:
-//
-// This instantiates tests from test case StringTest
-// each with C-string values of "foo", "bar", and "baz":
-//
-// const char* strings[] = {"foo", "bar", "baz"};
-// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
-//
-// This instantiates tests from test case StlStringTest
-// each with STL strings with values "a" and "b":
-//
-// ::std::vector< ::std::string> GetParameterStrings() {
-// ::std::vector< ::std::string> v;
-// v.push_back("a");
-// v.push_back("b");
-// return v;
-// }
-//
-// INSTANTIATE_TEST_CASE_P(CharSequence,
-// StlStringTest,
-// ValuesIn(GetParameterStrings()));
-//
-//
-// This will also instantiate tests from CharTest
-// each with parameter values 'a' and 'b':
-//
-// ::std::list<char> GetParameterChars() {
-// ::std::list<char> list;
-// list.push_back('a');
-// list.push_back('b');
-// return list;
-// }
-// ::std::list<char> l = GetParameterChars();
-// INSTANTIATE_TEST_CASE_P(CharSequence2,
-// CharTest,
-// ValuesIn(l.begin(), l.end()));
-//
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end) {
- typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
- ::value_type ParamType;
- return internal::ParamGenerator<ParamType>(
- new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
-}
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
- return ValuesIn(array, array + N);
-}
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container) {
- return ValuesIn(container.begin(), container.end());
-}
-
-// Values() allows generating tests from explicitly specified list of
-// parameters.
-//
-// Synopsis:
-// Values(T v1, T v2, ..., T vN)
-// - returns a generator producing sequences with elements v1, v2, ..., vN.
-//
-// For example, this instantiates tests from test case BarTest each
-// with values "one", "two", and "three":
-//
-// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
-//
-// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
-// The exact type of values will depend on the type of parameter in BazTest.
-//
-// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
-//
-// Currently, Values() supports from 1 to 50 parameters.
-//
-template <typename T1>
-internal::ValueArray1<T1> Values(T1 v1) {
- return internal::ValueArray1<T1>(v1);
-}
-
-template <typename T1, typename T2>
-internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {
- return internal::ValueArray2<T1, T2>(v1, v2);
-}
-
-template <typename T1, typename T2, typename T3>
-internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {
- return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {
- return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5) {
- return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6) {
- return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7) {
- return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
- v6, v7);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,
- v5, v6, v7, v8);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
- T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11) {
- return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
- T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12) {
- return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13) {
- return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16) {
- return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17) {
- return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18) {
- return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
- return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
- return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
- return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22) {
- return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23) {
- return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24) {
- return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
- v19, v20, v21, v22, v23, v24);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
- return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
- v18, v19, v20, v21, v22, v23, v24, v25);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26) {
- return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27) {
- return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28) {
- return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
- v28);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29) {
- return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
- v27, v28, v29);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
- return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
- v26, v27, v28, v29, v30);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
- return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
- v25, v26, v27, v28, v29, v30, v31);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32) {
- return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33) {
- return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
- T31 v31, T32 v32, T33 v33, T34 v34) {
- return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
- return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
- return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37) {
- return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36, v37);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37, T38 v38) {
- return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
- v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
- v33, v34, v35, v36, v37, v38);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37, T38 v38, T39 v39) {
- return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
- v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
- v32, v33, v34, v35, v36, v37, v38, v39);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
- T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
- T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
- return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
- v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
- return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
- v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42) {
- return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
- v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
- v42);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43) {
- return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
- v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
- v41, v42, v43);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44) {
- return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
- v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
- v40, v41, v42, v43, v44);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
- T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
- T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
- return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
- v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
- v39, v40, v41, v42, v43, v44, v45);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
- return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
- v38, v39, v40, v41, v42, v43, v44, v45, v46);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
- return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
- v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
- T48 v48) {
- return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
- v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
- T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
- T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
- T47 v47, T48 v48, T49 v49) {
- return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
- v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
- T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
- T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
- return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
- v48, v49, v50);
-}
-
-// Bool() allows generating tests with parameters in a set of (false, true).
-//
-// Synopsis:
-// Bool()
-// - returns a generator producing sequences with elements {false, true}.
-//
-// It is useful when testing code that depends on Boolean flags. Combinations
-// of multiple flags can be tested when several Bool()'s are combined using
-// Combine() function.
-//
-// In the following example all tests in the test case FlagDependentTest
-// will be instantiated twice with parameters false and true.
-//
-// class FlagDependentTest : public testing::TestWithParam<bool> {
-// virtual void SetUp() {
-// external_flag = GetParam();
-// }
-// }
-// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
-//
-inline internal::ParamGenerator<bool> Bool() {
- return Values(false, true);
-}
-
-# if GTEST_HAS_COMBINE
-// Combine() allows the user to combine two or more sequences to produce
-// values of a Cartesian product of those sequences' elements.
-//
-// Synopsis:
-// Combine(gen1, gen2, ..., genN)
-// - returns a generator producing sequences with elements coming from
-// the Cartesian product of elements from the sequences generated by
-// gen1, gen2, ..., genN. The sequence elements will have a type of
-// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
-// of elements from sequences produces by gen1, gen2, ..., genN.
-//
-// Combine can have up to 10 arguments. This number is currently limited
-// by the maximum number of elements in the tuple implementation used by Google
-// Test.
-//
-// Example:
-//
-// This will instantiate tests in test case AnimalTest each one with
-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
-// tuple("dog", BLACK), and tuple("dog", WHITE):
-//
-// enum Color { BLACK, GRAY, WHITE };
-// class AnimalTest
-// : public testing::TestWithParam<tuple<const char*, Color> > {...};
-//
-// TEST_P(AnimalTest, AnimalLooksNice) {...}
-//
-// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
-// Combine(Values("cat", "dog"),
-// Values(BLACK, WHITE)));
-//
-// This will instantiate tests in FlagDependentTest with all variations of two
-// Boolean flags:
-//
-// class FlagDependentTest
-// : public testing::TestWithParam<tuple(bool, bool)> > {
-// virtual void SetUp() {
-// // Assigns external_flag_1 and external_flag_2 values from the tuple.
-// tie(external_flag_1, external_flag_2) = GetParam();
-// }
-// };
-//
-// TEST_P(FlagDependentTest, TestFeature1) {
-// // Test your code using external_flag_1 and external_flag_2 here.
-// }
-// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
-// Combine(Bool(), Bool()));
-//
-template <typename Generator1, typename Generator2>
-internal::CartesianProductHolder2<Generator1, Generator2> Combine(
- const Generator1& g1, const Generator2& g2) {
- return internal::CartesianProductHolder2<Generator1, Generator2>(
- g1, g2);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3>
-internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3) {
- return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
- g1, g2, g3);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4>
-internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
- Generator4> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4) {
- return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
- Generator4>(
- g1, g2, g3, g4);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5>
-internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
- Generator4, Generator5> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5) {
- return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
- Generator4, Generator5>(
- g1, g2, g3, g4, g5);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6>
-internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6) {
- return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6>(
- g1, g2, g3, g4, g5, g6);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7>
-internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7) {
- return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7>(
- g1, g2, g3, g4, g5, g6, g7);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8>
-internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8) {
- return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8>(
- g1, g2, g3, g4, g5, g6, g7, g8);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8, typename Generator9>
-internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8,
- Generator9> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8, const Generator9& g9) {
- return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
- g1, g2, g3, g4, g5, g6, g7, g8, g9);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8, typename Generator9,
- typename Generator10>
-internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
- Generator10> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8, const Generator9& g9,
- const Generator10& g10) {
- return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
- Generator10>(
- g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
-}
-# endif // GTEST_HAS_COMBINE
-
-
-
-# define TEST_P(test_case_name, test_name) \
- class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- : public test_case_name { \
- public: \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
- virtual void TestBody(); \
- private: \
- static int AddToRegistry() { \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
- #test_case_name, \
- #test_name, \
- new ::testing::internal::TestMetaFactory< \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
- return 0; \
- } \
- static int gtest_registering_dummy_; \
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
- }; \
- int GTEST_TEST_CLASS_NAME_(test_case_name, \
- test_name)::gtest_registering_dummy_ = \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
- void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
- ::testing::internal::ParamGenerator<test_case_name::ParamType> \
- gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
- int gtest_##prefix##test_case_name##_dummy_ = \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
- #prefix, \
- &gtest_##prefix##test_case_name##_EvalGenerator_, \
- __FILE__, __LINE__)
-
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Google C++ Testing Framework definitions useful in production code.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-
-// When you need to test the private or protected members of a class,
-// use the FRIEND_TEST macro to declare your tests as friends of the
-// class. For example:
-//
-// class MyClass {
-// private:
-// void MyMethod();
-// FRIEND_TEST(MyClassTest, MyMethod);
-// };
-//
-// class MyClassTest : public testing::Test {
-// // ...
-// };
-//
-// TEST_F(MyClassTest, MyMethod) {
-// // Can call MyClass::MyMethod() here.
-// }
-
-#define FRIEND_TEST(test_case_name, test_name)\
-friend class test_case_name##_##test_name##_Test
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-
-#include <iosfwd>
-#include <vector>
-
-namespace testing {
-
-// A copyable object representing the result of a test part (i.e. an
-// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
-//
-// Don't inherit from TestPartResult as its destructor is not virtual.
-class GTEST_API_ TestPartResult {
- public:
- // The possible outcomes of a test part (i.e. an assertion or an
- // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
- enum Type {
- kSuccess, // Succeeded.
- kNonFatalFailure, // Failed but the test can continue.
- kFatalFailure // Failed and the test should be terminated.
- };
-
- // C'tor. TestPartResult does NOT have a default constructor.
- // Always use this constructor (with parameters) to create a
- // TestPartResult object.
- TestPartResult(Type a_type,
- const char* a_file_name,
- int a_line_number,
- const char* a_message)
- : type_(a_type),
- file_name_(a_file_name),
- line_number_(a_line_number),
- summary_(ExtractSummary(a_message)),
- message_(a_message) {
- }
-
- // Gets the outcome of the test part.
- Type type() const { return type_; }
-
- // Gets the name of the source file where the test part took place, or
- // NULL if it's unknown.
- const char* file_name() const { return file_name_.c_str(); }
-
- // Gets the line in the source file where the test part took place,
- // or -1 if it's unknown.
- int line_number() const { return line_number_; }
-
- // Gets the summary of the failure message.
- const char* summary() const { return summary_.c_str(); }
-
- // Gets the message associated with the test part.
- const char* message() const { return message_.c_str(); }
-
- // Returns true iff the test part passed.
- bool passed() const { return type_ == kSuccess; }
-
- // Returns true iff the test part failed.
- bool failed() const { return type_ != kSuccess; }
-
- // Returns true iff the test part non-fatally failed.
- bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
-
- // Returns true iff the test part fatally failed.
- bool fatally_failed() const { return type_ == kFatalFailure; }
- private:
- Type type_;
-
- // Gets the summary of the failure message by omitting the stack
- // trace in it.
- static internal::String ExtractSummary(const char* message);
-
- // The name of the source file where the test part took place, or
- // NULL if the source file is unknown.
- internal::String file_name_;
- // The line in the source file where the test part took place, or -1
- // if the line number is unknown.
- int line_number_;
- internal::String summary_; // The test failure summary.
- internal::String message_; // The test failure message.
-};
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result);
-
-// An array of TestPartResult objects.
-//
-// Don't inherit from TestPartResultArray as its destructor is not
-// virtual.
-class GTEST_API_ TestPartResultArray {
- public:
- TestPartResultArray() {}
-
- // Appends the given TestPartResult to the array.
- void Append(const TestPartResult& result);
-
- // Returns the TestPartResult at the given index (0-based).
- const TestPartResult& GetTestPartResult(int index) const;
-
- // Returns the number of TestPartResult objects in the array.
- int size() const;
-
- private:
- std::vector<TestPartResult> array_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);
-};
-
-// This interface knows how to report a test part result.
-class TestPartResultReporterInterface {
- public:
- virtual ~TestPartResultReporterInterface() {}
-
- virtual void ReportTestPartResult(const TestPartResult& result) = 0;
-};
-
-namespace internal {
-
-// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
-// statement generates new fatal failures. To do so it registers itself as the
-// current test part result reporter. Besides checking if fatal failures were
-// reported, it only delegates the reporting to the former result reporter.
-// The original result reporter is restored in the destructor.
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-class GTEST_API_ HasNewFatalFailureHelper
- : public TestPartResultReporterInterface {
- public:
- HasNewFatalFailureHelper();
- virtual ~HasNewFatalFailureHelper();
- virtual void ReportTestPartResult(const TestPartResult& result);
- bool has_new_fatal_failure() const { return has_new_fatal_failure_; }
- private:
- bool has_new_fatal_failure_;
- TestPartResultReporterInterface* original_reporter_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-
-// This header implements typed tests and type-parameterized tests.
-
-// Typed (aka type-driven) tests repeat the same test for types in a
-// list. You must know which types you want to test with when writing
-// typed tests. Here's how you do it:
-
-#if 0
-
-// First, define a fixture class template. It should be parameterized
-// by a type. Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- public:
- ...
- typedef std::list<T> List;
- static T shared_;
- T value_;
-};
-
-// Next, associate a list of types with the test case, which will be
-// repeated for each type in the list. The typedef is necessary for
-// the macro to parse correctly.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-TYPED_TEST_CASE(FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-// TYPED_TEST_CASE(FooTest, int);
-
-// Then, use TYPED_TEST() instead of TEST_F() to define as many typed
-// tests for this test case as you want.
-TYPED_TEST(FooTest, DoesBlah) {
- // Inside a test, refer to TypeParam to get the type parameter.
- // Since we are inside a derived class template, C++ requires use to
- // visit the members of FooTest via 'this'.
- TypeParam n = this->value_;
-
- // To visit static members of the fixture, add the TestFixture::
- // prefix.
- n += TestFixture::shared_;
-
- // To refer to typedefs in the fixture, add the "typename
- // TestFixture::" prefix.
- typename TestFixture::List values;
- values.push_back(n);
- ...
-}
-
-TYPED_TEST(FooTest, HasPropertyA) { ... }
-
-#endif // 0
-
-// Type-parameterized tests are abstract test patterns parameterized
-// by a type. Compared with typed tests, type-parameterized tests
-// allow you to define the test pattern without knowing what the type
-// parameters are. The defined pattern can be instantiated with
-// different types any number of times, in any number of translation
-// units.
-//
-// If you are designing an interface or concept, you can define a
-// suite of type-parameterized tests to verify properties that any
-// valid implementation of the interface/concept should have. Then,
-// each implementation can easily instantiate the test suite to verify
-// that it conforms to the requirements, without having to write
-// similar tests repeatedly. Here's an example:
-
-#if 0
-
-// First, define a fixture class template. It should be parameterized
-// by a type. Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- ...
-};
-
-// Next, declare that you will define a type-parameterized test case
-// (the _P suffix is for "parameterized" or "pattern", whichever you
-// prefer):
-TYPED_TEST_CASE_P(FooTest);
-
-// Then, use TYPED_TEST_P() to define as many type-parameterized tests
-// for this type-parameterized test case as you want.
-TYPED_TEST_P(FooTest, DoesBlah) {
- // Inside a test, refer to TypeParam to get the type parameter.
- TypeParam n = 0;
- ...
-}
-
-TYPED_TEST_P(FooTest, HasPropertyA) { ... }
-
-// Now the tricky part: you need to register all test patterns before
-// you can instantiate them. The first argument of the macro is the
-// test case name; the rest are the names of the tests in this test
-// case.
-REGISTER_TYPED_TEST_CASE_P(FooTest,
- DoesBlah, HasPropertyA);
-
-// Finally, you are free to instantiate the pattern with the types you
-// want. If you put the above code in a header file, you can #include
-// it in multiple C++ source files and instantiate it multiple times.
-//
-// To distinguish different instances of the pattern, the first
-// argument to the INSTANTIATE_* macro is a prefix that will be added
-// to the actual test case name. Remember to pick unique prefixes for
-// different instances.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-// INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int);
-
-#endif // 0
-
-
-// Implements typed tests.
-
-#if GTEST_HAS_TYPED_TEST
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the typedef for the type parameters of the
-// given test case.
-# define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_
-
-// The 'Types' template argument below must have spaces around it
-// since some compilers may choke on '>>' when passing a template
-// instance (e.g. Types<int>)
-# define TYPED_TEST_CASE(CaseName, Types) \
- typedef ::testing::internal::TypeList< Types >::type \
- GTEST_TYPE_PARAMS_(CaseName)
-
-# define TYPED_TEST(CaseName, TestName) \
- template <typename gtest_TypeParam_> \
- class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
- : public CaseName<gtest_TypeParam_> { \
- private: \
- typedef CaseName<gtest_TypeParam_> TestFixture; \
- typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
- }; \
- bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
- ::testing::internal::TypeParameterizedTest< \
- CaseName, \
- ::testing::internal::TemplateSel< \
- GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
- GTEST_TYPE_PARAMS_(CaseName)>::Register(\
- "", #CaseName, #TestName, 0); \
- template <typename gtest_TypeParam_> \
- void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody()
-
-#endif // GTEST_HAS_TYPED_TEST
-
-// Implements type-parameterized tests.
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the namespace name that the type-parameterized tests for
-// the given type-parameterized test case are defined in. The exact
-// name of the namespace is subject to change without notice.
-# define GTEST_CASE_NAMESPACE_(TestCaseName) \
- gtest_case_##TestCaseName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the variable used to remember the names of
-// the defined tests in the given test case.
-# define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \
- gtest_typed_test_case_p_state_##TestCaseName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
-//
-// Expands to the name of the variable used to remember the names of
-// the registered tests in the given test case.
-# define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \
- gtest_registered_test_names_##TestCaseName##_
-
-// The variables defined in the type-parameterized test macros are
-// static as typically these macros are used in a .h file that can be
-// #included in multiple translation units linked together.
-# define TYPED_TEST_CASE_P(CaseName) \
- static ::testing::internal::TypedTestCasePState \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName)
-
-# define TYPED_TEST_P(CaseName, TestName) \
- namespace GTEST_CASE_NAMESPACE_(CaseName) { \
- template <typename gtest_TypeParam_> \
- class TestName : public CaseName<gtest_TypeParam_> { \
- private: \
- typedef CaseName<gtest_TypeParam_> TestFixture; \
- typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
- }; \
- static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\
- __FILE__, __LINE__, #CaseName, #TestName); \
- } \
- template <typename gtest_TypeParam_> \
- void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody()
-
-# define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \
- namespace GTEST_CASE_NAMESPACE_(CaseName) { \
- typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
- } \
- static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
- __FILE__, __LINE__, #__VA_ARGS__)
-
-// The 'Types' template argument below must have spaces around it
-// since some compilers may choke on '>>' when passing a template
-// instance (e.g. Types<int>)
-# define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \
- bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \
- ::testing::internal::TypeParameterizedTestCase<CaseName, \
- GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \
- ::testing::internal::TypeList< Types >::type>::Register(\
- #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName))
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-
-// Depending on the platform, different string classes are available.
-// On Linux, in addition to ::std::string, Google also makes use of
-// class ::string, which has the same interface as ::std::string, but
-// has a different implementation.
-//
-// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
-// ::string is available AND is a distinct type to ::std::string, or
-// define it to 0 to indicate otherwise.
-//
-// If the user's ::std::string and ::string are the same class due to
-// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.
-//
-// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined
-// heuristically.
-
-namespace testing {
-
-// Declares the flags.
-
-// This flag temporary enables the disabled tests.
-GTEST_DECLARE_bool_(also_run_disabled_tests);
-
-// This flag brings the debugger on an assertion failure.
-GTEST_DECLARE_bool_(break_on_failure);
-
-// This flag controls whether Google Test catches all test-thrown exceptions
-// and logs them as failures.
-GTEST_DECLARE_bool_(catch_exceptions);
-
-// This flag enables using colors in terminal output. Available values are
-// "yes" to enable colors, "no" (disable colors), or "auto" (the default)
-// to let Google Test decide.
-GTEST_DECLARE_string_(color);
-
-// This flag sets up the filter to select by name using a glob pattern
-// the tests to run. If the filter is not given all tests are executed.
-GTEST_DECLARE_string_(filter);
-
-// This flag causes the Google Test to list tests. None of the tests listed
-// are actually run if the flag is provided.
-GTEST_DECLARE_bool_(list_tests);
-
-// This flag controls whether Google Test emits a detailed XML report to a file
-// in addition to its normal textual output.
-GTEST_DECLARE_string_(output);
-
-// This flags control whether Google Test prints the elapsed time for each
-// test.
-GTEST_DECLARE_bool_(print_time);
-
-// This flag specifies the random number seed.
-GTEST_DECLARE_int32_(random_seed);
-
-// This flag sets how many times the tests are repeated. The default value
-// is 1. If the value is -1 the tests are repeating forever.
-GTEST_DECLARE_int32_(repeat);
-
-// This flag controls whether Google Test includes Google Test internal
-// stack frames in failure stack traces.
-GTEST_DECLARE_bool_(show_internal_stack_frames);
-
-// When this flag is specified, tests' order is randomized on every iteration.
-GTEST_DECLARE_bool_(shuffle);
-
-// This flag specifies the maximum number of stack frames to be
-// printed in a failure message.
-GTEST_DECLARE_int32_(stack_trace_depth);
-
-// When this flag is specified, a failed assertion will throw an
-// exception if exceptions are enabled, or exit the program with a
-// non-zero code otherwise.
-GTEST_DECLARE_bool_(throw_on_failure);
-
-// When this flag is set with a "host:port" string, on supported
-// platforms test results are streamed to the specified port on
-// the specified host machine.
-GTEST_DECLARE_string_(stream_result_to);
-
-// The upper limit for valid stack trace depths.
-const int kMaxStackTraceDepth = 100;
-
-namespace internal {
-
-class AssertHelper;
-class DefaultGlobalTestPartResultReporter;
-class ExecDeathTest;
-class NoExecDeathTest;
-class FinalSuccessChecker;
-class GTestFlagSaver;
-class TestResultAccessor;
-class TestEventListenersAccessor;
-class TestEventRepeater;
-class WindowsDeathTest;
-class UnitTestImpl* GetUnitTestImpl();
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
- const String& message);
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-// Declared in gtest-internal.h but defined here, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable) {
- return (Message() << streamable).GetString();
-}
-
-} // namespace internal
-
-// The friend relationship of some of these classes is cyclic.
-// If we don't forward declare them the compiler might confuse the classes
-// in friendship clauses with same named classes on the scope.
-class Test;
-class TestCase;
-class TestInfo;
-class UnitTest;
-
-// A class for indicating whether an assertion was successful. When
-// the assertion wasn't successful, the AssertionResult object
-// remembers a non-empty message that describes how it failed.
-//
-// To create an instance of this class, use one of the factory functions
-// (AssertionSuccess() and AssertionFailure()).
-//
-// This class is useful for two purposes:
-// 1. Defining predicate functions to be used with Boolean test assertions
-// EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
-// 2. Defining predicate-format functions to be
-// used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
-//
-// For example, if you define IsEven predicate:
-//
-// testing::AssertionResult IsEven(int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess();
-// else
-// return testing::AssertionFailure() << n << " is odd";
-// }
-//
-// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
-// will print the message
-//
-// Value of: IsEven(Fib(5))
-// Actual: false (5 is odd)
-// Expected: true
-//
-// instead of a more opaque
-//
-// Value of: IsEven(Fib(5))
-// Actual: false
-// Expected: true
-//
-// in case IsEven is a simple Boolean predicate.
-//
-// If you expect your predicate to be reused and want to support informative
-// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
-// about half as often as positive ones in our tests), supply messages for
-// both success and failure cases:
-//
-// testing::AssertionResult IsEven(int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess() << n << " is even";
-// else
-// return testing::AssertionFailure() << n << " is odd";
-// }
-//
-// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
-//
-// Value of: IsEven(Fib(6))
-// Actual: true (8 is even)
-// Expected: false
-//
-// NB: Predicates that support negative Boolean assertions have reduced
-// performance in positive ones so be careful not to use them in tests
-// that have lots (tens of thousands) of positive Boolean assertions.
-//
-// To use this class with EXPECT_PRED_FORMAT assertions such as:
-//
-// // Verifies that Foo() returns an even number.
-// EXPECT_PRED_FORMAT1(IsEven, Foo());
-//
-// you need to define:
-//
-// testing::AssertionResult IsEven(const char* expr, int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess();
-// else
-// return testing::AssertionFailure()
-// << "Expected: " << expr << " is even\n Actual: it's " << n;
-// }
-//
-// If Foo() returns 5, you will see the following message:
-//
-// Expected: Foo() is even
-// Actual: it's 5
-//
-class GTEST_API_ AssertionResult {
- public:
- // Copy constructor.
- // Used in EXPECT_TRUE/FALSE(assertion_result).
- AssertionResult(const AssertionResult& other);
- // Used in the EXPECT_TRUE/FALSE(bool_expression).
- explicit AssertionResult(bool success) : success_(success) {}
-
- // Returns true iff the assertion succeeded.
- operator bool() const { return success_; } // NOLINT
-
- // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
- AssertionResult operator!() const;
-
- // Returns the text streamed into this AssertionResult. Test assertions
- // use it when they fail (i.e., the predicate's outcome doesn't match the
- // assertion's expectation). When nothing has been streamed into the
- // object, returns an empty string.
- const char* message() const {
- return message_.get() != NULL ? message_->c_str() : "";
- }
- // TODO(vladl@google.com): Remove this after making sure no clients use it.
- // Deprecated; please use message() instead.
- const char* failure_message() const { return message(); }
-
- // Streams a custom failure message into this object.
- template <typename T> AssertionResult& operator<<(const T& value) {
- AppendMessage(Message() << value);
- return *this;
- }
-
- // Allows streaming basic output manipulators such as endl or flush into
- // this object.
- AssertionResult& operator<<(
- ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {
- AppendMessage(Message() << basic_manipulator);
- return *this;
- }
-
- private:
- // Appends the contents of message to message_.
- void AppendMessage(const Message& a_message) {
- if (message_.get() == NULL)
- message_.reset(new ::std::string);
- message_->append(a_message.GetString().c_str());
- }
-
- // Stores result of the assertion predicate.
- bool success_;
- // Stores the message describing the condition in case the expectation
- // construct is not satisfied with the predicate's outcome.
- // Referenced via a pointer to avoid taking too much stack frame space
- // with test assertions.
- internal::scoped_ptr< ::std::string> message_;
-
- GTEST_DISALLOW_ASSIGN_(AssertionResult);
-};
-
-// Makes a successful assertion result.
-GTEST_API_ AssertionResult AssertionSuccess();
-
-// Makes a failed assertion result.
-GTEST_API_ AssertionResult AssertionFailure();
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << msg.
-GTEST_API_ AssertionResult AssertionFailure(const Message& msg);
-
-// The abstract class that all tests inherit from.
-//
-// In Google Test, a unit test program contains one or many TestCases, and
-// each TestCase contains one or many Tests.
-//
-// When you define a test using the TEST macro, you don't need to
-// explicitly derive from Test - the TEST macro automatically does
-// this for you.
-//
-// The only time you derive from Test is when defining a test fixture
-// to be used a TEST_F. For example:
-//
-// class FooTest : public testing::Test {
-// protected:
-// virtual void SetUp() { ... }
-// virtual void TearDown() { ... }
-// ...
-// };
-//
-// TEST_F(FooTest, Bar) { ... }
-// TEST_F(FooTest, Baz) { ... }
-//
-// Test is not copyable.
-class GTEST_API_ Test {
- public:
- friend class TestInfo;
-
- // Defines types for pointers to functions that set up and tear down
- // a test case.
- typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc;
- typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc;
-
- // The d'tor is virtual as we intend to inherit from Test.
- virtual ~Test();
-
- // Sets up the stuff shared by all tests in this test case.
- //
- // Google Test will call Foo::SetUpTestCase() before running the first
- // test in test case Foo. Hence a sub-class can define its own
- // SetUpTestCase() method to shadow the one defined in the super
- // class.
- static void SetUpTestCase() {}
-
- // Tears down the stuff shared by all tests in this test case.
- //
- // Google Test will call Foo::TearDownTestCase() after running the last
- // test in test case Foo. Hence a sub-class can define its own
- // TearDownTestCase() method to shadow the one defined in the super
- // class.
- static void TearDownTestCase() {}
-
- // Returns true iff the current test has a fatal failure.
- static bool HasFatalFailure();
-
- // Returns true iff the current test has a non-fatal failure.
- static bool HasNonfatalFailure();
-
- // Returns true iff the current test has a (either fatal or
- // non-fatal) failure.
- static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
-
- // Logs a property for the current test. Only the last value for a given
- // key is remembered.
- // These are public static so they can be called from utility functions
- // that are not members of the test fixture.
- // The arguments are const char* instead strings, as Google Test is used
- // on platforms where string doesn't compile.
- //
- // Note that a driving consideration for these RecordProperty methods
- // was to produce xml output suited to the Greenspan charting utility,
- // which at present will only chart values that fit in a 32-bit int. It
- // is the user's responsibility to restrict their values to 32-bit ints
- // if they intend them to be used with Greenspan.
- static void RecordProperty(const char* key, const char* value);
- static void RecordProperty(const char* key, int value);
-
- protected:
- // Creates a Test object.
- Test();
-
- // Sets up the test fixture.
- virtual void SetUp();
-
- // Tears down the test fixture.
- virtual void TearDown();
-
- private:
- // Returns true iff the current test has the same fixture class as
- // the first test in the current test case.
- static bool HasSameFixtureClass();
-
- // Runs the test after the test fixture has been set up.
- //
- // A sub-class must implement this to define the test logic.
- //
- // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
- // Instead, use the TEST or TEST_F macro.
- virtual void TestBody() = 0;
-
- // Sets up, executes, and tears down the test.
- void Run();
-
- // Deletes self. We deliberately pick an unusual name for this
- // internal method to avoid clashing with names used in user TESTs.
- void DeleteSelf_() { delete this; }
-
- // Uses a GTestFlagSaver to save and restore all Google Test flags.
- const internal::GTestFlagSaver* const gtest_flag_saver_;
-
- // Often a user mis-spells SetUp() as Setup() and spends a long time
- // wondering why it is never called by Google Test. The declaration of
- // the following method is solely for catching such an error at
- // compile time:
- //
- // - The return type is deliberately chosen to be not void, so it
- // will be a conflict if a user declares void Setup() in his test
- // fixture.
- //
- // - This method is private, so it will be another compiler error
- // if a user calls it from his test fixture.
- //
- // DO NOT OVERRIDE THIS FUNCTION.
- //
- // If you see an error about overriding the following function or
- // about it being private, you have mis-spelled SetUp() as Setup().
- struct Setup_should_be_spelled_SetUp {};
- virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
-
- // We disallow copying Tests.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);
-};
-
-typedef internal::TimeInMillis TimeInMillis;
-
-// A copyable object representing a user specified test property which can be
-// output as a key/value string pair.
-//
-// Don't inherit from TestProperty as its destructor is not virtual.
-class TestProperty {
- public:
- // C'tor. TestProperty does NOT have a default constructor.
- // Always use this constructor (with parameters) to create a
- // TestProperty object.
- TestProperty(const char* a_key, const char* a_value) :
- key_(a_key), value_(a_value) {
- }
-
- // Gets the user supplied key.
- const char* key() const {
- return key_.c_str();
- }
-
- // Gets the user supplied value.
- const char* value() const {
- return value_.c_str();
- }
-
- // Sets a new value, overriding the one supplied in the constructor.
- void SetValue(const char* new_value) {
- value_ = new_value;
- }
-
- private:
- // The key supplied by the user.
- internal::String key_;
- // The value supplied by the user.
- internal::String value_;
-};
-
-// The result of a single Test. This includes a list of
-// TestPartResults, a list of TestProperties, a count of how many
-// death tests there are in the Test, and how much time it took to run
-// the Test.
-//
-// TestResult is not copyable.
-class GTEST_API_ TestResult {
- public:
- // Creates an empty TestResult.
- TestResult();
-
- // D'tor. Do not inherit from TestResult.
- ~TestResult();
-
- // Gets the number of all test parts. This is the sum of the number
- // of successful test parts and the number of failed test parts.
- int total_part_count() const;
-
- // Returns the number of the test properties.
- int test_property_count() const;
-
- // Returns true iff the test passed (i.e. no test part failed).
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the test failed.
- bool Failed() const;
-
- // Returns true iff the test fatally failed.
- bool HasFatalFailure() const;
-
- // Returns true iff the test has a non-fatal failure.
- bool HasNonfatalFailure() const;
-
- // Returns the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns the i-th test part result among all the results. i can range
- // from 0 to test_property_count() - 1. If i is not in that range, aborts
- // the program.
- const TestPartResult& GetTestPartResult(int i) const;
-
- // Returns the i-th test property. i can range from 0 to
- // test_property_count() - 1. If i is not in that range, aborts the
- // program.
- const TestProperty& GetTestProperty(int i) const;
-
- private:
- friend class TestInfo;
- friend class UnitTest;
- friend class internal::DefaultGlobalTestPartResultReporter;
- friend class internal::ExecDeathTest;
- friend class internal::TestResultAccessor;
- friend class internal::UnitTestImpl;
- friend class internal::WindowsDeathTest;
-
- // Gets the vector of TestPartResults.
- const std::vector<TestPartResult>& test_part_results() const {
- return test_part_results_;
- }
-
- // Gets the vector of TestProperties.
- const std::vector<TestProperty>& test_properties() const {
- return test_properties_;
- }
-
- // Sets the elapsed time.
- void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
-
- // Adds a test property to the list. The property is validated and may add
- // a non-fatal failure if invalid (e.g., if it conflicts with reserved
- // key names). If a property is already recorded for the same key, the
- // value will be updated, rather than storing multiple values for the same
- // key.
- void RecordProperty(const TestProperty& test_property);
-
- // Adds a failure if the key is a reserved attribute of Google Test
- // testcase tags. Returns true if the property is valid.
- // TODO(russr): Validate attribute names are legal and human readable.
- static bool ValidateTestProperty(const TestProperty& test_property);
-
- // Adds a test part result to the list.
- void AddTestPartResult(const TestPartResult& test_part_result);
-
- // Returns the death test count.
- int death_test_count() const { return death_test_count_; }
-
- // Increments the death test count, returning the new count.
- int increment_death_test_count() { return ++death_test_count_; }
-
- // Clears the test part results.
- void ClearTestPartResults();
-
- // Clears the object.
- void Clear();
-
- // Protects mutable state of the property vector and of owned
- // properties, whose values may be updated.
- internal::Mutex test_properites_mutex_;
-
- // The vector of TestPartResults
- std::vector<TestPartResult> test_part_results_;
- // The vector of TestProperties
- std::vector<TestProperty> test_properties_;
- // Running count of death tests.
- int death_test_count_;
- // The elapsed time, in milliseconds.
- TimeInMillis elapsed_time_;
-
- // We disallow copying TestResult.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);
-}; // class TestResult
-
-// A TestInfo object stores the following information about a test:
-//
-// Test case name
-// Test name
-// Whether the test should be run
-// A function pointer that creates the test object when invoked
-// Test result
-//
-// The constructor of TestInfo registers itself with the UnitTest
-// singleton such that the RUN_ALL_TESTS() macro knows which tests to
-// run.
-class GTEST_API_ TestInfo {
- public:
- // Destructs a TestInfo object. This function is not virtual, so
- // don't inherit from TestInfo.
- ~TestInfo();
-
- // Returns the test case name.
- const char* test_case_name() const { return test_case_name_.c_str(); }
-
- // Returns the test name.
- const char* name() const { return name_.c_str(); }
-
- // Returns the name of the parameter type, or NULL if this is not a typed
- // or a type-parameterized test.
- const char* type_param() const {
- if (type_param_.get() != NULL)
- return type_param_->c_str();
- return NULL;
- }
-
- // Returns the text representation of the value parameter, or NULL if this
- // is not a value-parameterized test.
- const char* value_param() const {
- if (value_param_.get() != NULL)
- return value_param_->c_str();
- return NULL;
- }
-
- // Returns true if this test should run, that is if the test is not disabled
- // (or it is disabled but the also_run_disabled_tests flag has been specified)
- // and its full name matches the user-specified filter.
- //
- // Google Test allows the user to filter the tests by their full names.
- // The full name of a test Bar in test case Foo is defined as
- // "Foo.Bar". Only the tests that match the filter will run.
- //
- // A filter is a colon-separated list of glob (not regex) patterns,
- // optionally followed by a '-' and a colon-separated list of
- // negative patterns (tests to exclude). A test is run if it
- // matches one of the positive patterns and does not match any of
- // the negative patterns.
- //
- // For example, *A*:Foo.* is a filter that matches any string that
- // contains the character 'A' or starts with "Foo.".
- bool should_run() const { return should_run_; }
-
- // Returns the result of the test.
- const TestResult* result() const { return &result_; }
-
- private:
-
-#if GTEST_HAS_DEATH_TEST
- friend class internal::DefaultDeathTestFactory;
-#endif // GTEST_HAS_DEATH_TEST
- friend class Test;
- friend class TestCase;
- friend class internal::UnitTestImpl;
- friend TestInfo* internal::MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- internal::TypeId fixture_class_id,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc,
- internal::TestFactoryBase* factory);
-
- // Constructs a TestInfo object. The newly constructed instance assumes
- // ownership of the factory object.
- TestInfo(const char* test_case_name, const char* name,
- const char* a_type_param,
- const char* a_value_param,
- internal::TypeId fixture_class_id,
- internal::TestFactoryBase* factory);
-
- // Increments the number of death tests encountered in this test so
- // far.
- int increment_death_test_count() {
- return result_.increment_death_test_count();
- }
-
- // Creates the test object, runs it, records its result, and then
- // deletes it.
- void Run();
-
- static void ClearTestResult(TestInfo* test_info) {
- test_info->result_.Clear();
- }
-
- // These fields are immutable properties of the test.
- const std::string test_case_name_; // Test case name
- const std::string name_; // Test name
- // Name of the parameter type, or NULL if this is not a typed or a
- // type-parameterized test.
- const internal::scoped_ptr<const ::std::string> type_param_;
- // Text representation of the value parameter, or NULL if this is not a
- // value-parameterized test.
- const internal::scoped_ptr<const ::std::string> value_param_;
- const internal::TypeId fixture_class_id_; // ID of the test fixture class
- bool should_run_; // True iff this test should run
- bool is_disabled_; // True iff this test is disabled
- bool matches_filter_; // True if this test matches the
- // user-specified filter.
- internal::TestFactoryBase* const factory_; // The factory that creates
- // the test object
-
- // This field is mutable and needs to be reset before running the
- // test for the second time.
- TestResult result_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);
-};
-
-// A test case, which consists of a vector of TestInfos.
-//
-// TestCase is not copyable.
-class GTEST_API_ TestCase {
- public:
- // Creates a TestCase with the given name.
- //
- // TestCase does NOT have a default constructor. Always use this
- // constructor to create a TestCase object.
- //
- // Arguments:
- //
- // name: name of the test case
- // a_type_param: the name of the test's type parameter, or NULL if
- // this is not a type-parameterized test.
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- TestCase(const char* name, const char* a_type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc);
-
- // Destructor of TestCase.
- virtual ~TestCase();
-
- // Gets the name of the TestCase.
- const char* name() const { return name_.c_str(); }
-
- // Returns the name of the parameter type, or NULL if this is not a
- // type-parameterized test case.
- const char* type_param() const {
- if (type_param_.get() != NULL)
- return type_param_->c_str();
- return NULL;
- }
-
- // Returns true if any test in this test case should run.
- bool should_run() const { return should_run_; }
-
- // Gets the number of successful tests in this test case.
- int successful_test_count() const;
-
- // Gets the number of failed tests in this test case.
- int failed_test_count() const;
-
- // Gets the number of disabled tests in this test case.
- int disabled_test_count() const;
-
- // Get the number of tests in this test case that should run.
- int test_to_run_count() const;
-
- // Gets the number of all tests in this test case.
- int total_test_count() const;
-
- // Returns true iff the test case passed.
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the test case failed.
- bool Failed() const { return failed_test_count() > 0; }
-
- // Returns the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns the i-th test among all the tests. i can range from 0 to
- // total_test_count() - 1. If i is not in that range, returns NULL.
- const TestInfo* GetTestInfo(int i) const;
-
- private:
- friend class Test;
- friend class internal::UnitTestImpl;
-
- // Gets the (mutable) vector of TestInfos in this TestCase.
- std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
-
- // Gets the (immutable) vector of TestInfos in this TestCase.
- const std::vector<TestInfo*>& test_info_list() const {
- return test_info_list_;
- }
-
- // Returns the i-th test among all the tests. i can range from 0 to
- // total_test_count() - 1. If i is not in that range, returns NULL.
- TestInfo* GetMutableTestInfo(int i);
-
- // Sets the should_run member.
- void set_should_run(bool should) { should_run_ = should; }
-
- // Adds a TestInfo to this test case. Will delete the TestInfo upon
- // destruction of the TestCase object.
- void AddTestInfo(TestInfo * test_info);
-
- // Clears the results of all tests in this test case.
- void ClearResult();
-
- // Clears the results of all tests in the given test case.
- static void ClearTestCaseResult(TestCase* test_case) {
- test_case->ClearResult();
- }
-
- // Runs every test in this TestCase.
- void Run();
-
- // Runs SetUpTestCase() for this TestCase. This wrapper is needed
- // for catching exceptions thrown from SetUpTestCase().
- void RunSetUpTestCase() { (*set_up_tc_)(); }
-
- // Runs TearDownTestCase() for this TestCase. This wrapper is
- // needed for catching exceptions thrown from TearDownTestCase().
- void RunTearDownTestCase() { (*tear_down_tc_)(); }
-
- // Returns true iff test passed.
- static bool TestPassed(const TestInfo* test_info) {
- return test_info->should_run() && test_info->result()->Passed();
- }
-
- // Returns true iff test failed.
- static bool TestFailed(const TestInfo* test_info) {
- return test_info->should_run() && test_info->result()->Failed();
- }
-
- // Returns true iff test is disabled.
- static bool TestDisabled(const TestInfo* test_info) {
- return test_info->is_disabled_;
- }
-
- // Returns true if the given test should run.
- static bool ShouldRunTest(const TestInfo* test_info) {
- return test_info->should_run();
- }
-
- // Shuffles the tests in this test case.
- void ShuffleTests(internal::Random* random);
-
- // Restores the test order to before the first shuffle.
- void UnshuffleTests();
-
- // Name of the test case.
- internal::String name_;
- // Name of the parameter type, or NULL if this is not a typed or a
- // type-parameterized test.
- const internal::scoped_ptr<const ::std::string> type_param_;
- // The vector of TestInfos in their original order. It owns the
- // elements in the vector.
- std::vector<TestInfo*> test_info_list_;
- // Provides a level of indirection for the test list to allow easy
- // shuffling and restoring the test order. The i-th element in this
- // vector is the index of the i-th test in the shuffled test list.
- std::vector<int> test_indices_;
- // Pointer to the function that sets up the test case.
- Test::SetUpTestCaseFunc set_up_tc_;
- // Pointer to the function that tears down the test case.
- Test::TearDownTestCaseFunc tear_down_tc_;
- // True iff any test in this test case should run.
- bool should_run_;
- // Elapsed time, in milliseconds.
- TimeInMillis elapsed_time_;
-
- // We disallow copying TestCases.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase);
-};
-
-// An Environment object is capable of setting up and tearing down an
-// environment. The user should subclass this to define his own
-// environment(s).
-//
-// An Environment object does the set-up and tear-down in virtual
-// methods SetUp() and TearDown() instead of the constructor and the
-// destructor, as:
-//
-// 1. You cannot safely throw from a destructor. This is a problem
-// as in some cases Google Test is used where exceptions are enabled, and
-// we may want to implement ASSERT_* using exceptions where they are
-// available.
-// 2. You cannot use ASSERT_* directly in a constructor or
-// destructor.
-class Environment {
- public:
- // The d'tor is virtual as we need to subclass Environment.
- virtual ~Environment() {}
-
- // Override this to define how to set up the environment.
- virtual void SetUp() {}
-
- // Override this to define how to tear down the environment.
- virtual void TearDown() {}
- private:
- // If you see an error about overriding the following function or
- // about it being private, you have mis-spelled SetUp() as Setup().
- struct Setup_should_be_spelled_SetUp {};
- virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
-};
-
-// The interface for tracing execution of tests. The methods are organized in
-// the order the corresponding events are fired.
-class TestEventListener {
- public:
- virtual ~TestEventListener() {}
-
- // Fired before any test activity starts.
- virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;
-
- // Fired before each iteration of tests starts. There may be more than
- // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
- // index, starting from 0.
- virtual void OnTestIterationStart(const UnitTest& unit_test,
- int iteration) = 0;
-
- // Fired before environment set-up for each iteration of tests starts.
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;
-
- // Fired after environment set-up for each iteration of tests ends.
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;
-
- // Fired before the test case starts.
- virtual void OnTestCaseStart(const TestCase& test_case) = 0;
-
- // Fired before the test starts.
- virtual void OnTestStart(const TestInfo& test_info) = 0;
-
- // Fired after a failed assertion or a SUCCEED() invocation.
- virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;
-
- // Fired after the test ends.
- virtual void OnTestEnd(const TestInfo& test_info) = 0;
-
- // Fired after the test case ends.
- virtual void OnTestCaseEnd(const TestCase& test_case) = 0;
-
- // Fired before environment tear-down for each iteration of tests starts.
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;
-
- // Fired after environment tear-down for each iteration of tests ends.
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;
-
- // Fired after each iteration of tests finishes.
- virtual void OnTestIterationEnd(const UnitTest& unit_test,
- int iteration) = 0;
-
- // Fired after all test activities have ended.
- virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;
-};
-
-// The convenience class for users who need to override just one or two
-// methods and are not concerned that a possible change to a signature of
-// the methods they override will not be caught during the build. For
-// comments about each method please see the definition of TestEventListener
-// above.
-class EmptyTestEventListener : public TestEventListener {
- public:
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
- int /*iteration*/) {}
- virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {}
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}
- virtual void OnTestStart(const TestInfo& /*test_info*/) {}
- virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {}
- virtual void OnTestEnd(const TestInfo& /*test_info*/) {}
- virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}
- virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {}
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
- int /*iteration*/) {}
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
-};
-
-// TestEventListeners lets users add listeners to track events in Google Test.
-class GTEST_API_ TestEventListeners {
- public:
- TestEventListeners();
- ~TestEventListeners();
-
- // Appends an event listener to the end of the list. Google Test assumes
- // the ownership of the listener (i.e. it will delete the listener when
- // the test program finishes).
- void Append(TestEventListener* listener);
-
- // Removes the given event listener from the list and returns it. It then
- // becomes the caller's responsibility to delete the listener. Returns
- // NULL if the listener is not found in the list.
- TestEventListener* Release(TestEventListener* listener);
-
- // Returns the standard listener responsible for the default console
- // output. Can be removed from the listeners list to shut down default
- // console output. Note that removing this object from the listener list
- // with Release transfers its ownership to the caller and makes this
- // function return NULL the next time.
- TestEventListener* default_result_printer() const {
- return default_result_printer_;
- }
-
- // Returns the standard listener responsible for the default XML output
- // controlled by the --gtest_output=xml flag. Can be removed from the
- // listeners list by users who want to shut down the default XML output
- // controlled by this flag and substitute it with custom one. Note that
- // removing this object from the listener list with Release transfers its
- // ownership to the caller and makes this function return NULL the next
- // time.
- TestEventListener* default_xml_generator() const {
- return default_xml_generator_;
- }
-
- private:
- friend class TestCase;
- friend class TestInfo;
- friend class internal::DefaultGlobalTestPartResultReporter;
- friend class internal::NoExecDeathTest;
- friend class internal::TestEventListenersAccessor;
- friend class internal::UnitTestImpl;
-
- // Returns repeater that broadcasts the TestEventListener events to all
- // subscribers.
- TestEventListener* repeater();
-
- // Sets the default_result_printer attribute to the provided listener.
- // The listener is also added to the listener list and previous
- // default_result_printer is removed from it and deleted. The listener can
- // also be NULL in which case it will not be added to the list. Does
- // nothing if the previous and the current listener objects are the same.
- void SetDefaultResultPrinter(TestEventListener* listener);
-
- // Sets the default_xml_generator attribute to the provided listener. The
- // listener is also added to the listener list and previous
- // default_xml_generator is removed from it and deleted. The listener can
- // also be NULL in which case it will not be added to the list. Does
- // nothing if the previous and the current listener objects are the same.
- void SetDefaultXmlGenerator(TestEventListener* listener);
-
- // Controls whether events will be forwarded by the repeater to the
- // listeners in the list.
- bool EventForwardingEnabled() const;
- void SuppressEventForwarding();
-
- // The actual list of listeners.
- internal::TestEventRepeater* repeater_;
- // Listener responsible for the standard result output.
- TestEventListener* default_result_printer_;
- // Listener responsible for the creation of the XML output file.
- TestEventListener* default_xml_generator_;
-
- // We disallow copying TestEventListeners.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);
-};
-
-// A UnitTest consists of a vector of TestCases.
-//
-// This is a singleton class. The only instance of UnitTest is
-// created when UnitTest::GetInstance() is first called. This
-// instance is never deleted.
-//
-// UnitTest is not copyable.
-//
-// This class is thread-safe as long as the methods are called
-// according to their specification.
-class GTEST_API_ UnitTest {
- public:
- // Gets the singleton UnitTest object. The first time this method
- // is called, a UnitTest object is constructed and returned.
- // Consecutive calls will return the same object.
- static UnitTest* GetInstance();
-
- // Runs all tests in this UnitTest object and prints the result.
- // Returns 0 if successful, or 1 otherwise.
- //
- // This method can only be called from the main thread.
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- int Run() GTEST_MUST_USE_RESULT_;
-
- // Returns the working directory when the first TEST() or TEST_F()
- // was executed. The UnitTest object owns the string.
- const char* original_working_dir() const;
-
- // Returns the TestCase object for the test that's currently running,
- // or NULL if no test is running.
- const TestCase* current_test_case() const;
-
- // Returns the TestInfo object for the test that's currently running,
- // or NULL if no test is running.
- const TestInfo* current_test_info() const;
-
- // Returns the random seed used at the start of the current test run.
- int random_seed() const;
-
-#if GTEST_HAS_PARAM_TEST
- // Returns the ParameterizedTestCaseRegistry object used to keep track of
- // value-parameterized tests and instantiate and register them.
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- internal::ParameterizedTestCaseRegistry& parameterized_test_registry();
-#endif // GTEST_HAS_PARAM_TEST
-
- // Gets the number of successful test cases.
- int successful_test_case_count() const;
-
- // Gets the number of failed test cases.
- int failed_test_case_count() const;
-
- // Gets the number of all test cases.
- int total_test_case_count() const;
-
- // Gets the number of all test cases that contain at least one test
- // that should run.
- int test_case_to_run_count() const;
-
- // Gets the number of successful tests.
- int successful_test_count() const;
-
- // Gets the number of failed tests.
- int failed_test_count() const;
-
- // Gets the number of disabled tests.
- int disabled_test_count() const;
-
- // Gets the number of all tests.
- int total_test_count() const;
-
- // Gets the number of tests that should run.
- int test_to_run_count() const;
-
- // Gets the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const;
-
- // Returns true iff the unit test passed (i.e. all test cases passed).
- bool Passed() const;
-
- // Returns true iff the unit test failed (i.e. some test case failed
- // or something outside of all tests failed).
- bool Failed() const;
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- const TestCase* GetTestCase(int i) const;
-
- // Returns the list of event listeners that can be used to track events
- // inside Google Test.
- TestEventListeners& listeners();
-
- private:
- // Registers and returns a global test environment. When a test
- // program is run, all global test environments will be set-up in
- // the order they were registered. After all tests in the program
- // have finished, all global test environments will be torn-down in
- // the *reverse* order they were registered.
- //
- // The UnitTest object takes ownership of the given environment.
- //
- // This method can only be called from the main thread.
- Environment* AddEnvironment(Environment* env);
-
- // Adds a TestPartResult to the current TestResult object. All
- // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
- // eventually call this to report their results. The user code
- // should use the assertion macros instead of calling this directly.
- void AddTestPartResult(TestPartResult::Type result_type,
- const char* file_name,
- int line_number,
- const internal::String& message,
- const internal::String& os_stack_trace);
-
- // Adds a TestProperty to the current TestResult object. If the result already
- // contains a property with the same key, the value will be updated.
- void RecordPropertyForCurrentTest(const char* key, const char* value);
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- TestCase* GetMutableTestCase(int i);
-
- // Accessors for the implementation object.
- internal::UnitTestImpl* impl() { return impl_; }
- const internal::UnitTestImpl* impl() const { return impl_; }
-
- // These classes and funcions are friends as they need to access private
- // members of UnitTest.
- friend class Test;
- friend class internal::AssertHelper;
- friend class internal::ScopedTrace;
- friend Environment* AddGlobalTestEnvironment(Environment* env);
- friend internal::UnitTestImpl* internal::GetUnitTestImpl();
- friend void internal::ReportFailureInUnknownLocation(
- TestPartResult::Type result_type,
- const internal::String& message);
-
- // Creates an empty UnitTest.
- UnitTest();
-
- // D'tor
- virtual ~UnitTest();
-
- // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
- // Google Test trace stack.
- void PushGTestTrace(const internal::TraceInfo& trace);
-
- // Pops a trace from the per-thread Google Test trace stack.
- void PopGTestTrace();
-
- // Protects mutable state in *impl_. This is mutable as some const
- // methods need to lock it too.
- mutable internal::Mutex mutex_;
-
- // Opaque implementation object. This field is never changed once
- // the object is constructed. We don't mark it as const here, as
- // doing so will cause a warning in the constructor of UnitTest.
- // Mutable state in *impl_ is protected by mutex_.
- internal::UnitTestImpl* impl_;
-
- // We disallow copying UnitTest.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);
-};
-
-// A convenient wrapper for adding an environment for the test
-// program.
-//
-// You should call this before RUN_ALL_TESTS() is called, probably in
-// main(). If you use gtest_main, you need to call this before main()
-// starts for it to take effect. For example, you can define a global
-// variable like this:
-//
-// testing::Environment* const foo_env =
-// testing::AddGlobalTestEnvironment(new FooEnvironment);
-//
-// However, we strongly recommend you to write your own main() and
-// call AddGlobalTestEnvironment() there, as relying on initialization
-// of global variables makes the code harder to read and may cause
-// problems when you register multiple environments from different
-// translation units and the environments have dependencies among them
-// (remember that the compiler doesn't guarantee the order in which
-// global variables from different translation units are initialized).
-inline Environment* AddGlobalTestEnvironment(Environment* env) {
- return UnitTest::GetInstance()->AddEnvironment(env);
-}
-
-// Initializes Google Test. This must be called before calling
-// RUN_ALL_TESTS(). In particular, it parses a command line for the
-// flags that Google Test recognizes. Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-GTEST_API_ void InitGoogleTest(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);
-
-namespace internal {
-
-// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
-// operand to be used in a failure message. The type (but not value)
-// of the other operand may affect the format. This allows us to
-// print a char* as a raw pointer when it is compared against another
-// char*, and print it as a C string when it is compared against an
-// std::string object, for example.
-//
-// The default implementation ignores the type of the other operand.
-// Some specialized versions are used to handle formatting wide or
-// narrow C strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename T1, typename T2>
-String FormatForComparisonFailureMessage(const T1& value,
- const T2& /* other_operand */) {
- // C++Builder compiles this incorrectly if the namespace isn't explicitly
- // given.
- return ::testing::PrintToString(value);
-}
-
-// The helper function for {ASSERT|EXPECT}_EQ.
-template <typename T1, typename T2>
-AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual) {
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4389) // Temporarily disables warning on
- // signed/unsigned mismatch.
-#endif
-
- if (expected == actual) {
- return AssertionSuccess();
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-
- return EqFailure(expected_expression,
- actual_expression,
- FormatForComparisonFailureMessage(expected, actual),
- FormatForComparisonFailureMessage(actual, expected),
- false);
-}
-
-// With this overloaded version, we allow anonymous enums to be used
-// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums
-// can be implicitly cast to BiggestInt.
-GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual);
-
-// The helper class for {ASSERT|EXPECT}_EQ. The template argument
-// lhs_is_null_literal is true iff the first argument to ASSERT_EQ()
-// is a null pointer literal. The following default implementation is
-// for lhs_is_null_literal being false.
-template <bool lhs_is_null_literal>
-class EqHelper {
- public:
- // This templatized version is for the general case.
- template <typename T1, typename T2>
- static AssertionResult Compare(const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-
- // With this overloaded version, we allow anonymous enums to be used
- // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
- // enums can be implicitly cast to BiggestInt.
- //
- // Even though its body looks the same as the above version, we
- // cannot merge the two, as it will make anonymous enums unhappy.
- static AssertionResult Compare(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-};
-
-// This specialization is used when the first argument to ASSERT_EQ()
-// is a null pointer literal, like NULL, false, or 0.
-template <>
-class EqHelper<true> {
- public:
- // We define two overloaded versions of Compare(). The first
- // version will be picked when the second argument to ASSERT_EQ() is
- // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or
- // EXPECT_EQ(false, a_bool).
- template <typename T1, typename T2>
- static AssertionResult Compare(
- const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual,
- // The following line prevents this overload from being considered if T2
- // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr)
- // expands to Compare("", "", NULL, my_ptr), which requires a conversion
- // to match the Secret* in the other overload, which would otherwise make
- // this template match better.
- typename EnableIf<!is_pointer<T2>::value>::type* = 0) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-
- // This version will be picked when the second argument to ASSERT_EQ() is a
- // pointer, e.g. ASSERT_EQ(NULL, a_pointer).
- template <typename T>
- static AssertionResult Compare(
- const char* expected_expression,
- const char* actual_expression,
- // We used to have a second template parameter instead of Secret*. That
- // template parameter would deduce to 'long', making this a better match
- // than the first overload even without the first overload's EnableIf.
- // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to
- // non-pointer argument" (even a deduced integral argument), so the old
- // implementation caused warnings in user code.
- Secret* /* expected (NULL) */,
- T* actual) {
- // We already know that 'expected' is a null pointer.
- return CmpHelperEQ(expected_expression, actual_expression,
- static_cast<T*>(NULL), actual);
- }
-};
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste
-// of similar code.
-//
-// For each templatized helper function, we also define an overloaded
-// version for BiggestInt in order to reduce code bloat and allow
-// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled
-// with gcc 4.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-template <typename T1, typename T2>\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- const T1& val1, const T2& val2) {\
- if (val1 op val2) {\
- return AssertionSuccess();\
- } else {\
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2\
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
- << " vs " << FormatForComparisonFailureMessage(val2, val1);\
- }\
-}\
-GTEST_API_ AssertionResult CmpHelper##op_name(\
- const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-
-// Implements the helper function for {ASSERT|EXPECT}_NE
-GTEST_IMPL_CMP_HELPER_(NE, !=);
-// Implements the helper function for {ASSERT|EXPECT}_LE
-GTEST_IMPL_CMP_HELPER_(LE, <=);
-// Implements the helper function for {ASSERT|EXPECT}_LT
-GTEST_IMPL_CMP_HELPER_(LT, < );
-// Implements the helper function for {ASSERT|EXPECT}_GE
-GTEST_IMPL_CMP_HELPER_(GE, >=);
-// Implements the helper function for {ASSERT|EXPECT}_GT
-GTEST_IMPL_CMP_HELPER_(GT, > );
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual);
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual);
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2);
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2);
-
-
-// Helper function for *_STREQ on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const wchar_t* expected,
- const wchar_t* actual);
-
-// Helper function for *_STRNE on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const wchar_t* s1,
- const wchar_t* s2);
-
-} // namespace internal
-
-// IsSubstring() and IsNotSubstring() are intended to be used as the
-// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
-// themselves. They check whether needle is a substring of haystack
-// (NULL is considered a substring of itself only), and return an
-// appropriate error message when they fail.
-//
-// The {needle,haystack}_expr arguments are the stringified
-// expressions that generated the two real arguments.
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack);
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack);
-#endif // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-// Helper template function for comparing floating-points.
-//
-// Template parameter:
-//
-// RawType: the raw floating-point type (either float or double)
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename RawType>
-AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression,
- const char* actual_expression,
- RawType expected,
- RawType actual) {
- const FloatingPoint<RawType> lhs(expected), rhs(actual);
-
- if (lhs.AlmostEquals(rhs)) {
- return AssertionSuccess();
- }
-
- ::std::stringstream expected_ss;
- expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << expected;
-
- ::std::stringstream actual_ss;
- actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << actual;
-
- return EqFailure(expected_expression,
- actual_expression,
- StringStreamToString(&expected_ss),
- StringStreamToString(&actual_ss),
- false);
-}
-
-// Helper function for implementing ASSERT_NEAR.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,
- const char* expr2,
- const char* abs_error_expr,
- double val1,
- double val2,
- double abs_error);
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-// A class that enables one to stream messages to assertion macros
-class GTEST_API_ AssertHelper {
- public:
- // Constructor.
- AssertHelper(TestPartResult::Type type,
- const char* file,
- int line,
- const char* message);
- ~AssertHelper();
-
- // Message assignment is a semantic trick to enable assertion
- // streaming; see the GTEST_MESSAGE_ macro below.
- void operator=(const Message& message) const;
-
- private:
- // We put our data in a struct so that the size of the AssertHelper class can
- // be as small as possible. This is important because gcc is incapable of
- // re-using stack space even for temporary variables, so every EXPECT_EQ
- // reserves stack space for another AssertHelper.
- struct AssertHelperData {
- AssertHelperData(TestPartResult::Type t,
- const char* srcfile,
- int line_num,
- const char* msg)
- : type(t), file(srcfile), line(line_num), message(msg) { }
-
- TestPartResult::Type const type;
- const char* const file;
- int const line;
- String const message;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);
- };
-
- AssertHelperData* const data_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);
-};
-
-} // namespace internal
-
-#if GTEST_HAS_PARAM_TEST
-// The pure interface class that all value-parameterized tests inherit from.
-// A value-parameterized class must inherit from both ::testing::Test and
-// ::testing::WithParamInterface. In most cases that just means inheriting
-// from ::testing::TestWithParam, but more complicated test hierarchies
-// may need to inherit from Test and WithParamInterface at different levels.
-//
-// This interface has support for accessing the test parameter value via
-// the GetParam() method.
-//
-// Use it with one of the parameter generator defining functions, like Range(),
-// Values(), ValuesIn(), Bool(), and Combine().
-//
-// class FooTest : public ::testing::TestWithParam<int> {
-// protected:
-// FooTest() {
-// // Can use GetParam() here.
-// }
-// virtual ~FooTest() {
-// // Can use GetParam() here.
-// }
-// virtual void SetUp() {
-// // Can use GetParam() here.
-// }
-// virtual void TearDown {
-// // Can use GetParam() here.
-// }
-// };
-// TEST_P(FooTest, DoesBar) {
-// // Can use GetParam() method here.
-// Foo foo;
-// ASSERT_TRUE(foo.DoesBar(GetParam()));
-// }
-// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
-
-template <typename T>
-class WithParamInterface {
- public:
- typedef T ParamType;
- virtual ~WithParamInterface() {}
-
- // The current parameter value. Is also available in the test fixture's
- // constructor. This member function is non-static, even though it only
- // references static data, to reduce the opportunity for incorrect uses
- // like writing 'WithParamInterface<bool>::GetParam()' for a test that
- // uses a fixture whose parameter type is int.
- const ParamType& GetParam() const { return *parameter_; }
-
- private:
- // Sets parameter value. The caller is responsible for making sure the value
- // remains alive and unchanged throughout the current test.
- static void SetParam(const ParamType* parameter) {
- parameter_ = parameter;
- }
-
- // Static value used for accessing parameter during a test lifetime.
- static const ParamType* parameter_;
-
- // TestClass must be a subclass of WithParamInterface<T> and Test.
- template <class TestClass> friend class internal::ParameterizedTestFactory;
-};
-
-template <typename T>
-const T* WithParamInterface<T>::parameter_ = NULL;
-
-// Most value-parameterized classes can ignore the existence of
-// WithParamInterface, and can just inherit from ::testing::TestWithParam.
-
-template <typename T>
-class TestWithParam : public Test, public WithParamInterface<T> {
-};
-
-#endif // GTEST_HAS_PARAM_TEST
-
-// Macros for indicating success/failure in test code.
-
-// ADD_FAILURE unconditionally adds a failure to the current test.
-// SUCCEED generates a success - it doesn't automatically make the
-// current test successful, as a test is only successful when it has
-// no failure.
-//
-// EXPECT_* verifies that a certain condition is satisfied. If not,
-// it behaves like ADD_FAILURE. In particular:
-//
-// EXPECT_TRUE verifies that a Boolean condition is true.
-// EXPECT_FALSE verifies that a Boolean condition is false.
-//
-// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
-// that they will also abort the current function on failure. People
-// usually want the fail-fast behavior of FAIL and ASSERT_*, but those
-// writing data-driven tests often find themselves using ADD_FAILURE
-// and EXPECT_* more.
-//
-// Examples:
-//
-// EXPECT_TRUE(server.StatusIsOK());
-// ASSERT_FALSE(server.HasPendingRequest(port))
-// << "There are still pending requests " << "on port " << port;
-
-// Generates a nonfatal failure with a generic message.
-#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
-
-// Generates a nonfatal failure at the given source file location with
-// a generic message.
-#define ADD_FAILURE_AT(file, line) \
- GTEST_MESSAGE_AT_(file, line, "Failed", \
- ::testing::TestPartResult::kNonFatalFailure)
-
-// Generates a fatal failure with a generic message.
-#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
-
-// Define this macro to 1 to omit the definition of FAIL(), which is a
-// generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_FAIL
-# define FAIL() GTEST_FAIL()
-#endif
-
-// Generates a success with a generic message.
-#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
-
-// Define this macro to 1 to omit the definition of SUCCEED(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_SUCCEED
-# define SUCCEED() GTEST_SUCCEED()
-#endif
-
-// Macros for testing exceptions.
-//
-// * {ASSERT|EXPECT}_THROW(statement, expected_exception):
-// Tests that the statement throws the expected exception.
-// * {ASSERT|EXPECT}_NO_THROW(statement):
-// Tests that the statement doesn't throw any exception.
-// * {ASSERT|EXPECT}_ANY_THROW(statement):
-// Tests that the statement throws an exception.
-
-#define EXPECT_THROW(statement, expected_exception) \
- GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_NO_THROW(statement) \
- GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_ANY_THROW(statement) \
- GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_THROW(statement, expected_exception) \
- GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
-#define ASSERT_NO_THROW(statement) \
- GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
-#define ASSERT_ANY_THROW(statement) \
- GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)
-
-// Boolean assertions. Condition can be either a Boolean expression or an
-// AssertionResult. For more information on how to use AssertionResult with
-// these macros see comments on that class.
-#define EXPECT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
- GTEST_NONFATAL_FAILURE_)
-#define EXPECT_FALSE(condition) \
- GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
- GTEST_NONFATAL_FAILURE_)
-#define ASSERT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
- GTEST_FATAL_FAILURE_)
-#define ASSERT_FALSE(condition) \
- GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
- GTEST_FATAL_FAILURE_)
-
-// Includes the auto-generated header that implements a family of
-// generic predicate assertion macros.
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on 09/24/2010 by command
-// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
-//
-// Implements a family of generic predicate assertion macros.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-// Makes sure this header is not included before gtest.h.
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-# error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
-
-// This header implements a family of generic predicate assertion
-// macros:
-//
-// ASSERT_PRED_FORMAT1(pred_format, v1)
-// ASSERT_PRED_FORMAT2(pred_format, v1, v2)
-// ...
-//
-// where pred_format is a function or functor that takes n (in the
-// case of ASSERT_PRED_FORMATn) values and their source expression
-// text, and returns a testing::AssertionResult. See the definition
-// of ASSERT_EQ in gtest.h for an example.
-//
-// If you don't care about formatting, you can use the more
-// restrictive version:
-//
-// ASSERT_PRED1(pred, v1)
-// ASSERT_PRED2(pred, v1, v2)
-// ...
-//
-// where pred is an n-ary function or functor that returns bool,
-// and the values v1, v2, ..., must support the << operator for
-// streaming to std::ostream.
-//
-// We also define the EXPECT_* variations.
-//
-// For now we only support predicates whose arity is at most 5.
-// Please email googletestframework@googlegroups.com if you need
-// support for higher arities.
-
-// GTEST_ASSERT_ is the basic statement to which all of the assertions
-// in this file reduce. Don't use this in your code.
-
-#define GTEST_ASSERT_(expression, on_failure) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar = (expression)) \
- ; \
- else \
- on_failure(gtest_ar.failure_message())
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use
-// this in your code.
-template <typename Pred,
- typename T1>
-AssertionResult AssertPred1Helper(const char* pred_text,
- const char* e1,
- Pred pred,
- const T1& v1) {
- if (pred(v1)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, v1),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use
-// this in your code.
-#define GTEST_PRED1_(pred, v1, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
- #v1, \
- pred, \
- v1), on_failure)
-
-// Unary predicate assertion macros.
-#define EXPECT_PRED_FORMAT1(pred_format, v1) \
- GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED1(pred, v1) \
- GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT1(pred_format, v1) \
- GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED1(pred, v1) \
- GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2>
-AssertionResult AssertPred2Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- Pred pred,
- const T1& v1,
- const T2& v2) {
- if (pred(v1, v2)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use
-// this in your code.
-#define GTEST_PRED2_(pred, v1, v2, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
- #v1, \
- #v2, \
- pred, \
- v1, \
- v2), on_failure)
-
-// Binary predicate assertion macros.
-#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
- GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED2(pred, v1, v2) \
- GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
- GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED2(pred, v1, v2) \
- GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3>
-AssertionResult AssertPred3Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3) {
- if (pred(v1, v2, v3)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use
-// this in your code.
-#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- pred, \
- v1, \
- v2, \
- v3), on_failure)
-
-// Ternary predicate assertion macros.
-#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
- GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED3(pred, v1, v2, v3) \
- GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
- GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED3(pred, v1, v2, v3) \
- GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3,
- typename T4>
-AssertionResult AssertPred4Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4) {
- if (pred(v1, v2, v3, v4)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ", "
- << e4 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3
- << "\n" << e4 << " evaluates to " << v4;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use
-// this in your code.
-#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- #v4, \
- pred, \
- v1, \
- v2, \
- v3, \
- v4), on_failure)
-
-// 4-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
- GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED4(pred, v1, v2, v3, v4) \
- GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
- GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED4(pred, v1, v2, v3, v4) \
- GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5>
-AssertionResult AssertPred5Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const char* e5,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4,
- const T5& v5) {
- if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ", "
- << e4 << ", "
- << e5 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3
- << "\n" << e4 << " evaluates to " << v4
- << "\n" << e5 << " evaluates to " << v5;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use
-// this in your code.
-#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- #v4, \
- #v5, \
- pred, \
- v1, \
- v2, \
- v3, \
- v4, \
- v5), on_failure)
-
-// 5-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
- GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
- GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
- GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
- GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-
-
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-// Macros for testing equalities and inequalities.
-//
-// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual
-// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
-// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
-// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
-// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
-// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
-//
-// When they are not, Google Test prints both the tested expressions and
-// their actual values. The values must be compatible built-in types,
-// or you will get a compiler error. By "compatible" we mean that the
-// values can be compared by the respective operator.
-//
-// Note:
-//
-// 1. It is possible to make a user-defined type work with
-// {ASSERT|EXPECT}_??(), but that requires overloading the
-// comparison operators and is thus discouraged by the Google C++
-// Usage Guide. Therefore, you are advised to use the
-// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
-// equal.
-//
-// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
-// pointers (in particular, C strings). Therefore, if you use it
-// with two C strings, you are testing how their locations in memory
-// are related, not how their content is related. To compare two C
-// strings by content, use {ASSERT|EXPECT}_STR*().
-//
-// 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to
-// {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you
-// what the actual value is when it fails, and similarly for the
-// other comparisons.
-//
-// 4. Do not depend on the order in which {ASSERT|EXPECT}_??()
-// evaluate their arguments, which is undefined.
-//
-// 5. These macros evaluate their arguments exactly once.
-//
-// Examples:
-//
-// EXPECT_NE(5, Foo());
-// EXPECT_EQ(NULL, a_pointer);
-// ASSERT_LT(i, array_size);
-// ASSERT_GT(records.size(), 0) << "There is no record left.";
-
-#define EXPECT_EQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal:: \
- EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
- expected, actual)
-#define EXPECT_NE(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)
-#define EXPECT_LE(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define EXPECT_LT(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define EXPECT_GE(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define EXPECT_GT(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-#define GTEST_ASSERT_EQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal:: \
- EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
- expected, actual)
-#define GTEST_ASSERT_NE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
-#define GTEST_ASSERT_LE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define GTEST_ASSERT_LT(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define GTEST_ASSERT_GE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define GTEST_ASSERT_GT(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
-// ASSERT_XY(), which clashes with some users' own code.
-
-#if !GTEST_DONT_DEFINE_ASSERT_EQ
-# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_NE
-# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LE
-# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LT
-# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GE
-# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GT
-# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
-#endif
-
-// C String Comparisons. All tests treat NULL and any non-NULL string
-// as different. Two NULLs are equal.
-//
-// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2
-// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2
-// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
-// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
-//
-// For wide or narrow string objects, you can use the
-// {ASSERT|EXPECT}_??() macros.
-//
-// Don't depend on the order in which the arguments are evaluated,
-// which is undefined.
-//
-// These macros evaluate their arguments exactly once.
-
-#define EXPECT_STREQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
-#define EXPECT_STRNE(s1, s2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define EXPECT_STRCASEEQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
-#define EXPECT_STRCASENE(s1, s2)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-#define ASSERT_STREQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
-#define ASSERT_STRNE(s1, s2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define ASSERT_STRCASEEQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
-#define ASSERT_STRCASENE(s1, s2)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-// Macros for comparing floating-point numbers.
-//
-// * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual):
-// Tests that two float values are almost equal.
-// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual):
-// Tests that two double values are almost equal.
-// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
-// Tests that v1 and v2 are within the given distance to each other.
-//
-// Google Test uses ULP-based comparison to automatically pick a default
-// error bound that is appropriate for the operands. See the
-// FloatingPoint template class in gtest-internal.h if you are
-// interested in the implementation details.
-
-#define EXPECT_FLOAT_EQ(expected, actual)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
- expected, actual)
-
-#define EXPECT_DOUBLE_EQ(expected, actual)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
- expected, actual)
-
-#define ASSERT_FLOAT_EQ(expected, actual)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
- expected, actual)
-
-#define ASSERT_DOUBLE_EQ(expected, actual)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
- expected, actual)
-
-#define EXPECT_NEAR(val1, val2, abs_error)\
- EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
- val1, val2, abs_error)
-
-#define ASSERT_NEAR(val1, val2, abs_error)\
- ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
- val1, val2, abs_error)
-
-// These predicate format functions work on floating-point values, and
-// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
-//
-// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,
- float val1, float val2);
-GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
- double val1, double val2);
-
-
-#if GTEST_OS_WINDOWS
-
-// Macros that test for HRESULT failure and success, these are only useful
-// on Windows, and rely on Windows SDK macros and APIs to compile.
-//
-// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
-//
-// When expr unexpectedly fails or succeeds, Google Test prints the
-// expected result and the actual result with both a human-readable
-// string representation of the error, if available, as well as the
-// hex result code.
-# define EXPECT_HRESULT_SUCCEEDED(expr) \
- EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define ASSERT_HRESULT_SUCCEEDED(expr) \
- ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define EXPECT_HRESULT_FAILED(expr) \
- EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-# define ASSERT_HRESULT_FAILED(expr) \
- ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-#endif // GTEST_OS_WINDOWS
-
-// Macros that execute statement and check that it doesn't generate new fatal
-// failures in the current thread.
-//
-// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
-//
-// Examples:
-//
-// EXPECT_NO_FATAL_FAILURE(Process());
-// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
-//
-#define ASSERT_NO_FATAL_FAILURE(statement) \
- GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
-#define EXPECT_NO_FATAL_FAILURE(statement) \
- GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)
-
-// Causes a trace (including the source file path, the current line
-// number, and the given message) to be included in every test failure
-// message generated by code in the current scope. The effect is
-// undone when the control leaves the current scope.
-//
-// The message argument can be anything streamable to std::ostream.
-//
-// In the implementation, we include the current line number as part
-// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
-// to appear in the same block - as long as they are on different
-// lines.
-#define SCOPED_TRACE(message) \
- ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
- __FILE__, __LINE__, ::testing::Message() << (message))
-
-// Compile-time assertion for type equality.
-// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
-// the same type. The value it returns is not interesting.
-//
-// Instead of making StaticAssertTypeEq a class template, we make it a
-// function template that invokes a helper class template. This
-// prevents a user from misusing StaticAssertTypeEq<T1, T2> by
-// defining objects of that type.
-//
-// CAVEAT:
-//
-// When used inside a method of a class template,
-// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
-// instantiated. For example, given:
-//
-// template <typename T> class Foo {
-// public:
-// void Bar() { testing::StaticAssertTypeEq<int, T>(); }
-// };
-//
-// the code:
-//
-// void Test1() { Foo<bool> foo; }
-//
-// will NOT generate a compiler error, as Foo<bool>::Bar() is never
-// actually instantiated. Instead, you need:
-//
-// void Test2() { Foo<bool> foo; foo.Bar(); }
-//
-// to cause a compiler error.
-template <typename T1, typename T2>
-bool StaticAssertTypeEq() {
- (void)internal::StaticAssertTypeEqHelper<T1, T2>();
- return true;
-}
-
-// Defines a test.
-//
-// The first parameter is the name of the test case, and the second
-// parameter is the name of the test within the test case.
-//
-// The convention is to end the test case name with "Test". For
-// example, a test case for the Foo class can be named FooTest.
-//
-// The user should put his test code between braces after using this
-// macro. Example:
-//
-// TEST(FooTest, InitializesCorrectly) {
-// Foo foo;
-// EXPECT_TRUE(foo.StatusIsOK());
-// }
-
-// Note that we call GetTestTypeId() instead of GetTypeId<
-// ::testing::Test>() here to get the type ID of testing::Test. This
-// is to work around a suspected linker bug when using Google Test as
-// a framework on Mac OS X. The bug causes GetTypeId<
-// ::testing::Test>() to return different values depending on whether
-// the call is from the Google Test framework itself or from user test
-// code. GetTestTypeId() is guaranteed to always return the same
-// value, as it always calls GetTypeId<>() from the Google Test
-// framework.
-#define GTEST_TEST(test_case_name, test_name)\
- GTEST_TEST_(test_case_name, test_name, \
- ::testing::Test, ::testing::internal::GetTestTypeId())
-
-// Define this macro to 1 to omit the definition of TEST(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_TEST
-# define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
-#endif
-
-// Defines a test that uses a test fixture.
-//
-// The first parameter is the name of the test fixture class, which
-// also doubles as the test case name. The second parameter is the
-// name of the test within the test case.
-//
-// A test fixture class must be declared earlier. The user should put
-// his test code between braces after using this macro. Example:
-//
-// class FooTest : public testing::Test {
-// protected:
-// virtual void SetUp() { b_.AddElement(3); }
-//
-// Foo a_;
-// Foo b_;
-// };
-//
-// TEST_F(FooTest, InitializesCorrectly) {
-// EXPECT_TRUE(a_.StatusIsOK());
-// }
-//
-// TEST_F(FooTest, ReturnsElementCountCorrectly) {
-// EXPECT_EQ(0, a_.size());
-// EXPECT_EQ(1, b_.size());
-// }
-
-#define TEST_F(test_fixture, test_name)\
- GTEST_TEST_(test_fixture, test_name, test_fixture, \
- ::testing::internal::GetTypeId<test_fixture>())
-
-// Use this macro in main() to run all tests. It returns 0 if all
-// tests are successful, or 1 otherwise.
-//
-// RUN_ALL_TESTS() should be invoked after the command line has been
-// parsed by InitGoogleTest().
-
-#define RUN_ALL_TESTS()\
- (::testing::UnitTest::GetInstance()->Run())
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest_main.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest_main.cc
deleted file mode 100644
index a09bbe0c6..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/fused-src/gtest/gtest_main.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <iostream>
-
-#include "gtest/gtest.h"
-
-GTEST_API_ int main(int argc, char **argv) {
- std::cout << "Running main() from gtest_main.cc\n";
-
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-death-test.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-death-test.h
deleted file mode 100644
index a27883f0a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-death-test.h
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the public API for death tests. It is
-// #included by gtest.h so a user doesn't need to include this
-// directly.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-
-#include "gtest/internal/gtest-death-test-internal.h"
-
-namespace testing {
-
-// This flag controls the style of death tests. Valid values are "threadsafe",
-// meaning that the death test child process will re-execute the test binary
-// from the start, running only a single death test, or "fast",
-// meaning that the child process will execute the test logic immediately
-// after forking.
-GTEST_DECLARE_string_(death_test_style);
-
-#if GTEST_HAS_DEATH_TEST
-
-// The following macros are useful for writing death tests.
-
-// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
-// executed:
-//
-// 1. It generates a warning if there is more than one active
-// thread. This is because it's safe to fork() or clone() only
-// when there is a single thread.
-//
-// 2. The parent process clone()s a sub-process and runs the death
-// test in it; the sub-process exits with code 0 at the end of the
-// death test, if it hasn't exited already.
-//
-// 3. The parent process waits for the sub-process to terminate.
-//
-// 4. The parent process checks the exit code and error message of
-// the sub-process.
-//
-// Examples:
-//
-// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
-// for (int i = 0; i < 5; i++) {
-// EXPECT_DEATH(server.ProcessRequest(i),
-// "Invalid request .* in ProcessRequest()")
-// << "Failed to die on request " << i);
-// }
-//
-// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
-//
-// bool KilledBySIGHUP(int exit_code) {
-// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
-// }
-//
-// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
-//
-// On the regular expressions used in death tests:
-//
-// On POSIX-compliant systems (*nix), we use the <regex.h> library,
-// which uses the POSIX extended regex syntax.
-//
-// On other platforms (e.g. Windows), we only support a simple regex
-// syntax implemented as part of Google Test. This limited
-// implementation should be enough most of the time when writing
-// death tests; though it lacks many features you can find in PCRE
-// or POSIX extended regex syntax. For example, we don't support
-// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
-// repetition count ("x{5,7}"), among others.
-//
-// Below is the syntax that we do support. We chose it to be a
-// subset of both PCRE and POSIX extended regex, so it's easy to
-// learn wherever you come from. In the following: 'A' denotes a
-// literal character, period (.), or a single \\ escape sequence;
-// 'x' and 'y' denote regular expressions; 'm' and 'n' are for
-// natural numbers.
-//
-// c matches any literal character c
-// \\d matches any decimal digit
-// \\D matches any character that's not a decimal digit
-// \\f matches \f
-// \\n matches \n
-// \\r matches \r
-// \\s matches any ASCII whitespace, including \n
-// \\S matches any character that's not a whitespace
-// \\t matches \t
-// \\v matches \v
-// \\w matches any letter, _, or decimal digit
-// \\W matches any character that \\w doesn't match
-// \\c matches any literal character c, which must be a punctuation
-// . matches any single character except \n
-// A? matches 0 or 1 occurrences of A
-// A* matches 0 or many occurrences of A
-// A+ matches 1 or many occurrences of A
-// ^ matches the beginning of a string (not that of each line)
-// $ matches the end of a string (not that of each line)
-// xy matches x followed by y
-//
-// If you accidentally use PCRE or POSIX extended regex features
-// not implemented by us, you will get a run-time failure. In that
-// case, please try to rewrite your regular expression within the
-// above syntax.
-//
-// This implementation is *not* meant to be as highly tuned or robust
-// as a compiled regex library, but should perform well enough for a
-// death test, which already incurs significant overhead by launching
-// a child process.
-//
-// Known caveats:
-//
-// A "threadsafe" style death test obtains the path to the test
-// program from argv[0] and re-executes it in the sub-process. For
-// simplicity, the current implementation doesn't search the PATH
-// when launching the sub-process. This means that the user must
-// invoke the test program via a path that contains at least one
-// path separator (e.g. path/to/foo_test and
-// /absolute/path/to/bar_test are fine, but foo_test is not). This
-// is rarely a problem as people usually don't put the test binary
-// directory in PATH.
-//
-// TODO(wan@google.com): make thread-safe death tests search the PATH.
-
-// Asserts that a given statement causes the program to exit, with an
-// integer exit status that satisfies predicate, and emitting error output
-// that matches regex.
-# define ASSERT_EXIT(statement, predicate, regex) \
- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
-
-// Like ASSERT_EXIT, but continues on to successive tests in the
-// test case, if any:
-# define EXPECT_EXIT(statement, predicate, regex) \
- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
-
-// Asserts that a given statement causes the program to exit, either by
-// explicitly exiting with a nonzero exit code or being killed by a
-// signal, and emitting error output that matches regex.
-# define ASSERT_DEATH(statement, regex) \
- ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
-
-// Like ASSERT_DEATH, but continues on to successive tests in the
-// test case, if any:
-# define EXPECT_DEATH(statement, regex) \
- EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
-
-// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
-
-// Tests that an exit code describes a normal exit with a given exit code.
-class GTEST_API_ ExitedWithCode {
- public:
- explicit ExitedWithCode(int exit_code);
- bool operator()(int exit_status) const;
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ExitedWithCode& other);
-
- const int exit_code_;
-};
-
-# if !GTEST_OS_WINDOWS
-// Tests that an exit code describes an exit due to termination by a
-// given signal.
-class GTEST_API_ KilledBySignal {
- public:
- explicit KilledBySignal(int signum);
- bool operator()(int exit_status) const;
- private:
- const int signum_;
-};
-# endif // !GTEST_OS_WINDOWS
-
-// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
-// The death testing framework causes this to have interesting semantics,
-// since the sideeffects of the call are only visible in opt mode, and not
-// in debug mode.
-//
-// In practice, this can be used to test functions that utilize the
-// LOG(DFATAL) macro using the following style:
-//
-// int DieInDebugOr12(int* sideeffect) {
-// if (sideeffect) {
-// *sideeffect = 12;
-// }
-// LOG(DFATAL) << "death";
-// return 12;
-// }
-//
-// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
-// int sideeffect = 0;
-// // Only asserts in dbg.
-// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
-//
-// #ifdef NDEBUG
-// // opt-mode has sideeffect visible.
-// EXPECT_EQ(12, sideeffect);
-// #else
-// // dbg-mode no visible sideeffect.
-// EXPECT_EQ(0, sideeffect);
-// #endif
-// }
-//
-// This will assert that DieInDebugReturn12InOpt() crashes in debug
-// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
-// appropriate fallback value (12 in this case) in opt mode. If you
-// need to test that a function has appropriate side-effects in opt
-// mode, include assertions against the side-effects. A general
-// pattern for this is:
-//
-// EXPECT_DEBUG_DEATH({
-// // Side-effects here will have an effect after this statement in
-// // opt mode, but none in debug mode.
-// EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
-// }, "death");
-//
-# ifdef NDEBUG
-
-# define EXPECT_DEBUG_DEATH(statement, regex) \
- do { statement; } while (::testing::internal::AlwaysFalse())
-
-# define ASSERT_DEBUG_DEATH(statement, regex) \
- do { statement; } while (::testing::internal::AlwaysFalse())
-
-# else
-
-# define EXPECT_DEBUG_DEATH(statement, regex) \
- EXPECT_DEATH(statement, regex)
-
-# define ASSERT_DEBUG_DEATH(statement, regex) \
- ASSERT_DEATH(statement, regex)
-
-# endif // NDEBUG for EXPECT_DEBUG_DEATH
-#endif // GTEST_HAS_DEATH_TEST
-
-// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
-// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
-// death tests are supported; otherwise they just issue a warning. This is
-// useful when you are combining death test assertions with normal test
-// assertions in one test.
-#if GTEST_HAS_DEATH_TEST
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- EXPECT_DEATH(statement, regex)
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- ASSERT_DEATH(statement, regex)
-#else
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
-#endif
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-message.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-message.h
deleted file mode 100644
index 9b7142f32..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-message.h
+++ /dev/null
@@ -1,230 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the Message class.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
-// program!
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-
-#include <limits>
-
-#include "gtest/internal/gtest-string.h"
-#include "gtest/internal/gtest-internal.h"
-
-namespace testing {
-
-// The Message class works like an ostream repeater.
-//
-// Typical usage:
-//
-// 1. You stream a bunch of values to a Message object.
-// It will remember the text in a stringstream.
-// 2. Then you stream the Message object to an ostream.
-// This causes the text in the Message to be streamed
-// to the ostream.
-//
-// For example;
-//
-// testing::Message foo;
-// foo << 1 << " != " << 2;
-// std::cout << foo;
-//
-// will print "1 != 2".
-//
-// Message is not intended to be inherited from. In particular, its
-// destructor is not virtual.
-//
-// Note that stringstream behaves differently in gcc and in MSVC. You
-// can stream a NULL char pointer to it in the former, but not in the
-// latter (it causes an access violation if you do). The Message
-// class hides this difference by treating a NULL char pointer as
-// "(null)".
-class GTEST_API_ Message {
- private:
- // The type of basic IO manipulators (endl, ends, and flush) for
- // narrow streams.
- typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
-
- public:
- // Constructs an empty Message.
- // We allocate the stringstream separately because otherwise each use of
- // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's
- // stack frame leading to huge stack frames in some cases; gcc does not reuse
- // the stack space.
- Message() : ss_(new ::std::stringstream) {
- // By default, we want there to be enough precision when printing
- // a double to a Message.
- *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
- }
-
- // Copy constructor.
- Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
- *ss_ << msg.GetString();
- }
-
- // Constructs a Message from a C-string.
- explicit Message(const char* str) : ss_(new ::std::stringstream) {
- *ss_ << str;
- }
-
-#if GTEST_OS_SYMBIAN
- // Streams a value (either a pointer or not) to this object.
- template <typename T>
- inline Message& operator <<(const T& value) {
- StreamHelper(typename internal::is_pointer<T>::type(), value);
- return *this;
- }
-#else
- // Streams a non-pointer value to this object.
- template <typename T>
- inline Message& operator <<(const T& val) {
- ::GTestStreamToHelper(ss_.get(), val);
- return *this;
- }
-
- // Streams a pointer value to this object.
- //
- // This function is an overload of the previous one. When you
- // stream a pointer to a Message, this definition will be used as it
- // is more specialized. (The C++ Standard, section
- // [temp.func.order].) If you stream a non-pointer, then the
- // previous definition will be used.
- //
- // The reason for this overload is that streaming a NULL pointer to
- // ostream is undefined behavior. Depending on the compiler, you
- // may get "0", "(nil)", "(null)", or an access violation. To
- // ensure consistent result across compilers, we always treat NULL
- // as "(null)".
- template <typename T>
- inline Message& operator <<(T* const& pointer) { // NOLINT
- if (pointer == NULL) {
- *ss_ << "(null)";
- } else {
- ::GTestStreamToHelper(ss_.get(), pointer);
- }
- return *this;
- }
-#endif // GTEST_OS_SYMBIAN
-
- // Since the basic IO manipulators are overloaded for both narrow
- // and wide streams, we have to provide this specialized definition
- // of operator <<, even though its body is the same as the
- // templatized version above. Without this definition, streaming
- // endl or other basic IO manipulators to Message will confuse the
- // compiler.
- Message& operator <<(BasicNarrowIoManip val) {
- *ss_ << val;
- return *this;
- }
-
- // Instead of 1/0, we want to see true/false for bool values.
- Message& operator <<(bool b) {
- return *this << (b ? "true" : "false");
- }
-
- // These two overloads allow streaming a wide C string to a Message
- // using the UTF-8 encoding.
- Message& operator <<(const wchar_t* wide_c_str) {
- return *this << internal::String::ShowWideCString(wide_c_str);
- }
- Message& operator <<(wchar_t* wide_c_str) {
- return *this << internal::String::ShowWideCString(wide_c_str);
- }
-
-#if GTEST_HAS_STD_WSTRING
- // Converts the given wide string to a narrow string using the UTF-8
- // encoding, and streams the result to this Message object.
- Message& operator <<(const ::std::wstring& wstr);
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
- // Converts the given wide string to a narrow string using the UTF-8
- // encoding, and streams the result to this Message object.
- Message& operator <<(const ::wstring& wstr);
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
- // Gets the text streamed to this object so far as a String.
- // Each '\0' character in the buffer is replaced with "\\0".
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- internal::String GetString() const {
- return internal::StringStreamToString(ss_.get());
- }
-
- private:
-
-#if GTEST_OS_SYMBIAN
- // These are needed as the Nokia Symbian Compiler cannot decide between
- // const T& and const T* in a function template. The Nokia compiler _can_
- // decide between class template specializations for T and T*, so a
- // tr1::type_traits-like is_pointer works, and we can overload on that.
- template <typename T>
- inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) {
- if (pointer == NULL) {
- *ss_ << "(null)";
- } else {
- ::GTestStreamToHelper(ss_.get(), pointer);
- }
- }
- template <typename T>
- inline void StreamHelper(internal::false_type /*dummy*/, const T& value) {
- ::GTestStreamToHelper(ss_.get(), value);
- }
-#endif // GTEST_OS_SYMBIAN
-
- // We'll hold the text streamed to this object here.
- const internal::scoped_ptr< ::std::stringstream> ss_;
-
- // We declare (but don't implement) this to prevent the compiler
- // from implementing the assignment operator.
- void operator=(const Message&);
-};
-
-// Streams a Message to an ostream.
-inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
- return os << sb.GetString();
-}
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h
deleted file mode 100644
index 6407cfd68..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h
+++ /dev/null
@@ -1,1421 +0,0 @@
-// This file was GENERATED by command:
-// pump.py gtest-param-test.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: vladl@google.com (Vlad Losev)
-//
-// Macros and functions for implementing parameterized tests
-// in Google C++ Testing Framework (Google Test)
-//
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-
-
-// Value-parameterized tests allow you to test your code with different
-// parameters without writing multiple copies of the same test.
-//
-// Here is how you use value-parameterized tests:
-
-#if 0
-
-// To write value-parameterized tests, first you should define a fixture
-// class. It is usually derived from testing::TestWithParam<T> (see below for
-// another inheritance scheme that's sometimes useful in more complicated
-// class hierarchies), where the type of your parameter values.
-// TestWithParam<T> is itself derived from testing::Test. T can be any
-// copyable type. If it's a raw pointer, you are responsible for managing the
-// lifespan of the pointed values.
-
-class FooTest : public ::testing::TestWithParam<const char*> {
- // You can implement all the usual class fixture members here.
-};
-
-// Then, use the TEST_P macro to define as many parameterized tests
-// for this fixture as you want. The _P suffix is for "parameterized"
-// or "pattern", whichever you prefer to think.
-
-TEST_P(FooTest, DoesBlah) {
- // Inside a test, access the test parameter with the GetParam() method
- // of the TestWithParam<T> class:
- EXPECT_TRUE(foo.Blah(GetParam()));
- ...
-}
-
-TEST_P(FooTest, HasBlahBlah) {
- ...
-}
-
-// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
-// case with any set of parameters you want. Google Test defines a number
-// of functions for generating test parameters. They return what we call
-// (surprise!) parameter generators. Here is a summary of them, which
-// are all in the testing namespace:
-//
-//
-// Range(begin, end [, step]) - Yields values {begin, begin+step,
-// begin+step+step, ...}. The values do not
-// include end. step defaults to 1.
-// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
-// ValuesIn(container) - Yields values from a C-style array, an STL
-// ValuesIn(begin,end) container, or an iterator range [begin, end).
-// Bool() - Yields sequence {false, true}.
-// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
-// for the math savvy) of the values generated
-// by the N generators.
-//
-// For more details, see comments at the definitions of these functions below
-// in this file.
-//
-// The following statement will instantiate tests from the FooTest test case
-// each with parameter values "meeny", "miny", and "moe".
-
-INSTANTIATE_TEST_CASE_P(InstantiationName,
- FooTest,
- Values("meeny", "miny", "moe"));
-
-// To distinguish different instances of the pattern, (yes, you
-// can instantiate it more then once) the first argument to the
-// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
-// actual test case name. Remember to pick unique prefixes for different
-// instantiations. The tests from the instantiation above will have
-// these names:
-//
-// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
-// * InstantiationName/FooTest.DoesBlah/1 for "miny"
-// * InstantiationName/FooTest.DoesBlah/2 for "moe"
-// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
-// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
-// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
-//
-// You can use these names in --gtest_filter.
-//
-// This statement will instantiate all tests from FooTest again, each
-// with parameter values "cat" and "dog":
-
-const char* pets[] = {"cat", "dog"};
-INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
-
-// The tests from the instantiation above will have these names:
-//
-// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
-//
-// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
-// in the given test case, whether their definitions come before or
-// AFTER the INSTANTIATE_TEST_CASE_P statement.
-//
-// Please also note that generator expressions (including parameters to the
-// generators) are evaluated in InitGoogleTest(), after main() has started.
-// This allows the user on one hand, to adjust generator parameters in order
-// to dynamically determine a set of tests to run and on the other hand,
-// give the user a chance to inspect the generated tests with Google Test
-// reflection API before RUN_ALL_TESTS() is executed.
-//
-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
-// for more examples.
-//
-// In the future, we plan to publish the API for defining new parameter
-// generators. But for now this interface remains part of the internal
-// implementation and is subject to change.
-//
-//
-// A parameterized test fixture must be derived from testing::Test and from
-// testing::WithParamInterface<T>, where T is the type of the parameter
-// values. Inheriting from TestWithParam<T> satisfies that requirement because
-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
-// complicated hierarchies, however, it is occasionally useful to inherit
-// separately from Test and WithParamInterface. For example:
-
-class BaseTest : public ::testing::Test {
- // You can inherit all the usual members for a non-parameterized test
- // fixture here.
-};
-
-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
- // The usual test fixture members go here too.
-};
-
-TEST_F(BaseTest, HasFoo) {
- // This is an ordinary non-parameterized test.
-}
-
-TEST_P(DerivedTest, DoesBlah) {
- // GetParam works just the same here as if you inherit from TestWithParam.
- EXPECT_TRUE(foo.Blah(GetParam()));
-}
-
-#endif // 0
-
-#include "gtest/internal/gtest-port.h"
-
-#if !GTEST_OS_SYMBIAN
-# include <utility>
-#endif
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-param-util.h"
-#include "gtest/internal/gtest-param-util-generated.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Functions producing parameter generators.
-//
-// Google Test uses these generators to produce parameters for value-
-// parameterized tests. When a parameterized test case is instantiated
-// with a particular generator, Google Test creates and runs tests
-// for each element in the sequence produced by the generator.
-//
-// In the following sample, tests from test case FooTest are instantiated
-// each three times with parameter values 3, 5, and 8:
-//
-// class FooTest : public TestWithParam<int> { ... };
-//
-// TEST_P(FooTest, TestThis) {
-// }
-// TEST_P(FooTest, TestThat) {
-// }
-// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
-//
-
-// Range() returns generators providing sequences of values in a range.
-//
-// Synopsis:
-// Range(start, end)
-// - returns a generator producing a sequence of values {start, start+1,
-// start+2, ..., }.
-// Range(start, end, step)
-// - returns a generator producing a sequence of values {start, start+step,
-// start+step+step, ..., }.
-// Notes:
-// * The generated sequences never include end. For example, Range(1, 5)
-// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
-// returns a generator producing {1, 3, 5, 7}.
-// * start and end must have the same type. That type may be any integral or
-// floating-point type or a user defined type satisfying these conditions:
-// * It must be assignable (have operator=() defined).
-// * It must have operator+() (operator+(int-compatible type) for
-// two-operand version).
-// * It must have operator<() defined.
-// Elements in the resulting sequences will also have that type.
-// * Condition start < end must be satisfied in order for resulting sequences
-// to contain any elements.
-//
-template <typename T, typename IncrementT>
-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
- return internal::ParamGenerator<T>(
- new internal::RangeGenerator<T, IncrementT>(start, end, step));
-}
-
-template <typename T>
-internal::ParamGenerator<T> Range(T start, T end) {
- return Range(start, end, 1);
-}
-
-// ValuesIn() function allows generation of tests with parameters coming from
-// a container.
-//
-// Synopsis:
-// ValuesIn(const T (&array)[N])
-// - returns a generator producing sequences with elements from
-// a C-style array.
-// ValuesIn(const Container& container)
-// - returns a generator producing sequences with elements from
-// an STL-style container.
-// ValuesIn(Iterator begin, Iterator end)
-// - returns a generator producing sequences with elements from
-// a range [begin, end) defined by a pair of STL-style iterators. These
-// iterators can also be plain C pointers.
-//
-// Please note that ValuesIn copies the values from the containers
-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
-//
-// Examples:
-//
-// This instantiates tests from test case StringTest
-// each with C-string values of "foo", "bar", and "baz":
-//
-// const char* strings[] = {"foo", "bar", "baz"};
-// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
-//
-// This instantiates tests from test case StlStringTest
-// each with STL strings with values "a" and "b":
-//
-// ::std::vector< ::std::string> GetParameterStrings() {
-// ::std::vector< ::std::string> v;
-// v.push_back("a");
-// v.push_back("b");
-// return v;
-// }
-//
-// INSTANTIATE_TEST_CASE_P(CharSequence,
-// StlStringTest,
-// ValuesIn(GetParameterStrings()));
-//
-//
-// This will also instantiate tests from CharTest
-// each with parameter values 'a' and 'b':
-//
-// ::std::list<char> GetParameterChars() {
-// ::std::list<char> list;
-// list.push_back('a');
-// list.push_back('b');
-// return list;
-// }
-// ::std::list<char> l = GetParameterChars();
-// INSTANTIATE_TEST_CASE_P(CharSequence2,
-// CharTest,
-// ValuesIn(l.begin(), l.end()));
-//
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end) {
- typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
- ::value_type ParamType;
- return internal::ParamGenerator<ParamType>(
- new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
-}
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
- return ValuesIn(array, array + N);
-}
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container) {
- return ValuesIn(container.begin(), container.end());
-}
-
-// Values() allows generating tests from explicitly specified list of
-// parameters.
-//
-// Synopsis:
-// Values(T v1, T v2, ..., T vN)
-// - returns a generator producing sequences with elements v1, v2, ..., vN.
-//
-// For example, this instantiates tests from test case BarTest each
-// with values "one", "two", and "three":
-//
-// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
-//
-// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
-// The exact type of values will depend on the type of parameter in BazTest.
-//
-// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
-//
-// Currently, Values() supports from 1 to 50 parameters.
-//
-template <typename T1>
-internal::ValueArray1<T1> Values(T1 v1) {
- return internal::ValueArray1<T1>(v1);
-}
-
-template <typename T1, typename T2>
-internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {
- return internal::ValueArray2<T1, T2>(v1, v2);
-}
-
-template <typename T1, typename T2, typename T3>
-internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {
- return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {
- return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5) {
- return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6) {
- return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7) {
- return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
- v6, v7);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,
- v5, v6, v7, v8);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
- T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11) {
- return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
- T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12) {
- return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13) {
- return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16) {
- return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17) {
- return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18) {
- return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
- return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
- return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
- return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22) {
- return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23) {
- return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24) {
- return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
- v19, v20, v21, v22, v23, v24);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
- return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
- v18, v19, v20, v21, v22, v23, v24, v25);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26) {
- return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27) {
- return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28) {
- return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
- v28);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29) {
- return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
- v27, v28, v29);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
- return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
- v26, v27, v28, v29, v30);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
- return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
- v25, v26, v27, v28, v29, v30, v31);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32) {
- return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33) {
- return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
- T31 v31, T32 v32, T33 v33, T34 v34) {
- return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
- return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
- return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37) {
- return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36, v37);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37, T38 v38) {
- return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
- v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
- v33, v34, v35, v36, v37, v38);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
- T37 v37, T38 v38, T39 v39) {
- return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
- v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
- v32, v33, v34, v35, v36, v37, v38, v39);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
- T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
- T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
- return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
- v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
- return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
- v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42) {
- return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
- v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
- v42);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43) {
- return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
- v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
- v41, v42, v43);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44) {
- return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
- v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
- v40, v41, v42, v43, v44);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
- T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
- T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
- return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
- v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
- v39, v40, v41, v42, v43, v44, v45);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
- return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
- v38, v39, v40, v41, v42, v43, v44, v45, v46);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
- return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
- v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
- T48 v48) {
- return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
- v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
- T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
- T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
- T47 v47, T48 v48, T49 v49) {
- return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
- v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
- T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
- T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
- return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
- v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
- v48, v49, v50);
-}
-
-// Bool() allows generating tests with parameters in a set of (false, true).
-//
-// Synopsis:
-// Bool()
-// - returns a generator producing sequences with elements {false, true}.
-//
-// It is useful when testing code that depends on Boolean flags. Combinations
-// of multiple flags can be tested when several Bool()'s are combined using
-// Combine() function.
-//
-// In the following example all tests in the test case FlagDependentTest
-// will be instantiated twice with parameters false and true.
-//
-// class FlagDependentTest : public testing::TestWithParam<bool> {
-// virtual void SetUp() {
-// external_flag = GetParam();
-// }
-// }
-// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
-//
-inline internal::ParamGenerator<bool> Bool() {
- return Values(false, true);
-}
-
-# if GTEST_HAS_COMBINE
-// Combine() allows the user to combine two or more sequences to produce
-// values of a Cartesian product of those sequences' elements.
-//
-// Synopsis:
-// Combine(gen1, gen2, ..., genN)
-// - returns a generator producing sequences with elements coming from
-// the Cartesian product of elements from the sequences generated by
-// gen1, gen2, ..., genN. The sequence elements will have a type of
-// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
-// of elements from sequences produces by gen1, gen2, ..., genN.
-//
-// Combine can have up to 10 arguments. This number is currently limited
-// by the maximum number of elements in the tuple implementation used by Google
-// Test.
-//
-// Example:
-//
-// This will instantiate tests in test case AnimalTest each one with
-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
-// tuple("dog", BLACK), and tuple("dog", WHITE):
-//
-// enum Color { BLACK, GRAY, WHITE };
-// class AnimalTest
-// : public testing::TestWithParam<tuple<const char*, Color> > {...};
-//
-// TEST_P(AnimalTest, AnimalLooksNice) {...}
-//
-// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
-// Combine(Values("cat", "dog"),
-// Values(BLACK, WHITE)));
-//
-// This will instantiate tests in FlagDependentTest with all variations of two
-// Boolean flags:
-//
-// class FlagDependentTest
-// : public testing::TestWithParam<tuple(bool, bool)> > {
-// virtual void SetUp() {
-// // Assigns external_flag_1 and external_flag_2 values from the tuple.
-// tie(external_flag_1, external_flag_2) = GetParam();
-// }
-// };
-//
-// TEST_P(FlagDependentTest, TestFeature1) {
-// // Test your code using external_flag_1 and external_flag_2 here.
-// }
-// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
-// Combine(Bool(), Bool()));
-//
-template <typename Generator1, typename Generator2>
-internal::CartesianProductHolder2<Generator1, Generator2> Combine(
- const Generator1& g1, const Generator2& g2) {
- return internal::CartesianProductHolder2<Generator1, Generator2>(
- g1, g2);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3>
-internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3) {
- return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
- g1, g2, g3);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4>
-internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
- Generator4> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4) {
- return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
- Generator4>(
- g1, g2, g3, g4);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5>
-internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
- Generator4, Generator5> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5) {
- return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
- Generator4, Generator5>(
- g1, g2, g3, g4, g5);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6>
-internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6) {
- return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6>(
- g1, g2, g3, g4, g5, g6);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7>
-internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7) {
- return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7>(
- g1, g2, g3, g4, g5, g6, g7);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8>
-internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8) {
- return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8>(
- g1, g2, g3, g4, g5, g6, g7, g8);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8, typename Generator9>
-internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8,
- Generator9> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8, const Generator9& g9) {
- return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
- g1, g2, g3, g4, g5, g6, g7, g8, g9);
-}
-
-template <typename Generator1, typename Generator2, typename Generator3,
- typename Generator4, typename Generator5, typename Generator6,
- typename Generator7, typename Generator8, typename Generator9,
- typename Generator10>
-internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
- Generator10> Combine(
- const Generator1& g1, const Generator2& g2, const Generator3& g3,
- const Generator4& g4, const Generator5& g5, const Generator6& g6,
- const Generator7& g7, const Generator8& g8, const Generator9& g9,
- const Generator10& g10) {
- return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
- Generator10>(
- g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
-}
-# endif // GTEST_HAS_COMBINE
-
-
-
-# define TEST_P(test_case_name, test_name) \
- class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- : public test_case_name { \
- public: \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
- virtual void TestBody(); \
- private: \
- static int AddToRegistry() { \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
- #test_case_name, \
- #test_name, \
- new ::testing::internal::TestMetaFactory< \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
- return 0; \
- } \
- static int gtest_registering_dummy_; \
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
- }; \
- int GTEST_TEST_CLASS_NAME_(test_case_name, \
- test_name)::gtest_registering_dummy_ = \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
- void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
- ::testing::internal::ParamGenerator<test_case_name::ParamType> \
- gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
- int gtest_##prefix##test_case_name##_dummy_ = \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
- #prefix, \
- &gtest_##prefix##test_case_name##_EvalGenerator_, \
- __FILE__, __LINE__)
-
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h.pump
deleted file mode 100644
index 401cb513a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-param-test.h.pump
+++ /dev/null
@@ -1,487 +0,0 @@
-$$ -*- mode: c++; -*-
-$var n = 50 $$ Maximum length of Values arguments we want to support.
-$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: vladl@google.com (Vlad Losev)
-//
-// Macros and functions for implementing parameterized tests
-// in Google C++ Testing Framework (Google Test)
-//
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-
-
-// Value-parameterized tests allow you to test your code with different
-// parameters without writing multiple copies of the same test.
-//
-// Here is how you use value-parameterized tests:
-
-#if 0
-
-// To write value-parameterized tests, first you should define a fixture
-// class. It is usually derived from testing::TestWithParam<T> (see below for
-// another inheritance scheme that's sometimes useful in more complicated
-// class hierarchies), where the type of your parameter values.
-// TestWithParam<T> is itself derived from testing::Test. T can be any
-// copyable type. If it's a raw pointer, you are responsible for managing the
-// lifespan of the pointed values.
-
-class FooTest : public ::testing::TestWithParam<const char*> {
- // You can implement all the usual class fixture members here.
-};
-
-// Then, use the TEST_P macro to define as many parameterized tests
-// for this fixture as you want. The _P suffix is for "parameterized"
-// or "pattern", whichever you prefer to think.
-
-TEST_P(FooTest, DoesBlah) {
- // Inside a test, access the test parameter with the GetParam() method
- // of the TestWithParam<T> class:
- EXPECT_TRUE(foo.Blah(GetParam()));
- ...
-}
-
-TEST_P(FooTest, HasBlahBlah) {
- ...
-}
-
-// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
-// case with any set of parameters you want. Google Test defines a number
-// of functions for generating test parameters. They return what we call
-// (surprise!) parameter generators. Here is a summary of them, which
-// are all in the testing namespace:
-//
-//
-// Range(begin, end [, step]) - Yields values {begin, begin+step,
-// begin+step+step, ...}. The values do not
-// include end. step defaults to 1.
-// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
-// ValuesIn(container) - Yields values from a C-style array, an STL
-// ValuesIn(begin,end) container, or an iterator range [begin, end).
-// Bool() - Yields sequence {false, true}.
-// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
-// for the math savvy) of the values generated
-// by the N generators.
-//
-// For more details, see comments at the definitions of these functions below
-// in this file.
-//
-// The following statement will instantiate tests from the FooTest test case
-// each with parameter values "meeny", "miny", and "moe".
-
-INSTANTIATE_TEST_CASE_P(InstantiationName,
- FooTest,
- Values("meeny", "miny", "moe"));
-
-// To distinguish different instances of the pattern, (yes, you
-// can instantiate it more then once) the first argument to the
-// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
-// actual test case name. Remember to pick unique prefixes for different
-// instantiations. The tests from the instantiation above will have
-// these names:
-//
-// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
-// * InstantiationName/FooTest.DoesBlah/1 for "miny"
-// * InstantiationName/FooTest.DoesBlah/2 for "moe"
-// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
-// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
-// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
-//
-// You can use these names in --gtest_filter.
-//
-// This statement will instantiate all tests from FooTest again, each
-// with parameter values "cat" and "dog":
-
-const char* pets[] = {"cat", "dog"};
-INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
-
-// The tests from the instantiation above will have these names:
-//
-// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
-// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
-//
-// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
-// in the given test case, whether their definitions come before or
-// AFTER the INSTANTIATE_TEST_CASE_P statement.
-//
-// Please also note that generator expressions (including parameters to the
-// generators) are evaluated in InitGoogleTest(), after main() has started.
-// This allows the user on one hand, to adjust generator parameters in order
-// to dynamically determine a set of tests to run and on the other hand,
-// give the user a chance to inspect the generated tests with Google Test
-// reflection API before RUN_ALL_TESTS() is executed.
-//
-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
-// for more examples.
-//
-// In the future, we plan to publish the API for defining new parameter
-// generators. But for now this interface remains part of the internal
-// implementation and is subject to change.
-//
-//
-// A parameterized test fixture must be derived from testing::Test and from
-// testing::WithParamInterface<T>, where T is the type of the parameter
-// values. Inheriting from TestWithParam<T> satisfies that requirement because
-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
-// complicated hierarchies, however, it is occasionally useful to inherit
-// separately from Test and WithParamInterface. For example:
-
-class BaseTest : public ::testing::Test {
- // You can inherit all the usual members for a non-parameterized test
- // fixture here.
-};
-
-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
- // The usual test fixture members go here too.
-};
-
-TEST_F(BaseTest, HasFoo) {
- // This is an ordinary non-parameterized test.
-}
-
-TEST_P(DerivedTest, DoesBlah) {
- // GetParam works just the same here as if you inherit from TestWithParam.
- EXPECT_TRUE(foo.Blah(GetParam()));
-}
-
-#endif // 0
-
-#include "gtest/internal/gtest-port.h"
-
-#if !GTEST_OS_SYMBIAN
-# include <utility>
-#endif
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-param-util.h"
-#include "gtest/internal/gtest-param-util-generated.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Functions producing parameter generators.
-//
-// Google Test uses these generators to produce parameters for value-
-// parameterized tests. When a parameterized test case is instantiated
-// with a particular generator, Google Test creates and runs tests
-// for each element in the sequence produced by the generator.
-//
-// In the following sample, tests from test case FooTest are instantiated
-// each three times with parameter values 3, 5, and 8:
-//
-// class FooTest : public TestWithParam<int> { ... };
-//
-// TEST_P(FooTest, TestThis) {
-// }
-// TEST_P(FooTest, TestThat) {
-// }
-// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
-//
-
-// Range() returns generators providing sequences of values in a range.
-//
-// Synopsis:
-// Range(start, end)
-// - returns a generator producing a sequence of values {start, start+1,
-// start+2, ..., }.
-// Range(start, end, step)
-// - returns a generator producing a sequence of values {start, start+step,
-// start+step+step, ..., }.
-// Notes:
-// * The generated sequences never include end. For example, Range(1, 5)
-// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
-// returns a generator producing {1, 3, 5, 7}.
-// * start and end must have the same type. That type may be any integral or
-// floating-point type or a user defined type satisfying these conditions:
-// * It must be assignable (have operator=() defined).
-// * It must have operator+() (operator+(int-compatible type) for
-// two-operand version).
-// * It must have operator<() defined.
-// Elements in the resulting sequences will also have that type.
-// * Condition start < end must be satisfied in order for resulting sequences
-// to contain any elements.
-//
-template <typename T, typename IncrementT>
-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
- return internal::ParamGenerator<T>(
- new internal::RangeGenerator<T, IncrementT>(start, end, step));
-}
-
-template <typename T>
-internal::ParamGenerator<T> Range(T start, T end) {
- return Range(start, end, 1);
-}
-
-// ValuesIn() function allows generation of tests with parameters coming from
-// a container.
-//
-// Synopsis:
-// ValuesIn(const T (&array)[N])
-// - returns a generator producing sequences with elements from
-// a C-style array.
-// ValuesIn(const Container& container)
-// - returns a generator producing sequences with elements from
-// an STL-style container.
-// ValuesIn(Iterator begin, Iterator end)
-// - returns a generator producing sequences with elements from
-// a range [begin, end) defined by a pair of STL-style iterators. These
-// iterators can also be plain C pointers.
-//
-// Please note that ValuesIn copies the values from the containers
-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
-//
-// Examples:
-//
-// This instantiates tests from test case StringTest
-// each with C-string values of "foo", "bar", and "baz":
-//
-// const char* strings[] = {"foo", "bar", "baz"};
-// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
-//
-// This instantiates tests from test case StlStringTest
-// each with STL strings with values "a" and "b":
-//
-// ::std::vector< ::std::string> GetParameterStrings() {
-// ::std::vector< ::std::string> v;
-// v.push_back("a");
-// v.push_back("b");
-// return v;
-// }
-//
-// INSTANTIATE_TEST_CASE_P(CharSequence,
-// StlStringTest,
-// ValuesIn(GetParameterStrings()));
-//
-//
-// This will also instantiate tests from CharTest
-// each with parameter values 'a' and 'b':
-//
-// ::std::list<char> GetParameterChars() {
-// ::std::list<char> list;
-// list.push_back('a');
-// list.push_back('b');
-// return list;
-// }
-// ::std::list<char> l = GetParameterChars();
-// INSTANTIATE_TEST_CASE_P(CharSequence2,
-// CharTest,
-// ValuesIn(l.begin(), l.end()));
-//
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end) {
- typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
- ::value_type ParamType;
- return internal::ParamGenerator<ParamType>(
- new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
-}
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
- return ValuesIn(array, array + N);
-}
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container) {
- return ValuesIn(container.begin(), container.end());
-}
-
-// Values() allows generating tests from explicitly specified list of
-// parameters.
-//
-// Synopsis:
-// Values(T v1, T v2, ..., T vN)
-// - returns a generator producing sequences with elements v1, v2, ..., vN.
-//
-// For example, this instantiates tests from test case BarTest each
-// with values "one", "two", and "three":
-//
-// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
-//
-// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
-// The exact type of values will depend on the type of parameter in BazTest.
-//
-// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
-//
-// Currently, Values() supports from 1 to $n parameters.
-//
-$range i 1..n
-$for i [[
-$range j 1..i
-
-template <$for j, [[typename T$j]]>
-internal::ValueArray$i<$for j, [[T$j]]> Values($for j, [[T$j v$j]]) {
- return internal::ValueArray$i<$for j, [[T$j]]>($for j, [[v$j]]);
-}
-
-]]
-
-// Bool() allows generating tests with parameters in a set of (false, true).
-//
-// Synopsis:
-// Bool()
-// - returns a generator producing sequences with elements {false, true}.
-//
-// It is useful when testing code that depends on Boolean flags. Combinations
-// of multiple flags can be tested when several Bool()'s are combined using
-// Combine() function.
-//
-// In the following example all tests in the test case FlagDependentTest
-// will be instantiated twice with parameters false and true.
-//
-// class FlagDependentTest : public testing::TestWithParam<bool> {
-// virtual void SetUp() {
-// external_flag = GetParam();
-// }
-// }
-// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
-//
-inline internal::ParamGenerator<bool> Bool() {
- return Values(false, true);
-}
-
-# if GTEST_HAS_COMBINE
-// Combine() allows the user to combine two or more sequences to produce
-// values of a Cartesian product of those sequences' elements.
-//
-// Synopsis:
-// Combine(gen1, gen2, ..., genN)
-// - returns a generator producing sequences with elements coming from
-// the Cartesian product of elements from the sequences generated by
-// gen1, gen2, ..., genN. The sequence elements will have a type of
-// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
-// of elements from sequences produces by gen1, gen2, ..., genN.
-//
-// Combine can have up to $maxtuple arguments. This number is currently limited
-// by the maximum number of elements in the tuple implementation used by Google
-// Test.
-//
-// Example:
-//
-// This will instantiate tests in test case AnimalTest each one with
-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
-// tuple("dog", BLACK), and tuple("dog", WHITE):
-//
-// enum Color { BLACK, GRAY, WHITE };
-// class AnimalTest
-// : public testing::TestWithParam<tuple<const char*, Color> > {...};
-//
-// TEST_P(AnimalTest, AnimalLooksNice) {...}
-//
-// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
-// Combine(Values("cat", "dog"),
-// Values(BLACK, WHITE)));
-//
-// This will instantiate tests in FlagDependentTest with all variations of two
-// Boolean flags:
-//
-// class FlagDependentTest
-// : public testing::TestWithParam<tuple(bool, bool)> > {
-// virtual void SetUp() {
-// // Assigns external_flag_1 and external_flag_2 values from the tuple.
-// tie(external_flag_1, external_flag_2) = GetParam();
-// }
-// };
-//
-// TEST_P(FlagDependentTest, TestFeature1) {
-// // Test your code using external_flag_1 and external_flag_2 here.
-// }
-// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
-// Combine(Bool(), Bool()));
-//
-$range i 2..maxtuple
-$for i [[
-$range j 1..i
-
-template <$for j, [[typename Generator$j]]>
-internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
- $for j, [[const Generator$j& g$j]]) {
- return internal::CartesianProductHolder$i<$for j, [[Generator$j]]>(
- $for j, [[g$j]]);
-}
-
-]]
-# endif // GTEST_HAS_COMBINE
-
-
-
-# define TEST_P(test_case_name, test_name) \
- class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- : public test_case_name { \
- public: \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
- virtual void TestBody(); \
- private: \
- static int AddToRegistry() { \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
- #test_case_name, \
- #test_name, \
- new ::testing::internal::TestMetaFactory< \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
- return 0; \
- } \
- static int gtest_registering_dummy_; \
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
- }; \
- int GTEST_TEST_CLASS_NAME_(test_case_name, \
- test_name)::gtest_registering_dummy_ = \
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
- void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
- ::testing::internal::ParamGenerator<test_case_name::ParamType> \
- gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
- int gtest_##prefix##test_case_name##_dummy_ = \
- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
- GetTestCasePatternHolder<test_case_name>(\
- #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
- #prefix, \
- &gtest_##prefix##test_case_name##_EvalGenerator_, \
- __FILE__, __LINE__)
-
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-printers.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-printers.h
deleted file mode 100644
index 9cbab3ff4..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-printers.h
+++ /dev/null
@@ -1,796 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// A user can teach this function how to print a class type T by
-// defining either operator<<() or PrintTo() in the namespace that
-// defines T. More specifically, the FIRST defined function in the
-// following list will be used (assuming T is defined in namespace
-// foo):
-//
-// 1. foo::PrintTo(const T&, ostream*)
-// 2. operator<<(ostream&, const T&) defined in either foo or the
-// global namespace.
-//
-// If none of the above is defined, it will print the debug string of
-// the value if it is a protocol buffer, or print the raw bytes in the
-// value otherwise.
-//
-// To aid debugging: when T is a reference type, the address of the
-// value is also printed; when T is a (const) char pointer, both the
-// pointer value and the NUL-terminated string it points to are
-// printed.
-//
-// We also provide some convenient wrappers:
-//
-// // Prints a value to a string. For a (const or not) char
-// // pointer, the NUL-terminated string (but not the pointer) is
-// // printed.
-// std::string ::testing::PrintToString(const T& value);
-//
-// // Prints a value tersely: for a reference type, the referenced
-// // value (but not the address) is printed; for a (const or not) char
-// // pointer, the NUL-terminated string (but not the pointer) is
-// // printed.
-// void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
-//
-// // Prints value using the type inferred by the compiler. The difference
-// // from UniversalTersePrint() is that this function prints both the
-// // pointer and the NUL-terminated string for a (const or not) char pointer.
-// void ::testing::internal::UniversalPrint(const T& value, ostream*);
-//
-// // Prints the fields of a tuple tersely to a string vector, one
-// // element for each field. Tuple support must be enabled in
-// // gtest-port.h.
-// std::vector<string> UniversalTersePrintTupleFieldsToStrings(
-// const Tuple& value);
-//
-// Known limitation:
-//
-// The print primitives print the elements of an STL-style container
-// using the compiler-inferred type of *iter where iter is a
-// const_iterator of the container. When const_iterator is an input
-// iterator but not a forward iterator, this inferred type may not
-// match value_type, and the print output may be incorrect. In
-// practice, this is rarely a problem as for most containers
-// const_iterator is a forward iterator. We'll fix this if there's an
-// actual need for it. Note that this fix cannot rely on value_type
-// being defined as many user-defined container types don't have
-// value_type.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-#include "gtest/internal/gtest-port.h"
-#include "gtest/internal/gtest-internal.h"
-
-namespace testing {
-
-// Definitions in the 'internal' and 'internal2' name spaces are
-// subject to change without notice. DO NOT USE THEM IN USER CODE!
-namespace internal2 {
-
-// Prints the given number of bytes in the given object to the given
-// ostream.
-GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
- size_t count,
- ::std::ostream* os);
-
-// For selecting which printer to use when a given type has neither <<
-// nor PrintTo().
-enum TypeKind {
- kProtobuf, // a protobuf type
- kConvertibleToInteger, // a type implicitly convertible to BiggestInt
- // (e.g. a named or unnamed enum type)
- kOtherType // anything else
-};
-
-// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
-// by the universal printer to print a value of type T when neither
-// operator<< nor PrintTo() is defined for T, where kTypeKind is the
-// "kind" of T as defined by enum TypeKind.
-template <typename T, TypeKind kTypeKind>
-class TypeWithoutFormatter {
- public:
- // This default version is called when kTypeKind is kOtherType.
- static void PrintValue(const T& value, ::std::ostream* os) {
- PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),
- sizeof(value), os);
- }
-};
-
-// We print a protobuf using its ShortDebugString() when the string
-// doesn't exceed this many characters; otherwise we print it using
-// DebugString() for better readability.
-const size_t kProtobufOneLinerMaxLength = 50;
-
-template <typename T>
-class TypeWithoutFormatter<T, kProtobuf> {
- public:
- static void PrintValue(const T& value, ::std::ostream* os) {
- const ::testing::internal::string short_str = value.ShortDebugString();
- const ::testing::internal::string pretty_str =
- short_str.length() <= kProtobufOneLinerMaxLength ?
- short_str : ("\n" + value.DebugString());
- *os << ("<" + pretty_str + ">");
- }
-};
-
-template <typename T>
-class TypeWithoutFormatter<T, kConvertibleToInteger> {
- public:
- // Since T has no << operator or PrintTo() but can be implicitly
- // converted to BiggestInt, we print it as a BiggestInt.
- //
- // Most likely T is an enum type (either named or unnamed), in which
- // case printing it as an integer is the desired behavior. In case
- // T is not an enum, printing it as an integer is the best we can do
- // given that it has no user-defined printer.
- static void PrintValue(const T& value, ::std::ostream* os) {
- const internal::BiggestInt kBigInt = value;
- *os << kBigInt;
- }
-};
-
-// Prints the given value to the given ostream. If the value is a
-// protocol message, its debug string is printed; if it's an enum or
-// of a type implicitly convertible to BiggestInt, it's printed as an
-// integer; otherwise the bytes in the value are printed. This is
-// what UniversalPrinter<T>::Print() does when it knows nothing about
-// type T and T has neither << operator nor PrintTo().
-//
-// A user can override this behavior for a class type Foo by defining
-// a << operator in the namespace where Foo is defined.
-//
-// We put this operator in namespace 'internal2' instead of 'internal'
-// to simplify the implementation, as much code in 'internal' needs to
-// use << in STL, which would conflict with our own << were it defined
-// in 'internal'.
-//
-// Note that this operator<< takes a generic std::basic_ostream<Char,
-// CharTraits> type instead of the more restricted std::ostream. If
-// we define it to take an std::ostream instead, we'll get an
-// "ambiguous overloads" compiler error when trying to print a type
-// Foo that supports streaming to std::basic_ostream<Char,
-// CharTraits>, as the compiler cannot tell whether
-// operator<<(std::ostream&, const T&) or
-// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
-// specific.
-template <typename Char, typename CharTraits, typename T>
-::std::basic_ostream<Char, CharTraits>& operator<<(
- ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
- TypeWithoutFormatter<T,
- (internal::IsAProtocolMessage<T>::value ? kProtobuf :
- internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?
- kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);
- return os;
-}
-
-} // namespace internal2
-} // namespace testing
-
-// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
-// magic needed for implementing UniversalPrinter won't work.
-namespace testing_internal {
-
-// Used to print a value that is not an STL-style container when the
-// user doesn't define PrintTo() for it.
-template <typename T>
-void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
- // With the following statement, during unqualified name lookup,
- // testing::internal2::operator<< appears as if it was declared in
- // the nearest enclosing namespace that contains both
- // ::testing_internal and ::testing::internal2, i.e. the global
- // namespace. For more details, refer to the C++ Standard section
- // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
- // testing::internal2::operator<< in case T doesn't come with a <<
- // operator.
- //
- // We cannot write 'using ::testing::internal2::operator<<;', which
- // gcc 3.3 fails to compile due to a compiler bug.
- using namespace ::testing::internal2; // NOLINT
-
- // Assuming T is defined in namespace foo, in the next statement,
- // the compiler will consider all of:
- //
- // 1. foo::operator<< (thanks to Koenig look-up),
- // 2. ::operator<< (as the current namespace is enclosed in ::),
- // 3. testing::internal2::operator<< (thanks to the using statement above).
- //
- // The operator<< whose type matches T best will be picked.
- //
- // We deliberately allow #2 to be a candidate, as sometimes it's
- // impossible to define #1 (e.g. when foo is ::std, defining
- // anything in it is undefined behavior unless you are a compiler
- // vendor.).
- *os << value;
-}
-
-} // namespace testing_internal
-
-namespace testing {
-namespace internal {
-
-// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
-// value to the given ostream. The caller must ensure that
-// 'ostream_ptr' is not NULL, or the behavior is undefined.
-//
-// We define UniversalPrinter as a class template (as opposed to a
-// function template), as we need to partially specialize it for
-// reference types, which cannot be done with function templates.
-template <typename T>
-class UniversalPrinter;
-
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os);
-
-// Used to print an STL-style container when the user doesn't define
-// a PrintTo() for it.
-template <typename C>
-void DefaultPrintTo(IsContainer /* dummy */,
- false_type /* is not a pointer */,
- const C& container, ::std::ostream* os) {
- const size_t kMaxCount = 32; // The maximum number of elements to print.
- *os << '{';
- size_t count = 0;
- for (typename C::const_iterator it = container.begin();
- it != container.end(); ++it, ++count) {
- if (count > 0) {
- *os << ',';
- if (count == kMaxCount) { // Enough has been printed.
- *os << " ...";
- break;
- }
- }
- *os << ' ';
- // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
- // handle *it being a native array.
- internal::UniversalPrint(*it, os);
- }
-
- if (count > 0) {
- *os << ' ';
- }
- *os << '}';
-}
-
-// Used to print a pointer that is neither a char pointer nor a member
-// pointer, when the user doesn't define PrintTo() for it. (A member
-// variable pointer or member function pointer doesn't really point to
-// a location in the address space. Their representation is
-// implementation-defined. Therefore they will be printed as raw
-// bytes.)
-template <typename T>
-void DefaultPrintTo(IsNotContainer /* dummy */,
- true_type /* is a pointer */,
- T* p, ::std::ostream* os) {
- if (p == NULL) {
- *os << "NULL";
- } else {
- // C++ doesn't allow casting from a function pointer to any object
- // pointer.
- //
- // IsTrue() silences warnings: "Condition is always true",
- // "unreachable code".
- if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
- // T is not a function type. We just call << to print p,
- // relying on ADL to pick up user-defined << for their pointer
- // types, if any.
- *os << p;
- } else {
- // T is a function type, so '*os << p' doesn't do what we want
- // (it just prints p as bool). We want to print p as a const
- // void*. However, we cannot cast it to const void* directly,
- // even using reinterpret_cast, as earlier versions of gcc
- // (e.g. 3.4.5) cannot compile the cast when p is a function
- // pointer. Casting to UInt64 first solves the problem.
- *os << reinterpret_cast<const void*>(
- reinterpret_cast<internal::UInt64>(p));
- }
- }
-}
-
-// Used to print a non-container, non-pointer value when the user
-// doesn't define PrintTo() for it.
-template <typename T>
-void DefaultPrintTo(IsNotContainer /* dummy */,
- false_type /* is not a pointer */,
- const T& value, ::std::ostream* os) {
- ::testing_internal::DefaultPrintNonContainerTo(value, os);
-}
-
-// Prints the given value using the << operator if it has one;
-// otherwise prints the bytes in it. This is what
-// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
-// or overloaded for type T.
-//
-// A user can override this behavior for a class type Foo by defining
-// an overload of PrintTo() in the namespace where Foo is defined. We
-// give the user this option as sometimes defining a << operator for
-// Foo is not desirable (e.g. the coding style may prevent doing it,
-// or there is already a << operator but it doesn't do what the user
-// wants).
-template <typename T>
-void PrintTo(const T& value, ::std::ostream* os) {
- // DefaultPrintTo() is overloaded. The type of its first two
- // arguments determine which version will be picked. If T is an
- // STL-style container, the version for container will be called; if
- // T is a pointer, the pointer version will be called; otherwise the
- // generic version will be called.
- //
- // Note that we check for container types here, prior to we check
- // for protocol message types in our operator<<. The rationale is:
- //
- // For protocol messages, we want to give people a chance to
- // override Google Mock's format by defining a PrintTo() or
- // operator<<. For STL containers, other formats can be
- // incompatible with Google Mock's format for the container
- // elements; therefore we check for container types here to ensure
- // that our format is used.
- //
- // The second argument of DefaultPrintTo() is needed to bypass a bug
- // in Symbian's C++ compiler that prevents it from picking the right
- // overload between:
- //
- // PrintTo(const T& x, ...);
- // PrintTo(T* x, ...);
- DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
-}
-
-// The following list of PrintTo() overloads tells
-// UniversalPrinter<T>::Print() how to print standard types (built-in
-// types, strings, plain arrays, and pointers).
-
-// Overloads for various char types.
-GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
-GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
-inline void PrintTo(char c, ::std::ostream* os) {
- // When printing a plain char, we always treat it as unsigned. This
- // way, the output won't be affected by whether the compiler thinks
- // char is signed or not.
- PrintTo(static_cast<unsigned char>(c), os);
-}
-
-// Overloads for other simple built-in types.
-inline void PrintTo(bool x, ::std::ostream* os) {
- *os << (x ? "true" : "false");
-}
-
-// Overload for wchar_t type.
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its decimal code (except for L'\0').
-// The L'\0' char is printed as "L'\\0'". The decimal code is printed
-// as signed integer when wchar_t is implemented by the compiler
-// as a signed type and is printed as an unsigned integer when wchar_t
-// is implemented as an unsigned type.
-GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
-
-// Overloads for C strings.
-GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
-inline void PrintTo(char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const char*>(s), os);
-}
-
-// signed/unsigned char is often used for representing binary data, so
-// we print pointers to it as void* to be safe.
-inline void PrintTo(const signed char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(signed char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(unsigned char* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const void*>(s), os);
-}
-
-// MSVC can be configured to define wchar_t as a typedef of unsigned
-// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
-// type. When wchar_t is a typedef, defining an overload for const
-// wchar_t* would cause unsigned short* be printed as a wide string,
-// possibly causing invalid memory accesses.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Overloads for wide C strings
-GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
-inline void PrintTo(wchar_t* s, ::std::ostream* os) {
- PrintTo(ImplicitCast_<const wchar_t*>(s), os);
-}
-#endif
-
-// Overload for C arrays. Multi-dimensional arrays are printed
-// properly.
-
-// Prints the given number of elements in an array, without printing
-// the curly braces.
-template <typename T>
-void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
- UniversalPrint(a[0], os);
- for (size_t i = 1; i != count; i++) {
- *os << ", ";
- UniversalPrint(a[i], os);
- }
-}
-
-// Overloads for ::string and ::std::string.
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);
-inline void PrintTo(const ::string& s, ::std::ostream* os) {
- PrintStringTo(s, os);
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
-inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
- PrintStringTo(s, os);
-}
-
-// Overloads for ::wstring and ::std::wstring.
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::wstring& s, ::std::ostream* os) {
- PrintWideStringTo(s, os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
- PrintWideStringTo(s, os);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_TR1_TUPLE
-// Overload for ::std::tr1::tuple. Needed for printing function arguments,
-// which are packed as tuples.
-
-// Helper function for printing a tuple. T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T& t, ::std::ostream* os);
-
-// Overloaded PrintTo() for tuples of various arities. We support
-// tuples of up-to 10 fields. The following implementation works
-// regardless of whether tr1::tuple is implemented using the
-// non-standard variadic template feature or not.
-
-inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1>
-void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2>
-void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-void PrintTo(
- const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
- ::std::ostream* os) {
- PrintTupleTo(t, os);
-}
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Overload for std::pair.
-template <typename T1, typename T2>
-void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
- *os << '(';
- // We cannot use UniversalPrint(value.first, os) here, as T1 may be
- // a reference type. The same for printing value.second.
- UniversalPrinter<T1>::Print(value.first, os);
- *os << ", ";
- UniversalPrinter<T2>::Print(value.second, os);
- *os << ')';
-}
-
-// Implements printing a non-reference type T by letting the compiler
-// pick the right overload of PrintTo() for T.
-template <typename T>
-class UniversalPrinter {
- public:
- // MSVC warns about adding const to a function type, so we want to
- // disable the warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4180) // Temporarily disables warning 4180.
-#endif // _MSC_VER
-
- // Note: we deliberately don't call this PrintTo(), as that name
- // conflicts with ::testing::internal::PrintTo in the body of the
- // function.
- static void Print(const T& value, ::std::ostream* os) {
- // By default, ::testing::internal::PrintTo() is used for printing
- // the value.
- //
- // Thanks to Koenig look-up, if T is a class and has its own
- // PrintTo() function defined in its namespace, that function will
- // be visible here. Since it is more specific than the generic ones
- // in ::testing::internal, it will be picked by the compiler in the
- // following statement - exactly what we want.
- PrintTo(value, os);
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSC_VER
-};
-
-// UniversalPrintArray(begin, len, os) prints an array of 'len'
-// elements, starting at address 'begin'.
-template <typename T>
-void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
- if (len == 0) {
- *os << "{}";
- } else {
- *os << "{ ";
- const size_t kThreshold = 18;
- const size_t kChunkSize = 8;
- // If the array has more than kThreshold elements, we'll have to
- // omit some details by printing only the first and the last
- // kChunkSize elements.
- // TODO(wan@google.com): let the user control the threshold using a flag.
- if (len <= kThreshold) {
- PrintRawArrayTo(begin, len, os);
- } else {
- PrintRawArrayTo(begin, kChunkSize, os);
- *os << ", ..., ";
- PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
- }
- *os << " }";
- }
-}
-// This overload prints a (const) char array compactly.
-GTEST_API_ void UniversalPrintArray(const char* begin,
- size_t len,
- ::std::ostream* os);
-
-// Implements printing an array type T[N].
-template <typename T, size_t N>
-class UniversalPrinter<T[N]> {
- public:
- // Prints the given array, omitting some elements when there are too
- // many.
- static void Print(const T (&a)[N], ::std::ostream* os) {
- UniversalPrintArray(a, N, os);
- }
-};
-
-// Implements printing a reference type T&.
-template <typename T>
-class UniversalPrinter<T&> {
- public:
- // MSVC warns about adding const to a function type, so we want to
- // disable the warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4180) // Temporarily disables warning 4180.
-#endif // _MSC_VER
-
- static void Print(const T& value, ::std::ostream* os) {
- // Prints the address of the value. We use reinterpret_cast here
- // as static_cast doesn't compile when T is a function type.
- *os << "@" << reinterpret_cast<const void*>(&value) << " ";
-
- // Then prints the value itself.
- UniversalPrint(value, os);
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSC_VER
-};
-
-// Prints a value tersely: for a reference type, the referenced value
-// (but not the address) is printed; for a (const) char pointer, the
-// NUL-terminated string (but not the pointer) is printed.
-template <typename T>
-void UniversalTersePrint(const T& value, ::std::ostream* os) {
- UniversalPrint(value, os);
-}
-inline void UniversalTersePrint(const char* str, ::std::ostream* os) {
- if (str == NULL) {
- *os << "NULL";
- } else {
- UniversalPrint(string(str), os);
- }
-}
-inline void UniversalTersePrint(char* str, ::std::ostream* os) {
- UniversalTersePrint(static_cast<const char*>(str), os);
-}
-
-// Prints a value using the type inferred by the compiler. The
-// difference between this and UniversalTersePrint() is that for a
-// (const) char pointer, this prints both the pointer and the
-// NUL-terminated string.
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os) {
- UniversalPrinter<T>::Print(value, os);
-}
-
-#if GTEST_HAS_TR1_TUPLE
-typedef ::std::vector<string> Strings;
-
-// This helper template allows PrintTo() for tuples and
-// UniversalTersePrintTupleFieldsToStrings() to be defined by
-// induction on the number of tuple fields. The idea is that
-// TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N
-// fields in tuple t, and can be defined in terms of
-// TuplePrefixPrinter<N - 1>.
-
-// The inductive case.
-template <size_t N>
-struct TuplePrefixPrinter {
- // Prints the first N fields of a tuple.
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
- TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os);
- *os << ", ";
- UniversalPrinter<typename ::std::tr1::tuple_element<N - 1, Tuple>::type>
- ::Print(::std::tr1::get<N - 1>(t), os);
- }
-
- // Tersely prints the first N fields of a tuple to a string vector,
- // one element for each field.
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
- TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings);
- ::std::stringstream ss;
- UniversalTersePrint(::std::tr1::get<N - 1>(t), &ss);
- strings->push_back(ss.str());
- }
-};
-
-// Base cases.
-template <>
-struct TuplePrefixPrinter<0> {
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}
-
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}
-};
-// We have to specialize the entire TuplePrefixPrinter<> class
-// template here, even though the definition of
-// TersePrintPrefixToStrings() is the same as the generic version, as
-// Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't
-// support specializing a method template of a class template.
-template <>
-struct TuplePrefixPrinter<1> {
- template <typename Tuple>
- static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
- UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>::
- Print(::std::tr1::get<0>(t), os);
- }
-
- template <typename Tuple>
- static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
- ::std::stringstream ss;
- UniversalTersePrint(::std::tr1::get<0>(t), &ss);
- strings->push_back(ss.str());
- }
-};
-
-// Helper function for printing a tuple. T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T& t, ::std::ostream* os) {
- *os << "(";
- TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>::
- PrintPrefixTo(t, os);
- *os << ")";
-}
-
-// Prints the fields of a tuple tersely to a string vector, one
-// element for each field. See the comment before
-// UniversalTersePrint() for how we define "tersely".
-template <typename Tuple>
-Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
- Strings result;
- TuplePrefixPrinter< ::std::tr1::tuple_size<Tuple>::value>::
- TersePrintPrefixToStrings(value, &result);
- return result;
-}
-#endif // GTEST_HAS_TR1_TUPLE
-
-} // namespace internal
-
-template <typename T>
-::std::string PrintToString(const T& value) {
- ::std::stringstream ss;
- internal::UniversalTersePrint(value, &ss);
- return ss.str();
-}
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-spi.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-spi.h
deleted file mode 100644
index b226e5504..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-spi.h
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Utilities for testing Google Test itself and code that uses Google Test
-// (e.g. frameworks built on top of Google Test).
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_
-
-#include "gtest/gtest.h"
-
-namespace testing {
-
-// This helper class can be used to mock out Google Test failure reporting
-// so that we can test Google Test or code that builds on Google Test.
-//
-// An object of this class appends a TestPartResult object to the
-// TestPartResultArray object given in the constructor whenever a Google Test
-// failure is reported. It can either intercept only failures that are
-// generated in the same thread that created this object or it can intercept
-// all generated failures. The scope of this mock object can be controlled with
-// the second argument to the two arguments constructor.
-class GTEST_API_ ScopedFakeTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- // The two possible mocking modes of this object.
- enum InterceptMode {
- INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures.
- INTERCEPT_ALL_THREADS // Intercepts all failures.
- };
-
- // The c'tor sets this object as the test part result reporter used
- // by Google Test. The 'result' parameter specifies where to report the
- // results. This reporter will only catch failures generated in the current
- // thread. DEPRECATED
- explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);
-
- // Same as above, but you can choose the interception scope of this object.
- ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,
- TestPartResultArray* result);
-
- // The d'tor restores the previous test part result reporter.
- virtual ~ScopedFakeTestPartResultReporter();
-
- // Appends the TestPartResult object to the TestPartResultArray
- // received in the constructor.
- //
- // This method is from the TestPartResultReporterInterface
- // interface.
- virtual void ReportTestPartResult(const TestPartResult& result);
- private:
- void Init();
-
- const InterceptMode intercept_mode_;
- TestPartResultReporterInterface* old_reporter_;
- TestPartResultArray* const result_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter);
-};
-
-namespace internal {
-
-// A helper class for implementing EXPECT_FATAL_FAILURE() and
-// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring. If that's not the case, a
-// non-fatal failure will be generated.
-class GTEST_API_ SingleFailureChecker {
- public:
- // The constructor remembers the arguments.
- SingleFailureChecker(const TestPartResultArray* results,
- TestPartResult::Type type,
- const string& substr);
- ~SingleFailureChecker();
- private:
- const TestPartResultArray* const results_;
- const TestPartResult::Type type_;
- const string substr_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-// A set of macros for testing Google Test assertions or code that's expected
-// to generate Google Test fatal failures. It verifies that the given
-// statement will cause exactly one fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_FATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-// - 'statement' cannot reference local non-static variables or
-// non-static members of the current object.
-// - 'statement' cannot return a value.
-// - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works. The AcceptsMacroThatExpandsToUnprotectedComma test in
-// gtest_unittest.cc will fail to compile if we do that.
-#define EXPECT_FATAL_FAILURE(statement, substr) \
- do { \
- class GTestExpectFatalFailureHelper {\
- public:\
- static void Execute() { statement; }\
- };\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
- GTestExpectFatalFailureHelper::Execute();\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
- do { \
- class GTestExpectFatalFailureHelper {\
- public:\
- static void Execute() { statement; }\
- };\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ALL_THREADS, &gtest_failures);\
- GTestExpectFatalFailureHelper::Execute();\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-// A macro for testing Google Test assertions or code that's expected to
-// generate Google Test non-fatal failures. It asserts that the given
-// statement will cause exactly one non-fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// 'statement' is allowed to reference local variables and members of
-// the current object.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-// - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works. If we do that, the code won't compile when the user gives
-// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that
-// expands to code containing an unprotected comma. The
-// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc
-// catches that.
-//
-// For the same reason, we have to write
-// if (::testing::internal::AlwaysTrue()) { statement; }
-// instead of
-// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-// to avoid an MSVC warning on unreachable code.
-#define EXPECT_NONFATAL_FAILURE(statement, substr) \
- do {\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
- (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter:: \
- INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
- if (::testing::internal::AlwaysTrue()) { statement; }\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
- do {\
- ::testing::TestPartResultArray gtest_failures;\
- ::testing::internal::SingleFailureChecker gtest_checker(\
- &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
- (substr));\
- {\
- ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
- ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS,\
- &gtest_failures);\
- if (::testing::internal::AlwaysTrue()) { statement; }\
- }\
- } while (::testing::internal::AlwaysFalse())
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-test-part.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-test-part.h
deleted file mode 100644
index 8aeea1498..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-test-part.h
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-
-#include <iosfwd>
-#include <vector>
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-string.h"
-
-namespace testing {
-
-// A copyable object representing the result of a test part (i.e. an
-// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
-//
-// Don't inherit from TestPartResult as its destructor is not virtual.
-class GTEST_API_ TestPartResult {
- public:
- // The possible outcomes of a test part (i.e. an assertion or an
- // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
- enum Type {
- kSuccess, // Succeeded.
- kNonFatalFailure, // Failed but the test can continue.
- kFatalFailure // Failed and the test should be terminated.
- };
-
- // C'tor. TestPartResult does NOT have a default constructor.
- // Always use this constructor (with parameters) to create a
- // TestPartResult object.
- TestPartResult(Type a_type,
- const char* a_file_name,
- int a_line_number,
- const char* a_message)
- : type_(a_type),
- file_name_(a_file_name),
- line_number_(a_line_number),
- summary_(ExtractSummary(a_message)),
- message_(a_message) {
- }
-
- // Gets the outcome of the test part.
- Type type() const { return type_; }
-
- // Gets the name of the source file where the test part took place, or
- // NULL if it's unknown.
- const char* file_name() const { return file_name_.c_str(); }
-
- // Gets the line in the source file where the test part took place,
- // or -1 if it's unknown.
- int line_number() const { return line_number_; }
-
- // Gets the summary of the failure message.
- const char* summary() const { return summary_.c_str(); }
-
- // Gets the message associated with the test part.
- const char* message() const { return message_.c_str(); }
-
- // Returns true iff the test part passed.
- bool passed() const { return type_ == kSuccess; }
-
- // Returns true iff the test part failed.
- bool failed() const { return type_ != kSuccess; }
-
- // Returns true iff the test part non-fatally failed.
- bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
-
- // Returns true iff the test part fatally failed.
- bool fatally_failed() const { return type_ == kFatalFailure; }
- private:
- Type type_;
-
- // Gets the summary of the failure message by omitting the stack
- // trace in it.
- static internal::String ExtractSummary(const char* message);
-
- // The name of the source file where the test part took place, or
- // NULL if the source file is unknown.
- internal::String file_name_;
- // The line in the source file where the test part took place, or -1
- // if the line number is unknown.
- int line_number_;
- internal::String summary_; // The test failure summary.
- internal::String message_; // The test failure message.
-};
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result);
-
-// An array of TestPartResult objects.
-//
-// Don't inherit from TestPartResultArray as its destructor is not
-// virtual.
-class GTEST_API_ TestPartResultArray {
- public:
- TestPartResultArray() {}
-
- // Appends the given TestPartResult to the array.
- void Append(const TestPartResult& result);
-
- // Returns the TestPartResult at the given index (0-based).
- const TestPartResult& GetTestPartResult(int index) const;
-
- // Returns the number of TestPartResult objects in the array.
- int size() const;
-
- private:
- std::vector<TestPartResult> array_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);
-};
-
-// This interface knows how to report a test part result.
-class TestPartResultReporterInterface {
- public:
- virtual ~TestPartResultReporterInterface() {}
-
- virtual void ReportTestPartResult(const TestPartResult& result) = 0;
-};
-
-namespace internal {
-
-// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
-// statement generates new fatal failures. To do so it registers itself as the
-// current test part result reporter. Besides checking if fatal failures were
-// reported, it only delegates the reporting to the former result reporter.
-// The original result reporter is restored in the destructor.
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-class GTEST_API_ HasNewFatalFailureHelper
- : public TestPartResultReporterInterface {
- public:
- HasNewFatalFailureHelper();
- virtual ~HasNewFatalFailureHelper();
- virtual void ReportTestPartResult(const TestPartResult& result);
- bool has_new_fatal_failure() const { return has_new_fatal_failure_; }
- private:
- bool has_new_fatal_failure_;
- TestPartResultReporterInterface* original_reporter_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-typed-test.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-typed-test.h
deleted file mode 100644
index fe1e83b27..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest-typed-test.h
+++ /dev/null
@@ -1,259 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-
-// This header implements typed tests and type-parameterized tests.
-
-// Typed (aka type-driven) tests repeat the same test for types in a
-// list. You must know which types you want to test with when writing
-// typed tests. Here's how you do it:
-
-#if 0
-
-// First, define a fixture class template. It should be parameterized
-// by a type. Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- public:
- ...
- typedef std::list<T> List;
- static T shared_;
- T value_;
-};
-
-// Next, associate a list of types with the test case, which will be
-// repeated for each type in the list. The typedef is necessary for
-// the macro to parse correctly.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-TYPED_TEST_CASE(FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-// TYPED_TEST_CASE(FooTest, int);
-
-// Then, use TYPED_TEST() instead of TEST_F() to define as many typed
-// tests for this test case as you want.
-TYPED_TEST(FooTest, DoesBlah) {
- // Inside a test, refer to TypeParam to get the type parameter.
- // Since we are inside a derived class template, C++ requires use to
- // visit the members of FooTest via 'this'.
- TypeParam n = this->value_;
-
- // To visit static members of the fixture, add the TestFixture::
- // prefix.
- n += TestFixture::shared_;
-
- // To refer to typedefs in the fixture, add the "typename
- // TestFixture::" prefix.
- typename TestFixture::List values;
- values.push_back(n);
- ...
-}
-
-TYPED_TEST(FooTest, HasPropertyA) { ... }
-
-#endif // 0
-
-// Type-parameterized tests are abstract test patterns parameterized
-// by a type. Compared with typed tests, type-parameterized tests
-// allow you to define the test pattern without knowing what the type
-// parameters are. The defined pattern can be instantiated with
-// different types any number of times, in any number of translation
-// units.
-//
-// If you are designing an interface or concept, you can define a
-// suite of type-parameterized tests to verify properties that any
-// valid implementation of the interface/concept should have. Then,
-// each implementation can easily instantiate the test suite to verify
-// that it conforms to the requirements, without having to write
-// similar tests repeatedly. Here's an example:
-
-#if 0
-
-// First, define a fixture class template. It should be parameterized
-// by a type. Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- ...
-};
-
-// Next, declare that you will define a type-parameterized test case
-// (the _P suffix is for "parameterized" or "pattern", whichever you
-// prefer):
-TYPED_TEST_CASE_P(FooTest);
-
-// Then, use TYPED_TEST_P() to define as many type-parameterized tests
-// for this type-parameterized test case as you want.
-TYPED_TEST_P(FooTest, DoesBlah) {
- // Inside a test, refer to TypeParam to get the type parameter.
- TypeParam n = 0;
- ...
-}
-
-TYPED_TEST_P(FooTest, HasPropertyA) { ... }
-
-// Now the tricky part: you need to register all test patterns before
-// you can instantiate them. The first argument of the macro is the
-// test case name; the rest are the names of the tests in this test
-// case.
-REGISTER_TYPED_TEST_CASE_P(FooTest,
- DoesBlah, HasPropertyA);
-
-// Finally, you are free to instantiate the pattern with the types you
-// want. If you put the above code in a header file, you can #include
-// it in multiple C++ source files and instantiate it multiple times.
-//
-// To distinguish different instances of the pattern, the first
-// argument to the INSTANTIATE_* macro is a prefix that will be added
-// to the actual test case name. Remember to pick unique prefixes for
-// different instances.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-// INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int);
-
-#endif // 0
-
-#include "gtest/internal/gtest-port.h"
-#include "gtest/internal/gtest-type-util.h"
-
-// Implements typed tests.
-
-#if GTEST_HAS_TYPED_TEST
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the typedef for the type parameters of the
-// given test case.
-# define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_
-
-// The 'Types' template argument below must have spaces around it
-// since some compilers may choke on '>>' when passing a template
-// instance (e.g. Types<int>)
-# define TYPED_TEST_CASE(CaseName, Types) \
- typedef ::testing::internal::TypeList< Types >::type \
- GTEST_TYPE_PARAMS_(CaseName)
-
-# define TYPED_TEST(CaseName, TestName) \
- template <typename gtest_TypeParam_> \
- class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
- : public CaseName<gtest_TypeParam_> { \
- private: \
- typedef CaseName<gtest_TypeParam_> TestFixture; \
- typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
- }; \
- bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
- ::testing::internal::TypeParameterizedTest< \
- CaseName, \
- ::testing::internal::TemplateSel< \
- GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
- GTEST_TYPE_PARAMS_(CaseName)>::Register(\
- "", #CaseName, #TestName, 0); \
- template <typename gtest_TypeParam_> \
- void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody()
-
-#endif // GTEST_HAS_TYPED_TEST
-
-// Implements type-parameterized tests.
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the namespace name that the type-parameterized tests for
-// the given type-parameterized test case are defined in. The exact
-// name of the namespace is subject to change without notice.
-# define GTEST_CASE_NAMESPACE_(TestCaseName) \
- gtest_case_##TestCaseName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the variable used to remember the names of
-// the defined tests in the given test case.
-# define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \
- gtest_typed_test_case_p_state_##TestCaseName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
-//
-// Expands to the name of the variable used to remember the names of
-// the registered tests in the given test case.
-# define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \
- gtest_registered_test_names_##TestCaseName##_
-
-// The variables defined in the type-parameterized test macros are
-// static as typically these macros are used in a .h file that can be
-// #included in multiple translation units linked together.
-# define TYPED_TEST_CASE_P(CaseName) \
- static ::testing::internal::TypedTestCasePState \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName)
-
-# define TYPED_TEST_P(CaseName, TestName) \
- namespace GTEST_CASE_NAMESPACE_(CaseName) { \
- template <typename gtest_TypeParam_> \
- class TestName : public CaseName<gtest_TypeParam_> { \
- private: \
- typedef CaseName<gtest_TypeParam_> TestFixture; \
- typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
- }; \
- static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\
- __FILE__, __LINE__, #CaseName, #TestName); \
- } \
- template <typename gtest_TypeParam_> \
- void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody()
-
-# define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \
- namespace GTEST_CASE_NAMESPACE_(CaseName) { \
- typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
- } \
- static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \
- GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
- __FILE__, __LINE__, #__VA_ARGS__)
-
-// The 'Types' template argument below must have spaces around it
-// since some compilers may choke on '>>' when passing a template
-// instance (e.g. Types<int>)
-# define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \
- bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \
- ::testing::internal::TypeParameterizedTestCase<CaseName, \
- GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \
- ::testing::internal::TypeList< Types >::type>::Register(\
- #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName))
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest.h
deleted file mode 100644
index cd01c7ba7..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest.h
+++ /dev/null
@@ -1,2155 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines the public API for Google Test. It should be
-// included by any test program that uses Google Test.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
-// program!
-//
-// Acknowledgment: Google Test borrowed the idea of automatic test
-// registration from Barthelemy Dagenais' (barthelemy@prologique.com)
-// easyUnit framework.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-#define GTEST_INCLUDE_GTEST_GTEST_H_
-
-#include <limits>
-#include <vector>
-
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-string.h"
-#include "gtest/gtest-death-test.h"
-#include "gtest/gtest-message.h"
-#include "gtest/gtest-param-test.h"
-#include "gtest/gtest-printers.h"
-#include "gtest/gtest_prod.h"
-#include "gtest/gtest-test-part.h"
-#include "gtest/gtest-typed-test.h"
-
-// Depending on the platform, different string classes are available.
-// On Linux, in addition to ::std::string, Google also makes use of
-// class ::string, which has the same interface as ::std::string, but
-// has a different implementation.
-//
-// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
-// ::string is available AND is a distinct type to ::std::string, or
-// define it to 0 to indicate otherwise.
-//
-// If the user's ::std::string and ::string are the same class due to
-// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.
-//
-// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined
-// heuristically.
-
-namespace testing {
-
-// Declares the flags.
-
-// This flag temporary enables the disabled tests.
-GTEST_DECLARE_bool_(also_run_disabled_tests);
-
-// This flag brings the debugger on an assertion failure.
-GTEST_DECLARE_bool_(break_on_failure);
-
-// This flag controls whether Google Test catches all test-thrown exceptions
-// and logs them as failures.
-GTEST_DECLARE_bool_(catch_exceptions);
-
-// This flag enables using colors in terminal output. Available values are
-// "yes" to enable colors, "no" (disable colors), or "auto" (the default)
-// to let Google Test decide.
-GTEST_DECLARE_string_(color);
-
-// This flag sets up the filter to select by name using a glob pattern
-// the tests to run. If the filter is not given all tests are executed.
-GTEST_DECLARE_string_(filter);
-
-// This flag causes the Google Test to list tests. None of the tests listed
-// are actually run if the flag is provided.
-GTEST_DECLARE_bool_(list_tests);
-
-// This flag controls whether Google Test emits a detailed XML report to a file
-// in addition to its normal textual output.
-GTEST_DECLARE_string_(output);
-
-// This flags control whether Google Test prints the elapsed time for each
-// test.
-GTEST_DECLARE_bool_(print_time);
-
-// This flag specifies the random number seed.
-GTEST_DECLARE_int32_(random_seed);
-
-// This flag sets how many times the tests are repeated. The default value
-// is 1. If the value is -1 the tests are repeating forever.
-GTEST_DECLARE_int32_(repeat);
-
-// This flag controls whether Google Test includes Google Test internal
-// stack frames in failure stack traces.
-GTEST_DECLARE_bool_(show_internal_stack_frames);
-
-// When this flag is specified, tests' order is randomized on every iteration.
-GTEST_DECLARE_bool_(shuffle);
-
-// This flag specifies the maximum number of stack frames to be
-// printed in a failure message.
-GTEST_DECLARE_int32_(stack_trace_depth);
-
-// When this flag is specified, a failed assertion will throw an
-// exception if exceptions are enabled, or exit the program with a
-// non-zero code otherwise.
-GTEST_DECLARE_bool_(throw_on_failure);
-
-// When this flag is set with a "host:port" string, on supported
-// platforms test results are streamed to the specified port on
-// the specified host machine.
-GTEST_DECLARE_string_(stream_result_to);
-
-// The upper limit for valid stack trace depths.
-const int kMaxStackTraceDepth = 100;
-
-namespace internal {
-
-class AssertHelper;
-class DefaultGlobalTestPartResultReporter;
-class ExecDeathTest;
-class NoExecDeathTest;
-class FinalSuccessChecker;
-class GTestFlagSaver;
-class TestResultAccessor;
-class TestEventListenersAccessor;
-class TestEventRepeater;
-class WindowsDeathTest;
-class UnitTestImpl* GetUnitTestImpl();
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
- const String& message);
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-// Declared in gtest-internal.h but defined here, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable) {
- return (Message() << streamable).GetString();
-}
-
-} // namespace internal
-
-// The friend relationship of some of these classes is cyclic.
-// If we don't forward declare them the compiler might confuse the classes
-// in friendship clauses with same named classes on the scope.
-class Test;
-class TestCase;
-class TestInfo;
-class UnitTest;
-
-// A class for indicating whether an assertion was successful. When
-// the assertion wasn't successful, the AssertionResult object
-// remembers a non-empty message that describes how it failed.
-//
-// To create an instance of this class, use one of the factory functions
-// (AssertionSuccess() and AssertionFailure()).
-//
-// This class is useful for two purposes:
-// 1. Defining predicate functions to be used with Boolean test assertions
-// EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
-// 2. Defining predicate-format functions to be
-// used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
-//
-// For example, if you define IsEven predicate:
-//
-// testing::AssertionResult IsEven(int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess();
-// else
-// return testing::AssertionFailure() << n << " is odd";
-// }
-//
-// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
-// will print the message
-//
-// Value of: IsEven(Fib(5))
-// Actual: false (5 is odd)
-// Expected: true
-//
-// instead of a more opaque
-//
-// Value of: IsEven(Fib(5))
-// Actual: false
-// Expected: true
-//
-// in case IsEven is a simple Boolean predicate.
-//
-// If you expect your predicate to be reused and want to support informative
-// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
-// about half as often as positive ones in our tests), supply messages for
-// both success and failure cases:
-//
-// testing::AssertionResult IsEven(int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess() << n << " is even";
-// else
-// return testing::AssertionFailure() << n << " is odd";
-// }
-//
-// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
-//
-// Value of: IsEven(Fib(6))
-// Actual: true (8 is even)
-// Expected: false
-//
-// NB: Predicates that support negative Boolean assertions have reduced
-// performance in positive ones so be careful not to use them in tests
-// that have lots (tens of thousands) of positive Boolean assertions.
-//
-// To use this class with EXPECT_PRED_FORMAT assertions such as:
-//
-// // Verifies that Foo() returns an even number.
-// EXPECT_PRED_FORMAT1(IsEven, Foo());
-//
-// you need to define:
-//
-// testing::AssertionResult IsEven(const char* expr, int n) {
-// if ((n % 2) == 0)
-// return testing::AssertionSuccess();
-// else
-// return testing::AssertionFailure()
-// << "Expected: " << expr << " is even\n Actual: it's " << n;
-// }
-//
-// If Foo() returns 5, you will see the following message:
-//
-// Expected: Foo() is even
-// Actual: it's 5
-//
-class GTEST_API_ AssertionResult {
- public:
- // Copy constructor.
- // Used in EXPECT_TRUE/FALSE(assertion_result).
- AssertionResult(const AssertionResult& other);
- // Used in the EXPECT_TRUE/FALSE(bool_expression).
- explicit AssertionResult(bool success) : success_(success) {}
-
- // Returns true iff the assertion succeeded.
- operator bool() const { return success_; } // NOLINT
-
- // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
- AssertionResult operator!() const;
-
- // Returns the text streamed into this AssertionResult. Test assertions
- // use it when they fail (i.e., the predicate's outcome doesn't match the
- // assertion's expectation). When nothing has been streamed into the
- // object, returns an empty string.
- const char* message() const {
- return message_.get() != NULL ? message_->c_str() : "";
- }
- // TODO(vladl@google.com): Remove this after making sure no clients use it.
- // Deprecated; please use message() instead.
- const char* failure_message() const { return message(); }
-
- // Streams a custom failure message into this object.
- template <typename T> AssertionResult& operator<<(const T& value) {
- AppendMessage(Message() << value);
- return *this;
- }
-
- // Allows streaming basic output manipulators such as endl or flush into
- // this object.
- AssertionResult& operator<<(
- ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {
- AppendMessage(Message() << basic_manipulator);
- return *this;
- }
-
- private:
- // Appends the contents of message to message_.
- void AppendMessage(const Message& a_message) {
- if (message_.get() == NULL)
- message_.reset(new ::std::string);
- message_->append(a_message.GetString().c_str());
- }
-
- // Stores result of the assertion predicate.
- bool success_;
- // Stores the message describing the condition in case the expectation
- // construct is not satisfied with the predicate's outcome.
- // Referenced via a pointer to avoid taking too much stack frame space
- // with test assertions.
- internal::scoped_ptr< ::std::string> message_;
-
- GTEST_DISALLOW_ASSIGN_(AssertionResult);
-};
-
-// Makes a successful assertion result.
-GTEST_API_ AssertionResult AssertionSuccess();
-
-// Makes a failed assertion result.
-GTEST_API_ AssertionResult AssertionFailure();
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << msg.
-GTEST_API_ AssertionResult AssertionFailure(const Message& msg);
-
-// The abstract class that all tests inherit from.
-//
-// In Google Test, a unit test program contains one or many TestCases, and
-// each TestCase contains one or many Tests.
-//
-// When you define a test using the TEST macro, you don't need to
-// explicitly derive from Test - the TEST macro automatically does
-// this for you.
-//
-// The only time you derive from Test is when defining a test fixture
-// to be used a TEST_F. For example:
-//
-// class FooTest : public testing::Test {
-// protected:
-// virtual void SetUp() { ... }
-// virtual void TearDown() { ... }
-// ...
-// };
-//
-// TEST_F(FooTest, Bar) { ... }
-// TEST_F(FooTest, Baz) { ... }
-//
-// Test is not copyable.
-class GTEST_API_ Test {
- public:
- friend class TestInfo;
-
- // Defines types for pointers to functions that set up and tear down
- // a test case.
- typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc;
- typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc;
-
- // The d'tor is virtual as we intend to inherit from Test.
- virtual ~Test();
-
- // Sets up the stuff shared by all tests in this test case.
- //
- // Google Test will call Foo::SetUpTestCase() before running the first
- // test in test case Foo. Hence a sub-class can define its own
- // SetUpTestCase() method to shadow the one defined in the super
- // class.
- static void SetUpTestCase() {}
-
- // Tears down the stuff shared by all tests in this test case.
- //
- // Google Test will call Foo::TearDownTestCase() after running the last
- // test in test case Foo. Hence a sub-class can define its own
- // TearDownTestCase() method to shadow the one defined in the super
- // class.
- static void TearDownTestCase() {}
-
- // Returns true iff the current test has a fatal failure.
- static bool HasFatalFailure();
-
- // Returns true iff the current test has a non-fatal failure.
- static bool HasNonfatalFailure();
-
- // Returns true iff the current test has a (either fatal or
- // non-fatal) failure.
- static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
-
- // Logs a property for the current test. Only the last value for a given
- // key is remembered.
- // These are public static so they can be called from utility functions
- // that are not members of the test fixture.
- // The arguments are const char* instead strings, as Google Test is used
- // on platforms where string doesn't compile.
- //
- // Note that a driving consideration for these RecordProperty methods
- // was to produce xml output suited to the Greenspan charting utility,
- // which at present will only chart values that fit in a 32-bit int. It
- // is the user's responsibility to restrict their values to 32-bit ints
- // if they intend them to be used with Greenspan.
- static void RecordProperty(const char* key, const char* value);
- static void RecordProperty(const char* key, int value);
-
- protected:
- // Creates a Test object.
- Test();
-
- // Sets up the test fixture.
- virtual void SetUp();
-
- // Tears down the test fixture.
- virtual void TearDown();
-
- private:
- // Returns true iff the current test has the same fixture class as
- // the first test in the current test case.
- static bool HasSameFixtureClass();
-
- // Runs the test after the test fixture has been set up.
- //
- // A sub-class must implement this to define the test logic.
- //
- // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
- // Instead, use the TEST or TEST_F macro.
- virtual void TestBody() = 0;
-
- // Sets up, executes, and tears down the test.
- void Run();
-
- // Deletes self. We deliberately pick an unusual name for this
- // internal method to avoid clashing with names used in user TESTs.
- void DeleteSelf_() { delete this; }
-
- // Uses a GTestFlagSaver to save and restore all Google Test flags.
- const internal::GTestFlagSaver* const gtest_flag_saver_;
-
- // Often a user mis-spells SetUp() as Setup() and spends a long time
- // wondering why it is never called by Google Test. The declaration of
- // the following method is solely for catching such an error at
- // compile time:
- //
- // - The return type is deliberately chosen to be not void, so it
- // will be a conflict if a user declares void Setup() in his test
- // fixture.
- //
- // - This method is private, so it will be another compiler error
- // if a user calls it from his test fixture.
- //
- // DO NOT OVERRIDE THIS FUNCTION.
- //
- // If you see an error about overriding the following function or
- // about it being private, you have mis-spelled SetUp() as Setup().
- struct Setup_should_be_spelled_SetUp {};
- virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
-
- // We disallow copying Tests.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);
-};
-
-typedef internal::TimeInMillis TimeInMillis;
-
-// A copyable object representing a user specified test property which can be
-// output as a key/value string pair.
-//
-// Don't inherit from TestProperty as its destructor is not virtual.
-class TestProperty {
- public:
- // C'tor. TestProperty does NOT have a default constructor.
- // Always use this constructor (with parameters) to create a
- // TestProperty object.
- TestProperty(const char* a_key, const char* a_value) :
- key_(a_key), value_(a_value) {
- }
-
- // Gets the user supplied key.
- const char* key() const {
- return key_.c_str();
- }
-
- // Gets the user supplied value.
- const char* value() const {
- return value_.c_str();
- }
-
- // Sets a new value, overriding the one supplied in the constructor.
- void SetValue(const char* new_value) {
- value_ = new_value;
- }
-
- private:
- // The key supplied by the user.
- internal::String key_;
- // The value supplied by the user.
- internal::String value_;
-};
-
-// The result of a single Test. This includes a list of
-// TestPartResults, a list of TestProperties, a count of how many
-// death tests there are in the Test, and how much time it took to run
-// the Test.
-//
-// TestResult is not copyable.
-class GTEST_API_ TestResult {
- public:
- // Creates an empty TestResult.
- TestResult();
-
- // D'tor. Do not inherit from TestResult.
- ~TestResult();
-
- // Gets the number of all test parts. This is the sum of the number
- // of successful test parts and the number of failed test parts.
- int total_part_count() const;
-
- // Returns the number of the test properties.
- int test_property_count() const;
-
- // Returns true iff the test passed (i.e. no test part failed).
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the test failed.
- bool Failed() const;
-
- // Returns true iff the test fatally failed.
- bool HasFatalFailure() const;
-
- // Returns true iff the test has a non-fatal failure.
- bool HasNonfatalFailure() const;
-
- // Returns the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns the i-th test part result among all the results. i can range
- // from 0 to test_property_count() - 1. If i is not in that range, aborts
- // the program.
- const TestPartResult& GetTestPartResult(int i) const;
-
- // Returns the i-th test property. i can range from 0 to
- // test_property_count() - 1. If i is not in that range, aborts the
- // program.
- const TestProperty& GetTestProperty(int i) const;
-
- private:
- friend class TestInfo;
- friend class UnitTest;
- friend class internal::DefaultGlobalTestPartResultReporter;
- friend class internal::ExecDeathTest;
- friend class internal::TestResultAccessor;
- friend class internal::UnitTestImpl;
- friend class internal::WindowsDeathTest;
-
- // Gets the vector of TestPartResults.
- const std::vector<TestPartResult>& test_part_results() const {
- return test_part_results_;
- }
-
- // Gets the vector of TestProperties.
- const std::vector<TestProperty>& test_properties() const {
- return test_properties_;
- }
-
- // Sets the elapsed time.
- void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
-
- // Adds a test property to the list. The property is validated and may add
- // a non-fatal failure if invalid (e.g., if it conflicts with reserved
- // key names). If a property is already recorded for the same key, the
- // value will be updated, rather than storing multiple values for the same
- // key.
- void RecordProperty(const TestProperty& test_property);
-
- // Adds a failure if the key is a reserved attribute of Google Test
- // testcase tags. Returns true if the property is valid.
- // TODO(russr): Validate attribute names are legal and human readable.
- static bool ValidateTestProperty(const TestProperty& test_property);
-
- // Adds a test part result to the list.
- void AddTestPartResult(const TestPartResult& test_part_result);
-
- // Returns the death test count.
- int death_test_count() const { return death_test_count_; }
-
- // Increments the death test count, returning the new count.
- int increment_death_test_count() { return ++death_test_count_; }
-
- // Clears the test part results.
- void ClearTestPartResults();
-
- // Clears the object.
- void Clear();
-
- // Protects mutable state of the property vector and of owned
- // properties, whose values may be updated.
- internal::Mutex test_properites_mutex_;
-
- // The vector of TestPartResults
- std::vector<TestPartResult> test_part_results_;
- // The vector of TestProperties
- std::vector<TestProperty> test_properties_;
- // Running count of death tests.
- int death_test_count_;
- // The elapsed time, in milliseconds.
- TimeInMillis elapsed_time_;
-
- // We disallow copying TestResult.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);
-}; // class TestResult
-
-// A TestInfo object stores the following information about a test:
-//
-// Test case name
-// Test name
-// Whether the test should be run
-// A function pointer that creates the test object when invoked
-// Test result
-//
-// The constructor of TestInfo registers itself with the UnitTest
-// singleton such that the RUN_ALL_TESTS() macro knows which tests to
-// run.
-class GTEST_API_ TestInfo {
- public:
- // Destructs a TestInfo object. This function is not virtual, so
- // don't inherit from TestInfo.
- ~TestInfo();
-
- // Returns the test case name.
- const char* test_case_name() const { return test_case_name_.c_str(); }
-
- // Returns the test name.
- const char* name() const { return name_.c_str(); }
-
- // Returns the name of the parameter type, or NULL if this is not a typed
- // or a type-parameterized test.
- const char* type_param() const {
- if (type_param_.get() != NULL)
- return type_param_->c_str();
- return NULL;
- }
-
- // Returns the text representation of the value parameter, or NULL if this
- // is not a value-parameterized test.
- const char* value_param() const {
- if (value_param_.get() != NULL)
- return value_param_->c_str();
- return NULL;
- }
-
- // Returns true if this test should run, that is if the test is not disabled
- // (or it is disabled but the also_run_disabled_tests flag has been specified)
- // and its full name matches the user-specified filter.
- //
- // Google Test allows the user to filter the tests by their full names.
- // The full name of a test Bar in test case Foo is defined as
- // "Foo.Bar". Only the tests that match the filter will run.
- //
- // A filter is a colon-separated list of glob (not regex) patterns,
- // optionally followed by a '-' and a colon-separated list of
- // negative patterns (tests to exclude). A test is run if it
- // matches one of the positive patterns and does not match any of
- // the negative patterns.
- //
- // For example, *A*:Foo.* is a filter that matches any string that
- // contains the character 'A' or starts with "Foo.".
- bool should_run() const { return should_run_; }
-
- // Returns the result of the test.
- const TestResult* result() const { return &result_; }
-
- private:
-
-#if GTEST_HAS_DEATH_TEST
- friend class internal::DefaultDeathTestFactory;
-#endif // GTEST_HAS_DEATH_TEST
- friend class Test;
- friend class TestCase;
- friend class internal::UnitTestImpl;
- friend TestInfo* internal::MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- internal::TypeId fixture_class_id,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc,
- internal::TestFactoryBase* factory);
-
- // Constructs a TestInfo object. The newly constructed instance assumes
- // ownership of the factory object.
- TestInfo(const char* test_case_name, const char* name,
- const char* a_type_param,
- const char* a_value_param,
- internal::TypeId fixture_class_id,
- internal::TestFactoryBase* factory);
-
- // Increments the number of death tests encountered in this test so
- // far.
- int increment_death_test_count() {
- return result_.increment_death_test_count();
- }
-
- // Creates the test object, runs it, records its result, and then
- // deletes it.
- void Run();
-
- static void ClearTestResult(TestInfo* test_info) {
- test_info->result_.Clear();
- }
-
- // These fields are immutable properties of the test.
- const std::string test_case_name_; // Test case name
- const std::string name_; // Test name
- // Name of the parameter type, or NULL if this is not a typed or a
- // type-parameterized test.
- const internal::scoped_ptr<const ::std::string> type_param_;
- // Text representation of the value parameter, or NULL if this is not a
- // value-parameterized test.
- const internal::scoped_ptr<const ::std::string> value_param_;
- const internal::TypeId fixture_class_id_; // ID of the test fixture class
- bool should_run_; // True iff this test should run
- bool is_disabled_; // True iff this test is disabled
- bool matches_filter_; // True if this test matches the
- // user-specified filter.
- internal::TestFactoryBase* const factory_; // The factory that creates
- // the test object
-
- // This field is mutable and needs to be reset before running the
- // test for the second time.
- TestResult result_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);
-};
-
-// A test case, which consists of a vector of TestInfos.
-//
-// TestCase is not copyable.
-class GTEST_API_ TestCase {
- public:
- // Creates a TestCase with the given name.
- //
- // TestCase does NOT have a default constructor. Always use this
- // constructor to create a TestCase object.
- //
- // Arguments:
- //
- // name: name of the test case
- // a_type_param: the name of the test's type parameter, or NULL if
- // this is not a type-parameterized test.
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- TestCase(const char* name, const char* a_type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc);
-
- // Destructor of TestCase.
- virtual ~TestCase();
-
- // Gets the name of the TestCase.
- const char* name() const { return name_.c_str(); }
-
- // Returns the name of the parameter type, or NULL if this is not a
- // type-parameterized test case.
- const char* type_param() const {
- if (type_param_.get() != NULL)
- return type_param_->c_str();
- return NULL;
- }
-
- // Returns true if any test in this test case should run.
- bool should_run() const { return should_run_; }
-
- // Gets the number of successful tests in this test case.
- int successful_test_count() const;
-
- // Gets the number of failed tests in this test case.
- int failed_test_count() const;
-
- // Gets the number of disabled tests in this test case.
- int disabled_test_count() const;
-
- // Get the number of tests in this test case that should run.
- int test_to_run_count() const;
-
- // Gets the number of all tests in this test case.
- int total_test_count() const;
-
- // Returns true iff the test case passed.
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the test case failed.
- bool Failed() const { return failed_test_count() > 0; }
-
- // Returns the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns the i-th test among all the tests. i can range from 0 to
- // total_test_count() - 1. If i is not in that range, returns NULL.
- const TestInfo* GetTestInfo(int i) const;
-
- private:
- friend class Test;
- friend class internal::UnitTestImpl;
-
- // Gets the (mutable) vector of TestInfos in this TestCase.
- std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
-
- // Gets the (immutable) vector of TestInfos in this TestCase.
- const std::vector<TestInfo*>& test_info_list() const {
- return test_info_list_;
- }
-
- // Returns the i-th test among all the tests. i can range from 0 to
- // total_test_count() - 1. If i is not in that range, returns NULL.
- TestInfo* GetMutableTestInfo(int i);
-
- // Sets the should_run member.
- void set_should_run(bool should) { should_run_ = should; }
-
- // Adds a TestInfo to this test case. Will delete the TestInfo upon
- // destruction of the TestCase object.
- void AddTestInfo(TestInfo * test_info);
-
- // Clears the results of all tests in this test case.
- void ClearResult();
-
- // Clears the results of all tests in the given test case.
- static void ClearTestCaseResult(TestCase* test_case) {
- test_case->ClearResult();
- }
-
- // Runs every test in this TestCase.
- void Run();
-
- // Runs SetUpTestCase() for this TestCase. This wrapper is needed
- // for catching exceptions thrown from SetUpTestCase().
- void RunSetUpTestCase() { (*set_up_tc_)(); }
-
- // Runs TearDownTestCase() for this TestCase. This wrapper is
- // needed for catching exceptions thrown from TearDownTestCase().
- void RunTearDownTestCase() { (*tear_down_tc_)(); }
-
- // Returns true iff test passed.
- static bool TestPassed(const TestInfo* test_info) {
- return test_info->should_run() && test_info->result()->Passed();
- }
-
- // Returns true iff test failed.
- static bool TestFailed(const TestInfo* test_info) {
- return test_info->should_run() && test_info->result()->Failed();
- }
-
- // Returns true iff test is disabled.
- static bool TestDisabled(const TestInfo* test_info) {
- return test_info->is_disabled_;
- }
-
- // Returns true if the given test should run.
- static bool ShouldRunTest(const TestInfo* test_info) {
- return test_info->should_run();
- }
-
- // Shuffles the tests in this test case.
- void ShuffleTests(internal::Random* random);
-
- // Restores the test order to before the first shuffle.
- void UnshuffleTests();
-
- // Name of the test case.
- internal::String name_;
- // Name of the parameter type, or NULL if this is not a typed or a
- // type-parameterized test.
- const internal::scoped_ptr<const ::std::string> type_param_;
- // The vector of TestInfos in their original order. It owns the
- // elements in the vector.
- std::vector<TestInfo*> test_info_list_;
- // Provides a level of indirection for the test list to allow easy
- // shuffling and restoring the test order. The i-th element in this
- // vector is the index of the i-th test in the shuffled test list.
- std::vector<int> test_indices_;
- // Pointer to the function that sets up the test case.
- Test::SetUpTestCaseFunc set_up_tc_;
- // Pointer to the function that tears down the test case.
- Test::TearDownTestCaseFunc tear_down_tc_;
- // True iff any test in this test case should run.
- bool should_run_;
- // Elapsed time, in milliseconds.
- TimeInMillis elapsed_time_;
-
- // We disallow copying TestCases.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase);
-};
-
-// An Environment object is capable of setting up and tearing down an
-// environment. The user should subclass this to define his own
-// environment(s).
-//
-// An Environment object does the set-up and tear-down in virtual
-// methods SetUp() and TearDown() instead of the constructor and the
-// destructor, as:
-//
-// 1. You cannot safely throw from a destructor. This is a problem
-// as in some cases Google Test is used where exceptions are enabled, and
-// we may want to implement ASSERT_* using exceptions where they are
-// available.
-// 2. You cannot use ASSERT_* directly in a constructor or
-// destructor.
-class Environment {
- public:
- // The d'tor is virtual as we need to subclass Environment.
- virtual ~Environment() {}
-
- // Override this to define how to set up the environment.
- virtual void SetUp() {}
-
- // Override this to define how to tear down the environment.
- virtual void TearDown() {}
- private:
- // If you see an error about overriding the following function or
- // about it being private, you have mis-spelled SetUp() as Setup().
- struct Setup_should_be_spelled_SetUp {};
- virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
-};
-
-// The interface for tracing execution of tests. The methods are organized in
-// the order the corresponding events are fired.
-class TestEventListener {
- public:
- virtual ~TestEventListener() {}
-
- // Fired before any test activity starts.
- virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;
-
- // Fired before each iteration of tests starts. There may be more than
- // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
- // index, starting from 0.
- virtual void OnTestIterationStart(const UnitTest& unit_test,
- int iteration) = 0;
-
- // Fired before environment set-up for each iteration of tests starts.
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;
-
- // Fired after environment set-up for each iteration of tests ends.
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;
-
- // Fired before the test case starts.
- virtual void OnTestCaseStart(const TestCase& test_case) = 0;
-
- // Fired before the test starts.
- virtual void OnTestStart(const TestInfo& test_info) = 0;
-
- // Fired after a failed assertion or a SUCCEED() invocation.
- virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;
-
- // Fired after the test ends.
- virtual void OnTestEnd(const TestInfo& test_info) = 0;
-
- // Fired after the test case ends.
- virtual void OnTestCaseEnd(const TestCase& test_case) = 0;
-
- // Fired before environment tear-down for each iteration of tests starts.
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;
-
- // Fired after environment tear-down for each iteration of tests ends.
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;
-
- // Fired after each iteration of tests finishes.
- virtual void OnTestIterationEnd(const UnitTest& unit_test,
- int iteration) = 0;
-
- // Fired after all test activities have ended.
- virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;
-};
-
-// The convenience class for users who need to override just one or two
-// methods and are not concerned that a possible change to a signature of
-// the methods they override will not be caught during the build. For
-// comments about each method please see the definition of TestEventListener
-// above.
-class EmptyTestEventListener : public TestEventListener {
- public:
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
- int /*iteration*/) {}
- virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {}
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}
- virtual void OnTestStart(const TestInfo& /*test_info*/) {}
- virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {}
- virtual void OnTestEnd(const TestInfo& /*test_info*/) {}
- virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}
- virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {}
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
- int /*iteration*/) {}
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
-};
-
-// TestEventListeners lets users add listeners to track events in Google Test.
-class GTEST_API_ TestEventListeners {
- public:
- TestEventListeners();
- ~TestEventListeners();
-
- // Appends an event listener to the end of the list. Google Test assumes
- // the ownership of the listener (i.e. it will delete the listener when
- // the test program finishes).
- void Append(TestEventListener* listener);
-
- // Removes the given event listener from the list and returns it. It then
- // becomes the caller's responsibility to delete the listener. Returns
- // NULL if the listener is not found in the list.
- TestEventListener* Release(TestEventListener* listener);
-
- // Returns the standard listener responsible for the default console
- // output. Can be removed from the listeners list to shut down default
- // console output. Note that removing this object from the listener list
- // with Release transfers its ownership to the caller and makes this
- // function return NULL the next time.
- TestEventListener* default_result_printer() const {
- return default_result_printer_;
- }
-
- // Returns the standard listener responsible for the default XML output
- // controlled by the --gtest_output=xml flag. Can be removed from the
- // listeners list by users who want to shut down the default XML output
- // controlled by this flag and substitute it with custom one. Note that
- // removing this object from the listener list with Release transfers its
- // ownership to the caller and makes this function return NULL the next
- // time.
- TestEventListener* default_xml_generator() const {
- return default_xml_generator_;
- }
-
- private:
- friend class TestCase;
- friend class TestInfo;
- friend class internal::DefaultGlobalTestPartResultReporter;
- friend class internal::NoExecDeathTest;
- friend class internal::TestEventListenersAccessor;
- friend class internal::UnitTestImpl;
-
- // Returns repeater that broadcasts the TestEventListener events to all
- // subscribers.
- TestEventListener* repeater();
-
- // Sets the default_result_printer attribute to the provided listener.
- // The listener is also added to the listener list and previous
- // default_result_printer is removed from it and deleted. The listener can
- // also be NULL in which case it will not be added to the list. Does
- // nothing if the previous and the current listener objects are the same.
- void SetDefaultResultPrinter(TestEventListener* listener);
-
- // Sets the default_xml_generator attribute to the provided listener. The
- // listener is also added to the listener list and previous
- // default_xml_generator is removed from it and deleted. The listener can
- // also be NULL in which case it will not be added to the list. Does
- // nothing if the previous and the current listener objects are the same.
- void SetDefaultXmlGenerator(TestEventListener* listener);
-
- // Controls whether events will be forwarded by the repeater to the
- // listeners in the list.
- bool EventForwardingEnabled() const;
- void SuppressEventForwarding();
-
- // The actual list of listeners.
- internal::TestEventRepeater* repeater_;
- // Listener responsible for the standard result output.
- TestEventListener* default_result_printer_;
- // Listener responsible for the creation of the XML output file.
- TestEventListener* default_xml_generator_;
-
- // We disallow copying TestEventListeners.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);
-};
-
-// A UnitTest consists of a vector of TestCases.
-//
-// This is a singleton class. The only instance of UnitTest is
-// created when UnitTest::GetInstance() is first called. This
-// instance is never deleted.
-//
-// UnitTest is not copyable.
-//
-// This class is thread-safe as long as the methods are called
-// according to their specification.
-class GTEST_API_ UnitTest {
- public:
- // Gets the singleton UnitTest object. The first time this method
- // is called, a UnitTest object is constructed and returned.
- // Consecutive calls will return the same object.
- static UnitTest* GetInstance();
-
- // Runs all tests in this UnitTest object and prints the result.
- // Returns 0 if successful, or 1 otherwise.
- //
- // This method can only be called from the main thread.
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- int Run() GTEST_MUST_USE_RESULT_;
-
- // Returns the working directory when the first TEST() or TEST_F()
- // was executed. The UnitTest object owns the string.
- const char* original_working_dir() const;
-
- // Returns the TestCase object for the test that's currently running,
- // or NULL if no test is running.
- const TestCase* current_test_case() const;
-
- // Returns the TestInfo object for the test that's currently running,
- // or NULL if no test is running.
- const TestInfo* current_test_info() const;
-
- // Returns the random seed used at the start of the current test run.
- int random_seed() const;
-
-#if GTEST_HAS_PARAM_TEST
- // Returns the ParameterizedTestCaseRegistry object used to keep track of
- // value-parameterized tests and instantiate and register them.
- //
- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
- internal::ParameterizedTestCaseRegistry& parameterized_test_registry();
-#endif // GTEST_HAS_PARAM_TEST
-
- // Gets the number of successful test cases.
- int successful_test_case_count() const;
-
- // Gets the number of failed test cases.
- int failed_test_case_count() const;
-
- // Gets the number of all test cases.
- int total_test_case_count() const;
-
- // Gets the number of all test cases that contain at least one test
- // that should run.
- int test_case_to_run_count() const;
-
- // Gets the number of successful tests.
- int successful_test_count() const;
-
- // Gets the number of failed tests.
- int failed_test_count() const;
-
- // Gets the number of disabled tests.
- int disabled_test_count() const;
-
- // Gets the number of all tests.
- int total_test_count() const;
-
- // Gets the number of tests that should run.
- int test_to_run_count() const;
-
- // Gets the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const;
-
- // Returns true iff the unit test passed (i.e. all test cases passed).
- bool Passed() const;
-
- // Returns true iff the unit test failed (i.e. some test case failed
- // or something outside of all tests failed).
- bool Failed() const;
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- const TestCase* GetTestCase(int i) const;
-
- // Returns the list of event listeners that can be used to track events
- // inside Google Test.
- TestEventListeners& listeners();
-
- private:
- // Registers and returns a global test environment. When a test
- // program is run, all global test environments will be set-up in
- // the order they were registered. After all tests in the program
- // have finished, all global test environments will be torn-down in
- // the *reverse* order they were registered.
- //
- // The UnitTest object takes ownership of the given environment.
- //
- // This method can only be called from the main thread.
- Environment* AddEnvironment(Environment* env);
-
- // Adds a TestPartResult to the current TestResult object. All
- // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
- // eventually call this to report their results. The user code
- // should use the assertion macros instead of calling this directly.
- void AddTestPartResult(TestPartResult::Type result_type,
- const char* file_name,
- int line_number,
- const internal::String& message,
- const internal::String& os_stack_trace);
-
- // Adds a TestProperty to the current TestResult object. If the result already
- // contains a property with the same key, the value will be updated.
- void RecordPropertyForCurrentTest(const char* key, const char* value);
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- TestCase* GetMutableTestCase(int i);
-
- // Accessors for the implementation object.
- internal::UnitTestImpl* impl() { return impl_; }
- const internal::UnitTestImpl* impl() const { return impl_; }
-
- // These classes and funcions are friends as they need to access private
- // members of UnitTest.
- friend class Test;
- friend class internal::AssertHelper;
- friend class internal::ScopedTrace;
- friend Environment* AddGlobalTestEnvironment(Environment* env);
- friend internal::UnitTestImpl* internal::GetUnitTestImpl();
- friend void internal::ReportFailureInUnknownLocation(
- TestPartResult::Type result_type,
- const internal::String& message);
-
- // Creates an empty UnitTest.
- UnitTest();
-
- // D'tor
- virtual ~UnitTest();
-
- // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
- // Google Test trace stack.
- void PushGTestTrace(const internal::TraceInfo& trace);
-
- // Pops a trace from the per-thread Google Test trace stack.
- void PopGTestTrace();
-
- // Protects mutable state in *impl_. This is mutable as some const
- // methods need to lock it too.
- mutable internal::Mutex mutex_;
-
- // Opaque implementation object. This field is never changed once
- // the object is constructed. We don't mark it as const here, as
- // doing so will cause a warning in the constructor of UnitTest.
- // Mutable state in *impl_ is protected by mutex_.
- internal::UnitTestImpl* impl_;
-
- // We disallow copying UnitTest.
- GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);
-};
-
-// A convenient wrapper for adding an environment for the test
-// program.
-//
-// You should call this before RUN_ALL_TESTS() is called, probably in
-// main(). If you use gtest_main, you need to call this before main()
-// starts for it to take effect. For example, you can define a global
-// variable like this:
-//
-// testing::Environment* const foo_env =
-// testing::AddGlobalTestEnvironment(new FooEnvironment);
-//
-// However, we strongly recommend you to write your own main() and
-// call AddGlobalTestEnvironment() there, as relying on initialization
-// of global variables makes the code harder to read and may cause
-// problems when you register multiple environments from different
-// translation units and the environments have dependencies among them
-// (remember that the compiler doesn't guarantee the order in which
-// global variables from different translation units are initialized).
-inline Environment* AddGlobalTestEnvironment(Environment* env) {
- return UnitTest::GetInstance()->AddEnvironment(env);
-}
-
-// Initializes Google Test. This must be called before calling
-// RUN_ALL_TESTS(). In particular, it parses a command line for the
-// flags that Google Test recognizes. Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-GTEST_API_ void InitGoogleTest(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);
-
-namespace internal {
-
-// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
-// operand to be used in a failure message. The type (but not value)
-// of the other operand may affect the format. This allows us to
-// print a char* as a raw pointer when it is compared against another
-// char*, and print it as a C string when it is compared against an
-// std::string object, for example.
-//
-// The default implementation ignores the type of the other operand.
-// Some specialized versions are used to handle formatting wide or
-// narrow C strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename T1, typename T2>
-String FormatForComparisonFailureMessage(const T1& value,
- const T2& /* other_operand */) {
- // C++Builder compiles this incorrectly if the namespace isn't explicitly
- // given.
- return ::testing::PrintToString(value);
-}
-
-// The helper function for {ASSERT|EXPECT}_EQ.
-template <typename T1, typename T2>
-AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual) {
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4389) // Temporarily disables warning on
- // signed/unsigned mismatch.
-#endif
-
- if (expected == actual) {
- return AssertionSuccess();
- }
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-
- return EqFailure(expected_expression,
- actual_expression,
- FormatForComparisonFailureMessage(expected, actual),
- FormatForComparisonFailureMessage(actual, expected),
- false);
-}
-
-// With this overloaded version, we allow anonymous enums to be used
-// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums
-// can be implicitly cast to BiggestInt.
-GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual);
-
-// The helper class for {ASSERT|EXPECT}_EQ. The template argument
-// lhs_is_null_literal is true iff the first argument to ASSERT_EQ()
-// is a null pointer literal. The following default implementation is
-// for lhs_is_null_literal being false.
-template <bool lhs_is_null_literal>
-class EqHelper {
- public:
- // This templatized version is for the general case.
- template <typename T1, typename T2>
- static AssertionResult Compare(const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-
- // With this overloaded version, we allow anonymous enums to be used
- // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
- // enums can be implicitly cast to BiggestInt.
- //
- // Even though its body looks the same as the above version, we
- // cannot merge the two, as it will make anonymous enums unhappy.
- static AssertionResult Compare(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-};
-
-// This specialization is used when the first argument to ASSERT_EQ()
-// is a null pointer literal, like NULL, false, or 0.
-template <>
-class EqHelper<true> {
- public:
- // We define two overloaded versions of Compare(). The first
- // version will be picked when the second argument to ASSERT_EQ() is
- // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or
- // EXPECT_EQ(false, a_bool).
- template <typename T1, typename T2>
- static AssertionResult Compare(
- const char* expected_expression,
- const char* actual_expression,
- const T1& expected,
- const T2& actual,
- // The following line prevents this overload from being considered if T2
- // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr)
- // expands to Compare("", "", NULL, my_ptr), which requires a conversion
- // to match the Secret* in the other overload, which would otherwise make
- // this template match better.
- typename EnableIf<!is_pointer<T2>::value>::type* = 0) {
- return CmpHelperEQ(expected_expression, actual_expression, expected,
- actual);
- }
-
- // This version will be picked when the second argument to ASSERT_EQ() is a
- // pointer, e.g. ASSERT_EQ(NULL, a_pointer).
- template <typename T>
- static AssertionResult Compare(
- const char* expected_expression,
- const char* actual_expression,
- // We used to have a second template parameter instead of Secret*. That
- // template parameter would deduce to 'long', making this a better match
- // than the first overload even without the first overload's EnableIf.
- // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to
- // non-pointer argument" (even a deduced integral argument), so the old
- // implementation caused warnings in user code.
- Secret* /* expected (NULL) */,
- T* actual) {
- // We already know that 'expected' is a null pointer.
- return CmpHelperEQ(expected_expression, actual_expression,
- static_cast<T*>(NULL), actual);
- }
-};
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste
-// of similar code.
-//
-// For each templatized helper function, we also define an overloaded
-// version for BiggestInt in order to reduce code bloat and allow
-// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled
-// with gcc 4.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-template <typename T1, typename T2>\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- const T1& val1, const T2& val2) {\
- if (val1 op val2) {\
- return AssertionSuccess();\
- } else {\
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2\
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
- << " vs " << FormatForComparisonFailureMessage(val2, val1);\
- }\
-}\
-GTEST_API_ AssertionResult CmpHelper##op_name(\
- const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-
-// Implements the helper function for {ASSERT|EXPECT}_NE
-GTEST_IMPL_CMP_HELPER_(NE, !=);
-// Implements the helper function for {ASSERT|EXPECT}_LE
-GTEST_IMPL_CMP_HELPER_(LE, <=);
-// Implements the helper function for {ASSERT|EXPECT}_LT
-GTEST_IMPL_CMP_HELPER_(LT, < );
-// Implements the helper function for {ASSERT|EXPECT}_GE
-GTEST_IMPL_CMP_HELPER_(GE, >=);
-// Implements the helper function for {ASSERT|EXPECT}_GT
-GTEST_IMPL_CMP_HELPER_(GT, > );
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual);
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual);
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2);
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2);
-
-
-// Helper function for *_STREQ on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const wchar_t* expected,
- const wchar_t* actual);
-
-// Helper function for *_STRNE on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const wchar_t* s1,
- const wchar_t* s2);
-
-} // namespace internal
-
-// IsSubstring() and IsNotSubstring() are intended to be used as the
-// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
-// themselves. They check whether needle is a substring of haystack
-// (NULL is considered a substring of itself only), and return an
-// appropriate error message when they fail.
-//
-// The {needle,haystack}_expr arguments are the stringified
-// expressions that generated the two real arguments.
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack);
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack);
-#endif // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-// Helper template function for comparing floating-points.
-//
-// Template parameter:
-//
-// RawType: the raw floating-point type (either float or double)
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename RawType>
-AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression,
- const char* actual_expression,
- RawType expected,
- RawType actual) {
- const FloatingPoint<RawType> lhs(expected), rhs(actual);
-
- if (lhs.AlmostEquals(rhs)) {
- return AssertionSuccess();
- }
-
- ::std::stringstream expected_ss;
- expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << expected;
-
- ::std::stringstream actual_ss;
- actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << actual;
-
- return EqFailure(expected_expression,
- actual_expression,
- StringStreamToString(&expected_ss),
- StringStreamToString(&actual_ss),
- false);
-}
-
-// Helper function for implementing ASSERT_NEAR.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,
- const char* expr2,
- const char* abs_error_expr,
- double val1,
- double val2,
- double abs_error);
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-// A class that enables one to stream messages to assertion macros
-class GTEST_API_ AssertHelper {
- public:
- // Constructor.
- AssertHelper(TestPartResult::Type type,
- const char* file,
- int line,
- const char* message);
- ~AssertHelper();
-
- // Message assignment is a semantic trick to enable assertion
- // streaming; see the GTEST_MESSAGE_ macro below.
- void operator=(const Message& message) const;
-
- private:
- // We put our data in a struct so that the size of the AssertHelper class can
- // be as small as possible. This is important because gcc is incapable of
- // re-using stack space even for temporary variables, so every EXPECT_EQ
- // reserves stack space for another AssertHelper.
- struct AssertHelperData {
- AssertHelperData(TestPartResult::Type t,
- const char* srcfile,
- int line_num,
- const char* msg)
- : type(t), file(srcfile), line(line_num), message(msg) { }
-
- TestPartResult::Type const type;
- const char* const file;
- int const line;
- String const message;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);
- };
-
- AssertHelperData* const data_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);
-};
-
-} // namespace internal
-
-#if GTEST_HAS_PARAM_TEST
-// The pure interface class that all value-parameterized tests inherit from.
-// A value-parameterized class must inherit from both ::testing::Test and
-// ::testing::WithParamInterface. In most cases that just means inheriting
-// from ::testing::TestWithParam, but more complicated test hierarchies
-// may need to inherit from Test and WithParamInterface at different levels.
-//
-// This interface has support for accessing the test parameter value via
-// the GetParam() method.
-//
-// Use it with one of the parameter generator defining functions, like Range(),
-// Values(), ValuesIn(), Bool(), and Combine().
-//
-// class FooTest : public ::testing::TestWithParam<int> {
-// protected:
-// FooTest() {
-// // Can use GetParam() here.
-// }
-// virtual ~FooTest() {
-// // Can use GetParam() here.
-// }
-// virtual void SetUp() {
-// // Can use GetParam() here.
-// }
-// virtual void TearDown {
-// // Can use GetParam() here.
-// }
-// };
-// TEST_P(FooTest, DoesBar) {
-// // Can use GetParam() method here.
-// Foo foo;
-// ASSERT_TRUE(foo.DoesBar(GetParam()));
-// }
-// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
-
-template <typename T>
-class WithParamInterface {
- public:
- typedef T ParamType;
- virtual ~WithParamInterface() {}
-
- // The current parameter value. Is also available in the test fixture's
- // constructor. This member function is non-static, even though it only
- // references static data, to reduce the opportunity for incorrect uses
- // like writing 'WithParamInterface<bool>::GetParam()' for a test that
- // uses a fixture whose parameter type is int.
- const ParamType& GetParam() const { return *parameter_; }
-
- private:
- // Sets parameter value. The caller is responsible for making sure the value
- // remains alive and unchanged throughout the current test.
- static void SetParam(const ParamType* parameter) {
- parameter_ = parameter;
- }
-
- // Static value used for accessing parameter during a test lifetime.
- static const ParamType* parameter_;
-
- // TestClass must be a subclass of WithParamInterface<T> and Test.
- template <class TestClass> friend class internal::ParameterizedTestFactory;
-};
-
-template <typename T>
-const T* WithParamInterface<T>::parameter_ = NULL;
-
-// Most value-parameterized classes can ignore the existence of
-// WithParamInterface, and can just inherit from ::testing::TestWithParam.
-
-template <typename T>
-class TestWithParam : public Test, public WithParamInterface<T> {
-};
-
-#endif // GTEST_HAS_PARAM_TEST
-
-// Macros for indicating success/failure in test code.
-
-// ADD_FAILURE unconditionally adds a failure to the current test.
-// SUCCEED generates a success - it doesn't automatically make the
-// current test successful, as a test is only successful when it has
-// no failure.
-//
-// EXPECT_* verifies that a certain condition is satisfied. If not,
-// it behaves like ADD_FAILURE. In particular:
-//
-// EXPECT_TRUE verifies that a Boolean condition is true.
-// EXPECT_FALSE verifies that a Boolean condition is false.
-//
-// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
-// that they will also abort the current function on failure. People
-// usually want the fail-fast behavior of FAIL and ASSERT_*, but those
-// writing data-driven tests often find themselves using ADD_FAILURE
-// and EXPECT_* more.
-//
-// Examples:
-//
-// EXPECT_TRUE(server.StatusIsOK());
-// ASSERT_FALSE(server.HasPendingRequest(port))
-// << "There are still pending requests " << "on port " << port;
-
-// Generates a nonfatal failure with a generic message.
-#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
-
-// Generates a nonfatal failure at the given source file location with
-// a generic message.
-#define ADD_FAILURE_AT(file, line) \
- GTEST_MESSAGE_AT_(file, line, "Failed", \
- ::testing::TestPartResult::kNonFatalFailure)
-
-// Generates a fatal failure with a generic message.
-#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
-
-// Define this macro to 1 to omit the definition of FAIL(), which is a
-// generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_FAIL
-# define FAIL() GTEST_FAIL()
-#endif
-
-// Generates a success with a generic message.
-#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
-
-// Define this macro to 1 to omit the definition of SUCCEED(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_SUCCEED
-# define SUCCEED() GTEST_SUCCEED()
-#endif
-
-// Macros for testing exceptions.
-//
-// * {ASSERT|EXPECT}_THROW(statement, expected_exception):
-// Tests that the statement throws the expected exception.
-// * {ASSERT|EXPECT}_NO_THROW(statement):
-// Tests that the statement doesn't throw any exception.
-// * {ASSERT|EXPECT}_ANY_THROW(statement):
-// Tests that the statement throws an exception.
-
-#define EXPECT_THROW(statement, expected_exception) \
- GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_NO_THROW(statement) \
- GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_ANY_THROW(statement) \
- GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_THROW(statement, expected_exception) \
- GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
-#define ASSERT_NO_THROW(statement) \
- GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
-#define ASSERT_ANY_THROW(statement) \
- GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)
-
-// Boolean assertions. Condition can be either a Boolean expression or an
-// AssertionResult. For more information on how to use AssertionResult with
-// these macros see comments on that class.
-#define EXPECT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
- GTEST_NONFATAL_FAILURE_)
-#define EXPECT_FALSE(condition) \
- GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
- GTEST_NONFATAL_FAILURE_)
-#define ASSERT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
- GTEST_FATAL_FAILURE_)
-#define ASSERT_FALSE(condition) \
- GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
- GTEST_FATAL_FAILURE_)
-
-// Includes the auto-generated header that implements a family of
-// generic predicate assertion macros.
-#include "gtest/gtest_pred_impl.h"
-
-// Macros for testing equalities and inequalities.
-//
-// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual
-// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
-// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
-// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
-// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
-// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
-//
-// When they are not, Google Test prints both the tested expressions and
-// their actual values. The values must be compatible built-in types,
-// or you will get a compiler error. By "compatible" we mean that the
-// values can be compared by the respective operator.
-//
-// Note:
-//
-// 1. It is possible to make a user-defined type work with
-// {ASSERT|EXPECT}_??(), but that requires overloading the
-// comparison operators and is thus discouraged by the Google C++
-// Usage Guide. Therefore, you are advised to use the
-// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
-// equal.
-//
-// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
-// pointers (in particular, C strings). Therefore, if you use it
-// with two C strings, you are testing how their locations in memory
-// are related, not how their content is related. To compare two C
-// strings by content, use {ASSERT|EXPECT}_STR*().
-//
-// 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to
-// {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you
-// what the actual value is when it fails, and similarly for the
-// other comparisons.
-//
-// 4. Do not depend on the order in which {ASSERT|EXPECT}_??()
-// evaluate their arguments, which is undefined.
-//
-// 5. These macros evaluate their arguments exactly once.
-//
-// Examples:
-//
-// EXPECT_NE(5, Foo());
-// EXPECT_EQ(NULL, a_pointer);
-// ASSERT_LT(i, array_size);
-// ASSERT_GT(records.size(), 0) << "There is no record left.";
-
-#define EXPECT_EQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal:: \
- EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
- expected, actual)
-#define EXPECT_NE(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)
-#define EXPECT_LE(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define EXPECT_LT(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define EXPECT_GE(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define EXPECT_GT(val1, val2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-#define GTEST_ASSERT_EQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal:: \
- EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
- expected, actual)
-#define GTEST_ASSERT_NE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
-#define GTEST_ASSERT_LE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define GTEST_ASSERT_LT(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define GTEST_ASSERT_GE(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define GTEST_ASSERT_GT(val1, val2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
-// ASSERT_XY(), which clashes with some users' own code.
-
-#if !GTEST_DONT_DEFINE_ASSERT_EQ
-# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_NE
-# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LE
-# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LT
-# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GE
-# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GT
-# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
-#endif
-
-// C String Comparisons. All tests treat NULL and any non-NULL string
-// as different. Two NULLs are equal.
-//
-// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2
-// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2
-// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
-// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
-//
-// For wide or narrow string objects, you can use the
-// {ASSERT|EXPECT}_??() macros.
-//
-// Don't depend on the order in which the arguments are evaluated,
-// which is undefined.
-//
-// These macros evaluate their arguments exactly once.
-
-#define EXPECT_STREQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
-#define EXPECT_STRNE(s1, s2) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define EXPECT_STRCASEEQ(expected, actual) \
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
-#define EXPECT_STRCASENE(s1, s2)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-#define ASSERT_STREQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
-#define ASSERT_STRNE(s1, s2) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define ASSERT_STRCASEEQ(expected, actual) \
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
-#define ASSERT_STRCASENE(s1, s2)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-// Macros for comparing floating-point numbers.
-//
-// * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual):
-// Tests that two float values are almost equal.
-// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual):
-// Tests that two double values are almost equal.
-// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
-// Tests that v1 and v2 are within the given distance to each other.
-//
-// Google Test uses ULP-based comparison to automatically pick a default
-// error bound that is appropriate for the operands. See the
-// FloatingPoint template class in gtest-internal.h if you are
-// interested in the implementation details.
-
-#define EXPECT_FLOAT_EQ(expected, actual)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
- expected, actual)
-
-#define EXPECT_DOUBLE_EQ(expected, actual)\
- EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
- expected, actual)
-
-#define ASSERT_FLOAT_EQ(expected, actual)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
- expected, actual)
-
-#define ASSERT_DOUBLE_EQ(expected, actual)\
- ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
- expected, actual)
-
-#define EXPECT_NEAR(val1, val2, abs_error)\
- EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
- val1, val2, abs_error)
-
-#define ASSERT_NEAR(val1, val2, abs_error)\
- ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
- val1, val2, abs_error)
-
-// These predicate format functions work on floating-point values, and
-// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
-//
-// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,
- float val1, float val2);
-GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
- double val1, double val2);
-
-
-#if GTEST_OS_WINDOWS
-
-// Macros that test for HRESULT failure and success, these are only useful
-// on Windows, and rely on Windows SDK macros and APIs to compile.
-//
-// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
-//
-// When expr unexpectedly fails or succeeds, Google Test prints the
-// expected result and the actual result with both a human-readable
-// string representation of the error, if available, as well as the
-// hex result code.
-# define EXPECT_HRESULT_SUCCEEDED(expr) \
- EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define ASSERT_HRESULT_SUCCEEDED(expr) \
- ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define EXPECT_HRESULT_FAILED(expr) \
- EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-# define ASSERT_HRESULT_FAILED(expr) \
- ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-#endif // GTEST_OS_WINDOWS
-
-// Macros that execute statement and check that it doesn't generate new fatal
-// failures in the current thread.
-//
-// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
-//
-// Examples:
-//
-// EXPECT_NO_FATAL_FAILURE(Process());
-// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
-//
-#define ASSERT_NO_FATAL_FAILURE(statement) \
- GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
-#define EXPECT_NO_FATAL_FAILURE(statement) \
- GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)
-
-// Causes a trace (including the source file path, the current line
-// number, and the given message) to be included in every test failure
-// message generated by code in the current scope. The effect is
-// undone when the control leaves the current scope.
-//
-// The message argument can be anything streamable to std::ostream.
-//
-// In the implementation, we include the current line number as part
-// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
-// to appear in the same block - as long as they are on different
-// lines.
-#define SCOPED_TRACE(message) \
- ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
- __FILE__, __LINE__, ::testing::Message() << (message))
-
-// Compile-time assertion for type equality.
-// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
-// the same type. The value it returns is not interesting.
-//
-// Instead of making StaticAssertTypeEq a class template, we make it a
-// function template that invokes a helper class template. This
-// prevents a user from misusing StaticAssertTypeEq<T1, T2> by
-// defining objects of that type.
-//
-// CAVEAT:
-//
-// When used inside a method of a class template,
-// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
-// instantiated. For example, given:
-//
-// template <typename T> class Foo {
-// public:
-// void Bar() { testing::StaticAssertTypeEq<int, T>(); }
-// };
-//
-// the code:
-//
-// void Test1() { Foo<bool> foo; }
-//
-// will NOT generate a compiler error, as Foo<bool>::Bar() is never
-// actually instantiated. Instead, you need:
-//
-// void Test2() { Foo<bool> foo; foo.Bar(); }
-//
-// to cause a compiler error.
-template <typename T1, typename T2>
-bool StaticAssertTypeEq() {
- (void)internal::StaticAssertTypeEqHelper<T1, T2>();
- return true;
-}
-
-// Defines a test.
-//
-// The first parameter is the name of the test case, and the second
-// parameter is the name of the test within the test case.
-//
-// The convention is to end the test case name with "Test". For
-// example, a test case for the Foo class can be named FooTest.
-//
-// The user should put his test code between braces after using this
-// macro. Example:
-//
-// TEST(FooTest, InitializesCorrectly) {
-// Foo foo;
-// EXPECT_TRUE(foo.StatusIsOK());
-// }
-
-// Note that we call GetTestTypeId() instead of GetTypeId<
-// ::testing::Test>() here to get the type ID of testing::Test. This
-// is to work around a suspected linker bug when using Google Test as
-// a framework on Mac OS X. The bug causes GetTypeId<
-// ::testing::Test>() to return different values depending on whether
-// the call is from the Google Test framework itself or from user test
-// code. GetTestTypeId() is guaranteed to always return the same
-// value, as it always calls GetTypeId<>() from the Google Test
-// framework.
-#define GTEST_TEST(test_case_name, test_name)\
- GTEST_TEST_(test_case_name, test_name, \
- ::testing::Test, ::testing::internal::GetTestTypeId())
-
-// Define this macro to 1 to omit the definition of TEST(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_TEST
-# define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
-#endif
-
-// Defines a test that uses a test fixture.
-//
-// The first parameter is the name of the test fixture class, which
-// also doubles as the test case name. The second parameter is the
-// name of the test within the test case.
-//
-// A test fixture class must be declared earlier. The user should put
-// his test code between braces after using this macro. Example:
-//
-// class FooTest : public testing::Test {
-// protected:
-// virtual void SetUp() { b_.AddElement(3); }
-//
-// Foo a_;
-// Foo b_;
-// };
-//
-// TEST_F(FooTest, InitializesCorrectly) {
-// EXPECT_TRUE(a_.StatusIsOK());
-// }
-//
-// TEST_F(FooTest, ReturnsElementCountCorrectly) {
-// EXPECT_EQ(0, a_.size());
-// EXPECT_EQ(1, b_.size());
-// }
-
-#define TEST_F(test_fixture, test_name)\
- GTEST_TEST_(test_fixture, test_name, test_fixture, \
- ::testing::internal::GetTypeId<test_fixture>())
-
-// Use this macro in main() to run all tests. It returns 0 if all
-// tests are successful, or 1 otherwise.
-//
-// RUN_ALL_TESTS() should be invoked after the command line has been
-// parsed by InitGoogleTest().
-
-#define RUN_ALL_TESTS()\
- (::testing::UnitTest::GetInstance()->Run())
-
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_pred_impl.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_pred_impl.h
deleted file mode 100644
index 3805f85bd..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_pred_impl.h
+++ /dev/null
@@ -1,358 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on 09/24/2010 by command
-// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
-//
-// Implements a family of generic predicate assertion macros.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-// Makes sure this header is not included before gtest.h.
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-# error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
-
-// This header implements a family of generic predicate assertion
-// macros:
-//
-// ASSERT_PRED_FORMAT1(pred_format, v1)
-// ASSERT_PRED_FORMAT2(pred_format, v1, v2)
-// ...
-//
-// where pred_format is a function or functor that takes n (in the
-// case of ASSERT_PRED_FORMATn) values and their source expression
-// text, and returns a testing::AssertionResult. See the definition
-// of ASSERT_EQ in gtest.h for an example.
-//
-// If you don't care about formatting, you can use the more
-// restrictive version:
-//
-// ASSERT_PRED1(pred, v1)
-// ASSERT_PRED2(pred, v1, v2)
-// ...
-//
-// where pred is an n-ary function or functor that returns bool,
-// and the values v1, v2, ..., must support the << operator for
-// streaming to std::ostream.
-//
-// We also define the EXPECT_* variations.
-//
-// For now we only support predicates whose arity is at most 5.
-// Please email googletestframework@googlegroups.com if you need
-// support for higher arities.
-
-// GTEST_ASSERT_ is the basic statement to which all of the assertions
-// in this file reduce. Don't use this in your code.
-
-#define GTEST_ASSERT_(expression, on_failure) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar = (expression)) \
- ; \
- else \
- on_failure(gtest_ar.failure_message())
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use
-// this in your code.
-template <typename Pred,
- typename T1>
-AssertionResult AssertPred1Helper(const char* pred_text,
- const char* e1,
- Pred pred,
- const T1& v1) {
- if (pred(v1)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, v1),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use
-// this in your code.
-#define GTEST_PRED1_(pred, v1, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
- #v1, \
- pred, \
- v1), on_failure)
-
-// Unary predicate assertion macros.
-#define EXPECT_PRED_FORMAT1(pred_format, v1) \
- GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED1(pred, v1) \
- GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT1(pred_format, v1) \
- GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED1(pred, v1) \
- GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2>
-AssertionResult AssertPred2Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- Pred pred,
- const T1& v1,
- const T2& v2) {
- if (pred(v1, v2)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use
-// this in your code.
-#define GTEST_PRED2_(pred, v1, v2, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
- #v1, \
- #v2, \
- pred, \
- v1, \
- v2), on_failure)
-
-// Binary predicate assertion macros.
-#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
- GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED2(pred, v1, v2) \
- GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
- GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED2(pred, v1, v2) \
- GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3>
-AssertionResult AssertPred3Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3) {
- if (pred(v1, v2, v3)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use
-// this in your code.
-#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- pred, \
- v1, \
- v2, \
- v3), on_failure)
-
-// Ternary predicate assertion macros.
-#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
- GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED3(pred, v1, v2, v3) \
- GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
- GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED3(pred, v1, v2, v3) \
- GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3,
- typename T4>
-AssertionResult AssertPred4Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4) {
- if (pred(v1, v2, v3, v4)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ", "
- << e4 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3
- << "\n" << e4 << " evaluates to " << v4;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use
-// this in your code.
-#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- #v4, \
- pred, \
- v1, \
- v2, \
- v3, \
- v4), on_failure)
-
-// 4-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
- GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED4(pred, v1, v2, v3, v4) \
- GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
- GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED4(pred, v1, v2, v3, v4) \
- GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use
-// this in your code.
-template <typename Pred,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5>
-AssertionResult AssertPred5Helper(const char* pred_text,
- const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const char* e5,
- Pred pred,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4,
- const T5& v5) {
- if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();
-
- return AssertionFailure() << pred_text << "("
- << e1 << ", "
- << e2 << ", "
- << e3 << ", "
- << e4 << ", "
- << e5 << ") evaluates to false, where"
- << "\n" << e1 << " evaluates to " << v1
- << "\n" << e2 << " evaluates to " << v2
- << "\n" << e3 << " evaluates to " << v3
- << "\n" << e4 << " evaluates to " << v4
- << "\n" << e5 << " evaluates to " << v5;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\
- GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5),\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use
-// this in your code.
-#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\
- GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
- #v1, \
- #v2, \
- #v3, \
- #v4, \
- #v5, \
- pred, \
- v1, \
- v2, \
- v3, \
- v4, \
- v5), on_failure)
-
-// 5-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
- GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
- GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
- GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
- GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-
-
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_prod.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_prod.h
deleted file mode 100644
index da80ddc6c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/gtest_prod.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Google C++ Testing Framework definitions useful in production code.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-
-// When you need to test the private or protected members of a class,
-// use the FRIEND_TEST macro to declare your tests as friends of the
-// class. For example:
-//
-// class MyClass {
-// private:
-// void MyMethod();
-// FRIEND_TEST(MyClassTest, MyMethod);
-// };
-//
-// class MyClassTest : public testing::Test {
-// // ...
-// };
-//
-// TEST_F(MyClassTest, MyMethod) {
-// // Can call MyClass::MyMethod() here.
-// }
-
-#define FRIEND_TEST(test_case_name, test_name)\
-friend class test_case_name##_##test_name##_Test
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-death-test-internal.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-death-test-internal.h
deleted file mode 100644
index 1d9f83b65..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-death-test-internal.h
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file defines internal utilities needed for implementing
-// death tests. They are subject to change without notice.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-
-#include "gtest/internal/gtest-internal.h"
-
-#include <stdio.h>
-
-namespace testing {
-namespace internal {
-
-GTEST_DECLARE_string_(internal_run_death_test);
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kDeathTestStyleFlag[] = "death_test_style";
-const char kDeathTestUseFork[] = "death_test_use_fork";
-const char kInternalRunDeathTestFlag[] = "internal_run_death_test";
-
-#if GTEST_HAS_DEATH_TEST
-
-// DeathTest is a class that hides much of the complexity of the
-// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method
-// returns a concrete class that depends on the prevailing death test
-// style, as defined by the --gtest_death_test_style and/or
-// --gtest_internal_run_death_test flags.
-
-// In describing the results of death tests, these terms are used with
-// the corresponding definitions:
-//
-// exit status: The integer exit information in the format specified
-// by wait(2)
-// exit code: The integer code passed to exit(3), _exit(2), or
-// returned from main()
-class GTEST_API_ DeathTest {
- public:
- // Create returns false if there was an error determining the
- // appropriate action to take for the current death test; for example,
- // if the gtest_death_test_style flag is set to an invalid value.
- // The LastMessage method will return a more detailed message in that
- // case. Otherwise, the DeathTest pointer pointed to by the "test"
- // argument is set. If the death test should be skipped, the pointer
- // is set to NULL; otherwise, it is set to the address of a new concrete
- // DeathTest object that controls the execution of the current test.
- static bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test);
- DeathTest();
- virtual ~DeathTest() { }
-
- // A helper class that aborts a death test when it's deleted.
- class ReturnSentinel {
- public:
- explicit ReturnSentinel(DeathTest* test) : test_(test) { }
- ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }
- private:
- DeathTest* const test_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);
- } GTEST_ATTRIBUTE_UNUSED_;
-
- // An enumeration of possible roles that may be taken when a death
- // test is encountered. EXECUTE means that the death test logic should
- // be executed immediately. OVERSEE means that the program should prepare
- // the appropriate environment for a child process to execute the death
- // test, then wait for it to complete.
- enum TestRole { OVERSEE_TEST, EXECUTE_TEST };
-
- // An enumeration of the three reasons that a test might be aborted.
- enum AbortReason {
- TEST_ENCOUNTERED_RETURN_STATEMENT,
- TEST_THREW_EXCEPTION,
- TEST_DID_NOT_DIE
- };
-
- // Assumes one of the above roles.
- virtual TestRole AssumeRole() = 0;
-
- // Waits for the death test to finish and returns its status.
- virtual int Wait() = 0;
-
- // Returns true if the death test passed; that is, the test process
- // exited during the test, its exit status matches a user-supplied
- // predicate, and its stderr output matches a user-supplied regular
- // expression.
- // The user-supplied predicate may be a macro expression rather
- // than a function pointer or functor, or else Wait and Passed could
- // be combined.
- virtual bool Passed(bool exit_status_ok) = 0;
-
- // Signals that the death test did not die as expected.
- virtual void Abort(AbortReason reason) = 0;
-
- // Returns a human-readable outcome message regarding the outcome of
- // the last death test.
- static const char* LastMessage();
-
- static void set_last_death_test_message(const String& message);
-
- private:
- // A string containing a description of the outcome of the last death test.
- static String last_death_test_message_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);
-};
-
-// Factory interface for death tests. May be mocked out for testing.
-class DeathTestFactory {
- public:
- virtual ~DeathTestFactory() { }
- virtual bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test) = 0;
-};
-
-// A concrete DeathTestFactory implementation for normal use.
-class DefaultDeathTestFactory : public DeathTestFactory {
- public:
- virtual bool Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test);
-};
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
-
-// Traps C++ exceptions escaping statement and reports them as test
-// failures. Note that trapping SEH exceptions is not implemented here.
-# if GTEST_HAS_EXCEPTIONS
-# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } catch (const ::std::exception& gtest_exception) { \
- fprintf(\
- stderr, \
- "\n%s: Caught std::exception-derived exception escaping the " \
- "death test statement. Exception message: %s\n", \
- ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
- gtest_exception.what()); \
- fflush(stderr); \
- death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
- } catch (...) { \
- death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
- }
-
-# else
-# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-
-# endif
-
-// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
-// ASSERT_EXIT*, and EXPECT_EXIT*.
-# define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- const ::testing::internal::RE& gtest_regex = (regex); \
- ::testing::internal::DeathTest* gtest_dt; \
- if (!::testing::internal::DeathTest::Create(#statement, &gtest_regex, \
- __FILE__, __LINE__, &gtest_dt)) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
- } \
- if (gtest_dt != NULL) { \
- ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \
- gtest_dt_ptr(gtest_dt); \
- switch (gtest_dt->AssumeRole()) { \
- case ::testing::internal::DeathTest::OVERSEE_TEST: \
- if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
- } \
- break; \
- case ::testing::internal::DeathTest::EXECUTE_TEST: { \
- ::testing::internal::DeathTest::ReturnSentinel \
- gtest_sentinel(gtest_dt); \
- GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \
- gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
- break; \
- } \
- default: \
- break; \
- } \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \
- fail(::testing::internal::DeathTest::LastMessage())
-// The symbol "fail" here expands to something into which a message
-// can be streamed.
-
-// A class representing the parsed contents of the
-// --gtest_internal_run_death_test flag, as it existed when
-// RUN_ALL_TESTS was called.
-class InternalRunDeathTestFlag {
- public:
- InternalRunDeathTestFlag(const String& a_file,
- int a_line,
- int an_index,
- int a_write_fd)
- : file_(a_file), line_(a_line), index_(an_index),
- write_fd_(a_write_fd) {}
-
- ~InternalRunDeathTestFlag() {
- if (write_fd_ >= 0)
- posix::Close(write_fd_);
- }
-
- String file() const { return file_; }
- int line() const { return line_; }
- int index() const { return index_; }
- int write_fd() const { return write_fd_; }
-
- private:
- String file_;
- int line_;
- int index_;
- int write_fd_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
-};
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
-
-#else // GTEST_HAS_DEATH_TEST
-
-// This macro is used for implementing macros such as
-// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
-// death tests are not supported. Those macros must compile on such systems
-// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
-// systems that support death tests. This allows one to write such a macro
-// on a system that does not support death tests and be sure that it will
-// compile on a death-test supporting system.
-//
-// Parameters:
-// statement - A statement that a macro such as EXPECT_DEATH would test
-// for program termination. This macro has to make sure this
-// statement is compiled but not executed, to ensure that
-// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
-// parameter iff EXPECT_DEATH compiles with it.
-// regex - A regex that a macro such as EXPECT_DEATH would use to test
-// the output of statement. This parameter has to be
-// compiled but not evaluated by this macro, to ensure that
-// this macro only accepts expressions that a macro such as
-// EXPECT_DEATH would accept.
-// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
-// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
-// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
-// compile inside functions where ASSERT_DEATH doesn't
-// compile.
-//
-// The branch that has an always false condition is used to ensure that
-// statement and regex are compiled (and thus syntactically correct) but
-// never executed. The unreachable code macro protects the terminator
-// statement from generating an 'unreachable code' warning in case
-// statement unconditionally returns or throws. The Message constructor at
-// the end allows the syntax of streaming additional messages into the
-// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
-# define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- GTEST_LOG_(WARNING) \
- << "Death tests are not supported on this platform.\n" \
- << "Statement '" #statement "' cannot be verified."; \
- } else if (::testing::internal::AlwaysFalse()) { \
- ::testing::internal::RE::PartialMatch(".*", (regex)); \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- terminator; \
- } else \
- ::testing::Message()
-
-#endif // GTEST_HAS_DEATH_TEST
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-filepath.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-filepath.h
deleted file mode 100644
index b36b3cf21..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-filepath.h
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: keith.ray@gmail.com (Keith Ray)
-//
-// Google Test filepath utilities
-//
-// This header file declares classes and functions used internally by
-// Google Test. They are subject to change without notice.
-//
-// This file is #included in <gtest/internal/gtest-internal.h>.
-// Do not include this header file separately!
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-
-#include "gtest/internal/gtest-string.h"
-
-namespace testing {
-namespace internal {
-
-// FilePath - a class for file and directory pathname manipulation which
-// handles platform-specific conventions (like the pathname separator).
-// Used for helper functions for naming files in a directory for xml output.
-// Except for Set methods, all methods are const or static, which provides an
-// "immutable value object" -- useful for peace of mind.
-// A FilePath with a value ending in a path separator ("like/this/") represents
-// a directory, otherwise it is assumed to represent a file. In either case,
-// it may or may not represent an actual file or directory in the file system.
-// Names are NOT checked for syntax correctness -- no checking for illegal
-// characters, malformed paths, etc.
-
-class GTEST_API_ FilePath {
- public:
- FilePath() : pathname_("") { }
- FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
-
- explicit FilePath(const char* pathname) : pathname_(pathname) {
- Normalize();
- }
-
- explicit FilePath(const String& pathname) : pathname_(pathname) {
- Normalize();
- }
-
- FilePath& operator=(const FilePath& rhs) {
- Set(rhs);
- return *this;
- }
-
- void Set(const FilePath& rhs) {
- pathname_ = rhs.pathname_;
- }
-
- String ToString() const { return pathname_; }
- const char* c_str() const { return pathname_.c_str(); }
-
- // Returns the current working directory, or "" if unsuccessful.
- static FilePath GetCurrentDir();
-
- // Given directory = "dir", base_name = "test", number = 0,
- // extension = "xml", returns "dir/test.xml". If number is greater
- // than zero (e.g., 12), returns "dir/test_12.xml".
- // On Windows platform, uses \ as the separator rather than /.
- static FilePath MakeFileName(const FilePath& directory,
- const FilePath& base_name,
- int number,
- const char* extension);
-
- // Given directory = "dir", relative_path = "test.xml",
- // returns "dir/test.xml".
- // On Windows, uses \ as the separator rather than /.
- static FilePath ConcatPaths(const FilePath& directory,
- const FilePath& relative_path);
-
- // Returns a pathname for a file that does not currently exist. The pathname
- // will be directory/base_name.extension or
- // directory/base_name_<number>.extension if directory/base_name.extension
- // already exists. The number will be incremented until a pathname is found
- // that does not already exist.
- // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
- // There could be a race condition if two or more processes are calling this
- // function at the same time -- they could both pick the same filename.
- static FilePath GenerateUniqueFileName(const FilePath& directory,
- const FilePath& base_name,
- const char* extension);
-
- // Returns true iff the path is NULL or "".
- bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; }
-
- // If input name has a trailing separator character, removes it and returns
- // the name, otherwise return the name string unmodified.
- // On Windows platform, uses \ as the separator, other platforms use /.
- FilePath RemoveTrailingPathSeparator() const;
-
- // Returns a copy of the FilePath with the directory part removed.
- // Example: FilePath("path/to/file").RemoveDirectoryName() returns
- // FilePath("file"). If there is no directory part ("just_a_file"), it returns
- // the FilePath unmodified. If there is no file part ("just_a_dir/") it
- // returns an empty FilePath ("").
- // On Windows platform, '\' is the path separator, otherwise it is '/'.
- FilePath RemoveDirectoryName() const;
-
- // RemoveFileName returns the directory path with the filename removed.
- // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
- // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
- // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
- // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
- // On Windows platform, '\' is the path separator, otherwise it is '/'.
- FilePath RemoveFileName() const;
-
- // Returns a copy of the FilePath with the case-insensitive extension removed.
- // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
- // FilePath("dir/file"). If a case-insensitive extension is not
- // found, returns a copy of the original FilePath.
- FilePath RemoveExtension(const char* extension) const;
-
- // Creates directories so that path exists. Returns true if successful or if
- // the directories already exist; returns false if unable to create
- // directories for any reason. Will also return false if the FilePath does
- // not represent a directory (that is, it doesn't end with a path separator).
- bool CreateDirectoriesRecursively() const;
-
- // Create the directory so that path exists. Returns true if successful or
- // if the directory already exists; returns false if unable to create the
- // directory for any reason, including if the parent directory does not
- // exist. Not named "CreateDirectory" because that's a macro on Windows.
- bool CreateFolder() const;
-
- // Returns true if FilePath describes something in the file-system,
- // either a file, directory, or whatever, and that something exists.
- bool FileOrDirectoryExists() const;
-
- // Returns true if pathname describes a directory in the file-system
- // that exists.
- bool DirectoryExists() const;
-
- // Returns true if FilePath ends with a path separator, which indicates that
- // it is intended to represent a directory. Returns false otherwise.
- // This does NOT check that a directory (or file) actually exists.
- bool IsDirectory() const;
-
- // Returns true if pathname describes a root directory. (Windows has one
- // root directory per disk drive.)
- bool IsRootDirectory() const;
-
- // Returns true if pathname describes an absolute path.
- bool IsAbsolutePath() const;
-
- private:
- // Replaces multiple consecutive separators with a single separator.
- // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
- // redundancies that might be in a pathname involving "." or "..".
- //
- // A pathname with multiple consecutive separators may occur either through
- // user error or as a result of some scripts or APIs that generate a pathname
- // with a trailing separator. On other platforms the same API or script
- // may NOT generate a pathname with a trailing "/". Then elsewhere that
- // pathname may have another "/" and pathname components added to it,
- // without checking for the separator already being there.
- // The script language and operating system may allow paths like "foo//bar"
- // but some of the functions in FilePath will not handle that correctly. In
- // particular, RemoveTrailingPathSeparator() only removes one separator, and
- // it is called in CreateDirectoriesRecursively() assuming that it will change
- // a pathname from directory syntax (trailing separator) to filename syntax.
- //
- // On Windows this method also replaces the alternate path separator '/' with
- // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
- // "bar\\foo".
-
- void Normalize();
-
- // Returns a pointer to the last occurence of a valid path separator in
- // the FilePath. On Windows, for example, both '/' and '\' are valid path
- // separators. Returns NULL if no path separator was found.
- const char* FindLastPathSeparator() const;
-
- String pathname_;
-}; // class FilePath
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-internal.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-internal.h
deleted file mode 100644
index 7aa1197f1..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-internal.h
+++ /dev/null
@@ -1,1226 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file declares functions and macros used internally by
-// Google Test. They are subject to change without notice.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_OS_LINUX
-# include <stdlib.h>
-# include <sys/types.h>
-# include <sys/wait.h>
-# include <unistd.h>
-#endif // GTEST_OS_LINUX
-
-#include <ctype.h>
-#include <string.h>
-#include <iomanip>
-#include <limits>
-#include <set>
-
-#include "gtest/internal/gtest-string.h"
-#include "gtest/internal/gtest-filepath.h"
-#include "gtest/internal/gtest-type-util.h"
-
-// Due to C++ preprocessor weirdness, we need double indirection to
-// concatenate two tokens when one of them is __LINE__. Writing
-//
-// foo ## __LINE__
-//
-// will result in the token foo__LINE__, instead of foo followed by
-// the current line number. For more details, see
-// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
-#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
-#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
-
-// Google Test defines the testing::Message class to allow construction of
-// test messages via the << operator. The idea is that anything
-// streamable to std::ostream can be streamed to a testing::Message.
-// This allows a user to use his own types in Google Test assertions by
-// overloading the << operator.
-//
-// util/gtl/stl_logging-inl.h overloads << for STL containers. These
-// overloads cannot be defined in the std namespace, as that will be
-// undefined behavior. Therefore, they are defined in the global
-// namespace instead.
-//
-// C++'s symbol lookup rule (i.e. Koenig lookup) says that these
-// overloads are visible in either the std namespace or the global
-// namespace, but not other namespaces, including the testing
-// namespace which Google Test's Message class is in.
-//
-// To allow STL containers (and other types that has a << operator
-// defined in the global namespace) to be used in Google Test assertions,
-// testing::Message must access the custom << operator from the global
-// namespace. Hence this helper function.
-//
-// Note: Jeffrey Yasskin suggested an alternative fix by "using
-// ::operator<<;" in the definition of Message's operator<<. That fix
-// doesn't require a helper function, but unfortunately doesn't
-// compile with MSVC.
-template <typename T>
-inline void GTestStreamToHelper(std::ostream* os, const T& val) {
- *os << val;
-}
-
-class ProtocolMessage;
-namespace proto2 { class Message; }
-
-namespace testing {
-
-// Forward declarations.
-
-class AssertionResult; // Result of an assertion.
-class Message; // Represents a failure message.
-class Test; // Represents a test.
-class TestInfo; // Information about a test.
-class TestPartResult; // Result of a test part.
-class UnitTest; // A collection of test cases.
-
-template <typename T>
-::std::string PrintToString(const T& value);
-
-namespace internal {
-
-struct TraceInfo; // Information about a trace point.
-class ScopedTrace; // Implements scoped trace.
-class TestInfoImpl; // Opaque implementation of TestInfo
-class UnitTestImpl; // Opaque implementation of UnitTest
-
-// How many times InitGoogleTest() has been called.
-extern int g_init_gtest_count;
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-GTEST_API_ extern const char kStackTraceMarker[];
-
-// A secret type that Google Test users don't know about. It has no
-// definition on purpose. Therefore it's impossible to create a
-// Secret object, which is what we want.
-class Secret;
-
-// Two overloaded helpers for checking at compile time whether an
-// expression is a null pointer literal (i.e. NULL or any 0-valued
-// compile-time integral constant). Their return values have
-// different sizes, so we can use sizeof() to test which version is
-// picked by the compiler. These helpers have no implementations, as
-// we only need their signatures.
-//
-// Given IsNullLiteralHelper(x), the compiler will pick the first
-// version if x can be implicitly converted to Secret*, and pick the
-// second version otherwise. Since Secret is a secret and incomplete
-// type, the only expression a user can write that has type Secret* is
-// a null pointer literal. Therefore, we know that x is a null
-// pointer literal if and only if the first version is picked by the
-// compiler.
-char IsNullLiteralHelper(Secret* p);
-char (&IsNullLiteralHelper(...))[2]; // NOLINT
-
-// A compile-time bool constant that is true if and only if x is a
-// null pointer literal (i.e. NULL or any 0-valued compile-time
-// integral constant).
-#ifdef GTEST_ELLIPSIS_NEEDS_POD_
-// We lose support for NULL detection where the compiler doesn't like
-// passing non-POD classes through ellipsis (...).
-# define GTEST_IS_NULL_LITERAL_(x) false
-#else
-# define GTEST_IS_NULL_LITERAL_(x) \
- (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
-#endif // GTEST_ELLIPSIS_NEEDS_POD_
-
-// Appends the user-supplied message to the Google-Test-generated message.
-GTEST_API_ String AppendUserMessage(const String& gtest_msg,
- const Message& user_msg);
-
-// A helper class for creating scoped traces in user programs.
-class GTEST_API_ ScopedTrace {
- public:
- // The c'tor pushes the given source file location and message onto
- // a trace stack maintained by Google Test.
- ScopedTrace(const char* file, int line, const Message& message);
-
- // The d'tor pops the info pushed by the c'tor.
- //
- // Note that the d'tor is not virtual in order to be efficient.
- // Don't inherit from ScopedTrace!
- ~ScopedTrace();
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
-} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
- // c'tor and d'tor. Therefore it doesn't
- // need to be used otherwise.
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-// Declared here but defined in gtest.h, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable);
-
-// The Symbian compiler has a bug that prevents it from selecting the
-// correct overload of FormatForComparisonFailureMessage (see below)
-// unless we pass the first argument by reference. If we do that,
-// however, Visual Age C++ 10.1 generates a compiler error. Therefore
-// we only apply the work-around for Symbian.
-#if defined(__SYMBIAN32__)
-# define GTEST_CREF_WORKAROUND_ const&
-#else
-# define GTEST_CREF_WORKAROUND_
-#endif
-
-// When this operand is a const char* or char*, if the other operand
-// is a ::std::string or ::string, we print this operand as a C string
-// rather than a pointer (we do the same for wide strings); otherwise
-// we print it as a pointer to be safe.
-
-// This internal macro is used to avoid duplicated code.
-#define GTEST_FORMAT_IMPL_(operand2_type, operand1_printer)\
-inline String FormatForComparisonFailureMessage(\
- operand2_type::value_type* GTEST_CREF_WORKAROUND_ str, \
- const operand2_type& /*operand2*/) {\
- return operand1_printer(str);\
-}\
-inline String FormatForComparisonFailureMessage(\
- const operand2_type::value_type* GTEST_CREF_WORKAROUND_ str, \
- const operand2_type& /*operand2*/) {\
- return operand1_printer(str);\
-}
-
-GTEST_FORMAT_IMPL_(::std::string, String::ShowCStringQuoted)
-#if GTEST_HAS_STD_WSTRING
-GTEST_FORMAT_IMPL_(::std::wstring, String::ShowWideCStringQuoted)
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_FORMAT_IMPL_(::string, String::ShowCStringQuoted)
-#endif // GTEST_HAS_GLOBAL_STRING
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_FORMAT_IMPL_(::wstring, String::ShowWideCStringQuoted)
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#undef GTEST_FORMAT_IMPL_
-
-// The next four overloads handle the case where the operand being
-// printed is a char/wchar_t pointer and the other operand is not a
-// string/wstring object. In such cases, we just print the operand as
-// a pointer to be safe.
-#define GTEST_FORMAT_CHAR_PTR_IMPL_(CharType) \
- template <typename T> \
- String FormatForComparisonFailureMessage(CharType* GTEST_CREF_WORKAROUND_ p, \
- const T&) { \
- return PrintToString(static_cast<const void*>(p)); \
- }
-
-GTEST_FORMAT_CHAR_PTR_IMPL_(char)
-GTEST_FORMAT_CHAR_PTR_IMPL_(const char)
-GTEST_FORMAT_CHAR_PTR_IMPL_(wchar_t)
-GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t)
-
-#undef GTEST_FORMAT_CHAR_PTR_IMPL_
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings. For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-// expected_expression: "foo"
-// actual_expression: "bar"
-// expected_value: "5"
-// actual_value: "6"
-//
-// The ignoring_case parameter is true iff the assertion is a
-// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
- const char* actual_expression,
- const String& expected_value,
- const String& actual_value,
- bool ignoring_case);
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-GTEST_API_ String GetBoolAssertionFailureMessage(
- const AssertionResult& assertion_result,
- const char* expression_text,
- const char* actual_predicate_value,
- const char* expected_predicate_value);
-
-// This template class represents an IEEE floating-point number
-// (either single-precision or double-precision, depending on the
-// template parameters).
-//
-// The purpose of this class is to do more sophisticated number
-// comparison. (Due to round-off error, etc, it's very unlikely that
-// two floating-points will be equal exactly. Hence a naive
-// comparison by the == operation often doesn't work.)
-//
-// Format of IEEE floating-point:
-//
-// The most-significant bit being the leftmost, an IEEE
-// floating-point looks like
-//
-// sign_bit exponent_bits fraction_bits
-//
-// Here, sign_bit is a single bit that designates the sign of the
-// number.
-//
-// For float, there are 8 exponent bits and 23 fraction bits.
-//
-// For double, there are 11 exponent bits and 52 fraction bits.
-//
-// More details can be found at
-// http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
-//
-// Template parameter:
-//
-// RawType: the raw floating-point type (either float or double)
-template <typename RawType>
-class FloatingPoint {
- public:
- // Defines the unsigned integer type that has the same size as the
- // floating point number.
- typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;
-
- // Constants.
-
- // # of bits in a number.
- static const size_t kBitCount = 8*sizeof(RawType);
-
- // # of fraction bits in a number.
- static const size_t kFractionBitCount =
- std::numeric_limits<RawType>::digits - 1;
-
- // # of exponent bits in a number.
- static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
-
- // The mask for the sign bit.
- static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
-
- // The mask for the fraction bits.
- static const Bits kFractionBitMask =
- ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
-
- // The mask for the exponent bits.
- static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
-
- // How many ULP's (Units in the Last Place) we want to tolerate when
- // comparing two numbers. The larger the value, the more error we
- // allow. A 0 value means that two numbers must be exactly the same
- // to be considered equal.
- //
- // The maximum error of a single floating-point operation is 0.5
- // units in the last place. On Intel CPU's, all floating-point
- // calculations are done with 80-bit precision, while double has 64
- // bits. Therefore, 4 should be enough for ordinary use.
- //
- // See the following article for more details on ULP:
- // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm.
- static const size_t kMaxUlps = 4;
-
- // Constructs a FloatingPoint from a raw floating-point number.
- //
- // On an Intel CPU, passing a non-normalized NAN (Not a Number)
- // around may change its bits, although the new value is guaranteed
- // to be also a NAN. Therefore, don't expect this constructor to
- // preserve the bits in x when x is a NAN.
- explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
-
- // Static methods
-
- // Reinterprets a bit pattern as a floating-point number.
- //
- // This function is needed to test the AlmostEquals() method.
- static RawType ReinterpretBits(const Bits bits) {
- FloatingPoint fp(0);
- fp.u_.bits_ = bits;
- return fp.u_.value_;
- }
-
- // Returns the floating-point number that represent positive infinity.
- static RawType Infinity() {
- return ReinterpretBits(kExponentBitMask);
- }
-
- // Non-static methods
-
- // Returns the bits that represents this number.
- const Bits &bits() const { return u_.bits_; }
-
- // Returns the exponent bits of this number.
- Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
-
- // Returns the fraction bits of this number.
- Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
-
- // Returns the sign bit of this number.
- Bits sign_bit() const { return kSignBitMask & u_.bits_; }
-
- // Returns true iff this is NAN (not a number).
- bool is_nan() const {
- // It's a NAN if the exponent bits are all ones and the fraction
- // bits are not entirely zeros.
- return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
- }
-
- // Returns true iff this number is at most kMaxUlps ULP's away from
- // rhs. In particular, this function:
- //
- // - returns false if either number is (or both are) NAN.
- // - treats really large numbers as almost equal to infinity.
- // - thinks +0.0 and -0.0 are 0 DLP's apart.
- bool AlmostEquals(const FloatingPoint& rhs) const {
- // The IEEE standard says that any comparison operation involving
- // a NAN must return false.
- if (is_nan() || rhs.is_nan()) return false;
-
- return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
- <= kMaxUlps;
- }
-
- private:
- // The data type used to store the actual floating-point number.
- union FloatingPointUnion {
- RawType value_; // The raw floating-point number.
- Bits bits_; // The bits that represent the number.
- };
-
- // Converts an integer from the sign-and-magnitude representation to
- // the biased representation. More precisely, let N be 2 to the
- // power of (kBitCount - 1), an integer x is represented by the
- // unsigned number x + N.
- //
- // For instance,
- //
- // -N + 1 (the most negative number representable using
- // sign-and-magnitude) is represented by 1;
- // 0 is represented by N; and
- // N - 1 (the biggest number representable using
- // sign-and-magnitude) is represented by 2N - 1.
- //
- // Read http://en.wikipedia.org/wiki/Signed_number_representations
- // for more details on signed number representations.
- static Bits SignAndMagnitudeToBiased(const Bits &sam) {
- if (kSignBitMask & sam) {
- // sam represents a negative number.
- return ~sam + 1;
- } else {
- // sam represents a positive number.
- return kSignBitMask | sam;
- }
- }
-
- // Given two numbers in the sign-and-magnitude representation,
- // returns the distance between them as an unsigned number.
- static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,
- const Bits &sam2) {
- const Bits biased1 = SignAndMagnitudeToBiased(sam1);
- const Bits biased2 = SignAndMagnitudeToBiased(sam2);
- return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
- }
-
- FloatingPointUnion u_;
-};
-
-// Typedefs the instances of the FloatingPoint template class that we
-// care to use.
-typedef FloatingPoint<float> Float;
-typedef FloatingPoint<double> Double;
-
-// In order to catch the mistake of putting tests that use different
-// test fixture classes in the same test case, we need to assign
-// unique IDs to fixture classes and compare them. The TypeId type is
-// used to hold such IDs. The user should treat TypeId as an opaque
-// type: the only operation allowed on TypeId values is to compare
-// them for equality using the == operator.
-typedef const void* TypeId;
-
-template <typename T>
-class TypeIdHelper {
- public:
- // dummy_ must not have a const type. Otherwise an overly eager
- // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
- // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
- static bool dummy_;
-};
-
-template <typename T>
-bool TypeIdHelper<T>::dummy_ = false;
-
-// GetTypeId<T>() returns the ID of type T. Different values will be
-// returned for different types. Calling the function twice with the
-// same type argument is guaranteed to return the same ID.
-template <typename T>
-TypeId GetTypeId() {
- // The compiler is required to allocate a different
- // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
- // the template. Therefore, the address of dummy_ is guaranteed to
- // be unique.
- return &(TypeIdHelper<T>::dummy_);
-}
-
-// Returns the type ID of ::testing::Test. Always call this instead
-// of GetTypeId< ::testing::Test>() to get the type ID of
-// ::testing::Test, as the latter may give the wrong result due to a
-// suspected linker bug when compiling Google Test as a Mac OS X
-// framework.
-GTEST_API_ TypeId GetTestTypeId();
-
-// Defines the abstract factory interface that creates instances
-// of a Test object.
-class TestFactoryBase {
- public:
- virtual ~TestFactoryBase() {}
-
- // Creates a test instance to run. The instance is both created and destroyed
- // within TestInfoImpl::Run()
- virtual Test* CreateTest() = 0;
-
- protected:
- TestFactoryBase() {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);
-};
-
-// This class provides implementation of TeastFactoryBase interface.
-// It is used in TEST and TEST_F macros.
-template <class TestClass>
-class TestFactoryImpl : public TestFactoryBase {
- public:
- virtual Test* CreateTest() { return new TestClass; }
-};
-
-#if GTEST_OS_WINDOWS
-
-// Predicate-formatters for implementing the HRESULT checking macros
-// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
-// We pass a long instead of HRESULT to avoid causing an
-// include dependency for the HRESULT type.
-GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
- long hr); // NOLINT
-GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
- long hr); // NOLINT
-
-#endif // GTEST_OS_WINDOWS
-
-// Types of SetUpTestCase() and TearDownTestCase() functions.
-typedef void (*SetUpTestCaseFunc)();
-typedef void (*TearDownTestCaseFunc)();
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// name: name of the test
-// type_param the name of the test's type parameter, or NULL if
-// this is not a typed or a type-parameterized test.
-// value_param text representation of the test's value parameter,
-// or NULL if this is not a type-parameterized test.
-// fixture_class_id: ID of the test fixture class
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-// factory: pointer to the factory that creates a test object.
-// The newly created TestInfo instance will assume
-// ownership of the factory object.
-GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- TypeId fixture_class_id,
- SetUpTestCaseFunc set_up_tc,
- TearDownTestCaseFunc tear_down_tc,
- TestFactoryBase* factory);
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false. None of pstr, *pstr, and prefix can be NULL.
-GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// State of the definition of a type-parameterized test case.
-class GTEST_API_ TypedTestCasePState {
- public:
- TypedTestCasePState() : registered_(false) {}
-
- // Adds the given test name to defined_test_names_ and return true
- // if the test case hasn't been registered; otherwise aborts the
- // program.
- bool AddTestName(const char* file, int line, const char* case_name,
- const char* test_name) {
- if (registered_) {
- fprintf(stderr, "%s Test %s must be defined before "
- "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n",
- FormatFileLocation(file, line).c_str(), test_name, case_name);
- fflush(stderr);
- posix::Abort();
- }
- defined_test_names_.insert(test_name);
- return true;
- }
-
- // Verifies that registered_tests match the test names in
- // defined_test_names_; returns registered_tests if successful, or
- // aborts the program otherwise.
- const char* VerifyRegisteredTestNames(
- const char* file, int line, const char* registered_tests);
-
- private:
- bool registered_;
- ::std::set<const char*> defined_test_names_;
-};
-
-// Skips to the first non-space char after the first comma in 'str';
-// returns NULL if no comma is found in 'str'.
-inline const char* SkipComma(const char* str) {
- const char* comma = strchr(str, ',');
- if (comma == NULL) {
- return NULL;
- }
- while (IsSpace(*(++comma))) {}
- return comma;
-}
-
-// Returns the prefix of 'str' before the first comma in it; returns
-// the entire string if it contains no comma.
-inline String GetPrefixUntilComma(const char* str) {
- const char* comma = strchr(str, ',');
- return comma == NULL ? String(str) : String(str, comma - str);
-}
-
-// TypeParameterizedTest<Fixture, TestSel, Types>::Register()
-// registers a list of type-parameterized tests with Google Test. The
-// return value is insignificant - we just need to return something
-// such that we can call this function in a namespace scope.
-//
-// Implementation note: The GTEST_TEMPLATE_ macro declares a template
-// template parameter. It's defined in gtest-type-util.h.
-template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
-class TypeParameterizedTest {
- public:
- // 'index' is the index of the test in the type list 'Types'
- // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,
- // Types). Valid values for 'index' are [0, N - 1] where N is the
- // length of Types.
- static bool Register(const char* prefix, const char* case_name,
- const char* test_names, int index) {
- typedef typename Types::Head Type;
- typedef Fixture<Type> FixtureClass;
- typedef typename GTEST_BIND_(TestSel, Type) TestClass;
-
- // First, registers the first type-parameterized test in the type
- // list.
- MakeAndRegisterTestInfo(
- String::Format("%s%s%s/%d", prefix, prefix[0] == '\0' ? "" : "/",
- case_name, index).c_str(),
- GetPrefixUntilComma(test_names).c_str(),
- GetTypeName<Type>().c_str(),
- NULL, // No value parameter.
- GetTypeId<FixtureClass>(),
- TestClass::SetUpTestCase,
- TestClass::TearDownTestCase,
- new TestFactoryImpl<TestClass>);
-
- // Next, recurses (at compile time) with the tail of the type list.
- return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>
- ::Register(prefix, case_name, test_names, index + 1);
- }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, class TestSel>
-class TypeParameterizedTest<Fixture, TestSel, Types0> {
- public:
- static bool Register(const char* /*prefix*/, const char* /*case_name*/,
- const char* /*test_names*/, int /*index*/) {
- return true;
- }
-};
-
-// TypeParameterizedTestCase<Fixture, Tests, Types>::Register()
-// registers *all combinations* of 'Tests' and 'Types' with Google
-// Test. The return value is insignificant - we just need to return
-// something such that we can call this function in a namespace scope.
-template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
-class TypeParameterizedTestCase {
- public:
- static bool Register(const char* prefix, const char* case_name,
- const char* test_names) {
- typedef typename Tests::Head Head;
-
- // First, register the first test in 'Test' for each type in 'Types'.
- TypeParameterizedTest<Fixture, Head, Types>::Register(
- prefix, case_name, test_names, 0);
-
- // Next, recurses (at compile time) with the tail of the test list.
- return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>
- ::Register(prefix, case_name, SkipComma(test_names));
- }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, typename Types>
-class TypeParameterizedTestCase<Fixture, Templates0, Types> {
- public:
- static bool Register(const char* /*prefix*/, const char* /*case_name*/,
- const char* /*test_names*/) {
- return true;
- }
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-GTEST_API_ String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test,
- int skip_count);
-
-// Helpers for suppressing warnings on unreachable code or constant
-// condition.
-
-// Always returns true.
-GTEST_API_ bool AlwaysTrue();
-
-// Always returns false.
-inline bool AlwaysFalse() { return !AlwaysTrue(); }
-
-// Helper for suppressing false warning from Clang on a const char*
-// variable declared in a conditional expression always being NULL in
-// the else branch.
-struct GTEST_API_ ConstCharPtr {
- ConstCharPtr(const char* str) : value(str) {}
- operator bool() const { return true; }
- const char* value;
-};
-
-// A simple Linear Congruential Generator for generating random
-// numbers with a uniform distribution. Unlike rand() and srand(), it
-// doesn't use global state (and therefore can't interfere with user
-// code). Unlike rand_r(), it's portable. An LCG isn't very random,
-// but it's good enough for our purposes.
-class GTEST_API_ Random {
- public:
- static const UInt32 kMaxRange = 1u << 31;
-
- explicit Random(UInt32 seed) : state_(seed) {}
-
- void Reseed(UInt32 seed) { state_ = seed; }
-
- // Generates a random number from [0, range). Crashes if 'range' is
- // 0 or greater than kMaxRange.
- UInt32 Generate(UInt32 range);
-
- private:
- UInt32 state_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
-};
-
-// Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
-// compiler error iff T1 and T2 are different types.
-template <typename T1, typename T2>
-struct CompileAssertTypesEqual;
-
-template <typename T>
-struct CompileAssertTypesEqual<T, T> {
-};
-
-// Removes the reference from a type if it is a reference type,
-// otherwise leaves it unchanged. This is the same as
-// tr1::remove_reference, which is not widely available yet.
-template <typename T>
-struct RemoveReference { typedef T type; }; // NOLINT
-template <typename T>
-struct RemoveReference<T&> { typedef T type; }; // NOLINT
-
-// A handy wrapper around RemoveReference that works when the argument
-// T depends on template parameters.
-#define GTEST_REMOVE_REFERENCE_(T) \
- typename ::testing::internal::RemoveReference<T>::type
-
-// Removes const from a type if it is a const type, otherwise leaves
-// it unchanged. This is the same as tr1::remove_const, which is not
-// widely available yet.
-template <typename T>
-struct RemoveConst { typedef T type; }; // NOLINT
-template <typename T>
-struct RemoveConst<const T> { typedef T type; }; // NOLINT
-
-// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
-// definition to fail to remove the const in 'const int[3]' and 'const
-// char[3][4]'. The following specialization works around the bug.
-// However, it causes trouble with GCC and thus needs to be
-// conditionally compiled.
-#if defined(_MSC_VER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-template <typename T, size_t N>
-struct RemoveConst<const T[N]> {
- typedef typename RemoveConst<T>::type type[N];
-};
-#endif
-
-// A handy wrapper around RemoveConst that works when the argument
-// T depends on template parameters.
-#define GTEST_REMOVE_CONST_(T) \
- typename ::testing::internal::RemoveConst<T>::type
-
-// Turns const U&, U&, const U, and U all into U.
-#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
- GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
-
-// Adds reference to a type if it is not a reference type,
-// otherwise leaves it unchanged. This is the same as
-// tr1::add_reference, which is not widely available yet.
-template <typename T>
-struct AddReference { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddReference<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper around AddReference that works when the argument T
-// depends on template parameters.
-#define GTEST_ADD_REFERENCE_(T) \
- typename ::testing::internal::AddReference<T>::type
-
-// Adds a reference to const on top of T as necessary. For example,
-// it transforms
-//
-// char ==> const char&
-// const char ==> const char&
-// char& ==> const char&
-// const char& ==> const char&
-//
-// The argument T must depend on some template parameters.
-#define GTEST_REFERENCE_TO_CONST_(T) \
- GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
-
-// ImplicitlyConvertible<From, To>::value is a compile-time bool
-// constant that's true iff type From can be implicitly converted to
-// type To.
-template <typename From, typename To>
-class ImplicitlyConvertible {
- private:
- // We need the following helper functions only for their types.
- // They have no implementations.
-
- // MakeFrom() is an expression whose type is From. We cannot simply
- // use From(), as the type From may not have a public default
- // constructor.
- static From MakeFrom();
-
- // These two functions are overloaded. Given an expression
- // Helper(x), the compiler will pick the first version if x can be
- // implicitly converted to type To; otherwise it will pick the
- // second version.
- //
- // The first version returns a value of size 1, and the second
- // version returns a value of size 2. Therefore, by checking the
- // size of Helper(x), which can be done at compile time, we can tell
- // which version of Helper() is used, and hence whether x can be
- // implicitly converted to type To.
- static char Helper(To);
- static char (&Helper(...))[2]; // NOLINT
-
- // We have to put the 'public' section after the 'private' section,
- // or MSVC refuses to compile the code.
- public:
- // MSVC warns about implicitly converting from double to int for
- // possible loss of data, so we need to temporarily disable the
- // warning.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4244) // Temporarily disables warning 4244.
-
- static const bool value =
- sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
-# pragma warning(pop) // Restores the warning state.
-#elif defined(__BORLANDC__)
- // C++Builder cannot use member overload resolution during template
- // instantiation. The simplest workaround is to use its C++0x type traits
- // functions (C++Builder 2009 and above only).
- static const bool value = __is_convertible(From, To);
-#else
- static const bool value =
- sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
-#endif // _MSV_VER
-};
-template <typename From, typename To>
-const bool ImplicitlyConvertible<From, To>::value;
-
-// IsAProtocolMessage<T>::value is a compile-time bool constant that's
-// true iff T is type ProtocolMessage, proto2::Message, or a subclass
-// of those.
-template <typename T>
-struct IsAProtocolMessage
- : public bool_constant<
- ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value ||
- ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {
-};
-
-// When the compiler sees expression IsContainerTest<C>(0), if C is an
-// STL-style container class, the first overload of IsContainerTest
-// will be viable (since both C::iterator* and C::const_iterator* are
-// valid types and NULL can be implicitly converted to them). It will
-// be picked over the second overload as 'int' is a perfect match for
-// the type of argument 0. If C::iterator or C::const_iterator is not
-// a valid type, the first overload is not viable, and the second
-// overload will be picked. Therefore, we can determine whether C is
-// a container class by checking the type of IsContainerTest<C>(0).
-// The value of the expression is insignificant.
-//
-// Note that we look for both C::iterator and C::const_iterator. The
-// reason is that C++ injects the name of a class as a member of the
-// class itself (e.g. you can refer to class iterator as either
-// 'iterator' or 'iterator::iterator'). If we look for C::iterator
-// only, for example, we would mistakenly think that a class named
-// iterator is an STL container.
-//
-// Also note that the simpler approach of overloading
-// IsContainerTest(typename C::const_iterator*) and
-// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
-typedef int IsContainer;
-template <class C>
-IsContainer IsContainerTest(int /* dummy */,
- typename C::iterator* /* it */ = NULL,
- typename C::const_iterator* /* const_it */ = NULL) {
- return 0;
-}
-
-typedef char IsNotContainer;
-template <class C>
-IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
-
-// EnableIf<condition>::type is void when 'Cond' is true, and
-// undefined when 'Cond' is false. To use SFINAE to make a function
-// overload only apply when a particular expression is true, add
-// "typename EnableIf<expression>::type* = 0" as the last parameter.
-template<bool> struct EnableIf;
-template<> struct EnableIf<true> { typedef void type; }; // NOLINT
-
-// Utilities for native arrays.
-
-// ArrayEq() compares two k-dimensional native arrays using the
-// elements' operator==, where k can be any integer >= 0. When k is
-// 0, ArrayEq() degenerates into comparing a single pair of values.
-
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {
- return internal::ArrayEq(lhs, N, rhs);
-}
-
-// This helper reduces code bloat. If we instead put its logic inside
-// the previous ArrayEq() function, arrays with different sizes would
-// lead to different copies of the template code.
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
- for (size_t i = 0; i != size; i++) {
- if (!internal::ArrayEq(lhs[i], rhs[i]))
- return false;
- }
- return true;
-}
-
-// Finds the first element in the iterator range [begin, end) that
-// equals elem. Element may be a native array type itself.
-template <typename Iter, typename Element>
-Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
- for (Iter it = begin; it != end; ++it) {
- if (internal::ArrayEq(*it, elem))
- return it;
- }
- return end;
-}
-
-// CopyArray() copies a k-dimensional native array using the elements'
-// operator=, where k can be any integer >= 0. When k is 0,
-// CopyArray() degenerates into copying a single value.
-
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline void CopyArray(const T& from, U* to) { *to = from; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline void CopyArray(const T(&from)[N], U(*to)[N]) {
- internal::CopyArray(from, N, *to);
-}
-
-// This helper reduces code bloat. If we instead put its logic inside
-// the previous CopyArray() function, arrays with different sizes
-// would lead to different copies of the template code.
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to) {
- for (size_t i = 0; i != size; i++) {
- internal::CopyArray(from[i], to + i);
- }
-}
-
-// The relation between an NativeArray object (see below) and the
-// native array it represents.
-enum RelationToSource {
- kReference, // The NativeArray references the native array.
- kCopy // The NativeArray makes a copy of the native array and
- // owns the copy.
-};
-
-// Adapts a native array to a read-only STL-style container. Instead
-// of the complete STL container concept, this adaptor only implements
-// members useful for Google Mock's container matchers. New members
-// should be added as needed. To simplify the implementation, we only
-// support Element being a raw type (i.e. having no top-level const or
-// reference modifier). It's the client's responsibility to satisfy
-// this requirement. Element can be an array type itself (hence
-// multi-dimensional arrays are supported).
-template <typename Element>
-class NativeArray {
- public:
- // STL-style container typedefs.
- typedef Element value_type;
- typedef Element* iterator;
- typedef const Element* const_iterator;
-
- // Constructs from a native array.
- NativeArray(const Element* array, size_t count, RelationToSource relation) {
- Init(array, count, relation);
- }
-
- // Copy constructor.
- NativeArray(const NativeArray& rhs) {
- Init(rhs.array_, rhs.size_, rhs.relation_to_source_);
- }
-
- ~NativeArray() {
- // Ensures that the user doesn't instantiate NativeArray with a
- // const or reference type.
- static_cast<void>(StaticAssertTypeEqHelper<Element,
- GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>());
- if (relation_to_source_ == kCopy)
- delete[] array_;
- }
-
- // STL-style container methods.
- size_t size() const { return size_; }
- const_iterator begin() const { return array_; }
- const_iterator end() const { return array_ + size_; }
- bool operator==(const NativeArray& rhs) const {
- return size() == rhs.size() &&
- ArrayEq(begin(), size(), rhs.begin());
- }
-
- private:
- // Initializes this object; makes a copy of the input array if
- // 'relation' is kCopy.
- void Init(const Element* array, size_t a_size, RelationToSource relation) {
- if (relation == kReference) {
- array_ = array;
- } else {
- Element* const copy = new Element[a_size];
- CopyArray(array, a_size, copy);
- array_ = copy;
- }
- size_ = a_size;
- relation_to_source_ = relation;
- }
-
- const Element* array_;
- size_t size_;
- RelationToSource relation_to_source_;
-
- GTEST_DISALLOW_ASSIGN_(NativeArray);
-};
-
-} // namespace internal
-} // namespace testing
-
-#define GTEST_MESSAGE_AT_(file, line, message, result_type) \
- ::testing::internal::AssertHelper(result_type, file, line, message) \
- = ::testing::Message()
-
-#define GTEST_MESSAGE_(message, result_type) \
- GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
-
-#define GTEST_FATAL_FAILURE_(message) \
- return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
-
-#define GTEST_NONFATAL_FAILURE_(message) \
- GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
-
-#define GTEST_SUCCESS_(message) \
- GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
-
-// Suppresses MSVC warnings 4072 (unreachable code) for the code following
-// statement if it returns or throws (or doesn't return or throw in some
-// situations).
-#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
- if (::testing::internal::AlwaysTrue()) { statement; }
-
-#define GTEST_TEST_THROW_(statement, expected_exception, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::ConstCharPtr gtest_msg = "") { \
- bool gtest_caught_expected = false; \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (expected_exception const&) { \
- gtest_caught_expected = true; \
- } \
- catch (...) { \
- gtest_msg.value = \
- "Expected: " #statement " throws an exception of type " \
- #expected_exception ".\n Actual: it throws a different type."; \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
- } \
- if (!gtest_caught_expected) { \
- gtest_msg.value = \
- "Expected: " #statement " throws an exception of type " \
- #expected_exception ".\n Actual: it throws nothing."; \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \
- fail(gtest_msg.value)
-
-#define GTEST_TEST_NO_THROW_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (...) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
- fail("Expected: " #statement " doesn't throw an exception.\n" \
- " Actual: it throws.")
-
-#define GTEST_TEST_ANY_THROW_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- bool gtest_caught_any = false; \
- try { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } \
- catch (...) { \
- gtest_caught_any = true; \
- } \
- if (!gtest_caught_any) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
- fail("Expected: " #statement " throws an exception.\n" \
- " Actual: it doesn't.")
-
-
-// Implements Boolean test assertions such as EXPECT_TRUE. expression can be
-// either a boolean expression or an AssertionResult. text is a textual
-// represenation of expression as it was passed into the EXPECT_TRUE.
-#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar_ = \
- ::testing::AssertionResult(expression)) \
- ; \
- else \
- fail(::testing::internal::GetBoolAssertionFailureMessage(\
- gtest_ar_, text, #actual, #expected).c_str())
-
-#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
- goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
- } \
- } else \
- GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
- fail("Expected: " #statement " doesn't generate new fatal " \
- "failures in the current thread.\n" \
- " Actual: it does.")
-
-// Expands to the name of the class that implements the given test.
-#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
- test_case_name##_##test_name##_Test
-
-// Helper macro for defining tests.
-#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\
-class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
- public:\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
- private:\
- virtual void TestBody();\
- static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
-};\
-\
-::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
- ::test_info_ =\
- ::testing::internal::MakeAndRegisterTestInfo(\
- #test_case_name, #test_name, NULL, NULL, \
- (parent_id), \
- parent_class::SetUpTestCase, \
- parent_class::TearDownTestCase, \
- new ::testing::internal::TestFactoryImpl<\
- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
-void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-linked_ptr.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-linked_ptr.h
deleted file mode 100644
index 57147b4e8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-linked_ptr.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright 2003 Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: Dan Egnor (egnor@google.com)
-//
-// A "smart" pointer type with reference tracking. Every pointer to a
-// particular object is kept on a circular linked list. When the last pointer
-// to an object is destroyed or reassigned, the object is deleted.
-//
-// Used properly, this deletes the object when the last reference goes away.
-// There are several caveats:
-// - Like all reference counting schemes, cycles lead to leaks.
-// - Each smart pointer is actually two pointers (8 bytes instead of 4).
-// - Every time a pointer is assigned, the entire list of pointers to that
-// object is traversed. This class is therefore NOT SUITABLE when there
-// will often be more than two or three pointers to a particular object.
-// - References are only tracked as long as linked_ptr<> objects are copied.
-// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS
-// will happen (double deletion).
-//
-// A good use of this class is storing object references in STL containers.
-// You can safely put linked_ptr<> in a vector<>.
-// Other uses may not be as good.
-//
-// Note: If you use an incomplete type with linked_ptr<>, the class
-// *containing* linked_ptr<> must have a constructor and destructor (even
-// if they do nothing!).
-//
-// Bill Gibbons suggested we use something like this.
-//
-// Thread Safety:
-// Unlike other linked_ptr implementations, in this implementation
-// a linked_ptr object is thread-safe in the sense that:
-// - it's safe to copy linked_ptr objects concurrently,
-// - it's safe to copy *from* a linked_ptr and read its underlying
-// raw pointer (e.g. via get()) concurrently, and
-// - it's safe to write to two linked_ptrs that point to the same
-// shared object concurrently.
-// TODO(wan@google.com): rename this to safe_linked_ptr to avoid
-// confusion with normal linked_ptr.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
-
-#include <stdlib.h>
-#include <assert.h>
-
-#include "gtest/internal/gtest-port.h"
-
-namespace testing {
-namespace internal {
-
-// Protects copying of all linked_ptr objects.
-GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
-
-// This is used internally by all instances of linked_ptr<>. It needs to be
-// a non-template class because different types of linked_ptr<> can refer to
-// the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)).
-// So, it needs to be possible for different types of linked_ptr to participate
-// in the same circular linked list, so we need a single class type here.
-//
-// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr<T>.
-class linked_ptr_internal {
- public:
- // Create a new circle that includes only this instance.
- void join_new() {
- next_ = this;
- }
-
- // Many linked_ptr operations may change p.link_ for some linked_ptr
- // variable p in the same circle as this object. Therefore we need
- // to prevent two such operations from occurring concurrently.
- //
- // Note that different types of linked_ptr objects can coexist in a
- // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and
- // linked_ptr<Derived2>). Therefore we must use a single mutex to
- // protect all linked_ptr objects. This can create serious
- // contention in production code, but is acceptable in a testing
- // framework.
-
- // Join an existing circle.
- // L < g_linked_ptr_mutex
- void join(linked_ptr_internal const* ptr) {
- MutexLock lock(&g_linked_ptr_mutex);
-
- linked_ptr_internal const* p = ptr;
- while (p->next_ != ptr) p = p->next_;
- p->next_ = this;
- next_ = ptr;
- }
-
- // Leave whatever circle we're part of. Returns true if we were the
- // last member of the circle. Once this is done, you can join() another.
- // L < g_linked_ptr_mutex
- bool depart() {
- MutexLock lock(&g_linked_ptr_mutex);
-
- if (next_ == this) return true;
- linked_ptr_internal const* p = next_;
- while (p->next_ != this) p = p->next_;
- p->next_ = next_;
- return false;
- }
-
- private:
- mutable linked_ptr_internal const* next_;
-};
-
-template <typename T>
-class linked_ptr {
- public:
- typedef T element_type;
-
- // Take over ownership of a raw pointer. This should happen as soon as
- // possible after the object is created.
- explicit linked_ptr(T* ptr = NULL) { capture(ptr); }
- ~linked_ptr() { depart(); }
-
- // Copy an existing linked_ptr<>, adding ourselves to the list of references.
- template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }
- linked_ptr(linked_ptr const& ptr) { // NOLINT
- assert(&ptr != this);
- copy(&ptr);
- }
-
- // Assignment releases the old value and acquires the new.
- template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) {
- depart();
- copy(&ptr);
- return *this;
- }
-
- linked_ptr& operator=(linked_ptr const& ptr) {
- if (&ptr != this) {
- depart();
- copy(&ptr);
- }
- return *this;
- }
-
- // Smart pointer members.
- void reset(T* ptr = NULL) {
- depart();
- capture(ptr);
- }
- T* get() const { return value_; }
- T* operator->() const { return value_; }
- T& operator*() const { return *value_; }
-
- bool operator==(T* p) const { return value_ == p; }
- bool operator!=(T* p) const { return value_ != p; }
- template <typename U>
- bool operator==(linked_ptr<U> const& ptr) const {
- return value_ == ptr.get();
- }
- template <typename U>
- bool operator!=(linked_ptr<U> const& ptr) const {
- return value_ != ptr.get();
- }
-
- private:
- template <typename U>
- friend class linked_ptr;
-
- T* value_;
- linked_ptr_internal link_;
-
- void depart() {
- if (link_.depart()) delete value_;
- }
-
- void capture(T* ptr) {
- value_ = ptr;
- link_.join_new();
- }
-
- template <typename U> void copy(linked_ptr<U> const* ptr) {
- value_ = ptr->get();
- if (value_)
- link_.join(&ptr->link_);
- else
- link_.join_new();
- }
-};
-
-template<typename T> inline
-bool operator==(T* ptr, const linked_ptr<T>& x) {
- return ptr == x.get();
-}
-
-template<typename T> inline
-bool operator!=(T* ptr, const linked_ptr<T>& x) {
- return ptr != x.get();
-}
-
-// A function to convert T* into linked_ptr<T>
-// Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation
-// for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
-template <typename T>
-linked_ptr<T> make_linked_ptr(T* ptr) {
- return linked_ptr<T>(ptr);
-}
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h
deleted file mode 100644
index 258267500..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h
+++ /dev/null
@@ -1,4822 +0,0 @@
-// This file was GENERATED by command:
-// pump.py gtest-param-util-generated.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently Google Test supports at most 50 arguments in Values,
-// and at most 10 arguments in Combine. Please contact
-// googletestframework@googlegroups.com if you need more.
-// Please note that the number of arguments to Combine is limited
-// by the maximum arity of the implementation of tr1::tuple which is
-// currently set at 10.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-#include "gtest/internal/gtest-param-util.h"
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Forward declarations of ValuesIn(), which is implemented in
-// include/gtest/gtest-param-test.h.
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end);
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]);
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container);
-
-namespace internal {
-
-// Used in the Values() function to provide polymorphic capabilities.
-template <typename T1>
-class ValueArray1 {
- public:
- explicit ValueArray1(T1 v1) : v1_(v1) {}
-
- template <typename T>
- operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray1& other);
-
- const T1 v1_;
-};
-
-template <typename T1, typename T2>
-class ValueArray2 {
- public:
- ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray2& other);
-
- const T1 v1_;
- const T2 v2_;
-};
-
-template <typename T1, typename T2, typename T3>
-class ValueArray3 {
- public:
- ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray3& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-class ValueArray4 {
- public:
- ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray4& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class ValueArray5 {
- public:
- ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray5& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class ValueArray6 {
- public:
- ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray6& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class ValueArray7 {
- public:
- ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray7& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class ValueArray8 {
- public:
- ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
- T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray8& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class ValueArray9 {
- public:
- ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
- T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray9& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class ValueArray10 {
- public:
- ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray10& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-class ValueArray11 {
- public:
- ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray11& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-class ValueArray12 {
- public:
- ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray12& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-class ValueArray13 {
- public:
- ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray13& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-class ValueArray14 {
- public:
- ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray14& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-class ValueArray15 {
- public:
- ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray15& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-class ValueArray16 {
- public:
- ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray16& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-class ValueArray17 {
- public:
- ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
- T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray17& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-class ValueArray18 {
- public:
- ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray18& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-class ValueArray19 {
- public:
- ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray19& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-class ValueArray20 {
- public:
- ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray20& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-class ValueArray21 {
- public:
- ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray21& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-class ValueArray22 {
- public:
- ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray22& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-class ValueArray23 {
- public:
- ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_,
- v23_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray23& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-class ValueArray24 {
- public:
- ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray24& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-class ValueArray25 {
- public:
- ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
- T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray25& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-class ValueArray26 {
- public:
- ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray26& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-class ValueArray27 {
- public:
- ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray27& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-class ValueArray28 {
- public:
- ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray28& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-class ValueArray29 {
- public:
- ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray29& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-class ValueArray30 {
- public:
- ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray30& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-class ValueArray31 {
- public:
- ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray31& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-class ValueArray32 {
- public:
- ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray32& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-class ValueArray33 {
- public:
- ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
- T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray33& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-class ValueArray34 {
- public:
- ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray34& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-class ValueArray35 {
- public:
- ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
- v32_(v32), v33_(v33), v34_(v34), v35_(v35) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_,
- v35_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray35& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-class ValueArray36 {
- public:
- ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
- v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray36& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-class ValueArray37 {
- public:
- ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
- v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
- v36_(v36), v37_(v37) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray37& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-class ValueArray38 {
- public:
- ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray38& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-class ValueArray39 {
- public:
- ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray39& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-class ValueArray40 {
- public:
- ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
- v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
- v40_(v40) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray40& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-class ValueArray41 {
- public:
- ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
- T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray41& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-class ValueArray42 {
- public:
- ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray42& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-class ValueArray43 {
- public:
- ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
- v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
- v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
- v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
- v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
- v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37),
- v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray43& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-class ValueArray44 {
- public:
- ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
- v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
- v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
- v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
- v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
- v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36),
- v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42),
- v43_(v43), v44_(v44) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray44& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-class ValueArray45 {
- public:
- ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
- v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
- v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
- v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
- v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
- v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
- v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41),
- v42_(v42), v43_(v43), v44_(v44), v45_(v45) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray45& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-class ValueArray46 {
- public:
- ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3),
- v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
- v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray46& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-class ValueArray47 {
- public:
- ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2),
- v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
- v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
- v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
- v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
- v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
- v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
- v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46),
- v47_(v47) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_,
- v47_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray47& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-class ValueArray48 {
- public:
- ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1),
- v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
- v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
- v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
- v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
- v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
- v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
- v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45),
- v46_(v46), v47_(v47), v48_(v48) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray48& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-class ValueArray49 {
- public:
- ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48,
- T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
- v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_, v49_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray49& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
- const T49 v49_;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-class ValueArray50 {
- public:
- ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
- T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49,
- T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
- v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
- v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
- v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
- v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
- v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
- v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
- v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_,
- v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_,
- v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_,
- v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_,
- v48_, v49_, v50_};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray50& other);
-
- const T1 v1_;
- const T2 v2_;
- const T3 v3_;
- const T4 v4_;
- const T5 v5_;
- const T6 v6_;
- const T7 v7_;
- const T8 v8_;
- const T9 v9_;
- const T10 v10_;
- const T11 v11_;
- const T12 v12_;
- const T13 v13_;
- const T14 v14_;
- const T15 v15_;
- const T16 v16_;
- const T17 v17_;
- const T18 v18_;
- const T19 v19_;
- const T20 v20_;
- const T21 v21_;
- const T22 v22_;
- const T23 v23_;
- const T24 v24_;
- const T25 v25_;
- const T26 v26_;
- const T27 v27_;
- const T28 v28_;
- const T29 v29_;
- const T30 v30_;
- const T31 v31_;
- const T32 v32_;
- const T33 v33_;
- const T34 v34_;
- const T35 v35_;
- const T36 v36_;
- const T37 v37_;
- const T38 v38_;
- const T39 v39_;
- const T40 v40_;
- const T41 v41_;
- const T42 v42_;
- const T43 v43_;
- const T44 v44_;
- const T45 v45_;
- const T46 v46_;
- const T47 v47_;
- const T48 v48_;
- const T49 v49_;
- const T50 v50_;
-};
-
-# if GTEST_HAS_COMBINE
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Generates values from the Cartesian product of values produced
-// by the argument generators.
-//
-template <typename T1, typename T2>
-class CartesianProductGenerator2
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > {
- public:
- typedef ::std::tr1::tuple<T1, T2> ParamType;
-
- CartesianProductGenerator2(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2)
- : g1_(g1), g2_(g2) {}
- virtual ~CartesianProductGenerator2() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current2_;
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- ParamType current_value_;
- }; // class CartesianProductGenerator2::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator2& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
-}; // class CartesianProductGenerator2
-
-
-template <typename T1, typename T2, typename T3>
-class CartesianProductGenerator3
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3> ParamType;
-
- CartesianProductGenerator3(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3)
- : g1_(g1), g2_(g2), g3_(g3) {}
- virtual ~CartesianProductGenerator3() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current3_;
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- ParamType current_value_;
- }; // class CartesianProductGenerator3::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator3& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
-}; // class CartesianProductGenerator3
-
-
-template <typename T1, typename T2, typename T3, typename T4>
-class CartesianProductGenerator4
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;
-
- CartesianProductGenerator4(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
- virtual ~CartesianProductGenerator4() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current4_;
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- ParamType current_value_;
- }; // class CartesianProductGenerator4::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator4& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
-}; // class CartesianProductGenerator4
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class CartesianProductGenerator5
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;
-
- CartesianProductGenerator5(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
- virtual ~CartesianProductGenerator5() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current5_;
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- ParamType current_value_;
- }; // class CartesianProductGenerator5::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator5& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
-}; // class CartesianProductGenerator5
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class CartesianProductGenerator6
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,
- T6> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;
-
- CartesianProductGenerator6(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
- virtual ~CartesianProductGenerator6() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current6_;
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- ParamType current_value_;
- }; // class CartesianProductGenerator6::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator6& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
-}; // class CartesianProductGenerator6
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class CartesianProductGenerator7
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
-
- CartesianProductGenerator7(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
- virtual ~CartesianProductGenerator7() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current7_;
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- ParamType current_value_;
- }; // class CartesianProductGenerator7::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator7& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
-}; // class CartesianProductGenerator7
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class CartesianProductGenerator8
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
-
- CartesianProductGenerator8(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
- g8_(g8) {}
- virtual ~CartesianProductGenerator8() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current8_;
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- ParamType current_value_;
- }; // class CartesianProductGenerator8::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator8& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
-}; // class CartesianProductGenerator8
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class CartesianProductGenerator9
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8, T9> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
-
- CartesianProductGenerator9(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9) {}
- virtual ~CartesianProductGenerator9() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end(), g9_, g9_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8,
- const ParamGenerator<T9>& g9,
- const typename ParamGenerator<T9>::iterator& current9)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
- begin9_(g9.begin()), end9_(g9.end()), current9_(current9) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current9_;
- if (current9_ == end9_) {
- current9_ = begin9_;
- ++current8_;
- }
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_ &&
- current9_ == typed_other->current9_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_),
- begin9_(other.begin9_),
- end9_(other.end9_),
- current9_(other.current9_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_,
- *current9_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_ ||
- current9_ == end9_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- const typename ParamGenerator<T9>::iterator begin9_;
- const typename ParamGenerator<T9>::iterator end9_;
- typename ParamGenerator<T9>::iterator current9_;
- ParamType current_value_;
- }; // class CartesianProductGenerator9::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator9& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
- const ParamGenerator<T9> g9_;
-}; // class CartesianProductGenerator9
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class CartesianProductGenerator10
- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7, T8, T9, T10> > {
- public:
- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
-
- CartesianProductGenerator10(const ParamGenerator<T1>& g1,
- const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
- const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
- const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
- const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9,
- const ParamGenerator<T10>& g10)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9), g10_(g10) {}
- virtual ~CartesianProductGenerator10() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
- g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
- g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin());
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
- g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
- g8_.end(), g9_, g9_.end(), g10_, g10_.end());
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base,
- const ParamGenerator<T1>& g1,
- const typename ParamGenerator<T1>::iterator& current1,
- const ParamGenerator<T2>& g2,
- const typename ParamGenerator<T2>::iterator& current2,
- const ParamGenerator<T3>& g3,
- const typename ParamGenerator<T3>::iterator& current3,
- const ParamGenerator<T4>& g4,
- const typename ParamGenerator<T4>::iterator& current4,
- const ParamGenerator<T5>& g5,
- const typename ParamGenerator<T5>::iterator& current5,
- const ParamGenerator<T6>& g6,
- const typename ParamGenerator<T6>::iterator& current6,
- const ParamGenerator<T7>& g7,
- const typename ParamGenerator<T7>::iterator& current7,
- const ParamGenerator<T8>& g8,
- const typename ParamGenerator<T8>::iterator& current8,
- const ParamGenerator<T9>& g9,
- const typename ParamGenerator<T9>::iterator& current9,
- const ParamGenerator<T10>& g10,
- const typename ParamGenerator<T10>::iterator& current10)
- : base_(base),
- begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
- begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
- begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
- begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
- begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
- begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
- begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
- begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
- begin9_(g9.begin()), end9_(g9.end()), current9_(current9),
- begin10_(g10.begin()), end10_(g10.end()), current10_(current10) {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current10_;
- if (current10_ == end10_) {
- current10_ = begin10_;
- ++current9_;
- }
- if (current9_ == end9_) {
- current9_ = begin9_;
- ++current8_;
- }
- if (current8_ == end8_) {
- current8_ = begin8_;
- ++current7_;
- }
- if (current7_ == end7_) {
- current7_ = begin7_;
- ++current6_;
- }
- if (current6_ == end6_) {
- current6_ = begin6_;
- ++current5_;
- }
- if (current5_ == end5_) {
- current5_ = begin5_;
- ++current4_;
- }
- if (current4_ == end4_) {
- current4_ = begin4_;
- ++current3_;
- }
- if (current3_ == end3_) {
- current3_ = begin3_;
- ++current2_;
- }
- if (current2_ == end2_) {
- current2_ = begin2_;
- ++current1_;
- }
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- (
- current1_ == typed_other->current1_ &&
- current2_ == typed_other->current2_ &&
- current3_ == typed_other->current3_ &&
- current4_ == typed_other->current4_ &&
- current5_ == typed_other->current5_ &&
- current6_ == typed_other->current6_ &&
- current7_ == typed_other->current7_ &&
- current8_ == typed_other->current8_ &&
- current9_ == typed_other->current9_ &&
- current10_ == typed_other->current10_);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_),
- begin1_(other.begin1_),
- end1_(other.end1_),
- current1_(other.current1_),
- begin2_(other.begin2_),
- end2_(other.end2_),
- current2_(other.current2_),
- begin3_(other.begin3_),
- end3_(other.end3_),
- current3_(other.current3_),
- begin4_(other.begin4_),
- end4_(other.end4_),
- current4_(other.current4_),
- begin5_(other.begin5_),
- end5_(other.end5_),
- current5_(other.current5_),
- begin6_(other.begin6_),
- end6_(other.end6_),
- current6_(other.current6_),
- begin7_(other.begin7_),
- end7_(other.end7_),
- current7_(other.current7_),
- begin8_(other.begin8_),
- end8_(other.end8_),
- current8_(other.current8_),
- begin9_(other.begin9_),
- end9_(other.end9_),
- current9_(other.current9_),
- begin10_(other.begin10_),
- end10_(other.end10_),
- current10_(other.current10_) {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType(*current1_, *current2_, *current3_,
- *current4_, *current5_, *current6_, *current7_, *current8_,
- *current9_, *current10_);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
- current1_ == end1_ ||
- current2_ == end2_ ||
- current3_ == end3_ ||
- current4_ == end4_ ||
- current5_ == end5_ ||
- current6_ == end6_ ||
- current7_ == end7_ ||
- current8_ == end8_ ||
- current9_ == end9_ ||
- current10_ == end10_;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
- const typename ParamGenerator<T1>::iterator begin1_;
- const typename ParamGenerator<T1>::iterator end1_;
- typename ParamGenerator<T1>::iterator current1_;
- const typename ParamGenerator<T2>::iterator begin2_;
- const typename ParamGenerator<T2>::iterator end2_;
- typename ParamGenerator<T2>::iterator current2_;
- const typename ParamGenerator<T3>::iterator begin3_;
- const typename ParamGenerator<T3>::iterator end3_;
- typename ParamGenerator<T3>::iterator current3_;
- const typename ParamGenerator<T4>::iterator begin4_;
- const typename ParamGenerator<T4>::iterator end4_;
- typename ParamGenerator<T4>::iterator current4_;
- const typename ParamGenerator<T5>::iterator begin5_;
- const typename ParamGenerator<T5>::iterator end5_;
- typename ParamGenerator<T5>::iterator current5_;
- const typename ParamGenerator<T6>::iterator begin6_;
- const typename ParamGenerator<T6>::iterator end6_;
- typename ParamGenerator<T6>::iterator current6_;
- const typename ParamGenerator<T7>::iterator begin7_;
- const typename ParamGenerator<T7>::iterator end7_;
- typename ParamGenerator<T7>::iterator current7_;
- const typename ParamGenerator<T8>::iterator begin8_;
- const typename ParamGenerator<T8>::iterator end8_;
- typename ParamGenerator<T8>::iterator current8_;
- const typename ParamGenerator<T9>::iterator begin9_;
- const typename ParamGenerator<T9>::iterator end9_;
- typename ParamGenerator<T9>::iterator current9_;
- const typename ParamGenerator<T10>::iterator begin10_;
- const typename ParamGenerator<T10>::iterator end10_;
- typename ParamGenerator<T10>::iterator current10_;
- ParamType current_value_;
- }; // class CartesianProductGenerator10::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator10& other);
-
- const ParamGenerator<T1> g1_;
- const ParamGenerator<T2> g2_;
- const ParamGenerator<T3> g3_;
- const ParamGenerator<T4> g4_;
- const ParamGenerator<T5> g5_;
- const ParamGenerator<T6> g6_;
- const ParamGenerator<T7> g7_;
- const ParamGenerator<T8> g8_;
- const ParamGenerator<T9> g9_;
- const ParamGenerator<T10> g10_;
-}; // class CartesianProductGenerator10
-
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Helper classes providing Combine() with polymorphic features. They allow
-// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
-// convertible to U.
-//
-template <class Generator1, class Generator2>
-class CartesianProductHolder2 {
- public:
-CartesianProductHolder2(const Generator1& g1, const Generator2& g2)
- : g1_(g1), g2_(g2) {}
- template <typename T1, typename T2>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2> >(
- new CartesianProductGenerator2<T1, T2>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder2& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
-}; // class CartesianProductHolder2
-
-template <class Generator1, class Generator2, class Generator3>
-class CartesianProductHolder3 {
- public:
-CartesianProductHolder3(const Generator1& g1, const Generator2& g2,
- const Generator3& g3)
- : g1_(g1), g2_(g2), g3_(g3) {}
- template <typename T1, typename T2, typename T3>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >(
- new CartesianProductGenerator3<T1, T2, T3>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder3& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
-}; // class CartesianProductHolder3
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4>
-class CartesianProductHolder4 {
- public:
-CartesianProductHolder4(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
- template <typename T1, typename T2, typename T3, typename T4>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >(
- new CartesianProductGenerator4<T1, T2, T3, T4>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder4& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
-}; // class CartesianProductHolder4
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5>
-class CartesianProductHolder5 {
- public:
-CartesianProductHolder5(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >(
- new CartesianProductGenerator5<T1, T2, T3, T4, T5>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder5& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
-}; // class CartesianProductHolder5
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6>
-class CartesianProductHolder6 {
- public:
-CartesianProductHolder6(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >(
- new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder6& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
-}; // class CartesianProductHolder6
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7>
-class CartesianProductHolder7 {
- public:
-CartesianProductHolder7(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
- T7> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >(
- new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder7& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
-}; // class CartesianProductHolder7
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8>
-class CartesianProductHolder8 {
- public:
-CartesianProductHolder8(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
- g8_(g8) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,
- T8> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(
- new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder8& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
-}; // class CartesianProductHolder8
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8, class Generator9>
-class CartesianProductHolder9 {
- public:
-CartesianProductHolder9(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8,
- const Generator9& g9)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> >(
- new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_),
- static_cast<ParamGenerator<T9> >(g9_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder9& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
- const Generator9 g9_;
-}; // class CartesianProductHolder9
-
-template <class Generator1, class Generator2, class Generator3,
- class Generator4, class Generator5, class Generator6, class Generator7,
- class Generator8, class Generator9, class Generator10>
-class CartesianProductHolder10 {
- public:
-CartesianProductHolder10(const Generator1& g1, const Generator2& g2,
- const Generator3& g3, const Generator4& g4, const Generator5& g5,
- const Generator6& g6, const Generator7& g7, const Generator8& g8,
- const Generator9& g9, const Generator10& g10)
- : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
- g9_(g9), g10_(g10) {}
- template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9, T10> >() const {
- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
- T9, T10> >(
- new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10>(
- static_cast<ParamGenerator<T1> >(g1_),
- static_cast<ParamGenerator<T2> >(g2_),
- static_cast<ParamGenerator<T3> >(g3_),
- static_cast<ParamGenerator<T4> >(g4_),
- static_cast<ParamGenerator<T5> >(g5_),
- static_cast<ParamGenerator<T6> >(g6_),
- static_cast<ParamGenerator<T7> >(g7_),
- static_cast<ParamGenerator<T8> >(g8_),
- static_cast<ParamGenerator<T9> >(g9_),
- static_cast<ParamGenerator<T10> >(g10_)));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder10& other);
-
- const Generator1 g1_;
- const Generator2 g2_;
- const Generator3 g3_;
- const Generator4 g4_;
- const Generator5 g5_;
- const Generator6 g6_;
- const Generator7 g7_;
- const Generator8 g8_;
- const Generator9 g9_;
- const Generator10 g10_;
-}; // class CartesianProductHolder10
-
-# endif // GTEST_HAS_COMBINE
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h.pump
deleted file mode 100644
index dbe938630..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util-generated.h.pump
+++ /dev/null
@@ -1,301 +0,0 @@
-$$ -*- mode: c++; -*-
-$var n = 50 $$ Maximum length of Values arguments we want to support.
-$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently Google Test supports at most $n arguments in Values,
-// and at most $maxtuple arguments in Combine. Please contact
-// googletestframework@googlegroups.com if you need more.
-// Please note that the number of arguments to Combine is limited
-// by the maximum arity of the implementation of tr1::tuple which is
-// currently set at $maxtuple.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-#include "gtest/internal/gtest-param-util.h"
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-
-// Forward declarations of ValuesIn(), which is implemented in
-// include/gtest/gtest-param-test.h.
-template <typename ForwardIterator>
-internal::ParamGenerator<
- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end);
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]);
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
- const Container& container);
-
-namespace internal {
-
-// Used in the Values() function to provide polymorphic capabilities.
-template <typename T1>
-class ValueArray1 {
- public:
- explicit ValueArray1(T1 v1) : v1_(v1) {}
-
- template <typename T>
- operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray1& other);
-
- const T1 v1_;
-};
-
-$range i 2..n
-$for i [[
-$range j 1..i
-
-template <$for j, [[typename T$j]]>
-class ValueArray$i {
- public:
- ValueArray$i($for j, [[T$j v$j]]) : $for j, [[v$(j)_(v$j)]] {}
-
- template <typename T>
- operator ParamGenerator<T>() const {
- const T array[] = {$for j, [[v$(j)_]]};
- return ValuesIn(array);
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const ValueArray$i& other);
-
-$for j [[
-
- const T$j v$(j)_;
-]]
-
-};
-
-]]
-
-# if GTEST_HAS_COMBINE
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Generates values from the Cartesian product of values produced
-// by the argument generators.
-//
-$range i 2..maxtuple
-$for i [[
-$range j 1..i
-$range k 2..i
-
-template <$for j, [[typename T$j]]>
-class CartesianProductGenerator$i
- : public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > {
- public:
- typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType;
-
- CartesianProductGenerator$i($for j, [[const ParamGenerator<T$j>& g$j]])
- : $for j, [[g$(j)_(g$j)]] {}
- virtual ~CartesianProductGenerator$i() {}
-
- virtual ParamIteratorInterface<ParamType>* Begin() const {
- return new Iterator(this, $for j, [[g$(j)_, g$(j)_.begin()]]);
- }
- virtual ParamIteratorInterface<ParamType>* End() const {
- return new Iterator(this, $for j, [[g$(j)_, g$(j)_.end()]]);
- }
-
- private:
- class Iterator : public ParamIteratorInterface<ParamType> {
- public:
- Iterator(const ParamGeneratorInterface<ParamType>* base, $for j, [[
-
- const ParamGenerator<T$j>& g$j,
- const typename ParamGenerator<T$j>::iterator& current$(j)]])
- : base_(base),
-$for j, [[
-
- begin$(j)_(g$j.begin()), end$(j)_(g$j.end()), current$(j)_(current$j)
-]] {
- ComputeCurrentValue();
- }
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
- return base_;
- }
- // Advance should not be called on beyond-of-range iterators
- // so no component iterators must be beyond end of range, either.
- virtual void Advance() {
- assert(!AtEnd());
- ++current$(i)_;
-
-$for k [[
- if (current$(i+2-k)_ == end$(i+2-k)_) {
- current$(i+2-k)_ = begin$(i+2-k)_;
- ++current$(i+2-k-1)_;
- }
-
-]]
- ComputeCurrentValue();
- }
- virtual ParamIteratorInterface<ParamType>* Clone() const {
- return new Iterator(*this);
- }
- virtual const ParamType* Current() const { return &current_value_; }
- virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const Iterator* typed_other =
- CheckedDowncastToActualType<const Iterator>(&other);
- // We must report iterators equal if they both point beyond their
- // respective ranges. That can happen in a variety of fashions,
- // so we have to consult AtEnd().
- return (AtEnd() && typed_other->AtEnd()) ||
- ($for j && [[
-
- current$(j)_ == typed_other->current$(j)_
-]]);
- }
-
- private:
- Iterator(const Iterator& other)
- : base_(other.base_), $for j, [[
-
- begin$(j)_(other.begin$(j)_),
- end$(j)_(other.end$(j)_),
- current$(j)_(other.current$(j)_)
-]] {
- ComputeCurrentValue();
- }
-
- void ComputeCurrentValue() {
- if (!AtEnd())
- current_value_ = ParamType($for j, [[*current$(j)_]]);
- }
- bool AtEnd() const {
- // We must report iterator past the end of the range when either of the
- // component iterators has reached the end of its range.
- return
-$for j || [[
-
- current$(j)_ == end$(j)_
-]];
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<ParamType>* const base_;
- // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
- // current[i]_ is the actual traversing iterator.
-$for j [[
-
- const typename ParamGenerator<T$j>::iterator begin$(j)_;
- const typename ParamGenerator<T$j>::iterator end$(j)_;
- typename ParamGenerator<T$j>::iterator current$(j)_;
-]]
-
- ParamType current_value_;
- }; // class CartesianProductGenerator$i::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductGenerator$i& other);
-
-
-$for j [[
- const ParamGenerator<T$j> g$(j)_;
-
-]]
-}; // class CartesianProductGenerator$i
-
-
-]]
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Helper classes providing Combine() with polymorphic features. They allow
-// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
-// convertible to U.
-//
-$range i 2..maxtuple
-$for i [[
-$range j 1..i
-
-template <$for j, [[class Generator$j]]>
-class CartesianProductHolder$i {
- public:
-CartesianProductHolder$i($for j, [[const Generator$j& g$j]])
- : $for j, [[g$(j)_(g$j)]] {}
- template <$for j, [[typename T$j]]>
- operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const {
- return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >(
- new CartesianProductGenerator$i<$for j, [[T$j]]>(
-$for j,[[
-
- static_cast<ParamGenerator<T$j> >(g$(j)_)
-]]));
- }
-
- private:
- // No implementation - assignment is unsupported.
- void operator=(const CartesianProductHolder$i& other);
-
-
-$for j [[
- const Generator$j g$(j)_;
-
-]]
-}; // class CartesianProductHolder$i
-
-]]
-
-# endif // GTEST_HAS_COMBINE
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util.h
deleted file mode 100644
index 0ef9718cf..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-param-util.h
+++ /dev/null
@@ -1,619 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Type and function utilities for implementing parameterized tests.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-
-#include <iterator>
-#include <utility>
-#include <vector>
-
-// scripts/fuse_gtest.py depends on gtest's own header being #included
-// *unconditionally*. Therefore these #includes cannot be moved
-// inside #if GTEST_HAS_PARAM_TEST.
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-linked_ptr.h"
-#include "gtest/internal/gtest-port.h"
-#include "gtest/gtest-printers.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-namespace testing {
-namespace internal {
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Outputs a message explaining invalid registration of different
-// fixture class for the same test case. This may happen when
-// TEST_P macro is used to define two tests with the same name
-// but in different namespaces.
-GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name,
- const char* file, int line);
-
-template <typename> class ParamGeneratorInterface;
-template <typename> class ParamGenerator;
-
-// Interface for iterating over elements provided by an implementation
-// of ParamGeneratorInterface<T>.
-template <typename T>
-class ParamIteratorInterface {
- public:
- virtual ~ParamIteratorInterface() {}
- // A pointer to the base generator instance.
- // Used only for the purposes of iterator comparison
- // to make sure that two iterators belong to the same generator.
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;
- // Advances iterator to point to the next element
- // provided by the generator. The caller is responsible
- // for not calling Advance() on an iterator equal to
- // BaseGenerator()->End().
- virtual void Advance() = 0;
- // Clones the iterator object. Used for implementing copy semantics
- // of ParamIterator<T>.
- virtual ParamIteratorInterface* Clone() const = 0;
- // Dereferences the current iterator and provides (read-only) access
- // to the pointed value. It is the caller's responsibility not to call
- // Current() on an iterator equal to BaseGenerator()->End().
- // Used for implementing ParamGenerator<T>::operator*().
- virtual const T* Current() const = 0;
- // Determines whether the given iterator and other point to the same
- // element in the sequence generated by the generator.
- // Used for implementing ParamGenerator<T>::operator==().
- virtual bool Equals(const ParamIteratorInterface& other) const = 0;
-};
-
-// Class iterating over elements provided by an implementation of
-// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
-// and implements the const forward iterator concept.
-template <typename T>
-class ParamIterator {
- public:
- typedef T value_type;
- typedef const T& reference;
- typedef ptrdiff_t difference_type;
-
- // ParamIterator assumes ownership of the impl_ pointer.
- ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}
- ParamIterator& operator=(const ParamIterator& other) {
- if (this != &other)
- impl_.reset(other.impl_->Clone());
- return *this;
- }
-
- const T& operator*() const { return *impl_->Current(); }
- const T* operator->() const { return impl_->Current(); }
- // Prefix version of operator++.
- ParamIterator& operator++() {
- impl_->Advance();
- return *this;
- }
- // Postfix version of operator++.
- ParamIterator operator++(int /*unused*/) {
- ParamIteratorInterface<T>* clone = impl_->Clone();
- impl_->Advance();
- return ParamIterator(clone);
- }
- bool operator==(const ParamIterator& other) const {
- return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
- }
- bool operator!=(const ParamIterator& other) const {
- return !(*this == other);
- }
-
- private:
- friend class ParamGenerator<T>;
- explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}
- scoped_ptr<ParamIteratorInterface<T> > impl_;
-};
-
-// ParamGeneratorInterface<T> is the binary interface to access generators
-// defined in other translation units.
-template <typename T>
-class ParamGeneratorInterface {
- public:
- typedef T ParamType;
-
- virtual ~ParamGeneratorInterface() {}
-
- // Generator interface definition
- virtual ParamIteratorInterface<T>* Begin() const = 0;
- virtual ParamIteratorInterface<T>* End() const = 0;
-};
-
-// Wraps ParamGeneratorInterface<T> and provides general generator syntax
-// compatible with the STL Container concept.
-// This class implements copy initialization semantics and the contained
-// ParamGeneratorInterface<T> instance is shared among all copies
-// of the original object. This is possible because that instance is immutable.
-template<typename T>
-class ParamGenerator {
- public:
- typedef ParamIterator<T> iterator;
-
- explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}
- ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}
-
- ParamGenerator& operator=(const ParamGenerator& other) {
- impl_ = other.impl_;
- return *this;
- }
-
- iterator begin() const { return iterator(impl_->Begin()); }
- iterator end() const { return iterator(impl_->End()); }
-
- private:
- linked_ptr<const ParamGeneratorInterface<T> > impl_;
-};
-
-// Generates values from a range of two comparable values. Can be used to
-// generate sequences of user-defined types that implement operator+() and
-// operator<().
-// This class is used in the Range() function.
-template <typename T, typename IncrementT>
-class RangeGenerator : public ParamGeneratorInterface<T> {
- public:
- RangeGenerator(T begin, T end, IncrementT step)
- : begin_(begin), end_(end),
- step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}
- virtual ~RangeGenerator() {}
-
- virtual ParamIteratorInterface<T>* Begin() const {
- return new Iterator(this, begin_, 0, step_);
- }
- virtual ParamIteratorInterface<T>* End() const {
- return new Iterator(this, end_, end_index_, step_);
- }
-
- private:
- class Iterator : public ParamIteratorInterface<T> {
- public:
- Iterator(const ParamGeneratorInterface<T>* base, T value, int index,
- IncrementT step)
- : base_(base), value_(value), index_(index), step_(step) {}
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
- return base_;
- }
- virtual void Advance() {
- value_ = value_ + step_;
- index_++;
- }
- virtual ParamIteratorInterface<T>* Clone() const {
- return new Iterator(*this);
- }
- virtual const T* Current() const { return &value_; }
- virtual bool Equals(const ParamIteratorInterface<T>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- const int other_index =
- CheckedDowncastToActualType<const Iterator>(&other)->index_;
- return index_ == other_index;
- }
-
- private:
- Iterator(const Iterator& other)
- : ParamIteratorInterface<T>(),
- base_(other.base_), value_(other.value_), index_(other.index_),
- step_(other.step_) {}
-
- // No implementation - assignment is unsupported.
- void operator=(const Iterator& other);
-
- const ParamGeneratorInterface<T>* const base_;
- T value_;
- int index_;
- const IncrementT step_;
- }; // class RangeGenerator::Iterator
-
- static int CalculateEndIndex(const T& begin,
- const T& end,
- const IncrementT& step) {
- int end_index = 0;
- for (T i = begin; i < end; i = i + step)
- end_index++;
- return end_index;
- }
-
- // No implementation - assignment is unsupported.
- void operator=(const RangeGenerator& other);
-
- const T begin_;
- const T end_;
- const IncrementT step_;
- // The index for the end() iterator. All the elements in the generated
- // sequence are indexed (0-based) to aid iterator comparison.
- const int end_index_;
-}; // class RangeGenerator
-
-
-// Generates values from a pair of STL-style iterators. Used in the
-// ValuesIn() function. The elements are copied from the source range
-// since the source can be located on the stack, and the generator
-// is likely to persist beyond that stack frame.
-template <typename T>
-class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
- public:
- template <typename ForwardIterator>
- ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
- : container_(begin, end) {}
- virtual ~ValuesInIteratorRangeGenerator() {}
-
- virtual ParamIteratorInterface<T>* Begin() const {
- return new Iterator(this, container_.begin());
- }
- virtual ParamIteratorInterface<T>* End() const {
- return new Iterator(this, container_.end());
- }
-
- private:
- typedef typename ::std::vector<T> ContainerType;
-
- class Iterator : public ParamIteratorInterface<T> {
- public:
- Iterator(const ParamGeneratorInterface<T>* base,
- typename ContainerType::const_iterator iterator)
- : base_(base), iterator_(iterator) {}
- virtual ~Iterator() {}
-
- virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
- return base_;
- }
- virtual void Advance() {
- ++iterator_;
- value_.reset();
- }
- virtual ParamIteratorInterface<T>* Clone() const {
- return new Iterator(*this);
- }
- // We need to use cached value referenced by iterator_ because *iterator_
- // can return a temporary object (and of type other then T), so just
- // having "return &*iterator_;" doesn't work.
- // value_ is updated here and not in Advance() because Advance()
- // can advance iterator_ beyond the end of the range, and we cannot
- // detect that fact. The client code, on the other hand, is
- // responsible for not calling Current() on an out-of-range iterator.
- virtual const T* Current() const {
- if (value_.get() == NULL)
- value_.reset(new T(*iterator_));
- return value_.get();
- }
- virtual bool Equals(const ParamIteratorInterface<T>& other) const {
- // Having the same base generator guarantees that the other
- // iterator is of the same type and we can downcast.
- GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
- << "The program attempted to compare iterators "
- << "from different generators." << std::endl;
- return iterator_ ==
- CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
- }
-
- private:
- Iterator(const Iterator& other)
- // The explicit constructor call suppresses a false warning
- // emitted by gcc when supplied with the -Wextra option.
- : ParamIteratorInterface<T>(),
- base_(other.base_),
- iterator_(other.iterator_) {}
-
- const ParamGeneratorInterface<T>* const base_;
- typename ContainerType::const_iterator iterator_;
- // A cached value of *iterator_. We keep it here to allow access by
- // pointer in the wrapping iterator's operator->().
- // value_ needs to be mutable to be accessed in Current().
- // Use of scoped_ptr helps manage cached value's lifetime,
- // which is bound by the lifespan of the iterator itself.
- mutable scoped_ptr<const T> value_;
- }; // class ValuesInIteratorRangeGenerator::Iterator
-
- // No implementation - assignment is unsupported.
- void operator=(const ValuesInIteratorRangeGenerator& other);
-
- const ContainerType container_;
-}; // class ValuesInIteratorRangeGenerator
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Stores a parameter value and later creates tests parameterized with that
-// value.
-template <class TestClass>
-class ParameterizedTestFactory : public TestFactoryBase {
- public:
- typedef typename TestClass::ParamType ParamType;
- explicit ParameterizedTestFactory(ParamType parameter) :
- parameter_(parameter) {}
- virtual Test* CreateTest() {
- TestClass::SetParam(&parameter_);
- return new TestClass();
- }
-
- private:
- const ParamType parameter_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactoryBase is a base class for meta-factories that create
-// test factories for passing into MakeAndRegisterTestInfo function.
-template <class ParamType>
-class TestMetaFactoryBase {
- public:
- virtual ~TestMetaFactoryBase() {}
-
- virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactory creates test factories for passing into
-// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
-// ownership of test factory pointer, same factory object cannot be passed
-// into that method twice. But ParameterizedTestCaseInfo is going to call
-// it for each Test/Parameter value combination. Thus it needs meta factory
-// creator class.
-template <class TestCase>
-class TestMetaFactory
- : public TestMetaFactoryBase<typename TestCase::ParamType> {
- public:
- typedef typename TestCase::ParamType ParamType;
-
- TestMetaFactory() {}
-
- virtual TestFactoryBase* CreateTestFactory(ParamType parameter) {
- return new ParameterizedTestFactory<TestCase>(parameter);
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseInfoBase is a generic interface
-// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase
-// accumulates test information provided by TEST_P macro invocations
-// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations
-// and uses that information to register all resulting test instances
-// in RegisterTests method. The ParameterizeTestCaseRegistry class holds
-// a collection of pointers to the ParameterizedTestCaseInfo objects
-// and calls RegisterTests() on each of them when asked.
-class ParameterizedTestCaseInfoBase {
- public:
- virtual ~ParameterizedTestCaseInfoBase() {}
-
- // Base part of test case name for display purposes.
- virtual const string& GetTestCaseName() const = 0;
- // Test case id to verify identity.
- virtual TypeId GetTestCaseTypeId() const = 0;
- // UnitTest class invokes this method to register tests in this
- // test case right before running them in RUN_ALL_TESTS macro.
- // This method should not be called more then once on any single
- // instance of a ParameterizedTestCaseInfoBase derived class.
- virtual void RegisterTests() = 0;
-
- protected:
- ParameterizedTestCaseInfoBase() {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P
-// macro invocations for a particular test case and generators
-// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that
-// test case. It registers tests with all values generated by all
-// generators when asked.
-template <class TestCase>
-class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
- public:
- // ParamType and GeneratorCreationFunc are private types but are required
- // for declarations of public methods AddTestPattern() and
- // AddTestCaseInstantiation().
- typedef typename TestCase::ParamType ParamType;
- // A function that returns an instance of appropriate generator type.
- typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
-
- explicit ParameterizedTestCaseInfo(const char* name)
- : test_case_name_(name) {}
-
- // Test case base name for display purposes.
- virtual const string& GetTestCaseName() const { return test_case_name_; }
- // Test case id to verify identity.
- virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
- // TEST_P macro uses AddTestPattern() to record information
- // about a single test in a LocalTestInfo structure.
- // test_case_name is the base name of the test case (without invocation
- // prefix). test_base_name is the name of an individual test without
- // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
- // test case base name and DoBar is test base name.
- void AddTestPattern(const char* test_case_name,
- const char* test_base_name,
- TestMetaFactoryBase<ParamType>* meta_factory) {
- tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name,
- test_base_name,
- meta_factory)));
- }
- // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
- // about a generator.
- int AddTestCaseInstantiation(const string& instantiation_name,
- GeneratorCreationFunc* func,
- const char* /* file */,
- int /* line */) {
- instantiations_.push_back(::std::make_pair(instantiation_name, func));
- return 0; // Return value used only to run this method in namespace scope.
- }
- // UnitTest class invokes this method to register tests in this test case
- // test cases right before running tests in RUN_ALL_TESTS macro.
- // This method should not be called more then once on any single
- // instance of a ParameterizedTestCaseInfoBase derived class.
- // UnitTest has a guard to prevent from calling this method more then once.
- virtual void RegisterTests() {
- for (typename TestInfoContainer::iterator test_it = tests_.begin();
- test_it != tests_.end(); ++test_it) {
- linked_ptr<TestInfo> test_info = *test_it;
- for (typename InstantiationContainer::iterator gen_it =
- instantiations_.begin(); gen_it != instantiations_.end();
- ++gen_it) {
- const string& instantiation_name = gen_it->first;
- ParamGenerator<ParamType> generator((*gen_it->second)());
-
- Message test_case_name_stream;
- if ( !instantiation_name.empty() )
- test_case_name_stream << instantiation_name << "/";
- test_case_name_stream << test_info->test_case_base_name;
-
- int i = 0;
- for (typename ParamGenerator<ParamType>::iterator param_it =
- generator.begin();
- param_it != generator.end(); ++param_it, ++i) {
- Message test_name_stream;
- test_name_stream << test_info->test_base_name << "/" << i;
- MakeAndRegisterTestInfo(
- test_case_name_stream.GetString().c_str(),
- test_name_stream.GetString().c_str(),
- NULL, // No type parameter.
- PrintToString(*param_it).c_str(),
- GetTestCaseTypeId(),
- TestCase::SetUpTestCase,
- TestCase::TearDownTestCase,
- test_info->test_meta_factory->CreateTestFactory(*param_it));
- } // for param_it
- } // for gen_it
- } // for test_it
- } // RegisterTests
-
- private:
- // LocalTestInfo structure keeps information about a single test registered
- // with TEST_P macro.
- struct TestInfo {
- TestInfo(const char* a_test_case_base_name,
- const char* a_test_base_name,
- TestMetaFactoryBase<ParamType>* a_test_meta_factory) :
- test_case_base_name(a_test_case_base_name),
- test_base_name(a_test_base_name),
- test_meta_factory(a_test_meta_factory) {}
-
- const string test_case_base_name;
- const string test_base_name;
- const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
- };
- typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
- // Keeps pairs of <Instantiation name, Sequence generator creation function>
- // received from INSTANTIATE_TEST_CASE_P macros.
- typedef ::std::vector<std::pair<string, GeneratorCreationFunc*> >
- InstantiationContainer;
-
- const string test_case_name_;
- TestInfoContainer tests_;
- InstantiationContainer instantiations_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo);
-}; // class ParameterizedTestCaseInfo
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase
-// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P
-// macros use it to locate their corresponding ParameterizedTestCaseInfo
-// descriptors.
-class ParameterizedTestCaseRegistry {
- public:
- ParameterizedTestCaseRegistry() {}
- ~ParameterizedTestCaseRegistry() {
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- delete *it;
- }
- }
-
- // Looks up or creates and returns a structure containing information about
- // tests and instantiations of a particular test case.
- template <class TestCase>
- ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(
- const char* test_case_name,
- const char* file,
- int line) {
- ParameterizedTestCaseInfo<TestCase>* typed_test_info = NULL;
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- if ((*it)->GetTestCaseName() == test_case_name) {
- if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>()) {
- // Complain about incorrect usage of Google Test facilities
- // and terminate the program since we cannot guaranty correct
- // test case setup and tear-down in this case.
- ReportInvalidTestCaseType(test_case_name, file, line);
- posix::Abort();
- } else {
- // At this point we are sure that the object we found is of the same
- // type we are looking for, so we downcast it to that type
- // without further checks.
- typed_test_info = CheckedDowncastToActualType<
- ParameterizedTestCaseInfo<TestCase> >(*it);
- }
- break;
- }
- }
- if (typed_test_info == NULL) {
- typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name);
- test_case_infos_.push_back(typed_test_info);
- }
- return typed_test_info;
- }
- void RegisterTests() {
- for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
- it != test_case_infos_.end(); ++it) {
- (*it)->RegisterTests();
- }
- }
-
- private:
- typedef ::std::vector<ParameterizedTestCaseInfoBase*> TestCaseInfoContainer;
-
- TestCaseInfoContainer test_case_infos_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry);
-};
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-port.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-port.h
deleted file mode 100644
index 157b47f86..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-port.h
+++ /dev/null
@@ -1,1775 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan)
-//
-// Low-level types and utilities for porting Google Test to various
-// platforms. They are subject to change without notice. DO NOT USE
-// THEM IN USER CODE.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-
-// The user can define the following macros in the build script to
-// control Google Test's behavior. If the user doesn't define a macro
-// in this list, Google Test will define it.
-//
-// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2)
-// is/isn't available.
-// GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions
-// are enabled.
-// GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string
-// is/isn't available (some systems define
-// ::string, which is different to std::string).
-// GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string
-// is/isn't available (some systems define
-// ::wstring, which is different to std::wstring).
-// GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular
-// expressions are/aren't available.
-// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h>
-// is/isn't available.
-// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't
-// enabled.
-// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that
-// std::wstring does/doesn't work (Google Test can
-// be used where std::wstring is unavailable).
-// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple
-// is/isn't available.
-// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the
-// compiler supports Microsoft's "Structured
-// Exception Handling".
-// GTEST_HAS_STREAM_REDIRECTION
-// - Define it to 1/0 to indicate whether the
-// platform supports I/O stream redirection using
-// dup() and dup2().
-// GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google
-// Test's own tr1 tuple implementation should be
-// used. Unused when the user sets
-// GTEST_HAS_TR1_TUPLE to 0.
-// GTEST_LINKED_AS_SHARED_LIBRARY
-// - Define to 1 when compiling tests that use
-// Google Test as a shared library (known as
-// DLL on Windows).
-// GTEST_CREATE_SHARED_LIBRARY
-// - Define to 1 when compiling Google Test itself
-// as a shared library.
-
-// This header defines the following utilities:
-//
-// Macros indicating the current platform (defined to 1 if compiled on
-// the given platform; otherwise undefined):
-// GTEST_OS_AIX - IBM AIX
-// GTEST_OS_CYGWIN - Cygwin
-// GTEST_OS_HPUX - HP-UX
-// GTEST_OS_LINUX - Linux
-// GTEST_OS_LINUX_ANDROID - Google Android
-// GTEST_OS_MAC - Mac OS X
-// GTEST_OS_NACL - Google Native Client (NaCl)
-// GTEST_OS_SOLARIS - Sun Solaris
-// GTEST_OS_SYMBIAN - Symbian
-// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
-// GTEST_OS_WINDOWS_DESKTOP - Windows Desktop
-// GTEST_OS_WINDOWS_MINGW - MinGW
-// GTEST_OS_WINDOWS_MOBILE - Windows Mobile
-// GTEST_OS_ZOS - z/OS
-//
-// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the
-// most stable support. Since core members of the Google Test project
-// don't have access to other platforms, support for them may be less
-// stable. If you notice any problems on your platform, please notify
-// googletestframework@googlegroups.com (patches for fixing them are
-// even more welcome!).
-//
-// Note that it is possible that none of the GTEST_OS_* macros are defined.
-//
-// Macros indicating available Google Test features (defined to 1 if
-// the corresponding feature is supported; otherwise undefined):
-// GTEST_HAS_COMBINE - the Combine() function (for value-parameterized
-// tests)
-// GTEST_HAS_DEATH_TEST - death tests
-// GTEST_HAS_PARAM_TEST - value-parameterized tests
-// GTEST_HAS_TYPED_TEST - typed tests
-// GTEST_HAS_TYPED_TEST_P - type-parameterized tests
-// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
-// GTEST_HAS_POSIX_RE (see above) which users can
-// define themselves.
-// GTEST_USES_SIMPLE_RE - our own simple regex is used;
-// the above two are mutually exclusive.
-// GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().
-//
-// Macros for basic C++ coding:
-// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
-// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a
-// variable don't have to be used.
-// GTEST_DISALLOW_ASSIGN_ - disables operator=.
-// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
-// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
-//
-// Synchronization:
-// Mutex, MutexLock, ThreadLocal, GetThreadCount()
-// - synchronization primitives.
-// GTEST_IS_THREADSAFE - defined to 1 to indicate that the above
-// synchronization primitives have real implementations
-// and Google Test is thread-safe; or 0 otherwise.
-//
-// Template meta programming:
-// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only.
-// IteratorTraits - partial implementation of std::iterator_traits, which
-// is not available in libCstd when compiled with Sun C++.
-//
-// Smart pointers:
-// scoped_ptr - as in TR2.
-//
-// Regular expressions:
-// RE - a simple regular expression class using the POSIX
-// Extended Regular Expression syntax on UNIX-like
-// platforms, or a reduced regular exception syntax on
-// other platforms, including Windows.
-//
-// Logging:
-// GTEST_LOG_() - logs messages at the specified severity level.
-// LogToStderr() - directs all log messages to stderr.
-// FlushInfoLog() - flushes informational log messages.
-//
-// Stdout and stderr capturing:
-// CaptureStdout() - starts capturing stdout.
-// GetCapturedStdout() - stops capturing stdout and returns the captured
-// string.
-// CaptureStderr() - starts capturing stderr.
-// GetCapturedStderr() - stops capturing stderr and returns the captured
-// string.
-//
-// Integer types:
-// TypeWithSize - maps an integer to a int type.
-// Int32, UInt32, Int64, UInt64, TimeInMillis
-// - integers of known sizes.
-// BiggestInt - the biggest signed integer type.
-//
-// Command-line utilities:
-// GTEST_FLAG() - references a flag.
-// GTEST_DECLARE_*() - declares a flag.
-// GTEST_DEFINE_*() - defines a flag.
-// GetArgvs() - returns the command line as a vector of strings.
-//
-// Environment variable utilities:
-// GetEnv() - gets the value of an environment variable.
-// BoolFromGTestEnv() - parses a bool environment variable.
-// Int32FromGTestEnv() - parses an Int32 environment variable.
-// StringFromGTestEnv() - parses a string environment variable.
-
-#include <ctype.h> // for isspace, etc
-#include <stddef.h> // for ptrdiff_t
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#ifndef _WIN32_WCE
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif // !_WIN32_WCE
-
-#include <iostream> // NOLINT
-#include <sstream> // NOLINT
-#include <string> // NOLINT
-
-#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
-#define GTEST_FLAG_PREFIX_ "gtest_"
-#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
-#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
-#define GTEST_NAME_ "Google Test"
-#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
-
-// Determines the version of gcc that is used to compile this.
-#ifdef __GNUC__
-// 40302 means version 4.3.2.
-# define GTEST_GCC_VER_ \
- (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
-#endif // __GNUC__
-
-// Determines the platform on which Google Test is compiled.
-#ifdef __CYGWIN__
-# define GTEST_OS_CYGWIN 1
-#elif defined __SYMBIAN32__
-# define GTEST_OS_SYMBIAN 1
-#elif defined _WIN32
-# define GTEST_OS_WINDOWS 1
-# ifdef _WIN32_WCE
-# define GTEST_OS_WINDOWS_MOBILE 1
-# elif defined(__MINGW__) || defined(__MINGW32__)
-# define GTEST_OS_WINDOWS_MINGW 1
-# else
-# define GTEST_OS_WINDOWS_DESKTOP 1
-# endif // _WIN32_WCE
-#elif defined __APPLE__
-# define GTEST_OS_MAC 1
-#elif defined __linux__
-# define GTEST_OS_LINUX 1
-# ifdef ANDROID
-# define GTEST_OS_LINUX_ANDROID 1
-# endif // ANDROID
-#elif defined __MVS__
-# define GTEST_OS_ZOS 1
-#elif defined(__sun) && defined(__SVR4)
-# define GTEST_OS_SOLARIS 1
-#elif defined(_AIX)
-# define GTEST_OS_AIX 1
-#elif defined(__hpux)
-# define GTEST_OS_HPUX 1
-#elif defined __native_client__
-# define GTEST_OS_NACL 1
-#endif // __CYGWIN__
-
-// Brings in definitions for functions used in the testing::internal::posix
-// namespace (read, write, close, chdir, isatty, stat). We do not currently
-// use them on Windows Mobile.
-#if !GTEST_OS_WINDOWS
-// This assumes that non-Windows OSes provide unistd.h. For OSes where this
-// is not the case, we need to include headers that provide the functions
-// mentioned above.
-# include <unistd.h>
-# if !GTEST_OS_NACL
-// TODO(vladl@google.com): Remove this condition when Native Client SDK adds
-// strings.h (tracked in
-// http://code.google.com/p/nativeclient/issues/detail?id=1175).
-# include <strings.h> // Native Client doesn't provide strings.h.
-# endif
-#elif !GTEST_OS_WINDOWS_MOBILE
-# include <direct.h>
-# include <io.h>
-#endif
-
-// Defines this to true iff Google Test can use POSIX regular expressions.
-#ifndef GTEST_HAS_POSIX_RE
-# define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
-#endif
-
-#if GTEST_HAS_POSIX_RE
-
-// On some platforms, <regex.h> needs someone to define size_t, and
-// won't compile otherwise. We can #include it here as we already
-// included <stdlib.h>, which is guaranteed to define size_t through
-// <stddef.h>.
-# include <regex.h> // NOLINT
-
-# define GTEST_USES_POSIX_RE 1
-
-#elif GTEST_OS_WINDOWS
-
-// <regex.h> is not available on Windows. Use our own simple regex
-// implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#else
-
-// <regex.h> may not be available on this platform. Use our own
-// simple regex implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#endif // GTEST_HAS_POSIX_RE
-
-#ifndef GTEST_HAS_EXCEPTIONS
-// The user didn't tell us whether exceptions are enabled, so we need
-// to figure it out.
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
-// macro to enable exceptions, so we'll do the same.
-// Assumes that exceptions are enabled by default.
-# ifndef _HAS_EXCEPTIONS
-# define _HAS_EXCEPTIONS 1
-# endif // _HAS_EXCEPTIONS
-# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
-# elif defined(__GNUC__) && __EXCEPTIONS
-// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__SUNPRO_CC)
-// Sun Pro CC supports exceptions. However, there is no compile-time way of
-// detecting whether they are enabled or not. Therefore, we assume that
-// they are enabled unless the user tells us otherwise.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__IBMCPP__) && __EXCEPTIONS
-// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
-# define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__HP_aCC)
-// Exception handling is in effect by default in HP aCC compiler. It has to
-// be turned of by +noeh compiler option if desired.
-# define GTEST_HAS_EXCEPTIONS 1
-# else
-// For other compilers, we assume exceptions are disabled to be
-// conservative.
-# define GTEST_HAS_EXCEPTIONS 0
-# endif // defined(_MSC_VER) || defined(__BORLANDC__)
-#endif // GTEST_HAS_EXCEPTIONS
-
-#if !defined(GTEST_HAS_STD_STRING)
-// Even though we don't use this macro any longer, we keep it in case
-// some clients still depend on it.
-# define GTEST_HAS_STD_STRING 1
-#elif !GTEST_HAS_STD_STRING
-// The user told us that ::std::string isn't available.
-# error "Google Test cannot be used where ::std::string isn't available."
-#endif // !defined(GTEST_HAS_STD_STRING)
-
-#ifndef GTEST_HAS_GLOBAL_STRING
-// The user didn't tell us whether ::string is available, so we need
-// to figure it out.
-
-# define GTEST_HAS_GLOBAL_STRING 0
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#ifndef GTEST_HAS_STD_WSTRING
-// The user didn't tell us whether ::std::wstring is available, so we need
-// to figure it out.
-// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
-// is available.
-
-// Cygwin 1.7 and below doesn't support ::std::wstring.
-// Solaris' libc++ doesn't support it either. Android has
-// no support for it at least as recent as Froyo (2.2).
-# define GTEST_HAS_STD_WSTRING \
- (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
-
-#endif // GTEST_HAS_STD_WSTRING
-
-#ifndef GTEST_HAS_GLOBAL_WSTRING
-// The user didn't tell us whether ::wstring is available, so we need
-// to figure it out.
-# define GTEST_HAS_GLOBAL_WSTRING \
- (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// Determines whether RTTI is available.
-#ifndef GTEST_HAS_RTTI
-// The user didn't tell us whether RTTI is enabled, so we need to
-// figure it out.
-
-# ifdef _MSC_VER
-
-# ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled.
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif
-
-// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
-# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
-
-# ifdef __GXX_RTTI
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif // __GXX_RTTI
-
-// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
-// both the typeid and dynamic_cast features are present.
-# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
-
-# ifdef __RTTI_ALL__
-# define GTEST_HAS_RTTI 1
-# else
-# define GTEST_HAS_RTTI 0
-# endif
-
-# else
-
-// For all other compilers, we assume RTTI is enabled.
-# define GTEST_HAS_RTTI 1
-
-# endif // _MSC_VER
-
-#endif // GTEST_HAS_RTTI
-
-// It's this header's responsibility to #include <typeinfo> when RTTI
-// is enabled.
-#if GTEST_HAS_RTTI
-# include <typeinfo>
-#endif
-
-// Determines whether Google Test can use the pthreads library.
-#ifndef GTEST_HAS_PTHREAD
-// The user didn't tell us explicitly, so we assume pthreads support is
-// available on Linux and Mac.
-//
-// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
-// to your compiler flags.
-# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX)
-#endif // GTEST_HAS_PTHREAD
-
-#if GTEST_HAS_PTHREAD
-// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
-// true.
-# include <pthread.h> // NOLINT
-
-// For timespec and nanosleep, used below.
-# include <time.h> // NOLINT
-#endif
-
-// Determines whether Google Test can use tr1/tuple. You can define
-// this macro to 0 to prevent Google Test from using tuple (any
-// feature depending on tuple with be disabled in this mode).
-#ifndef GTEST_HAS_TR1_TUPLE
-// The user didn't tell us not to do it, so we assume it's OK.
-# define GTEST_HAS_TR1_TUPLE 1
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Determines whether Google Test's own tr1 tuple implementation
-// should be used.
-#ifndef GTEST_USE_OWN_TR1_TUPLE
-// The user didn't tell us, so we need to figure it out.
-
-// We use our own TR1 tuple if we aren't sure the user has an
-// implementation of it already. At this time, GCC 4.0.0+ and MSVC
-// 2010 are the only mainstream compilers that come with a TR1 tuple
-// implementation. NVIDIA's CUDA NVCC compiler pretends to be GCC by
-// defining __GNUC__ and friends, but cannot compile GCC's tuple
-// implementation. MSVC 2008 (9.0) provides TR1 tuple in a 323 MB
-// Feature Pack download, which we cannot assume the user has.
-# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000)) \
- || _MSC_VER >= 1600
-# define GTEST_USE_OWN_TR1_TUPLE 0
-# else
-# define GTEST_USE_OWN_TR1_TUPLE 1
-# endif
-
-#endif // GTEST_USE_OWN_TR1_TUPLE
-
-// To avoid conditional compilation everywhere, we make it
-// gtest-port.h's responsibility to #include the header implementing
-// tr1/tuple.
-#if GTEST_HAS_TR1_TUPLE
-
-# if GTEST_USE_OWN_TR1_TUPLE
-# include "gtest/internal/gtest-tuple.h"
-# elif GTEST_OS_SYMBIAN
-
-// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to
-// use STLport's tuple implementation, which unfortunately doesn't
-// work as the copy of STLport distributed with Symbian is incomplete.
-// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to
-// use its own tuple implementation.
-# ifdef BOOST_HAS_TR1_TUPLE
-# undef BOOST_HAS_TR1_TUPLE
-# endif // BOOST_HAS_TR1_TUPLE
-
-// This prevents <boost/tr1/detail/config.hpp>, which defines
-// BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>.
-# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
-# include <tuple>
-
-# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)
-// GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does
-// not conform to the TR1 spec, which requires the header to be <tuple>.
-
-# if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
-// Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
-// which is #included by <tr1/tuple>, to not compile when RTTI is
-// disabled. _TR1_FUNCTIONAL is the header guard for
-// <tr1/functional>. Hence the following #define is a hack to prevent
-// <tr1/functional> from being included.
-# define _TR1_FUNCTIONAL 1
-# include <tr1/tuple>
-# undef _TR1_FUNCTIONAL // Allows the user to #include
- // <tr1/functional> if he chooses to.
-# else
-# include <tr1/tuple> // NOLINT
-# endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
-
-# else
-// If the compiler is not GCC 4.0+, we assume the user is using a
-// spec-conforming TR1 implementation.
-# include <tuple> // NOLINT
-# endif // GTEST_USE_OWN_TR1_TUPLE
-
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Determines whether clone(2) is supported.
-// Usually it will only be available on Linux, excluding
-// Linux on the Itanium architecture.
-// Also see http://linux.die.net/man/2/clone.
-#ifndef GTEST_HAS_CLONE
-// The user didn't tell us, so we need to figure it out.
-
-# if GTEST_OS_LINUX && !defined(__ia64__)
-# define GTEST_HAS_CLONE 1
-# else
-# define GTEST_HAS_CLONE 0
-# endif // GTEST_OS_LINUX && !defined(__ia64__)
-
-#endif // GTEST_HAS_CLONE
-
-// Determines whether to support stream redirection. This is used to test
-// output correctness and to implement death tests.
-#ifndef GTEST_HAS_STREAM_REDIRECTION
-// By default, we assume that stream redirection is supported on all
-// platforms except known mobile ones.
-# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN
-# define GTEST_HAS_STREAM_REDIRECTION 0
-# else
-# define GTEST_HAS_STREAM_REDIRECTION 1
-# endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Determines whether to support death tests.
-// Google Test does not support death tests for VC 7.1 and earlier as
-// abort() in a VC 7.1 application compiled as GUI in debug config
-// pops up a dialog window that cannot be suppressed programmatically.
-#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
- (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
- GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX)
-# define GTEST_HAS_DEATH_TEST 1
-# include <vector> // NOLINT
-#endif
-
-// We don't support MSVC 7.1 with exceptions disabled now. Therefore
-// all the compilers we care about are adequate for supporting
-// value-parameterized tests.
-#define GTEST_HAS_PARAM_TEST 1
-
-// Determines whether to support type-driven tests.
-
-// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
-// Sun Pro CC, IBM Visual Age, and HP aCC support.
-#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
- defined(__IBMCPP__) || defined(__HP_aCC)
-# define GTEST_HAS_TYPED_TEST 1
-# define GTEST_HAS_TYPED_TEST_P 1
-#endif
-
-// Determines whether to support Combine(). This only makes sense when
-// value-parameterized tests are enabled. The implementation doesn't
-// work on Sun Studio since it doesn't understand templated conversion
-// operators.
-#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
-# define GTEST_HAS_COMBINE 1
-#endif
-
-// Determines whether the system compiler uses UTF-16 for encoding wide strings.
-#define GTEST_WIDE_STRING_USES_UTF16_ \
- (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
-
-// Determines whether test results can be streamed to a socket.
-#if GTEST_OS_LINUX
-# define GTEST_CAN_STREAM_RESULTS_ 1
-#endif
-
-// Defines some utility macros.
-
-// The GNU compiler emits a warning if nested "if" statements are followed by
-// an "else" statement and braces are not used to explicitly disambiguate the
-// "else" binding. This leads to problems with code like:
-//
-// if (gate)
-// ASSERT_*(condition) << "Some message";
-//
-// The "switch (0) case 0:" idiom is used to suppress this.
-#ifdef __INTEL_COMPILER
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_
-#else
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT
-#endif
-
-// Use this annotation at the end of a struct/class definition to
-// prevent the compiler from optimizing away instances that are never
-// used. This is useful when all interesting logic happens inside the
-// c'tor and / or d'tor. Example:
-//
-// struct Foo {
-// Foo() { ... }
-// } GTEST_ATTRIBUTE_UNUSED_;
-//
-// Also use it after a variable or parameter declaration to tell the
-// compiler the variable/parameter does not have to be used.
-#if defined(__GNUC__) && !defined(COMPILER_ICC)
-# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
-#else
-# define GTEST_ATTRIBUTE_UNUSED_
-#endif
-
-// A macro to disallow operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
-
-// A macro to disallow copy constructor and operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
-
-// Tell the compiler to warn about unused return values for functions declared
-// with this macro. The macro should be used on function declarations
-// following the argument list:
-//
-// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
-#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)
-# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
-#else
-# define GTEST_MUST_USE_RESULT_
-#endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC
-
-// Determine whether the compiler supports Microsoft's Structured Exception
-// Handling. This is supported by several Windows compilers but generally
-// does not exist on any other system.
-#ifndef GTEST_HAS_SEH
-// The user didn't tell us, so we need to figure it out.
-
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// These two compilers are known to support SEH.
-# define GTEST_HAS_SEH 1
-# else
-// Assume no SEH.
-# define GTEST_HAS_SEH 0
-# endif
-
-#endif // GTEST_HAS_SEH
-
-#ifdef _MSC_VER
-
-# if GTEST_LINKED_AS_SHARED_LIBRARY
-# define GTEST_API_ __declspec(dllimport)
-# elif GTEST_CREATE_SHARED_LIBRARY
-# define GTEST_API_ __declspec(dllexport)
-# endif
-
-#endif // _MSC_VER
-
-#ifndef GTEST_API_
-# define GTEST_API_
-#endif
-
-#ifdef __GNUC__
-// Ask the compiler to never inline a given function.
-# define GTEST_NO_INLINE_ __attribute__((noinline))
-#else
-# define GTEST_NO_INLINE_
-#endif
-
-namespace testing {
-
-class Message;
-
-namespace internal {
-
-class String;
-
-// The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-template <bool>
-struct CompileAssert {
-};
-
-#define GTEST_COMPILE_ASSERT_(expr, msg) \
- typedef ::testing::internal::CompileAssert<(bool(expr))> \
- msg[bool(expr) ? 1 : -1]
-
-// Implementation details of GTEST_COMPILE_ASSERT_:
-//
-// - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1
-// elements (and thus is invalid) when the expression is false.
-//
-// - The simpler definition
-//
-// #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1]
-//
-// does not work, as gcc supports variable-length arrays whose sizes
-// are determined at run-time (this is gcc's extension and not part
-// of the C++ standard). As a result, gcc fails to reject the
-// following code with the simple definition:
-//
-// int foo;
-// GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is
-// // not a compile-time constant.
-//
-// - By using the type CompileAssert<(bool(expr))>, we ensures that
-// expr is a compile-time constant. (Template arguments must be
-// determined at compile-time.)
-//
-// - The outter parentheses in CompileAssert<(bool(expr))> are necessary
-// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
-//
-// CompileAssert<bool(expr)>
-//
-// instead, these compilers will refuse to compile
-//
-// GTEST_COMPILE_ASSERT_(5 > 0, some_message);
-//
-// (They seem to think the ">" in "5 > 0" marks the end of the
-// template argument list.)
-//
-// - The array size is (bool(expr) ? 1 : -1), instead of simply
-//
-// ((expr) ? 1 : -1).
-//
-// This is to avoid running into a bug in MS VC 7.1, which
-// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
-
-// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.
-//
-// This template is declared, but intentionally undefined.
-template <typename T1, typename T2>
-struct StaticAssertTypeEqHelper;
-
-template <typename T>
-struct StaticAssertTypeEqHelper<T, T> {};
-
-#if GTEST_HAS_GLOBAL_STRING
-typedef ::string string;
-#else
-typedef ::std::string string;
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-typedef ::wstring wstring;
-#elif GTEST_HAS_STD_WSTRING
-typedef ::std::wstring wstring;
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// A helper for suppressing warnings on constant condition. It just
-// returns 'condition'.
-GTEST_API_ bool IsTrue(bool condition);
-
-// Defines scoped_ptr.
-
-// This implementation of scoped_ptr is PARTIAL - it only contains
-// enough stuff to satisfy Google Test's need.
-template <typename T>
-class scoped_ptr {
- public:
- typedef T element_type;
-
- explicit scoped_ptr(T* p = NULL) : ptr_(p) {}
- ~scoped_ptr() { reset(); }
-
- T& operator*() const { return *ptr_; }
- T* operator->() const { return ptr_; }
- T* get() const { return ptr_; }
-
- T* release() {
- T* const ptr = ptr_;
- ptr_ = NULL;
- return ptr;
- }
-
- void reset(T* p = NULL) {
- if (p != ptr_) {
- if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type.
- delete ptr_;
- }
- ptr_ = p;
- }
- }
- private:
- T* ptr_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr);
-};
-
-// Defines RE.
-
-// A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
-// Regular Expression syntax.
-class GTEST_API_ RE {
- public:
- // A copy constructor is required by the Standard to initialize object
- // references from r-values.
- RE(const RE& other) { Init(other.pattern()); }
-
- // Constructs an RE from a string.
- RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT
-
-#if GTEST_HAS_GLOBAL_STRING
-
- RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
- RE(const char* regex) { Init(regex); } // NOLINT
- ~RE();
-
- // Returns the string representation of the regex.
- const char* pattern() const { return pattern_; }
-
- // FullMatch(str, re) returns true iff regular expression re matches
- // the entire str.
- // PartialMatch(str, re) returns true iff regular expression re
- // matches a substring of str (including str itself).
- //
- // TODO(wan@google.com): make FullMatch() and PartialMatch() work
- // when str contains NUL characters.
- static bool FullMatch(const ::std::string& str, const RE& re) {
- return FullMatch(str.c_str(), re);
- }
- static bool PartialMatch(const ::std::string& str, const RE& re) {
- return PartialMatch(str.c_str(), re);
- }
-
-#if GTEST_HAS_GLOBAL_STRING
-
- static bool FullMatch(const ::string& str, const RE& re) {
- return FullMatch(str.c_str(), re);
- }
- static bool PartialMatch(const ::string& str, const RE& re) {
- return PartialMatch(str.c_str(), re);
- }
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
- static bool FullMatch(const char* str, const RE& re);
- static bool PartialMatch(const char* str, const RE& re);
-
- private:
- void Init(const char* regex);
-
- // We use a const char* instead of a string, as Google Test may be used
- // where string is not available. We also do not use Google Test's own
- // String type here, in order to simplify dependencies between the
- // files.
- const char* pattern_;
- bool is_valid_;
-
-#if GTEST_USES_POSIX_RE
-
- regex_t full_regex_; // For FullMatch().
- regex_t partial_regex_; // For PartialMatch().
-
-#else // GTEST_USES_SIMPLE_RE
-
- const char* full_pattern_; // For FullMatch();
-
-#endif
-
- GTEST_DISALLOW_ASSIGN_(RE);
-};
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
- int line);
-
-// Defines logging utilities:
-// GTEST_LOG_(severity) - logs messages at the specified severity level. The
-// message itself is streamed into the macro.
-// LogToStderr() - directs all log messages to stderr.
-// FlushInfoLog() - flushes informational log messages.
-
-enum GTestLogSeverity {
- GTEST_INFO,
- GTEST_WARNING,
- GTEST_ERROR,
- GTEST_FATAL
-};
-
-// Formats log entry severity, provides a stream object for streaming the
-// log message, and terminates the message with a newline when going out of
-// scope.
-class GTEST_API_ GTestLog {
- public:
- GTestLog(GTestLogSeverity severity, const char* file, int line);
-
- // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
- ~GTestLog();
-
- ::std::ostream& GetStream() { return ::std::cerr; }
-
- private:
- const GTestLogSeverity severity_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);
-};
-
-#define GTEST_LOG_(severity) \
- ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
- __FILE__, __LINE__).GetStream()
-
-inline void LogToStderr() {}
-inline void FlushInfoLog() { fflush(NULL); }
-
-// INTERNAL IMPLEMENTATION - DO NOT USE.
-//
-// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
-// is not satisfied.
-// Synopsys:
-// GTEST_CHECK_(boolean_condition);
-// or
-// GTEST_CHECK_(boolean_condition) << "Additional message";
-//
-// This checks the condition and if the condition is not satisfied
-// it prints message about the condition violation, including the
-// condition itself, plus additional message streamed into it, if any,
-// and then it aborts the program. It aborts the program irrespective of
-// whether it is built in the debug mode or not.
-#define GTEST_CHECK_(condition) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::IsTrue(condition)) \
- ; \
- else \
- GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
-
-// An all-mode assert to verify that the given POSIX-style function
-// call returns 0 (indicating success). Known limitation: this
-// doesn't expand to a balanced 'if' statement, so enclose the macro
-// in {} if you need to use it as the only statement in an 'if'
-// branch.
-#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
- if (const int gtest_error = (posix_call)) \
- GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
- << gtest_error
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Use ImplicitCast_ as a safe version of static_cast for upcasting in
-// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
-// const Foo*). When you use ImplicitCast_, the compiler checks that
-// the cast is safe. Such explicit ImplicitCast_s are necessary in
-// surprisingly many situations where C++ demands an exact type match
-// instead of an argument type convertable to a target type.
-//
-// The syntax for using ImplicitCast_ is the same as for static_cast:
-//
-// ImplicitCast_<ToType>(expr)
-//
-// ImplicitCast_ would have been part of the C++ standard library,
-// but the proposal was submitted too late. It will probably make
-// its way into the language in the future.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., implicit_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To>
-inline To ImplicitCast_(To x) { return x; }
-
-// When you upcast (that is, cast a pointer from type Foo to type
-// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
-// always succeed. When you downcast (that is, cast a pointer from
-// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
-// how do you know the pointer is really of type SubclassOfFoo? It
-// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
-// when you downcast, you should use this macro. In debug mode, we
-// use dynamic_cast<> to double-check the downcast is legal (we die
-// if it's not). In normal mode, we do the efficient static_cast<>
-// instead. Thus, it's important to test in debug mode to make sure
-// the cast is legal!
-// This is the only place in the code we should use dynamic_cast<>.
-// In particular, you SHOULDN'T be using dynamic_cast<> in order to
-// do RTTI (eg code like this:
-// if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
-// if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
-// You should design the code some other way not to need this.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., down_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To, typename From> // use like this: DownCast_<T*>(foo);
-inline To DownCast_(From* f) { // so we only accept pointers
- // Ensures that To is a sub-type of From *. This test is here only
- // for compile-time type checking, and has no overhead in an
- // optimized build at run-time, as it will be optimized away
- // completely.
- if (false) {
- const To to = NULL;
- ::testing::internal::ImplicitCast_<From*>(to);
- }
-
-#if GTEST_HAS_RTTI
- // RTTI: debug mode only!
- GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
-#endif
- return static_cast<To>(f);
-}
-
-// Downcasts the pointer of type Base to Derived.
-// Derived must be a subclass of Base. The parameter MUST
-// point to a class of type Derived, not any subclass of it.
-// When RTTI is available, the function performs a runtime
-// check to enforce this.
-template <class Derived, class Base>
-Derived* CheckedDowncastToActualType(Base* base) {
-#if GTEST_HAS_RTTI
- GTEST_CHECK_(typeid(*base) == typeid(Derived));
- return dynamic_cast<Derived*>(base); // NOLINT
-#else
- return static_cast<Derived*>(base); // Poor man's downcast.
-#endif
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Defines the stderr capturer:
-// CaptureStdout - starts capturing stdout.
-// GetCapturedStdout - stops capturing stdout and returns the captured string.
-// CaptureStderr - starts capturing stderr.
-// GetCapturedStderr - stops capturing stderr and returns the captured string.
-//
-GTEST_API_ void CaptureStdout();
-GTEST_API_ String GetCapturedStdout();
-GTEST_API_ void CaptureStderr();
-GTEST_API_ String GetCapturedStderr();
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-
-#if GTEST_HAS_DEATH_TEST
-
-// A copy of all command line arguments. Set by InitGoogleTest().
-extern ::std::vector<String> g_argvs;
-
-// GTEST_HAS_DEATH_TEST implies we have ::std::string.
-const ::std::vector<String>& GetArgvs();
-
-#endif // GTEST_HAS_DEATH_TEST
-
-// Defines synchronization primitives.
-
-#if GTEST_HAS_PTHREAD
-
-// Sleeps for (roughly) n milli-seconds. This function is only for
-// testing Google Test's own constructs. Don't use it in user tests,
-// either directly or indirectly.
-inline void SleepMilliseconds(int n) {
- const timespec time = {
- 0, // 0 seconds.
- n * 1000L * 1000L, // And n ms.
- };
- nanosleep(&time, NULL);
-}
-
-// Allows a controller thread to pause execution of newly created
-// threads until notified. Instances of this class must be created
-// and destroyed in the controller thread.
-//
-// This class is only for testing Google Test's own constructs. Do not
-// use it in user tests, either directly or indirectly.
-class Notification {
- public:
- Notification() : notified_(false) {}
-
- // Notifies all threads created with this notification to start. Must
- // be called from the controller thread.
- void Notify() { notified_ = true; }
-
- // Blocks until the controller thread notifies. Must be called from a test
- // thread.
- void WaitForNotification() {
- while(!notified_) {
- SleepMilliseconds(10);
- }
- }
-
- private:
- volatile bool notified_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
-};
-
-// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
-// Consequently, it cannot select a correct instantiation of ThreadWithParam
-// in order to call its Run(). Introducing ThreadWithParamBase as a
-// non-templated base class for ThreadWithParam allows us to bypass this
-// problem.
-class ThreadWithParamBase {
- public:
- virtual ~ThreadWithParamBase() {}
- virtual void Run() = 0;
-};
-
-// pthread_create() accepts a pointer to a function type with the C linkage.
-// According to the Standard (7.5/1), function types with different linkages
-// are different even if they are otherwise identical. Some compilers (for
-// example, SunStudio) treat them as different types. Since class methods
-// cannot be defined with C-linkage we need to define a free C-function to
-// pass into pthread_create().
-extern "C" inline void* ThreadFuncWithCLinkage(void* thread) {
- static_cast<ThreadWithParamBase*>(thread)->Run();
- return NULL;
-}
-
-// Helper class for testing Google Test's multi-threading constructs.
-// To use it, write:
-//
-// void ThreadFunc(int param) { /* Do things with param */ }
-// Notification thread_can_start;
-// ...
-// // The thread_can_start parameter is optional; you can supply NULL.
-// ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
-// thread_can_start.Notify();
-//
-// These classes are only for testing Google Test's own constructs. Do
-// not use them in user tests, either directly or indirectly.
-template <typename T>
-class ThreadWithParam : public ThreadWithParamBase {
- public:
- typedef void (*UserThreadFunc)(T);
-
- ThreadWithParam(
- UserThreadFunc func, T param, Notification* thread_can_start)
- : func_(func),
- param_(param),
- thread_can_start_(thread_can_start),
- finished_(false) {
- ThreadWithParamBase* const base = this;
- // The thread can be created only after all fields except thread_
- // have been initialized.
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
- }
- ~ThreadWithParam() { Join(); }
-
- void Join() {
- if (!finished_) {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0));
- finished_ = true;
- }
- }
-
- virtual void Run() {
- if (thread_can_start_ != NULL)
- thread_can_start_->WaitForNotification();
- func_(param_);
- }
-
- private:
- const UserThreadFunc func_; // User-supplied thread function.
- const T param_; // User-supplied parameter to the thread function.
- // When non-NULL, used to block execution until the controller thread
- // notifies.
- Notification* const thread_can_start_;
- bool finished_; // true iff we know that the thread function has finished.
- pthread_t thread_; // The native thread object.
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
-};
-
-// MutexBase and Mutex implement mutex on pthreads-based platforms. They
-// are used in conjunction with class MutexLock:
-//
-// Mutex mutex;
-// ...
-// MutexLock lock(&mutex); // Acquires the mutex and releases it at the end
-// // of the current scope.
-//
-// MutexBase implements behavior for both statically and dynamically
-// allocated mutexes. Do not use MutexBase directly. Instead, write
-// the following to define a static mutex:
-//
-// GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
-//
-// You can forward declare a static mutex like this:
-//
-// GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
-//
-// To create a dynamic mutex, just define an object of type Mutex.
-class MutexBase {
- public:
- // Acquires this mutex.
- void Lock() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
- owner_ = pthread_self();
- }
-
- // Releases this mutex.
- void Unlock() {
- // We don't protect writing to owner_ here, as it's the caller's
- // responsibility to ensure that the current thread holds the
- // mutex when this is called.
- owner_ = 0;
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
- }
-
- // Does nothing if the current thread holds the mutex. Otherwise, crashes
- // with high probability.
- void AssertHeld() const {
- GTEST_CHECK_(owner_ == pthread_self())
- << "The current thread is not holding the mutex @" << this;
- }
-
- // A static mutex may be used before main() is entered. It may even
- // be used before the dynamic initialization stage. Therefore we
- // must be able to initialize a static mutex object at link time.
- // This means MutexBase has to be a POD and its member variables
- // have to be public.
- public:
- pthread_mutex_t mutex_; // The underlying pthread mutex.
- pthread_t owner_; // The thread holding the mutex; 0 means no one holds it.
-};
-
-// Forward-declares a static mutex.
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
- extern ::testing::internal::MutexBase mutex
-
-// Defines and statically (i.e. at link time) initializes a static mutex.
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
- ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, 0 }
-
-// The Mutex class can only be used for mutexes created at runtime. It
-// shares its API with MutexBase otherwise.
-class Mutex : public MutexBase {
- public:
- Mutex() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
- owner_ = 0;
- }
- ~Mutex() {
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
-};
-
-// We cannot name this class MutexLock as the ctor declaration would
-// conflict with a macro named MutexLock, which is defined on some
-// platforms. Hence the typedef trick below.
-class GTestMutexLock {
- public:
- explicit GTestMutexLock(MutexBase* mutex)
- : mutex_(mutex) { mutex_->Lock(); }
-
- ~GTestMutexLock() { mutex_->Unlock(); }
-
- private:
- MutexBase* const mutex_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
-};
-
-typedef GTestMutexLock MutexLock;
-
-// Helpers for ThreadLocal.
-
-// pthread_key_create() requires DeleteThreadLocalValue() to have
-// C-linkage. Therefore it cannot be templatized to access
-// ThreadLocal<T>. Hence the need for class
-// ThreadLocalValueHolderBase.
-class ThreadLocalValueHolderBase {
- public:
- virtual ~ThreadLocalValueHolderBase() {}
-};
-
-// Called by pthread to delete thread-local data stored by
-// pthread_setspecific().
-extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
- delete static_cast<ThreadLocalValueHolderBase*>(value_holder);
-}
-
-// Implements thread-local storage on pthreads-based systems.
-//
-// // Thread 1
-// ThreadLocal<int> tl(100); // 100 is the default value for each thread.
-//
-// // Thread 2
-// tl.set(150); // Changes the value for thread 2 only.
-// EXPECT_EQ(150, tl.get());
-//
-// // Thread 1
-// EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value.
-// tl.set(200);
-// EXPECT_EQ(200, tl.get());
-//
-// The template type argument T must have a public copy constructor.
-// In addition, the default ThreadLocal constructor requires T to have
-// a public default constructor.
-//
-// An object managed for a thread by a ThreadLocal instance is deleted
-// when the thread exits. Or, if the ThreadLocal instance dies in
-// that thread, when the ThreadLocal dies. It's the user's
-// responsibility to ensure that all other threads using a ThreadLocal
-// have exited when it dies, or the per-thread objects for those
-// threads will not be deleted.
-//
-// Google Test only uses global ThreadLocal objects. That means they
-// will die after main() has returned. Therefore, no per-thread
-// object managed by Google Test will be leaked as long as all threads
-// using Google Test have exited when main() returns.
-template <typename T>
-class ThreadLocal {
- public:
- ThreadLocal() : key_(CreateKey()),
- default_() {}
- explicit ThreadLocal(const T& value) : key_(CreateKey()),
- default_(value) {}
-
- ~ThreadLocal() {
- // Destroys the managed object for the current thread, if any.
- DeleteThreadLocalValue(pthread_getspecific(key_));
-
- // Releases resources associated with the key. This will *not*
- // delete managed objects for other threads.
- GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
- }
-
- T* pointer() { return GetOrCreateValue(); }
- const T* pointer() const { return GetOrCreateValue(); }
- const T& get() const { return *pointer(); }
- void set(const T& value) { *pointer() = value; }
-
- private:
- // Holds a value of type T.
- class ValueHolder : public ThreadLocalValueHolderBase {
- public:
- explicit ValueHolder(const T& value) : value_(value) {}
-
- T* pointer() { return &value_; }
-
- private:
- T value_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
- };
-
- static pthread_key_t CreateKey() {
- pthread_key_t key;
- // When a thread exits, DeleteThreadLocalValue() will be called on
- // the object managed for that thread.
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_key_create(&key, &DeleteThreadLocalValue));
- return key;
- }
-
- T* GetOrCreateValue() const {
- ThreadLocalValueHolderBase* const holder =
- static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
- if (holder != NULL) {
- return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
- }
-
- ValueHolder* const new_holder = new ValueHolder(default_);
- ThreadLocalValueHolderBase* const holder_base = new_holder;
- GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
- return new_holder->pointer();
- }
-
- // A key pthreads uses for looking up per-thread values.
- const pthread_key_t key_;
- const T default_; // The default value for each thread.
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
-};
-
-# define GTEST_IS_THREADSAFE 1
-
-#else // GTEST_HAS_PTHREAD
-
-// A dummy implementation of synchronization primitives (mutex, lock,
-// and thread-local variable). Necessary for compiling Google Test where
-// mutex is not supported - using Google Test in multiple threads is not
-// supported on such platforms.
-
-class Mutex {
- public:
- Mutex() {}
- void AssertHeld() const {}
-};
-
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
- extern ::testing::internal::Mutex mutex
-
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
-
-class GTestMutexLock {
- public:
- explicit GTestMutexLock(Mutex*) {} // NOLINT
-};
-
-typedef GTestMutexLock MutexLock;
-
-template <typename T>
-class ThreadLocal {
- public:
- ThreadLocal() : value_() {}
- explicit ThreadLocal(const T& value) : value_(value) {}
- T* pointer() { return &value_; }
- const T* pointer() const { return &value_; }
- const T& get() const { return value_; }
- void set(const T& value) { value_ = value; }
- private:
- T value_;
-};
-
-// The above synchronization primitives have dummy implementations.
-// Therefore Google Test is not thread-safe.
-# define GTEST_IS_THREADSAFE 0
-
-#endif // GTEST_HAS_PTHREAD
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-GTEST_API_ size_t GetThreadCount();
-
-// Passing non-POD classes through ellipsis (...) crashes the ARM
-// compiler and generates a warning in Sun Studio. The Nokia Symbian
-// and the IBM XL C/C++ compiler try to instantiate a copy constructor
-// for objects passed through ellipsis (...), failing for uncopyable
-// objects. We define this to ensure that only POD is passed through
-// ellipsis on these systems.
-#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
-// We lose support for NULL detection where the compiler doesn't like
-// passing non-POD classes through ellipsis (...).
-# define GTEST_ELLIPSIS_NEEDS_POD_ 1
-#else
-# define GTEST_CAN_COMPARE_NULL 1
-#endif
-
-// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between
-// const T& and const T* in a function template. These compilers
-// _can_ decide between class template specializations for T and T*,
-// so a tr1::type_traits-like is_pointer works.
-#if defined(__SYMBIAN32__) || defined(__IBMCPP__)
-# define GTEST_NEEDS_IS_POINTER_ 1
-#endif
-
-template <bool bool_value>
-struct bool_constant {
- typedef bool_constant<bool_value> type;
- static const bool value = bool_value;
-};
-template <bool bool_value> const bool bool_constant<bool_value>::value;
-
-typedef bool_constant<false> false_type;
-typedef bool_constant<true> true_type;
-
-template <typename T>
-struct is_pointer : public false_type {};
-
-template <typename T>
-struct is_pointer<T*> : public true_type {};
-
-template <typename Iterator>
-struct IteratorTraits {
- typedef typename Iterator::value_type value_type;
-};
-
-template <typename T>
-struct IteratorTraits<T*> {
- typedef T value_type;
-};
-
-template <typename T>
-struct IteratorTraits<const T*> {
- typedef T value_type;
-};
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_SEP_ "\\"
-# define GTEST_HAS_ALT_PATH_SEP_ 1
-// The biggest signed integer type the compiler supports.
-typedef __int64 BiggestInt;
-#else
-# define GTEST_PATH_SEP_ "/"
-# define GTEST_HAS_ALT_PATH_SEP_ 0
-typedef long long BiggestInt; // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-// Utilities for char.
-
-// isspace(int ch) and friends accept an unsigned char or EOF. char
-// may be signed, depending on the compiler (or compiler flags).
-// Therefore we need to cast a char to unsigned char before calling
-// isspace(), etc.
-
-inline bool IsAlpha(char ch) {
- return isalpha(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsAlNum(char ch) {
- return isalnum(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsDigit(char ch) {
- return isdigit(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsLower(char ch) {
- return islower(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsSpace(char ch) {
- return isspace(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsUpper(char ch) {
- return isupper(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsXDigit(char ch) {
- return isxdigit(static_cast<unsigned char>(ch)) != 0;
-}
-
-inline char ToLower(char ch) {
- return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
-}
-inline char ToUpper(char ch) {
- return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
-}
-
-// The testing::internal::posix namespace holds wrappers for common
-// POSIX functions. These wrappers hide the differences between
-// Windows/MSVC and POSIX systems. Since some compilers define these
-// standard functions as macros, the wrapper cannot have the same name
-// as the wrapped function.
-
-namespace posix {
-
-// Functions with a different name on Windows.
-
-#if GTEST_OS_WINDOWS
-
-typedef struct _stat StatStruct;
-
-# ifdef __BORLANDC__
-inline int IsATTY(int fd) { return isatty(fd); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-# else // !__BORLANDC__
-# if GTEST_OS_WINDOWS_MOBILE
-inline int IsATTY(int /* fd */) { return 0; }
-# else
-inline int IsATTY(int fd) { return _isatty(fd); }
-# endif // GTEST_OS_WINDOWS_MOBILE
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return _stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return _strdup(src); }
-# endif // __BORLANDC__
-
-# if GTEST_OS_WINDOWS_MOBILE
-inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
-// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
-// time and thus not defined there.
-# else
-inline int FileNo(FILE* file) { return _fileno(file); }
-inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
-inline int RmDir(const char* dir) { return _rmdir(dir); }
-inline bool IsDir(const StatStruct& st) {
- return (_S_IFDIR & st.st_mode) != 0;
-}
-# endif // GTEST_OS_WINDOWS_MOBILE
-
-#else
-
-typedef struct stat StatStruct;
-
-inline int FileNo(FILE* file) { return fileno(file); }
-inline int IsATTY(int fd) { return isatty(fd); }
-inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
- return strcasecmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-inline int RmDir(const char* dir) { return rmdir(dir); }
-inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
-
-#endif // GTEST_OS_WINDOWS
-
-// Functions deprecated by MSVC 8.0.
-
-#ifdef _MSC_VER
-// Temporarily disable warning 4996 (deprecated function).
-# pragma warning(push)
-# pragma warning(disable:4996)
-#endif
-
-inline const char* StrNCpy(char* dest, const char* src, size_t n) {
- return strncpy(dest, src, n);
-}
-
-// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
-// StrError() aren't needed on Windows CE at this time and thus not
-// defined there.
-
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int ChDir(const char* dir) { return chdir(dir); }
-#endif
-inline FILE* FOpen(const char* path, const char* mode) {
- return fopen(path, mode);
-}
-#if !GTEST_OS_WINDOWS_MOBILE
-inline FILE *FReopen(const char* path, const char* mode, FILE* stream) {
- return freopen(path, mode, stream);
-}
-inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }
-#endif
-inline int FClose(FILE* fp) { return fclose(fp); }
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int Read(int fd, void* buf, unsigned int count) {
- return static_cast<int>(read(fd, buf, count));
-}
-inline int Write(int fd, const void* buf, unsigned int count) {
- return static_cast<int>(write(fd, buf, count));
-}
-inline int Close(int fd) { return close(fd); }
-inline const char* StrError(int errnum) { return strerror(errnum); }
-#endif
-inline const char* GetEnv(const char* name) {
-#if GTEST_OS_WINDOWS_MOBILE
- // We are on Windows CE, which has no environment variables.
- return NULL;
-#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
- // Environment variables which we programmatically clear will be set to the
- // empty string rather than unset (NULL). Handle that case.
- const char* const env = getenv(name);
- return (env != NULL && env[0] != '\0') ? env : NULL;
-#else
- return getenv(name);
-#endif
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Windows CE has no C library. The abort() function is used in
-// several places in Google Test. This implementation provides a reasonable
-// imitation of standard behaviour.
-void Abort();
-#else
-inline void Abort() { abort(); }
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-} // namespace posix
-
-// The maximum number a BiggestInt can represent. This definition
-// works no matter BiggestInt is represented in one's complement or
-// two's complement.
-//
-// We cannot rely on numeric_limits in STL, as __int64 and long long
-// are not part of standard C++ and numeric_limits doesn't need to be
-// defined for them.
-const BiggestInt kMaxBiggestInt =
- ~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1));
-
-// This template class serves as a compile-time function from size to
-// type. It maps a size in bytes to a primitive type with that
-// size. e.g.
-//
-// TypeWithSize<4>::UInt
-//
-// is typedef-ed to be unsigned int (unsigned integer made up of 4
-// bytes).
-//
-// Such functionality should belong to STL, but I cannot find it
-// there.
-//
-// Google Test uses this class in the implementation of floating-point
-// comparison.
-//
-// For now it only handles UInt (unsigned int) as that's all Google Test
-// needs. Other types can be easily added in the future if need
-// arises.
-template <size_t size>
-class TypeWithSize {
- public:
- // This prevents the user from using TypeWithSize<N> with incorrect
- // values of N.
- typedef void UInt;
-};
-
-// The specialization for size 4.
-template <>
-class TypeWithSize<4> {
- public:
- // unsigned int has size 4 in both gcc and MSVC.
- //
- // As base/basictypes.h doesn't compile on Windows, we cannot use
- // uint32, uint64, and etc here.
- typedef int Int;
- typedef unsigned int UInt;
-};
-
-// The specialization for size 8.
-template <>
-class TypeWithSize<8> {
- public:
-
-#if GTEST_OS_WINDOWS
- typedef __int64 Int;
- typedef unsigned __int64 UInt;
-#else
- typedef long long Int; // NOLINT
- typedef unsigned long long UInt; // NOLINT
-#endif // GTEST_OS_WINDOWS
-};
-
-// Integer types of known sizes.
-typedef TypeWithSize<4>::Int Int32;
-typedef TypeWithSize<4>::UInt UInt32;
-typedef TypeWithSize<8>::Int Int64;
-typedef TypeWithSize<8>::UInt UInt64;
-typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
-
-// Utilities for command line flags and environment variables.
-
-// Macro for referencing flags.
-#define GTEST_FLAG(name) FLAGS_gtest_##name
-
-// Macros for declaring flags.
-#define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
-#define GTEST_DECLARE_int32_(name) \
- GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
-#define GTEST_DECLARE_string_(name) \
- GTEST_API_ extern ::testing::internal::String GTEST_FLAG(name)
-
-// Macros for defining flags.
-#define GTEST_DEFINE_bool_(name, default_val, doc) \
- GTEST_API_ bool GTEST_FLAG(name) = (default_val)
-#define GTEST_DEFINE_int32_(name, default_val, doc) \
- GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
-#define GTEST_DEFINE_string_(name, default_val, doc) \
- GTEST_API_ ::testing::internal::String GTEST_FLAG(name) = (default_val)
-
-// Parses 'str' for a 32-bit signed integer. If successful, writes the result
-// to *value and returns true; otherwise leaves *value unchanged and returns
-// false.
-// TODO(chandlerc): Find a better way to refactor flag and environment parsing
-// out of both gtest-port.cc and gtest.cc to avoid exporting this utility
-// function.
-bool ParseInt32(const Message& src_text, const char* str, Int32* value);
-
-// Parses a bool/Int32/string from the environment variable
-// corresponding to the given Google Test flag.
-bool BoolFromGTestEnv(const char* flag, bool default_val);
-GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);
-const char* StringFromGTestEnv(const char* flag, const char* default_val);
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-string.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-string.h
deleted file mode 100644
index dc3a07be8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-string.h
+++ /dev/null
@@ -1,350 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file declares the String class and functions used internally by
-// Google Test. They are subject to change without notice. They should not used
-// by code external to Google Test.
-//
-// This header file is #included by <gtest/internal/gtest-internal.h>.
-// It should not be #included by other files.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-
-#ifdef __BORLANDC__
-// string.h is not guaranteed to provide strcpy on C++ Builder.
-# include <mem.h>
-#endif
-
-#include <string.h>
-#include "gtest/internal/gtest-port.h"
-
-#include <string>
-
-namespace testing {
-namespace internal {
-
-// String - a UTF-8 string class.
-//
-// For historic reasons, we don't use std::string.
-//
-// TODO(wan@google.com): replace this class with std::string or
-// implement it in terms of the latter.
-//
-// Note that String can represent both NULL and the empty string,
-// while std::string cannot represent NULL.
-//
-// NULL and the empty string are considered different. NULL is less
-// than anything (including the empty string) except itself.
-//
-// This class only provides minimum functionality necessary for
-// implementing Google Test. We do not intend to implement a full-fledged
-// string class here.
-//
-// Since the purpose of this class is to provide a substitute for
-// std::string on platforms where it cannot be used, we define a copy
-// constructor and assignment operators such that we don't need
-// conditional compilation in a lot of places.
-//
-// In order to make the representation efficient, the d'tor of String
-// is not virtual. Therefore DO NOT INHERIT FROM String.
-class GTEST_API_ String {
- public:
- // Static utility methods
-
- // Returns the input enclosed in double quotes if it's not NULL;
- // otherwise returns "(null)". For example, "\"Hello\"" is returned
- // for input "Hello".
- //
- // This is useful for printing a C string in the syntax of a literal.
- //
- // Known issue: escape sequences are not handled yet.
- static String ShowCStringQuoted(const char* c_str);
-
- // Clones a 0-terminated C string, allocating memory using new. The
- // caller is responsible for deleting the return value using
- // delete[]. Returns the cloned string, or NULL if the input is
- // NULL.
- //
- // This is different from strdup() in string.h, which allocates
- // memory using malloc().
- static const char* CloneCString(const char* c_str);
-
-#if GTEST_OS_WINDOWS_MOBILE
- // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
- // able to pass strings to Win32 APIs on CE we need to convert them
- // to 'Unicode', UTF-16.
-
- // Creates a UTF-16 wide string from the given ANSI string, allocating
- // memory using new. The caller is responsible for deleting the return
- // value using delete[]. Returns the wide string, or NULL if the
- // input is NULL.
- //
- // The wide string is created using the ANSI codepage (CP_ACP) to
- // match the behaviour of the ANSI versions of Win32 calls and the
- // C runtime.
- static LPCWSTR AnsiToUtf16(const char* c_str);
-
- // Creates an ANSI string from the given wide string, allocating
- // memory using new. The caller is responsible for deleting the return
- // value using delete[]. Returns the ANSI string, or NULL if the
- // input is NULL.
- //
- // The returned string is created using the ANSI codepage (CP_ACP) to
- // match the behaviour of the ANSI versions of Win32 calls and the
- // C runtime.
- static const char* Utf16ToAnsi(LPCWSTR utf16_str);
-#endif
-
- // Compares two C strings. Returns true iff they have the same content.
- //
- // Unlike strcmp(), this function can handle NULL argument(s). A
- // NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool CStringEquals(const char* lhs, const char* rhs);
-
- // Converts a wide C string to a String using the UTF-8 encoding.
- // NULL will be converted to "(null)". If an error occurred during
- // the conversion, "(failed to convert from wide string)" is
- // returned.
- static String ShowWideCString(const wchar_t* wide_c_str);
-
- // Similar to ShowWideCString(), except that this function encloses
- // the converted string in double quotes.
- static String ShowWideCStringQuoted(const wchar_t* wide_c_str);
-
- // Compares two wide C strings. Returns true iff they have the same
- // content.
- //
- // Unlike wcscmp(), this function can handle NULL argument(s). A
- // NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
-
- // Compares two C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike strcasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL C string,
- // including the empty string.
- static bool CaseInsensitiveCStringEquals(const char* lhs,
- const char* rhs);
-
- // Compares two wide C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike wcscasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL wide C string,
- // including the empty string.
- // NB: The implementations on different platforms slightly differ.
- // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
- // environment variable. On GNU platform this method uses wcscasecmp
- // which compares according to LC_CTYPE category of the current locale.
- // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
- // current locale.
- static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs);
-
- // Formats a list of arguments to a String, using the same format
- // spec string as for printf.
- //
- // We do not use the StringPrintf class as it is not universally
- // available.
- //
- // The result is limited to 4096 characters (including the tailing
- // 0). If 4096 characters are not enough to format the input,
- // "<buffer exceeded>" is returned.
- static String Format(const char* format, ...);
-
- // C'tors
-
- // The default c'tor constructs a NULL string.
- String() : c_str_(NULL), length_(0) {}
-
- // Constructs a String by cloning a 0-terminated C string.
- String(const char* a_c_str) { // NOLINT
- if (a_c_str == NULL) {
- c_str_ = NULL;
- length_ = 0;
- } else {
- ConstructNonNull(a_c_str, strlen(a_c_str));
- }
- }
-
- // Constructs a String by copying a given number of chars from a
- // buffer. E.g. String("hello", 3) creates the string "hel",
- // String("a\0bcd", 4) creates "a\0bc", String(NULL, 0) creates "",
- // and String(NULL, 1) results in access violation.
- String(const char* buffer, size_t a_length) {
- ConstructNonNull(buffer, a_length);
- }
-
- // The copy c'tor creates a new copy of the string. The two
- // String objects do not share content.
- String(const String& str) : c_str_(NULL), length_(0) { *this = str; }
-
- // D'tor. String is intended to be a final class, so the d'tor
- // doesn't need to be virtual.
- ~String() { delete[] c_str_; }
-
- // Allows a String to be implicitly converted to an ::std::string or
- // ::string, and vice versa. Converting a String containing a NULL
- // pointer to ::std::string or ::string is undefined behavior.
- // Converting a ::std::string or ::string containing an embedded NUL
- // character to a String will result in the prefix up to the first
- // NUL character.
- String(const ::std::string& str) {
- ConstructNonNull(str.c_str(), str.length());
- }
-
- operator ::std::string() const { return ::std::string(c_str(), length()); }
-
-#if GTEST_HAS_GLOBAL_STRING
- String(const ::string& str) {
- ConstructNonNull(str.c_str(), str.length());
- }
-
- operator ::string() const { return ::string(c_str(), length()); }
-#endif // GTEST_HAS_GLOBAL_STRING
-
- // Returns true iff this is an empty string (i.e. "").
- bool empty() const { return (c_str() != NULL) && (length() == 0); }
-
- // Compares this with another String.
- // Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0
- // if this is greater than rhs.
- int Compare(const String& rhs) const;
-
- // Returns true iff this String equals the given C string. A NULL
- // string and a non-NULL string are considered not equal.
- bool operator==(const char* a_c_str) const { return Compare(a_c_str) == 0; }
-
- // Returns true iff this String is less than the given String. A
- // NULL string is considered less than "".
- bool operator<(const String& rhs) const { return Compare(rhs) < 0; }
-
- // Returns true iff this String doesn't equal the given C string. A NULL
- // string and a non-NULL string are considered not equal.
- bool operator!=(const char* a_c_str) const { return !(*this == a_c_str); }
-
- // Returns true iff this String ends with the given suffix. *Any*
- // String is considered to end with a NULL or empty suffix.
- bool EndsWith(const char* suffix) const;
-
- // Returns true iff this String ends with the given suffix, not considering
- // case. Any String is considered to end with a NULL or empty suffix.
- bool EndsWithCaseInsensitive(const char* suffix) const;
-
- // Returns the length of the encapsulated string, or 0 if the
- // string is NULL.
- size_t length() const { return length_; }
-
- // Gets the 0-terminated C string this String object represents.
- // The String object still owns the string. Therefore the caller
- // should NOT delete the return value.
- const char* c_str() const { return c_str_; }
-
- // Assigns a C string to this object. Self-assignment works.
- const String& operator=(const char* a_c_str) {
- return *this = String(a_c_str);
- }
-
- // Assigns a String object to this object. Self-assignment works.
- const String& operator=(const String& rhs) {
- if (this != &rhs) {
- delete[] c_str_;
- if (rhs.c_str() == NULL) {
- c_str_ = NULL;
- length_ = 0;
- } else {
- ConstructNonNull(rhs.c_str(), rhs.length());
- }
- }
-
- return *this;
- }
-
- private:
- // Constructs a non-NULL String from the given content. This
- // function can only be called when c_str_ has not been allocated.
- // ConstructNonNull(NULL, 0) results in an empty string ("").
- // ConstructNonNull(NULL, non_zero) is undefined behavior.
- void ConstructNonNull(const char* buffer, size_t a_length) {
- char* const str = new char[a_length + 1];
- memcpy(str, buffer, a_length);
- str[a_length] = '\0';
- c_str_ = str;
- length_ = a_length;
- }
-
- const char* c_str_;
- size_t length_;
-}; // class String
-
-// Streams a String to an ostream. Each '\0' character in the String
-// is replaced with "\\0".
-inline ::std::ostream& operator<<(::std::ostream& os, const String& str) {
- if (str.c_str() == NULL) {
- os << "(null)";
- } else {
- const char* const c_str = str.c_str();
- for (size_t i = 0; i != str.length(); i++) {
- if (c_str[i] == '\0') {
- os << "\\0";
- } else {
- os << c_str[i];
- }
- }
- }
- return os;
-}
-
-// Gets the content of the stringstream's buffer as a String. Each '\0'
-// character in the buffer is replaced with "\\0".
-GTEST_API_ String StringStreamToString(::std::stringstream* stream);
-
-// Converts a streamable value to a String. A NULL pointer is
-// converted to "(null)". When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-
-// Declared here but defined in gtest.h, so that it has access
-// to the definition of the Message class, required by the ARM
-// compiler.
-template <typename T>
-String StreamableToString(const T& streamable);
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h
deleted file mode 100644
index d1af50e18..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h
+++ /dev/null
@@ -1,968 +0,0 @@
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2009 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements a subset of TR1 tuple needed by Google Test and Google Mock.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-
-#include <utility> // For ::std::pair.
-
-// The compiler used in Symbian has a bug that prevents us from declaring the
-// tuple template as a friend (it complains that tuple is redefined). This
-// hack bypasses the bug by declaring the members that should otherwise be
-// private as public.
-// Sun Studio versions < 12 also have the above bug.
-#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:
-#else
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \
- template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
- private:
-#endif
-
-// GTEST_n_TUPLE_(T) is the type of an n-tuple.
-#define GTEST_0_TUPLE_(T) tuple<>
-#define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
- void, void, void>
-#define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
- void, void, void>
-#define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
- void, void, void>
-#define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
- void, void, void>
-#define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
- void, void, void>
-#define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
- void, void, void>
-#define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- void, void, void>
-#define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, void, void>
-#define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, T##8, void>
-#define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
- T##7, T##8, T##9>
-
-// GTEST_n_TYPENAMES_(T) declares a list of n typenames.
-#define GTEST_0_TYPENAMES_(T)
-#define GTEST_1_TYPENAMES_(T) typename T##0
-#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1
-#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2
-#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3
-#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4
-#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5
-#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6
-#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, typename T##7
-#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, \
- typename T##7, typename T##8
-#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
- typename T##3, typename T##4, typename T##5, typename T##6, \
- typename T##7, typename T##8, typename T##9
-
-// In theory, defining stuff in the ::std namespace is undefined
-// behavior. We can do this as we are playing the role of a standard
-// library vendor.
-namespace std {
-namespace tr1 {
-
-template <typename T0 = void, typename T1 = void, typename T2 = void,
- typename T3 = void, typename T4 = void, typename T5 = void,
- typename T6 = void, typename T7 = void, typename T8 = void,
- typename T9 = void>
-class tuple;
-
-// Anything in namespace gtest_internal is Google Test's INTERNAL
-// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.
-namespace gtest_internal {
-
-// ByRef<T>::type is T if T is a reference; otherwise it's const T&.
-template <typename T>
-struct ByRef { typedef const T& type; }; // NOLINT
-template <typename T>
-struct ByRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for ByRef.
-#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
-
-// AddRef<T>::type is T if T is a reference; otherwise it's T&. This
-// is the same as tr1::add_reference<T>::type.
-template <typename T>
-struct AddRef { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for AddRef.
-#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type
-
-// A helper for implementing get<k>().
-template <int k> class Get;
-
-// A helper for implementing tuple_element<k, T>. kIndexValid is true
-// iff k < the number of fields in tuple type T.
-template <bool kIndexValid, int kIndex, class Tuple>
-struct TupleElement;
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 0, GTEST_10_TUPLE_(T)> { typedef T0 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 1, GTEST_10_TUPLE_(T)> { typedef T1 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 2, GTEST_10_TUPLE_(T)> { typedef T2 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 3, GTEST_10_TUPLE_(T)> { typedef T3 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 4, GTEST_10_TUPLE_(T)> { typedef T4 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 5, GTEST_10_TUPLE_(T)> { typedef T5 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 6, GTEST_10_TUPLE_(T)> { typedef T6 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 7, GTEST_10_TUPLE_(T)> { typedef T7 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 8, GTEST_10_TUPLE_(T)> { typedef T8 type; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct TupleElement<true, 9, GTEST_10_TUPLE_(T)> { typedef T9 type; };
-
-} // namespace gtest_internal
-
-template <>
-class tuple<> {
- public:
- tuple() {}
- tuple(const tuple& /* t */) {}
- tuple& operator=(const tuple& /* t */) { return *this; }
-};
-
-template <GTEST_1_TYPENAMES_(T)>
-class GTEST_1_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
-
- tuple(const tuple& t) : f0_(t.f0_) {}
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple& operator=(const GTEST_1_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_1_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {
- f0_ = t.f0_;
- return *this;
- }
-
- T0 f0_;
-};
-
-template <GTEST_2_TYPENAMES_(T)>
-class GTEST_2_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
- f1_(f1) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
- template <typename U0, typename U1>
- tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple& operator=(const GTEST_2_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
- template <typename U0, typename U1>
- tuple& operator=(const ::std::pair<U0, U1>& p) {
- f0_ = p.first;
- f1_ = p.second;
- return *this;
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_2_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
-};
-
-template <GTEST_3_TYPENAMES_(T)>
-class GTEST_3_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple& operator=(const GTEST_3_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_3_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
-};
-
-template <GTEST_4_TYPENAMES_(T)>
-class GTEST_4_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple& operator=(const GTEST_4_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_4_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
-};
-
-template <GTEST_5_TYPENAMES_(T)>
-class GTEST_5_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3,
- GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_) {}
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple& operator=(const GTEST_5_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_5_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
-};
-
-template <GTEST_6_TYPENAMES_(T)>
-class GTEST_6_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_) {}
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple& operator=(const GTEST_6_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_6_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
-};
-
-template <GTEST_7_TYPENAMES_(T)>
-class GTEST_7_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3), f4_(f4), f5_(f5), f6_(f6) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple& operator=(const GTEST_7_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_7_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
-};
-
-template <GTEST_8_TYPENAMES_(T)>
-class GTEST_8_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6,
- GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5), f6_(f6), f7_(f7) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple& operator=(const GTEST_8_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_8_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
-};
-
-template <GTEST_9_TYPENAMES_(T)>
-class GTEST_9_TUPLE_(T) {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
- GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
- f5_(f5), f6_(f6), f7_(f7), f8_(f8) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple& operator=(const GTEST_9_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_9_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- f8_ = t.f8_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
- T8 f8_;
-};
-
-template <GTEST_10_TYPENAMES_(T)>
-class tuple {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
- f9_() {}
-
- explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
- GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
- GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
- GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2),
- f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {}
-
- tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
- f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {}
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
- f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_),
- f9_(t.f9_) {}
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple& operator=(const GTEST_10_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_10_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {
- f0_ = t.f0_;
- f1_ = t.f1_;
- f2_ = t.f2_;
- f3_ = t.f3_;
- f4_ = t.f4_;
- f5_ = t.f5_;
- f6_ = t.f6_;
- f7_ = t.f7_;
- f8_ = t.f8_;
- f9_ = t.f9_;
- return *this;
- }
-
- T0 f0_;
- T1 f1_;
- T2 f2_;
- T3 f3_;
- T4 f4_;
- T5 f5_;
- T6 f6_;
- T7 f7_;
- T8 f8_;
- T9 f9_;
-};
-
-// 6.1.3.2 Tuple creation functions.
-
-// Known limitations: we don't support passing an
-// std::tr1::reference_wrapper<T> to make_tuple(). And we don't
-// implement tie().
-
-inline tuple<> make_tuple() { return tuple<>(); }
-
-template <GTEST_1_TYPENAMES_(T)>
-inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) {
- return GTEST_1_TUPLE_(T)(f0);
-}
-
-template <GTEST_2_TYPENAMES_(T)>
-inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) {
- return GTEST_2_TUPLE_(T)(f0, f1);
-}
-
-template <GTEST_3_TYPENAMES_(T)>
-inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) {
- return GTEST_3_TUPLE_(T)(f0, f1, f2);
-}
-
-template <GTEST_4_TYPENAMES_(T)>
-inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3) {
- return GTEST_4_TUPLE_(T)(f0, f1, f2, f3);
-}
-
-template <GTEST_5_TYPENAMES_(T)>
-inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4) {
- return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4);
-}
-
-template <GTEST_6_TYPENAMES_(T)>
-inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5) {
- return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5);
-}
-
-template <GTEST_7_TYPENAMES_(T)>
-inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6) {
- return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6);
-}
-
-template <GTEST_8_TYPENAMES_(T)>
-inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) {
- return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7);
-}
-
-template <GTEST_9_TYPENAMES_(T)>
-inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
- const T8& f8) {
- return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8);
-}
-
-template <GTEST_10_TYPENAMES_(T)>
-inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
- const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
- const T8& f8, const T9& f9) {
- return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
-}
-
-// 6.1.3.3 Tuple helper classes.
-
-template <typename Tuple> struct tuple_size;
-
-template <GTEST_0_TYPENAMES_(T)>
-struct tuple_size<GTEST_0_TUPLE_(T)> { static const int value = 0; };
-
-template <GTEST_1_TYPENAMES_(T)>
-struct tuple_size<GTEST_1_TUPLE_(T)> { static const int value = 1; };
-
-template <GTEST_2_TYPENAMES_(T)>
-struct tuple_size<GTEST_2_TUPLE_(T)> { static const int value = 2; };
-
-template <GTEST_3_TYPENAMES_(T)>
-struct tuple_size<GTEST_3_TUPLE_(T)> { static const int value = 3; };
-
-template <GTEST_4_TYPENAMES_(T)>
-struct tuple_size<GTEST_4_TUPLE_(T)> { static const int value = 4; };
-
-template <GTEST_5_TYPENAMES_(T)>
-struct tuple_size<GTEST_5_TUPLE_(T)> { static const int value = 5; };
-
-template <GTEST_6_TYPENAMES_(T)>
-struct tuple_size<GTEST_6_TUPLE_(T)> { static const int value = 6; };
-
-template <GTEST_7_TYPENAMES_(T)>
-struct tuple_size<GTEST_7_TUPLE_(T)> { static const int value = 7; };
-
-template <GTEST_8_TYPENAMES_(T)>
-struct tuple_size<GTEST_8_TUPLE_(T)> { static const int value = 8; };
-
-template <GTEST_9_TYPENAMES_(T)>
-struct tuple_size<GTEST_9_TUPLE_(T)> { static const int value = 9; };
-
-template <GTEST_10_TYPENAMES_(T)>
-struct tuple_size<GTEST_10_TUPLE_(T)> { static const int value = 10; };
-
-template <int k, class Tuple>
-struct tuple_element {
- typedef typename gtest_internal::TupleElement<
- k < (tuple_size<Tuple>::value), k, Tuple>::type type;
-};
-
-#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
-
-// 6.1.3.4 Element access.
-
-namespace gtest_internal {
-
-template <>
-class Get<0> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
- Field(Tuple& t) { return t.f0_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
- ConstField(const Tuple& t) { return t.f0_; }
-};
-
-template <>
-class Get<1> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
- Field(Tuple& t) { return t.f1_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
- ConstField(const Tuple& t) { return t.f1_; }
-};
-
-template <>
-class Get<2> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
- Field(Tuple& t) { return t.f2_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
- ConstField(const Tuple& t) { return t.f2_; }
-};
-
-template <>
-class Get<3> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
- Field(Tuple& t) { return t.f3_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
- ConstField(const Tuple& t) { return t.f3_; }
-};
-
-template <>
-class Get<4> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
- Field(Tuple& t) { return t.f4_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
- ConstField(const Tuple& t) { return t.f4_; }
-};
-
-template <>
-class Get<5> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
- Field(Tuple& t) { return t.f5_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
- ConstField(const Tuple& t) { return t.f5_; }
-};
-
-template <>
-class Get<6> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
- Field(Tuple& t) { return t.f6_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
- ConstField(const Tuple& t) { return t.f6_; }
-};
-
-template <>
-class Get<7> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
- Field(Tuple& t) { return t.f7_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
- ConstField(const Tuple& t) { return t.f7_; }
-};
-
-template <>
-class Get<8> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
- Field(Tuple& t) { return t.f8_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
- ConstField(const Tuple& t) { return t.f8_; }
-};
-
-template <>
-class Get<9> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
- Field(Tuple& t) { return t.f9_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
- ConstField(const Tuple& t) { return t.f9_; }
-};
-
-} // namespace gtest_internal
-
-template <int k, GTEST_10_TYPENAMES_(T)>
-GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
-get(GTEST_10_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::Field(t);
-}
-
-template <int k, GTEST_10_TYPENAMES_(T)>
-GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
-get(const GTEST_10_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::ConstField(t);
-}
-
-// 6.1.3.5 Relational operators
-
-// We only implement == and !=, as we don't have a need for the rest yet.
-
-namespace gtest_internal {
-
-// SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the
-// first k fields of t1 equals the first k fields of t2.
-// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if
-// k1 != k2.
-template <int kSize1, int kSize2>
-struct SameSizeTuplePrefixComparator;
-
-template <>
-struct SameSizeTuplePrefixComparator<0, 0> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {
- return true;
- }
-};
-
-template <int k>
-struct SameSizeTuplePrefixComparator<k, k> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& t1, const Tuple2& t2) {
- return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&
- ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);
- }
-};
-
-} // namespace gtest_internal
-
-template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
-inline bool operator==(const GTEST_10_TUPLE_(T)& t,
- const GTEST_10_TUPLE_(U)& u) {
- return gtest_internal::SameSizeTuplePrefixComparator<
- tuple_size<GTEST_10_TUPLE_(T)>::value,
- tuple_size<GTEST_10_TUPLE_(U)>::value>::Eq(t, u);
-}
-
-template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
-inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
- const GTEST_10_TUPLE_(U)& u) { return !(t == u); }
-
-// 6.1.4 Pairs.
-// Unimplemented.
-
-} // namespace tr1
-} // namespace std
-
-#undef GTEST_0_TUPLE_
-#undef GTEST_1_TUPLE_
-#undef GTEST_2_TUPLE_
-#undef GTEST_3_TUPLE_
-#undef GTEST_4_TUPLE_
-#undef GTEST_5_TUPLE_
-#undef GTEST_6_TUPLE_
-#undef GTEST_7_TUPLE_
-#undef GTEST_8_TUPLE_
-#undef GTEST_9_TUPLE_
-#undef GTEST_10_TUPLE_
-
-#undef GTEST_0_TYPENAMES_
-#undef GTEST_1_TYPENAMES_
-#undef GTEST_2_TYPENAMES_
-#undef GTEST_3_TYPENAMES_
-#undef GTEST_4_TYPENAMES_
-#undef GTEST_5_TYPENAMES_
-#undef GTEST_6_TYPENAMES_
-#undef GTEST_7_TYPENAMES_
-#undef GTEST_8_TYPENAMES_
-#undef GTEST_9_TYPENAMES_
-#undef GTEST_10_TYPENAMES_
-
-#undef GTEST_DECLARE_TUPLE_AS_FRIEND_
-#undef GTEST_BY_REF_
-#undef GTEST_ADD_REF_
-#undef GTEST_TUPLE_ELEMENT_
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h.pump
deleted file mode 100644
index ef519094a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-tuple.h.pump
+++ /dev/null
@@ -1,336 +0,0 @@
-$$ -*- mode: c++; -*-
-$var n = 10 $$ Maximum number of tuple fields we want to support.
-$$ This meta comment fixes auto-indentation in Emacs. }}
-// Copyright 2009 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements a subset of TR1 tuple needed by Google Test and Google Mock.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
-
-#include <utility> // For ::std::pair.
-
-// The compiler used in Symbian has a bug that prevents us from declaring the
-// tuple template as a friend (it complains that tuple is redefined). This
-// hack bypasses the bug by declaring the members that should otherwise be
-// private as public.
-// Sun Studio versions < 12 also have the above bug.
-#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:
-#else
-# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \
- template <GTEST_$(n)_TYPENAMES_(U)> friend class tuple; \
- private:
-#endif
-
-
-$range i 0..n-1
-$range j 0..n
-$range k 1..n
-// GTEST_n_TUPLE_(T) is the type of an n-tuple.
-#define GTEST_0_TUPLE_(T) tuple<>
-
-$for k [[
-$range m 0..k-1
-$range m2 k..n-1
-#define GTEST_$(k)_TUPLE_(T) tuple<$for m, [[T##$m]]$for m2 [[, void]]>
-
-]]
-
-// GTEST_n_TYPENAMES_(T) declares a list of n typenames.
-
-$for j [[
-$range m 0..j-1
-#define GTEST_$(j)_TYPENAMES_(T) $for m, [[typename T##$m]]
-
-
-]]
-
-// In theory, defining stuff in the ::std namespace is undefined
-// behavior. We can do this as we are playing the role of a standard
-// library vendor.
-namespace std {
-namespace tr1 {
-
-template <$for i, [[typename T$i = void]]>
-class tuple;
-
-// Anything in namespace gtest_internal is Google Test's INTERNAL
-// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.
-namespace gtest_internal {
-
-// ByRef<T>::type is T if T is a reference; otherwise it's const T&.
-template <typename T>
-struct ByRef { typedef const T& type; }; // NOLINT
-template <typename T>
-struct ByRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for ByRef.
-#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
-
-// AddRef<T>::type is T if T is a reference; otherwise it's T&. This
-// is the same as tr1::add_reference<T>::type.
-template <typename T>
-struct AddRef { typedef T& type; }; // NOLINT
-template <typename T>
-struct AddRef<T&> { typedef T& type; }; // NOLINT
-
-// A handy wrapper for AddRef.
-#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type
-
-// A helper for implementing get<k>().
-template <int k> class Get;
-
-// A helper for implementing tuple_element<k, T>. kIndexValid is true
-// iff k < the number of fields in tuple type T.
-template <bool kIndexValid, int kIndex, class Tuple>
-struct TupleElement;
-
-
-$for i [[
-template <GTEST_$(n)_TYPENAMES_(T)>
-struct TupleElement<true, $i, GTEST_$(n)_TUPLE_(T)> [[]]
-{ typedef T$i type; };
-
-
-]]
-} // namespace gtest_internal
-
-template <>
-class tuple<> {
- public:
- tuple() {}
- tuple(const tuple& /* t */) {}
- tuple& operator=(const tuple& /* t */) { return *this; }
-};
-
-
-$for k [[
-$range m 0..k-1
-template <GTEST_$(k)_TYPENAMES_(T)>
-class $if k < n [[GTEST_$(k)_TUPLE_(T)]] $else [[tuple]] {
- public:
- template <int k> friend class gtest_internal::Get;
-
- tuple() : $for m, [[f$(m)_()]] {}
-
- explicit tuple($for m, [[GTEST_BY_REF_(T$m) f$m]]) : [[]]
-$for m, [[f$(m)_(f$m)]] {}
-
- tuple(const tuple& t) : $for m, [[f$(m)_(t.f$(m)_)]] {}
-
- template <GTEST_$(k)_TYPENAMES_(U)>
- tuple(const GTEST_$(k)_TUPLE_(U)& t) : $for m, [[f$(m)_(t.f$(m)_)]] {}
-
-$if k == 2 [[
- template <typename U0, typename U1>
- tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
-
-]]
-
- tuple& operator=(const tuple& t) { return CopyFrom(t); }
-
- template <GTEST_$(k)_TYPENAMES_(U)>
- tuple& operator=(const GTEST_$(k)_TUPLE_(U)& t) {
- return CopyFrom(t);
- }
-
-$if k == 2 [[
- template <typename U0, typename U1>
- tuple& operator=(const ::std::pair<U0, U1>& p) {
- f0_ = p.first;
- f1_ = p.second;
- return *this;
- }
-
-]]
-
- GTEST_DECLARE_TUPLE_AS_FRIEND_
-
- template <GTEST_$(k)_TYPENAMES_(U)>
- tuple& CopyFrom(const GTEST_$(k)_TUPLE_(U)& t) {
-
-$for m [[
- f$(m)_ = t.f$(m)_;
-
-]]
- return *this;
- }
-
-
-$for m [[
- T$m f$(m)_;
-
-]]
-};
-
-
-]]
-// 6.1.3.2 Tuple creation functions.
-
-// Known limitations: we don't support passing an
-// std::tr1::reference_wrapper<T> to make_tuple(). And we don't
-// implement tie().
-
-inline tuple<> make_tuple() { return tuple<>(); }
-
-$for k [[
-$range m 0..k-1
-
-template <GTEST_$(k)_TYPENAMES_(T)>
-inline GTEST_$(k)_TUPLE_(T) make_tuple($for m, [[const T$m& f$m]]) {
- return GTEST_$(k)_TUPLE_(T)($for m, [[f$m]]);
-}
-
-]]
-
-// 6.1.3.3 Tuple helper classes.
-
-template <typename Tuple> struct tuple_size;
-
-
-$for j [[
-template <GTEST_$(j)_TYPENAMES_(T)>
-struct tuple_size<GTEST_$(j)_TUPLE_(T)> { static const int value = $j; };
-
-
-]]
-template <int k, class Tuple>
-struct tuple_element {
- typedef typename gtest_internal::TupleElement<
- k < (tuple_size<Tuple>::value), k, Tuple>::type type;
-};
-
-#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
-
-// 6.1.3.4 Element access.
-
-namespace gtest_internal {
-
-
-$for i [[
-template <>
-class Get<$i> {
- public:
- template <class Tuple>
- static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple))
- Field(Tuple& t) { return t.f$(i)_; } // NOLINT
-
- template <class Tuple>
- static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple))
- ConstField(const Tuple& t) { return t.f$(i)_; }
-};
-
-
-]]
-} // namespace gtest_internal
-
-template <int k, GTEST_$(n)_TYPENAMES_(T)>
-GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T)))
-get(GTEST_$(n)_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::Field(t);
-}
-
-template <int k, GTEST_$(n)_TYPENAMES_(T)>
-GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T)))
-get(const GTEST_$(n)_TUPLE_(T)& t) {
- return gtest_internal::Get<k>::ConstField(t);
-}
-
-// 6.1.3.5 Relational operators
-
-// We only implement == and !=, as we don't have a need for the rest yet.
-
-namespace gtest_internal {
-
-// SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the
-// first k fields of t1 equals the first k fields of t2.
-// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if
-// k1 != k2.
-template <int kSize1, int kSize2>
-struct SameSizeTuplePrefixComparator;
-
-template <>
-struct SameSizeTuplePrefixComparator<0, 0> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {
- return true;
- }
-};
-
-template <int k>
-struct SameSizeTuplePrefixComparator<k, k> {
- template <class Tuple1, class Tuple2>
- static bool Eq(const Tuple1& t1, const Tuple2& t2) {
- return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&
- ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);
- }
-};
-
-} // namespace gtest_internal
-
-template <GTEST_$(n)_TYPENAMES_(T), GTEST_$(n)_TYPENAMES_(U)>
-inline bool operator==(const GTEST_$(n)_TUPLE_(T)& t,
- const GTEST_$(n)_TUPLE_(U)& u) {
- return gtest_internal::SameSizeTuplePrefixComparator<
- tuple_size<GTEST_$(n)_TUPLE_(T)>::value,
- tuple_size<GTEST_$(n)_TUPLE_(U)>::value>::Eq(t, u);
-}
-
-template <GTEST_$(n)_TYPENAMES_(T), GTEST_$(n)_TYPENAMES_(U)>
-inline bool operator!=(const GTEST_$(n)_TUPLE_(T)& t,
- const GTEST_$(n)_TUPLE_(U)& u) { return !(t == u); }
-
-// 6.1.4 Pairs.
-// Unimplemented.
-
-} // namespace tr1
-} // namespace std
-
-
-$for j [[
-#undef GTEST_$(j)_TUPLE_
-
-]]
-
-
-$for j [[
-#undef GTEST_$(j)_TYPENAMES_
-
-]]
-
-#undef GTEST_DECLARE_TUPLE_AS_FRIEND_
-#undef GTEST_BY_REF_
-#undef GTEST_ADD_REF_
-#undef GTEST_TUPLE_ELEMENT_
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h
deleted file mode 100644
index b7b01b094..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h
+++ /dev/null
@@ -1,3330 +0,0 @@
-// This file was GENERATED by command:
-// pump.py gtest-type-util.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Type utilities needed for implementing typed and type-parameterized
-// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently we support at most 50 types in a list, and at most 50
-// type-parameterized tests in one type-parameterized test case.
-// Please contact googletestframework@googlegroups.com if you need
-// more.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-#include "gtest/internal/gtest-port.h"
-#include "gtest/internal/gtest-string.h"
-
-// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
-// libstdc++ (which is where cxxabi.h comes from).
-# ifdef __GLIBCXX__
-# include <cxxabi.h>
-# elif defined(__HP_aCC)
-# include <acxx_demangle.h>
-# endif // __GLIBCXX__
-
-namespace testing {
-namespace internal {
-
-// GetTypeName<T>() returns a human-readable name of type T.
-// NB: This function is also used in Google Mock, so don't move it inside of
-// the typed-test-only section below.
-template <typename T>
-String GetTypeName() {
-# if GTEST_HAS_RTTI
-
- const char* const name = typeid(T).name();
-# if defined(__GLIBCXX__) || defined(__HP_aCC)
- int status = 0;
- // gcc's implementation of typeid(T).name() mangles the type name,
- // so we have to demangle it.
-# ifdef __GLIBCXX__
- using abi::__cxa_demangle;
-# endif // __GLIBCXX__
- char* const readable_name = __cxa_demangle(name, 0, 0, &status);
- const String name_str(status == 0 ? readable_name : name);
- free(readable_name);
- return name_str;
-# else
- return name;
-# endif // __GLIBCXX__ || __HP_aCC
-
-# else
-
- return "<type>";
-
-# endif // GTEST_HAS_RTTI
-}
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
-// type. This can be used as a compile-time assertion to ensure that
-// two types are equal.
-
-template <typename T1, typename T2>
-struct AssertTypeEq;
-
-template <typename T>
-struct AssertTypeEq<T, T> {
- typedef bool type;
-};
-
-// A unique type used as the default value for the arguments of class
-// template Types. This allows us to simulate variadic templates
-// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
-// support directly.
-struct None {};
-
-// The following family of struct and struct templates are used to
-// represent type lists. In particular, TypesN<T1, T2, ..., TN>
-// represents a type list with N types (T1, T2, ..., and TN) in it.
-// Except for Types0, every struct in the family has two member types:
-// Head for the first type in the list, and Tail for the rest of the
-// list.
-
-// The empty type list.
-struct Types0 {};
-
-// Type lists of length 1, 2, 3, and so on.
-
-template <typename T1>
-struct Types1 {
- typedef T1 Head;
- typedef Types0 Tail;
-};
-template <typename T1, typename T2>
-struct Types2 {
- typedef T1 Head;
- typedef Types1<T2> Tail;
-};
-
-template <typename T1, typename T2, typename T3>
-struct Types3 {
- typedef T1 Head;
- typedef Types2<T2, T3> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-struct Types4 {
- typedef T1 Head;
- typedef Types3<T2, T3, T4> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-struct Types5 {
- typedef T1 Head;
- typedef Types4<T2, T3, T4, T5> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-struct Types6 {
- typedef T1 Head;
- typedef Types5<T2, T3, T4, T5, T6> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-struct Types7 {
- typedef T1 Head;
- typedef Types6<T2, T3, T4, T5, T6, T7> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-struct Types8 {
- typedef T1 Head;
- typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-struct Types9 {
- typedef T1 Head;
- typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-struct Types10 {
- typedef T1 Head;
- typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-struct Types11 {
- typedef T1 Head;
- typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-struct Types12 {
- typedef T1 Head;
- typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-struct Types13 {
- typedef T1 Head;
- typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-struct Types14 {
- typedef T1 Head;
- typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-struct Types15 {
- typedef T1 Head;
- typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-struct Types16 {
- typedef T1 Head;
- typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-struct Types17 {
- typedef T1 Head;
- typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-struct Types18 {
- typedef T1 Head;
- typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-struct Types19 {
- typedef T1 Head;
- typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-struct Types20 {
- typedef T1 Head;
- typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-struct Types21 {
- typedef T1 Head;
- typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-struct Types22 {
- typedef T1 Head;
- typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-struct Types23 {
- typedef T1 Head;
- typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-struct Types24 {
- typedef T1 Head;
- typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-struct Types25 {
- typedef T1 Head;
- typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-struct Types26 {
- typedef T1 Head;
- typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-struct Types27 {
- typedef T1 Head;
- typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-struct Types28 {
- typedef T1 Head;
- typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-struct Types29 {
- typedef T1 Head;
- typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-struct Types30 {
- typedef T1 Head;
- typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-struct Types31 {
- typedef T1 Head;
- typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-struct Types32 {
- typedef T1 Head;
- typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-struct Types33 {
- typedef T1 Head;
- typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-struct Types34 {
- typedef T1 Head;
- typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-struct Types35 {
- typedef T1 Head;
- typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-struct Types36 {
- typedef T1 Head;
- typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-struct Types37 {
- typedef T1 Head;
- typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-struct Types38 {
- typedef T1 Head;
- typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-struct Types39 {
- typedef T1 Head;
- typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-struct Types40 {
- typedef T1 Head;
- typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-struct Types41 {
- typedef T1 Head;
- typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-struct Types42 {
- typedef T1 Head;
- typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-struct Types43 {
- typedef T1 Head;
- typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-struct Types44 {
- typedef T1 Head;
- typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-struct Types45 {
- typedef T1 Head;
- typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-struct Types46 {
- typedef T1 Head;
- typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-struct Types47 {
- typedef T1 Head;
- typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-struct Types48 {
- typedef T1 Head;
- typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-struct Types49 {
- typedef T1 Head;
- typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49> Tail;
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-struct Types50 {
- typedef T1 Head;
- typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> Tail;
-};
-
-
-} // namespace internal
-
-// We don't want to require the users to write TypesN<...> directly,
-// as that would require them to count the length. Types<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Types<int>
-// will appear as Types<int, None, None, ..., None> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Types<T1, ..., TN>, and Google Test will translate
-// that to TypesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Types template.
-template <typename T1 = internal::None, typename T2 = internal::None,
- typename T3 = internal::None, typename T4 = internal::None,
- typename T5 = internal::None, typename T6 = internal::None,
- typename T7 = internal::None, typename T8 = internal::None,
- typename T9 = internal::None, typename T10 = internal::None,
- typename T11 = internal::None, typename T12 = internal::None,
- typename T13 = internal::None, typename T14 = internal::None,
- typename T15 = internal::None, typename T16 = internal::None,
- typename T17 = internal::None, typename T18 = internal::None,
- typename T19 = internal::None, typename T20 = internal::None,
- typename T21 = internal::None, typename T22 = internal::None,
- typename T23 = internal::None, typename T24 = internal::None,
- typename T25 = internal::None, typename T26 = internal::None,
- typename T27 = internal::None, typename T28 = internal::None,
- typename T29 = internal::None, typename T30 = internal::None,
- typename T31 = internal::None, typename T32 = internal::None,
- typename T33 = internal::None, typename T34 = internal::None,
- typename T35 = internal::None, typename T36 = internal::None,
- typename T37 = internal::None, typename T38 = internal::None,
- typename T39 = internal::None, typename T40 = internal::None,
- typename T41 = internal::None, typename T42 = internal::None,
- typename T43 = internal::None, typename T44 = internal::None,
- typename T45 = internal::None, typename T46 = internal::None,
- typename T47 = internal::None, typename T48 = internal::None,
- typename T49 = internal::None, typename T50 = internal::None>
-struct Types {
- typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
-};
-
-template <>
-struct Types<internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types0 type;
-};
-template <typename T1>
-struct Types<T1, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types1<T1> type;
-};
-template <typename T1, typename T2>
-struct Types<T1, T2, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types2<T1, T2> type;
-};
-template <typename T1, typename T2, typename T3>
-struct Types<T1, T2, T3, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types3<T1, T2, T3> type;
-};
-template <typename T1, typename T2, typename T3, typename T4>
-struct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types4<T1, T2, T3, T4> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-struct Types<T1, T2, T3, T4, T5, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types5<T1, T2, T3, T4, T5> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-struct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-struct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
- T12> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
- T26> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
- T40> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None, internal::None> {
- typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- internal::None, internal::None, internal::None, internal::None,
- internal::None, internal::None> {
- typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- internal::None, internal::None, internal::None, internal::None,
- internal::None> {
- typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, internal::None, internal::None, internal::None, internal::None> {
- typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, internal::None, internal::None, internal::None> {
- typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, T48, internal::None, internal::None> {
- typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48> type;
-};
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49>
-struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
- T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
- T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
- T46, T47, T48, T49, internal::None> {
- typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49> type;
-};
-
-namespace internal {
-
-# define GTEST_TEMPLATE_ template <typename T> class
-
-// The template "selector" struct TemplateSel<Tmpl> is used to
-// represent Tmpl, which must be a class template with one type
-// parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
-// as the type Tmpl<T>. This allows us to actually instantiate the
-// template "selected" by TemplateSel<Tmpl>.
-//
-// This trick is necessary for simulating typedef for class templates,
-// which C++ doesn't support directly.
-template <GTEST_TEMPLATE_ Tmpl>
-struct TemplateSel {
- template <typename T>
- struct Bind {
- typedef Tmpl<T> type;
- };
-};
-
-# define GTEST_BIND_(TmplSel, T) \
- TmplSel::template Bind<T>::type
-
-// A unique struct template used as the default value for the
-// arguments of class template Templates. This allows us to simulate
-// variadic templates (e.g. Templates<int>, Templates<int, double>,
-// and etc), which C++ doesn't support directly.
-template <typename T>
-struct NoneT {};
-
-// The following family of struct and struct templates are used to
-// represent template lists. In particular, TemplatesN<T1, T2, ...,
-// TN> represents a list of N templates (T1, T2, ..., and TN). Except
-// for Templates0, every struct in the family has two member types:
-// Head for the selector of the first template in the list, and Tail
-// for the rest of the list.
-
-// The empty template list.
-struct Templates0 {};
-
-// Template lists of length 1, 2, 3, and so on.
-
-template <GTEST_TEMPLATE_ T1>
-struct Templates1 {
- typedef TemplateSel<T1> Head;
- typedef Templates0 Tail;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
-struct Templates2 {
- typedef TemplateSel<T1> Head;
- typedef Templates1<T2> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
-struct Templates3 {
- typedef TemplateSel<T1> Head;
- typedef Templates2<T2, T3> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4>
-struct Templates4 {
- typedef TemplateSel<T1> Head;
- typedef Templates3<T2, T3, T4> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
-struct Templates5 {
- typedef TemplateSel<T1> Head;
- typedef Templates4<T2, T3, T4, T5> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
-struct Templates6 {
- typedef TemplateSel<T1> Head;
- typedef Templates5<T2, T3, T4, T5, T6> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7>
-struct Templates7 {
- typedef TemplateSel<T1> Head;
- typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
-struct Templates8 {
- typedef TemplateSel<T1> Head;
- typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
-struct Templates9 {
- typedef TemplateSel<T1> Head;
- typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10>
-struct Templates10 {
- typedef TemplateSel<T1> Head;
- typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
-struct Templates11 {
- typedef TemplateSel<T1> Head;
- typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
-struct Templates12 {
- typedef TemplateSel<T1> Head;
- typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13>
-struct Templates13 {
- typedef TemplateSel<T1> Head;
- typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
-struct Templates14 {
- typedef TemplateSel<T1> Head;
- typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
-struct Templates15 {
- typedef TemplateSel<T1> Head;
- typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16>
-struct Templates16 {
- typedef TemplateSel<T1> Head;
- typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
-struct Templates17 {
- typedef TemplateSel<T1> Head;
- typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
-struct Templates18 {
- typedef TemplateSel<T1> Head;
- typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19>
-struct Templates19 {
- typedef TemplateSel<T1> Head;
- typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
-struct Templates20 {
- typedef TemplateSel<T1> Head;
- typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
-struct Templates21 {
- typedef TemplateSel<T1> Head;
- typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22>
-struct Templates22 {
- typedef TemplateSel<T1> Head;
- typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
-struct Templates23 {
- typedef TemplateSel<T1> Head;
- typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
-struct Templates24 {
- typedef TemplateSel<T1> Head;
- typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25>
-struct Templates25 {
- typedef TemplateSel<T1> Head;
- typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
-struct Templates26 {
- typedef TemplateSel<T1> Head;
- typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
-struct Templates27 {
- typedef TemplateSel<T1> Head;
- typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28>
-struct Templates28 {
- typedef TemplateSel<T1> Head;
- typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
-struct Templates29 {
- typedef TemplateSel<T1> Head;
- typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
-struct Templates30 {
- typedef TemplateSel<T1> Head;
- typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31>
-struct Templates31 {
- typedef TemplateSel<T1> Head;
- typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
-struct Templates32 {
- typedef TemplateSel<T1> Head;
- typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
-struct Templates33 {
- typedef TemplateSel<T1> Head;
- typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34>
-struct Templates34 {
- typedef TemplateSel<T1> Head;
- typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
-struct Templates35 {
- typedef TemplateSel<T1> Head;
- typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
-struct Templates36 {
- typedef TemplateSel<T1> Head;
- typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37>
-struct Templates37 {
- typedef TemplateSel<T1> Head;
- typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
-struct Templates38 {
- typedef TemplateSel<T1> Head;
- typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
-struct Templates39 {
- typedef TemplateSel<T1> Head;
- typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40>
-struct Templates40 {
- typedef TemplateSel<T1> Head;
- typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
-struct Templates41 {
- typedef TemplateSel<T1> Head;
- typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
-struct Templates42 {
- typedef TemplateSel<T1> Head;
- typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43>
-struct Templates43 {
- typedef TemplateSel<T1> Head;
- typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
-struct Templates44 {
- typedef TemplateSel<T1> Head;
- typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
-struct Templates45 {
- typedef TemplateSel<T1> Head;
- typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46>
-struct Templates46 {
- typedef TemplateSel<T1> Head;
- typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
-struct Templates47 {
- typedef TemplateSel<T1> Head;
- typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
-struct Templates48 {
- typedef TemplateSel<T1> Head;
- typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49>
-struct Templates49 {
- typedef TemplateSel<T1> Head;
- typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48, T49> Tail;
-};
-
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>
-struct Templates50 {
- typedef TemplateSel<T1> Head;
- typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
- T43, T44, T45, T46, T47, T48, T49, T50> Tail;
-};
-
-
-// We don't want to require the users to write TemplatesN<...> directly,
-// as that would require them to count the length. Templates<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Templates<list>
-// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Templates<T1, ..., TN>, and Google Test will translate
-// that to TemplatesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Templates template.
-template <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,
- GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,
- GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,
- GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,
- GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,
- GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,
- GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,
- GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,
- GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,
- GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,
- GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,
- GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,
- GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,
- GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,
- GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,
- GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,
- GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,
- GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,
- GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,
- GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,
- GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,
- GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,
- GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,
- GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,
- GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>
-struct Templates {
- typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
-};
-
-template <>
-struct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates0 type;
-};
-template <GTEST_TEMPLATE_ T1>
-struct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates1<T1> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
-struct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates2<T1, T2> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
-struct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates3<T1, T2, T3> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4>
-struct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates4<T1, T2, T3, T4> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
-struct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates5<T1, T2, T3, T4, T5> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
-struct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates6<T1, T2, T3, T4, T5, T6> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT> {
- typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT> {
- typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT> {
- typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT> {
- typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, NoneT, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, NoneT, NoneT, NoneT, NoneT> {
- typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, NoneT, NoneT, NoneT> {
- typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, T48, NoneT, NoneT> {
- typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48> type;
-};
-template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
- GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
- GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
- GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
- GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
- GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
- GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
- GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
- GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
- GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
- GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
- GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
- GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
- GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
- GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
- GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
- GTEST_TEMPLATE_ T49>
-struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
- T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
- T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
- T45, T46, T47, T48, T49, NoneT> {
- typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
- T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
- T42, T43, T44, T45, T46, T47, T48, T49> type;
-};
-
-// The TypeList template makes it possible to use either a single type
-// or a Types<...> list in TYPED_TEST_CASE() and
-// INSTANTIATE_TYPED_TEST_CASE_P().
-
-template <typename T>
-struct TypeList { typedef Types1<T> type; };
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14, typename T15,
- typename T16, typename T17, typename T18, typename T19, typename T20,
- typename T21, typename T22, typename T23, typename T24, typename T25,
- typename T26, typename T27, typename T28, typename T29, typename T30,
- typename T31, typename T32, typename T33, typename T34, typename T35,
- typename T36, typename T37, typename T38, typename T39, typename T40,
- typename T41, typename T42, typename T43, typename T44, typename T45,
- typename T46, typename T47, typename T48, typename T49, typename T50>
-struct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
- T44, T45, T46, T47, T48, T49, T50> > {
- typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
- T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
- T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
- T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h.pump
deleted file mode 100644
index 27f331dea..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/include/gtest/internal/gtest-type-util.h.pump
+++ /dev/null
@@ -1,296 +0,0 @@
-$$ -*- mode: c++; -*-
-$var n = 50 $$ Maximum length of type lists we want to support.
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Type utilities needed for implementing typed and type-parameterized
-// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
-//
-// Currently we support at most $n types in a list, and at most $n
-// type-parameterized tests in one type-parameterized test case.
-// Please contact googletestframework@googlegroups.com if you need
-// more.
-
-#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-#include "gtest/internal/gtest-port.h"
-#include "gtest/internal/gtest-string.h"
-
-// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
-// libstdc++ (which is where cxxabi.h comes from).
-# ifdef __GLIBCXX__
-# include <cxxabi.h>
-# elif defined(__HP_aCC)
-# include <acxx_demangle.h>
-# endif // __GLIBCXX__
-
-namespace testing {
-namespace internal {
-
-// GetTypeName<T>() returns a human-readable name of type T.
-// NB: This function is also used in Google Mock, so don't move it inside of
-// the typed-test-only section below.
-template <typename T>
-String GetTypeName() {
-# if GTEST_HAS_RTTI
-
- const char* const name = typeid(T).name();
-# if defined(__GLIBCXX__) || defined(__HP_aCC)
- int status = 0;
- // gcc's implementation of typeid(T).name() mangles the type name,
- // so we have to demangle it.
-# ifdef __GLIBCXX__
- using abi::__cxa_demangle;
-# endif // __GLIBCXX__
- char* const readable_name = __cxa_demangle(name, 0, 0, &status);
- const String name_str(status == 0 ? readable_name : name);
- free(readable_name);
- return name_str;
-# else
- return name;
-# endif // __GLIBCXX__ || __HP_aCC
-
-# else
-
- return "<type>";
-
-# endif // GTEST_HAS_RTTI
-}
-
-#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
-// type. This can be used as a compile-time assertion to ensure that
-// two types are equal.
-
-template <typename T1, typename T2>
-struct AssertTypeEq;
-
-template <typename T>
-struct AssertTypeEq<T, T> {
- typedef bool type;
-};
-
-// A unique type used as the default value for the arguments of class
-// template Types. This allows us to simulate variadic templates
-// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
-// support directly.
-struct None {};
-
-// The following family of struct and struct templates are used to
-// represent type lists. In particular, TypesN<T1, T2, ..., TN>
-// represents a type list with N types (T1, T2, ..., and TN) in it.
-// Except for Types0, every struct in the family has two member types:
-// Head for the first type in the list, and Tail for the rest of the
-// list.
-
-// The empty type list.
-struct Types0 {};
-
-// Type lists of length 1, 2, 3, and so on.
-
-template <typename T1>
-struct Types1 {
- typedef T1 Head;
- typedef Types0 Tail;
-};
-
-$range i 2..n
-
-$for i [[
-$range j 1..i
-$range k 2..i
-template <$for j, [[typename T$j]]>
-struct Types$i {
- typedef T1 Head;
- typedef Types$(i-1)<$for k, [[T$k]]> Tail;
-};
-
-
-]]
-
-} // namespace internal
-
-// We don't want to require the users to write TypesN<...> directly,
-// as that would require them to count the length. Types<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Types<int>
-// will appear as Types<int, None, None, ..., None> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Types<T1, ..., TN>, and Google Test will translate
-// that to TypesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Types template.
-
-$range i 1..n
-template <$for i, [[typename T$i = internal::None]]>
-struct Types {
- typedef internal::Types$n<$for i, [[T$i]]> type;
-};
-
-template <>
-struct Types<$for i, [[internal::None]]> {
- typedef internal::Types0 type;
-};
-
-$range i 1..n-1
-$for i [[
-$range j 1..i
-$range k i+1..n
-template <$for j, [[typename T$j]]>
-struct Types<$for j, [[T$j]]$for k[[, internal::None]]> {
- typedef internal::Types$i<$for j, [[T$j]]> type;
-};
-
-]]
-
-namespace internal {
-
-# define GTEST_TEMPLATE_ template <typename T> class
-
-// The template "selector" struct TemplateSel<Tmpl> is used to
-// represent Tmpl, which must be a class template with one type
-// parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
-// as the type Tmpl<T>. This allows us to actually instantiate the
-// template "selected" by TemplateSel<Tmpl>.
-//
-// This trick is necessary for simulating typedef for class templates,
-// which C++ doesn't support directly.
-template <GTEST_TEMPLATE_ Tmpl>
-struct TemplateSel {
- template <typename T>
- struct Bind {
- typedef Tmpl<T> type;
- };
-};
-
-# define GTEST_BIND_(TmplSel, T) \
- TmplSel::template Bind<T>::type
-
-// A unique struct template used as the default value for the
-// arguments of class template Templates. This allows us to simulate
-// variadic templates (e.g. Templates<int>, Templates<int, double>,
-// and etc), which C++ doesn't support directly.
-template <typename T>
-struct NoneT {};
-
-// The following family of struct and struct templates are used to
-// represent template lists. In particular, TemplatesN<T1, T2, ...,
-// TN> represents a list of N templates (T1, T2, ..., and TN). Except
-// for Templates0, every struct in the family has two member types:
-// Head for the selector of the first template in the list, and Tail
-// for the rest of the list.
-
-// The empty template list.
-struct Templates0 {};
-
-// Template lists of length 1, 2, 3, and so on.
-
-template <GTEST_TEMPLATE_ T1>
-struct Templates1 {
- typedef TemplateSel<T1> Head;
- typedef Templates0 Tail;
-};
-
-$range i 2..n
-
-$for i [[
-$range j 1..i
-$range k 2..i
-template <$for j, [[GTEST_TEMPLATE_ T$j]]>
-struct Templates$i {
- typedef TemplateSel<T1> Head;
- typedef Templates$(i-1)<$for k, [[T$k]]> Tail;
-};
-
-
-]]
-
-// We don't want to require the users to write TemplatesN<...> directly,
-// as that would require them to count the length. Templates<...> is much
-// easier to write, but generates horrible messages when there is a
-// compiler error, as gcc insists on printing out each template
-// argument, even if it has the default value (this means Templates<list>
-// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
-// errors).
-//
-// Our solution is to combine the best part of the two approaches: a
-// user would write Templates<T1, ..., TN>, and Google Test will translate
-// that to TemplatesN<T1, ..., TN> internally to make error messages
-// readable. The translation is done by the 'type' member of the
-// Templates template.
-
-$range i 1..n
-template <$for i, [[GTEST_TEMPLATE_ T$i = NoneT]]>
-struct Templates {
- typedef Templates$n<$for i, [[T$i]]> type;
-};
-
-template <>
-struct Templates<$for i, [[NoneT]]> {
- typedef Templates0 type;
-};
-
-$range i 1..n-1
-$for i [[
-$range j 1..i
-$range k i+1..n
-template <$for j, [[GTEST_TEMPLATE_ T$j]]>
-struct Templates<$for j, [[T$j]]$for k[[, NoneT]]> {
- typedef Templates$i<$for j, [[T$j]]> type;
-};
-
-]]
-
-// The TypeList template makes it possible to use either a single type
-// or a Types<...> list in TYPED_TEST_CASE() and
-// INSTANTIATE_TYPED_TEST_CASE_P().
-
-template <typename T>
-struct TypeList { typedef Types1<T> type; };
-
-
-$range i 1..n
-template <$for i, [[typename T$i]]>
-struct TypeList<Types<$for i, [[T$i]]> > {
- typedef typename Types<$for i, [[T$i]]>::type type;
-};
-
-#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/acx_pthread.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/acx_pthread.m4
deleted file mode 100644
index 2cf20de14..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/acx_pthread.m4
+++ /dev/null
@@ -1,363 +0,0 @@
-# This was retrieved from
-# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi
-# See also (perhaps for new versions?)
-# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi
-#
-# We've rewritten the inconsistency check code (from avahi), to work
-# more broadly. In particular, it no longer assumes ld accepts -zdefs.
-# This caused a restructing of the code, but the functionality has only
-# changed a little.
-
-dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-dnl
-dnl @summary figure out how to build C programs using POSIX threads
-dnl
-dnl This macro figures out how to build C programs using POSIX threads.
-dnl It sets the PTHREAD_LIBS output variable to the threads library and
-dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
-dnl C compiler flags that are needed. (The user can also force certain
-dnl compiler flags/libs to be tested by setting these environment
-dnl variables.)
-dnl
-dnl Also sets PTHREAD_CC to any special C compiler that is needed for
-dnl multi-threaded programs (defaults to the value of CC otherwise).
-dnl (This is necessary on AIX to use the special cc_r compiler alias.)
-dnl
-dnl NOTE: You are assumed to not only compile your program with these
-dnl flags, but also link it with them as well. e.g. you should link
-dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
-dnl $LIBS
-dnl
-dnl If you are only building threads programs, you may wish to use
-dnl these variables in your default LIBS, CFLAGS, and CC:
-dnl
-dnl LIBS="$PTHREAD_LIBS $LIBS"
-dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-dnl CC="$PTHREAD_CC"
-dnl
-dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
-dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-dnl
-dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
-dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
-dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
-dnl default action will define HAVE_PTHREAD.
-dnl
-dnl Please let the authors know if this macro fails on any platform, or
-dnl if you have any other suggestions or comments. This macro was based
-dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
-dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
-dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
-dnl We are also grateful for the helpful feedback of numerous users.
-dnl
-dnl @category InstalledPackages
-dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
-dnl @version 2006-05-29
-dnl @license GPLWithACException
-dnl
-dnl Checks for GCC shared/pthread inconsistency based on work by
-dnl Marcin Owsiany <marcin@owsiany.pl>
-
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
- AC_MSG_RESULT($acx_pthread_ok)
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- case $flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
- [acx_pthread_ok=yes])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- AC_MSG_RESULT($acx_pthread_ok)
- if test "x$acx_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
- [attr_name=$attr; break])
- done
- AC_MSG_RESULT($attr_name)
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
- AC_MSG_RESULT(${flag})
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- # More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
- AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
- else
- PTHREAD_CC=$CC
- fi
-
- # The next part tries to detect GCC inconsistency with -shared on some
- # architectures and systems. The problem is that in certain
- # configurations, when -shared is specified, GCC "forgets" to
- # internally use various flags which are still necessary.
-
- #
- # Prepare the flags
- #
- save_CFLAGS="$CFLAGS"
- save_LIBS="$LIBS"
- save_CC="$CC"
-
- # Try with the flags determined by the earlier checks.
- #
- # -Wl,-z,defs forces link-time symbol resolution, so that the
- # linking checks with -shared actually have any value
- #
- # FIXME: -fPIC is required for -shared on many architectures,
- # so we specify it here, but the right way would probably be to
- # properly detect whether it is actually required.
- CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CC="$PTHREAD_CC"
-
- # In order not to create several levels of indentation, we test
- # the value of "$done" until we find the cure or run out of ideas.
- done="no"
-
- # First, make sure the CFLAGS we added are actually accepted by our
- # compiler. If not (and OS X's ld, for instance, does not accept -z),
- # then we can't do this test.
- if test x"$done" = xno; then
- AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies])
- AC_TRY_LINK(,, , [done=yes])
-
- if test "x$done" = xyes ; then
- AC_MSG_RESULT([no])
- else
- AC_MSG_RESULT([yes])
- fi
- fi
-
- if test x"$done" = xno; then
- AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
- [done=yes])
-
- if test "x$done" = xyes; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- fi
-
- #
- # Linux gcc on some architectures such as mips/mipsel forgets
- # about -lpthread
- #
- if test x"$done" = xno; then
- AC_MSG_CHECKING([whether -lpthread fixes that])
- LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
- [done=yes])
-
- if test "x$done" = xyes; then
- AC_MSG_RESULT([yes])
- PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
- else
- AC_MSG_RESULT([no])
- fi
- fi
- #
- # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
- #
- if test x"$done" = xno; then
- AC_MSG_CHECKING([whether -lc_r fixes that])
- LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
- [done=yes])
-
- if test "x$done" = xyes; then
- AC_MSG_RESULT([yes])
- PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
- else
- AC_MSG_RESULT([no])
- fi
- fi
- if test x"$done" = xno; then
- # OK, we have run out of ideas
- AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries])
-
- # so it's not safe to assume that we may use pthreads
- acx_pthread_ok=no
- fi
-
- CFLAGS="$save_CFLAGS"
- LIBS="$save_LIBS"
- CC="$save_CC"
-else
- PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
- ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
- :
-else
- acx_pthread_ok=no
- $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/gtest.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/gtest.m4
deleted file mode 100644
index 6598ba75a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/gtest.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-dnl GTEST_LIB_CHECK([minimum version [,
-dnl action if found [,action if not found]]])
-dnl
-dnl Check for the presence of the Google Test library, optionally at a minimum
-dnl version, and indicate a viable version with the HAVE_GTEST flag. It defines
-dnl standard variables for substitution including GTEST_CPPFLAGS,
-dnl GTEST_CXXFLAGS, GTEST_LDFLAGS, and GTEST_LIBS. It also defines
-dnl GTEST_VERSION as the version of Google Test found. Finally, it provides
-dnl optional custom action slots in the event GTEST is found or not.
-AC_DEFUN([GTEST_LIB_CHECK],
-[
-dnl Provide a flag to enable or disable Google Test usage.
-AC_ARG_ENABLE([gtest],
- [AS_HELP_STRING([--enable-gtest],
- [Enable tests using the Google C++ Testing Framework.
- (Default is enabled.)])],
- [],
- [enable_gtest=])
-AC_ARG_VAR([GTEST_CONFIG],
- [The exact path of Google Test's 'gtest-config' script.])
-AC_ARG_VAR([GTEST_CPPFLAGS],
- [C-like preprocessor flags for Google Test.])
-AC_ARG_VAR([GTEST_CXXFLAGS],
- [C++ compile flags for Google Test.])
-AC_ARG_VAR([GTEST_LDFLAGS],
- [Linker path and option flags for Google Test.])
-AC_ARG_VAR([GTEST_LIBS],
- [Library linking flags for Google Test.])
-AC_ARG_VAR([GTEST_VERSION],
- [The version of Google Test available.])
-HAVE_GTEST="no"
-AS_IF([test "x${enable_gtest}" != "xno"],
- [AC_MSG_CHECKING([for 'gtest-config'])
- AS_IF([test "x${enable_gtest}" != "xyes"],
- [AS_IF([test -x "${enable_gtest}/scripts/gtest-config"],
- [GTEST_CONFIG="${enable_gtest}/scripts/gtest-config"],
- [GTEST_CONFIG="${enable_gtest}/bin/gtest-config"])
- AS_IF([test -x "${GTEST_CONFIG}"], [],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([dnl
-Unable to locate either a built or installed Google Test.
-The specific location '${enable_gtest}' was provided for a built or installed
-Google Test, but no 'gtest-config' script could be found at this location.])
- ])],
- [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])])
- AS_IF([test -x "${GTEST_CONFIG}"],
- [AC_MSG_RESULT([${GTEST_CONFIG}])
- m4_ifval([$1],
- [_gtest_min_version="--min-version=$1"
- AC_MSG_CHECKING([for Google Test at least version >= $1])],
- [_gtest_min_version="--min-version=0"
- AC_MSG_CHECKING([for Google Test])])
- AS_IF([${GTEST_CONFIG} ${_gtest_min_version}],
- [AC_MSG_RESULT([yes])
- HAVE_GTEST='yes'],
- [AC_MSG_RESULT([no])])],
- [AC_MSG_RESULT([no])])
- AS_IF([test "x${HAVE_GTEST}" = "xyes"],
- [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags`
- GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags`
- GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
- GTEST_LIBS=`${GTEST_CONFIG} --libs`
- GTEST_VERSION=`${GTEST_CONFIG} --version`
- AC_DEFINE([HAVE_GTEST],[1],[Defined when Google Test is available.])],
- [AS_IF([test "x${enable_gtest}" = "xyes"],
- [AC_MSG_ERROR([dnl
-Google Test was enabled, but no viable version could be found.])
- ])])])
-AC_SUBST([HAVE_GTEST])
-AM_CONDITIONAL([HAVE_GTEST],[test "x$HAVE_GTEST" = "xyes"])
-AS_IF([test "x$HAVE_GTEST" = "xyes"],
- [m4_ifval([$2], [$2])],
- [m4_ifval([$3], [$3])])
-])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/libtool.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/libtool.m4
deleted file mode 100644
index a3fee5360..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/libtool.m4
+++ /dev/null
@@ -1,7377 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
- lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
- ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
- lt_cl_success=:
- test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
- exec AS_MESSAGE_LOG_FD>/dev/null
- $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
- exec AS_MESSAGE_LOG_FD>>config.log
- $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_XSI_SHELLFNS
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-[$]*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
- [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[[3-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
- [shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[[3-9]]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
- [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[[4-9]]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xlc* | xlC*)
- # IBM XL 8.0 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix[[4-9]]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- linux* | k*bsd*-gnu)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(compiler_needs_object, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[[3-9]]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_sharedflag='--shared' ;;
- xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
- LDFLAGS="$save_LDFLAGS"
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
- [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
- library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
- [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- xl*)
- # IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
- [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${F77-"f77"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
- GCC=$G77
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${FC-"f95"}
- compiler=$CC
- GCC=$ac_cv_fc_compiler_gnu
-
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]+=\$[2]"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
- ;;
- esac
-])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltoptions.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltoptions.m4
deleted file mode 100644
index 34151a3ba..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltoptions.m4
+++ /dev/null
@@ -1,368 +0,0 @@
-# Helper functions for option handling. -*- Autoconf -*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it. Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
- _LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME. If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
- dnl
- dnl Simply set some default values (i.e off) if boolean options were not
- dnl specified:
- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
- ])
- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
- ])
- dnl
- dnl If no reference was made to various pairs of opposing options, then
- dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
- dnl archives by default:
- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- ])
-])# _LT_SET_OPTIONS
-
-
-## --------------------------------- ##
-## Macros to handle LT_INIT options. ##
-## --------------------------------- ##
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-## ----------------- ##
-## LTDL_INIT Options ##
-## ----------------- ##
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
- [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
- [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
- [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
- [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
- [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltsugar.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltsugar.m4
deleted file mode 100644
index 9000a057d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltsugar.m4
+++ /dev/null
@@ -1,123 +0,0 @@
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
- [$#], [2], [[$2]],
- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
- [m4_foreach([_Lt_suffix],
- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
- [lt_append([$1], [$2], [$3])$4],
- [$5])],
- [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltversion.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltversion.m4
deleted file mode 100644
index f3c530980..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/ltversion.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in.
-
-# serial 3017 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/lt~obsolete.m4 b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/lt~obsolete.m4
deleted file mode 100644
index 637bb2066..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/m4/lt~obsolete.m4
+++ /dev/null
@@ -1,92 +0,0 @@
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else. This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.sln b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.sln
deleted file mode 100644
index f7908da11..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.sln
+++ /dev/null
@@ -1,45 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-md", "gtest-md.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main-md", "gtest_main-md.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862033}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test-md", "gtest_prod_test-md.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest-md", "gtest_unittest-md.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A2}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.ActiveCfg = Debug|Win32
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.Build.0 = Debug|Win32
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.ActiveCfg = Release|Win32
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.Build.0 = Release|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.ActiveCfg = Debug|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.Build.0 = Debug|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.ActiveCfg = Release|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.Build.0 = Release|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.ActiveCfg = Debug|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.Build.0 = Debug|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.ActiveCfg = Release|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.Build.0 = Release|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.ActiveCfg = Debug|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.Build.0 = Debug|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.ActiveCfg = Release|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.vcproj
deleted file mode 100644
index 1c35c3a5e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest-md.vcproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest-md"
- ProjectGUID="{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/gtestd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="&quot;..\include&quot;;&quot;..&quot;">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/gtest.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\src\gtest-all.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.sln b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.sln
deleted file mode 100644
index ef4b057ff..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.sln
+++ /dev/null
@@ -1,45 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "gtest.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main", "gtest_main.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862032}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest", "gtest_unittest.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A1}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test", "gtest_prod_test.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.ActiveCfg = Debug|Win32
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.Build.0 = Debug|Win32
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.ActiveCfg = Release|Win32
- {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.Build.0 = Release|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.ActiveCfg = Debug|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.Build.0 = Debug|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.ActiveCfg = Release|Win32
- {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.Build.0 = Release|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.ActiveCfg = Debug|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.Build.0 = Debug|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.ActiveCfg = Release|Win32
- {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.Build.0 = Release|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.ActiveCfg = Debug|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.Build.0 = Debug|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.ActiveCfg = Release|Win32
- {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.vcproj
deleted file mode 100644
index a8373ce9a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest.vcproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest"
- ProjectGUID="{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/gtestd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="&quot;..\include&quot;;&quot;..&quot;">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="4"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/gtest.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\src\gtest-all.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main-md.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main-md.vcproj
deleted file mode 100644
index b5379fe61..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main-md.vcproj
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest_main-md"
- ProjectGUID="{3AF54C8A-10BF-4332-9147-F68ED9862033}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/$(ProjectName)d.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="&quot;..\include&quot;;&quot;..&quot;">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/$(ProjectName).lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}"
- Name="gtest-md"/>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\src\gtest_main.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main.vcproj
deleted file mode 100644
index e8b763c56..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_main.vcproj
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest_main"
- ProjectGUID="{3AF54C8A-10BF-4332-9147-F68ED9862032}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/$(ProjectName)d.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="4"
- CharacterSet="2"
- ReferencesPath="&quot;..\include&quot;;&quot;..&quot;">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="4"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/$(ProjectName).lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}"
- Name="gtest"/>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\src\gtest_main.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test-md.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test-md.vcproj
deleted file mode 100644
index 05b05d9ed..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test-md.vcproj
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest_prod_test-md"
- ProjectGUID="{24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_prod_test.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/gtest_prod_test.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_prod_test.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{3AF54C8A-10BF-4332-9147-F68ED9862033}"
- Name="gtest_main-md"/>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\test\gtest_prod_test.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\test\production.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath="..\test\production.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test.vcproj
deleted file mode 100644
index 6d7a2f021..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_prod_test.vcproj
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest_prod_test"
- ProjectGUID="{24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_prod_test.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/gtest_prod_test.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="4"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_prod_test.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{3AF54C8A-10BF-4332-9147-F68ED9862032}"
- Name="gtest_main"/>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\test\gtest_prod_test.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\test\production.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath="..\test\production.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest-md.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest-md.vcproj
deleted file mode 100644
index 38a5e5663..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest-md.vcproj
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest_unittest-md"
- ProjectGUID="{4D9FDFB5-986A-4139-823C-F4EE0ED481A2}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_unittest.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/gtest_unittest.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_unittest.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{3AF54C8A-10BF-4332-9147-F68ED9862033}"
- Name="gtest_main-md"/>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\test\gtest_unittest.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- BasicRuntimeChecks="0"
- UsePrecompiledHeader="0"
- DebugInformationFormat="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest.vcproj
deleted file mode 100644
index cb1f52b1f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/msvc/gtest_unittest.vcproj
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="gtest_unittest"
- ProjectGUID="{4D9FDFB5-986A-4139-823C-F4EE0ED481A1}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_unittest.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/gtest_unittest.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionName)/$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)/$(ProjectName)"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="4"
- UsePrecompiledHeader="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="FALSE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/gtest_unittest.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{3AF54C8A-10BF-4332-9147-F68ED9862032}"
- Name="gtest_main"/>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\test\gtest_unittest.cc">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- BasicRuntimeChecks="0"
- UsePrecompiledHeader="0"
- DebugInformationFormat="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;..&quot;;&quot;..\include&quot;"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/prime_tables.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/prime_tables.h
deleted file mode 100644
index 92ce16a01..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/prime_tables.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-// Author: vladl@google.com (Vlad Losev)
-
-// This provides interface PrimeTable that determines whether a number is a
-// prime and determines a next prime number. This interface is used
-// in Google Test samples demonstrating use of parameterized tests.
-
-#ifndef GTEST_SAMPLES_PRIME_TABLES_H_
-#define GTEST_SAMPLES_PRIME_TABLES_H_
-
-#include <algorithm>
-
-// The prime table interface.
-class PrimeTable {
- public:
- virtual ~PrimeTable() {}
-
- // Returns true iff n is a prime number.
- virtual bool IsPrime(int n) const = 0;
-
- // Returns the smallest prime number greater than p; or returns -1
- // if the next prime is beyond the capacity of the table.
- virtual int GetNextPrime(int p) const = 0;
-};
-
-// Implementation #1 calculates the primes on-the-fly.
-class OnTheFlyPrimeTable : public PrimeTable {
- public:
- virtual bool IsPrime(int n) const {
- if (n <= 1) return false;
-
- for (int i = 2; i*i <= n; i++) {
- // n is divisible by an integer other than 1 and itself.
- if ((n % i) == 0) return false;
- }
-
- return true;
- }
-
- virtual int GetNextPrime(int p) const {
- for (int n = p + 1; n > 0; n++) {
- if (IsPrime(n)) return n;
- }
-
- return -1;
- }
-};
-
-// Implementation #2 pre-calculates the primes and stores the result
-// in an array.
-class PreCalculatedPrimeTable : public PrimeTable {
- public:
- // 'max' specifies the maximum number the prime table holds.
- explicit PreCalculatedPrimeTable(int max)
- : is_prime_size_(max + 1), is_prime_(new bool[max + 1]) {
- CalculatePrimesUpTo(max);
- }
- virtual ~PreCalculatedPrimeTable() { delete[] is_prime_; }
-
- virtual bool IsPrime(int n) const {
- return 0 <= n && n < is_prime_size_ && is_prime_[n];
- }
-
- virtual int GetNextPrime(int p) const {
- for (int n = p + 1; n < is_prime_size_; n++) {
- if (is_prime_[n]) return n;
- }
-
- return -1;
- }
-
- private:
- void CalculatePrimesUpTo(int max) {
- ::std::fill(is_prime_, is_prime_ + is_prime_size_, true);
- is_prime_[0] = is_prime_[1] = false;
-
- for (int i = 2; i <= max; i++) {
- if (!is_prime_[i]) continue;
-
- // Marks all multiples of i (except i itself) as non-prime.
- for (int j = 2*i; j <= max; j += i) {
- is_prime_[j] = false;
- }
- }
- }
-
- const int is_prime_size_;
- bool* const is_prime_;
-
- // Disables compiler warning "assignment operator could not be generated."
- void operator=(const PreCalculatedPrimeTable& rhs);
-};
-
-#endif // GTEST_SAMPLES_PRIME_TABLES_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.cc
deleted file mode 100644
index f171e2609..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "sample1.h"
-
-// Returns n! (the factorial of n). For negative n, n! is defined to be 1.
-int Factorial(int n) {
- int result = 1;
- for (int i = 1; i <= n; i++) {
- result *= i;
- }
-
- return result;
-}
-
-// Returns true iff n is a prime number.
-bool IsPrime(int n) {
- // Trivial case 1: small numbers
- if (n <= 1) return false;
-
- // Trivial case 2: even numbers
- if (n % 2 == 0) return n == 2;
-
- // Now, we have that n is odd and n >= 3.
-
- // Try to divide n by every odd number i, starting from 3
- for (int i = 3; ; i += 2) {
- // We only have to try i up to the squre root of n
- if (i > n/i) break;
-
- // Now, we have i <= n/i < n.
- // If n is divisible by i, n is not prime.
- if (n % i == 0) return false;
- }
-
- // n has no integer factor in the range (1, n), and thus is prime.
- return true;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.h
deleted file mode 100644
index 3dfeb98c4..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_SAMPLES_SAMPLE1_H_
-#define GTEST_SAMPLES_SAMPLE1_H_
-
-// Returns n! (the factorial of n). For negative n, n! is defined to be 1.
-int Factorial(int n);
-
-// Returns true iff n is a prime number.
-bool IsPrime(int n);
-
-#endif // GTEST_SAMPLES_SAMPLE1_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample10_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample10_unittest.cc
deleted file mode 100644
index 2813d0402..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample10_unittest.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2009 Google Inc. All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// This sample shows how to use Google Test listener API to implement
-// a primitive leak checker.
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "gtest/gtest.h"
-
-using ::testing::EmptyTestEventListener;
-using ::testing::InitGoogleTest;
-using ::testing::Test;
-using ::testing::TestCase;
-using ::testing::TestEventListeners;
-using ::testing::TestInfo;
-using ::testing::TestPartResult;
-using ::testing::UnitTest;
-
-namespace {
-
-// We will track memory used by this class.
-class Water {
- public:
- // Normal Water declarations go here.
-
- // operator new and operator delete help us control water allocation.
- void* operator new(size_t allocation_size) {
- allocated_++;
- return malloc(allocation_size);
- }
-
- void operator delete(void* block, size_t /* allocation_size */) {
- allocated_--;
- free(block);
- }
-
- static int allocated() { return allocated_; }
-
- private:
- static int allocated_;
-};
-
-int Water::allocated_ = 0;
-
-// This event listener monitors how many Water objects are created and
-// destroyed by each test, and reports a failure if a test leaks some Water
-// objects. It does this by comparing the number of live Water objects at
-// the beginning of a test and at the end of a test.
-class LeakChecker : public EmptyTestEventListener {
- private:
- // Called before a test starts.
- virtual void OnTestStart(const TestInfo& /* test_info */) {
- initially_allocated_ = Water::allocated();
- }
-
- // Called after a test ends.
- virtual void OnTestEnd(const TestInfo& /* test_info */) {
- int difference = Water::allocated() - initially_allocated_;
-
- // You can generate a failure in any event handler except
- // OnTestPartResult. Just use an appropriate Google Test assertion to do
- // it.
- EXPECT_TRUE(difference <= 0)
- << "Leaked " << difference << " unit(s) of Water!";
- }
-
- int initially_allocated_;
-};
-
-TEST(ListenersTest, DoesNotLeak) {
- Water* water = new Water;
- delete water;
-}
-
-// This should fail when the --check_for_leaks command line flag is
-// specified.
-TEST(ListenersTest, LeaksWater) {
- Water* water = new Water;
- EXPECT_TRUE(water != NULL);
-}
-
-} // namespace
-
-int main(int argc, char **argv) {
- InitGoogleTest(&argc, argv);
-
- bool check_for_leaks = false;
- if (argc > 1 && strcmp(argv[1], "--check_for_leaks") == 0 )
- check_for_leaks = true;
- else
- printf("%s\n", "Run this program with --check_for_leaks to enable "
- "custom leak checking in the tests.");
-
- // If we are given the --check_for_leaks command line flag, installs the
- // leak checker.
- if (check_for_leaks) {
- TestEventListeners& listeners = UnitTest::GetInstance()->listeners();
-
- // Adds the leak checker to the end of the test event listener list,
- // after the default text output printer and the default XML report
- // generator.
- //
- // The order is important - it ensures that failures generated in the
- // leak checker's OnTestEnd() method are processed by the text and XML
- // printers *before* their OnTestEnd() methods are called, such that
- // they are attributed to the right test. Remember that a listener
- // receives an OnXyzStart event *after* listeners preceding it in the
- // list received that event, and receives an OnXyzEnd event *before*
- // listeners preceding it.
- //
- // We don't need to worry about deleting the new listener later, as
- // Google Test will do it.
- listeners.Append(new LeakChecker);
- }
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1_unittest.cc
deleted file mode 100644
index a8a7c793a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample1_unittest.cc
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-// This sample shows how to write a simple unit test for a function,
-// using Google C++ testing framework.
-//
-// Writing a unit test using Google C++ testing framework is easy as 1-2-3:
-
-
-// Step 1. Include necessary header files such that the stuff your
-// test logic needs is declared.
-//
-// Don't forget gtest.h, which declares the testing framework.
-
-#include <limits.h>
-#include "sample1.h"
-#include "gtest/gtest.h"
-
-
-// Step 2. Use the TEST macro to define your tests.
-//
-// TEST has two parameters: the test case name and the test name.
-// After using the macro, you should define your test logic between a
-// pair of braces. You can use a bunch of macros to indicate the
-// success or failure of a test. EXPECT_TRUE and EXPECT_EQ are
-// examples of such macros. For a complete list, see gtest.h.
-//
-// <TechnicalDetails>
-//
-// In Google Test, tests are grouped into test cases. This is how we
-// keep test code organized. You should put logically related tests
-// into the same test case.
-//
-// The test case name and the test name should both be valid C++
-// identifiers. And you should not use underscore (_) in the names.
-//
-// Google Test guarantees that each test you define is run exactly
-// once, but it makes no guarantee on the order the tests are
-// executed. Therefore, you should write your tests in such a way
-// that their results don't depend on their order.
-//
-// </TechnicalDetails>
-
-
-// Tests Factorial().
-
-// Tests factorial of negative numbers.
-TEST(FactorialTest, Negative) {
- // This test is named "Negative", and belongs to the "FactorialTest"
- // test case.
- EXPECT_EQ(1, Factorial(-5));
- EXPECT_EQ(1, Factorial(-1));
- EXPECT_TRUE(Factorial(-10) > 0);
-
- // <TechnicalDetails>
- //
- // EXPECT_EQ(expected, actual) is the same as
- //
- // EXPECT_TRUE((expected) == (actual))
- //
- // except that it will print both the expected value and the actual
- // value when the assertion fails. This is very helpful for
- // debugging. Therefore in this case EXPECT_EQ is preferred.
- //
- // On the other hand, EXPECT_TRUE accepts any Boolean expression,
- // and is thus more general.
- //
- // </TechnicalDetails>
-}
-
-// Tests factorial of 0.
-TEST(FactorialTest, Zero) {
- EXPECT_EQ(1, Factorial(0));
-}
-
-// Tests factorial of positive numbers.
-TEST(FactorialTest, Positive) {
- EXPECT_EQ(1, Factorial(1));
- EXPECT_EQ(2, Factorial(2));
- EXPECT_EQ(6, Factorial(3));
- EXPECT_EQ(40320, Factorial(8));
-}
-
-
-// Tests IsPrime()
-
-// Tests negative input.
-TEST(IsPrimeTest, Negative) {
- // This test belongs to the IsPrimeTest test case.
-
- EXPECT_FALSE(IsPrime(-1));
- EXPECT_FALSE(IsPrime(-2));
- EXPECT_FALSE(IsPrime(INT_MIN));
-}
-
-// Tests some trivial cases.
-TEST(IsPrimeTest, Trivial) {
- EXPECT_FALSE(IsPrime(0));
- EXPECT_FALSE(IsPrime(1));
- EXPECT_TRUE(IsPrime(2));
- EXPECT_TRUE(IsPrime(3));
-}
-
-// Tests positive input.
-TEST(IsPrimeTest, Positive) {
- EXPECT_FALSE(IsPrime(4));
- EXPECT_TRUE(IsPrime(5));
- EXPECT_FALSE(IsPrime(6));
- EXPECT_TRUE(IsPrime(23));
-}
-
-// Step 3. Call RUN_ALL_TESTS() in main().
-//
-// We do this by linking in src/gtest_main.cc file, which consists of
-// a main() function which calls RUN_ALL_TESTS() for us.
-//
-// This runs all the tests you've defined, prints the result, and
-// returns 0 if successful, or 1 otherwise.
-//
-// Did you notice that we didn't register the tests? The
-// RUN_ALL_TESTS() macro magically knows about all the tests we
-// defined. Isn't this convenient?
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.cc
deleted file mode 100644
index 5f763b9bd..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "sample2.h"
-
-#include <string.h>
-
-// Clones a 0-terminated C string, allocating memory using new.
-const char* MyString::CloneCString(const char* a_c_string) {
- if (a_c_string == NULL) return NULL;
-
- const size_t len = strlen(a_c_string);
- char* const clone = new char[ len + 1 ];
- memcpy(clone, a_c_string, len + 1);
-
- return clone;
-}
-
-// Sets the 0-terminated C string this MyString object
-// represents.
-void MyString::Set(const char* a_c_string) {
- // Makes sure this works when c_string == c_string_
- const char* const temp = MyString::CloneCString(a_c_string);
- delete[] c_string_;
- c_string_ = temp;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.h
deleted file mode 100644
index 5b57e6082..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_SAMPLES_SAMPLE2_H_
-#define GTEST_SAMPLES_SAMPLE2_H_
-
-#include <string.h>
-
-
-// A simple string class.
-class MyString {
- private:
- const char* c_string_;
- const MyString& operator=(const MyString& rhs);
-
- public:
-
- // Clones a 0-terminated C string, allocating memory using new.
- static const char* CloneCString(const char* a_c_string);
-
- ////////////////////////////////////////////////////////////
- //
- // C'tors
-
- // The default c'tor constructs a NULL string.
- MyString() : c_string_(NULL) {}
-
- // Constructs a MyString by cloning a 0-terminated C string.
- explicit MyString(const char* a_c_string) : c_string_(NULL) {
- Set(a_c_string);
- }
-
- // Copy c'tor
- MyString(const MyString& string) : c_string_(NULL) {
- Set(string.c_string_);
- }
-
- ////////////////////////////////////////////////////////////
- //
- // D'tor. MyString is intended to be a final class, so the d'tor
- // doesn't need to be virtual.
- ~MyString() { delete[] c_string_; }
-
- // Gets the 0-terminated C string this MyString object represents.
- const char* c_string() const { return c_string_; }
-
- size_t Length() const {
- return c_string_ == NULL ? 0 : strlen(c_string_);
- }
-
- // Sets the 0-terminated C string this MyString object represents.
- void Set(const char* c_string);
-};
-
-
-#endif // GTEST_SAMPLES_SAMPLE2_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2_unittest.cc
deleted file mode 100644
index 3792fa509..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample2_unittest.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-// This sample shows how to write a more complex unit test for a class
-// that has multiple member functions.
-//
-// Usually, it's a good idea to have one test for each method in your
-// class. You don't have to do that exactly, but it helps to keep
-// your tests organized. You may also throw in additional tests as
-// needed.
-
-#include "sample2.h"
-#include "gtest/gtest.h"
-
-// In this example, we test the MyString class (a simple string).
-
-// Tests the default c'tor.
-TEST(MyString, DefaultConstructor) {
- const MyString s;
-
- // Asserts that s.c_string() returns NULL.
- //
- // <TechnicalDetails>
- //
- // If we write NULL instead of
- //
- // static_cast<const char *>(NULL)
- //
- // in this assertion, it will generate a warning on gcc 3.4. The
- // reason is that EXPECT_EQ needs to know the types of its
- // arguments in order to print them when it fails. Since NULL is
- // #defined as 0, the compiler will use the formatter function for
- // int to print it. However, gcc thinks that NULL should be used as
- // a pointer, not an int, and therefore complains.
- //
- // The root of the problem is C++'s lack of distinction between the
- // integer number 0 and the null pointer constant. Unfortunately,
- // we have to live with this fact.
- //
- // </TechnicalDetails>
- EXPECT_STREQ(NULL, s.c_string());
-
- EXPECT_EQ(0u, s.Length());
-}
-
-const char kHelloString[] = "Hello, world!";
-
-// Tests the c'tor that accepts a C string.
-TEST(MyString, ConstructorFromCString) {
- const MyString s(kHelloString);
- EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0);
- EXPECT_EQ(sizeof(kHelloString)/sizeof(kHelloString[0]) - 1,
- s.Length());
-}
-
-// Tests the copy c'tor.
-TEST(MyString, CopyConstructor) {
- const MyString s1(kHelloString);
- const MyString s2 = s1;
- EXPECT_TRUE(strcmp(s2.c_string(), kHelloString) == 0);
-}
-
-// Tests the Set method.
-TEST(MyString, Set) {
- MyString s;
-
- s.Set(kHelloString);
- EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0);
-
- // Set should work when the input pointer is the same as the one
- // already in the MyString object.
- s.Set(s.c_string());
- EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0);
-
- // Can we set the MyString to NULL?
- s.Set(NULL);
- EXPECT_STREQ(NULL, s.c_string());
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3-inl.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3-inl.h
deleted file mode 100644
index 46369a076..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3-inl.h
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_SAMPLES_SAMPLE3_INL_H_
-#define GTEST_SAMPLES_SAMPLE3_INL_H_
-
-#include <stddef.h>
-
-
-// Queue is a simple queue implemented as a singled-linked list.
-//
-// The element type must support copy constructor.
-template <typename E> // E is the element type
-class Queue;
-
-// QueueNode is a node in a Queue, which consists of an element of
-// type E and a pointer to the next node.
-template <typename E> // E is the element type
-class QueueNode {
- friend class Queue<E>;
-
- public:
- // Gets the element in this node.
- const E& element() const { return element_; }
-
- // Gets the next node in the queue.
- QueueNode* next() { return next_; }
- const QueueNode* next() const { return next_; }
-
- private:
- // Creates a node with a given element value. The next pointer is
- // set to NULL.
- QueueNode(const E& an_element) : element_(an_element), next_(NULL) {}
-
- // We disable the default assignment operator and copy c'tor.
- const QueueNode& operator = (const QueueNode&);
- QueueNode(const QueueNode&);
-
- E element_;
- QueueNode* next_;
-};
-
-template <typename E> // E is the element type.
-class Queue {
-public:
-
- // Creates an empty queue.
- Queue() : head_(NULL), last_(NULL), size_(0) {}
-
- // D'tor. Clears the queue.
- ~Queue() { Clear(); }
-
- // Clears the queue.
- void Clear() {
- if (size_ > 0) {
- // 1. Deletes every node.
- QueueNode<E>* node = head_;
- QueueNode<E>* next = node->next();
- for (; ;) {
- delete node;
- node = next;
- if (node == NULL) break;
- next = node->next();
- }
-
- // 2. Resets the member variables.
- head_ = last_ = NULL;
- size_ = 0;
- }
- }
-
- // Gets the number of elements.
- size_t Size() const { return size_; }
-
- // Gets the first element of the queue, or NULL if the queue is empty.
- QueueNode<E>* Head() { return head_; }
- const QueueNode<E>* Head() const { return head_; }
-
- // Gets the last element of the queue, or NULL if the queue is empty.
- QueueNode<E>* Last() { return last_; }
- const QueueNode<E>* Last() const { return last_; }
-
- // Adds an element to the end of the queue. A copy of the element is
- // created using the copy constructor, and then stored in the queue.
- // Changes made to the element in the queue doesn't affect the source
- // object, and vice versa.
- void Enqueue(const E& element) {
- QueueNode<E>* new_node = new QueueNode<E>(element);
-
- if (size_ == 0) {
- head_ = last_ = new_node;
- size_ = 1;
- } else {
- last_->next_ = new_node;
- last_ = new_node;
- size_++;
- }
- }
-
- // Removes the head of the queue and returns it. Returns NULL if
- // the queue is empty.
- E* Dequeue() {
- if (size_ == 0) {
- return NULL;
- }
-
- const QueueNode<E>* const old_head = head_;
- head_ = head_->next_;
- size_--;
- if (size_ == 0) {
- last_ = NULL;
- }
-
- E* element = new E(old_head->element());
- delete old_head;
-
- return element;
- }
-
- // Applies a function/functor on each element of the queue, and
- // returns the result in a new queue. The original queue is not
- // affected.
- template <typename F>
- Queue* Map(F function) const {
- Queue* new_queue = new Queue();
- for (const QueueNode<E>* node = head_; node != NULL; node = node->next_) {
- new_queue->Enqueue(function(node->element()));
- }
-
- return new_queue;
- }
-
- private:
- QueueNode<E>* head_; // The first node of the queue.
- QueueNode<E>* last_; // The last node of the queue.
- size_t size_; // The number of elements in the queue.
-
- // We disallow copying a queue.
- Queue(const Queue&);
- const Queue& operator = (const Queue&);
- };
-
-#endif // GTEST_SAMPLES_SAMPLE3_INL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3_unittest.cc
deleted file mode 100644
index bf3877d01..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample3_unittest.cc
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-
-// In this example, we use a more advanced feature of Google Test called
-// test fixture.
-//
-// A test fixture is a place to hold objects and functions shared by
-// all tests in a test case. Using a test fixture avoids duplicating
-// the test code necessary to initialize and cleanup those common
-// objects for each test. It is also useful for defining sub-routines
-// that your tests need to invoke a lot.
-//
-// <TechnicalDetails>
-//
-// The tests share the test fixture in the sense of code sharing, not
-// data sharing. Each test is given its own fresh copy of the
-// fixture. You cannot expect the data modified by one test to be
-// passed on to another test, which is a bad idea.
-//
-// The reason for this design is that tests should be independent and
-// repeatable. In particular, a test should not fail as the result of
-// another test's failure. If one test depends on info produced by
-// another test, then the two tests should really be one big test.
-//
-// The macros for indicating the success/failure of a test
-// (EXPECT_TRUE, FAIL, etc) need to know what the current test is
-// (when Google Test prints the test result, it tells you which test
-// each failure belongs to). Technically, these macros invoke a
-// member function of the Test class. Therefore, you cannot use them
-// in a global function. That's why you should put test sub-routines
-// in a test fixture.
-//
-// </TechnicalDetails>
-
-#include "sample3-inl.h"
-#include "gtest/gtest.h"
-
-// To use a test fixture, derive a class from testing::Test.
-class QueueTest : public testing::Test {
- protected: // You should make the members protected s.t. they can be
- // accessed from sub-classes.
-
- // virtual void SetUp() will be called before each test is run. You
- // should define it if you need to initialize the varaibles.
- // Otherwise, this can be skipped.
- virtual void SetUp() {
- q1_.Enqueue(1);
- q2_.Enqueue(2);
- q2_.Enqueue(3);
- }
-
- // virtual void TearDown() will be called after each test is run.
- // You should define it if there is cleanup work to do. Otherwise,
- // you don't have to provide it.
- //
- // virtual void TearDown() {
- // }
-
- // A helper function that some test uses.
- static int Double(int n) {
- return 2*n;
- }
-
- // A helper function for testing Queue::Map().
- void MapTester(const Queue<int> * q) {
- // Creates a new queue, where each element is twice as big as the
- // corresponding one in q.
- const Queue<int> * const new_q = q->Map(Double);
-
- // Verifies that the new queue has the same size as q.
- ASSERT_EQ(q->Size(), new_q->Size());
-
- // Verifies the relationship between the elements of the two queues.
- for ( const QueueNode<int> * n1 = q->Head(), * n2 = new_q->Head();
- n1 != NULL; n1 = n1->next(), n2 = n2->next() ) {
- EXPECT_EQ(2 * n1->element(), n2->element());
- }
-
- delete new_q;
- }
-
- // Declares the variables your tests want to use.
- Queue<int> q0_;
- Queue<int> q1_;
- Queue<int> q2_;
-};
-
-// When you have a test fixture, you define a test using TEST_F
-// instead of TEST.
-
-// Tests the default c'tor.
-TEST_F(QueueTest, DefaultConstructor) {
- // You can access data in the test fixture here.
- EXPECT_EQ(0u, q0_.Size());
-}
-
-// Tests Dequeue().
-TEST_F(QueueTest, Dequeue) {
- int * n = q0_.Dequeue();
- EXPECT_TRUE(n == NULL);
-
- n = q1_.Dequeue();
- ASSERT_TRUE(n != NULL);
- EXPECT_EQ(1, *n);
- EXPECT_EQ(0u, q1_.Size());
- delete n;
-
- n = q2_.Dequeue();
- ASSERT_TRUE(n != NULL);
- EXPECT_EQ(2, *n);
- EXPECT_EQ(1u, q2_.Size());
- delete n;
-}
-
-// Tests the Queue::Map() function.
-TEST_F(QueueTest, Map) {
- MapTester(&q0_);
- MapTester(&q1_);
- MapTester(&q2_);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.cc
deleted file mode 100644
index ae44bda6f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include <stdio.h>
-
-#include "sample4.h"
-
-// Returns the current counter value, and increments it.
-int Counter::Increment() {
- return counter_++;
-}
-
-// Prints the current counter value to STDOUT.
-void Counter::Print() const {
- printf("%d", counter_);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.h
deleted file mode 100644
index cd60f0dd2..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_SAMPLES_SAMPLE4_H_
-#define GTEST_SAMPLES_SAMPLE4_H_
-
-// A simple monotonic counter.
-class Counter {
- private:
- int counter_;
-
- public:
- // Creates a counter that starts at 0.
- Counter() : counter_(0) {}
-
- // Returns the current counter value, and increments it.
- int Increment();
-
- // Prints the current counter value to STDOUT.
- void Print() const;
-};
-
-#endif // GTEST_SAMPLES_SAMPLE4_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4_unittest.cc
deleted file mode 100644
index fa5afc7d5..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample4_unittest.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/gtest.h"
-#include "sample4.h"
-
-// Tests the Increment() method.
-TEST(Counter, Increment) {
- Counter c;
-
- // EXPECT_EQ() evaluates its arguments exactly once, so they
- // can have side effects.
-
- EXPECT_EQ(0, c.Increment());
- EXPECT_EQ(1, c.Increment());
- EXPECT_EQ(2, c.Increment());
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample5_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample5_unittest.cc
deleted file mode 100644
index e7cab014c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample5_unittest.cc
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// This sample teaches how to reuse a test fixture in multiple test
-// cases by deriving sub-fixtures from it.
-//
-// When you define a test fixture, you specify the name of the test
-// case that will use this fixture. Therefore, a test fixture can
-// be used by only one test case.
-//
-// Sometimes, more than one test cases may want to use the same or
-// slightly different test fixtures. For example, you may want to
-// make sure that all tests for a GUI library don't leak important
-// system resources like fonts and brushes. In Google Test, you do
-// this by putting the shared logic in a super (as in "super class")
-// test fixture, and then have each test case use a fixture derived
-// from this super fixture.
-
-#include <limits.h>
-#include <time.h>
-#include "sample3-inl.h"
-#include "gtest/gtest.h"
-#include "sample1.h"
-
-// In this sample, we want to ensure that every test finishes within
-// ~5 seconds. If a test takes longer to run, we consider it a
-// failure.
-//
-// We put the code for timing a test in a test fixture called
-// "QuickTest". QuickTest is intended to be the super fixture that
-// other fixtures derive from, therefore there is no test case with
-// the name "QuickTest". This is OK.
-//
-// Later, we will derive multiple test fixtures from QuickTest.
-class QuickTest : public testing::Test {
- protected:
- // Remember that SetUp() is run immediately before a test starts.
- // This is a good place to record the start time.
- virtual void SetUp() {
- start_time_ = time(NULL);
- }
-
- // TearDown() is invoked immediately after a test finishes. Here we
- // check if the test was too slow.
- virtual void TearDown() {
- // Gets the time when the test finishes
- const time_t end_time = time(NULL);
-
- // Asserts that the test took no more than ~5 seconds. Did you
- // know that you can use assertions in SetUp() and TearDown() as
- // well?
- EXPECT_TRUE(end_time - start_time_ <= 5) << "The test took too long.";
- }
-
- // The UTC time (in seconds) when the test starts
- time_t start_time_;
-};
-
-
-// We derive a fixture named IntegerFunctionTest from the QuickTest
-// fixture. All tests using this fixture will be automatically
-// required to be quick.
-class IntegerFunctionTest : public QuickTest {
- // We don't need any more logic than already in the QuickTest fixture.
- // Therefore the body is empty.
-};
-
-
-// Now we can write tests in the IntegerFunctionTest test case.
-
-// Tests Factorial()
-TEST_F(IntegerFunctionTest, Factorial) {
- // Tests factorial of negative numbers.
- EXPECT_EQ(1, Factorial(-5));
- EXPECT_EQ(1, Factorial(-1));
- EXPECT_TRUE(Factorial(-10) > 0);
-
- // Tests factorial of 0.
- EXPECT_EQ(1, Factorial(0));
-
- // Tests factorial of positive numbers.
- EXPECT_EQ(1, Factorial(1));
- EXPECT_EQ(2, Factorial(2));
- EXPECT_EQ(6, Factorial(3));
- EXPECT_EQ(40320, Factorial(8));
-}
-
-
-// Tests IsPrime()
-TEST_F(IntegerFunctionTest, IsPrime) {
- // Tests negative input.
- EXPECT_TRUE(!IsPrime(-1));
- EXPECT_TRUE(!IsPrime(-2));
- EXPECT_TRUE(!IsPrime(INT_MIN));
-
- // Tests some trivial cases.
- EXPECT_TRUE(!IsPrime(0));
- EXPECT_TRUE(!IsPrime(1));
- EXPECT_TRUE(IsPrime(2));
- EXPECT_TRUE(IsPrime(3));
-
- // Tests positive input.
- EXPECT_TRUE(!IsPrime(4));
- EXPECT_TRUE(IsPrime(5));
- EXPECT_TRUE(!IsPrime(6));
- EXPECT_TRUE(IsPrime(23));
-}
-
-
-// The next test case (named "QueueTest") also needs to be quick, so
-// we derive another fixture from QuickTest.
-//
-// The QueueTest test fixture has some logic and shared objects in
-// addition to what's in QuickTest already. We define the additional
-// stuff inside the body of the test fixture, as usual.
-class QueueTest : public QuickTest {
- protected:
- virtual void SetUp() {
- // First, we need to set up the super fixture (QuickTest).
- QuickTest::SetUp();
-
- // Second, some additional setup for this fixture.
- q1_.Enqueue(1);
- q2_.Enqueue(2);
- q2_.Enqueue(3);
- }
-
- // By default, TearDown() inherits the behavior of
- // QuickTest::TearDown(). As we have no additional cleaning work
- // for QueueTest, we omit it here.
- //
- // virtual void TearDown() {
- // QuickTest::TearDown();
- // }
-
- Queue<int> q0_;
- Queue<int> q1_;
- Queue<int> q2_;
-};
-
-
-// Now, let's write tests using the QueueTest fixture.
-
-// Tests the default constructor.
-TEST_F(QueueTest, DefaultConstructor) {
- EXPECT_EQ(0u, q0_.Size());
-}
-
-// Tests Dequeue().
-TEST_F(QueueTest, Dequeue) {
- int* n = q0_.Dequeue();
- EXPECT_TRUE(n == NULL);
-
- n = q1_.Dequeue();
- EXPECT_TRUE(n != NULL);
- EXPECT_EQ(1, *n);
- EXPECT_EQ(0u, q1_.Size());
- delete n;
-
- n = q2_.Dequeue();
- EXPECT_TRUE(n != NULL);
- EXPECT_EQ(2, *n);
- EXPECT_EQ(1u, q2_.Size());
- delete n;
-}
-
-// If necessary, you can derive further test fixtures from a derived
-// fixture itself. For example, you can derive another fixture from
-// QueueTest. Google Test imposes no limit on how deep the hierarchy
-// can be. In practice, however, you probably don't want it to be too
-// deep as to be confusing.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample6_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample6_unittest.cc
deleted file mode 100644
index 8f2036a51..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample6_unittest.cc
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// This sample shows how to test common properties of multiple
-// implementations of the same interface (aka interface tests).
-
-// The interface and its implementations are in this header.
-#include "prime_tables.h"
-
-#include "gtest/gtest.h"
-
-// First, we define some factory functions for creating instances of
-// the implementations. You may be able to skip this step if all your
-// implementations can be constructed the same way.
-
-template <class T>
-PrimeTable* CreatePrimeTable();
-
-template <>
-PrimeTable* CreatePrimeTable<OnTheFlyPrimeTable>() {
- return new OnTheFlyPrimeTable;
-}
-
-template <>
-PrimeTable* CreatePrimeTable<PreCalculatedPrimeTable>() {
- return new PreCalculatedPrimeTable(10000);
-}
-
-// Then we define a test fixture class template.
-template <class T>
-class PrimeTableTest : public testing::Test {
- protected:
- // The ctor calls the factory function to create a prime table
- // implemented by T.
- PrimeTableTest() : table_(CreatePrimeTable<T>()) {}
-
- virtual ~PrimeTableTest() { delete table_; }
-
- // Note that we test an implementation via the base interface
- // instead of the actual implementation class. This is important
- // for keeping the tests close to the real world scenario, where the
- // implementation is invoked via the base interface. It avoids
- // got-yas where the implementation class has a method that shadows
- // a method with the same name (but slightly different argument
- // types) in the base interface, for example.
- PrimeTable* const table_;
-};
-
-#if GTEST_HAS_TYPED_TEST
-
-using testing::Types;
-
-// Google Test offers two ways for reusing tests for different types.
-// The first is called "typed tests". You should use it if you
-// already know *all* the types you are gonna exercise when you write
-// the tests.
-
-// To write a typed test case, first use
-//
-// TYPED_TEST_CASE(TestCaseName, TypeList);
-//
-// to declare it and specify the type parameters. As with TEST_F,
-// TestCaseName must match the test fixture name.
-
-// The list of types we want to test.
-typedef Types<OnTheFlyPrimeTable, PreCalculatedPrimeTable> Implementations;
-
-TYPED_TEST_CASE(PrimeTableTest, Implementations);
-
-// Then use TYPED_TEST(TestCaseName, TestName) to define a typed test,
-// similar to TEST_F.
-TYPED_TEST(PrimeTableTest, ReturnsFalseForNonPrimes) {
- // Inside the test body, you can refer to the type parameter by
- // TypeParam, and refer to the fixture class by TestFixture. We
- // don't need them in this example.
-
- // Since we are in the template world, C++ requires explicitly
- // writing 'this->' when referring to members of the fixture class.
- // This is something you have to learn to live with.
- EXPECT_FALSE(this->table_->IsPrime(-5));
- EXPECT_FALSE(this->table_->IsPrime(0));
- EXPECT_FALSE(this->table_->IsPrime(1));
- EXPECT_FALSE(this->table_->IsPrime(4));
- EXPECT_FALSE(this->table_->IsPrime(6));
- EXPECT_FALSE(this->table_->IsPrime(100));
-}
-
-TYPED_TEST(PrimeTableTest, ReturnsTrueForPrimes) {
- EXPECT_TRUE(this->table_->IsPrime(2));
- EXPECT_TRUE(this->table_->IsPrime(3));
- EXPECT_TRUE(this->table_->IsPrime(5));
- EXPECT_TRUE(this->table_->IsPrime(7));
- EXPECT_TRUE(this->table_->IsPrime(11));
- EXPECT_TRUE(this->table_->IsPrime(131));
-}
-
-TYPED_TEST(PrimeTableTest, CanGetNextPrime) {
- EXPECT_EQ(2, this->table_->GetNextPrime(0));
- EXPECT_EQ(3, this->table_->GetNextPrime(2));
- EXPECT_EQ(5, this->table_->GetNextPrime(3));
- EXPECT_EQ(7, this->table_->GetNextPrime(5));
- EXPECT_EQ(11, this->table_->GetNextPrime(7));
- EXPECT_EQ(131, this->table_->GetNextPrime(128));
-}
-
-// That's it! Google Test will repeat each TYPED_TEST for each type
-// in the type list specified in TYPED_TEST_CASE. Sit back and be
-// happy that you don't have to define them multiple times.
-
-#endif // GTEST_HAS_TYPED_TEST
-
-#if GTEST_HAS_TYPED_TEST_P
-
-using testing::Types;
-
-// Sometimes, however, you don't yet know all the types that you want
-// to test when you write the tests. For example, if you are the
-// author of an interface and expect other people to implement it, you
-// might want to write a set of tests to make sure each implementation
-// conforms to some basic requirements, but you don't know what
-// implementations will be written in the future.
-//
-// How can you write the tests without committing to the type
-// parameters? That's what "type-parameterized tests" can do for you.
-// It is a bit more involved than typed tests, but in return you get a
-// test pattern that can be reused in many contexts, which is a big
-// win. Here's how you do it:
-
-// First, define a test fixture class template. Here we just reuse
-// the PrimeTableTest fixture defined earlier:
-
-template <class T>
-class PrimeTableTest2 : public PrimeTableTest<T> {
-};
-
-// Then, declare the test case. The argument is the name of the test
-// fixture, and also the name of the test case (as usual). The _P
-// suffix is for "parameterized" or "pattern".
-TYPED_TEST_CASE_P(PrimeTableTest2);
-
-// Next, use TYPED_TEST_P(TestCaseName, TestName) to define a test,
-// similar to what you do with TEST_F.
-TYPED_TEST_P(PrimeTableTest2, ReturnsFalseForNonPrimes) {
- EXPECT_FALSE(this->table_->IsPrime(-5));
- EXPECT_FALSE(this->table_->IsPrime(0));
- EXPECT_FALSE(this->table_->IsPrime(1));
- EXPECT_FALSE(this->table_->IsPrime(4));
- EXPECT_FALSE(this->table_->IsPrime(6));
- EXPECT_FALSE(this->table_->IsPrime(100));
-}
-
-TYPED_TEST_P(PrimeTableTest2, ReturnsTrueForPrimes) {
- EXPECT_TRUE(this->table_->IsPrime(2));
- EXPECT_TRUE(this->table_->IsPrime(3));
- EXPECT_TRUE(this->table_->IsPrime(5));
- EXPECT_TRUE(this->table_->IsPrime(7));
- EXPECT_TRUE(this->table_->IsPrime(11));
- EXPECT_TRUE(this->table_->IsPrime(131));
-}
-
-TYPED_TEST_P(PrimeTableTest2, CanGetNextPrime) {
- EXPECT_EQ(2, this->table_->GetNextPrime(0));
- EXPECT_EQ(3, this->table_->GetNextPrime(2));
- EXPECT_EQ(5, this->table_->GetNextPrime(3));
- EXPECT_EQ(7, this->table_->GetNextPrime(5));
- EXPECT_EQ(11, this->table_->GetNextPrime(7));
- EXPECT_EQ(131, this->table_->GetNextPrime(128));
-}
-
-// Type-parameterized tests involve one extra step: you have to
-// enumerate the tests you defined:
-REGISTER_TYPED_TEST_CASE_P(
- PrimeTableTest2, // The first argument is the test case name.
- // The rest of the arguments are the test names.
- ReturnsFalseForNonPrimes, ReturnsTrueForPrimes, CanGetNextPrime);
-
-// At this point the test pattern is done. However, you don't have
-// any real test yet as you haven't said which types you want to run
-// the tests with.
-
-// To turn the abstract test pattern into real tests, you instantiate
-// it with a list of types. Usually the test pattern will be defined
-// in a .h file, and anyone can #include and instantiate it. You can
-// even instantiate it more than once in the same program. To tell
-// different instances apart, you give each of them a name, which will
-// become part of the test case name and can be used in test filters.
-
-// The list of types we want to test. Note that it doesn't have to be
-// defined at the time we write the TYPED_TEST_P()s.
-typedef Types<OnTheFlyPrimeTable, PreCalculatedPrimeTable>
- PrimeTableImplementations;
-INSTANTIATE_TYPED_TEST_CASE_P(OnTheFlyAndPreCalculated, // Instance name
- PrimeTableTest2, // Test case name
- PrimeTableImplementations); // Type list
-
-#endif // GTEST_HAS_TYPED_TEST_P
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample7_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample7_unittest.cc
deleted file mode 100644
index 1b651a21d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample7_unittest.cc
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// This sample shows how to test common properties of multiple
-// implementations of an interface (aka interface tests) using
-// value-parameterized tests. Each test in the test case has
-// a parameter that is an interface pointer to an implementation
-// tested.
-
-// The interface and its implementations are in this header.
-#include "prime_tables.h"
-
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-using ::testing::TestWithParam;
-using ::testing::Values;
-
-// As a general rule, to prevent a test from affecting the tests that come
-// after it, you should create and destroy the tested objects for each test
-// instead of reusing them. In this sample we will define a simple factory
-// function for PrimeTable objects. We will instantiate objects in test's
-// SetUp() method and delete them in TearDown() method.
-typedef PrimeTable* CreatePrimeTableFunc();
-
-PrimeTable* CreateOnTheFlyPrimeTable() {
- return new OnTheFlyPrimeTable();
-}
-
-template <size_t max_precalculated>
-PrimeTable* CreatePreCalculatedPrimeTable() {
- return new PreCalculatedPrimeTable(max_precalculated);
-}
-
-// Inside the test body, fixture constructor, SetUp(), and TearDown() you
-// can refer to the test parameter by GetParam(). In this case, the test
-// parameter is a factory function which we call in fixture's SetUp() to
-// create and store an instance of PrimeTable.
-class PrimeTableTest : public TestWithParam<CreatePrimeTableFunc*> {
- public:
- virtual ~PrimeTableTest() { delete table_; }
- virtual void SetUp() { table_ = (*GetParam())(); }
- virtual void TearDown() {
- delete table_;
- table_ = NULL;
- }
-
- protected:
- PrimeTable* table_;
-};
-
-TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) {
- EXPECT_FALSE(table_->IsPrime(-5));
- EXPECT_FALSE(table_->IsPrime(0));
- EXPECT_FALSE(table_->IsPrime(1));
- EXPECT_FALSE(table_->IsPrime(4));
- EXPECT_FALSE(table_->IsPrime(6));
- EXPECT_FALSE(table_->IsPrime(100));
-}
-
-TEST_P(PrimeTableTest, ReturnsTrueForPrimes) {
- EXPECT_TRUE(table_->IsPrime(2));
- EXPECT_TRUE(table_->IsPrime(3));
- EXPECT_TRUE(table_->IsPrime(5));
- EXPECT_TRUE(table_->IsPrime(7));
- EXPECT_TRUE(table_->IsPrime(11));
- EXPECT_TRUE(table_->IsPrime(131));
-}
-
-TEST_P(PrimeTableTest, CanGetNextPrime) {
- EXPECT_EQ(2, table_->GetNextPrime(0));
- EXPECT_EQ(3, table_->GetNextPrime(2));
- EXPECT_EQ(5, table_->GetNextPrime(3));
- EXPECT_EQ(7, table_->GetNextPrime(5));
- EXPECT_EQ(11, table_->GetNextPrime(7));
- EXPECT_EQ(131, table_->GetNextPrime(128));
-}
-
-// In order to run value-parameterized tests, you need to instantiate them,
-// or bind them to a list of values which will be used as test parameters.
-// You can instantiate them in a different translation module, or even
-// instantiate them several times.
-//
-// Here, we instantiate our tests with a list of two PrimeTable object
-// factory functions:
-INSTANTIATE_TEST_CASE_P(
- OnTheFlyAndPreCalculated,
- PrimeTableTest,
- Values(&CreateOnTheFlyPrimeTable, &CreatePreCalculatedPrimeTable<1000>));
-
-#else
-
-// Google Test may not support value-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif // GTEST_HAS_PARAM_TEST
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample8_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample8_unittest.cc
deleted file mode 100644
index 5ad2e2c9f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample8_unittest.cc
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// This sample shows how to test code relying on some global flag variables.
-// Combine() helps with generating all possible combinations of such flags,
-// and each test is given one combination as a parameter.
-
-// Use class definitions to test from this header.
-#include "prime_tables.h"
-
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_COMBINE
-
-// Suppose we want to introduce a new, improved implementation of PrimeTable
-// which combines speed of PrecalcPrimeTable and versatility of
-// OnTheFlyPrimeTable (see prime_tables.h). Inside it instantiates both
-// PrecalcPrimeTable and OnTheFlyPrimeTable and uses the one that is more
-// appropriate under the circumstances. But in low memory conditions, it can be
-// told to instantiate without PrecalcPrimeTable instance at all and use only
-// OnTheFlyPrimeTable.
-class HybridPrimeTable : public PrimeTable {
- public:
- HybridPrimeTable(bool force_on_the_fly, int max_precalculated)
- : on_the_fly_impl_(new OnTheFlyPrimeTable),
- precalc_impl_(force_on_the_fly ? NULL :
- new PreCalculatedPrimeTable(max_precalculated)),
- max_precalculated_(max_precalculated) {}
- virtual ~HybridPrimeTable() {
- delete on_the_fly_impl_;
- delete precalc_impl_;
- }
-
- virtual bool IsPrime(int n) const {
- if (precalc_impl_ != NULL && n < max_precalculated_)
- return precalc_impl_->IsPrime(n);
- else
- return on_the_fly_impl_->IsPrime(n);
- }
-
- virtual int GetNextPrime(int p) const {
- int next_prime = -1;
- if (precalc_impl_ != NULL && p < max_precalculated_)
- next_prime = precalc_impl_->GetNextPrime(p);
-
- return next_prime != -1 ? next_prime : on_the_fly_impl_->GetNextPrime(p);
- }
-
- private:
- OnTheFlyPrimeTable* on_the_fly_impl_;
- PreCalculatedPrimeTable* precalc_impl_;
- int max_precalculated_;
-};
-
-using ::testing::TestWithParam;
-using ::testing::Bool;
-using ::testing::Values;
-using ::testing::Combine;
-
-// To test all code paths for HybridPrimeTable we must test it with numbers
-// both within and outside PreCalculatedPrimeTable's capacity and also with
-// PreCalculatedPrimeTable disabled. We do this by defining fixture which will
-// accept different combinations of parameters for instantiating a
-// HybridPrimeTable instance.
-class PrimeTableTest : public TestWithParam< ::std::tr1::tuple<bool, int> > {
- protected:
- virtual void SetUp() {
- // This can be written as
- //
- // bool force_on_the_fly;
- // int max_precalculated;
- // tie(force_on_the_fly, max_precalculated) = GetParam();
- //
- // once the Google C++ Style Guide allows use of ::std::tr1::tie.
- //
- bool force_on_the_fly = ::std::tr1::get<0>(GetParam());
- int max_precalculated = ::std::tr1::get<1>(GetParam());
- table_ = new HybridPrimeTable(force_on_the_fly, max_precalculated);
- }
- virtual void TearDown() {
- delete table_;
- table_ = NULL;
- }
- HybridPrimeTable* table_;
-};
-
-TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) {
- // Inside the test body, you can refer to the test parameter by GetParam().
- // In this case, the test parameter is a PrimeTable interface pointer which
- // we can use directly.
- // Please note that you can also save it in the fixture's SetUp() method
- // or constructor and use saved copy in the tests.
-
- EXPECT_FALSE(table_->IsPrime(-5));
- EXPECT_FALSE(table_->IsPrime(0));
- EXPECT_FALSE(table_->IsPrime(1));
- EXPECT_FALSE(table_->IsPrime(4));
- EXPECT_FALSE(table_->IsPrime(6));
- EXPECT_FALSE(table_->IsPrime(100));
-}
-
-TEST_P(PrimeTableTest, ReturnsTrueForPrimes) {
- EXPECT_TRUE(table_->IsPrime(2));
- EXPECT_TRUE(table_->IsPrime(3));
- EXPECT_TRUE(table_->IsPrime(5));
- EXPECT_TRUE(table_->IsPrime(7));
- EXPECT_TRUE(table_->IsPrime(11));
- EXPECT_TRUE(table_->IsPrime(131));
-}
-
-TEST_P(PrimeTableTest, CanGetNextPrime) {
- EXPECT_EQ(2, table_->GetNextPrime(0));
- EXPECT_EQ(3, table_->GetNextPrime(2));
- EXPECT_EQ(5, table_->GetNextPrime(3));
- EXPECT_EQ(7, table_->GetNextPrime(5));
- EXPECT_EQ(11, table_->GetNextPrime(7));
- EXPECT_EQ(131, table_->GetNextPrime(128));
-}
-
-// In order to run value-parameterized tests, you need to instantiate them,
-// or bind them to a list of values which will be used as test parameters.
-// You can instantiate them in a different translation module, or even
-// instantiate them several times.
-//
-// Here, we instantiate our tests with a list of parameters. We must combine
-// all variations of the boolean flag suppressing PrecalcPrimeTable and some
-// meaningful values for tests. We choose a small value (1), and a value that
-// will put some of the tested numbers beyond the capability of the
-// PrecalcPrimeTable instance and some inside it (10). Combine will produce all
-// possible combinations.
-INSTANTIATE_TEST_CASE_P(MeaningfulTestParameters,
- PrimeTableTest,
- Combine(Bool(), Values(1, 10)));
-
-#else
-
-// Google Test may not support Combine() with some compilers. If we
-// use conditional compilation to compile out all code referring to
-// the gtest_main library, MSVC linker will not link that library at
-// all and consequently complain about missing entry point defined in
-// that library (fatal error LNK1561: entry point must be
-// defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {}
-
-#endif // GTEST_HAS_COMBINE
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample9_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample9_unittest.cc
deleted file mode 100644
index b2e2079bf..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/samples/sample9_unittest.cc
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2009 Google Inc. All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// This sample shows how to use Google Test listener API to implement
-// an alternative console output and how to use the UnitTest reflection API
-// to enumerate test cases and tests and to inspect their results.
-
-#include <stdio.h>
-
-#include "gtest/gtest.h"
-
-using ::testing::EmptyTestEventListener;
-using ::testing::InitGoogleTest;
-using ::testing::Test;
-using ::testing::TestCase;
-using ::testing::TestEventListeners;
-using ::testing::TestInfo;
-using ::testing::TestPartResult;
-using ::testing::UnitTest;
-
-namespace {
-
-// Provides alternative output mode which produces minimal amount of
-// information about tests.
-class TersePrinter : public EmptyTestEventListener {
- private:
- // Called before any test activity starts.
- virtual void OnTestProgramStart(const UnitTest& /* unit_test */) {}
-
- // Called after all test activities have ended.
- virtual void OnTestProgramEnd(const UnitTest& unit_test) {
- fprintf(stdout, "TEST %s\n", unit_test.Passed() ? "PASSED" : "FAILED");
- fflush(stdout);
- }
-
- // Called before a test starts.
- virtual void OnTestStart(const TestInfo& test_info) {
- fprintf(stdout,
- "*** Test %s.%s starting.\n",
- test_info.test_case_name(),
- test_info.name());
- fflush(stdout);
- }
-
- // Called after a failed assertion or a SUCCEED() invocation.
- virtual void OnTestPartResult(const TestPartResult& test_part_result) {
- fprintf(stdout,
- "%s in %s:%d\n%s\n",
- test_part_result.failed() ? "*** Failure" : "Success",
- test_part_result.file_name(),
- test_part_result.line_number(),
- test_part_result.summary());
- fflush(stdout);
- }
-
- // Called after a test ends.
- virtual void OnTestEnd(const TestInfo& test_info) {
- fprintf(stdout,
- "*** Test %s.%s ending.\n",
- test_info.test_case_name(),
- test_info.name());
- fflush(stdout);
- }
-}; // class TersePrinter
-
-TEST(CustomOutputTest, PrintsMessage) {
- printf("Printing something from the test body...\n");
-}
-
-TEST(CustomOutputTest, Succeeds) {
- SUCCEED() << "SUCCEED() has been invoked from here";
-}
-
-TEST(CustomOutputTest, Fails) {
- EXPECT_EQ(1, 2)
- << "This test fails in order to demonstrate alternative failure messages";
-}
-
-} // namespace
-
-int main(int argc, char **argv) {
- InitGoogleTest(&argc, argv);
-
- bool terse_output = false;
- if (argc > 1 && strcmp(argv[1], "--terse_output") == 0 )
- terse_output = true;
- else
- printf("%s\n", "Run this program with --terse_output to change the way "
- "it prints its output.");
-
- UnitTest& unit_test = *UnitTest::GetInstance();
-
- // If we are given the --terse_output command line flag, suppresses the
- // standard output and attaches own result printer.
- if (terse_output) {
- TestEventListeners& listeners = unit_test.listeners();
-
- // Removes the default console output listener from the list so it will
- // not receive events from Google Test and won't print any output. Since
- // this operation transfers ownership of the listener to the caller we
- // have to delete it as well.
- delete listeners.Release(listeners.default_result_printer());
-
- // Adds the custom output listener to the list. It will now receive
- // events from Google Test and print the alternative output. We don't
- // have to worry about deleting it since Google Test assumes ownership
- // over it after adding it to the list.
- listeners.Append(new TersePrinter);
- }
- int ret_val = RUN_ALL_TESTS();
-
- // This is an example of using the UnitTest reflection API to inspect test
- // results. Here we discount failures from the tests we expected to fail.
- int unexpectedly_failed_tests = 0;
- for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
- const TestCase& test_case = *unit_test.GetTestCase(i);
- for (int j = 0; j < test_case.total_test_count(); ++j) {
- const TestInfo& test_info = *test_case.GetTestInfo(j);
- // Counts failed tests that were not meant to fail (those without
- // 'Fails' in the name).
- if (test_info.result()->Failed() &&
- strcmp(test_info.name(), "Fails") != 0) {
- unexpectedly_failed_tests++;
- }
- }
- }
-
- // Test that were meant to fail should not affect the test program outcome.
- if (unexpectedly_failed_tests == 0)
- ret_val = 0;
-
- return ret_val;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/fuse_gtest_files.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/fuse_gtest_files.py
deleted file mode 100755
index 57ef72f0e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/fuse_gtest_files.py
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""fuse_gtest_files.py v0.2.0
-Fuses Google Test source code into a .h file and a .cc file.
-
-SYNOPSIS
- fuse_gtest_files.py [GTEST_ROOT_DIR] OUTPUT_DIR
-
- Scans GTEST_ROOT_DIR for Google Test source code, and generates
- two files: OUTPUT_DIR/gtest/gtest.h and OUTPUT_DIR/gtest/gtest-all.cc.
- Then you can build your tests by adding OUTPUT_DIR to the include
- search path and linking with OUTPUT_DIR/gtest/gtest-all.cc. These
- two files contain everything you need to use Google Test. Hence
- you can "install" Google Test by copying them to wherever you want.
-
- GTEST_ROOT_DIR can be omitted and defaults to the parent
- directory of the directory holding this script.
-
-EXAMPLES
- ./fuse_gtest_files.py fused_gtest
- ./fuse_gtest_files.py path/to/unpacked/gtest fused_gtest
-
-This tool is experimental. In particular, it assumes that there is no
-conditional inclusion of Google Test headers. Please report any
-problems to googletestframework@googlegroups.com. You can read
-http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide for
-more information.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import sets
-import sys
-
-# We assume that this file is in the scripts/ directory in the Google
-# Test root directory.
-DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
-
-# Regex for matching '#include "gtest/..."'.
-INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gtest/.+)"')
-
-# Regex for matching '#include "src/..."'.
-INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"')
-
-# Where to find the source seed files.
-GTEST_H_SEED = 'include/gtest/gtest.h'
-GTEST_SPI_H_SEED = 'include/gtest/gtest-spi.h'
-GTEST_ALL_CC_SEED = 'src/gtest-all.cc'
-
-# Where to put the generated files.
-GTEST_H_OUTPUT = 'gtest/gtest.h'
-GTEST_ALL_CC_OUTPUT = 'gtest/gtest-all.cc'
-
-
-def VerifyFileExists(directory, relative_path):
- """Verifies that the given file exists; aborts on failure.
-
- relative_path is the file path relative to the given directory.
- """
-
- if not os.path.isfile(os.path.join(directory, relative_path)):
- print 'ERROR: Cannot find %s in directory %s.' % (relative_path,
- directory)
- print ('Please either specify a valid project root directory '
- 'or omit it on the command line.')
- sys.exit(1)
-
-
-def ValidateGTestRootDir(gtest_root):
- """Makes sure gtest_root points to a valid gtest root directory.
-
- The function aborts the program on failure.
- """
-
- VerifyFileExists(gtest_root, GTEST_H_SEED)
- VerifyFileExists(gtest_root, GTEST_ALL_CC_SEED)
-
-
-def VerifyOutputFile(output_dir, relative_path):
- """Verifies that the given output file path is valid.
-
- relative_path is relative to the output_dir directory.
- """
-
- # Makes sure the output file either doesn't exist or can be overwritten.
- output_file = os.path.join(output_dir, relative_path)
- if os.path.exists(output_file):
- # TODO(wan@google.com): The following user-interaction doesn't
- # work with automated processes. We should provide a way for the
- # Makefile to force overwriting the files.
- print ('%s already exists in directory %s - overwrite it? (y/N) ' %
- (relative_path, output_dir))
- answer = sys.stdin.readline().strip()
- if answer not in ['y', 'Y']:
- print 'ABORTED.'
- sys.exit(1)
-
- # Makes sure the directory holding the output file exists; creates
- # it and all its ancestors if necessary.
- parent_directory = os.path.dirname(output_file)
- if not os.path.isdir(parent_directory):
- os.makedirs(parent_directory)
-
-
-def ValidateOutputDir(output_dir):
- """Makes sure output_dir points to a valid output directory.
-
- The function aborts the program on failure.
- """
-
- VerifyOutputFile(output_dir, GTEST_H_OUTPUT)
- VerifyOutputFile(output_dir, GTEST_ALL_CC_OUTPUT)
-
-
-def FuseGTestH(gtest_root, output_dir):
- """Scans folder gtest_root to generate gtest/gtest.h in output_dir."""
-
- output_file = file(os.path.join(output_dir, GTEST_H_OUTPUT), 'w')
- processed_files = sets.Set() # Holds all gtest headers we've processed.
-
- def ProcessFile(gtest_header_path):
- """Processes the given gtest header file."""
-
- # We don't process the same header twice.
- if gtest_header_path in processed_files:
- return
-
- processed_files.add(gtest_header_path)
-
- # Reads each line in the given gtest header.
- for line in file(os.path.join(gtest_root, gtest_header_path), 'r'):
- m = INCLUDE_GTEST_FILE_REGEX.match(line)
- if m:
- # It's '#include "gtest/..."' - let's process it recursively.
- ProcessFile('include/' + m.group(1))
- else:
- # Otherwise we copy the line unchanged to the output file.
- output_file.write(line)
-
- ProcessFile(GTEST_H_SEED)
- output_file.close()
-
-
-def FuseGTestAllCcToFile(gtest_root, output_file):
- """Scans folder gtest_root to generate gtest/gtest-all.cc in output_file."""
-
- processed_files = sets.Set()
-
- def ProcessFile(gtest_source_file):
- """Processes the given gtest source file."""
-
- # We don't process the same #included file twice.
- if gtest_source_file in processed_files:
- return
-
- processed_files.add(gtest_source_file)
-
- # Reads each line in the given gtest source file.
- for line in file(os.path.join(gtest_root, gtest_source_file), 'r'):
- m = INCLUDE_GTEST_FILE_REGEX.match(line)
- if m:
- if 'include/' + m.group(1) == GTEST_SPI_H_SEED:
- # It's '#include "gtest/gtest-spi.h"'. This file is not
- # #included by "gtest/gtest.h", so we need to process it.
- ProcessFile(GTEST_SPI_H_SEED)
- else:
- # It's '#include "gtest/foo.h"' where foo is not gtest-spi.
- # We treat it as '#include "gtest/gtest.h"', as all other
- # gtest headers are being fused into gtest.h and cannot be
- # #included directly.
-
- # There is no need to #include "gtest/gtest.h" more than once.
- if not GTEST_H_SEED in processed_files:
- processed_files.add(GTEST_H_SEED)
- output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
- else:
- m = INCLUDE_SRC_FILE_REGEX.match(line)
- if m:
- # It's '#include "src/foo"' - let's process it recursively.
- ProcessFile(m.group(1))
- else:
- output_file.write(line)
-
- ProcessFile(GTEST_ALL_CC_SEED)
-
-
-def FuseGTestAllCc(gtest_root, output_dir):
- """Scans folder gtest_root to generate gtest/gtest-all.cc in output_dir."""
-
- output_file = file(os.path.join(output_dir, GTEST_ALL_CC_OUTPUT), 'w')
- FuseGTestAllCcToFile(gtest_root, output_file)
- output_file.close()
-
-
-def FuseGTest(gtest_root, output_dir):
- """Fuses gtest.h and gtest-all.cc."""
-
- ValidateGTestRootDir(gtest_root)
- ValidateOutputDir(output_dir)
-
- FuseGTestH(gtest_root, output_dir)
- FuseGTestAllCc(gtest_root, output_dir)
-
-
-def main():
- argc = len(sys.argv)
- if argc == 2:
- # fuse_gtest_files.py OUTPUT_DIR
- FuseGTest(DEFAULT_GTEST_ROOT_DIR, sys.argv[1])
- elif argc == 3:
- # fuse_gtest_files.py GTEST_ROOT_DIR OUTPUT_DIR
- FuseGTest(sys.argv[1], sys.argv[2])
- else:
- print __doc__
- sys.exit(1)
-
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gen_gtest_pred_impl.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gen_gtest_pred_impl.py
deleted file mode 100755
index d35b4f00f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gen_gtest_pred_impl.py
+++ /dev/null
@@ -1,730 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""gen_gtest_pred_impl.py v0.1
-
-Generates the implementation of Google Test predicate assertions and
-accompanying tests.
-
-Usage:
-
- gen_gtest_pred_impl.py MAX_ARITY
-
-where MAX_ARITY is a positive integer.
-
-The command generates the implementation of up-to MAX_ARITY-ary
-predicate assertions, and writes it to file gtest_pred_impl.h in the
-directory where the script is. It also generates the accompanying
-unit test in file gtest_pred_impl_unittest.cc.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import sys
-import time
-
-# Where this script is.
-SCRIPT_DIR = os.path.dirname(sys.argv[0])
-
-# Where to store the generated header.
-HEADER = os.path.join(SCRIPT_DIR, '../include/gtest/gtest_pred_impl.h')
-
-# Where to store the generated unit test.
-UNIT_TEST = os.path.join(SCRIPT_DIR, '../test/gtest_pred_impl_unittest.cc')
-
-
-def HeaderPreamble(n):
- """Returns the preamble for the header file.
-
- Args:
- n: the maximum arity of the predicate macros to be generated.
- """
-
- # A map that defines the values used in the preamble template.
- DEFS = {
- 'today' : time.strftime('%m/%d/%Y'),
- 'year' : time.strftime('%Y'),
- 'command' : '%s %s' % (os.path.basename(sys.argv[0]), n),
- 'n' : n
- }
-
- return (
-"""// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on %(today)s by command
-// '%(command)s'. DO NOT EDIT BY HAND!
-//
-// Implements a family of generic predicate assertion macros.
-
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-// Makes sure this header is not included before gtest.h.
-#ifndef GTEST_INCLUDE_GTEST_GTEST_H_
-#error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
-#endif // GTEST_INCLUDE_GTEST_GTEST_H_
-
-// This header implements a family of generic predicate assertion
-// macros:
-//
-// ASSERT_PRED_FORMAT1(pred_format, v1)
-// ASSERT_PRED_FORMAT2(pred_format, v1, v2)
-// ...
-//
-// where pred_format is a function or functor that takes n (in the
-// case of ASSERT_PRED_FORMATn) values and their source expression
-// text, and returns a testing::AssertionResult. See the definition
-// of ASSERT_EQ in gtest.h for an example.
-//
-// If you don't care about formatting, you can use the more
-// restrictive version:
-//
-// ASSERT_PRED1(pred, v1)
-// ASSERT_PRED2(pred, v1, v2)
-// ...
-//
-// where pred is an n-ary function or functor that returns bool,
-// and the values v1, v2, ..., must support the << operator for
-// streaming to std::ostream.
-//
-// We also define the EXPECT_* variations.
-//
-// For now we only support predicates whose arity is at most %(n)s.
-// Please email googletestframework@googlegroups.com if you need
-// support for higher arities.
-
-// GTEST_ASSERT_ is the basic statement to which all of the assertions
-// in this file reduce. Don't use this in your code.
-
-#define GTEST_ASSERT_(expression, on_failure) \\
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\
- if (const ::testing::AssertionResult gtest_ar = (expression)) \\
- ; \\
- else \\
- on_failure(gtest_ar.failure_message())
-""" % DEFS)
-
-
-def Arity(n):
- """Returns the English name of the given arity."""
-
- if n < 0:
- return None
- elif n <= 3:
- return ['nullary', 'unary', 'binary', 'ternary'][n]
- else:
- return '%s-ary' % n
-
-
-def Title(word):
- """Returns the given word in title case. The difference between
- this and string's title() method is that Title('4-ary') is '4-ary'
- while '4-ary'.title() is '4-Ary'."""
-
- return word[0].upper() + word[1:]
-
-
-def OneTo(n):
- """Returns the list [1, 2, 3, ..., n]."""
-
- return range(1, n + 1)
-
-
-def Iter(n, format, sep=''):
- """Given a positive integer n, a format string that contains 0 or
- more '%s' format specs, and optionally a separator string, returns
- the join of n strings, each formatted with the format string on an
- iterator ranged from 1 to n.
-
- Example:
-
- Iter(3, 'v%s', sep=', ') returns 'v1, v2, v3'.
- """
-
- # How many '%s' specs are in format?
- spec_count = len(format.split('%s')) - 1
- return sep.join([format % (spec_count * (i,)) for i in OneTo(n)])
-
-
-def ImplementationForArity(n):
- """Returns the implementation of n-ary predicate assertions."""
-
- # A map the defines the values used in the implementation template.
- DEFS = {
- 'n' : str(n),
- 'vs' : Iter(n, 'v%s', sep=', '),
- 'vts' : Iter(n, '#v%s', sep=', '),
- 'arity' : Arity(n),
- 'Arity' : Title(Arity(n))
- }
-
- impl = """
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use
-// this in your code.
-template <typename Pred""" % DEFS
-
- impl += Iter(n, """,
- typename T%s""")
-
- impl += """>
-AssertionResult AssertPred%(n)sHelper(const char* pred_text""" % DEFS
-
- impl += Iter(n, """,
- const char* e%s""")
-
- impl += """,
- Pred pred"""
-
- impl += Iter(n, """,
- const T%s& v%s""")
-
- impl += """) {
- if (pred(%(vs)s)) return AssertionSuccess();
-
-""" % DEFS
-
- impl += ' return AssertionFailure() << pred_text << "("'
-
- impl += Iter(n, """
- << e%s""", sep=' << ", "')
-
- impl += ' << ") evaluates to false, where"'
-
- impl += Iter(n, """
- << "\\n" << e%s << " evaluates to " << v%s""")
-
- impl += """;
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT%(n)s.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, on_failure)\\
- GTEST_ASSERT_(pred_format(%(vts)s, %(vs)s),\\
- on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use
-// this in your code.
-#define GTEST_PRED%(n)s_(pred, %(vs)s, on_failure)\\
- GTEST_ASSERT_(::testing::AssertPred%(n)sHelper(#pred""" % DEFS
-
- impl += Iter(n, """, \\
- #v%s""")
-
- impl += """, \\
- pred"""
-
- impl += Iter(n, """, \\
- v%s""")
-
- impl += """), on_failure)
-
-// %(Arity)s predicate assertion macros.
-#define EXPECT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\
- GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED%(n)s(pred, %(vs)s) \\
- GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\
- GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED%(n)s(pred, %(vs)s) \\
- GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_FATAL_FAILURE_)
-
-""" % DEFS
-
- return impl
-
-
-def HeaderPostamble():
- """Returns the postamble for the header file."""
-
- return """
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-"""
-
-
-def GenerateFile(path, content):
- """Given a file path and a content string, overwrites it with the
- given content."""
-
- print 'Updating file %s . . .' % path
-
- f = file(path, 'w+')
- print >>f, content,
- f.close()
-
- print 'File %s has been updated.' % path
-
-
-def GenerateHeader(n):
- """Given the maximum arity n, updates the header file that implements
- the predicate assertions."""
-
- GenerateFile(HEADER,
- HeaderPreamble(n)
- + ''.join([ImplementationForArity(i) for i in OneTo(n)])
- + HeaderPostamble())
-
-
-def UnitTestPreamble():
- """Returns the preamble for the unit test file."""
-
- # A map that defines the values used in the preamble template.
- DEFS = {
- 'today' : time.strftime('%m/%d/%Y'),
- 'year' : time.strftime('%Y'),
- 'command' : '%s %s' % (os.path.basename(sys.argv[0]), sys.argv[1]),
- }
-
- return (
-"""// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on %(today)s by command
-// '%(command)s'. DO NOT EDIT BY HAND!
-
-// Regression test for gtest_pred_impl.h
-//
-// This file is generated by a script and quite long. If you intend to
-// learn how Google Test works by reading its unit tests, read
-// gtest_unittest.cc instead.
-//
-// This is intended as a regression test for the Google Test predicate
-// assertions. We compile it as part of the gtest_unittest target
-// only to keep the implementation tidy and compact, as it is quite
-// involved to set up the stage for testing Google Test using Google
-// Test itself.
-//
-// Currently, gtest_unittest takes ~11 seconds to run in the testing
-// daemon. In the future, if it grows too large and needs much more
-// time to finish, we should consider separating this file into a
-// stand-alone regression test.
-
-#include <iostream>
-
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-// A user-defined data type.
-struct Bool {
- explicit Bool(int val) : value(val != 0) {}
-
- bool operator>(int n) const { return value > Bool(n).value; }
-
- Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); }
-
- bool operator==(const Bool& rhs) const { return value == rhs.value; }
-
- bool value;
-};
-
-// Enables Bool to be used in assertions.
-std::ostream& operator<<(std::ostream& os, const Bool& x) {
- return os << (x.value ? "true" : "false");
-}
-
-""" % DEFS)
-
-
-def TestsForArity(n):
- """Returns the tests for n-ary predicate assertions."""
-
- # A map that defines the values used in the template for the tests.
- DEFS = {
- 'n' : n,
- 'es' : Iter(n, 'e%s', sep=', '),
- 'vs' : Iter(n, 'v%s', sep=', '),
- 'vts' : Iter(n, '#v%s', sep=', '),
- 'tvs' : Iter(n, 'T%s v%s', sep=', '),
- 'int_vs' : Iter(n, 'int v%s', sep=', '),
- 'Bool_vs' : Iter(n, 'Bool v%s', sep=', '),
- 'types' : Iter(n, 'typename T%s', sep=', '),
- 'v_sum' : Iter(n, 'v%s', sep=' + '),
- 'arity' : Arity(n),
- 'Arity' : Title(Arity(n)),
- }
-
- tests = (
-"""// Sample functions/functors for testing %(arity)s predicate assertions.
-
-// A %(arity)s predicate function.
-template <%(types)s>
-bool PredFunction%(n)s(%(tvs)s) {
- return %(v_sum)s > 0;
-}
-
-// The following two functions are needed to circumvent a bug in
-// gcc 2.95.3, which sometimes has problem with the above template
-// function.
-bool PredFunction%(n)sInt(%(int_vs)s) {
- return %(v_sum)s > 0;
-}
-bool PredFunction%(n)sBool(%(Bool_vs)s) {
- return %(v_sum)s > 0;
-}
-""" % DEFS)
-
- tests += """
-// A %(arity)s predicate functor.
-struct PredFunctor%(n)s {
- template <%(types)s>
- bool operator()(""" % DEFS
-
- tests += Iter(n, 'const T%s& v%s', sep=""",
- """)
-
- tests += """) {
- return %(v_sum)s > 0;
- }
-};
-""" % DEFS
-
- tests += """
-// A %(arity)s predicate-formatter function.
-template <%(types)s>
-testing::AssertionResult PredFormatFunction%(n)s(""" % DEFS
-
- tests += Iter(n, 'const char* e%s', sep=""",
- """)
-
- tests += Iter(n, """,
- const T%s& v%s""")
-
- tests += """) {
- if (PredFunction%(n)s(%(vs)s))
- return testing::AssertionSuccess();
-
- return testing::AssertionFailure()
- << """ % DEFS
-
- tests += Iter(n, 'e%s', sep=' << " + " << ')
-
- tests += """
- << " is expected to be positive, but evaluates to "
- << %(v_sum)s << ".";
-}
-""" % DEFS
-
- tests += """
-// A %(arity)s predicate-formatter functor.
-struct PredFormatFunctor%(n)s {
- template <%(types)s>
- testing::AssertionResult operator()(""" % DEFS
-
- tests += Iter(n, 'const char* e%s', sep=""",
- """)
-
- tests += Iter(n, """,
- const T%s& v%s""")
-
- tests += """) const {
- return PredFormatFunction%(n)s(%(es)s, %(vs)s);
- }
-};
-""" % DEFS
-
- tests += """
-// Tests for {EXPECT|ASSERT}_PRED_FORMAT%(n)s.
-
-class Predicate%(n)sTest : public testing::Test {
- protected:
- virtual void SetUp() {
- expected_to_finish_ = true;
- finished_ = false;""" % DEFS
-
- tests += """
- """ + Iter(n, 'n%s_ = ') + """0;
- }
-"""
-
- tests += """
- virtual void TearDown() {
- // Verifies that each of the predicate's arguments was evaluated
- // exactly once."""
-
- tests += ''.join(["""
- EXPECT_EQ(1, n%s_) <<
- "The predicate assertion didn't evaluate argument %s "
- "exactly once.";""" % (i, i + 1) for i in OneTo(n)])
-
- tests += """
-
- // Verifies that the control flow in the test function is expected.
- if (expected_to_finish_ && !finished_) {
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
- } else if (!expected_to_finish_ && finished_) {
- FAIL() << "The failed predicate assertion didn't abort the test "
- "as expected.";
- }
- }
-
- // true iff the test function is expected to run to finish.
- static bool expected_to_finish_;
-
- // true iff the test function did run to finish.
- static bool finished_;
-""" % DEFS
-
- tests += Iter(n, """
- static int n%s_;""")
-
- tests += """
-};
-
-bool Predicate%(n)sTest::expected_to_finish_;
-bool Predicate%(n)sTest::finished_;
-""" % DEFS
-
- tests += Iter(n, """int Predicate%%(n)sTest::n%s_;
-""") % DEFS
-
- tests += """
-typedef Predicate%(n)sTest EXPECT_PRED_FORMAT%(n)sTest;
-typedef Predicate%(n)sTest ASSERT_PRED_FORMAT%(n)sTest;
-typedef Predicate%(n)sTest EXPECT_PRED%(n)sTest;
-typedef Predicate%(n)sTest ASSERT_PRED%(n)sTest;
-""" % DEFS
-
- def GenTest(use_format, use_assert, expect_failure,
- use_functor, use_user_type):
- """Returns the test for a predicate assertion macro.
-
- Args:
- use_format: true iff the assertion is a *_PRED_FORMAT*.
- use_assert: true iff the assertion is a ASSERT_*.
- expect_failure: true iff the assertion is expected to fail.
- use_functor: true iff the first argument of the assertion is
- a functor (as opposed to a function)
- use_user_type: true iff the predicate functor/function takes
- argument(s) of a user-defined type.
-
- Example:
-
- GenTest(1, 0, 0, 1, 0) returns a test that tests the behavior
- of a successful EXPECT_PRED_FORMATn() that takes a functor
- whose arguments have built-in types."""
-
- if use_assert:
- assrt = 'ASSERT' # 'assert' is reserved, so we cannot use
- # that identifier here.
- else:
- assrt = 'EXPECT'
-
- assertion = assrt + '_PRED'
-
- if use_format:
- pred_format = 'PredFormat'
- assertion += '_FORMAT'
- else:
- pred_format = 'Pred'
-
- assertion += '%(n)s' % DEFS
-
- if use_functor:
- pred_format_type = 'functor'
- pred_format += 'Functor%(n)s()'
- else:
- pred_format_type = 'function'
- pred_format += 'Function%(n)s'
- if not use_format:
- if use_user_type:
- pred_format += 'Bool'
- else:
- pred_format += 'Int'
-
- test_name = pred_format_type.title()
-
- if use_user_type:
- arg_type = 'user-defined type (Bool)'
- test_name += 'OnUserType'
- if expect_failure:
- arg = 'Bool(n%s_++)'
- else:
- arg = 'Bool(++n%s_)'
- else:
- arg_type = 'built-in type (int)'
- test_name += 'OnBuiltInType'
- if expect_failure:
- arg = 'n%s_++'
- else:
- arg = '++n%s_'
-
- if expect_failure:
- successful_or_failed = 'failed'
- expected_or_not = 'expected.'
- test_name += 'Failure'
- else:
- successful_or_failed = 'successful'
- expected_or_not = 'UNEXPECTED!'
- test_name += 'Success'
-
- # A map that defines the values used in the test template.
- defs = DEFS.copy()
- defs.update({
- 'assert' : assrt,
- 'assertion' : assertion,
- 'test_name' : test_name,
- 'pf_type' : pred_format_type,
- 'pf' : pred_format,
- 'arg_type' : arg_type,
- 'arg' : arg,
- 'successful' : successful_or_failed,
- 'expected' : expected_or_not,
- })
-
- test = """
-// Tests a %(successful)s %(assertion)s where the
-// predicate-formatter is a %(pf_type)s on a %(arg_type)s.
-TEST_F(%(assertion)sTest, %(test_name)s) {""" % defs
-
- indent = (len(assertion) + 3)*' '
- extra_indent = ''
-
- if expect_failure:
- extra_indent = ' '
- if use_assert:
- test += """
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT"""
- else:
- test += """
- EXPECT_NONFATAL_FAILURE({ // NOLINT"""
-
- test += '\n' + extra_indent + """ %(assertion)s(%(pf)s""" % defs
-
- test = test % defs
- test += Iter(n, ',\n' + indent + extra_indent + '%(arg)s' % defs)
- test += ');\n' + extra_indent + ' finished_ = true;\n'
-
- if expect_failure:
- test += ' }, "");\n'
-
- test += '}\n'
- return test
-
- # Generates tests for all 2**6 = 64 combinations.
- tests += ''.join([GenTest(use_format, use_assert, expect_failure,
- use_functor, use_user_type)
- for use_format in [0, 1]
- for use_assert in [0, 1]
- for expect_failure in [0, 1]
- for use_functor in [0, 1]
- for use_user_type in [0, 1]
- ])
-
- return tests
-
-
-def UnitTestPostamble():
- """Returns the postamble for the tests."""
-
- return ''
-
-
-def GenerateUnitTest(n):
- """Returns the tests for up-to n-ary predicate assertions."""
-
- GenerateFile(UNIT_TEST,
- UnitTestPreamble()
- + ''.join([TestsForArity(i) for i in OneTo(n)])
- + UnitTestPostamble())
-
-
-def _Main():
- """The entry point of the script. Generates the header file and its
- unit test."""
-
- if len(sys.argv) != 2:
- print __doc__
- print 'Author: ' + __author__
- sys.exit(1)
-
- n = int(sys.argv[1])
- GenerateHeader(n)
- GenerateUnitTest(n)
-
-
-if __name__ == '__main__':
- _Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gtest-config.in b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gtest-config.in
deleted file mode 100644
index 9c7263854..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/gtest-config.in
+++ /dev/null
@@ -1,274 +0,0 @@
-#!/bin/sh
-
-# These variables are automatically filled in by the configure script.
-name="@PACKAGE_TARNAME@"
-version="@PACKAGE_VERSION@"
-
-show_usage()
-{
- echo "Usage: gtest-config [OPTIONS...]"
-}
-
-show_help()
-{
- show_usage
- cat <<\EOF
-
-The `gtest-config' script provides access to the necessary compile and linking
-flags to connect with Google C++ Testing Framework, both in a build prior to
-installation, and on the system proper after installation. The installation
-overrides may be issued in combination with any other queries, but will only
-affect installation queries if called on a built but not installed gtest. The
-installation queries may not be issued with any other types of queries, and
-only one installation query may be made at a time. The version queries and
-compiler flag queries may be combined as desired but not mixed. Different
-version queries are always combined with logical "and" semantics, and only the
-last of any particular query is used while all previous ones ignored. All
-versions must be specified as a sequence of numbers separated by periods.
-Compiler flag queries output the union of the sets of flags when combined.
-
- Examples:
- gtest-config --min-version=1.0 || echo "Insufficient Google Test version."
-
- g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp
- g++ $(gtest-config --ldflags --libs) -o foo foo.o
-
- # When using a built but not installed Google Test:
- g++ $(../../my_gtest_build/scripts/gtest-config ...) ...
-
- # When using an installed Google Test, but with installation overrides:
- export GTEST_PREFIX="/opt"
- g++ $(gtest-config --libdir="/opt/lib64" ...) ...
-
- Help:
- --usage brief usage information
- --help display this help message
-
- Installation Overrides:
- --prefix=<dir> overrides the installation prefix
- --exec-prefix=<dir> overrides the executable installation prefix
- --libdir=<dir> overrides the library installation prefix
- --includedir=<dir> overrides the header file installation prefix
-
- Installation Queries:
- --prefix installation prefix
- --exec-prefix executable installation prefix
- --libdir library installation directory
- --includedir header file installation directory
- --version the version of the Google Test installation
-
- Version Queries:
- --min-version=VERSION return 0 if the version is at least VERSION
- --exact-version=VERSION return 0 if the version is exactly VERSION
- --max-version=VERSION return 0 if the version is at most VERSION
-
- Compilation Flag Queries:
- --cppflags compile flags specific to the C-like preprocessors
- --cxxflags compile flags appropriate for C++ programs
- --ldflags linker flags
- --libs libraries for linking
-
-EOF
-}
-
-# This function bounds our version with a min and a max. It uses some clever
-# POSIX-compliant variable expansion to portably do all the work in the shell
-# and avoid any dependency on a particular "sed" or "awk" implementation.
-# Notable is that it will only ever compare the first 3 components of versions.
-# Further components will be cleanly stripped off. All versions must be
-# unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and
-# the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should
-# investigate expanding this via autom4te from AS_VERSION_COMPARE rather than
-# continuing to maintain our own shell version.
-check_versions()
-{
- major_version=${version%%.*}
- minor_version="0"
- point_version="0"
- if test "${version#*.}" != "${version}"; then
- minor_version=${version#*.}
- minor_version=${minor_version%%.*}
- fi
- if test "${version#*.*.}" != "${version}"; then
- point_version=${version#*.*.}
- point_version=${point_version%%.*}
- fi
-
- min_version="$1"
- min_major_version=${min_version%%.*}
- min_minor_version="0"
- min_point_version="0"
- if test "${min_version#*.}" != "${min_version}"; then
- min_minor_version=${min_version#*.}
- min_minor_version=${min_minor_version%%.*}
- fi
- if test "${min_version#*.*.}" != "${min_version}"; then
- min_point_version=${min_version#*.*.}
- min_point_version=${min_point_version%%.*}
- fi
-
- max_version="$2"
- max_major_version=${max_version%%.*}
- max_minor_version="0"
- max_point_version="0"
- if test "${max_version#*.}" != "${max_version}"; then
- max_minor_version=${max_version#*.}
- max_minor_version=${max_minor_version%%.*}
- fi
- if test "${max_version#*.*.}" != "${max_version}"; then
- max_point_version=${max_version#*.*.}
- max_point_version=${max_point_version%%.*}
- fi
-
- test $(($major_version)) -lt $(($min_major_version)) && exit 1
- if test $(($major_version)) -eq $(($min_major_version)); then
- test $(($minor_version)) -lt $(($min_minor_version)) && exit 1
- if test $(($minor_version)) -eq $(($min_minor_version)); then
- test $(($point_version)) -lt $(($min_point_version)) && exit 1
- fi
- fi
-
- test $(($major_version)) -gt $(($max_major_version)) && exit 1
- if test $(($major_version)) -eq $(($max_major_version)); then
- test $(($minor_version)) -gt $(($max_minor_version)) && exit 1
- if test $(($minor_version)) -eq $(($max_minor_version)); then
- test $(($point_version)) -gt $(($max_point_version)) && exit 1
- fi
- fi
-
- exit 0
-}
-
-# Show the usage line when no arguments are specified.
-if test $# -eq 0; then
- show_usage
- exit 1
-fi
-
-while test $# -gt 0; do
- case $1 in
- --usage) show_usage; exit 0;;
- --help) show_help; exit 0;;
-
- # Installation overrides
- --prefix=*) GTEST_PREFIX=${1#--prefix=};;
- --exec-prefix=*) GTEST_EXEC_PREFIX=${1#--exec-prefix=};;
- --libdir=*) GTEST_LIBDIR=${1#--libdir=};;
- --includedir=*) GTEST_INCLUDEDIR=${1#--includedir=};;
-
- # Installation queries
- --prefix|--exec-prefix|--libdir|--includedir|--version)
- if test -n "${do_query}"; then
- show_usage
- exit 1
- fi
- do_query=${1#--}
- ;;
-
- # Version checking
- --min-version=*)
- do_check_versions=yes
- min_version=${1#--min-version=}
- ;;
- --max-version=*)
- do_check_versions=yes
- max_version=${1#--max-version=}
- ;;
- --exact-version=*)
- do_check_versions=yes
- exact_version=${1#--exact-version=}
- ;;
-
- # Compiler flag output
- --cppflags) echo_cppflags=yes;;
- --cxxflags) echo_cxxflags=yes;;
- --ldflags) echo_ldflags=yes;;
- --libs) echo_libs=yes;;
-
- # Everything else is an error
- *) show_usage; exit 1;;
- esac
- shift
-done
-
-# These have defaults filled in by the configure script but can also be
-# overridden by environment variables or command line parameters.
-prefix="${GTEST_PREFIX:-@prefix@}"
-exec_prefix="${GTEST_EXEC_PREFIX:-@exec_prefix@}"
-libdir="${GTEST_LIBDIR:-@libdir@}"
-includedir="${GTEST_INCLUDEDIR:-@includedir@}"
-
-# We try and detect if our binary is not located at its installed location. If
-# it's not, we provide variables pointing to the source and build tree rather
-# than to the install tree. This allows building against a just-built gtest
-# rather than an installed gtest.
-bindir="@bindir@"
-this_relative_bindir=`dirname $0`
-this_bindir=`cd ${this_relative_bindir}; pwd -P`
-if test "${this_bindir}" = "${this_bindir%${bindir}}"; then
- # The path to the script doesn't end in the bindir sequence from Autoconf,
- # assume that we are in a build tree.
- build_dir=`dirname ${this_bindir}`
- src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P`
-
- # TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we
- # should work to remove it, and/or remove libtool altogether, replacing it
- # with direct references to the library and a link path.
- gtest_libs="${build_dir}/lib/libgtest.la @PTHREAD_CFLAGS@ @PTHREAD_LIBS@"
- gtest_ldflags=""
-
- # We provide hooks to include from either the source or build dir, where the
- # build dir is always preferred. This will potentially allow us to write
- # build rules for generated headers and have them automatically be preferred
- # over provided versions.
- gtest_cppflags="-I${build_dir}/include -I${src_dir}/include"
- gtest_cxxflags="@PTHREAD_CFLAGS@"
-else
- # We're using an installed gtest, although it may be staged under some
- # prefix. Assume (as our own libraries do) that we can resolve the prefix,
- # and are present in the dynamic link paths.
- gtest_ldflags="-L${libdir}"
- gtest_libs="-l${name} @PTHREAD_CFLAGS@ @PTHREAD_LIBS@"
- gtest_cppflags="-I${includedir}"
- gtest_cxxflags="@PTHREAD_CFLAGS@"
-fi
-
-# Do an installation query if requested.
-if test -n "$do_query"; then
- case $do_query in
- prefix) echo $prefix; exit 0;;
- exec-prefix) echo $exec_prefix; exit 0;;
- libdir) echo $libdir; exit 0;;
- includedir) echo $includedir; exit 0;;
- version) echo $version; exit 0;;
- *) show_usage; exit 1;;
- esac
-fi
-
-# Do a version check if requested.
-if test "$do_check_versions" = "yes"; then
- # Make sure we didn't receive a bad combination of parameters.
- test "$echo_cppflags" = "yes" && show_usage && exit 1
- test "$echo_cxxflags" = "yes" && show_usage && exit 1
- test "$echo_ldflags" = "yes" && show_usage && exit 1
- test "$echo_libs" = "yes" && show_usage && exit 1
-
- if test "$exact_version" != ""; then
- check_versions $exact_version $exact_version
- # unreachable
- else
- check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999}
- # unreachable
- fi
-fi
-
-# Do the output in the correct order so that these can be used in-line of
-# a compiler invocation.
-output=""
-test "$echo_cppflags" = "yes" && output="$output $gtest_cppflags"
-test "$echo_cxxflags" = "yes" && output="$output $gtest_cxxflags"
-test "$echo_ldflags" = "yes" && output="$output $gtest_ldflags"
-test "$echo_libs" = "yes" && output="$output $gtest_libs"
-echo $output
-
-exit 0
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/pump.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/pump.py
deleted file mode 100755
index 8afe80811..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/scripts/pump.py
+++ /dev/null
@@ -1,847 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""pump v0.2.0 - Pretty Useful for Meta Programming.
-
-A tool for preprocessor meta programming. Useful for generating
-repetitive boilerplate code. Especially useful for writing C++
-classes, functions, macros, and templates that need to work with
-various number of arguments.
-
-USAGE:
- pump.py SOURCE_FILE
-
-EXAMPLES:
- pump.py foo.cc.pump
- Converts foo.cc.pump to foo.cc.
-
-GRAMMAR:
- CODE ::= ATOMIC_CODE*
- ATOMIC_CODE ::= $var ID = EXPRESSION
- | $var ID = [[ CODE ]]
- | $range ID EXPRESSION..EXPRESSION
- | $for ID SEPARATOR [[ CODE ]]
- | $($)
- | $ID
- | $(EXPRESSION)
- | $if EXPRESSION [[ CODE ]] ELSE_BRANCH
- | [[ CODE ]]
- | RAW_CODE
- SEPARATOR ::= RAW_CODE | EMPTY
- ELSE_BRANCH ::= $else [[ CODE ]]
- | $elif EXPRESSION [[ CODE ]] ELSE_BRANCH
- | EMPTY
- EXPRESSION has Python syntax.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import sys
-
-
-TOKEN_TABLE = [
- (re.compile(r'\$var\s+'), '$var'),
- (re.compile(r'\$elif\s+'), '$elif'),
- (re.compile(r'\$else\s+'), '$else'),
- (re.compile(r'\$for\s+'), '$for'),
- (re.compile(r'\$if\s+'), '$if'),
- (re.compile(r'\$range\s+'), '$range'),
- (re.compile(r'\$[_A-Za-z]\w*'), '$id'),
- (re.compile(r'\$\(\$\)'), '$($)'),
- (re.compile(r'\$'), '$'),
- (re.compile(r'\[\[\n?'), '[['),
- (re.compile(r'\]\]\n?'), ']]'),
- ]
-
-
-class Cursor:
- """Represents a position (line and column) in a text file."""
-
- def __init__(self, line=-1, column=-1):
- self.line = line
- self.column = column
-
- def __eq__(self, rhs):
- return self.line == rhs.line and self.column == rhs.column
-
- def __ne__(self, rhs):
- return not self == rhs
-
- def __lt__(self, rhs):
- return self.line < rhs.line or (
- self.line == rhs.line and self.column < rhs.column)
-
- def __le__(self, rhs):
- return self < rhs or self == rhs
-
- def __gt__(self, rhs):
- return rhs < self
-
- def __ge__(self, rhs):
- return rhs <= self
-
- def __str__(self):
- if self == Eof():
- return 'EOF'
- else:
- return '%s(%s)' % (self.line + 1, self.column)
-
- def __add__(self, offset):
- return Cursor(self.line, self.column + offset)
-
- def __sub__(self, offset):
- return Cursor(self.line, self.column - offset)
-
- def Clone(self):
- """Returns a copy of self."""
-
- return Cursor(self.line, self.column)
-
-
-# Special cursor to indicate the end-of-file.
-def Eof():
- """Returns the special cursor to denote the end-of-file."""
- return Cursor(-1, -1)
-
-
-class Token:
- """Represents a token in a Pump source file."""
-
- def __init__(self, start=None, end=None, value=None, token_type=None):
- if start is None:
- self.start = Eof()
- else:
- self.start = start
- if end is None:
- self.end = Eof()
- else:
- self.end = end
- self.value = value
- self.token_type = token_type
-
- def __str__(self):
- return 'Token @%s: \'%s\' type=%s' % (
- self.start, self.value, self.token_type)
-
- def Clone(self):
- """Returns a copy of self."""
-
- return Token(self.start.Clone(), self.end.Clone(), self.value,
- self.token_type)
-
-
-def StartsWith(lines, pos, string):
- """Returns True iff the given position in lines starts with 'string'."""
-
- return lines[pos.line][pos.column:].startswith(string)
-
-
-def FindFirstInLine(line, token_table):
- best_match_start = -1
- for (regex, token_type) in token_table:
- m = regex.search(line)
- if m:
- # We found regex in lines
- if best_match_start < 0 or m.start() < best_match_start:
- best_match_start = m.start()
- best_match_length = m.end() - m.start()
- best_match_token_type = token_type
-
- if best_match_start < 0:
- return None
-
- return (best_match_start, best_match_length, best_match_token_type)
-
-
-def FindFirst(lines, token_table, cursor):
- """Finds the first occurrence of any string in strings in lines."""
-
- start = cursor.Clone()
- cur_line_number = cursor.line
- for line in lines[start.line:]:
- if cur_line_number == start.line:
- line = line[start.column:]
- m = FindFirstInLine(line, token_table)
- if m:
- # We found a regex in line.
- (start_column, length, token_type) = m
- if cur_line_number == start.line:
- start_column += start.column
- found_start = Cursor(cur_line_number, start_column)
- found_end = found_start + length
- return MakeToken(lines, found_start, found_end, token_type)
- cur_line_number += 1
- # We failed to find str in lines
- return None
-
-
-def SubString(lines, start, end):
- """Returns a substring in lines."""
-
- if end == Eof():
- end = Cursor(len(lines) - 1, len(lines[-1]))
-
- if start >= end:
- return ''
-
- if start.line == end.line:
- return lines[start.line][start.column:end.column]
-
- result_lines = ([lines[start.line][start.column:]] +
- lines[start.line + 1:end.line] +
- [lines[end.line][:end.column]])
- return ''.join(result_lines)
-
-
-def StripMetaComments(str):
- """Strip meta comments from each line in the given string."""
-
- # First, completely remove lines containing nothing but a meta
- # comment, including the trailing \n.
- str = re.sub(r'^\s*\$\$.*\n', '', str)
-
- # Then, remove meta comments from contentful lines.
- return re.sub(r'\s*\$\$.*', '', str)
-
-
-def MakeToken(lines, start, end, token_type):
- """Creates a new instance of Token."""
-
- return Token(start, end, SubString(lines, start, end), token_type)
-
-
-def ParseToken(lines, pos, regex, token_type):
- line = lines[pos.line][pos.column:]
- m = regex.search(line)
- if m and not m.start():
- return MakeToken(lines, pos, pos + m.end(), token_type)
- else:
- print 'ERROR: %s expected at %s.' % (token_type, pos)
- sys.exit(1)
-
-
-ID_REGEX = re.compile(r'[_A-Za-z]\w*')
-EQ_REGEX = re.compile(r'=')
-REST_OF_LINE_REGEX = re.compile(r'.*?(?=$|\$\$)')
-OPTIONAL_WHITE_SPACES_REGEX = re.compile(r'\s*')
-WHITE_SPACE_REGEX = re.compile(r'\s')
-DOT_DOT_REGEX = re.compile(r'\.\.')
-
-
-def Skip(lines, pos, regex):
- line = lines[pos.line][pos.column:]
- m = re.search(regex, line)
- if m and not m.start():
- return pos + m.end()
- else:
- return pos
-
-
-def SkipUntil(lines, pos, regex, token_type):
- line = lines[pos.line][pos.column:]
- m = re.search(regex, line)
- if m:
- return pos + m.start()
- else:
- print ('ERROR: %s expected on line %s after column %s.' %
- (token_type, pos.line + 1, pos.column))
- sys.exit(1)
-
-
-def ParseExpTokenInParens(lines, pos):
- def ParseInParens(pos):
- pos = Skip(lines, pos, OPTIONAL_WHITE_SPACES_REGEX)
- pos = Skip(lines, pos, r'\(')
- pos = Parse(pos)
- pos = Skip(lines, pos, r'\)')
- return pos
-
- def Parse(pos):
- pos = SkipUntil(lines, pos, r'\(|\)', ')')
- if SubString(lines, pos, pos + 1) == '(':
- pos = Parse(pos + 1)
- pos = Skip(lines, pos, r'\)')
- return Parse(pos)
- else:
- return pos
-
- start = pos.Clone()
- pos = ParseInParens(pos)
- return MakeToken(lines, start, pos, 'exp')
-
-
-def RStripNewLineFromToken(token):
- if token.value.endswith('\n'):
- return Token(token.start, token.end, token.value[:-1], token.token_type)
- else:
- return token
-
-
-def TokenizeLines(lines, pos):
- while True:
- found = FindFirst(lines, TOKEN_TABLE, pos)
- if not found:
- yield MakeToken(lines, pos, Eof(), 'code')
- return
-
- if found.start == pos:
- prev_token = None
- prev_token_rstripped = None
- else:
- prev_token = MakeToken(lines, pos, found.start, 'code')
- prev_token_rstripped = RStripNewLineFromToken(prev_token)
-
- if found.token_type == '$var':
- if prev_token_rstripped:
- yield prev_token_rstripped
- yield found
- id_token = ParseToken(lines, found.end, ID_REGEX, 'id')
- yield id_token
- pos = Skip(lines, id_token.end, OPTIONAL_WHITE_SPACES_REGEX)
-
- eq_token = ParseToken(lines, pos, EQ_REGEX, '=')
- yield eq_token
- pos = Skip(lines, eq_token.end, r'\s*')
-
- if SubString(lines, pos, pos + 2) != '[[':
- exp_token = ParseToken(lines, pos, REST_OF_LINE_REGEX, 'exp')
- yield exp_token
- pos = Cursor(exp_token.end.line + 1, 0)
- elif found.token_type == '$for':
- if prev_token_rstripped:
- yield prev_token_rstripped
- yield found
- id_token = ParseToken(lines, found.end, ID_REGEX, 'id')
- yield id_token
- pos = Skip(lines, id_token.end, WHITE_SPACE_REGEX)
- elif found.token_type == '$range':
- if prev_token_rstripped:
- yield prev_token_rstripped
- yield found
- id_token = ParseToken(lines, found.end, ID_REGEX, 'id')
- yield id_token
- pos = Skip(lines, id_token.end, OPTIONAL_WHITE_SPACES_REGEX)
-
- dots_pos = SkipUntil(lines, pos, DOT_DOT_REGEX, '..')
- yield MakeToken(lines, pos, dots_pos, 'exp')
- yield MakeToken(lines, dots_pos, dots_pos + 2, '..')
- pos = dots_pos + 2
- new_pos = Cursor(pos.line + 1, 0)
- yield MakeToken(lines, pos, new_pos, 'exp')
- pos = new_pos
- elif found.token_type == '$':
- if prev_token:
- yield prev_token
- yield found
- exp_token = ParseExpTokenInParens(lines, found.end)
- yield exp_token
- pos = exp_token.end
- elif (found.token_type == ']]' or found.token_type == '$if' or
- found.token_type == '$elif' or found.token_type == '$else'):
- if prev_token_rstripped:
- yield prev_token_rstripped
- yield found
- pos = found.end
- else:
- if prev_token:
- yield prev_token
- yield found
- pos = found.end
-
-
-def Tokenize(s):
- """A generator that yields the tokens in the given string."""
- if s != '':
- lines = s.splitlines(True)
- for token in TokenizeLines(lines, Cursor(0, 0)):
- yield token
-
-
-class CodeNode:
- def __init__(self, atomic_code_list=None):
- self.atomic_code = atomic_code_list
-
-
-class VarNode:
- def __init__(self, identifier=None, atomic_code=None):
- self.identifier = identifier
- self.atomic_code = atomic_code
-
-
-class RangeNode:
- def __init__(self, identifier=None, exp1=None, exp2=None):
- self.identifier = identifier
- self.exp1 = exp1
- self.exp2 = exp2
-
-
-class ForNode:
- def __init__(self, identifier=None, sep=None, code=None):
- self.identifier = identifier
- self.sep = sep
- self.code = code
-
-
-class ElseNode:
- def __init__(self, else_branch=None):
- self.else_branch = else_branch
-
-
-class IfNode:
- def __init__(self, exp=None, then_branch=None, else_branch=None):
- self.exp = exp
- self.then_branch = then_branch
- self.else_branch = else_branch
-
-
-class RawCodeNode:
- def __init__(self, token=None):
- self.raw_code = token
-
-
-class LiteralDollarNode:
- def __init__(self, token):
- self.token = token
-
-
-class ExpNode:
- def __init__(self, token, python_exp):
- self.token = token
- self.python_exp = python_exp
-
-
-def PopFront(a_list):
- head = a_list[0]
- a_list[:1] = []
- return head
-
-
-def PushFront(a_list, elem):
- a_list[:0] = [elem]
-
-
-def PopToken(a_list, token_type=None):
- token = PopFront(a_list)
- if token_type is not None and token.token_type != token_type:
- print 'ERROR: %s expected at %s' % (token_type, token.start)
- print 'ERROR: %s found instead' % (token,)
- sys.exit(1)
-
- return token
-
-
-def PeekToken(a_list):
- if not a_list:
- return None
-
- return a_list[0]
-
-
-def ParseExpNode(token):
- python_exp = re.sub(r'([_A-Za-z]\w*)', r'self.GetValue("\1")', token.value)
- return ExpNode(token, python_exp)
-
-
-def ParseElseNode(tokens):
- def Pop(token_type=None):
- return PopToken(tokens, token_type)
-
- next = PeekToken(tokens)
- if not next:
- return None
- if next.token_type == '$else':
- Pop('$else')
- Pop('[[')
- code_node = ParseCodeNode(tokens)
- Pop(']]')
- return code_node
- elif next.token_type == '$elif':
- Pop('$elif')
- exp = Pop('code')
- Pop('[[')
- code_node = ParseCodeNode(tokens)
- Pop(']]')
- inner_else_node = ParseElseNode(tokens)
- return CodeNode([IfNode(ParseExpNode(exp), code_node, inner_else_node)])
- elif not next.value.strip():
- Pop('code')
- return ParseElseNode(tokens)
- else:
- return None
-
-
-def ParseAtomicCodeNode(tokens):
- def Pop(token_type=None):
- return PopToken(tokens, token_type)
-
- head = PopFront(tokens)
- t = head.token_type
- if t == 'code':
- return RawCodeNode(head)
- elif t == '$var':
- id_token = Pop('id')
- Pop('=')
- next = PeekToken(tokens)
- if next.token_type == 'exp':
- exp_token = Pop()
- return VarNode(id_token, ParseExpNode(exp_token))
- Pop('[[')
- code_node = ParseCodeNode(tokens)
- Pop(']]')
- return VarNode(id_token, code_node)
- elif t == '$for':
- id_token = Pop('id')
- next_token = PeekToken(tokens)
- if next_token.token_type == 'code':
- sep_token = next_token
- Pop('code')
- else:
- sep_token = None
- Pop('[[')
- code_node = ParseCodeNode(tokens)
- Pop(']]')
- return ForNode(id_token, sep_token, code_node)
- elif t == '$if':
- exp_token = Pop('code')
- Pop('[[')
- code_node = ParseCodeNode(tokens)
- Pop(']]')
- else_node = ParseElseNode(tokens)
- return IfNode(ParseExpNode(exp_token), code_node, else_node)
- elif t == '$range':
- id_token = Pop('id')
- exp1_token = Pop('exp')
- Pop('..')
- exp2_token = Pop('exp')
- return RangeNode(id_token, ParseExpNode(exp1_token),
- ParseExpNode(exp2_token))
- elif t == '$id':
- return ParseExpNode(Token(head.start + 1, head.end, head.value[1:], 'id'))
- elif t == '$($)':
- return LiteralDollarNode(head)
- elif t == '$':
- exp_token = Pop('exp')
- return ParseExpNode(exp_token)
- elif t == '[[':
- code_node = ParseCodeNode(tokens)
- Pop(']]')
- return code_node
- else:
- PushFront(tokens, head)
- return None
-
-
-def ParseCodeNode(tokens):
- atomic_code_list = []
- while True:
- if not tokens:
- break
- atomic_code_node = ParseAtomicCodeNode(tokens)
- if atomic_code_node:
- atomic_code_list.append(atomic_code_node)
- else:
- break
- return CodeNode(atomic_code_list)
-
-
-def ParseToAST(pump_src_text):
- """Convert the given Pump source text into an AST."""
- tokens = list(Tokenize(pump_src_text))
- code_node = ParseCodeNode(tokens)
- return code_node
-
-
-class Env:
- def __init__(self):
- self.variables = []
- self.ranges = []
-
- def Clone(self):
- clone = Env()
- clone.variables = self.variables[:]
- clone.ranges = self.ranges[:]
- return clone
-
- def PushVariable(self, var, value):
- # If value looks like an int, store it as an int.
- try:
- int_value = int(value)
- if ('%s' % int_value) == value:
- value = int_value
- except Exception:
- pass
- self.variables[:0] = [(var, value)]
-
- def PopVariable(self):
- self.variables[:1] = []
-
- def PushRange(self, var, lower, upper):
- self.ranges[:0] = [(var, lower, upper)]
-
- def PopRange(self):
- self.ranges[:1] = []
-
- def GetValue(self, identifier):
- for (var, value) in self.variables:
- if identifier == var:
- return value
-
- print 'ERROR: meta variable %s is undefined.' % (identifier,)
- sys.exit(1)
-
- def EvalExp(self, exp):
- try:
- result = eval(exp.python_exp)
- except Exception, e:
- print 'ERROR: caught exception %s: %s' % (e.__class__.__name__, e)
- print ('ERROR: failed to evaluate meta expression %s at %s' %
- (exp.python_exp, exp.token.start))
- sys.exit(1)
- return result
-
- def GetRange(self, identifier):
- for (var, lower, upper) in self.ranges:
- if identifier == var:
- return (lower, upper)
-
- print 'ERROR: range %s is undefined.' % (identifier,)
- sys.exit(1)
-
-
-class Output:
- def __init__(self):
- self.string = ''
-
- def GetLastLine(self):
- index = self.string.rfind('\n')
- if index < 0:
- return ''
-
- return self.string[index + 1:]
-
- def Append(self, s):
- self.string += s
-
-
-def RunAtomicCode(env, node, output):
- if isinstance(node, VarNode):
- identifier = node.identifier.value.strip()
- result = Output()
- RunAtomicCode(env.Clone(), node.atomic_code, result)
- value = result.string
- env.PushVariable(identifier, value)
- elif isinstance(node, RangeNode):
- identifier = node.identifier.value.strip()
- lower = int(env.EvalExp(node.exp1))
- upper = int(env.EvalExp(node.exp2))
- env.PushRange(identifier, lower, upper)
- elif isinstance(node, ForNode):
- identifier = node.identifier.value.strip()
- if node.sep is None:
- sep = ''
- else:
- sep = node.sep.value
- (lower, upper) = env.GetRange(identifier)
- for i in range(lower, upper + 1):
- new_env = env.Clone()
- new_env.PushVariable(identifier, i)
- RunCode(new_env, node.code, output)
- if i != upper:
- output.Append(sep)
- elif isinstance(node, RawCodeNode):
- output.Append(node.raw_code.value)
- elif isinstance(node, IfNode):
- cond = env.EvalExp(node.exp)
- if cond:
- RunCode(env.Clone(), node.then_branch, output)
- elif node.else_branch is not None:
- RunCode(env.Clone(), node.else_branch, output)
- elif isinstance(node, ExpNode):
- value = env.EvalExp(node)
- output.Append('%s' % (value,))
- elif isinstance(node, LiteralDollarNode):
- output.Append('$')
- elif isinstance(node, CodeNode):
- RunCode(env.Clone(), node, output)
- else:
- print 'BAD'
- print node
- sys.exit(1)
-
-
-def RunCode(env, code_node, output):
- for atomic_code in code_node.atomic_code:
- RunAtomicCode(env, atomic_code, output)
-
-
-def IsComment(cur_line):
- return '//' in cur_line
-
-
-def IsInPreprocessorDirevative(prev_lines, cur_line):
- if cur_line.lstrip().startswith('#'):
- return True
- return prev_lines != [] and prev_lines[-1].endswith('\\')
-
-
-def WrapComment(line, output):
- loc = line.find('//')
- before_comment = line[:loc].rstrip()
- if before_comment == '':
- indent = loc
- else:
- output.append(before_comment)
- indent = len(before_comment) - len(before_comment.lstrip())
- prefix = indent*' ' + '// '
- max_len = 80 - len(prefix)
- comment = line[loc + 2:].strip()
- segs = [seg for seg in re.split(r'(\w+\W*)', comment) if seg != '']
- cur_line = ''
- for seg in segs:
- if len((cur_line + seg).rstrip()) < max_len:
- cur_line += seg
- else:
- if cur_line.strip() != '':
- output.append(prefix + cur_line.rstrip())
- cur_line = seg.lstrip()
- if cur_line.strip() != '':
- output.append(prefix + cur_line.strip())
-
-
-def WrapCode(line, line_concat, output):
- indent = len(line) - len(line.lstrip())
- prefix = indent*' ' # Prefix of the current line
- max_len = 80 - indent - len(line_concat) # Maximum length of the current line
- new_prefix = prefix + 4*' ' # Prefix of a continuation line
- new_max_len = max_len - 4 # Maximum length of a continuation line
- # Prefers to wrap a line after a ',' or ';'.
- segs = [seg for seg in re.split(r'([^,;]+[,;]?)', line.strip()) if seg != '']
- cur_line = '' # The current line without leading spaces.
- for seg in segs:
- # If the line is still too long, wrap at a space.
- while cur_line == '' and len(seg.strip()) > max_len:
- seg = seg.lstrip()
- split_at = seg.rfind(' ', 0, max_len)
- output.append(prefix + seg[:split_at].strip() + line_concat)
- seg = seg[split_at + 1:]
- prefix = new_prefix
- max_len = new_max_len
-
- if len((cur_line + seg).rstrip()) < max_len:
- cur_line = (cur_line + seg).lstrip()
- else:
- output.append(prefix + cur_line.rstrip() + line_concat)
- prefix = new_prefix
- max_len = new_max_len
- cur_line = seg.lstrip()
- if cur_line.strip() != '':
- output.append(prefix + cur_line.strip())
-
-
-def WrapPreprocessorDirevative(line, output):
- WrapCode(line, ' \\', output)
-
-
-def WrapPlainCode(line, output):
- WrapCode(line, '', output)
-
-
-def IsHeaderGuardOrInclude(line):
- return (re.match(r'^#(ifndef|define|endif\s*//)\s*[\w_]+\s*$', line) or
- re.match(r'^#include\s', line))
-
-
-def WrapLongLine(line, output):
- line = line.rstrip()
- if len(line) <= 80:
- output.append(line)
- elif IsComment(line):
- if IsHeaderGuardOrInclude(line):
- # The style guide made an exception to allow long header guard lines
- # and includes.
- output.append(line)
- else:
- WrapComment(line, output)
- elif IsInPreprocessorDirevative(output, line):
- if IsHeaderGuardOrInclude(line):
- # The style guide made an exception to allow long header guard lines
- # and includes.
- output.append(line)
- else:
- WrapPreprocessorDirevative(line, output)
- else:
- WrapPlainCode(line, output)
-
-
-def BeautifyCode(string):
- lines = string.splitlines()
- output = []
- for line in lines:
- WrapLongLine(line, output)
- output2 = [line.rstrip() for line in output]
- return '\n'.join(output2) + '\n'
-
-
-def ConvertFromPumpSource(src_text):
- """Return the text generated from the given Pump source text."""
- ast = ParseToAST(StripMetaComments(src_text))
- output = Output()
- RunCode(Env(), ast, output)
- return BeautifyCode(output.string)
-
-
-def main(argv):
- if len(argv) == 1:
- print __doc__
- sys.exit(1)
-
- file_path = argv[-1]
- output_str = ConvertFromPumpSource(file(file_path, 'r').read())
- if file_path.endswith('.pump'):
- output_file_path = file_path[:-5]
- else:
- output_file_path = '-'
- if output_file_path == '-':
- print output_str,
- else:
- output_file = file(output_file_path, 'w')
- output_file.write('// This file was GENERATED by command:\n')
- output_file.write('// %s %s\n' %
- (os.path.basename(__file__), os.path.basename(file_path)))
- output_file.write('// DO NOT EDIT BY HAND!!!\n\n')
- output_file.write(output_str)
- output_file.close()
-
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-all.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-all.cc
deleted file mode 100644
index 0a9cee522..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-all.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// Google C++ Testing Framework (Google Test)
-//
-// Sometimes it's desirable to build Google Test by compiling a single file.
-// This file serves this purpose.
-
-// This line ensures that gtest.h can be compiled on its own, even
-// when it's fused.
-#include "gtest/gtest.h"
-
-// The following lines pull in the real gtest *.cc files.
-#include "src/gtest.cc"
-#include "src/gtest-death-test.cc"
-#include "src/gtest-filepath.cc"
-#include "src/gtest-port.cc"
-#include "src/gtest-printers.cc"
-#include "src/gtest-test-part.cc"
-#include "src/gtest-typed-test.cc"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-death-test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-death-test.cc
deleted file mode 100644
index 8b2e4131c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-death-test.cc
+++ /dev/null
@@ -1,1234 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev)
-//
-// This file implements death tests.
-
-#include "gtest/gtest-death-test.h"
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_HAS_DEATH_TEST
-
-# if GTEST_OS_MAC
-# include <crt_externs.h>
-# endif // GTEST_OS_MAC
-
-# include <errno.h>
-# include <fcntl.h>
-# include <limits.h>
-# include <stdarg.h>
-
-# if GTEST_OS_WINDOWS
-# include <windows.h>
-# else
-# include <sys/mman.h>
-# include <sys/wait.h>
-# endif // GTEST_OS_WINDOWS
-
-#endif // GTEST_HAS_DEATH_TEST
-
-#include "gtest/gtest-message.h"
-#include "gtest/internal/gtest-string.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-// Constants.
-
-// The default death test style.
-static const char kDefaultDeathTestStyle[] = "fast";
-
-GTEST_DEFINE_string_(
- death_test_style,
- internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle),
- "Indicates how to run a death test in a forked child process: "
- "\"threadsafe\" (child process re-executes the test binary "
- "from the beginning, running only the specific death test) or "
- "\"fast\" (child process runs the death test immediately "
- "after forking).");
-
-GTEST_DEFINE_bool_(
- death_test_use_fork,
- internal::BoolFromGTestEnv("death_test_use_fork", false),
- "Instructs to use fork()/_exit() instead of clone() in death tests. "
- "Ignored and always uses fork() on POSIX systems where clone() is not "
- "implemented. Useful when running under valgrind or similar tools if "
- "those do not support clone(). Valgrind 3.3.1 will just fail if "
- "it sees an unsupported combination of clone() flags. "
- "It is not recommended to use this flag w/o valgrind though it will "
- "work in 99% of the cases. Once valgrind is fixed, this flag will "
- "most likely be removed.");
-
-namespace internal {
-GTEST_DEFINE_string_(
- internal_run_death_test, "",
- "Indicates the file, line number, temporal index of "
- "the single death test to run, and a file descriptor to "
- "which a success code may be sent, all separated by "
- "colons. This flag is specified if and only if the current "
- "process is a sub-process launched for running a thread-safe "
- "death test. FOR INTERNAL USE ONLY.");
-} // namespace internal
-
-#if GTEST_HAS_DEATH_TEST
-
-// ExitedWithCode constructor.
-ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) {
-}
-
-// ExitedWithCode function-call operator.
-bool ExitedWithCode::operator()(int exit_status) const {
-# if GTEST_OS_WINDOWS
-
- return exit_status == exit_code_;
-
-# else
-
- return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;
-
-# endif // GTEST_OS_WINDOWS
-}
-
-# if !GTEST_OS_WINDOWS
-// KilledBySignal constructor.
-KilledBySignal::KilledBySignal(int signum) : signum_(signum) {
-}
-
-// KilledBySignal function-call operator.
-bool KilledBySignal::operator()(int exit_status) const {
- return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_;
-}
-# endif // !GTEST_OS_WINDOWS
-
-namespace internal {
-
-// Utilities needed for death tests.
-
-// Generates a textual description of a given exit code, in the format
-// specified by wait(2).
-static String ExitSummary(int exit_code) {
- Message m;
-
-# if GTEST_OS_WINDOWS
-
- m << "Exited with exit status " << exit_code;
-
-# else
-
- if (WIFEXITED(exit_code)) {
- m << "Exited with exit status " << WEXITSTATUS(exit_code);
- } else if (WIFSIGNALED(exit_code)) {
- m << "Terminated by signal " << WTERMSIG(exit_code);
- }
-# ifdef WCOREDUMP
- if (WCOREDUMP(exit_code)) {
- m << " (core dumped)";
- }
-# endif
-# endif // GTEST_OS_WINDOWS
-
- return m.GetString();
-}
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-bool ExitedUnsuccessfully(int exit_status) {
- return !ExitedWithCode(0)(exit_status);
-}
-
-# if !GTEST_OS_WINDOWS
-// Generates a textual failure message when a death test finds more than
-// one thread running, or cannot determine the number of threads, prior
-// to executing the given statement. It is the responsibility of the
-// caller not to pass a thread_count of 1.
-static String DeathTestThreadWarning(size_t thread_count) {
- Message msg;
- msg << "Death tests use fork(), which is unsafe particularly"
- << " in a threaded context. For this test, " << GTEST_NAME_ << " ";
- if (thread_count == 0)
- msg << "couldn't detect the number of threads.";
- else
- msg << "detected " << thread_count << " threads.";
- return msg.GetString();
-}
-# endif // !GTEST_OS_WINDOWS
-
-// Flag characters for reporting a death test that did not die.
-static const char kDeathTestLived = 'L';
-static const char kDeathTestReturned = 'R';
-static const char kDeathTestThrew = 'T';
-static const char kDeathTestInternalError = 'I';
-
-// An enumeration describing all of the possible ways that a death test can
-// conclude. DIED means that the process died while executing the test
-// code; LIVED means that process lived beyond the end of the test code;
-// RETURNED means that the test statement attempted to execute a return
-// statement, which is not allowed; THREW means that the test statement
-// returned control by throwing an exception. IN_PROGRESS means the test
-// has not yet concluded.
-// TODO(vladl@google.com): Unify names and possibly values for
-// AbortReason, DeathTestOutcome, and flag characters above.
-enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };
-
-// Routine for aborting the program which is safe to call from an
-// exec-style death test child process, in which case the error
-// message is propagated back to the parent process. Otherwise, the
-// message is simply printed to stderr. In either case, the program
-// then exits with status 1.
-void DeathTestAbort(const String& message) {
- // On a POSIX system, this function may be called from a threadsafe-style
- // death test child process, which operates on a very small stack. Use
- // the heap for any additional non-minuscule memory requirements.
- const InternalRunDeathTestFlag* const flag =
- GetUnitTestImpl()->internal_run_death_test_flag();
- if (flag != NULL) {
- FILE* parent = posix::FDOpen(flag->write_fd(), "w");
- fputc(kDeathTestInternalError, parent);
- fprintf(parent, "%s", message.c_str());
- fflush(parent);
- _exit(1);
- } else {
- fprintf(stderr, "%s", message.c_str());
- fflush(stderr);
- posix::Abort();
- }
-}
-
-// A replacement for CHECK that calls DeathTestAbort if the assertion
-// fails.
-# define GTEST_DEATH_TEST_CHECK_(expression) \
- do { \
- if (!::testing::internal::IsTrue(expression)) { \
- DeathTestAbort(::testing::internal::String::Format( \
- "CHECK failed: File %s, line %d: %s", \
- __FILE__, __LINE__, #expression)); \
- } \
- } while (::testing::internal::AlwaysFalse())
-
-// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for
-// evaluating any system call that fulfills two conditions: it must return
-// -1 on failure, and set errno to EINTR when it is interrupted and
-// should be tried again. The macro expands to a loop that repeatedly
-// evaluates the expression as long as it evaluates to -1 and sets
-// errno to EINTR. If the expression evaluates to -1 but errno is
-// something other than EINTR, DeathTestAbort is called.
-# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \
- do { \
- int gtest_retval; \
- do { \
- gtest_retval = (expression); \
- } while (gtest_retval == -1 && errno == EINTR); \
- if (gtest_retval == -1) { \
- DeathTestAbort(::testing::internal::String::Format( \
- "CHECK failed: File %s, line %d: %s != -1", \
- __FILE__, __LINE__, #expression)); \
- } \
- } while (::testing::internal::AlwaysFalse())
-
-// Returns the message describing the last system error in errno.
-String GetLastErrnoDescription() {
- return String(errno == 0 ? "" : posix::StrError(errno));
-}
-
-// This is called from a death test parent process to read a failure
-// message from the death test child process and log it with the FATAL
-// severity. On Windows, the message is read from a pipe handle. On other
-// platforms, it is read from a file descriptor.
-static void FailFromInternalError(int fd) {
- Message error;
- char buffer[256];
- int num_read;
-
- do {
- while ((num_read = posix::Read(fd, buffer, 255)) > 0) {
- buffer[num_read] = '\0';
- error << buffer;
- }
- } while (num_read == -1 && errno == EINTR);
-
- if (num_read == 0) {
- GTEST_LOG_(FATAL) << error.GetString();
- } else {
- const int last_error = errno;
- GTEST_LOG_(FATAL) << "Error while reading death test internal: "
- << GetLastErrnoDescription() << " [" << last_error << "]";
- }
-}
-
-// Death test constructor. Increments the running death test count
-// for the current test.
-DeathTest::DeathTest() {
- TestInfo* const info = GetUnitTestImpl()->current_test_info();
- if (info == NULL) {
- DeathTestAbort("Cannot run a death test outside of a TEST or "
- "TEST_F construct");
- }
-}
-
-// Creates and returns a death test by dispatching to the current
-// death test factory.
-bool DeathTest::Create(const char* statement, const RE* regex,
- const char* file, int line, DeathTest** test) {
- return GetUnitTestImpl()->death_test_factory()->Create(
- statement, regex, file, line, test);
-}
-
-const char* DeathTest::LastMessage() {
- return last_death_test_message_.c_str();
-}
-
-void DeathTest::set_last_death_test_message(const String& message) {
- last_death_test_message_ = message;
-}
-
-String DeathTest::last_death_test_message_;
-
-// Provides cross platform implementation for some death functionality.
-class DeathTestImpl : public DeathTest {
- protected:
- DeathTestImpl(const char* a_statement, const RE* a_regex)
- : statement_(a_statement),
- regex_(a_regex),
- spawned_(false),
- status_(-1),
- outcome_(IN_PROGRESS),
- read_fd_(-1),
- write_fd_(-1) {}
-
- // read_fd_ is expected to be closed and cleared by a derived class.
- ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); }
-
- void Abort(AbortReason reason);
- virtual bool Passed(bool status_ok);
-
- const char* statement() const { return statement_; }
- const RE* regex() const { return regex_; }
- bool spawned() const { return spawned_; }
- void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
- int status() const { return status_; }
- void set_status(int a_status) { status_ = a_status; }
- DeathTestOutcome outcome() const { return outcome_; }
- void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; }
- int read_fd() const { return read_fd_; }
- void set_read_fd(int fd) { read_fd_ = fd; }
- int write_fd() const { return write_fd_; }
- void set_write_fd(int fd) { write_fd_ = fd; }
-
- // Called in the parent process only. Reads the result code of the death
- // test child process via a pipe, interprets it to set the outcome_
- // member, and closes read_fd_. Outputs diagnostics and terminates in
- // case of unexpected codes.
- void ReadAndInterpretStatusByte();
-
- private:
- // The textual content of the code this object is testing. This class
- // doesn't own this string and should not attempt to delete it.
- const char* const statement_;
- // The regular expression which test output must match. DeathTestImpl
- // doesn't own this object and should not attempt to delete it.
- const RE* const regex_;
- // True if the death test child process has been successfully spawned.
- bool spawned_;
- // The exit status of the child process.
- int status_;
- // How the death test concluded.
- DeathTestOutcome outcome_;
- // Descriptor to the read end of the pipe to the child process. It is
- // always -1 in the child process. The child keeps its write end of the
- // pipe in write_fd_.
- int read_fd_;
- // Descriptor to the child's write end of the pipe to the parent process.
- // It is always -1 in the parent process. The parent keeps its end of the
- // pipe in read_fd_.
- int write_fd_;
-};
-
-// Called in the parent process only. Reads the result code of the death
-// test child process via a pipe, interprets it to set the outcome_
-// member, and closes read_fd_. Outputs diagnostics and terminates in
-// case of unexpected codes.
-void DeathTestImpl::ReadAndInterpretStatusByte() {
- char flag;
- int bytes_read;
-
- // The read() here blocks until data is available (signifying the
- // failure of the death test) or until the pipe is closed (signifying
- // its success), so it's okay to call this in the parent before
- // the child process has exited.
- do {
- bytes_read = posix::Read(read_fd(), &flag, 1);
- } while (bytes_read == -1 && errno == EINTR);
-
- if (bytes_read == 0) {
- set_outcome(DIED);
- } else if (bytes_read == 1) {
- switch (flag) {
- case kDeathTestReturned:
- set_outcome(RETURNED);
- break;
- case kDeathTestThrew:
- set_outcome(THREW);
- break;
- case kDeathTestLived:
- set_outcome(LIVED);
- break;
- case kDeathTestInternalError:
- FailFromInternalError(read_fd()); // Does not return.
- break;
- default:
- GTEST_LOG_(FATAL) << "Death test child process reported "
- << "unexpected status byte ("
- << static_cast<unsigned int>(flag) << ")";
- }
- } else {
- GTEST_LOG_(FATAL) << "Read from death test child process failed: "
- << GetLastErrnoDescription();
- }
- GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));
- set_read_fd(-1);
-}
-
-// Signals that the death test code which should have exited, didn't.
-// Should be called only in a death test child process.
-// Writes a status byte to the child's status file descriptor, then
-// calls _exit(1).
-void DeathTestImpl::Abort(AbortReason reason) {
- // The parent process considers the death test to be a failure if
- // it finds any data in our pipe. So, here we write a single flag byte
- // to the pipe, then exit.
- const char status_ch =
- reason == TEST_DID_NOT_DIE ? kDeathTestLived :
- reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned;
-
- GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1));
- // We are leaking the descriptor here because on some platforms (i.e.,
- // when built as Windows DLL), destructors of global objects will still
- // run after calling _exit(). On such systems, write_fd_ will be
- // indirectly closed from the destructor of UnitTestImpl, causing double
- // close if it is also closed here. On debug configurations, double close
- // may assert. As there are no in-process buffers to flush here, we are
- // relying on the OS to close the descriptor after the process terminates
- // when the destructors are not run.
- _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash)
-}
-
-// Returns an indented copy of stderr output for a death test.
-// This makes distinguishing death test output lines from regular log lines
-// much easier.
-static ::std::string FormatDeathTestOutput(const ::std::string& output) {
- ::std::string ret;
- for (size_t at = 0; ; ) {
- const size_t line_end = output.find('\n', at);
- ret += "[ DEATH ] ";
- if (line_end == ::std::string::npos) {
- ret += output.substr(at);
- break;
- }
- ret += output.substr(at, line_end + 1 - at);
- at = line_end + 1;
- }
- return ret;
-}
-
-// Assesses the success or failure of a death test, using both private
-// members which have previously been set, and one argument:
-//
-// Private data members:
-// outcome: An enumeration describing how the death test
-// concluded: DIED, LIVED, THREW, or RETURNED. The death test
-// fails in the latter three cases.
-// status: The exit status of the child process. On *nix, it is in the
-// in the format specified by wait(2). On Windows, this is the
-// value supplied to the ExitProcess() API or a numeric code
-// of the exception that terminated the program.
-// regex: A regular expression object to be applied to
-// the test's captured standard error output; the death test
-// fails if it does not match.
-//
-// Argument:
-// status_ok: true if exit_status is acceptable in the context of
-// this particular death test, which fails if it is false
-//
-// Returns true iff all of the above conditions are met. Otherwise, the
-// first failing condition, in the order given above, is the one that is
-// reported. Also sets the last death test message string.
-bool DeathTestImpl::Passed(bool status_ok) {
- if (!spawned())
- return false;
-
- const String error_message = GetCapturedStderr();
-
- bool success = false;
- Message buffer;
-
- buffer << "Death test: " << statement() << "\n";
- switch (outcome()) {
- case LIVED:
- buffer << " Result: failed to die.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case THREW:
- buffer << " Result: threw an exception.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case RETURNED:
- buffer << " Result: illegal return in test statement.\n"
- << " Error msg:\n" << FormatDeathTestOutput(error_message);
- break;
- case DIED:
- if (status_ok) {
- const bool matched = RE::PartialMatch(error_message.c_str(), *regex());
- if (matched) {
- success = true;
- } else {
- buffer << " Result: died but not with expected error.\n"
- << " Expected: " << regex()->pattern() << "\n"
- << "Actual msg:\n" << FormatDeathTestOutput(error_message);
- }
- } else {
- buffer << " Result: died but not with expected exit code:\n"
- << " " << ExitSummary(status()) << "\n"
- << "Actual msg:\n" << FormatDeathTestOutput(error_message);
- }
- break;
- case IN_PROGRESS:
- default:
- GTEST_LOG_(FATAL)
- << "DeathTest::Passed somehow called before conclusion of test";
- }
-
- DeathTest::set_last_death_test_message(buffer.GetString());
- return success;
-}
-
-# if GTEST_OS_WINDOWS
-// WindowsDeathTest implements death tests on Windows. Due to the
-// specifics of starting new processes on Windows, death tests there are
-// always threadsafe, and Google Test considers the
-// --gtest_death_test_style=fast setting to be equivalent to
-// --gtest_death_test_style=threadsafe there.
-//
-// A few implementation notes: Like the Linux version, the Windows
-// implementation uses pipes for child-to-parent communication. But due to
-// the specifics of pipes on Windows, some extra steps are required:
-//
-// 1. The parent creates a communication pipe and stores handles to both
-// ends of it.
-// 2. The parent starts the child and provides it with the information
-// necessary to acquire the handle to the write end of the pipe.
-// 3. The child acquires the write end of the pipe and signals the parent
-// using a Windows event.
-// 4. Now the parent can release the write end of the pipe on its side. If
-// this is done before step 3, the object's reference count goes down to
-// 0 and it is destroyed, preventing the child from acquiring it. The
-// parent now has to release it, or read operations on the read end of
-// the pipe will not return when the child terminates.
-// 5. The parent reads child's output through the pipe (outcome code and
-// any possible error messages) from the pipe, and its stderr and then
-// determines whether to fail the test.
-//
-// Note: to distinguish Win32 API calls from the local method and function
-// calls, the former are explicitly resolved in the global namespace.
-//
-class WindowsDeathTest : public DeathTestImpl {
- public:
- WindowsDeathTest(const char* a_statement,
- const RE* a_regex,
- const char* file,
- int line)
- : DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {}
-
- // All of these virtual functions are inherited from DeathTest.
- virtual int Wait();
- virtual TestRole AssumeRole();
-
- private:
- // The name of the file in which the death test is located.
- const char* const file_;
- // The line number on which the death test is located.
- const int line_;
- // Handle to the write end of the pipe to the child process.
- AutoHandle write_handle_;
- // Child process handle.
- AutoHandle child_handle_;
- // Event the child process uses to signal the parent that it has
- // acquired the handle to the write end of the pipe. After seeing this
- // event the parent can release its own handles to make sure its
- // ReadFile() calls return when the child terminates.
- AutoHandle event_handle_;
-};
-
-// Waits for the child in a death test to exit, returning its exit
-// status, or 0 if no child process exists. As a side effect, sets the
-// outcome data member.
-int WindowsDeathTest::Wait() {
- if (!spawned())
- return 0;
-
- // Wait until the child either signals that it has acquired the write end
- // of the pipe or it dies.
- const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };
- switch (::WaitForMultipleObjects(2,
- wait_handles,
- FALSE, // Waits for any of the handles.
- INFINITE)) {
- case WAIT_OBJECT_0:
- case WAIT_OBJECT_0 + 1:
- break;
- default:
- GTEST_DEATH_TEST_CHECK_(false); // Should not get here.
- }
-
- // The child has acquired the write end of the pipe or exited.
- // We release the handle on our side and continue.
- write_handle_.Reset();
- event_handle_.Reset();
-
- ReadAndInterpretStatusByte();
-
- // Waits for the child process to exit if it haven't already. This
- // returns immediately if the child has already exited, regardless of
- // whether previous calls to WaitForMultipleObjects synchronized on this
- // handle or not.
- GTEST_DEATH_TEST_CHECK_(
- WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),
- INFINITE));
- DWORD status_code;
- GTEST_DEATH_TEST_CHECK_(
- ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);
- child_handle_.Reset();
- set_status(static_cast<int>(status_code));
- return status();
-}
-
-// The AssumeRole process for a Windows death test. It creates a child
-// process with the same executable as the current process to run the
-// death test. The child process is given the --gtest_filter and
-// --gtest_internal_run_death_test flags such that it knows to run the
-// current death test only.
-DeathTest::TestRole WindowsDeathTest::AssumeRole() {
- const UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const TestInfo* const info = impl->current_test_info();
- const int death_test_index = info->result()->death_test_count();
-
- if (flag != NULL) {
- // ParseInternalRunDeathTestFlag() has performed all the necessary
- // processing.
- set_write_fd(flag->write_fd());
- return EXECUTE_TEST;
- }
-
- // WindowsDeathTest uses an anonymous pipe to communicate results of
- // a death test.
- SECURITY_ATTRIBUTES handles_are_inheritable = {
- sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
- HANDLE read_handle, write_handle;
- GTEST_DEATH_TEST_CHECK_(
- ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable,
- 0) // Default buffer size.
- != FALSE);
- set_read_fd(::_open_osfhandle(reinterpret_cast<intptr_t>(read_handle),
- O_RDONLY));
- write_handle_.Reset(write_handle);
- event_handle_.Reset(::CreateEvent(
- &handles_are_inheritable,
- TRUE, // The event will automatically reset to non-signaled state.
- FALSE, // The initial state is non-signalled.
- NULL)); // The even is unnamed.
- GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL);
- const String filter_flag = String::Format("--%s%s=%s.%s",
- GTEST_FLAG_PREFIX_, kFilterFlag,
- info->test_case_name(),
- info->name());
- const String internal_flag = String::Format(
- "--%s%s=%s|%d|%d|%u|%Iu|%Iu",
- GTEST_FLAG_PREFIX_,
- kInternalRunDeathTestFlag,
- file_, line_,
- death_test_index,
- static_cast<unsigned int>(::GetCurrentProcessId()),
- // size_t has the same with as pointers on both 32-bit and 64-bit
- // Windows platforms.
- // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx.
- reinterpret_cast<size_t>(write_handle),
- reinterpret_cast<size_t>(event_handle_.Get()));
-
- char executable_path[_MAX_PATH + 1]; // NOLINT
- GTEST_DEATH_TEST_CHECK_(
- _MAX_PATH + 1 != ::GetModuleFileNameA(NULL,
- executable_path,
- _MAX_PATH));
-
- String command_line = String::Format("%s %s \"%s\"",
- ::GetCommandLineA(),
- filter_flag.c_str(),
- internal_flag.c_str());
-
- DeathTest::set_last_death_test_message("");
-
- CaptureStderr();
- // Flush the log buffers since the log streams are shared with the child.
- FlushInfoLog();
-
- // The child process will share the standard handles with the parent.
- STARTUPINFOA startup_info;
- memset(&startup_info, 0, sizeof(STARTUPINFO));
- startup_info.dwFlags = STARTF_USESTDHANDLES;
- startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE);
- startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);
- startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE);
-
- PROCESS_INFORMATION process_info;
- GTEST_DEATH_TEST_CHECK_(::CreateProcessA(
- executable_path,
- const_cast<char*>(command_line.c_str()),
- NULL, // Retuned process handle is not inheritable.
- NULL, // Retuned thread handle is not inheritable.
- TRUE, // Child inherits all inheritable handles (for write_handle_).
- 0x0, // Default creation flags.
- NULL, // Inherit the parent's environment.
- UnitTest::GetInstance()->original_working_dir(),
- &startup_info,
- &process_info) != FALSE);
- child_handle_.Reset(process_info.hProcess);
- ::CloseHandle(process_info.hThread);
- set_spawned(true);
- return OVERSEE_TEST;
-}
-# else // We are not on Windows.
-
-// ForkingDeathTest provides implementations for most of the abstract
-// methods of the DeathTest interface. Only the AssumeRole method is
-// left undefined.
-class ForkingDeathTest : public DeathTestImpl {
- public:
- ForkingDeathTest(const char* statement, const RE* regex);
-
- // All of these virtual functions are inherited from DeathTest.
- virtual int Wait();
-
- protected:
- void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
-
- private:
- // PID of child process during death test; 0 in the child process itself.
- pid_t child_pid_;
-};
-
-// Constructs a ForkingDeathTest.
-ForkingDeathTest::ForkingDeathTest(const char* a_statement, const RE* a_regex)
- : DeathTestImpl(a_statement, a_regex),
- child_pid_(-1) {}
-
-// Waits for the child in a death test to exit, returning its exit
-// status, or 0 if no child process exists. As a side effect, sets the
-// outcome data member.
-int ForkingDeathTest::Wait() {
- if (!spawned())
- return 0;
-
- ReadAndInterpretStatusByte();
-
- int status_value;
- GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0));
- set_status(status_value);
- return status_value;
-}
-
-// A concrete death test class that forks, then immediately runs the test
-// in the child process.
-class NoExecDeathTest : public ForkingDeathTest {
- public:
- NoExecDeathTest(const char* a_statement, const RE* a_regex) :
- ForkingDeathTest(a_statement, a_regex) { }
- virtual TestRole AssumeRole();
-};
-
-// The AssumeRole process for a fork-and-run death test. It implements a
-// straightforward fork, with a simple pipe to transmit the status byte.
-DeathTest::TestRole NoExecDeathTest::AssumeRole() {
- const size_t thread_count = GetThreadCount();
- if (thread_count != 1) {
- GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count);
- }
-
- int pipe_fd[2];
- GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
-
- DeathTest::set_last_death_test_message("");
- CaptureStderr();
- // When we fork the process below, the log file buffers are copied, but the
- // file descriptors are shared. We flush all log files here so that closing
- // the file descriptors in the child process doesn't throw off the
- // synchronization between descriptors and buffers in the parent process.
- // This is as close to the fork as possible to avoid a race condition in case
- // there are multiple threads running before the death test, and another
- // thread writes to the log file.
- FlushInfoLog();
-
- const pid_t child_pid = fork();
- GTEST_DEATH_TEST_CHECK_(child_pid != -1);
- set_child_pid(child_pid);
- if (child_pid == 0) {
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0]));
- set_write_fd(pipe_fd[1]);
- // Redirects all logging to stderr in the child process to prevent
- // concurrent writes to the log files. We capture stderr in the parent
- // process and append the child process' output to a log.
- LogToStderr();
- // Event forwarding to the listeners of event listener API mush be shut
- // down in death test subprocesses.
- GetUnitTestImpl()->listeners()->SuppressEventForwarding();
- return EXECUTE_TEST;
- } else {
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
- set_read_fd(pipe_fd[0]);
- set_spawned(true);
- return OVERSEE_TEST;
- }
-}
-
-// A concrete death test class that forks and re-executes the main
-// program from the beginning, with command-line flags set that cause
-// only this specific death test to be run.
-class ExecDeathTest : public ForkingDeathTest {
- public:
- ExecDeathTest(const char* a_statement, const RE* a_regex,
- const char* file, int line) :
- ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }
- virtual TestRole AssumeRole();
- private:
- // The name of the file in which the death test is located.
- const char* const file_;
- // The line number on which the death test is located.
- const int line_;
-};
-
-// Utility class for accumulating command-line arguments.
-class Arguments {
- public:
- Arguments() {
- args_.push_back(NULL);
- }
-
- ~Arguments() {
- for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();
- ++i) {
- free(*i);
- }
- }
- void AddArgument(const char* argument) {
- args_.insert(args_.end() - 1, posix::StrDup(argument));
- }
-
- template <typename Str>
- void AddArguments(const ::std::vector<Str>& arguments) {
- for (typename ::std::vector<Str>::const_iterator i = arguments.begin();
- i != arguments.end();
- ++i) {
- args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));
- }
- }
- char* const* Argv() {
- return &args_[0];
- }
- private:
- std::vector<char*> args_;
-};
-
-// A struct that encompasses the arguments to the child process of a
-// threadsafe-style death test process.
-struct ExecDeathTestArgs {
- char* const* argv; // Command-line arguments for the child's call to exec
- int close_fd; // File descriptor to close; the read end of a pipe
-};
-
-# if GTEST_OS_MAC
-inline char** GetEnviron() {
- // When Google Test is built as a framework on MacOS X, the environ variable
- // is unavailable. Apple's documentation (man environ) recommends using
- // _NSGetEnviron() instead.
- return *_NSGetEnviron();
-}
-# else
-// Some POSIX platforms expect you to declare environ. extern "C" makes
-// it reside in the global namespace.
-extern "C" char** environ;
-inline char** GetEnviron() { return environ; }
-# endif // GTEST_OS_MAC
-
-// The main function for a threadsafe-style death test child process.
-// This function is called in a clone()-ed process and thus must avoid
-// any potentially unsafe operations like malloc or libc functions.
-static int ExecDeathTestChildMain(void* child_arg) {
- ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));
-
- // We need to execute the test program in the same environment where
- // it was originally invoked. Therefore we change to the original
- // working directory first.
- const char* const original_dir =
- UnitTest::GetInstance()->original_working_dir();
- // We can safely call chdir() as it's a direct system call.
- if (chdir(original_dir) != 0) {
- DeathTestAbort(String::Format("chdir(\"%s\") failed: %s",
- original_dir,
- GetLastErrnoDescription().c_str()));
- return EXIT_FAILURE;
- }
-
- // We can safely call execve() as it's a direct system call. We
- // cannot use execvp() as it's a libc function and thus potentially
- // unsafe. Since execve() doesn't search the PATH, the user must
- // invoke the test program via a valid path that contains at least
- // one path separator.
- execve(args->argv[0], args->argv, GetEnviron());
- DeathTestAbort(String::Format("execve(%s, ...) in %s failed: %s",
- args->argv[0],
- original_dir,
- GetLastErrnoDescription().c_str()));
- return EXIT_FAILURE;
-}
-
-// Two utility routines that together determine the direction the stack
-// grows.
-// This could be accomplished more elegantly by a single recursive
-// function, but we want to guard against the unlikely possibility of
-// a smart compiler optimizing the recursion away.
-//
-// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining
-// StackLowerThanAddress into StackGrowsDown, which then doesn't give
-// correct answer.
-bool StackLowerThanAddress(const void* ptr) GTEST_NO_INLINE_;
-bool StackLowerThanAddress(const void* ptr) {
- int dummy;
- return &dummy < ptr;
-}
-
-bool StackGrowsDown() {
- int dummy;
- return StackLowerThanAddress(&dummy);
-}
-
-// A threadsafe implementation of fork(2) for threadsafe-style death tests
-// that uses clone(2). It dies with an error message if anything goes
-// wrong.
-static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
- ExecDeathTestArgs args = { argv, close_fd };
- pid_t child_pid = -1;
-
-# if GTEST_HAS_CLONE
- const bool use_fork = GTEST_FLAG(death_test_use_fork);
-
- if (!use_fork) {
- static const bool stack_grows_down = StackGrowsDown();
- const size_t stack_size = getpagesize();
- // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.
- void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE, -1, 0);
- GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED);
- void* const stack_top =
- static_cast<char*>(stack) + (stack_grows_down ? stack_size : 0);
-
- child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args);
-
- GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1);
- }
-# else
- const bool use_fork = true;
-# endif // GTEST_HAS_CLONE
-
- if (use_fork && (child_pid = fork()) == 0) {
- ExecDeathTestChildMain(&args);
- _exit(0);
- }
-
- GTEST_DEATH_TEST_CHECK_(child_pid != -1);
- return child_pid;
-}
-
-// The AssumeRole process for a fork-and-exec death test. It re-executes the
-// main program from the beginning, setting the --gtest_filter
-// and --gtest_internal_run_death_test flags to cause only the current
-// death test to be re-run.
-DeathTest::TestRole ExecDeathTest::AssumeRole() {
- const UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const TestInfo* const info = impl->current_test_info();
- const int death_test_index = info->result()->death_test_count();
-
- if (flag != NULL) {
- set_write_fd(flag->write_fd());
- return EXECUTE_TEST;
- }
-
- int pipe_fd[2];
- GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
- // Clear the close-on-exec flag on the write end of the pipe, lest
- // it be closed when the child process does an exec:
- GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1);
-
- const String filter_flag =
- String::Format("--%s%s=%s.%s",
- GTEST_FLAG_PREFIX_, kFilterFlag,
- info->test_case_name(), info->name());
- const String internal_flag =
- String::Format("--%s%s=%s|%d|%d|%d",
- GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag,
- file_, line_, death_test_index, pipe_fd[1]);
- Arguments args;
- args.AddArguments(GetArgvs());
- args.AddArgument(filter_flag.c_str());
- args.AddArgument(internal_flag.c_str());
-
- DeathTest::set_last_death_test_message("");
-
- CaptureStderr();
- // See the comment in NoExecDeathTest::AssumeRole for why the next line
- // is necessary.
- FlushInfoLog();
-
- const pid_t child_pid = ExecDeathTestFork(args.Argv(), pipe_fd[0]);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
- set_child_pid(child_pid);
- set_read_fd(pipe_fd[0]);
- set_spawned(true);
- return OVERSEE_TEST;
-}
-
-# endif // !GTEST_OS_WINDOWS
-
-// Creates a concrete DeathTest-derived class that depends on the
-// --gtest_death_test_style flag, and sets the pointer pointed to
-// by the "test" argument to its address. If the test should be
-// skipped, sets that pointer to NULL. Returns true, unless the
-// flag is set to an invalid value.
-bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
- const char* file, int line,
- DeathTest** test) {
- UnitTestImpl* const impl = GetUnitTestImpl();
- const InternalRunDeathTestFlag* const flag =
- impl->internal_run_death_test_flag();
- const int death_test_index = impl->current_test_info()
- ->increment_death_test_count();
-
- if (flag != NULL) {
- if (death_test_index > flag->index()) {
- DeathTest::set_last_death_test_message(String::Format(
- "Death test count (%d) somehow exceeded expected maximum (%d)",
- death_test_index, flag->index()));
- return false;
- }
-
- if (!(flag->file() == file && flag->line() == line &&
- flag->index() == death_test_index)) {
- *test = NULL;
- return true;
- }
- }
-
-# if GTEST_OS_WINDOWS
-
- if (GTEST_FLAG(death_test_style) == "threadsafe" ||
- GTEST_FLAG(death_test_style) == "fast") {
- *test = new WindowsDeathTest(statement, regex, file, line);
- }
-
-# else
-
- if (GTEST_FLAG(death_test_style) == "threadsafe") {
- *test = new ExecDeathTest(statement, regex, file, line);
- } else if (GTEST_FLAG(death_test_style) == "fast") {
- *test = new NoExecDeathTest(statement, regex);
- }
-
-# endif // GTEST_OS_WINDOWS
-
- else { // NOLINT - this is more readable than unbalanced brackets inside #if.
- DeathTest::set_last_death_test_message(String::Format(
- "Unknown death test style \"%s\" encountered",
- GTEST_FLAG(death_test_style).c_str()));
- return false;
- }
-
- return true;
-}
-
-// Splits a given string on a given delimiter, populating a given
-// vector with the fields. GTEST_HAS_DEATH_TEST implies that we have
-// ::std::string, so we can use it here.
-static void SplitString(const ::std::string& str, char delimiter,
- ::std::vector< ::std::string>* dest) {
- ::std::vector< ::std::string> parsed;
- ::std::string::size_type pos = 0;
- while (::testing::internal::AlwaysTrue()) {
- const ::std::string::size_type colon = str.find(delimiter, pos);
- if (colon == ::std::string::npos) {
- parsed.push_back(str.substr(pos));
- break;
- } else {
- parsed.push_back(str.substr(pos, colon - pos));
- pos = colon + 1;
- }
- }
- dest->swap(parsed);
-}
-
-# if GTEST_OS_WINDOWS
-// Recreates the pipe and event handles from the provided parameters,
-// signals the event, and returns a file descriptor wrapped around the pipe
-// handle. This function is called in the child process only.
-int GetStatusFileDescriptor(unsigned int parent_process_id,
- size_t write_handle_as_size_t,
- size_t event_handle_as_size_t) {
- AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,
- FALSE, // Non-inheritable.
- parent_process_id));
- if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) {
- DeathTestAbort(String::Format("Unable to open parent process %u",
- parent_process_id));
- }
-
- // TODO(vladl@google.com): Replace the following check with a
- // compile-time assertion when available.
- GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t));
-
- const HANDLE write_handle =
- reinterpret_cast<HANDLE>(write_handle_as_size_t);
- HANDLE dup_write_handle;
-
- // The newly initialized handle is accessible only in in the parent
- // process. To obtain one accessible within the child, we need to use
- // DuplicateHandle.
- if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,
- ::GetCurrentProcess(), &dup_write_handle,
- 0x0, // Requested privileges ignored since
- // DUPLICATE_SAME_ACCESS is used.
- FALSE, // Request non-inheritable handler.
- DUPLICATE_SAME_ACCESS)) {
- DeathTestAbort(String::Format(
- "Unable to duplicate the pipe handle %Iu from the parent process %u",
- write_handle_as_size_t, parent_process_id));
- }
-
- const HANDLE event_handle = reinterpret_cast<HANDLE>(event_handle_as_size_t);
- HANDLE dup_event_handle;
-
- if (!::DuplicateHandle(parent_process_handle.Get(), event_handle,
- ::GetCurrentProcess(), &dup_event_handle,
- 0x0,
- FALSE,
- DUPLICATE_SAME_ACCESS)) {
- DeathTestAbort(String::Format(
- "Unable to duplicate the event handle %Iu from the parent process %u",
- event_handle_as_size_t, parent_process_id));
- }
-
- const int write_fd =
- ::_open_osfhandle(reinterpret_cast<intptr_t>(dup_write_handle), O_APPEND);
- if (write_fd == -1) {
- DeathTestAbort(String::Format(
- "Unable to convert pipe handle %Iu to a file descriptor",
- write_handle_as_size_t));
- }
-
- // Signals the parent that the write end of the pipe has been acquired
- // so the parent can release its own write end.
- ::SetEvent(dup_event_handle);
-
- return write_fd;
-}
-# endif // GTEST_OS_WINDOWS
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
- if (GTEST_FLAG(internal_run_death_test) == "") return NULL;
-
- // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we
- // can use it here.
- int line = -1;
- int index = -1;
- ::std::vector< ::std::string> fields;
- SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);
- int write_fd = -1;
-
-# if GTEST_OS_WINDOWS
-
- unsigned int parent_process_id = 0;
- size_t write_handle_as_size_t = 0;
- size_t event_handle_as_size_t = 0;
-
- if (fields.size() != 6
- || !ParseNaturalNumber(fields[1], &line)
- || !ParseNaturalNumber(fields[2], &index)
- || !ParseNaturalNumber(fields[3], &parent_process_id)
- || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)
- || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
- DeathTestAbort(String::Format(
- "Bad --gtest_internal_run_death_test flag: %s",
- GTEST_FLAG(internal_run_death_test).c_str()));
- }
- write_fd = GetStatusFileDescriptor(parent_process_id,
- write_handle_as_size_t,
- event_handle_as_size_t);
-# else
-
- if (fields.size() != 4
- || !ParseNaturalNumber(fields[1], &line)
- || !ParseNaturalNumber(fields[2], &index)
- || !ParseNaturalNumber(fields[3], &write_fd)) {
- DeathTestAbort(String::Format(
- "Bad --gtest_internal_run_death_test flag: %s",
- GTEST_FLAG(internal_run_death_test).c_str()));
- }
-
-# endif // GTEST_OS_WINDOWS
-
- return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
-}
-
-} // namespace internal
-
-#endif // GTEST_HAS_DEATH_TEST
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-filepath.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-filepath.cc
deleted file mode 100644
index 91b257138..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-filepath.cc
+++ /dev/null
@@ -1,380 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: keith.ray@gmail.com (Keith Ray)
-
-#include "gtest/internal/gtest-filepath.h"
-#include "gtest/internal/gtest-port.h"
-
-#include <stdlib.h>
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h>
-#elif GTEST_OS_WINDOWS
-# include <direct.h>
-# include <io.h>
-#elif GTEST_OS_SYMBIAN || GTEST_OS_NACL
-// Symbian OpenC and NaCl have PATH_MAX in sys/syslimits.h
-# include <sys/syslimits.h>
-#else
-# include <limits.h>
-# include <climits> // Some Linux distributions define PATH_MAX here.
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_MAX_ _MAX_PATH
-#elif defined(PATH_MAX)
-# define GTEST_PATH_MAX_ PATH_MAX
-#elif defined(_XOPEN_PATH_MAX)
-# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX
-#else
-# define GTEST_PATH_MAX_ _POSIX_PATH_MAX
-#endif // GTEST_OS_WINDOWS
-
-#include "gtest/internal/gtest-string.h"
-
-namespace testing {
-namespace internal {
-
-#if GTEST_OS_WINDOWS
-// On Windows, '\\' is the standard path separator, but many tools and the
-// Windows API also accept '/' as an alternate path separator. Unless otherwise
-// noted, a file path can contain either kind of path separators, or a mixture
-// of them.
-const char kPathSeparator = '\\';
-const char kAlternatePathSeparator = '/';
-const char kPathSeparatorString[] = "\\";
-const char kAlternatePathSeparatorString[] = "/";
-# if GTEST_OS_WINDOWS_MOBILE
-// Windows CE doesn't have a current directory. You should not use
-// the current directory in tests on Windows CE, but this at least
-// provides a reasonable fallback.
-const char kCurrentDirectoryString[] = "\\";
-// Windows CE doesn't define INVALID_FILE_ATTRIBUTES
-const DWORD kInvalidFileAttributes = 0xffffffff;
-# else
-const char kCurrentDirectoryString[] = ".\\";
-# endif // GTEST_OS_WINDOWS_MOBILE
-#else
-const char kPathSeparator = '/';
-const char kPathSeparatorString[] = "/";
-const char kCurrentDirectoryString[] = "./";
-#endif // GTEST_OS_WINDOWS
-
-// Returns whether the given character is a valid path separator.
-static bool IsPathSeparator(char c) {
-#if GTEST_HAS_ALT_PATH_SEP_
- return (c == kPathSeparator) || (c == kAlternatePathSeparator);
-#else
- return c == kPathSeparator;
-#endif
-}
-
-// Returns the current working directory, or "" if unsuccessful.
-FilePath FilePath::GetCurrentDir() {
-#if GTEST_OS_WINDOWS_MOBILE
- // Windows CE doesn't have a current directory, so we just return
- // something reasonable.
- return FilePath(kCurrentDirectoryString);
-#elif GTEST_OS_WINDOWS
- char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
- return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
-#else
- char cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
- return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd);
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-// Returns a copy of the FilePath with the case-insensitive extension removed.
-// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
-// FilePath("dir/file"). If a case-insensitive extension is not
-// found, returns a copy of the original FilePath.
-FilePath FilePath::RemoveExtension(const char* extension) const {
- String dot_extension(String::Format(".%s", extension));
- if (pathname_.EndsWithCaseInsensitive(dot_extension.c_str())) {
- return FilePath(String(pathname_.c_str(), pathname_.length() - 4));
- }
- return *this;
-}
-
-// Returns a pointer to the last occurence of a valid path separator in
-// the FilePath. On Windows, for example, both '/' and '\' are valid path
-// separators. Returns NULL if no path separator was found.
-const char* FilePath::FindLastPathSeparator() const {
- const char* const last_sep = strrchr(c_str(), kPathSeparator);
-#if GTEST_HAS_ALT_PATH_SEP_
- const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator);
- // Comparing two pointers of which only one is NULL is undefined.
- if (last_alt_sep != NULL &&
- (last_sep == NULL || last_alt_sep > last_sep)) {
- return last_alt_sep;
- }
-#endif
- return last_sep;
-}
-
-// Returns a copy of the FilePath with the directory part removed.
-// Example: FilePath("path/to/file").RemoveDirectoryName() returns
-// FilePath("file"). If there is no directory part ("just_a_file"), it returns
-// the FilePath unmodified. If there is no file part ("just_a_dir/") it
-// returns an empty FilePath ("").
-// On Windows platform, '\' is the path separator, otherwise it is '/'.
-FilePath FilePath::RemoveDirectoryName() const {
- const char* const last_sep = FindLastPathSeparator();
- return last_sep ? FilePath(String(last_sep + 1)) : *this;
-}
-
-// RemoveFileName returns the directory path with the filename removed.
-// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
-// If the FilePath is "a_file" or "/a_file", RemoveFileName returns
-// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
-// not have a file, like "just/a/dir/", it returns the FilePath unmodified.
-// On Windows platform, '\' is the path separator, otherwise it is '/'.
-FilePath FilePath::RemoveFileName() const {
- const char* const last_sep = FindLastPathSeparator();
- String dir;
- if (last_sep) {
- dir = String(c_str(), last_sep + 1 - c_str());
- } else {
- dir = kCurrentDirectoryString;
- }
- return FilePath(dir);
-}
-
-// Helper functions for naming files in a directory for xml output.
-
-// Given directory = "dir", base_name = "test", number = 0,
-// extension = "xml", returns "dir/test.xml". If number is greater
-// than zero (e.g., 12), returns "dir/test_12.xml".
-// On Windows platform, uses \ as the separator rather than /.
-FilePath FilePath::MakeFileName(const FilePath& directory,
- const FilePath& base_name,
- int number,
- const char* extension) {
- String file;
- if (number == 0) {
- file = String::Format("%s.%s", base_name.c_str(), extension);
- } else {
- file = String::Format("%s_%d.%s", base_name.c_str(), number, extension);
- }
- return ConcatPaths(directory, FilePath(file));
-}
-
-// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml".
-// On Windows, uses \ as the separator rather than /.
-FilePath FilePath::ConcatPaths(const FilePath& directory,
- const FilePath& relative_path) {
- if (directory.IsEmpty())
- return relative_path;
- const FilePath dir(directory.RemoveTrailingPathSeparator());
- return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator,
- relative_path.c_str()));
-}
-
-// Returns true if pathname describes something findable in the file-system,
-// either a file, directory, or whatever.
-bool FilePath::FileOrDirectoryExists() const {
-#if GTEST_OS_WINDOWS_MOBILE
- LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());
- const DWORD attributes = GetFileAttributes(unicode);
- delete [] unicode;
- return attributes != kInvalidFileAttributes;
-#else
- posix::StatStruct file_stat;
- return posix::Stat(pathname_.c_str(), &file_stat) == 0;
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-// Returns true if pathname describes a directory in the file-system
-// that exists.
-bool FilePath::DirectoryExists() const {
- bool result = false;
-#if GTEST_OS_WINDOWS
- // Don't strip off trailing separator if path is a root directory on
- // Windows (like "C:\\").
- const FilePath& path(IsRootDirectory() ? *this :
- RemoveTrailingPathSeparator());
-#else
- const FilePath& path(*this);
-#endif
-
-#if GTEST_OS_WINDOWS_MOBILE
- LPCWSTR unicode = String::AnsiToUtf16(path.c_str());
- const DWORD attributes = GetFileAttributes(unicode);
- delete [] unicode;
- if ((attributes != kInvalidFileAttributes) &&
- (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
- result = true;
- }
-#else
- posix::StatStruct file_stat;
- result = posix::Stat(path.c_str(), &file_stat) == 0 &&
- posix::IsDir(file_stat);
-#endif // GTEST_OS_WINDOWS_MOBILE
-
- return result;
-}
-
-// Returns true if pathname describes a root directory. (Windows has one
-// root directory per disk drive.)
-bool FilePath::IsRootDirectory() const {
-#if GTEST_OS_WINDOWS
- // TODO(wan@google.com): on Windows a network share like
- // \\server\share can be a root directory, although it cannot be the
- // current directory. Handle this properly.
- return pathname_.length() == 3 && IsAbsolutePath();
-#else
- return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);
-#endif
-}
-
-// Returns true if pathname describes an absolute path.
-bool FilePath::IsAbsolutePath() const {
- const char* const name = pathname_.c_str();
-#if GTEST_OS_WINDOWS
- return pathname_.length() >= 3 &&
- ((name[0] >= 'a' && name[0] <= 'z') ||
- (name[0] >= 'A' && name[0] <= 'Z')) &&
- name[1] == ':' &&
- IsPathSeparator(name[2]);
-#else
- return IsPathSeparator(name[0]);
-#endif
-}
-
-// Returns a pathname for a file that does not currently exist. The pathname
-// will be directory/base_name.extension or
-// directory/base_name_<number>.extension if directory/base_name.extension
-// already exists. The number will be incremented until a pathname is found
-// that does not already exist.
-// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
-// There could be a race condition if two or more processes are calling this
-// function at the same time -- they could both pick the same filename.
-FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
- const FilePath& base_name,
- const char* extension) {
- FilePath full_pathname;
- int number = 0;
- do {
- full_pathname.Set(MakeFileName(directory, base_name, number++, extension));
- } while (full_pathname.FileOrDirectoryExists());
- return full_pathname;
-}
-
-// Returns true if FilePath ends with a path separator, which indicates that
-// it is intended to represent a directory. Returns false otherwise.
-// This does NOT check that a directory (or file) actually exists.
-bool FilePath::IsDirectory() const {
- return !pathname_.empty() &&
- IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]);
-}
-
-// Create directories so that path exists. Returns true if successful or if
-// the directories already exist; returns false if unable to create directories
-// for any reason.
-bool FilePath::CreateDirectoriesRecursively() const {
- if (!this->IsDirectory()) {
- return false;
- }
-
- if (pathname_.length() == 0 || this->DirectoryExists()) {
- return true;
- }
-
- const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName());
- return parent.CreateDirectoriesRecursively() && this->CreateFolder();
-}
-
-// Create the directory so that path exists. Returns true if successful or
-// if the directory already exists; returns false if unable to create the
-// directory for any reason, including if the parent directory does not
-// exist. Not named "CreateDirectory" because that's a macro on Windows.
-bool FilePath::CreateFolder() const {
-#if GTEST_OS_WINDOWS_MOBILE
- FilePath removed_sep(this->RemoveTrailingPathSeparator());
- LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str());
- int result = CreateDirectory(unicode, NULL) ? 0 : -1;
- delete [] unicode;
-#elif GTEST_OS_WINDOWS
- int result = _mkdir(pathname_.c_str());
-#else
- int result = mkdir(pathname_.c_str(), 0777);
-#endif // GTEST_OS_WINDOWS_MOBILE
-
- if (result == -1) {
- return this->DirectoryExists(); // An error is OK if the directory exists.
- }
- return true; // No error.
-}
-
-// If input name has a trailing separator character, remove it and return the
-// name, otherwise return the name string unmodified.
-// On Windows platform, uses \ as the separator, other platforms use /.
-FilePath FilePath::RemoveTrailingPathSeparator() const {
- return IsDirectory()
- ? FilePath(String(pathname_.c_str(), pathname_.length() - 1))
- : *this;
-}
-
-// Removes any redundant separators that might be in the pathname.
-// For example, "bar///foo" becomes "bar/foo". Does not eliminate other
-// redundancies that might be in a pathname involving "." or "..".
-// TODO(wan@google.com): handle Windows network shares (e.g. \\server\share).
-void FilePath::Normalize() {
- if (pathname_.c_str() == NULL) {
- pathname_ = "";
- return;
- }
- const char* src = pathname_.c_str();
- char* const dest = new char[pathname_.length() + 1];
- char* dest_ptr = dest;
- memset(dest_ptr, 0, pathname_.length() + 1);
-
- while (*src != '\0') {
- *dest_ptr = *src;
- if (!IsPathSeparator(*src)) {
- src++;
- } else {
-#if GTEST_HAS_ALT_PATH_SEP_
- if (*dest_ptr == kAlternatePathSeparator) {
- *dest_ptr = kPathSeparator;
- }
-#endif
- while (IsPathSeparator(*src))
- src++;
- }
- dest_ptr++;
- }
- *dest_ptr = '\0';
- pathname_ = dest;
- delete[] dest;
-}
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-internal-inl.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-internal-inl.h
deleted file mode 100644
index 65a2101a4..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-internal-inl.h
+++ /dev/null
@@ -1,1038 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Utility functions and classes used by the Google C++ testing framework.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// This file contains purely Google Test's internal implementation. Please
-// DO NOT #INCLUDE IT IN A USER PROGRAM.
-
-#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_
-#define GTEST_SRC_GTEST_INTERNAL_INL_H_
-
-// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is
-// part of Google Test's implementation; otherwise it's undefined.
-#if !GTEST_IMPLEMENTATION_
-// A user is trying to include this from his code - just say no.
-# error "gtest-internal-inl.h is part of Google Test's internal implementation."
-# error "It must not be included except by Google Test itself."
-#endif // GTEST_IMPLEMENTATION_
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif // !_WIN32_WCE
-#include <stddef.h>
-#include <stdlib.h> // For strtoll/_strtoul64/malloc/free.
-#include <string.h> // For memmove.
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_OS_WINDOWS
-# include <windows.h> // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-#include "gtest/gtest.h" // NOLINT
-#include "gtest/gtest-spi.h"
-
-namespace testing {
-
-// Declares the flags.
-//
-// We don't want the users to modify this flag in the code, but want
-// Google Test's own unit tests to be able to access it. Therefore we
-// declare it here as opposed to in gtest.h.
-GTEST_DECLARE_bool_(death_test_use_fork);
-
-namespace internal {
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library. This is solely for testing GetTestTypeId().
-GTEST_API_ extern const TypeId kTestTypeIdInGoogleTest;
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests";
-const char kBreakOnFailureFlag[] = "break_on_failure";
-const char kCatchExceptionsFlag[] = "catch_exceptions";
-const char kColorFlag[] = "color";
-const char kFilterFlag[] = "filter";
-const char kListTestsFlag[] = "list_tests";
-const char kOutputFlag[] = "output";
-const char kPrintTimeFlag[] = "print_time";
-const char kRandomSeedFlag[] = "random_seed";
-const char kRepeatFlag[] = "repeat";
-const char kShuffleFlag[] = "shuffle";
-const char kStackTraceDepthFlag[] = "stack_trace_depth";
-const char kStreamResultToFlag[] = "stream_result_to";
-const char kThrowOnFailureFlag[] = "throw_on_failure";
-
-// A valid random seed must be in [1, kMaxRandomSeed].
-const int kMaxRandomSeed = 99999;
-
-// g_help_flag is true iff the --help flag or an equivalent form is
-// specified on the command line.
-GTEST_API_ extern bool g_help_flag;
-
-// Returns the current time in milliseconds.
-GTEST_API_ TimeInMillis GetTimeInMillis();
-
-// Returns true iff Google Test should use colors in the output.
-GTEST_API_ bool ShouldUseColor(bool stdout_is_tty);
-
-// Formats the given time in milliseconds as seconds.
-GTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms);
-
-// Parses a string for an Int32 flag, in the form of "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-GTEST_API_ bool ParseInt32Flag(
- const char* str, const char* flag, Int32* value);
-
-// Returns a random seed in range [1, kMaxRandomSeed] based on the
-// given --gtest_random_seed flag value.
-inline int GetRandomSeedFromFlag(Int32 random_seed_flag) {
- const unsigned int raw_seed = (random_seed_flag == 0) ?
- static_cast<unsigned int>(GetTimeInMillis()) :
- static_cast<unsigned int>(random_seed_flag);
-
- // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
- // it's easy to type.
- const int normalized_seed =
- static_cast<int>((raw_seed - 1U) %
- static_cast<unsigned int>(kMaxRandomSeed)) + 1;
- return normalized_seed;
-}
-
-// Returns the first valid random seed after 'seed'. The behavior is
-// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is
-// considered to be 1.
-inline int GetNextRandomSeed(int seed) {
- GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
- << "Invalid random seed " << seed << " - must be in [1, "
- << kMaxRandomSeed << "].";
- const int next_seed = seed + 1;
- return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
-}
-
-// This class saves the values of all Google Test flags in its c'tor, and
-// restores them in its d'tor.
-class GTestFlagSaver {
- public:
- // The c'tor.
- GTestFlagSaver() {
- also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests);
- break_on_failure_ = GTEST_FLAG(break_on_failure);
- catch_exceptions_ = GTEST_FLAG(catch_exceptions);
- color_ = GTEST_FLAG(color);
- death_test_style_ = GTEST_FLAG(death_test_style);
- death_test_use_fork_ = GTEST_FLAG(death_test_use_fork);
- filter_ = GTEST_FLAG(filter);
- internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);
- list_tests_ = GTEST_FLAG(list_tests);
- output_ = GTEST_FLAG(output);
- print_time_ = GTEST_FLAG(print_time);
- random_seed_ = GTEST_FLAG(random_seed);
- repeat_ = GTEST_FLAG(repeat);
- shuffle_ = GTEST_FLAG(shuffle);
- stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);
- stream_result_to_ = GTEST_FLAG(stream_result_to);
- throw_on_failure_ = GTEST_FLAG(throw_on_failure);
- }
-
- // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS.
- ~GTestFlagSaver() {
- GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;
- GTEST_FLAG(break_on_failure) = break_on_failure_;
- GTEST_FLAG(catch_exceptions) = catch_exceptions_;
- GTEST_FLAG(color) = color_;
- GTEST_FLAG(death_test_style) = death_test_style_;
- GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;
- GTEST_FLAG(filter) = filter_;
- GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;
- GTEST_FLAG(list_tests) = list_tests_;
- GTEST_FLAG(output) = output_;
- GTEST_FLAG(print_time) = print_time_;
- GTEST_FLAG(random_seed) = random_seed_;
- GTEST_FLAG(repeat) = repeat_;
- GTEST_FLAG(shuffle) = shuffle_;
- GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;
- GTEST_FLAG(stream_result_to) = stream_result_to_;
- GTEST_FLAG(throw_on_failure) = throw_on_failure_;
- }
- private:
- // Fields for saving the original values of flags.
- bool also_run_disabled_tests_;
- bool break_on_failure_;
- bool catch_exceptions_;
- String color_;
- String death_test_style_;
- bool death_test_use_fork_;
- String filter_;
- String internal_run_death_test_;
- bool list_tests_;
- String output_;
- bool print_time_;
- bool pretty_;
- internal::Int32 random_seed_;
- internal::Int32 repeat_;
- bool shuffle_;
- internal::Int32 stack_trace_depth_;
- String stream_result_to_;
- bool throw_on_failure_;
-} GTEST_ATTRIBUTE_UNUSED_;
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// The output buffer str must containt at least 32 characters.
-// The function returns the address of the output buffer.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'.
-GTEST_API_ char* CodePointToUtf8(UInt32 code_point, char* str);
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)
-// UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-GTEST_API_ String WideStringToUtf8(const wchar_t* str, int num_chars);
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded();
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (e.g., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-GTEST_API_ bool ShouldShard(const char* total_shards_str,
- const char* shard_index_str,
- bool in_subprocess_for_death_test);
-
-// Parses the environment variable var as an Int32. If it is unset,
-// returns default_val. If it is not an Int32, prints an error and
-// and aborts.
-GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val);
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true iff the test should be run on this shard. The test id is
-// some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-GTEST_API_ bool ShouldRunTestOnShard(
- int total_shards, int shard_index, int test_id);
-
-// STL container utilities.
-
-// Returns the number of elements in the given container that satisfy
-// the given predicate.
-template <class Container, typename Predicate>
-inline int CountIf(const Container& c, Predicate predicate) {
- // Implemented as an explicit loop since std::count_if() in libCstd on
- // Solaris has a non-standard signature.
- int count = 0;
- for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
- if (predicate(*it))
- ++count;
- }
- return count;
-}
-
-// Applies a function/functor to each element in the container.
-template <class Container, typename Functor>
-void ForEach(const Container& c, Functor functor) {
- std::for_each(c.begin(), c.end(), functor);
-}
-
-// Returns the i-th element of the vector, or default_value if i is not
-// in range [0, v.size()).
-template <typename E>
-inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
- return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];
-}
-
-// Performs an in-place shuffle of a range of the vector's elements.
-// 'begin' and 'end' are element indices as an STL-style range;
-// i.e. [begin, end) are shuffled, where 'end' == size() means to
-// shuffle to the end of the vector.
-template <typename E>
-void ShuffleRange(internal::Random* random, int begin, int end,
- std::vector<E>* v) {
- const int size = static_cast<int>(v->size());
- GTEST_CHECK_(0 <= begin && begin <= size)
- << "Invalid shuffle range start " << begin << ": must be in range [0, "
- << size << "].";
- GTEST_CHECK_(begin <= end && end <= size)
- << "Invalid shuffle range finish " << end << ": must be in range ["
- << begin << ", " << size << "].";
-
- // Fisher-Yates shuffle, from
- // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle
- for (int range_width = end - begin; range_width >= 2; range_width--) {
- const int last_in_range = begin + range_width - 1;
- const int selected = begin + random->Generate(range_width);
- std::swap((*v)[selected], (*v)[last_in_range]);
- }
-}
-
-// Performs an in-place shuffle of the vector's elements.
-template <typename E>
-inline void Shuffle(internal::Random* random, std::vector<E>* v) {
- ShuffleRange(random, 0, static_cast<int>(v->size()), v);
-}
-
-// A function for deleting an object. Handy for being used as a
-// functor.
-template <typename T>
-static void Delete(T* x) {
- delete x;
-}
-
-// A predicate that checks the key of a TestProperty against a known key.
-//
-// TestPropertyKeyIs is copyable.
-class TestPropertyKeyIs {
- public:
- // Constructor.
- //
- // TestPropertyKeyIs has NO default constructor.
- explicit TestPropertyKeyIs(const char* key)
- : key_(key) {}
-
- // Returns true iff the test name of test property matches on key_.
- bool operator()(const TestProperty& test_property) const {
- return String(test_property.key()).Compare(key_) == 0;
- }
-
- private:
- String key_;
-};
-
-// Class UnitTestOptions.
-//
-// This class contains functions for processing options the user
-// specifies when running the tests. It has only static members.
-//
-// In most cases, the user can specify an option using either an
-// environment variable or a command line flag. E.g. you can set the
-// test filter using either GTEST_FILTER or --gtest_filter. If both
-// the variable and the flag are present, the latter overrides the
-// former.
-class GTEST_API_ UnitTestOptions {
- public:
- // Functions for processing the gtest_output flag.
-
- // Returns the output format, or "" for normal printed output.
- static String GetOutputFormat();
-
- // Returns the absolute path of the requested output file, or the
- // default (test_detail.xml in the original working directory) if
- // none was explicitly specified.
- static String GetAbsolutePathToOutputFile();
-
- // Functions for processing the gtest_filter flag.
-
- // Returns true iff the wildcard pattern matches the string. The
- // first ':' or '\0' character in pattern marks the end of it.
- //
- // This recursive algorithm isn't very efficient, but is clear and
- // works well enough for matching test names, which are short.
- static bool PatternMatchesString(const char *pattern, const char *str);
-
- // Returns true iff the user-specified filter matches the test case
- // name and the test name.
- static bool FilterMatchesTest(const String &test_case_name,
- const String &test_name);
-
-#if GTEST_OS_WINDOWS
- // Function for supporting the gtest_catch_exception flag.
-
- // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
- // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
- // This function is useful as an __except condition.
- static int GTestShouldProcessSEH(DWORD exception_code);
-#endif // GTEST_OS_WINDOWS
-
- // Returns true if "name" matches the ':' separated list of glob-style
- // filters in "filter".
- static bool MatchesFilter(const String& name, const char* filter);
-};
-
-// Returns the current application's name, removing directory path if that
-// is present. Used by UnitTestOptions::GetOutputFile.
-GTEST_API_ FilePath GetCurrentExecutableName();
-
-// The role interface for getting the OS stack trace as a string.
-class OsStackTraceGetterInterface {
- public:
- OsStackTraceGetterInterface() {}
- virtual ~OsStackTraceGetterInterface() {}
-
- // Returns the current OS stack trace as a String. Parameters:
- //
- // max_depth - the maximum number of stack frames to be included
- // in the trace.
- // skip_count - the number of top frames to be skipped; doesn't count
- // against max_depth.
- virtual String CurrentStackTrace(int max_depth, int skip_count) = 0;
-
- // UponLeavingGTest() should be called immediately before Google Test calls
- // user code. It saves some information about the current stack that
- // CurrentStackTrace() will use to find and hide Google Test stack frames.
- virtual void UponLeavingGTest() = 0;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface);
-};
-
-// A working implementation of the OsStackTraceGetterInterface interface.
-class OsStackTraceGetter : public OsStackTraceGetterInterface {
- public:
- OsStackTraceGetter() : caller_frame_(NULL) {}
- virtual String CurrentStackTrace(int max_depth, int skip_count);
- virtual void UponLeavingGTest();
-
- // This string is inserted in place of stack frames that are part of
- // Google Test's implementation.
- static const char* const kElidedFramesMarker;
-
- private:
- Mutex mutex_; // protects all internal state
-
- // We save the stack frame below the frame that calls user code.
- // We do this because the address of the frame immediately below
- // the user code changes between the call to UponLeavingGTest()
- // and any calls to CurrentStackTrace() from within the user code.
- void* caller_frame_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter);
-};
-
-// Information about a Google Test trace point.
-struct TraceInfo {
- const char* file;
- int line;
- String message;
-};
-
-// This is the default global test part result reporter used in UnitTestImpl.
-// This class should only be used by UnitTestImpl.
-class DefaultGlobalTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);
- // Implements the TestPartResultReporterInterface. Reports the test part
- // result in the current test.
- virtual void ReportTestPartResult(const TestPartResult& result);
-
- private:
- UnitTestImpl* const unit_test_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter);
-};
-
-// This is the default per thread test part result reporter used in
-// UnitTestImpl. This class should only be used by UnitTestImpl.
-class DefaultPerThreadTestPartResultReporter
- : public TestPartResultReporterInterface {
- public:
- explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);
- // Implements the TestPartResultReporterInterface. The implementation just
- // delegates to the current global test part result reporter of *unit_test_.
- virtual void ReportTestPartResult(const TestPartResult& result);
-
- private:
- UnitTestImpl* const unit_test_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter);
-};
-
-// The private implementation of the UnitTest class. We don't protect
-// the methods under a mutex, as this class is not accessible by a
-// user and the UnitTest class that delegates work to this class does
-// proper locking.
-class GTEST_API_ UnitTestImpl {
- public:
- explicit UnitTestImpl(UnitTest* parent);
- virtual ~UnitTestImpl();
-
- // There are two different ways to register your own TestPartResultReporter.
- // You can register your own repoter to listen either only for test results
- // from the current thread or for results from all threads.
- // By default, each per-thread test result repoter just passes a new
- // TestPartResult to the global test result reporter, which registers the
- // test part result for the currently running test.
-
- // Returns the global test part result reporter.
- TestPartResultReporterInterface* GetGlobalTestPartResultReporter();
-
- // Sets the global test part result reporter.
- void SetGlobalTestPartResultReporter(
- TestPartResultReporterInterface* reporter);
-
- // Returns the test part result reporter for the current thread.
- TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();
-
- // Sets the test part result reporter for the current thread.
- void SetTestPartResultReporterForCurrentThread(
- TestPartResultReporterInterface* reporter);
-
- // Gets the number of successful test cases.
- int successful_test_case_count() const;
-
- // Gets the number of failed test cases.
- int failed_test_case_count() const;
-
- // Gets the number of all test cases.
- int total_test_case_count() const;
-
- // Gets the number of all test cases that contain at least one test
- // that should run.
- int test_case_to_run_count() const;
-
- // Gets the number of successful tests.
- int successful_test_count() const;
-
- // Gets the number of failed tests.
- int failed_test_count() const;
-
- // Gets the number of disabled tests.
- int disabled_test_count() const;
-
- // Gets the number of all tests.
- int total_test_count() const;
-
- // Gets the number of tests that should run.
- int test_to_run_count() const;
-
- // Gets the elapsed time, in milliseconds.
- TimeInMillis elapsed_time() const { return elapsed_time_; }
-
- // Returns true iff the unit test passed (i.e. all test cases passed).
- bool Passed() const { return !Failed(); }
-
- // Returns true iff the unit test failed (i.e. some test case failed
- // or something outside of all tests failed).
- bool Failed() const {
- return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
- }
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- const TestCase* GetTestCase(int i) const {
- const int index = GetElementOr(test_case_indices_, i, -1);
- return index < 0 ? NULL : test_cases_[i];
- }
-
- // Gets the i-th test case among all the test cases. i can range from 0 to
- // total_test_case_count() - 1. If i is not in that range, returns NULL.
- TestCase* GetMutableTestCase(int i) {
- const int index = GetElementOr(test_case_indices_, i, -1);
- return index < 0 ? NULL : test_cases_[index];
- }
-
- // Provides access to the event listener list.
- TestEventListeners* listeners() { return &listeners_; }
-
- // Returns the TestResult for the test that's currently running, or
- // the TestResult for the ad hoc test if no test is running.
- TestResult* current_test_result();
-
- // Returns the TestResult for the ad hoc test.
- const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }
-
- // Sets the OS stack trace getter.
- //
- // Does nothing if the input and the current OS stack trace getter
- // are the same; otherwise, deletes the old getter and makes the
- // input the current getter.
- void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);
-
- // Returns the current OS stack trace getter if it is not NULL;
- // otherwise, creates an OsStackTraceGetter, makes it the current
- // getter, and returns it.
- OsStackTraceGetterInterface* os_stack_trace_getter();
-
- // Returns the current OS stack trace as a String.
- //
- // The maximum number of stack frames to be included is specified by
- // the gtest_stack_trace_depth flag. The skip_count parameter
- // specifies the number of top frames to be skipped, which doesn't
- // count against the number of frames to be included.
- //
- // For example, if Foo() calls Bar(), which in turn calls
- // CurrentOsStackTraceExceptTop(1), Foo() will be included in the
- // trace but Bar() and CurrentOsStackTraceExceptTop() won't.
- String CurrentOsStackTraceExceptTop(int skip_count);
-
- // Finds and returns a TestCase with the given name. If one doesn't
- // exist, creates one and returns it.
- //
- // Arguments:
- //
- // test_case_name: name of the test case
- // type_param: the name of the test's type parameter, or NULL if
- // this is not a typed or a type-parameterized test.
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- TestCase* GetTestCase(const char* test_case_name,
- const char* type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc);
-
- // Adds a TestInfo to the unit test.
- //
- // Arguments:
- //
- // set_up_tc: pointer to the function that sets up the test case
- // tear_down_tc: pointer to the function that tears down the test case
- // test_info: the TestInfo object
- void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc,
- TestInfo* test_info) {
- // In order to support thread-safe death tests, we need to
- // remember the original working directory when the test program
- // was first invoked. We cannot do this in RUN_ALL_TESTS(), as
- // the user may have changed the current directory before calling
- // RUN_ALL_TESTS(). Therefore we capture the current directory in
- // AddTestInfo(), which is called to register a TEST or TEST_F
- // before main() is reached.
- if (original_working_dir_.IsEmpty()) {
- original_working_dir_.Set(FilePath::GetCurrentDir());
- GTEST_CHECK_(!original_working_dir_.IsEmpty())
- << "Failed to get the current working directory.";
- }
-
- GetTestCase(test_info->test_case_name(),
- test_info->type_param(),
- set_up_tc,
- tear_down_tc)->AddTestInfo(test_info);
- }
-
-#if GTEST_HAS_PARAM_TEST
- // Returns ParameterizedTestCaseRegistry object used to keep track of
- // value-parameterized tests and instantiate and register them.
- internal::ParameterizedTestCaseRegistry& parameterized_test_registry() {
- return parameterized_test_registry_;
- }
-#endif // GTEST_HAS_PARAM_TEST
-
- // Sets the TestCase object for the test that's currently running.
- void set_current_test_case(TestCase* a_current_test_case) {
- current_test_case_ = a_current_test_case;
- }
-
- // Sets the TestInfo object for the test that's currently running. If
- // current_test_info is NULL, the assertion results will be stored in
- // ad_hoc_test_result_.
- void set_current_test_info(TestInfo* a_current_test_info) {
- current_test_info_ = a_current_test_info;
- }
-
- // Registers all parameterized tests defined using TEST_P and
- // INSTANTIATE_TEST_CASE_P, creating regular tests for each test/parameter
- // combination. This method can be called more then once; it has guards
- // protecting from registering the tests more then once. If
- // value-parameterized tests are disabled, RegisterParameterizedTests is
- // present but does nothing.
- void RegisterParameterizedTests();
-
- // Runs all tests in this UnitTest object, prints the result, and
- // returns true if all tests are successful. If any exception is
- // thrown during a test, this test is considered to be failed, but
- // the rest of the tests will still be run.
- bool RunAllTests();
-
- // Clears the results of all tests, except the ad hoc tests.
- void ClearNonAdHocTestResult() {
- ForEach(test_cases_, TestCase::ClearTestCaseResult);
- }
-
- // Clears the results of ad-hoc test assertions.
- void ClearAdHocTestResult() {
- ad_hoc_test_result_.Clear();
- }
-
- enum ReactionToSharding {
- HONOR_SHARDING_PROTOCOL,
- IGNORE_SHARDING_PROTOCOL
- };
-
- // Matches the full name of each test against the user-specified
- // filter to decide whether the test should run, then records the
- // result in each TestCase and TestInfo object.
- // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests
- // based on sharding variables in the environment.
- // Returns the number of tests that should run.
- int FilterTests(ReactionToSharding shard_tests);
-
- // Prints the names of the tests matching the user-specified filter flag.
- void ListTestsMatchingFilter();
-
- const TestCase* current_test_case() const { return current_test_case_; }
- TestInfo* current_test_info() { return current_test_info_; }
- const TestInfo* current_test_info() const { return current_test_info_; }
-
- // Returns the vector of environments that need to be set-up/torn-down
- // before/after the tests are run.
- std::vector<Environment*>& environments() { return environments_; }
-
- // Getters for the per-thread Google Test trace stack.
- std::vector<TraceInfo>& gtest_trace_stack() {
- return *(gtest_trace_stack_.pointer());
- }
- const std::vector<TraceInfo>& gtest_trace_stack() const {
- return gtest_trace_stack_.get();
- }
-
-#if GTEST_HAS_DEATH_TEST
- void InitDeathTestSubprocessControlInfo() {
- internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
- }
- // Returns a pointer to the parsed --gtest_internal_run_death_test
- // flag, or NULL if that flag was not specified.
- // This information is useful only in a death test child process.
- // Must not be called before a call to InitGoogleTest.
- const InternalRunDeathTestFlag* internal_run_death_test_flag() const {
- return internal_run_death_test_flag_.get();
- }
-
- // Returns a pointer to the current death test factory.
- internal::DeathTestFactory* death_test_factory() {
- return death_test_factory_.get();
- }
-
- void SuppressTestEventsIfInSubprocess();
-
- friend class ReplaceDeathTestFactory;
-#endif // GTEST_HAS_DEATH_TEST
-
- // Initializes the event listener performing XML output as specified by
- // UnitTestOptions. Must not be called before InitGoogleTest.
- void ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
- // Initializes the event listener for streaming test results to a socket.
- // Must not be called before InitGoogleTest.
- void ConfigureStreamingOutput();
-#endif
-
- // Performs initialization dependent upon flag values obtained in
- // ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to
- // ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest
- // this function is also called from RunAllTests. Since this function can be
- // called more than once, it has to be idempotent.
- void PostFlagParsingInit();
-
- // Gets the random seed used at the start of the current test iteration.
- int random_seed() const { return random_seed_; }
-
- // Gets the random number generator.
- internal::Random* random() { return &random_; }
-
- // Shuffles all test cases, and the tests within each test case,
- // making sure that death tests are still run first.
- void ShuffleTests();
-
- // Restores the test cases and tests to their order before the first shuffle.
- void UnshuffleTests();
-
- // Returns the value of GTEST_FLAG(catch_exceptions) at the moment
- // UnitTest::Run() starts.
- bool catch_exceptions() const { return catch_exceptions_; }
-
- private:
- friend class ::testing::UnitTest;
-
- // Used by UnitTest::Run() to capture the state of
- // GTEST_FLAG(catch_exceptions) at the moment it starts.
- void set_catch_exceptions(bool value) { catch_exceptions_ = value; }
-
- // The UnitTest object that owns this implementation object.
- UnitTest* const parent_;
-
- // The working directory when the first TEST() or TEST_F() was
- // executed.
- internal::FilePath original_working_dir_;
-
- // The default test part result reporters.
- DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;
- DefaultPerThreadTestPartResultReporter
- default_per_thread_test_part_result_reporter_;
-
- // Points to (but doesn't own) the global test part result reporter.
- TestPartResultReporterInterface* global_test_part_result_repoter_;
-
- // Protects read and write access to global_test_part_result_reporter_.
- internal::Mutex global_test_part_result_reporter_mutex_;
-
- // Points to (but doesn't own) the per-thread test part result reporter.
- internal::ThreadLocal<TestPartResultReporterInterface*>
- per_thread_test_part_result_reporter_;
-
- // The vector of environments that need to be set-up/torn-down
- // before/after the tests are run.
- std::vector<Environment*> environments_;
-
- // The vector of TestCases in their original order. It owns the
- // elements in the vector.
- std::vector<TestCase*> test_cases_;
-
- // Provides a level of indirection for the test case list to allow
- // easy shuffling and restoring the test case order. The i-th
- // element of this vector is the index of the i-th test case in the
- // shuffled order.
- std::vector<int> test_case_indices_;
-
-#if GTEST_HAS_PARAM_TEST
- // ParameterizedTestRegistry object used to register value-parameterized
- // tests.
- internal::ParameterizedTestCaseRegistry parameterized_test_registry_;
-
- // Indicates whether RegisterParameterizedTests() has been called already.
- bool parameterized_tests_registered_;
-#endif // GTEST_HAS_PARAM_TEST
-
- // Index of the last death test case registered. Initially -1.
- int last_death_test_case_;
-
- // This points to the TestCase for the currently running test. It
- // changes as Google Test goes through one test case after another.
- // When no test is running, this is set to NULL and Google Test
- // stores assertion results in ad_hoc_test_result_. Initially NULL.
- TestCase* current_test_case_;
-
- // This points to the TestInfo for the currently running test. It
- // changes as Google Test goes through one test after another. When
- // no test is running, this is set to NULL and Google Test stores
- // assertion results in ad_hoc_test_result_. Initially NULL.
- TestInfo* current_test_info_;
-
- // Normally, a user only writes assertions inside a TEST or TEST_F,
- // or inside a function called by a TEST or TEST_F. Since Google
- // Test keeps track of which test is current running, it can
- // associate such an assertion with the test it belongs to.
- //
- // If an assertion is encountered when no TEST or TEST_F is running,
- // Google Test attributes the assertion result to an imaginary "ad hoc"
- // test, and records the result in ad_hoc_test_result_.
- TestResult ad_hoc_test_result_;
-
- // The list of event listeners that can be used to track events inside
- // Google Test.
- TestEventListeners listeners_;
-
- // The OS stack trace getter. Will be deleted when the UnitTest
- // object is destructed. By default, an OsStackTraceGetter is used,
- // but the user can set this field to use a custom getter if that is
- // desired.
- OsStackTraceGetterInterface* os_stack_trace_getter_;
-
- // True iff PostFlagParsingInit() has been called.
- bool post_flag_parse_init_performed_;
-
- // The random number seed used at the beginning of the test run.
- int random_seed_;
-
- // Our random number generator.
- internal::Random random_;
-
- // How long the test took to run, in milliseconds.
- TimeInMillis elapsed_time_;
-
-#if GTEST_HAS_DEATH_TEST
- // The decomposed components of the gtest_internal_run_death_test flag,
- // parsed when RUN_ALL_TESTS is called.
- internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;
- internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_;
-#endif // GTEST_HAS_DEATH_TEST
-
- // A per-thread stack of traces created by the SCOPED_TRACE() macro.
- internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;
-
- // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests()
- // starts.
- bool catch_exceptions_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl);
-}; // class UnitTestImpl
-
-// Convenience function for accessing the global UnitTest
-// implementation object.
-inline UnitTestImpl* GetUnitTestImpl() {
- return UnitTest::GetInstance()->impl();
-}
-
-#if GTEST_USES_SIMPLE_RE
-
-// Internal helper functions for implementing the simple regular
-// expression matcher.
-GTEST_API_ bool IsInSet(char ch, const char* str);
-GTEST_API_ bool IsAsciiDigit(char ch);
-GTEST_API_ bool IsAsciiPunct(char ch);
-GTEST_API_ bool IsRepeat(char ch);
-GTEST_API_ bool IsAsciiWhiteSpace(char ch);
-GTEST_API_ bool IsAsciiWordChar(char ch);
-GTEST_API_ bool IsValidEscape(char ch);
-GTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch);
-GTEST_API_ bool ValidateRegex(const char* regex);
-GTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str);
-GTEST_API_ bool MatchRepetitionAndRegexAtHead(
- bool escaped, char ch, char repeat, const char* regex, const char* str);
-GTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str);
-
-#endif // GTEST_USES_SIMPLE_RE
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv);
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv);
-
-#if GTEST_HAS_DEATH_TEST
-
-// Returns the message describing the last system error, regardless of the
-// platform.
-GTEST_API_ String GetLastErrnoDescription();
-
-# if GTEST_OS_WINDOWS
-// Provides leak-safe Windows kernel handle ownership.
-class AutoHandle {
- public:
- AutoHandle() : handle_(INVALID_HANDLE_VALUE) {}
- explicit AutoHandle(HANDLE handle) : handle_(handle) {}
-
- ~AutoHandle() { Reset(); }
-
- HANDLE Get() const { return handle_; }
- void Reset() { Reset(INVALID_HANDLE_VALUE); }
- void Reset(HANDLE handle) {
- if (handle != handle_) {
- if (handle_ != INVALID_HANDLE_VALUE)
- ::CloseHandle(handle_);
- handle_ = handle;
- }
- }
-
- private:
- HANDLE handle_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle);
-};
-# endif // GTEST_OS_WINDOWS
-
-// Attempts to parse a string into a positive integer pointed to by the
-// number parameter. Returns true if that is possible.
-// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use
-// it here.
-template <typename Integer>
-bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
- // Fail fast if the given string does not begin with a digit;
- // this bypasses strtoXXX's "optional leading whitespace and plus
- // or minus sign" semantics, which are undesirable here.
- if (str.empty() || !IsDigit(str[0])) {
- return false;
- }
- errno = 0;
-
- char* end;
- // BiggestConvertible is the largest integer type that system-provided
- // string-to-number conversion routines can return.
-
-# if GTEST_OS_WINDOWS && !defined(__GNUC__)
-
- // MSVC and C++ Builder define __int64 instead of the standard long long.
- typedef unsigned __int64 BiggestConvertible;
- const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10);
-
-# else
-
- typedef unsigned long long BiggestConvertible; // NOLINT
- const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);
-
-# endif // GTEST_OS_WINDOWS && !defined(__GNUC__)
-
- const bool parse_success = *end == '\0' && errno == 0;
-
- // TODO(vladl@google.com): Convert this to compile time assertion when it is
- // available.
- GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));
-
- const Integer result = static_cast<Integer>(parsed);
- if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {
- *number = result;
- return true;
- }
- return false;
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// TestResult contains some private methods that should be hidden from
-// Google Test user but are required for testing. This class allow our tests
-// to access them.
-//
-// This class is supplied only for the purpose of testing Google Test's own
-// constructs. Do not use it in user tests, either directly or indirectly.
-class TestResultAccessor {
- public:
- static void RecordProperty(TestResult* test_result,
- const TestProperty& property) {
- test_result->RecordProperty(property);
- }
-
- static void ClearTestPartResults(TestResult* test_result) {
- test_result->ClearTestPartResults();
- }
-
- static const std::vector<testing::TestPartResult>& test_part_results(
- const TestResult& test_result) {
- return test_result.test_part_results();
- }
-};
-
-} // namespace internal
-} // namespace testing
-
-#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-port.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-port.cc
deleted file mode 100644
index b860d4812..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-port.cc
+++ /dev/null
@@ -1,746 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/internal/gtest-port.h"
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h> // For TerminateProcess()
-#elif GTEST_OS_WINDOWS
-# include <io.h>
-# include <sys/stat.h>
-#else
-# include <unistd.h>
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_OS_MAC
-# include <mach/mach_init.h>
-# include <mach/task.h>
-# include <mach/vm_map.h>
-#endif // GTEST_OS_MAC
-
-#include "gtest/gtest-spi.h"
-#include "gtest/gtest-message.h"
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-string.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-namespace internal {
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
-const int kStdOutFileno = 1;
-const int kStdErrFileno = 2;
-#else
-const int kStdOutFileno = STDOUT_FILENO;
-const int kStdErrFileno = STDERR_FILENO;
-#endif // _MSC_VER
-
-#if GTEST_OS_MAC
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-size_t GetThreadCount() {
- const task_t task = mach_task_self();
- mach_msg_type_number_t thread_count;
- thread_act_array_t thread_list;
- const kern_return_t status = task_threads(task, &thread_list, &thread_count);
- if (status == KERN_SUCCESS) {
- // task_threads allocates resources in thread_list and we need to free them
- // to avoid leaks.
- vm_deallocate(task,
- reinterpret_cast<vm_address_t>(thread_list),
- sizeof(thread_t) * thread_count);
- return static_cast<size_t>(thread_count);
- } else {
- return 0;
- }
-}
-
-#else
-
-size_t GetThreadCount() {
- // There's no portable way to detect the number of threads, so we just
- // return 0 to indicate that we cannot detect it.
- return 0;
-}
-
-#endif // GTEST_OS_MAC
-
-#if GTEST_USES_POSIX_RE
-
-// Implements RE. Currently only needed for death tests.
-
-RE::~RE() {
- if (is_valid_) {
- // regfree'ing an invalid regex might crash because the content
- // of the regex is undefined. Since the regex's are essentially
- // the same, one cannot be valid (or invalid) without the other
- // being so too.
- regfree(&partial_regex_);
- regfree(&full_regex_);
- }
- free(const_cast<char*>(pattern_));
-}
-
-// Returns true iff regular expression re matches the entire str.
-bool RE::FullMatch(const char* str, const RE& re) {
- if (!re.is_valid_) return false;
-
- regmatch_t match;
- return regexec(&re.full_regex_, str, 1, &match, 0) == 0;
-}
-
-// Returns true iff regular expression re matches a substring of str
-// (including str itself).
-bool RE::PartialMatch(const char* str, const RE& re) {
- if (!re.is_valid_) return false;
-
- regmatch_t match;
- return regexec(&re.partial_regex_, str, 1, &match, 0) == 0;
-}
-
-// Initializes an RE from its string representation.
-void RE::Init(const char* regex) {
- pattern_ = posix::StrDup(regex);
-
- // Reserves enough bytes to hold the regular expression used for a
- // full match.
- const size_t full_regex_len = strlen(regex) + 10;
- char* const full_pattern = new char[full_regex_len];
-
- snprintf(full_pattern, full_regex_len, "^(%s)$", regex);
- is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;
- // We want to call regcomp(&partial_regex_, ...) even if the
- // previous expression returns false. Otherwise partial_regex_ may
- // not be properly initialized can may cause trouble when it's
- // freed.
- //
- // Some implementation of POSIX regex (e.g. on at least some
- // versions of Cygwin) doesn't accept the empty string as a valid
- // regex. We change it to an equivalent form "()" to be safe.
- if (is_valid_) {
- const char* const partial_regex = (*regex == '\0') ? "()" : regex;
- is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;
- }
- EXPECT_TRUE(is_valid_)
- << "Regular expression \"" << regex
- << "\" is not a valid POSIX Extended regular expression.";
-
- delete[] full_pattern;
-}
-
-#elif GTEST_USES_SIMPLE_RE
-
-// Returns true iff ch appears anywhere in str (excluding the
-// terminating '\0' character).
-bool IsInSet(char ch, const char* str) {
- return ch != '\0' && strchr(str, ch) != NULL;
-}
-
-// Returns true iff ch belongs to the given classification. Unlike
-// similar functions in <ctype.h>, these aren't affected by the
-// current locale.
-bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
-bool IsAsciiPunct(char ch) {
- return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~");
-}
-bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
-bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
-bool IsAsciiWordChar(char ch) {
- return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||
- ('0' <= ch && ch <= '9') || ch == '_';
-}
-
-// Returns true iff "\\c" is a supported escape sequence.
-bool IsValidEscape(char c) {
- return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW"));
-}
-
-// Returns true iff the given atom (specified by escaped and pattern)
-// matches ch. The result is undefined if the atom is invalid.
-bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
- if (escaped) { // "\\p" where p is pattern_char.
- switch (pattern_char) {
- case 'd': return IsAsciiDigit(ch);
- case 'D': return !IsAsciiDigit(ch);
- case 'f': return ch == '\f';
- case 'n': return ch == '\n';
- case 'r': return ch == '\r';
- case 's': return IsAsciiWhiteSpace(ch);
- case 'S': return !IsAsciiWhiteSpace(ch);
- case 't': return ch == '\t';
- case 'v': return ch == '\v';
- case 'w': return IsAsciiWordChar(ch);
- case 'W': return !IsAsciiWordChar(ch);
- }
- return IsAsciiPunct(pattern_char) && pattern_char == ch;
- }
-
- return (pattern_char == '.' && ch != '\n') || pattern_char == ch;
-}
-
-// Helper function used by ValidateRegex() to format error messages.
-String FormatRegexSyntaxError(const char* regex, int index) {
- return (Message() << "Syntax error at index " << index
- << " in simple regular expression \"" << regex << "\": ").GetString();
-}
-
-// Generates non-fatal failures and returns false if regex is invalid;
-// otherwise returns true.
-bool ValidateRegex(const char* regex) {
- if (regex == NULL) {
- // TODO(wan@google.com): fix the source file location in the
- // assertion failures to match where the regex is used in user
- // code.
- ADD_FAILURE() << "NULL is not a valid simple regular expression.";
- return false;
- }
-
- bool is_valid = true;
-
- // True iff ?, *, or + can follow the previous atom.
- bool prev_repeatable = false;
- for (int i = 0; regex[i]; i++) {
- if (regex[i] == '\\') { // An escape sequence
- i++;
- if (regex[i] == '\0') {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
- << "'\\' cannot appear at the end.";
- return false;
- }
-
- if (!IsValidEscape(regex[i])) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)
- << "invalid escape sequence \"\\" << regex[i] << "\".";
- is_valid = false;
- }
- prev_repeatable = true;
- } else { // Not an escape sequence.
- const char ch = regex[i];
-
- if (ch == '^' && i > 0) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'^' can only appear at the beginning.";
- is_valid = false;
- } else if (ch == '$' && regex[i + 1] != '\0') {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'$' can only appear at the end.";
- is_valid = false;
- } else if (IsInSet(ch, "()[]{}|")) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'" << ch << "' is unsupported.";
- is_valid = false;
- } else if (IsRepeat(ch) && !prev_repeatable) {
- ADD_FAILURE() << FormatRegexSyntaxError(regex, i)
- << "'" << ch << "' can only follow a repeatable token.";
- is_valid = false;
- }
-
- prev_repeatable = !IsInSet(ch, "^$?*+");
- }
- }
-
- return is_valid;
-}
-
-// Matches a repeated regex atom followed by a valid simple regular
-// expression. The regex atom is defined as c if escaped is false,
-// or \c otherwise. repeat is the repetition meta character (?, *,
-// or +). The behavior is undefined if str contains too many
-// characters to be indexable by size_t, in which case the test will
-// probably time out anyway. We are fine with this limitation as
-// std::string has it too.
-bool MatchRepetitionAndRegexAtHead(
- bool escaped, char c, char repeat, const char* regex,
- const char* str) {
- const size_t min_count = (repeat == '+') ? 1 : 0;
- const size_t max_count = (repeat == '?') ? 1 :
- static_cast<size_t>(-1) - 1;
- // We cannot call numeric_limits::max() as it conflicts with the
- // max() macro on Windows.
-
- for (size_t i = 0; i <= max_count; ++i) {
- // We know that the atom matches each of the first i characters in str.
- if (i >= min_count && MatchRegexAtHead(regex, str + i)) {
- // We have enough matches at the head, and the tail matches too.
- // Since we only care about *whether* the pattern matches str
- // (as opposed to *how* it matches), there is no need to find a
- // greedy match.
- return true;
- }
- if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i]))
- return false;
- }
- return false;
-}
-
-// Returns true iff regex matches a prefix of str. regex must be a
-// valid simple regular expression and not start with "^", or the
-// result is undefined.
-bool MatchRegexAtHead(const char* regex, const char* str) {
- if (*regex == '\0') // An empty regex matches a prefix of anything.
- return true;
-
- // "$" only matches the end of a string. Note that regex being
- // valid guarantees that there's nothing after "$" in it.
- if (*regex == '$')
- return *str == '\0';
-
- // Is the first thing in regex an escape sequence?
- const bool escaped = *regex == '\\';
- if (escaped)
- ++regex;
- if (IsRepeat(regex[1])) {
- // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so
- // here's an indirect recursion. It terminates as the regex gets
- // shorter in each recursion.
- return MatchRepetitionAndRegexAtHead(
- escaped, regex[0], regex[1], regex + 2, str);
- } else {
- // regex isn't empty, isn't "$", and doesn't start with a
- // repetition. We match the first atom of regex with the first
- // character of str and recurse.
- return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) &&
- MatchRegexAtHead(regex + 1, str + 1);
- }
-}
-
-// Returns true iff regex matches any substring of str. regex must be
-// a valid simple regular expression, or the result is undefined.
-//
-// The algorithm is recursive, but the recursion depth doesn't exceed
-// the regex length, so we won't need to worry about running out of
-// stack space normally. In rare cases the time complexity can be
-// exponential with respect to the regex length + the string length,
-// but usually it's must faster (often close to linear).
-bool MatchRegexAnywhere(const char* regex, const char* str) {
- if (regex == NULL || str == NULL)
- return false;
-
- if (*regex == '^')
- return MatchRegexAtHead(regex + 1, str);
-
- // A successful match can be anywhere in str.
- do {
- if (MatchRegexAtHead(regex, str))
- return true;
- } while (*str++ != '\0');
- return false;
-}
-
-// Implements the RE class.
-
-RE::~RE() {
- free(const_cast<char*>(pattern_));
- free(const_cast<char*>(full_pattern_));
-}
-
-// Returns true iff regular expression re matches the entire str.
-bool RE::FullMatch(const char* str, const RE& re) {
- return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);
-}
-
-// Returns true iff regular expression re matches a substring of str
-// (including str itself).
-bool RE::PartialMatch(const char* str, const RE& re) {
- return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);
-}
-
-// Initializes an RE from its string representation.
-void RE::Init(const char* regex) {
- pattern_ = full_pattern_ = NULL;
- if (regex != NULL) {
- pattern_ = posix::StrDup(regex);
- }
-
- is_valid_ = ValidateRegex(regex);
- if (!is_valid_) {
- // No need to calculate the full pattern when the regex is invalid.
- return;
- }
-
- const size_t len = strlen(regex);
- // Reserves enough bytes to hold the regular expression used for a
- // full match: we need space to prepend a '^', append a '$', and
- // terminate the string with '\0'.
- char* buffer = static_cast<char*>(malloc(len + 3));
- full_pattern_ = buffer;
-
- if (*regex != '^')
- *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'.
-
- // We don't use snprintf or strncpy, as they trigger a warning when
- // compiled with VC++ 8.0.
- memcpy(buffer, regex, len);
- buffer += len;
-
- if (len == 0 || regex[len - 1] != '$')
- *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'.
-
- *buffer = '\0';
-}
-
-#endif // GTEST_USES_POSIX_RE
-
-const char kUnknownFile[] = "unknown file";
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {
- const char* const file_name = file == NULL ? kUnknownFile : file;
-
- if (line < 0) {
- return String::Format("%s:", file_name).c_str();
- }
-#ifdef _MSC_VER
- return String::Format("%s(%d):", file_name, line).c_str();
-#else
- return String::Format("%s:%d:", file_name, line).c_str();
-#endif // _MSC_VER
-}
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-// Note that FormatCompilerIndependentFileLocation() does NOT append colon
-// to the file location it produces, unlike FormatFileLocation().
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
- const char* file, int line) {
- const char* const file_name = file == NULL ? kUnknownFile : file;
-
- if (line < 0)
- return file_name;
- else
- return String::Format("%s:%d", file_name, line).c_str();
-}
-
-
-GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)
- : severity_(severity) {
- const char* const marker =
- severity == GTEST_INFO ? "[ INFO ]" :
- severity == GTEST_WARNING ? "[WARNING]" :
- severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]";
- GetStream() << ::std::endl << marker << " "
- << FormatFileLocation(file, line).c_str() << ": ";
-}
-
-// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
-GTestLog::~GTestLog() {
- GetStream() << ::std::endl;
- if (severity_ == GTEST_FATAL) {
- fflush(stderr);
- posix::Abort();
- }
-}
-// Disable Microsoft deprecation warnings for POSIX functions called from
-// this class (creat, dup, dup2, and close)
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4996)
-#endif // _MSC_VER
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Object that captures an output stream (stdout/stderr).
-class CapturedStream {
- public:
- // The ctor redirects the stream to a temporary file.
- CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
-
-# if GTEST_OS_WINDOWS
- char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT
- char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT
-
- ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
- const UINT success = ::GetTempFileNameA(temp_dir_path,
- "gtest_redir",
- 0, // Generate unique file name.
- temp_file_path);
- GTEST_CHECK_(success != 0)
- << "Unable to create a temporary file in " << temp_dir_path;
- const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
- GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
- << temp_file_path;
- filename_ = temp_file_path;
-# else
- // There's no guarantee that a test has write access to the
- // current directory, so we create the temporary file in the /tmp
- // directory instead.
- char name_template[] = "/tmp/captured_stream.XXXXXX";
- const int captured_fd = mkstemp(name_template);
- filename_ = name_template;
-# endif // GTEST_OS_WINDOWS
- fflush(NULL);
- dup2(captured_fd, fd_);
- close(captured_fd);
- }
-
- ~CapturedStream() {
- remove(filename_.c_str());
- }
-
- String GetCapturedString() {
- if (uncaptured_fd_ != -1) {
- // Restores the original stream.
- fflush(NULL);
- dup2(uncaptured_fd_, fd_);
- close(uncaptured_fd_);
- uncaptured_fd_ = -1;
- }
-
- FILE* const file = posix::FOpen(filename_.c_str(), "r");
- const String content = ReadEntireFile(file);
- posix::FClose(file);
- return content;
- }
-
- private:
- // Reads the entire content of a file as a String.
- static String ReadEntireFile(FILE* file);
-
- // Returns the size (in bytes) of a file.
- static size_t GetFileSize(FILE* file);
-
- const int fd_; // A stream to capture.
- int uncaptured_fd_;
- // Name of the temporary file holding the stderr output.
- ::std::string filename_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream);
-};
-
-// Returns the size (in bytes) of a file.
-size_t CapturedStream::GetFileSize(FILE* file) {
- fseek(file, 0, SEEK_END);
- return static_cast<size_t>(ftell(file));
-}
-
-// Reads the entire content of a file as a string.
-String CapturedStream::ReadEntireFile(FILE* file) {
- const size_t file_size = GetFileSize(file);
- char* const buffer = new char[file_size];
-
- size_t bytes_last_read = 0; // # of bytes read in the last fread()
- size_t bytes_read = 0; // # of bytes read so far
-
- fseek(file, 0, SEEK_SET);
-
- // Keeps reading the file until we cannot read further or the
- // pre-determined file size is reached.
- do {
- bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);
- bytes_read += bytes_last_read;
- } while (bytes_last_read > 0 && bytes_read < file_size);
-
- const String content(buffer, bytes_read);
- delete[] buffer;
-
- return content;
-}
-
-# ifdef _MSC_VER
-# pragma warning(pop)
-# endif // _MSC_VER
-
-static CapturedStream* g_captured_stderr = NULL;
-static CapturedStream* g_captured_stdout = NULL;
-
-// Starts capturing an output stream (stdout/stderr).
-void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) {
- if (*stream != NULL) {
- GTEST_LOG_(FATAL) << "Only one " << stream_name
- << " capturer can exist at a time.";
- }
- *stream = new CapturedStream(fd);
-}
-
-// Stops capturing the output stream and returns the captured string.
-String GetCapturedStream(CapturedStream** captured_stream) {
- const String content = (*captured_stream)->GetCapturedString();
-
- delete *captured_stream;
- *captured_stream = NULL;
-
- return content;
-}
-
-// Starts capturing stdout.
-void CaptureStdout() {
- CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout);
-}
-
-// Starts capturing stderr.
-void CaptureStderr() {
- CaptureStream(kStdErrFileno, "stderr", &g_captured_stderr);
-}
-
-// Stops capturing stdout and returns the captured string.
-String GetCapturedStdout() { return GetCapturedStream(&g_captured_stdout); }
-
-// Stops capturing stderr and returns the captured string.
-String GetCapturedStderr() { return GetCapturedStream(&g_captured_stderr); }
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-#if GTEST_HAS_DEATH_TEST
-
-// A copy of all command line arguments. Set by InitGoogleTest().
-::std::vector<String> g_argvs;
-
-// Returns the command line as a vector of strings.
-const ::std::vector<String>& GetArgvs() { return g_argvs; }
-
-#endif // GTEST_HAS_DEATH_TEST
-
-#if GTEST_OS_WINDOWS_MOBILE
-namespace posix {
-void Abort() {
- DebugBreak();
- TerminateProcess(GetCurrentProcess(), 1);
-}
-} // namespace posix
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Returns the name of the environment variable corresponding to the
-// given flag. For example, FlagToEnvVar("foo") will return
-// "GTEST_FOO" in the open-source version.
-static String FlagToEnvVar(const char* flag) {
- const String full_flag =
- (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
-
- Message env_var;
- for (size_t i = 0; i != full_flag.length(); i++) {
- env_var << ToUpper(full_flag.c_str()[i]);
- }
-
- return env_var.GetString();
-}
-
-// Parses 'str' for a 32-bit signed integer. If successful, writes
-// the result to *value and returns true; otherwise leaves *value
-// unchanged and returns false.
-bool ParseInt32(const Message& src_text, const char* str, Int32* value) {
- // Parses the environment variable as a decimal integer.
- char* end = NULL;
- const long long_value = strtol(str, &end, 10); // NOLINT
-
- // Has strtol() consumed all characters in the string?
- if (*end != '\0') {
- // No - an invalid character was encountered.
- Message msg;
- msg << "WARNING: " << src_text
- << " is expected to be a 32-bit integer, but actually"
- << " has value \"" << str << "\".\n";
- printf("%s", msg.GetString().c_str());
- fflush(stdout);
- return false;
- }
-
- // Is the parsed value in the range of an Int32?
- const Int32 result = static_cast<Int32>(long_value);
- if (long_value == LONG_MAX || long_value == LONG_MIN ||
- // The parsed value overflows as a long. (strtol() returns
- // LONG_MAX or LONG_MIN when the input overflows.)
- result != long_value
- // The parsed value overflows as an Int32.
- ) {
- Message msg;
- msg << "WARNING: " << src_text
- << " is expected to be a 32-bit integer, but actually"
- << " has value " << str << ", which overflows.\n";
- printf("%s", msg.GetString().c_str());
- fflush(stdout);
- return false;
- }
-
- *value = result;
- return true;
-}
-
-// Reads and returns the Boolean environment variable corresponding to
-// the given flag; if it's not set, returns default_value.
-//
-// The value is considered true iff it's not "0".
-bool BoolFromGTestEnv(const char* flag, bool default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const string_value = posix::GetEnv(env_var.c_str());
- return string_value == NULL ?
- default_value : strcmp(string_value, "0") != 0;
-}
-
-// Reads and returns a 32-bit integer stored in the environment
-// variable corresponding to the given flag; if it isn't set or
-// doesn't represent a valid 32-bit integer, returns default_value.
-Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const string_value = posix::GetEnv(env_var.c_str());
- if (string_value == NULL) {
- // The environment variable is not set.
- return default_value;
- }
-
- Int32 result = default_value;
- if (!ParseInt32(Message() << "Environment variable " << env_var,
- string_value, &result)) {
- printf("The default value %s is used.\n",
- (Message() << default_value).GetString().c_str());
- fflush(stdout);
- return default_value;
- }
-
- return result;
-}
-
-// Reads and returns the string environment variable corresponding to
-// the given flag; if it's not set, returns default_value.
-const char* StringFromGTestEnv(const char* flag, const char* default_value) {
- const String env_var = FlagToEnvVar(flag);
- const char* const value = posix::GetEnv(env_var.c_str());
- return value == NULL ? default_value : value;
-}
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-printers.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-printers.cc
deleted file mode 100644
index ed63c7b3b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-printers.cc
+++ /dev/null
@@ -1,356 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// It uses the << operator when possible, and prints the bytes in the
-// object otherwise. A user can override its behavior for a class
-// type Foo by defining either operator<<(::std::ostream&, const Foo&)
-// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that
-// defines Foo.
-
-#include "gtest/gtest-printers.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <ostream> // NOLINT
-#include <string>
-#include "gtest/internal/gtest-port.h"
-
-namespace testing {
-
-namespace {
-
-using ::std::ostream;
-
-#if GTEST_OS_WINDOWS_MOBILE // Windows CE does not define _snprintf_s.
-# define snprintf _snprintf
-#elif _MSC_VER >= 1400 // VC 8.0 and later deprecate snprintf and _snprintf.
-# define snprintf _snprintf_s
-#elif _MSC_VER
-# define snprintf _snprintf
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Prints a segment of bytes in the given object.
-void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,
- size_t count, ostream* os) {
- char text[5] = "";
- for (size_t i = 0; i != count; i++) {
- const size_t j = start + i;
- if (i != 0) {
- // Organizes the bytes into groups of 2 for easy parsing by
- // human.
- if ((j % 2) == 0)
- *os << ' ';
- else
- *os << '-';
- }
- snprintf(text, sizeof(text), "%02X", obj_bytes[j]);
- *os << text;
- }
-}
-
-// Prints the bytes in the given value to the given ostream.
-void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
- ostream* os) {
- // Tells the user how big the object is.
- *os << count << "-byte object <";
-
- const size_t kThreshold = 132;
- const size_t kChunkSize = 64;
- // If the object size is bigger than kThreshold, we'll have to omit
- // some details by printing only the first and the last kChunkSize
- // bytes.
- // TODO(wan): let the user control the threshold using a flag.
- if (count < kThreshold) {
- PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
- } else {
- PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
- *os << " ... ";
- // Rounds up to 2-byte boundary.
- const size_t resume_pos = (count - kChunkSize + 1)/2*2;
- PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
- }
- *os << ">";
-}
-
-} // namespace
-
-namespace internal2 {
-
-// Delegates to PrintBytesInObjectToImpl() to print the bytes in the
-// given object. The delegation simplifies the implementation, which
-// uses the << operator and thus is easier done outside of the
-// ::testing::internal namespace, which contains a << operator that
-// sometimes conflicts with the one in STL.
-void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,
- ostream* os) {
- PrintBytesInObjectToImpl(obj_bytes, count, os);
-}
-
-} // namespace internal2
-
-namespace internal {
-
-// Depending on the value of a char (or wchar_t), we print it in one
-// of three formats:
-// - as is if it's a printable ASCII (e.g. 'a', '2', ' '),
-// - as a hexidecimal escape sequence (e.g. '\x7F'), or
-// - as a special escape sequence (e.g. '\r', '\n').
-enum CharFormat {
- kAsIs,
- kHexEscape,
- kSpecialEscape
-};
-
-// Returns true if c is a printable ASCII character. We test the
-// value of c directly instead of calling isprint(), which is buggy on
-// Windows Mobile.
-inline bool IsPrintableAscii(wchar_t c) {
- return 0x20 <= c && c <= 0x7E;
-}
-
-// Prints a wide or narrow char c as a character literal without the
-// quotes, escaping it when necessary; returns how c was formatted.
-// The template argument UnsignedChar is the unsigned version of Char,
-// which is the type of c.
-template <typename UnsignedChar, typename Char>
-static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
- switch (static_cast<wchar_t>(c)) {
- case L'\0':
- *os << "\\0";
- break;
- case L'\'':
- *os << "\\'";
- break;
- case L'\\':
- *os << "\\\\";
- break;
- case L'\a':
- *os << "\\a";
- break;
- case L'\b':
- *os << "\\b";
- break;
- case L'\f':
- *os << "\\f";
- break;
- case L'\n':
- *os << "\\n";
- break;
- case L'\r':
- *os << "\\r";
- break;
- case L'\t':
- *os << "\\t";
- break;
- case L'\v':
- *os << "\\v";
- break;
- default:
- if (IsPrintableAscii(c)) {
- *os << static_cast<char>(c);
- return kAsIs;
- } else {
- *os << String::Format("\\x%X", static_cast<UnsignedChar>(c));
- return kHexEscape;
- }
- }
- return kSpecialEscape;
-}
-
-// Prints a char c as if it's part of a string literal, escaping it when
-// necessary; returns how c was formatted.
-static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
- switch (c) {
- case L'\'':
- *os << "'";
- return kAsIs;
- case L'"':
- *os << "\\\"";
- return kSpecialEscape;
- default:
- return PrintAsCharLiteralTo<wchar_t>(c, os);
- }
-}
-
-// Prints a char c as if it's part of a string literal, escaping it when
-// necessary; returns how c was formatted.
-static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
- return PrintAsWideStringLiteralTo(static_cast<unsigned char>(c), os);
-}
-
-// Prints a wide or narrow character c and its code. '\0' is printed
-// as "'\\0'", other unprintable characters are also properly escaped
-// using the standard C++ escape sequence. The template argument
-// UnsignedChar is the unsigned version of Char, which is the type of c.
-template <typename UnsignedChar, typename Char>
-void PrintCharAndCodeTo(Char c, ostream* os) {
- // First, print c as a literal in the most readable form we can find.
- *os << ((sizeof(c) > 1) ? "L'" : "'");
- const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
- *os << "'";
-
- // To aid user debugging, we also print c's code in decimal, unless
- // it's 0 (in which case c was printed as '\\0', making the code
- // obvious).
- if (c == 0)
- return;
- *os << " (" << String::Format("%d", c).c_str();
-
- // For more convenience, we print c's code again in hexidecimal,
- // unless c was already printed in the form '\x##' or the code is in
- // [1, 9].
- if (format == kHexEscape || (1 <= c && c <= 9)) {
- // Do nothing.
- } else {
- *os << String::Format(", 0x%X",
- static_cast<UnsignedChar>(c)).c_str();
- }
- *os << ")";
-}
-
-void PrintTo(unsigned char c, ::std::ostream* os) {
- PrintCharAndCodeTo<unsigned char>(c, os);
-}
-void PrintTo(signed char c, ::std::ostream* os) {
- PrintCharAndCodeTo<unsigned char>(c, os);
-}
-
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its code. L'\0' is printed as "L'\\0'".
-void PrintTo(wchar_t wc, ostream* os) {
- PrintCharAndCodeTo<wchar_t>(wc, os);
-}
-
-// Prints the given array of characters to the ostream.
-// The array starts at *begin, the length is len, it may include '\0' characters
-// and may not be null-terminated.
-static void PrintCharsAsStringTo(const char* begin, size_t len, ostream* os) {
- *os << "\"";
- bool is_previous_hex = false;
- for (size_t index = 0; index < len; ++index) {
- const char cur = begin[index];
- if (is_previous_hex && IsXDigit(cur)) {
- // Previous character is of '\x..' form and this character can be
- // interpreted as another hexadecimal digit in its number. Break string to
- // disambiguate.
- *os << "\" \"";
- }
- is_previous_hex = PrintAsNarrowStringLiteralTo(cur, os) == kHexEscape;
- }
- *os << "\"";
-}
-
-// Prints a (const) char array of 'len' elements, starting at address 'begin'.
-void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
- PrintCharsAsStringTo(begin, len, os);
-}
-
-// Prints the given array of wide characters to the ostream.
-// The array starts at *begin, the length is len, it may include L'\0'
-// characters and may not be null-terminated.
-static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
- ostream* os) {
- *os << "L\"";
- bool is_previous_hex = false;
- for (size_t index = 0; index < len; ++index) {
- const wchar_t cur = begin[index];
- if (is_previous_hex && isascii(cur) && IsXDigit(static_cast<char>(cur))) {
- // Previous character is of '\x..' form and this character can be
- // interpreted as another hexadecimal digit in its number. Break string to
- // disambiguate.
- *os << "\" L\"";
- }
- is_previous_hex = PrintAsWideStringLiteralTo(cur, os) == kHexEscape;
- }
- *os << "\"";
-}
-
-// Prints the given C string to the ostream.
-void PrintTo(const char* s, ostream* os) {
- if (s == NULL) {
- *os << "NULL";
- } else {
- *os << ImplicitCast_<const void*>(s) << " pointing to ";
- PrintCharsAsStringTo(s, strlen(s), os);
- }
-}
-
-// MSVC compiler can be configured to define whar_t as a typedef
-// of unsigned short. Defining an overload for const wchar_t* in that case
-// would cause pointers to unsigned shorts be printed as wide strings,
-// possibly accessing more memory than intended and causing invalid
-// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when
-// wchar_t is implemented as a native type.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Prints the given wide C string to the ostream.
-void PrintTo(const wchar_t* s, ostream* os) {
- if (s == NULL) {
- *os << "NULL";
- } else {
- *os << ImplicitCast_<const void*>(s) << " pointing to ";
- PrintWideCharsAsStringTo(s, wcslen(s), os);
- }
-}
-#endif // wchar_t is native
-
-// Prints a ::string object.
-#if GTEST_HAS_GLOBAL_STRING
-void PrintStringTo(const ::string& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-void PrintStringTo(const ::std::string& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-
-// Prints a ::wstring object.
-#if GTEST_HAS_GLOBAL_WSTRING
-void PrintWideStringTo(const ::wstring& s, ostream* os) {
- PrintWideCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
- PrintWideCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-} // namespace internal
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-test-part.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-test-part.cc
deleted file mode 100644
index 5ddc67c1c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-test-part.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// The Google C++ Testing Framework (Google Test)
-
-#include "gtest/gtest-test-part.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-using internal::GetUnitTestImpl;
-
-// Gets the summary of the failure message by omitting the stack trace
-// in it.
-internal::String TestPartResult::ExtractSummary(const char* message) {
- const char* const stack_trace = strstr(message, internal::kStackTraceMarker);
- return stack_trace == NULL ? internal::String(message) :
- internal::String(message, stack_trace - message);
-}
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result) {
- return os
- << result.file_name() << ":" << result.line_number() << ": "
- << (result.type() == TestPartResult::kSuccess ? "Success" :
- result.type() == TestPartResult::kFatalFailure ? "Fatal failure" :
- "Non-fatal failure") << ":\n"
- << result.message() << std::endl;
-}
-
-// Appends a TestPartResult to the array.
-void TestPartResultArray::Append(const TestPartResult& result) {
- array_.push_back(result);
-}
-
-// Returns the TestPartResult at the given index (0-based).
-const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const {
- if (index < 0 || index >= size()) {
- printf("\nInvalid index (%d) into TestPartResultArray.\n", index);
- internal::posix::Abort();
- }
-
- return array_[index];
-}
-
-// Returns the number of TestPartResult objects in the array.
-int TestPartResultArray::size() const {
- return static_cast<int>(array_.size());
-}
-
-namespace internal {
-
-HasNewFatalFailureHelper::HasNewFatalFailureHelper()
- : has_new_fatal_failure_(false),
- original_reporter_(GetUnitTestImpl()->
- GetTestPartResultReporterForCurrentThread()) {
- GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);
-}
-
-HasNewFatalFailureHelper::~HasNewFatalFailureHelper() {
- GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(
- original_reporter_);
-}
-
-void HasNewFatalFailureHelper::ReportTestPartResult(
- const TestPartResult& result) {
- if (result.fatally_failed())
- has_new_fatal_failure_ = true;
- original_reporter_->ReportTestPartResult(result);
-}
-
-} // namespace internal
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-typed-test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-typed-test.cc
deleted file mode 100644
index a5cc88f92..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest-typed-test.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/gtest-typed-test.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-namespace internal {
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// Skips to the first non-space char in str. Returns an empty string if str
-// contains only whitespace characters.
-static const char* SkipSpaces(const char* str) {
- while (IsSpace(*str))
- str++;
- return str;
-}
-
-// Verifies that registered_tests match the test names in
-// defined_test_names_; returns registered_tests if successful, or
-// aborts the program otherwise.
-const char* TypedTestCasePState::VerifyRegisteredTestNames(
- const char* file, int line, const char* registered_tests) {
- typedef ::std::set<const char*>::const_iterator DefinedTestIter;
- registered_ = true;
-
- // Skip initial whitespace in registered_tests since some
- // preprocessors prefix stringizied literals with whitespace.
- registered_tests = SkipSpaces(registered_tests);
-
- Message errors;
- ::std::set<String> tests;
- for (const char* names = registered_tests; names != NULL;
- names = SkipComma(names)) {
- const String name = GetPrefixUntilComma(names);
- if (tests.count(name) != 0) {
- errors << "Test " << name << " is listed more than once.\n";
- continue;
- }
-
- bool found = false;
- for (DefinedTestIter it = defined_test_names_.begin();
- it != defined_test_names_.end();
- ++it) {
- if (name == *it) {
- found = true;
- break;
- }
- }
-
- if (found) {
- tests.insert(name);
- } else {
- errors << "No test named " << name
- << " can be found in this test case.\n";
- }
- }
-
- for (DefinedTestIter it = defined_test_names_.begin();
- it != defined_test_names_.end();
- ++it) {
- if (tests.count(*it) == 0) {
- errors << "You forgot to list test " << *it << ".\n";
- }
- }
-
- const String& errors_str = errors.GetString();
- if (errors_str != "") {
- fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
- errors_str.c_str());
- fflush(stderr);
- posix::Abort();
- }
-
- return registered_tests;
-}
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest.cc
deleted file mode 100644
index 904d9d747..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest.cc
+++ /dev/null
@@ -1,4898 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// The Google C++ Testing Framework (Google Test)
-
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-#include <ctype.h>
-#include <math.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <wctype.h>
-
-#include <algorithm>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <vector>
-
-#if GTEST_OS_LINUX
-
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-
-# include <fcntl.h> // NOLINT
-# include <limits.h> // NOLINT
-# include <sched.h> // NOLINT
-// Declares vsnprintf(). This header is not available on Windows.
-# include <strings.h> // NOLINT
-# include <sys/mman.h> // NOLINT
-# include <sys/time.h> // NOLINT
-# include <unistd.h> // NOLINT
-# include <string>
-
-#elif GTEST_OS_SYMBIAN
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-
-#elif GTEST_OS_ZOS
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-
-// On z/OS we additionally need strings.h for strcasecmp.
-# include <strings.h> // NOLINT
-
-#elif GTEST_OS_WINDOWS_MOBILE // We are on Windows CE.
-
-# include <windows.h> // NOLINT
-
-#elif GTEST_OS_WINDOWS // We are on Windows proper.
-
-# include <io.h> // NOLINT
-# include <sys/timeb.h> // NOLINT
-# include <sys/types.h> // NOLINT
-# include <sys/stat.h> // NOLINT
-
-# if GTEST_OS_WINDOWS_MINGW
-// MinGW has gettimeofday() but not _ftime64().
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-// TODO(kenton@google.com): There are other ways to get the time on
-// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW
-// supports these. consider using them instead.
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-# include <sys/time.h> // NOLINT
-# endif // GTEST_OS_WINDOWS_MINGW
-
-// cpplint thinks that the header is already included, so we want to
-// silence it.
-# include <windows.h> // NOLINT
-
-#else
-
-// Assume other platforms have gettimeofday().
-// TODO(kenton@google.com): Use autoconf to detect availability of
-// gettimeofday().
-# define GTEST_HAS_GETTIMEOFDAY_ 1
-
-// cpplint thinks that the header is already included, so we want to
-// silence it.
-# include <sys/time.h> // NOLINT
-# include <unistd.h> // NOLINT
-
-#endif // GTEST_OS_LINUX
-
-#if GTEST_HAS_EXCEPTIONS
-# include <stdexcept>
-#endif
-
-#if GTEST_CAN_STREAM_RESULTS_
-# include <arpa/inet.h> // NOLINT
-# include <netdb.h> // NOLINT
-#endif
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-#if GTEST_OS_WINDOWS
-# define vsnprintf _vsnprintf
-#endif // GTEST_OS_WINDOWS
-
-namespace testing {
-
-using internal::CountIf;
-using internal::ForEach;
-using internal::GetElementOr;
-using internal::Shuffle;
-
-// Constants.
-
-// A test whose test case name or test name matches this filter is
-// disabled and not run.
-static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*";
-
-// A test case whose name matches this filter is considered a death
-// test case and will be run before test cases whose name doesn't
-// match this filter.
-static const char kDeathTestCaseFilter[] = "*DeathTest:*DeathTest/*";
-
-// A test filter that matches everything.
-static const char kUniversalFilter[] = "*";
-
-// The default output file for XML output.
-static const char kDefaultOutputFile[] = "test_detail.xml";
-
-// The environment variable name for the test shard index.
-static const char kTestShardIndex[] = "GTEST_SHARD_INDEX";
-// The environment variable name for the total number of test shards.
-static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS";
-// The environment variable name for the test shard status file.
-static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE";
-
-namespace internal {
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-const char kStackTraceMarker[] = "\nStack trace:\n";
-
-// g_help_flag is true iff the --help flag or an equivalent form is
-// specified on the command line.
-bool g_help_flag = false;
-
-} // namespace internal
-
-GTEST_DEFINE_bool_(
- also_run_disabled_tests,
- internal::BoolFromGTestEnv("also_run_disabled_tests", false),
- "Run disabled tests too, in addition to the tests normally being run.");
-
-GTEST_DEFINE_bool_(
- break_on_failure,
- internal::BoolFromGTestEnv("break_on_failure", false),
- "True iff a failed assertion should be a debugger break-point.");
-
-GTEST_DEFINE_bool_(
- catch_exceptions,
- internal::BoolFromGTestEnv("catch_exceptions", true),
- "True iff " GTEST_NAME_
- " should catch exceptions and treat them as test failures.");
-
-GTEST_DEFINE_string_(
- color,
- internal::StringFromGTestEnv("color", "auto"),
- "Whether to use colors in the output. Valid values: yes, no, "
- "and auto. 'auto' means to use colors if the output is "
- "being sent to a terminal and the TERM environment variable "
- "is set to xterm, xterm-color, xterm-256color, linux or cygwin.");
-
-GTEST_DEFINE_string_(
- filter,
- internal::StringFromGTestEnv("filter", kUniversalFilter),
- "A colon-separated list of glob (not regex) patterns "
- "for filtering the tests to run, optionally followed by a "
- "'-' and a : separated list of negative patterns (tests to "
- "exclude). A test is run if it matches one of the positive "
- "patterns and does not match any of the negative patterns.");
-
-GTEST_DEFINE_bool_(list_tests, false,
- "List all tests without running them.");
-
-GTEST_DEFINE_string_(
- output,
- internal::StringFromGTestEnv("output", ""),
- "A format (currently must be \"xml\"), optionally followed "
- "by a colon and an output file name or directory. A directory "
- "is indicated by a trailing pathname separator. "
- "Examples: \"xml:filename.xml\", \"xml::directoryname/\". "
- "If a directory is specified, output files will be created "
- "within that directory, with file-names based on the test "
- "executable's name and, if necessary, made unique by adding "
- "digits.");
-
-GTEST_DEFINE_bool_(
- print_time,
- internal::BoolFromGTestEnv("print_time", true),
- "True iff " GTEST_NAME_
- " should display elapsed time in text output.");
-
-GTEST_DEFINE_int32_(
- random_seed,
- internal::Int32FromGTestEnv("random_seed", 0),
- "Random number seed to use when shuffling test orders. Must be in range "
- "[1, 99999], or 0 to use a seed based on the current time.");
-
-GTEST_DEFINE_int32_(
- repeat,
- internal::Int32FromGTestEnv("repeat", 1),
- "How many times to repeat each test. Specify a negative number "
- "for repeating forever. Useful for shaking out flaky tests.");
-
-GTEST_DEFINE_bool_(
- show_internal_stack_frames, false,
- "True iff " GTEST_NAME_ " should include internal stack frames when "
- "printing test failure stack traces.");
-
-GTEST_DEFINE_bool_(
- shuffle,
- internal::BoolFromGTestEnv("shuffle", false),
- "True iff " GTEST_NAME_
- " should randomize tests' order on every run.");
-
-GTEST_DEFINE_int32_(
- stack_trace_depth,
- internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth),
- "The maximum number of stack frames to print when an "
- "assertion fails. The valid range is 0 through 100, inclusive.");
-
-GTEST_DEFINE_string_(
- stream_result_to,
- internal::StringFromGTestEnv("stream_result_to", ""),
- "This flag specifies the host name and the port number on which to stream "
- "test results. Example: \"localhost:555\". The flag is effective only on "
- "Linux.");
-
-GTEST_DEFINE_bool_(
- throw_on_failure,
- internal::BoolFromGTestEnv("throw_on_failure", false),
- "When this flag is specified, a failed assertion will throw an exception "
- "if exceptions are enabled or exit the program with a non-zero code "
- "otherwise.");
-
-namespace internal {
-
-// Generates a random number from [0, range), using a Linear
-// Congruential Generator (LCG). Crashes if 'range' is 0 or greater
-// than kMaxRange.
-UInt32 Random::Generate(UInt32 range) {
- // These constants are the same as are used in glibc's rand(3).
- state_ = (1103515245U*state_ + 12345U) % kMaxRange;
-
- GTEST_CHECK_(range > 0)
- << "Cannot generate a number in the range [0, 0).";
- GTEST_CHECK_(range <= kMaxRange)
- << "Generation of a number in [0, " << range << ") was requested, "
- << "but this can only generate numbers in [0, " << kMaxRange << ").";
-
- // Converting via modulus introduces a bit of downward bias, but
- // it's simple, and a linear congruential generator isn't too good
- // to begin with.
- return state_ % range;
-}
-
-// GTestIsInitialized() returns true iff the user has initialized
-// Google Test. Useful for catching the user mistake of not initializing
-// Google Test before calling RUN_ALL_TESTS().
-//
-// A user must call testing::InitGoogleTest() to initialize Google
-// Test. g_init_gtest_count is set to the number of times
-// InitGoogleTest() has been called. We don't protect this variable
-// under a mutex as it is only accessed in the main thread.
-int g_init_gtest_count = 0;
-static bool GTestIsInitialized() { return g_init_gtest_count != 0; }
-
-// Iterates over a vector of TestCases, keeping a running sum of the
-// results of calling a given int-returning method on each.
-// Returns the sum.
-static int SumOverTestCaseList(const std::vector<TestCase*>& case_list,
- int (TestCase::*method)() const) {
- int sum = 0;
- for (size_t i = 0; i < case_list.size(); i++) {
- sum += (case_list[i]->*method)();
- }
- return sum;
-}
-
-// Returns true iff the test case passed.
-static bool TestCasePassed(const TestCase* test_case) {
- return test_case->should_run() && test_case->Passed();
-}
-
-// Returns true iff the test case failed.
-static bool TestCaseFailed(const TestCase* test_case) {
- return test_case->should_run() && test_case->Failed();
-}
-
-// Returns true iff test_case contains at least one test that should
-// run.
-static bool ShouldRunTestCase(const TestCase* test_case) {
- return test_case->should_run();
-}
-
-// AssertHelper constructor.
-AssertHelper::AssertHelper(TestPartResult::Type type,
- const char* file,
- int line,
- const char* message)
- : data_(new AssertHelperData(type, file, line, message)) {
-}
-
-AssertHelper::~AssertHelper() {
- delete data_;
-}
-
-// Message assignment, for assertion streaming support.
-void AssertHelper::operator=(const Message& message) const {
- UnitTest::GetInstance()->
- AddTestPartResult(data_->type, data_->file, data_->line,
- AppendUserMessage(data_->message, message),
- UnitTest::GetInstance()->impl()
- ->CurrentOsStackTraceExceptTop(1)
- // Skips the stack frame for this function itself.
- ); // NOLINT
-}
-
-// Mutex for linked pointers.
-GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);
-
-// Application pathname gotten in InitGoogleTest.
-String g_executable_path;
-
-// Returns the current application's name, removing directory path if that
-// is present.
-FilePath GetCurrentExecutableName() {
- FilePath result;
-
-#if GTEST_OS_WINDOWS
- result.Set(FilePath(g_executable_path).RemoveExtension("exe"));
-#else
- result.Set(FilePath(g_executable_path));
-#endif // GTEST_OS_WINDOWS
-
- return result.RemoveDirectoryName();
-}
-
-// Functions for processing the gtest_output flag.
-
-// Returns the output format, or "" for normal printed output.
-String UnitTestOptions::GetOutputFormat() {
- const char* const gtest_output_flag = GTEST_FLAG(output).c_str();
- if (gtest_output_flag == NULL) return String("");
-
- const char* const colon = strchr(gtest_output_flag, ':');
- return (colon == NULL) ?
- String(gtest_output_flag) :
- String(gtest_output_flag, colon - gtest_output_flag);
-}
-
-// Returns the name of the requested output file, or the default if none
-// was explicitly specified.
-String UnitTestOptions::GetAbsolutePathToOutputFile() {
- const char* const gtest_output_flag = GTEST_FLAG(output).c_str();
- if (gtest_output_flag == NULL)
- return String("");
-
- const char* const colon = strchr(gtest_output_flag, ':');
- if (colon == NULL)
- return String(internal::FilePath::ConcatPaths(
- internal::FilePath(
- UnitTest::GetInstance()->original_working_dir()),
- internal::FilePath(kDefaultOutputFile)).ToString() );
-
- internal::FilePath output_name(colon + 1);
- if (!output_name.IsAbsolutePath())
- // TODO(wan@google.com): on Windows \some\path is not an absolute
- // path (as its meaning depends on the current drive), yet the
- // following logic for turning it into an absolute path is wrong.
- // Fix it.
- output_name = internal::FilePath::ConcatPaths(
- internal::FilePath(UnitTest::GetInstance()->original_working_dir()),
- internal::FilePath(colon + 1));
-
- if (!output_name.IsDirectory())
- return output_name.ToString();
-
- internal::FilePath result(internal::FilePath::GenerateUniqueFileName(
- output_name, internal::GetCurrentExecutableName(),
- GetOutputFormat().c_str()));
- return result.ToString();
-}
-
-// Returns true iff the wildcard pattern matches the string. The
-// first ':' or '\0' character in pattern marks the end of it.
-//
-// This recursive algorithm isn't very efficient, but is clear and
-// works well enough for matching test names, which are short.
-bool UnitTestOptions::PatternMatchesString(const char *pattern,
- const char *str) {
- switch (*pattern) {
- case '\0':
- case ':': // Either ':' or '\0' marks the end of the pattern.
- return *str == '\0';
- case '?': // Matches any single character.
- return *str != '\0' && PatternMatchesString(pattern + 1, str + 1);
- case '*': // Matches any string (possibly empty) of characters.
- return (*str != '\0' && PatternMatchesString(pattern, str + 1)) ||
- PatternMatchesString(pattern + 1, str);
- default: // Non-special character. Matches itself.
- return *pattern == *str &&
- PatternMatchesString(pattern + 1, str + 1);
- }
-}
-
-bool UnitTestOptions::MatchesFilter(const String& name, const char* filter) {
- const char *cur_pattern = filter;
- for (;;) {
- if (PatternMatchesString(cur_pattern, name.c_str())) {
- return true;
- }
-
- // Finds the next pattern in the filter.
- cur_pattern = strchr(cur_pattern, ':');
-
- // Returns if no more pattern can be found.
- if (cur_pattern == NULL) {
- return false;
- }
-
- // Skips the pattern separater (the ':' character).
- cur_pattern++;
- }
-}
-
-// TODO(keithray): move String function implementations to gtest-string.cc.
-
-// Returns true iff the user-specified filter matches the test case
-// name and the test name.
-bool UnitTestOptions::FilterMatchesTest(const String &test_case_name,
- const String &test_name) {
- const String& full_name = String::Format("%s.%s",
- test_case_name.c_str(),
- test_name.c_str());
-
- // Split --gtest_filter at '-', if there is one, to separate into
- // positive filter and negative filter portions
- const char* const p = GTEST_FLAG(filter).c_str();
- const char* const dash = strchr(p, '-');
- String positive;
- String negative;
- if (dash == NULL) {
- positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter
- negative = String("");
- } else {
- positive = String(p, dash - p); // Everything up to the dash
- negative = String(dash+1); // Everything after the dash
- if (positive.empty()) {
- // Treat '-test1' as the same as '*-test1'
- positive = kUniversalFilter;
- }
- }
-
- // A filter is a colon-separated list of patterns. It matches a
- // test if any pattern in it matches the test.
- return (MatchesFilter(full_name, positive.c_str()) &&
- !MatchesFilter(full_name, negative.c_str()));
-}
-
-#if GTEST_HAS_SEH
-// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
-// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
-// This function is useful as an __except condition.
-int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {
- // Google Test should handle a SEH exception if:
- // 1. the user wants it to, AND
- // 2. this is not a breakpoint exception, AND
- // 3. this is not a C++ exception (VC++ implements them via SEH,
- // apparently).
- //
- // SEH exception code for C++ exceptions.
- // (see http://support.microsoft.com/kb/185294 for more information).
- const DWORD kCxxExceptionCode = 0xe06d7363;
-
- bool should_handle = true;
-
- if (!GTEST_FLAG(catch_exceptions))
- should_handle = false;
- else if (exception_code == EXCEPTION_BREAKPOINT)
- should_handle = false;
- else if (exception_code == kCxxExceptionCode)
- should_handle = false;
-
- return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
-}
-#endif // GTEST_HAS_SEH
-
-} // namespace internal
-
-// The c'tor sets this object as the test part result reporter used by
-// Google Test. The 'result' parameter specifies where to report the
-// results. Intercepts only failures from the current thread.
-ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(
- TestPartResultArray* result)
- : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD),
- result_(result) {
- Init();
-}
-
-// The c'tor sets this object as the test part result reporter used by
-// Google Test. The 'result' parameter specifies where to report the
-// results.
-ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(
- InterceptMode intercept_mode, TestPartResultArray* result)
- : intercept_mode_(intercept_mode),
- result_(result) {
- Init();
-}
-
-void ScopedFakeTestPartResultReporter::Init() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
- old_reporter_ = impl->GetGlobalTestPartResultReporter();
- impl->SetGlobalTestPartResultReporter(this);
- } else {
- old_reporter_ = impl->GetTestPartResultReporterForCurrentThread();
- impl->SetTestPartResultReporterForCurrentThread(this);
- }
-}
-
-// The d'tor restores the test part result reporter used by Google Test
-// before.
-ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
- impl->SetGlobalTestPartResultReporter(old_reporter_);
- } else {
- impl->SetTestPartResultReporterForCurrentThread(old_reporter_);
- }
-}
-
-// Increments the test part result count and remembers the result.
-// This method is from the TestPartResultReporterInterface interface.
-void ScopedFakeTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- result_->Append(result);
-}
-
-namespace internal {
-
-// Returns the type ID of ::testing::Test. We should always call this
-// instead of GetTypeId< ::testing::Test>() to get the type ID of
-// testing::Test. This is to work around a suspected linker bug when
-// using Google Test as a framework on Mac OS X. The bug causes
-// GetTypeId< ::testing::Test>() to return different values depending
-// on whether the call is from the Google Test framework itself or
-// from user test code. GetTestTypeId() is guaranteed to always
-// return the same value, as it always calls GetTypeId<>() from the
-// gtest.cc, which is within the Google Test framework.
-TypeId GetTestTypeId() {
- return GetTypeId<Test>();
-}
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library. This is solely for testing GetTestTypeId().
-extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId();
-
-// This predicate-formatter checks that 'results' contains a test part
-// failure of the given type and that the failure message contains the
-// given substring.
-AssertionResult HasOneFailure(const char* /* results_expr */,
- const char* /* type_expr */,
- const char* /* substr_expr */,
- const TestPartResultArray& results,
- TestPartResult::Type type,
- const string& substr) {
- const String expected(type == TestPartResult::kFatalFailure ?
- "1 fatal failure" :
- "1 non-fatal failure");
- Message msg;
- if (results.size() != 1) {
- msg << "Expected: " << expected << "\n"
- << " Actual: " << results.size() << " failures";
- for (int i = 0; i < results.size(); i++) {
- msg << "\n" << results.GetTestPartResult(i);
- }
- return AssertionFailure() << msg;
- }
-
- const TestPartResult& r = results.GetTestPartResult(0);
- if (r.type() != type) {
- return AssertionFailure() << "Expected: " << expected << "\n"
- << " Actual:\n"
- << r;
- }
-
- if (strstr(r.message(), substr.c_str()) == NULL) {
- return AssertionFailure() << "Expected: " << expected << " containing \""
- << substr << "\"\n"
- << " Actual:\n"
- << r;
- }
-
- return AssertionSuccess();
-}
-
-// The constructor of SingleFailureChecker remembers where to look up
-// test part results, what type of failure we expect, and what
-// substring the failure message should contain.
-SingleFailureChecker:: SingleFailureChecker(
- const TestPartResultArray* results,
- TestPartResult::Type type,
- const string& substr)
- : results_(results),
- type_(type),
- substr_(substr) {}
-
-// The destructor of SingleFailureChecker verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring. If that's not the case, a
-// non-fatal failure will be generated.
-SingleFailureChecker::~SingleFailureChecker() {
- EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_);
-}
-
-DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter(
- UnitTestImpl* unit_test) : unit_test_(unit_test) {}
-
-void DefaultGlobalTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- unit_test_->current_test_result()->AddTestPartResult(result);
- unit_test_->listeners()->repeater()->OnTestPartResult(result);
-}
-
-DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter(
- UnitTestImpl* unit_test) : unit_test_(unit_test) {}
-
-void DefaultPerThreadTestPartResultReporter::ReportTestPartResult(
- const TestPartResult& result) {
- unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result);
-}
-
-// Returns the global test part result reporter.
-TestPartResultReporterInterface*
-UnitTestImpl::GetGlobalTestPartResultReporter() {
- internal::MutexLock lock(&global_test_part_result_reporter_mutex_);
- return global_test_part_result_repoter_;
-}
-
-// Sets the global test part result reporter.
-void UnitTestImpl::SetGlobalTestPartResultReporter(
- TestPartResultReporterInterface* reporter) {
- internal::MutexLock lock(&global_test_part_result_reporter_mutex_);
- global_test_part_result_repoter_ = reporter;
-}
-
-// Returns the test part result reporter for the current thread.
-TestPartResultReporterInterface*
-UnitTestImpl::GetTestPartResultReporterForCurrentThread() {
- return per_thread_test_part_result_reporter_.get();
-}
-
-// Sets the test part result reporter for the current thread.
-void UnitTestImpl::SetTestPartResultReporterForCurrentThread(
- TestPartResultReporterInterface* reporter) {
- per_thread_test_part_result_reporter_.set(reporter);
-}
-
-// Gets the number of successful test cases.
-int UnitTestImpl::successful_test_case_count() const {
- return CountIf(test_cases_, TestCasePassed);
-}
-
-// Gets the number of failed test cases.
-int UnitTestImpl::failed_test_case_count() const {
- return CountIf(test_cases_, TestCaseFailed);
-}
-
-// Gets the number of all test cases.
-int UnitTestImpl::total_test_case_count() const {
- return static_cast<int>(test_cases_.size());
-}
-
-// Gets the number of all test cases that contain at least one test
-// that should run.
-int UnitTestImpl::test_case_to_run_count() const {
- return CountIf(test_cases_, ShouldRunTestCase);
-}
-
-// Gets the number of successful tests.
-int UnitTestImpl::successful_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count);
-}
-
-// Gets the number of failed tests.
-int UnitTestImpl::failed_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count);
-}
-
-// Gets the number of disabled tests.
-int UnitTestImpl::disabled_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count);
-}
-
-// Gets the number of all tests.
-int UnitTestImpl::total_test_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::total_test_count);
-}
-
-// Gets the number of tests that should run.
-int UnitTestImpl::test_to_run_count() const {
- return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count);
-}
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// CurrentOsStackTraceExceptTop(1), Foo() will be included in the
-// trace but Bar() and CurrentOsStackTraceExceptTop() won't.
-String UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) {
- (void)skip_count;
- return String("");
-}
-
-// Returns the current time in milliseconds.
-TimeInMillis GetTimeInMillis() {
-#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__)
- // Difference between 1970-01-01 and 1601-01-01 in milliseconds.
- // http://analogous.blogspot.com/2005/04/epoch.html
- const TimeInMillis kJavaEpochToWinFileTimeDelta =
- static_cast<TimeInMillis>(116444736UL) * 100000UL;
- const DWORD kTenthMicrosInMilliSecond = 10000;
-
- SYSTEMTIME now_systime;
- FILETIME now_filetime;
- ULARGE_INTEGER now_int64;
- // TODO(kenton@google.com): Shouldn't this just use
- // GetSystemTimeAsFileTime()?
- GetSystemTime(&now_systime);
- if (SystemTimeToFileTime(&now_systime, &now_filetime)) {
- now_int64.LowPart = now_filetime.dwLowDateTime;
- now_int64.HighPart = now_filetime.dwHighDateTime;
- now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) -
- kJavaEpochToWinFileTimeDelta;
- return now_int64.QuadPart;
- }
- return 0;
-#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_
- __timeb64 now;
-
-# ifdef _MSC_VER
-
- // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996
- // (deprecated function) there.
- // TODO(kenton@google.com): Use GetTickCount()? Or use
- // SystemTimeToFileTime()
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
- _ftime64(&now);
-# pragma warning(pop) // Restores the warning state.
-# else
-
- _ftime64(&now);
-
-# endif // _MSC_VER
-
- return static_cast<TimeInMillis>(now.time) * 1000 + now.millitm;
-#elif GTEST_HAS_GETTIMEOFDAY_
- struct timeval now;
- gettimeofday(&now, NULL);
- return static_cast<TimeInMillis>(now.tv_sec) * 1000 + now.tv_usec / 1000;
-#else
-# error "Don't know how to get the current time on your system."
-#endif
-}
-
-// Utilities
-
-// class String
-
-// Returns the input enclosed in double quotes if it's not NULL;
-// otherwise returns "(null)". For example, "\"Hello\"" is returned
-// for input "Hello".
-//
-// This is useful for printing a C string in the syntax of a literal.
-//
-// Known issue: escape sequences are not handled yet.
-String String::ShowCStringQuoted(const char* c_str) {
- return c_str ? String::Format("\"%s\"", c_str) : String("(null)");
-}
-
-// Copies at most length characters from str into a newly-allocated
-// piece of memory of size length+1. The memory is allocated with new[].
-// A terminating null byte is written to the memory, and a pointer to it
-// is returned. If str is NULL, NULL is returned.
-static char* CloneString(const char* str, size_t length) {
- if (str == NULL) {
- return NULL;
- } else {
- char* const clone = new char[length + 1];
- posix::StrNCpy(clone, str, length);
- clone[length] = '\0';
- return clone;
- }
-}
-
-// Clones a 0-terminated C string, allocating memory using new. The
-// caller is responsible for deleting[] the return value. Returns the
-// cloned string, or NULL if the input is NULL.
-const char * String::CloneCString(const char* c_str) {
- return (c_str == NULL) ?
- NULL : CloneString(c_str, strlen(c_str));
-}
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Creates a UTF-16 wide string from the given ANSI string, allocating
-// memory using new. The caller is responsible for deleting the return
-// value using delete[]. Returns the wide string, or NULL if the
-// input is NULL.
-LPCWSTR String::AnsiToUtf16(const char* ansi) {
- if (!ansi) return NULL;
- const int length = strlen(ansi);
- const int unicode_length =
- MultiByteToWideChar(CP_ACP, 0, ansi, length,
- NULL, 0);
- WCHAR* unicode = new WCHAR[unicode_length + 1];
- MultiByteToWideChar(CP_ACP, 0, ansi, length,
- unicode, unicode_length);
- unicode[unicode_length] = 0;
- return unicode;
-}
-
-// Creates an ANSI string from the given wide string, allocating
-// memory using new. The caller is responsible for deleting the return
-// value using delete[]. Returns the ANSI string, or NULL if the
-// input is NULL.
-const char* String::Utf16ToAnsi(LPCWSTR utf16_str) {
- if (!utf16_str) return NULL;
- const int ansi_length =
- WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,
- NULL, 0, NULL, NULL);
- char* ansi = new char[ansi_length + 1];
- WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,
- ansi, ansi_length, NULL, NULL);
- ansi[ansi_length] = 0;
- return ansi;
-}
-
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Compares two C strings. Returns true iff they have the same content.
-//
-// Unlike strcmp(), this function can handle NULL argument(s). A NULL
-// C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::CStringEquals(const char * lhs, const char * rhs) {
- if ( lhs == NULL ) return rhs == NULL;
-
- if ( rhs == NULL ) return false;
-
- return strcmp(lhs, rhs) == 0;
-}
-
-#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
-
-// Converts an array of wide chars to a narrow string using the UTF-8
-// encoding, and streams the result to the given Message object.
-static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,
- Message* msg) {
- // TODO(wan): consider allowing a testing::String object to
- // contain '\0'. This will make it behave more like std::string,
- // and will allow ToUtf8String() to return the correct encoding
- // for '\0' s.t. we can get rid of the conditional here (and in
- // several other places).
- for (size_t i = 0; i != length; ) { // NOLINT
- if (wstr[i] != L'\0') {
- *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i));
- while (i != length && wstr[i] != L'\0')
- i++;
- } else {
- *msg << '\0';
- i++;
- }
- }
-}
-
-#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
-
-} // namespace internal
-
-#if GTEST_HAS_STD_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::std::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// AssertionResult constructors.
-// Used in EXPECT_TRUE/FALSE(assertion_result).
-AssertionResult::AssertionResult(const AssertionResult& other)
- : success_(other.success_),
- message_(other.message_.get() != NULL ?
- new ::std::string(*other.message_) :
- static_cast< ::std::string*>(NULL)) {
-}
-
-// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
-AssertionResult AssertionResult::operator!() const {
- AssertionResult negation(!success_);
- if (message_.get() != NULL)
- negation << *message_;
- return negation;
-}
-
-// Makes a successful assertion result.
-AssertionResult AssertionSuccess() {
- return AssertionResult(true);
-}
-
-// Makes a failed assertion result.
-AssertionResult AssertionFailure() {
- return AssertionResult(false);
-}
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << message.
-AssertionResult AssertionFailure(const Message& message) {
- return AssertionFailure() << message;
-}
-
-namespace internal {
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings. For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-// expected_expression: "foo"
-// actual_expression: "bar"
-// expected_value: "5"
-// actual_value: "6"
-//
-// The ignoring_case parameter is true iff the assertion is a
-// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-AssertionResult EqFailure(const char* expected_expression,
- const char* actual_expression,
- const String& expected_value,
- const String& actual_value,
- bool ignoring_case) {
- Message msg;
- msg << "Value of: " << actual_expression;
- if (actual_value != actual_expression) {
- msg << "\n Actual: " << actual_value;
- }
-
- msg << "\nExpected: " << expected_expression;
- if (ignoring_case) {
- msg << " (ignoring case)";
- }
- if (expected_value != expected_expression) {
- msg << "\nWhich is: " << expected_value;
- }
-
- return AssertionFailure() << msg;
-}
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-String GetBoolAssertionFailureMessage(const AssertionResult& assertion_result,
- const char* expression_text,
- const char* actual_predicate_value,
- const char* expected_predicate_value) {
- const char* actual_message = assertion_result.message();
- Message msg;
- msg << "Value of: " << expression_text
- << "\n Actual: " << actual_predicate_value;
- if (actual_message[0] != '\0')
- msg << " (" << actual_message << ")";
- msg << "\nExpected: " << expected_predicate_value;
- return msg.GetString();
-}
-
-// Helper function for implementing ASSERT_NEAR.
-AssertionResult DoubleNearPredFormat(const char* expr1,
- const char* expr2,
- const char* abs_error_expr,
- double val1,
- double val2,
- double abs_error) {
- const double diff = fabs(val1 - val2);
- if (diff <= abs_error) return AssertionSuccess();
-
- // TODO(wan): do not print the value of an expression if it's
- // already a literal.
- return AssertionFailure()
- << "The difference between " << expr1 << " and " << expr2
- << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n"
- << expr1 << " evaluates to " << val1 << ",\n"
- << expr2 << " evaluates to " << val2 << ", and\n"
- << abs_error_expr << " evaluates to " << abs_error << ".";
-}
-
-
-// Helper template for implementing FloatLE() and DoubleLE().
-template <typename RawType>
-AssertionResult FloatingPointLE(const char* expr1,
- const char* expr2,
- RawType val1,
- RawType val2) {
- // Returns success if val1 is less than val2,
- if (val1 < val2) {
- return AssertionSuccess();
- }
-
- // or if val1 is almost equal to val2.
- const FloatingPoint<RawType> lhs(val1), rhs(val2);
- if (lhs.AlmostEquals(rhs)) {
- return AssertionSuccess();
- }
-
- // Note that the above two checks will both fail if either val1 or
- // val2 is NaN, as the IEEE floating-point standard requires that
- // any predicate involving a NaN must return false.
-
- ::std::stringstream val1_ss;
- val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << val1;
-
- ::std::stringstream val2_ss;
- val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
- << val2;
-
- return AssertionFailure()
- << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n"
- << " Actual: " << StringStreamToString(&val1_ss) << " vs "
- << StringStreamToString(&val2_ss);
-}
-
-} // namespace internal
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-AssertionResult FloatLE(const char* expr1, const char* expr2,
- float val1, float val2) {
- return internal::FloatingPointLE<float>(expr1, expr2, val1, val2);
-}
-
-// Asserts that val1 is less than, or almost equal to, val2. Fails
-// otherwise. In particular, it fails if either val1 or val2 is NaN.
-AssertionResult DoubleLE(const char* expr1, const char* expr2,
- double val1, double val2) {
- return internal::FloatingPointLE<double>(expr1, expr2, val1, val2);
-}
-
-namespace internal {
-
-// The helper function for {ASSERT|EXPECT}_EQ with int or enum
-// arguments.
-AssertionResult CmpHelperEQ(const char* expected_expression,
- const char* actual_expression,
- BiggestInt expected,
- BiggestInt actual) {
- if (expected == actual) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- FormatForComparisonFailureMessage(expected, actual),
- FormatForComparisonFailureMessage(actual, expected),
- false);
-}
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here
-// just to avoid copy-and-paste of similar code.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- BiggestInt val1, BiggestInt val2) {\
- if (val1 op val2) {\
- return AssertionSuccess();\
- } else {\
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2\
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
- << " vs " << FormatForComparisonFailureMessage(val2, val1);\
- }\
-}
-
-// Implements the helper function for {ASSERT|EXPECT}_NE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(NE, !=)
-// Implements the helper function for {ASSERT|EXPECT}_LE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(LE, <=)
-// Implements the helper function for {ASSERT|EXPECT}_LT with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(LT, < )
-// Implements the helper function for {ASSERT|EXPECT}_GE with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(GE, >=)
-// Implements the helper function for {ASSERT|EXPECT}_GT with int or
-// enum arguments.
-GTEST_IMPL_CMP_HELPER_(GT, > )
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual) {
- if (String::CStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowCStringQuoted(expected),
- String::ShowCStringQuoted(actual),
- false);
-}
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
- const char* actual_expression,
- const char* expected,
- const char* actual) {
- if (String::CaseInsensitiveCStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowCStringQuoted(expected),
- String::ShowCStringQuoted(actual),
- true);
-}
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2) {
- if (!String::CStringEquals(s1, s2)) {
- return AssertionSuccess();
- } else {
- return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
- << s2_expression << "), actual: \""
- << s1 << "\" vs \"" << s2 << "\"";
- }
-}
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
- const char* s2_expression,
- const char* s1,
- const char* s2) {
- if (!String::CaseInsensitiveCStringEquals(s1, s2)) {
- return AssertionSuccess();
- } else {
- return AssertionFailure()
- << "Expected: (" << s1_expression << ") != ("
- << s2_expression << ") (ignoring case), actual: \""
- << s1 << "\" vs \"" << s2 << "\"";
- }
-}
-
-} // namespace internal
-
-namespace {
-
-// Helper functions for implementing IsSubString() and IsNotSubstring().
-
-// This group of overloaded functions return true iff needle is a
-// substring of haystack. NULL is considered a substring of itself
-// only.
-
-bool IsSubstringPred(const char* needle, const char* haystack) {
- if (needle == NULL || haystack == NULL)
- return needle == haystack;
-
- return strstr(haystack, needle) != NULL;
-}
-
-bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
- if (needle == NULL || haystack == NULL)
- return needle == haystack;
-
- return wcsstr(haystack, needle) != NULL;
-}
-
-// StringType here can be either ::std::string or ::std::wstring.
-template <typename StringType>
-bool IsSubstringPred(const StringType& needle,
- const StringType& haystack) {
- return haystack.find(needle) != StringType::npos;
-}
-
-// This function implements either IsSubstring() or IsNotSubstring(),
-// depending on the value of the expected_to_be_substring parameter.
-// StringType here can be const char*, const wchar_t*, ::std::string,
-// or ::std::wstring.
-template <typename StringType>
-AssertionResult IsSubstringImpl(
- bool expected_to_be_substring,
- const char* needle_expr, const char* haystack_expr,
- const StringType& needle, const StringType& haystack) {
- if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
- return AssertionSuccess();
-
- const bool is_wide_string = sizeof(needle[0]) > 1;
- const char* const begin_string_quote = is_wide_string ? "L\"" : "\"";
- return AssertionFailure()
- << "Value of: " << needle_expr << "\n"
- << " Actual: " << begin_string_quote << needle << "\"\n"
- << "Expected: " << (expected_to_be_substring ? "" : "not ")
- << "a substring of " << haystack_expr << "\n"
- << "Which is: " << begin_string_quote << haystack << "\"";
-}
-
-} // namespace
-
-// IsSubstring() and IsNotSubstring() check whether needle is a
-// substring of haystack (NULL is considered a substring of itself
-// only), and return an appropriate error message when they fail.
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const char* needle, const char* haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const wchar_t* needle, const wchar_t* haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::string& needle, const ::std::string& haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-
-#if GTEST_HAS_STD_WSTRING
-AssertionResult IsSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack) {
- return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
-}
-
-AssertionResult IsNotSubstring(
- const char* needle_expr, const char* haystack_expr,
- const ::std::wstring& needle, const ::std::wstring& haystack) {
- return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-#if GTEST_OS_WINDOWS
-
-namespace {
-
-// Helper function for IsHRESULT{SuccessFailure} predicates
-AssertionResult HRESULTFailureHelper(const char* expr,
- const char* expected,
- long hr) { // NOLINT
-# if GTEST_OS_WINDOWS_MOBILE
-
- // Windows CE doesn't support FormatMessage.
- const char error_text[] = "";
-
-# else
-
- // Looks up the human-readable system message for the HRESULT code
- // and since we're not passing any params to FormatMessage, we don't
- // want inserts expanded.
- const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS;
- const DWORD kBufSize = 4096; // String::Format can't exceed this length.
- // Gets the system's human readable message string for this HRESULT.
- char error_text[kBufSize] = { '\0' };
- DWORD message_length = ::FormatMessageA(kFlags,
- 0, // no source, we're asking system
- hr, // the error
- 0, // no line width restrictions
- error_text, // output buffer
- kBufSize, // buf size
- NULL); // no arguments for inserts
- // Trims tailing white space (FormatMessage leaves a trailing cr-lf)
- for (; message_length && IsSpace(error_text[message_length - 1]);
- --message_length) {
- error_text[message_length - 1] = '\0';
- }
-
-# endif // GTEST_OS_WINDOWS_MOBILE
-
- const String error_hex(String::Format("0x%08X ", hr));
- return ::testing::AssertionFailure()
- << "Expected: " << expr << " " << expected << ".\n"
- << " Actual: " << error_hex << error_text << "\n";
-}
-
-} // namespace
-
-AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT
- if (SUCCEEDED(hr)) {
- return AssertionSuccess();
- }
- return HRESULTFailureHelper(expr, "succeeds", hr);
-}
-
-AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT
- if (FAILED(hr)) {
- return AssertionSuccess();
- }
- return HRESULTFailureHelper(expr, "fails", hr);
-}
-
-#endif // GTEST_OS_WINDOWS
-
-// Utility functions for encoding Unicode text (wide strings) in
-// UTF-8.
-
-// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8
-// like this:
-//
-// Code-point length Encoding
-// 0 - 7 bits 0xxxxxxx
-// 8 - 11 bits 110xxxxx 10xxxxxx
-// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx
-// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-
-// The maximum code-point a one-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint1 = (static_cast<UInt32>(1) << 7) - 1;
-
-// The maximum code-point a two-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1;
-
-// The maximum code-point a three-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1;
-
-// The maximum code-point a four-byte UTF-8 sequence can represent.
-const UInt32 kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1;
-
-// Chops off the n lowest bits from a bit pattern. Returns the n
-// lowest bits. As a side effect, the original bit pattern will be
-// shifted to the right by n bits.
-inline UInt32 ChopLowBits(UInt32* bits, int n) {
- const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);
- *bits >>= n;
- return low_bits;
-}
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// The output buffer str must containt at least 32 characters.
-// The function returns the address of the output buffer.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'.
-char* CodePointToUtf8(UInt32 code_point, char* str) {
- if (code_point <= kMaxCodePoint1) {
- str[1] = '\0';
- str[0] = static_cast<char>(code_point); // 0xxxxxxx
- } else if (code_point <= kMaxCodePoint2) {
- str[2] = '\0';
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
- } else if (code_point <= kMaxCodePoint3) {
- str[3] = '\0';
- str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
- } else if (code_point <= kMaxCodePoint4) {
- str[4] = '\0';
- str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
- str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
- } else {
- // The longest string String::Format can produce when invoked
- // with these parameters is 28 character long (not including
- // the terminating nul character). We are asking for 32 character
- // buffer just in case. This is also enough for strncpy to
- // null-terminate the destination string.
- posix::StrNCpy(
- str, String::Format("(Invalid Unicode 0x%X)", code_point).c_str(), 32);
- str[31] = '\0'; // Makes sure no change in the format to strncpy leaves
- // the result unterminated.
- }
- return str;
-}
-
-// The following two functions only make sense if the the system
-// uses UTF-16 for wide string encoding. All supported systems
-// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16.
-
-// Determines if the arguments constitute UTF-16 surrogate pair
-// and thus should be combined into a single Unicode code point
-// using CreateCodePointFromUtf16SurrogatePair.
-inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
- return sizeof(wchar_t) == 2 &&
- (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;
-}
-
-// Creates a Unicode code point from UTF16 surrogate pair.
-inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
- wchar_t second) {
- const UInt32 mask = (1 << 10) - 1;
- return (sizeof(wchar_t) == 2) ?
- (((first & mask) << 10) | (second & mask)) + 0x10000 :
- // This function should not be called when the condition is
- // false, but we provide a sensible default in case it is.
- static_cast<UInt32>(first);
-}
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)
-// UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-String WideStringToUtf8(const wchar_t* str, int num_chars) {
- if (num_chars == -1)
- num_chars = static_cast<int>(wcslen(str));
-
- ::std::stringstream stream;
- for (int i = 0; i < num_chars; ++i) {
- UInt32 unicode_code_point;
-
- if (str[i] == L'\0') {
- break;
- } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) {
- unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i],
- str[i + 1]);
- i++;
- } else {
- unicode_code_point = static_cast<UInt32>(str[i]);
- }
-
- char buffer[32]; // CodePointToUtf8 requires a buffer this big.
- stream << CodePointToUtf8(unicode_code_point, buffer);
- }
- return StringStreamToString(&stream);
-}
-
-// Converts a wide C string to a String using the UTF-8 encoding.
-// NULL will be converted to "(null)".
-String String::ShowWideCString(const wchar_t * wide_c_str) {
- if (wide_c_str == NULL) return String("(null)");
-
- return String(internal::WideStringToUtf8(wide_c_str, -1).c_str());
-}
-
-// Similar to ShowWideCString(), except that this function encloses
-// the converted string in double quotes.
-String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
- if (wide_c_str == NULL) return String("(null)");
-
- return String::Format("L\"%s\"",
- String::ShowWideCString(wide_c_str).c_str());
-}
-
-// Compares two wide C strings. Returns true iff they have the same
-// content.
-//
-// Unlike wcscmp(), this function can handle NULL argument(s). A NULL
-// C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) {
- if (lhs == NULL) return rhs == NULL;
-
- if (rhs == NULL) return false;
-
- return wcscmp(lhs, rhs) == 0;
-}
-
-// Helper function for *_STREQ on wide strings.
-AssertionResult CmpHelperSTREQ(const char* expected_expression,
- const char* actual_expression,
- const wchar_t* expected,
- const wchar_t* actual) {
- if (String::WideCStringEquals(expected, actual)) {
- return AssertionSuccess();
- }
-
- return EqFailure(expected_expression,
- actual_expression,
- String::ShowWideCStringQuoted(expected),
- String::ShowWideCStringQuoted(actual),
- false);
-}
-
-// Helper function for *_STRNE on wide strings.
-AssertionResult CmpHelperSTRNE(const char* s1_expression,
- const char* s2_expression,
- const wchar_t* s1,
- const wchar_t* s2) {
- if (!String::WideCStringEquals(s1, s2)) {
- return AssertionSuccess();
- }
-
- return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
- << s2_expression << "), actual: "
- << String::ShowWideCStringQuoted(s1)
- << " vs " << String::ShowWideCStringQuoted(s2);
-}
-
-// Compares two C strings, ignoring case. Returns true iff they have
-// the same content.
-//
-// Unlike strcasecmp(), this function can handle NULL argument(s). A
-// NULL C string is considered different to any non-NULL C string,
-// including the empty string.
-bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) {
- if (lhs == NULL)
- return rhs == NULL;
- if (rhs == NULL)
- return false;
- return posix::StrCaseCmp(lhs, rhs) == 0;
-}
-
- // Compares two wide C strings, ignoring case. Returns true iff they
- // have the same content.
- //
- // Unlike wcscasecmp(), this function can handle NULL argument(s).
- // A NULL C string is considered different to any non-NULL wide C string,
- // including the empty string.
- // NB: The implementations on different platforms slightly differ.
- // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
- // environment variable. On GNU platform this method uses wcscasecmp
- // which compares according to LC_CTYPE category of the current locale.
- // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
- // current locale.
-bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs) {
- if (lhs == NULL) return rhs == NULL;
-
- if (rhs == NULL) return false;
-
-#if GTEST_OS_WINDOWS
- return _wcsicmp(lhs, rhs) == 0;
-#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID
- return wcscasecmp(lhs, rhs) == 0;
-#else
- // Android, Mac OS X and Cygwin don't define wcscasecmp.
- // Other unknown OSes may not define it either.
- wint_t left, right;
- do {
- left = towlower(*lhs++);
- right = towlower(*rhs++);
- } while (left && left == right);
- return left == right;
-#endif // OS selector
-}
-
-// Compares this with another String.
-// Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0
-// if this is greater than rhs.
-int String::Compare(const String & rhs) const {
- const char* const lhs_c_str = c_str();
- const char* const rhs_c_str = rhs.c_str();
-
- if (lhs_c_str == NULL) {
- return rhs_c_str == NULL ? 0 : -1; // NULL < anything except NULL
- } else if (rhs_c_str == NULL) {
- return 1;
- }
-
- const size_t shorter_str_len =
- length() <= rhs.length() ? length() : rhs.length();
- for (size_t i = 0; i != shorter_str_len; i++) {
- if (lhs_c_str[i] < rhs_c_str[i]) {
- return -1;
- } else if (lhs_c_str[i] > rhs_c_str[i]) {
- return 1;
- }
- }
- return (length() < rhs.length()) ? -1 :
- (length() > rhs.length()) ? 1 : 0;
-}
-
-// Returns true iff this String ends with the given suffix. *Any*
-// String is considered to end with a NULL or empty suffix.
-bool String::EndsWith(const char* suffix) const {
- if (suffix == NULL || CStringEquals(suffix, "")) return true;
-
- if (c_str() == NULL) return false;
-
- const size_t this_len = strlen(c_str());
- const size_t suffix_len = strlen(suffix);
- return (this_len >= suffix_len) &&
- CStringEquals(c_str() + this_len - suffix_len, suffix);
-}
-
-// Returns true iff this String ends with the given suffix, ignoring case.
-// Any String is considered to end with a NULL or empty suffix.
-bool String::EndsWithCaseInsensitive(const char* suffix) const {
- if (suffix == NULL || CStringEquals(suffix, "")) return true;
-
- if (c_str() == NULL) return false;
-
- const size_t this_len = strlen(c_str());
- const size_t suffix_len = strlen(suffix);
- return (this_len >= suffix_len) &&
- CaseInsensitiveCStringEquals(c_str() + this_len - suffix_len, suffix);
-}
-
-// Formats a list of arguments to a String, using the same format
-// spec string as for printf.
-//
-// We do not use the StringPrintf class as it is not universally
-// available.
-//
-// The result is limited to 4096 characters (including the tailing 0).
-// If 4096 characters are not enough to format the input, or if
-// there's an error, "<formatting error or buffer exceeded>" is
-// returned.
-String String::Format(const char * format, ...) {
- va_list args;
- va_start(args, format);
-
- char buffer[4096];
- const int kBufferSize = sizeof(buffer)/sizeof(buffer[0]);
-
- // MSVC 8 deprecates vsnprintf(), so we want to suppress warning
- // 4996 (deprecated function) there.
-#ifdef _MSC_VER // We are using MSVC.
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
-
- const int size = vsnprintf(buffer, kBufferSize, format, args);
-
-# pragma warning(pop) // Restores the warning state.
-#else // We are not using MSVC.
- const int size = vsnprintf(buffer, kBufferSize, format, args);
-#endif // _MSC_VER
- va_end(args);
-
- // vsnprintf()'s behavior is not portable. When the buffer is not
- // big enough, it returns a negative value in MSVC, and returns the
- // needed buffer size on Linux. When there is an output error, it
- // always returns a negative value. For simplicity, we lump the two
- // error cases together.
- if (size < 0 || size >= kBufferSize) {
- return String("<formatting error or buffer exceeded>");
- } else {
- return String(buffer, size);
- }
-}
-
-// Converts the buffer in a stringstream to a String, converting NUL
-// bytes to "\\0" along the way.
-String StringStreamToString(::std::stringstream* ss) {
- const ::std::string& str = ss->str();
- const char* const start = str.c_str();
- const char* const end = start + str.length();
-
- // We need to use a helper stringstream to do this transformation
- // because String doesn't support push_back().
- ::std::stringstream helper;
- for (const char* ch = start; ch != end; ++ch) {
- if (*ch == '\0') {
- helper << "\\0"; // Replaces NUL with "\\0";
- } else {
- helper.put(*ch);
- }
- }
-
- return String(helper.str().c_str());
-}
-
-// Appends the user-supplied message to the Google-Test-generated message.
-String AppendUserMessage(const String& gtest_msg,
- const Message& user_msg) {
- // Appends the user message if it's non-empty.
- const String user_msg_string = user_msg.GetString();
- if (user_msg_string.empty()) {
- return gtest_msg;
- }
-
- Message msg;
- msg << gtest_msg << "\n" << user_msg_string;
-
- return msg.GetString();
-}
-
-} // namespace internal
-
-// class TestResult
-
-// Creates an empty TestResult.
-TestResult::TestResult()
- : death_test_count_(0),
- elapsed_time_(0) {
-}
-
-// D'tor.
-TestResult::~TestResult() {
-}
-
-// Returns the i-th test part result among all the results. i can
-// range from 0 to total_part_count() - 1. If i is not in that range,
-// aborts the program.
-const TestPartResult& TestResult::GetTestPartResult(int i) const {
- if (i < 0 || i >= total_part_count())
- internal::posix::Abort();
- return test_part_results_.at(i);
-}
-
-// Returns the i-th test property. i can range from 0 to
-// test_property_count() - 1. If i is not in that range, aborts the
-// program.
-const TestProperty& TestResult::GetTestProperty(int i) const {
- if (i < 0 || i >= test_property_count())
- internal::posix::Abort();
- return test_properties_.at(i);
-}
-
-// Clears the test part results.
-void TestResult::ClearTestPartResults() {
- test_part_results_.clear();
-}
-
-// Adds a test part result to the list.
-void TestResult::AddTestPartResult(const TestPartResult& test_part_result) {
- test_part_results_.push_back(test_part_result);
-}
-
-// Adds a test property to the list. If a property with the same key as the
-// supplied property is already represented, the value of this test_property
-// replaces the old value for that key.
-void TestResult::RecordProperty(const TestProperty& test_property) {
- if (!ValidateTestProperty(test_property)) {
- return;
- }
- internal::MutexLock lock(&test_properites_mutex_);
- const std::vector<TestProperty>::iterator property_with_matching_key =
- std::find_if(test_properties_.begin(), test_properties_.end(),
- internal::TestPropertyKeyIs(test_property.key()));
- if (property_with_matching_key == test_properties_.end()) {
- test_properties_.push_back(test_property);
- return;
- }
- property_with_matching_key->SetValue(test_property.value());
-}
-
-// Adds a failure if the key is a reserved attribute of Google Test
-// testcase tags. Returns true if the property is valid.
-bool TestResult::ValidateTestProperty(const TestProperty& test_property) {
- internal::String key(test_property.key());
- if (key == "name" || key == "status" || key == "time" || key == "classname") {
- ADD_FAILURE()
- << "Reserved key used in RecordProperty(): "
- << key
- << " ('name', 'status', 'time', and 'classname' are reserved by "
- << GTEST_NAME_ << ")";
- return false;
- }
- return true;
-}
-
-// Clears the object.
-void TestResult::Clear() {
- test_part_results_.clear();
- test_properties_.clear();
- death_test_count_ = 0;
- elapsed_time_ = 0;
-}
-
-// Returns true iff the test failed.
-bool TestResult::Failed() const {
- for (int i = 0; i < total_part_count(); ++i) {
- if (GetTestPartResult(i).failed())
- return true;
- }
- return false;
-}
-
-// Returns true iff the test part fatally failed.
-static bool TestPartFatallyFailed(const TestPartResult& result) {
- return result.fatally_failed();
-}
-
-// Returns true iff the test fatally failed.
-bool TestResult::HasFatalFailure() const {
- return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
-}
-
-// Returns true iff the test part non-fatally failed.
-static bool TestPartNonfatallyFailed(const TestPartResult& result) {
- return result.nonfatally_failed();
-}
-
-// Returns true iff the test has a non-fatal failure.
-bool TestResult::HasNonfatalFailure() const {
- return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;
-}
-
-// Gets the number of all test parts. This is the sum of the number
-// of successful test parts and the number of failed test parts.
-int TestResult::total_part_count() const {
- return static_cast<int>(test_part_results_.size());
-}
-
-// Returns the number of the test properties.
-int TestResult::test_property_count() const {
- return static_cast<int>(test_properties_.size());
-}
-
-// class Test
-
-// Creates a Test object.
-
-// The c'tor saves the values of all Google Test flags.
-Test::Test()
- : gtest_flag_saver_(new internal::GTestFlagSaver) {
-}
-
-// The d'tor restores the values of all Google Test flags.
-Test::~Test() {
- delete gtest_flag_saver_;
-}
-
-// Sets up the test fixture.
-//
-// A sub-class may override this.
-void Test::SetUp() {
-}
-
-// Tears down the test fixture.
-//
-// A sub-class may override this.
-void Test::TearDown() {
-}
-
-// Allows user supplied key value pairs to be recorded for later output.
-void Test::RecordProperty(const char* key, const char* value) {
- UnitTest::GetInstance()->RecordPropertyForCurrentTest(key, value);
-}
-
-// Allows user supplied key value pairs to be recorded for later output.
-void Test::RecordProperty(const char* key, int value) {
- Message value_message;
- value_message << value;
- RecordProperty(key, value_message.GetString().c_str());
-}
-
-namespace internal {
-
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
- const String& message) {
- // This function is a friend of UnitTest and as such has access to
- // AddTestPartResult.
- UnitTest::GetInstance()->AddTestPartResult(
- result_type,
- NULL, // No info about the source file where the exception occurred.
- -1, // We have no info on which line caused the exception.
- message,
- String()); // No stack trace, either.
-}
-
-} // namespace internal
-
-// Google Test requires all tests in the same test case to use the same test
-// fixture class. This function checks if the current test has the
-// same fixture class as the first test in the current test case. If
-// yes, it returns true; otherwise it generates a Google Test failure and
-// returns false.
-bool Test::HasSameFixtureClass() {
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- const TestCase* const test_case = impl->current_test_case();
-
- // Info about the first test in the current test case.
- const TestInfo* const first_test_info = test_case->test_info_list()[0];
- const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;
- const char* const first_test_name = first_test_info->name();
-
- // Info about the current test.
- const TestInfo* const this_test_info = impl->current_test_info();
- const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;
- const char* const this_test_name = this_test_info->name();
-
- if (this_fixture_id != first_fixture_id) {
- // Is the first test defined using TEST?
- const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();
- // Is this test defined using TEST?
- const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();
-
- if (first_is_TEST || this_is_TEST) {
- // The user mixed TEST and TEST_F in this test case - we'll tell
- // him/her how to fix it.
-
- // Gets the name of the TEST and the name of the TEST_F. Note
- // that first_is_TEST and this_is_TEST cannot both be true, as
- // the fixture IDs are different for the two tests.
- const char* const TEST_name =
- first_is_TEST ? first_test_name : this_test_name;
- const char* const TEST_F_name =
- first_is_TEST ? this_test_name : first_test_name;
-
- ADD_FAILURE()
- << "All tests in the same test case must use the same test fixture\n"
- << "class, so mixing TEST_F and TEST in the same test case is\n"
- << "illegal. In test case " << this_test_info->test_case_name()
- << ",\n"
- << "test " << TEST_F_name << " is defined using TEST_F but\n"
- << "test " << TEST_name << " is defined using TEST. You probably\n"
- << "want to change the TEST to TEST_F or move it to another test\n"
- << "case.";
- } else {
- // The user defined two fixture classes with the same name in
- // two namespaces - we'll tell him/her how to fix it.
- ADD_FAILURE()
- << "All tests in the same test case must use the same test fixture\n"
- << "class. However, in test case "
- << this_test_info->test_case_name() << ",\n"
- << "you defined test " << first_test_name
- << " and test " << this_test_name << "\n"
- << "using two different test fixture classes. This can happen if\n"
- << "the two classes are from different namespaces or translation\n"
- << "units and have the same name. You should probably rename one\n"
- << "of the classes to put the tests into different test cases.";
- }
- return false;
- }
-
- return true;
-}
-
-#if GTEST_HAS_SEH
-
-// Adds an "exception thrown" fatal failure to the current test. This
-// function returns its result via an output parameter pointer because VC++
-// prohibits creation of objects with destructors on stack in functions
-// using __try (see error C2712).
-static internal::String* FormatSehExceptionMessage(DWORD exception_code,
- const char* location) {
- Message message;
- message << "SEH exception with code 0x" << std::setbase(16) <<
- exception_code << std::setbase(10) << " thrown in " << location << ".";
-
- return new internal::String(message.GetString());
-}
-
-#endif // GTEST_HAS_SEH
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Adds an "exception thrown" fatal failure to the current test.
-static internal::String FormatCxxExceptionMessage(const char* description,
- const char* location) {
- Message message;
- if (description != NULL) {
- message << "C++ exception with description \"" << description << "\"";
- } else {
- message << "Unknown C++ exception";
- }
- message << " thrown in " << location << ".";
-
- return message.GetString();
-}
-
-static internal::String PrintTestPartResultToString(
- const TestPartResult& test_part_result);
-
-// A failed Google Test assertion will throw an exception of this type when
-// GTEST_FLAG(throw_on_failure) is true (if exceptions are enabled). We
-// derive it from std::runtime_error, which is for errors presumably
-// detectable only at run time. Since std::runtime_error inherits from
-// std::exception, many testing frameworks know how to extract and print the
-// message inside it.
-class GoogleTestFailureException : public ::std::runtime_error {
- public:
- explicit GoogleTestFailureException(const TestPartResult& failure)
- : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {}
-};
-#endif // GTEST_HAS_EXCEPTIONS
-
-namespace internal {
-// We put these helper functions in the internal namespace as IBM's xlC
-// compiler rejects the code if they were declared static.
-
-// Runs the given method and handles SEH exceptions it throws, when
-// SEH is supported; returns the 0-value for type Result in case of an
-// SEH exception. (Microsoft compilers cannot handle SEH and C++
-// exceptions in the same function. Therefore, we provide a separate
-// wrapper function for handling SEH exceptions.)
-template <class T, typename Result>
-Result HandleSehExceptionsInMethodIfSupported(
- T* object, Result (T::*method)(), const char* location) {
-#if GTEST_HAS_SEH
- __try {
- return (object->*method)();
- } __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT
- GetExceptionCode())) {
- // We create the exception message on the heap because VC++ prohibits
- // creation of objects with destructors on stack in functions using __try
- // (see error C2712).
- internal::String* exception_message = FormatSehExceptionMessage(
- GetExceptionCode(), location);
- internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,
- *exception_message);
- delete exception_message;
- return static_cast<Result>(0);
- }
-#else
- (void)location;
- return (object->*method)();
-#endif // GTEST_HAS_SEH
-}
-
-// Runs the given method and catches and reports C++ and/or SEH-style
-// exceptions, if they are supported; returns the 0-value for type
-// Result in case of an SEH exception.
-template <class T, typename Result>
-Result HandleExceptionsInMethodIfSupported(
- T* object, Result (T::*method)(), const char* location) {
- // NOTE: The user code can affect the way in which Google Test handles
- // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
- // RUN_ALL_TESTS() starts. It is technically possible to check the flag
- // after the exception is caught and either report or re-throw the
- // exception based on the flag's value:
- //
- // try {
- // // Perform the test method.
- // } catch (...) {
- // if (GTEST_FLAG(catch_exceptions))
- // // Report the exception as failure.
- // else
- // throw; // Re-throws the original exception.
- // }
- //
- // However, the purpose of this flag is to allow the program to drop into
- // the debugger when the exception is thrown. On most platforms, once the
- // control enters the catch block, the exception origin information is
- // lost and the debugger will stop the program at the point of the
- // re-throw in this function -- instead of at the point of the original
- // throw statement in the code under test. For this reason, we perform
- // the check early, sacrificing the ability to affect Google Test's
- // exception handling in the method where the exception is thrown.
- if (internal::GetUnitTestImpl()->catch_exceptions()) {
-#if GTEST_HAS_EXCEPTIONS
- try {
- return HandleSehExceptionsInMethodIfSupported(object, method, location);
- } catch (const GoogleTestFailureException&) { // NOLINT
- // This exception doesn't originate in code under test. It makes no
- // sense to report it as a test failure.
- throw;
- } catch (const std::exception& e) { // NOLINT
- internal::ReportFailureInUnknownLocation(
- TestPartResult::kFatalFailure,
- FormatCxxExceptionMessage(e.what(), location));
- } catch (...) { // NOLINT
- internal::ReportFailureInUnknownLocation(
- TestPartResult::kFatalFailure,
- FormatCxxExceptionMessage(NULL, location));
- }
- return static_cast<Result>(0);
-#else
- return HandleSehExceptionsInMethodIfSupported(object, method, location);
-#endif // GTEST_HAS_EXCEPTIONS
- } else {
- return (object->*method)();
- }
-}
-
-} // namespace internal
-
-// Runs the test and updates the test result.
-void Test::Run() {
- if (!HasSameFixtureClass()) return;
-
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()");
- // We will run the test only if SetUp() was successful.
- if (!HasFatalFailure()) {
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &Test::TestBody, "the test body");
- }
-
- // However, we want to clean up as much as possible. Hence we will
- // always call TearDown(), even if SetUp() or the test body has
- // failed.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &Test::TearDown, "TearDown()");
-}
-
-// Returns true iff the current test has a fatal failure.
-bool Test::HasFatalFailure() {
- return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();
-}
-
-// Returns true iff the current test has a non-fatal failure.
-bool Test::HasNonfatalFailure() {
- return internal::GetUnitTestImpl()->current_test_result()->
- HasNonfatalFailure();
-}
-
-// class TestInfo
-
-// Constructs a TestInfo object. It assumes ownership of the test factory
-// object.
-// TODO(vladl@google.com): Make a_test_case_name and a_name const string&'s
-// to signify they cannot be NULLs.
-TestInfo::TestInfo(const char* a_test_case_name,
- const char* a_name,
- const char* a_type_param,
- const char* a_value_param,
- internal::TypeId fixture_class_id,
- internal::TestFactoryBase* factory)
- : test_case_name_(a_test_case_name),
- name_(a_name),
- type_param_(a_type_param ? new std::string(a_type_param) : NULL),
- value_param_(a_value_param ? new std::string(a_value_param) : NULL),
- fixture_class_id_(fixture_class_id),
- should_run_(false),
- is_disabled_(false),
- matches_filter_(false),
- factory_(factory),
- result_() {}
-
-// Destructs a TestInfo object.
-TestInfo::~TestInfo() { delete factory_; }
-
-namespace internal {
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// name: name of the test
-// type_param: the name of the test's type parameter, or NULL if
-// this is not a typed or a type-parameterized test.
-// value_param: text representation of the test's value parameter,
-// or NULL if this is not a value-parameterized test.
-// fixture_class_id: ID of the test fixture class
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-// factory: pointer to the factory that creates a test object.
-// The newly created TestInfo instance will assume
-// ownership of the factory object.
-TestInfo* MakeAndRegisterTestInfo(
- const char* test_case_name, const char* name,
- const char* type_param,
- const char* value_param,
- TypeId fixture_class_id,
- SetUpTestCaseFunc set_up_tc,
- TearDownTestCaseFunc tear_down_tc,
- TestFactoryBase* factory) {
- TestInfo* const test_info =
- new TestInfo(test_case_name, name, type_param, value_param,
- fixture_class_id, factory);
- GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);
- return test_info;
-}
-
-#if GTEST_HAS_PARAM_TEST
-void ReportInvalidTestCaseType(const char* test_case_name,
- const char* file, int line) {
- Message errors;
- errors
- << "Attempted redefinition of test case " << test_case_name << ".\n"
- << "All tests in the same test case must use the same test fixture\n"
- << "class. However, in test case " << test_case_name << ", you tried\n"
- << "to define a test using a fixture class different from the one\n"
- << "used earlier. This can happen if the two fixture classes are\n"
- << "from different namespaces and have the same name. You should\n"
- << "probably rename one of the classes to put the tests into different\n"
- << "test cases.";
-
- fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
- errors.GetString().c_str());
-}
-#endif // GTEST_HAS_PARAM_TEST
-
-} // namespace internal
-
-namespace {
-
-// A predicate that checks the test name of a TestInfo against a known
-// value.
-//
-// This is used for implementation of the TestCase class only. We put
-// it in the anonymous namespace to prevent polluting the outer
-// namespace.
-//
-// TestNameIs is copyable.
-class TestNameIs {
- public:
- // Constructor.
- //
- // TestNameIs has NO default constructor.
- explicit TestNameIs(const char* name)
- : name_(name) {}
-
- // Returns true iff the test name of test_info matches name_.
- bool operator()(const TestInfo * test_info) const {
- return test_info && internal::String(test_info->name()).Compare(name_) == 0;
- }
-
- private:
- internal::String name_;
-};
-
-} // namespace
-
-namespace internal {
-
-// This method expands all parameterized tests registered with macros TEST_P
-// and INSTANTIATE_TEST_CASE_P into regular tests and registers those.
-// This will be done just once during the program runtime.
-void UnitTestImpl::RegisterParameterizedTests() {
-#if GTEST_HAS_PARAM_TEST
- if (!parameterized_tests_registered_) {
- parameterized_test_registry_.RegisterTests();
- parameterized_tests_registered_ = true;
- }
-#endif
-}
-
-} // namespace internal
-
-// Creates the test object, runs it, records its result, and then
-// deletes it.
-void TestInfo::Run() {
- if (!should_run_) return;
-
- // Tells UnitTest where to store test result.
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->set_current_test_info(this);
-
- TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
-
- // Notifies the unit test event listeners that a test is about to start.
- repeater->OnTestStart(*this);
-
- const TimeInMillis start = internal::GetTimeInMillis();
-
- impl->os_stack_trace_getter()->UponLeavingGTest();
-
- // Creates the test object.
- Test* const test = internal::HandleExceptionsInMethodIfSupported(
- factory_, &internal::TestFactoryBase::CreateTest,
- "the test fixture's constructor");
-
- // Runs the test only if the test object was created and its
- // constructor didn't generate a fatal failure.
- if ((test != NULL) && !Test::HasFatalFailure()) {
- // This doesn't throw as all user code that can throw are wrapped into
- // exception handling code.
- test->Run();
- }
-
- // Deletes the test object.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- test, &Test::DeleteSelf_, "the test fixture's destructor");
-
- result_.set_elapsed_time(internal::GetTimeInMillis() - start);
-
- // Notifies the unit test event listener that a test has just finished.
- repeater->OnTestEnd(*this);
-
- // Tells UnitTest to stop associating assertion results to this
- // test.
- impl->set_current_test_info(NULL);
-}
-
-// class TestCase
-
-// Gets the number of successful tests in this test case.
-int TestCase::successful_test_count() const {
- return CountIf(test_info_list_, TestPassed);
-}
-
-// Gets the number of failed tests in this test case.
-int TestCase::failed_test_count() const {
- return CountIf(test_info_list_, TestFailed);
-}
-
-int TestCase::disabled_test_count() const {
- return CountIf(test_info_list_, TestDisabled);
-}
-
-// Get the number of tests in this test case that should run.
-int TestCase::test_to_run_count() const {
- return CountIf(test_info_list_, ShouldRunTest);
-}
-
-// Gets the number of all tests.
-int TestCase::total_test_count() const {
- return static_cast<int>(test_info_list_.size());
-}
-
-// Creates a TestCase with the given name.
-//
-// Arguments:
-//
-// name: name of the test case
-// a_type_param: the name of the test case's type parameter, or NULL if
-// this is not a typed or a type-parameterized test case.
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-TestCase::TestCase(const char* a_name, const char* a_type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc)
- : name_(a_name),
- type_param_(a_type_param ? new std::string(a_type_param) : NULL),
- set_up_tc_(set_up_tc),
- tear_down_tc_(tear_down_tc),
- should_run_(false),
- elapsed_time_(0) {
-}
-
-// Destructor of TestCase.
-TestCase::~TestCase() {
- // Deletes every Test in the collection.
- ForEach(test_info_list_, internal::Delete<TestInfo>);
-}
-
-// Returns the i-th test among all the tests. i can range from 0 to
-// total_test_count() - 1. If i is not in that range, returns NULL.
-const TestInfo* TestCase::GetTestInfo(int i) const {
- const int index = GetElementOr(test_indices_, i, -1);
- return index < 0 ? NULL : test_info_list_[index];
-}
-
-// Returns the i-th test among all the tests. i can range from 0 to
-// total_test_count() - 1. If i is not in that range, returns NULL.
-TestInfo* TestCase::GetMutableTestInfo(int i) {
- const int index = GetElementOr(test_indices_, i, -1);
- return index < 0 ? NULL : test_info_list_[index];
-}
-
-// Adds a test to this test case. Will delete the test upon
-// destruction of the TestCase object.
-void TestCase::AddTestInfo(TestInfo * test_info) {
- test_info_list_.push_back(test_info);
- test_indices_.push_back(static_cast<int>(test_indices_.size()));
-}
-
-// Runs every test in this TestCase.
-void TestCase::Run() {
- if (!should_run_) return;
-
- internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
- impl->set_current_test_case(this);
-
- TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
-
- repeater->OnTestCaseStart(*this);
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &TestCase::RunSetUpTestCase, "SetUpTestCase()");
-
- const internal::TimeInMillis start = internal::GetTimeInMillis();
- for (int i = 0; i < total_test_count(); i++) {
- GetMutableTestInfo(i)->Run();
- }
- elapsed_time_ = internal::GetTimeInMillis() - start;
-
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- this, &TestCase::RunTearDownTestCase, "TearDownTestCase()");
-
- repeater->OnTestCaseEnd(*this);
- impl->set_current_test_case(NULL);
-}
-
-// Clears the results of all tests in this test case.
-void TestCase::ClearResult() {
- ForEach(test_info_list_, TestInfo::ClearTestResult);
-}
-
-// Shuffles the tests in this test case.
-void TestCase::ShuffleTests(internal::Random* random) {
- Shuffle(random, &test_indices_);
-}
-
-// Restores the test order to before the first shuffle.
-void TestCase::UnshuffleTests() {
- for (size_t i = 0; i < test_indices_.size(); i++) {
- test_indices_[i] = static_cast<int>(i);
- }
-}
-
-// Formats a countable noun. Depending on its quantity, either the
-// singular form or the plural form is used. e.g.
-//
-// FormatCountableNoun(1, "formula", "formuli") returns "1 formula".
-// FormatCountableNoun(5, "book", "books") returns "5 books".
-static internal::String FormatCountableNoun(int count,
- const char * singular_form,
- const char * plural_form) {
- return internal::String::Format("%d %s", count,
- count == 1 ? singular_form : plural_form);
-}
-
-// Formats the count of tests.
-static internal::String FormatTestCount(int test_count) {
- return FormatCountableNoun(test_count, "test", "tests");
-}
-
-// Formats the count of test cases.
-static internal::String FormatTestCaseCount(int test_case_count) {
- return FormatCountableNoun(test_case_count, "test case", "test cases");
-}
-
-// Converts a TestPartResult::Type enum to human-friendly string
-// representation. Both kNonFatalFailure and kFatalFailure are translated
-// to "Failure", as the user usually doesn't care about the difference
-// between the two when viewing the test result.
-static const char * TestPartResultTypeToString(TestPartResult::Type type) {
- switch (type) {
- case TestPartResult::kSuccess:
- return "Success";
-
- case TestPartResult::kNonFatalFailure:
- case TestPartResult::kFatalFailure:
-#ifdef _MSC_VER
- return "error: ";
-#else
- return "Failure\n";
-#endif
- default:
- return "Unknown result type";
- }
-}
-
-// Prints a TestPartResult to a String.
-static internal::String PrintTestPartResultToString(
- const TestPartResult& test_part_result) {
- return (Message()
- << internal::FormatFileLocation(test_part_result.file_name(),
- test_part_result.line_number())
- << " " << TestPartResultTypeToString(test_part_result.type())
- << test_part_result.message()).GetString();
-}
-
-// Prints a TestPartResult.
-static void PrintTestPartResult(const TestPartResult& test_part_result) {
- const internal::String& result =
- PrintTestPartResultToString(test_part_result);
- printf("%s\n", result.c_str());
- fflush(stdout);
- // If the test program runs in Visual Studio or a debugger, the
- // following statements add the test part result message to the Output
- // window such that the user can double-click on it to jump to the
- // corresponding source code location; otherwise they do nothing.
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- // We don't call OutputDebugString*() on Windows Mobile, as printing
- // to stdout is done by OutputDebugString() there already - we don't
- // want the same message printed twice.
- ::OutputDebugStringA(result.c_str());
- ::OutputDebugStringA("\n");
-#endif
-}
-
-// class PrettyUnitTestResultPrinter
-
-namespace internal {
-
-enum GTestColor {
- COLOR_DEFAULT,
- COLOR_RED,
- COLOR_GREEN,
- COLOR_YELLOW
-};
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
-
-// Returns the character attribute for the given color.
-WORD GetColorAttribute(GTestColor color) {
- switch (color) {
- case COLOR_RED: return FOREGROUND_RED;
- case COLOR_GREEN: return FOREGROUND_GREEN;
- case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN;
- default: return 0;
- }
-}
-
-#else
-
-// Returns the ANSI color code for the given color. COLOR_DEFAULT is
-// an invalid input.
-const char* GetAnsiColorCode(GTestColor color) {
- switch (color) {
- case COLOR_RED: return "1";
- case COLOR_GREEN: return "2";
- case COLOR_YELLOW: return "3";
- default: return NULL;
- };
-}
-
-#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
-
-// Returns true iff Google Test should use colors in the output.
-bool ShouldUseColor(bool stdout_is_tty) {
- const char* const gtest_color = GTEST_FLAG(color).c_str();
-
- if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
-#if GTEST_OS_WINDOWS
- // On Windows the TERM variable is usually not set, but the
- // console there does support colors.
- return stdout_is_tty;
-#else
- // On non-Windows platforms, we rely on the TERM variable.
- const char* const term = posix::GetEnv("TERM");
- const bool term_supports_color =
- String::CStringEquals(term, "xterm") ||
- String::CStringEquals(term, "xterm-color") ||
- String::CStringEquals(term, "xterm-256color") ||
- String::CStringEquals(term, "screen") ||
- String::CStringEquals(term, "linux") ||
- String::CStringEquals(term, "cygwin");
- return stdout_is_tty && term_supports_color;
-#endif // GTEST_OS_WINDOWS
- }
-
- return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
- String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
- String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
- String::CStringEquals(gtest_color, "1");
- // We take "yes", "true", "t", and "1" as meaning "yes". If the
- // value is neither one of these nor "auto", we treat it as "no" to
- // be conservative.
-}
-
-// Helpers for printing colored strings to stdout. Note that on Windows, we
-// cannot simply emit special characters and have the terminal change colors.
-// This routine must actually emit the characters rather than return a string
-// that would be colored when printed, as can be done on Linux.
-void ColoredPrintf(GTestColor color, const char* fmt, ...) {
- va_list args;
- va_start(args, fmt);
-
-#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
- const bool use_color = false;
-#else
- static const bool in_color_mode =
- ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
- const bool use_color = in_color_mode && (color != COLOR_DEFAULT);
-#endif // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS
- // The '!= 0' comparison is necessary to satisfy MSVC 7.1.
-
- if (!use_color) {
- vprintf(fmt, args);
- va_end(args);
- return;
- }
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
-
- // Gets the current text color.
- CONSOLE_SCREEN_BUFFER_INFO buffer_info;
- GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
- const WORD old_color_attrs = buffer_info.wAttributes;
-
- // We need to flush the stream buffers into the console before each
- // SetConsoleTextAttribute call lest it affect the text that is already
- // printed but has not yet reached the console.
- fflush(stdout);
- SetConsoleTextAttribute(stdout_handle,
- GetColorAttribute(color) | FOREGROUND_INTENSITY);
- vprintf(fmt, args);
-
- fflush(stdout);
- // Restores the text color.
- SetConsoleTextAttribute(stdout_handle, old_color_attrs);
-#else
- printf("\033[0;3%sm", GetAnsiColorCode(color));
- vprintf(fmt, args);
- printf("\033[m"); // Resets the terminal to default.
-#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
- va_end(args);
-}
-
-void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
- const char* const type_param = test_info.type_param();
- const char* const value_param = test_info.value_param();
-
- if (type_param != NULL || value_param != NULL) {
- printf(", where ");
- if (type_param != NULL) {
- printf("TypeParam = %s", type_param);
- if (value_param != NULL)
- printf(" and ");
- }
- if (value_param != NULL) {
- printf("GetParam() = %s", value_param);
- }
- }
-}
-
-// This class implements the TestEventListener interface.
-//
-// Class PrettyUnitTestResultPrinter is copyable.
-class PrettyUnitTestResultPrinter : public TestEventListener {
- public:
- PrettyUnitTestResultPrinter() {}
- static void PrintTestName(const char * test_case, const char * test) {
- printf("%s.%s", test_case, test);
- }
-
- // The following methods override what's in the TestEventListener class.
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestCaseStart(const TestCase& test_case);
- virtual void OnTestStart(const TestInfo& test_info);
- virtual void OnTestPartResult(const TestPartResult& result);
- virtual void OnTestEnd(const TestInfo& test_info);
- virtual void OnTestCaseEnd(const TestCase& test_case);
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
-
- private:
- static void PrintFailedTests(const UnitTest& unit_test);
-
- internal::String test_case_name_;
-};
-
- // Fired before each iteration of tests starts.
-void PrettyUnitTestResultPrinter::OnTestIterationStart(
- const UnitTest& unit_test, int iteration) {
- if (GTEST_FLAG(repeat) != 1)
- printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
-
- const char* const filter = GTEST_FLAG(filter).c_str();
-
- // Prints the filter if it's not *. This reminds the user that some
- // tests may be skipped.
- if (!internal::String::CStringEquals(filter, kUniversalFilter)) {
- ColoredPrintf(COLOR_YELLOW,
- "Note: %s filter = %s\n", GTEST_NAME_, filter);
- }
-
- if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
- const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
- ColoredPrintf(COLOR_YELLOW,
- "Note: This is test shard %d of %s.\n",
- static_cast<int>(shard_index) + 1,
- internal::posix::GetEnv(kTestTotalShards));
- }
-
- if (GTEST_FLAG(shuffle)) {
- ColoredPrintf(COLOR_YELLOW,
- "Note: Randomizing tests' orders with a seed of %d .\n",
- unit_test.random_seed());
- }
-
- ColoredPrintf(COLOR_GREEN, "[==========] ");
- printf("Running %s from %s.\n",
- FormatTestCount(unit_test.test_to_run_count()).c_str(),
- FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(
- const UnitTest& /*unit_test*/) {
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("Global test environment set-up.\n");
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
- test_case_name_ = test_case.name();
- const internal::String counts =
- FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("%s from %s", counts.c_str(), test_case_name_.c_str());
- if (test_case.type_param() == NULL) {
- printf("\n");
- } else {
- printf(", where TypeParam = %s\n", test_case.type_param());
- }
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {
- ColoredPrintf(COLOR_GREEN, "[ RUN ] ");
- PrintTestName(test_case_name_.c_str(), test_info.name());
- printf("\n");
- fflush(stdout);
-}
-
-// Called after an assertion failure.
-void PrettyUnitTestResultPrinter::OnTestPartResult(
- const TestPartResult& result) {
- // If the test part succeeded, we don't need to do anything.
- if (result.type() == TestPartResult::kSuccess)
- return;
-
- // Print failure message from the assertion (e.g. expected this and got that).
- PrintTestPartResult(result);
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) {
- if (test_info.result()->Passed()) {
- ColoredPrintf(COLOR_GREEN, "[ OK ] ");
- } else {
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- }
- PrintTestName(test_case_name_.c_str(), test_info.name());
- if (test_info.result()->Failed())
- PrintFullTestCommentIfPresent(test_info);
-
- if (GTEST_FLAG(print_time)) {
- printf(" (%s ms)\n", internal::StreamableToString(
- test_info.result()->elapsed_time()).c_str());
- } else {
- printf("\n");
- }
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) {
- if (!GTEST_FLAG(print_time)) return;
-
- test_case_name_ = test_case.name();
- const internal::String counts =
- FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("%s from %s (%s ms total)\n\n",
- counts.c_str(), test_case_name_.c_str(),
- internal::StreamableToString(test_case.elapsed_time()).c_str());
- fflush(stdout);
-}
-
-void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart(
- const UnitTest& /*unit_test*/) {
- ColoredPrintf(COLOR_GREEN, "[----------] ");
- printf("Global test environment tear-down\n");
- fflush(stdout);
-}
-
-// Internal helper for printing the list of failed tests.
-void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {
- const int failed_test_count = unit_test.failed_test_count();
- if (failed_test_count == 0) {
- return;
- }
-
- for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
- const TestCase& test_case = *unit_test.GetTestCase(i);
- if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {
- continue;
- }
- for (int j = 0; j < test_case.total_test_count(); ++j) {
- const TestInfo& test_info = *test_case.GetTestInfo(j);
- if (!test_info.should_run() || test_info.result()->Passed()) {
- continue;
- }
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- printf("%s.%s", test_case.name(), test_info.name());
- PrintFullTestCommentIfPresent(test_info);
- printf("\n");
- }
- }
-}
-
-void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
- int /*iteration*/) {
- ColoredPrintf(COLOR_GREEN, "[==========] ");
- printf("%s from %s ran.",
- FormatTestCount(unit_test.test_to_run_count()).c_str(),
- FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
- if (GTEST_FLAG(print_time)) {
- printf(" (%s ms total)",
- internal::StreamableToString(unit_test.elapsed_time()).c_str());
- }
- printf("\n");
- ColoredPrintf(COLOR_GREEN, "[ PASSED ] ");
- printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str());
-
- int num_failures = unit_test.failed_test_count();
- if (!unit_test.Passed()) {
- const int failed_test_count = unit_test.failed_test_count();
- ColoredPrintf(COLOR_RED, "[ FAILED ] ");
- printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str());
- PrintFailedTests(unit_test);
- printf("\n%2d FAILED %s\n", num_failures,
- num_failures == 1 ? "TEST" : "TESTS");
- }
-
- int num_disabled = unit_test.disabled_test_count();
- if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) {
- if (!num_failures) {
- printf("\n"); // Add a spacer if no FAILURE banner is displayed.
- }
- ColoredPrintf(COLOR_YELLOW,
- " YOU HAVE %d DISABLED %s\n\n",
- num_disabled,
- num_disabled == 1 ? "TEST" : "TESTS");
- }
- // Ensure that Google Test output is printed before, e.g., heapchecker output.
- fflush(stdout);
-}
-
-// End PrettyUnitTestResultPrinter
-
-// class TestEventRepeater
-//
-// This class forwards events to other event listeners.
-class TestEventRepeater : public TestEventListener {
- public:
- TestEventRepeater() : forwarding_enabled_(true) {}
- virtual ~TestEventRepeater();
- void Append(TestEventListener *listener);
- TestEventListener* Release(TestEventListener* listener);
-
- // Controls whether events will be forwarded to listeners_. Set to false
- // in death test child processes.
- bool forwarding_enabled() const { return forwarding_enabled_; }
- void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; }
-
- virtual void OnTestProgramStart(const UnitTest& unit_test);
- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);
- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test);
- virtual void OnTestCaseStart(const TestCase& test_case);
- virtual void OnTestStart(const TestInfo& test_info);
- virtual void OnTestPartResult(const TestPartResult& result);
- virtual void OnTestEnd(const TestInfo& test_info);
- virtual void OnTestCaseEnd(const TestCase& test_case);
- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test);
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
- virtual void OnTestProgramEnd(const UnitTest& unit_test);
-
- private:
- // Controls whether events will be forwarded to listeners_. Set to false
- // in death test child processes.
- bool forwarding_enabled_;
- // The list of listeners that receive events.
- std::vector<TestEventListener*> listeners_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater);
-};
-
-TestEventRepeater::~TestEventRepeater() {
- ForEach(listeners_, Delete<TestEventListener>);
-}
-
-void TestEventRepeater::Append(TestEventListener *listener) {
- listeners_.push_back(listener);
-}
-
-// TODO(vladl@google.com): Factor the search functionality into Vector::Find.
-TestEventListener* TestEventRepeater::Release(TestEventListener *listener) {
- for (size_t i = 0; i < listeners_.size(); ++i) {
- if (listeners_[i] == listener) {
- listeners_.erase(listeners_.begin() + i);
- return listener;
- }
- }
-
- return NULL;
-}
-
-// Since most methods are very similar, use macros to reduce boilerplate.
-// This defines a member that forwards the call to all listeners.
-#define GTEST_REPEATER_METHOD_(Name, Type) \
-void TestEventRepeater::Name(const Type& parameter) { \
- if (forwarding_enabled_) { \
- for (size_t i = 0; i < listeners_.size(); i++) { \
- listeners_[i]->Name(parameter); \
- } \
- } \
-}
-// This defines a member that forwards the call to all listeners in reverse
-// order.
-#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \
-void TestEventRepeater::Name(const Type& parameter) { \
- if (forwarding_enabled_) { \
- for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) { \
- listeners_[i]->Name(parameter); \
- } \
- } \
-}
-
-GTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest)
-GTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest)
-GTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase)
-GTEST_REPEATER_METHOD_(OnTestStart, TestInfo)
-GTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult)
-GTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestCase)
-GTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest)
-
-#undef GTEST_REPEATER_METHOD_
-#undef GTEST_REVERSE_REPEATER_METHOD_
-
-void TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test,
- int iteration) {
- if (forwarding_enabled_) {
- for (size_t i = 0; i < listeners_.size(); i++) {
- listeners_[i]->OnTestIterationStart(unit_test, iteration);
- }
- }
-}
-
-void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test,
- int iteration) {
- if (forwarding_enabled_) {
- for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) {
- listeners_[i]->OnTestIterationEnd(unit_test, iteration);
- }
- }
-}
-
-// End TestEventRepeater
-
-// This class generates an XML output file.
-class XmlUnitTestResultPrinter : public EmptyTestEventListener {
- public:
- explicit XmlUnitTestResultPrinter(const char* output_file);
-
- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);
-
- private:
- // Is c a whitespace character that is normalized to a space character
- // when it appears in an XML attribute value?
- static bool IsNormalizableWhitespace(char c) {
- return c == 0x9 || c == 0xA || c == 0xD;
- }
-
- // May c appear in a well-formed XML document?
- static bool IsValidXmlCharacter(char c) {
- return IsNormalizableWhitespace(c) || c >= 0x20;
- }
-
- // Returns an XML-escaped copy of the input string str. If
- // is_attribute is true, the text is meant to appear as an attribute
- // value, and normalizable whitespace is preserved by replacing it
- // with character references.
- static String EscapeXml(const char* str, bool is_attribute);
-
- // Returns the given string with all characters invalid in XML removed.
- static string RemoveInvalidXmlCharacters(const string& str);
-
- // Convenience wrapper around EscapeXml when str is an attribute value.
- static String EscapeXmlAttribute(const char* str) {
- return EscapeXml(str, true);
- }
-
- // Convenience wrapper around EscapeXml when str is not an attribute value.
- static String EscapeXmlText(const char* str) { return EscapeXml(str, false); }
-
- // Streams an XML CDATA section, escaping invalid CDATA sequences as needed.
- static void OutputXmlCDataSection(::std::ostream* stream, const char* data);
-
- // Streams an XML representation of a TestInfo object.
- static void OutputXmlTestInfo(::std::ostream* stream,
- const char* test_case_name,
- const TestInfo& test_info);
-
- // Prints an XML representation of a TestCase object
- static void PrintXmlTestCase(FILE* out, const TestCase& test_case);
-
- // Prints an XML summary of unit_test to output stream out.
- static void PrintXmlUnitTest(FILE* out, const UnitTest& unit_test);
-
- // Produces a string representing the test properties in a result as space
- // delimited XML attributes based on the property key="value" pairs.
- // When the String is not empty, it includes a space at the beginning,
- // to delimit this attribute from prior attributes.
- static String TestPropertiesAsXmlAttributes(const TestResult& result);
-
- // The output file.
- const String output_file_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter);
-};
-
-// Creates a new XmlUnitTestResultPrinter.
-XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)
- : output_file_(output_file) {
- if (output_file_.c_str() == NULL || output_file_.empty()) {
- fprintf(stderr, "XML output file may not be null\n");
- fflush(stderr);
- exit(EXIT_FAILURE);
- }
-}
-
-// Called after the unit test ends.
-void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
- int /*iteration*/) {
- FILE* xmlout = NULL;
- FilePath output_file(output_file_);
- FilePath output_dir(output_file.RemoveFileName());
-
- if (output_dir.CreateDirectoriesRecursively()) {
- xmlout = posix::FOpen(output_file_.c_str(), "w");
- }
- if (xmlout == NULL) {
- // TODO(wan): report the reason of the failure.
- //
- // We don't do it for now as:
- //
- // 1. There is no urgent need for it.
- // 2. It's a bit involved to make the errno variable thread-safe on
- // all three operating systems (Linux, Windows, and Mac OS).
- // 3. To interpret the meaning of errno in a thread-safe way,
- // we need the strerror_r() function, which is not available on
- // Windows.
- fprintf(stderr,
- "Unable to open file \"%s\"\n",
- output_file_.c_str());
- fflush(stderr);
- exit(EXIT_FAILURE);
- }
- PrintXmlUnitTest(xmlout, unit_test);
- fclose(xmlout);
-}
-
-// Returns an XML-escaped copy of the input string str. If is_attribute
-// is true, the text is meant to appear as an attribute value, and
-// normalizable whitespace is preserved by replacing it with character
-// references.
-//
-// Invalid XML characters in str, if any, are stripped from the output.
-// It is expected that most, if not all, of the text processed by this
-// module will consist of ordinary English text.
-// If this module is ever modified to produce version 1.1 XML output,
-// most invalid characters can be retained using character references.
-// TODO(wan): It might be nice to have a minimally invasive, human-readable
-// escaping scheme for invalid characters, rather than dropping them.
-String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_attribute) {
- Message m;
-
- if (str != NULL) {
- for (const char* src = str; *src; ++src) {
- switch (*src) {
- case '<':
- m << "&lt;";
- break;
- case '>':
- m << "&gt;";
- break;
- case '&':
- m << "&amp;";
- break;
- case '\'':
- if (is_attribute)
- m << "&apos;";
- else
- m << '\'';
- break;
- case '"':
- if (is_attribute)
- m << "&quot;";
- else
- m << '"';
- break;
- default:
- if (IsValidXmlCharacter(*src)) {
- if (is_attribute && IsNormalizableWhitespace(*src))
- m << String::Format("&#x%02X;", unsigned(*src));
- else
- m << *src;
- }
- break;
- }
- }
- }
-
- return m.GetString();
-}
-
-// Returns the given string with all characters invalid in XML removed.
-// Currently invalid characters are dropped from the string. An
-// alternative is to replace them with certain characters such as . or ?.
-string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const string& str) {
- string output;
- output.reserve(str.size());
- for (string::const_iterator it = str.begin(); it != str.end(); ++it)
- if (IsValidXmlCharacter(*it))
- output.push_back(*it);
-
- return output;
-}
-
-// The following routines generate an XML representation of a UnitTest
-// object.
-//
-// This is how Google Test concepts map to the DTD:
-//
-// <testsuites name="AllTests"> <-- corresponds to a UnitTest object
-// <testsuite name="testcase-name"> <-- corresponds to a TestCase object
-// <testcase name="test-name"> <-- corresponds to a TestInfo object
-// <failure message="...">...</failure>
-// <failure message="...">...</failure>
-// <failure message="...">...</failure>
-// <-- individual assertion failures
-// </testcase>
-// </testsuite>
-// </testsuites>
-
-// Formats the given time in milliseconds as seconds.
-std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
- ::std::stringstream ss;
- ss << ms/1000.0;
- return ss.str();
-}
-
-// Streams an XML CDATA section, escaping invalid CDATA sequences as needed.
-void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,
- const char* data) {
- const char* segment = data;
- *stream << "<![CDATA[";
- for (;;) {
- const char* const next_segment = strstr(segment, "]]>");
- if (next_segment != NULL) {
- stream->write(
- segment, static_cast<std::streamsize>(next_segment - segment));
- *stream << "]]>]]&gt;<![CDATA[";
- segment = next_segment + strlen("]]>");
- } else {
- *stream << segment;
- break;
- }
- }
- *stream << "]]>";
-}
-
-// Prints an XML representation of a TestInfo object.
-// TODO(wan): There is also value in printing properties with the plain printer.
-void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
- const char* test_case_name,
- const TestInfo& test_info) {
- const TestResult& result = *test_info.result();
- *stream << " <testcase name=\""
- << EscapeXmlAttribute(test_info.name()).c_str() << "\"";
-
- if (test_info.value_param() != NULL) {
- *stream << " value_param=\"" << EscapeXmlAttribute(test_info.value_param())
- << "\"";
- }
- if (test_info.type_param() != NULL) {
- *stream << " type_param=\"" << EscapeXmlAttribute(test_info.type_param())
- << "\"";
- }
-
- *stream << " status=\""
- << (test_info.should_run() ? "run" : "notrun")
- << "\" time=\""
- << FormatTimeInMillisAsSeconds(result.elapsed_time())
- << "\" classname=\"" << EscapeXmlAttribute(test_case_name).c_str()
- << "\"" << TestPropertiesAsXmlAttributes(result).c_str();
-
- int failures = 0;
- for (int i = 0; i < result.total_part_count(); ++i) {
- const TestPartResult& part = result.GetTestPartResult(i);
- if (part.failed()) {
- if (++failures == 1)
- *stream << ">\n";
- *stream << " <failure message=\""
- << EscapeXmlAttribute(part.summary()).c_str()
- << "\" type=\"\">";
- const string location = internal::FormatCompilerIndependentFileLocation(
- part.file_name(), part.line_number());
- const string message = location + "\n" + part.message();
- OutputXmlCDataSection(stream,
- RemoveInvalidXmlCharacters(message).c_str());
- *stream << "</failure>\n";
- }
- }
-
- if (failures == 0)
- *stream << " />\n";
- else
- *stream << " </testcase>\n";
-}
-
-// Prints an XML representation of a TestCase object
-void XmlUnitTestResultPrinter::PrintXmlTestCase(FILE* out,
- const TestCase& test_case) {
- fprintf(out,
- " <testsuite name=\"%s\" tests=\"%d\" failures=\"%d\" "
- "disabled=\"%d\" ",
- EscapeXmlAttribute(test_case.name()).c_str(),
- test_case.total_test_count(),
- test_case.failed_test_count(),
- test_case.disabled_test_count());
- fprintf(out,
- "errors=\"0\" time=\"%s\">\n",
- FormatTimeInMillisAsSeconds(test_case.elapsed_time()).c_str());
- for (int i = 0; i < test_case.total_test_count(); ++i) {
- ::std::stringstream stream;
- OutputXmlTestInfo(&stream, test_case.name(), *test_case.GetTestInfo(i));
- fprintf(out, "%s", StringStreamToString(&stream).c_str());
- }
- fprintf(out, " </testsuite>\n");
-}
-
-// Prints an XML summary of unit_test to output stream out.
-void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out,
- const UnitTest& unit_test) {
- fprintf(out, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- fprintf(out,
- "<testsuites tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
- "errors=\"0\" time=\"%s\" ",
- unit_test.total_test_count(),
- unit_test.failed_test_count(),
- unit_test.disabled_test_count(),
- FormatTimeInMillisAsSeconds(unit_test.elapsed_time()).c_str());
- if (GTEST_FLAG(shuffle)) {
- fprintf(out, "random_seed=\"%d\" ", unit_test.random_seed());
- }
- fprintf(out, "name=\"AllTests\">\n");
- for (int i = 0; i < unit_test.total_test_case_count(); ++i)
- PrintXmlTestCase(out, *unit_test.GetTestCase(i));
- fprintf(out, "</testsuites>\n");
-}
-
-// Produces a string representing the test properties in a result as space
-// delimited XML attributes based on the property key="value" pairs.
-String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
- const TestResult& result) {
- Message attributes;
- for (int i = 0; i < result.test_property_count(); ++i) {
- const TestProperty& property = result.GetTestProperty(i);
- attributes << " " << property.key() << "="
- << "\"" << EscapeXmlAttribute(property.value()) << "\"";
- }
- return attributes.GetString();
-}
-
-// End XmlUnitTestResultPrinter
-
-#if GTEST_CAN_STREAM_RESULTS_
-
-// Streams test results to the given port on the given host machine.
-class StreamingListener : public EmptyTestEventListener {
- public:
- // Escapes '=', '&', '%', and '\n' characters in str as "%xx".
- static string UrlEncode(const char* str);
-
- StreamingListener(const string& host, const string& port)
- : sockfd_(-1), host_name_(host), port_num_(port) {
- MakeConnection();
- Send("gtest_streaming_protocol_version=1.0\n");
- }
-
- virtual ~StreamingListener() {
- if (sockfd_ != -1)
- CloseConnection();
- }
-
- void OnTestProgramStart(const UnitTest& /* unit_test */) {
- Send("event=TestProgramStart\n");
- }
-
- void OnTestProgramEnd(const UnitTest& unit_test) {
- // Note that Google Test current only report elapsed time for each
- // test iteration, not for the entire test program.
- Send(String::Format("event=TestProgramEnd&passed=%d\n",
- unit_test.Passed()));
-
- // Notify the streaming server to stop.
- CloseConnection();
- }
-
- void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) {
- Send(String::Format("event=TestIterationStart&iteration=%d\n",
- iteration));
- }
-
- void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) {
- Send(String::Format("event=TestIterationEnd&passed=%d&elapsed_time=%sms\n",
- unit_test.Passed(),
- StreamableToString(unit_test.elapsed_time()).c_str()));
- }
-
- void OnTestCaseStart(const TestCase& test_case) {
- Send(String::Format("event=TestCaseStart&name=%s\n", test_case.name()));
- }
-
- void OnTestCaseEnd(const TestCase& test_case) {
- Send(String::Format("event=TestCaseEnd&passed=%d&elapsed_time=%sms\n",
- test_case.Passed(),
- StreamableToString(test_case.elapsed_time()).c_str()));
- }
-
- void OnTestStart(const TestInfo& test_info) {
- Send(String::Format("event=TestStart&name=%s\n", test_info.name()));
- }
-
- void OnTestEnd(const TestInfo& test_info) {
- Send(String::Format(
- "event=TestEnd&passed=%d&elapsed_time=%sms\n",
- (test_info.result())->Passed(),
- StreamableToString((test_info.result())->elapsed_time()).c_str()));
- }
-
- void OnTestPartResult(const TestPartResult& test_part_result) {
- const char* file_name = test_part_result.file_name();
- if (file_name == NULL)
- file_name = "";
- Send(String::Format("event=TestPartResult&file=%s&line=%d&message=",
- UrlEncode(file_name).c_str(),
- test_part_result.line_number()));
- Send(UrlEncode(test_part_result.message()) + "\n");
- }
-
- private:
- // Creates a client socket and connects to the server.
- void MakeConnection();
-
- // Closes the socket.
- void CloseConnection() {
- GTEST_CHECK_(sockfd_ != -1)
- << "CloseConnection() can be called only when there is a connection.";
-
- close(sockfd_);
- sockfd_ = -1;
- }
-
- // Sends a string to the socket.
- void Send(const string& message) {
- GTEST_CHECK_(sockfd_ != -1)
- << "Send() can be called only when there is a connection.";
-
- const int len = static_cast<int>(message.length());
- if (write(sockfd_, message.c_str(), len) != len) {
- GTEST_LOG_(WARNING)
- << "stream_result_to: failed to stream to "
- << host_name_ << ":" << port_num_;
- }
- }
-
- int sockfd_; // socket file descriptor
- const string host_name_;
- const string port_num_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener);
-}; // class StreamingListener
-
-// Checks if str contains '=', '&', '%' or '\n' characters. If yes,
-// replaces them by "%xx" where xx is their hexadecimal value. For
-// example, replaces "=" with "%3D". This algorithm is O(strlen(str))
-// in both time and space -- important as the input str may contain an
-// arbitrarily long test failure message and stack trace.
-string StreamingListener::UrlEncode(const char* str) {
- string result;
- result.reserve(strlen(str) + 1);
- for (char ch = *str; ch != '\0'; ch = *++str) {
- switch (ch) {
- case '%':
- case '=':
- case '&':
- case '\n':
- result.append(String::Format("%%%02x", static_cast<unsigned char>(ch)));
- break;
- default:
- result.push_back(ch);
- break;
- }
- }
- return result;
-}
-
-void StreamingListener::MakeConnection() {
- GTEST_CHECK_(sockfd_ == -1)
- << "MakeConnection() can't be called when there is already a connection.";
-
- addrinfo hints;
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC; // To allow both IPv4 and IPv6 addresses.
- hints.ai_socktype = SOCK_STREAM;
- addrinfo* servinfo = NULL;
-
- // Use the getaddrinfo() to get a linked list of IP addresses for
- // the given host name.
- const int error_num = getaddrinfo(
- host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);
- if (error_num != 0) {
- GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: "
- << gai_strerror(error_num);
- }
-
- // Loop through all the results and connect to the first we can.
- for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != NULL;
- cur_addr = cur_addr->ai_next) {
- sockfd_ = socket(
- cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol);
- if (sockfd_ != -1) {
- // Connect the client socket to the server socket.
- if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {
- close(sockfd_);
- sockfd_ = -1;
- }
- }
- }
-
- freeaddrinfo(servinfo); // all done with this structure
-
- if (sockfd_ == -1) {
- GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to "
- << host_name_ << ":" << port_num_;
- }
-}
-
-// End of class Streaming Listener
-#endif // GTEST_CAN_STREAM_RESULTS__
-
-// Class ScopedTrace
-
-// Pushes the given source file location and message onto a per-thread
-// trace stack maintained by Google Test.
-// L < UnitTest::mutex_
-ScopedTrace::ScopedTrace(const char* file, int line, const Message& message) {
- TraceInfo trace;
- trace.file = file;
- trace.line = line;
- trace.message = message.GetString();
-
- UnitTest::GetInstance()->PushGTestTrace(trace);
-}
-
-// Pops the info pushed by the c'tor.
-// L < UnitTest::mutex_
-ScopedTrace::~ScopedTrace() {
- UnitTest::GetInstance()->PopGTestTrace();
-}
-
-
-// class OsStackTraceGetter
-
-// Returns the current OS stack trace as a String. Parameters:
-//
-// max_depth - the maximum number of stack frames to be included
-// in the trace.
-// skip_count - the number of top frames to be skipped; doesn't count
-// against max_depth.
-//
-// L < mutex_
-// We use "L < mutex_" to denote that the function may acquire mutex_.
-String OsStackTraceGetter::CurrentStackTrace(int, int) {
- return String("");
-}
-
-// L < mutex_
-void OsStackTraceGetter::UponLeavingGTest() {
-}
-
-const char* const
-OsStackTraceGetter::kElidedFramesMarker =
- "... " GTEST_NAME_ " internal frames ...";
-
-} // namespace internal
-
-// class TestEventListeners
-
-TestEventListeners::TestEventListeners()
- : repeater_(new internal::TestEventRepeater()),
- default_result_printer_(NULL),
- default_xml_generator_(NULL) {
-}
-
-TestEventListeners::~TestEventListeners() { delete repeater_; }
-
-// Returns the standard listener responsible for the default console
-// output. Can be removed from the listeners list to shut down default
-// console output. Note that removing this object from the listener list
-// with Release transfers its ownership to the user.
-void TestEventListeners::Append(TestEventListener* listener) {
- repeater_->Append(listener);
-}
-
-// Removes the given event listener from the list and returns it. It then
-// becomes the caller's responsibility to delete the listener. Returns
-// NULL if the listener is not found in the list.
-TestEventListener* TestEventListeners::Release(TestEventListener* listener) {
- if (listener == default_result_printer_)
- default_result_printer_ = NULL;
- else if (listener == default_xml_generator_)
- default_xml_generator_ = NULL;
- return repeater_->Release(listener);
-}
-
-// Returns repeater that broadcasts the TestEventListener events to all
-// subscribers.
-TestEventListener* TestEventListeners::repeater() { return repeater_; }
-
-// Sets the default_result_printer attribute to the provided listener.
-// The listener is also added to the listener list and previous
-// default_result_printer is removed from it and deleted. The listener can
-// also be NULL in which case it will not be added to the list. Does
-// nothing if the previous and the current listener objects are the same.
-void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {
- if (default_result_printer_ != listener) {
- // It is an error to pass this method a listener that is already in the
- // list.
- delete Release(default_result_printer_);
- default_result_printer_ = listener;
- if (listener != NULL)
- Append(listener);
- }
-}
-
-// Sets the default_xml_generator attribute to the provided listener. The
-// listener is also added to the listener list and previous
-// default_xml_generator is removed from it and deleted. The listener can
-// also be NULL in which case it will not be added to the list. Does
-// nothing if the previous and the current listener objects are the same.
-void TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) {
- if (default_xml_generator_ != listener) {
- // It is an error to pass this method a listener that is already in the
- // list.
- delete Release(default_xml_generator_);
- default_xml_generator_ = listener;
- if (listener != NULL)
- Append(listener);
- }
-}
-
-// Controls whether events will be forwarded by the repeater to the
-// listeners in the list.
-bool TestEventListeners::EventForwardingEnabled() const {
- return repeater_->forwarding_enabled();
-}
-
-void TestEventListeners::SuppressEventForwarding() {
- repeater_->set_forwarding_enabled(false);
-}
-
-// class UnitTest
-
-// Gets the singleton UnitTest object. The first time this method is
-// called, a UnitTest object is constructed and returned. Consecutive
-// calls will return the same object.
-//
-// We don't protect this under mutex_ as a user is not supposed to
-// call this before main() starts, from which point on the return
-// value will never change.
-UnitTest * UnitTest::GetInstance() {
- // When compiled with MSVC 7.1 in optimized mode, destroying the
- // UnitTest object upon exiting the program messes up the exit code,
- // causing successful tests to appear failed. We have to use a
- // different implementation in this case to bypass the compiler bug.
- // This implementation makes the compiler happy, at the cost of
- // leaking the UnitTest object.
-
- // CodeGear C++Builder insists on a public destructor for the
- // default implementation. Use this implementation to keep good OO
- // design with private destructor.
-
-#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
- static UnitTest* const instance = new UnitTest;
- return instance;
-#else
- static UnitTest instance;
- return &instance;
-#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
-}
-
-// Gets the number of successful test cases.
-int UnitTest::successful_test_case_count() const {
- return impl()->successful_test_case_count();
-}
-
-// Gets the number of failed test cases.
-int UnitTest::failed_test_case_count() const {
- return impl()->failed_test_case_count();
-}
-
-// Gets the number of all test cases.
-int UnitTest::total_test_case_count() const {
- return impl()->total_test_case_count();
-}
-
-// Gets the number of all test cases that contain at least one test
-// that should run.
-int UnitTest::test_case_to_run_count() const {
- return impl()->test_case_to_run_count();
-}
-
-// Gets the number of successful tests.
-int UnitTest::successful_test_count() const {
- return impl()->successful_test_count();
-}
-
-// Gets the number of failed tests.
-int UnitTest::failed_test_count() const { return impl()->failed_test_count(); }
-
-// Gets the number of disabled tests.
-int UnitTest::disabled_test_count() const {
- return impl()->disabled_test_count();
-}
-
-// Gets the number of all tests.
-int UnitTest::total_test_count() const { return impl()->total_test_count(); }
-
-// Gets the number of tests that should run.
-int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }
-
-// Gets the elapsed time, in milliseconds.
-internal::TimeInMillis UnitTest::elapsed_time() const {
- return impl()->elapsed_time();
-}
-
-// Returns true iff the unit test passed (i.e. all test cases passed).
-bool UnitTest::Passed() const { return impl()->Passed(); }
-
-// Returns true iff the unit test failed (i.e. some test case failed
-// or something outside of all tests failed).
-bool UnitTest::Failed() const { return impl()->Failed(); }
-
-// Gets the i-th test case among all the test cases. i can range from 0 to
-// total_test_case_count() - 1. If i is not in that range, returns NULL.
-const TestCase* UnitTest::GetTestCase(int i) const {
- return impl()->GetTestCase(i);
-}
-
-// Gets the i-th test case among all the test cases. i can range from 0 to
-// total_test_case_count() - 1. If i is not in that range, returns NULL.
-TestCase* UnitTest::GetMutableTestCase(int i) {
- return impl()->GetMutableTestCase(i);
-}
-
-// Returns the list of event listeners that can be used to track events
-// inside Google Test.
-TestEventListeners& UnitTest::listeners() {
- return *impl()->listeners();
-}
-
-// Registers and returns a global test environment. When a test
-// program is run, all global test environments will be set-up in the
-// order they were registered. After all tests in the program have
-// finished, all global test environments will be torn-down in the
-// *reverse* order they were registered.
-//
-// The UnitTest object takes ownership of the given environment.
-//
-// We don't protect this under mutex_, as we only support calling it
-// from the main thread.
-Environment* UnitTest::AddEnvironment(Environment* env) {
- if (env == NULL) {
- return NULL;
- }
-
- impl_->environments().push_back(env);
- return env;
-}
-
-// Adds a TestPartResult to the current TestResult object. All Google Test
-// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call
-// this to report their results. The user code should use the
-// assertion macros instead of calling this directly.
-// L < mutex_
-void UnitTest::AddTestPartResult(TestPartResult::Type result_type,
- const char* file_name,
- int line_number,
- const internal::String& message,
- const internal::String& os_stack_trace) {
- Message msg;
- msg << message;
-
- internal::MutexLock lock(&mutex_);
- if (impl_->gtest_trace_stack().size() > 0) {
- msg << "\n" << GTEST_NAME_ << " trace:";
-
- for (int i = static_cast<int>(impl_->gtest_trace_stack().size());
- i > 0; --i) {
- const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1];
- msg << "\n" << internal::FormatFileLocation(trace.file, trace.line)
- << " " << trace.message;
- }
- }
-
- if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) {
- msg << internal::kStackTraceMarker << os_stack_trace;
- }
-
- const TestPartResult result =
- TestPartResult(result_type, file_name, line_number,
- msg.GetString().c_str());
- impl_->GetTestPartResultReporterForCurrentThread()->
- ReportTestPartResult(result);
-
- if (result_type != TestPartResult::kSuccess) {
- // gtest_break_on_failure takes precedence over
- // gtest_throw_on_failure. This allows a user to set the latter
- // in the code (perhaps in order to use Google Test assertions
- // with another testing framework) and specify the former on the
- // command line for debugging.
- if (GTEST_FLAG(break_on_failure)) {
-#if GTEST_OS_WINDOWS
- // Using DebugBreak on Windows allows gtest to still break into a debugger
- // when a failure happens and both the --gtest_break_on_failure and
- // the --gtest_catch_exceptions flags are specified.
- DebugBreak();
-#else
- // Dereference NULL through a volatile pointer to prevent the compiler
- // from removing. We use this rather than abort() or __builtin_trap() for
- // portability: Symbian doesn't implement abort() well, and some debuggers
- // don't correctly trap abort().
- *static_cast<volatile int*>(NULL) = 1;
-#endif // GTEST_OS_WINDOWS
- } else if (GTEST_FLAG(throw_on_failure)) {
-#if GTEST_HAS_EXCEPTIONS
- throw GoogleTestFailureException(result);
-#else
- // We cannot call abort() as it generates a pop-up in debug mode
- // that cannot be suppressed in VC 7.1 or below.
- exit(1);
-#endif
- }
- }
-}
-
-// Creates and adds a property to the current TestResult. If a property matching
-// the supplied value already exists, updates its value instead.
-void UnitTest::RecordPropertyForCurrentTest(const char* key,
- const char* value) {
- const TestProperty test_property(key, value);
- impl_->current_test_result()->RecordProperty(test_property);
-}
-
-// Runs all tests in this UnitTest object and prints the result.
-// Returns 0 if successful, or 1 otherwise.
-//
-// We don't protect this under mutex_, as we only support calling it
-// from the main thread.
-int UnitTest::Run() {
- // Captures the value of GTEST_FLAG(catch_exceptions). This value will be
- // used for the duration of the program.
- impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));
-
-#if GTEST_HAS_SEH
- const bool in_death_test_child_process =
- internal::GTEST_FLAG(internal_run_death_test).length() > 0;
-
- // Either the user wants Google Test to catch exceptions thrown by the
- // tests or this is executing in the context of death test child
- // process. In either case the user does not want to see pop-up dialogs
- // about crashes - they are expected.
- if (impl()->catch_exceptions() || in_death_test_child_process) {
-
-# if !GTEST_OS_WINDOWS_MOBILE
- // SetErrorMode doesn't exist on CE.
- SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
- SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
-# endif // !GTEST_OS_WINDOWS_MOBILE
-
-# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE
- // Death test children can be terminated with _abort(). On Windows,
- // _abort() can show a dialog with a warning message. This forces the
- // abort message to go to stderr instead.
- _set_error_mode(_OUT_TO_STDERR);
-# endif
-
-# if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
- // In the debug version, Visual Studio pops up a separate dialog
- // offering a choice to debug the aborted program. We need to suppress
- // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
- // executed. Google Test will notify the user of any unexpected
- // failure via stderr.
- //
- // VC++ doesn't define _set_abort_behavior() prior to the version 8.0.
- // Users of prior VC versions shall suffer the agony and pain of
- // clicking through the countless debug dialogs.
- // TODO(vladl@google.com): find a way to suppress the abort dialog() in the
- // debug mode when compiled with VC 7.1 or lower.
- if (!GTEST_FLAG(break_on_failure))
- _set_abort_behavior(
- 0x0, // Clear the following flags:
- _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump.
-# endif
-
- }
-#endif // GTEST_HAS_SEH
-
- return internal::HandleExceptionsInMethodIfSupported(
- impl(),
- &internal::UnitTestImpl::RunAllTests,
- "auxiliary test code (environments or event listeners)") ? 0 : 1;
-}
-
-// Returns the working directory when the first TEST() or TEST_F() was
-// executed.
-const char* UnitTest::original_working_dir() const {
- return impl_->original_working_dir_.c_str();
-}
-
-// Returns the TestCase object for the test that's currently running,
-// or NULL if no test is running.
-// L < mutex_
-const TestCase* UnitTest::current_test_case() const {
- internal::MutexLock lock(&mutex_);
- return impl_->current_test_case();
-}
-
-// Returns the TestInfo object for the test that's currently running,
-// or NULL if no test is running.
-// L < mutex_
-const TestInfo* UnitTest::current_test_info() const {
- internal::MutexLock lock(&mutex_);
- return impl_->current_test_info();
-}
-
-// Returns the random seed used at the start of the current test run.
-int UnitTest::random_seed() const { return impl_->random_seed(); }
-
-#if GTEST_HAS_PARAM_TEST
-// Returns ParameterizedTestCaseRegistry object used to keep track of
-// value-parameterized tests and instantiate and register them.
-// L < mutex_
-internal::ParameterizedTestCaseRegistry&
- UnitTest::parameterized_test_registry() {
- return impl_->parameterized_test_registry();
-}
-#endif // GTEST_HAS_PARAM_TEST
-
-// Creates an empty UnitTest.
-UnitTest::UnitTest() {
- impl_ = new internal::UnitTestImpl(this);
-}
-
-// Destructor of UnitTest.
-UnitTest::~UnitTest() {
- delete impl_;
-}
-
-// Pushes a trace defined by SCOPED_TRACE() on to the per-thread
-// Google Test trace stack.
-// L < mutex_
-void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) {
- internal::MutexLock lock(&mutex_);
- impl_->gtest_trace_stack().push_back(trace);
-}
-
-// Pops a trace from the per-thread Google Test trace stack.
-// L < mutex_
-void UnitTest::PopGTestTrace() {
- internal::MutexLock lock(&mutex_);
- impl_->gtest_trace_stack().pop_back();
-}
-
-namespace internal {
-
-UnitTestImpl::UnitTestImpl(UnitTest* parent)
- : parent_(parent),
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4355) // Temporarily disables warning 4355
- // (using this in initializer).
- default_global_test_part_result_reporter_(this),
- default_per_thread_test_part_result_reporter_(this),
-# pragma warning(pop) // Restores the warning state again.
-#else
- default_global_test_part_result_reporter_(this),
- default_per_thread_test_part_result_reporter_(this),
-#endif // _MSC_VER
- global_test_part_result_repoter_(
- &default_global_test_part_result_reporter_),
- per_thread_test_part_result_reporter_(
- &default_per_thread_test_part_result_reporter_),
-#if GTEST_HAS_PARAM_TEST
- parameterized_test_registry_(),
- parameterized_tests_registered_(false),
-#endif // GTEST_HAS_PARAM_TEST
- last_death_test_case_(-1),
- current_test_case_(NULL),
- current_test_info_(NULL),
- ad_hoc_test_result_(),
- os_stack_trace_getter_(NULL),
- post_flag_parse_init_performed_(false),
- random_seed_(0), // Will be overridden by the flag before first use.
- random_(0), // Will be reseeded before first use.
- elapsed_time_(0),
-#if GTEST_HAS_DEATH_TEST
- internal_run_death_test_flag_(NULL),
- death_test_factory_(new DefaultDeathTestFactory),
-#endif
- // Will be overridden by the flag before first use.
- catch_exceptions_(false) {
- listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);
-}
-
-UnitTestImpl::~UnitTestImpl() {
- // Deletes every TestCase.
- ForEach(test_cases_, internal::Delete<TestCase>);
-
- // Deletes every Environment.
- ForEach(environments_, internal::Delete<Environment>);
-
- delete os_stack_trace_getter_;
-}
-
-#if GTEST_HAS_DEATH_TEST
-// Disables event forwarding if the control is currently in a death test
-// subprocess. Must not be called before InitGoogleTest.
-void UnitTestImpl::SuppressTestEventsIfInSubprocess() {
- if (internal_run_death_test_flag_.get() != NULL)
- listeners()->SuppressEventForwarding();
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// Initializes event listeners performing XML output as specified by
-// UnitTestOptions. Must not be called before InitGoogleTest.
-void UnitTestImpl::ConfigureXmlOutput() {
- const String& output_format = UnitTestOptions::GetOutputFormat();
- if (output_format == "xml") {
- listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
- } else if (output_format != "") {
- printf("WARNING: unrecognized output format \"%s\" ignored.\n",
- output_format.c_str());
- fflush(stdout);
- }
-}
-
-#if GTEST_CAN_STREAM_RESULTS_
-// Initializes event listeners for streaming test results in String form.
-// Must not be called before InitGoogleTest.
-void UnitTestImpl::ConfigureStreamingOutput() {
- const string& target = GTEST_FLAG(stream_result_to);
- if (!target.empty()) {
- const size_t pos = target.find(':');
- if (pos != string::npos) {
- listeners()->Append(new StreamingListener(target.substr(0, pos),
- target.substr(pos+1)));
- } else {
- printf("WARNING: unrecognized streaming target \"%s\" ignored.\n",
- target.c_str());
- fflush(stdout);
- }
- }
-}
-#endif // GTEST_CAN_STREAM_RESULTS_
-
-// Performs initialization dependent upon flag values obtained in
-// ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to
-// ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest
-// this function is also called from RunAllTests. Since this function can be
-// called more than once, it has to be idempotent.
-void UnitTestImpl::PostFlagParsingInit() {
- // Ensures that this function does not execute more than once.
- if (!post_flag_parse_init_performed_) {
- post_flag_parse_init_performed_ = true;
-
-#if GTEST_HAS_DEATH_TEST
- InitDeathTestSubprocessControlInfo();
- SuppressTestEventsIfInSubprocess();
-#endif // GTEST_HAS_DEATH_TEST
-
- // Registers parameterized tests. This makes parameterized tests
- // available to the UnitTest reflection API without running
- // RUN_ALL_TESTS.
- RegisterParameterizedTests();
-
- // Configures listeners for XML output. This makes it possible for users
- // to shut down the default XML output before invoking RUN_ALL_TESTS.
- ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
- // Configures listeners for streaming test results to the specified server.
- ConfigureStreamingOutput();
-#endif // GTEST_CAN_STREAM_RESULTS_
- }
-}
-
-// A predicate that checks the name of a TestCase against a known
-// value.
-//
-// This is used for implementation of the UnitTest class only. We put
-// it in the anonymous namespace to prevent polluting the outer
-// namespace.
-//
-// TestCaseNameIs is copyable.
-class TestCaseNameIs {
- public:
- // Constructor.
- explicit TestCaseNameIs(const String& name)
- : name_(name) {}
-
- // Returns true iff the name of test_case matches name_.
- bool operator()(const TestCase* test_case) const {
- return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;
- }
-
- private:
- String name_;
-};
-
-// Finds and returns a TestCase with the given name. If one doesn't
-// exist, creates one and returns it. It's the CALLER'S
-// RESPONSIBILITY to ensure that this function is only called WHEN THE
-// TESTS ARE NOT SHUFFLED.
-//
-// Arguments:
-//
-// test_case_name: name of the test case
-// type_param: the name of the test case's type parameter, or NULL if
-// this is not a typed or a type-parameterized test case.
-// set_up_tc: pointer to the function that sets up the test case
-// tear_down_tc: pointer to the function that tears down the test case
-TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
- const char* type_param,
- Test::SetUpTestCaseFunc set_up_tc,
- Test::TearDownTestCaseFunc tear_down_tc) {
- // Can we find a TestCase with the given name?
- const std::vector<TestCase*>::const_iterator test_case =
- std::find_if(test_cases_.begin(), test_cases_.end(),
- TestCaseNameIs(test_case_name));
-
- if (test_case != test_cases_.end())
- return *test_case;
-
- // No. Let's create one.
- TestCase* const new_test_case =
- new TestCase(test_case_name, type_param, set_up_tc, tear_down_tc);
-
- // Is this a death test case?
- if (internal::UnitTestOptions::MatchesFilter(String(test_case_name),
- kDeathTestCaseFilter)) {
- // Yes. Inserts the test case after the last death test case
- // defined so far. This only works when the test cases haven't
- // been shuffled. Otherwise we may end up running a death test
- // after a non-death test.
- ++last_death_test_case_;
- test_cases_.insert(test_cases_.begin() + last_death_test_case_,
- new_test_case);
- } else {
- // No. Appends to the end of the list.
- test_cases_.push_back(new_test_case);
- }
-
- test_case_indices_.push_back(static_cast<int>(test_case_indices_.size()));
- return new_test_case;
-}
-
-// Helpers for setting up / tearing down the given environment. They
-// are for use in the ForEach() function.
-static void SetUpEnvironment(Environment* env) { env->SetUp(); }
-static void TearDownEnvironment(Environment* env) { env->TearDown(); }
-
-// Runs all tests in this UnitTest object, prints the result, and
-// returns true if all tests are successful. If any exception is
-// thrown during a test, the test is considered to be failed, but the
-// rest of the tests will still be run.
-//
-// When parameterized tests are enabled, it expands and registers
-// parameterized tests first in RegisterParameterizedTests().
-// All other functions called from RunAllTests() may safely assume that
-// parameterized tests are ready to be counted and run.
-bool UnitTestImpl::RunAllTests() {
- // Makes sure InitGoogleTest() was called.
- if (!GTestIsInitialized()) {
- printf("%s",
- "\nThis test program did NOT call ::testing::InitGoogleTest "
- "before calling RUN_ALL_TESTS(). Please fix it.\n");
- return false;
- }
-
- // Do not run any test if the --help flag was specified.
- if (g_help_flag)
- return true;
-
- // Repeats the call to the post-flag parsing initialization in case the
- // user didn't call InitGoogleTest.
- PostFlagParsingInit();
-
- // Even if sharding is not on, test runners may want to use the
- // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
- // protocol.
- internal::WriteToShardStatusFileIfNeeded();
-
- // True iff we are in a subprocess for running a thread-safe-style
- // death test.
- bool in_subprocess_for_death_test = false;
-
-#if GTEST_HAS_DEATH_TEST
- in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL);
-#endif // GTEST_HAS_DEATH_TEST
-
- const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,
- in_subprocess_for_death_test);
-
- // Compares the full test names with the filter to decide which
- // tests to run.
- const bool has_tests_to_run = FilterTests(should_shard
- ? HONOR_SHARDING_PROTOCOL
- : IGNORE_SHARDING_PROTOCOL) > 0;
-
- // Lists the tests and exits if the --gtest_list_tests flag was specified.
- if (GTEST_FLAG(list_tests)) {
- // This must be called *after* FilterTests() has been called.
- ListTestsMatchingFilter();
- return true;
- }
-
- random_seed_ = GTEST_FLAG(shuffle) ?
- GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0;
-
- // True iff at least one test has failed.
- bool failed = false;
-
- TestEventListener* repeater = listeners()->repeater();
-
- repeater->OnTestProgramStart(*parent_);
-
- // How many times to repeat the tests? We don't want to repeat them
- // when we are inside the subprocess of a death test.
- const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat);
- // Repeats forever if the repeat count is negative.
- const bool forever = repeat < 0;
- for (int i = 0; forever || i != repeat; i++) {
- // We want to preserve failures generated by ad-hoc test
- // assertions executed before RUN_ALL_TESTS().
- ClearNonAdHocTestResult();
-
- const TimeInMillis start = GetTimeInMillis();
-
- // Shuffles test cases and tests if requested.
- if (has_tests_to_run && GTEST_FLAG(shuffle)) {
- random()->Reseed(random_seed_);
- // This should be done before calling OnTestIterationStart(),
- // such that a test event listener can see the actual test order
- // in the event.
- ShuffleTests();
- }
-
- // Tells the unit test event listeners that the tests are about to start.
- repeater->OnTestIterationStart(*parent_, i);
-
- // Runs each test case if there is at least one test to run.
- if (has_tests_to_run) {
- // Sets up all environments beforehand.
- repeater->OnEnvironmentsSetUpStart(*parent_);
- ForEach(environments_, SetUpEnvironment);
- repeater->OnEnvironmentsSetUpEnd(*parent_);
-
- // Runs the tests only if there was no fatal failure during global
- // set-up.
- if (!Test::HasFatalFailure()) {
- for (int test_index = 0; test_index < total_test_case_count();
- test_index++) {
- GetMutableTestCase(test_index)->Run();
- }
- }
-
- // Tears down all environments in reverse order afterwards.
- repeater->OnEnvironmentsTearDownStart(*parent_);
- std::for_each(environments_.rbegin(), environments_.rend(),
- TearDownEnvironment);
- repeater->OnEnvironmentsTearDownEnd(*parent_);
- }
-
- elapsed_time_ = GetTimeInMillis() - start;
-
- // Tells the unit test event listener that the tests have just finished.
- repeater->OnTestIterationEnd(*parent_, i);
-
- // Gets the result and clears it.
- if (!Passed()) {
- failed = true;
- }
-
- // Restores the original test order after the iteration. This
- // allows the user to quickly repro a failure that happens in the
- // N-th iteration without repeating the first (N - 1) iterations.
- // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in
- // case the user somehow changes the value of the flag somewhere
- // (it's always safe to unshuffle the tests).
- UnshuffleTests();
-
- if (GTEST_FLAG(shuffle)) {
- // Picks a new random seed for each iteration.
- random_seed_ = GetNextRandomSeed(random_seed_);
- }
- }
-
- repeater->OnTestProgramEnd(*parent_);
-
- return !failed;
-}
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded() {
- const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);
- if (test_shard_file != NULL) {
- FILE* const file = posix::FOpen(test_shard_file, "w");
- if (file == NULL) {
- ColoredPrintf(COLOR_RED,
- "Could not write to the test shard status file \"%s\" "
- "specified by the %s environment variable.\n",
- test_shard_file, kTestShardStatusFile);
- fflush(stdout);
- exit(EXIT_FAILURE);
- }
- fclose(file);
- }
-}
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (i.e., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-bool ShouldShard(const char* total_shards_env,
- const char* shard_index_env,
- bool in_subprocess_for_death_test) {
- if (in_subprocess_for_death_test) {
- return false;
- }
-
- const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1);
- const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1);
-
- if (total_shards == -1 && shard_index == -1) {
- return false;
- } else if (total_shards == -1 && shard_index != -1) {
- const Message msg = Message()
- << "Invalid environment variables: you have "
- << kTestShardIndex << " = " << shard_index
- << ", but have left " << kTestTotalShards << " unset.\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- } else if (total_shards != -1 && shard_index == -1) {
- const Message msg = Message()
- << "Invalid environment variables: you have "
- << kTestTotalShards << " = " << total_shards
- << ", but have left " << kTestShardIndex << " unset.\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- } else if (shard_index < 0 || shard_index >= total_shards) {
- const Message msg = Message()
- << "Invalid environment variables: we require 0 <= "
- << kTestShardIndex << " < " << kTestTotalShards
- << ", but you have " << kTestShardIndex << "=" << shard_index
- << ", " << kTestTotalShards << "=" << total_shards << ".\n";
- ColoredPrintf(COLOR_RED, msg.GetString().c_str());
- fflush(stdout);
- exit(EXIT_FAILURE);
- }
-
- return total_shards > 1;
-}
-
-// Parses the environment variable var as an Int32. If it is unset,
-// returns default_val. If it is not an Int32, prints an error
-// and aborts.
-Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
- const char* str_val = posix::GetEnv(var);
- if (str_val == NULL) {
- return default_val;
- }
-
- Int32 result;
- if (!ParseInt32(Message() << "The value of environment variable " << var,
- str_val, &result)) {
- exit(EXIT_FAILURE);
- }
- return result;
-}
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true iff the test should be run on this shard. The test id is
-// some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
- return (test_id % total_shards) == shard_index;
-}
-
-// Compares the name of each test with the user-specified filter to
-// decide whether the test should be run, then records the result in
-// each TestCase and TestInfo object.
-// If shard_tests == true, further filters tests based on sharding
-// variables in the environment - see
-// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide.
-// Returns the number of tests that should run.
-int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
- const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?
- Int32FromEnvOrDie(kTestTotalShards, -1) : -1;
- const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ?
- Int32FromEnvOrDie(kTestShardIndex, -1) : -1;
-
- // num_runnable_tests are the number of tests that will
- // run across all shards (i.e., match filter and are not disabled).
- // num_selected_tests are the number of tests to be run on
- // this shard.
- int num_runnable_tests = 0;
- int num_selected_tests = 0;
- for (size_t i = 0; i < test_cases_.size(); i++) {
- TestCase* const test_case = test_cases_[i];
- const String &test_case_name = test_case->name();
- test_case->set_should_run(false);
-
- for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
- TestInfo* const test_info = test_case->test_info_list()[j];
- const String test_name(test_info->name());
- // A test is disabled if test case name or test name matches
- // kDisableTestFilter.
- const bool is_disabled =
- internal::UnitTestOptions::MatchesFilter(test_case_name,
- kDisableTestFilter) ||
- internal::UnitTestOptions::MatchesFilter(test_name,
- kDisableTestFilter);
- test_info->is_disabled_ = is_disabled;
-
- const bool matches_filter =
- internal::UnitTestOptions::FilterMatchesTest(test_case_name,
- test_name);
- test_info->matches_filter_ = matches_filter;
-
- const bool is_runnable =
- (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) &&
- matches_filter;
-
- const bool is_selected = is_runnable &&
- (shard_tests == IGNORE_SHARDING_PROTOCOL ||
- ShouldRunTestOnShard(total_shards, shard_index,
- num_runnable_tests));
-
- num_runnable_tests += is_runnable;
- num_selected_tests += is_selected;
-
- test_info->should_run_ = is_selected;
- test_case->set_should_run(test_case->should_run() || is_selected);
- }
- }
- return num_selected_tests;
-}
-
-// Prints the names of the tests matching the user-specified filter flag.
-void UnitTestImpl::ListTestsMatchingFilter() {
- for (size_t i = 0; i < test_cases_.size(); i++) {
- const TestCase* const test_case = test_cases_[i];
- bool printed_test_case_name = false;
-
- for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
- const TestInfo* const test_info =
- test_case->test_info_list()[j];
- if (test_info->matches_filter_) {
- if (!printed_test_case_name) {
- printed_test_case_name = true;
- printf("%s.\n", test_case->name());
- }
- printf(" %s\n", test_info->name());
- }
- }
- }
- fflush(stdout);
-}
-
-// Sets the OS stack trace getter.
-//
-// Does nothing if the input and the current OS stack trace getter are
-// the same; otherwise, deletes the old getter and makes the input the
-// current getter.
-void UnitTestImpl::set_os_stack_trace_getter(
- OsStackTraceGetterInterface* getter) {
- if (os_stack_trace_getter_ != getter) {
- delete os_stack_trace_getter_;
- os_stack_trace_getter_ = getter;
- }
-}
-
-// Returns the current OS stack trace getter if it is not NULL;
-// otherwise, creates an OsStackTraceGetter, makes it the current
-// getter, and returns it.
-OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
- if (os_stack_trace_getter_ == NULL) {
- os_stack_trace_getter_ = new OsStackTraceGetter;
- }
-
- return os_stack_trace_getter_;
-}
-
-// Returns the TestResult for the test that's currently running, or
-// the TestResult for the ad hoc test if no test is running.
-TestResult* UnitTestImpl::current_test_result() {
- return current_test_info_ ?
- &(current_test_info_->result_) : &ad_hoc_test_result_;
-}
-
-// Shuffles all test cases, and the tests within each test case,
-// making sure that death tests are still run first.
-void UnitTestImpl::ShuffleTests() {
- // Shuffles the death test cases.
- ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_);
-
- // Shuffles the non-death test cases.
- ShuffleRange(random(), last_death_test_case_ + 1,
- static_cast<int>(test_cases_.size()), &test_case_indices_);
-
- // Shuffles the tests inside each test case.
- for (size_t i = 0; i < test_cases_.size(); i++) {
- test_cases_[i]->ShuffleTests(random());
- }
-}
-
-// Restores the test cases and tests to their order before the first shuffle.
-void UnitTestImpl::UnshuffleTests() {
- for (size_t i = 0; i < test_cases_.size(); i++) {
- // Unshuffles the tests in each test case.
- test_cases_[i]->UnshuffleTests();
- // Resets the index of each test case.
- test_case_indices_[i] = static_cast<int>(i);
- }
-}
-
-// Returns the current OS stack trace as a String.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag. The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
- int skip_count) {
- // We pass skip_count + 1 to skip this wrapper function in addition
- // to what the user really wants to skip.
- return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
-}
-
-// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to
-// suppress unreachable code warnings.
-namespace {
-class ClassUniqueToAlwaysTrue {};
-}
-
-bool IsTrue(bool condition) { return condition; }
-
-bool AlwaysTrue() {
-#if GTEST_HAS_EXCEPTIONS
- // This condition is always false so AlwaysTrue() never actually throws,
- // but it makes the compiler think that it may throw.
- if (IsTrue(false))
- throw ClassUniqueToAlwaysTrue();
-#endif // GTEST_HAS_EXCEPTIONS
- return true;
-}
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false. None of pstr, *pstr, and prefix can be NULL.
-bool SkipPrefix(const char* prefix, const char** pstr) {
- const size_t prefix_len = strlen(prefix);
- if (strncmp(*pstr, prefix, prefix_len) == 0) {
- *pstr += prefix_len;
- return true;
- }
- return false;
-}
-
-// Parses a string as a command line flag. The string should have
-// the format "--flag=value". When def_optional is true, the "=value"
-// part can be omitted.
-//
-// Returns the value of the flag, or NULL if the parsing failed.
-const char* ParseFlagValue(const char* str,
- const char* flag,
- bool def_optional) {
- // str and flag must not be NULL.
- if (str == NULL || flag == NULL) return NULL;
-
- // The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
- const String flag_str = String::Format("--%s%s", GTEST_FLAG_PREFIX_, flag);
- const size_t flag_len = flag_str.length();
- if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;
-
- // Skips the flag name.
- const char* flag_end = str + flag_len;
-
- // When def_optional is true, it's OK to not have a "=value" part.
- if (def_optional && (flag_end[0] == '\0')) {
- return flag_end;
- }
-
- // If def_optional is true and there are more characters after the
- // flag name, or if def_optional is false, there must be a '=' after
- // the flag name.
- if (flag_end[0] != '=') return NULL;
-
- // Returns the string after "=".
- return flag_end + 1;
-}
-
-// Parses a string for a bool flag, in the form of either
-// "--flag=value" or "--flag".
-//
-// In the former case, the value is taken as true as long as it does
-// not start with '0', 'f', or 'F'.
-//
-// In the latter case, the value is taken as true.
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, true);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Converts the string value to a bool.
- *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
- return true;
-}
-
-// Parses a string for an Int32 flag, in the form of
-// "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- return ParseInt32(Message() << "The value of flag --" << flag,
- value_str, value);
-}
-
-// Parses a string for a string flag, in the form of
-// "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-bool ParseStringFlag(const char* str, const char* flag, String* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- *value = value_str;
- return true;
-}
-
-// Determines whether a string has a prefix that Google Test uses for its
-// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.
-// If Google Test detects that a command line flag has its prefix but is not
-// recognized, it will print its help message. Flags starting with
-// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test
-// internal flags and do not trigger the help message.
-static bool HasGoogleTestFlagPrefix(const char* str) {
- return (SkipPrefix("--", &str) ||
- SkipPrefix("-", &str) ||
- SkipPrefix("/", &str)) &&
- !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) &&
- (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||
- SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));
-}
-
-// Prints a string containing code-encoded text. The following escape
-// sequences can be used in the string to control the text color:
-//
-// @@ prints a single '@' character.
-// @R changes the color to red.
-// @G changes the color to green.
-// @Y changes the color to yellow.
-// @D changes to the default terminal text color.
-//
-// TODO(wan@google.com): Write tests for this once we add stdout
-// capturing to Google Test.
-static void PrintColorEncoded(const char* str) {
- GTestColor color = COLOR_DEFAULT; // The current color.
-
- // Conceptually, we split the string into segments divided by escape
- // sequences. Then we print one segment at a time. At the end of
- // each iteration, the str pointer advances to the beginning of the
- // next segment.
- for (;;) {
- const char* p = strchr(str, '@');
- if (p == NULL) {
- ColoredPrintf(color, "%s", str);
- return;
- }
-
- ColoredPrintf(color, "%s", String(str, p - str).c_str());
-
- const char ch = p[1];
- str = p + 2;
- if (ch == '@') {
- ColoredPrintf(color, "@");
- } else if (ch == 'D') {
- color = COLOR_DEFAULT;
- } else if (ch == 'R') {
- color = COLOR_RED;
- } else if (ch == 'G') {
- color = COLOR_GREEN;
- } else if (ch == 'Y') {
- color = COLOR_YELLOW;
- } else {
- --str;
- }
- }
-}
-
-static const char kColorEncodedHelpMessage[] =
-"This program contains tests written using " GTEST_NAME_ ". You can use the\n"
-"following command line flags to control its behavior:\n"
-"\n"
-"Test Selection:\n"
-" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n"
-" List the names of all tests instead of running them. The name of\n"
-" TEST(Foo, Bar) is \"Foo.Bar\".\n"
-" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS"
- "[@G-@YNEGATIVE_PATTERNS]@D\n"
-" Run only the tests whose name matches one of the positive patterns but\n"
-" none of the negative patterns. '?' matches any single character; '*'\n"
-" matches any substring; ':' separates two patterns.\n"
-" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n"
-" Run all disabled tests too.\n"
-"\n"
-"Test Execution:\n"
-" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n"
-" Run the tests repeatedly; use a negative count to repeat forever.\n"
-" @G--" GTEST_FLAG_PREFIX_ "shuffle@D\n"
-" Randomize tests' orders on every iteration.\n"
-" @G--" GTEST_FLAG_PREFIX_ "random_seed=@Y[NUMBER]@D\n"
-" Random number seed to use for shuffling test orders (between 1 and\n"
-" 99999, or 0 to use a seed based on the current time).\n"
-"\n"
-"Test Output:\n"
-" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n"
-" Enable/disable colored output. The default is @Gauto@D.\n"
-" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n"
-" Don't print the elapsed time of each test.\n"
-" @G--" GTEST_FLAG_PREFIX_ "output=xml@Y[@G:@YDIRECTORY_PATH@G"
- GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n"
-" Generate an XML report in the given directory or with the given file\n"
-" name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\n"
-#if GTEST_CAN_STREAM_RESULTS_
-" @G--" GTEST_FLAG_PREFIX_ "stream_result_to=@YHOST@G:@YPORT@D\n"
-" Stream test results to the given server.\n"
-#endif // GTEST_CAN_STREAM_RESULTS_
-"\n"
-"Assertion Behavior:\n"
-#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS
-" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n"
-" Set the default death test style.\n"
-#endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS
-" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n"
-" Turn assertion failures into debugger break-points.\n"
-" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n"
-" Turn assertion failures into C++ exceptions.\n"
-" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions=0@D\n"
-" Do not report exceptions as test failures. Instead, allow them\n"
-" to crash the program or throw a pop-up (on Windows).\n"
-"\n"
-"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set "
- "the corresponding\n"
-"environment variable of a flag (all letters in upper-case). For example, to\n"
-"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_
- "color=no@D or set\n"
-"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n"
-"\n"
-"For more information, please read the " GTEST_NAME_ " documentation at\n"
-"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n"
-"(not one in your own code or tests), please report it to\n"
-"@G<" GTEST_DEV_EMAIL_ ">@D.\n";
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test. The type parameter CharType can be
-// instantiated to either char or wchar_t.
-template <typename CharType>
-void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
- for (int i = 1; i < *argc; i++) {
- const String arg_string = StreamableToString(argv[i]);
- const char* const arg = arg_string.c_str();
-
- using internal::ParseBoolFlag;
- using internal::ParseInt32Flag;
- using internal::ParseStringFlag;
-
- // Do we see a Google Test flag?
- if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag,
- &GTEST_FLAG(also_run_disabled_tests)) ||
- ParseBoolFlag(arg, kBreakOnFailureFlag,
- &GTEST_FLAG(break_on_failure)) ||
- ParseBoolFlag(arg, kCatchExceptionsFlag,
- &GTEST_FLAG(catch_exceptions)) ||
- ParseStringFlag(arg, kColorFlag, &GTEST_FLAG(color)) ||
- ParseStringFlag(arg, kDeathTestStyleFlag,
- &GTEST_FLAG(death_test_style)) ||
- ParseBoolFlag(arg, kDeathTestUseFork,
- &GTEST_FLAG(death_test_use_fork)) ||
- ParseStringFlag(arg, kFilterFlag, &GTEST_FLAG(filter)) ||
- ParseStringFlag(arg, kInternalRunDeathTestFlag,
- &GTEST_FLAG(internal_run_death_test)) ||
- ParseBoolFlag(arg, kListTestsFlag, &GTEST_FLAG(list_tests)) ||
- ParseStringFlag(arg, kOutputFlag, &GTEST_FLAG(output)) ||
- ParseBoolFlag(arg, kPrintTimeFlag, &GTEST_FLAG(print_time)) ||
- ParseInt32Flag(arg, kRandomSeedFlag, &GTEST_FLAG(random_seed)) ||
- ParseInt32Flag(arg, kRepeatFlag, &GTEST_FLAG(repeat)) ||
- ParseBoolFlag(arg, kShuffleFlag, &GTEST_FLAG(shuffle)) ||
- ParseInt32Flag(arg, kStackTraceDepthFlag,
- &GTEST_FLAG(stack_trace_depth)) ||
- ParseStringFlag(arg, kStreamResultToFlag,
- &GTEST_FLAG(stream_result_to)) ||
- ParseBoolFlag(arg, kThrowOnFailureFlag,
- &GTEST_FLAG(throw_on_failure))
- ) {
- // Yes. Shift the remainder of the argv list left by one. Note
- // that argv has (*argc + 1) elements, the last one always being
- // NULL. The following loop moves the trailing NULL element as
- // well.
- for (int j = i; j != *argc; j++) {
- argv[j] = argv[j + 1];
- }
-
- // Decrements the argument count.
- (*argc)--;
-
- // We also need to decrement the iterator as we just removed
- // an element.
- i--;
- } else if (arg_string == "--help" || arg_string == "-h" ||
- arg_string == "-?" || arg_string == "/?" ||
- HasGoogleTestFlagPrefix(arg)) {
- // Both help flag and unrecognized Google Test flags (excluding
- // internal ones) trigger help display.
- g_help_flag = true;
- }
- }
-
- if (g_help_flag) {
- // We print the help here instead of in RUN_ALL_TESTS(), as the
- // latter may not be called at all if the user is using Google
- // Test with another testing framework.
- PrintColorEncoded(kColorEncodedHelpMessage);
- }
-}
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
- ParseGoogleTestFlagsOnlyImpl(argc, argv);
-}
-void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
- ParseGoogleTestFlagsOnlyImpl(argc, argv);
-}
-
-// The internal implementation of InitGoogleTest().
-//
-// The type parameter CharType can be instantiated to either char or
-// wchar_t.
-template <typename CharType>
-void InitGoogleTestImpl(int* argc, CharType** argv) {
- g_init_gtest_count++;
-
- // We don't want to run the initialization code twice.
- if (g_init_gtest_count != 1) return;
-
- if (*argc <= 0) return;
-
- internal::g_executable_path = internal::StreamableToString(argv[0]);
-
-#if GTEST_HAS_DEATH_TEST
-
- g_argvs.clear();
- for (int i = 0; i != *argc; i++) {
- g_argvs.push_back(StreamableToString(argv[i]));
- }
-
-#endif // GTEST_HAS_DEATH_TEST
-
- ParseGoogleTestFlagsOnly(argc, argv);
- GetUnitTestImpl()->PostFlagParsingInit();
-}
-
-} // namespace internal
-
-// Initializes Google Test. This must be called before calling
-// RUN_ALL_TESTS(). In particular, it parses a command line for the
-// flags that Google Test recognizes. Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-void InitGoogleTest(int* argc, char** argv) {
- internal::InitGoogleTestImpl(argc, argv);
-}
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleTest(int* argc, wchar_t** argv) {
- internal::InitGoogleTestImpl(argc, argv);
-}
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest_main.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest_main.cc
deleted file mode 100644
index a09bbe0c6..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/src/gtest_main.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <iostream>
-
-#include "gtest/gtest.h"
-
-GTEST_API_ int main(int argc, char **argv) {
- std::cout << "Running main() from gtest_main.cc\n";
-
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_ex_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_ex_test.cc
deleted file mode 100644
index b50a13d5e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_ex_test.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2010, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-//
-// Tests that verify interaction of exceptions and death tests.
-
-#include "gtest/gtest-death-test.h"
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_DEATH_TEST
-
-# if GTEST_HAS_SEH
-# include <windows.h> // For RaiseException().
-# endif
-
-# include "gtest/gtest-spi.h"
-
-# if GTEST_HAS_EXCEPTIONS
-
-# include <exception> // For std::exception.
-
-// Tests that death tests report thrown exceptions as failures and that the
-// exceptions do not escape death test macros.
-TEST(CxxExceptionDeathTest, ExceptionIsFailure) {
- try {
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw 1, ""), "threw an exception");
- } catch (...) { // NOLINT
- FAIL() << "An exception escaped a death test macro invocation "
- << "with catch_exceptions "
- << (testing::GTEST_FLAG(catch_exceptions) ? "enabled" : "disabled");
- }
-}
-
-class TestException : public std::exception {
- public:
- virtual const char* what() const throw() { return "exceptional message"; }
-};
-
-TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
- // Verifies that the exception message is quoted in the failure text.
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
- "exceptional message");
- // Verifies that the location is mentioned in the failure text.
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
- "gtest-death-test_ex_test.cc");
-}
-# endif // GTEST_HAS_EXCEPTIONS
-
-# if GTEST_HAS_SEH
-// Tests that enabling interception of SEH exceptions with the
-// catch_exceptions flag does not interfere with SEH exceptions being
-// treated as death by death tests.
-TEST(SehExceptionDeasTest, CatchExceptionsDoesNotInterfere) {
- EXPECT_DEATH(RaiseException(42, 0x0, 0, NULL), "")
- << "with catch_exceptions "
- << (testing::GTEST_FLAG(catch_exceptions) ? "enabled" : "disabled");
-}
-# endif
-
-#endif // GTEST_HAS_DEATH_TEST
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- testing::GTEST_FLAG(catch_exceptions) = GTEST_ENABLE_CATCH_EXCEPTIONS_ != 0;
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_test.cc
deleted file mode 100644
index bcf8e2a34..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-death-test_test.cc
+++ /dev/null
@@ -1,1296 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Tests for death tests.
-
-#include "gtest/gtest-death-test.h"
-#include "gtest/gtest.h"
-#include "gtest/internal/gtest-filepath.h"
-
-using testing::internal::AlwaysFalse;
-using testing::internal::AlwaysTrue;
-
-#if GTEST_HAS_DEATH_TEST
-
-# if GTEST_OS_WINDOWS
-# include <direct.h> // For chdir().
-# else
-# include <unistd.h>
-# include <sys/wait.h> // For waitpid.
-# include <limits> // For std::numeric_limits.
-# endif // GTEST_OS_WINDOWS
-
-# include <limits.h>
-# include <signal.h>
-# include <stdio.h>
-
-# include "gtest/gtest-spi.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-# define GTEST_IMPLEMENTATION_ 1
-# include "src/gtest-internal-inl.h"
-# undef GTEST_IMPLEMENTATION_
-
-namespace posix = ::testing::internal::posix;
-
-using testing::Message;
-using testing::internal::DeathTest;
-using testing::internal::DeathTestFactory;
-using testing::internal::FilePath;
-using testing::internal::GetLastErrnoDescription;
-using testing::internal::GetUnitTestImpl;
-using testing::internal::ParseNaturalNumber;
-using testing::internal::String;
-
-namespace testing {
-namespace internal {
-
-// A helper class whose objects replace the death test factory for a
-// single UnitTest object during their lifetimes.
-class ReplaceDeathTestFactory {
- public:
- explicit ReplaceDeathTestFactory(DeathTestFactory* new_factory)
- : unit_test_impl_(GetUnitTestImpl()) {
- old_factory_ = unit_test_impl_->death_test_factory_.release();
- unit_test_impl_->death_test_factory_.reset(new_factory);
- }
-
- ~ReplaceDeathTestFactory() {
- unit_test_impl_->death_test_factory_.release();
- unit_test_impl_->death_test_factory_.reset(old_factory_);
- }
- private:
- // Prevents copying ReplaceDeathTestFactory objects.
- ReplaceDeathTestFactory(const ReplaceDeathTestFactory&);
- void operator=(const ReplaceDeathTestFactory&);
-
- UnitTestImpl* unit_test_impl_;
- DeathTestFactory* old_factory_;
-};
-
-} // namespace internal
-} // namespace testing
-
-void DieWithMessage(const ::std::string& message) {
- fprintf(stderr, "%s", message.c_str());
- fflush(stderr); // Make sure the text is printed before the process exits.
-
- // We call _exit() instead of exit(), as the former is a direct
- // system call and thus safer in the presence of threads. exit()
- // will invoke user-defined exit-hooks, which may do dangerous
- // things that conflict with death tests.
- //
- // Some compilers can recognize that _exit() never returns and issue the
- // 'unreachable code' warning for code following this function, unless
- // fooled by a fake condition.
- if (AlwaysTrue())
- _exit(1);
-}
-
-void DieInside(const ::std::string& function) {
- DieWithMessage("death inside " + function + "().");
-}
-
-// Tests that death tests work.
-
-class TestForDeathTest : public testing::Test {
- protected:
- TestForDeathTest() : original_dir_(FilePath::GetCurrentDir()) {}
-
- virtual ~TestForDeathTest() {
- posix::ChDir(original_dir_.c_str());
- }
-
- // A static member function that's expected to die.
- static void StaticMemberFunction() { DieInside("StaticMemberFunction"); }
-
- // A method of the test fixture that may die.
- void MemberFunction() {
- if (should_die_)
- DieInside("MemberFunction");
- }
-
- // True iff MemberFunction() should die.
- bool should_die_;
- const FilePath original_dir_;
-};
-
-// A class with a member function that may die.
-class MayDie {
- public:
- explicit MayDie(bool should_die) : should_die_(should_die) {}
-
- // A member function that may die.
- void MemberFunction() const {
- if (should_die_)
- DieInside("MayDie::MemberFunction");
- }
-
- private:
- // True iff MemberFunction() should die.
- bool should_die_;
-};
-
-// A global function that's expected to die.
-void GlobalFunction() { DieInside("GlobalFunction"); }
-
-// A non-void function that's expected to die.
-int NonVoidFunction() {
- DieInside("NonVoidFunction");
- return 1;
-}
-
-// A unary function that may die.
-void DieIf(bool should_die) {
- if (should_die)
- DieInside("DieIf");
-}
-
-// A binary function that may die.
-bool DieIfLessThan(int x, int y) {
- if (x < y) {
- DieInside("DieIfLessThan");
- }
- return true;
-}
-
-// Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture.
-void DeathTestSubroutine() {
- EXPECT_DEATH(GlobalFunction(), "death.*GlobalFunction");
- ASSERT_DEATH(GlobalFunction(), "death.*GlobalFunction");
-}
-
-// Death in dbg, not opt.
-int DieInDebugElse12(int* sideeffect) {
- if (sideeffect) *sideeffect = 12;
-
-# ifndef NDEBUG
-
- DieInside("DieInDebugElse12");
-
-# endif // NDEBUG
-
- return 12;
-}
-
-# if GTEST_OS_WINDOWS
-
-// Tests the ExitedWithCode predicate.
-TEST(ExitStatusPredicateTest, ExitedWithCode) {
- // On Windows, the process's exit code is the same as its exit status,
- // so the predicate just compares the its input with its parameter.
- EXPECT_TRUE(testing::ExitedWithCode(0)(0));
- EXPECT_TRUE(testing::ExitedWithCode(1)(1));
- EXPECT_TRUE(testing::ExitedWithCode(42)(42));
- EXPECT_FALSE(testing::ExitedWithCode(0)(1));
- EXPECT_FALSE(testing::ExitedWithCode(1)(0));
-}
-
-# else
-
-// Returns the exit status of a process that calls _exit(2) with a
-// given exit code. This is a helper function for the
-// ExitStatusPredicateTest test suite.
-static int NormalExitStatus(int exit_code) {
- pid_t child_pid = fork();
- if (child_pid == 0) {
- _exit(exit_code);
- }
- int status;
- waitpid(child_pid, &status, 0);
- return status;
-}
-
-// Returns the exit status of a process that raises a given signal.
-// If the signal does not cause the process to die, then it returns
-// instead the exit status of a process that exits normally with exit
-// code 1. This is a helper function for the ExitStatusPredicateTest
-// test suite.
-static int KilledExitStatus(int signum) {
- pid_t child_pid = fork();
- if (child_pid == 0) {
- raise(signum);
- _exit(1);
- }
- int status;
- waitpid(child_pid, &status, 0);
- return status;
-}
-
-// Tests the ExitedWithCode predicate.
-TEST(ExitStatusPredicateTest, ExitedWithCode) {
- const int status0 = NormalExitStatus(0);
- const int status1 = NormalExitStatus(1);
- const int status42 = NormalExitStatus(42);
- const testing::ExitedWithCode pred0(0);
- const testing::ExitedWithCode pred1(1);
- const testing::ExitedWithCode pred42(42);
- EXPECT_PRED1(pred0, status0);
- EXPECT_PRED1(pred1, status1);
- EXPECT_PRED1(pred42, status42);
- EXPECT_FALSE(pred0(status1));
- EXPECT_FALSE(pred42(status0));
- EXPECT_FALSE(pred1(status42));
-}
-
-// Tests the KilledBySignal predicate.
-TEST(ExitStatusPredicateTest, KilledBySignal) {
- const int status_segv = KilledExitStatus(SIGSEGV);
- const int status_kill = KilledExitStatus(SIGKILL);
- const testing::KilledBySignal pred_segv(SIGSEGV);
- const testing::KilledBySignal pred_kill(SIGKILL);
- EXPECT_PRED1(pred_segv, status_segv);
- EXPECT_PRED1(pred_kill, status_kill);
- EXPECT_FALSE(pred_segv(status_kill));
- EXPECT_FALSE(pred_kill(status_segv));
-}
-
-# endif // GTEST_OS_WINDOWS
-
-// Tests that the death test macros expand to code which may or may not
-// be followed by operator<<, and that in either case the complete text
-// comprises only a single C++ statement.
-TEST_F(TestForDeathTest, SingleStatement) {
- if (AlwaysFalse())
- // This would fail if executed; this is a compilation test only
- ASSERT_DEATH(return, "");
-
- if (AlwaysTrue())
- EXPECT_DEATH(_exit(1), "");
- else
- // This empty "else" branch is meant to ensure that EXPECT_DEATH
- // doesn't expand into an "if" statement without an "else"
- ;
-
- if (AlwaysFalse())
- ASSERT_DEATH(return, "") << "did not die";
-
- if (AlwaysFalse())
- ;
- else
- EXPECT_DEATH(_exit(1), "") << 1 << 2 << 3;
-}
-
-void DieWithEmbeddedNul() {
- fprintf(stderr, "Hello%cmy null world.\n", '\0');
- fflush(stderr);
- _exit(1);
-}
-
-# if GTEST_USES_PCRE
-// Tests that EXPECT_DEATH and ASSERT_DEATH work when the error
-// message has a NUL character in it.
-TEST_F(TestForDeathTest, EmbeddedNulInMessage) {
- // TODO(wan@google.com): <regex.h> doesn't support matching strings
- // with embedded NUL characters - find a way to workaround it.
- EXPECT_DEATH(DieWithEmbeddedNul(), "my null world");
- ASSERT_DEATH(DieWithEmbeddedNul(), "my null world");
-}
-# endif // GTEST_USES_PCRE
-
-// Tests that death test macros expand to code which interacts well with switch
-// statements.
-TEST_F(TestForDeathTest, SwitchStatement) {
-// Microsoft compiler usually complains about switch statements without
-// case labels. We suppress that warning for this test.
-# ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4065)
-# endif // _MSC_VER
-
- switch (0)
- default:
- ASSERT_DEATH(_exit(1), "") << "exit in default switch handler";
-
- switch (0)
- case 0:
- EXPECT_DEATH(_exit(1), "") << "exit in switch case";
-
-# ifdef _MSC_VER
-# pragma warning(pop)
-# endif // _MSC_VER
-}
-
-// Tests that a static member function can be used in a "fast" style
-// death test.
-TEST_F(TestForDeathTest, StaticMemberFunctionFastStyle) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember");
-}
-
-// Tests that a method of the test fixture can be used in a "fast"
-// style death test.
-TEST_F(TestForDeathTest, MemberFunctionFastStyle) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- should_die_ = true;
- EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction");
-}
-
-void ChangeToRootDir() { posix::ChDir(GTEST_PATH_SEP_); }
-
-// Tests that death tests work even if the current directory has been
-// changed.
-TEST_F(TestForDeathTest, FastDeathTestInChangedDir) {
- testing::GTEST_FLAG(death_test_style) = "fast";
-
- ChangeToRootDir();
- EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
-
- ChangeToRootDir();
- ASSERT_DEATH(_exit(1), "");
-}
-
-// Repeats a representative sample of death tests in the "threadsafe" style:
-
-TEST_F(TestForDeathTest, StaticMemberFunctionThreadsafeStyle) {
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
- ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember");
-}
-
-TEST_F(TestForDeathTest, MemberFunctionThreadsafeStyle) {
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
- should_die_ = true;
- EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction");
-}
-
-TEST_F(TestForDeathTest, ThreadsafeDeathTestInLoop) {
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
-
- for (int i = 0; i < 3; ++i)
- EXPECT_EXIT(_exit(i), testing::ExitedWithCode(i), "") << ": i = " << i;
-}
-
-TEST_F(TestForDeathTest, ThreadsafeDeathTestInChangedDir) {
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
-
- ChangeToRootDir();
- EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
-
- ChangeToRootDir();
- ASSERT_DEATH(_exit(1), "");
-}
-
-TEST_F(TestForDeathTest, MixedStyles) {
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
- EXPECT_DEATH(_exit(1), "");
- testing::GTEST_FLAG(death_test_style) = "fast";
- EXPECT_DEATH(_exit(1), "");
-}
-
-namespace {
-
-bool pthread_flag;
-
-void SetPthreadFlag() {
- pthread_flag = true;
-}
-
-} // namespace
-
-# if GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
-
-TEST_F(TestForDeathTest, DoesNotExecuteAtforkHooks) {
- if (!testing::GTEST_FLAG(death_test_use_fork)) {
- testing::GTEST_FLAG(death_test_style) = "threadsafe";
- pthread_flag = false;
- ASSERT_EQ(0, pthread_atfork(&SetPthreadFlag, NULL, NULL));
- ASSERT_DEATH(_exit(1), "");
- ASSERT_FALSE(pthread_flag);
- }
-}
-
-# endif // GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
-
-// Tests that a method of another class can be used in a death test.
-TEST_F(TestForDeathTest, MethodOfAnotherClass) {
- const MayDie x(true);
- ASSERT_DEATH(x.MemberFunction(), "MayDie\\:\\:MemberFunction");
-}
-
-// Tests that a global function can be used in a death test.
-TEST_F(TestForDeathTest, GlobalFunction) {
- EXPECT_DEATH(GlobalFunction(), "GlobalFunction");
-}
-
-// Tests that any value convertible to an RE works as a second
-// argument to EXPECT_DEATH.
-TEST_F(TestForDeathTest, AcceptsAnythingConvertibleToRE) {
- static const char regex_c_str[] = "GlobalFunction";
- EXPECT_DEATH(GlobalFunction(), regex_c_str);
-
- const testing::internal::RE regex(regex_c_str);
- EXPECT_DEATH(GlobalFunction(), regex);
-
-# if GTEST_HAS_GLOBAL_STRING
-
- const string regex_str(regex_c_str);
- EXPECT_DEATH(GlobalFunction(), regex_str);
-
-# endif // GTEST_HAS_GLOBAL_STRING
-
- const ::std::string regex_std_str(regex_c_str);
- EXPECT_DEATH(GlobalFunction(), regex_std_str);
-}
-
-// Tests that a non-void function can be used in a death test.
-TEST_F(TestForDeathTest, NonVoidFunction) {
- ASSERT_DEATH(NonVoidFunction(), "NonVoidFunction");
-}
-
-// Tests that functions that take parameter(s) can be used in a death test.
-TEST_F(TestForDeathTest, FunctionWithParameter) {
- EXPECT_DEATH(DieIf(true), "DieIf\\(\\)");
- EXPECT_DEATH(DieIfLessThan(2, 3), "DieIfLessThan");
-}
-
-// Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture.
-TEST_F(TestForDeathTest, OutsideFixture) {
- DeathTestSubroutine();
-}
-
-// Tests that death tests can be done inside a loop.
-TEST_F(TestForDeathTest, InsideLoop) {
- for (int i = 0; i < 5; i++) {
- EXPECT_DEATH(DieIfLessThan(-1, i), "DieIfLessThan") << "where i == " << i;
- }
-}
-
-// Tests that a compound statement can be used in a death test.
-TEST_F(TestForDeathTest, CompoundStatement) {
- EXPECT_DEATH({ // NOLINT
- const int x = 2;
- const int y = x + 1;
- DieIfLessThan(x, y);
- },
- "DieIfLessThan");
-}
-
-// Tests that code that doesn't die causes a death test to fail.
-TEST_F(TestForDeathTest, DoesNotDie) {
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(DieIf(false), "DieIf"),
- "failed to die");
-}
-
-// Tests that a death test fails when the error message isn't expected.
-TEST_F(TestForDeathTest, ErrorMessageMismatch) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_DEATH(DieIf(true), "DieIfLessThan") << "End of death test message.";
- }, "died but not with expected error");
-}
-
-// On exit, *aborted will be true iff the EXPECT_DEATH() statement
-// aborted the function.
-void ExpectDeathTestHelper(bool* aborted) {
- *aborted = true;
- EXPECT_DEATH(DieIf(false), "DieIf"); // This assertion should fail.
- *aborted = false;
-}
-
-// Tests that EXPECT_DEATH doesn't abort the test on failure.
-TEST_F(TestForDeathTest, EXPECT_DEATH) {
- bool aborted = true;
- EXPECT_NONFATAL_FAILURE(ExpectDeathTestHelper(&aborted),
- "failed to die");
- EXPECT_FALSE(aborted);
-}
-
-// Tests that ASSERT_DEATH does abort the test on failure.
-TEST_F(TestForDeathTest, ASSERT_DEATH) {
- static bool aborted;
- EXPECT_FATAL_FAILURE({ // NOLINT
- aborted = true;
- ASSERT_DEATH(DieIf(false), "DieIf"); // This assertion should fail.
- aborted = false;
- }, "failed to die");
- EXPECT_TRUE(aborted);
-}
-
-// Tests that EXPECT_DEATH evaluates the arguments exactly once.
-TEST_F(TestForDeathTest, SingleEvaluation) {
- int x = 3;
- EXPECT_DEATH(DieIf((++x) == 4), "DieIf");
-
- const char* regex = "DieIf";
- const char* regex_save = regex;
- EXPECT_DEATH(DieIfLessThan(3, 4), regex++);
- EXPECT_EQ(regex_save + 1, regex);
-}
-
-// Tests that run-away death tests are reported as failures.
-TEST_F(TestForDeathTest, RunawayIsFailure) {
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(static_cast<void>(0), "Foo"),
- "failed to die.");
-}
-
-// Tests that death tests report executing 'return' in the statement as
-// failure.
-TEST_F(TestForDeathTest, ReturnIsFailure) {
- EXPECT_FATAL_FAILURE(ASSERT_DEATH(return, "Bar"),
- "illegal return in test statement.");
-}
-
-// Tests that EXPECT_DEBUG_DEATH works as expected,
-// that is, in debug mode, it:
-// 1. Asserts on death.
-// 2. Has no side effect.
-//
-// And in opt mode, it:
-// 1. Has side effects but does not assert.
-TEST_F(TestForDeathTest, TestExpectDebugDeath) {
- int sideeffect = 0;
-
- EXPECT_DEBUG_DEATH(DieInDebugElse12(&sideeffect),
- "death.*DieInDebugElse12");
-
-# ifdef NDEBUG
-
- // Checks that the assignment occurs in opt mode (sideeffect).
- EXPECT_EQ(12, sideeffect);
-
-# else
-
- // Checks that the assignment does not occur in dbg mode (no sideeffect).
- EXPECT_EQ(0, sideeffect);
-
-# endif
-}
-
-// Tests that ASSERT_DEBUG_DEATH works as expected
-// In debug mode:
-// 1. Asserts on debug death.
-// 2. Has no side effect.
-//
-// In opt mode:
-// 1. Has side effects and returns the expected value (12).
-TEST_F(TestForDeathTest, TestAssertDebugDeath) {
- int sideeffect = 0;
-
- ASSERT_DEBUG_DEATH({ // NOLINT
- // Tests that the return value is 12 in opt mode.
- EXPECT_EQ(12, DieInDebugElse12(&sideeffect));
- // Tests that the side effect occurred in opt mode.
- EXPECT_EQ(12, sideeffect);
- }, "death.*DieInDebugElse12");
-
-# ifdef NDEBUG
-
- // Checks that the assignment occurs in opt mode (sideeffect).
- EXPECT_EQ(12, sideeffect);
-
-# else
-
- // Checks that the assignment does not occur in dbg mode (no sideeffect).
- EXPECT_EQ(0, sideeffect);
-
-# endif
-}
-
-# ifndef NDEBUG
-
-void ExpectDebugDeathHelper(bool* aborted) {
- *aborted = true;
- EXPECT_DEBUG_DEATH(return, "") << "This is expected to fail.";
- *aborted = false;
-}
-
-# if GTEST_OS_WINDOWS
-TEST(PopUpDeathTest, DoesNotShowPopUpOnAbort) {
- printf("This test should be considered failing if it shows "
- "any pop-up dialogs.\n");
- fflush(stdout);
-
- EXPECT_DEATH({
- testing::GTEST_FLAG(catch_exceptions) = false;
- abort();
- }, "");
-}
-# endif // GTEST_OS_WINDOWS
-
-// Tests that EXPECT_DEBUG_DEATH in debug mode does not abort
-// the function.
-TEST_F(TestForDeathTest, ExpectDebugDeathDoesNotAbort) {
- bool aborted = true;
- EXPECT_NONFATAL_FAILURE(ExpectDebugDeathHelper(&aborted), "");
- EXPECT_FALSE(aborted);
-}
-
-void AssertDebugDeathHelper(bool* aborted) {
- *aborted = true;
- ASSERT_DEBUG_DEATH(return, "") << "This is expected to fail.";
- *aborted = false;
-}
-
-// Tests that ASSERT_DEBUG_DEATH in debug mode aborts the function on
-// failure.
-TEST_F(TestForDeathTest, AssertDebugDeathAborts) {
- static bool aborted;
- aborted = false;
- EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), "");
- EXPECT_TRUE(aborted);
-}
-
-# endif // _NDEBUG
-
-// Tests the *_EXIT family of macros, using a variety of predicates.
-static void TestExitMacros() {
- EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
- ASSERT_EXIT(_exit(42), testing::ExitedWithCode(42), "");
-
-# if GTEST_OS_WINDOWS
-
- // Of all signals effects on the process exit code, only those of SIGABRT
- // are documented on Windows.
- // See http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx.
- EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), "");
-
-# else
-
- EXPECT_EXIT(raise(SIGKILL), testing::KilledBySignal(SIGKILL), "") << "foo";
- ASSERT_EXIT(raise(SIGUSR2), testing::KilledBySignal(SIGUSR2), "") << "bar";
-
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_EXIT(_exit(0), testing::KilledBySignal(SIGSEGV), "")
- << "This failure is expected, too.";
- }, "This failure is expected, too.");
-
-# endif // GTEST_OS_WINDOWS
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_EXIT(raise(SIGSEGV), testing::ExitedWithCode(0), "")
- << "This failure is expected.";
- }, "This failure is expected.");
-}
-
-TEST_F(TestForDeathTest, ExitMacros) {
- TestExitMacros();
-}
-
-TEST_F(TestForDeathTest, ExitMacrosUsingFork) {
- testing::GTEST_FLAG(death_test_use_fork) = true;
- TestExitMacros();
-}
-
-TEST_F(TestForDeathTest, InvalidStyle) {
- testing::GTEST_FLAG(death_test_style) = "rococo";
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_DEATH(_exit(0), "") << "This failure is expected.";
- }, "This failure is expected.");
-}
-
-TEST_F(TestForDeathTest, DeathTestFailedOutput) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- EXPECT_NONFATAL_FAILURE(
- EXPECT_DEATH(DieWithMessage("death\n"),
- "expected message"),
- "Actual msg:\n"
- "[ DEATH ] death\n");
-}
-
-TEST_F(TestForDeathTest, DeathTestUnexpectedReturnOutput) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- EXPECT_NONFATAL_FAILURE(
- EXPECT_DEATH({
- fprintf(stderr, "returning\n");
- fflush(stderr);
- return;
- }, ""),
- " Result: illegal return in test statement.\n"
- " Error msg:\n"
- "[ DEATH ] returning\n");
-}
-
-TEST_F(TestForDeathTest, DeathTestBadExitCodeOutput) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- EXPECT_NONFATAL_FAILURE(
- EXPECT_EXIT(DieWithMessage("exiting with rc 1\n"),
- testing::ExitedWithCode(3),
- "expected message"),
- " Result: died but not with expected exit code:\n"
- " Exited with exit status 1\n"
- "Actual msg:\n"
- "[ DEATH ] exiting with rc 1\n");
-}
-
-TEST_F(TestForDeathTest, DeathTestMultiLineMatchFail) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- EXPECT_NONFATAL_FAILURE(
- EXPECT_DEATH(DieWithMessage("line 1\nline 2\nline 3\n"),
- "line 1\nxyz\nline 3\n"),
- "Actual msg:\n"
- "[ DEATH ] line 1\n"
- "[ DEATH ] line 2\n"
- "[ DEATH ] line 3\n");
-}
-
-TEST_F(TestForDeathTest, DeathTestMultiLineMatchPass) {
- testing::GTEST_FLAG(death_test_style) = "fast";
- EXPECT_DEATH(DieWithMessage("line 1\nline 2\nline 3\n"),
- "line 1\nline 2\nline 3\n");
-}
-
-// A DeathTestFactory that returns MockDeathTests.
-class MockDeathTestFactory : public DeathTestFactory {
- public:
- MockDeathTestFactory();
- virtual bool Create(const char* statement,
- const ::testing::internal::RE* regex,
- const char* file, int line, DeathTest** test);
-
- // Sets the parameters for subsequent calls to Create.
- void SetParameters(bool create, DeathTest::TestRole role,
- int status, bool passed);
-
- // Accessors.
- int AssumeRoleCalls() const { return assume_role_calls_; }
- int WaitCalls() const { return wait_calls_; }
- int PassedCalls() const { return passed_args_.size(); }
- bool PassedArgument(int n) const { return passed_args_[n]; }
- int AbortCalls() const { return abort_args_.size(); }
- DeathTest::AbortReason AbortArgument(int n) const {
- return abort_args_[n];
- }
- bool TestDeleted() const { return test_deleted_; }
-
- private:
- friend class MockDeathTest;
- // If true, Create will return a MockDeathTest; otherwise it returns
- // NULL.
- bool create_;
- // The value a MockDeathTest will return from its AssumeRole method.
- DeathTest::TestRole role_;
- // The value a MockDeathTest will return from its Wait method.
- int status_;
- // The value a MockDeathTest will return from its Passed method.
- bool passed_;
-
- // Number of times AssumeRole was called.
- int assume_role_calls_;
- // Number of times Wait was called.
- int wait_calls_;
- // The arguments to the calls to Passed since the last call to
- // SetParameters.
- std::vector<bool> passed_args_;
- // The arguments to the calls to Abort since the last call to
- // SetParameters.
- std::vector<DeathTest::AbortReason> abort_args_;
- // True if the last MockDeathTest returned by Create has been
- // deleted.
- bool test_deleted_;
-};
-
-
-// A DeathTest implementation useful in testing. It returns values set
-// at its creation from its various inherited DeathTest methods, and
-// reports calls to those methods to its parent MockDeathTestFactory
-// object.
-class MockDeathTest : public DeathTest {
- public:
- MockDeathTest(MockDeathTestFactory *parent,
- TestRole role, int status, bool passed) :
- parent_(parent), role_(role), status_(status), passed_(passed) {
- }
- virtual ~MockDeathTest() {
- parent_->test_deleted_ = true;
- }
- virtual TestRole AssumeRole() {
- ++parent_->assume_role_calls_;
- return role_;
- }
- virtual int Wait() {
- ++parent_->wait_calls_;
- return status_;
- }
- virtual bool Passed(bool exit_status_ok) {
- parent_->passed_args_.push_back(exit_status_ok);
- return passed_;
- }
- virtual void Abort(AbortReason reason) {
- parent_->abort_args_.push_back(reason);
- }
- private:
- MockDeathTestFactory* const parent_;
- const TestRole role_;
- const int status_;
- const bool passed_;
-};
-
-
-// MockDeathTestFactory constructor.
-MockDeathTestFactory::MockDeathTestFactory()
- : create_(true),
- role_(DeathTest::OVERSEE_TEST),
- status_(0),
- passed_(true),
- assume_role_calls_(0),
- wait_calls_(0),
- passed_args_(),
- abort_args_() {
-}
-
-
-// Sets the parameters for subsequent calls to Create.
-void MockDeathTestFactory::SetParameters(bool create,
- DeathTest::TestRole role,
- int status, bool passed) {
- create_ = create;
- role_ = role;
- status_ = status;
- passed_ = passed;
-
- assume_role_calls_ = 0;
- wait_calls_ = 0;
- passed_args_.clear();
- abort_args_.clear();
-}
-
-
-// Sets test to NULL (if create_ is false) or to the address of a new
-// MockDeathTest object with parameters taken from the last call
-// to SetParameters (if create_ is true). Always returns true.
-bool MockDeathTestFactory::Create(const char* /*statement*/,
- const ::testing::internal::RE* /*regex*/,
- const char* /*file*/,
- int /*line*/,
- DeathTest** test) {
- test_deleted_ = false;
- if (create_) {
- *test = new MockDeathTest(this, role_, status_, passed_);
- } else {
- *test = NULL;
- }
- return true;
-}
-
-// A test fixture for testing the logic of the GTEST_DEATH_TEST_ macro.
-// It installs a MockDeathTestFactory that is used for the duration
-// of the test case.
-class MacroLogicDeathTest : public testing::Test {
- protected:
- static testing::internal::ReplaceDeathTestFactory* replacer_;
- static MockDeathTestFactory* factory_;
-
- static void SetUpTestCase() {
- factory_ = new MockDeathTestFactory;
- replacer_ = new testing::internal::ReplaceDeathTestFactory(factory_);
- }
-
- static void TearDownTestCase() {
- delete replacer_;
- replacer_ = NULL;
- delete factory_;
- factory_ = NULL;
- }
-
- // Runs a death test that breaks the rules by returning. Such a death
- // test cannot be run directly from a test routine that uses a
- // MockDeathTest, or the remainder of the routine will not be executed.
- static void RunReturningDeathTest(bool* flag) {
- ASSERT_DEATH({ // NOLINT
- *flag = true;
- return;
- }, "");
- }
-};
-
-testing::internal::ReplaceDeathTestFactory* MacroLogicDeathTest::replacer_
- = NULL;
-MockDeathTestFactory* MacroLogicDeathTest::factory_ = NULL;
-
-
-// Test that nothing happens when the factory doesn't return a DeathTest:
-TEST_F(MacroLogicDeathTest, NothingHappens) {
- bool flag = false;
- factory_->SetParameters(false, DeathTest::OVERSEE_TEST, 0, true);
- EXPECT_DEATH(flag = true, "");
- EXPECT_FALSE(flag);
- EXPECT_EQ(0, factory_->AssumeRoleCalls());
- EXPECT_EQ(0, factory_->WaitCalls());
- EXPECT_EQ(0, factory_->PassedCalls());
- EXPECT_EQ(0, factory_->AbortCalls());
- EXPECT_FALSE(factory_->TestDeleted());
-}
-
-// Test that the parent process doesn't run the death test code,
-// and that the Passed method returns false when the (simulated)
-// child process exits with status 0:
-TEST_F(MacroLogicDeathTest, ChildExitsSuccessfully) {
- bool flag = false;
- factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 0, true);
- EXPECT_DEATH(flag = true, "");
- EXPECT_FALSE(flag);
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
- EXPECT_EQ(1, factory_->WaitCalls());
- ASSERT_EQ(1, factory_->PassedCalls());
- EXPECT_FALSE(factory_->PassedArgument(0));
- EXPECT_EQ(0, factory_->AbortCalls());
- EXPECT_TRUE(factory_->TestDeleted());
-}
-
-// Tests that the Passed method was given the argument "true" when
-// the (simulated) child process exits with status 1:
-TEST_F(MacroLogicDeathTest, ChildExitsUnsuccessfully) {
- bool flag = false;
- factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 1, true);
- EXPECT_DEATH(flag = true, "");
- EXPECT_FALSE(flag);
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
- EXPECT_EQ(1, factory_->WaitCalls());
- ASSERT_EQ(1, factory_->PassedCalls());
- EXPECT_TRUE(factory_->PassedArgument(0));
- EXPECT_EQ(0, factory_->AbortCalls());
- EXPECT_TRUE(factory_->TestDeleted());
-}
-
-// Tests that the (simulated) child process executes the death test
-// code, and is aborted with the correct AbortReason if it
-// executes a return statement.
-TEST_F(MacroLogicDeathTest, ChildPerformsReturn) {
- bool flag = false;
- factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true);
- RunReturningDeathTest(&flag);
- EXPECT_TRUE(flag);
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
- EXPECT_EQ(0, factory_->WaitCalls());
- EXPECT_EQ(0, factory_->PassedCalls());
- EXPECT_EQ(1, factory_->AbortCalls());
- EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT,
- factory_->AbortArgument(0));
- EXPECT_TRUE(factory_->TestDeleted());
-}
-
-// Tests that the (simulated) child process is aborted with the
-// correct AbortReason if it does not die.
-TEST_F(MacroLogicDeathTest, ChildDoesNotDie) {
- bool flag = false;
- factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true);
- EXPECT_DEATH(flag = true, "");
- EXPECT_TRUE(flag);
- EXPECT_EQ(1, factory_->AssumeRoleCalls());
- EXPECT_EQ(0, factory_->WaitCalls());
- EXPECT_EQ(0, factory_->PassedCalls());
- // This time there are two calls to Abort: one since the test didn't
- // die, and another from the ReturnSentinel when it's destroyed. The
- // sentinel normally isn't destroyed if a test doesn't die, since
- // _exit(2) is called in that case by ForkingDeathTest, but not by
- // our MockDeathTest.
- ASSERT_EQ(2, factory_->AbortCalls());
- EXPECT_EQ(DeathTest::TEST_DID_NOT_DIE,
- factory_->AbortArgument(0));
- EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT,
- factory_->AbortArgument(1));
- EXPECT_TRUE(factory_->TestDeleted());
-}
-
-// Tests that a successful death test does not register a successful
-// test part.
-TEST(SuccessRegistrationDeathTest, NoSuccessPart) {
- EXPECT_DEATH(_exit(1), "");
- EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
-}
-
-TEST(StreamingAssertionsDeathTest, DeathTest) {
- EXPECT_DEATH(_exit(1), "") << "unexpected failure";
- ASSERT_DEATH(_exit(1), "") << "unexpected failure";
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_DEATH(_exit(0), "") << "expected failure";
- }, "expected failure");
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_DEATH(_exit(0), "") << "expected failure";
- }, "expected failure");
-}
-
-// Tests that GetLastErrnoDescription returns an empty string when the
-// last error is 0 and non-empty string when it is non-zero.
-TEST(GetLastErrnoDescription, GetLastErrnoDescriptionWorks) {
- errno = ENOENT;
- EXPECT_STRNE("", GetLastErrnoDescription().c_str());
- errno = 0;
- EXPECT_STREQ("", GetLastErrnoDescription().c_str());
-}
-
-# if GTEST_OS_WINDOWS
-TEST(AutoHandleTest, AutoHandleWorks) {
- HANDLE handle = ::CreateEvent(NULL, FALSE, FALSE, NULL);
- ASSERT_NE(INVALID_HANDLE_VALUE, handle);
-
- // Tests that the AutoHandle is correctly initialized with a handle.
- testing::internal::AutoHandle auto_handle(handle);
- EXPECT_EQ(handle, auto_handle.Get());
-
- // Tests that Reset assigns INVALID_HANDLE_VALUE.
- // Note that this cannot verify whether the original handle is closed.
- auto_handle.Reset();
- EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle.Get());
-
- // Tests that Reset assigns the new handle.
- // Note that this cannot verify whether the original handle is closed.
- handle = ::CreateEvent(NULL, FALSE, FALSE, NULL);
- ASSERT_NE(INVALID_HANDLE_VALUE, handle);
- auto_handle.Reset(handle);
- EXPECT_EQ(handle, auto_handle.Get());
-
- // Tests that AutoHandle contains INVALID_HANDLE_VALUE by default.
- testing::internal::AutoHandle auto_handle2;
- EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle2.Get());
-}
-# endif // GTEST_OS_WINDOWS
-
-# if GTEST_OS_WINDOWS
-typedef unsigned __int64 BiggestParsable;
-typedef signed __int64 BiggestSignedParsable;
-const BiggestParsable kBiggestParsableMax = ULLONG_MAX;
-const BiggestSignedParsable kBiggestSignedParsableMax = LLONG_MAX;
-# else
-typedef unsigned long long BiggestParsable;
-typedef signed long long BiggestSignedParsable;
-const BiggestParsable kBiggestParsableMax =
- ::std::numeric_limits<BiggestParsable>::max();
-const BiggestSignedParsable kBiggestSignedParsableMax =
- ::std::numeric_limits<BiggestSignedParsable>::max();
-# endif // GTEST_OS_WINDOWS
-
-TEST(ParseNaturalNumberTest, RejectsInvalidFormat) {
- BiggestParsable result = 0;
-
- // Rejects non-numbers.
- EXPECT_FALSE(ParseNaturalNumber(String("non-number string"), &result));
-
- // Rejects numbers with whitespace prefix.
- EXPECT_FALSE(ParseNaturalNumber(String(" 123"), &result));
-
- // Rejects negative numbers.
- EXPECT_FALSE(ParseNaturalNumber(String("-123"), &result));
-
- // Rejects numbers starting with a plus sign.
- EXPECT_FALSE(ParseNaturalNumber(String("+123"), &result));
- errno = 0;
-}
-
-TEST(ParseNaturalNumberTest, RejectsOverflownNumbers) {
- BiggestParsable result = 0;
-
- EXPECT_FALSE(ParseNaturalNumber(String("99999999999999999999999"), &result));
-
- signed char char_result = 0;
- EXPECT_FALSE(ParseNaturalNumber(String("200"), &char_result));
- errno = 0;
-}
-
-TEST(ParseNaturalNumberTest, AcceptsValidNumbers) {
- BiggestParsable result = 0;
-
- result = 0;
- ASSERT_TRUE(ParseNaturalNumber(String("123"), &result));
- EXPECT_EQ(123U, result);
-
- // Check 0 as an edge case.
- result = 1;
- ASSERT_TRUE(ParseNaturalNumber(String("0"), &result));
- EXPECT_EQ(0U, result);
-
- result = 1;
- ASSERT_TRUE(ParseNaturalNumber(String("00000"), &result));
- EXPECT_EQ(0U, result);
-}
-
-TEST(ParseNaturalNumberTest, AcceptsTypeLimits) {
- Message msg;
- msg << kBiggestParsableMax;
-
- BiggestParsable result = 0;
- EXPECT_TRUE(ParseNaturalNumber(msg.GetString(), &result));
- EXPECT_EQ(kBiggestParsableMax, result);
-
- Message msg2;
- msg2 << kBiggestSignedParsableMax;
-
- BiggestSignedParsable signed_result = 0;
- EXPECT_TRUE(ParseNaturalNumber(msg2.GetString(), &signed_result));
- EXPECT_EQ(kBiggestSignedParsableMax, signed_result);
-
- Message msg3;
- msg3 << INT_MAX;
-
- int int_result = 0;
- EXPECT_TRUE(ParseNaturalNumber(msg3.GetString(), &int_result));
- EXPECT_EQ(INT_MAX, int_result);
-
- Message msg4;
- msg4 << UINT_MAX;
-
- unsigned int uint_result = 0;
- EXPECT_TRUE(ParseNaturalNumber(msg4.GetString(), &uint_result));
- EXPECT_EQ(UINT_MAX, uint_result);
-}
-
-TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
- short short_result = 0;
- ASSERT_TRUE(ParseNaturalNumber(String("123"), &short_result));
- EXPECT_EQ(123, short_result);
-
- signed char char_result = 0;
- ASSERT_TRUE(ParseNaturalNumber(String("123"), &char_result));
- EXPECT_EQ(123, char_result);
-}
-
-# if GTEST_OS_WINDOWS
-TEST(EnvironmentTest, HandleFitsIntoSizeT) {
- // TODO(vladl@google.com): Remove this test after this condition is verified
- // in a static assertion in gtest-death-test.cc in the function
- // GetStatusFileDescriptor.
- ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t));
-}
-# endif // GTEST_OS_WINDOWS
-
-// Tests that EXPECT_DEATH_IF_SUPPORTED/ASSERT_DEATH_IF_SUPPORTED trigger
-// failures when death tests are available on the system.
-TEST(ConditionalDeathMacrosDeathTest, ExpectsDeathWhenDeathTestsAvailable) {
- EXPECT_DEATH_IF_SUPPORTED(DieInside("CondDeathTestExpectMacro"),
- "death inside CondDeathTestExpectMacro");
- ASSERT_DEATH_IF_SUPPORTED(DieInside("CondDeathTestAssertMacro"),
- "death inside CondDeathTestAssertMacro");
-
- // Empty statement will not crash, which must trigger a failure.
- EXPECT_NONFATAL_FAILURE(EXPECT_DEATH_IF_SUPPORTED(;, ""), "");
- EXPECT_FATAL_FAILURE(ASSERT_DEATH_IF_SUPPORTED(;, ""), "");
-}
-
-#else
-
-using testing::internal::CaptureStderr;
-using testing::internal::GetCapturedStderr;
-using testing::internal::String;
-
-// Tests that EXPECT_DEATH_IF_SUPPORTED/ASSERT_DEATH_IF_SUPPORTED are still
-// defined but do not trigger failures when death tests are not available on
-// the system.
-TEST(ConditionalDeathMacrosTest, WarnsWhenDeathTestsNotAvailable) {
- // Empty statement will not crash, but that should not trigger a failure
- // when death tests are not supported.
- CaptureStderr();
- EXPECT_DEATH_IF_SUPPORTED(;, "");
- String output = GetCapturedStderr();
- ASSERT_TRUE(NULL != strstr(output.c_str(),
- "Death tests are not supported on this platform"));
- ASSERT_TRUE(NULL != strstr(output.c_str(), ";"));
-
- // The streamed message should not be printed as there is no test failure.
- CaptureStderr();
- EXPECT_DEATH_IF_SUPPORTED(;, "") << "streamed message";
- output = GetCapturedStderr();
- ASSERT_TRUE(NULL == strstr(output.c_str(), "streamed message"));
-
- CaptureStderr();
- ASSERT_DEATH_IF_SUPPORTED(;, ""); // NOLINT
- output = GetCapturedStderr();
- ASSERT_TRUE(NULL != strstr(output.c_str(),
- "Death tests are not supported on this platform"));
- ASSERT_TRUE(NULL != strstr(output.c_str(), ";"));
-
- CaptureStderr();
- ASSERT_DEATH_IF_SUPPORTED(;, "") << "streamed message"; // NOLINT
- output = GetCapturedStderr();
- ASSERT_TRUE(NULL == strstr(output.c_str(), "streamed message"));
-}
-
-void FuncWithAssert(int* n) {
- ASSERT_DEATH_IF_SUPPORTED(return;, "");
- (*n)++;
-}
-
-// Tests that ASSERT_DEATH_IF_SUPPORTED does not return from the current
-// function (as ASSERT_DEATH does) if death tests are not supported.
-TEST(ConditionalDeathMacrosTest, AssertDeatDoesNotReturnhIfUnsupported) {
- int n = 0;
- FuncWithAssert(&n);
- EXPECT_EQ(1, n);
-}
-#endif // GTEST_HAS_DEATH_TEST
-
-// Tests that the death test macros expand to code which may or may not
-// be followed by operator<<, and that in either case the complete text
-// comprises only a single C++ statement.
-//
-// The syntax should work whether death tests are available or not.
-TEST(ConditionalDeathMacrosSyntaxDeathTest, SingleStatement) {
- if (AlwaysFalse())
- // This would fail if executed; this is a compilation test only
- ASSERT_DEATH_IF_SUPPORTED(return, "");
-
- if (AlwaysTrue())
- EXPECT_DEATH_IF_SUPPORTED(_exit(1), "");
- else
- // This empty "else" branch is meant to ensure that EXPECT_DEATH
- // doesn't expand into an "if" statement without an "else"
- ; // NOLINT
-
- if (AlwaysFalse())
- ASSERT_DEATH_IF_SUPPORTED(return, "") << "did not die";
-
- if (AlwaysFalse())
- ; // NOLINT
- else
- EXPECT_DEATH_IF_SUPPORTED(_exit(1), "") << 1 << 2 << 3;
-}
-
-// Tests that conditional death test macros expand to code which interacts
-// well with switch statements.
-TEST(ConditionalDeathMacrosSyntaxDeathTest, SwitchStatement) {
-// Microsoft compiler usually complains about switch statements without
-// case labels. We suppress that warning for this test.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4065)
-#endif // _MSC_VER
-
- switch (0)
- default:
- ASSERT_DEATH_IF_SUPPORTED(_exit(1), "")
- << "exit in default switch handler";
-
- switch (0)
- case 0:
- EXPECT_DEATH_IF_SUPPORTED(_exit(1), "") << "exit in switch case";
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif // _MSC_VER
-}
-
-// Tests that a test case whose name ends with "DeathTest" works fine
-// on Windows.
-TEST(NotADeathTest, Test) {
- SUCCEED();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-filepath_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-filepath_test.cc
deleted file mode 100644
index 66d41184c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-filepath_test.cc
+++ /dev/null
@@ -1,696 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: keith.ray@gmail.com (Keith Ray)
-//
-// Google Test filepath utilities
-//
-// This file tests classes and functions used internally by
-// Google Test. They are subject to change without notice.
-//
-// This file is #included from gtest_unittest.cc, to avoid changing
-// build or make-files for some existing Google Test clients. Do not
-// #include this file anywhere else!
-
-#include "gtest/internal/gtest-filepath.h"
-#include "gtest/gtest.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h> // NOLINT
-#elif GTEST_OS_WINDOWS
-# include <direct.h> // NOLINT
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-namespace testing {
-namespace internal {
-namespace {
-
-#if GTEST_OS_WINDOWS_MOBILE
-// TODO(wan@google.com): Move these to the POSIX adapter section in
-// gtest-port.h.
-
-// Windows CE doesn't have the remove C function.
-int remove(const char* path) {
- LPCWSTR wpath = String::AnsiToUtf16(path);
- int ret = DeleteFile(wpath) ? 0 : -1;
- delete [] wpath;
- return ret;
-}
-// Windows CE doesn't have the _rmdir C function.
-int _rmdir(const char* path) {
- FilePath filepath(path);
- LPCWSTR wpath = String::AnsiToUtf16(
- filepath.RemoveTrailingPathSeparator().c_str());
- int ret = RemoveDirectory(wpath) ? 0 : -1;
- delete [] wpath;
- return ret;
-}
-
-#else
-
-TEST(GetCurrentDirTest, ReturnsCurrentDir) {
- const FilePath original_dir = FilePath::GetCurrentDir();
- EXPECT_FALSE(original_dir.IsEmpty());
-
- posix::ChDir(GTEST_PATH_SEP_);
- const FilePath cwd = FilePath::GetCurrentDir();
- posix::ChDir(original_dir.c_str());
-
-# if GTEST_OS_WINDOWS
-
- // Skips the ":".
- const char* const cwd_without_drive = strchr(cwd.c_str(), ':');
- ASSERT_TRUE(cwd_without_drive != NULL);
- EXPECT_STREQ(GTEST_PATH_SEP_, cwd_without_drive + 1);
-
-# else
-
- EXPECT_STREQ(GTEST_PATH_SEP_, cwd.c_str());
-
-# endif
-}
-
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-TEST(IsEmptyTest, ReturnsTrueForEmptyPath) {
- EXPECT_TRUE(FilePath("").IsEmpty());
- EXPECT_TRUE(FilePath(NULL).IsEmpty());
-}
-
-TEST(IsEmptyTest, ReturnsFalseForNonEmptyPath) {
- EXPECT_FALSE(FilePath("a").IsEmpty());
- EXPECT_FALSE(FilePath(".").IsEmpty());
- EXPECT_FALSE(FilePath("a/b").IsEmpty());
- EXPECT_FALSE(FilePath("a\\b\\").IsEmpty());
-}
-
-// RemoveDirectoryName "" -> ""
-TEST(RemoveDirectoryNameTest, WhenEmptyName) {
- EXPECT_STREQ("", FilePath("").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName "afile" -> "afile"
-TEST(RemoveDirectoryNameTest, ButNoDirectory) {
- EXPECT_STREQ("afile",
- FilePath("afile").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName "/afile" -> "afile"
-TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileName) {
- EXPECT_STREQ("afile",
- FilePath(GTEST_PATH_SEP_ "afile").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName "adir/" -> ""
-TEST(RemoveDirectoryNameTest, WhereThereIsNoFileName) {
- EXPECT_STREQ("",
- FilePath("adir" GTEST_PATH_SEP_).RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName "adir/afile" -> "afile"
-TEST(RemoveDirectoryNameTest, ShouldGiveFileName) {
- EXPECT_STREQ("afile",
- FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName "adir/subdir/afile" -> "afile"
-TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) {
- EXPECT_STREQ("afile",
- FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile")
- .RemoveDirectoryName().c_str());
-}
-
-#if GTEST_HAS_ALT_PATH_SEP_
-
-// Tests that RemoveDirectoryName() works with the alternate separator
-// on Windows.
-
-// RemoveDirectoryName("/afile") -> "afile"
-TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileNameForAlternateSeparator) {
- EXPECT_STREQ("afile",
- FilePath("/afile").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName("adir/") -> ""
-TEST(RemoveDirectoryNameTest, WhereThereIsNoFileNameForAlternateSeparator) {
- EXPECT_STREQ("",
- FilePath("adir/").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName("adir/afile") -> "afile"
-TEST(RemoveDirectoryNameTest, ShouldGiveFileNameForAlternateSeparator) {
- EXPECT_STREQ("afile",
- FilePath("adir/afile").RemoveDirectoryName().c_str());
-}
-
-// RemoveDirectoryName("adir/subdir/afile") -> "afile"
-TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileNameForAlternateSeparator) {
- EXPECT_STREQ("afile",
- FilePath("adir/subdir/afile").RemoveDirectoryName().c_str());
-}
-
-#endif
-
-// RemoveFileName "" -> "./"
-TEST(RemoveFileNameTest, EmptyName) {
-#if GTEST_OS_WINDOWS_MOBILE
- // On Windows CE, we use the root as the current directory.
- EXPECT_STREQ(GTEST_PATH_SEP_,
- FilePath("").RemoveFileName().c_str());
-#else
- EXPECT_STREQ("." GTEST_PATH_SEP_,
- FilePath("").RemoveFileName().c_str());
-#endif
-}
-
-// RemoveFileName "adir/" -> "adir/"
-TEST(RemoveFileNameTest, ButNoFile) {
- EXPECT_STREQ("adir" GTEST_PATH_SEP_,
- FilePath("adir" GTEST_PATH_SEP_).RemoveFileName().c_str());
-}
-
-// RemoveFileName "adir/afile" -> "adir/"
-TEST(RemoveFileNameTest, GivesDirName) {
- EXPECT_STREQ("adir" GTEST_PATH_SEP_,
- FilePath("adir" GTEST_PATH_SEP_ "afile")
- .RemoveFileName().c_str());
-}
-
-// RemoveFileName "adir/subdir/afile" -> "adir/subdir/"
-TEST(RemoveFileNameTest, GivesDirAndSubDirName) {
- EXPECT_STREQ("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_,
- FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile")
- .RemoveFileName().c_str());
-}
-
-// RemoveFileName "/afile" -> "/"
-TEST(RemoveFileNameTest, GivesRootDir) {
- EXPECT_STREQ(GTEST_PATH_SEP_,
- FilePath(GTEST_PATH_SEP_ "afile").RemoveFileName().c_str());
-}
-
-#if GTEST_HAS_ALT_PATH_SEP_
-
-// Tests that RemoveFileName() works with the alternate separator on
-// Windows.
-
-// RemoveFileName("adir/") -> "adir/"
-TEST(RemoveFileNameTest, ButNoFileForAlternateSeparator) {
- EXPECT_STREQ("adir" GTEST_PATH_SEP_,
- FilePath("adir/").RemoveFileName().c_str());
-}
-
-// RemoveFileName("adir/afile") -> "adir/"
-TEST(RemoveFileNameTest, GivesDirNameForAlternateSeparator) {
- EXPECT_STREQ("adir" GTEST_PATH_SEP_,
- FilePath("adir/afile").RemoveFileName().c_str());
-}
-
-// RemoveFileName("adir/subdir/afile") -> "adir/subdir/"
-TEST(RemoveFileNameTest, GivesDirAndSubDirNameForAlternateSeparator) {
- EXPECT_STREQ("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_,
- FilePath("adir/subdir/afile").RemoveFileName().c_str());
-}
-
-// RemoveFileName("/afile") -> "\"
-TEST(RemoveFileNameTest, GivesRootDirForAlternateSeparator) {
- EXPECT_STREQ(GTEST_PATH_SEP_,
- FilePath("/afile").RemoveFileName().c_str());
-}
-
-#endif
-
-TEST(MakeFileNameTest, GenerateWhenNumberIsZero) {
- FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"),
- 0, "xml");
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str());
-}
-
-TEST(MakeFileNameTest, GenerateFileNameNumberGtZero) {
- FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"),
- 12, "xml");
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.c_str());
-}
-
-TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberIsZero) {
- FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_),
- FilePath("bar"), 0, "xml");
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str());
-}
-
-TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberGtZero) {
- FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_),
- FilePath("bar"), 12, "xml");
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.c_str());
-}
-
-TEST(MakeFileNameTest, GenerateWhenNumberIsZeroAndDirIsEmpty) {
- FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"),
- 0, "xml");
- EXPECT_STREQ("bar.xml", actual.c_str());
-}
-
-TEST(MakeFileNameTest, GenerateWhenNumberIsNotZeroAndDirIsEmpty) {
- FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"),
- 14, "xml");
- EXPECT_STREQ("bar_14.xml", actual.c_str());
-}
-
-TEST(ConcatPathsTest, WorksWhenDirDoesNotEndWithPathSep) {
- FilePath actual = FilePath::ConcatPaths(FilePath("foo"),
- FilePath("bar.xml"));
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str());
-}
-
-TEST(ConcatPathsTest, WorksWhenPath1EndsWithPathSep) {
- FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_),
- FilePath("bar.xml"));
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str());
-}
-
-TEST(ConcatPathsTest, Path1BeingEmpty) {
- FilePath actual = FilePath::ConcatPaths(FilePath(""),
- FilePath("bar.xml"));
- EXPECT_STREQ("bar.xml", actual.c_str());
-}
-
-TEST(ConcatPathsTest, Path2BeingEmpty) {
- FilePath actual = FilePath::ConcatPaths(FilePath("foo"),
- FilePath(""));
- EXPECT_STREQ("foo" GTEST_PATH_SEP_, actual.c_str());
-}
-
-TEST(ConcatPathsTest, BothPathBeingEmpty) {
- FilePath actual = FilePath::ConcatPaths(FilePath(""),
- FilePath(""));
- EXPECT_STREQ("", actual.c_str());
-}
-
-TEST(ConcatPathsTest, Path1ContainsPathSep) {
- FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_ "bar"),
- FilePath("foobar.xml"));
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "foobar.xml",
- actual.c_str());
-}
-
-TEST(ConcatPathsTest, Path2ContainsPathSep) {
- FilePath actual = FilePath::ConcatPaths(
- FilePath("foo" GTEST_PATH_SEP_),
- FilePath("bar" GTEST_PATH_SEP_ "bar.xml"));
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "bar.xml",
- actual.c_str());
-}
-
-TEST(ConcatPathsTest, Path2EndsWithPathSep) {
- FilePath actual = FilePath::ConcatPaths(FilePath("foo"),
- FilePath("bar" GTEST_PATH_SEP_));
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_, actual.c_str());
-}
-
-// RemoveTrailingPathSeparator "" -> ""
-TEST(RemoveTrailingPathSeparatorTest, EmptyString) {
- EXPECT_STREQ("",
- FilePath("").RemoveTrailingPathSeparator().c_str());
-}
-
-// RemoveTrailingPathSeparator "foo" -> "foo"
-TEST(RemoveTrailingPathSeparatorTest, FileNoSlashString) {
- EXPECT_STREQ("foo",
- FilePath("foo").RemoveTrailingPathSeparator().c_str());
-}
-
-// RemoveTrailingPathSeparator "foo/" -> "foo"
-TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveTrailingSeparator) {
- EXPECT_STREQ(
- "foo",
- FilePath("foo" GTEST_PATH_SEP_).RemoveTrailingPathSeparator().c_str());
-#if GTEST_HAS_ALT_PATH_SEP_
- EXPECT_STREQ("foo",
- FilePath("foo/").RemoveTrailingPathSeparator().c_str());
-#endif
-}
-
-// RemoveTrailingPathSeparator "foo/bar/" -> "foo/bar/"
-TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveLastSeparator) {
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar",
- FilePath("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_)
- .RemoveTrailingPathSeparator().c_str());
-}
-
-// RemoveTrailingPathSeparator "foo/bar" -> "foo/bar"
-TEST(RemoveTrailingPathSeparatorTest, ShouldReturnUnmodified) {
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar",
- FilePath("foo" GTEST_PATH_SEP_ "bar")
- .RemoveTrailingPathSeparator().c_str());
-}
-
-TEST(DirectoryTest, RootDirectoryExists) {
-#if GTEST_OS_WINDOWS // We are on Windows.
- char current_drive[_MAX_PATH]; // NOLINT
- current_drive[0] = static_cast<char>(_getdrive() + 'A' - 1);
- current_drive[1] = ':';
- current_drive[2] = '\\';
- current_drive[3] = '\0';
- EXPECT_TRUE(FilePath(current_drive).DirectoryExists());
-#else
- EXPECT_TRUE(FilePath("/").DirectoryExists());
-#endif // GTEST_OS_WINDOWS
-}
-
-#if GTEST_OS_WINDOWS
-TEST(DirectoryTest, RootOfWrongDriveDoesNotExists) {
- const int saved_drive_ = _getdrive();
- // Find a drive that doesn't exist. Start with 'Z' to avoid common ones.
- for (char drive = 'Z'; drive >= 'A'; drive--)
- if (_chdrive(drive - 'A' + 1) == -1) {
- char non_drive[_MAX_PATH]; // NOLINT
- non_drive[0] = drive;
- non_drive[1] = ':';
- non_drive[2] = '\\';
- non_drive[3] = '\0';
- EXPECT_FALSE(FilePath(non_drive).DirectoryExists());
- break;
- }
- _chdrive(saved_drive_);
-}
-#endif // GTEST_OS_WINDOWS
-
-#if !GTEST_OS_WINDOWS_MOBILE
-// Windows CE _does_ consider an empty directory to exist.
-TEST(DirectoryTest, EmptyPathDirectoryDoesNotExist) {
- EXPECT_FALSE(FilePath("").DirectoryExists());
-}
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-TEST(DirectoryTest, CurrentDirectoryExists) {
-#if GTEST_OS_WINDOWS // We are on Windows.
-# ifndef _WIN32_CE // Windows CE doesn't have a current directory.
-
- EXPECT_TRUE(FilePath(".").DirectoryExists());
- EXPECT_TRUE(FilePath(".\\").DirectoryExists());
-
-# endif // _WIN32_CE
-#else
- EXPECT_TRUE(FilePath(".").DirectoryExists());
- EXPECT_TRUE(FilePath("./").DirectoryExists());
-#endif // GTEST_OS_WINDOWS
-}
-
-TEST(NormalizeTest, NullStringsEqualEmptyDirectory) {
- EXPECT_STREQ("", FilePath(NULL).c_str());
- EXPECT_STREQ("", FilePath(String(NULL)).c_str());
-}
-
-// "foo/bar" == foo//bar" == "foo///bar"
-TEST(NormalizeTest, MultipleConsecutiveSepaparatorsInMidstring) {
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar",
- FilePath("foo" GTEST_PATH_SEP_ "bar").c_str());
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar",
- FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str());
- EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar",
- FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_
- GTEST_PATH_SEP_ "bar").c_str());
-}
-
-// "/bar" == //bar" == "///bar"
-TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringStart) {
- EXPECT_STREQ(GTEST_PATH_SEP_ "bar",
- FilePath(GTEST_PATH_SEP_ "bar").c_str());
- EXPECT_STREQ(GTEST_PATH_SEP_ "bar",
- FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str());
- EXPECT_STREQ(GTEST_PATH_SEP_ "bar",
- FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str());
-}
-
-// "foo/" == foo//" == "foo///"
-TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringEnd) {
- EXPECT_STREQ("foo" GTEST_PATH_SEP_,
- FilePath("foo" GTEST_PATH_SEP_).c_str());
- EXPECT_STREQ("foo" GTEST_PATH_SEP_,
- FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_).c_str());
- EXPECT_STREQ("foo" GTEST_PATH_SEP_,
- FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_).c_str());
-}
-
-#if GTEST_HAS_ALT_PATH_SEP_
-
-// Tests that separators at the end of the string are normalized
-// regardless of their combination (e.g. "foo\" =="foo/\" ==
-// "foo\\/").
-TEST(NormalizeTest, MixAlternateSeparatorAtStringEnd) {
- EXPECT_STREQ("foo" GTEST_PATH_SEP_,
- FilePath("foo/").c_str());
- EXPECT_STREQ("foo" GTEST_PATH_SEP_,
- FilePath("foo" GTEST_PATH_SEP_ "/").c_str());
- EXPECT_STREQ("foo" GTEST_PATH_SEP_,
- FilePath("foo//" GTEST_PATH_SEP_).c_str());
-}
-
-#endif
-
-TEST(AssignmentOperatorTest, DefaultAssignedToNonDefault) {
- FilePath default_path;
- FilePath non_default_path("path");
- non_default_path = default_path;
- EXPECT_STREQ("", non_default_path.c_str());
- EXPECT_STREQ("", default_path.c_str()); // RHS var is unchanged.
-}
-
-TEST(AssignmentOperatorTest, NonDefaultAssignedToDefault) {
- FilePath non_default_path("path");
- FilePath default_path;
- default_path = non_default_path;
- EXPECT_STREQ("path", default_path.c_str());
- EXPECT_STREQ("path", non_default_path.c_str()); // RHS var is unchanged.
-}
-
-TEST(AssignmentOperatorTest, ConstAssignedToNonConst) {
- const FilePath const_default_path("const_path");
- FilePath non_default_path("path");
- non_default_path = const_default_path;
- EXPECT_STREQ("const_path", non_default_path.c_str());
-}
-
-class DirectoryCreationTest : public Test {
- protected:
- virtual void SetUp() {
- testdata_path_.Set(FilePath(String::Format("%s%s%s",
- TempDir().c_str(), GetCurrentExecutableName().c_str(),
- "_directory_creation" GTEST_PATH_SEP_ "test" GTEST_PATH_SEP_)));
- testdata_file_.Set(testdata_path_.RemoveTrailingPathSeparator());
-
- unique_file0_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"),
- 0, "txt"));
- unique_file1_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"),
- 1, "txt"));
-
- remove(testdata_file_.c_str());
- remove(unique_file0_.c_str());
- remove(unique_file1_.c_str());
- posix::RmDir(testdata_path_.c_str());
- }
-
- virtual void TearDown() {
- remove(testdata_file_.c_str());
- remove(unique_file0_.c_str());
- remove(unique_file1_.c_str());
- posix::RmDir(testdata_path_.c_str());
- }
-
- String TempDir() const {
-#if GTEST_OS_WINDOWS_MOBILE
- return String("\\temp\\");
-#elif GTEST_OS_WINDOWS
- const char* temp_dir = posix::GetEnv("TEMP");
- if (temp_dir == NULL || temp_dir[0] == '\0')
- return String("\\temp\\");
- else if (String(temp_dir).EndsWith("\\"))
- return String(temp_dir);
- else
- return String::Format("%s\\", temp_dir);
-#else
- return String("/tmp/");
-#endif // GTEST_OS_WINDOWS_MOBILE
- }
-
- void CreateTextFile(const char* filename) {
- FILE* f = posix::FOpen(filename, "w");
- fprintf(f, "text\n");
- fclose(f);
- }
-
- // Strings representing a directory and a file, with identical paths
- // except for the trailing separator character that distinquishes
- // a directory named 'test' from a file named 'test'. Example names:
- FilePath testdata_path_; // "/tmp/directory_creation/test/"
- FilePath testdata_file_; // "/tmp/directory_creation/test"
- FilePath unique_file0_; // "/tmp/directory_creation/test/unique.txt"
- FilePath unique_file1_; // "/tmp/directory_creation/test/unique_1.txt"
-};
-
-TEST_F(DirectoryCreationTest, CreateDirectoriesRecursively) {
- EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.c_str();
- EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());
- EXPECT_TRUE(testdata_path_.DirectoryExists());
-}
-
-TEST_F(DirectoryCreationTest, CreateDirectoriesForAlreadyExistingPath) {
- EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.c_str();
- EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());
- // Call 'create' again... should still succeed.
- EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());
-}
-
-TEST_F(DirectoryCreationTest, CreateDirectoriesAndUniqueFilename) {
- FilePath file_path(FilePath::GenerateUniqueFileName(testdata_path_,
- FilePath("unique"), "txt"));
- EXPECT_STREQ(unique_file0_.c_str(), file_path.c_str());
- EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file not there
-
- testdata_path_.CreateDirectoriesRecursively();
- EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file still not there
- CreateTextFile(file_path.c_str());
- EXPECT_TRUE(file_path.FileOrDirectoryExists());
-
- FilePath file_path2(FilePath::GenerateUniqueFileName(testdata_path_,
- FilePath("unique"), "txt"));
- EXPECT_STREQ(unique_file1_.c_str(), file_path2.c_str());
- EXPECT_FALSE(file_path2.FileOrDirectoryExists()); // file not there
- CreateTextFile(file_path2.c_str());
- EXPECT_TRUE(file_path2.FileOrDirectoryExists());
-}
-
-TEST_F(DirectoryCreationTest, CreateDirectoriesFail) {
- // force a failure by putting a file where we will try to create a directory.
- CreateTextFile(testdata_file_.c_str());
- EXPECT_TRUE(testdata_file_.FileOrDirectoryExists());
- EXPECT_FALSE(testdata_file_.DirectoryExists());
- EXPECT_FALSE(testdata_file_.CreateDirectoriesRecursively());
-}
-
-TEST(NoDirectoryCreationTest, CreateNoDirectoriesForDefaultXmlFile) {
- const FilePath test_detail_xml("test_detail.xml");
- EXPECT_FALSE(test_detail_xml.CreateDirectoriesRecursively());
-}
-
-TEST(FilePathTest, DefaultConstructor) {
- FilePath fp;
- EXPECT_STREQ("", fp.c_str());
-}
-
-TEST(FilePathTest, CharAndCopyConstructors) {
- const FilePath fp("spicy");
- EXPECT_STREQ("spicy", fp.c_str());
-
- const FilePath fp_copy(fp);
- EXPECT_STREQ("spicy", fp_copy.c_str());
-}
-
-TEST(FilePathTest, StringConstructor) {
- const FilePath fp(String("cider"));
- EXPECT_STREQ("cider", fp.c_str());
-}
-
-TEST(FilePathTest, Set) {
- const FilePath apple("apple");
- FilePath mac("mac");
- mac.Set(apple); // Implement Set() since overloading operator= is forbidden.
- EXPECT_STREQ("apple", mac.c_str());
- EXPECT_STREQ("apple", apple.c_str());
-}
-
-TEST(FilePathTest, ToString) {
- const FilePath file("drink");
- String str(file.ToString());
- EXPECT_STREQ("drink", str.c_str());
-}
-
-TEST(FilePathTest, RemoveExtension) {
- EXPECT_STREQ("app", FilePath("app.exe").RemoveExtension("exe").c_str());
- EXPECT_STREQ("APP", FilePath("APP.EXE").RemoveExtension("exe").c_str());
-}
-
-TEST(FilePathTest, RemoveExtensionWhenThereIsNoExtension) {
- EXPECT_STREQ("app", FilePath("app").RemoveExtension("exe").c_str());
-}
-
-TEST(FilePathTest, IsDirectory) {
- EXPECT_FALSE(FilePath("cola").IsDirectory());
- EXPECT_TRUE(FilePath("koala" GTEST_PATH_SEP_).IsDirectory());
-#if GTEST_HAS_ALT_PATH_SEP_
- EXPECT_TRUE(FilePath("koala/").IsDirectory());
-#endif
-}
-
-TEST(FilePathTest, IsAbsolutePath) {
- EXPECT_FALSE(FilePath("is" GTEST_PATH_SEP_ "relative").IsAbsolutePath());
- EXPECT_FALSE(FilePath("").IsAbsolutePath());
-#if GTEST_OS_WINDOWS
- EXPECT_TRUE(FilePath("c:\\" GTEST_PATH_SEP_ "is_not"
- GTEST_PATH_SEP_ "relative").IsAbsolutePath());
- EXPECT_FALSE(FilePath("c:foo" GTEST_PATH_SEP_ "bar").IsAbsolutePath());
- EXPECT_TRUE(FilePath("c:/" GTEST_PATH_SEP_ "is_not"
- GTEST_PATH_SEP_ "relative").IsAbsolutePath());
-#else
- EXPECT_TRUE(FilePath(GTEST_PATH_SEP_ "is_not" GTEST_PATH_SEP_ "relative")
- .IsAbsolutePath());
-#endif // GTEST_OS_WINDOWS
-}
-
-TEST(FilePathTest, IsRootDirectory) {
-#if GTEST_OS_WINDOWS
- EXPECT_TRUE(FilePath("a:\\").IsRootDirectory());
- EXPECT_TRUE(FilePath("Z:/").IsRootDirectory());
- EXPECT_TRUE(FilePath("e://").IsRootDirectory());
- EXPECT_FALSE(FilePath("").IsRootDirectory());
- EXPECT_FALSE(FilePath("b:").IsRootDirectory());
- EXPECT_FALSE(FilePath("b:a").IsRootDirectory());
- EXPECT_FALSE(FilePath("8:/").IsRootDirectory());
- EXPECT_FALSE(FilePath("c|/").IsRootDirectory());
-#else
- EXPECT_TRUE(FilePath("/").IsRootDirectory());
- EXPECT_TRUE(FilePath("//").IsRootDirectory());
- EXPECT_FALSE(FilePath("").IsRootDirectory());
- EXPECT_FALSE(FilePath("\\").IsRootDirectory());
- EXPECT_FALSE(FilePath("/x").IsRootDirectory());
-#endif
-}
-
-} // namespace
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-linked_ptr_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-linked_ptr_test.cc
deleted file mode 100644
index 0d5508ae8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-linked_ptr_test.cc
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2003, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: Dan Egnor (egnor@google.com)
-// Ported to Windows: Vadim Berman (vadimb@google.com)
-
-#include "gtest/internal/gtest-linked_ptr.h"
-
-#include <stdlib.h>
-#include "gtest/gtest.h"
-
-namespace {
-
-using testing::Message;
-using testing::internal::linked_ptr;
-
-int num;
-Message* history = NULL;
-
-// Class which tracks allocation/deallocation
-class A {
- public:
- A(): mynum(num++) { *history << "A" << mynum << " ctor\n"; }
- virtual ~A() { *history << "A" << mynum << " dtor\n"; }
- virtual void Use() { *history << "A" << mynum << " use\n"; }
- protected:
- int mynum;
-};
-
-// Subclass
-class B : public A {
- public:
- B() { *history << "B" << mynum << " ctor\n"; }
- ~B() { *history << "B" << mynum << " dtor\n"; }
- virtual void Use() { *history << "B" << mynum << " use\n"; }
-};
-
-class LinkedPtrTest : public testing::Test {
- public:
- LinkedPtrTest() {
- num = 0;
- history = new Message;
- }
-
- virtual ~LinkedPtrTest() {
- delete history;
- history = NULL;
- }
-};
-
-TEST_F(LinkedPtrTest, GeneralTest) {
- {
- linked_ptr<A> a0, a1, a2;
- // Use explicit function call notation here to suppress self-assign warning.
- a0.operator=(a0);
- a1 = a2;
- ASSERT_EQ(a0.get(), static_cast<A*>(NULL));
- ASSERT_EQ(a1.get(), static_cast<A*>(NULL));
- ASSERT_EQ(a2.get(), static_cast<A*>(NULL));
- ASSERT_TRUE(a0 == NULL);
- ASSERT_TRUE(a1 == NULL);
- ASSERT_TRUE(a2 == NULL);
-
- {
- linked_ptr<A> a3(new A);
- a0 = a3;
- ASSERT_TRUE(a0 == a3);
- ASSERT_TRUE(a0 != NULL);
- ASSERT_TRUE(a0.get() == a3);
- ASSERT_TRUE(a0 == a3.get());
- linked_ptr<A> a4(a0);
- a1 = a4;
- linked_ptr<A> a5(new A);
- ASSERT_TRUE(a5.get() != a3);
- ASSERT_TRUE(a5 != a3.get());
- a2 = a5;
- linked_ptr<B> b0(new B);
- linked_ptr<A> a6(b0);
- ASSERT_TRUE(b0 == a6);
- ASSERT_TRUE(a6 == b0);
- ASSERT_TRUE(b0 != NULL);
- a5 = b0;
- a5 = b0;
- a3->Use();
- a4->Use();
- a5->Use();
- a6->Use();
- b0->Use();
- (*b0).Use();
- b0.get()->Use();
- }
-
- a0->Use();
- a1->Use();
- a2->Use();
-
- a1 = a2;
- a2.reset(new A);
- a0.reset();
-
- linked_ptr<A> a7;
- }
-
- ASSERT_STREQ(
- "A0 ctor\n"
- "A1 ctor\n"
- "A2 ctor\n"
- "B2 ctor\n"
- "A0 use\n"
- "A0 use\n"
- "B2 use\n"
- "B2 use\n"
- "B2 use\n"
- "B2 use\n"
- "B2 use\n"
- "B2 dtor\n"
- "A2 dtor\n"
- "A0 use\n"
- "A0 use\n"
- "A1 use\n"
- "A3 ctor\n"
- "A0 dtor\n"
- "A3 dtor\n"
- "A1 dtor\n",
- history->GetString().c_str()
- );
-}
-
-} // Unnamed namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-listener_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-listener_test.cc
deleted file mode 100644
index 2aa08ef36..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-listener_test.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright 2009 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This file verifies Google Test event listeners receive events at the
-// right times.
-
-#include "gtest/gtest.h"
-#include <vector>
-
-using ::testing::AddGlobalTestEnvironment;
-using ::testing::Environment;
-using ::testing::InitGoogleTest;
-using ::testing::Test;
-using ::testing::TestCase;
-using ::testing::TestEventListener;
-using ::testing::TestInfo;
-using ::testing::TestPartResult;
-using ::testing::UnitTest;
-using ::testing::internal::String;
-
-// Used by tests to register their events.
-std::vector<String>* g_events = NULL;
-
-namespace testing {
-namespace internal {
-
-class EventRecordingListener : public TestEventListener {
- public:
- EventRecordingListener(const char* name) : name_(name) {}
-
- protected:
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {
- g_events->push_back(GetFullMethodName("OnTestProgramStart"));
- }
-
- virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
- int iteration) {
- Message message;
- message << GetFullMethodName("OnTestIterationStart")
- << "(" << iteration << ")";
- g_events->push_back(message.GetString());
- }
-
- virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {
- g_events->push_back(GetFullMethodName("OnEnvironmentsSetUpStart"));
- }
-
- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {
- g_events->push_back(GetFullMethodName("OnEnvironmentsSetUpEnd"));
- }
-
- virtual void OnTestCaseStart(const TestCase& /*test_case*/) {
- g_events->push_back(GetFullMethodName("OnTestCaseStart"));
- }
-
- virtual void OnTestStart(const TestInfo& /*test_info*/) {
- g_events->push_back(GetFullMethodName("OnTestStart"));
- }
-
- virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {
- g_events->push_back(GetFullMethodName("OnTestPartResult"));
- }
-
- virtual void OnTestEnd(const TestInfo& /*test_info*/) {
- g_events->push_back(GetFullMethodName("OnTestEnd"));
- }
-
- virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {
- g_events->push_back(GetFullMethodName("OnTestCaseEnd"));
- }
-
- virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {
- g_events->push_back(GetFullMethodName("OnEnvironmentsTearDownStart"));
- }
-
- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {
- g_events->push_back(GetFullMethodName("OnEnvironmentsTearDownEnd"));
- }
-
- virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
- int iteration) {
- Message message;
- message << GetFullMethodName("OnTestIterationEnd")
- << "(" << iteration << ")";
- g_events->push_back(message.GetString());
- }
-
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {
- g_events->push_back(GetFullMethodName("OnTestProgramEnd"));
- }
-
- private:
- String GetFullMethodName(const char* name) {
- Message message;
- message << name_ << "." << name;
- return message.GetString();
- }
-
- String name_;
-};
-
-class EnvironmentInvocationCatcher : public Environment {
- protected:
- virtual void SetUp() {
- g_events->push_back(String("Environment::SetUp"));
- }
-
- virtual void TearDown() {
- g_events->push_back(String("Environment::TearDown"));
- }
-};
-
-class ListenerTest : public Test {
- protected:
- static void SetUpTestCase() {
- g_events->push_back(String("ListenerTest::SetUpTestCase"));
- }
-
- static void TearDownTestCase() {
- g_events->push_back(String("ListenerTest::TearDownTestCase"));
- }
-
- virtual void SetUp() {
- g_events->push_back(String("ListenerTest::SetUp"));
- }
-
- virtual void TearDown() {
- g_events->push_back(String("ListenerTest::TearDown"));
- }
-};
-
-TEST_F(ListenerTest, DoesFoo) {
- // Test execution order within a test case is not guaranteed so we are not
- // recording the test name.
- g_events->push_back(String("ListenerTest::* Test Body"));
- SUCCEED(); // Triggers OnTestPartResult.
-}
-
-TEST_F(ListenerTest, DoesBar) {
- g_events->push_back(String("ListenerTest::* Test Body"));
- SUCCEED(); // Triggers OnTestPartResult.
-}
-
-} // namespace internal
-
-} // namespace testing
-
-using ::testing::internal::EnvironmentInvocationCatcher;
-using ::testing::internal::EventRecordingListener;
-
-void VerifyResults(const std::vector<String>& data,
- const char* const* expected_data,
- int expected_data_size) {
- const int actual_size = data.size();
- // If the following assertion fails, a new entry will be appended to
- // data. Hence we save data.size() first.
- EXPECT_EQ(expected_data_size, actual_size);
-
- // Compares the common prefix.
- const int shorter_size = expected_data_size <= actual_size ?
- expected_data_size : actual_size;
- int i = 0;
- for (; i < shorter_size; ++i) {
- ASSERT_STREQ(expected_data[i], data[i].c_str())
- << "at position " << i;
- }
-
- // Prints extra elements in the actual data.
- for (; i < actual_size; ++i) {
- printf(" Actual event #%d: %s\n", i, data[i].c_str());
- }
-}
-
-int main(int argc, char **argv) {
- std::vector<String> events;
- g_events = &events;
- InitGoogleTest(&argc, argv);
-
- UnitTest::GetInstance()->listeners().Append(
- new EventRecordingListener("1st"));
- UnitTest::GetInstance()->listeners().Append(
- new EventRecordingListener("2nd"));
-
- AddGlobalTestEnvironment(new EnvironmentInvocationCatcher);
-
- GTEST_CHECK_(events.size() == 0)
- << "AddGlobalTestEnvironment should not generate any events itself.";
-
- ::testing::GTEST_FLAG(repeat) = 2;
- int ret_val = RUN_ALL_TESTS();
-
- const char* const expected_events[] = {
- "1st.OnTestProgramStart",
- "2nd.OnTestProgramStart",
- "1st.OnTestIterationStart(0)",
- "2nd.OnTestIterationStart(0)",
- "1st.OnEnvironmentsSetUpStart",
- "2nd.OnEnvironmentsSetUpStart",
- "Environment::SetUp",
- "2nd.OnEnvironmentsSetUpEnd",
- "1st.OnEnvironmentsSetUpEnd",
- "1st.OnTestCaseStart",
- "2nd.OnTestCaseStart",
- "ListenerTest::SetUpTestCase",
- "1st.OnTestStart",
- "2nd.OnTestStart",
- "ListenerTest::SetUp",
- "ListenerTest::* Test Body",
- "1st.OnTestPartResult",
- "2nd.OnTestPartResult",
- "ListenerTest::TearDown",
- "2nd.OnTestEnd",
- "1st.OnTestEnd",
- "1st.OnTestStart",
- "2nd.OnTestStart",
- "ListenerTest::SetUp",
- "ListenerTest::* Test Body",
- "1st.OnTestPartResult",
- "2nd.OnTestPartResult",
- "ListenerTest::TearDown",
- "2nd.OnTestEnd",
- "1st.OnTestEnd",
- "ListenerTest::TearDownTestCase",
- "2nd.OnTestCaseEnd",
- "1st.OnTestCaseEnd",
- "1st.OnEnvironmentsTearDownStart",
- "2nd.OnEnvironmentsTearDownStart",
- "Environment::TearDown",
- "2nd.OnEnvironmentsTearDownEnd",
- "1st.OnEnvironmentsTearDownEnd",
- "2nd.OnTestIterationEnd(0)",
- "1st.OnTestIterationEnd(0)",
- "1st.OnTestIterationStart(1)",
- "2nd.OnTestIterationStart(1)",
- "1st.OnEnvironmentsSetUpStart",
- "2nd.OnEnvironmentsSetUpStart",
- "Environment::SetUp",
- "2nd.OnEnvironmentsSetUpEnd",
- "1st.OnEnvironmentsSetUpEnd",
- "1st.OnTestCaseStart",
- "2nd.OnTestCaseStart",
- "ListenerTest::SetUpTestCase",
- "1st.OnTestStart",
- "2nd.OnTestStart",
- "ListenerTest::SetUp",
- "ListenerTest::* Test Body",
- "1st.OnTestPartResult",
- "2nd.OnTestPartResult",
- "ListenerTest::TearDown",
- "2nd.OnTestEnd",
- "1st.OnTestEnd",
- "1st.OnTestStart",
- "2nd.OnTestStart",
- "ListenerTest::SetUp",
- "ListenerTest::* Test Body",
- "1st.OnTestPartResult",
- "2nd.OnTestPartResult",
- "ListenerTest::TearDown",
- "2nd.OnTestEnd",
- "1st.OnTestEnd",
- "ListenerTest::TearDownTestCase",
- "2nd.OnTestCaseEnd",
- "1st.OnTestCaseEnd",
- "1st.OnEnvironmentsTearDownStart",
- "2nd.OnEnvironmentsTearDownStart",
- "Environment::TearDown",
- "2nd.OnEnvironmentsTearDownEnd",
- "1st.OnEnvironmentsTearDownEnd",
- "2nd.OnTestIterationEnd(1)",
- "1st.OnTestIterationEnd(1)",
- "2nd.OnTestProgramEnd",
- "1st.OnTestProgramEnd"
- };
- VerifyResults(events,
- expected_events,
- sizeof(expected_events)/sizeof(expected_events[0]));
-
- // We need to check manually for ad hoc test failures that happen after
- // RUN_ALL_TESTS finishes.
- if (UnitTest::GetInstance()->Failed())
- ret_val = 1;
-
- return ret_val;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-message_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-message_test.cc
deleted file mode 100644
index c09c6a836..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-message_test.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Tests for the Message class.
-
-#include "gtest/gtest-message.h"
-
-#include "gtest/gtest.h"
-
-namespace {
-
-using ::testing::Message;
-
-// A helper function that turns a Message into a C string.
-const char* ToCString(const Message& msg) {
- static testing::internal::String result;
- result = msg.GetString();
- return result.c_str();
-}
-
-// Tests the testing::Message class
-
-// Tests the default constructor.
-TEST(MessageTest, DefaultConstructor) {
- const Message msg;
- EXPECT_STREQ("", ToCString(msg));
-}
-
-// Tests the copy constructor.
-TEST(MessageTest, CopyConstructor) {
- const Message msg1("Hello");
- const Message msg2(msg1);
- EXPECT_STREQ("Hello", ToCString(msg2));
-}
-
-// Tests constructing a Message from a C-string.
-TEST(MessageTest, ConstructsFromCString) {
- Message msg("Hello");
- EXPECT_STREQ("Hello", ToCString(msg));
-}
-
-// Tests streaming a float.
-TEST(MessageTest, StreamsFloat) {
- const char* const s = ToCString(Message() << 1.23456F << " " << 2.34567F);
- // Both numbers should be printed with enough precision.
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "1.234560", s);
- EXPECT_PRED_FORMAT2(testing::IsSubstring, " 2.345669", s);
-}
-
-// Tests streaming a double.
-TEST(MessageTest, StreamsDouble) {
- const char* const s = ToCString(Message() << 1260570880.4555497 << " "
- << 1260572265.1954534);
- // Both numbers should be printed with enough precision.
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "1260570880.45", s);
- EXPECT_PRED_FORMAT2(testing::IsSubstring, " 1260572265.19", s);
-}
-
-// Tests streaming a non-char pointer.
-TEST(MessageTest, StreamsPointer) {
- int n = 0;
- int* p = &n;
- EXPECT_STRNE("(null)", ToCString(Message() << p));
-}
-
-// Tests streaming a NULL non-char pointer.
-TEST(MessageTest, StreamsNullPointer) {
- int* p = NULL;
- EXPECT_STREQ("(null)", ToCString(Message() << p));
-}
-
-// Tests streaming a C string.
-TEST(MessageTest, StreamsCString) {
- EXPECT_STREQ("Foo", ToCString(Message() << "Foo"));
-}
-
-// Tests streaming a NULL C string.
-TEST(MessageTest, StreamsNullCString) {
- char* p = NULL;
- EXPECT_STREQ("(null)", ToCString(Message() << p));
-}
-
-// Tests streaming std::string.
-TEST(MessageTest, StreamsString) {
- const ::std::string str("Hello");
- EXPECT_STREQ("Hello", ToCString(Message() << str));
-}
-
-// Tests that we can output strings containing embedded NULs.
-TEST(MessageTest, StreamsStringWithEmbeddedNUL) {
- const char char_array_with_nul[] =
- "Here's a NUL\0 and some more string";
- const ::std::string string_with_nul(char_array_with_nul,
- sizeof(char_array_with_nul) - 1);
- EXPECT_STREQ("Here's a NUL\\0 and some more string",
- ToCString(Message() << string_with_nul));
-}
-
-// Tests streaming a NUL char.
-TEST(MessageTest, StreamsNULChar) {
- EXPECT_STREQ("\\0", ToCString(Message() << '\0'));
-}
-
-// Tests streaming int.
-TEST(MessageTest, StreamsInt) {
- EXPECT_STREQ("123", ToCString(Message() << 123));
-}
-
-// Tests that basic IO manipulators (endl, ends, and flush) can be
-// streamed to Message.
-TEST(MessageTest, StreamsBasicIoManip) {
- EXPECT_STREQ("Line 1.\nA NUL char \\0 in line 2.",
- ToCString(Message() << "Line 1." << std::endl
- << "A NUL char " << std::ends << std::flush
- << " in line 2."));
-}
-
-// Tests Message::GetString()
-TEST(MessageTest, GetString) {
- Message msg;
- msg << 1 << " lamb";
- EXPECT_STREQ("1 lamb", msg.GetString().c_str());
-}
-
-// Tests streaming a Message object to an ostream.
-TEST(MessageTest, StreamsToOStream) {
- Message msg("Hello");
- ::std::stringstream ss;
- ss << msg;
- EXPECT_STREQ("Hello", testing::internal::StringStreamToString(&ss).c_str());
-}
-
-// Tests that a Message object doesn't take up too much stack space.
-TEST(MessageTest, DoesNotTakeUpMuchStackSpace) {
- EXPECT_LE(sizeof(Message), 16U);
-}
-
-} // namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-options_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-options_test.cc
deleted file mode 100644
index 9e98f3f05..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-options_test.cc
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: keith.ray@gmail.com (Keith Ray)
-//
-// Google Test UnitTestOptions tests
-//
-// This file tests classes and functions used internally by
-// Google Test. They are subject to change without notice.
-//
-// This file is #included from gtest.cc, to avoid changing build or
-// make-files on Windows and other platforms. Do not #include this file
-// anywhere else!
-
-#include "gtest/gtest.h"
-
-#if GTEST_OS_WINDOWS_MOBILE
-# include <windows.h>
-#elif GTEST_OS_WINDOWS
-# include <direct.h>
-#endif // GTEST_OS_WINDOWS_MOBILE
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-namespace internal {
-namespace {
-
-// Turns the given relative path into an absolute path.
-FilePath GetAbsolutePathOf(const FilePath& relative_path) {
- return FilePath::ConcatPaths(FilePath::GetCurrentDir(), relative_path);
-}
-
-// Testing UnitTestOptions::GetOutputFormat/GetOutputFile.
-
-TEST(XmlOutputTest, GetOutputFormatDefault) {
- GTEST_FLAG(output) = "";
- EXPECT_STREQ("", UnitTestOptions::GetOutputFormat().c_str());
-}
-
-TEST(XmlOutputTest, GetOutputFormat) {
- GTEST_FLAG(output) = "xml:filename";
- EXPECT_STREQ("xml", UnitTestOptions::GetOutputFormat().c_str());
-}
-
-TEST(XmlOutputTest, GetOutputFileDefault) {
- GTEST_FLAG(output) = "";
- EXPECT_STREQ(GetAbsolutePathOf(FilePath("test_detail.xml")).c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-}
-
-TEST(XmlOutputTest, GetOutputFileSingleFile) {
- GTEST_FLAG(output) = "xml:filename.abc";
- EXPECT_STREQ(GetAbsolutePathOf(FilePath("filename.abc")).c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-}
-
-TEST(XmlOutputTest, GetOutputFileFromDirectoryPath) {
- GTEST_FLAG(output) = "xml:path" GTEST_PATH_SEP_;
- const std::string expected_output_file =
- GetAbsolutePathOf(
- FilePath(std::string("path") + GTEST_PATH_SEP_ +
- GetCurrentExecutableName().c_str() + ".xml")).c_str();
- const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile();
-#if GTEST_OS_WINDOWS
- EXPECT_STRCASEEQ(expected_output_file.c_str(), output_file.c_str());
-#else
- EXPECT_EQ(expected_output_file, output_file.c_str());
-#endif
-}
-
-TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
- const std::string exe_str = GetCurrentExecutableName().c_str();
-#if GTEST_OS_WINDOWS
- const bool success =
- _strcmpi("gtest-options_test", exe_str.c_str()) == 0 ||
- _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
- _strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
- _strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
-#else
- // TODO(wan@google.com): remove the hard-coded "lt-" prefix when
- // Chandler Carruth's libtool replacement is ready.
- const bool success =
- exe_str == "gtest-options_test" ||
- exe_str == "gtest_all_test" ||
- exe_str == "lt-gtest_all_test" ||
- exe_str == "gtest_dll_test";
-#endif // GTEST_OS_WINDOWS
- if (!success)
- FAIL() << "GetCurrentExecutableName() returns " << exe_str;
-}
-
-class XmlOutputChangeDirTest : public Test {
- protected:
- virtual void SetUp() {
- original_working_dir_ = FilePath::GetCurrentDir();
- posix::ChDir("..");
- // This will make the test fail if run from the root directory.
- EXPECT_STRNE(original_working_dir_.c_str(),
- FilePath::GetCurrentDir().c_str());
- }
-
- virtual void TearDown() {
- posix::ChDir(original_working_dir_.c_str());
- }
-
- FilePath original_working_dir_;
-};
-
-TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefault) {
- GTEST_FLAG(output) = "";
- EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_,
- FilePath("test_detail.xml")).c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-}
-
-TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefaultXML) {
- GTEST_FLAG(output) = "xml";
- EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_,
- FilePath("test_detail.xml")).c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-}
-
-TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativeFile) {
- GTEST_FLAG(output) = "xml:filename.abc";
- EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_,
- FilePath("filename.abc")).c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-}
-
-TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativePath) {
- GTEST_FLAG(output) = "xml:path" GTEST_PATH_SEP_;
- const std::string expected_output_file =
- FilePath::ConcatPaths(
- original_working_dir_,
- FilePath(std::string("path") + GTEST_PATH_SEP_ +
- GetCurrentExecutableName().c_str() + ".xml")).c_str();
- const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile();
-#if GTEST_OS_WINDOWS
- EXPECT_STRCASEEQ(expected_output_file.c_str(), output_file.c_str());
-#else
- EXPECT_EQ(expected_output_file, output_file.c_str());
-#endif
-}
-
-TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsoluteFile) {
-#if GTEST_OS_WINDOWS
- GTEST_FLAG(output) = "xml:c:\\tmp\\filename.abc";
- EXPECT_STREQ(FilePath("c:\\tmp\\filename.abc").c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-#else
- GTEST_FLAG(output) ="xml:/tmp/filename.abc";
- EXPECT_STREQ(FilePath("/tmp/filename.abc").c_str(),
- UnitTestOptions::GetAbsolutePathToOutputFile().c_str());
-#endif
-}
-
-TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsolutePath) {
-#if GTEST_OS_WINDOWS
- const std::string path = "c:\\tmp\\";
-#else
- const std::string path = "/tmp/";
-#endif
-
- GTEST_FLAG(output) = "xml:" + path;
- const std::string expected_output_file =
- path + GetCurrentExecutableName().c_str() + ".xml";
- const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile();
-
-#if GTEST_OS_WINDOWS
- EXPECT_STRCASEEQ(expected_output_file.c_str(), output_file.c_str());
-#else
- EXPECT_EQ(expected_output_file, output_file.c_str());
-#endif
-}
-
-} // namespace
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test2_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test2_test.cc
deleted file mode 100644
index 4a782fe70..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test2_test.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-//
-// Tests for Google Test itself. This verifies that the basic constructs of
-// Google Test work.
-
-#include "gtest/gtest.h"
-
-#include "test/gtest-param-test_test.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-using ::testing::Values;
-using ::testing::internal::ParamGenerator;
-
-// Tests that generators defined in a different translation unit
-// are functional. The test using extern_gen is defined
-// in gtest-param-test_test.cc.
-ParamGenerator<int> extern_gen = Values(33);
-
-// Tests that a parameterized test case can be defined in one translation unit
-// and instantiated in another. The test is defined in gtest-param-test_test.cc
-// and ExternalInstantiationTest fixture class is defined in
-// gtest-param-test_test.h.
-INSTANTIATE_TEST_CASE_P(MultiplesOf33,
- ExternalInstantiationTest,
- Values(33, 66));
-
-// Tests that a parameterized test case can be instantiated
-// in multiple translation units. Another instantiation is defined
-// in gtest-param-test_test.cc and InstantiationInMultipleTranslaionUnitsTest
-// fixture is defined in gtest-param-test_test.h
-INSTANTIATE_TEST_CASE_P(Sequence2,
- InstantiationInMultipleTranslaionUnitsTest,
- Values(42*3, 42*4, 42*5));
-
-#endif // GTEST_HAS_PARAM_TEST
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.cc
deleted file mode 100644
index 94a53d9f2..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.cc
+++ /dev/null
@@ -1,895 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-//
-// Tests for Google Test itself. This file verifies that the parameter
-// generators objects produce correct parameter sequences and that
-// Google Test runtime instantiates correct tests from those sequences.
-
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-# include <algorithm>
-# include <iostream>
-# include <list>
-# include <sstream>
-# include <string>
-# include <vector>
-
-// To include gtest-internal-inl.h.
-# define GTEST_IMPLEMENTATION_ 1
-# include "src/gtest-internal-inl.h" // for UnitTestOptions
-# undef GTEST_IMPLEMENTATION_
-
-# include "test/gtest-param-test_test.h"
-
-using ::std::vector;
-using ::std::sort;
-
-using ::testing::AddGlobalTestEnvironment;
-using ::testing::Bool;
-using ::testing::Message;
-using ::testing::Range;
-using ::testing::TestWithParam;
-using ::testing::Values;
-using ::testing::ValuesIn;
-
-# if GTEST_HAS_COMBINE
-using ::testing::Combine;
-using ::std::tr1::get;
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-# endif // GTEST_HAS_COMBINE
-
-using ::testing::internal::ParamGenerator;
-using ::testing::internal::UnitTestOptions;
-
-// Prints a value to a string.
-//
-// TODO(wan@google.com): remove PrintValue() when we move matchers and
-// EXPECT_THAT() from Google Mock to Google Test. At that time, we
-// can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as
-// EXPECT_THAT() and the matchers know how to print tuples.
-template <typename T>
-::std::string PrintValue(const T& value) {
- ::std::stringstream stream;
- stream << value;
- return stream.str();
-}
-
-# if GTEST_HAS_COMBINE
-
-// These overloads allow printing tuples in our tests. We cannot
-// define an operator<< for tuples, as that definition needs to be in
-// the std namespace in order to be picked up by Google Test via
-// Argument-Dependent Lookup, yet defining anything in the std
-// namespace in non-STL code is undefined behavior.
-
-template <typename T1, typename T2>
-::std::string PrintValue(const tuple<T1, T2>& value) {
- ::std::stringstream stream;
- stream << "(" << get<0>(value) << ", " << get<1>(value) << ")";
- return stream.str();
-}
-
-template <typename T1, typename T2, typename T3>
-::std::string PrintValue(const tuple<T1, T2, T3>& value) {
- ::std::stringstream stream;
- stream << "(" << get<0>(value) << ", " << get<1>(value)
- << ", "<< get<2>(value) << ")";
- return stream.str();
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-::std::string PrintValue(
- const tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& value) {
- ::std::stringstream stream;
- stream << "(" << get<0>(value) << ", " << get<1>(value)
- << ", "<< get<2>(value) << ", " << get<3>(value)
- << ", "<< get<4>(value) << ", " << get<5>(value)
- << ", "<< get<6>(value) << ", " << get<7>(value)
- << ", "<< get<8>(value) << ", " << get<9>(value) << ")";
- return stream.str();
-}
-
-# endif // GTEST_HAS_COMBINE
-
-// Verifies that a sequence generated by the generator and accessed
-// via the iterator object matches the expected one using Google Test
-// assertions.
-template <typename T, size_t N>
-void VerifyGenerator(const ParamGenerator<T>& generator,
- const T (&expected_values)[N]) {
- typename ParamGenerator<T>::iterator it = generator.begin();
- for (size_t i = 0; i < N; ++i) {
- ASSERT_FALSE(it == generator.end())
- << "At element " << i << " when accessing via an iterator "
- << "created with the copy constructor.\n";
- // We cannot use EXPECT_EQ() here as the values may be tuples,
- // which don't support <<.
- EXPECT_TRUE(expected_values[i] == *it)
- << "where i is " << i
- << ", expected_values[i] is " << PrintValue(expected_values[i])
- << ", *it is " << PrintValue(*it)
- << ", and 'it' is an iterator created with the copy constructor.\n";
- it++;
- }
- EXPECT_TRUE(it == generator.end())
- << "At the presumed end of sequence when accessing via an iterator "
- << "created with the copy constructor.\n";
-
- // Test the iterator assignment. The following lines verify that
- // the sequence accessed via an iterator initialized via the
- // assignment operator (as opposed to a copy constructor) matches
- // just the same.
- it = generator.begin();
- for (size_t i = 0; i < N; ++i) {
- ASSERT_FALSE(it == generator.end())
- << "At element " << i << " when accessing via an iterator "
- << "created with the assignment operator.\n";
- EXPECT_TRUE(expected_values[i] == *it)
- << "where i is " << i
- << ", expected_values[i] is " << PrintValue(expected_values[i])
- << ", *it is " << PrintValue(*it)
- << ", and 'it' is an iterator created with the copy constructor.\n";
- it++;
- }
- EXPECT_TRUE(it == generator.end())
- << "At the presumed end of sequence when accessing via an iterator "
- << "created with the assignment operator.\n";
-}
-
-template <typename T>
-void VerifyGeneratorIsEmpty(const ParamGenerator<T>& generator) {
- typename ParamGenerator<T>::iterator it = generator.begin();
- EXPECT_TRUE(it == generator.end());
-
- it = generator.begin();
- EXPECT_TRUE(it == generator.end());
-}
-
-// Generator tests. They test that each of the provided generator functions
-// generates an expected sequence of values. The general test pattern
-// instantiates a generator using one of the generator functions,
-// checks the sequence produced by the generator using its iterator API,
-// and then resets the iterator back to the beginning of the sequence
-// and checks the sequence again.
-
-// Tests that iterators produced by generator functions conform to the
-// ForwardIterator concept.
-TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) {
- const ParamGenerator<int> gen = Range(0, 10);
- ParamGenerator<int>::iterator it = gen.begin();
-
- // Verifies that iterator initialization works as expected.
- ParamGenerator<int>::iterator it2 = it;
- EXPECT_TRUE(*it == *it2) << "Initialized iterators must point to the "
- << "element same as its source points to";
-
- // Verifies that iterator assignment works as expected.
- it++;
- EXPECT_FALSE(*it == *it2);
- it2 = it;
- EXPECT_TRUE(*it == *it2) << "Assigned iterators must point to the "
- << "element same as its source points to";
-
- // Verifies that prefix operator++() returns *this.
- EXPECT_EQ(&it, &(++it)) << "Result of the prefix operator++ must be "
- << "refer to the original object";
-
- // Verifies that the result of the postfix operator++ points to the value
- // pointed to by the original iterator.
- int original_value = *it; // Have to compute it outside of macro call to be
- // unaffected by the parameter evaluation order.
- EXPECT_EQ(original_value, *(it++));
-
- // Verifies that prefix and postfix operator++() advance an iterator
- // all the same.
- it2 = it;
- it++;
- ++it2;
- EXPECT_TRUE(*it == *it2);
-}
-
-// Tests that Range() generates the expected sequence.
-TEST(RangeTest, IntRangeWithDefaultStep) {
- const ParamGenerator<int> gen = Range(0, 3);
- const int expected_values[] = {0, 1, 2};
- VerifyGenerator(gen, expected_values);
-}
-
-// Edge case. Tests that Range() generates the single element sequence
-// as expected when provided with range limits that are equal.
-TEST(RangeTest, IntRangeSingleValue) {
- const ParamGenerator<int> gen = Range(0, 1);
- const int expected_values[] = {0};
- VerifyGenerator(gen, expected_values);
-}
-
-// Edge case. Tests that Range() with generates empty sequence when
-// supplied with an empty range.
-TEST(RangeTest, IntRangeEmpty) {
- const ParamGenerator<int> gen = Range(0, 0);
- VerifyGeneratorIsEmpty(gen);
-}
-
-// Tests that Range() with custom step (greater then one) generates
-// the expected sequence.
-TEST(RangeTest, IntRangeWithCustomStep) {
- const ParamGenerator<int> gen = Range(0, 9, 3);
- const int expected_values[] = {0, 3, 6};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that Range() with custom step (greater then one) generates
-// the expected sequence when the last element does not fall on the
-// upper range limit. Sequences generated by Range() must not have
-// elements beyond the range limits.
-TEST(RangeTest, IntRangeWithCustomStepOverUpperBound) {
- const ParamGenerator<int> gen = Range(0, 4, 3);
- const int expected_values[] = {0, 3};
- VerifyGenerator(gen, expected_values);
-}
-
-// Verifies that Range works with user-defined types that define
-// copy constructor, operator=(), operator+(), and operator<().
-class DogAdder {
- public:
- explicit DogAdder(const char* a_value) : value_(a_value) {}
- DogAdder(const DogAdder& other) : value_(other.value_.c_str()) {}
-
- DogAdder operator=(const DogAdder& other) {
- if (this != &other)
- value_ = other.value_;
- return *this;
- }
- DogAdder operator+(const DogAdder& other) const {
- Message msg;
- msg << value_.c_str() << other.value_.c_str();
- return DogAdder(msg.GetString().c_str());
- }
- bool operator<(const DogAdder& other) const {
- return value_ < other.value_;
- }
- const ::testing::internal::String& value() const { return value_; }
-
- private:
- ::testing::internal::String value_;
-};
-
-TEST(RangeTest, WorksWithACustomType) {
- const ParamGenerator<DogAdder> gen =
- Range(DogAdder("cat"), DogAdder("catdogdog"), DogAdder("dog"));
- ParamGenerator<DogAdder>::iterator it = gen.begin();
-
- ASSERT_FALSE(it == gen.end());
- EXPECT_STREQ("cat", it->value().c_str());
-
- ASSERT_FALSE(++it == gen.end());
- EXPECT_STREQ("catdog", it->value().c_str());
-
- EXPECT_TRUE(++it == gen.end());
-}
-
-class IntWrapper {
- public:
- explicit IntWrapper(int a_value) : value_(a_value) {}
- IntWrapper(const IntWrapper& other) : value_(other.value_) {}
-
- IntWrapper operator=(const IntWrapper& other) {
- value_ = other.value_;
- return *this;
- }
- // operator+() adds a different type.
- IntWrapper operator+(int other) const { return IntWrapper(value_ + other); }
- bool operator<(const IntWrapper& other) const {
- return value_ < other.value_;
- }
- int value() const { return value_; }
-
- private:
- int value_;
-};
-
-TEST(RangeTest, WorksWithACustomTypeWithDifferentIncrementType) {
- const ParamGenerator<IntWrapper> gen = Range(IntWrapper(0), IntWrapper(2));
- ParamGenerator<IntWrapper>::iterator it = gen.begin();
-
- ASSERT_FALSE(it == gen.end());
- EXPECT_EQ(0, it->value());
-
- ASSERT_FALSE(++it == gen.end());
- EXPECT_EQ(1, it->value());
-
- EXPECT_TRUE(++it == gen.end());
-}
-
-// Tests that ValuesIn() with an array parameter generates
-// the expected sequence.
-TEST(ValuesInTest, ValuesInArray) {
- int array[] = {3, 5, 8};
- const ParamGenerator<int> gen = ValuesIn(array);
- VerifyGenerator(gen, array);
-}
-
-// Tests that ValuesIn() with a const array parameter generates
-// the expected sequence.
-TEST(ValuesInTest, ValuesInConstArray) {
- const int array[] = {3, 5, 8};
- const ParamGenerator<int> gen = ValuesIn(array);
- VerifyGenerator(gen, array);
-}
-
-// Edge case. Tests that ValuesIn() with an array parameter containing a
-// single element generates the single element sequence.
-TEST(ValuesInTest, ValuesInSingleElementArray) {
- int array[] = {42};
- const ParamGenerator<int> gen = ValuesIn(array);
- VerifyGenerator(gen, array);
-}
-
-// Tests that ValuesIn() generates the expected sequence for an STL
-// container (vector).
-TEST(ValuesInTest, ValuesInVector) {
- typedef ::std::vector<int> ContainerType;
- ContainerType values;
- values.push_back(3);
- values.push_back(5);
- values.push_back(8);
- const ParamGenerator<int> gen = ValuesIn(values);
-
- const int expected_values[] = {3, 5, 8};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that ValuesIn() generates the expected sequence.
-TEST(ValuesInTest, ValuesInIteratorRange) {
- typedef ::std::vector<int> ContainerType;
- ContainerType values;
- values.push_back(3);
- values.push_back(5);
- values.push_back(8);
- const ParamGenerator<int> gen = ValuesIn(values.begin(), values.end());
-
- const int expected_values[] = {3, 5, 8};
- VerifyGenerator(gen, expected_values);
-}
-
-// Edge case. Tests that ValuesIn() provided with an iterator range specifying a
-// single value generates a single-element sequence.
-TEST(ValuesInTest, ValuesInSingleElementIteratorRange) {
- typedef ::std::vector<int> ContainerType;
- ContainerType values;
- values.push_back(42);
- const ParamGenerator<int> gen = ValuesIn(values.begin(), values.end());
-
- const int expected_values[] = {42};
- VerifyGenerator(gen, expected_values);
-}
-
-// Edge case. Tests that ValuesIn() provided with an empty iterator range
-// generates an empty sequence.
-TEST(ValuesInTest, ValuesInEmptyIteratorRange) {
- typedef ::std::vector<int> ContainerType;
- ContainerType values;
- const ParamGenerator<int> gen = ValuesIn(values.begin(), values.end());
-
- VerifyGeneratorIsEmpty(gen);
-}
-
-// Tests that the Values() generates the expected sequence.
-TEST(ValuesTest, ValuesWorks) {
- const ParamGenerator<int> gen = Values(3, 5, 8);
-
- const int expected_values[] = {3, 5, 8};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that Values() generates the expected sequences from elements of
-// different types convertible to ParamGenerator's parameter type.
-TEST(ValuesTest, ValuesWorksForValuesOfCompatibleTypes) {
- const ParamGenerator<double> gen = Values(3, 5.0f, 8.0);
-
- const double expected_values[] = {3.0, 5.0, 8.0};
- VerifyGenerator(gen, expected_values);
-}
-
-TEST(ValuesTest, ValuesWorksForMaxLengthList) {
- const ParamGenerator<int> gen = Values(
- 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
- 110, 120, 130, 140, 150, 160, 170, 180, 190, 200,
- 210, 220, 230, 240, 250, 260, 270, 280, 290, 300,
- 310, 320, 330, 340, 350, 360, 370, 380, 390, 400,
- 410, 420, 430, 440, 450, 460, 470, 480, 490, 500);
-
- const int expected_values[] = {
- 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
- 110, 120, 130, 140, 150, 160, 170, 180, 190, 200,
- 210, 220, 230, 240, 250, 260, 270, 280, 290, 300,
- 310, 320, 330, 340, 350, 360, 370, 380, 390, 400,
- 410, 420, 430, 440, 450, 460, 470, 480, 490, 500};
- VerifyGenerator(gen, expected_values);
-}
-
-// Edge case test. Tests that single-parameter Values() generates the sequence
-// with the single value.
-TEST(ValuesTest, ValuesWithSingleParameter) {
- const ParamGenerator<int> gen = Values(42);
-
- const int expected_values[] = {42};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that Bool() generates sequence (false, true).
-TEST(BoolTest, BoolWorks) {
- const ParamGenerator<bool> gen = Bool();
-
- const bool expected_values[] = {false, true};
- VerifyGenerator(gen, expected_values);
-}
-
-# if GTEST_HAS_COMBINE
-
-// Tests that Combine() with two parameters generates the expected sequence.
-TEST(CombineTest, CombineWithTwoParameters) {
- const char* foo = "foo";
- const char* bar = "bar";
- const ParamGenerator<tuple<const char*, int> > gen =
- Combine(Values(foo, bar), Values(3, 4));
-
- tuple<const char*, int> expected_values[] = {
- make_tuple(foo, 3), make_tuple(foo, 4),
- make_tuple(bar, 3), make_tuple(bar, 4)};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that Combine() with three parameters generates the expected sequence.
-TEST(CombineTest, CombineWithThreeParameters) {
- const ParamGenerator<tuple<int, int, int> > gen = Combine(Values(0, 1),
- Values(3, 4),
- Values(5, 6));
- tuple<int, int, int> expected_values[] = {
- make_tuple(0, 3, 5), make_tuple(0, 3, 6),
- make_tuple(0, 4, 5), make_tuple(0, 4, 6),
- make_tuple(1, 3, 5), make_tuple(1, 3, 6),
- make_tuple(1, 4, 5), make_tuple(1, 4, 6)};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that the Combine() with the first parameter generating a single value
-// sequence generates a sequence with the number of elements equal to the
-// number of elements in the sequence generated by the second parameter.
-TEST(CombineTest, CombineWithFirstParameterSingleValue) {
- const ParamGenerator<tuple<int, int> > gen = Combine(Values(42),
- Values(0, 1));
-
- tuple<int, int> expected_values[] = {make_tuple(42, 0), make_tuple(42, 1)};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that the Combine() with the second parameter generating a single value
-// sequence generates a sequence with the number of elements equal to the
-// number of elements in the sequence generated by the first parameter.
-TEST(CombineTest, CombineWithSecondParameterSingleValue) {
- const ParamGenerator<tuple<int, int> > gen = Combine(Values(0, 1),
- Values(42));
-
- tuple<int, int> expected_values[] = {make_tuple(0, 42), make_tuple(1, 42)};
- VerifyGenerator(gen, expected_values);
-}
-
-// Tests that when the first parameter produces an empty sequence,
-// Combine() produces an empty sequence, too.
-TEST(CombineTest, CombineWithFirstParameterEmptyRange) {
- const ParamGenerator<tuple<int, int> > gen = Combine(Range(0, 0),
- Values(0, 1));
- VerifyGeneratorIsEmpty(gen);
-}
-
-// Tests that when the second parameter produces an empty sequence,
-// Combine() produces an empty sequence, too.
-TEST(CombineTest, CombineWithSecondParameterEmptyRange) {
- const ParamGenerator<tuple<int, int> > gen = Combine(Values(0, 1),
- Range(1, 1));
- VerifyGeneratorIsEmpty(gen);
-}
-
-// Edge case. Tests that combine works with the maximum number
-// of parameters supported by Google Test (currently 10).
-TEST(CombineTest, CombineWithMaxNumberOfParameters) {
- const char* foo = "foo";
- const char* bar = "bar";
- const ParamGenerator<tuple<const char*, int, int, int, int, int, int, int,
- int, int> > gen = Combine(Values(foo, bar),
- Values(1), Values(2),
- Values(3), Values(4),
- Values(5), Values(6),
- Values(7), Values(8),
- Values(9));
-
- tuple<const char*, int, int, int, int, int, int, int, int, int>
- expected_values[] = {make_tuple(foo, 1, 2, 3, 4, 5, 6, 7, 8, 9),
- make_tuple(bar, 1, 2, 3, 4, 5, 6, 7, 8, 9)};
- VerifyGenerator(gen, expected_values);
-}
-
-# endif // GTEST_HAS_COMBINE
-
-// Tests that an generator produces correct sequence after being
-// assigned from another generator.
-TEST(ParamGeneratorTest, AssignmentWorks) {
- ParamGenerator<int> gen = Values(1, 2);
- const ParamGenerator<int> gen2 = Values(3, 4);
- gen = gen2;
-
- const int expected_values[] = {3, 4};
- VerifyGenerator(gen, expected_values);
-}
-
-// This test verifies that the tests are expanded and run as specified:
-// one test per element from the sequence produced by the generator
-// specified in INSTANTIATE_TEST_CASE_P. It also verifies that the test's
-// fixture constructor, SetUp(), and TearDown() have run and have been
-// supplied with the correct parameters.
-
-// The use of environment object allows detection of the case where no test
-// case functionality is run at all. In this case TestCaseTearDown will not
-// be able to detect missing tests, naturally.
-template <int kExpectedCalls>
-class TestGenerationEnvironment : public ::testing::Environment {
- public:
- static TestGenerationEnvironment* Instance() {
- static TestGenerationEnvironment* instance = new TestGenerationEnvironment;
- return instance;
- }
-
- void FixtureConstructorExecuted() { fixture_constructor_count_++; }
- void SetUpExecuted() { set_up_count_++; }
- void TearDownExecuted() { tear_down_count_++; }
- void TestBodyExecuted() { test_body_count_++; }
-
- virtual void TearDown() {
- // If all MultipleTestGenerationTest tests have been de-selected
- // by the filter flag, the following checks make no sense.
- bool perform_check = false;
-
- for (int i = 0; i < kExpectedCalls; ++i) {
- Message msg;
- msg << "TestsExpandedAndRun/" << i;
- if (UnitTestOptions::FilterMatchesTest(
- "TestExpansionModule/MultipleTestGenerationTest",
- msg.GetString().c_str())) {
- perform_check = true;
- }
- }
- if (perform_check) {
- EXPECT_EQ(kExpectedCalls, fixture_constructor_count_)
- << "Fixture constructor of ParamTestGenerationTest test case "
- << "has not been run as expected.";
- EXPECT_EQ(kExpectedCalls, set_up_count_)
- << "Fixture SetUp method of ParamTestGenerationTest test case "
- << "has not been run as expected.";
- EXPECT_EQ(kExpectedCalls, tear_down_count_)
- << "Fixture TearDown method of ParamTestGenerationTest test case "
- << "has not been run as expected.";
- EXPECT_EQ(kExpectedCalls, test_body_count_)
- << "Test in ParamTestGenerationTest test case "
- << "has not been run as expected.";
- }
- }
- private:
- TestGenerationEnvironment() : fixture_constructor_count_(0), set_up_count_(0),
- tear_down_count_(0), test_body_count_(0) {}
-
- int fixture_constructor_count_;
- int set_up_count_;
- int tear_down_count_;
- int test_body_count_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationEnvironment);
-};
-
-const int test_generation_params[] = {36, 42, 72};
-
-class TestGenerationTest : public TestWithParam<int> {
- public:
- enum {
- PARAMETER_COUNT =
- sizeof(test_generation_params)/sizeof(test_generation_params[0])
- };
-
- typedef TestGenerationEnvironment<PARAMETER_COUNT> Environment;
-
- TestGenerationTest() {
- Environment::Instance()->FixtureConstructorExecuted();
- current_parameter_ = GetParam();
- }
- virtual void SetUp() {
- Environment::Instance()->SetUpExecuted();
- EXPECT_EQ(current_parameter_, GetParam());
- }
- virtual void TearDown() {
- Environment::Instance()->TearDownExecuted();
- EXPECT_EQ(current_parameter_, GetParam());
- }
-
- static void SetUpTestCase() {
- bool all_tests_in_test_case_selected = true;
-
- for (int i = 0; i < PARAMETER_COUNT; ++i) {
- Message test_name;
- test_name << "TestsExpandedAndRun/" << i;
- if ( !UnitTestOptions::FilterMatchesTest(
- "TestExpansionModule/MultipleTestGenerationTest",
- test_name.GetString())) {
- all_tests_in_test_case_selected = false;
- }
- }
- EXPECT_TRUE(all_tests_in_test_case_selected)
- << "When running the TestGenerationTest test case all of its tests\n"
- << "must be selected by the filter flag for the test case to pass.\n"
- << "If not all of them are enabled, we can't reliably conclude\n"
- << "that the correct number of tests have been generated.";
-
- collected_parameters_.clear();
- }
-
- static void TearDownTestCase() {
- vector<int> expected_values(test_generation_params,
- test_generation_params + PARAMETER_COUNT);
- // Test execution order is not guaranteed by Google Test,
- // so the order of values in collected_parameters_ can be
- // different and we have to sort to compare.
- sort(expected_values.begin(), expected_values.end());
- sort(collected_parameters_.begin(), collected_parameters_.end());
-
- EXPECT_TRUE(collected_parameters_ == expected_values);
- }
- protected:
- int current_parameter_;
- static vector<int> collected_parameters_;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationTest);
-};
-vector<int> TestGenerationTest::collected_parameters_;
-
-TEST_P(TestGenerationTest, TestsExpandedAndRun) {
- Environment::Instance()->TestBodyExecuted();
- EXPECT_EQ(current_parameter_, GetParam());
- collected_parameters_.push_back(GetParam());
-}
-INSTANTIATE_TEST_CASE_P(TestExpansionModule, TestGenerationTest,
- ValuesIn(test_generation_params));
-
-// This test verifies that the element sequence (third parameter of
-// INSTANTIATE_TEST_CASE_P) is evaluated in InitGoogleTest() and neither at
-// the call site of INSTANTIATE_TEST_CASE_P nor in RUN_ALL_TESTS(). For
-// that, we declare param_value_ to be a static member of
-// GeneratorEvaluationTest and initialize it to 0. We set it to 1 in
-// main(), just before invocation of InitGoogleTest(). After calling
-// InitGoogleTest(), we set the value to 2. If the sequence is evaluated
-// before or after InitGoogleTest, INSTANTIATE_TEST_CASE_P will create a
-// test with parameter other than 1, and the test body will fail the
-// assertion.
-class GeneratorEvaluationTest : public TestWithParam<int> {
- public:
- static int param_value() { return param_value_; }
- static void set_param_value(int param_value) { param_value_ = param_value; }
-
- private:
- static int param_value_;
-};
-int GeneratorEvaluationTest::param_value_ = 0;
-
-TEST_P(GeneratorEvaluationTest, GeneratorsEvaluatedInMain) {
- EXPECT_EQ(1, GetParam());
-}
-INSTANTIATE_TEST_CASE_P(GenEvalModule,
- GeneratorEvaluationTest,
- Values(GeneratorEvaluationTest::param_value()));
-
-// Tests that generators defined in a different translation unit are
-// functional. Generator extern_gen is defined in gtest-param-test_test2.cc.
-extern ParamGenerator<int> extern_gen;
-class ExternalGeneratorTest : public TestWithParam<int> {};
-TEST_P(ExternalGeneratorTest, ExternalGenerator) {
- // Sequence produced by extern_gen contains only a single value
- // which we verify here.
- EXPECT_EQ(GetParam(), 33);
-}
-INSTANTIATE_TEST_CASE_P(ExternalGeneratorModule,
- ExternalGeneratorTest,
- extern_gen);
-
-// Tests that a parameterized test case can be defined in one translation
-// unit and instantiated in another. This test will be instantiated in
-// gtest-param-test_test2.cc. ExternalInstantiationTest fixture class is
-// defined in gtest-param-test_test.h.
-TEST_P(ExternalInstantiationTest, IsMultipleOf33) {
- EXPECT_EQ(0, GetParam() % 33);
-}
-
-// Tests that a parameterized test case can be instantiated with multiple
-// generators.
-class MultipleInstantiationTest : public TestWithParam<int> {};
-TEST_P(MultipleInstantiationTest, AllowsMultipleInstances) {
-}
-INSTANTIATE_TEST_CASE_P(Sequence1, MultipleInstantiationTest, Values(1, 2));
-INSTANTIATE_TEST_CASE_P(Sequence2, MultipleInstantiationTest, Range(3, 5));
-
-// Tests that a parameterized test case can be instantiated
-// in multiple translation units. This test will be instantiated
-// here and in gtest-param-test_test2.cc.
-// InstantiationInMultipleTranslationUnitsTest fixture class
-// is defined in gtest-param-test_test.h.
-TEST_P(InstantiationInMultipleTranslaionUnitsTest, IsMultipleOf42) {
- EXPECT_EQ(0, GetParam() % 42);
-}
-INSTANTIATE_TEST_CASE_P(Sequence1,
- InstantiationInMultipleTranslaionUnitsTest,
- Values(42, 42*2));
-
-// Tests that each iteration of parameterized test runs in a separate test
-// object.
-class SeparateInstanceTest : public TestWithParam<int> {
- public:
- SeparateInstanceTest() : count_(0) {}
-
- static void TearDownTestCase() {
- EXPECT_GE(global_count_, 2)
- << "If some (but not all) SeparateInstanceTest tests have been "
- << "filtered out this test will fail. Make sure that all "
- << "GeneratorEvaluationTest are selected or de-selected together "
- << "by the test filter.";
- }
-
- protected:
- int count_;
- static int global_count_;
-};
-int SeparateInstanceTest::global_count_ = 0;
-
-TEST_P(SeparateInstanceTest, TestsRunInSeparateInstances) {
- EXPECT_EQ(0, count_++);
- global_count_++;
-}
-INSTANTIATE_TEST_CASE_P(FourElemSequence, SeparateInstanceTest, Range(1, 4));
-
-// Tests that all instantiations of a test have named appropriately. Test
-// defined with TEST_P(TestCaseName, TestName) and instantiated with
-// INSTANTIATE_TEST_CASE_P(SequenceName, TestCaseName, generator) must be named
-// SequenceName/TestCaseName.TestName/i, where i is the 0-based index of the
-// sequence element used to instantiate the test.
-class NamingTest : public TestWithParam<int> {};
-
-TEST_P(NamingTest, TestsReportCorrectNamesAndParameters) {
- const ::testing::TestInfo* const test_info =
- ::testing::UnitTest::GetInstance()->current_test_info();
-
- EXPECT_STREQ("ZeroToFiveSequence/NamingTest", test_info->test_case_name());
-
- Message index_stream;
- index_stream << "TestsReportCorrectNamesAndParameters/" << GetParam();
- EXPECT_STREQ(index_stream.GetString().c_str(), test_info->name());
-
- EXPECT_EQ(::testing::PrintToString(GetParam()), test_info->value_param());
-}
-
-INSTANTIATE_TEST_CASE_P(ZeroToFiveSequence, NamingTest, Range(0, 5));
-
-// Class that cannot be streamed into an ostream. It needs to be copyable
-// (and, in case of MSVC, also assignable) in order to be a test parameter
-// type. Its default copy constructor and assignment operator do exactly
-// what we need.
-class Unstreamable {
- public:
- explicit Unstreamable(int value) : value_(value) {}
-
- private:
- int value_;
-};
-
-class CommentTest : public TestWithParam<Unstreamable> {};
-
-TEST_P(CommentTest, TestsCorrectlyReportUnstreamableParams) {
- const ::testing::TestInfo* const test_info =
- ::testing::UnitTest::GetInstance()->current_test_info();
-
- EXPECT_EQ(::testing::PrintToString(GetParam()), test_info->value_param());
-}
-
-INSTANTIATE_TEST_CASE_P(InstantiationWithComments,
- CommentTest,
- Values(Unstreamable(1)));
-
-// Verify that we can create a hierarchy of test fixtures, where the base
-// class fixture is not parameterized and the derived class is. In this case
-// ParameterizedDerivedTest inherits from NonParameterizedBaseTest. We
-// perform simple tests on both.
-class NonParameterizedBaseTest : public ::testing::Test {
- public:
- NonParameterizedBaseTest() : n_(17) { }
- protected:
- int n_;
-};
-
-class ParameterizedDerivedTest : public NonParameterizedBaseTest,
- public ::testing::WithParamInterface<int> {
- protected:
- ParameterizedDerivedTest() : count_(0) { }
- int count_;
- static int global_count_;
-};
-
-int ParameterizedDerivedTest::global_count_ = 0;
-
-TEST_F(NonParameterizedBaseTest, FixtureIsInitialized) {
- EXPECT_EQ(17, n_);
-}
-
-TEST_P(ParameterizedDerivedTest, SeesSequence) {
- EXPECT_EQ(17, n_);
- EXPECT_EQ(0, count_++);
- EXPECT_EQ(GetParam(), global_count_++);
-}
-
-INSTANTIATE_TEST_CASE_P(RangeZeroToFive, ParameterizedDerivedTest, Range(0, 5));
-
-#endif // GTEST_HAS_PARAM_TEST
-
-TEST(CompileTest, CombineIsDefinedOnlyWhenGtestHasParamTestIsDefined) {
-#if GTEST_HAS_COMBINE && !GTEST_HAS_PARAM_TEST
- FAIL() << "GTEST_HAS_COMBINE is defined while GTEST_HAS_PARAM_TEST is not\n"
-#endif
-}
-
-int main(int argc, char **argv) {
-#if GTEST_HAS_PARAM_TEST
- // Used in TestGenerationTest test case.
- AddGlobalTestEnvironment(TestGenerationTest::Environment::Instance());
- // Used in GeneratorEvaluationTest test case. Tests that the updated value
- // will be picked up for instantiating tests in GeneratorEvaluationTest.
- GeneratorEvaluationTest::set_param_value(1);
-#endif // GTEST_HAS_PARAM_TEST
-
- ::testing::InitGoogleTest(&argc, argv);
-
-#if GTEST_HAS_PARAM_TEST
- // Used in GeneratorEvaluationTest test case. Tests that value updated
- // here will NOT be used for instantiating tests in
- // GeneratorEvaluationTest.
- GeneratorEvaluationTest::set_param_value(2);
-#endif // GTEST_HAS_PARAM_TEST
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.h
deleted file mode 100644
index d0f6556b0..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-param-test_test.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: vladl@google.com (Vlad Losev)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This header file provides classes and functions used internally
-// for testing Google Test itself.
-
-#ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
-#define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
-
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_PARAM_TEST
-
-// Test fixture for testing definition and instantiation of a test
-// in separate translation units.
-class ExternalInstantiationTest : public ::testing::TestWithParam<int> {};
-
-// Test fixture for testing instantiation of a test in multiple
-// translation units.
-class InstantiationInMultipleTranslaionUnitsTest
- : public ::testing::TestWithParam<int> {};
-
-#endif // GTEST_HAS_PARAM_TEST
-
-#endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-port_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-port_test.cc
deleted file mode 100644
index 1c6e2b097..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-port_test.cc
+++ /dev/null
@@ -1,1206 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: vladl@google.com (Vlad Losev), wan@google.com (Zhanyong Wan)
-//
-// This file tests the internal cross-platform support utilities.
-
-#include "gtest/internal/gtest-port.h"
-
-#include <stdio.h>
-
-#if GTEST_OS_MAC
-# include <time.h>
-#endif // GTEST_OS_MAC
-
-#include <list>
-#include <utility> // For std::pair and std::make_pair.
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-using std::make_pair;
-using std::pair;
-
-namespace testing {
-namespace internal {
-
-class Base {
- public:
- // Copy constructor and assignment operator do exactly what we need, so we
- // use them.
- Base() : member_(0) {}
- explicit Base(int n) : member_(n) {}
- virtual ~Base() {}
- int member() { return member_; }
-
- private:
- int member_;
-};
-
-class Derived : public Base {
- public:
- explicit Derived(int n) : Base(n) {}
-};
-
-TEST(ImplicitCastTest, ConvertsPointers) {
- Derived derived(0);
- EXPECT_TRUE(&derived == ::testing::internal::ImplicitCast_<Base*>(&derived));
-}
-
-TEST(ImplicitCastTest, CanUseInheritance) {
- Derived derived(1);
- Base base = ::testing::internal::ImplicitCast_<Base>(derived);
- EXPECT_EQ(derived.member(), base.member());
-}
-
-class Castable {
- public:
- Castable(bool* converted) : converted_(converted) {}
- operator Base() {
- *converted_ = true;
- return Base();
- }
-
- private:
- bool* converted_;
-};
-
-TEST(ImplicitCastTest, CanUseNonConstCastOperator) {
- bool converted = false;
- Castable castable(&converted);
- Base base = ::testing::internal::ImplicitCast_<Base>(castable);
- EXPECT_TRUE(converted);
-}
-
-class ConstCastable {
- public:
- ConstCastable(bool* converted) : converted_(converted) {}
- operator Base() const {
- *converted_ = true;
- return Base();
- }
-
- private:
- bool* converted_;
-};
-
-TEST(ImplicitCastTest, CanUseConstCastOperatorOnConstValues) {
- bool converted = false;
- const ConstCastable const_castable(&converted);
- Base base = ::testing::internal::ImplicitCast_<Base>(const_castable);
- EXPECT_TRUE(converted);
-}
-
-class ConstAndNonConstCastable {
- public:
- ConstAndNonConstCastable(bool* converted, bool* const_converted)
- : converted_(converted), const_converted_(const_converted) {}
- operator Base() {
- *converted_ = true;
- return Base();
- }
- operator Base() const {
- *const_converted_ = true;
- return Base();
- }
-
- private:
- bool* converted_;
- bool* const_converted_;
-};
-
-TEST(ImplicitCastTest, CanSelectBetweenConstAndNonConstCasrAppropriately) {
- bool converted = false;
- bool const_converted = false;
- ConstAndNonConstCastable castable(&converted, &const_converted);
- Base base = ::testing::internal::ImplicitCast_<Base>(castable);
- EXPECT_TRUE(converted);
- EXPECT_FALSE(const_converted);
-
- converted = false;
- const_converted = false;
- const ConstAndNonConstCastable const_castable(&converted, &const_converted);
- base = ::testing::internal::ImplicitCast_<Base>(const_castable);
- EXPECT_FALSE(converted);
- EXPECT_TRUE(const_converted);
-}
-
-class To {
- public:
- To(bool* converted) { *converted = true; } // NOLINT
-};
-
-TEST(ImplicitCastTest, CanUseImplicitConstructor) {
- bool converted = false;
- To to = ::testing::internal::ImplicitCast_<To>(&converted);
- (void)to;
- EXPECT_TRUE(converted);
-}
-
-TEST(IteratorTraitsTest, WorksForSTLContainerIterators) {
- StaticAssertTypeEq<int,
- IteratorTraits< ::std::vector<int>::const_iterator>::value_type>();
- StaticAssertTypeEq<bool,
- IteratorTraits< ::std::list<bool>::iterator>::value_type>();
-}
-
-TEST(IteratorTraitsTest, WorksForPointerToNonConst) {
- StaticAssertTypeEq<char, IteratorTraits<char*>::value_type>();
- StaticAssertTypeEq<const void*, IteratorTraits<const void**>::value_type>();
-}
-
-TEST(IteratorTraitsTest, WorksForPointerToConst) {
- StaticAssertTypeEq<char, IteratorTraits<const char*>::value_type>();
- StaticAssertTypeEq<const void*,
- IteratorTraits<const void* const*>::value_type>();
-}
-
-// Tests that the element_type typedef is available in scoped_ptr and refers
-// to the parameter type.
-TEST(ScopedPtrTest, DefinesElementType) {
- StaticAssertTypeEq<int, ::testing::internal::scoped_ptr<int>::element_type>();
-}
-
-// TODO(vladl@google.com): Implement THE REST of scoped_ptr tests.
-
-TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
- if (AlwaysFalse())
- GTEST_CHECK_(false) << "This should never be executed; "
- "It's a compilation test only.";
-
- if (AlwaysTrue())
- GTEST_CHECK_(true);
- else
- ; // NOLINT
-
- if (AlwaysFalse())
- ; // NOLINT
- else
- GTEST_CHECK_(true) << "";
-}
-
-TEST(GtestCheckSyntaxTest, WorksWithSwitch) {
- switch (0) {
- case 1:
- break;
- default:
- GTEST_CHECK_(true);
- }
-
- switch(0)
- case 0:
- GTEST_CHECK_(true) << "Check failed in switch case";
-}
-
-// Verifies behavior of FormatFileLocation.
-TEST(FormatFileLocationTest, FormatsFileLocation) {
- EXPECT_PRED_FORMAT2(IsSubstring, "foo.cc", FormatFileLocation("foo.cc", 42));
- EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation("foo.cc", 42));
-}
-
-TEST(FormatFileLocationTest, FormatsUnknownFile) {
- EXPECT_PRED_FORMAT2(
- IsSubstring, "unknown file", FormatFileLocation(NULL, 42));
- EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation(NULL, 42));
-}
-
-TEST(FormatFileLocationTest, FormatsUknownLine) {
- EXPECT_EQ("foo.cc:", FormatFileLocation("foo.cc", -1));
-}
-
-TEST(FormatFileLocationTest, FormatsUknownFileAndLine) {
- EXPECT_EQ("unknown file:", FormatFileLocation(NULL, -1));
-}
-
-// Verifies behavior of FormatCompilerIndependentFileLocation.
-TEST(FormatCompilerIndependentFileLocationTest, FormatsFileLocation) {
- EXPECT_EQ("foo.cc:42", FormatCompilerIndependentFileLocation("foo.cc", 42));
-}
-
-TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFile) {
- EXPECT_EQ("unknown file:42",
- FormatCompilerIndependentFileLocation(NULL, 42));
-}
-
-TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownLine) {
- EXPECT_EQ("foo.cc", FormatCompilerIndependentFileLocation("foo.cc", -1));
-}
-
-TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine) {
- EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(NULL, -1));
-}
-
-#if GTEST_OS_MAC
-void* ThreadFunc(void* data) {
- pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data);
- pthread_mutex_lock(mutex);
- pthread_mutex_unlock(mutex);
- return NULL;
-}
-
-TEST(GetThreadCountTest, ReturnsCorrectValue) {
- EXPECT_EQ(1U, GetThreadCount());
- pthread_mutex_t mutex;
- pthread_attr_t attr;
- pthread_t thread_id;
-
- // TODO(vladl@google.com): turn mutex into internal::Mutex for automatic
- // destruction.
- pthread_mutex_init(&mutex, NULL);
- pthread_mutex_lock(&mutex);
- ASSERT_EQ(0, pthread_attr_init(&attr));
- ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE));
-
- const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex);
- ASSERT_EQ(0, pthread_attr_destroy(&attr));
- ASSERT_EQ(0, status);
- EXPECT_EQ(2U, GetThreadCount());
- pthread_mutex_unlock(&mutex);
-
- void* dummy;
- ASSERT_EQ(0, pthread_join(thread_id, &dummy));
-
- // MacOS X may not immediately report the updated thread count after
- // joining a thread, causing flakiness in this test. To counter that, we
- // wait for up to .5 seconds for the OS to report the correct value.
- for (int i = 0; i < 5; ++i) {
- if (GetThreadCount() == 1)
- break;
-
- SleepMilliseconds(100);
- }
- EXPECT_EQ(1U, GetThreadCount());
- pthread_mutex_destroy(&mutex);
-}
-#else
-TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) {
- EXPECT_EQ(0U, GetThreadCount());
-}
-#endif // GTEST_OS_MAC
-
-TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) {
- const bool a_false_condition = false;
- const char regex[] =
-#ifdef _MSC_VER
- "gtest-port_test\\.cc\\(\\d+\\):"
-#elif GTEST_USES_POSIX_RE
- "gtest-port_test\\.cc:[0-9]+"
-#else
- "gtest-port_test\\.cc:\\d+"
-#endif // _MSC_VER
- ".*a_false_condition.*Extra info.*";
-
- EXPECT_DEATH_IF_SUPPORTED(GTEST_CHECK_(a_false_condition) << "Extra info",
- regex);
-}
-
-#if GTEST_HAS_DEATH_TEST
-
-TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) {
- EXPECT_EXIT({
- GTEST_CHECK_(true) << "Extra info";
- ::std::cerr << "Success\n";
- exit(0); },
- ::testing::ExitedWithCode(0), "Success");
-}
-
-#endif // GTEST_HAS_DEATH_TEST
-
-// Verifies that Google Test choose regular expression engine appropriate to
-// the platform. The test will produce compiler errors in case of failure.
-// For simplicity, we only cover the most important platforms here.
-TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
-#if GTEST_HAS_POSIX_RE
-
- EXPECT_TRUE(GTEST_USES_POSIX_RE);
-
-#else
-
- EXPECT_TRUE(GTEST_USES_SIMPLE_RE);
-
-#endif
-}
-
-#if GTEST_USES_POSIX_RE
-
-# if GTEST_HAS_TYPED_TEST
-
-template <typename Str>
-class RETest : public ::testing::Test {};
-
-// Defines StringTypes as the list of all string types that class RE
-// supports.
-typedef testing::Types<
- ::std::string,
-# if GTEST_HAS_GLOBAL_STRING
- ::string,
-# endif // GTEST_HAS_GLOBAL_STRING
- const char*> StringTypes;
-
-TYPED_TEST_CASE(RETest, StringTypes);
-
-// Tests RE's implicit constructors.
-TYPED_TEST(RETest, ImplicitConstructorWorks) {
- const RE empty(TypeParam(""));
- EXPECT_STREQ("", empty.pattern());
-
- const RE simple(TypeParam("hello"));
- EXPECT_STREQ("hello", simple.pattern());
-
- const RE normal(TypeParam(".*(\\w+)"));
- EXPECT_STREQ(".*(\\w+)", normal.pattern());
-}
-
-// Tests that RE's constructors reject invalid regular expressions.
-TYPED_TEST(RETest, RejectsInvalidRegex) {
- EXPECT_NONFATAL_FAILURE({
- const RE invalid(TypeParam("?"));
- }, "\"?\" is not a valid POSIX Extended regular expression.");
-}
-
-// Tests RE::FullMatch().
-TYPED_TEST(RETest, FullMatchWorks) {
- const RE empty(TypeParam(""));
- EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
- EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
-
- const RE re(TypeParam("a.*z"));
- EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
- EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
- EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
- EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
-}
-
-// Tests RE::PartialMatch().
-TYPED_TEST(RETest, PartialMatchWorks) {
- const RE empty(TypeParam(""));
- EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
- EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
-
- const RE re(TypeParam("a.*z"));
- EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
- EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
- EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
- EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
- EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
-}
-
-# endif // GTEST_HAS_TYPED_TEST
-
-#elif GTEST_USES_SIMPLE_RE
-
-TEST(IsInSetTest, NulCharIsNotInAnySet) {
- EXPECT_FALSE(IsInSet('\0', ""));
- EXPECT_FALSE(IsInSet('\0', "\0"));
- EXPECT_FALSE(IsInSet('\0', "a"));
-}
-
-TEST(IsInSetTest, WorksForNonNulChars) {
- EXPECT_FALSE(IsInSet('a', "Ab"));
- EXPECT_FALSE(IsInSet('c', ""));
-
- EXPECT_TRUE(IsInSet('b', "bcd"));
- EXPECT_TRUE(IsInSet('b', "ab"));
-}
-
-TEST(IsAsciiDigitTest, IsFalseForNonDigit) {
- EXPECT_FALSE(IsAsciiDigit('\0'));
- EXPECT_FALSE(IsAsciiDigit(' '));
- EXPECT_FALSE(IsAsciiDigit('+'));
- EXPECT_FALSE(IsAsciiDigit('-'));
- EXPECT_FALSE(IsAsciiDigit('.'));
- EXPECT_FALSE(IsAsciiDigit('a'));
-}
-
-TEST(IsAsciiDigitTest, IsTrueForDigit) {
- EXPECT_TRUE(IsAsciiDigit('0'));
- EXPECT_TRUE(IsAsciiDigit('1'));
- EXPECT_TRUE(IsAsciiDigit('5'));
- EXPECT_TRUE(IsAsciiDigit('9'));
-}
-
-TEST(IsAsciiPunctTest, IsFalseForNonPunct) {
- EXPECT_FALSE(IsAsciiPunct('\0'));
- EXPECT_FALSE(IsAsciiPunct(' '));
- EXPECT_FALSE(IsAsciiPunct('\n'));
- EXPECT_FALSE(IsAsciiPunct('a'));
- EXPECT_FALSE(IsAsciiPunct('0'));
-}
-
-TEST(IsAsciiPunctTest, IsTrueForPunct) {
- for (const char* p = "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"; *p; p++) {
- EXPECT_PRED1(IsAsciiPunct, *p);
- }
-}
-
-TEST(IsRepeatTest, IsFalseForNonRepeatChar) {
- EXPECT_FALSE(IsRepeat('\0'));
- EXPECT_FALSE(IsRepeat(' '));
- EXPECT_FALSE(IsRepeat('a'));
- EXPECT_FALSE(IsRepeat('1'));
- EXPECT_FALSE(IsRepeat('-'));
-}
-
-TEST(IsRepeatTest, IsTrueForRepeatChar) {
- EXPECT_TRUE(IsRepeat('?'));
- EXPECT_TRUE(IsRepeat('*'));
- EXPECT_TRUE(IsRepeat('+'));
-}
-
-TEST(IsAsciiWhiteSpaceTest, IsFalseForNonWhiteSpace) {
- EXPECT_FALSE(IsAsciiWhiteSpace('\0'));
- EXPECT_FALSE(IsAsciiWhiteSpace('a'));
- EXPECT_FALSE(IsAsciiWhiteSpace('1'));
- EXPECT_FALSE(IsAsciiWhiteSpace('+'));
- EXPECT_FALSE(IsAsciiWhiteSpace('_'));
-}
-
-TEST(IsAsciiWhiteSpaceTest, IsTrueForWhiteSpace) {
- EXPECT_TRUE(IsAsciiWhiteSpace(' '));
- EXPECT_TRUE(IsAsciiWhiteSpace('\n'));
- EXPECT_TRUE(IsAsciiWhiteSpace('\r'));
- EXPECT_TRUE(IsAsciiWhiteSpace('\t'));
- EXPECT_TRUE(IsAsciiWhiteSpace('\v'));
- EXPECT_TRUE(IsAsciiWhiteSpace('\f'));
-}
-
-TEST(IsAsciiWordCharTest, IsFalseForNonWordChar) {
- EXPECT_FALSE(IsAsciiWordChar('\0'));
- EXPECT_FALSE(IsAsciiWordChar('+'));
- EXPECT_FALSE(IsAsciiWordChar('.'));
- EXPECT_FALSE(IsAsciiWordChar(' '));
- EXPECT_FALSE(IsAsciiWordChar('\n'));
-}
-
-TEST(IsAsciiWordCharTest, IsTrueForLetter) {
- EXPECT_TRUE(IsAsciiWordChar('a'));
- EXPECT_TRUE(IsAsciiWordChar('b'));
- EXPECT_TRUE(IsAsciiWordChar('A'));
- EXPECT_TRUE(IsAsciiWordChar('Z'));
-}
-
-TEST(IsAsciiWordCharTest, IsTrueForDigit) {
- EXPECT_TRUE(IsAsciiWordChar('0'));
- EXPECT_TRUE(IsAsciiWordChar('1'));
- EXPECT_TRUE(IsAsciiWordChar('7'));
- EXPECT_TRUE(IsAsciiWordChar('9'));
-}
-
-TEST(IsAsciiWordCharTest, IsTrueForUnderscore) {
- EXPECT_TRUE(IsAsciiWordChar('_'));
-}
-
-TEST(IsValidEscapeTest, IsFalseForNonPrintable) {
- EXPECT_FALSE(IsValidEscape('\0'));
- EXPECT_FALSE(IsValidEscape('\007'));
-}
-
-TEST(IsValidEscapeTest, IsFalseForDigit) {
- EXPECT_FALSE(IsValidEscape('0'));
- EXPECT_FALSE(IsValidEscape('9'));
-}
-
-TEST(IsValidEscapeTest, IsFalseForWhiteSpace) {
- EXPECT_FALSE(IsValidEscape(' '));
- EXPECT_FALSE(IsValidEscape('\n'));
-}
-
-TEST(IsValidEscapeTest, IsFalseForSomeLetter) {
- EXPECT_FALSE(IsValidEscape('a'));
- EXPECT_FALSE(IsValidEscape('Z'));
-}
-
-TEST(IsValidEscapeTest, IsTrueForPunct) {
- EXPECT_TRUE(IsValidEscape('.'));
- EXPECT_TRUE(IsValidEscape('-'));
- EXPECT_TRUE(IsValidEscape('^'));
- EXPECT_TRUE(IsValidEscape('$'));
- EXPECT_TRUE(IsValidEscape('('));
- EXPECT_TRUE(IsValidEscape(']'));
- EXPECT_TRUE(IsValidEscape('{'));
- EXPECT_TRUE(IsValidEscape('|'));
-}
-
-TEST(IsValidEscapeTest, IsTrueForSomeLetter) {
- EXPECT_TRUE(IsValidEscape('d'));
- EXPECT_TRUE(IsValidEscape('D'));
- EXPECT_TRUE(IsValidEscape('s'));
- EXPECT_TRUE(IsValidEscape('S'));
- EXPECT_TRUE(IsValidEscape('w'));
- EXPECT_TRUE(IsValidEscape('W'));
-}
-
-TEST(AtomMatchesCharTest, EscapedPunct) {
- EXPECT_FALSE(AtomMatchesChar(true, '\\', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, '\\', ' '));
- EXPECT_FALSE(AtomMatchesChar(true, '_', '.'));
- EXPECT_FALSE(AtomMatchesChar(true, '.', 'a'));
-
- EXPECT_TRUE(AtomMatchesChar(true, '\\', '\\'));
- EXPECT_TRUE(AtomMatchesChar(true, '_', '_'));
- EXPECT_TRUE(AtomMatchesChar(true, '+', '+'));
- EXPECT_TRUE(AtomMatchesChar(true, '.', '.'));
-}
-
-TEST(AtomMatchesCharTest, Escaped_d) {
- EXPECT_FALSE(AtomMatchesChar(true, 'd', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'd', 'a'));
- EXPECT_FALSE(AtomMatchesChar(true, 'd', '.'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 'd', '0'));
- EXPECT_TRUE(AtomMatchesChar(true, 'd', '9'));
-}
-
-TEST(AtomMatchesCharTest, Escaped_D) {
- EXPECT_FALSE(AtomMatchesChar(true, 'D', '0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'D', '9'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 'D', '\0'));
- EXPECT_TRUE(AtomMatchesChar(true, 'D', 'a'));
- EXPECT_TRUE(AtomMatchesChar(true, 'D', '-'));
-}
-
-TEST(AtomMatchesCharTest, Escaped_s) {
- EXPECT_FALSE(AtomMatchesChar(true, 's', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 's', 'a'));
- EXPECT_FALSE(AtomMatchesChar(true, 's', '.'));
- EXPECT_FALSE(AtomMatchesChar(true, 's', '9'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 's', ' '));
- EXPECT_TRUE(AtomMatchesChar(true, 's', '\n'));
- EXPECT_TRUE(AtomMatchesChar(true, 's', '\t'));
-}
-
-TEST(AtomMatchesCharTest, Escaped_S) {
- EXPECT_FALSE(AtomMatchesChar(true, 'S', ' '));
- EXPECT_FALSE(AtomMatchesChar(true, 'S', '\r'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 'S', '\0'));
- EXPECT_TRUE(AtomMatchesChar(true, 'S', 'a'));
- EXPECT_TRUE(AtomMatchesChar(true, 'S', '9'));
-}
-
-TEST(AtomMatchesCharTest, Escaped_w) {
- EXPECT_FALSE(AtomMatchesChar(true, 'w', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'w', '+'));
- EXPECT_FALSE(AtomMatchesChar(true, 'w', ' '));
- EXPECT_FALSE(AtomMatchesChar(true, 'w', '\n'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 'w', '0'));
- EXPECT_TRUE(AtomMatchesChar(true, 'w', 'b'));
- EXPECT_TRUE(AtomMatchesChar(true, 'w', 'C'));
- EXPECT_TRUE(AtomMatchesChar(true, 'w', '_'));
-}
-
-TEST(AtomMatchesCharTest, Escaped_W) {
- EXPECT_FALSE(AtomMatchesChar(true, 'W', 'A'));
- EXPECT_FALSE(AtomMatchesChar(true, 'W', 'b'));
- EXPECT_FALSE(AtomMatchesChar(true, 'W', '9'));
- EXPECT_FALSE(AtomMatchesChar(true, 'W', '_'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 'W', '\0'));
- EXPECT_TRUE(AtomMatchesChar(true, 'W', '*'));
- EXPECT_TRUE(AtomMatchesChar(true, 'W', '\n'));
-}
-
-TEST(AtomMatchesCharTest, EscapedWhiteSpace) {
- EXPECT_FALSE(AtomMatchesChar(true, 'f', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'f', '\n'));
- EXPECT_FALSE(AtomMatchesChar(true, 'n', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'n', '\r'));
- EXPECT_FALSE(AtomMatchesChar(true, 'r', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'r', 'a'));
- EXPECT_FALSE(AtomMatchesChar(true, 't', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 't', 't'));
- EXPECT_FALSE(AtomMatchesChar(true, 'v', '\0'));
- EXPECT_FALSE(AtomMatchesChar(true, 'v', '\f'));
-
- EXPECT_TRUE(AtomMatchesChar(true, 'f', '\f'));
- EXPECT_TRUE(AtomMatchesChar(true, 'n', '\n'));
- EXPECT_TRUE(AtomMatchesChar(true, 'r', '\r'));
- EXPECT_TRUE(AtomMatchesChar(true, 't', '\t'));
- EXPECT_TRUE(AtomMatchesChar(true, 'v', '\v'));
-}
-
-TEST(AtomMatchesCharTest, UnescapedDot) {
- EXPECT_FALSE(AtomMatchesChar(false, '.', '\n'));
-
- EXPECT_TRUE(AtomMatchesChar(false, '.', '\0'));
- EXPECT_TRUE(AtomMatchesChar(false, '.', '.'));
- EXPECT_TRUE(AtomMatchesChar(false, '.', 'a'));
- EXPECT_TRUE(AtomMatchesChar(false, '.', ' '));
-}
-
-TEST(AtomMatchesCharTest, UnescapedChar) {
- EXPECT_FALSE(AtomMatchesChar(false, 'a', '\0'));
- EXPECT_FALSE(AtomMatchesChar(false, 'a', 'b'));
- EXPECT_FALSE(AtomMatchesChar(false, '$', 'a'));
-
- EXPECT_TRUE(AtomMatchesChar(false, '$', '$'));
- EXPECT_TRUE(AtomMatchesChar(false, '5', '5'));
- EXPECT_TRUE(AtomMatchesChar(false, 'Z', 'Z'));
-}
-
-TEST(ValidateRegexTest, GeneratesFailureAndReturnsFalseForInvalid) {
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(NULL)),
- "NULL is not a valid simple regular expression");
- EXPECT_NONFATAL_FAILURE(
- ASSERT_FALSE(ValidateRegex("a\\")),
- "Syntax error at index 1 in simple regular expression \"a\\\": ");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a\\")),
- "'\\' cannot appear at the end");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\n\\")),
- "'\\' cannot appear at the end");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\s\\hb")),
- "invalid escape sequence \"\\h\"");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^^")),
- "'^' can only appear at the beginning");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(".*^b")),
- "'^' can only appear at the beginning");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("$$")),
- "'$' can only appear at the end");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^$a")),
- "'$' can only appear at the end");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a(b")),
- "'(' is unsupported");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("ab)")),
- "')' is unsupported");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("[ab")),
- "'[' is unsupported");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a{2")),
- "'{' is unsupported");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("?")),
- "'?' can only follow a repeatable token");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^*")),
- "'*' can only follow a repeatable token");
- EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("5*+")),
- "'+' can only follow a repeatable token");
-}
-
-TEST(ValidateRegexTest, ReturnsTrueForValid) {
- EXPECT_TRUE(ValidateRegex(""));
- EXPECT_TRUE(ValidateRegex("a"));
- EXPECT_TRUE(ValidateRegex(".*"));
- EXPECT_TRUE(ValidateRegex("^a_+"));
- EXPECT_TRUE(ValidateRegex("^a\\t\\&?"));
- EXPECT_TRUE(ValidateRegex("09*$"));
- EXPECT_TRUE(ValidateRegex("^Z$"));
- EXPECT_TRUE(ValidateRegex("a\\^Z\\$\\(\\)\\|\\[\\]\\{\\}"));
-}
-
-TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrOne) {
- EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "a", "ba"));
- // Repeating more than once.
- EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "aab"));
-
- // Repeating zero times.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ba"));
- // Repeating once.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ab"));
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '#', '?', ".", "##"));
-}
-
-TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrMany) {
- EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '*', "a$", "baab"));
-
- // Repeating zero times.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "bc"));
- // Repeating once.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "abc"));
- // Repeating more than once.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '*', "-", "ab_1-g"));
-}
-
-TEST(MatchRepetitionAndRegexAtHeadTest, WorksForOneOrMany) {
- EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "a$", "baab"));
- // Repeating zero times.
- EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "bc"));
-
- // Repeating once.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "abc"));
- // Repeating more than once.
- EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '+', "-", "ab_1-g"));
-}
-
-TEST(MatchRegexAtHeadTest, ReturnsTrueForEmptyRegex) {
- EXPECT_TRUE(MatchRegexAtHead("", ""));
- EXPECT_TRUE(MatchRegexAtHead("", "ab"));
-}
-
-TEST(MatchRegexAtHeadTest, WorksWhenDollarIsInRegex) {
- EXPECT_FALSE(MatchRegexAtHead("$", "a"));
-
- EXPECT_TRUE(MatchRegexAtHead("$", ""));
- EXPECT_TRUE(MatchRegexAtHead("a$", "a"));
-}
-
-TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithEscapeSequence) {
- EXPECT_FALSE(MatchRegexAtHead("\\w", "+"));
- EXPECT_FALSE(MatchRegexAtHead("\\W", "ab"));
-
- EXPECT_TRUE(MatchRegexAtHead("\\sa", "\nab"));
- EXPECT_TRUE(MatchRegexAtHead("\\d", "1a"));
-}
-
-TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetition) {
- EXPECT_FALSE(MatchRegexAtHead(".+a", "abc"));
- EXPECT_FALSE(MatchRegexAtHead("a?b", "aab"));
-
- EXPECT_TRUE(MatchRegexAtHead(".*a", "bc12-ab"));
- EXPECT_TRUE(MatchRegexAtHead("a?b", "b"));
- EXPECT_TRUE(MatchRegexAtHead("a?b", "ab"));
-}
-
-TEST(MatchRegexAtHeadTest,
- WorksWhenRegexStartsWithRepetionOfEscapeSequence) {
- EXPECT_FALSE(MatchRegexAtHead("\\.+a", "abc"));
- EXPECT_FALSE(MatchRegexAtHead("\\s?b", " b"));
-
- EXPECT_TRUE(MatchRegexAtHead("\\(*a", "((((ab"));
- EXPECT_TRUE(MatchRegexAtHead("\\^?b", "^b"));
- EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "b"));
- EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "\\b"));
-}
-
-TEST(MatchRegexAtHeadTest, MatchesSequentially) {
- EXPECT_FALSE(MatchRegexAtHead("ab.*c", "acabc"));
-
- EXPECT_TRUE(MatchRegexAtHead("ab.*c", "ab-fsc"));
-}
-
-TEST(MatchRegexAnywhereTest, ReturnsFalseWhenStringIsNull) {
- EXPECT_FALSE(MatchRegexAnywhere("", NULL));
-}
-
-TEST(MatchRegexAnywhereTest, WorksWhenRegexStartsWithCaret) {
- EXPECT_FALSE(MatchRegexAnywhere("^a", "ba"));
- EXPECT_FALSE(MatchRegexAnywhere("^$", "a"));
-
- EXPECT_TRUE(MatchRegexAnywhere("^a", "ab"));
- EXPECT_TRUE(MatchRegexAnywhere("^", "ab"));
- EXPECT_TRUE(MatchRegexAnywhere("^$", ""));
-}
-
-TEST(MatchRegexAnywhereTest, ReturnsFalseWhenNoMatch) {
- EXPECT_FALSE(MatchRegexAnywhere("a", "bcde123"));
- EXPECT_FALSE(MatchRegexAnywhere("a.+a", "--aa88888888"));
-}
-
-TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingPrefix) {
- EXPECT_TRUE(MatchRegexAnywhere("\\w+", "ab1_ - 5"));
- EXPECT_TRUE(MatchRegexAnywhere(".*=", "="));
- EXPECT_TRUE(MatchRegexAnywhere("x.*ab?.*bc", "xaaabc"));
-}
-
-TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) {
- EXPECT_TRUE(MatchRegexAnywhere("\\w+", "$$$ ab1_ - 5"));
- EXPECT_TRUE(MatchRegexAnywhere("\\.+=", "= ...="));
-}
-
-// Tests RE's implicit constructors.
-TEST(RETest, ImplicitConstructorWorks) {
- const RE empty("");
- EXPECT_STREQ("", empty.pattern());
-
- const RE simple("hello");
- EXPECT_STREQ("hello", simple.pattern());
-}
-
-// Tests that RE's constructors reject invalid regular expressions.
-TEST(RETest, RejectsInvalidRegex) {
- EXPECT_NONFATAL_FAILURE({
- const RE normal(NULL);
- }, "NULL is not a valid simple regular expression");
-
- EXPECT_NONFATAL_FAILURE({
- const RE normal(".*(\\w+");
- }, "'(' is unsupported");
-
- EXPECT_NONFATAL_FAILURE({
- const RE invalid("^?");
- }, "'?' can only follow a repeatable token");
-}
-
-// Tests RE::FullMatch().
-TEST(RETest, FullMatchWorks) {
- const RE empty("");
- EXPECT_TRUE(RE::FullMatch("", empty));
- EXPECT_FALSE(RE::FullMatch("a", empty));
-
- const RE re1("a");
- EXPECT_TRUE(RE::FullMatch("a", re1));
-
- const RE re("a.*z");
- EXPECT_TRUE(RE::FullMatch("az", re));
- EXPECT_TRUE(RE::FullMatch("axyz", re));
- EXPECT_FALSE(RE::FullMatch("baz", re));
- EXPECT_FALSE(RE::FullMatch("azy", re));
-}
-
-// Tests RE::PartialMatch().
-TEST(RETest, PartialMatchWorks) {
- const RE empty("");
- EXPECT_TRUE(RE::PartialMatch("", empty));
- EXPECT_TRUE(RE::PartialMatch("a", empty));
-
- const RE re("a.*z");
- EXPECT_TRUE(RE::PartialMatch("az", re));
- EXPECT_TRUE(RE::PartialMatch("axyz", re));
- EXPECT_TRUE(RE::PartialMatch("baz", re));
- EXPECT_TRUE(RE::PartialMatch("azy", re));
- EXPECT_FALSE(RE::PartialMatch("zza", re));
-}
-
-#endif // GTEST_USES_POSIX_RE
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-TEST(CaptureTest, CapturesStdout) {
- CaptureStdout();
- fprintf(stdout, "abc");
- EXPECT_STREQ("abc", GetCapturedStdout().c_str());
-
- CaptureStdout();
- fprintf(stdout, "def%cghi", '\0');
- EXPECT_EQ(::std::string("def\0ghi", 7), ::std::string(GetCapturedStdout()));
-}
-
-TEST(CaptureTest, CapturesStderr) {
- CaptureStderr();
- fprintf(stderr, "jkl");
- EXPECT_STREQ("jkl", GetCapturedStderr().c_str());
-
- CaptureStderr();
- fprintf(stderr, "jkl%cmno", '\0');
- EXPECT_EQ(::std::string("jkl\0mno", 7), ::std::string(GetCapturedStderr()));
-}
-
-// Tests that stdout and stderr capture don't interfere with each other.
-TEST(CaptureTest, CapturesStdoutAndStderr) {
- CaptureStdout();
- CaptureStderr();
- fprintf(stdout, "pqr");
- fprintf(stderr, "stu");
- EXPECT_STREQ("pqr", GetCapturedStdout().c_str());
- EXPECT_STREQ("stu", GetCapturedStderr().c_str());
-}
-
-TEST(CaptureDeathTest, CannotReenterStdoutCapture) {
- CaptureStdout();
- EXPECT_DEATH_IF_SUPPORTED(CaptureStdout();,
- "Only one stdout capturer can exist at a time");
- GetCapturedStdout();
-
- // We cannot test stderr capturing using death tests as they use it
- // themselves.
-}
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-TEST(ThreadLocalTest, DefaultConstructorInitializesToDefaultValues) {
- ThreadLocal<int> t1;
- EXPECT_EQ(0, t1.get());
-
- ThreadLocal<void*> t2;
- EXPECT_TRUE(t2.get() == NULL);
-}
-
-TEST(ThreadLocalTest, SingleParamConstructorInitializesToParam) {
- ThreadLocal<int> t1(123);
- EXPECT_EQ(123, t1.get());
-
- int i = 0;
- ThreadLocal<int*> t2(&i);
- EXPECT_EQ(&i, t2.get());
-}
-
-class NoDefaultContructor {
- public:
- explicit NoDefaultContructor(const char*) {}
- NoDefaultContructor(const NoDefaultContructor&) {}
-};
-
-TEST(ThreadLocalTest, ValueDefaultContructorIsNotRequiredForParamVersion) {
- ThreadLocal<NoDefaultContructor> bar(NoDefaultContructor("foo"));
- bar.pointer();
-}
-
-TEST(ThreadLocalTest, GetAndPointerReturnSameValue) {
- ThreadLocal<String> thread_local;
-
- EXPECT_EQ(thread_local.pointer(), &(thread_local.get()));
-
- // Verifies the condition still holds after calling set.
- thread_local.set("foo");
- EXPECT_EQ(thread_local.pointer(), &(thread_local.get()));
-}
-
-TEST(ThreadLocalTest, PointerAndConstPointerReturnSameValue) {
- ThreadLocal<String> thread_local;
- const ThreadLocal<String>& const_thread_local = thread_local;
-
- EXPECT_EQ(thread_local.pointer(), const_thread_local.pointer());
-
- thread_local.set("foo");
- EXPECT_EQ(thread_local.pointer(), const_thread_local.pointer());
-}
-
-#if GTEST_IS_THREADSAFE
-
-void AddTwo(int* param) { *param += 2; }
-
-TEST(ThreadWithParamTest, ConstructorExecutesThreadFunc) {
- int i = 40;
- ThreadWithParam<int*> thread(&AddTwo, &i, NULL);
- thread.Join();
- EXPECT_EQ(42, i);
-}
-
-TEST(MutexDeathTest, AssertHeldShouldAssertWhenNotLocked) {
- // AssertHeld() is flaky only in the presence of multiple threads accessing
- // the lock. In this case, the test is robust.
- EXPECT_DEATH_IF_SUPPORTED({
- Mutex m;
- { MutexLock lock(&m); }
- m.AssertHeld();
- },
- "thread .*hold");
-}
-
-TEST(MutexTest, AssertHeldShouldNotAssertWhenLocked) {
- Mutex m;
- MutexLock lock(&m);
- m.AssertHeld();
-}
-
-class AtomicCounterWithMutex {
- public:
- explicit AtomicCounterWithMutex(Mutex* mutex) :
- value_(0), mutex_(mutex), random_(42) {}
-
- void Increment() {
- MutexLock lock(mutex_);
- int temp = value_;
- {
- // Locking a mutex puts up a memory barrier, preventing reads and
- // writes to value_ rearranged when observed from other threads.
- //
- // We cannot use Mutex and MutexLock here or rely on their memory
- // barrier functionality as we are testing them here.
- pthread_mutex_t memory_barrier_mutex;
- GTEST_CHECK_POSIX_SUCCESS_(
- pthread_mutex_init(&memory_barrier_mutex, NULL));
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&memory_barrier_mutex));
-
- SleepMilliseconds(random_.Generate(30));
-
- GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&memory_barrier_mutex));
- }
- value_ = temp + 1;
- }
- int value() const { return value_; }
-
- private:
- volatile int value_;
- Mutex* const mutex_; // Protects value_.
- Random random_;
-};
-
-void CountingThreadFunc(pair<AtomicCounterWithMutex*, int> param) {
- for (int i = 0; i < param.second; ++i)
- param.first->Increment();
-}
-
-// Tests that the mutex only lets one thread at a time to lock it.
-TEST(MutexTest, OnlyOneThreadCanLockAtATime) {
- Mutex mutex;
- AtomicCounterWithMutex locked_counter(&mutex);
-
- typedef ThreadWithParam<pair<AtomicCounterWithMutex*, int> > ThreadType;
- const int kCycleCount = 20;
- const int kThreadCount = 7;
- scoped_ptr<ThreadType> counting_threads[kThreadCount];
- Notification threads_can_start;
- // Creates and runs kThreadCount threads that increment locked_counter
- // kCycleCount times each.
- for (int i = 0; i < kThreadCount; ++i) {
- counting_threads[i].reset(new ThreadType(&CountingThreadFunc,
- make_pair(&locked_counter,
- kCycleCount),
- &threads_can_start));
- }
- threads_can_start.Notify();
- for (int i = 0; i < kThreadCount; ++i)
- counting_threads[i]->Join();
-
- // If the mutex lets more than one thread to increment the counter at a
- // time, they are likely to encounter a race condition and have some
- // increments overwritten, resulting in the lower then expected counter
- // value.
- EXPECT_EQ(kCycleCount * kThreadCount, locked_counter.value());
-}
-
-template <typename T>
-void RunFromThread(void (func)(T), T param) {
- ThreadWithParam<T> thread(func, param, NULL);
- thread.Join();
-}
-
-void RetrieveThreadLocalValue(pair<ThreadLocal<String>*, String*> param) {
- *param.second = param.first->get();
-}
-
-TEST(ThreadLocalTest, ParameterizedConstructorSetsDefault) {
- ThreadLocal<String> thread_local("foo");
- EXPECT_STREQ("foo", thread_local.get().c_str());
-
- thread_local.set("bar");
- EXPECT_STREQ("bar", thread_local.get().c_str());
-
- String result;
- RunFromThread(&RetrieveThreadLocalValue, make_pair(&thread_local, &result));
- EXPECT_STREQ("foo", result.c_str());
-}
-
-// DestructorTracker keeps track of whether its instances have been
-// destroyed.
-static std::vector<bool> g_destroyed;
-
-class DestructorTracker {
- public:
- DestructorTracker() : index_(GetNewIndex()) {}
- DestructorTracker(const DestructorTracker& /* rhs */)
- : index_(GetNewIndex()) {}
- ~DestructorTracker() {
- // We never access g_destroyed concurrently, so we don't need to
- // protect the write operation under a mutex.
- g_destroyed[index_] = true;
- }
-
- private:
- static int GetNewIndex() {
- g_destroyed.push_back(false);
- return g_destroyed.size() - 1;
- }
- const int index_;
-};
-
-typedef ThreadLocal<DestructorTracker>* ThreadParam;
-
-void CallThreadLocalGet(ThreadParam thread_local) {
- thread_local->get();
-}
-
-// Tests that when a ThreadLocal object dies in a thread, it destroys
-// the managed object for that thread.
-TEST(ThreadLocalTest, DestroysManagedObjectForOwnThreadWhenDying) {
- g_destroyed.clear();
-
- {
- // The next line default constructs a DestructorTracker object as
- // the default value of objects managed by thread_local.
- ThreadLocal<DestructorTracker> thread_local;
- ASSERT_EQ(1U, g_destroyed.size());
- ASSERT_FALSE(g_destroyed[0]);
-
- // This creates another DestructorTracker object for the main thread.
- thread_local.get();
- ASSERT_EQ(2U, g_destroyed.size());
- ASSERT_FALSE(g_destroyed[0]);
- ASSERT_FALSE(g_destroyed[1]);
- }
-
- // Now thread_local has died. It should have destroyed both the
- // default value shared by all threads and the value for the main
- // thread.
- ASSERT_EQ(2U, g_destroyed.size());
- EXPECT_TRUE(g_destroyed[0]);
- EXPECT_TRUE(g_destroyed[1]);
-
- g_destroyed.clear();
-}
-
-// Tests that when a thread exits, the thread-local object for that
-// thread is destroyed.
-TEST(ThreadLocalTest, DestroysManagedObjectAtThreadExit) {
- g_destroyed.clear();
-
- {
- // The next line default constructs a DestructorTracker object as
- // the default value of objects managed by thread_local.
- ThreadLocal<DestructorTracker> thread_local;
- ASSERT_EQ(1U, g_destroyed.size());
- ASSERT_FALSE(g_destroyed[0]);
-
- // This creates another DestructorTracker object in the new thread.
- ThreadWithParam<ThreadParam> thread(
- &CallThreadLocalGet, &thread_local, NULL);
- thread.Join();
-
- // Now the new thread has exited. The per-thread object for it
- // should have been destroyed.
- ASSERT_EQ(2U, g_destroyed.size());
- ASSERT_FALSE(g_destroyed[0]);
- ASSERT_TRUE(g_destroyed[1]);
- }
-
- // Now thread_local has died. The default value should have been
- // destroyed too.
- ASSERT_EQ(2U, g_destroyed.size());
- EXPECT_TRUE(g_destroyed[0]);
- EXPECT_TRUE(g_destroyed[1]);
-
- g_destroyed.clear();
-}
-
-TEST(ThreadLocalTest, ThreadLocalMutationsAffectOnlyCurrentThread) {
- ThreadLocal<String> thread_local;
- thread_local.set("Foo");
- EXPECT_STREQ("Foo", thread_local.get().c_str());
-
- String result;
- RunFromThread(&RetrieveThreadLocalValue, make_pair(&thread_local, &result));
- EXPECT_TRUE(result.c_str() == NULL);
-}
-
-#endif // GTEST_IS_THREADSAFE
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-printers_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-printers_test.cc
deleted file mode 100644
index 6292c7f23..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-printers_test.cc
+++ /dev/null
@@ -1,1307 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Test - The Google C++ Testing Framework
-//
-// This file tests the universal value printer.
-
-#include "gtest/gtest-printers.h"
-
-#include <ctype.h>
-#include <limits.h>
-#include <string.h>
-#include <algorithm>
-#include <deque>
-#include <list>
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "gtest/gtest.h"
-
-// hash_map and hash_set are available under Visual C++.
-#if _MSC_VER
-# define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available.
-# include <hash_map> // NOLINT
-# define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available.
-# include <hash_set> // NOLINT
-#endif // GTEST_OS_WINDOWS
-
-// Some user-defined types for testing the universal value printer.
-
-// An anonymous enum type.
-enum AnonymousEnum {
- kAE1 = -1,
- kAE2 = 1
-};
-
-// An enum without a user-defined printer.
-enum EnumWithoutPrinter {
- kEWP1 = -2,
- kEWP2 = 42
-};
-
-// An enum with a << operator.
-enum EnumWithStreaming {
- kEWS1 = 10
-};
-
-std::ostream& operator<<(std::ostream& os, EnumWithStreaming e) {
- return os << (e == kEWS1 ? "kEWS1" : "invalid");
-}
-
-// An enum with a PrintTo() function.
-enum EnumWithPrintTo {
- kEWPT1 = 1
-};
-
-void PrintTo(EnumWithPrintTo e, std::ostream* os) {
- *os << (e == kEWPT1 ? "kEWPT1" : "invalid");
-}
-
-// A class implicitly convertible to BiggestInt.
-class BiggestIntConvertible {
- public:
- operator ::testing::internal::BiggestInt() const { return 42; }
-};
-
-// A user-defined unprintable class template in the global namespace.
-template <typename T>
-class UnprintableTemplateInGlobal {
- public:
- UnprintableTemplateInGlobal() : value_() {}
- private:
- T value_;
-};
-
-// A user-defined streamable type in the global namespace.
-class StreamableInGlobal {
- public:
- virtual ~StreamableInGlobal() {}
-};
-
-inline void operator<<(::std::ostream& os, const StreamableInGlobal& /* x */) {
- os << "StreamableInGlobal";
-}
-
-void operator<<(::std::ostream& os, const StreamableInGlobal* /* x */) {
- os << "StreamableInGlobal*";
-}
-
-namespace foo {
-
-// A user-defined unprintable type in a user namespace.
-class UnprintableInFoo {
- public:
- UnprintableInFoo() : z_(0) { memcpy(xy_, "\xEF\x12\x0\x0\x34\xAB\x0\x0", 8); }
- private:
- char xy_[8];
- double z_;
-};
-
-// A user-defined printable type in a user-chosen namespace.
-struct PrintableViaPrintTo {
- PrintableViaPrintTo() : value() {}
- int value;
-};
-
-void PrintTo(const PrintableViaPrintTo& x, ::std::ostream* os) {
- *os << "PrintableViaPrintTo: " << x.value;
-}
-
-// A type with a user-defined << for printing its pointer.
-struct PointerPrintable {
-};
-
-::std::ostream& operator<<(::std::ostream& os,
- const PointerPrintable* /* x */) {
- return os << "PointerPrintable*";
-}
-
-// A user-defined printable class template in a user-chosen namespace.
-template <typename T>
-class PrintableViaPrintToTemplate {
- public:
- explicit PrintableViaPrintToTemplate(const T& a_value) : value_(a_value) {}
-
- const T& value() const { return value_; }
- private:
- T value_;
-};
-
-template <typename T>
-void PrintTo(const PrintableViaPrintToTemplate<T>& x, ::std::ostream* os) {
- *os << "PrintableViaPrintToTemplate: " << x.value();
-}
-
-// A user-defined streamable class template in a user namespace.
-template <typename T>
-class StreamableTemplateInFoo {
- public:
- StreamableTemplateInFoo() : value_() {}
-
- const T& value() const { return value_; }
- private:
- T value_;
-};
-
-template <typename T>
-inline ::std::ostream& operator<<(::std::ostream& os,
- const StreamableTemplateInFoo<T>& x) {
- return os << "StreamableTemplateInFoo: " << x.value();
-}
-
-} // namespace foo
-
-namespace testing {
-namespace gtest_printers_test {
-
-using ::std::deque;
-using ::std::list;
-using ::std::make_pair;
-using ::std::map;
-using ::std::multimap;
-using ::std::multiset;
-using ::std::pair;
-using ::std::set;
-using ::std::vector;
-using ::testing::PrintToString;
-using ::testing::internal::NativeArray;
-using ::testing::internal::RE;
-using ::testing::internal::Strings;
-using ::testing::internal::UniversalTersePrint;
-using ::testing::internal::UniversalPrint;
-using ::testing::internal::UniversalTersePrintTupleFieldsToStrings;
-using ::testing::internal::UniversalPrinter;
-using ::testing::internal::kReference;
-using ::testing::internal::string;
-
-#if GTEST_HAS_TR1_TUPLE
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-#endif
-
-#if _MSC_VER
-// MSVC defines the following classes in the ::stdext namespace while
-// gcc defines them in the :: namespace. Note that they are not part
-// of the C++ standard.
-using ::stdext::hash_map;
-using ::stdext::hash_set;
-using ::stdext::hash_multimap;
-using ::stdext::hash_multiset;
-#endif
-
-// Prints a value to a string using the universal value printer. This
-// is a helper for testing UniversalPrinter<T>::Print() for various types.
-template <typename T>
-string Print(const T& value) {
- ::std::stringstream ss;
- UniversalPrinter<T>::Print(value, &ss);
- return ss.str();
-}
-
-// Prints a value passed by reference to a string, using the universal
-// value printer. This is a helper for testing
-// UniversalPrinter<T&>::Print() for various types.
-template <typename T>
-string PrintByRef(const T& value) {
- ::std::stringstream ss;
- UniversalPrinter<T&>::Print(value, &ss);
- return ss.str();
-}
-
-// Tests printing various enum types.
-
-TEST(PrintEnumTest, AnonymousEnum) {
- EXPECT_EQ("-1", Print(kAE1));
- EXPECT_EQ("1", Print(kAE2));
-}
-
-TEST(PrintEnumTest, EnumWithoutPrinter) {
- EXPECT_EQ("-2", Print(kEWP1));
- EXPECT_EQ("42", Print(kEWP2));
-}
-
-TEST(PrintEnumTest, EnumWithStreaming) {
- EXPECT_EQ("kEWS1", Print(kEWS1));
- EXPECT_EQ("invalid", Print(static_cast<EnumWithStreaming>(0)));
-}
-
-TEST(PrintEnumTest, EnumWithPrintTo) {
- EXPECT_EQ("kEWPT1", Print(kEWPT1));
- EXPECT_EQ("invalid", Print(static_cast<EnumWithPrintTo>(0)));
-}
-
-// Tests printing a class implicitly convertible to BiggestInt.
-
-TEST(PrintClassTest, BiggestIntConvertible) {
- EXPECT_EQ("42", Print(BiggestIntConvertible()));
-}
-
-// Tests printing various char types.
-
-// char.
-TEST(PrintCharTest, PlainChar) {
- EXPECT_EQ("'\\0'", Print('\0'));
- EXPECT_EQ("'\\'' (39, 0x27)", Print('\''));
- EXPECT_EQ("'\"' (34, 0x22)", Print('"'));
- EXPECT_EQ("'?' (63, 0x3F)", Print('?'));
- EXPECT_EQ("'\\\\' (92, 0x5C)", Print('\\'));
- EXPECT_EQ("'\\a' (7)", Print('\a'));
- EXPECT_EQ("'\\b' (8)", Print('\b'));
- EXPECT_EQ("'\\f' (12, 0xC)", Print('\f'));
- EXPECT_EQ("'\\n' (10, 0xA)", Print('\n'));
- EXPECT_EQ("'\\r' (13, 0xD)", Print('\r'));
- EXPECT_EQ("'\\t' (9)", Print('\t'));
- EXPECT_EQ("'\\v' (11, 0xB)", Print('\v'));
- EXPECT_EQ("'\\x7F' (127)", Print('\x7F'));
- EXPECT_EQ("'\\xFF' (255)", Print('\xFF'));
- EXPECT_EQ("' ' (32, 0x20)", Print(' '));
- EXPECT_EQ("'a' (97, 0x61)", Print('a'));
-}
-
-// signed char.
-TEST(PrintCharTest, SignedChar) {
- EXPECT_EQ("'\\0'", Print(static_cast<signed char>('\0')));
- EXPECT_EQ("'\\xCE' (-50)",
- Print(static_cast<signed char>(-50)));
-}
-
-// unsigned char.
-TEST(PrintCharTest, UnsignedChar) {
- EXPECT_EQ("'\\0'", Print(static_cast<unsigned char>('\0')));
- EXPECT_EQ("'b' (98, 0x62)",
- Print(static_cast<unsigned char>('b')));
-}
-
-// Tests printing other simple, built-in types.
-
-// bool.
-TEST(PrintBuiltInTypeTest, Bool) {
- EXPECT_EQ("false", Print(false));
- EXPECT_EQ("true", Print(true));
-}
-
-// wchar_t.
-TEST(PrintBuiltInTypeTest, Wchar_t) {
- EXPECT_EQ("L'\\0'", Print(L'\0'));
- EXPECT_EQ("L'\\'' (39, 0x27)", Print(L'\''));
- EXPECT_EQ("L'\"' (34, 0x22)", Print(L'"'));
- EXPECT_EQ("L'?' (63, 0x3F)", Print(L'?'));
- EXPECT_EQ("L'\\\\' (92, 0x5C)", Print(L'\\'));
- EXPECT_EQ("L'\\a' (7)", Print(L'\a'));
- EXPECT_EQ("L'\\b' (8)", Print(L'\b'));
- EXPECT_EQ("L'\\f' (12, 0xC)", Print(L'\f'));
- EXPECT_EQ("L'\\n' (10, 0xA)", Print(L'\n'));
- EXPECT_EQ("L'\\r' (13, 0xD)", Print(L'\r'));
- EXPECT_EQ("L'\\t' (9)", Print(L'\t'));
- EXPECT_EQ("L'\\v' (11, 0xB)", Print(L'\v'));
- EXPECT_EQ("L'\\x7F' (127)", Print(L'\x7F'));
- EXPECT_EQ("L'\\xFF' (255)", Print(L'\xFF'));
- EXPECT_EQ("L' ' (32, 0x20)", Print(L' '));
- EXPECT_EQ("L'a' (97, 0x61)", Print(L'a'));
- EXPECT_EQ("L'\\x576' (1398)", Print(static_cast<wchar_t>(0x576)));
- EXPECT_EQ("L'\\xC74D' (51021)", Print(static_cast<wchar_t>(0xC74D)));
-}
-
-// Test that Int64 provides more storage than wchar_t.
-TEST(PrintTypeSizeTest, Wchar_t) {
- EXPECT_LT(sizeof(wchar_t), sizeof(testing::internal::Int64));
-}
-
-// Various integer types.
-TEST(PrintBuiltInTypeTest, Integer) {
- EXPECT_EQ("'\\xFF' (255)", Print(static_cast<unsigned char>(255))); // uint8
- EXPECT_EQ("'\\x80' (-128)", Print(static_cast<signed char>(-128))); // int8
- EXPECT_EQ("65535", Print(USHRT_MAX)); // uint16
- EXPECT_EQ("-32768", Print(SHRT_MIN)); // int16
- EXPECT_EQ("4294967295", Print(UINT_MAX)); // uint32
- EXPECT_EQ("-2147483648", Print(INT_MIN)); // int32
- EXPECT_EQ("18446744073709551615",
- Print(static_cast<testing::internal::UInt64>(-1))); // uint64
- EXPECT_EQ("-9223372036854775808",
- Print(static_cast<testing::internal::Int64>(1) << 63)); // int64
-}
-
-// Size types.
-TEST(PrintBuiltInTypeTest, Size_t) {
- EXPECT_EQ("1", Print(sizeof('a'))); // size_t.
-#if !GTEST_OS_WINDOWS
- // Windows has no ssize_t type.
- EXPECT_EQ("-2", Print(static_cast<ssize_t>(-2))); // ssize_t.
-#endif // !GTEST_OS_WINDOWS
-}
-
-// Floating-points.
-TEST(PrintBuiltInTypeTest, FloatingPoints) {
- EXPECT_EQ("1.5", Print(1.5f)); // float
- EXPECT_EQ("-2.5", Print(-2.5)); // double
-}
-
-// Since ::std::stringstream::operator<<(const void *) formats the pointer
-// output differently with different compilers, we have to create the expected
-// output first and use it as our expectation.
-static string PrintPointer(const void *p) {
- ::std::stringstream expected_result_stream;
- expected_result_stream << p;
- return expected_result_stream.str();
-}
-
-// Tests printing C strings.
-
-// const char*.
-TEST(PrintCStringTest, Const) {
- const char* p = "World";
- EXPECT_EQ(PrintPointer(p) + " pointing to \"World\"", Print(p));
-}
-
-// char*.
-TEST(PrintCStringTest, NonConst) {
- char p[] = "Hi";
- EXPECT_EQ(PrintPointer(p) + " pointing to \"Hi\"",
- Print(static_cast<char*>(p)));
-}
-
-// NULL C string.
-TEST(PrintCStringTest, Null) {
- const char* p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// Tests that C strings are escaped properly.
-TEST(PrintCStringTest, EscapesProperly) {
- const char* p = "'\"?\\\a\b\f\n\r\t\v\x7F\xFF a";
- EXPECT_EQ(PrintPointer(p) + " pointing to \"'\\\"?\\\\\\a\\b\\f"
- "\\n\\r\\t\\v\\x7F\\xFF a\"",
- Print(p));
-}
-
-
-
-// MSVC compiler can be configured to define whar_t as a typedef
-// of unsigned short. Defining an overload for const wchar_t* in that case
-// would cause pointers to unsigned shorts be printed as wide strings,
-// possibly accessing more memory than intended and causing invalid
-// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when
-// wchar_t is implemented as a native type.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-
-// const wchar_t*.
-TEST(PrintWideCStringTest, Const) {
- const wchar_t* p = L"World";
- EXPECT_EQ(PrintPointer(p) + " pointing to L\"World\"", Print(p));
-}
-
-// wchar_t*.
-TEST(PrintWideCStringTest, NonConst) {
- wchar_t p[] = L"Hi";
- EXPECT_EQ(PrintPointer(p) + " pointing to L\"Hi\"",
- Print(static_cast<wchar_t*>(p)));
-}
-
-// NULL wide C string.
-TEST(PrintWideCStringTest, Null) {
- const wchar_t* p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// Tests that wide C strings are escaped properly.
-TEST(PrintWideCStringTest, EscapesProperly) {
- const wchar_t s[] = {'\'', '"', '?', '\\', '\a', '\b', '\f', '\n', '\r',
- '\t', '\v', 0xD3, 0x576, 0x8D3, 0xC74D, ' ', 'a', '\0'};
- EXPECT_EQ(PrintPointer(s) + " pointing to L\"'\\\"?\\\\\\a\\b\\f"
- "\\n\\r\\t\\v\\xD3\\x576\\x8D3\\xC74D a\"",
- Print(static_cast<const wchar_t*>(s)));
-}
-#endif // native wchar_t
-
-// Tests printing pointers to other char types.
-
-// signed char*.
-TEST(PrintCharPointerTest, SignedChar) {
- signed char* p = reinterpret_cast<signed char*>(0x1234);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// const signed char*.
-TEST(PrintCharPointerTest, ConstSignedChar) {
- signed char* p = reinterpret_cast<signed char*>(0x1234);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// unsigned char*.
-TEST(PrintCharPointerTest, UnsignedChar) {
- unsigned char* p = reinterpret_cast<unsigned char*>(0x1234);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// const unsigned char*.
-TEST(PrintCharPointerTest, ConstUnsignedChar) {
- const unsigned char* p = reinterpret_cast<const unsigned char*>(0x1234);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// Tests printing pointers to simple, built-in types.
-
-// bool*.
-TEST(PrintPointerToBuiltInTypeTest, Bool) {
- bool* p = reinterpret_cast<bool*>(0xABCD);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// void*.
-TEST(PrintPointerToBuiltInTypeTest, Void) {
- void* p = reinterpret_cast<void*>(0xABCD);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// const void*.
-TEST(PrintPointerToBuiltInTypeTest, ConstVoid) {
- const void* p = reinterpret_cast<const void*>(0xABCD);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// Tests printing pointers to pointers.
-TEST(PrintPointerToPointerTest, IntPointerPointer) {
- int** p = reinterpret_cast<int**>(0xABCD);
- EXPECT_EQ(PrintPointer(p), Print(p));
- p = NULL;
- EXPECT_EQ("NULL", Print(p));
-}
-
-// Tests printing (non-member) function pointers.
-
-void MyFunction(int /* n */) {}
-
-TEST(PrintPointerTest, NonMemberFunctionPointer) {
- // We cannot directly cast &MyFunction to const void* because the
- // standard disallows casting between pointers to functions and
- // pointers to objects, and some compilers (e.g. GCC 3.4) enforce
- // this limitation.
- EXPECT_EQ(
- PrintPointer(reinterpret_cast<const void*>(
- reinterpret_cast<internal::BiggestInt>(&MyFunction))),
- Print(&MyFunction));
- int (*p)(bool) = NULL; // NOLINT
- EXPECT_EQ("NULL", Print(p));
-}
-
-// An assertion predicate determining whether a one string is a prefix for
-// another.
-template <typename StringType>
-AssertionResult HasPrefix(const StringType& str, const StringType& prefix) {
- if (str.find(prefix, 0) == 0)
- return AssertionSuccess();
-
- const bool is_wide_string = sizeof(prefix[0]) > 1;
- const char* const begin_string_quote = is_wide_string ? "L\"" : "\"";
- return AssertionFailure()
- << begin_string_quote << prefix << "\" is not a prefix of "
- << begin_string_quote << str << "\"\n";
-}
-
-// Tests printing member variable pointers. Although they are called
-// pointers, they don't point to a location in the address space.
-// Their representation is implementation-defined. Thus they will be
-// printed as raw bytes.
-
-struct Foo {
- public:
- virtual ~Foo() {}
- int MyMethod(char x) { return x + 1; }
- virtual char MyVirtualMethod(int /* n */) { return 'a'; }
-
- int value;
-};
-
-TEST(PrintPointerTest, MemberVariablePointer) {
- EXPECT_TRUE(HasPrefix(Print(&Foo::value),
- Print(sizeof(&Foo::value)) + "-byte object "));
- int (Foo::*p) = NULL; // NOLINT
- EXPECT_TRUE(HasPrefix(Print(p),
- Print(sizeof(p)) + "-byte object "));
-}
-
-// Tests printing member function pointers. Although they are called
-// pointers, they don't point to a location in the address space.
-// Their representation is implementation-defined. Thus they will be
-// printed as raw bytes.
-TEST(PrintPointerTest, MemberFunctionPointer) {
- EXPECT_TRUE(HasPrefix(Print(&Foo::MyMethod),
- Print(sizeof(&Foo::MyMethod)) + "-byte object "));
- EXPECT_TRUE(
- HasPrefix(Print(&Foo::MyVirtualMethod),
- Print(sizeof((&Foo::MyVirtualMethod))) + "-byte object "));
- int (Foo::*p)(char) = NULL; // NOLINT
- EXPECT_TRUE(HasPrefix(Print(p),
- Print(sizeof(p)) + "-byte object "));
-}
-
-// Tests printing C arrays.
-
-// The difference between this and Print() is that it ensures that the
-// argument is a reference to an array.
-template <typename T, size_t N>
-string PrintArrayHelper(T (&a)[N]) {
- return Print(a);
-}
-
-// One-dimensional array.
-TEST(PrintArrayTest, OneDimensionalArray) {
- int a[5] = { 1, 2, 3, 4, 5 };
- EXPECT_EQ("{ 1, 2, 3, 4, 5 }", PrintArrayHelper(a));
-}
-
-// Two-dimensional array.
-TEST(PrintArrayTest, TwoDimensionalArray) {
- int a[2][5] = {
- { 1, 2, 3, 4, 5 },
- { 6, 7, 8, 9, 0 }
- };
- EXPECT_EQ("{ { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 0 } }", PrintArrayHelper(a));
-}
-
-// Array of const elements.
-TEST(PrintArrayTest, ConstArray) {
- const bool a[1] = { false };
- EXPECT_EQ("{ false }", PrintArrayHelper(a));
-}
-
-// Char array.
-TEST(PrintArrayTest, CharArray) {
- // Array a contains '\0' in the middle and doesn't end with '\0'.
- char a[3] = { 'H', '\0', 'i' };
- EXPECT_EQ("\"H\\0i\"", PrintArrayHelper(a));
-}
-
-// Const char array.
-TEST(PrintArrayTest, ConstCharArray) {
- const char a[4] = "\0Hi";
- EXPECT_EQ("\"\\0Hi\\0\"", PrintArrayHelper(a));
-}
-
-// Array of objects.
-TEST(PrintArrayTest, ObjectArray) {
- string a[3] = { "Hi", "Hello", "Ni hao" };
- EXPECT_EQ("{ \"Hi\", \"Hello\", \"Ni hao\" }", PrintArrayHelper(a));
-}
-
-// Array with many elements.
-TEST(PrintArrayTest, BigArray) {
- int a[100] = { 1, 2, 3 };
- EXPECT_EQ("{ 1, 2, 3, 0, 0, 0, 0, 0, ..., 0, 0, 0, 0, 0, 0, 0, 0 }",
- PrintArrayHelper(a));
-}
-
-// Tests printing ::string and ::std::string.
-
-#if GTEST_HAS_GLOBAL_STRING
-// ::string.
-TEST(PrintStringTest, StringInGlobalNamespace) {
- const char s[] = "'\"?\\\a\b\f\n\0\r\t\v\x7F\xFF a";
- const ::string str(s, sizeof(s));
- EXPECT_EQ("\"'\\\"?\\\\\\a\\b\\f\\n\\0\\r\\t\\v\\x7F\\xFF a\\0\"",
- Print(str));
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-// ::std::string.
-TEST(PrintStringTest, StringInStdNamespace) {
- const char s[] = "'\"?\\\a\b\f\n\0\r\t\v\x7F\xFF a";
- const ::std::string str(s, sizeof(s));
- EXPECT_EQ("\"'\\\"?\\\\\\a\\b\\f\\n\\0\\r\\t\\v\\x7F\\xFF a\\0\"",
- Print(str));
-}
-
-TEST(PrintStringTest, StringAmbiguousHex) {
- // "\x6BANANA" is ambiguous, it can be interpreted as starting with either of:
- // '\x6', '\x6B', or '\x6BA'.
-
- // a hex escaping sequence following by a decimal digit
- EXPECT_EQ("\"0\\x12\" \"3\"", Print(::std::string("0\x12" "3")));
- // a hex escaping sequence following by a hex digit (lower-case)
- EXPECT_EQ("\"mm\\x6\" \"bananas\"", Print(::std::string("mm\x6" "bananas")));
- // a hex escaping sequence following by a hex digit (upper-case)
- EXPECT_EQ("\"NOM\\x6\" \"BANANA\"", Print(::std::string("NOM\x6" "BANANA")));
- // a hex escaping sequence following by a non-xdigit
- EXPECT_EQ("\"!\\x5-!\"", Print(::std::string("!\x5-!")));
-}
-
-// Tests printing ::wstring and ::std::wstring.
-
-#if GTEST_HAS_GLOBAL_WSTRING
-// ::wstring.
-TEST(PrintWideStringTest, StringInGlobalNamespace) {
- const wchar_t s[] = L"'\"?\\\a\b\f\n\0\r\t\v\xD3\x576\x8D3\xC74D a";
- const ::wstring str(s, sizeof(s)/sizeof(wchar_t));
- EXPECT_EQ("L\"'\\\"?\\\\\\a\\b\\f\\n\\0\\r\\t\\v"
- "\\xD3\\x576\\x8D3\\xC74D a\\0\"",
- Print(str));
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-#if GTEST_HAS_STD_WSTRING
-// ::std::wstring.
-TEST(PrintWideStringTest, StringInStdNamespace) {
- const wchar_t s[] = L"'\"?\\\a\b\f\n\0\r\t\v\xD3\x576\x8D3\xC74D a";
- const ::std::wstring str(s, sizeof(s)/sizeof(wchar_t));
- EXPECT_EQ("L\"'\\\"?\\\\\\a\\b\\f\\n\\0\\r\\t\\v"
- "\\xD3\\x576\\x8D3\\xC74D a\\0\"",
- Print(str));
-}
-
-TEST(PrintWideStringTest, StringAmbiguousHex) {
- // same for wide strings.
- EXPECT_EQ("L\"0\\x12\" L\"3\"", Print(::std::wstring(L"0\x12" L"3")));
- EXPECT_EQ("L\"mm\\x6\" L\"bananas\"",
- Print(::std::wstring(L"mm\x6" L"bananas")));
- EXPECT_EQ("L\"NOM\\x6\" L\"BANANA\"",
- Print(::std::wstring(L"NOM\x6" L"BANANA")));
- EXPECT_EQ("L\"!\\x5-!\"", Print(::std::wstring(L"!\x5-!")));
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-// Tests printing types that support generic streaming (i.e. streaming
-// to std::basic_ostream<Char, CharTraits> for any valid Char and
-// CharTraits types).
-
-// Tests printing a non-template type that supports generic streaming.
-
-class AllowsGenericStreaming {};
-
-template <typename Char, typename CharTraits>
-std::basic_ostream<Char, CharTraits>& operator<<(
- std::basic_ostream<Char, CharTraits>& os,
- const AllowsGenericStreaming& /* a */) {
- return os << "AllowsGenericStreaming";
-}
-
-TEST(PrintTypeWithGenericStreamingTest, NonTemplateType) {
- AllowsGenericStreaming a;
- EXPECT_EQ("AllowsGenericStreaming", Print(a));
-}
-
-// Tests printing a template type that supports generic streaming.
-
-template <typename T>
-class AllowsGenericStreamingTemplate {};
-
-template <typename Char, typename CharTraits, typename T>
-std::basic_ostream<Char, CharTraits>& operator<<(
- std::basic_ostream<Char, CharTraits>& os,
- const AllowsGenericStreamingTemplate<T>& /* a */) {
- return os << "AllowsGenericStreamingTemplate";
-}
-
-TEST(PrintTypeWithGenericStreamingTest, TemplateType) {
- AllowsGenericStreamingTemplate<int> a;
- EXPECT_EQ("AllowsGenericStreamingTemplate", Print(a));
-}
-
-// Tests printing a type that supports generic streaming and can be
-// implicitly converted to another printable type.
-
-template <typename T>
-class AllowsGenericStreamingAndImplicitConversionTemplate {
- public:
- operator bool() const { return false; }
-};
-
-template <typename Char, typename CharTraits, typename T>
-std::basic_ostream<Char, CharTraits>& operator<<(
- std::basic_ostream<Char, CharTraits>& os,
- const AllowsGenericStreamingAndImplicitConversionTemplate<T>& /* a */) {
- return os << "AllowsGenericStreamingAndImplicitConversionTemplate";
-}
-
-TEST(PrintTypeWithGenericStreamingTest, TypeImplicitlyConvertible) {
- AllowsGenericStreamingAndImplicitConversionTemplate<int> a;
- EXPECT_EQ("AllowsGenericStreamingAndImplicitConversionTemplate", Print(a));
-}
-
-#if GTEST_HAS_STRING_PIECE_
-
-// Tests printing StringPiece.
-
-TEST(PrintStringPieceTest, SimpleStringPiece) {
- const StringPiece sp = "Hello";
- EXPECT_EQ("\"Hello\"", Print(sp));
-}
-
-TEST(PrintStringPieceTest, UnprintableCharacters) {
- const char str[] = "NUL (\0) and \r\t";
- const StringPiece sp(str, sizeof(str) - 1);
- EXPECT_EQ("\"NUL (\\0) and \\r\\t\"", Print(sp));
-}
-
-#endif // GTEST_HAS_STRING_PIECE_
-
-// Tests printing STL containers.
-
-TEST(PrintStlContainerTest, EmptyDeque) {
- deque<char> empty;
- EXPECT_EQ("{}", Print(empty));
-}
-
-TEST(PrintStlContainerTest, NonEmptyDeque) {
- deque<int> non_empty;
- non_empty.push_back(1);
- non_empty.push_back(3);
- EXPECT_EQ("{ 1, 3 }", Print(non_empty));
-}
-
-#if GTEST_HAS_HASH_MAP_
-
-TEST(PrintStlContainerTest, OneElementHashMap) {
- hash_map<int, char> map1;
- map1[1] = 'a';
- EXPECT_EQ("{ (1, 'a' (97, 0x61)) }", Print(map1));
-}
-
-TEST(PrintStlContainerTest, HashMultiMap) {
- hash_multimap<int, bool> map1;
- map1.insert(make_pair(5, true));
- map1.insert(make_pair(5, false));
-
- // Elements of hash_multimap can be printed in any order.
- const string result = Print(map1);
- EXPECT_TRUE(result == "{ (5, true), (5, false) }" ||
- result == "{ (5, false), (5, true) }")
- << " where Print(map1) returns \"" << result << "\".";
-}
-
-#endif // GTEST_HAS_HASH_MAP_
-
-#if GTEST_HAS_HASH_SET_
-
-TEST(PrintStlContainerTest, HashSet) {
- hash_set<string> set1;
- set1.insert("hello");
- EXPECT_EQ("{ \"hello\" }", Print(set1));
-}
-
-TEST(PrintStlContainerTest, HashMultiSet) {
- const int kSize = 5;
- int a[kSize] = { 1, 1, 2, 5, 1 };
- hash_multiset<int> set1(a, a + kSize);
-
- // Elements of hash_multiset can be printed in any order.
- const string result = Print(set1);
- const string expected_pattern = "{ d, d, d, d, d }"; // d means a digit.
-
- // Verifies the result matches the expected pattern; also extracts
- // the numbers in the result.
- ASSERT_EQ(expected_pattern.length(), result.length());
- std::vector<int> numbers;
- for (size_t i = 0; i != result.length(); i++) {
- if (expected_pattern[i] == 'd') {
- ASSERT_TRUE(isdigit(static_cast<unsigned char>(result[i])) != 0);
- numbers.push_back(result[i] - '0');
- } else {
- EXPECT_EQ(expected_pattern[i], result[i]) << " where result is "
- << result;
- }
- }
-
- // Makes sure the result contains the right numbers.
- std::sort(numbers.begin(), numbers.end());
- std::sort(a, a + kSize);
- EXPECT_TRUE(std::equal(a, a + kSize, numbers.begin()));
-}
-
-#endif // GTEST_HAS_HASH_SET_
-
-TEST(PrintStlContainerTest, List) {
- const string a[] = {
- "hello",
- "world"
- };
- const list<string> strings(a, a + 2);
- EXPECT_EQ("{ \"hello\", \"world\" }", Print(strings));
-}
-
-TEST(PrintStlContainerTest, Map) {
- map<int, bool> map1;
- map1[1] = true;
- map1[5] = false;
- map1[3] = true;
- EXPECT_EQ("{ (1, true), (3, true), (5, false) }", Print(map1));
-}
-
-TEST(PrintStlContainerTest, MultiMap) {
- multimap<bool, int> map1;
- // The make_pair template function would deduce the type as
- // pair<bool, int> here, and since the key part in a multimap has to
- // be constant, without a templated ctor in the pair class (as in
- // libCstd on Solaris), make_pair call would fail to compile as no
- // implicit conversion is found. Thus explicit typename is used
- // here instead.
- map1.insert(pair<const bool, int>(true, 0));
- map1.insert(pair<const bool, int>(true, 1));
- map1.insert(pair<const bool, int>(false, 2));
- EXPECT_EQ("{ (false, 2), (true, 0), (true, 1) }", Print(map1));
-}
-
-TEST(PrintStlContainerTest, Set) {
- const unsigned int a[] = { 3, 0, 5 };
- set<unsigned int> set1(a, a + 3);
- EXPECT_EQ("{ 0, 3, 5 }", Print(set1));
-}
-
-TEST(PrintStlContainerTest, MultiSet) {
- const int a[] = { 1, 1, 2, 5, 1 };
- multiset<int> set1(a, a + 5);
- EXPECT_EQ("{ 1, 1, 1, 2, 5 }", Print(set1));
-}
-
-TEST(PrintStlContainerTest, Pair) {
- pair<const bool, int> p(true, 5);
- EXPECT_EQ("(true, 5)", Print(p));
-}
-
-TEST(PrintStlContainerTest, Vector) {
- vector<int> v;
- v.push_back(1);
- v.push_back(2);
- EXPECT_EQ("{ 1, 2 }", Print(v));
-}
-
-TEST(PrintStlContainerTest, LongSequence) {
- const int a[100] = { 1, 2, 3 };
- const vector<int> v(a, a + 100);
- EXPECT_EQ("{ 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
- "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... }", Print(v));
-}
-
-TEST(PrintStlContainerTest, NestedContainer) {
- const int a1[] = { 1, 2 };
- const int a2[] = { 3, 4, 5 };
- const list<int> l1(a1, a1 + 2);
- const list<int> l2(a2, a2 + 3);
-
- vector<list<int> > v;
- v.push_back(l1);
- v.push_back(l2);
- EXPECT_EQ("{ { 1, 2 }, { 3, 4, 5 } }", Print(v));
-}
-
-TEST(PrintStlContainerTest, OneDimensionalNativeArray) {
- const int a[3] = { 1, 2, 3 };
- NativeArray<int> b(a, 3, kReference);
- EXPECT_EQ("{ 1, 2, 3 }", Print(b));
-}
-
-TEST(PrintStlContainerTest, TwoDimensionalNativeArray) {
- const int a[2][3] = { { 1, 2, 3 }, { 4, 5, 6 } };
- NativeArray<int[3]> b(a, 2, kReference);
- EXPECT_EQ("{ { 1, 2, 3 }, { 4, 5, 6 } }", Print(b));
-}
-
-// Tests that a class named iterator isn't treated as a container.
-
-struct iterator {
- char x;
-};
-
-TEST(PrintStlContainerTest, Iterator) {
- iterator it = {};
- EXPECT_EQ("1-byte object <00>", Print(it));
-}
-
-// Tests that a class named const_iterator isn't treated as a container.
-
-struct const_iterator {
- char x;
-};
-
-TEST(PrintStlContainerTest, ConstIterator) {
- const_iterator it = {};
- EXPECT_EQ("1-byte object <00>", Print(it));
-}
-
-#if GTEST_HAS_TR1_TUPLE
-// Tests printing tuples.
-
-// Tuples of various arities.
-TEST(PrintTupleTest, VariousSizes) {
- tuple<> t0;
- EXPECT_EQ("()", Print(t0));
-
- tuple<int> t1(5);
- EXPECT_EQ("(5)", Print(t1));
-
- tuple<char, bool> t2('a', true);
- EXPECT_EQ("('a' (97, 0x61), true)", Print(t2));
-
- tuple<bool, int, int> t3(false, 2, 3);
- EXPECT_EQ("(false, 2, 3)", Print(t3));
-
- tuple<bool, int, int, int> t4(false, 2, 3, 4);
- EXPECT_EQ("(false, 2, 3, 4)", Print(t4));
-
- tuple<bool, int, int, int, bool> t5(false, 2, 3, 4, true);
- EXPECT_EQ("(false, 2, 3, 4, true)", Print(t5));
-
- tuple<bool, int, int, int, bool, int> t6(false, 2, 3, 4, true, 6);
- EXPECT_EQ("(false, 2, 3, 4, true, 6)", Print(t6));
-
- tuple<bool, int, int, int, bool, int, int> t7(false, 2, 3, 4, true, 6, 7);
- EXPECT_EQ("(false, 2, 3, 4, true, 6, 7)", Print(t7));
-
- tuple<bool, int, int, int, bool, int, int, bool> t8(
- false, 2, 3, 4, true, 6, 7, true);
- EXPECT_EQ("(false, 2, 3, 4, true, 6, 7, true)", Print(t8));
-
- tuple<bool, int, int, int, bool, int, int, bool, int> t9(
- false, 2, 3, 4, true, 6, 7, true, 9);
- EXPECT_EQ("(false, 2, 3, 4, true, 6, 7, true, 9)", Print(t9));
-
- const char* const str = "8";
- tuple<bool, char, short, testing::internal::Int32, // NOLINT
- testing::internal::Int64, float, double, const char*, void*, string>
- t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str, NULL, "10");
- EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) +
- " pointing to \"8\", NULL, \"10\")",
- Print(t10));
-}
-
-// Nested tuples.
-TEST(PrintTupleTest, NestedTuple) {
- tuple<tuple<int, bool>, char> nested(make_tuple(5, true), 'a');
- EXPECT_EQ("((5, true), 'a' (97, 0x61))", Print(nested));
-}
-
-#endif // GTEST_HAS_TR1_TUPLE
-
-// Tests printing user-defined unprintable types.
-
-// Unprintable types in the global namespace.
-TEST(PrintUnprintableTypeTest, InGlobalNamespace) {
- EXPECT_EQ("1-byte object <00>",
- Print(UnprintableTemplateInGlobal<char>()));
-}
-
-// Unprintable types in a user namespace.
-TEST(PrintUnprintableTypeTest, InUserNamespace) {
- EXPECT_EQ("16-byte object <EF-12 00-00 34-AB 00-00 00-00 00-00 00-00 00-00>",
- Print(::foo::UnprintableInFoo()));
-}
-
-// Unprintable types are that too big to be printed completely.
-
-struct Big {
- Big() { memset(array, 0, sizeof(array)); }
- char array[257];
-};
-
-TEST(PrintUnpritableTypeTest, BigObject) {
- EXPECT_EQ("257-byte object <00-00 00-00 00-00 00-00 00-00 00-00 "
- "00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 "
- "00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 "
- "00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 "
- "00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 "
- "00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 "
- "00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00>",
- Print(Big()));
-}
-
-// Tests printing user-defined streamable types.
-
-// Streamable types in the global namespace.
-TEST(PrintStreamableTypeTest, InGlobalNamespace) {
- StreamableInGlobal x;
- EXPECT_EQ("StreamableInGlobal", Print(x));
- EXPECT_EQ("StreamableInGlobal*", Print(&x));
-}
-
-// Printable template types in a user namespace.
-TEST(PrintStreamableTypeTest, TemplateTypeInUserNamespace) {
- EXPECT_EQ("StreamableTemplateInFoo: 0",
- Print(::foo::StreamableTemplateInFoo<int>()));
-}
-
-// Tests printing user-defined types that have a PrintTo() function.
-TEST(PrintPrintableTypeTest, InUserNamespace) {
- EXPECT_EQ("PrintableViaPrintTo: 0",
- Print(::foo::PrintableViaPrintTo()));
-}
-
-// Tests printing a pointer to a user-defined type that has a <<
-// operator for its pointer.
-TEST(PrintPrintableTypeTest, PointerInUserNamespace) {
- ::foo::PointerPrintable x;
- EXPECT_EQ("PointerPrintable*", Print(&x));
-}
-
-// Tests printing user-defined class template that have a PrintTo() function.
-TEST(PrintPrintableTypeTest, TemplateInUserNamespace) {
- EXPECT_EQ("PrintableViaPrintToTemplate: 5",
- Print(::foo::PrintableViaPrintToTemplate<int>(5)));
-}
-
-#if GTEST_HAS_PROTOBUF_
-
-// Tests printing a protocol message.
-TEST(PrintProtocolMessageTest, PrintsShortDebugString) {
- testing::internal::TestMessage msg;
- msg.set_member("yes");
- EXPECT_EQ("<member:\"yes\">", Print(msg));
-}
-
-// Tests printing a short proto2 message.
-TEST(PrintProto2MessageTest, PrintsShortDebugStringWhenItIsShort) {
- testing::internal::FooMessage msg;
- msg.set_int_field(2);
- msg.set_string_field("hello");
- EXPECT_PRED2(RE::FullMatch, Print(msg),
- "<int_field:\\s*2\\s+string_field:\\s*\"hello\">");
-}
-
-// Tests printing a long proto2 message.
-TEST(PrintProto2MessageTest, PrintsDebugStringWhenItIsLong) {
- testing::internal::FooMessage msg;
- msg.set_int_field(2);
- msg.set_string_field("hello");
- msg.add_names("peter");
- msg.add_names("paul");
- msg.add_names("mary");
- EXPECT_PRED2(RE::FullMatch, Print(msg),
- "<\n"
- "int_field:\\s*2\n"
- "string_field:\\s*\"hello\"\n"
- "names:\\s*\"peter\"\n"
- "names:\\s*\"paul\"\n"
- "names:\\s*\"mary\"\n"
- ">");
-}
-
-#endif // GTEST_HAS_PROTOBUF_
-
-// Tests that the universal printer prints both the address and the
-// value of a reference.
-TEST(PrintReferenceTest, PrintsAddressAndValue) {
- int n = 5;
- EXPECT_EQ("@" + PrintPointer(&n) + " 5", PrintByRef(n));
-
- int a[2][3] = {
- { 0, 1, 2 },
- { 3, 4, 5 }
- };
- EXPECT_EQ("@" + PrintPointer(a) + " { { 0, 1, 2 }, { 3, 4, 5 } }",
- PrintByRef(a));
-
- const ::foo::UnprintableInFoo x;
- EXPECT_EQ("@" + PrintPointer(&x) + " 16-byte object "
- "<EF-12 00-00 34-AB 00-00 00-00 00-00 00-00 00-00>",
- PrintByRef(x));
-}
-
-// Tests that the universal printer prints a function pointer passed by
-// reference.
-TEST(PrintReferenceTest, HandlesFunctionPointer) {
- void (*fp)(int n) = &MyFunction;
- const string fp_pointer_string =
- PrintPointer(reinterpret_cast<const void*>(&fp));
- // We cannot directly cast &MyFunction to const void* because the
- // standard disallows casting between pointers to functions and
- // pointers to objects, and some compilers (e.g. GCC 3.4) enforce
- // this limitation.
- const string fp_string = PrintPointer(reinterpret_cast<const void*>(
- reinterpret_cast<internal::BiggestInt>(fp)));
- EXPECT_EQ("@" + fp_pointer_string + " " + fp_string,
- PrintByRef(fp));
-}
-
-// Tests that the universal printer prints a member function pointer
-// passed by reference.
-TEST(PrintReferenceTest, HandlesMemberFunctionPointer) {
- int (Foo::*p)(char ch) = &Foo::MyMethod;
- EXPECT_TRUE(HasPrefix(
- PrintByRef(p),
- "@" + PrintPointer(reinterpret_cast<const void*>(&p)) + " " +
- Print(sizeof(p)) + "-byte object "));
-
- char (Foo::*p2)(int n) = &Foo::MyVirtualMethod;
- EXPECT_TRUE(HasPrefix(
- PrintByRef(p2),
- "@" + PrintPointer(reinterpret_cast<const void*>(&p2)) + " " +
- Print(sizeof(p2)) + "-byte object "));
-}
-
-// Tests that the universal printer prints a member variable pointer
-// passed by reference.
-TEST(PrintReferenceTest, HandlesMemberVariablePointer) {
- int (Foo::*p) = &Foo::value; // NOLINT
- EXPECT_TRUE(HasPrefix(
- PrintByRef(p),
- "@" + PrintPointer(&p) + " " + Print(sizeof(p)) + "-byte object "));
-}
-
-// Useful for testing PrintToString(). We cannot use EXPECT_EQ()
-// there as its implementation uses PrintToString(). The caller must
-// ensure that 'value' has no side effect.
-#define EXPECT_PRINT_TO_STRING_(value, expected_string) \
- EXPECT_TRUE(PrintToString(value) == (expected_string)) \
- << " where " #value " prints as " << (PrintToString(value))
-
-TEST(PrintToStringTest, WorksForScalar) {
- EXPECT_PRINT_TO_STRING_(123, "123");
-}
-
-TEST(PrintToStringTest, WorksForPointerToConstChar) {
- const char* p = "hello";
- EXPECT_PRINT_TO_STRING_(p, "\"hello\"");
-}
-
-TEST(PrintToStringTest, WorksForPointerToNonConstChar) {
- char s[] = "hello";
- char* p = s;
- EXPECT_PRINT_TO_STRING_(p, "\"hello\"");
-}
-
-TEST(PrintToStringTest, WorksForArray) {
- int n[3] = { 1, 2, 3 };
- EXPECT_PRINT_TO_STRING_(n, "{ 1, 2, 3 }");
-}
-
-#undef EXPECT_PRINT_TO_STRING_
-
-TEST(UniversalTersePrintTest, WorksForNonReference) {
- ::std::stringstream ss;
- UniversalTersePrint(123, &ss);
- EXPECT_EQ("123", ss.str());
-}
-
-TEST(UniversalTersePrintTest, WorksForReference) {
- const int& n = 123;
- ::std::stringstream ss;
- UniversalTersePrint(n, &ss);
- EXPECT_EQ("123", ss.str());
-}
-
-TEST(UniversalTersePrintTest, WorksForCString) {
- const char* s1 = "abc";
- ::std::stringstream ss1;
- UniversalTersePrint(s1, &ss1);
- EXPECT_EQ("\"abc\"", ss1.str());
-
- char* s2 = const_cast<char*>(s1);
- ::std::stringstream ss2;
- UniversalTersePrint(s2, &ss2);
- EXPECT_EQ("\"abc\"", ss2.str());
-
- const char* s3 = NULL;
- ::std::stringstream ss3;
- UniversalTersePrint(s3, &ss3);
- EXPECT_EQ("NULL", ss3.str());
-}
-
-TEST(UniversalPrintTest, WorksForNonReference) {
- ::std::stringstream ss;
- UniversalPrint(123, &ss);
- EXPECT_EQ("123", ss.str());
-}
-
-TEST(UniversalPrintTest, WorksForReference) {
- const int& n = 123;
- ::std::stringstream ss;
- UniversalPrint(n, &ss);
- EXPECT_EQ("123", ss.str());
-}
-
-TEST(UniversalPrintTest, WorksForCString) {
- const char* s1 = "abc";
- ::std::stringstream ss1;
- UniversalPrint(s1, &ss1);
- EXPECT_EQ(PrintPointer(s1) + " pointing to \"abc\"", string(ss1.str()));
-
- char* s2 = const_cast<char*>(s1);
- ::std::stringstream ss2;
- UniversalPrint(s2, &ss2);
- EXPECT_EQ(PrintPointer(s2) + " pointing to \"abc\"", string(ss2.str()));
-
- const char* s3 = NULL;
- ::std::stringstream ss3;
- UniversalPrint(s3, &ss3);
- EXPECT_EQ("NULL", ss3.str());
-}
-
-
-#if GTEST_HAS_TR1_TUPLE
-
-TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsEmptyTuple) {
- Strings result = UniversalTersePrintTupleFieldsToStrings(make_tuple());
- EXPECT_EQ(0u, result.size());
-}
-
-TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsOneTuple) {
- Strings result = UniversalTersePrintTupleFieldsToStrings(make_tuple(1));
- ASSERT_EQ(1u, result.size());
- EXPECT_EQ("1", result[0]);
-}
-
-TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsTwoTuple) {
- Strings result = UniversalTersePrintTupleFieldsToStrings(make_tuple(1, 'a'));
- ASSERT_EQ(2u, result.size());
- EXPECT_EQ("1", result[0]);
- EXPECT_EQ("'a' (97, 0x61)", result[1]);
-}
-
-TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsTersely) {
- const int n = 1;
- Strings result = UniversalTersePrintTupleFieldsToStrings(
- tuple<const int&, const char*>(n, "a"));
- ASSERT_EQ(2u, result.size());
- EXPECT_EQ("1", result[0]);
- EXPECT_EQ("\"a\"", result[1]);
-}
-
-#endif // GTEST_HAS_TR1_TUPLE
-
-} // namespace gtest_printers_test
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-test-part_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-test-part_test.cc
deleted file mode 100644
index ca8ba933a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-test-part_test.cc
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-
-#include "gtest/gtest-test-part.h"
-
-#include "gtest/gtest.h"
-
-using testing::Message;
-using testing::Test;
-using testing::TestPartResult;
-using testing::TestPartResultArray;
-
-namespace {
-
-// Tests the TestPartResult class.
-
-// The test fixture for testing TestPartResult.
-class TestPartResultTest : public Test {
- protected:
- TestPartResultTest()
- : r1_(TestPartResult::kSuccess, "foo/bar.cc", 10, "Success!"),
- r2_(TestPartResult::kNonFatalFailure, "foo/bar.cc", -1, "Failure!"),
- r3_(TestPartResult::kFatalFailure, NULL, -1, "Failure!") {}
-
- TestPartResult r1_, r2_, r3_;
-};
-
-
-TEST_F(TestPartResultTest, ConstructorWorks) {
- Message message;
- message << "something is terribly wrong";
- message << static_cast<const char*>(testing::internal::kStackTraceMarker);
- message << "some unimportant stack trace";
-
- const TestPartResult result(TestPartResult::kNonFatalFailure,
- "some_file.cc",
- 42,
- message.GetString().c_str());
-
- EXPECT_EQ(TestPartResult::kNonFatalFailure, result.type());
- EXPECT_STREQ("some_file.cc", result.file_name());
- EXPECT_EQ(42, result.line_number());
- EXPECT_STREQ(message.GetString().c_str(), result.message());
- EXPECT_STREQ("something is terribly wrong", result.summary());
-}
-
-TEST_F(TestPartResultTest, ResultAccessorsWork) {
- const TestPartResult success(TestPartResult::kSuccess,
- "file.cc",
- 42,
- "message");
- EXPECT_TRUE(success.passed());
- EXPECT_FALSE(success.failed());
- EXPECT_FALSE(success.nonfatally_failed());
- EXPECT_FALSE(success.fatally_failed());
-
- const TestPartResult nonfatal_failure(TestPartResult::kNonFatalFailure,
- "file.cc",
- 42,
- "message");
- EXPECT_FALSE(nonfatal_failure.passed());
- EXPECT_TRUE(nonfatal_failure.failed());
- EXPECT_TRUE(nonfatal_failure.nonfatally_failed());
- EXPECT_FALSE(nonfatal_failure.fatally_failed());
-
- const TestPartResult fatal_failure(TestPartResult::kFatalFailure,
- "file.cc",
- 42,
- "message");
- EXPECT_FALSE(fatal_failure.passed());
- EXPECT_TRUE(fatal_failure.failed());
- EXPECT_FALSE(fatal_failure.nonfatally_failed());
- EXPECT_TRUE(fatal_failure.fatally_failed());
-}
-
-// Tests TestPartResult::type().
-TEST_F(TestPartResultTest, type) {
- EXPECT_EQ(TestPartResult::kSuccess, r1_.type());
- EXPECT_EQ(TestPartResult::kNonFatalFailure, r2_.type());
- EXPECT_EQ(TestPartResult::kFatalFailure, r3_.type());
-}
-
-// Tests TestPartResult::file_name().
-TEST_F(TestPartResultTest, file_name) {
- EXPECT_STREQ("foo/bar.cc", r1_.file_name());
- EXPECT_STREQ(NULL, r3_.file_name());
-}
-
-// Tests TestPartResult::line_number().
-TEST_F(TestPartResultTest, line_number) {
- EXPECT_EQ(10, r1_.line_number());
- EXPECT_EQ(-1, r2_.line_number());
-}
-
-// Tests TestPartResult::message().
-TEST_F(TestPartResultTest, message) {
- EXPECT_STREQ("Success!", r1_.message());
-}
-
-// Tests TestPartResult::passed().
-TEST_F(TestPartResultTest, Passed) {
- EXPECT_TRUE(r1_.passed());
- EXPECT_FALSE(r2_.passed());
- EXPECT_FALSE(r3_.passed());
-}
-
-// Tests TestPartResult::failed().
-TEST_F(TestPartResultTest, Failed) {
- EXPECT_FALSE(r1_.failed());
- EXPECT_TRUE(r2_.failed());
- EXPECT_TRUE(r3_.failed());
-}
-
-// Tests TestPartResult::fatally_failed().
-TEST_F(TestPartResultTest, FatallyFailed) {
- EXPECT_FALSE(r1_.fatally_failed());
- EXPECT_FALSE(r2_.fatally_failed());
- EXPECT_TRUE(r3_.fatally_failed());
-}
-
-// Tests TestPartResult::nonfatally_failed().
-TEST_F(TestPartResultTest, NonfatallyFailed) {
- EXPECT_FALSE(r1_.nonfatally_failed());
- EXPECT_TRUE(r2_.nonfatally_failed());
- EXPECT_FALSE(r3_.nonfatally_failed());
-}
-
-// Tests the TestPartResultArray class.
-
-class TestPartResultArrayTest : public Test {
- protected:
- TestPartResultArrayTest()
- : r1_(TestPartResult::kNonFatalFailure, "foo/bar.cc", -1, "Failure 1"),
- r2_(TestPartResult::kFatalFailure, "foo/bar.cc", -1, "Failure 2") {}
-
- const TestPartResult r1_, r2_;
-};
-
-// Tests that TestPartResultArray initially has size 0.
-TEST_F(TestPartResultArrayTest, InitialSizeIsZero) {
- TestPartResultArray results;
- EXPECT_EQ(0, results.size());
-}
-
-// Tests that TestPartResultArray contains the given TestPartResult
-// after one Append() operation.
-TEST_F(TestPartResultArrayTest, ContainsGivenResultAfterAppend) {
- TestPartResultArray results;
- results.Append(r1_);
- EXPECT_EQ(1, results.size());
- EXPECT_STREQ("Failure 1", results.GetTestPartResult(0).message());
-}
-
-// Tests that TestPartResultArray contains the given TestPartResults
-// after two Append() operations.
-TEST_F(TestPartResultArrayTest, ContainsGivenResultsAfterTwoAppends) {
- TestPartResultArray results;
- results.Append(r1_);
- results.Append(r2_);
- EXPECT_EQ(2, results.size());
- EXPECT_STREQ("Failure 1", results.GetTestPartResult(0).message());
- EXPECT_STREQ("Failure 2", results.GetTestPartResult(1).message());
-}
-
-typedef TestPartResultArrayTest TestPartResultArrayDeathTest;
-
-// Tests that the program dies when GetTestPartResult() is called with
-// an invalid index.
-TEST_F(TestPartResultArrayDeathTest, DiesWhenIndexIsOutOfBound) {
- TestPartResultArray results;
- results.Append(r1_);
-
- EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(-1), "");
- EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(1), "");
-}
-
-// TODO(mheule@google.com): Add a test for the class HasNewFatalFailureHelper.
-
-} // namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-tuple_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-tuple_test.cc
deleted file mode 100644
index bfaa3e0ac..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-tuple_test.cc
+++ /dev/null
@@ -1,320 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/internal/gtest-tuple.h"
-#include <utility>
-#include "gtest/gtest.h"
-
-namespace {
-
-using ::std::tr1::get;
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-using ::std::tr1::tuple_element;
-using ::std::tr1::tuple_size;
-using ::testing::StaticAssertTypeEq;
-
-// Tests that tuple_element<K, tuple<T0, T1, ..., TN> >::type returns TK.
-TEST(tuple_element_Test, ReturnsElementType) {
- StaticAssertTypeEq<int, tuple_element<0, tuple<int, char> >::type>();
- StaticAssertTypeEq<int&, tuple_element<1, tuple<double, int&> >::type>();
- StaticAssertTypeEq<bool, tuple_element<2, tuple<double, int, bool> >::type>();
-}
-
-// Tests that tuple_size<T>::value gives the number of fields in tuple
-// type T.
-TEST(tuple_size_Test, ReturnsNumberOfFields) {
- EXPECT_EQ(0, +tuple_size<tuple<> >::value);
- EXPECT_EQ(1, +tuple_size<tuple<void*> >::value);
- EXPECT_EQ(1, +tuple_size<tuple<char> >::value);
- EXPECT_EQ(1, +(tuple_size<tuple<tuple<int, double> > >::value));
- EXPECT_EQ(2, +(tuple_size<tuple<int&, const char> >::value));
- EXPECT_EQ(3, +(tuple_size<tuple<char*, void, const bool&> >::value));
-}
-
-// Tests comparing a tuple with itself.
-TEST(ComparisonTest, ComparesWithSelf) {
- const tuple<int, char, bool> a(5, 'a', false);
-
- EXPECT_TRUE(a == a);
- EXPECT_FALSE(a != a);
-}
-
-// Tests comparing two tuples with the same value.
-TEST(ComparisonTest, ComparesEqualTuples) {
- const tuple<int, bool> a(5, true), b(5, true);
-
- EXPECT_TRUE(a == b);
- EXPECT_FALSE(a != b);
-}
-
-// Tests comparing two different tuples that have no reference fields.
-TEST(ComparisonTest, ComparesUnequalTuplesWithoutReferenceFields) {
- typedef tuple<const int, char> FooTuple;
-
- const FooTuple a(0, 'x');
- const FooTuple b(1, 'a');
-
- EXPECT_TRUE(a != b);
- EXPECT_FALSE(a == b);
-
- const FooTuple c(1, 'b');
-
- EXPECT_TRUE(b != c);
- EXPECT_FALSE(b == c);
-}
-
-// Tests comparing two different tuples that have reference fields.
-TEST(ComparisonTest, ComparesUnequalTuplesWithReferenceFields) {
- typedef tuple<int&, const char&> FooTuple;
-
- int i = 5;
- const char ch = 'a';
- const FooTuple a(i, ch);
-
- int j = 6;
- const FooTuple b(j, ch);
-
- EXPECT_TRUE(a != b);
- EXPECT_FALSE(a == b);
-
- j = 5;
- const char ch2 = 'b';
- const FooTuple c(j, ch2);
-
- EXPECT_TRUE(b != c);
- EXPECT_FALSE(b == c);
-}
-
-// Tests that a tuple field with a reference type is an alias of the
-// variable it's supposed to reference.
-TEST(ReferenceFieldTest, IsAliasOfReferencedVariable) {
- int n = 0;
- tuple<bool, int&> t(true, n);
-
- n = 1;
- EXPECT_EQ(n, get<1>(t))
- << "Changing a underlying variable should update the reference field.";
-
- // Makes sure that the implementation doesn't do anything funny with
- // the & operator for the return type of get<>().
- EXPECT_EQ(&n, &(get<1>(t)))
- << "The address of a reference field should equal the address of "
- << "the underlying variable.";
-
- get<1>(t) = 2;
- EXPECT_EQ(2, n)
- << "Changing a reference field should update the underlying variable.";
-}
-
-// Tests that tuple's default constructor default initializes each field.
-// This test needs to compile without generating warnings.
-TEST(TupleConstructorTest, DefaultConstructorDefaultInitializesEachField) {
- // The TR1 report requires that tuple's default constructor default
- // initializes each field, even if it's a primitive type. If the
- // implementation forgets to do this, this test will catch it by
- // generating warnings about using uninitialized variables (assuming
- // a decent compiler).
-
- tuple<> empty;
-
- tuple<int> a1, b1;
- b1 = a1;
- EXPECT_EQ(0, get<0>(b1));
-
- tuple<int, double> a2, b2;
- b2 = a2;
- EXPECT_EQ(0, get<0>(b2));
- EXPECT_EQ(0.0, get<1>(b2));
-
- tuple<double, char, bool*> a3, b3;
- b3 = a3;
- EXPECT_EQ(0.0, get<0>(b3));
- EXPECT_EQ('\0', get<1>(b3));
- EXPECT_TRUE(get<2>(b3) == NULL);
-
- tuple<int, int, int, int, int, int, int, int, int, int> a10, b10;
- b10 = a10;
- EXPECT_EQ(0, get<0>(b10));
- EXPECT_EQ(0, get<1>(b10));
- EXPECT_EQ(0, get<2>(b10));
- EXPECT_EQ(0, get<3>(b10));
- EXPECT_EQ(0, get<4>(b10));
- EXPECT_EQ(0, get<5>(b10));
- EXPECT_EQ(0, get<6>(b10));
- EXPECT_EQ(0, get<7>(b10));
- EXPECT_EQ(0, get<8>(b10));
- EXPECT_EQ(0, get<9>(b10));
-}
-
-// Tests constructing a tuple from its fields.
-TEST(TupleConstructorTest, ConstructsFromFields) {
- int n = 1;
- // Reference field.
- tuple<int&> a(n);
- EXPECT_EQ(&n, &(get<0>(a)));
-
- // Non-reference fields.
- tuple<int, char> b(5, 'a');
- EXPECT_EQ(5, get<0>(b));
- EXPECT_EQ('a', get<1>(b));
-
- // Const reference field.
- const int m = 2;
- tuple<bool, const int&> c(true, m);
- EXPECT_TRUE(get<0>(c));
- EXPECT_EQ(&m, &(get<1>(c)));
-}
-
-// Tests tuple's copy constructor.
-TEST(TupleConstructorTest, CopyConstructor) {
- tuple<double, bool> a(0.0, true);
- tuple<double, bool> b(a);
-
- EXPECT_DOUBLE_EQ(0.0, get<0>(b));
- EXPECT_TRUE(get<1>(b));
-}
-
-// Tests constructing a tuple from another tuple that has a compatible
-// but different type.
-TEST(TupleConstructorTest, ConstructsFromDifferentTupleType) {
- tuple<int, int, char> a(0, 1, 'a');
- tuple<double, long, int> b(a);
-
- EXPECT_DOUBLE_EQ(0.0, get<0>(b));
- EXPECT_EQ(1, get<1>(b));
- EXPECT_EQ('a', get<2>(b));
-}
-
-// Tests constructing a 2-tuple from an std::pair.
-TEST(TupleConstructorTest, ConstructsFromPair) {
- ::std::pair<int, char> a(1, 'a');
- tuple<int, char> b(a);
- tuple<int, const char&> c(a);
-}
-
-// Tests assigning a tuple to another tuple with the same type.
-TEST(TupleAssignmentTest, AssignsToSameTupleType) {
- const tuple<int, long> a(5, 7L);
- tuple<int, long> b;
- b = a;
- EXPECT_EQ(5, get<0>(b));
- EXPECT_EQ(7L, get<1>(b));
-}
-
-// Tests assigning a tuple to another tuple with a different but
-// compatible type.
-TEST(TupleAssignmentTest, AssignsToDifferentTupleType) {
- const tuple<int, long, bool> a(1, 7L, true);
- tuple<long, int, bool> b;
- b = a;
- EXPECT_EQ(1L, get<0>(b));
- EXPECT_EQ(7, get<1>(b));
- EXPECT_TRUE(get<2>(b));
-}
-
-// Tests assigning an std::pair to a 2-tuple.
-TEST(TupleAssignmentTest, AssignsFromPair) {
- const ::std::pair<int, bool> a(5, true);
- tuple<int, bool> b;
- b = a;
- EXPECT_EQ(5, get<0>(b));
- EXPECT_TRUE(get<1>(b));
-
- tuple<long, bool> c;
- c = a;
- EXPECT_EQ(5L, get<0>(c));
- EXPECT_TRUE(get<1>(c));
-}
-
-// A fixture for testing big tuples.
-class BigTupleTest : public testing::Test {
- protected:
- typedef tuple<int, int, int, int, int, int, int, int, int, int> BigTuple;
-
- BigTupleTest() :
- a_(1, 0, 0, 0, 0, 0, 0, 0, 0, 2),
- b_(1, 0, 0, 0, 0, 0, 0, 0, 0, 3) {}
-
- BigTuple a_, b_;
-};
-
-// Tests constructing big tuples.
-TEST_F(BigTupleTest, Construction) {
- BigTuple a;
- BigTuple b(b_);
-}
-
-// Tests that get<N>(t) returns the N-th (0-based) field of tuple t.
-TEST_F(BigTupleTest, get) {
- EXPECT_EQ(1, get<0>(a_));
- EXPECT_EQ(2, get<9>(a_));
-
- // Tests that get() works on a const tuple too.
- const BigTuple a(a_);
- EXPECT_EQ(1, get<0>(a));
- EXPECT_EQ(2, get<9>(a));
-}
-
-// Tests comparing big tuples.
-TEST_F(BigTupleTest, Comparisons) {
- EXPECT_TRUE(a_ == a_);
- EXPECT_FALSE(a_ != a_);
-
- EXPECT_TRUE(a_ != b_);
- EXPECT_FALSE(a_ == b_);
-}
-
-TEST(MakeTupleTest, WorksForScalarTypes) {
- tuple<bool, int> a;
- a = make_tuple(true, 5);
- EXPECT_TRUE(get<0>(a));
- EXPECT_EQ(5, get<1>(a));
-
- tuple<char, int, long> b;
- b = make_tuple('a', 'b', 5);
- EXPECT_EQ('a', get<0>(b));
- EXPECT_EQ('b', get<1>(b));
- EXPECT_EQ(5, get<2>(b));
-}
-
-TEST(MakeTupleTest, WorksForPointers) {
- int a[] = { 1, 2, 3, 4 };
- const char* const str = "hi";
- int* const p = a;
-
- tuple<const char*, int*> t;
- t = make_tuple(str, p);
- EXPECT_EQ(str, get<0>(t));
- EXPECT_EQ(p, get<1>(t));
-}
-
-} // namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test2_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test2_test.cc
deleted file mode 100644
index c284700b0..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test2_test.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include <vector>
-
-#include "test/gtest-typed-test_test.h"
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_TYPED_TEST_P
-
-// Tests that the same type-parameterized test case can be
-// instantiated in different translation units linked together.
-// (ContainerTest is also instantiated in gtest-typed-test_test.cc.)
-INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest,
- testing::Types<std::vector<int> >);
-
-#endif // GTEST_HAS_TYPED_TEST_P
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.cc
deleted file mode 100644
index dd4ba43bc..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.cc
+++ /dev/null
@@ -1,360 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include <set>
-#include <vector>
-
-#include "test/gtest-typed-test_test.h"
-#include "gtest/gtest.h"
-
-using testing::Test;
-
-// Used for testing that SetUpTestCase()/TearDownTestCase(), fixture
-// ctor/dtor, and SetUp()/TearDown() work correctly in typed tests and
-// type-parameterized test.
-template <typename T>
-class CommonTest : public Test {
- // For some technical reason, SetUpTestCase() and TearDownTestCase()
- // must be public.
- public:
- static void SetUpTestCase() {
- shared_ = new T(5);
- }
-
- static void TearDownTestCase() {
- delete shared_;
- shared_ = NULL;
- }
-
- // This 'protected:' is optional. There's no harm in making all
- // members of this fixture class template public.
- protected:
- // We used to use std::list here, but switched to std::vector since
- // MSVC's <list> doesn't compile cleanly with /W4.
- typedef std::vector<T> Vector;
- typedef std::set<int> IntSet;
-
- CommonTest() : value_(1) {}
-
- virtual ~CommonTest() { EXPECT_EQ(3, value_); }
-
- virtual void SetUp() {
- EXPECT_EQ(1, value_);
- value_++;
- }
-
- virtual void TearDown() {
- EXPECT_EQ(2, value_);
- value_++;
- }
-
- T value_;
- static T* shared_;
-};
-
-template <typename T>
-T* CommonTest<T>::shared_ = NULL;
-
-// This #ifdef block tests typed tests.
-#if GTEST_HAS_TYPED_TEST
-
-using testing::Types;
-
-// Tests that SetUpTestCase()/TearDownTestCase(), fixture ctor/dtor,
-// and SetUp()/TearDown() work correctly in typed tests
-
-typedef Types<char, int> TwoTypes;
-TYPED_TEST_CASE(CommonTest, TwoTypes);
-
-TYPED_TEST(CommonTest, ValuesAreCorrect) {
- // Static members of the fixture class template can be visited via
- // the TestFixture:: prefix.
- EXPECT_EQ(5, *TestFixture::shared_);
-
- // Typedefs in the fixture class template can be visited via the
- // "typename TestFixture::" prefix.
- typename TestFixture::Vector empty;
- EXPECT_EQ(0U, empty.size());
-
- typename TestFixture::IntSet empty2;
- EXPECT_EQ(0U, empty2.size());
-
- // Non-static members of the fixture class must be visited via
- // 'this', as required by C++ for class templates.
- EXPECT_EQ(2, this->value_);
-}
-
-// The second test makes sure shared_ is not deleted after the first
-// test.
-TYPED_TEST(CommonTest, ValuesAreStillCorrect) {
- // Static members of the fixture class template can also be visited
- // via 'this'.
- ASSERT_TRUE(this->shared_ != NULL);
- EXPECT_EQ(5, *this->shared_);
-
- // TypeParam can be used to refer to the type parameter.
- EXPECT_EQ(static_cast<TypeParam>(2), this->value_);
-}
-
-// Tests that multiple TYPED_TEST_CASE's can be defined in the same
-// translation unit.
-
-template <typename T>
-class TypedTest1 : public Test {
-};
-
-// Verifies that the second argument of TYPED_TEST_CASE can be a
-// single type.
-TYPED_TEST_CASE(TypedTest1, int);
-TYPED_TEST(TypedTest1, A) {}
-
-template <typename T>
-class TypedTest2 : public Test {
-};
-
-// Verifies that the second argument of TYPED_TEST_CASE can be a
-// Types<...> type list.
-TYPED_TEST_CASE(TypedTest2, Types<int>);
-
-// This also verifies that tests from different typed test cases can
-// share the same name.
-TYPED_TEST(TypedTest2, A) {}
-
-// Tests that a typed test case can be defined in a namespace.
-
-namespace library1 {
-
-template <typename T>
-class NumericTest : public Test {
-};
-
-typedef Types<int, long> NumericTypes;
-TYPED_TEST_CASE(NumericTest, NumericTypes);
-
-TYPED_TEST(NumericTest, DefaultIsZero) {
- EXPECT_EQ(0, TypeParam());
-}
-
-} // namespace library1
-
-#endif // GTEST_HAS_TYPED_TEST
-
-// This #ifdef block tests type-parameterized tests.
-#if GTEST_HAS_TYPED_TEST_P
-
-using testing::Types;
-using testing::internal::TypedTestCasePState;
-
-// Tests TypedTestCasePState.
-
-class TypedTestCasePStateTest : public Test {
- protected:
- virtual void SetUp() {
- state_.AddTestName("foo.cc", 0, "FooTest", "A");
- state_.AddTestName("foo.cc", 0, "FooTest", "B");
- state_.AddTestName("foo.cc", 0, "FooTest", "C");
- }
-
- TypedTestCasePState state_;
-};
-
-TEST_F(TypedTestCasePStateTest, SucceedsForMatchingList) {
- const char* tests = "A, B, C";
- EXPECT_EQ(tests,
- state_.VerifyRegisteredTestNames("foo.cc", 1, tests));
-}
-
-// Makes sure that the order of the tests and spaces around the names
-// don't matter.
-TEST_F(TypedTestCasePStateTest, IgnoresOrderAndSpaces) {
- const char* tests = "A,C, B";
- EXPECT_EQ(tests,
- state_.VerifyRegisteredTestNames("foo.cc", 1, tests));
-}
-
-typedef TypedTestCasePStateTest TypedTestCasePStateDeathTest;
-
-TEST_F(TypedTestCasePStateDeathTest, DetectsDuplicates) {
- EXPECT_DEATH_IF_SUPPORTED(
- state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, A, C"),
- "foo\\.cc.1.?: Test A is listed more than once\\.");
-}
-
-TEST_F(TypedTestCasePStateDeathTest, DetectsExtraTest) {
- EXPECT_DEATH_IF_SUPPORTED(
- state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, C, D"),
- "foo\\.cc.1.?: No test named D can be found in this test case\\.");
-}
-
-TEST_F(TypedTestCasePStateDeathTest, DetectsMissedTest) {
- EXPECT_DEATH_IF_SUPPORTED(
- state_.VerifyRegisteredTestNames("foo.cc", 1, "A, C"),
- "foo\\.cc.1.?: You forgot to list test B\\.");
-}
-
-// Tests that defining a test for a parameterized test case generates
-// a run-time error if the test case has been registered.
-TEST_F(TypedTestCasePStateDeathTest, DetectsTestAfterRegistration) {
- state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, C");
- EXPECT_DEATH_IF_SUPPORTED(
- state_.AddTestName("foo.cc", 2, "FooTest", "D"),
- "foo\\.cc.2.?: Test D must be defined before REGISTER_TYPED_TEST_CASE_P"
- "\\(FooTest, \\.\\.\\.\\)\\.");
-}
-
-// Tests that SetUpTestCase()/TearDownTestCase(), fixture ctor/dtor,
-// and SetUp()/TearDown() work correctly in type-parameterized tests.
-
-template <typename T>
-class DerivedTest : public CommonTest<T> {
-};
-
-TYPED_TEST_CASE_P(DerivedTest);
-
-TYPED_TEST_P(DerivedTest, ValuesAreCorrect) {
- // Static members of the fixture class template can be visited via
- // the TestFixture:: prefix.
- EXPECT_EQ(5, *TestFixture::shared_);
-
- // Non-static members of the fixture class must be visited via
- // 'this', as required by C++ for class templates.
- EXPECT_EQ(2, this->value_);
-}
-
-// The second test makes sure shared_ is not deleted after the first
-// test.
-TYPED_TEST_P(DerivedTest, ValuesAreStillCorrect) {
- // Static members of the fixture class template can also be visited
- // via 'this'.
- ASSERT_TRUE(this->shared_ != NULL);
- EXPECT_EQ(5, *this->shared_);
- EXPECT_EQ(2, this->value_);
-}
-
-REGISTER_TYPED_TEST_CASE_P(DerivedTest,
- ValuesAreCorrect, ValuesAreStillCorrect);
-
-typedef Types<short, long> MyTwoTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(My, DerivedTest, MyTwoTypes);
-
-// Tests that multiple TYPED_TEST_CASE_P's can be defined in the same
-// translation unit.
-
-template <typename T>
-class TypedTestP1 : public Test {
-};
-
-TYPED_TEST_CASE_P(TypedTestP1);
-
-// For testing that the code between TYPED_TEST_CASE_P() and
-// TYPED_TEST_P() is not enclosed in a namespace.
-typedef int IntAfterTypedTestCaseP;
-
-TYPED_TEST_P(TypedTestP1, A) {}
-TYPED_TEST_P(TypedTestP1, B) {}
-
-// For testing that the code between TYPED_TEST_P() and
-// REGISTER_TYPED_TEST_CASE_P() is not enclosed in a namespace.
-typedef int IntBeforeRegisterTypedTestCaseP;
-
-REGISTER_TYPED_TEST_CASE_P(TypedTestP1, A, B);
-
-template <typename T>
-class TypedTestP2 : public Test {
-};
-
-TYPED_TEST_CASE_P(TypedTestP2);
-
-// This also verifies that tests from different type-parameterized
-// test cases can share the same name.
-TYPED_TEST_P(TypedTestP2, A) {}
-
-REGISTER_TYPED_TEST_CASE_P(TypedTestP2, A);
-
-// Verifies that the code between TYPED_TEST_CASE_P() and
-// REGISTER_TYPED_TEST_CASE_P() is not enclosed in a namespace.
-IntAfterTypedTestCaseP after = 0;
-IntBeforeRegisterTypedTestCaseP before = 0;
-
-// Verifies that the last argument of INSTANTIATE_TYPED_TEST_CASE_P()
-// can be either a single type or a Types<...> type list.
-INSTANTIATE_TYPED_TEST_CASE_P(Int, TypedTestP1, int);
-INSTANTIATE_TYPED_TEST_CASE_P(Int, TypedTestP2, Types<int>);
-
-// Tests that the same type-parameterized test case can be
-// instantiated more than once in the same translation unit.
-INSTANTIATE_TYPED_TEST_CASE_P(Double, TypedTestP2, Types<double>);
-
-// Tests that the same type-parameterized test case can be
-// instantiated in different translation units linked together.
-// (ContainerTest is also instantiated in gtest-typed-test_test.cc.)
-typedef Types<std::vector<double>, std::set<char> > MyContainers;
-INSTANTIATE_TYPED_TEST_CASE_P(My, ContainerTest, MyContainers);
-
-// Tests that a type-parameterized test case can be defined and
-// instantiated in a namespace.
-
-namespace library2 {
-
-template <typename T>
-class NumericTest : public Test {
-};
-
-TYPED_TEST_CASE_P(NumericTest);
-
-TYPED_TEST_P(NumericTest, DefaultIsZero) {
- EXPECT_EQ(0, TypeParam());
-}
-
-TYPED_TEST_P(NumericTest, ZeroIsLessThanOne) {
- EXPECT_LT(TypeParam(0), TypeParam(1));
-}
-
-REGISTER_TYPED_TEST_CASE_P(NumericTest,
- DefaultIsZero, ZeroIsLessThanOne);
-typedef Types<int, double> NumericTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(My, NumericTest, NumericTypes);
-
-} // namespace library2
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-#if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P)
-
-// Google Test may not support type-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, TypedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif // #if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.h
deleted file mode 100644
index 41d75704c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-typed-test_test.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
-#define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
-
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_TYPED_TEST_P
-
-using testing::Test;
-
-// For testing that the same type-parameterized test case can be
-// instantiated in different translation units linked together.
-// ContainerTest will be instantiated in both gtest-typed-test_test.cc
-// and gtest-typed-test2_test.cc.
-
-template <typename T>
-class ContainerTest : public Test {
-};
-
-TYPED_TEST_CASE_P(ContainerTest);
-
-TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) {
- TypeParam container;
-}
-
-TYPED_TEST_P(ContainerTest, InitialSizeIsZero) {
- TypeParam container;
- EXPECT_EQ(0U, container.size());
-}
-
-REGISTER_TYPED_TEST_CASE_P(ContainerTest,
- CanBeDefaultConstructed, InitialSizeIsZero);
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-#endif // GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-unittest-api_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-unittest-api_test.cc
deleted file mode 100644
index 07083e51b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest-unittest-api_test.cc
+++ /dev/null
@@ -1,341 +0,0 @@
-// Copyright 2009 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-//
-// The Google C++ Testing Framework (Google Test)
-//
-// This file contains tests verifying correctness of data provided via
-// UnitTest's public methods.
-
-#include "gtest/gtest.h"
-
-#include <string.h> // For strcmp.
-#include <algorithm>
-
-using ::testing::InitGoogleTest;
-
-namespace testing {
-namespace internal {
-
-template <typename T>
-struct LessByName {
- bool operator()(const T* a, const T* b) {
- return strcmp(a->name(), b->name()) < 0;
- }
-};
-
-class UnitTestHelper {
- public:
- // Returns the array of pointers to all test cases sorted by the test case
- // name. The caller is responsible for deleting the array.
- static TestCase const** const GetSortedTestCases() {
- UnitTest& unit_test = *UnitTest::GetInstance();
- TestCase const** const test_cases =
- new const TestCase*[unit_test.total_test_case_count()];
-
- for (int i = 0; i < unit_test.total_test_case_count(); ++i)
- test_cases[i] = unit_test.GetTestCase(i);
-
- std::sort(test_cases,
- test_cases + unit_test.total_test_case_count(),
- LessByName<TestCase>());
- return test_cases;
- }
-
- // Returns the test case by its name. The caller doesn't own the returned
- // pointer.
- static const TestCase* FindTestCase(const char* name) {
- UnitTest& unit_test = *UnitTest::GetInstance();
- for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
- const TestCase* test_case = unit_test.GetTestCase(i);
- if (0 == strcmp(test_case->name(), name))
- return test_case;
- }
- return NULL;
- }
-
- // Returns the array of pointers to all tests in a particular test case
- // sorted by the test name. The caller is responsible for deleting the
- // array.
- static TestInfo const** const GetSortedTests(const TestCase* test_case) {
- TestInfo const** const tests =
- new const TestInfo*[test_case->total_test_count()];
-
- for (int i = 0; i < test_case->total_test_count(); ++i)
- tests[i] = test_case->GetTestInfo(i);
-
- std::sort(tests, tests + test_case->total_test_count(),
- LessByName<TestInfo>());
- return tests;
- }
-};
-
-#if GTEST_HAS_TYPED_TEST
-template <typename T> class TestCaseWithCommentTest : public Test {};
-TYPED_TEST_CASE(TestCaseWithCommentTest, Types<int>);
-TYPED_TEST(TestCaseWithCommentTest, Dummy) {}
-
-const int kTypedTestCases = 1;
-const int kTypedTests = 1;
-#else
-const int kTypedTestCases = 0;
-const int kTypedTests = 0;
-#endif // GTEST_HAS_TYPED_TEST
-
-// We can only test the accessors that do not change value while tests run.
-// Since tests can be run in any order, the values the accessors that track
-// test execution (such as failed_test_count) can not be predicted.
-TEST(ApiTest, UnitTestImmutableAccessorsWork) {
- UnitTest* unit_test = UnitTest::GetInstance();
-
- ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count());
- EXPECT_EQ(1 + kTypedTestCases, unit_test->test_case_to_run_count());
- EXPECT_EQ(2, unit_test->disabled_test_count());
- EXPECT_EQ(5 + kTypedTests, unit_test->total_test_count());
- EXPECT_EQ(3 + kTypedTests, unit_test->test_to_run_count());
-
- const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases();
-
- EXPECT_STREQ("ApiTest", test_cases[0]->name());
- EXPECT_STREQ("DISABLED_Test", test_cases[1]->name());
-#if GTEST_HAS_TYPED_TEST
- EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name());
-#endif // GTEST_HAS_TYPED_TEST
-
- delete[] test_cases;
-
- // The following lines initiate actions to verify certain methods in
- // FinalSuccessChecker::TearDown.
-
- // Records a test property to verify TestResult::GetTestProperty().
- RecordProperty("key", "value");
-}
-
-AssertionResult IsNull(const char* str) {
- if (str != NULL) {
- return testing::AssertionFailure() << "argument is " << str;
- }
- return AssertionSuccess();
-}
-
-TEST(ApiTest, TestCaseImmutableAccessorsWork) {
- const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest");
- ASSERT_TRUE(test_case != NULL);
-
- EXPECT_STREQ("ApiTest", test_case->name());
- EXPECT_TRUE(IsNull(test_case->type_param()));
- EXPECT_TRUE(test_case->should_run());
- EXPECT_EQ(1, test_case->disabled_test_count());
- EXPECT_EQ(3, test_case->test_to_run_count());
- ASSERT_EQ(4, test_case->total_test_count());
-
- const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
-
- EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
- EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
- EXPECT_TRUE(IsNull(tests[0]->value_param()));
- EXPECT_TRUE(IsNull(tests[0]->type_param()));
- EXPECT_FALSE(tests[0]->should_run());
-
- EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
- EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
- EXPECT_TRUE(IsNull(tests[1]->value_param()));
- EXPECT_TRUE(IsNull(tests[1]->type_param()));
- EXPECT_TRUE(tests[1]->should_run());
-
- EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
- EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
- EXPECT_TRUE(IsNull(tests[2]->value_param()));
- EXPECT_TRUE(IsNull(tests[2]->type_param()));
- EXPECT_TRUE(tests[2]->should_run());
-
- EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
- EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
- EXPECT_TRUE(IsNull(tests[3]->value_param()));
- EXPECT_TRUE(IsNull(tests[3]->type_param()));
- EXPECT_TRUE(tests[3]->should_run());
-
- delete[] tests;
- tests = NULL;
-
-#if GTEST_HAS_TYPED_TEST
- test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0");
- ASSERT_TRUE(test_case != NULL);
-
- EXPECT_STREQ("TestCaseWithCommentTest/0", test_case->name());
- EXPECT_STREQ(GetTypeName<int>().c_str(), test_case->type_param());
- EXPECT_TRUE(test_case->should_run());
- EXPECT_EQ(0, test_case->disabled_test_count());
- EXPECT_EQ(1, test_case->test_to_run_count());
- ASSERT_EQ(1, test_case->total_test_count());
-
- tests = UnitTestHelper::GetSortedTests(test_case);
-
- EXPECT_STREQ("Dummy", tests[0]->name());
- EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
- EXPECT_TRUE(IsNull(tests[0]->value_param()));
- EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
- EXPECT_TRUE(tests[0]->should_run());
-
- delete[] tests;
-#endif // GTEST_HAS_TYPED_TEST
-}
-
-TEST(ApiTest, TestCaseDisabledAccessorsWork) {
- const TestCase* test_case = UnitTestHelper::FindTestCase("DISABLED_Test");
- ASSERT_TRUE(test_case != NULL);
-
- EXPECT_STREQ("DISABLED_Test", test_case->name());
- EXPECT_TRUE(IsNull(test_case->type_param()));
- EXPECT_FALSE(test_case->should_run());
- EXPECT_EQ(1, test_case->disabled_test_count());
- EXPECT_EQ(0, test_case->test_to_run_count());
- ASSERT_EQ(1, test_case->total_test_count());
-
- const TestInfo* const test_info = test_case->GetTestInfo(0);
- EXPECT_STREQ("Dummy2", test_info->name());
- EXPECT_STREQ("DISABLED_Test", test_info->test_case_name());
- EXPECT_TRUE(IsNull(test_info->value_param()));
- EXPECT_TRUE(IsNull(test_info->type_param()));
- EXPECT_FALSE(test_info->should_run());
-}
-
-// These two tests are here to provide support for testing
-// test_case_to_run_count, disabled_test_count, and test_to_run_count.
-TEST(ApiTest, DISABLED_Dummy1) {}
-TEST(DISABLED_Test, Dummy2) {}
-
-class FinalSuccessChecker : public Environment {
- protected:
- virtual void TearDown() {
- UnitTest* unit_test = UnitTest::GetInstance();
-
- EXPECT_EQ(1 + kTypedTestCases, unit_test->successful_test_case_count());
- EXPECT_EQ(3 + kTypedTests, unit_test->successful_test_count());
- EXPECT_EQ(0, unit_test->failed_test_case_count());
- EXPECT_EQ(0, unit_test->failed_test_count());
- EXPECT_TRUE(unit_test->Passed());
- EXPECT_FALSE(unit_test->Failed());
- ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count());
-
- const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases();
-
- EXPECT_STREQ("ApiTest", test_cases[0]->name());
- EXPECT_TRUE(IsNull(test_cases[0]->type_param()));
- EXPECT_TRUE(test_cases[0]->should_run());
- EXPECT_EQ(1, test_cases[0]->disabled_test_count());
- ASSERT_EQ(4, test_cases[0]->total_test_count());
- EXPECT_EQ(3, test_cases[0]->successful_test_count());
- EXPECT_EQ(0, test_cases[0]->failed_test_count());
- EXPECT_TRUE(test_cases[0]->Passed());
- EXPECT_FALSE(test_cases[0]->Failed());
-
- EXPECT_STREQ("DISABLED_Test", test_cases[1]->name());
- EXPECT_TRUE(IsNull(test_cases[1]->type_param()));
- EXPECT_FALSE(test_cases[1]->should_run());
- EXPECT_EQ(1, test_cases[1]->disabled_test_count());
- ASSERT_EQ(1, test_cases[1]->total_test_count());
- EXPECT_EQ(0, test_cases[1]->successful_test_count());
- EXPECT_EQ(0, test_cases[1]->failed_test_count());
-
-#if GTEST_HAS_TYPED_TEST
- EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name());
- EXPECT_STREQ(GetTypeName<int>().c_str(), test_cases[2]->type_param());
- EXPECT_TRUE(test_cases[2]->should_run());
- EXPECT_EQ(0, test_cases[2]->disabled_test_count());
- ASSERT_EQ(1, test_cases[2]->total_test_count());
- EXPECT_EQ(1, test_cases[2]->successful_test_count());
- EXPECT_EQ(0, test_cases[2]->failed_test_count());
- EXPECT_TRUE(test_cases[2]->Passed());
- EXPECT_FALSE(test_cases[2]->Failed());
-#endif // GTEST_HAS_TYPED_TEST
-
- const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest");
- const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
- EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
- EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
- EXPECT_FALSE(tests[0]->should_run());
-
- EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
- EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
- EXPECT_TRUE(IsNull(tests[1]->value_param()));
- EXPECT_TRUE(IsNull(tests[1]->type_param()));
- EXPECT_TRUE(tests[1]->should_run());
- EXPECT_TRUE(tests[1]->result()->Passed());
- EXPECT_EQ(0, tests[1]->result()->test_property_count());
-
- EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
- EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
- EXPECT_TRUE(IsNull(tests[2]->value_param()));
- EXPECT_TRUE(IsNull(tests[2]->type_param()));
- EXPECT_TRUE(tests[2]->should_run());
- EXPECT_TRUE(tests[2]->result()->Passed());
- EXPECT_EQ(0, tests[2]->result()->test_property_count());
-
- EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
- EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
- EXPECT_TRUE(IsNull(tests[3]->value_param()));
- EXPECT_TRUE(IsNull(tests[3]->type_param()));
- EXPECT_TRUE(tests[3]->should_run());
- EXPECT_TRUE(tests[3]->result()->Passed());
- EXPECT_EQ(1, tests[3]->result()->test_property_count());
- const TestProperty& property = tests[3]->result()->GetTestProperty(0);
- EXPECT_STREQ("key", property.key());
- EXPECT_STREQ("value", property.value());
-
- delete[] tests;
-
-#if GTEST_HAS_TYPED_TEST
- test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0");
- tests = UnitTestHelper::GetSortedTests(test_case);
-
- EXPECT_STREQ("Dummy", tests[0]->name());
- EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
- EXPECT_TRUE(IsNull(tests[0]->value_param()));
- EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
- EXPECT_TRUE(tests[0]->should_run());
- EXPECT_TRUE(tests[0]->result()->Passed());
- EXPECT_EQ(0, tests[0]->result()->test_property_count());
-
- delete[] tests;
-#endif // GTEST_HAS_TYPED_TEST
- delete[] test_cases;
- }
-};
-
-} // namespace internal
-} // namespace testing
-
-int main(int argc, char **argv) {
- InitGoogleTest(&argc, argv);
-
- AddGlobalTestEnvironment(new testing::internal::FinalSuccessChecker());
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_all_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_all_test.cc
deleted file mode 100644
index 955aa6282..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_all_test.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Tests for Google C++ Testing Framework (Google Test)
-//
-// Sometimes it's desirable to build most of Google Test's own tests
-// by compiling a single file. This file serves this purpose.
-#include "test/gtest-filepath_test.cc"
-#include "test/gtest-linked_ptr_test.cc"
-#include "test/gtest-message_test.cc"
-#include "test/gtest-options_test.cc"
-#include "test/gtest-port_test.cc"
-#include "test/gtest_pred_impl_unittest.cc"
-#include "test/gtest_prod_test.cc"
-#include "test/gtest-test-part_test.cc"
-#include "test/gtest-typed-test_test.cc"
-#include "test/gtest-typed-test2_test.cc"
-#include "test/gtest_unittest.cc"
-#include "test/production.cc"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest.py
deleted file mode 100755
index c81918331..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest.py
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test for Google Test's break-on-failure mode.
-
-A user can ask Google Test to seg-fault when an assertion fails, using
-either the GTEST_BREAK_ON_FAILURE environment variable or the
---gtest_break_on_failure flag. This script tests such functionality
-by invoking gtest_break_on_failure_unittest_ (a program written with
-Google Test) with different environments and command line flags.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import gtest_test_utils
-import os
-import sys
-
-
-# Constants.
-
-IS_WINDOWS = os.name == 'nt'
-
-# The environment variable for enabling/disabling the break-on-failure mode.
-BREAK_ON_FAILURE_ENV_VAR = 'GTEST_BREAK_ON_FAILURE'
-
-# The command line flag for enabling/disabling the break-on-failure mode.
-BREAK_ON_FAILURE_FLAG = 'gtest_break_on_failure'
-
-# The environment variable for enabling/disabling the throw-on-failure mode.
-THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE'
-
-# The environment variable for enabling/disabling the catch-exceptions mode.
-CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS'
-
-# Path to the gtest_break_on_failure_unittest_ program.
-EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_break_on_failure_unittest_')
-
-
-# Utilities.
-
-
-environ = os.environ.copy()
-
-
-def SetEnvVar(env_var, value):
- """Sets an environment variable to a given value; unsets it when the
- given value is None.
- """
-
- if value is not None:
- environ[env_var] = value
- elif env_var in environ:
- del environ[env_var]
-
-
-def Run(command):
- """Runs a command; returns 1 if it was killed by a signal, or 0 otherwise."""
-
- p = gtest_test_utils.Subprocess(command, env=environ)
- if p.terminated_by_signal:
- return 1
- else:
- return 0
-
-
-# The tests.
-
-
-class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase):
- """Tests using the GTEST_BREAK_ON_FAILURE environment variable or
- the --gtest_break_on_failure flag to turn assertion failures into
- segmentation faults.
- """
-
- def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
- """Runs gtest_break_on_failure_unittest_ and verifies that it does
- (or does not) have a seg-fault.
-
- Args:
- env_var_value: value of the GTEST_BREAK_ON_FAILURE environment
- variable; None if the variable should be unset.
- flag_value: value of the --gtest_break_on_failure flag;
- None if the flag should not be present.
- expect_seg_fault: 1 if the program is expected to generate a seg-fault;
- 0 otherwise.
- """
-
- SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value)
-
- if env_var_value is None:
- env_var_value_msg = ' is not set'
- else:
- env_var_value_msg = '=' + env_var_value
-
- if flag_value is None:
- flag = ''
- elif flag_value == '0':
- flag = '--%s=0' % BREAK_ON_FAILURE_FLAG
- else:
- flag = '--%s' % BREAK_ON_FAILURE_FLAG
-
- command = [EXE_PATH]
- if flag:
- command.append(flag)
-
- if expect_seg_fault:
- should_or_not = 'should'
- else:
- should_or_not = 'should not'
-
- has_seg_fault = Run(command)
-
- SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None)
-
- msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' %
- (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command),
- should_or_not))
- self.assert_(has_seg_fault == expect_seg_fault, msg)
-
- def testDefaultBehavior(self):
- """Tests the behavior of the default mode."""
-
- self.RunAndVerify(env_var_value=None,
- flag_value=None,
- expect_seg_fault=0)
-
- def testEnvVar(self):
- """Tests using the GTEST_BREAK_ON_FAILURE environment variable."""
-
- self.RunAndVerify(env_var_value='0',
- flag_value=None,
- expect_seg_fault=0)
- self.RunAndVerify(env_var_value='1',
- flag_value=None,
- expect_seg_fault=1)
-
- def testFlag(self):
- """Tests using the --gtest_break_on_failure flag."""
-
- self.RunAndVerify(env_var_value=None,
- flag_value='0',
- expect_seg_fault=0)
- self.RunAndVerify(env_var_value=None,
- flag_value='1',
- expect_seg_fault=1)
-
- def testFlagOverridesEnvVar(self):
- """Tests that the flag overrides the environment variable."""
-
- self.RunAndVerify(env_var_value='0',
- flag_value='0',
- expect_seg_fault=0)
- self.RunAndVerify(env_var_value='0',
- flag_value='1',
- expect_seg_fault=1)
- self.RunAndVerify(env_var_value='1',
- flag_value='0',
- expect_seg_fault=0)
- self.RunAndVerify(env_var_value='1',
- flag_value='1',
- expect_seg_fault=1)
-
- def testBreakOnFailureOverridesThrowOnFailure(self):
- """Tests that gtest_break_on_failure overrides gtest_throw_on_failure."""
-
- SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1')
- try:
- self.RunAndVerify(env_var_value=None,
- flag_value='1',
- expect_seg_fault=1)
- finally:
- SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None)
-
- if IS_WINDOWS:
- def testCatchExceptionsDoesNotInterfere(self):
- """Tests that gtest_catch_exceptions doesn't interfere."""
-
- SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1')
- try:
- self.RunAndVerify(env_var_value='1',
- flag_value='1',
- expect_seg_fault=1)
- finally:
- SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None)
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest_.cc
deleted file mode 100644
index dd07478c0..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_break_on_failure_unittest_.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Unit test for Google Test's break-on-failure mode.
-//
-// A user can ask Google Test to seg-fault when an assertion fails, using
-// either the GTEST_BREAK_ON_FAILURE environment variable or the
-// --gtest_break_on_failure flag. This file is used for testing such
-// functionality.
-//
-// This program will be invoked from a Python unit test. It is
-// expected to fail. Don't run it directly.
-
-#include "gtest/gtest.h"
-
-#if GTEST_OS_WINDOWS
-# include <windows.h>
-# include <stdlib.h>
-#endif
-
-namespace {
-
-// A test that's expected to fail.
-TEST(Foo, Bar) {
- EXPECT_EQ(2, 3);
-}
-
-#if GTEST_HAS_SEH && !GTEST_OS_WINDOWS_MOBILE
-// On Windows Mobile global exception handlers are not supported.
-LONG WINAPI ExitWithExceptionCode(
- struct _EXCEPTION_POINTERS* exception_pointers) {
- exit(exception_pointers->ExceptionRecord->ExceptionCode);
-}
-#endif
-
-} // namespace
-
-int main(int argc, char **argv) {
-#if GTEST_OS_WINDOWS
- // Suppresses display of the Windows error dialog upon encountering
- // a general protection fault (segment violation).
- SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS);
-
-# if GTEST_HAS_SEH && !GTEST_OS_WINDOWS_MOBILE
-
- // The default unhandled exception filter does not always exit
- // with the exception code as exit code - for example it exits with
- // 0 for EXCEPTION_ACCESS_VIOLATION and 1 for EXCEPTION_BREAKPOINT
- // if the application is compiled in debug mode. Thus we use our own
- // filter which always exits with the exception code for unhandled
- // exceptions.
- SetUnhandledExceptionFilter(ExitWithExceptionCode);
-
-# endif
-#endif
-
- testing::InitGoogleTest(&argc, argv);
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test.py
deleted file mode 100755
index 7fd7dbad6..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test.py
+++ /dev/null
@@ -1,220 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2010 Google Inc. All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests Google Test's exception catching behavior.
-
-This script invokes gtest_catch_exceptions_test_ and
-gtest_catch_exceptions_ex_test_ (programs written with
-Google Test) and verifies their output.
-"""
-
-__author__ = 'vladl@google.com (Vlad Losev)'
-
-import os
-
-import gtest_test_utils
-
-# Constants.
-FLAG_PREFIX = '--gtest_'
-LIST_TESTS_FLAG = FLAG_PREFIX + 'list_tests'
-NO_CATCH_EXCEPTIONS_FLAG = FLAG_PREFIX + 'catch_exceptions=0'
-FILTER_FLAG = FLAG_PREFIX + 'filter'
-
-# Path to the gtest_catch_exceptions_ex_test_ binary, compiled with
-# exceptions enabled.
-EX_EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_catch_exceptions_ex_test_')
-
-# Path to the gtest_catch_exceptions_test_ binary, compiled with
-# exceptions disabled.
-EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_catch_exceptions_no_ex_test_')
-
-TEST_LIST = gtest_test_utils.Subprocess([EXE_PATH, LIST_TESTS_FLAG]).output
-
-SUPPORTS_SEH_EXCEPTIONS = 'ThrowsSehException' in TEST_LIST
-
-if SUPPORTS_SEH_EXCEPTIONS:
- BINARY_OUTPUT = gtest_test_utils.Subprocess([EXE_PATH]).output
-
-EX_BINARY_OUTPUT = gtest_test_utils.Subprocess([EX_EXE_PATH]).output
-
-# The tests.
-if SUPPORTS_SEH_EXCEPTIONS:
- # pylint:disable-msg=C6302
- class CatchSehExceptionsTest(gtest_test_utils.TestCase):
- """Tests exception-catching behavior."""
-
-
- def TestSehExceptions(self, test_output):
- self.assert_('SEH exception with code 0x2a thrown '
- 'in the test fixture\'s constructor'
- in test_output)
- self.assert_('SEH exception with code 0x2a thrown '
- 'in the test fixture\'s destructor'
- in test_output)
- self.assert_('SEH exception with code 0x2a thrown in SetUpTestCase()'
- in test_output)
- self.assert_('SEH exception with code 0x2a thrown in TearDownTestCase()'
- in test_output)
- self.assert_('SEH exception with code 0x2a thrown in SetUp()'
- in test_output)
- self.assert_('SEH exception with code 0x2a thrown in TearDown()'
- in test_output)
- self.assert_('SEH exception with code 0x2a thrown in the test body'
- in test_output)
-
- def testCatchesSehExceptionsWithCxxExceptionsEnabled(self):
- self.TestSehExceptions(EX_BINARY_OUTPUT)
-
- def testCatchesSehExceptionsWithCxxExceptionsDisabled(self):
- self.TestSehExceptions(BINARY_OUTPUT)
-
-
-class CatchCxxExceptionsTest(gtest_test_utils.TestCase):
- """Tests C++ exception-catching behavior.
-
- Tests in this test case verify that:
- * C++ exceptions are caught and logged as C++ (not SEH) exceptions
- * Exception thrown affect the remainder of the test work flow in the
- expected manner.
- """
-
- def testCatchesCxxExceptionsInFixtureConstructor(self):
- self.assert_('C++ exception with description '
- '"Standard C++ exception" thrown '
- 'in the test fixture\'s constructor'
- in EX_BINARY_OUTPUT)
- self.assert_('unexpected' not in EX_BINARY_OUTPUT,
- 'This failure belongs in this test only if '
- '"CxxExceptionInConstructorTest" (no quotes) '
- 'appears on the same line as words "called unexpectedly"')
-
- def testCatchesCxxExceptionsInFixtureDestructor(self):
- self.assert_('C++ exception with description '
- '"Standard C++ exception" thrown '
- 'in the test fixture\'s destructor'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInDestructorTest::TearDownTestCase() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
-
- def testCatchesCxxExceptionsInSetUpTestCase(self):
- self.assert_('C++ exception with description "Standard C++ exception"'
- ' thrown in SetUpTestCase()'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInConstructorTest::TearDownTestCase() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTestCaseTest constructor '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTestCaseTest destructor '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTestCaseTest::SetUp() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTestCaseTest::TearDown() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTestCaseTest test body '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
-
- def testCatchesCxxExceptionsInTearDownTestCase(self):
- self.assert_('C++ exception with description "Standard C++ exception"'
- ' thrown in TearDownTestCase()'
- in EX_BINARY_OUTPUT)
-
- def testCatchesCxxExceptionsInSetUp(self):
- self.assert_('C++ exception with description "Standard C++ exception"'
- ' thrown in SetUp()'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTest::TearDownTestCase() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTest destructor '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInSetUpTest::TearDown() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('unexpected' not in EX_BINARY_OUTPUT,
- 'This failure belongs in this test only if '
- '"CxxExceptionInSetUpTest" (no quotes) '
- 'appears on the same line as words "called unexpectedly"')
-
- def testCatchesCxxExceptionsInTearDown(self):
- self.assert_('C++ exception with description "Standard C++ exception"'
- ' thrown in TearDown()'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInTearDownTest::TearDownTestCase() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInTearDownTest destructor '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
-
- def testCatchesCxxExceptionsInTestBody(self):
- self.assert_('C++ exception with description "Standard C++ exception"'
- ' thrown in the test body'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInTestBodyTest::TearDownTestCase() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInTestBodyTest destructor '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInTestBodyTest::TearDown() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
-
- def testCatchesNonStdCxxExceptions(self):
- self.assert_('Unknown C++ exception thrown in the test body'
- in EX_BINARY_OUTPUT)
-
- def testUnhandledCxxExceptionsAbortTheProgram(self):
- # Filters out SEH exception tests on Windows. Unhandled SEH exceptions
- # cause tests to show pop-up windows there.
- FITLER_OUT_SEH_TESTS_FLAG = FILTER_FLAG + '=-*Seh*'
- # By default, Google Test doesn't catch the exceptions.
- uncaught_exceptions_ex_binary_output = gtest_test_utils.Subprocess(
- [EX_EXE_PATH,
- NO_CATCH_EXCEPTIONS_FLAG,
- FITLER_OUT_SEH_TESTS_FLAG]).output
-
- self.assert_('Unhandled C++ exception terminating the program'
- in uncaught_exceptions_ex_binary_output)
- self.assert_('unexpected' not in uncaught_exceptions_ex_binary_output)
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test_.cc
deleted file mode 100644
index a35103f07..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_catch_exceptions_test_.cc
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright 2010, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-//
-// Tests for Google Test itself. Tests in this file throw C++ or SEH
-// exceptions, and the output is verified by gtest_catch_exceptions_test.py.
-
-#include "gtest/gtest.h"
-
-#include <stdio.h> // NOLINT
-#include <stdlib.h> // For exit().
-
-#if GTEST_HAS_SEH
-# include <windows.h>
-#endif
-
-#if GTEST_HAS_EXCEPTIONS
-# include <exception> // For set_terminate().
-# include <stdexcept>
-#endif
-
-using testing::Test;
-
-#if GTEST_HAS_SEH
-
-class SehExceptionInConstructorTest : public Test {
- public:
- SehExceptionInConstructorTest() { RaiseException(42, 0, 0, NULL); }
-};
-
-TEST_F(SehExceptionInConstructorTest, ThrowsExceptionInConstructor) {}
-
-class SehExceptionInDestructorTest : public Test {
- public:
- ~SehExceptionInDestructorTest() { RaiseException(42, 0, 0, NULL); }
-};
-
-TEST_F(SehExceptionInDestructorTest, ThrowsExceptionInDestructor) {}
-
-class SehExceptionInSetUpTestCaseTest : public Test {
- public:
- static void SetUpTestCase() { RaiseException(42, 0, 0, NULL); }
-};
-
-TEST_F(SehExceptionInSetUpTestCaseTest, ThrowsExceptionInSetUpTestCase) {}
-
-class SehExceptionInTearDownTestCaseTest : public Test {
- public:
- static void TearDownTestCase() { RaiseException(42, 0, 0, NULL); }
-};
-
-TEST_F(SehExceptionInTearDownTestCaseTest, ThrowsExceptionInTearDownTestCase) {}
-
-class SehExceptionInSetUpTest : public Test {
- protected:
- virtual void SetUp() { RaiseException(42, 0, 0, NULL); }
-};
-
-TEST_F(SehExceptionInSetUpTest, ThrowsExceptionInSetUp) {}
-
-class SehExceptionInTearDownTest : public Test {
- protected:
- virtual void TearDown() { RaiseException(42, 0, 0, NULL); }
-};
-
-TEST_F(SehExceptionInTearDownTest, ThrowsExceptionInTearDown) {}
-
-TEST(SehExceptionTest, ThrowsSehException) {
- RaiseException(42, 0, 0, NULL);
-}
-
-#endif // GTEST_HAS_SEH
-
-#if GTEST_HAS_EXCEPTIONS
-
-class CxxExceptionInConstructorTest : public Test {
- public:
- CxxExceptionInConstructorTest() {
- // Without this macro VC++ complains about unreachable code at the end of
- // the constructor.
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(
- throw std::runtime_error("Standard C++ exception"));
- }
-
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInConstructorTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInConstructorTest() {
- ADD_FAILURE() << "CxxExceptionInConstructorTest destructor "
- << "called unexpectedly.";
- }
-
- virtual void SetUp() {
- ADD_FAILURE() << "CxxExceptionInConstructorTest::SetUp() "
- << "called unexpectedly.";
- }
-
- virtual void TearDown() {
- ADD_FAILURE() << "CxxExceptionInConstructorTest::TearDown() "
- << "called unexpectedly.";
- }
-};
-
-TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) {
- ADD_FAILURE() << "CxxExceptionInConstructorTest test body "
- << "called unexpectedly.";
-}
-
-class CxxExceptionInDestructorTest : public Test {
- public:
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInDestructorTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInDestructorTest() {
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(
- throw std::runtime_error("Standard C++ exception"));
- }
-};
-
-TEST_F(CxxExceptionInDestructorTest, ThrowsExceptionInDestructor) {}
-
-class CxxExceptionInSetUpTestCaseTest : public Test {
- public:
- CxxExceptionInSetUpTestCaseTest() {
- printf("%s",
- "CxxExceptionInSetUpTestCaseTest constructor "
- "called as expected.\n");
- }
-
- static void SetUpTestCase() {
- throw std::runtime_error("Standard C++ exception");
- }
-
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInSetUpTestCaseTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInSetUpTestCaseTest() {
- printf("%s",
- "CxxExceptionInSetUpTestCaseTest destructor "
- "called as expected.\n");
- }
-
- virtual void SetUp() {
- printf("%s",
- "CxxExceptionInSetUpTestCaseTest::SetUp() "
- "called as expected.\n");
- }
-
- virtual void TearDown() {
- printf("%s",
- "CxxExceptionInSetUpTestCaseTest::TearDown() "
- "called as expected.\n");
- }
-};
-
-TEST_F(CxxExceptionInSetUpTestCaseTest, ThrowsExceptionInSetUpTestCase) {
- printf("%s",
- "CxxExceptionInSetUpTestCaseTest test body "
- "called as expected.\n");
-}
-
-class CxxExceptionInTearDownTestCaseTest : public Test {
- public:
- static void TearDownTestCase() {
- throw std::runtime_error("Standard C++ exception");
- }
-};
-
-TEST_F(CxxExceptionInTearDownTestCaseTest, ThrowsExceptionInTearDownTestCase) {}
-
-class CxxExceptionInSetUpTest : public Test {
- public:
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInSetUpTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInSetUpTest() {
- printf("%s",
- "CxxExceptionInSetUpTest destructor "
- "called as expected.\n");
- }
-
- virtual void SetUp() { throw std::runtime_error("Standard C++ exception"); }
-
- virtual void TearDown() {
- printf("%s",
- "CxxExceptionInSetUpTest::TearDown() "
- "called as expected.\n");
- }
-};
-
-TEST_F(CxxExceptionInSetUpTest, ThrowsExceptionInSetUp) {
- ADD_FAILURE() << "CxxExceptionInSetUpTest test body "
- << "called unexpectedly.";
-}
-
-class CxxExceptionInTearDownTest : public Test {
- public:
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInTearDownTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInTearDownTest() {
- printf("%s",
- "CxxExceptionInTearDownTest destructor "
- "called as expected.\n");
- }
-
- virtual void TearDown() {
- throw std::runtime_error("Standard C++ exception");
- }
-};
-
-TEST_F(CxxExceptionInTearDownTest, ThrowsExceptionInTearDown) {}
-
-class CxxExceptionInTestBodyTest : public Test {
- public:
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInTestBodyTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInTestBodyTest() {
- printf("%s",
- "CxxExceptionInTestBodyTest destructor "
- "called as expected.\n");
- }
-
- virtual void TearDown() {
- printf("%s",
- "CxxExceptionInTestBodyTest::TearDown() "
- "called as expected.\n");
- }
-};
-
-TEST_F(CxxExceptionInTestBodyTest, ThrowsStdCxxException) {
- throw std::runtime_error("Standard C++ exception");
-}
-
-TEST(CxxExceptionTest, ThrowsNonStdCxxException) {
- throw "C-string";
-}
-
-// This terminate handler aborts the program using exit() rather than abort().
-// This avoids showing pop-ups on Windows systems and core dumps on Unix-like
-// ones.
-void TerminateHandler() {
- fprintf(stderr, "%s\n", "Unhandled C++ exception terminating the program.");
- fflush(NULL);
- exit(3);
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-int main(int argc, char** argv) {
-#if GTEST_HAS_EXCEPTIONS
- std::set_terminate(&TerminateHandler);
-#endif
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test.py
deleted file mode 100755
index d02a53ed8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test.py
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Verifies that Google Test correctly determines whether to use colors."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import gtest_test_utils
-
-
-IS_WINDOWS = os.name = 'nt'
-
-COLOR_ENV_VAR = 'GTEST_COLOR'
-COLOR_FLAG = 'gtest_color'
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_color_test_')
-
-
-def SetEnvVar(env_var, value):
- """Sets the env variable to 'value'; unsets it when 'value' is None."""
-
- if value is not None:
- os.environ[env_var] = value
- elif env_var in os.environ:
- del os.environ[env_var]
-
-
-def UsesColor(term, color_env_var, color_flag):
- """Runs gtest_color_test_ and returns its exit code."""
-
- SetEnvVar('TERM', term)
- SetEnvVar(COLOR_ENV_VAR, color_env_var)
-
- if color_flag is None:
- args = []
- else:
- args = ['--%s=%s' % (COLOR_FLAG, color_flag)]
- p = gtest_test_utils.Subprocess([COMMAND] + args)
- return not p.exited or p.exit_code
-
-
-class GTestColorTest(gtest_test_utils.TestCase):
- def testNoEnvVarNoFlag(self):
- """Tests the case when there's neither GTEST_COLOR nor --gtest_color."""
-
- if not IS_WINDOWS:
- self.assert_(not UsesColor('dumb', None, None))
- self.assert_(not UsesColor('emacs', None, None))
- self.assert_(not UsesColor('xterm-mono', None, None))
- self.assert_(not UsesColor('unknown', None, None))
- self.assert_(not UsesColor(None, None, None))
- self.assert_(UsesColor('linux', None, None))
- self.assert_(UsesColor('cygwin', None, None))
- self.assert_(UsesColor('xterm', None, None))
- self.assert_(UsesColor('xterm-color', None, None))
- self.assert_(UsesColor('xterm-256color', None, None))
-
- def testFlagOnly(self):
- """Tests the case when there's --gtest_color but not GTEST_COLOR."""
-
- self.assert_(not UsesColor('dumb', None, 'no'))
- self.assert_(not UsesColor('xterm-color', None, 'no'))
- if not IS_WINDOWS:
- self.assert_(not UsesColor('emacs', None, 'auto'))
- self.assert_(UsesColor('xterm', None, 'auto'))
- self.assert_(UsesColor('dumb', None, 'yes'))
- self.assert_(UsesColor('xterm', None, 'yes'))
-
- def testEnvVarOnly(self):
- """Tests the case when there's GTEST_COLOR but not --gtest_color."""
-
- self.assert_(not UsesColor('dumb', 'no', None))
- self.assert_(not UsesColor('xterm-color', 'no', None))
- if not IS_WINDOWS:
- self.assert_(not UsesColor('dumb', 'auto', None))
- self.assert_(UsesColor('xterm-color', 'auto', None))
- self.assert_(UsesColor('dumb', 'yes', None))
- self.assert_(UsesColor('xterm-color', 'yes', None))
-
- def testEnvVarAndFlag(self):
- """Tests the case when there are both GTEST_COLOR and --gtest_color."""
-
- self.assert_(not UsesColor('xterm-color', 'no', 'no'))
- self.assert_(UsesColor('dumb', 'no', 'yes'))
- self.assert_(UsesColor('xterm-color', 'no', 'auto'))
-
- def testAliasesOfYesAndNo(self):
- """Tests using aliases in specifying --gtest_color."""
-
- self.assert_(UsesColor('dumb', None, 'true'))
- self.assert_(UsesColor('dumb', None, 'YES'))
- self.assert_(UsesColor('dumb', None, 'T'))
- self.assert_(UsesColor('dumb', None, '1'))
-
- self.assert_(not UsesColor('xterm', None, 'f'))
- self.assert_(not UsesColor('xterm', None, 'false'))
- self.assert_(not UsesColor('xterm', None, '0'))
- self.assert_(not UsesColor('xterm', None, 'unknown'))
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test_.cc
deleted file mode 100644
index f61ebb89b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_color_test_.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// A helper program for testing how Google Test determines whether to use
-// colors in the output. It prints "YES" and returns 1 if Google Test
-// decides to use colors, and prints "NO" and returns 0 otherwise.
-
-#include <stdio.h>
-
-#include "gtest/gtest.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-using testing::internal::ShouldUseColor;
-
-// The purpose of this is to ensure that the UnitTest singleton is
-// created before main() is entered, and thus that ShouldUseColor()
-// works the same way as in a real Google-Test-based test. We don't actual
-// run the TEST itself.
-TEST(GTestColorTest, Dummy) {
-}
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
-
- if (ShouldUseColor(true)) {
- // Google Test decides to use colors in the output (assuming it
- // goes to a TTY).
- printf("YES\n");
- return 1;
- } else {
- // Google Test decides not to use colors in the output.
- printf("NO\n");
- return 0;
- }
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test.py
deleted file mode 100755
index ac24337fa..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Verifies that Google Test correctly parses environment variables."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import gtest_test_utils
-
-
-IS_WINDOWS = os.name == 'nt'
-IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
-
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_')
-
-environ = os.environ.copy()
-
-
-def AssertEq(expected, actual):
- if expected != actual:
- print 'Expected: %s' % (expected,)
- print ' Actual: %s' % (actual,)
- raise AssertionError
-
-
-def SetEnvVar(env_var, value):
- """Sets the env variable to 'value'; unsets it when 'value' is None."""
-
- if value is not None:
- environ[env_var] = value
- elif env_var in environ:
- del environ[env_var]
-
-
-def GetFlag(flag):
- """Runs gtest_env_var_test_ and returns its output."""
-
- args = [COMMAND]
- if flag is not None:
- args += [flag]
- return gtest_test_utils.Subprocess(args, env=environ).output
-
-
-def TestFlag(flag, test_val, default_val):
- """Verifies that the given flag is affected by the corresponding env var."""
-
- env_var = 'GTEST_' + flag.upper()
- SetEnvVar(env_var, test_val)
- AssertEq(test_val, GetFlag(flag))
- SetEnvVar(env_var, None)
- AssertEq(default_val, GetFlag(flag))
-
-
-class GTestEnvVarTest(gtest_test_utils.TestCase):
- def testEnvVarAffectsFlag(self):
- """Tests that environment variable should affect the corresponding flag."""
-
- TestFlag('break_on_failure', '1', '0')
- TestFlag('color', 'yes', 'auto')
- TestFlag('filter', 'FooTest.Bar', '*')
- TestFlag('output', 'xml:tmp/foo.xml', '')
- TestFlag('print_time', '0', '1')
- TestFlag('repeat', '999', '1')
- TestFlag('throw_on_failure', '1', '0')
- TestFlag('death_test_style', 'threadsafe', 'fast')
- TestFlag('catch_exceptions', '0', '1')
-
- if IS_LINUX:
- TestFlag('death_test_use_fork', '1', '0')
- TestFlag('stack_trace_depth', '0', '100')
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test_.cc
deleted file mode 100644
index 539afc968..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_env_var_test_.cc
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// A helper program for testing that Google Test parses the environment
-// variables correctly.
-
-#include "gtest/gtest.h"
-
-#include <iostream>
-
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-using ::std::cout;
-
-namespace testing {
-
-// The purpose of this is to make the test more realistic by ensuring
-// that the UnitTest singleton is created before main() is entered.
-// We don't actual run the TEST itself.
-TEST(GTestEnvVarTest, Dummy) {
-}
-
-void PrintFlag(const char* flag) {
- if (strcmp(flag, "break_on_failure") == 0) {
- cout << GTEST_FLAG(break_on_failure);
- return;
- }
-
- if (strcmp(flag, "catch_exceptions") == 0) {
- cout << GTEST_FLAG(catch_exceptions);
- return;
- }
-
- if (strcmp(flag, "color") == 0) {
- cout << GTEST_FLAG(color);
- return;
- }
-
- if (strcmp(flag, "death_test_style") == 0) {
- cout << GTEST_FLAG(death_test_style);
- return;
- }
-
- if (strcmp(flag, "death_test_use_fork") == 0) {
- cout << GTEST_FLAG(death_test_use_fork);
- return;
- }
-
- if (strcmp(flag, "filter") == 0) {
- cout << GTEST_FLAG(filter);
- return;
- }
-
- if (strcmp(flag, "output") == 0) {
- cout << GTEST_FLAG(output);
- return;
- }
-
- if (strcmp(flag, "print_time") == 0) {
- cout << GTEST_FLAG(print_time);
- return;
- }
-
- if (strcmp(flag, "repeat") == 0) {
- cout << GTEST_FLAG(repeat);
- return;
- }
-
- if (strcmp(flag, "stack_trace_depth") == 0) {
- cout << GTEST_FLAG(stack_trace_depth);
- return;
- }
-
- if (strcmp(flag, "throw_on_failure") == 0) {
- cout << GTEST_FLAG(throw_on_failure);
- return;
- }
-
- cout << "Invalid flag name " << flag
- << ". Valid names are break_on_failure, color, filter, etc.\n";
- exit(1);
-}
-
-} // namespace testing
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
-
- if (argc != 2) {
- cout << "Usage: gtest_env_var_test_ NAME_OF_FLAG\n";
- return 1;
- }
-
- testing::PrintFlag(argv[1]);
- return 0;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_environment_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_environment_test.cc
deleted file mode 100644
index ec9aa2cda..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_environment_test.cc
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Tests using global test environments.
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "gtest/gtest.h"
-
-#define GTEST_IMPLEMENTATION_ 1 // Required for the next #include.
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-GTEST_DECLARE_string_(filter);
-}
-
-namespace {
-
-enum FailureType {
- NO_FAILURE, NON_FATAL_FAILURE, FATAL_FAILURE
-};
-
-// For testing using global test environments.
-class MyEnvironment : public testing::Environment {
- public:
- MyEnvironment() { Reset(); }
-
- // Depending on the value of failure_in_set_up_, SetUp() will
- // generate a non-fatal failure, generate a fatal failure, or
- // succeed.
- virtual void SetUp() {
- set_up_was_run_ = true;
-
- switch (failure_in_set_up_) {
- case NON_FATAL_FAILURE:
- ADD_FAILURE() << "Expected non-fatal failure in global set-up.";
- break;
- case FATAL_FAILURE:
- FAIL() << "Expected fatal failure in global set-up.";
- break;
- default:
- break;
- }
- }
-
- // Generates a non-fatal failure.
- virtual void TearDown() {
- tear_down_was_run_ = true;
- ADD_FAILURE() << "Expected non-fatal failure in global tear-down.";
- }
-
- // Resets the state of the environment s.t. it can be reused.
- void Reset() {
- failure_in_set_up_ = NO_FAILURE;
- set_up_was_run_ = false;
- tear_down_was_run_ = false;
- }
-
- // We call this function to set the type of failure SetUp() should
- // generate.
- void set_failure_in_set_up(FailureType type) {
- failure_in_set_up_ = type;
- }
-
- // Was SetUp() run?
- bool set_up_was_run() const { return set_up_was_run_; }
-
- // Was TearDown() run?
- bool tear_down_was_run() const { return tear_down_was_run_; }
- private:
- FailureType failure_in_set_up_;
- bool set_up_was_run_;
- bool tear_down_was_run_;
-};
-
-// Was the TEST run?
-bool test_was_run;
-
-// The sole purpose of this TEST is to enable us to check whether it
-// was run.
-TEST(FooTest, Bar) {
- test_was_run = true;
-}
-
-// Prints the message and aborts the program if condition is false.
-void Check(bool condition, const char* msg) {
- if (!condition) {
- printf("FAILED: %s\n", msg);
- testing::internal::posix::Abort();
- }
-}
-
-// Runs the tests. Return true iff successful.
-//
-// The 'failure' parameter specifies the type of failure that should
-// be generated by the global set-up.
-int RunAllTests(MyEnvironment* env, FailureType failure) {
- env->Reset();
- env->set_failure_in_set_up(failure);
- test_was_run = false;
- testing::internal::GetUnitTestImpl()->ClearAdHocTestResult();
- return RUN_ALL_TESTS();
-}
-
-} // namespace
-
-int main(int argc, char **argv) {
- testing::InitGoogleTest(&argc, argv);
-
- // Registers a global test environment, and verifies that the
- // registration function returns its argument.
- MyEnvironment* const env = new MyEnvironment;
- Check(testing::AddGlobalTestEnvironment(env) == env,
- "AddGlobalTestEnvironment() should return its argument.");
-
- // Verifies that RUN_ALL_TESTS() runs the tests when the global
- // set-up is successful.
- Check(RunAllTests(env, NO_FAILURE) != 0,
- "RUN_ALL_TESTS() should return non-zero, as the global tear-down "
- "should generate a failure.");
- Check(test_was_run,
- "The tests should run, as the global set-up should generate no "
- "failure");
- Check(env->tear_down_was_run(),
- "The global tear-down should run, as the global set-up was run.");
-
- // Verifies that RUN_ALL_TESTS() runs the tests when the global
- // set-up generates no fatal failure.
- Check(RunAllTests(env, NON_FATAL_FAILURE) != 0,
- "RUN_ALL_TESTS() should return non-zero, as both the global set-up "
- "and the global tear-down should generate a non-fatal failure.");
- Check(test_was_run,
- "The tests should run, as the global set-up should generate no "
- "fatal failure.");
- Check(env->tear_down_was_run(),
- "The global tear-down should run, as the global set-up was run.");
-
- // Verifies that RUN_ALL_TESTS() runs no test when the global set-up
- // generates a fatal failure.
- Check(RunAllTests(env, FATAL_FAILURE) != 0,
- "RUN_ALL_TESTS() should return non-zero, as the global set-up "
- "should generate a fatal failure.");
- Check(!test_was_run,
- "The tests should not run, as the global set-up should generate "
- "a fatal failure.");
- Check(env->tear_down_was_run(),
- "The global tear-down should run, as the global set-up was run.");
-
- // Verifies that RUN_ALL_TESTS() doesn't do global set-up or
- // tear-down when there is no test to run.
- testing::GTEST_FLAG(filter) = "-*";
- Check(RunAllTests(env, NO_FAILURE) == 0,
- "RUN_ALL_TESTS() should return zero, as there is no test to run.");
- Check(!env->set_up_was_run(),
- "The global set-up should not run, as there is no test to run.");
- Check(!env->tear_down_was_run(),
- "The global tear-down should not run, "
- "as the global set-up was not run.");
-
- printf("PASS\n");
- return 0;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest.py
deleted file mode 100755
index 0d1a77005..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest.py
+++ /dev/null
@@ -1,633 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005 Google Inc. All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test for Google Test test filters.
-
-A user can specify which test(s) in a Google Test program to run via either
-the GTEST_FILTER environment variable or the --gtest_filter flag.
-This script tests such functionality by invoking
-gtest_filter_unittest_ (a program written with Google Test) with different
-environments and command line flags.
-
-Note that test sharding may also influence which tests are filtered. Therefore,
-we test that here also.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import sets
-import sys
-
-import gtest_test_utils
-
-# Constants.
-
-# Checks if this platform can pass empty environment variables to child
-# processes. We set an env variable to an empty string and invoke a python
-# script in a subprocess to print whether the variable is STILL in
-# os.environ. We then use 'eval' to parse the child's output so that an
-# exception is thrown if the input is anything other than 'True' nor 'False'.
-os.environ['EMPTY_VAR'] = ''
-child = gtest_test_utils.Subprocess(
- [sys.executable, '-c', 'import os; print \'EMPTY_VAR\' in os.environ'])
-CAN_PASS_EMPTY_ENV = eval(child.output)
-
-
-# Check if this platform can unset environment variables in child processes.
-# We set an env variable to a non-empty string, unset it, and invoke
-# a python script in a subprocess to print whether the variable
-# is NO LONGER in os.environ.
-# We use 'eval' to parse the child's output so that an exception
-# is thrown if the input is neither 'True' nor 'False'.
-os.environ['UNSET_VAR'] = 'X'
-del os.environ['UNSET_VAR']
-child = gtest_test_utils.Subprocess(
- [sys.executable, '-c', 'import os; print \'UNSET_VAR\' not in os.environ'])
-CAN_UNSET_ENV = eval(child.output)
-
-
-# Checks if we should test with an empty filter. This doesn't
-# make sense on platforms that cannot pass empty env variables (Win32)
-# and on platforms that cannot unset variables (since we cannot tell
-# the difference between "" and NULL -- Borland and Solaris < 5.10)
-CAN_TEST_EMPTY_FILTER = (CAN_PASS_EMPTY_ENV and CAN_UNSET_ENV)
-
-
-# The environment variable for specifying the test filters.
-FILTER_ENV_VAR = 'GTEST_FILTER'
-
-# The environment variables for test sharding.
-TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'
-SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX'
-SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE'
-
-# The command line flag for specifying the test filters.
-FILTER_FLAG = 'gtest_filter'
-
-# The command line flag for including disabled tests.
-ALSO_RUN_DISABED_TESTS_FLAG = 'gtest_also_run_disabled_tests'
-
-# Command to run the gtest_filter_unittest_ program.
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_')
-
-# Regex for determining whether parameterized tests are enabled in the binary.
-PARAM_TEST_REGEX = re.compile(r'/ParamTest')
-
-# Regex for parsing test case names from Google Test's output.
-TEST_CASE_REGEX = re.compile(r'^\[\-+\] \d+ tests? from (\w+(/\w+)?)')
-
-# Regex for parsing test names from Google Test's output.
-TEST_REGEX = re.compile(r'^\[\s*RUN\s*\].*\.(\w+(/\w+)?)')
-
-# The command line flag to tell Google Test to output the list of tests it
-# will run.
-LIST_TESTS_FLAG = '--gtest_list_tests'
-
-# Indicates whether Google Test supports death tests.
-SUPPORTS_DEATH_TESTS = 'HasDeathTest' in gtest_test_utils.Subprocess(
- [COMMAND, LIST_TESTS_FLAG]).output
-
-# Full names of all tests in gtest_filter_unittests_.
-PARAM_TESTS = [
- 'SeqP/ParamTest.TestX/0',
- 'SeqP/ParamTest.TestX/1',
- 'SeqP/ParamTest.TestY/0',
- 'SeqP/ParamTest.TestY/1',
- 'SeqQ/ParamTest.TestX/0',
- 'SeqQ/ParamTest.TestX/1',
- 'SeqQ/ParamTest.TestY/0',
- 'SeqQ/ParamTest.TestY/1',
- ]
-
-DISABLED_TESTS = [
- 'BarTest.DISABLED_TestFour',
- 'BarTest.DISABLED_TestFive',
- 'BazTest.DISABLED_TestC',
- 'DISABLED_FoobarTest.Test1',
- 'DISABLED_FoobarTest.DISABLED_Test2',
- 'DISABLED_FoobarbazTest.TestA',
- ]
-
-if SUPPORTS_DEATH_TESTS:
- DEATH_TESTS = [
- 'HasDeathTest.Test1',
- 'HasDeathTest.Test2',
- ]
-else:
- DEATH_TESTS = []
-
-# All the non-disabled tests.
-ACTIVE_TESTS = [
- 'FooTest.Abc',
- 'FooTest.Xyz',
-
- 'BarTest.TestOne',
- 'BarTest.TestTwo',
- 'BarTest.TestThree',
-
- 'BazTest.TestOne',
- 'BazTest.TestA',
- 'BazTest.TestB',
- ] + DEATH_TESTS + PARAM_TESTS
-
-param_tests_present = None
-
-# Utilities.
-
-environ = os.environ.copy()
-
-
-def SetEnvVar(env_var, value):
- """Sets the env variable to 'value'; unsets it when 'value' is None."""
-
- if value is not None:
- environ[env_var] = value
- elif env_var in environ:
- del environ[env_var]
-
-
-def RunAndReturnOutput(args = None):
- """Runs the test program and returns its output."""
-
- return gtest_test_utils.Subprocess([COMMAND] + (args or []),
- env=environ).output
-
-
-def RunAndExtractTestList(args = None):
- """Runs the test program and returns its exit code and a list of tests run."""
-
- p = gtest_test_utils.Subprocess([COMMAND] + (args or []), env=environ)
- tests_run = []
- test_case = ''
- test = ''
- for line in p.output.split('\n'):
- match = TEST_CASE_REGEX.match(line)
- if match is not None:
- test_case = match.group(1)
- else:
- match = TEST_REGEX.match(line)
- if match is not None:
- test = match.group(1)
- tests_run.append(test_case + '.' + test)
- return (tests_run, p.exit_code)
-
-
-def InvokeWithModifiedEnv(extra_env, function, *args, **kwargs):
- """Runs the given function and arguments in a modified environment."""
- try:
- original_env = environ.copy()
- environ.update(extra_env)
- return function(*args, **kwargs)
- finally:
- environ.clear()
- environ.update(original_env)
-
-
-def RunWithSharding(total_shards, shard_index, command):
- """Runs a test program shard and returns exit code and a list of tests run."""
-
- extra_env = {SHARD_INDEX_ENV_VAR: str(shard_index),
- TOTAL_SHARDS_ENV_VAR: str(total_shards)}
- return InvokeWithModifiedEnv(extra_env, RunAndExtractTestList, command)
-
-# The unit test.
-
-
-class GTestFilterUnitTest(gtest_test_utils.TestCase):
- """Tests the env variable or the command line flag to filter tests."""
-
- # Utilities.
-
- def AssertSetEqual(self, lhs, rhs):
- """Asserts that two sets are equal."""
-
- for elem in lhs:
- self.assert_(elem in rhs, '%s in %s' % (elem, rhs))
-
- for elem in rhs:
- self.assert_(elem in lhs, '%s in %s' % (elem, lhs))
-
- def AssertPartitionIsValid(self, set_var, list_of_sets):
- """Asserts that list_of_sets is a valid partition of set_var."""
-
- full_partition = []
- for slice_var in list_of_sets:
- full_partition.extend(slice_var)
- self.assertEqual(len(set_var), len(full_partition))
- self.assertEqual(sets.Set(set_var), sets.Set(full_partition))
-
- def AdjustForParameterizedTests(self, tests_to_run):
- """Adjust tests_to_run in case value parameterized tests are disabled."""
-
- global param_tests_present
- if not param_tests_present:
- return list(sets.Set(tests_to_run) - sets.Set(PARAM_TESTS))
- else:
- return tests_to_run
-
- def RunAndVerify(self, gtest_filter, tests_to_run):
- """Checks that the binary runs correct set of tests for a given filter."""
-
- tests_to_run = self.AdjustForParameterizedTests(tests_to_run)
-
- # First, tests using the environment variable.
-
- # Windows removes empty variables from the environment when passing it
- # to a new process. This means it is impossible to pass an empty filter
- # into a process using the environment variable. However, we can still
- # test the case when the variable is not supplied (i.e., gtest_filter is
- # None).
- # pylint: disable-msg=C6403
- if CAN_TEST_EMPTY_FILTER or gtest_filter != '':
- SetEnvVar(FILTER_ENV_VAR, gtest_filter)
- tests_run = RunAndExtractTestList()[0]
- SetEnvVar(FILTER_ENV_VAR, None)
- self.AssertSetEqual(tests_run, tests_to_run)
- # pylint: enable-msg=C6403
-
- # Next, tests using the command line flag.
-
- if gtest_filter is None:
- args = []
- else:
- args = ['--%s=%s' % (FILTER_FLAG, gtest_filter)]
-
- tests_run = RunAndExtractTestList(args)[0]
- self.AssertSetEqual(tests_run, tests_to_run)
-
- def RunAndVerifyWithSharding(self, gtest_filter, total_shards, tests_to_run,
- args=None, check_exit_0=False):
- """Checks that binary runs correct tests for the given filter and shard.
-
- Runs all shards of gtest_filter_unittest_ with the given filter, and
- verifies that the right set of tests were run. The union of tests run
- on each shard should be identical to tests_to_run, without duplicates.
-
- Args:
- gtest_filter: A filter to apply to the tests.
- total_shards: A total number of shards to split test run into.
- tests_to_run: A set of tests expected to run.
- args : Arguments to pass to the to the test binary.
- check_exit_0: When set to a true value, make sure that all shards
- return 0.
- """
-
- tests_to_run = self.AdjustForParameterizedTests(tests_to_run)
-
- # Windows removes empty variables from the environment when passing it
- # to a new process. This means it is impossible to pass an empty filter
- # into a process using the environment variable. However, we can still
- # test the case when the variable is not supplied (i.e., gtest_filter is
- # None).
- # pylint: disable-msg=C6403
- if CAN_TEST_EMPTY_FILTER or gtest_filter != '':
- SetEnvVar(FILTER_ENV_VAR, gtest_filter)
- partition = []
- for i in range(0, total_shards):
- (tests_run, exit_code) = RunWithSharding(total_shards, i, args)
- if check_exit_0:
- self.assertEqual(0, exit_code)
- partition.append(tests_run)
-
- self.AssertPartitionIsValid(tests_to_run, partition)
- SetEnvVar(FILTER_ENV_VAR, None)
- # pylint: enable-msg=C6403
-
- def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run):
- """Checks that the binary runs correct set of tests for the given filter.
-
- Runs gtest_filter_unittest_ with the given filter, and enables
- disabled tests. Verifies that the right set of tests were run.
-
- Args:
- gtest_filter: A filter to apply to the tests.
- tests_to_run: A set of tests expected to run.
- """
-
- tests_to_run = self.AdjustForParameterizedTests(tests_to_run)
-
- # Construct the command line.
- args = ['--%s' % ALSO_RUN_DISABED_TESTS_FLAG]
- if gtest_filter is not None:
- args.append('--%s=%s' % (FILTER_FLAG, gtest_filter))
-
- tests_run = RunAndExtractTestList(args)[0]
- self.AssertSetEqual(tests_run, tests_to_run)
-
- def setUp(self):
- """Sets up test case.
-
- Determines whether value-parameterized tests are enabled in the binary and
- sets the flags accordingly.
- """
-
- global param_tests_present
- if param_tests_present is None:
- param_tests_present = PARAM_TEST_REGEX.search(
- RunAndReturnOutput()) is not None
-
- def testDefaultBehavior(self):
- """Tests the behavior of not specifying the filter."""
-
- self.RunAndVerify(None, ACTIVE_TESTS)
-
- def testDefaultBehaviorWithShards(self):
- """Tests the behavior without the filter, with sharding enabled."""
-
- self.RunAndVerifyWithSharding(None, 1, ACTIVE_TESTS)
- self.RunAndVerifyWithSharding(None, 2, ACTIVE_TESTS)
- self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS) - 1, ACTIVE_TESTS)
- self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS), ACTIVE_TESTS)
- self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS) + 1, ACTIVE_TESTS)
-
- def testEmptyFilter(self):
- """Tests an empty filter."""
-
- self.RunAndVerify('', [])
- self.RunAndVerifyWithSharding('', 1, [])
- self.RunAndVerifyWithSharding('', 2, [])
-
- def testBadFilter(self):
- """Tests a filter that matches nothing."""
-
- self.RunAndVerify('BadFilter', [])
- self.RunAndVerifyAllowingDisabled('BadFilter', [])
-
- def testFullName(self):
- """Tests filtering by full name."""
-
- self.RunAndVerify('FooTest.Xyz', ['FooTest.Xyz'])
- self.RunAndVerifyAllowingDisabled('FooTest.Xyz', ['FooTest.Xyz'])
- self.RunAndVerifyWithSharding('FooTest.Xyz', 5, ['FooTest.Xyz'])
-
- def testUniversalFilters(self):
- """Tests filters that match everything."""
-
- self.RunAndVerify('*', ACTIVE_TESTS)
- self.RunAndVerify('*.*', ACTIVE_TESTS)
- self.RunAndVerifyWithSharding('*.*', len(ACTIVE_TESTS) - 3, ACTIVE_TESTS)
- self.RunAndVerifyAllowingDisabled('*', ACTIVE_TESTS + DISABLED_TESTS)
- self.RunAndVerifyAllowingDisabled('*.*', ACTIVE_TESTS + DISABLED_TESTS)
-
- def testFilterByTestCase(self):
- """Tests filtering by test case name."""
-
- self.RunAndVerify('FooTest.*', ['FooTest.Abc', 'FooTest.Xyz'])
-
- BAZ_TESTS = ['BazTest.TestOne', 'BazTest.TestA', 'BazTest.TestB']
- self.RunAndVerify('BazTest.*', BAZ_TESTS)
- self.RunAndVerifyAllowingDisabled('BazTest.*',
- BAZ_TESTS + ['BazTest.DISABLED_TestC'])
-
- def testFilterByTest(self):
- """Tests filtering by test name."""
-
- self.RunAndVerify('*.TestOne', ['BarTest.TestOne', 'BazTest.TestOne'])
-
- def testFilterDisabledTests(self):
- """Select only the disabled tests to run."""
-
- self.RunAndVerify('DISABLED_FoobarTest.Test1', [])
- self.RunAndVerifyAllowingDisabled('DISABLED_FoobarTest.Test1',
- ['DISABLED_FoobarTest.Test1'])
-
- self.RunAndVerify('*DISABLED_*', [])
- self.RunAndVerifyAllowingDisabled('*DISABLED_*', DISABLED_TESTS)
-
- self.RunAndVerify('*.DISABLED_*', [])
- self.RunAndVerifyAllowingDisabled('*.DISABLED_*', [
- 'BarTest.DISABLED_TestFour',
- 'BarTest.DISABLED_TestFive',
- 'BazTest.DISABLED_TestC',
- 'DISABLED_FoobarTest.DISABLED_Test2',
- ])
-
- self.RunAndVerify('DISABLED_*', [])
- self.RunAndVerifyAllowingDisabled('DISABLED_*', [
- 'DISABLED_FoobarTest.Test1',
- 'DISABLED_FoobarTest.DISABLED_Test2',
- 'DISABLED_FoobarbazTest.TestA',
- ])
-
- def testWildcardInTestCaseName(self):
- """Tests using wildcard in the test case name."""
-
- self.RunAndVerify('*a*.*', [
- 'BarTest.TestOne',
- 'BarTest.TestTwo',
- 'BarTest.TestThree',
-
- 'BazTest.TestOne',
- 'BazTest.TestA',
- 'BazTest.TestB', ] + DEATH_TESTS + PARAM_TESTS)
-
- def testWildcardInTestName(self):
- """Tests using wildcard in the test name."""
-
- self.RunAndVerify('*.*A*', ['FooTest.Abc', 'BazTest.TestA'])
-
- def testFilterWithoutDot(self):
- """Tests a filter that has no '.' in it."""
-
- self.RunAndVerify('*z*', [
- 'FooTest.Xyz',
-
- 'BazTest.TestOne',
- 'BazTest.TestA',
- 'BazTest.TestB',
- ])
-
- def testTwoPatterns(self):
- """Tests filters that consist of two patterns."""
-
- self.RunAndVerify('Foo*.*:*A*', [
- 'FooTest.Abc',
- 'FooTest.Xyz',
-
- 'BazTest.TestA',
- ])
-
- # An empty pattern + a non-empty one
- self.RunAndVerify(':*A*', ['FooTest.Abc', 'BazTest.TestA'])
-
- def testThreePatterns(self):
- """Tests filters that consist of three patterns."""
-
- self.RunAndVerify('*oo*:*A*:*One', [
- 'FooTest.Abc',
- 'FooTest.Xyz',
-
- 'BarTest.TestOne',
-
- 'BazTest.TestOne',
- 'BazTest.TestA',
- ])
-
- # The 2nd pattern is empty.
- self.RunAndVerify('*oo*::*One', [
- 'FooTest.Abc',
- 'FooTest.Xyz',
-
- 'BarTest.TestOne',
-
- 'BazTest.TestOne',
- ])
-
- # The last 2 patterns are empty.
- self.RunAndVerify('*oo*::', [
- 'FooTest.Abc',
- 'FooTest.Xyz',
- ])
-
- def testNegativeFilters(self):
- self.RunAndVerify('*-BazTest.TestOne', [
- 'FooTest.Abc',
- 'FooTest.Xyz',
-
- 'BarTest.TestOne',
- 'BarTest.TestTwo',
- 'BarTest.TestThree',
-
- 'BazTest.TestA',
- 'BazTest.TestB',
- ] + DEATH_TESTS + PARAM_TESTS)
-
- self.RunAndVerify('*-FooTest.Abc:BazTest.*', [
- 'FooTest.Xyz',
-
- 'BarTest.TestOne',
- 'BarTest.TestTwo',
- 'BarTest.TestThree',
- ] + DEATH_TESTS + PARAM_TESTS)
-
- self.RunAndVerify('BarTest.*-BarTest.TestOne', [
- 'BarTest.TestTwo',
- 'BarTest.TestThree',
- ])
-
- # Tests without leading '*'.
- self.RunAndVerify('-FooTest.Abc:FooTest.Xyz:BazTest.*', [
- 'BarTest.TestOne',
- 'BarTest.TestTwo',
- 'BarTest.TestThree',
- ] + DEATH_TESTS + PARAM_TESTS)
-
- # Value parameterized tests.
- self.RunAndVerify('*/*', PARAM_TESTS)
-
- # Value parameterized tests filtering by the sequence name.
- self.RunAndVerify('SeqP/*', [
- 'SeqP/ParamTest.TestX/0',
- 'SeqP/ParamTest.TestX/1',
- 'SeqP/ParamTest.TestY/0',
- 'SeqP/ParamTest.TestY/1',
- ])
-
- # Value parameterized tests filtering by the test name.
- self.RunAndVerify('*/0', [
- 'SeqP/ParamTest.TestX/0',
- 'SeqP/ParamTest.TestY/0',
- 'SeqQ/ParamTest.TestX/0',
- 'SeqQ/ParamTest.TestY/0',
- ])
-
- def testFlagOverridesEnvVar(self):
- """Tests that the filter flag overrides the filtering env. variable."""
-
- SetEnvVar(FILTER_ENV_VAR, 'Foo*')
- args = ['--%s=%s' % (FILTER_FLAG, '*One')]
- tests_run = RunAndExtractTestList(args)[0]
- SetEnvVar(FILTER_ENV_VAR, None)
-
- self.AssertSetEqual(tests_run, ['BarTest.TestOne', 'BazTest.TestOne'])
-
- def testShardStatusFileIsCreated(self):
- """Tests that the shard file is created if specified in the environment."""
-
- shard_status_file = os.path.join(gtest_test_utils.GetTempDir(),
- 'shard_status_file')
- self.assert_(not os.path.exists(shard_status_file))
-
- extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file}
- try:
- InvokeWithModifiedEnv(extra_env, RunAndReturnOutput)
- finally:
- self.assert_(os.path.exists(shard_status_file))
- os.remove(shard_status_file)
-
- def testShardStatusFileIsCreatedWithListTests(self):
- """Tests that the shard file is created with the "list_tests" flag."""
-
- shard_status_file = os.path.join(gtest_test_utils.GetTempDir(),
- 'shard_status_file2')
- self.assert_(not os.path.exists(shard_status_file))
-
- extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file}
- try:
- output = InvokeWithModifiedEnv(extra_env,
- RunAndReturnOutput,
- [LIST_TESTS_FLAG])
- finally:
- # This assertion ensures that Google Test enumerated the tests as
- # opposed to running them.
- self.assert_('[==========]' not in output,
- 'Unexpected output during test enumeration.\n'
- 'Please ensure that LIST_TESTS_FLAG is assigned the\n'
- 'correct flag value for listing Google Test tests.')
-
- self.assert_(os.path.exists(shard_status_file))
- os.remove(shard_status_file)
-
- if SUPPORTS_DEATH_TESTS:
- def testShardingWorksWithDeathTests(self):
- """Tests integration with death tests and sharding."""
-
- gtest_filter = 'HasDeathTest.*:SeqP/*'
- expected_tests = [
- 'HasDeathTest.Test1',
- 'HasDeathTest.Test2',
-
- 'SeqP/ParamTest.TestX/0',
- 'SeqP/ParamTest.TestX/1',
- 'SeqP/ParamTest.TestY/0',
- 'SeqP/ParamTest.TestY/1',
- ]
-
- for flag in ['--gtest_death_test_style=threadsafe',
- '--gtest_death_test_style=fast']:
- self.RunAndVerifyWithSharding(gtest_filter, 3, expected_tests,
- check_exit_0=True, args=[flag])
- self.RunAndVerifyWithSharding(gtest_filter, 5, expected_tests,
- check_exit_0=True, args=[flag])
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest_.cc
deleted file mode 100644
index 77deffc38..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_filter_unittest_.cc
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Unit test for Google Test test filters.
-//
-// A user can specify which test(s) in a Google Test program to run via
-// either the GTEST_FILTER environment variable or the --gtest_filter
-// flag. This is used for testing such functionality.
-//
-// The program will be invoked from a Python unit test. Don't run it
-// directly.
-
-#include "gtest/gtest.h"
-
-namespace {
-
-// Test case FooTest.
-
-class FooTest : public testing::Test {
-};
-
-TEST_F(FooTest, Abc) {
-}
-
-TEST_F(FooTest, Xyz) {
- FAIL() << "Expected failure.";
-}
-
-// Test case BarTest.
-
-TEST(BarTest, TestOne) {
-}
-
-TEST(BarTest, TestTwo) {
-}
-
-TEST(BarTest, TestThree) {
-}
-
-TEST(BarTest, DISABLED_TestFour) {
- FAIL() << "Expected failure.";
-}
-
-TEST(BarTest, DISABLED_TestFive) {
- FAIL() << "Expected failure.";
-}
-
-// Test case BazTest.
-
-TEST(BazTest, TestOne) {
- FAIL() << "Expected failure.";
-}
-
-TEST(BazTest, TestA) {
-}
-
-TEST(BazTest, TestB) {
-}
-
-TEST(BazTest, DISABLED_TestC) {
- FAIL() << "Expected failure.";
-}
-
-// Test case HasDeathTest
-
-TEST(HasDeathTest, Test1) {
- EXPECT_DEATH_IF_SUPPORTED(exit(1), ".*");
-}
-
-// We need at least two death tests to make sure that the all death tests
-// aren't on the first shard.
-TEST(HasDeathTest, Test2) {
- EXPECT_DEATH_IF_SUPPORTED(exit(1), ".*");
-}
-
-// Test case FoobarTest
-
-TEST(DISABLED_FoobarTest, Test1) {
- FAIL() << "Expected failure.";
-}
-
-TEST(DISABLED_FoobarTest, DISABLED_Test2) {
- FAIL() << "Expected failure.";
-}
-
-// Test case FoobarbazTest
-
-TEST(DISABLED_FoobarbazTest, TestA) {
- FAIL() << "Expected failure.";
-}
-
-#if GTEST_HAS_PARAM_TEST
-class ParamTest : public testing::TestWithParam<int> {
-};
-
-TEST_P(ParamTest, TestX) {
-}
-
-TEST_P(ParamTest, TestY) {
-}
-
-INSTANTIATE_TEST_CASE_P(SeqP, ParamTest, testing::Values(1, 2));
-INSTANTIATE_TEST_CASE_P(SeqQ, ParamTest, testing::Values(5, 6));
-#endif // GTEST_HAS_PARAM_TEST
-
-} // namespace
-
-int main(int argc, char **argv) {
- ::testing::InitGoogleTest(&argc, argv);
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test.py
deleted file mode 100755
index 093c838d9..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test.py
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests the --help flag of Google C++ Testing Framework.
-
-SYNOPSIS
- gtest_help_test.py --build_dir=BUILD/DIR
- # where BUILD/DIR contains the built gtest_help_test_ file.
- gtest_help_test.py
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import gtest_test_utils
-
-
-IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
-IS_WINDOWS = os.name == 'nt'
-
-PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_help_test_')
-FLAG_PREFIX = '--gtest_'
-DEATH_TEST_STYLE_FLAG = FLAG_PREFIX + 'death_test_style'
-STREAM_RESULT_TO_FLAG = FLAG_PREFIX + 'stream_result_to'
-UNKNOWN_FLAG = FLAG_PREFIX + 'unknown_flag_for_testing'
-LIST_TESTS_FLAG = FLAG_PREFIX + 'list_tests'
-INCORRECT_FLAG_VARIANTS = [re.sub('^--', '-', LIST_TESTS_FLAG),
- re.sub('^--', '/', LIST_TESTS_FLAG),
- re.sub('_', '-', LIST_TESTS_FLAG)]
-INTERNAL_FLAG_FOR_TESTING = FLAG_PREFIX + 'internal_flag_for_testing'
-
-SUPPORTS_DEATH_TESTS = "DeathTest" in gtest_test_utils.Subprocess(
- [PROGRAM_PATH, LIST_TESTS_FLAG]).output
-
-# The help message must match this regex.
-HELP_REGEX = re.compile(
- FLAG_PREFIX + r'list_tests.*' +
- FLAG_PREFIX + r'filter=.*' +
- FLAG_PREFIX + r'also_run_disabled_tests.*' +
- FLAG_PREFIX + r'repeat=.*' +
- FLAG_PREFIX + r'shuffle.*' +
- FLAG_PREFIX + r'random_seed=.*' +
- FLAG_PREFIX + r'color=.*' +
- FLAG_PREFIX + r'print_time.*' +
- FLAG_PREFIX + r'output=.*' +
- FLAG_PREFIX + r'break_on_failure.*' +
- FLAG_PREFIX + r'throw_on_failure.*' +
- FLAG_PREFIX + r'catch_exceptions=0.*',
- re.DOTALL)
-
-
-def RunWithFlag(flag):
- """Runs gtest_help_test_ with the given flag.
-
- Returns:
- the exit code and the text output as a tuple.
- Args:
- flag: the command-line flag to pass to gtest_help_test_, or None.
- """
-
- if flag is None:
- command = [PROGRAM_PATH]
- else:
- command = [PROGRAM_PATH, flag]
- child = gtest_test_utils.Subprocess(command)
- return child.exit_code, child.output
-
-
-class GTestHelpTest(gtest_test_utils.TestCase):
- """Tests the --help flag and its equivalent forms."""
-
- def TestHelpFlag(self, flag):
- """Verifies correct behavior when help flag is specified.
-
- The right message must be printed and the tests must
- skipped when the given flag is specified.
-
- Args:
- flag: A flag to pass to the binary or None.
- """
-
- exit_code, output = RunWithFlag(flag)
- self.assertEquals(0, exit_code)
- self.assert_(HELP_REGEX.search(output), output)
-
- if IS_LINUX:
- self.assert_(STREAM_RESULT_TO_FLAG in output, output)
- else:
- self.assert_(STREAM_RESULT_TO_FLAG not in output, output)
-
- if SUPPORTS_DEATH_TESTS and not IS_WINDOWS:
- self.assert_(DEATH_TEST_STYLE_FLAG in output, output)
- else:
- self.assert_(DEATH_TEST_STYLE_FLAG not in output, output)
-
- def TestNonHelpFlag(self, flag):
- """Verifies correct behavior when no help flag is specified.
-
- Verifies that when no help flag is specified, the tests are run
- and the help message is not printed.
-
- Args:
- flag: A flag to pass to the binary or None.
- """
-
- exit_code, output = RunWithFlag(flag)
- self.assert_(exit_code != 0)
- self.assert_(not HELP_REGEX.search(output), output)
-
- def testPrintsHelpWithFullFlag(self):
- self.TestHelpFlag('--help')
-
- def testPrintsHelpWithShortFlag(self):
- self.TestHelpFlag('-h')
-
- def testPrintsHelpWithQuestionFlag(self):
- self.TestHelpFlag('-?')
-
- def testPrintsHelpWithWindowsStyleQuestionFlag(self):
- self.TestHelpFlag('/?')
-
- def testPrintsHelpWithUnrecognizedGoogleTestFlag(self):
- self.TestHelpFlag(UNKNOWN_FLAG)
-
- def testPrintsHelpWithIncorrectFlagStyle(self):
- for incorrect_flag in INCORRECT_FLAG_VARIANTS:
- self.TestHelpFlag(incorrect_flag)
-
- def testRunsTestsWithoutHelpFlag(self):
- """Verifies that when no help flag is specified, the tests are run
- and the help message is not printed."""
-
- self.TestNonHelpFlag(None)
-
- def testRunsTestsWithGtestInternalFlag(self):
- """Verifies that the tests are run and no help message is printed when
- a flag starting with Google Test prefix and 'internal_' is supplied."""
-
- self.TestNonHelpFlag(INTERNAL_FLAG_FOR_TESTING)
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test_.cc
deleted file mode 100644
index 31f78c244..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_help_test_.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// This program is meant to be run by gtest_help_test.py. Do not run
-// it directly.
-
-#include "gtest/gtest.h"
-
-// When a help flag is specified, this program should skip the tests
-// and exit with 0; otherwise the following test will be executed,
-// causing this program to exit with a non-zero code.
-TEST(HelpFlagTest, ShouldNotBeRun) {
- ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified.";
-}
-
-#if GTEST_HAS_DEATH_TEST
-TEST(DeathTest, UsedByPythonScriptToDetectSupportForDeathTestsInThisBinary) {}
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest.py
deleted file mode 100755
index ce8c3ef05..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest.py
+++ /dev/null
@@ -1,177 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test for Google Test's --gtest_list_tests flag.
-
-A user can ask Google Test to list all tests by specifying the
---gtest_list_tests flag. This script tests such functionality
-by invoking gtest_list_tests_unittest_ (a program written with
-Google Test) the command line flags.
-"""
-
-__author__ = 'phanna@google.com (Patrick Hanna)'
-
-import gtest_test_utils
-
-
-# Constants.
-
-# The command line flag for enabling/disabling listing all tests.
-LIST_TESTS_FLAG = 'gtest_list_tests'
-
-# Path to the gtest_list_tests_unittest_ program.
-EXE_PATH = gtest_test_utils.GetTestExecutablePath('gtest_list_tests_unittest_')
-
-# The expected output when running gtest_list_tests_unittest_ with
-# --gtest_list_tests
-EXPECTED_OUTPUT_NO_FILTER = """FooDeathTest.
- Test1
-Foo.
- Bar1
- Bar2
- DISABLED_Bar3
-Abc.
- Xyz
- Def
-FooBar.
- Baz
-FooTest.
- Test1
- DISABLED_Test2
- Test3
-"""
-
-# The expected output when running gtest_list_tests_unittest_ with
-# --gtest_list_tests and --gtest_filter=Foo*.
-EXPECTED_OUTPUT_FILTER_FOO = """FooDeathTest.
- Test1
-Foo.
- Bar1
- Bar2
- DISABLED_Bar3
-FooBar.
- Baz
-FooTest.
- Test1
- DISABLED_Test2
- Test3
-"""
-
-# Utilities.
-
-
-def Run(args):
- """Runs gtest_list_tests_unittest_ and returns the list of tests printed."""
-
- return gtest_test_utils.Subprocess([EXE_PATH] + args,
- capture_stderr=False).output
-
-
-# The unit test.
-
-class GTestListTestsUnitTest(gtest_test_utils.TestCase):
- """Tests using the --gtest_list_tests flag to list all tests."""
-
- def RunAndVerify(self, flag_value, expected_output, other_flag):
- """Runs gtest_list_tests_unittest_ and verifies that it prints
- the correct tests.
-
- Args:
- flag_value: value of the --gtest_list_tests flag;
- None if the flag should not be present.
-
- expected_output: the expected output after running command;
-
- other_flag: a different flag to be passed to command
- along with gtest_list_tests;
- None if the flag should not be present.
- """
-
- if flag_value is None:
- flag = ''
- flag_expression = 'not set'
- elif flag_value == '0':
- flag = '--%s=0' % LIST_TESTS_FLAG
- flag_expression = '0'
- else:
- flag = '--%s' % LIST_TESTS_FLAG
- flag_expression = '1'
-
- args = [flag]
-
- if other_flag is not None:
- args += [other_flag]
-
- output = Run(args)
-
- msg = ('when %s is %s, the output of "%s" is "%s".' %
- (LIST_TESTS_FLAG, flag_expression, ' '.join(args), output))
-
- if expected_output is not None:
- self.assert_(output == expected_output, msg)
- else:
- self.assert_(output != EXPECTED_OUTPUT_NO_FILTER, msg)
-
- def testDefaultBehavior(self):
- """Tests the behavior of the default mode."""
-
- self.RunAndVerify(flag_value=None,
- expected_output=None,
- other_flag=None)
-
- def testFlag(self):
- """Tests using the --gtest_list_tests flag."""
-
- self.RunAndVerify(flag_value='0',
- expected_output=None,
- other_flag=None)
- self.RunAndVerify(flag_value='1',
- expected_output=EXPECTED_OUTPUT_NO_FILTER,
- other_flag=None)
-
- def testOverrideNonFilterFlags(self):
- """Tests that --gtest_list_tests overrides the non-filter flags."""
-
- self.RunAndVerify(flag_value='1',
- expected_output=EXPECTED_OUTPUT_NO_FILTER,
- other_flag='--gtest_break_on_failure')
-
- def testWithFilterFlags(self):
- """Tests that --gtest_list_tests takes into account the
- --gtest_filter flag."""
-
- self.RunAndVerify(flag_value='1',
- expected_output=EXPECTED_OUTPUT_FILTER_FOO,
- other_flag='--gtest_filter=Foo*')
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest_.cc
deleted file mode 100644
index 2b1d0780b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_list_tests_unittest_.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: phanna@google.com (Patrick Hanna)
-
-// Unit test for Google Test's --gtest_list_tests flag.
-//
-// A user can ask Google Test to list all tests that will run
-// so that when using a filter, a user will know what
-// tests to look for. The tests will not be run after listing.
-//
-// This program will be invoked from a Python unit test.
-// Don't run it directly.
-
-#include "gtest/gtest.h"
-
-namespace {
-
-// Several different test cases and tests that will be listed.
-TEST(Foo, Bar1) {
-}
-
-TEST(Foo, Bar2) {
-}
-
-TEST(Foo, DISABLED_Bar3) {
-}
-
-TEST(Abc, Xyz) {
-}
-
-TEST(Abc, Def) {
-}
-
-TEST(FooBar, Baz) {
-}
-
-class FooTest : public testing::Test {
-};
-
-TEST_F(FooTest, Test1) {
-}
-
-TEST_F(FooTest, DISABLED_Test2) {
-}
-
-TEST_F(FooTest, Test3) {
-}
-
-TEST(FooDeathTest, Test1) {
-}
-
-} // namespace
-
-int main(int argc, char **argv) {
- ::testing::InitGoogleTest(&argc, argv);
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_main_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_main_unittest.cc
deleted file mode 100644
index ecd9bb876..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_main_unittest.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/gtest.h"
-
-// Tests that we don't have to define main() when we link to
-// gtest_main instead of gtest.
-
-namespace {
-
-TEST(GTestMainTest, ShouldSucceed) {
-}
-
-} // namespace
-
-// We are using the main() function defined in src/gtest_main.cc, so
-// we don't define it here.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_no_test_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_no_test_unittest.cc
deleted file mode 100644
index e3a85f12a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_no_test_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Tests that a Google Test program that has no test defined can run
-// successfully.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/gtest.h"
-
-
-int main(int argc, char **argv) {
- testing::InitGoogleTest(&argc, argv);
-
- // An ad-hoc assertion outside of all tests.
- //
- // This serves three purposes:
- //
- // 1. It verifies that an ad-hoc assertion can be executed even if
- // no test is defined.
- // 2. It verifies that a failed ad-hoc assertion causes the test
- // program to fail.
- // 3. We had a bug where the XML output won't be generated if an
- // assertion is executed before RUN_ALL_TESTS() is called, even
- // though --gtest_output=xml is specified. This makes sure the
- // bug is fixed and doesn't regress.
- EXPECT_EQ(1, 2);
-
- // The above EXPECT_EQ() should cause RUN_ALL_TESTS() to return non-zero.
- return RUN_ALL_TESTS() ? 0 : 1;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test.py
deleted file mode 100755
index f409e2a78..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test.py
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests the text output of Google C++ Testing Framework.
-
-SYNOPSIS
- gtest_output_test.py --build_dir=BUILD/DIR --gengolden
- # where BUILD/DIR contains the built gtest_output_test_ file.
- gtest_output_test.py --gengolden
- gtest_output_test.py
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import sys
-import gtest_test_utils
-
-
-# The flag for generating the golden file
-GENGOLDEN_FLAG = '--gengolden'
-CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS'
-
-IS_WINDOWS = os.name == 'nt'
-
-# TODO(vladl@google.com): remove the _lin suffix.
-GOLDEN_NAME = 'gtest_output_test_golden_lin.txt'
-
-PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_')
-
-# At least one command we exercise must not have the
-# --gtest_internal_skip_environment_and_ad_hoc_tests flag.
-COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests'])
-COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes'])
-COMMAND_WITH_TIME = ({}, [PROGRAM_PATH,
- '--gtest_print_time',
- '--gtest_internal_skip_environment_and_ad_hoc_tests',
- '--gtest_filter=FatalFailureTest.*:LoggingTest.*'])
-COMMAND_WITH_DISABLED = (
- {}, [PROGRAM_PATH,
- '--gtest_also_run_disabled_tests',
- '--gtest_internal_skip_environment_and_ad_hoc_tests',
- '--gtest_filter=*DISABLED_*'])
-COMMAND_WITH_SHARDING = (
- {'GTEST_SHARD_INDEX': '1', 'GTEST_TOTAL_SHARDS': '2'},
- [PROGRAM_PATH,
- '--gtest_internal_skip_environment_and_ad_hoc_tests',
- '--gtest_filter=PassingTest.*'])
-
-GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME)
-
-
-def ToUnixLineEnding(s):
- """Changes all Windows/Mac line endings in s to UNIX line endings."""
-
- return s.replace('\r\n', '\n').replace('\r', '\n')
-
-
-def RemoveLocations(test_output):
- """Removes all file location info from a Google Test program's output.
-
- Args:
- test_output: the output of a Google Test program.
-
- Returns:
- output with all file location info (in the form of
- 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
- 'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by
- 'FILE_NAME:#: '.
- """
-
- return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\: ', r'\1:#: ', test_output)
-
-
-def RemoveStackTraceDetails(output):
- """Removes all stack traces from a Google Test program's output."""
-
- # *? means "find the shortest string that matches".
- return re.sub(r'Stack trace:(.|\n)*?\n\n',
- 'Stack trace: (omitted)\n\n', output)
-
-
-def RemoveStackTraces(output):
- """Removes all traces of stack traces from a Google Test program's output."""
-
- # *? means "find the shortest string that matches".
- return re.sub(r'Stack trace:(.|\n)*?\n\n', '', output)
-
-
-def RemoveTime(output):
- """Removes all time information from a Google Test program's output."""
-
- return re.sub(r'\(\d+ ms', '(? ms', output)
-
-
-def RemoveTypeInfoDetails(test_output):
- """Removes compiler-specific type info from Google Test program's output.
-
- Args:
- test_output: the output of a Google Test program.
-
- Returns:
- output with type information normalized to canonical form.
- """
-
- # some compilers output the name of type 'unsigned int' as 'unsigned'
- return re.sub(r'unsigned int', 'unsigned', test_output)
-
-
-def NormalizeToCurrentPlatform(test_output):
- """Normalizes platform specific output details for easier comparison."""
-
- if IS_WINDOWS:
- # Removes the color information that is not present on Windows.
- test_output = re.sub('\x1b\\[(0;3\d)?m', '', test_output)
- # Changes failure message headers into the Windows format.
- test_output = re.sub(r': Failure\n', r': error: ', test_output)
- # Changes file(line_number) to file:line_number.
- test_output = re.sub(r'((\w|\.)+)\((\d+)\):', r'\1:\3:', test_output)
-
- return test_output
-
-
-def RemoveTestCounts(output):
- """Removes test counts from a Google Test program's output."""
-
- output = re.sub(r'\d+ tests?, listed below',
- '? tests, listed below', output)
- output = re.sub(r'\d+ FAILED TESTS',
- '? FAILED TESTS', output)
- output = re.sub(r'\d+ tests? from \d+ test cases?',
- '? tests from ? test cases', output)
- output = re.sub(r'\d+ tests? from ([a-zA-Z_])',
- r'? tests from \1', output)
- return re.sub(r'\d+ tests?\.', '? tests.', output)
-
-
-def RemoveMatchingTests(test_output, pattern):
- """Removes output of specified tests from a Google Test program's output.
-
- This function strips not only the beginning and the end of a test but also
- all output in between.
-
- Args:
- test_output: A string containing the test output.
- pattern: A regex string that matches names of test cases or
- tests to remove.
-
- Returns:
- Contents of test_output with tests whose names match pattern removed.
- """
-
- test_output = re.sub(
- r'.*\[ RUN \] .*%s(.|\n)*?\[( FAILED | OK )\] .*%s.*\n' % (
- pattern, pattern),
- '',
- test_output)
- return re.sub(r'.*%s.*\n' % pattern, '', test_output)
-
-
-def NormalizeOutput(output):
- """Normalizes output (the output of gtest_output_test_.exe)."""
-
- output = ToUnixLineEnding(output)
- output = RemoveLocations(output)
- output = RemoveStackTraceDetails(output)
- output = RemoveTime(output)
- return output
-
-
-def GetShellCommandOutput(env_cmd):
- """Runs a command in a sub-process, and returns its output in a string.
-
- Args:
- env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra
- environment variables to set, and element 1 is a string with
- the command and any flags.
-
- Returns:
- A string with the command's combined standard and diagnostic output.
- """
-
- # Spawns cmd in a sub-process, and gets its standard I/O file objects.
- # Set and save the environment properly.
- environ = os.environ.copy()
- environ.update(env_cmd[0])
- p = gtest_test_utils.Subprocess(env_cmd[1], env=environ)
-
- return p.output
-
-
-def GetCommandOutput(env_cmd):
- """Runs a command and returns its output with all file location
- info stripped off.
-
- Args:
- env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra
- environment variables to set, and element 1 is a string with
- the command and any flags.
- """
-
- # Disables exception pop-ups on Windows.
- environ, cmdline = env_cmd
- environ = dict(environ) # Ensures we are modifying a copy.
- environ[CATCH_EXCEPTIONS_ENV_VAR_NAME] = '1'
- return NormalizeOutput(GetShellCommandOutput((environ, cmdline)))
-
-
-def GetOutputOfAllCommands():
- """Returns concatenated output from several representative commands."""
-
- return (GetCommandOutput(COMMAND_WITH_COLOR) +
- GetCommandOutput(COMMAND_WITH_TIME) +
- GetCommandOutput(COMMAND_WITH_DISABLED) +
- GetCommandOutput(COMMAND_WITH_SHARDING))
-
-
-test_list = GetShellCommandOutput(COMMAND_LIST_TESTS)
-SUPPORTS_DEATH_TESTS = 'DeathTest' in test_list
-SUPPORTS_TYPED_TESTS = 'TypedTest' in test_list
-SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' in test_list
-SUPPORTS_STACK_TRACES = False
-
-CAN_GENERATE_GOLDEN_FILE = (SUPPORTS_DEATH_TESTS and
- SUPPORTS_TYPED_TESTS and
- SUPPORTS_THREADS)
-
-
-class GTestOutputTest(gtest_test_utils.TestCase):
- def RemoveUnsupportedTests(self, test_output):
- if not SUPPORTS_DEATH_TESTS:
- test_output = RemoveMatchingTests(test_output, 'DeathTest')
- if not SUPPORTS_TYPED_TESTS:
- test_output = RemoveMatchingTests(test_output, 'TypedTest')
- test_output = RemoveMatchingTests(test_output, 'TypedDeathTest')
- test_output = RemoveMatchingTests(test_output, 'TypeParamDeathTest')
- if not SUPPORTS_THREADS:
- test_output = RemoveMatchingTests(test_output,
- 'ExpectFailureWithThreadsTest')
- test_output = RemoveMatchingTests(test_output,
- 'ScopedFakeTestPartResultReporterTest')
- test_output = RemoveMatchingTests(test_output,
- 'WorksConcurrently')
- if not SUPPORTS_STACK_TRACES:
- test_output = RemoveStackTraces(test_output)
-
- return test_output
-
- def testOutput(self):
- output = GetOutputOfAllCommands()
-
- golden_file = open(GOLDEN_PATH, 'rb')
- # A mis-configured source control system can cause \r appear in EOL
- # sequences when we read the golden file irrespective of an operating
- # system used. Therefore, we need to strip those \r's from newlines
- # unconditionally.
- golden = ToUnixLineEnding(golden_file.read())
- golden_file.close()
-
- # We want the test to pass regardless of certain features being
- # supported or not.
-
- # We still have to remove type name specifics in all cases.
- normalized_actual = RemoveTypeInfoDetails(output)
- normalized_golden = RemoveTypeInfoDetails(golden)
-
- if CAN_GENERATE_GOLDEN_FILE:
- self.assertEqual(normalized_golden, normalized_actual)
- else:
- normalized_actual = NormalizeToCurrentPlatform(
- RemoveTestCounts(normalized_actual))
- normalized_golden = NormalizeToCurrentPlatform(
- RemoveTestCounts(self.RemoveUnsupportedTests(normalized_golden)))
-
- # This code is very handy when debugging golden file differences:
- if os.getenv('DEBUG_GTEST_OUTPUT_TEST'):
- open(os.path.join(
- gtest_test_utils.GetSourceDir(),
- '_gtest_output_test_normalized_actual.txt'), 'wb').write(
- normalized_actual)
- open(os.path.join(
- gtest_test_utils.GetSourceDir(),
- '_gtest_output_test_normalized_golden.txt'), 'wb').write(
- normalized_golden)
-
- self.assertEqual(normalized_golden, normalized_actual)
-
-
-if __name__ == '__main__':
- if sys.argv[1:] == [GENGOLDEN_FLAG]:
- if CAN_GENERATE_GOLDEN_FILE:
- output = GetOutputOfAllCommands()
- golden_file = open(GOLDEN_PATH, 'wb')
- golden_file.write(output)
- golden_file.close()
- else:
- message = (
- """Unable to write a golden file when compiled in an environment
-that does not support all the required features (death tests, typed tests,
-and multiple threads). Please generate the golden file using a binary built
-with those features enabled.""")
-
- sys.stderr.write(message)
- sys.exit(1)
- else:
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_.cc
deleted file mode 100644
index 13dbec477..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_.cc
+++ /dev/null
@@ -1,1020 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// A unit test for Google Test itself. This verifies that the basic
-// constructs of Google Test work.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/gtest-spi.h"
-#include "gtest/gtest.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-#include <stdlib.h>
-
-#if GTEST_IS_THREADSAFE
-using testing::ScopedFakeTestPartResultReporter;
-using testing::TestPartResultArray;
-
-using testing::internal::Notification;
-using testing::internal::ThreadWithParam;
-#endif
-
-namespace posix = ::testing::internal::posix;
-using testing::internal::String;
-using testing::internal::scoped_ptr;
-
-// Tests catching fatal failures.
-
-// A subroutine used by the following test.
-void TestEq1(int x) {
- ASSERT_EQ(1, x);
-}
-
-// This function calls a test subroutine, catches the fatal failure it
-// generates, and then returns early.
-void TryTestSubroutine() {
- // Calls a subrountine that yields a fatal failure.
- TestEq1(2);
-
- // Catches the fatal failure and aborts the test.
- //
- // The testing::Test:: prefix is necessary when calling
- // HasFatalFailure() outside of a TEST, TEST_F, or test fixture.
- if (testing::Test::HasFatalFailure()) return;
-
- // If we get here, something is wrong.
- FAIL() << "This should never be reached.";
-}
-
-TEST(PassingTest, PassingTest1) {
-}
-
-TEST(PassingTest, PassingTest2) {
-}
-
-// Tests that parameters of failing parameterized tests are printed in the
-// failing test summary.
-class FailingParamTest : public testing::TestWithParam<int> {};
-
-TEST_P(FailingParamTest, Fails) {
- EXPECT_EQ(1, GetParam());
-}
-
-// This generates a test which will fail. Google Test is expected to print
-// its parameter when it outputs the list of all failed tests.
-INSTANTIATE_TEST_CASE_P(PrintingFailingParams,
- FailingParamTest,
- testing::Values(2));
-
-// Tests catching a fatal failure in a subroutine.
-TEST(FatalFailureTest, FatalFailureInSubroutine) {
- printf("(expecting a failure that x should be 1)\n");
-
- TryTestSubroutine();
-}
-
-// Tests catching a fatal failure in a nested subroutine.
-TEST(FatalFailureTest, FatalFailureInNestedSubroutine) {
- printf("(expecting a failure that x should be 1)\n");
-
- // Calls a subrountine that yields a fatal failure.
- TryTestSubroutine();
-
- // Catches the fatal failure and aborts the test.
- //
- // When calling HasFatalFailure() inside a TEST, TEST_F, or test
- // fixture, the testing::Test:: prefix is not needed.
- if (HasFatalFailure()) return;
-
- // If we get here, something is wrong.
- FAIL() << "This should never be reached.";
-}
-
-// Tests HasFatalFailure() after a failed EXPECT check.
-TEST(FatalFailureTest, NonfatalFailureInSubroutine) {
- printf("(expecting a failure on false)\n");
- EXPECT_TRUE(false); // Generates a nonfatal failure
- ASSERT_FALSE(HasFatalFailure()); // This should succeed.
-}
-
-// Tests interleaving user logging and Google Test assertions.
-TEST(LoggingTest, InterleavingLoggingAndAssertions) {
- static const int a[4] = {
- 3, 9, 2, 6
- };
-
- printf("(expecting 2 failures on (3) >= (a[i]))\n");
- for (int i = 0; i < static_cast<int>(sizeof(a)/sizeof(*a)); i++) {
- printf("i == %d\n", i);
- EXPECT_GE(3, a[i]);
- }
-}
-
-// Tests the SCOPED_TRACE macro.
-
-// A helper function for testing SCOPED_TRACE.
-void SubWithoutTrace(int n) {
- EXPECT_EQ(1, n);
- ASSERT_EQ(2, n);
-}
-
-// Another helper function for testing SCOPED_TRACE.
-void SubWithTrace(int n) {
- SCOPED_TRACE(testing::Message() << "n = " << n);
-
- SubWithoutTrace(n);
-}
-
-// Tests that SCOPED_TRACE() obeys lexical scopes.
-TEST(SCOPED_TRACETest, ObeysScopes) {
- printf("(expected to fail)\n");
-
- // There should be no trace before SCOPED_TRACE() is invoked.
- ADD_FAILURE() << "This failure is expected, and shouldn't have a trace.";
-
- {
- SCOPED_TRACE("Expected trace");
- // After SCOPED_TRACE(), a failure in the current scope should contain
- // the trace.
- ADD_FAILURE() << "This failure is expected, and should have a trace.";
- }
-
- // Once the control leaves the scope of the SCOPED_TRACE(), there
- // should be no trace again.
- ADD_FAILURE() << "This failure is expected, and shouldn't have a trace.";
-}
-
-// Tests that SCOPED_TRACE works inside a loop.
-TEST(SCOPED_TRACETest, WorksInLoop) {
- printf("(expected to fail)\n");
-
- for (int i = 1; i <= 2; i++) {
- SCOPED_TRACE(testing::Message() << "i = " << i);
-
- SubWithoutTrace(i);
- }
-}
-
-// Tests that SCOPED_TRACE works in a subroutine.
-TEST(SCOPED_TRACETest, WorksInSubroutine) {
- printf("(expected to fail)\n");
-
- SubWithTrace(1);
- SubWithTrace(2);
-}
-
-// Tests that SCOPED_TRACE can be nested.
-TEST(SCOPED_TRACETest, CanBeNested) {
- printf("(expected to fail)\n");
-
- SCOPED_TRACE(""); // A trace without a message.
-
- SubWithTrace(2);
-}
-
-// Tests that multiple SCOPED_TRACEs can be used in the same scope.
-TEST(SCOPED_TRACETest, CanBeRepeated) {
- printf("(expected to fail)\n");
-
- SCOPED_TRACE("A");
- ADD_FAILURE()
- << "This failure is expected, and should contain trace point A.";
-
- SCOPED_TRACE("B");
- ADD_FAILURE()
- << "This failure is expected, and should contain trace point A and B.";
-
- {
- SCOPED_TRACE("C");
- ADD_FAILURE() << "This failure is expected, and should contain "
- << "trace point A, B, and C.";
- }
-
- SCOPED_TRACE("D");
- ADD_FAILURE() << "This failure is expected, and should contain "
- << "trace point A, B, and D.";
-}
-
-#if GTEST_IS_THREADSAFE
-// Tests that SCOPED_TRACE()s can be used concurrently from multiple
-// threads. Namely, an assertion should be affected by
-// SCOPED_TRACE()s in its own thread only.
-
-// Here's the sequence of actions that happen in the test:
-//
-// Thread A (main) | Thread B (spawned)
-// ===============================|================================
-// spawns thread B |
-// -------------------------------+--------------------------------
-// waits for n1 | SCOPED_TRACE("Trace B");
-// | generates failure #1
-// | notifies n1
-// -------------------------------+--------------------------------
-// SCOPED_TRACE("Trace A"); | waits for n2
-// generates failure #2 |
-// notifies n2 |
-// -------------------------------|--------------------------------
-// waits for n3 | generates failure #3
-// | trace B dies
-// | generates failure #4
-// | notifies n3
-// -------------------------------|--------------------------------
-// generates failure #5 | finishes
-// trace A dies |
-// generates failure #6 |
-// -------------------------------|--------------------------------
-// waits for thread B to finish |
-
-struct CheckPoints {
- Notification n1;
- Notification n2;
- Notification n3;
-};
-
-static void ThreadWithScopedTrace(CheckPoints* check_points) {
- {
- SCOPED_TRACE("Trace B");
- ADD_FAILURE()
- << "Expected failure #1 (in thread B, only trace B alive).";
- check_points->n1.Notify();
- check_points->n2.WaitForNotification();
-
- ADD_FAILURE()
- << "Expected failure #3 (in thread B, trace A & B both alive).";
- } // Trace B dies here.
- ADD_FAILURE()
- << "Expected failure #4 (in thread B, only trace A alive).";
- check_points->n3.Notify();
-}
-
-TEST(SCOPED_TRACETest, WorksConcurrently) {
- printf("(expecting 6 failures)\n");
-
- CheckPoints check_points;
- ThreadWithParam<CheckPoints*> thread(&ThreadWithScopedTrace,
- &check_points,
- NULL);
- check_points.n1.WaitForNotification();
-
- {
- SCOPED_TRACE("Trace A");
- ADD_FAILURE()
- << "Expected failure #2 (in thread A, trace A & B both alive).";
- check_points.n2.Notify();
- check_points.n3.WaitForNotification();
-
- ADD_FAILURE()
- << "Expected failure #5 (in thread A, only trace A alive).";
- } // Trace A dies here.
- ADD_FAILURE()
- << "Expected failure #6 (in thread A, no trace alive).";
- thread.Join();
-}
-#endif // GTEST_IS_THREADSAFE
-
-TEST(DisabledTestsWarningTest,
- DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning) {
- // This test body is intentionally empty. Its sole purpose is for
- // verifying that the --gtest_also_run_disabled_tests flag
- // suppresses the "YOU HAVE 12 DISABLED TESTS" warning at the end of
- // the test output.
-}
-
-// Tests using assertions outside of TEST and TEST_F.
-//
-// This function creates two failures intentionally.
-void AdHocTest() {
- printf("The non-test part of the code is expected to have 2 failures.\n\n");
- EXPECT_TRUE(false);
- EXPECT_EQ(2, 3);
-}
-
-// Runs all TESTs, all TEST_Fs, and the ad hoc test.
-int RunAllTests() {
- AdHocTest();
- return RUN_ALL_TESTS();
-}
-
-// Tests non-fatal failures in the fixture constructor.
-class NonFatalFailureInFixtureConstructorTest : public testing::Test {
- protected:
- NonFatalFailureInFixtureConstructorTest() {
- printf("(expecting 5 failures)\n");
- ADD_FAILURE() << "Expected failure #1, in the test fixture c'tor.";
- }
-
- ~NonFatalFailureInFixtureConstructorTest() {
- ADD_FAILURE() << "Expected failure #5, in the test fixture d'tor.";
- }
-
- virtual void SetUp() {
- ADD_FAILURE() << "Expected failure #2, in SetUp().";
- }
-
- virtual void TearDown() {
- ADD_FAILURE() << "Expected failure #4, in TearDown.";
- }
-};
-
-TEST_F(NonFatalFailureInFixtureConstructorTest, FailureInConstructor) {
- ADD_FAILURE() << "Expected failure #3, in the test body.";
-}
-
-// Tests fatal failures in the fixture constructor.
-class FatalFailureInFixtureConstructorTest : public testing::Test {
- protected:
- FatalFailureInFixtureConstructorTest() {
- printf("(expecting 2 failures)\n");
- Init();
- }
-
- ~FatalFailureInFixtureConstructorTest() {
- ADD_FAILURE() << "Expected failure #2, in the test fixture d'tor.";
- }
-
- virtual void SetUp() {
- ADD_FAILURE() << "UNEXPECTED failure in SetUp(). "
- << "We should never get here, as the test fixture c'tor "
- << "had a fatal failure.";
- }
-
- virtual void TearDown() {
- ADD_FAILURE() << "UNEXPECTED failure in TearDown(). "
- << "We should never get here, as the test fixture c'tor "
- << "had a fatal failure.";
- }
- private:
- void Init() {
- FAIL() << "Expected failure #1, in the test fixture c'tor.";
- }
-};
-
-TEST_F(FatalFailureInFixtureConstructorTest, FailureInConstructor) {
- ADD_FAILURE() << "UNEXPECTED failure in the test body. "
- << "We should never get here, as the test fixture c'tor "
- << "had a fatal failure.";
-}
-
-// Tests non-fatal failures in SetUp().
-class NonFatalFailureInSetUpTest : public testing::Test {
- protected:
- virtual ~NonFatalFailureInSetUpTest() {
- Deinit();
- }
-
- virtual void SetUp() {
- printf("(expecting 4 failures)\n");
- ADD_FAILURE() << "Expected failure #1, in SetUp().";
- }
-
- virtual void TearDown() {
- FAIL() << "Expected failure #3, in TearDown().";
- }
- private:
- void Deinit() {
- FAIL() << "Expected failure #4, in the test fixture d'tor.";
- }
-};
-
-TEST_F(NonFatalFailureInSetUpTest, FailureInSetUp) {
- FAIL() << "Expected failure #2, in the test function.";
-}
-
-// Tests fatal failures in SetUp().
-class FatalFailureInSetUpTest : public testing::Test {
- protected:
- virtual ~FatalFailureInSetUpTest() {
- Deinit();
- }
-
- virtual void SetUp() {
- printf("(expecting 3 failures)\n");
- FAIL() << "Expected failure #1, in SetUp().";
- }
-
- virtual void TearDown() {
- FAIL() << "Expected failure #2, in TearDown().";
- }
- private:
- void Deinit() {
- FAIL() << "Expected failure #3, in the test fixture d'tor.";
- }
-};
-
-TEST_F(FatalFailureInSetUpTest, FailureInSetUp) {
- FAIL() << "UNEXPECTED failure in the test function. "
- << "We should never get here, as SetUp() failed.";
-}
-
-TEST(AddFailureAtTest, MessageContainsSpecifiedFileAndLineNumber) {
- ADD_FAILURE_AT("foo.cc", 42) << "Expected failure in foo.cc";
-}
-
-#if GTEST_IS_THREADSAFE
-
-// A unary function that may die.
-void DieIf(bool should_die) {
- GTEST_CHECK_(!should_die) << " - death inside DieIf().";
-}
-
-// Tests running death tests in a multi-threaded context.
-
-// Used for coordination between the main and the spawn thread.
-struct SpawnThreadNotifications {
- SpawnThreadNotifications() {}
-
- Notification spawn_thread_started;
- Notification spawn_thread_ok_to_terminate;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SpawnThreadNotifications);
-};
-
-// The function to be executed in the thread spawn by the
-// MultipleThreads test (below).
-static void ThreadRoutine(SpawnThreadNotifications* notifications) {
- // Signals the main thread that this thread has started.
- notifications->spawn_thread_started.Notify();
-
- // Waits for permission to finish from the main thread.
- notifications->spawn_thread_ok_to_terminate.WaitForNotification();
-}
-
-// This is a death-test test, but it's not named with a DeathTest
-// suffix. It starts threads which might interfere with later
-// death tests, so it must run after all other death tests.
-class DeathTestAndMultiThreadsTest : public testing::Test {
- protected:
- // Starts a thread and waits for it to begin.
- virtual void SetUp() {
- thread_.reset(new ThreadWithParam<SpawnThreadNotifications*>(
- &ThreadRoutine, &notifications_, NULL));
- notifications_.spawn_thread_started.WaitForNotification();
- }
- // Tells the thread to finish, and reaps it.
- // Depending on the version of the thread library in use,
- // a manager thread might still be left running that will interfere
- // with later death tests. This is unfortunate, but this class
- // cleans up after itself as best it can.
- virtual void TearDown() {
- notifications_.spawn_thread_ok_to_terminate.Notify();
- }
-
- private:
- SpawnThreadNotifications notifications_;
- scoped_ptr<ThreadWithParam<SpawnThreadNotifications*> > thread_;
-};
-
-#endif // GTEST_IS_THREADSAFE
-
-// The MixedUpTestCaseTest test case verifies that Google Test will fail a
-// test if it uses a different fixture class than what other tests in
-// the same test case use. It deliberately contains two fixture
-// classes with the same name but defined in different namespaces.
-
-// The MixedUpTestCaseWithSameTestNameTest test case verifies that
-// when the user defines two tests with the same test case name AND
-// same test name (but in different namespaces), the second test will
-// fail.
-
-namespace foo {
-
-class MixedUpTestCaseTest : public testing::Test {
-};
-
-TEST_F(MixedUpTestCaseTest, FirstTestFromNamespaceFoo) {}
-TEST_F(MixedUpTestCaseTest, SecondTestFromNamespaceFoo) {}
-
-class MixedUpTestCaseWithSameTestNameTest : public testing::Test {
-};
-
-TEST_F(MixedUpTestCaseWithSameTestNameTest,
- TheSecondTestWithThisNameShouldFail) {}
-
-} // namespace foo
-
-namespace bar {
-
-class MixedUpTestCaseTest : public testing::Test {
-};
-
-// The following two tests are expected to fail. We rely on the
-// golden file to check that Google Test generates the right error message.
-TEST_F(MixedUpTestCaseTest, ThisShouldFail) {}
-TEST_F(MixedUpTestCaseTest, ThisShouldFailToo) {}
-
-class MixedUpTestCaseWithSameTestNameTest : public testing::Test {
-};
-
-// Expected to fail. We rely on the golden file to check that Google Test
-// generates the right error message.
-TEST_F(MixedUpTestCaseWithSameTestNameTest,
- TheSecondTestWithThisNameShouldFail) {}
-
-} // namespace bar
-
-// The following two test cases verify that Google Test catches the user
-// error of mixing TEST and TEST_F in the same test case. The first
-// test case checks the scenario where TEST_F appears before TEST, and
-// the second one checks where TEST appears before TEST_F.
-
-class TEST_F_before_TEST_in_same_test_case : public testing::Test {
-};
-
-TEST_F(TEST_F_before_TEST_in_same_test_case, DefinedUsingTEST_F) {}
-
-// Expected to fail. We rely on the golden file to check that Google Test
-// generates the right error message.
-TEST(TEST_F_before_TEST_in_same_test_case, DefinedUsingTESTAndShouldFail) {}
-
-class TEST_before_TEST_F_in_same_test_case : public testing::Test {
-};
-
-TEST(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST) {}
-
-// Expected to fail. We rely on the golden file to check that Google Test
-// generates the right error message.
-TEST_F(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST_FAndShouldFail) {
-}
-
-// Used for testing EXPECT_NONFATAL_FAILURE() and EXPECT_FATAL_FAILURE().
-int global_integer = 0;
-
-// Tests that EXPECT_NONFATAL_FAILURE() can reference global variables.
-TEST(ExpectNonfatalFailureTest, CanReferenceGlobalVariables) {
- global_integer = 0;
- EXPECT_NONFATAL_FAILURE({
- EXPECT_EQ(1, global_integer) << "Expected non-fatal failure.";
- }, "Expected non-fatal failure.");
-}
-
-// Tests that EXPECT_NONFATAL_FAILURE() can reference local variables
-// (static or not).
-TEST(ExpectNonfatalFailureTest, CanReferenceLocalVariables) {
- int m = 0;
- static int n;
- n = 1;
- EXPECT_NONFATAL_FAILURE({
- EXPECT_EQ(m, n) << "Expected non-fatal failure.";
- }, "Expected non-fatal failure.");
-}
-
-// Tests that EXPECT_NONFATAL_FAILURE() succeeds when there is exactly
-// one non-fatal failure and no fatal failure.
-TEST(ExpectNonfatalFailureTest, SucceedsWhenThereIsOneNonfatalFailure) {
- EXPECT_NONFATAL_FAILURE({
- ADD_FAILURE() << "Expected non-fatal failure.";
- }, "Expected non-fatal failure.");
-}
-
-// Tests that EXPECT_NONFATAL_FAILURE() fails when there is no
-// non-fatal failure.
-TEST(ExpectNonfatalFailureTest, FailsWhenThereIsNoNonfatalFailure) {
- printf("(expecting a failure)\n");
- EXPECT_NONFATAL_FAILURE({
- }, "");
-}
-
-// Tests that EXPECT_NONFATAL_FAILURE() fails when there are two
-// non-fatal failures.
-TEST(ExpectNonfatalFailureTest, FailsWhenThereAreTwoNonfatalFailures) {
- printf("(expecting a failure)\n");
- EXPECT_NONFATAL_FAILURE({
- ADD_FAILURE() << "Expected non-fatal failure 1.";
- ADD_FAILURE() << "Expected non-fatal failure 2.";
- }, "");
-}
-
-// Tests that EXPECT_NONFATAL_FAILURE() fails when there is one fatal
-// failure.
-TEST(ExpectNonfatalFailureTest, FailsWhenThereIsOneFatalFailure) {
- printf("(expecting a failure)\n");
- EXPECT_NONFATAL_FAILURE({
- FAIL() << "Expected fatal failure.";
- }, "");
-}
-
-// Tests that EXPECT_NONFATAL_FAILURE() fails when the statement being
-// tested returns.
-TEST(ExpectNonfatalFailureTest, FailsWhenStatementReturns) {
- printf("(expecting a failure)\n");
- EXPECT_NONFATAL_FAILURE({
- return;
- }, "");
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Tests that EXPECT_NONFATAL_FAILURE() fails when the statement being
-// tested throws.
-TEST(ExpectNonfatalFailureTest, FailsWhenStatementThrows) {
- printf("(expecting a failure)\n");
- try {
- EXPECT_NONFATAL_FAILURE({
- throw 0;
- }, "");
- } catch(int) { // NOLINT
- }
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Tests that EXPECT_FATAL_FAILURE() can reference global variables.
-TEST(ExpectFatalFailureTest, CanReferenceGlobalVariables) {
- global_integer = 0;
- EXPECT_FATAL_FAILURE({
- ASSERT_EQ(1, global_integer) << "Expected fatal failure.";
- }, "Expected fatal failure.");
-}
-
-// Tests that EXPECT_FATAL_FAILURE() can reference local static
-// variables.
-TEST(ExpectFatalFailureTest, CanReferenceLocalStaticVariables) {
- static int n;
- n = 1;
- EXPECT_FATAL_FAILURE({
- ASSERT_EQ(0, n) << "Expected fatal failure.";
- }, "Expected fatal failure.");
-}
-
-// Tests that EXPECT_FATAL_FAILURE() succeeds when there is exactly
-// one fatal failure and no non-fatal failure.
-TEST(ExpectFatalFailureTest, SucceedsWhenThereIsOneFatalFailure) {
- EXPECT_FATAL_FAILURE({
- FAIL() << "Expected fatal failure.";
- }, "Expected fatal failure.");
-}
-
-// Tests that EXPECT_FATAL_FAILURE() fails when there is no fatal
-// failure.
-TEST(ExpectFatalFailureTest, FailsWhenThereIsNoFatalFailure) {
- printf("(expecting a failure)\n");
- EXPECT_FATAL_FAILURE({
- }, "");
-}
-
-// A helper for generating a fatal failure.
-void FatalFailure() {
- FAIL() << "Expected fatal failure.";
-}
-
-// Tests that EXPECT_FATAL_FAILURE() fails when there are two
-// fatal failures.
-TEST(ExpectFatalFailureTest, FailsWhenThereAreTwoFatalFailures) {
- printf("(expecting a failure)\n");
- EXPECT_FATAL_FAILURE({
- FatalFailure();
- FatalFailure();
- }, "");
-}
-
-// Tests that EXPECT_FATAL_FAILURE() fails when there is one non-fatal
-// failure.
-TEST(ExpectFatalFailureTest, FailsWhenThereIsOneNonfatalFailure) {
- printf("(expecting a failure)\n");
- EXPECT_FATAL_FAILURE({
- ADD_FAILURE() << "Expected non-fatal failure.";
- }, "");
-}
-
-// Tests that EXPECT_FATAL_FAILURE() fails when the statement being
-// tested returns.
-TEST(ExpectFatalFailureTest, FailsWhenStatementReturns) {
- printf("(expecting a failure)\n");
- EXPECT_FATAL_FAILURE({
- return;
- }, "");
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Tests that EXPECT_FATAL_FAILURE() fails when the statement being
-// tested throws.
-TEST(ExpectFatalFailureTest, FailsWhenStatementThrows) {
- printf("(expecting a failure)\n");
- try {
- EXPECT_FATAL_FAILURE({
- throw 0;
- }, "");
- } catch(int) { // NOLINT
- }
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// This #ifdef block tests the output of typed tests.
-#if GTEST_HAS_TYPED_TEST
-
-template <typename T>
-class TypedTest : public testing::Test {
-};
-
-TYPED_TEST_CASE(TypedTest, testing::Types<int>);
-
-TYPED_TEST(TypedTest, Success) {
- EXPECT_EQ(0, TypeParam());
-}
-
-TYPED_TEST(TypedTest, Failure) {
- EXPECT_EQ(1, TypeParam()) << "Expected failure";
-}
-
-#endif // GTEST_HAS_TYPED_TEST
-
-// This #ifdef block tests the output of type-parameterized tests.
-#if GTEST_HAS_TYPED_TEST_P
-
-template <typename T>
-class TypedTestP : public testing::Test {
-};
-
-TYPED_TEST_CASE_P(TypedTestP);
-
-TYPED_TEST_P(TypedTestP, Success) {
- EXPECT_EQ(0U, TypeParam());
-}
-
-TYPED_TEST_P(TypedTestP, Failure) {
- EXPECT_EQ(1U, TypeParam()) << "Expected failure";
-}
-
-REGISTER_TYPED_TEST_CASE_P(TypedTestP, Success, Failure);
-
-typedef testing::Types<unsigned char, unsigned int> UnsignedTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(Unsigned, TypedTestP, UnsignedTypes);
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-#if GTEST_HAS_DEATH_TEST
-
-// We rely on the golden file to verify that tests whose test case
-// name ends with DeathTest are run first.
-
-TEST(ADeathTest, ShouldRunFirst) {
-}
-
-# if GTEST_HAS_TYPED_TEST
-
-// We rely on the golden file to verify that typed tests whose test
-// case name ends with DeathTest are run first.
-
-template <typename T>
-class ATypedDeathTest : public testing::Test {
-};
-
-typedef testing::Types<int, double> NumericTypes;
-TYPED_TEST_CASE(ATypedDeathTest, NumericTypes);
-
-TYPED_TEST(ATypedDeathTest, ShouldRunFirst) {
-}
-
-# endif // GTEST_HAS_TYPED_TEST
-
-# if GTEST_HAS_TYPED_TEST_P
-
-
-// We rely on the golden file to verify that type-parameterized tests
-// whose test case name ends with DeathTest are run first.
-
-template <typename T>
-class ATypeParamDeathTest : public testing::Test {
-};
-
-TYPED_TEST_CASE_P(ATypeParamDeathTest);
-
-TYPED_TEST_P(ATypeParamDeathTest, ShouldRunFirst) {
-}
-
-REGISTER_TYPED_TEST_CASE_P(ATypeParamDeathTest, ShouldRunFirst);
-
-INSTANTIATE_TYPED_TEST_CASE_P(My, ATypeParamDeathTest, NumericTypes);
-
-# endif // GTEST_HAS_TYPED_TEST_P
-
-#endif // GTEST_HAS_DEATH_TEST
-
-// Tests various failure conditions of
-// EXPECT_{,NON}FATAL_FAILURE{,_ON_ALL_THREADS}.
-class ExpectFailureTest : public testing::Test {
- public: // Must be public and not protected due to a bug in g++ 3.4.2.
- enum FailureMode {
- FATAL_FAILURE,
- NONFATAL_FAILURE
- };
- static void AddFailure(FailureMode failure) {
- if (failure == FATAL_FAILURE) {
- FAIL() << "Expected fatal failure.";
- } else {
- ADD_FAILURE() << "Expected non-fatal failure.";
- }
- }
-};
-
-TEST_F(ExpectFailureTest, ExpectFatalFailure) {
- // Expected fatal failure, but succeeds.
- printf("(expecting 1 failure)\n");
- EXPECT_FATAL_FAILURE(SUCCEED(), "Expected fatal failure.");
- // Expected fatal failure, but got a non-fatal failure.
- printf("(expecting 1 failure)\n");
- EXPECT_FATAL_FAILURE(AddFailure(NONFATAL_FAILURE), "Expected non-fatal "
- "failure.");
- // Wrong message.
- printf("(expecting 1 failure)\n");
- EXPECT_FATAL_FAILURE(AddFailure(FATAL_FAILURE), "Some other fatal failure "
- "expected.");
-}
-
-TEST_F(ExpectFailureTest, ExpectNonFatalFailure) {
- // Expected non-fatal failure, but succeeds.
- printf("(expecting 1 failure)\n");
- EXPECT_NONFATAL_FAILURE(SUCCEED(), "Expected non-fatal failure.");
- // Expected non-fatal failure, but got a fatal failure.
- printf("(expecting 1 failure)\n");
- EXPECT_NONFATAL_FAILURE(AddFailure(FATAL_FAILURE), "Expected fatal failure.");
- // Wrong message.
- printf("(expecting 1 failure)\n");
- EXPECT_NONFATAL_FAILURE(AddFailure(NONFATAL_FAILURE), "Some other non-fatal "
- "failure.");
-}
-
-#if GTEST_IS_THREADSAFE
-
-class ExpectFailureWithThreadsTest : public ExpectFailureTest {
- protected:
- static void AddFailureInOtherThread(FailureMode failure) {
- ThreadWithParam<FailureMode> thread(&AddFailure, failure, NULL);
- thread.Join();
- }
-};
-
-TEST_F(ExpectFailureWithThreadsTest, ExpectFatalFailure) {
- // We only intercept the current thread.
- printf("(expecting 2 failures)\n");
- EXPECT_FATAL_FAILURE(AddFailureInOtherThread(FATAL_FAILURE),
- "Expected fatal failure.");
-}
-
-TEST_F(ExpectFailureWithThreadsTest, ExpectNonFatalFailure) {
- // We only intercept the current thread.
- printf("(expecting 2 failures)\n");
- EXPECT_NONFATAL_FAILURE(AddFailureInOtherThread(NONFATAL_FAILURE),
- "Expected non-fatal failure.");
-}
-
-typedef ExpectFailureWithThreadsTest ScopedFakeTestPartResultReporterTest;
-
-// Tests that the ScopedFakeTestPartResultReporter only catches failures from
-// the current thread if it is instantiated with INTERCEPT_ONLY_CURRENT_THREAD.
-TEST_F(ScopedFakeTestPartResultReporterTest, InterceptOnlyCurrentThread) {
- printf("(expecting 2 failures)\n");
- TestPartResultArray results;
- {
- ScopedFakeTestPartResultReporter reporter(
- ScopedFakeTestPartResultReporter::INTERCEPT_ONLY_CURRENT_THREAD,
- &results);
- AddFailureInOtherThread(FATAL_FAILURE);
- AddFailureInOtherThread(NONFATAL_FAILURE);
- }
- // The two failures should not have been intercepted.
- EXPECT_EQ(0, results.size()) << "This shouldn't fail.";
-}
-
-#endif // GTEST_IS_THREADSAFE
-
-TEST_F(ExpectFailureTest, ExpectFatalFailureOnAllThreads) {
- // Expected fatal failure, but succeeds.
- printf("(expecting 1 failure)\n");
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(SUCCEED(), "Expected fatal failure.");
- // Expected fatal failure, but got a non-fatal failure.
- printf("(expecting 1 failure)\n");
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailure(NONFATAL_FAILURE),
- "Expected non-fatal failure.");
- // Wrong message.
- printf("(expecting 1 failure)\n");
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailure(FATAL_FAILURE),
- "Some other fatal failure expected.");
-}
-
-TEST_F(ExpectFailureTest, ExpectNonFatalFailureOnAllThreads) {
- // Expected non-fatal failure, but succeeds.
- printf("(expecting 1 failure)\n");
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(SUCCEED(), "Expected non-fatal "
- "failure.");
- // Expected non-fatal failure, but got a fatal failure.
- printf("(expecting 1 failure)\n");
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddFailure(FATAL_FAILURE),
- "Expected fatal failure.");
- // Wrong message.
- printf("(expecting 1 failure)\n");
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddFailure(NONFATAL_FAILURE),
- "Some other non-fatal failure.");
-}
-
-
-// Two test environments for testing testing::AddGlobalTestEnvironment().
-
-class FooEnvironment : public testing::Environment {
- public:
- virtual void SetUp() {
- printf("%s", "FooEnvironment::SetUp() called.\n");
- }
-
- virtual void TearDown() {
- printf("%s", "FooEnvironment::TearDown() called.\n");
- FAIL() << "Expected fatal failure.";
- }
-};
-
-class BarEnvironment : public testing::Environment {
- public:
- virtual void SetUp() {
- printf("%s", "BarEnvironment::SetUp() called.\n");
- }
-
- virtual void TearDown() {
- printf("%s", "BarEnvironment::TearDown() called.\n");
- ADD_FAILURE() << "Expected non-fatal failure.";
- }
-};
-
-bool GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests) = false;
-
-// The main function.
-//
-// The idea is to use Google Test to run all the tests we have defined (some
-// of them are intended to fail), and then compare the test results
-// with the "golden" file.
-int main(int argc, char **argv) {
- testing::GTEST_FLAG(print_time) = false;
-
- // We just run the tests, knowing some of them are intended to fail.
- // We will use a separate Python script to compare the output of
- // this program with the golden file.
-
- // It's hard to test InitGoogleTest() directly, as it has many
- // global side effects. The following line serves as a sanity test
- // for it.
- testing::InitGoogleTest(&argc, argv);
- if (argc >= 2 &&
- String(argv[1]) == "--gtest_internal_skip_environment_and_ad_hoc_tests")
- GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests) = true;
-
-#if GTEST_HAS_DEATH_TEST
- if (testing::internal::GTEST_FLAG(internal_run_death_test) != "") {
- // Skip the usual output capturing if we're running as the child
- // process of an threadsafe-style death test.
-# if GTEST_OS_WINDOWS
- posix::FReopen("nul:", "w", stdout);
-# else
- posix::FReopen("/dev/null", "w", stdout);
-# endif // GTEST_OS_WINDOWS
- return RUN_ALL_TESTS();
- }
-#endif // GTEST_HAS_DEATH_TEST
-
- if (GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests))
- return RUN_ALL_TESTS();
-
- // Registers two global test environments.
- // The golden file verifies that they are set up in the order they
- // are registered, and torn down in the reverse order.
- testing::AddGlobalTestEnvironment(new FooEnvironment);
- testing::AddGlobalTestEnvironment(new BarEnvironment);
-
- return RunAllTests();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_golden_lin.txt b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_golden_lin.txt
deleted file mode 100644
index a1d342d9c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_output_test_golden_lin.txt
+++ /dev/null
@@ -1,711 +0,0 @@
-The non-test part of the code is expected to have 2 failures.
-
-gtest_output_test_.cc:#: Failure
-Value of: false
- Actual: false
-Expected: true
-gtest_output_test_.cc:#: Failure
-Value of: 3
-Expected: 2
-[==========] Running 62 tests from 27 test cases.
-[----------] Global test environment set-up.
-FooEnvironment::SetUp() called.
-BarEnvironment::SetUp() called.
-[----------] 1 test from ADeathTest
-[ RUN ] ADeathTest.ShouldRunFirst
-[ OK ] ADeathTest.ShouldRunFirst
-[----------] 1 test from ATypedDeathTest/0, where TypeParam = int
-[ RUN ] ATypedDeathTest/0.ShouldRunFirst
-[ OK ] ATypedDeathTest/0.ShouldRunFirst
-[----------] 1 test from ATypedDeathTest/1, where TypeParam = double
-[ RUN ] ATypedDeathTest/1.ShouldRunFirst
-[ OK ] ATypedDeathTest/1.ShouldRunFirst
-[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int
-[ RUN ] My/ATypeParamDeathTest/0.ShouldRunFirst
-[ OK ] My/ATypeParamDeathTest/0.ShouldRunFirst
-[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double
-[ RUN ] My/ATypeParamDeathTest/1.ShouldRunFirst
-[ OK ] My/ATypeParamDeathTest/1.ShouldRunFirst
-[----------] 2 tests from PassingTest
-[ RUN ] PassingTest.PassingTest1
-[ OK ] PassingTest.PassingTest1
-[ RUN ] PassingTest.PassingTest2
-[ OK ] PassingTest.PassingTest2
-[----------] 3 tests from FatalFailureTest
-[ RUN ] FatalFailureTest.FatalFailureInSubroutine
-(expecting a failure that x should be 1)
-gtest_output_test_.cc:#: Failure
-Value of: x
- Actual: 2
-Expected: 1
-[ FAILED ] FatalFailureTest.FatalFailureInSubroutine
-[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
-(expecting a failure that x should be 1)
-gtest_output_test_.cc:#: Failure
-Value of: x
- Actual: 2
-Expected: 1
-[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
-[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
-(expecting a failure on false)
-gtest_output_test_.cc:#: Failure
-Value of: false
- Actual: false
-Expected: true
-[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine
-[----------] 1 test from LoggingTest
-[ RUN ] LoggingTest.InterleavingLoggingAndAssertions
-(expecting 2 failures on (3) >= (a[i]))
-i == 0
-i == 1
-gtest_output_test_.cc:#: Failure
-Expected: (3) >= (a[i]), actual: 3 vs 9
-i == 2
-i == 3
-gtest_output_test_.cc:#: Failure
-Expected: (3) >= (a[i]), actual: 3 vs 6
-[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions
-[----------] 6 tests from SCOPED_TRACETest
-[ RUN ] SCOPED_TRACETest.ObeysScopes
-(expected to fail)
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and shouldn't have a trace.
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and should have a trace.
-Google Test trace:
-gtest_output_test_.cc:#: Expected trace
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and shouldn't have a trace.
-[ FAILED ] SCOPED_TRACETest.ObeysScopes
-[ RUN ] SCOPED_TRACETest.WorksInLoop
-(expected to fail)
-gtest_output_test_.cc:#: Failure
-Value of: n
- Actual: 1
-Expected: 2
-Google Test trace:
-gtest_output_test_.cc:#: i = 1
-gtest_output_test_.cc:#: Failure
-Value of: n
- Actual: 2
-Expected: 1
-Google Test trace:
-gtest_output_test_.cc:#: i = 2
-[ FAILED ] SCOPED_TRACETest.WorksInLoop
-[ RUN ] SCOPED_TRACETest.WorksInSubroutine
-(expected to fail)
-gtest_output_test_.cc:#: Failure
-Value of: n
- Actual: 1
-Expected: 2
-Google Test trace:
-gtest_output_test_.cc:#: n = 1
-gtest_output_test_.cc:#: Failure
-Value of: n
- Actual: 2
-Expected: 1
-Google Test trace:
-gtest_output_test_.cc:#: n = 2
-[ FAILED ] SCOPED_TRACETest.WorksInSubroutine
-[ RUN ] SCOPED_TRACETest.CanBeNested
-(expected to fail)
-gtest_output_test_.cc:#: Failure
-Value of: n
- Actual: 2
-Expected: 1
-Google Test trace:
-gtest_output_test_.cc:#: n = 2
-gtest_output_test_.cc:#:
-[ FAILED ] SCOPED_TRACETest.CanBeNested
-[ RUN ] SCOPED_TRACETest.CanBeRepeated
-(expected to fail)
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and should contain trace point A.
-Google Test trace:
-gtest_output_test_.cc:#: A
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and should contain trace point A and B.
-Google Test trace:
-gtest_output_test_.cc:#: B
-gtest_output_test_.cc:#: A
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and should contain trace point A, B, and C.
-Google Test trace:
-gtest_output_test_.cc:#: C
-gtest_output_test_.cc:#: B
-gtest_output_test_.cc:#: A
-gtest_output_test_.cc:#: Failure
-Failed
-This failure is expected, and should contain trace point A, B, and D.
-Google Test trace:
-gtest_output_test_.cc:#: D
-gtest_output_test_.cc:#: B
-gtest_output_test_.cc:#: A
-[ FAILED ] SCOPED_TRACETest.CanBeRepeated
-[ RUN ] SCOPED_TRACETest.WorksConcurrently
-(expecting 6 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #1 (in thread B, only trace B alive).
-Google Test trace:
-gtest_output_test_.cc:#: Trace B
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #2 (in thread A, trace A & B both alive).
-Google Test trace:
-gtest_output_test_.cc:#: Trace A
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #3 (in thread B, trace A & B both alive).
-Google Test trace:
-gtest_output_test_.cc:#: Trace B
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #4 (in thread B, only trace A alive).
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #5 (in thread A, only trace A alive).
-Google Test trace:
-gtest_output_test_.cc:#: Trace A
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #6 (in thread A, no trace alive).
-[ FAILED ] SCOPED_TRACETest.WorksConcurrently
-[----------] 1 test from NonFatalFailureInFixtureConstructorTest
-[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
-(expecting 5 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #1, in the test fixture c'tor.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #2, in SetUp().
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #3, in the test body.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #4, in TearDown.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #5, in the test fixture d'tor.
-[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
-[----------] 1 test from FatalFailureInFixtureConstructorTest
-[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor
-(expecting 2 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #1, in the test fixture c'tor.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #2, in the test fixture d'tor.
-[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor
-[----------] 1 test from NonFatalFailureInSetUpTest
-[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp
-(expecting 4 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #1, in SetUp().
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #2, in the test function.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #3, in TearDown().
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #4, in the test fixture d'tor.
-[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp
-[----------] 1 test from FatalFailureInSetUpTest
-[ RUN ] FatalFailureInSetUpTest.FailureInSetUp
-(expecting 3 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #1, in SetUp().
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #2, in TearDown().
-gtest_output_test_.cc:#: Failure
-Failed
-Expected failure #3, in the test fixture d'tor.
-[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp
-[----------] 1 test from AddFailureAtTest
-[ RUN ] AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber
-foo.cc:42: Failure
-Failed
-Expected failure in foo.cc
-[ FAILED ] AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber
-[----------] 4 tests from MixedUpTestCaseTest
-[ RUN ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo
-[ OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo
-[ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo
-[ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo
-[ RUN ] MixedUpTestCaseTest.ThisShouldFail
-gtest.cc:#: Failure
-Failed
-All tests in the same test case must use the same test fixture
-class. However, in test case MixedUpTestCaseTest,
-you defined test FirstTestFromNamespaceFoo and test ThisShouldFail
-using two different test fixture classes. This can happen if
-the two classes are from different namespaces or translation
-units and have the same name. You should probably rename one
-of the classes to put the tests into different test cases.
-[ FAILED ] MixedUpTestCaseTest.ThisShouldFail
-[ RUN ] MixedUpTestCaseTest.ThisShouldFailToo
-gtest.cc:#: Failure
-Failed
-All tests in the same test case must use the same test fixture
-class. However, in test case MixedUpTestCaseTest,
-you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo
-using two different test fixture classes. This can happen if
-the two classes are from different namespaces or translation
-units and have the same name. You should probably rename one
-of the classes to put the tests into different test cases.
-[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo
-[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest
-[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
-[ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
-[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
-gtest.cc:#: Failure
-Failed
-All tests in the same test case must use the same test fixture
-class. However, in test case MixedUpTestCaseWithSameTestNameTest,
-you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail
-using two different test fixture classes. This can happen if
-the two classes are from different namespaces or translation
-units and have the same name. You should probably rename one
-of the classes to put the tests into different test cases.
-[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
-[----------] 2 tests from TEST_F_before_TEST_in_same_test_case
-[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F
-[ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F
-[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail
-gtest.cc:#: Failure
-Failed
-All tests in the same test case must use the same test fixture
-class, so mixing TEST_F and TEST in the same test case is
-illegal. In test case TEST_F_before_TEST_in_same_test_case,
-test DefinedUsingTEST_F is defined using TEST_F but
-test DefinedUsingTESTAndShouldFail is defined using TEST. You probably
-want to change the TEST to TEST_F or move it to another test
-case.
-[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail
-[----------] 2 tests from TEST_before_TEST_F_in_same_test_case
-[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST
-[ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST
-[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail
-gtest.cc:#: Failure
-Failed
-All tests in the same test case must use the same test fixture
-class, so mixing TEST_F and TEST in the same test case is
-illegal. In test case TEST_before_TEST_F_in_same_test_case,
-test DefinedUsingTEST_FAndShouldFail is defined using TEST_F but
-test DefinedUsingTEST is defined using TEST. You probably
-want to change the TEST to TEST_F or move it to another test
-case.
-[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail
-[----------] 8 tests from ExpectNonfatalFailureTest
-[ RUN ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables
-[ OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables
-[ RUN ] ExpectNonfatalFailureTest.CanReferenceLocalVariables
-[ OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables
-[ RUN ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure
-[ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure
-[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure
-[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual: 2 failures
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure 1.
-
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure 2.
-
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures
-[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual:
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure
-[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns
-[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementThrows
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows
-[----------] 8 tests from ExpectFatalFailureTest
-[ RUN ] ExpectFatalFailureTest.CanReferenceGlobalVariables
-[ OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables
-[ RUN ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables
-[ OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables
-[ RUN ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure
-[ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure
-[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure
-[ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual: 2 failures
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures
-[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual:
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure.
-
-[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure
-[ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns
-[ RUN ] ExpectFatalFailureTest.FailsWhenStatementThrows
-(expecting a failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows
-[----------] 2 tests from TypedTest/0, where TypeParam = int
-[ RUN ] TypedTest/0.Success
-[ OK ] TypedTest/0.Success
-[ RUN ] TypedTest/0.Failure
-gtest_output_test_.cc:#: Failure
-Value of: TypeParam()
- Actual: 0
-Expected: 1
-Expected failure
-[ FAILED ] TypedTest/0.Failure, where TypeParam = int
-[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char
-[ RUN ] Unsigned/TypedTestP/0.Success
-[ OK ] Unsigned/TypedTestP/0.Success
-[ RUN ] Unsigned/TypedTestP/0.Failure
-gtest_output_test_.cc:#: Failure
-Value of: TypeParam()
- Actual: '\0'
-Expected: 1U
-Which is: 1
-Expected failure
-[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char
-[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int
-[ RUN ] Unsigned/TypedTestP/1.Success
-[ OK ] Unsigned/TypedTestP/1.Success
-[ RUN ] Unsigned/TypedTestP/1.Failure
-gtest_output_test_.cc:#: Failure
-Value of: TypeParam()
- Actual: 0
-Expected: 1U
-Which is: 1
-Expected failure
-[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int
-[----------] 4 tests from ExpectFailureTest
-[ RUN ] ExpectFailureTest.ExpectFatalFailure
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual:
-gtest_output_test_.cc:#: Success:
-Succeeded
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual:
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure.
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure containing "Some other fatal failure expected."
- Actual:
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-[ FAILED ] ExpectFailureTest.ExpectFatalFailure
-[ RUN ] ExpectFailureTest.ExpectNonFatalFailure
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual:
-gtest_output_test_.cc:#: Success:
-Succeeded
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual:
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure containing "Some other non-fatal failure."
- Actual:
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure.
-
-[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure
-[ RUN ] ExpectFailureTest.ExpectFatalFailureOnAllThreads
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual:
-gtest_output_test_.cc:#: Success:
-Succeeded
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual:
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure.
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 fatal failure containing "Some other fatal failure expected."
- Actual:
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads
-[ RUN ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual:
-gtest_output_test_.cc:#: Success:
-Succeeded
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual:
-gtest_output_test_.cc:#: Fatal failure:
-Failed
-Expected fatal failure.
-
-(expecting 1 failure)
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure containing "Some other non-fatal failure."
- Actual:
-gtest_output_test_.cc:#: Non-fatal failure:
-Failed
-Expected non-fatal failure.
-
-[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads
-[----------] 2 tests from ExpectFailureWithThreadsTest
-[ RUN ] ExpectFailureWithThreadsTest.ExpectFatalFailure
-(expecting 2 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected fatal failure.
-gtest.cc:#: Failure
-Expected: 1 fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectFailureWithThreadsTest.ExpectFatalFailure
-[ RUN ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure
-(expecting 2 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected non-fatal failure.
-gtest.cc:#: Failure
-Expected: 1 non-fatal failure
- Actual: 0 failures
-[ FAILED ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure
-[----------] 1 test from ScopedFakeTestPartResultReporterTest
-[ RUN ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
-(expecting 2 failures)
-gtest_output_test_.cc:#: Failure
-Failed
-Expected fatal failure.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected non-fatal failure.
-[ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
-[----------] 1 test from PrintingFailingParams/FailingParamTest
-[ RUN ] PrintingFailingParams/FailingParamTest.Fails/0
-gtest_output_test_.cc:#: Failure
-Value of: GetParam()
- Actual: 2
-Expected: 1
-[ FAILED ] PrintingFailingParams/FailingParamTest.Fails/0, where GetParam() = 2
-[----------] Global test environment tear-down
-BarEnvironment::TearDown() called.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected non-fatal failure.
-FooEnvironment::TearDown() called.
-gtest_output_test_.cc:#: Failure
-Failed
-Expected fatal failure.
-[==========] 62 tests from 27 test cases ran.
-[ PASSED ] 21 tests.
-[ FAILED ] 41 tests, listed below:
-[ FAILED ] FatalFailureTest.FatalFailureInSubroutine
-[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
-[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine
-[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions
-[ FAILED ] SCOPED_TRACETest.ObeysScopes
-[ FAILED ] SCOPED_TRACETest.WorksInLoop
-[ FAILED ] SCOPED_TRACETest.WorksInSubroutine
-[ FAILED ] SCOPED_TRACETest.CanBeNested
-[ FAILED ] SCOPED_TRACETest.CanBeRepeated
-[ FAILED ] SCOPED_TRACETest.WorksConcurrently
-[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
-[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor
-[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp
-[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp
-[ FAILED ] AddFailureAtTest.MessageContainsSpecifiedFileAndLineNumber
-[ FAILED ] MixedUpTestCaseTest.ThisShouldFail
-[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo
-[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
-[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail
-[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns
-[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows
-[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure
-[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures
-[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure
-[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns
-[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows
-[ FAILED ] TypedTest/0.Failure, where TypeParam = int
-[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char
-[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int
-[ FAILED ] ExpectFailureTest.ExpectFatalFailure
-[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure
-[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads
-[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads
-[ FAILED ] ExpectFailureWithThreadsTest.ExpectFatalFailure
-[ FAILED ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure
-[ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
-[ FAILED ] PrintingFailingParams/FailingParamTest.Fails/0, where GetParam() = 2
-
-41 FAILED TESTS
- YOU HAVE 1 DISABLED TEST
-
-Note: Google Test filter = FatalFailureTest.*:LoggingTest.*
-[==========] Running 4 tests from 2 test cases.
-[----------] Global test environment set-up.
-[----------] 3 tests from FatalFailureTest
-[ RUN ] FatalFailureTest.FatalFailureInSubroutine
-(expecting a failure that x should be 1)
-gtest_output_test_.cc:#: Failure
-Value of: x
- Actual: 2
-Expected: 1
-[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms)
-[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
-(expecting a failure that x should be 1)
-gtest_output_test_.cc:#: Failure
-Value of: x
- Actual: 2
-Expected: 1
-[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms)
-[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
-(expecting a failure on false)
-gtest_output_test_.cc:#: Failure
-Value of: false
- Actual: false
-Expected: true
-[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine (? ms)
-[----------] 3 tests from FatalFailureTest (? ms total)
-
-[----------] 1 test from LoggingTest
-[ RUN ] LoggingTest.InterleavingLoggingAndAssertions
-(expecting 2 failures on (3) >= (a[i]))
-i == 0
-i == 1
-gtest_output_test_.cc:#: Failure
-Expected: (3) >= (a[i]), actual: 3 vs 9
-i == 2
-i == 3
-gtest_output_test_.cc:#: Failure
-Expected: (3) >= (a[i]), actual: 3 vs 6
-[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions (? ms)
-[----------] 1 test from LoggingTest (? ms total)
-
-[----------] Global test environment tear-down
-[==========] 4 tests from 2 test cases ran. (? ms total)
-[ PASSED ] 0 tests.
-[ FAILED ] 4 tests, listed below:
-[ FAILED ] FatalFailureTest.FatalFailureInSubroutine
-[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
-[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine
-[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions
-
- 4 FAILED TESTS
- YOU HAVE 1 DISABLED TEST
-
-Note: Google Test filter = *DISABLED_*
-[==========] Running 1 test from 1 test case.
-[----------] Global test environment set-up.
-[----------] 1 test from DisabledTestsWarningTest
-[ RUN ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning
-[ OK ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning
-[----------] Global test environment tear-down
-[==========] 1 test from 1 test case ran.
-[ PASSED ] 1 test.
-Note: Google Test filter = PassingTest.*
-Note: This is test shard 2 of 2.
-[==========] Running 1 test from 1 test case.
-[----------] Global test environment set-up.
-[----------] 1 test from PassingTest
-[ RUN ] PassingTest.PassingTest2
-[ OK ] PassingTest.PassingTest2
-[----------] Global test environment tear-down
-[==========] 1 test from 1 test case ran.
-[ PASSED ] 1 test.
-
- YOU HAVE 1 DISABLED TEST
-
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_pred_impl_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_pred_impl_unittest.cc
deleted file mode 100644
index 35dc9bcf3..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_pred_impl_unittest.cc
+++ /dev/null
@@ -1,2427 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on 09/24/2010 by command
-// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
-
-// Regression test for gtest_pred_impl.h
-//
-// This file is generated by a script and quite long. If you intend to
-// learn how Google Test works by reading its unit tests, read
-// gtest_unittest.cc instead.
-//
-// This is intended as a regression test for the Google Test predicate
-// assertions. We compile it as part of the gtest_unittest target
-// only to keep the implementation tidy and compact, as it is quite
-// involved to set up the stage for testing Google Test using Google
-// Test itself.
-//
-// Currently, gtest_unittest takes ~11 seconds to run in the testing
-// daemon. In the future, if it grows too large and needs much more
-// time to finish, we should consider separating this file into a
-// stand-alone regression test.
-
-#include <iostream>
-
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-// A user-defined data type.
-struct Bool {
- explicit Bool(int val) : value(val != 0) {}
-
- bool operator>(int n) const { return value > Bool(n).value; }
-
- Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); }
-
- bool operator==(const Bool& rhs) const { return value == rhs.value; }
-
- bool value;
-};
-
-// Enables Bool to be used in assertions.
-std::ostream& operator<<(std::ostream& os, const Bool& x) {
- return os << (x.value ? "true" : "false");
-}
-
-// Sample functions/functors for testing unary predicate assertions.
-
-// A unary predicate function.
-template <typename T1>
-bool PredFunction1(T1 v1) {
- return v1 > 0;
-}
-
-// The following two functions are needed to circumvent a bug in
-// gcc 2.95.3, which sometimes has problem with the above template
-// function.
-bool PredFunction1Int(int v1) {
- return v1 > 0;
-}
-bool PredFunction1Bool(Bool v1) {
- return v1 > 0;
-}
-
-// A unary predicate functor.
-struct PredFunctor1 {
- template <typename T1>
- bool operator()(const T1& v1) {
- return v1 > 0;
- }
-};
-
-// A unary predicate-formatter function.
-template <typename T1>
-testing::AssertionResult PredFormatFunction1(const char* e1,
- const T1& v1) {
- if (PredFunction1(v1))
- return testing::AssertionSuccess();
-
- return testing::AssertionFailure()
- << e1
- << " is expected to be positive, but evaluates to "
- << v1 << ".";
-}
-
-// A unary predicate-formatter functor.
-struct PredFormatFunctor1 {
- template <typename T1>
- testing::AssertionResult operator()(const char* e1,
- const T1& v1) const {
- return PredFormatFunction1(e1, v1);
- }
-};
-
-// Tests for {EXPECT|ASSERT}_PRED_FORMAT1.
-
-class Predicate1Test : public testing::Test {
- protected:
- virtual void SetUp() {
- expected_to_finish_ = true;
- finished_ = false;
- n1_ = 0;
- }
-
- virtual void TearDown() {
- // Verifies that each of the predicate's arguments was evaluated
- // exactly once.
- EXPECT_EQ(1, n1_) <<
- "The predicate assertion didn't evaluate argument 2 "
- "exactly once.";
-
- // Verifies that the control flow in the test function is expected.
- if (expected_to_finish_ && !finished_) {
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
- } else if (!expected_to_finish_ && finished_) {
- FAIL() << "The failed predicate assertion didn't abort the test "
- "as expected.";
- }
- }
-
- // true iff the test function is expected to run to finish.
- static bool expected_to_finish_;
-
- // true iff the test function did run to finish.
- static bool finished_;
-
- static int n1_;
-};
-
-bool Predicate1Test::expected_to_finish_;
-bool Predicate1Test::finished_;
-int Predicate1Test::n1_;
-
-typedef Predicate1Test EXPECT_PRED_FORMAT1Test;
-typedef Predicate1Test ASSERT_PRED_FORMAT1Test;
-typedef Predicate1Test EXPECT_PRED1Test;
-typedef Predicate1Test ASSERT_PRED1Test;
-
-// Tests a successful EXPECT_PRED1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED1(PredFunction1Int,
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED1(PredFunction1Bool,
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED1(PredFunctor1(),
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED1(PredFunctor1(),
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED1(PredFunction1Int,
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED1(PredFunction1Bool,
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED1(PredFunctor1(),
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED1(PredFunctor1(),
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED1(PredFunction1Int,
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED1(PredFunction1Bool,
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED1(PredFunctor1(),
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED1(PredFunctor1(),
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED1(PredFunction1Int,
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED1(PredFunction1Bool,
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED1(PredFunctor1(),
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED1(PredFunctor1(),
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT1(PredFormatFunction1,
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT1(PredFormatFunctor1(),
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
- ++n1_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
- Bool(++n1_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT1(PredFormatFunction1,
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
- n1_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT1 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT1(PredFormatFunctor1(),
- Bool(n1_++));
- finished_ = true;
- }, "");
-}
-// Sample functions/functors for testing binary predicate assertions.
-
-// A binary predicate function.
-template <typename T1, typename T2>
-bool PredFunction2(T1 v1, T2 v2) {
- return v1 + v2 > 0;
-}
-
-// The following two functions are needed to circumvent a bug in
-// gcc 2.95.3, which sometimes has problem with the above template
-// function.
-bool PredFunction2Int(int v1, int v2) {
- return v1 + v2 > 0;
-}
-bool PredFunction2Bool(Bool v1, Bool v2) {
- return v1 + v2 > 0;
-}
-
-// A binary predicate functor.
-struct PredFunctor2 {
- template <typename T1, typename T2>
- bool operator()(const T1& v1,
- const T2& v2) {
- return v1 + v2 > 0;
- }
-};
-
-// A binary predicate-formatter function.
-template <typename T1, typename T2>
-testing::AssertionResult PredFormatFunction2(const char* e1,
- const char* e2,
- const T1& v1,
- const T2& v2) {
- if (PredFunction2(v1, v2))
- return testing::AssertionSuccess();
-
- return testing::AssertionFailure()
- << e1 << " + " << e2
- << " is expected to be positive, but evaluates to "
- << v1 + v2 << ".";
-}
-
-// A binary predicate-formatter functor.
-struct PredFormatFunctor2 {
- template <typename T1, typename T2>
- testing::AssertionResult operator()(const char* e1,
- const char* e2,
- const T1& v1,
- const T2& v2) const {
- return PredFormatFunction2(e1, e2, v1, v2);
- }
-};
-
-// Tests for {EXPECT|ASSERT}_PRED_FORMAT2.
-
-class Predicate2Test : public testing::Test {
- protected:
- virtual void SetUp() {
- expected_to_finish_ = true;
- finished_ = false;
- n1_ = n2_ = 0;
- }
-
- virtual void TearDown() {
- // Verifies that each of the predicate's arguments was evaluated
- // exactly once.
- EXPECT_EQ(1, n1_) <<
- "The predicate assertion didn't evaluate argument 2 "
- "exactly once.";
- EXPECT_EQ(1, n2_) <<
- "The predicate assertion didn't evaluate argument 3 "
- "exactly once.";
-
- // Verifies that the control flow in the test function is expected.
- if (expected_to_finish_ && !finished_) {
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
- } else if (!expected_to_finish_ && finished_) {
- FAIL() << "The failed predicate assertion didn't abort the test "
- "as expected.";
- }
- }
-
- // true iff the test function is expected to run to finish.
- static bool expected_to_finish_;
-
- // true iff the test function did run to finish.
- static bool finished_;
-
- static int n1_;
- static int n2_;
-};
-
-bool Predicate2Test::expected_to_finish_;
-bool Predicate2Test::finished_;
-int Predicate2Test::n1_;
-int Predicate2Test::n2_;
-
-typedef Predicate2Test EXPECT_PRED_FORMAT2Test;
-typedef Predicate2Test ASSERT_PRED_FORMAT2Test;
-typedef Predicate2Test EXPECT_PRED2Test;
-typedef Predicate2Test ASSERT_PRED2Test;
-
-// Tests a successful EXPECT_PRED2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED2(PredFunction2Int,
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED2(PredFunction2Bool,
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED2(PredFunctor2(),
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED2(PredFunctor2(),
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED2(PredFunction2Int,
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED2(PredFunction2Bool,
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED2(PredFunctor2(),
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED2(PredFunctor2(),
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED2(PredFunction2Int,
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED2(PredFunction2Bool,
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED2(PredFunctor2(),
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED2(PredFunctor2(),
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED2(PredFunction2Int,
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED2(PredFunction2Bool,
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED2(PredFunctor2(),
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED2(PredFunctor2(),
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(PredFormatFunction2,
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(PredFormatFunctor2(),
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
- ++n1_,
- ++n2_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
- Bool(++n1_),
- Bool(++n2_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT2(PredFormatFunction2,
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
- n1_++,
- n2_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT2 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT2(PredFormatFunctor2(),
- Bool(n1_++),
- Bool(n2_++));
- finished_ = true;
- }, "");
-}
-// Sample functions/functors for testing ternary predicate assertions.
-
-// A ternary predicate function.
-template <typename T1, typename T2, typename T3>
-bool PredFunction3(T1 v1, T2 v2, T3 v3) {
- return v1 + v2 + v3 > 0;
-}
-
-// The following two functions are needed to circumvent a bug in
-// gcc 2.95.3, which sometimes has problem with the above template
-// function.
-bool PredFunction3Int(int v1, int v2, int v3) {
- return v1 + v2 + v3 > 0;
-}
-bool PredFunction3Bool(Bool v1, Bool v2, Bool v3) {
- return v1 + v2 + v3 > 0;
-}
-
-// A ternary predicate functor.
-struct PredFunctor3 {
- template <typename T1, typename T2, typename T3>
- bool operator()(const T1& v1,
- const T2& v2,
- const T3& v3) {
- return v1 + v2 + v3 > 0;
- }
-};
-
-// A ternary predicate-formatter function.
-template <typename T1, typename T2, typename T3>
-testing::AssertionResult PredFormatFunction3(const char* e1,
- const char* e2,
- const char* e3,
- const T1& v1,
- const T2& v2,
- const T3& v3) {
- if (PredFunction3(v1, v2, v3))
- return testing::AssertionSuccess();
-
- return testing::AssertionFailure()
- << e1 << " + " << e2 << " + " << e3
- << " is expected to be positive, but evaluates to "
- << v1 + v2 + v3 << ".";
-}
-
-// A ternary predicate-formatter functor.
-struct PredFormatFunctor3 {
- template <typename T1, typename T2, typename T3>
- testing::AssertionResult operator()(const char* e1,
- const char* e2,
- const char* e3,
- const T1& v1,
- const T2& v2,
- const T3& v3) const {
- return PredFormatFunction3(e1, e2, e3, v1, v2, v3);
- }
-};
-
-// Tests for {EXPECT|ASSERT}_PRED_FORMAT3.
-
-class Predicate3Test : public testing::Test {
- protected:
- virtual void SetUp() {
- expected_to_finish_ = true;
- finished_ = false;
- n1_ = n2_ = n3_ = 0;
- }
-
- virtual void TearDown() {
- // Verifies that each of the predicate's arguments was evaluated
- // exactly once.
- EXPECT_EQ(1, n1_) <<
- "The predicate assertion didn't evaluate argument 2 "
- "exactly once.";
- EXPECT_EQ(1, n2_) <<
- "The predicate assertion didn't evaluate argument 3 "
- "exactly once.";
- EXPECT_EQ(1, n3_) <<
- "The predicate assertion didn't evaluate argument 4 "
- "exactly once.";
-
- // Verifies that the control flow in the test function is expected.
- if (expected_to_finish_ && !finished_) {
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
- } else if (!expected_to_finish_ && finished_) {
- FAIL() << "The failed predicate assertion didn't abort the test "
- "as expected.";
- }
- }
-
- // true iff the test function is expected to run to finish.
- static bool expected_to_finish_;
-
- // true iff the test function did run to finish.
- static bool finished_;
-
- static int n1_;
- static int n2_;
- static int n3_;
-};
-
-bool Predicate3Test::expected_to_finish_;
-bool Predicate3Test::finished_;
-int Predicate3Test::n1_;
-int Predicate3Test::n2_;
-int Predicate3Test::n3_;
-
-typedef Predicate3Test EXPECT_PRED_FORMAT3Test;
-typedef Predicate3Test ASSERT_PRED_FORMAT3Test;
-typedef Predicate3Test EXPECT_PRED3Test;
-typedef Predicate3Test ASSERT_PRED3Test;
-
-// Tests a successful EXPECT_PRED3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED3(PredFunction3Int,
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED3(PredFunction3Bool,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED3(PredFunctor3(),
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED3(PredFunctor3(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED3(PredFunction3Int,
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED3(PredFunction3Bool,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED3(PredFunctor3(),
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED3(PredFunctor3(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED3(PredFunction3Int,
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED3(PredFunction3Bool,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED3(PredFunctor3(),
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED3(PredFunctor3(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED3(PredFunction3Int,
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED3(PredFunction3Bool,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED3(PredFunctor3(),
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED3(PredFunctor3(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT3(PredFormatFunction3,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT3(PredFormatFunctor3(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
- ++n1_,
- ++n2_,
- ++n3_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT3(PredFormatFunction3,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
- n1_++,
- n2_++,
- n3_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT3 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT3(PredFormatFunctor3(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++));
- finished_ = true;
- }, "");
-}
-// Sample functions/functors for testing 4-ary predicate assertions.
-
-// A 4-ary predicate function.
-template <typename T1, typename T2, typename T3, typename T4>
-bool PredFunction4(T1 v1, T2 v2, T3 v3, T4 v4) {
- return v1 + v2 + v3 + v4 > 0;
-}
-
-// The following two functions are needed to circumvent a bug in
-// gcc 2.95.3, which sometimes has problem with the above template
-// function.
-bool PredFunction4Int(int v1, int v2, int v3, int v4) {
- return v1 + v2 + v3 + v4 > 0;
-}
-bool PredFunction4Bool(Bool v1, Bool v2, Bool v3, Bool v4) {
- return v1 + v2 + v3 + v4 > 0;
-}
-
-// A 4-ary predicate functor.
-struct PredFunctor4 {
- template <typename T1, typename T2, typename T3, typename T4>
- bool operator()(const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4) {
- return v1 + v2 + v3 + v4 > 0;
- }
-};
-
-// A 4-ary predicate-formatter function.
-template <typename T1, typename T2, typename T3, typename T4>
-testing::AssertionResult PredFormatFunction4(const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4) {
- if (PredFunction4(v1, v2, v3, v4))
- return testing::AssertionSuccess();
-
- return testing::AssertionFailure()
- << e1 << " + " << e2 << " + " << e3 << " + " << e4
- << " is expected to be positive, but evaluates to "
- << v1 + v2 + v3 + v4 << ".";
-}
-
-// A 4-ary predicate-formatter functor.
-struct PredFormatFunctor4 {
- template <typename T1, typename T2, typename T3, typename T4>
- testing::AssertionResult operator()(const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4) const {
- return PredFormatFunction4(e1, e2, e3, e4, v1, v2, v3, v4);
- }
-};
-
-// Tests for {EXPECT|ASSERT}_PRED_FORMAT4.
-
-class Predicate4Test : public testing::Test {
- protected:
- virtual void SetUp() {
- expected_to_finish_ = true;
- finished_ = false;
- n1_ = n2_ = n3_ = n4_ = 0;
- }
-
- virtual void TearDown() {
- // Verifies that each of the predicate's arguments was evaluated
- // exactly once.
- EXPECT_EQ(1, n1_) <<
- "The predicate assertion didn't evaluate argument 2 "
- "exactly once.";
- EXPECT_EQ(1, n2_) <<
- "The predicate assertion didn't evaluate argument 3 "
- "exactly once.";
- EXPECT_EQ(1, n3_) <<
- "The predicate assertion didn't evaluate argument 4 "
- "exactly once.";
- EXPECT_EQ(1, n4_) <<
- "The predicate assertion didn't evaluate argument 5 "
- "exactly once.";
-
- // Verifies that the control flow in the test function is expected.
- if (expected_to_finish_ && !finished_) {
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
- } else if (!expected_to_finish_ && finished_) {
- FAIL() << "The failed predicate assertion didn't abort the test "
- "as expected.";
- }
- }
-
- // true iff the test function is expected to run to finish.
- static bool expected_to_finish_;
-
- // true iff the test function did run to finish.
- static bool finished_;
-
- static int n1_;
- static int n2_;
- static int n3_;
- static int n4_;
-};
-
-bool Predicate4Test::expected_to_finish_;
-bool Predicate4Test::finished_;
-int Predicate4Test::n1_;
-int Predicate4Test::n2_;
-int Predicate4Test::n3_;
-int Predicate4Test::n4_;
-
-typedef Predicate4Test EXPECT_PRED_FORMAT4Test;
-typedef Predicate4Test ASSERT_PRED_FORMAT4Test;
-typedef Predicate4Test EXPECT_PRED4Test;
-typedef Predicate4Test ASSERT_PRED4Test;
-
-// Tests a successful EXPECT_PRED4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED4(PredFunction4Int,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED4(PredFunction4Bool,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED4(PredFunctor4(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED4(PredFunctor4(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED4(PredFunction4Int,
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED4(PredFunction4Bool,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED4(PredFunctor4(),
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED4(PredFunctor4(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED4(PredFunction4Int,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED4(PredFunction4Bool,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED4(PredFunctor4(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED4(PredFunctor4(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED4(PredFunction4Int,
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED4(PredFunction4Bool,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED4(PredFunctor4(),
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED4(PredFunctor4(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT4(PredFormatFunction4,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT4(PredFormatFunctor4(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT4(PredFormatFunction4,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
- n1_++,
- n2_++,
- n3_++,
- n4_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT4 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT4(PredFormatFunctor4(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++));
- finished_ = true;
- }, "");
-}
-// Sample functions/functors for testing 5-ary predicate assertions.
-
-// A 5-ary predicate function.
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-bool PredFunction5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return v1 + v2 + v3 + v4 + v5 > 0;
-}
-
-// The following two functions are needed to circumvent a bug in
-// gcc 2.95.3, which sometimes has problem with the above template
-// function.
-bool PredFunction5Int(int v1, int v2, int v3, int v4, int v5) {
- return v1 + v2 + v3 + v4 + v5 > 0;
-}
-bool PredFunction5Bool(Bool v1, Bool v2, Bool v3, Bool v4, Bool v5) {
- return v1 + v2 + v3 + v4 + v5 > 0;
-}
-
-// A 5-ary predicate functor.
-struct PredFunctor5 {
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
- bool operator()(const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4,
- const T5& v5) {
- return v1 + v2 + v3 + v4 + v5 > 0;
- }
-};
-
-// A 5-ary predicate-formatter function.
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-testing::AssertionResult PredFormatFunction5(const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const char* e5,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4,
- const T5& v5) {
- if (PredFunction5(v1, v2, v3, v4, v5))
- return testing::AssertionSuccess();
-
- return testing::AssertionFailure()
- << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5
- << " is expected to be positive, but evaluates to "
- << v1 + v2 + v3 + v4 + v5 << ".";
-}
-
-// A 5-ary predicate-formatter functor.
-struct PredFormatFunctor5 {
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
- testing::AssertionResult operator()(const char* e1,
- const char* e2,
- const char* e3,
- const char* e4,
- const char* e5,
- const T1& v1,
- const T2& v2,
- const T3& v3,
- const T4& v4,
- const T5& v5) const {
- return PredFormatFunction5(e1, e2, e3, e4, e5, v1, v2, v3, v4, v5);
- }
-};
-
-// Tests for {EXPECT|ASSERT}_PRED_FORMAT5.
-
-class Predicate5Test : public testing::Test {
- protected:
- virtual void SetUp() {
- expected_to_finish_ = true;
- finished_ = false;
- n1_ = n2_ = n3_ = n4_ = n5_ = 0;
- }
-
- virtual void TearDown() {
- // Verifies that each of the predicate's arguments was evaluated
- // exactly once.
- EXPECT_EQ(1, n1_) <<
- "The predicate assertion didn't evaluate argument 2 "
- "exactly once.";
- EXPECT_EQ(1, n2_) <<
- "The predicate assertion didn't evaluate argument 3 "
- "exactly once.";
- EXPECT_EQ(1, n3_) <<
- "The predicate assertion didn't evaluate argument 4 "
- "exactly once.";
- EXPECT_EQ(1, n4_) <<
- "The predicate assertion didn't evaluate argument 5 "
- "exactly once.";
- EXPECT_EQ(1, n5_) <<
- "The predicate assertion didn't evaluate argument 6 "
- "exactly once.";
-
- // Verifies that the control flow in the test function is expected.
- if (expected_to_finish_ && !finished_) {
- FAIL() << "The predicate assertion unexpactedly aborted the test.";
- } else if (!expected_to_finish_ && finished_) {
- FAIL() << "The failed predicate assertion didn't abort the test "
- "as expected.";
- }
- }
-
- // true iff the test function is expected to run to finish.
- static bool expected_to_finish_;
-
- // true iff the test function did run to finish.
- static bool finished_;
-
- static int n1_;
- static int n2_;
- static int n3_;
- static int n4_;
- static int n5_;
-};
-
-bool Predicate5Test::expected_to_finish_;
-bool Predicate5Test::finished_;
-int Predicate5Test::n1_;
-int Predicate5Test::n2_;
-int Predicate5Test::n3_;
-int Predicate5Test::n4_;
-int Predicate5Test::n5_;
-
-typedef Predicate5Test EXPECT_PRED_FORMAT5Test;
-typedef Predicate5Test ASSERT_PRED_FORMAT5Test;
-typedef Predicate5Test EXPECT_PRED5Test;
-typedef Predicate5Test ASSERT_PRED5Test;
-
-// Tests a successful EXPECT_PRED5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED5(PredFunction5Int,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED5(PredFunction5Bool,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED5(PredFunctor5(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED5(PredFunctor5(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED5(PredFunction5Int,
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED5(PredFunction5Bool,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED5(PredFunctor5(),
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED5(PredFunctor5(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED5(PredFunction5Int,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED5(PredFunction5Bool,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED5(PredFunctor5(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED5(PredFunctor5(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED5(PredFunction5Int,
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED5(PredFunction5Bool,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED5(PredFunctor5(),
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED5(PredFunctor5(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) {
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) {
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a failed EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT5(PredFormatFunction5,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed EXPECT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT5(PredFormatFunctor5(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a successful ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) {
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
- ++n1_,
- ++n2_,
- ++n3_,
- ++n4_,
- ++n5_);
- finished_ = true;
-}
-
-// Tests a successful ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) {
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
- Bool(++n1_),
- Bool(++n2_),
- Bool(++n3_),
- Bool(++n4_),
- Bool(++n5_));
- finished_ = true;
-}
-
-// Tests a failed ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a function on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT5(PredFormatFunction5,
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a built-in type (int).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
- n1_++,
- n2_++,
- n3_++,
- n4_++,
- n5_++);
- finished_ = true;
- }, "");
-}
-
-// Tests a failed ASSERT_PRED_FORMAT5 where the
-// predicate-formatter is a functor on a user-defined type (Bool).
-TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) {
- expected_to_finish_ = false;
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT5(PredFormatFunctor5(),
- Bool(n1_++),
- Bool(n2_++),
- Bool(n3_++),
- Bool(n4_++),
- Bool(n5_++));
- finished_ = true;
- }, "");
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_prod_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_prod_test.cc
deleted file mode 100644
index 060abce18..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_prod_test.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Unit test for include/gtest/gtest_prod.h.
-
-#include "gtest/gtest.h"
-#include "test/production.h"
-
-// Tests that private members can be accessed from a TEST declared as
-// a friend of the class.
-TEST(PrivateCodeTest, CanAccessPrivateMembers) {
- PrivateCode a;
- EXPECT_EQ(0, a.x_);
-
- a.set_x(1);
- EXPECT_EQ(1, a.x_);
-}
-
-typedef testing::Test PrivateCodeFixtureTest;
-
-// Tests that private members can be accessed from a TEST_F declared
-// as a friend of the class.
-TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) {
- PrivateCode a;
- EXPECT_EQ(0, a.x_);
-
- a.set_x(2);
- EXPECT_EQ(2, a.x_);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_repeat_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_repeat_test.cc
deleted file mode 100644
index 5223dc0ef..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_repeat_test.cc
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Tests the --gtest_repeat=number flag.
-
-#include <stdlib.h>
-#include <iostream>
-#include "gtest/gtest.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-namespace testing {
-
-GTEST_DECLARE_string_(death_test_style);
-GTEST_DECLARE_string_(filter);
-GTEST_DECLARE_int32_(repeat);
-
-} // namespace testing
-
-using testing::GTEST_FLAG(death_test_style);
-using testing::GTEST_FLAG(filter);
-using testing::GTEST_FLAG(repeat);
-
-namespace {
-
-// We need this when we are testing Google Test itself and therefore
-// cannot use Google Test assertions.
-#define GTEST_CHECK_INT_EQ_(expected, actual) \
- do {\
- const int expected_val = (expected);\
- const int actual_val = (actual);\
- if (::testing::internal::IsTrue(expected_val != actual_val)) {\
- ::std::cout << "Value of: " #actual "\n"\
- << " Actual: " << actual_val << "\n"\
- << "Expected: " #expected "\n"\
- << "Which is: " << expected_val << "\n";\
- ::testing::internal::posix::Abort();\
- }\
- } while(::testing::internal::AlwaysFalse())
-
-
-// Used for verifying that global environment set-up and tear-down are
-// inside the gtest_repeat loop.
-
-int g_environment_set_up_count = 0;
-int g_environment_tear_down_count = 0;
-
-class MyEnvironment : public testing::Environment {
- public:
- MyEnvironment() {}
- virtual void SetUp() { g_environment_set_up_count++; }
- virtual void TearDown() { g_environment_tear_down_count++; }
-};
-
-// A test that should fail.
-
-int g_should_fail_count = 0;
-
-TEST(FooTest, ShouldFail) {
- g_should_fail_count++;
- EXPECT_EQ(0, 1) << "Expected failure.";
-}
-
-// A test that should pass.
-
-int g_should_pass_count = 0;
-
-TEST(FooTest, ShouldPass) {
- g_should_pass_count++;
-}
-
-// A test that contains a thread-safe death test and a fast death
-// test. It should pass.
-
-int g_death_test_count = 0;
-
-TEST(BarDeathTest, ThreadSafeAndFast) {
- g_death_test_count++;
-
- GTEST_FLAG(death_test_style) = "threadsafe";
- EXPECT_DEATH_IF_SUPPORTED(::testing::internal::posix::Abort(), "");
-
- GTEST_FLAG(death_test_style) = "fast";
- EXPECT_DEATH_IF_SUPPORTED(::testing::internal::posix::Abort(), "");
-}
-
-#if GTEST_HAS_PARAM_TEST
-int g_param_test_count = 0;
-
-const int kNumberOfParamTests = 10;
-
-class MyParamTest : public testing::TestWithParam<int> {};
-
-TEST_P(MyParamTest, ShouldPass) {
- // TODO(vladl@google.com): Make parameter value checking robust
- // WRT order of tests.
- GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam());
- g_param_test_count++;
-}
-INSTANTIATE_TEST_CASE_P(MyParamSequence,
- MyParamTest,
- testing::Range(0, kNumberOfParamTests));
-#endif // GTEST_HAS_PARAM_TEST
-
-// Resets the count for each test.
-void ResetCounts() {
- g_environment_set_up_count = 0;
- g_environment_tear_down_count = 0;
- g_should_fail_count = 0;
- g_should_pass_count = 0;
- g_death_test_count = 0;
-#if GTEST_HAS_PARAM_TEST
- g_param_test_count = 0;
-#endif // GTEST_HAS_PARAM_TEST
-}
-
-// Checks that the count for each test is expected.
-void CheckCounts(int expected) {
- GTEST_CHECK_INT_EQ_(expected, g_environment_set_up_count);
- GTEST_CHECK_INT_EQ_(expected, g_environment_tear_down_count);
- GTEST_CHECK_INT_EQ_(expected, g_should_fail_count);
- GTEST_CHECK_INT_EQ_(expected, g_should_pass_count);
- GTEST_CHECK_INT_EQ_(expected, g_death_test_count);
-#if GTEST_HAS_PARAM_TEST
- GTEST_CHECK_INT_EQ_(expected * kNumberOfParamTests, g_param_test_count);
-#endif // GTEST_HAS_PARAM_TEST
-}
-
-// Tests the behavior of Google Test when --gtest_repeat is not specified.
-void TestRepeatUnspecified() {
- ResetCounts();
- GTEST_CHECK_INT_EQ_(1, RUN_ALL_TESTS());
- CheckCounts(1);
-}
-
-// Tests the behavior of Google Test when --gtest_repeat has the given value.
-void TestRepeat(int repeat) {
- GTEST_FLAG(repeat) = repeat;
-
- ResetCounts();
- GTEST_CHECK_INT_EQ_(repeat > 0 ? 1 : 0, RUN_ALL_TESTS());
- CheckCounts(repeat);
-}
-
-// Tests using --gtest_repeat when --gtest_filter specifies an empty
-// set of tests.
-void TestRepeatWithEmptyFilter(int repeat) {
- GTEST_FLAG(repeat) = repeat;
- GTEST_FLAG(filter) = "None";
-
- ResetCounts();
- GTEST_CHECK_INT_EQ_(0, RUN_ALL_TESTS());
- CheckCounts(0);
-}
-
-// Tests using --gtest_repeat when --gtest_filter specifies a set of
-// successful tests.
-void TestRepeatWithFilterForSuccessfulTests(int repeat) {
- GTEST_FLAG(repeat) = repeat;
- GTEST_FLAG(filter) = "*-*ShouldFail";
-
- ResetCounts();
- GTEST_CHECK_INT_EQ_(0, RUN_ALL_TESTS());
- GTEST_CHECK_INT_EQ_(repeat, g_environment_set_up_count);
- GTEST_CHECK_INT_EQ_(repeat, g_environment_tear_down_count);
- GTEST_CHECK_INT_EQ_(0, g_should_fail_count);
- GTEST_CHECK_INT_EQ_(repeat, g_should_pass_count);
- GTEST_CHECK_INT_EQ_(repeat, g_death_test_count);
-#if GTEST_HAS_PARAM_TEST
- GTEST_CHECK_INT_EQ_(repeat * kNumberOfParamTests, g_param_test_count);
-#endif // GTEST_HAS_PARAM_TEST
-}
-
-// Tests using --gtest_repeat when --gtest_filter specifies a set of
-// failed tests.
-void TestRepeatWithFilterForFailedTests(int repeat) {
- GTEST_FLAG(repeat) = repeat;
- GTEST_FLAG(filter) = "*ShouldFail";
-
- ResetCounts();
- GTEST_CHECK_INT_EQ_(1, RUN_ALL_TESTS());
- GTEST_CHECK_INT_EQ_(repeat, g_environment_set_up_count);
- GTEST_CHECK_INT_EQ_(repeat, g_environment_tear_down_count);
- GTEST_CHECK_INT_EQ_(repeat, g_should_fail_count);
- GTEST_CHECK_INT_EQ_(0, g_should_pass_count);
- GTEST_CHECK_INT_EQ_(0, g_death_test_count);
-#if GTEST_HAS_PARAM_TEST
- GTEST_CHECK_INT_EQ_(0, g_param_test_count);
-#endif // GTEST_HAS_PARAM_TEST
-}
-
-} // namespace
-
-int main(int argc, char **argv) {
- testing::InitGoogleTest(&argc, argv);
- testing::AddGlobalTestEnvironment(new MyEnvironment);
-
- TestRepeatUnspecified();
- TestRepeat(0);
- TestRepeat(1);
- TestRepeat(5);
-
- TestRepeatWithEmptyFilter(2);
- TestRepeatWithEmptyFilter(3);
-
- TestRepeatWithFilterForSuccessfulTests(3);
-
- TestRepeatWithFilterForFailedTests(4);
-
- // It would be nice to verify that the tests indeed loop forever
- // when GTEST_FLAG(repeat) is negative, but this test will be quite
- // complicated to write. Since this flag is for interactive
- // debugging only and doesn't affect the normal test result, such a
- // test would be an overkill.
-
- printf("PASS\n");
- return 0;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test.py
deleted file mode 100755
index 30d0303d1..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test.py
+++ /dev/null
@@ -1,325 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009 Google Inc. All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Verifies that test shuffling works."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import gtest_test_utils
-
-# Command to run the gtest_shuffle_test_ program.
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_shuffle_test_')
-
-# The environment variables for test sharding.
-TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'
-SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX'
-
-TEST_FILTER = 'A*.A:A*.B:C*'
-
-ALL_TESTS = []
-ACTIVE_TESTS = []
-FILTERED_TESTS = []
-SHARDED_TESTS = []
-
-SHUFFLED_ALL_TESTS = []
-SHUFFLED_ACTIVE_TESTS = []
-SHUFFLED_FILTERED_TESTS = []
-SHUFFLED_SHARDED_TESTS = []
-
-
-def AlsoRunDisabledTestsFlag():
- return '--gtest_also_run_disabled_tests'
-
-
-def FilterFlag(test_filter):
- return '--gtest_filter=%s' % (test_filter,)
-
-
-def RepeatFlag(n):
- return '--gtest_repeat=%s' % (n,)
-
-
-def ShuffleFlag():
- return '--gtest_shuffle'
-
-
-def RandomSeedFlag(n):
- return '--gtest_random_seed=%s' % (n,)
-
-
-def RunAndReturnOutput(extra_env, args):
- """Runs the test program and returns its output."""
-
- environ_copy = os.environ.copy()
- environ_copy.update(extra_env)
-
- return gtest_test_utils.Subprocess([COMMAND] + args, env=environ_copy).output
-
-
-def GetTestsForAllIterations(extra_env, args):
- """Runs the test program and returns a list of test lists.
-
- Args:
- extra_env: a map from environment variables to their values
- args: command line flags to pass to gtest_shuffle_test_
-
- Returns:
- A list where the i-th element is the list of tests run in the i-th
- test iteration.
- """
-
- test_iterations = []
- for line in RunAndReturnOutput(extra_env, args).split('\n'):
- if line.startswith('----'):
- tests = []
- test_iterations.append(tests)
- elif line.strip():
- tests.append(line.strip()) # 'TestCaseName.TestName'
-
- return test_iterations
-
-
-def GetTestCases(tests):
- """Returns a list of test cases in the given full test names.
-
- Args:
- tests: a list of full test names
-
- Returns:
- A list of test cases from 'tests', in their original order.
- Consecutive duplicates are removed.
- """
-
- test_cases = []
- for test in tests:
- test_case = test.split('.')[0]
- if not test_case in test_cases:
- test_cases.append(test_case)
-
- return test_cases
-
-
-def CalculateTestLists():
- """Calculates the list of tests run under different flags."""
-
- if not ALL_TESTS:
- ALL_TESTS.extend(
- GetTestsForAllIterations({}, [AlsoRunDisabledTestsFlag()])[0])
-
- if not ACTIVE_TESTS:
- ACTIVE_TESTS.extend(GetTestsForAllIterations({}, [])[0])
-
- if not FILTERED_TESTS:
- FILTERED_TESTS.extend(
- GetTestsForAllIterations({}, [FilterFlag(TEST_FILTER)])[0])
-
- if not SHARDED_TESTS:
- SHARDED_TESTS.extend(
- GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',
- SHARD_INDEX_ENV_VAR: '1'},
- [])[0])
-
- if not SHUFFLED_ALL_TESTS:
- SHUFFLED_ALL_TESTS.extend(GetTestsForAllIterations(
- {}, [AlsoRunDisabledTestsFlag(), ShuffleFlag(), RandomSeedFlag(1)])[0])
-
- if not SHUFFLED_ACTIVE_TESTS:
- SHUFFLED_ACTIVE_TESTS.extend(GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(1)])[0])
-
- if not SHUFFLED_FILTERED_TESTS:
- SHUFFLED_FILTERED_TESTS.extend(GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(1), FilterFlag(TEST_FILTER)])[0])
-
- if not SHUFFLED_SHARDED_TESTS:
- SHUFFLED_SHARDED_TESTS.extend(
- GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',
- SHARD_INDEX_ENV_VAR: '1'},
- [ShuffleFlag(), RandomSeedFlag(1)])[0])
-
-
-class GTestShuffleUnitTest(gtest_test_utils.TestCase):
- """Tests test shuffling."""
-
- def setUp(self):
- CalculateTestLists()
-
- def testShufflePreservesNumberOfTests(self):
- self.assertEqual(len(ALL_TESTS), len(SHUFFLED_ALL_TESTS))
- self.assertEqual(len(ACTIVE_TESTS), len(SHUFFLED_ACTIVE_TESTS))
- self.assertEqual(len(FILTERED_TESTS), len(SHUFFLED_FILTERED_TESTS))
- self.assertEqual(len(SHARDED_TESTS), len(SHUFFLED_SHARDED_TESTS))
-
- def testShuffleChangesTestOrder(self):
- self.assert_(SHUFFLED_ALL_TESTS != ALL_TESTS, SHUFFLED_ALL_TESTS)
- self.assert_(SHUFFLED_ACTIVE_TESTS != ACTIVE_TESTS, SHUFFLED_ACTIVE_TESTS)
- self.assert_(SHUFFLED_FILTERED_TESTS != FILTERED_TESTS,
- SHUFFLED_FILTERED_TESTS)
- self.assert_(SHUFFLED_SHARDED_TESTS != SHARDED_TESTS,
- SHUFFLED_SHARDED_TESTS)
-
- def testShuffleChangesTestCaseOrder(self):
- self.assert_(GetTestCases(SHUFFLED_ALL_TESTS) != GetTestCases(ALL_TESTS),
- GetTestCases(SHUFFLED_ALL_TESTS))
- self.assert_(
- GetTestCases(SHUFFLED_ACTIVE_TESTS) != GetTestCases(ACTIVE_TESTS),
- GetTestCases(SHUFFLED_ACTIVE_TESTS))
- self.assert_(
- GetTestCases(SHUFFLED_FILTERED_TESTS) != GetTestCases(FILTERED_TESTS),
- GetTestCases(SHUFFLED_FILTERED_TESTS))
- self.assert_(
- GetTestCases(SHUFFLED_SHARDED_TESTS) != GetTestCases(SHARDED_TESTS),
- GetTestCases(SHUFFLED_SHARDED_TESTS))
-
- def testShuffleDoesNotRepeatTest(self):
- for test in SHUFFLED_ALL_TESTS:
- self.assertEqual(1, SHUFFLED_ALL_TESTS.count(test),
- '%s appears more than once' % (test,))
- for test in SHUFFLED_ACTIVE_TESTS:
- self.assertEqual(1, SHUFFLED_ACTIVE_TESTS.count(test),
- '%s appears more than once' % (test,))
- for test in SHUFFLED_FILTERED_TESTS:
- self.assertEqual(1, SHUFFLED_FILTERED_TESTS.count(test),
- '%s appears more than once' % (test,))
- for test in SHUFFLED_SHARDED_TESTS:
- self.assertEqual(1, SHUFFLED_SHARDED_TESTS.count(test),
- '%s appears more than once' % (test,))
-
- def testShuffleDoesNotCreateNewTest(self):
- for test in SHUFFLED_ALL_TESTS:
- self.assert_(test in ALL_TESTS, '%s is an invalid test' % (test,))
- for test in SHUFFLED_ACTIVE_TESTS:
- self.assert_(test in ACTIVE_TESTS, '%s is an invalid test' % (test,))
- for test in SHUFFLED_FILTERED_TESTS:
- self.assert_(test in FILTERED_TESTS, '%s is an invalid test' % (test,))
- for test in SHUFFLED_SHARDED_TESTS:
- self.assert_(test in SHARDED_TESTS, '%s is an invalid test' % (test,))
-
- def testShuffleIncludesAllTests(self):
- for test in ALL_TESTS:
- self.assert_(test in SHUFFLED_ALL_TESTS, '%s is missing' % (test,))
- for test in ACTIVE_TESTS:
- self.assert_(test in SHUFFLED_ACTIVE_TESTS, '%s is missing' % (test,))
- for test in FILTERED_TESTS:
- self.assert_(test in SHUFFLED_FILTERED_TESTS, '%s is missing' % (test,))
- for test in SHARDED_TESTS:
- self.assert_(test in SHUFFLED_SHARDED_TESTS, '%s is missing' % (test,))
-
- def testShuffleLeavesDeathTestsAtFront(self):
- non_death_test_found = False
- for test in SHUFFLED_ACTIVE_TESTS:
- if 'DeathTest.' in test:
- self.assert_(not non_death_test_found,
- '%s appears after a non-death test' % (test,))
- else:
- non_death_test_found = True
-
- def _VerifyTestCasesDoNotInterleave(self, tests):
- test_cases = []
- for test in tests:
- [test_case, _] = test.split('.')
- if test_cases and test_cases[-1] != test_case:
- test_cases.append(test_case)
- self.assertEqual(1, test_cases.count(test_case),
- 'Test case %s is not grouped together in %s' %
- (test_case, tests))
-
- def testShuffleDoesNotInterleaveTestCases(self):
- self._VerifyTestCasesDoNotInterleave(SHUFFLED_ALL_TESTS)
- self._VerifyTestCasesDoNotInterleave(SHUFFLED_ACTIVE_TESTS)
- self._VerifyTestCasesDoNotInterleave(SHUFFLED_FILTERED_TESTS)
- self._VerifyTestCasesDoNotInterleave(SHUFFLED_SHARDED_TESTS)
-
- def testShuffleRestoresOrderAfterEachIteration(self):
- # Get the test lists in all 3 iterations, using random seed 1, 2,
- # and 3 respectively. Google Test picks a different seed in each
- # iteration, and this test depends on the current implementation
- # picking successive numbers. This dependency is not ideal, but
- # makes the test much easier to write.
- [tests_in_iteration1, tests_in_iteration2, tests_in_iteration3] = (
- GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)]))
-
- # Make sure running the tests with random seed 1 gets the same
- # order as in iteration 1 above.
- [tests_with_seed1] = GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(1)])
- self.assertEqual(tests_in_iteration1, tests_with_seed1)
-
- # Make sure running the tests with random seed 2 gets the same
- # order as in iteration 2 above. Success means that Google Test
- # correctly restores the test order before re-shuffling at the
- # beginning of iteration 2.
- [tests_with_seed2] = GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(2)])
- self.assertEqual(tests_in_iteration2, tests_with_seed2)
-
- # Make sure running the tests with random seed 3 gets the same
- # order as in iteration 3 above. Success means that Google Test
- # correctly restores the test order before re-shuffling at the
- # beginning of iteration 3.
- [tests_with_seed3] = GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(3)])
- self.assertEqual(tests_in_iteration3, tests_with_seed3)
-
- def testShuffleGeneratesNewOrderInEachIteration(self):
- [tests_in_iteration1, tests_in_iteration2, tests_in_iteration3] = (
- GetTestsForAllIterations(
- {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)]))
-
- self.assert_(tests_in_iteration1 != tests_in_iteration2,
- tests_in_iteration1)
- self.assert_(tests_in_iteration1 != tests_in_iteration3,
- tests_in_iteration1)
- self.assert_(tests_in_iteration2 != tests_in_iteration3,
- tests_in_iteration2)
-
- def testShuffleShardedTestsPreservesPartition(self):
- # If we run M tests on N shards, the same M tests should be run in
- # total, regardless of the random seeds used by the shards.
- [tests1] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',
- SHARD_INDEX_ENV_VAR: '0'},
- [ShuffleFlag(), RandomSeedFlag(1)])
- [tests2] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',
- SHARD_INDEX_ENV_VAR: '1'},
- [ShuffleFlag(), RandomSeedFlag(20)])
- [tests3] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3',
- SHARD_INDEX_ENV_VAR: '2'},
- [ShuffleFlag(), RandomSeedFlag(25)])
- sorted_sharded_tests = tests1 + tests2 + tests3
- sorted_sharded_tests.sort()
- sorted_active_tests = []
- sorted_active_tests.extend(ACTIVE_TESTS)
- sorted_active_tests.sort()
- self.assertEqual(sorted_active_tests, sorted_sharded_tests)
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test_.cc
deleted file mode 100644
index 0752789ef..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_shuffle_test_.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Verifies that test shuffling works.
-
-#include "gtest/gtest.h"
-
-namespace {
-
-using ::testing::EmptyTestEventListener;
-using ::testing::InitGoogleTest;
-using ::testing::Message;
-using ::testing::Test;
-using ::testing::TestEventListeners;
-using ::testing::TestInfo;
-using ::testing::UnitTest;
-using ::testing::internal::String;
-using ::testing::internal::scoped_ptr;
-
-// The test methods are empty, as the sole purpose of this program is
-// to print the test names before/after shuffling.
-
-class A : public Test {};
-TEST_F(A, A) {}
-TEST_F(A, B) {}
-
-TEST(ADeathTest, A) {}
-TEST(ADeathTest, B) {}
-TEST(ADeathTest, C) {}
-
-TEST(B, A) {}
-TEST(B, B) {}
-TEST(B, C) {}
-TEST(B, DISABLED_D) {}
-TEST(B, DISABLED_E) {}
-
-TEST(BDeathTest, A) {}
-TEST(BDeathTest, B) {}
-
-TEST(C, A) {}
-TEST(C, B) {}
-TEST(C, C) {}
-TEST(C, DISABLED_D) {}
-
-TEST(CDeathTest, A) {}
-
-TEST(DISABLED_D, A) {}
-TEST(DISABLED_D, DISABLED_B) {}
-
-// This printer prints the full test names only, starting each test
-// iteration with a "----" marker.
-class TestNamePrinter : public EmptyTestEventListener {
- public:
- virtual void OnTestIterationStart(const UnitTest& /* unit_test */,
- int /* iteration */) {
- printf("----\n");
- }
-
- virtual void OnTestStart(const TestInfo& test_info) {
- printf("%s.%s\n", test_info.test_case_name(), test_info.name());
- }
-};
-
-} // namespace
-
-int main(int argc, char **argv) {
- InitGoogleTest(&argc, argv);
-
- // Replaces the default printer with TestNamePrinter, which prints
- // the test name only.
- TestEventListeners& listeners = UnitTest::GetInstance()->listeners();
- delete listeners.Release(listeners.default_result_printer());
- listeners.Append(new TestNamePrinter);
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_sole_header_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_sole_header_test.cc
deleted file mode 100644
index ccd091a28..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_sole_header_test.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: mheule@google.com (Markus Heule)
-//
-// This test verifies that it's possible to use Google Test by including
-// the gtest.h header file alone.
-
-#include "gtest/gtest.h"
-
-namespace {
-
-void Subroutine() {
- EXPECT_EQ(42, 42);
-}
-
-TEST(NoFatalFailureTest, ExpectNoFatalFailure) {
- EXPECT_NO_FATAL_FAILURE(;);
- EXPECT_NO_FATAL_FAILURE(SUCCEED());
- EXPECT_NO_FATAL_FAILURE(Subroutine());
- EXPECT_NO_FATAL_FAILURE({ SUCCEED(); });
-}
-
-TEST(NoFatalFailureTest, AssertNoFatalFailure) {
- ASSERT_NO_FATAL_FAILURE(;);
- ASSERT_NO_FATAL_FAILURE(SUCCEED());
- ASSERT_NO_FATAL_FAILURE(Subroutine());
- ASSERT_NO_FATAL_FAILURE({ SUCCEED(); });
-}
-
-} // namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_stress_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_stress_test.cc
deleted file mode 100644
index 4e7d9bff1..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_stress_test.cc
+++ /dev/null
@@ -1,257 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Tests that SCOPED_TRACE() and various Google Test assertions can be
-// used in a large number of threads concurrently.
-
-#include "gtest/gtest.h"
-
-#include <iostream>
-#include <vector>
-
-// We must define this macro in order to #include
-// gtest-internal-inl.h. This is how Google Test prevents a user from
-// accidentally depending on its internal implementation.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-#if GTEST_IS_THREADSAFE
-
-namespace testing {
-namespace {
-
-using internal::Notification;
-using internal::String;
-using internal::TestPropertyKeyIs;
-using internal::ThreadWithParam;
-using internal::scoped_ptr;
-
-// In order to run tests in this file, for platforms where Google Test is
-// thread safe, implement ThreadWithParam. See the description of its API
-// in gtest-port.h, where it is defined for already supported platforms.
-
-// How many threads to create?
-const int kThreadCount = 50;
-
-String IdToKey(int id, const char* suffix) {
- Message key;
- key << "key_" << id << "_" << suffix;
- return key.GetString();
-}
-
-String IdToString(int id) {
- Message id_message;
- id_message << id;
- return id_message.GetString();
-}
-
-void ExpectKeyAndValueWereRecordedForId(
- const std::vector<TestProperty>& properties,
- int id, const char* suffix) {
- TestPropertyKeyIs matches_key(IdToKey(id, suffix).c_str());
- const std::vector<TestProperty>::const_iterator property =
- std::find_if(properties.begin(), properties.end(), matches_key);
- ASSERT_TRUE(property != properties.end())
- << "expecting " << suffix << " value for id " << id;
- EXPECT_STREQ(IdToString(id).c_str(), property->value());
-}
-
-// Calls a large number of Google Test assertions, where exactly one of them
-// will fail.
-void ManyAsserts(int id) {
- GTEST_LOG_(INFO) << "Thread #" << id << " running...";
-
- SCOPED_TRACE(Message() << "Thread #" << id);
-
- for (int i = 0; i < kThreadCount; i++) {
- SCOPED_TRACE(Message() << "Iteration #" << i);
-
- // A bunch of assertions that should succeed.
- EXPECT_TRUE(true);
- ASSERT_FALSE(false) << "This shouldn't fail.";
- EXPECT_STREQ("a", "a");
- ASSERT_LE(5, 6);
- EXPECT_EQ(i, i) << "This shouldn't fail.";
-
- // RecordProperty() should interact safely with other threads as well.
- // The shared_key forces property updates.
- Test::RecordProperty(IdToKey(id, "string").c_str(), IdToString(id).c_str());
- Test::RecordProperty(IdToKey(id, "int").c_str(), id);
- Test::RecordProperty("shared_key", IdToString(id).c_str());
-
- // This assertion should fail kThreadCount times per thread. It
- // is for testing whether Google Test can handle failed assertions in a
- // multi-threaded context.
- EXPECT_LT(i, 0) << "This should always fail.";
- }
-}
-
-void CheckTestFailureCount(int expected_failures) {
- const TestInfo* const info = UnitTest::GetInstance()->current_test_info();
- const TestResult* const result = info->result();
- GTEST_CHECK_(expected_failures == result->total_part_count())
- << "Logged " << result->total_part_count() << " failures "
- << " vs. " << expected_failures << " expected";
-}
-
-// Tests using SCOPED_TRACE() and Google Test assertions in many threads
-// concurrently.
-TEST(StressTest, CanUseScopedTraceAndAssertionsInManyThreads) {
- {
- scoped_ptr<ThreadWithParam<int> > threads[kThreadCount];
- Notification threads_can_start;
- for (int i = 0; i != kThreadCount; i++)
- threads[i].reset(new ThreadWithParam<int>(&ManyAsserts,
- i,
- &threads_can_start));
-
- threads_can_start.Notify();
-
- // Blocks until all the threads are done.
- for (int i = 0; i != kThreadCount; i++)
- threads[i]->Join();
- }
-
- // Ensures that kThreadCount*kThreadCount failures have been reported.
- const TestInfo* const info = UnitTest::GetInstance()->current_test_info();
- const TestResult* const result = info->result();
-
- std::vector<TestProperty> properties;
- // We have no access to the TestResult's list of properties but we can
- // copy them one by one.
- for (int i = 0; i < result->test_property_count(); ++i)
- properties.push_back(result->GetTestProperty(i));
-
- EXPECT_EQ(kThreadCount * 2 + 1, result->test_property_count())
- << "String and int values recorded on each thread, "
- << "as well as one shared_key";
- for (int i = 0; i < kThreadCount; ++i) {
- ExpectKeyAndValueWereRecordedForId(properties, i, "string");
- ExpectKeyAndValueWereRecordedForId(properties, i, "int");
- }
- CheckTestFailureCount(kThreadCount*kThreadCount);
-}
-
-void FailingThread(bool is_fatal) {
- if (is_fatal)
- FAIL() << "Fatal failure in some other thread. "
- << "(This failure is expected.)";
- else
- ADD_FAILURE() << "Non-fatal failure in some other thread. "
- << "(This failure is expected.)";
-}
-
-void GenerateFatalFailureInAnotherThread(bool is_fatal) {
- ThreadWithParam<bool> thread(&FailingThread, is_fatal, NULL);
- thread.Join();
-}
-
-TEST(NoFatalFailureTest, ExpectNoFatalFailureIgnoresFailuresInOtherThreads) {
- EXPECT_NO_FATAL_FAILURE(GenerateFatalFailureInAnotherThread(true));
- // We should only have one failure (the one from
- // GenerateFatalFailureInAnotherThread()), since the EXPECT_NO_FATAL_FAILURE
- // should succeed.
- CheckTestFailureCount(1);
-}
-
-void AssertNoFatalFailureIgnoresFailuresInOtherThreads() {
- ASSERT_NO_FATAL_FAILURE(GenerateFatalFailureInAnotherThread(true));
-}
-TEST(NoFatalFailureTest, AssertNoFatalFailureIgnoresFailuresInOtherThreads) {
- // Using a subroutine, to make sure, that the test continues.
- AssertNoFatalFailureIgnoresFailuresInOtherThreads();
- // We should only have one failure (the one from
- // GenerateFatalFailureInAnotherThread()), since the EXPECT_NO_FATAL_FAILURE
- // should succeed.
- CheckTestFailureCount(1);
-}
-
-TEST(FatalFailureTest, ExpectFatalFailureIgnoresFailuresInOtherThreads) {
- // This statement should fail, since the current thread doesn't generate a
- // fatal failure, only another one does.
- EXPECT_FATAL_FAILURE(GenerateFatalFailureInAnotherThread(true), "expected");
- CheckTestFailureCount(2);
-}
-
-TEST(FatalFailureOnAllThreadsTest, ExpectFatalFailureOnAllThreads) {
- // This statement should succeed, because failures in all threads are
- // considered.
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(
- GenerateFatalFailureInAnotherThread(true), "expected");
- CheckTestFailureCount(0);
- // We need to add a failure, because main() checks that there are failures.
- // But when only this test is run, we shouldn't have any failures.
- ADD_FAILURE() << "This is an expected non-fatal failure.";
-}
-
-TEST(NonFatalFailureTest, ExpectNonFatalFailureIgnoresFailuresInOtherThreads) {
- // This statement should fail, since the current thread doesn't generate a
- // fatal failure, only another one does.
- EXPECT_NONFATAL_FAILURE(GenerateFatalFailureInAnotherThread(false),
- "expected");
- CheckTestFailureCount(2);
-}
-
-TEST(NonFatalFailureOnAllThreadsTest, ExpectNonFatalFailureOnAllThreads) {
- // This statement should succeed, because failures in all threads are
- // considered.
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(
- GenerateFatalFailureInAnotherThread(false), "expected");
- CheckTestFailureCount(0);
- // We need to add a failure, because main() checks that there are failures,
- // But when only this test is run, we shouldn't have any failures.
- ADD_FAILURE() << "This is an expected non-fatal failure.";
-}
-
-} // namespace
-} // namespace testing
-
-int main(int argc, char **argv) {
- testing::InitGoogleTest(&argc, argv);
-
- const int result = RUN_ALL_TESTS(); // Expected to fail.
- GTEST_CHECK_(result == 1) << "RUN_ALL_TESTS() did not fail as expected";
-
- printf("\nPASS\n");
- return 0;
-}
-
-#else
-TEST(StressTest,
- DISABLED_ThreadSafetyTestsAreSkippedWhenGoogleTestIsNotThreadSafe) {
-}
-
-int main(int argc, char **argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
-#endif // GTEST_IS_THREADSAFE
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_test_utils.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_test_utils.py
deleted file mode 100755
index 4e897bd3f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_test_utils.py
+++ /dev/null
@@ -1,305 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test utilities for Google C++ Testing Framework."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import atexit
-import os
-import shutil
-import sys
-import tempfile
-import unittest
-_test_module = unittest
-
-# Suppresses the 'Import not at the top of the file' lint complaint.
-# pylint: disable-msg=C6204
-try:
- import subprocess
- _SUBPROCESS_MODULE_AVAILABLE = True
-except:
- import popen2
- _SUBPROCESS_MODULE_AVAILABLE = False
-# pylint: enable-msg=C6204
-
-GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT'
-
-IS_WINDOWS = os.name == 'nt'
-IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0]
-
-# Here we expose a class from a particular module, depending on the
-# environment. The comment suppresses the 'Invalid variable name' lint
-# complaint.
-TestCase = _test_module.TestCase # pylint: disable-msg=C6409
-
-# Initially maps a flag to its default value. After
-# _ParseAndStripGTestFlags() is called, maps a flag to its actual value.
-_flag_map = {'source_dir': os.path.dirname(sys.argv[0]),
- 'build_dir': os.path.dirname(sys.argv[0])}
-_gtest_flags_are_parsed = False
-
-
-def _ParseAndStripGTestFlags(argv):
- """Parses and strips Google Test flags from argv. This is idempotent."""
-
- # Suppresses the lint complaint about a global variable since we need it
- # here to maintain module-wide state.
- global _gtest_flags_are_parsed # pylint: disable-msg=W0603
- if _gtest_flags_are_parsed:
- return
-
- _gtest_flags_are_parsed = True
- for flag in _flag_map:
- # The environment variable overrides the default value.
- if flag.upper() in os.environ:
- _flag_map[flag] = os.environ[flag.upper()]
-
- # The command line flag overrides the environment variable.
- i = 1 # Skips the program name.
- while i < len(argv):
- prefix = '--' + flag + '='
- if argv[i].startswith(prefix):
- _flag_map[flag] = argv[i][len(prefix):]
- del argv[i]
- break
- else:
- # We don't increment i in case we just found a --gtest_* flag
- # and removed it from argv.
- i += 1
-
-
-def GetFlag(flag):
- """Returns the value of the given flag."""
-
- # In case GetFlag() is called before Main(), we always call
- # _ParseAndStripGTestFlags() here to make sure the --gtest_* flags
- # are parsed.
- _ParseAndStripGTestFlags(sys.argv)
-
- return _flag_map[flag]
-
-
-def GetSourceDir():
- """Returns the absolute path of the directory where the .py files are."""
-
- return os.path.abspath(GetFlag('source_dir'))
-
-
-def GetBuildDir():
- """Returns the absolute path of the directory where the test binaries are."""
-
- return os.path.abspath(GetFlag('build_dir'))
-
-
-_temp_dir = None
-
-def _RemoveTempDir():
- if _temp_dir:
- shutil.rmtree(_temp_dir, ignore_errors=True)
-
-atexit.register(_RemoveTempDir)
-
-
-def GetTempDir():
- """Returns a directory for temporary files."""
-
- global _temp_dir
- if not _temp_dir:
- _temp_dir = tempfile.mkdtemp()
- return _temp_dir
-
-
-def GetTestExecutablePath(executable_name, build_dir=None):
- """Returns the absolute path of the test binary given its name.
-
- The function will print a message and abort the program if the resulting file
- doesn't exist.
-
- Args:
- executable_name: name of the test binary that the test script runs.
- build_dir: directory where to look for executables, by default
- the result of GetBuildDir().
-
- Returns:
- The absolute path of the test binary.
- """
-
- path = os.path.abspath(os.path.join(build_dir or GetBuildDir(),
- executable_name))
- if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'):
- path += '.exe'
-
- if not os.path.exists(path):
- message = (
- 'Unable to find the test binary. Please make sure to provide path\n'
- 'to the binary via the --build_dir flag or the BUILD_DIR\n'
- 'environment variable.')
- print >> sys.stderr, message
- sys.exit(1)
-
- return path
-
-
-def GetExitStatus(exit_code):
- """Returns the argument to exit(), or -1 if exit() wasn't called.
-
- Args:
- exit_code: the result value of os.system(command).
- """
-
- if os.name == 'nt':
- # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns
- # the argument to exit() directly.
- return exit_code
- else:
- # On Unix, os.WEXITSTATUS() must be used to extract the exit status
- # from the result of os.system().
- if os.WIFEXITED(exit_code):
- return os.WEXITSTATUS(exit_code)
- else:
- return -1
-
-
-class Subprocess:
- def __init__(self, command, working_dir=None, capture_stderr=True, env=None):
- """Changes into a specified directory, if provided, and executes a command.
-
- Restores the old directory afterwards.
-
- Args:
- command: The command to run, in the form of sys.argv.
- working_dir: The directory to change into.
- capture_stderr: Determines whether to capture stderr in the output member
- or to discard it.
- env: Dictionary with environment to pass to the subprocess.
-
- Returns:
- An object that represents outcome of the executed process. It has the
- following attributes:
- terminated_by_signal True iff the child process has been terminated
- by a signal.
- signal Sygnal that terminated the child process.
- exited True iff the child process exited normally.
- exit_code The code with which the child process exited.
- output Child process's stdout and stderr output
- combined in a string.
- """
-
- # The subprocess module is the preferrable way of running programs
- # since it is available and behaves consistently on all platforms,
- # including Windows. But it is only available starting in python 2.4.
- # In earlier python versions, we revert to the popen2 module, which is
- # available in python 2.0 and later but doesn't provide required
- # functionality (Popen4) under Windows. This allows us to support Mac
- # OS X 10.4 Tiger, which has python 2.3 installed.
- if _SUBPROCESS_MODULE_AVAILABLE:
- if capture_stderr:
- stderr = subprocess.STDOUT
- else:
- stderr = subprocess.PIPE
-
- p = subprocess.Popen(command,
- stdout=subprocess.PIPE, stderr=stderr,
- cwd=working_dir, universal_newlines=True, env=env)
- # communicate returns a tuple with the file obect for the child's
- # output.
- self.output = p.communicate()[0]
- self._return_code = p.returncode
- else:
- old_dir = os.getcwd()
-
- def _ReplaceEnvDict(dest, src):
- # Changes made by os.environ.clear are not inheritable by child
- # processes until Python 2.6. To produce inheritable changes we have
- # to delete environment items with the del statement.
- for key in dest:
- del dest[key]
- dest.update(src)
-
- # When 'env' is not None, backup the environment variables and replace
- # them with the passed 'env'. When 'env' is None, we simply use the
- # current 'os.environ' for compatibility with the subprocess.Popen
- # semantics used above.
- if env is not None:
- old_environ = os.environ.copy()
- _ReplaceEnvDict(os.environ, env)
-
- try:
- if working_dir is not None:
- os.chdir(working_dir)
- if capture_stderr:
- p = popen2.Popen4(command)
- else:
- p = popen2.Popen3(command)
- p.tochild.close()
- self.output = p.fromchild.read()
- ret_code = p.wait()
- finally:
- os.chdir(old_dir)
-
- # Restore the old environment variables
- # if they were replaced.
- if env is not None:
- _ReplaceEnvDict(os.environ, old_environ)
-
- # Converts ret_code to match the semantics of
- # subprocess.Popen.returncode.
- if os.WIFSIGNALED(ret_code):
- self._return_code = -os.WTERMSIG(ret_code)
- else: # os.WIFEXITED(ret_code) should return True here.
- self._return_code = os.WEXITSTATUS(ret_code)
-
- if self._return_code < 0:
- self.terminated_by_signal = True
- self.exited = False
- self.signal = -self._return_code
- else:
- self.terminated_by_signal = False
- self.exited = True
- self.exit_code = self._return_code
-
-
-def Main():
- """Runs the unit test."""
-
- # We must call _ParseAndStripGTestFlags() before calling
- # unittest.main(). Otherwise the latter will be confused by the
- # --gtest_* flags.
- _ParseAndStripGTestFlags(sys.argv)
- # The tested binaries should not be writing XML output files unless the
- # script explicitly instructs them to.
- # TODO(vladl@google.com): Move this into Subprocess when we implement
- # passing environment into it as a parameter.
- if GTEST_OUTPUT_VAR_NAME in os.environ:
- del os.environ[GTEST_OUTPUT_VAR_NAME]
-
- _test_module.main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_ex_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_ex_test.cc
deleted file mode 100644
index 8d46c76f1..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_ex_test.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Tests Google Test's throw-on-failure mode with exceptions enabled.
-
-#include "gtest/gtest.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdexcept>
-
-// Prints the given failure message and exits the program with
-// non-zero. We use this instead of a Google Test assertion to
-// indicate a failure, as the latter is been tested and cannot be
-// relied on.
-void Fail(const char* msg) {
- printf("FAILURE: %s\n", msg);
- fflush(stdout);
- exit(1);
-}
-
-// Tests that an assertion failure throws a subclass of
-// std::runtime_error.
-void TestFailureThrowsRuntimeError() {
- testing::GTEST_FLAG(throw_on_failure) = true;
-
- // A successful assertion shouldn't throw.
- try {
- EXPECT_EQ(3, 3);
- } catch(...) {
- Fail("A successful assertion wrongfully threw.");
- }
-
- // A failed assertion should throw a subclass of std::runtime_error.
- try {
- EXPECT_EQ(2, 3) << "Expected failure";
- } catch(const std::runtime_error& e) {
- if (strstr(e.what(), "Expected failure") != NULL)
- return;
-
- printf("%s",
- "A failed assertion did throw an exception of the right type, "
- "but the message is incorrect. Instead of containing \"Expected "
- "failure\", it is:\n");
- Fail(e.what());
- } catch(...) {
- Fail("A failed assertion threw the wrong type of exception.");
- }
- Fail("A failed assertion should've thrown but didn't.");
-}
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
-
- // We want to ensure that people can use Google Test assertions in
- // other testing frameworks, as long as they initialize Google Test
- // properly and set the thrown-on-failure mode. Therefore, we don't
- // use Google Test's constructs for defining and running tests
- // (e.g. TEST and RUN_ALL_TESTS) here.
-
- TestFailureThrowsRuntimeError();
- return 0;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test.py
deleted file mode 100755
index 5678ffeaf..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test.py
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests Google Test's throw-on-failure mode with exceptions disabled.
-
-This script invokes gtest_throw_on_failure_test_ (a program written with
-Google Test) with different environments and command line flags.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import gtest_test_utils
-
-
-# Constants.
-
-# The command line flag for enabling/disabling the throw-on-failure mode.
-THROW_ON_FAILURE = 'gtest_throw_on_failure'
-
-# Path to the gtest_throw_on_failure_test_ program, compiled with
-# exceptions disabled.
-EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_throw_on_failure_test_')
-
-
-# Utilities.
-
-
-def SetEnvVar(env_var, value):
- """Sets an environment variable to a given value; unsets it when the
- given value is None.
- """
-
- env_var = env_var.upper()
- if value is not None:
- os.environ[env_var] = value
- elif env_var in os.environ:
- del os.environ[env_var]
-
-
-def Run(command):
- """Runs a command; returns True/False if its exit code is/isn't 0."""
-
- print 'Running "%s". . .' % ' '.join(command)
- p = gtest_test_utils.Subprocess(command)
- return p.exited and p.exit_code == 0
-
-
-# The tests. TODO(wan@google.com): refactor the class to share common
-# logic with code in gtest_break_on_failure_unittest.py.
-class ThrowOnFailureTest(gtest_test_utils.TestCase):
- """Tests the throw-on-failure mode."""
-
- def RunAndVerify(self, env_var_value, flag_value, should_fail):
- """Runs gtest_throw_on_failure_test_ and verifies that it does
- (or does not) exit with a non-zero code.
-
- Args:
- env_var_value: value of the GTEST_BREAK_ON_FAILURE environment
- variable; None if the variable should be unset.
- flag_value: value of the --gtest_break_on_failure flag;
- None if the flag should not be present.
- should_fail: True iff the program is expected to fail.
- """
-
- SetEnvVar(THROW_ON_FAILURE, env_var_value)
-
- if env_var_value is None:
- env_var_value_msg = ' is not set'
- else:
- env_var_value_msg = '=' + env_var_value
-
- if flag_value is None:
- flag = ''
- elif flag_value == '0':
- flag = '--%s=0' % THROW_ON_FAILURE
- else:
- flag = '--%s' % THROW_ON_FAILURE
-
- command = [EXE_PATH]
- if flag:
- command.append(flag)
-
- if should_fail:
- should_or_not = 'should'
- else:
- should_or_not = 'should not'
-
- failed = not Run(command)
-
- SetEnvVar(THROW_ON_FAILURE, None)
-
- msg = ('when %s%s, an assertion failure in "%s" %s cause a non-zero '
- 'exit code.' %
- (THROW_ON_FAILURE, env_var_value_msg, ' '.join(command),
- should_or_not))
- self.assert_(failed == should_fail, msg)
-
- def testDefaultBehavior(self):
- """Tests the behavior of the default mode."""
-
- self.RunAndVerify(env_var_value=None, flag_value=None, should_fail=False)
-
- def testThrowOnFailureEnvVar(self):
- """Tests using the GTEST_THROW_ON_FAILURE environment variable."""
-
- self.RunAndVerify(env_var_value='0',
- flag_value=None,
- should_fail=False)
- self.RunAndVerify(env_var_value='1',
- flag_value=None,
- should_fail=True)
-
- def testThrowOnFailureFlag(self):
- """Tests using the --gtest_throw_on_failure flag."""
-
- self.RunAndVerify(env_var_value=None,
- flag_value='0',
- should_fail=False)
- self.RunAndVerify(env_var_value=None,
- flag_value='1',
- should_fail=True)
-
- def testThrowOnFailureFlagOverridesEnvVar(self):
- """Tests that --gtest_throw_on_failure overrides GTEST_THROW_ON_FAILURE."""
-
- self.RunAndVerify(env_var_value='0',
- flag_value='0',
- should_fail=False)
- self.RunAndVerify(env_var_value='0',
- flag_value='1',
- should_fail=True)
- self.RunAndVerify(env_var_value='1',
- flag_value='0',
- should_fail=False)
- self.RunAndVerify(env_var_value='1',
- flag_value='1',
- should_fail=True)
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test_.cc
deleted file mode 100644
index 03776ecb3..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_throw_on_failure_test_.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Tests Google Test's throw-on-failure mode with exceptions disabled.
-//
-// This program must be compiled with exceptions disabled. It will be
-// invoked by gtest_throw_on_failure_test.py, and is expected to exit
-// with non-zero in the throw-on-failure mode or 0 otherwise.
-
-#include "gtest/gtest.h"
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
-
- // We want to ensure that people can use Google Test assertions in
- // other testing frameworks, as long as they initialize Google Test
- // properly and set the thrown-on-failure mode. Therefore, we don't
- // use Google Test's constructs for defining and running tests
- // (e.g. TEST and RUN_ALL_TESTS) here.
-
- // In the throw-on-failure mode with exceptions disabled, this
- // assertion will cause the program to exit with a non-zero code.
- EXPECT_EQ(2, 3);
-
- // When not in the throw-on-failure mode, the control will reach
- // here.
- return 0;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test.py
deleted file mode 100755
index 6ae57eeed..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Verifies that Google Test warns the user when not initialized properly."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import gtest_test_utils
-
-
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_')
-
-
-def Assert(condition):
- if not condition:
- raise AssertionError
-
-
-def AssertEq(expected, actual):
- if expected != actual:
- print 'Expected: %s' % (expected,)
- print ' Actual: %s' % (actual,)
- raise AssertionError
-
-
-def TestExitCodeAndOutput(command):
- """Runs the given command and verifies its exit code and output."""
-
- # Verifies that 'command' exits with code 1.
- p = gtest_test_utils.Subprocess(command)
- Assert(p.exited)
- AssertEq(1, p.exit_code)
- Assert('InitGoogleTest' in p.output)
-
-
-class GTestUninitializedTest(gtest_test_utils.TestCase):
- def testExitCodeAndOutput(self):
- TestExitCodeAndOutput(COMMAND)
-
-
-if __name__ == '__main__':
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test_.cc
deleted file mode 100644
index 44316987f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_uninitialized_test_.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gtest/gtest.h"
-
-TEST(DummyTest, Dummy) {
- // This test doesn't verify anything. We just need it to create a
- // realistic stage for testing the behavior of Google Test when
- // RUN_ALL_TESTS() is called without testing::InitGoogleTest() being
- // called first.
-}
-
-int main() {
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_unittest.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_unittest.cc
deleted file mode 100644
index 23d6860e1..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_unittest.cc
+++ /dev/null
@@ -1,7337 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Tests for Google Test itself. This verifies that the basic constructs of
-// Google Test work.
-
-#include "gtest/gtest.h"
-#include <vector>
-#include <ostream>
-
-// Verifies that the command line flag variables can be accessed
-// in code once <gtest/gtest.h> has been #included.
-// Do not move it after other #includes.
-TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
- bool dummy = testing::GTEST_FLAG(also_run_disabled_tests)
- || testing::GTEST_FLAG(break_on_failure)
- || testing::GTEST_FLAG(catch_exceptions)
- || testing::GTEST_FLAG(color) != "unknown"
- || testing::GTEST_FLAG(filter) != "unknown"
- || testing::GTEST_FLAG(list_tests)
- || testing::GTEST_FLAG(output) != "unknown"
- || testing::GTEST_FLAG(print_time)
- || testing::GTEST_FLAG(random_seed)
- || testing::GTEST_FLAG(repeat) > 0
- || testing::GTEST_FLAG(show_internal_stack_frames)
- || testing::GTEST_FLAG(shuffle)
- || testing::GTEST_FLAG(stack_trace_depth) > 0
- || testing::GTEST_FLAG(stream_result_to) != "unknown"
- || testing::GTEST_FLAG(throw_on_failure);
- EXPECT_TRUE(dummy || !dummy); // Suppresses warning that dummy is unused.
-}
-
-#include "gtest/gtest-spi.h"
-
-// Indicates that this translation unit is part of Google Test's
-// implementation. It must come before gtest-internal-inl.h is
-// included, or there will be a compiler error. This trick is to
-// prevent a user from accidentally including gtest-internal-inl.h in
-// his code.
-#define GTEST_IMPLEMENTATION_ 1
-#include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
-
-#include <limits.h> // For INT_MAX.
-#include <stdlib.h>
-#include <time.h>
-
-#include <map>
-
-namespace testing {
-namespace internal {
-
-// Provides access to otherwise private parts of the TestEventListeners class
-// that are needed to test it.
-class TestEventListenersAccessor {
- public:
- static TestEventListener* GetRepeater(TestEventListeners* listeners) {
- return listeners->repeater();
- }
-
- static void SetDefaultResultPrinter(TestEventListeners* listeners,
- TestEventListener* listener) {
- listeners->SetDefaultResultPrinter(listener);
- }
- static void SetDefaultXmlGenerator(TestEventListeners* listeners,
- TestEventListener* listener) {
- listeners->SetDefaultXmlGenerator(listener);
- }
-
- static bool EventForwardingEnabled(const TestEventListeners& listeners) {
- return listeners.EventForwardingEnabled();
- }
-
- static void SuppressEventForwarding(TestEventListeners* listeners) {
- listeners->SuppressEventForwarding();
- }
-};
-
-} // namespace internal
-} // namespace testing
-
-using testing::AssertionFailure;
-using testing::AssertionResult;
-using testing::AssertionSuccess;
-using testing::DoubleLE;
-using testing::EmptyTestEventListener;
-using testing::FloatLE;
-using testing::GTEST_FLAG(also_run_disabled_tests);
-using testing::GTEST_FLAG(break_on_failure);
-using testing::GTEST_FLAG(catch_exceptions);
-using testing::GTEST_FLAG(color);
-using testing::GTEST_FLAG(death_test_use_fork);
-using testing::GTEST_FLAG(filter);
-using testing::GTEST_FLAG(list_tests);
-using testing::GTEST_FLAG(output);
-using testing::GTEST_FLAG(print_time);
-using testing::GTEST_FLAG(random_seed);
-using testing::GTEST_FLAG(repeat);
-using testing::GTEST_FLAG(show_internal_stack_frames);
-using testing::GTEST_FLAG(shuffle);
-using testing::GTEST_FLAG(stack_trace_depth);
-using testing::GTEST_FLAG(stream_result_to);
-using testing::GTEST_FLAG(throw_on_failure);
-using testing::IsNotSubstring;
-using testing::IsSubstring;
-using testing::Message;
-using testing::ScopedFakeTestPartResultReporter;
-using testing::StaticAssertTypeEq;
-using testing::Test;
-using testing::TestCase;
-using testing::TestEventListeners;
-using testing::TestPartResult;
-using testing::TestPartResultArray;
-using testing::TestProperty;
-using testing::TestResult;
-using testing::UnitTest;
-using testing::kMaxStackTraceDepth;
-using testing::internal::AddReference;
-using testing::internal::AlwaysFalse;
-using testing::internal::AlwaysTrue;
-using testing::internal::AppendUserMessage;
-using testing::internal::ArrayAwareFind;
-using testing::internal::ArrayEq;
-using testing::internal::CodePointToUtf8;
-using testing::internal::CompileAssertTypesEqual;
-using testing::internal::CopyArray;
-using testing::internal::CountIf;
-using testing::internal::EqFailure;
-using testing::internal::FloatingPoint;
-using testing::internal::ForEach;
-using testing::internal::FormatTimeInMillisAsSeconds;
-using testing::internal::GTestFlagSaver;
-using testing::internal::GetCurrentOsStackTraceExceptTop;
-using testing::internal::GetElementOr;
-using testing::internal::GetNextRandomSeed;
-using testing::internal::GetRandomSeedFromFlag;
-using testing::internal::GetTestTypeId;
-using testing::internal::GetTypeId;
-using testing::internal::GetUnitTestImpl;
-using testing::internal::ImplicitlyConvertible;
-using testing::internal::Int32;
-using testing::internal::Int32FromEnvOrDie;
-using testing::internal::IsAProtocolMessage;
-using testing::internal::IsContainer;
-using testing::internal::IsContainerTest;
-using testing::internal::IsNotContainer;
-using testing::internal::NativeArray;
-using testing::internal::ParseInt32Flag;
-using testing::internal::RemoveConst;
-using testing::internal::RemoveReference;
-using testing::internal::ShouldRunTestOnShard;
-using testing::internal::ShouldShard;
-using testing::internal::ShouldUseColor;
-using testing::internal::Shuffle;
-using testing::internal::ShuffleRange;
-using testing::internal::SkipPrefix;
-using testing::internal::StreamableToString;
-using testing::internal::String;
-using testing::internal::TestEventListenersAccessor;
-using testing::internal::TestResultAccessor;
-using testing::internal::UInt32;
-using testing::internal::WideStringToUtf8;
-using testing::internal::kCopy;
-using testing::internal::kMaxRandomSeed;
-using testing::internal::kReference;
-using testing::internal::kTestTypeIdInGoogleTest;
-using testing::internal::scoped_ptr;
-
-#if GTEST_HAS_STREAM_REDIRECTION
-using testing::internal::CaptureStdout;
-using testing::internal::GetCapturedStdout;
-#endif
-
-#if GTEST_IS_THREADSAFE
-using testing::internal::ThreadWithParam;
-#endif
-
-class TestingVector : public std::vector<int> {
-};
-
-::std::ostream& operator<<(::std::ostream& os,
- const TestingVector& vector) {
- os << "{ ";
- for (size_t i = 0; i < vector.size(); i++) {
- os << vector[i] << " ";
- }
- os << "}";
- return os;
-}
-
-// This line tests that we can define tests in an unnamed namespace.
-namespace {
-
-TEST(GetRandomSeedFromFlagTest, HandlesZero) {
- const int seed = GetRandomSeedFromFlag(0);
- EXPECT_LE(1, seed);
- EXPECT_LE(seed, static_cast<int>(kMaxRandomSeed));
-}
-
-TEST(GetRandomSeedFromFlagTest, PreservesValidSeed) {
- EXPECT_EQ(1, GetRandomSeedFromFlag(1));
- EXPECT_EQ(2, GetRandomSeedFromFlag(2));
- EXPECT_EQ(kMaxRandomSeed - 1, GetRandomSeedFromFlag(kMaxRandomSeed - 1));
- EXPECT_EQ(static_cast<int>(kMaxRandomSeed),
- GetRandomSeedFromFlag(kMaxRandomSeed));
-}
-
-TEST(GetRandomSeedFromFlagTest, NormalizesInvalidSeed) {
- const int seed1 = GetRandomSeedFromFlag(-1);
- EXPECT_LE(1, seed1);
- EXPECT_LE(seed1, static_cast<int>(kMaxRandomSeed));
-
- const int seed2 = GetRandomSeedFromFlag(kMaxRandomSeed + 1);
- EXPECT_LE(1, seed2);
- EXPECT_LE(seed2, static_cast<int>(kMaxRandomSeed));
-}
-
-TEST(GetNextRandomSeedTest, WorksForValidInput) {
- EXPECT_EQ(2, GetNextRandomSeed(1));
- EXPECT_EQ(3, GetNextRandomSeed(2));
- EXPECT_EQ(static_cast<int>(kMaxRandomSeed),
- GetNextRandomSeed(kMaxRandomSeed - 1));
- EXPECT_EQ(1, GetNextRandomSeed(kMaxRandomSeed));
-
- // We deliberately don't test GetNextRandomSeed() with invalid
- // inputs, as that requires death tests, which are expensive. This
- // is fine as GetNextRandomSeed() is internal and has a
- // straightforward definition.
-}
-
-static void ClearCurrentTestPartResults() {
- TestResultAccessor::ClearTestPartResults(
- GetUnitTestImpl()->current_test_result());
-}
-
-// Tests GetTypeId.
-
-TEST(GetTypeIdTest, ReturnsSameValueForSameType) {
- EXPECT_EQ(GetTypeId<int>(), GetTypeId<int>());
- EXPECT_EQ(GetTypeId<Test>(), GetTypeId<Test>());
-}
-
-class SubClassOfTest : public Test {};
-class AnotherSubClassOfTest : public Test {};
-
-TEST(GetTypeIdTest, ReturnsDifferentValuesForDifferentTypes) {
- EXPECT_NE(GetTypeId<int>(), GetTypeId<const int>());
- EXPECT_NE(GetTypeId<int>(), GetTypeId<char>());
- EXPECT_NE(GetTypeId<int>(), GetTestTypeId());
- EXPECT_NE(GetTypeId<SubClassOfTest>(), GetTestTypeId());
- EXPECT_NE(GetTypeId<AnotherSubClassOfTest>(), GetTestTypeId());
- EXPECT_NE(GetTypeId<AnotherSubClassOfTest>(), GetTypeId<SubClassOfTest>());
-}
-
-// Verifies that GetTestTypeId() returns the same value, no matter it
-// is called from inside Google Test or outside of it.
-TEST(GetTestTypeIdTest, ReturnsTheSameValueInsideOrOutsideOfGoogleTest) {
- EXPECT_EQ(kTestTypeIdInGoogleTest, GetTestTypeId());
-}
-
-// Tests FormatTimeInMillisAsSeconds().
-
-TEST(FormatTimeInMillisAsSecondsTest, FormatsZero) {
- EXPECT_EQ("0", FormatTimeInMillisAsSeconds(0));
-}
-
-TEST(FormatTimeInMillisAsSecondsTest, FormatsPositiveNumber) {
- EXPECT_EQ("0.003", FormatTimeInMillisAsSeconds(3));
- EXPECT_EQ("0.01", FormatTimeInMillisAsSeconds(10));
- EXPECT_EQ("0.2", FormatTimeInMillisAsSeconds(200));
- EXPECT_EQ("1.2", FormatTimeInMillisAsSeconds(1200));
- EXPECT_EQ("3", FormatTimeInMillisAsSeconds(3000));
-}
-
-TEST(FormatTimeInMillisAsSecondsTest, FormatsNegativeNumber) {
- EXPECT_EQ("-0.003", FormatTimeInMillisAsSeconds(-3));
- EXPECT_EQ("-0.01", FormatTimeInMillisAsSeconds(-10));
- EXPECT_EQ("-0.2", FormatTimeInMillisAsSeconds(-200));
- EXPECT_EQ("-1.2", FormatTimeInMillisAsSeconds(-1200));
- EXPECT_EQ("-3", FormatTimeInMillisAsSeconds(-3000));
-}
-
-#if GTEST_CAN_COMPARE_NULL
-
-# ifdef __BORLANDC__
-// Silences warnings: "Condition is always true", "Unreachable code"
-# pragma option push -w-ccc -w-rch
-# endif
-
-// Tests that GTEST_IS_NULL_LITERAL_(x) is true when x is a null
-// pointer literal.
-TEST(NullLiteralTest, IsTrueForNullLiterals) {
- EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(NULL));
- EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0));
- EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0U));
- EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0L));
-
-# ifndef __BORLANDC__
-
- // Some compilers may fail to detect some null pointer literals;
- // as long as users of the framework don't use such literals, this
- // is harmless.
- EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(1 - 1));
-
-# endif
-}
-
-// Tests that GTEST_IS_NULL_LITERAL_(x) is false when x is not a null
-// pointer literal.
-TEST(NullLiteralTest, IsFalseForNonNullLiterals) {
- EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(1));
- EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(0.0));
- EXPECT_FALSE(GTEST_IS_NULL_LITERAL_('a'));
- EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(static_cast<void*>(NULL)));
-}
-
-# ifdef __BORLANDC__
-// Restores warnings after previous "#pragma option push" suppressed them.
-# pragma option pop
-# endif
-
-#endif // GTEST_CAN_COMPARE_NULL
-//
-// Tests CodePointToUtf8().
-
-// Tests that the NUL character L'\0' is encoded correctly.
-TEST(CodePointToUtf8Test, CanEncodeNul) {
- char buffer[32];
- EXPECT_STREQ("", CodePointToUtf8(L'\0', buffer));
-}
-
-// Tests that ASCII characters are encoded correctly.
-TEST(CodePointToUtf8Test, CanEncodeAscii) {
- char buffer[32];
- EXPECT_STREQ("a", CodePointToUtf8(L'a', buffer));
- EXPECT_STREQ("Z", CodePointToUtf8(L'Z', buffer));
- EXPECT_STREQ("&", CodePointToUtf8(L'&', buffer));
- EXPECT_STREQ("\x7F", CodePointToUtf8(L'\x7F', buffer));
-}
-
-// Tests that Unicode code-points that have 8 to 11 bits are encoded
-// as 110xxxxx 10xxxxxx.
-TEST(CodePointToUtf8Test, CanEncode8To11Bits) {
- char buffer[32];
- // 000 1101 0011 => 110-00011 10-010011
- EXPECT_STREQ("\xC3\x93", CodePointToUtf8(L'\xD3', buffer));
-
- // 101 0111 0110 => 110-10101 10-110110
- // Some compilers (e.g., GCC on MinGW) cannot handle non-ASCII codepoints
- // in wide strings and wide chars. In order to accomodate them, we have to
- // introduce such character constants as integers.
- EXPECT_STREQ("\xD5\xB6",
- CodePointToUtf8(static_cast<wchar_t>(0x576), buffer));
-}
-
-// Tests that Unicode code-points that have 12 to 16 bits are encoded
-// as 1110xxxx 10xxxxxx 10xxxxxx.
-TEST(CodePointToUtf8Test, CanEncode12To16Bits) {
- char buffer[32];
- // 0000 1000 1101 0011 => 1110-0000 10-100011 10-010011
- EXPECT_STREQ("\xE0\xA3\x93",
- CodePointToUtf8(static_cast<wchar_t>(0x8D3), buffer));
-
- // 1100 0111 0100 1101 => 1110-1100 10-011101 10-001101
- EXPECT_STREQ("\xEC\x9D\x8D",
- CodePointToUtf8(static_cast<wchar_t>(0xC74D), buffer));
-}
-
-#if !GTEST_WIDE_STRING_USES_UTF16_
-// Tests in this group require a wchar_t to hold > 16 bits, and thus
-// are skipped on Windows, Cygwin, and Symbian, where a wchar_t is
-// 16-bit wide. This code may not compile on those systems.
-
-// Tests that Unicode code-points that have 17 to 21 bits are encoded
-// as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx.
-TEST(CodePointToUtf8Test, CanEncode17To21Bits) {
- char buffer[32];
- // 0 0001 0000 1000 1101 0011 => 11110-000 10-010000 10-100011 10-010011
- EXPECT_STREQ("\xF0\x90\xA3\x93", CodePointToUtf8(L'\x108D3', buffer));
-
- // 0 0001 0000 0100 0000 0000 => 11110-000 10-010000 10-010000 10-000000
- EXPECT_STREQ("\xF0\x90\x90\x80", CodePointToUtf8(L'\x10400', buffer));
-
- // 1 0000 1000 0110 0011 0100 => 11110-100 10-001000 10-011000 10-110100
- EXPECT_STREQ("\xF4\x88\x98\xB4", CodePointToUtf8(L'\x108634', buffer));
-}
-
-// Tests that encoding an invalid code-point generates the expected result.
-TEST(CodePointToUtf8Test, CanEncodeInvalidCodePoint) {
- char buffer[32];
- EXPECT_STREQ("(Invalid Unicode 0x1234ABCD)",
- CodePointToUtf8(L'\x1234ABCD', buffer));
-}
-
-#endif // !GTEST_WIDE_STRING_USES_UTF16_
-
-// Tests WideStringToUtf8().
-
-// Tests that the NUL character L'\0' is encoded correctly.
-TEST(WideStringToUtf8Test, CanEncodeNul) {
- EXPECT_STREQ("", WideStringToUtf8(L"", 0).c_str());
- EXPECT_STREQ("", WideStringToUtf8(L"", -1).c_str());
-}
-
-// Tests that ASCII strings are encoded correctly.
-TEST(WideStringToUtf8Test, CanEncodeAscii) {
- EXPECT_STREQ("a", WideStringToUtf8(L"a", 1).c_str());
- EXPECT_STREQ("ab", WideStringToUtf8(L"ab", 2).c_str());
- EXPECT_STREQ("a", WideStringToUtf8(L"a", -1).c_str());
- EXPECT_STREQ("ab", WideStringToUtf8(L"ab", -1).c_str());
-}
-
-// Tests that Unicode code-points that have 8 to 11 bits are encoded
-// as 110xxxxx 10xxxxxx.
-TEST(WideStringToUtf8Test, CanEncode8To11Bits) {
- // 000 1101 0011 => 110-00011 10-010011
- EXPECT_STREQ("\xC3\x93", WideStringToUtf8(L"\xD3", 1).c_str());
- EXPECT_STREQ("\xC3\x93", WideStringToUtf8(L"\xD3", -1).c_str());
-
- // 101 0111 0110 => 110-10101 10-110110
- const wchar_t s[] = { 0x576, '\0' };
- EXPECT_STREQ("\xD5\xB6", WideStringToUtf8(s, 1).c_str());
- EXPECT_STREQ("\xD5\xB6", WideStringToUtf8(s, -1).c_str());
-}
-
-// Tests that Unicode code-points that have 12 to 16 bits are encoded
-// as 1110xxxx 10xxxxxx 10xxxxxx.
-TEST(WideStringToUtf8Test, CanEncode12To16Bits) {
- // 0000 1000 1101 0011 => 1110-0000 10-100011 10-010011
- const wchar_t s1[] = { 0x8D3, '\0' };
- EXPECT_STREQ("\xE0\xA3\x93", WideStringToUtf8(s1, 1).c_str());
- EXPECT_STREQ("\xE0\xA3\x93", WideStringToUtf8(s1, -1).c_str());
-
- // 1100 0111 0100 1101 => 1110-1100 10-011101 10-001101
- const wchar_t s2[] = { 0xC74D, '\0' };
- EXPECT_STREQ("\xEC\x9D\x8D", WideStringToUtf8(s2, 1).c_str());
- EXPECT_STREQ("\xEC\x9D\x8D", WideStringToUtf8(s2, -1).c_str());
-}
-
-// Tests that the conversion stops when the function encounters \0 character.
-TEST(WideStringToUtf8Test, StopsOnNulCharacter) {
- EXPECT_STREQ("ABC", WideStringToUtf8(L"ABC\0XYZ", 100).c_str());
-}
-
-// Tests that the conversion stops when the function reaches the limit
-// specified by the 'length' parameter.
-TEST(WideStringToUtf8Test, StopsWhenLengthLimitReached) {
- EXPECT_STREQ("ABC", WideStringToUtf8(L"ABCDEF", 3).c_str());
-}
-
-#if !GTEST_WIDE_STRING_USES_UTF16_
-// Tests that Unicode code-points that have 17 to 21 bits are encoded
-// as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx. This code may not compile
-// on the systems using UTF-16 encoding.
-TEST(WideStringToUtf8Test, CanEncode17To21Bits) {
- // 0 0001 0000 1000 1101 0011 => 11110-000 10-010000 10-100011 10-010011
- EXPECT_STREQ("\xF0\x90\xA3\x93", WideStringToUtf8(L"\x108D3", 1).c_str());
- EXPECT_STREQ("\xF0\x90\xA3\x93", WideStringToUtf8(L"\x108D3", -1).c_str());
-
- // 1 0000 1000 0110 0011 0100 => 11110-100 10-001000 10-011000 10-110100
- EXPECT_STREQ("\xF4\x88\x98\xB4", WideStringToUtf8(L"\x108634", 1).c_str());
- EXPECT_STREQ("\xF4\x88\x98\xB4", WideStringToUtf8(L"\x108634", -1).c_str());
-}
-
-// Tests that encoding an invalid code-point generates the expected result.
-TEST(WideStringToUtf8Test, CanEncodeInvalidCodePoint) {
- EXPECT_STREQ("(Invalid Unicode 0xABCDFF)",
- WideStringToUtf8(L"\xABCDFF", -1).c_str());
-}
-#else // !GTEST_WIDE_STRING_USES_UTF16_
-// Tests that surrogate pairs are encoded correctly on the systems using
-// UTF-16 encoding in the wide strings.
-TEST(WideStringToUtf8Test, CanEncodeValidUtf16SUrrogatePairs) {
- const wchar_t s[] = { 0xD801, 0xDC00, '\0' };
- EXPECT_STREQ("\xF0\x90\x90\x80", WideStringToUtf8(s, -1).c_str());
-}
-
-// Tests that encoding an invalid UTF-16 surrogate pair
-// generates the expected result.
-TEST(WideStringToUtf8Test, CanEncodeInvalidUtf16SurrogatePair) {
- // Leading surrogate is at the end of the string.
- const wchar_t s1[] = { 0xD800, '\0' };
- EXPECT_STREQ("\xED\xA0\x80", WideStringToUtf8(s1, -1).c_str());
- // Leading surrogate is not followed by the trailing surrogate.
- const wchar_t s2[] = { 0xD800, 'M', '\0' };
- EXPECT_STREQ("\xED\xA0\x80M", WideStringToUtf8(s2, -1).c_str());
- // Trailing surrogate appearas without a leading surrogate.
- const wchar_t s3[] = { 0xDC00, 'P', 'Q', 'R', '\0' };
- EXPECT_STREQ("\xED\xB0\x80PQR", WideStringToUtf8(s3, -1).c_str());
-}
-#endif // !GTEST_WIDE_STRING_USES_UTF16_
-
-// Tests that codepoint concatenation works correctly.
-#if !GTEST_WIDE_STRING_USES_UTF16_
-TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) {
- const wchar_t s[] = { 0x108634, 0xC74D, '\n', 0x576, 0x8D3, 0x108634, '\0'};
- EXPECT_STREQ(
- "\xF4\x88\x98\xB4"
- "\xEC\x9D\x8D"
- "\n"
- "\xD5\xB6"
- "\xE0\xA3\x93"
- "\xF4\x88\x98\xB4",
- WideStringToUtf8(s, -1).c_str());
-}
-#else
-TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) {
- const wchar_t s[] = { 0xC74D, '\n', 0x576, 0x8D3, '\0'};
- EXPECT_STREQ(
- "\xEC\x9D\x8D" "\n" "\xD5\xB6" "\xE0\xA3\x93",
- WideStringToUtf8(s, -1).c_str());
-}
-#endif // !GTEST_WIDE_STRING_USES_UTF16_
-
-// Tests the Random class.
-
-TEST(RandomDeathTest, GeneratesCrashesOnInvalidRange) {
- testing::internal::Random random(42);
- EXPECT_DEATH_IF_SUPPORTED(
- random.Generate(0),
- "Cannot generate a number in the range \\[0, 0\\)");
- EXPECT_DEATH_IF_SUPPORTED(
- random.Generate(testing::internal::Random::kMaxRange + 1),
- "Generation of a number in \\[0, 2147483649\\) was requested, "
- "but this can only generate numbers in \\[0, 2147483648\\)");
-}
-
-TEST(RandomTest, GeneratesNumbersWithinRange) {
- const UInt32 kRange = 10000;
- testing::internal::Random random(12345);
- for (int i = 0; i < 10; i++) {
- EXPECT_LT(random.Generate(kRange), kRange) << " for iteration " << i;
- }
-
- testing::internal::Random random2(testing::internal::Random::kMaxRange);
- for (int i = 0; i < 10; i++) {
- EXPECT_LT(random2.Generate(kRange), kRange) << " for iteration " << i;
- }
-}
-
-TEST(RandomTest, RepeatsWhenReseeded) {
- const int kSeed = 123;
- const int kArraySize = 10;
- const UInt32 kRange = 10000;
- UInt32 values[kArraySize];
-
- testing::internal::Random random(kSeed);
- for (int i = 0; i < kArraySize; i++) {
- values[i] = random.Generate(kRange);
- }
-
- random.Reseed(kSeed);
- for (int i = 0; i < kArraySize; i++) {
- EXPECT_EQ(values[i], random.Generate(kRange)) << " for iteration " << i;
- }
-}
-
-// Tests STL container utilities.
-
-// Tests CountIf().
-
-static bool IsPositive(int n) { return n > 0; }
-
-TEST(ContainerUtilityTest, CountIf) {
- std::vector<int> v;
- EXPECT_EQ(0, CountIf(v, IsPositive)); // Works for an empty container.
-
- v.push_back(-1);
- v.push_back(0);
- EXPECT_EQ(0, CountIf(v, IsPositive)); // Works when no value satisfies.
-
- v.push_back(2);
- v.push_back(-10);
- v.push_back(10);
- EXPECT_EQ(2, CountIf(v, IsPositive));
-}
-
-// Tests ForEach().
-
-static int g_sum = 0;
-static void Accumulate(int n) { g_sum += n; }
-
-TEST(ContainerUtilityTest, ForEach) {
- std::vector<int> v;
- g_sum = 0;
- ForEach(v, Accumulate);
- EXPECT_EQ(0, g_sum); // Works for an empty container;
-
- g_sum = 0;
- v.push_back(1);
- ForEach(v, Accumulate);
- EXPECT_EQ(1, g_sum); // Works for a container with one element.
-
- g_sum = 0;
- v.push_back(20);
- v.push_back(300);
- ForEach(v, Accumulate);
- EXPECT_EQ(321, g_sum);
-}
-
-// Tests GetElementOr().
-TEST(ContainerUtilityTest, GetElementOr) {
- std::vector<char> a;
- EXPECT_EQ('x', GetElementOr(a, 0, 'x'));
-
- a.push_back('a');
- a.push_back('b');
- EXPECT_EQ('a', GetElementOr(a, 0, 'x'));
- EXPECT_EQ('b', GetElementOr(a, 1, 'x'));
- EXPECT_EQ('x', GetElementOr(a, -2, 'x'));
- EXPECT_EQ('x', GetElementOr(a, 2, 'x'));
-}
-
-TEST(ContainerUtilityDeathTest, ShuffleRange) {
- std::vector<int> a;
- a.push_back(0);
- a.push_back(1);
- a.push_back(2);
- testing::internal::Random random(1);
-
- EXPECT_DEATH_IF_SUPPORTED(
- ShuffleRange(&random, -1, 1, &a),
- "Invalid shuffle range start -1: must be in range \\[0, 3\\]");
- EXPECT_DEATH_IF_SUPPORTED(
- ShuffleRange(&random, 4, 4, &a),
- "Invalid shuffle range start 4: must be in range \\[0, 3\\]");
- EXPECT_DEATH_IF_SUPPORTED(
- ShuffleRange(&random, 3, 2, &a),
- "Invalid shuffle range finish 2: must be in range \\[3, 3\\]");
- EXPECT_DEATH_IF_SUPPORTED(
- ShuffleRange(&random, 3, 4, &a),
- "Invalid shuffle range finish 4: must be in range \\[3, 3\\]");
-}
-
-class VectorShuffleTest : public Test {
- protected:
- static const int kVectorSize = 20;
-
- VectorShuffleTest() : random_(1) {
- for (int i = 0; i < kVectorSize; i++) {
- vector_.push_back(i);
- }
- }
-
- static bool VectorIsCorrupt(const TestingVector& vector) {
- if (kVectorSize != static_cast<int>(vector.size())) {
- return true;
- }
-
- bool found_in_vector[kVectorSize] = { false };
- for (size_t i = 0; i < vector.size(); i++) {
- const int e = vector[i];
- if (e < 0 || e >= kVectorSize || found_in_vector[e]) {
- return true;
- }
- found_in_vector[e] = true;
- }
-
- // Vector size is correct, elements' range is correct, no
- // duplicate elements. Therefore no corruption has occurred.
- return false;
- }
-
- static bool VectorIsNotCorrupt(const TestingVector& vector) {
- return !VectorIsCorrupt(vector);
- }
-
- static bool RangeIsShuffled(const TestingVector& vector, int begin, int end) {
- for (int i = begin; i < end; i++) {
- if (i != vector[i]) {
- return true;
- }
- }
- return false;
- }
-
- static bool RangeIsUnshuffled(
- const TestingVector& vector, int begin, int end) {
- return !RangeIsShuffled(vector, begin, end);
- }
-
- static bool VectorIsShuffled(const TestingVector& vector) {
- return RangeIsShuffled(vector, 0, static_cast<int>(vector.size()));
- }
-
- static bool VectorIsUnshuffled(const TestingVector& vector) {
- return !VectorIsShuffled(vector);
- }
-
- testing::internal::Random random_;
- TestingVector vector_;
-}; // class VectorShuffleTest
-
-const int VectorShuffleTest::kVectorSize;
-
-TEST_F(VectorShuffleTest, HandlesEmptyRange) {
- // Tests an empty range at the beginning...
- ShuffleRange(&random_, 0, 0, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-
- // ...in the middle...
- ShuffleRange(&random_, kVectorSize/2, kVectorSize/2, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-
- // ...at the end...
- ShuffleRange(&random_, kVectorSize - 1, kVectorSize - 1, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-
- // ...and past the end.
- ShuffleRange(&random_, kVectorSize, kVectorSize, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-}
-
-TEST_F(VectorShuffleTest, HandlesRangeOfSizeOne) {
- // Tests a size one range at the beginning...
- ShuffleRange(&random_, 0, 1, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-
- // ...in the middle...
- ShuffleRange(&random_, kVectorSize/2, kVectorSize/2 + 1, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-
- // ...and at the end.
- ShuffleRange(&random_, kVectorSize - 1, kVectorSize, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsUnshuffled, vector_);
-}
-
-// Because we use our own random number generator and a fixed seed,
-// we can guarantee that the following "random" tests will succeed.
-
-TEST_F(VectorShuffleTest, ShufflesEntireVector) {
- Shuffle(&random_, &vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- EXPECT_FALSE(VectorIsUnshuffled(vector_)) << vector_;
-
- // Tests the first and last elements in particular to ensure that
- // there are no off-by-one problems in our shuffle algorithm.
- EXPECT_NE(0, vector_[0]);
- EXPECT_NE(kVectorSize - 1, vector_[kVectorSize - 1]);
-}
-
-TEST_F(VectorShuffleTest, ShufflesStartOfVector) {
- const int kRangeSize = kVectorSize/2;
-
- ShuffleRange(&random_, 0, kRangeSize, &vector_);
-
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- EXPECT_PRED3(RangeIsShuffled, vector_, 0, kRangeSize);
- EXPECT_PRED3(RangeIsUnshuffled, vector_, kRangeSize, kVectorSize);
-}
-
-TEST_F(VectorShuffleTest, ShufflesEndOfVector) {
- const int kRangeSize = kVectorSize / 2;
- ShuffleRange(&random_, kRangeSize, kVectorSize, &vector_);
-
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- EXPECT_PRED3(RangeIsUnshuffled, vector_, 0, kRangeSize);
- EXPECT_PRED3(RangeIsShuffled, vector_, kRangeSize, kVectorSize);
-}
-
-TEST_F(VectorShuffleTest, ShufflesMiddleOfVector) {
- int kRangeSize = kVectorSize/3;
- ShuffleRange(&random_, kRangeSize, 2*kRangeSize, &vector_);
-
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- EXPECT_PRED3(RangeIsUnshuffled, vector_, 0, kRangeSize);
- EXPECT_PRED3(RangeIsShuffled, vector_, kRangeSize, 2*kRangeSize);
- EXPECT_PRED3(RangeIsUnshuffled, vector_, 2*kRangeSize, kVectorSize);
-}
-
-TEST_F(VectorShuffleTest, ShufflesRepeatably) {
- TestingVector vector2;
- for (int i = 0; i < kVectorSize; i++) {
- vector2.push_back(i);
- }
-
- random_.Reseed(1234);
- Shuffle(&random_, &vector_);
- random_.Reseed(1234);
- Shuffle(&random_, &vector2);
-
- ASSERT_PRED1(VectorIsNotCorrupt, vector_);
- ASSERT_PRED1(VectorIsNotCorrupt, vector2);
-
- for (int i = 0; i < kVectorSize; i++) {
- EXPECT_EQ(vector_[i], vector2[i]) << " where i is " << i;
- }
-}
-
-// Tests the size of the AssertHelper class.
-
-TEST(AssertHelperTest, AssertHelperIsSmall) {
- // To avoid breaking clients that use lots of assertions in one
- // function, we cannot grow the size of AssertHelper.
- EXPECT_LE(sizeof(testing::internal::AssertHelper), sizeof(void*));
-}
-
-// Tests the String class.
-
-// Tests String's constructors.
-TEST(StringTest, Constructors) {
- // Default ctor.
- String s1;
- // We aren't using EXPECT_EQ(NULL, s1.c_str()) because comparing
- // pointers with NULL isn't supported on all platforms.
- EXPECT_EQ(0U, s1.length());
- EXPECT_TRUE(NULL == s1.c_str());
-
- // Implicitly constructs from a C-string.
- String s2 = "Hi";
- EXPECT_EQ(2U, s2.length());
- EXPECT_STREQ("Hi", s2.c_str());
-
- // Constructs from a C-string and a length.
- String s3("hello", 3);
- EXPECT_EQ(3U, s3.length());
- EXPECT_STREQ("hel", s3.c_str());
-
- // The empty String should be created when String is constructed with
- // a NULL pointer and length 0.
- EXPECT_EQ(0U, String(NULL, 0).length());
- EXPECT_FALSE(String(NULL, 0).c_str() == NULL);
-
- // Constructs a String that contains '\0'.
- String s4("a\0bcd", 4);
- EXPECT_EQ(4U, s4.length());
- EXPECT_EQ('a', s4.c_str()[0]);
- EXPECT_EQ('\0', s4.c_str()[1]);
- EXPECT_EQ('b', s4.c_str()[2]);
- EXPECT_EQ('c', s4.c_str()[3]);
-
- // Copy ctor where the source is NULL.
- const String null_str;
- String s5 = null_str;
- EXPECT_TRUE(s5.c_str() == NULL);
-
- // Copy ctor where the source isn't NULL.
- String s6 = s3;
- EXPECT_EQ(3U, s6.length());
- EXPECT_STREQ("hel", s6.c_str());
-
- // Copy ctor where the source contains '\0'.
- String s7 = s4;
- EXPECT_EQ(4U, s7.length());
- EXPECT_EQ('a', s7.c_str()[0]);
- EXPECT_EQ('\0', s7.c_str()[1]);
- EXPECT_EQ('b', s7.c_str()[2]);
- EXPECT_EQ('c', s7.c_str()[3]);
-}
-
-TEST(StringTest, ConvertsFromStdString) {
- // An empty std::string.
- const std::string src1("");
- const String dest1 = src1;
- EXPECT_EQ(0U, dest1.length());
- EXPECT_STREQ("", dest1.c_str());
-
- // A normal std::string.
- const std::string src2("Hi");
- const String dest2 = src2;
- EXPECT_EQ(2U, dest2.length());
- EXPECT_STREQ("Hi", dest2.c_str());
-
- // An std::string with an embedded NUL character.
- const char src3[] = "a\0b";
- const String dest3 = std::string(src3, sizeof(src3));
- EXPECT_EQ(sizeof(src3), dest3.length());
- EXPECT_EQ('a', dest3.c_str()[0]);
- EXPECT_EQ('\0', dest3.c_str()[1]);
- EXPECT_EQ('b', dest3.c_str()[2]);
-}
-
-TEST(StringTest, ConvertsToStdString) {
- // An empty String.
- const String src1("");
- const std::string dest1 = src1;
- EXPECT_EQ("", dest1);
-
- // A normal String.
- const String src2("Hi");
- const std::string dest2 = src2;
- EXPECT_EQ("Hi", dest2);
-
- // A String containing a '\0'.
- const String src3("x\0y", 3);
- const std::string dest3 = src3;
- EXPECT_EQ(std::string("x\0y", 3), dest3);
-}
-
-#if GTEST_HAS_GLOBAL_STRING
-
-TEST(StringTest, ConvertsFromGlobalString) {
- // An empty ::string.
- const ::string src1("");
- const String dest1 = src1;
- EXPECT_EQ(0U, dest1.length());
- EXPECT_STREQ("", dest1.c_str());
-
- // A normal ::string.
- const ::string src2("Hi");
- const String dest2 = src2;
- EXPECT_EQ(2U, dest2.length());
- EXPECT_STREQ("Hi", dest2.c_str());
-
- // An ::string with an embedded NUL character.
- const char src3[] = "x\0y";
- const String dest3 = ::string(src3, sizeof(src3));
- EXPECT_EQ(sizeof(src3), dest3.length());
- EXPECT_EQ('x', dest3.c_str()[0]);
- EXPECT_EQ('\0', dest3.c_str()[1]);
- EXPECT_EQ('y', dest3.c_str()[2]);
-}
-
-TEST(StringTest, ConvertsToGlobalString) {
- // An empty String.
- const String src1("");
- const ::string dest1 = src1;
- EXPECT_EQ("", dest1);
-
- // A normal String.
- const String src2("Hi");
- const ::string dest2 = src2;
- EXPECT_EQ("Hi", dest2);
-
- const String src3("x\0y", 3);
- const ::string dest3 = src3;
- EXPECT_EQ(::string("x\0y", 3), dest3);
-}
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
-// Tests String::ShowCStringQuoted().
-TEST(StringTest, ShowCStringQuoted) {
- EXPECT_STREQ("(null)",
- String::ShowCStringQuoted(NULL).c_str());
- EXPECT_STREQ("\"\"",
- String::ShowCStringQuoted("").c_str());
- EXPECT_STREQ("\"foo\"",
- String::ShowCStringQuoted("foo").c_str());
-}
-
-// Tests String::empty().
-TEST(StringTest, Empty) {
- EXPECT_TRUE(String("").empty());
- EXPECT_FALSE(String().empty());
- EXPECT_FALSE(String(NULL).empty());
- EXPECT_FALSE(String("a").empty());
- EXPECT_FALSE(String("\0", 1).empty());
-}
-
-// Tests String::Compare().
-TEST(StringTest, Compare) {
- // NULL vs NULL.
- EXPECT_EQ(0, String().Compare(String()));
-
- // NULL vs non-NULL.
- EXPECT_EQ(-1, String().Compare(String("")));
-
- // Non-NULL vs NULL.
- EXPECT_EQ(1, String("").Compare(String()));
-
- // The following covers non-NULL vs non-NULL.
-
- // "" vs "".
- EXPECT_EQ(0, String("").Compare(String("")));
-
- // "" vs non-"".
- EXPECT_EQ(-1, String("").Compare(String("\0", 1)));
- EXPECT_EQ(-1, String("").Compare(" "));
-
- // Non-"" vs "".
- EXPECT_EQ(1, String("a").Compare(String("")));
-
- // The following covers non-"" vs non-"".
-
- // Same length and equal.
- EXPECT_EQ(0, String("a").Compare(String("a")));
-
- // Same length and different.
- EXPECT_EQ(-1, String("a\0b", 3).Compare(String("a\0c", 3)));
- EXPECT_EQ(1, String("b").Compare(String("a")));
-
- // Different lengths.
- EXPECT_EQ(-1, String("a").Compare(String("ab")));
- EXPECT_EQ(-1, String("a").Compare(String("a\0", 2)));
- EXPECT_EQ(1, String("abc").Compare(String("aacd")));
-}
-
-// Tests String::operator==().
-TEST(StringTest, Equals) {
- const String null(NULL);
- EXPECT_TRUE(null == NULL); // NOLINT
- EXPECT_FALSE(null == ""); // NOLINT
- EXPECT_FALSE(null == "bar"); // NOLINT
-
- const String empty("");
- EXPECT_FALSE(empty == NULL); // NOLINT
- EXPECT_TRUE(empty == ""); // NOLINT
- EXPECT_FALSE(empty == "bar"); // NOLINT
-
- const String foo("foo");
- EXPECT_FALSE(foo == NULL); // NOLINT
- EXPECT_FALSE(foo == ""); // NOLINT
- EXPECT_FALSE(foo == "bar"); // NOLINT
- EXPECT_TRUE(foo == "foo"); // NOLINT
-
- const String bar("x\0y", 3);
- EXPECT_FALSE(bar == "x");
-}
-
-// Tests String::operator!=().
-TEST(StringTest, NotEquals) {
- const String null(NULL);
- EXPECT_FALSE(null != NULL); // NOLINT
- EXPECT_TRUE(null != ""); // NOLINT
- EXPECT_TRUE(null != "bar"); // NOLINT
-
- const String empty("");
- EXPECT_TRUE(empty != NULL); // NOLINT
- EXPECT_FALSE(empty != ""); // NOLINT
- EXPECT_TRUE(empty != "bar"); // NOLINT
-
- const String foo("foo");
- EXPECT_TRUE(foo != NULL); // NOLINT
- EXPECT_TRUE(foo != ""); // NOLINT
- EXPECT_TRUE(foo != "bar"); // NOLINT
- EXPECT_FALSE(foo != "foo"); // NOLINT
-
- const String bar("x\0y", 3);
- EXPECT_TRUE(bar != "x");
-}
-
-// Tests String::length().
-TEST(StringTest, Length) {
- EXPECT_EQ(0U, String().length());
- EXPECT_EQ(0U, String("").length());
- EXPECT_EQ(2U, String("ab").length());
- EXPECT_EQ(3U, String("a\0b", 3).length());
-}
-
-// Tests String::EndsWith().
-TEST(StringTest, EndsWith) {
- EXPECT_TRUE(String("foobar").EndsWith("bar"));
- EXPECT_TRUE(String("foobar").EndsWith(""));
- EXPECT_TRUE(String("").EndsWith(""));
-
- EXPECT_FALSE(String("foobar").EndsWith("foo"));
- EXPECT_FALSE(String("").EndsWith("foo"));
-}
-
-// Tests String::EndsWithCaseInsensitive().
-TEST(StringTest, EndsWithCaseInsensitive) {
- EXPECT_TRUE(String("foobar").EndsWithCaseInsensitive("BAR"));
- EXPECT_TRUE(String("foobaR").EndsWithCaseInsensitive("bar"));
- EXPECT_TRUE(String("foobar").EndsWithCaseInsensitive(""));
- EXPECT_TRUE(String("").EndsWithCaseInsensitive(""));
-
- EXPECT_FALSE(String("Foobar").EndsWithCaseInsensitive("foo"));
- EXPECT_FALSE(String("foobar").EndsWithCaseInsensitive("Foo"));
- EXPECT_FALSE(String("").EndsWithCaseInsensitive("foo"));
-}
-
-// C++Builder's preprocessor is buggy; it fails to expand macros that
-// appear in macro parameters after wide char literals. Provide an alias
-// for NULL as a workaround.
-static const wchar_t* const kNull = NULL;
-
-// Tests String::CaseInsensitiveWideCStringEquals
-TEST(StringTest, CaseInsensitiveWideCStringEquals) {
- EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(NULL, NULL));
- EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(kNull, L""));
- EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(L"", kNull));
- EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(kNull, L"foobar"));
- EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(L"foobar", kNull));
- EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"foobar", L"foobar"));
- EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"foobar", L"FOOBAR"));
- EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"FOOBAR", L"foobar"));
-}
-
-// Tests that NULL can be assigned to a String.
-TEST(StringTest, CanBeAssignedNULL) {
- const String src(NULL);
- String dest;
-
- dest = src;
- EXPECT_STREQ(NULL, dest.c_str());
-}
-
-// Tests that the empty string "" can be assigned to a String.
-TEST(StringTest, CanBeAssignedEmpty) {
- const String src("");
- String dest;
-
- dest = src;
- EXPECT_STREQ("", dest.c_str());
-}
-
-// Tests that a non-empty string can be assigned to a String.
-TEST(StringTest, CanBeAssignedNonEmpty) {
- const String src("hello");
- String dest;
- dest = src;
- EXPECT_EQ(5U, dest.length());
- EXPECT_STREQ("hello", dest.c_str());
-
- const String src2("x\0y", 3);
- String dest2;
- dest2 = src2;
- EXPECT_EQ(3U, dest2.length());
- EXPECT_EQ('x', dest2.c_str()[0]);
- EXPECT_EQ('\0', dest2.c_str()[1]);
- EXPECT_EQ('y', dest2.c_str()[2]);
-}
-
-// Tests that a String can be assigned to itself.
-TEST(StringTest, CanBeAssignedSelf) {
- String dest("hello");
-
- // Use explicit function call notation here to suppress self-assign warning.
- dest.operator=(dest);
- EXPECT_STREQ("hello", dest.c_str());
-}
-
-// Sun Studio < 12 incorrectly rejects this code due to an overloading
-// ambiguity.
-#if !(defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
-// Tests streaming a String.
-TEST(StringTest, Streams) {
- EXPECT_EQ(StreamableToString(String()), "(null)");
- EXPECT_EQ(StreamableToString(String("")), "");
- EXPECT_EQ(StreamableToString(String("a\0b", 3)), "a\\0b");
-}
-#endif
-
-// Tests that String::Format() works.
-TEST(StringTest, FormatWorks) {
- // Normal case: the format spec is valid, the arguments match the
- // spec, and the result is < 4095 characters.
- EXPECT_STREQ("Hello, 42", String::Format("%s, %d", "Hello", 42).c_str());
-
- // Edge case: the result is 4095 characters.
- char buffer[4096];
- const size_t kSize = sizeof(buffer);
- memset(buffer, 'a', kSize - 1);
- buffer[kSize - 1] = '\0';
- EXPECT_STREQ(buffer, String::Format("%s", buffer).c_str());
-
- // The result needs to be 4096 characters, exceeding Format()'s limit.
- EXPECT_STREQ("<formatting error or buffer exceeded>",
- String::Format("x%s", buffer).c_str());
-
-#if GTEST_OS_LINUX
- // On Linux, invalid format spec should lead to an error message.
- // In other environment (e.g. MSVC on Windows), String::Format() may
- // simply ignore a bad format spec, so this assertion is run on
- // Linux only.
- EXPECT_STREQ("<formatting error or buffer exceeded>",
- String::Format("%").c_str());
-#endif
-}
-
-#if GTEST_OS_WINDOWS
-
-// Tests String::ShowWideCString().
-TEST(StringTest, ShowWideCString) {
- EXPECT_STREQ("(null)",
- String::ShowWideCString(NULL).c_str());
- EXPECT_STREQ("", String::ShowWideCString(L"").c_str());
- EXPECT_STREQ("foo", String::ShowWideCString(L"foo").c_str());
-}
-
-// Tests String::ShowWideCStringQuoted().
-TEST(StringTest, ShowWideCStringQuoted) {
- EXPECT_STREQ("(null)",
- String::ShowWideCStringQuoted(NULL).c_str());
- EXPECT_STREQ("L\"\"",
- String::ShowWideCStringQuoted(L"").c_str());
- EXPECT_STREQ("L\"foo\"",
- String::ShowWideCStringQuoted(L"foo").c_str());
-}
-
-# if GTEST_OS_WINDOWS_MOBILE
-TEST(StringTest, AnsiAndUtf16Null) {
- EXPECT_EQ(NULL, String::AnsiToUtf16(NULL));
- EXPECT_EQ(NULL, String::Utf16ToAnsi(NULL));
-}
-
-TEST(StringTest, AnsiAndUtf16ConvertBasic) {
- const char* ansi = String::Utf16ToAnsi(L"str");
- EXPECT_STREQ("str", ansi);
- delete [] ansi;
- const WCHAR* utf16 = String::AnsiToUtf16("str");
- EXPECT_EQ(0, wcsncmp(L"str", utf16, 3));
- delete [] utf16;
-}
-
-TEST(StringTest, AnsiAndUtf16ConvertPathChars) {
- const char* ansi = String::Utf16ToAnsi(L".:\\ \"*?");
- EXPECT_STREQ(".:\\ \"*?", ansi);
- delete [] ansi;
- const WCHAR* utf16 = String::AnsiToUtf16(".:\\ \"*?");
- EXPECT_EQ(0, wcsncmp(L".:\\ \"*?", utf16, 3));
- delete [] utf16;
-}
-# endif // GTEST_OS_WINDOWS_MOBILE
-
-#endif // GTEST_OS_WINDOWS
-
-// Tests TestProperty construction.
-TEST(TestPropertyTest, StringValue) {
- TestProperty property("key", "1");
- EXPECT_STREQ("key", property.key());
- EXPECT_STREQ("1", property.value());
-}
-
-// Tests TestProperty replacing a value.
-TEST(TestPropertyTest, ReplaceStringValue) {
- TestProperty property("key", "1");
- EXPECT_STREQ("1", property.value());
- property.SetValue("2");
- EXPECT_STREQ("2", property.value());
-}
-
-// AddFatalFailure() and AddNonfatalFailure() must be stand-alone
-// functions (i.e. their definitions cannot be inlined at the call
-// sites), or C++Builder won't compile the code.
-static void AddFatalFailure() {
- FAIL() << "Expected fatal failure.";
-}
-
-static void AddNonfatalFailure() {
- ADD_FAILURE() << "Expected non-fatal failure.";
-}
-
-class ScopedFakeTestPartResultReporterTest : public Test {
- public: // Must be public and not protected due to a bug in g++ 3.4.2.
- enum FailureMode {
- FATAL_FAILURE,
- NONFATAL_FAILURE
- };
- static void AddFailure(FailureMode failure) {
- if (failure == FATAL_FAILURE) {
- AddFatalFailure();
- } else {
- AddNonfatalFailure();
- }
- }
-};
-
-// Tests that ScopedFakeTestPartResultReporter intercepts test
-// failures.
-TEST_F(ScopedFakeTestPartResultReporterTest, InterceptsTestFailures) {
- TestPartResultArray results;
- {
- ScopedFakeTestPartResultReporter reporter(
- ScopedFakeTestPartResultReporter::INTERCEPT_ONLY_CURRENT_THREAD,
- &results);
- AddFailure(NONFATAL_FAILURE);
- AddFailure(FATAL_FAILURE);
- }
-
- EXPECT_EQ(2, results.size());
- EXPECT_TRUE(results.GetTestPartResult(0).nonfatally_failed());
- EXPECT_TRUE(results.GetTestPartResult(1).fatally_failed());
-}
-
-TEST_F(ScopedFakeTestPartResultReporterTest, DeprecatedConstructor) {
- TestPartResultArray results;
- {
- // Tests, that the deprecated constructor still works.
- ScopedFakeTestPartResultReporter reporter(&results);
- AddFailure(NONFATAL_FAILURE);
- }
- EXPECT_EQ(1, results.size());
-}
-
-#if GTEST_IS_THREADSAFE
-
-class ScopedFakeTestPartResultReporterWithThreadsTest
- : public ScopedFakeTestPartResultReporterTest {
- protected:
- static void AddFailureInOtherThread(FailureMode failure) {
- ThreadWithParam<FailureMode> thread(&AddFailure, failure, NULL);
- thread.Join();
- }
-};
-
-TEST_F(ScopedFakeTestPartResultReporterWithThreadsTest,
- InterceptsTestFailuresInAllThreads) {
- TestPartResultArray results;
- {
- ScopedFakeTestPartResultReporter reporter(
- ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, &results);
- AddFailure(NONFATAL_FAILURE);
- AddFailure(FATAL_FAILURE);
- AddFailureInOtherThread(NONFATAL_FAILURE);
- AddFailureInOtherThread(FATAL_FAILURE);
- }
-
- EXPECT_EQ(4, results.size());
- EXPECT_TRUE(results.GetTestPartResult(0).nonfatally_failed());
- EXPECT_TRUE(results.GetTestPartResult(1).fatally_failed());
- EXPECT_TRUE(results.GetTestPartResult(2).nonfatally_failed());
- EXPECT_TRUE(results.GetTestPartResult(3).fatally_failed());
-}
-
-#endif // GTEST_IS_THREADSAFE
-
-// Tests EXPECT_FATAL_FAILURE{,ON_ALL_THREADS}. Makes sure that they
-// work even if the failure is generated in a called function rather than
-// the current context.
-
-typedef ScopedFakeTestPartResultReporterTest ExpectFatalFailureTest;
-
-TEST_F(ExpectFatalFailureTest, CatchesFatalFaliure) {
- EXPECT_FATAL_FAILURE(AddFatalFailure(), "Expected fatal failure.");
-}
-
-#if GTEST_HAS_GLOBAL_STRING
-TEST_F(ExpectFatalFailureTest, AcceptsStringObject) {
- EXPECT_FATAL_FAILURE(AddFatalFailure(), ::string("Expected fatal failure."));
-}
-#endif
-
-TEST_F(ExpectFatalFailureTest, AcceptsStdStringObject) {
- EXPECT_FATAL_FAILURE(AddFatalFailure(),
- ::std::string("Expected fatal failure."));
-}
-
-TEST_F(ExpectFatalFailureTest, CatchesFatalFailureOnAllThreads) {
- // We have another test below to verify that the macro catches fatal
- // failures generated on another thread.
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFatalFailure(),
- "Expected fatal failure.");
-}
-
-#ifdef __BORLANDC__
-// Silences warnings: "Condition is always true"
-# pragma option push -w-ccc
-#endif
-
-// Tests that EXPECT_FATAL_FAILURE() can be used in a non-void
-// function even when the statement in it contains ASSERT_*.
-
-int NonVoidFunction() {
- EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), "");
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(FAIL(), "");
- return 0;
-}
-
-TEST_F(ExpectFatalFailureTest, CanBeUsedInNonVoidFunction) {
- NonVoidFunction();
-}
-
-// Tests that EXPECT_FATAL_FAILURE(statement, ...) doesn't abort the
-// current function even though 'statement' generates a fatal failure.
-
-void DoesNotAbortHelper(bool* aborted) {
- EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), "");
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(FAIL(), "");
-
- *aborted = false;
-}
-
-#ifdef __BORLANDC__
-// Restores warnings after previous "#pragma option push" suppressed them.
-# pragma option pop
-#endif
-
-TEST_F(ExpectFatalFailureTest, DoesNotAbort) {
- bool aborted = true;
- DoesNotAbortHelper(&aborted);
- EXPECT_FALSE(aborted);
-}
-
-// Tests that the EXPECT_FATAL_FAILURE{,_ON_ALL_THREADS} accepts a
-// statement that contains a macro which expands to code containing an
-// unprotected comma.
-
-static int global_var = 0;
-#define GTEST_USE_UNPROTECTED_COMMA_ global_var++, global_var++
-
-TEST_F(ExpectFatalFailureTest, AcceptsMacroThatExpandsToUnprotectedComma) {
-#ifndef __BORLANDC__
- // ICE's in C++Builder.
- EXPECT_FATAL_FAILURE({
- GTEST_USE_UNPROTECTED_COMMA_;
- AddFatalFailure();
- }, "");
-#endif
-
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS({
- GTEST_USE_UNPROTECTED_COMMA_;
- AddFatalFailure();
- }, "");
-}
-
-// Tests EXPECT_NONFATAL_FAILURE{,ON_ALL_THREADS}.
-
-typedef ScopedFakeTestPartResultReporterTest ExpectNonfatalFailureTest;
-
-TEST_F(ExpectNonfatalFailureTest, CatchesNonfatalFailure) {
- EXPECT_NONFATAL_FAILURE(AddNonfatalFailure(),
- "Expected non-fatal failure.");
-}
-
-#if GTEST_HAS_GLOBAL_STRING
-TEST_F(ExpectNonfatalFailureTest, AcceptsStringObject) {
- EXPECT_NONFATAL_FAILURE(AddNonfatalFailure(),
- ::string("Expected non-fatal failure."));
-}
-#endif
-
-TEST_F(ExpectNonfatalFailureTest, AcceptsStdStringObject) {
- EXPECT_NONFATAL_FAILURE(AddNonfatalFailure(),
- ::std::string("Expected non-fatal failure."));
-}
-
-TEST_F(ExpectNonfatalFailureTest, CatchesNonfatalFailureOnAllThreads) {
- // We have another test below to verify that the macro catches
- // non-fatal failures generated on another thread.
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddNonfatalFailure(),
- "Expected non-fatal failure.");
-}
-
-// Tests that the EXPECT_NONFATAL_FAILURE{,_ON_ALL_THREADS} accepts a
-// statement that contains a macro which expands to code containing an
-// unprotected comma.
-TEST_F(ExpectNonfatalFailureTest, AcceptsMacroThatExpandsToUnprotectedComma) {
- EXPECT_NONFATAL_FAILURE({
- GTEST_USE_UNPROTECTED_COMMA_;
- AddNonfatalFailure();
- }, "");
-
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS({
- GTEST_USE_UNPROTECTED_COMMA_;
- AddNonfatalFailure();
- }, "");
-}
-
-#if GTEST_IS_THREADSAFE
-
-typedef ScopedFakeTestPartResultReporterWithThreadsTest
- ExpectFailureWithThreadsTest;
-
-TEST_F(ExpectFailureWithThreadsTest, ExpectFatalFailureOnAllThreads) {
- EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailureInOtherThread(FATAL_FAILURE),
- "Expected fatal failure.");
-}
-
-TEST_F(ExpectFailureWithThreadsTest, ExpectNonFatalFailureOnAllThreads) {
- EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(
- AddFailureInOtherThread(NONFATAL_FAILURE), "Expected non-fatal failure.");
-}
-
-#endif // GTEST_IS_THREADSAFE
-
-// Tests the TestProperty class.
-
-TEST(TestPropertyTest, ConstructorWorks) {
- const TestProperty property("key", "value");
- EXPECT_STREQ("key", property.key());
- EXPECT_STREQ("value", property.value());
-}
-
-TEST(TestPropertyTest, SetValue) {
- TestProperty property("key", "value_1");
- EXPECT_STREQ("key", property.key());
- property.SetValue("value_2");
- EXPECT_STREQ("key", property.key());
- EXPECT_STREQ("value_2", property.value());
-}
-
-// Tests the TestResult class
-
-// The test fixture for testing TestResult.
-class TestResultTest : public Test {
- protected:
- typedef std::vector<TestPartResult> TPRVector;
-
- // We make use of 2 TestPartResult objects,
- TestPartResult * pr1, * pr2;
-
- // ... and 3 TestResult objects.
- TestResult * r0, * r1, * r2;
-
- virtual void SetUp() {
- // pr1 is for success.
- pr1 = new TestPartResult(TestPartResult::kSuccess,
- "foo/bar.cc",
- 10,
- "Success!");
-
- // pr2 is for fatal failure.
- pr2 = new TestPartResult(TestPartResult::kFatalFailure,
- "foo/bar.cc",
- -1, // This line number means "unknown"
- "Failure!");
-
- // Creates the TestResult objects.
- r0 = new TestResult();
- r1 = new TestResult();
- r2 = new TestResult();
-
- // In order to test TestResult, we need to modify its internal
- // state, in particular the TestPartResult vector it holds.
- // test_part_results() returns a const reference to this vector.
- // We cast it to a non-const object s.t. it can be modified (yes,
- // this is a hack).
- TPRVector* results1 = const_cast<TPRVector*>(
- &TestResultAccessor::test_part_results(*r1));
- TPRVector* results2 = const_cast<TPRVector*>(
- &TestResultAccessor::test_part_results(*r2));
-
- // r0 is an empty TestResult.
-
- // r1 contains a single SUCCESS TestPartResult.
- results1->push_back(*pr1);
-
- // r2 contains a SUCCESS, and a FAILURE.
- results2->push_back(*pr1);
- results2->push_back(*pr2);
- }
-
- virtual void TearDown() {
- delete pr1;
- delete pr2;
-
- delete r0;
- delete r1;
- delete r2;
- }
-
- // Helper that compares two two TestPartResults.
- static void CompareTestPartResult(const TestPartResult& expected,
- const TestPartResult& actual) {
- EXPECT_EQ(expected.type(), actual.type());
- EXPECT_STREQ(expected.file_name(), actual.file_name());
- EXPECT_EQ(expected.line_number(), actual.line_number());
- EXPECT_STREQ(expected.summary(), actual.summary());
- EXPECT_STREQ(expected.message(), actual.message());
- EXPECT_EQ(expected.passed(), actual.passed());
- EXPECT_EQ(expected.failed(), actual.failed());
- EXPECT_EQ(expected.nonfatally_failed(), actual.nonfatally_failed());
- EXPECT_EQ(expected.fatally_failed(), actual.fatally_failed());
- }
-};
-
-// Tests TestResult::total_part_count().
-TEST_F(TestResultTest, total_part_count) {
- ASSERT_EQ(0, r0->total_part_count());
- ASSERT_EQ(1, r1->total_part_count());
- ASSERT_EQ(2, r2->total_part_count());
-}
-
-// Tests TestResult::Passed().
-TEST_F(TestResultTest, Passed) {
- ASSERT_TRUE(r0->Passed());
- ASSERT_TRUE(r1->Passed());
- ASSERT_FALSE(r2->Passed());
-}
-
-// Tests TestResult::Failed().
-TEST_F(TestResultTest, Failed) {
- ASSERT_FALSE(r0->Failed());
- ASSERT_FALSE(r1->Failed());
- ASSERT_TRUE(r2->Failed());
-}
-
-// Tests TestResult::GetTestPartResult().
-
-typedef TestResultTest TestResultDeathTest;
-
-TEST_F(TestResultDeathTest, GetTestPartResult) {
- CompareTestPartResult(*pr1, r2->GetTestPartResult(0));
- CompareTestPartResult(*pr2, r2->GetTestPartResult(1));
- EXPECT_DEATH_IF_SUPPORTED(r2->GetTestPartResult(2), "");
- EXPECT_DEATH_IF_SUPPORTED(r2->GetTestPartResult(-1), "");
-}
-
-// Tests TestResult has no properties when none are added.
-TEST(TestResultPropertyTest, NoPropertiesFoundWhenNoneAreAdded) {
- TestResult test_result;
- ASSERT_EQ(0, test_result.test_property_count());
-}
-
-// Tests TestResult has the expected property when added.
-TEST(TestResultPropertyTest, OnePropertyFoundWhenAdded) {
- TestResult test_result;
- TestProperty property("key_1", "1");
- TestResultAccessor::RecordProperty(&test_result, property);
- ASSERT_EQ(1, test_result.test_property_count());
- const TestProperty& actual_property = test_result.GetTestProperty(0);
- EXPECT_STREQ("key_1", actual_property.key());
- EXPECT_STREQ("1", actual_property.value());
-}
-
-// Tests TestResult has multiple properties when added.
-TEST(TestResultPropertyTest, MultiplePropertiesFoundWhenAdded) {
- TestResult test_result;
- TestProperty property_1("key_1", "1");
- TestProperty property_2("key_2", "2");
- TestResultAccessor::RecordProperty(&test_result, property_1);
- TestResultAccessor::RecordProperty(&test_result, property_2);
- ASSERT_EQ(2, test_result.test_property_count());
- const TestProperty& actual_property_1 = test_result.GetTestProperty(0);
- EXPECT_STREQ("key_1", actual_property_1.key());
- EXPECT_STREQ("1", actual_property_1.value());
-
- const TestProperty& actual_property_2 = test_result.GetTestProperty(1);
- EXPECT_STREQ("key_2", actual_property_2.key());
- EXPECT_STREQ("2", actual_property_2.value());
-}
-
-// Tests TestResult::RecordProperty() overrides values for duplicate keys.
-TEST(TestResultPropertyTest, OverridesValuesForDuplicateKeys) {
- TestResult test_result;
- TestProperty property_1_1("key_1", "1");
- TestProperty property_2_1("key_2", "2");
- TestProperty property_1_2("key_1", "12");
- TestProperty property_2_2("key_2", "22");
- TestResultAccessor::RecordProperty(&test_result, property_1_1);
- TestResultAccessor::RecordProperty(&test_result, property_2_1);
- TestResultAccessor::RecordProperty(&test_result, property_1_2);
- TestResultAccessor::RecordProperty(&test_result, property_2_2);
-
- ASSERT_EQ(2, test_result.test_property_count());
- const TestProperty& actual_property_1 = test_result.GetTestProperty(0);
- EXPECT_STREQ("key_1", actual_property_1.key());
- EXPECT_STREQ("12", actual_property_1.value());
-
- const TestProperty& actual_property_2 = test_result.GetTestProperty(1);
- EXPECT_STREQ("key_2", actual_property_2.key());
- EXPECT_STREQ("22", actual_property_2.value());
-}
-
-// Tests TestResult::GetTestProperty().
-TEST(TestResultPropertyDeathTest, GetTestProperty) {
- TestResult test_result;
- TestProperty property_1("key_1", "1");
- TestProperty property_2("key_2", "2");
- TestProperty property_3("key_3", "3");
- TestResultAccessor::RecordProperty(&test_result, property_1);
- TestResultAccessor::RecordProperty(&test_result, property_2);
- TestResultAccessor::RecordProperty(&test_result, property_3);
-
- const TestProperty& fetched_property_1 = test_result.GetTestProperty(0);
- const TestProperty& fetched_property_2 = test_result.GetTestProperty(1);
- const TestProperty& fetched_property_3 = test_result.GetTestProperty(2);
-
- EXPECT_STREQ("key_1", fetched_property_1.key());
- EXPECT_STREQ("1", fetched_property_1.value());
-
- EXPECT_STREQ("key_2", fetched_property_2.key());
- EXPECT_STREQ("2", fetched_property_2.value());
-
- EXPECT_STREQ("key_3", fetched_property_3.key());
- EXPECT_STREQ("3", fetched_property_3.value());
-
- EXPECT_DEATH_IF_SUPPORTED(test_result.GetTestProperty(3), "");
- EXPECT_DEATH_IF_SUPPORTED(test_result.GetTestProperty(-1), "");
-}
-
-// When a property using a reserved key is supplied to this function, it tests
-// that a non-fatal failure is added, a fatal failure is not added, and that the
-// property is not recorded.
-void ExpectNonFatalFailureRecordingPropertyWithReservedKey(const char* key) {
- TestResult test_result;
- TestProperty property(key, "1");
- EXPECT_NONFATAL_FAILURE(
- TestResultAccessor::RecordProperty(&test_result, property),
- "Reserved key");
- ASSERT_EQ(0, test_result.test_property_count()) << "Not recorded";
-}
-
-// Attempting to recording a property with the Reserved literal "name"
-// should add a non-fatal failure and the property should not be recorded.
-TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledName) {
- ExpectNonFatalFailureRecordingPropertyWithReservedKey("name");
-}
-
-// Attempting to recording a property with the Reserved literal "status"
-// should add a non-fatal failure and the property should not be recorded.
-TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledStatus) {
- ExpectNonFatalFailureRecordingPropertyWithReservedKey("status");
-}
-
-// Attempting to recording a property with the Reserved literal "time"
-// should add a non-fatal failure and the property should not be recorded.
-TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledTime) {
- ExpectNonFatalFailureRecordingPropertyWithReservedKey("time");
-}
-
-// Attempting to recording a property with the Reserved literal "classname"
-// should add a non-fatal failure and the property should not be recorded.
-TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledClassname) {
- ExpectNonFatalFailureRecordingPropertyWithReservedKey("classname");
-}
-
-// Tests that GTestFlagSaver works on Windows and Mac.
-
-class GTestFlagSaverTest : public Test {
- protected:
- // Saves the Google Test flags such that we can restore them later, and
- // then sets them to their default values. This will be called
- // before the first test in this test case is run.
- static void SetUpTestCase() {
- saver_ = new GTestFlagSaver;
-
- GTEST_FLAG(also_run_disabled_tests) = false;
- GTEST_FLAG(break_on_failure) = false;
- GTEST_FLAG(catch_exceptions) = false;
- GTEST_FLAG(death_test_use_fork) = false;
- GTEST_FLAG(color) = "auto";
- GTEST_FLAG(filter) = "";
- GTEST_FLAG(list_tests) = false;
- GTEST_FLAG(output) = "";
- GTEST_FLAG(print_time) = true;
- GTEST_FLAG(random_seed) = 0;
- GTEST_FLAG(repeat) = 1;
- GTEST_FLAG(shuffle) = false;
- GTEST_FLAG(stack_trace_depth) = kMaxStackTraceDepth;
- GTEST_FLAG(stream_result_to) = "";
- GTEST_FLAG(throw_on_failure) = false;
- }
-
- // Restores the Google Test flags that the tests have modified. This will
- // be called after the last test in this test case is run.
- static void TearDownTestCase() {
- delete saver_;
- saver_ = NULL;
- }
-
- // Verifies that the Google Test flags have their default values, and then
- // modifies each of them.
- void VerifyAndModifyFlags() {
- EXPECT_FALSE(GTEST_FLAG(also_run_disabled_tests));
- EXPECT_FALSE(GTEST_FLAG(break_on_failure));
- EXPECT_FALSE(GTEST_FLAG(catch_exceptions));
- EXPECT_STREQ("auto", GTEST_FLAG(color).c_str());
- EXPECT_FALSE(GTEST_FLAG(death_test_use_fork));
- EXPECT_STREQ("", GTEST_FLAG(filter).c_str());
- EXPECT_FALSE(GTEST_FLAG(list_tests));
- EXPECT_STREQ("", GTEST_FLAG(output).c_str());
- EXPECT_TRUE(GTEST_FLAG(print_time));
- EXPECT_EQ(0, GTEST_FLAG(random_seed));
- EXPECT_EQ(1, GTEST_FLAG(repeat));
- EXPECT_FALSE(GTEST_FLAG(shuffle));
- EXPECT_EQ(kMaxStackTraceDepth, GTEST_FLAG(stack_trace_depth));
- EXPECT_STREQ("", GTEST_FLAG(stream_result_to).c_str());
- EXPECT_FALSE(GTEST_FLAG(throw_on_failure));
-
- GTEST_FLAG(also_run_disabled_tests) = true;
- GTEST_FLAG(break_on_failure) = true;
- GTEST_FLAG(catch_exceptions) = true;
- GTEST_FLAG(color) = "no";
- GTEST_FLAG(death_test_use_fork) = true;
- GTEST_FLAG(filter) = "abc";
- GTEST_FLAG(list_tests) = true;
- GTEST_FLAG(output) = "xml:foo.xml";
- GTEST_FLAG(print_time) = false;
- GTEST_FLAG(random_seed) = 1;
- GTEST_FLAG(repeat) = 100;
- GTEST_FLAG(shuffle) = true;
- GTEST_FLAG(stack_trace_depth) = 1;
- GTEST_FLAG(stream_result_to) = "localhost:1234";
- GTEST_FLAG(throw_on_failure) = true;
- }
- private:
- // For saving Google Test flags during this test case.
- static GTestFlagSaver* saver_;
-};
-
-GTestFlagSaver* GTestFlagSaverTest::saver_ = NULL;
-
-// Google Test doesn't guarantee the order of tests. The following two
-// tests are designed to work regardless of their order.
-
-// Modifies the Google Test flags in the test body.
-TEST_F(GTestFlagSaverTest, ModifyGTestFlags) {
- VerifyAndModifyFlags();
-}
-
-// Verifies that the Google Test flags in the body of the previous test were
-// restored to their original values.
-TEST_F(GTestFlagSaverTest, VerifyGTestFlags) {
- VerifyAndModifyFlags();
-}
-
-// Sets an environment variable with the given name to the given
-// value. If the value argument is "", unsets the environment
-// variable. The caller must ensure that both arguments are not NULL.
-static void SetEnv(const char* name, const char* value) {
-#if GTEST_OS_WINDOWS_MOBILE
- // Environment variables are not supported on Windows CE.
- return;
-#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
- // C++Builder's putenv only stores a pointer to its parameter; we have to
- // ensure that the string remains valid as long as it might be needed.
- // We use an std::map to do so.
- static std::map<String, String*> added_env;
-
- // Because putenv stores a pointer to the string buffer, we can't delete the
- // previous string (if present) until after it's replaced.
- String *prev_env = NULL;
- if (added_env.find(name) != added_env.end()) {
- prev_env = added_env[name];
- }
- added_env[name] = new String((Message() << name << "=" << value).GetString());
-
- // The standard signature of putenv accepts a 'char*' argument. Other
- // implementations, like C++Builder's, accept a 'const char*'.
- // We cast away the 'const' since that would work for both variants.
- putenv(const_cast<char*>(added_env[name]->c_str()));
- delete prev_env;
-#elif GTEST_OS_WINDOWS // If we are on Windows proper.
- _putenv((Message() << name << "=" << value).GetString().c_str());
-#else
- if (*value == '\0') {
- unsetenv(name);
- } else {
- setenv(name, value, 1);
- }
-#endif // GTEST_OS_WINDOWS_MOBILE
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-// Environment variables are not supported on Windows CE.
-
-using testing::internal::Int32FromGTestEnv;
-
-// Tests Int32FromGTestEnv().
-
-// Tests that Int32FromGTestEnv() returns the default value when the
-// environment variable is not set.
-TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenVariableIsNotSet) {
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "");
- EXPECT_EQ(10, Int32FromGTestEnv("temp", 10));
-}
-
-// Tests that Int32FromGTestEnv() returns the default value when the
-// environment variable overflows as an Int32.
-TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueOverflows) {
- printf("(expecting 2 warnings)\n");
-
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "12345678987654321");
- EXPECT_EQ(20, Int32FromGTestEnv("temp", 20));
-
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "-12345678987654321");
- EXPECT_EQ(30, Int32FromGTestEnv("temp", 30));
-}
-
-// Tests that Int32FromGTestEnv() returns the default value when the
-// environment variable does not represent a valid decimal integer.
-TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueIsInvalid) {
- printf("(expecting 2 warnings)\n");
-
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "A1");
- EXPECT_EQ(40, Int32FromGTestEnv("temp", 40));
-
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "12X");
- EXPECT_EQ(50, Int32FromGTestEnv("temp", 50));
-}
-
-// Tests that Int32FromGTestEnv() parses and returns the value of the
-// environment variable when it represents a valid decimal integer in
-// the range of an Int32.
-TEST(Int32FromGTestEnvTest, ParsesAndReturnsValidValue) {
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "123");
- EXPECT_EQ(123, Int32FromGTestEnv("temp", 0));
-
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "-321");
- EXPECT_EQ(-321, Int32FromGTestEnv("temp", 0));
-}
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Tests ParseInt32Flag().
-
-// Tests that ParseInt32Flag() returns false and doesn't change the
-// output value when the flag has wrong format
-TEST(ParseInt32FlagTest, ReturnsFalseForInvalidFlag) {
- Int32 value = 123;
- EXPECT_FALSE(ParseInt32Flag("--a=100", "b", &value));
- EXPECT_EQ(123, value);
-
- EXPECT_FALSE(ParseInt32Flag("a=100", "a", &value));
- EXPECT_EQ(123, value);
-}
-
-// Tests that ParseInt32Flag() returns false and doesn't change the
-// output value when the flag overflows as an Int32.
-TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueOverflows) {
- printf("(expecting 2 warnings)\n");
-
- Int32 value = 123;
- EXPECT_FALSE(ParseInt32Flag("--abc=12345678987654321", "abc", &value));
- EXPECT_EQ(123, value);
-
- EXPECT_FALSE(ParseInt32Flag("--abc=-12345678987654321", "abc", &value));
- EXPECT_EQ(123, value);
-}
-
-// Tests that ParseInt32Flag() returns false and doesn't change the
-// output value when the flag does not represent a valid decimal
-// integer.
-TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueIsInvalid) {
- printf("(expecting 2 warnings)\n");
-
- Int32 value = 123;
- EXPECT_FALSE(ParseInt32Flag("--abc=A1", "abc", &value));
- EXPECT_EQ(123, value);
-
- EXPECT_FALSE(ParseInt32Flag("--abc=12X", "abc", &value));
- EXPECT_EQ(123, value);
-}
-
-// Tests that ParseInt32Flag() parses the value of the flag and
-// returns true when the flag represents a valid decimal integer in
-// the range of an Int32.
-TEST(ParseInt32FlagTest, ParsesAndReturnsValidValue) {
- Int32 value = 123;
- EXPECT_TRUE(ParseInt32Flag("--" GTEST_FLAG_PREFIX_ "abc=456", "abc", &value));
- EXPECT_EQ(456, value);
-
- EXPECT_TRUE(ParseInt32Flag("--" GTEST_FLAG_PREFIX_ "abc=-789",
- "abc", &value));
- EXPECT_EQ(-789, value);
-}
-
-// Tests that Int32FromEnvOrDie() parses the value of the var or
-// returns the correct default.
-// Environment variables are not supported on Windows CE.
-#if !GTEST_OS_WINDOWS_MOBILE
-TEST(Int32FromEnvOrDieTest, ParsesAndReturnsValidValue) {
- EXPECT_EQ(333, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333));
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", "123");
- EXPECT_EQ(123, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333));
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", "-123");
- EXPECT_EQ(-123, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333));
-}
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Tests that Int32FromEnvOrDie() aborts with an error message
-// if the variable is not an Int32.
-TEST(Int32FromEnvOrDieDeathTest, AbortsOnFailure) {
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "xxx");
- EXPECT_DEATH_IF_SUPPORTED(
- Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "VAR", 123),
- ".*");
-}
-
-// Tests that Int32FromEnvOrDie() aborts with an error message
-// if the variable cannot be represnted by an Int32.
-TEST(Int32FromEnvOrDieDeathTest, AbortsOnInt32Overflow) {
- SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "1234567891234567891234");
- EXPECT_DEATH_IF_SUPPORTED(
- Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "VAR", 123),
- ".*");
-}
-
-// Tests that ShouldRunTestOnShard() selects all tests
-// where there is 1 shard.
-TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereIsOneShard) {
- EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 0));
- EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 1));
- EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 2));
- EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 3));
- EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 4));
-}
-
-class ShouldShardTest : public testing::Test {
- protected:
- virtual void SetUp() {
- index_var_ = GTEST_FLAG_PREFIX_UPPER_ "INDEX";
- total_var_ = GTEST_FLAG_PREFIX_UPPER_ "TOTAL";
- }
-
- virtual void TearDown() {
- SetEnv(index_var_, "");
- SetEnv(total_var_, "");
- }
-
- const char* index_var_;
- const char* total_var_;
-};
-
-// Tests that sharding is disabled if neither of the environment variables
-// are set.
-TEST_F(ShouldShardTest, ReturnsFalseWhenNeitherEnvVarIsSet) {
- SetEnv(index_var_, "");
- SetEnv(total_var_, "");
-
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, false));
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, true));
-}
-
-// Tests that sharding is not enabled if total_shards == 1.
-TEST_F(ShouldShardTest, ReturnsFalseWhenTotalShardIsOne) {
- SetEnv(index_var_, "0");
- SetEnv(total_var_, "1");
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, false));
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, true));
-}
-
-// Tests that sharding is enabled if total_shards > 1 and
-// we are not in a death test subprocess.
-// Environment variables are not supported on Windows CE.
-#if !GTEST_OS_WINDOWS_MOBILE
-TEST_F(ShouldShardTest, WorksWhenShardEnvVarsAreValid) {
- SetEnv(index_var_, "4");
- SetEnv(total_var_, "22");
- EXPECT_TRUE(ShouldShard(total_var_, index_var_, false));
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, true));
-
- SetEnv(index_var_, "8");
- SetEnv(total_var_, "9");
- EXPECT_TRUE(ShouldShard(total_var_, index_var_, false));
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, true));
-
- SetEnv(index_var_, "0");
- SetEnv(total_var_, "9");
- EXPECT_TRUE(ShouldShard(total_var_, index_var_, false));
- EXPECT_FALSE(ShouldShard(total_var_, index_var_, true));
-}
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Tests that we exit in error if the sharding values are not valid.
-
-typedef ShouldShardTest ShouldShardDeathTest;
-
-TEST_F(ShouldShardDeathTest, AbortsWhenShardingEnvVarsAreInvalid) {
- SetEnv(index_var_, "4");
- SetEnv(total_var_, "4");
- EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*");
-
- SetEnv(index_var_, "4");
- SetEnv(total_var_, "-2");
- EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*");
-
- SetEnv(index_var_, "5");
- SetEnv(total_var_, "");
- EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*");
-
- SetEnv(index_var_, "");
- SetEnv(total_var_, "5");
- EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*");
-}
-
-// Tests that ShouldRunTestOnShard is a partition when 5
-// shards are used.
-TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereAreFiveShards) {
- // Choose an arbitrary number of tests and shards.
- const int num_tests = 17;
- const int num_shards = 5;
-
- // Check partitioning: each test should be on exactly 1 shard.
- for (int test_id = 0; test_id < num_tests; test_id++) {
- int prev_selected_shard_index = -1;
- for (int shard_index = 0; shard_index < num_shards; shard_index++) {
- if (ShouldRunTestOnShard(num_shards, shard_index, test_id)) {
- if (prev_selected_shard_index < 0) {
- prev_selected_shard_index = shard_index;
- } else {
- ADD_FAILURE() << "Shard " << prev_selected_shard_index << " and "
- << shard_index << " are both selected to run test " << test_id;
- }
- }
- }
- }
-
- // Check balance: This is not required by the sharding protocol, but is a
- // desirable property for performance.
- for (int shard_index = 0; shard_index < num_shards; shard_index++) {
- int num_tests_on_shard = 0;
- for (int test_id = 0; test_id < num_tests; test_id++) {
- num_tests_on_shard +=
- ShouldRunTestOnShard(num_shards, shard_index, test_id);
- }
- EXPECT_GE(num_tests_on_shard, num_tests / num_shards);
- }
-}
-
-// For the same reason we are not explicitly testing everything in the
-// Test class, there are no separate tests for the following classes
-// (except for some trivial cases):
-//
-// TestCase, UnitTest, UnitTestResultPrinter.
-//
-// Similarly, there are no separate tests for the following macros:
-//
-// TEST, TEST_F, RUN_ALL_TESTS
-
-TEST(UnitTestTest, CanGetOriginalWorkingDir) {
- ASSERT_TRUE(UnitTest::GetInstance()->original_working_dir() != NULL);
- EXPECT_STRNE(UnitTest::GetInstance()->original_working_dir(), "");
-}
-
-// This group of tests is for predicate assertions (ASSERT_PRED*, etc)
-// of various arities. They do not attempt to be exhaustive. Rather,
-// view them as smoke tests that can be easily reviewed and verified.
-// A more complete set of tests for predicate assertions can be found
-// in gtest_pred_impl_unittest.cc.
-
-// First, some predicates and predicate-formatters needed by the tests.
-
-// Returns true iff the argument is an even number.
-bool IsEven(int n) {
- return (n % 2) == 0;
-}
-
-// A functor that returns true iff the argument is an even number.
-struct IsEvenFunctor {
- bool operator()(int n) { return IsEven(n); }
-};
-
-// A predicate-formatter function that asserts the argument is an even
-// number.
-AssertionResult AssertIsEven(const char* expr, int n) {
- if (IsEven(n)) {
- return AssertionSuccess();
- }
-
- Message msg;
- msg << expr << " evaluates to " << n << ", which is not even.";
- return AssertionFailure(msg);
-}
-
-// A predicate function that returns AssertionResult for use in
-// EXPECT/ASSERT_TRUE/FALSE.
-AssertionResult ResultIsEven(int n) {
- if (IsEven(n))
- return AssertionSuccess() << n << " is even";
- else
- return AssertionFailure() << n << " is odd";
-}
-
-// A predicate function that returns AssertionResult but gives no
-// explanation why it succeeds. Needed for testing that
-// EXPECT/ASSERT_FALSE handles such functions correctly.
-AssertionResult ResultIsEvenNoExplanation(int n) {
- if (IsEven(n))
- return AssertionSuccess();
- else
- return AssertionFailure() << n << " is odd";
-}
-
-// A predicate-formatter functor that asserts the argument is an even
-// number.
-struct AssertIsEvenFunctor {
- AssertionResult operator()(const char* expr, int n) {
- return AssertIsEven(expr, n);
- }
-};
-
-// Returns true iff the sum of the arguments is an even number.
-bool SumIsEven2(int n1, int n2) {
- return IsEven(n1 + n2);
-}
-
-// A functor that returns true iff the sum of the arguments is an even
-// number.
-struct SumIsEven3Functor {
- bool operator()(int n1, int n2, int n3) {
- return IsEven(n1 + n2 + n3);
- }
-};
-
-// A predicate-formatter function that asserts the sum of the
-// arguments is an even number.
-AssertionResult AssertSumIsEven4(
- const char* e1, const char* e2, const char* e3, const char* e4,
- int n1, int n2, int n3, int n4) {
- const int sum = n1 + n2 + n3 + n4;
- if (IsEven(sum)) {
- return AssertionSuccess();
- }
-
- Message msg;
- msg << e1 << " + " << e2 << " + " << e3 << " + " << e4
- << " (" << n1 << " + " << n2 << " + " << n3 << " + " << n4
- << ") evaluates to " << sum << ", which is not even.";
- return AssertionFailure(msg);
-}
-
-// A predicate-formatter functor that asserts the sum of the arguments
-// is an even number.
-struct AssertSumIsEven5Functor {
- AssertionResult operator()(
- const char* e1, const char* e2, const char* e3, const char* e4,
- const char* e5, int n1, int n2, int n3, int n4, int n5) {
- const int sum = n1 + n2 + n3 + n4 + n5;
- if (IsEven(sum)) {
- return AssertionSuccess();
- }
-
- Message msg;
- msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5
- << " ("
- << n1 << " + " << n2 << " + " << n3 << " + " << n4 << " + " << n5
- << ") evaluates to " << sum << ", which is not even.";
- return AssertionFailure(msg);
- }
-};
-
-
-// Tests unary predicate assertions.
-
-// Tests unary predicate assertions that don't use a custom formatter.
-TEST(Pred1Test, WithoutFormat) {
- // Success cases.
- EXPECT_PRED1(IsEvenFunctor(), 2) << "This failure is UNEXPECTED!";
- ASSERT_PRED1(IsEven, 4);
-
- // Failure cases.
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED1(IsEven, 5) << "This failure is expected.";
- }, "This failure is expected.");
- EXPECT_FATAL_FAILURE(ASSERT_PRED1(IsEvenFunctor(), 5),
- "evaluates to false");
-}
-
-// Tests unary predicate assertions that use a custom formatter.
-TEST(Pred1Test, WithFormat) {
- // Success cases.
- EXPECT_PRED_FORMAT1(AssertIsEven, 2);
- ASSERT_PRED_FORMAT1(AssertIsEvenFunctor(), 4)
- << "This failure is UNEXPECTED!";
-
- // Failure cases.
- const int n = 5;
- EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT1(AssertIsEvenFunctor(), n),
- "n evaluates to 5, which is not even.");
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT1(AssertIsEven, 5) << "This failure is expected.";
- }, "This failure is expected.");
-}
-
-// Tests that unary predicate assertions evaluates their arguments
-// exactly once.
-TEST(Pred1Test, SingleEvaluationOnFailure) {
- // A success case.
- static int n = 0;
- EXPECT_PRED1(IsEven, n++);
- EXPECT_EQ(1, n) << "The argument is not evaluated exactly once.";
-
- // A failure case.
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT1(AssertIsEvenFunctor(), n++)
- << "This failure is expected.";
- }, "This failure is expected.");
- EXPECT_EQ(2, n) << "The argument is not evaluated exactly once.";
-}
-
-
-// Tests predicate assertions whose arity is >= 2.
-
-// Tests predicate assertions that don't use a custom formatter.
-TEST(PredTest, WithoutFormat) {
- // Success cases.
- ASSERT_PRED2(SumIsEven2, 2, 4) << "This failure is UNEXPECTED!";
- EXPECT_PRED3(SumIsEven3Functor(), 4, 6, 8);
-
- // Failure cases.
- const int n1 = 1;
- const int n2 = 2;
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED2(SumIsEven2, n1, n2) << "This failure is expected.";
- }, "This failure is expected.");
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED3(SumIsEven3Functor(), 1, 2, 4);
- }, "evaluates to false");
-}
-
-// Tests predicate assertions that use a custom formatter.
-TEST(PredTest, WithFormat) {
- // Success cases.
- ASSERT_PRED_FORMAT4(AssertSumIsEven4, 4, 6, 8, 10) <<
- "This failure is UNEXPECTED!";
- EXPECT_PRED_FORMAT5(AssertSumIsEven5Functor(), 2, 4, 6, 8, 10);
-
- // Failure cases.
- const int n1 = 1;
- const int n2 = 2;
- const int n3 = 4;
- const int n4 = 6;
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT4(AssertSumIsEven4, n1, n2, n3, n4);
- }, "evaluates to 13, which is not even.");
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT5(AssertSumIsEven5Functor(), 1, 2, 4, 6, 8)
- << "This failure is expected.";
- }, "This failure is expected.");
-}
-
-// Tests that predicate assertions evaluates their arguments
-// exactly once.
-TEST(PredTest, SingleEvaluationOnFailure) {
- // A success case.
- int n1 = 0;
- int n2 = 0;
- EXPECT_PRED2(SumIsEven2, n1++, n2++);
- EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once.";
- EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once.";
-
- // Another success case.
- n1 = n2 = 0;
- int n3 = 0;
- int n4 = 0;
- int n5 = 0;
- ASSERT_PRED_FORMAT5(AssertSumIsEven5Functor(),
- n1++, n2++, n3++, n4++, n5++)
- << "This failure is UNEXPECTED!";
- EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once.";
- EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once.";
- EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once.";
- EXPECT_EQ(1, n4) << "Argument 4 is not evaluated exactly once.";
- EXPECT_EQ(1, n5) << "Argument 5 is not evaluated exactly once.";
-
- // A failure case.
- n1 = n2 = n3 = 0;
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED3(SumIsEven3Functor(), ++n1, n2++, n3++)
- << "This failure is expected.";
- }, "This failure is expected.");
- EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once.";
- EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once.";
- EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once.";
-
- // Another failure case.
- n1 = n2 = n3 = n4 = 0;
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT4(AssertSumIsEven4, ++n1, n2++, n3++, n4++);
- }, "evaluates to 1, which is not even.");
- EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once.";
- EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once.";
- EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once.";
- EXPECT_EQ(1, n4) << "Argument 4 is not evaluated exactly once.";
-}
-
-
-// Some helper functions for testing using overloaded/template
-// functions with ASSERT_PREDn and EXPECT_PREDn.
-
-bool IsPositive(double x) {
- return x > 0;
-}
-
-template <typename T>
-bool IsNegative(T x) {
- return x < 0;
-}
-
-template <typename T1, typename T2>
-bool GreaterThan(T1 x1, T2 x2) {
- return x1 > x2;
-}
-
-// Tests that overloaded functions can be used in *_PRED* as long as
-// their types are explicitly specified.
-TEST(PredicateAssertionTest, AcceptsOverloadedFunction) {
- // C++Builder requires C-style casts rather than static_cast.
- EXPECT_PRED1((bool (*)(int))(IsPositive), 5); // NOLINT
- ASSERT_PRED1((bool (*)(double))(IsPositive), 6.0); // NOLINT
-}
-
-// Tests that template functions can be used in *_PRED* as long as
-// their types are explicitly specified.
-TEST(PredicateAssertionTest, AcceptsTemplateFunction) {
- EXPECT_PRED1(IsNegative<int>, -5);
- // Makes sure that we can handle templates with more than one
- // parameter.
- ASSERT_PRED2((GreaterThan<int, int>), 5, 0);
-}
-
-
-// Some helper functions for testing using overloaded/template
-// functions with ASSERT_PRED_FORMATn and EXPECT_PRED_FORMATn.
-
-AssertionResult IsPositiveFormat(const char* /* expr */, int n) {
- return n > 0 ? AssertionSuccess() :
- AssertionFailure(Message() << "Failure");
-}
-
-AssertionResult IsPositiveFormat(const char* /* expr */, double x) {
- return x > 0 ? AssertionSuccess() :
- AssertionFailure(Message() << "Failure");
-}
-
-template <typename T>
-AssertionResult IsNegativeFormat(const char* /* expr */, T x) {
- return x < 0 ? AssertionSuccess() :
- AssertionFailure(Message() << "Failure");
-}
-
-template <typename T1, typename T2>
-AssertionResult EqualsFormat(const char* /* expr1 */, const char* /* expr2 */,
- const T1& x1, const T2& x2) {
- return x1 == x2 ? AssertionSuccess() :
- AssertionFailure(Message() << "Failure");
-}
-
-// Tests that overloaded functions can be used in *_PRED_FORMAT*
-// without explicitly specifying their types.
-TEST(PredicateFormatAssertionTest, AcceptsOverloadedFunction) {
- EXPECT_PRED_FORMAT1(IsPositiveFormat, 5);
- ASSERT_PRED_FORMAT1(IsPositiveFormat, 6.0);
-}
-
-// Tests that template functions can be used in *_PRED_FORMAT* without
-// explicitly specifying their types.
-TEST(PredicateFormatAssertionTest, AcceptsTemplateFunction) {
- EXPECT_PRED_FORMAT1(IsNegativeFormat, -5);
- ASSERT_PRED_FORMAT2(EqualsFormat, 3, 3);
-}
-
-
-// Tests string assertions.
-
-// Tests ASSERT_STREQ with non-NULL arguments.
-TEST(StringAssertionTest, ASSERT_STREQ) {
- const char * const p1 = "good";
- ASSERT_STREQ(p1, p1);
-
- // Let p2 have the same content as p1, but be at a different address.
- const char p2[] = "good";
- ASSERT_STREQ(p1, p2);
-
- EXPECT_FATAL_FAILURE(ASSERT_STREQ("bad", "good"),
- "Expected: \"bad\"");
-}
-
-// Tests ASSERT_STREQ with NULL arguments.
-TEST(StringAssertionTest, ASSERT_STREQ_Null) {
- ASSERT_STREQ(static_cast<const char *>(NULL), NULL);
- EXPECT_FATAL_FAILURE(ASSERT_STREQ(NULL, "non-null"),
- "non-null");
-}
-
-// Tests ASSERT_STREQ with NULL arguments.
-TEST(StringAssertionTest, ASSERT_STREQ_Null2) {
- EXPECT_FATAL_FAILURE(ASSERT_STREQ("non-null", NULL),
- "non-null");
-}
-
-// Tests ASSERT_STRNE.
-TEST(StringAssertionTest, ASSERT_STRNE) {
- ASSERT_STRNE("hi", "Hi");
- ASSERT_STRNE("Hi", NULL);
- ASSERT_STRNE(NULL, "Hi");
- ASSERT_STRNE("", NULL);
- ASSERT_STRNE(NULL, "");
- ASSERT_STRNE("", "Hi");
- ASSERT_STRNE("Hi", "");
- EXPECT_FATAL_FAILURE(ASSERT_STRNE("Hi", "Hi"),
- "\"Hi\" vs \"Hi\"");
-}
-
-// Tests ASSERT_STRCASEEQ.
-TEST(StringAssertionTest, ASSERT_STRCASEEQ) {
- ASSERT_STRCASEEQ("hi", "Hi");
- ASSERT_STRCASEEQ(static_cast<const char *>(NULL), NULL);
-
- ASSERT_STRCASEEQ("", "");
- EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("Hi", "hi2"),
- "(ignoring case)");
-}
-
-// Tests ASSERT_STRCASENE.
-TEST(StringAssertionTest, ASSERT_STRCASENE) {
- ASSERT_STRCASENE("hi1", "Hi2");
- ASSERT_STRCASENE("Hi", NULL);
- ASSERT_STRCASENE(NULL, "Hi");
- ASSERT_STRCASENE("", NULL);
- ASSERT_STRCASENE(NULL, "");
- ASSERT_STRCASENE("", "Hi");
- ASSERT_STRCASENE("Hi", "");
- EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("Hi", "hi"),
- "(ignoring case)");
-}
-
-// Tests *_STREQ on wide strings.
-TEST(StringAssertionTest, STREQ_Wide) {
- // NULL strings.
- ASSERT_STREQ(static_cast<const wchar_t *>(NULL), NULL);
-
- // Empty strings.
- ASSERT_STREQ(L"", L"");
-
- // Non-null vs NULL.
- EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"non-null", NULL),
- "non-null");
-
- // Equal strings.
- EXPECT_STREQ(L"Hi", L"Hi");
-
- // Unequal strings.
- EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"abc", L"Abc"),
- "Abc");
-
- // Strings containing wide characters.
- EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"abc\x8119", L"abc\x8120"),
- "abc");
-}
-
-// Tests *_STRNE on wide strings.
-TEST(StringAssertionTest, STRNE_Wide) {
- // NULL strings.
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_STRNE(static_cast<const wchar_t *>(NULL), NULL);
- }, "");
-
- // Empty strings.
- EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"", L""),
- "L\"\"");
-
- // Non-null vs NULL.
- ASSERT_STRNE(L"non-null", NULL);
-
- // Equal strings.
- EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"Hi", L"Hi"),
- "L\"Hi\"");
-
- // Unequal strings.
- EXPECT_STRNE(L"abc", L"Abc");
-
- // Strings containing wide characters.
- EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"abc\x8119", L"abc\x8119"),
- "abc");
-}
-
-// Tests for ::testing::IsSubstring().
-
-// Tests that IsSubstring() returns the correct result when the input
-// argument type is const char*.
-TEST(IsSubstringTest, ReturnsCorrectResultForCString) {
- EXPECT_FALSE(IsSubstring("", "", NULL, "a"));
- EXPECT_FALSE(IsSubstring("", "", "b", NULL));
- EXPECT_FALSE(IsSubstring("", "", "needle", "haystack"));
-
- EXPECT_TRUE(IsSubstring("", "", static_cast<const char*>(NULL), NULL));
- EXPECT_TRUE(IsSubstring("", "", "needle", "two needles"));
-}
-
-// Tests that IsSubstring() returns the correct result when the input
-// argument type is const wchar_t*.
-TEST(IsSubstringTest, ReturnsCorrectResultForWideCString) {
- EXPECT_FALSE(IsSubstring("", "", kNull, L"a"));
- EXPECT_FALSE(IsSubstring("", "", L"b", kNull));
- EXPECT_FALSE(IsSubstring("", "", L"needle", L"haystack"));
-
- EXPECT_TRUE(IsSubstring("", "", static_cast<const wchar_t*>(NULL), NULL));
- EXPECT_TRUE(IsSubstring("", "", L"needle", L"two needles"));
-}
-
-// Tests that IsSubstring() generates the correct message when the input
-// argument type is const char*.
-TEST(IsSubstringTest, GeneratesCorrectMessageForCString) {
- EXPECT_STREQ("Value of: needle_expr\n"
- " Actual: \"needle\"\n"
- "Expected: a substring of haystack_expr\n"
- "Which is: \"haystack\"",
- IsSubstring("needle_expr", "haystack_expr",
- "needle", "haystack").failure_message());
-}
-
-// Tests that IsSubstring returns the correct result when the input
-// argument type is ::std::string.
-TEST(IsSubstringTest, ReturnsCorrectResultsForStdString) {
- EXPECT_TRUE(IsSubstring("", "", std::string("hello"), "ahellob"));
- EXPECT_FALSE(IsSubstring("", "", "hello", std::string("world")));
-}
-
-#if GTEST_HAS_STD_WSTRING
-// Tests that IsSubstring returns the correct result when the input
-// argument type is ::std::wstring.
-TEST(IsSubstringTest, ReturnsCorrectResultForStdWstring) {
- EXPECT_TRUE(IsSubstring("", "", ::std::wstring(L"needle"), L"two needles"));
- EXPECT_FALSE(IsSubstring("", "", L"needle", ::std::wstring(L"haystack")));
-}
-
-// Tests that IsSubstring() generates the correct message when the input
-// argument type is ::std::wstring.
-TEST(IsSubstringTest, GeneratesCorrectMessageForWstring) {
- EXPECT_STREQ("Value of: needle_expr\n"
- " Actual: L\"needle\"\n"
- "Expected: a substring of haystack_expr\n"
- "Which is: L\"haystack\"",
- IsSubstring(
- "needle_expr", "haystack_expr",
- ::std::wstring(L"needle"), L"haystack").failure_message());
-}
-
-#endif // GTEST_HAS_STD_WSTRING
-
-// Tests for ::testing::IsNotSubstring().
-
-// Tests that IsNotSubstring() returns the correct result when the input
-// argument type is const char*.
-TEST(IsNotSubstringTest, ReturnsCorrectResultForCString) {
- EXPECT_TRUE(IsNotSubstring("", "", "needle", "haystack"));
- EXPECT_FALSE(IsNotSubstring("", "", "needle", "two needles"));
-}
-
-// Tests that IsNotSubstring() returns the correct result when the input
-// argument type is const wchar_t*.
-TEST(IsNotSubstringTest, ReturnsCorrectResultForWideCString) {
- EXPECT_TRUE(IsNotSubstring("", "", L"needle", L"haystack"));
- EXPECT_FALSE(IsNotSubstring("", "", L"needle", L"two needles"));
-}
-
-// Tests that IsNotSubstring() generates the correct message when the input
-// argument type is const wchar_t*.
-TEST(IsNotSubstringTest, GeneratesCorrectMessageForWideCString) {
- EXPECT_STREQ("Value of: needle_expr\n"
- " Actual: L\"needle\"\n"
- "Expected: not a substring of haystack_expr\n"
- "Which is: L\"two needles\"",
- IsNotSubstring(
- "needle_expr", "haystack_expr",
- L"needle", L"two needles").failure_message());
-}
-
-// Tests that IsNotSubstring returns the correct result when the input
-// argument type is ::std::string.
-TEST(IsNotSubstringTest, ReturnsCorrectResultsForStdString) {
- EXPECT_FALSE(IsNotSubstring("", "", std::string("hello"), "ahellob"));
- EXPECT_TRUE(IsNotSubstring("", "", "hello", std::string("world")));
-}
-
-// Tests that IsNotSubstring() generates the correct message when the input
-// argument type is ::std::string.
-TEST(IsNotSubstringTest, GeneratesCorrectMessageForStdString) {
- EXPECT_STREQ("Value of: needle_expr\n"
- " Actual: \"needle\"\n"
- "Expected: not a substring of haystack_expr\n"
- "Which is: \"two needles\"",
- IsNotSubstring(
- "needle_expr", "haystack_expr",
- ::std::string("needle"), "two needles").failure_message());
-}
-
-#if GTEST_HAS_STD_WSTRING
-
-// Tests that IsNotSubstring returns the correct result when the input
-// argument type is ::std::wstring.
-TEST(IsNotSubstringTest, ReturnsCorrectResultForStdWstring) {
- EXPECT_FALSE(
- IsNotSubstring("", "", ::std::wstring(L"needle"), L"two needles"));
- EXPECT_TRUE(IsNotSubstring("", "", L"needle", ::std::wstring(L"haystack")));
-}
-
-#endif // GTEST_HAS_STD_WSTRING
-
-// Tests floating-point assertions.
-
-template <typename RawType>
-class FloatingPointTest : public Test {
- protected:
-
- // Pre-calculated numbers to be used by the tests.
- struct TestValues {
- RawType close_to_positive_zero;
- RawType close_to_negative_zero;
- RawType further_from_negative_zero;
-
- RawType close_to_one;
- RawType further_from_one;
-
- RawType infinity;
- RawType close_to_infinity;
- RawType further_from_infinity;
-
- RawType nan1;
- RawType nan2;
- };
-
- typedef typename testing::internal::FloatingPoint<RawType> Floating;
- typedef typename Floating::Bits Bits;
-
- virtual void SetUp() {
- const size_t max_ulps = Floating::kMaxUlps;
-
- // The bits that represent 0.0.
- const Bits zero_bits = Floating(0).bits();
-
- // Makes some numbers close to 0.0.
- values_.close_to_positive_zero = Floating::ReinterpretBits(
- zero_bits + max_ulps/2);
- values_.close_to_negative_zero = -Floating::ReinterpretBits(
- zero_bits + max_ulps - max_ulps/2);
- values_.further_from_negative_zero = -Floating::ReinterpretBits(
- zero_bits + max_ulps + 1 - max_ulps/2);
-
- // The bits that represent 1.0.
- const Bits one_bits = Floating(1).bits();
-
- // Makes some numbers close to 1.0.
- values_.close_to_one = Floating::ReinterpretBits(one_bits + max_ulps);
- values_.further_from_one = Floating::ReinterpretBits(
- one_bits + max_ulps + 1);
-
- // +infinity.
- values_.infinity = Floating::Infinity();
-
- // The bits that represent +infinity.
- const Bits infinity_bits = Floating(values_.infinity).bits();
-
- // Makes some numbers close to infinity.
- values_.close_to_infinity = Floating::ReinterpretBits(
- infinity_bits - max_ulps);
- values_.further_from_infinity = Floating::ReinterpretBits(
- infinity_bits - max_ulps - 1);
-
- // Makes some NAN's. Sets the most significant bit of the fraction so that
- // our NaN's are quiet; trying to process a signaling NaN would raise an
- // exception if our environment enables floating point exceptions.
- values_.nan1 = Floating::ReinterpretBits(Floating::kExponentBitMask
- | (static_cast<Bits>(1) << (Floating::kFractionBitCount - 1)) | 1);
- values_.nan2 = Floating::ReinterpretBits(Floating::kExponentBitMask
- | (static_cast<Bits>(1) << (Floating::kFractionBitCount - 1)) | 200);
- }
-
- void TestSize() {
- EXPECT_EQ(sizeof(RawType), sizeof(Bits));
- }
-
- static TestValues values_;
-};
-
-template <typename RawType>
-typename FloatingPointTest<RawType>::TestValues
- FloatingPointTest<RawType>::values_;
-
-// Instantiates FloatingPointTest for testing *_FLOAT_EQ.
-typedef FloatingPointTest<float> FloatTest;
-
-// Tests that the size of Float::Bits matches the size of float.
-TEST_F(FloatTest, Size) {
- TestSize();
-}
-
-// Tests comparing with +0 and -0.
-TEST_F(FloatTest, Zeros) {
- EXPECT_FLOAT_EQ(0.0, -0.0);
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(-0.0, 1.0),
- "1.0");
- EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.5),
- "1.5");
-}
-
-// Tests comparing numbers close to 0.
-//
-// This ensures that *_FLOAT_EQ handles the sign correctly and no
-// overflow occurs when comparing numbers whose absolute value is very
-// small.
-TEST_F(FloatTest, AlmostZeros) {
- // In C++Builder, names within local classes (such as used by
- // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the
- // scoping class. Use a static local alias as a workaround.
- // We use the assignment syntax since some compilers, like Sun Studio,
- // don't allow initializing references using construction syntax
- // (parentheses).
- static const FloatTest::TestValues& v = this->values_;
-
- EXPECT_FLOAT_EQ(0.0, v.close_to_positive_zero);
- EXPECT_FLOAT_EQ(-0.0, v.close_to_negative_zero);
- EXPECT_FLOAT_EQ(v.close_to_positive_zero, v.close_to_negative_zero);
-
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_FLOAT_EQ(v.close_to_positive_zero,
- v.further_from_negative_zero);
- }, "v.further_from_negative_zero");
-}
-
-// Tests comparing numbers close to each other.
-TEST_F(FloatTest, SmallDiff) {
- EXPECT_FLOAT_EQ(1.0, values_.close_to_one);
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(1.0, values_.further_from_one),
- "values_.further_from_one");
-}
-
-// Tests comparing numbers far apart.
-TEST_F(FloatTest, LargeDiff) {
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(2.5, 3.0),
- "3.0");
-}
-
-// Tests comparing with infinity.
-//
-// This ensures that no overflow occurs when comparing numbers whose
-// absolute value is very large.
-TEST_F(FloatTest, Infinity) {
- EXPECT_FLOAT_EQ(values_.infinity, values_.close_to_infinity);
- EXPECT_FLOAT_EQ(-values_.infinity, -values_.close_to_infinity);
-#if !GTEST_OS_SYMBIAN
- // Nokia's STLport crashes if we try to output infinity or NaN.
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.infinity, -values_.infinity),
- "-values_.infinity");
-
- // This is interesting as the representations of infinity and nan1
- // are only 1 DLP apart.
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.infinity, values_.nan1),
- "values_.nan1");
-#endif // !GTEST_OS_SYMBIAN
-}
-
-// Tests that comparing with NAN always returns false.
-TEST_F(FloatTest, NaN) {
-#if !GTEST_OS_SYMBIAN
-// Nokia's STLport crashes if we try to output infinity or NaN.
-
- // In C++Builder, names within local classes (such as used by
- // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the
- // scoping class. Use a static local alias as a workaround.
- // We use the assignment syntax since some compilers, like Sun Studio,
- // don't allow initializing references using construction syntax
- // (parentheses).
- static const FloatTest::TestValues& v = this->values_;
-
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(v.nan1, v.nan1),
- "v.nan1");
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(v.nan1, v.nan2),
- "v.nan2");
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(1.0, v.nan1),
- "v.nan1");
-
- EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(v.nan1, v.infinity),
- "v.infinity");
-#endif // !GTEST_OS_SYMBIAN
-}
-
-// Tests that *_FLOAT_EQ are reflexive.
-TEST_F(FloatTest, Reflexive) {
- EXPECT_FLOAT_EQ(0.0, 0.0);
- EXPECT_FLOAT_EQ(1.0, 1.0);
- ASSERT_FLOAT_EQ(values_.infinity, values_.infinity);
-}
-
-// Tests that *_FLOAT_EQ are commutative.
-TEST_F(FloatTest, Commutative) {
- // We already tested EXPECT_FLOAT_EQ(1.0, values_.close_to_one).
- EXPECT_FLOAT_EQ(values_.close_to_one, 1.0);
-
- // We already tested EXPECT_FLOAT_EQ(1.0, values_.further_from_one).
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.further_from_one, 1.0),
- "1.0");
-}
-
-// Tests EXPECT_NEAR.
-TEST_F(FloatTest, EXPECT_NEAR) {
- EXPECT_NEAR(-1.0f, -1.1f, 0.2f);
- EXPECT_NEAR(2.0f, 3.0f, 1.0f);
- EXPECT_NONFATAL_FAILURE(EXPECT_NEAR(1.0f,1.5f, 0.25f), // NOLINT
- "The difference between 1.0f and 1.5f is 0.5, "
- "which exceeds 0.25f");
- // To work around a bug in gcc 2.95.0, there is intentionally no
- // space after the first comma in the previous line.
-}
-
-// Tests ASSERT_NEAR.
-TEST_F(FloatTest, ASSERT_NEAR) {
- ASSERT_NEAR(-1.0f, -1.1f, 0.2f);
- ASSERT_NEAR(2.0f, 3.0f, 1.0f);
- EXPECT_FATAL_FAILURE(ASSERT_NEAR(1.0f,1.5f, 0.25f), // NOLINT
- "The difference between 1.0f and 1.5f is 0.5, "
- "which exceeds 0.25f");
- // To work around a bug in gcc 2.95.0, there is intentionally no
- // space after the first comma in the previous line.
-}
-
-// Tests the cases where FloatLE() should succeed.
-TEST_F(FloatTest, FloatLESucceeds) {
- EXPECT_PRED_FORMAT2(FloatLE, 1.0f, 2.0f); // When val1 < val2,
- ASSERT_PRED_FORMAT2(FloatLE, 1.0f, 1.0f); // val1 == val2,
-
- // or when val1 is greater than, but almost equals to, val2.
- EXPECT_PRED_FORMAT2(FloatLE, values_.close_to_positive_zero, 0.0f);
-}
-
-// Tests the cases where FloatLE() should fail.
-TEST_F(FloatTest, FloatLEFails) {
- // When val1 is greater than val2 by a large margin,
- EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT2(FloatLE, 2.0f, 1.0f),
- "(2.0f) <= (1.0f)");
-
- // or by a small yet non-negligible margin,
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(FloatLE, values_.further_from_one, 1.0f);
- }, "(values_.further_from_one) <= (1.0f)");
-
-#if !GTEST_OS_SYMBIAN && !defined(__BORLANDC__)
- // Nokia's STLport crashes if we try to output infinity or NaN.
- // C++Builder gives bad results for ordered comparisons involving NaNs
- // due to compiler bugs.
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(FloatLE, values_.nan1, values_.infinity);
- }, "(values_.nan1) <= (values_.infinity)");
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(FloatLE, -values_.infinity, values_.nan1);
- }, "(-values_.infinity) <= (values_.nan1)");
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT2(FloatLE, values_.nan1, values_.nan1);
- }, "(values_.nan1) <= (values_.nan1)");
-#endif // !GTEST_OS_SYMBIAN && !defined(__BORLANDC__)
-}
-
-// Instantiates FloatingPointTest for testing *_DOUBLE_EQ.
-typedef FloatingPointTest<double> DoubleTest;
-
-// Tests that the size of Double::Bits matches the size of double.
-TEST_F(DoubleTest, Size) {
- TestSize();
-}
-
-// Tests comparing with +0 and -0.
-TEST_F(DoubleTest, Zeros) {
- EXPECT_DOUBLE_EQ(0.0, -0.0);
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(-0.0, 1.0),
- "1.0");
- EXPECT_FATAL_FAILURE(ASSERT_DOUBLE_EQ(0.0, 1.0),
- "1.0");
-}
-
-// Tests comparing numbers close to 0.
-//
-// This ensures that *_DOUBLE_EQ handles the sign correctly and no
-// overflow occurs when comparing numbers whose absolute value is very
-// small.
-TEST_F(DoubleTest, AlmostZeros) {
- // In C++Builder, names within local classes (such as used by
- // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the
- // scoping class. Use a static local alias as a workaround.
- // We use the assignment syntax since some compilers, like Sun Studio,
- // don't allow initializing references using construction syntax
- // (parentheses).
- static const DoubleTest::TestValues& v = this->values_;
-
- EXPECT_DOUBLE_EQ(0.0, v.close_to_positive_zero);
- EXPECT_DOUBLE_EQ(-0.0, v.close_to_negative_zero);
- EXPECT_DOUBLE_EQ(v.close_to_positive_zero, v.close_to_negative_zero);
-
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_DOUBLE_EQ(v.close_to_positive_zero,
- v.further_from_negative_zero);
- }, "v.further_from_negative_zero");
-}
-
-// Tests comparing numbers close to each other.
-TEST_F(DoubleTest, SmallDiff) {
- EXPECT_DOUBLE_EQ(1.0, values_.close_to_one);
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(1.0, values_.further_from_one),
- "values_.further_from_one");
-}
-
-// Tests comparing numbers far apart.
-TEST_F(DoubleTest, LargeDiff) {
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(2.0, 3.0),
- "3.0");
-}
-
-// Tests comparing with infinity.
-//
-// This ensures that no overflow occurs when comparing numbers whose
-// absolute value is very large.
-TEST_F(DoubleTest, Infinity) {
- EXPECT_DOUBLE_EQ(values_.infinity, values_.close_to_infinity);
- EXPECT_DOUBLE_EQ(-values_.infinity, -values_.close_to_infinity);
-#if !GTEST_OS_SYMBIAN
- // Nokia's STLport crashes if we try to output infinity or NaN.
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.infinity, -values_.infinity),
- "-values_.infinity");
-
- // This is interesting as the representations of infinity_ and nan1_
- // are only 1 DLP apart.
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.infinity, values_.nan1),
- "values_.nan1");
-#endif // !GTEST_OS_SYMBIAN
-}
-
-// Tests that comparing with NAN always returns false.
-TEST_F(DoubleTest, NaN) {
-#if !GTEST_OS_SYMBIAN
- // In C++Builder, names within local classes (such as used by
- // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the
- // scoping class. Use a static local alias as a workaround.
- // We use the assignment syntax since some compilers, like Sun Studio,
- // don't allow initializing references using construction syntax
- // (parentheses).
- static const DoubleTest::TestValues& v = this->values_;
-
- // Nokia's STLport crashes if we try to output infinity or NaN.
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(v.nan1, v.nan1),
- "v.nan1");
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(v.nan1, v.nan2), "v.nan2");
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(1.0, v.nan1), "v.nan1");
- EXPECT_FATAL_FAILURE(ASSERT_DOUBLE_EQ(v.nan1, v.infinity),
- "v.infinity");
-#endif // !GTEST_OS_SYMBIAN
-}
-
-// Tests that *_DOUBLE_EQ are reflexive.
-TEST_F(DoubleTest, Reflexive) {
- EXPECT_DOUBLE_EQ(0.0, 0.0);
- EXPECT_DOUBLE_EQ(1.0, 1.0);
-#if !GTEST_OS_SYMBIAN
- // Nokia's STLport crashes if we try to output infinity or NaN.
- ASSERT_DOUBLE_EQ(values_.infinity, values_.infinity);
-#endif // !GTEST_OS_SYMBIAN
-}
-
-// Tests that *_DOUBLE_EQ are commutative.
-TEST_F(DoubleTest, Commutative) {
- // We already tested EXPECT_DOUBLE_EQ(1.0, values_.close_to_one).
- EXPECT_DOUBLE_EQ(values_.close_to_one, 1.0);
-
- // We already tested EXPECT_DOUBLE_EQ(1.0, values_.further_from_one).
- EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.further_from_one, 1.0),
- "1.0");
-}
-
-// Tests EXPECT_NEAR.
-TEST_F(DoubleTest, EXPECT_NEAR) {
- EXPECT_NEAR(-1.0, -1.1, 0.2);
- EXPECT_NEAR(2.0, 3.0, 1.0);
- EXPECT_NONFATAL_FAILURE(EXPECT_NEAR(1.0, 1.5, 0.25), // NOLINT
- "The difference between 1.0 and 1.5 is 0.5, "
- "which exceeds 0.25");
- // To work around a bug in gcc 2.95.0, there is intentionally no
- // space after the first comma in the previous statement.
-}
-
-// Tests ASSERT_NEAR.
-TEST_F(DoubleTest, ASSERT_NEAR) {
- ASSERT_NEAR(-1.0, -1.1, 0.2);
- ASSERT_NEAR(2.0, 3.0, 1.0);
- EXPECT_FATAL_FAILURE(ASSERT_NEAR(1.0, 1.5, 0.25), // NOLINT
- "The difference between 1.0 and 1.5 is 0.5, "
- "which exceeds 0.25");
- // To work around a bug in gcc 2.95.0, there is intentionally no
- // space after the first comma in the previous statement.
-}
-
-// Tests the cases where DoubleLE() should succeed.
-TEST_F(DoubleTest, DoubleLESucceeds) {
- EXPECT_PRED_FORMAT2(DoubleLE, 1.0, 2.0); // When val1 < val2,
- ASSERT_PRED_FORMAT2(DoubleLE, 1.0, 1.0); // val1 == val2,
-
- // or when val1 is greater than, but almost equals to, val2.
- EXPECT_PRED_FORMAT2(DoubleLE, values_.close_to_positive_zero, 0.0);
-}
-
-// Tests the cases where DoubleLE() should fail.
-TEST_F(DoubleTest, DoubleLEFails) {
- // When val1 is greater than val2 by a large margin,
- EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT2(DoubleLE, 2.0, 1.0),
- "(2.0) <= (1.0)");
-
- // or by a small yet non-negligible margin,
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(DoubleLE, values_.further_from_one, 1.0);
- }, "(values_.further_from_one) <= (1.0)");
-
-#if !GTEST_OS_SYMBIAN && !defined(__BORLANDC__)
- // Nokia's STLport crashes if we try to output infinity or NaN.
- // C++Builder gives bad results for ordered comparisons involving NaNs
- // due to compiler bugs.
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(DoubleLE, values_.nan1, values_.infinity);
- }, "(values_.nan1) <= (values_.infinity)");
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_PRED_FORMAT2(DoubleLE, -values_.infinity, values_.nan1);
- }, " (-values_.infinity) <= (values_.nan1)");
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_PRED_FORMAT2(DoubleLE, values_.nan1, values_.nan1);
- }, "(values_.nan1) <= (values_.nan1)");
-#endif // !GTEST_OS_SYMBIAN && !defined(__BORLANDC__)
-}
-
-
-// Verifies that a test or test case whose name starts with DISABLED_ is
-// not run.
-
-// A test whose name starts with DISABLED_.
-// Should not run.
-TEST(DisabledTest, DISABLED_TestShouldNotRun) {
- FAIL() << "Unexpected failure: Disabled test should not be run.";
-}
-
-// A test whose name does not start with DISABLED_.
-// Should run.
-TEST(DisabledTest, NotDISABLED_TestShouldRun) {
- EXPECT_EQ(1, 1);
-}
-
-// A test case whose name starts with DISABLED_.
-// Should not run.
-TEST(DISABLED_TestCase, TestShouldNotRun) {
- FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
-}
-
-// A test case and test whose names start with DISABLED_.
-// Should not run.
-TEST(DISABLED_TestCase, DISABLED_TestShouldNotRun) {
- FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
-}
-
-// Check that when all tests in a test case are disabled, SetupTestCase() and
-// TearDownTestCase() are not called.
-class DisabledTestsTest : public Test {
- protected:
- static void SetUpTestCase() {
- FAIL() << "Unexpected failure: All tests disabled in test case. "
- "SetupTestCase() should not be called.";
- }
-
- static void TearDownTestCase() {
- FAIL() << "Unexpected failure: All tests disabled in test case. "
- "TearDownTestCase() should not be called.";
- }
-};
-
-TEST_F(DisabledTestsTest, DISABLED_TestShouldNotRun_1) {
- FAIL() << "Unexpected failure: Disabled test should not be run.";
-}
-
-TEST_F(DisabledTestsTest, DISABLED_TestShouldNotRun_2) {
- FAIL() << "Unexpected failure: Disabled test should not be run.";
-}
-
-// Tests that disabled typed tests aren't run.
-
-#if GTEST_HAS_TYPED_TEST
-
-template <typename T>
-class TypedTest : public Test {
-};
-
-typedef testing::Types<int, double> NumericTypes;
-TYPED_TEST_CASE(TypedTest, NumericTypes);
-
-TYPED_TEST(TypedTest, DISABLED_ShouldNotRun) {
- FAIL() << "Unexpected failure: Disabled typed test should not run.";
-}
-
-template <typename T>
-class DISABLED_TypedTest : public Test {
-};
-
-TYPED_TEST_CASE(DISABLED_TypedTest, NumericTypes);
-
-TYPED_TEST(DISABLED_TypedTest, ShouldNotRun) {
- FAIL() << "Unexpected failure: Disabled typed test should not run.";
-}
-
-#endif // GTEST_HAS_TYPED_TEST
-
-// Tests that disabled type-parameterized tests aren't run.
-
-#if GTEST_HAS_TYPED_TEST_P
-
-template <typename T>
-class TypedTestP : public Test {
-};
-
-TYPED_TEST_CASE_P(TypedTestP);
-
-TYPED_TEST_P(TypedTestP, DISABLED_ShouldNotRun) {
- FAIL() << "Unexpected failure: "
- << "Disabled type-parameterized test should not run.";
-}
-
-REGISTER_TYPED_TEST_CASE_P(TypedTestP, DISABLED_ShouldNotRun);
-
-INSTANTIATE_TYPED_TEST_CASE_P(My, TypedTestP, NumericTypes);
-
-template <typename T>
-class DISABLED_TypedTestP : public Test {
-};
-
-TYPED_TEST_CASE_P(DISABLED_TypedTestP);
-
-TYPED_TEST_P(DISABLED_TypedTestP, ShouldNotRun) {
- FAIL() << "Unexpected failure: "
- << "Disabled type-parameterized test should not run.";
-}
-
-REGISTER_TYPED_TEST_CASE_P(DISABLED_TypedTestP, ShouldNotRun);
-
-INSTANTIATE_TYPED_TEST_CASE_P(My, DISABLED_TypedTestP, NumericTypes);
-
-#endif // GTEST_HAS_TYPED_TEST_P
-
-// Tests that assertion macros evaluate their arguments exactly once.
-
-class SingleEvaluationTest : public Test {
- public: // Must be public and not protected due to a bug in g++ 3.4.2.
- // This helper function is needed by the FailedASSERT_STREQ test
- // below. It's public to work around C++Builder's bug with scoping local
- // classes.
- static void CompareAndIncrementCharPtrs() {
- ASSERT_STREQ(p1_++, p2_++);
- }
-
- // This helper function is needed by the FailedASSERT_NE test below. It's
- // public to work around C++Builder's bug with scoping local classes.
- static void CompareAndIncrementInts() {
- ASSERT_NE(a_++, b_++);
- }
-
- protected:
- SingleEvaluationTest() {
- p1_ = s1_;
- p2_ = s2_;
- a_ = 0;
- b_ = 0;
- }
-
- static const char* const s1_;
- static const char* const s2_;
- static const char* p1_;
- static const char* p2_;
-
- static int a_;
- static int b_;
-};
-
-const char* const SingleEvaluationTest::s1_ = "01234";
-const char* const SingleEvaluationTest::s2_ = "abcde";
-const char* SingleEvaluationTest::p1_;
-const char* SingleEvaluationTest::p2_;
-int SingleEvaluationTest::a_;
-int SingleEvaluationTest::b_;
-
-// Tests that when ASSERT_STREQ fails, it evaluates its arguments
-// exactly once.
-TEST_F(SingleEvaluationTest, FailedASSERT_STREQ) {
- EXPECT_FATAL_FAILURE(SingleEvaluationTest::CompareAndIncrementCharPtrs(),
- "p2_++");
- EXPECT_EQ(s1_ + 1, p1_);
- EXPECT_EQ(s2_ + 1, p2_);
-}
-
-// Tests that string assertion arguments are evaluated exactly once.
-TEST_F(SingleEvaluationTest, ASSERT_STR) {
- // successful EXPECT_STRNE
- EXPECT_STRNE(p1_++, p2_++);
- EXPECT_EQ(s1_ + 1, p1_);
- EXPECT_EQ(s2_ + 1, p2_);
-
- // failed EXPECT_STRCASEEQ
- EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ(p1_++, p2_++),
- "ignoring case");
- EXPECT_EQ(s1_ + 2, p1_);
- EXPECT_EQ(s2_ + 2, p2_);
-}
-
-// Tests that when ASSERT_NE fails, it evaluates its arguments exactly
-// once.
-TEST_F(SingleEvaluationTest, FailedASSERT_NE) {
- EXPECT_FATAL_FAILURE(SingleEvaluationTest::CompareAndIncrementInts(),
- "(a_++) != (b_++)");
- EXPECT_EQ(1, a_);
- EXPECT_EQ(1, b_);
-}
-
-// Tests that assertion arguments are evaluated exactly once.
-TEST_F(SingleEvaluationTest, OtherCases) {
- // successful EXPECT_TRUE
- EXPECT_TRUE(0 == a_++); // NOLINT
- EXPECT_EQ(1, a_);
-
- // failed EXPECT_TRUE
- EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(-1 == a_++), "-1 == a_++");
- EXPECT_EQ(2, a_);
-
- // successful EXPECT_GT
- EXPECT_GT(a_++, b_++);
- EXPECT_EQ(3, a_);
- EXPECT_EQ(1, b_);
-
- // failed EXPECT_LT
- EXPECT_NONFATAL_FAILURE(EXPECT_LT(a_++, b_++), "(a_++) < (b_++)");
- EXPECT_EQ(4, a_);
- EXPECT_EQ(2, b_);
-
- // successful ASSERT_TRUE
- ASSERT_TRUE(0 < a_++); // NOLINT
- EXPECT_EQ(5, a_);
-
- // successful ASSERT_GT
- ASSERT_GT(a_++, b_++);
- EXPECT_EQ(6, a_);
- EXPECT_EQ(3, b_);
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-void ThrowAnInteger() {
- throw 1;
-}
-
-// Tests that assertion arguments are evaluated exactly once.
-TEST_F(SingleEvaluationTest, ExceptionTests) {
- // successful EXPECT_THROW
- EXPECT_THROW({ // NOLINT
- a_++;
- ThrowAnInteger();
- }, int);
- EXPECT_EQ(1, a_);
-
- // failed EXPECT_THROW, throws different
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW({ // NOLINT
- a_++;
- ThrowAnInteger();
- }, bool), "throws a different type");
- EXPECT_EQ(2, a_);
-
- // failed EXPECT_THROW, throws nothing
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW(a_++, bool), "throws nothing");
- EXPECT_EQ(3, a_);
-
- // successful EXPECT_NO_THROW
- EXPECT_NO_THROW(a_++);
- EXPECT_EQ(4, a_);
-
- // failed EXPECT_NO_THROW
- EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW({ // NOLINT
- a_++;
- ThrowAnInteger();
- }), "it throws");
- EXPECT_EQ(5, a_);
-
- // successful EXPECT_ANY_THROW
- EXPECT_ANY_THROW({ // NOLINT
- a_++;
- ThrowAnInteger();
- });
- EXPECT_EQ(6, a_);
-
- // failed EXPECT_ANY_THROW
- EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(a_++), "it doesn't");
- EXPECT_EQ(7, a_);
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Tests {ASSERT|EXPECT}_NO_FATAL_FAILURE.
-class NoFatalFailureTest : public Test {
- protected:
- void Succeeds() {}
- void FailsNonFatal() {
- ADD_FAILURE() << "some non-fatal failure";
- }
- void Fails() {
- FAIL() << "some fatal failure";
- }
-
- void DoAssertNoFatalFailureOnFails() {
- ASSERT_NO_FATAL_FAILURE(Fails());
- ADD_FAILURE() << "shold not reach here.";
- }
-
- void DoExpectNoFatalFailureOnFails() {
- EXPECT_NO_FATAL_FAILURE(Fails());
- ADD_FAILURE() << "other failure";
- }
-};
-
-TEST_F(NoFatalFailureTest, NoFailure) {
- EXPECT_NO_FATAL_FAILURE(Succeeds());
- ASSERT_NO_FATAL_FAILURE(Succeeds());
-}
-
-TEST_F(NoFatalFailureTest, NonFatalIsNoFailure) {
- EXPECT_NONFATAL_FAILURE(
- EXPECT_NO_FATAL_FAILURE(FailsNonFatal()),
- "some non-fatal failure");
- EXPECT_NONFATAL_FAILURE(
- ASSERT_NO_FATAL_FAILURE(FailsNonFatal()),
- "some non-fatal failure");
-}
-
-TEST_F(NoFatalFailureTest, AssertNoFatalFailureOnFatalFailure) {
- TestPartResultArray gtest_failures;
- {
- ScopedFakeTestPartResultReporter gtest_reporter(&gtest_failures);
- DoAssertNoFatalFailureOnFails();
- }
- ASSERT_EQ(2, gtest_failures.size());
- EXPECT_EQ(TestPartResult::kFatalFailure,
- gtest_failures.GetTestPartResult(0).type());
- EXPECT_EQ(TestPartResult::kFatalFailure,
- gtest_failures.GetTestPartResult(1).type());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure",
- gtest_failures.GetTestPartResult(0).message());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "it does",
- gtest_failures.GetTestPartResult(1).message());
-}
-
-TEST_F(NoFatalFailureTest, ExpectNoFatalFailureOnFatalFailure) {
- TestPartResultArray gtest_failures;
- {
- ScopedFakeTestPartResultReporter gtest_reporter(&gtest_failures);
- DoExpectNoFatalFailureOnFails();
- }
- ASSERT_EQ(3, gtest_failures.size());
- EXPECT_EQ(TestPartResult::kFatalFailure,
- gtest_failures.GetTestPartResult(0).type());
- EXPECT_EQ(TestPartResult::kNonFatalFailure,
- gtest_failures.GetTestPartResult(1).type());
- EXPECT_EQ(TestPartResult::kNonFatalFailure,
- gtest_failures.GetTestPartResult(2).type());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure",
- gtest_failures.GetTestPartResult(0).message());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "it does",
- gtest_failures.GetTestPartResult(1).message());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "other failure",
- gtest_failures.GetTestPartResult(2).message());
-}
-
-TEST_F(NoFatalFailureTest, MessageIsStreamable) {
- TestPartResultArray gtest_failures;
- {
- ScopedFakeTestPartResultReporter gtest_reporter(&gtest_failures);
- EXPECT_NO_FATAL_FAILURE(FAIL() << "foo") << "my message";
- }
- ASSERT_EQ(2, gtest_failures.size());
- EXPECT_EQ(TestPartResult::kNonFatalFailure,
- gtest_failures.GetTestPartResult(0).type());
- EXPECT_EQ(TestPartResult::kNonFatalFailure,
- gtest_failures.GetTestPartResult(1).type());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "foo",
- gtest_failures.GetTestPartResult(0).message());
- EXPECT_PRED_FORMAT2(testing::IsSubstring, "my message",
- gtest_failures.GetTestPartResult(1).message());
-}
-
-// Tests non-string assertions.
-
-// Tests EqFailure(), used for implementing *EQ* assertions.
-TEST(AssertionTest, EqFailure) {
- const String foo_val("5"), bar_val("6");
- const String msg1(
- EqFailure("foo", "bar", foo_val, bar_val, false)
- .failure_message());
- EXPECT_STREQ(
- "Value of: bar\n"
- " Actual: 6\n"
- "Expected: foo\n"
- "Which is: 5",
- msg1.c_str());
-
- const String msg2(
- EqFailure("foo", "6", foo_val, bar_val, false)
- .failure_message());
- EXPECT_STREQ(
- "Value of: 6\n"
- "Expected: foo\n"
- "Which is: 5",
- msg2.c_str());
-
- const String msg3(
- EqFailure("5", "bar", foo_val, bar_val, false)
- .failure_message());
- EXPECT_STREQ(
- "Value of: bar\n"
- " Actual: 6\n"
- "Expected: 5",
- msg3.c_str());
-
- const String msg4(
- EqFailure("5", "6", foo_val, bar_val, false).failure_message());
- EXPECT_STREQ(
- "Value of: 6\n"
- "Expected: 5",
- msg4.c_str());
-
- const String msg5(
- EqFailure("foo", "bar",
- String("\"x\""), String("\"y\""),
- true).failure_message());
- EXPECT_STREQ(
- "Value of: bar\n"
- " Actual: \"y\"\n"
- "Expected: foo (ignoring case)\n"
- "Which is: \"x\"",
- msg5.c_str());
-}
-
-// Tests AppendUserMessage(), used for implementing the *EQ* macros.
-TEST(AssertionTest, AppendUserMessage) {
- const String foo("foo");
-
- Message msg;
- EXPECT_STREQ("foo",
- AppendUserMessage(foo, msg).c_str());
-
- msg << "bar";
- EXPECT_STREQ("foo\nbar",
- AppendUserMessage(foo, msg).c_str());
-}
-
-#ifdef __BORLANDC__
-// Silences warnings: "Condition is always true", "Unreachable code"
-# pragma option push -w-ccc -w-rch
-#endif
-
-// Tests ASSERT_TRUE.
-TEST(AssertionTest, ASSERT_TRUE) {
- ASSERT_TRUE(2 > 1); // NOLINT
- EXPECT_FATAL_FAILURE(ASSERT_TRUE(2 < 1),
- "2 < 1");
-}
-
-// Tests ASSERT_TRUE(predicate) for predicates returning AssertionResult.
-TEST(AssertionTest, AssertTrueWithAssertionResult) {
- ASSERT_TRUE(ResultIsEven(2));
-#ifndef __BORLANDC__
- // ICE's in C++Builder.
- EXPECT_FATAL_FAILURE(ASSERT_TRUE(ResultIsEven(3)),
- "Value of: ResultIsEven(3)\n"
- " Actual: false (3 is odd)\n"
- "Expected: true");
-#endif
- ASSERT_TRUE(ResultIsEvenNoExplanation(2));
- EXPECT_FATAL_FAILURE(ASSERT_TRUE(ResultIsEvenNoExplanation(3)),
- "Value of: ResultIsEvenNoExplanation(3)\n"
- " Actual: false (3 is odd)\n"
- "Expected: true");
-}
-
-// Tests ASSERT_FALSE.
-TEST(AssertionTest, ASSERT_FALSE) {
- ASSERT_FALSE(2 < 1); // NOLINT
- EXPECT_FATAL_FAILURE(ASSERT_FALSE(2 > 1),
- "Value of: 2 > 1\n"
- " Actual: true\n"
- "Expected: false");
-}
-
-// Tests ASSERT_FALSE(predicate) for predicates returning AssertionResult.
-TEST(AssertionTest, AssertFalseWithAssertionResult) {
- ASSERT_FALSE(ResultIsEven(3));
-#ifndef __BORLANDC__
- // ICE's in C++Builder.
- EXPECT_FATAL_FAILURE(ASSERT_FALSE(ResultIsEven(2)),
- "Value of: ResultIsEven(2)\n"
- " Actual: true (2 is even)\n"
- "Expected: false");
-#endif
- ASSERT_FALSE(ResultIsEvenNoExplanation(3));
- EXPECT_FATAL_FAILURE(ASSERT_FALSE(ResultIsEvenNoExplanation(2)),
- "Value of: ResultIsEvenNoExplanation(2)\n"
- " Actual: true\n"
- "Expected: false");
-}
-
-#ifdef __BORLANDC__
-// Restores warnings after previous "#pragma option push" supressed them
-# pragma option pop
-#endif
-
-// Tests using ASSERT_EQ on double values. The purpose is to make
-// sure that the specialization we did for integer and anonymous enums
-// isn't used for double arguments.
-TEST(ExpectTest, ASSERT_EQ_Double) {
- // A success.
- ASSERT_EQ(5.6, 5.6);
-
- // A failure.
- EXPECT_FATAL_FAILURE(ASSERT_EQ(5.1, 5.2),
- "5.1");
-}
-
-// Tests ASSERT_EQ.
-TEST(AssertionTest, ASSERT_EQ) {
- ASSERT_EQ(5, 2 + 3);
- EXPECT_FATAL_FAILURE(ASSERT_EQ(5, 2*3),
- "Value of: 2*3\n"
- " Actual: 6\n"
- "Expected: 5");
-}
-
-// Tests ASSERT_EQ(NULL, pointer).
-#if GTEST_CAN_COMPARE_NULL
-TEST(AssertionTest, ASSERT_EQ_NULL) {
- // A success.
- const char* p = NULL;
- // Some older GCC versions may issue a spurious waring in this or the next
- // assertion statement. This warning should not be suppressed with
- // static_cast since the test verifies the ability to use bare NULL as the
- // expected parameter to the macro.
- ASSERT_EQ(NULL, p);
-
- // A failure.
- static int n = 0;
- EXPECT_FATAL_FAILURE(ASSERT_EQ(NULL, &n),
- "Value of: &n\n");
-}
-#endif // GTEST_CAN_COMPARE_NULL
-
-// Tests ASSERT_EQ(0, non_pointer). Since the literal 0 can be
-// treated as a null pointer by the compiler, we need to make sure
-// that ASSERT_EQ(0, non_pointer) isn't interpreted by Google Test as
-// ASSERT_EQ(static_cast<void*>(NULL), non_pointer).
-TEST(ExpectTest, ASSERT_EQ_0) {
- int n = 0;
-
- // A success.
- ASSERT_EQ(0, n);
-
- // A failure.
- EXPECT_FATAL_FAILURE(ASSERT_EQ(0, 5.6),
- "Expected: 0");
-}
-
-// Tests ASSERT_NE.
-TEST(AssertionTest, ASSERT_NE) {
- ASSERT_NE(6, 7);
- EXPECT_FATAL_FAILURE(ASSERT_NE('a', 'a'),
- "Expected: ('a') != ('a'), "
- "actual: 'a' (97, 0x61) vs 'a' (97, 0x61)");
-}
-
-// Tests ASSERT_LE.
-TEST(AssertionTest, ASSERT_LE) {
- ASSERT_LE(2, 3);
- ASSERT_LE(2, 2);
- EXPECT_FATAL_FAILURE(ASSERT_LE(2, 0),
- "Expected: (2) <= (0), actual: 2 vs 0");
-}
-
-// Tests ASSERT_LT.
-TEST(AssertionTest, ASSERT_LT) {
- ASSERT_LT(2, 3);
- EXPECT_FATAL_FAILURE(ASSERT_LT(2, 2),
- "Expected: (2) < (2), actual: 2 vs 2");
-}
-
-// Tests ASSERT_GE.
-TEST(AssertionTest, ASSERT_GE) {
- ASSERT_GE(2, 1);
- ASSERT_GE(2, 2);
- EXPECT_FATAL_FAILURE(ASSERT_GE(2, 3),
- "Expected: (2) >= (3), actual: 2 vs 3");
-}
-
-// Tests ASSERT_GT.
-TEST(AssertionTest, ASSERT_GT) {
- ASSERT_GT(2, 1);
- EXPECT_FATAL_FAILURE(ASSERT_GT(2, 2),
- "Expected: (2) > (2), actual: 2 vs 2");
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-void ThrowNothing() {}
-
-// Tests ASSERT_THROW.
-TEST(AssertionTest, ASSERT_THROW) {
- ASSERT_THROW(ThrowAnInteger(), int);
-
-# ifndef __BORLANDC__
-
- // ICE's in C++Builder 2007 and 2009.
- EXPECT_FATAL_FAILURE(
- ASSERT_THROW(ThrowAnInteger(), bool),
- "Expected: ThrowAnInteger() throws an exception of type bool.\n"
- " Actual: it throws a different type.");
-# endif
-
- EXPECT_FATAL_FAILURE(
- ASSERT_THROW(ThrowNothing(), bool),
- "Expected: ThrowNothing() throws an exception of type bool.\n"
- " Actual: it throws nothing.");
-}
-
-// Tests ASSERT_NO_THROW.
-TEST(AssertionTest, ASSERT_NO_THROW) {
- ASSERT_NO_THROW(ThrowNothing());
- EXPECT_FATAL_FAILURE(ASSERT_NO_THROW(ThrowAnInteger()),
- "Expected: ThrowAnInteger() doesn't throw an exception."
- "\n Actual: it throws.");
-}
-
-// Tests ASSERT_ANY_THROW.
-TEST(AssertionTest, ASSERT_ANY_THROW) {
- ASSERT_ANY_THROW(ThrowAnInteger());
- EXPECT_FATAL_FAILURE(
- ASSERT_ANY_THROW(ThrowNothing()),
- "Expected: ThrowNothing() throws an exception.\n"
- " Actual: it doesn't.");
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Makes sure we deal with the precedence of <<. This test should
-// compile.
-TEST(AssertionTest, AssertPrecedence) {
- ASSERT_EQ(1 < 2, true);
- bool false_value = false;
- ASSERT_EQ(true && false_value, false);
-}
-
-// A subroutine used by the following test.
-void TestEq1(int x) {
- ASSERT_EQ(1, x);
-}
-
-// Tests calling a test subroutine that's not part of a fixture.
-TEST(AssertionTest, NonFixtureSubroutine) {
- EXPECT_FATAL_FAILURE(TestEq1(2),
- "Value of: x");
-}
-
-// An uncopyable class.
-class Uncopyable {
- public:
- explicit Uncopyable(int a_value) : value_(a_value) {}
-
- int value() const { return value_; }
- bool operator==(const Uncopyable& rhs) const {
- return value() == rhs.value();
- }
- private:
- // This constructor deliberately has no implementation, as we don't
- // want this class to be copyable.
- Uncopyable(const Uncopyable&); // NOLINT
-
- int value_;
-};
-
-::std::ostream& operator<<(::std::ostream& os, const Uncopyable& value) {
- return os << value.value();
-}
-
-
-bool IsPositiveUncopyable(const Uncopyable& x) {
- return x.value() > 0;
-}
-
-// A subroutine used by the following test.
-void TestAssertNonPositive() {
- Uncopyable y(-1);
- ASSERT_PRED1(IsPositiveUncopyable, y);
-}
-// A subroutine used by the following test.
-void TestAssertEqualsUncopyable() {
- Uncopyable x(5);
- Uncopyable y(-1);
- ASSERT_EQ(x, y);
-}
-
-// Tests that uncopyable objects can be used in assertions.
-TEST(AssertionTest, AssertWorksWithUncopyableObject) {
- Uncopyable x(5);
- ASSERT_PRED1(IsPositiveUncopyable, x);
- ASSERT_EQ(x, x);
- EXPECT_FATAL_FAILURE(TestAssertNonPositive(),
- "IsPositiveUncopyable(y) evaluates to false, where\ny evaluates to -1");
- EXPECT_FATAL_FAILURE(TestAssertEqualsUncopyable(),
- "Value of: y\n Actual: -1\nExpected: x\nWhich is: 5");
-}
-
-// Tests that uncopyable objects can be used in expects.
-TEST(AssertionTest, ExpectWorksWithUncopyableObject) {
- Uncopyable x(5);
- EXPECT_PRED1(IsPositiveUncopyable, x);
- Uncopyable y(-1);
- EXPECT_NONFATAL_FAILURE(EXPECT_PRED1(IsPositiveUncopyable, y),
- "IsPositiveUncopyable(y) evaluates to false, where\ny evaluates to -1");
- EXPECT_EQ(x, x);
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(x, y),
- "Value of: y\n Actual: -1\nExpected: x\nWhich is: 5");
-}
-
-enum NamedEnum {
- kE1 = 0,
- kE2 = 1
-};
-
-TEST(AssertionTest, NamedEnum) {
- EXPECT_EQ(kE1, kE1);
- EXPECT_LT(kE1, kE2);
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(kE1, kE2), "Which is: 0");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(kE1, kE2), "Actual: 1");
-}
-
-// The version of gcc used in XCode 2.2 has a bug and doesn't allow
-// anonymous enums in assertions. Therefore the following test is not
-// done on Mac.
-// Sun Studio and HP aCC also reject this code.
-#if !GTEST_OS_MAC && !defined(__SUNPRO_CC) && !defined(__HP_aCC)
-
-// Tests using assertions with anonymous enums.
-enum {
- kCaseA = -1,
-
-# if GTEST_OS_LINUX
-
- // We want to test the case where the size of the anonymous enum is
- // larger than sizeof(int), to make sure our implementation of the
- // assertions doesn't truncate the enums. However, MSVC
- // (incorrectly) doesn't allow an enum value to exceed the range of
- // an int, so this has to be conditionally compiled.
- //
- // On Linux, kCaseB and kCaseA have the same value when truncated to
- // int size. We want to test whether this will confuse the
- // assertions.
- kCaseB = testing::internal::kMaxBiggestInt,
-
-# else
-
- kCaseB = INT_MAX,
-
-# endif // GTEST_OS_LINUX
-
- kCaseC = 42
-};
-
-TEST(AssertionTest, AnonymousEnum) {
-# if GTEST_OS_LINUX
-
- EXPECT_EQ(static_cast<int>(kCaseA), static_cast<int>(kCaseB));
-
-# endif // GTEST_OS_LINUX
-
- EXPECT_EQ(kCaseA, kCaseA);
- EXPECT_NE(kCaseA, kCaseB);
- EXPECT_LT(kCaseA, kCaseB);
- EXPECT_LE(kCaseA, kCaseB);
- EXPECT_GT(kCaseB, kCaseA);
- EXPECT_GE(kCaseA, kCaseA);
- EXPECT_NONFATAL_FAILURE(EXPECT_GE(kCaseA, kCaseB),
- "(kCaseA) >= (kCaseB)");
- EXPECT_NONFATAL_FAILURE(EXPECT_GE(kCaseA, kCaseC),
- "-1 vs 42");
-
- ASSERT_EQ(kCaseA, kCaseA);
- ASSERT_NE(kCaseA, kCaseB);
- ASSERT_LT(kCaseA, kCaseB);
- ASSERT_LE(kCaseA, kCaseB);
- ASSERT_GT(kCaseB, kCaseA);
- ASSERT_GE(kCaseA, kCaseA);
-
-# ifndef __BORLANDC__
-
- // ICE's in C++Builder.
- EXPECT_FATAL_FAILURE(ASSERT_EQ(kCaseA, kCaseB),
- "Value of: kCaseB");
- EXPECT_FATAL_FAILURE(ASSERT_EQ(kCaseA, kCaseC),
- "Actual: 42");
-# endif
-
- EXPECT_FATAL_FAILURE(ASSERT_EQ(kCaseA, kCaseC),
- "Which is: -1");
-}
-
-#endif // !GTEST_OS_MAC && !defined(__SUNPRO_CC)
-
-#if GTEST_OS_WINDOWS
-
-static HRESULT UnexpectedHRESULTFailure() {
- return E_UNEXPECTED;
-}
-
-static HRESULT OkHRESULTSuccess() {
- return S_OK;
-}
-
-static HRESULT FalseHRESULTSuccess() {
- return S_FALSE;
-}
-
-// HRESULT assertion tests test both zero and non-zero
-// success codes as well as failure message for each.
-//
-// Windows CE doesn't support message texts.
-TEST(HRESULTAssertionTest, EXPECT_HRESULT_SUCCEEDED) {
- EXPECT_HRESULT_SUCCEEDED(S_OK);
- EXPECT_HRESULT_SUCCEEDED(S_FALSE);
-
- EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()),
- "Expected: (UnexpectedHRESULTFailure()) succeeds.\n"
- " Actual: 0x8000FFFF");
-}
-
-TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) {
- ASSERT_HRESULT_SUCCEEDED(S_OK);
- ASSERT_HRESULT_SUCCEEDED(S_FALSE);
-
- EXPECT_FATAL_FAILURE(ASSERT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()),
- "Expected: (UnexpectedHRESULTFailure()) succeeds.\n"
- " Actual: 0x8000FFFF");
-}
-
-TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) {
- EXPECT_HRESULT_FAILED(E_UNEXPECTED);
-
- EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(OkHRESULTSuccess()),
- "Expected: (OkHRESULTSuccess()) fails.\n"
- " Actual: 0x00000000");
- EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(FalseHRESULTSuccess()),
- "Expected: (FalseHRESULTSuccess()) fails.\n"
- " Actual: 0x00000001");
-}
-
-TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) {
- ASSERT_HRESULT_FAILED(E_UNEXPECTED);
-
-# ifndef __BORLANDC__
-
- // ICE's in C++Builder 2007 and 2009.
- EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(OkHRESULTSuccess()),
- "Expected: (OkHRESULTSuccess()) fails.\n"
- " Actual: 0x00000000");
-# endif
-
- EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(FalseHRESULTSuccess()),
- "Expected: (FalseHRESULTSuccess()) fails.\n"
- " Actual: 0x00000001");
-}
-
-// Tests that streaming to the HRESULT macros works.
-TEST(HRESULTAssertionTest, Streaming) {
- EXPECT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure";
- ASSERT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure";
- EXPECT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure";
- ASSERT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure";
-
- EXPECT_NONFATAL_FAILURE(
- EXPECT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure",
- "expected failure");
-
-# ifndef __BORLANDC__
-
- // ICE's in C++Builder 2007 and 2009.
- EXPECT_FATAL_FAILURE(
- ASSERT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure",
- "expected failure");
-# endif
-
- EXPECT_NONFATAL_FAILURE(
- EXPECT_HRESULT_FAILED(S_OK) << "expected failure",
- "expected failure");
-
- EXPECT_FATAL_FAILURE(
- ASSERT_HRESULT_FAILED(S_OK) << "expected failure",
- "expected failure");
-}
-
-#endif // GTEST_OS_WINDOWS
-
-#ifdef __BORLANDC__
-// Silences warnings: "Condition is always true", "Unreachable code"
-# pragma option push -w-ccc -w-rch
-#endif
-
-// Tests that the assertion macros behave like single statements.
-TEST(AssertionSyntaxTest, BasicAssertionsBehavesLikeSingleStatement) {
- if (AlwaysFalse())
- ASSERT_TRUE(false) << "This should never be executed; "
- "It's a compilation test only.";
-
- if (AlwaysTrue())
- EXPECT_FALSE(false);
- else
- ; // NOLINT
-
- if (AlwaysFalse())
- ASSERT_LT(1, 3);
-
- if (AlwaysFalse())
- ; // NOLINT
- else
- EXPECT_GT(3, 2) << "";
-}
-
-#if GTEST_HAS_EXCEPTIONS
-// Tests that the compiler will not complain about unreachable code in the
-// EXPECT_THROW/EXPECT_ANY_THROW/EXPECT_NO_THROW macros.
-TEST(ExpectThrowTest, DoesNotGenerateUnreachableCodeWarning) {
- int n = 0;
-
- EXPECT_THROW(throw 1, int);
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW(n++, int), "");
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW(throw 1, const char*), "");
- EXPECT_NO_THROW(n++);
- EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(throw 1), "");
- EXPECT_ANY_THROW(throw 1);
- EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(n++), "");
-}
-
-TEST(AssertionSyntaxTest, ExceptionAssertionsBehavesLikeSingleStatement) {
- if (AlwaysFalse())
- EXPECT_THROW(ThrowNothing(), bool);
-
- if (AlwaysTrue())
- EXPECT_THROW(ThrowAnInteger(), int);
- else
- ; // NOLINT
-
- if (AlwaysFalse())
- EXPECT_NO_THROW(ThrowAnInteger());
-
- if (AlwaysTrue())
- EXPECT_NO_THROW(ThrowNothing());
- else
- ; // NOLINT
-
- if (AlwaysFalse())
- EXPECT_ANY_THROW(ThrowNothing());
-
- if (AlwaysTrue())
- EXPECT_ANY_THROW(ThrowAnInteger());
- else
- ; // NOLINT
-}
-#endif // GTEST_HAS_EXCEPTIONS
-
-TEST(AssertionSyntaxTest, NoFatalFailureAssertionsBehavesLikeSingleStatement) {
- if (AlwaysFalse())
- EXPECT_NO_FATAL_FAILURE(FAIL()) << "This should never be executed. "
- << "It's a compilation test only.";
- else
- ; // NOLINT
-
- if (AlwaysFalse())
- ASSERT_NO_FATAL_FAILURE(FAIL()) << "";
- else
- ; // NOLINT
-
- if (AlwaysTrue())
- EXPECT_NO_FATAL_FAILURE(SUCCEED());
- else
- ; // NOLINT
-
- if (AlwaysFalse())
- ; // NOLINT
- else
- ASSERT_NO_FATAL_FAILURE(SUCCEED());
-}
-
-// Tests that the assertion macros work well with switch statements.
-TEST(AssertionSyntaxTest, WorksWithSwitch) {
- switch (0) {
- case 1:
- break;
- default:
- ASSERT_TRUE(true);
- }
-
- switch (0)
- case 0:
- EXPECT_FALSE(false) << "EXPECT_FALSE failed in switch case";
-
- // Binary assertions are implemented using a different code path
- // than the Boolean assertions. Hence we test them separately.
- switch (0) {
- case 1:
- default:
- ASSERT_EQ(1, 1) << "ASSERT_EQ failed in default switch handler";
- }
-
- switch (0)
- case 0:
- EXPECT_NE(1, 2);
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-void ThrowAString() {
- throw "String";
-}
-
-// Test that the exception assertion macros compile and work with const
-// type qualifier.
-TEST(AssertionSyntaxTest, WorksWithConst) {
- ASSERT_THROW(ThrowAString(), const char*);
-
- EXPECT_THROW(ThrowAString(), const char*);
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-} // namespace
-
-namespace testing {
-
-// Tests that Google Test tracks SUCCEED*.
-TEST(SuccessfulAssertionTest, SUCCEED) {
- SUCCEED();
- SUCCEED() << "OK";
- EXPECT_EQ(2, GetUnitTestImpl()->current_test_result()->total_part_count());
-}
-
-// Tests that Google Test doesn't track successful EXPECT_*.
-TEST(SuccessfulAssertionTest, EXPECT) {
- EXPECT_TRUE(true);
- EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
-}
-
-// Tests that Google Test doesn't track successful EXPECT_STR*.
-TEST(SuccessfulAssertionTest, EXPECT_STR) {
- EXPECT_STREQ("", "");
- EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
-}
-
-// Tests that Google Test doesn't track successful ASSERT_*.
-TEST(SuccessfulAssertionTest, ASSERT) {
- ASSERT_TRUE(true);
- EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
-}
-
-// Tests that Google Test doesn't track successful ASSERT_STR*.
-TEST(SuccessfulAssertionTest, ASSERT_STR) {
- ASSERT_STREQ("", "");
- EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
-}
-
-} // namespace testing
-
-namespace {
-
-// Tests EXPECT_TRUE.
-TEST(ExpectTest, EXPECT_TRUE) {
- EXPECT_TRUE(2 > 1); // NOLINT
- EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(2 < 1),
- "Value of: 2 < 1\n"
- " Actual: false\n"
- "Expected: true");
- EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(2 > 3),
- "2 > 3");
-}
-
-// Tests EXPECT_TRUE(predicate) for predicates returning AssertionResult.
-TEST(ExpectTest, ExpectTrueWithAssertionResult) {
- EXPECT_TRUE(ResultIsEven(2));
- EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(ResultIsEven(3)),
- "Value of: ResultIsEven(3)\n"
- " Actual: false (3 is odd)\n"
- "Expected: true");
- EXPECT_TRUE(ResultIsEvenNoExplanation(2));
- EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(ResultIsEvenNoExplanation(3)),
- "Value of: ResultIsEvenNoExplanation(3)\n"
- " Actual: false (3 is odd)\n"
- "Expected: true");
-}
-
-// Tests EXPECT_FALSE.
-TEST(ExpectTest, EXPECT_FALSE) {
- EXPECT_FALSE(2 < 1); // NOLINT
- EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(2 > 1),
- "Value of: 2 > 1\n"
- " Actual: true\n"
- "Expected: false");
- EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(2 < 3),
- "2 < 3");
-}
-
-// Tests EXPECT_FALSE(predicate) for predicates returning AssertionResult.
-TEST(ExpectTest, ExpectFalseWithAssertionResult) {
- EXPECT_FALSE(ResultIsEven(3));
- EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(ResultIsEven(2)),
- "Value of: ResultIsEven(2)\n"
- " Actual: true (2 is even)\n"
- "Expected: false");
- EXPECT_FALSE(ResultIsEvenNoExplanation(3));
- EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(ResultIsEvenNoExplanation(2)),
- "Value of: ResultIsEvenNoExplanation(2)\n"
- " Actual: true\n"
- "Expected: false");
-}
-
-#ifdef __BORLANDC__
-// Restores warnings after previous "#pragma option push" supressed them
-# pragma option pop
-#endif
-
-// Tests EXPECT_EQ.
-TEST(ExpectTest, EXPECT_EQ) {
- EXPECT_EQ(5, 2 + 3);
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5, 2*3),
- "Value of: 2*3\n"
- " Actual: 6\n"
- "Expected: 5");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5, 2 - 3),
- "2 - 3");
-}
-
-// Tests using EXPECT_EQ on double values. The purpose is to make
-// sure that the specialization we did for integer and anonymous enums
-// isn't used for double arguments.
-TEST(ExpectTest, EXPECT_EQ_Double) {
- // A success.
- EXPECT_EQ(5.6, 5.6);
-
- // A failure.
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5.1, 5.2),
- "5.1");
-}
-
-#if GTEST_CAN_COMPARE_NULL
-// Tests EXPECT_EQ(NULL, pointer).
-TEST(ExpectTest, EXPECT_EQ_NULL) {
- // A success.
- const char* p = NULL;
- // Some older GCC versions may issue a spurious warning in this or the next
- // assertion statement. This warning should not be suppressed with
- // static_cast since the test verifies the ability to use bare NULL as the
- // expected parameter to the macro.
- EXPECT_EQ(NULL, p);
-
- // A failure.
- int n = 0;
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(NULL, &n),
- "Value of: &n\n");
-}
-#endif // GTEST_CAN_COMPARE_NULL
-
-// Tests EXPECT_EQ(0, non_pointer). Since the literal 0 can be
-// treated as a null pointer by the compiler, we need to make sure
-// that EXPECT_EQ(0, non_pointer) isn't interpreted by Google Test as
-// EXPECT_EQ(static_cast<void*>(NULL), non_pointer).
-TEST(ExpectTest, EXPECT_EQ_0) {
- int n = 0;
-
- // A success.
- EXPECT_EQ(0, n);
-
- // A failure.
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(0, 5.6),
- "Expected: 0");
-}
-
-// Tests EXPECT_NE.
-TEST(ExpectTest, EXPECT_NE) {
- EXPECT_NE(6, 7);
-
- EXPECT_NONFATAL_FAILURE(EXPECT_NE('a', 'a'),
- "Expected: ('a') != ('a'), "
- "actual: 'a' (97, 0x61) vs 'a' (97, 0x61)");
- EXPECT_NONFATAL_FAILURE(EXPECT_NE(2, 2),
- "2");
- char* const p0 = NULL;
- EXPECT_NONFATAL_FAILURE(EXPECT_NE(p0, p0),
- "p0");
- // Only way to get the Nokia compiler to compile the cast
- // is to have a separate void* variable first. Putting
- // the two casts on the same line doesn't work, neither does
- // a direct C-style to char*.
- void* pv1 = (void*)0x1234; // NOLINT
- char* const p1 = reinterpret_cast<char*>(pv1);
- EXPECT_NONFATAL_FAILURE(EXPECT_NE(p1, p1),
- "p1");
-}
-
-// Tests EXPECT_LE.
-TEST(ExpectTest, EXPECT_LE) {
- EXPECT_LE(2, 3);
- EXPECT_LE(2, 2);
- EXPECT_NONFATAL_FAILURE(EXPECT_LE(2, 0),
- "Expected: (2) <= (0), actual: 2 vs 0");
- EXPECT_NONFATAL_FAILURE(EXPECT_LE(1.1, 0.9),
- "(1.1) <= (0.9)");
-}
-
-// Tests EXPECT_LT.
-TEST(ExpectTest, EXPECT_LT) {
- EXPECT_LT(2, 3);
- EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 2),
- "Expected: (2) < (2), actual: 2 vs 2");
- EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1),
- "(2) < (1)");
-}
-
-// Tests EXPECT_GE.
-TEST(ExpectTest, EXPECT_GE) {
- EXPECT_GE(2, 1);
- EXPECT_GE(2, 2);
- EXPECT_NONFATAL_FAILURE(EXPECT_GE(2, 3),
- "Expected: (2) >= (3), actual: 2 vs 3");
- EXPECT_NONFATAL_FAILURE(EXPECT_GE(0.9, 1.1),
- "(0.9) >= (1.1)");
-}
-
-// Tests EXPECT_GT.
-TEST(ExpectTest, EXPECT_GT) {
- EXPECT_GT(2, 1);
- EXPECT_NONFATAL_FAILURE(EXPECT_GT(2, 2),
- "Expected: (2) > (2), actual: 2 vs 2");
- EXPECT_NONFATAL_FAILURE(EXPECT_GT(2, 3),
- "(2) > (3)");
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Tests EXPECT_THROW.
-TEST(ExpectTest, EXPECT_THROW) {
- EXPECT_THROW(ThrowAnInteger(), int);
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool),
- "Expected: ThrowAnInteger() throws an exception of "
- "type bool.\n Actual: it throws a different type.");
- EXPECT_NONFATAL_FAILURE(
- EXPECT_THROW(ThrowNothing(), bool),
- "Expected: ThrowNothing() throws an exception of type bool.\n"
- " Actual: it throws nothing.");
-}
-
-// Tests EXPECT_NO_THROW.
-TEST(ExpectTest, EXPECT_NO_THROW) {
- EXPECT_NO_THROW(ThrowNothing());
- EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(ThrowAnInteger()),
- "Expected: ThrowAnInteger() doesn't throw an "
- "exception.\n Actual: it throws.");
-}
-
-// Tests EXPECT_ANY_THROW.
-TEST(ExpectTest, EXPECT_ANY_THROW) {
- EXPECT_ANY_THROW(ThrowAnInteger());
- EXPECT_NONFATAL_FAILURE(
- EXPECT_ANY_THROW(ThrowNothing()),
- "Expected: ThrowNothing() throws an exception.\n"
- " Actual: it doesn't.");
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Make sure we deal with the precedence of <<.
-TEST(ExpectTest, ExpectPrecedence) {
- EXPECT_EQ(1 < 2, true);
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(true, true && false),
- "Value of: true && false");
-}
-
-
-// Tests the StreamableToString() function.
-
-// Tests using StreamableToString() on a scalar.
-TEST(StreamableToStringTest, Scalar) {
- EXPECT_STREQ("5", StreamableToString(5).c_str());
-}
-
-// Tests using StreamableToString() on a non-char pointer.
-TEST(StreamableToStringTest, Pointer) {
- int n = 0;
- int* p = &n;
- EXPECT_STRNE("(null)", StreamableToString(p).c_str());
-}
-
-// Tests using StreamableToString() on a NULL non-char pointer.
-TEST(StreamableToStringTest, NullPointer) {
- int* p = NULL;
- EXPECT_STREQ("(null)", StreamableToString(p).c_str());
-}
-
-// Tests using StreamableToString() on a C string.
-TEST(StreamableToStringTest, CString) {
- EXPECT_STREQ("Foo", StreamableToString("Foo").c_str());
-}
-
-// Tests using StreamableToString() on a NULL C string.
-TEST(StreamableToStringTest, NullCString) {
- char* p = NULL;
- EXPECT_STREQ("(null)", StreamableToString(p).c_str());
-}
-
-// Tests using streamable values as assertion messages.
-
-// Tests using std::string as an assertion message.
-TEST(StreamableTest, string) {
- static const std::string str(
- "This failure message is a std::string, and is expected.");
- EXPECT_FATAL_FAILURE(FAIL() << str,
- str.c_str());
-}
-
-// Tests that we can output strings containing embedded NULs.
-// Limited to Linux because we can only do this with std::string's.
-TEST(StreamableTest, stringWithEmbeddedNUL) {
- static const char char_array_with_nul[] =
- "Here's a NUL\0 and some more string";
- static const std::string string_with_nul(char_array_with_nul,
- sizeof(char_array_with_nul)
- - 1); // drops the trailing NUL
- EXPECT_FATAL_FAILURE(FAIL() << string_with_nul,
- "Here's a NUL\\0 and some more string");
-}
-
-// Tests that we can output a NUL char.
-TEST(StreamableTest, NULChar) {
- EXPECT_FATAL_FAILURE({ // NOLINT
- FAIL() << "A NUL" << '\0' << " and some more string";
- }, "A NUL\\0 and some more string");
-}
-
-// Tests using int as an assertion message.
-TEST(StreamableTest, int) {
- EXPECT_FATAL_FAILURE(FAIL() << 900913,
- "900913");
-}
-
-// Tests using NULL char pointer as an assertion message.
-//
-// In MSVC, streaming a NULL char * causes access violation. Google Test
-// implemented a workaround (substituting "(null)" for NULL). This
-// tests whether the workaround works.
-TEST(StreamableTest, NullCharPtr) {
- EXPECT_FATAL_FAILURE(FAIL() << static_cast<const char*>(NULL),
- "(null)");
-}
-
-// Tests that basic IO manipulators (endl, ends, and flush) can be
-// streamed to testing::Message.
-TEST(StreamableTest, BasicIoManip) {
- EXPECT_FATAL_FAILURE({ // NOLINT
- FAIL() << "Line 1." << std::endl
- << "A NUL char " << std::ends << std::flush << " in line 2.";
- }, "Line 1.\nA NUL char \\0 in line 2.");
-}
-
-// Tests the macros that haven't been covered so far.
-
-void AddFailureHelper(bool* aborted) {
- *aborted = true;
- ADD_FAILURE() << "Failure";
- *aborted = false;
-}
-
-// Tests ADD_FAILURE.
-TEST(MacroTest, ADD_FAILURE) {
- bool aborted = true;
- EXPECT_NONFATAL_FAILURE(AddFailureHelper(&aborted),
- "Failure");
- EXPECT_FALSE(aborted);
-}
-
-// Tests ADD_FAILURE_AT.
-TEST(MacroTest, ADD_FAILURE_AT) {
- // Verifies that ADD_FAILURE_AT does generate a nonfatal failure and
- // the failure message contains the user-streamed part.
- EXPECT_NONFATAL_FAILURE(ADD_FAILURE_AT("foo.cc", 42) << "Wrong!", "Wrong!");
-
- // Verifies that the user-streamed part is optional.
- EXPECT_NONFATAL_FAILURE(ADD_FAILURE_AT("foo.cc", 42), "Failed");
-
- // Unfortunately, we cannot verify that the failure message contains
- // the right file path and line number the same way, as
- // EXPECT_NONFATAL_FAILURE() doesn't get to see the file path and
- // line number. Instead, we do that in gtest_output_test_.cc.
-}
-
-// Tests FAIL.
-TEST(MacroTest, FAIL) {
- EXPECT_FATAL_FAILURE(FAIL(),
- "Failed");
- EXPECT_FATAL_FAILURE(FAIL() << "Intentional failure.",
- "Intentional failure.");
-}
-
-// Tests SUCCEED
-TEST(MacroTest, SUCCEED) {
- SUCCEED();
- SUCCEED() << "Explicit success.";
-}
-
-
-// Tests for EXPECT_EQ() and ASSERT_EQ().
-//
-// These tests fail *intentionally*, s.t. the failure messages can be
-// generated and tested.
-//
-// We have different tests for different argument types.
-
-// Tests using bool values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, Bool) {
- EXPECT_EQ(true, true);
- EXPECT_FATAL_FAILURE({
- bool false_value = false;
- ASSERT_EQ(false_value, true);
- }, "Value of: true");
-}
-
-// Tests using int values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, Int) {
- ASSERT_EQ(32, 32);
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(32, 33),
- "33");
-}
-
-// Tests using time_t values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, Time_T) {
- EXPECT_EQ(static_cast<time_t>(0),
- static_cast<time_t>(0));
- EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast<time_t>(0),
- static_cast<time_t>(1234)),
- "1234");
-}
-
-// Tests using char values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, Char) {
- ASSERT_EQ('z', 'z');
- const char ch = 'b';
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ('\0', ch),
- "ch");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ('a', ch),
- "ch");
-}
-
-// Tests using wchar_t values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, WideChar) {
- EXPECT_EQ(L'b', L'b');
-
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(L'\0', L'x'),
- "Value of: L'x'\n"
- " Actual: L'x' (120, 0x78)\n"
- "Expected: L'\0'\n"
- "Which is: L'\0' (0, 0x0)");
-
- static wchar_t wchar;
- wchar = L'b';
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(L'a', wchar),
- "wchar");
- wchar = 0x8119;
- EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast<wchar_t>(0x8120), wchar),
- "Value of: wchar");
-}
-
-// Tests using ::std::string values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, StdString) {
- // Compares a const char* to an std::string that has identical
- // content.
- ASSERT_EQ("Test", ::std::string("Test"));
-
- // Compares two identical std::strings.
- static const ::std::string str1("A * in the middle");
- static const ::std::string str2(str1);
- EXPECT_EQ(str1, str2);
-
- // Compares a const char* to an std::string that has different
- // content
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ("Test", ::std::string("test")),
- "::std::string(\"test\")");
-
- // Compares an std::string to a char* that has different content.
- char* const p1 = const_cast<char*>("foo");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::std::string("bar"), p1),
- "p1");
-
- // Compares two std::strings that have different contents, one of
- // which having a NUL character in the middle. This should fail.
- static ::std::string str3(str1);
- str3.at(2) = '\0';
- EXPECT_FATAL_FAILURE(ASSERT_EQ(str1, str3),
- "Value of: str3\n"
- " Actual: \"A \\0 in the middle\"");
-}
-
-#if GTEST_HAS_STD_WSTRING
-
-// Tests using ::std::wstring values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, StdWideString) {
- // Compares two identical std::wstrings.
- const ::std::wstring wstr1(L"A * in the middle");
- const ::std::wstring wstr2(wstr1);
- ASSERT_EQ(wstr1, wstr2);
-
- // Compares an std::wstring to a const wchar_t* that has identical
- // content.
- const wchar_t kTestX8119[] = { 'T', 'e', 's', 't', 0x8119, '\0' };
- EXPECT_EQ(::std::wstring(kTestX8119), kTestX8119);
-
- // Compares an std::wstring to a const wchar_t* that has different
- // content.
- const wchar_t kTestX8120[] = { 'T', 'e', 's', 't', 0x8120, '\0' };
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_EQ(::std::wstring(kTestX8119), kTestX8120);
- }, "kTestX8120");
-
- // Compares two std::wstrings that have different contents, one of
- // which having a NUL character in the middle.
- ::std::wstring wstr3(wstr1);
- wstr3.at(2) = L'\0';
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(wstr1, wstr3),
- "wstr3");
-
- // Compares a wchar_t* to an std::wstring that has different
- // content.
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_EQ(const_cast<wchar_t*>(L"foo"), ::std::wstring(L"bar"));
- }, "");
-}
-
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_STRING
-// Tests using ::string values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, GlobalString) {
- // Compares a const char* to a ::string that has identical content.
- EXPECT_EQ("Test", ::string("Test"));
-
- // Compares two identical ::strings.
- const ::string str1("A * in the middle");
- const ::string str2(str1);
- ASSERT_EQ(str1, str2);
-
- // Compares a ::string to a const char* that has different content.
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::string("Test"), "test"),
- "test");
-
- // Compares two ::strings that have different contents, one of which
- // having a NUL character in the middle.
- ::string str3(str1);
- str3.at(2) = '\0';
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(str1, str3),
- "str3");
-
- // Compares a ::string to a char* that has different content.
- EXPECT_FATAL_FAILURE({ // NOLINT
- ASSERT_EQ(::string("bar"), const_cast<char*>("foo"));
- }, "");
-}
-
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-
-// Tests using ::wstring values in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, GlobalWideString) {
- // Compares two identical ::wstrings.
- static const ::wstring wstr1(L"A * in the middle");
- static const ::wstring wstr2(wstr1);
- EXPECT_EQ(wstr1, wstr2);
-
- // Compares a const wchar_t* to a ::wstring that has identical content.
- const wchar_t kTestX8119[] = { 'T', 'e', 's', 't', 0x8119, '\0' };
- ASSERT_EQ(kTestX8119, ::wstring(kTestX8119));
-
- // Compares a const wchar_t* to a ::wstring that has different
- // content.
- const wchar_t kTestX8120[] = { 'T', 'e', 's', 't', 0x8120, '\0' };
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_EQ(kTestX8120, ::wstring(kTestX8119));
- }, "Test\\x8119");
-
- // Compares a wchar_t* to a ::wstring that has different content.
- wchar_t* const p1 = const_cast<wchar_t*>(L"foo");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, ::wstring(L"bar")),
- "bar");
-
- // Compares two ::wstrings that have different contents, one of which
- // having a NUL character in the middle.
- static ::wstring wstr3;
- wstr3 = wstr1;
- wstr3.at(2) = L'\0';
- EXPECT_FATAL_FAILURE(ASSERT_EQ(wstr1, wstr3),
- "wstr3");
-}
-
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-// Tests using char pointers in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, CharPointer) {
- char* const p0 = NULL;
- // Only way to get the Nokia compiler to compile the cast
- // is to have a separate void* variable first. Putting
- // the two casts on the same line doesn't work, neither does
- // a direct C-style to char*.
- void* pv1 = (void*)0x1234; // NOLINT
- void* pv2 = (void*)0xABC0; // NOLINT
- char* const p1 = reinterpret_cast<char*>(pv1);
- char* const p2 = reinterpret_cast<char*>(pv2);
- ASSERT_EQ(p1, p1);
-
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p0, p2),
- "Value of: p2");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, p2),
- "p2");
- EXPECT_FATAL_FAILURE(ASSERT_EQ(reinterpret_cast<char*>(0x1234),
- reinterpret_cast<char*>(0xABC0)),
- "ABC0");
-}
-
-// Tests using wchar_t pointers in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, WideCharPointer) {
- wchar_t* const p0 = NULL;
- // Only way to get the Nokia compiler to compile the cast
- // is to have a separate void* variable first. Putting
- // the two casts on the same line doesn't work, neither does
- // a direct C-style to char*.
- void* pv1 = (void*)0x1234; // NOLINT
- void* pv2 = (void*)0xABC0; // NOLINT
- wchar_t* const p1 = reinterpret_cast<wchar_t*>(pv1);
- wchar_t* const p2 = reinterpret_cast<wchar_t*>(pv2);
- EXPECT_EQ(p0, p0);
-
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p0, p2),
- "Value of: p2");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, p2),
- "p2");
- void* pv3 = (void*)0x1234; // NOLINT
- void* pv4 = (void*)0xABC0; // NOLINT
- const wchar_t* p3 = reinterpret_cast<const wchar_t*>(pv3);
- const wchar_t* p4 = reinterpret_cast<const wchar_t*>(pv4);
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p3, p4),
- "p4");
-}
-
-// Tests using other types of pointers in {EXPECT|ASSERT}_EQ.
-TEST(EqAssertionTest, OtherPointer) {
- ASSERT_EQ(static_cast<const int*>(NULL),
- static_cast<const int*>(NULL));
- EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast<const int*>(NULL),
- reinterpret_cast<const int*>(0x1234)),
- "0x1234");
-}
-
-// A class that supports binary comparison operators but not streaming.
-class UnprintableChar {
- public:
- explicit UnprintableChar(char ch) : char_(ch) {}
-
- bool operator==(const UnprintableChar& rhs) const {
- return char_ == rhs.char_;
- }
- bool operator!=(const UnprintableChar& rhs) const {
- return char_ != rhs.char_;
- }
- bool operator<(const UnprintableChar& rhs) const {
- return char_ < rhs.char_;
- }
- bool operator<=(const UnprintableChar& rhs) const {
- return char_ <= rhs.char_;
- }
- bool operator>(const UnprintableChar& rhs) const {
- return char_ > rhs.char_;
- }
- bool operator>=(const UnprintableChar& rhs) const {
- return char_ >= rhs.char_;
- }
-
- private:
- char char_;
-};
-
-// Tests that ASSERT_EQ() and friends don't require the arguments to
-// be printable.
-TEST(ComparisonAssertionTest, AcceptsUnprintableArgs) {
- const UnprintableChar x('x'), y('y');
- ASSERT_EQ(x, x);
- EXPECT_NE(x, y);
- ASSERT_LT(x, y);
- EXPECT_LE(x, y);
- ASSERT_GT(y, x);
- EXPECT_GE(x, x);
-
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(x, y), "1-byte object <78>");
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(x, y), "1-byte object <79>");
- EXPECT_NONFATAL_FAILURE(EXPECT_LT(y, y), "1-byte object <79>");
- EXPECT_NONFATAL_FAILURE(EXPECT_GT(x, y), "1-byte object <78>");
- EXPECT_NONFATAL_FAILURE(EXPECT_GT(x, y), "1-byte object <79>");
-
- // Code tested by EXPECT_FATAL_FAILURE cannot reference local
- // variables, so we have to write UnprintableChar('x') instead of x.
-#ifndef __BORLANDC__
- // ICE's in C++Builder.
- EXPECT_FATAL_FAILURE(ASSERT_NE(UnprintableChar('x'), UnprintableChar('x')),
- "1-byte object <78>");
- EXPECT_FATAL_FAILURE(ASSERT_LE(UnprintableChar('y'), UnprintableChar('x')),
- "1-byte object <78>");
-#endif
- EXPECT_FATAL_FAILURE(ASSERT_LE(UnprintableChar('y'), UnprintableChar('x')),
- "1-byte object <79>");
- EXPECT_FATAL_FAILURE(ASSERT_GE(UnprintableChar('x'), UnprintableChar('y')),
- "1-byte object <78>");
- EXPECT_FATAL_FAILURE(ASSERT_GE(UnprintableChar('x'), UnprintableChar('y')),
- "1-byte object <79>");
-}
-
-// Tests the FRIEND_TEST macro.
-
-// This class has a private member we want to test. We will test it
-// both in a TEST and in a TEST_F.
-class Foo {
- public:
- Foo() {}
-
- private:
- int Bar() const { return 1; }
-
- // Declares the friend tests that can access the private member
- // Bar().
- FRIEND_TEST(FRIEND_TEST_Test, TEST);
- FRIEND_TEST(FRIEND_TEST_Test2, TEST_F);
-};
-
-// Tests that the FRIEND_TEST declaration allows a TEST to access a
-// class's private members. This should compile.
-TEST(FRIEND_TEST_Test, TEST) {
- ASSERT_EQ(1, Foo().Bar());
-}
-
-// The fixture needed to test using FRIEND_TEST with TEST_F.
-class FRIEND_TEST_Test2 : public Test {
- protected:
- Foo foo;
-};
-
-// Tests that the FRIEND_TEST declaration allows a TEST_F to access a
-// class's private members. This should compile.
-TEST_F(FRIEND_TEST_Test2, TEST_F) {
- ASSERT_EQ(1, foo.Bar());
-}
-
-// Tests the life cycle of Test objects.
-
-// The test fixture for testing the life cycle of Test objects.
-//
-// This class counts the number of live test objects that uses this
-// fixture.
-class TestLifeCycleTest : public Test {
- protected:
- // Constructor. Increments the number of test objects that uses
- // this fixture.
- TestLifeCycleTest() { count_++; }
-
- // Destructor. Decrements the number of test objects that uses this
- // fixture.
- ~TestLifeCycleTest() { count_--; }
-
- // Returns the number of live test objects that uses this fixture.
- int count() const { return count_; }
-
- private:
- static int count_;
-};
-
-int TestLifeCycleTest::count_ = 0;
-
-// Tests the life cycle of test objects.
-TEST_F(TestLifeCycleTest, Test1) {
- // There should be only one test object in this test case that's
- // currently alive.
- ASSERT_EQ(1, count());
-}
-
-// Tests the life cycle of test objects.
-TEST_F(TestLifeCycleTest, Test2) {
- // After Test1 is done and Test2 is started, there should still be
- // only one live test object, as the object for Test1 should've been
- // deleted.
- ASSERT_EQ(1, count());
-}
-
-} // namespace
-
-// Tests that the copy constructor works when it is NOT optimized away by
-// the compiler.
-TEST(AssertionResultTest, CopyConstructorWorksWhenNotOptimied) {
- // Checks that the copy constructor doesn't try to dereference NULL pointers
- // in the source object.
- AssertionResult r1 = AssertionSuccess();
- AssertionResult r2 = r1;
- // The following line is added to prevent the compiler from optimizing
- // away the constructor call.
- r1 << "abc";
-
- AssertionResult r3 = r1;
- EXPECT_EQ(static_cast<bool>(r3), static_cast<bool>(r1));
- EXPECT_STREQ("abc", r1.message());
-}
-
-// Tests that AssertionSuccess and AssertionFailure construct
-// AssertionResult objects as expected.
-TEST(AssertionResultTest, ConstructionWorks) {
- AssertionResult r1 = AssertionSuccess();
- EXPECT_TRUE(r1);
- EXPECT_STREQ("", r1.message());
-
- AssertionResult r2 = AssertionSuccess() << "abc";
- EXPECT_TRUE(r2);
- EXPECT_STREQ("abc", r2.message());
-
- AssertionResult r3 = AssertionFailure();
- EXPECT_FALSE(r3);
- EXPECT_STREQ("", r3.message());
-
- AssertionResult r4 = AssertionFailure() << "def";
- EXPECT_FALSE(r4);
- EXPECT_STREQ("def", r4.message());
-
- AssertionResult r5 = AssertionFailure(Message() << "ghi");
- EXPECT_FALSE(r5);
- EXPECT_STREQ("ghi", r5.message());
-}
-
-// Tests that the negation flips the predicate result but keeps the message.
-TEST(AssertionResultTest, NegationWorks) {
- AssertionResult r1 = AssertionSuccess() << "abc";
- EXPECT_FALSE(!r1);
- EXPECT_STREQ("abc", (!r1).message());
-
- AssertionResult r2 = AssertionFailure() << "def";
- EXPECT_TRUE(!r2);
- EXPECT_STREQ("def", (!r2).message());
-}
-
-TEST(AssertionResultTest, StreamingWorks) {
- AssertionResult r = AssertionSuccess();
- r << "abc" << 'd' << 0 << true;
- EXPECT_STREQ("abcd0true", r.message());
-}
-
-TEST(AssertionResultTest, CanStreamOstreamManipulators) {
- AssertionResult r = AssertionSuccess();
- r << "Data" << std::endl << std::flush << std::ends << "Will be visible";
- EXPECT_STREQ("Data\n\\0Will be visible", r.message());
-}
-
-// Tests streaming a user type whose definition and operator << are
-// both in the global namespace.
-class Base {
- public:
- explicit Base(int an_x) : x_(an_x) {}
- int x() const { return x_; }
- private:
- int x_;
-};
-std::ostream& operator<<(std::ostream& os,
- const Base& val) {
- return os << val.x();
-}
-std::ostream& operator<<(std::ostream& os,
- const Base* pointer) {
- return os << "(" << pointer->x() << ")";
-}
-
-TEST(MessageTest, CanStreamUserTypeInGlobalNameSpace) {
- Message msg;
- Base a(1);
-
- msg << a << &a; // Uses ::operator<<.
- EXPECT_STREQ("1(1)", msg.GetString().c_str());
-}
-
-// Tests streaming a user type whose definition and operator<< are
-// both in an unnamed namespace.
-namespace {
-class MyTypeInUnnamedNameSpace : public Base {
- public:
- explicit MyTypeInUnnamedNameSpace(int an_x): Base(an_x) {}
-};
-std::ostream& operator<<(std::ostream& os,
- const MyTypeInUnnamedNameSpace& val) {
- return os << val.x();
-}
-std::ostream& operator<<(std::ostream& os,
- const MyTypeInUnnamedNameSpace* pointer) {
- return os << "(" << pointer->x() << ")";
-}
-} // namespace
-
-TEST(MessageTest, CanStreamUserTypeInUnnamedNameSpace) {
- Message msg;
- MyTypeInUnnamedNameSpace a(1);
-
- msg << a << &a; // Uses <unnamed_namespace>::operator<<.
- EXPECT_STREQ("1(1)", msg.GetString().c_str());
-}
-
-// Tests streaming a user type whose definition and operator<< are
-// both in a user namespace.
-namespace namespace1 {
-class MyTypeInNameSpace1 : public Base {
- public:
- explicit MyTypeInNameSpace1(int an_x): Base(an_x) {}
-};
-std::ostream& operator<<(std::ostream& os,
- const MyTypeInNameSpace1& val) {
- return os << val.x();
-}
-std::ostream& operator<<(std::ostream& os,
- const MyTypeInNameSpace1* pointer) {
- return os << "(" << pointer->x() << ")";
-}
-} // namespace namespace1
-
-TEST(MessageTest, CanStreamUserTypeInUserNameSpace) {
- Message msg;
- namespace1::MyTypeInNameSpace1 a(1);
-
- msg << a << &a; // Uses namespace1::operator<<.
- EXPECT_STREQ("1(1)", msg.GetString().c_str());
-}
-
-// Tests streaming a user type whose definition is in a user namespace
-// but whose operator<< is in the global namespace.
-namespace namespace2 {
-class MyTypeInNameSpace2 : public ::Base {
- public:
- explicit MyTypeInNameSpace2(int an_x): Base(an_x) {}
-};
-} // namespace namespace2
-std::ostream& operator<<(std::ostream& os,
- const namespace2::MyTypeInNameSpace2& val) {
- return os << val.x();
-}
-std::ostream& operator<<(std::ostream& os,
- const namespace2::MyTypeInNameSpace2* pointer) {
- return os << "(" << pointer->x() << ")";
-}
-
-TEST(MessageTest, CanStreamUserTypeInUserNameSpaceWithStreamOperatorInGlobal) {
- Message msg;
- namespace2::MyTypeInNameSpace2 a(1);
-
- msg << a << &a; // Uses ::operator<<.
- EXPECT_STREQ("1(1)", msg.GetString().c_str());
-}
-
-// Tests streaming NULL pointers to testing::Message.
-TEST(MessageTest, NullPointers) {
- Message msg;
- char* const p1 = NULL;
- unsigned char* const p2 = NULL;
- int* p3 = NULL;
- double* p4 = NULL;
- bool* p5 = NULL;
- Message* p6 = NULL;
-
- msg << p1 << p2 << p3 << p4 << p5 << p6;
- ASSERT_STREQ("(null)(null)(null)(null)(null)(null)",
- msg.GetString().c_str());
-}
-
-// Tests streaming wide strings to testing::Message.
-TEST(MessageTest, WideStrings) {
- // Streams a NULL of type const wchar_t*.
- const wchar_t* const_wstr = NULL;
- EXPECT_STREQ("(null)",
- (Message() << const_wstr).GetString().c_str());
-
- // Streams a NULL of type wchar_t*.
- wchar_t* wstr = NULL;
- EXPECT_STREQ("(null)",
- (Message() << wstr).GetString().c_str());
-
- // Streams a non-NULL of type const wchar_t*.
- const_wstr = L"abc\x8119";
- EXPECT_STREQ("abc\xe8\x84\x99",
- (Message() << const_wstr).GetString().c_str());
-
- // Streams a non-NULL of type wchar_t*.
- wstr = const_cast<wchar_t*>(const_wstr);
- EXPECT_STREQ("abc\xe8\x84\x99",
- (Message() << wstr).GetString().c_str());
-}
-
-
-// This line tests that we can define tests in the testing namespace.
-namespace testing {
-
-// Tests the TestInfo class.
-
-class TestInfoTest : public Test {
- protected:
- static const TestInfo* GetTestInfo(const char* test_name) {
- const TestCase* const test_case = GetUnitTestImpl()->
- GetTestCase("TestInfoTest", "", NULL, NULL);
-
- for (int i = 0; i < test_case->total_test_count(); ++i) {
- const TestInfo* const test_info = test_case->GetTestInfo(i);
- if (strcmp(test_name, test_info->name()) == 0)
- return test_info;
- }
- return NULL;
- }
-
- static const TestResult* GetTestResult(
- const TestInfo* test_info) {
- return test_info->result();
- }
-};
-
-// Tests TestInfo::test_case_name() and TestInfo::name().
-TEST_F(TestInfoTest, Names) {
- const TestInfo* const test_info = GetTestInfo("Names");
-
- ASSERT_STREQ("TestInfoTest", test_info->test_case_name());
- ASSERT_STREQ("Names", test_info->name());
-}
-
-// Tests TestInfo::result().
-TEST_F(TestInfoTest, result) {
- const TestInfo* const test_info = GetTestInfo("result");
-
- // Initially, there is no TestPartResult for this test.
- ASSERT_EQ(0, GetTestResult(test_info)->total_part_count());
-
- // After the previous assertion, there is still none.
- ASSERT_EQ(0, GetTestResult(test_info)->total_part_count());
-}
-
-// Tests setting up and tearing down a test case.
-
-class SetUpTestCaseTest : public Test {
- protected:
- // This will be called once before the first test in this test case
- // is run.
- static void SetUpTestCase() {
- printf("Setting up the test case . . .\n");
-
- // Initializes some shared resource. In this simple example, we
- // just create a C string. More complex stuff can be done if
- // desired.
- shared_resource_ = "123";
-
- // Increments the number of test cases that have been set up.
- counter_++;
-
- // SetUpTestCase() should be called only once.
- EXPECT_EQ(1, counter_);
- }
-
- // This will be called once after the last test in this test case is
- // run.
- static void TearDownTestCase() {
- printf("Tearing down the test case . . .\n");
-
- // Decrements the number of test cases that have been set up.
- counter_--;
-
- // TearDownTestCase() should be called only once.
- EXPECT_EQ(0, counter_);
-
- // Cleans up the shared resource.
- shared_resource_ = NULL;
- }
-
- // This will be called before each test in this test case.
- virtual void SetUp() {
- // SetUpTestCase() should be called only once, so counter_ should
- // always be 1.
- EXPECT_EQ(1, counter_);
- }
-
- // Number of test cases that have been set up.
- static int counter_;
-
- // Some resource to be shared by all tests in this test case.
- static const char* shared_resource_;
-};
-
-int SetUpTestCaseTest::counter_ = 0;
-const char* SetUpTestCaseTest::shared_resource_ = NULL;
-
-// A test that uses the shared resource.
-TEST_F(SetUpTestCaseTest, Test1) {
- EXPECT_STRNE(NULL, shared_resource_);
-}
-
-// Another test that uses the shared resource.
-TEST_F(SetUpTestCaseTest, Test2) {
- EXPECT_STREQ("123", shared_resource_);
-}
-
-// The InitGoogleTestTest test case tests testing::InitGoogleTest().
-
-// The Flags struct stores a copy of all Google Test flags.
-struct Flags {
- // Constructs a Flags struct where each flag has its default value.
- Flags() : also_run_disabled_tests(false),
- break_on_failure(false),
- catch_exceptions(false),
- death_test_use_fork(false),
- filter(""),
- list_tests(false),
- output(""),
- print_time(true),
- random_seed(0),
- repeat(1),
- shuffle(false),
- stack_trace_depth(kMaxStackTraceDepth),
- stream_result_to(""),
- throw_on_failure(false) {}
-
- // Factory methods.
-
- // Creates a Flags struct where the gtest_also_run_disabled_tests flag has
- // the given value.
- static Flags AlsoRunDisabledTests(bool also_run_disabled_tests) {
- Flags flags;
- flags.also_run_disabled_tests = also_run_disabled_tests;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_break_on_failure flag has
- // the given value.
- static Flags BreakOnFailure(bool break_on_failure) {
- Flags flags;
- flags.break_on_failure = break_on_failure;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_catch_exceptions flag has
- // the given value.
- static Flags CatchExceptions(bool catch_exceptions) {
- Flags flags;
- flags.catch_exceptions = catch_exceptions;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_death_test_use_fork flag has
- // the given value.
- static Flags DeathTestUseFork(bool death_test_use_fork) {
- Flags flags;
- flags.death_test_use_fork = death_test_use_fork;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_filter flag has the given
- // value.
- static Flags Filter(const char* filter) {
- Flags flags;
- flags.filter = filter;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_list_tests flag has the
- // given value.
- static Flags ListTests(bool list_tests) {
- Flags flags;
- flags.list_tests = list_tests;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_output flag has the given
- // value.
- static Flags Output(const char* output) {
- Flags flags;
- flags.output = output;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_print_time flag has the given
- // value.
- static Flags PrintTime(bool print_time) {
- Flags flags;
- flags.print_time = print_time;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_random_seed flag has
- // the given value.
- static Flags RandomSeed(Int32 random_seed) {
- Flags flags;
- flags.random_seed = random_seed;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_repeat flag has the given
- // value.
- static Flags Repeat(Int32 repeat) {
- Flags flags;
- flags.repeat = repeat;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_shuffle flag has
- // the given value.
- static Flags Shuffle(bool shuffle) {
- Flags flags;
- flags.shuffle = shuffle;
- return flags;
- }
-
- // Creates a Flags struct where the GTEST_FLAG(stack_trace_depth) flag has
- // the given value.
- static Flags StackTraceDepth(Int32 stack_trace_depth) {
- Flags flags;
- flags.stack_trace_depth = stack_trace_depth;
- return flags;
- }
-
- // Creates a Flags struct where the GTEST_FLAG(stream_result_to) flag has
- // the given value.
- static Flags StreamResultTo(const char* stream_result_to) {
- Flags flags;
- flags.stream_result_to = stream_result_to;
- return flags;
- }
-
- // Creates a Flags struct where the gtest_throw_on_failure flag has
- // the given value.
- static Flags ThrowOnFailure(bool throw_on_failure) {
- Flags flags;
- flags.throw_on_failure = throw_on_failure;
- return flags;
- }
-
- // These fields store the flag values.
- bool also_run_disabled_tests;
- bool break_on_failure;
- bool catch_exceptions;
- bool death_test_use_fork;
- const char* filter;
- bool list_tests;
- const char* output;
- bool print_time;
- Int32 random_seed;
- Int32 repeat;
- bool shuffle;
- Int32 stack_trace_depth;
- const char* stream_result_to;
- bool throw_on_failure;
-};
-
-// Fixture for testing InitGoogleTest().
-class InitGoogleTestTest : public Test {
- protected:
- // Clears the flags before each test.
- virtual void SetUp() {
- GTEST_FLAG(also_run_disabled_tests) = false;
- GTEST_FLAG(break_on_failure) = false;
- GTEST_FLAG(catch_exceptions) = false;
- GTEST_FLAG(death_test_use_fork) = false;
- GTEST_FLAG(filter) = "";
- GTEST_FLAG(list_tests) = false;
- GTEST_FLAG(output) = "";
- GTEST_FLAG(print_time) = true;
- GTEST_FLAG(random_seed) = 0;
- GTEST_FLAG(repeat) = 1;
- GTEST_FLAG(shuffle) = false;
- GTEST_FLAG(stack_trace_depth) = kMaxStackTraceDepth;
- GTEST_FLAG(stream_result_to) = "";
- GTEST_FLAG(throw_on_failure) = false;
- }
-
- // Asserts that two narrow or wide string arrays are equal.
- template <typename CharType>
- static void AssertStringArrayEq(size_t size1, CharType** array1,
- size_t size2, CharType** array2) {
- ASSERT_EQ(size1, size2) << " Array sizes different.";
-
- for (size_t i = 0; i != size1; i++) {
- ASSERT_STREQ(array1[i], array2[i]) << " where i == " << i;
- }
- }
-
- // Verifies that the flag values match the expected values.
- static void CheckFlags(const Flags& expected) {
- EXPECT_EQ(expected.also_run_disabled_tests,
- GTEST_FLAG(also_run_disabled_tests));
- EXPECT_EQ(expected.break_on_failure, GTEST_FLAG(break_on_failure));
- EXPECT_EQ(expected.catch_exceptions, GTEST_FLAG(catch_exceptions));
- EXPECT_EQ(expected.death_test_use_fork, GTEST_FLAG(death_test_use_fork));
- EXPECT_STREQ(expected.filter, GTEST_FLAG(filter).c_str());
- EXPECT_EQ(expected.list_tests, GTEST_FLAG(list_tests));
- EXPECT_STREQ(expected.output, GTEST_FLAG(output).c_str());
- EXPECT_EQ(expected.print_time, GTEST_FLAG(print_time));
- EXPECT_EQ(expected.random_seed, GTEST_FLAG(random_seed));
- EXPECT_EQ(expected.repeat, GTEST_FLAG(repeat));
- EXPECT_EQ(expected.shuffle, GTEST_FLAG(shuffle));
- EXPECT_EQ(expected.stack_trace_depth, GTEST_FLAG(stack_trace_depth));
- EXPECT_STREQ(expected.stream_result_to,
- GTEST_FLAG(stream_result_to).c_str());
- EXPECT_EQ(expected.throw_on_failure, GTEST_FLAG(throw_on_failure));
- }
-
- // Parses a command line (specified by argc1 and argv1), then
- // verifies that the flag values are expected and that the
- // recognized flags are removed from the command line.
- template <typename CharType>
- static void TestParsingFlags(int argc1, const CharType** argv1,
- int argc2, const CharType** argv2,
- const Flags& expected, bool should_print_help) {
- const bool saved_help_flag = ::testing::internal::g_help_flag;
- ::testing::internal::g_help_flag = false;
-
-#if GTEST_HAS_STREAM_REDIRECTION
- CaptureStdout();
-#endif
-
- // Parses the command line.
- internal::ParseGoogleTestFlagsOnly(&argc1, const_cast<CharType**>(argv1));
-
-#if GTEST_HAS_STREAM_REDIRECTION
- const String captured_stdout = GetCapturedStdout();
-#endif
-
- // Verifies the flag values.
- CheckFlags(expected);
-
- // Verifies that the recognized flags are removed from the command
- // line.
- AssertStringArrayEq(argc1 + 1, argv1, argc2 + 1, argv2);
-
- // ParseGoogleTestFlagsOnly should neither set g_help_flag nor print the
- // help message for the flags it recognizes.
- EXPECT_EQ(should_print_help, ::testing::internal::g_help_flag);
-
-#if GTEST_HAS_STREAM_REDIRECTION
- const char* const expected_help_fragment =
- "This program contains tests written using";
- if (should_print_help) {
- EXPECT_PRED_FORMAT2(IsSubstring, expected_help_fragment, captured_stdout);
- } else {
- EXPECT_PRED_FORMAT2(IsNotSubstring,
- expected_help_fragment, captured_stdout);
- }
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
- ::testing::internal::g_help_flag = saved_help_flag;
- }
-
- // This macro wraps TestParsingFlags s.t. the user doesn't need
- // to specify the array sizes.
-
-#define GTEST_TEST_PARSING_FLAGS_(argv1, argv2, expected, should_print_help) \
- TestParsingFlags(sizeof(argv1)/sizeof(*argv1) - 1, argv1, \
- sizeof(argv2)/sizeof(*argv2) - 1, argv2, \
- expected, should_print_help)
-};
-
-// Tests parsing an empty command line.
-TEST_F(InitGoogleTestTest, Empty) {
- const char* argv[] = {
- NULL
- };
-
- const char* argv2[] = {
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags(), false);
-}
-
-// Tests parsing a command line that has no flag.
-TEST_F(InitGoogleTestTest, NoFlag) {
- const char* argv[] = {
- "foo.exe",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags(), false);
-}
-
-// Tests parsing a bad --gtest_filter flag.
-TEST_F(InitGoogleTestTest, FilterBad) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_filter",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- "--gtest_filter",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter(""), true);
-}
-
-// Tests parsing an empty --gtest_filter flag.
-TEST_F(InitGoogleTestTest, FilterEmpty) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_filter=",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter(""), false);
-}
-
-// Tests parsing a non-empty --gtest_filter flag.
-TEST_F(InitGoogleTestTest, FilterNonEmpty) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_filter=abc",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("abc"), false);
-}
-
-// Tests parsing --gtest_break_on_failure.
-TEST_F(InitGoogleTestTest, BreakOnFailureWithoutValue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_break_on_failure",
- NULL
-};
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true), false);
-}
-
-// Tests parsing --gtest_break_on_failure=0.
-TEST_F(InitGoogleTestTest, BreakOnFailureFalse_0) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_break_on_failure=0",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false), false);
-}
-
-// Tests parsing --gtest_break_on_failure=f.
-TEST_F(InitGoogleTestTest, BreakOnFailureFalse_f) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_break_on_failure=f",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false), false);
-}
-
-// Tests parsing --gtest_break_on_failure=F.
-TEST_F(InitGoogleTestTest, BreakOnFailureFalse_F) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_break_on_failure=F",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false), false);
-}
-
-// Tests parsing a --gtest_break_on_failure flag that has a "true"
-// definition.
-TEST_F(InitGoogleTestTest, BreakOnFailureTrue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_break_on_failure=1",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true), false);
-}
-
-// Tests parsing --gtest_catch_exceptions.
-TEST_F(InitGoogleTestTest, CatchExceptions) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_catch_exceptions",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::CatchExceptions(true), false);
-}
-
-// Tests parsing --gtest_death_test_use_fork.
-TEST_F(InitGoogleTestTest, DeathTestUseFork) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_death_test_use_fork",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::DeathTestUseFork(true), false);
-}
-
-// Tests having the same flag twice with different values. The
-// expected behavior is that the one coming last takes precedence.
-TEST_F(InitGoogleTestTest, DuplicatedFlags) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_filter=a",
- "--gtest_filter=b",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("b"), false);
-}
-
-// Tests having an unrecognized flag on the command line.
-TEST_F(InitGoogleTestTest, UnrecognizedFlag) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_break_on_failure",
- "bar", // Unrecognized by Google Test.
- "--gtest_filter=b",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- "bar",
- NULL
- };
-
- Flags flags;
- flags.break_on_failure = true;
- flags.filter = "b";
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, flags, false);
-}
-
-// Tests having a --gtest_list_tests flag
-TEST_F(InitGoogleTestTest, ListTestsFlag) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_list_tests",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true), false);
-}
-
-// Tests having a --gtest_list_tests flag with a "true" value
-TEST_F(InitGoogleTestTest, ListTestsTrue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_list_tests=1",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true), false);
-}
-
-// Tests having a --gtest_list_tests flag with a "false" value
-TEST_F(InitGoogleTestTest, ListTestsFalse) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_list_tests=0",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false), false);
-}
-
-// Tests parsing --gtest_list_tests=f.
-TEST_F(InitGoogleTestTest, ListTestsFalse_f) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_list_tests=f",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false), false);
-}
-
-// Tests parsing --gtest_list_tests=F.
-TEST_F(InitGoogleTestTest, ListTestsFalse_F) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_list_tests=F",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false), false);
-}
-
-// Tests parsing --gtest_output (invalid).
-TEST_F(InitGoogleTestTest, OutputEmpty) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_output",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- "--gtest_output",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags(), true);
-}
-
-// Tests parsing --gtest_output=xml
-TEST_F(InitGoogleTestTest, OutputXml) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_output=xml",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml"), false);
-}
-
-// Tests parsing --gtest_output=xml:file
-TEST_F(InitGoogleTestTest, OutputXmlFile) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_output=xml:file",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml:file"), false);
-}
-
-// Tests parsing --gtest_output=xml:directory/path/
-TEST_F(InitGoogleTestTest, OutputXmlDirectory) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_output=xml:directory/path/",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2,
- Flags::Output("xml:directory/path/"), false);
-}
-
-// Tests having a --gtest_print_time flag
-TEST_F(InitGoogleTestTest, PrintTimeFlag) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_print_time",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true), false);
-}
-
-// Tests having a --gtest_print_time flag with a "true" value
-TEST_F(InitGoogleTestTest, PrintTimeTrue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_print_time=1",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true), false);
-}
-
-// Tests having a --gtest_print_time flag with a "false" value
-TEST_F(InitGoogleTestTest, PrintTimeFalse) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_print_time=0",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false), false);
-}
-
-// Tests parsing --gtest_print_time=f.
-TEST_F(InitGoogleTestTest, PrintTimeFalse_f) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_print_time=f",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false), false);
-}
-
-// Tests parsing --gtest_print_time=F.
-TEST_F(InitGoogleTestTest, PrintTimeFalse_F) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_print_time=F",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false), false);
-}
-
-// Tests parsing --gtest_random_seed=number
-TEST_F(InitGoogleTestTest, RandomSeed) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_random_seed=1000",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::RandomSeed(1000), false);
-}
-
-// Tests parsing --gtest_repeat=number
-TEST_F(InitGoogleTestTest, Repeat) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_repeat=1000",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Repeat(1000), false);
-}
-
-// Tests having a --gtest_also_run_disabled_tests flag
-TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsFlag) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_also_run_disabled_tests",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2,
- Flags::AlsoRunDisabledTests(true), false);
-}
-
-// Tests having a --gtest_also_run_disabled_tests flag with a "true" value
-TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsTrue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_also_run_disabled_tests=1",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2,
- Flags::AlsoRunDisabledTests(true), false);
-}
-
-// Tests having a --gtest_also_run_disabled_tests flag with a "false" value
-TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsFalse) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_also_run_disabled_tests=0",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2,
- Flags::AlsoRunDisabledTests(false), false);
-}
-
-// Tests parsing --gtest_shuffle.
-TEST_F(InitGoogleTestTest, ShuffleWithoutValue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_shuffle",
- NULL
-};
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(true), false);
-}
-
-// Tests parsing --gtest_shuffle=0.
-TEST_F(InitGoogleTestTest, ShuffleFalse_0) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_shuffle=0",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(false), false);
-}
-
-// Tests parsing a --gtest_shuffle flag that has a "true"
-// definition.
-TEST_F(InitGoogleTestTest, ShuffleTrue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_shuffle=1",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(true), false);
-}
-
-// Tests parsing --gtest_stack_trace_depth=number.
-TEST_F(InitGoogleTestTest, StackTraceDepth) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_stack_trace_depth=5",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::StackTraceDepth(5), false);
-}
-
-TEST_F(InitGoogleTestTest, StreamResultTo) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_stream_result_to=localhost:1234",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(
- argv, argv2, Flags::StreamResultTo("localhost:1234"), false);
-}
-
-// Tests parsing --gtest_throw_on_failure.
-TEST_F(InitGoogleTestTest, ThrowOnFailureWithoutValue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_throw_on_failure",
- NULL
-};
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true), false);
-}
-
-// Tests parsing --gtest_throw_on_failure=0.
-TEST_F(InitGoogleTestTest, ThrowOnFailureFalse_0) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_throw_on_failure=0",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(false), false);
-}
-
-// Tests parsing a --gtest_throw_on_failure flag that has a "true"
-// definition.
-TEST_F(InitGoogleTestTest, ThrowOnFailureTrue) {
- const char* argv[] = {
- "foo.exe",
- "--gtest_throw_on_failure=1",
- NULL
- };
-
- const char* argv2[] = {
- "foo.exe",
- NULL
- };
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true), false);
-}
-
-#if GTEST_OS_WINDOWS
-// Tests parsing wide strings.
-TEST_F(InitGoogleTestTest, WideStrings) {
- const wchar_t* argv[] = {
- L"foo.exe",
- L"--gtest_filter=Foo*",
- L"--gtest_list_tests=1",
- L"--gtest_break_on_failure",
- L"--non_gtest_flag",
- NULL
- };
-
- const wchar_t* argv2[] = {
- L"foo.exe",
- L"--non_gtest_flag",
- NULL
- };
-
- Flags expected_flags;
- expected_flags.break_on_failure = true;
- expected_flags.filter = "Foo*";
- expected_flags.list_tests = true;
-
- GTEST_TEST_PARSING_FLAGS_(argv, argv2, expected_flags, false);
-}
-#endif // GTEST_OS_WINDOWS
-
-// Tests current_test_info() in UnitTest.
-class CurrentTestInfoTest : public Test {
- protected:
- // Tests that current_test_info() returns NULL before the first test in
- // the test case is run.
- static void SetUpTestCase() {
- // There should be no tests running at this point.
- const TestInfo* test_info =
- UnitTest::GetInstance()->current_test_info();
- EXPECT_TRUE(test_info == NULL)
- << "There should be no tests running at this point.";
- }
-
- // Tests that current_test_info() returns NULL after the last test in
- // the test case has run.
- static void TearDownTestCase() {
- const TestInfo* test_info =
- UnitTest::GetInstance()->current_test_info();
- EXPECT_TRUE(test_info == NULL)
- << "There should be no tests running at this point.";
- }
-};
-
-// Tests that current_test_info() returns TestInfo for currently running
-// test by checking the expected test name against the actual one.
-TEST_F(CurrentTestInfoTest, WorksForFirstTestInATestCase) {
- const TestInfo* test_info =
- UnitTest::GetInstance()->current_test_info();
- ASSERT_TRUE(NULL != test_info)
- << "There is a test running so we should have a valid TestInfo.";
- EXPECT_STREQ("CurrentTestInfoTest", test_info->test_case_name())
- << "Expected the name of the currently running test case.";
- EXPECT_STREQ("WorksForFirstTestInATestCase", test_info->name())
- << "Expected the name of the currently running test.";
-}
-
-// Tests that current_test_info() returns TestInfo for currently running
-// test by checking the expected test name against the actual one. We
-// use this test to see that the TestInfo object actually changed from
-// the previous invocation.
-TEST_F(CurrentTestInfoTest, WorksForSecondTestInATestCase) {
- const TestInfo* test_info =
- UnitTest::GetInstance()->current_test_info();
- ASSERT_TRUE(NULL != test_info)
- << "There is a test running so we should have a valid TestInfo.";
- EXPECT_STREQ("CurrentTestInfoTest", test_info->test_case_name())
- << "Expected the name of the currently running test case.";
- EXPECT_STREQ("WorksForSecondTestInATestCase", test_info->name())
- << "Expected the name of the currently running test.";
-}
-
-} // namespace testing
-
-// These two lines test that we can define tests in a namespace that
-// has the name "testing" and is nested in another namespace.
-namespace my_namespace {
-namespace testing {
-
-// Makes sure that TEST knows to use ::testing::Test instead of
-// ::my_namespace::testing::Test.
-class Test {};
-
-// Makes sure that an assertion knows to use ::testing::Message instead of
-// ::my_namespace::testing::Message.
-class Message {};
-
-// Makes sure that an assertion knows to use
-// ::testing::AssertionResult instead of
-// ::my_namespace::testing::AssertionResult.
-class AssertionResult {};
-
-// Tests that an assertion that should succeed works as expected.
-TEST(NestedTestingNamespaceTest, Success) {
- EXPECT_EQ(1, 1) << "This shouldn't fail.";
-}
-
-// Tests that an assertion that should fail works as expected.
-TEST(NestedTestingNamespaceTest, Failure) {
- EXPECT_FATAL_FAILURE(FAIL() << "This failure is expected.",
- "This failure is expected.");
-}
-
-} // namespace testing
-} // namespace my_namespace
-
-// Tests that one can call superclass SetUp and TearDown methods--
-// that is, that they are not private.
-// No tests are based on this fixture; the test "passes" if it compiles
-// successfully.
-class ProtectedFixtureMethodsTest : public Test {
- protected:
- virtual void SetUp() {
- Test::SetUp();
- }
- virtual void TearDown() {
- Test::TearDown();
- }
-};
-
-// StreamingAssertionsTest tests the streaming versions of a representative
-// sample of assertions.
-TEST(StreamingAssertionsTest, Unconditional) {
- SUCCEED() << "expected success";
- EXPECT_NONFATAL_FAILURE(ADD_FAILURE() << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(FAIL() << "expected failure",
- "expected failure");
-}
-
-#ifdef __BORLANDC__
-// Silences warnings: "Condition is always true", "Unreachable code"
-# pragma option push -w-ccc -w-rch
-#endif
-
-TEST(StreamingAssertionsTest, Truth) {
- EXPECT_TRUE(true) << "unexpected failure";
- ASSERT_TRUE(true) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(false) << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_TRUE(false) << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, Truth2) {
- EXPECT_FALSE(false) << "unexpected failure";
- ASSERT_FALSE(false) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(true) << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_FALSE(true) << "expected failure",
- "expected failure");
-}
-
-#ifdef __BORLANDC__
-// Restores warnings after previous "#pragma option push" supressed them
-# pragma option pop
-#endif
-
-TEST(StreamingAssertionsTest, IntegerEquals) {
- EXPECT_EQ(1, 1) << "unexpected failure";
- ASSERT_EQ(1, 1) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(1, 2) << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_EQ(1, 2) << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, IntegerLessThan) {
- EXPECT_LT(1, 2) << "unexpected failure";
- ASSERT_LT(1, 2) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1) << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_LT(2, 1) << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, StringsEqual) {
- EXPECT_STREQ("foo", "foo") << "unexpected failure";
- ASSERT_STREQ("foo", "foo") << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_STREQ("foo", "bar") << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_STREQ("foo", "bar") << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, StringsNotEqual) {
- EXPECT_STRNE("foo", "bar") << "unexpected failure";
- ASSERT_STRNE("foo", "bar") << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_STRNE("foo", "foo") << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_STRNE("foo", "foo") << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, StringsEqualIgnoringCase) {
- EXPECT_STRCASEEQ("foo", "FOO") << "unexpected failure";
- ASSERT_STRCASEEQ("foo", "FOO") << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ("foo", "bar") << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("foo", "bar") << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, StringNotEqualIgnoringCase) {
- EXPECT_STRCASENE("foo", "bar") << "unexpected failure";
- ASSERT_STRCASENE("foo", "bar") << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_STRCASENE("foo", "FOO") << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("bar", "BAR") << "expected failure",
- "expected failure");
-}
-
-TEST(StreamingAssertionsTest, FloatingPointEquals) {
- EXPECT_FLOAT_EQ(1.0, 1.0) << "unexpected failure";
- ASSERT_FLOAT_EQ(1.0, 1.0) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(0.0, 1.0) << "expected failure",
- "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.0) << "expected failure",
- "expected failure");
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-TEST(StreamingAssertionsTest, Throw) {
- EXPECT_THROW(ThrowAnInteger(), int) << "unexpected failure";
- ASSERT_THROW(ThrowAnInteger(), int) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool) <<
- "expected failure", "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_THROW(ThrowAnInteger(), bool) <<
- "expected failure", "expected failure");
-}
-
-TEST(StreamingAssertionsTest, NoThrow) {
- EXPECT_NO_THROW(ThrowNothing()) << "unexpected failure";
- ASSERT_NO_THROW(ThrowNothing()) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(ThrowAnInteger()) <<
- "expected failure", "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_NO_THROW(ThrowAnInteger()) <<
- "expected failure", "expected failure");
-}
-
-TEST(StreamingAssertionsTest, AnyThrow) {
- EXPECT_ANY_THROW(ThrowAnInteger()) << "unexpected failure";
- ASSERT_ANY_THROW(ThrowAnInteger()) << "unexpected failure";
- EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(ThrowNothing()) <<
- "expected failure", "expected failure");
- EXPECT_FATAL_FAILURE(ASSERT_ANY_THROW(ThrowNothing()) <<
- "expected failure", "expected failure");
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Tests that Google Test correctly decides whether to use colors in the output.
-
-TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsYes) {
- GTEST_FLAG(color) = "yes";
-
- SetEnv("TERM", "xterm"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
- EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY.
-
- SetEnv("TERM", "dumb"); // TERM doesn't support colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
- EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY.
-}
-
-TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsAliasOfYes) {
- SetEnv("TERM", "dumb"); // TERM doesn't support colors.
-
- GTEST_FLAG(color) = "True";
- EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY.
-
- GTEST_FLAG(color) = "t";
- EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY.
-
- GTEST_FLAG(color) = "1";
- EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY.
-}
-
-TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsNo) {
- GTEST_FLAG(color) = "no";
-
- SetEnv("TERM", "xterm"); // TERM supports colors.
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
- EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY.
-
- SetEnv("TERM", "dumb"); // TERM doesn't support colors.
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
- EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY.
-}
-
-TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsInvalid) {
- SetEnv("TERM", "xterm"); // TERM supports colors.
-
- GTEST_FLAG(color) = "F";
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-
- GTEST_FLAG(color) = "0";
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-
- GTEST_FLAG(color) = "unknown";
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-}
-
-TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) {
- GTEST_FLAG(color) = "auto";
-
- SetEnv("TERM", "xterm"); // TERM supports colors.
- EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-}
-
-TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
- GTEST_FLAG(color) = "auto";
-
-#if GTEST_OS_WINDOWS
- // On Windows, we ignore the TERM variable as it's usually not set.
-
- SetEnv("TERM", "dumb");
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "");
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "xterm");
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-#else
- // On non-Windows platforms, we rely on TERM to determine if the
- // terminal supports colors.
-
- SetEnv("TERM", "dumb"); // TERM doesn't support colors.
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "emacs"); // TERM doesn't support colors.
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "vt100"); // TERM doesn't support colors.
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "xterm-mono"); // TERM doesn't support colors.
- EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "xterm"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "xterm-color"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "xterm-256color"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "screen"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "linux"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-
- SetEnv("TERM", "cygwin"); // TERM supports colors.
- EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
-#endif // GTEST_OS_WINDOWS
-}
-
-// Verifies that StaticAssertTypeEq works in a namespace scope.
-
-static bool dummy1 GTEST_ATTRIBUTE_UNUSED_ = StaticAssertTypeEq<bool, bool>();
-static bool dummy2 GTEST_ATTRIBUTE_UNUSED_ =
- StaticAssertTypeEq<const int, const int>();
-
-// Verifies that StaticAssertTypeEq works in a class.
-
-template <typename T>
-class StaticAssertTypeEqTestHelper {
- public:
- StaticAssertTypeEqTestHelper() { StaticAssertTypeEq<bool, T>(); }
-};
-
-TEST(StaticAssertTypeEqTest, WorksInClass) {
- StaticAssertTypeEqTestHelper<bool>();
-}
-
-// Verifies that StaticAssertTypeEq works inside a function.
-
-typedef int IntAlias;
-
-TEST(StaticAssertTypeEqTest, CompilesForEqualTypes) {
- StaticAssertTypeEq<int, IntAlias>();
- StaticAssertTypeEq<int*, IntAlias*>();
-}
-
-TEST(GetCurrentOsStackTraceExceptTopTest, ReturnsTheStackTrace) {
- testing::UnitTest* const unit_test = testing::UnitTest::GetInstance();
-
- // We don't have a stack walker in Google Test yet.
- EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 0).c_str());
- EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 1).c_str());
-}
-
-TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsNoFailure) {
- EXPECT_FALSE(HasNonfatalFailure());
-}
-
-static void FailFatally() { FAIL(); }
-
-TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsOnlyFatalFailure) {
- FailFatally();
- const bool has_nonfatal_failure = HasNonfatalFailure();
- ClearCurrentTestPartResults();
- EXPECT_FALSE(has_nonfatal_failure);
-}
-
-TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) {
- ADD_FAILURE();
- const bool has_nonfatal_failure = HasNonfatalFailure();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_nonfatal_failure);
-}
-
-TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) {
- FailFatally();
- ADD_FAILURE();
- const bool has_nonfatal_failure = HasNonfatalFailure();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_nonfatal_failure);
-}
-
-// A wrapper for calling HasNonfatalFailure outside of a test body.
-static bool HasNonfatalFailureHelper() {
- return testing::Test::HasNonfatalFailure();
-}
-
-TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody) {
- EXPECT_FALSE(HasNonfatalFailureHelper());
-}
-
-TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody2) {
- ADD_FAILURE();
- const bool has_nonfatal_failure = HasNonfatalFailureHelper();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_nonfatal_failure);
-}
-
-TEST(HasFailureTest, ReturnsFalseWhenThereIsNoFailure) {
- EXPECT_FALSE(HasFailure());
-}
-
-TEST(HasFailureTest, ReturnsTrueWhenThereIsFatalFailure) {
- FailFatally();
- const bool has_failure = HasFailure();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_failure);
-}
-
-TEST(HasFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) {
- ADD_FAILURE();
- const bool has_failure = HasFailure();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_failure);
-}
-
-TEST(HasFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) {
- FailFatally();
- ADD_FAILURE();
- const bool has_failure = HasFailure();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_failure);
-}
-
-// A wrapper for calling HasFailure outside of a test body.
-static bool HasFailureHelper() { return testing::Test::HasFailure(); }
-
-TEST(HasFailureTest, WorksOutsideOfTestBody) {
- EXPECT_FALSE(HasFailureHelper());
-}
-
-TEST(HasFailureTest, WorksOutsideOfTestBody2) {
- ADD_FAILURE();
- const bool has_failure = HasFailureHelper();
- ClearCurrentTestPartResults();
- EXPECT_TRUE(has_failure);
-}
-
-class TestListener : public EmptyTestEventListener {
- public:
- TestListener() : on_start_counter_(NULL), is_destroyed_(NULL) {}
- TestListener(int* on_start_counter, bool* is_destroyed)
- : on_start_counter_(on_start_counter),
- is_destroyed_(is_destroyed) {}
-
- virtual ~TestListener() {
- if (is_destroyed_)
- *is_destroyed_ = true;
- }
-
- protected:
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {
- if (on_start_counter_ != NULL)
- (*on_start_counter_)++;
- }
-
- private:
- int* on_start_counter_;
- bool* is_destroyed_;
-};
-
-// Tests the constructor.
-TEST(TestEventListenersTest, ConstructionWorks) {
- TestEventListeners listeners;
-
- EXPECT_TRUE(TestEventListenersAccessor::GetRepeater(&listeners) != NULL);
- EXPECT_TRUE(listeners.default_result_printer() == NULL);
- EXPECT_TRUE(listeners.default_xml_generator() == NULL);
-}
-
-// Tests that the TestEventListeners destructor deletes all the listeners it
-// owns.
-TEST(TestEventListenersTest, DestructionWorks) {
- bool default_result_printer_is_destroyed = false;
- bool default_xml_printer_is_destroyed = false;
- bool extra_listener_is_destroyed = false;
- TestListener* default_result_printer = new TestListener(
- NULL, &default_result_printer_is_destroyed);
- TestListener* default_xml_printer = new TestListener(
- NULL, &default_xml_printer_is_destroyed);
- TestListener* extra_listener = new TestListener(
- NULL, &extra_listener_is_destroyed);
-
- {
- TestEventListeners listeners;
- TestEventListenersAccessor::SetDefaultResultPrinter(&listeners,
- default_result_printer);
- TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners,
- default_xml_printer);
- listeners.Append(extra_listener);
- }
- EXPECT_TRUE(default_result_printer_is_destroyed);
- EXPECT_TRUE(default_xml_printer_is_destroyed);
- EXPECT_TRUE(extra_listener_is_destroyed);
-}
-
-// Tests that a listener Append'ed to a TestEventListeners list starts
-// receiving events.
-TEST(TestEventListenersTest, Append) {
- int on_start_counter = 0;
- bool is_destroyed = false;
- TestListener* listener = new TestListener(&on_start_counter, &is_destroyed);
- {
- TestEventListeners listeners;
- listeners.Append(listener);
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_EQ(1, on_start_counter);
- }
- EXPECT_TRUE(is_destroyed);
-}
-
-// Tests that listeners receive events in the order they were appended to
-// the list, except for *End requests, which must be received in the reverse
-// order.
-class SequenceTestingListener : public EmptyTestEventListener {
- public:
- SequenceTestingListener(std::vector<String>* vector, const char* id)
- : vector_(vector), id_(id) {}
-
- protected:
- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {
- vector_->push_back(GetEventDescription("OnTestProgramStart"));
- }
-
- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {
- vector_->push_back(GetEventDescription("OnTestProgramEnd"));
- }
-
- virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
- int /*iteration*/) {
- vector_->push_back(GetEventDescription("OnTestIterationStart"));
- }
-
- virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
- int /*iteration*/) {
- vector_->push_back(GetEventDescription("OnTestIterationEnd"));
- }
-
- private:
- String GetEventDescription(const char* method) {
- Message message;
- message << id_ << "." << method;
- return message.GetString();
- }
-
- std::vector<String>* vector_;
- const char* const id_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(SequenceTestingListener);
-};
-
-TEST(EventListenerTest, AppendKeepsOrder) {
- std::vector<String> vec;
- TestEventListeners listeners;
- listeners.Append(new SequenceTestingListener(&vec, "1st"));
- listeners.Append(new SequenceTestingListener(&vec, "2nd"));
- listeners.Append(new SequenceTestingListener(&vec, "3rd"));
-
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- ASSERT_EQ(3U, vec.size());
- EXPECT_STREQ("1st.OnTestProgramStart", vec[0].c_str());
- EXPECT_STREQ("2nd.OnTestProgramStart", vec[1].c_str());
- EXPECT_STREQ("3rd.OnTestProgramStart", vec[2].c_str());
-
- vec.clear();
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramEnd(
- *UnitTest::GetInstance());
- ASSERT_EQ(3U, vec.size());
- EXPECT_STREQ("3rd.OnTestProgramEnd", vec[0].c_str());
- EXPECT_STREQ("2nd.OnTestProgramEnd", vec[1].c_str());
- EXPECT_STREQ("1st.OnTestProgramEnd", vec[2].c_str());
-
- vec.clear();
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestIterationStart(
- *UnitTest::GetInstance(), 0);
- ASSERT_EQ(3U, vec.size());
- EXPECT_STREQ("1st.OnTestIterationStart", vec[0].c_str());
- EXPECT_STREQ("2nd.OnTestIterationStart", vec[1].c_str());
- EXPECT_STREQ("3rd.OnTestIterationStart", vec[2].c_str());
-
- vec.clear();
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestIterationEnd(
- *UnitTest::GetInstance(), 0);
- ASSERT_EQ(3U, vec.size());
- EXPECT_STREQ("3rd.OnTestIterationEnd", vec[0].c_str());
- EXPECT_STREQ("2nd.OnTestIterationEnd", vec[1].c_str());
- EXPECT_STREQ("1st.OnTestIterationEnd", vec[2].c_str());
-}
-
-// Tests that a listener removed from a TestEventListeners list stops receiving
-// events and is not deleted when the list is destroyed.
-TEST(TestEventListenersTest, Release) {
- int on_start_counter = 0;
- bool is_destroyed = false;
- // Although Append passes the ownership of this object to the list,
- // the following calls release it, and we need to delete it before the
- // test ends.
- TestListener* listener = new TestListener(&on_start_counter, &is_destroyed);
- {
- TestEventListeners listeners;
- listeners.Append(listener);
- EXPECT_EQ(listener, listeners.Release(listener));
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_TRUE(listeners.Release(listener) == NULL);
- }
- EXPECT_EQ(0, on_start_counter);
- EXPECT_FALSE(is_destroyed);
- delete listener;
-}
-
-// Tests that no events are forwarded when event forwarding is disabled.
-TEST(EventListenerTest, SuppressEventForwarding) {
- int on_start_counter = 0;
- TestListener* listener = new TestListener(&on_start_counter, NULL);
-
- TestEventListeners listeners;
- listeners.Append(listener);
- ASSERT_TRUE(TestEventListenersAccessor::EventForwardingEnabled(listeners));
- TestEventListenersAccessor::SuppressEventForwarding(&listeners);
- ASSERT_FALSE(TestEventListenersAccessor::EventForwardingEnabled(listeners));
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_EQ(0, on_start_counter);
-}
-
-// Tests that events generated by Google Test are not forwarded in
-// death test subprocesses.
-TEST(EventListenerDeathTest, EventsNotForwardedInDeathTestSubprecesses) {
- EXPECT_DEATH_IF_SUPPORTED({
- GTEST_CHECK_(TestEventListenersAccessor::EventForwardingEnabled(
- *GetUnitTestImpl()->listeners())) << "expected failure";},
- "expected failure");
-}
-
-// Tests that a listener installed via SetDefaultResultPrinter() starts
-// receiving events and is returned via default_result_printer() and that
-// the previous default_result_printer is removed from the list and deleted.
-TEST(EventListenerTest, default_result_printer) {
- int on_start_counter = 0;
- bool is_destroyed = false;
- TestListener* listener = new TestListener(&on_start_counter, &is_destroyed);
-
- TestEventListeners listeners;
- TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, listener);
-
- EXPECT_EQ(listener, listeners.default_result_printer());
-
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
-
- EXPECT_EQ(1, on_start_counter);
-
- // Replacing default_result_printer with something else should remove it
- // from the list and destroy it.
- TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, NULL);
-
- EXPECT_TRUE(listeners.default_result_printer() == NULL);
- EXPECT_TRUE(is_destroyed);
-
- // After broadcasting an event the counter is still the same, indicating
- // the listener is not in the list anymore.
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_EQ(1, on_start_counter);
-}
-
-// Tests that the default_result_printer listener stops receiving events
-// when removed via Release and that is not owned by the list anymore.
-TEST(EventListenerTest, RemovingDefaultResultPrinterWorks) {
- int on_start_counter = 0;
- bool is_destroyed = false;
- // Although Append passes the ownership of this object to the list,
- // the following calls release it, and we need to delete it before the
- // test ends.
- TestListener* listener = new TestListener(&on_start_counter, &is_destroyed);
- {
- TestEventListeners listeners;
- TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, listener);
-
- EXPECT_EQ(listener, listeners.Release(listener));
- EXPECT_TRUE(listeners.default_result_printer() == NULL);
- EXPECT_FALSE(is_destroyed);
-
- // Broadcasting events now should not affect default_result_printer.
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_EQ(0, on_start_counter);
- }
- // Destroying the list should not affect the listener now, too.
- EXPECT_FALSE(is_destroyed);
- delete listener;
-}
-
-// Tests that a listener installed via SetDefaultXmlGenerator() starts
-// receiving events and is returned via default_xml_generator() and that
-// the previous default_xml_generator is removed from the list and deleted.
-TEST(EventListenerTest, default_xml_generator) {
- int on_start_counter = 0;
- bool is_destroyed = false;
- TestListener* listener = new TestListener(&on_start_counter, &is_destroyed);
-
- TestEventListeners listeners;
- TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, listener);
-
- EXPECT_EQ(listener, listeners.default_xml_generator());
-
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
-
- EXPECT_EQ(1, on_start_counter);
-
- // Replacing default_xml_generator with something else should remove it
- // from the list and destroy it.
- TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, NULL);
-
- EXPECT_TRUE(listeners.default_xml_generator() == NULL);
- EXPECT_TRUE(is_destroyed);
-
- // After broadcasting an event the counter is still the same, indicating
- // the listener is not in the list anymore.
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_EQ(1, on_start_counter);
-}
-
-// Tests that the default_xml_generator listener stops receiving events
-// when removed via Release and that is not owned by the list anymore.
-TEST(EventListenerTest, RemovingDefaultXmlGeneratorWorks) {
- int on_start_counter = 0;
- bool is_destroyed = false;
- // Although Append passes the ownership of this object to the list,
- // the following calls release it, and we need to delete it before the
- // test ends.
- TestListener* listener = new TestListener(&on_start_counter, &is_destroyed);
- {
- TestEventListeners listeners;
- TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, listener);
-
- EXPECT_EQ(listener, listeners.Release(listener));
- EXPECT_TRUE(listeners.default_xml_generator() == NULL);
- EXPECT_FALSE(is_destroyed);
-
- // Broadcasting events now should not affect default_xml_generator.
- TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart(
- *UnitTest::GetInstance());
- EXPECT_EQ(0, on_start_counter);
- }
- // Destroying the list should not affect the listener now, too.
- EXPECT_FALSE(is_destroyed);
- delete listener;
-}
-
-// Sanity tests to ensure that the alternative, verbose spellings of
-// some of the macros work. We don't test them thoroughly as that
-// would be quite involved. Since their implementations are
-// straightforward, and they are rarely used, we'll just rely on the
-// users to tell us when they are broken.
-GTEST_TEST(AlternativeNameTest, Works) { // GTEST_TEST is the same as TEST.
- GTEST_SUCCEED() << "OK"; // GTEST_SUCCEED is the same as SUCCEED.
-
- // GTEST_FAIL is the same as FAIL.
- EXPECT_FATAL_FAILURE(GTEST_FAIL() << "An expected failure",
- "An expected failure");
-
- // GTEST_ASSERT_XY is the same as ASSERT_XY.
-
- GTEST_ASSERT_EQ(0, 0);
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_EQ(0, 1) << "An expected failure",
- "An expected failure");
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_EQ(1, 0) << "An expected failure",
- "An expected failure");
-
- GTEST_ASSERT_NE(0, 1);
- GTEST_ASSERT_NE(1, 0);
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_NE(0, 0) << "An expected failure",
- "An expected failure");
-
- GTEST_ASSERT_LE(0, 0);
- GTEST_ASSERT_LE(0, 1);
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_LE(1, 0) << "An expected failure",
- "An expected failure");
-
- GTEST_ASSERT_LT(0, 1);
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_LT(0, 0) << "An expected failure",
- "An expected failure");
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_LT(1, 0) << "An expected failure",
- "An expected failure");
-
- GTEST_ASSERT_GE(0, 0);
- GTEST_ASSERT_GE(1, 0);
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_GE(0, 1) << "An expected failure",
- "An expected failure");
-
- GTEST_ASSERT_GT(1, 0);
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_GT(0, 1) << "An expected failure",
- "An expected failure");
- EXPECT_FATAL_FAILURE(GTEST_ASSERT_GT(1, 1) << "An expected failure",
- "An expected failure");
-}
-
-// Tests for internal utilities necessary for implementation of the universal
-// printing.
-// TODO(vladl@google.com): Find a better home for them.
-
-class ConversionHelperBase {};
-class ConversionHelperDerived : public ConversionHelperBase {};
-
-// Tests that IsAProtocolMessage<T>::value is a compile-time constant.
-TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) {
- GTEST_COMPILE_ASSERT_(IsAProtocolMessage<ProtocolMessage>::value,
- const_true);
- GTEST_COMPILE_ASSERT_(!IsAProtocolMessage<int>::value, const_false);
-}
-
-// Tests that IsAProtocolMessage<T>::value is true when T is
-// proto2::Message or a sub-class of it.
-TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAProtocolMessage) {
- EXPECT_TRUE(IsAProtocolMessage< ::proto2::Message>::value);
- EXPECT_TRUE(IsAProtocolMessage<ProtocolMessage>::value);
-}
-
-// Tests that IsAProtocolMessage<T>::value is false when T is neither
-// ProtocolMessage nor a sub-class of it.
-TEST(IsAProtocolMessageTest, ValueIsFalseWhenTypeIsNotAProtocolMessage) {
- EXPECT_FALSE(IsAProtocolMessage<int>::value);
- EXPECT_FALSE(IsAProtocolMessage<const ConversionHelperBase>::value);
-}
-
-// Tests that CompileAssertTypesEqual compiles when the type arguments are
-// equal.
-TEST(CompileAssertTypesEqual, CompilesWhenTypesAreEqual) {
- CompileAssertTypesEqual<void, void>();
- CompileAssertTypesEqual<int*, int*>();
-}
-
-// Tests that RemoveReference does not affect non-reference types.
-TEST(RemoveReferenceTest, DoesNotAffectNonReferenceType) {
- CompileAssertTypesEqual<int, RemoveReference<int>::type>();
- CompileAssertTypesEqual<const char, RemoveReference<const char>::type>();
-}
-
-// Tests that RemoveReference removes reference from reference types.
-TEST(RemoveReferenceTest, RemovesReference) {
- CompileAssertTypesEqual<int, RemoveReference<int&>::type>();
- CompileAssertTypesEqual<const char, RemoveReference<const char&>::type>();
-}
-
-// Tests GTEST_REMOVE_REFERENCE_.
-
-template <typename T1, typename T2>
-void TestGTestRemoveReference() {
- CompileAssertTypesEqual<T1, GTEST_REMOVE_REFERENCE_(T2)>();
-}
-
-TEST(RemoveReferenceTest, MacroVersion) {
- TestGTestRemoveReference<int, int>();
- TestGTestRemoveReference<const char, const char&>();
-}
-
-
-// Tests that RemoveConst does not affect non-const types.
-TEST(RemoveConstTest, DoesNotAffectNonConstType) {
- CompileAssertTypesEqual<int, RemoveConst<int>::type>();
- CompileAssertTypesEqual<char&, RemoveConst<char&>::type>();
-}
-
-// Tests that RemoveConst removes const from const types.
-TEST(RemoveConstTest, RemovesConst) {
- CompileAssertTypesEqual<int, RemoveConst<const int>::type>();
- CompileAssertTypesEqual<char[2], RemoveConst<const char[2]>::type>();
- CompileAssertTypesEqual<char[2][3], RemoveConst<const char[2][3]>::type>();
-}
-
-// Tests GTEST_REMOVE_CONST_.
-
-template <typename T1, typename T2>
-void TestGTestRemoveConst() {
- CompileAssertTypesEqual<T1, GTEST_REMOVE_CONST_(T2)>();
-}
-
-TEST(RemoveConstTest, MacroVersion) {
- TestGTestRemoveConst<int, int>();
- TestGTestRemoveConst<double&, double&>();
- TestGTestRemoveConst<char, const char>();
-}
-
-// Tests GTEST_REMOVE_REFERENCE_AND_CONST_.
-
-template <typename T1, typename T2>
-void TestGTestRemoveReferenceAndConst() {
- CompileAssertTypesEqual<T1, GTEST_REMOVE_REFERENCE_AND_CONST_(T2)>();
-}
-
-TEST(RemoveReferenceToConstTest, Works) {
- TestGTestRemoveReferenceAndConst<int, int>();
- TestGTestRemoveReferenceAndConst<double, double&>();
- TestGTestRemoveReferenceAndConst<char, const char>();
- TestGTestRemoveReferenceAndConst<char, const char&>();
- TestGTestRemoveReferenceAndConst<const char*, const char*>();
-}
-
-// Tests that AddReference does not affect reference types.
-TEST(AddReferenceTest, DoesNotAffectReferenceType) {
- CompileAssertTypesEqual<int&, AddReference<int&>::type>();
- CompileAssertTypesEqual<const char&, AddReference<const char&>::type>();
-}
-
-// Tests that AddReference adds reference to non-reference types.
-TEST(AddReferenceTest, AddsReference) {
- CompileAssertTypesEqual<int&, AddReference<int>::type>();
- CompileAssertTypesEqual<const char&, AddReference<const char>::type>();
-}
-
-// Tests GTEST_ADD_REFERENCE_.
-
-template <typename T1, typename T2>
-void TestGTestAddReference() {
- CompileAssertTypesEqual<T1, GTEST_ADD_REFERENCE_(T2)>();
-}
-
-TEST(AddReferenceTest, MacroVersion) {
- TestGTestAddReference<int&, int>();
- TestGTestAddReference<const char&, const char&>();
-}
-
-// Tests GTEST_REFERENCE_TO_CONST_.
-
-template <typename T1, typename T2>
-void TestGTestReferenceToConst() {
- CompileAssertTypesEqual<T1, GTEST_REFERENCE_TO_CONST_(T2)>();
-}
-
-TEST(GTestReferenceToConstTest, Works) {
- TestGTestReferenceToConst<const char&, char>();
- TestGTestReferenceToConst<const int&, const int>();
- TestGTestReferenceToConst<const double&, double>();
- TestGTestReferenceToConst<const String&, const String&>();
-}
-
-// Tests that ImplicitlyConvertible<T1, T2>::value is a compile-time constant.
-TEST(ImplicitlyConvertibleTest, ValueIsCompileTimeConstant) {
- GTEST_COMPILE_ASSERT_((ImplicitlyConvertible<int, int>::value), const_true);
- GTEST_COMPILE_ASSERT_((!ImplicitlyConvertible<void*, int*>::value),
- const_false);
-}
-
-// Tests that ImplicitlyConvertible<T1, T2>::value is true when T1 can
-// be implicitly converted to T2.
-TEST(ImplicitlyConvertibleTest, ValueIsTrueWhenConvertible) {
- EXPECT_TRUE((ImplicitlyConvertible<int, double>::value));
- EXPECT_TRUE((ImplicitlyConvertible<double, int>::value));
- EXPECT_TRUE((ImplicitlyConvertible<int*, void*>::value));
- EXPECT_TRUE((ImplicitlyConvertible<int*, const int*>::value));
- EXPECT_TRUE((ImplicitlyConvertible<ConversionHelperDerived&,
- const ConversionHelperBase&>::value));
- EXPECT_TRUE((ImplicitlyConvertible<const ConversionHelperBase,
- ConversionHelperBase>::value));
-}
-
-// Tests that ImplicitlyConvertible<T1, T2>::value is false when T1
-// cannot be implicitly converted to T2.
-TEST(ImplicitlyConvertibleTest, ValueIsFalseWhenNotConvertible) {
- EXPECT_FALSE((ImplicitlyConvertible<double, int*>::value));
- EXPECT_FALSE((ImplicitlyConvertible<void*, int*>::value));
- EXPECT_FALSE((ImplicitlyConvertible<const int*, int*>::value));
- EXPECT_FALSE((ImplicitlyConvertible<ConversionHelperBase&,
- ConversionHelperDerived&>::value));
-}
-
-// Tests IsContainerTest.
-
-class NonContainer {};
-
-TEST(IsContainerTestTest, WorksForNonContainer) {
- EXPECT_EQ(sizeof(IsNotContainer), sizeof(IsContainerTest<int>(0)));
- EXPECT_EQ(sizeof(IsNotContainer), sizeof(IsContainerTest<char[5]>(0)));
- EXPECT_EQ(sizeof(IsNotContainer), sizeof(IsContainerTest<NonContainer>(0)));
-}
-
-TEST(IsContainerTestTest, WorksForContainer) {
- EXPECT_EQ(sizeof(IsContainer),
- sizeof(IsContainerTest<std::vector<bool> >(0)));
- EXPECT_EQ(sizeof(IsContainer),
- sizeof(IsContainerTest<std::map<int, double> >(0)));
-}
-
-// Tests ArrayEq().
-
-TEST(ArrayEqTest, WorksForDegeneratedArrays) {
- EXPECT_TRUE(ArrayEq(5, 5L));
- EXPECT_FALSE(ArrayEq('a', 0));
-}
-
-TEST(ArrayEqTest, WorksForOneDimensionalArrays) {
- const int a[] = { 0, 1 };
- long b[] = { 0, 1 };
- EXPECT_TRUE(ArrayEq(a, b));
- EXPECT_TRUE(ArrayEq(a, 2, b));
-
- b[0] = 2;
- EXPECT_FALSE(ArrayEq(a, b));
- EXPECT_FALSE(ArrayEq(a, 1, b));
-}
-
-TEST(ArrayEqTest, WorksForTwoDimensionalArrays) {
- const char a[][3] = { "hi", "lo" };
- const char b[][3] = { "hi", "lo" };
- const char c[][3] = { "hi", "li" };
-
- EXPECT_TRUE(ArrayEq(a, b));
- EXPECT_TRUE(ArrayEq(a, 2, b));
-
- EXPECT_FALSE(ArrayEq(a, c));
- EXPECT_FALSE(ArrayEq(a, 2, c));
-}
-
-// Tests ArrayAwareFind().
-
-TEST(ArrayAwareFindTest, WorksForOneDimensionalArray) {
- const char a[] = "hello";
- EXPECT_EQ(a + 4, ArrayAwareFind(a, a + 5, 'o'));
- EXPECT_EQ(a + 5, ArrayAwareFind(a, a + 5, 'x'));
-}
-
-TEST(ArrayAwareFindTest, WorksForTwoDimensionalArray) {
- int a[][2] = { { 0, 1 }, { 2, 3 }, { 4, 5 } };
- const int b[2] = { 2, 3 };
- EXPECT_EQ(a + 1, ArrayAwareFind(a, a + 3, b));
-
- const int c[2] = { 6, 7 };
- EXPECT_EQ(a + 3, ArrayAwareFind(a, a + 3, c));
-}
-
-// Tests CopyArray().
-
-TEST(CopyArrayTest, WorksForDegeneratedArrays) {
- int n = 0;
- CopyArray('a', &n);
- EXPECT_EQ('a', n);
-}
-
-TEST(CopyArrayTest, WorksForOneDimensionalArrays) {
- const char a[3] = "hi";
- int b[3];
-#ifndef __BORLANDC__ // C++Builder cannot compile some array size deductions.
- CopyArray(a, &b);
- EXPECT_TRUE(ArrayEq(a, b));
-#endif
-
- int c[3];
- CopyArray(a, 3, c);
- EXPECT_TRUE(ArrayEq(a, c));
-}
-
-TEST(CopyArrayTest, WorksForTwoDimensionalArrays) {
- const int a[2][3] = { { 0, 1, 2 }, { 3, 4, 5 } };
- int b[2][3];
-#ifndef __BORLANDC__ // C++Builder cannot compile some array size deductions.
- CopyArray(a, &b);
- EXPECT_TRUE(ArrayEq(a, b));
-#endif
-
- int c[2][3];
- CopyArray(a, 2, c);
- EXPECT_TRUE(ArrayEq(a, c));
-}
-
-// Tests NativeArray.
-
-TEST(NativeArrayTest, ConstructorFromArrayWorks) {
- const int a[3] = { 0, 1, 2 };
- NativeArray<int> na(a, 3, kReference);
- EXPECT_EQ(3U, na.size());
- EXPECT_EQ(a, na.begin());
-}
-
-TEST(NativeArrayTest, CreatesAndDeletesCopyOfArrayWhenAskedTo) {
- typedef int Array[2];
- Array* a = new Array[1];
- (*a)[0] = 0;
- (*a)[1] = 1;
- NativeArray<int> na(*a, 2, kCopy);
- EXPECT_NE(*a, na.begin());
- delete[] a;
- EXPECT_EQ(0, na.begin()[0]);
- EXPECT_EQ(1, na.begin()[1]);
-
- // We rely on the heap checker to verify that na deletes the copy of
- // array.
-}
-
-TEST(NativeArrayTest, TypeMembersAreCorrect) {
- StaticAssertTypeEq<char, NativeArray<char>::value_type>();
- StaticAssertTypeEq<int[2], NativeArray<int[2]>::value_type>();
-
- StaticAssertTypeEq<const char*, NativeArray<char>::const_iterator>();
- StaticAssertTypeEq<const bool(*)[2], NativeArray<bool[2]>::const_iterator>();
-}
-
-TEST(NativeArrayTest, MethodsWork) {
- const int a[3] = { 0, 1, 2 };
- NativeArray<int> na(a, 3, kCopy);
- ASSERT_EQ(3U, na.size());
- EXPECT_EQ(3, na.end() - na.begin());
-
- NativeArray<int>::const_iterator it = na.begin();
- EXPECT_EQ(0, *it);
- ++it;
- EXPECT_EQ(1, *it);
- it++;
- EXPECT_EQ(2, *it);
- ++it;
- EXPECT_EQ(na.end(), it);
-
- EXPECT_TRUE(na == na);
-
- NativeArray<int> na2(a, 3, kReference);
- EXPECT_TRUE(na == na2);
-
- const int b1[3] = { 0, 1, 1 };
- const int b2[4] = { 0, 1, 2, 3 };
- EXPECT_FALSE(na == NativeArray<int>(b1, 3, kReference));
- EXPECT_FALSE(na == NativeArray<int>(b2, 4, kCopy));
-}
-
-TEST(NativeArrayTest, WorksForTwoDimensionalArray) {
- const char a[2][3] = { "hi", "lo" };
- NativeArray<char[3]> na(a, 2, kReference);
- ASSERT_EQ(2U, na.size());
- EXPECT_EQ(a, na.begin());
-}
-
-// Tests SkipPrefix().
-
-TEST(SkipPrefixTest, SkipsWhenPrefixMatches) {
- const char* const str = "hello";
-
- const char* p = str;
- EXPECT_TRUE(SkipPrefix("", &p));
- EXPECT_EQ(str, p);
-
- p = str;
- EXPECT_TRUE(SkipPrefix("hell", &p));
- EXPECT_EQ(str + 4, p);
-}
-
-TEST(SkipPrefixTest, DoesNotSkipWhenPrefixDoesNotMatch) {
- const char* const str = "world";
-
- const char* p = str;
- EXPECT_FALSE(SkipPrefix("W", &p));
- EXPECT_EQ(str, p);
-
- p = str;
- EXPECT_FALSE(SkipPrefix("world!", &p));
- EXPECT_EQ(str, p);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile1_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile1_test_.cc
deleted file mode 100644
index 531ced49d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile1_test_.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: keith.ray@gmail.com (Keith Ray)
-//
-// gtest_xml_outfile1_test_ writes some xml via TestProperty used by
-// gtest_xml_outfiles_test.py
-
-#include "gtest/gtest.h"
-
-class PropertyOne : public testing::Test {
- protected:
- virtual void SetUp() {
- RecordProperty("SetUpProp", 1);
- }
- virtual void TearDown() {
- RecordProperty("TearDownProp", 1);
- }
-};
-
-TEST_F(PropertyOne, TestSomeProperties) {
- RecordProperty("TestSomeProperty", 1);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile2_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile2_test_.cc
deleted file mode 100644
index 7b400b276..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfile2_test_.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: keith.ray@gmail.com (Keith Ray)
-//
-// gtest_xml_outfile2_test_ writes some xml via TestProperty used by
-// gtest_xml_outfiles_test.py
-
-#include "gtest/gtest.h"
-
-class PropertyTwo : public testing::Test {
- protected:
- virtual void SetUp() {
- RecordProperty("SetUpProp", 2);
- }
- virtual void TearDown() {
- RecordProperty("TearDownProp", 2);
- }
-};
-
-TEST_F(PropertyTwo, TestSomeProperties) {
- RecordProperty("TestSomeProperty", 2);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfiles_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfiles_test.py
deleted file mode 100755
index 0fe947f08..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfiles_test.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test for the gtest_xml_output module."""
-
-__author__ = "keith.ray@gmail.com (Keith Ray)"
-
-import os
-from xml.dom import minidom, Node
-
-import gtest_test_utils
-import gtest_xml_test_utils
-
-
-GTEST_OUTPUT_SUBDIR = "xml_outfiles"
-GTEST_OUTPUT_1_TEST = "gtest_xml_outfile1_test_"
-GTEST_OUTPUT_2_TEST = "gtest_xml_outfile2_test_"
-
-EXPECTED_XML_1 = """<?xml version="1.0" encoding="UTF-8"?>
-<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" name="AllTests">
- <testsuite name="PropertyOne" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="TestSomeProperties" status="run" time="*" classname="PropertyOne" SetUpProp="1" TestSomeProperty="1" TearDownProp="1" />
- </testsuite>
-</testsuites>
-"""
-
-EXPECTED_XML_2 = """<?xml version="1.0" encoding="UTF-8"?>
-<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" name="AllTests">
- <testsuite name="PropertyTwo" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="TestSomeProperties" status="run" time="*" classname="PropertyTwo" SetUpProp="2" TestSomeProperty="2" TearDownProp="2" />
- </testsuite>
-</testsuites>
-"""
-
-
-class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase):
- """Unit test for Google Test's XML output functionality."""
-
- def setUp(self):
- # We want the trailing '/' that the last "" provides in os.path.join, for
- # telling Google Test to create an output directory instead of a single file
- # for xml output.
- self.output_dir_ = os.path.join(gtest_test_utils.GetTempDir(),
- GTEST_OUTPUT_SUBDIR, "")
- self.DeleteFilesAndDir()
-
- def tearDown(self):
- self.DeleteFilesAndDir()
-
- def DeleteFilesAndDir(self):
- try:
- os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_1_TEST + ".xml"))
- except os.error:
- pass
- try:
- os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_2_TEST + ".xml"))
- except os.error:
- pass
- try:
- os.rmdir(self.output_dir_)
- except os.error:
- pass
-
- def testOutfile1(self):
- self._TestOutFile(GTEST_OUTPUT_1_TEST, EXPECTED_XML_1)
-
- def testOutfile2(self):
- self._TestOutFile(GTEST_OUTPUT_2_TEST, EXPECTED_XML_2)
-
- def _TestOutFile(self, test_name, expected_xml):
- gtest_prog_path = gtest_test_utils.GetTestExecutablePath(test_name)
- command = [gtest_prog_path, "--gtest_output=xml:%s" % self.output_dir_]
- p = gtest_test_utils.Subprocess(command,
- working_dir=gtest_test_utils.GetTempDir())
- self.assert_(p.exited)
- self.assertEquals(0, p.exit_code)
-
- # TODO(wan@google.com): libtool causes the built test binary to be
- # named lt-gtest_xml_outfiles_test_ instead of
- # gtest_xml_outfiles_test_. To account for this possibillity, we
- # allow both names in the following code. We should remove this
- # hack when Chandler Carruth's libtool replacement tool is ready.
- output_file_name1 = test_name + ".xml"
- output_file1 = os.path.join(self.output_dir_, output_file_name1)
- output_file_name2 = 'lt-' + output_file_name1
- output_file2 = os.path.join(self.output_dir_, output_file_name2)
- self.assert_(os.path.isfile(output_file1) or os.path.isfile(output_file2),
- output_file1)
-
- expected = minidom.parseString(expected_xml)
- if os.path.isfile(output_file1):
- actual = minidom.parse(output_file1)
- else:
- actual = minidom.parse(output_file2)
- self.NormalizeXml(actual.documentElement)
- self.AssertEquivalentNodes(expected.documentElement,
- actual.documentElement)
- expected.unlink()
- actual.unlink()
-
-
-if __name__ == "__main__":
- os.environ["GTEST_STACK_TRACE_DEPTH"] = "0"
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest.py
deleted file mode 100755
index bdd503533..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest.py
+++ /dev/null
@@ -1,242 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test for the gtest_xml_output module"""
-
-__author__ = 'eefacm@gmail.com (Sean Mcafee)'
-
-import errno
-import os
-import sys
-from xml.dom import minidom, Node
-
-import gtest_test_utils
-import gtest_xml_test_utils
-
-
-GTEST_OUTPUT_FLAG = "--gtest_output"
-GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml"
-GTEST_PROGRAM_NAME = "gtest_xml_output_unittest_"
-
-SUPPORTS_STACK_TRACES = False
-
-if SUPPORTS_STACK_TRACES:
- STACK_TRACE_TEMPLATE = "\nStack trace:\n*"
-else:
- STACK_TRACE_TEMPLATE = ""
-
-EXPECTED_NON_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?>
-<testsuites tests="23" failures="4" disabled="2" errors="0" time="*" name="AllTests">
- <testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="Succeeds" status="run" time="*" classname="SuccessfulTest"/>
- </testsuite>
- <testsuite name="FailedTest" tests="1" failures="1" disabled="0" errors="0" time="*">
- <testcase name="Fails" status="run" time="*" classname="FailedTest">
- <failure message="Value of: 2&#x0A;Expected: 1" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
-Value of: 2
-Expected: 1%(stack)s]]></failure>
- </testcase>
- </testsuite>
- <testsuite name="MixedResultTest" tests="3" failures="1" disabled="1" errors="0" time="*">
- <testcase name="Succeeds" status="run" time="*" classname="MixedResultTest"/>
- <testcase name="Fails" status="run" time="*" classname="MixedResultTest">
- <failure message="Value of: 2&#x0A;Expected: 1" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
-Value of: 2
-Expected: 1%(stack)s]]></failure>
- <failure message="Value of: 3&#x0A;Expected: 2" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
-Value of: 3
-Expected: 2%(stack)s]]></failure>
- </testcase>
- <testcase name="DISABLED_test" status="notrun" time="*" classname="MixedResultTest"/>
- </testsuite>
- <testsuite name="XmlQuotingTest" tests="1" failures="1" disabled="0" errors="0" time="*">
- <testcase name="OutputsCData" status="run" time="*" classname="XmlQuotingTest">
- <failure message="Failed&#x0A;XML output: &lt;?xml encoding=&quot;utf-8&quot;&gt;&lt;top&gt;&lt;![CDATA[cdata text]]&gt;&lt;/top&gt;" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
-Failed
-XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]>]]&gt;<![CDATA[</top>%(stack)s]]></failure>
- </testcase>
- </testsuite>
- <testsuite name="InvalidCharactersTest" tests="1" failures="1" disabled="0" errors="0" time="*">
- <testcase name="InvalidCharactersInMessage" status="run" time="*" classname="InvalidCharactersTest">
- <failure message="Failed&#x0A;Invalid characters in brackets []" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
-Failed
-Invalid characters in brackets []%(stack)s]]></failure>
- </testcase>
- </testsuite>
- <testsuite name="DisabledTest" tests="1" failures="0" disabled="1" errors="0" time="*">
- <testcase name="DISABLED_test_not_run" status="notrun" time="*" classname="DisabledTest"/>
- </testsuite>
- <testsuite name="PropertyRecordingTest" tests="4" failures="0" disabled="0" errors="0" time="*">
- <testcase name="OneProperty" status="run" time="*" classname="PropertyRecordingTest" key_1="1"/>
- <testcase name="IntValuedProperty" status="run" time="*" classname="PropertyRecordingTest" key_int="1"/>
- <testcase name="ThreeProperties" status="run" time="*" classname="PropertyRecordingTest" key_1="1" key_2="2" key_3="3"/>
- <testcase name="TwoValuesForOneKeyUsesLastValue" status="run" time="*" classname="PropertyRecordingTest" key_1="2"/>
- </testsuite>
- <testsuite name="NoFixtureTest" tests="3" failures="0" disabled="0" errors="0" time="*">
- <testcase name="RecordProperty" status="run" time="*" classname="NoFixtureTest" key="1"/>
- <testcase name="ExternalUtilityThatCallsRecordIntValuedProperty" status="run" time="*" classname="NoFixtureTest" key_for_utility_int="1"/>
- <testcase name="ExternalUtilityThatCallsRecordStringValuedProperty" status="run" time="*" classname="NoFixtureTest" key_for_utility_string="1"/>
- </testsuite>
- <testsuite name="Single/ValueParamTest" tests="4" failures="0" disabled="0" errors="0" time="*">
- <testcase name="HasValueParamAttribute/0" value_param="33" status="run" time="*" classname="Single/ValueParamTest" />
- <testcase name="HasValueParamAttribute/1" value_param="42" status="run" time="*" classname="Single/ValueParamTest" />
- <testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" status="run" time="*" classname="Single/ValueParamTest" />
- <testcase name="AnotherTestThatHasValueParamAttribute/1" value_param="42" status="run" time="*" classname="Single/ValueParamTest" />
- </testsuite>
- <testsuite name="TypedTest/0" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="TypedTest/0" />
- </testsuite>
- <testsuite name="TypedTest/1" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="TypedTest/1" />
- </testsuite>
- <testsuite name="Single/TypeParameterizedTestCase/0" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="Single/TypeParameterizedTestCase/0" />
- </testsuite>
- <testsuite name="Single/TypeParameterizedTestCase/1" tests="1" failures="0" disabled="0" errors="0" time="*">
- <testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="Single/TypeParameterizedTestCase/1" />
- </testsuite>
-</testsuites>""" % {'stack': STACK_TRACE_TEMPLATE}
-
-
-EXPECTED_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?>
-<testsuites tests="0" failures="0" disabled="0" errors="0" time="*" name="AllTests">
-</testsuites>"""
-
-
-class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
- """
- Unit test for Google Test's XML output functionality.
- """
-
- def testNonEmptyXmlOutput(self):
- """
- Runs a test program that generates a non-empty XML output, and
- tests that the XML output is expected.
- """
- self._TestXmlOutput(GTEST_PROGRAM_NAME, EXPECTED_NON_EMPTY_XML, 1)
-
- def testEmptyXmlOutput(self):
- """
- Runs a test program that generates an empty XML output, and
- tests that the XML output is expected.
- """
-
- self._TestXmlOutput("gtest_no_test_unittest",
- EXPECTED_EMPTY_XML, 0)
-
- def testDefaultOutputFile(self):
- """
- Confirms that Google Test produces an XML output file with the expected
- default name if no name is explicitly specified.
- """
- output_file = os.path.join(gtest_test_utils.GetTempDir(),
- GTEST_DEFAULT_OUTPUT_FILE)
- gtest_prog_path = gtest_test_utils.GetTestExecutablePath(
- "gtest_no_test_unittest")
- try:
- os.remove(output_file)
- except OSError, e:
- if e.errno != errno.ENOENT:
- raise
-
- p = gtest_test_utils.Subprocess(
- [gtest_prog_path, "%s=xml" % GTEST_OUTPUT_FLAG],
- working_dir=gtest_test_utils.GetTempDir())
- self.assert_(p.exited)
- self.assertEquals(0, p.exit_code)
- self.assert_(os.path.isfile(output_file))
-
- def testSuppressedXmlOutput(self):
- """
- Tests that no XML file is generated if the default XML listener is
- shut down before RUN_ALL_TESTS is invoked.
- """
-
- xml_path = os.path.join(gtest_test_utils.GetTempDir(),
- GTEST_PROGRAM_NAME + "out.xml")
- if os.path.isfile(xml_path):
- os.remove(xml_path)
-
- gtest_prog_path = gtest_test_utils.GetTestExecutablePath(GTEST_PROGRAM_NAME)
-
- command = [gtest_prog_path,
- "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path),
- "--shut_down_xml"]
- p = gtest_test_utils.Subprocess(command)
- if p.terminated_by_signal:
- self.assert_(False,
- "%s was killed by signal %d" % (gtest_prog_name, p.signal))
- else:
- self.assert_(p.exited)
- self.assertEquals(1, p.exit_code,
- "'%s' exited with code %s, which doesn't match "
- "the expected exit code %s."
- % (command, p.exit_code, 1))
-
- self.assert_(not os.path.isfile(xml_path))
-
-
- def _TestXmlOutput(self, gtest_prog_name, expected_xml, expected_exit_code):
- """
- Asserts that the XML document generated by running the program
- gtest_prog_name matches expected_xml, a string containing another
- XML document. Furthermore, the program's exit code must be
- expected_exit_code.
- """
- xml_path = os.path.join(gtest_test_utils.GetTempDir(),
- gtest_prog_name + "out.xml")
- gtest_prog_path = gtest_test_utils.GetTestExecutablePath(gtest_prog_name)
-
- command = [gtest_prog_path, "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path)]
- p = gtest_test_utils.Subprocess(command)
- if p.terminated_by_signal:
- self.assert_(False,
- "%s was killed by signal %d" % (gtest_prog_name, p.signal))
- else:
- self.assert_(p.exited)
- self.assertEquals(expected_exit_code, p.exit_code,
- "'%s' exited with code %s, which doesn't match "
- "the expected exit code %s."
- % (command, p.exit_code, expected_exit_code))
-
- expected = minidom.parseString(expected_xml)
- actual = minidom.parse(xml_path)
- self.NormalizeXml(actual.documentElement)
- self.AssertEquivalentNodes(expected.documentElement,
- actual.documentElement)
- expected.unlink()
- actual .unlink()
-
-
-
-if __name__ == '__main__':
- os.environ['GTEST_STACK_TRACE_DEPTH'] = '1'
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest_.cc
deleted file mode 100644
index 741a88748..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_output_unittest_.cc
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: eefacm@gmail.com (Sean Mcafee)
-
-// Unit test for Google Test XML output.
-//
-// A user can specify XML output in a Google Test program to run via
-// either the GTEST_OUTPUT environment variable or the --gtest_output
-// flag. This is used for testing such functionality.
-//
-// This program will be invoked from a Python unit test. Don't run it
-// directly.
-
-#include "gtest/gtest.h"
-
-using ::testing::InitGoogleTest;
-using ::testing::TestEventListeners;
-using ::testing::TestWithParam;
-using ::testing::UnitTest;
-using ::testing::Test;
-using ::testing::Types;
-using ::testing::Values;
-
-class SuccessfulTest : public Test {
-};
-
-TEST_F(SuccessfulTest, Succeeds) {
- SUCCEED() << "This is a success.";
- ASSERT_EQ(1, 1);
-}
-
-class FailedTest : public Test {
-};
-
-TEST_F(FailedTest, Fails) {
- ASSERT_EQ(1, 2);
-}
-
-class DisabledTest : public Test {
-};
-
-TEST_F(DisabledTest, DISABLED_test_not_run) {
- FAIL() << "Unexpected failure: Disabled test should not be run";
-}
-
-TEST(MixedResultTest, Succeeds) {
- EXPECT_EQ(1, 1);
- ASSERT_EQ(1, 1);
-}
-
-TEST(MixedResultTest, Fails) {
- EXPECT_EQ(1, 2);
- ASSERT_EQ(2, 3);
-}
-
-TEST(MixedResultTest, DISABLED_test) {
- FAIL() << "Unexpected failure: Disabled test should not be run";
-}
-
-TEST(XmlQuotingTest, OutputsCData) {
- FAIL() << "XML output: "
- "<?xml encoding=\"utf-8\"><top><![CDATA[cdata text]]></top>";
-}
-
-// Helps to test that invalid characters produced by test code do not make
-// it into the XML file.
-TEST(InvalidCharactersTest, InvalidCharactersInMessage) {
- FAIL() << "Invalid characters in brackets [\x1\x2]";
-}
-
-class PropertyRecordingTest : public Test {
-};
-
-TEST_F(PropertyRecordingTest, OneProperty) {
- RecordProperty("key_1", "1");
-}
-
-TEST_F(PropertyRecordingTest, IntValuedProperty) {
- RecordProperty("key_int", 1);
-}
-
-TEST_F(PropertyRecordingTest, ThreeProperties) {
- RecordProperty("key_1", "1");
- RecordProperty("key_2", "2");
- RecordProperty("key_3", "3");
-}
-
-TEST_F(PropertyRecordingTest, TwoValuesForOneKeyUsesLastValue) {
- RecordProperty("key_1", "1");
- RecordProperty("key_1", "2");
-}
-
-TEST(NoFixtureTest, RecordProperty) {
- RecordProperty("key", "1");
-}
-
-void ExternalUtilityThatCallsRecordProperty(const char* key, int value) {
- testing::Test::RecordProperty(key, value);
-}
-
-void ExternalUtilityThatCallsRecordProperty(const char* key,
- const char* value) {
- testing::Test::RecordProperty(key, value);
-}
-
-TEST(NoFixtureTest, ExternalUtilityThatCallsRecordIntValuedProperty) {
- ExternalUtilityThatCallsRecordProperty("key_for_utility_int", 1);
-}
-
-TEST(NoFixtureTest, ExternalUtilityThatCallsRecordStringValuedProperty) {
- ExternalUtilityThatCallsRecordProperty("key_for_utility_string", "1");
-}
-
-// Verifies that the test parameter value is output in the 'value_param'
-// XML attribute for value-parameterized tests.
-class ValueParamTest : public TestWithParam<int> {};
-TEST_P(ValueParamTest, HasValueParamAttribute) {}
-TEST_P(ValueParamTest, AnotherTestThatHasValueParamAttribute) {}
-INSTANTIATE_TEST_CASE_P(Single, ValueParamTest, Values(33, 42));
-
-// Verifies that the type parameter name is output in the 'type_param'
-// XML attribute for typed tests.
-template <typename T> class TypedTest : public Test {};
-typedef Types<int, long> TypedTestTypes;
-TYPED_TEST_CASE(TypedTest, TypedTestTypes);
-TYPED_TEST(TypedTest, HasTypeParamAttribute) {}
-
-// Verifies that the type parameter name is output in the 'type_param'
-// XML attribute for type-parameterized tests.
-template <typename T> class TypeParameterizedTestCase : public Test {};
-TYPED_TEST_CASE_P(TypeParameterizedTestCase);
-TYPED_TEST_P(TypeParameterizedTestCase, HasTypeParamAttribute) {}
-REGISTER_TYPED_TEST_CASE_P(TypeParameterizedTestCase, HasTypeParamAttribute);
-typedef Types<int, long> TypeParameterizedTestCaseTypes;
-INSTANTIATE_TYPED_TEST_CASE_P(Single,
- TypeParameterizedTestCase,
- TypeParameterizedTestCaseTypes);
-
-int main(int argc, char** argv) {
- InitGoogleTest(&argc, argv);
-
- if (argc > 1 && strcmp(argv[1], "--shut_down_xml") == 0) {
- TestEventListeners& listeners = UnitTest::GetInstance()->listeners();
- delete listeners.Release(listeners.default_xml_generator());
- }
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_test_utils.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_test_utils.py
deleted file mode 100755
index 0f55c1642..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_test_utils.py
+++ /dev/null
@@ -1,179 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test utilities for gtest_xml_output"""
-
-__author__ = 'eefacm@gmail.com (Sean Mcafee)'
-
-import re
-from xml.dom import minidom, Node
-
-import gtest_test_utils
-
-
-GTEST_OUTPUT_FLAG = "--gtest_output"
-GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml"
-
-class GTestXMLTestCase(gtest_test_utils.TestCase):
- """
- Base class for tests of Google Test's XML output functionality.
- """
-
-
- def AssertEquivalentNodes(self, expected_node, actual_node):
- """
- Asserts that actual_node (a DOM node object) is equivalent to
- expected_node (another DOM node object), in that either both of
- them are CDATA nodes and have the same value, or both are DOM
- elements and actual_node meets all of the following conditions:
-
- * It has the same tag name as expected_node.
- * It has the same set of attributes as expected_node, each with
- the same value as the corresponding attribute of expected_node.
- Exceptions are any attribute named "time", which needs only be
- convertible to a floating-point number and any attribute named
- "type_param" which only has to be non-empty.
- * It has an equivalent set of child nodes (including elements and
- CDATA sections) as expected_node. Note that we ignore the
- order of the children as they are not guaranteed to be in any
- particular order.
- """
-
- if expected_node.nodeType == Node.CDATA_SECTION_NODE:
- self.assertEquals(Node.CDATA_SECTION_NODE, actual_node.nodeType)
- self.assertEquals(expected_node.nodeValue, actual_node.nodeValue)
- return
-
- self.assertEquals(Node.ELEMENT_NODE, actual_node.nodeType)
- self.assertEquals(Node.ELEMENT_NODE, expected_node.nodeType)
- self.assertEquals(expected_node.tagName, actual_node.tagName)
-
- expected_attributes = expected_node.attributes
- actual_attributes = actual_node .attributes
- self.assertEquals(
- expected_attributes.length, actual_attributes.length,
- "attribute numbers differ in element " + actual_node.tagName)
- for i in range(expected_attributes.length):
- expected_attr = expected_attributes.item(i)
- actual_attr = actual_attributes.get(expected_attr.name)
- self.assert_(
- actual_attr is not None,
- "expected attribute %s not found in element %s" %
- (expected_attr.name, actual_node.tagName))
- self.assertEquals(expected_attr.value, actual_attr.value,
- " values of attribute %s in element %s differ" %
- (expected_attr.name, actual_node.tagName))
-
- expected_children = self._GetChildren(expected_node)
- actual_children = self._GetChildren(actual_node)
- self.assertEquals(
- len(expected_children), len(actual_children),
- "number of child elements differ in element " + actual_node.tagName)
- for child_id, child in expected_children.iteritems():
- self.assert_(child_id in actual_children,
- '<%s> is not in <%s> (in element %s)' %
- (child_id, actual_children, actual_node.tagName))
- self.AssertEquivalentNodes(child, actual_children[child_id])
-
- identifying_attribute = {
- "testsuites": "name",
- "testsuite": "name",
- "testcase": "name",
- "failure": "message",
- }
-
- def _GetChildren(self, element):
- """
- Fetches all of the child nodes of element, a DOM Element object.
- Returns them as the values of a dictionary keyed by the IDs of the
- children. For <testsuites>, <testsuite> and <testcase> elements, the ID
- is the value of their "name" attribute; for <failure> elements, it is
- the value of the "message" attribute; CDATA sections and non-whitespace
- text nodes are concatenated into a single CDATA section with ID
- "detail". An exception is raised if any element other than the above
- four is encountered, if two child elements with the same identifying
- attributes are encountered, or if any other type of node is encountered.
- """
-
- children = {}
- for child in element.childNodes:
- if child.nodeType == Node.ELEMENT_NODE:
- self.assert_(child.tagName in self.identifying_attribute,
- "Encountered unknown element <%s>" % child.tagName)
- childID = child.getAttribute(self.identifying_attribute[child.tagName])
- self.assert_(childID not in children)
- children[childID] = child
- elif child.nodeType in [Node.TEXT_NODE, Node.CDATA_SECTION_NODE]:
- if "detail" not in children:
- if (child.nodeType == Node.CDATA_SECTION_NODE or
- not child.nodeValue.isspace()):
- children["detail"] = child.ownerDocument.createCDATASection(
- child.nodeValue)
- else:
- children["detail"].nodeValue += child.nodeValue
- else:
- self.fail("Encountered unexpected node type %d" % child.nodeType)
- return children
-
- def NormalizeXml(self, element):
- """
- Normalizes Google Test's XML output to eliminate references to transient
- information that may change from run to run.
-
- * The "time" attribute of <testsuites>, <testsuite> and <testcase>
- elements is replaced with a single asterisk, if it contains
- only digit characters.
- * The "type_param" attribute of <testcase> elements is replaced with a
- single asterisk (if it sn non-empty) as it is the type name returned
- by the compiler and is platform dependent.
- * The line number reported in the first line of the "message"
- attribute of <failure> elements is replaced with a single asterisk.
- * The directory names in file paths are removed.
- * The stack traces are removed.
- """
-
- if element.tagName in ("testsuites", "testsuite", "testcase"):
- time = element.getAttributeNode("time")
- time.value = re.sub(r"^\d+(\.\d+)?$", "*", time.value)
- type_param = element.getAttributeNode("type_param")
- if type_param and type_param.value:
- type_param.value = "*"
- elif element.tagName == "failure":
- for child in element.childNodes:
- if child.nodeType == Node.CDATA_SECTION_NODE:
- # Removes the source line number.
- cdata = re.sub(r"^.*[/\\](.*:)\d+\n", "\\1*\n", child.nodeValue)
- # Removes the actual stack trace.
- child.nodeValue = re.sub(r"\nStack trace:\n(.|\n)*",
- "", cdata)
- for child in element.childNodes:
- if child.nodeType == Node.ELEMENT_NODE:
- self.NormalizeXml(child)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.cc
deleted file mode 100644
index 8b8a40b44..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// This is part of the unit test for include/gtest/gtest_prod.h.
-
-#include "production.h"
-
-PrivateCode::PrivateCode() : x_(0) {}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.h
deleted file mode 100644
index 98fd5e476..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/production.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// This is part of the unit test for include/gtest/gtest_prod.h.
-
-#ifndef GTEST_TEST_PRODUCTION_H_
-#define GTEST_TEST_PRODUCTION_H_
-
-#include "gtest/gtest_prod.h"
-
-class PrivateCode {
- public:
- // Declares a friend test that does not use a fixture.
- FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers);
-
- // Declares a friend test that uses a fixture.
- FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers);
-
- PrivateCode();
-
- int x() const { return x_; }
- private:
- void set_x(int an_x) { x_ = an_x; }
- int x_;
-};
-
-#endif // GTEST_TEST_PRODUCTION_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/DebugProject.xcconfig b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/DebugProject.xcconfig
deleted file mode 100644
index 3d68157d5..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/DebugProject.xcconfig
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// DebugProject.xcconfig
-//
-// These are Debug Configuration project settings for the gtest framework and
-// examples. It is set in the "Based On:" dropdown in the "Project" info
-// dialog.
-// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
-//
-
-#include "General.xcconfig"
-
-// No optimization
-GCC_OPTIMIZATION_LEVEL = 0
-
-// Deployment postprocessing is what triggers Xcode to strip, turn it off
-DEPLOYMENT_POSTPROCESSING = NO
-
-// Dead code stripping off
-DEAD_CODE_STRIPPING = NO
-
-// Debug symbols should be on obviously
-GCC_GENERATE_DEBUGGING_SYMBOLS = YES
-
-// Define the DEBUG macro in all debug builds
-OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1
-
-// These are turned off to avoid STL incompatibilities with client code
-// // Turns on special C++ STL checks to "encourage" good STL use
-// GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/FrameworkTarget.xcconfig b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/FrameworkTarget.xcconfig
deleted file mode 100644
index 357b1c8fb..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/FrameworkTarget.xcconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// FrameworkTarget.xcconfig
-//
-// These are Framework target settings for the gtest framework and examples. It
-// is set in the "Based On:" dropdown in the "Target" info dialog.
-// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
-//
-
-// Dynamic libs need to be position independent
-GCC_DYNAMIC_NO_PIC = NO
-
-// Dynamic libs should not have their external symbols stripped.
-STRIP_STYLE = non-global
-
-// Let the user install by specifying the $DSTROOT with xcodebuild
-SKIP_INSTALL = NO
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/General.xcconfig b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/General.xcconfig
deleted file mode 100644
index f23e32227..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/General.xcconfig
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// General.xcconfig
-//
-// These are General configuration settings for the gtest framework and
-// examples.
-// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
-//
-
-// Build for PPC and Intel, 32- and 64-bit
-ARCHS = i386 x86_64 ppc ppc64
-
-// Zerolink prevents link warnings so turn it off
-ZERO_LINK = NO
-
-// Prebinding considered unhelpful in 10.3 and later
-PREBINDING = NO
-
-// Strictest warning policy
-WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow
-
-// Work around Xcode bugs by using external strip. See:
-// http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html
-SEPARATE_STRIP = YES
-
-// Force C99 dialect
-GCC_C_LANGUAGE_STANDARD = c99
-
-// not sure why apple defaults this on, but it's pretty risky
-ALWAYS_SEARCH_USER_PATHS = NO
-
-// Turn on position dependent code for most cases (overridden where appropriate)
-GCC_DYNAMIC_NO_PIC = YES
-
-// Default SDK and minimum OS version is 10.4
-SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk
-MACOSX_DEPLOYMENT_TARGET = 10.4
-GCC_VERSION = 4.0
-
-// VERSIONING BUILD SETTINGS (used in Info.plist)
-GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/ReleaseProject.xcconfig b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/ReleaseProject.xcconfig
deleted file mode 100644
index 5349f0a04..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/ReleaseProject.xcconfig
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// ReleaseProject.xcconfig
-//
-// These are Release Configuration project settings for the gtest framework
-// and examples. It is set in the "Based On:" dropdown in the "Project" info
-// dialog.
-// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
-//
-
-#include "General.xcconfig"
-
-// subconfig/Release.xcconfig
-
-// Optimize for space and size (Apple recommendation)
-GCC_OPTIMIZATION_LEVEL = s
-
-// Deploment postprocessing is what triggers Xcode to strip
-DEPLOYMENT_POSTPROCESSING = YES
-
-// No symbols
-GCC_GENERATE_DEBUGGING_SYMBOLS = NO
-
-// Dead code strip does not affect ObjC code but can help for C
-DEAD_CODE_STRIPPING = YES
-
-// NDEBUG is used by things like assert.h, so define it for general compat.
-// ASSERT going away in release tends to create unused vars.
-OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable
-
-// When we strip we want to strip all symbols in release, but save externals.
-STRIP_STYLE = all
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/StaticLibraryTarget.xcconfig b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/StaticLibraryTarget.xcconfig
deleted file mode 100644
index 3922fa51d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/StaticLibraryTarget.xcconfig
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// StaticLibraryTarget.xcconfig
-//
-// These are static library target settings for libgtest.a. It
-// is set in the "Based On:" dropdown in the "Target" info dialog.
-// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
-//
-
-// Static libs can be included in bundles so make them position independent
-GCC_DYNAMIC_NO_PIC = NO
-
-// Static libs should not have their internal globals or external symbols
-// stripped.
-STRIP_STYLE = debugging
-
-// Let the user install by specifying the $DSTROOT with xcodebuild
-SKIP_INSTALL = NO
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/TestTarget.xcconfig b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/TestTarget.xcconfig
deleted file mode 100644
index e6652ba85..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Config/TestTarget.xcconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-//
-// TestTarget.xcconfig
-//
-// These are Test target settings for the gtest framework and examples. It
-// is set in the "Based On:" dropdown in the "Target" info dialog.
-
-PRODUCT_NAME = $(TARGET_NAME)
-HEADER_SEARCH_PATHS = ../include
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Resources/Info.plist b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Resources/Info.plist
deleted file mode 100644
index 9dd28ea14..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Resources/Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>GTEST_VERSIONINFO_LONG</string>
- <key>CFBundleShortVersionString</key>
- <string>GTEST_VERSIONINFO_SHORT</string>
- <key>CFBundleGetInfoString</key>
- <string>${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT}</string>
- <key>NSHumanReadableCopyright</key>
- <string>${GTEST_VERSIONINFO_ABOUT}</string>
- <key>CSResourcesFileMapped</key>
- <true/>
-</dict>
-</plist>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/Info.plist b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/Info.plist
deleted file mode 100644
index f3852edea..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/Info.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.gtest.${PRODUCT_NAME:identifier}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>CSResourcesFileMapped</key>
- <true/>
-</dict>
-</plist>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj
deleted file mode 100644
index 497617eb6..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,457 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 42;
- objects = {
-
-/* Begin PBXAggregateTarget section */
- 4024D162113D7D2400C7059E /* Test */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = 4024D169113D7D4600C7059E /* Build configuration list for PBXAggregateTarget "Test" */;
- buildPhases = (
- 4024D161113D7D2400C7059E /* ShellScript */,
- );
- dependencies = (
- 4024D166113D7D3100C7059E /* PBXTargetDependency */,
- );
- name = Test;
- productName = TestAndBuild;
- };
- 4024D1E9113D83FF00C7059E /* TestAndBuild */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = 4024D1F0113D842B00C7059E /* Build configuration list for PBXAggregateTarget "TestAndBuild" */;
- buildPhases = (
- );
- dependencies = (
- 4024D1ED113D840900C7059E /* PBXTargetDependency */,
- 4024D1EF113D840D00C7059E /* PBXTargetDependency */,
- );
- name = TestAndBuild;
- productName = TestAndBuild;
- };
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
- 3B7EB1250E5AEE3500C7F239 /* widget.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B7EB1230E5AEE3500C7F239 /* widget.cc */; };
- 3B7EB1260E5AEE3500C7F239 /* widget.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7EB1240E5AEE3500C7F239 /* widget.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B7EB1280E5AEE4600C7F239 /* widget_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B7EB1270E5AEE4600C7F239 /* widget_test.cc */; };
- 3B7EB1480E5AF3B400C7F239 /* Widget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* Widget.framework */; };
- 4024D188113D7D7800C7059E /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4024D185113D7D5500C7059E /* libgtest.a */; };
- 4024D189113D7D7A00C7059E /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4024D183113D7D5500C7059E /* libgtest_main.a */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 3B07BDF00E3F3FAE00647869 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
- remoteInfo = gTestExample;
- };
- 4024D165113D7D3100C7059E /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 3B07BDE90E3F3F9E00647869;
- remoteInfo = WidgetFrameworkTest;
- };
- 4024D1EC113D840900C7059E /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
- remoteInfo = WidgetFramework;
- };
- 4024D1EE113D840D00C7059E /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 4024D162113D7D2400C7059E;
- remoteInfo = Test;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- 3B07BDEA0E3F3F9E00647869 /* WidgetFrameworkTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = WidgetFrameworkTest; sourceTree = BUILT_PRODUCTS_DIR; };
- 3B7EB1230E5AEE3500C7F239 /* widget.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = widget.cc; sourceTree = "<group>"; };
- 3B7EB1240E5AEE3500C7F239 /* widget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = widget.h; sourceTree = "<group>"; };
- 3B7EB1270E5AEE4600C7F239 /* widget_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = widget_test.cc; sourceTree = "<group>"; };
- 4024D183113D7D5500C7059E /* libgtest_main.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgtest_main.a; path = /usr/local/lib/libgtest_main.a; sourceTree = "<absolute>"; };
- 4024D185113D7D5500C7059E /* libgtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgtest.a; path = /usr/local/lib/libgtest.a; sourceTree = "<absolute>"; };
- 4024D1E2113D838200C7059E /* runtests.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = runtests.sh; sourceTree = "<group>"; };
- 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
- 8D07F2C80486CC7A007CD1D0 /* Widget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Widget.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 3B07BDE80E3F3F9E00647869 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4024D189113D7D7A00C7059E /* libgtest_main.a in Frameworks */,
- 4024D188113D7D7800C7059E /* libgtest.a in Frameworks */,
- 3B7EB1480E5AF3B400C7F239 /* Widget.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 034768DDFF38A45A11DB9C8B /* Products */ = {
- isa = PBXGroup;
- children = (
- 8D07F2C80486CC7A007CD1D0 /* Widget.framework */,
- 3B07BDEA0E3F3F9E00647869 /* WidgetFrameworkTest */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 0867D691FE84028FC02AAC07 /* gTestExample */ = {
- isa = PBXGroup;
- children = (
- 4024D1E1113D836C00C7059E /* Scripts */,
- 08FB77ACFE841707C02AAC07 /* Source */,
- 089C1665FE841158C02AAC07 /* Resources */,
- 3B07BE350E4094E400647869 /* Test */,
- 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
- 034768DDFF38A45A11DB9C8B /* Products */,
- );
- name = gTestExample;
- sourceTree = "<group>";
- };
- 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
- isa = PBXGroup;
- children = (
- 4024D183113D7D5500C7059E /* libgtest_main.a */,
- 4024D185113D7D5500C7059E /* libgtest.a */,
- );
- name = "External Frameworks and Libraries";
- sourceTree = "<group>";
- };
- 089C1665FE841158C02AAC07 /* Resources */ = {
- isa = PBXGroup;
- children = (
- 8D07F2C70486CC7A007CD1D0 /* Info.plist */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- 08FB77ACFE841707C02AAC07 /* Source */ = {
- isa = PBXGroup;
- children = (
- 3B7EB1230E5AEE3500C7F239 /* widget.cc */,
- 3B7EB1240E5AEE3500C7F239 /* widget.h */,
- );
- name = Source;
- sourceTree = "<group>";
- };
- 3B07BE350E4094E400647869 /* Test */ = {
- isa = PBXGroup;
- children = (
- 3B7EB1270E5AEE4600C7F239 /* widget_test.cc */,
- );
- name = Test;
- sourceTree = "<group>";
- };
- 4024D1E1113D836C00C7059E /* Scripts */ = {
- isa = PBXGroup;
- children = (
- 4024D1E2113D838200C7059E /* runtests.sh */,
- );
- name = Scripts;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
- 8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 3B7EB1260E5AEE3500C7F239 /* widget.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
- 3B07BDE90E3F3F9E00647869 /* WidgetFrameworkTest */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 3B07BDF40E3F3FB600647869 /* Build configuration list for PBXNativeTarget "WidgetFrameworkTest" */;
- buildPhases = (
- 3B07BDE70E3F3F9E00647869 /* Sources */,
- 3B07BDE80E3F3F9E00647869 /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- 3B07BDF10E3F3FAE00647869 /* PBXTargetDependency */,
- );
- name = WidgetFrameworkTest;
- productName = gTestExampleTest;
- productReference = 3B07BDEA0E3F3F9E00647869 /* WidgetFrameworkTest */;
- productType = "com.apple.product-type.tool";
- };
- 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "WidgetFramework" */;
- buildPhases = (
- 8D07F2C10486CC7A007CD1D0 /* Sources */,
- 8D07F2C30486CC7A007CD1D0 /* Frameworks */,
- 8D07F2BD0486CC7A007CD1D0 /* Headers */,
- 8D07F2BF0486CC7A007CD1D0 /* Resources */,
- 8D07F2C50486CC7A007CD1D0 /* Rez */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = WidgetFramework;
- productInstallPath = "$(HOME)/Library/Frameworks";
- productName = gTestExample;
- productReference = 8D07F2C80486CC7A007CD1D0 /* Widget.framework */;
- productType = "com.apple.product-type.framework";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 0867D690FE84028FC02AAC07 /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "WidgetFramework" */;
- compatibilityVersion = "Xcode 2.4";
- hasScannedForEncodings = 1;
- mainGroup = 0867D691FE84028FC02AAC07 /* gTestExample */;
- productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */,
- 3B07BDE90E3F3F9E00647869 /* WidgetFrameworkTest */,
- 4024D162113D7D2400C7059E /* Test */,
- 4024D1E9113D83FF00C7059E /* TestAndBuild */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
- 8D07F2C50486CC7A007CD1D0 /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 4024D161113D7D2400C7059E /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/bash $SRCROOT/runtests.sh $BUILT_PRODUCTS_DIR/WidgetFrameworkTest\n";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 3B07BDE70E3F3F9E00647869 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 3B7EB1280E5AEE4600C7F239 /* widget_test.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8D07F2C10486CC7A007CD1D0 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 3B7EB1250E5AEE3500C7F239 /* widget.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 3B07BDF10E3F3FAE00647869 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */;
- targetProxy = 3B07BDF00E3F3FAE00647869 /* PBXContainerItemProxy */;
- };
- 4024D166113D7D3100C7059E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 3B07BDE90E3F3F9E00647869 /* WidgetFrameworkTest */;
- targetProxy = 4024D165113D7D3100C7059E /* PBXContainerItemProxy */;
- };
- 4024D1ED113D840900C7059E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */;
- targetProxy = 4024D1EC113D840900C7059E /* PBXContainerItemProxy */;
- };
- 4024D1EF113D840D00C7059E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 4024D162113D7D2400C7059E /* Test */;
- targetProxy = 4024D1EE113D840D00C7059E /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
- 3B07BDEC0E3F3F9F00647869 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = WidgetFrameworkTest;
- };
- name = Debug;
- };
- 3B07BDED0E3F3F9F00647869 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = WidgetFrameworkTest;
- };
- name = Release;
- };
- 4024D163113D7D2400C7059E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = TestAndBuild;
- };
- name = Debug;
- };
- 4024D164113D7D2400C7059E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = TestAndBuild;
- };
- name = Release;
- };
- 4024D1EA113D83FF00C7059E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = TestAndBuild;
- };
- name = Debug;
- };
- 4024D1EB113D83FF00C7059E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = TestAndBuild;
- };
- name = Release;
- };
- 4FADC24308B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "@loader_path/../Frameworks";
- PRODUCT_NAME = Widget;
- };
- name = Debug;
- };
- 4FADC24408B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "@loader_path/../Frameworks";
- PRODUCT_NAME = Widget;
- };
- name = Release;
- };
- 4FADC24708B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_VERSION = 4.0;
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
- };
- name = Debug;
- };
- 4FADC24808B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_VERSION = 4.0;
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 3B07BDF40E3F3FB600647869 /* Build configuration list for PBXNativeTarget "WidgetFrameworkTest" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 3B07BDEC0E3F3F9F00647869 /* Debug */,
- 3B07BDED0E3F3F9F00647869 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4024D169113D7D4600C7059E /* Build configuration list for PBXAggregateTarget "Test" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4024D163113D7D2400C7059E /* Debug */,
- 4024D164113D7D2400C7059E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4024D1F0113D842B00C7059E /* Build configuration list for PBXAggregateTarget "TestAndBuild" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4024D1EA113D83FF00C7059E /* Debug */,
- 4024D1EB113D83FF00C7059E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "WidgetFramework" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24308B4156D00ABE55E /* Debug */,
- 4FADC24408B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "WidgetFramework" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24708B4156D00ABE55E /* Debug */,
- 4FADC24808B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/runtests.sh b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/runtests.sh
deleted file mode 100755
index 4a0d413e5..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/runtests.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Executes the samples and tests for the Google Test Framework.
-
-# Help the dynamic linker find the path to the libraries.
-export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR
-export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR
-
-# Create some executables.
-test_executables=$@
-
-# Now execute each one in turn keeping track of how many succeeded and failed.
-succeeded=0
-failed=0
-failed_list=()
-for test in ${test_executables[*]}; do
- "$test"
- result=$?
- if [ $result -eq 0 ]; then
- succeeded=$(( $succeeded + 1 ))
- else
- failed=$(( failed + 1 ))
- failed_list="$failed_list $test"
- fi
-done
-
-# Report the successes and failures to the console.
-echo "Tests complete with $succeeded successes and $failed failures."
-if [ $failed -ne 0 ]; then
- echo "The following tests failed:"
- echo $failed_list
-fi
-exit $failed
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.cc
deleted file mode 100644
index bfc4e7fcf..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: preston.a.jackson@gmail.com (Preston Jackson)
-//
-// Google Test - FrameworkSample
-// widget.cc
-//
-
-// Widget is a very simple class used for demonstrating the use of gtest
-
-#include "widget.h"
-
-Widget::Widget(int number, const std::string& name)
- : number_(number),
- name_(name) {}
-
-Widget::~Widget() {}
-
-float Widget::GetFloatValue() const {
- return number_;
-}
-
-int Widget::GetIntValue() const {
- return static_cast<int>(number_);
-}
-
-std::string Widget::GetStringValue() const {
- return name_;
-}
-
-void Widget::GetCharPtrValue(char* buffer, size_t max_size) const {
- // Copy the char* representation of name_ into buffer, up to max_size.
- strncpy(buffer, name_.c_str(), max_size-1);
- buffer[max_size-1] = '\0';
- return;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.h
deleted file mode 100644
index 0c55cdc8c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: preston.a.jackson@gmail.com (Preston Jackson)
-//
-// Google Test - FrameworkSample
-// widget.h
-//
-
-// Widget is a very simple class used for demonstrating the use of gtest. It
-// simply stores two values a string and an integer, which are returned via
-// public accessors in multiple forms.
-
-#import <string>
-
-class Widget {
- public:
- Widget(int number, const std::string& name);
- ~Widget();
-
- // Public accessors to number data
- float GetFloatValue() const;
- int GetIntValue() const;
-
- // Public accessors to the string data
- std::string GetStringValue() const;
- void GetCharPtrValue(char* buffer, size_t max_size) const;
-
- private:
- // Data members
- float number_;
- std::string name_;
-};
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget_test.cc
deleted file mode 100644
index 872599421..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Samples/FrameworkSample/widget_test.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: preston.a.jackson@gmail.com (Preston Jackson)
-//
-// Google Test - FrameworkSample
-// widget_test.cc
-//
-
-// This is a simple test file for the Widget class in the Widget.framework
-
-#include <string>
-#include "gtest/gtest.h"
-
-#include <Widget/widget.h>
-
-// This test verifies that the constructor sets the internal state of the
-// Widget class correctly.
-TEST(WidgetInitializerTest, TestConstructor) {
- Widget widget(1.0f, "name");
- EXPECT_FLOAT_EQ(1.0f, widget.GetFloatValue());
- EXPECT_EQ(std::string("name"), widget.GetStringValue());
-}
-
-// This test verifies the conversion of the float and string values to int and
-// char*, respectively.
-TEST(WidgetInitializerTest, TestConversion) {
- Widget widget(1.0f, "name");
- EXPECT_EQ(1, widget.GetIntValue());
-
- size_t max_size = 128;
- char buffer[max_size];
- widget.GetCharPtrValue(buffer, max_size);
- EXPECT_STREQ("name", buffer);
-}
-
-// Use the Google Test main that is linked into the framework. It does something
-// like this:
-// int main(int argc, char** argv) {
-// testing::InitGoogleTest(&argc, argv);
-// return RUN_ALL_TESTS();
-// }
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/runtests.sh b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/runtests.sh
deleted file mode 100755
index 3fc229f1d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/runtests.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Executes the samples and tests for the Google Test Framework.
-
-# Help the dynamic linker find the path to the libraries.
-export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR
-export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR
-
-# Create some executables.
-test_executables=("$BUILT_PRODUCTS_DIR/gtest_unittest-framework"
- "$BUILT_PRODUCTS_DIR/gtest_unittest"
- "$BUILT_PRODUCTS_DIR/sample1_unittest-framework"
- "$BUILT_PRODUCTS_DIR/sample1_unittest-static")
-
-# Now execute each one in turn keeping track of how many succeeded and failed.
-succeeded=0
-failed=0
-failed_list=()
-for test in ${test_executables[*]}; do
- "$test"
- result=$?
- if [ $result -eq 0 ]; then
- succeeded=$(( $succeeded + 1 ))
- else
- failed=$(( failed + 1 ))
- failed_list="$failed_list $test"
- fi
-done
-
-# Report the successes and failures to the console.
-echo "Tests complete with $succeeded successes and $failed failures."
-if [ $failed -ne 0 ]; then
- echo "The following tests failed:"
- echo $failed_list
-fi
-exit $failed
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/versiongenerate.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/versiongenerate.py
deleted file mode 100755
index 81de8c96a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/Scripts/versiongenerate.py
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""A script to prepare version informtion for use the gtest Info.plist file.
-
- This script extracts the version information from the configure.ac file and
- uses it to generate a header file containing the same information. The
- #defines in this header file will be included in during the generation of
- the Info.plist of the framework, giving the correct value to the version
- shown in the Finder.
-
- This script makes the following assumptions (these are faults of the script,
- not problems with the Autoconf):
- 1. The AC_INIT macro will be contained within the first 1024 characters
- of configure.ac
- 2. The version string will be 3 integers separated by periods and will be
- surrounded by squre brackets, "[" and "]" (e.g. [1.0.1]). The first
- segment represents the major version, the second represents the minor
- version and the third represents the fix version.
- 3. No ")" character exists between the opening "(" and closing ")" of
- AC_INIT, including in comments and character strings.
-"""
-
-import sys
-import re
-
-# Read the command line argument (the output directory for Version.h)
-if (len(sys.argv) < 3):
- print "Usage: versiongenerate.py input_dir output_dir"
- sys.exit(1)
-else:
- input_dir = sys.argv[1]
- output_dir = sys.argv[2]
-
-# Read the first 1024 characters of the configure.ac file
-config_file = open("%s/configure.ac" % input_dir, 'r')
-buffer_size = 1024
-opening_string = config_file.read(buffer_size)
-config_file.close()
-
-# Extract the version string from the AC_INIT macro
-# The following init_expression means:
-# Extract three integers separated by periods and surrounded by squre
-# brackets(e.g. "[1.0.1]") between "AC_INIT(" and ")". Do not be greedy
-# (*? is the non-greedy flag) since that would pull in everything between
-# the first "(" and the last ")" in the file.
-version_expression = re.compile(r"AC_INIT\(.*?\[(\d+)\.(\d+)\.(\d+)\].*?\)",
- re.DOTALL)
-version_values = version_expression.search(opening_string)
-major_version = version_values.group(1)
-minor_version = version_values.group(2)
-fix_version = version_values.group(3)
-
-# Write the version information to a header file to be included in the
-# Info.plist file.
-file_data = """//
-// DO NOT MODIFY THIS FILE (but you can delete it)
-//
-// This file is autogenerated by the versiongenerate.py script. This script
-// is executed in a "Run Script" build phase when creating gtest.framework. This
-// header file is not used during compilation of C-source. Rather, it simply
-// defines some version strings for substitution in the Info.plist. Because of
-// this, we are not not restricted to C-syntax nor are we using include guards.
-//
-
-#define GTEST_VERSIONINFO_SHORT %s.%s
-#define GTEST_VERSIONINFO_LONG %s.%s.%s
-
-""" % (major_version, minor_version, major_version, minor_version, fix_version)
-version_file = open("%s/Version.h" % output_dir, 'w')
-version_file.write(file_data)
-version_file.close()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/gtest.xcodeproj/project.pbxproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/gtest.xcodeproj/project.pbxproj
deleted file mode 100644
index 74a78153c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/xcode/gtest.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,1084 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 42;
- objects = {
-
-/* Begin PBXAggregateTarget section */
- 3B238F5F0E828B5400846E11 /* Check */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = 3B238FA30E828BB600846E11 /* Build configuration list for PBXAggregateTarget "Check" */;
- buildPhases = (
- 3B238F5E0E828B5400846E11 /* ShellScript */,
- );
- dependencies = (
- 40899F9D0FFA740F000B29AE /* PBXTargetDependency */,
- 40C849F7101A43440083642A /* PBXTargetDependency */,
- 4089A0980FFAD34A000B29AE /* PBXTargetDependency */,
- 40C849F9101A43490083642A /* PBXTargetDependency */,
- );
- name = Check;
- productName = Check;
- };
- 40C44ADC0E3798F4008FCC51 /* Version Info */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = 40C44AE40E379905008FCC51 /* Build configuration list for PBXAggregateTarget "Version Info" */;
- buildPhases = (
- 40C44ADB0E3798F4008FCC51 /* Generate Version.h */,
- );
- comments = "The generation of Version.h must be performed in its own target. Since the Info.plist is preprocessed before any of the other build phases in gtest, the Version.h file would not be ready if included as a build phase of that target.";
- dependencies = (
- );
- name = "Version Info";
- productName = Version.h;
- };
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
- 224A12A30E9EADCC00BD17FD /* gtest-test-part.h in Headers */ = {isa = PBXBuildFile; fileRef = 224A12A20E9EADCC00BD17FD /* gtest-test-part.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3BF6F2A00E79B5AD000F2EEE /* gtest-type-util.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 3BF6F29F0E79B5AD000F2EEE /* gtest-type-util.h */; };
- 3BF6F2A50E79B616000F2EEE /* gtest-typed-test.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF6F2A40E79B616000F2EEE /* gtest-typed-test.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 404884380E2F799B00CF7658 /* gtest-death-test.h in Headers */ = {isa = PBXBuildFile; fileRef = 404883DB0E2F799B00CF7658 /* gtest-death-test.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 404884390E2F799B00CF7658 /* gtest-message.h in Headers */ = {isa = PBXBuildFile; fileRef = 404883DC0E2F799B00CF7658 /* gtest-message.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 4048843A0E2F799B00CF7658 /* gtest-spi.h in Headers */ = {isa = PBXBuildFile; fileRef = 404883DD0E2F799B00CF7658 /* gtest-spi.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 4048843B0E2F799B00CF7658 /* gtest.h in Headers */ = {isa = PBXBuildFile; fileRef = 404883DE0E2F799B00CF7658 /* gtest.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 4048843C0E2F799B00CF7658 /* gtest_pred_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 404883DF0E2F799B00CF7658 /* gtest_pred_impl.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 4048843D0E2F799B00CF7658 /* gtest_prod.h in Headers */ = {isa = PBXBuildFile; fileRef = 404883E00E2F799B00CF7658 /* gtest_prod.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 404884500E2F799B00CF7658 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 404883F60E2F799B00CF7658 /* README */; };
- 404884A00E2F7BE600CF7658 /* gtest-death-test-internal.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 404883E20E2F799B00CF7658 /* gtest-death-test-internal.h */; };
- 404884A10E2F7BE600CF7658 /* gtest-filepath.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 404883E30E2F799B00CF7658 /* gtest-filepath.h */; };
- 404884A20E2F7BE600CF7658 /* gtest-internal.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 404883E40E2F799B00CF7658 /* gtest-internal.h */; };
- 404884A30E2F7BE600CF7658 /* gtest-port.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 404883E50E2F799B00CF7658 /* gtest-port.h */; };
- 404884A40E2F7BE600CF7658 /* gtest-string.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 404883E60E2F799B00CF7658 /* gtest-string.h */; };
- 404884AC0E2F7CD900CF7658 /* CHANGES in Resources */ = {isa = PBXBuildFile; fileRef = 404884A90E2F7CD900CF7658 /* CHANGES */; };
- 404884AD0E2F7CD900CF7658 /* CONTRIBUTORS in Resources */ = {isa = PBXBuildFile; fileRef = 404884AA0E2F7CD900CF7658 /* CONTRIBUTORS */; };
- 404884AE0E2F7CD900CF7658 /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = 404884AB0E2F7CD900CF7658 /* COPYING */; };
- 40899F3A0FFA70D4000B29AE /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = 224A12A10E9EADA700BD17FD /* gtest-all.cc */; };
- 40899F500FFA7281000B29AE /* gtest-tuple.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 40899F4D0FFA7271000B29AE /* gtest-tuple.h */; };
- 40899F530FFA72A0000B29AE /* gtest_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B238C120E7FE13C00846E11 /* gtest_unittest.cc */; };
- 4089A0440FFAD1BE000B29AE /* sample1.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4089A02C0FFACF7F000B29AE /* sample1.cc */; };
- 4089A0460FFAD1BE000B29AE /* sample1_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4089A02E0FFACF7F000B29AE /* sample1_unittest.cc */; };
- 40C848FF101A21150083642A /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = 224A12A10E9EADA700BD17FD /* gtest-all.cc */; };
- 40C84915101A21DF0083642A /* gtest_main.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4048840D0E2F799B00CF7658 /* gtest_main.cc */; };
- 40C84916101A235B0083642A /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C8490B101A217E0083642A /* libgtest_main.a */; };
- 40C84921101A23AD0083642A /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C8490B101A217E0083642A /* libgtest_main.a */; };
- 40C84978101A36540083642A /* libgtest_main.a in Resources */ = {isa = PBXBuildFile; fileRef = 40C8490B101A217E0083642A /* libgtest_main.a */; };
- 40C84980101A36850083642A /* gtest_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B238C120E7FE13C00846E11 /* gtest_unittest.cc */; };
- 40C84982101A36850083642A /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C848FA101A209C0083642A /* libgtest.a */; };
- 40C84983101A36850083642A /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C8490B101A217E0083642A /* libgtest_main.a */; };
- 40C8498F101A36A60083642A /* sample1.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4089A02C0FFACF7F000B29AE /* sample1.cc */; };
- 40C84990101A36A60083642A /* sample1_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4089A02E0FFACF7F000B29AE /* sample1_unittest.cc */; };
- 40C84992101A36A60083642A /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C848FA101A209C0083642A /* libgtest.a */; };
- 40C84993101A36A60083642A /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C8490B101A217E0083642A /* libgtest_main.a */; };
- 40C849A2101A37050083642A /* gtest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4539C8FF0EC27F6400A70F4C /* gtest.framework */; };
- 40C849A4101A37150083642A /* gtest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4539C8FF0EC27F6400A70F4C /* gtest.framework */; };
- 4539C9340EC280AE00A70F4C /* gtest-param-test.h in Headers */ = {isa = PBXBuildFile; fileRef = 4539C9330EC280AE00A70F4C /* gtest-param-test.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 4539C9380EC280E200A70F4C /* gtest-linked_ptr.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 4539C9350EC280E200A70F4C /* gtest-linked_ptr.h */; };
- 4539C9390EC280E200A70F4C /* gtest-param-util-generated.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 4539C9360EC280E200A70F4C /* gtest-param-util-generated.h */; };
- 4539C93A0EC280E200A70F4C /* gtest-param-util.h in Copy Headers Internal */ = {isa = PBXBuildFile; fileRef = 4539C9370EC280E200A70F4C /* gtest-param-util.h */; };
- 4567C8181264FF71007740BE /* gtest-printers.h in Headers */ = {isa = PBXBuildFile; fileRef = 4567C8171264FF71007740BE /* gtest-printers.h */; settings = {ATTRIBUTES = (Public, ); }; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 40899F9C0FFA740F000B29AE /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40899F420FFA7184000B29AE;
- remoteInfo = gtest_unittest;
- };
- 4089A0970FFAD34A000B29AE /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 4089A0120FFACEFC000B29AE;
- remoteInfo = sample1_unittest;
- };
- 408BEC0F1046CFE900DEF522 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C848F9101A209C0083642A;
- remoteInfo = "gtest-static";
- };
- 40C44AE50E379922008FCC51 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C44ADC0E3798F4008FCC51;
- remoteInfo = Version.h;
- };
- 40C8497C101A36850083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C848F9101A209C0083642A;
- remoteInfo = "gtest-static";
- };
- 40C8497E101A36850083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C8490A101A217E0083642A;
- remoteInfo = "gtest_main-static";
- };
- 40C8498B101A36A60083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C848F9101A209C0083642A;
- remoteInfo = "gtest-static";
- };
- 40C8498D101A36A60083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C8490A101A217E0083642A;
- remoteInfo = "gtest_main-static";
- };
- 40C8499B101A36DC0083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C8490A101A217E0083642A;
- remoteInfo = "gtest_main-static";
- };
- 40C8499D101A36E50083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
- remoteInfo = "gtest-framework";
- };
- 40C8499F101A36F10083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
- remoteInfo = "gtest-framework";
- };
- 40C849F6101A43440083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C8497A101A36850083642A;
- remoteInfo = "gtest_unittest-static";
- };
- 40C849F8101A43490083642A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 40C84989101A36A60083642A;
- remoteInfo = "sample1_unittest-static";
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 404884A50E2F7C0400CF7658 /* Copy Headers Internal */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = Headers/internal;
- dstSubfolderSpec = 6;
- files = (
- 404884A00E2F7BE600CF7658 /* gtest-death-test-internal.h in Copy Headers Internal */,
- 404884A10E2F7BE600CF7658 /* gtest-filepath.h in Copy Headers Internal */,
- 404884A20E2F7BE600CF7658 /* gtest-internal.h in Copy Headers Internal */,
- 4539C9380EC280E200A70F4C /* gtest-linked_ptr.h in Copy Headers Internal */,
- 4539C9390EC280E200A70F4C /* gtest-param-util-generated.h in Copy Headers Internal */,
- 4539C93A0EC280E200A70F4C /* gtest-param-util.h in Copy Headers Internal */,
- 404884A30E2F7BE600CF7658 /* gtest-port.h in Copy Headers Internal */,
- 404884A40E2F7BE600CF7658 /* gtest-string.h in Copy Headers Internal */,
- 40899F500FFA7281000B29AE /* gtest-tuple.h in Copy Headers Internal */,
- 3BF6F2A00E79B5AD000F2EEE /* gtest-type-util.h in Copy Headers Internal */,
- );
- name = "Copy Headers Internal";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 224A12A10E9EADA700BD17FD /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "gtest-all.cc"; sourceTree = "<group>"; };
- 224A12A20E9EADCC00BD17FD /* gtest-test-part.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "gtest-test-part.h"; sourceTree = "<group>"; };
- 3B238C120E7FE13C00846E11 /* gtest_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gtest_unittest.cc; sourceTree = "<group>"; };
- 3B87D2100E96B92E000D1852 /* runtests.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = runtests.sh; sourceTree = "<group>"; };
- 3BF6F29F0E79B5AD000F2EEE /* gtest-type-util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-type-util.h"; sourceTree = "<group>"; };
- 3BF6F2A40E79B616000F2EEE /* gtest-typed-test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-typed-test.h"; sourceTree = "<group>"; };
- 403EE37C0E377822004BD1E2 /* versiongenerate.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = versiongenerate.py; sourceTree = "<group>"; };
- 404883DB0E2F799B00CF7658 /* gtest-death-test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-death-test.h"; sourceTree = "<group>"; };
- 404883DC0E2F799B00CF7658 /* gtest-message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-message.h"; sourceTree = "<group>"; };
- 404883DD0E2F799B00CF7658 /* gtest-spi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-spi.h"; sourceTree = "<group>"; };
- 404883DE0E2F799B00CF7658 /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtest.h; sourceTree = "<group>"; };
- 404883DF0E2F799B00CF7658 /* gtest_pred_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtest_pred_impl.h; sourceTree = "<group>"; };
- 404883E00E2F799B00CF7658 /* gtest_prod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gtest_prod.h; sourceTree = "<group>"; };
- 404883E20E2F799B00CF7658 /* gtest-death-test-internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-death-test-internal.h"; sourceTree = "<group>"; };
- 404883E30E2F799B00CF7658 /* gtest-filepath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-filepath.h"; sourceTree = "<group>"; };
- 404883E40E2F799B00CF7658 /* gtest-internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-internal.h"; sourceTree = "<group>"; };
- 404883E50E2F799B00CF7658 /* gtest-port.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-port.h"; sourceTree = "<group>"; };
- 404883E60E2F799B00CF7658 /* gtest-string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-string.h"; sourceTree = "<group>"; };
- 404883F60E2F799B00CF7658 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README; path = ../README; sourceTree = SOURCE_ROOT; };
- 4048840D0E2F799B00CF7658 /* gtest_main.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gtest_main.cc; sourceTree = "<group>"; };
- 404884A90E2F7CD900CF7658 /* CHANGES */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CHANGES; path = ../CHANGES; sourceTree = SOURCE_ROOT; };
- 404884AA0E2F7CD900CF7658 /* CONTRIBUTORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CONTRIBUTORS; path = ../CONTRIBUTORS; sourceTree = SOURCE_ROOT; };
- 404884AB0E2F7CD900CF7658 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = COPYING; path = ../COPYING; sourceTree = SOURCE_ROOT; };
- 40899F430FFA7184000B29AE /* gtest_unittest-framework */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "gtest_unittest-framework"; sourceTree = BUILT_PRODUCTS_DIR; };
- 40899F4D0FFA7271000B29AE /* gtest-tuple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-tuple.h"; sourceTree = "<group>"; };
- 40899FB30FFA7567000B29AE /* StaticLibraryTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = StaticLibraryTarget.xcconfig; sourceTree = "<group>"; };
- 4089A0130FFACEFC000B29AE /* sample1_unittest-framework */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "sample1_unittest-framework"; sourceTree = BUILT_PRODUCTS_DIR; };
- 4089A02C0FFACF7F000B29AE /* sample1.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sample1.cc; sourceTree = "<group>"; };
- 4089A02D0FFACF7F000B29AE /* sample1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sample1.h; sourceTree = "<group>"; };
- 4089A02E0FFACF7F000B29AE /* sample1_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sample1_unittest.cc; sourceTree = "<group>"; };
- 40C848FA101A209C0083642A /* libgtest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libgtest.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 40C8490B101A217E0083642A /* libgtest_main.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libgtest_main.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 40C84987101A36850083642A /* gtest_unittest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = gtest_unittest; sourceTree = BUILT_PRODUCTS_DIR; };
- 40C84997101A36A60083642A /* sample1_unittest-static */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "sample1_unittest-static"; sourceTree = BUILT_PRODUCTS_DIR; };
- 40D4CDF10E30E07400294801 /* DebugProject.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugProject.xcconfig; sourceTree = "<group>"; };
- 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FrameworkTarget.xcconfig; sourceTree = "<group>"; };
- 40D4CDF30E30E07400294801 /* General.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = General.xcconfig; sourceTree = "<group>"; };
- 40D4CDF40E30E07400294801 /* ReleaseProject.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReleaseProject.xcconfig; sourceTree = "<group>"; };
- 40D4CF510E30F5E200294801 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
- 4539C8FF0EC27F6400A70F4C /* gtest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = gtest.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 4539C9330EC280AE00A70F4C /* gtest-param-test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-param-test.h"; sourceTree = "<group>"; };
- 4539C9350EC280E200A70F4C /* gtest-linked_ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-linked_ptr.h"; sourceTree = "<group>"; };
- 4539C9360EC280E200A70F4C /* gtest-param-util-generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-param-util-generated.h"; sourceTree = "<group>"; };
- 4539C9370EC280E200A70F4C /* gtest-param-util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-param-util.h"; sourceTree = "<group>"; };
- 4567C8171264FF71007740BE /* gtest-printers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gtest-printers.h"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 40899F410FFA7184000B29AE /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C849A4101A37150083642A /* gtest.framework in Frameworks */,
- 40C84916101A235B0083642A /* libgtest_main.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 4089A0110FFACEFC000B29AE /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C849A2101A37050083642A /* gtest.framework in Frameworks */,
- 40C84921101A23AD0083642A /* libgtest_main.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 40C84981101A36850083642A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C84982101A36850083642A /* libgtest.a in Frameworks */,
- 40C84983101A36850083642A /* libgtest_main.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 40C84991101A36A60083642A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C84992101A36A60083642A /* libgtest.a in Frameworks */,
- 40C84993101A36A60083642A /* libgtest_main.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 034768DDFF38A45A11DB9C8B /* Products */ = {
- isa = PBXGroup;
- children = (
- 4539C8FF0EC27F6400A70F4C /* gtest.framework */,
- 40C848FA101A209C0083642A /* libgtest.a */,
- 40C8490B101A217E0083642A /* libgtest_main.a */,
- 40899F430FFA7184000B29AE /* gtest_unittest-framework */,
- 40C84987101A36850083642A /* gtest_unittest */,
- 4089A0130FFACEFC000B29AE /* sample1_unittest-framework */,
- 40C84997101A36A60083642A /* sample1_unittest-static */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 0867D691FE84028FC02AAC07 /* gtest */ = {
- isa = PBXGroup;
- children = (
- 40D4CDF00E30E07400294801 /* Config */,
- 08FB77ACFE841707C02AAC07 /* Source */,
- 40D4CF4E0E30F5E200294801 /* Resources */,
- 403EE37B0E377822004BD1E2 /* Scripts */,
- 034768DDFF38A45A11DB9C8B /* Products */,
- );
- name = gtest;
- sourceTree = "<group>";
- };
- 08FB77ACFE841707C02AAC07 /* Source */ = {
- isa = PBXGroup;
- children = (
- 404884A90E2F7CD900CF7658 /* CHANGES */,
- 404884AA0E2F7CD900CF7658 /* CONTRIBUTORS */,
- 404884AB0E2F7CD900CF7658 /* COPYING */,
- 404883F60E2F799B00CF7658 /* README */,
- 404883D90E2F799B00CF7658 /* include */,
- 4089A02F0FFACF84000B29AE /* samples */,
- 404884070E2F799B00CF7658 /* src */,
- 3B238BF00E7FE13B00846E11 /* test */,
- );
- name = Source;
- sourceTree = "<group>";
- };
- 3B238BF00E7FE13B00846E11 /* test */ = {
- isa = PBXGroup;
- children = (
- 3B238C120E7FE13C00846E11 /* gtest_unittest.cc */,
- );
- name = test;
- path = ../test;
- sourceTree = SOURCE_ROOT;
- };
- 403EE37B0E377822004BD1E2 /* Scripts */ = {
- isa = PBXGroup;
- children = (
- 403EE37C0E377822004BD1E2 /* versiongenerate.py */,
- 3B87D2100E96B92E000D1852 /* runtests.sh */,
- );
- path = Scripts;
- sourceTree = "<group>";
- };
- 404883D90E2F799B00CF7658 /* include */ = {
- isa = PBXGroup;
- children = (
- 404883DA0E2F799B00CF7658 /* gtest */,
- );
- name = include;
- path = ../include;
- sourceTree = SOURCE_ROOT;
- };
- 404883DA0E2F799B00CF7658 /* gtest */ = {
- isa = PBXGroup;
- children = (
- 404883E10E2F799B00CF7658 /* internal */,
- 224A12A20E9EADCC00BD17FD /* gtest-test-part.h */,
- 404883DB0E2F799B00CF7658 /* gtest-death-test.h */,
- 404883DC0E2F799B00CF7658 /* gtest-message.h */,
- 4539C9330EC280AE00A70F4C /* gtest-param-test.h */,
- 4567C8171264FF71007740BE /* gtest-printers.h */,
- 404883DD0E2F799B00CF7658 /* gtest-spi.h */,
- 404883DE0E2F799B00CF7658 /* gtest.h */,
- 404883DF0E2F799B00CF7658 /* gtest_pred_impl.h */,
- 404883E00E2F799B00CF7658 /* gtest_prod.h */,
- 3BF6F2A40E79B616000F2EEE /* gtest-typed-test.h */,
- );
- path = gtest;
- sourceTree = "<group>";
- };
- 404883E10E2F799B00CF7658 /* internal */ = {
- isa = PBXGroup;
- children = (
- 404883E20E2F799B00CF7658 /* gtest-death-test-internal.h */,
- 404883E30E2F799B00CF7658 /* gtest-filepath.h */,
- 404883E40E2F799B00CF7658 /* gtest-internal.h */,
- 4539C9350EC280E200A70F4C /* gtest-linked_ptr.h */,
- 4539C9360EC280E200A70F4C /* gtest-param-util-generated.h */,
- 4539C9370EC280E200A70F4C /* gtest-param-util.h */,
- 404883E50E2F799B00CF7658 /* gtest-port.h */,
- 404883E60E2F799B00CF7658 /* gtest-string.h */,
- 40899F4D0FFA7271000B29AE /* gtest-tuple.h */,
- 3BF6F29F0E79B5AD000F2EEE /* gtest-type-util.h */,
- );
- path = internal;
- sourceTree = "<group>";
- };
- 404884070E2F799B00CF7658 /* src */ = {
- isa = PBXGroup;
- children = (
- 224A12A10E9EADA700BD17FD /* gtest-all.cc */,
- 4048840D0E2F799B00CF7658 /* gtest_main.cc */,
- );
- name = src;
- path = ../src;
- sourceTree = SOURCE_ROOT;
- };
- 4089A02F0FFACF84000B29AE /* samples */ = {
- isa = PBXGroup;
- children = (
- 4089A02C0FFACF7F000B29AE /* sample1.cc */,
- 4089A02D0FFACF7F000B29AE /* sample1.h */,
- 4089A02E0FFACF7F000B29AE /* sample1_unittest.cc */,
- );
- name = samples;
- path = ../samples;
- sourceTree = SOURCE_ROOT;
- };
- 40D4CDF00E30E07400294801 /* Config */ = {
- isa = PBXGroup;
- children = (
- 40D4CDF10E30E07400294801 /* DebugProject.xcconfig */,
- 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */,
- 40D4CDF30E30E07400294801 /* General.xcconfig */,
- 40D4CDF40E30E07400294801 /* ReleaseProject.xcconfig */,
- 40899FB30FFA7567000B29AE /* StaticLibraryTarget.xcconfig */,
- );
- path = Config;
- sourceTree = "<group>";
- };
- 40D4CF4E0E30F5E200294801 /* Resources */ = {
- isa = PBXGroup;
- children = (
- 40D4CF510E30F5E200294801 /* Info.plist */,
- );
- path = Resources;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
- 8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 404884380E2F799B00CF7658 /* gtest-death-test.h in Headers */,
- 404884390E2F799B00CF7658 /* gtest-message.h in Headers */,
- 4539C9340EC280AE00A70F4C /* gtest-param-test.h in Headers */,
- 4567C8181264FF71007740BE /* gtest-printers.h in Headers */,
- 3BF6F2A50E79B616000F2EEE /* gtest-typed-test.h in Headers */,
- 4048843A0E2F799B00CF7658 /* gtest-spi.h in Headers */,
- 4048843B0E2F799B00CF7658 /* gtest.h in Headers */,
- 4048843C0E2F799B00CF7658 /* gtest_pred_impl.h in Headers */,
- 4048843D0E2F799B00CF7658 /* gtest_prod.h in Headers */,
- 224A12A30E9EADCC00BD17FD /* gtest-test-part.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
- 40899F420FFA7184000B29AE /* gtest_unittest-framework */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 40899F4A0FFA71BC000B29AE /* Build configuration list for PBXNativeTarget "gtest_unittest-framework" */;
- buildPhases = (
- 40899F400FFA7184000B29AE /* Sources */,
- 40899F410FFA7184000B29AE /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- 40C849A0101A36F10083642A /* PBXTargetDependency */,
- );
- name = "gtest_unittest-framework";
- productName = gtest_unittest;
- productReference = 40899F430FFA7184000B29AE /* gtest_unittest-framework */;
- productType = "com.apple.product-type.tool";
- };
- 4089A0120FFACEFC000B29AE /* sample1_unittest-framework */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4089A0240FFACF01000B29AE /* Build configuration list for PBXNativeTarget "sample1_unittest-framework" */;
- buildPhases = (
- 4089A0100FFACEFC000B29AE /* Sources */,
- 4089A0110FFACEFC000B29AE /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- 40C8499E101A36E50083642A /* PBXTargetDependency */,
- );
- name = "sample1_unittest-framework";
- productName = sample1_unittest;
- productReference = 4089A0130FFACEFC000B29AE /* sample1_unittest-framework */;
- productType = "com.apple.product-type.tool";
- };
- 40C848F9101A209C0083642A /* gtest-static */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 40C84902101A212E0083642A /* Build configuration list for PBXNativeTarget "gtest-static" */;
- buildPhases = (
- 40C848F7101A209C0083642A /* Sources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "gtest-static";
- productName = "gtest-static";
- productReference = 40C848FA101A209C0083642A /* libgtest.a */;
- productType = "com.apple.product-type.library.static";
- };
- 40C8490A101A217E0083642A /* gtest_main-static */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 40C84912101A21D20083642A /* Build configuration list for PBXNativeTarget "gtest_main-static" */;
- buildPhases = (
- 40C84908101A217E0083642A /* Sources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "gtest_main-static";
- productName = "gtest_main-static";
- productReference = 40C8490B101A217E0083642A /* libgtest_main.a */;
- productType = "com.apple.product-type.library.static";
- };
- 40C8497A101A36850083642A /* gtest_unittest-static */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 40C84984101A36850083642A /* Build configuration list for PBXNativeTarget "gtest_unittest-static" */;
- buildPhases = (
- 40C8497F101A36850083642A /* Sources */,
- 40C84981101A36850083642A /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- 40C8497B101A36850083642A /* PBXTargetDependency */,
- 40C8497D101A36850083642A /* PBXTargetDependency */,
- );
- name = "gtest_unittest-static";
- productName = gtest_unittest;
- productReference = 40C84987101A36850083642A /* gtest_unittest */;
- productType = "com.apple.product-type.tool";
- };
- 40C84989101A36A60083642A /* sample1_unittest-static */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 40C84994101A36A60083642A /* Build configuration list for PBXNativeTarget "sample1_unittest-static" */;
- buildPhases = (
- 40C8498E101A36A60083642A /* Sources */,
- 40C84991101A36A60083642A /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- 40C8498A101A36A60083642A /* PBXTargetDependency */,
- 40C8498C101A36A60083642A /* PBXTargetDependency */,
- );
- name = "sample1_unittest-static";
- productName = sample1_unittest;
- productReference = 40C84997101A36A60083642A /* sample1_unittest-static */;
- productType = "com.apple.product-type.tool";
- };
- 8D07F2BC0486CC7A007CD1D0 /* gtest-framework */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "gtest-framework" */;
- buildPhases = (
- 8D07F2C10486CC7A007CD1D0 /* Sources */,
- 8D07F2BD0486CC7A007CD1D0 /* Headers */,
- 404884A50E2F7C0400CF7658 /* Copy Headers Internal */,
- 8D07F2BF0486CC7A007CD1D0 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 40C44AE60E379922008FCC51 /* PBXTargetDependency */,
- 408BEC101046CFE900DEF522 /* PBXTargetDependency */,
- 40C8499C101A36DC0083642A /* PBXTargetDependency */,
- );
- name = "gtest-framework";
- productInstallPath = "$(HOME)/Library/Frameworks";
- productName = gtest;
- productReference = 4539C8FF0EC27F6400A70F4C /* gtest.framework */;
- productType = "com.apple.product-type.framework";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 0867D690FE84028FC02AAC07 /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "gtest" */;
- compatibilityVersion = "Xcode 2.4";
- hasScannedForEncodings = 1;
- knownRegions = (
- English,
- Japanese,
- French,
- German,
- en,
- );
- mainGroup = 0867D691FE84028FC02AAC07 /* gtest */;
- productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8D07F2BC0486CC7A007CD1D0 /* gtest-framework */,
- 40C848F9101A209C0083642A /* gtest-static */,
- 40C8490A101A217E0083642A /* gtest_main-static */,
- 40899F420FFA7184000B29AE /* gtest_unittest-framework */,
- 40C8497A101A36850083642A /* gtest_unittest-static */,
- 4089A0120FFACEFC000B29AE /* sample1_unittest-framework */,
- 40C84989101A36A60083642A /* sample1_unittest-static */,
- 3B238F5F0E828B5400846E11 /* Check */,
- 40C44ADC0E3798F4008FCC51 /* Version Info */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 404884500E2F799B00CF7658 /* README in Resources */,
- 404884AC0E2F7CD900CF7658 /* CHANGES in Resources */,
- 404884AD0E2F7CD900CF7658 /* CONTRIBUTORS in Resources */,
- 404884AE0E2F7CD900CF7658 /* COPYING in Resources */,
- 40C84978101A36540083642A /* libgtest_main.a in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 3B238F5E0E828B5400846E11 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "# Remember, this \"Run Script\" build phase will be executed from $SRCROOT\n/bin/bash Scripts/runtests.sh";
- };
- 40C44ADB0E3798F4008FCC51 /* Generate Version.h */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "$(SRCROOT)/Scripts/versiongenerate.py",
- "$(SRCROOT)/../configure.ac",
- );
- name = "Generate Version.h";
- outputPaths = (
- "$(PROJECT_TEMP_DIR)/Version.h",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "# Remember, this \"Run Script\" build phase will be executed from $SRCROOT\n/usr/bin/python Scripts/versiongenerate.py ../ $PROJECT_TEMP_DIR";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 40899F400FFA7184000B29AE /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40899F530FFA72A0000B29AE /* gtest_unittest.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 4089A0100FFACEFC000B29AE /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4089A0440FFAD1BE000B29AE /* sample1.cc in Sources */,
- 4089A0460FFAD1BE000B29AE /* sample1_unittest.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 40C848F7101A209C0083642A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C848FF101A21150083642A /* gtest-all.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 40C84908101A217E0083642A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C84915101A21DF0083642A /* gtest_main.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 40C8497F101A36850083642A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C84980101A36850083642A /* gtest_unittest.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 40C8498E101A36A60083642A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40C8498F101A36A60083642A /* sample1.cc in Sources */,
- 40C84990101A36A60083642A /* sample1_unittest.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8D07F2C10486CC7A007CD1D0 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 40899F3A0FFA70D4000B29AE /* gtest-all.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 40899F9D0FFA740F000B29AE /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40899F420FFA7184000B29AE /* gtest_unittest-framework */;
- targetProxy = 40899F9C0FFA740F000B29AE /* PBXContainerItemProxy */;
- };
- 4089A0980FFAD34A000B29AE /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 4089A0120FFACEFC000B29AE /* sample1_unittest-framework */;
- targetProxy = 4089A0970FFAD34A000B29AE /* PBXContainerItemProxy */;
- };
- 408BEC101046CFE900DEF522 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C848F9101A209C0083642A /* gtest-static */;
- targetProxy = 408BEC0F1046CFE900DEF522 /* PBXContainerItemProxy */;
- };
- 40C44AE60E379922008FCC51 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C44ADC0E3798F4008FCC51 /* Version Info */;
- targetProxy = 40C44AE50E379922008FCC51 /* PBXContainerItemProxy */;
- };
- 40C8497B101A36850083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C848F9101A209C0083642A /* gtest-static */;
- targetProxy = 40C8497C101A36850083642A /* PBXContainerItemProxy */;
- };
- 40C8497D101A36850083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C8490A101A217E0083642A /* gtest_main-static */;
- targetProxy = 40C8497E101A36850083642A /* PBXContainerItemProxy */;
- };
- 40C8498A101A36A60083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C848F9101A209C0083642A /* gtest-static */;
- targetProxy = 40C8498B101A36A60083642A /* PBXContainerItemProxy */;
- };
- 40C8498C101A36A60083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C8490A101A217E0083642A /* gtest_main-static */;
- targetProxy = 40C8498D101A36A60083642A /* PBXContainerItemProxy */;
- };
- 40C8499C101A36DC0083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C8490A101A217E0083642A /* gtest_main-static */;
- targetProxy = 40C8499B101A36DC0083642A /* PBXContainerItemProxy */;
- };
- 40C8499E101A36E50083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 8D07F2BC0486CC7A007CD1D0 /* gtest-framework */;
- targetProxy = 40C8499D101A36E50083642A /* PBXContainerItemProxy */;
- };
- 40C849A0101A36F10083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 8D07F2BC0486CC7A007CD1D0 /* gtest-framework */;
- targetProxy = 40C8499F101A36F10083642A /* PBXContainerItemProxy */;
- };
- 40C849F7101A43440083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C8497A101A36850083642A /* gtest_unittest-static */;
- targetProxy = 40C849F6101A43440083642A /* PBXContainerItemProxy */;
- };
- 40C849F9101A43490083642A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 40C84989101A36A60083642A /* sample1_unittest-static */;
- targetProxy = 40C849F8101A43490083642A /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
- 3B238F600E828B5400846E11 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_OPTIMIZATION_LEVEL = 0;
- PRODUCT_NAME = Check;
- };
- name = Debug;
- };
- 3B238F610E828B5400846E11 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- PRODUCT_NAME = Check;
- ZERO_LINK = NO;
- };
- name = Release;
- };
- 40899F450FFA7185000B29AE /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- HEADER_SEARCH_PATHS = ../;
- PRODUCT_NAME = "gtest_unittest-framework";
- };
- name = Debug;
- };
- 40899F460FFA7185000B29AE /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- HEADER_SEARCH_PATHS = ../;
- PRODUCT_NAME = "gtest_unittest-framework";
- };
- name = Release;
- };
- 4089A0150FFACEFD000B29AE /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "sample1_unittest-framework";
- };
- name = Debug;
- };
- 4089A0160FFACEFD000B29AE /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "sample1_unittest-framework";
- };
- name = Release;
- };
- 40C44ADF0E3798F4008FCC51 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = gtest;
- TARGET_NAME = gtest;
- };
- name = Debug;
- };
- 40C44AE00E3798F4008FCC51 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = gtest;
- TARGET_NAME = gtest;
- };
- name = Release;
- };
- 40C848FB101A209D0083642A /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40899FB30FFA7567000B29AE /* StaticLibraryTarget.xcconfig */;
- buildSettings = {
- GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
- GCC_SYMBOLS_PRIVATE_EXTERN = YES;
- HEADER_SEARCH_PATHS = (
- ../,
- ../include/,
- );
- PRODUCT_NAME = gtest;
- };
- name = Debug;
- };
- 40C848FC101A209D0083642A /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40899FB30FFA7567000B29AE /* StaticLibraryTarget.xcconfig */;
- buildSettings = {
- GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
- GCC_SYMBOLS_PRIVATE_EXTERN = YES;
- HEADER_SEARCH_PATHS = (
- ../,
- ../include/,
- );
- PRODUCT_NAME = gtest;
- };
- name = Release;
- };
- 40C8490E101A217F0083642A /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40899FB30FFA7567000B29AE /* StaticLibraryTarget.xcconfig */;
- buildSettings = {
- HEADER_SEARCH_PATHS = (
- ../,
- ../include/,
- );
- PRODUCT_NAME = gtest_main;
- };
- name = Debug;
- };
- 40C8490F101A217F0083642A /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40899FB30FFA7567000B29AE /* StaticLibraryTarget.xcconfig */;
- buildSettings = {
- HEADER_SEARCH_PATHS = (
- ../,
- ../include/,
- );
- PRODUCT_NAME = gtest_main;
- };
- name = Release;
- };
- 40C84985101A36850083642A /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- HEADER_SEARCH_PATHS = ../;
- PRODUCT_NAME = gtest_unittest;
- };
- name = Debug;
- };
- 40C84986101A36850083642A /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- HEADER_SEARCH_PATHS = ../;
- PRODUCT_NAME = gtest_unittest;
- };
- name = Release;
- };
- 40C84995101A36A60083642A /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "sample1_unittest-static";
- };
- name = Debug;
- };
- 40C84996101A36A60083642A /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = "sample1_unittest-static";
- };
- name = Release;
- };
- 4FADC24308B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */;
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- HEADER_SEARCH_PATHS = (
- ../,
- ../include/,
- );
- INFOPLIST_FILE = Resources/Info.plist;
- INFOPLIST_PREFIX_HEADER = "$(PROJECT_TEMP_DIR)/Version.h";
- INFOPLIST_PREPROCESS = YES;
- PRODUCT_NAME = gtest;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 4FADC24408B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */;
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- HEADER_SEARCH_PATHS = (
- ../,
- ../include/,
- );
- INFOPLIST_FILE = Resources/Info.plist;
- INFOPLIST_PREFIX_HEADER = "$(PROJECT_TEMP_DIR)/Version.h";
- INFOPLIST_PREPROCESS = YES;
- PRODUCT_NAME = gtest;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
- 4FADC24708B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40D4CDF10E30E07400294801 /* DebugProject.xcconfig */;
- buildSettings = {
- };
- name = Debug;
- };
- 4FADC24808B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 40D4CDF40E30E07400294801 /* ReleaseProject.xcconfig */;
- buildSettings = {
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 3B238FA30E828BB600846E11 /* Build configuration list for PBXAggregateTarget "Check" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 3B238F600E828B5400846E11 /* Debug */,
- 3B238F610E828B5400846E11 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 40899F4A0FFA71BC000B29AE /* Build configuration list for PBXNativeTarget "gtest_unittest-framework" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 40899F450FFA7185000B29AE /* Debug */,
- 40899F460FFA7185000B29AE /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4089A0240FFACF01000B29AE /* Build configuration list for PBXNativeTarget "sample1_unittest-framework" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4089A0150FFACEFD000B29AE /* Debug */,
- 4089A0160FFACEFD000B29AE /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 40C44AE40E379905008FCC51 /* Build configuration list for PBXAggregateTarget "Version Info" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 40C44ADF0E3798F4008FCC51 /* Debug */,
- 40C44AE00E3798F4008FCC51 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 40C84902101A212E0083642A /* Build configuration list for PBXNativeTarget "gtest-static" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 40C848FB101A209D0083642A /* Debug */,
- 40C848FC101A209D0083642A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 40C84912101A21D20083642A /* Build configuration list for PBXNativeTarget "gtest_main-static" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 40C8490E101A217F0083642A /* Debug */,
- 40C8490F101A217F0083642A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 40C84984101A36850083642A /* Build configuration list for PBXNativeTarget "gtest_unittest-static" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 40C84985101A36850083642A /* Debug */,
- 40C84986101A36850083642A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 40C84994101A36A60083642A /* Build configuration list for PBXNativeTarget "sample1_unittest-static" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 40C84995101A36A60083642A /* Debug */,
- 40C84996101A36A60083642A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "gtest-framework" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24308B4156D00ABE55E /* Debug */,
- 4FADC24408B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "gtest" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24708B4156D00ABE55E /* Debug */,
- 4FADC24808B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-actions.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-actions.h
deleted file mode 100644
index d6a3e1486..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-actions.h
+++ /dev/null
@@ -1,1076 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used actions.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-
-#include <algorithm>
-#include <string>
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif
-
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-
-// To implement an action Foo, define:
-// 1. a class FooAction that implements the ActionInterface interface, and
-// 2. a factory function that creates an Action object from a
-// const FooAction*.
-//
-// The two-level delegation design follows that of Matcher, providing
-// consistency for extension developers. It also eases ownership
-// management as Action objects can now be copied like plain values.
-
-namespace internal {
-
-template <typename F1, typename F2>
-class ActionAdaptor;
-
-// BuiltInDefaultValue<T>::Get() returns the "built-in" default
-// value for type T, which is NULL when T is a pointer type, 0 when T
-// is a numeric type, false when T is bool, or "" when T is string or
-// std::string. For any other type T, this value is undefined and the
-// function will abort the process.
-template <typename T>
-class BuiltInDefaultValue {
- public:
- // This function returns true iff type T has a built-in default value.
- static bool Exists() { return false; }
- static T Get() {
- Assert(false, __FILE__, __LINE__,
- "Default action undefined for the function return type.");
- return internal::Invalid<T>();
- // The above statement will never be reached, but is required in
- // order for this function to compile.
- }
-};
-
-// This partial specialization says that we use the same built-in
-// default value for T and const T.
-template <typename T>
-class BuiltInDefaultValue<const T> {
- public:
- static bool Exists() { return BuiltInDefaultValue<T>::Exists(); }
- static T Get() { return BuiltInDefaultValue<T>::Get(); }
-};
-
-// This partial specialization defines the default values for pointer
-// types.
-template <typename T>
-class BuiltInDefaultValue<T*> {
- public:
- static bool Exists() { return true; }
- static T* Get() { return NULL; }
-};
-
-// The following specializations define the default values for
-// specific types we care about.
-#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \
- template <> \
- class BuiltInDefaultValue<type> { \
- public: \
- static bool Exists() { return true; } \
- static type Get() { return value; } \
- }
-
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT
-#if GTEST_HAS_GLOBAL_STRING
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, "");
-#endif // GTEST_HAS_GLOBAL_STRING
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, "");
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0');
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0');
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0');
-
-// There's no need for a default action for signed wchar_t, as that
-// type is the same as wchar_t for gcc, and invalid for MSVC.
-//
-// There's also no need for a default action for unsigned wchar_t, as
-// that type is the same as unsigned int for gcc, and invalid for
-// MSVC.
-#if GMOCK_WCHAR_T_IS_NATIVE_
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT
-#endif
-
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0);
-
-#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
-
-} // namespace internal
-
-// When an unexpected function call is encountered, Google Mock will
-// let it return a default value if the user has specified one for its
-// return type, or if the return type has a built-in default value;
-// otherwise Google Mock won't know what value to return and will have
-// to abort the process.
-//
-// The DefaultValue<T> class allows a user to specify the
-// default value for a type T that is both copyable and publicly
-// destructible (i.e. anything that can be used as a function return
-// type). The usage is:
-//
-// // Sets the default value for type T to be foo.
-// DefaultValue<T>::Set(foo);
-template <typename T>
-class DefaultValue {
- public:
- // Sets the default value for type T; requires T to be
- // copy-constructable and have a public destructor.
- static void Set(T x) {
- delete value_;
- value_ = new T(x);
- }
-
- // Unsets the default value for type T.
- static void Clear() {
- delete value_;
- value_ = NULL;
- }
-
- // Returns true iff the user has set the default value for type T.
- static bool IsSet() { return value_ != NULL; }
-
- // Returns true if T has a default return value set by the user or there
- // exists a built-in default value.
- static bool Exists() {
- return IsSet() || internal::BuiltInDefaultValue<T>::Exists();
- }
-
- // Returns the default value for type T if the user has set one;
- // otherwise returns the built-in default value if there is one;
- // otherwise aborts the process.
- static T Get() {
- return value_ == NULL ?
- internal::BuiltInDefaultValue<T>::Get() : *value_;
- }
- private:
- static const T* value_;
-};
-
-// This partial specialization allows a user to set default values for
-// reference types.
-template <typename T>
-class DefaultValue<T&> {
- public:
- // Sets the default value for type T&.
- static void Set(T& x) { // NOLINT
- address_ = &x;
- }
-
- // Unsets the default value for type T&.
- static void Clear() {
- address_ = NULL;
- }
-
- // Returns true iff the user has set the default value for type T&.
- static bool IsSet() { return address_ != NULL; }
-
- // Returns true if T has a default return value set by the user or there
- // exists a built-in default value.
- static bool Exists() {
- return IsSet() || internal::BuiltInDefaultValue<T&>::Exists();
- }
-
- // Returns the default value for type T& if the user has set one;
- // otherwise returns the built-in default value if there is one;
- // otherwise aborts the process.
- static T& Get() {
- return address_ == NULL ?
- internal::BuiltInDefaultValue<T&>::Get() : *address_;
- }
- private:
- static T* address_;
-};
-
-// This specialization allows DefaultValue<void>::Get() to
-// compile.
-template <>
-class DefaultValue<void> {
- public:
- static bool Exists() { return true; }
- static void Get() {}
-};
-
-// Points to the user-set default value for type T.
-template <typename T>
-const T* DefaultValue<T>::value_ = NULL;
-
-// Points to the user-set default value for type T&.
-template <typename T>
-T* DefaultValue<T&>::address_ = NULL;
-
-// Implement this interface to define an action for function type F.
-template <typename F>
-class ActionInterface {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- ActionInterface() {}
- virtual ~ActionInterface() {}
-
- // Performs the action. This method is not const, as in general an
- // action can have side effects and be stateful. For example, a
- // get-the-next-element-from-the-collection action will need to
- // remember the current element.
- virtual Result Perform(const ArgumentTuple& args) = 0;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface);
-};
-
-// An Action<F> is a copyable and IMMUTABLE (except by assignment)
-// object that represents an action to be taken when a mock function
-// of type F is called. The implementation of Action<T> is just a
-// linked_ptr to const ActionInterface<T>, so copying is fairly cheap.
-// Don't inherit from Action!
-//
-// You can view an object implementing ActionInterface<F> as a
-// concrete action (including its current state), and an Action<F>
-// object as a handle to it.
-template <typename F>
-class Action {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- // Constructs a null Action. Needed for storing Action objects in
- // STL containers.
- Action() : impl_(NULL) {}
-
- // Constructs an Action from its implementation. A NULL impl is
- // used to represent the "do-default" action.
- explicit Action(ActionInterface<F>* impl) : impl_(impl) {}
-
- // Copy constructor.
- Action(const Action& action) : impl_(action.impl_) {}
-
- // This constructor allows us to turn an Action<Func> object into an
- // Action<F>, as long as F's arguments can be implicitly converted
- // to Func's and Func's return type can be implicitly converted to
- // F's.
- template <typename Func>
- explicit Action(const Action<Func>& action);
-
- // Returns true iff this is the DoDefault() action.
- bool IsDoDefault() const { return impl_.get() == NULL; }
-
- // Performs the action. Note that this method is const even though
- // the corresponding method in ActionInterface is not. The reason
- // is that a const Action<F> means that it cannot be re-bound to
- // another concrete action, not that the concrete action it binds to
- // cannot change state. (Think of the difference between a const
- // pointer and a pointer to const.)
- Result Perform(const ArgumentTuple& args) const {
- internal::Assert(
- !IsDoDefault(), __FILE__, __LINE__,
- "You are using DoDefault() inside a composite action like "
- "DoAll() or WithArgs(). This is not supported for technical "
- "reasons. Please instead spell out the default action, or "
- "assign the default action to an Action variable and use "
- "the variable in various places.");
- return impl_->Perform(args);
- }
-
- private:
- template <typename F1, typename F2>
- friend class internal::ActionAdaptor;
-
- internal::linked_ptr<ActionInterface<F> > impl_;
-};
-
-// The PolymorphicAction class template makes it easy to implement a
-// polymorphic action (i.e. an action that can be used in mock
-// functions of than one type, e.g. Return()).
-//
-// To define a polymorphic action, a user first provides a COPYABLE
-// implementation class that has a Perform() method template:
-//
-// class FooAction {
-// public:
-// template <typename Result, typename ArgumentTuple>
-// Result Perform(const ArgumentTuple& args) const {
-// // Processes the arguments and returns a result, using
-// // tr1::get<N>(args) to get the N-th (0-based) argument in the tuple.
-// }
-// ...
-// };
-//
-// Then the user creates the polymorphic action using
-// MakePolymorphicAction(object) where object has type FooAction. See
-// the definition of Return(void) and SetArgumentPointee<N>(value) for
-// complete examples.
-template <typename Impl>
-class PolymorphicAction {
- public:
- explicit PolymorphicAction(const Impl& impl) : impl_(impl) {}
-
- template <typename F>
- operator Action<F>() const {
- return Action<F>(new MonomorphicImpl<F>(impl_));
- }
-
- private:
- template <typename F>
- class MonomorphicImpl : public ActionInterface<F> {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return impl_.template Perform<Result>(args);
- }
-
- private:
- Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);
- };
-
- Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
-};
-
-// Creates an Action from its implementation and returns it. The
-// created Action object owns the implementation.
-template <typename F>
-Action<F> MakeAction(ActionInterface<F>* impl) {
- return Action<F>(impl);
-}
-
-// Creates a polymorphic action from its implementation. This is
-// easier to use than the PolymorphicAction<Impl> constructor as it
-// doesn't require you to explicitly write the template argument, e.g.
-//
-// MakePolymorphicAction(foo);
-// vs
-// PolymorphicAction<TypeOfFoo>(foo);
-template <typename Impl>
-inline PolymorphicAction<Impl> MakePolymorphicAction(const Impl& impl) {
- return PolymorphicAction<Impl>(impl);
-}
-
-namespace internal {
-
-// Allows an Action<F2> object to pose as an Action<F1>, as long as F2
-// and F1 are compatible.
-template <typename F1, typename F2>
-class ActionAdaptor : public ActionInterface<F1> {
- public:
- typedef typename internal::Function<F1>::Result Result;
- typedef typename internal::Function<F1>::ArgumentTuple ArgumentTuple;
-
- explicit ActionAdaptor(const Action<F2>& from) : impl_(from.impl_) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return impl_->Perform(args);
- }
-
- private:
- const internal::linked_ptr<ActionInterface<F2> > impl_;
-
- GTEST_DISALLOW_ASSIGN_(ActionAdaptor);
-};
-
-// Implements the polymorphic Return(x) action, which can be used in
-// any function that returns the type of x, regardless of the argument
-// types.
-//
-// Note: The value passed into Return must be converted into
-// Function<F>::Result when this action is cast to Action<F> rather than
-// when that action is performed. This is important in scenarios like
-//
-// MOCK_METHOD1(Method, T(U));
-// ...
-// {
-// Foo foo;
-// X x(&foo);
-// EXPECT_CALL(mock, Method(_)).WillOnce(Return(x));
-// }
-//
-// In the example above the variable x holds reference to foo which leaves
-// scope and gets destroyed. If copying X just copies a reference to foo,
-// that copy will be left with a hanging reference. If conversion to T
-// makes a copy of foo, the above code is safe. To support that scenario, we
-// need to make sure that the type conversion happens inside the EXPECT_CALL
-// statement, and conversion of the result of Return to Action<T(U)> is a
-// good place for that.
-//
-template <typename R>
-class ReturnAction {
- public:
- // Constructs a ReturnAction object from the value to be returned.
- // 'value' is passed by value instead of by const reference in order
- // to allow Return("string literal") to compile.
- explicit ReturnAction(R value) : value_(value) {}
-
- // This template type conversion operator allows Return(x) to be
- // used in ANY function that returns x's type.
- template <typename F>
- operator Action<F>() const {
- // Assert statement belongs here because this is the best place to verify
- // conditions on F. It produces the clearest error messages
- // in most compilers.
- // Impl really belongs in this scope as a local class but can't
- // because MSVC produces duplicate symbols in different translation units
- // in this case. Until MS fixes that bug we put Impl into the class scope
- // and put the typedef both here (for use in assert statement) and
- // in the Impl class. But both definitions must be the same.
- typedef typename Function<F>::Result Result;
- GTEST_COMPILE_ASSERT_(
- !internal::is_reference<Result>::value,
- use_ReturnRef_instead_of_Return_to_return_a_reference);
- return Action<F>(new Impl<F>(value_));
- }
-
- private:
- // Implements the Return(x) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- // The implicit cast is necessary when Result has more than one
- // single-argument constructor (e.g. Result is std::vector<int>) and R
- // has a type conversion operator template. In that case, value_(value)
- // won't compile as the compiler doesn't known which constructor of
- // Result to call. ImplicitCast_ forces the compiler to convert R to
- // Result without considering explicit constructors, thus resolving the
- // ambiguity. value_ is then initialized using its copy constructor.
- explicit Impl(R value)
- : value_(::testing::internal::ImplicitCast_<Result>(value)) {}
-
- virtual Result Perform(const ArgumentTuple&) { return value_; }
-
- private:
- GTEST_COMPILE_ASSERT_(!internal::is_reference<Result>::value,
- Result_cannot_be_a_reference_type);
- Result value_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- R value_;
-
- GTEST_DISALLOW_ASSIGN_(ReturnAction);
-};
-
-// Implements the ReturnNull() action.
-class ReturnNullAction {
- public:
- // Allows ReturnNull() to be used in any pointer-returning function.
- template <typename Result, typename ArgumentTuple>
- static Result Perform(const ArgumentTuple&) {
- GTEST_COMPILE_ASSERT_(internal::is_pointer<Result>::value,
- ReturnNull_can_be_used_to_return_a_pointer_only);
- return NULL;
- }
-};
-
-// Implements the Return() action.
-class ReturnVoidAction {
- public:
- // Allows Return() to be used in any void-returning function.
- template <typename Result, typename ArgumentTuple>
- static void Perform(const ArgumentTuple&) {
- CompileAssertTypesEqual<void, Result>();
- }
-};
-
-// Implements the polymorphic ReturnRef(x) action, which can be used
-// in any function that returns a reference to the type of x,
-// regardless of the argument types.
-template <typename T>
-class ReturnRefAction {
- public:
- // Constructs a ReturnRefAction object from the reference to be returned.
- explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT
-
- // This template type conversion operator allows ReturnRef(x) to be
- // used in ANY function that returns a reference to x's type.
- template <typename F>
- operator Action<F>() const {
- typedef typename Function<F>::Result Result;
- // Asserts that the function return type is a reference. This
- // catches the user error of using ReturnRef(x) when Return(x)
- // should be used, and generates some helpful error message.
- GTEST_COMPILE_ASSERT_(internal::is_reference<Result>::value,
- use_Return_instead_of_ReturnRef_to_return_a_value);
- return Action<F>(new Impl<F>(ref_));
- }
-
- private:
- // Implements the ReturnRef(x) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(T& ref) : ref_(ref) {} // NOLINT
-
- virtual Result Perform(const ArgumentTuple&) {
- return ref_;
- }
-
- private:
- T& ref_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- T& ref_;
-
- GTEST_DISALLOW_ASSIGN_(ReturnRefAction);
-};
-
-// Implements the polymorphic ReturnRefOfCopy(x) action, which can be
-// used in any function that returns a reference to the type of x,
-// regardless of the argument types.
-template <typename T>
-class ReturnRefOfCopyAction {
- public:
- // Constructs a ReturnRefOfCopyAction object from the reference to
- // be returned.
- explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT
-
- // This template type conversion operator allows ReturnRefOfCopy(x) to be
- // used in ANY function that returns a reference to x's type.
- template <typename F>
- operator Action<F>() const {
- typedef typename Function<F>::Result Result;
- // Asserts that the function return type is a reference. This
- // catches the user error of using ReturnRefOfCopy(x) when Return(x)
- // should be used, and generates some helpful error message.
- GTEST_COMPILE_ASSERT_(
- internal::is_reference<Result>::value,
- use_Return_instead_of_ReturnRefOfCopy_to_return_a_value);
- return Action<F>(new Impl<F>(value_));
- }
-
- private:
- // Implements the ReturnRefOfCopy(x) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const T& value) : value_(value) {} // NOLINT
-
- virtual Result Perform(const ArgumentTuple&) {
- return value_;
- }
-
- private:
- T value_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- const T value_;
-
- GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction);
-};
-
-// Implements the polymorphic DoDefault() action.
-class DoDefaultAction {
- public:
- // This template type conversion operator allows DoDefault() to be
- // used in any function.
- template <typename F>
- operator Action<F>() const { return Action<F>(NULL); }
-};
-
-// Implements the Assign action to set a given pointer referent to a
-// particular value.
-template <typename T1, typename T2>
-class AssignAction {
- public:
- AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {}
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& /* args */) const {
- *ptr_ = value_;
- }
-
- private:
- T1* const ptr_;
- const T2 value_;
-
- GTEST_DISALLOW_ASSIGN_(AssignAction);
-};
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Implements the SetErrnoAndReturn action to simulate return from
-// various system calls and libc functions.
-template <typename T>
-class SetErrnoAndReturnAction {
- public:
- SetErrnoAndReturnAction(int errno_value, T result)
- : errno_(errno_value),
- result_(result) {}
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& /* args */) const {
- errno = errno_;
- return result_;
- }
-
- private:
- const int errno_;
- const T result_;
-
- GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction);
-};
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Implements the SetArgumentPointee<N>(x) action for any function
-// whose N-th argument (0-based) is a pointer to x's type. The
-// template parameter kIsProto is true iff type A is ProtocolMessage,
-// proto2::Message, or a sub-class of those.
-template <size_t N, typename A, bool kIsProto>
-class SetArgumentPointeeAction {
- public:
- // Constructs an action that sets the variable pointed to by the
- // N-th function argument to 'value'.
- explicit SetArgumentPointeeAction(const A& value) : value_(value) {}
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& args) const {
- CompileAssertTypesEqual<void, Result>();
- *::std::tr1::get<N>(args) = value_;
- }
-
- private:
- const A value_;
-
- GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);
-};
-
-template <size_t N, typename Proto>
-class SetArgumentPointeeAction<N, Proto, true> {
- public:
- // Constructs an action that sets the variable pointed to by the
- // N-th function argument to 'proto'. Both ProtocolMessage and
- // proto2::Message have the CopyFrom() method, so the same
- // implementation works for both.
- explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) {
- proto_->CopyFrom(proto);
- }
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& args) const {
- CompileAssertTypesEqual<void, Result>();
- ::std::tr1::get<N>(args)->CopyFrom(*proto_);
- }
-
- private:
- const internal::linked_ptr<Proto> proto_;
-
- GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);
-};
-
-// Implements the InvokeWithoutArgs(f) action. The template argument
-// FunctionImpl is the implementation type of f, which can be either a
-// function pointer or a functor. InvokeWithoutArgs(f) can be used as an
-// Action<F> as long as f's type is compatible with F (i.e. f can be
-// assigned to a tr1::function<F>).
-template <typename FunctionImpl>
-class InvokeWithoutArgsAction {
- public:
- // The c'tor makes a copy of function_impl (either a function
- // pointer or a functor).
- explicit InvokeWithoutArgsAction(FunctionImpl function_impl)
- : function_impl_(function_impl) {}
-
- // Allows InvokeWithoutArgs(f) to be used as any action whose type is
- // compatible with f.
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple&) { return function_impl_(); }
-
- private:
- FunctionImpl function_impl_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeWithoutArgsAction);
-};
-
-// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action.
-template <class Class, typename MethodPtr>
-class InvokeMethodWithoutArgsAction {
- public:
- InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr)
- : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {}
-
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple&) const {
- return (obj_ptr_->*method_ptr_)();
- }
-
- private:
- Class* const obj_ptr_;
- const MethodPtr method_ptr_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeMethodWithoutArgsAction);
-};
-
-// Implements the IgnoreResult(action) action.
-template <typename A>
-class IgnoreResultAction {
- public:
- explicit IgnoreResultAction(const A& action) : action_(action) {}
-
- template <typename F>
- operator Action<F>() const {
- // Assert statement belongs here because this is the best place to verify
- // conditions on F. It produces the clearest error messages
- // in most compilers.
- // Impl really belongs in this scope as a local class but can't
- // because MSVC produces duplicate symbols in different translation units
- // in this case. Until MS fixes that bug we put Impl into the class scope
- // and put the typedef both here (for use in assert statement) and
- // in the Impl class. But both definitions must be the same.
- typedef typename internal::Function<F>::Result Result;
-
- // Asserts at compile time that F returns void.
- CompileAssertTypesEqual<void, Result>();
-
- return Action<F>(new Impl<F>(action_));
- }
-
- private:
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename internal::Function<F>::Result Result;
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const A& action) : action_(action) {}
-
- virtual void Perform(const ArgumentTuple& args) {
- // Performs the action and ignores its result.
- action_.Perform(args);
- }
-
- private:
- // Type OriginalFunction is the same as F except that its return
- // type is IgnoredValue.
- typedef typename internal::Function<F>::MakeResultIgnoredValue
- OriginalFunction;
-
- const Action<OriginalFunction> action_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- const A action_;
-
- GTEST_DISALLOW_ASSIGN_(IgnoreResultAction);
-};
-
-// A ReferenceWrapper<T> object represents a reference to type T,
-// which can be either const or not. It can be explicitly converted
-// from, and implicitly converted to, a T&. Unlike a reference,
-// ReferenceWrapper<T> can be copied and can survive template type
-// inference. This is used to support by-reference arguments in the
-// InvokeArgument<N>(...) action. The idea was from "reference
-// wrappers" in tr1, which we don't have in our source tree yet.
-template <typename T>
-class ReferenceWrapper {
- public:
- // Constructs a ReferenceWrapper<T> object from a T&.
- explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT
-
- // Allows a ReferenceWrapper<T> object to be implicitly converted to
- // a T&.
- operator T&() const { return *pointer_; }
- private:
- T* pointer_;
-};
-
-// Allows the expression ByRef(x) to be printed as a reference to x.
-template <typename T>
-void PrintTo(const ReferenceWrapper<T>& ref, ::std::ostream* os) {
- T& value = ref;
- UniversalPrinter<T&>::Print(value, os);
-}
-
-// Does two actions sequentially. Used for implementing the DoAll(a1,
-// a2, ...) action.
-template <typename Action1, typename Action2>
-class DoBothAction {
- public:
- DoBothAction(Action1 action1, Action2 action2)
- : action1_(action1), action2_(action2) {}
-
- // This template type conversion operator allows DoAll(a1, ..., a_n)
- // to be used in ANY function of compatible type.
- template <typename F>
- operator Action<F>() const {
- return Action<F>(new Impl<F>(action1_, action2_));
- }
-
- private:
- // Implements the DoAll(...) action for a particular function type F.
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::MakeResultVoid VoidResult;
-
- Impl(const Action<VoidResult>& action1, const Action<F>& action2)
- : action1_(action1), action2_(action2) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- action1_.Perform(args);
- return action2_.Perform(args);
- }
-
- private:
- const Action<VoidResult> action1_;
- const Action<F> action2_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- Action1 action1_;
- Action2 action2_;
-
- GTEST_DISALLOW_ASSIGN_(DoBothAction);
-};
-
-} // namespace internal
-
-// An Unused object can be implicitly constructed from ANY value.
-// This is handy when defining actions that ignore some or all of the
-// mock function arguments. For example, given
-//
-// MOCK_METHOD3(Foo, double(const string& label, double x, double y));
-// MOCK_METHOD3(Bar, double(int index, double x, double y));
-//
-// instead of
-//
-// double DistanceToOriginWithLabel(const string& label, double x, double y) {
-// return sqrt(x*x + y*y);
-// }
-// double DistanceToOriginWithIndex(int index, double x, double y) {
-// return sqrt(x*x + y*y);
-// }
-// ...
-// EXEPCT_CALL(mock, Foo("abc", _, _))
-// .WillOnce(Invoke(DistanceToOriginWithLabel));
-// EXEPCT_CALL(mock, Bar(5, _, _))
-// .WillOnce(Invoke(DistanceToOriginWithIndex));
-//
-// you could write
-//
-// // We can declare any uninteresting argument as Unused.
-// double DistanceToOrigin(Unused, double x, double y) {
-// return sqrt(x*x + y*y);
-// }
-// ...
-// EXEPCT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin));
-// EXEPCT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin));
-typedef internal::IgnoredValue Unused;
-
-// This constructor allows us to turn an Action<From> object into an
-// Action<To>, as long as To's arguments can be implicitly converted
-// to From's and From's return type cann be implicitly converted to
-// To's.
-template <typename To>
-template <typename From>
-Action<To>::Action(const Action<From>& from)
- : impl_(new internal::ActionAdaptor<To, From>(from)) {}
-
-// Creates an action that returns 'value'. 'value' is passed by value
-// instead of const reference - otherwise Return("string literal")
-// will trigger a compiler error about using array as initializer.
-template <typename R>
-internal::ReturnAction<R> Return(R value) {
- return internal::ReturnAction<R>(value);
-}
-
-// Creates an action that returns NULL.
-inline PolymorphicAction<internal::ReturnNullAction> ReturnNull() {
- return MakePolymorphicAction(internal::ReturnNullAction());
-}
-
-// Creates an action that returns from a void function.
-inline PolymorphicAction<internal::ReturnVoidAction> Return() {
- return MakePolymorphicAction(internal::ReturnVoidAction());
-}
-
-// Creates an action that returns the reference to a variable.
-template <typename R>
-inline internal::ReturnRefAction<R> ReturnRef(R& x) { // NOLINT
- return internal::ReturnRefAction<R>(x);
-}
-
-// Creates an action that returns the reference to a copy of the
-// argument. The copy is created when the action is constructed and
-// lives as long as the action.
-template <typename R>
-inline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) {
- return internal::ReturnRefOfCopyAction<R>(x);
-}
-
-// Creates an action that does the default action for the give mock function.
-inline internal::DoDefaultAction DoDefault() {
- return internal::DoDefaultAction();
-}
-
-// Creates an action that sets the variable pointed by the N-th
-// (0-based) function argument to 'value'.
-template <size_t N, typename T>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value> >
-SetArgPointee(const T& x) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value>(x));
-}
-
-#if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN)
-// This overload allows SetArgPointee() to accept a string literal.
-// GCC prior to the version 4.0 and Symbian C++ compiler cannot distinguish
-// this overload from the templated version and emit a compile error.
-template <size_t N>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<N, const char*, false> >
-SetArgPointee(const char* p) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, const char*, false>(p));
-}
-
-template <size_t N>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<N, const wchar_t*, false> >
-SetArgPointee(const wchar_t* p) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, const wchar_t*, false>(p));
-}
-#endif
-
-// The following version is DEPRECATED.
-template <size_t N, typename T>
-PolymorphicAction<
- internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value> >
-SetArgumentPointee(const T& x) {
- return MakePolymorphicAction(internal::SetArgumentPointeeAction<
- N, T, internal::IsAProtocolMessage<T>::value>(x));
-}
-
-// Creates an action that sets a pointer referent to a given value.
-template <typename T1, typename T2>
-PolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {
- return MakePolymorphicAction(internal::AssignAction<T1, T2>(ptr, val));
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Creates an action that sets errno and returns the appropriate error.
-template <typename T>
-PolymorphicAction<internal::SetErrnoAndReturnAction<T> >
-SetErrnoAndReturn(int errval, T result) {
- return MakePolymorphicAction(
- internal::SetErrnoAndReturnAction<T>(errval, result));
-}
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Various overloads for InvokeWithoutArgs().
-
-// Creates an action that invokes 'function_impl' with no argument.
-template <typename FunctionImpl>
-PolymorphicAction<internal::InvokeWithoutArgsAction<FunctionImpl> >
-InvokeWithoutArgs(FunctionImpl function_impl) {
- return MakePolymorphicAction(
- internal::InvokeWithoutArgsAction<FunctionImpl>(function_impl));
-}
-
-// Creates an action that invokes the given method on the given object
-// with no argument.
-template <class Class, typename MethodPtr>
-PolymorphicAction<internal::InvokeMethodWithoutArgsAction<Class, MethodPtr> >
-InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) {
- return MakePolymorphicAction(
- internal::InvokeMethodWithoutArgsAction<Class, MethodPtr>(
- obj_ptr, method_ptr));
-}
-
-// Creates an action that performs an_action and throws away its
-// result. In other words, it changes the return type of an_action to
-// void. an_action MUST NOT return void, or the code won't compile.
-template <typename A>
-inline internal::IgnoreResultAction<A> IgnoreResult(const A& an_action) {
- return internal::IgnoreResultAction<A>(an_action);
-}
-
-// Creates a reference wrapper for the given L-value. If necessary,
-// you can explicitly specify the type of the reference. For example,
-// suppose 'derived' is an object of type Derived, ByRef(derived)
-// would wrap a Derived&. If you want to wrap a const Base& instead,
-// where Base is a base class of Derived, just write:
-//
-// ByRef<const Base>(derived)
-template <typename T>
-inline internal::ReferenceWrapper<T> ByRef(T& l_value) { // NOLINT
- return internal::ReferenceWrapper<T>(l_value);
-}
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-cardinalities.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-cardinalities.h
deleted file mode 100644
index 954a86ea5..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-cardinalities.h
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used cardinalities. More
-// cardinalities can be defined by the user implementing the
-// CardinalityInterface interface if necessary.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-
-#include <limits.h>
-#include <ostream> // NOLINT
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-
-// To implement a cardinality Foo, define:
-// 1. a class FooCardinality that implements the
-// CardinalityInterface interface, and
-// 2. a factory function that creates a Cardinality object from a
-// const FooCardinality*.
-//
-// The two-level delegation design follows that of Matcher, providing
-// consistency for extension developers. It also eases ownership
-// management as Cardinality objects can now be copied like plain values.
-
-// The implementation of a cardinality.
-class CardinalityInterface {
- public:
- virtual ~CardinalityInterface() {}
-
- // Conservative estimate on the lower/upper bound of the number of
- // calls allowed.
- virtual int ConservativeLowerBound() const { return 0; }
- virtual int ConservativeUpperBound() const { return INT_MAX; }
-
- // Returns true iff call_count calls will satisfy this cardinality.
- virtual bool IsSatisfiedByCallCount(int call_count) const = 0;
-
- // Returns true iff call_count calls will saturate this cardinality.
- virtual bool IsSaturatedByCallCount(int call_count) const = 0;
-
- // Describes self to an ostream.
- virtual void DescribeTo(::std::ostream* os) const = 0;
-};
-
-// A Cardinality is a copyable and IMMUTABLE (except by assignment)
-// object that specifies how many times a mock function is expected to
-// be called. The implementation of Cardinality is just a linked_ptr
-// to const CardinalityInterface, so copying is fairly cheap.
-// Don't inherit from Cardinality!
-class Cardinality {
- public:
- // Constructs a null cardinality. Needed for storing Cardinality
- // objects in STL containers.
- Cardinality() {}
-
- // Constructs a Cardinality from its implementation.
- explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
-
- // Conservative estimate on the lower/upper bound of the number of
- // calls allowed.
- int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }
- int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); }
-
- // Returns true iff call_count calls will satisfy this cardinality.
- bool IsSatisfiedByCallCount(int call_count) const {
- return impl_->IsSatisfiedByCallCount(call_count);
- }
-
- // Returns true iff call_count calls will saturate this cardinality.
- bool IsSaturatedByCallCount(int call_count) const {
- return impl_->IsSaturatedByCallCount(call_count);
- }
-
- // Returns true iff call_count calls will over-saturate this
- // cardinality, i.e. exceed the maximum number of allowed calls.
- bool IsOverSaturatedByCallCount(int call_count) const {
- return impl_->IsSaturatedByCallCount(call_count) &&
- !impl_->IsSatisfiedByCallCount(call_count);
- }
-
- // Describes self to an ostream
- void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
-
- // Describes the given actual call count to an ostream.
- static void DescribeActualCallCountTo(int actual_call_count,
- ::std::ostream* os);
- private:
- internal::linked_ptr<const CardinalityInterface> impl_;
-};
-
-// Creates a cardinality that allows at least n calls.
-Cardinality AtLeast(int n);
-
-// Creates a cardinality that allows at most n calls.
-Cardinality AtMost(int n);
-
-// Creates a cardinality that allows any number of calls.
-Cardinality AnyNumber();
-
-// Creates a cardinality that allows between min and max calls.
-Cardinality Between(int min, int max);
-
-// Creates a cardinality that allows exactly n calls.
-Cardinality Exactly(int n);
-
-// Creates a cardinality from its implementation.
-inline Cardinality MakeCardinality(const CardinalityInterface* c) {
- return Cardinality(c);
-}
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h
deleted file mode 100644
index 635bb5953..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h
+++ /dev/null
@@ -1,2419 +0,0 @@
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic actions.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-
-#include "gmock/gmock-actions.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-namespace internal {
-
-// InvokeHelper<F> knows how to unpack an N-tuple and invoke an N-ary
-// function or method with the unpacked values, where F is a function
-// type that takes N arguments.
-template <typename Result, typename ArgumentTuple>
-class InvokeHelper;
-
-template <typename R>
-class InvokeHelper<R, ::std::tr1::tuple<> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<>&) {
- return function();
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<>&) {
- return (obj_ptr->*method_ptr)();
- }
-};
-
-template <typename R, typename A1>
-class InvokeHelper<R, ::std::tr1::tuple<A1> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1>& args) {
- using ::std::tr1::get;
- return function(get<0>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args));
- }
-};
-
-template <typename R, typename A1, typename A2>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2,
- A3>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3,
- A4>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6,
- A7>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7, A8>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7,
- A8>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7, A8, A9>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
- A9>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args),
- get<8>(args));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9,
- typename A10>
-class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
- A10> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
- A5, A6, A7, A8, A9, A10>& args) {
- using ::std::tr1::get;
- return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
- get<9>(args));
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
- A9, A10>& args) {
- using ::std::tr1::get;
- return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
- get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args),
- get<8>(args), get<9>(args));
- }
-};
-
-// CallableHelper has static methods for invoking "callables",
-// i.e. function pointers and functors. It uses overloading to
-// provide a uniform interface for invoking different kinds of
-// callables. In particular, you can use:
-//
-// CallableHelper<R>::Call(callable, a1, a2, ..., an)
-//
-// to invoke an n-ary callable, where R is its return type. If an
-// argument, say a2, needs to be passed by reference, you should write
-// ByRef(a2) instead of a2 in the above expression.
-template <typename R>
-class CallableHelper {
- public:
- // Calls a nullary callable.
- template <typename Function>
- static R Call(Function function) { return function(); }
-
- // Calls a unary callable.
-
- // We deliberately pass a1 by value instead of const reference here
- // in case it is a C-string literal. If we had declared the
- // parameter as 'const A1& a1' and write Call(function, "Hi"), the
- // compiler would've thought A1 is 'char[3]', which causes trouble
- // when you need to copy a value of type A1. By declaring the
- // parameter as 'A1 a1', the compiler will correctly infer that A1
- // is 'const char*' when it sees Call(function, "Hi").
- //
- // Since this function is defined inline, the compiler can get rid
- // of the copying of the arguments. Therefore the performance won't
- // be hurt.
- template <typename Function, typename A1>
- static R Call(Function function, A1 a1) { return function(a1); }
-
- // Calls a binary callable.
- template <typename Function, typename A1, typename A2>
- static R Call(Function function, A1 a1, A2 a2) {
- return function(a1, a2);
- }
-
- // Calls a ternary callable.
- template <typename Function, typename A1, typename A2, typename A3>
- static R Call(Function function, A1 a1, A2 a2, A3 a3) {
- return function(a1, a2, a3);
- }
-
- // Calls a 4-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4) {
- return function(a1, a2, a3, a4);
- }
-
- // Calls a 5-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
- return function(a1, a2, a3, a4, a5);
- }
-
- // Calls a 6-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
- return function(a1, a2, a3, a4, a5, a6);
- }
-
- // Calls a 7-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7) {
- return function(a1, a2, a3, a4, a5, a6, a7);
- }
-
- // Calls a 8-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7, A8 a8) {
- return function(a1, a2, a3, a4, a5, a6, a7, a8);
- }
-
- // Calls a 9-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8,
- typename A9>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7, A8 a8, A9 a9) {
- return function(a1, a2, a3, a4, a5, a6, a7, a8, a9);
- }
-
- // Calls a 10-ary callable.
- template <typename Function, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8,
- typename A9, typename A10>
- static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
- A7 a7, A8 a8, A9 a9, A10 a10) {
- return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
- }
-
-}; // class CallableHelper
-
-// An INTERNAL macro for extracting the type of a tuple field. It's
-// subject to change without notice - DO NOT USE IN USER CODE!
-#define GMOCK_FIELD_(Tuple, N) \
- typename ::std::tr1::tuple_element<N, Tuple>::type
-
-// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
-// type of an n-ary function whose i-th (1-based) argument type is the
-// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
-// type, and whose return type is Result. For example,
-// SelectArgs<int, ::std::tr1::tuple<bool, char, double, long>, 0, 3>::type
-// is int(bool, long).
-//
-// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
-// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
-// For example,
-// SelectArgs<int, ::std::tr1::tuple<bool, char, double>, 2, 0>::Select(
-// ::std::tr1::make_tuple(true, 'a', 2.5))
-// returns ::std::tr1::tuple (2.5, true).
-//
-// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
-// in the range [0, 10]. Duplicates are allowed and they don't have
-// to be in an ascending or descending order.
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7, int k8, int k9, int k10>
-class SelectArgs {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
- GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9),
- GMOCK_FIELD_(ArgumentTuple, k10));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
- get<k8>(args), get<k9>(args), get<k10>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple>
-class SelectArgs<Result, ArgumentTuple,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type();
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& /* args */) {
- using ::std::tr1::get;
- return SelectedArgs();
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1>
-class SelectArgs<Result, ArgumentTuple,
- k1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, -1, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, -1, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, -1, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, -1, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7, int k8>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, k8, -1, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
- GMOCK_FIELD_(ArgumentTuple, k8));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
- get<k8>(args));
- }
-};
-
-template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
- int k4, int k5, int k6, int k7, int k8, int k9>
-class SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, k8, k9, -1> {
- public:
- typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
- GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
- GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
- GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
- GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9));
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
- get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
- get<k8>(args), get<k9>(args));
- }
-};
-
-#undef GMOCK_FIELD_
-
-// Implements the WithArgs action.
-template <typename InnerAction, int k1 = -1, int k2 = -1, int k3 = -1,
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
- int k9 = -1, int k10 = -1>
-class WithArgsAction {
- public:
- explicit WithArgsAction(const InnerAction& action) : action_(action) {}
-
- template <typename F>
- operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
-
- private:
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const InnerAction& action) : action_(action) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return action_.Perform(SelectArgs<Result, ArgumentTuple, k1, k2, k3, k4,
- k5, k6, k7, k8, k9, k10>::Select(args));
- }
-
- private:
- typedef typename SelectArgs<Result, ArgumentTuple,
- k1, k2, k3, k4, k5, k6, k7, k8, k9, k10>::type InnerFunctionType;
-
- Action<InnerFunctionType> action_;
- };
-
- const InnerAction action_;
-
- GTEST_DISALLOW_ASSIGN_(WithArgsAction);
-};
-
-// A macro from the ACTION* family (defined later in this file)
-// defines an action that can be used in a mock function. Typically,
-// these actions only care about a subset of the arguments of the mock
-// function. For example, if such an action only uses the second
-// argument, it can be used in any mock function that takes >= 2
-// arguments where the type of the second argument is compatible.
-//
-// Therefore, the action implementation must be prepared to take more
-// arguments than it needs. The ExcessiveArg type is used to
-// represent those excessive arguments. In order to keep the compiler
-// error messages tractable, we define it in the testing namespace
-// instead of testing::internal. However, this is an INTERNAL TYPE
-// and subject to change without notice, so a user MUST NOT USE THIS
-// TYPE DIRECTLY.
-struct ExcessiveArg {};
-
-// A helper class needed for implementing the ACTION* macros.
-template <typename Result, class Impl>
-class ActionHelper {
- public:
- static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0>(args, get<0>(args),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1>(args, get<0>(args),
- get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2>(args, get<0>(args),
- get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2,
- A3>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args, get<0>(args),
- get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3,
- A4>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
- ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
- get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,
- get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
- get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6, A7>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,
- A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6, A7, A8>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,
- A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
- ExcessiveArg());
- }
-
- template <typename A0, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
- static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
- A5, A6, A7, A8, A9>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,
- A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
- get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
- get<9>(args));
- }
-};
-
-} // namespace internal
-
-// Various overloads for Invoke().
-
-// WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
-// the selected arguments of the mock function to an_action and
-// performs it. It serves as an adaptor between actions with
-// different argument lists. C++ doesn't support default arguments for
-// function templates, so we have to overload it.
-template <int k1, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1>(action);
-}
-
-template <int k1, int k2, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2>(action);
-}
-
-template <int k1, int k2, int k3, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3>(action);
-}
-
-template <int k1, int k2, int k3, int k4, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
- typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6,
- k7>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7,
- k8>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8, k9>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
- k9>(action);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, int k10, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
- k9, k10>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
- k9, k10>(action);
-}
-
-// Creates an action that does actions a1, a2, ..., sequentially in
-// each invocation.
-template <typename Action1, typename Action2>
-inline internal::DoBothAction<Action1, Action2>
-DoAll(Action1 a1, Action2 a2) {
- return internal::DoBothAction<Action1, Action2>(a1, a2);
-}
-
-template <typename Action1, typename Action2, typename Action3>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- Action3> >
-DoAll(Action1 a1, Action2 a2, Action3 a3) {
- return DoAll(a1, DoAll(a2, a3));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, Action4> > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) {
- return DoAll(a1, DoAll(a2, a3, a4));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- Action5> > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) {
- return DoAll(a1, DoAll(a2, a3, a4, a5));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, Action6> > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- Action7> > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7,
- typename Action8>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- internal::DoBothAction<Action7, Action8> > > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7, Action8 a8) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7,
- typename Action8, typename Action9>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- internal::DoBothAction<Action7, internal::DoBothAction<Action8,
- Action9> > > > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7, Action8 a8, Action9 a9) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-template <typename Action1, typename Action2, typename Action3,
- typename Action4, typename Action5, typename Action6, typename Action7,
- typename Action8, typename Action9, typename Action10>
-inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
- internal::DoBothAction<Action3, internal::DoBothAction<Action4,
- internal::DoBothAction<Action5, internal::DoBothAction<Action6,
- internal::DoBothAction<Action7, internal::DoBothAction<Action8,
- internal::DoBothAction<Action9, Action10> > > > > > > > >
-DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
- Action7 a7, Action8 a8, Action9 a9, Action10 a10) {
- return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10));
-}
-
-} // namespace testing
-
-// The ACTION* family of macros can be used in a namespace scope to
-// define custom actions easily. The syntax:
-//
-// ACTION(name) { statements; }
-//
-// will define an action with the given name that executes the
-// statements. The value returned by the statements will be used as
-// the return value of the action. Inside the statements, you can
-// refer to the K-th (0-based) argument of the mock function by
-// 'argK', and refer to its type by 'argK_type'. For example:
-//
-// ACTION(IncrementArg1) {
-// arg1_type temp = arg1;
-// return ++(*temp);
-// }
-//
-// allows you to write
-//
-// ...WillOnce(IncrementArg1());
-//
-// You can also refer to the entire argument tuple and its type by
-// 'args' and 'args_type', and refer to the mock function type and its
-// return type by 'function_type' and 'return_type'.
-//
-// Note that you don't need to specify the types of the mock function
-// arguments. However rest assured that your code is still type-safe:
-// you'll get a compiler error if *arg1 doesn't support the ++
-// operator, or if the type of ++(*arg1) isn't compatible with the
-// mock function's return type, for example.
-//
-// Sometimes you'll want to parameterize the action. For that you can use
-// another macro:
-//
-// ACTION_P(name, param_name) { statements; }
-//
-// For example:
-//
-// ACTION_P(Add, n) { return arg0 + n; }
-//
-// will allow you to write:
-//
-// ...WillOnce(Add(5));
-//
-// Note that you don't need to provide the type of the parameter
-// either. If you need to reference the type of a parameter named
-// 'foo', you can write 'foo_type'. For example, in the body of
-// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type
-// of 'n'.
-//
-// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support
-// multi-parameter actions.
-//
-// For the purpose of typing, you can view
-//
-// ACTION_Pk(Foo, p1, ..., pk) { ... }
-//
-// as shorthand for
-//
-// template <typename p1_type, ..., typename pk_type>
-// FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// In particular, you can provide the template type arguments
-// explicitly when invoking Foo(), as in Foo<long, bool>(5, false);
-// although usually you can rely on the compiler to infer the types
-// for you automatically. You can assign the result of expression
-// Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,
-// pk_type>. This can be useful when composing actions.
-//
-// You can also overload actions with different numbers of parameters:
-//
-// ACTION_P(Plus, a) { ... }
-// ACTION_P2(Plus, a, b) { ... }
-//
-// While it's tempting to always use the ACTION* macros when defining
-// a new action, you should also consider implementing ActionInterface
-// or using MakePolymorphicAction() instead, especially if you need to
-// use the action a lot. While these approaches require more work,
-// they give you more control on the types of the mock function
-// arguments and the action parameters, which in general leads to
-// better compiler error messages that pay off in the long run. They
-// also allow overloading actions based on parameter types (as opposed
-// to just based on the number of parameters).
-//
-// CAVEAT:
-//
-// ACTION*() can only be used in a namespace scope. The reason is
-// that C++ doesn't yet allow function-local types to be used to
-// instantiate templates. The up-coming C++0x standard will fix this.
-// Once that's done, we'll consider supporting using ACTION*() inside
-// a function.
-//
-// MORE INFORMATION:
-//
-// To learn more about using these macros, please search for 'ACTION'
-// on http://code.google.com/p/googlemock/wiki/CookBook.
-
-// An internal macro needed for implementing ACTION*().
-#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
- const args_type& args GTEST_ATTRIBUTE_UNUSED_,\
- arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_,\
- arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_,\
- arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_,\
- arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_,\
- arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_,\
- arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_,\
- arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_,\
- arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_,\
- arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_,\
- arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_
-
-// Sometimes you want to give an action explicit template parameters
-// that cannot be inferred from its value parameters. ACTION() and
-// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that
-// and can be viewed as an extension to ACTION() and ACTION_P*().
-//
-// The syntax:
-//
-// ACTION_TEMPLATE(ActionName,
-// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),
-// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }
-//
-// defines an action template that takes m explicit template
-// parameters and n value parameters. name_i is the name of the i-th
-// template parameter, and kind_i specifies whether it's a typename,
-// an integral constant, or a template. p_i is the name of the i-th
-// value parameter.
-//
-// Example:
-//
-// // DuplicateArg<k, T>(output) converts the k-th argument of the mock
-// // function to type T and copies it to *output.
-// ACTION_TEMPLATE(DuplicateArg,
-// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
-// AND_1_VALUE_PARAMS(output)) {
-// *output = T(std::tr1::get<k>(args));
-// }
-// ...
-// int n;
-// EXPECT_CALL(mock, Foo(_, _))
-// .WillOnce(DuplicateArg<1, unsigned char>(&n));
-//
-// To create an instance of an action template, write:
-//
-// ActionName<t1, ..., t_m>(v1, ..., v_n)
-//
-// where the ts are the template arguments and the vs are the value
-// arguments. The value argument types are inferred by the compiler.
-// If you want to explicitly specify the value argument types, you can
-// provide additional template arguments:
-//
-// ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)
-//
-// where u_i is the desired type of v_i.
-//
-// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
-// number of value parameters, but not on the number of template
-// parameters. Without the restriction, the meaning of the following
-// is unclear:
-//
-// OverloadedAction<int, bool>(x);
-//
-// Are we using a single-template-parameter action where 'bool' refers
-// to the type of x, or are we using a two-template-parameter action
-// where the compiler is asked to infer the type of x?
-//
-// Implementation notes:
-//
-// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and
-// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for
-// implementing ACTION_TEMPLATE. The main trick we use is to create
-// new macro invocations when expanding a macro. For example, we have
-//
-// #define ACTION_TEMPLATE(name, template_params, value_params)
-// ... GMOCK_INTERNAL_DECL_##template_params ...
-//
-// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)
-// to expand to
-//
-// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...
-//
-// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the
-// preprocessor will continue to expand it to
-//
-// ... typename T ...
-//
-// This technique conforms to the C++ standard and is portable. It
-// allows us to implement action templates using O(N) code, where N is
-// the maximum number of template/value parameters supported. Without
-// using it, we'd have to devote O(N^2) amount of code to implement all
-// combinations of m and n.
-
-// Declares the template parameters.
-#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0
-#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1) kind0 name0, kind1 name1
-#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2) kind0 name0, kind1 name1, kind2 name2
-#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
- kind3 name3
-#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
- kind2 name2, kind3 name3, kind4 name4
-#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
- kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5
-#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
- kind5 name5, kind6 name6
-#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
- kind4 name4, kind5 name5, kind6 name6, kind7 name7
-#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
- kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
- kind8 name8
-#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
- kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
- kind6 name6, kind7 name7, kind8 name8, kind9 name9
-
-// Lists the template parameters.
-#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0
-#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1) name0, name1
-#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2) name0, name1, name2
-#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3) name0, name1, name2, name3
-#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
- name4
-#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
- name2, name3, name4, name5
-#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6) name0, name1, name2, name3, name4, name5, name6
-#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7
-#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
- kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
- kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
- name6, name7, name8
-#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
- name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
- name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
- name3, name4, name5, name6, name7, name8, name9
-
-// Declares the types of value parameters.
-#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \
- typename p0##_type, typename p1##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \
- typename p0##_type, typename p1##_type, typename p2##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
- typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
- typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
- typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
- typename p2##_type, typename p3##_type, typename p4##_type, \
- typename p5##_type, typename p6##_type, typename p7##_type, \
- typename p8##_type, typename p9##_type
-
-// Initializes the value parameters.
-#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\
- ()
-#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\
- (p0##_type gmock_p0) : p0(gmock_p0)
-#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\
- (p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), p1(gmock_p1)
-#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\
- (p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2)
-#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3)
-#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4)
-#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5)
-#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6)
-#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7)
-#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8)
-#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9)\
- (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
- p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8), p9(gmock_p9)
-
-// Declares the fields for storing the value parameters.
-#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;
-#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \
- p1##_type p1;
-#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \
- p1##_type p1; p2##_type p2;
-#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \
- p1##_type p1; p2##_type p2; p3##_type p3;
-#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
- p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;
-#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
- p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
- p5##_type p5;
-#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
- p5##_type p5; p6##_type p6;
-#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
- p5##_type p5; p6##_type p6; p7##_type p7;
-#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
- p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;
-#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
- p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
- p9##_type p9;
-
-// Lists the value parameters.
-#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0
-#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1
-#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2
-#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3
-#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \
- p2, p3, p4
-#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \
- p1, p2, p3, p4, p5
-#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) p0, p1, p2, p3, p4, p5, p6
-#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) p0, p1, p2, p3, p4, p5, p6, p7
-#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8
-#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9
-
-// Lists the value parameter types.
-#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \
- p1##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \
- p1##_type, p2##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
- p0##_type, p1##_type, p2##_type, p3##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
- p0##_type, p1##_type, p2##_type, p3##_type, p4##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
- p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
- p6##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, p8##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, p8##_type, p9##_type
-
-// Declares the value parameters.
-#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0
-#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \
- p1##_type p1
-#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \
- p1##_type p1, p2##_type p2
-#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \
- p1##_type p1, p2##_type p2, p3##_type p3
-#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
- p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4
-#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
- p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
- p5##_type p5
-#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
- p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
- p5##_type p5, p6##_type p6
-#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
- p5##_type p5, p6##_type p6, p7##_type p7
-#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8
-#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
- p9##_type p9
-
-// The suffix of the class template implementing the action template.
-#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P
-#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
-#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3
-#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4
-#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5
-#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6
-#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7
-#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7) P8
-#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8) P9
-#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
- p7, p8, p9) P10
-
-// The name of the class template implementing the action template.
-#define GMOCK_ACTION_CLASS_(name, value_params)\
- GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
-
-#define ACTION_TEMPLATE(name, template_params, value_params)\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- class GMOCK_ACTION_CLASS_(name, value_params) {\
- public:\
- GMOCK_ACTION_CLASS_(name, value_params)\
- GMOCK_INTERNAL_INIT_##value_params {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- GMOCK_INTERNAL_DEFN_##value_params\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(\
- new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\
- }\
- GMOCK_INTERNAL_DEFN_##value_params\
- private:\
- GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\
- };\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- inline GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\
- GMOCK_INTERNAL_DECL_##value_params) {\
- return GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params>(\
- GMOCK_INTERNAL_LIST_##value_params);\
- }\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type,\
- typename arg3_type, typename arg4_type, typename arg5_type,\
- typename arg6_type, typename arg7_type, typename arg8_type,\
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\
- gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION(name)\
- class name##Action {\
- public:\
- name##Action() {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl() {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>());\
- }\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##Action);\
- };\
- inline name##Action name() {\
- return name##Action();\
- }\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##Action::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P(name, p0)\
- template <typename p0##_type>\
- class name##ActionP {\
- public:\
- name##ActionP(p0##_type gmock_p0) : p0(gmock_p0) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- explicit gmock_Impl(p0##_type gmock_p0) : p0(gmock_p0) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0));\
- }\
- p0##_type p0;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP);\
- };\
- template <typename p0##_type>\
- inline name##ActionP<p0##_type> name(p0##_type p0) {\
- return name##ActionP<p0##_type>(p0);\
- }\
- template <typename p0##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP<p0##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P2(name, p0, p1)\
- template <typename p0##_type, typename p1##_type>\
- class name##ActionP2 {\
- public:\
- name##ActionP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
- p1(gmock_p1) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
- p1(gmock_p1) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP2);\
- };\
- template <typename p0##_type, typename p1##_type>\
- inline name##ActionP2<p0##_type, p1##_type> name(p0##_type p0, \
- p1##_type p1) {\
- return name##ActionP2<p0##_type, p1##_type>(p0, p1);\
- }\
- template <typename p0##_type, typename p1##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP2<p0##_type, p1##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P3(name, p0, p1, p2)\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- class name##ActionP3 {\
- public:\
- name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP3);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- inline name##ActionP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2) {\
- return name##ActionP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP3<p0##_type, p1##_type, \
- p2##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P4(name, p0, p1, p2, p3)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- class name##ActionP4 {\
- public:\
- name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP4);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- inline name##ActionP4<p0##_type, p1##_type, p2##_type, \
- p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3) {\
- return name##ActionP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, p1, \
- p2, p3);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP4<p0##_type, p1##_type, p2##_type, \
- p3##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P5(name, p0, p1, p2, p3, p4)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- class name##ActionP5 {\
- public:\
- name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, \
- p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), \
- p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP5);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- inline name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4) {\
- return name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>(p0, p1, p2, p3, p4);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- class name##ActionP6 {\
- public:\
- name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP6);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- inline name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3, p4##_type p4, p5##_type p5) {\
- return name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- class name##ActionP7 {\
- public:\
- name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
- p6(gmock_p6) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP7);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- inline name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
- p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6) {\
- return name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- class name##ActionP8 {\
- public:\
- name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, \
- p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), \
- p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \
- p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6, p7));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP8);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- inline name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6, p7##_type p7) {\
- return name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
- p6, p7);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, \
- p7##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- class name##ActionP9 {\
- public:\
- name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP9);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- inline name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, \
- p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
- p8##_type p8) {\
- return name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
- p3, p4, p5, p6, p7, p8);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, \
- p8##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- class name##ActionP10 {\
- public:\
- name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
- p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
- p6, p7, p8, p9));\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##ActionP10);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- inline name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
- p9##_type p9) {\
- return name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
- p1, p2, p3, p4, p5, p6, p7, p8, p9);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type, \
- typename arg3_type, typename arg4_type, typename arg5_type, \
- typename arg6_type, typename arg7_type, typename arg8_type, \
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type>::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-// TODO(wan@google.com): move the following to a different .h file
-// such that we don't have to run 'pump' every time the code is
-// updated.
-namespace testing {
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Various overloads for InvokeArgument<N>().
-//
-// The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
-// (0-based) argument, which must be a k-ary callable, of the mock
-// function, with arguments a1, a2, ..., a_k.
-//
-// Notes:
-//
-// 1. The arguments are passed by value by default. If you need to
-// pass an argument by reference, wrap it inside ByRef(). For
-// example,
-//
-// InvokeArgument<1>(5, string("Hello"), ByRef(foo))
-//
-// passes 5 and string("Hello") by value, and passes foo by
-// reference.
-//
-// 2. If the callable takes an argument by reference but ByRef() is
-// not used, it will receive the reference to a copy of the value,
-// instead of the original value. For example, when the 0-th
-// argument of the mock function takes a const string&, the action
-//
-// InvokeArgument<0>(string("Hello"))
-//
-// makes a copy of the temporary string("Hello") object and passes a
-// reference of the copy, instead of the original temporary object,
-// to the callable. This makes it easy for a user to define an
-// InvokeArgument action from temporary values and have it performed
-// later.
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args));
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(p0)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_2_VALUE_PARAMS(p0, p1)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_3_VALUE_PARAMS(p0, p1, p2)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
-}
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
-}
-
-// Various overloads for ReturnNew<T>().
-//
-// The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new
-// instance of type T, constructed on the heap with constructor arguments
-// a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_0_VALUE_PARAMS()) {
- return new T();
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_1_VALUE_PARAMS(p0)) {
- return new T(p0);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_2_VALUE_PARAMS(p0, p1)) {
- return new T(p0, p1);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_3_VALUE_PARAMS(p0, p1, p2)) {
- return new T(p0, p1, p2);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
- return new T(p0, p1, p2, p3);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
- return new T(p0, p1, p2, p3, p4);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
- return new T(p0, p1, p2, p3, p4, p5);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
- return new T(p0, p1, p2, p3, p4, p5, p6);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
- return new T(p0, p1, p2, p3, p4, p5, p6, p7);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
- return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8);
-}
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
- return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h.pump
deleted file mode 100644
index 001fd7d01..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-actions.h.pump
+++ /dev/null
@@ -1,825 +0,0 @@
-$$ -*- mode: c++; -*-
-$$ This is a Pump source file. Please use Pump to convert it to
-$$ gmock-generated-actions.h.
-$$
-$var n = 10 $$ The maximum arity we support.
-$$}} This meta comment fixes auto-indentation in editors.
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic actions.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
-
-#include "gmock/gmock-actions.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-namespace internal {
-
-// InvokeHelper<F> knows how to unpack an N-tuple and invoke an N-ary
-// function or method with the unpacked values, where F is a function
-// type that takes N arguments.
-template <typename Result, typename ArgumentTuple>
-class InvokeHelper;
-
-
-$range i 0..n
-$for i [[
-$range j 1..i
-$var types = [[$for j [[, typename A$j]]]]
-$var as = [[$for j, [[A$j]]]]
-$var args = [[$if i==0 [[]] $else [[ args]]]]
-$var import = [[$if i==0 [[]] $else [[
- using ::std::tr1::get;
-
-]]]]
-$var gets = [[$for j, [[get<$(j - 1)>(args)]]]]
-template <typename R$types>
-class InvokeHelper<R, ::std::tr1::tuple<$as> > {
- public:
- template <typename Function>
- static R Invoke(Function function, const ::std::tr1::tuple<$as>&$args) {
-$import return function($gets);
- }
-
- template <class Class, typename MethodPtr>
- static R InvokeMethod(Class* obj_ptr,
- MethodPtr method_ptr,
- const ::std::tr1::tuple<$as>&$args) {
-$import return (obj_ptr->*method_ptr)($gets);
- }
-};
-
-
-]]
-// CallableHelper has static methods for invoking "callables",
-// i.e. function pointers and functors. It uses overloading to
-// provide a uniform interface for invoking different kinds of
-// callables. In particular, you can use:
-//
-// CallableHelper<R>::Call(callable, a1, a2, ..., an)
-//
-// to invoke an n-ary callable, where R is its return type. If an
-// argument, say a2, needs to be passed by reference, you should write
-// ByRef(a2) instead of a2 in the above expression.
-template <typename R>
-class CallableHelper {
- public:
- // Calls a nullary callable.
- template <typename Function>
- static R Call(Function function) { return function(); }
-
- // Calls a unary callable.
-
- // We deliberately pass a1 by value instead of const reference here
- // in case it is a C-string literal. If we had declared the
- // parameter as 'const A1& a1' and write Call(function, "Hi"), the
- // compiler would've thought A1 is 'char[3]', which causes trouble
- // when you need to copy a value of type A1. By declaring the
- // parameter as 'A1 a1', the compiler will correctly infer that A1
- // is 'const char*' when it sees Call(function, "Hi").
- //
- // Since this function is defined inline, the compiler can get rid
- // of the copying of the arguments. Therefore the performance won't
- // be hurt.
- template <typename Function, typename A1>
- static R Call(Function function, A1 a1) { return function(a1); }
-
-$range i 2..n
-$for i
-[[
-$var arity = [[$if i==2 [[binary]] $elif i==3 [[ternary]] $else [[$i-ary]]]]
-
- // Calls a $arity callable.
-
-$range j 1..i
-$var typename_As = [[$for j, [[typename A$j]]]]
-$var Aas = [[$for j, [[A$j a$j]]]]
-$var as = [[$for j, [[a$j]]]]
-$var typename_Ts = [[$for j, [[typename T$j]]]]
-$var Ts = [[$for j, [[T$j]]]]
- template <typename Function, $typename_As>
- static R Call(Function function, $Aas) {
- return function($as);
- }
-
-]]
-
-}; // class CallableHelper
-
-// An INTERNAL macro for extracting the type of a tuple field. It's
-// subject to change without notice - DO NOT USE IN USER CODE!
-#define GMOCK_FIELD_(Tuple, N) \
- typename ::std::tr1::tuple_element<N, Tuple>::type
-
-$range i 1..n
-
-// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
-// type of an n-ary function whose i-th (1-based) argument type is the
-// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
-// type, and whose return type is Result. For example,
-// SelectArgs<int, ::std::tr1::tuple<bool, char, double, long>, 0, 3>::type
-// is int(bool, long).
-//
-// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
-// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
-// For example,
-// SelectArgs<int, ::std::tr1::tuple<bool, char, double>, 2, 0>::Select(
-// ::std::tr1::make_tuple(true, 'a', 2.5))
-// returns ::std::tr1::tuple (2.5, true).
-//
-// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
-// in the range [0, $n]. Duplicates are allowed and they don't have
-// to be in an ascending or descending order.
-
-template <typename Result, typename ArgumentTuple, $for i, [[int k$i]]>
-class SelectArgs {
- public:
- typedef Result type($for i, [[GMOCK_FIELD_(ArgumentTuple, k$i)]]);
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& args) {
- using ::std::tr1::get;
- return SelectedArgs($for i, [[get<k$i>(args)]]);
- }
-};
-
-
-$for i [[
-$range j 1..n
-$range j1 1..i-1
-template <typename Result, typename ArgumentTuple$for j1[[, int k$j1]]>
-class SelectArgs<Result, ArgumentTuple,
- $for j, [[$if j <= i-1 [[k$j]] $else [[-1]]]]> {
- public:
- typedef Result type($for j1, [[GMOCK_FIELD_(ArgumentTuple, k$j1)]]);
- typedef typename Function<type>::ArgumentTuple SelectedArgs;
- static SelectedArgs Select(const ArgumentTuple& [[]]
-$if i == 1 [[/* args */]] $else [[args]]) {
- using ::std::tr1::get;
- return SelectedArgs($for j1, [[get<k$j1>(args)]]);
- }
-};
-
-
-]]
-#undef GMOCK_FIELD_
-
-$var ks = [[$for i, [[k$i]]]]
-
-// Implements the WithArgs action.
-template <typename InnerAction, $for i, [[int k$i = -1]]>
-class WithArgsAction {
- public:
- explicit WithArgsAction(const InnerAction& action) : action_(action) {}
-
- template <typename F>
- operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
-
- private:
- template <typename F>
- class Impl : public ActionInterface<F> {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
- explicit Impl(const InnerAction& action) : action_(action) {}
-
- virtual Result Perform(const ArgumentTuple& args) {
- return action_.Perform(SelectArgs<Result, ArgumentTuple, $ks>::Select(args));
- }
-
- private:
- typedef typename SelectArgs<Result, ArgumentTuple,
- $ks>::type InnerFunctionType;
-
- Action<InnerFunctionType> action_;
- };
-
- const InnerAction action_;
-
- GTEST_DISALLOW_ASSIGN_(WithArgsAction);
-};
-
-// A macro from the ACTION* family (defined later in this file)
-// defines an action that can be used in a mock function. Typically,
-// these actions only care about a subset of the arguments of the mock
-// function. For example, if such an action only uses the second
-// argument, it can be used in any mock function that takes >= 2
-// arguments where the type of the second argument is compatible.
-//
-// Therefore, the action implementation must be prepared to take more
-// arguments than it needs. The ExcessiveArg type is used to
-// represent those excessive arguments. In order to keep the compiler
-// error messages tractable, we define it in the testing namespace
-// instead of testing::internal. However, this is an INTERNAL TYPE
-// and subject to change without notice, so a user MUST NOT USE THIS
-// TYPE DIRECTLY.
-struct ExcessiveArg {};
-
-// A helper class needed for implementing the ACTION* macros.
-template <typename Result, class Impl>
-class ActionHelper {
- public:
-$range i 0..n
-$for i
-
-[[
-$var template = [[$if i==0 [[]] $else [[
-$range j 0..i-1
- template <$for j, [[typename A$j]]>
-]]]]
-$range j 0..i-1
-$var As = [[$for j, [[A$j]]]]
-$var as = [[$for j, [[get<$j>(args)]]]]
-$range k 1..n-i
-$var eas = [[$for k, [[ExcessiveArg()]]]]
-$var arg_list = [[$if (i==0) | (i==n) [[$as$eas]] $else [[$as, $eas]]]]
-$template
- static Result Perform(Impl* impl, const ::std::tr1::tuple<$As>& args) {
- using ::std::tr1::get;
- return impl->template gmock_PerformImpl<$As>(args, $arg_list);
- }
-
-]]
-};
-
-} // namespace internal
-
-// Various overloads for Invoke().
-
-// WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
-// the selected arguments of the mock function to an_action and
-// performs it. It serves as an adaptor between actions with
-// different argument lists. C++ doesn't support default arguments for
-// function templates, so we have to overload it.
-
-$range i 1..n
-$for i [[
-$range j 1..i
-template <$for j [[int k$j, ]]typename InnerAction>
-inline internal::WithArgsAction<InnerAction$for j [[, k$j]]>
-WithArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction$for j [[, k$j]]>(action);
-}
-
-
-]]
-// Creates an action that does actions a1, a2, ..., sequentially in
-// each invocation.
-$range i 2..n
-$for i [[
-$range j 2..i
-$var types = [[$for j, [[typename Action$j]]]]
-$var Aas = [[$for j [[, Action$j a$j]]]]
-
-template <typename Action1, $types>
-$range k 1..i-1
-
-inline $for k [[internal::DoBothAction<Action$k, ]]Action$i$for k [[>]]
-
-DoAll(Action1 a1$Aas) {
-$if i==2 [[
-
- return internal::DoBothAction<Action1, Action2>(a1, a2);
-]] $else [[
-$range j2 2..i
-
- return DoAll(a1, DoAll($for j2, [[a$j2]]));
-]]
-
-}
-
-]]
-
-} // namespace testing
-
-// The ACTION* family of macros can be used in a namespace scope to
-// define custom actions easily. The syntax:
-//
-// ACTION(name) { statements; }
-//
-// will define an action with the given name that executes the
-// statements. The value returned by the statements will be used as
-// the return value of the action. Inside the statements, you can
-// refer to the K-th (0-based) argument of the mock function by
-// 'argK', and refer to its type by 'argK_type'. For example:
-//
-// ACTION(IncrementArg1) {
-// arg1_type temp = arg1;
-// return ++(*temp);
-// }
-//
-// allows you to write
-//
-// ...WillOnce(IncrementArg1());
-//
-// You can also refer to the entire argument tuple and its type by
-// 'args' and 'args_type', and refer to the mock function type and its
-// return type by 'function_type' and 'return_type'.
-//
-// Note that you don't need to specify the types of the mock function
-// arguments. However rest assured that your code is still type-safe:
-// you'll get a compiler error if *arg1 doesn't support the ++
-// operator, or if the type of ++(*arg1) isn't compatible with the
-// mock function's return type, for example.
-//
-// Sometimes you'll want to parameterize the action. For that you can use
-// another macro:
-//
-// ACTION_P(name, param_name) { statements; }
-//
-// For example:
-//
-// ACTION_P(Add, n) { return arg0 + n; }
-//
-// will allow you to write:
-//
-// ...WillOnce(Add(5));
-//
-// Note that you don't need to provide the type of the parameter
-// either. If you need to reference the type of a parameter named
-// 'foo', you can write 'foo_type'. For example, in the body of
-// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type
-// of 'n'.
-//
-// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P$n to support
-// multi-parameter actions.
-//
-// For the purpose of typing, you can view
-//
-// ACTION_Pk(Foo, p1, ..., pk) { ... }
-//
-// as shorthand for
-//
-// template <typename p1_type, ..., typename pk_type>
-// FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// In particular, you can provide the template type arguments
-// explicitly when invoking Foo(), as in Foo<long, bool>(5, false);
-// although usually you can rely on the compiler to infer the types
-// for you automatically. You can assign the result of expression
-// Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,
-// pk_type>. This can be useful when composing actions.
-//
-// You can also overload actions with different numbers of parameters:
-//
-// ACTION_P(Plus, a) { ... }
-// ACTION_P2(Plus, a, b) { ... }
-//
-// While it's tempting to always use the ACTION* macros when defining
-// a new action, you should also consider implementing ActionInterface
-// or using MakePolymorphicAction() instead, especially if you need to
-// use the action a lot. While these approaches require more work,
-// they give you more control on the types of the mock function
-// arguments and the action parameters, which in general leads to
-// better compiler error messages that pay off in the long run. They
-// also allow overloading actions based on parameter types (as opposed
-// to just based on the number of parameters).
-//
-// CAVEAT:
-//
-// ACTION*() can only be used in a namespace scope. The reason is
-// that C++ doesn't yet allow function-local types to be used to
-// instantiate templates. The up-coming C++0x standard will fix this.
-// Once that's done, we'll consider supporting using ACTION*() inside
-// a function.
-//
-// MORE INFORMATION:
-//
-// To learn more about using these macros, please search for 'ACTION'
-// on http://code.google.com/p/googlemock/wiki/CookBook.
-
-$range i 0..n
-$range k 0..n-1
-
-// An internal macro needed for implementing ACTION*().
-#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
- const args_type& args GTEST_ATTRIBUTE_UNUSED_
-$for k [[,\
- arg$k[[]]_type arg$k GTEST_ATTRIBUTE_UNUSED_]]
-
-
-// Sometimes you want to give an action explicit template parameters
-// that cannot be inferred from its value parameters. ACTION() and
-// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that
-// and can be viewed as an extension to ACTION() and ACTION_P*().
-//
-// The syntax:
-//
-// ACTION_TEMPLATE(ActionName,
-// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),
-// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }
-//
-// defines an action template that takes m explicit template
-// parameters and n value parameters. name_i is the name of the i-th
-// template parameter, and kind_i specifies whether it's a typename,
-// an integral constant, or a template. p_i is the name of the i-th
-// value parameter.
-//
-// Example:
-//
-// // DuplicateArg<k, T>(output) converts the k-th argument of the mock
-// // function to type T and copies it to *output.
-// ACTION_TEMPLATE(DuplicateArg,
-// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
-// AND_1_VALUE_PARAMS(output)) {
-// *output = T(std::tr1::get<k>(args));
-// }
-// ...
-// int n;
-// EXPECT_CALL(mock, Foo(_, _))
-// .WillOnce(DuplicateArg<1, unsigned char>(&n));
-//
-// To create an instance of an action template, write:
-//
-// ActionName<t1, ..., t_m>(v1, ..., v_n)
-//
-// where the ts are the template arguments and the vs are the value
-// arguments. The value argument types are inferred by the compiler.
-// If you want to explicitly specify the value argument types, you can
-// provide additional template arguments:
-//
-// ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)
-//
-// where u_i is the desired type of v_i.
-//
-// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
-// number of value parameters, but not on the number of template
-// parameters. Without the restriction, the meaning of the following
-// is unclear:
-//
-// OverloadedAction<int, bool>(x);
-//
-// Are we using a single-template-parameter action where 'bool' refers
-// to the type of x, or are we using a two-template-parameter action
-// where the compiler is asked to infer the type of x?
-//
-// Implementation notes:
-//
-// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and
-// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for
-// implementing ACTION_TEMPLATE. The main trick we use is to create
-// new macro invocations when expanding a macro. For example, we have
-//
-// #define ACTION_TEMPLATE(name, template_params, value_params)
-// ... GMOCK_INTERNAL_DECL_##template_params ...
-//
-// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)
-// to expand to
-//
-// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...
-//
-// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the
-// preprocessor will continue to expand it to
-//
-// ... typename T ...
-//
-// This technique conforms to the C++ standard and is portable. It
-// allows us to implement action templates using O(N) code, where N is
-// the maximum number of template/value parameters supported. Without
-// using it, we'd have to devote O(N^2) amount of code to implement all
-// combinations of m and n.
-
-// Declares the template parameters.
-
-$range j 1..n
-$for j [[
-$range m 0..j-1
-#define GMOCK_INTERNAL_DECL_HAS_$j[[]]
-_TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[kind$m name$m]]
-
-
-]]
-
-// Lists the template parameters.
-
-$for j [[
-$range m 0..j-1
-#define GMOCK_INTERNAL_LIST_HAS_$j[[]]
-_TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[name$m]]
-
-
-]]
-
-// Declares the types of value parameters.
-
-$for i [[
-$range j 0..i-1
-#define GMOCK_INTERNAL_DECL_TYPE_AND_$i[[]]
-_VALUE_PARAMS($for j, [[p$j]]) $for j [[, typename p$j##_type]]
-
-
-]]
-
-// Initializes the value parameters.
-
-$for i [[
-$range j 0..i-1
-#define GMOCK_INTERNAL_INIT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])\
- ($for j, [[p$j##_type gmock_p$j]])$if i>0 [[ : ]]$for j, [[p$j(gmock_p$j)]]
-
-
-]]
-
-// Declares the fields for storing the value parameters.
-
-$for i [[
-$range j 0..i-1
-#define GMOCK_INTERNAL_DEFN_AND_$i[[]]
-_VALUE_PARAMS($for j, [[p$j]]) $for j [[p$j##_type p$j; ]]
-
-
-]]
-
-// Lists the value parameters.
-
-$for i [[
-$range j 0..i-1
-#define GMOCK_INTERNAL_LIST_AND_$i[[]]
-_VALUE_PARAMS($for j, [[p$j]]) $for j, [[p$j]]
-
-
-]]
-
-// Lists the value parameter types.
-
-$for i [[
-$range j 0..i-1
-#define GMOCK_INTERNAL_LIST_TYPE_AND_$i[[]]
-_VALUE_PARAMS($for j, [[p$j]]) $for j [[, p$j##_type]]
-
-
-]]
-
-// Declares the value parameters.
-
-$for i [[
-$range j 0..i-1
-#define GMOCK_INTERNAL_DECL_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]]
-$for j, [[p$j##_type p$j]]
-
-
-]]
-
-// The suffix of the class template implementing the action template.
-$for i [[
-
-
-$range j 0..i-1
-#define GMOCK_INTERNAL_COUNT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]]
-$if i==1 [[P]] $elif i>=2 [[P$i]]
-]]
-
-
-// The name of the class template implementing the action template.
-#define GMOCK_ACTION_CLASS_(name, value_params)\
- GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
-
-$range k 0..n-1
-
-#define ACTION_TEMPLATE(name, template_params, value_params)\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- class GMOCK_ACTION_CLASS_(name, value_params) {\
- public:\
- GMOCK_ACTION_CLASS_(name, value_params)\
- GMOCK_INTERNAL_INIT_##value_params {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <$for k, [[typename arg$k[[]]_type]]>\
- return_type gmock_PerformImpl(const args_type& args[[]]
-$for k [[, arg$k[[]]_type arg$k]]) const;\
- GMOCK_INTERNAL_DEFN_##value_params\
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(\
- new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\
- }\
- GMOCK_INTERNAL_DEFN_##value_params\
- private:\
- GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\
- };\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- inline GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\
- GMOCK_INTERNAL_DECL_##value_params) {\
- return GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params>(\
- GMOCK_INTERNAL_LIST_##value_params);\
- }\
- template <GMOCK_INTERNAL_DECL_##template_params\
- GMOCK_INTERNAL_DECL_TYPE_##value_params>\
- template <typename F>\
- template <typename arg0_type, typename arg1_type, typename arg2_type,\
- typename arg3_type, typename arg4_type, typename arg5_type,\
- typename arg6_type, typename arg7_type, typename arg8_type,\
- typename arg9_type>\
- typename ::testing::internal::Function<F>::Result\
- GMOCK_ACTION_CLASS_(name, value_params)<\
- GMOCK_INTERNAL_LIST_##template_params\
- GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\
- gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-$for i
-
-[[
-$var template = [[$if i==0 [[]] $else [[
-$range j 0..i-1
-
- template <$for j, [[typename p$j##_type]]>\
-]]]]
-$var class_name = [[name##Action[[$if i==0 [[]] $elif i==1 [[P]]
- $else [[P$i]]]]]]
-$range j 0..i-1
-$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]]
-$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]]
-$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]]
-$var param_field_decls = [[$for j
-[[
-
- p$j##_type p$j;\
-]]]]
-$var param_field_decls2 = [[$for j
-[[
-
- p$j##_type p$j;\
-]]]]
-$var params = [[$for j, [[p$j]]]]
-$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]]
-$var typename_arg_types = [[$for k, [[typename arg$k[[]]_type]]]]
-$var arg_types_and_names = [[$for k, [[arg$k[[]]_type arg$k]]]]
-$var macro_name = [[$if i==0 [[ACTION]] $elif i==1 [[ACTION_P]]
- $else [[ACTION_P$i]]]]
-
-#define $macro_name(name$for j [[, p$j]])\$template
- class $class_name {\
- public:\
- $class_name($ctor_param_list)$inits {}\
- template <typename F>\
- class gmock_Impl : public ::testing::ActionInterface<F> {\
- public:\
- typedef F function_type;\
- typedef typename ::testing::internal::Function<F>::Result return_type;\
- typedef typename ::testing::internal::Function<F>::ArgumentTuple\
- args_type;\
- [[$if i==1 [[explicit ]]]]gmock_Impl($ctor_param_list)$inits {}\
- virtual return_type Perform(const args_type& args) {\
- return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
- Perform(this, args);\
- }\
- template <$typename_arg_types>\
- return_type gmock_PerformImpl(const args_type& args, [[]]
-$arg_types_and_names) const;\$param_field_decls
- private:\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename F> operator ::testing::Action<F>() const {\
- return ::testing::Action<F>(new gmock_Impl<F>($params));\
- }\$param_field_decls2
- private:\
- GTEST_DISALLOW_ASSIGN_($class_name);\
- };\$template
- inline $class_name$param_types name($param_types_and_names) {\
- return $class_name$param_types($params);\
- }\$template
- template <typename F>\
- template <$typename_arg_types>\
- typename ::testing::internal::Function<F>::Result\
- $class_name$param_types::gmock_Impl<F>::gmock_PerformImpl(\
- GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-]]
-$$ } // This meta comment fixes auto-indentation in Emacs. It won't
-$$ // show up in the generated code.
-
-
-// TODO(wan@google.com): move the following to a different .h file
-// such that we don't have to run 'pump' every time the code is
-// updated.
-namespace testing {
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Various overloads for InvokeArgument<N>().
-//
-// The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
-// (0-based) argument, which must be a k-ary callable, of the mock
-// function, with arguments a1, a2, ..., a_k.
-//
-// Notes:
-//
-// 1. The arguments are passed by value by default. If you need to
-// pass an argument by reference, wrap it inside ByRef(). For
-// example,
-//
-// InvokeArgument<1>(5, string("Hello"), ByRef(foo))
-//
-// passes 5 and string("Hello") by value, and passes foo by
-// reference.
-//
-// 2. If the callable takes an argument by reference but ByRef() is
-// not used, it will receive the reference to a copy of the value,
-// instead of the original value. For example, when the 0-th
-// argument of the mock function takes a const string&, the action
-//
-// InvokeArgument<0>(string("Hello"))
-//
-// makes a copy of the temporary string("Hello") object and passes a
-// reference of the copy, instead of the original temporary object,
-// to the callable. This makes it easy for a user to define an
-// InvokeArgument action from temporary values and have it performed
-// later.
-
-$range i 0..n
-$for i [[
-$range j 0..i-1
-
-ACTION_TEMPLATE(InvokeArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])) {
- return internal::CallableHelper<return_type>::Call(
- ::std::tr1::get<k>(args)$for j [[, p$j]]);
-}
-
-]]
-
-// Various overloads for ReturnNew<T>().
-//
-// The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new
-// instance of type T, constructed on the heap with constructor arguments
-// a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
-$range i 0..n
-$for i [[
-$range j 0..i-1
-$var ps = [[$for j, [[p$j]]]]
-
-ACTION_TEMPLATE(ReturnNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_$i[[]]_VALUE_PARAMS($ps)) {
- return new T($ps);
-}
-
-]]
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h
deleted file mode 100644
index 509d46cbb..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h
+++ /dev/null
@@ -1,929 +0,0 @@
-// This file was GENERATED by command:
-// pump.py gmock-generated-function-mockers.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements function mockers of various arities.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-
-#include "gmock/gmock-spec-builders.h"
-#include "gmock/internal/gmock-internal-utils.h"
-
-namespace testing {
-namespace internal {
-
-template <typename F>
-class FunctionMockerBase;
-
-// Note: class FunctionMocker really belongs to the ::testing
-// namespace. However if we define it in ::testing, MSVC will
-// complain when classes in ::testing::internal declare it as a
-// friend class template. To workaround this compiler bug, we define
-// FunctionMocker in ::testing::internal and import it into ::testing.
-template <typename F>
-class FunctionMocker;
-
-template <typename R>
-class FunctionMocker<R()> : public
- internal::FunctionMockerBase<R()> {
- public:
- typedef R F();
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With() {
- return this->current_spec();
- }
-
- R Invoke() {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple());
- }
-};
-
-template <typename R, typename A1>
-class FunctionMocker<R(A1)> : public
- internal::FunctionMockerBase<R(A1)> {
- public:
- typedef R F(A1);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1));
- return this->current_spec();
- }
-
- R Invoke(A1 a1) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1));
- }
-};
-
-template <typename R, typename A1, typename A2>
-class FunctionMocker<R(A1, A2)> : public
- internal::FunctionMockerBase<R(A1, A2)> {
- public:
- typedef R F(A1, A2);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-class FunctionMocker<R(A1, A2, A3)> : public
- internal::FunctionMockerBase<R(A1, A2, A3)> {
- public:
- typedef R F(A1, A2, A3);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-class FunctionMocker<R(A1, A2, A3, A4)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4)> {
- public:
- typedef R F(A1, A2, A3, A4);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5)> {
- public:
- typedef R F(A1, A2, A3, A4, A5);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4,
- m5));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7, A8);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7, m8));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
- const Matcher<A9>& m9) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7, m8, m9));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9));
- }
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9,
- typename A10>
-class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
- internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> {
- public:
- typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
- const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
- const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
- const Matcher<A9>& m9, const Matcher<A10>& m10) {
- this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
- m6, m7, m8, m9, m10));
- return this->current_spec();
- }
-
- R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9,
- A10 a10) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9,
- a10));
- }
-};
-
-} // namespace internal
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file. However, the FunctionMocker class template
-// is meant to be defined in the ::testing namespace. The following
-// line is just a trick for working around a bug in MSVC 8.0, which
-// cannot handle it if we define FunctionMocker in ::testing.
-using internal::FunctionMocker;
-
-// The result type of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_RESULT_(tn, F) tn ::testing::internal::Function<F>::Result
-
-// The type of argument N of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_ARG_(tn, F, N) tn ::testing::internal::Function<F>::Argument##N
-
-// The matcher type for argument N of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher<GMOCK_ARG_(tn, F, N)>&
-
-// The variable for mocking the given method.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MOCKER_(arity, constness, Method) \
- GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD0_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method() constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 0, \
- this_method_does_not_take_0_arguments); \
- GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method() constness { \
- GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(0, constness, Method).With(); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(0, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD1_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 1, \
- this_method_does_not_take_1_argument); \
- GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1) constness { \
- GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(1, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD2_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 2, \
- this_method_does_not_take_2_arguments); \
- GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2) constness { \
- GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(2, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD3_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 3, \
- this_method_does_not_take_3_arguments); \
- GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3) constness { \
- GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(3, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD4_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 4, \
- this_method_does_not_take_4_arguments); \
- GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4) constness { \
- GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(4, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD5_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 5, \
- this_method_does_not_take_5_arguments); \
- GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5) constness { \
- GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(5, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD6_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 6, \
- this_method_does_not_take_6_arguments); \
- GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6) constness { \
- GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(6, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD7_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 7, \
- this_method_does_not_take_7_arguments); \
- GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7) constness { \
- GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(7, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD8_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7, \
- GMOCK_ARG_(tn, F, 8) gmock_a8) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 8, \
- this_method_does_not_take_8_arguments); \
- GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7, \
- GMOCK_MATCHER_(tn, F, 8) gmock_a8) constness { \
- GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(8, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD9_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7, \
- GMOCK_ARG_(tn, F, 8) gmock_a8, \
- GMOCK_ARG_(tn, F, 9) gmock_a9) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 9, \
- this_method_does_not_take_9_arguments); \
- GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
- gmock_a9); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7, \
- GMOCK_MATCHER_(tn, F, 8) gmock_a8, \
- GMOCK_MATCHER_(tn, F, 9) gmock_a9) constness { \
- GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
- gmock_a9); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(9, constness, Method)
-
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD10_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
- GMOCK_ARG_(tn, F, 2) gmock_a2, \
- GMOCK_ARG_(tn, F, 3) gmock_a3, \
- GMOCK_ARG_(tn, F, 4) gmock_a4, \
- GMOCK_ARG_(tn, F, 5) gmock_a5, \
- GMOCK_ARG_(tn, F, 6) gmock_a6, \
- GMOCK_ARG_(tn, F, 7) gmock_a7, \
- GMOCK_ARG_(tn, F, 8) gmock_a8, \
- GMOCK_ARG_(tn, F, 9) gmock_a9, \
- GMOCK_ARG_(tn, F, 10) gmock_a10) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == 10, \
- this_method_does_not_take_10_arguments); \
- GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
- gmock_a10); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
- GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
- GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
- GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
- GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
- GMOCK_MATCHER_(tn, F, 6) gmock_a6, \
- GMOCK_MATCHER_(tn, F, 7) gmock_a7, \
- GMOCK_MATCHER_(tn, F, 8) gmock_a8, \
- GMOCK_MATCHER_(tn, F, 9) gmock_a9, \
- GMOCK_MATCHER_(tn, F, 10) gmock_a10) constness { \
- GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \
- gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
- gmock_a10); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(10, constness, Method)
-
-#define MOCK_METHOD0(m, F) GMOCK_METHOD0_(, , , m, F)
-#define MOCK_METHOD1(m, F) GMOCK_METHOD1_(, , , m, F)
-#define MOCK_METHOD2(m, F) GMOCK_METHOD2_(, , , m, F)
-#define MOCK_METHOD3(m, F) GMOCK_METHOD3_(, , , m, F)
-#define MOCK_METHOD4(m, F) GMOCK_METHOD4_(, , , m, F)
-#define MOCK_METHOD5(m, F) GMOCK_METHOD5_(, , , m, F)
-#define MOCK_METHOD6(m, F) GMOCK_METHOD6_(, , , m, F)
-#define MOCK_METHOD7(m, F) GMOCK_METHOD7_(, , , m, F)
-#define MOCK_METHOD8(m, F) GMOCK_METHOD8_(, , , m, F)
-#define MOCK_METHOD9(m, F) GMOCK_METHOD9_(, , , m, F)
-#define MOCK_METHOD10(m, F) GMOCK_METHOD10_(, , , m, F)
-
-#define MOCK_CONST_METHOD0(m, F) GMOCK_METHOD0_(, const, , m, F)
-#define MOCK_CONST_METHOD1(m, F) GMOCK_METHOD1_(, const, , m, F)
-#define MOCK_CONST_METHOD2(m, F) GMOCK_METHOD2_(, const, , m, F)
-#define MOCK_CONST_METHOD3(m, F) GMOCK_METHOD3_(, const, , m, F)
-#define MOCK_CONST_METHOD4(m, F) GMOCK_METHOD4_(, const, , m, F)
-#define MOCK_CONST_METHOD5(m, F) GMOCK_METHOD5_(, const, , m, F)
-#define MOCK_CONST_METHOD6(m, F) GMOCK_METHOD6_(, const, , m, F)
-#define MOCK_CONST_METHOD7(m, F) GMOCK_METHOD7_(, const, , m, F)
-#define MOCK_CONST_METHOD8(m, F) GMOCK_METHOD8_(, const, , m, F)
-#define MOCK_CONST_METHOD9(m, F) GMOCK_METHOD9_(, const, , m, F)
-#define MOCK_CONST_METHOD10(m, F) GMOCK_METHOD10_(, const, , m, F)
-
-#define MOCK_METHOD0_T(m, F) GMOCK_METHOD0_(typename, , , m, F)
-#define MOCK_METHOD1_T(m, F) GMOCK_METHOD1_(typename, , , m, F)
-#define MOCK_METHOD2_T(m, F) GMOCK_METHOD2_(typename, , , m, F)
-#define MOCK_METHOD3_T(m, F) GMOCK_METHOD3_(typename, , , m, F)
-#define MOCK_METHOD4_T(m, F) GMOCK_METHOD4_(typename, , , m, F)
-#define MOCK_METHOD5_T(m, F) GMOCK_METHOD5_(typename, , , m, F)
-#define MOCK_METHOD6_T(m, F) GMOCK_METHOD6_(typename, , , m, F)
-#define MOCK_METHOD7_T(m, F) GMOCK_METHOD7_(typename, , , m, F)
-#define MOCK_METHOD8_T(m, F) GMOCK_METHOD8_(typename, , , m, F)
-#define MOCK_METHOD9_T(m, F) GMOCK_METHOD9_(typename, , , m, F)
-#define MOCK_METHOD10_T(m, F) GMOCK_METHOD10_(typename, , , m, F)
-
-#define MOCK_CONST_METHOD0_T(m, F) GMOCK_METHOD0_(typename, const, , m, F)
-#define MOCK_CONST_METHOD1_T(m, F) GMOCK_METHOD1_(typename, const, , m, F)
-#define MOCK_CONST_METHOD2_T(m, F) GMOCK_METHOD2_(typename, const, , m, F)
-#define MOCK_CONST_METHOD3_T(m, F) GMOCK_METHOD3_(typename, const, , m, F)
-#define MOCK_CONST_METHOD4_T(m, F) GMOCK_METHOD4_(typename, const, , m, F)
-#define MOCK_CONST_METHOD5_T(m, F) GMOCK_METHOD5_(typename, const, , m, F)
-#define MOCK_CONST_METHOD6_T(m, F) GMOCK_METHOD6_(typename, const, , m, F)
-#define MOCK_CONST_METHOD7_T(m, F) GMOCK_METHOD7_(typename, const, , m, F)
-#define MOCK_CONST_METHOD8_T(m, F) GMOCK_METHOD8_(typename, const, , m, F)
-#define MOCK_CONST_METHOD9_T(m, F) GMOCK_METHOD9_(typename, const, , m, F)
-#define MOCK_CONST_METHOD10_T(m, F) GMOCK_METHOD10_(typename, const, , m, F)
-
-#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD0_(, , ct, m, F)
-#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD1_(, , ct, m, F)
-#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD2_(, , ct, m, F)
-#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD3_(, , ct, m, F)
-#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD4_(, , ct, m, F)
-#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD5_(, , ct, m, F)
-#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD6_(, , ct, m, F)
-#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD7_(, , ct, m, F)
-#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD8_(, , ct, m, F)
-#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD9_(, , ct, m, F)
-#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD10_(, , ct, m, F)
-
-#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD0_(, const, ct, m, F)
-#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD1_(, const, ct, m, F)
-#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD2_(, const, ct, m, F)
-#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD3_(, const, ct, m, F)
-#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD4_(, const, ct, m, F)
-#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD5_(, const, ct, m, F)
-#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD6_(, const, ct, m, F)
-#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD7_(, const, ct, m, F)
-#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD8_(, const, ct, m, F)
-#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD9_(, const, ct, m, F)
-#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD10_(, const, ct, m, F)
-
-#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD0_(typename, , ct, m, F)
-#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD1_(typename, , ct, m, F)
-#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD2_(typename, , ct, m, F)
-#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD3_(typename, , ct, m, F)
-#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD4_(typename, , ct, m, F)
-#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD5_(typename, , ct, m, F)
-#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD6_(typename, , ct, m, F)
-#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD7_(typename, , ct, m, F)
-#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD8_(typename, , ct, m, F)
-#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD9_(typename, , ct, m, F)
-#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD10_(typename, , ct, m, F)
-
-#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD0_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD1_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD2_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD3_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD4_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD5_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD6_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD7_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD8_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD9_(typename, const, ct, m, F)
-#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD10_(typename, const, ct, m, F)
-
-// A MockFunction<F> class has one mock method whose type is F. It is
-// useful when you just want your test code to emit some messages and
-// have Google Mock verify the right messages are sent (and perhaps at
-// the right times). For example, if you are exercising code:
-//
-// Foo(1);
-// Foo(2);
-// Foo(3);
-//
-// and want to verify that Foo(1) and Foo(3) both invoke
-// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
-//
-// TEST(FooTest, InvokesBarCorrectly) {
-// MyMock mock;
-// MockFunction<void(string check_point_name)> check;
-// {
-// InSequence s;
-//
-// EXPECT_CALL(mock, Bar("a"));
-// EXPECT_CALL(check, Call("1"));
-// EXPECT_CALL(check, Call("2"));
-// EXPECT_CALL(mock, Bar("a"));
-// }
-// Foo(1);
-// check.Call("1");
-// Foo(2);
-// check.Call("2");
-// Foo(3);
-// }
-//
-// The expectation spec says that the first Bar("a") must happen
-// before check point "1", the second Bar("a") must happen after check
-// point "2", and nothing should happen between the two check
-// points. The explicit check points make it easy to tell which
-// Bar("a") is called by which call to Foo().
-template <typename F>
-class MockFunction;
-
-template <typename R>
-class MockFunction<R()> {
- public:
- MockFunction() {}
-
- MOCK_METHOD0_T(Call, R());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0>
-class MockFunction<R(A0)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD1_T(Call, R(A0));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1>
-class MockFunction<R(A0, A1)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD2_T(Call, R(A0, A1));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2>
-class MockFunction<R(A0, A1, A2)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD3_T(Call, R(A0, A1, A2));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3>
-class MockFunction<R(A0, A1, A2, A3)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD4_T(Call, R(A0, A1, A2, A3));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4>
-class MockFunction<R(A0, A1, A2, A3, A4)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD5_T(Call, R(A0, A1, A2, A3, A4));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5>
-class MockFunction<R(A0, A1, A2, A3, A4, A5)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD6_T(Call, R(A0, A1, A2, A3, A4, A5));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD7_T(Call, R(A0, A1, A2, A3, A4, A5, A6));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD8_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD9_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-template <typename R, typename A0, typename A1, typename A2, typename A3,
- typename A4, typename A5, typename A6, typename A7, typename A8,
- typename A9>
-class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
- public:
- MockFunction() {}
-
- MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h.pump
deleted file mode 100644
index 4f82d622c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-function-mockers.h.pump
+++ /dev/null
@@ -1,258 +0,0 @@
-$$ -*- mode: c++; -*-
-$$ This is a Pump source file. Please use Pump to convert it to
-$$ gmock-generated-function-mockers.h.
-$$
-$var n = 10 $$ The maximum arity we support.
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements function mockers of various arities.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
-
-#include "gmock/gmock-spec-builders.h"
-#include "gmock/internal/gmock-internal-utils.h"
-
-namespace testing {
-namespace internal {
-
-template <typename F>
-class FunctionMockerBase;
-
-// Note: class FunctionMocker really belongs to the ::testing
-// namespace. However if we define it in ::testing, MSVC will
-// complain when classes in ::testing::internal declare it as a
-// friend class template. To workaround this compiler bug, we define
-// FunctionMocker in ::testing::internal and import it into ::testing.
-template <typename F>
-class FunctionMocker;
-
-
-$range i 0..n
-$for i [[
-$range j 1..i
-$var typename_As = [[$for j [[, typename A$j]]]]
-$var As = [[$for j, [[A$j]]]]
-$var as = [[$for j, [[a$j]]]]
-$var Aas = [[$for j, [[A$j a$j]]]]
-$var ms = [[$for j, [[m$j]]]]
-$var matchers = [[$for j, [[const Matcher<A$j>& m$j]]]]
-template <typename R$typename_As>
-class FunctionMocker<R($As)> : public
- internal::FunctionMockerBase<R($As)> {
- public:
- typedef R F($As);
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
- MockSpec<F>& With($matchers) {
-
-$if i >= 1 [[
- this->current_spec().SetMatchers(::std::tr1::make_tuple($ms));
-
-]]
- return this->current_spec();
- }
-
- R Invoke($Aas) {
- // Even though gcc and MSVC don't enforce it, 'this->' is required
- // by the C++ standard [14.6.4] here, as the base class type is
- // dependent on the template argument (and thus shouldn't be
- // looked into when resolving InvokeWith).
- return this->InvokeWith(ArgumentTuple($as));
- }
-};
-
-
-]]
-} // namespace internal
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file. However, the FunctionMocker class template
-// is meant to be defined in the ::testing namespace. The following
-// line is just a trick for working around a bug in MSVC 8.0, which
-// cannot handle it if we define FunctionMocker in ::testing.
-using internal::FunctionMocker;
-
-// The result type of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_RESULT_(tn, F) tn ::testing::internal::Function<F>::Result
-
-// The type of argument N of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_ARG_(tn, F, N) tn ::testing::internal::Function<F>::Argument##N
-
-// The matcher type for argument N of function type F.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher<GMOCK_ARG_(tn, F, N)>&
-
-// The variable for mocking the given method.
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MOCKER_(arity, constness, Method) \
- GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
-
-
-$for i [[
-$range j 1..i
-$var arg_as = [[$for j, \
- [[GMOCK_ARG_(tn, F, $j) gmock_a$j]]]]
-$var as = [[$for j, [[gmock_a$j]]]]
-$var matcher_as = [[$for j, \
- [[GMOCK_MATCHER_(tn, F, $j) gmock_a$j]]]]
-// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, F) \
- GMOCK_RESULT_(tn, F) ct Method($arg_as) constness { \
- GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
- tn ::testing::internal::Function<F>::ArgumentTuple>::value == $i, \
- this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
- GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \
- } \
- ::testing::MockSpec<F>& \
- gmock_##Method($matcher_as) constness { \
- GMOCK_MOCKER_($i, constness, Method).RegisterOwner(this); \
- return GMOCK_MOCKER_($i, constness, Method).With($as); \
- } \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_($i, constness, Method)
-
-
-]]
-$for i [[
-#define MOCK_METHOD$i(m, F) GMOCK_METHOD$i[[]]_(, , , m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_CONST_METHOD$i(m, F) GMOCK_METHOD$i[[]]_(, const, , m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_METHOD$i[[]]_T(m, F) GMOCK_METHOD$i[[]]_(typename, , , m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_CONST_METHOD$i[[]]_T(m, F) [[]]
-GMOCK_METHOD$i[[]]_(typename, const, , m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) [[]]
-GMOCK_METHOD$i[[]]_(, , ct, m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_CONST_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD$i[[]]_(, const, ct, m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD$i[[]]_(typename, , ct, m, F)
-
-]]
-
-
-$for i [[
-#define MOCK_CONST_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD$i[[]]_(typename, const, ct, m, F)
-
-]]
-
-// A MockFunction<F> class has one mock method whose type is F. It is
-// useful when you just want your test code to emit some messages and
-// have Google Mock verify the right messages are sent (and perhaps at
-// the right times). For example, if you are exercising code:
-//
-// Foo(1);
-// Foo(2);
-// Foo(3);
-//
-// and want to verify that Foo(1) and Foo(3) both invoke
-// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
-//
-// TEST(FooTest, InvokesBarCorrectly) {
-// MyMock mock;
-// MockFunction<void(string check_point_name)> check;
-// {
-// InSequence s;
-//
-// EXPECT_CALL(mock, Bar("a"));
-// EXPECT_CALL(check, Call("1"));
-// EXPECT_CALL(check, Call("2"));
-// EXPECT_CALL(mock, Bar("a"));
-// }
-// Foo(1);
-// check.Call("1");
-// Foo(2);
-// check.Call("2");
-// Foo(3);
-// }
-//
-// The expectation spec says that the first Bar("a") must happen
-// before check point "1", the second Bar("a") must happen after check
-// point "2", and nothing should happen between the two check
-// points. The explicit check points make it easy to tell which
-// Bar("a") is called by which call to Foo().
-template <typename F>
-class MockFunction;
-
-
-$for i [[
-$range j 0..i-1
-template <typename R$for j [[, typename A$j]]>
-class MockFunction<R($for j, [[A$j]])> {
- public:
- MockFunction() {}
-
- MOCK_METHOD$i[[]]_T(Call, R($for j, [[A$j]]));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
-};
-
-
-]]
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h
deleted file mode 100644
index 6feaf1a29..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h
+++ /dev/null
@@ -1,2054 +0,0 @@
-// This file was GENERATED by command:
-// pump.py gmock-generated-matchers.h.pump
-// DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic matchers.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-
-#include <sstream>
-#include <string>
-#include <vector>
-#include "gmock/gmock-matchers.h"
-
-namespace testing {
-namespace internal {
-
-// The type of the i-th (0-based) field of Tuple.
-#define GMOCK_FIELD_TYPE_(Tuple, i) \
- typename ::std::tr1::tuple_element<i, Tuple>::type
-
-// TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
-// tuple of type Tuple. It has two members:
-//
-// type: a tuple type whose i-th field is the ki-th field of Tuple.
-// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple.
-//
-// For example, in class TupleFields<tuple<bool, char, int>, 2, 0>, we have:
-//
-// type is tuple<int, bool>, and
-// GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true).
-
-template <class Tuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
- int k9 = -1>
-class TupleFields;
-
-// This generic version is used when there are 10 selectors.
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
- int k7, int k8, int k9>
-class TupleFields {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
- GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8),
- GMOCK_FIELD_TYPE_(Tuple, k9)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
- }
-};
-
-// The following specialization is used for 0 ~ 9 selectors.
-
-template <class Tuple>
-class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<> type;
- static type GetSelectedFields(const Tuple& /* t */) {
- using ::std::tr1::get;
- return type();
- }
-};
-
-template <class Tuple, int k0>
-class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t));
- }
-};
-
-template <class Tuple, int k0, int k1>
-class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2>
-class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3>
-class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
- int k7>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
- GMOCK_FIELD_TYPE_(Tuple, k7)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t), get<k7>(t));
- }
-};
-
-template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
- int k7, int k8>
-class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
- public:
- typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
- GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
- GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
- GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
- GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
- get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
- }
-};
-
-#undef GMOCK_FIELD_TYPE_
-
-// Implements the Args() matcher.
-template <class ArgsTuple, int k0 = -1, int k1 = -1, int k2 = -1, int k3 = -1,
- int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
- int k9 = -1>
-class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {
- public:
- // ArgsTuple may have top-level const or reference modifiers.
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple;
- typedef typename internal::TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5,
- k6, k7, k8, k9>::type SelectedArgs;
- typedef Matcher<const SelectedArgs&> MonomorphicInnerMatcher;
-
- template <typename InnerMatcher>
- explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
- : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
-
- virtual bool MatchAndExplain(ArgsTuple args,
- MatchResultListener* listener) const {
- const SelectedArgs& selected_args = GetSelectedArgs(args);
- if (!listener->IsInterested())
- return inner_matcher_.Matches(selected_args);
-
- PrintIndices(listener->stream());
- *listener << "are " << PrintToString(selected_args);
-
- StringMatchResultListener inner_listener;
- const bool match = inner_matcher_.MatchAndExplain(selected_args,
- &inner_listener);
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return match;
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "are a tuple ";
- PrintIndices(os);
- inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "are a tuple ";
- PrintIndices(os);
- inner_matcher_.DescribeNegationTo(os);
- }
-
- private:
- static SelectedArgs GetSelectedArgs(ArgsTuple args) {
- return TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,
- k9>::GetSelectedFields(args);
- }
-
- // Prints the indices of the selected fields.
- static void PrintIndices(::std::ostream* os) {
- *os << "whose fields (";
- const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 };
- for (int i = 0; i < 10; i++) {
- if (indices[i] < 0)
- break;
-
- if (i >= 1)
- *os << ", ";
-
- *os << "#" << indices[i];
- }
- *os << ") ";
- }
-
- const MonomorphicInnerMatcher inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl);
-};
-
-template <class InnerMatcher, int k0 = -1, int k1 = -1, int k2 = -1,
- int k3 = -1, int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1,
- int k8 = -1, int k9 = -1>
-class ArgsMatcher {
- public:
- explicit ArgsMatcher(const InnerMatcher& inner_matcher)
- : inner_matcher_(inner_matcher) {}
-
- template <typename ArgsTuple>
- operator Matcher<ArgsTuple>() const {
- return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, k0, k1, k2, k3, k4, k5,
- k6, k7, k8, k9>(inner_matcher_));
- }
-
- private:
- const InnerMatcher inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ArgsMatcher);
-};
-
-// Implements ElementsAre() of 1-10 arguments.
-
-template <typename T1>
-class ElementsAreMatcher1 {
- public:
- explicit ElementsAreMatcher1(const T1& e1) : e1_(e1) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- // Nokia's Symbian Compiler has a nasty bug where the object put
- // in a one-element local array is not destructed when the array
- // goes out of scope. This leads to obvious badness as we've
- // added the linked_ptr in it to our other linked_ptrs list.
- // Hence we implement ElementsAreMatcher1 specially to avoid using
- // a local array.
- const Matcher<const Element&> matcher =
- MatcherCast<const Element&>(e1_);
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(&matcher, 1));
- }
-
- private:
- const T1& e1_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher1);
-};
-
-template <typename T1, typename T2>
-class ElementsAreMatcher2 {
- public:
- ElementsAreMatcher2(const T1& e1, const T2& e2) : e1_(e1), e2_(e2) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 2));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher2);
-};
-
-template <typename T1, typename T2, typename T3>
-class ElementsAreMatcher3 {
- public:
- ElementsAreMatcher3(const T1& e1, const T2& e2, const T3& e3) : e1_(e1),
- e2_(e2), e3_(e3) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 3));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher3);
-};
-
-template <typename T1, typename T2, typename T3, typename T4>
-class ElementsAreMatcher4 {
- public:
- ElementsAreMatcher4(const T1& e1, const T2& e2, const T3& e3,
- const T4& e4) : e1_(e1), e2_(e2), e3_(e3), e4_(e4) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 4));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher4);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-class ElementsAreMatcher5 {
- public:
- ElementsAreMatcher5(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 5));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher5);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-class ElementsAreMatcher6 {
- public:
- ElementsAreMatcher6(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6) : e1_(e1), e2_(e2), e3_(e3), e4_(e4),
- e5_(e5), e6_(e6) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 6));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher6);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-class ElementsAreMatcher7 {
- public:
- ElementsAreMatcher7(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7) : e1_(e1), e2_(e2), e3_(e3),
- e4_(e4), e5_(e5), e6_(e6), e7_(e7) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 7));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher7);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-class ElementsAreMatcher8 {
- public:
- ElementsAreMatcher8(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8) : e1_(e1),
- e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6), e7_(e7), e8_(e8) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- MatcherCast<const Element&>(e8_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 8));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
- const T8& e8_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher8);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-class ElementsAreMatcher9 {
- public:
- ElementsAreMatcher9(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8,
- const T9& e9) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6),
- e7_(e7), e8_(e8), e9_(e9) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- MatcherCast<const Element&>(e8_),
- MatcherCast<const Element&>(e9_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 9));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
- const T8& e8_;
- const T9& e9_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher9);
-};
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-class ElementsAreMatcher10 {
- public:
- ElementsAreMatcher10(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
- const T10& e10) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6),
- e7_(e7), e8_(e8), e9_(e9), e10_(e10) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&> matchers[] = {
- MatcherCast<const Element&>(e1_),
- MatcherCast<const Element&>(e2_),
- MatcherCast<const Element&>(e3_),
- MatcherCast<const Element&>(e4_),
- MatcherCast<const Element&>(e5_),
- MatcherCast<const Element&>(e6_),
- MatcherCast<const Element&>(e7_),
- MatcherCast<const Element&>(e8_),
- MatcherCast<const Element&>(e9_),
- MatcherCast<const Element&>(e10_),
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 10));
- }
-
- private:
- const T1& e1_;
- const T2& e2_;
- const T3& e3_;
- const T4& e4_;
- const T5& e5_;
- const T6& e6_;
- const T7& e7_;
- const T8& e8_;
- const T9& e9_;
- const T10& e10_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher10);
-};
-
-} // namespace internal
-
-// Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected
-// fields of it matches a_matcher. C++ doesn't support default
-// arguments for function templates, so we have to overload it.
-template <typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher>(matcher);
-}
-
-template <int k1, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1>(matcher);
-}
-
-template <int k1, int k2, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2>(matcher);
-}
-
-template <int k1, int k2, int k3, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
- typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6,
- k7>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7,
- k8>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
- k9>(matcher);
-}
-
-template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
- int k9, int k10, typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9,
- k10>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8,
- k9, k10>(matcher);
-}
-
-// ElementsAre(e0, e1, ..., e_n) matches an STL-style container with
-// (n + 1) elements, where the i-th element in the container must
-// match the i-th argument in the list. Each argument of
-// ElementsAre() can be either a value or a matcher. We support up to
-// 10 arguments.
-//
-// NOTE: Since ElementsAre() cares about the order of the elements, it
-// must not be used with containers whose elements's order is
-// undefined (e.g. hash_map).
-
-inline internal::ElementsAreMatcher0 ElementsAre() {
- return internal::ElementsAreMatcher0();
-}
-
-template <typename T1>
-inline internal::ElementsAreMatcher1<T1> ElementsAre(const T1& e1) {
- return internal::ElementsAreMatcher1<T1>(e1);
-}
-
-template <typename T1, typename T2>
-inline internal::ElementsAreMatcher2<T1, T2> ElementsAre(const T1& e1,
- const T2& e2) {
- return internal::ElementsAreMatcher2<T1, T2>(e1, e2);
-}
-
-template <typename T1, typename T2, typename T3>
-inline internal::ElementsAreMatcher3<T1, T2, T3> ElementsAre(const T1& e1,
- const T2& e2, const T3& e3) {
- return internal::ElementsAreMatcher3<T1, T2, T3>(e1, e2, e3);
-}
-
-template <typename T1, typename T2, typename T3, typename T4>
-inline internal::ElementsAreMatcher4<T1, T2, T3, T4> ElementsAre(const T1& e1,
- const T2& e2, const T3& e3, const T4& e4) {
- return internal::ElementsAreMatcher4<T1, T2, T3, T4>(e1, e2, e3, e4);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-inline internal::ElementsAreMatcher5<T1, T2, T3, T4,
- T5> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5) {
- return internal::ElementsAreMatcher5<T1, T2, T3, T4, T5>(e1, e2, e3, e4, e5);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
-inline internal::ElementsAreMatcher6<T1, T2, T3, T4, T5,
- T6> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6) {
- return internal::ElementsAreMatcher6<T1, T2, T3, T4, T5, T6>(e1, e2, e3, e4,
- e5, e6);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
-inline internal::ElementsAreMatcher7<T1, T2, T3, T4, T5, T6,
- T7> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7) {
- return internal::ElementsAreMatcher7<T1, T2, T3, T4, T5, T6, T7>(e1, e2, e3,
- e4, e5, e6, e7);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
-inline internal::ElementsAreMatcher8<T1, T2, T3, T4, T5, T6, T7,
- T8> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
- return internal::ElementsAreMatcher8<T1, T2, T3, T4, T5, T6, T7, T8>(e1, e2,
- e3, e4, e5, e6, e7, e8);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
-inline internal::ElementsAreMatcher9<T1, T2, T3, T4, T5, T6, T7, T8,
- T9> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
- return internal::ElementsAreMatcher9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(e1,
- e2, e3, e4, e5, e6, e7, e8, e9);
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
-inline internal::ElementsAreMatcher10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10> ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
- const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
- const T10& e10) {
- return internal::ElementsAreMatcher10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
- T10>(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
-}
-
-// ElementsAreArray(array) and ElementAreArray(array, count) are like
-// ElementsAre(), except that they take an array of values or
-// matchers. The former form infers the size of 'array', which must
-// be a static C-style array. In the latter form, 'array' can either
-// be a static array or a pointer to a dynamically created array.
-
-template <typename T>
-inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
- const T* first, size_t count) {
- return internal::ElementsAreArrayMatcher<T>(first, count);
-}
-
-template <typename T, size_t N>
-inline internal::ElementsAreArrayMatcher<T>
-ElementsAreArray(const T (&array)[N]) {
- return internal::ElementsAreArrayMatcher<T>(array, N);
-}
-
-// AllOf(m1, m2, ..., mk) matches any value that matches all of the given
-// sub-matchers. AllOf is called fully qualified to prevent ADL from firing.
-
-template <typename Matcher1, typename Matcher2>
-inline internal::BothOfMatcher<Matcher1, Matcher2>
-AllOf(Matcher1 m1, Matcher2 m2) {
- return internal::BothOfMatcher<Matcher1, Matcher2>(m1, m2);
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- Matcher3> >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, Matcher4> > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- Matcher5> > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, Matcher6> > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- Matcher7> > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- internal::BothOfMatcher<Matcher7, Matcher8> > > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7, m8));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- internal::BothOfMatcher<Matcher7, internal::BothOfMatcher<Matcher8,
- Matcher9> > > > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7, m8, m9));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9, typename Matcher10>
-inline internal::BothOfMatcher<Matcher1, internal::BothOfMatcher<Matcher2,
- internal::BothOfMatcher<Matcher3, internal::BothOfMatcher<Matcher4,
- internal::BothOfMatcher<Matcher5, internal::BothOfMatcher<Matcher6,
- internal::BothOfMatcher<Matcher7, internal::BothOfMatcher<Matcher8,
- internal::BothOfMatcher<Matcher9, Matcher10> > > > > > > > >
-AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9, Matcher10 m10) {
- return ::testing::AllOf(m1, ::testing::AllOf(m2, m3, m4, m5, m6, m7, m8, m9,
- m10));
-}
-
-// AnyOf(m1, m2, ..., mk) matches any value that matches any of the given
-// sub-matchers. AnyOf is called fully qualified to prevent ADL from firing.
-
-template <typename Matcher1, typename Matcher2>
-inline internal::EitherOfMatcher<Matcher1, Matcher2>
-AnyOf(Matcher1 m1, Matcher2 m2) {
- return internal::EitherOfMatcher<Matcher1, Matcher2>(m1, m2);
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- Matcher3> >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, Matcher4> > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- Matcher5> > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, Matcher6> > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- Matcher7> > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- internal::EitherOfMatcher<Matcher7, Matcher8> > > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7, m8));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- internal::EitherOfMatcher<Matcher7, internal::EitherOfMatcher<Matcher8,
- Matcher9> > > > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7, m8, m9));
-}
-
-template <typename Matcher1, typename Matcher2, typename Matcher3,
- typename Matcher4, typename Matcher5, typename Matcher6, typename Matcher7,
- typename Matcher8, typename Matcher9, typename Matcher10>
-inline internal::EitherOfMatcher<Matcher1, internal::EitherOfMatcher<Matcher2,
- internal::EitherOfMatcher<Matcher3, internal::EitherOfMatcher<Matcher4,
- internal::EitherOfMatcher<Matcher5, internal::EitherOfMatcher<Matcher6,
- internal::EitherOfMatcher<Matcher7, internal::EitherOfMatcher<Matcher8,
- internal::EitherOfMatcher<Matcher9, Matcher10> > > > > > > > >
-AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5,
- Matcher6 m6, Matcher7 m7, Matcher8 m8, Matcher9 m9, Matcher10 m10) {
- return ::testing::AnyOf(m1, ::testing::AnyOf(m2, m3, m4, m5, m6, m7, m8, m9,
- m10));
-}
-
-} // namespace testing
-
-
-// The MATCHER* family of macros can be used in a namespace scope to
-// define custom matchers easily.
-//
-// Basic Usage
-// ===========
-//
-// The syntax
-//
-// MATCHER(name, description_string) { statements; }
-//
-// defines a matcher with the given name that executes the statements,
-// which must return a bool to indicate if the match succeeds. Inside
-// the statements, you can refer to the value being matched by 'arg',
-// and refer to its type by 'arg_type'.
-//
-// The description string documents what the matcher does, and is used
-// to generate the failure message when the match fails. Since a
-// MATCHER() is usually defined in a header file shared by multiple
-// C++ source files, we require the description to be a C-string
-// literal to avoid possible side effects. It can be empty, in which
-// case we'll use the sequence of words in the matcher name as the
-// description.
-//
-// For example:
-//
-// MATCHER(IsEven, "") { return (arg % 2) == 0; }
-//
-// allows you to write
-//
-// // Expects mock_foo.Bar(n) to be called where n is even.
-// EXPECT_CALL(mock_foo, Bar(IsEven()));
-//
-// or,
-//
-// // Verifies that the value of some_expression is even.
-// EXPECT_THAT(some_expression, IsEven());
-//
-// If the above assertion fails, it will print something like:
-//
-// Value of: some_expression
-// Expected: is even
-// Actual: 7
-//
-// where the description "is even" is automatically calculated from the
-// matcher name IsEven.
-//
-// Argument Type
-// =============
-//
-// Note that the type of the value being matched (arg_type) is
-// determined by the context in which you use the matcher and is
-// supplied to you by the compiler, so you don't need to worry about
-// declaring it (nor can you). This allows the matcher to be
-// polymorphic. For example, IsEven() can be used to match any type
-// where the value of "(arg % 2) == 0" can be implicitly converted to
-// a bool. In the "Bar(IsEven())" example above, if method Bar()
-// takes an int, 'arg_type' will be int; if it takes an unsigned long,
-// 'arg_type' will be unsigned long; and so on.
-//
-// Parameterizing Matchers
-// =======================
-//
-// Sometimes you'll want to parameterize the matcher. For that you
-// can use another macro:
-//
-// MATCHER_P(name, param_name, description_string) { statements; }
-//
-// For example:
-//
-// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; }
-//
-// will allow you to write:
-//
-// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n));
-//
-// which may lead to this message (assuming n is 10):
-//
-// Value of: Blah("a")
-// Expected: has absolute value 10
-// Actual: -9
-//
-// Note that both the matcher description and its parameter are
-// printed, making the message human-friendly.
-//
-// In the matcher definition body, you can write 'foo_type' to
-// reference the type of a parameter named 'foo'. For example, in the
-// body of MATCHER_P(HasAbsoluteValue, value) above, you can write
-// 'value_type' to refer to the type of 'value'.
-//
-// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to
-// support multi-parameter matchers.
-//
-// Describing Parameterized Matchers
-// =================================
-//
-// The last argument to MATCHER*() is a string-typed expression. The
-// expression can reference all of the matcher's parameters and a
-// special bool-typed variable named 'negation'. When 'negation' is
-// false, the expression should evaluate to the matcher's description;
-// otherwise it should evaluate to the description of the negation of
-// the matcher. For example,
-//
-// using testing::PrintToString;
-//
-// MATCHER_P2(InClosedRange, low, hi,
-// string(negation ? "is not" : "is") + " in range [" +
-// PrintToString(low) + ", " + PrintToString(hi) + "]") {
-// return low <= arg && arg <= hi;
-// }
-// ...
-// EXPECT_THAT(3, InClosedRange(4, 6));
-// EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-// Expected: is in range [4, 6]
-// ...
-// Expected: is not in range [2, 4]
-//
-// If you specify "" as the description, the failure message will
-// contain the sequence of words in the matcher name followed by the
-// parameter values printed as a tuple. For example,
-//
-// MATCHER_P2(InClosedRange, low, hi, "") { ... }
-// ...
-// EXPECT_THAT(3, InClosedRange(4, 6));
-// EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-// Expected: in closed range (4, 6)
-// ...
-// Expected: not (in closed range (2, 4))
-//
-// Types of Matcher Parameters
-// ===========================
-//
-// For the purpose of typing, you can view
-//
-// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }
-//
-// as shorthand for
-//
-// template <typename p1_type, ..., typename pk_type>
-// FooMatcherPk<p1_type, ..., pk_type>
-// Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// When you write Foo(v1, ..., vk), the compiler infers the types of
-// the parameters v1, ..., and vk for you. If you are not happy with
-// the result of the type inference, you can specify the types by
-// explicitly instantiating the template, as in Foo<long, bool>(5,
-// false). As said earlier, you don't get to (or need to) specify
-// 'arg_type' as that's determined by the context in which the matcher
-// is used. You can assign the result of expression Foo(p1, ..., pk)
-// to a variable of type FooMatcherPk<p1_type, ..., pk_type>. This
-// can be useful when composing matchers.
-//
-// While you can instantiate a matcher template with reference types,
-// passing the parameters by pointer usually makes your code more
-// readable. If, however, you still want to pass a parameter by
-// reference, be aware that in the failure message generated by the
-// matcher you will see the value of the referenced object but not its
-// address.
-//
-// Explaining Match Results
-// ========================
-//
-// Sometimes the matcher description alone isn't enough to explain why
-// the match has failed or succeeded. For example, when expecting a
-// long string, it can be very helpful to also print the diff between
-// the expected string and the actual one. To achieve that, you can
-// optionally stream additional information to a special variable
-// named result_listener, whose type is a pointer to class
-// MatchResultListener:
-//
-// MATCHER_P(EqualsLongString, str, "") {
-// if (arg == str) return true;
-//
-// *result_listener << "the difference: "
-/// << DiffStrings(str, arg);
-// return false;
-// }
-//
-// Overloading Matchers
-// ====================
-//
-// You can overload matchers with different numbers of parameters:
-//
-// MATCHER_P(Blah, a, description_string1) { ... }
-// MATCHER_P2(Blah, a, b, description_string2) { ... }
-//
-// Caveats
-// =======
-//
-// When defining a new matcher, you should also consider implementing
-// MatcherInterface or using MakePolymorphicMatcher(). These
-// approaches require more work than the MATCHER* macros, but also
-// give you more control on the types of the value being matched and
-// the matcher parameters, which may leads to better compiler error
-// messages when the matcher is used wrong. They also allow
-// overloading matchers based on parameter types (as opposed to just
-// based on the number of parameters).
-//
-// MATCHER*() can only be used in a namespace scope. The reason is
-// that C++ doesn't yet allow function-local types to be used to
-// instantiate templates. The up-coming C++0x standard will fix this.
-// Once that's done, we'll consider supporting using MATCHER*() inside
-// a function.
-//
-// More Information
-// ================
-//
-// To learn more about using these macros, please search for 'MATCHER'
-// on http://code.google.com/p/googlemock/wiki/CookBook.
-
-#define MATCHER(name, description)\
- class name##Matcher {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl()\
- {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<>()));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>());\
- }\
- name##Matcher() {\
- }\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##Matcher);\
- };\
- inline name##Matcher name() {\
- return name##Matcher();\
- }\
- template <typename arg_type>\
- bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P(name, p0, description)\
- template <typename p0##_type>\
- class name##MatcherP {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- explicit gmock_Impl(p0##_type gmock_p0)\
- : p0(gmock_p0) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type>(p0)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0));\
- }\
- name##MatcherP(p0##_type gmock_p0) : p0(gmock_p0) {\
- }\
- p0##_type p0;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP);\
- };\
- template <typename p0##_type>\
- inline name##MatcherP<p0##_type> name(p0##_type p0) {\
- return name##MatcherP<p0##_type>(p0);\
- }\
- template <typename p0##_type>\
- template <typename arg_type>\
- bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P2(name, p0, p1, description)\
- template <typename p0##_type, typename p1##_type>\
- class name##MatcherP2 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
- : p0(gmock_p0), p1(gmock_p1) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type>(p0, p1)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1));\
- }\
- name##MatcherP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
- p1(gmock_p1) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP2);\
- };\
- template <typename p0##_type, typename p1##_type>\
- inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
- p1##_type p1) {\
- return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\
- }\
- template <typename p0##_type, typename p1##_type>\
- template <typename arg_type>\
- bool name##MatcherP2<p0##_type, \
- p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P3(name, p0, p1, p2, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- class name##MatcherP3 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
- p2)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2));\
- }\
- name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP3);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2) {\
- return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type>\
- template <typename arg_type>\
- bool name##MatcherP3<p0##_type, p1##_type, \
- p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P4(name, p0, p1, p2, p3, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- class name##MatcherP4 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, \
- p3##_type>(p0, p1, p2, p3)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3));\
- }\
- name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP4);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \
- p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3) {\
- return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
- p1, p2, p3);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type>\
- template <typename arg_type>\
- bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
- p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- class name##MatcherP5 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>(p0, p1, p2, p3, p4)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\
- }\
- name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, \
- p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP5);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4) {\
- return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>(p0, p1, p2, p3, p4);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type>\
- template <typename arg_type>\
- bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- class name##MatcherP6 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\
- }\
- name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP6);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
- p3##_type p3, p4##_type p4, p5##_type p5) {\
- return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type>\
- template <typename arg_type>\
- bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- class name##MatcherP7 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
- p6)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\
- }\
- name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
- p6(gmock_p6) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP7);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
- p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6) {\
- return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type>\
- template <typename arg_type>\
- bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- class name##MatcherP8 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
- p3, p4, p5, p6, p7)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\
- }\
- name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, \
- p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP8);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
- p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
- p6##_type p6, p7##_type p7) {\
- return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
- p6, p7);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type>\
- template <typename arg_type>\
- bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, \
- p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- class name##MatcherP9 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, \
- p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\
- }\
- name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
- p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP9);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, \
- p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
- p8##_type p8) {\
- return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
- p3, p4, p5, p6, p7, p8);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type>\
- template <typename arg_type>\
- bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
- p5##_type, p6##_type, p7##_type, \
- p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- class name##MatcherP10 {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
- p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
- p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
- p9##_type gmock_p9)\
- : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \
- p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
- p8(gmock_p8), p9(gmock_p9) {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\
- }\
- name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
- p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
- p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
- p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
- p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
- p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {\
- }\
- p0##_type p0;\
- p1##_type p1;\
- p2##_type p2;\
- p3##_type p3;\
- p4##_type p4;\
- p5##_type p5;\
- p6##_type p6;\
- p7##_type p7;\
- p8##_type p8;\
- p9##_type p9;\
- private:\
- GTEST_DISALLOW_ASSIGN_(name##MatcherP10);\
- };\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
- p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
- p9##_type p9) {\
- return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
- p1, p2, p3, p4, p5, p6, p7, p8, p9);\
- }\
- template <typename p0##_type, typename p1##_type, typename p2##_type, \
- typename p3##_type, typename p4##_type, typename p5##_type, \
- typename p6##_type, typename p7##_type, typename p8##_type, \
- typename p9##_type>\
- template <typename arg_type>\
- bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
- p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
- p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h.pump
deleted file mode 100644
index 8c09444c1..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-matchers.h.pump
+++ /dev/null
@@ -1,651 +0,0 @@
-$$ -*- mode: c++; -*-
-$$ This is a Pump source file. Please use Pump to convert it to
-$$ gmock-generated-actions.h.
-$$
-$var n = 10 $$ The maximum arity we support.
-$$ }} This line fixes auto-indentation of the following code in Emacs.
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic matchers.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
-
-#include <sstream>
-#include <string>
-#include <vector>
-#include "gmock/gmock-matchers.h"
-
-namespace testing {
-namespace internal {
-
-$range i 0..n-1
-
-// The type of the i-th (0-based) field of Tuple.
-#define GMOCK_FIELD_TYPE_(Tuple, i) \
- typename ::std::tr1::tuple_element<i, Tuple>::type
-
-// TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
-// tuple of type Tuple. It has two members:
-//
-// type: a tuple type whose i-th field is the ki-th field of Tuple.
-// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple.
-//
-// For example, in class TupleFields<tuple<bool, char, int>, 2, 0>, we have:
-//
-// type is tuple<int, bool>, and
-// GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true).
-
-template <class Tuple$for i [[, int k$i = -1]]>
-class TupleFields;
-
-// This generic version is used when there are $n selectors.
-template <class Tuple$for i [[, int k$i]]>
-class TupleFields {
- public:
- typedef ::std::tr1::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type;
- static type GetSelectedFields(const Tuple& t) {
- using ::std::tr1::get;
- return type($for i, [[get<k$i>(t)]]);
- }
-};
-
-// The following specialization is used for 0 ~ $(n-1) selectors.
-
-$for i [[
-$$ }}}
-$range j 0..i-1
-$range k 0..n-1
-
-template <class Tuple$for j [[, int k$j]]>
-class TupleFields<Tuple, $for k, [[$if k < i [[k$k]] $else [[-1]]]]> {
- public:
- typedef ::std::tr1::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type;
- static type GetSelectedFields(const Tuple& $if i==0 [[/* t */]] $else [[t]]) {
- using ::std::tr1::get;
- return type($for j, [[get<k$j>(t)]]);
- }
-};
-
-]]
-
-#undef GMOCK_FIELD_TYPE_
-
-// Implements the Args() matcher.
-
-$var ks = [[$for i, [[k$i]]]]
-template <class ArgsTuple$for i [[, int k$i = -1]]>
-class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {
- public:
- // ArgsTuple may have top-level const or reference modifiers.
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple;
- typedef typename internal::TupleFields<RawArgsTuple, $ks>::type SelectedArgs;
- typedef Matcher<const SelectedArgs&> MonomorphicInnerMatcher;
-
- template <typename InnerMatcher>
- explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
- : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
-
- virtual bool MatchAndExplain(ArgsTuple args,
- MatchResultListener* listener) const {
- const SelectedArgs& selected_args = GetSelectedArgs(args);
- if (!listener->IsInterested())
- return inner_matcher_.Matches(selected_args);
-
- PrintIndices(listener->stream());
- *listener << "are " << PrintToString(selected_args);
-
- StringMatchResultListener inner_listener;
- const bool match = inner_matcher_.MatchAndExplain(selected_args,
- &inner_listener);
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return match;
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "are a tuple ";
- PrintIndices(os);
- inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "are a tuple ";
- PrintIndices(os);
- inner_matcher_.DescribeNegationTo(os);
- }
-
- private:
- static SelectedArgs GetSelectedArgs(ArgsTuple args) {
- return TupleFields<RawArgsTuple, $ks>::GetSelectedFields(args);
- }
-
- // Prints the indices of the selected fields.
- static void PrintIndices(::std::ostream* os) {
- *os << "whose fields (";
- const int indices[$n] = { $ks };
- for (int i = 0; i < $n; i++) {
- if (indices[i] < 0)
- break;
-
- if (i >= 1)
- *os << ", ";
-
- *os << "#" << indices[i];
- }
- *os << ") ";
- }
-
- const MonomorphicInnerMatcher inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl);
-};
-
-template <class InnerMatcher$for i [[, int k$i = -1]]>
-class ArgsMatcher {
- public:
- explicit ArgsMatcher(const InnerMatcher& inner_matcher)
- : inner_matcher_(inner_matcher) {}
-
- template <typename ArgsTuple>
- operator Matcher<ArgsTuple>() const {
- return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, $ks>(inner_matcher_));
- }
-
- private:
- const InnerMatcher inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ArgsMatcher);
-};
-
-// Implements ElementsAre() of 1-$n arguments.
-
-
-$range i 1..n
-$for i [[
-$range j 1..i
-template <$for j, [[typename T$j]]>
-class ElementsAreMatcher$i {
- public:
- $if i==1 [[explicit ]]ElementsAreMatcher$i($for j, [[const T$j& e$j]])$if i > 0 [[ : ]]
- $for j, [[e$j[[]]_(e$j)]] {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
-$if i==1 [[
-
- // Nokia's Symbian Compiler has a nasty bug where the object put
- // in a one-element local array is not destructed when the array
- // goes out of scope. This leads to obvious badness as we've
- // added the linked_ptr in it to our other linked_ptrs list.
- // Hence we implement ElementsAreMatcher1 specially to avoid using
- // a local array.
- const Matcher<const Element&> matcher =
- MatcherCast<const Element&>(e1_);
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(&matcher, 1));
-]] $else [[
-
- const Matcher<const Element&> matchers[] = {
-
-$for j [[
- MatcherCast<const Element&>(e$j[[]]_),
-
-]]
- };
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, $i));
-]]
-
- }
-
- private:
-
-$for j [[
- const T$j& e$j[[]]_;
-
-]]
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher$i);
-};
-
-
-]]
-} // namespace internal
-
-// Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected
-// fields of it matches a_matcher. C++ doesn't support default
-// arguments for function templates, so we have to overload it.
-
-$range i 0..n
-$for i [[
-$range j 1..i
-template <$for j [[int k$j, ]]typename InnerMatcher>
-inline internal::ArgsMatcher<InnerMatcher$for j [[, k$j]]>
-Args(const InnerMatcher& matcher) {
- return internal::ArgsMatcher<InnerMatcher$for j [[, k$j]]>(matcher);
-}
-
-
-]]
-// ElementsAre(e0, e1, ..., e_n) matches an STL-style container with
-// (n + 1) elements, where the i-th element in the container must
-// match the i-th argument in the list. Each argument of
-// ElementsAre() can be either a value or a matcher. We support up to
-// $n arguments.
-//
-// NOTE: Since ElementsAre() cares about the order of the elements, it
-// must not be used with containers whose elements's order is
-// undefined (e.g. hash_map).
-
-inline internal::ElementsAreMatcher0 ElementsAre() {
- return internal::ElementsAreMatcher0();
-}
-
-$range i 1..n
-$for i [[
-$range j 1..i
-
-template <$for j, [[typename T$j]]>
-inline internal::ElementsAreMatcher$i<$for j, [[T$j]]> ElementsAre($for j, [[const T$j& e$j]]) {
- return internal::ElementsAreMatcher$i<$for j, [[T$j]]>($for j, [[e$j]]);
-}
-
-]]
-
-// ElementsAreArray(array) and ElementAreArray(array, count) are like
-// ElementsAre(), except that they take an array of values or
-// matchers. The former form infers the size of 'array', which must
-// be a static C-style array. In the latter form, 'array' can either
-// be a static array or a pointer to a dynamically created array.
-
-template <typename T>
-inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
- const T* first, size_t count) {
- return internal::ElementsAreArrayMatcher<T>(first, count);
-}
-
-template <typename T, size_t N>
-inline internal::ElementsAreArrayMatcher<T>
-ElementsAreArray(const T (&array)[N]) {
- return internal::ElementsAreArrayMatcher<T>(array, N);
-}
-
-// AllOf(m1, m2, ..., mk) matches any value that matches all of the given
-// sub-matchers. AllOf is called fully qualified to prevent ADL from firing.
-
-$range i 2..n
-$for i [[
-$range j 1..i
-$range k 1..i-1
-
-template <$for j, [[typename Matcher$j]]>
-inline $for k[[internal::BothOfMatcher<Matcher$k, ]]Matcher$i[[]]$for k [[> ]]
-
-AllOf($for j, [[Matcher$j m$j]]) {
-
-$if i == 2 [[
- return internal::BothOfMatcher<Matcher1, Matcher2>(m1, m2);
-]] $else [[
- return ::testing::AllOf(m1, ::testing::AllOf($for k, [[m$(k + 1)]]));
-]]
-
-}
-
-]]
-
-// AnyOf(m1, m2, ..., mk) matches any value that matches any of the given
-// sub-matchers. AnyOf is called fully qualified to prevent ADL from firing.
-
-$range i 2..n
-$for i [[
-$range j 1..i
-$range k 1..i-1
-
-template <$for j, [[typename Matcher$j]]>
-inline $for k[[internal::EitherOfMatcher<Matcher$k, ]]Matcher$i[[]]$for k [[> ]]
-
-AnyOf($for j, [[Matcher$j m$j]]) {
-
-$if i == 2 [[
- return internal::EitherOfMatcher<Matcher1, Matcher2>(m1, m2);
-]] $else [[
- return ::testing::AnyOf(m1, ::testing::AnyOf($for k, [[m$(k + 1)]]));
-]]
-
-}
-
-]]
-
-} // namespace testing
-$$ } // This Pump meta comment fixes auto-indentation in Emacs. It will not
-$$ // show up in the generated code.
-
-
-// The MATCHER* family of macros can be used in a namespace scope to
-// define custom matchers easily.
-//
-// Basic Usage
-// ===========
-//
-// The syntax
-//
-// MATCHER(name, description_string) { statements; }
-//
-// defines a matcher with the given name that executes the statements,
-// which must return a bool to indicate if the match succeeds. Inside
-// the statements, you can refer to the value being matched by 'arg',
-// and refer to its type by 'arg_type'.
-//
-// The description string documents what the matcher does, and is used
-// to generate the failure message when the match fails. Since a
-// MATCHER() is usually defined in a header file shared by multiple
-// C++ source files, we require the description to be a C-string
-// literal to avoid possible side effects. It can be empty, in which
-// case we'll use the sequence of words in the matcher name as the
-// description.
-//
-// For example:
-//
-// MATCHER(IsEven, "") { return (arg % 2) == 0; }
-//
-// allows you to write
-//
-// // Expects mock_foo.Bar(n) to be called where n is even.
-// EXPECT_CALL(mock_foo, Bar(IsEven()));
-//
-// or,
-//
-// // Verifies that the value of some_expression is even.
-// EXPECT_THAT(some_expression, IsEven());
-//
-// If the above assertion fails, it will print something like:
-//
-// Value of: some_expression
-// Expected: is even
-// Actual: 7
-//
-// where the description "is even" is automatically calculated from the
-// matcher name IsEven.
-//
-// Argument Type
-// =============
-//
-// Note that the type of the value being matched (arg_type) is
-// determined by the context in which you use the matcher and is
-// supplied to you by the compiler, so you don't need to worry about
-// declaring it (nor can you). This allows the matcher to be
-// polymorphic. For example, IsEven() can be used to match any type
-// where the value of "(arg % 2) == 0" can be implicitly converted to
-// a bool. In the "Bar(IsEven())" example above, if method Bar()
-// takes an int, 'arg_type' will be int; if it takes an unsigned long,
-// 'arg_type' will be unsigned long; and so on.
-//
-// Parameterizing Matchers
-// =======================
-//
-// Sometimes you'll want to parameterize the matcher. For that you
-// can use another macro:
-//
-// MATCHER_P(name, param_name, description_string) { statements; }
-//
-// For example:
-//
-// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; }
-//
-// will allow you to write:
-//
-// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n));
-//
-// which may lead to this message (assuming n is 10):
-//
-// Value of: Blah("a")
-// Expected: has absolute value 10
-// Actual: -9
-//
-// Note that both the matcher description and its parameter are
-// printed, making the message human-friendly.
-//
-// In the matcher definition body, you can write 'foo_type' to
-// reference the type of a parameter named 'foo'. For example, in the
-// body of MATCHER_P(HasAbsoluteValue, value) above, you can write
-// 'value_type' to refer to the type of 'value'.
-//
-// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P$n to
-// support multi-parameter matchers.
-//
-// Describing Parameterized Matchers
-// =================================
-//
-// The last argument to MATCHER*() is a string-typed expression. The
-// expression can reference all of the matcher's parameters and a
-// special bool-typed variable named 'negation'. When 'negation' is
-// false, the expression should evaluate to the matcher's description;
-// otherwise it should evaluate to the description of the negation of
-// the matcher. For example,
-//
-// using testing::PrintToString;
-//
-// MATCHER_P2(InClosedRange, low, hi,
-// string(negation ? "is not" : "is") + " in range [" +
-// PrintToString(low) + ", " + PrintToString(hi) + "]") {
-// return low <= arg && arg <= hi;
-// }
-// ...
-// EXPECT_THAT(3, InClosedRange(4, 6));
-// EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-// Expected: is in range [4, 6]
-// ...
-// Expected: is not in range [2, 4]
-//
-// If you specify "" as the description, the failure message will
-// contain the sequence of words in the matcher name followed by the
-// parameter values printed as a tuple. For example,
-//
-// MATCHER_P2(InClosedRange, low, hi, "") { ... }
-// ...
-// EXPECT_THAT(3, InClosedRange(4, 6));
-// EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-// Expected: in closed range (4, 6)
-// ...
-// Expected: not (in closed range (2, 4))
-//
-// Types of Matcher Parameters
-// ===========================
-//
-// For the purpose of typing, you can view
-//
-// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }
-//
-// as shorthand for
-//
-// template <typename p1_type, ..., typename pk_type>
-// FooMatcherPk<p1_type, ..., pk_type>
-// Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// When you write Foo(v1, ..., vk), the compiler infers the types of
-// the parameters v1, ..., and vk for you. If you are not happy with
-// the result of the type inference, you can specify the types by
-// explicitly instantiating the template, as in Foo<long, bool>(5,
-// false). As said earlier, you don't get to (or need to) specify
-// 'arg_type' as that's determined by the context in which the matcher
-// is used. You can assign the result of expression Foo(p1, ..., pk)
-// to a variable of type FooMatcherPk<p1_type, ..., pk_type>. This
-// can be useful when composing matchers.
-//
-// While you can instantiate a matcher template with reference types,
-// passing the parameters by pointer usually makes your code more
-// readable. If, however, you still want to pass a parameter by
-// reference, be aware that in the failure message generated by the
-// matcher you will see the value of the referenced object but not its
-// address.
-//
-// Explaining Match Results
-// ========================
-//
-// Sometimes the matcher description alone isn't enough to explain why
-// the match has failed or succeeded. For example, when expecting a
-// long string, it can be very helpful to also print the diff between
-// the expected string and the actual one. To achieve that, you can
-// optionally stream additional information to a special variable
-// named result_listener, whose type is a pointer to class
-// MatchResultListener:
-//
-// MATCHER_P(EqualsLongString, str, "") {
-// if (arg == str) return true;
-//
-// *result_listener << "the difference: "
-/// << DiffStrings(str, arg);
-// return false;
-// }
-//
-// Overloading Matchers
-// ====================
-//
-// You can overload matchers with different numbers of parameters:
-//
-// MATCHER_P(Blah, a, description_string1) { ... }
-// MATCHER_P2(Blah, a, b, description_string2) { ... }
-//
-// Caveats
-// =======
-//
-// When defining a new matcher, you should also consider implementing
-// MatcherInterface or using MakePolymorphicMatcher(). These
-// approaches require more work than the MATCHER* macros, but also
-// give you more control on the types of the value being matched and
-// the matcher parameters, which may leads to better compiler error
-// messages when the matcher is used wrong. They also allow
-// overloading matchers based on parameter types (as opposed to just
-// based on the number of parameters).
-//
-// MATCHER*() can only be used in a namespace scope. The reason is
-// that C++ doesn't yet allow function-local types to be used to
-// instantiate templates. The up-coming C++0x standard will fix this.
-// Once that's done, we'll consider supporting using MATCHER*() inside
-// a function.
-//
-// More Information
-// ================
-//
-// To learn more about using these macros, please search for 'MATCHER'
-// on http://code.google.com/p/googlemock/wiki/CookBook.
-
-$range i 0..n
-$for i
-
-[[
-$var macro_name = [[$if i==0 [[MATCHER]] $elif i==1 [[MATCHER_P]]
- $else [[MATCHER_P$i]]]]
-$var class_name = [[name##Matcher[[$if i==0 [[]] $elif i==1 [[P]]
- $else [[P$i]]]]]]
-$range j 0..i-1
-$var template = [[$if i==0 [[]] $else [[
-
- template <$for j, [[typename p$j##_type]]>\
-]]]]
-$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]]
-$var impl_ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]]
-$var impl_inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]]
-$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]]
-$var params = [[$for j, [[p$j]]]]
-$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]]
-$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]]
-$var param_field_decls = [[$for j
-[[
-
- p$j##_type p$j;\
-]]]]
-$var param_field_decls2 = [[$for j
-[[
-
- p$j##_type p$j;\
-]]]]
-
-#define $macro_name(name$for j [[, p$j]], description)\$template
- class $class_name {\
- public:\
- template <typename arg_type>\
- class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\
- public:\
- [[$if i==1 [[explicit ]]]]gmock_Impl($impl_ctor_param_list)\
- $impl_inits {}\
- virtual bool MatchAndExplain(\
- arg_type arg, ::testing::MatchResultListener* result_listener) const;\
- virtual void DescribeTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(false);\
- }\
- virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
- *gmock_os << FormatDescription(true);\
- }\$param_field_decls
- private:\
- ::testing::internal::string FormatDescription(bool negation) const {\
- const ::testing::internal::string gmock_description = (description);\
- if (!gmock_description.empty())\
- return gmock_description;\
- return ::testing::internal::FormatMatcherDescription(\
- negation, #name,\
- ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
- ::std::tr1::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]])));\
- }\
- GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
- };\
- template <typename arg_type>\
- operator ::testing::Matcher<arg_type>() const {\
- return ::testing::Matcher<arg_type>(\
- new gmock_Impl<arg_type>($params));\
- }\
- $class_name($ctor_param_list)$inits {\
- }\$param_field_decls2
- private:\
- GTEST_DISALLOW_ASSIGN_($class_name);\
- };\$template
- inline $class_name$param_types name($param_types_and_names) {\
- return $class_name$param_types($params);\
- }\$template
- template <typename arg_type>\
- bool $class_name$param_types::gmock_Impl<arg_type>::MatchAndExplain(\
- arg_type arg,\
- ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
- const
-]]
-
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h
deleted file mode 100644
index 6099e81e3..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h
+++ /dev/null
@@ -1,274 +0,0 @@
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements class templates NiceMock and StrictMock.
-//
-// Given a mock class MockFoo that is created using Google Mock,
-// NiceMock<MockFoo> is a subclass of MockFoo that allows
-// uninteresting calls (i.e. calls to mock methods that have no
-// EXPECT_CALL specs), and StrictMock<MockFoo> is a subclass of
-// MockFoo that treats all uninteresting calls as errors.
-//
-// NiceMock and StrictMock "inherits" the constructors of their
-// respective base class, with up-to 10 arguments. Therefore you can
-// write NiceMock<MockFoo>(5, "a") to construct a nice mock where
-// MockFoo has a constructor that accepts (int, const char*), for
-// example.
-//
-// A known limitation is that NiceMock<MockFoo> and
-// StrictMock<MockFoo> only works for mock methods defined using the
-// MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. If a
-// mock method is defined in a base class of MockFoo, the "nice" or
-// "strict" modifier may not affect it, depending on the compiler. In
-// particular, nesting NiceMock and StrictMock is NOT supported.
-//
-// Another known limitation is that the constructors of the base mock
-// cannot have arguments passed by non-const reference, which are
-// banned by the Google C++ style guide anyway.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-
-#include "gmock/gmock-spec-builders.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-
-template <class MockClass>
-class NiceMock : public MockClass {
- public:
- // We don't factor out the constructor body to a common method, as
- // we have to avoid a possible clash with members of MockClass.
- NiceMock() {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- // C++ doesn't (yet) allow inheritance of constructors, so we have
- // to define it for each arity.
- template <typename A1>
- explicit NiceMock(const A1& a1) : MockClass(a1) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
- template <typename A1, typename A2>
- NiceMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3>
- NiceMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4>
- NiceMock(const A1& a1, const A2& a2, const A3& a3,
- const A4& a4) : MockClass(a1, a2, a3, a4) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
- a6, a7) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
- a2, a3, a4, a5, a6, a7, a8) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8,
- const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9, typename A10>
- NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
- const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- virtual ~NiceMock() {
- ::testing::Mock::UnregisterCallReaction(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock);
-};
-
-template <class MockClass>
-class StrictMock : public MockClass {
- public:
- // We don't factor out the constructor body to a common method, as
- // we have to avoid a possible clash with members of MockClass.
- StrictMock() {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1>
- explicit StrictMock(const A1& a1) : MockClass(a1) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
- template <typename A1, typename A2>
- StrictMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3>
- StrictMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4>
- StrictMock(const A1& a1, const A2& a2, const A3& a3,
- const A4& a4) : MockClass(a1, a2, a3, a4) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
- a6, a7) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
- a2, a3, a4, a5, a6, a7, a8) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8,
- const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9, typename A10>
- StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
- const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
- const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- virtual ~StrictMock() {
- ::testing::Mock::UnregisterCallReaction(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock);
-};
-
-// The following specializations catch some (relatively more common)
-// user errors of nesting nice and strict mocks. They do NOT catch
-// all possible errors.
-
-// These specializations are declared but not defined, as NiceMock and
-// StrictMock cannot be nested.
-template <typename MockClass>
-class NiceMock<NiceMock<MockClass> >;
-template <typename MockClass>
-class NiceMock<StrictMock<MockClass> >;
-template <typename MockClass>
-class StrictMock<NiceMock<MockClass> >;
-template <typename MockClass>
-class StrictMock<StrictMock<MockClass> >;
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h.pump
deleted file mode 100644
index b7964db32..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-generated-nice-strict.h.pump
+++ /dev/null
@@ -1,160 +0,0 @@
-$$ -*- mode: c++; -*-
-$$ This is a Pump source file. Please use Pump to convert it to
-$$ gmock-generated-nice-strict.h.
-$$
-$var n = 10 $$ The maximum arity we support.
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Implements class templates NiceMock and StrictMock.
-//
-// Given a mock class MockFoo that is created using Google Mock,
-// NiceMock<MockFoo> is a subclass of MockFoo that allows
-// uninteresting calls (i.e. calls to mock methods that have no
-// EXPECT_CALL specs), and StrictMock<MockFoo> is a subclass of
-// MockFoo that treats all uninteresting calls as errors.
-//
-// NiceMock and StrictMock "inherits" the constructors of their
-// respective base class, with up-to $n arguments. Therefore you can
-// write NiceMock<MockFoo>(5, "a") to construct a nice mock where
-// MockFoo has a constructor that accepts (int, const char*), for
-// example.
-//
-// A known limitation is that NiceMock<MockFoo> and
-// StrictMock<MockFoo> only works for mock methods defined using the
-// MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. If a
-// mock method is defined in a base class of MockFoo, the "nice" or
-// "strict" modifier may not affect it, depending on the compiler. In
-// particular, nesting NiceMock and StrictMock is NOT supported.
-//
-// Another known limitation is that the constructors of the base mock
-// cannot have arguments passed by non-const reference, which are
-// banned by the Google C++ style guide anyway.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
-
-#include "gmock/gmock-spec-builders.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-
-template <class MockClass>
-class NiceMock : public MockClass {
- public:
- // We don't factor out the constructor body to a common method, as
- // we have to avoid a possible clash with members of MockClass.
- NiceMock() {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- // C++ doesn't (yet) allow inheritance of constructors, so we have
- // to define it for each arity.
- template <typename A1>
- explicit NiceMock(const A1& a1) : MockClass(a1) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
-$range i 2..n
-$for i [[
-$range j 1..i
- template <$for j, [[typename A$j]]>
- NiceMock($for j, [[const A$j& a$j]]) : MockClass($for j, [[a$j]]) {
- ::testing::Mock::AllowUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
-
-]]
- virtual ~NiceMock() {
- ::testing::Mock::UnregisterCallReaction(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock);
-};
-
-template <class MockClass>
-class StrictMock : public MockClass {
- public:
- // We don't factor out the constructor body to a common method, as
- // we have to avoid a possible clash with members of MockClass.
- StrictMock() {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- template <typename A1>
- explicit StrictMock(const A1& a1) : MockClass(a1) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
-$for i [[
-$range j 1..i
- template <$for j, [[typename A$j]]>
- StrictMock($for j, [[const A$j& a$j]]) : MockClass($for j, [[a$j]]) {
- ::testing::Mock::FailUninterestingCalls(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
-
-]]
- virtual ~StrictMock() {
- ::testing::Mock::UnregisterCallReaction(
- internal::ImplicitCast_<MockClass*>(this));
- }
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock);
-};
-
-// The following specializations catch some (relatively more common)
-// user errors of nesting nice and strict mocks. They do NOT catch
-// all possible errors.
-
-// These specializations are declared but not defined, as NiceMock and
-// StrictMock cannot be nested.
-template <typename MockClass>
-class NiceMock<NiceMock<MockClass> >;
-template <typename MockClass>
-class NiceMock<StrictMock<MockClass> >;
-template <typename MockClass>
-class StrictMock<NiceMock<MockClass> >;
-template <typename MockClass>
-class StrictMock<StrictMock<MockClass> >;
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-matchers.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-matchers.h
deleted file mode 100644
index c21fa515f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-matchers.h
+++ /dev/null
@@ -1,3066 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used argument matchers. More
-// matchers can be defined by the user implementing the
-// MatcherInterface<T> interface if necessary.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-
-#include <algorithm>
-#include <limits>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-
-// To implement a matcher Foo for type T, define:
-// 1. a class FooMatcherImpl that implements the
-// MatcherInterface<T> interface, and
-// 2. a factory function that creates a Matcher<T> object from a
-// FooMatcherImpl*.
-//
-// The two-level delegation design makes it possible to allow a user
-// to write "v" instead of "Eq(v)" where a Matcher is expected, which
-// is impossible if we pass matchers by pointers. It also eases
-// ownership management as Matcher objects can now be copied like
-// plain values.
-
-// MatchResultListener is an abstract class. Its << operator can be
-// used by a matcher to explain why a value matches or doesn't match.
-//
-// TODO(wan@google.com): add method
-// bool InterestedInWhy(bool result) const;
-// to indicate whether the listener is interested in why the match
-// result is 'result'.
-class MatchResultListener {
- public:
- // Creates a listener object with the given underlying ostream. The
- // listener does not own the ostream.
- explicit MatchResultListener(::std::ostream* os) : stream_(os) {}
- virtual ~MatchResultListener() = 0; // Makes this class abstract.
-
- // Streams x to the underlying ostream; does nothing if the ostream
- // is NULL.
- template <typename T>
- MatchResultListener& operator<<(const T& x) {
- if (stream_ != NULL)
- *stream_ << x;
- return *this;
- }
-
- // Returns the underlying ostream.
- ::std::ostream* stream() { return stream_; }
-
- // Returns true iff the listener is interested in an explanation of
- // the match result. A matcher's MatchAndExplain() method can use
- // this information to avoid generating the explanation when no one
- // intends to hear it.
- bool IsInterested() const { return stream_ != NULL; }
-
- private:
- ::std::ostream* const stream_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener);
-};
-
-inline MatchResultListener::~MatchResultListener() {
-}
-
-// The implementation of a matcher.
-template <typename T>
-class MatcherInterface {
- public:
- virtual ~MatcherInterface() {}
-
- // Returns true iff the matcher matches x; also explains the match
- // result to 'listener', in the form of a non-restrictive relative
- // clause ("which ...", "whose ...", etc) that describes x. For
- // example, the MatchAndExplain() method of the Pointee(...) matcher
- // should generate an explanation like "which points to ...".
- //
- // You should override this method when defining a new matcher.
- //
- // It's the responsibility of the caller (Google Mock) to guarantee
- // that 'listener' is not NULL. This helps to simplify a matcher's
- // implementation when it doesn't care about the performance, as it
- // can talk to 'listener' without checking its validity first.
- // However, in order to implement dummy listeners efficiently,
- // listener->stream() may be NULL.
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0;
-
- // Describes this matcher to an ostream. The function should print
- // a verb phrase that describes the property a value matching this
- // matcher should have. The subject of the verb phrase is the value
- // being matched. For example, the DescribeTo() method of the Gt(7)
- // matcher prints "is greater than 7".
- virtual void DescribeTo(::std::ostream* os) const = 0;
-
- // Describes the negation of this matcher to an ostream. For
- // example, if the description of this matcher is "is greater than
- // 7", the negated description could be "is not greater than 7".
- // You are not required to override this when implementing
- // MatcherInterface, but it is highly advised so that your matcher
- // can produce good error messages.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "not (";
- DescribeTo(os);
- *os << ")";
- }
-};
-
-namespace internal {
-
-// A match result listener that ignores the explanation.
-class DummyMatchResultListener : public MatchResultListener {
- public:
- DummyMatchResultListener() : MatchResultListener(NULL) {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener);
-};
-
-// A match result listener that forwards the explanation to a given
-// ostream. The difference between this and MatchResultListener is
-// that the former is concrete.
-class StreamMatchResultListener : public MatchResultListener {
- public:
- explicit StreamMatchResultListener(::std::ostream* os)
- : MatchResultListener(os) {}
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener);
-};
-
-// A match result listener that stores the explanation in a string.
-class StringMatchResultListener : public MatchResultListener {
- public:
- StringMatchResultListener() : MatchResultListener(&ss_) {}
-
- // Returns the explanation heard so far.
- internal::string str() const { return ss_.str(); }
-
- private:
- ::std::stringstream ss_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener);
-};
-
-// An internal class for implementing Matcher<T>, which will derive
-// from it. We put functionalities common to all Matcher<T>
-// specializations here to avoid code duplication.
-template <typename T>
-class MatcherBase {
- public:
- // Returns true iff the matcher matches x; also explains the match
- // result to 'listener'.
- bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return impl_->MatchAndExplain(x, listener);
- }
-
- // Returns true iff this matcher matches x.
- bool Matches(T x) const {
- DummyMatchResultListener dummy;
- return MatchAndExplain(x, &dummy);
- }
-
- // Describes this matcher to an ostream.
- void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
-
- // Describes the negation of this matcher to an ostream.
- void DescribeNegationTo(::std::ostream* os) const {
- impl_->DescribeNegationTo(os);
- }
-
- // Explains why x matches, or doesn't match, the matcher.
- void ExplainMatchResultTo(T x, ::std::ostream* os) const {
- StreamMatchResultListener listener(os);
- MatchAndExplain(x, &listener);
- }
-
- protected:
- MatcherBase() {}
-
- // Constructs a matcher from its implementation.
- explicit MatcherBase(const MatcherInterface<T>* impl)
- : impl_(impl) {}
-
- virtual ~MatcherBase() {}
-
- private:
- // shared_ptr (util/gtl/shared_ptr.h) and linked_ptr have similar
- // interfaces. The former dynamically allocates a chunk of memory
- // to hold the reference count, while the latter tracks all
- // references using a circular linked list without allocating
- // memory. It has been observed that linked_ptr performs better in
- // typical scenarios. However, shared_ptr can out-perform
- // linked_ptr when there are many more uses of the copy constructor
- // than the default constructor.
- //
- // If performance becomes a problem, we should see if using
- // shared_ptr helps.
- ::testing::internal::linked_ptr<const MatcherInterface<T> > impl_;
-};
-
-} // namespace internal
-
-// A Matcher<T> is a copyable and IMMUTABLE (except by assignment)
-// object that can check whether a value of type T matches. The
-// implementation of Matcher<T> is just a linked_ptr to const
-// MatcherInterface<T>, so copying is fairly cheap. Don't inherit
-// from Matcher!
-template <typename T>
-class Matcher : public internal::MatcherBase<T> {
- public:
- // Constructs a null matcher. Needed for storing Matcher objects in STL
- // containers. A default-constructed matcher is not yet initialized. You
- // cannot use it until a valid value has been assigned to it.
- Matcher() {}
-
- // Constructs a matcher from its implementation.
- explicit Matcher(const MatcherInterface<T>* impl)
- : internal::MatcherBase<T>(impl) {}
-
- // Implicit constructor here allows people to write
- // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes
- Matcher(T value); // NOLINT
-};
-
-// The following two specializations allow the user to write str
-// instead of Eq(str) and "foo" instead of Eq("foo") when a string
-// matcher is expected.
-template <>
-class Matcher<const internal::string&>
- : public internal::MatcherBase<const internal::string&> {
- public:
- Matcher() {}
-
- explicit Matcher(const MatcherInterface<const internal::string&>* impl)
- : internal::MatcherBase<const internal::string&>(impl) {}
-
- // Allows the user to write str instead of Eq(str) sometimes, where
- // str is a string object.
- Matcher(const internal::string& s); // NOLINT
-
- // Allows the user to write "foo" instead of Eq("foo") sometimes.
- Matcher(const char* s); // NOLINT
-};
-
-template <>
-class Matcher<internal::string>
- : public internal::MatcherBase<internal::string> {
- public:
- Matcher() {}
-
- explicit Matcher(const MatcherInterface<internal::string>* impl)
- : internal::MatcherBase<internal::string>(impl) {}
-
- // Allows the user to write str instead of Eq(str) sometimes, where
- // str is a string object.
- Matcher(const internal::string& s); // NOLINT
-
- // Allows the user to write "foo" instead of Eq("foo") sometimes.
- Matcher(const char* s); // NOLINT
-};
-
-// The PolymorphicMatcher class template makes it easy to implement a
-// polymorphic matcher (i.e. a matcher that can match values of more
-// than one type, e.g. Eq(n) and NotNull()).
-//
-// To define a polymorphic matcher, a user should provide an Impl
-// class that has a DescribeTo() method and a DescribeNegationTo()
-// method, and define a member function (or member function template)
-//
-// bool MatchAndExplain(const Value& value,
-// MatchResultListener* listener) const;
-//
-// See the definition of NotNull() for a complete example.
-template <class Impl>
-class PolymorphicMatcher {
- public:
- explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {}
-
- // Returns a mutable reference to the underlying matcher
- // implementation object.
- Impl& mutable_impl() { return impl_; }
-
- // Returns an immutable reference to the underlying matcher
- // implementation object.
- const Impl& impl() const { return impl_; }
-
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new MonomorphicImpl<T>(impl_));
- }
-
- private:
- template <typename T>
- class MonomorphicImpl : public MatcherInterface<T> {
- public:
- explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- impl_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- impl_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return impl_.MatchAndExplain(x, listener);
- }
-
- private:
- const Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);
- };
-
- Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(PolymorphicMatcher);
-};
-
-// Creates a matcher from its implementation. This is easier to use
-// than the Matcher<T> constructor as it doesn't require you to
-// explicitly write the template argument, e.g.
-//
-// MakeMatcher(foo);
-// vs
-// Matcher<const string&>(foo);
-template <typename T>
-inline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {
- return Matcher<T>(impl);
-};
-
-// Creates a polymorphic matcher from its implementation. This is
-// easier to use than the PolymorphicMatcher<Impl> constructor as it
-// doesn't require you to explicitly write the template argument, e.g.
-//
-// MakePolymorphicMatcher(foo);
-// vs
-// PolymorphicMatcher<TypeOfFoo>(foo);
-template <class Impl>
-inline PolymorphicMatcher<Impl> MakePolymorphicMatcher(const Impl& impl) {
- return PolymorphicMatcher<Impl>(impl);
-}
-
-// In order to be safe and clear, casting between different matcher
-// types is done explicitly via MatcherCast<T>(m), which takes a
-// matcher m and returns a Matcher<T>. It compiles only when T can be
-// statically converted to the argument type of m.
-template <typename T, typename M>
-Matcher<T> MatcherCast(M m);
-
-// Implements SafeMatcherCast().
-//
-// We use an intermediate class to do the actual safe casting as Nokia's
-// Symbian compiler cannot decide between
-// template <T, M> ... (M) and
-// template <T, U> ... (const Matcher<U>&)
-// for function templates but can for member function templates.
-template <typename T>
-class SafeMatcherCastImpl {
- public:
- // This overload handles polymorphic matchers only since monomorphic
- // matchers are handled by the next one.
- template <typename M>
- static inline Matcher<T> Cast(M polymorphic_matcher) {
- return Matcher<T>(polymorphic_matcher);
- }
-
- // This overload handles monomorphic matchers.
- //
- // In general, if type T can be implicitly converted to type U, we can
- // safely convert a Matcher<U> to a Matcher<T> (i.e. Matcher is
- // contravariant): just keep a copy of the original Matcher<U>, convert the
- // argument from type T to U, and then pass it to the underlying Matcher<U>.
- // The only exception is when U is a reference and T is not, as the
- // underlying Matcher<U> may be interested in the argument's address, which
- // is not preserved in the conversion from T to U.
- template <typename U>
- static inline Matcher<T> Cast(const Matcher<U>& matcher) {
- // Enforce that T can be implicitly converted to U.
- GTEST_COMPILE_ASSERT_((internal::ImplicitlyConvertible<T, U>::value),
- T_must_be_implicitly_convertible_to_U);
- // Enforce that we are not converting a non-reference type T to a reference
- // type U.
- GTEST_COMPILE_ASSERT_(
- internal::is_reference<T>::value || !internal::is_reference<U>::value,
- cannot_convert_non_referentce_arg_to_reference);
- // In case both T and U are arithmetic types, enforce that the
- // conversion is not lossy.
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT;
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU;
- const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther;
- const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther;
- GTEST_COMPILE_ASSERT_(
- kTIsOther || kUIsOther ||
- (internal::LosslessArithmeticConvertible<RawT, RawU>::value),
- conversion_of_arithmetic_types_must_be_lossless);
- return MatcherCast<T>(matcher);
- }
-};
-
-template <typename T, typename M>
-inline Matcher<T> SafeMatcherCast(const M& polymorphic_matcher) {
- return SafeMatcherCastImpl<T>::Cast(polymorphic_matcher);
-}
-
-// A<T>() returns a matcher that matches any value of type T.
-template <typename T>
-Matcher<T> A();
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// If the explanation is not empty, prints it to the ostream.
-inline void PrintIfNotEmpty(const internal::string& explanation,
- std::ostream* os) {
- if (explanation != "" && os != NULL) {
- *os << ", " << explanation;
- }
-}
-
-// Returns true if the given type name is easy to read by a human.
-// This is used to decide whether printing the type of a value might
-// be helpful.
-inline bool IsReadableTypeName(const string& type_name) {
- // We consider a type name readable if it's short or doesn't contain
- // a template or function type.
- return (type_name.length() <= 20 ||
- type_name.find_first_of("<(") == string::npos);
-}
-
-// Matches the value against the given matcher, prints the value and explains
-// the match result to the listener. Returns the match result.
-// 'listener' must not be NULL.
-// Value cannot be passed by const reference, because some matchers take a
-// non-const argument.
-template <typename Value, typename T>
-bool MatchPrintAndExplain(Value& value, const Matcher<T>& matcher,
- MatchResultListener* listener) {
- if (!listener->IsInterested()) {
- // If the listener is not interested, we do not need to construct the
- // inner explanation.
- return matcher.Matches(value);
- }
-
- StringMatchResultListener inner_listener;
- const bool match = matcher.MatchAndExplain(value, &inner_listener);
-
- UniversalPrint(value, listener->stream());
-#if GTEST_HAS_RTTI
- const string& type_name = GetTypeName<Value>();
- if (IsReadableTypeName(type_name))
- *listener->stream() << " (of type " << type_name << ")";
-#endif
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
-
- return match;
-}
-
-// An internal helper class for doing compile-time loop on a tuple's
-// fields.
-template <size_t N>
-class TuplePrefix {
- public:
- // TuplePrefix<N>::Matches(matcher_tuple, value_tuple) returns true
- // iff the first N fields of matcher_tuple matches the first N
- // fields of value_tuple, respectively.
- template <typename MatcherTuple, typename ValueTuple>
- static bool Matches(const MatcherTuple& matcher_tuple,
- const ValueTuple& value_tuple) {
- using ::std::tr1::get;
- return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple)
- && get<N - 1>(matcher_tuple).Matches(get<N - 1>(value_tuple));
- }
-
- // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
- // describes failures in matching the first N fields of matchers
- // against the first N fields of values. If there is no failure,
- // nothing will be streamed to os.
- template <typename MatcherTuple, typename ValueTuple>
- static void ExplainMatchFailuresTo(const MatcherTuple& matchers,
- const ValueTuple& values,
- ::std::ostream* os) {
- using ::std::tr1::tuple_element;
- using ::std::tr1::get;
-
- // First, describes failures in the first N - 1 fields.
- TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
-
- // Then describes the failure (if any) in the (N - 1)-th (0-based)
- // field.
- typename tuple_element<N - 1, MatcherTuple>::type matcher =
- get<N - 1>(matchers);
- typedef typename tuple_element<N - 1, ValueTuple>::type Value;
- Value value = get<N - 1>(values);
- StringMatchResultListener listener;
- if (!matcher.MatchAndExplain(value, &listener)) {
- // TODO(wan): include in the message the name of the parameter
- // as used in MOCK_METHOD*() when possible.
- *os << " Expected arg #" << N - 1 << ": ";
- get<N - 1>(matchers).DescribeTo(os);
- *os << "\n Actual: ";
- // We remove the reference in type Value to prevent the
- // universal printer from printing the address of value, which
- // isn't interesting to the user most of the time. The
- // matcher's MatchAndExplain() method handles the case when
- // the address is interesting.
- internal::UniversalPrint(value, os);
- PrintIfNotEmpty(listener.str(), os);
- *os << "\n";
- }
- }
-};
-
-// The base case.
-template <>
-class TuplePrefix<0> {
- public:
- template <typename MatcherTuple, typename ValueTuple>
- static bool Matches(const MatcherTuple& /* matcher_tuple */,
- const ValueTuple& /* value_tuple */) {
- return true;
- }
-
- template <typename MatcherTuple, typename ValueTuple>
- static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */,
- const ValueTuple& /* values */,
- ::std::ostream* /* os */) {}
-};
-
-// TupleMatches(matcher_tuple, value_tuple) returns true iff all
-// matchers in matcher_tuple match the corresponding fields in
-// value_tuple. It is a compiler error if matcher_tuple and
-// value_tuple have different number of fields or incompatible field
-// types.
-template <typename MatcherTuple, typename ValueTuple>
-bool TupleMatches(const MatcherTuple& matcher_tuple,
- const ValueTuple& value_tuple) {
- using ::std::tr1::tuple_size;
- // Makes sure that matcher_tuple and value_tuple have the same
- // number of fields.
- GTEST_COMPILE_ASSERT_(tuple_size<MatcherTuple>::value ==
- tuple_size<ValueTuple>::value,
- matcher_and_value_have_different_numbers_of_fields);
- return TuplePrefix<tuple_size<ValueTuple>::value>::
- Matches(matcher_tuple, value_tuple);
-}
-
-// Describes failures in matching matchers against values. If there
-// is no failure, nothing will be streamed to os.
-template <typename MatcherTuple, typename ValueTuple>
-void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
- const ValueTuple& values,
- ::std::ostream* os) {
- using ::std::tr1::tuple_size;
- TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
- matchers, values, os);
-}
-
-// The MatcherCastImpl class template is a helper for implementing
-// MatcherCast(). We need this helper in order to partially
-// specialize the implementation of MatcherCast() (C++ allows
-// class/struct templates to be partially specialized, but not
-// function templates.).
-
-// This general version is used when MatcherCast()'s argument is a
-// polymorphic matcher (i.e. something that can be converted to a
-// Matcher but is not one yet; for example, Eq(value)).
-template <typename T, typename M>
-class MatcherCastImpl {
- public:
- static Matcher<T> Cast(M polymorphic_matcher) {
- return Matcher<T>(polymorphic_matcher);
- }
-};
-
-// This more specialized version is used when MatcherCast()'s argument
-// is already a Matcher. This only compiles when type T can be
-// statically converted to type U.
-template <typename T, typename U>
-class MatcherCastImpl<T, Matcher<U> > {
- public:
- static Matcher<T> Cast(const Matcher<U>& source_matcher) {
- return Matcher<T>(new Impl(source_matcher));
- }
-
- private:
- class Impl : public MatcherInterface<T> {
- public:
- explicit Impl(const Matcher<U>& source_matcher)
- : source_matcher_(source_matcher) {}
-
- // We delegate the matching logic to the source matcher.
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return source_matcher_.MatchAndExplain(static_cast<U>(x), listener);
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- source_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- source_matcher_.DescribeNegationTo(os);
- }
-
- private:
- const Matcher<U> source_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-};
-
-// This even more specialized version is used for efficiently casting
-// a matcher to its own type.
-template <typename T>
-class MatcherCastImpl<T, Matcher<T> > {
- public:
- static Matcher<T> Cast(const Matcher<T>& matcher) { return matcher; }
-};
-
-// Implements A<T>().
-template <typename T>
-class AnyMatcherImpl : public MatcherInterface<T> {
- public:
- virtual bool MatchAndExplain(
- T /* x */, MatchResultListener* /* listener */) const { return true; }
- virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; }
- virtual void DescribeNegationTo(::std::ostream* os) const {
- // This is mostly for completeness' safe, as it's not very useful
- // to write Not(A<bool>()). However we cannot completely rule out
- // such a possibility, and it doesn't hurt to be prepared.
- *os << "never matches";
- }
-};
-
-// Implements _, a matcher that matches any value of any
-// type. This is a polymorphic matcher, so we need a template type
-// conversion operator to make it appearing as a Matcher<T> for any
-// type T.
-class AnythingMatcher {
- public:
- template <typename T>
- operator Matcher<T>() const { return A<T>(); }
-};
-
-// Implements a matcher that compares a given value with a
-// pre-supplied value using one of the ==, <=, <, etc, operators. The
-// two values being compared don't have to have the same type.
-//
-// The matcher defined here is polymorphic (for example, Eq(5) can be
-// used to match an int, a short, a double, etc). Therefore we use
-// a template type conversion operator in the implementation.
-//
-// We define this as a macro in order to eliminate duplicated source
-// code.
-//
-// The following template definition assumes that the Rhs parameter is
-// a "bare" type (i.e. neither 'const T' nor 'T&').
-#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_( \
- name, op, relation, negated_relation) \
- template <typename Rhs> class name##Matcher { \
- public: \
- explicit name##Matcher(const Rhs& rhs) : rhs_(rhs) {} \
- template <typename Lhs> \
- operator Matcher<Lhs>() const { \
- return MakeMatcher(new Impl<Lhs>(rhs_)); \
- } \
- private: \
- template <typename Lhs> \
- class Impl : public MatcherInterface<Lhs> { \
- public: \
- explicit Impl(const Rhs& rhs) : rhs_(rhs) {} \
- virtual bool MatchAndExplain(\
- Lhs lhs, MatchResultListener* /* listener */) const { \
- return lhs op rhs_; \
- } \
- virtual void DescribeTo(::std::ostream* os) const { \
- *os << relation " "; \
- UniversalPrint(rhs_, os); \
- } \
- virtual void DescribeNegationTo(::std::ostream* os) const { \
- *os << negated_relation " "; \
- UniversalPrint(rhs_, os); \
- } \
- private: \
- Rhs rhs_; \
- GTEST_DISALLOW_ASSIGN_(Impl); \
- }; \
- Rhs rhs_; \
- GTEST_DISALLOW_ASSIGN_(name##Matcher); \
- }
-
-// Implements Eq(v), Ge(v), Gt(v), Le(v), Lt(v), and Ne(v)
-// respectively.
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Eq, ==, "is equal to", "isn't equal to");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ge, >=, "is >=", "isn't >=");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Gt, >, "is >", "isn't >");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Le, <=, "is <=", "isn't <=");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Lt, <, "is <", "isn't <");
-GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ne, !=, "isn't equal to", "is equal to");
-
-#undef GMOCK_IMPLEMENT_COMPARISON_MATCHER_
-
-// Implements the polymorphic IsNull() matcher, which matches any raw or smart
-// pointer that is NULL.
-class IsNullMatcher {
- public:
- template <typename Pointer>
- bool MatchAndExplain(const Pointer& p,
- MatchResultListener* /* listener */) const {
- return GetRawPointer(p) == NULL;
- }
-
- void DescribeTo(::std::ostream* os) const { *os << "is NULL"; }
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "isn't NULL";
- }
-};
-
-// Implements the polymorphic NotNull() matcher, which matches any raw or smart
-// pointer that is not NULL.
-class NotNullMatcher {
- public:
- template <typename Pointer>
- bool MatchAndExplain(const Pointer& p,
- MatchResultListener* /* listener */) const {
- return GetRawPointer(p) != NULL;
- }
-
- void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "is NULL";
- }
-};
-
-// Ref(variable) matches any argument that is a reference to
-// 'variable'. This matcher is polymorphic as it can match any
-// super type of the type of 'variable'.
-//
-// The RefMatcher template class implements Ref(variable). It can
-// only be instantiated with a reference type. This prevents a user
-// from mistakenly using Ref(x) to match a non-reference function
-// argument. For example, the following will righteously cause a
-// compiler error:
-//
-// int n;
-// Matcher<int> m1 = Ref(n); // This won't compile.
-// Matcher<int&> m2 = Ref(n); // This will compile.
-template <typename T>
-class RefMatcher;
-
-template <typename T>
-class RefMatcher<T&> {
- // Google Mock is a generic framework and thus needs to support
- // mocking any function types, including those that take non-const
- // reference arguments. Therefore the template parameter T (and
- // Super below) can be instantiated to either a const type or a
- // non-const type.
- public:
- // RefMatcher() takes a T& instead of const T&, as we want the
- // compiler to catch using Ref(const_value) as a matcher for a
- // non-const reference.
- explicit RefMatcher(T& x) : object_(x) {} // NOLINT
-
- template <typename Super>
- operator Matcher<Super&>() const {
- // By passing object_ (type T&) to Impl(), which expects a Super&,
- // we make sure that Super is a super type of T. In particular,
- // this catches using Ref(const_value) as a matcher for a
- // non-const reference, as you cannot implicitly convert a const
- // reference to a non-const reference.
- return MakeMatcher(new Impl<Super>(object_));
- }
-
- private:
- template <typename Super>
- class Impl : public MatcherInterface<Super&> {
- public:
- explicit Impl(Super& x) : object_(x) {} // NOLINT
-
- // MatchAndExplain() takes a Super& (as opposed to const Super&)
- // in order to match the interface MatcherInterface<Super&>.
- virtual bool MatchAndExplain(
- Super& x, MatchResultListener* listener) const {
- *listener << "which is located @" << static_cast<const void*>(&x);
- return &x == &object_;
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "references the variable ";
- UniversalPrinter<Super&>::Print(object_, os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "does not reference the variable ";
- UniversalPrinter<Super&>::Print(object_, os);
- }
-
- private:
- const Super& object_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- T& object_;
-
- GTEST_DISALLOW_ASSIGN_(RefMatcher);
-};
-
-// Polymorphic helper functions for narrow and wide string matchers.
-inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
- return String::CaseInsensitiveCStringEquals(lhs, rhs);
-}
-
-inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs) {
- return String::CaseInsensitiveWideCStringEquals(lhs, rhs);
-}
-
-// String comparison for narrow or wide strings that can have embedded NUL
-// characters.
-template <typename StringType>
-bool CaseInsensitiveStringEquals(const StringType& s1,
- const StringType& s2) {
- // Are the heads equal?
- if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) {
- return false;
- }
-
- // Skip the equal heads.
- const typename StringType::value_type nul = 0;
- const size_t i1 = s1.find(nul), i2 = s2.find(nul);
-
- // Are we at the end of either s1 or s2?
- if (i1 == StringType::npos || i2 == StringType::npos) {
- return i1 == i2;
- }
-
- // Are the tails equal?
- return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1));
-}
-
-// String matchers.
-
-// Implements equality-based string matchers like StrEq, StrCaseNe, and etc.
-template <typename StringType>
-class StrEqualityMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- StrEqualityMatcher(const StringType& str, bool expect_eq,
- bool case_sensitive)
- : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {}
-
- // When expect_eq_ is true, returns true iff s is equal to string_;
- // otherwise returns true iff s is not equal to string_.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- if (s == NULL) {
- return !expect_eq_;
- }
- return MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- const bool eq = case_sensitive_ ? s == string_ :
- CaseInsensitiveStringEquals(s, string_);
- return expect_eq_ == eq;
- }
-
- void DescribeTo(::std::ostream* os) const {
- DescribeToHelper(expect_eq_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- DescribeToHelper(!expect_eq_, os);
- }
-
- private:
- void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {
- *os << (expect_eq ? "is " : "isn't ");
- *os << "equal to ";
- if (!case_sensitive_) {
- *os << "(ignoring case) ";
- }
- UniversalPrint(string_, os);
- }
-
- const StringType string_;
- const bool expect_eq_;
- const bool case_sensitive_;
-
- GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher);
-};
-
-// Implements the polymorphic HasSubstr(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class HasSubstrMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- explicit HasSubstrMatcher(const StringType& substring)
- : substring_(substring) {}
-
- // These overloaded methods allow HasSubstr(substring) to be used as a
- // Matcher<T> as long as T can be converted to string. Returns true
- // iff s contains substring_ as a substring.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- return s.find(substring_) != StringType::npos;
- }
-
- // Describes what this matcher matches.
- void DescribeTo(::std::ostream* os) const {
- *os << "has substring ";
- UniversalPrint(substring_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "has no substring ";
- UniversalPrint(substring_, os);
- }
-
- private:
- const StringType substring_;
-
- GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher);
-};
-
-// Implements the polymorphic StartsWith(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class StartsWithMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) {
- }
-
- // These overloaded methods allow StartsWith(prefix) to be used as a
- // Matcher<T> as long as T can be converted to string. Returns true
- // iff s starts with prefix_.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- return s.length() >= prefix_.length() &&
- s.substr(0, prefix_.length()) == prefix_;
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "starts with ";
- UniversalPrint(prefix_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't start with ";
- UniversalPrint(prefix_, os);
- }
-
- private:
- const StringType prefix_;
-
- GTEST_DISALLOW_ASSIGN_(StartsWithMatcher);
-};
-
-// Implements the polymorphic EndsWith(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class EndsWithMatcher {
- public:
- typedef typename StringType::const_pointer ConstCharPointer;
-
- explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {}
-
- // These overloaded methods allow EndsWith(suffix) to be used as a
- // Matcher<T> as long as T can be converted to string. Returns true
- // iff s ends with suffix_.
- bool MatchAndExplain(ConstCharPointer s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(StringType(s), listener);
- }
-
- bool MatchAndExplain(const StringType& s,
- MatchResultListener* /* listener */) const {
- return s.length() >= suffix_.length() &&
- s.substr(s.length() - suffix_.length()) == suffix_;
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "ends with ";
- UniversalPrint(suffix_, os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't end with ";
- UniversalPrint(suffix_, os);
- }
-
- private:
- const StringType suffix_;
-
- GTEST_DISALLOW_ASSIGN_(EndsWithMatcher);
-};
-
-// Implements polymorphic matchers MatchesRegex(regex) and
-// ContainsRegex(regex), which can be used as a Matcher<T> as long as
-// T can be converted to a string.
-class MatchesRegexMatcher {
- public:
- MatchesRegexMatcher(const RE* regex, bool full_match)
- : regex_(regex), full_match_(full_match) {}
-
- // These overloaded methods allow MatchesRegex(regex) to be used as
- // a Matcher<T> as long as T can be converted to string. Returns
- // true iff s matches regular expression regex. When full_match_ is
- // true, a full match is done; otherwise a partial match is done.
- bool MatchAndExplain(const char* s,
- MatchResultListener* listener) const {
- return s != NULL && MatchAndExplain(internal::string(s), listener);
- }
-
- bool MatchAndExplain(const internal::string& s,
- MatchResultListener* /* listener */) const {
- return full_match_ ? RE::FullMatch(s, *regex_) :
- RE::PartialMatch(s, *regex_);
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << (full_match_ ? "matches" : "contains")
- << " regular expression ";
- UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't " << (full_match_ ? "match" : "contain")
- << " regular expression ";
- UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
- }
-
- private:
- const internal::linked_ptr<const RE> regex_;
- const bool full_match_;
-
- GTEST_DISALLOW_ASSIGN_(MatchesRegexMatcher);
-};
-
-// Implements a matcher that compares the two fields of a 2-tuple
-// using one of the ==, <=, <, etc, operators. The two fields being
-// compared don't have to have the same type.
-//
-// The matcher defined here is polymorphic (for example, Eq() can be
-// used to match a tuple<int, short>, a tuple<const long&, double>,
-// etc). Therefore we use a template type conversion operator in the
-// implementation.
-//
-// We define this as a macro in order to eliminate duplicated source
-// code.
-#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op, relation) \
- class name##2Matcher { \
- public: \
- template <typename T1, typename T2> \
- operator Matcher< ::std::tr1::tuple<T1, T2> >() const { \
- return MakeMatcher(new Impl< ::std::tr1::tuple<T1, T2> >); \
- } \
- template <typename T1, typename T2> \
- operator Matcher<const ::std::tr1::tuple<T1, T2>&>() const { \
- return MakeMatcher(new Impl<const ::std::tr1::tuple<T1, T2>&>); \
- } \
- private: \
- template <typename Tuple> \
- class Impl : public MatcherInterface<Tuple> { \
- public: \
- virtual bool MatchAndExplain( \
- Tuple args, \
- MatchResultListener* /* listener */) const { \
- return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \
- } \
- virtual void DescribeTo(::std::ostream* os) const { \
- *os << "are " relation; \
- } \
- virtual void DescribeNegationTo(::std::ostream* os) const { \
- *os << "aren't " relation; \
- } \
- }; \
- }
-
-// Implements Eq(), Ge(), Gt(), Le(), Lt(), and Ne() respectively.
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Eq, ==, "an equal pair");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Ge, >=, "a pair where the first >= the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Gt, >, "a pair where the first > the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Le, <=, "a pair where the first <= the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(
- Lt, <, "a pair where the first < the second");
-GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ne, !=, "an unequal pair");
-
-#undef GMOCK_IMPLEMENT_COMPARISON2_MATCHER_
-
-// Implements the Not(...) matcher for a particular argument type T.
-// We do not nest it inside the NotMatcher class template, as that
-// will prevent different instantiations of NotMatcher from sharing
-// the same NotMatcherImpl<T> class.
-template <typename T>
-class NotMatcherImpl : public MatcherInterface<T> {
- public:
- explicit NotMatcherImpl(const Matcher<T>& matcher)
- : matcher_(matcher) {}
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- return !matcher_.MatchAndExplain(x, listener);
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- matcher_.DescribeNegationTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- matcher_.DescribeTo(os);
- }
-
- private:
- const Matcher<T> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(NotMatcherImpl);
-};
-
-// Implements the Not(m) matcher, which matches a value that doesn't
-// match matcher m.
-template <typename InnerMatcher>
-class NotMatcher {
- public:
- explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {}
-
- // This template type conversion operator allows Not(m) to be used
- // to match any type m can match.
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new NotMatcherImpl<T>(SafeMatcherCast<T>(matcher_)));
- }
-
- private:
- InnerMatcher matcher_;
-
- GTEST_DISALLOW_ASSIGN_(NotMatcher);
-};
-
-// Implements the AllOf(m1, m2) matcher for a particular argument type
-// T. We do not nest it inside the BothOfMatcher class template, as
-// that will prevent different instantiations of BothOfMatcher from
-// sharing the same BothOfMatcherImpl<T> class.
-template <typename T>
-class BothOfMatcherImpl : public MatcherInterface<T> {
- public:
- BothOfMatcherImpl(const Matcher<T>& matcher1, const Matcher<T>& matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeTo(os);
- *os << ") and (";
- matcher2_.DescribeTo(os);
- *os << ")";
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeNegationTo(os);
- *os << ") or (";
- matcher2_.DescribeNegationTo(os);
- *os << ")";
- }
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- // If either matcher1_ or matcher2_ doesn't match x, we only need
- // to explain why one of them fails.
- StringMatchResultListener listener1;
- if (!matcher1_.MatchAndExplain(x, &listener1)) {
- *listener << listener1.str();
- return false;
- }
-
- StringMatchResultListener listener2;
- if (!matcher2_.MatchAndExplain(x, &listener2)) {
- *listener << listener2.str();
- return false;
- }
-
- // Otherwise we need to explain why *both* of them match.
- const internal::string s1 = listener1.str();
- const internal::string s2 = listener2.str();
-
- if (s1 == "") {
- *listener << s2;
- } else {
- *listener << s1;
- if (s2 != "") {
- *listener << ", and " << s2;
- }
- }
- return true;
- }
-
- private:
- const Matcher<T> matcher1_;
- const Matcher<T> matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(BothOfMatcherImpl);
-};
-
-// Used for implementing the AllOf(m_1, ..., m_n) matcher, which
-// matches a value that matches all of the matchers m_1, ..., and m_n.
-template <typename Matcher1, typename Matcher2>
-class BothOfMatcher {
- public:
- BothOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- // This template type conversion operator allows a
- // BothOfMatcher<Matcher1, Matcher2> object to match any type that
- // both Matcher1 and Matcher2 can match.
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new BothOfMatcherImpl<T>(SafeMatcherCast<T>(matcher1_),
- SafeMatcherCast<T>(matcher2_)));
- }
-
- private:
- Matcher1 matcher1_;
- Matcher2 matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(BothOfMatcher);
-};
-
-// Implements the AnyOf(m1, m2) matcher for a particular argument type
-// T. We do not nest it inside the AnyOfMatcher class template, as
-// that will prevent different instantiations of AnyOfMatcher from
-// sharing the same EitherOfMatcherImpl<T> class.
-template <typename T>
-class EitherOfMatcherImpl : public MatcherInterface<T> {
- public:
- EitherOfMatcherImpl(const Matcher<T>& matcher1, const Matcher<T>& matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeTo(os);
- *os << ") or (";
- matcher2_.DescribeTo(os);
- *os << ")";
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "(";
- matcher1_.DescribeNegationTo(os);
- *os << ") and (";
- matcher2_.DescribeNegationTo(os);
- *os << ")";
- }
-
- virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
- // If either matcher1_ or matcher2_ matches x, we just need to
- // explain why *one* of them matches.
- StringMatchResultListener listener1;
- if (matcher1_.MatchAndExplain(x, &listener1)) {
- *listener << listener1.str();
- return true;
- }
-
- StringMatchResultListener listener2;
- if (matcher2_.MatchAndExplain(x, &listener2)) {
- *listener << listener2.str();
- return true;
- }
-
- // Otherwise we need to explain why *both* of them fail.
- const internal::string s1 = listener1.str();
- const internal::string s2 = listener2.str();
-
- if (s1 == "") {
- *listener << s2;
- } else {
- *listener << s1;
- if (s2 != "") {
- *listener << ", and " << s2;
- }
- }
- return false;
- }
-
- private:
- const Matcher<T> matcher1_;
- const Matcher<T> matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(EitherOfMatcherImpl);
-};
-
-// Used for implementing the AnyOf(m_1, ..., m_n) matcher, which
-// matches a value that matches at least one of the matchers m_1, ...,
-// and m_n.
-template <typename Matcher1, typename Matcher2>
-class EitherOfMatcher {
- public:
- EitherOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- // This template type conversion operator allows a
- // EitherOfMatcher<Matcher1, Matcher2> object to match any type that
- // both Matcher1 and Matcher2 can match.
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new EitherOfMatcherImpl<T>(
- SafeMatcherCast<T>(matcher1_), SafeMatcherCast<T>(matcher2_)));
- }
-
- private:
- Matcher1 matcher1_;
- Matcher2 matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(EitherOfMatcher);
-};
-
-// Used for implementing Truly(pred), which turns a predicate into a
-// matcher.
-template <typename Predicate>
-class TrulyMatcher {
- public:
- explicit TrulyMatcher(Predicate pred) : predicate_(pred) {}
-
- // This method template allows Truly(pred) to be used as a matcher
- // for type T where T is the argument type of predicate 'pred'. The
- // argument is passed by reference as the predicate may be
- // interested in the address of the argument.
- template <typename T>
- bool MatchAndExplain(T& x, // NOLINT
- MatchResultListener* /* listener */) const {
- // Without the if-statement, MSVC sometimes warns about converting
- // a value to bool (warning 4800).
- //
- // We cannot write 'return !!predicate_(x);' as that doesn't work
- // when predicate_(x) returns a class convertible to bool but
- // having no operator!().
- if (predicate_(x))
- return true;
- return false;
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "satisfies the given predicate";
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't satisfy the given predicate";
- }
-
- private:
- Predicate predicate_;
-
- GTEST_DISALLOW_ASSIGN_(TrulyMatcher);
-};
-
-// Used for implementing Matches(matcher), which turns a matcher into
-// a predicate.
-template <typename M>
-class MatcherAsPredicate {
- public:
- explicit MatcherAsPredicate(M matcher) : matcher_(matcher) {}
-
- // This template operator() allows Matches(m) to be used as a
- // predicate on type T where m is a matcher on type T.
- //
- // The argument x is passed by reference instead of by value, as
- // some matcher may be interested in its address (e.g. as in
- // Matches(Ref(n))(x)).
- template <typename T>
- bool operator()(const T& x) const {
- // We let matcher_ commit to a particular type here instead of
- // when the MatcherAsPredicate object was constructed. This
- // allows us to write Matches(m) where m is a polymorphic matcher
- // (e.g. Eq(5)).
- //
- // If we write Matcher<T>(matcher_).Matches(x) here, it won't
- // compile when matcher_ has type Matcher<const T&>; if we write
- // Matcher<const T&>(matcher_).Matches(x) here, it won't compile
- // when matcher_ has type Matcher<T>; if we just write
- // matcher_.Matches(x), it won't compile when matcher_ is
- // polymorphic, e.g. Eq(5).
- //
- // MatcherCast<const T&>() is necessary for making the code work
- // in all of the above situations.
- return MatcherCast<const T&>(matcher_).Matches(x);
- }
-
- private:
- M matcher_;
-
- GTEST_DISALLOW_ASSIGN_(MatcherAsPredicate);
-};
-
-// For implementing ASSERT_THAT() and EXPECT_THAT(). The template
-// argument M must be a type that can be converted to a matcher.
-template <typename M>
-class PredicateFormatterFromMatcher {
- public:
- explicit PredicateFormatterFromMatcher(const M& m) : matcher_(m) {}
-
- // This template () operator allows a PredicateFormatterFromMatcher
- // object to act as a predicate-formatter suitable for using with
- // Google Test's EXPECT_PRED_FORMAT1() macro.
- template <typename T>
- AssertionResult operator()(const char* value_text, const T& x) const {
- // We convert matcher_ to a Matcher<const T&> *now* instead of
- // when the PredicateFormatterFromMatcher object was constructed,
- // as matcher_ may be polymorphic (e.g. NotNull()) and we won't
- // know which type to instantiate it to until we actually see the
- // type of x here.
- //
- // We write MatcherCast<const T&>(matcher_) instead of
- // Matcher<const T&>(matcher_), as the latter won't compile when
- // matcher_ has type Matcher<T> (e.g. An<int>()).
- const Matcher<const T&> matcher = MatcherCast<const T&>(matcher_);
- StringMatchResultListener listener;
- if (MatchPrintAndExplain(x, matcher, &listener))
- return AssertionSuccess();
-
- ::std::stringstream ss;
- ss << "Value of: " << value_text << "\n"
- << "Expected: ";
- matcher.DescribeTo(&ss);
- ss << "\n Actual: " << listener.str();
- return AssertionFailure() << ss.str();
- }
-
- private:
- const M matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PredicateFormatterFromMatcher);
-};
-
-// A helper function for converting a matcher to a predicate-formatter
-// without the user needing to explicitly write the type. This is
-// used for implementing ASSERT_THAT() and EXPECT_THAT().
-template <typename M>
-inline PredicateFormatterFromMatcher<M>
-MakePredicateFormatterFromMatcher(const M& matcher) {
- return PredicateFormatterFromMatcher<M>(matcher);
-}
-
-// Implements the polymorphic floating point equality matcher, which
-// matches two float values using ULP-based approximation. The
-// template is meant to be instantiated with FloatType being either
-// float or double.
-template <typename FloatType>
-class FloatingEqMatcher {
- public:
- // Constructor for FloatingEqMatcher.
- // The matcher's input will be compared with rhs. The matcher treats two
- // NANs as equal if nan_eq_nan is true. Otherwise, under IEEE standards,
- // equality comparisons between NANs will always return false.
- FloatingEqMatcher(FloatType rhs, bool nan_eq_nan) :
- rhs_(rhs), nan_eq_nan_(nan_eq_nan) {}
-
- // Implements floating point equality matcher as a Matcher<T>.
- template <typename T>
- class Impl : public MatcherInterface<T> {
- public:
- Impl(FloatType rhs, bool nan_eq_nan) :
- rhs_(rhs), nan_eq_nan_(nan_eq_nan) {}
-
- virtual bool MatchAndExplain(T value,
- MatchResultListener* /* listener */) const {
- const FloatingPoint<FloatType> lhs(value), rhs(rhs_);
-
- // Compares NaNs first, if nan_eq_nan_ is true.
- if (nan_eq_nan_ && lhs.is_nan()) {
- return rhs.is_nan();
- }
-
- return lhs.AlmostEquals(rhs);
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- // os->precision() returns the previously set precision, which we
- // store to restore the ostream to its original configuration
- // after outputting.
- const ::std::streamsize old_precision = os->precision(
- ::std::numeric_limits<FloatType>::digits10 + 2);
- if (FloatingPoint<FloatType>(rhs_).is_nan()) {
- if (nan_eq_nan_) {
- *os << "is NaN";
- } else {
- *os << "never matches";
- }
- } else {
- *os << "is approximately " << rhs_;
- }
- os->precision(old_precision);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- // As before, get original precision.
- const ::std::streamsize old_precision = os->precision(
- ::std::numeric_limits<FloatType>::digits10 + 2);
- if (FloatingPoint<FloatType>(rhs_).is_nan()) {
- if (nan_eq_nan_) {
- *os << "isn't NaN";
- } else {
- *os << "is anything";
- }
- } else {
- *os << "isn't approximately " << rhs_;
- }
- // Restore original precision.
- os->precision(old_precision);
- }
-
- private:
- const FloatType rhs_;
- const bool nan_eq_nan_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- // The following 3 type conversion operators allow FloatEq(rhs) and
- // NanSensitiveFloatEq(rhs) to be used as a Matcher<float>, a
- // Matcher<const float&>, or a Matcher<float&>, but nothing else.
- // (While Google's C++ coding style doesn't allow arguments passed
- // by non-const reference, we may see them in code not conforming to
- // the style. Therefore Google Mock needs to support them.)
- operator Matcher<FloatType>() const {
- return MakeMatcher(new Impl<FloatType>(rhs_, nan_eq_nan_));
- }
-
- operator Matcher<const FloatType&>() const {
- return MakeMatcher(new Impl<const FloatType&>(rhs_, nan_eq_nan_));
- }
-
- operator Matcher<FloatType&>() const {
- return MakeMatcher(new Impl<FloatType&>(rhs_, nan_eq_nan_));
- }
- private:
- const FloatType rhs_;
- const bool nan_eq_nan_;
-
- GTEST_DISALLOW_ASSIGN_(FloatingEqMatcher);
-};
-
-// Implements the Pointee(m) matcher for matching a pointer whose
-// pointee matches matcher m. The pointer can be either raw or smart.
-template <typename InnerMatcher>
-class PointeeMatcher {
- public:
- explicit PointeeMatcher(const InnerMatcher& matcher) : matcher_(matcher) {}
-
- // This type conversion operator template allows Pointee(m) to be
- // used as a matcher for any pointer type whose pointee type is
- // compatible with the inner matcher, where type Pointer can be
- // either a raw pointer or a smart pointer.
- //
- // The reason we do this instead of relying on
- // MakePolymorphicMatcher() is that the latter is not flexible
- // enough for implementing the DescribeTo() method of Pointee().
- template <typename Pointer>
- operator Matcher<Pointer>() const {
- return MakeMatcher(new Impl<Pointer>(matcher_));
- }
-
- private:
- // The monomorphic implementation that works for a particular pointer type.
- template <typename Pointer>
- class Impl : public MatcherInterface<Pointer> {
- public:
- typedef typename PointeeOf<GTEST_REMOVE_CONST_( // NOLINT
- GTEST_REMOVE_REFERENCE_(Pointer))>::type Pointee;
-
- explicit Impl(const InnerMatcher& matcher)
- : matcher_(MatcherCast<const Pointee&>(matcher)) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "points to a value that ";
- matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "does not point to a value that ";
- matcher_.DescribeTo(os);
- }
-
- virtual bool MatchAndExplain(Pointer pointer,
- MatchResultListener* listener) const {
- if (GetRawPointer(pointer) == NULL)
- return false;
-
- *listener << "which points to ";
- return MatchPrintAndExplain(*pointer, matcher_, listener);
- }
-
- private:
- const Matcher<const Pointee&> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- const InnerMatcher matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PointeeMatcher);
-};
-
-// Implements the Field() matcher for matching a field (i.e. member
-// variable) of an object.
-template <typename Class, typename FieldType>
-class FieldMatcher {
- public:
- FieldMatcher(FieldType Class::*field,
- const Matcher<const FieldType&>& matcher)
- : field_(field), matcher_(matcher) {}
-
- void DescribeTo(::std::ostream* os) const {
- *os << "is an object whose given field ";
- matcher_.DescribeTo(os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "is an object whose given field ";
- matcher_.DescribeNegationTo(os);
- }
-
- template <typename T>
- bool MatchAndExplain(const T& value, MatchResultListener* listener) const {
- return MatchAndExplainImpl(
- typename ::testing::internal::
- is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
- value, listener);
- }
-
- private:
- // The first argument of MatchAndExplainImpl() is needed to help
- // Symbian's C++ compiler choose which overload to use. Its type is
- // true_type iff the Field() matcher is used to match a pointer.
- bool MatchAndExplainImpl(false_type /* is_not_pointer */, const Class& obj,
- MatchResultListener* listener) const {
- *listener << "whose given field is ";
- return MatchPrintAndExplain(obj.*field_, matcher_, listener);
- }
-
- bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
- MatchResultListener* listener) const {
- if (p == NULL)
- return false;
-
- *listener << "which points to an object ";
- // Since *p has a field, it must be a class/struct/union type and
- // thus cannot be a pointer. Therefore we pass false_type() as
- // the first argument.
- return MatchAndExplainImpl(false_type(), *p, listener);
- }
-
- const FieldType Class::*field_;
- const Matcher<const FieldType&> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(FieldMatcher);
-};
-
-// Implements the Property() matcher for matching a property
-// (i.e. return value of a getter method) of an object.
-template <typename Class, typename PropertyType>
-class PropertyMatcher {
- public:
- // The property may have a reference type, so 'const PropertyType&'
- // may cause double references and fail to compile. That's why we
- // need GTEST_REFERENCE_TO_CONST, which works regardless of
- // PropertyType being a reference or not.
- typedef GTEST_REFERENCE_TO_CONST_(PropertyType) RefToConstProperty;
-
- PropertyMatcher(PropertyType (Class::*property)() const,
- const Matcher<RefToConstProperty>& matcher)
- : property_(property), matcher_(matcher) {}
-
- void DescribeTo(::std::ostream* os) const {
- *os << "is an object whose given property ";
- matcher_.DescribeTo(os);
- }
-
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "is an object whose given property ";
- matcher_.DescribeNegationTo(os);
- }
-
- template <typename T>
- bool MatchAndExplain(const T&value, MatchResultListener* listener) const {
- return MatchAndExplainImpl(
- typename ::testing::internal::
- is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
- value, listener);
- }
-
- private:
- // The first argument of MatchAndExplainImpl() is needed to help
- // Symbian's C++ compiler choose which overload to use. Its type is
- // true_type iff the Property() matcher is used to match a pointer.
- bool MatchAndExplainImpl(false_type /* is_not_pointer */, const Class& obj,
- MatchResultListener* listener) const {
- *listener << "whose given property is ";
- // Cannot pass the return value (for example, int) to MatchPrintAndExplain,
- // which takes a non-const reference as argument.
- RefToConstProperty result = (obj.*property_)();
- return MatchPrintAndExplain(result, matcher_, listener);
- }
-
- bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
- MatchResultListener* listener) const {
- if (p == NULL)
- return false;
-
- *listener << "which points to an object ";
- // Since *p has a property method, it must be a class/struct/union
- // type and thus cannot be a pointer. Therefore we pass
- // false_type() as the first argument.
- return MatchAndExplainImpl(false_type(), *p, listener);
- }
-
- PropertyType (Class::*property_)() const;
- const Matcher<RefToConstProperty> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PropertyMatcher);
-};
-
-// Type traits specifying various features of different functors for ResultOf.
-// The default template specifies features for functor objects.
-// Functor classes have to typedef argument_type and result_type
-// to be compatible with ResultOf.
-template <typename Functor>
-struct CallableTraits {
- typedef typename Functor::result_type ResultType;
- typedef Functor StorageType;
-
- static void CheckIsValid(Functor /* functor */) {}
- template <typename T>
- static ResultType Invoke(Functor f, T arg) { return f(arg); }
-};
-
-// Specialization for function pointers.
-template <typename ArgType, typename ResType>
-struct CallableTraits<ResType(*)(ArgType)> {
- typedef ResType ResultType;
- typedef ResType(*StorageType)(ArgType);
-
- static void CheckIsValid(ResType(*f)(ArgType)) {
- GTEST_CHECK_(f != NULL)
- << "NULL function pointer is passed into ResultOf().";
- }
- template <typename T>
- static ResType Invoke(ResType(*f)(ArgType), T arg) {
- return (*f)(arg);
- }
-};
-
-// Implements the ResultOf() matcher for matching a return value of a
-// unary function of an object.
-template <typename Callable>
-class ResultOfMatcher {
- public:
- typedef typename CallableTraits<Callable>::ResultType ResultType;
-
- ResultOfMatcher(Callable callable, const Matcher<ResultType>& matcher)
- : callable_(callable), matcher_(matcher) {
- CallableTraits<Callable>::CheckIsValid(callable_);
- }
-
- template <typename T>
- operator Matcher<T>() const {
- return Matcher<T>(new Impl<T>(callable_, matcher_));
- }
-
- private:
- typedef typename CallableTraits<Callable>::StorageType CallableStorageType;
-
- template <typename T>
- class Impl : public MatcherInterface<T> {
- public:
- Impl(CallableStorageType callable, const Matcher<ResultType>& matcher)
- : callable_(callable), matcher_(matcher) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "is mapped by the given callable to a value that ";
- matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "is mapped by the given callable to a value that ";
- matcher_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(T obj, MatchResultListener* listener) const {
- *listener << "which is mapped by the given callable to ";
- // Cannot pass the return value (for example, int) to
- // MatchPrintAndExplain, which takes a non-const reference as argument.
- ResultType result =
- CallableTraits<Callable>::template Invoke<T>(callable_, obj);
- return MatchPrintAndExplain(result, matcher_, listener);
- }
-
- private:
- // Functors often define operator() as non-const method even though
- // they are actualy stateless. But we need to use them even when
- // 'this' is a const pointer. It's the user's responsibility not to
- // use stateful callables with ResultOf(), which does't guarantee
- // how many times the callable will be invoked.
- mutable CallableStorageType callable_;
- const Matcher<ResultType> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- }; // class Impl
-
- const CallableStorageType callable_;
- const Matcher<ResultType> matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ResultOfMatcher);
-};
-
-// Implements an equality matcher for any STL-style container whose elements
-// support ==. This matcher is like Eq(), but its failure explanations provide
-// more detailed information that is useful when the container is used as a set.
-// The failure message reports elements that are in one of the operands but not
-// the other. The failure messages do not report duplicate or out-of-order
-// elements in the containers (which don't properly matter to sets, but can
-// occur if the containers are vectors or lists, for example).
-//
-// Uses the container's const_iterator, value_type, operator ==,
-// begin(), and end().
-template <typename Container>
-class ContainerEqMatcher {
- public:
- typedef internal::StlContainerView<Container> View;
- typedef typename View::type StlContainer;
- typedef typename View::const_reference StlContainerReference;
-
- // We make a copy of rhs in case the elements in it are modified
- // after this matcher is created.
- explicit ContainerEqMatcher(const Container& rhs) : rhs_(View::Copy(rhs)) {
- // Makes sure the user doesn't instantiate this class template
- // with a const or reference type.
- (void)testing::StaticAssertTypeEq<Container,
- GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>();
- }
-
- void DescribeTo(::std::ostream* os) const {
- *os << "equals ";
- UniversalPrint(rhs_, os);
- }
- void DescribeNegationTo(::std::ostream* os) const {
- *os << "does not equal ";
- UniversalPrint(rhs_, os);
- }
-
- template <typename LhsContainer>
- bool MatchAndExplain(const LhsContainer& lhs,
- MatchResultListener* listener) const {
- // GTEST_REMOVE_CONST_() is needed to work around an MSVC 8.0 bug
- // that causes LhsContainer to be a const type sometimes.
- typedef internal::StlContainerView<GTEST_REMOVE_CONST_(LhsContainer)>
- LhsView;
- typedef typename LhsView::type LhsStlContainer;
- StlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
- if (lhs_stl_container == rhs_)
- return true;
-
- ::std::ostream* const os = listener->stream();
- if (os != NULL) {
- // Something is different. Check for extra values first.
- bool printed_header = false;
- for (typename LhsStlContainer::const_iterator it =
- lhs_stl_container.begin();
- it != lhs_stl_container.end(); ++it) {
- if (internal::ArrayAwareFind(rhs_.begin(), rhs_.end(), *it) ==
- rhs_.end()) {
- if (printed_header) {
- *os << ", ";
- } else {
- *os << "which has these unexpected elements: ";
- printed_header = true;
- }
- UniversalPrint(*it, os);
- }
- }
-
- // Now check for missing values.
- bool printed_header2 = false;
- for (typename StlContainer::const_iterator it = rhs_.begin();
- it != rhs_.end(); ++it) {
- if (internal::ArrayAwareFind(
- lhs_stl_container.begin(), lhs_stl_container.end(), *it) ==
- lhs_stl_container.end()) {
- if (printed_header2) {
- *os << ", ";
- } else {
- *os << (printed_header ? ",\nand" : "which")
- << " doesn't have these expected elements: ";
- printed_header2 = true;
- }
- UniversalPrint(*it, os);
- }
- }
- }
-
- return false;
- }
-
- private:
- const StlContainer rhs_;
-
- GTEST_DISALLOW_ASSIGN_(ContainerEqMatcher);
-};
-
-// Implements Pointwise(tuple_matcher, rhs_container). tuple_matcher
-// must be able to be safely cast to Matcher<tuple<const T1&, const
-// T2&> >, where T1 and T2 are the types of elements in the LHS
-// container and the RHS container respectively.
-template <typename TupleMatcher, typename RhsContainer>
-class PointwiseMatcher {
- public:
- typedef internal::StlContainerView<RhsContainer> RhsView;
- typedef typename RhsView::type RhsStlContainer;
- typedef typename RhsStlContainer::value_type RhsValue;
-
- // Like ContainerEq, we make a copy of rhs in case the elements in
- // it are modified after this matcher is created.
- PointwiseMatcher(const TupleMatcher& tuple_matcher, const RhsContainer& rhs)
- : tuple_matcher_(tuple_matcher), rhs_(RhsView::Copy(rhs)) {
- // Makes sure the user doesn't instantiate this class template
- // with a const or reference type.
- (void)testing::StaticAssertTypeEq<RhsContainer,
- GTEST_REMOVE_REFERENCE_AND_CONST_(RhsContainer)>();
- }
-
- template <typename LhsContainer>
- operator Matcher<LhsContainer>() const {
- return MakeMatcher(new Impl<LhsContainer>(tuple_matcher_, rhs_));
- }
-
- template <typename LhsContainer>
- class Impl : public MatcherInterface<LhsContainer> {
- public:
- typedef internal::StlContainerView<
- GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView;
- typedef typename LhsView::type LhsStlContainer;
- typedef typename LhsView::const_reference LhsStlContainerReference;
- typedef typename LhsStlContainer::value_type LhsValue;
- // We pass the LHS value and the RHS value to the inner matcher by
- // reference, as they may be expensive to copy. We must use tuple
- // instead of pair here, as a pair cannot hold references (C++ 98,
- // 20.2.2 [lib.pairs]).
- typedef std::tr1::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
-
- Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)
- // mono_tuple_matcher_ holds a monomorphic version of the tuple matcher.
- : mono_tuple_matcher_(SafeMatcherCast<InnerMatcherArg>(tuple_matcher)),
- rhs_(rhs) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "contains " << rhs_.size()
- << " values, where each value and its corresponding value in ";
- UniversalPrinter<RhsStlContainer>::Print(rhs_, os);
- *os << " ";
- mono_tuple_matcher_.DescribeTo(os);
- }
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't contain exactly " << rhs_.size()
- << " values, or contains a value x at some index i"
- << " where x and the i-th value of ";
- UniversalPrint(rhs_, os);
- *os << " ";
- mono_tuple_matcher_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(LhsContainer lhs,
- MatchResultListener* listener) const {
- LhsStlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
- const size_t actual_size = lhs_stl_container.size();
- if (actual_size != rhs_.size()) {
- *listener << "which contains " << actual_size << " values";
- return false;
- }
-
- typename LhsStlContainer::const_iterator left = lhs_stl_container.begin();
- typename RhsStlContainer::const_iterator right = rhs_.begin();
- for (size_t i = 0; i != actual_size; ++i, ++left, ++right) {
- const InnerMatcherArg value_pair(*left, *right);
-
- if (listener->IsInterested()) {
- StringMatchResultListener inner_listener;
- if (!mono_tuple_matcher_.MatchAndExplain(
- value_pair, &inner_listener)) {
- *listener << "where the value pair (";
- UniversalPrint(*left, listener->stream());
- *listener << ", ";
- UniversalPrint(*right, listener->stream());
- *listener << ") at index #" << i << " don't match";
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return false;
- }
- } else {
- if (!mono_tuple_matcher_.Matches(value_pair))
- return false;
- }
- }
-
- return true;
- }
-
- private:
- const Matcher<InnerMatcherArg> mono_tuple_matcher_;
- const RhsStlContainer rhs_;
-
- GTEST_DISALLOW_ASSIGN_(Impl);
- };
-
- private:
- const TupleMatcher tuple_matcher_;
- const RhsStlContainer rhs_;
-
- GTEST_DISALLOW_ASSIGN_(PointwiseMatcher);
-};
-
-// Holds the logic common to ContainsMatcherImpl and EachMatcherImpl.
-template <typename Container>
-class QuantifierMatcherImpl : public MatcherInterface<Container> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef StlContainerView<RawContainer> View;
- typedef typename View::type StlContainer;
- typedef typename View::const_reference StlContainerReference;
- typedef typename StlContainer::value_type Element;
-
- template <typename InnerMatcher>
- explicit QuantifierMatcherImpl(InnerMatcher inner_matcher)
- : inner_matcher_(
- testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
-
- // Checks whether:
- // * All elements in the container match, if all_elements_should_match.
- // * Any element in the container matches, if !all_elements_should_match.
- bool MatchAndExplainImpl(bool all_elements_should_match,
- Container container,
- MatchResultListener* listener) const {
- StlContainerReference stl_container = View::ConstReference(container);
- size_t i = 0;
- for (typename StlContainer::const_iterator it = stl_container.begin();
- it != stl_container.end(); ++it, ++i) {
- StringMatchResultListener inner_listener;
- const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
-
- if (matches != all_elements_should_match) {
- *listener << "whose element #" << i
- << (matches ? " matches" : " doesn't match");
- PrintIfNotEmpty(inner_listener.str(), listener->stream());
- return !all_elements_should_match;
- }
- }
- return all_elements_should_match;
- }
-
- protected:
- const Matcher<const Element&> inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(QuantifierMatcherImpl);
-};
-
-// Implements Contains(element_matcher) for the given argument type Container.
-// Symmetric to EachMatcherImpl.
-template <typename Container>
-class ContainsMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
- template <typename InnerMatcher>
- explicit ContainsMatcherImpl(InnerMatcher inner_matcher)
- : QuantifierMatcherImpl<Container>(inner_matcher) {}
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "contains at least one element that ";
- this->inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't contain any element that ";
- this->inner_matcher_.DescribeTo(os);
- }
-
- virtual bool MatchAndExplain(Container container,
- MatchResultListener* listener) const {
- return this->MatchAndExplainImpl(false, container, listener);
- }
-
- private:
- GTEST_DISALLOW_ASSIGN_(ContainsMatcherImpl);
-};
-
-// Implements Each(element_matcher) for the given argument type Container.
-// Symmetric to ContainsMatcherImpl.
-template <typename Container>
-class EachMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
- template <typename InnerMatcher>
- explicit EachMatcherImpl(InnerMatcher inner_matcher)
- : QuantifierMatcherImpl<Container>(inner_matcher) {}
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "only contains elements that ";
- this->inner_matcher_.DescribeTo(os);
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "contains some element that ";
- this->inner_matcher_.DescribeNegationTo(os);
- }
-
- virtual bool MatchAndExplain(Container container,
- MatchResultListener* listener) const {
- return this->MatchAndExplainImpl(true, container, listener);
- }
-
- private:
- GTEST_DISALLOW_ASSIGN_(EachMatcherImpl);
-};
-
-// Implements polymorphic Contains(element_matcher).
-template <typename M>
-class ContainsMatcher {
- public:
- explicit ContainsMatcher(M m) : inner_matcher_(m) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- return MakeMatcher(new ContainsMatcherImpl<Container>(inner_matcher_));
- }
-
- private:
- const M inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(ContainsMatcher);
-};
-
-// Implements polymorphic Each(element_matcher).
-template <typename M>
-class EachMatcher {
- public:
- explicit EachMatcher(M m) : inner_matcher_(m) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- return MakeMatcher(new EachMatcherImpl<Container>(inner_matcher_));
- }
-
- private:
- const M inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(EachMatcher);
-};
-
-// Implements Key(inner_matcher) for the given argument pair type.
-// Key(inner_matcher) matches an std::pair whose 'first' field matches
-// inner_matcher. For example, Contains(Key(Ge(5))) can be used to match an
-// std::map that contains at least one element whose key is >= 5.
-template <typename PairType>
-class KeyMatcherImpl : public MatcherInterface<PairType> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;
- typedef typename RawPairType::first_type KeyType;
-
- template <typename InnerMatcher>
- explicit KeyMatcherImpl(InnerMatcher inner_matcher)
- : inner_matcher_(
- testing::SafeMatcherCast<const KeyType&>(inner_matcher)) {
- }
-
- // Returns true iff 'key_value.first' (the key) matches the inner matcher.
- virtual bool MatchAndExplain(PairType key_value,
- MatchResultListener* listener) const {
- StringMatchResultListener inner_listener;
- const bool match = inner_matcher_.MatchAndExplain(key_value.first,
- &inner_listener);
- const internal::string explanation = inner_listener.str();
- if (explanation != "") {
- *listener << "whose first field is a value " << explanation;
- }
- return match;
- }
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "has a key that ";
- inner_matcher_.DescribeTo(os);
- }
-
- // Describes what the negation of this matcher does.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't have a key that ";
- inner_matcher_.DescribeTo(os);
- }
-
- private:
- const Matcher<const KeyType&> inner_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(KeyMatcherImpl);
-};
-
-// Implements polymorphic Key(matcher_for_key).
-template <typename M>
-class KeyMatcher {
- public:
- explicit KeyMatcher(M m) : matcher_for_key_(m) {}
-
- template <typename PairType>
- operator Matcher<PairType>() const {
- return MakeMatcher(new KeyMatcherImpl<PairType>(matcher_for_key_));
- }
-
- private:
- const M matcher_for_key_;
-
- GTEST_DISALLOW_ASSIGN_(KeyMatcher);
-};
-
-// Implements Pair(first_matcher, second_matcher) for the given argument pair
-// type with its two matchers. See Pair() function below.
-template <typename PairType>
-class PairMatcherImpl : public MatcherInterface<PairType> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;
- typedef typename RawPairType::first_type FirstType;
- typedef typename RawPairType::second_type SecondType;
-
- template <typename FirstMatcher, typename SecondMatcher>
- PairMatcherImpl(FirstMatcher first_matcher, SecondMatcher second_matcher)
- : first_matcher_(
- testing::SafeMatcherCast<const FirstType&>(first_matcher)),
- second_matcher_(
- testing::SafeMatcherCast<const SecondType&>(second_matcher)) {
- }
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "has a first field that ";
- first_matcher_.DescribeTo(os);
- *os << ", and has a second field that ";
- second_matcher_.DescribeTo(os);
- }
-
- // Describes what the negation of this matcher does.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "has a first field that ";
- first_matcher_.DescribeNegationTo(os);
- *os << ", or has a second field that ";
- second_matcher_.DescribeNegationTo(os);
- }
-
- // Returns true iff 'a_pair.first' matches first_matcher and 'a_pair.second'
- // matches second_matcher.
- virtual bool MatchAndExplain(PairType a_pair,
- MatchResultListener* listener) const {
- if (!listener->IsInterested()) {
- // If the listener is not interested, we don't need to construct the
- // explanation.
- return first_matcher_.Matches(a_pair.first) &&
- second_matcher_.Matches(a_pair.second);
- }
- StringMatchResultListener first_inner_listener;
- if (!first_matcher_.MatchAndExplain(a_pair.first,
- &first_inner_listener)) {
- *listener << "whose first field does not match";
- PrintIfNotEmpty(first_inner_listener.str(), listener->stream());
- return false;
- }
- StringMatchResultListener second_inner_listener;
- if (!second_matcher_.MatchAndExplain(a_pair.second,
- &second_inner_listener)) {
- *listener << "whose second field does not match";
- PrintIfNotEmpty(second_inner_listener.str(), listener->stream());
- return false;
- }
- ExplainSuccess(first_inner_listener.str(), second_inner_listener.str(),
- listener);
- return true;
- }
-
- private:
- void ExplainSuccess(const internal::string& first_explanation,
- const internal::string& second_explanation,
- MatchResultListener* listener) const {
- *listener << "whose both fields match";
- if (first_explanation != "") {
- *listener << ", where the first field is a value " << first_explanation;
- }
- if (second_explanation != "") {
- *listener << ", ";
- if (first_explanation != "") {
- *listener << "and ";
- } else {
- *listener << "where ";
- }
- *listener << "the second field is a value " << second_explanation;
- }
- }
-
- const Matcher<const FirstType&> first_matcher_;
- const Matcher<const SecondType&> second_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PairMatcherImpl);
-};
-
-// Implements polymorphic Pair(first_matcher, second_matcher).
-template <typename FirstMatcher, typename SecondMatcher>
-class PairMatcher {
- public:
- PairMatcher(FirstMatcher first_matcher, SecondMatcher second_matcher)
- : first_matcher_(first_matcher), second_matcher_(second_matcher) {}
-
- template <typename PairType>
- operator Matcher<PairType> () const {
- return MakeMatcher(
- new PairMatcherImpl<PairType>(
- first_matcher_, second_matcher_));
- }
-
- private:
- const FirstMatcher first_matcher_;
- const SecondMatcher second_matcher_;
-
- GTEST_DISALLOW_ASSIGN_(PairMatcher);
-};
-
-// Implements ElementsAre() and ElementsAreArray().
-template <typename Container>
-class ElementsAreMatcherImpl : public MatcherInterface<Container> {
- public:
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef internal::StlContainerView<RawContainer> View;
- typedef typename View::type StlContainer;
- typedef typename View::const_reference StlContainerReference;
- typedef typename StlContainer::value_type Element;
-
- // Constructs the matcher from a sequence of element values or
- // element matchers.
- template <typename InputIter>
- ElementsAreMatcherImpl(InputIter first, size_t a_count) {
- matchers_.reserve(a_count);
- InputIter it = first;
- for (size_t i = 0; i != a_count; ++i, ++it) {
- matchers_.push_back(MatcherCast<const Element&>(*it));
- }
- }
-
- // Describes what this matcher does.
- virtual void DescribeTo(::std::ostream* os) const {
- if (count() == 0) {
- *os << "is empty";
- } else if (count() == 1) {
- *os << "has 1 element that ";
- matchers_[0].DescribeTo(os);
- } else {
- *os << "has " << Elements(count()) << " where\n";
- for (size_t i = 0; i != count(); ++i) {
- *os << "element #" << i << " ";
- matchers_[i].DescribeTo(os);
- if (i + 1 < count()) {
- *os << ",\n";
- }
- }
- }
- }
-
- // Describes what the negation of this matcher does.
- virtual void DescribeNegationTo(::std::ostream* os) const {
- if (count() == 0) {
- *os << "isn't empty";
- return;
- }
-
- *os << "doesn't have " << Elements(count()) << ", or\n";
- for (size_t i = 0; i != count(); ++i) {
- *os << "element #" << i << " ";
- matchers_[i].DescribeNegationTo(os);
- if (i + 1 < count()) {
- *os << ", or\n";
- }
- }
- }
-
- virtual bool MatchAndExplain(Container container,
- MatchResultListener* listener) const {
- StlContainerReference stl_container = View::ConstReference(container);
- const size_t actual_count = stl_container.size();
- if (actual_count != count()) {
- // The element count doesn't match. If the container is empty,
- // there's no need to explain anything as Google Mock already
- // prints the empty container. Otherwise we just need to show
- // how many elements there actually are.
- if (actual_count != 0) {
- *listener << "which has " << Elements(actual_count);
- }
- return false;
- }
-
- typename StlContainer::const_iterator it = stl_container.begin();
- // explanations[i] is the explanation of the element at index i.
- std::vector<internal::string> explanations(count());
- for (size_t i = 0; i != count(); ++it, ++i) {
- StringMatchResultListener s;
- if (matchers_[i].MatchAndExplain(*it, &s)) {
- explanations[i] = s.str();
- } else {
- // The container has the right size but the i-th element
- // doesn't match its expectation.
- *listener << "whose element #" << i << " doesn't match";
- PrintIfNotEmpty(s.str(), listener->stream());
- return false;
- }
- }
-
- // Every element matches its expectation. We need to explain why
- // (the obvious ones can be skipped).
- bool reason_printed = false;
- for (size_t i = 0; i != count(); ++i) {
- const internal::string& s = explanations[i];
- if (!s.empty()) {
- if (reason_printed) {
- *listener << ",\nand ";
- }
- *listener << "whose element #" << i << " matches, " << s;
- reason_printed = true;
- }
- }
-
- return true;
- }
-
- private:
- static Message Elements(size_t count) {
- return Message() << count << (count == 1 ? " element" : " elements");
- }
-
- size_t count() const { return matchers_.size(); }
- std::vector<Matcher<const Element&> > matchers_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreMatcherImpl);
-};
-
-// Implements ElementsAre() of 0 arguments.
-class ElementsAreMatcher0 {
- public:
- ElementsAreMatcher0() {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- const Matcher<const Element&>* const matchers = NULL;
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, 0));
- }
-};
-
-// Implements ElementsAreArray().
-template <typename T>
-class ElementsAreArrayMatcher {
- public:
- ElementsAreArrayMatcher(const T* first, size_t count) :
- first_(first), count_(count) {}
-
- template <typename Container>
- operator Matcher<Container>() const {
- typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
- typedef typename internal::StlContainerView<RawContainer>::type::value_type
- Element;
-
- return MakeMatcher(new ElementsAreMatcherImpl<Container>(first_, count_));
- }
-
- private:
- const T* const first_;
- const size_t count_;
-
- GTEST_DISALLOW_ASSIGN_(ElementsAreArrayMatcher);
-};
-
-// Returns the description for a matcher defined using the MATCHER*()
-// macro where the user-supplied description string is "", if
-// 'negation' is false; otherwise returns the description of the
-// negation of the matcher. 'param_values' contains a list of strings
-// that are the print-out of the matcher's parameters.
-string FormatMatcherDescription(bool negation, const char* matcher_name,
- const Strings& param_values);
-
-} // namespace internal
-
-// Implements MatcherCast().
-template <typename T, typename M>
-inline Matcher<T> MatcherCast(M matcher) {
- return internal::MatcherCastImpl<T, M>::Cast(matcher);
-}
-
-// _ is a matcher that matches anything of any type.
-//
-// This definition is fine as:
-//
-// 1. The C++ standard permits using the name _ in a namespace that
-// is not the global namespace or ::std.
-// 2. The AnythingMatcher class has no data member or constructor,
-// so it's OK to create global variables of this type.
-// 3. c-style has approved of using _ in this case.
-const internal::AnythingMatcher _ = {};
-// Creates a matcher that matches any value of the given type T.
-template <typename T>
-inline Matcher<T> A() { return MakeMatcher(new internal::AnyMatcherImpl<T>()); }
-
-// Creates a matcher that matches any value of the given type T.
-template <typename T>
-inline Matcher<T> An() { return A<T>(); }
-
-// Creates a polymorphic matcher that matches anything equal to x.
-// Note: if the parameter of Eq() were declared as const T&, Eq("foo")
-// wouldn't compile.
-template <typename T>
-inline internal::EqMatcher<T> Eq(T x) { return internal::EqMatcher<T>(x); }
-
-// Constructs a Matcher<T> from a 'value' of type T. The constructed
-// matcher matches any value that's equal to 'value'.
-template <typename T>
-Matcher<T>::Matcher(T value) { *this = Eq(value); }
-
-// Creates a monomorphic matcher that matches anything with type Lhs
-// and equal to rhs. A user may need to use this instead of Eq(...)
-// in order to resolve an overloading ambiguity.
-//
-// TypedEq<T>(x) is just a convenient short-hand for Matcher<T>(Eq(x))
-// or Matcher<T>(x), but more readable than the latter.
-//
-// We could define similar monomorphic matchers for other comparison
-// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do
-// it yet as those are used much less than Eq() in practice. A user
-// can always write Matcher<T>(Lt(5)) to be explicit about the type,
-// for example.
-template <typename Lhs, typename Rhs>
-inline Matcher<Lhs> TypedEq(const Rhs& rhs) { return Eq(rhs); }
-
-// Creates a polymorphic matcher that matches anything >= x.
-template <typename Rhs>
-inline internal::GeMatcher<Rhs> Ge(Rhs x) {
- return internal::GeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything > x.
-template <typename Rhs>
-inline internal::GtMatcher<Rhs> Gt(Rhs x) {
- return internal::GtMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything <= x.
-template <typename Rhs>
-inline internal::LeMatcher<Rhs> Le(Rhs x) {
- return internal::LeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything < x.
-template <typename Rhs>
-inline internal::LtMatcher<Rhs> Lt(Rhs x) {
- return internal::LtMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything != x.
-template <typename Rhs>
-inline internal::NeMatcher<Rhs> Ne(Rhs x) {
- return internal::NeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches any NULL pointer.
-inline PolymorphicMatcher<internal::IsNullMatcher > IsNull() {
- return MakePolymorphicMatcher(internal::IsNullMatcher());
-}
-
-// Creates a polymorphic matcher that matches any non-NULL pointer.
-// This is convenient as Not(NULL) doesn't compile (the compiler
-// thinks that that expression is comparing a pointer with an integer).
-inline PolymorphicMatcher<internal::NotNullMatcher > NotNull() {
- return MakePolymorphicMatcher(internal::NotNullMatcher());
-}
-
-// Creates a polymorphic matcher that matches any argument that
-// references variable x.
-template <typename T>
-inline internal::RefMatcher<T&> Ref(T& x) { // NOLINT
- return internal::RefMatcher<T&>(x);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, where two NANs are considered unequal.
-inline internal::FloatingEqMatcher<double> DoubleEq(double rhs) {
- return internal::FloatingEqMatcher<double>(rhs, false);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, including NaN values when rhs is NaN.
-inline internal::FloatingEqMatcher<double> NanSensitiveDoubleEq(double rhs) {
- return internal::FloatingEqMatcher<double>(rhs, true);
-}
-
-// Creates a matcher that matches any float argument approximately
-// equal to rhs, where two NANs are considered unequal.
-inline internal::FloatingEqMatcher<float> FloatEq(float rhs) {
- return internal::FloatingEqMatcher<float>(rhs, false);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, including NaN values when rhs is NaN.
-inline internal::FloatingEqMatcher<float> NanSensitiveFloatEq(float rhs) {
- return internal::FloatingEqMatcher<float>(rhs, true);
-}
-
-// Creates a matcher that matches a pointer (raw or smart) that points
-// to a value that matches inner_matcher.
-template <typename InnerMatcher>
-inline internal::PointeeMatcher<InnerMatcher> Pointee(
- const InnerMatcher& inner_matcher) {
- return internal::PointeeMatcher<InnerMatcher>(inner_matcher);
-}
-
-// Creates a matcher that matches an object whose given field matches
-// 'matcher'. For example,
-// Field(&Foo::number, Ge(5))
-// matches a Foo object x iff x.number >= 5.
-template <typename Class, typename FieldType, typename FieldMatcher>
-inline PolymorphicMatcher<
- internal::FieldMatcher<Class, FieldType> > Field(
- FieldType Class::*field, const FieldMatcher& matcher) {
- return MakePolymorphicMatcher(
- internal::FieldMatcher<Class, FieldType>(
- field, MatcherCast<const FieldType&>(matcher)));
- // The call to MatcherCast() is required for supporting inner
- // matchers of compatible types. For example, it allows
- // Field(&Foo::bar, m)
- // to compile where bar is an int32 and m is a matcher for int64.
-}
-
-// Creates a matcher that matches an object whose given property
-// matches 'matcher'. For example,
-// Property(&Foo::str, StartsWith("hi"))
-// matches a Foo object x iff x.str() starts with "hi".
-template <typename Class, typename PropertyType, typename PropertyMatcher>
-inline PolymorphicMatcher<
- internal::PropertyMatcher<Class, PropertyType> > Property(
- PropertyType (Class::*property)() const, const PropertyMatcher& matcher) {
- return MakePolymorphicMatcher(
- internal::PropertyMatcher<Class, PropertyType>(
- property,
- MatcherCast<GTEST_REFERENCE_TO_CONST_(PropertyType)>(matcher)));
- // The call to MatcherCast() is required for supporting inner
- // matchers of compatible types. For example, it allows
- // Property(&Foo::bar, m)
- // to compile where bar() returns an int32 and m is a matcher for int64.
-}
-
-// Creates a matcher that matches an object iff the result of applying
-// a callable to x matches 'matcher'.
-// For example,
-// ResultOf(f, StartsWith("hi"))
-// matches a Foo object x iff f(x) starts with "hi".
-// callable parameter can be a function, function pointer, or a functor.
-// Callable has to satisfy the following conditions:
-// * It is required to keep no state affecting the results of
-// the calls on it and make no assumptions about how many calls
-// will be made. Any state it keeps must be protected from the
-// concurrent access.
-// * If it is a function object, it has to define type result_type.
-// We recommend deriving your functor classes from std::unary_function.
-template <typename Callable, typename ResultOfMatcher>
-internal::ResultOfMatcher<Callable> ResultOf(
- Callable callable, const ResultOfMatcher& matcher) {
- return internal::ResultOfMatcher<Callable>(
- callable,
- MatcherCast<typename internal::CallableTraits<Callable>::ResultType>(
- matcher));
- // The call to MatcherCast() is required for supporting inner
- // matchers of compatible types. For example, it allows
- // ResultOf(Function, m)
- // to compile where Function() returns an int32 and m is a matcher for int64.
-}
-
-// String matchers.
-
-// Matches a string equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrEq(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, true, true));
-}
-
-// Matches a string not equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrNe(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, false, true));
-}
-
-// Matches a string equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrCaseEq(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, true, false));
-}
-
-// Matches a string not equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::string> >
- StrCaseNe(const internal::string& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::string>(
- str, false, false));
-}
-
-// Creates a matcher that matches any string, std::string, or C string
-// that contains the given substring.
-inline PolymorphicMatcher<internal::HasSubstrMatcher<internal::string> >
- HasSubstr(const internal::string& substring) {
- return MakePolymorphicMatcher(internal::HasSubstrMatcher<internal::string>(
- substring));
-}
-
-// Matches a string that starts with 'prefix' (case-sensitive).
-inline PolymorphicMatcher<internal::StartsWithMatcher<internal::string> >
- StartsWith(const internal::string& prefix) {
- return MakePolymorphicMatcher(internal::StartsWithMatcher<internal::string>(
- prefix));
-}
-
-// Matches a string that ends with 'suffix' (case-sensitive).
-inline PolymorphicMatcher<internal::EndsWithMatcher<internal::string> >
- EndsWith(const internal::string& suffix) {
- return MakePolymorphicMatcher(internal::EndsWithMatcher<internal::string>(
- suffix));
-}
-
-// Matches a string that fully matches regular expression 'regex'.
-// The matcher takes ownership of 'regex'.
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
- const internal::RE* regex) {
- return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true));
-}
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
- const internal::string& regex) {
- return MatchesRegex(new internal::RE(regex));
-}
-
-// Matches a string that contains regular expression 'regex'.
-// The matcher takes ownership of 'regex'.
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
- const internal::RE* regex) {
- return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false));
-}
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
- const internal::string& regex) {
- return ContainsRegex(new internal::RE(regex));
-}
-
-#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
-// Wide string matchers.
-
-// Matches a string equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrEq(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, true, true));
-}
-
-// Matches a string not equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrNe(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, false, true));
-}
-
-// Matches a string equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrCaseEq(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, true, false));
-}
-
-// Matches a string not equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<internal::wstring> >
- StrCaseNe(const internal::wstring& str) {
- return MakePolymorphicMatcher(internal::StrEqualityMatcher<internal::wstring>(
- str, false, false));
-}
-
-// Creates a matcher that matches any wstring, std::wstring, or C wide string
-// that contains the given substring.
-inline PolymorphicMatcher<internal::HasSubstrMatcher<internal::wstring> >
- HasSubstr(const internal::wstring& substring) {
- return MakePolymorphicMatcher(internal::HasSubstrMatcher<internal::wstring>(
- substring));
-}
-
-// Matches a string that starts with 'prefix' (case-sensitive).
-inline PolymorphicMatcher<internal::StartsWithMatcher<internal::wstring> >
- StartsWith(const internal::wstring& prefix) {
- return MakePolymorphicMatcher(internal::StartsWithMatcher<internal::wstring>(
- prefix));
-}
-
-// Matches a string that ends with 'suffix' (case-sensitive).
-inline PolymorphicMatcher<internal::EndsWithMatcher<internal::wstring> >
- EndsWith(const internal::wstring& suffix) {
- return MakePolymorphicMatcher(internal::EndsWithMatcher<internal::wstring>(
- suffix));
-}
-
-#endif // GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field == the second field.
-inline internal::Eq2Matcher Eq() { return internal::Eq2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field >= the second field.
-inline internal::Ge2Matcher Ge() { return internal::Ge2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field > the second field.
-inline internal::Gt2Matcher Gt() { return internal::Gt2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field <= the second field.
-inline internal::Le2Matcher Le() { return internal::Le2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field < the second field.
-inline internal::Lt2Matcher Lt() { return internal::Lt2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field != the second field.
-inline internal::Ne2Matcher Ne() { return internal::Ne2Matcher(); }
-
-// Creates a matcher that matches any value of type T that m doesn't
-// match.
-template <typename InnerMatcher>
-inline internal::NotMatcher<InnerMatcher> Not(InnerMatcher m) {
- return internal::NotMatcher<InnerMatcher>(m);
-}
-
-// Returns a matcher that matches anything that satisfies the given
-// predicate. The predicate can be any unary function or functor
-// whose return type can be implicitly converted to bool.
-template <typename Predicate>
-inline PolymorphicMatcher<internal::TrulyMatcher<Predicate> >
-Truly(Predicate pred) {
- return MakePolymorphicMatcher(internal::TrulyMatcher<Predicate>(pred));
-}
-
-// Returns a matcher that matches an equal container.
-// This matcher behaves like Eq(), but in the event of mismatch lists the
-// values that are included in one container but not the other. (Duplicate
-// values and order differences are not explained.)
-template <typename Container>
-inline PolymorphicMatcher<internal::ContainerEqMatcher< // NOLINT
- GTEST_REMOVE_CONST_(Container)> >
- ContainerEq(const Container& rhs) {
- // This following line is for working around a bug in MSVC 8.0,
- // which causes Container to be a const type sometimes.
- typedef GTEST_REMOVE_CONST_(Container) RawContainer;
- return MakePolymorphicMatcher(
- internal::ContainerEqMatcher<RawContainer>(rhs));
-}
-
-// Matches an STL-style container or a native array that contains the
-// same number of elements as in rhs, where its i-th element and rhs's
-// i-th element (as a pair) satisfy the given pair matcher, for all i.
-// TupleMatcher must be able to be safely cast to Matcher<tuple<const
-// T1&, const T2&> >, where T1 and T2 are the types of elements in the
-// LHS container and the RHS container respectively.
-template <typename TupleMatcher, typename Container>
-inline internal::PointwiseMatcher<TupleMatcher,
- GTEST_REMOVE_CONST_(Container)>
-Pointwise(const TupleMatcher& tuple_matcher, const Container& rhs) {
- // This following line is for working around a bug in MSVC 8.0,
- // which causes Container to be a const type sometimes.
- typedef GTEST_REMOVE_CONST_(Container) RawContainer;
- return internal::PointwiseMatcher<TupleMatcher, RawContainer>(
- tuple_matcher, rhs);
-}
-
-// Matches an STL-style container or a native array that contains at
-// least one element matching the given value or matcher.
-//
-// Examples:
-// ::std::set<int> page_ids;
-// page_ids.insert(3);
-// page_ids.insert(1);
-// EXPECT_THAT(page_ids, Contains(1));
-// EXPECT_THAT(page_ids, Contains(Gt(2)));
-// EXPECT_THAT(page_ids, Not(Contains(4)));
-//
-// ::std::map<int, size_t> page_lengths;
-// page_lengths[1] = 100;
-// EXPECT_THAT(page_lengths,
-// Contains(::std::pair<const int, size_t>(1, 100)));
-//
-// const char* user_ids[] = { "joe", "mike", "tom" };
-// EXPECT_THAT(user_ids, Contains(Eq(::std::string("tom"))));
-template <typename M>
-inline internal::ContainsMatcher<M> Contains(M matcher) {
- return internal::ContainsMatcher<M>(matcher);
-}
-
-// Matches an STL-style container or a native array that contains only
-// elements matching the given value or matcher.
-//
-// Each(m) is semantically equivalent to Not(Contains(Not(m))). Only
-// the messages are different.
-//
-// Examples:
-// ::std::set<int> page_ids;
-// // Each(m) matches an empty container, regardless of what m is.
-// EXPECT_THAT(page_ids, Each(Eq(1)));
-// EXPECT_THAT(page_ids, Each(Eq(77)));
-//
-// page_ids.insert(3);
-// EXPECT_THAT(page_ids, Each(Gt(0)));
-// EXPECT_THAT(page_ids, Not(Each(Gt(4))));
-// page_ids.insert(1);
-// EXPECT_THAT(page_ids, Not(Each(Lt(2))));
-//
-// ::std::map<int, size_t> page_lengths;
-// page_lengths[1] = 100;
-// page_lengths[2] = 200;
-// page_lengths[3] = 300;
-// EXPECT_THAT(page_lengths, Not(Each(Pair(1, 100))));
-// EXPECT_THAT(page_lengths, Each(Key(Le(3))));
-//
-// const char* user_ids[] = { "joe", "mike", "tom" };
-// EXPECT_THAT(user_ids, Not(Each(Eq(::std::string("tom")))));
-template <typename M>
-inline internal::EachMatcher<M> Each(M matcher) {
- return internal::EachMatcher<M>(matcher);
-}
-
-// Key(inner_matcher) matches an std::pair whose 'first' field matches
-// inner_matcher. For example, Contains(Key(Ge(5))) can be used to match an
-// std::map that contains at least one element whose key is >= 5.
-template <typename M>
-inline internal::KeyMatcher<M> Key(M inner_matcher) {
- return internal::KeyMatcher<M>(inner_matcher);
-}
-
-// Pair(first_matcher, second_matcher) matches a std::pair whose 'first' field
-// matches first_matcher and whose 'second' field matches second_matcher. For
-// example, EXPECT_THAT(map_type, ElementsAre(Pair(Ge(5), "foo"))) can be used
-// to match a std::map<int, string> that contains exactly one element whose key
-// is >= 5 and whose value equals "foo".
-template <typename FirstMatcher, typename SecondMatcher>
-inline internal::PairMatcher<FirstMatcher, SecondMatcher>
-Pair(FirstMatcher first_matcher, SecondMatcher second_matcher) {
- return internal::PairMatcher<FirstMatcher, SecondMatcher>(
- first_matcher, second_matcher);
-}
-
-// Returns a predicate that is satisfied by anything that matches the
-// given matcher.
-template <typename M>
-inline internal::MatcherAsPredicate<M> Matches(M matcher) {
- return internal::MatcherAsPredicate<M>(matcher);
-}
-
-// Returns true iff the value matches the matcher.
-template <typename T, typename M>
-inline bool Value(const T& value, M matcher) {
- return testing::Matches(matcher)(value);
-}
-
-// Matches the value against the given matcher and explains the match
-// result to listener.
-template <typename T, typename M>
-inline bool ExplainMatchResult(
- M matcher, const T& value, MatchResultListener* listener) {
- return SafeMatcherCast<const T&>(matcher).MatchAndExplain(value, listener);
-}
-
-// AllArgs(m) is a synonym of m. This is useful in
-//
-// EXPECT_CALL(foo, Bar(_, _)).With(AllArgs(Eq()));
-//
-// which is easier to read than
-//
-// EXPECT_CALL(foo, Bar(_, _)).With(Eq());
-template <typename InnerMatcher>
-inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; }
-
-// These macros allow using matchers to check values in Google Test
-// tests. ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher)
-// succeed iff the value matches the matcher. If the assertion fails,
-// the value and the description of the matcher will be printed.
-#define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\
- ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
-#define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\
- ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-more-actions.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-more-actions.h
deleted file mode 100644
index fc5e5ca81..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-more-actions.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some actions that depend on gmock-generated-actions.h.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-
-#include <algorithm>
-
-#include "gmock/gmock-generated-actions.h"
-
-namespace testing {
-namespace internal {
-
-// Implements the Invoke(f) action. The template argument
-// FunctionImpl is the implementation type of f, which can be either a
-// function pointer or a functor. Invoke(f) can be used as an
-// Action<F> as long as f's type is compatible with F (i.e. f can be
-// assigned to a tr1::function<F>).
-template <typename FunctionImpl>
-class InvokeAction {
- public:
- // The c'tor makes a copy of function_impl (either a function
- // pointer or a functor).
- explicit InvokeAction(FunctionImpl function_impl)
- : function_impl_(function_impl) {}
-
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& args) {
- return InvokeHelper<Result, ArgumentTuple>::Invoke(function_impl_, args);
- }
-
- private:
- FunctionImpl function_impl_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeAction);
-};
-
-// Implements the Invoke(object_ptr, &Class::Method) action.
-template <class Class, typename MethodPtr>
-class InvokeMethodAction {
- public:
- InvokeMethodAction(Class* obj_ptr, MethodPtr method_ptr)
- : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {}
-
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& args) const {
- return InvokeHelper<Result, ArgumentTuple>::InvokeMethod(
- obj_ptr_, method_ptr_, args);
- }
-
- private:
- Class* const obj_ptr_;
- const MethodPtr method_ptr_;
-
- GTEST_DISALLOW_ASSIGN_(InvokeMethodAction);
-};
-
-} // namespace internal
-
-// Various overloads for Invoke().
-
-// Creates an action that invokes 'function_impl' with the mock
-// function's arguments.
-template <typename FunctionImpl>
-PolymorphicAction<internal::InvokeAction<FunctionImpl> > Invoke(
- FunctionImpl function_impl) {
- return MakePolymorphicAction(
- internal::InvokeAction<FunctionImpl>(function_impl));
-}
-
-// Creates an action that invokes the given method on the given object
-// with the mock function's arguments.
-template <class Class, typename MethodPtr>
-PolymorphicAction<internal::InvokeMethodAction<Class, MethodPtr> > Invoke(
- Class* obj_ptr, MethodPtr method_ptr) {
- return MakePolymorphicAction(
- internal::InvokeMethodAction<Class, MethodPtr>(obj_ptr, method_ptr));
-}
-
-// WithoutArgs(inner_action) can be used in a mock function with a
-// non-empty argument list to perform inner_action, which takes no
-// argument. In other words, it adapts an action accepting no
-// argument to one that accepts (and ignores) arguments.
-template <typename InnerAction>
-inline internal::WithArgsAction<InnerAction>
-WithoutArgs(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction>(action);
-}
-
-// WithArg<k>(an_action) creates an action that passes the k-th
-// (0-based) argument of the mock function to an_action and performs
-// it. It adapts an action accepting one argument to one that accepts
-// multiple arguments. For convenience, we also provide
-// WithArgs<k>(an_action) (defined below) as a synonym.
-template <int k, typename InnerAction>
-inline internal::WithArgsAction<InnerAction, k>
-WithArg(const InnerAction& action) {
- return internal::WithArgsAction<InnerAction, k>(action);
-}
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Action ReturnArg<k>() returns the k-th argument of the mock function.
-ACTION_TEMPLATE(ReturnArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- return std::tr1::get<k>(args);
-}
-
-// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the
-// mock function to *pointer.
-ACTION_TEMPLATE(SaveArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(pointer)) {
- *pointer = ::std::tr1::get<k>(args);
-}
-
-// Action SaveArgPointee<k>(pointer) saves the value pointed to
-// by the k-th (0-based) argument of the mock function to *pointer.
-ACTION_TEMPLATE(SaveArgPointee,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(pointer)) {
- *pointer = *::std::tr1::get<k>(args);
-}
-
-// Action SetArgReferee<k>(value) assigns 'value' to the variable
-// referenced by the k-th (0-based) argument of the mock function.
-ACTION_TEMPLATE(SetArgReferee,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_1_VALUE_PARAMS(value)) {
- typedef typename ::std::tr1::tuple_element<k, args_type>::type argk_type;
- // Ensures that argument #k is a reference. If you get a compiler
- // error on the next line, you are using SetArgReferee<k>(value) in
- // a mock function whose k-th (0-based) argument is not a reference.
- GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,
- SetArgReferee_must_be_used_with_a_reference_argument);
- ::std::tr1::get<k>(args) = value;
-}
-
-// Action SetArrayArgument<k>(first, last) copies the elements in
-// source range [first, last) to the array pointed to by the k-th
-// (0-based) argument, which can be either a pointer or an
-// iterator. The action does not take ownership of the elements in the
-// source range.
-ACTION_TEMPLATE(SetArrayArgument,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_2_VALUE_PARAMS(first, last)) {
- // Microsoft compiler deprecates ::std::copy, so we want to suppress warning
- // 4996 (Function call with parameters that may be unsafe) there.
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4996) // Temporarily disables warning 4996.
-#endif
- ::std::copy(first, last, ::std::tr1::get<k>(args));
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif
-}
-
-// Action DeleteArg<k>() deletes the k-th (0-based) argument of the mock
-// function.
-ACTION_TEMPLATE(DeleteArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- delete ::std::tr1::get<k>(args);
-}
-
-// This action returns the value pointed to by 'pointer'.
-ACTION_P(ReturnPointee, pointer) { return *pointer; }
-
-// Action Throw(exception) can be used in a mock function of any type
-// to throw the given exception. Any copyable value can be thrown.
-#if GTEST_HAS_EXCEPTIONS
-
-// Suppresses the 'unreachable code' warning that VC generates in opt modes.
-# ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4702) // Temporarily disables warning 4702.
-# endif
-ACTION_P(Throw, exception) { throw exception; }
-# ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-# endif
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-spec-builders.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-spec-builders.h
deleted file mode 100644
index 400d4d719..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock-spec-builders.h
+++ /dev/null
@@ -1,1749 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements the ON_CALL() and EXPECT_CALL() macros.
-//
-// A user can use the ON_CALL() macro to specify the default action of
-// a mock method. The syntax is:
-//
-// ON_CALL(mock_object, Method(argument-matchers))
-// .With(multi-argument-matcher)
-// .WillByDefault(action);
-//
-// where the .With() clause is optional.
-//
-// A user can use the EXPECT_CALL() macro to specify an expectation on
-// a mock method. The syntax is:
-//
-// EXPECT_CALL(mock_object, Method(argument-matchers))
-// .With(multi-argument-matchers)
-// .Times(cardinality)
-// .InSequence(sequences)
-// .After(expectations)
-// .WillOnce(action)
-// .WillRepeatedly(action)
-// .RetiresOnSaturation();
-//
-// where all clauses are optional, and .InSequence()/.After()/
-// .WillOnce() can appear any number of times.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-#include <vector>
-
-#include "gmock/gmock-actions.h"
-#include "gmock/gmock-cardinalities.h"
-#include "gmock/gmock-matchers.h"
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-
-// An abstract handle of an expectation.
-class Expectation;
-
-// A set of expectation handles.
-class ExpectationSet;
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// Implements a mock function.
-template <typename F> class FunctionMocker;
-
-// Base class for expectations.
-class ExpectationBase;
-
-// Implements an expectation.
-template <typename F> class TypedExpectation;
-
-// Helper class for testing the Expectation class template.
-class ExpectationTester;
-
-// Base class for function mockers.
-template <typename F> class FunctionMockerBase;
-
-// Protects the mock object registry (in class Mock), all function
-// mockers, and all expectations.
-//
-// The reason we don't use more fine-grained protection is: when a
-// mock function Foo() is called, it needs to consult its expectations
-// to see which one should be picked. If another thread is allowed to
-// call a mock function (either Foo() or a different one) at the same
-// time, it could affect the "retired" attributes of Foo()'s
-// expectations when InSequence() is used, and thus affect which
-// expectation gets picked. Therefore, we sequence all mock function
-// calls to ensure the integrity of the mock objects' states.
-GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex);
-
-// Untyped base class for ActionResultHolder<R>.
-class UntypedActionResultHolderBase;
-
-// Abstract base class of FunctionMockerBase. This is the
-// type-agnostic part of the function mocker interface. Its pure
-// virtual methods are implemented by FunctionMockerBase.
-class UntypedFunctionMockerBase {
- public:
- UntypedFunctionMockerBase();
- virtual ~UntypedFunctionMockerBase();
-
- // Verifies that all expectations on this mock function have been
- // satisfied. Reports one or more Google Test non-fatal failures
- // and returns false if not.
- // L >= g_gmock_mutex
- bool VerifyAndClearExpectationsLocked();
-
- // Clears the ON_CALL()s set on this mock function.
- // L >= g_gmock_mutex
- virtual void ClearDefaultActionsLocked() = 0;
-
- // In all of the following Untyped* functions, it's the caller's
- // responsibility to guarantee the correctness of the arguments'
- // types.
-
- // Performs the default action with the given arguments and returns
- // the action's result. The call description string will be used in
- // the error message to describe the call in the case the default
- // action fails.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformDefaultAction(
- const void* untyped_args,
- const string& call_description) const = 0;
-
- // Performs the given action with the given arguments and returns
- // the action's result.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformAction(
- const void* untyped_action,
- const void* untyped_args) const = 0;
-
- // Writes a message that the call is uninteresting (i.e. neither
- // explicitly expected nor explicitly unexpected) to the given
- // ostream.
- // L < g_gmock_mutex
- virtual void UntypedDescribeUninterestingCall(const void* untyped_args,
- ::std::ostream* os) const = 0;
-
- // Returns the expectation that matches the given function arguments
- // (or NULL is there's no match); when a match is found,
- // untyped_action is set to point to the action that should be
- // performed (or NULL if the action is "do default"), and
- // is_excessive is modified to indicate whether the call exceeds the
- // expected number.
- // L < g_gmock_mutex
- virtual const ExpectationBase* UntypedFindMatchingExpectation(
- const void* untyped_args,
- const void** untyped_action, bool* is_excessive,
- ::std::ostream* what, ::std::ostream* why) = 0;
-
- // Prints the given function arguments to the ostream.
- virtual void UntypedPrintArgs(const void* untyped_args,
- ::std::ostream* os) const = 0;
-
- // Sets the mock object this mock method belongs to, and registers
- // this information in the global mock registry. Will be called
- // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
- // method.
- // TODO(wan@google.com): rename to SetAndRegisterOwner().
- // L < g_gmock_mutex
- void RegisterOwner(const void* mock_obj);
-
- // Sets the mock object this mock method belongs to, and sets the
- // name of the mock function. Will be called upon each invocation
- // of this mock function.
- // L < g_gmock_mutex
- void SetOwnerAndName(const void* mock_obj, const char* name);
-
- // Returns the mock object this mock method belongs to. Must be
- // called after RegisterOwner() or SetOwnerAndName() has been
- // called.
- // L < g_gmock_mutex
- const void* MockObject() const;
-
- // Returns the name of this mock method. Must be called after
- // SetOwnerAndName() has been called.
- // L < g_gmock_mutex
- const char* Name() const;
-
- // Returns the result of invoking this mock function with the given
- // arguments. This function can be safely called from multiple
- // threads concurrently. The caller is responsible for deleting the
- // result.
- // L < g_gmock_mutex
- const UntypedActionResultHolderBase* UntypedInvokeWith(
- const void* untyped_args);
-
- protected:
- typedef std::vector<const void*> UntypedOnCallSpecs;
-
- typedef std::vector<internal::linked_ptr<ExpectationBase> >
- UntypedExpectations;
-
- // Returns an Expectation object that references and co-owns exp,
- // which must be an expectation on this mock function.
- Expectation GetHandleOf(ExpectationBase* exp);
-
- // Address of the mock object this mock method belongs to. Only
- // valid after this mock method has been called or
- // ON_CALL/EXPECT_CALL has been invoked on it.
- const void* mock_obj_; // Protected by g_gmock_mutex.
-
- // Name of the function being mocked. Only valid after this mock
- // method has been called.
- const char* name_; // Protected by g_gmock_mutex.
-
- // All default action specs for this function mocker.
- UntypedOnCallSpecs untyped_on_call_specs_;
-
- // All expectations for this function mocker.
- UntypedExpectations untyped_expectations_;
-}; // class UntypedFunctionMockerBase
-
-// Untyped base class for OnCallSpec<F>.
-class UntypedOnCallSpecBase {
- public:
- // The arguments are the location of the ON_CALL() statement.
- UntypedOnCallSpecBase(const char* a_file, int a_line)
- : file_(a_file), line_(a_line), last_clause_(kNone) {}
-
- // Where in the source file was the default action spec defined?
- const char* file() const { return file_; }
- int line() const { return line_; }
-
- protected:
- // Gives each clause in the ON_CALL() statement a name.
- enum Clause {
- // Do not change the order of the enum members! The run-time
- // syntax checking relies on it.
- kNone,
- kWith,
- kWillByDefault
- };
-
- // Asserts that the ON_CALL() statement has a certain property.
- void AssertSpecProperty(bool property, const string& failure_message) const {
- Assert(property, file_, line_, failure_message);
- }
-
- // Expects that the ON_CALL() statement has a certain property.
- void ExpectSpecProperty(bool property, const string& failure_message) const {
- Expect(property, file_, line_, failure_message);
- }
-
- const char* file_;
- int line_;
-
- // The last clause in the ON_CALL() statement as seen so far.
- // Initially kNone and changes as the statement is parsed.
- Clause last_clause_;
-}; // class UntypedOnCallSpecBase
-
-// This template class implements an ON_CALL spec.
-template <typename F>
-class OnCallSpec : public UntypedOnCallSpecBase {
- public:
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
-
- // Constructs an OnCallSpec object from the information inside
- // the parenthesis of an ON_CALL() statement.
- OnCallSpec(const char* a_file, int a_line,
- const ArgumentMatcherTuple& matchers)
- : UntypedOnCallSpecBase(a_file, a_line),
- matchers_(matchers),
- // By default, extra_matcher_ should match anything. However,
- // we cannot initialize it with _ as that triggers a compiler
- // bug in Symbian's C++ compiler (cannot decide between two
- // overloaded constructors of Matcher<const ArgumentTuple&>).
- extra_matcher_(A<const ArgumentTuple&>()) {
- }
-
- // Implements the .With() clause.
- OnCallSpec& With(const Matcher<const ArgumentTuple&>& m) {
- // Makes sure this is called at most once.
- ExpectSpecProperty(last_clause_ < kWith,
- ".With() cannot appear "
- "more than once in an ON_CALL().");
- last_clause_ = kWith;
-
- extra_matcher_ = m;
- return *this;
- }
-
- // Implements the .WillByDefault() clause.
- OnCallSpec& WillByDefault(const Action<F>& action) {
- ExpectSpecProperty(last_clause_ < kWillByDefault,
- ".WillByDefault() must appear "
- "exactly once in an ON_CALL().");
- last_clause_ = kWillByDefault;
-
- ExpectSpecProperty(!action.IsDoDefault(),
- "DoDefault() cannot be used in ON_CALL().");
- action_ = action;
- return *this;
- }
-
- // Returns true iff the given arguments match the matchers.
- bool Matches(const ArgumentTuple& args) const {
- return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
- }
-
- // Returns the action specified by the user.
- const Action<F>& GetAction() const {
- AssertSpecProperty(last_clause_ == kWillByDefault,
- ".WillByDefault() must appear exactly "
- "once in an ON_CALL().");
- return action_;
- }
-
- private:
- // The information in statement
- //
- // ON_CALL(mock_object, Method(matchers))
- // .With(multi-argument-matcher)
- // .WillByDefault(action);
- //
- // is recorded in the data members like this:
- //
- // source file that contains the statement => file_
- // line number of the statement => line_
- // matchers => matchers_
- // multi-argument-matcher => extra_matcher_
- // action => action_
- ArgumentMatcherTuple matchers_;
- Matcher<const ArgumentTuple&> extra_matcher_;
- Action<F> action_;
-}; // class OnCallSpec
-
-// Possible reactions on uninteresting calls. TODO(wan@google.com):
-// rename the enum values to the kFoo style.
-enum CallReaction {
- ALLOW,
- WARN,
- FAIL
-};
-
-} // namespace internal
-
-// Utilities for manipulating mock objects.
-class Mock {
- public:
- // The following public methods can be called concurrently.
-
- // Tells Google Mock to ignore mock_obj when checking for leaked
- // mock objects.
- static void AllowLeak(const void* mock_obj);
-
- // Verifies and clears all expectations on the given mock object.
- // If the expectations aren't satisfied, generates one or more
- // Google Test non-fatal failures and returns false.
- static bool VerifyAndClearExpectations(void* mock_obj);
-
- // Verifies all expectations on the given mock object and clears its
- // default actions and expectations. Returns true iff the
- // verification was successful.
- static bool VerifyAndClear(void* mock_obj);
- private:
- friend class internal::UntypedFunctionMockerBase;
-
- // Needed for a function mocker to register itself (so that we know
- // how to clear a mock object).
- template <typename F>
- friend class internal::FunctionMockerBase;
-
- template <typename M>
- friend class NiceMock;
-
- template <typename M>
- friend class StrictMock;
-
- // Tells Google Mock to allow uninteresting calls on the given mock
- // object.
- // L < g_gmock_mutex
- static void AllowUninterestingCalls(const void* mock_obj);
-
- // Tells Google Mock to warn the user about uninteresting calls on
- // the given mock object.
- // L < g_gmock_mutex
- static void WarnUninterestingCalls(const void* mock_obj);
-
- // Tells Google Mock to fail uninteresting calls on the given mock
- // object.
- // L < g_gmock_mutex
- static void FailUninterestingCalls(const void* mock_obj);
-
- // Tells Google Mock the given mock object is being destroyed and
- // its entry in the call-reaction table should be removed.
- // L < g_gmock_mutex
- static void UnregisterCallReaction(const void* mock_obj);
-
- // Returns the reaction Google Mock will have on uninteresting calls
- // made on the given mock object.
- // L < g_gmock_mutex
- static internal::CallReaction GetReactionOnUninterestingCalls(
- const void* mock_obj);
-
- // Verifies that all expectations on the given mock object have been
- // satisfied. Reports one or more Google Test non-fatal failures
- // and returns false if not.
- // L >= g_gmock_mutex
- static bool VerifyAndClearExpectationsLocked(void* mock_obj);
-
- // Clears all ON_CALL()s set on the given mock object.
- // L >= g_gmock_mutex
- static void ClearDefaultActionsLocked(void* mock_obj);
-
- // Registers a mock object and a mock method it owns.
- // L < g_gmock_mutex
- static void Register(const void* mock_obj,
- internal::UntypedFunctionMockerBase* mocker);
-
- // Tells Google Mock where in the source code mock_obj is used in an
- // ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this
- // information helps the user identify which object it is.
- // L < g_gmock_mutex
- static void RegisterUseByOnCallOrExpectCall(
- const void* mock_obj, const char* file, int line);
-
- // Unregisters a mock method; removes the owning mock object from
- // the registry when the last mock method associated with it has
- // been unregistered. This is called only in the destructor of
- // FunctionMockerBase.
- // L >= g_gmock_mutex
- static void UnregisterLocked(internal::UntypedFunctionMockerBase* mocker);
-}; // class Mock
-
-// An abstract handle of an expectation. Useful in the .After()
-// clause of EXPECT_CALL() for setting the (partial) order of
-// expectations. The syntax:
-//
-// Expectation e1 = EXPECT_CALL(...)...;
-// EXPECT_CALL(...).After(e1)...;
-//
-// sets two expectations where the latter can only be matched after
-// the former has been satisfied.
-//
-// Notes:
-// - This class is copyable and has value semantics.
-// - Constness is shallow: a const Expectation object itself cannot
-// be modified, but the mutable methods of the ExpectationBase
-// object it references can be called via expectation_base().
-// - The constructors and destructor are defined out-of-line because
-// the Symbian WINSCW compiler wants to otherwise instantiate them
-// when it sees this class definition, at which point it doesn't have
-// ExpectationBase available yet, leading to incorrect destruction
-// in the linked_ptr (or compilation errors if using a checking
-// linked_ptr).
-class Expectation {
- public:
- // Constructs a null object that doesn't reference any expectation.
- Expectation();
-
- ~Expectation();
-
- // This single-argument ctor must not be explicit, in order to support the
- // Expectation e = EXPECT_CALL(...);
- // syntax.
- //
- // A TypedExpectation object stores its pre-requisites as
- // Expectation objects, and needs to call the non-const Retire()
- // method on the ExpectationBase objects they reference. Therefore
- // Expectation must receive a *non-const* reference to the
- // ExpectationBase object.
- Expectation(internal::ExpectationBase& exp); // NOLINT
-
- // The compiler-generated copy ctor and operator= work exactly as
- // intended, so we don't need to define our own.
-
- // Returns true iff rhs references the same expectation as this object does.
- bool operator==(const Expectation& rhs) const {
- return expectation_base_ == rhs.expectation_base_;
- }
-
- bool operator!=(const Expectation& rhs) const { return !(*this == rhs); }
-
- private:
- friend class ExpectationSet;
- friend class Sequence;
- friend class ::testing::internal::ExpectationBase;
- friend class ::testing::internal::UntypedFunctionMockerBase;
-
- template <typename F>
- friend class ::testing::internal::FunctionMockerBase;
-
- template <typename F>
- friend class ::testing::internal::TypedExpectation;
-
- // This comparator is needed for putting Expectation objects into a set.
- class Less {
- public:
- bool operator()(const Expectation& lhs, const Expectation& rhs) const {
- return lhs.expectation_base_.get() < rhs.expectation_base_.get();
- }
- };
-
- typedef ::std::set<Expectation, Less> Set;
-
- Expectation(
- const internal::linked_ptr<internal::ExpectationBase>& expectation_base);
-
- // Returns the expectation this object references.
- const internal::linked_ptr<internal::ExpectationBase>&
- expectation_base() const {
- return expectation_base_;
- }
-
- // A linked_ptr that co-owns the expectation this handle references.
- internal::linked_ptr<internal::ExpectationBase> expectation_base_;
-};
-
-// A set of expectation handles. Useful in the .After() clause of
-// EXPECT_CALL() for setting the (partial) order of expectations. The
-// syntax:
-//
-// ExpectationSet es;
-// es += EXPECT_CALL(...)...;
-// es += EXPECT_CALL(...)...;
-// EXPECT_CALL(...).After(es)...;
-//
-// sets three expectations where the last one can only be matched
-// after the first two have both been satisfied.
-//
-// This class is copyable and has value semantics.
-class ExpectationSet {
- public:
- // A bidirectional iterator that can read a const element in the set.
- typedef Expectation::Set::const_iterator const_iterator;
-
- // An object stored in the set. This is an alias of Expectation.
- typedef Expectation::Set::value_type value_type;
-
- // Constructs an empty set.
- ExpectationSet() {}
-
- // This single-argument ctor must not be explicit, in order to support the
- // ExpectationSet es = EXPECT_CALL(...);
- // syntax.
- ExpectationSet(internal::ExpectationBase& exp) { // NOLINT
- *this += Expectation(exp);
- }
-
- // This single-argument ctor implements implicit conversion from
- // Expectation and thus must not be explicit. This allows either an
- // Expectation or an ExpectationSet to be used in .After().
- ExpectationSet(const Expectation& e) { // NOLINT
- *this += e;
- }
-
- // The compiler-generator ctor and operator= works exactly as
- // intended, so we don't need to define our own.
-
- // Returns true iff rhs contains the same set of Expectation objects
- // as this does.
- bool operator==(const ExpectationSet& rhs) const {
- return expectations_ == rhs.expectations_;
- }
-
- bool operator!=(const ExpectationSet& rhs) const { return !(*this == rhs); }
-
- // Implements the syntax
- // expectation_set += EXPECT_CALL(...);
- ExpectationSet& operator+=(const Expectation& e) {
- expectations_.insert(e);
- return *this;
- }
-
- int size() const { return static_cast<int>(expectations_.size()); }
-
- const_iterator begin() const { return expectations_.begin(); }
- const_iterator end() const { return expectations_.end(); }
-
- private:
- Expectation::Set expectations_;
-};
-
-
-// Sequence objects are used by a user to specify the relative order
-// in which the expectations should match. They are copyable (we rely
-// on the compiler-defined copy constructor and assignment operator).
-class Sequence {
- public:
- // Constructs an empty sequence.
- Sequence() : last_expectation_(new Expectation) {}
-
- // Adds an expectation to this sequence. The caller must ensure
- // that no other thread is accessing this Sequence object.
- void AddExpectation(const Expectation& expectation) const;
-
- private:
- // The last expectation in this sequence. We use a linked_ptr here
- // because Sequence objects are copyable and we want the copies to
- // be aliases. The linked_ptr allows the copies to co-own and share
- // the same Expectation object.
- internal::linked_ptr<Expectation> last_expectation_;
-}; // class Sequence
-
-// An object of this type causes all EXPECT_CALL() statements
-// encountered in its scope to be put in an anonymous sequence. The
-// work is done in the constructor and destructor. You should only
-// create an InSequence object on the stack.
-//
-// The sole purpose for this class is to support easy definition of
-// sequential expectations, e.g.
-//
-// {
-// InSequence dummy; // The name of the object doesn't matter.
-//
-// // The following expectations must match in the order they appear.
-// EXPECT_CALL(a, Bar())...;
-// EXPECT_CALL(a, Baz())...;
-// ...
-// EXPECT_CALL(b, Xyz())...;
-// }
-//
-// You can create InSequence objects in multiple threads, as long as
-// they are used to affect different mock objects. The idea is that
-// each thread can create and set up its own mocks as if it's the only
-// thread. However, for clarity of your tests we recommend you to set
-// up mocks in the main thread unless you have a good reason not to do
-// so.
-class InSequence {
- public:
- InSequence();
- ~InSequence();
- private:
- bool sequence_created_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(InSequence); // NOLINT
-} GTEST_ATTRIBUTE_UNUSED_;
-
-namespace internal {
-
-// Points to the implicit sequence introduced by a living InSequence
-// object (if any) in the current thread or NULL.
-extern ThreadLocal<Sequence*> g_gmock_implicit_sequence;
-
-// Base class for implementing expectations.
-//
-// There are two reasons for having a type-agnostic base class for
-// Expectation:
-//
-// 1. We need to store collections of expectations of different
-// types (e.g. all pre-requisites of a particular expectation, all
-// expectations in a sequence). Therefore these expectation objects
-// must share a common base class.
-//
-// 2. We can avoid binary code bloat by moving methods not depending
-// on the template argument of Expectation to the base class.
-//
-// This class is internal and mustn't be used by user code directly.
-class ExpectationBase {
- public:
- // source_text is the EXPECT_CALL(...) source that created this Expectation.
- ExpectationBase(const char* file, int line, const string& source_text);
-
- virtual ~ExpectationBase();
-
- // Where in the source file was the expectation spec defined?
- const char* file() const { return file_; }
- int line() const { return line_; }
- const char* source_text() const { return source_text_.c_str(); }
- // Returns the cardinality specified in the expectation spec.
- const Cardinality& cardinality() const { return cardinality_; }
-
- // Describes the source file location of this expectation.
- void DescribeLocationTo(::std::ostream* os) const {
- *os << FormatFileLocation(file(), line()) << " ";
- }
-
- // Describes how many times a function call matching this
- // expectation has occurred.
- // L >= g_gmock_mutex
- void DescribeCallCountTo(::std::ostream* os) const;
-
- // If this mock method has an extra matcher (i.e. .With(matcher)),
- // describes it to the ostream.
- virtual void MaybeDescribeExtraMatcherTo(::std::ostream* os) = 0;
-
- protected:
- friend class ::testing::Expectation;
- friend class UntypedFunctionMockerBase;
-
- enum Clause {
- // Don't change the order of the enum members!
- kNone,
- kWith,
- kTimes,
- kInSequence,
- kAfter,
- kWillOnce,
- kWillRepeatedly,
- kRetiresOnSaturation
- };
-
- typedef std::vector<const void*> UntypedActions;
-
- // Returns an Expectation object that references and co-owns this
- // expectation.
- virtual Expectation GetHandle() = 0;
-
- // Asserts that the EXPECT_CALL() statement has the given property.
- void AssertSpecProperty(bool property, const string& failure_message) const {
- Assert(property, file_, line_, failure_message);
- }
-
- // Expects that the EXPECT_CALL() statement has the given property.
- void ExpectSpecProperty(bool property, const string& failure_message) const {
- Expect(property, file_, line_, failure_message);
- }
-
- // Explicitly specifies the cardinality of this expectation. Used
- // by the subclasses to implement the .Times() clause.
- void SpecifyCardinality(const Cardinality& cardinality);
-
- // Returns true iff the user specified the cardinality explicitly
- // using a .Times().
- bool cardinality_specified() const { return cardinality_specified_; }
-
- // Sets the cardinality of this expectation spec.
- void set_cardinality(const Cardinality& a_cardinality) {
- cardinality_ = a_cardinality;
- }
-
- // The following group of methods should only be called after the
- // EXPECT_CALL() statement, and only when g_gmock_mutex is held by
- // the current thread.
-
- // Retires all pre-requisites of this expectation.
- // L >= g_gmock_mutex
- void RetireAllPreRequisites();
-
- // Returns true iff this expectation is retired.
- // L >= g_gmock_mutex
- bool is_retired() const {
- g_gmock_mutex.AssertHeld();
- return retired_;
- }
-
- // Retires this expectation.
- // L >= g_gmock_mutex
- void Retire() {
- g_gmock_mutex.AssertHeld();
- retired_ = true;
- }
-
- // Returns true iff this expectation is satisfied.
- // L >= g_gmock_mutex
- bool IsSatisfied() const {
- g_gmock_mutex.AssertHeld();
- return cardinality().IsSatisfiedByCallCount(call_count_);
- }
-
- // Returns true iff this expectation is saturated.
- // L >= g_gmock_mutex
- bool IsSaturated() const {
- g_gmock_mutex.AssertHeld();
- return cardinality().IsSaturatedByCallCount(call_count_);
- }
-
- // Returns true iff this expectation is over-saturated.
- // L >= g_gmock_mutex
- bool IsOverSaturated() const {
- g_gmock_mutex.AssertHeld();
- return cardinality().IsOverSaturatedByCallCount(call_count_);
- }
-
- // Returns true iff all pre-requisites of this expectation are satisfied.
- // L >= g_gmock_mutex
- bool AllPrerequisitesAreSatisfied() const;
-
- // Adds unsatisfied pre-requisites of this expectation to 'result'.
- // L >= g_gmock_mutex
- void FindUnsatisfiedPrerequisites(ExpectationSet* result) const;
-
- // Returns the number this expectation has been invoked.
- // L >= g_gmock_mutex
- int call_count() const {
- g_gmock_mutex.AssertHeld();
- return call_count_;
- }
-
- // Increments the number this expectation has been invoked.
- // L >= g_gmock_mutex
- void IncrementCallCount() {
- g_gmock_mutex.AssertHeld();
- call_count_++;
- }
-
- // Checks the action count (i.e. the number of WillOnce() and
- // WillRepeatedly() clauses) against the cardinality if this hasn't
- // been done before. Prints a warning if there are too many or too
- // few actions.
- // L < mutex_
- void CheckActionCountIfNotDone() const;
-
- friend class ::testing::Sequence;
- friend class ::testing::internal::ExpectationTester;
-
- template <typename Function>
- friend class TypedExpectation;
-
- // Implements the .Times() clause.
- void UntypedTimes(const Cardinality& a_cardinality);
-
- // This group of fields are part of the spec and won't change after
- // an EXPECT_CALL() statement finishes.
- const char* file_; // The file that contains the expectation.
- int line_; // The line number of the expectation.
- const string source_text_; // The EXPECT_CALL(...) source text.
- // True iff the cardinality is specified explicitly.
- bool cardinality_specified_;
- Cardinality cardinality_; // The cardinality of the expectation.
- // The immediate pre-requisites (i.e. expectations that must be
- // satisfied before this expectation can be matched) of this
- // expectation. We use linked_ptr in the set because we want an
- // Expectation object to be co-owned by its FunctionMocker and its
- // successors. This allows multiple mock objects to be deleted at
- // different times.
- ExpectationSet immediate_prerequisites_;
-
- // This group of fields are the current state of the expectation,
- // and can change as the mock function is called.
- int call_count_; // How many times this expectation has been invoked.
- bool retired_; // True iff this expectation has retired.
- UntypedActions untyped_actions_;
- bool extra_matcher_specified_;
- bool repeated_action_specified_; // True if a WillRepeatedly() was specified.
- bool retires_on_saturation_;
- Clause last_clause_;
- mutable bool action_count_checked_; // Under mutex_.
- mutable Mutex mutex_; // Protects action_count_checked_.
-
- GTEST_DISALLOW_ASSIGN_(ExpectationBase);
-}; // class ExpectationBase
-
-// Impements an expectation for the given function type.
-template <typename F>
-class TypedExpectation : public ExpectationBase {
- public:
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
- typedef typename Function<F>::Result Result;
-
- TypedExpectation(FunctionMockerBase<F>* owner,
- const char* a_file, int a_line, const string& a_source_text,
- const ArgumentMatcherTuple& m)
- : ExpectationBase(a_file, a_line, a_source_text),
- owner_(owner),
- matchers_(m),
- // By default, extra_matcher_ should match anything. However,
- // we cannot initialize it with _ as that triggers a compiler
- // bug in Symbian's C++ compiler (cannot decide between two
- // overloaded constructors of Matcher<const ArgumentTuple&>).
- extra_matcher_(A<const ArgumentTuple&>()),
- repeated_action_(DoDefault()) {}
-
- virtual ~TypedExpectation() {
- // Check the validity of the action count if it hasn't been done
- // yet (for example, if the expectation was never used).
- CheckActionCountIfNotDone();
- for (UntypedActions::const_iterator it = untyped_actions_.begin();
- it != untyped_actions_.end(); ++it) {
- delete static_cast<const Action<F>*>(*it);
- }
- }
-
- // Implements the .With() clause.
- TypedExpectation& With(const Matcher<const ArgumentTuple&>& m) {
- if (last_clause_ == kWith) {
- ExpectSpecProperty(false,
- ".With() cannot appear "
- "more than once in an EXPECT_CALL().");
- } else {
- ExpectSpecProperty(last_clause_ < kWith,
- ".With() must be the first "
- "clause in an EXPECT_CALL().");
- }
- last_clause_ = kWith;
-
- extra_matcher_ = m;
- extra_matcher_specified_ = true;
- return *this;
- }
-
- // Implements the .Times() clause.
- TypedExpectation& Times(const Cardinality& a_cardinality) {
- ExpectationBase::UntypedTimes(a_cardinality);
- return *this;
- }
-
- // Implements the .Times() clause.
- TypedExpectation& Times(int n) {
- return Times(Exactly(n));
- }
-
- // Implements the .InSequence() clause.
- TypedExpectation& InSequence(const Sequence& s) {
- ExpectSpecProperty(last_clause_ <= kInSequence,
- ".InSequence() cannot appear after .After(),"
- " .WillOnce(), .WillRepeatedly(), or "
- ".RetiresOnSaturation().");
- last_clause_ = kInSequence;
-
- s.AddExpectation(GetHandle());
- return *this;
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) {
- return InSequence(s1).InSequence(s2);
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
- const Sequence& s3) {
- return InSequence(s1, s2).InSequence(s3);
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
- const Sequence& s3, const Sequence& s4) {
- return InSequence(s1, s2, s3).InSequence(s4);
- }
- TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
- const Sequence& s3, const Sequence& s4,
- const Sequence& s5) {
- return InSequence(s1, s2, s3, s4).InSequence(s5);
- }
-
- // Implements that .After() clause.
- TypedExpectation& After(const ExpectationSet& s) {
- ExpectSpecProperty(last_clause_ <= kAfter,
- ".After() cannot appear after .WillOnce(),"
- " .WillRepeatedly(), or "
- ".RetiresOnSaturation().");
- last_clause_ = kAfter;
-
- for (ExpectationSet::const_iterator it = s.begin(); it != s.end(); ++it) {
- immediate_prerequisites_ += *it;
- }
- return *this;
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2) {
- return After(s1).After(s2);
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
- const ExpectationSet& s3) {
- return After(s1, s2).After(s3);
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
- const ExpectationSet& s3, const ExpectationSet& s4) {
- return After(s1, s2, s3).After(s4);
- }
- TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
- const ExpectationSet& s3, const ExpectationSet& s4,
- const ExpectationSet& s5) {
- return After(s1, s2, s3, s4).After(s5);
- }
-
- // Implements the .WillOnce() clause.
- TypedExpectation& WillOnce(const Action<F>& action) {
- ExpectSpecProperty(last_clause_ <= kWillOnce,
- ".WillOnce() cannot appear after "
- ".WillRepeatedly() or .RetiresOnSaturation().");
- last_clause_ = kWillOnce;
-
- untyped_actions_.push_back(new Action<F>(action));
- if (!cardinality_specified()) {
- set_cardinality(Exactly(static_cast<int>(untyped_actions_.size())));
- }
- return *this;
- }
-
- // Implements the .WillRepeatedly() clause.
- TypedExpectation& WillRepeatedly(const Action<F>& action) {
- if (last_clause_ == kWillRepeatedly) {
- ExpectSpecProperty(false,
- ".WillRepeatedly() cannot appear "
- "more than once in an EXPECT_CALL().");
- } else {
- ExpectSpecProperty(last_clause_ < kWillRepeatedly,
- ".WillRepeatedly() cannot appear "
- "after .RetiresOnSaturation().");
- }
- last_clause_ = kWillRepeatedly;
- repeated_action_specified_ = true;
-
- repeated_action_ = action;
- if (!cardinality_specified()) {
- set_cardinality(AtLeast(static_cast<int>(untyped_actions_.size())));
- }
-
- // Now that no more action clauses can be specified, we check
- // whether their count makes sense.
- CheckActionCountIfNotDone();
- return *this;
- }
-
- // Implements the .RetiresOnSaturation() clause.
- TypedExpectation& RetiresOnSaturation() {
- ExpectSpecProperty(last_clause_ < kRetiresOnSaturation,
- ".RetiresOnSaturation() cannot appear "
- "more than once.");
- last_clause_ = kRetiresOnSaturation;
- retires_on_saturation_ = true;
-
- // Now that no more action clauses can be specified, we check
- // whether their count makes sense.
- CheckActionCountIfNotDone();
- return *this;
- }
-
- // Returns the matchers for the arguments as specified inside the
- // EXPECT_CALL() macro.
- const ArgumentMatcherTuple& matchers() const {
- return matchers_;
- }
-
- // Returns the matcher specified by the .With() clause.
- const Matcher<const ArgumentTuple&>& extra_matcher() const {
- return extra_matcher_;
- }
-
- // Returns the action specified by the .WillRepeatedly() clause.
- const Action<F>& repeated_action() const { return repeated_action_; }
-
- // If this mock method has an extra matcher (i.e. .With(matcher)),
- // describes it to the ostream.
- virtual void MaybeDescribeExtraMatcherTo(::std::ostream* os) {
- if (extra_matcher_specified_) {
- *os << " Expected args: ";
- extra_matcher_.DescribeTo(os);
- *os << "\n";
- }
- }
-
- private:
- template <typename Function>
- friend class FunctionMockerBase;
-
- // Returns an Expectation object that references and co-owns this
- // expectation.
- virtual Expectation GetHandle() {
- return owner_->GetHandleOf(this);
- }
-
- // The following methods will be called only after the EXPECT_CALL()
- // statement finishes and when the current thread holds
- // g_gmock_mutex.
-
- // Returns true iff this expectation matches the given arguments.
- // L >= g_gmock_mutex
- bool Matches(const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
- return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
- }
-
- // Returns true iff this expectation should handle the given arguments.
- // L >= g_gmock_mutex
- bool ShouldHandleArguments(const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
-
- // In case the action count wasn't checked when the expectation
- // was defined (e.g. if this expectation has no WillRepeatedly()
- // or RetiresOnSaturation() clause), we check it when the
- // expectation is used for the first time.
- CheckActionCountIfNotDone();
- return !is_retired() && AllPrerequisitesAreSatisfied() && Matches(args);
- }
-
- // Describes the result of matching the arguments against this
- // expectation to the given ostream.
- // L >= g_gmock_mutex
- void ExplainMatchResultTo(const ArgumentTuple& args,
- ::std::ostream* os) const {
- g_gmock_mutex.AssertHeld();
-
- if (is_retired()) {
- *os << " Expected: the expectation is active\n"
- << " Actual: it is retired\n";
- } else if (!Matches(args)) {
- if (!TupleMatches(matchers_, args)) {
- ExplainMatchFailureTupleTo(matchers_, args, os);
- }
- StringMatchResultListener listener;
- if (!extra_matcher_.MatchAndExplain(args, &listener)) {
- *os << " Expected args: ";
- extra_matcher_.DescribeTo(os);
- *os << "\n Actual: don't match";
-
- internal::PrintIfNotEmpty(listener.str(), os);
- *os << "\n";
- }
- } else if (!AllPrerequisitesAreSatisfied()) {
- *os << " Expected: all pre-requisites are satisfied\n"
- << " Actual: the following immediate pre-requisites "
- << "are not satisfied:\n";
- ExpectationSet unsatisfied_prereqs;
- FindUnsatisfiedPrerequisites(&unsatisfied_prereqs);
- int i = 0;
- for (ExpectationSet::const_iterator it = unsatisfied_prereqs.begin();
- it != unsatisfied_prereqs.end(); ++it) {
- it->expectation_base()->DescribeLocationTo(os);
- *os << "pre-requisite #" << i++ << "\n";
- }
- *os << " (end of pre-requisites)\n";
- } else {
- // This line is here just for completeness' sake. It will never
- // be executed as currently the ExplainMatchResultTo() function
- // is called only when the mock function call does NOT match the
- // expectation.
- *os << "The call matches the expectation.\n";
- }
- }
-
- // Returns the action that should be taken for the current invocation.
- // L >= g_gmock_mutex
- const Action<F>& GetCurrentAction(const FunctionMockerBase<F>* mocker,
- const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
- const int count = call_count();
- Assert(count >= 1, __FILE__, __LINE__,
- "call_count() is <= 0 when GetCurrentAction() is "
- "called - this should never happen.");
-
- const int action_count = static_cast<int>(untyped_actions_.size());
- if (action_count > 0 && !repeated_action_specified_ &&
- count > action_count) {
- // If there is at least one WillOnce() and no WillRepeatedly(),
- // we warn the user when the WillOnce() clauses ran out.
- ::std::stringstream ss;
- DescribeLocationTo(&ss);
- ss << "Actions ran out in " << source_text() << "...\n"
- << "Called " << count << " times, but only "
- << action_count << " WillOnce()"
- << (action_count == 1 ? " is" : "s are") << " specified - ";
- mocker->DescribeDefaultActionTo(args, &ss);
- Log(WARNING, ss.str(), 1);
- }
-
- return count <= action_count ?
- *static_cast<const Action<F>*>(untyped_actions_[count - 1]) :
- repeated_action();
- }
-
- // Given the arguments of a mock function call, if the call will
- // over-saturate this expectation, returns the default action;
- // otherwise, returns the next action in this expectation. Also
- // describes *what* happened to 'what', and explains *why* Google
- // Mock does it to 'why'. This method is not const as it calls
- // IncrementCallCount(). A return value of NULL means the default
- // action.
- // L >= g_gmock_mutex
- const Action<F>* GetActionForArguments(const FunctionMockerBase<F>* mocker,
- const ArgumentTuple& args,
- ::std::ostream* what,
- ::std::ostream* why) {
- g_gmock_mutex.AssertHeld();
- if (IsSaturated()) {
- // We have an excessive call.
- IncrementCallCount();
- *what << "Mock function called more times than expected - ";
- mocker->DescribeDefaultActionTo(args, what);
- DescribeCallCountTo(why);
-
- // TODO(wan@google.com): allow the user to control whether
- // unexpected calls should fail immediately or continue using a
- // flag --gmock_unexpected_calls_are_fatal.
- return NULL;
- }
-
- IncrementCallCount();
- RetireAllPreRequisites();
-
- if (retires_on_saturation_ && IsSaturated()) {
- Retire();
- }
-
- // Must be done after IncrementCount()!
- *what << "Mock function call matches " << source_text() <<"...\n";
- return &(GetCurrentAction(mocker, args));
- }
-
- // All the fields below won't change once the EXPECT_CALL()
- // statement finishes.
- FunctionMockerBase<F>* const owner_;
- ArgumentMatcherTuple matchers_;
- Matcher<const ArgumentTuple&> extra_matcher_;
- Action<F> repeated_action_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(TypedExpectation);
-}; // class TypedExpectation
-
-// A MockSpec object is used by ON_CALL() or EXPECT_CALL() for
-// specifying the default behavior of, or expectation on, a mock
-// function.
-
-// Note: class MockSpec really belongs to the ::testing namespace.
-// However if we define it in ::testing, MSVC will complain when
-// classes in ::testing::internal declare it as a friend class
-// template. To workaround this compiler bug, we define MockSpec in
-// ::testing::internal and import it into ::testing.
-
-// Logs a message including file and line number information.
-void LogWithLocation(testing::internal::LogSeverity severity,
- const char* file, int line,
- const string& message);
-
-template <typename F>
-class MockSpec {
- public:
- typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename internal::Function<F>::ArgumentMatcherTuple
- ArgumentMatcherTuple;
-
- // Constructs a MockSpec object, given the function mocker object
- // that the spec is associated with.
- explicit MockSpec(internal::FunctionMockerBase<F>* function_mocker)
- : function_mocker_(function_mocker) {}
-
- // Adds a new default action spec to the function mocker and returns
- // the newly created spec.
- internal::OnCallSpec<F>& InternalDefaultActionSetAt(
- const char* file, int line, const char* obj, const char* call) {
- LogWithLocation(internal::INFO, file, line,
- string("ON_CALL(") + obj + ", " + call + ") invoked");
- return function_mocker_->AddNewOnCallSpec(file, line, matchers_);
- }
-
- // Adds a new expectation spec to the function mocker and returns
- // the newly created spec.
- internal::TypedExpectation<F>& InternalExpectedAt(
- const char* file, int line, const char* obj, const char* call) {
- const string source_text(string("EXPECT_CALL(") + obj + ", " + call + ")");
- LogWithLocation(internal::INFO, file, line, source_text + " invoked");
- return function_mocker_->AddNewExpectation(
- file, line, source_text, matchers_);
- }
-
- private:
- template <typename Function>
- friend class internal::FunctionMocker;
-
- void SetMatchers(const ArgumentMatcherTuple& matchers) {
- matchers_ = matchers;
- }
-
- // The function mocker that owns this spec.
- internal::FunctionMockerBase<F>* const function_mocker_;
- // The argument matchers specified in the spec.
- ArgumentMatcherTuple matchers_;
-
- GTEST_DISALLOW_ASSIGN_(MockSpec);
-}; // class MockSpec
-
-// MSVC warns about using 'this' in base member initializer list, so
-// we need to temporarily disable the warning. We have to do it for
-// the entire class to suppress the warning, even though it's about
-// the constructor only.
-
-#ifdef _MSC_VER
-# pragma warning(push) // Saves the current warning state.
-# pragma warning(disable:4355) // Temporarily disables warning 4355.
-#endif // _MSV_VER
-
-// C++ treats the void type specially. For example, you cannot define
-// a void-typed variable or pass a void value to a function.
-// ActionResultHolder<T> holds a value of type T, where T must be a
-// copyable type or void (T doesn't need to be default-constructable).
-// It hides the syntactic difference between void and other types, and
-// is used to unify the code for invoking both void-returning and
-// non-void-returning mock functions.
-
-// Untyped base class for ActionResultHolder<T>.
-class UntypedActionResultHolderBase {
- public:
- virtual ~UntypedActionResultHolderBase() {}
-
- // Prints the held value as an action's result to os.
- virtual void PrintAsActionResult(::std::ostream* os) const = 0;
-};
-
-// This generic definition is used when T is not void.
-template <typename T>
-class ActionResultHolder : public UntypedActionResultHolderBase {
- public:
- explicit ActionResultHolder(T a_value) : value_(a_value) {}
-
- // The compiler-generated copy constructor and assignment operator
- // are exactly what we need, so we don't need to define them.
-
- // Returns the held value and deletes this object.
- T GetValueAndDelete() const {
- T retval(value_);
- delete this;
- return retval;
- }
-
- // Prints the held value as an action's result to os.
- virtual void PrintAsActionResult(::std::ostream* os) const {
- *os << "\n Returns: ";
- // T may be a reference type, so we don't use UniversalPrint().
- UniversalPrinter<T>::Print(value_, os);
- }
-
- // Performs the given mock function's default action and returns the
- // result in a new-ed ActionResultHolder.
- template <typename F>
- static ActionResultHolder* PerformDefaultAction(
- const FunctionMockerBase<F>* func_mocker,
- const typename Function<F>::ArgumentTuple& args,
- const string& call_description) {
- return new ActionResultHolder(
- func_mocker->PerformDefaultAction(args, call_description));
- }
-
- // Performs the given action and returns the result in a new-ed
- // ActionResultHolder.
- template <typename F>
- static ActionResultHolder*
- PerformAction(const Action<F>& action,
- const typename Function<F>::ArgumentTuple& args) {
- return new ActionResultHolder(action.Perform(args));
- }
-
- private:
- T value_;
-
- // T could be a reference type, so = isn't supported.
- GTEST_DISALLOW_ASSIGN_(ActionResultHolder);
-};
-
-// Specialization for T = void.
-template <>
-class ActionResultHolder<void> : public UntypedActionResultHolderBase {
- public:
- void GetValueAndDelete() const { delete this; }
-
- virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
-
- // Performs the given mock function's default action and returns NULL;
- template <typename F>
- static ActionResultHolder* PerformDefaultAction(
- const FunctionMockerBase<F>* func_mocker,
- const typename Function<F>::ArgumentTuple& args,
- const string& call_description) {
- func_mocker->PerformDefaultAction(args, call_description);
- return NULL;
- }
-
- // Performs the given action and returns NULL.
- template <typename F>
- static ActionResultHolder* PerformAction(
- const Action<F>& action,
- const typename Function<F>::ArgumentTuple& args) {
- action.Perform(args);
- return NULL;
- }
-};
-
-// The base of the function mocker class for the given function type.
-// We put the methods in this class instead of its child to avoid code
-// bloat.
-template <typename F>
-class FunctionMockerBase : public UntypedFunctionMockerBase {
- public:
- typedef typename Function<F>::Result Result;
- typedef typename Function<F>::ArgumentTuple ArgumentTuple;
- typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
-
- FunctionMockerBase() : current_spec_(this) {}
-
- // The destructor verifies that all expectations on this mock
- // function have been satisfied. If not, it will report Google Test
- // non-fatal failures for the violations.
- // L < g_gmock_mutex
- virtual ~FunctionMockerBase() {
- MutexLock l(&g_gmock_mutex);
- VerifyAndClearExpectationsLocked();
- Mock::UnregisterLocked(this);
- ClearDefaultActionsLocked();
- }
-
- // Returns the ON_CALL spec that matches this mock function with the
- // given arguments; returns NULL if no matching ON_CALL is found.
- // L = *
- const OnCallSpec<F>* FindOnCallSpec(
- const ArgumentTuple& args) const {
- for (UntypedOnCallSpecs::const_reverse_iterator it
- = untyped_on_call_specs_.rbegin();
- it != untyped_on_call_specs_.rend(); ++it) {
- const OnCallSpec<F>* spec = static_cast<const OnCallSpec<F>*>(*it);
- if (spec->Matches(args))
- return spec;
- }
-
- return NULL;
- }
-
- // Performs the default action of this mock function on the given arguments
- // and returns the result. Asserts with a helpful call descrption if there is
- // no valid return value. This method doesn't depend on the mutable state of
- // this object, and thus can be called concurrently without locking.
- // L = *
- Result PerformDefaultAction(const ArgumentTuple& args,
- const string& call_description) const {
- const OnCallSpec<F>* const spec =
- this->FindOnCallSpec(args);
- if (spec != NULL) {
- return spec->GetAction().Perform(args);
- }
- Assert(DefaultValue<Result>::Exists(), "", -1,
- call_description + "\n The mock function has no default action "
- "set, and its return type has no default value set.");
- return DefaultValue<Result>::Get();
- }
-
- // Performs the default action with the given arguments and returns
- // the action's result. The call description string will be used in
- // the error message to describe the call in the case the default
- // action fails. The caller is responsible for deleting the result.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformDefaultAction(
- const void* untyped_args, // must point to an ArgumentTuple
- const string& call_description) const {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- return ResultHolder::PerformDefaultAction(this, args, call_description);
- }
-
- // Performs the given action with the given arguments and returns
- // the action's result. The caller is responsible for deleting the
- // result.
- // L = *
- virtual UntypedActionResultHolderBase* UntypedPerformAction(
- const void* untyped_action, const void* untyped_args) const {
- // Make a copy of the action before performing it, in case the
- // action deletes the mock object (and thus deletes itself).
- const Action<F> action = *static_cast<const Action<F>*>(untyped_action);
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- return ResultHolder::PerformAction(action, args);
- }
-
- // Implements UntypedFunctionMockerBase::ClearDefaultActionsLocked():
- // clears the ON_CALL()s set on this mock function.
- // L >= g_gmock_mutex
- virtual void ClearDefaultActionsLocked() {
- g_gmock_mutex.AssertHeld();
- for (UntypedOnCallSpecs::const_iterator it =
- untyped_on_call_specs_.begin();
- it != untyped_on_call_specs_.end(); ++it) {
- delete static_cast<const OnCallSpec<F>*>(*it);
- }
- untyped_on_call_specs_.clear();
- }
-
- protected:
- template <typename Function>
- friend class MockSpec;
-
- typedef ActionResultHolder<Result> ResultHolder;
-
- // Returns the result of invoking this mock function with the given
- // arguments. This function can be safely called from multiple
- // threads concurrently.
- // L < g_gmock_mutex
- Result InvokeWith(const ArgumentTuple& args) {
- return static_cast<const ResultHolder*>(
- this->UntypedInvokeWith(&args))->GetValueAndDelete();
- }
-
- // Adds and returns a default action spec for this mock function.
- // L < g_gmock_mutex
- OnCallSpec<F>& AddNewOnCallSpec(
- const char* file, int line,
- const ArgumentMatcherTuple& m) {
- Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);
- OnCallSpec<F>* const on_call_spec = new OnCallSpec<F>(file, line, m);
- untyped_on_call_specs_.push_back(on_call_spec);
- return *on_call_spec;
- }
-
- // Adds and returns an expectation spec for this mock function.
- // L < g_gmock_mutex
- TypedExpectation<F>& AddNewExpectation(
- const char* file,
- int line,
- const string& source_text,
- const ArgumentMatcherTuple& m) {
- Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);
- TypedExpectation<F>* const expectation =
- new TypedExpectation<F>(this, file, line, source_text, m);
- const linked_ptr<ExpectationBase> untyped_expectation(expectation);
- untyped_expectations_.push_back(untyped_expectation);
-
- // Adds this expectation into the implicit sequence if there is one.
- Sequence* const implicit_sequence = g_gmock_implicit_sequence.get();
- if (implicit_sequence != NULL) {
- implicit_sequence->AddExpectation(Expectation(untyped_expectation));
- }
-
- return *expectation;
- }
-
- // The current spec (either default action spec or expectation spec)
- // being described on this function mocker.
- MockSpec<F>& current_spec() { return current_spec_; }
-
- private:
- template <typename Func> friend class TypedExpectation;
-
- // Some utilities needed for implementing UntypedInvokeWith().
-
- // Describes what default action will be performed for the given
- // arguments.
- // L = *
- void DescribeDefaultActionTo(const ArgumentTuple& args,
- ::std::ostream* os) const {
- const OnCallSpec<F>* const spec = FindOnCallSpec(args);
-
- if (spec == NULL) {
- *os << (internal::type_equals<Result, void>::value ?
- "returning directly.\n" :
- "returning default value.\n");
- } else {
- *os << "taking default action specified at:\n"
- << FormatFileLocation(spec->file(), spec->line()) << "\n";
- }
- }
-
- // Writes a message that the call is uninteresting (i.e. neither
- // explicitly expected nor explicitly unexpected) to the given
- // ostream.
- // L < g_gmock_mutex
- virtual void UntypedDescribeUninterestingCall(const void* untyped_args,
- ::std::ostream* os) const {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- *os << "Uninteresting mock function call - ";
- DescribeDefaultActionTo(args, os);
- *os << " Function call: " << Name();
- UniversalPrint(args, os);
- }
-
- // Returns the expectation that matches the given function arguments
- // (or NULL is there's no match); when a match is found,
- // untyped_action is set to point to the action that should be
- // performed (or NULL if the action is "do default"), and
- // is_excessive is modified to indicate whether the call exceeds the
- // expected number.
- //
- // Critical section: We must find the matching expectation and the
- // corresponding action that needs to be taken in an ATOMIC
- // transaction. Otherwise another thread may call this mock
- // method in the middle and mess up the state.
- //
- // However, performing the action has to be left out of the critical
- // section. The reason is that we have no control on what the
- // action does (it can invoke an arbitrary user function or even a
- // mock function) and excessive locking could cause a dead lock.
- // L < g_gmock_mutex
- virtual const ExpectationBase* UntypedFindMatchingExpectation(
- const void* untyped_args,
- const void** untyped_action, bool* is_excessive,
- ::std::ostream* what, ::std::ostream* why) {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- MutexLock l(&g_gmock_mutex);
- TypedExpectation<F>* exp = this->FindMatchingExpectationLocked(args);
- if (exp == NULL) { // A match wasn't found.
- this->FormatUnexpectedCallMessageLocked(args, what, why);
- return NULL;
- }
-
- // This line must be done before calling GetActionForArguments(),
- // which will increment the call count for *exp and thus affect
- // its saturation status.
- *is_excessive = exp->IsSaturated();
- const Action<F>* action = exp->GetActionForArguments(this, args, what, why);
- if (action != NULL && action->IsDoDefault())
- action = NULL; // Normalize "do default" to NULL.
- *untyped_action = action;
- return exp;
- }
-
- // Prints the given function arguments to the ostream.
- virtual void UntypedPrintArgs(const void* untyped_args,
- ::std::ostream* os) const {
- const ArgumentTuple& args =
- *static_cast<const ArgumentTuple*>(untyped_args);
- UniversalPrint(args, os);
- }
-
- // Returns the expectation that matches the arguments, or NULL if no
- // expectation matches them.
- // L >= g_gmock_mutex
- TypedExpectation<F>* FindMatchingExpectationLocked(
- const ArgumentTuple& args) const {
- g_gmock_mutex.AssertHeld();
- for (typename UntypedExpectations::const_reverse_iterator it =
- untyped_expectations_.rbegin();
- it != untyped_expectations_.rend(); ++it) {
- TypedExpectation<F>* const exp =
- static_cast<TypedExpectation<F>*>(it->get());
- if (exp->ShouldHandleArguments(args)) {
- return exp;
- }
- }
- return NULL;
- }
-
- // Returns a message that the arguments don't match any expectation.
- // L >= g_gmock_mutex
- void FormatUnexpectedCallMessageLocked(const ArgumentTuple& args,
- ::std::ostream* os,
- ::std::ostream* why) const {
- g_gmock_mutex.AssertHeld();
- *os << "\nUnexpected mock function call - ";
- DescribeDefaultActionTo(args, os);
- PrintTriedExpectationsLocked(args, why);
- }
-
- // Prints a list of expectations that have been tried against the
- // current mock function call.
- // L >= g_gmock_mutex
- void PrintTriedExpectationsLocked(const ArgumentTuple& args,
- ::std::ostream* why) const {
- g_gmock_mutex.AssertHeld();
- const int count = static_cast<int>(untyped_expectations_.size());
- *why << "Google Mock tried the following " << count << " "
- << (count == 1 ? "expectation, but it didn't match" :
- "expectations, but none matched")
- << ":\n";
- for (int i = 0; i < count; i++) {
- TypedExpectation<F>* const expectation =
- static_cast<TypedExpectation<F>*>(untyped_expectations_[i].get());
- *why << "\n";
- expectation->DescribeLocationTo(why);
- if (count > 1) {
- *why << "tried expectation #" << i << ": ";
- }
- *why << expectation->source_text() << "...\n";
- expectation->ExplainMatchResultTo(args, why);
- expectation->DescribeCallCountTo(why);
- }
- }
-
- // The current spec (either default action spec or expectation spec)
- // being described on this function mocker.
- MockSpec<F> current_spec_;
-
- // There is no generally useful and implementable semantics of
- // copying a mock object, so copying a mock is usually a user error.
- // Thus we disallow copying function mockers. If the user really
- // wants to copy a mock object, he should implement his own copy
- // operation, for example:
- //
- // class MockFoo : public Foo {
- // public:
- // // Defines a copy constructor explicitly.
- // MockFoo(const MockFoo& src) {}
- // ...
- // };
- GTEST_DISALLOW_COPY_AND_ASSIGN_(FunctionMockerBase);
-}; // class FunctionMockerBase
-
-#ifdef _MSC_VER
-# pragma warning(pop) // Restores the warning state.
-#endif // _MSV_VER
-
-// Implements methods of FunctionMockerBase.
-
-// Verifies that all expectations on this mock function have been
-// satisfied. Reports one or more Google Test non-fatal failures and
-// returns false if not.
-// L >= g_gmock_mutex
-
-// Reports an uninteresting call (whose description is in msg) in the
-// manner specified by 'reaction'.
-void ReportUninterestingCall(CallReaction reaction, const string& msg);
-
-} // namespace internal
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file. However, the MockSpec class template is
-// meant to be defined in the ::testing namespace. The following line
-// is just a trick for working around a bug in MSVC 8.0, which cannot
-// handle it if we define MockSpec in ::testing.
-using internal::MockSpec;
-
-// Const(x) is a convenient function for obtaining a const reference
-// to x. This is useful for setting expectations on an overloaded
-// const mock method, e.g.
-//
-// class MockFoo : public FooInterface {
-// public:
-// MOCK_METHOD0(Bar, int());
-// MOCK_CONST_METHOD0(Bar, int&());
-// };
-//
-// MockFoo foo;
-// // Expects a call to non-const MockFoo::Bar().
-// EXPECT_CALL(foo, Bar());
-// // Expects a call to const MockFoo::Bar().
-// EXPECT_CALL(Const(foo), Bar());
-template <typename T>
-inline const T& Const(const T& x) { return x; }
-
-// Constructs an Expectation object that references and co-owns exp.
-inline Expectation::Expectation(internal::ExpectationBase& exp) // NOLINT
- : expectation_base_(exp.GetHandle().expectation_base()) {}
-
-} // namespace testing
-
-// A separate macro is required to avoid compile errors when the name
-// of the method used in call is a result of macro expansion.
-// See CompilesWithMethodNameExpandedFromMacro tests in
-// internal/gmock-spec-builders_test.cc for more details.
-#define GMOCK_ON_CALL_IMPL_(obj, call) \
- ((obj).gmock_##call).InternalDefaultActionSetAt(__FILE__, __LINE__, \
- #obj, #call)
-#define ON_CALL(obj, call) GMOCK_ON_CALL_IMPL_(obj, call)
-
-#define GMOCK_EXPECT_CALL_IMPL_(obj, call) \
- ((obj).gmock_##call).InternalExpectedAt(__FILE__, __LINE__, #obj, #call)
-#define EXPECT_CALL(obj, call) GMOCK_EXPECT_CALL_IMPL_(obj, call)
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock.h
deleted file mode 100644
index ba9fa286d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/gmock.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This is the main header file a user should include.
-
-#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_
-#define GMOCK_INCLUDE_GMOCK_GMOCK_H_
-
-// This file implements the following syntax:
-//
-// ON_CALL(mock_object.Method(...))
-// .With(...) ?
-// .WillByDefault(...);
-//
-// where With() is optional and WillByDefault() must appear exactly
-// once.
-//
-// EXPECT_CALL(mock_object.Method(...))
-// .With(...) ?
-// .Times(...) ?
-// .InSequence(...) *
-// .WillOnce(...) *
-// .WillRepeatedly(...) ?
-// .RetiresOnSaturation() ? ;
-//
-// where all clauses are optional and WillOnce() can be repeated.
-
-#include "gmock/gmock-actions.h"
-#include "gmock/gmock-cardinalities.h"
-#include "gmock/gmock-generated-actions.h"
-#include "gmock/gmock-generated-function-mockers.h"
-#include "gmock/gmock-generated-matchers.h"
-#include "gmock/gmock-more-actions.h"
-#include "gmock/gmock-generated-nice-strict.h"
-#include "gmock/gmock-matchers.h"
-#include "gmock/internal/gmock-internal-utils.h"
-
-namespace testing {
-
-// Declares Google Mock flags that we want a user to use programmatically.
-GMOCK_DECLARE_bool_(catch_leaked_mocks);
-GMOCK_DECLARE_string_(verbose);
-
-// Initializes Google Mock. This must be called before running the
-// tests. In particular, it parses the command line for the flags
-// that Google Mock recognizes. Whenever a Google Mock flag is seen,
-// it is removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Mock flag variables are
-// updated.
-//
-// Since Google Test is needed for Google Mock to work, this function
-// also initializes Google Test and parses its flags, if that hasn't
-// been done.
-void InitGoogleMock(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleMock(int* argc, wchar_t** argv);
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h
deleted file mode 100644
index 1b52dceb4..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h
+++ /dev/null
@@ -1,277 +0,0 @@
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
-
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file contains template meta-programming utility classes needed
-// for implementing Google Mock.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-
-template <typename T>
-class Matcher;
-
-namespace internal {
-
-// An IgnoredValue object can be implicitly constructed from ANY value.
-// This is used in implementing the IgnoreResult(a) action.
-class IgnoredValue {
- public:
- // This constructor template allows any value to be implicitly
- // converted to IgnoredValue. The object has no data member and
- // doesn't try to remember anything about the argument. We
- // deliberately omit the 'explicit' keyword in order to allow the
- // conversion to be implicit.
- template <typename T>
- IgnoredValue(const T&) {}
-};
-
-// MatcherTuple<T>::type is a tuple type where each field is a Matcher
-// for the corresponding field in tuple type T.
-template <typename Tuple>
-struct MatcherTuple;
-
-template <>
-struct MatcherTuple< ::std::tr1::tuple<> > {
- typedef ::std::tr1::tuple< > type;
-};
-
-template <typename A1>
-struct MatcherTuple< ::std::tr1::tuple<A1> > {
- typedef ::std::tr1::tuple<Matcher<A1> > type;
-};
-
-template <typename A1, typename A2>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2> > type;
-};
-
-template <typename A1, typename A2, typename A3>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
- Matcher<A4> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9> > type;
-};
-
-template <typename A1, typename A2, typename A3, typename A4, typename A5,
- typename A6, typename A7, typename A8, typename A9, typename A10>
-struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
- A10> > {
- typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
- Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9>,
- Matcher<A10> > type;
-};
-
-// Template struct Function<F>, where F must be a function type, contains
-// the following typedefs:
-//
-// Result: the function's return type.
-// ArgumentN: the type of the N-th argument, where N starts with 1.
-// ArgumentTuple: the tuple type consisting of all parameters of F.
-// ArgumentMatcherTuple: the tuple type consisting of Matchers for all
-// parameters of F.
-// MakeResultVoid: the function type obtained by substituting void
-// for the return type of F.
-// MakeResultIgnoredValue:
-// the function type obtained by substituting Something
-// for the return type of F.
-template <typename F>
-struct Function;
-
-template <typename R>
-struct Function<R()> {
- typedef R Result;
- typedef ::std::tr1::tuple<> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid();
- typedef IgnoredValue MakeResultIgnoredValue();
-};
-
-template <typename R, typename A1>
-struct Function<R(A1)>
- : Function<R()> {
- typedef A1 Argument1;
- typedef ::std::tr1::tuple<A1> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1);
- typedef IgnoredValue MakeResultIgnoredValue(A1);
-};
-
-template <typename R, typename A1, typename A2>
-struct Function<R(A1, A2)>
- : Function<R(A1)> {
- typedef A2 Argument2;
- typedef ::std::tr1::tuple<A1, A2> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2);
-};
-
-template <typename R, typename A1, typename A2, typename A3>
-struct Function<R(A1, A2, A3)>
- : Function<R(A1, A2)> {
- typedef A3 Argument3;
- typedef ::std::tr1::tuple<A1, A2, A3> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4>
-struct Function<R(A1, A2, A3, A4)>
- : Function<R(A1, A2, A3)> {
- typedef A4 Argument4;
- typedef ::std::tr1::tuple<A1, A2, A3, A4> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5>
-struct Function<R(A1, A2, A3, A4, A5)>
- : Function<R(A1, A2, A3, A4)> {
- typedef A5 Argument5;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6>
-struct Function<R(A1, A2, A3, A4, A5, A6)>
- : Function<R(A1, A2, A3, A4, A5)> {
- typedef A6 Argument6;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7)>
- : Function<R(A1, A2, A3, A4, A5, A6)> {
- typedef A7 Argument7;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
- : Function<R(A1, A2, A3, A4, A5, A6, A7)> {
- typedef A8 Argument8;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
- : Function<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
- typedef A9 Argument9;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
- A9);
-};
-
-template <typename R, typename A1, typename A2, typename A3, typename A4,
- typename A5, typename A6, typename A7, typename A8, typename A9,
- typename A10>
-struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
- : Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
- typedef A10 Argument10;
- typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
- A10> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
- typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
- A9, A10);
-};
-
-} // namespace internal
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h.pump b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h.pump
deleted file mode 100644
index 821e474e7..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-generated-internal-utils.h.pump
+++ /dev/null
@@ -1,136 +0,0 @@
-$$ -*- mode: c++; -*-
-$$ This is a Pump source file. Please use Pump to convert it to
-$$ gmock-generated-function-mockers.h.
-$$
-$var n = 10 $$ The maximum arity we support.
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file contains template meta-programming utility classes needed
-// for implementing Google Mock.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
-
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-
-template <typename T>
-class Matcher;
-
-namespace internal {
-
-// An IgnoredValue object can be implicitly constructed from ANY value.
-// This is used in implementing the IgnoreResult(a) action.
-class IgnoredValue {
- public:
- // This constructor template allows any value to be implicitly
- // converted to IgnoredValue. The object has no data member and
- // doesn't try to remember anything about the argument. We
- // deliberately omit the 'explicit' keyword in order to allow the
- // conversion to be implicit.
- template <typename T>
- IgnoredValue(const T&) {}
-};
-
-// MatcherTuple<T>::type is a tuple type where each field is a Matcher
-// for the corresponding field in tuple type T.
-template <typename Tuple>
-struct MatcherTuple;
-
-
-$range i 0..n
-$for i [[
-$range j 1..i
-$var typename_As = [[$for j, [[typename A$j]]]]
-$var As = [[$for j, [[A$j]]]]
-$var matcher_As = [[$for j, [[Matcher<A$j>]]]]
-template <$typename_As>
-struct MatcherTuple< ::std::tr1::tuple<$As> > {
- typedef ::std::tr1::tuple<$matcher_As > type;
-};
-
-
-]]
-// Template struct Function<F>, where F must be a function type, contains
-// the following typedefs:
-//
-// Result: the function's return type.
-// ArgumentN: the type of the N-th argument, where N starts with 1.
-// ArgumentTuple: the tuple type consisting of all parameters of F.
-// ArgumentMatcherTuple: the tuple type consisting of Matchers for all
-// parameters of F.
-// MakeResultVoid: the function type obtained by substituting void
-// for the return type of F.
-// MakeResultIgnoredValue:
-// the function type obtained by substituting Something
-// for the return type of F.
-template <typename F>
-struct Function;
-
-template <typename R>
-struct Function<R()> {
- typedef R Result;
- typedef ::std::tr1::tuple<> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid();
- typedef IgnoredValue MakeResultIgnoredValue();
-};
-
-
-$range i 1..n
-$for i [[
-$range j 1..i
-$var typename_As = [[$for j [[, typename A$j]]]]
-$var As = [[$for j, [[A$j]]]]
-$var matcher_As = [[$for j, [[Matcher<A$j>]]]]
-$range k 1..i-1
-$var prev_As = [[$for k, [[A$k]]]]
-template <typename R$typename_As>
-struct Function<R($As)>
- : Function<R($prev_As)> {
- typedef A$i Argument$i;
- typedef ::std::tr1::tuple<$As> ArgumentTuple;
- typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
- typedef void MakeResultVoid($As);
- typedef IgnoredValue MakeResultIgnoredValue($As);
-};
-
-
-]]
-} // namespace internal
-
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-internal-utils.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-internal-utils.h
deleted file mode 100644
index f0fd86826..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-internal-utils.h
+++ /dev/null
@@ -1,463 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file defines some utilities useful for implementing Google
-// Mock. They are subject to change without notice, so please DO NOT
-// USE THEM IN USER CODE.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-
-#include <stdio.h>
-#include <ostream> // NOLINT
-#include <string>
-
-#include "gmock/internal/gmock-generated-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-namespace internal {
-
-// Converts an identifier name to a space-separated list of lower-case
-// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
-// treated as one word. For example, both "FooBar123" and
-// "foo_bar_123" are converted to "foo bar 123".
-string ConvertIdentifierNameToWords(const char* id_name);
-
-// PointeeOf<Pointer>::type is the type of a value pointed to by a
-// Pointer, which can be either a smart pointer or a raw pointer. The
-// following default implementation is for the case where Pointer is a
-// smart pointer.
-template <typename Pointer>
-struct PointeeOf {
- // Smart pointer classes define type element_type as the type of
- // their pointees.
- typedef typename Pointer::element_type type;
-};
-// This specialization is for the raw pointer case.
-template <typename T>
-struct PointeeOf<T*> { typedef T type; }; // NOLINT
-
-// GetRawPointer(p) returns the raw pointer underlying p when p is a
-// smart pointer, or returns p itself when p is already a raw pointer.
-// The following default implementation is for the smart pointer case.
-template <typename Pointer>
-inline typename Pointer::element_type* GetRawPointer(const Pointer& p) {
- return p.get();
-}
-// This overloaded version is for the raw pointer case.
-template <typename Element>
-inline Element* GetRawPointer(Element* p) { return p; }
-
-// This comparator allows linked_ptr to be stored in sets.
-template <typename T>
-struct LinkedPtrLessThan {
- bool operator()(const ::testing::internal::linked_ptr<T>& lhs,
- const ::testing::internal::linked_ptr<T>& rhs) const {
- return lhs.get() < rhs.get();
- }
-};
-
-// Symbian compilation can be done with wchar_t being either a native
-// type or a typedef. Using Google Mock with OpenC without wchar_t
-// should require the definition of _STLP_NO_WCHAR_T.
-//
-// MSVC treats wchar_t as a native type usually, but treats it as the
-// same as unsigned short when the compiler option /Zc:wchar_t- is
-// specified. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t
-// is a native type.
-#if (GTEST_OS_SYMBIAN && defined(_STLP_NO_WCHAR_T)) || \
- (defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
-// wchar_t is a typedef.
-#else
-# define GMOCK_WCHAR_T_IS_NATIVE_ 1
-#endif
-
-// signed wchar_t and unsigned wchar_t are NOT in the C++ standard.
-// Using them is a bad practice and not portable. So DON'T use them.
-//
-// Still, Google Mock is designed to work even if the user uses signed
-// wchar_t or unsigned wchar_t (obviously, assuming the compiler
-// supports them).
-//
-// To gcc,
-// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
-#ifdef __GNUC__
-// signed/unsigned wchar_t are valid types.
-# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
-#endif
-
-// In what follows, we use the term "kind" to indicate whether a type
-// is bool, an integer type (excluding bool), a floating-point type,
-// or none of them. This categorization is useful for determining
-// when a matcher argument type can be safely converted to another
-// type in the implementation of SafeMatcherCast.
-enum TypeKind {
- kBool, kInteger, kFloatingPoint, kOther
-};
-
-// KindOf<T>::value is the kind of type T.
-template <typename T> struct KindOf {
- enum { value = kOther }; // The default kind.
-};
-
-// This macro declares that the kind of 'type' is 'kind'.
-#define GMOCK_DECLARE_KIND_(type, kind) \
- template <> struct KindOf<type> { enum { value = kind }; }
-
-GMOCK_DECLARE_KIND_(bool, kBool);
-
-// All standard integer types.
-GMOCK_DECLARE_KIND_(char, kInteger);
-GMOCK_DECLARE_KIND_(signed char, kInteger);
-GMOCK_DECLARE_KIND_(unsigned char, kInteger);
-GMOCK_DECLARE_KIND_(short, kInteger); // NOLINT
-GMOCK_DECLARE_KIND_(unsigned short, kInteger); // NOLINT
-GMOCK_DECLARE_KIND_(int, kInteger);
-GMOCK_DECLARE_KIND_(unsigned int, kInteger);
-GMOCK_DECLARE_KIND_(long, kInteger); // NOLINT
-GMOCK_DECLARE_KIND_(unsigned long, kInteger); // NOLINT
-
-#if GMOCK_WCHAR_T_IS_NATIVE_
-GMOCK_DECLARE_KIND_(wchar_t, kInteger);
-#endif
-
-// Non-standard integer types.
-GMOCK_DECLARE_KIND_(Int64, kInteger);
-GMOCK_DECLARE_KIND_(UInt64, kInteger);
-
-// All standard floating-point types.
-GMOCK_DECLARE_KIND_(float, kFloatingPoint);
-GMOCK_DECLARE_KIND_(double, kFloatingPoint);
-GMOCK_DECLARE_KIND_(long double, kFloatingPoint);
-
-#undef GMOCK_DECLARE_KIND_
-
-// Evaluates to the kind of 'type'.
-#define GMOCK_KIND_OF_(type) \
- static_cast< ::testing::internal::TypeKind>( \
- ::testing::internal::KindOf<type>::value)
-
-// Evaluates to true iff integer type T is signed.
-#define GMOCK_IS_SIGNED_(T) (static_cast<T>(-1) < 0)
-
-// LosslessArithmeticConvertibleImpl<kFromKind, From, kToKind, To>::value
-// is true iff arithmetic type From can be losslessly converted to
-// arithmetic type To.
-//
-// It's the user's responsibility to ensure that both From and To are
-// raw (i.e. has no CV modifier, is not a pointer, and is not a
-// reference) built-in arithmetic types, kFromKind is the kind of
-// From, and kToKind is the kind of To; the value is
-// implementation-defined when the above pre-condition is violated.
-template <TypeKind kFromKind, typename From, TypeKind kToKind, typename To>
-struct LosslessArithmeticConvertibleImpl : public false_type {};
-
-// Converting bool to bool is lossless.
-template <>
-struct LosslessArithmeticConvertibleImpl<kBool, bool, kBool, bool>
- : public true_type {}; // NOLINT
-
-// Converting bool to any integer type is lossless.
-template <typename To>
-struct LosslessArithmeticConvertibleImpl<kBool, bool, kInteger, To>
- : public true_type {}; // NOLINT
-
-// Converting bool to any floating-point type is lossless.
-template <typename To>
-struct LosslessArithmeticConvertibleImpl<kBool, bool, kFloatingPoint, To>
- : public true_type {}; // NOLINT
-
-// Converting an integer to bool is lossy.
-template <typename From>
-struct LosslessArithmeticConvertibleImpl<kInteger, From, kBool, bool>
- : public false_type {}; // NOLINT
-
-// Converting an integer to another non-bool integer is lossless iff
-// the target type's range encloses the source type's range.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<kInteger, From, kInteger, To>
- : public bool_constant<
- // When converting from a smaller size to a larger size, we are
- // fine as long as we are not converting from signed to unsigned.
- ((sizeof(From) < sizeof(To)) &&
- (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) ||
- // When converting between the same size, the signedness must match.
- ((sizeof(From) == sizeof(To)) &&
- (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {}; // NOLINT
-
-#undef GMOCK_IS_SIGNED_
-
-// Converting an integer to a floating-point type may be lossy, since
-// the format of a floating-point number is implementation-defined.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<kInteger, From, kFloatingPoint, To>
- : public false_type {}; // NOLINT
-
-// Converting a floating-point to bool is lossy.
-template <typename From>
-struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kBool, bool>
- : public false_type {}; // NOLINT
-
-// Converting a floating-point to an integer is lossy.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kInteger, To>
- : public false_type {}; // NOLINT
-
-// Converting a floating-point to another floating-point is lossless
-// iff the target type is at least as big as the source type.
-template <typename From, typename To>
-struct LosslessArithmeticConvertibleImpl<
- kFloatingPoint, From, kFloatingPoint, To>
- : public bool_constant<sizeof(From) <= sizeof(To)> {}; // NOLINT
-
-// LosslessArithmeticConvertible<From, To>::value is true iff arithmetic
-// type From can be losslessly converted to arithmetic type To.
-//
-// It's the user's responsibility to ensure that both From and To are
-// raw (i.e. has no CV modifier, is not a pointer, and is not a
-// reference) built-in arithmetic types; the value is
-// implementation-defined when the above pre-condition is violated.
-template <typename From, typename To>
-struct LosslessArithmeticConvertible
- : public LosslessArithmeticConvertibleImpl<
- GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {}; // NOLINT
-
-// This interface knows how to report a Google Mock failure (either
-// non-fatal or fatal).
-class FailureReporterInterface {
- public:
- // The type of a failure (either non-fatal or fatal).
- enum FailureType {
- NONFATAL, FATAL
- };
-
- virtual ~FailureReporterInterface() {}
-
- // Reports a failure that occurred at the given source file location.
- virtual void ReportFailure(FailureType type, const char* file, int line,
- const string& message) = 0;
-};
-
-// Returns the failure reporter used by Google Mock.
-FailureReporterInterface* GetFailureReporter();
-
-// Asserts that condition is true; aborts the process with the given
-// message if condition is false. We cannot use LOG(FATAL) or CHECK()
-// as Google Mock might be used to mock the log sink itself. We
-// inline this function to prevent it from showing up in the stack
-// trace.
-inline void Assert(bool condition, const char* file, int line,
- const string& msg) {
- if (!condition) {
- GetFailureReporter()->ReportFailure(FailureReporterInterface::FATAL,
- file, line, msg);
- }
-}
-inline void Assert(bool condition, const char* file, int line) {
- Assert(condition, file, line, "Assertion failed.");
-}
-
-// Verifies that condition is true; generates a non-fatal failure if
-// condition is false.
-inline void Expect(bool condition, const char* file, int line,
- const string& msg) {
- if (!condition) {
- GetFailureReporter()->ReportFailure(FailureReporterInterface::NONFATAL,
- file, line, msg);
- }
-}
-inline void Expect(bool condition, const char* file, int line) {
- Expect(condition, file, line, "Expectation failed.");
-}
-
-// Severity level of a log.
-enum LogSeverity {
- INFO = 0,
- WARNING = 1
-};
-
-// Valid values for the --gmock_verbose flag.
-
-// All logs (informational and warnings) are printed.
-const char kInfoVerbosity[] = "info";
-// Only warnings are printed.
-const char kWarningVerbosity[] = "warning";
-// No logs are printed.
-const char kErrorVerbosity[] = "error";
-
-// Returns true iff a log with the given severity is visible according
-// to the --gmock_verbose flag.
-bool LogIsVisible(LogSeverity severity);
-
-// Prints the given message to stdout iff 'severity' >= the level
-// specified by the --gmock_verbose flag. If stack_frames_to_skip >=
-// 0, also prints the stack trace excluding the top
-// stack_frames_to_skip frames. In opt mode, any positive
-// stack_frames_to_skip is treated as 0, since we don't know which
-// function calls will be inlined by the compiler and need to be
-// conservative.
-void Log(LogSeverity severity, const string& message, int stack_frames_to_skip);
-
-// TODO(wan@google.com): group all type utilities together.
-
-// Type traits.
-
-// is_reference<T>::value is non-zero iff T is a reference type.
-template <typename T> struct is_reference : public false_type {};
-template <typename T> struct is_reference<T&> : public true_type {};
-
-// type_equals<T1, T2>::value is non-zero iff T1 and T2 are the same type.
-template <typename T1, typename T2> struct type_equals : public false_type {};
-template <typename T> struct type_equals<T, T> : public true_type {};
-
-// remove_reference<T>::type removes the reference from type T, if any.
-template <typename T> struct remove_reference { typedef T type; }; // NOLINT
-template <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT
-
-// Invalid<T>() returns an invalid value of type T. This is useful
-// when a value of type T is needed for compilation, but the statement
-// will not really be executed (or we don't care if the statement
-// crashes).
-template <typename T>
-inline T Invalid() {
- return *static_cast<typename remove_reference<T>::type*>(NULL);
-}
-template <>
-inline void Invalid<void>() {}
-
-// Given a raw type (i.e. having no top-level reference or const
-// modifier) RawContainer that's either an STL-style container or a
-// native array, class StlContainerView<RawContainer> has the
-// following members:
-//
-// - type is a type that provides an STL-style container view to
-// (i.e. implements the STL container concept for) RawContainer;
-// - const_reference is a type that provides a reference to a const
-// RawContainer;
-// - ConstReference(raw_container) returns a const reference to an STL-style
-// container view to raw_container, which is a RawContainer.
-// - Copy(raw_container) returns an STL-style container view of a
-// copy of raw_container, which is a RawContainer.
-//
-// This generic version is used when RawContainer itself is already an
-// STL-style container.
-template <class RawContainer>
-class StlContainerView {
- public:
- typedef RawContainer type;
- typedef const type& const_reference;
-
- static const_reference ConstReference(const RawContainer& container) {
- // Ensures that RawContainer is not a const type.
- testing::StaticAssertTypeEq<RawContainer,
- GTEST_REMOVE_CONST_(RawContainer)>();
- return container;
- }
- static type Copy(const RawContainer& container) { return container; }
-};
-
-// This specialization is used when RawContainer is a native array type.
-template <typename Element, size_t N>
-class StlContainerView<Element[N]> {
- public:
- typedef GTEST_REMOVE_CONST_(Element) RawElement;
- typedef internal::NativeArray<RawElement> type;
- // NativeArray<T> can represent a native array either by value or by
- // reference (selected by a constructor argument), so 'const type'
- // can be used to reference a const native array. We cannot
- // 'typedef const type& const_reference' here, as that would mean
- // ConstReference() has to return a reference to a local variable.
- typedef const type const_reference;
-
- static const_reference ConstReference(const Element (&array)[N]) {
- // Ensures that Element is not a const type.
- testing::StaticAssertTypeEq<Element, RawElement>();
-#if GTEST_OS_SYMBIAN
- // The Nokia Symbian compiler confuses itself in template instantiation
- // for this call without the cast to Element*:
- // function call '[testing::internal::NativeArray<char *>].NativeArray(
- // {lval} const char *[4], long, testing::internal::RelationToSource)'
- // does not match
- // 'testing::internal::NativeArray<char *>::NativeArray(
- // char *const *, unsigned int, testing::internal::RelationToSource)'
- // (instantiating: 'testing::internal::ContainsMatcherImpl
- // <const char * (&)[4]>::Matches(const char * (&)[4]) const')
- // (instantiating: 'testing::internal::StlContainerView<char *[4]>::
- // ConstReference(const char * (&)[4])')
- // (and though the N parameter type is mismatched in the above explicit
- // conversion of it doesn't help - only the conversion of the array).
- return type(const_cast<Element*>(&array[0]), N, kReference);
-#else
- return type(array, N, kReference);
-#endif // GTEST_OS_SYMBIAN
- }
- static type Copy(const Element (&array)[N]) {
-#if GTEST_OS_SYMBIAN
- return type(const_cast<Element*>(&array[0]), N, kCopy);
-#else
- return type(array, N, kCopy);
-#endif // GTEST_OS_SYMBIAN
- }
-};
-
-// This specialization is used when RawContainer is a native array
-// represented as a (pointer, size) tuple.
-template <typename ElementPointer, typename Size>
-class StlContainerView< ::std::tr1::tuple<ElementPointer, Size> > {
- public:
- typedef GTEST_REMOVE_CONST_(
- typename internal::PointeeOf<ElementPointer>::type) RawElement;
- typedef internal::NativeArray<RawElement> type;
- typedef const type const_reference;
-
- static const_reference ConstReference(
- const ::std::tr1::tuple<ElementPointer, Size>& array) {
- using ::std::tr1::get;
- return type(get<0>(array), get<1>(array), kReference);
- }
- static type Copy(const ::std::tr1::tuple<ElementPointer, Size>& array) {
- using ::std::tr1::get;
- return type(get<0>(array), get<1>(array), kCopy);
- }
-};
-
-// The following specialization prevents the user from instantiating
-// StlContainer with a reference type.
-template <typename T> class StlContainerView<T&>;
-
-} // namespace internal
-} // namespace testing
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-port.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-port.h
deleted file mode 100644
index 3b9cc4792..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/include/gmock/internal/gmock-port.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vadimb@google.com (Vadim Berman)
-//
-// Low-level types and utilities for porting Google Mock to various
-// platforms. They are subject to change without notice. DO NOT USE
-// THEM IN USER CODE.
-
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-
-#include <assert.h>
-#include <stdlib.h>
-#include <iostream>
-
-// Most of the types needed for porting Google Mock are also required
-// for Google Test and are defined in gtest-port.h.
-#include "gtest/internal/gtest-linked_ptr.h"
-#include "gtest/internal/gtest-port.h"
-
-// To avoid conditional compilation everywhere, we make it
-// gmock-port.h's responsibility to #include the header implementing
-// tr1/tuple. gmock-port.h does this via gtest-port.h, which is
-// guaranteed to pull in the tuple header.
-
-// For MS Visual C++, check the compiler version. At least VS 2003 is
-// required to compile Google Mock.
-#if defined(_MSC_VER) && _MSC_VER < 1310
-# error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
-#endif
-
-// Macro for referencing flags. This is public as we want the user to
-// use this syntax to reference Google Mock flags.
-#define GMOCK_FLAG(name) FLAGS_gmock_##name
-
-// Macros for declaring flags.
-#define GMOCK_DECLARE_bool_(name) extern bool GMOCK_FLAG(name)
-#define GMOCK_DECLARE_int32_(name) \
- extern ::testing::internal::Int32 GMOCK_FLAG(name)
-#define GMOCK_DECLARE_string_(name) \
- extern ::testing::internal::String GMOCK_FLAG(name)
-
-// Macros for defining flags.
-#define GMOCK_DEFINE_bool_(name, default_val, doc) \
- bool GMOCK_FLAG(name) = (default_val)
-#define GMOCK_DEFINE_int32_(name, default_val, doc) \
- ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val)
-#define GMOCK_DEFINE_string_(name, default_val, doc) \
- ::testing::internal::String GMOCK_FLAG(name) = (default_val)
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.sln b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.sln
deleted file mode 100644
index b752f876b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.sln
+++ /dev/null
@@ -1,32 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock", "gmock.vcproj", "{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_test", "gmock_test.vcproj", "{F10D22F8-AC7B-4213-8720-608E7D878CD2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_main", "gmock_main.vcproj", "{E4EF614B-30DF-4954-8C53-580A0BF6B589}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.vcproj
deleted file mode 100644
index 4bbfe9899..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock.vcproj
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="gmock"
- ProjectGUID="{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}"
- RootNamespace="gmock"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)\$(ProjectName)"
- ConfigurationType="4"
- InheritedPropertySheets=".\gmock_config.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include;..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)\$(ProjectName)"
- ConfigurationType="4"
- InheritedPropertySheets=".\gmock_config.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\include;..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <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;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\src\gmock-all.cc"
- >
- </File>
- <File
- RelativePath="$(GTestDir)\src\gtest-all.cc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(GTestDir)"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(GTestDir)"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Public Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Private Header Files"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_config.vsprops b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_config.vsprops
deleted file mode 100644
index 8b65cfb6e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_config.vsprops
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="gmock_config"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(GTestDir)/include&quot;"
- />
- <UserMacro
- Name="GTestDir"
- Value="../../gtest"
- />
-</VisualStudioPropertySheet>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_main.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_main.vcproj
deleted file mode 100644
index 01505a931..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_main.vcproj
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="gmock_main"
- ProjectGUID="{E4EF614B-30DF-4954-8C53-580A0BF6B589}"
- RootNamespace="gmock_main"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)\$(ProjectName)"
- ConfigurationType="4"
- InheritedPropertySheets=".\gmock_config.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)\$(ProjectName)"
- ConfigurationType="4"
- InheritedPropertySheets=".\gmock_config.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}"
- RelativePathToProject=".\gmock.vcproj"
- />
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\src\gmock_main.cc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../include"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../include"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_test.vcproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_test.vcproj
deleted file mode 100644
index d1e01e71a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2005/gmock_test.vcproj
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="gmock_test"
- ProjectGUID="{F10D22F8-AC7B-4213-8720-608E7D878CD2}"
- RootNamespace="gmock_test"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)\$(ProjectName)"
- ConfigurationType="1"
- InheritedPropertySheets=".\gmock_config.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/bigobj"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include;..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(OutDir)\$(ProjectName)"
- ConfigurationType="1"
- InheritedPropertySheets=".\gmock_config.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/bigobj"
- AdditionalIncludeDirectories="..\..\include;..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{E4EF614B-30DF-4954-8C53-580A0BF6B589}"
- RelativePathToProject=".\gmock_main.vcproj"
- />
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\test\gmock_all_test.cc"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.sln b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.sln
deleted file mode 100644
index d9496569b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.sln
+++ /dev/null
@@ -1,32 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock", "gmock.vcxproj", "{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_test", "gmock_test.vcxproj", "{F10D22F8-AC7B-4213-8720-608E7D878CD2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_main", "gmock_main.vcxproj", "{E4EF614B-30DF-4954-8C53-580A0BF6B589}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32
- {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32
- {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32
- {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.vcxproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.vcxproj
deleted file mode 100644
index 21a85ef6c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock.vcxproj
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}</ProjectGuid>
- <RootNamespace>gmock</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="gmock_config.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="gmock_config.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)$(ProjectName)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\gmock-all.cc" />
- <ClCompile Include="$(GTestDir)\src\gtest-all.cc">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GTestDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GTestDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_config.props b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_config.props
deleted file mode 100644
index bd497f1d8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_config.props
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="UserMacros">
- <GTestDir>../../gtest</GTestDir>
- </PropertyGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(GTestDir)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <BuildMacro Include="GTestDir">
- <Value>$(GTestDir)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_main.vcxproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_main.vcxproj
deleted file mode 100644
index 27fecd5f8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_main.vcxproj
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{E4EF614B-30DF-4954-8C53-580A0BF6B589}</ProjectGuid>
- <RootNamespace>gmock_main</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="gmock_config.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="gmock_config.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)$(ProjectName)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ProjectReference Include="gmock.vcxproj">
- <Project>{34681f0d-ce45-415d-b5f2-5c662dfe3bd5}</Project>
- <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\gmock_main.cc">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_test.vcxproj b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_test.vcxproj
deleted file mode 100644
index 265439ec2..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/msvc/2010/gmock_test.vcxproj
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F10D22F8-AC7B-4213-8720-608E7D878CD2}</ProjectGuid>
- <RootNamespace>gmock_test</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="gmock_config.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="gmock_config.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\..\include;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ProjectReference Include="gmock_main.vcxproj">
- <Project>{e4ef614b-30df-4954-8c53-580a0bf6b589}</Project>
- <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\test\gmock_all_test.cc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/fuse_gmock_files.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/fuse_gmock_files.py
deleted file mode 100755
index fc0baf79b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/fuse_gmock_files.py
+++ /dev/null
@@ -1,240 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""fuse_gmock_files.py v0.1.0
-Fuses Google Mock and Google Test source code into two .h files and a .cc file.
-
-SYNOPSIS
- fuse_gmock_files.py [GMOCK_ROOT_DIR] OUTPUT_DIR
-
- Scans GMOCK_ROOT_DIR for Google Mock and Google Test source
- code, assuming Google Test is in the GMOCK_ROOT_DIR/gtest
- sub-directory, and generates three files:
- OUTPUT_DIR/gtest/gtest.h, OUTPUT_DIR/gmock/gmock.h, and
- OUTPUT_DIR/gmock-gtest-all.cc. Then you can build your tests
- by adding OUTPUT_DIR to the include search path and linking
- with OUTPUT_DIR/gmock-gtest-all.cc. These three files contain
- everything you need to use Google Mock. Hence you can
- "install" Google Mock by copying them to wherever you want.
-
- GMOCK_ROOT_DIR can be omitted and defaults to the parent
- directory of the directory holding this script.
-
-EXAMPLES
- ./fuse_gmock_files.py fused_gmock
- ./fuse_gmock_files.py path/to/unpacked/gmock fused_gmock
-
-This tool is experimental. In particular, it assumes that there is no
-conditional inclusion of Google Mock or Google Test headers. Please
-report any problems to googlemock@googlegroups.com. You can read
-http://code.google.com/p/googlemock/wiki/CookBook for more
-information.
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import sets
-import sys
-
-# We assume that this file is in the scripts/ directory in the Google
-# Mock root directory.
-DEFAULT_GMOCK_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
-
-# We need to call into gtest/scripts/fuse_gtest_files.py.
-sys.path.append(os.path.join(DEFAULT_GMOCK_ROOT_DIR, 'gtest/scripts'))
-import fuse_gtest_files
-gtest = fuse_gtest_files
-
-# Regex for matching '#include "gmock/..."'.
-INCLUDE_GMOCK_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gmock/.+)"')
-
-# Where to find the source seed files.
-GMOCK_H_SEED = 'include/gmock/gmock.h'
-GMOCK_ALL_CC_SEED = 'src/gmock-all.cc'
-
-# Where to put the generated files.
-GTEST_H_OUTPUT = 'gtest/gtest.h'
-GMOCK_H_OUTPUT = 'gmock/gmock.h'
-GMOCK_GTEST_ALL_CC_OUTPUT = 'gmock-gtest-all.cc'
-
-
-def GetGTestRootDir(gmock_root):
- """Returns the root directory of Google Test."""
-
- return os.path.join(gmock_root, 'gtest')
-
-
-def ValidateGMockRootDir(gmock_root):
- """Makes sure gmock_root points to a valid gmock root directory.
-
- The function aborts the program on failure.
- """
-
- gtest.ValidateGTestRootDir(GetGTestRootDir(gmock_root))
- gtest.VerifyFileExists(gmock_root, GMOCK_H_SEED)
- gtest.VerifyFileExists(gmock_root, GMOCK_ALL_CC_SEED)
-
-
-def ValidateOutputDir(output_dir):
- """Makes sure output_dir points to a valid output directory.
-
- The function aborts the program on failure.
- """
-
- gtest.VerifyOutputFile(output_dir, gtest.GTEST_H_OUTPUT)
- gtest.VerifyOutputFile(output_dir, GMOCK_H_OUTPUT)
- gtest.VerifyOutputFile(output_dir, GMOCK_GTEST_ALL_CC_OUTPUT)
-
-
-def FuseGMockH(gmock_root, output_dir):
- """Scans folder gmock_root to generate gmock/gmock.h in output_dir."""
-
- output_file = file(os.path.join(output_dir, GMOCK_H_OUTPUT), 'w')
- processed_files = sets.Set() # Holds all gmock headers we've processed.
-
- def ProcessFile(gmock_header_path):
- """Processes the given gmock header file."""
-
- # We don't process the same header twice.
- if gmock_header_path in processed_files:
- return
-
- processed_files.add(gmock_header_path)
-
- # Reads each line in the given gmock header.
- for line in file(os.path.join(gmock_root, gmock_header_path), 'r'):
- m = INCLUDE_GMOCK_FILE_REGEX.match(line)
- if m:
- # It's '#include "gmock/..."' - let's process it recursively.
- ProcessFile('include/' + m.group(1))
- else:
- m = gtest.INCLUDE_GTEST_FILE_REGEX.match(line)
- if m:
- # It's '#include "gtest/foo.h"'. We translate it to
- # "gtest/gtest.h", regardless of what foo is, since all
- # gtest headers are fused into gtest/gtest.h.
-
- # There is no need to #include gtest.h twice.
- if not gtest.GTEST_H_SEED in processed_files:
- processed_files.add(gtest.GTEST_H_SEED)
- output_file.write('#include "%s"\n' % (gtest.GTEST_H_OUTPUT,))
- else:
- # Otherwise we copy the line unchanged to the output file.
- output_file.write(line)
-
- ProcessFile(GMOCK_H_SEED)
- output_file.close()
-
-
-def FuseGMockAllCcToFile(gmock_root, output_file):
- """Scans folder gmock_root to fuse gmock-all.cc into output_file."""
-
- processed_files = sets.Set()
-
- def ProcessFile(gmock_source_file):
- """Processes the given gmock source file."""
-
- # We don't process the same #included file twice.
- if gmock_source_file in processed_files:
- return
-
- processed_files.add(gmock_source_file)
-
- # Reads each line in the given gmock source file.
- for line in file(os.path.join(gmock_root, gmock_source_file), 'r'):
- m = INCLUDE_GMOCK_FILE_REGEX.match(line)
- if m:
- # It's '#include "gmock/foo.h"'. We treat it as '#include
- # "gmock/gmock.h"', as all other gmock headers are being fused
- # into gmock.h and cannot be #included directly.
-
- # There is no need to #include "gmock/gmock.h" more than once.
- if not GMOCK_H_SEED in processed_files:
- processed_files.add(GMOCK_H_SEED)
- output_file.write('#include "%s"\n' % (GMOCK_H_OUTPUT,))
- else:
- m = gtest.INCLUDE_GTEST_FILE_REGEX.match(line)
- if m:
- # It's '#include "gtest/..."'.
- # There is no need to #include gtest.h as it has been
- # #included by gtest-all.cc.
- pass
- else:
- m = gtest.INCLUDE_SRC_FILE_REGEX.match(line)
- if m:
- # It's '#include "src/foo"' - let's process it recursively.
- ProcessFile(m.group(1))
- else:
- # Otherwise we copy the line unchanged to the output file.
- output_file.write(line)
-
- ProcessFile(GMOCK_ALL_CC_SEED)
-
-
-def FuseGMockGTestAllCc(gmock_root, output_dir):
- """Scans folder gmock_root to generate gmock-gtest-all.cc in output_dir."""
-
- output_file = file(os.path.join(output_dir, GMOCK_GTEST_ALL_CC_OUTPUT), 'w')
- # First, fuse gtest-all.cc into gmock-gtest-all.cc.
- gtest.FuseGTestAllCcToFile(GetGTestRootDir(gmock_root), output_file)
- # Next, append fused gmock-all.cc to gmock-gtest-all.cc.
- FuseGMockAllCcToFile(gmock_root, output_file)
- output_file.close()
-
-
-def FuseGMock(gmock_root, output_dir):
- """Fuses gtest.h, gmock.h, and gmock-gtest-all.h."""
-
- ValidateGMockRootDir(gmock_root)
- ValidateOutputDir(output_dir)
-
- gtest.FuseGTestH(GetGTestRootDir(gmock_root), output_dir)
- FuseGMockH(gmock_root, output_dir)
- FuseGMockGTestAllCc(gmock_root, output_dir)
-
-
-def main():
- argc = len(sys.argv)
- if argc == 2:
- # fuse_gmock_files.py OUTPUT_DIR
- FuseGMock(DEFAULT_GMOCK_ROOT_DIR, sys.argv[1])
- elif argc == 3:
- # fuse_gmock_files.py GMOCK_ROOT_DIR OUTPUT_DIR
- FuseGMock(sys.argv[1], sys.argv[2])
- else:
- print __doc__
- sys.exit(1)
-
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/COPYING b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/COPYING
deleted file mode 100644
index 87ea06365..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/COPYING
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [2007] Neal Norwitz
- Portions Copyright [2007] Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README
deleted file mode 100644
index d6f95974b..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README
+++ /dev/null
@@ -1,35 +0,0 @@
-
-The Google Mock class generator is an application that is part of cppclean.
-For more information about cppclean, see the README.cppclean file or
-visit http://code.google.com/p/cppclean/
-
-cppclean requires Python 2.3.5 or later. If you don't have Python installed
-on your system, you will also need to install it. You can download Python
-from: http://www.python.org/download/releases/
-
-To use the Google Mock class generator, you need to call it
-on the command line passing the header file and class for which you want
-to generate a Google Mock class.
-
-Make sure to install the scripts somewhere in your path. Then you can
-run the program.
-
- gmock_gen.py header-file.h [ClassName]...
-
-If no ClassNames are specified, all classes in the file are emitted.
-
-To change the indentation from the default of 2, set INDENT in
-the environment. For example to use an indent of 4 spaces:
-
-INDENT=4 gmock_gen.py header-file.h ClassName
-
-This version was made from SVN revision 281 in the cppclean repository.
-
-Known Limitations
------------------
-Not all code will be generated properly. For example, when mocking templated
-classes, the template information is lost. You will need to add the template
-information manually.
-
-Not all permutations of using multiple pointers/references will be rendered
-properly. These will also have to be fixed manually.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README.cppclean b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README.cppclean
deleted file mode 100644
index 65431b617..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/README.cppclean
+++ /dev/null
@@ -1,115 +0,0 @@
-Goal:
------
- CppClean attempts to find problems in C++ source that slow development
- in large code bases, for example various forms of unused code.
- Unused code can be unused functions, methods, data members, types, etc
- to unnecessary #include directives. Unnecessary #includes can cause
- considerable extra compiles increasing the edit-compile-run cycle.
-
- The project home page is: http://code.google.com/p/cppclean/
-
-
-Features:
----------
- * Find and print C++ language constructs: classes, methods, functions, etc.
- * Find classes with virtual methods, no virtual destructor, and no bases
- * Find global/static data that are potential problems when using threads
- * Unnecessary forward class declarations
- * Unnecessary function declarations
- * Undeclared function definitions
- * (planned) Find unnecessary header files #included
- - No direct reference to anything in the header
- - Header is unnecessary if classes were forward declared instead
- * (planned) Source files that reference headers not directly #included,
- ie, files that rely on a transitive #include from another header
- * (planned) Unused members (private, protected, & public) methods and data
- * (planned) Store AST in a SQL database so relationships can be queried
-
-AST is Abstract Syntax Tree, a representation of parsed source code.
-http://en.wikipedia.org/wiki/Abstract_syntax_tree
-
-
-System Requirements:
---------------------
- * Python 2.4 or later (2.3 probably works too)
- * Works on Windows (untested), Mac OS X, and Unix
-
-
-How to Run:
------------
- For all examples, it is assumed that cppclean resides in a directory called
- /cppclean.
-
- To print warnings for classes with virtual methods, no virtual destructor and
- no base classes:
-
- /cppclean/run.sh nonvirtual_dtors.py file1.h file2.h file3.cc ...
-
- To print all the functions defined in header file(s):
-
- /cppclean/run.sh functions.py file1.h file2.h ...
-
- All the commands take multiple files on the command line. Other programs
- include: find_warnings, headers, methods, and types. Some other programs
- are available, but used primarily for debugging.
-
- run.sh is a simple wrapper that sets PYTHONPATH to /cppclean and then
- runs the program in /cppclean/cpp/PROGRAM.py. There is currently
- no equivalent for Windows. Contributions for a run.bat file
- would be greatly appreciated.
-
-
-How to Configure:
------------------
- You can add a siteheaders.py file in /cppclean/cpp to configure where
- to look for other headers (typically -I options passed to a compiler).
- Currently two values are supported: _TRANSITIVE and GetIncludeDirs.
- _TRANSITIVE should be set to a boolean value (True or False) indicating
- whether to transitively process all header files. The default is False.
-
- GetIncludeDirs is a function that takes a single argument and returns
- a sequence of directories to include. This can be a generator or
- return a static list.
-
- def GetIncludeDirs(filename):
- return ['/some/path/with/other/headers']
-
- # Here is a more complicated example.
- def GetIncludeDirs(filename):
- yield '/path1'
- yield os.path.join('/path2', os.path.dirname(filename))
- yield '/path3'
-
-
-How to Test:
-------------
- For all examples, it is assumed that cppclean resides in a directory called
- /cppclean. The tests require
-
- cd /cppclean
- make test
- # To generate expected results after a change:
- make expected
-
-
-Current Status:
----------------
- The parser works pretty well for header files, parsing about 99% of Google's
- header files. Anything which inspects structure of C++ source files should
- work reasonably well. Function bodies are not transformed to an AST,
- but left as tokens. Much work is still needed on finding unused header files
- and storing an AST in a database.
-
-
-Non-goals:
-----------
- * Parsing all valid C++ source
- * Handling invalid C++ source gracefully
- * Compiling to machine code (or anything beyond an AST)
-
-
-Contact:
---------
- If you used cppclean, I would love to hear about your experiences
- cppclean@googlegroups.com. Even if you don't use cppclean, I'd like to
- hear from you. :-) (You can contact me directly at: nnorwitz@gmail.com)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/__init__.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/__init__.py
deleted file mode 100755
index e69de29bb..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/__init__.py
+++ /dev/null
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/ast.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/ast.py
deleted file mode 100755
index 6f61f8772..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/ast.py
+++ /dev/null
@@ -1,1723 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007 Neal Norwitz
-# Portions Copyright 2007 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Generate an Abstract Syntax Tree (AST) for C++."""
-
-__author__ = 'nnorwitz@google.com (Neal Norwitz)'
-
-
-# TODO:
-# * Tokens should never be exported, need to convert to Nodes
-# (return types, parameters, etc.)
-# * Handle static class data for templatized classes
-# * Handle casts (both C++ and C-style)
-# * Handle conditions and loops (if/else, switch, for, while/do)
-#
-# TODO much, much later:
-# * Handle #define
-# * exceptions
-
-
-try:
- # Python 3.x
- import builtins
-except ImportError:
- # Python 2.x
- import __builtin__ as builtins
-
-import sys
-import traceback
-
-from cpp import keywords
-from cpp import tokenize
-from cpp import utils
-
-
-if not hasattr(builtins, 'reversed'):
- # Support Python 2.3 and earlier.
- def reversed(seq):
- for i in range(len(seq)-1, -1, -1):
- yield seq[i]
-
-if not hasattr(builtins, 'next'):
- # Support Python 2.5 and earlier.
- def next(obj):
- return obj.next()
-
-
-VISIBILITY_PUBLIC, VISIBILITY_PROTECTED, VISIBILITY_PRIVATE = range(3)
-
-FUNCTION_NONE = 0x00
-FUNCTION_CONST = 0x01
-FUNCTION_VIRTUAL = 0x02
-FUNCTION_PURE_VIRTUAL = 0x04
-FUNCTION_CTOR = 0x08
-FUNCTION_DTOR = 0x10
-FUNCTION_ATTRIBUTE = 0x20
-FUNCTION_UNKNOWN_ANNOTATION = 0x40
-FUNCTION_THROW = 0x80
-
-"""
-These are currently unused. Should really handle these properly at some point.
-
-TYPE_MODIFIER_INLINE = 0x010000
-TYPE_MODIFIER_EXTERN = 0x020000
-TYPE_MODIFIER_STATIC = 0x040000
-TYPE_MODIFIER_CONST = 0x080000
-TYPE_MODIFIER_REGISTER = 0x100000
-TYPE_MODIFIER_VOLATILE = 0x200000
-TYPE_MODIFIER_MUTABLE = 0x400000
-
-TYPE_MODIFIER_MAP = {
- 'inline': TYPE_MODIFIER_INLINE,
- 'extern': TYPE_MODIFIER_EXTERN,
- 'static': TYPE_MODIFIER_STATIC,
- 'const': TYPE_MODIFIER_CONST,
- 'register': TYPE_MODIFIER_REGISTER,
- 'volatile': TYPE_MODIFIER_VOLATILE,
- 'mutable': TYPE_MODIFIER_MUTABLE,
- }
-"""
-
-_INTERNAL_TOKEN = 'internal'
-_NAMESPACE_POP = 'ns-pop'
-
-
-# TODO(nnorwitz): use this as a singleton for templated_types, etc
-# where we don't want to create a new empty dict each time. It is also const.
-class _NullDict(object):
- __contains__ = lambda self: False
- keys = values = items = iterkeys = itervalues = iteritems = lambda self: ()
-
-
-# TODO(nnorwitz): move AST nodes into a separate module.
-class Node(object):
- """Base AST node."""
-
- def __init__(self, start, end):
- self.start = start
- self.end = end
-
- def IsDeclaration(self):
- """Returns bool if this node is a declaration."""
- return False
-
- def IsDefinition(self):
- """Returns bool if this node is a definition."""
- return False
-
- def IsExportable(self):
- """Returns bool if this node exportable from a header file."""
- return False
-
- def Requires(self, node):
- """Does this AST node require the definition of the node passed in?"""
- return False
-
- def XXX__str__(self):
- return self._StringHelper(self.__class__.__name__, '')
-
- def _StringHelper(self, name, suffix):
- if not utils.DEBUG:
- return '%s(%s)' % (name, suffix)
- return '%s(%d, %d, %s)' % (name, self.start, self.end, suffix)
-
- def __repr__(self):
- return str(self)
-
-
-class Define(Node):
- def __init__(self, start, end, name, definition):
- Node.__init__(self, start, end)
- self.name = name
- self.definition = definition
-
- def __str__(self):
- value = '%s %s' % (self.name, self.definition)
- return self._StringHelper(self.__class__.__name__, value)
-
-
-class Include(Node):
- def __init__(self, start, end, filename, system):
- Node.__init__(self, start, end)
- self.filename = filename
- self.system = system
-
- def __str__(self):
- fmt = '"%s"'
- if self.system:
- fmt = '<%s>'
- return self._StringHelper(self.__class__.__name__, fmt % self.filename)
-
-
-class Goto(Node):
- def __init__(self, start, end, label):
- Node.__init__(self, start, end)
- self.label = label
-
- def __str__(self):
- return self._StringHelper(self.__class__.__name__, str(self.label))
-
-
-class Expr(Node):
- def __init__(self, start, end, expr):
- Node.__init__(self, start, end)
- self.expr = expr
-
- def Requires(self, node):
- # TODO(nnorwitz): impl.
- return False
-
- def __str__(self):
- return self._StringHelper(self.__class__.__name__, str(self.expr))
-
-
-class Return(Expr):
- pass
-
-
-class Delete(Expr):
- pass
-
-
-class Friend(Expr):
- def __init__(self, start, end, expr, namespace):
- Expr.__init__(self, start, end, expr)
- self.namespace = namespace[:]
-
-
-class Using(Node):
- def __init__(self, start, end, names):
- Node.__init__(self, start, end)
- self.names = names
-
- def __str__(self):
- return self._StringHelper(self.__class__.__name__, str(self.names))
-
-
-class Parameter(Node):
- def __init__(self, start, end, name, parameter_type, default):
- Node.__init__(self, start, end)
- self.name = name
- self.type = parameter_type
- self.default = default
-
- def Requires(self, node):
- # TODO(nnorwitz): handle namespaces, etc.
- return self.type.name == node.name
-
- def __str__(self):
- name = str(self.type)
- suffix = '%s %s' % (name, self.name)
- if self.default:
- suffix += ' = ' + ''.join([d.name for d in self.default])
- return self._StringHelper(self.__class__.__name__, suffix)
-
-
-class _GenericDeclaration(Node):
- def __init__(self, start, end, name, namespace):
- Node.__init__(self, start, end)
- self.name = name
- self.namespace = namespace[:]
-
- def FullName(self):
- prefix = ''
- if self.namespace and self.namespace[-1]:
- prefix = '::'.join(self.namespace) + '::'
- return prefix + self.name
-
- def _TypeStringHelper(self, suffix):
- if self.namespace:
- names = [n or '<anonymous>' for n in self.namespace]
- suffix += ' in ' + '::'.join(names)
- return self._StringHelper(self.__class__.__name__, suffix)
-
-
-# TODO(nnorwitz): merge with Parameter in some way?
-class VariableDeclaration(_GenericDeclaration):
- def __init__(self, start, end, name, var_type, initial_value, namespace):
- _GenericDeclaration.__init__(self, start, end, name, namespace)
- self.type = var_type
- self.initial_value = initial_value
-
- def Requires(self, node):
- # TODO(nnorwitz): handle namespaces, etc.
- return self.type.name == node.name
-
- def ToString(self):
- """Return a string that tries to reconstitute the variable decl."""
- suffix = '%s %s' % (self.type, self.name)
- if self.initial_value:
- suffix += ' = ' + self.initial_value
- return suffix
-
- def __str__(self):
- return self._StringHelper(self.__class__.__name__, self.ToString())
-
-
-class Typedef(_GenericDeclaration):
- def __init__(self, start, end, name, alias, namespace):
- _GenericDeclaration.__init__(self, start, end, name, namespace)
- self.alias = alias
-
- def IsDefinition(self):
- return True
-
- def IsExportable(self):
- return True
-
- def Requires(self, node):
- # TODO(nnorwitz): handle namespaces, etc.
- name = node.name
- for token in self.alias:
- if token is not None and name == token.name:
- return True
- return False
-
- def __str__(self):
- suffix = '%s, %s' % (self.name, self.alias)
- return self._TypeStringHelper(suffix)
-
-
-class _NestedType(_GenericDeclaration):
- def __init__(self, start, end, name, fields, namespace):
- _GenericDeclaration.__init__(self, start, end, name, namespace)
- self.fields = fields
-
- def IsDefinition(self):
- return True
-
- def IsExportable(self):
- return True
-
- def __str__(self):
- suffix = '%s, {%s}' % (self.name, self.fields)
- return self._TypeStringHelper(suffix)
-
-
-class Union(_NestedType):
- pass
-
-
-class Enum(_NestedType):
- pass
-
-
-class Class(_GenericDeclaration):
- def __init__(self, start, end, name, bases, templated_types, body, namespace):
- _GenericDeclaration.__init__(self, start, end, name, namespace)
- self.bases = bases
- self.body = body
- self.templated_types = templated_types
-
- def IsDeclaration(self):
- return self.bases is None and self.body is None
-
- def IsDefinition(self):
- return not self.IsDeclaration()
-
- def IsExportable(self):
- return not self.IsDeclaration()
-
- def Requires(self, node):
- # TODO(nnorwitz): handle namespaces, etc.
- if self.bases:
- for token_list in self.bases:
- # TODO(nnorwitz): bases are tokens, do name comparision.
- for token in token_list:
- if token.name == node.name:
- return True
- # TODO(nnorwitz): search in body too.
- return False
-
- def __str__(self):
- name = self.name
- if self.templated_types:
- name += '<%s>' % self.templated_types
- suffix = '%s, %s, %s' % (name, self.bases, self.body)
- return self._TypeStringHelper(suffix)
-
-
-class Struct(Class):
- pass
-
-
-class Function(_GenericDeclaration):
- def __init__(self, start, end, name, return_type, parameters,
- modifiers, templated_types, body, namespace):
- _GenericDeclaration.__init__(self, start, end, name, namespace)
- converter = TypeConverter(namespace)
- self.return_type = converter.CreateReturnType(return_type)
- self.parameters = converter.ToParameters(parameters)
- self.modifiers = modifiers
- self.body = body
- self.templated_types = templated_types
-
- def IsDeclaration(self):
- return self.body is None
-
- def IsDefinition(self):
- return self.body is not None
-
- def IsExportable(self):
- if self.return_type and 'static' in self.return_type.modifiers:
- return False
- return None not in self.namespace
-
- def Requires(self, node):
- if self.parameters:
- # TODO(nnorwitz): parameters are tokens, do name comparision.
- for p in self.parameters:
- if p.name == node.name:
- return True
- # TODO(nnorwitz): search in body too.
- return False
-
- def __str__(self):
- # TODO(nnorwitz): add templated_types.
- suffix = ('%s %s(%s), 0x%02x, %s' %
- (self.return_type, self.name, self.parameters,
- self.modifiers, self.body))
- return self._TypeStringHelper(suffix)
-
-
-class Method(Function):
- def __init__(self, start, end, name, in_class, return_type, parameters,
- modifiers, templated_types, body, namespace):
- Function.__init__(self, start, end, name, return_type, parameters,
- modifiers, templated_types, body, namespace)
- # TODO(nnorwitz): in_class could also be a namespace which can
- # mess up finding functions properly.
- self.in_class = in_class
-
-
-class Type(_GenericDeclaration):
- """Type used for any variable (eg class, primitive, struct, etc)."""
-
- def __init__(self, start, end, name, templated_types, modifiers,
- reference, pointer, array):
- """
- Args:
- name: str name of main type
- templated_types: [Class (Type?)] template type info between <>
- modifiers: [str] type modifiers (keywords) eg, const, mutable, etc.
- reference, pointer, array: bools
- """
- _GenericDeclaration.__init__(self, start, end, name, [])
- self.templated_types = templated_types
- if not name and modifiers:
- self.name = modifiers.pop()
- self.modifiers = modifiers
- self.reference = reference
- self.pointer = pointer
- self.array = array
-
- def __str__(self):
- prefix = ''
- if self.modifiers:
- prefix = ' '.join(self.modifiers) + ' '
- name = str(self.name)
- if self.templated_types:
- name += '<%s>' % self.templated_types
- suffix = prefix + name
- if self.reference:
- suffix += '&'
- if self.pointer:
- suffix += '*'
- if self.array:
- suffix += '[]'
- return self._TypeStringHelper(suffix)
-
- # By definition, Is* are always False. A Type can only exist in
- # some sort of variable declaration, parameter, or return value.
- def IsDeclaration(self):
- return False
-
- def IsDefinition(self):
- return False
-
- def IsExportable(self):
- return False
-
-
-class TypeConverter(object):
-
- def __init__(self, namespace_stack):
- self.namespace_stack = namespace_stack
-
- def _GetTemplateEnd(self, tokens, start):
- count = 1
- end = start
- while 1:
- token = tokens[end]
- end += 1
- if token.name == '<':
- count += 1
- elif token.name == '>':
- count -= 1
- if count == 0:
- break
- return tokens[start:end-1], end
-
- def ToType(self, tokens):
- """Convert [Token,...] to [Class(...), ] useful for base classes.
- For example, code like class Foo : public Bar<x, y> { ... };
- the "Bar<x, y>" portion gets converted to an AST.
-
- Returns:
- [Class(...), ...]
- """
- result = []
- name_tokens = []
- reference = pointer = array = False
-
- def AddType(templated_types):
- # Partition tokens into name and modifier tokens.
- names = []
- modifiers = []
- for t in name_tokens:
- if keywords.IsKeyword(t.name):
- modifiers.append(t.name)
- else:
- names.append(t.name)
- name = ''.join(names)
- result.append(Type(name_tokens[0].start, name_tokens[-1].end,
- name, templated_types, modifiers,
- reference, pointer, array))
- del name_tokens[:]
-
- i = 0
- end = len(tokens)
- while i < end:
- token = tokens[i]
- if token.name == '<':
- new_tokens, new_end = self._GetTemplateEnd(tokens, i+1)
- AddType(self.ToType(new_tokens))
- # If there is a comma after the template, we need to consume
- # that here otherwise it becomes part of the name.
- i = new_end
- reference = pointer = array = False
- elif token.name == ',':
- AddType([])
- reference = pointer = array = False
- elif token.name == '*':
- pointer = True
- elif token.name == '&':
- reference = True
- elif token.name == '[':
- pointer = True
- elif token.name == ']':
- pass
- else:
- name_tokens.append(token)
- i += 1
-
- if name_tokens:
- # No '<' in the tokens, just a simple name and no template.
- AddType([])
- return result
-
- def DeclarationToParts(self, parts, needs_name_removed):
- name = None
- default = []
- if needs_name_removed:
- # Handle default (initial) values properly.
- for i, t in enumerate(parts):
- if t.name == '=':
- default = parts[i+1:]
- name = parts[i-1].name
- if name == ']' and parts[i-2].name == '[':
- name = parts[i-3].name
- i -= 1
- parts = parts[:i-1]
- break
- else:
- if parts[-1].token_type == tokenize.NAME:
- name = parts.pop().name
- else:
- # TODO(nnorwitz): this is a hack that happens for code like
- # Register(Foo<T>); where it thinks this is a function call
- # but it's actually a declaration.
- name = '???'
- modifiers = []
- type_name = []
- other_tokens = []
- templated_types = []
- i = 0
- end = len(parts)
- while i < end:
- p = parts[i]
- if keywords.IsKeyword(p.name):
- modifiers.append(p.name)
- elif p.name == '<':
- templated_tokens, new_end = self._GetTemplateEnd(parts, i+1)
- templated_types = self.ToType(templated_tokens)
- i = new_end - 1
- # Don't add a spurious :: to data members being initialized.
- next_index = i + 1
- if next_index < end and parts[next_index].name == '::':
- i += 1
- elif p.name in ('[', ']', '='):
- # These are handled elsewhere.
- other_tokens.append(p)
- elif p.name not in ('*', '&', '>'):
- # Ensure that names have a space between them.
- if (type_name and type_name[-1].token_type == tokenize.NAME and
- p.token_type == tokenize.NAME):
- type_name.append(tokenize.Token(tokenize.SYNTAX, ' ', 0, 0))
- type_name.append(p)
- else:
- other_tokens.append(p)
- i += 1
- type_name = ''.join([t.name for t in type_name])
- return name, type_name, templated_types, modifiers, default, other_tokens
-
- def ToParameters(self, tokens):
- if not tokens:
- return []
-
- result = []
- name = type_name = ''
- type_modifiers = []
- pointer = reference = array = False
- first_token = None
- default = []
-
- def AddParameter():
- if default:
- del default[0] # Remove flag.
- end = type_modifiers[-1].end
- parts = self.DeclarationToParts(type_modifiers, True)
- (name, type_name, templated_types, modifiers,
- unused_default, unused_other_tokens) = parts
- parameter_type = Type(first_token.start, first_token.end,
- type_name, templated_types, modifiers,
- reference, pointer, array)
- p = Parameter(first_token.start, end, name,
- parameter_type, default)
- result.append(p)
-
- template_count = 0
- for s in tokens:
- if not first_token:
- first_token = s
- if s.name == '<':
- template_count += 1
- elif s.name == '>':
- template_count -= 1
- if template_count > 0:
- type_modifiers.append(s)
- continue
-
- if s.name == ',':
- AddParameter()
- name = type_name = ''
- type_modifiers = []
- pointer = reference = array = False
- first_token = None
- default = []
- elif s.name == '*':
- pointer = True
- elif s.name == '&':
- reference = True
- elif s.name == '[':
- array = True
- elif s.name == ']':
- pass # Just don't add to type_modifiers.
- elif s.name == '=':
- # Got a default value. Add any value (None) as a flag.
- default.append(None)
- elif default:
- default.append(s)
- else:
- type_modifiers.append(s)
- AddParameter()
- return result
-
- def CreateReturnType(self, return_type_seq):
- if not return_type_seq:
- return None
- start = return_type_seq[0].start
- end = return_type_seq[-1].end
- _, name, templated_types, modifiers, default, other_tokens = \
- self.DeclarationToParts(return_type_seq, False)
- names = [n.name for n in other_tokens]
- reference = '&' in names
- pointer = '*' in names
- array = '[' in names
- return Type(start, end, name, templated_types, modifiers,
- reference, pointer, array)
-
- def GetTemplateIndices(self, names):
- # names is a list of strings.
- start = names.index('<')
- end = len(names) - 1
- while end > 0:
- if names[end] == '>':
- break
- end -= 1
- return start, end+1
-
-class AstBuilder(object):
- def __init__(self, token_stream, filename, in_class='', visibility=None,
- namespace_stack=[]):
- self.tokens = token_stream
- self.filename = filename
- # TODO(nnorwitz): use a better data structure (deque) for the queue.
- # Switching directions of the "queue" improved perf by about 25%.
- # Using a deque should be even better since we access from both sides.
- self.token_queue = []
- self.namespace_stack = namespace_stack[:]
- self.in_class = in_class
- if in_class is None:
- self.in_class_name_only = None
- else:
- self.in_class_name_only = in_class.split('::')[-1]
- self.visibility = visibility
- self.in_function = False
- self.current_token = None
- # Keep the state whether we are currently handling a typedef or not.
- self._handling_typedef = False
-
- self.converter = TypeConverter(self.namespace_stack)
-
- def HandleError(self, msg, token):
- printable_queue = list(reversed(self.token_queue[-20:]))
- sys.stderr.write('Got %s in %s @ %s %s\n' %
- (msg, self.filename, token, printable_queue))
-
- def Generate(self):
- while 1:
- token = self._GetNextToken()
- if not token:
- break
-
- # Get the next token.
- self.current_token = token
-
- # Dispatch on the next token type.
- if token.token_type == _INTERNAL_TOKEN:
- if token.name == _NAMESPACE_POP:
- self.namespace_stack.pop()
- continue
-
- try:
- result = self._GenerateOne(token)
- if result is not None:
- yield result
- except:
- self.HandleError('exception', token)
- raise
-
- def _CreateVariable(self, pos_token, name, type_name, type_modifiers,
- ref_pointer_name_seq, templated_types, value=None):
- reference = '&' in ref_pointer_name_seq
- pointer = '*' in ref_pointer_name_seq
- array = '[' in ref_pointer_name_seq
- var_type = Type(pos_token.start, pos_token.end, type_name,
- templated_types, type_modifiers,
- reference, pointer, array)
- return VariableDeclaration(pos_token.start, pos_token.end,
- name, var_type, value, self.namespace_stack)
-
- def _GenerateOne(self, token):
- if token.token_type == tokenize.NAME:
- if (keywords.IsKeyword(token.name) and
- not keywords.IsBuiltinType(token.name)):
- method = getattr(self, 'handle_' + token.name)
- return method()
- elif token.name == self.in_class_name_only:
- # The token name is the same as the class, must be a ctor if
- # there is a paren. Otherwise, it's the return type.
- # Peek ahead to get the next token to figure out which.
- next = self._GetNextToken()
- self._AddBackToken(next)
- if next.token_type == tokenize.SYNTAX and next.name == '(':
- return self._GetMethod([token], FUNCTION_CTOR, None, True)
- # Fall through--handle like any other method.
-
- # Handle data or function declaration/definition.
- syntax = tokenize.SYNTAX
- temp_tokens, last_token = \
- self._GetVarTokensUpTo(syntax, '(', ';', '{', '[')
- temp_tokens.insert(0, token)
- if last_token.name == '(':
- # If there is an assignment before the paren,
- # this is an expression, not a method.
- expr = bool([e for e in temp_tokens if e.name == '='])
- if expr:
- new_temp = self._GetTokensUpTo(tokenize.SYNTAX, ';')
- temp_tokens.append(last_token)
- temp_tokens.extend(new_temp)
- last_token = tokenize.Token(tokenize.SYNTAX, ';', 0, 0)
-
- if last_token.name == '[':
- # Handle array, this isn't a method, unless it's an operator.
- # TODO(nnorwitz): keep the size somewhere.
- # unused_size = self._GetTokensUpTo(tokenize.SYNTAX, ']')
- temp_tokens.append(last_token)
- if temp_tokens[-2].name == 'operator':
- temp_tokens.append(self._GetNextToken())
- else:
- temp_tokens2, last_token = \
- self._GetVarTokensUpTo(tokenize.SYNTAX, ';')
- temp_tokens.extend(temp_tokens2)
-
- if last_token.name == ';':
- # Handle data, this isn't a method.
- parts = self.converter.DeclarationToParts(temp_tokens, True)
- (name, type_name, templated_types, modifiers, default,
- unused_other_tokens) = parts
-
- t0 = temp_tokens[0]
- names = [t.name for t in temp_tokens]
- if templated_types:
- start, end = self.converter.GetTemplateIndices(names)
- names = names[:start] + names[end:]
- default = ''.join([t.name for t in default])
- return self._CreateVariable(t0, name, type_name, modifiers,
- names, templated_types, default)
- if last_token.name == '{':
- self._AddBackTokens(temp_tokens[1:])
- self._AddBackToken(last_token)
- method_name = temp_tokens[0].name
- method = getattr(self, 'handle_' + method_name, None)
- if not method:
- # Must be declaring a variable.
- # TODO(nnorwitz): handle the declaration.
- return None
- return method()
- return self._GetMethod(temp_tokens, 0, None, False)
- elif token.token_type == tokenize.SYNTAX:
- if token.name == '~' and self.in_class:
- # Must be a dtor (probably not in method body).
- token = self._GetNextToken()
- # self.in_class can contain A::Name, but the dtor will only
- # be Name. Make sure to compare against the right value.
- if (token.token_type == tokenize.NAME and
- token.name == self.in_class_name_only):
- return self._GetMethod([token], FUNCTION_DTOR, None, True)
- # TODO(nnorwitz): handle a lot more syntax.
- elif token.token_type == tokenize.PREPROCESSOR:
- # TODO(nnorwitz): handle more preprocessor directives.
- # token starts with a #, so remove it and strip whitespace.
- name = token.name[1:].lstrip()
- if name.startswith('include'):
- # Remove "include".
- name = name[7:].strip()
- assert name
- # Handle #include \<newline> "header-on-second-line.h".
- if name.startswith('\\'):
- name = name[1:].strip()
- assert name[0] in '<"', token
- assert name[-1] in '>"', token
- system = name[0] == '<'
- filename = name[1:-1]
- return Include(token.start, token.end, filename, system)
- if name.startswith('define'):
- # Remove "define".
- name = name[6:].strip()
- assert name
- value = ''
- for i, c in enumerate(name):
- if c.isspace():
- value = name[i:].lstrip()
- name = name[:i]
- break
- return Define(token.start, token.end, name, value)
- if name.startswith('if') and name[2:3].isspace():
- condition = name[3:].strip()
- if condition.startswith('0') or condition.startswith('(0)'):
- self._SkipIf0Blocks()
- return None
-
- def _GetTokensUpTo(self, expected_token_type, expected_token):
- return self._GetVarTokensUpTo(expected_token_type, expected_token)[0]
-
- def _GetVarTokensUpTo(self, expected_token_type, *expected_tokens):
- last_token = self._GetNextToken()
- tokens = []
- while (last_token.token_type != expected_token_type or
- last_token.name not in expected_tokens):
- tokens.append(last_token)
- last_token = self._GetNextToken()
- return tokens, last_token
-
- # TODO(nnorwitz): remove _IgnoreUpTo() it shouldn't be necesary.
- def _IgnoreUpTo(self, token_type, token):
- unused_tokens = self._GetTokensUpTo(token_type, token)
-
- def _SkipIf0Blocks(self):
- count = 1
- while 1:
- token = self._GetNextToken()
- if token.token_type != tokenize.PREPROCESSOR:
- continue
-
- name = token.name[1:].lstrip()
- if name.startswith('endif'):
- count -= 1
- if count == 0:
- break
- elif name.startswith('if'):
- count += 1
-
- def _GetMatchingChar(self, open_paren, close_paren, GetNextToken=None):
- if GetNextToken is None:
- GetNextToken = self._GetNextToken
- # Assumes the current token is open_paren and we will consume
- # and return up to the close_paren.
- count = 1
- token = GetNextToken()
- while 1:
- if token.token_type == tokenize.SYNTAX:
- if token.name == open_paren:
- count += 1
- elif token.name == close_paren:
- count -= 1
- if count == 0:
- break
- yield token
- token = GetNextToken()
- yield token
-
- def _GetParameters(self):
- return self._GetMatchingChar('(', ')')
-
- def GetScope(self):
- return self._GetMatchingChar('{', '}')
-
- def _GetNextToken(self):
- if self.token_queue:
- return self.token_queue.pop()
- return next(self.tokens)
-
- def _AddBackToken(self, token):
- if token.whence == tokenize.WHENCE_STREAM:
- token.whence = tokenize.WHENCE_QUEUE
- self.token_queue.insert(0, token)
- else:
- assert token.whence == tokenize.WHENCE_QUEUE, token
- self.token_queue.append(token)
-
- def _AddBackTokens(self, tokens):
- if tokens:
- if tokens[-1].whence == tokenize.WHENCE_STREAM:
- for token in tokens:
- token.whence = tokenize.WHENCE_QUEUE
- self.token_queue[:0] = reversed(tokens)
- else:
- assert tokens[-1].whence == tokenize.WHENCE_QUEUE, tokens
- self.token_queue.extend(reversed(tokens))
-
- def GetName(self, seq=None):
- """Returns ([tokens], next_token_info)."""
- GetNextToken = self._GetNextToken
- if seq is not None:
- it = iter(seq)
- GetNextToken = lambda: next(it)
- next_token = GetNextToken()
- tokens = []
- last_token_was_name = False
- while (next_token.token_type == tokenize.NAME or
- (next_token.token_type == tokenize.SYNTAX and
- next_token.name in ('::', '<'))):
- # Two NAMEs in a row means the identifier should terminate.
- # It's probably some sort of variable declaration.
- if last_token_was_name and next_token.token_type == tokenize.NAME:
- break
- last_token_was_name = next_token.token_type == tokenize.NAME
- tokens.append(next_token)
- # Handle templated names.
- if next_token.name == '<':
- tokens.extend(self._GetMatchingChar('<', '>', GetNextToken))
- last_token_was_name = True
- next_token = GetNextToken()
- return tokens, next_token
-
- def GetMethod(self, modifiers, templated_types):
- return_type_and_name = self._GetTokensUpTo(tokenize.SYNTAX, '(')
- assert len(return_type_and_name) >= 1
- return self._GetMethod(return_type_and_name, modifiers, templated_types,
- False)
-
- def _GetMethod(self, return_type_and_name, modifiers, templated_types,
- get_paren):
- template_portion = None
- if get_paren:
- token = self._GetNextToken()
- assert token.token_type == tokenize.SYNTAX, token
- if token.name == '<':
- # Handle templatized dtors.
- template_portion = [token]
- template_portion.extend(self._GetMatchingChar('<', '>'))
- token = self._GetNextToken()
- assert token.token_type == tokenize.SYNTAX, token
- assert token.name == '(', token
-
- name = return_type_and_name.pop()
- # Handle templatized ctors.
- if name.name == '>':
- index = 1
- while return_type_and_name[index].name != '<':
- index += 1
- template_portion = return_type_and_name[index:] + [name]
- del return_type_and_name[index:]
- name = return_type_and_name.pop()
- elif name.name == ']':
- rt = return_type_and_name
- assert rt[-1].name == '[', return_type_and_name
- assert rt[-2].name == 'operator', return_type_and_name
- name_seq = return_type_and_name[-2:]
- del return_type_and_name[-2:]
- name = tokenize.Token(tokenize.NAME, 'operator[]',
- name_seq[0].start, name.end)
- # Get the open paren so _GetParameters() below works.
- unused_open_paren = self._GetNextToken()
-
- # TODO(nnorwitz): store template_portion.
- return_type = return_type_and_name
- indices = name
- if return_type:
- indices = return_type[0]
-
- # Force ctor for templatized ctors.
- if name.name == self.in_class and not modifiers:
- modifiers |= FUNCTION_CTOR
- parameters = list(self._GetParameters())
- del parameters[-1] # Remove trailing ')'.
-
- # Handling operator() is especially weird.
- if name.name == 'operator' and not parameters:
- token = self._GetNextToken()
- assert token.name == '(', token
- parameters = list(self._GetParameters())
- del parameters[-1] # Remove trailing ')'.
-
- token = self._GetNextToken()
- while token.token_type == tokenize.NAME:
- modifier_token = token
- token = self._GetNextToken()
- if modifier_token.name == 'const':
- modifiers |= FUNCTION_CONST
- elif modifier_token.name == '__attribute__':
- # TODO(nnorwitz): handle more __attribute__ details.
- modifiers |= FUNCTION_ATTRIBUTE
- assert token.name == '(', token
- # Consume everything between the (parens).
- unused_tokens = list(self._GetMatchingChar('(', ')'))
- token = self._GetNextToken()
- elif modifier_token.name == 'throw':
- modifiers |= FUNCTION_THROW
- assert token.name == '(', token
- # Consume everything between the (parens).
- unused_tokens = list(self._GetMatchingChar('(', ')'))
- token = self._GetNextToken()
- elif modifier_token.name == modifier_token.name.upper():
- # HACK(nnorwitz): assume that all upper-case names
- # are some macro we aren't expanding.
- modifiers |= FUNCTION_UNKNOWN_ANNOTATION
- else:
- self.HandleError('unexpected token', modifier_token)
-
- assert token.token_type == tokenize.SYNTAX, token
- # Handle ctor initializers.
- if token.name == ':':
- # TODO(nnorwitz): anything else to handle for initializer list?
- while token.name != ';' and token.name != '{':
- token = self._GetNextToken()
-
- # Handle pointer to functions that are really data but look
- # like method declarations.
- if token.name == '(':
- if parameters[0].name == '*':
- # name contains the return type.
- name = parameters.pop()
- # parameters contains the name of the data.
- modifiers = [p.name for p in parameters]
- # Already at the ( to open the parameter list.
- function_parameters = list(self._GetMatchingChar('(', ')'))
- del function_parameters[-1] # Remove trailing ')'.
- # TODO(nnorwitz): store the function_parameters.
- token = self._GetNextToken()
- assert token.token_type == tokenize.SYNTAX, token
- assert token.name == ';', token
- return self._CreateVariable(indices, name.name, indices.name,
- modifiers, '', None)
- # At this point, we got something like:
- # return_type (type::*name_)(params);
- # This is a data member called name_ that is a function pointer.
- # With this code: void (sq_type::*field_)(string&);
- # We get: name=void return_type=[] parameters=sq_type ... field_
- # TODO(nnorwitz): is return_type always empty?
- # TODO(nnorwitz): this isn't even close to being correct.
- # Just put in something so we don't crash and can move on.
- real_name = parameters[-1]
- modifiers = [p.name for p in self._GetParameters()]
- del modifiers[-1] # Remove trailing ')'.
- return self._CreateVariable(indices, real_name.name, indices.name,
- modifiers, '', None)
-
- if token.name == '{':
- body = list(self.GetScope())
- del body[-1] # Remove trailing '}'.
- else:
- body = None
- if token.name == '=':
- token = self._GetNextToken()
- assert token.token_type == tokenize.CONSTANT, token
- assert token.name == '0', token
- modifiers |= FUNCTION_PURE_VIRTUAL
- token = self._GetNextToken()
-
- if token.name == '[':
- # TODO(nnorwitz): store tokens and improve parsing.
- # template <typename T, size_t N> char (&ASH(T (&seq)[N]))[N];
- tokens = list(self._GetMatchingChar('[', ']'))
- token = self._GetNextToken()
-
- assert token.name == ';', (token, return_type_and_name, parameters)
-
- # Looks like we got a method, not a function.
- if len(return_type) > 2 and return_type[-1].name == '::':
- return_type, in_class = \
- self._GetReturnTypeAndClassName(return_type)
- return Method(indices.start, indices.end, name.name, in_class,
- return_type, parameters, modifiers, templated_types,
- body, self.namespace_stack)
- return Function(indices.start, indices.end, name.name, return_type,
- parameters, modifiers, templated_types, body,
- self.namespace_stack)
-
- def _GetReturnTypeAndClassName(self, token_seq):
- # Splitting the return type from the class name in a method
- # can be tricky. For example, Return::Type::Is::Hard::To::Find().
- # Where is the return type and where is the class name?
- # The heuristic used is to pull the last name as the class name.
- # This includes all the templated type info.
- # TODO(nnorwitz): if there is only One name like in the
- # example above, punt and assume the last bit is the class name.
-
- # Ignore a :: prefix, if exists so we can find the first real name.
- i = 0
- if token_seq[0].name == '::':
- i = 1
- # Ignore a :: suffix, if exists.
- end = len(token_seq) - 1
- if token_seq[end-1].name == '::':
- end -= 1
-
- # Make a copy of the sequence so we can append a sentinel
- # value. This is required for GetName will has to have some
- # terminating condition beyond the last name.
- seq_copy = token_seq[i:end]
- seq_copy.append(tokenize.Token(tokenize.SYNTAX, '', 0, 0))
- names = []
- while i < end:
- # Iterate through the sequence parsing out each name.
- new_name, next = self.GetName(seq_copy[i:])
- assert new_name, 'Got empty new_name, next=%s' % next
- # We got a pointer or ref. Add it to the name.
- if next and next.token_type == tokenize.SYNTAX:
- new_name.append(next)
- names.append(new_name)
- i += len(new_name)
-
- # Now that we have the names, it's time to undo what we did.
-
- # Remove the sentinel value.
- names[-1].pop()
- # Flatten the token sequence for the return type.
- return_type = [e for seq in names[:-1] for e in seq]
- # The class name is the last name.
- class_name = names[-1]
- return return_type, class_name
-
- def handle_bool(self):
- pass
-
- def handle_char(self):
- pass
-
- def handle_int(self):
- pass
-
- def handle_long(self):
- pass
-
- def handle_short(self):
- pass
-
- def handle_double(self):
- pass
-
- def handle_float(self):
- pass
-
- def handle_void(self):
- pass
-
- def handle_wchar_t(self):
- pass
-
- def handle_unsigned(self):
- pass
-
- def handle_signed(self):
- pass
-
- def _GetNestedType(self, ctor):
- name = None
- name_tokens, token = self.GetName()
- if name_tokens:
- name = ''.join([t.name for t in name_tokens])
-
- # Handle forward declarations.
- if token.token_type == tokenize.SYNTAX and token.name == ';':
- return ctor(token.start, token.end, name, None,
- self.namespace_stack)
-
- if token.token_type == tokenize.NAME and self._handling_typedef:
- self._AddBackToken(token)
- return ctor(token.start, token.end, name, None,
- self.namespace_stack)
-
- # Must be the type declaration.
- fields = list(self._GetMatchingChar('{', '}'))
- del fields[-1] # Remove trailing '}'.
- if token.token_type == tokenize.SYNTAX and token.name == '{':
- next = self._GetNextToken()
- new_type = ctor(token.start, token.end, name, fields,
- self.namespace_stack)
- # A name means this is an anonymous type and the name
- # is the variable declaration.
- if next.token_type != tokenize.NAME:
- return new_type
- name = new_type
- token = next
-
- # Must be variable declaration using the type prefixed with keyword.
- assert token.token_type == tokenize.NAME, token
- return self._CreateVariable(token, token.name, name, [], '', None)
-
- def handle_struct(self):
- # Special case the handling typedef/aliasing of structs here.
- # It would be a pain to handle in the class code.
- name_tokens, var_token = self.GetName()
- if name_tokens:
- next_token = self._GetNextToken()
- is_syntax = (var_token.token_type == tokenize.SYNTAX and
- var_token.name[0] in '*&')
- is_variable = (var_token.token_type == tokenize.NAME and
- next_token.name == ';')
- variable = var_token
- if is_syntax and not is_variable:
- variable = next_token
- temp = self._GetNextToken()
- if temp.token_type == tokenize.SYNTAX and temp.name == '(':
- # Handle methods declared to return a struct.
- t0 = name_tokens[0]
- struct = tokenize.Token(tokenize.NAME, 'struct',
- t0.start-7, t0.start-2)
- type_and_name = [struct]
- type_and_name.extend(name_tokens)
- type_and_name.extend((var_token, next_token))
- return self._GetMethod(type_and_name, 0, None, False)
- assert temp.name == ';', (temp, name_tokens, var_token)
- if is_syntax or (is_variable and not self._handling_typedef):
- modifiers = ['struct']
- type_name = ''.join([t.name for t in name_tokens])
- position = name_tokens[0]
- return self._CreateVariable(position, variable.name, type_name,
- modifiers, var_token.name, None)
- name_tokens.extend((var_token, next_token))
- self._AddBackTokens(name_tokens)
- else:
- self._AddBackToken(var_token)
- return self._GetClass(Struct, VISIBILITY_PUBLIC, None)
-
- def handle_union(self):
- return self._GetNestedType(Union)
-
- def handle_enum(self):
- return self._GetNestedType(Enum)
-
- def handle_auto(self):
- # TODO(nnorwitz): warn about using auto? Probably not since it
- # will be reclaimed and useful for C++0x.
- pass
-
- def handle_register(self):
- pass
-
- def handle_const(self):
- pass
-
- def handle_inline(self):
- pass
-
- def handle_extern(self):
- pass
-
- def handle_static(self):
- pass
-
- def handle_virtual(self):
- # What follows must be a method.
- token = token2 = self._GetNextToken()
- if token.name == 'inline':
- # HACK(nnorwitz): handle inline dtors by ignoring 'inline'.
- token2 = self._GetNextToken()
- if token2.token_type == tokenize.SYNTAX and token2.name == '~':
- return self.GetMethod(FUNCTION_VIRTUAL + FUNCTION_DTOR, None)
- assert token.token_type == tokenize.NAME or token.name == '::', token
- return_type_and_name = self._GetTokensUpTo(tokenize.SYNTAX, '(')
- return_type_and_name.insert(0, token)
- if token2 is not token:
- return_type_and_name.insert(1, token2)
- return self._GetMethod(return_type_and_name, FUNCTION_VIRTUAL,
- None, False)
-
- def handle_volatile(self):
- pass
-
- def handle_mutable(self):
- pass
-
- def handle_public(self):
- assert self.in_class
- self.visibility = VISIBILITY_PUBLIC
-
- def handle_protected(self):
- assert self.in_class
- self.visibility = VISIBILITY_PROTECTED
-
- def handle_private(self):
- assert self.in_class
- self.visibility = VISIBILITY_PRIVATE
-
- def handle_friend(self):
- tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';')
- assert tokens
- t0 = tokens[0]
- return Friend(t0.start, t0.end, tokens, self.namespace_stack)
-
- def handle_static_cast(self):
- pass
-
- def handle_const_cast(self):
- pass
-
- def handle_dynamic_cast(self):
- pass
-
- def handle_reinterpret_cast(self):
- pass
-
- def handle_new(self):
- pass
-
- def handle_delete(self):
- tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';')
- assert tokens
- return Delete(tokens[0].start, tokens[0].end, tokens)
-
- def handle_typedef(self):
- token = self._GetNextToken()
- if (token.token_type == tokenize.NAME and
- keywords.IsKeyword(token.name)):
- # Token must be struct/enum/union/class.
- method = getattr(self, 'handle_' + token.name)
- self._handling_typedef = True
- tokens = [method()]
- self._handling_typedef = False
- else:
- tokens = [token]
-
- # Get the remainder of the typedef up to the semi-colon.
- tokens.extend(self._GetTokensUpTo(tokenize.SYNTAX, ';'))
-
- # TODO(nnorwitz): clean all this up.
- assert tokens
- name = tokens.pop()
- indices = name
- if tokens:
- indices = tokens[0]
- if not indices:
- indices = token
- if name.name == ')':
- # HACK(nnorwitz): Handle pointers to functions "properly".
- if (len(tokens) >= 4 and
- tokens[1].name == '(' and tokens[2].name == '*'):
- tokens.append(name)
- name = tokens[3]
- elif name.name == ']':
- # HACK(nnorwitz): Handle arrays properly.
- if len(tokens) >= 2:
- tokens.append(name)
- name = tokens[1]
- new_type = tokens
- if tokens and isinstance(tokens[0], tokenize.Token):
- new_type = self.converter.ToType(tokens)[0]
- return Typedef(indices.start, indices.end, name.name,
- new_type, self.namespace_stack)
-
- def handle_typeid(self):
- pass # Not needed yet.
-
- def handle_typename(self):
- pass # Not needed yet.
-
- def _GetTemplatedTypes(self):
- result = {}
- tokens = list(self._GetMatchingChar('<', '>'))
- len_tokens = len(tokens) - 1 # Ignore trailing '>'.
- i = 0
- while i < len_tokens:
- key = tokens[i].name
- i += 1
- if keywords.IsKeyword(key) or key == ',':
- continue
- type_name = default = None
- if i < len_tokens:
- i += 1
- if tokens[i-1].name == '=':
- assert i < len_tokens, '%s %s' % (i, tokens)
- default, unused_next_token = self.GetName(tokens[i:])
- i += len(default)
- else:
- if tokens[i-1].name != ',':
- # We got something like: Type variable.
- # Re-adjust the key (variable) and type_name (Type).
- key = tokens[i-1].name
- type_name = tokens[i-2]
-
- result[key] = (type_name, default)
- return result
-
- def handle_template(self):
- token = self._GetNextToken()
- assert token.token_type == tokenize.SYNTAX, token
- assert token.name == '<', token
- templated_types = self._GetTemplatedTypes()
- # TODO(nnorwitz): for now, just ignore the template params.
- token = self._GetNextToken()
- if token.token_type == tokenize.NAME:
- if token.name == 'class':
- return self._GetClass(Class, VISIBILITY_PRIVATE, templated_types)
- elif token.name == 'struct':
- return self._GetClass(Struct, VISIBILITY_PUBLIC, templated_types)
- elif token.name == 'friend':
- return self.handle_friend()
- self._AddBackToken(token)
- tokens, last = self._GetVarTokensUpTo(tokenize.SYNTAX, '(', ';')
- tokens.append(last)
- self._AddBackTokens(tokens)
- if last.name == '(':
- return self.GetMethod(FUNCTION_NONE, templated_types)
- # Must be a variable definition.
- return None
-
- def handle_true(self):
- pass # Nothing to do.
-
- def handle_false(self):
- pass # Nothing to do.
-
- def handle_asm(self):
- pass # Not needed yet.
-
- def handle_class(self):
- return self._GetClass(Class, VISIBILITY_PRIVATE, None)
-
- def _GetBases(self):
- # Get base classes.
- bases = []
- while 1:
- token = self._GetNextToken()
- assert token.token_type == tokenize.NAME, token
- # TODO(nnorwitz): store kind of inheritance...maybe.
- if token.name not in ('public', 'protected', 'private'):
- # If inheritance type is not specified, it is private.
- # Just put the token back so we can form a name.
- # TODO(nnorwitz): it would be good to warn about this.
- self._AddBackToken(token)
- else:
- # Check for virtual inheritance.
- token = self._GetNextToken()
- if token.name != 'virtual':
- self._AddBackToken(token)
- else:
- # TODO(nnorwitz): store that we got virtual for this base.
- pass
- base, next_token = self.GetName()
- bases_ast = self.converter.ToType(base)
- assert len(bases_ast) == 1, bases_ast
- bases.append(bases_ast[0])
- assert next_token.token_type == tokenize.SYNTAX, next_token
- if next_token.name == '{':
- token = next_token
- break
- # Support multiple inheritance.
- assert next_token.name == ',', next_token
- return bases, token
-
- def _GetClass(self, class_type, visibility, templated_types):
- class_name = None
- class_token = self._GetNextToken()
- if class_token.token_type != tokenize.NAME:
- assert class_token.token_type == tokenize.SYNTAX, class_token
- token = class_token
- else:
- # Skip any macro (e.g. storage class specifiers) after the
- # 'class' keyword.
- next_token = self._GetNextToken()
- if next_token.token_type == tokenize.NAME:
- self._AddBackToken(next_token)
- else:
- self._AddBackTokens([class_token, next_token])
- name_tokens, token = self.GetName()
- class_name = ''.join([t.name for t in name_tokens])
- bases = None
- if token.token_type == tokenize.SYNTAX:
- if token.name == ';':
- # Forward declaration.
- return class_type(class_token.start, class_token.end,
- class_name, None, templated_types, None,
- self.namespace_stack)
- if token.name in '*&':
- # Inline forward declaration. Could be method or data.
- name_token = self._GetNextToken()
- next_token = self._GetNextToken()
- if next_token.name == ';':
- # Handle data
- modifiers = ['class']
- return self._CreateVariable(class_token, name_token.name,
- class_name,
- modifiers, token.name, None)
- else:
- # Assume this is a method.
- tokens = (class_token, token, name_token, next_token)
- self._AddBackTokens(tokens)
- return self.GetMethod(FUNCTION_NONE, None)
- if token.name == ':':
- bases, token = self._GetBases()
-
- body = None
- if token.token_type == tokenize.SYNTAX and token.name == '{':
- assert token.token_type == tokenize.SYNTAX, token
- assert token.name == '{', token
-
- ast = AstBuilder(self.GetScope(), self.filename, class_name,
- visibility, self.namespace_stack)
- body = list(ast.Generate())
-
- if not self._handling_typedef:
- token = self._GetNextToken()
- if token.token_type != tokenize.NAME:
- assert token.token_type == tokenize.SYNTAX, token
- assert token.name == ';', token
- else:
- new_class = class_type(class_token.start, class_token.end,
- class_name, bases, None,
- body, self.namespace_stack)
-
- modifiers = []
- return self._CreateVariable(class_token,
- token.name, new_class,
- modifiers, token.name, None)
- else:
- if not self._handling_typedef:
- self.HandleError('non-typedef token', token)
- self._AddBackToken(token)
-
- return class_type(class_token.start, class_token.end, class_name,
- bases, None, body, self.namespace_stack)
-
- def handle_namespace(self):
- token = self._GetNextToken()
- # Support anonymous namespaces.
- name = None
- if token.token_type == tokenize.NAME:
- name = token.name
- token = self._GetNextToken()
- self.namespace_stack.append(name)
- assert token.token_type == tokenize.SYNTAX, token
- # Create an internal token that denotes when the namespace is complete.
- internal_token = tokenize.Token(_INTERNAL_TOKEN, _NAMESPACE_POP,
- None, None)
- internal_token.whence = token.whence
- if token.name == '=':
- # TODO(nnorwitz): handle aliasing namespaces.
- name, next_token = self.GetName()
- assert next_token.name == ';', next_token
- self._AddBackToken(internal_token)
- else:
- assert token.name == '{', token
- tokens = list(self.GetScope())
- # Replace the trailing } with the internal namespace pop token.
- tokens[-1] = internal_token
- # Handle namespace with nothing in it.
- self._AddBackTokens(tokens)
- return None
-
- def handle_using(self):
- tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';')
- assert tokens
- return Using(tokens[0].start, tokens[0].end, tokens)
-
- def handle_explicit(self):
- assert self.in_class
- # Nothing much to do.
- # TODO(nnorwitz): maybe verify the method name == class name.
- # This must be a ctor.
- return self.GetMethod(FUNCTION_CTOR, None)
-
- def handle_this(self):
- pass # Nothing to do.
-
- def handle_operator(self):
- # Pull off the next token(s?) and make that part of the method name.
- pass
-
- def handle_sizeof(self):
- pass
-
- def handle_case(self):
- pass
-
- def handle_switch(self):
- pass
-
- def handle_default(self):
- token = self._GetNextToken()
- assert token.token_type == tokenize.SYNTAX
- assert token.name == ':'
-
- def handle_if(self):
- pass
-
- def handle_else(self):
- pass
-
- def handle_return(self):
- tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';')
- if not tokens:
- return Return(self.current_token.start, self.current_token.end, None)
- return Return(tokens[0].start, tokens[0].end, tokens)
-
- def handle_goto(self):
- tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';')
- assert len(tokens) == 1, str(tokens)
- return Goto(tokens[0].start, tokens[0].end, tokens[0].name)
-
- def handle_try(self):
- pass # Not needed yet.
-
- def handle_catch(self):
- pass # Not needed yet.
-
- def handle_throw(self):
- pass # Not needed yet.
-
- def handle_while(self):
- pass
-
- def handle_do(self):
- pass
-
- def handle_for(self):
- pass
-
- def handle_break(self):
- self._IgnoreUpTo(tokenize.SYNTAX, ';')
-
- def handle_continue(self):
- self._IgnoreUpTo(tokenize.SYNTAX, ';')
-
-
-def BuilderFromSource(source, filename):
- """Utility method that returns an AstBuilder from source code.
-
- Args:
- source: 'C++ source code'
- filename: 'file1'
-
- Returns:
- AstBuilder
- """
- return AstBuilder(tokenize.GetTokens(source), filename)
-
-
-def PrintIndentifiers(filename, should_print):
- """Prints all identifiers for a C++ source file.
-
- Args:
- filename: 'file1'
- should_print: predicate with signature: bool Function(token)
- """
- source = utils.ReadFile(filename, False)
- if source is None:
- sys.stderr.write('Unable to find: %s\n' % filename)
- return
-
- #print('Processing %s' % actual_filename)
- builder = BuilderFromSource(source, filename)
- try:
- for node in builder.Generate():
- if should_print(node):
- print(node.name)
- except KeyboardInterrupt:
- return
- except:
- pass
-
-
-def PrintAllIndentifiers(filenames, should_print):
- """Prints all identifiers for each C++ source file in filenames.
-
- Args:
- filenames: ['file1', 'file2', ...]
- should_print: predicate with signature: bool Function(token)
- """
- for path in filenames:
- PrintIndentifiers(path, should_print)
-
-
-def main(argv):
- for filename in argv[1:]:
- source = utils.ReadFile(filename)
- if source is None:
- continue
-
- print('Processing %s' % filename)
- builder = BuilderFromSource(source, filename)
- try:
- entire_ast = filter(None, builder.Generate())
- except KeyboardInterrupt:
- return
- except:
- # Already printed a warning, print the traceback and continue.
- traceback.print_exc()
- else:
- if utils.DEBUG:
- for ast in entire_ast:
- print(ast)
-
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/gmock_class.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/gmock_class.py
deleted file mode 100755
index 645c295b5..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/gmock_class.py
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008 Google Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Generate Google Mock classes from base classes.
-
-This program will read in a C++ source file and output the Google Mock
-classes for the specified classes. If no class is specified, all
-classes in the source file are emitted.
-
-Usage:
- gmock_class.py header-file.h [ClassName]...
-
-Output is sent to stdout.
-"""
-
-__author__ = 'nnorwitz@google.com (Neal Norwitz)'
-
-
-import os
-import re
-import sys
-
-from cpp import ast
-from cpp import utils
-
-# Preserve compatibility with Python 2.3.
-try:
- _dummy = set
-except NameError:
- import sets
- set = sets.Set
-
-_VERSION = (1, 0, 1) # The version of this script.
-# How many spaces to indent. Can set me with the INDENT environment variable.
-_INDENT = 2
-
-
-def _GenerateMethods(output_lines, source, class_node):
- function_type = ast.FUNCTION_VIRTUAL | ast.FUNCTION_PURE_VIRTUAL
- ctor_or_dtor = ast.FUNCTION_CTOR | ast.FUNCTION_DTOR
- indent = ' ' * _INDENT
-
- for node in class_node.body:
- # We only care about virtual functions.
- if (isinstance(node, ast.Function) and
- node.modifiers & function_type and
- not node.modifiers & ctor_or_dtor):
- # Pick out all the elements we need from the original function.
- const = ''
- if node.modifiers & ast.FUNCTION_CONST:
- const = 'CONST_'
- return_type = 'void'
- if node.return_type:
- # Add modifiers like 'const'.
- modifiers = ''
- if node.return_type.modifiers:
- modifiers = ' '.join(node.return_type.modifiers) + ' '
- return_type = modifiers + node.return_type.name
- template_args = [arg.name for arg in node.return_type.templated_types]
- if template_args:
- return_type += '<' + ', '.join(template_args) + '>'
- if len(template_args) > 1:
- for line in [
- '// The following line won\'t really compile, as the return',
- '// type has multiple template arguments. To fix it, use a',
- '// typedef for the return type.']:
- output_lines.append(indent + line)
- if node.return_type.pointer:
- return_type += '*'
- if node.return_type.reference:
- return_type += '&'
- mock_method_macro = 'MOCK_%sMETHOD%d' % (const, len(node.parameters))
- args = ''
- if node.parameters:
- # Get the full text of the parameters from the start
- # of the first parameter to the end of the last parameter.
- start = node.parameters[0].start
- end = node.parameters[-1].end
- # Remove // comments.
- args_strings = re.sub(r'//.*', '', source[start:end])
- # Condense multiple spaces and eliminate newlines putting the
- # parameters together on a single line. Ensure there is a
- # space in an argument which is split by a newline without
- # intervening whitespace, e.g.: int\nBar
- args = re.sub(' +', ' ', args_strings.replace('\n', ' '))
-
- # Create the mock method definition.
- output_lines.extend(['%s%s(%s,' % (indent, mock_method_macro, node.name),
- '%s%s(%s));' % (indent*3, return_type, args)])
-
-
-def _GenerateMocks(filename, source, ast_list, desired_class_names):
- processed_class_names = set()
- lines = []
- for node in ast_list:
- if (isinstance(node, ast.Class) and node.body and
- # desired_class_names being None means that all classes are selected.
- (not desired_class_names or node.name in desired_class_names)):
- class_name = node.name
- processed_class_names.add(class_name)
- class_node = node
- # Add namespace before the class.
- if class_node.namespace:
- lines.extend(['namespace %s {' % n for n in class_node.namespace]) # }
- lines.append('')
-
- # Add the class prolog.
- lines.append('class Mock%s : public %s {' % (class_name, class_name)) # }
- lines.append('%spublic:' % (' ' * (_INDENT // 2)))
-
- # Add all the methods.
- _GenerateMethods(lines, source, class_node)
-
- # Close the class.
- if lines:
- # If there are no virtual methods, no need for a public label.
- if len(lines) == 2:
- del lines[-1]
-
- # Only close the class if there really is a class.
- lines.append('};')
- lines.append('') # Add an extra newline.
-
- # Close the namespace.
- if class_node.namespace:
- for i in range(len(class_node.namespace)-1, -1, -1):
- lines.append('} // namespace %s' % class_node.namespace[i])
- lines.append('') # Add an extra newline.
-
- if desired_class_names:
- missing_class_name_list = list(desired_class_names - processed_class_names)
- if missing_class_name_list:
- missing_class_name_list.sort()
- sys.stderr.write('Class(es) not found in %s: %s\n' %
- (filename, ', '.join(missing_class_name_list)))
- elif not processed_class_names:
- sys.stderr.write('No class found in %s\n' % filename)
-
- return lines
-
-
-def main(argv=sys.argv):
- if len(argv) < 2:
- sys.stderr.write('Google Mock Class Generator v%s\n\n' %
- '.'.join(map(str, _VERSION)))
- sys.stderr.write(__doc__)
- return 1
-
- global _INDENT
- try:
- _INDENT = int(os.environ['INDENT'])
- except KeyError:
- pass
- except:
- sys.stderr.write('Unable to use indent of %s\n' % os.environ.get('INDENT'))
-
- filename = argv[1]
- desired_class_names = None # None means all classes in the source file.
- if len(argv) >= 3:
- desired_class_names = set(argv[2:])
- source = utils.ReadFile(filename)
- if source is None:
- return 1
-
- builder = ast.BuilderFromSource(source, filename)
- try:
- entire_ast = filter(None, builder.Generate())
- except KeyboardInterrupt:
- return
- except:
- # An error message was already printed since we couldn't parse.
- pass
- else:
- lines = _GenerateMocks(filename, source, entire_ast, desired_class_names)
- sys.stdout.write('\n'.join(lines))
-
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/keywords.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/keywords.py
deleted file mode 100755
index f694450e3..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/keywords.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007 Neal Norwitz
-# Portions Copyright 2007 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""C++ keywords and helper utilities for determining keywords."""
-
-__author__ = 'nnorwitz@google.com (Neal Norwitz)'
-
-
-try:
- # Python 3.x
- import builtins
-except ImportError:
- # Python 2.x
- import __builtin__ as builtins
-
-
-if not hasattr(builtins, 'set'):
- # Nominal support for Python 2.3.
- from sets import Set as set
-
-
-TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split())
-TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split())
-ACCESS = set('public protected private friend'.split())
-
-CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split())
-
-OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split())
-OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split())
-
-CONTROL = set('case switch default if else return goto'.split())
-EXCEPTION = set('try catch throw'.split())
-LOOP = set('while do for break continue'.split())
-
-ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP
-
-
-def IsKeyword(token):
- return token in ALL
-
-def IsBuiltinType(token):
- if token in ('virtual', 'inline'):
- # These only apply to methods, they can't be types by themselves.
- return False
- return token in TYPES or token in TYPE_MODIFIERS
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/tokenize.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/tokenize.py
deleted file mode 100755
index 28c334529..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/tokenize.py
+++ /dev/null
@@ -1,287 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007 Neal Norwitz
-# Portions Copyright 2007 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Tokenize C++ source code."""
-
-__author__ = 'nnorwitz@google.com (Neal Norwitz)'
-
-
-try:
- # Python 3.x
- import builtins
-except ImportError:
- # Python 2.x
- import __builtin__ as builtins
-
-
-import sys
-
-from cpp import utils
-
-
-if not hasattr(builtins, 'set'):
- # Nominal support for Python 2.3.
- from sets import Set as set
-
-
-# Add $ as a valid identifier char since so much code uses it.
-_letters = 'abcdefghijklmnopqrstuvwxyz'
-VALID_IDENTIFIER_CHARS = set(_letters + _letters.upper() + '_0123456789$')
-HEX_DIGITS = set('0123456789abcdefABCDEF')
-INT_OR_FLOAT_DIGITS = set('01234567890eE-+')
-
-
-# C++0x string preffixes.
-_STR_PREFIXES = set(('R', 'u8', 'u8R', 'u', 'uR', 'U', 'UR', 'L', 'LR'))
-
-
-# Token types.
-UNKNOWN = 'UNKNOWN'
-SYNTAX = 'SYNTAX'
-CONSTANT = 'CONSTANT'
-NAME = 'NAME'
-PREPROCESSOR = 'PREPROCESSOR'
-
-# Where the token originated from. This can be used for backtracking.
-# It is always set to WHENCE_STREAM in this code.
-WHENCE_STREAM, WHENCE_QUEUE = range(2)
-
-
-class Token(object):
- """Data container to represent a C++ token.
-
- Tokens can be identifiers, syntax char(s), constants, or
- pre-processor directives.
-
- start contains the index of the first char of the token in the source
- end contains the index of the last char of the token in the source
- """
-
- def __init__(self, token_type, name, start, end):
- self.token_type = token_type
- self.name = name
- self.start = start
- self.end = end
- self.whence = WHENCE_STREAM
-
- def __str__(self):
- if not utils.DEBUG:
- return 'Token(%r)' % self.name
- return 'Token(%r, %s, %s)' % (self.name, self.start, self.end)
-
- __repr__ = __str__
-
-
-def _GetString(source, start, i):
- i = source.find('"', i+1)
- while source[i-1] == '\\':
- # Count the trailing backslashes.
- backslash_count = 1
- j = i - 2
- while source[j] == '\\':
- backslash_count += 1
- j -= 1
- # When trailing backslashes are even, they escape each other.
- if (backslash_count % 2) == 0:
- break
- i = source.find('"', i+1)
- return i + 1
-
-
-def _GetChar(source, start, i):
- # NOTE(nnorwitz): may not be quite correct, should be good enough.
- i = source.find("'", i+1)
- while source[i-1] == '\\':
- # Need to special case '\\'.
- if (i - 2) > start and source[i-2] == '\\':
- break
- i = source.find("'", i+1)
- # Try to handle unterminated single quotes (in a #if 0 block).
- if i < 0:
- i = start
- return i + 1
-
-
-def GetTokens(source):
- """Returns a sequence of Tokens.
-
- Args:
- source: string of C++ source code.
-
- Yields:
- Token that represents the next token in the source.
- """
- # Cache various valid character sets for speed.
- valid_identifier_chars = VALID_IDENTIFIER_CHARS
- hex_digits = HEX_DIGITS
- int_or_float_digits = INT_OR_FLOAT_DIGITS
- int_or_float_digits2 = int_or_float_digits | set('.')
-
- # Only ignore errors while in a #if 0 block.
- ignore_errors = False
- count_ifs = 0
-
- i = 0
- end = len(source)
- while i < end:
- # Skip whitespace.
- while i < end and source[i].isspace():
- i += 1
- if i >= end:
- return
-
- token_type = UNKNOWN
- start = i
- c = source[i]
- if c.isalpha() or c == '_': # Find a string token.
- token_type = NAME
- while source[i] in valid_identifier_chars:
- i += 1
- # String and character constants can look like a name if
- # they are something like L"".
- if (source[i] == "'" and (i - start) == 1 and
- source[start:i] in 'uUL'):
- # u, U, and L are valid C++0x character preffixes.
- token_type = CONSTANT
- i = _GetChar(source, start, i)
- elif source[i] == "'" and source[start:i] in _STR_PREFIXES:
- token_type = CONSTANT
- i = _GetString(source, start, i)
- elif c == '/' and source[i+1] == '/': # Find // comments.
- i = source.find('\n', i)
- if i == -1: # Handle EOF.
- i = end
- continue
- elif c == '/' and source[i+1] == '*': # Find /* comments. */
- i = source.find('*/', i) + 2
- continue
- elif c in ':+-<>&|*=': # : or :: (plus other chars).
- token_type = SYNTAX
- i += 1
- new_ch = source[i]
- if new_ch == c:
- i += 1
- elif c == '-' and new_ch == '>':
- i += 1
- elif new_ch == '=':
- i += 1
- elif c in '()[]{}~!?^%;/.,': # Handle single char tokens.
- token_type = SYNTAX
- i += 1
- if c == '.' and source[i].isdigit():
- token_type = CONSTANT
- i += 1
- while source[i] in int_or_float_digits:
- i += 1
- # Handle float suffixes.
- for suffix in ('l', 'f'):
- if suffix == source[i:i+1].lower():
- i += 1
- break
- elif c.isdigit(): # Find integer.
- token_type = CONSTANT
- if c == '0' and source[i+1] in 'xX':
- # Handle hex digits.
- i += 2
- while source[i] in hex_digits:
- i += 1
- else:
- while source[i] in int_or_float_digits2:
- i += 1
- # Handle integer (and float) suffixes.
- for suffix in ('ull', 'll', 'ul', 'l', 'f', 'u'):
- size = len(suffix)
- if suffix == source[i:i+size].lower():
- i += size
- break
- elif c == '"': # Find string.
- token_type = CONSTANT
- i = _GetString(source, start, i)
- elif c == "'": # Find char.
- token_type = CONSTANT
- i = _GetChar(source, start, i)
- elif c == '#': # Find pre-processor command.
- token_type = PREPROCESSOR
- got_if = source[i:i+3] == '#if' and source[i+3:i+4].isspace()
- if got_if:
- count_ifs += 1
- elif source[i:i+6] == '#endif':
- count_ifs -= 1
- if count_ifs == 0:
- ignore_errors = False
-
- # TODO(nnorwitz): handle preprocessor statements (\ continuations).
- while 1:
- i1 = source.find('\n', i)
- i2 = source.find('//', i)
- i3 = source.find('/*', i)
- i4 = source.find('"', i)
- # NOTE(nnorwitz): doesn't handle comments in #define macros.
- # Get the first important symbol (newline, comment, EOF/end).
- i = min([x for x in (i1, i2, i3, i4, end) if x != -1])
-
- # Handle #include "dir//foo.h" properly.
- if source[i] == '"':
- i = source.find('"', i+1) + 1
- assert i > 0
- continue
- # Keep going if end of the line and the line ends with \.
- if not (i == i1 and source[i-1] == '\\'):
- if got_if:
- condition = source[start+4:i].lstrip()
- if (condition.startswith('0') or
- condition.startswith('(0)')):
- ignore_errors = True
- break
- i += 1
- elif c == '\\': # Handle \ in code.
- # This is different from the pre-processor \ handling.
- i += 1
- continue
- elif ignore_errors:
- # The tokenizer seems to be in pretty good shape. This
- # raise is conditionally disabled so that bogus code
- # in an #if 0 block can be handled. Since we will ignore
- # it anyways, this is probably fine. So disable the
- # exception and return the bogus char.
- i += 1
- else:
- sys.stderr.write('Got invalid token in %s @ %d token:%s: %r\n' %
- ('?', i, c, source[i-10:i+10]))
- raise RuntimeError('unexpected token')
-
- if i <= 0:
- print('Invalid index, exiting now.')
- return
- yield Token(token_type, source[start:i], start, i)
-
-
-if __name__ == '__main__':
- def main(argv):
- """Driver mostly for testing purposes."""
- for filename in argv[1:]:
- source = utils.ReadFile(filename)
- if source is None:
- continue
-
- for token in GetTokens(source):
- print('%-12s: %s' % (token.token_type, token.name))
- # print('\r%6.2f%%' % (100.0 * index / token.end),)
- sys.stdout.write('\n')
-
-
- main(sys.argv)
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/utils.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/utils.py
deleted file mode 100755
index eab36eec3..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/cpp/utils.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007 Neal Norwitz
-# Portions Copyright 2007 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Generic utilities for C++ parsing."""
-
-__author__ = 'nnorwitz@google.com (Neal Norwitz)'
-
-
-import sys
-
-
-# Set to True to see the start/end token indices.
-DEBUG = True
-
-
-def ReadFile(filename, print_error=True):
- """Returns the contents of a file."""
- try:
- fp = open(filename)
- try:
- return fp.read()
- finally:
- fp.close()
- except IOError:
- if print_error:
- print('Error reading %s: %s' % (filename, sys.exc_info()[1]))
- return None
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/gmock_gen.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/gmock_gen.py
deleted file mode 100755
index 8cc0d135d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/generator/gmock_gen.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008 Google Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Driver for starting up Google Mock class generator."""
-
-__author__ = 'nnorwitz@google.com (Neal Norwitz)'
-
-import os
-import sys
-
-if __name__ == '__main__':
- # Add the directory of this script to the path so we can import gmock_class.
- sys.path.append(os.path.dirname(__file__))
-
- from cpp import gmock_class
- # Fix the docstring in case they require the usage.
- gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__)
- gmock_class.main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/gmock-config.in b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/gmock-config.in
deleted file mode 100644
index 2baefe94d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/scripts/gmock-config.in
+++ /dev/null
@@ -1,303 +0,0 @@
-#!/bin/sh
-
-# These variables are automatically filled in by the configure script.
-name="@PACKAGE_TARNAME@"
-version="@PACKAGE_VERSION@"
-
-show_usage()
-{
- echo "Usage: gmock-config [OPTIONS...]"
-}
-
-show_help()
-{
- show_usage
- cat <<\EOF
-
-The `gmock-config' script provides access to the necessary compile and linking
-flags to connect with Google C++ Mocking Framework, both in a build prior to
-installation, and on the system proper after installation. The installation
-overrides may be issued in combination with any other queries, but will only
-affect installation queries if called on a built but not installed gmock. The
-installation queries may not be issued with any other types of queries, and
-only one installation query may be made at a time. The version queries and
-compiler flag queries may be combined as desired but not mixed. Different
-version queries are always combined with logical "and" semantics, and only the
-last of any particular query is used while all previous ones ignored. All
-versions must be specified as a sequence of numbers separated by periods.
-Compiler flag queries output the union of the sets of flags when combined.
-
- Examples:
- gmock-config --min-version=1.0 || echo "Insufficient Google Mock version."
-
- g++ $(gmock-config --cppflags --cxxflags) -o foo.o -c foo.cpp
- g++ $(gmock-config --ldflags --libs) -o foo foo.o
-
- # When using a built but not installed Google Mock:
- g++ $(../../my_gmock_build/scripts/gmock-config ...) ...
-
- # When using an installed Google Mock, but with installation overrides:
- export GMOCK_PREFIX="/opt"
- g++ $(gmock-config --libdir="/opt/lib64" ...) ...
-
- Help:
- --usage brief usage information
- --help display this help message
-
- Installation Overrides:
- --prefix=<dir> overrides the installation prefix
- --exec-prefix=<dir> overrides the executable installation prefix
- --libdir=<dir> overrides the library installation prefix
- --includedir=<dir> overrides the header file installation prefix
-
- Installation Queries:
- --prefix installation prefix
- --exec-prefix executable installation prefix
- --libdir library installation directory
- --includedir header file installation directory
- --version the version of the Google Mock installation
-
- Version Queries:
- --min-version=VERSION return 0 if the version is at least VERSION
- --exact-version=VERSION return 0 if the version is exactly VERSION
- --max-version=VERSION return 0 if the version is at most VERSION
-
- Compilation Flag Queries:
- --cppflags compile flags specific to the C-like preprocessors
- --cxxflags compile flags appropriate for C++ programs
- --ldflags linker flags
- --libs libraries for linking
-
-EOF
-}
-
-# This function bounds our version with a min and a max. It uses some clever
-# POSIX-compliant variable expansion to portably do all the work in the shell
-# and avoid any dependency on a particular "sed" or "awk" implementation.
-# Notable is that it will only ever compare the first 3 components of versions.
-# Further components will be cleanly stripped off. All versions must be
-# unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and
-# the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should
-# investigate expanding this via autom4te from AS_VERSION_COMPARE rather than
-# continuing to maintain our own shell version.
-check_versions()
-{
- major_version=${version%%.*}
- minor_version="0"
- point_version="0"
- if test "${version#*.}" != "${version}"; then
- minor_version=${version#*.}
- minor_version=${minor_version%%.*}
- fi
- if test "${version#*.*.}" != "${version}"; then
- point_version=${version#*.*.}
- point_version=${point_version%%.*}
- fi
-
- min_version="$1"
- min_major_version=${min_version%%.*}
- min_minor_version="0"
- min_point_version="0"
- if test "${min_version#*.}" != "${min_version}"; then
- min_minor_version=${min_version#*.}
- min_minor_version=${min_minor_version%%.*}
- fi
- if test "${min_version#*.*.}" != "${min_version}"; then
- min_point_version=${min_version#*.*.}
- min_point_version=${min_point_version%%.*}
- fi
-
- max_version="$2"
- max_major_version=${max_version%%.*}
- max_minor_version="0"
- max_point_version="0"
- if test "${max_version#*.}" != "${max_version}"; then
- max_minor_version=${max_version#*.}
- max_minor_version=${max_minor_version%%.*}
- fi
- if test "${max_version#*.*.}" != "${max_version}"; then
- max_point_version=${max_version#*.*.}
- max_point_version=${max_point_version%%.*}
- fi
-
- test $(($major_version)) -lt $(($min_major_version)) && exit 1
- if test $(($major_version)) -eq $(($min_major_version)); then
- test $(($minor_version)) -lt $(($min_minor_version)) && exit 1
- if test $(($minor_version)) -eq $(($min_minor_version)); then
- test $(($point_version)) -lt $(($min_point_version)) && exit 1
- fi
- fi
-
- test $(($major_version)) -gt $(($max_major_version)) && exit 1
- if test $(($major_version)) -eq $(($max_major_version)); then
- test $(($minor_version)) -gt $(($max_minor_version)) && exit 1
- if test $(($minor_version)) -eq $(($max_minor_version)); then
- test $(($point_version)) -gt $(($max_point_version)) && exit 1
- fi
- fi
-
- exit 0
-}
-
-# Show the usage line when no arguments are specified.
-if test $# -eq 0; then
- show_usage
- exit 1
-fi
-
-while test $# -gt 0; do
- case $1 in
- --usage) show_usage; exit 0;;
- --help) show_help; exit 0;;
-
- # Installation overrides
- --prefix=*) GMOCK_PREFIX=${1#--prefix=};;
- --exec-prefix=*) GMOCK_EXEC_PREFIX=${1#--exec-prefix=};;
- --libdir=*) GMOCK_LIBDIR=${1#--libdir=};;
- --includedir=*) GMOCK_INCLUDEDIR=${1#--includedir=};;
-
- # Installation queries
- --prefix|--exec-prefix|--libdir|--includedir|--version)
- if test -n "${do_query}"; then
- show_usage
- exit 1
- fi
- do_query=${1#--}
- ;;
-
- # Version checking
- --min-version=*)
- do_check_versions=yes
- min_version=${1#--min-version=}
- ;;
- --max-version=*)
- do_check_versions=yes
- max_version=${1#--max-version=}
- ;;
- --exact-version=*)
- do_check_versions=yes
- exact_version=${1#--exact-version=}
- ;;
-
- # Compiler flag output
- --cppflags) echo_cppflags=yes;;
- --cxxflags) echo_cxxflags=yes;;
- --ldflags) echo_ldflags=yes;;
- --libs) echo_libs=yes;;
-
- # Everything else is an error
- *) show_usage; exit 1;;
- esac
- shift
-done
-
-# These have defaults filled in by the configure script but can also be
-# overridden by environment variables or command line parameters.
-prefix="${GMOCK_PREFIX:-@prefix@}"
-exec_prefix="${GMOCK_EXEC_PREFIX:-@exec_prefix@}"
-libdir="${GMOCK_LIBDIR:-@libdir@}"
-includedir="${GMOCK_INCLUDEDIR:-@includedir@}"
-
-# We try and detect if our binary is not located at its installed location. If
-# it's not, we provide variables pointing to the source and build tree rather
-# than to the install tree. We also locate Google Test using the configured
-# gtest-config script rather than searching the PATH and our bindir for one.
-# This allows building against a just-built gmock rather than an installed
-# gmock.
-bindir="@bindir@"
-this_relative_bindir=`dirname $0`
-this_bindir=`cd ${this_relative_bindir}; pwd -P`
-if test "${this_bindir}" = "${this_bindir%${bindir}}"; then
- # The path to the script doesn't end in the bindir sequence from Autoconf,
- # assume that we are in a build tree.
- build_dir=`dirname ${this_bindir}`
- src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P`
-
- # TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we
- # should work to remove it, and/or remove libtool altogether, replacing it
- # with direct references to the library and a link path.
- gmock_libs="${build_dir}/lib/libgmock.la"
- gmock_ldflags=""
-
- # We provide hooks to include from either the source or build dir, where the
- # build dir is always preferred. This will potentially allow us to write
- # build rules for generated headers and have them automatically be preferred
- # over provided versions.
- gmock_cppflags="-I${build_dir}/include -I${src_dir}/include"
- gmock_cxxflags=""
-
- # Directly invoke the gtest-config script used during the build process.
- gtest_config="@GTEST_CONFIG@"
-else
- # We're using an installed gmock, although it may be staged under some
- # prefix. Assume (as our own libraries do) that we can resolve the prefix,
- # and are present in the dynamic link paths.
- gmock_ldflags="-L${libdir}"
- gmock_libs="-l${name}"
- gmock_cppflags="-I${includedir}"
- gmock_cxxflags=""
-
- # We also prefer any gtest-config script installed in our prefix. Lacking
- # one, we look in the PATH for one.
- gtest_config="${bindir}/gtest-config"
- if test ! -x "${gtest_config}"; then
- gtest_config=`which gtest-config`
- fi
-fi
-
-# Ensure that we have located a Google Test to link against.
-if ! test -x "${gtest_config}"; then
- echo "Unable to locate Google Test, check your Google Mock configuration" \
- "and installation" >&2
- exit 1
-elif ! "${gtest_config}" "--exact-version=@GTEST_VERSION@"; then
- echo "The Google Test found is not the same version as Google Mock was " \
- "built against" >&2
- exit 1
-fi
-
-# Add the necessary Google Test bits into the various flag variables
-gmock_cppflags="${gmock_cppflags} `${gtest_config} --cppflags`"
-gmock_cxxflags="${gmock_cxxflags} `${gtest_config} --cxxflags`"
-gmock_ldflags="${gmock_ldflags} `${gtest_config} --ldflags`"
-gmock_libs="${gmock_libs} `${gtest_config} --libs`"
-
-# Do an installation query if requested.
-if test -n "$do_query"; then
- case $do_query in
- prefix) echo $prefix; exit 0;;
- exec-prefix) echo $exec_prefix; exit 0;;
- libdir) echo $libdir; exit 0;;
- includedir) echo $includedir; exit 0;;
- version) echo $version; exit 0;;
- *) show_usage; exit 1;;
- esac
-fi
-
-# Do a version check if requested.
-if test "$do_check_versions" = "yes"; then
- # Make sure we didn't receive a bad combination of parameters.
- test "$echo_cppflags" = "yes" && show_usage && exit 1
- test "$echo_cxxflags" = "yes" && show_usage && exit 1
- test "$echo_ldflags" = "yes" && show_usage && exit 1
- test "$echo_libs" = "yes" && show_usage && exit 1
-
- if test "$exact_version" != ""; then
- check_versions $exact_version $exact_version
- # unreachable
- else
- check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999}
- # unreachable
- fi
-fi
-
-# Do the output in the correct order so that these can be used in-line of
-# a compiler invocation.
-output=""
-test "$echo_cppflags" = "yes" && output="$output $gmock_cppflags"
-test "$echo_cxxflags" = "yes" && output="$output $gmock_cxxflags"
-test "$echo_ldflags" = "yes" && output="$output $gmock_ldflags"
-test "$echo_libs" = "yes" && output="$output $gmock_libs"
-echo $output
-
-exit 0
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-all.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-all.cc
deleted file mode 100644
index 7aebce7af..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-all.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Google C++ Mocking Framework (Google Mock)
-//
-// This file #includes all Google Mock implementation .cc files. The
-// purpose is to allow a user to build Google Mock by compiling this
-// file alone.
-
-// This line ensures that gmock.h can be compiled on its own, even
-// when it's fused.
-#include "gmock/gmock.h"
-
-// The following lines pull in the real gmock *.cc files.
-#include "src/gmock-cardinalities.cc"
-#include "src/gmock-internal-utils.cc"
-#include "src/gmock-matchers.cc"
-#include "src/gmock-spec-builders.cc"
-#include "src/gmock.cc"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-cardinalities.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-cardinalities.cc
deleted file mode 100644
index 1a7902b48..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-cardinalities.cc
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements cardinalities.
-
-#include "gmock/gmock-cardinalities.h"
-
-#include <limits.h>
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-
-namespace {
-
-// Implements the Between(m, n) cardinality.
-class BetweenCardinalityImpl : public CardinalityInterface {
- public:
- BetweenCardinalityImpl(int min, int max)
- : min_(min >= 0 ? min : 0),
- max_(max >= min_ ? max : min_) {
- std::stringstream ss;
- if (min < 0) {
- ss << "The invocation lower bound must be >= 0, "
- << "but is actually " << min << ".";
- internal::Expect(false, __FILE__, __LINE__, ss.str());
- } else if (max < 0) {
- ss << "The invocation upper bound must be >= 0, "
- << "but is actually " << max << ".";
- internal::Expect(false, __FILE__, __LINE__, ss.str());
- } else if (min > max) {
- ss << "The invocation upper bound (" << max
- << ") must be >= the invocation lower bound (" << min
- << ").";
- internal::Expect(false, __FILE__, __LINE__, ss.str());
- }
- }
-
- // Conservative estimate on the lower/upper bound of the number of
- // calls allowed.
- virtual int ConservativeLowerBound() const { return min_; }
- virtual int ConservativeUpperBound() const { return max_; }
-
- virtual bool IsSatisfiedByCallCount(int call_count) const {
- return min_ <= call_count && call_count <= max_ ;
- }
-
- virtual bool IsSaturatedByCallCount(int call_count) const {
- return call_count >= max_;
- }
-
- virtual void DescribeTo(::std::ostream* os) const;
- private:
- const int min_;
- const int max_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(BetweenCardinalityImpl);
-};
-
-// Formats "n times" in a human-friendly way.
-inline internal::string FormatTimes(int n) {
- if (n == 1) {
- return "once";
- } else if (n == 2) {
- return "twice";
- } else {
- std::stringstream ss;
- ss << n << " times";
- return ss.str();
- }
-}
-
-// Describes the Between(m, n) cardinality in human-friendly text.
-void BetweenCardinalityImpl::DescribeTo(::std::ostream* os) const {
- if (min_ == 0) {
- if (max_ == 0) {
- *os << "never called";
- } else if (max_ == INT_MAX) {
- *os << "called any number of times";
- } else {
- *os << "called at most " << FormatTimes(max_);
- }
- } else if (min_ == max_) {
- *os << "called " << FormatTimes(min_);
- } else if (max_ == INT_MAX) {
- *os << "called at least " << FormatTimes(min_);
- } else {
- // 0 < min_ < max_ < INT_MAX
- *os << "called between " << min_ << " and " << max_ << " times";
- }
-}
-
-} // Unnamed namespace
-
-// Describes the given call count to an ostream.
-void Cardinality::DescribeActualCallCountTo(int actual_call_count,
- ::std::ostream* os) {
- if (actual_call_count > 0) {
- *os << "called " << FormatTimes(actual_call_count);
- } else {
- *os << "never called";
- }
-}
-
-// Creates a cardinality that allows at least n calls.
-Cardinality AtLeast(int n) { return Between(n, INT_MAX); }
-
-// Creates a cardinality that allows at most n calls.
-Cardinality AtMost(int n) { return Between(0, n); }
-
-// Creates a cardinality that allows any number of calls.
-Cardinality AnyNumber() { return AtLeast(0); }
-
-// Creates a cardinality that allows between min and max calls.
-Cardinality Between(int min, int max) {
- return Cardinality(new BetweenCardinalityImpl(min, max));
-}
-
-// Creates a cardinality that allows exactly n calls.
-Cardinality Exactly(int n) { return Between(n, n); }
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-internal-utils.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-internal-utils.cc
deleted file mode 100644
index dd38132a7..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-internal-utils.cc
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file defines some utilities useful for implementing Google
-// Mock. They are subject to change without notice, so please DO NOT
-// USE THEM IN USER CODE.
-
-#include "gmock/internal/gmock-internal-utils.h"
-
-#include <ctype.h>
-#include <ostream> // NOLINT
-#include <string>
-#include "gmock/gmock.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-namespace internal {
-
-// Converts an identifier name to a space-separated list of lower-case
-// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
-// treated as one word. For example, both "FooBar123" and
-// "foo_bar_123" are converted to "foo bar 123".
-string ConvertIdentifierNameToWords(const char* id_name) {
- string result;
- char prev_char = '\0';
- for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) {
- // We don't care about the current locale as the input is
- // guaranteed to be a valid C++ identifier name.
- const bool starts_new_word = IsUpper(*p) ||
- (!IsAlpha(prev_char) && IsLower(*p)) ||
- (!IsDigit(prev_char) && IsDigit(*p));
-
- if (IsAlNum(*p)) {
- if (starts_new_word && result != "")
- result += ' ';
- result += ToLower(*p);
- }
- }
- return result;
-}
-
-// This class reports Google Mock failures as Google Test failures. A
-// user can define another class in a similar fashion if he intends to
-// use Google Mock with a testing framework other than Google Test.
-class GoogleTestFailureReporter : public FailureReporterInterface {
- public:
- virtual void ReportFailure(FailureType type, const char* file, int line,
- const string& message) {
- AssertHelper(type == FATAL ?
- TestPartResult::kFatalFailure :
- TestPartResult::kNonFatalFailure,
- file,
- line,
- message.c_str()) = Message();
- if (type == FATAL) {
- posix::Abort();
- }
- }
-};
-
-// Returns the global failure reporter. Will create a
-// GoogleTestFailureReporter and return it the first time called.
-FailureReporterInterface* GetFailureReporter() {
- // Points to the global failure reporter used by Google Mock. gcc
- // guarantees that the following use of failure_reporter is
- // thread-safe. We may need to add additional synchronization to
- // protect failure_reporter if we port Google Mock to other
- // compilers.
- static FailureReporterInterface* const failure_reporter =
- new GoogleTestFailureReporter();
- return failure_reporter;
-}
-
-// Protects global resources (stdout in particular) used by Log().
-static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);
-
-// Returns true iff a log with the given severity is visible according
-// to the --gmock_verbose flag.
-bool LogIsVisible(LogSeverity severity) {
- if (GMOCK_FLAG(verbose) == kInfoVerbosity) {
- // Always show the log if --gmock_verbose=info.
- return true;
- } else if (GMOCK_FLAG(verbose) == kErrorVerbosity) {
- // Always hide it if --gmock_verbose=error.
- return false;
- } else {
- // If --gmock_verbose is neither "info" nor "error", we treat it
- // as "warning" (its default value).
- return severity == WARNING;
- }
-}
-
-// Prints the given message to stdout iff 'severity' >= the level
-// specified by the --gmock_verbose flag. If stack_frames_to_skip >=
-// 0, also prints the stack trace excluding the top
-// stack_frames_to_skip frames. In opt mode, any positive
-// stack_frames_to_skip is treated as 0, since we don't know which
-// function calls will be inlined by the compiler and need to be
-// conservative.
-void Log(LogSeverity severity, const string& message,
- int stack_frames_to_skip) {
- if (!LogIsVisible(severity))
- return;
-
- // Ensures that logs from different threads don't interleave.
- MutexLock l(&g_log_mutex);
-
- // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is a
- // macro.
-
- if (severity == WARNING) {
- // Prints a GMOCK WARNING marker to make the warnings easily searchable.
- std::cout << "\nGMOCK WARNING:";
- }
- // Pre-pends a new-line to message if it doesn't start with one.
- if (message.empty() || message[0] != '\n') {
- std::cout << "\n";
- }
- std::cout << message;
- if (stack_frames_to_skip >= 0) {
-#ifdef NDEBUG
- // In opt mode, we have to be conservative and skip no stack frame.
- const int actual_to_skip = 0;
-#else
- // In dbg mode, we can do what the caller tell us to do (plus one
- // for skipping this function's stack frame).
- const int actual_to_skip = stack_frames_to_skip + 1;
-#endif // NDEBUG
-
- // Appends a new-line to message if it doesn't end with one.
- if (!message.empty() && *message.rbegin() != '\n') {
- std::cout << "\n";
- }
- std::cout << "Stack trace:\n"
- << ::testing::internal::GetCurrentOsStackTraceExceptTop(
- ::testing::UnitTest::GetInstance(), actual_to_skip);
- }
- std::cout << ::std::flush;
-}
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-matchers.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-matchers.cc
deleted file mode 100644
index a5e6824d2..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-matchers.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements Matcher<const string&>, Matcher<string>, and
-// utilities for defining matchers.
-
-#include "gmock/gmock-matchers.h"
-#include "gmock/gmock-generated-matchers.h"
-
-#include <string.h>
-#include <sstream>
-#include <string>
-
-namespace testing {
-
-// Constructs a matcher that matches a const string& whose value is
-// equal to s.
-Matcher<const internal::string&>::Matcher(const internal::string& s) {
- *this = Eq(s);
-}
-
-// Constructs a matcher that matches a const string& whose value is
-// equal to s.
-Matcher<const internal::string&>::Matcher(const char* s) {
- *this = Eq(internal::string(s));
-}
-
-// Constructs a matcher that matches a string whose value is equal to s.
-Matcher<internal::string>::Matcher(const internal::string& s) { *this = Eq(s); }
-
-// Constructs a matcher that matches a string whose value is equal to s.
-Matcher<internal::string>::Matcher(const char* s) {
- *this = Eq(internal::string(s));
-}
-
-namespace internal {
-
-// Joins a vector of strings as if they are fields of a tuple; returns
-// the joined string.
-string JoinAsTuple(const Strings& fields) {
- switch (fields.size()) {
- case 0:
- return "";
- case 1:
- return fields[0];
- default:
- string result = "(" + fields[0];
- for (size_t i = 1; i < fields.size(); i++) {
- result += ", ";
- result += fields[i];
- }
- result += ")";
- return result;
- }
-}
-
-// Returns the description for a matcher defined using the MATCHER*()
-// macro where the user-supplied description string is "", if
-// 'negation' is false; otherwise returns the description of the
-// negation of the matcher. 'param_values' contains a list of strings
-// that are the print-out of the matcher's parameters.
-string FormatMatcherDescription(bool negation, const char* matcher_name,
- const Strings& param_values) {
- string result = ConvertIdentifierNameToWords(matcher_name);
- if (param_values.size() >= 1)
- result += " " + JoinAsTuple(param_values);
- return negation ? "not (" + result + ")" : result;
-}
-
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-spec-builders.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-spec-builders.cc
deleted file mode 100644
index aa33cc44c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock-spec-builders.cc
+++ /dev/null
@@ -1,797 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements the spec builder syntax (ON_CALL and
-// EXPECT_CALL).
-
-#include "gmock/gmock-spec-builders.h"
-
-#include <stdlib.h>
-#include <iostream> // NOLINT
-#include <map>
-#include <set>
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
-# include <unistd.h> // NOLINT
-#endif
-
-namespace testing {
-namespace internal {
-
-// Protects the mock object registry (in class Mock), all function
-// mockers, and all expectations.
-GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex);
-
-// Logs a message including file and line number information.
-void LogWithLocation(testing::internal::LogSeverity severity,
- const char* file, int line,
- const string& message) {
- ::std::ostringstream s;
- s << file << ":" << line << ": " << message << ::std::endl;
- Log(severity, s.str(), 0);
-}
-
-// Constructs an ExpectationBase object.
-ExpectationBase::ExpectationBase(const char* a_file,
- int a_line,
- const string& a_source_text)
- : file_(a_file),
- line_(a_line),
- source_text_(a_source_text),
- cardinality_specified_(false),
- cardinality_(Exactly(1)),
- call_count_(0),
- retired_(false),
- extra_matcher_specified_(false),
- repeated_action_specified_(false),
- retires_on_saturation_(false),
- last_clause_(kNone),
- action_count_checked_(false) {}
-
-// Destructs an ExpectationBase object.
-ExpectationBase::~ExpectationBase() {}
-
-// Explicitly specifies the cardinality of this expectation. Used by
-// the subclasses to implement the .Times() clause.
-void ExpectationBase::SpecifyCardinality(const Cardinality& a_cardinality) {
- cardinality_specified_ = true;
- cardinality_ = a_cardinality;
-}
-
-// Retires all pre-requisites of this expectation.
-void ExpectationBase::RetireAllPreRequisites() {
- if (is_retired()) {
- // We can take this short-cut as we never retire an expectation
- // until we have retired all its pre-requisites.
- return;
- }
-
- for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin();
- it != immediate_prerequisites_.end(); ++it) {
- ExpectationBase* const prerequisite = it->expectation_base().get();
- if (!prerequisite->is_retired()) {
- prerequisite->RetireAllPreRequisites();
- prerequisite->Retire();
- }
- }
-}
-
-// Returns true iff all pre-requisites of this expectation have been
-// satisfied.
-// L >= g_gmock_mutex
-bool ExpectationBase::AllPrerequisitesAreSatisfied() const {
- g_gmock_mutex.AssertHeld();
- for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin();
- it != immediate_prerequisites_.end(); ++it) {
- if (!(it->expectation_base()->IsSatisfied()) ||
- !(it->expectation_base()->AllPrerequisitesAreSatisfied()))
- return false;
- }
- return true;
-}
-
-// Adds unsatisfied pre-requisites of this expectation to 'result'.
-// L >= g_gmock_mutex
-void ExpectationBase::FindUnsatisfiedPrerequisites(
- ExpectationSet* result) const {
- g_gmock_mutex.AssertHeld();
- for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin();
- it != immediate_prerequisites_.end(); ++it) {
- if (it->expectation_base()->IsSatisfied()) {
- // If *it is satisfied and has a call count of 0, some of its
- // pre-requisites may not be satisfied yet.
- if (it->expectation_base()->call_count_ == 0) {
- it->expectation_base()->FindUnsatisfiedPrerequisites(result);
- }
- } else {
- // Now that we know *it is unsatisfied, we are not so interested
- // in whether its pre-requisites are satisfied. Therefore we
- // don't recursively call FindUnsatisfiedPrerequisites() here.
- *result += *it;
- }
- }
-}
-
-// Describes how many times a function call matching this
-// expectation has occurred.
-// L >= g_gmock_mutex
-void ExpectationBase::DescribeCallCountTo(::std::ostream* os) const {
- g_gmock_mutex.AssertHeld();
-
- // Describes how many times the function is expected to be called.
- *os << " Expected: to be ";
- cardinality().DescribeTo(os);
- *os << "\n Actual: ";
- Cardinality::DescribeActualCallCountTo(call_count(), os);
-
- // Describes the state of the expectation (e.g. is it satisfied?
- // is it active?).
- *os << " - " << (IsOverSaturated() ? "over-saturated" :
- IsSaturated() ? "saturated" :
- IsSatisfied() ? "satisfied" : "unsatisfied")
- << " and "
- << (is_retired() ? "retired" : "active");
-}
-
-// Checks the action count (i.e. the number of WillOnce() and
-// WillRepeatedly() clauses) against the cardinality if this hasn't
-// been done before. Prints a warning if there are too many or too
-// few actions.
-// L < mutex_
-void ExpectationBase::CheckActionCountIfNotDone() const {
- bool should_check = false;
- {
- MutexLock l(&mutex_);
- if (!action_count_checked_) {
- action_count_checked_ = true;
- should_check = true;
- }
- }
-
- if (should_check) {
- if (!cardinality_specified_) {
- // The cardinality was inferred - no need to check the action
- // count against it.
- return;
- }
-
- // The cardinality was explicitly specified.
- const int action_count = static_cast<int>(untyped_actions_.size());
- const int upper_bound = cardinality().ConservativeUpperBound();
- const int lower_bound = cardinality().ConservativeLowerBound();
- bool too_many; // True if there are too many actions, or false
- // if there are too few.
- if (action_count > upper_bound ||
- (action_count == upper_bound && repeated_action_specified_)) {
- too_many = true;
- } else if (0 < action_count && action_count < lower_bound &&
- !repeated_action_specified_) {
- too_many = false;
- } else {
- return;
- }
-
- ::std::stringstream ss;
- DescribeLocationTo(&ss);
- ss << "Too " << (too_many ? "many" : "few")
- << " actions specified in " << source_text() << "...\n"
- << "Expected to be ";
- cardinality().DescribeTo(&ss);
- ss << ", but has " << (too_many ? "" : "only ")
- << action_count << " WillOnce()"
- << (action_count == 1 ? "" : "s");
- if (repeated_action_specified_) {
- ss << " and a WillRepeatedly()";
- }
- ss << ".";
- Log(WARNING, ss.str(), -1); // -1 means "don't print stack trace".
- }
-}
-
-// Implements the .Times() clause.
-void ExpectationBase::UntypedTimes(const Cardinality& a_cardinality) {
- if (last_clause_ == kTimes) {
- ExpectSpecProperty(false,
- ".Times() cannot appear "
- "more than once in an EXPECT_CALL().");
- } else {
- ExpectSpecProperty(last_clause_ < kTimes,
- ".Times() cannot appear after "
- ".InSequence(), .WillOnce(), .WillRepeatedly(), "
- "or .RetiresOnSaturation().");
- }
- last_clause_ = kTimes;
-
- SpecifyCardinality(a_cardinality);
-}
-
-// Points to the implicit sequence introduced by a living InSequence
-// object (if any) in the current thread or NULL.
-ThreadLocal<Sequence*> g_gmock_implicit_sequence;
-
-// Reports an uninteresting call (whose description is in msg) in the
-// manner specified by 'reaction'.
-void ReportUninterestingCall(CallReaction reaction, const string& msg) {
- switch (reaction) {
- case ALLOW:
- Log(INFO, msg, 3);
- break;
- case WARN:
- Log(WARNING, msg, 3);
- break;
- default: // FAIL
- Expect(false, NULL, -1, msg);
- }
-}
-
-UntypedFunctionMockerBase::UntypedFunctionMockerBase()
- : mock_obj_(NULL), name_("") {}
-
-UntypedFunctionMockerBase::~UntypedFunctionMockerBase() {}
-
-// Sets the mock object this mock method belongs to, and registers
-// this information in the global mock registry. Will be called
-// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
-// method.
-// L < g_gmock_mutex
-void UntypedFunctionMockerBase::RegisterOwner(const void* mock_obj) {
- {
- MutexLock l(&g_gmock_mutex);
- mock_obj_ = mock_obj;
- }
- Mock::Register(mock_obj, this);
-}
-
-// Sets the mock object this mock method belongs to, and sets the name
-// of the mock function. Will be called upon each invocation of this
-// mock function.
-// L < g_gmock_mutex
-void UntypedFunctionMockerBase::SetOwnerAndName(
- const void* mock_obj, const char* name) {
- // We protect name_ under g_gmock_mutex in case this mock function
- // is called from two threads concurrently.
- MutexLock l(&g_gmock_mutex);
- mock_obj_ = mock_obj;
- name_ = name;
-}
-
-// Returns the name of the function being mocked. Must be called
-// after RegisterOwner() or SetOwnerAndName() has been called.
-// L < g_gmock_mutex
-const void* UntypedFunctionMockerBase::MockObject() const {
- const void* mock_obj;
- {
- // We protect mock_obj_ under g_gmock_mutex in case this mock
- // function is called from two threads concurrently.
- MutexLock l(&g_gmock_mutex);
- Assert(mock_obj_ != NULL, __FILE__, __LINE__,
- "MockObject() must not be called before RegisterOwner() or "
- "SetOwnerAndName() has been called.");
- mock_obj = mock_obj_;
- }
- return mock_obj;
-}
-
-// Returns the name of this mock method. Must be called after
-// SetOwnerAndName() has been called.
-// L < g_gmock_mutex
-const char* UntypedFunctionMockerBase::Name() const {
- const char* name;
- {
- // We protect name_ under g_gmock_mutex in case this mock
- // function is called from two threads concurrently.
- MutexLock l(&g_gmock_mutex);
- Assert(name_ != NULL, __FILE__, __LINE__,
- "Name() must not be called before SetOwnerAndName() has "
- "been called.");
- name = name_;
- }
- return name;
-}
-
-// Calculates the result of invoking this mock function with the given
-// arguments, prints it, and returns it. The caller is responsible
-// for deleting the result.
-// L < g_gmock_mutex
-const UntypedActionResultHolderBase*
-UntypedFunctionMockerBase::UntypedInvokeWith(const void* const untyped_args) {
- if (untyped_expectations_.size() == 0) {
- // No expectation is set on this mock method - we have an
- // uninteresting call.
-
- // We must get Google Mock's reaction on uninteresting calls
- // made on this mock object BEFORE performing the action,
- // because the action may DELETE the mock object and make the
- // following expression meaningless.
- const CallReaction reaction =
- Mock::GetReactionOnUninterestingCalls(MockObject());
-
- // True iff we need to print this call's arguments and return
- // value. This definition must be kept in sync with
- // the behavior of ReportUninterestingCall().
- const bool need_to_report_uninteresting_call =
- // If the user allows this uninteresting call, we print it
- // only when he wants informational messages.
- reaction == ALLOW ? LogIsVisible(INFO) :
- // If the user wants this to be a warning, we print it only
- // when he wants to see warnings.
- reaction == WARN ? LogIsVisible(WARNING) :
- // Otherwise, the user wants this to be an error, and we
- // should always print detailed information in the error.
- true;
-
- if (!need_to_report_uninteresting_call) {
- // Perform the action without printing the call information.
- return this->UntypedPerformDefaultAction(untyped_args, "");
- }
-
- // Warns about the uninteresting call.
- ::std::stringstream ss;
- this->UntypedDescribeUninterestingCall(untyped_args, &ss);
-
- // Calculates the function result.
- const UntypedActionResultHolderBase* const result =
- this->UntypedPerformDefaultAction(untyped_args, ss.str());
-
- // Prints the function result.
- if (result != NULL)
- result->PrintAsActionResult(&ss);
-
- ReportUninterestingCall(reaction, ss.str());
- return result;
- }
-
- bool is_excessive = false;
- ::std::stringstream ss;
- ::std::stringstream why;
- ::std::stringstream loc;
- const void* untyped_action = NULL;
-
- // The UntypedFindMatchingExpectation() function acquires and
- // releases g_gmock_mutex.
- const ExpectationBase* const untyped_expectation =
- this->UntypedFindMatchingExpectation(
- untyped_args, &untyped_action, &is_excessive,
- &ss, &why);
- const bool found = untyped_expectation != NULL;
-
- // True iff we need to print the call's arguments and return value.
- // This definition must be kept in sync with the uses of Expect()
- // and Log() in this function.
- const bool need_to_report_call = !found || is_excessive || LogIsVisible(INFO);
- if (!need_to_report_call) {
- // Perform the action without printing the call information.
- return
- untyped_action == NULL ?
- this->UntypedPerformDefaultAction(untyped_args, "") :
- this->UntypedPerformAction(untyped_action, untyped_args);
- }
-
- ss << " Function call: " << Name();
- this->UntypedPrintArgs(untyped_args, &ss);
-
- // In case the action deletes a piece of the expectation, we
- // generate the message beforehand.
- if (found && !is_excessive) {
- untyped_expectation->DescribeLocationTo(&loc);
- }
-
- const UntypedActionResultHolderBase* const result =
- untyped_action == NULL ?
- this->UntypedPerformDefaultAction(untyped_args, ss.str()) :
- this->UntypedPerformAction(untyped_action, untyped_args);
- if (result != NULL)
- result->PrintAsActionResult(&ss);
- ss << "\n" << why.str();
-
- if (!found) {
- // No expectation matches this call - reports a failure.
- Expect(false, NULL, -1, ss.str());
- } else if (is_excessive) {
- // We had an upper-bound violation and the failure message is in ss.
- Expect(false, untyped_expectation->file(),
- untyped_expectation->line(), ss.str());
- } else {
- // We had an expected call and the matching expectation is
- // described in ss.
- Log(INFO, loc.str() + ss.str(), 2);
- }
-
- return result;
-}
-
-// Returns an Expectation object that references and co-owns exp,
-// which must be an expectation on this mock function.
-Expectation UntypedFunctionMockerBase::GetHandleOf(ExpectationBase* exp) {
- for (UntypedExpectations::const_iterator it =
- untyped_expectations_.begin();
- it != untyped_expectations_.end(); ++it) {
- if (it->get() == exp) {
- return Expectation(*it);
- }
- }
-
- Assert(false, __FILE__, __LINE__, "Cannot find expectation.");
- return Expectation();
- // The above statement is just to make the code compile, and will
- // never be executed.
-}
-
-// Verifies that all expectations on this mock function have been
-// satisfied. Reports one or more Google Test non-fatal failures
-// and returns false if not.
-// L >= g_gmock_mutex
-bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked() {
- g_gmock_mutex.AssertHeld();
- bool expectations_met = true;
- for (UntypedExpectations::const_iterator it =
- untyped_expectations_.begin();
- it != untyped_expectations_.end(); ++it) {
- ExpectationBase* const untyped_expectation = it->get();
- if (untyped_expectation->IsOverSaturated()) {
- // There was an upper-bound violation. Since the error was
- // already reported when it occurred, there is no need to do
- // anything here.
- expectations_met = false;
- } else if (!untyped_expectation->IsSatisfied()) {
- expectations_met = false;
- ::std::stringstream ss;
- ss << "Actual function call count doesn't match "
- << untyped_expectation->source_text() << "...\n";
- // No need to show the source file location of the expectation
- // in the description, as the Expect() call that follows already
- // takes care of it.
- untyped_expectation->MaybeDescribeExtraMatcherTo(&ss);
- untyped_expectation->DescribeCallCountTo(&ss);
- Expect(false, untyped_expectation->file(),
- untyped_expectation->line(), ss.str());
- }
- }
- untyped_expectations_.clear();
- return expectations_met;
-}
-
-} // namespace internal
-
-// Class Mock.
-
-namespace {
-
-typedef std::set<internal::UntypedFunctionMockerBase*> FunctionMockers;
-
-// The current state of a mock object. Such information is needed for
-// detecting leaked mock objects and explicitly verifying a mock's
-// expectations.
-struct MockObjectState {
- MockObjectState()
- : first_used_file(NULL), first_used_line(-1), leakable(false) {}
-
- // Where in the source file an ON_CALL or EXPECT_CALL is first
- // invoked on this mock object.
- const char* first_used_file;
- int first_used_line;
- ::std::string first_used_test_case;
- ::std::string first_used_test;
- bool leakable; // true iff it's OK to leak the object.
- FunctionMockers function_mockers; // All registered methods of the object.
-};
-
-// A global registry holding the state of all mock objects that are
-// alive. A mock object is added to this registry the first time
-// Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It
-// is removed from the registry in the mock object's destructor.
-class MockObjectRegistry {
- public:
- // Maps a mock object (identified by its address) to its state.
- typedef std::map<const void*, MockObjectState> StateMap;
-
- // This destructor will be called when a program exits, after all
- // tests in it have been run. By then, there should be no mock
- // object alive. Therefore we report any living object as test
- // failure, unless the user explicitly asked us to ignore it.
- ~MockObjectRegistry() {
- // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is
- // a macro.
-
- if (!GMOCK_FLAG(catch_leaked_mocks))
- return;
-
- int leaked_count = 0;
- for (StateMap::const_iterator it = states_.begin(); it != states_.end();
- ++it) {
- if (it->second.leakable) // The user said it's fine to leak this object.
- continue;
-
- // TODO(wan@google.com): Print the type of the leaked object.
- // This can help the user identify the leaked object.
- std::cout << "\n";
- const MockObjectState& state = it->second;
- std::cout << internal::FormatFileLocation(state.first_used_file,
- state.first_used_line);
- std::cout << " ERROR: this mock object";
- if (state.first_used_test != "") {
- std::cout << " (used in test " << state.first_used_test_case << "."
- << state.first_used_test << ")";
- }
- std::cout << " should be deleted but never is. Its address is @"
- << it->first << ".";
- leaked_count++;
- }
- if (leaked_count > 0) {
- std::cout << "\nERROR: " << leaked_count
- << " leaked mock " << (leaked_count == 1 ? "object" : "objects")
- << " found at program exit.\n";
- std::cout.flush();
- ::std::cerr.flush();
- // RUN_ALL_TESTS() has already returned when this destructor is
- // called. Therefore we cannot use the normal Google Test
- // failure reporting mechanism.
- _exit(1); // We cannot call exit() as it is not reentrant and
- // may already have been called.
- }
- }
-
- StateMap& states() { return states_; }
- private:
- StateMap states_;
-};
-
-// Protected by g_gmock_mutex.
-MockObjectRegistry g_mock_object_registry;
-
-// Maps a mock object to the reaction Google Mock should have when an
-// uninteresting method is called. Protected by g_gmock_mutex.
-std::map<const void*, internal::CallReaction> g_uninteresting_call_reaction;
-
-// Sets the reaction Google Mock should have when an uninteresting
-// method of the given mock object is called.
-// L < g_gmock_mutex
-void SetReactionOnUninterestingCalls(const void* mock_obj,
- internal::CallReaction reaction) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_uninteresting_call_reaction[mock_obj] = reaction;
-}
-
-} // namespace
-
-// Tells Google Mock to allow uninteresting calls on the given mock
-// object.
-// L < g_gmock_mutex
-void Mock::AllowUninterestingCalls(const void* mock_obj) {
- SetReactionOnUninterestingCalls(mock_obj, internal::ALLOW);
-}
-
-// Tells Google Mock to warn the user about uninteresting calls on the
-// given mock object.
-// L < g_gmock_mutex
-void Mock::WarnUninterestingCalls(const void* mock_obj) {
- SetReactionOnUninterestingCalls(mock_obj, internal::WARN);
-}
-
-// Tells Google Mock to fail uninteresting calls on the given mock
-// object.
-// L < g_gmock_mutex
-void Mock::FailUninterestingCalls(const void* mock_obj) {
- SetReactionOnUninterestingCalls(mock_obj, internal::FAIL);
-}
-
-// Tells Google Mock the given mock object is being destroyed and its
-// entry in the call-reaction table should be removed.
-// L < g_gmock_mutex
-void Mock::UnregisterCallReaction(const void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_uninteresting_call_reaction.erase(mock_obj);
-}
-
-// Returns the reaction Google Mock will have on uninteresting calls
-// made on the given mock object.
-// L < g_gmock_mutex
-internal::CallReaction Mock::GetReactionOnUninterestingCalls(
- const void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- return (g_uninteresting_call_reaction.count(mock_obj) == 0) ?
- internal::WARN : g_uninteresting_call_reaction[mock_obj];
-}
-
-// Tells Google Mock to ignore mock_obj when checking for leaked mock
-// objects.
-// L < g_gmock_mutex
-void Mock::AllowLeak(const void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_mock_object_registry.states()[mock_obj].leakable = true;
-}
-
-// Verifies and clears all expectations on the given mock object. If
-// the expectations aren't satisfied, generates one or more Google
-// Test non-fatal failures and returns false.
-// L < g_gmock_mutex
-bool Mock::VerifyAndClearExpectations(void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- return VerifyAndClearExpectationsLocked(mock_obj);
-}
-
-// Verifies all expectations on the given mock object and clears its
-// default actions and expectations. Returns true iff the
-// verification was successful.
-// L < g_gmock_mutex
-bool Mock::VerifyAndClear(void* mock_obj) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- ClearDefaultActionsLocked(mock_obj);
- return VerifyAndClearExpectationsLocked(mock_obj);
-}
-
-// Verifies and clears all expectations on the given mock object. If
-// the expectations aren't satisfied, generates one or more Google
-// Test non-fatal failures and returns false.
-// L >= g_gmock_mutex
-bool Mock::VerifyAndClearExpectationsLocked(void* mock_obj) {
- internal::g_gmock_mutex.AssertHeld();
- if (g_mock_object_registry.states().count(mock_obj) == 0) {
- // No EXPECT_CALL() was set on the given mock object.
- return true;
- }
-
- // Verifies and clears the expectations on each mock method in the
- // given mock object.
- bool expectations_met = true;
- FunctionMockers& mockers =
- g_mock_object_registry.states()[mock_obj].function_mockers;
- for (FunctionMockers::const_iterator it = mockers.begin();
- it != mockers.end(); ++it) {
- if (!(*it)->VerifyAndClearExpectationsLocked()) {
- expectations_met = false;
- }
- }
-
- // We don't clear the content of mockers, as they may still be
- // needed by ClearDefaultActionsLocked().
- return expectations_met;
-}
-
-// Registers a mock object and a mock method it owns.
-// L < g_gmock_mutex
-void Mock::Register(const void* mock_obj,
- internal::UntypedFunctionMockerBase* mocker) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- g_mock_object_registry.states()[mock_obj].function_mockers.insert(mocker);
-}
-
-// Tells Google Mock where in the source code mock_obj is used in an
-// ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this
-// information helps the user identify which object it is.
-// L < g_gmock_mutex
-void Mock::RegisterUseByOnCallOrExpectCall(
- const void* mock_obj, const char* file, int line) {
- internal::MutexLock l(&internal::g_gmock_mutex);
- MockObjectState& state = g_mock_object_registry.states()[mock_obj];
- if (state.first_used_file == NULL) {
- state.first_used_file = file;
- state.first_used_line = line;
- const TestInfo* const test_info =
- UnitTest::GetInstance()->current_test_info();
- if (test_info != NULL) {
- // TODO(wan@google.com): record the test case name when the
- // ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or
- // TearDownTestCase().
- state.first_used_test_case = test_info->test_case_name();
- state.first_used_test = test_info->name();
- }
- }
-}
-
-// Unregisters a mock method; removes the owning mock object from the
-// registry when the last mock method associated with it has been
-// unregistered. This is called only in the destructor of
-// FunctionMockerBase.
-// L >= g_gmock_mutex
-void Mock::UnregisterLocked(internal::UntypedFunctionMockerBase* mocker) {
- internal::g_gmock_mutex.AssertHeld();
- for (MockObjectRegistry::StateMap::iterator it =
- g_mock_object_registry.states().begin();
- it != g_mock_object_registry.states().end(); ++it) {
- FunctionMockers& mockers = it->second.function_mockers;
- if (mockers.erase(mocker) > 0) {
- // mocker was in mockers and has been just removed.
- if (mockers.empty()) {
- g_mock_object_registry.states().erase(it);
- }
- return;
- }
- }
-}
-
-// Clears all ON_CALL()s set on the given mock object.
-// L >= g_gmock_mutex
-void Mock::ClearDefaultActionsLocked(void* mock_obj) {
- internal::g_gmock_mutex.AssertHeld();
-
- if (g_mock_object_registry.states().count(mock_obj) == 0) {
- // No ON_CALL() was set on the given mock object.
- return;
- }
-
- // Clears the default actions for each mock method in the given mock
- // object.
- FunctionMockers& mockers =
- g_mock_object_registry.states()[mock_obj].function_mockers;
- for (FunctionMockers::const_iterator it = mockers.begin();
- it != mockers.end(); ++it) {
- (*it)->ClearDefaultActionsLocked();
- }
-
- // We don't clear the content of mockers, as they may still be
- // needed by VerifyAndClearExpectationsLocked().
-}
-
-Expectation::Expectation() {}
-
-Expectation::Expectation(
- const internal::linked_ptr<internal::ExpectationBase>& an_expectation_base)
- : expectation_base_(an_expectation_base) {}
-
-Expectation::~Expectation() {}
-
-// Adds an expectation to a sequence.
-void Sequence::AddExpectation(const Expectation& expectation) const {
- if (*last_expectation_ != expectation) {
- if (last_expectation_->expectation_base() != NULL) {
- expectation.expectation_base()->immediate_prerequisites_
- += *last_expectation_;
- }
- *last_expectation_ = expectation;
- }
-}
-
-// Creates the implicit sequence if there isn't one.
-InSequence::InSequence() {
- if (internal::g_gmock_implicit_sequence.get() == NULL) {
- internal::g_gmock_implicit_sequence.set(new Sequence);
- sequence_created_ = true;
- } else {
- sequence_created_ = false;
- }
-}
-
-// Deletes the implicit sequence if it was created by the constructor
-// of this object.
-InSequence::~InSequence() {
- if (sequence_created_) {
- delete internal::g_gmock_implicit_sequence.get();
- internal::g_gmock_implicit_sequence.set(NULL);
- }
-}
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock.cc
deleted file mode 100644
index 700bcb2e8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock.cc
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gmock/gmock.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-
-// TODO(wan@google.com): support using environment variables to
-// control the flag values, like what Google Test does.
-
-GMOCK_DEFINE_bool_(catch_leaked_mocks, true,
- "true iff Google Mock should report leaked mock objects "
- "as failures.");
-
-GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity,
- "Controls how verbose Google Mock's output is."
- " Valid values:\n"
- " info - prints all messages.\n"
- " warning - prints warnings and errors.\n"
- " error - prints errors only.");
-
-namespace internal {
-
-// Parses a string as a command line flag. The string should have the
-// format "--gmock_flag=value". When def_optional is true, the
-// "=value" part can be omitted.
-//
-// Returns the value of the flag, or NULL if the parsing failed.
-static const char* ParseGoogleMockFlagValue(const char* str,
- const char* flag,
- bool def_optional) {
- // str and flag must not be NULL.
- if (str == NULL || flag == NULL) return NULL;
-
- // The flag must start with "--gmock_".
- const String flag_str = String::Format("--gmock_%s", flag);
- const size_t flag_len = flag_str.length();
- if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;
-
- // Skips the flag name.
- const char* flag_end = str + flag_len;
-
- // When def_optional is true, it's OK to not have a "=value" part.
- if (def_optional && (flag_end[0] == '\0')) {
- return flag_end;
- }
-
- // If def_optional is true and there are more characters after the
- // flag name, or if def_optional is false, there must be a '=' after
- // the flag name.
- if (flag_end[0] != '=') return NULL;
-
- // Returns the string after "=".
- return flag_end + 1;
-}
-
-// Parses a string for a Google Mock bool flag, in the form of
-// "--gmock_flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-static bool ParseGoogleMockBoolFlag(const char* str, const char* flag,
- bool* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseGoogleMockFlagValue(str, flag, true);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Converts the string value to a bool.
- *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
- return true;
-}
-
-// Parses a string for a Google Mock string flag, in the form of
-// "--gmock_flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true. On failure, returns false without changing *value.
-static bool ParseGoogleMockStringFlag(const char* str, const char* flag,
- String* value) {
- // Gets the value of the flag as a string.
- const char* const value_str = ParseGoogleMockFlagValue(str, flag, false);
-
- // Aborts if the parsing failed.
- if (value_str == NULL) return false;
-
- // Sets *value to the value of the flag.
- *value = value_str;
- return true;
-}
-
-// The internal implementation of InitGoogleMock().
-//
-// The type parameter CharType can be instantiated to either char or
-// wchar_t.
-template <typename CharType>
-void InitGoogleMockImpl(int* argc, CharType** argv) {
- // Makes sure Google Test is initialized. InitGoogleTest() is
- // idempotent, so it's fine if the user has already called it.
- InitGoogleTest(argc, argv);
- if (*argc <= 0) return;
-
- for (int i = 1; i != *argc; i++) {
- const String arg_string = StreamableToString(argv[i]);
- const char* const arg = arg_string.c_str();
-
- // Do we see a Google Mock flag?
- if (ParseGoogleMockBoolFlag(arg, "catch_leaked_mocks",
- &GMOCK_FLAG(catch_leaked_mocks)) ||
- ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose))) {
- // Yes. Shift the remainder of the argv list left by one. Note
- // that argv has (*argc + 1) elements, the last one always being
- // NULL. The following loop moves the trailing NULL element as
- // well.
- for (int j = i; j != *argc; j++) {
- argv[j] = argv[j + 1];
- }
-
- // Decrements the argument count.
- (*argc)--;
-
- // We also need to decrement the iterator as we just removed
- // an element.
- i--;
- }
- }
-}
-
-} // namespace internal
-
-// Initializes Google Mock. This must be called before running the
-// tests. In particular, it parses a command line for the flags that
-// Google Mock recognizes. Whenever a Google Mock flag is seen, it is
-// removed from argv, and *argc is decremented.
-//
-// No value is returned. Instead, the Google Mock flag variables are
-// updated.
-//
-// Since Google Test is needed for Google Mock to work, this function
-// also initializes Google Test and parses its flags, if that hasn't
-// been done.
-void InitGoogleMock(int* argc, char** argv) {
- internal::InitGoogleMockImpl(argc, argv);
-}
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-void InitGoogleMock(int* argc, wchar_t** argv) {
- internal::InitGoogleMockImpl(argc, argv);
-}
-
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock_main.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock_main.cc
deleted file mode 100644
index 9d8aea224..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/src/gmock_main.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include <iostream>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-// MS C++ compiler/linker has a bug on Windows (not on Windows CE), which
-// causes a link error when _tmain is defined in a static library and UNICODE
-// is enabled. For this reason instead of _tmain, main function is used on
-// Windows. See the following link to track the current status of this bug:
-// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT
-#if GTEST_OS_WINDOWS_MOBILE
-# include <tchar.h> // NOLINT
-
-int _tmain(int argc, TCHAR** argv) {
-#else
-int main(int argc, char** argv) {
-#endif // GTEST_OS_WINDOWS_MOBILE
- std::cout << "Running main() from gmock_main.cc\n";
- // Since Google Mock depends on Google Test, InitGoogleMock() is
- // also responsible for initializing Google Test. Therefore there's
- // no need for calling testing::InitGoogleTest() separately.
- testing::InitGoogleMock(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-actions_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-actions_test.cc
deleted file mode 100644
index b7803fe92..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-actions_test.cc
+++ /dev/null
@@ -1,1305 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the built-in actions.
-
-#include "gmock/gmock-actions.h"
-#include <algorithm>
-#include <iterator>
-#include <string>
-#include "gmock/gmock.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-namespace {
-
-using ::std::tr1::get;
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-using ::std::tr1::tuple_element;
-using testing::internal::BuiltInDefaultValue;
-using testing::internal::Int64;
-using testing::internal::UInt64;
-// This list should be kept sorted.
-using testing::_;
-using testing::Action;
-using testing::ActionInterface;
-using testing::Assign;
-using testing::ByRef;
-using testing::DefaultValue;
-using testing::DoDefault;
-using testing::IgnoreResult;
-using testing::Invoke;
-using testing::InvokeWithoutArgs;
-using testing::MakePolymorphicAction;
-using testing::Ne;
-using testing::PolymorphicAction;
-using testing::Return;
-using testing::ReturnNull;
-using testing::ReturnRef;
-using testing::ReturnRefOfCopy;
-using testing::SetArgPointee;
-using testing::SetArgumentPointee;
-
-#if !GTEST_OS_WINDOWS_MOBILE
-using testing::SetErrnoAndReturn;
-#endif
-
-#if GTEST_HAS_PROTOBUF_
-using testing::internal::TestMessage;
-#endif // GTEST_HAS_PROTOBUF_
-
-// Tests that BuiltInDefaultValue<T*>::Get() returns NULL.
-TEST(BuiltInDefaultValueTest, IsNullForPointerTypes) {
- EXPECT_TRUE(BuiltInDefaultValue<int*>::Get() == NULL);
- EXPECT_TRUE(BuiltInDefaultValue<const char*>::Get() == NULL);
- EXPECT_TRUE(BuiltInDefaultValue<void*>::Get() == NULL);
-}
-
-// Tests that BuiltInDefaultValue<T*>::Exists() return true.
-TEST(BuiltInDefaultValueTest, ExistsForPointerTypes) {
- EXPECT_TRUE(BuiltInDefaultValue<int*>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<const char*>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<void*>::Exists());
-}
-
-// Tests that BuiltInDefaultValue<T>::Get() returns 0 when T is a
-// built-in numeric type.
-TEST(BuiltInDefaultValueTest, IsZeroForNumericTypes) {
- EXPECT_EQ(0U, BuiltInDefaultValue<unsigned char>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<signed char>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<char>::Get());
-#if GMOCK_HAS_SIGNED_WCHAR_T_
- EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
-#endif
-#if GMOCK_WCHAR_T_IS_NATIVE_
- EXPECT_EQ(0, BuiltInDefaultValue<wchar_t>::Get());
-#endif
- EXPECT_EQ(0U, BuiltInDefaultValue<unsigned short>::Get()); // NOLINT
- EXPECT_EQ(0, BuiltInDefaultValue<signed short>::Get()); // NOLINT
- EXPECT_EQ(0, BuiltInDefaultValue<short>::Get()); // NOLINT
- EXPECT_EQ(0U, BuiltInDefaultValue<unsigned int>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<signed int>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<int>::Get());
- EXPECT_EQ(0U, BuiltInDefaultValue<unsigned long>::Get()); // NOLINT
- EXPECT_EQ(0, BuiltInDefaultValue<signed long>::Get()); // NOLINT
- EXPECT_EQ(0, BuiltInDefaultValue<long>::Get()); // NOLINT
- EXPECT_EQ(0U, BuiltInDefaultValue<UInt64>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<Int64>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<float>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<double>::Get());
-}
-
-// Tests that BuiltInDefaultValue<T>::Exists() returns true when T is a
-// built-in numeric type.
-TEST(BuiltInDefaultValueTest, ExistsForNumericTypes) {
- EXPECT_TRUE(BuiltInDefaultValue<unsigned char>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<signed char>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<char>::Exists());
-#if GMOCK_HAS_SIGNED_WCHAR_T_
- EXPECT_TRUE(BuiltInDefaultValue<unsigned wchar_t>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<signed wchar_t>::Exists());
-#endif
-#if GMOCK_WCHAR_T_IS_NATIVE_
- EXPECT_TRUE(BuiltInDefaultValue<wchar_t>::Exists());
-#endif
- EXPECT_TRUE(BuiltInDefaultValue<unsigned short>::Exists()); // NOLINT
- EXPECT_TRUE(BuiltInDefaultValue<signed short>::Exists()); // NOLINT
- EXPECT_TRUE(BuiltInDefaultValue<short>::Exists()); // NOLINT
- EXPECT_TRUE(BuiltInDefaultValue<unsigned int>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<signed int>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<int>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<unsigned long>::Exists()); // NOLINT
- EXPECT_TRUE(BuiltInDefaultValue<signed long>::Exists()); // NOLINT
- EXPECT_TRUE(BuiltInDefaultValue<long>::Exists()); // NOLINT
- EXPECT_TRUE(BuiltInDefaultValue<UInt64>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<Int64>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<float>::Exists());
- EXPECT_TRUE(BuiltInDefaultValue<double>::Exists());
-}
-
-// Tests that BuiltInDefaultValue<bool>::Get() returns false.
-TEST(BuiltInDefaultValueTest, IsFalseForBool) {
- EXPECT_FALSE(BuiltInDefaultValue<bool>::Get());
-}
-
-// Tests that BuiltInDefaultValue<bool>::Exists() returns true.
-TEST(BuiltInDefaultValueTest, BoolExists) {
- EXPECT_TRUE(BuiltInDefaultValue<bool>::Exists());
-}
-
-// Tests that BuiltInDefaultValue<T>::Get() returns "" when T is a
-// string type.
-TEST(BuiltInDefaultValueTest, IsEmptyStringForString) {
-#if GTEST_HAS_GLOBAL_STRING
- EXPECT_EQ("", BuiltInDefaultValue< ::string>::Get());
-#endif // GTEST_HAS_GLOBAL_STRING
-
- EXPECT_EQ("", BuiltInDefaultValue< ::std::string>::Get());
-}
-
-// Tests that BuiltInDefaultValue<T>::Exists() returns true when T is a
-// string type.
-TEST(BuiltInDefaultValueTest, ExistsForString) {
-#if GTEST_HAS_GLOBAL_STRING
- EXPECT_TRUE(BuiltInDefaultValue< ::string>::Exists());
-#endif // GTEST_HAS_GLOBAL_STRING
-
- EXPECT_TRUE(BuiltInDefaultValue< ::std::string>::Exists());
-}
-
-// Tests that BuiltInDefaultValue<const T>::Get() returns the same
-// value as BuiltInDefaultValue<T>::Get() does.
-TEST(BuiltInDefaultValueTest, WorksForConstTypes) {
- EXPECT_EQ("", BuiltInDefaultValue<const std::string>::Get());
- EXPECT_EQ(0, BuiltInDefaultValue<const int>::Get());
- EXPECT_TRUE(BuiltInDefaultValue<char* const>::Get() == NULL);
- EXPECT_FALSE(BuiltInDefaultValue<const bool>::Get());
-}
-
-// Tests that BuiltInDefaultValue<T>::Get() aborts the program with
-// the correct error message when T is a user-defined type.
-struct UserType {
- UserType() : value(0) {}
-
- int value;
-};
-
-TEST(BuiltInDefaultValueTest, UserTypeHasNoDefault) {
- EXPECT_FALSE(BuiltInDefaultValue<UserType>::Exists());
-}
-
-// Tests that BuiltInDefaultValue<T&>::Get() aborts the program.
-TEST(BuiltInDefaultValueDeathTest, IsUndefinedForReferences) {
- EXPECT_DEATH_IF_SUPPORTED({
- BuiltInDefaultValue<int&>::Get();
- }, "");
- EXPECT_DEATH_IF_SUPPORTED({
- BuiltInDefaultValue<const char&>::Get();
- }, "");
-}
-
-TEST(BuiltInDefaultValueDeathTest, IsUndefinedForUserTypes) {
- EXPECT_DEATH_IF_SUPPORTED({
- BuiltInDefaultValue<UserType>::Get();
- }, "");
-}
-
-// Tests that DefaultValue<T>::IsSet() is false initially.
-TEST(DefaultValueTest, IsInitiallyUnset) {
- EXPECT_FALSE(DefaultValue<int>::IsSet());
- EXPECT_FALSE(DefaultValue<const UserType>::IsSet());
-}
-
-// Tests that DefaultValue<T> can be set and then unset.
-TEST(DefaultValueTest, CanBeSetAndUnset) {
- EXPECT_TRUE(DefaultValue<int>::Exists());
- EXPECT_FALSE(DefaultValue<const UserType>::Exists());
-
- DefaultValue<int>::Set(1);
- DefaultValue<const UserType>::Set(UserType());
-
- EXPECT_EQ(1, DefaultValue<int>::Get());
- EXPECT_EQ(0, DefaultValue<const UserType>::Get().value);
-
- EXPECT_TRUE(DefaultValue<int>::Exists());
- EXPECT_TRUE(DefaultValue<const UserType>::Exists());
-
- DefaultValue<int>::Clear();
- DefaultValue<const UserType>::Clear();
-
- EXPECT_FALSE(DefaultValue<int>::IsSet());
- EXPECT_FALSE(DefaultValue<const UserType>::IsSet());
-
- EXPECT_TRUE(DefaultValue<int>::Exists());
- EXPECT_FALSE(DefaultValue<const UserType>::Exists());
-}
-
-// Tests that DefaultValue<T>::Get() returns the
-// BuiltInDefaultValue<T>::Get() when DefaultValue<T>::IsSet() is
-// false.
-TEST(DefaultValueDeathTest, GetReturnsBuiltInDefaultValueWhenUnset) {
- EXPECT_FALSE(DefaultValue<int>::IsSet());
- EXPECT_TRUE(DefaultValue<int>::Exists());
- EXPECT_FALSE(DefaultValue<UserType>::IsSet());
- EXPECT_FALSE(DefaultValue<UserType>::Exists());
-
- EXPECT_EQ(0, DefaultValue<int>::Get());
-
- EXPECT_DEATH_IF_SUPPORTED({
- DefaultValue<UserType>::Get();
- }, "");
-}
-
-// Tests that DefaultValue<void>::Get() returns void.
-TEST(DefaultValueTest, GetWorksForVoid) {
- return DefaultValue<void>::Get();
-}
-
-// Tests using DefaultValue with a reference type.
-
-// Tests that DefaultValue<T&>::IsSet() is false initially.
-TEST(DefaultValueOfReferenceTest, IsInitiallyUnset) {
- EXPECT_FALSE(DefaultValue<int&>::IsSet());
- EXPECT_FALSE(DefaultValue<UserType&>::IsSet());
-}
-
-// Tests that DefaultValue<T&>::Exists is false initiallly.
-TEST(DefaultValueOfReferenceTest, IsInitiallyNotExisting) {
- EXPECT_FALSE(DefaultValue<int&>::Exists());
- EXPECT_FALSE(DefaultValue<UserType&>::Exists());
-}
-
-// Tests that DefaultValue<T&> can be set and then unset.
-TEST(DefaultValueOfReferenceTest, CanBeSetAndUnset) {
- int n = 1;
- DefaultValue<const int&>::Set(n);
- UserType u;
- DefaultValue<UserType&>::Set(u);
-
- EXPECT_TRUE(DefaultValue<const int&>::Exists());
- EXPECT_TRUE(DefaultValue<UserType&>::Exists());
-
- EXPECT_EQ(&n, &(DefaultValue<const int&>::Get()));
- EXPECT_EQ(&u, &(DefaultValue<UserType&>::Get()));
-
- DefaultValue<const int&>::Clear();
- DefaultValue<UserType&>::Clear();
-
- EXPECT_FALSE(DefaultValue<const int&>::Exists());
- EXPECT_FALSE(DefaultValue<UserType&>::Exists());
-
- EXPECT_FALSE(DefaultValue<const int&>::IsSet());
- EXPECT_FALSE(DefaultValue<UserType&>::IsSet());
-}
-
-// Tests that DefaultValue<T&>::Get() returns the
-// BuiltInDefaultValue<T&>::Get() when DefaultValue<T&>::IsSet() is
-// false.
-TEST(DefaultValueOfReferenceDeathTest, GetReturnsBuiltInDefaultValueWhenUnset) {
- EXPECT_FALSE(DefaultValue<int&>::IsSet());
- EXPECT_FALSE(DefaultValue<UserType&>::IsSet());
-
- EXPECT_DEATH_IF_SUPPORTED({
- DefaultValue<int&>::Get();
- }, "");
- EXPECT_DEATH_IF_SUPPORTED({
- DefaultValue<UserType>::Get();
- }, "");
-}
-
-// Tests that ActionInterface can be implemented by defining the
-// Perform method.
-
-typedef int MyFunction(bool, int);
-
-class MyActionImpl : public ActionInterface<MyFunction> {
- public:
- virtual int Perform(const tuple<bool, int>& args) {
- return get<0>(args) ? get<1>(args) : 0;
- }
-};
-
-TEST(ActionInterfaceTest, CanBeImplementedByDefiningPerform) {
- MyActionImpl my_action_impl;
- (void)my_action_impl;
-}
-
-TEST(ActionInterfaceTest, MakeAction) {
- Action<MyFunction> action = MakeAction(new MyActionImpl);
-
- // When exercising the Perform() method of Action<F>, we must pass
- // it a tuple whose size and type are compatible with F's argument
- // types. For example, if F is int(), then Perform() takes a
- // 0-tuple; if F is void(bool, int), then Perform() takes a
- // tuple<bool, int>, and so on.
- EXPECT_EQ(5, action.Perform(make_tuple(true, 5)));
-}
-
-// Tests that Action<F> can be contructed from a pointer to
-// ActionInterface<F>.
-TEST(ActionTest, CanBeConstructedFromActionInterface) {
- Action<MyFunction> action(new MyActionImpl);
-}
-
-// Tests that Action<F> delegates actual work to ActionInterface<F>.
-TEST(ActionTest, DelegatesWorkToActionInterface) {
- const Action<MyFunction> action(new MyActionImpl);
-
- EXPECT_EQ(5, action.Perform(make_tuple(true, 5)));
- EXPECT_EQ(0, action.Perform(make_tuple(false, 1)));
-}
-
-// Tests that Action<F> can be copied.
-TEST(ActionTest, IsCopyable) {
- Action<MyFunction> a1(new MyActionImpl);
- Action<MyFunction> a2(a1); // Tests the copy constructor.
-
- // a1 should continue to work after being copied from.
- EXPECT_EQ(5, a1.Perform(make_tuple(true, 5)));
- EXPECT_EQ(0, a1.Perform(make_tuple(false, 1)));
-
- // a2 should work like the action it was copied from.
- EXPECT_EQ(5, a2.Perform(make_tuple(true, 5)));
- EXPECT_EQ(0, a2.Perform(make_tuple(false, 1)));
-
- a2 = a1; // Tests the assignment operator.
-
- // a1 should continue to work after being copied from.
- EXPECT_EQ(5, a1.Perform(make_tuple(true, 5)));
- EXPECT_EQ(0, a1.Perform(make_tuple(false, 1)));
-
- // a2 should work like the action it was copied from.
- EXPECT_EQ(5, a2.Perform(make_tuple(true, 5)));
- EXPECT_EQ(0, a2.Perform(make_tuple(false, 1)));
-}
-
-// Tests that an Action<From> object can be converted to a
-// compatible Action<To> object.
-
-class IsNotZero : public ActionInterface<bool(int)> { // NOLINT
- public:
- virtual bool Perform(const tuple<int>& arg) {
- return get<0>(arg) != 0;
- }
-};
-
-#if !GTEST_OS_SYMBIAN
-// Compiling this test on Nokia's Symbian compiler fails with:
-// 'Result' is not a member of class 'testing::internal::Function<int>'
-// (point of instantiation: '@unnamed@gmock_actions_test_cc@::
-// ActionTest_CanBeConvertedToOtherActionType_Test::TestBody()')
-// with no obvious fix.
-TEST(ActionTest, CanBeConvertedToOtherActionType) {
- const Action<bool(int)> a1(new IsNotZero); // NOLINT
- const Action<int(char)> a2 = Action<int(char)>(a1); // NOLINT
- EXPECT_EQ(1, a2.Perform(make_tuple('a')));
- EXPECT_EQ(0, a2.Perform(make_tuple('\0')));
-}
-#endif // !GTEST_OS_SYMBIAN
-
-// The following two classes are for testing MakePolymorphicAction().
-
-// Implements a polymorphic action that returns the second of the
-// arguments it receives.
-class ReturnSecondArgumentAction {
- public:
- // We want to verify that MakePolymorphicAction() can work with a
- // polymorphic action whose Perform() method template is either
- // const or not. This lets us verify the non-const case.
- template <typename Result, typename ArgumentTuple>
- Result Perform(const ArgumentTuple& args) { return get<1>(args); }
-};
-
-// Implements a polymorphic action that can be used in a nullary
-// function to return 0.
-class ReturnZeroFromNullaryFunctionAction {
- public:
- // For testing that MakePolymorphicAction() works when the
- // implementation class' Perform() method template takes only one
- // template parameter.
- //
- // We want to verify that MakePolymorphicAction() can work with a
- // polymorphic action whose Perform() method template is either
- // const or not. This lets us verify the const case.
- template <typename Result>
- Result Perform(const tuple<>&) const { return 0; }
-};
-
-// These functions verify that MakePolymorphicAction() returns a
-// PolymorphicAction<T> where T is the argument's type.
-
-PolymorphicAction<ReturnSecondArgumentAction> ReturnSecondArgument() {
- return MakePolymorphicAction(ReturnSecondArgumentAction());
-}
-
-PolymorphicAction<ReturnZeroFromNullaryFunctionAction>
-ReturnZeroFromNullaryFunction() {
- return MakePolymorphicAction(ReturnZeroFromNullaryFunctionAction());
-}
-
-// Tests that MakePolymorphicAction() turns a polymorphic action
-// implementation class into a polymorphic action.
-TEST(MakePolymorphicActionTest, ConstructsActionFromImpl) {
- Action<int(bool, int, double)> a1 = ReturnSecondArgument(); // NOLINT
- EXPECT_EQ(5, a1.Perform(make_tuple(false, 5, 2.0)));
-}
-
-// Tests that MakePolymorphicAction() works when the implementation
-// class' Perform() method template has only one template parameter.
-TEST(MakePolymorphicActionTest, WorksWhenPerformHasOneTemplateParameter) {
- Action<int()> a1 = ReturnZeroFromNullaryFunction();
- EXPECT_EQ(0, a1.Perform(make_tuple()));
-
- Action<void*()> a2 = ReturnZeroFromNullaryFunction();
- EXPECT_TRUE(a2.Perform(make_tuple()) == NULL);
-}
-
-// Tests that Return() works as an action for void-returning
-// functions.
-TEST(ReturnTest, WorksForVoid) {
- const Action<void(int)> ret = Return(); // NOLINT
- return ret.Perform(make_tuple(1));
-}
-
-// Tests that Return(v) returns v.
-TEST(ReturnTest, ReturnsGivenValue) {
- Action<int()> ret = Return(1); // NOLINT
- EXPECT_EQ(1, ret.Perform(make_tuple()));
-
- ret = Return(-5);
- EXPECT_EQ(-5, ret.Perform(make_tuple()));
-}
-
-// Tests that Return("string literal") works.
-TEST(ReturnTest, AcceptsStringLiteral) {
- Action<const char*()> a1 = Return("Hello");
- EXPECT_STREQ("Hello", a1.Perform(make_tuple()));
-
- Action<std::string()> a2 = Return("world");
- EXPECT_EQ("world", a2.Perform(make_tuple()));
-}
-
-// Tests that Return(v) is covaraint.
-
-struct Base {
- bool operator==(const Base&) { return true; }
-};
-
-struct Derived : public Base {
- bool operator==(const Derived&) { return true; }
-};
-
-TEST(ReturnTest, IsCovariant) {
- Base base;
- Derived derived;
- Action<Base*()> ret = Return(&base);
- EXPECT_EQ(&base, ret.Perform(make_tuple()));
-
- ret = Return(&derived);
- EXPECT_EQ(&derived, ret.Perform(make_tuple()));
-}
-
-// Tests that the type of the value passed into Return is converted into T
-// when the action is cast to Action<T(...)> rather than when the action is
-// performed. See comments on testing::internal::ReturnAction in
-// gmock-actions.h for more information.
-class FromType {
- public:
- FromType(bool* is_converted) : converted_(is_converted) {}
- bool* converted() const { return converted_; }
-
- private:
- bool* const converted_;
-
- GTEST_DISALLOW_ASSIGN_(FromType);
-};
-
-class ToType {
- public:
- ToType(const FromType& x) { *x.converted() = true; }
-};
-
-TEST(ReturnTest, ConvertsArgumentWhenConverted) {
- bool converted = false;
- FromType x(&converted);
- Action<ToType()> action(Return(x));
- EXPECT_TRUE(converted) << "Return must convert its argument in its own "
- << "conversion operator.";
- converted = false;
- action.Perform(tuple<>());
- EXPECT_FALSE(converted) << "Action must NOT convert its argument "
- << "when performed." ;
-}
-
-class DestinationType {};
-
-class SourceType {
- public:
- // Note: a non-const typecast operator.
- operator DestinationType() { return DestinationType(); }
-};
-
-TEST(ReturnTest, CanConvertArgumentUsingNonConstTypeCastOperator) {
- SourceType s;
- Action<DestinationType()> action(Return(s));
-}
-
-// Tests that ReturnNull() returns NULL in a pointer-returning function.
-TEST(ReturnNullTest, WorksInPointerReturningFunction) {
- const Action<int*()> a1 = ReturnNull();
- EXPECT_TRUE(a1.Perform(make_tuple()) == NULL);
-
- const Action<const char*(bool)> a2 = ReturnNull(); // NOLINT
- EXPECT_TRUE(a2.Perform(make_tuple(true)) == NULL);
-}
-
-// Tests that ReturnRef(v) works for reference types.
-TEST(ReturnRefTest, WorksForReference) {
- const int n = 0;
- const Action<const int&(bool)> ret = ReturnRef(n); // NOLINT
-
- EXPECT_EQ(&n, &ret.Perform(make_tuple(true)));
-}
-
-// Tests that ReturnRef(v) is covariant.
-TEST(ReturnRefTest, IsCovariant) {
- Base base;
- Derived derived;
- Action<Base&()> a = ReturnRef(base);
- EXPECT_EQ(&base, &a.Perform(make_tuple()));
-
- a = ReturnRef(derived);
- EXPECT_EQ(&derived, &a.Perform(make_tuple()));
-}
-
-// Tests that ReturnRefOfCopy(v) works for reference types.
-TEST(ReturnRefOfCopyTest, WorksForReference) {
- int n = 42;
- const Action<const int&()> ret = ReturnRefOfCopy(n);
-
- EXPECT_NE(&n, &ret.Perform(make_tuple()));
- EXPECT_EQ(42, ret.Perform(make_tuple()));
-
- n = 43;
- EXPECT_NE(&n, &ret.Perform(make_tuple()));
- EXPECT_EQ(42, ret.Perform(make_tuple()));
-}
-
-// Tests that ReturnRefOfCopy(v) is covariant.
-TEST(ReturnRefOfCopyTest, IsCovariant) {
- Base base;
- Derived derived;
- Action<Base&()> a = ReturnRefOfCopy(base);
- EXPECT_NE(&base, &a.Perform(make_tuple()));
-
- a = ReturnRefOfCopy(derived);
- EXPECT_NE(&derived, &a.Perform(make_tuple()));
-}
-
-// Tests that DoDefault() does the default action for the mock method.
-
-class MyClass {};
-
-class MockClass {
- public:
- MockClass() {}
-
- MOCK_METHOD1(IntFunc, int(bool flag)); // NOLINT
- MOCK_METHOD0(Foo, MyClass());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockClass);
-};
-
-// Tests that DoDefault() returns the built-in default value for the
-// return type by default.
-TEST(DoDefaultTest, ReturnsBuiltInDefaultValueByDefault) {
- MockClass mock;
- EXPECT_CALL(mock, IntFunc(_))
- .WillOnce(DoDefault());
- EXPECT_EQ(0, mock.IntFunc(true));
-}
-
-// Tests that DoDefault() aborts the process when there is no built-in
-// default value for the return type.
-TEST(DoDefaultDeathTest, DiesForUnknowType) {
- MockClass mock;
- EXPECT_CALL(mock, Foo())
- .WillRepeatedly(DoDefault());
- EXPECT_DEATH_IF_SUPPORTED({
- mock.Foo();
- }, "");
-}
-
-// Tests that using DoDefault() inside a composite action leads to a
-// run-time error.
-
-void VoidFunc(bool /* flag */) {}
-
-TEST(DoDefaultDeathTest, DiesIfUsedInCompositeAction) {
- MockClass mock;
- EXPECT_CALL(mock, IntFunc(_))
- .WillRepeatedly(DoAll(Invoke(VoidFunc),
- DoDefault()));
-
- // Ideally we should verify the error message as well. Sadly,
- // EXPECT_DEATH() can only capture stderr, while Google Mock's
- // errors are printed on stdout. Therefore we have to settle for
- // not verifying the message.
- EXPECT_DEATH_IF_SUPPORTED({
- mock.IntFunc(true);
- }, "");
-}
-
-// Tests that DoDefault() returns the default value set by
-// DefaultValue<T>::Set() when it's not overriden by an ON_CALL().
-TEST(DoDefaultTest, ReturnsUserSpecifiedPerTypeDefaultValueWhenThereIsOne) {
- DefaultValue<int>::Set(1);
- MockClass mock;
- EXPECT_CALL(mock, IntFunc(_))
- .WillOnce(DoDefault());
- EXPECT_EQ(1, mock.IntFunc(false));
- DefaultValue<int>::Clear();
-}
-
-// Tests that DoDefault() does the action specified by ON_CALL().
-TEST(DoDefaultTest, DoesWhatOnCallSpecifies) {
- MockClass mock;
- ON_CALL(mock, IntFunc(_))
- .WillByDefault(Return(2));
- EXPECT_CALL(mock, IntFunc(_))
- .WillOnce(DoDefault());
- EXPECT_EQ(2, mock.IntFunc(false));
-}
-
-// Tests that using DoDefault() in ON_CALL() leads to a run-time failure.
-TEST(DoDefaultTest, CannotBeUsedInOnCall) {
- MockClass mock;
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- ON_CALL(mock, IntFunc(_))
- .WillByDefault(DoDefault());
- }, "DoDefault() cannot be used in ON_CALL()");
-}
-
-// Tests that SetArgPointee<N>(v) sets the variable pointed to by
-// the N-th (0-based) argument to v.
-TEST(SetArgPointeeTest, SetsTheNthPointee) {
- typedef void MyFunction(bool, int*, char*);
- Action<MyFunction> a = SetArgPointee<1>(2);
-
- int n = 0;
- char ch = '\0';
- a.Perform(make_tuple(true, &n, &ch));
- EXPECT_EQ(2, n);
- EXPECT_EQ('\0', ch);
-
- a = SetArgPointee<2>('a');
- n = 0;
- ch = '\0';
- a.Perform(make_tuple(true, &n, &ch));
- EXPECT_EQ(0, n);
- EXPECT_EQ('a', ch);
-}
-
-#if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN)
-// Tests that SetArgPointee<N>() accepts a string literal.
-// GCC prior to v4.0 and the Symbian compiler do not support this.
-TEST(SetArgPointeeTest, AcceptsStringLiteral) {
- typedef void MyFunction(std::string*, const char**);
- Action<MyFunction> a = SetArgPointee<0>("hi");
- std::string str;
- const char* ptr = NULL;
- a.Perform(make_tuple(&str, &ptr));
- EXPECT_EQ("hi", str);
- EXPECT_TRUE(ptr == NULL);
-
- a = SetArgPointee<1>("world");
- str = "";
- a.Perform(make_tuple(&str, &ptr));
- EXPECT_EQ("", str);
- EXPECT_STREQ("world", ptr);
-}
-
-TEST(SetArgPointeeTest, AcceptsWideStringLiteral) {
- typedef void MyFunction(const wchar_t**);
- Action<MyFunction> a = SetArgPointee<0>(L"world");
- const wchar_t* ptr = NULL;
- a.Perform(make_tuple(&ptr));
- EXPECT_STREQ(L"world", ptr);
-
-# if GTEST_HAS_STD_WSTRING
-
- typedef void MyStringFunction(std::wstring*);
- Action<MyStringFunction> a2 = SetArgPointee<0>(L"world");
- std::wstring str = L"";
- a2.Perform(make_tuple(&str));
- EXPECT_EQ(L"world", str);
-
-# endif
-}
-#endif
-
-// Tests that SetArgPointee<N>() accepts a char pointer.
-TEST(SetArgPointeeTest, AcceptsCharPointer) {
- typedef void MyFunction(bool, std::string*, const char**);
- const char* const hi = "hi";
- Action<MyFunction> a = SetArgPointee<1>(hi);
- std::string str;
- const char* ptr = NULL;
- a.Perform(make_tuple(true, &str, &ptr));
- EXPECT_EQ("hi", str);
- EXPECT_TRUE(ptr == NULL);
-
- char world_array[] = "world";
- char* const world = world_array;
- a = SetArgPointee<2>(world);
- str = "";
- a.Perform(make_tuple(true, &str, &ptr));
- EXPECT_EQ("", str);
- EXPECT_EQ(world, ptr);
-}
-
-TEST(SetArgPointeeTest, AcceptsWideCharPointer) {
- typedef void MyFunction(bool, const wchar_t**);
- const wchar_t* const hi = L"hi";
- Action<MyFunction> a = SetArgPointee<1>(hi);
- const wchar_t* ptr = NULL;
- a.Perform(make_tuple(true, &ptr));
- EXPECT_EQ(hi, ptr);
-
-# if GTEST_HAS_STD_WSTRING
-
- typedef void MyStringFunction(bool, std::wstring*);
- wchar_t world_array[] = L"world";
- wchar_t* const world = world_array;
- Action<MyStringFunction> a2 = SetArgPointee<1>(world);
- std::wstring str;
- a2.Perform(make_tuple(true, &str));
- EXPECT_EQ(world_array, str);
-# endif
-}
-
-#if GTEST_HAS_PROTOBUF_
-
-// Tests that SetArgPointee<N>(proto_buffer) sets the v1 protobuf
-// variable pointed to by the N-th (0-based) argument to proto_buffer.
-TEST(SetArgPointeeTest, SetsTheNthPointeeOfProtoBufferType) {
- TestMessage* const msg = new TestMessage;
- msg->set_member("yes");
- TestMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, TestMessage*)> a = SetArgPointee<1>(*msg);
- // SetArgPointee<N>(proto_buffer) makes a copy of proto_buffer
- // s.t. the action works even when the original proto_buffer has
- // died. We ensure this behavior by deleting msg before using the
- // action.
- delete msg;
-
- TestMessage dest;
- EXPECT_FALSE(orig_msg.Equals(dest));
- a.Perform(make_tuple(true, &dest));
- EXPECT_TRUE(orig_msg.Equals(dest));
-}
-
-// Tests that SetArgPointee<N>(proto_buffer) sets the
-// ::ProtocolMessage variable pointed to by the N-th (0-based)
-// argument to proto_buffer.
-TEST(SetArgPointeeTest, SetsTheNthPointeeOfProtoBufferBaseType) {
- TestMessage* const msg = new TestMessage;
- msg->set_member("yes");
- TestMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, ::ProtocolMessage*)> a = SetArgPointee<1>(*msg);
- // SetArgPointee<N>(proto_buffer) makes a copy of proto_buffer
- // s.t. the action works even when the original proto_buffer has
- // died. We ensure this behavior by deleting msg before using the
- // action.
- delete msg;
-
- TestMessage dest;
- ::ProtocolMessage* const dest_base = &dest;
- EXPECT_FALSE(orig_msg.Equals(dest));
- a.Perform(make_tuple(true, dest_base));
- EXPECT_TRUE(orig_msg.Equals(dest));
-}
-
-// Tests that SetArgPointee<N>(proto2_buffer) sets the v2
-// protobuf variable pointed to by the N-th (0-based) argument to
-// proto2_buffer.
-TEST(SetArgPointeeTest, SetsTheNthPointeeOfProto2BufferType) {
- using testing::internal::FooMessage;
- FooMessage* const msg = new FooMessage;
- msg->set_int_field(2);
- msg->set_string_field("hi");
- FooMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, FooMessage*)> a = SetArgPointee<1>(*msg);
- // SetArgPointee<N>(proto2_buffer) makes a copy of
- // proto2_buffer s.t. the action works even when the original
- // proto2_buffer has died. We ensure this behavior by deleting msg
- // before using the action.
- delete msg;
-
- FooMessage dest;
- dest.set_int_field(0);
- a.Perform(make_tuple(true, &dest));
- EXPECT_EQ(2, dest.int_field());
- EXPECT_EQ("hi", dest.string_field());
-}
-
-// Tests that SetArgPointee<N>(proto2_buffer) sets the
-// proto2::Message variable pointed to by the N-th (0-based) argument
-// to proto2_buffer.
-TEST(SetArgPointeeTest, SetsTheNthPointeeOfProto2BufferBaseType) {
- using testing::internal::FooMessage;
- FooMessage* const msg = new FooMessage;
- msg->set_int_field(2);
- msg->set_string_field("hi");
- FooMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, ::proto2::Message*)> a = SetArgPointee<1>(*msg);
- // SetArgPointee<N>(proto2_buffer) makes a copy of
- // proto2_buffer s.t. the action works even when the original
- // proto2_buffer has died. We ensure this behavior by deleting msg
- // before using the action.
- delete msg;
-
- FooMessage dest;
- dest.set_int_field(0);
- ::proto2::Message* const dest_base = &dest;
- a.Perform(make_tuple(true, dest_base));
- EXPECT_EQ(2, dest.int_field());
- EXPECT_EQ("hi", dest.string_field());
-}
-
-#endif // GTEST_HAS_PROTOBUF_
-
-// Tests that SetArgumentPointee<N>(v) sets the variable pointed to by
-// the N-th (0-based) argument to v.
-TEST(SetArgumentPointeeTest, SetsTheNthPointee) {
- typedef void MyFunction(bool, int*, char*);
- Action<MyFunction> a = SetArgumentPointee<1>(2);
-
- int n = 0;
- char ch = '\0';
- a.Perform(make_tuple(true, &n, &ch));
- EXPECT_EQ(2, n);
- EXPECT_EQ('\0', ch);
-
- a = SetArgumentPointee<2>('a');
- n = 0;
- ch = '\0';
- a.Perform(make_tuple(true, &n, &ch));
- EXPECT_EQ(0, n);
- EXPECT_EQ('a', ch);
-}
-
-#if GTEST_HAS_PROTOBUF_
-
-// Tests that SetArgumentPointee<N>(proto_buffer) sets the v1 protobuf
-// variable pointed to by the N-th (0-based) argument to proto_buffer.
-TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProtoBufferType) {
- TestMessage* const msg = new TestMessage;
- msg->set_member("yes");
- TestMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, TestMessage*)> a = SetArgumentPointee<1>(*msg);
- // SetArgumentPointee<N>(proto_buffer) makes a copy of proto_buffer
- // s.t. the action works even when the original proto_buffer has
- // died. We ensure this behavior by deleting msg before using the
- // action.
- delete msg;
-
- TestMessage dest;
- EXPECT_FALSE(orig_msg.Equals(dest));
- a.Perform(make_tuple(true, &dest));
- EXPECT_TRUE(orig_msg.Equals(dest));
-}
-
-// Tests that SetArgumentPointee<N>(proto_buffer) sets the
-// ::ProtocolMessage variable pointed to by the N-th (0-based)
-// argument to proto_buffer.
-TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProtoBufferBaseType) {
- TestMessage* const msg = new TestMessage;
- msg->set_member("yes");
- TestMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, ::ProtocolMessage*)> a = SetArgumentPointee<1>(*msg);
- // SetArgumentPointee<N>(proto_buffer) makes a copy of proto_buffer
- // s.t. the action works even when the original proto_buffer has
- // died. We ensure this behavior by deleting msg before using the
- // action.
- delete msg;
-
- TestMessage dest;
- ::ProtocolMessage* const dest_base = &dest;
- EXPECT_FALSE(orig_msg.Equals(dest));
- a.Perform(make_tuple(true, dest_base));
- EXPECT_TRUE(orig_msg.Equals(dest));
-}
-
-// Tests that SetArgumentPointee<N>(proto2_buffer) sets the v2
-// protobuf variable pointed to by the N-th (0-based) argument to
-// proto2_buffer.
-TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProto2BufferType) {
- using testing::internal::FooMessage;
- FooMessage* const msg = new FooMessage;
- msg->set_int_field(2);
- msg->set_string_field("hi");
- FooMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, FooMessage*)> a = SetArgumentPointee<1>(*msg);
- // SetArgumentPointee<N>(proto2_buffer) makes a copy of
- // proto2_buffer s.t. the action works even when the original
- // proto2_buffer has died. We ensure this behavior by deleting msg
- // before using the action.
- delete msg;
-
- FooMessage dest;
- dest.set_int_field(0);
- a.Perform(make_tuple(true, &dest));
- EXPECT_EQ(2, dest.int_field());
- EXPECT_EQ("hi", dest.string_field());
-}
-
-// Tests that SetArgumentPointee<N>(proto2_buffer) sets the
-// proto2::Message variable pointed to by the N-th (0-based) argument
-// to proto2_buffer.
-TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProto2BufferBaseType) {
- using testing::internal::FooMessage;
- FooMessage* const msg = new FooMessage;
- msg->set_int_field(2);
- msg->set_string_field("hi");
- FooMessage orig_msg;
- orig_msg.CopyFrom(*msg);
-
- Action<void(bool, ::proto2::Message*)> a = SetArgumentPointee<1>(*msg);
- // SetArgumentPointee<N>(proto2_buffer) makes a copy of
- // proto2_buffer s.t. the action works even when the original
- // proto2_buffer has died. We ensure this behavior by deleting msg
- // before using the action.
- delete msg;
-
- FooMessage dest;
- dest.set_int_field(0);
- ::proto2::Message* const dest_base = &dest;
- a.Perform(make_tuple(true, dest_base));
- EXPECT_EQ(2, dest.int_field());
- EXPECT_EQ("hi", dest.string_field());
-}
-
-#endif // GTEST_HAS_PROTOBUF_
-
-// Sample functions and functors for testing Invoke() and etc.
-int Nullary() { return 1; }
-
-class NullaryFunctor {
- public:
- int operator()() { return 2; }
-};
-
-bool g_done = false;
-void VoidNullary() { g_done = true; }
-
-class VoidNullaryFunctor {
- public:
- void operator()() { g_done = true; }
-};
-
-bool Unary(int x) { return x < 0; }
-
-const char* Plus1(const char* s) { return s + 1; }
-
-void VoidUnary(int /* n */) { g_done = true; }
-
-bool ByConstRef(const std::string& s) { return s == "Hi"; }
-
-const double g_double = 0;
-bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; }
-
-std::string ByNonConstRef(std::string& s) { return s += "+"; } // NOLINT
-
-struct UnaryFunctor {
- int operator()(bool x) { return x ? 1 : -1; }
-};
-
-const char* Binary(const char* input, short n) { return input + n; } // NOLINT
-
-void VoidBinary(int, char) { g_done = true; }
-
-int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT
-
-void VoidTernary(int, char, bool) { g_done = true; }
-
-int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
-
-void VoidFunctionWithFourArguments(char, int, float, double) { g_done = true; }
-
-int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
-
-struct SumOf5Functor {
- int operator()(int a, int b, int c, int d, int e) {
- return a + b + c + d + e;
- }
-};
-
-int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
-}
-
-struct SumOf6Functor {
- int operator()(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
-};
-
-class Foo {
- public:
- Foo() : value_(123) {}
-
- int Nullary() const { return value_; }
- short Unary(long x) { return static_cast<short>(value_ + x); } // NOLINT
- std::string Binary(const std::string& str, char c) const { return str + c; }
- int Ternary(int x, bool y, char z) { return value_ + x + y*z; }
- int SumOf4(int a, int b, int c, int d) const {
- return a + b + c + d + value_;
- }
- int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
- int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
- private:
- int value_;
-};
-
-// Tests InvokeWithoutArgs(function).
-TEST(InvokeWithoutArgsTest, Function) {
- // As an action that takes one argument.
- Action<int(int)> a = InvokeWithoutArgs(Nullary); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple(2)));
-
- // As an action that takes two arguments.
- Action<int(int, double)> a2 = InvokeWithoutArgs(Nullary); // NOLINT
- EXPECT_EQ(1, a2.Perform(make_tuple(2, 3.5)));
-
- // As an action that returns void.
- Action<void(int)> a3 = InvokeWithoutArgs(VoidNullary); // NOLINT
- g_done = false;
- a3.Perform(make_tuple(1));
- EXPECT_TRUE(g_done);
-}
-
-// Tests InvokeWithoutArgs(functor).
-TEST(InvokeWithoutArgsTest, Functor) {
- // As an action that takes no argument.
- Action<int()> a = InvokeWithoutArgs(NullaryFunctor()); // NOLINT
- EXPECT_EQ(2, a.Perform(make_tuple()));
-
- // As an action that takes three arguments.
- Action<int(int, double, char)> a2 = // NOLINT
- InvokeWithoutArgs(NullaryFunctor());
- EXPECT_EQ(2, a2.Perform(make_tuple(3, 3.5, 'a')));
-
- // As an action that returns void.
- Action<void()> a3 = InvokeWithoutArgs(VoidNullaryFunctor());
- g_done = false;
- a3.Perform(make_tuple());
- EXPECT_TRUE(g_done);
-}
-
-// Tests InvokeWithoutArgs(obj_ptr, method).
-TEST(InvokeWithoutArgsTest, Method) {
- Foo foo;
- Action<int(bool, char)> a = // NOLINT
- InvokeWithoutArgs(&foo, &Foo::Nullary);
- EXPECT_EQ(123, a.Perform(make_tuple(true, 'a')));
-}
-
-// Tests using IgnoreResult() on a polymorphic action.
-TEST(IgnoreResultTest, PolymorphicAction) {
- Action<void(int)> a = IgnoreResult(Return(5)); // NOLINT
- a.Perform(make_tuple(1));
-}
-
-// Tests using IgnoreResult() on a monomorphic action.
-
-int ReturnOne() {
- g_done = true;
- return 1;
-}
-
-TEST(IgnoreResultTest, MonomorphicAction) {
- g_done = false;
- Action<void()> a = IgnoreResult(Invoke(ReturnOne));
- a.Perform(make_tuple());
- EXPECT_TRUE(g_done);
-}
-
-// Tests using IgnoreResult() on an action that returns a class type.
-
-MyClass ReturnMyClass(double /* x */) {
- g_done = true;
- return MyClass();
-}
-
-TEST(IgnoreResultTest, ActionReturningClass) {
- g_done = false;
- Action<void(int)> a = IgnoreResult(Invoke(ReturnMyClass)); // NOLINT
- a.Perform(make_tuple(2));
- EXPECT_TRUE(g_done);
-}
-
-TEST(AssignTest, Int) {
- int x = 0;
- Action<void(int)> a = Assign(&x, 5);
- a.Perform(make_tuple(0));
- EXPECT_EQ(5, x);
-}
-
-TEST(AssignTest, String) {
- ::std::string x;
- Action<void(void)> a = Assign(&x, "Hello, world");
- a.Perform(make_tuple());
- EXPECT_EQ("Hello, world", x);
-}
-
-TEST(AssignTest, CompatibleTypes) {
- double x = 0;
- Action<void(int)> a = Assign(&x, 5);
- a.Perform(make_tuple(0));
- EXPECT_DOUBLE_EQ(5, x);
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-class SetErrnoAndReturnTest : public testing::Test {
- protected:
- virtual void SetUp() { errno = 0; }
- virtual void TearDown() { errno = 0; }
-};
-
-TEST_F(SetErrnoAndReturnTest, Int) {
- Action<int(void)> a = SetErrnoAndReturn(ENOTTY, -5);
- EXPECT_EQ(-5, a.Perform(make_tuple()));
- EXPECT_EQ(ENOTTY, errno);
-}
-
-TEST_F(SetErrnoAndReturnTest, Ptr) {
- int x;
- Action<int*(void)> a = SetErrnoAndReturn(ENOTTY, &x);
- EXPECT_EQ(&x, a.Perform(make_tuple()));
- EXPECT_EQ(ENOTTY, errno);
-}
-
-TEST_F(SetErrnoAndReturnTest, CompatibleTypes) {
- Action<double()> a = SetErrnoAndReturn(EINVAL, 5);
- EXPECT_DOUBLE_EQ(5.0, a.Perform(make_tuple()));
- EXPECT_EQ(EINVAL, errno);
-}
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Tests ByRef().
-
-// Tests that ReferenceWrapper<T> is copyable.
-TEST(ByRefTest, IsCopyable) {
- const std::string s1 = "Hi";
- const std::string s2 = "Hello";
-
- ::testing::internal::ReferenceWrapper<const std::string> ref_wrapper = ByRef(s1);
- const std::string& r1 = ref_wrapper;
- EXPECT_EQ(&s1, &r1);
-
- // Assigns a new value to ref_wrapper.
- ref_wrapper = ByRef(s2);
- const std::string& r2 = ref_wrapper;
- EXPECT_EQ(&s2, &r2);
-
- ::testing::internal::ReferenceWrapper<const std::string> ref_wrapper1 = ByRef(s1);
- // Copies ref_wrapper1 to ref_wrapper.
- ref_wrapper = ref_wrapper1;
- const std::string& r3 = ref_wrapper;
- EXPECT_EQ(&s1, &r3);
-}
-
-// Tests using ByRef() on a const value.
-TEST(ByRefTest, ConstValue) {
- const int n = 0;
- // int& ref = ByRef(n); // This shouldn't compile - we have a
- // negative compilation test to catch it.
- const int& const_ref = ByRef(n);
- EXPECT_EQ(&n, &const_ref);
-}
-
-// Tests using ByRef() on a non-const value.
-TEST(ByRefTest, NonConstValue) {
- int n = 0;
-
- // ByRef(n) can be used as either an int&,
- int& ref = ByRef(n);
- EXPECT_EQ(&n, &ref);
-
- // or a const int&.
- const int& const_ref = ByRef(n);
- EXPECT_EQ(&n, &const_ref);
-}
-
-// Tests explicitly specifying the type when using ByRef().
-TEST(ByRefTest, ExplicitType) {
- int n = 0;
- const int& r1 = ByRef<const int>(n);
- EXPECT_EQ(&n, &r1);
-
- // ByRef<char>(n); // This shouldn't compile - we have a negative
- // compilation test to catch it.
-
- Derived d;
- Derived& r2 = ByRef<Derived>(d);
- EXPECT_EQ(&d, &r2);
-
- const Derived& r3 = ByRef<const Derived>(d);
- EXPECT_EQ(&d, &r3);
-
- Base& r4 = ByRef<Base>(d);
- EXPECT_EQ(&d, &r4);
-
- const Base& r5 = ByRef<const Base>(d);
- EXPECT_EQ(&d, &r5);
-
- // The following shouldn't compile - we have a negative compilation
- // test for it.
- //
- // Base b;
- // ByRef<Derived>(b);
-}
-
-// Tests that Google Mock prints expression ByRef(x) as a reference to x.
-TEST(ByRefTest, PrintsCorrectly) {
- int n = 42;
- ::std::stringstream expected, actual;
- testing::internal::UniversalPrinter<const int&>::Print(n, &expected);
- testing::internal::UniversalPrint(ByRef(n), &actual);
- EXPECT_EQ(expected.str(), actual.str());
-}
-
-} // Unnamed namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-cardinalities_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-cardinalities_test.cc
deleted file mode 100644
index 64815e57a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-cardinalities_test.cc
+++ /dev/null
@@ -1,428 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the built-in cardinalities.
-
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-namespace {
-
-using std::stringstream;
-using testing::AnyNumber;
-using testing::AtLeast;
-using testing::AtMost;
-using testing::Between;
-using testing::Cardinality;
-using testing::CardinalityInterface;
-using testing::Exactly;
-using testing::IsSubstring;
-using testing::MakeCardinality;
-
-class MockFoo {
- public:
- MockFoo() {}
- MOCK_METHOD0(Bar, int()); // NOLINT
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
-};
-
-// Tests that Cardinality objects can be default constructed.
-TEST(CardinalityTest, IsDefaultConstructable) {
- Cardinality c;
-}
-
-// Tests that Cardinality objects are copyable.
-TEST(CardinalityTest, IsCopyable) {
- // Tests the copy constructor.
- Cardinality c = Exactly(1);
- EXPECT_FALSE(c.IsSatisfiedByCallCount(0));
- EXPECT_TRUE(c.IsSatisfiedByCallCount(1));
- EXPECT_TRUE(c.IsSaturatedByCallCount(1));
-
- // Tests the assignment operator.
- c = Exactly(2);
- EXPECT_FALSE(c.IsSatisfiedByCallCount(1));
- EXPECT_TRUE(c.IsSatisfiedByCallCount(2));
- EXPECT_TRUE(c.IsSaturatedByCallCount(2));
-}
-
-TEST(CardinalityTest, IsOverSaturatedByCallCountWorks) {
- const Cardinality c = AtMost(5);
- EXPECT_FALSE(c.IsOverSaturatedByCallCount(4));
- EXPECT_FALSE(c.IsOverSaturatedByCallCount(5));
- EXPECT_TRUE(c.IsOverSaturatedByCallCount(6));
-}
-
-// Tests that Cardinality::DescribeActualCallCountTo() creates the
-// correct description.
-TEST(CardinalityTest, CanDescribeActualCallCount) {
- stringstream ss0;
- Cardinality::DescribeActualCallCountTo(0, &ss0);
- EXPECT_EQ("never called", ss0.str());
-
- stringstream ss1;
- Cardinality::DescribeActualCallCountTo(1, &ss1);
- EXPECT_EQ("called once", ss1.str());
-
- stringstream ss2;
- Cardinality::DescribeActualCallCountTo(2, &ss2);
- EXPECT_EQ("called twice", ss2.str());
-
- stringstream ss3;
- Cardinality::DescribeActualCallCountTo(3, &ss3);
- EXPECT_EQ("called 3 times", ss3.str());
-}
-
-// Tests AnyNumber()
-TEST(AnyNumber, Works) {
- const Cardinality c = AnyNumber();
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_FALSE(c.IsSaturatedByCallCount(0));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(1));
- EXPECT_FALSE(c.IsSaturatedByCallCount(1));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(9));
- EXPECT_FALSE(c.IsSaturatedByCallCount(9));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "called any number of times",
- ss.str());
-}
-
-TEST(AnyNumberTest, HasCorrectBounds) {
- const Cardinality c = AnyNumber();
- EXPECT_EQ(0, c.ConservativeLowerBound());
- EXPECT_EQ(INT_MAX, c.ConservativeUpperBound());
-}
-
-// Tests AtLeast(n).
-
-TEST(AtLeastTest, OnNegativeNumber) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- AtLeast(-1);
- }, "The invocation lower bound must be >= 0");
-}
-
-TEST(AtLeastTest, OnZero) {
- const Cardinality c = AtLeast(0);
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_FALSE(c.IsSaturatedByCallCount(0));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(1));
- EXPECT_FALSE(c.IsSaturatedByCallCount(1));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "any number of times",
- ss.str());
-}
-
-TEST(AtLeastTest, OnPositiveNumber) {
- const Cardinality c = AtLeast(2);
- EXPECT_FALSE(c.IsSatisfiedByCallCount(0));
- EXPECT_FALSE(c.IsSaturatedByCallCount(0));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(1));
- EXPECT_FALSE(c.IsSaturatedByCallCount(1));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(2));
- EXPECT_FALSE(c.IsSaturatedByCallCount(2));
-
- stringstream ss1;
- AtLeast(1).DescribeTo(&ss1);
- EXPECT_PRED_FORMAT2(IsSubstring, "at least once",
- ss1.str());
-
- stringstream ss2;
- c.DescribeTo(&ss2);
- EXPECT_PRED_FORMAT2(IsSubstring, "at least twice",
- ss2.str());
-
- stringstream ss3;
- AtLeast(3).DescribeTo(&ss3);
- EXPECT_PRED_FORMAT2(IsSubstring, "at least 3 times",
- ss3.str());
-}
-
-TEST(AtLeastTest, HasCorrectBounds) {
- const Cardinality c = AtLeast(2);
- EXPECT_EQ(2, c.ConservativeLowerBound());
- EXPECT_EQ(INT_MAX, c.ConservativeUpperBound());
-}
-
-// Tests AtMost(n).
-
-TEST(AtMostTest, OnNegativeNumber) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- AtMost(-1);
- }, "The invocation upper bound must be >= 0");
-}
-
-TEST(AtMostTest, OnZero) {
- const Cardinality c = AtMost(0);
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_TRUE(c.IsSaturatedByCallCount(0));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(1));
- EXPECT_TRUE(c.IsSaturatedByCallCount(1));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "never called",
- ss.str());
-}
-
-TEST(AtMostTest, OnPositiveNumber) {
- const Cardinality c = AtMost(2);
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_FALSE(c.IsSaturatedByCallCount(0));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(1));
- EXPECT_FALSE(c.IsSaturatedByCallCount(1));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(2));
- EXPECT_TRUE(c.IsSaturatedByCallCount(2));
-
- stringstream ss1;
- AtMost(1).DescribeTo(&ss1);
- EXPECT_PRED_FORMAT2(IsSubstring, "called at most once",
- ss1.str());
-
- stringstream ss2;
- c.DescribeTo(&ss2);
- EXPECT_PRED_FORMAT2(IsSubstring, "called at most twice",
- ss2.str());
-
- stringstream ss3;
- AtMost(3).DescribeTo(&ss3);
- EXPECT_PRED_FORMAT2(IsSubstring, "called at most 3 times",
- ss3.str());
-}
-
-TEST(AtMostTest, HasCorrectBounds) {
- const Cardinality c = AtMost(2);
- EXPECT_EQ(0, c.ConservativeLowerBound());
- EXPECT_EQ(2, c.ConservativeUpperBound());
-}
-
-// Tests Between(m, n).
-
-TEST(BetweenTest, OnNegativeStart) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- Between(-1, 2);
- }, "The invocation lower bound must be >= 0, but is actually -1");
-}
-
-TEST(BetweenTest, OnNegativeEnd) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- Between(1, -2);
- }, "The invocation upper bound must be >= 0, but is actually -2");
-}
-
-TEST(BetweenTest, OnStartBiggerThanEnd) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- Between(2, 1);
- }, "The invocation upper bound (1) must be >= "
- "the invocation lower bound (2)");
-}
-
-TEST(BetweenTest, OnZeroStartAndZeroEnd) {
- const Cardinality c = Between(0, 0);
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_TRUE(c.IsSaturatedByCallCount(0));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(1));
- EXPECT_TRUE(c.IsSaturatedByCallCount(1));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "never called",
- ss.str());
-}
-
-TEST(BetweenTest, OnZeroStartAndNonZeroEnd) {
- const Cardinality c = Between(0, 2);
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_FALSE(c.IsSaturatedByCallCount(0));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(2));
- EXPECT_TRUE(c.IsSaturatedByCallCount(2));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(4));
- EXPECT_TRUE(c.IsSaturatedByCallCount(4));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "called at most twice",
- ss.str());
-}
-
-TEST(BetweenTest, OnSameStartAndEnd) {
- const Cardinality c = Between(3, 3);
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(2));
- EXPECT_FALSE(c.IsSaturatedByCallCount(2));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(3));
- EXPECT_TRUE(c.IsSaturatedByCallCount(3));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(4));
- EXPECT_TRUE(c.IsSaturatedByCallCount(4));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "called 3 times",
- ss.str());
-}
-
-TEST(BetweenTest, OnDifferentStartAndEnd) {
- const Cardinality c = Between(3, 5);
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(2));
- EXPECT_FALSE(c.IsSaturatedByCallCount(2));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(3));
- EXPECT_FALSE(c.IsSaturatedByCallCount(3));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(5));
- EXPECT_TRUE(c.IsSaturatedByCallCount(5));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(6));
- EXPECT_TRUE(c.IsSaturatedByCallCount(6));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "called between 3 and 5 times",
- ss.str());
-}
-
-TEST(BetweenTest, HasCorrectBounds) {
- const Cardinality c = Between(3, 5);
- EXPECT_EQ(3, c.ConservativeLowerBound());
- EXPECT_EQ(5, c.ConservativeUpperBound());
-}
-
-// Tests Exactly(n).
-
-TEST(ExactlyTest, OnNegativeNumber) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- Exactly(-1);
- }, "The invocation lower bound must be >= 0");
-}
-
-TEST(ExactlyTest, OnZero) {
- const Cardinality c = Exactly(0);
- EXPECT_TRUE(c.IsSatisfiedByCallCount(0));
- EXPECT_TRUE(c.IsSaturatedByCallCount(0));
-
- EXPECT_FALSE(c.IsSatisfiedByCallCount(1));
- EXPECT_TRUE(c.IsSaturatedByCallCount(1));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_PRED_FORMAT2(IsSubstring, "never called",
- ss.str());
-}
-
-TEST(ExactlyTest, OnPositiveNumber) {
- const Cardinality c = Exactly(2);
- EXPECT_FALSE(c.IsSatisfiedByCallCount(0));
- EXPECT_FALSE(c.IsSaturatedByCallCount(0));
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(2));
- EXPECT_TRUE(c.IsSaturatedByCallCount(2));
-
- stringstream ss1;
- Exactly(1).DescribeTo(&ss1);
- EXPECT_PRED_FORMAT2(IsSubstring, "called once",
- ss1.str());
-
- stringstream ss2;
- c.DescribeTo(&ss2);
- EXPECT_PRED_FORMAT2(IsSubstring, "called twice",
- ss2.str());
-
- stringstream ss3;
- Exactly(3).DescribeTo(&ss3);
- EXPECT_PRED_FORMAT2(IsSubstring, "called 3 times",
- ss3.str());
-}
-
-TEST(ExactlyTest, HasCorrectBounds) {
- const Cardinality c = Exactly(3);
- EXPECT_EQ(3, c.ConservativeLowerBound());
- EXPECT_EQ(3, c.ConservativeUpperBound());
-}
-
-// Tests that a user can make his own cardinality by implementing
-// CardinalityInterface and calling MakeCardinality().
-
-class EvenCardinality : public CardinalityInterface {
- public:
- // Returns true iff call_count calls will satisfy this cardinality.
- virtual bool IsSatisfiedByCallCount(int call_count) const {
- return (call_count % 2 == 0);
- }
-
- // Returns true iff call_count calls will saturate this cardinality.
- virtual bool IsSaturatedByCallCount(int /* call_count */) const {
- return false;
- }
-
- // Describes self to an ostream.
- virtual void DescribeTo(::std::ostream* ss) const {
- *ss << "called even number of times";
- }
-};
-
-TEST(MakeCardinalityTest, ConstructsCardinalityFromInterface) {
- const Cardinality c = MakeCardinality(new EvenCardinality);
-
- EXPECT_TRUE(c.IsSatisfiedByCallCount(2));
- EXPECT_FALSE(c.IsSatisfiedByCallCount(3));
-
- EXPECT_FALSE(c.IsSaturatedByCallCount(10000));
-
- stringstream ss;
- c.DescribeTo(&ss);
- EXPECT_EQ("called even number of times", ss.str());
-}
-
-} // Unnamed namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-actions_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-actions_test.cc
deleted file mode 100644
index 436f1a2e7..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-actions_test.cc
+++ /dev/null
@@ -1,1212 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the built-in actions generated by a script.
-
-#include "gmock/gmock-generated-actions.h"
-
-#include <functional>
-#include <sstream>
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-namespace gmock_generated_actions_test {
-
-using ::std::plus;
-using ::std::string;
-using ::std::tr1::get;
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-using ::std::tr1::tuple_element;
-using testing::_;
-using testing::Action;
-using testing::ActionInterface;
-using testing::ByRef;
-using testing::DoAll;
-using testing::Invoke;
-using testing::Return;
-using testing::ReturnNew;
-using testing::SetArgPointee;
-using testing::StaticAssertTypeEq;
-using testing::Unused;
-using testing::WithArgs;
-
-// For suppressing compiler warnings on conversion possibly losing precision.
-inline short Short(short n) { return n; } // NOLINT
-inline char Char(char ch) { return ch; }
-
-// Sample functions and functors for testing various actions.
-int Nullary() { return 1; }
-
-class NullaryFunctor {
- public:
- int operator()() { return 2; }
-};
-
-bool g_done = false;
-
-bool Unary(int x) { return x < 0; }
-
-const char* Plus1(const char* s) { return s + 1; }
-
-bool ByConstRef(const string& s) { return s == "Hi"; }
-
-const double g_double = 0;
-bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; }
-
-string ByNonConstRef(string& s) { return s += "+"; } // NOLINT
-
-struct UnaryFunctor {
- int operator()(bool x) { return x ? 1 : -1; }
-};
-
-const char* Binary(const char* input, short n) { return input + n; } // NOLINT
-
-void VoidBinary(int, char) { g_done = true; }
-
-int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT
-
-void VoidTernary(int, char, bool) { g_done = true; }
-
-int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
-
-string Concat4(const char* s1, const char* s2, const char* s3,
- const char* s4) {
- return string(s1) + s2 + s3 + s4;
-}
-
-int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
-
-struct SumOf5Functor {
- int operator()(int a, int b, int c, int d, int e) {
- return a + b + c + d + e;
- }
-};
-
-string Concat5(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5) {
- return string(s1) + s2 + s3 + s4 + s5;
-}
-
-int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
-}
-
-struct SumOf6Functor {
- int operator()(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
-};
-
-string Concat6(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6) {
- return string(s1) + s2 + s3 + s4 + s5 + s6;
-}
-
-string Concat7(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
-}
-
-string Concat8(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
-}
-
-string Concat9(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
-}
-
-string Concat10(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9,
- const char* s10) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
-}
-
-// A helper that turns the type of a C-string literal from const
-// char[N] to const char*.
-inline const char* CharPtr(const char* s) { return s; }
-
-// Tests InvokeArgument<N>(...).
-
-// Tests using InvokeArgument with a nullary function.
-TEST(InvokeArgumentTest, Function0) {
- Action<int(int, int(*)())> a = InvokeArgument<1>(); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple(2, &Nullary)));
-}
-
-// Tests using InvokeArgument with a unary function.
-TEST(InvokeArgumentTest, Functor1) {
- Action<int(UnaryFunctor)> a = InvokeArgument<0>(true); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple(UnaryFunctor())));
-}
-
-// Tests using InvokeArgument with a 5-ary function.
-TEST(InvokeArgumentTest, Function5) {
- Action<int(int(*)(int, int, int, int, int))> a = // NOLINT
- InvokeArgument<0>(10000, 2000, 300, 40, 5);
- EXPECT_EQ(12345, a.Perform(make_tuple(&SumOf5)));
-}
-
-// Tests using InvokeArgument with a 5-ary functor.
-TEST(InvokeArgumentTest, Functor5) {
- Action<int(SumOf5Functor)> a = // NOLINT
- InvokeArgument<0>(10000, 2000, 300, 40, 5);
- EXPECT_EQ(12345, a.Perform(make_tuple(SumOf5Functor())));
-}
-
-// Tests using InvokeArgument with a 6-ary function.
-TEST(InvokeArgumentTest, Function6) {
- Action<int(int(*)(int, int, int, int, int, int))> a = // NOLINT
- InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6);
- EXPECT_EQ(123456, a.Perform(make_tuple(&SumOf6)));
-}
-
-// Tests using InvokeArgument with a 6-ary functor.
-TEST(InvokeArgumentTest, Functor6) {
- Action<int(SumOf6Functor)> a = // NOLINT
- InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6);
- EXPECT_EQ(123456, a.Perform(make_tuple(SumOf6Functor())));
-}
-
-// Tests using InvokeArgument with a 7-ary function.
-TEST(InvokeArgumentTest, Function7) {
- Action<string(string(*)(const char*, const char*, const char*,
- const char*, const char*, const char*,
- const char*))> a =
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7");
- EXPECT_EQ("1234567", a.Perform(make_tuple(&Concat7)));
-}
-
-// Tests using InvokeArgument with a 8-ary function.
-TEST(InvokeArgumentTest, Function8) {
- Action<string(string(*)(const char*, const char*, const char*,
- const char*, const char*, const char*,
- const char*, const char*))> a =
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8");
- EXPECT_EQ("12345678", a.Perform(make_tuple(&Concat8)));
-}
-
-// Tests using InvokeArgument with a 9-ary function.
-TEST(InvokeArgumentTest, Function9) {
- Action<string(string(*)(const char*, const char*, const char*,
- const char*, const char*, const char*,
- const char*, const char*, const char*))> a =
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9");
- EXPECT_EQ("123456789", a.Perform(make_tuple(&Concat9)));
-}
-
-// Tests using InvokeArgument with a 10-ary function.
-TEST(InvokeArgumentTest, Function10) {
- Action<string(string(*)(const char*, const char*, const char*,
- const char*, const char*, const char*,
- const char*, const char*, const char*,
- const char*))> a =
- InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
- EXPECT_EQ("1234567890", a.Perform(make_tuple(&Concat10)));
-}
-
-// Tests using InvokeArgument with a function that takes a pointer argument.
-TEST(InvokeArgumentTest, ByPointerFunction) {
- Action<const char*(const char*(*)(const char* input, short n))> a = // NOLINT
- InvokeArgument<0>(static_cast<const char*>("Hi"), Short(1));
- EXPECT_STREQ("i", a.Perform(make_tuple(&Binary)));
-}
-
-// Tests using InvokeArgument with a function that takes a const char*
-// by passing it a C-string literal.
-TEST(InvokeArgumentTest, FunctionWithCStringLiteral) {
- Action<const char*(const char*(*)(const char* input, short n))> a = // NOLINT
- InvokeArgument<0>("Hi", Short(1));
- EXPECT_STREQ("i", a.Perform(make_tuple(&Binary)));
-}
-
-// Tests using InvokeArgument with a function that takes a const reference.
-TEST(InvokeArgumentTest, ByConstReferenceFunction) {
- Action<bool(bool(*function)(const string& s))> a = // NOLINT
- InvokeArgument<0>(string("Hi"));
- // When action 'a' is constructed, it makes a copy of the temporary
- // string object passed to it, so it's OK to use 'a' later, when the
- // temporary object has already died.
- EXPECT_TRUE(a.Perform(make_tuple(&ByConstRef)));
-}
-
-// Tests using InvokeArgument with ByRef() and a function that takes a
-// const reference.
-TEST(InvokeArgumentTest, ByExplicitConstReferenceFunction) {
- Action<bool(bool(*)(const double& x))> a = // NOLINT
- InvokeArgument<0>(ByRef(g_double));
- // The above line calls ByRef() on a const value.
- EXPECT_TRUE(a.Perform(make_tuple(&ReferencesGlobalDouble)));
-
- double x = 0;
- a = InvokeArgument<0>(ByRef(x)); // This calls ByRef() on a non-const.
- EXPECT_FALSE(a.Perform(make_tuple(&ReferencesGlobalDouble)));
-}
-
-// Tests using WithArgs and with an action that takes 1 argument.
-TEST(WithArgsTest, OneArg) {
- Action<bool(double x, int n)> a = WithArgs<1>(Invoke(Unary)); // NOLINT
- EXPECT_TRUE(a.Perform(make_tuple(1.5, -1)));
- EXPECT_FALSE(a.Perform(make_tuple(1.5, 1)));
-}
-
-// Tests using WithArgs with an action that takes 2 arguments.
-TEST(WithArgsTest, TwoArgs) {
- Action<const char*(const char* s, double x, short n)> a =
- WithArgs<0, 2>(Invoke(Binary));
- const char s[] = "Hello";
- EXPECT_EQ(s + 2, a.Perform(make_tuple(CharPtr(s), 0.5, Short(2))));
-}
-
-// Tests using WithArgs with an action that takes 3 arguments.
-TEST(WithArgsTest, ThreeArgs) {
- Action<int(int, double, char, short)> a = // NOLINT
- WithArgs<0, 2, 3>(Invoke(Ternary));
- EXPECT_EQ(123, a.Perform(make_tuple(100, 6.5, Char(20), Short(3))));
-}
-
-// Tests using WithArgs with an action that takes 4 arguments.
-TEST(WithArgsTest, FourArgs) {
- Action<string(const char*, const char*, double, const char*, const char*)> a =
- WithArgs<4, 3, 1, 0>(Invoke(Concat4));
- EXPECT_EQ("4310", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), 2.5,
- CharPtr("3"), CharPtr("4"))));
-}
-
-// Tests using WithArgs with an action that takes 5 arguments.
-TEST(WithArgsTest, FiveArgs) {
- Action<string(const char*, const char*, const char*,
- const char*, const char*)> a =
- WithArgs<4, 3, 2, 1, 0>(Invoke(Concat5));
- EXPECT_EQ("43210",
- a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
- CharPtr("3"), CharPtr("4"))));
-}
-
-// Tests using WithArgs with an action that takes 6 arguments.
-TEST(WithArgsTest, SixArgs) {
- Action<string(const char*, const char*, const char*)> a =
- WithArgs<0, 1, 2, 2, 1, 0>(Invoke(Concat6));
- EXPECT_EQ("012210",
- a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"))));
-}
-
-// Tests using WithArgs with an action that takes 7 arguments.
-TEST(WithArgsTest, SevenArgs) {
- Action<string(const char*, const char*, const char*, const char*)> a =
- WithArgs<0, 1, 2, 3, 2, 1, 0>(Invoke(Concat7));
- EXPECT_EQ("0123210",
- a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
- CharPtr("3"))));
-}
-
-// Tests using WithArgs with an action that takes 8 arguments.
-TEST(WithArgsTest, EightArgs) {
- Action<string(const char*, const char*, const char*, const char*)> a =
- WithArgs<0, 1, 2, 3, 0, 1, 2, 3>(Invoke(Concat8));
- EXPECT_EQ("01230123",
- a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
- CharPtr("3"))));
-}
-
-// Tests using WithArgs with an action that takes 9 arguments.
-TEST(WithArgsTest, NineArgs) {
- Action<string(const char*, const char*, const char*, const char*)> a =
- WithArgs<0, 1, 2, 3, 1, 2, 3, 2, 3>(Invoke(Concat9));
- EXPECT_EQ("012312323",
- a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
- CharPtr("3"))));
-}
-
-// Tests using WithArgs with an action that takes 10 arguments.
-TEST(WithArgsTest, TenArgs) {
- Action<string(const char*, const char*, const char*, const char*)> a =
- WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(Invoke(Concat10));
- EXPECT_EQ("0123210123",
- a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
- CharPtr("3"))));
-}
-
-// Tests using WithArgs with an action that is not Invoke().
-class SubstractAction : public ActionInterface<int(int, int)> { // NOLINT
- public:
- virtual int Perform(const tuple<int, int>& args) {
- return get<0>(args) - get<1>(args);
- }
-};
-
-TEST(WithArgsTest, NonInvokeAction) {
- Action<int(const string&, int, int)> a = // NOLINT
- WithArgs<2, 1>(MakeAction(new SubstractAction));
- EXPECT_EQ(8, a.Perform(make_tuple(CharPtr("hi"), 2, 10)));
-}
-
-// Tests using WithArgs to pass all original arguments in the original order.
-TEST(WithArgsTest, Identity) {
- Action<int(int x, char y, short z)> a = // NOLINT
- WithArgs<0, 1, 2>(Invoke(Ternary));
- EXPECT_EQ(123, a.Perform(make_tuple(100, Char(20), Short(3))));
-}
-
-// Tests using WithArgs with repeated arguments.
-TEST(WithArgsTest, RepeatedArguments) {
- Action<int(bool, int m, int n)> a = // NOLINT
- WithArgs<1, 1, 1, 1>(Invoke(SumOf4));
- EXPECT_EQ(4, a.Perform(make_tuple(false, 1, 10)));
-}
-
-// Tests using WithArgs with reversed argument order.
-TEST(WithArgsTest, ReversedArgumentOrder) {
- Action<const char*(short n, const char* input)> a = // NOLINT
- WithArgs<1, 0>(Invoke(Binary));
- const char s[] = "Hello";
- EXPECT_EQ(s + 2, a.Perform(make_tuple(Short(2), CharPtr(s))));
-}
-
-// Tests using WithArgs with compatible, but not identical, argument types.
-TEST(WithArgsTest, ArgsOfCompatibleTypes) {
- Action<long(short x, char y, double z, char c)> a = // NOLINT
- WithArgs<0, 1, 3>(Invoke(Ternary));
- EXPECT_EQ(123, a.Perform(make_tuple(Short(100), Char(20), 5.6, Char(3))));
-}
-
-// Tests using WithArgs with an action that returns void.
-TEST(WithArgsTest, VoidAction) {
- Action<void(double x, char c, int n)> a = WithArgs<2, 1>(Invoke(VoidBinary));
- g_done = false;
- a.Perform(make_tuple(1.5, 'a', 3));
- EXPECT_TRUE(g_done);
-}
-
-// Tests DoAll(a1, a2).
-TEST(DoAllTest, TwoActions) {
- int n = 0;
- Action<int(int*)> a = DoAll(SetArgPointee<0>(1), // NOLINT
- Return(2));
- EXPECT_EQ(2, a.Perform(make_tuple(&n)));
- EXPECT_EQ(1, n);
-}
-
-// Tests DoAll(a1, a2, a3).
-TEST(DoAllTest, ThreeActions) {
- int m = 0, n = 0;
- Action<int(int*, int*)> a = DoAll(SetArgPointee<0>(1), // NOLINT
- SetArgPointee<1>(2),
- Return(3));
- EXPECT_EQ(3, a.Perform(make_tuple(&m, &n)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
-}
-
-// Tests DoAll(a1, a2, a3, a4).
-TEST(DoAllTest, FourActions) {
- int m = 0, n = 0;
- char ch = '\0';
- Action<int(int*, int*, char*)> a = // NOLINT
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- Return(3));
- EXPECT_EQ(3, a.Perform(make_tuple(&m, &n, &ch)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', ch);
-}
-
-// Tests DoAll(a1, a2, a3, a4, a5).
-TEST(DoAllTest, FiveActions) {
- int m = 0, n = 0;
- char a = '\0', b = '\0';
- Action<int(int*, int*, char*, char*)> action = // NOLINT
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- SetArgPointee<3>('b'),
- Return(3));
- EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', a);
- EXPECT_EQ('b', b);
-}
-
-// Tests DoAll(a1, a2, ..., a6).
-TEST(DoAllTest, SixActions) {
- int m = 0, n = 0;
- char a = '\0', b = '\0', c = '\0';
- Action<int(int*, int*, char*, char*, char*)> action = // NOLINT
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- SetArgPointee<3>('b'),
- SetArgPointee<4>('c'),
- Return(3));
- EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', a);
- EXPECT_EQ('b', b);
- EXPECT_EQ('c', c);
-}
-
-// Tests DoAll(a1, a2, ..., a7).
-TEST(DoAllTest, SevenActions) {
- int m = 0, n = 0;
- char a = '\0', b = '\0', c = '\0', d = '\0';
- Action<int(int*, int*, char*, char*, char*, char*)> action = // NOLINT
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- SetArgPointee<3>('b'),
- SetArgPointee<4>('c'),
- SetArgPointee<5>('d'),
- Return(3));
- EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', a);
- EXPECT_EQ('b', b);
- EXPECT_EQ('c', c);
- EXPECT_EQ('d', d);
-}
-
-// Tests DoAll(a1, a2, ..., a8).
-TEST(DoAllTest, EightActions) {
- int m = 0, n = 0;
- char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0';
- Action<int(int*, int*, char*, char*, char*, char*, // NOLINT
- char*)> action =
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- SetArgPointee<3>('b'),
- SetArgPointee<4>('c'),
- SetArgPointee<5>('d'),
- SetArgPointee<6>('e'),
- Return(3));
- EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', a);
- EXPECT_EQ('b', b);
- EXPECT_EQ('c', c);
- EXPECT_EQ('d', d);
- EXPECT_EQ('e', e);
-}
-
-// Tests DoAll(a1, a2, ..., a9).
-TEST(DoAllTest, NineActions) {
- int m = 0, n = 0;
- char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0', f = '\0';
- Action<int(int*, int*, char*, char*, char*, char*, // NOLINT
- char*, char*)> action =
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- SetArgPointee<3>('b'),
- SetArgPointee<4>('c'),
- SetArgPointee<5>('d'),
- SetArgPointee<6>('e'),
- SetArgPointee<7>('f'),
- Return(3));
- EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', a);
- EXPECT_EQ('b', b);
- EXPECT_EQ('c', c);
- EXPECT_EQ('d', d);
- EXPECT_EQ('e', e);
- EXPECT_EQ('f', f);
-}
-
-// Tests DoAll(a1, a2, ..., a10).
-TEST(DoAllTest, TenActions) {
- int m = 0, n = 0;
- char a = '\0', b = '\0', c = '\0', d = '\0';
- char e = '\0', f = '\0', g = '\0';
- Action<int(int*, int*, char*, char*, char*, char*, // NOLINT
- char*, char*, char*)> action =
- DoAll(SetArgPointee<0>(1),
- SetArgPointee<1>(2),
- SetArgPointee<2>('a'),
- SetArgPointee<3>('b'),
- SetArgPointee<4>('c'),
- SetArgPointee<5>('d'),
- SetArgPointee<6>('e'),
- SetArgPointee<7>('f'),
- SetArgPointee<8>('g'),
- Return(3));
- EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f, &g)));
- EXPECT_EQ(1, m);
- EXPECT_EQ(2, n);
- EXPECT_EQ('a', a);
- EXPECT_EQ('b', b);
- EXPECT_EQ('c', c);
- EXPECT_EQ('d', d);
- EXPECT_EQ('e', e);
- EXPECT_EQ('f', f);
- EXPECT_EQ('g', g);
-}
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Tests the ACTION*() macro family.
-
-// Tests that ACTION() can define an action that doesn't reference the
-// mock function arguments.
-ACTION(Return5) { return 5; }
-
-TEST(ActionMacroTest, WorksWhenNotReferencingArguments) {
- Action<double()> a1 = Return5();
- EXPECT_DOUBLE_EQ(5, a1.Perform(make_tuple()));
-
- Action<int(double, bool)> a2 = Return5();
- EXPECT_EQ(5, a2.Perform(make_tuple(1, true)));
-}
-
-// Tests that ACTION() can define an action that returns void.
-ACTION(IncrementArg1) { (*arg1)++; }
-
-TEST(ActionMacroTest, WorksWhenReturningVoid) {
- Action<void(int, int*)> a1 = IncrementArg1();
- int n = 0;
- a1.Perform(make_tuple(5, &n));
- EXPECT_EQ(1, n);
-}
-
-// Tests that the body of ACTION() can reference the type of the
-// argument.
-ACTION(IncrementArg2) {
- StaticAssertTypeEq<int*, arg2_type>();
- arg2_type temp = arg2;
- (*temp)++;
-}
-
-TEST(ActionMacroTest, CanReferenceArgumentType) {
- Action<void(int, bool, int*)> a1 = IncrementArg2();
- int n = 0;
- a1.Perform(make_tuple(5, false, &n));
- EXPECT_EQ(1, n);
-}
-
-// Tests that the body of ACTION() can reference the argument tuple
-// via args_type and args.
-ACTION(Sum2) {
- StaticAssertTypeEq< ::std::tr1::tuple<int, char, int*>, args_type>();
- args_type args_copy = args;
- return get<0>(args_copy) + get<1>(args_copy);
-}
-
-TEST(ActionMacroTest, CanReferenceArgumentTuple) {
- Action<int(int, char, int*)> a1 = Sum2();
- int dummy = 0;
- EXPECT_EQ(11, a1.Perform(make_tuple(5, Char(6), &dummy)));
-}
-
-// Tests that the body of ACTION() can reference the mock function
-// type.
-int Dummy(bool flag) { return flag? 1 : 0; }
-
-ACTION(InvokeDummy) {
- StaticAssertTypeEq<int(bool), function_type>();
- function_type* fp = &Dummy;
- return (*fp)(true);
-}
-
-TEST(ActionMacroTest, CanReferenceMockFunctionType) {
- Action<int(bool)> a1 = InvokeDummy();
- EXPECT_EQ(1, a1.Perform(make_tuple(true)));
- EXPECT_EQ(1, a1.Perform(make_tuple(false)));
-}
-
-// Tests that the body of ACTION() can reference the mock function's
-// return type.
-ACTION(InvokeDummy2) {
- StaticAssertTypeEq<int, return_type>();
- return_type result = Dummy(true);
- return result;
-}
-
-TEST(ActionMacroTest, CanReferenceMockFunctionReturnType) {
- Action<int(bool)> a1 = InvokeDummy2();
- EXPECT_EQ(1, a1.Perform(make_tuple(true)));
- EXPECT_EQ(1, a1.Perform(make_tuple(false)));
-}
-
-// Tests that ACTION() works for arguments passed by const reference.
-ACTION(ReturnAddrOfConstBoolReferenceArg) {
- StaticAssertTypeEq<const bool&, arg1_type>();
- return &arg1;
-}
-
-TEST(ActionMacroTest, WorksForConstReferenceArg) {
- Action<const bool*(int, const bool&)> a = ReturnAddrOfConstBoolReferenceArg();
- const bool b = false;
- EXPECT_EQ(&b, a.Perform(tuple<int, const bool&>(0, b)));
-}
-
-// Tests that ACTION() works for arguments passed by non-const reference.
-ACTION(ReturnAddrOfIntReferenceArg) {
- StaticAssertTypeEq<int&, arg0_type>();
- return &arg0;
-}
-
-TEST(ActionMacroTest, WorksForNonConstReferenceArg) {
- Action<int*(int&, bool, int)> a = ReturnAddrOfIntReferenceArg();
- int n = 0;
- EXPECT_EQ(&n, a.Perform(tuple<int&, bool, int>(n, true, 1)));
-}
-
-// Tests that ACTION() can be used in a namespace.
-namespace action_test {
-ACTION(Sum) { return arg0 + arg1; }
-} // namespace action_test
-
-TEST(ActionMacroTest, WorksInNamespace) {
- Action<int(int, int)> a1 = action_test::Sum();
- EXPECT_EQ(3, a1.Perform(make_tuple(1, 2)));
-}
-
-// Tests that the same ACTION definition works for mock functions with
-// different argument numbers.
-ACTION(PlusTwo) { return arg0 + 2; }
-
-TEST(ActionMacroTest, WorksForDifferentArgumentNumbers) {
- Action<int(int)> a1 = PlusTwo();
- EXPECT_EQ(4, a1.Perform(make_tuple(2)));
-
- Action<double(float, void*)> a2 = PlusTwo();
- int dummy;
- EXPECT_DOUBLE_EQ(6, a2.Perform(make_tuple(4.0f, &dummy)));
-}
-
-// Tests that ACTION_P can define a parameterized action.
-ACTION_P(Plus, n) { return arg0 + n; }
-
-TEST(ActionPMacroTest, DefinesParameterizedAction) {
- Action<int(int m, bool t)> a1 = Plus(9);
- EXPECT_EQ(10, a1.Perform(make_tuple(1, true)));
-}
-
-// Tests that the body of ACTION_P can reference the argument types
-// and the parameter type.
-ACTION_P(TypedPlus, n) {
- arg0_type t1 = arg0;
- n_type t2 = n;
- return t1 + t2;
-}
-
-TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes) {
- Action<int(char m, bool t)> a1 = TypedPlus(9);
- EXPECT_EQ(10, a1.Perform(make_tuple(Char(1), true)));
-}
-
-// Tests that a parameterized action can be used in any mock function
-// whose type is compatible.
-TEST(ActionPMacroTest, WorksInCompatibleMockFunction) {
- Action<std::string(const std::string& s)> a1 = Plus("tail");
- const std::string re = "re";
- EXPECT_EQ("retail", a1.Perform(make_tuple(re)));
-}
-
-// Tests that we can use ACTION*() to define actions overloaded on the
-// number of parameters.
-
-ACTION(OverloadedAction) { return arg0 ? arg1 : "hello"; }
-
-ACTION_P(OverloadedAction, default_value) {
- return arg0 ? arg1 : default_value;
-}
-
-ACTION_P2(OverloadedAction, true_value, false_value) {
- return arg0 ? true_value : false_value;
-}
-
-TEST(ActionMacroTest, CanDefineOverloadedActions) {
- typedef Action<const char*(bool, const char*)> MyAction;
-
- const MyAction a1 = OverloadedAction();
- EXPECT_STREQ("hello", a1.Perform(make_tuple(false, CharPtr("world"))));
- EXPECT_STREQ("world", a1.Perform(make_tuple(true, CharPtr("world"))));
-
- const MyAction a2 = OverloadedAction("hi");
- EXPECT_STREQ("hi", a2.Perform(make_tuple(false, CharPtr("world"))));
- EXPECT_STREQ("world", a2.Perform(make_tuple(true, CharPtr("world"))));
-
- const MyAction a3 = OverloadedAction("hi", "you");
- EXPECT_STREQ("hi", a3.Perform(make_tuple(true, CharPtr("world"))));
- EXPECT_STREQ("you", a3.Perform(make_tuple(false, CharPtr("world"))));
-}
-
-// Tests ACTION_Pn where n >= 3.
-
-ACTION_P3(Plus, m, n, k) { return arg0 + m + n + k; }
-
-TEST(ActionPnMacroTest, WorksFor3Parameters) {
- Action<double(int m, bool t)> a1 = Plus(100, 20, 3.4);
- EXPECT_DOUBLE_EQ(3123.4, a1.Perform(make_tuple(3000, true)));
-
- Action<std::string(const std::string& s)> a2 = Plus("tail", "-", ">");
- const std::string re = "re";
- EXPECT_EQ("retail->", a2.Perform(make_tuple(re)));
-}
-
-ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; }
-
-TEST(ActionPnMacroTest, WorksFor4Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4, a1.Perform(make_tuple(10)));
-}
-
-ACTION_P5(Plus, p0, p1, p2, p3, p4) { return arg0 + p0 + p1 + p2 + p3 + p4; }
-
-TEST(ActionPnMacroTest, WorksFor5Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4, 5);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5, a1.Perform(make_tuple(10)));
-}
-
-ACTION_P6(Plus, p0, p1, p2, p3, p4, p5) {
- return arg0 + p0 + p1 + p2 + p3 + p4 + p5;
-}
-
-TEST(ActionPnMacroTest, WorksFor6Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6, a1.Perform(make_tuple(10)));
-}
-
-ACTION_P7(Plus, p0, p1, p2, p3, p4, p5, p6) {
- return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6;
-}
-
-TEST(ActionPnMacroTest, WorksFor7Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7, a1.Perform(make_tuple(10)));
-}
-
-ACTION_P8(Plus, p0, p1, p2, p3, p4, p5, p6, p7) {
- return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7;
-}
-
-TEST(ActionPnMacroTest, WorksFor8Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8, a1.Perform(make_tuple(10)));
-}
-
-ACTION_P9(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8) {
- return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8;
-}
-
-TEST(ActionPnMacroTest, WorksFor9Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9, a1.Perform(make_tuple(10)));
-}
-
-ACTION_P10(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8, last_param) {
- arg0_type t0 = arg0;
- last_param_type t9 = last_param;
- return t0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + t9;
-}
-
-TEST(ActionPnMacroTest, WorksFor10Parameters) {
- Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
- EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10,
- a1.Perform(make_tuple(10)));
-}
-
-// Tests that the action body can promote the parameter types.
-
-ACTION_P2(PadArgument, prefix, suffix) {
- // The following lines promote the two parameters to desired types.
- std::string prefix_str(prefix);
- char suffix_char = static_cast<char>(suffix);
- return prefix_str + arg0 + suffix_char;
-}
-
-TEST(ActionPnMacroTest, SimpleTypePromotion) {
- Action<std::string(const char*)> no_promo =
- PadArgument(std::string("foo"), 'r');
- Action<std::string(const char*)> promo =
- PadArgument("foo", static_cast<int>('r'));
- EXPECT_EQ("foobar", no_promo.Perform(make_tuple(CharPtr("ba"))));
- EXPECT_EQ("foobar", promo.Perform(make_tuple(CharPtr("ba"))));
-}
-
-// Tests that we can partially restrict parameter types using a
-// straight-forward pattern.
-
-// Defines a generic action that doesn't restrict the types of its
-// parameters.
-ACTION_P3(ConcatImpl, a, b, c) {
- std::stringstream ss;
- ss << a << b << c;
- return ss.str();
-}
-
-// Next, we try to restrict that either the first parameter is a
-// string, or the second parameter is an int.
-
-// Defines a partially specialized wrapper that restricts the first
-// parameter to std::string.
-template <typename T1, typename T2>
-// ConcatImplActionP3 is the class template ACTION_P3 uses to
-// implement ConcatImpl. We shouldn't change the name as this
-// pattern requires the user to use it directly.
-ConcatImplActionP3<std::string, T1, T2>
-Concat(const std::string& a, T1 b, T2 c) {
- if (true) {
- // This branch verifies that ConcatImpl() can be invoked without
- // explicit template arguments.
- return ConcatImpl(a, b, c);
- } else {
- // This branch verifies that ConcatImpl() can also be invoked with
- // explicit template arguments. It doesn't really need to be
- // executed as this is a compile-time verification.
- return ConcatImpl<std::string, T1, T2>(a, b, c);
- }
-}
-
-// Defines another partially specialized wrapper that restricts the
-// second parameter to int.
-template <typename T1, typename T2>
-ConcatImplActionP3<T1, int, T2>
-Concat(T1 a, int b, T2 c) {
- return ConcatImpl(a, b, c);
-}
-
-TEST(ActionPnMacroTest, CanPartiallyRestrictParameterTypes) {
- Action<const std::string()> a1 = Concat("Hello", "1", 2);
- EXPECT_EQ("Hello12", a1.Perform(make_tuple()));
-
- a1 = Concat(1, 2, 3);
- EXPECT_EQ("123", a1.Perform(make_tuple()));
-}
-
-// Verifies the type of an ACTION*.
-
-ACTION(DoFoo) {}
-ACTION_P(DoFoo, p) {}
-ACTION_P2(DoFoo, p0, p1) {}
-
-TEST(ActionPnMacroTest, TypesAreCorrect) {
- // DoFoo() must be assignable to a DoFooAction variable.
- DoFooAction a0 = DoFoo();
-
- // DoFoo(1) must be assignable to a DoFooActionP variable.
- DoFooActionP<int> a1 = DoFoo(1);
-
- // DoFoo(p1, ..., pk) must be assignable to a DoFooActionPk
- // variable, and so on.
- DoFooActionP2<int, char> a2 = DoFoo(1, '2');
- PlusActionP3<int, int, char> a3 = Plus(1, 2, '3');
- PlusActionP4<int, int, int, char> a4 = Plus(1, 2, 3, '4');
- PlusActionP5<int, int, int, int, char> a5 = Plus(1, 2, 3, 4, '5');
- PlusActionP6<int, int, int, int, int, char> a6 = Plus(1, 2, 3, 4, 5, '6');
- PlusActionP7<int, int, int, int, int, int, char> a7 =
- Plus(1, 2, 3, 4, 5, 6, '7');
- PlusActionP8<int, int, int, int, int, int, int, char> a8 =
- Plus(1, 2, 3, 4, 5, 6, 7, '8');
- PlusActionP9<int, int, int, int, int, int, int, int, char> a9 =
- Plus(1, 2, 3, 4, 5, 6, 7, 8, '9');
- PlusActionP10<int, int, int, int, int, int, int, int, int, char> a10 =
- Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, '0');
-}
-
-// Tests that an ACTION_P*() action can be explicitly instantiated
-// with reference-typed parameters.
-
-ACTION_P(Plus1, x) { return x; }
-ACTION_P2(Plus2, x, y) { return x + y; }
-ACTION_P3(Plus3, x, y, z) { return x + y + z; }
-ACTION_P10(Plus10, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
- return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9;
-}
-
-TEST(ActionPnMacroTest, CanExplicitlyInstantiateWithReferenceTypes) {
- int x = 1, y = 2, z = 3;
- const tuple<> empty = make_tuple();
-
- Action<int()> a = Plus1<int&>(x);
- EXPECT_EQ(1, a.Perform(empty));
-
- a = Plus2<const int&, int&>(x, y);
- EXPECT_EQ(3, a.Perform(empty));
-
- a = Plus3<int&, const int&, int&>(x, y, z);
- EXPECT_EQ(6, a.Perform(empty));
-
- int n[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
- a = Plus10<const int&, int&, const int&, int&, const int&, int&, const int&,
- int&, const int&, int&>(n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7],
- n[8], n[9]);
- EXPECT_EQ(55, a.Perform(empty));
-}
-
-class NullaryConstructorClass {
- public:
- NullaryConstructorClass() : value_(123) {}
- int value_;
-};
-
-// Tests using ReturnNew() with a nullary constructor.
-TEST(ReturnNewTest, NoArgs) {
- Action<NullaryConstructorClass*()> a = ReturnNew<NullaryConstructorClass>();
- NullaryConstructorClass* c = a.Perform(make_tuple());
- EXPECT_EQ(123, c->value_);
- delete c;
-}
-
-class UnaryConstructorClass {
- public:
- explicit UnaryConstructorClass(int value) : value_(value) {}
- int value_;
-};
-
-// Tests using ReturnNew() with a unary constructor.
-TEST(ReturnNewTest, Unary) {
- Action<UnaryConstructorClass*()> a = ReturnNew<UnaryConstructorClass>(4000);
- UnaryConstructorClass* c = a.Perform(make_tuple());
- EXPECT_EQ(4000, c->value_);
- delete c;
-}
-
-TEST(ReturnNewTest, UnaryWorksWhenMockMethodHasArgs) {
- Action<UnaryConstructorClass*(bool, int)> a =
- ReturnNew<UnaryConstructorClass>(4000);
- UnaryConstructorClass* c = a.Perform(make_tuple(false, 5));
- EXPECT_EQ(4000, c->value_);
- delete c;
-}
-
-TEST(ReturnNewTest, UnaryWorksWhenMockMethodReturnsPointerToConst) {
- Action<const UnaryConstructorClass*()> a =
- ReturnNew<UnaryConstructorClass>(4000);
- const UnaryConstructorClass* c = a.Perform(make_tuple());
- EXPECT_EQ(4000, c->value_);
- delete c;
-}
-
-class TenArgConstructorClass {
- public:
- TenArgConstructorClass(int a1, int a2, int a3, int a4, int a5,
- int a6, int a7, int a8, int a9, int a10)
- : value_(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10) {
- }
- int value_;
-};
-
-// Tests using ReturnNew() with a 10-argument constructor.
-TEST(ReturnNewTest, ConstructorThatTakes10Arguments) {
- Action<TenArgConstructorClass*()> a =
- ReturnNew<TenArgConstructorClass>(1000000000, 200000000, 30000000,
- 4000000, 500000, 60000,
- 7000, 800, 90, 0);
- TenArgConstructorClass* c = a.Perform(make_tuple());
- EXPECT_EQ(1234567890, c->value_);
- delete c;
-}
-
-// Tests that ACTION_TEMPLATE works when there is no value parameter.
-ACTION_TEMPLATE(CreateNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_0_VALUE_PARAMS()) {
- return new T;
-}
-
-TEST(ActionTemplateTest, WorksWithoutValueParam) {
- const Action<int*()> a = CreateNew<int>();
- int* p = a.Perform(make_tuple());
- delete p;
-}
-
-// Tests that ACTION_TEMPLATE works when there are value parameters.
-ACTION_TEMPLATE(CreateNew,
- HAS_1_TEMPLATE_PARAMS(typename, T),
- AND_1_VALUE_PARAMS(a0)) {
- return new T(a0);
-}
-
-TEST(ActionTemplateTest, WorksWithValueParams) {
- const Action<int*()> a = CreateNew<int>(42);
- int* p = a.Perform(make_tuple());
- EXPECT_EQ(42, *p);
- delete p;
-}
-
-// Tests that ACTION_TEMPLATE works for integral template parameters.
-ACTION_TEMPLATE(MyDeleteArg,
- HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- delete std::tr1::get<k>(args);
-}
-
-// Resets a bool variable in the destructor.
-class BoolResetter {
- public:
- explicit BoolResetter(bool* value) : value_(value) {}
- ~BoolResetter() { *value_ = false; }
- private:
- bool* value_;
-};
-
-TEST(ActionTemplateTest, WorksForIntegralTemplateParams) {
- const Action<void(int*, BoolResetter*)> a = MyDeleteArg<1>();
- int n = 0;
- bool b = true;
- BoolResetter* resetter = new BoolResetter(&b);
- a.Perform(make_tuple(&n, resetter));
- EXPECT_FALSE(b); // Verifies that resetter is deleted.
-}
-
-// Tests that ACTION_TEMPLATES works for template template parameters.
-ACTION_TEMPLATE(ReturnSmartPointer,
- HAS_1_TEMPLATE_PARAMS(template <typename Pointee> class,
- Pointer),
- AND_1_VALUE_PARAMS(pointee)) {
- return Pointer<pointee_type>(new pointee_type(pointee));
-}
-
-TEST(ActionTemplateTest, WorksForTemplateTemplateParameters) {
- using ::testing::internal::linked_ptr;
- const Action<linked_ptr<int>()> a = ReturnSmartPointer<linked_ptr>(42);
- linked_ptr<int> p = a.Perform(make_tuple());
- EXPECT_EQ(42, *p);
-}
-
-// Tests that ACTION_TEMPLATE works for 10 template parameters.
-template <typename T1, typename T2, typename T3, int k4, bool k5,
- unsigned int k6, typename T7, typename T8, typename T9>
-struct GiantTemplate {
- public:
- explicit GiantTemplate(int a_value) : value(a_value) {}
- int value;
-};
-
-ACTION_TEMPLATE(ReturnGiant,
- HAS_10_TEMPLATE_PARAMS(
- typename, T1,
- typename, T2,
- typename, T3,
- int, k4,
- bool, k5,
- unsigned int, k6,
- class, T7,
- class, T8,
- class, T9,
- template <typename T> class, T10),
- AND_1_VALUE_PARAMS(value)) {
- return GiantTemplate<T10<T1>, T2, T3, k4, k5, k6, T7, T8, T9>(value);
-}
-
-TEST(ActionTemplateTest, WorksFor10TemplateParameters) {
- using ::testing::internal::linked_ptr;
- typedef GiantTemplate<linked_ptr<int>, bool, double, 5,
- true, 6, char, unsigned, int> Giant;
- const Action<Giant()> a = ReturnGiant<
- int, bool, double, 5, true, 6, char, unsigned, int, linked_ptr>(42);
- Giant giant = a.Perform(make_tuple());
- EXPECT_EQ(42, giant.value);
-}
-
-// Tests that ACTION_TEMPLATE works for 10 value parameters.
-ACTION_TEMPLATE(ReturnSum,
- HAS_1_TEMPLATE_PARAMS(typename, Number),
- AND_10_VALUE_PARAMS(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)) {
- return static_cast<Number>(v1) + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10;
-}
-
-TEST(ActionTemplateTest, WorksFor10ValueParameters) {
- const Action<int()> a = ReturnSum<int>(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
- EXPECT_EQ(55, a.Perform(make_tuple()));
-}
-
-// Tests that ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded
-// on the number of value parameters.
-
-ACTION(ReturnSum) { return 0; }
-
-ACTION_P(ReturnSum, x) { return x; }
-
-ACTION_TEMPLATE(ReturnSum,
- HAS_1_TEMPLATE_PARAMS(typename, Number),
- AND_2_VALUE_PARAMS(v1, v2)) {
- return static_cast<Number>(v1) + v2;
-}
-
-ACTION_TEMPLATE(ReturnSum,
- HAS_1_TEMPLATE_PARAMS(typename, Number),
- AND_3_VALUE_PARAMS(v1, v2, v3)) {
- return static_cast<Number>(v1) + v2 + v3;
-}
-
-ACTION_TEMPLATE(ReturnSum,
- HAS_2_TEMPLATE_PARAMS(typename, Number, int, k),
- AND_4_VALUE_PARAMS(v1, v2, v3, v4)) {
- return static_cast<Number>(v1) + v2 + v3 + v4 + k;
-}
-
-TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) {
- const Action<int()> a0 = ReturnSum();
- const Action<int()> a1 = ReturnSum(1);
- const Action<int()> a2 = ReturnSum<int>(1, 2);
- const Action<int()> a3 = ReturnSum<int>(1, 2, 3);
- const Action<int()> a4 = ReturnSum<int, 10000>(2000, 300, 40, 5);
- EXPECT_EQ(0, a0.Perform(make_tuple()));
- EXPECT_EQ(1, a1.Perform(make_tuple()));
- EXPECT_EQ(3, a2.Perform(make_tuple()));
- EXPECT_EQ(6, a3.Perform(make_tuple()));
- EXPECT_EQ(12345, a4.Perform(make_tuple()));
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace gmock_generated_actions_test
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-function-mockers_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-function-mockers_test.cc
deleted file mode 100644
index 0d90ded72..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-function-mockers_test.cc
+++ /dev/null
@@ -1,540 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the function mocker classes.
-
-#include "gmock/gmock-generated-function-mockers.h"
-
-#include <map>
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-#if GTEST_OS_WINDOWS
-// MSDN says the header file to be included for STDMETHOD is BaseTyps.h but
-// we are getting compiler errors if we use basetyps.h, hence including
-// objbase.h for definition of STDMETHOD.
-# include <objbase.h>
-#endif // GTEST_OS_WINDOWS
-
-// There is a bug in MSVC (fixed in VS 2008) that prevents creating a
-// mock for a function with const arguments, so we don't test such
-// cases for MSVC versions older than 2008.
-#if !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
-# define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
-#endif // !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
-
-namespace testing {
-namespace gmock_generated_function_mockers_test {
-
-using testing::internal::string;
-using testing::_;
-using testing::A;
-using testing::An;
-using testing::AnyNumber;
-using testing::Const;
-using testing::DoDefault;
-using testing::Eq;
-using testing::Lt;
-using testing::MockFunction;
-using testing::Ref;
-using testing::Return;
-using testing::ReturnRef;
-using testing::TypedEq;
-
-class FooInterface {
- public:
- virtual ~FooInterface() {}
-
- virtual void VoidReturning(int x) = 0;
-
- virtual int Nullary() = 0;
- virtual bool Unary(int x) = 0;
- virtual long Binary(short x, int y) = 0; // NOLINT
- virtual int Decimal(bool b, char c, short d, int e, long f, // NOLINT
- float g, double h, unsigned i, char* j, const string& k)
- = 0;
-
- virtual bool TakesNonConstReference(int& n) = 0; // NOLINT
- virtual string TakesConstReference(const int& n) = 0;
-#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
- virtual bool TakesConst(const int x) = 0;
-#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
-
- virtual int OverloadedOnArgumentNumber() = 0;
- virtual int OverloadedOnArgumentNumber(int n) = 0;
-
- virtual int OverloadedOnArgumentType(int n) = 0;
- virtual char OverloadedOnArgumentType(char c) = 0;
-
- virtual int OverloadedOnConstness() = 0;
- virtual char OverloadedOnConstness() const = 0;
-
- virtual int TypeWithHole(int (*func)()) = 0;
- virtual int TypeWithComma(const std::map<int, string>& a_map) = 0;
-
-#if GTEST_OS_WINDOWS
- STDMETHOD_(int, CTNullary)() = 0;
- STDMETHOD_(bool, CTUnary)(int x) = 0;
- STDMETHOD_(int, CTDecimal)(bool b, char c, short d, int e, long f, // NOLINT
- float g, double h, unsigned i, char* j, const string& k) = 0;
- STDMETHOD_(char, CTConst)(int x) const = 0;
-#endif // GTEST_OS_WINDOWS
-};
-
-class MockFoo : public FooInterface {
- public:
- MockFoo() {}
-
- // Makes sure that a mock function parameter can be named.
- MOCK_METHOD1(VoidReturning, void(int n)); // NOLINT
-
- MOCK_METHOD0(Nullary, int()); // NOLINT
-
- // Makes sure that a mock function parameter can be unnamed.
- MOCK_METHOD1(Unary, bool(int)); // NOLINT
- MOCK_METHOD2(Binary, long(short, int)); // NOLINT
- MOCK_METHOD10(Decimal, int(bool, char, short, int, long, float, // NOLINT
- double, unsigned, char*, const string& str));
-
- MOCK_METHOD1(TakesNonConstReference, bool(int&)); // NOLINT
- MOCK_METHOD1(TakesConstReference, string(const int&));
-#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
- MOCK_METHOD1(TakesConst, bool(const int)); // NOLINT
-#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
- MOCK_METHOD0(OverloadedOnArgumentNumber, int()); // NOLINT
- MOCK_METHOD1(OverloadedOnArgumentNumber, int(int)); // NOLINT
-
- MOCK_METHOD1(OverloadedOnArgumentType, int(int)); // NOLINT
- MOCK_METHOD1(OverloadedOnArgumentType, char(char)); // NOLINT
-
- MOCK_METHOD0(OverloadedOnConstness, int()); // NOLINT
- MOCK_CONST_METHOD0(OverloadedOnConstness, char()); // NOLINT
-
- MOCK_METHOD1(TypeWithHole, int(int (*)())); // NOLINT
- MOCK_METHOD1(TypeWithComma, int(const std::map<int, string>&)); // NOLINT
-#if GTEST_OS_WINDOWS
- MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, CTNullary, int());
- MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTUnary, bool(int));
- MOCK_METHOD10_WITH_CALLTYPE(STDMETHODCALLTYPE, CTDecimal, int(bool b, char c,
- short d, int e, long f, float g, double h, unsigned i, char* j,
- const string& k));
- MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTConst, char(int));
-#endif // GTEST_OS_WINDOWS
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
-};
-
-class FunctionMockerTest : public testing::Test {
- protected:
- FunctionMockerTest() : foo_(&mock_foo_) {}
-
- FooInterface* const foo_;
- MockFoo mock_foo_;
-};
-
-// Tests mocking a void-returning function.
-TEST_F(FunctionMockerTest, MocksVoidFunction) {
- EXPECT_CALL(mock_foo_, VoidReturning(Lt(100)));
- foo_->VoidReturning(0);
-}
-
-// Tests mocking a nullary function.
-TEST_F(FunctionMockerTest, MocksNullaryFunction) {
- EXPECT_CALL(mock_foo_, Nullary())
- .WillOnce(DoDefault())
- .WillOnce(Return(1));
-
- EXPECT_EQ(0, foo_->Nullary());
- EXPECT_EQ(1, foo_->Nullary());
-}
-
-// Tests mocking a unary function.
-TEST_F(FunctionMockerTest, MocksUnaryFunction) {
- EXPECT_CALL(mock_foo_, Unary(Eq(2)))
- .Times(2)
- .WillOnce(Return(true));
-
- EXPECT_TRUE(foo_->Unary(2));
- EXPECT_FALSE(foo_->Unary(2));
-}
-
-// Tests mocking a binary function.
-TEST_F(FunctionMockerTest, MocksBinaryFunction) {
- EXPECT_CALL(mock_foo_, Binary(2, _))
- .WillOnce(Return(3));
-
- EXPECT_EQ(3, foo_->Binary(2, 1));
-}
-
-// Tests mocking a decimal function.
-TEST_F(FunctionMockerTest, MocksDecimalFunction) {
- EXPECT_CALL(mock_foo_, Decimal(true, 'a', 0, 0, 1L, A<float>(),
- Lt(100), 5U, NULL, "hi"))
- .WillOnce(Return(5));
-
- EXPECT_EQ(5, foo_->Decimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi"));
-}
-
-// Tests mocking a function that takes a non-const reference.
-TEST_F(FunctionMockerTest, MocksFunctionWithNonConstReferenceArgument) {
- int a = 0;
- EXPECT_CALL(mock_foo_, TakesNonConstReference(Ref(a)))
- .WillOnce(Return(true));
-
- EXPECT_TRUE(foo_->TakesNonConstReference(a));
-}
-
-// Tests mocking a function that takes a const reference.
-TEST_F(FunctionMockerTest, MocksFunctionWithConstReferenceArgument) {
- int a = 0;
- EXPECT_CALL(mock_foo_, TakesConstReference(Ref(a)))
- .WillOnce(Return("Hello"));
-
- EXPECT_EQ("Hello", foo_->TakesConstReference(a));
-}
-
-#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
-// Tests mocking a function that takes a const variable.
-TEST_F(FunctionMockerTest, MocksFunctionWithConstArgument) {
- EXPECT_CALL(mock_foo_, TakesConst(Lt(10)))
- .WillOnce(DoDefault());
-
- EXPECT_FALSE(foo_->TakesConst(5));
-}
-#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
-
-// Tests mocking functions overloaded on the number of arguments.
-TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentNumber) {
- EXPECT_CALL(mock_foo_, OverloadedOnArgumentNumber())
- .WillOnce(Return(1));
- EXPECT_CALL(mock_foo_, OverloadedOnArgumentNumber(_))
- .WillOnce(Return(2));
-
- EXPECT_EQ(2, foo_->OverloadedOnArgumentNumber(1));
- EXPECT_EQ(1, foo_->OverloadedOnArgumentNumber());
-}
-
-// Tests mocking functions overloaded on the types of argument.
-TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentType) {
- EXPECT_CALL(mock_foo_, OverloadedOnArgumentType(An<int>()))
- .WillOnce(Return(1));
- EXPECT_CALL(mock_foo_, OverloadedOnArgumentType(TypedEq<char>('a')))
- .WillOnce(Return('b'));
-
- EXPECT_EQ(1, foo_->OverloadedOnArgumentType(0));
- EXPECT_EQ('b', foo_->OverloadedOnArgumentType('a'));
-}
-
-// Tests mocking functions overloaded on the const-ness of this object.
-TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis) {
- EXPECT_CALL(mock_foo_, OverloadedOnConstness());
- EXPECT_CALL(Const(mock_foo_), OverloadedOnConstness())
- .WillOnce(Return('a'));
-
- EXPECT_EQ(0, foo_->OverloadedOnConstness());
- EXPECT_EQ('a', Const(*foo_).OverloadedOnConstness());
-}
-
-#if GTEST_OS_WINDOWS
-// Tests mocking a nullary function with calltype.
-TEST_F(FunctionMockerTest, MocksNullaryFunctionWithCallType) {
- EXPECT_CALL(mock_foo_, CTNullary())
- .WillOnce(Return(-1))
- .WillOnce(Return(0));
-
- EXPECT_EQ(-1, foo_->CTNullary());
- EXPECT_EQ(0, foo_->CTNullary());
-}
-
-// Tests mocking a unary function with calltype.
-TEST_F(FunctionMockerTest, MocksUnaryFunctionWithCallType) {
- EXPECT_CALL(mock_foo_, CTUnary(Eq(2)))
- .Times(2)
- .WillOnce(Return(true))
- .WillOnce(Return(false));
-
- EXPECT_TRUE(foo_->CTUnary(2));
- EXPECT_FALSE(foo_->CTUnary(2));
-}
-
-// Tests mocking a decimal function with calltype.
-TEST_F(FunctionMockerTest, MocksDecimalFunctionWithCallType) {
- EXPECT_CALL(mock_foo_, CTDecimal(true, 'a', 0, 0, 1L, A<float>(),
- Lt(100), 5U, NULL, "hi"))
- .WillOnce(Return(10));
-
- EXPECT_EQ(10, foo_->CTDecimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi"));
-}
-
-// Tests mocking functions overloaded on the const-ness of this object.
-TEST_F(FunctionMockerTest, MocksFunctionsConstFunctionWithCallType) {
- EXPECT_CALL(Const(mock_foo_), CTConst(_))
- .WillOnce(Return('a'));
-
- EXPECT_EQ('a', Const(*foo_).CTConst(0));
-}
-
-#endif // GTEST_OS_WINDOWS
-
-class MockB {
- public:
- MockB() {}
-
- MOCK_METHOD0(DoB, void());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB);
-};
-
-// Tests that functions with no EXPECT_CALL() ruls can be called any
-// number of times.
-TEST(ExpectCallTest, UnmentionedFunctionCanBeCalledAnyNumberOfTimes) {
- {
- MockB b;
- }
-
- {
- MockB b;
- b.DoB();
- }
-
- {
- MockB b;
- b.DoB();
- b.DoB();
- }
-}
-
-// Tests mocking template interfaces.
-
-template <typename T>
-class StackInterface {
- public:
- virtual ~StackInterface() {}
-
- // Template parameter appears in function parameter.
- virtual void Push(const T& value) = 0;
- virtual void Pop() = 0;
- virtual int GetSize() const = 0;
- // Template parameter appears in function return type.
- virtual const T& GetTop() const = 0;
-};
-
-template <typename T>
-class MockStack : public StackInterface<T> {
- public:
- MockStack() {}
-
- MOCK_METHOD1_T(Push, void(const T& elem));
- MOCK_METHOD0_T(Pop, void());
- MOCK_CONST_METHOD0_T(GetSize, int()); // NOLINT
- MOCK_CONST_METHOD0_T(GetTop, const T&());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStack);
-};
-
-// Tests that template mock works.
-TEST(TemplateMockTest, Works) {
- MockStack<int> mock;
-
- EXPECT_CALL(mock, GetSize())
- .WillOnce(Return(0))
- .WillOnce(Return(1))
- .WillOnce(Return(0));
- EXPECT_CALL(mock, Push(_));
- int n = 5;
- EXPECT_CALL(mock, GetTop())
- .WillOnce(ReturnRef(n));
- EXPECT_CALL(mock, Pop())
- .Times(AnyNumber());
-
- EXPECT_EQ(0, mock.GetSize());
- mock.Push(5);
- EXPECT_EQ(1, mock.GetSize());
- EXPECT_EQ(5, mock.GetTop());
- mock.Pop();
- EXPECT_EQ(0, mock.GetSize());
-}
-
-#if GTEST_OS_WINDOWS
-// Tests mocking template interfaces with calltype.
-
-template <typename T>
-class StackInterfaceWithCallType {
- public:
- virtual ~StackInterfaceWithCallType() {}
-
- // Template parameter appears in function parameter.
- STDMETHOD_(void, Push)(const T& value) = 0;
- STDMETHOD_(void, Pop)() = 0;
- STDMETHOD_(int, GetSize)() const = 0;
- // Template parameter appears in function return type.
- STDMETHOD_(const T&, GetTop)() const = 0;
-};
-
-template <typename T>
-class MockStackWithCallType : public StackInterfaceWithCallType<T> {
- public:
- MockStackWithCallType() {}
-
- MOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Push, void(const T& elem));
- MOCK_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Pop, void());
- MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetSize, int());
- MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetTop, const T&());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStackWithCallType);
-};
-
-// Tests that template mock with calltype works.
-TEST(TemplateMockTestWithCallType, Works) {
- MockStackWithCallType<int> mock;
-
- EXPECT_CALL(mock, GetSize())
- .WillOnce(Return(0))
- .WillOnce(Return(1))
- .WillOnce(Return(0));
- EXPECT_CALL(mock, Push(_));
- int n = 5;
- EXPECT_CALL(mock, GetTop())
- .WillOnce(ReturnRef(n));
- EXPECT_CALL(mock, Pop())
- .Times(AnyNumber());
-
- EXPECT_EQ(0, mock.GetSize());
- mock.Push(5);
- EXPECT_EQ(1, mock.GetSize());
- EXPECT_EQ(5, mock.GetTop());
- mock.Pop();
- EXPECT_EQ(0, mock.GetSize());
-}
-#endif // GTEST_OS_WINDOWS
-
-#define MY_MOCK_METHODS1_ \
- MOCK_METHOD0(Overloaded, void()); \
- MOCK_CONST_METHOD1(Overloaded, int(int n)); \
- MOCK_METHOD2(Overloaded, bool(bool f, int n))
-
-class MockOverloadedOnArgNumber {
- public:
- MockOverloadedOnArgNumber() {}
-
- MY_MOCK_METHODS1_;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnArgNumber);
-};
-
-TEST(OverloadedMockMethodTest, CanOverloadOnArgNumberInMacroBody) {
- MockOverloadedOnArgNumber mock;
- EXPECT_CALL(mock, Overloaded());
- EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2));
- EXPECT_CALL(mock, Overloaded(true, 1)).WillOnce(Return(true));
-
- mock.Overloaded();
- EXPECT_EQ(2, mock.Overloaded(1));
- EXPECT_TRUE(mock.Overloaded(true, 1));
-}
-
-#define MY_MOCK_METHODS2_ \
- MOCK_CONST_METHOD1(Overloaded, int(int n)); \
- MOCK_METHOD1(Overloaded, int(int n));
-
-class MockOverloadedOnConstness {
- public:
- MockOverloadedOnConstness() {}
-
- MY_MOCK_METHODS2_;
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnConstness);
-};
-
-TEST(OverloadedMockMethodTest, CanOverloadOnConstnessInMacroBody) {
- MockOverloadedOnConstness mock;
- const MockOverloadedOnConstness* const_mock = &mock;
- EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2));
- EXPECT_CALL(*const_mock, Overloaded(1)).WillOnce(Return(3));
-
- EXPECT_EQ(2, mock.Overloaded(1));
- EXPECT_EQ(3, const_mock->Overloaded(1));
-}
-
-TEST(MockFunctionTest, WorksForVoidNullary) {
- MockFunction<void()> foo;
- EXPECT_CALL(foo, Call());
- foo.Call();
-}
-
-TEST(MockFunctionTest, WorksForNonVoidNullary) {
- MockFunction<int()> foo;
- EXPECT_CALL(foo, Call())
- .WillOnce(Return(1))
- .WillOnce(Return(2));
- EXPECT_EQ(1, foo.Call());
- EXPECT_EQ(2, foo.Call());
-}
-
-TEST(MockFunctionTest, WorksForVoidUnary) {
- MockFunction<void(int)> foo;
- EXPECT_CALL(foo, Call(1));
- foo.Call(1);
-}
-
-TEST(MockFunctionTest, WorksForNonVoidBinary) {
- MockFunction<int(bool, int)> foo;
- EXPECT_CALL(foo, Call(false, 42))
- .WillOnce(Return(1))
- .WillOnce(Return(2));
- EXPECT_CALL(foo, Call(true, Ge(100)))
- .WillOnce(Return(3));
- EXPECT_EQ(1, foo.Call(false, 42));
- EXPECT_EQ(2, foo.Call(false, 42));
- EXPECT_EQ(3, foo.Call(true, 120));
-}
-
-TEST(MockFunctionTest, WorksFor10Arguments) {
- MockFunction<int(bool a0, char a1, int a2, int a3, int a4,
- int a5, int a6, char a7, int a8, bool a9)> foo;
- EXPECT_CALL(foo, Call(_, 'a', _, _, _, _, _, _, _, _))
- .WillOnce(Return(1))
- .WillOnce(Return(2));
- EXPECT_EQ(1, foo.Call(false, 'a', 0, 0, 0, 0, 0, 'b', 0, true));
- EXPECT_EQ(2, foo.Call(true, 'a', 0, 0, 0, 0, 0, 'b', 1, false));
-}
-
-} // namespace gmock_generated_function_mockers_test
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-internal-utils_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-internal-utils_test.cc
deleted file mode 100644
index 1156c7dbd..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-internal-utils_test.cc
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the internal utilities.
-
-#include "gmock/internal/gmock-generated-internal-utils.h"
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gtest/gtest.h"
-
-namespace {
-
-using ::std::tr1::tuple;
-using ::testing::Matcher;
-using ::testing::internal::CompileAssertTypesEqual;
-using ::testing::internal::MatcherTuple;
-using ::testing::internal::Function;
-using ::testing::internal::IgnoredValue;
-
-// Tests the MatcherTuple template struct.
-
-TEST(MatcherTupleTest, ForSize0) {
- CompileAssertTypesEqual<tuple<>, MatcherTuple<tuple<> >::type>();
-}
-
-TEST(MatcherTupleTest, ForSize1) {
- CompileAssertTypesEqual<tuple<Matcher<int> >,
- MatcherTuple<tuple<int> >::type>();
-}
-
-TEST(MatcherTupleTest, ForSize2) {
- CompileAssertTypesEqual<tuple<Matcher<int>, Matcher<char> >,
- MatcherTuple<tuple<int, char> >::type>();
-}
-
-TEST(MatcherTupleTest, ForSize5) {
- CompileAssertTypesEqual<tuple<Matcher<int>, Matcher<char>, Matcher<bool>,
- Matcher<double>, Matcher<char*> >,
- MatcherTuple<tuple<int, char, bool, double, char*>
- >::type>();
-}
-
-// Tests the Function template struct.
-
-TEST(FunctionTest, Nullary) {
- typedef Function<int()> F; // NOLINT
- CompileAssertTypesEqual<int, F::Result>();
- CompileAssertTypesEqual<tuple<>, F::ArgumentTuple>();
- CompileAssertTypesEqual<tuple<>, F::ArgumentMatcherTuple>();
- CompileAssertTypesEqual<void(), F::MakeResultVoid>();
- CompileAssertTypesEqual<IgnoredValue(), F::MakeResultIgnoredValue>();
-}
-
-TEST(FunctionTest, Unary) {
- typedef Function<int(bool)> F; // NOLINT
- CompileAssertTypesEqual<int, F::Result>();
- CompileAssertTypesEqual<bool, F::Argument1>();
- CompileAssertTypesEqual<tuple<bool>, F::ArgumentTuple>();
- CompileAssertTypesEqual<tuple<Matcher<bool> >, F::ArgumentMatcherTuple>();
- CompileAssertTypesEqual<void(bool), F::MakeResultVoid>(); // NOLINT
- CompileAssertTypesEqual<IgnoredValue(bool), // NOLINT
- F::MakeResultIgnoredValue>();
-}
-
-TEST(FunctionTest, Binary) {
- typedef Function<int(bool, const long&)> F; // NOLINT
- CompileAssertTypesEqual<int, F::Result>();
- CompileAssertTypesEqual<bool, F::Argument1>();
- CompileAssertTypesEqual<const long&, F::Argument2>(); // NOLINT
- CompileAssertTypesEqual<tuple<bool, const long&>, F::ArgumentTuple>(); // NOLINT
- CompileAssertTypesEqual<tuple<Matcher<bool>, Matcher<const long&> >, // NOLINT
- F::ArgumentMatcherTuple>();
- CompileAssertTypesEqual<void(bool, const long&), F::MakeResultVoid>(); // NOLINT
- CompileAssertTypesEqual<IgnoredValue(bool, const long&), // NOLINT
- F::MakeResultIgnoredValue>();
-}
-
-TEST(FunctionTest, LongArgumentList) {
- typedef Function<char(bool, int, char*, int&, const long&)> F; // NOLINT
- CompileAssertTypesEqual<char, F::Result>();
- CompileAssertTypesEqual<bool, F::Argument1>();
- CompileAssertTypesEqual<int, F::Argument2>();
- CompileAssertTypesEqual<char*, F::Argument3>();
- CompileAssertTypesEqual<int&, F::Argument4>();
- CompileAssertTypesEqual<const long&, F::Argument5>(); // NOLINT
- CompileAssertTypesEqual<tuple<bool, int, char*, int&, const long&>, // NOLINT
- F::ArgumentTuple>();
- CompileAssertTypesEqual<tuple<Matcher<bool>, Matcher<int>, Matcher<char*>,
- Matcher<int&>, Matcher<const long&> >, // NOLINT
- F::ArgumentMatcherTuple>();
- CompileAssertTypesEqual<void(bool, int, char*, int&, const long&), // NOLINT
- F::MakeResultVoid>();
- CompileAssertTypesEqual<
- IgnoredValue(bool, int, char*, int&, const long&), // NOLINT
- F::MakeResultIgnoredValue>();
-}
-
-} // Unnamed namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-matchers_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-matchers_test.cc
deleted file mode 100644
index 819f1a83d..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-generated-matchers_test.cc
+++ /dev/null
@@ -1,1127 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the built-in matchers generated by a script.
-
-#include "gmock/gmock-generated-matchers.h"
-
-#include <list>
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-namespace {
-
-using std::list;
-using std::map;
-using std::pair;
-using std::set;
-using std::stringstream;
-using std::vector;
-using std::tr1::get;
-using std::tr1::make_tuple;
-using std::tr1::tuple;
-using testing::_;
-using testing::Args;
-using testing::Contains;
-using testing::ElementsAre;
-using testing::ElementsAreArray;
-using testing::Eq;
-using testing::Ge;
-using testing::Gt;
-using testing::Lt;
-using testing::MakeMatcher;
-using testing::Matcher;
-using testing::MatcherInterface;
-using testing::MatchResultListener;
-using testing::Ne;
-using testing::Not;
-using testing::Pointee;
-using testing::PrintToString;
-using testing::Ref;
-using testing::StaticAssertTypeEq;
-using testing::StrEq;
-using testing::Value;
-using testing::internal::string;
-
-// Returns the description of the given matcher.
-template <typename T>
-string Describe(const Matcher<T>& m) {
- stringstream ss;
- m.DescribeTo(&ss);
- return ss.str();
-}
-
-// Returns the description of the negation of the given matcher.
-template <typename T>
-string DescribeNegation(const Matcher<T>& m) {
- stringstream ss;
- m.DescribeNegationTo(&ss);
- return ss.str();
-}
-
-// Returns the reason why x matches, or doesn't match, m.
-template <typename MatcherType, typename Value>
-string Explain(const MatcherType& m, const Value& x) {
- stringstream ss;
- m.ExplainMatchResultTo(x, &ss);
- return ss.str();
-}
-
-// Tests Args<k0, ..., kn>(m).
-
-TEST(ArgsTest, AcceptsZeroTemplateArg) {
- const tuple<int, bool> t(5, true);
- EXPECT_THAT(t, Args<>(Eq(tuple<>())));
- EXPECT_THAT(t, Not(Args<>(Ne(tuple<>()))));
-}
-
-TEST(ArgsTest, AcceptsOneTemplateArg) {
- const tuple<int, bool> t(5, true);
- EXPECT_THAT(t, Args<0>(Eq(make_tuple(5))));
- EXPECT_THAT(t, Args<1>(Eq(make_tuple(true))));
- EXPECT_THAT(t, Not(Args<1>(Eq(make_tuple(false)))));
-}
-
-TEST(ArgsTest, AcceptsTwoTemplateArgs) {
- const tuple<short, int, long> t(4, 5, 6L); // NOLINT
-
- EXPECT_THAT(t, (Args<0, 1>(Lt())));
- EXPECT_THAT(t, (Args<1, 2>(Lt())));
- EXPECT_THAT(t, Not(Args<0, 2>(Gt())));
-}
-
-TEST(ArgsTest, AcceptsRepeatedTemplateArgs) {
- const tuple<short, int, long> t(4, 5, 6L); // NOLINT
- EXPECT_THAT(t, (Args<0, 0>(Eq())));
- EXPECT_THAT(t, Not(Args<1, 1>(Ne())));
-}
-
-TEST(ArgsTest, AcceptsDecreasingTemplateArgs) {
- const tuple<short, int, long> t(4, 5, 6L); // NOLINT
- EXPECT_THAT(t, (Args<2, 0>(Gt())));
- EXPECT_THAT(t, Not(Args<2, 1>(Lt())));
-}
-
-// The MATCHER*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-MATCHER(SumIsZero, "") {
- return get<0>(arg) + get<1>(arg) + get<2>(arg) == 0;
-}
-
-TEST(ArgsTest, AcceptsMoreTemplateArgsThanArityOfOriginalTuple) {
- EXPECT_THAT(make_tuple(-1, 2), (Args<0, 0, 1>(SumIsZero())));
- EXPECT_THAT(make_tuple(1, 2), Not(Args<0, 0, 1>(SumIsZero())));
-}
-
-TEST(ArgsTest, CanBeNested) {
- const tuple<short, int, long, int> t(4, 5, 6L, 6); // NOLINT
- EXPECT_THAT(t, (Args<1, 2, 3>(Args<1, 2>(Eq()))));
- EXPECT_THAT(t, (Args<0, 1, 3>(Args<0, 2>(Lt()))));
-}
-
-TEST(ArgsTest, CanMatchTupleByValue) {
- typedef tuple<char, int, int> Tuple3;
- const Matcher<Tuple3> m = Args<1, 2>(Lt());
- EXPECT_TRUE(m.Matches(Tuple3('a', 1, 2)));
- EXPECT_FALSE(m.Matches(Tuple3('b', 2, 2)));
-}
-
-TEST(ArgsTest, CanMatchTupleByReference) {
- typedef tuple<char, char, int> Tuple3;
- const Matcher<const Tuple3&> m = Args<0, 1>(Lt());
- EXPECT_TRUE(m.Matches(Tuple3('a', 'b', 2)));
- EXPECT_FALSE(m.Matches(Tuple3('b', 'b', 2)));
-}
-
-// Validates that arg is printed as str.
-MATCHER_P(PrintsAs, str, "") {
- return testing::PrintToString(arg) == str;
-}
-
-TEST(ArgsTest, AcceptsTenTemplateArgs) {
- EXPECT_THAT(make_tuple(0, 1L, 2, 3L, 4, 5, 6, 7, 8, 9),
- (Args<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>(
- PrintsAs("(9, 8, 7, 6, 5, 4, 3, 2, 1, 0)"))));
- EXPECT_THAT(make_tuple(0, 1L, 2, 3L, 4, 5, 6, 7, 8, 9),
- Not(Args<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>(
- PrintsAs("(0, 8, 7, 6, 5, 4, 3, 2, 1, 0)"))));
-}
-
-TEST(ArgsTest, DescirbesSelfCorrectly) {
- const Matcher<tuple<int, bool, char> > m = Args<2, 0>(Lt());
- EXPECT_EQ("are a tuple whose fields (#2, #0) are a pair where "
- "the first < the second",
- Describe(m));
-}
-
-TEST(ArgsTest, DescirbesNestedArgsCorrectly) {
- const Matcher<const tuple<int, bool, char, int>&> m =
- Args<0, 2, 3>(Args<2, 0>(Lt()));
- EXPECT_EQ("are a tuple whose fields (#0, #2, #3) are a tuple "
- "whose fields (#2, #0) are a pair where the first < the second",
- Describe(m));
-}
-
-TEST(ArgsTest, DescribesNegationCorrectly) {
- const Matcher<tuple<int, char> > m = Args<1, 0>(Gt());
- EXPECT_EQ("are a tuple whose fields (#1, #0) aren't a pair "
- "where the first > the second",
- DescribeNegation(m));
-}
-
-TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) {
- const Matcher<tuple<bool, int, int> > m = Args<1, 2>(Eq());
- EXPECT_EQ("whose fields (#1, #2) are (42, 42)",
- Explain(m, make_tuple(false, 42, 42)));
- EXPECT_EQ("whose fields (#1, #2) are (42, 43)",
- Explain(m, make_tuple(false, 42, 43)));
-}
-
-// For testing Args<>'s explanation.
-class LessThanMatcher : public MatcherInterface<tuple<char, int> > {
- public:
- virtual void DescribeTo(::std::ostream* os) const {}
-
- virtual bool MatchAndExplain(tuple<char, int> value,
- MatchResultListener* listener) const {
- const int diff = get<0>(value) - get<1>(value);
- if (diff > 0) {
- *listener << "where the first value is " << diff
- << " more than the second";
- }
- return diff < 0;
- }
-};
-
-Matcher<tuple<char, int> > LessThan() {
- return MakeMatcher(new LessThanMatcher);
-}
-
-TEST(ArgsTest, ExplainsMatchResultWithInnerExplanation) {
- const Matcher<tuple<char, int, int> > m = Args<0, 2>(LessThan());
- EXPECT_EQ("whose fields (#0, #2) are ('a' (97, 0x61), 42), "
- "where the first value is 55 more than the second",
- Explain(m, make_tuple('a', 42, 42)));
- EXPECT_EQ("whose fields (#0, #2) are ('\\0', 43)",
- Explain(m, make_tuple('\0', 42, 43)));
-}
-
-// For testing ExplainMatchResultTo().
-class GreaterThanMatcher : public MatcherInterface<int> {
- public:
- explicit GreaterThanMatcher(int rhs) : rhs_(rhs) {}
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "is greater than " << rhs_;
- }
-
- virtual bool MatchAndExplain(int lhs,
- MatchResultListener* listener) const {
- const int diff = lhs - rhs_;
- if (diff > 0) {
- *listener << "which is " << diff << " more than " << rhs_;
- } else if (diff == 0) {
- *listener << "which is the same as " << rhs_;
- } else {
- *listener << "which is " << -diff << " less than " << rhs_;
- }
-
- return lhs > rhs_;
- }
-
- private:
- int rhs_;
-};
-
-Matcher<int> GreaterThan(int n) {
- return MakeMatcher(new GreaterThanMatcher(n));
-}
-
-// Tests for ElementsAre().
-
-// Evaluates to the number of elements in 'array'.
-#define GMOCK_ARRAY_SIZE_(array) (sizeof(array)/sizeof(array[0]))
-
-TEST(ElementsAreTest, CanDescribeExpectingNoElement) {
- Matcher<const vector<int>&> m = ElementsAre();
- EXPECT_EQ("is empty", Describe(m));
-}
-
-TEST(ElementsAreTest, CanDescribeExpectingOneElement) {
- Matcher<vector<int> > m = ElementsAre(Gt(5));
- EXPECT_EQ("has 1 element that is > 5", Describe(m));
-}
-
-TEST(ElementsAreTest, CanDescribeExpectingManyElements) {
- Matcher<list<string> > m = ElementsAre(StrEq("one"), "two");
- EXPECT_EQ("has 2 elements where\n"
- "element #0 is equal to \"one\",\n"
- "element #1 is equal to \"two\"", Describe(m));
-}
-
-TEST(ElementsAreTest, CanDescribeNegationOfExpectingNoElement) {
- Matcher<vector<int> > m = ElementsAre();
- EXPECT_EQ("isn't empty", DescribeNegation(m));
-}
-
-TEST(ElementsAreTest, CanDescribeNegationOfExpectingOneElment) {
- Matcher<const list<int>& > m = ElementsAre(Gt(5));
- EXPECT_EQ("doesn't have 1 element, or\n"
- "element #0 isn't > 5", DescribeNegation(m));
-}
-
-TEST(ElementsAreTest, CanDescribeNegationOfExpectingManyElements) {
- Matcher<const list<string>& > m = ElementsAre("one", "two");
- EXPECT_EQ("doesn't have 2 elements, or\n"
- "element #0 isn't equal to \"one\", or\n"
- "element #1 isn't equal to \"two\"", DescribeNegation(m));
-}
-
-TEST(ElementsAreTest, DoesNotExplainTrivialMatch) {
- Matcher<const list<int>& > m = ElementsAre(1, Ne(2));
-
- list<int> test_list;
- test_list.push_back(1);
- test_list.push_back(3);
- EXPECT_EQ("", Explain(m, test_list)); // No need to explain anything.
-}
-
-TEST(ElementsAreTest, ExplainsNonTrivialMatch) {
- Matcher<const vector<int>& > m =
- ElementsAre(GreaterThan(1), 0, GreaterThan(2));
-
- const int a[] = { 10, 0, 100 };
- vector<int> test_vector(a, a + GMOCK_ARRAY_SIZE_(a));
- EXPECT_EQ("whose element #0 matches, which is 9 more than 1,\n"
- "and whose element #2 matches, which is 98 more than 2",
- Explain(m, test_vector));
-}
-
-TEST(ElementsAreTest, CanExplainMismatchWrongSize) {
- Matcher<const list<int>& > m = ElementsAre(1, 3);
-
- list<int> test_list;
- // No need to explain when the container is empty.
- EXPECT_EQ("", Explain(m, test_list));
-
- test_list.push_back(1);
- EXPECT_EQ("which has 1 element", Explain(m, test_list));
-}
-
-TEST(ElementsAreTest, CanExplainMismatchRightSize) {
- Matcher<const vector<int>& > m = ElementsAre(1, GreaterThan(5));
-
- vector<int> v;
- v.push_back(2);
- v.push_back(1);
- EXPECT_EQ("whose element #0 doesn't match", Explain(m, v));
-
- v[0] = 1;
- EXPECT_EQ("whose element #1 doesn't match, which is 4 less than 5",
- Explain(m, v));
-}
-
-TEST(ElementsAreTest, MatchesOneElementVector) {
- vector<string> test_vector;
- test_vector.push_back("test string");
-
- EXPECT_THAT(test_vector, ElementsAre(StrEq("test string")));
-}
-
-TEST(ElementsAreTest, MatchesOneElementList) {
- list<string> test_list;
- test_list.push_back("test string");
-
- EXPECT_THAT(test_list, ElementsAre("test string"));
-}
-
-TEST(ElementsAreTest, MatchesThreeElementVector) {
- vector<string> test_vector;
- test_vector.push_back("one");
- test_vector.push_back("two");
- test_vector.push_back("three");
-
- EXPECT_THAT(test_vector, ElementsAre("one", StrEq("two"), _));
-}
-
-TEST(ElementsAreTest, MatchesOneElementEqMatcher) {
- vector<int> test_vector;
- test_vector.push_back(4);
-
- EXPECT_THAT(test_vector, ElementsAre(Eq(4)));
-}
-
-TEST(ElementsAreTest, MatchesOneElementAnyMatcher) {
- vector<int> test_vector;
- test_vector.push_back(4);
-
- EXPECT_THAT(test_vector, ElementsAre(_));
-}
-
-TEST(ElementsAreTest, MatchesOneElementValue) {
- vector<int> test_vector;
- test_vector.push_back(4);
-
- EXPECT_THAT(test_vector, ElementsAre(4));
-}
-
-TEST(ElementsAreTest, MatchesThreeElementsMixedMatchers) {
- vector<int> test_vector;
- test_vector.push_back(1);
- test_vector.push_back(2);
- test_vector.push_back(3);
-
- EXPECT_THAT(test_vector, ElementsAre(1, Eq(2), _));
-}
-
-TEST(ElementsAreTest, MatchesTenElementVector) {
- const int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
- vector<int> test_vector(a, a + GMOCK_ARRAY_SIZE_(a));
-
- EXPECT_THAT(test_vector,
- // The element list can contain values and/or matchers
- // of different types.
- ElementsAre(0, Ge(0), _, 3, 4, Ne(2), Eq(6), 7, 8, _));
-}
-
-TEST(ElementsAreTest, DoesNotMatchWrongSize) {
- vector<string> test_vector;
- test_vector.push_back("test string");
- test_vector.push_back("test string");
-
- Matcher<vector<string> > m = ElementsAre(StrEq("test string"));
- EXPECT_FALSE(m.Matches(test_vector));
-}
-
-TEST(ElementsAreTest, DoesNotMatchWrongValue) {
- vector<string> test_vector;
- test_vector.push_back("other string");
-
- Matcher<vector<string> > m = ElementsAre(StrEq("test string"));
- EXPECT_FALSE(m.Matches(test_vector));
-}
-
-TEST(ElementsAreTest, DoesNotMatchWrongOrder) {
- vector<string> test_vector;
- test_vector.push_back("one");
- test_vector.push_back("three");
- test_vector.push_back("two");
-
- Matcher<vector<string> > m = ElementsAre(
- StrEq("one"), StrEq("two"), StrEq("three"));
- EXPECT_FALSE(m.Matches(test_vector));
-}
-
-TEST(ElementsAreTest, WorksForNestedContainer) {
- const char* strings[] = {
- "Hi",
- "world"
- };
-
- vector<list<char> > nested;
- for (size_t i = 0; i < GMOCK_ARRAY_SIZE_(strings); i++) {
- nested.push_back(list<char>(strings[i], strings[i] + strlen(strings[i])));
- }
-
- EXPECT_THAT(nested, ElementsAre(ElementsAre('H', Ne('e')),
- ElementsAre('w', 'o', _, _, 'd')));
- EXPECT_THAT(nested, Not(ElementsAre(ElementsAre('H', 'e'),
- ElementsAre('w', 'o', _, _, 'd'))));
-}
-
-TEST(ElementsAreTest, WorksWithByRefElementMatchers) {
- int a[] = { 0, 1, 2 };
- vector<int> v(a, a + GMOCK_ARRAY_SIZE_(a));
-
- EXPECT_THAT(v, ElementsAre(Ref(v[0]), Ref(v[1]), Ref(v[2])));
- EXPECT_THAT(v, Not(ElementsAre(Ref(v[0]), Ref(v[1]), Ref(a[2]))));
-}
-
-TEST(ElementsAreTest, WorksWithContainerPointerUsingPointee) {
- int a[] = { 0, 1, 2 };
- vector<int> v(a, a + GMOCK_ARRAY_SIZE_(a));
-
- EXPECT_THAT(&v, Pointee(ElementsAre(0, 1, _)));
- EXPECT_THAT(&v, Not(Pointee(ElementsAre(0, _, 3))));
-}
-
-TEST(ElementsAreTest, WorksWithNativeArrayPassedByReference) {
- int array[] = { 0, 1, 2 };
- EXPECT_THAT(array, ElementsAre(0, 1, _));
- EXPECT_THAT(array, Not(ElementsAre(1, _, _)));
- EXPECT_THAT(array, Not(ElementsAre(0, _)));
-}
-
-class NativeArrayPassedAsPointerAndSize {
- public:
- NativeArrayPassedAsPointerAndSize() {}
-
- MOCK_METHOD2(Helper, void(int* array, int size));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(NativeArrayPassedAsPointerAndSize);
-};
-
-TEST(ElementsAreTest, WorksWithNativeArrayPassedAsPointerAndSize) {
- int array[] = { 0, 1 };
- ::std::tr1::tuple<int*, size_t> array_as_tuple(array, 2);
- EXPECT_THAT(array_as_tuple, ElementsAre(0, 1));
- EXPECT_THAT(array_as_tuple, Not(ElementsAre(0)));
-
- NativeArrayPassedAsPointerAndSize helper;
- EXPECT_CALL(helper, Helper(_, _))
- .With(ElementsAre(0, 1));
- helper.Helper(array, 2);
-}
-
-TEST(ElementsAreTest, WorksWithTwoDimensionalNativeArray) {
- const char a2[][3] = { "hi", "lo" };
- EXPECT_THAT(a2, ElementsAre(ElementsAre('h', 'i', '\0'),
- ElementsAre('l', 'o', '\0')));
- EXPECT_THAT(a2, ElementsAre(StrEq("hi"), StrEq("lo")));
- EXPECT_THAT(a2, ElementsAre(Not(ElementsAre('h', 'o', '\0')),
- ElementsAre('l', 'o', '\0')));
-}
-
-// Tests for ElementsAreArray(). Since ElementsAreArray() shares most
-// of the implementation with ElementsAre(), we don't test it as
-// thoroughly here.
-
-TEST(ElementsAreArrayTest, CanBeCreatedWithValueArray) {
- const int a[] = { 1, 2, 3 };
-
- vector<int> test_vector(a, a + GMOCK_ARRAY_SIZE_(a));
- EXPECT_THAT(test_vector, ElementsAreArray(a));
-
- test_vector[2] = 0;
- EXPECT_THAT(test_vector, Not(ElementsAreArray(a)));
-}
-
-TEST(ElementsAreArrayTest, CanBeCreatedWithArraySize) {
- const char* a[] = { "one", "two", "three" };
-
- vector<string> test_vector(a, a + GMOCK_ARRAY_SIZE_(a));
- EXPECT_THAT(test_vector, ElementsAreArray(a, GMOCK_ARRAY_SIZE_(a)));
-
- const char** p = a;
- test_vector[0] = "1";
- EXPECT_THAT(test_vector, Not(ElementsAreArray(p, GMOCK_ARRAY_SIZE_(a))));
-}
-
-TEST(ElementsAreArrayTest, CanBeCreatedWithoutArraySize) {
- const char* a[] = { "one", "two", "three" };
-
- vector<string> test_vector(a, a + GMOCK_ARRAY_SIZE_(a));
- EXPECT_THAT(test_vector, ElementsAreArray(a));
-
- test_vector[0] = "1";
- EXPECT_THAT(test_vector, Not(ElementsAreArray(a)));
-}
-
-TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherArray) {
- const Matcher<string> kMatcherArray[] =
- { StrEq("one"), StrEq("two"), StrEq("three") };
-
- vector<string> test_vector;
- test_vector.push_back("one");
- test_vector.push_back("two");
- test_vector.push_back("three");
- EXPECT_THAT(test_vector, ElementsAreArray(kMatcherArray));
-
- test_vector.push_back("three");
- EXPECT_THAT(test_vector, Not(ElementsAreArray(kMatcherArray)));
-}
-
-// Since ElementsAre() and ElementsAreArray() share much of the
-// implementation, we only do a sanity test for native arrays here.
-TEST(ElementsAreArrayTest, WorksWithNativeArray) {
- ::std::string a[] = { "hi", "ho" };
- ::std::string b[] = { "hi", "ho" };
-
- EXPECT_THAT(a, ElementsAreArray(b));
- EXPECT_THAT(a, ElementsAreArray(b, 2));
- EXPECT_THAT(a, Not(ElementsAreArray(b, 1)));
-}
-
-// Tests for the MATCHER*() macro family.
-
-// Tests that a simple MATCHER() definition works.
-
-MATCHER(IsEven, "") { return (arg % 2) == 0; }
-
-TEST(MatcherMacroTest, Works) {
- const Matcher<int> m = IsEven();
- EXPECT_TRUE(m.Matches(6));
- EXPECT_FALSE(m.Matches(7));
-
- EXPECT_EQ("is even", Describe(m));
- EXPECT_EQ("not (is even)", DescribeNegation(m));
- EXPECT_EQ("", Explain(m, 6));
- EXPECT_EQ("", Explain(m, 7));
-}
-
-// This also tests that the description string can reference 'negation'.
-MATCHER(IsEven2, negation ? "is odd" : "is even") {
- if ((arg % 2) == 0) {
- // Verifies that we can stream to result_listener, a listener
- // supplied by the MATCHER macro implicitly.
- *result_listener << "OK";
- return true;
- } else {
- *result_listener << "% 2 == " << (arg % 2);
- return false;
- }
-}
-
-// This also tests that the description string can reference matcher
-// parameters.
-MATCHER_P2(EqSumOf, x, y,
- string(negation ? "doesn't equal" : "equals") + " the sum of " +
- PrintToString(x) + " and " + PrintToString(y)) {
- if (arg == (x + y)) {
- *result_listener << "OK";
- return true;
- } else {
- // Verifies that we can stream to the underlying stream of
- // result_listener.
- if (result_listener->stream() != NULL) {
- *result_listener->stream() << "diff == " << (x + y - arg);
- }
- return false;
- }
-}
-
-// Tests that the matcher description can reference 'negation' and the
-// matcher parameters.
-TEST(MatcherMacroTest, DescriptionCanReferenceNegationAndParameters) {
- const Matcher<int> m1 = IsEven2();
- EXPECT_EQ("is even", Describe(m1));
- EXPECT_EQ("is odd", DescribeNegation(m1));
-
- const Matcher<int> m2 = EqSumOf(5, 9);
- EXPECT_EQ("equals the sum of 5 and 9", Describe(m2));
- EXPECT_EQ("doesn't equal the sum of 5 and 9", DescribeNegation(m2));
-}
-
-// Tests explaining match result in a MATCHER* macro.
-TEST(MatcherMacroTest, CanExplainMatchResult) {
- const Matcher<int> m1 = IsEven2();
- EXPECT_EQ("OK", Explain(m1, 4));
- EXPECT_EQ("% 2 == 1", Explain(m1, 5));
-
- const Matcher<int> m2 = EqSumOf(1, 2);
- EXPECT_EQ("OK", Explain(m2, 3));
- EXPECT_EQ("diff == -1", Explain(m2, 4));
-}
-
-// Tests that the body of MATCHER() can reference the type of the
-// value being matched.
-
-MATCHER(IsEmptyString, "") {
- StaticAssertTypeEq< ::std::string, arg_type>();
- return arg == "";
-}
-
-MATCHER(IsEmptyStringByRef, "") {
- StaticAssertTypeEq<const ::std::string&, arg_type>();
- return arg == "";
-}
-
-TEST(MatcherMacroTest, CanReferenceArgType) {
- const Matcher< ::std::string> m1 = IsEmptyString();
- EXPECT_TRUE(m1.Matches(""));
-
- const Matcher<const ::std::string&> m2 = IsEmptyStringByRef();
- EXPECT_TRUE(m2.Matches(""));
-}
-
-// Tests that MATCHER() can be used in a namespace.
-
-namespace matcher_test {
-MATCHER(IsOdd, "") { return (arg % 2) != 0; }
-} // namespace matcher_test
-
-TEST(MatcherMacroTest, WorksInNamespace) {
- Matcher<int> m = matcher_test::IsOdd();
- EXPECT_FALSE(m.Matches(4));
- EXPECT_TRUE(m.Matches(5));
-}
-
-// Tests that Value() can be used to compose matchers.
-MATCHER(IsPositiveOdd, "") {
- return Value(arg, matcher_test::IsOdd()) && arg > 0;
-}
-
-TEST(MatcherMacroTest, CanBeComposedUsingValue) {
- EXPECT_THAT(3, IsPositiveOdd());
- EXPECT_THAT(4, Not(IsPositiveOdd()));
- EXPECT_THAT(-1, Not(IsPositiveOdd()));
-}
-
-// Tests that a simple MATCHER_P() definition works.
-
-MATCHER_P(IsGreaterThan32And, n, "") { return arg > 32 && arg > n; }
-
-TEST(MatcherPMacroTest, Works) {
- const Matcher<int> m = IsGreaterThan32And(5);
- EXPECT_TRUE(m.Matches(36));
- EXPECT_FALSE(m.Matches(5));
-
- EXPECT_EQ("is greater than 32 and 5", Describe(m));
- EXPECT_EQ("not (is greater than 32 and 5)", DescribeNegation(m));
- EXPECT_EQ("", Explain(m, 36));
- EXPECT_EQ("", Explain(m, 5));
-}
-
-// Tests that the description is calculated correctly from the matcher name.
-MATCHER_P(_is_Greater_Than32and_, n, "") { return arg > 32 && arg > n; }
-
-TEST(MatcherPMacroTest, GeneratesCorrectDescription) {
- const Matcher<int> m = _is_Greater_Than32and_(5);
-
- EXPECT_EQ("is greater than 32 and 5", Describe(m));
- EXPECT_EQ("not (is greater than 32 and 5)", DescribeNegation(m));
- EXPECT_EQ("", Explain(m, 36));
- EXPECT_EQ("", Explain(m, 5));
-}
-
-// Tests that a MATCHER_P matcher can be explicitly instantiated with
-// a reference parameter type.
-
-class UncopyableFoo {
- public:
- explicit UncopyableFoo(char value) : value_(value) {}
- private:
- UncopyableFoo(const UncopyableFoo&);
- void operator=(const UncopyableFoo&);
-
- char value_;
-};
-
-MATCHER_P(ReferencesUncopyable, variable, "") { return &arg == &variable; }
-
-TEST(MatcherPMacroTest, WorksWhenExplicitlyInstantiatedWithReference) {
- UncopyableFoo foo1('1'), foo2('2');
- const Matcher<const UncopyableFoo&> m =
- ReferencesUncopyable<const UncopyableFoo&>(foo1);
-
- EXPECT_TRUE(m.Matches(foo1));
- EXPECT_FALSE(m.Matches(foo2));
-
- // We don't want the address of the parameter printed, as most
- // likely it will just annoy the user. If the address is
- // interesting, the user should consider passing the parameter by
- // pointer instead.
- EXPECT_EQ("references uncopyable 1-byte object <31>", Describe(m));
-}
-
-
-// Tests that the body of MATCHER_Pn() can reference the parameter
-// types.
-
-MATCHER_P3(ParamTypesAreIntLongAndChar, foo, bar, baz, "") {
- StaticAssertTypeEq<int, foo_type>();
- StaticAssertTypeEq<long, bar_type>(); // NOLINT
- StaticAssertTypeEq<char, baz_type>();
- return arg == 0;
-}
-
-TEST(MatcherPnMacroTest, CanReferenceParamTypes) {
- EXPECT_THAT(0, ParamTypesAreIntLongAndChar(10, 20L, 'a'));
-}
-
-// Tests that a MATCHER_Pn matcher can be explicitly instantiated with
-// reference parameter types.
-
-MATCHER_P2(ReferencesAnyOf, variable1, variable2, "") {
- return &arg == &variable1 || &arg == &variable2;
-}
-
-TEST(MatcherPnMacroTest, WorksWhenExplicitlyInstantiatedWithReferences) {
- UncopyableFoo foo1('1'), foo2('2'), foo3('3');
- const Matcher<const UncopyableFoo&> m =
- ReferencesAnyOf<const UncopyableFoo&, const UncopyableFoo&>(foo1, foo2);
-
- EXPECT_TRUE(m.Matches(foo1));
- EXPECT_TRUE(m.Matches(foo2));
- EXPECT_FALSE(m.Matches(foo3));
-}
-
-TEST(MatcherPnMacroTest,
- GeneratesCorretDescriptionWhenExplicitlyInstantiatedWithReferences) {
- UncopyableFoo foo1('1'), foo2('2');
- const Matcher<const UncopyableFoo&> m =
- ReferencesAnyOf<const UncopyableFoo&, const UncopyableFoo&>(foo1, foo2);
-
- // We don't want the addresses of the parameters printed, as most
- // likely they will just annoy the user. If the addresses are
- // interesting, the user should consider passing the parameters by
- // pointers instead.
- EXPECT_EQ("references any of (1-byte object <31>, 1-byte object <32>)",
- Describe(m));
-}
-
-// Tests that a simple MATCHER_P2() definition works.
-
-MATCHER_P2(IsNotInClosedRange, low, hi, "") { return arg < low || arg > hi; }
-
-TEST(MatcherPnMacroTest, Works) {
- const Matcher<const long&> m = IsNotInClosedRange(10, 20); // NOLINT
- EXPECT_TRUE(m.Matches(36L));
- EXPECT_FALSE(m.Matches(15L));
-
- EXPECT_EQ("is not in closed range (10, 20)", Describe(m));
- EXPECT_EQ("not (is not in closed range (10, 20))", DescribeNegation(m));
- EXPECT_EQ("", Explain(m, 36L));
- EXPECT_EQ("", Explain(m, 15L));
-}
-
-// Tests that MATCHER*() definitions can be overloaded on the number
-// of parameters; also tests MATCHER_Pn() where n >= 3.
-
-MATCHER(EqualsSumOf, "") { return arg == 0; }
-MATCHER_P(EqualsSumOf, a, "") { return arg == a; }
-MATCHER_P2(EqualsSumOf, a, b, "") { return arg == a + b; }
-MATCHER_P3(EqualsSumOf, a, b, c, "") { return arg == a + b + c; }
-MATCHER_P4(EqualsSumOf, a, b, c, d, "") { return arg == a + b + c + d; }
-MATCHER_P5(EqualsSumOf, a, b, c, d, e, "") { return arg == a + b + c + d + e; }
-MATCHER_P6(EqualsSumOf, a, b, c, d, e, f, "") {
- return arg == a + b + c + d + e + f;
-}
-MATCHER_P7(EqualsSumOf, a, b, c, d, e, f, g, "") {
- return arg == a + b + c + d + e + f + g;
-}
-MATCHER_P8(EqualsSumOf, a, b, c, d, e, f, g, h, "") {
- return arg == a + b + c + d + e + f + g + h;
-}
-MATCHER_P9(EqualsSumOf, a, b, c, d, e, f, g, h, i, "") {
- return arg == a + b + c + d + e + f + g + h + i;
-}
-MATCHER_P10(EqualsSumOf, a, b, c, d, e, f, g, h, i, j, "") {
- return arg == a + b + c + d + e + f + g + h + i + j;
-}
-
-TEST(MatcherPnMacroTest, CanBeOverloadedOnNumberOfParameters) {
- EXPECT_THAT(0, EqualsSumOf());
- EXPECT_THAT(1, EqualsSumOf(1));
- EXPECT_THAT(12, EqualsSumOf(10, 2));
- EXPECT_THAT(123, EqualsSumOf(100, 20, 3));
- EXPECT_THAT(1234, EqualsSumOf(1000, 200, 30, 4));
- EXPECT_THAT(12345, EqualsSumOf(10000, 2000, 300, 40, 5));
- EXPECT_THAT("abcdef",
- EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f'));
- EXPECT_THAT("abcdefg",
- EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g'));
- EXPECT_THAT("abcdefgh",
- EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g',
- "h"));
- EXPECT_THAT("abcdefghi",
- EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g',
- "h", 'i'));
- EXPECT_THAT("abcdefghij",
- EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g',
- "h", 'i', ::std::string("j")));
-
- EXPECT_THAT(1, Not(EqualsSumOf()));
- EXPECT_THAT(-1, Not(EqualsSumOf(1)));
- EXPECT_THAT(-12, Not(EqualsSumOf(10, 2)));
- EXPECT_THAT(-123, Not(EqualsSumOf(100, 20, 3)));
- EXPECT_THAT(-1234, Not(EqualsSumOf(1000, 200, 30, 4)));
- EXPECT_THAT(-12345, Not(EqualsSumOf(10000, 2000, 300, 40, 5)));
- EXPECT_THAT("abcdef ",
- Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f')));
- EXPECT_THAT("abcdefg ",
- Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f',
- 'g')));
- EXPECT_THAT("abcdefgh ",
- Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g',
- "h")));
- EXPECT_THAT("abcdefghi ",
- Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g',
- "h", 'i')));
- EXPECT_THAT("abcdefghij ",
- Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g',
- "h", 'i', ::std::string("j"))));
-}
-
-// Tests that a MATCHER_Pn() definition can be instantiated with any
-// compatible parameter types.
-TEST(MatcherPnMacroTest, WorksForDifferentParameterTypes) {
- EXPECT_THAT(123, EqualsSumOf(100L, 20, static_cast<char>(3)));
- EXPECT_THAT("abcd", EqualsSumOf(::std::string("a"), "b", 'c', "d"));
-
- EXPECT_THAT(124, Not(EqualsSumOf(100L, 20, static_cast<char>(3))));
- EXPECT_THAT("abcde", Not(EqualsSumOf(::std::string("a"), "b", 'c', "d")));
-}
-
-// Tests that the matcher body can promote the parameter types.
-
-MATCHER_P2(EqConcat, prefix, suffix, "") {
- // The following lines promote the two parameters to desired types.
- std::string prefix_str(prefix);
- char suffix_char = static_cast<char>(suffix);
- return arg == prefix_str + suffix_char;
-}
-
-TEST(MatcherPnMacroTest, SimpleTypePromotion) {
- Matcher<std::string> no_promo =
- EqConcat(std::string("foo"), 't');
- Matcher<const std::string&> promo =
- EqConcat("foo", static_cast<int>('t'));
- EXPECT_FALSE(no_promo.Matches("fool"));
- EXPECT_FALSE(promo.Matches("fool"));
- EXPECT_TRUE(no_promo.Matches("foot"));
- EXPECT_TRUE(promo.Matches("foot"));
-}
-
-// Verifies the type of a MATCHER*.
-
-TEST(MatcherPnMacroTest, TypesAreCorrect) {
- // EqualsSumOf() must be assignable to a EqualsSumOfMatcher variable.
- EqualsSumOfMatcher a0 = EqualsSumOf();
-
- // EqualsSumOf(1) must be assignable to a EqualsSumOfMatcherP variable.
- EqualsSumOfMatcherP<int> a1 = EqualsSumOf(1);
-
- // EqualsSumOf(p1, ..., pk) must be assignable to a EqualsSumOfMatcherPk
- // variable, and so on.
- EqualsSumOfMatcherP2<int, char> a2 = EqualsSumOf(1, '2');
- EqualsSumOfMatcherP3<int, int, char> a3 = EqualsSumOf(1, 2, '3');
- EqualsSumOfMatcherP4<int, int, int, char> a4 = EqualsSumOf(1, 2, 3, '4');
- EqualsSumOfMatcherP5<int, int, int, int, char> a5 =
- EqualsSumOf(1, 2, 3, 4, '5');
- EqualsSumOfMatcherP6<int, int, int, int, int, char> a6 =
- EqualsSumOf(1, 2, 3, 4, 5, '6');
- EqualsSumOfMatcherP7<int, int, int, int, int, int, char> a7 =
- EqualsSumOf(1, 2, 3, 4, 5, 6, '7');
- EqualsSumOfMatcherP8<int, int, int, int, int, int, int, char> a8 =
- EqualsSumOf(1, 2, 3, 4, 5, 6, 7, '8');
- EqualsSumOfMatcherP9<int, int, int, int, int, int, int, int, char> a9 =
- EqualsSumOf(1, 2, 3, 4, 5, 6, 7, 8, '9');
- EqualsSumOfMatcherP10<int, int, int, int, int, int, int, int, int, char> a10 =
- EqualsSumOf(1, 2, 3, 4, 5, 6, 7, 8, 9, '0');
-}
-
-// Tests that matcher-typed parameters can be used in Value() inside a
-// MATCHER_Pn definition.
-
-// Succeeds if arg matches exactly 2 of the 3 matchers.
-MATCHER_P3(TwoOf, m1, m2, m3, "") {
- const int count = static_cast<int>(Value(arg, m1))
- + static_cast<int>(Value(arg, m2)) + static_cast<int>(Value(arg, m3));
- return count == 2;
-}
-
-TEST(MatcherPnMacroTest, CanUseMatcherTypedParameterInValue) {
- EXPECT_THAT(42, TwoOf(Gt(0), Lt(50), Eq(10)));
- EXPECT_THAT(0, Not(TwoOf(Gt(-1), Lt(1), Eq(0))));
-}
-
-// Tests Contains().
-
-TEST(ContainsTest, ListMatchesWhenElementIsInContainer) {
- list<int> some_list;
- some_list.push_back(3);
- some_list.push_back(1);
- some_list.push_back(2);
- EXPECT_THAT(some_list, Contains(1));
- EXPECT_THAT(some_list, Contains(Gt(2.5)));
- EXPECT_THAT(some_list, Contains(Eq(2.0f)));
-
- list<string> another_list;
- another_list.push_back("fee");
- another_list.push_back("fie");
- another_list.push_back("foe");
- another_list.push_back("fum");
- EXPECT_THAT(another_list, Contains(string("fee")));
-}
-
-TEST(ContainsTest, ListDoesNotMatchWhenElementIsNotInContainer) {
- list<int> some_list;
- some_list.push_back(3);
- some_list.push_back(1);
- EXPECT_THAT(some_list, Not(Contains(4)));
-}
-
-TEST(ContainsTest, SetMatchesWhenElementIsInContainer) {
- set<int> some_set;
- some_set.insert(3);
- some_set.insert(1);
- some_set.insert(2);
- EXPECT_THAT(some_set, Contains(Eq(1.0)));
- EXPECT_THAT(some_set, Contains(Eq(3.0f)));
- EXPECT_THAT(some_set, Contains(2));
-
- set<const char*> another_set;
- another_set.insert("fee");
- another_set.insert("fie");
- another_set.insert("foe");
- another_set.insert("fum");
- EXPECT_THAT(another_set, Contains(Eq(string("fum"))));
-}
-
-TEST(ContainsTest, SetDoesNotMatchWhenElementIsNotInContainer) {
- set<int> some_set;
- some_set.insert(3);
- some_set.insert(1);
- EXPECT_THAT(some_set, Not(Contains(4)));
-
- set<const char*> c_string_set;
- c_string_set.insert("hello");
- EXPECT_THAT(c_string_set, Not(Contains(string("hello").c_str())));
-}
-
-TEST(ContainsTest, ExplainsMatchResultCorrectly) {
- const int a[2] = { 1, 2 };
- Matcher<const int(&)[2]> m = Contains(2);
- EXPECT_EQ("whose element #1 matches", Explain(m, a));
-
- m = Contains(3);
- EXPECT_EQ("", Explain(m, a));
-
- m = Contains(GreaterThan(0));
- EXPECT_EQ("whose element #0 matches, which is 1 more than 0", Explain(m, a));
-
- m = Contains(GreaterThan(10));
- EXPECT_EQ("", Explain(m, a));
-}
-
-TEST(ContainsTest, DescribesItselfCorrectly) {
- Matcher<vector<int> > m = Contains(1);
- EXPECT_EQ("contains at least one element that is equal to 1", Describe(m));
-
- Matcher<vector<int> > m2 = Not(m);
- EXPECT_EQ("doesn't contain any element that is equal to 1", Describe(m2));
-}
-
-TEST(ContainsTest, MapMatchesWhenElementIsInContainer) {
- map<const char*, int> my_map;
- const char* bar = "a string";
- my_map[bar] = 2;
- EXPECT_THAT(my_map, Contains(pair<const char* const, int>(bar, 2)));
-
- map<string, int> another_map;
- another_map["fee"] = 1;
- another_map["fie"] = 2;
- another_map["foe"] = 3;
- another_map["fum"] = 4;
- EXPECT_THAT(another_map, Contains(pair<const string, int>(string("fee"), 1)));
- EXPECT_THAT(another_map, Contains(pair<const string, int>("fie", 2)));
-}
-
-TEST(ContainsTest, MapDoesNotMatchWhenElementIsNotInContainer) {
- map<int, int> some_map;
- some_map[1] = 11;
- some_map[2] = 22;
- EXPECT_THAT(some_map, Not(Contains(pair<const int, int>(2, 23))));
-}
-
-TEST(ContainsTest, ArrayMatchesWhenElementIsInContainer) {
- const char* string_array[] = { "fee", "fie", "foe", "fum" };
- EXPECT_THAT(string_array, Contains(Eq(string("fum"))));
-}
-
-TEST(ContainsTest, ArrayDoesNotMatchWhenElementIsNotInContainer) {
- int int_array[] = { 1, 2, 3, 4 };
- EXPECT_THAT(int_array, Not(Contains(5)));
-}
-
-TEST(ContainsTest, AcceptsMatcher) {
- const int a[] = { 1, 2, 3 };
- EXPECT_THAT(a, Contains(Gt(2)));
- EXPECT_THAT(a, Not(Contains(Gt(4))));
-}
-
-TEST(ContainsTest, WorksForNativeArrayAsTuple) {
- const int a[] = { 1, 2 };
- const int* const pointer = a;
- EXPECT_THAT(make_tuple(pointer, 2), Contains(1));
- EXPECT_THAT(make_tuple(pointer, 2), Not(Contains(Gt(3))));
-}
-
-TEST(ContainsTest, WorksForTwoDimensionalNativeArray) {
- int a[][3] = { { 1, 2, 3 }, { 4, 5, 6 } };
- EXPECT_THAT(a, Contains(ElementsAre(4, 5, 6)));
- EXPECT_THAT(a, Contains(Contains(5)));
- EXPECT_THAT(a, Not(Contains(ElementsAre(3, 4, 5))));
- EXPECT_THAT(a, Contains(Not(Contains(5))));
-}
-
-namespace adl_test {
-
-// Verifies that the implementation of ::testing::AllOf and ::testing::AnyOf
-// don't issue unqualified recursive calls. If they do, the argument dependent
-// name lookup will cause AllOf/AnyOf in the 'adl_test' namespace to be found
-// as a candidate and the compilation will break due to an ambiguous overload.
-
-// The matcher must be in the same namespace as AllOf/AnyOf to make argument
-// dependent lookup find those.
-MATCHER(M, "") { return true; }
-
-template <typename T1, typename T2>
-bool AllOf(const T1& t1, const T2& t2) { return true; }
-
-TEST(AllOfTest, DoesNotCallAllOfUnqualified) {
- EXPECT_THAT(42, testing::AllOf(
- M(), M(), M(), M(), M(), M(), M(), M(), M(), M()));
-}
-
-template <typename T1, typename T2> bool
-AnyOf(const T1& t1, const T2& t2) { return true; }
-
-TEST(AnyOfTest, DoesNotCallAnyOfUnqualified) {
- EXPECT_THAT(42, testing::AnyOf(
- M(), M(), M(), M(), M(), M(), M(), M(), M(), M()));
-}
-
-} // namespace adl_test
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-} // namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-internal-utils_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-internal-utils_test.cc
deleted file mode 100644
index ae743c1c3..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-internal-utils_test.cc
+++ /dev/null
@@ -1,655 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the internal utilities.
-
-#include "gmock/internal/gmock-internal-utils.h"
-#include <stdlib.h>
-#include <map>
-#include <string>
-#include <sstream>
-#include <vector>
-#include "gmock/gmock.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-#if GTEST_OS_CYGWIN
-# include <sys/types.h> // For ssize_t. NOLINT
-#endif
-
-class ProtocolMessage;
-
-namespace proto2 {
-class Message;
-} // namespace proto2
-
-namespace testing {
-namespace internal {
-
-namespace {
-
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-
-TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsNoWord) {
- EXPECT_EQ("", ConvertIdentifierNameToWords(""));
- EXPECT_EQ("", ConvertIdentifierNameToWords("_"));
- EXPECT_EQ("", ConvertIdentifierNameToWords("__"));
-}
-
-TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsDigits) {
- EXPECT_EQ("1", ConvertIdentifierNameToWords("_1"));
- EXPECT_EQ("2", ConvertIdentifierNameToWords("2_"));
- EXPECT_EQ("34", ConvertIdentifierNameToWords("_34_"));
- EXPECT_EQ("34 56", ConvertIdentifierNameToWords("_34_56"));
-}
-
-TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsCamelCaseWords) {
- EXPECT_EQ("a big word", ConvertIdentifierNameToWords("ABigWord"));
- EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("FooBar"));
- EXPECT_EQ("foo", ConvertIdentifierNameToWords("Foo_"));
- EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("_Foo_Bar_"));
- EXPECT_EQ("foo and bar", ConvertIdentifierNameToWords("_Foo__And_Bar"));
-}
-
-TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContains_SeparatedWords) {
- EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("foo_bar"));
- EXPECT_EQ("foo", ConvertIdentifierNameToWords("_foo_"));
- EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("_foo_bar_"));
- EXPECT_EQ("foo and bar", ConvertIdentifierNameToWords("_foo__and_bar"));
-}
-
-TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameIsMixture) {
- EXPECT_EQ("foo bar 123", ConvertIdentifierNameToWords("Foo_bar123"));
- EXPECT_EQ("chapter 11 section 1",
- ConvertIdentifierNameToWords("_Chapter11Section_1_"));
-}
-
-TEST(PointeeOfTest, WorksForSmartPointers) {
- CompileAssertTypesEqual<const char,
- PointeeOf<internal::linked_ptr<const char> >::type>();
-}
-
-TEST(PointeeOfTest, WorksForRawPointers) {
- CompileAssertTypesEqual<int, PointeeOf<int*>::type>();
- CompileAssertTypesEqual<const char, PointeeOf<const char*>::type>();
- CompileAssertTypesEqual<void, PointeeOf<void*>::type>();
-}
-
-TEST(GetRawPointerTest, WorksForSmartPointers) {
- const char* const raw_p4 = new const char('a'); // NOLINT
- const internal::linked_ptr<const char> p4(raw_p4);
- EXPECT_EQ(raw_p4, GetRawPointer(p4));
-}
-
-TEST(GetRawPointerTest, WorksForRawPointers) {
- int* p = NULL;
- // Don't use EXPECT_EQ as no NULL-testing magic on Symbian.
- EXPECT_TRUE(NULL == GetRawPointer(p));
- int n = 1;
- EXPECT_EQ(&n, GetRawPointer(&n));
-}
-
-// Tests KindOf<T>.
-
-class Base {};
-class Derived : public Base {};
-
-TEST(KindOfTest, Bool) {
- EXPECT_EQ(kBool, GMOCK_KIND_OF_(bool)); // NOLINT
-}
-
-TEST(KindOfTest, Integer) {
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(char)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(signed char)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned char)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(short)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned short)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(int)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned int)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(long)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned long)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(wchar_t)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(Int64)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(UInt64)); // NOLINT
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(size_t)); // NOLINT
-#if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN
- // ssize_t is not defined on Windows and possibly some other OSes.
- EXPECT_EQ(kInteger, GMOCK_KIND_OF_(ssize_t)); // NOLINT
-#endif
-}
-
-TEST(KindOfTest, FloatingPoint) {
- EXPECT_EQ(kFloatingPoint, GMOCK_KIND_OF_(float)); // NOLINT
- EXPECT_EQ(kFloatingPoint, GMOCK_KIND_OF_(double)); // NOLINT
- EXPECT_EQ(kFloatingPoint, GMOCK_KIND_OF_(long double)); // NOLINT
-}
-
-TEST(KindOfTest, Other) {
- EXPECT_EQ(kOther, GMOCK_KIND_OF_(void*)); // NOLINT
- EXPECT_EQ(kOther, GMOCK_KIND_OF_(char**)); // NOLINT
- EXPECT_EQ(kOther, GMOCK_KIND_OF_(Base)); // NOLINT
-}
-
-// Tests LosslessArithmeticConvertible<T, U>.
-
-TEST(LosslessArithmeticConvertibleTest, BoolToBool) {
- EXPECT_TRUE((LosslessArithmeticConvertible<bool, bool>::value));
-}
-
-TEST(LosslessArithmeticConvertibleTest, BoolToInteger) {
- EXPECT_TRUE((LosslessArithmeticConvertible<bool, char>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<bool, int>::value));
- EXPECT_TRUE(
- (LosslessArithmeticConvertible<bool, unsigned long>::value)); // NOLINT
-}
-
-TEST(LosslessArithmeticConvertibleTest, BoolToFloatingPoint) {
- EXPECT_TRUE((LosslessArithmeticConvertible<bool, float>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<bool, double>::value));
-}
-
-TEST(LosslessArithmeticConvertibleTest, IntegerToBool) {
- EXPECT_FALSE((LosslessArithmeticConvertible<unsigned char, bool>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<int, bool>::value));
-}
-
-TEST(LosslessArithmeticConvertibleTest, IntegerToInteger) {
- // Unsigned => larger signed is fine.
- EXPECT_TRUE((LosslessArithmeticConvertible<unsigned char, int>::value));
-
- // Unsigned => larger unsigned is fine.
- EXPECT_TRUE(
- (LosslessArithmeticConvertible<unsigned short, UInt64>::value)); // NOLINT
-
- // Signed => unsigned is not fine.
- EXPECT_FALSE((LosslessArithmeticConvertible<short, UInt64>::value)); // NOLINT
- EXPECT_FALSE((LosslessArithmeticConvertible<
- signed char, unsigned int>::value)); // NOLINT
-
- // Same size and same signedness: fine too.
- EXPECT_TRUE((LosslessArithmeticConvertible<
- unsigned char, unsigned char>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<int, int>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<wchar_t, wchar_t>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<
- unsigned long, unsigned long>::value)); // NOLINT
-
- // Same size, different signedness: not fine.
- EXPECT_FALSE((LosslessArithmeticConvertible<
- unsigned char, signed char>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<int, unsigned int>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<UInt64, Int64>::value));
-
- // Larger size => smaller size is not fine.
- EXPECT_FALSE((LosslessArithmeticConvertible<long, char>::value)); // NOLINT
- EXPECT_FALSE((LosslessArithmeticConvertible<int, signed char>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<Int64, unsigned int>::value));
-}
-
-TEST(LosslessArithmeticConvertibleTest, IntegerToFloatingPoint) {
- // Integers cannot be losslessly converted to floating-points, as
- // the format of the latter is implementation-defined.
- EXPECT_FALSE((LosslessArithmeticConvertible<char, float>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<int, double>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<
- short, long double>::value)); // NOLINT
-}
-
-TEST(LosslessArithmeticConvertibleTest, FloatingPointToBool) {
- EXPECT_FALSE((LosslessArithmeticConvertible<float, bool>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<double, bool>::value));
-}
-
-TEST(LosslessArithmeticConvertibleTest, FloatingPointToInteger) {
- EXPECT_FALSE((LosslessArithmeticConvertible<float, long>::value)); // NOLINT
- EXPECT_FALSE((LosslessArithmeticConvertible<double, Int64>::value));
- EXPECT_FALSE((LosslessArithmeticConvertible<long double, int>::value));
-}
-
-TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) {
- // Smaller size => larger size is fine.
- EXPECT_TRUE((LosslessArithmeticConvertible<float, double>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<float, long double>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<double, long double>::value));
-
- // Same size: fine.
- EXPECT_TRUE((LosslessArithmeticConvertible<float, float>::value));
- EXPECT_TRUE((LosslessArithmeticConvertible<double, double>::value));
-
- // Larger size => smaller size is not fine.
- EXPECT_FALSE((LosslessArithmeticConvertible<double, float>::value));
- if (sizeof(double) == sizeof(long double)) { // NOLINT
- // In some implementations (e.g. MSVC), double and long double
- // have the same size.
- EXPECT_TRUE((LosslessArithmeticConvertible<long double, double>::value));
- } else {
- EXPECT_FALSE((LosslessArithmeticConvertible<long double, double>::value));
- }
-}
-
-// Tests the TupleMatches() template function.
-
-TEST(TupleMatchesTest, WorksForSize0) {
- tuple<> matchers;
- tuple<> values;
-
- EXPECT_TRUE(TupleMatches(matchers, values));
-}
-
-TEST(TupleMatchesTest, WorksForSize1) {
- tuple<Matcher<int> > matchers(Eq(1));
- tuple<int> values1(1),
- values2(2);
-
- EXPECT_TRUE(TupleMatches(matchers, values1));
- EXPECT_FALSE(TupleMatches(matchers, values2));
-}
-
-TEST(TupleMatchesTest, WorksForSize2) {
- tuple<Matcher<int>, Matcher<char> > matchers(Eq(1), Eq('a'));
- tuple<int, char> values1(1, 'a'),
- values2(1, 'b'),
- values3(2, 'a'),
- values4(2, 'b');
-
- EXPECT_TRUE(TupleMatches(matchers, values1));
- EXPECT_FALSE(TupleMatches(matchers, values2));
- EXPECT_FALSE(TupleMatches(matchers, values3));
- EXPECT_FALSE(TupleMatches(matchers, values4));
-}
-
-TEST(TupleMatchesTest, WorksForSize5) {
- tuple<Matcher<int>, Matcher<char>, Matcher<bool>, Matcher<long>, // NOLINT
- Matcher<string> >
- matchers(Eq(1), Eq('a'), Eq(true), Eq(2L), Eq("hi"));
- tuple<int, char, bool, long, string> // NOLINT
- values1(1, 'a', true, 2L, "hi"),
- values2(1, 'a', true, 2L, "hello"),
- values3(2, 'a', true, 2L, "hi");
-
- EXPECT_TRUE(TupleMatches(matchers, values1));
- EXPECT_FALSE(TupleMatches(matchers, values2));
- EXPECT_FALSE(TupleMatches(matchers, values3));
-}
-
-// Tests that Assert(true, ...) succeeds.
-TEST(AssertTest, SucceedsOnTrue) {
- Assert(true, __FILE__, __LINE__, "This should succeed.");
- Assert(true, __FILE__, __LINE__); // This should succeed too.
-}
-
-// Tests that Assert(false, ...) generates a fatal failure.
-TEST(AssertTest, FailsFatallyOnFalse) {
- EXPECT_DEATH_IF_SUPPORTED({
- Assert(false, __FILE__, __LINE__, "This should fail.");
- }, "");
-
- EXPECT_DEATH_IF_SUPPORTED({
- Assert(false, __FILE__, __LINE__);
- }, "");
-}
-
-// Tests that Expect(true, ...) succeeds.
-TEST(ExpectTest, SucceedsOnTrue) {
- Expect(true, __FILE__, __LINE__, "This should succeed.");
- Expect(true, __FILE__, __LINE__); // This should succeed too.
-}
-
-// Tests that Expect(false, ...) generates a non-fatal failure.
-TEST(ExpectTest, FailsNonfatallyOnFalse) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- Expect(false, __FILE__, __LINE__, "This should fail.");
- }, "This should fail");
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- Expect(false, __FILE__, __LINE__);
- }, "Expectation failed");
-}
-
-// Tests LogIsVisible().
-
-class LogIsVisibleTest : public ::testing::Test {
- protected:
- virtual void SetUp() {
- // The code needs to work when both ::string and ::std::string are
- // defined and the flag is implemented as a
- // testing::internal::String. In this case, without the call to
- // c_str(), the compiler will complain that it cannot figure out
- // whether the String flag should be converted to a ::string or an
- // ::std::string before being assigned to original_verbose_.
- original_verbose_ = GMOCK_FLAG(verbose).c_str();
- }
-
- virtual void TearDown() { GMOCK_FLAG(verbose) = original_verbose_; }
-
- string original_verbose_;
-};
-
-TEST_F(LogIsVisibleTest, AlwaysReturnsTrueIfVerbosityIsInfo) {
- GMOCK_FLAG(verbose) = kInfoVerbosity;
- EXPECT_TRUE(LogIsVisible(INFO));
- EXPECT_TRUE(LogIsVisible(WARNING));
-}
-
-TEST_F(LogIsVisibleTest, AlwaysReturnsFalseIfVerbosityIsError) {
- GMOCK_FLAG(verbose) = kErrorVerbosity;
- EXPECT_FALSE(LogIsVisible(INFO));
- EXPECT_FALSE(LogIsVisible(WARNING));
-}
-
-TEST_F(LogIsVisibleTest, WorksWhenVerbosityIsWarning) {
- GMOCK_FLAG(verbose) = kWarningVerbosity;
- EXPECT_FALSE(LogIsVisible(INFO));
- EXPECT_TRUE(LogIsVisible(WARNING));
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests the Log() function.
-
-// Verifies that Log() behaves correctly for the given verbosity level
-// and log severity.
-void TestLogWithSeverity(const string& verbosity, LogSeverity severity,
- bool should_print) {
- const string old_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = verbosity;
- CaptureStdout();
- Log(severity, "Test log.\n", 0);
- if (should_print) {
- EXPECT_THAT(GetCapturedStdout().c_str(),
- ContainsRegex(
- severity == WARNING ?
- "^\nGMOCK WARNING:\nTest log\\.\nStack trace:\n" :
- "^\nTest log\\.\nStack trace:\n"));
- } else {
- EXPECT_STREQ("", GetCapturedStdout().c_str());
- }
- GMOCK_FLAG(verbose) = old_flag;
-}
-
-// Tests that when the stack_frames_to_skip parameter is negative,
-// Log() doesn't include the stack trace in the output.
-TEST(LogTest, NoStackTraceWhenStackFramesToSkipIsNegative) {
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = kInfoVerbosity;
- CaptureStdout();
- Log(INFO, "Test log.\n", -1);
- EXPECT_STREQ("\nTest log.\n", GetCapturedStdout().c_str());
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-// Tests that in opt mode, a positive stack_frames_to_skip argument is
-// treated as 0.
-TEST(LogTest, NoSkippingStackFrameInOptMode) {
- CaptureStdout();
- Log(WARNING, "Test log.\n", 100);
- const String log = GetCapturedStdout();
-
-# if defined(NDEBUG) && GTEST_GOOGLE3_MODE_
-
- // In opt mode, no stack frame should be skipped.
- EXPECT_THAT(log, ContainsRegex("\nGMOCK WARNING:\n"
- "Test log\\.\n"
- "Stack trace:\n"
- ".+"));
-# else
-
- // In dbg mode, the stack frames should be skipped.
- EXPECT_STREQ("\nGMOCK WARNING:\n"
- "Test log.\n"
- "Stack trace:\n", log.c_str());
-# endif
-}
-
-// Tests that all logs are printed when the value of the
-// --gmock_verbose flag is "info".
-TEST(LogTest, AllLogsArePrintedWhenVerbosityIsInfo) {
- TestLogWithSeverity(kInfoVerbosity, INFO, true);
- TestLogWithSeverity(kInfoVerbosity, WARNING, true);
-}
-
-// Tests that only warnings are printed when the value of the
-// --gmock_verbose flag is "warning".
-TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsWarning) {
- TestLogWithSeverity(kWarningVerbosity, INFO, false);
- TestLogWithSeverity(kWarningVerbosity, WARNING, true);
-}
-
-// Tests that no logs are printed when the value of the
-// --gmock_verbose flag is "error".
-TEST(LogTest, NoLogsArePrintedWhenVerbosityIsError) {
- TestLogWithSeverity(kErrorVerbosity, INFO, false);
- TestLogWithSeverity(kErrorVerbosity, WARNING, false);
-}
-
-// Tests that only warnings are printed when the value of the
-// --gmock_verbose flag is invalid.
-TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsInvalid) {
- TestLogWithSeverity("invalid", INFO, false);
- TestLogWithSeverity("invalid", WARNING, true);
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-TEST(TypeTraitsTest, true_type) {
- EXPECT_TRUE(true_type::value);
-}
-
-TEST(TypeTraitsTest, false_type) {
- EXPECT_FALSE(false_type::value);
-}
-
-TEST(TypeTraitsTest, is_reference) {
- EXPECT_FALSE(is_reference<int>::value);
- EXPECT_FALSE(is_reference<char*>::value);
- EXPECT_TRUE(is_reference<const int&>::value);
-}
-
-TEST(TypeTraitsTest, is_pointer) {
- EXPECT_FALSE(is_pointer<int>::value);
- EXPECT_FALSE(is_pointer<char&>::value);
- EXPECT_TRUE(is_pointer<const int*>::value);
-}
-
-TEST(TypeTraitsTest, type_equals) {
- EXPECT_FALSE((type_equals<int, const int>::value));
- EXPECT_FALSE((type_equals<int, int&>::value));
- EXPECT_FALSE((type_equals<int, double>::value));
- EXPECT_TRUE((type_equals<char, char>::value));
-}
-
-TEST(TypeTraitsTest, remove_reference) {
- EXPECT_TRUE((type_equals<char, remove_reference<char&>::type>::value));
- EXPECT_TRUE((type_equals<const int,
- remove_reference<const int&>::type>::value));
- EXPECT_TRUE((type_equals<int, remove_reference<int>::type>::value));
- EXPECT_TRUE((type_equals<double*, remove_reference<double*>::type>::value));
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Verifies that Log() behaves correctly for the given verbosity level
-// and log severity.
-String GrabOutput(void(*logger)(), const char* verbosity) {
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = verbosity;
- CaptureStdout();
- logger();
- GMOCK_FLAG(verbose) = saved_flag;
- return GetCapturedStdout();
-}
-
-class DummyMock {
- public:
- MOCK_METHOD0(TestMethod, void());
- MOCK_METHOD1(TestMethodArg, void(int dummy));
-};
-
-void ExpectCallLogger() {
- DummyMock mock;
- EXPECT_CALL(mock, TestMethod());
- mock.TestMethod();
-};
-
-// Verifies that EXPECT_CALL logs if the --gmock_verbose flag is set to "info".
-TEST(ExpectCallTest, LogsWhenVerbosityIsInfo) {
- EXPECT_THAT(GrabOutput(ExpectCallLogger, kInfoVerbosity),
- HasSubstr("EXPECT_CALL(mock, TestMethod())"));
-}
-
-// Verifies that EXPECT_CALL doesn't log
-// if the --gmock_verbose flag is set to "warning".
-TEST(ExpectCallTest, DoesNotLogWhenVerbosityIsWarning) {
- EXPECT_STREQ("", GrabOutput(ExpectCallLogger, kWarningVerbosity).c_str());
-}
-
-// Verifies that EXPECT_CALL doesn't log
-// if the --gmock_verbose flag is set to "error".
-TEST(ExpectCallTest, DoesNotLogWhenVerbosityIsError) {
- EXPECT_STREQ("", GrabOutput(ExpectCallLogger, kErrorVerbosity).c_str());
-}
-
-void OnCallLogger() {
- DummyMock mock;
- ON_CALL(mock, TestMethod());
-};
-
-// Verifies that ON_CALL logs if the --gmock_verbose flag is set to "info".
-TEST(OnCallTest, LogsWhenVerbosityIsInfo) {
- EXPECT_THAT(GrabOutput(OnCallLogger, kInfoVerbosity),
- HasSubstr("ON_CALL(mock, TestMethod())"));
-}
-
-// Verifies that ON_CALL doesn't log
-// if the --gmock_verbose flag is set to "warning".
-TEST(OnCallTest, DoesNotLogWhenVerbosityIsWarning) {
- EXPECT_STREQ("", GrabOutput(OnCallLogger, kWarningVerbosity).c_str());
-}
-
-// Verifies that ON_CALL doesn't log if
-// the --gmock_verbose flag is set to "error".
-TEST(OnCallTest, DoesNotLogWhenVerbosityIsError) {
- EXPECT_STREQ("", GrabOutput(OnCallLogger, kErrorVerbosity).c_str());
-}
-
-void OnCallAnyArgumentLogger() {
- DummyMock mock;
- ON_CALL(mock, TestMethodArg(_));
-}
-
-// Verifies that ON_CALL prints provided _ argument.
-TEST(OnCallTest, LogsAnythingArgument) {
- EXPECT_THAT(GrabOutput(OnCallAnyArgumentLogger, kInfoVerbosity),
- HasSubstr("ON_CALL(mock, TestMethodArg(_)"));
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Tests StlContainerView.
-
-TEST(StlContainerViewTest, WorksForStlContainer) {
- StaticAssertTypeEq<std::vector<int>,
- StlContainerView<std::vector<int> >::type>();
- StaticAssertTypeEq<const std::vector<double>&,
- StlContainerView<std::vector<double> >::const_reference>();
-
- typedef std::vector<char> Chars;
- Chars v1;
- const Chars& v2(StlContainerView<Chars>::ConstReference(v1));
- EXPECT_EQ(&v1, &v2);
-
- v1.push_back('a');
- Chars v3 = StlContainerView<Chars>::Copy(v1);
- EXPECT_THAT(v3, Eq(v3));
-}
-
-TEST(StlContainerViewTest, WorksForStaticNativeArray) {
- StaticAssertTypeEq<NativeArray<int>,
- StlContainerView<int[3]>::type>();
- StaticAssertTypeEq<NativeArray<double>,
- StlContainerView<const double[4]>::type>();
- StaticAssertTypeEq<NativeArray<char[3]>,
- StlContainerView<const char[2][3]>::type>();
-
- StaticAssertTypeEq<const NativeArray<int>,
- StlContainerView<int[2]>::const_reference>();
-
- int a1[3] = { 0, 1, 2 };
- NativeArray<int> a2 = StlContainerView<int[3]>::ConstReference(a1);
- EXPECT_EQ(3U, a2.size());
- EXPECT_EQ(a1, a2.begin());
-
- const NativeArray<int> a3 = StlContainerView<int[3]>::Copy(a1);
- ASSERT_EQ(3U, a3.size());
- EXPECT_EQ(0, a3.begin()[0]);
- EXPECT_EQ(1, a3.begin()[1]);
- EXPECT_EQ(2, a3.begin()[2]);
-
- // Makes sure a1 and a3 aren't aliases.
- a1[0] = 3;
- EXPECT_EQ(0, a3.begin()[0]);
-}
-
-TEST(StlContainerViewTest, WorksForDynamicNativeArray) {
- StaticAssertTypeEq<NativeArray<int>,
- StlContainerView<tuple<const int*, size_t> >::type>();
- StaticAssertTypeEq<NativeArray<double>,
- StlContainerView<tuple<linked_ptr<double>, int> >::type>();
-
- StaticAssertTypeEq<const NativeArray<int>,
- StlContainerView<tuple<const int*, int> >::const_reference>();
-
- int a1[3] = { 0, 1, 2 };
- const int* const p1 = a1;
- NativeArray<int> a2 = StlContainerView<tuple<const int*, int> >::
- ConstReference(make_tuple(p1, 3));
- EXPECT_EQ(3U, a2.size());
- EXPECT_EQ(a1, a2.begin());
-
- const NativeArray<int> a3 = StlContainerView<tuple<int*, size_t> >::
- Copy(make_tuple(static_cast<int*>(a1), 3));
- ASSERT_EQ(3U, a3.size());
- EXPECT_EQ(0, a3.begin()[0]);
- EXPECT_EQ(1, a3.begin()[1]);
- EXPECT_EQ(2, a3.begin()[2]);
-
- // Makes sure a1 and a3 aren't aliases.
- a1[0] = 3;
- EXPECT_EQ(0, a3.begin()[0]);
-}
-
-} // namespace
-} // namespace internal
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-matchers_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-matchers_test.cc
deleted file mode 100644
index 9ad62c476..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-matchers_test.cc
+++ /dev/null
@@ -1,4040 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests some commonly used argument matchers.
-
-#include "gmock/gmock-matchers.h"
-
-#include <string.h>
-#include <functional>
-#include <iostream>
-#include <list>
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-namespace testing {
-
-namespace internal {
-string JoinAsTuple(const Strings& fields);
-} // namespace internal
-
-namespace gmock_matchers_test {
-
-using std::list;
-using std::make_pair;
-using std::map;
-using std::multimap;
-using std::multiset;
-using std::ostream;
-using std::pair;
-using std::set;
-using std::stringstream;
-using std::tr1::get;
-using std::tr1::make_tuple;
-using std::tr1::tuple;
-using std::vector;
-using testing::A;
-using testing::AllArgs;
-using testing::AllOf;
-using testing::An;
-using testing::AnyOf;
-using testing::ByRef;
-using testing::ContainsRegex;
-using testing::DoubleEq;
-using testing::EndsWith;
-using testing::Eq;
-using testing::ExplainMatchResult;
-using testing::Field;
-using testing::FloatEq;
-using testing::Ge;
-using testing::Gt;
-using testing::HasSubstr;
-using testing::IsNull;
-using testing::Key;
-using testing::Le;
-using testing::Lt;
-using testing::MakeMatcher;
-using testing::MakePolymorphicMatcher;
-using testing::MatchResultListener;
-using testing::Matcher;
-using testing::MatcherCast;
-using testing::MatcherInterface;
-using testing::Matches;
-using testing::MatchesRegex;
-using testing::NanSensitiveDoubleEq;
-using testing::NanSensitiveFloatEq;
-using testing::Ne;
-using testing::Not;
-using testing::NotNull;
-using testing::Pair;
-using testing::Pointee;
-using testing::Pointwise;
-using testing::PolymorphicMatcher;
-using testing::Property;
-using testing::Ref;
-using testing::ResultOf;
-using testing::StartsWith;
-using testing::StrCaseEq;
-using testing::StrCaseNe;
-using testing::StrEq;
-using testing::StrNe;
-using testing::Truly;
-using testing::TypedEq;
-using testing::Value;
-using testing::_;
-using testing::internal::DummyMatchResultListener;
-using testing::internal::ExplainMatchFailureTupleTo;
-using testing::internal::FloatingEqMatcher;
-using testing::internal::FormatMatcherDescription;
-using testing::internal::IsReadableTypeName;
-using testing::internal::JoinAsTuple;
-using testing::internal::RE;
-using testing::internal::StreamMatchResultListener;
-using testing::internal::String;
-using testing::internal::StringMatchResultListener;
-using testing::internal::Strings;
-using testing::internal::linked_ptr;
-using testing::internal::scoped_ptr;
-using testing::internal::string;
-
-// For testing ExplainMatchResultTo().
-class GreaterThanMatcher : public MatcherInterface<int> {
- public:
- explicit GreaterThanMatcher(int rhs) : rhs_(rhs) {}
-
- virtual void DescribeTo(ostream* os) const {
- *os << "is > " << rhs_;
- }
-
- virtual bool MatchAndExplain(int lhs,
- MatchResultListener* listener) const {
- const int diff = lhs - rhs_;
- if (diff > 0) {
- *listener << "which is " << diff << " more than " << rhs_;
- } else if (diff == 0) {
- *listener << "which is the same as " << rhs_;
- } else {
- *listener << "which is " << -diff << " less than " << rhs_;
- }
-
- return lhs > rhs_;
- }
-
- private:
- int rhs_;
-};
-
-Matcher<int> GreaterThan(int n) {
- return MakeMatcher(new GreaterThanMatcher(n));
-}
-
-string OfType(const string& type_name) {
-#if GTEST_HAS_RTTI
- return " (of type " + type_name + ")";
-#else
- return "";
-#endif
-}
-
-// Returns the description of the given matcher.
-template <typename T>
-string Describe(const Matcher<T>& m) {
- stringstream ss;
- m.DescribeTo(&ss);
- return ss.str();
-}
-
-// Returns the description of the negation of the given matcher.
-template <typename T>
-string DescribeNegation(const Matcher<T>& m) {
- stringstream ss;
- m.DescribeNegationTo(&ss);
- return ss.str();
-}
-
-// Returns the reason why x matches, or doesn't match, m.
-template <typename MatcherType, typename Value>
-string Explain(const MatcherType& m, const Value& x) {
- StringMatchResultListener listener;
- ExplainMatchResult(m, x, &listener);
- return listener.str();
-}
-
-TEST(MatchResultListenerTest, StreamingWorks) {
- StringMatchResultListener listener;
- listener << "hi" << 5;
- EXPECT_EQ("hi5", listener.str());
-
- // Streaming shouldn't crash when the underlying ostream is NULL.
- DummyMatchResultListener dummy;
- dummy << "hi" << 5;
-}
-
-TEST(MatchResultListenerTest, CanAccessUnderlyingStream) {
- EXPECT_TRUE(DummyMatchResultListener().stream() == NULL);
- EXPECT_TRUE(StreamMatchResultListener(NULL).stream() == NULL);
-
- EXPECT_EQ(&std::cout, StreamMatchResultListener(&std::cout).stream());
-}
-
-TEST(MatchResultListenerTest, IsInterestedWorks) {
- EXPECT_TRUE(StringMatchResultListener().IsInterested());
- EXPECT_TRUE(StreamMatchResultListener(&std::cout).IsInterested());
-
- EXPECT_FALSE(DummyMatchResultListener().IsInterested());
- EXPECT_FALSE(StreamMatchResultListener(NULL).IsInterested());
-}
-
-// Makes sure that the MatcherInterface<T> interface doesn't
-// change.
-class EvenMatcherImpl : public MatcherInterface<int> {
- public:
- virtual bool MatchAndExplain(int x,
- MatchResultListener* /* listener */) const {
- return x % 2 == 0;
- }
-
- virtual void DescribeTo(ostream* os) const {
- *os << "is an even number";
- }
-
- // We deliberately don't define DescribeNegationTo() and
- // ExplainMatchResultTo() here, to make sure the definition of these
- // two methods is optional.
-};
-
-// Makes sure that the MatcherInterface API doesn't change.
-TEST(MatcherInterfaceTest, CanBeImplementedUsingPublishedAPI) {
- EvenMatcherImpl m;
-}
-
-// Tests implementing a monomorphic matcher using MatchAndExplain().
-
-class NewEvenMatcherImpl : public MatcherInterface<int> {
- public:
- virtual bool MatchAndExplain(int x, MatchResultListener* listener) const {
- const bool match = x % 2 == 0;
- // Verifies that we can stream to a listener directly.
- *listener << "value % " << 2;
- if (listener->stream() != NULL) {
- // Verifies that we can stream to a listener's underlying stream
- // too.
- *listener->stream() << " == " << (x % 2);
- }
- return match;
- }
-
- virtual void DescribeTo(ostream* os) const {
- *os << "is an even number";
- }
-};
-
-TEST(MatcherInterfaceTest, CanBeImplementedUsingNewAPI) {
- Matcher<int> m = MakeMatcher(new NewEvenMatcherImpl);
- EXPECT_TRUE(m.Matches(2));
- EXPECT_FALSE(m.Matches(3));
- EXPECT_EQ("value % 2 == 0", Explain(m, 2));
- EXPECT_EQ("value % 2 == 1", Explain(m, 3));
-}
-
-// Tests default-constructing a matcher.
-TEST(MatcherTest, CanBeDefaultConstructed) {
- Matcher<double> m;
-}
-
-// Tests that Matcher<T> can be constructed from a MatcherInterface<T>*.
-TEST(MatcherTest, CanBeConstructedFromMatcherInterface) {
- const MatcherInterface<int>* impl = new EvenMatcherImpl;
- Matcher<int> m(impl);
- EXPECT_TRUE(m.Matches(4));
- EXPECT_FALSE(m.Matches(5));
-}
-
-// Tests that value can be used in place of Eq(value).
-TEST(MatcherTest, CanBeImplicitlyConstructedFromValue) {
- Matcher<int> m1 = 5;
- EXPECT_TRUE(m1.Matches(5));
- EXPECT_FALSE(m1.Matches(6));
-}
-
-// Tests that NULL can be used in place of Eq(NULL).
-TEST(MatcherTest, CanBeImplicitlyConstructedFromNULL) {
- Matcher<int*> m1 = NULL;
- EXPECT_TRUE(m1.Matches(NULL));
- int n = 0;
- EXPECT_FALSE(m1.Matches(&n));
-}
-
-// Tests that matchers are copyable.
-TEST(MatcherTest, IsCopyable) {
- // Tests the copy constructor.
- Matcher<bool> m1 = Eq(false);
- EXPECT_TRUE(m1.Matches(false));
- EXPECT_FALSE(m1.Matches(true));
-
- // Tests the assignment operator.
- m1 = Eq(true);
- EXPECT_TRUE(m1.Matches(true));
- EXPECT_FALSE(m1.Matches(false));
-}
-
-// Tests that Matcher<T>::DescribeTo() calls
-// MatcherInterface<T>::DescribeTo().
-TEST(MatcherTest, CanDescribeItself) {
- EXPECT_EQ("is an even number",
- Describe(Matcher<int>(new EvenMatcherImpl)));
-}
-
-// Tests Matcher<T>::MatchAndExplain().
-TEST(MatcherTest, MatchAndExplain) {
- Matcher<int> m = GreaterThan(0);
- StringMatchResultListener listener1;
- EXPECT_TRUE(m.MatchAndExplain(42, &listener1));
- EXPECT_EQ("which is 42 more than 0", listener1.str());
-
- StringMatchResultListener listener2;
- EXPECT_FALSE(m.MatchAndExplain(-9, &listener2));
- EXPECT_EQ("which is 9 less than 0", listener2.str());
-}
-
-// Tests that a C-string literal can be implicitly converted to a
-// Matcher<string> or Matcher<const string&>.
-TEST(StringMatcherTest, CanBeImplicitlyConstructedFromCStringLiteral) {
- Matcher<string> m1 = "hi";
- EXPECT_TRUE(m1.Matches("hi"));
- EXPECT_FALSE(m1.Matches("hello"));
-
- Matcher<const string&> m2 = "hi";
- EXPECT_TRUE(m2.Matches("hi"));
- EXPECT_FALSE(m2.Matches("hello"));
-}
-
-// Tests that a string object can be implicitly converted to a
-// Matcher<string> or Matcher<const string&>.
-TEST(StringMatcherTest, CanBeImplicitlyConstructedFromString) {
- Matcher<string> m1 = string("hi");
- EXPECT_TRUE(m1.Matches("hi"));
- EXPECT_FALSE(m1.Matches("hello"));
-
- Matcher<const string&> m2 = string("hi");
- EXPECT_TRUE(m2.Matches("hi"));
- EXPECT_FALSE(m2.Matches("hello"));
-}
-
-// Tests that MakeMatcher() constructs a Matcher<T> from a
-// MatcherInterface* without requiring the user to explicitly
-// write the type.
-TEST(MakeMatcherTest, ConstructsMatcherFromMatcherInterface) {
- const MatcherInterface<int>* dummy_impl = NULL;
- Matcher<int> m = MakeMatcher(dummy_impl);
-}
-
-// Tests that MakePolymorphicMatcher() can construct a polymorphic
-// matcher from its implementation using the old API.
-const int g_bar = 1;
-class ReferencesBarOrIsZeroImpl {
- public:
- template <typename T>
- bool MatchAndExplain(const T& x,
- MatchResultListener* /* listener */) const {
- const void* p = &x;
- return p == &g_bar || x == 0;
- }
-
- void DescribeTo(ostream* os) const { *os << "g_bar or zero"; }
-
- void DescribeNegationTo(ostream* os) const {
- *os << "doesn't reference g_bar and is not zero";
- }
-};
-
-// This function verifies that MakePolymorphicMatcher() returns a
-// PolymorphicMatcher<T> where T is the argument's type.
-PolymorphicMatcher<ReferencesBarOrIsZeroImpl> ReferencesBarOrIsZero() {
- return MakePolymorphicMatcher(ReferencesBarOrIsZeroImpl());
-}
-
-TEST(MakePolymorphicMatcherTest, ConstructsMatcherUsingOldAPI) {
- // Using a polymorphic matcher to match a reference type.
- Matcher<const int&> m1 = ReferencesBarOrIsZero();
- EXPECT_TRUE(m1.Matches(0));
- // Verifies that the identity of a by-reference argument is preserved.
- EXPECT_TRUE(m1.Matches(g_bar));
- EXPECT_FALSE(m1.Matches(1));
- EXPECT_EQ("g_bar or zero", Describe(m1));
-
- // Using a polymorphic matcher to match a value type.
- Matcher<double> m2 = ReferencesBarOrIsZero();
- EXPECT_TRUE(m2.Matches(0.0));
- EXPECT_FALSE(m2.Matches(0.1));
- EXPECT_EQ("g_bar or zero", Describe(m2));
-}
-
-// Tests implementing a polymorphic matcher using MatchAndExplain().
-
-class PolymorphicIsEvenImpl {
- public:
- void DescribeTo(ostream* os) const { *os << "is even"; }
-
- void DescribeNegationTo(ostream* os) const {
- *os << "is odd";
- }
-
- template <typename T>
- bool MatchAndExplain(const T& x, MatchResultListener* listener) const {
- // Verifies that we can stream to the listener directly.
- *listener << "% " << 2;
- if (listener->stream() != NULL) {
- // Verifies that we can stream to the listener's underlying stream
- // too.
- *listener->stream() << " == " << (x % 2);
- }
- return (x % 2) == 0;
- }
-};
-
-PolymorphicMatcher<PolymorphicIsEvenImpl> PolymorphicIsEven() {
- return MakePolymorphicMatcher(PolymorphicIsEvenImpl());
-}
-
-TEST(MakePolymorphicMatcherTest, ConstructsMatcherUsingNewAPI) {
- // Using PolymorphicIsEven() as a Matcher<int>.
- const Matcher<int> m1 = PolymorphicIsEven();
- EXPECT_TRUE(m1.Matches(42));
- EXPECT_FALSE(m1.Matches(43));
- EXPECT_EQ("is even", Describe(m1));
-
- const Matcher<int> not_m1 = Not(m1);
- EXPECT_EQ("is odd", Describe(not_m1));
-
- EXPECT_EQ("% 2 == 0", Explain(m1, 42));
-
- // Using PolymorphicIsEven() as a Matcher<char>.
- const Matcher<char> m2 = PolymorphicIsEven();
- EXPECT_TRUE(m2.Matches('\x42'));
- EXPECT_FALSE(m2.Matches('\x43'));
- EXPECT_EQ("is even", Describe(m2));
-
- const Matcher<char> not_m2 = Not(m2);
- EXPECT_EQ("is odd", Describe(not_m2));
-
- EXPECT_EQ("% 2 == 0", Explain(m2, '\x42'));
-}
-
-// Tests that MatcherCast<T>(m) works when m is a polymorphic matcher.
-TEST(MatcherCastTest, FromPolymorphicMatcher) {
- Matcher<int> m = MatcherCast<int>(Eq(5));
- EXPECT_TRUE(m.Matches(5));
- EXPECT_FALSE(m.Matches(6));
-}
-
-// For testing casting matchers between compatible types.
-class IntValue {
- public:
- // An int can be statically (although not implicitly) cast to a
- // IntValue.
- explicit IntValue(int a_value) : value_(a_value) {}
-
- int value() const { return value_; }
- private:
- int value_;
-};
-
-// For testing casting matchers between compatible types.
-bool IsPositiveIntValue(const IntValue& foo) {
- return foo.value() > 0;
-}
-
-// Tests that MatcherCast<T>(m) works when m is a Matcher<U> where T
-// can be statically converted to U.
-TEST(MatcherCastTest, FromCompatibleType) {
- Matcher<double> m1 = Eq(2.0);
- Matcher<int> m2 = MatcherCast<int>(m1);
- EXPECT_TRUE(m2.Matches(2));
- EXPECT_FALSE(m2.Matches(3));
-
- Matcher<IntValue> m3 = Truly(IsPositiveIntValue);
- Matcher<int> m4 = MatcherCast<int>(m3);
- // In the following, the arguments 1 and 0 are statically converted
- // to IntValue objects, and then tested by the IsPositiveIntValue()
- // predicate.
- EXPECT_TRUE(m4.Matches(1));
- EXPECT_FALSE(m4.Matches(0));
-}
-
-// Tests that MatcherCast<T>(m) works when m is a Matcher<const T&>.
-TEST(MatcherCastTest, FromConstReferenceToNonReference) {
- Matcher<const int&> m1 = Eq(0);
- Matcher<int> m2 = MatcherCast<int>(m1);
- EXPECT_TRUE(m2.Matches(0));
- EXPECT_FALSE(m2.Matches(1));
-}
-
-// Tests that MatcherCast<T>(m) works when m is a Matcher<T&>.
-TEST(MatcherCastTest, FromReferenceToNonReference) {
- Matcher<int&> m1 = Eq(0);
- Matcher<int> m2 = MatcherCast<int>(m1);
- EXPECT_TRUE(m2.Matches(0));
- EXPECT_FALSE(m2.Matches(1));
-}
-
-// Tests that MatcherCast<const T&>(m) works when m is a Matcher<T>.
-TEST(MatcherCastTest, FromNonReferenceToConstReference) {
- Matcher<int> m1 = Eq(0);
- Matcher<const int&> m2 = MatcherCast<const int&>(m1);
- EXPECT_TRUE(m2.Matches(0));
- EXPECT_FALSE(m2.Matches(1));
-}
-
-// Tests that MatcherCast<T&>(m) works when m is a Matcher<T>.
-TEST(MatcherCastTest, FromNonReferenceToReference) {
- Matcher<int> m1 = Eq(0);
- Matcher<int&> m2 = MatcherCast<int&>(m1);
- int n = 0;
- EXPECT_TRUE(m2.Matches(n));
- n = 1;
- EXPECT_FALSE(m2.Matches(n));
-}
-
-// Tests that MatcherCast<T>(m) works when m is a Matcher<T>.
-TEST(MatcherCastTest, FromSameType) {
- Matcher<int> m1 = Eq(0);
- Matcher<int> m2 = MatcherCast<int>(m1);
- EXPECT_TRUE(m2.Matches(0));
- EXPECT_FALSE(m2.Matches(1));
-}
-
-class Base {};
-class Derived : public Base {};
-
-// Tests that SafeMatcherCast<T>(m) works when m is a polymorphic matcher.
-TEST(SafeMatcherCastTest, FromPolymorphicMatcher) {
- Matcher<char> m2 = SafeMatcherCast<char>(Eq(32));
- EXPECT_TRUE(m2.Matches(' '));
- EXPECT_FALSE(m2.Matches('\n'));
-}
-
-// Tests that SafeMatcherCast<T>(m) works when m is a Matcher<U> where
-// T and U are arithmetic types and T can be losslessly converted to
-// U.
-TEST(SafeMatcherCastTest, FromLosslesslyConvertibleArithmeticType) {
- Matcher<double> m1 = DoubleEq(1.0);
- Matcher<float> m2 = SafeMatcherCast<float>(m1);
- EXPECT_TRUE(m2.Matches(1.0f));
- EXPECT_FALSE(m2.Matches(2.0f));
-
- Matcher<char> m3 = SafeMatcherCast<char>(TypedEq<int>('a'));
- EXPECT_TRUE(m3.Matches('a'));
- EXPECT_FALSE(m3.Matches('b'));
-}
-
-// Tests that SafeMatcherCast<T>(m) works when m is a Matcher<U> where T and U
-// are pointers or references to a derived and a base class, correspondingly.
-TEST(SafeMatcherCastTest, FromBaseClass) {
- Derived d, d2;
- Matcher<Base*> m1 = Eq(&d);
- Matcher<Derived*> m2 = SafeMatcherCast<Derived*>(m1);
- EXPECT_TRUE(m2.Matches(&d));
- EXPECT_FALSE(m2.Matches(&d2));
-
- Matcher<Base&> m3 = Ref(d);
- Matcher<Derived&> m4 = SafeMatcherCast<Derived&>(m3);
- EXPECT_TRUE(m4.Matches(d));
- EXPECT_FALSE(m4.Matches(d2));
-}
-
-// Tests that SafeMatcherCast<T&>(m) works when m is a Matcher<const T&>.
-TEST(SafeMatcherCastTest, FromConstReferenceToReference) {
- int n = 0;
- Matcher<const int&> m1 = Ref(n);
- Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
- int n1 = 0;
- EXPECT_TRUE(m2.Matches(n));
- EXPECT_FALSE(m2.Matches(n1));
-}
-
-// Tests that MatcherCast<const T&>(m) works when m is a Matcher<T>.
-TEST(SafeMatcherCastTest, FromNonReferenceToConstReference) {
- Matcher<int> m1 = Eq(0);
- Matcher<const int&> m2 = SafeMatcherCast<const int&>(m1);
- EXPECT_TRUE(m2.Matches(0));
- EXPECT_FALSE(m2.Matches(1));
-}
-
-// Tests that SafeMatcherCast<T&>(m) works when m is a Matcher<T>.
-TEST(SafeMatcherCastTest, FromNonReferenceToReference) {
- Matcher<int> m1 = Eq(0);
- Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
- int n = 0;
- EXPECT_TRUE(m2.Matches(n));
- n = 1;
- EXPECT_FALSE(m2.Matches(n));
-}
-
-// Tests that SafeMatcherCast<T>(m) works when m is a Matcher<T>.
-TEST(SafeMatcherCastTest, FromSameType) {
- Matcher<int> m1 = Eq(0);
- Matcher<int> m2 = SafeMatcherCast<int>(m1);
- EXPECT_TRUE(m2.Matches(0));
- EXPECT_FALSE(m2.Matches(1));
-}
-
-// Tests that A<T>() matches any value of type T.
-TEST(ATest, MatchesAnyValue) {
- // Tests a matcher for a value type.
- Matcher<double> m1 = A<double>();
- EXPECT_TRUE(m1.Matches(91.43));
- EXPECT_TRUE(m1.Matches(-15.32));
-
- // Tests a matcher for a reference type.
- int a = 2;
- int b = -6;
- Matcher<int&> m2 = A<int&>();
- EXPECT_TRUE(m2.Matches(a));
- EXPECT_TRUE(m2.Matches(b));
-}
-
-// Tests that A<T>() describes itself properly.
-TEST(ATest, CanDescribeSelf) {
- EXPECT_EQ("is anything", Describe(A<bool>()));
-}
-
-// Tests that An<T>() matches any value of type T.
-TEST(AnTest, MatchesAnyValue) {
- // Tests a matcher for a value type.
- Matcher<int> m1 = An<int>();
- EXPECT_TRUE(m1.Matches(9143));
- EXPECT_TRUE(m1.Matches(-1532));
-
- // Tests a matcher for a reference type.
- int a = 2;
- int b = -6;
- Matcher<int&> m2 = An<int&>();
- EXPECT_TRUE(m2.Matches(a));
- EXPECT_TRUE(m2.Matches(b));
-}
-
-// Tests that An<T>() describes itself properly.
-TEST(AnTest, CanDescribeSelf) {
- EXPECT_EQ("is anything", Describe(An<int>()));
-}
-
-// Tests that _ can be used as a matcher for any type and matches any
-// value of that type.
-TEST(UnderscoreTest, MatchesAnyValue) {
- // Uses _ as a matcher for a value type.
- Matcher<int> m1 = _;
- EXPECT_TRUE(m1.Matches(123));
- EXPECT_TRUE(m1.Matches(-242));
-
- // Uses _ as a matcher for a reference type.
- bool a = false;
- const bool b = true;
- Matcher<const bool&> m2 = _;
- EXPECT_TRUE(m2.Matches(a));
- EXPECT_TRUE(m2.Matches(b));
-}
-
-// Tests that _ describes itself properly.
-TEST(UnderscoreTest, CanDescribeSelf) {
- Matcher<int> m = _;
- EXPECT_EQ("is anything", Describe(m));
-}
-
-// Tests that Eq(x) matches any value equal to x.
-TEST(EqTest, MatchesEqualValue) {
- // 2 C-strings with same content but different addresses.
- const char a1[] = "hi";
- const char a2[] = "hi";
-
- Matcher<const char*> m1 = Eq(a1);
- EXPECT_TRUE(m1.Matches(a1));
- EXPECT_FALSE(m1.Matches(a2));
-}
-
-// Tests that Eq(v) describes itself properly.
-
-class Unprintable {
- public:
- Unprintable() : c_('a') {}
-
- bool operator==(const Unprintable& /* rhs */) { return true; }
- private:
- char c_;
-};
-
-TEST(EqTest, CanDescribeSelf) {
- Matcher<Unprintable> m = Eq(Unprintable());
- EXPECT_EQ("is equal to 1-byte object <61>", Describe(m));
-}
-
-// Tests that Eq(v) can be used to match any type that supports
-// comparing with type T, where T is v's type.
-TEST(EqTest, IsPolymorphic) {
- Matcher<int> m1 = Eq(1);
- EXPECT_TRUE(m1.Matches(1));
- EXPECT_FALSE(m1.Matches(2));
-
- Matcher<char> m2 = Eq(1);
- EXPECT_TRUE(m2.Matches('\1'));
- EXPECT_FALSE(m2.Matches('a'));
-}
-
-// Tests that TypedEq<T>(v) matches values of type T that's equal to v.
-TEST(TypedEqTest, ChecksEqualityForGivenType) {
- Matcher<char> m1 = TypedEq<char>('a');
- EXPECT_TRUE(m1.Matches('a'));
- EXPECT_FALSE(m1.Matches('b'));
-
- Matcher<int> m2 = TypedEq<int>(6);
- EXPECT_TRUE(m2.Matches(6));
- EXPECT_FALSE(m2.Matches(7));
-}
-
-// Tests that TypedEq(v) describes itself properly.
-TEST(TypedEqTest, CanDescribeSelf) {
- EXPECT_EQ("is equal to 2", Describe(TypedEq<int>(2)));
-}
-
-// Tests that TypedEq<T>(v) has type Matcher<T>.
-
-// Type<T>::IsTypeOf(v) compiles iff the type of value v is T, where T
-// is a "bare" type (i.e. not in the form of const U or U&). If v's
-// type is not T, the compiler will generate a message about
-// "undefined referece".
-template <typename T>
-struct Type {
- static bool IsTypeOf(const T& /* v */) { return true; }
-
- template <typename T2>
- static void IsTypeOf(T2 v);
-};
-
-TEST(TypedEqTest, HasSpecifiedType) {
- // Verfies that the type of TypedEq<T>(v) is Matcher<T>.
- Type<Matcher<int> >::IsTypeOf(TypedEq<int>(5));
- Type<Matcher<double> >::IsTypeOf(TypedEq<double>(5));
-}
-
-// Tests that Ge(v) matches anything >= v.
-TEST(GeTest, ImplementsGreaterThanOrEqual) {
- Matcher<int> m1 = Ge(0);
- EXPECT_TRUE(m1.Matches(1));
- EXPECT_TRUE(m1.Matches(0));
- EXPECT_FALSE(m1.Matches(-1));
-}
-
-// Tests that Ge(v) describes itself properly.
-TEST(GeTest, CanDescribeSelf) {
- Matcher<int> m = Ge(5);
- EXPECT_EQ("is >= 5", Describe(m));
-}
-
-// Tests that Gt(v) matches anything > v.
-TEST(GtTest, ImplementsGreaterThan) {
- Matcher<double> m1 = Gt(0);
- EXPECT_TRUE(m1.Matches(1.0));
- EXPECT_FALSE(m1.Matches(0.0));
- EXPECT_FALSE(m1.Matches(-1.0));
-}
-
-// Tests that Gt(v) describes itself properly.
-TEST(GtTest, CanDescribeSelf) {
- Matcher<int> m = Gt(5);
- EXPECT_EQ("is > 5", Describe(m));
-}
-
-// Tests that Le(v) matches anything <= v.
-TEST(LeTest, ImplementsLessThanOrEqual) {
- Matcher<char> m1 = Le('b');
- EXPECT_TRUE(m1.Matches('a'));
- EXPECT_TRUE(m1.Matches('b'));
- EXPECT_FALSE(m1.Matches('c'));
-}
-
-// Tests that Le(v) describes itself properly.
-TEST(LeTest, CanDescribeSelf) {
- Matcher<int> m = Le(5);
- EXPECT_EQ("is <= 5", Describe(m));
-}
-
-// Tests that Lt(v) matches anything < v.
-TEST(LtTest, ImplementsLessThan) {
- Matcher<const string&> m1 = Lt("Hello");
- EXPECT_TRUE(m1.Matches("Abc"));
- EXPECT_FALSE(m1.Matches("Hello"));
- EXPECT_FALSE(m1.Matches("Hello, world!"));
-}
-
-// Tests that Lt(v) describes itself properly.
-TEST(LtTest, CanDescribeSelf) {
- Matcher<int> m = Lt(5);
- EXPECT_EQ("is < 5", Describe(m));
-}
-
-// Tests that Ne(v) matches anything != v.
-TEST(NeTest, ImplementsNotEqual) {
- Matcher<int> m1 = Ne(0);
- EXPECT_TRUE(m1.Matches(1));
- EXPECT_TRUE(m1.Matches(-1));
- EXPECT_FALSE(m1.Matches(0));
-}
-
-// Tests that Ne(v) describes itself properly.
-TEST(NeTest, CanDescribeSelf) {
- Matcher<int> m = Ne(5);
- EXPECT_EQ("isn't equal to 5", Describe(m));
-}
-
-// Tests that IsNull() matches any NULL pointer of any type.
-TEST(IsNullTest, MatchesNullPointer) {
- Matcher<int*> m1 = IsNull();
- int* p1 = NULL;
- int n = 0;
- EXPECT_TRUE(m1.Matches(p1));
- EXPECT_FALSE(m1.Matches(&n));
-
- Matcher<const char*> m2 = IsNull();
- const char* p2 = NULL;
- EXPECT_TRUE(m2.Matches(p2));
- EXPECT_FALSE(m2.Matches("hi"));
-
-#if !GTEST_OS_SYMBIAN
- // Nokia's Symbian compiler generates:
- // gmock-matchers.h: ambiguous access to overloaded function
- // gmock-matchers.h: 'testing::Matcher<void *>::Matcher(void *)'
- // gmock-matchers.h: 'testing::Matcher<void *>::Matcher(const testing::
- // MatcherInterface<void *> *)'
- // gmock-matchers.h: (point of instantiation: 'testing::
- // gmock_matchers_test::IsNullTest_MatchesNullPointer_Test::TestBody()')
- // gmock-matchers.h: (instantiating: 'testing::PolymorphicMatc
- Matcher<void*> m3 = IsNull();
- void* p3 = NULL;
- EXPECT_TRUE(m3.Matches(p3));
- EXPECT_FALSE(m3.Matches(reinterpret_cast<void*>(0xbeef)));
-#endif
-}
-
-TEST(IsNullTest, LinkedPtr) {
- const Matcher<linked_ptr<int> > m = IsNull();
- const linked_ptr<int> null_p;
- const linked_ptr<int> non_null_p(new int);
-
- EXPECT_TRUE(m.Matches(null_p));
- EXPECT_FALSE(m.Matches(non_null_p));
-}
-
-TEST(IsNullTest, ReferenceToConstLinkedPtr) {
- const Matcher<const linked_ptr<double>&> m = IsNull();
- const linked_ptr<double> null_p;
- const linked_ptr<double> non_null_p(new double);
-
- EXPECT_TRUE(m.Matches(null_p));
- EXPECT_FALSE(m.Matches(non_null_p));
-}
-
-TEST(IsNullTest, ReferenceToConstScopedPtr) {
- const Matcher<const scoped_ptr<double>&> m = IsNull();
- const scoped_ptr<double> null_p;
- const scoped_ptr<double> non_null_p(new double);
-
- EXPECT_TRUE(m.Matches(null_p));
- EXPECT_FALSE(m.Matches(non_null_p));
-}
-
-// Tests that IsNull() describes itself properly.
-TEST(IsNullTest, CanDescribeSelf) {
- Matcher<int*> m = IsNull();
- EXPECT_EQ("is NULL", Describe(m));
- EXPECT_EQ("isn't NULL", DescribeNegation(m));
-}
-
-// Tests that NotNull() matches any non-NULL pointer of any type.
-TEST(NotNullTest, MatchesNonNullPointer) {
- Matcher<int*> m1 = NotNull();
- int* p1 = NULL;
- int n = 0;
- EXPECT_FALSE(m1.Matches(p1));
- EXPECT_TRUE(m1.Matches(&n));
-
- Matcher<const char*> m2 = NotNull();
- const char* p2 = NULL;
- EXPECT_FALSE(m2.Matches(p2));
- EXPECT_TRUE(m2.Matches("hi"));
-}
-
-TEST(NotNullTest, LinkedPtr) {
- const Matcher<linked_ptr<int> > m = NotNull();
- const linked_ptr<int> null_p;
- const linked_ptr<int> non_null_p(new int);
-
- EXPECT_FALSE(m.Matches(null_p));
- EXPECT_TRUE(m.Matches(non_null_p));
-}
-
-TEST(NotNullTest, ReferenceToConstLinkedPtr) {
- const Matcher<const linked_ptr<double>&> m = NotNull();
- const linked_ptr<double> null_p;
- const linked_ptr<double> non_null_p(new double);
-
- EXPECT_FALSE(m.Matches(null_p));
- EXPECT_TRUE(m.Matches(non_null_p));
-}
-
-TEST(NotNullTest, ReferenceToConstScopedPtr) {
- const Matcher<const scoped_ptr<double>&> m = NotNull();
- const scoped_ptr<double> null_p;
- const scoped_ptr<double> non_null_p(new double);
-
- EXPECT_FALSE(m.Matches(null_p));
- EXPECT_TRUE(m.Matches(non_null_p));
-}
-
-// Tests that NotNull() describes itself properly.
-TEST(NotNullTest, CanDescribeSelf) {
- Matcher<int*> m = NotNull();
- EXPECT_EQ("isn't NULL", Describe(m));
-}
-
-// Tests that Ref(variable) matches an argument that references
-// 'variable'.
-TEST(RefTest, MatchesSameVariable) {
- int a = 0;
- int b = 0;
- Matcher<int&> m = Ref(a);
- EXPECT_TRUE(m.Matches(a));
- EXPECT_FALSE(m.Matches(b));
-}
-
-// Tests that Ref(variable) describes itself properly.
-TEST(RefTest, CanDescribeSelf) {
- int n = 5;
- Matcher<int&> m = Ref(n);
- stringstream ss;
- ss << "references the variable @" << &n << " 5";
- EXPECT_EQ(string(ss.str()), Describe(m));
-}
-
-// Test that Ref(non_const_varialbe) can be used as a matcher for a
-// const reference.
-TEST(RefTest, CanBeUsedAsMatcherForConstReference) {
- int a = 0;
- int b = 0;
- Matcher<const int&> m = Ref(a);
- EXPECT_TRUE(m.Matches(a));
- EXPECT_FALSE(m.Matches(b));
-}
-
-// Tests that Ref(variable) is covariant, i.e. Ref(derived) can be
-// used wherever Ref(base) can be used (Ref(derived) is a sub-type
-// of Ref(base), but not vice versa.
-
-TEST(RefTest, IsCovariant) {
- Base base, base2;
- Derived derived;
- Matcher<const Base&> m1 = Ref(base);
- EXPECT_TRUE(m1.Matches(base));
- EXPECT_FALSE(m1.Matches(base2));
- EXPECT_FALSE(m1.Matches(derived));
-
- m1 = Ref(derived);
- EXPECT_TRUE(m1.Matches(derived));
- EXPECT_FALSE(m1.Matches(base));
- EXPECT_FALSE(m1.Matches(base2));
-}
-
-TEST(RefTest, ExplainsResult) {
- int n = 0;
- EXPECT_THAT(Explain(Matcher<const int&>(Ref(n)), n),
- StartsWith("which is located @"));
-
- int m = 0;
- EXPECT_THAT(Explain(Matcher<const int&>(Ref(n)), m),
- StartsWith("which is located @"));
-}
-
-// Tests string comparison matchers.
-
-TEST(StrEqTest, MatchesEqualString) {
- Matcher<const char*> m = StrEq(string("Hello"));
- EXPECT_TRUE(m.Matches("Hello"));
- EXPECT_FALSE(m.Matches("hello"));
- EXPECT_FALSE(m.Matches(NULL));
-
- Matcher<const string&> m2 = StrEq("Hello");
- EXPECT_TRUE(m2.Matches("Hello"));
- EXPECT_FALSE(m2.Matches("Hi"));
-}
-
-TEST(StrEqTest, CanDescribeSelf) {
- Matcher<string> m = StrEq("Hi-\'\"?\\\a\b\f\n\r\t\v\xD3");
- EXPECT_EQ("is equal to \"Hi-\'\\\"?\\\\\\a\\b\\f\\n\\r\\t\\v\\xD3\"",
- Describe(m));
-
- string str("01204500800");
- str[3] = '\0';
- Matcher<string> m2 = StrEq(str);
- EXPECT_EQ("is equal to \"012\\04500800\"", Describe(m2));
- str[0] = str[6] = str[7] = str[9] = str[10] = '\0';
- Matcher<string> m3 = StrEq(str);
- EXPECT_EQ("is equal to \"\\012\\045\\0\\08\\0\\0\"", Describe(m3));
-}
-
-TEST(StrNeTest, MatchesUnequalString) {
- Matcher<const char*> m = StrNe("Hello");
- EXPECT_TRUE(m.Matches(""));
- EXPECT_TRUE(m.Matches(NULL));
- EXPECT_FALSE(m.Matches("Hello"));
-
- Matcher<string> m2 = StrNe(string("Hello"));
- EXPECT_TRUE(m2.Matches("hello"));
- EXPECT_FALSE(m2.Matches("Hello"));
-}
-
-TEST(StrNeTest, CanDescribeSelf) {
- Matcher<const char*> m = StrNe("Hi");
- EXPECT_EQ("isn't equal to \"Hi\"", Describe(m));
-}
-
-TEST(StrCaseEqTest, MatchesEqualStringIgnoringCase) {
- Matcher<const char*> m = StrCaseEq(string("Hello"));
- EXPECT_TRUE(m.Matches("Hello"));
- EXPECT_TRUE(m.Matches("hello"));
- EXPECT_FALSE(m.Matches("Hi"));
- EXPECT_FALSE(m.Matches(NULL));
-
- Matcher<const string&> m2 = StrCaseEq("Hello");
- EXPECT_TRUE(m2.Matches("hello"));
- EXPECT_FALSE(m2.Matches("Hi"));
-}
-
-TEST(StrCaseEqTest, MatchesEqualStringWith0IgnoringCase) {
- string str1("oabocdooeoo");
- string str2("OABOCDOOEOO");
- Matcher<const string&> m0 = StrCaseEq(str1);
- EXPECT_FALSE(m0.Matches(str2 + string(1, '\0')));
-
- str1[3] = str2[3] = '\0';
- Matcher<const string&> m1 = StrCaseEq(str1);
- EXPECT_TRUE(m1.Matches(str2));
-
- str1[0] = str1[6] = str1[7] = str1[10] = '\0';
- str2[0] = str2[6] = str2[7] = str2[10] = '\0';
- Matcher<const string&> m2 = StrCaseEq(str1);
- str1[9] = str2[9] = '\0';
- EXPECT_FALSE(m2.Matches(str2));
-
- Matcher<const string&> m3 = StrCaseEq(str1);
- EXPECT_TRUE(m3.Matches(str2));
-
- EXPECT_FALSE(m3.Matches(str2 + "x"));
- str2.append(1, '\0');
- EXPECT_FALSE(m3.Matches(str2));
- EXPECT_FALSE(m3.Matches(string(str2, 0, 9)));
-}
-
-TEST(StrCaseEqTest, CanDescribeSelf) {
- Matcher<string> m = StrCaseEq("Hi");
- EXPECT_EQ("is equal to (ignoring case) \"Hi\"", Describe(m));
-}
-
-TEST(StrCaseNeTest, MatchesUnequalStringIgnoringCase) {
- Matcher<const char*> m = StrCaseNe("Hello");
- EXPECT_TRUE(m.Matches("Hi"));
- EXPECT_TRUE(m.Matches(NULL));
- EXPECT_FALSE(m.Matches("Hello"));
- EXPECT_FALSE(m.Matches("hello"));
-
- Matcher<string> m2 = StrCaseNe(string("Hello"));
- EXPECT_TRUE(m2.Matches(""));
- EXPECT_FALSE(m2.Matches("Hello"));
-}
-
-TEST(StrCaseNeTest, CanDescribeSelf) {
- Matcher<const char*> m = StrCaseNe("Hi");
- EXPECT_EQ("isn't equal to (ignoring case) \"Hi\"", Describe(m));
-}
-
-// Tests that HasSubstr() works for matching string-typed values.
-TEST(HasSubstrTest, WorksForStringClasses) {
- const Matcher<string> m1 = HasSubstr("foo");
- EXPECT_TRUE(m1.Matches(string("I love food.")));
- EXPECT_FALSE(m1.Matches(string("tofo")));
-
- const Matcher<const std::string&> m2 = HasSubstr("foo");
- EXPECT_TRUE(m2.Matches(std::string("I love food.")));
- EXPECT_FALSE(m2.Matches(std::string("tofo")));
-}
-
-// Tests that HasSubstr() works for matching C-string-typed values.
-TEST(HasSubstrTest, WorksForCStrings) {
- const Matcher<char*> m1 = HasSubstr("foo");
- EXPECT_TRUE(m1.Matches(const_cast<char*>("I love food.")));
- EXPECT_FALSE(m1.Matches(const_cast<char*>("tofo")));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const char*> m2 = HasSubstr("foo");
- EXPECT_TRUE(m2.Matches("I love food."));
- EXPECT_FALSE(m2.Matches("tofo"));
- EXPECT_FALSE(m2.Matches(NULL));
-}
-
-// Tests that HasSubstr(s) describes itself properly.
-TEST(HasSubstrTest, CanDescribeSelf) {
- Matcher<string> m = HasSubstr("foo\n\"");
- EXPECT_EQ("has substring \"foo\\n\\\"\"", Describe(m));
-}
-
-TEST(KeyTest, CanDescribeSelf) {
- Matcher<const pair<std::string, int>&> m = Key("foo");
- EXPECT_EQ("has a key that is equal to \"foo\"", Describe(m));
- EXPECT_EQ("doesn't have a key that is equal to \"foo\"", DescribeNegation(m));
-}
-
-TEST(KeyTest, ExplainsResult) {
- Matcher<pair<int, bool> > m = Key(GreaterThan(10));
- EXPECT_EQ("whose first field is a value which is 5 less than 10",
- Explain(m, make_pair(5, true)));
- EXPECT_EQ("whose first field is a value which is 5 more than 10",
- Explain(m, make_pair(15, true)));
-}
-
-TEST(KeyTest, MatchesCorrectly) {
- pair<int, std::string> p(25, "foo");
- EXPECT_THAT(p, Key(25));
- EXPECT_THAT(p, Not(Key(42)));
- EXPECT_THAT(p, Key(Ge(20)));
- EXPECT_THAT(p, Not(Key(Lt(25))));
-}
-
-TEST(KeyTest, SafelyCastsInnerMatcher) {
- Matcher<int> is_positive = Gt(0);
- Matcher<int> is_negative = Lt(0);
- pair<char, bool> p('a', true);
- EXPECT_THAT(p, Key(is_positive));
- EXPECT_THAT(p, Not(Key(is_negative)));
-}
-
-TEST(KeyTest, InsideContainsUsingMap) {
- map<int, char> container;
- container.insert(make_pair(1, 'a'));
- container.insert(make_pair(2, 'b'));
- container.insert(make_pair(4, 'c'));
- EXPECT_THAT(container, Contains(Key(1)));
- EXPECT_THAT(container, Not(Contains(Key(3))));
-}
-
-TEST(KeyTest, InsideContainsUsingMultimap) {
- multimap<int, char> container;
- container.insert(make_pair(1, 'a'));
- container.insert(make_pair(2, 'b'));
- container.insert(make_pair(4, 'c'));
-
- EXPECT_THAT(container, Not(Contains(Key(25))));
- container.insert(make_pair(25, 'd'));
- EXPECT_THAT(container, Contains(Key(25)));
- container.insert(make_pair(25, 'e'));
- EXPECT_THAT(container, Contains(Key(25)));
-
- EXPECT_THAT(container, Contains(Key(1)));
- EXPECT_THAT(container, Not(Contains(Key(3))));
-}
-
-TEST(PairTest, Typing) {
- // Test verifies the following type conversions can be compiled.
- Matcher<const pair<const char*, int>&> m1 = Pair("foo", 42);
- Matcher<const pair<const char*, int> > m2 = Pair("foo", 42);
- Matcher<pair<const char*, int> > m3 = Pair("foo", 42);
-
- Matcher<pair<int, const std::string> > m4 = Pair(25, "42");
- Matcher<pair<const std::string, int> > m5 = Pair("25", 42);
-}
-
-TEST(PairTest, CanDescribeSelf) {
- Matcher<const pair<std::string, int>&> m1 = Pair("foo", 42);
- EXPECT_EQ("has a first field that is equal to \"foo\""
- ", and has a second field that is equal to 42",
- Describe(m1));
- EXPECT_EQ("has a first field that isn't equal to \"foo\""
- ", or has a second field that isn't equal to 42",
- DescribeNegation(m1));
- // Double and triple negation (1 or 2 times not and description of negation).
- Matcher<const pair<int, int>&> m2 = Not(Pair(Not(13), 42));
- EXPECT_EQ("has a first field that isn't equal to 13"
- ", and has a second field that is equal to 42",
- DescribeNegation(m2));
-}
-
-TEST(PairTest, CanExplainMatchResultTo) {
- // If neither field matches, Pair() should explain about the first
- // field.
- const Matcher<pair<int, int> > m = Pair(GreaterThan(0), GreaterThan(0));
- EXPECT_EQ("whose first field does not match, which is 1 less than 0",
- Explain(m, make_pair(-1, -2)));
-
- // If the first field matches but the second doesn't, Pair() should
- // explain about the second field.
- EXPECT_EQ("whose second field does not match, which is 2 less than 0",
- Explain(m, make_pair(1, -2)));
-
- // If the first field doesn't match but the second does, Pair()
- // should explain about the first field.
- EXPECT_EQ("whose first field does not match, which is 1 less than 0",
- Explain(m, make_pair(-1, 2)));
-
- // If both fields match, Pair() should explain about them both.
- EXPECT_EQ("whose both fields match, where the first field is a value "
- "which is 1 more than 0, and the second field is a value "
- "which is 2 more than 0",
- Explain(m, make_pair(1, 2)));
-
- // If only the first match has an explanation, only this explanation should
- // be printed.
- const Matcher<pair<int, int> > explain_first = Pair(GreaterThan(0), 0);
- EXPECT_EQ("whose both fields match, where the first field is a value "
- "which is 1 more than 0",
- Explain(explain_first, make_pair(1, 0)));
-
- // If only the second match has an explanation, only this explanation should
- // be printed.
- const Matcher<pair<int, int> > explain_second = Pair(0, GreaterThan(0));
- EXPECT_EQ("whose both fields match, where the second field is a value "
- "which is 1 more than 0",
- Explain(explain_second, make_pair(0, 1)));
-}
-
-TEST(PairTest, MatchesCorrectly) {
- pair<int, std::string> p(25, "foo");
-
- // Both fields match.
- EXPECT_THAT(p, Pair(25, "foo"));
- EXPECT_THAT(p, Pair(Ge(20), HasSubstr("o")));
-
- // 'first' doesnt' match, but 'second' matches.
- EXPECT_THAT(p, Not(Pair(42, "foo")));
- EXPECT_THAT(p, Not(Pair(Lt(25), "foo")));
-
- // 'first' matches, but 'second' doesn't match.
- EXPECT_THAT(p, Not(Pair(25, "bar")));
- EXPECT_THAT(p, Not(Pair(25, Not("foo"))));
-
- // Neither field matches.
- EXPECT_THAT(p, Not(Pair(13, "bar")));
- EXPECT_THAT(p, Not(Pair(Lt(13), HasSubstr("a"))));
-}
-
-TEST(PairTest, SafelyCastsInnerMatchers) {
- Matcher<int> is_positive = Gt(0);
- Matcher<int> is_negative = Lt(0);
- pair<char, bool> p('a', true);
- EXPECT_THAT(p, Pair(is_positive, _));
- EXPECT_THAT(p, Not(Pair(is_negative, _)));
- EXPECT_THAT(p, Pair(_, is_positive));
- EXPECT_THAT(p, Not(Pair(_, is_negative)));
-}
-
-TEST(PairTest, InsideContainsUsingMap) {
- map<int, char> container;
- container.insert(make_pair(1, 'a'));
- container.insert(make_pair(2, 'b'));
- container.insert(make_pair(4, 'c'));
- EXPECT_THAT(container, Contains(Pair(1, 'a')));
- EXPECT_THAT(container, Contains(Pair(1, _)));
- EXPECT_THAT(container, Contains(Pair(_, 'a')));
- EXPECT_THAT(container, Not(Contains(Pair(3, _))));
-}
-
-// Tests StartsWith(s).
-
-TEST(StartsWithTest, MatchesStringWithGivenPrefix) {
- const Matcher<const char*> m1 = StartsWith(string(""));
- EXPECT_TRUE(m1.Matches("Hi"));
- EXPECT_TRUE(m1.Matches(""));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const string&> m2 = StartsWith("Hi");
- EXPECT_TRUE(m2.Matches("Hi"));
- EXPECT_TRUE(m2.Matches("Hi Hi!"));
- EXPECT_TRUE(m2.Matches("High"));
- EXPECT_FALSE(m2.Matches("H"));
- EXPECT_FALSE(m2.Matches(" Hi"));
-}
-
-TEST(StartsWithTest, CanDescribeSelf) {
- Matcher<const std::string> m = StartsWith("Hi");
- EXPECT_EQ("starts with \"Hi\"", Describe(m));
-}
-
-// Tests EndsWith(s).
-
-TEST(EndsWithTest, MatchesStringWithGivenSuffix) {
- const Matcher<const char*> m1 = EndsWith("");
- EXPECT_TRUE(m1.Matches("Hi"));
- EXPECT_TRUE(m1.Matches(""));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const string&> m2 = EndsWith(string("Hi"));
- EXPECT_TRUE(m2.Matches("Hi"));
- EXPECT_TRUE(m2.Matches("Wow Hi Hi"));
- EXPECT_TRUE(m2.Matches("Super Hi"));
- EXPECT_FALSE(m2.Matches("i"));
- EXPECT_FALSE(m2.Matches("Hi "));
-}
-
-TEST(EndsWithTest, CanDescribeSelf) {
- Matcher<const std::string> m = EndsWith("Hi");
- EXPECT_EQ("ends with \"Hi\"", Describe(m));
-}
-
-// Tests MatchesRegex().
-
-TEST(MatchesRegexTest, MatchesStringMatchingGivenRegex) {
- const Matcher<const char*> m1 = MatchesRegex("a.*z");
- EXPECT_TRUE(m1.Matches("az"));
- EXPECT_TRUE(m1.Matches("abcz"));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const string&> m2 = MatchesRegex(new RE("a.*z"));
- EXPECT_TRUE(m2.Matches("azbz"));
- EXPECT_FALSE(m2.Matches("az1"));
- EXPECT_FALSE(m2.Matches("1az"));
-}
-
-TEST(MatchesRegexTest, CanDescribeSelf) {
- Matcher<const std::string> m1 = MatchesRegex(string("Hi.*"));
- EXPECT_EQ("matches regular expression \"Hi.*\"", Describe(m1));
-
- Matcher<const char*> m2 = MatchesRegex(new RE("a.*"));
- EXPECT_EQ("matches regular expression \"a.*\"", Describe(m2));
-}
-
-// Tests ContainsRegex().
-
-TEST(ContainsRegexTest, MatchesStringContainingGivenRegex) {
- const Matcher<const char*> m1 = ContainsRegex(string("a.*z"));
- EXPECT_TRUE(m1.Matches("az"));
- EXPECT_TRUE(m1.Matches("0abcz1"));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const string&> m2 = ContainsRegex(new RE("a.*z"));
- EXPECT_TRUE(m2.Matches("azbz"));
- EXPECT_TRUE(m2.Matches("az1"));
- EXPECT_FALSE(m2.Matches("1a"));
-}
-
-TEST(ContainsRegexTest, CanDescribeSelf) {
- Matcher<const std::string> m1 = ContainsRegex("Hi.*");
- EXPECT_EQ("contains regular expression \"Hi.*\"", Describe(m1));
-
- Matcher<const char*> m2 = ContainsRegex(new RE("a.*"));
- EXPECT_EQ("contains regular expression \"a.*\"", Describe(m2));
-}
-
-// Tests for wide strings.
-#if GTEST_HAS_STD_WSTRING
-TEST(StdWideStrEqTest, MatchesEqual) {
- Matcher<const wchar_t*> m = StrEq(::std::wstring(L"Hello"));
- EXPECT_TRUE(m.Matches(L"Hello"));
- EXPECT_FALSE(m.Matches(L"hello"));
- EXPECT_FALSE(m.Matches(NULL));
-
- Matcher<const ::std::wstring&> m2 = StrEq(L"Hello");
- EXPECT_TRUE(m2.Matches(L"Hello"));
- EXPECT_FALSE(m2.Matches(L"Hi"));
-
- Matcher<const ::std::wstring&> m3 = StrEq(L"\xD3\x576\x8D3\xC74D");
- EXPECT_TRUE(m3.Matches(L"\xD3\x576\x8D3\xC74D"));
- EXPECT_FALSE(m3.Matches(L"\xD3\x576\x8D3\xC74E"));
-
- ::std::wstring str(L"01204500800");
- str[3] = L'\0';
- Matcher<const ::std::wstring&> m4 = StrEq(str);
- EXPECT_TRUE(m4.Matches(str));
- str[0] = str[6] = str[7] = str[9] = str[10] = L'\0';
- Matcher<const ::std::wstring&> m5 = StrEq(str);
- EXPECT_TRUE(m5.Matches(str));
-}
-
-TEST(StdWideStrEqTest, CanDescribeSelf) {
- Matcher< ::std::wstring> m = StrEq(L"Hi-\'\"?\\\a\b\f\n\r\t\v");
- EXPECT_EQ("is equal to L\"Hi-\'\\\"?\\\\\\a\\b\\f\\n\\r\\t\\v\"",
- Describe(m));
-
- Matcher< ::std::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D");
- EXPECT_EQ("is equal to L\"\\xD3\\x576\\x8D3\\xC74D\"",
- Describe(m2));
-
- ::std::wstring str(L"01204500800");
- str[3] = L'\0';
- Matcher<const ::std::wstring&> m4 = StrEq(str);
- EXPECT_EQ("is equal to L\"012\\04500800\"", Describe(m4));
- str[0] = str[6] = str[7] = str[9] = str[10] = L'\0';
- Matcher<const ::std::wstring&> m5 = StrEq(str);
- EXPECT_EQ("is equal to L\"\\012\\045\\0\\08\\0\\0\"", Describe(m5));
-}
-
-TEST(StdWideStrNeTest, MatchesUnequalString) {
- Matcher<const wchar_t*> m = StrNe(L"Hello");
- EXPECT_TRUE(m.Matches(L""));
- EXPECT_TRUE(m.Matches(NULL));
- EXPECT_FALSE(m.Matches(L"Hello"));
-
- Matcher< ::std::wstring> m2 = StrNe(::std::wstring(L"Hello"));
- EXPECT_TRUE(m2.Matches(L"hello"));
- EXPECT_FALSE(m2.Matches(L"Hello"));
-}
-
-TEST(StdWideStrNeTest, CanDescribeSelf) {
- Matcher<const wchar_t*> m = StrNe(L"Hi");
- EXPECT_EQ("isn't equal to L\"Hi\"", Describe(m));
-}
-
-TEST(StdWideStrCaseEqTest, MatchesEqualStringIgnoringCase) {
- Matcher<const wchar_t*> m = StrCaseEq(::std::wstring(L"Hello"));
- EXPECT_TRUE(m.Matches(L"Hello"));
- EXPECT_TRUE(m.Matches(L"hello"));
- EXPECT_FALSE(m.Matches(L"Hi"));
- EXPECT_FALSE(m.Matches(NULL));
-
- Matcher<const ::std::wstring&> m2 = StrCaseEq(L"Hello");
- EXPECT_TRUE(m2.Matches(L"hello"));
- EXPECT_FALSE(m2.Matches(L"Hi"));
-}
-
-TEST(StdWideStrCaseEqTest, MatchesEqualStringWith0IgnoringCase) {
- ::std::wstring str1(L"oabocdooeoo");
- ::std::wstring str2(L"OABOCDOOEOO");
- Matcher<const ::std::wstring&> m0 = StrCaseEq(str1);
- EXPECT_FALSE(m0.Matches(str2 + ::std::wstring(1, L'\0')));
-
- str1[3] = str2[3] = L'\0';
- Matcher<const ::std::wstring&> m1 = StrCaseEq(str1);
- EXPECT_TRUE(m1.Matches(str2));
-
- str1[0] = str1[6] = str1[7] = str1[10] = L'\0';
- str2[0] = str2[6] = str2[7] = str2[10] = L'\0';
- Matcher<const ::std::wstring&> m2 = StrCaseEq(str1);
- str1[9] = str2[9] = L'\0';
- EXPECT_FALSE(m2.Matches(str2));
-
- Matcher<const ::std::wstring&> m3 = StrCaseEq(str1);
- EXPECT_TRUE(m3.Matches(str2));
-
- EXPECT_FALSE(m3.Matches(str2 + L"x"));
- str2.append(1, L'\0');
- EXPECT_FALSE(m3.Matches(str2));
- EXPECT_FALSE(m3.Matches(::std::wstring(str2, 0, 9)));
-}
-
-TEST(StdWideStrCaseEqTest, CanDescribeSelf) {
- Matcher< ::std::wstring> m = StrCaseEq(L"Hi");
- EXPECT_EQ("is equal to (ignoring case) L\"Hi\"", Describe(m));
-}
-
-TEST(StdWideStrCaseNeTest, MatchesUnequalStringIgnoringCase) {
- Matcher<const wchar_t*> m = StrCaseNe(L"Hello");
- EXPECT_TRUE(m.Matches(L"Hi"));
- EXPECT_TRUE(m.Matches(NULL));
- EXPECT_FALSE(m.Matches(L"Hello"));
- EXPECT_FALSE(m.Matches(L"hello"));
-
- Matcher< ::std::wstring> m2 = StrCaseNe(::std::wstring(L"Hello"));
- EXPECT_TRUE(m2.Matches(L""));
- EXPECT_FALSE(m2.Matches(L"Hello"));
-}
-
-TEST(StdWideStrCaseNeTest, CanDescribeSelf) {
- Matcher<const wchar_t*> m = StrCaseNe(L"Hi");
- EXPECT_EQ("isn't equal to (ignoring case) L\"Hi\"", Describe(m));
-}
-
-// Tests that HasSubstr() works for matching wstring-typed values.
-TEST(StdWideHasSubstrTest, WorksForStringClasses) {
- const Matcher< ::std::wstring> m1 = HasSubstr(L"foo");
- EXPECT_TRUE(m1.Matches(::std::wstring(L"I love food.")));
- EXPECT_FALSE(m1.Matches(::std::wstring(L"tofo")));
-
- const Matcher<const ::std::wstring&> m2 = HasSubstr(L"foo");
- EXPECT_TRUE(m2.Matches(::std::wstring(L"I love food.")));
- EXPECT_FALSE(m2.Matches(::std::wstring(L"tofo")));
-}
-
-// Tests that HasSubstr() works for matching C-wide-string-typed values.
-TEST(StdWideHasSubstrTest, WorksForCStrings) {
- const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
- EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
- EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const wchar_t*> m2 = HasSubstr(L"foo");
- EXPECT_TRUE(m2.Matches(L"I love food."));
- EXPECT_FALSE(m2.Matches(L"tofo"));
- EXPECT_FALSE(m2.Matches(NULL));
-}
-
-// Tests that HasSubstr(s) describes itself properly.
-TEST(StdWideHasSubstrTest, CanDescribeSelf) {
- Matcher< ::std::wstring> m = HasSubstr(L"foo\n\"");
- EXPECT_EQ("has substring L\"foo\\n\\\"\"", Describe(m));
-}
-
-// Tests StartsWith(s).
-
-TEST(StdWideStartsWithTest, MatchesStringWithGivenPrefix) {
- const Matcher<const wchar_t*> m1 = StartsWith(::std::wstring(L""));
- EXPECT_TRUE(m1.Matches(L"Hi"));
- EXPECT_TRUE(m1.Matches(L""));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const ::std::wstring&> m2 = StartsWith(L"Hi");
- EXPECT_TRUE(m2.Matches(L"Hi"));
- EXPECT_TRUE(m2.Matches(L"Hi Hi!"));
- EXPECT_TRUE(m2.Matches(L"High"));
- EXPECT_FALSE(m2.Matches(L"H"));
- EXPECT_FALSE(m2.Matches(L" Hi"));
-}
-
-TEST(StdWideStartsWithTest, CanDescribeSelf) {
- Matcher<const ::std::wstring> m = StartsWith(L"Hi");
- EXPECT_EQ("starts with L\"Hi\"", Describe(m));
-}
-
-// Tests EndsWith(s).
-
-TEST(StdWideEndsWithTest, MatchesStringWithGivenSuffix) {
- const Matcher<const wchar_t*> m1 = EndsWith(L"");
- EXPECT_TRUE(m1.Matches(L"Hi"));
- EXPECT_TRUE(m1.Matches(L""));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const ::std::wstring&> m2 = EndsWith(::std::wstring(L"Hi"));
- EXPECT_TRUE(m2.Matches(L"Hi"));
- EXPECT_TRUE(m2.Matches(L"Wow Hi Hi"));
- EXPECT_TRUE(m2.Matches(L"Super Hi"));
- EXPECT_FALSE(m2.Matches(L"i"));
- EXPECT_FALSE(m2.Matches(L"Hi "));
-}
-
-TEST(StdWideEndsWithTest, CanDescribeSelf) {
- Matcher<const ::std::wstring> m = EndsWith(L"Hi");
- EXPECT_EQ("ends with L\"Hi\"", Describe(m));
-}
-
-#endif // GTEST_HAS_STD_WSTRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-TEST(GlobalWideStrEqTest, MatchesEqual) {
- Matcher<const wchar_t*> m = StrEq(::wstring(L"Hello"));
- EXPECT_TRUE(m.Matches(L"Hello"));
- EXPECT_FALSE(m.Matches(L"hello"));
- EXPECT_FALSE(m.Matches(NULL));
-
- Matcher<const ::wstring&> m2 = StrEq(L"Hello");
- EXPECT_TRUE(m2.Matches(L"Hello"));
- EXPECT_FALSE(m2.Matches(L"Hi"));
-
- Matcher<const ::wstring&> m3 = StrEq(L"\xD3\x576\x8D3\xC74D");
- EXPECT_TRUE(m3.Matches(L"\xD3\x576\x8D3\xC74D"));
- EXPECT_FALSE(m3.Matches(L"\xD3\x576\x8D3\xC74E"));
-
- ::wstring str(L"01204500800");
- str[3] = L'\0';
- Matcher<const ::wstring&> m4 = StrEq(str);
- EXPECT_TRUE(m4.Matches(str));
- str[0] = str[6] = str[7] = str[9] = str[10] = L'\0';
- Matcher<const ::wstring&> m5 = StrEq(str);
- EXPECT_TRUE(m5.Matches(str));
-}
-
-TEST(GlobalWideStrEqTest, CanDescribeSelf) {
- Matcher< ::wstring> m = StrEq(L"Hi-\'\"?\\\a\b\f\n\r\t\v");
- EXPECT_EQ("is equal to L\"Hi-\'\\\"?\\\\\\a\\b\\f\\n\\r\\t\\v\"",
- Describe(m));
-
- Matcher< ::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D");
- EXPECT_EQ("is equal to L\"\\xD3\\x576\\x8D3\\xC74D\"",
- Describe(m2));
-
- ::wstring str(L"01204500800");
- str[3] = L'\0';
- Matcher<const ::wstring&> m4 = StrEq(str);
- EXPECT_EQ("is equal to L\"012\\04500800\"", Describe(m4));
- str[0] = str[6] = str[7] = str[9] = str[10] = L'\0';
- Matcher<const ::wstring&> m5 = StrEq(str);
- EXPECT_EQ("is equal to L\"\\012\\045\\0\\08\\0\\0\"", Describe(m5));
-}
-
-TEST(GlobalWideStrNeTest, MatchesUnequalString) {
- Matcher<const wchar_t*> m = StrNe(L"Hello");
- EXPECT_TRUE(m.Matches(L""));
- EXPECT_TRUE(m.Matches(NULL));
- EXPECT_FALSE(m.Matches(L"Hello"));
-
- Matcher< ::wstring> m2 = StrNe(::wstring(L"Hello"));
- EXPECT_TRUE(m2.Matches(L"hello"));
- EXPECT_FALSE(m2.Matches(L"Hello"));
-}
-
-TEST(GlobalWideStrNeTest, CanDescribeSelf) {
- Matcher<const wchar_t*> m = StrNe(L"Hi");
- EXPECT_EQ("isn't equal to L\"Hi\"", Describe(m));
-}
-
-TEST(GlobalWideStrCaseEqTest, MatchesEqualStringIgnoringCase) {
- Matcher<const wchar_t*> m = StrCaseEq(::wstring(L"Hello"));
- EXPECT_TRUE(m.Matches(L"Hello"));
- EXPECT_TRUE(m.Matches(L"hello"));
- EXPECT_FALSE(m.Matches(L"Hi"));
- EXPECT_FALSE(m.Matches(NULL));
-
- Matcher<const ::wstring&> m2 = StrCaseEq(L"Hello");
- EXPECT_TRUE(m2.Matches(L"hello"));
- EXPECT_FALSE(m2.Matches(L"Hi"));
-}
-
-TEST(GlobalWideStrCaseEqTest, MatchesEqualStringWith0IgnoringCase) {
- ::wstring str1(L"oabocdooeoo");
- ::wstring str2(L"OABOCDOOEOO");
- Matcher<const ::wstring&> m0 = StrCaseEq(str1);
- EXPECT_FALSE(m0.Matches(str2 + ::wstring(1, L'\0')));
-
- str1[3] = str2[3] = L'\0';
- Matcher<const ::wstring&> m1 = StrCaseEq(str1);
- EXPECT_TRUE(m1.Matches(str2));
-
- str1[0] = str1[6] = str1[7] = str1[10] = L'\0';
- str2[0] = str2[6] = str2[7] = str2[10] = L'\0';
- Matcher<const ::wstring&> m2 = StrCaseEq(str1);
- str1[9] = str2[9] = L'\0';
- EXPECT_FALSE(m2.Matches(str2));
-
- Matcher<const ::wstring&> m3 = StrCaseEq(str1);
- EXPECT_TRUE(m3.Matches(str2));
-
- EXPECT_FALSE(m3.Matches(str2 + L"x"));
- str2.append(1, L'\0');
- EXPECT_FALSE(m3.Matches(str2));
- EXPECT_FALSE(m3.Matches(::wstring(str2, 0, 9)));
-}
-
-TEST(GlobalWideStrCaseEqTest, CanDescribeSelf) {
- Matcher< ::wstring> m = StrCaseEq(L"Hi");
- EXPECT_EQ("is equal to (ignoring case) L\"Hi\"", Describe(m));
-}
-
-TEST(GlobalWideStrCaseNeTest, MatchesUnequalStringIgnoringCase) {
- Matcher<const wchar_t*> m = StrCaseNe(L"Hello");
- EXPECT_TRUE(m.Matches(L"Hi"));
- EXPECT_TRUE(m.Matches(NULL));
- EXPECT_FALSE(m.Matches(L"Hello"));
- EXPECT_FALSE(m.Matches(L"hello"));
-
- Matcher< ::wstring> m2 = StrCaseNe(::wstring(L"Hello"));
- EXPECT_TRUE(m2.Matches(L""));
- EXPECT_FALSE(m2.Matches(L"Hello"));
-}
-
-TEST(GlobalWideStrCaseNeTest, CanDescribeSelf) {
- Matcher<const wchar_t*> m = StrCaseNe(L"Hi");
- EXPECT_EQ("isn't equal to (ignoring case) L\"Hi\"", Describe(m));
-}
-
-// Tests that HasSubstr() works for matching wstring-typed values.
-TEST(GlobalWideHasSubstrTest, WorksForStringClasses) {
- const Matcher< ::wstring> m1 = HasSubstr(L"foo");
- EXPECT_TRUE(m1.Matches(::wstring(L"I love food.")));
- EXPECT_FALSE(m1.Matches(::wstring(L"tofo")));
-
- const Matcher<const ::wstring&> m2 = HasSubstr(L"foo");
- EXPECT_TRUE(m2.Matches(::wstring(L"I love food.")));
- EXPECT_FALSE(m2.Matches(::wstring(L"tofo")));
-}
-
-// Tests that HasSubstr() works for matching C-wide-string-typed values.
-TEST(GlobalWideHasSubstrTest, WorksForCStrings) {
- const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
- EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
- EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const wchar_t*> m2 = HasSubstr(L"foo");
- EXPECT_TRUE(m2.Matches(L"I love food."));
- EXPECT_FALSE(m2.Matches(L"tofo"));
- EXPECT_FALSE(m2.Matches(NULL));
-}
-
-// Tests that HasSubstr(s) describes itself properly.
-TEST(GlobalWideHasSubstrTest, CanDescribeSelf) {
- Matcher< ::wstring> m = HasSubstr(L"foo\n\"");
- EXPECT_EQ("has substring L\"foo\\n\\\"\"", Describe(m));
-}
-
-// Tests StartsWith(s).
-
-TEST(GlobalWideStartsWithTest, MatchesStringWithGivenPrefix) {
- const Matcher<const wchar_t*> m1 = StartsWith(::wstring(L""));
- EXPECT_TRUE(m1.Matches(L"Hi"));
- EXPECT_TRUE(m1.Matches(L""));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const ::wstring&> m2 = StartsWith(L"Hi");
- EXPECT_TRUE(m2.Matches(L"Hi"));
- EXPECT_TRUE(m2.Matches(L"Hi Hi!"));
- EXPECT_TRUE(m2.Matches(L"High"));
- EXPECT_FALSE(m2.Matches(L"H"));
- EXPECT_FALSE(m2.Matches(L" Hi"));
-}
-
-TEST(GlobalWideStartsWithTest, CanDescribeSelf) {
- Matcher<const ::wstring> m = StartsWith(L"Hi");
- EXPECT_EQ("starts with L\"Hi\"", Describe(m));
-}
-
-// Tests EndsWith(s).
-
-TEST(GlobalWideEndsWithTest, MatchesStringWithGivenSuffix) {
- const Matcher<const wchar_t*> m1 = EndsWith(L"");
- EXPECT_TRUE(m1.Matches(L"Hi"));
- EXPECT_TRUE(m1.Matches(L""));
- EXPECT_FALSE(m1.Matches(NULL));
-
- const Matcher<const ::wstring&> m2 = EndsWith(::wstring(L"Hi"));
- EXPECT_TRUE(m2.Matches(L"Hi"));
- EXPECT_TRUE(m2.Matches(L"Wow Hi Hi"));
- EXPECT_TRUE(m2.Matches(L"Super Hi"));
- EXPECT_FALSE(m2.Matches(L"i"));
- EXPECT_FALSE(m2.Matches(L"Hi "));
-}
-
-TEST(GlobalWideEndsWithTest, CanDescribeSelf) {
- Matcher<const ::wstring> m = EndsWith(L"Hi");
- EXPECT_EQ("ends with L\"Hi\"", Describe(m));
-}
-
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
-
-typedef ::std::tr1::tuple<long, int> Tuple2; // NOLINT
-
-// Tests that Eq() matches a 2-tuple where the first field == the
-// second field.
-TEST(Eq2Test, MatchesEqualArguments) {
- Matcher<const Tuple2&> m = Eq();
- EXPECT_TRUE(m.Matches(Tuple2(5L, 5)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 6)));
-}
-
-// Tests that Eq() describes itself properly.
-TEST(Eq2Test, CanDescribeSelf) {
- Matcher<const Tuple2&> m = Eq();
- EXPECT_EQ("are an equal pair", Describe(m));
-}
-
-// Tests that Ge() matches a 2-tuple where the first field >= the
-// second field.
-TEST(Ge2Test, MatchesGreaterThanOrEqualArguments) {
- Matcher<const Tuple2&> m = Ge();
- EXPECT_TRUE(m.Matches(Tuple2(5L, 4)));
- EXPECT_TRUE(m.Matches(Tuple2(5L, 5)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 6)));
-}
-
-// Tests that Ge() describes itself properly.
-TEST(Ge2Test, CanDescribeSelf) {
- Matcher<const Tuple2&> m = Ge();
- EXPECT_EQ("are a pair where the first >= the second", Describe(m));
-}
-
-// Tests that Gt() matches a 2-tuple where the first field > the
-// second field.
-TEST(Gt2Test, MatchesGreaterThanArguments) {
- Matcher<const Tuple2&> m = Gt();
- EXPECT_TRUE(m.Matches(Tuple2(5L, 4)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 5)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 6)));
-}
-
-// Tests that Gt() describes itself properly.
-TEST(Gt2Test, CanDescribeSelf) {
- Matcher<const Tuple2&> m = Gt();
- EXPECT_EQ("are a pair where the first > the second", Describe(m));
-}
-
-// Tests that Le() matches a 2-tuple where the first field <= the
-// second field.
-TEST(Le2Test, MatchesLessThanOrEqualArguments) {
- Matcher<const Tuple2&> m = Le();
- EXPECT_TRUE(m.Matches(Tuple2(5L, 6)));
- EXPECT_TRUE(m.Matches(Tuple2(5L, 5)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 4)));
-}
-
-// Tests that Le() describes itself properly.
-TEST(Le2Test, CanDescribeSelf) {
- Matcher<const Tuple2&> m = Le();
- EXPECT_EQ("are a pair where the first <= the second", Describe(m));
-}
-
-// Tests that Lt() matches a 2-tuple where the first field < the
-// second field.
-TEST(Lt2Test, MatchesLessThanArguments) {
- Matcher<const Tuple2&> m = Lt();
- EXPECT_TRUE(m.Matches(Tuple2(5L, 6)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 5)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 4)));
-}
-
-// Tests that Lt() describes itself properly.
-TEST(Lt2Test, CanDescribeSelf) {
- Matcher<const Tuple2&> m = Lt();
- EXPECT_EQ("are a pair where the first < the second", Describe(m));
-}
-
-// Tests that Ne() matches a 2-tuple where the first field != the
-// second field.
-TEST(Ne2Test, MatchesUnequalArguments) {
- Matcher<const Tuple2&> m = Ne();
- EXPECT_TRUE(m.Matches(Tuple2(5L, 6)));
- EXPECT_TRUE(m.Matches(Tuple2(5L, 4)));
- EXPECT_FALSE(m.Matches(Tuple2(5L, 5)));
-}
-
-// Tests that Ne() describes itself properly.
-TEST(Ne2Test, CanDescribeSelf) {
- Matcher<const Tuple2&> m = Ne();
- EXPECT_EQ("are an unequal pair", Describe(m));
-}
-
-// Tests that Not(m) matches any value that doesn't match m.
-TEST(NotTest, NegatesMatcher) {
- Matcher<int> m;
- m = Not(Eq(2));
- EXPECT_TRUE(m.Matches(3));
- EXPECT_FALSE(m.Matches(2));
-}
-
-// Tests that Not(m) describes itself properly.
-TEST(NotTest, CanDescribeSelf) {
- Matcher<int> m = Not(Eq(5));
- EXPECT_EQ("isn't equal to 5", Describe(m));
-}
-
-// Tests that monomorphic matchers are safely cast by the Not matcher.
-TEST(NotTest, NotMatcherSafelyCastsMonomorphicMatchers) {
- // greater_than_5 is a monomorphic matcher.
- Matcher<int> greater_than_5 = Gt(5);
-
- Matcher<const int&> m = Not(greater_than_5);
- Matcher<int&> m2 = Not(greater_than_5);
- Matcher<int&> m3 = Not(m);
-}
-
-// Helper to allow easy testing of AllOf matchers with num parameters.
-void AllOfMatches(int num, const Matcher<int>& m) {
- SCOPED_TRACE(Describe(m));
- EXPECT_TRUE(m.Matches(0));
- for (int i = 1; i <= num; ++i) {
- EXPECT_FALSE(m.Matches(i));
- }
- EXPECT_TRUE(m.Matches(num + 1));
-}
-
-// Tests that AllOf(m1, ..., mn) matches any value that matches all of
-// the given matchers.
-TEST(AllOfTest, MatchesWhenAllMatch) {
- Matcher<int> m;
- m = AllOf(Le(2), Ge(1));
- EXPECT_TRUE(m.Matches(1));
- EXPECT_TRUE(m.Matches(2));
- EXPECT_FALSE(m.Matches(0));
- EXPECT_FALSE(m.Matches(3));
-
- m = AllOf(Gt(0), Ne(1), Ne(2));
- EXPECT_TRUE(m.Matches(3));
- EXPECT_FALSE(m.Matches(2));
- EXPECT_FALSE(m.Matches(1));
- EXPECT_FALSE(m.Matches(0));
-
- m = AllOf(Gt(0), Ne(1), Ne(2), Ne(3));
- EXPECT_TRUE(m.Matches(4));
- EXPECT_FALSE(m.Matches(3));
- EXPECT_FALSE(m.Matches(2));
- EXPECT_FALSE(m.Matches(1));
- EXPECT_FALSE(m.Matches(0));
-
- m = AllOf(Ge(0), Lt(10), Ne(3), Ne(5), Ne(7));
- EXPECT_TRUE(m.Matches(0));
- EXPECT_TRUE(m.Matches(1));
- EXPECT_FALSE(m.Matches(3));
-
- // The following tests for varying number of sub-matchers. Due to the way
- // the sub-matchers are handled it is enough to test every sub-matcher once
- // with sub-matchers using the same matcher type. Varying matcher types are
- // checked for above.
- AllOfMatches(2, AllOf(Ne(1), Ne(2)));
- AllOfMatches(3, AllOf(Ne(1), Ne(2), Ne(3)));
- AllOfMatches(4, AllOf(Ne(1), Ne(2), Ne(3), Ne(4)));
- AllOfMatches(5, AllOf(Ne(1), Ne(2), Ne(3), Ne(4), Ne(5)));
- AllOfMatches(6, AllOf(Ne(1), Ne(2), Ne(3), Ne(4), Ne(5), Ne(6)));
- AllOfMatches(7, AllOf(Ne(1), Ne(2), Ne(3), Ne(4), Ne(5), Ne(6), Ne(7)));
- AllOfMatches(8, AllOf(Ne(1), Ne(2), Ne(3), Ne(4), Ne(5), Ne(6), Ne(7),
- Ne(8)));
- AllOfMatches(9, AllOf(Ne(1), Ne(2), Ne(3), Ne(4), Ne(5), Ne(6), Ne(7),
- Ne(8), Ne(9)));
- AllOfMatches(10, AllOf(Ne(1), Ne(2), Ne(3), Ne(4), Ne(5), Ne(6), Ne(7), Ne(8),
- Ne(9), Ne(10)));
-}
-
-// Tests that AllOf(m1, ..., mn) describes itself properly.
-TEST(AllOfTest, CanDescribeSelf) {
- Matcher<int> m;
- m = AllOf(Le(2), Ge(1));
- EXPECT_EQ("(is <= 2) and (is >= 1)", Describe(m));
-
- m = AllOf(Gt(0), Ne(1), Ne(2));
- EXPECT_EQ("(is > 0) and "
- "((isn't equal to 1) and "
- "(isn't equal to 2))",
- Describe(m));
-
-
- m = AllOf(Gt(0), Ne(1), Ne(2), Ne(3));
- EXPECT_EQ("(is > 0) and "
- "((isn't equal to 1) and "
- "((isn't equal to 2) and "
- "(isn't equal to 3)))",
- Describe(m));
-
-
- m = AllOf(Ge(0), Lt(10), Ne(3), Ne(5), Ne(7));
- EXPECT_EQ("(is >= 0) and "
- "((is < 10) and "
- "((isn't equal to 3) and "
- "((isn't equal to 5) and "
- "(isn't equal to 7))))",
- Describe(m));
-}
-
-// Tests that AllOf(m1, ..., mn) describes its negation properly.
-TEST(AllOfTest, CanDescribeNegation) {
- Matcher<int> m;
- m = AllOf(Le(2), Ge(1));
- EXPECT_EQ("(isn't <= 2) or "
- "(isn't >= 1)",
- DescribeNegation(m));
-
- m = AllOf(Gt(0), Ne(1), Ne(2));
- EXPECT_EQ("(isn't > 0) or "
- "((is equal to 1) or "
- "(is equal to 2))",
- DescribeNegation(m));
-
-
- m = AllOf(Gt(0), Ne(1), Ne(2), Ne(3));
- EXPECT_EQ("(isn't > 0) or "
- "((is equal to 1) or "
- "((is equal to 2) or "
- "(is equal to 3)))",
- DescribeNegation(m));
-
-
- m = AllOf(Ge(0), Lt(10), Ne(3), Ne(5), Ne(7));
- EXPECT_EQ("(isn't >= 0) or "
- "((isn't < 10) or "
- "((is equal to 3) or "
- "((is equal to 5) or "
- "(is equal to 7))))",
- DescribeNegation(m));
-}
-
-// Tests that monomorphic matchers are safely cast by the AllOf matcher.
-TEST(AllOfTest, AllOfMatcherSafelyCastsMonomorphicMatchers) {
- // greater_than_5 and less_than_10 are monomorphic matchers.
- Matcher<int> greater_than_5 = Gt(5);
- Matcher<int> less_than_10 = Lt(10);
-
- Matcher<const int&> m = AllOf(greater_than_5, less_than_10);
- Matcher<int&> m2 = AllOf(greater_than_5, less_than_10);
- Matcher<int&> m3 = AllOf(greater_than_5, m2);
-
- // Tests that BothOf works when composing itself.
- Matcher<const int&> m4 = AllOf(greater_than_5, less_than_10, less_than_10);
- Matcher<int&> m5 = AllOf(greater_than_5, less_than_10, less_than_10);
-}
-
-TEST(AllOfTest, ExplainsResult) {
- Matcher<int> m;
-
- // Successful match. Both matchers need to explain. The second
- // matcher doesn't give an explanation, so only the first matcher's
- // explanation is printed.
- m = AllOf(GreaterThan(10), Lt(30));
- EXPECT_EQ("which is 15 more than 10", Explain(m, 25));
-
- // Successful match. Both matchers need to explain.
- m = AllOf(GreaterThan(10), GreaterThan(20));
- EXPECT_EQ("which is 20 more than 10, and which is 10 more than 20",
- Explain(m, 30));
-
- // Successful match. All matchers need to explain. The second
- // matcher doesn't given an explanation.
- m = AllOf(GreaterThan(10), Lt(30), GreaterThan(20));
- EXPECT_EQ("which is 15 more than 10, and which is 5 more than 20",
- Explain(m, 25));
-
- // Successful match. All matchers need to explain.
- m = AllOf(GreaterThan(10), GreaterThan(20), GreaterThan(30));
- EXPECT_EQ("which is 30 more than 10, and which is 20 more than 20, "
- "and which is 10 more than 30",
- Explain(m, 40));
-
- // Failed match. The first matcher, which failed, needs to
- // explain.
- m = AllOf(GreaterThan(10), GreaterThan(20));
- EXPECT_EQ("which is 5 less than 10", Explain(m, 5));
-
- // Failed match. The second matcher, which failed, needs to
- // explain. Since it doesn't given an explanation, nothing is
- // printed.
- m = AllOf(GreaterThan(10), Lt(30));
- EXPECT_EQ("", Explain(m, 40));
-
- // Failed match. The second matcher, which failed, needs to
- // explain.
- m = AllOf(GreaterThan(10), GreaterThan(20));
- EXPECT_EQ("which is 5 less than 20", Explain(m, 15));
-}
-
-// Helper to allow easy testing of AnyOf matchers with num parameters.
-void AnyOfMatches(int num, const Matcher<int>& m) {
- SCOPED_TRACE(Describe(m));
- EXPECT_FALSE(m.Matches(0));
- for (int i = 1; i <= num; ++i) {
- EXPECT_TRUE(m.Matches(i));
- }
- EXPECT_FALSE(m.Matches(num + 1));
-}
-
-// Tests that AnyOf(m1, ..., mn) matches any value that matches at
-// least one of the given matchers.
-TEST(AnyOfTest, MatchesWhenAnyMatches) {
- Matcher<int> m;
- m = AnyOf(Le(1), Ge(3));
- EXPECT_TRUE(m.Matches(1));
- EXPECT_TRUE(m.Matches(4));
- EXPECT_FALSE(m.Matches(2));
-
- m = AnyOf(Lt(0), Eq(1), Eq(2));
- EXPECT_TRUE(m.Matches(-1));
- EXPECT_TRUE(m.Matches(1));
- EXPECT_TRUE(m.Matches(2));
- EXPECT_FALSE(m.Matches(0));
-
- m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
- EXPECT_TRUE(m.Matches(-1));
- EXPECT_TRUE(m.Matches(1));
- EXPECT_TRUE(m.Matches(2));
- EXPECT_TRUE(m.Matches(3));
- EXPECT_FALSE(m.Matches(0));
-
- m = AnyOf(Le(0), Gt(10), 3, 5, 7);
- EXPECT_TRUE(m.Matches(0));
- EXPECT_TRUE(m.Matches(11));
- EXPECT_TRUE(m.Matches(3));
- EXPECT_FALSE(m.Matches(2));
-
- // The following tests for varying number of sub-matchers. Due to the way
- // the sub-matchers are handled it is enough to test every sub-matcher once
- // with sub-matchers using the same matcher type. Varying matcher types are
- // checked for above.
- AnyOfMatches(2, AnyOf(1, 2));
- AnyOfMatches(3, AnyOf(1, 2, 3));
- AnyOfMatches(4, AnyOf(1, 2, 3, 4));
- AnyOfMatches(5, AnyOf(1, 2, 3, 4, 5));
- AnyOfMatches(6, AnyOf(1, 2, 3, 4, 5, 6));
- AnyOfMatches(7, AnyOf(1, 2, 3, 4, 5, 6, 7));
- AnyOfMatches(8, AnyOf(1, 2, 3, 4, 5, 6, 7, 8));
- AnyOfMatches(9, AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9));
- AnyOfMatches(10, AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
-}
-
-// Tests that AnyOf(m1, ..., mn) describes itself properly.
-TEST(AnyOfTest, CanDescribeSelf) {
- Matcher<int> m;
- m = AnyOf(Le(1), Ge(3));
- EXPECT_EQ("(is <= 1) or (is >= 3)",
- Describe(m));
-
- m = AnyOf(Lt(0), Eq(1), Eq(2));
- EXPECT_EQ("(is < 0) or "
- "((is equal to 1) or (is equal to 2))",
- Describe(m));
-
- m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
- EXPECT_EQ("(is < 0) or "
- "((is equal to 1) or "
- "((is equal to 2) or "
- "(is equal to 3)))",
- Describe(m));
-
- m = AnyOf(Le(0), Gt(10), 3, 5, 7);
- EXPECT_EQ("(is <= 0) or "
- "((is > 10) or "
- "((is equal to 3) or "
- "((is equal to 5) or "
- "(is equal to 7))))",
- Describe(m));
-}
-
-// Tests that AnyOf(m1, ..., mn) describes its negation properly.
-TEST(AnyOfTest, CanDescribeNegation) {
- Matcher<int> m;
- m = AnyOf(Le(1), Ge(3));
- EXPECT_EQ("(isn't <= 1) and (isn't >= 3)",
- DescribeNegation(m));
-
- m = AnyOf(Lt(0), Eq(1), Eq(2));
- EXPECT_EQ("(isn't < 0) and "
- "((isn't equal to 1) and (isn't equal to 2))",
- DescribeNegation(m));
-
- m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
- EXPECT_EQ("(isn't < 0) and "
- "((isn't equal to 1) and "
- "((isn't equal to 2) and "
- "(isn't equal to 3)))",
- DescribeNegation(m));
-
- m = AnyOf(Le(0), Gt(10), 3, 5, 7);
- EXPECT_EQ("(isn't <= 0) and "
- "((isn't > 10) and "
- "((isn't equal to 3) and "
- "((isn't equal to 5) and "
- "(isn't equal to 7))))",
- DescribeNegation(m));
-}
-
-// Tests that monomorphic matchers are safely cast by the AnyOf matcher.
-TEST(AnyOfTest, AnyOfMatcherSafelyCastsMonomorphicMatchers) {
- // greater_than_5 and less_than_10 are monomorphic matchers.
- Matcher<int> greater_than_5 = Gt(5);
- Matcher<int> less_than_10 = Lt(10);
-
- Matcher<const int&> m = AnyOf(greater_than_5, less_than_10);
- Matcher<int&> m2 = AnyOf(greater_than_5, less_than_10);
- Matcher<int&> m3 = AnyOf(greater_than_5, m2);
-
- // Tests that EitherOf works when composing itself.
- Matcher<const int&> m4 = AnyOf(greater_than_5, less_than_10, less_than_10);
- Matcher<int&> m5 = AnyOf(greater_than_5, less_than_10, less_than_10);
-}
-
-TEST(AnyOfTest, ExplainsResult) {
- Matcher<int> m;
-
- // Failed match. Both matchers need to explain. The second
- // matcher doesn't give an explanation, so only the first matcher's
- // explanation is printed.
- m = AnyOf(GreaterThan(10), Lt(0));
- EXPECT_EQ("which is 5 less than 10", Explain(m, 5));
-
- // Failed match. Both matchers need to explain.
- m = AnyOf(GreaterThan(10), GreaterThan(20));
- EXPECT_EQ("which is 5 less than 10, and which is 15 less than 20",
- Explain(m, 5));
-
- // Failed match. All matchers need to explain. The second
- // matcher doesn't given an explanation.
- m = AnyOf(GreaterThan(10), Gt(20), GreaterThan(30));
- EXPECT_EQ("which is 5 less than 10, and which is 25 less than 30",
- Explain(m, 5));
-
- // Failed match. All matchers need to explain.
- m = AnyOf(GreaterThan(10), GreaterThan(20), GreaterThan(30));
- EXPECT_EQ("which is 5 less than 10, and which is 15 less than 20, "
- "and which is 25 less than 30",
- Explain(m, 5));
-
- // Successful match. The first matcher, which succeeded, needs to
- // explain.
- m = AnyOf(GreaterThan(10), GreaterThan(20));
- EXPECT_EQ("which is 5 more than 10", Explain(m, 15));
-
- // Successful match. The second matcher, which succeeded, needs to
- // explain. Since it doesn't given an explanation, nothing is
- // printed.
- m = AnyOf(GreaterThan(10), Lt(30));
- EXPECT_EQ("", Explain(m, 0));
-
- // Successful match. The second matcher, which succeeded, needs to
- // explain.
- m = AnyOf(GreaterThan(30), GreaterThan(20));
- EXPECT_EQ("which is 5 more than 20", Explain(m, 25));
-}
-
-// The following predicate function and predicate functor are for
-// testing the Truly(predicate) matcher.
-
-// Returns non-zero if the input is positive. Note that the return
-// type of this function is not bool. It's OK as Truly() accepts any
-// unary function or functor whose return type can be implicitly
-// converted to bool.
-int IsPositive(double x) {
- return x > 0 ? 1 : 0;
-}
-
-// This functor returns true if the input is greater than the given
-// number.
-class IsGreaterThan {
- public:
- explicit IsGreaterThan(int threshold) : threshold_(threshold) {}
-
- bool operator()(int n) const { return n > threshold_; }
-
- private:
- int threshold_;
-};
-
-// For testing Truly().
-const int foo = 0;
-
-// This predicate returns true iff the argument references foo and has
-// a zero value.
-bool ReferencesFooAndIsZero(const int& n) {
- return (&n == &foo) && (n == 0);
-}
-
-// Tests that Truly(predicate) matches what satisfies the given
-// predicate.
-TEST(TrulyTest, MatchesWhatSatisfiesThePredicate) {
- Matcher<double> m = Truly(IsPositive);
- EXPECT_TRUE(m.Matches(2.0));
- EXPECT_FALSE(m.Matches(-1.5));
-}
-
-// Tests that Truly(predicate_functor) works too.
-TEST(TrulyTest, CanBeUsedWithFunctor) {
- Matcher<int> m = Truly(IsGreaterThan(5));
- EXPECT_TRUE(m.Matches(6));
- EXPECT_FALSE(m.Matches(4));
-}
-
-// A class that can be implicitly converted to bool.
-class ConvertibleToBool {
- public:
- explicit ConvertibleToBool(int number) : number_(number) {}
- operator bool() const { return number_ != 0; }
-
- private:
- int number_;
-};
-
-ConvertibleToBool IsNotZero(int number) {
- return ConvertibleToBool(number);
-}
-
-// Tests that the predicate used in Truly() may return a class that's
-// implicitly convertible to bool, even when the class has no
-// operator!().
-TEST(TrulyTest, PredicateCanReturnAClassConvertibleToBool) {
- Matcher<int> m = Truly(IsNotZero);
- EXPECT_TRUE(m.Matches(1));
- EXPECT_FALSE(m.Matches(0));
-}
-
-// Tests that Truly(predicate) can describe itself properly.
-TEST(TrulyTest, CanDescribeSelf) {
- Matcher<double> m = Truly(IsPositive);
- EXPECT_EQ("satisfies the given predicate",
- Describe(m));
-}
-
-// Tests that Truly(predicate) works when the matcher takes its
-// argument by reference.
-TEST(TrulyTest, WorksForByRefArguments) {
- Matcher<const int&> m = Truly(ReferencesFooAndIsZero);
- EXPECT_TRUE(m.Matches(foo));
- int n = 0;
- EXPECT_FALSE(m.Matches(n));
-}
-
-// Tests that Matches(m) is a predicate satisfied by whatever that
-// matches matcher m.
-TEST(MatchesTest, IsSatisfiedByWhatMatchesTheMatcher) {
- EXPECT_TRUE(Matches(Ge(0))(1));
- EXPECT_FALSE(Matches(Eq('a'))('b'));
-}
-
-// Tests that Matches(m) works when the matcher takes its argument by
-// reference.
-TEST(MatchesTest, WorksOnByRefArguments) {
- int m = 0, n = 0;
- EXPECT_TRUE(Matches(AllOf(Ref(n), Eq(0)))(n));
- EXPECT_FALSE(Matches(Ref(m))(n));
-}
-
-// Tests that a Matcher on non-reference type can be used in
-// Matches().
-TEST(MatchesTest, WorksWithMatcherOnNonRefType) {
- Matcher<int> eq5 = Eq(5);
- EXPECT_TRUE(Matches(eq5)(5));
- EXPECT_FALSE(Matches(eq5)(2));
-}
-
-// Tests Value(value, matcher). Since Value() is a simple wrapper for
-// Matches(), which has been tested already, we don't spend a lot of
-// effort on testing Value().
-TEST(ValueTest, WorksWithPolymorphicMatcher) {
- EXPECT_TRUE(Value("hi", StartsWith("h")));
- EXPECT_FALSE(Value(5, Gt(10)));
-}
-
-TEST(ValueTest, WorksWithMonomorphicMatcher) {
- const Matcher<int> is_zero = Eq(0);
- EXPECT_TRUE(Value(0, is_zero));
- EXPECT_FALSE(Value('a', is_zero));
-
- int n = 0;
- const Matcher<const int&> ref_n = Ref(n);
- EXPECT_TRUE(Value(n, ref_n));
- EXPECT_FALSE(Value(1, ref_n));
-}
-
-TEST(ExplainMatchResultTest, WorksWithPolymorphicMatcher) {
- StringMatchResultListener listener1;
- EXPECT_TRUE(ExplainMatchResult(PolymorphicIsEven(), 42, &listener1));
- EXPECT_EQ("% 2 == 0", listener1.str());
-
- StringMatchResultListener listener2;
- EXPECT_FALSE(ExplainMatchResult(Ge(42), 1.5, &listener2));
- EXPECT_EQ("", listener2.str());
-}
-
-TEST(ExplainMatchResultTest, WorksWithMonomorphicMatcher) {
- const Matcher<int> is_even = PolymorphicIsEven();
- StringMatchResultListener listener1;
- EXPECT_TRUE(ExplainMatchResult(is_even, 42, &listener1));
- EXPECT_EQ("% 2 == 0", listener1.str());
-
- const Matcher<const double&> is_zero = Eq(0);
- StringMatchResultListener listener2;
- EXPECT_FALSE(ExplainMatchResult(is_zero, 1.5, &listener2));
- EXPECT_EQ("", listener2.str());
-}
-
-MATCHER_P(Really, inner_matcher, "") {
- return ExplainMatchResult(inner_matcher, arg, result_listener);
-}
-
-TEST(ExplainMatchResultTest, WorksInsideMATCHER) {
- EXPECT_THAT(0, Really(Eq(0)));
-}
-
-TEST(AllArgsTest, WorksForTuple) {
- EXPECT_THAT(make_tuple(1, 2L), AllArgs(Lt()));
- EXPECT_THAT(make_tuple(2L, 1), Not(AllArgs(Lt())));
-}
-
-TEST(AllArgsTest, WorksForNonTuple) {
- EXPECT_THAT(42, AllArgs(Gt(0)));
- EXPECT_THAT('a', Not(AllArgs(Eq('b'))));
-}
-
-class AllArgsHelper {
- public:
- AllArgsHelper() {}
-
- MOCK_METHOD2(Helper, int(char x, int y));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(AllArgsHelper);
-};
-
-TEST(AllArgsTest, WorksInWithClause) {
- AllArgsHelper helper;
- ON_CALL(helper, Helper(_, _))
- .With(AllArgs(Lt()))
- .WillByDefault(Return(1));
- EXPECT_CALL(helper, Helper(_, _));
- EXPECT_CALL(helper, Helper(_, _))
- .With(AllArgs(Gt()))
- .WillOnce(Return(2));
-
- EXPECT_EQ(1, helper.Helper('\1', 2));
- EXPECT_EQ(2, helper.Helper('a', 1));
-}
-
-// Tests that ASSERT_THAT() and EXPECT_THAT() work when the value
-// matches the matcher.
-TEST(MatcherAssertionTest, WorksWhenMatcherIsSatisfied) {
- ASSERT_THAT(5, Ge(2)) << "This should succeed.";
- ASSERT_THAT("Foo", EndsWith("oo"));
- EXPECT_THAT(2, AllOf(Le(7), Ge(0))) << "This should succeed too.";
- EXPECT_THAT("Hello", StartsWith("Hell"));
-}
-
-// Tests that ASSERT_THAT() and EXPECT_THAT() work when the value
-// doesn't match the matcher.
-TEST(MatcherAssertionTest, WorksWhenMatcherIsNotSatisfied) {
- // 'n' must be static as it is used in an EXPECT_FATAL_FAILURE(),
- // which cannot reference auto variables.
- static unsigned short n; // NOLINT
- n = 5;
-
- // VC++ prior to version 8.0 SP1 has a bug where it will not see any
- // functions declared in the namespace scope from within nested classes.
- // EXPECT/ASSERT_(NON)FATAL_FAILURE macros use nested classes so that all
- // namespace-level functions invoked inside them need to be explicitly
- // resolved.
- EXPECT_FATAL_FAILURE(ASSERT_THAT(n, ::testing::Gt(10)),
- "Value of: n\n"
- "Expected: is > 10\n"
- " Actual: 5" + OfType("unsigned short"));
- n = 0;
- EXPECT_NONFATAL_FAILURE(
- EXPECT_THAT(n, ::testing::AllOf(::testing::Le(7), ::testing::Ge(5))),
- "Value of: n\n"
- "Expected: (is <= 7) and (is >= 5)\n"
- " Actual: 0" + OfType("unsigned short"));
-}
-
-// Tests that ASSERT_THAT() and EXPECT_THAT() work when the argument
-// has a reference type.
-TEST(MatcherAssertionTest, WorksForByRefArguments) {
- // We use a static variable here as EXPECT_FATAL_FAILURE() cannot
- // reference auto variables.
- static int n;
- n = 0;
- EXPECT_THAT(n, AllOf(Le(7), Ref(n)));
- EXPECT_FATAL_FAILURE(ASSERT_THAT(n, ::testing::Not(::testing::Ref(n))),
- "Value of: n\n"
- "Expected: does not reference the variable @");
- // Tests the "Actual" part.
- EXPECT_FATAL_FAILURE(ASSERT_THAT(n, ::testing::Not(::testing::Ref(n))),
- "Actual: 0" + OfType("int") + ", which is located @");
-}
-
-#if !GTEST_OS_SYMBIAN
-// Tests that ASSERT_THAT() and EXPECT_THAT() work when the matcher is
-// monomorphic.
-
-// ASSERT_THAT("hello", starts_with_he) fails to compile with Nokia's
-// Symbian compiler: it tries to compile
-// template<T, U> class MatcherCastImpl { ...
-// virtual bool MatchAndExplain(T x, ...) const {
-// return source_matcher_.MatchAndExplain(static_cast<U>(x), ...);
-// with U == string and T == const char*
-// With ASSERT_THAT("hello"...) changed to ASSERT_THAT(string("hello") ... )
-// the compiler silently crashes with no output.
-// If MatcherCastImpl is changed to use U(x) instead of static_cast<U>(x)
-// the code compiles but the converted string is bogus.
-TEST(MatcherAssertionTest, WorksForMonomorphicMatcher) {
- Matcher<const char*> starts_with_he = StartsWith("he");
- ASSERT_THAT("hello", starts_with_he);
-
- Matcher<const string&> ends_with_ok = EndsWith("ok");
- ASSERT_THAT("book", ends_with_ok);
- const string bad = "bad";
- EXPECT_NONFATAL_FAILURE(EXPECT_THAT(bad, ends_with_ok),
- "Value of: bad\n"
- "Expected: ends with \"ok\"\n"
- " Actual: \"bad\"");
- Matcher<int> is_greater_than_5 = Gt(5);
- EXPECT_NONFATAL_FAILURE(EXPECT_THAT(5, is_greater_than_5),
- "Value of: 5\n"
- "Expected: is > 5\n"
- " Actual: 5" + OfType("int"));
-}
-#endif // !GTEST_OS_SYMBIAN
-
-// Tests floating-point matchers.
-template <typename RawType>
-class FloatingPointTest : public testing::Test {
- protected:
- typedef typename testing::internal::FloatingPoint<RawType> Floating;
- typedef typename Floating::Bits Bits;
-
- virtual void SetUp() {
- const size_t max_ulps = Floating::kMaxUlps;
-
- // The bits that represent 0.0.
- const Bits zero_bits = Floating(0).bits();
-
- // Makes some numbers close to 0.0.
- close_to_positive_zero_ = Floating::ReinterpretBits(zero_bits + max_ulps/2);
- close_to_negative_zero_ = -Floating::ReinterpretBits(
- zero_bits + max_ulps - max_ulps/2);
- further_from_negative_zero_ = -Floating::ReinterpretBits(
- zero_bits + max_ulps + 1 - max_ulps/2);
-
- // The bits that represent 1.0.
- const Bits one_bits = Floating(1).bits();
-
- // Makes some numbers close to 1.0.
- close_to_one_ = Floating::ReinterpretBits(one_bits + max_ulps);
- further_from_one_ = Floating::ReinterpretBits(one_bits + max_ulps + 1);
-
- // +infinity.
- infinity_ = Floating::Infinity();
-
- // The bits that represent +infinity.
- const Bits infinity_bits = Floating(infinity_).bits();
-
- // Makes some numbers close to infinity.
- close_to_infinity_ = Floating::ReinterpretBits(infinity_bits - max_ulps);
- further_from_infinity_ = Floating::ReinterpretBits(
- infinity_bits - max_ulps - 1);
-
- // Makes some NAN's.
- nan1_ = Floating::ReinterpretBits(Floating::kExponentBitMask | 1);
- nan2_ = Floating::ReinterpretBits(Floating::kExponentBitMask | 200);
- }
-
- void TestSize() {
- EXPECT_EQ(sizeof(RawType), sizeof(Bits));
- }
-
- // A battery of tests for FloatingEqMatcher::Matches.
- // matcher_maker is a pointer to a function which creates a FloatingEqMatcher.
- void TestMatches(
- testing::internal::FloatingEqMatcher<RawType> (*matcher_maker)(RawType)) {
- Matcher<RawType> m1 = matcher_maker(0.0);
- EXPECT_TRUE(m1.Matches(-0.0));
- EXPECT_TRUE(m1.Matches(close_to_positive_zero_));
- EXPECT_TRUE(m1.Matches(close_to_negative_zero_));
- EXPECT_FALSE(m1.Matches(1.0));
-
- Matcher<RawType> m2 = matcher_maker(close_to_positive_zero_);
- EXPECT_FALSE(m2.Matches(further_from_negative_zero_));
-
- Matcher<RawType> m3 = matcher_maker(1.0);
- EXPECT_TRUE(m3.Matches(close_to_one_));
- EXPECT_FALSE(m3.Matches(further_from_one_));
-
- // Test commutativity: matcher_maker(0.0).Matches(1.0) was tested above.
- EXPECT_FALSE(m3.Matches(0.0));
-
- Matcher<RawType> m4 = matcher_maker(-infinity_);
- EXPECT_TRUE(m4.Matches(-close_to_infinity_));
-
- Matcher<RawType> m5 = matcher_maker(infinity_);
- EXPECT_TRUE(m5.Matches(close_to_infinity_));
-
- // This is interesting as the representations of infinity_ and nan1_
- // are only 1 DLP apart.
- EXPECT_FALSE(m5.Matches(nan1_));
-
- // matcher_maker can produce a Matcher<const RawType&>, which is needed in
- // some cases.
- Matcher<const RawType&> m6 = matcher_maker(0.0);
- EXPECT_TRUE(m6.Matches(-0.0));
- EXPECT_TRUE(m6.Matches(close_to_positive_zero_));
- EXPECT_FALSE(m6.Matches(1.0));
-
- // matcher_maker can produce a Matcher<RawType&>, which is needed in some
- // cases.
- Matcher<RawType&> m7 = matcher_maker(0.0);
- RawType x = 0.0;
- EXPECT_TRUE(m7.Matches(x));
- x = 0.01f;
- EXPECT_FALSE(m7.Matches(x));
- }
-
- // Pre-calculated numbers to be used by the tests.
-
- static RawType close_to_positive_zero_;
- static RawType close_to_negative_zero_;
- static RawType further_from_negative_zero_;
-
- static RawType close_to_one_;
- static RawType further_from_one_;
-
- static RawType infinity_;
- static RawType close_to_infinity_;
- static RawType further_from_infinity_;
-
- static RawType nan1_;
- static RawType nan2_;
-};
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::close_to_positive_zero_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::close_to_negative_zero_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::further_from_negative_zero_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::close_to_one_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::further_from_one_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::infinity_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::close_to_infinity_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::further_from_infinity_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::nan1_;
-
-template <typename RawType>
-RawType FloatingPointTest<RawType>::nan2_;
-
-// Instantiate FloatingPointTest for testing floats.
-typedef FloatingPointTest<float> FloatTest;
-
-TEST_F(FloatTest, FloatEqApproximatelyMatchesFloats) {
- TestMatches(&FloatEq);
-}
-
-TEST_F(FloatTest, NanSensitiveFloatEqApproximatelyMatchesFloats) {
- TestMatches(&NanSensitiveFloatEq);
-}
-
-TEST_F(FloatTest, FloatEqCannotMatchNaN) {
- // FloatEq never matches NaN.
- Matcher<float> m = FloatEq(nan1_);
- EXPECT_FALSE(m.Matches(nan1_));
- EXPECT_FALSE(m.Matches(nan2_));
- EXPECT_FALSE(m.Matches(1.0));
-}
-
-TEST_F(FloatTest, NanSensitiveFloatEqCanMatchNaN) {
- // NanSensitiveFloatEq will match NaN.
- Matcher<float> m = NanSensitiveFloatEq(nan1_);
- EXPECT_TRUE(m.Matches(nan1_));
- EXPECT_TRUE(m.Matches(nan2_));
- EXPECT_FALSE(m.Matches(1.0));
-}
-
-TEST_F(FloatTest, FloatEqCanDescribeSelf) {
- Matcher<float> m1 = FloatEq(2.0f);
- EXPECT_EQ("is approximately 2", Describe(m1));
- EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
-
- Matcher<float> m2 = FloatEq(0.5f);
- EXPECT_EQ("is approximately 0.5", Describe(m2));
- EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
-
- Matcher<float> m3 = FloatEq(nan1_);
- EXPECT_EQ("never matches", Describe(m3));
- EXPECT_EQ("is anything", DescribeNegation(m3));
-}
-
-TEST_F(FloatTest, NanSensitiveFloatEqCanDescribeSelf) {
- Matcher<float> m1 = NanSensitiveFloatEq(2.0f);
- EXPECT_EQ("is approximately 2", Describe(m1));
- EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
-
- Matcher<float> m2 = NanSensitiveFloatEq(0.5f);
- EXPECT_EQ("is approximately 0.5", Describe(m2));
- EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
-
- Matcher<float> m3 = NanSensitiveFloatEq(nan1_);
- EXPECT_EQ("is NaN", Describe(m3));
- EXPECT_EQ("isn't NaN", DescribeNegation(m3));
-}
-
-// Instantiate FloatingPointTest for testing doubles.
-typedef FloatingPointTest<double> DoubleTest;
-
-TEST_F(DoubleTest, DoubleEqApproximatelyMatchesDoubles) {
- TestMatches(&DoubleEq);
-}
-
-TEST_F(DoubleTest, NanSensitiveDoubleEqApproximatelyMatchesDoubles) {
- TestMatches(&NanSensitiveDoubleEq);
-}
-
-TEST_F(DoubleTest, DoubleEqCannotMatchNaN) {
- // DoubleEq never matches NaN.
- Matcher<double> m = DoubleEq(nan1_);
- EXPECT_FALSE(m.Matches(nan1_));
- EXPECT_FALSE(m.Matches(nan2_));
- EXPECT_FALSE(m.Matches(1.0));
-}
-
-TEST_F(DoubleTest, NanSensitiveDoubleEqCanMatchNaN) {
- // NanSensitiveDoubleEq will match NaN.
- Matcher<double> m = NanSensitiveDoubleEq(nan1_);
- EXPECT_TRUE(m.Matches(nan1_));
- EXPECT_TRUE(m.Matches(nan2_));
- EXPECT_FALSE(m.Matches(1.0));
-}
-
-TEST_F(DoubleTest, DoubleEqCanDescribeSelf) {
- Matcher<double> m1 = DoubleEq(2.0);
- EXPECT_EQ("is approximately 2", Describe(m1));
- EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
-
- Matcher<double> m2 = DoubleEq(0.5);
- EXPECT_EQ("is approximately 0.5", Describe(m2));
- EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
-
- Matcher<double> m3 = DoubleEq(nan1_);
- EXPECT_EQ("never matches", Describe(m3));
- EXPECT_EQ("is anything", DescribeNegation(m3));
-}
-
-TEST_F(DoubleTest, NanSensitiveDoubleEqCanDescribeSelf) {
- Matcher<double> m1 = NanSensitiveDoubleEq(2.0);
- EXPECT_EQ("is approximately 2", Describe(m1));
- EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
-
- Matcher<double> m2 = NanSensitiveDoubleEq(0.5);
- EXPECT_EQ("is approximately 0.5", Describe(m2));
- EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
-
- Matcher<double> m3 = NanSensitiveDoubleEq(nan1_);
- EXPECT_EQ("is NaN", Describe(m3));
- EXPECT_EQ("isn't NaN", DescribeNegation(m3));
-}
-
-TEST(PointeeTest, RawPointer) {
- const Matcher<int*> m = Pointee(Ge(0));
-
- int n = 1;
- EXPECT_TRUE(m.Matches(&n));
- n = -1;
- EXPECT_FALSE(m.Matches(&n));
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-TEST(PointeeTest, RawPointerToConst) {
- const Matcher<const double*> m = Pointee(Ge(0));
-
- double x = 1;
- EXPECT_TRUE(m.Matches(&x));
- x = -1;
- EXPECT_FALSE(m.Matches(&x));
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-TEST(PointeeTest, ReferenceToConstRawPointer) {
- const Matcher<int* const &> m = Pointee(Ge(0));
-
- int n = 1;
- EXPECT_TRUE(m.Matches(&n));
- n = -1;
- EXPECT_FALSE(m.Matches(&n));
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-TEST(PointeeTest, ReferenceToNonConstRawPointer) {
- const Matcher<double* &> m = Pointee(Ge(0));
-
- double x = 1.0;
- double* p = &x;
- EXPECT_TRUE(m.Matches(p));
- x = -1;
- EXPECT_FALSE(m.Matches(p));
- p = NULL;
- EXPECT_FALSE(m.Matches(p));
-}
-
-TEST(PointeeTest, NeverMatchesNull) {
- const Matcher<const char*> m = Pointee(_);
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-// Tests that we can write Pointee(value) instead of Pointee(Eq(value)).
-TEST(PointeeTest, MatchesAgainstAValue) {
- const Matcher<int*> m = Pointee(5);
-
- int n = 5;
- EXPECT_TRUE(m.Matches(&n));
- n = -1;
- EXPECT_FALSE(m.Matches(&n));
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-TEST(PointeeTest, CanDescribeSelf) {
- const Matcher<int*> m = Pointee(Gt(3));
- EXPECT_EQ("points to a value that is > 3", Describe(m));
- EXPECT_EQ("does not point to a value that is > 3",
- DescribeNegation(m));
-}
-
-TEST(PointeeTest, CanExplainMatchResult) {
- const Matcher<const string*> m = Pointee(StartsWith("Hi"));
-
- EXPECT_EQ("", Explain(m, static_cast<const string*>(NULL)));
-
- const Matcher<long*> m2 = Pointee(GreaterThan(1)); // NOLINT
- long n = 3; // NOLINT
- EXPECT_EQ("which points to 3" + OfType("long") + ", which is 2 more than 1",
- Explain(m2, &n));
-}
-
-TEST(PointeeTest, AlwaysExplainsPointee) {
- const Matcher<int*> m = Pointee(0);
- int n = 42;
- EXPECT_EQ("which points to 42" + OfType("int"), Explain(m, &n));
-}
-
-// An uncopyable class.
-class Uncopyable {
- public:
- explicit Uncopyable(int a_value) : value_(a_value) {}
-
- int value() const { return value_; }
- private:
- const int value_;
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Uncopyable);
-};
-
-// Returns true iff x.value() is positive.
-bool ValueIsPositive(const Uncopyable& x) { return x.value() > 0; }
-
-// A user-defined struct for testing Field().
-struct AStruct {
- AStruct() : x(0), y(1.0), z(5), p(NULL) {}
- AStruct(const AStruct& rhs)
- : x(rhs.x), y(rhs.y), z(rhs.z.value()), p(rhs.p) {}
-
- int x; // A non-const field.
- const double y; // A const field.
- Uncopyable z; // An uncopyable field.
- const char* p; // A pointer field.
-
- private:
- GTEST_DISALLOW_ASSIGN_(AStruct);
-};
-
-// A derived struct for testing Field().
-struct DerivedStruct : public AStruct {
- char ch;
-
- private:
- GTEST_DISALLOW_ASSIGN_(DerivedStruct);
-};
-
-// Tests that Field(&Foo::field, ...) works when field is non-const.
-TEST(FieldTest, WorksForNonConstField) {
- Matcher<AStruct> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- EXPECT_TRUE(m.Matches(a));
- a.x = -1;
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Field(&Foo::field, ...) works when field is const.
-TEST(FieldTest, WorksForConstField) {
- AStruct a;
-
- Matcher<AStruct> m = Field(&AStruct::y, Ge(0.0));
- EXPECT_TRUE(m.Matches(a));
- m = Field(&AStruct::y, Le(0.0));
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Field(&Foo::field, ...) works when field is not copyable.
-TEST(FieldTest, WorksForUncopyableField) {
- AStruct a;
-
- Matcher<AStruct> m = Field(&AStruct::z, Truly(ValueIsPositive));
- EXPECT_TRUE(m.Matches(a));
- m = Field(&AStruct::z, Not(Truly(ValueIsPositive)));
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Field(&Foo::field, ...) works when field is a pointer.
-TEST(FieldTest, WorksForPointerField) {
- // Matching against NULL.
- Matcher<AStruct> m = Field(&AStruct::p, static_cast<const char*>(NULL));
- AStruct a;
- EXPECT_TRUE(m.Matches(a));
- a.p = "hi";
- EXPECT_FALSE(m.Matches(a));
-
- // Matching a pointer that is not NULL.
- m = Field(&AStruct::p, StartsWith("hi"));
- a.p = "hill";
- EXPECT_TRUE(m.Matches(a));
- a.p = "hole";
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Field() works when the object is passed by reference.
-TEST(FieldTest, WorksForByRefArgument) {
- Matcher<const AStruct&> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- EXPECT_TRUE(m.Matches(a));
- a.x = -1;
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Field(&Foo::field, ...) works when the argument's type
-// is a sub-type of Foo.
-TEST(FieldTest, WorksForArgumentOfSubType) {
- // Note that the matcher expects DerivedStruct but we say AStruct
- // inside Field().
- Matcher<const DerivedStruct&> m = Field(&AStruct::x, Ge(0));
-
- DerivedStruct d;
- EXPECT_TRUE(m.Matches(d));
- d.x = -1;
- EXPECT_FALSE(m.Matches(d));
-}
-
-// Tests that Field(&Foo::field, m) works when field's type and m's
-// argument type are compatible but not the same.
-TEST(FieldTest, WorksForCompatibleMatcherType) {
- // The field is an int, but the inner matcher expects a signed char.
- Matcher<const AStruct&> m = Field(&AStruct::x,
- Matcher<signed char>(Ge(0)));
-
- AStruct a;
- EXPECT_TRUE(m.Matches(a));
- a.x = -1;
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Field() can describe itself.
-TEST(FieldTest, CanDescribeSelf) {
- Matcher<const AStruct&> m = Field(&AStruct::x, Ge(0));
-
- EXPECT_EQ("is an object whose given field is >= 0", Describe(m));
- EXPECT_EQ("is an object whose given field isn't >= 0", DescribeNegation(m));
-}
-
-// Tests that Field() can explain the match result.
-TEST(FieldTest, CanExplainMatchResult) {
- Matcher<const AStruct&> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- a.x = 1;
- EXPECT_EQ("whose given field is 1" + OfType("int"), Explain(m, a));
-
- m = Field(&AStruct::x, GreaterThan(0));
- EXPECT_EQ(
- "whose given field is 1" + OfType("int") + ", which is 1 more than 0",
- Explain(m, a));
-}
-
-// Tests that Field() works when the argument is a pointer to const.
-TEST(FieldForPointerTest, WorksForPointerToConst) {
- Matcher<const AStruct*> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- EXPECT_TRUE(m.Matches(&a));
- a.x = -1;
- EXPECT_FALSE(m.Matches(&a));
-}
-
-// Tests that Field() works when the argument is a pointer to non-const.
-TEST(FieldForPointerTest, WorksForPointerToNonConst) {
- Matcher<AStruct*> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- EXPECT_TRUE(m.Matches(&a));
- a.x = -1;
- EXPECT_FALSE(m.Matches(&a));
-}
-
-// Tests that Field() works when the argument is a reference to a const pointer.
-TEST(FieldForPointerTest, WorksForReferenceToConstPointer) {
- Matcher<AStruct* const&> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- EXPECT_TRUE(m.Matches(&a));
- a.x = -1;
- EXPECT_FALSE(m.Matches(&a));
-}
-
-// Tests that Field() does not match the NULL pointer.
-TEST(FieldForPointerTest, DoesNotMatchNull) {
- Matcher<const AStruct*> m = Field(&AStruct::x, _);
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-// Tests that Field(&Foo::field, ...) works when the argument's type
-// is a sub-type of const Foo*.
-TEST(FieldForPointerTest, WorksForArgumentOfSubType) {
- // Note that the matcher expects DerivedStruct but we say AStruct
- // inside Field().
- Matcher<DerivedStruct*> m = Field(&AStruct::x, Ge(0));
-
- DerivedStruct d;
- EXPECT_TRUE(m.Matches(&d));
- d.x = -1;
- EXPECT_FALSE(m.Matches(&d));
-}
-
-// Tests that Field() can describe itself when used to match a pointer.
-TEST(FieldForPointerTest, CanDescribeSelf) {
- Matcher<const AStruct*> m = Field(&AStruct::x, Ge(0));
-
- EXPECT_EQ("is an object whose given field is >= 0", Describe(m));
- EXPECT_EQ("is an object whose given field isn't >= 0", DescribeNegation(m));
-}
-
-// Tests that Field() can explain the result of matching a pointer.
-TEST(FieldForPointerTest, CanExplainMatchResult) {
- Matcher<const AStruct*> m = Field(&AStruct::x, Ge(0));
-
- AStruct a;
- a.x = 1;
- EXPECT_EQ("", Explain(m, static_cast<const AStruct*>(NULL)));
- EXPECT_EQ("which points to an object whose given field is 1" + OfType("int"),
- Explain(m, &a));
-
- m = Field(&AStruct::x, GreaterThan(0));
- EXPECT_EQ("which points to an object whose given field is 1" + OfType("int") +
- ", which is 1 more than 0", Explain(m, &a));
-}
-
-// A user-defined class for testing Property().
-class AClass {
- public:
- AClass() : n_(0) {}
-
- // A getter that returns a non-reference.
- int n() const { return n_; }
-
- void set_n(int new_n) { n_ = new_n; }
-
- // A getter that returns a reference to const.
- const string& s() const { return s_; }
-
- void set_s(const string& new_s) { s_ = new_s; }
-
- // A getter that returns a reference to non-const.
- double& x() const { return x_; }
- private:
- int n_;
- string s_;
-
- static double x_;
-};
-
-double AClass::x_ = 0.0;
-
-// A derived class for testing Property().
-class DerivedClass : public AClass {
- private:
- int k_;
-};
-
-// Tests that Property(&Foo::property, ...) works when property()
-// returns a non-reference.
-TEST(PropertyTest, WorksForNonReferenceProperty) {
- Matcher<const AClass&> m = Property(&AClass::n, Ge(0));
-
- AClass a;
- a.set_n(1);
- EXPECT_TRUE(m.Matches(a));
-
- a.set_n(-1);
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Property(&Foo::property, ...) works when property()
-// returns a reference to const.
-TEST(PropertyTest, WorksForReferenceToConstProperty) {
- Matcher<const AClass&> m = Property(&AClass::s, StartsWith("hi"));
-
- AClass a;
- a.set_s("hill");
- EXPECT_TRUE(m.Matches(a));
-
- a.set_s("hole");
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Property(&Foo::property, ...) works when property()
-// returns a reference to non-const.
-TEST(PropertyTest, WorksForReferenceToNonConstProperty) {
- double x = 0.0;
- AClass a;
-
- Matcher<const AClass&> m = Property(&AClass::x, Ref(x));
- EXPECT_FALSE(m.Matches(a));
-
- m = Property(&AClass::x, Not(Ref(x)));
- EXPECT_TRUE(m.Matches(a));
-}
-
-// Tests that Property(&Foo::property, ...) works when the argument is
-// passed by value.
-TEST(PropertyTest, WorksForByValueArgument) {
- Matcher<AClass> m = Property(&AClass::s, StartsWith("hi"));
-
- AClass a;
- a.set_s("hill");
- EXPECT_TRUE(m.Matches(a));
-
- a.set_s("hole");
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Property(&Foo::property, ...) works when the argument's
-// type is a sub-type of Foo.
-TEST(PropertyTest, WorksForArgumentOfSubType) {
- // The matcher expects a DerivedClass, but inside the Property() we
- // say AClass.
- Matcher<const DerivedClass&> m = Property(&AClass::n, Ge(0));
-
- DerivedClass d;
- d.set_n(1);
- EXPECT_TRUE(m.Matches(d));
-
- d.set_n(-1);
- EXPECT_FALSE(m.Matches(d));
-}
-
-// Tests that Property(&Foo::property, m) works when property()'s type
-// and m's argument type are compatible but different.
-TEST(PropertyTest, WorksForCompatibleMatcherType) {
- // n() returns an int but the inner matcher expects a signed char.
- Matcher<const AClass&> m = Property(&AClass::n,
- Matcher<signed char>(Ge(0)));
-
- AClass a;
- EXPECT_TRUE(m.Matches(a));
- a.set_n(-1);
- EXPECT_FALSE(m.Matches(a));
-}
-
-// Tests that Property() can describe itself.
-TEST(PropertyTest, CanDescribeSelf) {
- Matcher<const AClass&> m = Property(&AClass::n, Ge(0));
-
- EXPECT_EQ("is an object whose given property is >= 0", Describe(m));
- EXPECT_EQ("is an object whose given property isn't >= 0",
- DescribeNegation(m));
-}
-
-// Tests that Property() can explain the match result.
-TEST(PropertyTest, CanExplainMatchResult) {
- Matcher<const AClass&> m = Property(&AClass::n, Ge(0));
-
- AClass a;
- a.set_n(1);
- EXPECT_EQ("whose given property is 1" + OfType("int"), Explain(m, a));
-
- m = Property(&AClass::n, GreaterThan(0));
- EXPECT_EQ(
- "whose given property is 1" + OfType("int") + ", which is 1 more than 0",
- Explain(m, a));
-}
-
-// Tests that Property() works when the argument is a pointer to const.
-TEST(PropertyForPointerTest, WorksForPointerToConst) {
- Matcher<const AClass*> m = Property(&AClass::n, Ge(0));
-
- AClass a;
- a.set_n(1);
- EXPECT_TRUE(m.Matches(&a));
-
- a.set_n(-1);
- EXPECT_FALSE(m.Matches(&a));
-}
-
-// Tests that Property() works when the argument is a pointer to non-const.
-TEST(PropertyForPointerTest, WorksForPointerToNonConst) {
- Matcher<AClass*> m = Property(&AClass::s, StartsWith("hi"));
-
- AClass a;
- a.set_s("hill");
- EXPECT_TRUE(m.Matches(&a));
-
- a.set_s("hole");
- EXPECT_FALSE(m.Matches(&a));
-}
-
-// Tests that Property() works when the argument is a reference to a
-// const pointer.
-TEST(PropertyForPointerTest, WorksForReferenceToConstPointer) {
- Matcher<AClass* const&> m = Property(&AClass::s, StartsWith("hi"));
-
- AClass a;
- a.set_s("hill");
- EXPECT_TRUE(m.Matches(&a));
-
- a.set_s("hole");
- EXPECT_FALSE(m.Matches(&a));
-}
-
-// Tests that Property() does not match the NULL pointer.
-TEST(PropertyForPointerTest, WorksForReferenceToNonConstProperty) {
- Matcher<const AClass*> m = Property(&AClass::x, _);
- EXPECT_FALSE(m.Matches(NULL));
-}
-
-// Tests that Property(&Foo::property, ...) works when the argument's
-// type is a sub-type of const Foo*.
-TEST(PropertyForPointerTest, WorksForArgumentOfSubType) {
- // The matcher expects a DerivedClass, but inside the Property() we
- // say AClass.
- Matcher<const DerivedClass*> m = Property(&AClass::n, Ge(0));
-
- DerivedClass d;
- d.set_n(1);
- EXPECT_TRUE(m.Matches(&d));
-
- d.set_n(-1);
- EXPECT_FALSE(m.Matches(&d));
-}
-
-// Tests that Property() can describe itself when used to match a pointer.
-TEST(PropertyForPointerTest, CanDescribeSelf) {
- Matcher<const AClass*> m = Property(&AClass::n, Ge(0));
-
- EXPECT_EQ("is an object whose given property is >= 0", Describe(m));
- EXPECT_EQ("is an object whose given property isn't >= 0",
- DescribeNegation(m));
-}
-
-// Tests that Property() can explain the result of matching a pointer.
-TEST(PropertyForPointerTest, CanExplainMatchResult) {
- Matcher<const AClass*> m = Property(&AClass::n, Ge(0));
-
- AClass a;
- a.set_n(1);
- EXPECT_EQ("", Explain(m, static_cast<const AClass*>(NULL)));
- EXPECT_EQ(
- "which points to an object whose given property is 1" + OfType("int"),
- Explain(m, &a));
-
- m = Property(&AClass::n, GreaterThan(0));
- EXPECT_EQ("which points to an object whose given property is 1" +
- OfType("int") + ", which is 1 more than 0",
- Explain(m, &a));
-}
-
-// Tests ResultOf.
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f is a
-// function pointer.
-string IntToStringFunction(int input) { return input == 1 ? "foo" : "bar"; }
-
-TEST(ResultOfTest, WorksForFunctionPointers) {
- Matcher<int> matcher = ResultOf(&IntToStringFunction, Eq(string("foo")));
-
- EXPECT_TRUE(matcher.Matches(1));
- EXPECT_FALSE(matcher.Matches(2));
-}
-
-// Tests that ResultOf() can describe itself.
-TEST(ResultOfTest, CanDescribeItself) {
- Matcher<int> matcher = ResultOf(&IntToStringFunction, StrEq("foo"));
-
- EXPECT_EQ("is mapped by the given callable to a value that "
- "is equal to \"foo\"", Describe(matcher));
- EXPECT_EQ("is mapped by the given callable to a value that "
- "isn't equal to \"foo\"", DescribeNegation(matcher));
-}
-
-// Tests that ResultOf() can explain the match result.
-int IntFunction(int input) { return input == 42 ? 80 : 90; }
-
-TEST(ResultOfTest, CanExplainMatchResult) {
- Matcher<int> matcher = ResultOf(&IntFunction, Ge(85));
- EXPECT_EQ("which is mapped by the given callable to 90" + OfType("int"),
- Explain(matcher, 36));
-
- matcher = ResultOf(&IntFunction, GreaterThan(85));
- EXPECT_EQ("which is mapped by the given callable to 90" + OfType("int") +
- ", which is 5 more than 85", Explain(matcher, 36));
-}
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f(x)
-// returns a non-reference.
-TEST(ResultOfTest, WorksForNonReferenceResults) {
- Matcher<int> matcher = ResultOf(&IntFunction, Eq(80));
-
- EXPECT_TRUE(matcher.Matches(42));
- EXPECT_FALSE(matcher.Matches(36));
-}
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f(x)
-// returns a reference to non-const.
-double& DoubleFunction(double& input) { return input; } // NOLINT
-
-Uncopyable& RefUncopyableFunction(Uncopyable& obj) { // NOLINT
- return obj;
-}
-
-TEST(ResultOfTest, WorksForReferenceToNonConstResults) {
- double x = 3.14;
- double x2 = x;
- Matcher<double&> matcher = ResultOf(&DoubleFunction, Ref(x));
-
- EXPECT_TRUE(matcher.Matches(x));
- EXPECT_FALSE(matcher.Matches(x2));
-
- // Test that ResultOf works with uncopyable objects
- Uncopyable obj(0);
- Uncopyable obj2(0);
- Matcher<Uncopyable&> matcher2 =
- ResultOf(&RefUncopyableFunction, Ref(obj));
-
- EXPECT_TRUE(matcher2.Matches(obj));
- EXPECT_FALSE(matcher2.Matches(obj2));
-}
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f(x)
-// returns a reference to const.
-const string& StringFunction(const string& input) { return input; }
-
-TEST(ResultOfTest, WorksForReferenceToConstResults) {
- string s = "foo";
- string s2 = s;
- Matcher<const string&> matcher = ResultOf(&StringFunction, Ref(s));
-
- EXPECT_TRUE(matcher.Matches(s));
- EXPECT_FALSE(matcher.Matches(s2));
-}
-
-// Tests that ResultOf(f, m) works when f(x) and m's
-// argument types are compatible but different.
-TEST(ResultOfTest, WorksForCompatibleMatcherTypes) {
- // IntFunction() returns int but the inner matcher expects a signed char.
- Matcher<int> matcher = ResultOf(IntFunction, Matcher<signed char>(Ge(85)));
-
- EXPECT_TRUE(matcher.Matches(36));
- EXPECT_FALSE(matcher.Matches(42));
-}
-
-// Tests that the program aborts when ResultOf is passed
-// a NULL function pointer.
-TEST(ResultOfDeathTest, DiesOnNullFunctionPointers) {
- EXPECT_DEATH_IF_SUPPORTED(
- ResultOf(static_cast<string(*)(int dummy)>(NULL), Eq(string("foo"))),
- "NULL function pointer is passed into ResultOf\\(\\)\\.");
-}
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f is a
-// function reference.
-TEST(ResultOfTest, WorksForFunctionReferences) {
- Matcher<int> matcher = ResultOf(IntToStringFunction, StrEq("foo"));
- EXPECT_TRUE(matcher.Matches(1));
- EXPECT_FALSE(matcher.Matches(2));
-}
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f is a
-// function object.
-struct Functor : public ::std::unary_function<int, string> {
- result_type operator()(argument_type input) const {
- return IntToStringFunction(input);
- }
-};
-
-TEST(ResultOfTest, WorksForFunctors) {
- Matcher<int> matcher = ResultOf(Functor(), Eq(string("foo")));
-
- EXPECT_TRUE(matcher.Matches(1));
- EXPECT_FALSE(matcher.Matches(2));
-}
-
-// Tests that ResultOf(f, ...) compiles and works as expected when f is a
-// functor with more then one operator() defined. ResultOf() must work
-// for each defined operator().
-struct PolymorphicFunctor {
- typedef int result_type;
- int operator()(int n) { return n; }
- int operator()(const char* s) { return static_cast<int>(strlen(s)); }
-};
-
-TEST(ResultOfTest, WorksForPolymorphicFunctors) {
- Matcher<int> matcher_int = ResultOf(PolymorphicFunctor(), Ge(5));
-
- EXPECT_TRUE(matcher_int.Matches(10));
- EXPECT_FALSE(matcher_int.Matches(2));
-
- Matcher<const char*> matcher_string = ResultOf(PolymorphicFunctor(), Ge(5));
-
- EXPECT_TRUE(matcher_string.Matches("long string"));
- EXPECT_FALSE(matcher_string.Matches("shrt"));
-}
-
-const int* ReferencingFunction(const int& n) { return &n; }
-
-struct ReferencingFunctor {
- typedef const int* result_type;
- result_type operator()(const int& n) { return &n; }
-};
-
-TEST(ResultOfTest, WorksForReferencingCallables) {
- const int n = 1;
- const int n2 = 1;
- Matcher<const int&> matcher2 = ResultOf(ReferencingFunction, Eq(&n));
- EXPECT_TRUE(matcher2.Matches(n));
- EXPECT_FALSE(matcher2.Matches(n2));
-
- Matcher<const int&> matcher3 = ResultOf(ReferencingFunctor(), Eq(&n));
- EXPECT_TRUE(matcher3.Matches(n));
- EXPECT_FALSE(matcher3.Matches(n2));
-}
-
-class DivisibleByImpl {
- public:
- explicit DivisibleByImpl(int a_divider) : divider_(a_divider) {}
-
- // For testing using ExplainMatchResultTo() with polymorphic matchers.
- template <typename T>
- bool MatchAndExplain(const T& n, MatchResultListener* listener) const {
- *listener << "which is " << (n % divider_) << " modulo "
- << divider_;
- return (n % divider_) == 0;
- }
-
- void DescribeTo(ostream* os) const {
- *os << "is divisible by " << divider_;
- }
-
- void DescribeNegationTo(ostream* os) const {
- *os << "is not divisible by " << divider_;
- }
-
- void set_divider(int a_divider) { divider_ = a_divider; }
- int divider() const { return divider_; }
-
- private:
- int divider_;
-};
-
-PolymorphicMatcher<DivisibleByImpl> DivisibleBy(int n) {
- return MakePolymorphicMatcher(DivisibleByImpl(n));
-}
-
-// Tests that when AllOf() fails, only the first failing matcher is
-// asked to explain why.
-TEST(ExplainMatchResultTest, AllOf_False_False) {
- const Matcher<int> m = AllOf(DivisibleBy(4), DivisibleBy(3));
- EXPECT_EQ("which is 1 modulo 4", Explain(m, 5));
-}
-
-// Tests that when AllOf() fails, only the first failing matcher is
-// asked to explain why.
-TEST(ExplainMatchResultTest, AllOf_False_True) {
- const Matcher<int> m = AllOf(DivisibleBy(4), DivisibleBy(3));
- EXPECT_EQ("which is 2 modulo 4", Explain(m, 6));
-}
-
-// Tests that when AllOf() fails, only the first failing matcher is
-// asked to explain why.
-TEST(ExplainMatchResultTest, AllOf_True_False) {
- const Matcher<int> m = AllOf(Ge(1), DivisibleBy(3));
- EXPECT_EQ("which is 2 modulo 3", Explain(m, 5));
-}
-
-// Tests that when AllOf() succeeds, all matchers are asked to explain
-// why.
-TEST(ExplainMatchResultTest, AllOf_True_True) {
- const Matcher<int> m = AllOf(DivisibleBy(2), DivisibleBy(3));
- EXPECT_EQ("which is 0 modulo 2, and which is 0 modulo 3", Explain(m, 6));
-}
-
-TEST(ExplainMatchResultTest, AllOf_True_True_2) {
- const Matcher<int> m = AllOf(Ge(2), Le(3));
- EXPECT_EQ("", Explain(m, 2));
-}
-
-TEST(ExplainmatcherResultTest, MonomorphicMatcher) {
- const Matcher<int> m = GreaterThan(5);
- EXPECT_EQ("which is 1 more than 5", Explain(m, 6));
-}
-
-// The following two tests verify that values without a public copy
-// ctor can be used as arguments to matchers like Eq(), Ge(), and etc
-// with the help of ByRef().
-
-class NotCopyable {
- public:
- explicit NotCopyable(int a_value) : value_(a_value) {}
-
- int value() const { return value_; }
-
- bool operator==(const NotCopyable& rhs) const {
- return value() == rhs.value();
- }
-
- bool operator>=(const NotCopyable& rhs) const {
- return value() >= rhs.value();
- }
- private:
- int value_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(NotCopyable);
-};
-
-TEST(ByRefTest, AllowsNotCopyableConstValueInMatchers) {
- const NotCopyable const_value1(1);
- const Matcher<const NotCopyable&> m = Eq(ByRef(const_value1));
-
- const NotCopyable n1(1), n2(2);
- EXPECT_TRUE(m.Matches(n1));
- EXPECT_FALSE(m.Matches(n2));
-}
-
-TEST(ByRefTest, AllowsNotCopyableValueInMatchers) {
- NotCopyable value2(2);
- const Matcher<NotCopyable&> m = Ge(ByRef(value2));
-
- NotCopyable n1(1), n2(2);
- EXPECT_FALSE(m.Matches(n1));
- EXPECT_TRUE(m.Matches(n2));
-}
-
-#if GTEST_HAS_TYPED_TEST
-// Tests ContainerEq with different container types, and
-// different element types.
-
-template <typename T>
-class ContainerEqTest : public testing::Test {};
-
-typedef testing::Types<
- set<int>,
- vector<size_t>,
- multiset<size_t>,
- list<int> >
- ContainerEqTestTypes;
-
-TYPED_TEST_CASE(ContainerEqTest, ContainerEqTestTypes);
-
-// Tests that the filled container is equal to itself.
-TYPED_TEST(ContainerEqTest, EqualsSelf) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- TypeParam my_set(vals, vals + 6);
- const Matcher<TypeParam> m = ContainerEq(my_set);
- EXPECT_TRUE(m.Matches(my_set));
- EXPECT_EQ("", Explain(m, my_set));
-}
-
-// Tests that missing values are reported.
-TYPED_TEST(ContainerEqTest, ValueMissing) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {2, 1, 8, 5};
- TypeParam my_set(vals, vals + 6);
- TypeParam test_set(test_vals, test_vals + 4);
- const Matcher<TypeParam> m = ContainerEq(my_set);
- EXPECT_FALSE(m.Matches(test_set));
- EXPECT_EQ("which doesn't have these expected elements: 3",
- Explain(m, test_set));
-}
-
-// Tests that added values are reported.
-TYPED_TEST(ContainerEqTest, ValueAdded) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {1, 2, 3, 5, 8, 46};
- TypeParam my_set(vals, vals + 6);
- TypeParam test_set(test_vals, test_vals + 6);
- const Matcher<const TypeParam&> m = ContainerEq(my_set);
- EXPECT_FALSE(m.Matches(test_set));
- EXPECT_EQ("which has these unexpected elements: 46", Explain(m, test_set));
-}
-
-// Tests that added and missing values are reported together.
-TYPED_TEST(ContainerEqTest, ValueAddedAndRemoved) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {1, 2, 3, 8, 46};
- TypeParam my_set(vals, vals + 6);
- TypeParam test_set(test_vals, test_vals + 5);
- const Matcher<TypeParam> m = ContainerEq(my_set);
- EXPECT_FALSE(m.Matches(test_set));
- EXPECT_EQ("which has these unexpected elements: 46,\n"
- "and doesn't have these expected elements: 5",
- Explain(m, test_set));
-}
-
-// Tests duplicated value -- expect no explanation.
-TYPED_TEST(ContainerEqTest, DuplicateDifference) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {1, 2, 3, 5, 8};
- TypeParam my_set(vals, vals + 6);
- TypeParam test_set(test_vals, test_vals + 5);
- const Matcher<const TypeParam&> m = ContainerEq(my_set);
- // Depending on the container, match may be true or false
- // But in any case there should be no explanation.
- EXPECT_EQ("", Explain(m, test_set));
-}
-#endif // GTEST_HAS_TYPED_TEST
-
-// Tests that mutliple missing values are reported.
-// Using just vector here, so order is predicatble.
-TEST(ContainerEqExtraTest, MultipleValuesMissing) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {2, 1, 5};
- vector<int> my_set(vals, vals + 6);
- vector<int> test_set(test_vals, test_vals + 3);
- const Matcher<vector<int> > m = ContainerEq(my_set);
- EXPECT_FALSE(m.Matches(test_set));
- EXPECT_EQ("which doesn't have these expected elements: 3, 8",
- Explain(m, test_set));
-}
-
-// Tests that added values are reported.
-// Using just vector here, so order is predicatble.
-TEST(ContainerEqExtraTest, MultipleValuesAdded) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {1, 2, 92, 3, 5, 8, 46};
- list<size_t> my_set(vals, vals + 6);
- list<size_t> test_set(test_vals, test_vals + 7);
- const Matcher<const list<size_t>&> m = ContainerEq(my_set);
- EXPECT_FALSE(m.Matches(test_set));
- EXPECT_EQ("which has these unexpected elements: 92, 46",
- Explain(m, test_set));
-}
-
-// Tests that added and missing values are reported together.
-TEST(ContainerEqExtraTest, MultipleValuesAddedAndRemoved) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {1, 2, 3, 92, 46};
- list<size_t> my_set(vals, vals + 6);
- list<size_t> test_set(test_vals, test_vals + 5);
- const Matcher<const list<size_t> > m = ContainerEq(my_set);
- EXPECT_FALSE(m.Matches(test_set));
- EXPECT_EQ("which has these unexpected elements: 92, 46,\n"
- "and doesn't have these expected elements: 5, 8",
- Explain(m, test_set));
-}
-
-// Tests to see that duplicate elements are detected,
-// but (as above) not reported in the explanation.
-TEST(ContainerEqExtraTest, MultiSetOfIntDuplicateDifference) {
- static const int vals[] = {1, 1, 2, 3, 5, 8};
- static const int test_vals[] = {1, 2, 3, 5, 8};
- vector<int> my_set(vals, vals + 6);
- vector<int> test_set(test_vals, test_vals + 5);
- const Matcher<vector<int> > m = ContainerEq(my_set);
- EXPECT_TRUE(m.Matches(my_set));
- EXPECT_FALSE(m.Matches(test_set));
- // There is nothing to report when both sets contain all the same values.
- EXPECT_EQ("", Explain(m, test_set));
-}
-
-// Tests that ContainerEq works for non-trivial associative containers,
-// like maps.
-TEST(ContainerEqExtraTest, WorksForMaps) {
- map<int, std::string> my_map;
- my_map[0] = "a";
- my_map[1] = "b";
-
- map<int, std::string> test_map;
- test_map[0] = "aa";
- test_map[1] = "b";
-
- const Matcher<const map<int, std::string>&> m = ContainerEq(my_map);
- EXPECT_TRUE(m.Matches(my_map));
- EXPECT_FALSE(m.Matches(test_map));
-
- EXPECT_EQ("which has these unexpected elements: (0, \"aa\"),\n"
- "and doesn't have these expected elements: (0, \"a\")",
- Explain(m, test_map));
-}
-
-TEST(ContainerEqExtraTest, WorksForNativeArray) {
- int a1[] = { 1, 2, 3 };
- int a2[] = { 1, 2, 3 };
- int b[] = { 1, 2, 4 };
-
- EXPECT_THAT(a1, ContainerEq(a2));
- EXPECT_THAT(a1, Not(ContainerEq(b)));
-}
-
-TEST(ContainerEqExtraTest, WorksForTwoDimensionalNativeArray) {
- const char a1[][3] = { "hi", "lo" };
- const char a2[][3] = { "hi", "lo" };
- const char b[][3] = { "lo", "hi" };
-
- // Tests using ContainerEq() in the first dimension.
- EXPECT_THAT(a1, ContainerEq(a2));
- EXPECT_THAT(a1, Not(ContainerEq(b)));
-
- // Tests using ContainerEq() in the second dimension.
- EXPECT_THAT(a1, ElementsAre(ContainerEq(a2[0]), ContainerEq(a2[1])));
- EXPECT_THAT(a1, ElementsAre(Not(ContainerEq(b[0])), ContainerEq(a2[1])));
-}
-
-TEST(ContainerEqExtraTest, WorksForNativeArrayAsTuple) {
- const int a1[] = { 1, 2, 3 };
- const int a2[] = { 1, 2, 3 };
- const int b[] = { 1, 2, 3, 4 };
-
- const int* const p1 = a1;
- EXPECT_THAT(make_tuple(p1, 3), ContainerEq(a2));
- EXPECT_THAT(make_tuple(p1, 3), Not(ContainerEq(b)));
-
- const int c[] = { 1, 3, 2 };
- EXPECT_THAT(make_tuple(p1, 3), Not(ContainerEq(c)));
-}
-
-TEST(ContainerEqExtraTest, CopiesNativeArrayParameter) {
- std::string a1[][3] = {
- { "hi", "hello", "ciao" },
- { "bye", "see you", "ciao" }
- };
-
- std::string a2[][3] = {
- { "hi", "hello", "ciao" },
- { "bye", "see you", "ciao" }
- };
-
- const Matcher<const std::string(&)[2][3]> m = ContainerEq(a2);
- EXPECT_THAT(a1, m);
-
- a2[0][0] = "ha";
- EXPECT_THAT(a1, m);
-}
-
-// Tests IsReadableTypeName().
-
-TEST(IsReadableTypeNameTest, ReturnsTrueForShortNames) {
- EXPECT_TRUE(IsReadableTypeName("int"));
- EXPECT_TRUE(IsReadableTypeName("const unsigned char*"));
- EXPECT_TRUE(IsReadableTypeName("MyMap<int, void*>"));
- EXPECT_TRUE(IsReadableTypeName("void (*)(int, bool)"));
-}
-
-TEST(IsReadableTypeNameTest, ReturnsTrueForLongNonTemplateNonFunctionNames) {
- EXPECT_TRUE(IsReadableTypeName("my_long_namespace::MyClassName"));
- EXPECT_TRUE(IsReadableTypeName("int [5][6][7][8][9][10][11]"));
- EXPECT_TRUE(IsReadableTypeName("my_namespace::MyOuterClass::MyInnerClass"));
-}
-
-TEST(IsReadableTypeNameTest, ReturnsFalseForLongTemplateNames) {
- EXPECT_FALSE(
- IsReadableTypeName("basic_string<char, std::char_traits<char> >"));
- EXPECT_FALSE(IsReadableTypeName("std::vector<int, std::alloc_traits<int> >"));
-}
-
-TEST(IsReadableTypeNameTest, ReturnsFalseForLongFunctionTypeNames) {
- EXPECT_FALSE(IsReadableTypeName("void (&)(int, bool, char, float)"));
-}
-
-// Tests JoinAsTuple().
-
-TEST(JoinAsTupleTest, JoinsEmptyTuple) {
- EXPECT_EQ("", JoinAsTuple(Strings()));
-}
-
-TEST(JoinAsTupleTest, JoinsOneTuple) {
- const char* fields[] = { "1" };
- EXPECT_EQ("1", JoinAsTuple(Strings(fields, fields + 1)));
-}
-
-TEST(JoinAsTupleTest, JoinsTwoTuple) {
- const char* fields[] = { "1", "a" };
- EXPECT_EQ("(1, a)", JoinAsTuple(Strings(fields, fields + 2)));
-}
-
-TEST(JoinAsTupleTest, JoinsTenTuple) {
- const char* fields[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
- EXPECT_EQ("(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)",
- JoinAsTuple(Strings(fields, fields + 10)));
-}
-
-// Tests FormatMatcherDescription().
-
-TEST(FormatMatcherDescriptionTest, WorksForEmptyDescription) {
- EXPECT_EQ("is even",
- FormatMatcherDescription(false, "IsEven", Strings()));
- EXPECT_EQ("not (is even)",
- FormatMatcherDescription(true, "IsEven", Strings()));
-
- const char* params[] = { "5" };
- EXPECT_EQ("equals 5",
- FormatMatcherDescription(false, "Equals",
- Strings(params, params + 1)));
-
- const char* params2[] = { "5", "8" };
- EXPECT_EQ("is in range (5, 8)",
- FormatMatcherDescription(false, "IsInRange",
- Strings(params2, params2 + 2)));
-}
-
-// Tests PolymorphicMatcher::mutable_impl().
-TEST(PolymorphicMatcherTest, CanAccessMutableImpl) {
- PolymorphicMatcher<DivisibleByImpl> m(DivisibleByImpl(42));
- DivisibleByImpl& impl = m.mutable_impl();
- EXPECT_EQ(42, impl.divider());
-
- impl.set_divider(0);
- EXPECT_EQ(0, m.mutable_impl().divider());
-}
-
-// Tests PolymorphicMatcher::impl().
-TEST(PolymorphicMatcherTest, CanAccessImpl) {
- const PolymorphicMatcher<DivisibleByImpl> m(DivisibleByImpl(42));
- const DivisibleByImpl& impl = m.impl();
- EXPECT_EQ(42, impl.divider());
-}
-
-TEST(MatcherTupleTest, ExplainsMatchFailure) {
- stringstream ss1;
- ExplainMatchFailureTupleTo(make_tuple(Matcher<char>(Eq('a')), GreaterThan(5)),
- make_tuple('a', 10), &ss1);
- EXPECT_EQ("", ss1.str()); // Successful match.
-
- stringstream ss2;
- ExplainMatchFailureTupleTo(make_tuple(GreaterThan(5), Matcher<char>(Eq('a'))),
- make_tuple(2, 'b'), &ss2);
- EXPECT_EQ(" Expected arg #0: is > 5\n"
- " Actual: 2, which is 3 less than 5\n"
- " Expected arg #1: is equal to 'a' (97, 0x61)\n"
- " Actual: 'b' (98, 0x62)\n",
- ss2.str()); // Failed match where both arguments need explanation.
-
- stringstream ss3;
- ExplainMatchFailureTupleTo(make_tuple(GreaterThan(5), Matcher<char>(Eq('a'))),
- make_tuple(2, 'a'), &ss3);
- EXPECT_EQ(" Expected arg #0: is > 5\n"
- " Actual: 2, which is 3 less than 5\n",
- ss3.str()); // Failed match where only one argument needs
- // explanation.
-}
-
-// Tests Each().
-
-TEST(EachTest, ExplainsMatchResultCorrectly) {
- set<int> a; // empty
-
- Matcher<set<int> > m = Each(2);
- EXPECT_EQ("", Explain(m, a));
-
- Matcher<const int(&)[1]> n = Each(1); // NOLINT
-
- const int b[1] = { 1 };
- EXPECT_EQ("", Explain(n, b));
-
- n = Each(3);
- EXPECT_EQ("whose element #0 doesn't match", Explain(n, b));
-
- a.insert(1);
- a.insert(2);
- a.insert(3);
- m = Each(GreaterThan(0));
- EXPECT_EQ("", Explain(m, a));
-
- m = Each(GreaterThan(10));
- EXPECT_EQ("whose element #0 doesn't match, which is 9 less than 10",
- Explain(m, a));
-}
-
-TEST(EachTest, DescribesItselfCorrectly) {
- Matcher<vector<int> > m = Each(1);
- EXPECT_EQ("only contains elements that is equal to 1", Describe(m));
-
- Matcher<vector<int> > m2 = Not(m);
- EXPECT_EQ("contains some element that isn't equal to 1", Describe(m2));
-}
-
-TEST(EachTest, MatchesVectorWhenAllElementsMatch) {
- vector<int> some_vector;
- EXPECT_THAT(some_vector, Each(1));
- some_vector.push_back(3);
- EXPECT_THAT(some_vector, Not(Each(1)));
- EXPECT_THAT(some_vector, Each(3));
- some_vector.push_back(1);
- some_vector.push_back(2);
- EXPECT_THAT(some_vector, Not(Each(3)));
- EXPECT_THAT(some_vector, Each(Lt(3.5)));
-
- vector<string> another_vector;
- another_vector.push_back("fee");
- EXPECT_THAT(another_vector, Each(string("fee")));
- another_vector.push_back("fie");
- another_vector.push_back("foe");
- another_vector.push_back("fum");
- EXPECT_THAT(another_vector, Not(Each(string("fee"))));
-}
-
-TEST(EachTest, MatchesMapWhenAllElementsMatch) {
- map<const char*, int> my_map;
- const char* bar = "a string";
- my_map[bar] = 2;
- EXPECT_THAT(my_map, Each(make_pair(bar, 2)));
-
- map<string, int> another_map;
- EXPECT_THAT(another_map, Each(make_pair(string("fee"), 1)));
- another_map["fee"] = 1;
- EXPECT_THAT(another_map, Each(make_pair(string("fee"), 1)));
- another_map["fie"] = 2;
- another_map["foe"] = 3;
- another_map["fum"] = 4;
- EXPECT_THAT(another_map, Not(Each(make_pair(string("fee"), 1))));
- EXPECT_THAT(another_map, Not(Each(make_pair(string("fum"), 1))));
- EXPECT_THAT(another_map, Each(Pair(_, Gt(0))));
-}
-
-TEST(EachTest, AcceptsMatcher) {
- const int a[] = { 1, 2, 3 };
- EXPECT_THAT(a, Each(Gt(0)));
- EXPECT_THAT(a, Not(Each(Gt(1))));
-}
-
-TEST(EachTest, WorksForNativeArrayAsTuple) {
- const int a[] = { 1, 2 };
- const int* const pointer = a;
- EXPECT_THAT(make_tuple(pointer, 2), Each(Gt(0)));
- EXPECT_THAT(make_tuple(pointer, 2), Not(Each(Gt(1))));
-}
-
-// For testing Pointwise().
-class IsHalfOfMatcher {
- public:
- template <typename T1, typename T2>
- bool MatchAndExplain(const tuple<T1, T2>& a_pair,
- MatchResultListener* listener) const {
- if (get<0>(a_pair) == get<1>(a_pair)/2) {
- *listener << "where the second is " << get<1>(a_pair);
- return true;
- } else {
- *listener << "where the second/2 is " << get<1>(a_pair)/2;
- return false;
- }
- }
-
- void DescribeTo(ostream* os) const {
- *os << "are a pair where the first is half of the second";
- }
-
- void DescribeNegationTo(ostream* os) const {
- *os << "are a pair where the first isn't half of the second";
- }
-};
-
-PolymorphicMatcher<IsHalfOfMatcher> IsHalfOf() {
- return MakePolymorphicMatcher(IsHalfOfMatcher());
-}
-
-TEST(PointwiseTest, DescribesSelf) {
- vector<int> rhs;
- rhs.push_back(1);
- rhs.push_back(2);
- rhs.push_back(3);
- const Matcher<const vector<int>&> m = Pointwise(IsHalfOf(), rhs);
- EXPECT_EQ("contains 3 values, where each value and its corresponding value "
- "in { 1, 2, 3 } are a pair where the first is half of the second",
- Describe(m));
- EXPECT_EQ("doesn't contain exactly 3 values, or contains a value x at some "
- "index i where x and the i-th value of { 1, 2, 3 } are a pair "
- "where the first isn't half of the second",
- DescribeNegation(m));
-}
-
-TEST(PointwiseTest, MakesCopyOfRhs) {
- list<signed char> rhs;
- rhs.push_back(2);
- rhs.push_back(4);
-
- int lhs[] = { 1, 2 };
- const Matcher<const int (&)[2]> m = Pointwise(IsHalfOf(), rhs);
- EXPECT_THAT(lhs, m);
-
- // Changing rhs now shouldn't affect m, which made a copy of rhs.
- rhs.push_back(6);
- EXPECT_THAT(lhs, m);
-}
-
-TEST(PointwiseTest, WorksForLhsNativeArray) {
- const int lhs[] = { 1, 2, 3 };
- vector<int> rhs;
- rhs.push_back(2);
- rhs.push_back(4);
- rhs.push_back(6);
- EXPECT_THAT(lhs, Pointwise(Lt(), rhs));
- EXPECT_THAT(lhs, Not(Pointwise(Gt(), rhs)));
-}
-
-TEST(PointwiseTest, WorksForRhsNativeArray) {
- const int rhs[] = { 1, 2, 3 };
- vector<int> lhs;
- lhs.push_back(2);
- lhs.push_back(4);
- lhs.push_back(6);
- EXPECT_THAT(lhs, Pointwise(Gt(), rhs));
- EXPECT_THAT(lhs, Not(Pointwise(Lt(), rhs)));
-}
-
-TEST(PointwiseTest, RejectsWrongSize) {
- const double lhs[2] = { 1, 2 };
- const int rhs[1] = { 0 };
- EXPECT_THAT(lhs, Not(Pointwise(Gt(), rhs)));
- EXPECT_EQ("which contains 2 values",
- Explain(Pointwise(Gt(), rhs), lhs));
-
- const int rhs2[3] = { 0, 1, 2 };
- EXPECT_THAT(lhs, Not(Pointwise(Gt(), rhs2)));
-}
-
-TEST(PointwiseTest, RejectsWrongContent) {
- const double lhs[3] = { 1, 2, 3 };
- const int rhs[3] = { 2, 6, 4 };
- EXPECT_THAT(lhs, Not(Pointwise(IsHalfOf(), rhs)));
- EXPECT_EQ("where the value pair (2, 6) at index #1 don't match, "
- "where the second/2 is 3",
- Explain(Pointwise(IsHalfOf(), rhs), lhs));
-}
-
-TEST(PointwiseTest, AcceptsCorrectContent) {
- const double lhs[3] = { 1, 2, 3 };
- const int rhs[3] = { 2, 4, 6 };
- EXPECT_THAT(lhs, Pointwise(IsHalfOf(), rhs));
- EXPECT_EQ("", Explain(Pointwise(IsHalfOf(), rhs), lhs));
-}
-
-TEST(PointwiseTest, AllowsMonomorphicInnerMatcher) {
- const double lhs[3] = { 1, 2, 3 };
- const int rhs[3] = { 2, 4, 6 };
- const Matcher<tuple<const double&, const int&> > m1 = IsHalfOf();
- EXPECT_THAT(lhs, Pointwise(m1, rhs));
- EXPECT_EQ("", Explain(Pointwise(m1, rhs), lhs));
-
- // This type works as a tuple<const double&, const int&> can be
- // implicitly cast to tuple<double, int>.
- const Matcher<tuple<double, int> > m2 = IsHalfOf();
- EXPECT_THAT(lhs, Pointwise(m2, rhs));
- EXPECT_EQ("", Explain(Pointwise(m2, rhs), lhs));
-}
-
-} // namespace gmock_matchers_test
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-more-actions_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-more-actions_test.cc
deleted file mode 100644
index 43ff55d80..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-more-actions_test.cc
+++ /dev/null
@@ -1,704 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the built-in actions in gmock-more-actions.h.
-
-#include "gmock/gmock-more-actions.h"
-
-#include <functional>
-#include <sstream>
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/internal/gtest-linked_ptr.h"
-
-namespace testing {
-namespace gmock_more_actions_test {
-
-using ::std::plus;
-using ::std::string;
-using ::std::tr1::get;
-using ::std::tr1::make_tuple;
-using ::std::tr1::tuple;
-using ::std::tr1::tuple_element;
-using testing::_;
-using testing::Action;
-using testing::ActionInterface;
-using testing::DeleteArg;
-using testing::Invoke;
-using testing::Return;
-using testing::ReturnArg;
-using testing::ReturnPointee;
-using testing::SaveArg;
-using testing::SaveArgPointee;
-using testing::SetArgReferee;
-using testing::StaticAssertTypeEq;
-using testing::Unused;
-using testing::WithArg;
-using testing::WithoutArgs;
-using testing::internal::linked_ptr;
-
-// For suppressing compiler warnings on conversion possibly losing precision.
-inline short Short(short n) { return n; } // NOLINT
-inline char Char(char ch) { return ch; }
-
-// Sample functions and functors for testing Invoke() and etc.
-int Nullary() { return 1; }
-
-class NullaryFunctor {
- public:
- int operator()() { return 2; }
-};
-
-bool g_done = false;
-void VoidNullary() { g_done = true; }
-
-class VoidNullaryFunctor {
- public:
- void operator()() { g_done = true; }
-};
-
-bool Unary(int x) { return x < 0; }
-
-const char* Plus1(const char* s) { return s + 1; }
-
-void VoidUnary(int /* n */) { g_done = true; }
-
-bool ByConstRef(const string& s) { return s == "Hi"; }
-
-const double g_double = 0;
-bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; }
-
-string ByNonConstRef(string& s) { return s += "+"; } // NOLINT
-
-struct UnaryFunctor {
- int operator()(bool x) { return x ? 1 : -1; }
-};
-
-const char* Binary(const char* input, short n) { return input + n; } // NOLINT
-
-void VoidBinary(int, char) { g_done = true; }
-
-int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT
-
-void VoidTernary(int, char, bool) { g_done = true; }
-
-int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
-
-int SumOfFirst2(int a, int b, Unused, Unused) { return a + b; }
-
-void VoidFunctionWithFourArguments(char, int, float, double) { g_done = true; }
-
-string Concat4(const char* s1, const char* s2, const char* s3,
- const char* s4) {
- return string(s1) + s2 + s3 + s4;
-}
-
-int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
-
-struct SumOf5Functor {
- int operator()(int a, int b, int c, int d, int e) {
- return a + b + c + d + e;
- }
-};
-
-string Concat5(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5) {
- return string(s1) + s2 + s3 + s4 + s5;
-}
-
-int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
-}
-
-struct SumOf6Functor {
- int operator()(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
-};
-
-string Concat6(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6) {
- return string(s1) + s2 + s3 + s4 + s5 + s6;
-}
-
-string Concat7(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
-}
-
-string Concat8(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
-}
-
-string Concat9(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
-}
-
-string Concat10(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9,
- const char* s10) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
-}
-
-class Foo {
- public:
- Foo() : value_(123) {}
-
- int Nullary() const { return value_; }
-
- short Unary(long x) { return static_cast<short>(value_ + x); } // NOLINT
-
- string Binary(const string& str, char c) const { return str + c; }
-
- int Ternary(int x, bool y, char z) { return value_ + x + y*z; }
-
- int SumOf4(int a, int b, int c, int d) const {
- return a + b + c + d + value_;
- }
-
- int SumOfLast2(Unused, Unused, int a, int b) const { return a + b; }
-
- int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
-
- int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
-
- string Concat7(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
- }
-
- string Concat8(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
- }
-
- string Concat9(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
- }
-
- string Concat10(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9,
- const char* s10) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
- }
- private:
- int value_;
-};
-
-// Tests using Invoke() with a nullary function.
-TEST(InvokeTest, Nullary) {
- Action<int()> a = Invoke(Nullary); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple()));
-}
-
-// Tests using Invoke() with a unary function.
-TEST(InvokeTest, Unary) {
- Action<bool(int)> a = Invoke(Unary); // NOLINT
- EXPECT_FALSE(a.Perform(make_tuple(1)));
- EXPECT_TRUE(a.Perform(make_tuple(-1)));
-}
-
-// Tests using Invoke() with a binary function.
-TEST(InvokeTest, Binary) {
- Action<const char*(const char*, short)> a = Invoke(Binary); // NOLINT
- const char* p = "Hello";
- EXPECT_EQ(p + 2, a.Perform(make_tuple(p, Short(2))));
-}
-
-// Tests using Invoke() with a ternary function.
-TEST(InvokeTest, Ternary) {
- Action<int(int, char, short)> a = Invoke(Ternary); // NOLINT
- EXPECT_EQ(6, a.Perform(make_tuple(1, '\2', Short(3))));
-}
-
-// Tests using Invoke() with a 4-argument function.
-TEST(InvokeTest, FunctionThatTakes4Arguments) {
- Action<int(int, int, int, int)> a = Invoke(SumOf4); // NOLINT
- EXPECT_EQ(1234, a.Perform(make_tuple(1000, 200, 30, 4)));
-}
-
-// Tests using Invoke() with a 5-argument function.
-TEST(InvokeTest, FunctionThatTakes5Arguments) {
- Action<int(int, int, int, int, int)> a = Invoke(SumOf5); // NOLINT
- EXPECT_EQ(12345, a.Perform(make_tuple(10000, 2000, 300, 40, 5)));
-}
-
-// Tests using Invoke() with a 6-argument function.
-TEST(InvokeTest, FunctionThatTakes6Arguments) {
- Action<int(int, int, int, int, int, int)> a = Invoke(SumOf6); // NOLINT
- EXPECT_EQ(123456, a.Perform(make_tuple(100000, 20000, 3000, 400, 50, 6)));
-}
-
-// A helper that turns the type of a C-string literal from const
-// char[N] to const char*.
-inline const char* CharPtr(const char* s) { return s; }
-
-// Tests using Invoke() with a 7-argument function.
-TEST(InvokeTest, FunctionThatTakes7Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*)> a =
- Invoke(Concat7);
- EXPECT_EQ("1234567",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"))));
-}
-
-// Tests using Invoke() with a 8-argument function.
-TEST(InvokeTest, FunctionThatTakes8Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*)> a =
- Invoke(Concat8);
- EXPECT_EQ("12345678",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"))));
-}
-
-// Tests using Invoke() with a 9-argument function.
-TEST(InvokeTest, FunctionThatTakes9Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*)> a = Invoke(Concat9);
- EXPECT_EQ("123456789",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"))));
-}
-
-// Tests using Invoke() with a 10-argument function.
-TEST(InvokeTest, FunctionThatTakes10Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*, const char*)> a = Invoke(Concat10);
- EXPECT_EQ("1234567890",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"),
- CharPtr("0"))));
-}
-
-// Tests using Invoke() with functions with parameters declared as Unused.
-TEST(InvokeTest, FunctionWithUnusedParameters) {
- Action<int(int, int, double, const string&)> a1 =
- Invoke(SumOfFirst2);
- EXPECT_EQ(12, a1.Perform(make_tuple(10, 2, 5.6, CharPtr("hi"))));
-
- Action<int(int, int, bool, int*)> a2 =
- Invoke(SumOfFirst2);
- EXPECT_EQ(23, a2.Perform(make_tuple(20, 3, true, static_cast<int*>(NULL))));
-}
-
-// Tests using Invoke() with methods with parameters declared as Unused.
-TEST(InvokeTest, MethodWithUnusedParameters) {
- Foo foo;
- Action<int(string, bool, int, int)> a1 =
- Invoke(&foo, &Foo::SumOfLast2);
- EXPECT_EQ(12, a1.Perform(make_tuple(CharPtr("hi"), true, 10, 2)));
-
- Action<int(char, double, int, int)> a2 =
- Invoke(&foo, &Foo::SumOfLast2);
- EXPECT_EQ(23, a2.Perform(make_tuple('a', 2.5, 20, 3)));
-}
-
-// Tests using Invoke() with a functor.
-TEST(InvokeTest, Functor) {
- Action<long(long, int)> a = Invoke(plus<long>()); // NOLINT
- EXPECT_EQ(3L, a.Perform(make_tuple(1, 2)));
-}
-
-// Tests using Invoke(f) as an action of a compatible type.
-TEST(InvokeTest, FunctionWithCompatibleType) {
- Action<long(int, short, char, bool)> a = Invoke(SumOf4); // NOLINT
- EXPECT_EQ(4321, a.Perform(make_tuple(4000, Short(300), Char(20), true)));
-}
-
-// Tests using Invoke() with an object pointer and a method pointer.
-
-// Tests using Invoke() with a nullary method.
-TEST(InvokeMethodTest, Nullary) {
- Foo foo;
- Action<int()> a = Invoke(&foo, &Foo::Nullary); // NOLINT
- EXPECT_EQ(123, a.Perform(make_tuple()));
-}
-
-// Tests using Invoke() with a unary method.
-TEST(InvokeMethodTest, Unary) {
- Foo foo;
- Action<short(long)> a = Invoke(&foo, &Foo::Unary); // NOLINT
- EXPECT_EQ(4123, a.Perform(make_tuple(4000)));
-}
-
-// Tests using Invoke() with a binary method.
-TEST(InvokeMethodTest, Binary) {
- Foo foo;
- Action<string(const string&, char)> a = Invoke(&foo, &Foo::Binary);
- string s("Hell");
- EXPECT_EQ("Hello", a.Perform(make_tuple(s, 'o')));
-}
-
-// Tests using Invoke() with a ternary method.
-TEST(InvokeMethodTest, Ternary) {
- Foo foo;
- Action<int(int, bool, char)> a = Invoke(&foo, &Foo::Ternary); // NOLINT
- EXPECT_EQ(1124, a.Perform(make_tuple(1000, true, Char(1))));
-}
-
-// Tests using Invoke() with a 4-argument method.
-TEST(InvokeMethodTest, MethodThatTakes4Arguments) {
- Foo foo;
- Action<int(int, int, int, int)> a = Invoke(&foo, &Foo::SumOf4); // NOLINT
- EXPECT_EQ(1357, a.Perform(make_tuple(1000, 200, 30, 4)));
-}
-
-// Tests using Invoke() with a 5-argument method.
-TEST(InvokeMethodTest, MethodThatTakes5Arguments) {
- Foo foo;
- Action<int(int, int, int, int, int)> a = Invoke(&foo, &Foo::SumOf5); // NOLINT
- EXPECT_EQ(12345, a.Perform(make_tuple(10000, 2000, 300, 40, 5)));
-}
-
-// Tests using Invoke() with a 6-argument method.
-TEST(InvokeMethodTest, MethodThatTakes6Arguments) {
- Foo foo;
- Action<int(int, int, int, int, int, int)> a = // NOLINT
- Invoke(&foo, &Foo::SumOf6);
- EXPECT_EQ(123456, a.Perform(make_tuple(100000, 20000, 3000, 400, 50, 6)));
-}
-
-// Tests using Invoke() with a 7-argument method.
-TEST(InvokeMethodTest, MethodThatTakes7Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*)> a =
- Invoke(&foo, &Foo::Concat7);
- EXPECT_EQ("1234567",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"))));
-}
-
-// Tests using Invoke() with a 8-argument method.
-TEST(InvokeMethodTest, MethodThatTakes8Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*)> a =
- Invoke(&foo, &Foo::Concat8);
- EXPECT_EQ("12345678",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"))));
-}
-
-// Tests using Invoke() with a 9-argument method.
-TEST(InvokeMethodTest, MethodThatTakes9Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*)> a = Invoke(&foo, &Foo::Concat9);
- EXPECT_EQ("123456789",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"))));
-}
-
-// Tests using Invoke() with a 10-argument method.
-TEST(InvokeMethodTest, MethodThatTakes10Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*, const char*)> a = Invoke(&foo, &Foo::Concat10);
- EXPECT_EQ("1234567890",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"),
- CharPtr("0"))));
-}
-
-// Tests using Invoke(f) as an action of a compatible type.
-TEST(InvokeMethodTest, MethodWithCompatibleType) {
- Foo foo;
- Action<long(int, short, char, bool)> a = // NOLINT
- Invoke(&foo, &Foo::SumOf4);
- EXPECT_EQ(4444, a.Perform(make_tuple(4000, Short(300), Char(20), true)));
-}
-
-// Tests using WithoutArgs with an action that takes no argument.
-TEST(WithoutArgsTest, NoArg) {
- Action<int(int n)> a = WithoutArgs(Invoke(Nullary)); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple(2)));
-}
-
-// Tests using WithArg with an action that takes 1 argument.
-TEST(WithArgTest, OneArg) {
- Action<bool(double x, int n)> b = WithArg<1>(Invoke(Unary)); // NOLINT
- EXPECT_TRUE(b.Perform(make_tuple(1.5, -1)));
- EXPECT_FALSE(b.Perform(make_tuple(1.5, 1)));
-}
-
-TEST(ReturnArgActionTest, WorksForOneArgIntArg0) {
- const Action<int(int)> a = ReturnArg<0>();
- EXPECT_EQ(5, a.Perform(make_tuple(5)));
-}
-
-TEST(ReturnArgActionTest, WorksForMultiArgBoolArg0) {
- const Action<bool(bool, bool, bool)> a = ReturnArg<0>();
- EXPECT_TRUE(a.Perform(make_tuple(true, false, false)));
-}
-
-TEST(ReturnArgActionTest, WorksForMultiArgStringArg2) {
- const Action<string(int, int, string, int)> a = ReturnArg<2>();
- EXPECT_EQ("seven", a.Perform(make_tuple(5, 6, string("seven"), 8)));
-}
-
-TEST(SaveArgActionTest, WorksForSameType) {
- int result = 0;
- const Action<void(int n)> a1 = SaveArg<0>(&result);
- a1.Perform(make_tuple(5));
- EXPECT_EQ(5, result);
-}
-
-TEST(SaveArgActionTest, WorksForCompatibleType) {
- int result = 0;
- const Action<void(bool, char)> a1 = SaveArg<1>(&result);
- a1.Perform(make_tuple(true, 'a'));
- EXPECT_EQ('a', result);
-}
-
-TEST(SaveArgPointeeActionTest, WorksForSameType) {
- int result = 0;
- const int value = 5;
- const Action<void(const int*)> a1 = SaveArgPointee<0>(&result);
- a1.Perform(make_tuple(&value));
- EXPECT_EQ(5, result);
-}
-
-TEST(SaveArgPointeeActionTest, WorksForCompatibleType) {
- int result = 0;
- char value = 'a';
- const Action<void(bool, char*)> a1 = SaveArgPointee<1>(&result);
- a1.Perform(make_tuple(true, &value));
- EXPECT_EQ('a', result);
-}
-
-TEST(SaveArgPointeeActionTest, WorksForLinkedPtr) {
- int result = 0;
- linked_ptr<int> value(new int(5));
- const Action<void(linked_ptr<int>)> a1 = SaveArgPointee<0>(&result);
- a1.Perform(make_tuple(value));
- EXPECT_EQ(5, result);
-}
-
-TEST(SetArgRefereeActionTest, WorksForSameType) {
- int value = 0;
- const Action<void(int&)> a1 = SetArgReferee<0>(1);
- a1.Perform(tuple<int&>(value));
- EXPECT_EQ(1, value);
-}
-
-TEST(SetArgRefereeActionTest, WorksForCompatibleType) {
- int value = 0;
- const Action<void(int, int&)> a1 = SetArgReferee<1>('a');
- a1.Perform(tuple<int, int&>(0, value));
- EXPECT_EQ('a', value);
-}
-
-TEST(SetArgRefereeActionTest, WorksWithExtraArguments) {
- int value = 0;
- const Action<void(bool, int, int&, const char*)> a1 = SetArgReferee<2>('a');
- a1.Perform(tuple<bool, int, int&, const char*>(true, 0, value, "hi"));
- EXPECT_EQ('a', value);
-}
-
-// A class that can be used to verify that its destructor is called: it will set
-// the bool provided to the constructor to true when destroyed.
-class DeletionTester {
- public:
- explicit DeletionTester(bool* is_deleted)
- : is_deleted_(is_deleted) {
- // Make sure the bit is set to false.
- *is_deleted_ = false;
- }
-
- ~DeletionTester() {
- *is_deleted_ = true;
- }
-
- private:
- bool* is_deleted_;
-};
-
-TEST(DeleteArgActionTest, OneArg) {
- bool is_deleted = false;
- DeletionTester* t = new DeletionTester(&is_deleted);
- const Action<void(DeletionTester*)> a1 = DeleteArg<0>(); // NOLINT
- EXPECT_FALSE(is_deleted);
- a1.Perform(make_tuple(t));
- EXPECT_TRUE(is_deleted);
-}
-
-TEST(DeleteArgActionTest, TenArgs) {
- bool is_deleted = false;
- DeletionTester* t = new DeletionTester(&is_deleted);
- const Action<void(bool, int, int, const char*, bool,
- int, int, int, int, DeletionTester*)> a1 = DeleteArg<9>();
- EXPECT_FALSE(is_deleted);
- a1.Perform(make_tuple(true, 5, 6, CharPtr("hi"), false, 7, 8, 9, 10, t));
- EXPECT_TRUE(is_deleted);
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-TEST(ThrowActionTest, ThrowsGivenExceptionInVoidFunction) {
- const Action<void(int n)> a = Throw('a');
- EXPECT_THROW(a.Perform(make_tuple(0)), char);
-}
-
-class MyException {};
-
-TEST(ThrowActionTest, ThrowsGivenExceptionInNonVoidFunction) {
- const Action<double(char ch)> a = Throw(MyException());
- EXPECT_THROW(a.Perform(make_tuple('0')), MyException);
-}
-
-TEST(ThrowActionTest, ThrowsGivenExceptionInNullaryFunction) {
- const Action<double()> a = Throw(MyException());
- EXPECT_THROW(a.Perform(make_tuple()), MyException);
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Tests that SetArrayArgument<N>(first, last) sets the elements of the array
-// pointed to by the N-th (0-based) argument to values in range [first, last).
-TEST(SetArrayArgumentTest, SetsTheNthArray) {
- typedef void MyFunction(bool, int*, char*);
- int numbers[] = { 1, 2, 3 };
- Action<MyFunction> a = SetArrayArgument<1>(numbers, numbers + 3);
-
- int n[4] = {};
- int* pn = n;
- char ch[4] = {};
- char* pch = ch;
- a.Perform(make_tuple(true, pn, pch));
- EXPECT_EQ(1, n[0]);
- EXPECT_EQ(2, n[1]);
- EXPECT_EQ(3, n[2]);
- EXPECT_EQ(0, n[3]);
- EXPECT_EQ('\0', ch[0]);
- EXPECT_EQ('\0', ch[1]);
- EXPECT_EQ('\0', ch[2]);
- EXPECT_EQ('\0', ch[3]);
-
- // Tests first and last are iterators.
- std::string letters = "abc";
- a = SetArrayArgument<2>(letters.begin(), letters.end());
- std::fill_n(n, 4, 0);
- std::fill_n(ch, 4, '\0');
- a.Perform(make_tuple(true, pn, pch));
- EXPECT_EQ(0, n[0]);
- EXPECT_EQ(0, n[1]);
- EXPECT_EQ(0, n[2]);
- EXPECT_EQ(0, n[3]);
- EXPECT_EQ('a', ch[0]);
- EXPECT_EQ('b', ch[1]);
- EXPECT_EQ('c', ch[2]);
- EXPECT_EQ('\0', ch[3]);
-}
-
-// Tests SetArrayArgument<N>(first, last) where first == last.
-TEST(SetArrayArgumentTest, SetsTheNthArrayWithEmptyRange) {
- typedef void MyFunction(bool, int*);
- int numbers[] = { 1, 2, 3 };
- Action<MyFunction> a = SetArrayArgument<1>(numbers, numbers);
-
- int n[4] = {};
- int* pn = n;
- a.Perform(make_tuple(true, pn));
- EXPECT_EQ(0, n[0]);
- EXPECT_EQ(0, n[1]);
- EXPECT_EQ(0, n[2]);
- EXPECT_EQ(0, n[3]);
-}
-
-// Tests SetArrayArgument<N>(first, last) where *first is convertible
-// (but not equal) to the argument type.
-TEST(SetArrayArgumentTest, SetsTheNthArrayWithConvertibleType) {
- typedef void MyFunction(bool, char*);
- int codes[] = { 97, 98, 99 };
- Action<MyFunction> a = SetArrayArgument<1>(codes, codes + 3);
-
- char ch[4] = {};
- char* pch = ch;
- a.Perform(make_tuple(true, pch));
- EXPECT_EQ('a', ch[0]);
- EXPECT_EQ('b', ch[1]);
- EXPECT_EQ('c', ch[2]);
- EXPECT_EQ('\0', ch[3]);
-}
-
-// Test SetArrayArgument<N>(first, last) with iterator as argument.
-TEST(SetArrayArgumentTest, SetsTheNthArrayWithIteratorArgument) {
- typedef void MyFunction(bool, std::back_insert_iterator<std::string>);
- std::string letters = "abc";
- Action<MyFunction> a = SetArrayArgument<1>(letters.begin(), letters.end());
-
- std::string s;
- a.Perform(make_tuple(true, back_inserter(s)));
- EXPECT_EQ(letters, s);
-}
-
-TEST(ReturnPointeeTest, Works) {
- int n = 42;
- const Action<int()> a = ReturnPointee(&n);
- EXPECT_EQ(42, a.Perform(make_tuple()));
-
- n = 43;
- EXPECT_EQ(43, a.Perform(make_tuple()));
-}
-
-} // namespace gmock_generated_actions_test
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-nice-strict_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-nice-strict_test.cc
deleted file mode 100644
index e33441801..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-nice-strict_test.cc
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gmock/gmock-generated-nice-strict.h"
-
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-// This must not be defined inside the ::testing namespace, or it will
-// clash with ::testing::Mock.
-class Mock {
- public:
- Mock() {}
-
- MOCK_METHOD0(DoThis, void());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
-};
-
-namespace testing {
-namespace gmock_nice_strict_test {
-
-using testing::internal::string;
-using testing::GMOCK_FLAG(verbose);
-using testing::HasSubstr;
-using testing::NiceMock;
-using testing::StrictMock;
-
-#if GTEST_HAS_STREAM_REDIRECTION
-using testing::internal::CaptureStdout;
-using testing::internal::GetCapturedStdout;
-#endif
-
-// Defines some mock classes needed by the tests.
-
-class Foo {
- public:
- virtual ~Foo() {}
-
- virtual void DoThis() = 0;
- virtual int DoThat(bool flag) = 0;
-};
-
-class MockFoo : public Foo {
- public:
- MockFoo() {}
- void Delete() { delete this; }
-
- MOCK_METHOD0(DoThis, void());
- MOCK_METHOD1(DoThat, int(bool flag));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
-};
-
-class MockBar {
- public:
- explicit MockBar(const string& s) : str_(s) {}
-
- MockBar(char a1, char a2, string a3, string a4, int a5, int a6,
- const string& a7, const string& a8, bool a9, bool a10) {
- str_ = string() + a1 + a2 + a3 + a4 + static_cast<char>(a5) +
- static_cast<char>(a6) + a7 + a8 + (a9 ? 'T' : 'F') + (a10 ? 'T' : 'F');
- }
-
- virtual ~MockBar() {}
-
- const string& str() const { return str_; }
-
- MOCK_METHOD0(This, int());
- MOCK_METHOD2(That, string(int, bool));
-
- private:
- string str_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar);
-};
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that a nice mock generates no warning for uninteresting calls.
-TEST(NiceMockTest, NoWarningForUninterestingCall) {
- NiceMock<MockFoo> nice_foo;
-
- CaptureStdout();
- nice_foo.DoThis();
- nice_foo.DoThat(true);
- EXPECT_STREQ("", GetCapturedStdout().c_str());
-}
-
-// Tests that a nice mock generates no warning for uninteresting calls
-// that delete the mock object.
-TEST(NiceMockTest, NoWarningForUninterestingCallAfterDeath) {
- NiceMock<MockFoo>* const nice_foo = new NiceMock<MockFoo>;
-
- ON_CALL(*nice_foo, DoThis())
- .WillByDefault(Invoke(nice_foo, &MockFoo::Delete));
-
- CaptureStdout();
- nice_foo->DoThis();
- EXPECT_STREQ("", GetCapturedStdout().c_str());
-}
-
-// Tests that a nice mock generates informational logs for
-// uninteresting calls.
-TEST(NiceMockTest, InfoForUninterestingCall) {
- NiceMock<MockFoo> nice_foo;
-
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "info";
- CaptureStdout();
- nice_foo.DoThis();
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- CaptureStdout();
- nice_foo.DoThat(true);
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that a nice mock allows expected calls.
-TEST(NiceMockTest, AllowsExpectedCall) {
- NiceMock<MockFoo> nice_foo;
-
- EXPECT_CALL(nice_foo, DoThis());
- nice_foo.DoThis();
-}
-
-// Tests that an unexpected call on a nice mock fails.
-TEST(NiceMockTest, UnexpectedCallFails) {
- NiceMock<MockFoo> nice_foo;
-
- EXPECT_CALL(nice_foo, DoThis()).Times(0);
- EXPECT_NONFATAL_FAILURE(nice_foo.DoThis(), "called more times than expected");
-}
-
-// Tests that NiceMock works with a mock class that has a non-default
-// constructor.
-TEST(NiceMockTest, NonDefaultConstructor) {
- NiceMock<MockBar> nice_bar("hi");
- EXPECT_EQ("hi", nice_bar.str());
-
- nice_bar.This();
- nice_bar.That(5, true);
-}
-
-// Tests that NiceMock works with a mock class that has a 10-ary
-// non-default constructor.
-TEST(NiceMockTest, NonDefaultConstructor10) {
- NiceMock<MockBar> nice_bar('a', 'b', "c", "d", 'e', 'f',
- "g", "h", true, false);
- EXPECT_EQ("abcdefghTF", nice_bar.str());
-
- nice_bar.This();
- nice_bar.That(5, true);
-}
-
-#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-// Tests that NiceMock<Mock> compiles where Mock is a user-defined
-// class (as opposed to ::testing::Mock). We had to workaround an
-// MSVC 8.0 bug that caused the symbol Mock used in the definition of
-// NiceMock to be looked up in the wrong context, and this test
-// ensures that our fix works.
-//
-// We have to skip this test on Symbian and Windows Mobile, as it
-// causes the program to crash there, for reasons unclear to us yet.
-TEST(NiceMockTest, AcceptsClassNamedMock) {
- NiceMock< ::Mock> nice;
- EXPECT_CALL(nice, DoThis());
- nice.DoThis();
-}
-#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-
-// Tests that a strict mock allows expected calls.
-TEST(StrictMockTest, AllowsExpectedCall) {
- StrictMock<MockFoo> strict_foo;
-
- EXPECT_CALL(strict_foo, DoThis());
- strict_foo.DoThis();
-}
-
-// Tests that an unexpected call on a strict mock fails.
-TEST(StrictMockTest, UnexpectedCallFails) {
- StrictMock<MockFoo> strict_foo;
-
- EXPECT_CALL(strict_foo, DoThis()).Times(0);
- EXPECT_NONFATAL_FAILURE(strict_foo.DoThis(),
- "called more times than expected");
-}
-
-// Tests that an uninteresting call on a strict mock fails.
-TEST(StrictMockTest, UninterestingCallFails) {
- StrictMock<MockFoo> strict_foo;
-
- EXPECT_NONFATAL_FAILURE(strict_foo.DoThis(),
- "Uninteresting mock function call");
-}
-
-// Tests that an uninteresting call on a strict mock fails, even if
-// the call deletes the mock object.
-TEST(StrictMockTest, UninterestingCallFailsAfterDeath) {
- StrictMock<MockFoo>* const strict_foo = new StrictMock<MockFoo>;
-
- ON_CALL(*strict_foo, DoThis())
- .WillByDefault(Invoke(strict_foo, &MockFoo::Delete));
-
- EXPECT_NONFATAL_FAILURE(strict_foo->DoThis(),
- "Uninteresting mock function call");
-}
-
-// Tests that StrictMock works with a mock class that has a
-// non-default constructor.
-TEST(StrictMockTest, NonDefaultConstructor) {
- StrictMock<MockBar> strict_bar("hi");
- EXPECT_EQ("hi", strict_bar.str());
-
- EXPECT_NONFATAL_FAILURE(strict_bar.That(5, true),
- "Uninteresting mock function call");
-}
-
-// Tests that StrictMock works with a mock class that has a 10-ary
-// non-default constructor.
-TEST(StrictMockTest, NonDefaultConstructor10) {
- StrictMock<MockBar> strict_bar('a', 'b', "c", "d", 'e', 'f',
- "g", "h", true, false);
- EXPECT_EQ("abcdefghTF", strict_bar.str());
-
- EXPECT_NONFATAL_FAILURE(strict_bar.That(5, true),
- "Uninteresting mock function call");
-}
-
-#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-// Tests that StrictMock<Mock> compiles where Mock is a user-defined
-// class (as opposed to ::testing::Mock). We had to workaround an
-// MSVC 8.0 bug that caused the symbol Mock used in the definition of
-// StrictMock to be looked up in the wrong context, and this test
-// ensures that our fix works.
-//
-// We have to skip this test on Symbian and Windows Mobile, as it
-// causes the program to crash there, for reasons unclear to us yet.
-TEST(StrictMockTest, AcceptsClassNamedMock) {
- StrictMock< ::Mock> strict;
- EXPECT_CALL(strict, DoThis());
- strict.DoThis();
-}
-#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-
-} // namespace gmock_nice_strict_test
-} // namespace testing
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-port_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-port_test.cc
deleted file mode 100644
index d6a8d4446..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-port_test.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the internal cross-platform support utilities.
-
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-// NOTE: if this file is left without tests for some reason, put a dummy
-// test here to make references to symbols in the gtest library and avoid
-// 'undefined symbol' linker errors in gmock_main:
-
-TEST(DummyTest, Dummy) {}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-spec-builders_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-spec-builders_test.cc
deleted file mode 100644
index 29d47d12e..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock-spec-builders_test.cc
+++ /dev/null
@@ -1,2484 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the spec builder syntax.
-
-#include "gmock/gmock-spec-builders.h"
-
-#include <ostream> // NOLINT
-#include <sstream>
-#include <string>
-
-#include "gmock/gmock.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-#include "gtest/internal/gtest-port.h"
-
-namespace testing {
-namespace internal {
-
-// Helper class for testing the Expectation class template.
-class ExpectationTester {
- public:
- // Sets the call count of the given expectation to the given number.
- void SetCallCount(int n, ExpectationBase* exp) {
- exp->call_count_ = n;
- }
-};
-
-} // namespace internal
-} // namespace testing
-
-namespace {
-
-using testing::_;
-using testing::AnyNumber;
-using testing::AtLeast;
-using testing::AtMost;
-using testing::Between;
-using testing::Cardinality;
-using testing::CardinalityInterface;
-using testing::ContainsRegex;
-using testing::Const;
-using testing::DoAll;
-using testing::DoDefault;
-using testing::Eq;
-using testing::Expectation;
-using testing::ExpectationSet;
-using testing::GMOCK_FLAG(verbose);
-using testing::Gt;
-using testing::InSequence;
-using testing::Invoke;
-using testing::InvokeWithoutArgs;
-using testing::IsSubstring;
-using testing::Lt;
-using testing::Message;
-using testing::Mock;
-using testing::Ne;
-using testing::Return;
-using testing::Sequence;
-using testing::internal::ExpectationTester;
-using testing::internal::FormatFileLocation;
-using testing::internal::g_gmock_mutex;
-using testing::internal::kErrorVerbosity;
-using testing::internal::kInfoVerbosity;
-using testing::internal::kWarningVerbosity;
-using testing::internal::String;
-using testing::internal::string;
-
-#if GTEST_HAS_STREAM_REDIRECTION
-using testing::HasSubstr;
-using testing::internal::CaptureStdout;
-using testing::internal::GetCapturedStdout;
-#endif
-
-class Incomplete;
-
-class MockIncomplete {
- public:
- // This line verifies that a mock method can take a by-reference
- // argument of an incomplete type.
- MOCK_METHOD1(ByRefFunc, void(const Incomplete& x));
-};
-
-// Tells Google Mock how to print a value of type Incomplete.
-void PrintTo(const Incomplete& x, ::std::ostream* os);
-
-TEST(MockMethodTest, CanInstantiateWithIncompleteArgType) {
- // Even though this mock class contains a mock method that takes
- // by-reference an argument whose type is incomplete, we can still
- // use the mock, as long as Google Mock knows how to print the
- // argument.
- MockIncomplete incomplete;
- EXPECT_CALL(incomplete, ByRefFunc(_))
- .Times(AnyNumber());
-}
-
-// The definition of the printer for the argument type doesn't have to
-// be visible where the mock is used.
-void PrintTo(const Incomplete& /* x */, ::std::ostream* os) {
- *os << "incomplete";
-}
-
-class Result {};
-
-class MockA {
- public:
- MockA() {}
-
- MOCK_METHOD1(DoA, void(int n)); // NOLINT
- MOCK_METHOD1(ReturnResult, Result(int n)); // NOLINT
- MOCK_METHOD2(Binary, bool(int x, int y)); // NOLINT
- MOCK_METHOD2(ReturnInt, int(int x, int y)); // NOLINT
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockA);
-};
-
-class MockB {
- public:
- MockB() {}
-
- MOCK_CONST_METHOD0(DoB, int()); // NOLINT
- MOCK_METHOD1(DoB, int(int n)); // NOLINT
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB);
-};
-
-// Tests that EXPECT_CALL and ON_CALL compile in a presence of macro
-// redefining a mock method name. This could happen, for example, when
-// the tested code #includes Win32 API headers which define many APIs
-// as macros, e.g. #define TextOut TextOutW.
-
-#define Method MethodW
-
-class CC {
- public:
- virtual ~CC() {}
- virtual int Method() = 0;
-};
-class MockCC : public CC {
- public:
- MockCC() {}
-
- MOCK_METHOD0(Method, int());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockCC);
-};
-
-// Tests that a method with expanded name compiles.
-TEST(OnCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) {
- MockCC cc;
- ON_CALL(cc, Method());
-}
-
-// Tests that the method with expanded name not only compiles but runs
-// and returns a correct value, too.
-TEST(OnCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) {
- MockCC cc;
- ON_CALL(cc, Method()).WillByDefault(Return(42));
- EXPECT_EQ(42, cc.Method());
-}
-
-// Tests that a method with expanded name compiles.
-TEST(ExpectCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) {
- MockCC cc;
- EXPECT_CALL(cc, Method());
- cc.Method();
-}
-
-// Tests that it works, too.
-TEST(ExpectCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) {
- MockCC cc;
- EXPECT_CALL(cc, Method()).WillOnce(Return(42));
- EXPECT_EQ(42, cc.Method());
-}
-
-#undef Method // Done with macro redefinition tests.
-
-// Tests that ON_CALL evaluates its arguments exactly once as promised
-// by Google Mock.
-TEST(OnCallSyntaxTest, EvaluatesFirstArgumentOnce) {
- MockA a;
- MockA* pa = &a;
-
- ON_CALL(*pa++, DoA(_));
- EXPECT_EQ(&a + 1, pa);
-}
-
-TEST(OnCallSyntaxTest, EvaluatesSecondArgumentOnce) {
- MockA a;
- int n = 0;
-
- ON_CALL(a, DoA(n++));
- EXPECT_EQ(1, n);
-}
-
-// Tests that the syntax of ON_CALL() is enforced at run time.
-
-TEST(OnCallSyntaxTest, WithIsOptional) {
- MockA a;
-
- ON_CALL(a, DoA(5))
- .WillByDefault(Return());
- ON_CALL(a, DoA(_))
- .With(_)
- .WillByDefault(Return());
-}
-
-TEST(OnCallSyntaxTest, WithCanAppearAtMostOnce) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- ON_CALL(a, ReturnResult(_))
- .With(_)
- .With(_)
- .WillByDefault(Return(Result()));
- }, ".With() cannot appear more than once in an ON_CALL()");
-}
-
-TEST(OnCallSyntaxTest, WillByDefaultIsMandatory) {
- MockA a;
-
- EXPECT_DEATH_IF_SUPPORTED({
- ON_CALL(a, DoA(5));
- a.DoA(5);
- }, "");
-}
-
-TEST(OnCallSyntaxTest, WillByDefaultCanAppearAtMostOnce) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- ON_CALL(a, DoA(5))
- .WillByDefault(Return())
- .WillByDefault(Return());
- }, ".WillByDefault() must appear exactly once in an ON_CALL()");
-}
-
-// Tests that EXPECT_CALL evaluates its arguments exactly once as
-// promised by Google Mock.
-TEST(ExpectCallSyntaxTest, EvaluatesFirstArgumentOnce) {
- MockA a;
- MockA* pa = &a;
-
- EXPECT_CALL(*pa++, DoA(_));
- a.DoA(0);
- EXPECT_EQ(&a + 1, pa);
-}
-
-TEST(ExpectCallSyntaxTest, EvaluatesSecondArgumentOnce) {
- MockA a;
- int n = 0;
-
- EXPECT_CALL(a, DoA(n++));
- a.DoA(0);
- EXPECT_EQ(1, n);
-}
-
-// Tests that the syntax of EXPECT_CALL() is enforced at run time.
-
-TEST(ExpectCallSyntaxTest, WithIsOptional) {
- MockA a;
-
- EXPECT_CALL(a, DoA(5))
- .Times(0);
- EXPECT_CALL(a, DoA(6))
- .With(_)
- .Times(0);
-}
-
-TEST(ExpectCallSyntaxTest, WithCanAppearAtMostOnce) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(6))
- .With(_)
- .With(_);
- }, ".With() cannot appear more than once in an EXPECT_CALL()");
-
- a.DoA(6);
-}
-
-TEST(ExpectCallSyntaxTest, WithMustBeFirstClause) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .Times(1)
- .With(_);
- }, ".With() must be the first clause in an EXPECT_CALL()");
-
- a.DoA(1);
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(2))
- .WillOnce(Return())
- .With(_);
- }, ".With() must be the first clause in an EXPECT_CALL()");
-
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, TimesCanBeInferred) {
- MockA a;
-
- EXPECT_CALL(a, DoA(1))
- .WillOnce(Return());
-
- EXPECT_CALL(a, DoA(2))
- .WillOnce(Return())
- .WillRepeatedly(Return());
-
- a.DoA(1);
- a.DoA(2);
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, TimesCanAppearAtMostOnce) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .Times(1)
- .Times(2);
- }, ".Times() cannot appear more than once in an EXPECT_CALL()");
-
- a.DoA(1);
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, TimesMustBeBeforeInSequence) {
- MockA a;
- Sequence s;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .InSequence(s)
- .Times(1);
- }, ".Times() cannot appear after ");
-
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, InSequenceIsOptional) {
- MockA a;
- Sequence s;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(2))
- .InSequence(s);
-
- a.DoA(1);
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, InSequenceCanAppearMultipleTimes) {
- MockA a;
- Sequence s1, s2;
-
- EXPECT_CALL(a, DoA(1))
- .InSequence(s1, s2)
- .InSequence(s1);
-
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeAfter) {
- MockA a;
- Sequence s;
-
- Expectation e = EXPECT_CALL(a, DoA(1))
- .Times(AnyNumber());
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(2))
- .After(e)
- .InSequence(s);
- }, ".InSequence() cannot appear after ");
-
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeWillOnce) {
- MockA a;
- Sequence s;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .WillOnce(Return())
- .InSequence(s);
- }, ".InSequence() cannot appear after ");
-
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, AfterMustBeBeforeWillOnce) {
- MockA a;
-
- Expectation e = EXPECT_CALL(a, DoA(1));
- EXPECT_NONFATAL_FAILURE({
- EXPECT_CALL(a, DoA(2))
- .WillOnce(Return())
- .After(e);
- }, ".After() cannot appear after ");
-
- a.DoA(1);
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, WillIsOptional) {
- MockA a;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(2))
- .WillOnce(Return());
-
- a.DoA(1);
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, WillCanAppearMultipleTimes) {
- MockA a;
-
- EXPECT_CALL(a, DoA(1))
- .Times(AnyNumber())
- .WillOnce(Return())
- .WillOnce(Return())
- .WillOnce(Return());
-}
-
-TEST(ExpectCallSyntaxTest, WillMustBeBeforeWillRepeatedly) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .WillRepeatedly(Return())
- .WillOnce(Return());
- }, ".WillOnce() cannot appear after ");
-
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, WillRepeatedlyIsOptional) {
- MockA a;
-
- EXPECT_CALL(a, DoA(1))
- .WillOnce(Return());
- EXPECT_CALL(a, DoA(2))
- .WillOnce(Return())
- .WillRepeatedly(Return());
-
- a.DoA(1);
- a.DoA(2);
- a.DoA(2);
-}
-
-TEST(ExpectCallSyntaxTest, WillRepeatedlyCannotAppearMultipleTimes) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .WillRepeatedly(Return())
- .WillRepeatedly(Return());
- }, ".WillRepeatedly() cannot appear more than once in an "
- "EXPECT_CALL()");
-}
-
-TEST(ExpectCallSyntaxTest, WillRepeatedlyMustBeBeforeRetiresOnSaturation) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .RetiresOnSaturation()
- .WillRepeatedly(Return());
- }, ".WillRepeatedly() cannot appear after ");
-}
-
-TEST(ExpectCallSyntaxTest, RetiresOnSaturationIsOptional) {
- MockA a;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(1))
- .RetiresOnSaturation();
-
- a.DoA(1);
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, RetiresOnSaturationCannotAppearMultipleTimes) {
- MockA a;
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- EXPECT_CALL(a, DoA(1))
- .RetiresOnSaturation()
- .RetiresOnSaturation();
- }, ".RetiresOnSaturation() cannot appear more than once");
-
- a.DoA(1);
-}
-
-TEST(ExpectCallSyntaxTest, DefaultCardinalityIsOnce) {
- {
- MockA a;
- EXPECT_CALL(a, DoA(1));
- a.DoA(1);
- }
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- MockA a;
- EXPECT_CALL(a, DoA(1));
- }, "to be called once");
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- MockA a;
- EXPECT_CALL(a, DoA(1));
- a.DoA(1);
- a.DoA(1);
- }, "to be called once");
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that Google Mock doesn't print a warning when the number of
-// WillOnce() is adequate.
-TEST(ExpectCallSyntaxTest, DoesNotWarnOnAdequateActionCount) {
- CaptureStdout();
- {
- MockB b;
-
- // It's always fine to omit WillOnce() entirely.
- EXPECT_CALL(b, DoB())
- .Times(0);
- EXPECT_CALL(b, DoB(1))
- .Times(AtMost(1));
- EXPECT_CALL(b, DoB(2))
- .Times(1)
- .WillRepeatedly(Return(1));
-
- // It's fine for the number of WillOnce()s to equal the upper bound.
- EXPECT_CALL(b, DoB(3))
- .Times(Between(1, 2))
- .WillOnce(Return(1))
- .WillOnce(Return(2));
-
- // It's fine for the number of WillOnce()s to be smaller than the
- // upper bound when there is a WillRepeatedly().
- EXPECT_CALL(b, DoB(4))
- .Times(AtMost(3))
- .WillOnce(Return(1))
- .WillRepeatedly(Return(2));
-
- // Satisfies the above expectations.
- b.DoB(2);
- b.DoB(3);
- }
- EXPECT_STREQ("", GetCapturedStdout().c_str());
-}
-
-// Tests that Google Mock warns on having too many actions in an
-// expectation compared to its cardinality.
-TEST(ExpectCallSyntaxTest, WarnsOnTooManyActions) {
- CaptureStdout();
- {
- MockB b;
-
- // Warns when the number of WillOnce()s is larger than the upper bound.
- EXPECT_CALL(b, DoB())
- .Times(0)
- .WillOnce(Return(1)); // #1
- EXPECT_CALL(b, DoB())
- .Times(AtMost(1))
- .WillOnce(Return(1))
- .WillOnce(Return(2)); // #2
- EXPECT_CALL(b, DoB(1))
- .Times(1)
- .WillOnce(Return(1))
- .WillOnce(Return(2))
- .RetiresOnSaturation(); // #3
-
- // Warns when the number of WillOnce()s equals the upper bound and
- // there is a WillRepeatedly().
- EXPECT_CALL(b, DoB())
- .Times(0)
- .WillRepeatedly(Return(1)); // #4
- EXPECT_CALL(b, DoB(2))
- .Times(1)
- .WillOnce(Return(1))
- .WillRepeatedly(Return(2)); // #5
-
- // Satisfies the above expectations.
- b.DoB(1);
- b.DoB(2);
- }
- const String output = GetCapturedStdout();
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Too many actions specified in EXPECT_CALL(b, DoB())...\n"
- "Expected to be never called, but has 1 WillOnce().",
- output); // #1
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Too many actions specified in EXPECT_CALL(b, DoB())...\n"
- "Expected to be called at most once, "
- "but has 2 WillOnce()s.",
- output); // #2
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Too many actions specified in EXPECT_CALL(b, DoB(1))...\n"
- "Expected to be called once, but has 2 WillOnce()s.",
- output); // #3
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Too many actions specified in EXPECT_CALL(b, DoB())...\n"
- "Expected to be never called, but has 0 WillOnce()s "
- "and a WillRepeatedly().",
- output); // #4
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Too many actions specified in EXPECT_CALL(b, DoB(2))...\n"
- "Expected to be called once, but has 1 WillOnce() "
- "and a WillRepeatedly().",
- output); // #5
-}
-
-// Tests that Google Mock warns on having too few actions in an
-// expectation compared to its cardinality.
-TEST(ExpectCallSyntaxTest, WarnsOnTooFewActions) {
- MockB b;
-
- EXPECT_CALL(b, DoB())
- .Times(Between(2, 3))
- .WillOnce(Return(1));
-
- CaptureStdout();
- b.DoB();
- const String output = GetCapturedStdout();
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Too few actions specified in EXPECT_CALL(b, DoB())...\n"
- "Expected to be called between 2 and 3 times, "
- "but has only 1 WillOnce().",
- output);
- b.DoB();
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Tests the semantics of ON_CALL().
-
-// Tests that the built-in default action is taken when no ON_CALL()
-// is specified.
-TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCall) {
- MockB b;
- EXPECT_CALL(b, DoB());
-
- EXPECT_EQ(0, b.DoB());
-}
-
-// Tests that the built-in default action is taken when no ON_CALL()
-// matches the invocation.
-TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCallMatches) {
- MockB b;
- ON_CALL(b, DoB(1))
- .WillByDefault(Return(1));
- EXPECT_CALL(b, DoB(_));
-
- EXPECT_EQ(0, b.DoB(2));
-}
-
-// Tests that the last matching ON_CALL() action is taken.
-TEST(OnCallTest, PicksLastMatchingOnCall) {
- MockB b;
- ON_CALL(b, DoB(_))
- .WillByDefault(Return(3));
- ON_CALL(b, DoB(2))
- .WillByDefault(Return(2));
- ON_CALL(b, DoB(1))
- .WillByDefault(Return(1));
- EXPECT_CALL(b, DoB(_));
-
- EXPECT_EQ(2, b.DoB(2));
-}
-
-// Tests the semantics of EXPECT_CALL().
-
-// Tests that any call is allowed when no EXPECT_CALL() is specified.
-TEST(ExpectCallTest, AllowsAnyCallWhenNoSpec) {
- MockB b;
- EXPECT_CALL(b, DoB());
- // There is no expectation on DoB(int).
-
- b.DoB();
-
- // DoB(int) can be called any number of times.
- b.DoB(1);
- b.DoB(2);
-}
-
-// Tests that the last matching EXPECT_CALL() fires.
-TEST(ExpectCallTest, PicksLastMatchingExpectCall) {
- MockB b;
- EXPECT_CALL(b, DoB(_))
- .WillRepeatedly(Return(2));
- EXPECT_CALL(b, DoB(1))
- .WillRepeatedly(Return(1));
-
- EXPECT_EQ(1, b.DoB(1));
-}
-
-// Tests lower-bound violation.
-TEST(ExpectCallTest, CatchesTooFewCalls) {
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- MockB b;
- EXPECT_CALL(b, DoB(5))
- .Times(AtLeast(2));
-
- b.DoB(5);
- }, "Actual function call count doesn't match EXPECT_CALL(b, DoB(5))...\n"
- " Expected: to be called at least twice\n"
- " Actual: called once - unsatisfied and active");
-}
-
-// Tests that the cardinality can be inferred when no Times(...) is
-// specified.
-TEST(ExpectCallTest, InfersCardinalityWhenThereIsNoWillRepeatedly) {
- {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillOnce(Return(2));
-
- EXPECT_EQ(1, b.DoB());
- EXPECT_EQ(2, b.DoB());
- }
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillOnce(Return(2));
-
- EXPECT_EQ(1, b.DoB());
- }, "to be called twice");
-
- { // NOLINT
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillOnce(Return(2));
-
- EXPECT_EQ(1, b.DoB());
- EXPECT_EQ(2, b.DoB());
- EXPECT_NONFATAL_FAILURE(b.DoB(), "to be called twice");
- }
-}
-
-TEST(ExpectCallTest, InfersCardinality1WhenThereIsWillRepeatedly) {
- {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillRepeatedly(Return(2));
-
- EXPECT_EQ(1, b.DoB());
- }
-
- { // NOLINT
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillRepeatedly(Return(2));
-
- EXPECT_EQ(1, b.DoB());
- EXPECT_EQ(2, b.DoB());
- EXPECT_EQ(2, b.DoB());
- }
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillRepeatedly(Return(2));
- }, "to be called at least once");
-}
-
-// Tests that the n-th action is taken for the n-th matching
-// invocation.
-TEST(ExpectCallTest, NthMatchTakesNthAction) {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillOnce(Return(2))
- .WillOnce(Return(3));
-
- EXPECT_EQ(1, b.DoB());
- EXPECT_EQ(2, b.DoB());
- EXPECT_EQ(3, b.DoB());
-}
-
-// Tests that the WillRepeatedly() action is taken when the WillOnce(...)
-// list is exhausted.
-TEST(ExpectCallTest, TakesRepeatedActionWhenWillListIsExhausted) {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1))
- .WillRepeatedly(Return(2));
-
- EXPECT_EQ(1, b.DoB());
- EXPECT_EQ(2, b.DoB());
- EXPECT_EQ(2, b.DoB());
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that the default action is taken when the WillOnce(...) list is
-// exhausted and there is no WillRepeatedly().
-TEST(ExpectCallTest, TakesDefaultActionWhenWillListIsExhausted) {
- MockB b;
- EXPECT_CALL(b, DoB(_))
- .Times(1);
- EXPECT_CALL(b, DoB())
- .Times(AnyNumber())
- .WillOnce(Return(1))
- .WillOnce(Return(2));
-
- CaptureStdout();
- EXPECT_EQ(0, b.DoB(1)); // Shouldn't generate a warning as the
- // expectation has no action clause at all.
- EXPECT_EQ(1, b.DoB());
- EXPECT_EQ(2, b.DoB());
- const String output1 = GetCapturedStdout();
- EXPECT_STREQ("", output1.c_str());
-
- CaptureStdout();
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB());
- const String output2 = GetCapturedStdout();
- EXPECT_THAT(output2.c_str(),
- HasSubstr("Actions ran out in EXPECT_CALL(b, DoB())...\n"
- "Called 3 times, but only 2 WillOnce()s are specified"
- " - returning default value."));
- EXPECT_THAT(output2.c_str(),
- HasSubstr("Actions ran out in EXPECT_CALL(b, DoB())...\n"
- "Called 4 times, but only 2 WillOnce()s are specified"
- " - returning default value."));
-}
-
-TEST(FunctionMockerTest, ReportsExpectCallLocationForExhausedActions) {
- MockB b;
- std::string expect_call_location = FormatFileLocation(__FILE__, __LINE__ + 1);
- EXPECT_CALL(b, DoB()).Times(AnyNumber()).WillOnce(Return(1));
-
- EXPECT_EQ(1, b.DoB());
-
- CaptureStdout();
- EXPECT_EQ(0, b.DoB());
- const String output = GetCapturedStdout();
- // The warning message should contain the call location.
- EXPECT_PRED_FORMAT2(IsSubstring, expect_call_location, output);
-}
-
-TEST(FunctionMockerTest, ReportsDefaultActionLocationOfUninterestingCalls) {
- std::string on_call_location;
- CaptureStdout();
- {
- MockB b;
- on_call_location = FormatFileLocation(__FILE__, __LINE__ + 1);
- ON_CALL(b, DoB(_)).WillByDefault(Return(0));
- b.DoB(0);
- }
- EXPECT_PRED_FORMAT2(IsSubstring, on_call_location, GetCapturedStdout());
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that an uninteresting call performs the default action.
-TEST(UninterestingCallTest, DoesDefaultAction) {
- // When there is an ON_CALL() statement, the action specified by it
- // should be taken.
- MockA a;
- ON_CALL(a, Binary(_, _))
- .WillByDefault(Return(true));
- EXPECT_TRUE(a.Binary(1, 2));
-
- // When there is no ON_CALL(), the default value for the return type
- // should be returned.
- MockB b;
- EXPECT_EQ(0, b.DoB());
-}
-
-// Tests that an unexpected call performs the default action.
-TEST(UnexpectedCallTest, DoesDefaultAction) {
- // When there is an ON_CALL() statement, the action specified by it
- // should be taken.
- MockA a;
- ON_CALL(a, Binary(_, _))
- .WillByDefault(Return(true));
- EXPECT_CALL(a, Binary(0, 0));
- a.Binary(0, 0);
- bool result = false;
- EXPECT_NONFATAL_FAILURE(result = a.Binary(1, 2),
- "Unexpected mock function call");
- EXPECT_TRUE(result);
-
- // When there is no ON_CALL(), the default value for the return type
- // should be returned.
- MockB b;
- EXPECT_CALL(b, DoB(0))
- .Times(0);
- int n = -1;
- EXPECT_NONFATAL_FAILURE(n = b.DoB(1),
- "Unexpected mock function call");
- EXPECT_EQ(0, n);
-}
-
-// Tests that when an unexpected void function generates the right
-// failure message.
-TEST(UnexpectedCallTest, GeneratesFailureForVoidFunction) {
- // First, tests the message when there is only one EXPECT_CALL().
- MockA a1;
- EXPECT_CALL(a1, DoA(1));
- a1.DoA(1);
- // Ideally we should match the failure message against a regex, but
- // EXPECT_NONFATAL_FAILURE doesn't support that, so we test for
- // multiple sub-strings instead.
- EXPECT_NONFATAL_FAILURE(
- a1.DoA(9),
- "Unexpected mock function call - returning directly.\n"
- " Function call: DoA(9)\n"
- "Google Mock tried the following 1 expectation, but it didn't match:");
- EXPECT_NONFATAL_FAILURE(
- a1.DoA(9),
- " Expected arg #0: is equal to 1\n"
- " Actual: 9\n"
- " Expected: to be called once\n"
- " Actual: called once - saturated and active");
-
- // Next, tests the message when there are more than one EXPECT_CALL().
- MockA a2;
- EXPECT_CALL(a2, DoA(1));
- EXPECT_CALL(a2, DoA(3));
- a2.DoA(1);
- EXPECT_NONFATAL_FAILURE(
- a2.DoA(2),
- "Unexpected mock function call - returning directly.\n"
- " Function call: DoA(2)\n"
- "Google Mock tried the following 2 expectations, but none matched:");
- EXPECT_NONFATAL_FAILURE(
- a2.DoA(2),
- "tried expectation #0: EXPECT_CALL(a2, DoA(1))...\n"
- " Expected arg #0: is equal to 1\n"
- " Actual: 2\n"
- " Expected: to be called once\n"
- " Actual: called once - saturated and active");
- EXPECT_NONFATAL_FAILURE(
- a2.DoA(2),
- "tried expectation #1: EXPECT_CALL(a2, DoA(3))...\n"
- " Expected arg #0: is equal to 3\n"
- " Actual: 2\n"
- " Expected: to be called once\n"
- " Actual: never called - unsatisfied and active");
- a2.DoA(3);
-}
-
-// Tests that an unexpected non-void function generates the right
-// failure message.
-TEST(UnexpectedCallTest, GeneartesFailureForNonVoidFunction) {
- MockB b1;
- EXPECT_CALL(b1, DoB(1));
- b1.DoB(1);
- EXPECT_NONFATAL_FAILURE(
- b1.DoB(2),
- "Unexpected mock function call - returning default value.\n"
- " Function call: DoB(2)\n"
- " Returns: 0\n"
- "Google Mock tried the following 1 expectation, but it didn't match:");
- EXPECT_NONFATAL_FAILURE(
- b1.DoB(2),
- " Expected arg #0: is equal to 1\n"
- " Actual: 2\n"
- " Expected: to be called once\n"
- " Actual: called once - saturated and active");
-}
-
-// Tests that Google Mock explains that an retired expectation doesn't
-// match the call.
-TEST(UnexpectedCallTest, RetiredExpectation) {
- MockB b;
- EXPECT_CALL(b, DoB(1))
- .RetiresOnSaturation();
-
- b.DoB(1);
- EXPECT_NONFATAL_FAILURE(
- b.DoB(1),
- " Expected: the expectation is active\n"
- " Actual: it is retired");
-}
-
-// Tests that Google Mock explains that an expectation that doesn't
-// match the arguments doesn't match the call.
-TEST(UnexpectedCallTest, UnmatchedArguments) {
- MockB b;
- EXPECT_CALL(b, DoB(1));
-
- EXPECT_NONFATAL_FAILURE(
- b.DoB(2),
- " Expected arg #0: is equal to 1\n"
- " Actual: 2\n");
- b.DoB(1);
-}
-
-// Tests that Google Mock explains that an expectation with
-// unsatisfied pre-requisites doesn't match the call.
-TEST(UnexpectedCallTest, UnsatisifiedPrerequisites) {
- Sequence s1, s2;
- MockB b;
- EXPECT_CALL(b, DoB(1))
- .InSequence(s1);
- EXPECT_CALL(b, DoB(2))
- .Times(AnyNumber())
- .InSequence(s1);
- EXPECT_CALL(b, DoB(3))
- .InSequence(s2);
- EXPECT_CALL(b, DoB(4))
- .InSequence(s1, s2);
-
- ::testing::TestPartResultArray failures;
- {
- ::testing::ScopedFakeTestPartResultReporter reporter(&failures);
- b.DoB(4);
- // Now 'failures' contains the Google Test failures generated by
- // the above statement.
- }
-
- // There should be one non-fatal failure.
- ASSERT_EQ(1, failures.size());
- const ::testing::TestPartResult& r = failures.GetTestPartResult(0);
- EXPECT_EQ(::testing::TestPartResult::kNonFatalFailure, r.type());
-
- // Verifies that the failure message contains the two unsatisfied
- // pre-requisites but not the satisfied one.
-#if GTEST_USES_PCRE
- EXPECT_THAT(r.message(), ContainsRegex(
- // PCRE has trouble using (.|\n) to match any character, but
- // supports the (?s) prefix for using . to match any character.
- "(?s)the following immediate pre-requisites are not satisfied:\n"
- ".*: pre-requisite #0\n"
- ".*: pre-requisite #1"));
-#elif GTEST_USES_POSIX_RE
- EXPECT_THAT(r.message(), ContainsRegex(
- // POSIX RE doesn't understand the (?s) prefix, but has no trouble
- // with (.|\n).
- "the following immediate pre-requisites are not satisfied:\n"
- "(.|\n)*: pre-requisite #0\n"
- "(.|\n)*: pre-requisite #1"));
-#else
- // We can only use Google Test's own simple regex.
- EXPECT_THAT(r.message(), ContainsRegex(
- "the following immediate pre-requisites are not satisfied:"));
- EXPECT_THAT(r.message(), ContainsRegex(": pre-requisite #0"));
- EXPECT_THAT(r.message(), ContainsRegex(": pre-requisite #1"));
-#endif // GTEST_USES_PCRE
-
- b.DoB(1);
- b.DoB(3);
- b.DoB(4);
-}
-
-TEST(UndefinedReturnValueTest, ReturnValueIsMandatory) {
- MockA a;
- // TODO(wan@google.com): We should really verify the output message,
- // but we cannot yet due to that EXPECT_DEATH only captures stderr
- // while Google Mock logs to stdout.
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(1), "");
-}
-
-// Tests that an excessive call (one whose arguments match the
-// matchers but is called too many times) performs the default action.
-TEST(ExcessiveCallTest, DoesDefaultAction) {
- // When there is an ON_CALL() statement, the action specified by it
- // should be taken.
- MockA a;
- ON_CALL(a, Binary(_, _))
- .WillByDefault(Return(true));
- EXPECT_CALL(a, Binary(0, 0));
- a.Binary(0, 0);
- bool result = false;
- EXPECT_NONFATAL_FAILURE(result = a.Binary(0, 0),
- "Mock function called more times than expected");
- EXPECT_TRUE(result);
-
- // When there is no ON_CALL(), the default value for the return type
- // should be returned.
- MockB b;
- EXPECT_CALL(b, DoB(0))
- .Times(0);
- int n = -1;
- EXPECT_NONFATAL_FAILURE(n = b.DoB(0),
- "Mock function called more times than expected");
- EXPECT_EQ(0, n);
-}
-
-// Tests that when a void function is called too many times,
-// the failure message contains the argument values.
-TEST(ExcessiveCallTest, GeneratesFailureForVoidFunction) {
- MockA a;
- EXPECT_CALL(a, DoA(_))
- .Times(0);
- EXPECT_NONFATAL_FAILURE(
- a.DoA(9),
- "Mock function called more times than expected - returning directly.\n"
- " Function call: DoA(9)\n"
- " Expected: to be never called\n"
- " Actual: called once - over-saturated and active");
-}
-
-// Tests that when a non-void function is called too many times, the
-// failure message contains the argument values and the return value.
-TEST(ExcessiveCallTest, GeneratesFailureForNonVoidFunction) {
- MockB b;
- EXPECT_CALL(b, DoB(_));
- b.DoB(1);
- EXPECT_NONFATAL_FAILURE(
- b.DoB(2),
- "Mock function called more times than expected - "
- "returning default value.\n"
- " Function call: DoB(2)\n"
- " Returns: 0\n"
- " Expected: to be called once\n"
- " Actual: called twice - over-saturated and active");
-}
-
-// Tests using sequences.
-
-TEST(InSequenceTest, AllExpectationInScopeAreInSequence) {
- MockA a;
- {
- InSequence dummy;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(2));
- }
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- a.DoA(2);
- }, "Unexpected mock function call");
-
- a.DoA(1);
- a.DoA(2);
-}
-
-TEST(InSequenceTest, NestedInSequence) {
- MockA a;
- {
- InSequence dummy;
-
- EXPECT_CALL(a, DoA(1));
- {
- InSequence dummy2;
-
- EXPECT_CALL(a, DoA(2));
- EXPECT_CALL(a, DoA(3));
- }
- }
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- a.DoA(1);
- a.DoA(3);
- }, "Unexpected mock function call");
-
- a.DoA(2);
- a.DoA(3);
-}
-
-TEST(InSequenceTest, ExpectationsOutOfScopeAreNotAffected) {
- MockA a;
- {
- InSequence dummy;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(2));
- }
- EXPECT_CALL(a, DoA(3));
-
- EXPECT_NONFATAL_FAILURE({ // NOLINT
- a.DoA(2);
- }, "Unexpected mock function call");
-
- a.DoA(3);
- a.DoA(1);
- a.DoA(2);
-}
-
-// Tests that any order is allowed when no sequence is used.
-TEST(SequenceTest, AnyOrderIsOkByDefault) {
- {
- MockA a;
- MockB b;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(b, DoB())
- .Times(AnyNumber());
-
- a.DoA(1);
- b.DoB();
- }
-
- { // NOLINT
- MockA a;
- MockB b;
-
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(b, DoB())
- .Times(AnyNumber());
-
- b.DoB();
- a.DoA(1);
- }
-}
-
-// Tests that the calls must be in strict order when a complete order
-// is specified.
-TEST(SequenceTest, CallsMustBeInStrictOrderWhenSaidSo) {
- MockA a;
- Sequence s;
-
- EXPECT_CALL(a, ReturnResult(1))
- .InSequence(s)
- .WillOnce(Return(Result()));
-
- EXPECT_CALL(a, ReturnResult(2))
- .InSequence(s)
- .WillOnce(Return(Result()));
-
- EXPECT_CALL(a, ReturnResult(3))
- .InSequence(s)
- .WillOnce(Return(Result()));
-
- EXPECT_DEATH_IF_SUPPORTED({
- a.ReturnResult(1);
- a.ReturnResult(3);
- a.ReturnResult(2);
- }, "");
-
- EXPECT_DEATH_IF_SUPPORTED({
- a.ReturnResult(2);
- a.ReturnResult(1);
- a.ReturnResult(3);
- }, "");
-
- a.ReturnResult(1);
- a.ReturnResult(2);
- a.ReturnResult(3);
-}
-
-// Tests specifying a DAG using multiple sequences.
-TEST(SequenceTest, CallsMustConformToSpecifiedDag) {
- MockA a;
- MockB b;
- Sequence x, y;
-
- EXPECT_CALL(a, ReturnResult(1))
- .InSequence(x)
- .WillOnce(Return(Result()));
-
- EXPECT_CALL(b, DoB())
- .Times(2)
- .InSequence(y);
-
- EXPECT_CALL(a, ReturnResult(2))
- .InSequence(x, y)
- .WillRepeatedly(Return(Result()));
-
- EXPECT_CALL(a, ReturnResult(3))
- .InSequence(x)
- .WillOnce(Return(Result()));
-
- EXPECT_DEATH_IF_SUPPORTED({
- a.ReturnResult(1);
- b.DoB();
- a.ReturnResult(2);
- }, "");
-
- EXPECT_DEATH_IF_SUPPORTED({
- a.ReturnResult(2);
- }, "");
-
- EXPECT_DEATH_IF_SUPPORTED({
- a.ReturnResult(3);
- }, "");
-
- EXPECT_DEATH_IF_SUPPORTED({
- a.ReturnResult(1);
- b.DoB();
- b.DoB();
- a.ReturnResult(3);
- a.ReturnResult(2);
- }, "");
-
- b.DoB();
- a.ReturnResult(1);
- b.DoB();
- a.ReturnResult(3);
-}
-
-TEST(SequenceTest, Retirement) {
- MockA a;
- Sequence s;
-
- EXPECT_CALL(a, DoA(1))
- .InSequence(s);
- EXPECT_CALL(a, DoA(_))
- .InSequence(s)
- .RetiresOnSaturation();
- EXPECT_CALL(a, DoA(1))
- .InSequence(s);
-
- a.DoA(1);
- a.DoA(2);
- a.DoA(1);
-}
-
-// Tests Expectation.
-
-TEST(ExpectationTest, ConstrutorsWork) {
- MockA a;
- Expectation e1; // Default ctor.
-
- // Ctor from various forms of EXPECT_CALL.
- Expectation e2 = EXPECT_CALL(a, DoA(2));
- Expectation e3 = EXPECT_CALL(a, DoA(3)).With(_);
- {
- Sequence s;
- Expectation e4 = EXPECT_CALL(a, DoA(4)).Times(1);
- Expectation e5 = EXPECT_CALL(a, DoA(5)).InSequence(s);
- }
- Expectation e6 = EXPECT_CALL(a, DoA(6)).After(e2);
- Expectation e7 = EXPECT_CALL(a, DoA(7)).WillOnce(Return());
- Expectation e8 = EXPECT_CALL(a, DoA(8)).WillRepeatedly(Return());
- Expectation e9 = EXPECT_CALL(a, DoA(9)).RetiresOnSaturation();
-
- Expectation e10 = e2; // Copy ctor.
-
- EXPECT_THAT(e1, Ne(e2));
- EXPECT_THAT(e2, Eq(e10));
-
- a.DoA(2);
- a.DoA(3);
- a.DoA(4);
- a.DoA(5);
- a.DoA(6);
- a.DoA(7);
- a.DoA(8);
- a.DoA(9);
-}
-
-TEST(ExpectationTest, AssignmentWorks) {
- MockA a;
- Expectation e1;
- Expectation e2 = EXPECT_CALL(a, DoA(1));
-
- EXPECT_THAT(e1, Ne(e2));
-
- e1 = e2;
- EXPECT_THAT(e1, Eq(e2));
-
- a.DoA(1);
-}
-
-// Tests ExpectationSet.
-
-TEST(ExpectationSetTest, MemberTypesAreCorrect) {
- ::testing::StaticAssertTypeEq<Expectation, ExpectationSet::value_type>();
-}
-
-TEST(ExpectationSetTest, ConstructorsWork) {
- MockA a;
-
- Expectation e1;
- const Expectation e2;
- ExpectationSet es1; // Default ctor.
- ExpectationSet es2 = EXPECT_CALL(a, DoA(1)); // Ctor from EXPECT_CALL.
- ExpectationSet es3 = e1; // Ctor from Expectation.
- ExpectationSet es4(e1); // Ctor from Expectation; alternative syntax.
- ExpectationSet es5 = e2; // Ctor from const Expectation.
- ExpectationSet es6(e2); // Ctor from const Expectation; alternative syntax.
- ExpectationSet es7 = es2; // Copy ctor.
-
- EXPECT_EQ(0, es1.size());
- EXPECT_EQ(1, es2.size());
- EXPECT_EQ(1, es3.size());
- EXPECT_EQ(1, es4.size());
- EXPECT_EQ(1, es5.size());
- EXPECT_EQ(1, es6.size());
- EXPECT_EQ(1, es7.size());
-
- EXPECT_THAT(es3, Ne(es2));
- EXPECT_THAT(es4, Eq(es3));
- EXPECT_THAT(es5, Eq(es4));
- EXPECT_THAT(es6, Eq(es5));
- EXPECT_THAT(es7, Eq(es2));
- a.DoA(1);
-}
-
-TEST(ExpectationSetTest, AssignmentWorks) {
- ExpectationSet es1;
- ExpectationSet es2 = Expectation();
-
- es1 = es2;
- EXPECT_EQ(1, es1.size());
- EXPECT_THAT(*(es1.begin()), Eq(Expectation()));
- EXPECT_THAT(es1, Eq(es2));
-}
-
-TEST(ExpectationSetTest, InsertionWorks) {
- ExpectationSet es1;
- Expectation e1;
- es1 += e1;
- EXPECT_EQ(1, es1.size());
- EXPECT_THAT(*(es1.begin()), Eq(e1));
-
- MockA a;
- Expectation e2 = EXPECT_CALL(a, DoA(1));
- es1 += e2;
- EXPECT_EQ(2, es1.size());
-
- ExpectationSet::const_iterator it1 = es1.begin();
- ExpectationSet::const_iterator it2 = it1;
- ++it2;
- EXPECT_TRUE(*it1 == e1 || *it2 == e1); // e1 must be in the set.
- EXPECT_TRUE(*it1 == e2 || *it2 == e2); // e2 must be in the set too.
- a.DoA(1);
-}
-
-TEST(ExpectationSetTest, SizeWorks) {
- ExpectationSet es;
- EXPECT_EQ(0, es.size());
-
- es += Expectation();
- EXPECT_EQ(1, es.size());
-
- MockA a;
- es += EXPECT_CALL(a, DoA(1));
- EXPECT_EQ(2, es.size());
-
- a.DoA(1);
-}
-
-TEST(ExpectationSetTest, IsEnumerable) {
- ExpectationSet es;
- EXPECT_THAT(es.begin(), Eq(es.end()));
-
- es += Expectation();
- ExpectationSet::const_iterator it = es.begin();
- EXPECT_THAT(it, Ne(es.end()));
- EXPECT_THAT(*it, Eq(Expectation()));
- ++it;
- EXPECT_THAT(it, Eq(es.end()));
-}
-
-// Tests the .After() clause.
-
-TEST(AfterTest, SucceedsWhenPartialOrderIsSatisfied) {
- MockA a;
- ExpectationSet es;
- es += EXPECT_CALL(a, DoA(1));
- es += EXPECT_CALL(a, DoA(2));
- EXPECT_CALL(a, DoA(3))
- .After(es);
-
- a.DoA(1);
- a.DoA(2);
- a.DoA(3);
-}
-
-TEST(AfterTest, SucceedsWhenTotalOrderIsSatisfied) {
- MockA a;
- MockB b;
- // The following also verifies that const Expectation objects work
- // too. Do not remove the const modifiers.
- const Expectation e1 = EXPECT_CALL(a, DoA(1));
- const Expectation e2 = EXPECT_CALL(b, DoB())
- .Times(2)
- .After(e1);
- EXPECT_CALL(a, DoA(2)).After(e2);
-
- a.DoA(1);
- b.DoB();
- b.DoB();
- a.DoA(2);
-}
-
-// Calls must be in strict order when specified so.
-TEST(AfterDeathTest, CallsMustBeInStrictOrderWhenSpecifiedSo) {
- MockA a;
- MockB b;
- Expectation e1 = EXPECT_CALL(a, DoA(1));
- Expectation e2 = EXPECT_CALL(b, DoB())
- .Times(2)
- .After(e1);
- EXPECT_CALL(a, ReturnResult(2))
- .After(e2)
- .WillOnce(Return(Result()));
-
- a.DoA(1);
- // If a call to ReturnResult() violates the specified order, no
- // matching expectation will be found, and thus the default action
- // will be done. Since the return type of ReturnResult() is not a
- // built-in type, gmock won't know what to return and will thus
- // abort the program. Therefore a death test can tell us whether
- // gmock catches the order violation correctly.
- //
- // gtest and gmock print messages to stdout, which isn't captured by
- // death tests. Therefore we have to match with an empty regular
- // expression in all the EXPECT_DEATH()s.
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(2), "");
-
- b.DoB();
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(2), "");
-
- b.DoB();
- a.ReturnResult(2);
-}
-
-// Calls must satisfy the partial order when specified so.
-TEST(AfterDeathTest, CallsMustSatisfyPartialOrderWhenSpecifiedSo) {
- MockA a;
- Expectation e = EXPECT_CALL(a, DoA(1));
- const ExpectationSet es = EXPECT_CALL(a, DoA(2));
- EXPECT_CALL(a, ReturnResult(3))
- .After(e, es)
- .WillOnce(Return(Result()));
-
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(3), "");
-
- a.DoA(2);
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(3), "");
-
- a.DoA(1);
- a.ReturnResult(3);
-}
-
-// .After() can be combined with .InSequence().
-TEST(AfterDeathTest, CanBeUsedWithInSequence) {
- MockA a;
- Sequence s;
- Expectation e = EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(2)).InSequence(s);
- EXPECT_CALL(a, ReturnResult(3))
- .InSequence(s).After(e)
- .WillOnce(Return(Result()));
-
- a.DoA(1);
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(3), "");
-
- a.DoA(2);
- a.ReturnResult(3);
-}
-
-// .After() can be called multiple times.
-TEST(AfterTest, CanBeCalledManyTimes) {
- MockA a;
- Expectation e1 = EXPECT_CALL(a, DoA(1));
- Expectation e2 = EXPECT_CALL(a, DoA(2));
- Expectation e3 = EXPECT_CALL(a, DoA(3));
- EXPECT_CALL(a, DoA(4))
- .After(e1)
- .After(e2)
- .After(e3);
-
- a.DoA(3);
- a.DoA(1);
- a.DoA(2);
- a.DoA(4);
-}
-
-// .After() accepts up to 5 arguments.
-TEST(AfterTest, AcceptsUpToFiveArguments) {
- MockA a;
- Expectation e1 = EXPECT_CALL(a, DoA(1));
- Expectation e2 = EXPECT_CALL(a, DoA(2));
- Expectation e3 = EXPECT_CALL(a, DoA(3));
- ExpectationSet es1 = EXPECT_CALL(a, DoA(4));
- ExpectationSet es2 = EXPECT_CALL(a, DoA(5));
- EXPECT_CALL(a, DoA(6))
- .After(e1, e2, e3, es1, es2);
-
- a.DoA(5);
- a.DoA(2);
- a.DoA(4);
- a.DoA(1);
- a.DoA(3);
- a.DoA(6);
-}
-
-// .After() allows input to contain duplicated Expectations.
-TEST(AfterTest, AcceptsDuplicatedInput) {
- MockA a;
- Expectation e1 = EXPECT_CALL(a, DoA(1));
- Expectation e2 = EXPECT_CALL(a, DoA(2));
- ExpectationSet es;
- es += e1;
- es += e2;
- EXPECT_CALL(a, ReturnResult(3))
- .After(e1, e2, es, e1)
- .WillOnce(Return(Result()));
-
- a.DoA(1);
- EXPECT_DEATH_IF_SUPPORTED(a.ReturnResult(3), "");
-
- a.DoA(2);
- a.ReturnResult(3);
-}
-
-// An Expectation added to an ExpectationSet after it has been used in
-// an .After() has no effect.
-TEST(AfterTest, ChangesToExpectationSetHaveNoEffectAfterwards) {
- MockA a;
- ExpectationSet es1 = EXPECT_CALL(a, DoA(1));
- Expectation e2 = EXPECT_CALL(a, DoA(2));
- EXPECT_CALL(a, DoA(3))
- .After(es1);
- es1 += e2;
-
- a.DoA(1);
- a.DoA(3);
- a.DoA(2);
-}
-
-// Tests that Google Mock correctly handles calls to mock functions
-// after a mock object owning one of their pre-requisites has died.
-
-// Tests that calls that satisfy the original spec are successful.
-TEST(DeletingMockEarlyTest, Success1) {
- MockB* const b1 = new MockB;
- MockA* const a = new MockA;
- MockB* const b2 = new MockB;
-
- {
- InSequence dummy;
- EXPECT_CALL(*b1, DoB(_))
- .WillOnce(Return(1));
- EXPECT_CALL(*a, Binary(_, _))
- .Times(AnyNumber())
- .WillRepeatedly(Return(true));
- EXPECT_CALL(*b2, DoB(_))
- .Times(AnyNumber())
- .WillRepeatedly(Return(2));
- }
-
- EXPECT_EQ(1, b1->DoB(1));
- delete b1;
- // a's pre-requisite has died.
- EXPECT_TRUE(a->Binary(0, 1));
- delete b2;
- // a's successor has died.
- EXPECT_TRUE(a->Binary(1, 2));
- delete a;
-}
-
-// Tests that calls that satisfy the original spec are successful.
-TEST(DeletingMockEarlyTest, Success2) {
- MockB* const b1 = new MockB;
- MockA* const a = new MockA;
- MockB* const b2 = new MockB;
-
- {
- InSequence dummy;
- EXPECT_CALL(*b1, DoB(_))
- .WillOnce(Return(1));
- EXPECT_CALL(*a, Binary(_, _))
- .Times(AnyNumber());
- EXPECT_CALL(*b2, DoB(_))
- .Times(AnyNumber())
- .WillRepeatedly(Return(2));
- }
-
- delete a; // a is trivially satisfied.
- EXPECT_EQ(1, b1->DoB(1));
- EXPECT_EQ(2, b2->DoB(2));
- delete b1;
- delete b2;
-}
-
-// Tests that it's OK to delete a mock object itself in its action.
-
-// Suppresses warning on unreferenced formal parameter in MSVC with
-// -W4.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-ACTION_P(Delete, ptr) { delete ptr; }
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningVoid) {
- MockA* const a = new MockA;
- EXPECT_CALL(*a, DoA(_)).WillOnce(Delete(a));
- a->DoA(42); // This will cause a to be deleted.
-}
-
-TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningValue) {
- MockA* const a = new MockA;
- EXPECT_CALL(*a, ReturnResult(_))
- .WillOnce(DoAll(Delete(a), Return(Result())));
- a->ReturnResult(42); // This will cause a to be deleted.
-}
-
-// Tests that calls that violate the original spec yield failures.
-TEST(DeletingMockEarlyTest, Failure1) {
- MockB* const b1 = new MockB;
- MockA* const a = new MockA;
- MockB* const b2 = new MockB;
-
- {
- InSequence dummy;
- EXPECT_CALL(*b1, DoB(_))
- .WillOnce(Return(1));
- EXPECT_CALL(*a, Binary(_, _))
- .Times(AnyNumber());
- EXPECT_CALL(*b2, DoB(_))
- .Times(AnyNumber())
- .WillRepeatedly(Return(2));
- }
-
- delete a; // a is trivially satisfied.
- EXPECT_NONFATAL_FAILURE({
- b2->DoB(2);
- }, "Unexpected mock function call");
- EXPECT_EQ(1, b1->DoB(1));
- delete b1;
- delete b2;
-}
-
-// Tests that calls that violate the original spec yield failures.
-TEST(DeletingMockEarlyTest, Failure2) {
- MockB* const b1 = new MockB;
- MockA* const a = new MockA;
- MockB* const b2 = new MockB;
-
- {
- InSequence dummy;
- EXPECT_CALL(*b1, DoB(_));
- EXPECT_CALL(*a, Binary(_, _))
- .Times(AnyNumber());
- EXPECT_CALL(*b2, DoB(_))
- .Times(AnyNumber());
- }
-
- EXPECT_NONFATAL_FAILURE(delete b1,
- "Actual: never called");
- EXPECT_NONFATAL_FAILURE(a->Binary(0, 1),
- "Unexpected mock function call");
- EXPECT_NONFATAL_FAILURE(b2->DoB(1),
- "Unexpected mock function call");
- delete a;
- delete b2;
-}
-
-class EvenNumberCardinality : public CardinalityInterface {
- public:
- // Returns true iff call_count calls will satisfy this cardinality.
- virtual bool IsSatisfiedByCallCount(int call_count) const {
- return call_count % 2 == 0;
- }
-
- // Returns true iff call_count calls will saturate this cardinality.
- virtual bool IsSaturatedByCallCount(int /* call_count */) const {
- return false;
- }
-
- // Describes self to an ostream.
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "called even number of times";
- }
-};
-
-Cardinality EvenNumber() {
- return Cardinality(new EvenNumberCardinality);
-}
-
-TEST(ExpectationBaseTest,
- AllPrerequisitesAreSatisfiedWorksForNonMonotonicCardinality) {
- MockA* a = new MockA;
- Sequence s;
-
- EXPECT_CALL(*a, DoA(1))
- .Times(EvenNumber())
- .InSequence(s);
- EXPECT_CALL(*a, DoA(2))
- .Times(AnyNumber())
- .InSequence(s);
- EXPECT_CALL(*a, DoA(3))
- .Times(AnyNumber());
-
- a->DoA(3);
- a->DoA(1);
- EXPECT_NONFATAL_FAILURE(a->DoA(2), "Unexpected mock function call");
- EXPECT_NONFATAL_FAILURE(delete a, "to be called even number of times");
-}
-
-// The following tests verify the message generated when a mock
-// function is called.
-
-struct Printable {
-};
-
-inline void operator<<(::std::ostream& os, const Printable&) {
- os << "Printable";
-}
-
-struct Unprintable {
- Unprintable() : value(0) {}
- int value;
-};
-
-class MockC {
- public:
- MockC() {}
-
- MOCK_METHOD6(VoidMethod, void(bool cond, int n, string s, void* p,
- const Printable& x, Unprintable y));
- MOCK_METHOD0(NonVoidMethod, int()); // NOLINT
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockC);
-};
-
-class VerboseFlagPreservingFixture : public testing::Test {
- protected:
- // The code needs to work when both ::string and ::std::string are defined
- // and the flag is implemented as a testing::internal::String. In this
- // case, without the call to c_str(), the compiler will complain that it
- // cannot figure out what overload of string constructor to use.
- // TODO(vladl@google.com): Use internal::string instead of String for
- // string flags in Google Test.
- VerboseFlagPreservingFixture()
- : saved_verbose_flag_(GMOCK_FLAG(verbose).c_str()) {}
-
- ~VerboseFlagPreservingFixture() { GMOCK_FLAG(verbose) = saved_verbose_flag_; }
-
- private:
- const string saved_verbose_flag_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(VerboseFlagPreservingFixture);
-};
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that an uninteresting mock function call generates a warning
-// containing the stack trace.
-TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) {
- MockC c;
- CaptureStdout();
- c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable());
- const String output = GetCapturedStdout();
- EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output);
- EXPECT_PRED_FORMAT2(IsSubstring, "Stack trace:", output);
-
-# ifndef NDEBUG
-
- // We check the stack trace content in dbg-mode only, as opt-mode
- // may inline the call we are interested in seeing.
-
- // Verifies that a void mock function's name appears in the stack
- // trace.
- EXPECT_PRED_FORMAT2(IsSubstring, "VoidMethod(", output);
-
- // Verifies that a non-void mock function's name appears in the
- // stack trace.
- CaptureStdout();
- c.NonVoidMethod();
- const String output2 = GetCapturedStdout();
- EXPECT_PRED_FORMAT2(IsSubstring, "NonVoidMethod(", output2);
-
-# endif // NDEBUG
-}
-
-// Tests that an uninteresting mock function call causes the function
-// arguments and return value to be printed.
-TEST(FunctionCallMessageTest, UninterestingCallPrintsArgumentsAndReturnValue) {
- // A non-void mock function.
- MockB b;
- CaptureStdout();
- b.DoB();
- const String output1 = GetCapturedStdout();
- EXPECT_PRED_FORMAT2(
- IsSubstring,
- "Uninteresting mock function call - returning default value.\n"
- " Function call: DoB()\n"
- " Returns: 0\n", output1.c_str());
- // Makes sure the return value is printed.
-
- // A void mock function.
- MockC c;
- CaptureStdout();
- c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable());
- const String output2 = GetCapturedStdout();
- EXPECT_THAT(output2.c_str(),
- ContainsRegex(
- "Uninteresting mock function call - returning directly\\.\n"
- " Function call: VoidMethod"
- "\\(false, 5, \"Hi\", NULL, @.+ "
- "Printable, 4-byte object <00-00 00-00>\\)"));
- // A void function has no return value to print.
-}
-
-// Tests how the --gmock_verbose flag affects Google Mock's output.
-
-class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
- public:
- // Verifies that the given Google Mock output is correct. (When
- // should_print is true, the output should match the given regex and
- // contain the given function name in the stack trace. When it's
- // false, the output should be empty.)
- void VerifyOutput(const String& output, bool should_print,
- const string& expected_substring,
- const string& function_name) {
- if (should_print) {
- EXPECT_THAT(output.c_str(), HasSubstr(expected_substring));
-# ifndef NDEBUG
- // We check the stack trace content in dbg-mode only, as opt-mode
- // may inline the call we are interested in seeing.
- EXPECT_THAT(output.c_str(), HasSubstr(function_name));
-# else
- // Suppresses 'unused function parameter' warnings.
- static_cast<void>(function_name);
-# endif // NDEBUG
- } else {
- EXPECT_STREQ("", output.c_str());
- }
- }
-
- // Tests how the flag affects expected calls.
- void TestExpectedCall(bool should_print) {
- MockA a;
- EXPECT_CALL(a, DoA(5));
- EXPECT_CALL(a, Binary(_, 1))
- .WillOnce(Return(true));
-
- // A void-returning function.
- CaptureStdout();
- a.DoA(5);
- VerifyOutput(
- GetCapturedStdout(),
- should_print,
- "Mock function call matches EXPECT_CALL(a, DoA(5))...\n"
- " Function call: DoA(5)\n"
- "Stack trace:\n",
- "DoA");
-
- // A non-void-returning function.
- CaptureStdout();
- a.Binary(2, 1);
- VerifyOutput(
- GetCapturedStdout(),
- should_print,
- "Mock function call matches EXPECT_CALL(a, Binary(_, 1))...\n"
- " Function call: Binary(2, 1)\n"
- " Returns: true\n"
- "Stack trace:\n",
- "Binary");
- }
-
- // Tests how the flag affects uninteresting calls.
- void TestUninterestingCall(bool should_print) {
- MockA a;
-
- // A void-returning function.
- CaptureStdout();
- a.DoA(5);
- VerifyOutput(
- GetCapturedStdout(),
- should_print,
- "\nGMOCK WARNING:\n"
- "Uninteresting mock function call - returning directly.\n"
- " Function call: DoA(5)\n"
- "Stack trace:\n",
- "DoA");
-
- // A non-void-returning function.
- CaptureStdout();
- a.Binary(2, 1);
- VerifyOutput(
- GetCapturedStdout(),
- should_print,
- "\nGMOCK WARNING:\n"
- "Uninteresting mock function call - returning default value.\n"
- " Function call: Binary(2, 1)\n"
- " Returns: false\n"
- "Stack trace:\n",
- "Binary");
- }
-};
-
-// Tests that --gmock_verbose=info causes both expected and
-// uninteresting calls to be reported.
-TEST_F(GMockVerboseFlagTest, Info) {
- GMOCK_FLAG(verbose) = kInfoVerbosity;
- TestExpectedCall(true);
- TestUninterestingCall(true);
-}
-
-// Tests that --gmock_verbose=warning causes uninteresting calls to be
-// reported.
-TEST_F(GMockVerboseFlagTest, Warning) {
- GMOCK_FLAG(verbose) = kWarningVerbosity;
- TestExpectedCall(false);
- TestUninterestingCall(true);
-}
-
-// Tests that --gmock_verbose=warning causes neither expected nor
-// uninteresting calls to be reported.
-TEST_F(GMockVerboseFlagTest, Error) {
- GMOCK_FLAG(verbose) = kErrorVerbosity;
- TestExpectedCall(false);
- TestUninterestingCall(false);
-}
-
-// Tests that --gmock_verbose=SOME_INVALID_VALUE has the same effect
-// as --gmock_verbose=warning.
-TEST_F(GMockVerboseFlagTest, InvalidFlagIsTreatedAsWarning) {
- GMOCK_FLAG(verbose) = "invalid"; // Treated as "warning".
- TestExpectedCall(false);
- TestUninterestingCall(true);
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// A helper class that generates a failure when printed. We use it to
-// ensure that Google Mock doesn't print a value (even to an internal
-// buffer) when it is not supposed to do so.
-class PrintMeNot {};
-
-void PrintTo(PrintMeNot /* dummy */, ::std::ostream* /* os */) {
- ADD_FAILURE() << "Google Mock is printing a value that shouldn't be "
- << "printed even to an internal buffer.";
-}
-
-class LogTestHelper {
- public:
- LogTestHelper() {}
-
- MOCK_METHOD1(Foo, PrintMeNot(PrintMeNot));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(LogTestHelper);
-};
-
-class GMockLogTest : public VerboseFlagPreservingFixture {
- protected:
- LogTestHelper helper_;
-};
-
-TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsWarning) {
- GMOCK_FLAG(verbose) = kWarningVerbosity;
- EXPECT_CALL(helper_, Foo(_))
- .WillOnce(Return(PrintMeNot()));
- helper_.Foo(PrintMeNot()); // This is an expected call.
-}
-
-TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsError) {
- GMOCK_FLAG(verbose) = kErrorVerbosity;
- EXPECT_CALL(helper_, Foo(_))
- .WillOnce(Return(PrintMeNot()));
- helper_.Foo(PrintMeNot()); // This is an expected call.
-}
-
-TEST_F(GMockLogTest, DoesNotPrintWarningInternallyIfVerbosityIsError) {
- GMOCK_FLAG(verbose) = kErrorVerbosity;
- ON_CALL(helper_, Foo(_))
- .WillByDefault(Return(PrintMeNot()));
- helper_.Foo(PrintMeNot()); // This should generate a warning.
-}
-
-// Tests Mock::AllowLeak().
-
-TEST(AllowLeakTest, AllowsLeakingUnusedMockObject) {
- MockA* a = new MockA;
- Mock::AllowLeak(a);
-}
-
-TEST(AllowLeakTest, CanBeCalledBeforeOnCall) {
- MockA* a = new MockA;
- Mock::AllowLeak(a);
- ON_CALL(*a, DoA(_)).WillByDefault(Return());
- a->DoA(0);
-}
-
-TEST(AllowLeakTest, CanBeCalledAfterOnCall) {
- MockA* a = new MockA;
- ON_CALL(*a, DoA(_)).WillByDefault(Return());
- Mock::AllowLeak(a);
-}
-
-TEST(AllowLeakTest, CanBeCalledBeforeExpectCall) {
- MockA* a = new MockA;
- Mock::AllowLeak(a);
- EXPECT_CALL(*a, DoA(_));
- a->DoA(0);
-}
-
-TEST(AllowLeakTest, CanBeCalledAfterExpectCall) {
- MockA* a = new MockA;
- EXPECT_CALL(*a, DoA(_)).Times(AnyNumber());
- Mock::AllowLeak(a);
-}
-
-TEST(AllowLeakTest, WorksWhenBothOnCallAndExpectCallArePresent) {
- MockA* a = new MockA;
- ON_CALL(*a, DoA(_)).WillByDefault(Return());
- EXPECT_CALL(*a, DoA(_)).Times(AnyNumber());
- Mock::AllowLeak(a);
-}
-
-// Tests that we can verify and clear a mock object's expectations
-// when none of its methods has expectations.
-TEST(VerifyAndClearExpectationsTest, NoMethodHasExpectations) {
- MockB b;
- ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can verify and clear a mock object's expectations
-// when some, but not all, of its methods have expectations *and* the
-// verification succeeds.
-TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndSucceed) {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1));
- b.DoB();
- ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can verify and clear a mock object's expectations
-// when some, but not all, of its methods have expectations *and* the
-// verification fails.
-TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndFail) {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1));
- bool result = true;
- EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b),
- "Actual: never called");
- ASSERT_FALSE(result);
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can verify and clear a mock object's expectations
-// when all of its methods have expectations.
-TEST(VerifyAndClearExpectationsTest, AllMethodsHaveExpectations) {
- MockB b;
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(1));
- EXPECT_CALL(b, DoB(_))
- .WillOnce(Return(2));
- b.DoB();
- b.DoB(1);
- ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can verify and clear a mock object's expectations
-// when a method has more than one expectation.
-TEST(VerifyAndClearExpectationsTest, AMethodHasManyExpectations) {
- MockB b;
- EXPECT_CALL(b, DoB(0))
- .WillOnce(Return(1));
- EXPECT_CALL(b, DoB(_))
- .WillOnce(Return(2));
- b.DoB(1);
- bool result = true;
- EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b),
- "Actual: never called");
- ASSERT_FALSE(result);
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can call VerifyAndClearExpectations() on the same
-// mock object multiple times.
-TEST(VerifyAndClearExpectationsTest, CanCallManyTimes) {
- MockB b;
- EXPECT_CALL(b, DoB());
- b.DoB();
- Mock::VerifyAndClearExpectations(&b);
-
- EXPECT_CALL(b, DoB(_))
- .WillOnce(Return(1));
- b.DoB(1);
- Mock::VerifyAndClearExpectations(&b);
- Mock::VerifyAndClearExpectations(&b);
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can clear a mock object's default actions when none
-// of its methods has default actions.
-TEST(VerifyAndClearTest, NoMethodHasDefaultActions) {
- MockB b;
- // If this crashes or generates a failure, the test will catch it.
- Mock::VerifyAndClear(&b);
- EXPECT_EQ(0, b.DoB());
-}
-
-// Tests that we can clear a mock object's default actions when some,
-// but not all of its methods have default actions.
-TEST(VerifyAndClearTest, SomeMethodsHaveDefaultActions) {
- MockB b;
- ON_CALL(b, DoB())
- .WillByDefault(Return(1));
-
- Mock::VerifyAndClear(&b);
-
- // Verifies that the default action of int DoB() was removed.
- EXPECT_EQ(0, b.DoB());
-}
-
-// Tests that we can clear a mock object's default actions when all of
-// its methods have default actions.
-TEST(VerifyAndClearTest, AllMethodsHaveDefaultActions) {
- MockB b;
- ON_CALL(b, DoB())
- .WillByDefault(Return(1));
- ON_CALL(b, DoB(_))
- .WillByDefault(Return(2));
-
- Mock::VerifyAndClear(&b);
-
- // Verifies that the default action of int DoB() was removed.
- EXPECT_EQ(0, b.DoB());
-
- // Verifies that the default action of int DoB(int) was removed.
- EXPECT_EQ(0, b.DoB(0));
-}
-
-// Tests that we can clear a mock object's default actions when a
-// method has more than one ON_CALL() set on it.
-TEST(VerifyAndClearTest, AMethodHasManyDefaultActions) {
- MockB b;
- ON_CALL(b, DoB(0))
- .WillByDefault(Return(1));
- ON_CALL(b, DoB(_))
- .WillByDefault(Return(2));
-
- Mock::VerifyAndClear(&b);
-
- // Verifies that the default actions (there are two) of int DoB(int)
- // were removed.
- EXPECT_EQ(0, b.DoB(0));
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can call VerifyAndClear() on a mock object multiple
-// times.
-TEST(VerifyAndClearTest, CanCallManyTimes) {
- MockB b;
- ON_CALL(b, DoB())
- .WillByDefault(Return(1));
- Mock::VerifyAndClear(&b);
- Mock::VerifyAndClear(&b);
-
- ON_CALL(b, DoB(_))
- .WillByDefault(Return(1));
- Mock::VerifyAndClear(&b);
-
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that VerifyAndClear() works when the verification succeeds.
-TEST(VerifyAndClearTest, Success) {
- MockB b;
- ON_CALL(b, DoB())
- .WillByDefault(Return(1));
- EXPECT_CALL(b, DoB(1))
- .WillOnce(Return(2));
-
- b.DoB();
- b.DoB(1);
- ASSERT_TRUE(Mock::VerifyAndClear(&b));
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that VerifyAndClear() works when the verification fails.
-TEST(VerifyAndClearTest, Failure) {
- MockB b;
- ON_CALL(b, DoB(_))
- .WillByDefault(Return(1));
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(2));
-
- b.DoB(1);
- bool result = true;
- EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClear(&b),
- "Actual: never called");
- ASSERT_FALSE(result);
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that VerifyAndClear() works when the default actions and
-// expectations are set on a const mock object.
-TEST(VerifyAndClearTest, Const) {
- MockB b;
- ON_CALL(Const(b), DoB())
- .WillByDefault(Return(1));
-
- EXPECT_CALL(Const(b), DoB())
- .WillOnce(DoDefault())
- .WillOnce(Return(2));
-
- b.DoB();
- b.DoB();
- ASSERT_TRUE(Mock::VerifyAndClear(&b));
-
- // There should be no expectations on the methods now, so we can
- // freely call them.
- EXPECT_EQ(0, b.DoB());
- EXPECT_EQ(0, b.DoB(1));
-}
-
-// Tests that we can set default actions and expectations on a mock
-// object after VerifyAndClear() has been called on it.
-TEST(VerifyAndClearTest, CanSetDefaultActionsAndExpectationsAfterwards) {
- MockB b;
- ON_CALL(b, DoB())
- .WillByDefault(Return(1));
- EXPECT_CALL(b, DoB(_))
- .WillOnce(Return(2));
- b.DoB(1);
-
- Mock::VerifyAndClear(&b);
-
- EXPECT_CALL(b, DoB())
- .WillOnce(Return(3));
- ON_CALL(b, DoB(_))
- .WillByDefault(Return(4));
-
- EXPECT_EQ(3, b.DoB());
- EXPECT_EQ(4, b.DoB(1));
-}
-
-// Tests that calling VerifyAndClear() on one mock object does not
-// affect other mock objects (either of the same type or not).
-TEST(VerifyAndClearTest, DoesNotAffectOtherMockObjects) {
- MockA a;
- MockB b1;
- MockB b2;
-
- ON_CALL(a, Binary(_, _))
- .WillByDefault(Return(true));
- EXPECT_CALL(a, Binary(_, _))
- .WillOnce(DoDefault())
- .WillOnce(Return(false));
-
- ON_CALL(b1, DoB())
- .WillByDefault(Return(1));
- EXPECT_CALL(b1, DoB(_))
- .WillOnce(Return(2));
-
- ON_CALL(b2, DoB())
- .WillByDefault(Return(3));
- EXPECT_CALL(b2, DoB(_));
-
- b2.DoB(0);
- Mock::VerifyAndClear(&b2);
-
- // Verifies that the default actions and expectations of a and b1
- // are still in effect.
- EXPECT_TRUE(a.Binary(0, 0));
- EXPECT_FALSE(a.Binary(0, 0));
-
- EXPECT_EQ(1, b1.DoB());
- EXPECT_EQ(2, b1.DoB(0));
-}
-
-// Tests that a mock function's action can call a mock function
-// (either the same function or a different one) either as an explicit
-// action or as a default action without causing a dead lock. It
-// verifies that the action is not performed inside the critical
-// section.
-TEST(SynchronizationTest, CanCallMockMethodInAction) {
- MockA a;
- MockC c;
- ON_CALL(a, DoA(_))
- .WillByDefault(IgnoreResult(InvokeWithoutArgs(&c,
- &MockC::NonVoidMethod)));
- EXPECT_CALL(a, DoA(1));
- EXPECT_CALL(a, DoA(1))
- .WillOnce(Invoke(&a, &MockA::DoA))
- .RetiresOnSaturation();
- EXPECT_CALL(c, NonVoidMethod());
-
- a.DoA(1);
- // This will match the second EXPECT_CALL() and trigger another a.DoA(1),
- // which will in turn match the first EXPECT_CALL() and trigger a call to
- // c.NonVoidMethod() that was specified by the ON_CALL() since the first
- // EXPECT_CALL() did not specify an action.
-}
-
-} // namespace
-
-// Allows the user to define his own main and then invoke gmock_main
-// from it. This might be necessary on some platforms which require
-// specific setup and teardown.
-#if GMOCK_RENAME_MAIN
-int gmock_main(int argc, char **argv) {
-#else
-int main(int argc, char **argv) {
-#endif // GMOCK_RENAME_MAIN
- testing::InitGoogleMock(&argc, argv);
-
- // Ensures that the tests pass no matter what value of
- // --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.
- testing::GMOCK_FLAG(catch_leaked_mocks) = true;
- testing::GMOCK_FLAG(verbose) = testing::internal::kWarningVerbosity;
-
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_all_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_all_test.cc
deleted file mode 100644
index 691aac84c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_all_test.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Tests for Google C++ Mocking Framework (Google Mock)
-//
-// Sometimes it's desirable to build most of Google Mock's own tests
-// by compiling a single file. This file serves this purpose.
-#include "test/gmock-actions_test.cc"
-#include "test/gmock-cardinalities_test.cc"
-#include "test/gmock-generated-actions_test.cc"
-#include "test/gmock-generated-function-mockers_test.cc"
-#include "test/gmock-generated-internal-utils_test.cc"
-#include "test/gmock-generated-matchers_test.cc"
-#include "test/gmock-internal-utils_test.cc"
-#include "test/gmock-matchers_test.cc"
-#include "test/gmock-more-actions_test.cc"
-#include "test/gmock-nice-strict_test.cc"
-#include "test/gmock-port_test.cc"
-#include "test/gmock-spec-builders_test.cc"
-#include "test/gmock_test.cc"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test.py
deleted file mode 100755
index 38ff9d019..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests that leaked mock objects can be caught be Google Mock."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-
-import gmock_test_utils
-
-
-PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_leak_test_')
-TEST_WITH_EXPECT_CALL = [PROGRAM_PATH, '--gtest_filter=*ExpectCall*']
-TEST_WITH_ON_CALL = [PROGRAM_PATH, '--gtest_filter=*OnCall*']
-TEST_MULTIPLE_LEAKS = [PROGRAM_PATH, '--gtest_filter=*MultipleLeaked*']
-
-
-class GMockLeakTest(gmock_test_utils.TestCase):
-
- def testCatchesLeakedMockByDefault(self):
- self.assertNotEqual(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL).exit_code)
- self.assertNotEqual(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_ON_CALL).exit_code)
-
- def testDoesNotCatchLeakedMockWhenDisabled(self):
- self.assertEquals(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL +
- ['--gmock_catch_leaked_mocks=0']).exit_code)
- self.assertEquals(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_ON_CALL +
- ['--gmock_catch_leaked_mocks=0']).exit_code)
-
- def testCatchesLeakedMockWhenEnabled(self):
- self.assertNotEqual(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL +
- ['--gmock_catch_leaked_mocks']).exit_code)
- self.assertNotEqual(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_ON_CALL +
- ['--gmock_catch_leaked_mocks']).exit_code)
-
- def testCatchesLeakedMockWhenEnabledWithExplictFlagValue(self):
- self.assertNotEqual(
- 0,
- gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL +
- ['--gmock_catch_leaked_mocks=1']).exit_code)
-
- def testCatchesMultipleLeakedMocks(self):
- self.assertNotEqual(
- 0,
- gmock_test_utils.Subprocess(TEST_MULTIPLE_LEAKS +
- ['--gmock_catch_leaked_mocks']).exit_code)
-
-
-if __name__ == '__main__':
- gmock_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test_.cc
deleted file mode 100644
index 1d27d22f6..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_leak_test_.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This program is for verifying that a leaked mock object can be
-// caught by Google Mock's leak detector.
-
-#include "gmock/gmock.h"
-
-namespace {
-
-using ::testing::Return;
-
-class FooInterface {
- public:
- virtual ~FooInterface() {}
- virtual void DoThis() = 0;
-};
-
-class MockFoo : public FooInterface {
- public:
- MockFoo() {}
-
- MOCK_METHOD0(DoThis, void());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
-};
-
-TEST(LeakTest, LeakedMockWithExpectCallCausesFailureWhenLeakCheckingIsEnabled) {
- MockFoo* foo = new MockFoo;
-
- EXPECT_CALL(*foo, DoThis());
- foo->DoThis();
-
- // In order to test the leak detector, we deliberately leak foo.
-
- // Makes sure Google Mock's leak detector can change the exit code
- // to 1 even when the code is already exiting with 0.
- exit(0);
-}
-
-TEST(LeakTest, LeakedMockWithOnCallCausesFailureWhenLeakCheckingIsEnabled) {
- MockFoo* foo = new MockFoo;
-
- ON_CALL(*foo, DoThis()).WillByDefault(Return());
-
- // In order to test the leak detector, we deliberately leak foo.
-
- // Makes sure Google Mock's leak detector can change the exit code
- // to 1 even when the code is already exiting with 0.
- exit(0);
-}
-
-TEST(LeakTest, CatchesMultipleLeakedMockObjects) {
- MockFoo* foo1 = new MockFoo;
- MockFoo* foo2 = new MockFoo;
-
- ON_CALL(*foo1, DoThis()).WillByDefault(Return());
- EXPECT_CALL(*foo2, DoThis());
- foo2->DoThis();
-
- // In order to test the leak detector, we deliberately leak foo1 and
- // foo2.
-
- // Makes sure Google Mock's leak detector can change the exit code
- // to 1 even when the code is already exiting with 0.
- exit(0);
-}
-
-} // namespace
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link2_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link2_test.cc
deleted file mode 100644
index 4c310c3d8..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link2_test.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file is for verifying that various Google Mock constructs do not
-// produce linker errors when instantiated in different translation units.
-// Please see gmock_link_test.h for details.
-
-#define LinkTest LinkTest2
-
-#include "test/gmock_link_test.h"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.cc
deleted file mode 100644
index 61e97d10c..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file is for verifying that various Google Mock constructs do not
-// produce linker errors when instantiated in different translation units.
-// Please see gmock_link_test.h for details.
-
-#define LinkTest LinkTest1
-
-#include "test/gmock_link_test.h"
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.h b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.h
deleted file mode 100644
index ab5af4b41..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_link_test.h
+++ /dev/null
@@ -1,669 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests that:
-// a. A header file defining a mock class can be included in multiple
-// translation units without causing a link error.
-// b. Actions and matchers can be instantiated with identical template
-// arguments in different translation units without causing link
-// errors.
-// The following constructs are currently tested:
-// Actions:
-// Return()
-// Return(value)
-// ReturnNull
-// ReturnRef
-// Assign
-// SetArgPointee
-// SetArrayArgument
-// SetErrnoAndReturn
-// Invoke(function)
-// Invoke(object, method)
-// InvokeWithoutArgs(function)
-// InvokeWithoutArgs(object, method)
-// InvokeArgument
-// WithArg
-// WithArgs
-// WithoutArgs
-// DoAll
-// DoDefault
-// IgnoreResult
-// Throw
-// ACTION()-generated
-// ACTION_P()-generated
-// ACTION_P2()-generated
-// Matchers:
-// _
-// A
-// An
-// Eq
-// Gt, Lt, Ge, Le, Ne
-// NotNull
-// Ref
-// TypedEq
-// DoubleEq
-// FloatEq
-// NanSensitiveDoubleEq
-// NanSensitiveFloatEq
-// ContainsRegex
-// MatchesRegex
-// EndsWith
-// HasSubstr
-// StartsWith
-// StrCaseEq
-// StrCaseNe
-// StrEq
-// StrNe
-// ElementsAre
-// ElementsAreArray
-// ContainerEq
-// Field
-// Property
-// ResultOf(function)
-// Pointee
-// Truly(predicate)
-// AllOf
-// AnyOf
-// Not
-// MatcherCast<T>
-//
-// Please note: this test does not verify the functioning of these
-// constructs, only that the programs using them will link successfully.
-//
-// Implementation note:
-// This test requires identical definitions of Interface and Mock to be
-// included in different translation units. We achieve this by writing
-// them in this header and #including it in gmock_link_test.cc and
-// gmock_link2_test.cc. Because the symbols generated by the compiler for
-// those constructs must be identical in both translation units,
-// definitions of Interface and Mock tests MUST be kept in the SAME
-// NON-ANONYMOUS namespace in this file. The test fixture class LinkTest
-// is defined as LinkTest1 in gmock_link_test.cc and as LinkTest2 in
-// gmock_link2_test.cc to avoid producing linker errors.
-
-#ifndef GMOCK_TEST_GMOCK_LINK_TEST_H_
-#define GMOCK_TEST_GMOCK_LINK_TEST_H_
-
-#include "gmock/gmock.h"
-
-#if !GTEST_OS_WINDOWS_MOBILE
-# include <errno.h>
-#endif
-
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-#include <iostream>
-#include <vector>
-
-using testing::_;
-using testing::A;
-using testing::AllOf;
-using testing::AnyOf;
-using testing::Assign;
-using testing::ContainerEq;
-using testing::DoAll;
-using testing::DoDefault;
-using testing::DoubleEq;
-using testing::ElementsAre;
-using testing::ElementsAreArray;
-using testing::EndsWith;
-using testing::Eq;
-using testing::Field;
-using testing::FloatEq;
-using testing::Ge;
-using testing::Gt;
-using testing::HasSubstr;
-using testing::IgnoreResult;
-using testing::Invoke;
-using testing::InvokeArgument;
-using testing::InvokeWithoutArgs;
-using testing::IsNull;
-using testing::Le;
-using testing::Lt;
-using testing::Matcher;
-using testing::MatcherCast;
-using testing::NanSensitiveDoubleEq;
-using testing::NanSensitiveFloatEq;
-using testing::Ne;
-using testing::Not;
-using testing::NotNull;
-using testing::Pointee;
-using testing::Property;
-using testing::Ref;
-using testing::ResultOf;
-using testing::Return;
-using testing::ReturnNull;
-using testing::ReturnRef;
-using testing::SetArgPointee;
-using testing::SetArrayArgument;
-using testing::StartsWith;
-using testing::StrCaseEq;
-using testing::StrCaseNe;
-using testing::StrEq;
-using testing::StrNe;
-using testing::Truly;
-using testing::TypedEq;
-using testing::WithArg;
-using testing::WithArgs;
-using testing::WithoutArgs;
-
-#if !GTEST_OS_WINDOWS_MOBILE
-using testing::SetErrnoAndReturn;
-#endif
-
-#if GTEST_HAS_EXCEPTIONS
-using testing::Throw;
-#endif
-
-using testing::ContainsRegex;
-using testing::MatchesRegex;
-
-class Interface {
- public:
- virtual ~Interface() {}
- virtual void VoidFromString(char* str) = 0;
- virtual char* StringFromString(char* str) = 0;
- virtual int IntFromString(char* str) = 0;
- virtual int& IntRefFromString(char* str) = 0;
- virtual void VoidFromFunc(void(*)(char*)) = 0;
- virtual void VoidFromIntRef(int& n) = 0;
- virtual void VoidFromFloat(float n) = 0;
- virtual void VoidFromDouble(double n) = 0;
- virtual void VoidFromVector(const std::vector<int>& v) = 0;
-};
-
-class Mock: public Interface {
- public:
- Mock() {}
-
- MOCK_METHOD1(VoidFromString, void(char* str));
- MOCK_METHOD1(StringFromString, char*(char* str));
- MOCK_METHOD1(IntFromString, int(char* str));
- MOCK_METHOD1(IntRefFromString, int&(char* str));
- MOCK_METHOD1(VoidFromFunc, void(void(*func)(char* str)));
- MOCK_METHOD1(VoidFromIntRef, void(int& n));
- MOCK_METHOD1(VoidFromFloat, void(float n));
- MOCK_METHOD1(VoidFromDouble, void(double n));
- MOCK_METHOD1(VoidFromVector, void(const std::vector<int>& v));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
-};
-
-class InvokeHelper {
- public:
- static void StaticVoidFromVoid() {}
- void VoidFromVoid() {}
- static void StaticVoidFromString(char*) {}
- void VoidFromString(char*) {}
- static int StaticIntFromString(char*) { return 1; }
- static bool StaticBoolFromString(const char*) { return true; }
-};
-
-class FieldHelper {
- public:
- FieldHelper(int a_field) : field_(a_field) {}
- int field() const { return field_; }
- int field_; // NOLINT -- need external access to field_ to test
- // the Field matcher.
-};
-
-// Tests the linkage of the ReturnVoid action.
-TEST(LinkTest, TestReturnVoid) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return());
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the Return action.
-TEST(LinkTest, TestReturn) {
- Mock mock;
- char ch = 'x';
-
- EXPECT_CALL(mock, StringFromString(_)).WillOnce(Return(&ch));
- mock.StringFromString(NULL);
-}
-
-// Tests the linkage of the ReturnNull action.
-TEST(LinkTest, TestReturnNull) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return());
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the ReturnRef action.
-TEST(LinkTest, TestReturnRef) {
- Mock mock;
- int n = 42;
-
- EXPECT_CALL(mock, IntRefFromString(_)).WillOnce(ReturnRef(n));
- mock.IntRefFromString(NULL);
-}
-
-// Tests the linkage of the Assign action.
-TEST(LinkTest, TestAssign) {
- Mock mock;
- char ch = 'x';
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Assign(&ch, 'y'));
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the SetArgPointee action.
-TEST(LinkTest, TestSetArgPointee) {
- Mock mock;
- char ch = 'x';
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArgPointee<0>('y'));
- mock.VoidFromString(&ch);
-}
-
-// Tests the linkage of the SetArrayArgument action.
-TEST(LinkTest, TestSetArrayArgument) {
- Mock mock;
- char ch = 'x';
- char ch2 = 'y';
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArrayArgument<0>(&ch2,
- &ch2 + 1));
- mock.VoidFromString(&ch);
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Tests the linkage of the SetErrnoAndReturn action.
-TEST(LinkTest, TestSetErrnoAndReturn) {
- Mock mock;
-
- int saved_errno = errno;
- EXPECT_CALL(mock, IntFromString(_)).WillOnce(SetErrnoAndReturn(1, -1));
- mock.IntFromString(NULL);
- errno = saved_errno;
-}
-
-#endif // !GTEST_OS_WINDOWS_MOBILE
-
-// Tests the linkage of the Invoke(function) and Invoke(object, method) actions.
-TEST(LinkTest, TestInvoke) {
- Mock mock;
- InvokeHelper test_invoke_helper;
-
- EXPECT_CALL(mock, VoidFromString(_))
- .WillOnce(Invoke(&InvokeHelper::StaticVoidFromString))
- .WillOnce(Invoke(&test_invoke_helper, &InvokeHelper::VoidFromString));
- mock.VoidFromString(NULL);
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the InvokeWithoutArgs action.
-TEST(LinkTest, TestInvokeWithoutArgs) {
- Mock mock;
- InvokeHelper test_invoke_helper;
-
- EXPECT_CALL(mock, VoidFromString(_))
- .WillOnce(InvokeWithoutArgs(&InvokeHelper::StaticVoidFromVoid))
- .WillOnce(InvokeWithoutArgs(&test_invoke_helper,
- &InvokeHelper::VoidFromVoid));
- mock.VoidFromString(NULL);
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the InvokeArgument action.
-TEST(LinkTest, TestInvokeArgument) {
- Mock mock;
- char ch = 'x';
-
- EXPECT_CALL(mock, VoidFromFunc(_)).WillOnce(InvokeArgument<0>(&ch));
- mock.VoidFromFunc(InvokeHelper::StaticVoidFromString);
-}
-
-// Tests the linkage of the WithArg action.
-TEST(LinkTest, TestWithArg) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_))
- .WillOnce(WithArg<0>(Invoke(&InvokeHelper::StaticVoidFromString)));
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the WithArgs action.
-TEST(LinkTest, TestWithArgs) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_))
- .WillOnce(WithArgs<0>(Invoke(&InvokeHelper::StaticVoidFromString)));
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the WithoutArgs action.
-TEST(LinkTest, TestWithoutArgs) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(WithoutArgs(Return()));
- mock.VoidFromString(NULL);
-}
-
-// Tests the linkage of the DoAll action.
-TEST(LinkTest, TestDoAll) {
- Mock mock;
- char ch = 'x';
-
- EXPECT_CALL(mock, VoidFromString(_))
- .WillOnce(DoAll(SetArgPointee<0>('y'), Return()));
- mock.VoidFromString(&ch);
-}
-
-// Tests the linkage of the DoDefault action.
-TEST(LinkTest, TestDoDefault) {
- Mock mock;
- char ch = 'x';
-
- ON_CALL(mock, VoidFromString(_)).WillByDefault(Return());
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(DoDefault());
- mock.VoidFromString(&ch);
-}
-
-// Tests the linkage of the IgnoreResult action.
-TEST(LinkTest, TestIgnoreResult) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(IgnoreResult(Return(42)));
- mock.VoidFromString(NULL);
-}
-
-#if GTEST_HAS_EXCEPTIONS
-// Tests the linkage of the Throw action.
-TEST(LinkTest, TestThrow) {
- Mock mock;
-
- EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Throw(42));
- EXPECT_THROW(mock.VoidFromString(NULL), int);
-}
-#endif // GTEST_HAS_EXCEPTIONS
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma. Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Tests the linkage of actions created using ACTION macro.
-namespace {
-ACTION(Return1) { return 1; }
-}
-
-TEST(LinkTest, TestActionMacro) {
- Mock mock;
-
- EXPECT_CALL(mock, IntFromString(_)).WillOnce(Return1());
- mock.IntFromString(NULL);
-}
-
-// Tests the linkage of actions created using ACTION_P macro.
-namespace {
-ACTION_P(ReturnArgument, ret_value) { return ret_value; }
-}
-
-TEST(LinkTest, TestActionPMacro) {
- Mock mock;
-
- EXPECT_CALL(mock, IntFromString(_)).WillOnce(ReturnArgument(42));
- mock.IntFromString(NULL);
-}
-
-// Tests the linkage of actions created using ACTION_P2 macro.
-namespace {
-ACTION_P2(ReturnEqualsEitherOf, first, second) {
- return arg0 == first || arg0 == second;
-}
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-TEST(LinkTest, TestActionP2Macro) {
- Mock mock;
- char ch = 'x';
-
- EXPECT_CALL(mock, IntFromString(_))
- .WillOnce(ReturnEqualsEitherOf("one", "two"));
- mock.IntFromString(&ch);
-}
-
-// Tests the linkage of the "_" matcher.
-TEST(LinkTest, TestMatcherAnything) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(_)).WillByDefault(Return());
-}
-
-// Tests the linkage of the A matcher.
-TEST(LinkTest, TestMatcherA) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(A<char*>())).WillByDefault(Return());
-}
-
-// Tests the linkage of the Eq and the "bare value" matcher.
-TEST(LinkTest, TestMatchersEq) {
- Mock mock;
- const char* p = "x";
-
- ON_CALL(mock, VoidFromString(Eq(p))).WillByDefault(Return());
- ON_CALL(mock, VoidFromString(const_cast<char*>("y")))
- .WillByDefault(Return());
-}
-
-// Tests the linkage of the Lt, Gt, Le, Ge, and Ne matchers.
-TEST(LinkTest, TestMatchersRelations) {
- Mock mock;
-
- ON_CALL(mock, VoidFromFloat(Lt(1.0f))).WillByDefault(Return());
- ON_CALL(mock, VoidFromFloat(Gt(1.0f))).WillByDefault(Return());
- ON_CALL(mock, VoidFromFloat(Le(1.0f))).WillByDefault(Return());
- ON_CALL(mock, VoidFromFloat(Ge(1.0f))).WillByDefault(Return());
- ON_CALL(mock, VoidFromFloat(Ne(1.0f))).WillByDefault(Return());
-}
-
-// Tests the linkage of the NotNull matcher.
-TEST(LinkTest, TestMatcherNotNull) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(NotNull())).WillByDefault(Return());
-}
-
-// Tests the linkage of the IsNull matcher.
-TEST(LinkTest, TestMatcherIsNull) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(IsNull())).WillByDefault(Return());
-}
-
-// Tests the linkage of the Ref matcher.
-TEST(LinkTest, TestMatcherRef) {
- Mock mock;
- int a = 0;
-
- ON_CALL(mock, VoidFromIntRef(Ref(a))).WillByDefault(Return());
-}
-
-// Tests the linkage of the TypedEq matcher.
-TEST(LinkTest, TestMatcherTypedEq) {
- Mock mock;
- long a = 0;
-
- ON_CALL(mock, VoidFromIntRef(TypedEq<int&>(a))).WillByDefault(Return());
-}
-
-// Tests the linkage of the FloatEq, DoubleEq, NanSensitiveFloatEq and
-// NanSensitiveDoubleEq matchers.
-TEST(LinkTest, TestMatchersFloatingPoint) {
- Mock mock;
- float a = 0;
-
- ON_CALL(mock, VoidFromFloat(FloatEq(a))).WillByDefault(Return());
- ON_CALL(mock, VoidFromDouble(DoubleEq(a))).WillByDefault(Return());
- ON_CALL(mock, VoidFromFloat(NanSensitiveFloatEq(a))).WillByDefault(Return());
- ON_CALL(mock, VoidFromDouble(NanSensitiveDoubleEq(a)))
- .WillByDefault(Return());
-}
-
-// Tests the linkage of the ContainsRegex matcher.
-TEST(LinkTest, TestMatcherContainsRegex) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(ContainsRegex(".*"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the MatchesRegex matcher.
-TEST(LinkTest, TestMatcherMatchesRegex) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(MatchesRegex(".*"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the StartsWith, EndsWith, and HasSubstr matchers.
-TEST(LinkTest, TestMatchersSubstrings) {
- Mock mock;
-
- ON_CALL(mock, VoidFromString(StartsWith("a"))).WillByDefault(Return());
- ON_CALL(mock, VoidFromString(EndsWith("c"))).WillByDefault(Return());
- ON_CALL(mock, VoidFromString(HasSubstr("b"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the StrEq, StrNe, StrCaseEq, and StrCaseNe matchers.
-TEST(LinkTest, TestMatchersStringEquality) {
- Mock mock;
- ON_CALL(mock, VoidFromString(StrEq("a"))).WillByDefault(Return());
- ON_CALL(mock, VoidFromString(StrNe("a"))).WillByDefault(Return());
- ON_CALL(mock, VoidFromString(StrCaseEq("a"))).WillByDefault(Return());
- ON_CALL(mock, VoidFromString(StrCaseNe("a"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the ElementsAre matcher.
-TEST(LinkTest, TestMatcherElementsAre) {
- Mock mock;
-
- ON_CALL(mock, VoidFromVector(ElementsAre('a', _))).WillByDefault(Return());
-}
-
-// Tests the linkage of the ElementsAreArray matcher.
-TEST(LinkTest, TestMatcherElementsAreArray) {
- Mock mock;
- char arr[] = { 'a', 'b' };
-
- ON_CALL(mock, VoidFromVector(ElementsAreArray(arr))).WillByDefault(Return());
-}
-
-// Tests the linkage of the ContainerEq matcher.
-TEST(LinkTest, TestMatcherContainerEq) {
- Mock mock;
- std::vector<int> v;
-
- ON_CALL(mock, VoidFromVector(ContainerEq(v))).WillByDefault(Return());
-}
-
-// Tests the linkage of the Field matcher.
-TEST(LinkTest, TestMatcherField) {
- FieldHelper helper(0);
-
- Matcher<const FieldHelper&> m = Field(&FieldHelper::field_, Eq(0));
- EXPECT_TRUE(m.Matches(helper));
-
- Matcher<const FieldHelper*> m2 = Field(&FieldHelper::field_, Eq(0));
- EXPECT_TRUE(m2.Matches(&helper));
-}
-
-// Tests the linkage of the Property matcher.
-TEST(LinkTest, TestMatcherProperty) {
- FieldHelper helper(0);
-
- Matcher<const FieldHelper&> m = Property(&FieldHelper::field, Eq(0));
- EXPECT_TRUE(m.Matches(helper));
-
- Matcher<const FieldHelper*> m2 = Property(&FieldHelper::field, Eq(0));
- EXPECT_TRUE(m2.Matches(&helper));
-}
-
-// Tests the linkage of the ResultOf matcher.
-TEST(LinkTest, TestMatcherResultOf) {
- Matcher<char*> m = ResultOf(&InvokeHelper::StaticIntFromString, Eq(1));
- EXPECT_TRUE(m.Matches(NULL));
-}
-
-// Tests the linkage of the ResultOf matcher.
-TEST(LinkTest, TestMatcherPointee) {
- int n = 1;
-
- Matcher<int*> m = Pointee(Eq(1));
- EXPECT_TRUE(m.Matches(&n));
-}
-
-// Tests the linkage of the Truly matcher.
-TEST(LinkTest, TestMatcherTruly) {
- Matcher<const char*> m = Truly(&InvokeHelper::StaticBoolFromString);
- EXPECT_TRUE(m.Matches(NULL));
-}
-
-// Tests the linkage of the AllOf matcher.
-TEST(LinkTest, TestMatcherAllOf) {
- Matcher<int> m = AllOf(_, Eq(1));
- EXPECT_TRUE(m.Matches(1));
-}
-
-// Tests the linkage of the AnyOf matcher.
-TEST(LinkTest, TestMatcherAnyOf) {
- Matcher<int> m = AnyOf(_, Eq(1));
- EXPECT_TRUE(m.Matches(1));
-}
-
-// Tests the linkage of the Not matcher.
-TEST(LinkTest, TestMatcherNot) {
- Matcher<int> m = Not(_);
- EXPECT_FALSE(m.Matches(1));
-}
-
-// Tests the linkage of the MatcherCast<T>() function.
-TEST(LinkTest, TestMatcherCast) {
- Matcher<const char*> m = MatcherCast<const char*>(_);
- EXPECT_TRUE(m.Matches(NULL));
-}
-
-#endif // GMOCK_TEST_GMOCK_LINK_TEST_H_
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test.py
deleted file mode 100755
index eced8a81f..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test.py
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests the text output of Google C++ Mocking Framework.
-
-SYNOPSIS
- gmock_output_test.py --build_dir=BUILD/DIR --gengolden
- # where BUILD/DIR contains the built gmock_output_test_ file.
- gmock_output_test.py --gengolden
- gmock_output_test.py
-"""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import re
-import sys
-
-import gmock_test_utils
-
-
-# The flag for generating the golden file
-GENGOLDEN_FLAG = '--gengolden'
-
-PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_output_test_')
-COMMAND = [PROGRAM_PATH, '--gtest_stack_trace_depth=0', '--gtest_print_time=0']
-GOLDEN_NAME = 'gmock_output_test_golden.txt'
-GOLDEN_PATH = os.path.join(gmock_test_utils.GetSourceDir(), GOLDEN_NAME)
-
-
-def ToUnixLineEnding(s):
- """Changes all Windows/Mac line endings in s to UNIX line endings."""
-
- return s.replace('\r\n', '\n').replace('\r', '\n')
-
-
-def RemoveReportHeaderAndFooter(output):
- """Removes Google Test result report's header and footer from the output."""
-
- output = re.sub(r'.*gtest_main.*\n', '', output)
- output = re.sub(r'\[.*\d+ tests.*\n', '', output)
- output = re.sub(r'\[.* test environment .*\n', '', output)
- output = re.sub(r'\[=+\] \d+ tests .* ran.*', '', output)
- output = re.sub(r'.* FAILED TESTS\n', '', output)
- return output
-
-
-def RemoveLocations(output):
- """Removes all file location info from a Google Test program's output.
-
- Args:
- output: the output of a Google Test program.
-
- Returns:
- output with all file location info (in the form of
- 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
- 'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by
- 'FILE:#: '.
- """
-
- return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\:', 'FILE:#:', output)
-
-
-def NormalizeErrorMarker(output):
- """Normalizes the error marker, which is different on Windows vs on Linux."""
-
- return re.sub(r' error: ', ' Failure\n', output)
-
-
-def RemoveMemoryAddresses(output):
- """Removes memory addresses from the test output."""
-
- return re.sub(r'@\w+', '@0x#', output)
-
-
-def RemoveTestNamesOfLeakedMocks(output):
- """Removes the test names of leaked mock objects from the test output."""
-
- return re.sub(r'\(used in test .+\) ', '', output)
-
-
-def GetLeakyTests(output):
- """Returns a list of test names that leak mock objects."""
-
- # findall() returns a list of all matches of the regex in output.
- # For example, if '(used in test FooTest.Bar)' is in output, the
- # list will contain 'FooTest.Bar'.
- return re.findall(r'\(used in test (.+)\)', output)
-
-
-def GetNormalizedOutputAndLeakyTests(output):
- """Normalizes the output of gmock_output_test_.
-
- Args:
- output: The test output.
-
- Returns:
- A tuple (the normalized test output, the list of test names that have
- leaked mocks).
- """
-
- output = ToUnixLineEnding(output)
- output = RemoveReportHeaderAndFooter(output)
- output = NormalizeErrorMarker(output)
- output = RemoveLocations(output)
- output = RemoveMemoryAddresses(output)
- return (RemoveTestNamesOfLeakedMocks(output), GetLeakyTests(output))
-
-
-def GetShellCommandOutput(cmd):
- """Runs a command in a sub-process, and returns its STDOUT in a string."""
-
- return gmock_test_utils.Subprocess(cmd, capture_stderr=False).output
-
-
-def GetNormalizedCommandOutputAndLeakyTests(cmd):
- """Runs a command and returns its normalized output and a list of leaky tests.
-
- Args:
- cmd: the shell command.
- """
-
- # Disables exception pop-ups on Windows.
- os.environ['GTEST_CATCH_EXCEPTIONS'] = '1'
- return GetNormalizedOutputAndLeakyTests(GetShellCommandOutput(cmd))
-
-
-class GMockOutputTest(gmock_test_utils.TestCase):
- def testOutput(self):
- (output, leaky_tests) = GetNormalizedCommandOutputAndLeakyTests(COMMAND)
- golden_file = open(GOLDEN_PATH, 'rb')
- golden = golden_file.read()
- golden_file.close()
-
- # The normalized output should match the golden file.
- self.assertEquals(golden, output)
-
- # The raw output should contain 2 leaked mock object errors for
- # test GMockOutputTest.CatchesLeakedMocks.
- self.assertEquals(['GMockOutputTest.CatchesLeakedMocks',
- 'GMockOutputTest.CatchesLeakedMocks'],
- leaky_tests)
-
-
-if __name__ == '__main__':
- if sys.argv[1:] == [GENGOLDEN_FLAG]:
- (output, _) = GetNormalizedCommandOutputAndLeakyTests(COMMAND)
- golden_file = open(GOLDEN_PATH, 'wb')
- golden_file.write(output)
- golden_file.close()
- else:
- gmock_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_.cc
deleted file mode 100644
index c8e6b8319..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_.cc
+++ /dev/null
@@ -1,290 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Tests Google Mock's output in various scenarios. This ensures that
-// Google Mock's messages are readable and useful.
-
-#include "gmock/gmock.h"
-
-#include <stdio.h>
-#include <string>
-
-#include "gtest/gtest.h"
-
-using testing::_;
-using testing::AnyNumber;
-using testing::Ge;
-using testing::InSequence;
-using testing::Ref;
-using testing::Return;
-using testing::Sequence;
-
-class MockFoo {
- public:
- MockFoo() {}
-
- MOCK_METHOD3(Bar, char(const std::string& s, int i, double x));
- MOCK_METHOD2(Bar2, bool(int x, int y));
- MOCK_METHOD2(Bar3, void(int x, int y));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
-};
-
-class GMockOutputTest : public testing::Test {
- protected:
- MockFoo foo_;
-};
-
-TEST_F(GMockOutputTest, ExpectedCall) {
- testing::GMOCK_FLAG(verbose) = "info";
-
- EXPECT_CALL(foo_, Bar2(0, _));
- foo_.Bar2(0, 0); // Expected call
-
- testing::GMOCK_FLAG(verbose) = "warning";
-}
-
-TEST_F(GMockOutputTest, ExpectedCallToVoidFunction) {
- testing::GMOCK_FLAG(verbose) = "info";
-
- EXPECT_CALL(foo_, Bar3(0, _));
- foo_.Bar3(0, 0); // Expected call
-
- testing::GMOCK_FLAG(verbose) = "warning";
-}
-
-TEST_F(GMockOutputTest, ExplicitActionsRunOut) {
- EXPECT_CALL(foo_, Bar2(_, _))
- .Times(2)
- .WillOnce(Return(false));
- foo_.Bar2(2, 2);
- foo_.Bar2(1, 1); // Explicit actions in EXPECT_CALL run out.
-}
-
-TEST_F(GMockOutputTest, UnexpectedCall) {
- EXPECT_CALL(foo_, Bar2(0, _));
-
- foo_.Bar2(1, 0); // Unexpected call
- foo_.Bar2(0, 0); // Expected call
-}
-
-TEST_F(GMockOutputTest, UnexpectedCallToVoidFunction) {
- EXPECT_CALL(foo_, Bar3(0, _));
-
- foo_.Bar3(1, 0); // Unexpected call
- foo_.Bar3(0, 0); // Expected call
-}
-
-TEST_F(GMockOutputTest, ExcessiveCall) {
- EXPECT_CALL(foo_, Bar2(0, _));
-
- foo_.Bar2(0, 0); // Expected call
- foo_.Bar2(0, 1); // Excessive call
-}
-
-TEST_F(GMockOutputTest, ExcessiveCallToVoidFunction) {
- EXPECT_CALL(foo_, Bar3(0, _));
-
- foo_.Bar3(0, 0); // Expected call
- foo_.Bar3(0, 1); // Excessive call
-}
-
-TEST_F(GMockOutputTest, UninterestingCall) {
- foo_.Bar2(0, 1); // Uninteresting call
-}
-
-TEST_F(GMockOutputTest, UninterestingCallToVoidFunction) {
- foo_.Bar3(0, 1); // Uninteresting call
-}
-
-TEST_F(GMockOutputTest, RetiredExpectation) {
- EXPECT_CALL(foo_, Bar2(_, _))
- .RetiresOnSaturation();
- EXPECT_CALL(foo_, Bar2(0, 0));
-
- foo_.Bar2(1, 1);
- foo_.Bar2(1, 1); // Matches a retired expectation
- foo_.Bar2(0, 0);
-}
-
-TEST_F(GMockOutputTest, UnsatisfiedPrerequisite) {
- {
- InSequence s;
- EXPECT_CALL(foo_, Bar(_, 0, _));
- EXPECT_CALL(foo_, Bar2(0, 0));
- EXPECT_CALL(foo_, Bar2(1, _));
- }
-
- foo_.Bar2(1, 0); // Has one immediate unsatisfied pre-requisite
- foo_.Bar("Hi", 0, 0);
- foo_.Bar2(0, 0);
- foo_.Bar2(1, 0);
-}
-
-TEST_F(GMockOutputTest, UnsatisfiedPrerequisites) {
- Sequence s1, s2;
-
- EXPECT_CALL(foo_, Bar(_, 0, _))
- .InSequence(s1);
- EXPECT_CALL(foo_, Bar2(0, 0))
- .InSequence(s2);
- EXPECT_CALL(foo_, Bar2(1, _))
- .InSequence(s1, s2);
-
- foo_.Bar2(1, 0); // Has two immediate unsatisfied pre-requisites
- foo_.Bar("Hi", 0, 0);
- foo_.Bar2(0, 0);
- foo_.Bar2(1, 0);
-}
-
-TEST_F(GMockOutputTest, UnsatisfiedWith) {
- EXPECT_CALL(foo_, Bar2(_, _)).With(Ge());
-}
-
-TEST_F(GMockOutputTest, UnsatisfiedExpectation) {
- EXPECT_CALL(foo_, Bar(_, _, _));
- EXPECT_CALL(foo_, Bar2(0, _))
- .Times(2);
-
- foo_.Bar2(0, 1);
-}
-
-TEST_F(GMockOutputTest, MismatchArguments) {
- const std::string s = "Hi";
- EXPECT_CALL(foo_, Bar(Ref(s), _, Ge(0)));
-
- foo_.Bar("Ho", 0, -0.1); // Mismatch arguments
- foo_.Bar(s, 0, 0);
-}
-
-TEST_F(GMockOutputTest, MismatchWith) {
- EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1)))
- .With(Ge());
-
- foo_.Bar2(2, 3); // Mismatch With()
- foo_.Bar2(2, 1);
-}
-
-TEST_F(GMockOutputTest, MismatchArgumentsAndWith) {
- EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1)))
- .With(Ge());
-
- foo_.Bar2(1, 3); // Mismatch arguments and mismatch With()
- foo_.Bar2(2, 1);
-}
-
-TEST_F(GMockOutputTest, UnexpectedCallWithDefaultAction) {
- ON_CALL(foo_, Bar2(_, _))
- .WillByDefault(Return(true)); // Default action #1
- ON_CALL(foo_, Bar2(1, _))
- .WillByDefault(Return(false)); // Default action #2
-
- EXPECT_CALL(foo_, Bar2(2, 2));
- foo_.Bar2(1, 0); // Unexpected call, takes default action #2.
- foo_.Bar2(0, 0); // Unexpected call, takes default action #1.
- foo_.Bar2(2, 2); // Expected call.
-}
-
-TEST_F(GMockOutputTest, ExcessiveCallWithDefaultAction) {
- ON_CALL(foo_, Bar2(_, _))
- .WillByDefault(Return(true)); // Default action #1
- ON_CALL(foo_, Bar2(1, _))
- .WillByDefault(Return(false)); // Default action #2
-
- EXPECT_CALL(foo_, Bar2(2, 2));
- EXPECT_CALL(foo_, Bar2(1, 1));
-
- foo_.Bar2(2, 2); // Expected call.
- foo_.Bar2(2, 2); // Excessive call, takes default action #1.
- foo_.Bar2(1, 1); // Expected call.
- foo_.Bar2(1, 1); // Excessive call, takes default action #2.
-}
-
-TEST_F(GMockOutputTest, UninterestingCallWithDefaultAction) {
- ON_CALL(foo_, Bar2(_, _))
- .WillByDefault(Return(true)); // Default action #1
- ON_CALL(foo_, Bar2(1, _))
- .WillByDefault(Return(false)); // Default action #2
-
- foo_.Bar2(2, 2); // Uninteresting call, takes default action #1.
- foo_.Bar2(1, 1); // Uninteresting call, takes default action #2.
-}
-
-TEST_F(GMockOutputTest, ExplicitActionsRunOutWithDefaultAction) {
- ON_CALL(foo_, Bar2(_, _))
- .WillByDefault(Return(true)); // Default action #1
-
- EXPECT_CALL(foo_, Bar2(_, _))
- .Times(2)
- .WillOnce(Return(false));
- foo_.Bar2(2, 2);
- foo_.Bar2(1, 1); // Explicit actions in EXPECT_CALL run out.
-}
-
-TEST_F(GMockOutputTest, CatchesLeakedMocks) {
- MockFoo* foo1 = new MockFoo;
- MockFoo* foo2 = new MockFoo;
-
- // Invokes ON_CALL on foo1.
- ON_CALL(*foo1, Bar(_, _, _)).WillByDefault(Return('a'));
-
- // Invokes EXPECT_CALL on foo2.
- EXPECT_CALL(*foo2, Bar2(_, _));
- EXPECT_CALL(*foo2, Bar2(1, _));
- EXPECT_CALL(*foo2, Bar3(_, _)).Times(AnyNumber());
- foo2->Bar2(2, 1);
- foo2->Bar2(1, 1);
-
- // Both foo1 and foo2 are deliberately leaked.
-}
-
-void TestCatchesLeakedMocksInAdHocTests() {
- MockFoo* foo = new MockFoo;
-
- // Invokes EXPECT_CALL on foo.
- EXPECT_CALL(*foo, Bar2(_, _));
- foo->Bar2(2, 1);
-
- // foo is deliberately leaked.
-}
-
-int main(int argc, char **argv) {
- testing::InitGoogleMock(&argc, argv);
-
- // Ensures that the tests pass no matter what value of
- // --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.
- testing::GMOCK_FLAG(catch_leaked_mocks) = true;
- testing::GMOCK_FLAG(verbose) = "warning";
-
- TestCatchesLeakedMocksInAdHocTests();
- return RUN_ALL_TESTS();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_golden.txt b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_golden.txt
deleted file mode 100644
index a7ff56302..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_output_test_golden.txt
+++ /dev/null
@@ -1,310 +0,0 @@
-[ RUN ] GMockOutputTest.ExpectedCall
-
-FILE:#: EXPECT_CALL(foo_, Bar2(0, _)) invoked
-Stack trace:
-
-FILE:#: Mock function call matches EXPECT_CALL(foo_, Bar2(0, _))...
- Function call: Bar2(0, 0)
- Returns: false
-Stack trace:
-[ OK ] GMockOutputTest.ExpectedCall
-[ RUN ] GMockOutputTest.ExpectedCallToVoidFunction
-
-FILE:#: EXPECT_CALL(foo_, Bar3(0, _)) invoked
-Stack trace:
-
-FILE:#: Mock function call matches EXPECT_CALL(foo_, Bar3(0, _))...
- Function call: Bar3(0, 0)
-Stack trace:
-[ OK ] GMockOutputTest.ExpectedCallToVoidFunction
-[ RUN ] GMockOutputTest.ExplicitActionsRunOut
-
-GMOCK WARNING:
-FILE:#: Too few actions specified in EXPECT_CALL(foo_, Bar2(_, _))...
-Expected to be called twice, but has only 1 WillOnce().
-GMOCK WARNING:
-FILE:#: Actions ran out in EXPECT_CALL(foo_, Bar2(_, _))...
-Called 2 times, but only 1 WillOnce() is specified - returning default value.
-Stack trace:
-[ OK ] GMockOutputTest.ExplicitActionsRunOut
-[ RUN ] GMockOutputTest.UnexpectedCall
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar2(1, 0)
- Returns: false
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar2(0, _))...
- Expected arg #0: is equal to 0
- Actual: 1
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnexpectedCall
-[ RUN ] GMockOutputTest.UnexpectedCallToVoidFunction
-unknown file: Failure
-
-Unexpected mock function call - returning directly.
- Function call: Bar3(1, 0)
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar3(0, _))...
- Expected arg #0: is equal to 0
- Actual: 1
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnexpectedCallToVoidFunction
-[ RUN ] GMockOutputTest.ExcessiveCall
-FILE:#: Failure
-Mock function called more times than expected - returning default value.
- Function call: Bar2(0, 1)
- Returns: false
- Expected: to be called once
- Actual: called twice - over-saturated and active
-[ FAILED ] GMockOutputTest.ExcessiveCall
-[ RUN ] GMockOutputTest.ExcessiveCallToVoidFunction
-FILE:#: Failure
-Mock function called more times than expected - returning directly.
- Function call: Bar3(0, 1)
- Expected: to be called once
- Actual: called twice - over-saturated and active
-[ FAILED ] GMockOutputTest.ExcessiveCallToVoidFunction
-[ RUN ] GMockOutputTest.UninterestingCall
-
-GMOCK WARNING:
-Uninteresting mock function call - returning default value.
- Function call: Bar2(0, 1)
- Returns: false
-Stack trace:
-[ OK ] GMockOutputTest.UninterestingCall
-[ RUN ] GMockOutputTest.UninterestingCallToVoidFunction
-
-GMOCK WARNING:
-Uninteresting mock function call - returning directly.
- Function call: Bar3(0, 1)
-Stack trace:
-[ OK ] GMockOutputTest.UninterestingCallToVoidFunction
-[ RUN ] GMockOutputTest.RetiredExpectation
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar2(1, 1)
- Returns: false
-Google Mock tried the following 2 expectations, but none matched:
-
-FILE:#: tried expectation #0: EXPECT_CALL(foo_, Bar2(_, _))...
- Expected: the expectation is active
- Actual: it is retired
- Expected: to be called once
- Actual: called once - saturated and retired
-FILE:#: tried expectation #1: EXPECT_CALL(foo_, Bar2(0, 0))...
- Expected arg #0: is equal to 0
- Actual: 1
- Expected arg #1: is equal to 0
- Actual: 1
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.RetiredExpectation
-[ RUN ] GMockOutputTest.UnsatisfiedPrerequisite
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar2(1, 0)
- Returns: false
-Google Mock tried the following 2 expectations, but none matched:
-
-FILE:#: tried expectation #0: EXPECT_CALL(foo_, Bar2(0, 0))...
- Expected arg #0: is equal to 0
- Actual: 1
- Expected: to be called once
- Actual: never called - unsatisfied and active
-FILE:#: tried expectation #1: EXPECT_CALL(foo_, Bar2(1, _))...
- Expected: all pre-requisites are satisfied
- Actual: the following immediate pre-requisites are not satisfied:
-FILE:#: pre-requisite #0
- (end of pre-requisites)
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisite
-[ RUN ] GMockOutputTest.UnsatisfiedPrerequisites
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar2(1, 0)
- Returns: false
-Google Mock tried the following 2 expectations, but none matched:
-
-FILE:#: tried expectation #0: EXPECT_CALL(foo_, Bar2(0, 0))...
- Expected arg #0: is equal to 0
- Actual: 1
- Expected: to be called once
- Actual: never called - unsatisfied and active
-FILE:#: tried expectation #1: EXPECT_CALL(foo_, Bar2(1, _))...
- Expected: all pre-requisites are satisfied
- Actual: the following immediate pre-requisites are not satisfied:
-FILE:#: pre-requisite #0
-FILE:#: pre-requisite #1
- (end of pre-requisites)
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisites
-[ RUN ] GMockOutputTest.UnsatisfiedWith
-FILE:#: Failure
-Actual function call count doesn't match EXPECT_CALL(foo_, Bar2(_, _))...
- Expected args: are a pair where the first >= the second
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnsatisfiedWith
-[ RUN ] GMockOutputTest.UnsatisfiedExpectation
-FILE:#: Failure
-Actual function call count doesn't match EXPECT_CALL(foo_, Bar2(0, _))...
- Expected: to be called twice
- Actual: called once - unsatisfied and active
-FILE:#: Failure
-Actual function call count doesn't match EXPECT_CALL(foo_, Bar(_, _, _))...
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnsatisfiedExpectation
-[ RUN ] GMockOutputTest.MismatchArguments
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar(@0x# "Ho", 0, -0.1)
- Returns: '\0'
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar(Ref(s), _, Ge(0)))...
- Expected arg #0: references the variable @0x# "Hi"
- Actual: "Ho", which is located @0x#
- Expected arg #2: is >= 0
- Actual: -0.1
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.MismatchArguments
-[ RUN ] GMockOutputTest.MismatchWith
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar2(2, 3)
- Returns: false
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1)))...
- Expected args: are a pair where the first >= the second
- Actual: don't match
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.MismatchWith
-[ RUN ] GMockOutputTest.MismatchArgumentsAndWith
-unknown file: Failure
-
-Unexpected mock function call - returning default value.
- Function call: Bar2(1, 3)
- Returns: false
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1)))...
- Expected arg #0: is >= 2
- Actual: 1
- Expected args: are a pair where the first >= the second
- Actual: don't match
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.MismatchArgumentsAndWith
-[ RUN ] GMockOutputTest.UnexpectedCallWithDefaultAction
-unknown file: Failure
-
-Unexpected mock function call - taking default action specified at:
-FILE:#:
- Function call: Bar2(1, 0)
- Returns: false
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar2(2, 2))...
- Expected arg #0: is equal to 2
- Actual: 1
- Expected arg #1: is equal to 2
- Actual: 0
- Expected: to be called once
- Actual: never called - unsatisfied and active
-unknown file: Failure
-
-Unexpected mock function call - taking default action specified at:
-FILE:#:
- Function call: Bar2(0, 0)
- Returns: true
-Google Mock tried the following 1 expectation, but it didn't match:
-
-FILE:#: EXPECT_CALL(foo_, Bar2(2, 2))...
- Expected arg #0: is equal to 2
- Actual: 0
- Expected arg #1: is equal to 2
- Actual: 0
- Expected: to be called once
- Actual: never called - unsatisfied and active
-[ FAILED ] GMockOutputTest.UnexpectedCallWithDefaultAction
-[ RUN ] GMockOutputTest.ExcessiveCallWithDefaultAction
-FILE:#: Failure
-Mock function called more times than expected - taking default action specified at:
-FILE:#:
- Function call: Bar2(2, 2)
- Returns: true
- Expected: to be called once
- Actual: called twice - over-saturated and active
-FILE:#: Failure
-Mock function called more times than expected - taking default action specified at:
-FILE:#:
- Function call: Bar2(1, 1)
- Returns: false
- Expected: to be called once
- Actual: called twice - over-saturated and active
-[ FAILED ] GMockOutputTest.ExcessiveCallWithDefaultAction
-[ RUN ] GMockOutputTest.UninterestingCallWithDefaultAction
-
-GMOCK WARNING:
-Uninteresting mock function call - taking default action specified at:
-FILE:#:
- Function call: Bar2(2, 2)
- Returns: true
-Stack trace:
-
-GMOCK WARNING:
-Uninteresting mock function call - taking default action specified at:
-FILE:#:
- Function call: Bar2(1, 1)
- Returns: false
-Stack trace:
-[ OK ] GMockOutputTest.UninterestingCallWithDefaultAction
-[ RUN ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction
-
-GMOCK WARNING:
-FILE:#: Too few actions specified in EXPECT_CALL(foo_, Bar2(_, _))...
-Expected to be called twice, but has only 1 WillOnce().
-GMOCK WARNING:
-FILE:#: Actions ran out in EXPECT_CALL(foo_, Bar2(_, _))...
-Called 2 times, but only 1 WillOnce() is specified - taking default action specified at:
-FILE:#:
-Stack trace:
-[ OK ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction
-[ RUN ] GMockOutputTest.CatchesLeakedMocks
-[ OK ] GMockOutputTest.CatchesLeakedMocks
-[ FAILED ] GMockOutputTest.UnexpectedCall
-[ FAILED ] GMockOutputTest.UnexpectedCallToVoidFunction
-[ FAILED ] GMockOutputTest.ExcessiveCall
-[ FAILED ] GMockOutputTest.ExcessiveCallToVoidFunction
-[ FAILED ] GMockOutputTest.RetiredExpectation
-[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisite
-[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisites
-[ FAILED ] GMockOutputTest.UnsatisfiedWith
-[ FAILED ] GMockOutputTest.UnsatisfiedExpectation
-[ FAILED ] GMockOutputTest.MismatchArguments
-[ FAILED ] GMockOutputTest.MismatchWith
-[ FAILED ] GMockOutputTest.MismatchArgumentsAndWith
-[ FAILED ] GMockOutputTest.UnexpectedCallWithDefaultAction
-[ FAILED ] GMockOutputTest.ExcessiveCallWithDefaultAction
-
-
-FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#.
-FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#.
-FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#.
-ERROR: 3 leaked mock objects found at program exit.
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test.cc b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test.cc
deleted file mode 100644
index 0b891137a..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test.cc
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests code in gmock.cc.
-
-#include "gmock/gmock.h"
-
-#include <string>
-#include "gtest/gtest.h"
-
-using testing::GMOCK_FLAG(verbose);
-using testing::InitGoogleMock;
-using testing::internal::g_init_gtest_count;
-
-// Verifies that calling InitGoogleMock() on argv results in new_argv,
-// and the gmock_verbose flag's value is set to expected_gmock_verbose.
-template <typename Char, int M, int N>
-void TestInitGoogleMock(const Char* (&argv)[M], const Char* (&new_argv)[N],
- const ::std::string& expected_gmock_verbose) {
- const ::std::string old_verbose = GMOCK_FLAG(verbose);
-
- int argc = M;
- InitGoogleMock(&argc, const_cast<Char**>(argv));
- ASSERT_EQ(N, argc) << "The new argv has wrong number of elements.";
-
- for (int i = 0; i < N; i++) {
- EXPECT_STREQ(new_argv[i], argv[i]);
- }
-
- EXPECT_EQ(expected_gmock_verbose, GMOCK_FLAG(verbose).c_str());
- GMOCK_FLAG(verbose) = old_verbose; // Restores the gmock_verbose flag.
-}
-
-TEST(InitGoogleMockTest, ParsesInvalidCommandLine) {
- const char* argv[] = {
- NULL
- };
-
- const char* new_argv[] = {
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose));
-}
-
-TEST(InitGoogleMockTest, ParsesEmptyCommandLine) {
- const char* argv[] = {
- "foo.exe",
- NULL
- };
-
- const char* new_argv[] = {
- "foo.exe",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose));
-}
-
-TEST(InitGoogleMockTest, ParsesSingleFlag) {
- const char* argv[] = {
- "foo.exe",
- "--gmock_verbose=info",
- NULL
- };
-
- const char* new_argv[] = {
- "foo.exe",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, "info");
-}
-
-TEST(InitGoogleMockTest, ParsesUnrecognizedFlag) {
- const char* argv[] = {
- "foo.exe",
- "--non_gmock_flag=blah",
- NULL
- };
-
- const char* new_argv[] = {
- "foo.exe",
- "--non_gmock_flag=blah",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose));
-}
-
-TEST(InitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) {
- const char* argv[] = {
- "foo.exe",
- "--non_gmock_flag=blah",
- "--gmock_verbose=error",
- NULL
- };
-
- const char* new_argv[] = {
- "foo.exe",
- "--non_gmock_flag=blah",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, "error");
-}
-
-TEST(InitGoogleMockTest, CallsInitGoogleTest) {
- const int old_init_gtest_count = g_init_gtest_count;
- const char* argv[] = {
- "foo.exe",
- "--non_gmock_flag=blah",
- "--gmock_verbose=error",
- NULL
- };
-
- const char* new_argv[] = {
- "foo.exe",
- "--non_gmock_flag=blah",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, "error");
- EXPECT_EQ(old_init_gtest_count + 1, g_init_gtest_count);
-}
-
-TEST(WideInitGoogleMockTest, ParsesInvalidCommandLine) {
- const wchar_t* argv[] = {
- NULL
- };
-
- const wchar_t* new_argv[] = {
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose));
-}
-
-TEST(WideInitGoogleMockTest, ParsesEmptyCommandLine) {
- const wchar_t* argv[] = {
- L"foo.exe",
- NULL
- };
-
- const wchar_t* new_argv[] = {
- L"foo.exe",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose));
-}
-
-TEST(WideInitGoogleMockTest, ParsesSingleFlag) {
- const wchar_t* argv[] = {
- L"foo.exe",
- L"--gmock_verbose=info",
- NULL
- };
-
- const wchar_t* new_argv[] = {
- L"foo.exe",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, "info");
-}
-
-TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag) {
- const wchar_t* argv[] = {
- L"foo.exe",
- L"--non_gmock_flag=blah",
- NULL
- };
-
- const wchar_t* new_argv[] = {
- L"foo.exe",
- L"--non_gmock_flag=blah",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose));
-}
-
-TEST(WideInitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) {
- const wchar_t* argv[] = {
- L"foo.exe",
- L"--non_gmock_flag=blah",
- L"--gmock_verbose=error",
- NULL
- };
-
- const wchar_t* new_argv[] = {
- L"foo.exe",
- L"--non_gmock_flag=blah",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, "error");
-}
-
-TEST(WideInitGoogleMockTest, CallsInitGoogleTest) {
- const int old_init_gtest_count = g_init_gtest_count;
- const wchar_t* argv[] = {
- L"foo.exe",
- L"--non_gmock_flag=blah",
- L"--gmock_verbose=error",
- NULL
- };
-
- const wchar_t* new_argv[] = {
- L"foo.exe",
- L"--non_gmock_flag=blah",
- NULL
- };
-
- TestInitGoogleMock(argv, new_argv, "error");
- EXPECT_EQ(old_init_gtest_count + 1, g_init_gtest_count);
-}
-
-// Makes sure Google Mock flags can be accessed in code.
-TEST(FlagTest, IsAccessibleInCode) {
- bool dummy = testing::GMOCK_FLAG(catch_leaked_mocks) &&
- testing::GMOCK_FLAG(verbose) == "";
- (void)dummy; // Avoids the "unused local variable" warning.
-}
diff --git a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test_utils.py b/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test_utils.py
deleted file mode 100755
index ac3d67ae9..000000000
--- a/SDL_Core/src/thirdPartyLibs/gmock-1.6.0/test/gmock_test_utils.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test utilities for Google C++ Mocking Framework."""
-
-__author__ = 'wan@google.com (Zhanyong Wan)'
-
-import os
-import sys
-
-
-# Determines path to gtest_test_utils and imports it.
-SCRIPT_DIR = os.path.dirname(__file__) or '.'
-
-# isdir resolves symbolic links.
-gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../gtest/test')
-if os.path.isdir(gtest_tests_util_dir):
- GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir
-else:
- GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../gtest/test')
-
-sys.path.append(GTEST_TESTS_UTIL_DIR)
-import gtest_test_utils # pylint: disable-msg=C6204
-
-
-def GetSourceDir():
- """Returns the absolute path of the directory where the .py files are."""
-
- return gtest_test_utils.GetSourceDir()
-
-
-def GetTestExecutablePath(executable_name):
- """Returns the absolute path of the test binary given its name.
-
- The function will print a message and abort the program if the resulting file
- doesn't exist.
-
- Args:
- executable_name: name of the test binary that the test script runs.
-
- Returns:
- The absolute path of the test binary.
- """
-
- return gtest_test_utils.GetTestExecutablePath(executable_name)
-
-
-def GetExitStatus(exit_code):
- """Returns the argument to exit(), or -1 if exit() wasn't called.
-
- Args:
- exit_code: the result value of os.system(command).
- """
-
- if os.name == 'nt':
- # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns
- # the argument to exit() directly.
- return exit_code
- else:
- # On Unix, os.WEXITSTATUS() must be used to extract the exit status
- # from the result of os.system().
- if os.WIFEXITED(exit_code):
- return os.WEXITSTATUS(exit_code)
- else:
- return -1
-
-
-# Suppresses the "Invalid const name" lint complaint
-# pylint: disable-msg=C6409
-
-# Exposes Subprocess from gtest_test_utils.
-Subprocess = gtest_test_utils.Subprocess
-
-# Exposes TestCase from gtest_test_utils.
-TestCase = gtest_test_utils.TestCase
-
-# pylint: enable-msg=C6409
-
-
-def Main():
- """Runs the unit test."""
-
- gtest_test_utils.Main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/AUTHORS b/SDL_Core/src/thirdPartyLibs/jsoncpp/AUTHORS
deleted file mode 100644
index 333e120d6..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Baptiste Lepilleur <blep@users.sourceforge.net>
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/jsoncpp/CMakeLists.txt
deleted file mode 100644
index 6200180d2..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-include_directories (
- ./include/
-)
-
-set (SOURCES
- ./src/lib_json/json_value.cpp
- ./src/lib_json/json_writer.cpp
- ./src/lib_json/json_reader.cpp
-)
-
-add_library("jsoncpp" ${SOURCES}) \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/LICENSE b/SDL_Core/src/thirdPartyLibs/jsoncpp/LICENSE
deleted file mode 100644
index ca2bfe1a0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-The JsonCpp library's source code, including accompanying documentation,
-tests and demonstration applications, are licensed under the following
-conditions...
-
-The author (Baptiste Lepilleur) explicitly disclaims copyright in all
-jurisdictions which recognize such a disclaimer. In such jurisdictions,
-this software is released into the Public Domain.
-
-In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
-2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
-released under the terms of the MIT License (see below).
-
-In jurisdictions which recognize Public Domain property, the user of this
-software may choose to accept it either as 1) Public Domain, 2) under the
-conditions of the MIT License (see below), or 3) under the terms of dual
-Public Domain/MIT License conditions described here, as they choose.
-
-The MIT License is about as close to Public Domain as a license can get, and is
-described in clear, concise terms at:
-
- http://en.wikipedia.org/wiki/MIT_License
-
-The full text of the MIT License follows:
-
-========================================================================
-Copyright (c) 2007-2010 Baptiste Lepilleur
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-========================================================================
-(END LICENSE TEXT)
-
-The MIT license is compatible with both the GPL and commercial
-software, affording one all of the rights of Public Domain with the
-minor nuisance of being required to keep the above copyright notice
-and license text in the source code. Note also that by accepting the
-Public Domain "license" you can re-license your copy using whatever
-license you like.
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/NEWS.txt b/SDL_Core/src/thirdPartyLibs/jsoncpp/NEWS.txt
deleted file mode 100644
index e53b8802c..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/NEWS.txt
+++ /dev/null
@@ -1,101 +0,0 @@
- New in JsonCpp 0.6.0:
- ---------------------
-
-* Compilation
-
- - LD_LIBRARY_PATH and LIBRARY_PATH environment variables are now
- propagated to the build environment as this is required for some
- compiler installation.
-
- - Added support for Microsoft Visual Studio 2008 (bug #2930462):
- The platform "msvc90" has been added.
-
- Notes: you need to setup the environment by running vcvars32.bat
- (e.g. MSVC 2008 command prompt in start menu) before running scons.
-
- - Added support for amalgamated source and header generation (a la sqlite).
- Refer to README.txt section "Generating amalgamated source and header"
- for detail.
-
-* Value
-
- - Removed experimental ValueAllocator, it caused static
- initialization/destruction order issues (bug #2934500).
- The DefaultValueAllocator has been inlined in code.
-
- - Added support for 64 bits integer:
-
- Types Json::Int64 and Json::UInt64 have been added. They are aliased
- to 64 bits integers on system that support them (based on __int64 on
- Microsoft Visual Studio platform, and long long on other platforms).
-
- Types Json::LargestInt and Json::LargestUInt have been added. They are
- aliased to the largest integer type supported:
- either Json::Int/Json::UInt or Json::Int64/Json::UInt64 respectively.
-
- Json::Value::asInt() and Json::Value::asUInt() still returns plain
- "int" based types, but asserts if an attempt is made to retrieve
- a 64 bits value that can not represented as the return type.
-
- Json::Value::asInt64() and Json::Value::asUInt64() have been added
- to obtain the 64 bits integer value.
-
- Json::Value::asLargestInt() and Json::Value::asLargestUInt() returns
- the integer as a LargestInt/LargestUInt respectively. Those functions
- functions are typically used when implementing writer.
-
- The reader attempts to read number as 64 bits integer, and fall back
- to reading a double if the number is not in the range of 64 bits
- integer.
-
- Warning: Json::Value::asInt() and Json::Value::asUInt() now returns
- long long. This changes break code that was passing the return value
- to *printf() function.
-
- Support for 64 bits integer can be disabled by defining the macro
- JSON_NO_INT64 (uncomment it in json/config.h for example), though
- it should have no impact on existing usage.
-
- - The type Json::ArrayIndex is used for indexes of a JSON value array. It
- is an unsigned int (typically 32 bits).
-
- - Array index can be passed as int to operator[], allowing use of literal:
- Json::Value array;
- array.append( 1234 );
- int value = array[0].asInt(); // did not compile previously
-
- - Added float Json::Value::asFloat() to obtain a floating point value as a
- float (avoid lost of precision warning caused by used of asDouble()
- to initialize a float).
-
-* Reader
-
- - Renamed Reader::getFormatedErrorMessages() to getFormattedErrorMessages.
- Bug #3023708 (Formatted has 2 't'). The old member function is deprecated
- but still present for backward compatibility.
-
-* Tests
-
- - Added test to ensure that the escape sequence "\/" is corrected handled
- by the parser.
-
-* Bug fixes
-
- - Bug #3139677: JSON [1 2 3] was incorrectly parsed as [1, 3]. Error is now
- correctly detected.
-
- - Bug #3139678: stack buffer overflow when parsing a double with a
- length of 32 characters.
-
- - Fixed Value::operator <= implementation (had the semantic of operator >=).
- Found when addigin unit tests for comparison operators.
-
- - Value::compare() is now const and has an actual implementation with
- unit tests.
-
-* License
-
- - See file LICENSE for details. Basically JsonCpp is now licensed under
- MIT license, or public domain if desired and recognized in your jurisdiction.
- Thanks to Stephan G. Beal [http://wanderinghorse.net/home/stephan/]) who
- helped figuring out the solution to the public domain issue.
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/README.txt b/SDL_Core/src/thirdPartyLibs/jsoncpp/README.txt
deleted file mode 100644
index 51a098a81..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/README.txt
+++ /dev/null
@@ -1,172 +0,0 @@
-* Introduction:
- =============
-
-JSON (JavaScript Object Notation) is a lightweight data-interchange format.
-It can represent integer, real number, string, an ordered sequence of
-value, and a collection of name/value pairs.
-
-JsonCpp (http://jsoncpp.sourceforge.net/) is a simple API to manipulate
-JSON value, handle serialization and unserialization to string.
-
-It can also preserve existing comment in unserialization/serialization steps,
-making it a convenient format to store user input files.
-
-Unserialization parsing is user friendly and provides precise error reports.
-
-
-* Building/Testing:
- =================
-
-JsonCpp uses Scons (http://www.scons.org) as a build system. Scons requires
-python to be installed (http://www.python.org).
-
-You download scons-local distribution from the following url:
-http://sourceforge.net/projects/scons/files/scons-local/1.2.0/
-
-Unzip it in the directory where you found this README file. scons.py Should be
-at the same level as README.
-
-python scons.py platform=PLTFRM [TARGET]
-where PLTFRM may be one of:
- suncc Sun C++ (Solaris)
- vacpp Visual Age C++ (AIX)
- mingw
- msvc6 Microsoft Visual Studio 6 service pack 5-6
- msvc70 Microsoft Visual Studio 2002
- msvc71 Microsoft Visual Studio 2003
- msvc80 Microsoft Visual Studio 2005
- msvc90 Microsoft Visual Studio 2008
- linux-gcc Gnu C++ (linux, also reported to work for Mac OS X)
-
-Notes: if you are building with Microsoft Visual Studio 2008, you need to
-setup the environment by running vcvars32.bat (e.g. MSVC 2008 command prompt)
-before running scons.
-
-Adding platform is fairly simple. You need to change the Sconstruct file
-to do so.
-
-and TARGET may be:
- check: build library and run unit tests.
-
-
-* Running the test manually:
- ==========================
-
-Notes that test can be run by scons using the 'check' target (see above).
-
-You need to run test manually only if you are troubleshooting an issue.
-
-In the instruction below, replace "path to jsontest.exe" with the path
-of the 'jsontest' executable that was compiled on your platform.
-
-cd test
-# This will run the Reader/Writer tests
-python runjsontests.py "path to jsontest.exe"
-
-# This will run the Reader/Writer tests, using JSONChecker test suite
-# (http://www.json.org/JSON_checker/).
-# Notes: not all tests pass: JsonCpp is too lenient (for example,
-# it allows an integer to start with '0'). The goal is to improve
-# strict mode parsing to get all tests to pass.
-python runjsontests.py --with-json-checker "path to jsontest.exe"
-
-# This will run the unit tests (mostly Value)
-python rununittests.py "path to test_lib_json.exe"
-
-You can run the tests using valgrind:
-python rununittests.py --valgrind "path to test_lib_json.exe"
-
-
-* Building the documentation:
- ===========================
-
-Run the python script doxybuild.py from the top directory:
-
-python doxybuild.py --open --with-dot
-
-See doxybuild.py --help for options.
-
-Notes that the documentation is also available for download as a tarball.
-The documentation of the latest release is available online at:
-http://jsoncpp.sourceforge.net/
-
-* Generating amalgamated source and header
- ========================================
-
-JsonCpp is provided with a script to generate a single header and a single
-source file to ease inclusion in an existing project.
-
-The amalgamated source can be generated at any time by running the following
-command from the top-directory (requires python 2.6):
-
-python amalgamate.py
-
-It is possible to specify header name. See -h options for detail. By default,
-the following files are generated:
-- dist/jsoncpp.cpp: source file that need to be added to your project
-- dist/json/json.h: header file corresponding to use in your project. It is
-equivalent to including json/json.h in non-amalgamated source. This header
-only depends on standard headers.
-- dist/json/json-forwards.h: header the provides forward declaration
-of all JsonCpp types. This typically what should be included in headers to
-speed-up compilation.
-
-The amalgamated sources are generated by concatenating JsonCpp source in the
-correct order and defining macro JSON_IS_AMALGAMATION to prevent inclusion
-of other headers.
-
-* Using json-cpp in your project:
- ===============================
-
-include/ should be added to your compiler include path. jsoncpp headers
-should be included as follow:
-
-#include <json/json.h>
-
-
-* Adding a reader/writer test:
- ============================
-
-To add a test, you need to create two files in test/data:
-- a TESTNAME.json file, that contains the input document in JSON format.
-- a TESTNAME.expected file, that contains a flatened representation of
- the input document.
-
-TESTNAME.expected file format:
-- each line represents a JSON element of the element tree represented
- by the input document.
-- each line has two parts: the path to access the element separated from
- the element value by '='. Array and object values are always empty
- (e.g. represented by either [] or {}).
-- element path: '.' represented the root element, and is used to separate
- object members. [N] is used to specify the value of an array element
- at index N.
-See test_complex_01.json and test_complex_01.expected to better understand
-element path.
-
-
-* Understanding reader/writer test output:
- ========================================
-
-When a test is run, output files are generated aside the input test files.
-Below is a short description of the content of each file:
-
-- test_complex_01.json: input JSON document
-- test_complex_01.expected: flattened JSON element tree used to check if
- parsing was corrected.
-
-- test_complex_01.actual: flattened JSON element tree produced by
- jsontest.exe from reading test_complex_01.json
-- test_complex_01.rewrite: JSON document written by jsontest.exe using the
- Json::Value parsed from test_complex_01.json and serialized using
- Json::StyledWritter.
-- test_complex_01.actual-rewrite: flattened JSON element tree produced by
- jsontest.exe from reading test_complex_01.rewrite.
-test_complex_01.process-output: jsontest.exe output, typically useful to
- understand parsing error.
-
-* License
- =======
-
-See file LICENSE for details. Basically JsonCpp is licensed under
-MIT license, or public domain if desired and recognized in your jurisdiction.
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/SConstruct b/SDL_Core/src/thirdPartyLibs/jsoncpp/SConstruct
deleted file mode 100644
index e78a5e922..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/SConstruct
+++ /dev/null
@@ -1,248 +0,0 @@
-"""
-Notes:
-- shared library support is buggy: it assumes that a static and dynamic library can be build from the same object files. This is not true on many platforms. For this reason it is only enabled on linux-gcc at the current time.
-
-To add a platform:
-- add its name in options allowed_values below
-- add tool initialization for this platform. Search for "if platform == 'suncc'" as an example.
-"""
-
-import os
-import os.path
-import sys
-
-JSONCPP_VERSION = open(File('#version').abspath,'rt').read().strip()
-DIST_DIR = '#dist'
-
-options = Variables()
-options.Add( EnumVariable('platform',
- 'Platform (compiler/stl) used to build the project',
- 'msvc71',
- allowed_values='suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 msvc90 linux-gcc'.split(),
- ignorecase=2) )
-
-try:
- platform = ARGUMENTS['platform']
- if platform == 'linux-gcc':
- CXX = 'g++' # not quite right, but env is not yet available.
- import commands
- version = commands.getoutput('%s -dumpversion' %CXX)
- platform = 'linux-gcc-%s' %version
- print "Using platform '%s'" %platform
- LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH', '')
- LD_LIBRARY_PATH = "%s:libs/%s" %(LD_LIBRARY_PATH, platform)
- os.environ['LD_LIBRARY_PATH'] = LD_LIBRARY_PATH
- print "LD_LIBRARY_PATH =", LD_LIBRARY_PATH
-except KeyError:
- print 'You must specify a "platform"'
- sys.exit(2)
-
-print "Building using PLATFORM =", platform
-
-rootbuild_dir = Dir('#buildscons')
-build_dir = os.path.join( '#buildscons', platform )
-bin_dir = os.path.join( '#bin', platform )
-lib_dir = os.path.join( '#libs', platform )
-sconsign_dir_path = Dir(build_dir).abspath
-sconsign_path = os.path.join( sconsign_dir_path, '.sconsign.dbm' )
-
-# Ensure build directory exist (SConsignFile fail otherwise!)
-if not os.path.exists( sconsign_dir_path ):
- os.makedirs( sconsign_dir_path )
-
-# Store all dependencies signature in a database
-SConsignFile( sconsign_path )
-
-def make_environ_vars():
- """Returns a dictionnary with environment variable to use when compiling."""
- # PATH is required to find the compiler
- # TEMP is required for at least mingw
- # LD_LIBRARY_PATH & co is required on some system for the compiler
- vars = {}
- for name in ('PATH', 'TEMP', 'TMP', 'LD_LIBRARY_PATH', 'LIBRARY_PATH'):
- if name in os.environ:
- vars[name] = os.environ[name]
- return vars
-
-
-env = Environment( ENV = make_environ_vars(),
- toolpath = ['scons-tools'],
- tools=[] ) #, tools=['default'] )
-
-if platform == 'suncc':
- env.Tool( 'sunc++' )
- env.Tool( 'sunlink' )
- env.Tool( 'sunar' )
- env.Append( CCFLAGS = ['-mt'] )
-elif platform == 'vacpp':
- env.Tool( 'default' )
- env.Tool( 'aixcc' )
- env['CXX'] = 'xlC_r' #scons does not pick-up the correct one !
- # using xlC_r ensure multi-threading is enabled:
- # http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.vacpp7a.doc/compiler/ref/cuselect.htm
- env.Append( CCFLAGS = '-qrtti=all',
- LINKFLAGS='-bh:5' ) # -bh:5 remove duplicate symbol warning
-elif platform == 'msvc6':
- env['MSVS_VERSION']='6.0'
- for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
- env.Tool( tool )
- env['CXXFLAGS']='-GR -GX /nologo /MT'
-elif platform == 'msvc70':
- env['MSVS_VERSION']='7.0'
- for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
- env.Tool( tool )
- env['CXXFLAGS']='-GR -GX /nologo /MT'
-elif platform == 'msvc71':
- env['MSVS_VERSION']='7.1'
- for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
- env.Tool( tool )
- env['CXXFLAGS']='-GR -GX /nologo /MT'
-elif platform == 'msvc80':
- env['MSVS_VERSION']='8.0'
- for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
- env.Tool( tool )
- env['CXXFLAGS']='-GR -EHsc /nologo /MT'
-elif platform == 'msvc90':
- env['MSVS_VERSION']='9.0'
- # Scons 1.2 fails to detect the correct location of the platform SDK.
- # So we propagate those from the environment. This requires that the
- # user run vcvars32.bat before compiling.
- if 'INCLUDE' in os.environ:
- env['ENV']['INCLUDE'] = os.environ['INCLUDE']
- if 'LIB' in os.environ:
- env['ENV']['LIB'] = os.environ['LIB']
- for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
- env.Tool( tool )
- env['CXXFLAGS']='-GR -EHsc /nologo /MT'
-elif platform == 'mingw':
- env.Tool( 'mingw' )
- env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
-elif platform.startswith('linux-gcc'):
- env.Tool( 'default' )
- env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
- env['SHARED_LIB_ENABLED'] = True
-else:
- print "UNSUPPORTED PLATFORM."
- env.Exit(1)
-
-env.Tool('targz')
-env.Tool('srcdist')
-env.Tool('globtool')
-
-env.Append( CPPPATH = ['#include'],
- LIBPATH = lib_dir )
-short_platform = platform
-if short_platform.startswith('msvc'):
- short_platform = short_platform[2:]
-# Notes: on Windows you need to rebuild the source for each variant
-# Build script does not support that yet so we only build static libraries.
-# This also fails on AIX because both dynamic and static library ends with
-# extension .a.
-env['SHARED_LIB_ENABLED'] = env.get('SHARED_LIB_ENABLED', False)
-env['LIB_PLATFORM'] = short_platform
-env['LIB_LINK_TYPE'] = 'lib' # static
-env['LIB_CRUNTIME'] = 'mt'
-env['LIB_NAME_SUFFIX'] = '${LIB_PLATFORM}_${LIB_LINK_TYPE}${LIB_CRUNTIME}' # must match autolink naming convention
-env['JSONCPP_VERSION'] = JSONCPP_VERSION
-env['BUILD_DIR'] = env.Dir(build_dir)
-env['ROOTBUILD_DIR'] = env.Dir(rootbuild_dir)
-env['DIST_DIR'] = DIST_DIR
-if 'TarGz' in env['BUILDERS']:
- class SrcDistAdder:
- def __init__( self, env ):
- self.env = env
- def __call__( self, *args, **kw ):
- apply( self.env.SrcDist, (self.env['SRCDIST_TARGET'],) + args, kw )
- env['SRCDIST_BUILDER'] = env.TarGz
-else: # If tarfile module is missing
- class SrcDistAdder:
- def __init__( self, env ):
- pass
- def __call__( self, *args, **kw ):
- pass
-env['SRCDIST_ADD'] = SrcDistAdder( env )
-env['SRCDIST_TARGET'] = os.path.join( DIST_DIR, 'jsoncpp-src-%s.tar.gz' % env['JSONCPP_VERSION'] )
-
-env_testing = env.Clone( )
-env_testing.Append( LIBS = ['json_${LIB_NAME_SUFFIX}'] )
-
-def buildJSONExample( env, target_sources, target_name ):
- env = env.Clone()
- env.Append( CPPPATH = ['#'] )
- exe = env.Program( target=target_name,
- source=target_sources )
- env['SRCDIST_ADD']( source=[target_sources] )
- global bin_dir
- return env.Install( bin_dir, exe )
-
-def buildJSONTests( env, target_sources, target_name ):
- jsontests_node = buildJSONExample( env, target_sources, target_name )
- check_alias_target = env.Alias( 'check', jsontests_node, RunJSONTests( jsontests_node, jsontests_node ) )
- env.AlwaysBuild( check_alias_target )
-
-def buildUnitTests( env, target_sources, target_name ):
- jsontests_node = buildJSONExample( env, target_sources, target_name )
- check_alias_target = env.Alias( 'check', jsontests_node,
- RunUnitTests( jsontests_node, jsontests_node ) )
- env.AlwaysBuild( check_alias_target )
-
-def buildLibrary( env, target_sources, target_name ):
- static_lib = env.StaticLibrary( target=target_name + '_${LIB_NAME_SUFFIX}',
- source=target_sources )
- global lib_dir
- env.Install( lib_dir, static_lib )
- if env['SHARED_LIB_ENABLED']:
- shared_lib = env.SharedLibrary( target=target_name + '_${LIB_NAME_SUFFIX}',
- source=target_sources )
- env.Install( lib_dir, shared_lib )
- env['SRCDIST_ADD']( source=[target_sources] )
-
-Export( 'env env_testing buildJSONExample buildLibrary buildJSONTests buildUnitTests' )
-
-def buildProjectInDirectory( target_directory ):
- global build_dir
- target_build_dir = os.path.join( build_dir, target_directory )
- target = os.path.join( target_directory, 'sconscript' )
- SConscript( target, build_dir=target_build_dir, duplicate=0 )
- env['SRCDIST_ADD']( source=[target] )
-
-
-def runJSONTests_action( target, source = None, env = None ):
- # Add test scripts to python path
- jsontest_path = Dir( '#test' ).abspath
- sys.path.insert( 0, jsontest_path )
- data_path = os.path.join( jsontest_path, 'data' )
- import runjsontests
- return runjsontests.runAllTests( os.path.abspath(source[0].path), data_path )
-
-def runJSONTests_string( target, source = None, env = None ):
- return 'RunJSONTests("%s")' % source[0]
-
-import SCons.Action
-ActionFactory = SCons.Action.ActionFactory
-RunJSONTests = ActionFactory(runJSONTests_action, runJSONTests_string )
-
-def runUnitTests_action( target, source = None, env = None ):
- # Add test scripts to python path
- jsontest_path = Dir( '#test' ).abspath
- sys.path.insert( 0, jsontest_path )
- import rununittests
- return rununittests.runAllTests( os.path.abspath(source[0].path) )
-
-def runUnitTests_string( target, source = None, env = None ):
- return 'RunUnitTests("%s")' % source[0]
-
-RunUnitTests = ActionFactory(runUnitTests_action, runUnitTests_string )
-
-env.Alias( 'check' )
-
-srcdist_cmd = env['SRCDIST_ADD']( source = """
- AUTHORS README.txt SConstruct
- """.split() )
-env.Alias( 'src-dist', srcdist_cmd )
-
-buildProjectInDirectory( 'src/jsontestrunner' )
-buildProjectInDirectory( 'src/lib_json' )
-buildProjectInDirectory( 'src/test_lib_json' )
-#print env.Dump()
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/amalgamate.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/amalgamate.py
deleted file mode 100644
index 6e3b11a0a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/amalgamate.py
+++ /dev/null
@@ -1,147 +0,0 @@
-"""Amalgate json-cpp library sources into a single source and header file.
-
-Requires Python 2.6
-
-Example of invocation (must be invoked from json-cpp top directory):
-python amalgate.py
-"""
-import os
-import os.path
-import sys
-
-class AmalgamationFile:
- def __init__( self, top_dir ):
- self.top_dir = top_dir
- self.blocks = []
-
- def add_text( self, text ):
- if not text.endswith( '\n' ):
- text += '\n'
- self.blocks.append( text )
-
- def add_file( self, relative_input_path, wrap_in_comment=False ):
- def add_marker( prefix ):
- self.add_text( '' )
- self.add_text( '// ' + '/'*70 )
- self.add_text( '// %s of content of file: %s' % (prefix, relative_input_path.replace('\\','/')) )
- self.add_text( '// ' + '/'*70 )
- self.add_text( '' )
- add_marker( 'Beginning' )
- f = open( os.path.join( self.top_dir, relative_input_path ), 'rt' )
- content = f.read()
- if wrap_in_comment:
- content = '/*\n' + content + '\n*/'
- self.add_text( content )
- f.close()
- add_marker( 'End' )
- self.add_text( '\n\n\n\n' )
-
- def get_value( self ):
- return ''.join( self.blocks ).replace('\r\n','\n')
-
- def write_to( self, output_path ):
- output_dir = os.path.dirname( output_path )
- if output_dir and not os.path.isdir( output_dir ):
- os.makedirs( output_dir )
- f = open( output_path, 'wb' )
- f.write( self.get_value() )
- f.close()
-
-def amalgamate_source( source_top_dir=None,
- target_source_path=None,
- header_include_path=None ):
- """Produces amalgated source.
- Parameters:
- source_top_dir: top-directory
- target_source_path: output .cpp path
- header_include_path: generated header path relative to target_source_path.
- """
- print 'Amalgating header...'
- header = AmalgamationFile( source_top_dir )
- header.add_text( '/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).' )
- header.add_text( '/// It is intented to be used with #include <%s>' % header_include_path )
- header.add_file( 'LICENSE', wrap_in_comment=True )
- header.add_text( '#ifndef JSON_AMALGATED_H_INCLUDED' )
- header.add_text( '# define JSON_AMALGATED_H_INCLUDED' )
- header.add_text( '/// If defined, indicates that the source file is amalgated' )
- header.add_text( '/// to prevent private header inclusion.' )
- header.add_text( '#define JSON_IS_AMALGATED' )
- header.add_file( 'include/json/config.h' )
- header.add_file( 'include/json/forwards.h' )
- header.add_file( 'include/json/features.h' )
- header.add_file( 'include/json/value.h' )
- header.add_file( 'include/json/reader.h' )
- header.add_file( 'include/json/writer.h' )
- header.add_text( '#endif //ifndef JSON_AMALGATED_H_INCLUDED' )
-
- target_header_path = os.path.join( os.path.dirname(target_source_path), header_include_path )
- print 'Writing amalgated header to %r' % target_header_path
- header.write_to( target_header_path )
-
- base, ext = os.path.splitext( header_include_path )
- forward_header_include_path = base + '-forwards' + ext
- print 'Amalgating forward header...'
- header = AmalgamationFile( source_top_dir )
- header.add_text( '/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).' )
- header.add_text( '/// It is intented to be used with #include <%s>' % forward_header_include_path )
- header.add_text( '/// This header provides forward declaration for all JsonCpp types.' )
- header.add_file( 'LICENSE', wrap_in_comment=True )
- header.add_text( '#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED' )
- header.add_text( '# define JSON_FORWARD_AMALGATED_H_INCLUDED' )
- header.add_text( '/// If defined, indicates that the source file is amalgated' )
- header.add_text( '/// to prevent private header inclusion.' )
- header.add_text( '#define JSON_IS_AMALGATED' )
- header.add_file( 'include/json/config.h' )
- header.add_file( 'include/json/forwards.h' )
- header.add_text( '#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED' )
-
- target_forward_header_path = os.path.join( os.path.dirname(target_source_path),
- forward_header_include_path )
- print 'Writing amalgated forward header to %r' % target_forward_header_path
- header.write_to( target_forward_header_path )
-
- print 'Amalgating source...'
- source = AmalgamationFile( source_top_dir )
- source.add_text( '/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).' )
- source.add_text( '/// It is intented to be used with #include <%s>' % header_include_path )
- source.add_file( 'LICENSE', wrap_in_comment=True )
- source.add_text( '' )
- source.add_text( '#include <%s>' % header_include_path )
- source.add_text( '' )
- source.add_file( 'src/lib_json\json_tool.h' )
- source.add_file( 'src/lib_json\json_reader.cpp' )
- source.add_file( 'src/lib_json\json_batchallocator.h' )
- source.add_file( 'src/lib_json\json_valueiterator.inl' )
- source.add_file( 'src/lib_json\json_value.cpp' )
- source.add_file( 'src/lib_json\json_writer.cpp' )
-
- print 'Writing amalgated source to %r' % target_source_path
- source.write_to( target_source_path )
-
-def main():
- usage = """%prog [options]
-Generate a single amalgated source and header file from the sources.
-"""
- from optparse import OptionParser
- parser = OptionParser(usage=usage)
- parser.allow_interspersed_args = False
- parser.add_option('-s', '--source', dest="target_source_path", action='store', default='dist/jsoncpp.cpp',
- help="""Output .cpp source path. [Default: %default]""")
- parser.add_option('-i', '--include', dest="header_include_path", action='store', default='json/json.h',
- help="""Header include path. Used to include the header from the amalgated source file. [Default: %default]""")
- parser.add_option('-t', '--top-dir', dest="top_dir", action='store', default=os.getcwd(),
- help="""Source top-directory. [Default: %default]""")
- parser.enable_interspersed_args()
- options, args = parser.parse_args()
-
- msg = amalgamate_source( source_top_dir=options.top_dir,
- target_source_path=options.target_source_path,
- header_include_path=options.header_include_path )
- if msg:
- sys.stderr.write( msg + '\n' )
- sys.exit( 1 )
- else:
- print 'Source succesfully amalagated'
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/__init__.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/__init__.py
deleted file mode 100644
index 15c796c7e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# module
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/antglob.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/antglob.py
deleted file mode 100644
index 30837b576..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/antglob.py
+++ /dev/null
@@ -1,201 +0,0 @@
-#!/usr/bin/env python
-# encoding: utf-8
-# Baptiste Lepilleur, 2009
-
-from dircache import listdir
-import re
-import fnmatch
-import os.path
-
-
-# These fnmatch expressions are used by default to prune the directory tree
-# while doing the recursive traversal in the glob_impl method of glob function.
-prune_dirs = '.git .bzr .hg .svn _MTN _darcs CVS SCCS '
-
-# These fnmatch expressions are used by default to exclude files and dirs
-# while doing the recursive traversal in the glob_impl method of glob function.
-##exclude_pats = prune_pats + '*~ #*# .#* %*% ._* .gitignore .cvsignore vssver.scc .DS_Store'.split()
-
-# These ant_glob expressions are used by default to exclude files and dirs and also prune the directory tree
-# while doing the recursive traversal in the glob_impl method of glob function.
-default_excludes = '''
-**/*~
-**/#*#
-**/.#*
-**/%*%
-**/._*
-**/CVS
-**/CVS/**
-**/.cvsignore
-**/SCCS
-**/SCCS/**
-**/vssver.scc
-**/.svn
-**/.svn/**
-**/.git
-**/.git/**
-**/.gitignore
-**/.bzr
-**/.bzr/**
-**/.hg
-**/.hg/**
-**/_MTN
-**/_MTN/**
-**/_darcs
-**/_darcs/**
-**/.DS_Store '''
-
-DIR = 1
-FILE = 2
-DIR_LINK = 4
-FILE_LINK = 8
-LINKS = DIR_LINK | FILE_LINK
-ALL_NO_LINK = DIR | FILE
-ALL = DIR | FILE | LINKS
-
-_ANT_RE = re.compile( r'(/\*\*/)|(\*\*/)|(/\*\*)|(\*)|(/)|([^\*/]*)' )
-
-def ant_pattern_to_re( ant_pattern ):
- """Generates a regular expression from the ant pattern.
- Matching convention:
- **/a: match 'a', 'dir/a', 'dir1/dir2/a'
- a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b'
- *.py: match 'script.py' but not 'a/script.py'
- """
- rex = ['^']
- next_pos = 0
- sep_rex = r'(?:/|%s)' % re.escape( os.path.sep )
-## print 'Converting', ant_pattern
- for match in _ANT_RE.finditer( ant_pattern ):
-## print 'Matched', match.group()
-## print match.start(0), next_pos
- if match.start(0) != next_pos:
- raise ValueError( "Invalid ant pattern" )
- if match.group(1): # /**/
- rex.append( sep_rex + '(?:.*%s)?' % sep_rex )
- elif match.group(2): # **/
- rex.append( '(?:.*%s)?' % sep_rex )
- elif match.group(3): # /**
- rex.append( sep_rex + '.*' )
- elif match.group(4): # *
- rex.append( '[^/%s]*' % re.escape(os.path.sep) )
- elif match.group(5): # /
- rex.append( sep_rex )
- else: # somepath
- rex.append( re.escape(match.group(6)) )
- next_pos = match.end()
- rex.append('$')
- return re.compile( ''.join( rex ) )
-
-def _as_list( l ):
- if isinstance(l, basestring):
- return l.split()
- return l
-
-def glob(dir_path,
- includes = '**/*',
- excludes = default_excludes,
- entry_type = FILE,
- prune_dirs = prune_dirs,
- max_depth = 25):
- include_filter = [ant_pattern_to_re(p) for p in _as_list(includes)]
- exclude_filter = [ant_pattern_to_re(p) for p in _as_list(excludes)]
- prune_dirs = [p.replace('/',os.path.sep) for p in _as_list(prune_dirs)]
- dir_path = dir_path.replace('/',os.path.sep)
- entry_type_filter = entry_type
-
- def is_pruned_dir( dir_name ):
- for pattern in prune_dirs:
- if fnmatch.fnmatch( dir_name, pattern ):
- return True
- return False
-
- def apply_filter( full_path, filter_rexs ):
- """Return True if at least one of the filter regular expression match full_path."""
- for rex in filter_rexs:
- if rex.match( full_path ):
- return True
- return False
-
- def glob_impl( root_dir_path ):
- child_dirs = [root_dir_path]
- while child_dirs:
- dir_path = child_dirs.pop()
- for entry in listdir( dir_path ):
- full_path = os.path.join( dir_path, entry )
-## print 'Testing:', full_path,
- is_dir = os.path.isdir( full_path )
- if is_dir and not is_pruned_dir( entry ): # explore child directory ?
-## print '===> marked for recursion',
- child_dirs.append( full_path )
- included = apply_filter( full_path, include_filter )
- rejected = apply_filter( full_path, exclude_filter )
- if not included or rejected: # do not include entry ?
-## print '=> not included or rejected'
- continue
- link = os.path.islink( full_path )
- is_file = os.path.isfile( full_path )
- if not is_file and not is_dir:
-## print '=> unknown entry type'
- continue
- if link:
- entry_type = is_file and FILE_LINK or DIR_LINK
- else:
- entry_type = is_file and FILE or DIR
-## print '=> type: %d' % entry_type,
- if (entry_type & entry_type_filter) != 0:
-## print ' => KEEP'
- yield os.path.join( dir_path, entry )
-## else:
-## print ' => TYPE REJECTED'
- return list( glob_impl( dir_path ) )
-
-
-if __name__ == "__main__":
- import unittest
-
- class AntPatternToRETest(unittest.TestCase):
-## def test_conversion( self ):
-## self.assertEqual( '^somepath$', ant_pattern_to_re( 'somepath' ).pattern )
-
- def test_matching( self ):
- test_cases = [ ( 'path',
- ['path'],
- ['somepath', 'pathsuffix', '/path', '/path'] ),
- ( '*.py',
- ['source.py', 'source.ext.py', '.py'],
- ['path/source.py', '/.py', 'dir.py/z', 'z.pyc', 'z.c'] ),
- ( '**/path',
- ['path', '/path', '/a/path', 'c:/a/path', '/a/b/path', '//a/path', '/a/path/b/path'],
- ['path/', 'a/path/b', 'dir.py/z', 'somepath', 'pathsuffix', 'a/somepath'] ),
- ( 'path/**',
- ['path/a', 'path/path/a', 'path//'],
- ['path', 'somepath/a', 'a/path', 'a/path/a', 'pathsuffix/a'] ),
- ( '/**/path',
- ['/path', '/a/path', '/a/b/path/path', '/path/path'],
- ['path', 'path/', 'a/path', '/pathsuffix', '/somepath'] ),
- ( 'a/b',
- ['a/b'],
- ['somea/b', 'a/bsuffix', 'a/b/c'] ),
- ( '**/*.py',
- ['script.py', 'src/script.py', 'a/b/script.py', '/a/b/script.py'],
- ['script.pyc', 'script.pyo', 'a.py/b'] ),
- ( 'src/**/*.py',
- ['src/a.py', 'src/dir/a.py'],
- ['a/src/a.py', '/src/a.py'] ),
- ]
- for ant_pattern, accepted_matches, rejected_matches in list(test_cases):
- def local_path( paths ):
- return [ p.replace('/',os.path.sep) for p in paths ]
- test_cases.append( (ant_pattern, local_path(accepted_matches), local_path( rejected_matches )) )
- for ant_pattern, accepted_matches, rejected_matches in test_cases:
- rex = ant_pattern_to_re( ant_pattern )
- print 'ant_pattern:', ant_pattern, ' => ', rex.pattern
- for accepted_match in accepted_matches:
- print 'Accepted?:', accepted_match
- self.assert_( rex.match( accepted_match ) is not None )
- for rejected_match in rejected_matches:
- print 'Rejected?:', rejected_match
- self.assert_( rex.match( rejected_match ) is None )
-
- unittest.main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/fixeol.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/fixeol.py
deleted file mode 100644
index 4fed6ce4b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/fixeol.py
+++ /dev/null
@@ -1,63 +0,0 @@
-import os.path
-
-def fix_source_eol( path, is_dry_run = True, verbose = True, eol = '\n' ):
- """Makes sure that all sources have the specified eol sequence (default: unix)."""
- if not os.path.isfile( path ):
- raise ValueError( 'Path "%s" is not a file' % path )
- try:
- f = open(path, 'rb')
- except IOError, msg:
- print >> sys.stderr, "%s: I/O Error: %s" % (file, str(msg))
- return False
- try:
- raw_lines = f.readlines()
- finally:
- f.close()
- fixed_lines = [line.rstrip('\r\n') + eol for line in raw_lines]
- if raw_lines != fixed_lines:
- print '%s =>' % path,
- if not is_dry_run:
- f = open(path, "wb")
- try:
- f.writelines(fixed_lines)
- finally:
- f.close()
- if verbose:
- print is_dry_run and ' NEED FIX' or ' FIXED'
- return True
-##
-##
-##
-##def _do_fix( is_dry_run = True ):
-## from waftools import antglob
-## python_sources = antglob.glob( '.',
-## includes = '**/*.py **/wscript **/wscript_build',
-## excludes = antglob.default_excludes + './waf.py',
-## prune_dirs = antglob.prune_dirs + 'waf-* ./build' )
-## for path in python_sources:
-## _fix_python_source( path, is_dry_run )
-##
-## cpp_sources = antglob.glob( '.',
-## includes = '**/*.cpp **/*.h **/*.inl',
-## prune_dirs = antglob.prune_dirs + 'waf-* ./build' )
-## for path in cpp_sources:
-## _fix_source_eol( path, is_dry_run )
-##
-##
-##def dry_fix(context):
-## _do_fix( is_dry_run = True )
-##
-##def fix(context):
-## _do_fix( is_dry_run = False )
-##
-##def shutdown():
-## pass
-##
-##def check(context):
-## # Unit tests are run when "check" target is used
-## ut = UnitTest.unit_test()
-## ut.change_to_testfile_dir = True
-## ut.want_to_see_test_output = True
-## ut.want_to_see_test_error = True
-## ut.run()
-## ut.print_results()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/licenseupdater.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/licenseupdater.py
deleted file mode 100644
index 866eada22..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/licenseupdater.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""Updates the license text in source file.
-"""
-
-# An existing license is found if the file starts with the string below,
-# and ends with the first blank line.
-LICENSE_BEGIN = "// Copyright "
-
-BRIEF_LICENSE = LICENSE_BEGIN + """2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-""".replace('\r\n','\n')
-
-def update_license( path, dry_run, show_diff ):
- """Update the license statement in the specified file.
- Parameters:
- path: path of the C++ source file to update.
- dry_run: if True, just print the path of the file that would be updated,
- but don't change it.
- show_diff: if True, print the path of the file that would be modified,
- as well as the change made to the file.
- """
- with open( path, 'rt' ) as fin:
- original_text = fin.read().replace('\r\n','\n')
- newline = fin.newlines and fin.newlines[0] or '\n'
- if not original_text.startswith( LICENSE_BEGIN ):
- # No existing license found => prepend it
- new_text = BRIEF_LICENSE + original_text
- else:
- license_end_index = original_text.index( '\n\n' ) # search first blank line
- new_text = BRIEF_LICENSE + original_text[license_end_index+2:]
- if original_text != new_text:
- if not dry_run:
- with open( path, 'wb' ) as fout:
- fout.write( new_text.replace('\n', newline ) )
- print 'Updated', path
- if show_diff:
- import difflib
- print '\n'.join( difflib.unified_diff( original_text.split('\n'),
- new_text.split('\n') ) )
- return True
- return False
-
-def update_license_in_source_directories( source_dirs, dry_run, show_diff ):
- """Updates license text in C++ source files found in directory source_dirs.
- Parameters:
- source_dirs: list of directory to scan for C++ sources. Directories are
- scanned recursively.
- dry_run: if True, just print the path of the file that would be updated,
- but don't change it.
- show_diff: if True, print the path of the file that would be modified,
- as well as the change made to the file.
- """
- from devtools import antglob
- prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist'
- for source_dir in source_dirs:
- cpp_sources = antglob.glob( source_dir,
- includes = '''**/*.h **/*.cpp **/*.inl''',
- prune_dirs = prune_dirs )
- for source in cpp_sources:
- update_license( source, dry_run, show_diff )
-
-def main():
- usage = """%prog DIR [DIR2...]
-Updates license text in sources of the project in source files found
-in the directory specified on the command-line.
-
-Example of call:
-python devtools\licenseupdater.py include src -n --diff
-=> Show change that would be made to the sources.
-
-python devtools\licenseupdater.py include src
-=> Update license statement on all sources in directories include/ and src/.
-"""
- from optparse import OptionParser
- parser = OptionParser(usage=usage)
- parser.allow_interspersed_args = False
- parser.add_option('-n', '--dry-run', dest="dry_run", action='store_true', default=False,
- help="""Only show what files are updated, do not update the files""")
- parser.add_option('--diff', dest="show_diff", action='store_true', default=False,
- help="""On update, show change made to the file.""")
- parser.enable_interspersed_args()
- options, args = parser.parse_args()
- update_license_in_source_directories( args, options.dry_run, options.show_diff )
- print 'Done'
-
-if __name__ == '__main__':
- import sys
- import os.path
- sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
- main()
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/tarball.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/tarball.py
deleted file mode 100644
index ccbda3942..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/devtools/tarball.py
+++ /dev/null
@@ -1,53 +0,0 @@
-import os.path
-import gzip
-import tarfile
-
-TARGZ_DEFAULT_COMPRESSION_LEVEL = 9
-
-def make_tarball(tarball_path, sources, base_dir, prefix_dir=''):
- """Parameters:
- tarball_path: output path of the .tar.gz file
- sources: list of sources to include in the tarball, relative to the current directory
- base_dir: if a source file is in a sub-directory of base_dir, then base_dir is stripped
- from path in the tarball.
- prefix_dir: all files stored in the tarball be sub-directory of prefix_dir. Set to ''
- to make them child of root.
- """
- base_dir = os.path.normpath( os.path.abspath( base_dir ) )
- def archive_name( path ):
- """Makes path relative to base_dir."""
- path = os.path.normpath( os.path.abspath( path ) )
- common_path = os.path.commonprefix( (base_dir, path) )
- archive_name = path[len(common_path):]
- if os.path.isabs( archive_name ):
- archive_name = archive_name[1:]
- return os.path.join( prefix_dir, archive_name )
- def visit(tar, dirname, names):
- for name in names:
- path = os.path.join(dirname, name)
- if os.path.isfile(path):
- path_in_tar = archive_name(path)
- tar.add(path, path_in_tar )
- compression = TARGZ_DEFAULT_COMPRESSION_LEVEL
- tar = tarfile.TarFile.gzopen( tarball_path, 'w', compresslevel=compression )
- try:
- for source in sources:
- source_path = source
- if os.path.isdir( source ):
- os.path.walk(source_path, visit, tar)
- else:
- path_in_tar = archive_name(source_path)
- tar.add(source_path, path_in_tar ) # filename, arcname
- finally:
- tar.close()
-
-def decompress( tarball_path, base_dir ):
- """Decompress the gzipped tarball into directory base_dir.
- """
- # !!! This class method is not documented in the online doc
- # nor is bz2open!
- tar = tarfile.TarFile.gzopen(tarball_path, mode='r')
- try:
- tar.extractall( base_dir )
- finally:
- tar.close()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/doxyfile.in b/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/doxyfile.in
deleted file mode 100644
index 48861d238..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/doxyfile.in
+++ /dev/null
@@ -1,1534 +0,0 @@
-# Doxyfile 1.5.9
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = "JsonCpp"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = %JSONCPP_VERSION%
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = %DOC_TOPDIR%
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH = %TOPDIR%
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH = %TOPDIR%/include
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 3
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES = "testCaseSetup=\link CppUT::TestCase::setUp() setUp()\endlink" \
- "testCaseRun=\link CppUT::TestCase::run() run()\endlink" \
- "testCaseTearDown=\link CppUT::TestCase::tearDown() tearDown()\endlink" \
- "json_ref=<a HREF='http://www.json.org/'>JSON (JavaScript Object Notation)</a>"
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it parses.
-# With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this tag.
-# The format is ext=language, where ext is a file extension, and language is one of
-# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
-# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
-# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
-# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = YES
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = NO
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = YES
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = YES
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = NO
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = NO
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
-# doxygen. The layout file controls the global structure of the generated output files
-# in an output format independent way. The create the layout file that represents
-# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
-# file name after the option, if omitted DoxygenLayout.xml will be used as the name
-# of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE = %WARNING_LOG_PATH%
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = ../include ../src/lib_json .
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.h \
- *.cpp \
- *.inl \
- *.dox
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = %HTML_OUTPUT%
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = %HTML_HELP%
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE = jsoncpp-%JSONCPP_VERSION%.chm
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION = "c:\Program Files\HTML Help Workshop\hhc.exe"
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = YES
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = YES
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
-# are set, an additional index file will be generated that can be used as input for
-# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
-# HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE =
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
-# For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to FRAME, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature. Other possible values
-# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list;
-# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
-# disables this behavior completely. For backwards compatibility with previous
-# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
-# respectively.
-
-GENERATE_TREEVIEW = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH = ../include
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS = *.h
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED = "_MSC_VER=1400" \
- _CPPRTTI \
- _WIN32 \
- JSONCPP_DOC_EXCLUDE_IMPLEMENTATION \
- JSON_VALUE_USE_INTERNAL_MAP
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = NO
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = %HAVE_DOT%
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = %UML_LOOK%
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH = %DOT_PATH%
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 1000
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Options related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/footer.html b/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/footer.html
deleted file mode 100644
index a61d9528a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/footer.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<hr>
-<table width="100%">
- <tr>
- <td width="10%" align="left" valign="center">
- <a href="http://sourceforge.net">
- <img
- src="http://sourceforge.net/sflogo.php?group_id=144446"
- width="88" height="31" border="0" alt="SourceForge Logo"></a>
- </td>
- <td width="20%" align="left" valign="center">
- hosts this site.
- </td>
- <td>
- </td>
- <td align="right" valign="center">
- Send comments to:<br>
- <a href="mailto:jsoncpp-devel@lists.sourceforge.net">Json-cpp Developers</a>
- </td>
- </tr>
-</table>
-
-</body>
-</html>
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/header.html b/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/header.html
deleted file mode 100644
index 1a6ad6120..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/header.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title>
-JsonCpp - JSON data format manipulation library
-</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head>
-
-<body bgcolor="#ffffff">
-<table width="100%">
- <tr>
- <td width="40%" align="left" valign="center">
- <a href="http://sourceforge.net/projects/jsoncpp/">
- JsonCpp project page
- </a>
- </td>
- <td width="40%" align="right" valign="center">
- <a href="http://jsoncpp.sourceforge.net">JsonCpp home page</a>
- </td>
- </tr>
-</table>
-
-<hr>
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/jsoncpp.dox b/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/jsoncpp.dox
deleted file mode 100644
index 97cc108d3..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/jsoncpp.dox
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
-\mainpage
-\section _intro Introduction
-
-<a HREF="http://www.json.org/">JSON (JavaScript Object Notation)</a>
- is a lightweight data-interchange format.
-It can represent integer, real number, string, an ordered sequence of value, and
-a collection of name/value pairs.
-
-Here is an example of JSON data:
-\verbatim
-// Configuration options
-{
- // Default encoding for text
- "encoding" : "UTF-8",
-
- // Plug-ins loaded at start-up
- "plug-ins" : [
- "python",
- "c++",
- "ruby"
- ],
-
- // Tab indent size
- "indent" : { "length" : 3, "use_space": true }
-}
-\endverbatim
-
-\section _features Features
-- read and write JSON document
-- attach C and C++ style comments to element during parsing
-- rewrite JSON document preserving original comments
-
-Notes: Comments used to be supported in JSON but where removed for
-portability (C like comments are not supported in Python). Since
-comments are useful in configuration/input file, this feature was
-preserved.
-
-\section _example Code example
-
-\code
-Json::Value root; // will contains the root value after parsing.
-Json::Reader reader;
-bool parsingSuccessful = reader.parse( config_doc, root );
-if ( !parsingSuccessful )
-{
- // report to the user the failure and their locations in the document.
- std::cout << "Failed to parse configuration\n"
- << reader.getFormattedErrorMessages();
- return;
-}
-
-// Get the value of the member of root named 'encoding', return 'UTF-8' if there is no
-// such member.
-std::string encoding = root.get("encoding", "UTF-8" ).asString();
-// Get the value of the member of root named 'encoding', return a 'null' value if
-// there is no such member.
-const Json::Value plugins = root["plug-ins"];
-for ( int index = 0; index < plugins.size(); ++index ) // Iterates over the sequence elements.
- loadPlugIn( plugins[index].asString() );
-
-setIndentLength( root["indent"].get("length", 3).asInt() );
-setIndentUseSpace( root["indent"].get("use_space", true).asBool() );
-
-// ...
-// At application shutdown to make the new configuration document:
-// Since Json::Value has implicit constructor for all value types, it is not
-// necessary to explicitly construct the Json::Value object:
-root["encoding"] = getCurrentEncoding();
-root["indent"]["length"] = getCurrentIndentLength();
-root["indent"]["use_space"] = getCurrentIndentUseSpace();
-
-Json::StyledWriter writer;
-// Make a new JSON document for the configuration. Preserve original comments.
-std::string outputConfig = writer.write( root );
-
-// You can also use streams. This will put the contents of any JSON
-// stream at a particular sub-value, if you'd like.
-std::cin >> root["subtree"];
-
-// And you can write to a stream, using the StyledWriter automatically.
-std::cout << root;
-\endcode
-
-\section _pbuild Build instructions
-The build instructions are located in the file
-<a HREF="README.txt">README.txt</a> in the top-directory of the project.
-
-Permanent link to the latest revision of the file in subversion:
-<a HREF="http://jsoncpp.svn.sourceforge.net/viewvc/jsoncpp/trunk/jsoncpp/README.txt?view=markup">latest README.txt</a>
-
-\section _pdownload Download
-The sources can be downloaded from
-<a HREF="http://sourceforge.net/projects/jsoncpp/files/">SourceForge download page</a>.
-
-The latest version of the source is available in the project's subversion repository:
-<a HREF="http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/">
-http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/</a>
-
-To checkout the source, see the following
-<a HREF="http://sourceforge.net/scm/?type=svn&group_id=144446">instructions</a>.
-
-\section _news What's New?
-The description of latest changes can be found in
-<a HREF="NEWS.txt">NEWS.txt</a> in the top-directory of the project.
-
-Permanent link to the latest revision of the file in subversion:
-<a HREF="http://svn.sourceforge.net/viewcvs.cgi/jsoncpp/README.txt?view=markup">latest NEWS.txt</a>
-
-\section _plinks Project links
-- <a HREF="http://jsoncpp.sourceforge.net">json-cpp home</a>
-- <a HREF="http://www.sourceforge.net/projects/jsoncpp/">json-cpp sourceforge project</a>
-
-\section _rlinks Related links
-- <a HREF="http://www.json.org/">JSON</a> Specification and alternate language implementations.
-- <a HREF="http://www.yaml.org/">YAML</a> A data format designed for human readability.
-- <a HREF="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode FAQ</a>.
-
-\section _license License
-See file <a HREF="LICENSE">LICENSE</a> in the top-directory of the project.
-
-Basically JsonCpp is licensed under MIT license, or public domain if desired
-and recognized in your jurisdiction.
-
-\author Baptiste Lepilleur <blep@users.sourceforge.net>
-*/
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/readme.txt b/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/readme.txt
deleted file mode 100644
index 0e42cdfb4..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-The documentation is generated using doxygen (http://www.doxygen.org).
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/roadmap.dox b/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/roadmap.dox
deleted file mode 100644
index e6fc17aa6..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doc/roadmap.dox
+++ /dev/null
@@ -1,37 +0,0 @@
-/*! \page roadmap JsonCpp roadmap
- \section ms_release Makes JsonCpp ready for release
- - Build system clean-up:
- - Fix build on Windows (shared-library build is broken)
- - Add enable/disable flag for static and shared library build
- - Enhance help
- - Platform portability check: (Notes: was ok on last check)
- - linux/gcc,
- - solaris/cc,
- - windows/msvc678,
- - aix/vacpp
- - Add JsonCpp version to header as numeric for use in preprocessor test
- - Remove buggy experimental hash stuff
- \section ms_strict Adds a strict mode to reader/parser
- Strict JSON support as specific in RFC 4627 (http://www.ietf.org/rfc/rfc4627.txt?number=4627).
- - Enforce only object or array as root element
- - Disable comment support
- - Get jsonchecker failing tests to pass in strict mode
- \section ms_writer Writter control
- Provides more control to determine how specific items are serialized when JSON allow choice:
- - Optionally allow escaping of non-ASCII characters using unicode escape sequence "\\u".
- - Optionally allow escaping of "/" using "\/".
- \section ms_separation Expose json reader/writer API that do not impose using Json::Value.
- Some typical use-case involve an application specific structure to/from a JSON document.
- - Event base parser to allow unserializing a Json document directly in datastructure instead of
- using the intermediate Json::Value.
- - Stream based parser to serialized a Json document without using Json::Value as input.
- - Performance oriented parser/writer:
- - Provides an event based parser. Should allow pulling & skipping events for ease of use.
- - Provides a JSON document builder: fast only.
- \section ms_perfo Performance tuning
- - Provides support for static property name definition avoiding allocation
- - Static property dictionnary can be provided to JSON reader
- - Performance scenario & benchmarking
- \section testing Testing
- - Adds more tests for unicode parsing (e.g. including surrogate and error detection).
-*/
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/doxybuild.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/doxybuild.py
deleted file mode 100644
index 03ad68df0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/doxybuild.py
+++ /dev/null
@@ -1,169 +0,0 @@
-"""Script to generate doxygen documentation.
-"""
-
-import re
-import os
-import os.path
-import sys
-import shutil
-from devtools import tarball
-
-def find_program(*filenames):
- """find a program in folders path_lst, and sets env[var]
- @param filenames: a list of possible names of the program to search for
- @return: the full path of the filename if found, or '' if filename could not be found
-"""
- paths = os.environ.get('PATH', '').split(os.pathsep)
- suffixes = ('win32' in sys.platform ) and '.exe .com .bat .cmd' or ''
- for filename in filenames:
- for name in [filename+ext for ext in suffixes.split()]:
- for directory in paths:
- full_path = os.path.join(directory, name)
- if os.path.isfile(full_path):
- return full_path
- return ''
-
-def do_subst_in_file(targetfile, sourcefile, dict):
- """Replace all instances of the keys of dict with their values.
- For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
- then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
- """
- try:
- f = open(sourcefile, 'rb')
- contents = f.read()
- f.close()
- except:
- print "Can't read source file %s"%sourcefile
- raise
- for (k,v) in dict.items():
- v = v.replace('\\','\\\\')
- contents = re.sub(k, v, contents)
- try:
- f = open(targetfile, 'wb')
- f.write(contents)
- f.close()
- except:
- print "Can't write target file %s"%targetfile
- raise
-
-def run_doxygen(doxygen_path, config_file, working_dir, is_silent):
- config_file = os.path.abspath( config_file )
- doxygen_path = doxygen_path
- old_cwd = os.getcwd()
- try:
- os.chdir( working_dir )
- cmd = [doxygen_path, config_file]
- print 'Running:', ' '.join( cmd )
- try:
- import subprocess
- except:
- if os.system( ' '.join( cmd ) ) != 0:
- print 'Documentation generation failed'
- return False
- else:
- if is_silent:
- process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
- else:
- process = subprocess.Popen( cmd )
- stdout, _ = process.communicate()
- if process.returncode:
- print 'Documentation generation failed:'
- print stdout
- return False
- return True
- finally:
- os.chdir( old_cwd )
-
-def build_doc( options, make_release=False ):
- if make_release:
- options.make_tarball = True
- options.with_dot = True
- options.with_html_help = True
- options.with_uml_look = True
- options.open = False
- options.silent = True
-
- version = open('version','rt').read().strip()
- output_dir = 'dist/doxygen' # relative to doc/doxyfile location.
- if not os.path.isdir( output_dir ):
- os.makedirs( output_dir )
- top_dir = os.path.abspath( '.' )
- html_output_dirname = 'jsoncpp-api-html-' + version
- tarball_path = os.path.join( 'dist', html_output_dirname + '.tar.gz' )
- warning_log_path = os.path.join( output_dir, '../jsoncpp-doxygen-warning.log' )
- html_output_path = os.path.join( output_dir, html_output_dirname )
- def yesno( bool ):
- return bool and 'YES' or 'NO'
- subst_keys = {
- '%JSONCPP_VERSION%': version,
- '%DOC_TOPDIR%': '',
- '%TOPDIR%': top_dir,
- '%HTML_OUTPUT%': os.path.join( '..', output_dir, html_output_dirname ),
- '%HAVE_DOT%': yesno(options.with_dot),
- '%DOT_PATH%': os.path.split(options.dot_path)[0],
- '%HTML_HELP%': yesno(options.with_html_help),
- '%UML_LOOK%': yesno(options.with_uml_look),
- '%WARNING_LOG_PATH%': os.path.join( '..', warning_log_path )
- }
-
- if os.path.isdir( output_dir ):
- print 'Deleting directory:', output_dir
- shutil.rmtree( output_dir )
- if not os.path.isdir( output_dir ):
- os.makedirs( output_dir )
-
- do_subst_in_file( 'doc/doxyfile', 'doc/doxyfile.in', subst_keys )
- ok = run_doxygen( options.doxygen_path, 'doc/doxyfile', 'doc', is_silent=options.silent )
- if not options.silent:
- print open(warning_log_path, 'rb').read()
- index_path = os.path.abspath(os.path.join(subst_keys['%HTML_OUTPUT%'], 'index.html'))
- print 'Generated documentation can be found in:'
- print index_path
- if options.open:
- import webbrowser
- webbrowser.open( 'file://' + index_path )
- if options.make_tarball:
- print 'Generating doc tarball to', tarball_path
- tarball_sources = [
- output_dir,
- 'README.txt',
- 'LICENSE',
- 'NEWS.txt',
- 'version'
- ]
- tarball_basedir = os.path.join( output_dir, html_output_dirname )
- tarball.make_tarball( tarball_path, tarball_sources, tarball_basedir, html_output_dirname )
- return tarball_path, html_output_dirname
-
-def main():
- usage = """%prog
- Generates doxygen documentation in build/doxygen.
- Optionaly makes a tarball of the documentation to dist/.
-
- Must be started in the project top directory.
- """
- from optparse import OptionParser
- parser = OptionParser(usage=usage)
- parser.allow_interspersed_args = False
- parser.add_option('--with-dot', dest="with_dot", action='store_true', default=False,
- help="""Enable usage of DOT to generate collaboration diagram""")
- parser.add_option('--dot', dest="dot_path", action='store', default=find_program('dot'),
- help="""Path to GraphViz dot tool. Must be full qualified path. [Default: %default]""")
- parser.add_option('--doxygen', dest="doxygen_path", action='store', default=find_program('doxygen'),
- help="""Path to Doxygen tool. [Default: %default]""")
- parser.add_option('--with-html-help', dest="with_html_help", action='store_true', default=False,
- help="""Enable generation of Microsoft HTML HELP""")
- parser.add_option('--no-uml-look', dest="with_uml_look", action='store_false', default=True,
- help="""Generates DOT graph without UML look [Default: False]""")
- parser.add_option('--open', dest="open", action='store_true', default=False,
- help="""Open the HTML index in the web browser after generation""")
- parser.add_option('--tarball', dest="make_tarball", action='store_true', default=False,
- help="""Generates a tarball of the documentation in dist/ directory""")
- parser.add_option('-s', '--silent', dest="silent", action='store_true', default=False,
- help="""Hides doxygen output""")
- parser.enable_interspersed_args()
- options, args = parser.parse_args()
- build_doc( options )
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/autolink.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/autolink.h
deleted file mode 100644
index 02328d1f1..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/autolink.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_AUTOLINK_H_INCLUDED
-# define JSON_AUTOLINK_H_INCLUDED
-
-# include "config.h"
-
-# ifdef JSON_IN_CPPTL
-# include <cpptl/cpptl_autolink.h>
-# endif
-
-# if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL)
-# define CPPTL_AUTOLINK_NAME "json"
-# undef CPPTL_AUTOLINK_DLL
-# ifdef JSON_DLL
-# define CPPTL_AUTOLINK_DLL
-# endif
-# include "autolink.h"
-# endif
-
-#endif // JSON_AUTOLINK_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/config.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/config.h
deleted file mode 100644
index 7609d45e7..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/config.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_CONFIG_H_INCLUDED
-# define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//# define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of std::map
-/// as Value container.
-//# define JSON_USE_CPPTL_SMALLMAP 1
-/// If defined, indicates that Json specific container should be used
-/// (hash table & simple deque container with customizable allocator).
-/// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332
-//# define JSON_VALUE_USE_INTERNAL_MAP 1
-/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
-/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
-/// as if it was a POD) that may cause some validation tool to report errors.
-/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
-//# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
-
-/// If defined, indicates that Json use exception to report invalid type manipulation
-/// instead of C assert macro.
-# define JSON_USE_EXCEPTION 1
-
-/// If defined, indicates that the source file is amalgated
-/// to prevent private header inclusion.
-/// Remarks: it is automatically defined in the generated amalgated header.
-// #define JSON_IS_AMALGAMATION
-
-
-# ifdef JSON_IN_CPPTL
-# include <cpptl/config.h>
-# ifndef JSON_USE_CPPTL
-# define JSON_USE_CPPTL 1
-# endif
-# endif
-
-# ifdef JSON_IN_CPPTL
-# define JSON_API CPPTL_API
-# elif defined(JSON_DLL_BUILD)
-# define JSON_API __declspec(dllexport)
-# elif defined(JSON_DLL)
-# define JSON_API __declspec(dllimport)
-# else
-# define JSON_API
-# endif
-
-// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
-// Storages, and 64 bits integer support is disabled.
-// #define JSON_NO_INT64 1
-
-#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
-// Microsoft Visual Studio 6 only support conversion from __int64 to double
-// (no conversion from unsigned __int64).
-#define JSON_USE_INT64_DOUBLE_CONVERSION 1
-#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
-
-#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
-/// Indicates that the following function is deprecated.
-# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
-#endif
-
-#if !defined(JSONCPP_DEPRECATED)
-# define JSONCPP_DEPRECATED(message)
-#endif // if !defined(JSONCPP_DEPRECATED)
-
-namespace Json {
- typedef int Int;
- typedef unsigned int UInt;
-# if defined(JSON_NO_INT64)
- typedef int LargestInt;
- typedef unsigned int LargestUInt;
-# undef JSON_HAS_INT64
-# else // if defined(JSON_NO_INT64)
- // For Microsoft Visual use specific types as long long is not supported
-# if defined(_MSC_VER) // Microsoft Visual Studio
- typedef __int64 Int64;
- typedef unsigned __int64 UInt64;
-# else // if defined(_MSC_VER) // Other platforms, use long long
- typedef long long int Int64;
- typedef unsigned long long int UInt64;
-# endif // if defined(_MSC_VER)
- typedef Int64 LargestInt;
- typedef UInt64 LargestUInt;
-# define JSON_HAS_INT64
-# endif // if defined(JSON_NO_INT64)
-} // end namespace Json
-
-
-#endif // JSON_CONFIG_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/features.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/features.h
deleted file mode 100644
index 435327844..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/features.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-# define CPPTL_JSON_FEATURES_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include "forwards.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-namespace Json {
-
- /** \brief Configuration passed to reader and writer.
- * This configuration object can be used to force the Reader or Writer
- * to behave in a standard conforming way.
- */
- class JSON_API Features
- {
- public:
- /** \brief A configuration that allows all features and assumes all strings are UTF-8.
- * - C & C++ comments are allowed
- * - Root object can be any JSON value
- * - Assumes Value strings are encoded in UTF-8
- */
- static Features all();
-
- /** \brief A configuration that is strictly compatible with the JSON specification.
- * - Comments are forbidden.
- * - Root object must be either an array or an object value.
- * - Assumes Value strings are encoded in UTF-8
- */
- static Features strictMode();
-
- /** \brief Initialize the configuration like JsonConfig::allFeatures;
- */
- Features();
-
- /// \c true if comments are allowed. Default: \c true.
- bool allowComments_;
-
- /// \c true if root must be either an array or an object value. Default: \c false.
- bool strictRoot_;
- };
-
-} // namespace Json
-
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/forwards.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/forwards.h
deleted file mode 100644
index ab863da85..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/forwards.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_FORWARDS_H_INCLUDED
-# define JSON_FORWARDS_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include "config.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-namespace Json {
-
- // writer.h
- class FastWriter;
- class StyledWriter;
-
- // reader.h
- class Reader;
-
- // features.h
- class Features;
-
- // value.h
- typedef unsigned int ArrayIndex;
- class StaticString;
- class Path;
- class PathArgument;
- class Value;
- class ValueIteratorBase;
- class ValueIterator;
- class ValueConstIterator;
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- class ValueMapAllocator;
- class ValueInternalLink;
- class ValueInternalArray;
- class ValueInternalMap;
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-} // namespace Json
-
-
-#endif // JSON_FORWARDS_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/json.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/json.h
deleted file mode 100644
index da5fc967e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/json.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_JSON_H_INCLUDED
-# define JSON_JSON_H_INCLUDED
-
-# include "autolink.h"
-# include "value.h"
-# include "reader.h"
-# include "writer.h"
-# include "features.h"
-
-#endif // JSON_JSON_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/reader.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/reader.h
deleted file mode 100644
index 0a324dfc5..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/reader.h
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_READER_H_INCLUDED
-# define CPPTL_JSON_READER_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include "features.h"
-# include "value.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-# include <deque>
-# include <stack>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
- /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
- *
- */
- class JSON_API Reader
- {
- public:
- typedef char Char;
- typedef const Char *Location;
-
- /** \brief Constructs a Reader allowing all features
- * for parsing.
- */
- Reader();
-
- /** \brief Constructs a Reader allowing the specified feature set
- * for parsing.
- */
- Reader( const Features &features );
-
- /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
- * \param document UTF-8 encoded string containing the document to read.
- * \param root [out] Contains the root value of the document if it was
- * successfully parsed.
- * \param collectComments \c true to collect comment and allow writing them back during
- * serialization, \c false to discard comments.
- * This parameter is ignored if Features::allowComments_
- * is \c false.
- * \return \c true if the document was successfully parsed, \c false if an error occurred.
- */
- bool parse( const std::string &document,
- Value &root,
- bool collectComments = true );
-
- /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
- * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the document to read.
- * \param endDoc Pointer on the end of the UTF-8 encoded string of the document to read.
- \ Must be >= beginDoc.
- * \param root [out] Contains the root value of the document if it was
- * successfully parsed.
- * \param collectComments \c true to collect comment and allow writing them back during
- * serialization, \c false to discard comments.
- * This parameter is ignored if Features::allowComments_
- * is \c false.
- * \return \c true if the document was successfully parsed, \c false if an error occurred.
- */
- bool parse( const char *beginDoc, const char *endDoc,
- Value &root,
- bool collectComments = true );
-
- /// \brief Parse from input stream.
- /// \see Json::operator>>(std::istream&, Json::Value&).
- bool parse( std::istream &is,
- Value &root,
- bool collectComments = true );
-
- /** \brief Returns a user friendly string that list errors in the parsed document.
- * \return Formatted error message with the list of errors with their location in
- * the parsed document. An empty string is returned if no error occurred
- * during parsing.
- * \deprecated Use getFormattedErrorMessages() instead (typo fix).
- */
- JSONCPP_DEPRECATED("Use getFormattedErrorMessages instead")
- std::string getFormatedErrorMessages() const;
-
- /** \brief Returns a user friendly string that list errors in the parsed document.
- * \return Formatted error message with the list of errors with their location in
- * the parsed document. An empty string is returned if no error occurred
- * during parsing.
- */
- std::string getFormattedErrorMessages() const;
-
- private:
- enum TokenType
- {
- tokenEndOfStream = 0,
- tokenObjectBegin,
- tokenObjectEnd,
- tokenArrayBegin,
- tokenArrayEnd,
- tokenString,
- tokenNumber,
- tokenTrue,
- tokenFalse,
- tokenNull,
- tokenArraySeparator,
- tokenMemberSeparator,
- tokenComment,
- tokenError
- };
-
- class Token
- {
- public:
- TokenType type_;
- Location start_;
- Location end_;
- };
-
- class ErrorInfo
- {
- public:
- Token token_;
- std::string message_;
- Location extra_;
- };
-
- typedef std::deque<ErrorInfo> Errors;
-
- bool expectToken( TokenType type, Token &token, const char *message );
- bool readToken( Token &token );
- void skipSpaces();
- bool match( Location pattern,
- int patternLength );
- bool readComment();
- bool readCStyleComment();
- bool readCppStyleComment();
- bool readString();
- void readNumber();
- bool readValue();
- bool readObject( Token &token );
- bool readArray( Token &token );
- bool decodeNumber( Token &token );
- bool decodeString( Token &token );
- bool decodeString( Token &token, std::string &decoded );
- bool decodeDouble( Token &token );
- bool decodeUnicodeCodePoint( Token &token,
- Location &current,
- Location end,
- unsigned int &unicode );
- bool decodeUnicodeEscapeSequence( Token &token,
- Location &current,
- Location end,
- unsigned int &unicode );
- bool addError( const std::string &message,
- Token &token,
- Location extra = 0 );
- bool recoverFromError( TokenType skipUntilToken );
- bool addErrorAndRecover( const std::string &message,
- Token &token,
- TokenType skipUntilToken );
- void skipUntilSpace();
- Value &currentValue();
- Char getNextChar();
- void getLocationLineAndColumn( Location location,
- int &line,
- int &column ) const;
- std::string getLocationLineAndColumn( Location location ) const;
- void addComment( Location begin,
- Location end,
- CommentPlacement placement );
- void skipCommentTokens( Token &token );
-
- typedef std::stack<Value *> Nodes;
- Nodes nodes_;
- Errors errors_;
- std::string document_;
- Location begin_;
- Location end_;
- Location current_;
- Location lastValueEnd_;
- Value *lastValue_;
- std::string commentsBefore_;
- Features features_;
- bool collectComments_;
- };
-
- /** \brief Read from 'sin' into 'root'.
-
- Always keep comments from the input JSON.
-
- This can be used to read a file into a particular sub-object.
- For example:
- \code
- Json::Value root;
- cin >> root["dir"]["file"];
- cout << root;
- \endcode
- Result:
- \verbatim
- {
- "dir": {
- "file": {
- // The input stream JSON would be nested here.
- }
- }
- }
- \endverbatim
- \throw std::exception on parse error.
- \see Json::operator<<()
- */
- std::istream& operator>>( std::istream&, Value& );
-
-} // namespace Json
-
-#endif // CPPTL_JSON_READER_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/value.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/value.h
deleted file mode 100644
index 32e3455ec..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/value.h
+++ /dev/null
@@ -1,1103 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_H_INCLUDED
-# define CPPTL_JSON_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include "forwards.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-# include <string>
-# include <vector>
-
-# ifndef JSON_USE_CPPTL_SMALLMAP
-# include <map>
-# else
-# include <cpptl/smallmap.h>
-# endif
-# ifdef JSON_USE_CPPTL
-# include <cpptl/forwards.h>
-# endif
-
-/** \brief JSON (JavaScript Object Notation).
- */
-namespace Json {
-
- /** \brief Type of the value held by a Value object.
- */
- enum ValueType
- {
- nullValue = 0, ///< 'null' value
- intValue, ///< signed integer value
- uintValue, ///< unsigned integer value
- realValue, ///< double value
- stringValue, ///< UTF-8 string value
- booleanValue, ///< bool value
- arrayValue, ///< array value (ordered list)
- objectValue ///< object value (collection of name/value pairs).
- };
-
- enum CommentPlacement
- {
- commentBefore = 0, ///< a comment placed on the line before a value
- commentAfterOnSameLine, ///< a comment just after a value on the same line
- commentAfter, ///< a comment on the line after a value (only make sense for root value)
- numberOfCommentPlacement
- };
-
-//# ifdef JSON_USE_CPPTL
-// typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
-// typedef CppTL::AnyEnumerator<const Value &> EnumValues;
-//# endif
-
- /** \brief Lightweight wrapper to tag static string.
- *
- * Value constructor and objectValue member assignement takes advantage of the
- * StaticString and avoid the cost of string duplication when storing the
- * string or the member name.
- *
- * Example of usage:
- * \code
- * Json::Value aValue( StaticString("some text") );
- * Json::Value object;
- * static const StaticString code("code");
- * object[code] = 1234;
- * \endcode
- */
- class JSON_API StaticString
- {
- public:
- explicit StaticString( const char *czstring )
- : str_( czstring )
- {
- }
-
- operator const char *() const
- {
- return str_;
- }
-
- const char *c_str() const
- {
- return str_;
- }
-
- private:
- const char *str_;
- };
-
- /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
- *
- * This class is a discriminated union wrapper that can represents a:
- * - signed integer [range: Value::minInt - Value::maxInt]
- * - unsigned integer (range: 0 - Value::maxUInt)
- * - double
- * - UTF-8 string
- * - boolean
- * - 'null'
- * - an ordered list of Value
- * - collection of name/value pairs (javascript object)
- *
- * The type of the held value is represented by a #ValueType and
- * can be obtained using type().
- *
- * values of an #objectValue or #arrayValue can be accessed using operator[]() methods.
- * Non const methods will automatically create the a #nullValue element
- * if it does not exist.
- * The sequence of an #arrayValue will be automatically resize and initialized
- * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
- *
- * The get() methods can be used to obtanis default value in the case the required element
- * does not exist.
- *
- * It is possible to iterate over the list of a #objectValue values using
- * the getMemberNames() method.
- */
- class JSON_API Value
- {
- friend class ValueIteratorBase;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- friend class ValueInternalLink;
- friend class ValueInternalMap;
-# endif
- public:
- typedef std::vector<std::string> Members;
- typedef ValueIterator iterator;
- typedef ValueConstIterator const_iterator;
- typedef Json::UInt UInt;
- typedef Json::Int Int;
-# if defined(JSON_HAS_INT64)
- typedef Json::UInt64 UInt64;
- typedef Json::Int64 Int64;
-#endif // defined(JSON_HAS_INT64)
- typedef Json::LargestInt LargestInt;
- typedef Json::LargestUInt LargestUInt;
- typedef Json::ArrayIndex ArrayIndex;
-
- static const Value null;
- /// Minimum signed integer value that can be stored in a Json::Value.
- static const LargestInt minLargestInt;
- /// Maximum signed integer value that can be stored in a Json::Value.
- static const LargestInt maxLargestInt;
- /// Maximum unsigned integer value that can be stored in a Json::Value.
- static const LargestUInt maxLargestUInt;
-
- /// Minimum signed int value that can be stored in a Json::Value.
- static const Int minInt;
- /// Maximum signed int value that can be stored in a Json::Value.
- static const Int maxInt;
- /// Maximum unsigned int value that can be stored in a Json::Value.
- static const UInt maxUInt;
-
- /// Minimum signed 64 bits int value that can be stored in a Json::Value.
- static const Int64 minInt64;
- /// Maximum signed 64 bits int value that can be stored in a Json::Value.
- static const Int64 maxInt64;
- /// Maximum unsigned 64 bits int value that can be stored in a Json::Value.
- static const UInt64 maxUInt64;
-
- private:
-#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
- class CZString
- {
- public:
- enum DuplicationPolicy
- {
- noDuplication = 0,
- duplicate,
- duplicateOnCopy
- };
- CZString( ArrayIndex index );
- CZString( const char *cstr, DuplicationPolicy allocate );
- CZString( const CZString &other );
- ~CZString();
- CZString &operator =( const CZString &other );
- bool operator<( const CZString &other ) const;
- bool operator==( const CZString &other ) const;
- ArrayIndex index() const;
- const char *c_str() const;
- bool isStaticString() const;
- private:
- void swap( CZString &other );
- const char *cstr_;
- ArrayIndex index_;
- };
-
- public:
-# ifndef JSON_USE_CPPTL_SMALLMAP
- typedef std::map<CZString, Value> ObjectValues;
-# else
- typedef CppTL::SmallMap<CZString, Value> ObjectValues;
-# endif // ifndef JSON_USE_CPPTL_SMALLMAP
-# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
- public:
- /** \brief Create a default Value of the given type.
-
- This is a very useful constructor.
- To create an empty array, pass arrayValue.
- To create an empty object, pass objectValue.
- Another Value can then be set to this one by assignment.
- This is useful since clear() and resize() will not alter types.
-
- Examples:
- \code
- Json::Value null_value; // null
- Json::Value arr_value(Json::arrayValue); // []
- Json::Value obj_value(Json::objectValue); // {}
- \endcode
- */
- Value( ValueType type = nullValue );
- Value( Int value );
- Value( UInt value );
-#if defined(JSON_HAS_INT64)
- Value( Int64 value );
- Value( UInt64 value );
-#endif // if defined(JSON_HAS_INT64)
- Value( double value );
- Value( const char *value );
- Value( const char *beginValue, const char *endValue );
- /** \brief Constructs a value from a static string.
-
- * Like other value string constructor but do not duplicate the string for
- * internal storage. The given string must remain alive after the call to this
- * constructor.
- * Example of usage:
- * \code
- * Json::Value aValue( StaticString("some text") );
- * \endcode
- */
- Value( const StaticString &value );
- Value( const std::string &value );
-# ifdef JSON_USE_CPPTL
- Value( const CppTL::ConstString &value );
-# endif
- Value( bool value );
- Value( const Value &other );
- ~Value();
-
- Value &operator=( const Value &other );
- /// Swap values.
- /// \note Currently, comments are intentionally not swapped, for
- /// both logic and efficiency.
- void swap( Value &other );
-
- ValueType type() const;
-
- bool operator <( const Value &other ) const;
- bool operator <=( const Value &other ) const;
- bool operator >=( const Value &other ) const;
- bool operator >( const Value &other ) const;
-
- bool operator ==( const Value &other ) const;
- bool operator !=( const Value &other ) const;
-
- int compare( const Value &other ) const;
-
- const char *asCString() const;
- std::string asString() const;
-# ifdef JSON_USE_CPPTL
- CppTL::ConstString asConstString() const;
-# endif
- Int asInt() const;
- UInt asUInt() const;
- Int64 asInt64() const;
- UInt64 asUInt64() const;
- LargestInt asLargestInt() const;
- LargestUInt asLargestUInt() const;
- float asFloat() const;
- double asDouble() const;
- bool asBool() const;
-
- bool isNull() const;
- bool isBool() const;
- bool isInt() const;
- bool isUInt() const;
- bool isIntegral() const;
- bool isDouble() const;
- bool isNumeric() const;
- bool isString() const;
- bool isArray() const;
- bool isObject() const;
-
- bool isConvertibleTo( ValueType other ) const;
-
- /// Number of values in array or object
- ArrayIndex size() const;
-
- /// \brief Return true if empty array, empty object, or null;
- /// otherwise, false.
- bool empty() const;
-
- /// Return isNull()
- bool operator!() const;
-
- /// Remove all object members and array elements.
- /// \pre type() is arrayValue, objectValue, or nullValue
- /// \post type() is unchanged
- void clear();
-
- /// Resize the array to size elements.
- /// New elements are initialized to null.
- /// May only be called on nullValue or arrayValue.
- /// \pre type() is arrayValue or nullValue
- /// \post type() is arrayValue
- void resize( ArrayIndex size );
-
- /// Access an array element (zero based index ).
- /// If the array contains less than index element, then null value are inserted
- /// in the array so that its size is index+1.
- /// (You may need to say 'value[0u]' to get your compiler to distinguish
- /// this from the operator[] which takes a string.)
- Value &operator[]( ArrayIndex index );
-
- /// Access an array element (zero based index ).
- /// If the array contains less than index element, then null value are inserted
- /// in the array so that its size is index+1.
- /// (You may need to say 'value[0u]' to get your compiler to distinguish
- /// this from the operator[] which takes a string.)
- Value &operator[]( int index );
-
- /// Access an array element (zero based index )
- /// (You may need to say 'value[0u]' to get your compiler to distinguish
- /// this from the operator[] which takes a string.)
- const Value &operator[]( ArrayIndex index ) const;
-
- /// Access an array element (zero based index )
- /// (You may need to say 'value[0u]' to get your compiler to distinguish
- /// this from the operator[] which takes a string.)
- const Value &operator[]( int index ) const;
-
- /// If the array contains at least index+1 elements, returns the element value,
- /// otherwise returns defaultValue.
- Value get( ArrayIndex index,
- const Value &defaultValue ) const;
- /// Return true if index < size().
- bool isValidIndex( ArrayIndex index ) const;
- /// \brief Append value to array at the end.
- ///
- /// Equivalent to jsonvalue[jsonvalue.size()] = value;
- Value &append( const Value &value );
-
- /// Access an object value by name, create a null member if it does not exist.
- Value &operator[]( const char *key );
- /// Access an object value by name, returns null if there is no member with that name.
- const Value &operator[]( const char *key ) const;
- /// Access an object value by name, create a null member if it does not exist.
- Value &operator[]( const std::string &key );
- /// Access an object value by name, returns null if there is no member with that name.
- const Value &operator[]( const std::string &key ) const;
- /** \brief Access an object value by name, create a null member if it does not exist.
-
- * If the object as no entry for that name, then the member name used to store
- * the new entry is not duplicated.
- * Example of use:
- * \code
- * Json::Value object;
- * static const StaticString code("code");
- * object[code] = 1234;
- * \endcode
- */
- Value &operator[]( const StaticString &key );
-# ifdef JSON_USE_CPPTL
- /// Access an object value by name, create a null member if it does not exist.
- Value &operator[]( const CppTL::ConstString &key );
- /// Access an object value by name, returns null if there is no member with that name.
- const Value &operator[]( const CppTL::ConstString &key ) const;
-# endif
- /// Return the member named key if it exist, defaultValue otherwise.
- Value get( const char *key,
- const Value &defaultValue ) const;
- /// Return the member named key if it exist, defaultValue otherwise.
- Value get( const std::string &key,
- const Value &defaultValue ) const;
-# ifdef JSON_USE_CPPTL
- /// Return the member named key if it exist, defaultValue otherwise.
- Value get( const CppTL::ConstString &key,
- const Value &defaultValue ) const;
-# endif
- /// \brief Remove and return the named member.
- ///
- /// Do nothing if it did not exist.
- /// \return the removed Value, or null.
- /// \pre type() is objectValue or nullValue
- /// \post type() is unchanged
- Value removeMember( const char* key );
- /// Same as removeMember(const char*)
- Value removeMember( const std::string &key );
-
- /// Return true if the object has a member named key.
- bool isMember( const char *key ) const;
- /// Return true if the object has a member named key.
- bool isMember( const std::string &key ) const;
-# ifdef JSON_USE_CPPTL
- /// Return true if the object has a member named key.
- bool isMember( const CppTL::ConstString &key ) const;
-# endif
-
- /// \brief Return a list of the member names.
- ///
- /// If null, return an empty list.
- /// \pre type() is objectValue or nullValue
- /// \post if type() was nullValue, it remains nullValue
- Members getMemberNames() const;
-
-//# ifdef JSON_USE_CPPTL
-// EnumMemberNames enumMemberNames() const;
-// EnumValues enumValues() const;
-//# endif
-
- /// Comments must be //... or /* ... */
- void setComment( const char *comment,
- CommentPlacement placement );
- /// Comments must be //... or /* ... */
- void setComment( const std::string &comment,
- CommentPlacement placement );
- bool hasComment( CommentPlacement placement ) const;
- /// Include delimiters and embedded newlines.
- std::string getComment( CommentPlacement placement ) const;
-
- std::string toStyledString() const;
-
- const_iterator begin() const;
- const_iterator end() const;
-
- iterator begin();
- iterator end();
-
- private:
- Value &resolveReference( const char *key,
- bool isStatic );
-
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- inline bool isItemAvailable() const
- {
- return itemIsUsed_ == 0;
- }
-
- inline void setItemUsed( bool isUsed = true )
- {
- itemIsUsed_ = isUsed ? 1 : 0;
- }
-
- inline bool isMemberNameStatic() const
- {
- return memberNameIsStatic_ == 0;
- }
-
- inline void setMemberNameIsStatic( bool isStatic )
- {
- memberNameIsStatic_ = isStatic ? 1 : 0;
- }
-# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
-
- private:
- struct CommentInfo
- {
- CommentInfo();
- ~CommentInfo();
-
- void setComment( const char *text );
-
- char *comment_;
- };
-
- //struct MemberNamesTransform
- //{
- // typedef const char *result_type;
- // const char *operator()( const CZString &name ) const
- // {
- // return name.c_str();
- // }
- //};
-
- union ValueHolder
- {
- LargestInt int_;
- LargestUInt uint_;
- double real_;
- bool bool_;
- char *string_;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- ValueInternalArray *array_;
- ValueInternalMap *map_;
-#else
- ObjectValues *map_;
-# endif
- } value_;
- ValueType type_ : 8;
- int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
- int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
-# endif
- CommentInfo *comments_;
- };
-
-
- /** \brief Experimental and untested: represents an element of the "path" to access a node.
- */
- class PathArgument
- {
- public:
- friend class Path;
-
- PathArgument();
- PathArgument( ArrayIndex index );
- PathArgument( const char *key );
- PathArgument( const std::string &key );
-
- private:
- enum Kind
- {
- kindNone = 0,
- kindIndex,
- kindKey
- };
- std::string key_;
- ArrayIndex index_;
- Kind kind_;
- };
-
- /** \brief Experimental and untested: represents a "path" to access a node.
- *
- * Syntax:
- * - "." => root node
- * - ".[n]" => elements at index 'n' of root node (an array value)
- * - ".name" => member named 'name' of root node (an object value)
- * - ".name1.name2.name3"
- * - ".[0][1][2].name1[3]"
- * - ".%" => member name is provided as parameter
- * - ".[%]" => index is provied as parameter
- */
- class Path
- {
- public:
- Path( const std::string &path,
- const PathArgument &a1 = PathArgument(),
- const PathArgument &a2 = PathArgument(),
- const PathArgument &a3 = PathArgument(),
- const PathArgument &a4 = PathArgument(),
- const PathArgument &a5 = PathArgument() );
-
- const Value &resolve( const Value &root ) const;
- Value resolve( const Value &root,
- const Value &defaultValue ) const;
- /// Creates the "path" to access the specified node and returns a reference on the node.
- Value &make( Value &root ) const;
-
- private:
- typedef std::vector<const PathArgument *> InArgs;
- typedef std::vector<PathArgument> Args;
-
- void makePath( const std::string &path,
- const InArgs &in );
- void addPathInArg( const std::string &path,
- const InArgs &in,
- InArgs::const_iterator &itInArg,
- PathArgument::Kind kind );
- void invalidPath( const std::string &path,
- int location );
-
- Args args_;
- };
-
-
-
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- /** \brief Allocator to customize Value internal map.
- * Below is an example of a simple implementation (default implementation actually
- * use memory pool for speed).
- * \code
- class DefaultValueMapAllocator : public ValueMapAllocator
- {
- public: // overridden from ValueMapAllocator
- virtual ValueInternalMap *newMap()
- {
- return new ValueInternalMap();
- }
-
- virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
- {
- return new ValueInternalMap( other );
- }
-
- virtual void destructMap( ValueInternalMap *map )
- {
- delete map;
- }
-
- virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
- {
- return new ValueInternalLink[size];
- }
-
- virtual void releaseMapBuckets( ValueInternalLink *links )
- {
- delete [] links;
- }
-
- virtual ValueInternalLink *allocateMapLink()
- {
- return new ValueInternalLink();
- }
-
- virtual void releaseMapLink( ValueInternalLink *link )
- {
- delete link;
- }
- };
- * \endcode
- */
- class JSON_API ValueMapAllocator
- {
- public:
- virtual ~ValueMapAllocator();
- virtual ValueInternalMap *newMap() = 0;
- virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
- virtual void destructMap( ValueInternalMap *map ) = 0;
- virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
- virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
- virtual ValueInternalLink *allocateMapLink() = 0;
- virtual void releaseMapLink( ValueInternalLink *link ) = 0;
- };
-
- /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
- * \internal previous_ & next_ allows for bidirectional traversal.
- */
- class JSON_API ValueInternalLink
- {
- public:
- enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
- enum InternalFlags {
- flagAvailable = 0,
- flagUsed = 1
- };
-
- ValueInternalLink();
-
- ~ValueInternalLink();
-
- Value items_[itemPerLink];
- char *keys_[itemPerLink];
- ValueInternalLink *previous_;
- ValueInternalLink *next_;
- };
-
-
- /** \brief A linked page based hash-table implementation used internally by Value.
- * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked
- * list in each bucket to handle collision. There is an addional twist in that
- * each node of the collision linked list is a page containing a fixed amount of
- * value. This provides a better compromise between memory usage and speed.
- *
- * Each bucket is made up of a chained list of ValueInternalLink. The last
- * link of a given bucket can be found in the 'previous_' field of the following bucket.
- * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
- * Only the last link of a bucket may contains 'available' item. The last link always
- * contains at least one element unless is it the bucket one very first link.
- */
- class JSON_API ValueInternalMap
- {
- friend class ValueIteratorBase;
- friend class Value;
- public:
- typedef unsigned int HashKey;
- typedef unsigned int BucketIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
- struct IteratorState
- {
- IteratorState()
- : map_(0)
- , link_(0)
- , itemIndex_(0)
- , bucketIndex_(0)
- {
- }
- ValueInternalMap *map_;
- ValueInternalLink *link_;
- BucketIndex itemIndex_;
- BucketIndex bucketIndex_;
- };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
- ValueInternalMap();
- ValueInternalMap( const ValueInternalMap &other );
- ValueInternalMap &operator =( const ValueInternalMap &other );
- ~ValueInternalMap();
-
- void swap( ValueInternalMap &other );
-
- BucketIndex size() const;
-
- void clear();
-
- bool reserveDelta( BucketIndex growth );
-
- bool reserve( BucketIndex newItemCount );
-
- const Value *find( const char *key ) const;
-
- Value *find( const char *key );
-
- Value &resolveReference( const char *key,
- bool isStatic );
-
- void remove( const char *key );
-
- void doActualRemove( ValueInternalLink *link,
- BucketIndex index,
- BucketIndex bucketIndex );
-
- ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
-
- Value &setNewItem( const char *key,
- bool isStatic,
- ValueInternalLink *link,
- BucketIndex index );
-
- Value &unsafeAdd( const char *key,
- bool isStatic,
- HashKey hashedKey );
-
- HashKey hash( const char *key ) const;
-
- int compare( const ValueInternalMap &other ) const;
-
- private:
- void makeBeginIterator( IteratorState &it ) const;
- void makeEndIterator( IteratorState &it ) const;
- static bool equals( const IteratorState &x, const IteratorState &other );
- static void increment( IteratorState &iterator );
- static void incrementBucket( IteratorState &iterator );
- static void decrement( IteratorState &iterator );
- static const char *key( const IteratorState &iterator );
- static const char *key( const IteratorState &iterator, bool &isStatic );
- static Value &value( const IteratorState &iterator );
- static int distance( const IteratorState &x, const IteratorState &y );
-
- private:
- ValueInternalLink *buckets_;
- ValueInternalLink *tailLink_;
- BucketIndex bucketsSize_;
- BucketIndex itemCount_;
- };
-
- /** \brief A simplified deque implementation used internally by Value.
- * \internal
- * It is based on a list of fixed "page", each page contains a fixed number of items.
- * Instead of using a linked-list, a array of pointer is used for fast item look-up.
- * Look-up for an element is as follow:
- * - compute page index: pageIndex = itemIndex / itemsPerPage
- * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
- *
- * Insertion is amortized constant time (only the array containing the index of pointers
- * need to be reallocated when items are appended).
- */
- class JSON_API ValueInternalArray
- {
- friend class Value;
- friend class ValueIteratorBase;
- public:
- enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo.
- typedef Value::ArrayIndex ArrayIndex;
- typedef unsigned int PageIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
- struct IteratorState // Must be a POD
- {
- IteratorState()
- : array_(0)
- , currentPageIndex_(0)
- , currentItemIndex_(0)
- {
- }
- ValueInternalArray *array_;
- Value **currentPageIndex_;
- unsigned int currentItemIndex_;
- };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
- ValueInternalArray();
- ValueInternalArray( const ValueInternalArray &other );
- ValueInternalArray &operator =( const ValueInternalArray &other );
- ~ValueInternalArray();
- void swap( ValueInternalArray &other );
-
- void clear();
- void resize( ArrayIndex newSize );
-
- Value &resolveReference( ArrayIndex index );
-
- Value *find( ArrayIndex index ) const;
-
- ArrayIndex size() const;
-
- int compare( const ValueInternalArray &other ) const;
-
- private:
- static bool equals( const IteratorState &x, const IteratorState &other );
- static void increment( IteratorState &iterator );
- static void decrement( IteratorState &iterator );
- static Value &dereference( const IteratorState &iterator );
- static Value &unsafeDereference( const IteratorState &iterator );
- static int distance( const IteratorState &x, const IteratorState &y );
- static ArrayIndex indexOf( const IteratorState &iterator );
- void makeBeginIterator( IteratorState &it ) const;
- void makeEndIterator( IteratorState &it ) const;
- void makeIterator( IteratorState &it, ArrayIndex index ) const;
-
- void makeIndexValid( ArrayIndex index );
-
- Value **pages_;
- ArrayIndex size_;
- PageIndex pageCount_;
- };
-
- /** \brief Experimental: do not use. Allocator to customize Value internal array.
- * Below is an example of a simple implementation (actual implementation use
- * memory pool).
- \code
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
- virtual ~DefaultValueArrayAllocator()
- {
- }
-
- virtual ValueInternalArray *newArray()
- {
- return new ValueInternalArray();
- }
-
- virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
- {
- return new ValueInternalArray( other );
- }
-
- virtual void destruct( ValueInternalArray *array )
- {
- delete array;
- }
-
- virtual void reallocateArrayPageIndex( Value **&indexes,
- ValueInternalArray::PageIndex &indexCount,
- ValueInternalArray::PageIndex minNewIndexCount )
- {
- ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
- if ( minNewIndexCount > newIndexCount )
- newIndexCount = minNewIndexCount;
- void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
- if ( !newIndexes )
- throw std::bad_alloc();
- indexCount = newIndexCount;
- indexes = static_cast<Value **>( newIndexes );
- }
- virtual void releaseArrayPageIndex( Value **indexes,
- ValueInternalArray::PageIndex indexCount )
- {
- if ( indexes )
- free( indexes );
- }
-
- virtual Value *allocateArrayPage()
- {
- return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
- }
-
- virtual void releaseArrayPage( Value *value )
- {
- if ( value )
- free( value );
- }
-};
- \endcode
- */
- class JSON_API ValueArrayAllocator
- {
- public:
- virtual ~ValueArrayAllocator();
- virtual ValueInternalArray *newArray() = 0;
- virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
- virtual void destructArray( ValueInternalArray *array ) = 0;
- /** \brief Reallocate array page index.
- * Reallocates an array of pointer on each page.
- * \param indexes [input] pointer on the current index. May be \c NULL.
- * [output] pointer on the new index of at least
- * \a minNewIndexCount pages.
- * \param indexCount [input] current number of pages in the index.
- * [output] number of page the reallocated index can handle.
- * \b MUST be >= \a minNewIndexCount.
- * \param minNewIndexCount Minimum number of page the new index must be able to
- * handle.
- */
- virtual void reallocateArrayPageIndex( Value **&indexes,
- ValueInternalArray::PageIndex &indexCount,
- ValueInternalArray::PageIndex minNewIndexCount ) = 0;
- virtual void releaseArrayPageIndex( Value **indexes,
- ValueInternalArray::PageIndex indexCount ) = 0;
- virtual Value *allocateArrayPage() = 0;
- virtual void releaseArrayPage( Value *value ) = 0;
- };
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-
- /** \brief base class for Value iterators.
- *
- */
- class ValueIteratorBase
- {
- public:
- typedef unsigned int size_t;
- typedef int difference_type;
- typedef ValueIteratorBase SelfType;
-
- ValueIteratorBase();
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
-#else
- ValueIteratorBase( const ValueInternalArray::IteratorState &state );
- ValueIteratorBase( const ValueInternalMap::IteratorState &state );
-#endif
-
- bool operator ==( const SelfType &other ) const
- {
- return isEqual( other );
- }
-
- bool operator !=( const SelfType &other ) const
- {
- return !isEqual( other );
- }
-
- difference_type operator -( const SelfType &other ) const
- {
- return computeDistance( other );
- }
-
- /// Return either the index or the member name of the referenced value as a Value.
- Value key() const;
-
- /// Return the index of the referenced Value. -1 if it is not an arrayValue.
- UInt index() const;
-
- /// Return the member name of the referenced Value. "" if it is not an objectValue.
- const char *memberName() const;
-
- protected:
- Value &deref() const;
-
- void increment();
-
- void decrement();
-
- difference_type computeDistance( const SelfType &other ) const;
-
- bool isEqual( const SelfType &other ) const;
-
- void copy( const SelfType &other );
-
- private:
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- Value::ObjectValues::iterator current_;
- // Indicates that iterator is for a null value.
- bool isNull_;
-#else
- union
- {
- ValueInternalArray::IteratorState array_;
- ValueInternalMap::IteratorState map_;
- } iterator_;
- bool isArray_;
-#endif
- };
-
- /** \brief const iterator for object and array value.
- *
- */
- class ValueConstIterator : public ValueIteratorBase
- {
- friend class Value;
- public:
- typedef unsigned int size_t;
- typedef int difference_type;
- typedef const Value &reference;
- typedef const Value *pointer;
- typedef ValueConstIterator SelfType;
-
- ValueConstIterator();
- private:
- /*! \internal Use by Value to create an iterator.
- */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
-#else
- ValueConstIterator( const ValueInternalArray::IteratorState &state );
- ValueConstIterator( const ValueInternalMap::IteratorState &state );
-#endif
- public:
- SelfType &operator =( const ValueIteratorBase &other );
-
- SelfType operator++( int )
- {
- SelfType temp( *this );
- ++*this;
- return temp;
- }
-
- SelfType operator--( int )
- {
- SelfType temp( *this );
- --*this;
- return temp;
- }
-
- SelfType &operator--()
- {
- decrement();
- return *this;
- }
-
- SelfType &operator++()
- {
- increment();
- return *this;
- }
-
- reference operator *() const
- {
- return deref();
- }
- };
-
-
- /** \brief Iterator for object and array value.
- */
- class ValueIterator : public ValueIteratorBase
- {
- friend class Value;
- public:
- typedef unsigned int size_t;
- typedef int difference_type;
- typedef Value &reference;
- typedef Value *pointer;
- typedef ValueIterator SelfType;
-
- ValueIterator();
- ValueIterator( const ValueConstIterator &other );
- ValueIterator( const ValueIterator &other );
- private:
- /*! \internal Use by Value to create an iterator.
- */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- explicit ValueIterator( const Value::ObjectValues::iterator &current );
-#else
- ValueIterator( const ValueInternalArray::IteratorState &state );
- ValueIterator( const ValueInternalMap::IteratorState &state );
-#endif
- public:
-
- SelfType &operator =( const SelfType &other );
-
- SelfType operator++( int )
- {
- SelfType temp( *this );
- ++*this;
- return temp;
- }
-
- SelfType operator--( int )
- {
- SelfType temp( *this );
- --*this;
- return temp;
- }
-
- SelfType &operator--()
- {
- decrement();
- return *this;
- }
-
- SelfType &operator++()
- {
- increment();
- return *this;
- }
-
- reference operator *() const
- {
- return deref();
- }
- };
-
-
-} // namespace Json
-
-
-#endif // CPPTL_JSON_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/writer.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/writer.h
deleted file mode 100644
index 478936365..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/include/json/writer.h
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_WRITER_H_INCLUDED
-# define JSON_WRITER_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include "value.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-# include <vector>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
- class Value;
-
- /** \brief Abstract class for writers.
- */
- class JSON_API Writer
- {
- public:
- virtual ~Writer();
-
- virtual std::string write( const Value &root ) = 0;
- };
-
- /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
- *
- * The JSON document is written in a single line. It is not intended for 'human' consumption,
- * but may be usefull to support feature such as RPC where bandwith is limited.
- * \sa Reader, Value
- */
- class JSON_API FastWriter : public Writer
- {
- public:
- FastWriter();
- virtual ~FastWriter(){}
-
- void enableYAMLCompatibility();
-
- public: // overridden from Writer
- virtual std::string write( const Value &root );
-
- private:
- void writeValue( const Value &value );
-
- std::string document_;
- bool yamlCompatiblityEnabled_;
- };
-
- /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
- *
- * The rules for line break and indent are as follow:
- * - Object value:
- * - if empty then print {} without indent and line break
- * - if not empty the print '{', line break & indent, print one value per line
- * and then unindent and line break and print '}'.
- * - Array value:
- * - if empty then print [] without indent and line break
- * - if the array contains no object value, empty array or some other value types,
- * and all the values fit on one lines, then print the array on a single line.
- * - otherwise, it the values do not fit on one line, or the array contains
- * object or non empty array, then print one value per line.
- *
- * If the Value have comments then they are outputed according to their #CommentPlacement.
- *
- * \sa Reader, Value, Value::setComment()
- */
- class JSON_API StyledWriter: public Writer
- {
- public:
- StyledWriter();
- virtual ~StyledWriter(){}
-
- public: // overridden from Writer
- /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
- * \param root Value to serialize.
- * \return String containing the JSON document that represents the root value.
- */
- virtual std::string write( const Value &root );
-
- private:
- void writeValue( const Value &value );
- void writeArrayValue( const Value &value );
- bool isMultineArray( const Value &value );
- void pushValue( const std::string &value );
- void writeIndent();
- void writeWithIndent( const std::string &value );
- void indent();
- void unindent();
- void writeCommentBeforeValue( const Value &root );
- void writeCommentAfterValueOnSameLine( const Value &root );
- bool hasCommentForValue( const Value &value );
- static std::string normalizeEOL( const std::string &text );
-
- typedef std::vector<std::string> ChildValues;
-
- ChildValues childValues_;
- std::string document_;
- std::string indentString_;
- int rightMargin_;
- int indentSize_;
- bool addChildValues_;
- };
-
- /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
- to a stream rather than to a string.
- *
- * The rules for line break and indent are as follow:
- * - Object value:
- * - if empty then print {} without indent and line break
- * - if not empty the print '{', line break & indent, print one value per line
- * and then unindent and line break and print '}'.
- * - Array value:
- * - if empty then print [] without indent and line break
- * - if the array contains no object value, empty array or some other value types,
- * and all the values fit on one lines, then print the array on a single line.
- * - otherwise, it the values do not fit on one line, or the array contains
- * object or non empty array, then print one value per line.
- *
- * If the Value have comments then they are outputed according to their #CommentPlacement.
- *
- * \param indentation Each level will be indented by this amount extra.
- * \sa Reader, Value, Value::setComment()
- */
- class JSON_API StyledStreamWriter
- {
- public:
- StyledStreamWriter( std::string indentation="\t" );
- ~StyledStreamWriter(){}
-
- public:
- /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
- * \param out Stream to write to. (Can be ostringstream, e.g.)
- * \param root Value to serialize.
- * \note There is no point in deriving from Writer, since write() should not return a value.
- */
- void write( std::ostream &out, const Value &root );
-
- private:
- void writeValue( const Value &value );
- void writeArrayValue( const Value &value );
- bool isMultineArray( const Value &value );
- void pushValue( const std::string &value );
- void writeIndent();
- void writeWithIndent( const std::string &value );
- void indent();
- void unindent();
- void writeCommentBeforeValue( const Value &root );
- void writeCommentAfterValueOnSameLine( const Value &root );
- bool hasCommentForValue( const Value &value );
- static std::string normalizeEOL( const std::string &text );
-
- typedef std::vector<std::string> ChildValues;
-
- ChildValues childValues_;
- std::ostream* document_;
- std::string indentString_;
- int rightMargin_;
- std::string indentation_;
- bool addChildValues_;
- };
-
-# if defined(JSON_HAS_INT64)
- std::string JSON_API valueToString( Int value );
- std::string JSON_API valueToString( UInt value );
-# endif // if defined(JSON_HAS_INT64)
- std::string JSON_API valueToString( LargestInt value );
- std::string JSON_API valueToString( LargestUInt value );
- std::string JSON_API valueToString( double value );
- std::string JSON_API valueToString( bool value );
- std::string JSON_API valueToQuotedString( const char *value );
-
- /// \brief Output using the StyledStreamWriter.
- /// \see Json::operator>>()
- std::ostream& operator<<( std::ostream&, const Value &root );
-
-} // namespace Json
-
-
-
-#endif // JSON_WRITER_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsoncpp.sln b/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsoncpp.sln
deleted file mode 100644
index 5bfa36654..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsoncpp.sln
+++ /dev/null
@@ -1,46 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_json", "lib_json.vcproj", "{B84F7231-16CE-41D8-8C08-7B523FF4225B}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsontest", "jsontest.vcproj", "{25AF2DD2-D396-4668-B188-488C33B8E620}"
- ProjectSection(ProjectDependencies) = postProject
- {B84F7231-16CE-41D8-8C08-7B523FF4225B} = {B84F7231-16CE-41D8-8C08-7B523FF4225B}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_lib_json", "test_lib_json.vcproj", "{B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}"
- ProjectSection(ProjectDependencies) = postProject
- {B84F7231-16CE-41D8-8C08-7B523FF4225B} = {B84F7231-16CE-41D8-8C08-7B523FF4225B}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- dummy = dummy
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {B84F7231-16CE-41D8-8C08-7B523FF4225B}.Debug.ActiveCfg = Debug|Win32
- {B84F7231-16CE-41D8-8C08-7B523FF4225B}.Debug.Build.0 = Debug|Win32
- {B84F7231-16CE-41D8-8C08-7B523FF4225B}.dummy.ActiveCfg = dummy|Win32
- {B84F7231-16CE-41D8-8C08-7B523FF4225B}.dummy.Build.0 = dummy|Win32
- {B84F7231-16CE-41D8-8C08-7B523FF4225B}.Release.ActiveCfg = Release|Win32
- {B84F7231-16CE-41D8-8C08-7B523FF4225B}.Release.Build.0 = Release|Win32
- {25AF2DD2-D396-4668-B188-488C33B8E620}.Debug.ActiveCfg = Debug|Win32
- {25AF2DD2-D396-4668-B188-488C33B8E620}.Debug.Build.0 = Debug|Win32
- {25AF2DD2-D396-4668-B188-488C33B8E620}.dummy.ActiveCfg = Debug|Win32
- {25AF2DD2-D396-4668-B188-488C33B8E620}.dummy.Build.0 = Debug|Win32
- {25AF2DD2-D396-4668-B188-488C33B8E620}.Release.ActiveCfg = Release|Win32
- {25AF2DD2-D396-4668-B188-488C33B8E620}.Release.Build.0 = Release|Win32
- {B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}.Debug.ActiveCfg = Debug|Win32
- {B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}.Debug.Build.0 = Debug|Win32
- {B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}.dummy.ActiveCfg = Debug|Win32
- {B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}.dummy.Build.0 = Debug|Win32
- {B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}.Release.ActiveCfg = Release|Win32
- {B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsontest.vcproj b/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsontest.vcproj
deleted file mode 100644
index 99a4dd697..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/jsontest.vcproj
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="jsontest"
- ProjectGUID="{25AF2DD2-D396-4668-B188-488C33B8E620}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="../../build/vs71/debug/jsontest"
- IntermediateDirectory="../../build/vs71/debug/jsontest"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/jsontest.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/jsontest.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="../../build/vs71/release/jsontest"
- IntermediateDirectory="../../build/vs71/release/jsontest"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/jsontest.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\..\src\jsontestrunner\main.cpp">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/lib_json.vcproj b/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/lib_json.vcproj
deleted file mode 100644
index 2d7bf9916..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/lib_json.vcproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="lib_json"
- ProjectGUID="{B84F7231-16CE-41D8-8C08-7B523FF4225B}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="../../build/vs71/debug/lib_json"
- IntermediateDirectory="../../build/vs71/debug/lib_json"
- ConfigurationType="4"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- StringPooling="TRUE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableFunctionLevelLinking="TRUE"
- DisableLanguageExtensions="TRUE"
- ForceConformanceInForLoopScope="FALSE"
- RuntimeTypeInfo="TRUE"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/json_vc71_libmtd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="../../build/vs71/release/lib_json"
- IntermediateDirectory="../../build/vs71/release/lib_json"
- ConfigurationType="4"
- CharacterSet="2"
- WholeProgramOptimization="TRUE">
- <Tool
- Name="VCCLCompilerTool"
- GlobalOptimizations="TRUE"
- EnableIntrinsicFunctions="TRUE"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="TRUE"
- DisableLanguageExtensions="TRUE"
- ForceConformanceInForLoopScope="FALSE"
- RuntimeTypeInfo="TRUE"
- UsePrecompiledHeader="0"
- AssemblerOutput="4"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/json_vc71_libmt.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="dummy|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="2"
- WholeProgramOptimization="TRUE">
- <Tool
- Name="VCCLCompilerTool"
- GlobalOptimizations="TRUE"
- EnableIntrinsicFunctions="TRUE"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="4"
- EnableFunctionLevelLinking="TRUE"
- DisableLanguageExtensions="TRUE"
- ForceConformanceInForLoopScope="FALSE"
- RuntimeTypeInfo="TRUE"
- UsePrecompiledHeader="0"
- AssemblerOutput="4"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="TRUE"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\..\include\json\autolink.h">
- </File>
- <File
- RelativePath="..\..\include\json\config.h">
- </File>
- <File
- RelativePath="..\..\include\json\features.h">
- </File>
- <File
- RelativePath="..\..\include\json\forwards.h">
- </File>
- <File
- RelativePath="..\..\include\json\json.h">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_batchallocator.h">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_internalarray.inl">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_internalmap.inl">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_reader.cpp">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_value.cpp">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_valueiterator.inl">
- </File>
- <File
- RelativePath="..\..\src\lib_json\json_writer.cpp">
- </File>
- <File
- RelativePath="..\..\include\json\reader.h">
- </File>
- <File
- RelativePath="..\..\include\json\value.h">
- </File>
- <File
- RelativePath="..\..\include\json\writer.h">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/test_lib_json.vcproj b/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/test_lib_json.vcproj
deleted file mode 100644
index df36700bd..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/makefiles/vs71/test_lib_json.vcproj
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="test_lib_json"
- ProjectGUID="{B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}"
- RootNamespace="test_lib_json"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="../../build/vs71/debug/test_lib_json"
- IntermediateDirectory="../../build/vs71/debug/test_lib_json"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/test_lib_json.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/test_lib_json.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Running all unit tests"
- CommandLine="$(TargetPath)"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="../../build/vs71/release/test_lib_json"
- IntermediateDirectory="../../build/vs71/release/test_lib_json"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/test_lib_json.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Running all unit tests"
- CommandLine="$(TargetPath)"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\..\src\test_lib_json\jsontest.cpp">
- </File>
- <File
- RelativePath="..\..\src\test_lib_json\jsontest.h">
- </File>
- <File
- RelativePath="..\..\src\test_lib_json\main.cpp">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/makerelease.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/makerelease.py
deleted file mode 100644
index 6b8eec307..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/makerelease.py
+++ /dev/null
@@ -1,380 +0,0 @@
-"""Tag the sandbox for release, make source and doc tarballs.
-
-Requires Python 2.6
-
-Example of invocation (use to test the script):
-python makerelease.py --platform=msvc6,msvc71,msvc80,msvc90,mingw -ublep 0.6.0 0.7.0-dev
-
-When testing this script:
-python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep test-0.6.0 test-0.6.1-dev
-
-Example of invocation when doing a release:
-python makerelease.py 0.5.0 0.6.0-dev
-"""
-import os.path
-import subprocess
-import sys
-import doxybuild
-import subprocess
-import xml.etree.ElementTree as ElementTree
-import shutil
-import urllib2
-import tempfile
-import os
-import time
-from devtools import antglob, fixeol, tarball
-import amalgamate
-
-SVN_ROOT = 'https://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/'
-SVN_TAG_ROOT = SVN_ROOT + 'tags/jsoncpp'
-SCONS_LOCAL_URL = 'http://sourceforge.net/projects/scons/files/scons-local/1.2.0/scons-local-1.2.0.tar.gz/download'
-SOURCEFORGE_PROJECT = 'jsoncpp'
-
-def set_version( version ):
- with open('version','wb') as f:
- f.write( version.strip() )
-
-def rmdir_if_exist( dir_path ):
- if os.path.isdir( dir_path ):
- shutil.rmtree( dir_path )
-
-class SVNError(Exception):
- pass
-
-def svn_command( command, *args ):
- cmd = ['svn', '--non-interactive', command] + list(args)
- print 'Running:', ' '.join( cmd )
- process = subprocess.Popen( cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT )
- stdout = process.communicate()[0]
- if process.returncode:
- error = SVNError( 'SVN command failed:\n' + stdout )
- error.returncode = process.returncode
- raise error
- return stdout
-
-def check_no_pending_commit():
- """Checks that there is no pending commit in the sandbox."""
- stdout = svn_command( 'status', '--xml' )
- etree = ElementTree.fromstring( stdout )
- msg = []
- for entry in etree.getiterator( 'entry' ):
- path = entry.get('path')
- status = entry.find('wc-status').get('item')
- if status != 'unversioned' and path != 'version':
- msg.append( 'File "%s" has pending change (status="%s")' % (path, status) )
- if msg:
- msg.insert(0, 'Pending change to commit found in sandbox. Commit them first!' )
- return '\n'.join( msg )
-
-def svn_join_url( base_url, suffix ):
- if not base_url.endswith('/'):
- base_url += '/'
- if suffix.startswith('/'):
- suffix = suffix[1:]
- return base_url + suffix
-
-def svn_check_if_tag_exist( tag_url ):
- """Checks if a tag exist.
- Returns: True if the tag exist, False otherwise.
- """
- try:
- list_stdout = svn_command( 'list', tag_url )
- except SVNError, e:
- if e.returncode != 1 or not str(e).find('tag_url'):
- raise e
- # otherwise ignore error, meaning tag does not exist
- return False
- return True
-
-def svn_commit( message ):
- """Commit the sandbox, providing the specified comment.
- """
- svn_command( 'ci', '-m', message )
-
-def svn_tag_sandbox( tag_url, message ):
- """Makes a tag based on the sandbox revisions.
- """
- svn_command( 'copy', '-m', message, '.', tag_url )
-
-def svn_remove_tag( tag_url, message ):
- """Removes an existing tag.
- """
- svn_command( 'delete', '-m', message, tag_url )
-
-def svn_export( tag_url, export_dir ):
- """Exports the tag_url revision to export_dir.
- Target directory, including its parent is created if it does not exist.
- If the directory export_dir exist, it is deleted before export proceed.
- """
- rmdir_if_exist( export_dir )
- svn_command( 'export', tag_url, export_dir )
-
-def fix_sources_eol( dist_dir ):
- """Set file EOL for tarball distribution.
- """
- print 'Preparing exported source file EOL for distribution...'
- prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist'
- win_sources = antglob.glob( dist_dir,
- includes = '**/*.sln **/*.vcproj',
- prune_dirs = prune_dirs )
- unix_sources = antglob.glob( dist_dir,
- includes = '''**/*.h **/*.cpp **/*.inl **/*.txt **/*.dox **/*.py **/*.html **/*.in
- sconscript *.json *.expected AUTHORS LICENSE''',
- excludes = antglob.default_excludes + 'scons.py sconsign.py scons-*',
- prune_dirs = prune_dirs )
- for path in win_sources:
- fixeol.fix_source_eol( path, is_dry_run = False, verbose = True, eol = '\r\n' )
- for path in unix_sources:
- fixeol.fix_source_eol( path, is_dry_run = False, verbose = True, eol = '\n' )
-
-def download( url, target_path ):
- """Download file represented by url to target_path.
- """
- f = urllib2.urlopen( url )
- try:
- data = f.read()
- finally:
- f.close()
- fout = open( target_path, 'wb' )
- try:
- fout.write( data )
- finally:
- fout.close()
-
-def check_compile( distcheck_top_dir, platform ):
- cmd = [sys.executable, 'scons.py', 'platform=%s' % platform, 'check']
- print 'Running:', ' '.join( cmd )
- log_path = os.path.join( distcheck_top_dir, 'build-%s.log' % platform )
- flog = open( log_path, 'wb' )
- try:
- process = subprocess.Popen( cmd,
- stdout=flog,
- stderr=subprocess.STDOUT,
- cwd=distcheck_top_dir )
- stdout = process.communicate()[0]
- status = (process.returncode == 0)
- finally:
- flog.close()
- return (status, log_path)
-
-def write_tempfile( content, **kwargs ):
- fd, path = tempfile.mkstemp( **kwargs )
- f = os.fdopen( fd, 'wt' )
- try:
- f.write( content )
- finally:
- f.close()
- return path
-
-class SFTPError(Exception):
- pass
-
-def run_sftp_batch( userhost, sftp, batch, retry=0 ):
- path = write_tempfile( batch, suffix='.sftp', text=True )
- # psftp -agent -C blep,jsoncpp@web.sourceforge.net -batch -b batch.sftp -bc
- cmd = [sftp, '-agent', '-C', '-batch', '-b', path, '-bc', userhost]
- error = None
- for retry_index in xrange(0, max(1,retry)):
- heading = retry_index == 0 and 'Running:' or 'Retrying:'
- print heading, ' '.join( cmd )
- process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
- stdout = process.communicate()[0]
- if process.returncode != 0:
- error = SFTPError( 'SFTP batch failed:\n' + stdout )
- else:
- break
- if error:
- raise error
- return stdout
-
-def sourceforge_web_synchro( sourceforge_project, doc_dir,
- user=None, sftp='sftp' ):
- """Notes: does not synchronize sub-directory of doc-dir.
- """
- userhost = '%s,%s@web.sourceforge.net' % (user, sourceforge_project)
- stdout = run_sftp_batch( userhost, sftp, """
-cd htdocs
-dir
-exit
-""" )
- existing_paths = set()
- collect = 0
- for line in stdout.split('\n'):
- line = line.strip()
- if not collect and line.endswith('> dir'):
- collect = True
- elif collect and line.endswith('> exit'):
- break
- elif collect == 1:
- collect = 2
- elif collect == 2:
- path = line.strip().split()[-1:]
- if path and path[0] not in ('.', '..'):
- existing_paths.add( path[0] )
- upload_paths = set( [os.path.basename(p) for p in antglob.glob( doc_dir )] )
- paths_to_remove = existing_paths - upload_paths
- if paths_to_remove:
- print 'Removing the following file from web:'
- print '\n'.join( paths_to_remove )
- stdout = run_sftp_batch( userhost, sftp, """cd htdocs
-rm %s
-exit""" % ' '.join(paths_to_remove) )
- print 'Uploading %d files:' % len(upload_paths)
- batch_size = 10
- upload_paths = list(upload_paths)
- start_time = time.time()
- for index in xrange(0,len(upload_paths),batch_size):
- paths = upload_paths[index:index+batch_size]
- file_per_sec = (time.time() - start_time) / (index+1)
- remaining_files = len(upload_paths) - index
- remaining_sec = file_per_sec * remaining_files
- print '%d/%d, ETA=%.1fs' % (index+1, len(upload_paths), remaining_sec)
- run_sftp_batch( userhost, sftp, """cd htdocs
-lcd %s
-mput %s
-exit""" % (doc_dir, ' '.join(paths) ), retry=3 )
-
-def sourceforge_release_tarball( sourceforge_project, paths, user=None, sftp='sftp' ):
- userhost = '%s,%s@frs.sourceforge.net' % (user, sourceforge_project)
- run_sftp_batch( userhost, sftp, """
-mput %s
-exit
-""" % (' '.join(paths),) )
-
-
-def main():
- usage = """%prog release_version next_dev_version
-Update 'version' file to release_version and commit.
-Generates the document tarball.
-Tags the sandbox revision with release_version.
-Update 'version' file to next_dev_version and commit.
-
-Performs an svn export of tag release version, and build a source tarball.
-
-Must be started in the project top directory.
-
-Warning: --force should only be used when developping/testing the release script.
-"""
- from optparse import OptionParser
- parser = OptionParser(usage=usage)
- parser.allow_interspersed_args = False
- parser.add_option('--dot', dest="dot_path", action='store', default=doxybuild.find_program('dot'),
- help="""Path to GraphViz dot tool. Must be full qualified path. [Default: %default]""")
- parser.add_option('--doxygen', dest="doxygen_path", action='store', default=doxybuild.find_program('doxygen'),
- help="""Path to Doxygen tool. [Default: %default]""")
- parser.add_option('--force', dest="ignore_pending_commit", action='store_true', default=False,
- help="""Ignore pending commit. [Default: %default]""")
- parser.add_option('--retag', dest="retag_release", action='store_true', default=False,
- help="""Overwrite release existing tag if it exist. [Default: %default]""")
- parser.add_option('-p', '--platforms', dest="platforms", action='store', default='',
- help="""Comma separated list of platform passed to scons for build check.""")
- parser.add_option('--no-test', dest="no_test", action='store_true', default=False,
- help="""Skips build check.""")
- parser.add_option('--no-web', dest="no_web", action='store_true', default=False,
- help="""Do not update web site.""")
- parser.add_option('-u', '--upload-user', dest="user", action='store',
- help="""Sourceforge user for SFTP documentation upload.""")
- parser.add_option('--sftp', dest='sftp', action='store', default=doxybuild.find_program('psftp', 'sftp'),
- help="""Path of the SFTP compatible binary used to upload the documentation.""")
- parser.enable_interspersed_args()
- options, args = parser.parse_args()
-
- if len(args) != 2:
- parser.error( 'release_version missing on command-line.' )
- release_version = args[0]
- next_version = args[1]
-
- if not options.platforms and not options.no_test:
- parser.error( 'You must specify either --platform or --no-test option.' )
-
- if options.ignore_pending_commit:
- msg = ''
- else:
- msg = check_no_pending_commit()
- if not msg:
- print 'Setting version to', release_version
- set_version( release_version )
- svn_commit( 'Release ' + release_version )
- tag_url = svn_join_url( SVN_TAG_ROOT, release_version )
- if svn_check_if_tag_exist( tag_url ):
- if options.retag_release:
- svn_remove_tag( tag_url, 'Overwriting previous tag' )
- else:
- print 'Aborting, tag %s already exist. Use --retag to overwrite it!' % tag_url
- sys.exit( 1 )
- svn_tag_sandbox( tag_url, 'Release ' + release_version )
-
- print 'Generated doxygen document...'
-## doc_dirname = r'jsoncpp-api-html-0.5.0'
-## doc_tarball_path = r'e:\prg\vc\Lib\jsoncpp-trunk\dist\jsoncpp-api-html-0.5.0.tar.gz'
- doc_tarball_path, doc_dirname = doxybuild.build_doc( options, make_release=True )
- doc_distcheck_dir = 'dist/doccheck'
- tarball.decompress( doc_tarball_path, doc_distcheck_dir )
- doc_distcheck_top_dir = os.path.join( doc_distcheck_dir, doc_dirname )
-
- export_dir = 'dist/export'
- svn_export( tag_url, export_dir )
- fix_sources_eol( export_dir )
-
- source_dir = 'jsoncpp-src-' + release_version
- source_tarball_path = 'dist/%s.tar.gz' % source_dir
- print 'Generating source tarball to', source_tarball_path
- tarball.make_tarball( source_tarball_path, [export_dir], export_dir, prefix_dir=source_dir )
-
- amalgamation_tarball_path = 'dist/%s-amalgamation.tar.gz' % source_dir
- print 'Generating amalgamation source tarball to', amalgamation_tarball_path
- amalgamation_dir = 'dist/amalgamation'
- amalgamate.amalgamate_source( export_dir, '%s/jsoncpp.cpp' % amalgamation_dir, 'json/json.h' )
- amalgamation_source_dir = 'jsoncpp-src-amalgamation' + release_version
- tarball.make_tarball( amalgamation_tarball_path, [amalgamation_dir],
- amalgamation_dir, prefix_dir=amalgamation_source_dir )
-
- # Decompress source tarball, download and install scons-local
- distcheck_dir = 'dist/distcheck'
- distcheck_top_dir = distcheck_dir + '/' + source_dir
- print 'Decompressing source tarball to', distcheck_dir
- rmdir_if_exist( distcheck_dir )
- tarball.decompress( source_tarball_path, distcheck_dir )
- scons_local_path = 'dist/scons-local.tar.gz'
- print 'Downloading scons-local to', scons_local_path
- download( SCONS_LOCAL_URL, scons_local_path )
- print 'Decompressing scons-local to', distcheck_top_dir
- tarball.decompress( scons_local_path, distcheck_top_dir )
-
- # Run compilation
- print 'Compiling decompressed tarball'
- all_build_status = True
- for platform in options.platforms.split(','):
- print 'Testing platform:', platform
- build_status, log_path = check_compile( distcheck_top_dir, platform )
- print 'see build log:', log_path
- print build_status and '=> ok' or '=> FAILED'
- all_build_status = all_build_status and build_status
- if not build_status:
- print 'Testing failed on at least one platform, aborting...'
- svn_remove_tag( tag_url, 'Removing tag due to failed testing' )
- sys.exit(1)
- if options.user:
- if not options.no_web:
- print 'Uploading documentation using user', options.user
- sourceforge_web_synchro( SOURCEFORGE_PROJECT, doc_distcheck_top_dir, user=options.user, sftp=options.sftp )
- print 'Completed documentation upload'
- print 'Uploading source and documentation tarballs for release using user', options.user
- sourceforge_release_tarball( SOURCEFORGE_PROJECT,
- [source_tarball_path, doc_tarball_path],
- user=options.user, sftp=options.sftp )
- print 'Source and doc release tarballs uploaded'
- else:
- print 'No upload user specified. Web site and download tarbal were not uploaded.'
- print 'Tarball can be found at:', doc_tarball_path
-
- # Set next version number and commit
- set_version( next_version )
- svn_commit( 'Released ' + release_version )
- else:
- sys.stderr.write( msg + '\n' )
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/globtool.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/globtool.py
deleted file mode 100644
index 811140e8a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/globtool.py
+++ /dev/null
@@ -1,53 +0,0 @@
-import fnmatch
-import os
-
-def generate( env ):
- def Glob( env, includes = None, excludes = None, dir = '.' ):
- """Adds Glob( includes = Split( '*' ), excludes = None, dir = '.')
- helper function to environment.
-
- Glob both the file-system files.
-
- includes: list of file name pattern included in the return list when matched.
- excludes: list of file name pattern exluced from the return list.
-
- Example:
- sources = env.Glob( ("*.cpp", '*.h'), "~*.cpp", "#src" )
- """
- def filterFilename(path):
- abs_path = os.path.join( dir, path )
- if not os.path.isfile(abs_path):
- return 0
- fn = os.path.basename(path)
- match = 0
- for include in includes:
- if fnmatch.fnmatchcase( fn, include ):
- match = 1
- break
- if match == 1 and not excludes is None:
- for exclude in excludes:
- if fnmatch.fnmatchcase( fn, exclude ):
- match = 0
- break
- return match
- if includes is None:
- includes = ('*',)
- elif type(includes) in ( type(''), type(u'') ):
- includes = (includes,)
- if type(excludes) in ( type(''), type(u'') ):
- excludes = (excludes,)
- dir = env.Dir(dir).abspath
- paths = os.listdir( dir )
- def makeAbsFileNode( path ):
- return env.File( os.path.join( dir, path ) )
- nodes = filter( filterFilename, paths )
- return map( makeAbsFileNode, nodes )
-
- from SCons.Script import Environment
- Environment.Glob = Glob
-
-def exists(env):
- """
- Tool always exists.
- """
- return True
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/srcdist.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/srcdist.py
deleted file mode 100644
index 864ff4081..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/srcdist.py
+++ /dev/null
@@ -1,179 +0,0 @@
-import os
-import os.path
-from fnmatch import fnmatch
-import targz
-
-##def DoxyfileParse(file_contents):
-## """
-## Parse a Doxygen source file and return a dictionary of all the values.
-## Values will be strings and lists of strings.
-## """
-## data = {}
-##
-## import shlex
-## lex = shlex.shlex(instream = file_contents, posix = True)
-## lex.wordchars += "*+./-:"
-## lex.whitespace = lex.whitespace.replace("\n", "")
-## lex.escape = ""
-##
-## lineno = lex.lineno
-## last_backslash_lineno = lineno
-## token = lex.get_token()
-## key = token # the first token should be a key
-## last_token = ""
-## key_token = False
-## next_key = False
-## new_data = True
-##
-## def append_data(data, key, new_data, token):
-## if new_data or len(data[key]) == 0:
-## data[key].append(token)
-## else:
-## data[key][-1] += token
-##
-## while token:
-## if token in ['\n']:
-## if last_token not in ['\\']:
-## key_token = True
-## elif token in ['\\']:
-## pass
-## elif key_token:
-## key = token
-## key_token = False
-## else:
-## if token == "+=":
-## if not data.has_key(key):
-## data[key] = list()
-## elif token == "=":
-## data[key] = list()
-## else:
-## append_data( data, key, new_data, token )
-## new_data = True
-##
-## last_token = token
-## token = lex.get_token()
-##
-## if last_token == '\\' and token != '\n':
-## new_data = False
-## append_data( data, key, new_data, '\\' )
-##
-## # compress lists of len 1 into single strings
-## for (k, v) in data.items():
-## if len(v) == 0:
-## data.pop(k)
-##
-## # items in the following list will be kept as lists and not converted to strings
-## if k in ["INPUT", "FILE_PATTERNS", "EXCLUDE_PATTERNS"]:
-## continue
-##
-## if len(v) == 1:
-## data[k] = v[0]
-##
-## return data
-##
-##def DoxySourceScan(node, env, path):
-## """
-## Doxygen Doxyfile source scanner. This should scan the Doxygen file and add
-## any files used to generate docs to the list of source files.
-## """
-## default_file_patterns = [
-## '*.c', '*.cc', '*.cxx', '*.cpp', '*.c++', '*.java', '*.ii', '*.ixx',
-## '*.ipp', '*.i++', '*.inl', '*.h', '*.hh ', '*.hxx', '*.hpp', '*.h++',
-## '*.idl', '*.odl', '*.cs', '*.php', '*.php3', '*.inc', '*.m', '*.mm',
-## '*.py',
-## ]
-##
-## default_exclude_patterns = [
-## '*~',
-## ]
-##
-## sources = []
-##
-## data = DoxyfileParse(node.get_contents())
-##
-## if data.get("RECURSIVE", "NO") == "YES":
-## recursive = True
-## else:
-## recursive = False
-##
-## file_patterns = data.get("FILE_PATTERNS", default_file_patterns)
-## exclude_patterns = data.get("EXCLUDE_PATTERNS", default_exclude_patterns)
-##
-## for node in data.get("INPUT", []):
-## if os.path.isfile(node):
-## sources.add(node)
-## elif os.path.isdir(node):
-## if recursive:
-## for root, dirs, files in os.walk(node):
-## for f in files:
-## filename = os.path.join(root, f)
-##
-## pattern_check = reduce(lambda x, y: x or bool(fnmatch(filename, y)), file_patterns, False)
-## exclude_check = reduce(lambda x, y: x and fnmatch(filename, y), exclude_patterns, True)
-##
-## if pattern_check and not exclude_check:
-## sources.append(filename)
-## else:
-## for pattern in file_patterns:
-## sources.extend(glob.glob("/".join([node, pattern])))
-## sources = map( lambda path: env.File(path), sources )
-## return sources
-##
-##
-##def DoxySourceScanCheck(node, env):
-## """Check if we should scan this file"""
-## return os.path.isfile(node.path)
-
-def srcDistEmitter(source, target, env):
-## """Doxygen Doxyfile emitter"""
-## # possible output formats and their default values and output locations
-## output_formats = {
-## "HTML": ("YES", "html"),
-## "LATEX": ("YES", "latex"),
-## "RTF": ("NO", "rtf"),
-## "MAN": ("YES", "man"),
-## "XML": ("NO", "xml"),
-## }
-##
-## data = DoxyfileParse(source[0].get_contents())
-##
-## targets = []
-## out_dir = data.get("OUTPUT_DIRECTORY", ".")
-##
-## # add our output locations
-## for (k, v) in output_formats.items():
-## if data.get("GENERATE_" + k, v[0]) == "YES":
-## targets.append(env.Dir( os.path.join(out_dir, data.get(k + "_OUTPUT", v[1]))) )
-##
-## # don't clobber targets
-## for node in targets:
-## env.Precious(node)
-##
-## # set up cleaning stuff
-## for node in targets:
-## env.Clean(node, node)
-##
-## return (targets, source)
- return (target,source)
-
-def generate(env):
- """
- Add builders and construction variables for the
- SrcDist tool.
- """
-## doxyfile_scanner = env.Scanner(
-## DoxySourceScan,
-## "DoxySourceScan",
-## scan_check = DoxySourceScanCheck,
-## )
-
- if targz.exists(env):
- srcdist_builder = targz.makeBuilder( srcDistEmitter )
-
- env['BUILDERS']['SrcDist'] = srcdist_builder
-
-def exists(env):
- """
- Make sure srcdist exists.
- """
- return targz.exists(env)
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/substinfile.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/substinfile.py
deleted file mode 100644
index 4d305851b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/substinfile.py
+++ /dev/null
@@ -1,79 +0,0 @@
-import re
-from SCons.Script import * # the usual scons stuff you get in a SConscript
-
-def generate(env):
- """
- Add builders and construction variables for the
- SubstInFile tool.
-
- Adds SubstInFile builder, which substitutes the keys->values of SUBST_DICT
- from the source to the target.
- The values of SUBST_DICT first have any construction variables expanded
- (its keys are not expanded).
- If a value of SUBST_DICT is a python callable function, it is called and
- the result is expanded as the value.
- If there's more than one source and more than one target, each target gets
- substituted from the corresponding source.
- """
- def do_subst_in_file(targetfile, sourcefile, dict):
- """Replace all instances of the keys of dict with their values.
- For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
- then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
- """
- try:
- f = open(sourcefile, 'rb')
- contents = f.read()
- f.close()
- except:
- raise SCons.Errors.UserError, "Can't read source file %s"%sourcefile
- for (k,v) in dict.items():
- contents = re.sub(k, v, contents)
- try:
- f = open(targetfile, 'wb')
- f.write(contents)
- f.close()
- except:
- raise SCons.Errors.UserError, "Can't write target file %s"%targetfile
- return 0 # success
-
- def subst_in_file(target, source, env):
- if not env.has_key('SUBST_DICT'):
- raise SCons.Errors.UserError, "SubstInFile requires SUBST_DICT to be set."
- d = dict(env['SUBST_DICT']) # copy it
- for (k,v) in d.items():
- if callable(v):
- d[k] = env.subst(v()).replace('\\','\\\\')
- elif SCons.Util.is_String(v):
- d[k] = env.subst(v).replace('\\','\\\\')
- else:
- raise SCons.Errors.UserError, "SubstInFile: key %s: %s must be a string or callable"%(k, repr(v))
- for (t,s) in zip(target, source):
- return do_subst_in_file(str(t), str(s), d)
-
- def subst_in_file_string(target, source, env):
- """This is what gets printed on the console."""
- return '\n'.join(['Substituting vars from %s into %s'%(str(s), str(t))
- for (t,s) in zip(target, source)])
-
- def subst_emitter(target, source, env):
- """Add dependency from substituted SUBST_DICT to target.
- Returns original target, source tuple unchanged.
- """
- d = env['SUBST_DICT'].copy() # copy it
- for (k,v) in d.items():
- if callable(v):
- d[k] = env.subst(v())
- elif SCons.Util.is_String(v):
- d[k]=env.subst(v)
- Depends(target, SCons.Node.Python.Value(d))
- return target, source
-
-## env.Append(TOOLS = 'substinfile') # this should be automaticaly done by Scons ?!?
- subst_action = SCons.Action.Action( subst_in_file, subst_in_file_string )
- env['BUILDERS']['SubstInFile'] = Builder(action=subst_action, emitter=subst_emitter)
-
-def exists(env):
- """
- Make sure tool exists.
- """
- return True
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/targz.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/targz.py
deleted file mode 100644
index f5432003d..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/scons-tools/targz.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""tarball
-
-Tool-specific initialization for tarball.
-
-"""
-
-## Commands to tackle a command based implementation:
-##to unpack on the fly...
-##gunzip < FILE.tar.gz | tar xvf -
-##to pack on the fly...
-##tar cvf - FILE-LIST | gzip -c > FILE.tar.gz
-
-import os.path
-
-import SCons.Builder
-import SCons.Node.FS
-import SCons.Util
-
-try:
- import gzip
- import tarfile
- internal_targz = 1
-except ImportError:
- internal_targz = 0
-
-TARGZ_DEFAULT_COMPRESSION_LEVEL = 9
-
-if internal_targz:
- def targz(target, source, env):
- def archive_name( path ):
- path = os.path.normpath( os.path.abspath( path ) )
- common_path = os.path.commonprefix( (base_dir, path) )
- archive_name = path[len(common_path):]
- return archive_name
-
- def visit(tar, dirname, names):
- for name in names:
- path = os.path.join(dirname, name)
- if os.path.isfile(path):
- tar.add(path, archive_name(path) )
- compression = env.get('TARGZ_COMPRESSION_LEVEL',TARGZ_DEFAULT_COMPRESSION_LEVEL)
- base_dir = os.path.normpath( env.get('TARGZ_BASEDIR', env.Dir('.')).abspath )
- target_path = str(target[0])
- fileobj = gzip.GzipFile( target_path, 'wb', compression )
- tar = tarfile.TarFile(os.path.splitext(target_path)[0], 'w', fileobj)
- for source in source:
- source_path = str(source)
- if source.isdir():
- os.path.walk(source_path, visit, tar)
- else:
- tar.add(source_path, archive_name(source_path) ) # filename, arcname
- tar.close()
-
- targzAction = SCons.Action.Action(targz, varlist=['TARGZ_COMPRESSION_LEVEL','TARGZ_BASEDIR'])
-
- def makeBuilder( emitter = None ):
- return SCons.Builder.Builder(action = SCons.Action.Action('$TARGZ_COM', '$TARGZ_COMSTR'),
- source_factory = SCons.Node.FS.Entry,
- source_scanner = SCons.Defaults.DirScanner,
- suffix = '$TARGZ_SUFFIX',
- multi = 1)
- TarGzBuilder = makeBuilder()
-
- def generate(env):
- """Add Builders and construction variables for zip to an Environment.
- The following environnement variables may be set:
- TARGZ_COMPRESSION_LEVEL: integer, [0-9]. 0: no compression, 9: best compression (same as gzip compression level).
- TARGZ_BASEDIR: base-directory used to determine archive name (this allow archive name to be relative
- to something other than top-dir).
- """
- env['BUILDERS']['TarGz'] = TarGzBuilder
- env['TARGZ_COM'] = targzAction
- env['TARGZ_COMPRESSION_LEVEL'] = TARGZ_DEFAULT_COMPRESSION_LEVEL # range 0-9
- env['TARGZ_SUFFIX'] = '.tar.gz'
- env['TARGZ_BASEDIR'] = env.Dir('.') # Sources archive name are made relative to that directory.
-else:
- def generate(env):
- pass
-
-
-def exists(env):
- return internal_targz
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/main.cpp b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/main.cpp
deleted file mode 100644
index dfb6150e0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/main.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-/* This executable is used for testing parser/writer using real JSON files.
- */
-
-
-#include <json/json.h>
-#include <algorithm> // sort
-#include <stdio.h>
-
-#if defined(_MSC_VER) && _MSC_VER >= 1310
-# pragma warning( disable: 4996 ) // disable fopen deprecation warning
-#endif
-
-static std::string
-readInputTestFile( const char *path )
-{
- FILE *file = fopen( path, "rb" );
- if ( !file )
- return std::string("");
- fseek( file, 0, SEEK_END );
- long size = ftell( file );
- fseek( file, 0, SEEK_SET );
- std::string text;
- char *buffer = new char[size+1];
- buffer[size] = 0;
- if ( fread( buffer, 1, size, file ) == (unsigned long)size )
- text = buffer;
- fclose( file );
- delete[] buffer;
- return text;
-}
-
-
-static void
-printValueTree( FILE *fout, Json::Value &value, const std::string &path = "." )
-{
- switch ( value.type() )
- {
- case Json::nullValue:
- fprintf( fout, "%s=null\n", path.c_str() );
- break;
- case Json::intValue:
- fprintf( fout, "%s=%s\n", path.c_str(), Json::valueToString( value.asLargestInt() ).c_str() );
- break;
- case Json::uintValue:
- fprintf( fout, "%s=%s\n", path.c_str(), Json::valueToString( value.asLargestUInt() ).c_str() );
- break;
- case Json::realValue:
- fprintf( fout, "%s=%.16g\n", path.c_str(), value.asDouble() );
- break;
- case Json::stringValue:
- fprintf( fout, "%s=\"%s\"\n", path.c_str(), value.asString().c_str() );
- break;
- case Json::booleanValue:
- fprintf( fout, "%s=%s\n", path.c_str(), value.asBool() ? "true" : "false" );
- break;
- case Json::arrayValue:
- {
- fprintf( fout, "%s=[]\n", path.c_str() );
- int size = value.size();
- for ( int index =0; index < size; ++index )
- {
- static char buffer[16];
- sprintf( buffer, "[%d]", index );
- printValueTree( fout, value[index], path + buffer );
- }
- }
- break;
- case Json::objectValue:
- {
- fprintf( fout, "%s={}\n", path.c_str() );
- Json::Value::Members members( value.getMemberNames() );
- std::sort( members.begin(), members.end() );
- std::string suffix = *(path.end()-1) == '.' ? "" : ".";
- for ( Json::Value::Members::iterator it = members.begin();
- it != members.end();
- ++it )
- {
- const std::string &name = *it;
- printValueTree( fout, value[name], path + suffix + name );
- }
- }
- break;
- default:
- break;
- }
-}
-
-
-static int
-parseAndSaveValueTree( const std::string &input,
- const std::string &actual,
- const std::string &kind,
- Json::Value &root,
- const Json::Features &features,
- bool parseOnly )
-{
- Json::Reader reader( features );
- bool parsingSuccessful = reader.parse( input, root );
- if ( !parsingSuccessful )
- {
- printf( "Failed to parse %s file: \n%s\n",
- kind.c_str(),
- reader.getFormattedErrorMessages().c_str() );
- return 1;
- }
-
- if ( !parseOnly )
- {
- FILE *factual = fopen( actual.c_str(), "wt" );
- if ( !factual )
- {
- printf( "Failed to create %s actual file.\n", kind.c_str() );
- return 2;
- }
- printValueTree( factual, root );
- fclose( factual );
- }
- return 0;
-}
-
-
-static int
-rewriteValueTree( const std::string &rewritePath,
- const Json::Value &root,
- std::string &rewrite )
-{
- //Json::FastWriter writer;
- //writer.enableYAMLCompatibility();
- Json::StyledWriter writer;
- rewrite = writer.write( root );
- FILE *fout = fopen( rewritePath.c_str(), "wt" );
- if ( !fout )
- {
- printf( "Failed to create rewrite file: %s\n", rewritePath.c_str() );
- return 2;
- }
- fprintf( fout, "%s\n", rewrite.c_str() );
- fclose( fout );
- return 0;
-}
-
-
-static std::string
-removeSuffix( const std::string &path,
- const std::string &extension )
-{
- if ( extension.length() >= path.length() )
- return std::string("");
- std::string suffix = path.substr( path.length() - extension.length() );
- if ( suffix != extension )
- return std::string("");
- return path.substr( 0, path.length() - extension.length() );
-}
-
-
-static void
-printConfig()
-{
- // Print the configuration used to compile JsonCpp
-#if defined(JSON_NO_INT64)
- printf( "JSON_NO_INT64=1\n" );
-#else
- printf( "JSON_NO_INT64=0\n" );
-#endif
-}
-
-
-static int
-printUsage( const char *argv[] )
-{
- printf( "Usage: %s [--strict] input-json-file", argv[0] );
- return 3;
-}
-
-
-int
-parseCommandLine( int argc, const char *argv[],
- Json::Features &features, std::string &path,
- bool &parseOnly )
-{
- parseOnly = false;
- if ( argc < 2 )
- {
- return printUsage( argv );
- }
-
- int index = 1;
- if ( std::string(argv[1]) == "--json-checker" )
- {
- features = Json::Features::strictMode();
- parseOnly = true;
- ++index;
- }
-
- if ( std::string(argv[1]) == "--json-config" )
- {
- printConfig();
- return 3;
- }
-
- if ( index == argc || index + 1 < argc )
- {
- return printUsage( argv );
- }
-
- path = argv[index];
- return 0;
-}
-
-
-int main( int argc, const char *argv[] )
-{
- std::string path;
- Json::Features features;
- bool parseOnly;
- int exitCode = parseCommandLine( argc, argv, features, path, parseOnly );
- if ( exitCode != 0 )
- {
- return exitCode;
- }
-
- try
- {
- std::string input = readInputTestFile( path.c_str() );
- if ( input.empty() )
- {
- printf( "Failed to read input or empty input: %s\n", path.c_str() );
- return 3;
- }
-
- std::string basePath = removeSuffix( argv[1], ".json" );
- if ( !parseOnly && basePath.empty() )
- {
- printf( "Bad input path. Path does not end with '.expected':\n%s\n", path.c_str() );
- return 3;
- }
-
- std::string actualPath = basePath + ".actual";
- std::string rewritePath = basePath + ".rewrite";
- std::string rewriteActualPath = basePath + ".actual-rewrite";
-
- Json::Value root;
- exitCode = parseAndSaveValueTree( input, actualPath, "input", root, features, parseOnly );
- if ( exitCode == 0 && !parseOnly )
- {
- std::string rewrite;
- exitCode = rewriteValueTree( rewritePath, root, rewrite );
- if ( exitCode == 0 )
- {
- Json::Value rewriteRoot;
- exitCode = parseAndSaveValueTree( rewrite, rewriteActualPath,
- "rewrite", rewriteRoot, features, parseOnly );
- }
- }
- }
- catch ( const std::exception &e )
- {
- printf( "Unhandled exception:\n%s\n", e.what() );
- exitCode = 1;
- }
-
- return exitCode;
-}
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/sconscript b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/sconscript
deleted file mode 100644
index 180c8ec35..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/jsontestrunner/sconscript
+++ /dev/null
@@ -1,9 +0,0 @@
-Import( 'env_testing buildJSONTests' )
-
-buildJSONTests( env_testing, Split( """
- main.cpp
- """ ),
- 'jsontestrunner' )
-
-# For 'check' to work, 'libs' must be built first.
-env_testing.Depends('jsontestrunner', '#libs')
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_batchallocator.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_batchallocator.h
deleted file mode 100644
index 173e2ed25..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_batchallocator.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
-# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
-
-# include <stdlib.h>
-# include <assert.h>
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-namespace Json {
-
-/* Fast memory allocator.
- *
- * This memory allocator allocates memory for a batch of object (specified by
- * the page size, the number of object in each page).
- *
- * It does not allow the destruction of a single object. All the allocated objects
- * can be destroyed at once. The memory can be either released or reused for future
- * allocation.
- *
- * The in-place new operator must be used to construct the object using the pointer
- * returned by allocate.
- */
-template<typename AllocatedType
- ,const unsigned int objectPerAllocation>
-class BatchAllocator
-{
-public:
- typedef AllocatedType Type;
-
- BatchAllocator( unsigned int objectsPerPage = 255 )
- : freeHead_( 0 )
- , objectsPerPage_( objectsPerPage )
- {
-// printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
- assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
- assert( objectsPerPage >= 16 );
- batches_ = allocateBatch( 0 ); // allocated a dummy page
- currentBatch_ = batches_;
- }
-
- ~BatchAllocator()
- {
- for ( BatchInfo *batch = batches_; batch; )
- {
- BatchInfo *nextBatch = batch->next_;
- free( batch );
- batch = nextBatch;
- }
- }
-
- /// allocate space for an array of objectPerAllocation object.
- /// @warning it is the responsability of the caller to call objects constructors.
- AllocatedType *allocate()
- {
- if ( freeHead_ ) // returns node from free list.
- {
- AllocatedType *object = freeHead_;
- freeHead_ = *(AllocatedType **)object;
- return object;
- }
- if ( currentBatch_->used_ == currentBatch_->end_ )
- {
- currentBatch_ = currentBatch_->next_;
- while ( currentBatch_ && currentBatch_->used_ == currentBatch_->end_ )
- currentBatch_ = currentBatch_->next_;
-
- if ( !currentBatch_ ) // no free batch found, allocate a new one
- {
- currentBatch_ = allocateBatch( objectsPerPage_ );
- currentBatch_->next_ = batches_; // insert at the head of the list
- batches_ = currentBatch_;
- }
- }
- AllocatedType *allocated = currentBatch_->used_;
- currentBatch_->used_ += objectPerAllocation;
- return allocated;
- }
-
- /// Release the object.
- /// @warning it is the responsability of the caller to actually destruct the object.
- void release( AllocatedType *object )
- {
- assert( object != 0 );
- *(AllocatedType **)object = freeHead_;
- freeHead_ = object;
- }
-
-private:
- struct BatchInfo
- {
- BatchInfo *next_;
- AllocatedType *used_;
- AllocatedType *end_;
- AllocatedType buffer_[objectPerAllocation];
- };
-
- // disabled copy constructor and assignement operator.
- BatchAllocator( const BatchAllocator & );
- void operator =( const BatchAllocator &);
-
- static BatchInfo *allocateBatch( unsigned int objectsPerPage )
- {
- const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
- + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
- BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
- batch->next_ = 0;
- batch->used_ = batch->buffer_;
- batch->end_ = batch->buffer_ + objectsPerPage;
- return batch;
- }
-
- BatchInfo *batches_;
- BatchInfo *currentBatch_;
- /// Head of a single linked list within the allocated space of freeed object
- AllocatedType *freeHead_;
- unsigned int objectsPerPage_;
-};
-
-
-} // namespace Json
-
-# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
-
-#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalarray.inl b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalarray.inl
deleted file mode 100644
index 3a532ad75..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalarray.inl
+++ /dev/null
@@ -1,456 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-// included by json_value.cpp
-
-namespace Json {
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueArrayAllocator::~ValueArrayAllocator()
-{
-}
-
-// //////////////////////////////////////////////////////////////////
-// class DefaultValueArrayAllocator
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
- virtual ~DefaultValueArrayAllocator()
- {
- }
-
- virtual ValueInternalArray *newArray()
- {
- return new ValueInternalArray();
- }
-
- virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
- {
- return new ValueInternalArray( other );
- }
-
- virtual void destructArray( ValueInternalArray *array )
- {
- delete array;
- }
-
- virtual void reallocateArrayPageIndex( Value **&indexes,
- ValueInternalArray::PageIndex &indexCount,
- ValueInternalArray::PageIndex minNewIndexCount )
- {
- ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
- if ( minNewIndexCount > newIndexCount )
- newIndexCount = minNewIndexCount;
- void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
- if ( !newIndexes )
- throw std::bad_alloc();
- indexCount = newIndexCount;
- indexes = static_cast<Value **>( newIndexes );
- }
- virtual void releaseArrayPageIndex( Value **indexes,
- ValueInternalArray::PageIndex indexCount )
- {
- if ( indexes )
- free( indexes );
- }
-
- virtual Value *allocateArrayPage()
- {
- return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
- }
-
- virtual void releaseArrayPage( Value *value )
- {
- if ( value )
- free( value );
- }
-};
-
-#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
- virtual ~DefaultValueArrayAllocator()
- {
- }
-
- virtual ValueInternalArray *newArray()
- {
- ValueInternalArray *array = arraysAllocator_.allocate();
- new (array) ValueInternalArray(); // placement new
- return array;
- }
-
- virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
- {
- ValueInternalArray *array = arraysAllocator_.allocate();
- new (array) ValueInternalArray( other ); // placement new
- return array;
- }
-
- virtual void destructArray( ValueInternalArray *array )
- {
- if ( array )
- {
- array->~ValueInternalArray();
- arraysAllocator_.release( array );
- }
- }
-
- virtual void reallocateArrayPageIndex( Value **&indexes,
- ValueInternalArray::PageIndex &indexCount,
- ValueInternalArray::PageIndex minNewIndexCount )
- {
- ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
- if ( minNewIndexCount > newIndexCount )
- newIndexCount = minNewIndexCount;
- void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
- if ( !newIndexes )
- throw std::bad_alloc();
- indexCount = newIndexCount;
- indexes = static_cast<Value **>( newIndexes );
- }
- virtual void releaseArrayPageIndex( Value **indexes,
- ValueInternalArray::PageIndex indexCount )
- {
- if ( indexes )
- free( indexes );
- }
-
- virtual Value *allocateArrayPage()
- {
- return static_cast<Value *>( pagesAllocator_.allocate() );
- }
-
- virtual void releaseArrayPage( Value *value )
- {
- if ( value )
- pagesAllocator_.release( value );
- }
-private:
- BatchAllocator<ValueInternalArray,1> arraysAllocator_;
- BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
-};
-#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-static ValueArrayAllocator *&arrayAllocator()
-{
- static DefaultValueArrayAllocator defaultAllocator;
- static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
- return arrayAllocator;
-}
-
-static struct DummyArrayAllocatorInitializer {
- DummyArrayAllocatorInitializer()
- {
- arrayAllocator(); // ensure arrayAllocator() statics are initialized before main().
- }
-} dummyArrayAllocatorInitializer;
-
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-bool
-ValueInternalArray::equals( const IteratorState &x,
- const IteratorState &other )
-{
- return x.array_ == other.array_
- && x.currentItemIndex_ == other.currentItemIndex_
- && x.currentPageIndex_ == other.currentPageIndex_;
-}
-
-
-void
-ValueInternalArray::increment( IteratorState &it )
-{
- JSON_ASSERT_MESSAGE( it.array_ &&
- (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
- != it.array_->size_,
- "ValueInternalArray::increment(): moving iterator beyond end" );
- ++(it.currentItemIndex_);
- if ( it.currentItemIndex_ == itemsPerPage )
- {
- it.currentItemIndex_ = 0;
- ++(it.currentPageIndex_);
- }
-}
-
-
-void
-ValueInternalArray::decrement( IteratorState &it )
-{
- JSON_ASSERT_MESSAGE( it.array_ && it.currentPageIndex_ == it.array_->pages_
- && it.currentItemIndex_ == 0,
- "ValueInternalArray::decrement(): moving iterator beyond end" );
- if ( it.currentItemIndex_ == 0 )
- {
- it.currentItemIndex_ = itemsPerPage-1;
- --(it.currentPageIndex_);
- }
- else
- {
- --(it.currentItemIndex_);
- }
-}
-
-
-Value &
-ValueInternalArray::unsafeDereference( const IteratorState &it )
-{
- return (*(it.currentPageIndex_))[it.currentItemIndex_];
-}
-
-
-Value &
-ValueInternalArray::dereference( const IteratorState &it )
-{
- JSON_ASSERT_MESSAGE( it.array_ &&
- (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
- < it.array_->size_,
- "ValueInternalArray::dereference(): dereferencing invalid iterator" );
- return unsafeDereference( it );
-}
-
-void
-ValueInternalArray::makeBeginIterator( IteratorState &it ) const
-{
- it.array_ = const_cast<ValueInternalArray *>( this );
- it.currentItemIndex_ = 0;
- it.currentPageIndex_ = pages_;
-}
-
-
-void
-ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
-{
- it.array_ = const_cast<ValueInternalArray *>( this );
- it.currentItemIndex_ = index % itemsPerPage;
- it.currentPageIndex_ = pages_ + index / itemsPerPage;
-}
-
-
-void
-ValueInternalArray::makeEndIterator( IteratorState &it ) const
-{
- makeIterator( it, size_ );
-}
-
-
-ValueInternalArray::ValueInternalArray()
- : pages_( 0 )
- , size_( 0 )
- , pageCount_( 0 )
-{
-}
-
-
-ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
- : pages_( 0 )
- , pageCount_( 0 )
- , size_( other.size_ )
-{
- PageIndex minNewPages = other.size_ / itemsPerPage;
- arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
- JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages,
- "ValueInternalArray::reserve(): bad reallocation" );
- IteratorState itOther;
- other.makeBeginIterator( itOther );
- Value *value;
- for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
- {
- if ( index % itemsPerPage == 0 )
- {
- PageIndex pageIndex = index / itemsPerPage;
- value = arrayAllocator()->allocateArrayPage();
- pages_[pageIndex] = value;
- }
- new (value) Value( dereference( itOther ) );
- }
-}
-
-
-ValueInternalArray &
-ValueInternalArray::operator =( const ValueInternalArray &other )
-{
- ValueInternalArray temp( other );
- swap( temp );
- return *this;
-}
-
-
-ValueInternalArray::~ValueInternalArray()
-{
- // destroy all constructed items
- IteratorState it;
- IteratorState itEnd;
- makeBeginIterator( it);
- makeEndIterator( itEnd );
- for ( ; !equals(it,itEnd); increment(it) )
- {
- Value *value = &dereference(it);
- value->~Value();
- }
- // release all pages
- PageIndex lastPageIndex = size_ / itemsPerPage;
- for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
- arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
- // release pages index
- arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
-}
-
-
-void
-ValueInternalArray::swap( ValueInternalArray &other )
-{
- Value **tempPages = pages_;
- pages_ = other.pages_;
- other.pages_ = tempPages;
- ArrayIndex tempSize = size_;
- size_ = other.size_;
- other.size_ = tempSize;
- PageIndex tempPageCount = pageCount_;
- pageCount_ = other.pageCount_;
- other.pageCount_ = tempPageCount;
-}
-
-void
-ValueInternalArray::clear()
-{
- ValueInternalArray dummy;
- swap( dummy );
-}
-
-
-void
-ValueInternalArray::resize( ArrayIndex newSize )
-{
- if ( newSize == 0 )
- clear();
- else if ( newSize < size_ )
- {
- IteratorState it;
- IteratorState itEnd;
- makeIterator( it, newSize );
- makeIterator( itEnd, size_ );
- for ( ; !equals(it,itEnd); increment(it) )
- {
- Value *value = &dereference(it);
- value->~Value();
- }
- PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
- PageIndex lastPageIndex = size_ / itemsPerPage;
- for ( ; pageIndex < lastPageIndex; ++pageIndex )
- arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
- size_ = newSize;
- }
- else if ( newSize > size_ )
- resolveReference( newSize );
-}
-
-
-void
-ValueInternalArray::makeIndexValid( ArrayIndex index )
-{
- // Need to enlarge page index ?
- if ( index >= pageCount_ * itemsPerPage )
- {
- PageIndex minNewPages = (index + 1) / itemsPerPage;
- arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
- JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
- }
-
- // Need to allocate new pages ?
- ArrayIndex nextPageIndex =
- (size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
- : size_;
- if ( nextPageIndex <= index )
- {
- PageIndex pageIndex = nextPageIndex / itemsPerPage;
- PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
- for ( ; pageToAllocate-- > 0; ++pageIndex )
- pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
- }
-
- // Initialize all new entries
- IteratorState it;
- IteratorState itEnd;
- makeIterator( it, size_ );
- size_ = index + 1;
- makeIterator( itEnd, size_ );
- for ( ; !equals(it,itEnd); increment(it) )
- {
- Value *value = &dereference(it);
- new (value) Value(); // Construct a default value using placement new
- }
-}
-
-Value &
-ValueInternalArray::resolveReference( ArrayIndex index )
-{
- if ( index >= size_ )
- makeIndexValid( index );
- return pages_[index/itemsPerPage][index%itemsPerPage];
-}
-
-Value *
-ValueInternalArray::find( ArrayIndex index ) const
-{
- if ( index >= size_ )
- return 0;
- return &(pages_[index/itemsPerPage][index%itemsPerPage]);
-}
-
-ValueInternalArray::ArrayIndex
-ValueInternalArray::size() const
-{
- return size_;
-}
-
-int
-ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
-{
- return indexOf(y) - indexOf(x);
-}
-
-
-ValueInternalArray::ArrayIndex
-ValueInternalArray::indexOf( const IteratorState &iterator )
-{
- if ( !iterator.array_ )
- return ArrayIndex(-1);
- return ArrayIndex(
- (iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage
- + iterator.currentItemIndex_ );
-}
-
-
-int
-ValueInternalArray::compare( const ValueInternalArray &other ) const
-{
- int sizeDiff( size_ - other.size_ );
- if ( sizeDiff != 0 )
- return sizeDiff;
-
- for ( ArrayIndex index =0; index < size_; ++index )
- {
- int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare(
- other.pages_[index/itemsPerPage][index%itemsPerPage] );
- if ( diff != 0 )
- return diff;
- }
- return 0;
-}
-
-} // namespace Json
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalmap.inl b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalmap.inl
deleted file mode 100644
index f2fa16065..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_internalmap.inl
+++ /dev/null
@@ -1,615 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-// included by json_value.cpp
-
-namespace Json {
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalMap
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/** \internal MUST be safely initialized using memset( this, 0, sizeof(ValueInternalLink) );
- * This optimization is used by the fast allocator.
- */
-ValueInternalLink::ValueInternalLink()
- : previous_( 0 )
- , next_( 0 )
-{
-}
-
-ValueInternalLink::~ValueInternalLink()
-{
- for ( int index =0; index < itemPerLink; ++index )
- {
- if ( !items_[index].isItemAvailable() )
- {
- if ( !items_[index].isMemberNameStatic() )
- free( keys_[index] );
- }
- else
- break;
- }
-}
-
-
-
-ValueMapAllocator::~ValueMapAllocator()
-{
-}
-
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
- virtual ValueInternalMap *newMap()
- {
- return new ValueInternalMap();
- }
-
- virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
- {
- return new ValueInternalMap( other );
- }
-
- virtual void destructMap( ValueInternalMap *map )
- {
- delete map;
- }
-
- virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
- {
- return new ValueInternalLink[size];
- }
-
- virtual void releaseMapBuckets( ValueInternalLink *links )
- {
- delete [] links;
- }
-
- virtual ValueInternalLink *allocateMapLink()
- {
- return new ValueInternalLink();
- }
-
- virtual void releaseMapLink( ValueInternalLink *link )
- {
- delete link;
- }
-};
-#else
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
- virtual ValueInternalMap *newMap()
- {
- ValueInternalMap *map = mapsAllocator_.allocate();
- new (map) ValueInternalMap(); // placement new
- return map;
- }
-
- virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
- {
- ValueInternalMap *map = mapsAllocator_.allocate();
- new (map) ValueInternalMap( other ); // placement new
- return map;
- }
-
- virtual void destructMap( ValueInternalMap *map )
- {
- if ( map )
- {
- map->~ValueInternalMap();
- mapsAllocator_.release( map );
- }
- }
-
- virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
- {
- return new ValueInternalLink[size];
- }
-
- virtual void releaseMapBuckets( ValueInternalLink *links )
- {
- delete [] links;
- }
-
- virtual ValueInternalLink *allocateMapLink()
- {
- ValueInternalLink *link = linksAllocator_.allocate();
- memset( link, 0, sizeof(ValueInternalLink) );
- return link;
- }
-
- virtual void releaseMapLink( ValueInternalLink *link )
- {
- link->~ValueInternalLink();
- linksAllocator_.release( link );
- }
-private:
- BatchAllocator<ValueInternalMap,1> mapsAllocator_;
- BatchAllocator<ValueInternalLink,1> linksAllocator_;
-};
-#endif
-
-static ValueMapAllocator *&mapAllocator()
-{
- static DefaultValueMapAllocator defaultAllocator;
- static ValueMapAllocator *mapAllocator = &defaultAllocator;
- return mapAllocator;
-}
-
-static struct DummyMapAllocatorInitializer {
- DummyMapAllocatorInitializer()
- {
- mapAllocator(); // ensure mapAllocator() statics are initialized before main().
- }
-} dummyMapAllocatorInitializer;
-
-
-
-// h(K) = value * K >> w ; with w = 32 & K prime w.r.t. 2^32.
-
-/*
-use linked list hash map.
-buckets array is a container.
-linked list element contains 6 key/values. (memory = (16+4) * 6 + 4 = 124)
-value have extra state: valid, available, deleted
-*/
-
-
-ValueInternalMap::ValueInternalMap()
- : buckets_( 0 )
- , tailLink_( 0 )
- , bucketsSize_( 0 )
- , itemCount_( 0 )
-{
-}
-
-
-ValueInternalMap::ValueInternalMap( const ValueInternalMap &other )
- : buckets_( 0 )
- , tailLink_( 0 )
- , bucketsSize_( 0 )
- , itemCount_( 0 )
-{
- reserve( other.itemCount_ );
- IteratorState it;
- IteratorState itEnd;
- other.makeBeginIterator( it );
- other.makeEndIterator( itEnd );
- for ( ; !equals(it,itEnd); increment(it) )
- {
- bool isStatic;
- const char *memberName = key( it, isStatic );
- const Value &aValue = value( it );
- resolveReference(memberName, isStatic) = aValue;
- }
-}
-
-
-ValueInternalMap &
-ValueInternalMap::operator =( const ValueInternalMap &other )
-{
- ValueInternalMap dummy( other );
- swap( dummy );
- return *this;
-}
-
-
-ValueInternalMap::~ValueInternalMap()
-{
- if ( buckets_ )
- {
- for ( BucketIndex bucketIndex =0; bucketIndex < bucketsSize_; ++bucketIndex )
- {
- ValueInternalLink *link = buckets_[bucketIndex].next_;
- while ( link )
- {
- ValueInternalLink *linkToRelease = link;
- link = link->next_;
- mapAllocator()->releaseMapLink( linkToRelease );
- }
- }
- mapAllocator()->releaseMapBuckets( buckets_ );
- }
-}
-
-
-void
-ValueInternalMap::swap( ValueInternalMap &other )
-{
- ValueInternalLink *tempBuckets = buckets_;
- buckets_ = other.buckets_;
- other.buckets_ = tempBuckets;
- ValueInternalLink *tempTailLink = tailLink_;
- tailLink_ = other.tailLink_;
- other.tailLink_ = tempTailLink;
- BucketIndex tempBucketsSize = bucketsSize_;
- bucketsSize_ = other.bucketsSize_;
- other.bucketsSize_ = tempBucketsSize;
- BucketIndex tempItemCount = itemCount_;
- itemCount_ = other.itemCount_;
- other.itemCount_ = tempItemCount;
-}
-
-
-void
-ValueInternalMap::clear()
-{
- ValueInternalMap dummy;
- swap( dummy );
-}
-
-
-ValueInternalMap::BucketIndex
-ValueInternalMap::size() const
-{
- return itemCount_;
-}
-
-bool
-ValueInternalMap::reserveDelta( BucketIndex growth )
-{
- return reserve( itemCount_ + growth );
-}
-
-bool
-ValueInternalMap::reserve( BucketIndex newItemCount )
-{
- if ( !buckets_ && newItemCount > 0 )
- {
- buckets_ = mapAllocator()->allocateMapBuckets( 1 );
- bucketsSize_ = 1;
- tailLink_ = &buckets_[0];
- }
-// BucketIndex idealBucketCount = (newItemCount + ValueInternalLink::itemPerLink) / ValueInternalLink::itemPerLink;
- return true;
-}
-
-
-const Value *
-ValueInternalMap::find( const char *key ) const
-{
- if ( !bucketsSize_ )
- return 0;
- HashKey hashedKey = hash( key );
- BucketIndex bucketIndex = hashedKey % bucketsSize_;
- for ( const ValueInternalLink *current = &buckets_[bucketIndex];
- current != 0;
- current = current->next_ )
- {
- for ( BucketIndex index=0; index < ValueInternalLink::itemPerLink; ++index )
- {
- if ( current->items_[index].isItemAvailable() )
- return 0;
- if ( strcmp( key, current->keys_[index] ) == 0 )
- return &current->items_[index];
- }
- }
- return 0;
-}
-
-
-Value *
-ValueInternalMap::find( const char *key )
-{
- const ValueInternalMap *constThis = this;
- return const_cast<Value *>( constThis->find( key ) );
-}
-
-
-Value &
-ValueInternalMap::resolveReference( const char *key,
- bool isStatic )
-{
- HashKey hashedKey = hash( key );
- if ( bucketsSize_ )
- {
- BucketIndex bucketIndex = hashedKey % bucketsSize_;
- ValueInternalLink **previous = 0;
- BucketIndex index;
- for ( ValueInternalLink *current = &buckets_[bucketIndex];
- current != 0;
- previous = &current->next_, current = current->next_ )
- {
- for ( index=0; index < ValueInternalLink::itemPerLink; ++index )
- {
- if ( current->items_[index].isItemAvailable() )
- return setNewItem( key, isStatic, current, index );
- if ( strcmp( key, current->keys_[index] ) == 0 )
- return current->items_[index];
- }
- }
- }
-
- reserveDelta( 1 );
- return unsafeAdd( key, isStatic, hashedKey );
-}
-
-
-void
-ValueInternalMap::remove( const char *key )
-{
- HashKey hashedKey = hash( key );
- if ( !bucketsSize_ )
- return;
- BucketIndex bucketIndex = hashedKey % bucketsSize_;
- for ( ValueInternalLink *link = &buckets_[bucketIndex];
- link != 0;
- link = link->next_ )
- {
- BucketIndex index;
- for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
- {
- if ( link->items_[index].isItemAvailable() )
- return;
- if ( strcmp( key, link->keys_[index] ) == 0 )
- {
- doActualRemove( link, index, bucketIndex );
- return;
- }
- }
- }
-}
-
-void
-ValueInternalMap::doActualRemove( ValueInternalLink *link,
- BucketIndex index,
- BucketIndex bucketIndex )
-{
- // find last item of the bucket and swap it with the 'removed' one.
- // set removed items flags to 'available'.
- // if last page only contains 'available' items, then desallocate it (it's empty)
- ValueInternalLink *&lastLink = getLastLinkInBucket( index );
- BucketIndex lastItemIndex = 1; // a link can never be empty, so start at 1
- for ( ;
- lastItemIndex < ValueInternalLink::itemPerLink;
- ++lastItemIndex ) // may be optimized with dicotomic search
- {
- if ( lastLink->items_[lastItemIndex].isItemAvailable() )
- break;
- }
-
- BucketIndex lastUsedIndex = lastItemIndex - 1;
- Value *valueToDelete = &link->items_[index];
- Value *valueToPreserve = &lastLink->items_[lastUsedIndex];
- if ( valueToDelete != valueToPreserve )
- valueToDelete->swap( *valueToPreserve );
- if ( lastUsedIndex == 0 ) // page is now empty
- { // remove it from bucket linked list and delete it.
- ValueInternalLink *linkPreviousToLast = lastLink->previous_;
- if ( linkPreviousToLast != 0 ) // can not deleted bucket link.
- {
- mapAllocator()->releaseMapLink( lastLink );
- linkPreviousToLast->next_ = 0;
- lastLink = linkPreviousToLast;
- }
- }
- else
- {
- Value dummy;
- valueToPreserve->swap( dummy ); // restore deleted to default Value.
- valueToPreserve->setItemUsed( false );
- }
- --itemCount_;
-}
-
-
-ValueInternalLink *&
-ValueInternalMap::getLastLinkInBucket( BucketIndex bucketIndex )
-{
- if ( bucketIndex == bucketsSize_ - 1 )
- return tailLink_;
- ValueInternalLink *&previous = buckets_[bucketIndex+1].previous_;
- if ( !previous )
- previous = &buckets_[bucketIndex];
- return previous;
-}
-
-
-Value &
-ValueInternalMap::setNewItem( const char *key,
- bool isStatic,
- ValueInternalLink *link,
- BucketIndex index )
-{
- char *duplicatedKey = makeMemberName( key );
- ++itemCount_;
- link->keys_[index] = duplicatedKey;
- link->items_[index].setItemUsed();
- link->items_[index].setMemberNameIsStatic( isStatic );
- return link->items_[index]; // items already default constructed.
-}
-
-
-Value &
-ValueInternalMap::unsafeAdd( const char *key,
- bool isStatic,
- HashKey hashedKey )
-{
- JSON_ASSERT_MESSAGE( bucketsSize_ > 0, "ValueInternalMap::unsafeAdd(): internal logic error." );
- BucketIndex bucketIndex = hashedKey % bucketsSize_;
- ValueInternalLink *&previousLink = getLastLinkInBucket( bucketIndex );
- ValueInternalLink *link = previousLink;
- BucketIndex index;
- for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
- {
- if ( link->items_[index].isItemAvailable() )
- break;
- }
- if ( index == ValueInternalLink::itemPerLink ) // need to add a new page
- {
- ValueInternalLink *newLink = mapAllocator()->allocateMapLink();
- index = 0;
- link->next_ = newLink;
- previousLink = newLink;
- link = newLink;
- }
- return setNewItem( key, isStatic, link, index );
-}
-
-
-ValueInternalMap::HashKey
-ValueInternalMap::hash( const char *key ) const
-{
- HashKey hash = 0;
- while ( *key )
- hash += *key++ * 37;
- return hash;
-}
-
-
-int
-ValueInternalMap::compare( const ValueInternalMap &other ) const
-{
- int sizeDiff( itemCount_ - other.itemCount_ );
- if ( sizeDiff != 0 )
- return sizeDiff;
- // Strict order guaranty is required. Compare all keys FIRST, then compare values.
- IteratorState it;
- IteratorState itEnd;
- makeBeginIterator( it );
- makeEndIterator( itEnd );
- for ( ; !equals(it,itEnd); increment(it) )
- {
- if ( !other.find( key( it ) ) )
- return 1;
- }
-
- // All keys are equals, let's compare values
- makeBeginIterator( it );
- for ( ; !equals(it,itEnd); increment(it) )
- {
- const Value *otherValue = other.find( key( it ) );
- int valueDiff = value(it).compare( *otherValue );
- if ( valueDiff != 0 )
- return valueDiff;
- }
- return 0;
-}
-
-
-void
-ValueInternalMap::makeBeginIterator( IteratorState &it ) const
-{
- it.map_ = const_cast<ValueInternalMap *>( this );
- it.bucketIndex_ = 0;
- it.itemIndex_ = 0;
- it.link_ = buckets_;
-}
-
-
-void
-ValueInternalMap::makeEndIterator( IteratorState &it ) const
-{
- it.map_ = const_cast<ValueInternalMap *>( this );
- it.bucketIndex_ = bucketsSize_;
- it.itemIndex_ = 0;
- it.link_ = 0;
-}
-
-
-bool
-ValueInternalMap::equals( const IteratorState &x, const IteratorState &other )
-{
- return x.map_ == other.map_
- && x.bucketIndex_ == other.bucketIndex_
- && x.link_ == other.link_
- && x.itemIndex_ == other.itemIndex_;
-}
-
-
-void
-ValueInternalMap::incrementBucket( IteratorState &iterator )
-{
- ++iterator.bucketIndex_;
- JSON_ASSERT_MESSAGE( iterator.bucketIndex_ <= iterator.map_->bucketsSize_,
- "ValueInternalMap::increment(): attempting to iterate beyond end." );
- if ( iterator.bucketIndex_ == iterator.map_->bucketsSize_ )
- iterator.link_ = 0;
- else
- iterator.link_ = &(iterator.map_->buckets_[iterator.bucketIndex_]);
- iterator.itemIndex_ = 0;
-}
-
-
-void
-ValueInternalMap::increment( IteratorState &iterator )
-{
- JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterator using invalid iterator." );
- ++iterator.itemIndex_;
- if ( iterator.itemIndex_ == ValueInternalLink::itemPerLink )
- {
- JSON_ASSERT_MESSAGE( iterator.link_ != 0,
- "ValueInternalMap::increment(): attempting to iterate beyond end." );
- iterator.link_ = iterator.link_->next_;
- if ( iterator.link_ == 0 )
- incrementBucket( iterator );
- }
- else if ( iterator.link_->items_[iterator.itemIndex_].isItemAvailable() )
- {
- incrementBucket( iterator );
- }
-}
-
-
-void
-ValueInternalMap::decrement( IteratorState &iterator )
-{
- if ( iterator.itemIndex_ == 0 )
- {
- JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterate using invalid iterator." );
- if ( iterator.link_ == &iterator.map_->buckets_[iterator.bucketIndex_] )
- {
- JSON_ASSERT_MESSAGE( iterator.bucketIndex_ > 0, "Attempting to iterate beyond beginning." );
- --(iterator.bucketIndex_);
- }
- iterator.link_ = iterator.link_->previous_;
- iterator.itemIndex_ = ValueInternalLink::itemPerLink - 1;
- }
-}
-
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator )
-{
- JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
- return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator, bool &isStatic )
-{
- JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
- isStatic = iterator.link_->items_[iterator.itemIndex_].isMemberNameStatic();
- return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-
-Value &
-ValueInternalMap::value( const IteratorState &iterator )
-{
- JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
- return iterator.link_->items_[iterator.itemIndex_];
-}
-
-
-int
-ValueInternalMap::distance( const IteratorState &x, const IteratorState &y )
-{
- int offset = 0;
- IteratorState it = x;
- while ( !equals( it, y ) )
- increment( it );
- return offset;
-}
-
-} // namespace Json
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_reader.cpp b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_reader.cpp
deleted file mode 100644
index 9bc6f2327..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_reader.cpp
+++ /dev/null
@@ -1,884 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include <json/reader.h>
-# include <json/value.h>
-# include "json_tool.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-#include <utility>
-#include <cstdio>
-#include <cassert>
-#include <cstring>
-#include <iostream>
-#include <stdexcept>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-// Implementation of class Features
-// ////////////////////////////////
-
-Features::Features()
- : allowComments_( true )
- , strictRoot_( false )
-{
-}
-
-
-Features
-Features::all()
-{
- return Features();
-}
-
-
-Features
-Features::strictMode()
-{
- Features features;
- features.allowComments_ = false;
- features.strictRoot_ = true;
- return features;
-}
-
-// Implementation of class Reader
-// ////////////////////////////////
-
-
-static inline bool
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
-{
- return c == c1 || c == c2 || c == c3 || c == c4;
-}
-
-static inline bool
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
-{
- return c == c1 || c == c2 || c == c3 || c == c4 || c == c5;
-}
-
-
-static bool
-containsNewLine( Reader::Location begin,
- Reader::Location end )
-{
- for ( ;begin < end; ++begin )
- if ( *begin == '\n' || *begin == '\r' )
- return true;
- return false;
-}
-
-
-// Class Reader
-// //////////////////////////////////////////////////////////////////
-
-Reader::Reader()
- : features_( Features::all() )
-{
-}
-
-
-Reader::Reader( const Features &features )
- : features_( features )
-{
-}
-
-
-bool
-Reader::parse( const std::string &document,
- Value &root,
- bool collectComments )
-{
- document_ = document;
- const char *begin = document_.c_str();
- const char *end = begin + document_.length();
- return parse( begin, end, root, collectComments );
-}
-
-
-bool
-Reader::parse( std::istream& sin,
- Value &root,
- bool collectComments )
-{
- //std::istream_iterator<char> begin(sin);
- //std::istream_iterator<char> end;
- // Those would allow streamed input from a file, if parse() were a
- // template function.
-
- // Since std::string is reference-counted, this at least does not
- // create an extra copy.
- std::string doc;
- std::getline(sin, doc, (char)EOF);
- return parse( doc, root, collectComments );
-}
-
-bool
-Reader::parse( const char *beginDoc, const char *endDoc,
- Value &root,
- bool collectComments )
-{
- if ( !features_.allowComments_ )
- {
- collectComments = false;
- }
-
- begin_ = beginDoc;
- end_ = endDoc;
- collectComments_ = collectComments;
- current_ = begin_;
- lastValueEnd_ = 0;
- lastValue_ = 0;
- commentsBefore_ = "";
- errors_.clear();
- while ( !nodes_.empty() )
- nodes_.pop();
- nodes_.push( &root );
-
- bool successful = readValue();
- Token token;
- skipCommentTokens( token );
- if ( collectComments_ && !commentsBefore_.empty() )
- root.setComment( commentsBefore_, commentAfter );
- if ( features_.strictRoot_ )
- {
- if ( !root.isArray() && !root.isObject() )
- {
- // Set error location to start of doc, ideally should be first token found in doc
- token.type_ = tokenError;
- token.start_ = beginDoc;
- token.end_ = endDoc;
- addError( "A valid JSON document must be either an array or an object value.",
- token );
- return false;
- }
- }
- return successful;
-}
-
-
-bool
-Reader::readValue()
-{
- Token token;
- skipCommentTokens( token );
- bool successful = true;
-
- if ( collectComments_ && !commentsBefore_.empty() )
- {
- currentValue().setComment( commentsBefore_, commentBefore );
- commentsBefore_ = "";
- }
-
-
- switch ( token.type_ )
- {
- case tokenObjectBegin:
- successful = readObject( token );
- break;
- case tokenArrayBegin:
- successful = readArray( token );
- break;
- case tokenNumber:
- successful = decodeNumber( token );
- break;
- case tokenString:
- successful = decodeString( token );
- break;
- case tokenTrue:
- currentValue() = true;
- break;
- case tokenFalse:
- currentValue() = false;
- break;
- case tokenNull:
- currentValue() = Value();
- break;
- default:
- return addError( "Syntax error: value, object or array expected.", token );
- }
-
- if ( collectComments_ )
- {
- lastValueEnd_ = current_;
- lastValue_ = &currentValue();
- }
-
- return successful;
-}
-
-
-void
-Reader::skipCommentTokens( Token &token )
-{
- if ( features_.allowComments_ )
- {
- do
- {
- readToken( token );
- }
- while ( token.type_ == tokenComment );
- }
- else
- {
- readToken( token );
- }
-}
-
-
-bool
-Reader::expectToken( TokenType type, Token &token, const char *message )
-{
- readToken( token );
- if ( token.type_ != type )
- return addError( message, token );
- return true;
-}
-
-
-bool
-Reader::readToken( Token &token )
-{
- skipSpaces();
- token.start_ = current_;
- Char c = getNextChar();
- bool ok = true;
- switch ( c )
- {
- case '{':
- token.type_ = tokenObjectBegin;
- break;
- case '}':
- token.type_ = tokenObjectEnd;
- break;
- case '[':
- token.type_ = tokenArrayBegin;
- break;
- case ']':
- token.type_ = tokenArrayEnd;
- break;
- case '"':
- token.type_ = tokenString;
- ok = readString();
- break;
- case '/':
- token.type_ = tokenComment;
- ok = readComment();
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case '-':
- token.type_ = tokenNumber;
- readNumber();
- break;
- case 'T':
- case 't':
- token.type_ = tokenTrue;
- ok = match( "rue", 3 );
- break;
- case 'F':
- case 'f':
- token.type_ = tokenFalse;
- ok = match( "alse", 4 );
- break;
- case 'N':
- case 'n':
- token.type_ = tokenNull;
- ok = match( "ull", 3 );
- break;
- case ',':
- token.type_ = tokenArraySeparator;
- break;
- case ':':
- token.type_ = tokenMemberSeparator;
- break;
- case 0:
- token.type_ = tokenEndOfStream;
- break;
- default:
- ok = false;
- break;
- }
- if ( !ok )
- token.type_ = tokenError;
- token.end_ = current_;
- return true;
-}
-
-
-void
-Reader::skipSpaces()
-{
- while ( current_ != end_ )
- {
- Char c = *current_;
- if ( c == ' ' || c == '\t' || c == '\r' || c == '\n' )
- ++current_;
- else
- break;
- }
-}
-
-
-bool
-Reader::match( Location pattern,
- int patternLength )
-{
- if ( end_ - current_ < patternLength )
- return false;
- int index = patternLength;
- while ( index-- )
- if ( current_[index] != pattern[index] )
- return false;
- current_ += patternLength;
- return true;
-}
-
-
-bool
-Reader::readComment()
-{
- Location commentBegin = current_ - 1;
- Char c = getNextChar();
- bool successful = false;
- if ( c == '*' )
- successful = readCStyleComment();
- else if ( c == '/' )
- successful = readCppStyleComment();
- if ( !successful )
- return false;
-
- if ( collectComments_ )
- {
- CommentPlacement placement = commentBefore;
- if ( lastValueEnd_ && !containsNewLine( lastValueEnd_, commentBegin ) )
- {
- if ( c != '*' || !containsNewLine( commentBegin, current_ ) )
- placement = commentAfterOnSameLine;
- }
-
- addComment( commentBegin, current_, placement );
- }
- return true;
-}
-
-
-void
-Reader::addComment( Location begin,
- Location end,
- CommentPlacement placement )
-{
- assert( collectComments_ );
- if ( placement == commentAfterOnSameLine )
- {
- assert( lastValue_ != 0 );
- lastValue_->setComment( std::string( begin, end ), placement );
- }
- else
- {
- if ( !commentsBefore_.empty() )
- commentsBefore_ += "\n";
- commentsBefore_ += std::string( begin, end );
- }
-}
-
-
-bool
-Reader::readCStyleComment()
-{
- while ( current_ != end_ )
- {
- Char c = getNextChar();
- if ( c == '*' && *current_ == '/' )
- break;
- }
- return getNextChar() == '/';
-}
-
-
-bool
-Reader::readCppStyleComment()
-{
- while ( current_ != end_ )
- {
- Char c = getNextChar();
- if ( c == '\r' || c == '\n' )
- break;
- }
- return true;
-}
-
-
-void
-Reader::readNumber()
-{
- while ( current_ != end_ )
- {
- if ( !(*current_ >= '0' && *current_ <= '9') &&
- !in( *current_, '.', 'e', 'E', '+', '-' ) )
- break;
- ++current_;
- }
-}
-
-bool
-Reader::readString()
-{
- Char c = 0;
- while ( current_ != end_ )
- {
- c = getNextChar();
- if ( c == '\\' )
- getNextChar();
- else if ( c == '"' )
- break;
- }
- return c == '"';
-}
-
-
-bool
-Reader::readObject( Token &/*tokenStart*/ )
-{
- Token tokenName;
- std::string name;
- currentValue() = Value( objectValue );
- while ( readToken( tokenName ) )
- {
- bool initialTokenOk = true;
- while ( tokenName.type_ == tokenComment && initialTokenOk )
- initialTokenOk = readToken( tokenName );
- if ( !initialTokenOk )
- break;
- if ( tokenName.type_ == tokenObjectEnd && name.empty() ) // empty object
- return true;
- if ( tokenName.type_ != tokenString )
- break;
-
- name = "";
- if ( !decodeString( tokenName, name ) )
- return recoverFromError( tokenObjectEnd );
-
- Token colon;
- if ( !readToken( colon ) || colon.type_ != tokenMemberSeparator )
- {
- return addErrorAndRecover( "Missing ':' after object member name",
- colon,
- tokenObjectEnd );
- }
- Value &value = currentValue()[ name ];
- nodes_.push( &value );
- bool ok = readValue();
- nodes_.pop();
- if ( !ok ) // error already set
- return recoverFromError( tokenObjectEnd );
-
- Token comma;
- if ( !readToken( comma )
- || ( comma.type_ != tokenObjectEnd &&
- comma.type_ != tokenArraySeparator &&
- comma.type_ != tokenComment ) )
- {
- return addErrorAndRecover( "Missing ',' or '}' in object declaration",
- comma,
- tokenObjectEnd );
- }
- bool finalizeTokenOk = true;
- while ( comma.type_ == tokenComment &&
- finalizeTokenOk )
- finalizeTokenOk = readToken( comma );
- if ( comma.type_ == tokenObjectEnd )
- return true;
- }
- return addErrorAndRecover( "Missing '}' or object member name",
- tokenName,
- tokenObjectEnd );
-}
-
-
-bool
-Reader::readArray( Token &/*tokenStart*/ )
-{
- currentValue() = Value( arrayValue );
- skipSpaces();
- if ( *current_ == ']' ) // empty array
- {
- Token endArray;
- readToken( endArray );
- return true;
- }
- int index = 0;
- for (;;)
- {
- Value &value = currentValue()[ index++ ];
- nodes_.push( &value );
- bool ok = readValue();
- nodes_.pop();
- if ( !ok ) // error already set
- return recoverFromError( tokenArrayEnd );
-
- Token token;
- // Accept Comment after last item in the array.
- ok = readToken( token );
- while ( token.type_ == tokenComment && ok )
- {
- ok = readToken( token );
- }
- bool badTokenType = ( token.type_ != tokenArraySeparator &&
- token.type_ != tokenArrayEnd );
- if ( !ok || badTokenType )
- {
- return addErrorAndRecover( "Missing ',' or ']' in array declaration",
- token,
- tokenArrayEnd );
- }
- if ( token.type_ == tokenArrayEnd )
- break;
- }
- return true;
-}
-
-
-bool
-Reader::decodeNumber( Token &token )
-{
- bool isDouble = false;
- for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
- {
- isDouble = isDouble
- || in( *inspect, '.', 'e', 'E', '+' )
- || ( *inspect == '-' && inspect != token.start_ );
- }
- if ( isDouble )
- return decodeDouble( token );
- // Attempts to parse the number as an integer. If the number is
- // larger than the maximum supported value of an integer then
- // we decode the number as a double.
- Location current = token.start_;
- bool isNegative = *current == '-';
- if ( isNegative )
- ++current;
- Value::LargestUInt maxIntegerValue = isNegative ? Value::LargestUInt(-Value::minLargestInt)
- : Value::maxLargestUInt;
- Value::LargestUInt threshold = maxIntegerValue / 10;
- Value::UInt lastDigitThreshold = Value::UInt( maxIntegerValue % 10 );
- assert( lastDigitThreshold >=0 && lastDigitThreshold <= 9 );
- Value::LargestUInt value = 0;
- while ( current < token.end_ )
- {
- Char c = *current++;
- if ( c < '0' || c > '9' )
- return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
- Value::UInt digit(c - '0');
- if ( value >= threshold )
- {
- // If the current digit is not the last one, or if it is
- // greater than the last digit of the maximum integer value,
- // the parse the number as a double.
- if ( current != token.end_ || digit > lastDigitThreshold )
- {
- return decodeDouble( token );
- }
- }
- value = value * 10 + digit;
- }
- if ( isNegative )
- currentValue() = -Value::LargestInt( value );
- else if ( value <= Value::LargestUInt(Value::maxInt) )
- currentValue() = Value::LargestInt( value );
- else
- currentValue() = value;
- return true;
-}
-
-
-bool
-Reader::decodeDouble( Token &token )
-{
- double value = 0;
- const int bufferSize = 32;
- int count;
- int length = int(token.end_ - token.start_);
- if ( length <= bufferSize )
- {
- Char buffer[bufferSize+1];
- memcpy( buffer, token.start_, length );
- buffer[length] = 0;
- count = sscanf( buffer, "%lf", &value );
- }
- else
- {
- std::string buffer( token.start_, token.end_ );
- count = sscanf( buffer.c_str(), "%lf", &value );
- }
-
- if ( count != 1 )
- return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
- currentValue() = value;
- return true;
-}
-
-
-bool
-Reader::decodeString( Token &token )
-{
- std::string decoded;
- if ( !decodeString( token, decoded ) )
- return false;
- currentValue() = decoded;
- return true;
-}
-
-
-bool
-Reader::decodeString( Token &token, std::string &decoded )
-{
- decoded.reserve( token.end_ - token.start_ - 2 );
- Location current = token.start_ + 1; // skip '"'
- Location end = token.end_ - 1; // do not include '"'
- while ( current != end )
- {
- Char c = *current++;
- if ( c == '"' )
- break;
- else if ( c == '\\' )
- {
- if ( current == end )
- return addError( "Empty escape sequence in string", token, current );
- Char escape = *current++;
- switch ( escape )
- {
- case '"': decoded += '"'; break;
- case '\'': decoded += '\''; break;
- case '/': decoded += '/'; break;
- case '\\': decoded += '\\'; break;
- case 'b': decoded += '\b'; break;
- case 'f': decoded += '\f'; break;
- case 'n': decoded += '\n'; break;
- case 'r': decoded += '\r'; break;
- case 't': decoded += '\t'; break;
- case 'u':
- {
- unsigned int unicode;
- if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
- return false;
- decoded += codePointToUTF8(unicode);
- }
- break;
- default:
- return addError( "Bad escape sequence in string", token, current );
- }
- }
- else
- {
- decoded += c;
- }
- }
- return true;
-}
-
-bool
-Reader::decodeUnicodeCodePoint( Token &token,
- Location &current,
- Location end,
- unsigned int &unicode )
-{
-
- if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
- return false;
- if (unicode >= 0xD800 && unicode <= 0xDBFF)
- {
- // surrogate pairs
- if (end - current < 6)
- return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
- unsigned int surrogatePair;
- if (*(current++) == '\\' && *(current++)== 'u')
- {
- if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
- {
- unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
- }
- else
- return false;
- }
- else
- return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
- }
- return true;
-}
-
-bool
-Reader::decodeUnicodeEscapeSequence( Token &token,
- Location &current,
- Location end,
- unsigned int &unicode )
-{
- if ( end - current < 4 )
- return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
- unicode = 0;
- for ( int index =0; index < 4; ++index )
- {
- Char c = *current++;
- unicode *= 16;
- if ( c >= '0' && c <= '9' )
- unicode += c - '0';
- else if ( c >= 'a' && c <= 'f' )
- unicode += c - 'a' + 10;
- else if ( c >= 'A' && c <= 'F' )
- unicode += c - 'A' + 10;
- else
- return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
- }
- return true;
-}
-
-
-bool
-Reader::addError( const std::string &message,
- Token &token,
- Location extra )
-{
- ErrorInfo info;
- info.token_ = token;
- info.message_ = message;
- info.extra_ = extra;
- errors_.push_back( info );
- return false;
-}
-
-
-bool
-Reader::recoverFromError( TokenType skipUntilToken )
-{
- int errorCount = int(errors_.size());
- Token skip;
- for (;;)
- {
- if ( !readToken(skip) )
- errors_.resize( errorCount ); // discard errors caused by recovery
- if ( skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream )
- break;
- }
- errors_.resize( errorCount );
- return false;
-}
-
-
-bool
-Reader::addErrorAndRecover( const std::string &message,
- Token &token,
- TokenType skipUntilToken )
-{
- addError( message, token );
- return recoverFromError( skipUntilToken );
-}
-
-
-Value &
-Reader::currentValue()
-{
- return *(nodes_.top());
-}
-
-
-Reader::Char
-Reader::getNextChar()
-{
- if ( current_ == end_ )
- return 0;
- return *current_++;
-}
-
-
-void
-Reader::getLocationLineAndColumn( Location location,
- int &line,
- int &column ) const
-{
- Location current = begin_;
- Location lastLineStart = current;
- line = 0;
- while ( current < location && current != end_ )
- {
- Char c = *current++;
- if ( c == '\r' )
- {
- if ( *current == '\n' )
- ++current;
- lastLineStart = current;
- ++line;
- }
- else if ( c == '\n' )
- {
- lastLineStart = current;
- ++line;
- }
- }
- // column & line start at 1
- column = int(location - lastLineStart) + 1;
- ++line;
-}
-
-
-std::string
-Reader::getLocationLineAndColumn( Location location ) const
-{
- int line, column;
- getLocationLineAndColumn( location, line, column );
- char buffer[18+16+16+1];
- sprintf( buffer, "Line %d, Column %d", line, column );
- return buffer;
-}
-
-
-// Deprecated. Preserved for backward compatibility
-std::string
-Reader::getFormatedErrorMessages() const
-{
- return getFormattedErrorMessages();
-}
-
-
-std::string
-Reader::getFormattedErrorMessages() const
-{
- std::string formattedMessage;
- for ( Errors::const_iterator itError = errors_.begin();
- itError != errors_.end();
- ++itError )
- {
- const ErrorInfo &error = *itError;
- formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
- formattedMessage += " " + error.message_ + "\n";
- if ( error.extra_ )
- formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
- }
- return formattedMessage;
-}
-
-
-std::istream& operator>>( std::istream &sin, Value &root )
-{
- Json::Reader reader;
- bool ok = reader.parse(sin, root, true);
- //JSON_ASSERT( ok );
- if (!ok) throw std::runtime_error(reader.getFormattedErrorMessages());
- return sin;
-}
-
-
-} // namespace Json
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_tool.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_tool.h
deleted file mode 100644
index 658031bbb..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_tool.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
-# define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
-
-/* This header provides common string manipulation support, such as UTF-8,
- * portable conversion from/to string...
- *
- * It is an internal header that must not be exposed.
- */
-
-namespace Json {
-
-/// Converts a unicode code-point to UTF-8.
-static inline std::string
-codePointToUTF8(unsigned int cp)
-{
- std::string result;
-
- // based on description from http://en.wikipedia.org/wiki/UTF-8
-
- if (cp <= 0x7f)
- {
- result.resize(1);
- result[0] = static_cast<char>(cp);
- }
- else if (cp <= 0x7FF)
- {
- result.resize(2);
- result[1] = static_cast<char>(0x80 | (0x3f & cp));
- result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
- }
- else if (cp <= 0xFFFF)
- {
- result.resize(3);
- result[2] = static_cast<char>(0x80 | (0x3f & cp));
- result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
- result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
- }
- else if (cp <= 0x10FFFF)
- {
- result.resize(4);
- result[3] = static_cast<char>(0x80 | (0x3f & cp));
- result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
- result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
- result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
- }
-
- return result;
-}
-
-
-/// Returns true if ch is a control character (in range [0,32[).
-static inline bool
-isControlCharacter(char ch)
-{
- return ch > 0 && ch <= 0x1F;
-}
-
-
-enum {
- /// Constant that specify the size of the buffer that must be passed to uintToString.
- uintToStringBufferSize = 3*sizeof(LargestUInt)+1
-};
-
-// Defines a char buffer for use with uintToString().
-typedef char UIntToStringBuffer[uintToStringBufferSize];
-
-
-/** Converts an unsigned integer to string.
- * @param value Unsigned interger to convert to string
- * @param current Input/Output string buffer.
- * Must have at least uintToStringBufferSize chars free.
- */
-static inline void
-uintToString( LargestUInt value,
- char *&current )
-{
- *--current = 0;
- do
- {
- *--current = char(value % 10) + '0';
- value /= 10;
- }
- while ( value != 0 );
-}
-
-} // namespace Json {
-
-#endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_value.cpp b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_value.cpp
deleted file mode 100644
index d063c369a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_value.cpp
+++ /dev/null
@@ -1,1830 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include <json/value.h>
-# include <json/writer.h>
-# ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-# include "json_batchallocator.h"
-# endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-#endif // if !defined(JSON_IS_AMALGAMATION)
-#include <iostream>
-#include <utility>
-#include <stdexcept>
-#include <cstring>
-#include <cassert>
-#ifdef JSON_USE_CPPTL
-# include <cpptl/conststring.h>
-#endif
-#include <cstddef> // size_t
-
-#define JSON_ASSERT_UNREACHABLE assert( false )
-#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
-#define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message );
-#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) JSON_FAIL_MESSAGE( message )
-
-namespace Json {
-
-const Value Value::null;
-const Int Value::minInt = Int( ~(UInt(-1)/2) );
-const Int Value::maxInt = Int( UInt(-1)/2 );
-const UInt Value::maxUInt = UInt(-1);
-const Int64 Value::minInt64 = Int64( ~(UInt64(-1)/2) );
-const Int64 Value::maxInt64 = Int64( UInt64(-1)/2 );
-const UInt64 Value::maxUInt64 = UInt64(-1);
-const LargestInt Value::minLargestInt = LargestInt( ~(LargestUInt(-1)/2) );
-const LargestInt Value::maxLargestInt = LargestInt( LargestUInt(-1)/2 );
-const LargestUInt Value::maxLargestUInt = LargestUInt(-1);
-
-
-/// Unknown size marker
-static const unsigned int unknown = (unsigned)-1;
-
-
-/** Duplicates the specified string value.
- * @param value Pointer to the string to duplicate. Must be zero-terminated if
- * length is "unknown".
- * @param length Length of the value. if equals to unknown, then it will be
- * computed using strlen(value).
- * @return Pointer on the duplicate instance of string.
- */
-static inline char *
-duplicateStringValue( const char *value,
- unsigned int length = unknown )
-{
- if ( length == unknown )
- length = (unsigned int)strlen(value);
- char *newString = static_cast<char *>( malloc( length + 1 ) );
- JSON_ASSERT_MESSAGE( newString != 0, "Failed to allocate string value buffer" );
- memcpy( newString, value, length );
- newString[length] = 0;
- return newString;
-}
-
-
-/** Free the string duplicated by duplicateStringValue().
- */
-static inline void
-releaseStringValue( char *value )
-{
- if ( value )
- free( value );
-}
-
-} // namespace Json
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// ValueInternals...
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-#if !defined(JSON_IS_AMALGAMATION)
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-# include "json_internalarray.inl"
-# include "json_internalmap.inl"
-# endif // JSON_VALUE_USE_INTERNAL_MAP
-
-# include "json_valueiterator.inl"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-namespace Json {
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CommentInfo
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-
-Value::CommentInfo::CommentInfo()
- : comment_( 0 )
-{
-}
-
-Value::CommentInfo::~CommentInfo()
-{
- if ( comment_ )
- releaseStringValue( comment_ );
-}
-
-
-void
-Value::CommentInfo::setComment( const char *text )
-{
- if ( comment_ )
- releaseStringValue( comment_ );
- JSON_ASSERT( text != 0 );
- JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
- // It seems that /**/ style comments are acceptable as well.
- comment_ = duplicateStringValue( text );
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CZString
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-// Notes: index_ indicates if the string was allocated when
-// a string is stored.
-
-Value::CZString::CZString( ArrayIndex index )
- : cstr_( 0 )
- , index_( index )
-{
-}
-
-Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
- : cstr_( allocate == duplicate ? duplicateStringValue(cstr)
- : cstr )
- , index_( allocate )
-{
-}
-
-Value::CZString::CZString( const CZString &other )
-: cstr_( other.index_ != noDuplication && other.cstr_ != 0
- ? duplicateStringValue( other.cstr_ )
- : other.cstr_ )
- , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
- : other.index_ )
-{
-}
-
-Value::CZString::~CZString()
-{
- if ( cstr_ && index_ == duplicate )
- releaseStringValue( const_cast<char *>( cstr_ ) );
-}
-
-void
-Value::CZString::swap( CZString &other )
-{
- std::swap( cstr_, other.cstr_ );
- std::swap( index_, other.index_ );
-}
-
-Value::CZString &
-Value::CZString::operator =( const CZString &other )
-{
- CZString temp( other );
- swap( temp );
- return *this;
-}
-
-bool
-Value::CZString::operator<( const CZString &other ) const
-{
- if ( cstr_ )
- return strcmp( cstr_, other.cstr_ ) < 0;
- return index_ < other.index_;
-}
-
-bool
-Value::CZString::operator==( const CZString &other ) const
-{
- if ( cstr_ )
- return strcmp( cstr_, other.cstr_ ) == 0;
- return index_ == other.index_;
-}
-
-
-ArrayIndex
-Value::CZString::index() const
-{
- return index_;
-}
-
-
-const char *
-Value::CZString::c_str() const
-{
- return cstr_;
-}
-
-bool
-Value::CZString::isStaticString() const
-{
- return index_ == noDuplication;
-}
-
-#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::Value
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/*! \internal Default constructor initialization must be equivalent to:
- * memset( this, 0, sizeof(Value) )
- * This optimization is used in ValueInternalMap fast allocator.
- */
-Value::Value( ValueType type )
- : type_( type )
- , allocated_( 0 )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- switch ( type )
- {
- case nullValue:
- break;
- case intValue:
- case uintValue:
- value_.int_ = 0;
- break;
- case realValue:
- value_.real_ = 0.0;
- break;
- case stringValue:
- value_.string_ = 0;
- break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- case objectValue:
- value_.map_ = new ObjectValues();
- break;
-#else
- case arrayValue:
- value_.array_ = arrayAllocator()->newArray();
- break;
- case objectValue:
- value_.map_ = mapAllocator()->newMap();
- break;
-#endif
- case booleanValue:
- value_.bool_ = false;
- break;
- default:
- JSON_ASSERT_UNREACHABLE;
- }
-}
-
-
-#if defined(JSON_HAS_INT64)
-Value::Value( UInt value )
- : type_( uintValue )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.uint_ = value;
-}
-
-Value::Value( Int value )
- : type_( intValue )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.int_ = value;
-}
-
-#endif // if defined(JSON_HAS_INT64)
-
-
-Value::Value( Int64 value )
- : type_( intValue )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.int_ = value;
-}
-
-
-Value::Value( UInt64 value )
- : type_( uintValue )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.uint_ = value;
-}
-
-Value::Value( double value )
- : type_( realValue )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.real_ = value;
-}
-
-Value::Value( const char *value )
- : type_( stringValue )
- , allocated_( true )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.string_ = duplicateStringValue( value );
-}
-
-
-Value::Value( const char *beginValue,
- const char *endValue )
- : type_( stringValue )
- , allocated_( true )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.string_ = duplicateStringValue( beginValue,
- (unsigned int)(endValue - beginValue) );
-}
-
-
-Value::Value( const std::string &value )
- : type_( stringValue )
- , allocated_( true )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.string_ = duplicateStringValue( value.c_str(),
- (unsigned int)value.length() );
-
-}
-
-Value::Value( const StaticString &value )
- : type_( stringValue )
- , allocated_( false )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.string_ = const_cast<char *>( value.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value::Value( const CppTL::ConstString &value )
- : type_( stringValue )
- , allocated_( true )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.string_ = duplicateStringValue( value, value.length() );
-}
-# endif
-
-Value::Value( bool value )
- : type_( booleanValue )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- value_.bool_ = value;
-}
-
-
-Value::Value( const Value &other )
- : type_( other.type_ )
- , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
- , itemIsUsed_( 0 )
-#endif
-{
- switch ( type_ )
- {
- case nullValue:
- case intValue:
- case uintValue:
- case realValue:
- case booleanValue:
- value_ = other.value_;
- break;
- case stringValue:
- if ( other.value_.string_ )
- {
- value_.string_ = duplicateStringValue( other.value_.string_ );
- allocated_ = true;
- }
- else
- value_.string_ = 0;
- break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- case objectValue:
- value_.map_ = new ObjectValues( *other.value_.map_ );
- break;
-#else
- case arrayValue:
- value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
- break;
- case objectValue:
- value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
- break;
-#endif
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- if ( other.comments_ )
- {
- comments_ = new CommentInfo[numberOfCommentPlacement];
- for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
- {
- const CommentInfo &otherComment = other.comments_[comment];
- if ( otherComment.comment_ )
- comments_[comment].setComment( otherComment.comment_ );
- }
- }
-}
-
-
-Value::~Value()
-{
- switch ( type_ )
- {
- case nullValue:
- case intValue:
- case uintValue:
- case realValue:
- case booleanValue:
- break;
- case stringValue:
- if ( allocated_ )
- releaseStringValue( value_.string_ );
- break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- case objectValue:
- delete value_.map_;
- break;
-#else
- case arrayValue:
- arrayAllocator()->destructArray( value_.array_ );
- break;
- case objectValue:
- mapAllocator()->destructMap( value_.map_ );
- break;
-#endif
- default:
- JSON_ASSERT_UNREACHABLE;
- }
-
- if ( comments_ )
- delete[] comments_;
-}
-
-Value &
-Value::operator=( const Value &other )
-{
- Value temp( other );
- swap( temp );
- return *this;
-}
-
-void
-Value::swap( Value &other )
-{
- ValueType temp = type_;
- type_ = other.type_;
- other.type_ = temp;
- std::swap( value_, other.value_ );
- int temp2 = allocated_;
- allocated_ = other.allocated_;
- other.allocated_ = temp2;
-}
-
-ValueType
-Value::type() const
-{
- return type_;
-}
-
-
-int
-Value::compare( const Value &other ) const
-{
- if ( *this < other )
- return -1;
- if ( *this > other )
- return 1;
- return 0;
-}
-
-
-bool
-Value::operator <( const Value &other ) const
-{
- int typeDelta = type_ - other.type_;
- if ( typeDelta )
- return typeDelta < 0 ? true : false;
- switch ( type_ )
- {
- case nullValue:
- return false;
- case intValue:
- return value_.int_ < other.value_.int_;
- case uintValue:
- return value_.uint_ < other.value_.uint_;
- case realValue:
- return value_.real_ < other.value_.real_;
- case booleanValue:
- return value_.bool_ < other.value_.bool_;
- case stringValue:
- return ( value_.string_ == 0 && other.value_.string_ )
- || ( other.value_.string_
- && value_.string_
- && strcmp( value_.string_, other.value_.string_ ) < 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- case objectValue:
- {
- int delta = int( value_.map_->size() - other.value_.map_->size() );
- if ( delta )
- return delta < 0;
- return (*value_.map_) < (*other.value_.map_);
- }
-#else
- case arrayValue:
- return value_.array_->compare( *(other.value_.array_) ) < 0;
- case objectValue:
- return value_.map_->compare( *(other.value_.map_) ) < 0;
-#endif
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return false; // unreachable
-}
-
-bool
-Value::operator <=( const Value &other ) const
-{
- return !(other < *this);
-}
-
-bool
-Value::operator >=( const Value &other ) const
-{
- return !(*this < other);
-}
-
-bool
-Value::operator >( const Value &other ) const
-{
- return other < *this;
-}
-
-bool
-Value::operator ==( const Value &other ) const
-{
- //if ( type_ != other.type_ )
- // GCC 2.95.3 says:
- // attempt to take address of bit-field structure member `Json::Value::type_'
- // Beats me, but a temp solves the problem.
- int temp = other.type_;
- if ( type_ != temp )
- return false;
- switch ( type_ )
- {
- case nullValue:
- return true;
- case intValue:
- return value_.int_ == other.value_.int_;
- case uintValue:
- return value_.uint_ == other.value_.uint_;
- case realValue:
- return value_.real_ == other.value_.real_;
- case booleanValue:
- return value_.bool_ == other.value_.bool_;
- case stringValue:
- return ( value_.string_ == other.value_.string_ )
- || ( other.value_.string_
- && value_.string_
- && strcmp( value_.string_, other.value_.string_ ) == 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- case objectValue:
- return value_.map_->size() == other.value_.map_->size()
- && (*value_.map_) == (*other.value_.map_);
-#else
- case arrayValue:
- return value_.array_->compare( *(other.value_.array_) ) == 0;
- case objectValue:
- return value_.map_->compare( *(other.value_.map_) ) == 0;
-#endif
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return false; // unreachable
-}
-
-bool
-Value::operator !=( const Value &other ) const
-{
- return !( *this == other );
-}
-
-const char *
-Value::asCString() const
-{
- JSON_ASSERT( type_ == stringValue );
- return value_.string_;
-}
-
-
-std::string
-Value::asString() const
-{
- switch ( type_ )
- {
- case nullValue:
- return "";
- case stringValue:
- return value_.string_ ? value_.string_ : "";
- case booleanValue:
- return value_.bool_ ? "true" : "false";
- case intValue:
- case uintValue:
- return valueToString(value_.int_);
- case realValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to string" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return ""; // unreachable
-}
-
-# ifdef JSON_USE_CPPTL
-CppTL::ConstString
-Value::asConstString() const
-{
- return CppTL::ConstString( asString().c_str() );
-}
-# endif
-
-
-Value::Int
-Value::asInt() const
-{
- switch ( type_ )
- {
- case nullValue:
- return 0;
- case intValue:
- JSON_ASSERT_MESSAGE( value_.int_ >= minInt && value_.int_ <= maxInt, "unsigned integer out of signed int range" );
- return Int(value_.int_);
- case uintValue:
- JSON_ASSERT_MESSAGE( value_.uint_ <= UInt(maxInt), "unsigned integer out of signed int range" );
- return Int(value_.uint_);
- case realValue:
- JSON_ASSERT_MESSAGE( value_.real_ >= minInt && value_.real_ <= maxInt, "Real out of signed integer range" );
- return Int( value_.real_ );
- case booleanValue:
- return value_.bool_ ? 1 : 0;
- case stringValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to int" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0; // unreachable;
-}
-
-
-Value::UInt
-Value::asUInt() const
-{
- switch ( type_ )
- {
- case nullValue:
- return 0;
- case intValue:
- JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
- JSON_ASSERT_MESSAGE( value_.int_ <= maxUInt, "signed integer out of UInt range" );
- return UInt(value_.int_);
- case uintValue:
- JSON_ASSERT_MESSAGE( value_.uint_ <= maxUInt, "unsigned integer out of UInt range" );
- return UInt(value_.uint_);
- case realValue:
- JSON_ASSERT_MESSAGE( value_.real_ >= 0 && value_.real_ <= maxUInt, "Real out of unsigned integer range" );
- return UInt( value_.real_ );
- case booleanValue:
- return value_.bool_ ? 1 : 0;
- case stringValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to uint" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0; // unreachable;
-}
-
-
-# if defined(JSON_HAS_INT64)
-
-Value::Int64
-Value::asInt64() const
-{
- switch ( type_ )
- {
- case nullValue:
- return 0;
- case intValue:
- return value_.int_;
- case uintValue:
- JSON_ASSERT_MESSAGE( value_.uint_ <= UInt64(maxInt64), "unsigned integer out of Int64 range" );
- return value_.uint_;
- case realValue:
- JSON_ASSERT_MESSAGE( value_.real_ >= minInt64 && value_.real_ <= maxInt64, "Real out of Int64 range" );
- return Int( value_.real_ );
- case booleanValue:
- return value_.bool_ ? 1 : 0;
- case stringValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to Int64" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0; // unreachable;
-}
-
-
-Value::UInt64
-Value::asUInt64() const
-{
- switch ( type_ )
- {
- case nullValue:
- return 0;
- case intValue:
- JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to UInt64" );
- return value_.int_;
- case uintValue:
- return value_.uint_;
- case realValue:
- JSON_ASSERT_MESSAGE( value_.real_ >= 0 && value_.real_ <= maxUInt64, "Real out of UInt64 range" );
- return UInt( value_.real_ );
- case booleanValue:
- return value_.bool_ ? 1 : 0;
- case stringValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to UInt64" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0; // unreachable;
-}
-# endif // if defined(JSON_HAS_INT64)
-
-
-LargestInt
-Value::asLargestInt() const
-{
-#if defined(JSON_NO_INT64)
- return asInt();
-#else
- return asInt64();
-#endif
-}
-
-
-LargestUInt
-Value::asLargestUInt() const
-{
-#if defined(JSON_NO_INT64)
- return asUInt();
-#else
- return asUInt64();
-#endif
-}
-
-
-double
-Value::asDouble() const
-{
- switch ( type_ )
- {
- case nullValue:
- return 0.0;
- case intValue:
- return static_cast<double>( value_.int_ );
- case uintValue:
-#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
- return static_cast<double>( value_.uint_ );
-#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
- return static_cast<double>( Int(value_.uint_/2) ) * 2 + Int(value_.uint_ & 1);
-#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
- case realValue:
- return value_.real_;
- case booleanValue:
- return value_.bool_ ? 1.0 : 0.0;
- case stringValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to double" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0; // unreachable;
-}
-
-float
-Value::asFloat() const
-{
- switch ( type_ )
- {
- case nullValue:
- return 0.0f;
- case intValue:
- return static_cast<float>( value_.int_ );
- case uintValue:
-#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
- return static_cast<float>( value_.uint_ );
-#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
- return static_cast<float>( Int(value_.uint_/2) ) * 2 + Int(value_.uint_ & 1);
-#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
- case realValue:
- return static_cast<float>( value_.real_ );
- case booleanValue:
- return value_.bool_ ? 1.0f : 0.0f;
- case stringValue:
- case arrayValue:
- case objectValue:
- JSON_FAIL_MESSAGE( "Type is not convertible to float" );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0.0f; // unreachable;
-}
-
-bool
-Value::asBool() const
-{
- switch ( type_ )
- {
- case nullValue:
- return false;
- case intValue:
- case uintValue:
- return value_.int_ != 0;
- case realValue:
- return value_.real_ != 0.0;
- case booleanValue:
- return value_.bool_;
- case stringValue:
- return value_.string_ && value_.string_[0] != 0;
- case arrayValue:
- case objectValue:
- return value_.map_->size() != 0;
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return false; // unreachable;
-}
-
-
-bool
-Value::isConvertibleTo( ValueType other ) const
-{
- switch ( type_ )
- {
- case nullValue:
- return true;
- case intValue:
- return ( other == nullValue && value_.int_ == 0 )
- || other == intValue
- || ( other == uintValue && value_.int_ >= 0 )
- || other == realValue
- || other == stringValue
- || other == booleanValue;
- case uintValue:
- return ( other == nullValue && value_.uint_ == 0 )
- || ( other == intValue && value_.uint_ <= (unsigned)maxInt )
- || other == uintValue
- || other == realValue
- || other == stringValue
- || other == booleanValue;
- case realValue:
- return ( other == nullValue && value_.real_ == 0.0 )
- || ( other == intValue && value_.real_ >= minInt && value_.real_ <= maxInt )
- || ( other == uintValue && value_.real_ >= 0 && value_.real_ <= maxUInt )
- || other == realValue
- || other == stringValue
- || other == booleanValue;
- case booleanValue:
- return ( other == nullValue && value_.bool_ == false )
- || other == intValue
- || other == uintValue
- || other == realValue
- || other == stringValue
- || other == booleanValue;
- case stringValue:
- return other == stringValue
- || ( other == nullValue && (!value_.string_ || value_.string_[0] == 0) );
- case arrayValue:
- return other == arrayValue
- || ( other == nullValue && value_.map_->size() == 0 );
- case objectValue:
- return other == objectValue
- || ( other == nullValue && value_.map_->size() == 0 );
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return false; // unreachable;
-}
-
-
-/// Number of values in array or object
-ArrayIndex
-Value::size() const
-{
- switch ( type_ )
- {
- case nullValue:
- case intValue:
- case uintValue:
- case realValue:
- case booleanValue:
- case stringValue:
- return 0;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue: // size of the array is highest index + 1
- if ( !value_.map_->empty() )
- {
- ObjectValues::const_iterator itLast = value_.map_->end();
- --itLast;
- return (*itLast).first.index()+1;
- }
- return 0;
- case objectValue:
- return ArrayIndex( value_.map_->size() );
-#else
- case arrayValue:
- return Int( value_.array_->size() );
- case objectValue:
- return Int( value_.map_->size() );
-#endif
- default:
- JSON_ASSERT_UNREACHABLE;
- }
- return 0; // unreachable;
-}
-
-
-bool
-Value::empty() const
-{
- if ( isNull() || isArray() || isObject() )
- return size() == 0u;
- else
- return false;
-}
-
-
-bool
-Value::operator!() const
-{
- return isNull();
-}
-
-
-void
-Value::clear()
-{
- JSON_ASSERT( type_ == nullValue || type_ == arrayValue || type_ == objectValue );
-
- switch ( type_ )
- {
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- case objectValue:
- value_.map_->clear();
- break;
-#else
- case arrayValue:
- value_.array_->clear();
- break;
- case objectValue:
- value_.map_->clear();
- break;
-#endif
- default:
- break;
- }
-}
-
-void
-Value::resize( ArrayIndex newSize )
-{
- JSON_ASSERT( type_ == nullValue || type_ == arrayValue );
- if ( type_ == nullValue )
- *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- ArrayIndex oldSize = size();
- if ( newSize == 0 )
- clear();
- else if ( newSize > oldSize )
- (*this)[ newSize - 1 ];
- else
- {
- for ( ArrayIndex index = newSize; index < oldSize; ++index )
- {
- value_.map_->erase( index );
- }
- assert( size() == newSize );
- }
-#else
- value_.array_->resize( newSize );
-#endif
-}
-
-
-Value &
-Value::operator[]( ArrayIndex index )
-{
- JSON_ASSERT( type_ == nullValue || type_ == arrayValue );
- if ( type_ == nullValue )
- *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- CZString key( index );
- ObjectValues::iterator it = value_.map_->lower_bound( key );
- if ( it != value_.map_->end() && (*it).first == key )
- return (*it).second;
-
- ObjectValues::value_type defaultValue( key, null );
- it = value_.map_->insert( it, defaultValue );
- return (*it).second;
-#else
- return value_.array_->resolveReference( index );
-#endif
-}
-
-
-Value &
-Value::operator[]( int index )
-{
- JSON_ASSERT( index >= 0 );
- return (*this)[ ArrayIndex(index) ];
-}
-
-
-const Value &
-Value::operator[]( ArrayIndex index ) const
-{
- JSON_ASSERT( type_ == nullValue || type_ == arrayValue );
- if ( type_ == nullValue )
- return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- CZString key( index );
- ObjectValues::const_iterator it = value_.map_->find( key );
- if ( it == value_.map_->end() )
- return null;
- return (*it).second;
-#else
- Value *value = value_.array_->find( index );
- return value ? *value : null;
-#endif
-}
-
-
-const Value &
-Value::operator[]( int index ) const
-{
- JSON_ASSERT( index >= 0 );
- return (*this)[ ArrayIndex(index) ];
-}
-
-
-Value &
-Value::operator[]( const char *key )
-{
- return resolveReference( key, false );
-}
-
-
-Value &
-Value::resolveReference( const char *key,
- bool isStatic )
-{
- JSON_ASSERT( type_ == nullValue || type_ == objectValue );
- if ( type_ == nullValue )
- *this = Value( objectValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- CZString actualKey( key, isStatic ? CZString::noDuplication
- : CZString::duplicateOnCopy );
- ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
- if ( it != value_.map_->end() && (*it).first == actualKey )
- return (*it).second;
-
- ObjectValues::value_type defaultValue( actualKey, null );
- it = value_.map_->insert( it, defaultValue );
- Value &value = (*it).second;
- return value;
-#else
- return value_.map_->resolveReference( key, isStatic );
-#endif
-}
-
-
-Value
-Value::get( ArrayIndex index,
- const Value &defaultValue ) const
-{
- const Value *value = &((*this)[index]);
- return value == &null ? defaultValue : *value;
-}
-
-
-bool
-Value::isValidIndex( ArrayIndex index ) const
-{
- return index < size();
-}
-
-
-
-const Value &
-Value::operator[]( const char *key ) const
-{
- JSON_ASSERT( type_ == nullValue || type_ == objectValue );
- if ( type_ == nullValue )
- return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- CZString actualKey( key, CZString::noDuplication );
- ObjectValues::const_iterator it = value_.map_->find( actualKey );
- if ( it == value_.map_->end() )
- return null;
- return (*it).second;
-#else
- const Value *value = value_.map_->find( key );
- return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const std::string &key )
-{
- return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const std::string &key ) const
-{
- return (*this)[ key.c_str() ];
-}
-
-Value &
-Value::operator[]( const StaticString &key )
-{
- return resolveReference( key, true );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value &
-Value::operator[]( const CppTL::ConstString &key )
-{
- return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const CppTL::ConstString &key ) const
-{
- return (*this)[ key.c_str() ];
-}
-# endif
-
-
-Value &
-Value::append( const Value &value )
-{
- return (*this)[size()] = value;
-}
-
-
-Value
-Value::get( const char *key,
- const Value &defaultValue ) const
-{
- const Value *value = &((*this)[key]);
- return value == &null ? defaultValue : *value;
-}
-
-
-Value
-Value::get( const std::string &key,
- const Value &defaultValue ) const
-{
- return get( key.c_str(), defaultValue );
-}
-
-Value
-Value::removeMember( const char* key )
-{
- JSON_ASSERT( type_ == nullValue || type_ == objectValue );
- if ( type_ == nullValue )
- return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- CZString actualKey( key, CZString::noDuplication );
- ObjectValues::iterator it = value_.map_->find( actualKey );
- if ( it == value_.map_->end() )
- return null;
- Value old(it->second);
- value_.map_->erase(it);
- return old;
-#else
- Value *value = value_.map_->find( key );
- if (value){
- Value old(*value);
- value_.map_.remove( key );
- return old;
- } else {
- return null;
- }
-#endif
-}
-
-Value
-Value::removeMember( const std::string &key )
-{
- return removeMember( key.c_str() );
-}
-
-# ifdef JSON_USE_CPPTL
-Value
-Value::get( const CppTL::ConstString &key,
- const Value &defaultValue ) const
-{
- return get( key.c_str(), defaultValue );
-}
-# endif
-
-bool
-Value::isMember( const char *key ) const
-{
- const Value *value = &((*this)[key]);
- return value != &null;
-}
-
-
-bool
-Value::isMember( const std::string &key ) const
-{
- return isMember( key.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-bool
-Value::isMember( const CppTL::ConstString &key ) const
-{
- return isMember( key.c_str() );
-}
-#endif
-
-Value::Members
-Value::getMemberNames() const
-{
- JSON_ASSERT( type_ == nullValue || type_ == objectValue );
- if ( type_ == nullValue )
- return Value::Members();
- Members members;
- members.reserve( value_.map_->size() );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- ObjectValues::const_iterator it = value_.map_->begin();
- ObjectValues::const_iterator itEnd = value_.map_->end();
- for ( ; it != itEnd; ++it )
- members.push_back( std::string( (*it).first.c_str() ) );
-#else
- ValueInternalMap::IteratorState it;
- ValueInternalMap::IteratorState itEnd;
- value_.map_->makeBeginIterator( it );
- value_.map_->makeEndIterator( itEnd );
- for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
- members.push_back( std::string( ValueInternalMap::key( it ) ) );
-#endif
- return members;
-}
-//
-//# ifdef JSON_USE_CPPTL
-//EnumMemberNames
-//Value::enumMemberNames() const
-//{
-// if ( type_ == objectValue )
-// {
-// return CppTL::Enum::any( CppTL::Enum::transform(
-// CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
-// MemberNamesTransform() ) );
-// }
-// return EnumMemberNames();
-//}
-//
-//
-//EnumValues
-//Value::enumValues() const
-//{
-// if ( type_ == objectValue || type_ == arrayValue )
-// return CppTL::Enum::anyValues( *(value_.map_),
-// CppTL::Type<const Value &>() );
-// return EnumValues();
-//}
-//
-//# endif
-
-
-bool
-Value::isNull() const
-{
- return type_ == nullValue;
-}
-
-
-bool
-Value::isBool() const
-{
- return type_ == booleanValue;
-}
-
-
-bool
-Value::isInt() const
-{
- return type_ == intValue;
-}
-
-
-bool
-Value::isUInt() const
-{
- return type_ == uintValue;
-}
-
-
-bool
-Value::isIntegral() const
-{
- return type_ == intValue
- || type_ == uintValue
- || type_ == booleanValue;
-}
-
-
-bool
-Value::isDouble() const
-{
- return type_ == realValue;
-}
-
-
-bool
-Value::isNumeric() const
-{
- return isIntegral() || isDouble();
-}
-
-
-bool
-Value::isString() const
-{
- return type_ == stringValue;
-}
-
-
-bool
-Value::isArray() const
-{
- return type_ == nullValue || type_ == arrayValue;
-}
-
-
-bool
-Value::isObject() const
-{
- return type_ == nullValue || type_ == objectValue;
-}
-
-
-void
-Value::setComment( const char *comment,
- CommentPlacement placement )
-{
- if ( !comments_ )
- comments_ = new CommentInfo[numberOfCommentPlacement];
- comments_[placement].setComment( comment );
-}
-
-
-void
-Value::setComment( const std::string &comment,
- CommentPlacement placement )
-{
- setComment( comment.c_str(), placement );
-}
-
-
-bool
-Value::hasComment( CommentPlacement placement ) const
-{
- return comments_ != 0 && comments_[placement].comment_ != 0;
-}
-
-std::string
-Value::getComment( CommentPlacement placement ) const
-{
- if ( hasComment(placement) )
- return comments_[placement].comment_;
- return "";
-}
-
-
-std::string
-Value::toStyledString() const
-{
- StyledWriter writer;
- return writer.write( *this );
-}
-
-
-Value::const_iterator
-Value::begin() const
-{
- switch ( type_ )
- {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- if ( value_.array_ )
- {
- ValueInternalArray::IteratorState it;
- value_.array_->makeBeginIterator( it );
- return const_iterator( it );
- }
- break;
- case objectValue:
- if ( value_.map_ )
- {
- ValueInternalMap::IteratorState it;
- value_.map_->makeBeginIterator( it );
- return const_iterator( it );
- }
- break;
-#else
- case arrayValue:
- case objectValue:
- if ( value_.map_ )
- return const_iterator( value_.map_->begin() );
- break;
-#endif
- default:
- break;
- }
- return const_iterator();
-}
-
-Value::const_iterator
-Value::end() const
-{
- switch ( type_ )
- {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- if ( value_.array_ )
- {
- ValueInternalArray::IteratorState it;
- value_.array_->makeEndIterator( it );
- return const_iterator( it );
- }
- break;
- case objectValue:
- if ( value_.map_ )
- {
- ValueInternalMap::IteratorState it;
- value_.map_->makeEndIterator( it );
- return const_iterator( it );
- }
- break;
-#else
- case arrayValue:
- case objectValue:
- if ( value_.map_ )
- return const_iterator( value_.map_->end() );
- break;
-#endif
- default:
- break;
- }
- return const_iterator();
-}
-
-
-Value::iterator
-Value::begin()
-{
- switch ( type_ )
- {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- if ( value_.array_ )
- {
- ValueInternalArray::IteratorState it;
- value_.array_->makeBeginIterator( it );
- return iterator( it );
- }
- break;
- case objectValue:
- if ( value_.map_ )
- {
- ValueInternalMap::IteratorState it;
- value_.map_->makeBeginIterator( it );
- return iterator( it );
- }
- break;
-#else
- case arrayValue:
- case objectValue:
- if ( value_.map_ )
- return iterator( value_.map_->begin() );
- break;
-#endif
- default:
- break;
- }
- return iterator();
-}
-
-Value::iterator
-Value::end()
-{
- switch ( type_ )
- {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- case arrayValue:
- if ( value_.array_ )
- {
- ValueInternalArray::IteratorState it;
- value_.array_->makeEndIterator( it );
- return iterator( it );
- }
- break;
- case objectValue:
- if ( value_.map_ )
- {
- ValueInternalMap::IteratorState it;
- value_.map_->makeEndIterator( it );
- return iterator( it );
- }
- break;
-#else
- case arrayValue:
- case objectValue:
- if ( value_.map_ )
- return iterator( value_.map_->end() );
- break;
-#endif
- default:
- break;
- }
- return iterator();
-}
-
-
-// class PathArgument
-// //////////////////////////////////////////////////////////////////
-
-PathArgument::PathArgument()
- : kind_( kindNone )
-{
-}
-
-
-PathArgument::PathArgument( ArrayIndex index )
- : index_( index )
- , kind_( kindIndex )
-{
-}
-
-
-PathArgument::PathArgument( const char *key )
- : key_( key )
- , kind_( kindKey )
-{
-}
-
-
-PathArgument::PathArgument( const std::string &key )
- : key_( key.c_str() )
- , kind_( kindKey )
-{
-}
-
-// class Path
-// //////////////////////////////////////////////////////////////////
-
-Path::Path( const std::string &path,
- const PathArgument &a1,
- const PathArgument &a2,
- const PathArgument &a3,
- const PathArgument &a4,
- const PathArgument &a5 )
-{
- InArgs in;
- in.push_back( &a1 );
- in.push_back( &a2 );
- in.push_back( &a3 );
- in.push_back( &a4 );
- in.push_back( &a5 );
- makePath( path, in );
-}
-
-
-void
-Path::makePath( const std::string &path,
- const InArgs &in )
-{
- const char *current = path.c_str();
- const char *end = current + path.length();
- InArgs::const_iterator itInArg = in.begin();
- while ( current != end )
- {
- if ( *current == '[' )
- {
- ++current;
- if ( *current == '%' )
- addPathInArg( path, in, itInArg, PathArgument::kindIndex );
- else
- {
- ArrayIndex index = 0;
- for ( ; current != end && *current >= '0' && *current <= '9'; ++current )
- index = index * 10 + ArrayIndex(*current - '0');
- args_.push_back( index );
- }
- if ( current == end || *current++ != ']' )
- invalidPath( path, int(current - path.c_str()) );
- }
- else if ( *current == '%' )
- {
- addPathInArg( path, in, itInArg, PathArgument::kindKey );
- ++current;
- }
- else if ( *current == '.' )
- {
- ++current;
- }
- else
- {
- const char *beginName = current;
- while ( current != end && !strchr( "[.", *current ) )
- ++current;
- args_.push_back( std::string( beginName, current ) );
- }
- }
-}
-
-
-void
-Path::addPathInArg( const std::string &path,
- const InArgs &in,
- InArgs::const_iterator &itInArg,
- PathArgument::Kind kind )
-{
- if ( itInArg == in.end() )
- {
- // Error: missing argument %d
- }
- else if ( (*itInArg)->kind_ != kind )
- {
- // Error: bad argument type
- }
- else
- {
- args_.push_back( **itInArg );
- }
-}
-
-
-void
-Path::invalidPath( const std::string &path,
- int location )
-{
- // Error: invalid path.
-}
-
-
-const Value &
-Path::resolve( const Value &root ) const
-{
- const Value *node = &root;
- for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
- {
- const PathArgument &arg = *it;
- if ( arg.kind_ == PathArgument::kindIndex )
- {
- if ( !node->isArray() || node->isValidIndex( arg.index_ ) )
- {
- // Error: unable to resolve path (array value expected at position...
- }
- node = &((*node)[arg.index_]);
- }
- else if ( arg.kind_ == PathArgument::kindKey )
- {
- if ( !node->isObject() )
- {
- // Error: unable to resolve path (object value expected at position...)
- }
- node = &((*node)[arg.key_]);
- if ( node == &Value::null )
- {
- // Error: unable to resolve path (object has no member named '' at position...)
- }
- }
- }
- return *node;
-}
-
-
-Value
-Path::resolve( const Value &root,
- const Value &defaultValue ) const
-{
- const Value *node = &root;
- for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
- {
- const PathArgument &arg = *it;
- if ( arg.kind_ == PathArgument::kindIndex )
- {
- if ( !node->isArray() || node->isValidIndex( arg.index_ ) )
- return defaultValue;
- node = &((*node)[arg.index_]);
- }
- else if ( arg.kind_ == PathArgument::kindKey )
- {
- if ( !node->isObject() )
- return defaultValue;
- node = &((*node)[arg.key_]);
- if ( node == &Value::null )
- return defaultValue;
- }
- }
- return *node;
-}
-
-
-Value &
-Path::make( Value &root ) const
-{
- Value *node = &root;
- for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
- {
- const PathArgument &arg = *it;
- if ( arg.kind_ == PathArgument::kindIndex )
- {
- if ( !node->isArray() )
- {
- // Error: node is not an array at position ...
- }
- node = &((*node)[arg.index_]);
- }
- else if ( arg.kind_ == PathArgument::kindKey )
- {
- if ( !node->isObject() )
- {
- // Error: node is not an object at position...
- }
- node = &((*node)[arg.key_]);
- }
- }
- return *node;
-}
-
-
-} // namespace Json
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_valueiterator.inl b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_valueiterator.inl
deleted file mode 100644
index 7457ca389..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_valueiterator.inl
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-// included by json_value.cpp
-
-namespace Json {
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIteratorBase
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIteratorBase::ValueIteratorBase()
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- : current_()
- , isNull_( true )
-{
-}
-#else
- : isArray_( true )
- , isNull_( true )
-{
- iterator_.array_ = ValueInternalArray::IteratorState();
-}
-#endif
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
- : current_( current )
- , isNull_( false )
-{
-}
-#else
-ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
- : isArray_( true )
-{
- iterator_.array_ = state;
-}
-
-
-ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
- : isArray_( false )
-{
- iterator_.map_ = state;
-}
-#endif
-
-Value &
-ValueIteratorBase::deref() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- return current_->second;
-#else
- if ( isArray_ )
- return ValueInternalArray::dereference( iterator_.array_ );
- return ValueInternalMap::value( iterator_.map_ );
-#endif
-}
-
-
-void
-ValueIteratorBase::increment()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- ++current_;
-#else
- if ( isArray_ )
- ValueInternalArray::increment( iterator_.array_ );
- ValueInternalMap::increment( iterator_.map_ );
-#endif
-}
-
-
-void
-ValueIteratorBase::decrement()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- --current_;
-#else
- if ( isArray_ )
- ValueInternalArray::decrement( iterator_.array_ );
- ValueInternalMap::decrement( iterator_.map_ );
-#endif
-}
-
-
-ValueIteratorBase::difference_type
-ValueIteratorBase::computeDistance( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-# ifdef JSON_USE_CPPTL_SMALLMAP
- return current_ - other.current_;
-# else
- // Iterator for null value are initialized using the default
- // constructor, which initialize current_ to the default
- // std::map::iterator. As begin() and end() are two instance
- // of the default std::map::iterator, they can not be compared.
- // To allow this, we handle this comparison specifically.
- if ( isNull_ && other.isNull_ )
- {
- return 0;
- }
-
-
- // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
- // which is the one used by default).
- // Using a portable hand-made version for non random iterator instead:
- // return difference_type( std::distance( current_, other.current_ ) );
- difference_type myDistance = 0;
- for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
- {
- ++myDistance;
- }
- return myDistance;
-# endif
-#else
- if ( isArray_ )
- return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
- return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-bool
-ValueIteratorBase::isEqual( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- if ( isNull_ )
- {
- return other.isNull_;
- }
- return current_ == other.current_;
-#else
- if ( isArray_ )
- return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
- return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-void
-ValueIteratorBase::copy( const SelfType &other )
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- current_ = other.current_;
-#else
- if ( isArray_ )
- iterator_.array_ = other.iterator_.array_;
- iterator_.map_ = other.iterator_.map_;
-#endif
-}
-
-
-Value
-ValueIteratorBase::key() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- const Value::CZString czstring = (*current_).first;
- if ( czstring.c_str() )
- {
- if ( czstring.isStaticString() )
- return Value( StaticString( czstring.c_str() ) );
- return Value( czstring.c_str() );
- }
- return Value( czstring.index() );
-#else
- if ( isArray_ )
- return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
- bool isStatic;
- const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
- if ( isStatic )
- return Value( StaticString( memberName ) );
- return Value( memberName );
-#endif
-}
-
-
-UInt
-ValueIteratorBase::index() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- const Value::CZString czstring = (*current_).first;
- if ( !czstring.c_str() )
- return czstring.index();
- return Value::UInt( -1 );
-#else
- if ( isArray_ )
- return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
- return Value::UInt( -1 );
-#endif
-}
-
-
-const char *
-ValueIteratorBase::memberName() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
- const char *name = (*current_).first.c_str();
- return name ? name : "";
-#else
- if ( !isArray_ )
- return ValueInternalMap::key( iterator_.map_ );
- return "";
-#endif
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueConstIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueConstIterator::ValueConstIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
- : ValueIteratorBase( current )
-{
-}
-#else
-ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
- : ValueIteratorBase( state )
-{
-}
-
-ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
- : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueConstIterator &
-ValueConstIterator::operator =( const ValueIteratorBase &other )
-{
- copy( other );
- return *this;
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIterator::ValueIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
- : ValueIteratorBase( current )
-{
-}
-#else
-ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
- : ValueIteratorBase( state )
-{
-}
-
-ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
- : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueIterator::ValueIterator( const ValueConstIterator &other )
- : ValueIteratorBase( other )
-{
-}
-
-ValueIterator::ValueIterator( const ValueIterator &other )
- : ValueIteratorBase( other )
-{
-}
-
-ValueIterator &
-ValueIterator::operator =( const SelfType &other )
-{
- copy( other );
- return *this;
-}
-
-} // namespace Json
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_writer.cpp b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_writer.cpp
deleted file mode 100644
index 1bda183fe..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/json_writer.cpp
+++ /dev/null
@@ -1,838 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#if !defined(JSON_IS_AMALGAMATION)
-# include <json/writer.h>
-# include "json_tool.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-#include <utility>
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-static bool containsControlCharacter( const char* str )
-{
- while ( *str )
- {
- if ( isControlCharacter( *(str++) ) )
- return true;
- }
- return false;
-}
-
-
-std::string valueToString( LargestInt value )
-{
- UIntToStringBuffer buffer;
- char *current = buffer + sizeof(buffer);
- bool isNegative = value < 0;
- if ( isNegative )
- value = -value;
- uintToString( LargestUInt(value), current );
- if ( isNegative )
- *--current = '-';
- assert( current >= buffer );
- return current;
-}
-
-
-std::string valueToString( LargestUInt value )
-{
- UIntToStringBuffer buffer;
- char *current = buffer + sizeof(buffer);
- uintToString( value, current );
- assert( current >= buffer );
- return current;
-}
-
-#if defined(JSON_HAS_INT64)
-
-std::string valueToString( Int value )
-{
- return valueToString( LargestInt(value) );
-}
-
-
-std::string valueToString( UInt value )
-{
- return valueToString( LargestUInt(value) );
-}
-
-#endif // # if defined(JSON_HAS_INT64)
-
-
-std::string valueToString( double value )
-{
- char buffer[32];
-#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning.
- sprintf_s(buffer, sizeof(buffer), "%#.16g", value);
-#else
- sprintf(buffer, "%#.16g", value);
-#endif
- char* ch = buffer + strlen(buffer) - 1;
- if (*ch != '0') return buffer; // nothing to truncate, so save time
- while(ch > buffer && *ch == '0'){
- --ch;
- }
- char* last_nonzero = ch;
- while(ch >= buffer){
- switch(*ch){
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- --ch;
- continue;
- case '.':
- // Truncate zeroes to save bytes in output, but keep one.
- *(last_nonzero+2) = '\0';
- return buffer;
- default:
- return buffer;
- }
- }
- return buffer;
-}
-
-
-std::string valueToString( bool value )
-{
- return value ? "true" : "false";
-}
-
-std::string valueToQuotedString( const char *value )
-{
- // Not sure how to handle unicode...
- if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
- return std::string("\"") + value + "\"";
- // We have to walk value and escape any special characters.
- // Appending to std::string is not efficient, but this should be rare.
- // (Note: forward slashes are *not* rare, but I am not escaping them.)
- std::string::size_type maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
- std::string result;
- result.reserve(maxsize); // to avoid lots of mallocs
- result += "\"";
- for (const char* c=value; *c != 0; ++c)
- {
- switch(*c)
- {
- case '\"':
- result += "\\\"";
- break;
- case '\\':
- result += "\\\\";
- break;
- case '\b':
- result += "\\b";
- break;
- case '\f':
- result += "\\f";
- break;
- case '\n':
- result += "\\n";
- break;
- case '\r':
- result += "\\r";
- break;
- case '\t':
- result += "\\t";
- break;
- //case '/':
- // Even though \/ is considered a legal escape in JSON, a bare
- // slash is also legal, so I see no reason to escape it.
- // (I hope I am not misunderstanding something.
- // blep notes: actually escaping \/ may be useful in javascript to avoid </
- // sequence.
- // Should add a flag to allow this compatibility mode and prevent this
- // sequence from occurring.
- default:
- if ( isControlCharacter( *c ) )
- {
- std::ostringstream oss;
- oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
- result += oss.str();
- }
- else
- {
- result += *c;
- }
- break;
- }
- }
- result += "\"";
- return result;
-}
-
-// Class Writer
-// //////////////////////////////////////////////////////////////////
-Writer::~Writer()
-{
-}
-
-
-// Class FastWriter
-// //////////////////////////////////////////////////////////////////
-
-FastWriter::FastWriter()
- : yamlCompatiblityEnabled_( false )
-{
-}
-
-
-void
-FastWriter::enableYAMLCompatibility()
-{
- yamlCompatiblityEnabled_ = true;
-}
-
-
-std::string
-FastWriter::write( const Value &root )
-{
- document_ = "";
- writeValue( root );
- document_ += "\n";
- return document_;
-}
-
-
-void
-FastWriter::writeValue( const Value &value )
-{
- switch ( value.type() )
- {
- case nullValue:
- document_ += "null";
- break;
- case intValue:
- document_ += valueToString( value.asLargestInt() );
- break;
- case uintValue:
- document_ += valueToString( value.asLargestUInt() );
- break;
- case realValue:
- document_ += valueToString( value.asDouble() );
- break;
- case stringValue:
- document_ += valueToQuotedString( value.asCString() );
- break;
- case booleanValue:
- document_ += valueToString( value.asBool() );
- break;
- case arrayValue:
- {
- document_ += "[";
- int size = value.size();
- for ( int index =0; index < size; ++index )
- {
- if ( index > 0 )
- document_ += ",";
- writeValue( value[index] );
- }
- document_ += "]";
- }
- break;
- case objectValue:
- {
- Value::Members members( value.getMemberNames() );
- document_ += "{";
- for ( Value::Members::iterator it = members.begin();
- it != members.end();
- ++it )
- {
- const std::string &name = *it;
- if ( it != members.begin() )
- document_ += ",";
- document_ += valueToQuotedString( name.c_str() );
- document_ += yamlCompatiblityEnabled_ ? ": "
- : ":";
- writeValue( value[name] );
- }
- document_ += "}";
- }
- break;
- }
-}
-
-
-// Class StyledWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledWriter::StyledWriter()
- : rightMargin_( 74 )
- , indentSize_( 3 )
-{
-}
-
-
-std::string
-StyledWriter::write( const Value &root )
-{
- document_ = "";
- addChildValues_ = false;
- indentString_ = "";
- writeCommentBeforeValue( root );
- writeValue( root );
- writeCommentAfterValueOnSameLine( root );
- document_ += "\n";
- return document_;
-}
-
-
-void
-StyledWriter::writeValue( const Value &value )
-{
- switch ( value.type() )
- {
- case nullValue:
- pushValue( "null" );
- break;
- case intValue:
- pushValue( valueToString( value.asLargestInt() ) );
- break;
- case uintValue:
- pushValue( valueToString( value.asLargestUInt() ) );
- break;
- case realValue:
- pushValue( valueToString( value.asDouble() ) );
- break;
- case stringValue:
- pushValue( valueToQuotedString( value.asCString() ) );
- break;
- case booleanValue:
- pushValue( valueToString( value.asBool() ) );
- break;
- case arrayValue:
- writeArrayValue( value);
- break;
- case objectValue:
- {
- Value::Members members( value.getMemberNames() );
- if ( members.empty() )
- pushValue( "{}" );
- else
- {
- writeWithIndent( "{" );
- indent();
- Value::Members::iterator it = members.begin();
- for (;;)
- {
- const std::string &name = *it;
- const Value &childValue = value[name];
- writeCommentBeforeValue( childValue );
- writeWithIndent( valueToQuotedString( name.c_str() ) );
- document_ += " : ";
- writeValue( childValue );
- if ( ++it == members.end() )
- {
- writeCommentAfterValueOnSameLine( childValue );
- break;
- }
- document_ += ",";
- writeCommentAfterValueOnSameLine( childValue );
- }
- unindent();
- writeWithIndent( "}" );
- }
- }
- break;
- }
-}
-
-
-void
-StyledWriter::writeArrayValue( const Value &value )
-{
- unsigned size = value.size();
- if ( size == 0 )
- pushValue( "[]" );
- else
- {
- bool isArrayMultiLine = isMultineArray( value );
- if ( isArrayMultiLine )
- {
- writeWithIndent( "[" );
- indent();
- bool hasChildValue = !childValues_.empty();
- unsigned index =0;
- for (;;)
- {
- const Value &childValue = value[index];
- writeCommentBeforeValue( childValue );
- if ( hasChildValue )
- writeWithIndent( childValues_[index] );
- else
- {
- writeIndent();
- writeValue( childValue );
- }
- if ( ++index == size )
- {
- writeCommentAfterValueOnSameLine( childValue );
- break;
- }
- document_ += ",";
- writeCommentAfterValueOnSameLine( childValue );
- }
- unindent();
- writeWithIndent( "]" );
- }
- else // output on a single line
- {
- assert( childValues_.size() == size );
- document_ += "[ ";
- for ( unsigned index =0; index < size; ++index )
- {
- if ( index > 0 )
- document_ += ", ";
- document_ += childValues_[index];
- }
- document_ += " ]";
- }
- }
-}
-
-
-bool
-StyledWriter::isMultineArray( const Value &value )
-{
- int size = value.size();
- bool isMultiLine = size*3 >= rightMargin_ ;
- childValues_.clear();
- for ( int index =0; index < size && !isMultiLine; ++index )
- {
- const Value &childValue = value[index];
- isMultiLine = isMultiLine ||
- ( (childValue.isArray() || childValue.isObject()) &&
- childValue.size() > 0 );
- }
- if ( !isMultiLine ) // check if line length > max line length
- {
- childValues_.reserve( size );
- addChildValues_ = true;
- int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
- for ( int index =0; index < size && !isMultiLine; ++index )
- {
- writeValue( value[index] );
- lineLength += int( childValues_[index].length() );
- isMultiLine = isMultiLine && hasCommentForValue( value[index] );
- }
- addChildValues_ = false;
- isMultiLine = isMultiLine || lineLength >= rightMargin_;
- }
- return isMultiLine;
-}
-
-
-void
-StyledWriter::pushValue( const std::string &value )
-{
- if ( addChildValues_ )
- childValues_.push_back( value );
- else
- document_ += value;
-}
-
-
-void
-StyledWriter::writeIndent()
-{
- if ( !document_.empty() )
- {
- char last = document_[document_.length()-1];
- if ( last == ' ' ) // already indented
- return;
- if ( last != '\n' ) // Comments may add new-line
- document_ += '\n';
- }
- document_ += indentString_;
-}
-
-
-void
-StyledWriter::writeWithIndent( const std::string &value )
-{
- writeIndent();
- document_ += value;
-}
-
-
-void
-StyledWriter::indent()
-{
- indentString_ += std::string( indentSize_, ' ' );
-}
-
-
-void
-StyledWriter::unindent()
-{
- assert( int(indentString_.size()) >= indentSize_ );
- indentString_.resize( indentString_.size() - indentSize_ );
-}
-
-
-void
-StyledWriter::writeCommentBeforeValue( const Value &root )
-{
- if ( !root.hasComment( commentBefore ) )
- return;
- document_ += normalizeEOL( root.getComment( commentBefore ) );
- document_ += "\n";
-}
-
-
-void
-StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
- if ( root.hasComment( commentAfterOnSameLine ) )
- document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
- if ( root.hasComment( commentAfter ) )
- {
- document_ += "\n";
- document_ += normalizeEOL( root.getComment( commentAfter ) );
- document_ += "\n";
- }
-}
-
-
-bool
-StyledWriter::hasCommentForValue( const Value &value )
-{
- return value.hasComment( commentBefore )
- || value.hasComment( commentAfterOnSameLine )
- || value.hasComment( commentAfter );
-}
-
-
-std::string
-StyledWriter::normalizeEOL( const std::string &text )
-{
- std::string normalized;
- normalized.reserve( text.length() );
- const char *begin = text.c_str();
- const char *end = begin + text.length();
- const char *current = begin;
- while ( current != end )
- {
- char c = *current++;
- if ( c == '\r' ) // mac or dos EOL
- {
- if ( *current == '\n' ) // convert dos EOL
- ++current;
- normalized += '\n';
- }
- else // handle unix EOL & other char
- normalized += c;
- }
- return normalized;
-}
-
-
-// Class StyledStreamWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledStreamWriter::StyledStreamWriter( std::string indentation )
- : document_(NULL)
- , rightMargin_( 74 )
- , indentation_( indentation )
-{
-}
-
-
-void
-StyledStreamWriter::write( std::ostream &out, const Value &root )
-{
- document_ = &out;
- addChildValues_ = false;
- indentString_ = "";
- writeCommentBeforeValue( root );
- writeValue( root );
- writeCommentAfterValueOnSameLine( root );
- *document_ << "\n";
- document_ = NULL; // Forget the stream, for safety.
-}
-
-
-void
-StyledStreamWriter::writeValue( const Value &value )
-{
- switch ( value.type() )
- {
- case nullValue:
- pushValue( "null" );
- break;
- case intValue:
- pushValue( valueToString( value.asLargestInt() ) );
- break;
- case uintValue:
- pushValue( valueToString( value.asLargestUInt() ) );
- break;
- case realValue:
- pushValue( valueToString( value.asDouble() ) );
- break;
- case stringValue:
- pushValue( valueToQuotedString( value.asCString() ) );
- break;
- case booleanValue:
- pushValue( valueToString( value.asBool() ) );
- break;
- case arrayValue:
- writeArrayValue( value);
- break;
- case objectValue:
- {
- Value::Members members( value.getMemberNames() );
- if ( members.empty() )
- pushValue( "{}" );
- else
- {
- writeWithIndent( "{" );
- indent();
- Value::Members::iterator it = members.begin();
- for (;;)
- {
- const std::string &name = *it;
- const Value &childValue = value[name];
- writeCommentBeforeValue( childValue );
- writeWithIndent( valueToQuotedString( name.c_str() ) );
- *document_ << " : ";
- writeValue( childValue );
- if ( ++it == members.end() )
- {
- writeCommentAfterValueOnSameLine( childValue );
- break;
- }
- *document_ << ",";
- writeCommentAfterValueOnSameLine( childValue );
- }
- unindent();
- writeWithIndent( "}" );
- }
- }
- break;
- }
-}
-
-
-void
-StyledStreamWriter::writeArrayValue( const Value &value )
-{
- unsigned size = value.size();
- if ( size == 0 )
- pushValue( "[]" );
- else
- {
- bool isArrayMultiLine = isMultineArray( value );
- if ( isArrayMultiLine )
- {
- writeWithIndent( "[" );
- indent();
- bool hasChildValue = !childValues_.empty();
- unsigned index =0;
- for (;;)
- {
- const Value &childValue = value[index];
- writeCommentBeforeValue( childValue );
- if ( hasChildValue )
- writeWithIndent( childValues_[index] );
- else
- {
- writeIndent();
- writeValue( childValue );
- }
- if ( ++index == size )
- {
- writeCommentAfterValueOnSameLine( childValue );
- break;
- }
- *document_ << ",";
- writeCommentAfterValueOnSameLine( childValue );
- }
- unindent();
- writeWithIndent( "]" );
- }
- else // output on a single line
- {
- assert( childValues_.size() == size );
- *document_ << "[ ";
- for ( unsigned index =0; index < size; ++index )
- {
- if ( index > 0 )
- *document_ << ", ";
- *document_ << childValues_[index];
- }
- *document_ << " ]";
- }
- }
-}
-
-
-bool
-StyledStreamWriter::isMultineArray( const Value &value )
-{
- int size = value.size();
- bool isMultiLine = size*3 >= rightMargin_ ;
- childValues_.clear();
- for ( int index =0; index < size && !isMultiLine; ++index )
- {
- const Value &childValue = value[index];
- isMultiLine = isMultiLine ||
- ( (childValue.isArray() || childValue.isObject()) &&
- childValue.size() > 0 );
- }
- if ( !isMultiLine ) // check if line length > max line length
- {
- childValues_.reserve( size );
- addChildValues_ = true;
- int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
- for ( int index =0; index < size && !isMultiLine; ++index )
- {
- writeValue( value[index] );
- lineLength += int( childValues_[index].length() );
- isMultiLine = isMultiLine && hasCommentForValue( value[index] );
- }
- addChildValues_ = false;
- isMultiLine = isMultiLine || lineLength >= rightMargin_;
- }
- return isMultiLine;
-}
-
-
-void
-StyledStreamWriter::pushValue( const std::string &value )
-{
- if ( addChildValues_ )
- childValues_.push_back( value );
- else
- *document_ << value;
-}
-
-
-void
-StyledStreamWriter::writeIndent()
-{
- /*
- Some comments in this method would have been nice. ;-)
-
- if ( !document_.empty() )
- {
- char last = document_[document_.length()-1];
- if ( last == ' ' ) // already indented
- return;
- if ( last != '\n' ) // Comments may add new-line
- *document_ << '\n';
- }
- */
- *document_ << '\n' << indentString_;
-}
-
-
-void
-StyledStreamWriter::writeWithIndent( const std::string &value )
-{
- writeIndent();
- *document_ << value;
-}
-
-
-void
-StyledStreamWriter::indent()
-{
- indentString_ += indentation_;
-}
-
-
-void
-StyledStreamWriter::unindent()
-{
- assert( indentString_.size() >= indentation_.size() );
- indentString_.resize( indentString_.size() - indentation_.size() );
-}
-
-
-void
-StyledStreamWriter::writeCommentBeforeValue( const Value &root )
-{
- if ( !root.hasComment( commentBefore ) )
- return;
- *document_ << normalizeEOL( root.getComment( commentBefore ) );
- *document_ << "\n";
-}
-
-
-void
-StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
- if ( root.hasComment( commentAfterOnSameLine ) )
- *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
- if ( root.hasComment( commentAfter ) )
- {
- *document_ << "\n";
- *document_ << normalizeEOL( root.getComment( commentAfter ) );
- *document_ << "\n";
- }
-}
-
-
-bool
-StyledStreamWriter::hasCommentForValue( const Value &value )
-{
- return value.hasComment( commentBefore )
- || value.hasComment( commentAfterOnSameLine )
- || value.hasComment( commentAfter );
-}
-
-
-std::string
-StyledStreamWriter::normalizeEOL( const std::string &text )
-{
- std::string normalized;
- normalized.reserve( text.length() );
- const char *begin = text.c_str();
- const char *end = begin + text.length();
- const char *current = begin;
- while ( current != end )
- {
- char c = *current++;
- if ( c == '\r' ) // mac or dos EOL
- {
- if ( *current == '\n' ) // convert dos EOL
- ++current;
- normalized += '\n';
- }
- else // handle unix EOL & other char
- normalized += c;
- }
- return normalized;
-}
-
-
-std::ostream& operator<<( std::ostream &sout, const Value &root )
-{
- Json::StyledStreamWriter writer;
- writer.write(sout, root);
- return sout;
-}
-
-
-} // namespace Json
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/sconscript b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/sconscript
deleted file mode 100644
index f6520d185..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/lib_json/sconscript
+++ /dev/null
@@ -1,8 +0,0 @@
-Import( 'env buildLibrary' )
-
-buildLibrary( env, Split( """
- json_reader.cpp
- json_value.cpp
- json_writer.cpp
- """ ),
- 'json' )
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.cpp b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.cpp
deleted file mode 100644
index 02e7b2169..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.cpp
+++ /dev/null
@@ -1,608 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#define _CRT_SECURE_NO_WARNINGS 1 // Prevents deprecation warning with MSVC
-#include "jsontest.h"
-#include <stdio.h>
-#include <string>
-
-#if defined(_MSC_VER)
-// Used to install a report hook that prevent dialog on assertion and error.
-# include <crtdbg.h>
-#endif // if defined(_MSC_VER)
-
-#if defined(_WIN32)
-// Used to prevent dialog on memory fault.
-// Limits headers included by Windows.h
-# define WIN32_LEAN_AND_MEAN
-# define NOSERVICE
-# define NOMCX
-# define NOIME
-# define NOSOUND
-# define NOCOMM
-# define NORPC
-# define NOGDI
-# define NOUSER
-# define NODRIVERS
-# define NOLOGERROR
-# define NOPROFILER
-# define NOMEMMGR
-# define NOLFILEIO
-# define NOOPENFILE
-# define NORESOURCE
-# define NOATOM
-# define NOLANGUAGE
-# define NOLSTRING
-# define NODBCS
-# define NOKEYBOARDINFO
-# define NOGDICAPMASKS
-# define NOCOLOR
-# define NOGDIOBJ
-# define NODRAWTEXT
-# define NOTEXTMETRIC
-# define NOSCALABLEFONT
-# define NOBITMAP
-# define NORASTEROPS
-# define NOMETAFILE
-# define NOSYSMETRICS
-# define NOSYSTEMPARAMSINFO
-# define NOMSG
-# define NOWINSTYLES
-# define NOWINOFFSETS
-# define NOSHOWWINDOW
-# define NODEFERWINDOWPOS
-# define NOVIRTUALKEYCODES
-# define NOKEYSTATES
-# define NOWH
-# define NOMENUS
-# define NOSCROLL
-# define NOCLIPBOARD
-# define NOICONS
-# define NOMB
-# define NOSYSCOMMANDS
-# define NOMDI
-# define NOCTLMGR
-# define NOWINMESSAGES
-# include <windows.h>
-#endif // if defined(_WIN32)
-
-namespace JsonTest {
-
-
-// class TestResult
-// //////////////////////////////////////////////////////////////////
-
-TestResult::TestResult()
- : predicateId_( 1 )
- , lastUsedPredicateId_( 0 )
- , messageTarget_( 0 )
-{
- // The root predicate has id 0
- rootPredicateNode_.id_ = 0;
- rootPredicateNode_.next_ = 0;
- predicateStackTail_ = &rootPredicateNode_;
-}
-
-
-void
-TestResult::setTestName( const std::string &name )
-{
- name_ = name;
-}
-
-TestResult &
-TestResult::addFailure( const char *file, unsigned int line,
- const char *expr )
-{
- /// Walks the PredicateContext stack adding them to failures_ if not already added.
- unsigned int nestingLevel = 0;
- PredicateContext *lastNode = rootPredicateNode_.next_;
- for ( ; lastNode != 0; lastNode = lastNode->next_ )
- {
- if ( lastNode->id_ > lastUsedPredicateId_ ) // new PredicateContext
- {
- lastUsedPredicateId_ = lastNode->id_;
- addFailureInfo( lastNode->file_, lastNode->line_, lastNode->expr_,
- nestingLevel );
- // Link the PredicateContext to the failure for message target when
- // popping the PredicateContext.
- lastNode->failure_ = &( failures_.back() );
- }
- ++nestingLevel;
- }
-
- // Adds the failed assertion
- addFailureInfo( file, line, expr, nestingLevel );
- messageTarget_ = &( failures_.back() );
- return *this;
-}
-
-
-void
-TestResult::addFailureInfo( const char *file, unsigned int line,
- const char *expr, unsigned int nestingLevel )
-{
- Failure failure;
- failure.file_ = file;
- failure.line_ = line;
- if ( expr )
- {
- failure.expr_ = expr;
- }
- failure.nestingLevel_ = nestingLevel;
- failures_.push_back( failure );
-}
-
-
-TestResult &
-TestResult::popPredicateContext()
-{
- PredicateContext *lastNode = &rootPredicateNode_;
- while ( lastNode->next_ != 0 && lastNode->next_->next_ != 0 )
- {
- lastNode = lastNode->next_;
- }
- // Set message target to popped failure
- PredicateContext *tail = lastNode->next_;
- if ( tail != 0 && tail->failure_ != 0 )
- {
- messageTarget_ = tail->failure_;
- }
- // Remove tail from list
- predicateStackTail_ = lastNode;
- lastNode->next_ = 0;
- return *this;
-}
-
-
-bool
-TestResult::failed() const
-{
- return !failures_.empty();
-}
-
-
-unsigned int
-TestResult::getAssertionNestingLevel() const
-{
- unsigned int level = 0;
- const PredicateContext *lastNode = &rootPredicateNode_;
- while ( lastNode->next_ != 0 )
- {
- lastNode = lastNode->next_;
- ++level;
- }
- return level;
-}
-
-
-void
-TestResult::printFailure( bool printTestName ) const
-{
- if ( failures_.empty() )
- {
- return;
- }
-
- if ( printTestName )
- {
- printf( "* Detail of %s test failure:\n", name_.c_str() );
- }
-
- // Print in reverse to display the callstack in the right order
- Failures::const_iterator itEnd = failures_.end();
- for ( Failures::const_iterator it = failures_.begin(); it != itEnd; ++it )
- {
- const Failure &failure = *it;
- std::string indent( failure.nestingLevel_ * 2, ' ' );
- if ( failure.file_ )
- {
- printf( "%s%s(%d): ", indent.c_str(), failure.file_, failure.line_ );
- }
- if ( !failure.expr_.empty() )
- {
- printf( "%s\n", failure.expr_.c_str() );
- }
- else if ( failure.file_ )
- {
- printf( "\n" );
- }
- if ( !failure.message_.empty() )
- {
- std::string reindented = indentText( failure.message_, indent + " " );
- printf( "%s\n", reindented.c_str() );
- }
- }
-}
-
-
-std::string
-TestResult::indentText( const std::string &text,
- const std::string &indent )
-{
- std::string reindented;
- std::string::size_type lastIndex = 0;
- while ( lastIndex < text.size() )
- {
- std::string::size_type nextIndex = text.find( '\n', lastIndex );
- if ( nextIndex == std::string::npos )
- {
- nextIndex = text.size() - 1;
- }
- reindented += indent;
- reindented += text.substr( lastIndex, nextIndex - lastIndex + 1 );
- lastIndex = nextIndex + 1;
- }
- return reindented;
-}
-
-
-TestResult &
-TestResult::addToLastFailure( const std::string &message )
-{
- if ( messageTarget_ != 0 )
- {
- messageTarget_->message_ += message;
- }
- return *this;
-}
-
-
-TestResult &
-TestResult::operator << ( bool value )
-{
- return addToLastFailure( value ? "true" : "false" );
-}
-
-
-TestResult &
-TestResult::operator << ( int value )
-{
- char buffer[32];
- sprintf( buffer, "%d", value );
- return addToLastFailure( buffer );
-}
-
-
-TestResult &
-TestResult::operator << ( unsigned int value )
-{
- char buffer[32];
- sprintf( buffer, "%u", value );
- return addToLastFailure( buffer );
-}
-
-
-TestResult &
-TestResult::operator << ( double value )
-{
- char buffer[32];
- sprintf( buffer, "%16g", value );
- return addToLastFailure( buffer );
-}
-
-
-TestResult &
-TestResult::operator << ( const char *value )
-{
- return addToLastFailure( value ? value
- : "<NULL>" );
-}
-
-
-TestResult &
-TestResult::operator << ( const std::string &value )
-{
- return addToLastFailure( value );
-}
-
-
-
-// class TestCase
-// //////////////////////////////////////////////////////////////////
-
-TestCase::TestCase()
- : result_( 0 )
-{
-}
-
-
-TestCase::~TestCase()
-{
-}
-
-
-void
-TestCase::run( TestResult &result )
-{
- result_ = &result;
- runTestCase();
-}
-
-
-
-// class Runner
-// //////////////////////////////////////////////////////////////////
-
-Runner::Runner()
-{
-}
-
-
-Runner &
-Runner::add( TestCaseFactory factory )
-{
- tests_.push_back( factory );
- return *this;
-}
-
-
-unsigned int
-Runner::testCount() const
-{
- return static_cast<unsigned int>( tests_.size() );
-}
-
-
-std::string
-Runner::testNameAt( unsigned int index ) const
-{
- TestCase *test = tests_[index]();
- std::string name = test->testName();
- delete test;
- return name;
-}
-
-
-void
-Runner::runTestAt( unsigned int index, TestResult &result ) const
-{
- TestCase *test = tests_[index]();
- result.setTestName( test->testName() );
- printf( "Testing %s: ", test->testName() );
- fflush( stdout );
-#if JSON_USE_EXCEPTION
- try
- {
-#endif // if JSON_USE_EXCEPTION
- test->run( result );
-#if JSON_USE_EXCEPTION
- }
- catch ( const std::exception &e )
- {
- result.addFailure( __FILE__, __LINE__,
- "Unexpected exception caugth:" ) << e.what();
- }
-#endif // if JSON_USE_EXCEPTION
- delete test;
- const char *status = result.failed() ? "FAILED"
- : "OK";
- printf( "%s\n", status );
- fflush( stdout );
-}
-
-
-bool
-Runner::runAllTest( bool printSummary ) const
-{
- unsigned int count = testCount();
- std::deque<TestResult> failures;
- for ( unsigned int index = 0; index < count; ++index )
- {
- TestResult result;
- runTestAt( index, result );
- if ( result.failed() )
- {
- failures.push_back( result );
- }
- }
-
- if ( failures.empty() )
- {
- if ( printSummary )
- {
- printf( "All %d tests passed\n", count );
- }
- return true;
- }
- else
- {
- for ( unsigned int index = 0; index < failures.size(); ++index )
- {
- TestResult &result = failures[index];
- result.printFailure( count > 1 );
- }
-
- if ( printSummary )
- {
- unsigned int failedCount = static_cast<unsigned int>( failures.size() );
- unsigned int passedCount = count - failedCount;
- printf( "%d/%d tests passed (%d failure(s))\n", passedCount, count, failedCount );
- }
- return false;
- }
-}
-
-
-bool
-Runner::testIndex( const std::string &testName,
- unsigned int &indexOut ) const
-{
- unsigned int count = testCount();
- for ( unsigned int index = 0; index < count; ++index )
- {
- if ( testNameAt(index) == testName )
- {
- indexOut = index;
- return true;
- }
- }
- return false;
-}
-
-
-void
-Runner::listTests() const
-{
- unsigned int count = testCount();
- for ( unsigned int index = 0; index < count; ++index )
- {
- printf( "%s\n", testNameAt( index ).c_str() );
- }
-}
-
-
-int
-Runner::runCommandLine( int argc, const char *argv[] ) const
-{
- typedef std::deque<std::string> TestNames;
- Runner subrunner;
- for ( int index = 1; index < argc; ++index )
- {
- std::string opt = argv[index];
- if ( opt == "--list-tests" )
- {
- listTests();
- return 0;
- }
- else if ( opt == "--test-auto" )
- {
- preventDialogOnCrash();
- }
- else if ( opt == "--test" )
- {
- ++index;
- if ( index < argc )
- {
- unsigned int testNameIndex;
- if ( testIndex( argv[index], testNameIndex ) )
- {
- subrunner.add( tests_[testNameIndex] );
- }
- else
- {
- fprintf( stderr, "Test '%s' does not exist!\n", argv[index] );
- return 2;
- }
- }
- else
- {
- printUsage( argv[0] );
- return 2;
- }
- }
- else
- {
- printUsage( argv[0] );
- return 2;
- }
- }
- bool succeeded;
- if ( subrunner.testCount() > 0 )
- {
- succeeded = subrunner.runAllTest( subrunner.testCount() > 1 );
- }
- else
- {
- succeeded = runAllTest( true );
- }
- return succeeded ? 0
- : 1;
-}
-
-
-#if defined(_MSC_VER)
-// Hook MSVCRT assertions to prevent dialog from appearing
-static int
-msvcrtSilentReportHook( int reportType, char *message, int *returnValue )
-{
- // The default CRT handling of error and assertion is to display
- // an error dialog to the user.
- // Instead, when an error or an assertion occurs, we force the
- // application to terminate using abort() after display
- // the message on stderr.
- if ( reportType == _CRT_ERROR ||
- reportType == _CRT_ASSERT )
- {
- // calling abort() cause the ReportHook to be called
- // The following is used to detect this case and let's the
- // error handler fallback on its default behaviour (
- // display a warning message)
- static volatile bool isAborting = false;
- if ( isAborting )
- {
- return TRUE;
- }
- isAborting = true;
-
- fprintf( stderr, "CRT Error/Assert:\n%s\n", message );
- fflush( stderr );
- abort();
- }
- // Let's other reportType (_CRT_WARNING) be handled as they would by default
- return FALSE;
-}
-#endif // if defined(_MSC_VER)
-
-
-void
-Runner::preventDialogOnCrash()
-{
-#if defined(_MSC_VER)
- // Install a hook to prevent MSVCRT error and assertion from
- // popping a dialog.
- _CrtSetReportHook( &msvcrtSilentReportHook );
-#endif // if defined(_MSC_VER)
-
- // @todo investiguate this handler (for buffer overflow)
- // _set_security_error_handler
-
-#if defined(_WIN32)
- // Prevents the system from popping a dialog for debugging if the
- // application fails due to invalid memory access.
- SetErrorMode( SEM_FAILCRITICALERRORS
- | SEM_NOGPFAULTERRORBOX
- | SEM_NOOPENFILEERRORBOX );
-#endif // if defined(_WIN32)
-}
-
-void
-Runner::printUsage( const char *appName )
-{
- printf(
- "Usage: %s [options]\n"
- "\n"
- "If --test is not specified, then all the test cases be run.\n"
- "\n"
- "Valid options:\n"
- "--list-tests: print the name of all test cases on the standard\n"
- " output and exit.\n"
- "--test TESTNAME: executes the test case with the specified name.\n"
- " May be repeated.\n"
- "--test-auto: prevent dialog prompting for debugging on crash.\n"
- , appName );
-}
-
-
-
-// Assertion functions
-// //////////////////////////////////////////////////////////////////
-
-TestResult &
-checkStringEqual( TestResult &result,
- const std::string &expected, const std::string &actual,
- const char *file, unsigned int line, const char *expr )
-{
- if ( expected != actual )
- {
- result.addFailure( file, line, expr );
- result << "Expected: '" << expected << "'\n";
- result << "Actual : '" << actual << "'";
- }
- return result;
-}
-
-
-} // namespace JsonTest
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.h b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.h
deleted file mode 100644
index 0d072382e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/jsontest.h
+++ /dev/null
@@ -1,259 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSONTEST_H_INCLUDED
-# define JSONTEST_H_INCLUDED
-
-# include <json/config.h>
-# include <stdio.h>
-# include <deque>
-# include <string>
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// Mini Unit Testing framework
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-
-
-/** \brief Unit testing framework.
- * \warning: all assertions are non-aborting, test case execution will continue
- * even if an assertion namespace.
- * This constraint is for portability: the framework needs to compile
- * on Visual Studio 6 and must not require exception usage.
- */
-namespace JsonTest {
-
-
- class Failure
- {
- public:
- const char *file_;
- unsigned int line_;
- std::string expr_;
- std::string message_;
- unsigned int nestingLevel_;
- };
-
-
- /// Context used to create the assertion callstack on failure.
- /// Must be a POD to allow inline initialisation without stepping
- /// into the debugger.
- struct PredicateContext
- {
- typedef unsigned int Id;
- Id id_;
- const char *file_;
- unsigned int line_;
- const char *expr_;
- PredicateContext *next_;
- /// Related Failure, set when the PredicateContext is converted
- /// into a Failure.
- Failure *failure_;
- };
-
- class TestResult
- {
- public:
- TestResult();
-
- /// \internal Implementation detail for assertion macros
- /// Not encapsulated to prevent step into when debugging failed assertions
- /// Incremented by one on assertion predicate entry, decreased by one
- /// by addPredicateContext().
- PredicateContext::Id predicateId_;
-
- /// \internal Implementation detail for predicate macros
- PredicateContext *predicateStackTail_;
-
- void setTestName( const std::string &name );
-
- /// Adds an assertion failure.
- TestResult &addFailure( const char *file, unsigned int line,
- const char *expr = 0 );
-
- /// Removes the last PredicateContext added to the predicate stack
- /// chained list.
- /// Next messages will be targed at the PredicateContext that was removed.
- TestResult &popPredicateContext();
-
- bool failed() const;
-
- void printFailure( bool printTestName ) const;
-
- TestResult &operator << ( bool value );
- TestResult &operator << ( int value );
- TestResult &operator << ( unsigned int value );
- TestResult &operator << ( double value );
- TestResult &operator << ( const char *value );
- TestResult &operator << ( const std::string &value );
-
- private:
- TestResult &addToLastFailure( const std::string &message );
- unsigned int getAssertionNestingLevel() const;
- /// Adds a failure or a predicate context
- void addFailureInfo( const char *file, unsigned int line,
- const char *expr, unsigned int nestingLevel );
- static std::string indentText( const std::string &text,
- const std::string &indent );
-
- typedef std::deque<Failure> Failures;
- Failures failures_;
- std::string name_;
- PredicateContext rootPredicateNode_;
- PredicateContext::Id lastUsedPredicateId_;
- /// Failure which is the target of the messages added using operator <<
- Failure *messageTarget_;
- };
-
-
- class TestCase
- {
- public:
- TestCase();
-
- virtual ~TestCase();
-
- void run( TestResult &result );
-
- virtual const char *testName() const = 0;
-
- protected:
- TestResult *result_;
-
- private:
- virtual void runTestCase() = 0;
- };
-
- /// Function pointer type for TestCase factory
- typedef TestCase *(*TestCaseFactory)();
-
- class Runner
- {
- public:
- Runner();
-
- /// Adds a test to the suite
- Runner &add( TestCaseFactory factory );
-
- /// Runs test as specified on the command-line
- /// If no command-line arguments are provided, run all tests.
- /// If --list-tests is provided, then print the list of all test cases
- /// If --test <testname> is provided, then run test testname.
- int runCommandLine( int argc, const char *argv[] ) const;
-
- /// Runs all the test cases
- bool runAllTest( bool printSummary ) const;
-
- /// Returns the number of test case in the suite
- unsigned int testCount() const;
-
- /// Returns the name of the test case at the specified index
- std::string testNameAt( unsigned int index ) const;
-
- /// Runs the test case at the specified index using the specified TestResult
- void runTestAt( unsigned int index, TestResult &result ) const;
-
- static void printUsage( const char *appName );
-
- private: // prevents copy construction and assignment
- Runner( const Runner &other );
- Runner &operator =( const Runner &other );
-
- private:
- void listTests() const;
- bool testIndex( const std::string &testName, unsigned int &index ) const;
- static void preventDialogOnCrash();
-
- private:
- typedef std::deque<TestCaseFactory> Factories;
- Factories tests_;
- };
-
- template<typename T>
- TestResult &
- checkEqual( TestResult &result, const T &expected, const T &actual,
- const char *file, unsigned int line, const char *expr )
- {
- if ( expected != actual )
- {
- result.addFailure( file, line, expr );
- result << "Expected: " << expected << "\n";
- result << "Actual : " << actual;
- }
- return result;
- }
-
- TestResult &
- checkStringEqual( TestResult &result,
- const std::string &expected, const std::string &actual,
- const char *file, unsigned int line, const char *expr );
-
-} // namespace JsonTest
-
-
-/// \brief Asserts that the given expression is true.
-/// JSONTEST_ASSERT( x == y ) << "x=" << x << ", y=" << y;
-/// JSONTEST_ASSERT( x == y );
-#define JSONTEST_ASSERT( expr ) \
- if ( expr ) \
- { \
- } \
- else \
- result_->addFailure( __FILE__, __LINE__, #expr )
-
-/// \brief Asserts that the given predicate is true.
-/// The predicate may do other assertions and be a member function of the fixture.
-#define JSONTEST_ASSERT_PRED( expr ) \
- { \
- JsonTest::PredicateContext _minitest_Context = { \
- result_->predicateId_, __FILE__, __LINE__, #expr }; \
- result_->predicateStackTail_->next_ = &_minitest_Context; \
- result_->predicateId_ += 1; \
- result_->predicateStackTail_ = &_minitest_Context; \
- (expr); \
- result_->popPredicateContext(); \
- } \
- *result_
-
-/// \brief Asserts that two values are equals.
-#define JSONTEST_ASSERT_EQUAL( expected, actual ) \
- JsonTest::checkEqual( *result_, expected, actual, \
- __FILE__, __LINE__, \
- #expected " == " #actual )
-
-/// \brief Asserts that two values are equals.
-#define JSONTEST_ASSERT_STRING_EQUAL( expected, actual ) \
- JsonTest::checkStringEqual( *result_, \
- std::string(expected), std::string(actual), \
- #expected " == " #actual )
-
-/// \brief Begin a fixture test case.
-#define JSONTEST_FIXTURE( FixtureType, name ) \
- class Test##FixtureType##name : public FixtureType \
- { \
- public: \
- static JsonTest::TestCase *factory() \
- { \
- return new Test##FixtureType##name(); \
- } \
- public: /* overidden from TestCase */ \
- virtual const char *testName() const \
- { \
- return #FixtureType "/" #name; \
- } \
- virtual void runTestCase(); \
- }; \
- \
- void Test##FixtureType##name::runTestCase()
-
-#define JSONTEST_FIXTURE_FACTORY( FixtureType, name ) \
- &Test##FixtureType##name::factory
-
-#define JSONTEST_REGISTER_FIXTURE( runner, FixtureType, name ) \
- (runner).add( JSONTEST_FIXTURE_FACTORY( FixtureType, name ) )
-
-#endif // ifndef JSONTEST_H_INCLUDED
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/main.cpp b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/main.cpp
deleted file mode 100644
index 327521965..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/main.cpp
+++ /dev/null
@@ -1,430 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#include <json/json.h>
-#include "jsontest.h"
-
-
-// TODO:
-// - boolean value returns that they are integral. Should not be.
-// - unsigned integer in integer range are not considered to be valid integer. Should check range.
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// Json Library test cases
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-
-struct ValueTest : JsonTest::TestCase
-{
- Json::Value null_;
- Json::Value emptyArray_;
- Json::Value emptyObject_;
- Json::Value integer_;
- Json::Value unsignedInteger_;
- Json::Value smallUnsignedInteger_;
- Json::Value real_;
- Json::Value float_;
- Json::Value array1_;
- Json::Value object1_;
- Json::Value emptyString_;
- Json::Value string1_;
- Json::Value string_;
- Json::Value true_;
- Json::Value false_;
-
-
- ValueTest()
- : emptyArray_( Json::arrayValue )
- , emptyObject_( Json::objectValue )
- , integer_( 123456789 )
- , smallUnsignedInteger_( Json::Value::UInt( Json::Value::maxInt ) )
- , unsignedInteger_( 34567890u )
- , real_( 1234.56789 )
- , float_( 0.00390625f )
- , emptyString_( "" )
- , string1_( "a" )
- , string_( "sometext with space" )
- , true_( true )
- , false_( false )
- {
- array1_.append( 1234 );
- object1_["id"] = 1234;
- }
-
- struct IsCheck
- {
- /// Initialize all checks to \c false by default.
- IsCheck();
-
- bool isObject_;
- bool isArray_;
- bool isBool_;
- bool isDouble_;
- bool isInt_;
- bool isUInt_;
- bool isIntegral_;
- bool isNumeric_;
- bool isString_;
- bool isNull_;
- };
-
- void checkConstMemberCount( const Json::Value &value, unsigned int expectedCount );
-
- void checkMemberCount( Json::Value &value, unsigned int expectedCount );
-
- void checkIs( const Json::Value &value, const IsCheck &check );
-
- void checkIsLess( const Json::Value &x, const Json::Value &y );
-
- void checkIsEqual( const Json::Value &x, const Json::Value &y );
-};
-
-
-JSONTEST_FIXTURE( ValueTest, size )
-{
- JSONTEST_ASSERT_PRED( checkMemberCount(emptyArray_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(emptyObject_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(array1_, 1) );
- JSONTEST_ASSERT_PRED( checkMemberCount(object1_, 1) );
- JSONTEST_ASSERT_PRED( checkMemberCount(null_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(integer_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(real_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(emptyString_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(string_, 0) );
- JSONTEST_ASSERT_PRED( checkMemberCount(true_, 0) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isObject )
-{
- IsCheck checks;
- checks.isObject_ = true;
- JSONTEST_ASSERT_PRED( checkIs( emptyObject_, checks ) );
- JSONTEST_ASSERT_PRED( checkIs( object1_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isArray )
-{
- IsCheck checks;
- checks.isArray_ = true;
- JSONTEST_ASSERT_PRED( checkIs( emptyArray_, checks ) );
- JSONTEST_ASSERT_PRED( checkIs( array1_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isNull )
-{
- IsCheck checks;
- checks.isNull_ = true;
- checks.isObject_ = true;
- checks.isArray_ = true;
- JSONTEST_ASSERT_PRED( checkIs( null_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isString )
-{
- IsCheck checks;
- checks.isString_ = true;
- JSONTEST_ASSERT_PRED( checkIs( emptyString_, checks ) );
- JSONTEST_ASSERT_PRED( checkIs( string_, checks ) );
- JSONTEST_ASSERT_PRED( checkIs( string1_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isBool )
-{
- IsCheck checks;
- checks.isBool_ = true;
- checks.isIntegral_ = true;
- checks.isNumeric_ = true;
- JSONTEST_ASSERT_PRED( checkIs( false_, checks ) );
- JSONTEST_ASSERT_PRED( checkIs( true_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isDouble )
-{
- IsCheck checks;
- checks.isDouble_ = true;
- checks.isNumeric_ = true;
- JSONTEST_ASSERT_PRED( checkIs( real_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isInt )
-{
- IsCheck checks;
- checks.isInt_ = true;
- checks.isNumeric_ = true;
- checks.isIntegral_ = true;
- JSONTEST_ASSERT_PRED( checkIs( integer_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, isUInt )
-{
- IsCheck checks;
- checks.isUInt_ = true;
- checks.isNumeric_ = true;
- checks.isIntegral_ = true;
- JSONTEST_ASSERT_PRED( checkIs( unsignedInteger_, checks ) );
- JSONTEST_ASSERT_PRED( checkIs( smallUnsignedInteger_, checks ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, accessArray )
-{
- const unsigned int index0 = 0;
- JSONTEST_ASSERT( Json::Value(1234) == array1_[index0] ) << "Json::Value::operator[ArrayIndex]";
- JSONTEST_ASSERT( Json::Value(1234) == array1_[0] ) << "Json::Value::operator[int]";
-
- const Json::Value &constArray = array1_;
- JSONTEST_ASSERT( Json::Value(1234) == constArray[index0] ) << "Json::Value::operator[ArrayIndex] const";
- JSONTEST_ASSERT( Json::Value(1234) == constArray[0] ) << "Json::Value::operator[int] const";
-}
-
-
-JSONTEST_FIXTURE( ValueTest, asFloat )
-{
- JSONTEST_ASSERT_EQUAL( 0.00390625f, float_.asFloat() ) << "Json::Value::asFloat()";
-}
-
-void
-ValueTest::checkConstMemberCount( const Json::Value &value, unsigned int expectedCount )
-{
- unsigned int count = 0;
- Json::Value::const_iterator itEnd = value.end();
- for ( Json::Value::const_iterator it = value.begin(); it != itEnd; ++it )
- {
- ++count;
- }
- JSONTEST_ASSERT_EQUAL( expectedCount, count ) << "Json::Value::const_iterator";
-}
-
-void
-ValueTest::checkMemberCount( Json::Value &value, unsigned int expectedCount )
-{
- JSONTEST_ASSERT_EQUAL( expectedCount, value.size() );
-
- unsigned int count = 0;
- Json::Value::iterator itEnd = value.end();
- for ( Json::Value::iterator it = value.begin(); it != itEnd; ++it )
- {
- ++count;
- }
- JSONTEST_ASSERT_EQUAL( expectedCount, count ) << "Json::Value::iterator";
-
- JSONTEST_ASSERT_PRED( checkConstMemberCount(value, expectedCount) );
-}
-
-
-ValueTest::IsCheck::IsCheck()
- : isObject_( false )
- , isArray_( false )
- , isBool_( false )
- , isDouble_( false )
- , isInt_( false )
- , isUInt_( false )
- , isIntegral_( false )
- , isNumeric_( false )
- , isString_( false )
- , isNull_( false )
-{
-}
-
-
-void
-ValueTest::checkIs( const Json::Value &value, const IsCheck &check )
-{
- JSONTEST_ASSERT_EQUAL( check.isObject_, value.isObject() );
- JSONTEST_ASSERT_EQUAL( check.isArray_, value.isArray() );
- JSONTEST_ASSERT_EQUAL( check.isBool_, value.isBool() );
- JSONTEST_ASSERT_EQUAL( check.isDouble_, value.isDouble() );
- JSONTEST_ASSERT_EQUAL( check.isInt_, value.isInt() );
- JSONTEST_ASSERT_EQUAL( check.isUInt_, value.isUInt() );
- JSONTEST_ASSERT_EQUAL( check.isIntegral_, value.isIntegral() );
- JSONTEST_ASSERT_EQUAL( check.isNumeric_, value.isNumeric() );
- JSONTEST_ASSERT_EQUAL( check.isString_, value.isString() );
- JSONTEST_ASSERT_EQUAL( check.isNull_, value.isNull() );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareNull )
-{
- JSONTEST_ASSERT_PRED( checkIsEqual( Json::Value(), Json::Value() ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareInt )
-{
- JSONTEST_ASSERT_PRED( checkIsLess( 0, 10 ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( 10, 10 ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( -10, -10 ) );
- JSONTEST_ASSERT_PRED( checkIsLess( -10, 0 ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareUInt )
-{
- JSONTEST_ASSERT_PRED( checkIsLess( 0u, 10u ) );
- JSONTEST_ASSERT_PRED( checkIsLess( 0u, Json::Value::maxUInt ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( 10u, 10u ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareDouble )
-{
- JSONTEST_ASSERT_PRED( checkIsLess( 0.0, 10.0 ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( 10.0, 10.0 ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( -10.0, -10.0 ) );
- JSONTEST_ASSERT_PRED( checkIsLess( -10.0, 0.0 ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareString )
-{
- JSONTEST_ASSERT_PRED( checkIsLess( "", " " ) );
- JSONTEST_ASSERT_PRED( checkIsLess( "", "a" ) );
- JSONTEST_ASSERT_PRED( checkIsLess( "abcd", "zyui" ) );
- JSONTEST_ASSERT_PRED( checkIsLess( "abc", "abcd" ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( "abcd", "abcd" ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( " ", " " ) );
- JSONTEST_ASSERT_PRED( checkIsLess( "ABCD", "abcd" ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( "ABCD", "ABCD" ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareBoolean )
-{
- JSONTEST_ASSERT_PRED( checkIsLess( false, true ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( false, false ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( true, true ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareArray )
-{
- // array compare size then content
- Json::Value emptyArray(Json::arrayValue);
- Json::Value l1aArray;
- l1aArray.append( 0 );
- Json::Value l1bArray;
- l1bArray.append( 10 );
- Json::Value l2aArray;
- l2aArray.append( 0 );
- l2aArray.append( 0 );
- Json::Value l2bArray;
- l2bArray.append( 0 );
- l2bArray.append( 10 );
- JSONTEST_ASSERT_PRED( checkIsLess( emptyArray, l1aArray ) );
- JSONTEST_ASSERT_PRED( checkIsLess( emptyArray, l2aArray ) );
- JSONTEST_ASSERT_PRED( checkIsLess( l1aArray, l2aArray ) );
- JSONTEST_ASSERT_PRED( checkIsLess( l2aArray, l2bArray ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( emptyArray, Json::Value( emptyArray ) ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( l1aArray, Json::Value( l1aArray) ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( l2bArray, Json::Value( l2bArray) ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareObject )
-{
- // object compare size then content
- Json::Value emptyObject(Json::objectValue);
- Json::Value l1aObject;
- l1aObject["key1"] = 0;
- Json::Value l1bObject;
- l1aObject["key1"] = 10;
- Json::Value l2aObject;
- l2aObject["key1"] = 0;
- l2aObject["key2"] = 0;
- JSONTEST_ASSERT_PRED( checkIsLess( emptyObject, l1aObject ) );
- JSONTEST_ASSERT_PRED( checkIsLess( emptyObject, l2aObject ) );
- JSONTEST_ASSERT_PRED( checkIsLess( l1aObject, l2aObject ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( emptyObject, Json::Value( emptyObject ) ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( l1aObject, Json::Value( l1aObject ) ) );
- JSONTEST_ASSERT_PRED( checkIsEqual( l2aObject, Json::Value( l2aObject ) ) );
-}
-
-
-JSONTEST_FIXTURE( ValueTest, compareType )
-{
- // object of different type are ordered according to their type
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value(), Json::Value(1) ) );
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value(1), Json::Value(1u) ) );
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value(1u), Json::Value(1.0) ) );
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value(1.0), Json::Value("a") ) );
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value("a"), Json::Value(true) ) );
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value(true), Json::Value(Json::arrayValue) ) );
- JSONTEST_ASSERT_PRED( checkIsLess( Json::Value(Json::arrayValue), Json::Value(Json::objectValue) ) );
-}
-
-
-void
-ValueTest::checkIsLess( const Json::Value &x, const Json::Value &y )
-{
- JSONTEST_ASSERT( x < y );
- JSONTEST_ASSERT( y > x );
- JSONTEST_ASSERT( x <= y );
- JSONTEST_ASSERT( y >= x );
- JSONTEST_ASSERT( !(x == y) );
- JSONTEST_ASSERT( !(y == x) );
- JSONTEST_ASSERT( !(x >= y) );
- JSONTEST_ASSERT( !(y <= x) );
- JSONTEST_ASSERT( !(x > y) );
- JSONTEST_ASSERT( !(y < x) );
- JSONTEST_ASSERT( x.compare( y ) < 0 );
- JSONTEST_ASSERT( y.compare( x ) >= 0 );
-}
-
-
-void
-ValueTest::checkIsEqual( const Json::Value &x, const Json::Value &y )
-{
- JSONTEST_ASSERT( x == y );
- JSONTEST_ASSERT( y == x );
- JSONTEST_ASSERT( x <= y );
- JSONTEST_ASSERT( y <= x );
- JSONTEST_ASSERT( x >= y );
- JSONTEST_ASSERT( y >= x );
- JSONTEST_ASSERT( !(x < y) );
- JSONTEST_ASSERT( !(y < x) );
- JSONTEST_ASSERT( !(x > y) );
- JSONTEST_ASSERT( !(y > x) );
- JSONTEST_ASSERT( x.compare( y ) == 0 );
- JSONTEST_ASSERT( y.compare( x ) == 0 );
-}
-
-
-int main( int argc, const char *argv[] )
-{
- JsonTest::Runner runner;
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, size );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isObject );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isArray );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isBool );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isInt );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isUInt );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isDouble );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isString );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isNull );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, isNull );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, accessArray );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, asFloat );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareNull );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareInt );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareUInt );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareDouble );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareString );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareBoolean );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareArray );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareObject );
- JSONTEST_REGISTER_FIXTURE( runner, ValueTest, compareType );
- return runner.runCommandLine( argc, argv );
-}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/sconscript b/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/sconscript
deleted file mode 100644
index 84f56b6a0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/src/test_lib_json/sconscript
+++ /dev/null
@@ -1,10 +0,0 @@
-Import( 'env_testing buildUnitTests' )
-
-buildUnitTests( env_testing, Split( """
- main.cpp
- jsontest.cpp
- """ ),
- 'test_lib_json' )
-
-# For 'check' to work, 'libs' must be built first.
-env_testing.Depends('test_lib_json', '#libs')
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/cleantests.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/cleantests.py
deleted file mode 100644
index c38fd8ffd..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/cleantests.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# removes all files created during testing
-import glob
-import os
-
-paths = []
-for pattern in [ '*.actual', '*.actual-rewrite', '*.rewrite', '*.process-output' ]:
- paths += glob.glob( 'data/' + pattern )
-
-for path in paths:
- os.unlink( path )
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/fail_test_array_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/fail_test_array_01.json
deleted file mode 100644
index 900fcc209..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/fail_test_array_01.json
+++ /dev/null
@@ -1 +0,0 @@
-[ 1 2 3]
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.expected
deleted file mode 100644
index 4aa8fb337..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=[]
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.json
deleted file mode 100644
index 60b074253..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_01.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.expected
deleted file mode 100644
index 5b7c72af4..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=[]
-.[0]=1
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.json
deleted file mode 100644
index c02be1290..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_02.json
+++ /dev/null
@@ -1 +0,0 @@
-[1]
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.expected
deleted file mode 100644
index 0ba568e0d..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-.=[]
-.[0]=1
-.[1]=2
-.[2]=3
-.[3]=4
-.[4]=5
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.json
deleted file mode 100644
index ac8f422f0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_03.json
+++ /dev/null
@@ -1 +0,0 @@
-[ 1, 2 , 3,4,5]
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.expected
deleted file mode 100644
index db58c306a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-.=[]
-.[0]=1
-.[1]="abc"
-.[2]=12.3
-.[3]=-4
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.json
deleted file mode 100644
index 075547881..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_04.json
+++ /dev/null
@@ -1 +0,0 @@
-[1, "abc" , 12.3, -4]
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.expected
deleted file mode 100644
index 82ad48434..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.expected
+++ /dev/null
@@ -1,100 +0,0 @@
-.=[]
-.[0]=1
-.[1]=2
-.[2]=3
-.[3]=4
-.[4]=5
-.[5]=6
-.[6]=7
-.[7]=8
-.[8]=9
-.[9]=10
-.[10]=11
-.[11]=12
-.[12]=13
-.[13]=14
-.[14]=15
-.[15]=16
-.[16]=17
-.[17]=18
-.[18]=19
-.[19]=20
-.[20]=21
-.[21]=22
-.[22]=23
-.[23]=24
-.[24]=25
-.[25]=26
-.[26]=27
-.[27]=28
-.[28]=29
-.[29]=30
-.[30]=31
-.[31]=32
-.[32]=33
-.[33]=34
-.[34]=35
-.[35]=36
-.[36]=37
-.[37]=38
-.[38]=39
-.[39]=40
-.[40]=41
-.[41]=42
-.[42]=43
-.[43]=44
-.[44]=45
-.[45]=46
-.[46]=47
-.[47]=48
-.[48]=49
-.[49]=50
-.[50]=51
-.[51]=52
-.[52]=53
-.[53]=54
-.[54]=55
-.[55]=56
-.[56]=57
-.[57]=58
-.[58]=59
-.[59]=60
-.[60]=61
-.[61]=62
-.[62]=63
-.[63]=64
-.[64]=65
-.[65]=66
-.[66]=67
-.[67]=68
-.[68]=69
-.[69]=70
-.[70]=71
-.[71]=72
-.[72]=73
-.[73]=74
-.[74]=75
-.[75]=76
-.[76]=77
-.[77]=78
-.[78]=79
-.[79]=80
-.[80]=81
-.[81]=82
-.[82]=83
-.[83]=84
-.[84]=85
-.[85]=86
-.[86]=87
-.[87]=88
-.[88]=89
-.[89]=90
-.[90]=91
-.[91]=92
-.[92]=93
-.[93]=94
-.[94]=95
-.[95]=96
-.[96]=97
-.[97]=98
-.[98]=99
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.json
deleted file mode 100644
index 7809d6c9a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_05.json
+++ /dev/null
@@ -1 +0,0 @@
-[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.expected
deleted file mode 100644
index e087b6328..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-.=[]
-.[0]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-.[1]="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
-.[2]="ccccccccccccccccccccccc"
-.[3]="dddddddddddddddddddddddddddddddddddddddddddddddddddd"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.json
deleted file mode 100644
index 9777a6408..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_array_06.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
- "ccccccccccccccccccccccc",
- "dddddddddddddddddddddddddddddddddddddddddddddddddddd" ] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.expected
deleted file mode 100644
index 052738701..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=123456789
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.json
deleted file mode 100644
index 57cf9b911..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_01.json
+++ /dev/null
@@ -1 +0,0 @@
-0123456789
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.expected
deleted file mode 100644
index 9040e845e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=-123456789
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.json
deleted file mode 100644
index fe84da4d1..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_02.json
+++ /dev/null
@@ -1 +0,0 @@
--0123456789
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.expected
deleted file mode 100644
index 494278df2..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-.=1.2345678
-
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.json
deleted file mode 100644
index feac15012..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_03.json
+++ /dev/null
@@ -1,3 +0,0 @@
-1.2345678
-
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.expected
deleted file mode 100644
index 659f7440e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.="abcdef"
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.json
deleted file mode 100644
index 01374bd28..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_04.json
+++ /dev/null
@@ -1,2 +0,0 @@
-"abcdef"
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.expected
deleted file mode 100644
index cb1cdada8..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=null
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.json
deleted file mode 100644
index a6d4f5a68..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_05.json
+++ /dev/null
@@ -1,2 +0,0 @@
-null
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.expected
deleted file mode 100644
index 8b2273103..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=true
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.json
deleted file mode 100644
index 5d967af03..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_06.json
+++ /dev/null
@@ -1,2 +0,0 @@
-true
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.expected
deleted file mode 100644
index 4979ed504..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=false
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.json
deleted file mode 100644
index b7ee6c5b3..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_07.json
+++ /dev/null
@@ -1,2 +0,0 @@
-false
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.expected
deleted file mode 100644
index cb1cdada8..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=null
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.json
deleted file mode 100644
index fe107f47b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_08.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// C++ style comment
-null
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.expected
deleted file mode 100644
index cb1cdada8..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=null
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.json
deleted file mode 100644
index e0cb0890e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_basic_09.json
+++ /dev/null
@@ -1,4 +0,0 @@
-/* C style comment
- */
-null
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.expected
deleted file mode 100644
index 0b8f42d50..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.expected
+++ /dev/null
@@ -1,8 +0,0 @@
-.={}
-.test=[]
-.test[0]={}
-.test[0].a="aaa"
-.test[1]={}
-.test[1].b="bbb"
-.test[2]={}
-.test[2].c="ccc"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.json
deleted file mode 100644
index 0de8f9cf7..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_comment_01.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "test":
- [
- { "a" : "aaa" }, // Comment for a
- { "b" : "bbb" }, // Comment for b
- { "c" : "ccc" } // Comment for c
- ]
-}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.expected
deleted file mode 100644
index 44e753bfd..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.expected
+++ /dev/null
@@ -1,20 +0,0 @@
-.={}
-.attribute=[]
-.attribute[0]="random"
-.attribute[1]="short"
-.attribute[2]="bold"
-.attribute[3]=12
-.attribute[4]={}
-.attribute[4].height=7
-.attribute[4].width=64
-.count=1234
-.name={}
-.name.aka="T.E.S.T."
-.name.id=123987
-.test={}
-.test.1={}
-.test.1.2={}
-.test.1.2.3={}
-.test.1.2.3.coord=[]
-.test.1.2.3.coord[0]=1
-.test.1.2.3.coord[1]=2
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.json
deleted file mode 100644
index fb2f86c64..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_complex_01.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "count" : 1234,
- "name" : { "aka" : "T.E.S.T.", "id" : 123987 },
- "attribute" : [
- "random",
- "short",
- "bold",
- 12,
- { "height" : 7, "width" : 64 }
- ],
- "test": { "1" :
- { "2" :
- { "3" : { "coord" : [ 1,2] }
- }
- }
- }
-}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.expected
deleted file mode 100644
index 24aa29e22..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=2147483647
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.json
deleted file mode 100644
index e82c7ad72..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_01.json
+++ /dev/null
@@ -1,2 +0,0 @@
-// Max signed integer
-2147483647
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.expected
deleted file mode 100644
index dab99eb8e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=-2147483648
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.json
deleted file mode 100644
index 548764eba..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_02.json
+++ /dev/null
@@ -1,2 +0,0 @@
-// Min signed integer
--2147483648
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.expected
deleted file mode 100644
index dde326050..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=4294967295
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.json
deleted file mode 100644
index 18aeaf612..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_03.json
+++ /dev/null
@@ -1,2 +0,0 @@
-// Max unsigned integer
-4294967295
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.expected
deleted file mode 100644
index 8da90136b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=0
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.json
deleted file mode 100644
index 82024833a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_04.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// Min unsigned integer
-0
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.expected
deleted file mode 100644
index 238d1d6e1..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=1
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.json
deleted file mode 100644
index 479779013..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_05.json
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.expected
deleted file mode 100644
index bc9520a1d..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=9223372036854775808
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.json
deleted file mode 100644
index 360d66078..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_06_64bits.json
+++ /dev/null
@@ -1,2 +0,0 @@
-9223372036854775808
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.expected
deleted file mode 100644
index 39eb798db..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=-9223372036854775808
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.json
deleted file mode 100644
index 11d8513cf..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_07_64bits.json
+++ /dev/null
@@ -1,2 +0,0 @@
--9223372036854775808
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.expected
deleted file mode 100644
index 831f4325e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.expected
+++ /dev/null
@@ -1 +0,0 @@
-.=18446744073709551615
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.json
deleted file mode 100644
index 6e1fb0436..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_integer_08_64bits.json
+++ /dev/null
@@ -1,2 +0,0 @@
-18446744073709551615
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.expected
deleted file mode 100644
index ee2fafc01..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.expected
+++ /dev/null
@@ -1,2122 +0,0 @@
-.=[]
-.[0]=[]
-.[0][0]="A"
-.[0][1]=0
-.[0][2]=1
-.[0][3]=2
-.[0][4]=3
-.[0][5]=4
-.[0][6]=5
-.[0][7]=6
-.[0][8]=7
-.[0][9]=8
-.[0][10]=9
-.[0][11]=10
-.[0][12]=11
-.[0][13]=12
-.[0][14]=13
-.[0][15]=14
-.[0][16]=15
-.[0][17]=16
-.[0][18]=17
-.[0][19]=18
-.[0][20]=19
-.[0][21]=20
-.[0][22]=21
-.[0][23]=22
-.[0][24]=23
-.[0][25]=24
-.[0][26]=25
-.[0][27]=26
-.[0][28]=27
-.[0][29]=28
-.[0][30]=29
-.[0][31]=30
-.[0][32]=31
-.[0][33]=32
-.[0][34]=33
-.[0][35]=34
-.[0][36]=35
-.[0][37]=36
-.[0][38]=37
-.[0][39]=38
-.[0][40]=39
-.[0][41]=40
-.[0][42]=41
-.[0][43]=42
-.[0][44]=43
-.[0][45]=44
-.[0][46]=45
-.[0][47]=46
-.[0][48]=47
-.[0][49]=48
-.[0][50]=49
-.[0][51]=50
-.[0][52]=51
-.[0][53]=52
-.[0][54]=53
-.[0][55]=54
-.[0][56]=55
-.[0][57]=56
-.[0][58]=57
-.[0][59]=58
-.[0][60]=59
-.[0][61]=60
-.[0][62]=61
-.[0][63]=62
-.[0][64]=63
-.[0][65]=64
-.[0][66]=65
-.[0][67]=66
-.[0][68]=67
-.[0][69]=68
-.[0][70]=69
-.[0][71]=70
-.[0][72]=71
-.[0][73]=72
-.[0][74]=73
-.[0][75]=74
-.[0][76]=75
-.[0][77]=76
-.[0][78]=77
-.[0][79]=78
-.[0][80]=79
-.[0][81]=80
-.[0][82]=81
-.[0][83]=82
-.[0][84]=83
-.[0][85]=84
-.[0][86]=85
-.[0][87]=86
-.[0][88]=87
-.[0][89]=88
-.[0][90]=89
-.[0][91]=90
-.[0][92]=91
-.[0][93]=92
-.[0][94]=93
-.[0][95]=94
-.[0][96]=95
-.[0][97]=96
-.[0][98]=97
-.[0][99]=98
-.[0][100]=99
-.[0][101]=100
-.[0][102]=101
-.[0][103]=102
-.[0][104]=103
-.[0][105]=104
-.[0][106]=105
-.[0][107]=106
-.[0][108]=107
-.[0][109]=108
-.[0][110]=109
-.[0][111]=110
-.[0][112]=111
-.[0][113]=112
-.[0][114]=113
-.[0][115]=114
-.[0][116]=115
-.[0][117]=116
-.[0][118]=117
-.[0][119]=118
-.[0][120]=119
-.[0][121]=120
-.[0][122]=121
-.[0][123]=122
-.[0][124]=123
-.[0][125]=124
-.[0][126]=125
-.[0][127]=126
-.[0][128]=127
-.[0][129]=128
-.[0][130]=129
-.[0][131]=130
-.[0][132]=131
-.[0][133]=132
-.[0][134]=133
-.[0][135]=134
-.[0][136]=135
-.[0][137]=136
-.[0][138]=137
-.[0][139]=138
-.[0][140]=139
-.[0][141]=140
-.[0][142]=141
-.[0][143]=142
-.[0][144]=143
-.[0][145]=144
-.[0][146]=145
-.[0][147]=146
-.[0][148]=147
-.[0][149]=148
-.[0][150]=149
-.[0][151]=150
-.[0][152]=151
-.[0][153]=152
-.[0][154]=153
-.[0][155]=154
-.[0][156]=155
-.[0][157]=156
-.[0][158]=157
-.[0][159]=158
-.[0][160]=159
-.[0][161]=160
-.[0][162]=161
-.[0][163]=162
-.[0][164]=163
-.[0][165]=164
-.[0][166]=165
-.[0][167]=166
-.[0][168]=167
-.[0][169]=168
-.[0][170]=169
-.[0][171]=170
-.[0][172]=171
-.[0][173]=172
-.[0][174]=173
-.[0][175]=174
-.[0][176]=175
-.[0][177]=176
-.[0][178]=177
-.[0][179]=178
-.[0][180]=179
-.[0][181]=180
-.[0][182]=181
-.[0][183]=182
-.[0][184]=183
-.[0][185]=184
-.[0][186]=185
-.[0][187]=186
-.[0][188]=187
-.[0][189]=188
-.[0][190]=189
-.[0][191]=190
-.[0][192]=191
-.[0][193]=192
-.[0][194]=193
-.[0][195]=194
-.[0][196]=195
-.[0][197]=196
-.[0][198]=197
-.[0][199]=198
-.[0][200]=199
-.[0][201]=200
-.[0][202]=201
-.[0][203]=202
-.[0][204]=203
-.[0][205]=204
-.[0][206]=205
-.[0][207]=206
-.[0][208]=207
-.[0][209]=208
-.[0][210]=209
-.[0][211]=210
-.[0][212]=211
-.[0][213]=212
-.[0][214]=213
-.[0][215]=214
-.[0][216]=215
-.[0][217]=216
-.[0][218]=217
-.[0][219]=218
-.[0][220]=219
-.[0][221]=220
-.[0][222]=221
-.[0][223]=222
-.[0][224]=223
-.[0][225]=224
-.[0][226]=225
-.[0][227]=226
-.[0][228]=227
-.[0][229]=228
-.[0][230]=229
-.[0][231]=230
-.[0][232]=231
-.[0][233]=232
-.[0][234]=233
-.[0][235]=234
-.[0][236]=235
-.[0][237]=236
-.[0][238]=237
-.[0][239]=238
-.[0][240]=239
-.[0][241]=240
-.[0][242]=241
-.[0][243]=242
-.[0][244]=243
-.[0][245]=244
-.[0][246]=245
-.[0][247]=246
-.[0][248]=247
-.[0][249]=248
-.[0][250]=249
-.[0][251]=250
-.[0][252]=251
-.[0][253]=252
-.[0][254]=253
-.[0][255]=254
-.[0][256]=255
-.[0][257]=256
-.[0][258]=257
-.[0][259]=258
-.[0][260]=259
-.[0][261]=260
-.[0][262]=261
-.[0][263]=262
-.[0][264]=263
-.[0][265]=264
-.[0][266]=265
-.[0][267]=266
-.[0][268]=267
-.[0][269]=268
-.[0][270]=269
-.[0][271]=270
-.[0][272]=271
-.[0][273]=272
-.[0][274]=273
-.[0][275]=274
-.[0][276]=275
-.[0][277]=276
-.[0][278]=277
-.[0][279]=278
-.[0][280]=279
-.[0][281]=280
-.[0][282]=281
-.[0][283]=282
-.[0][284]=283
-.[0][285]=284
-.[0][286]=285
-.[0][287]=286
-.[0][288]=287
-.[0][289]=288
-.[0][290]=289
-.[0][291]=290
-.[0][292]=291
-.[0][293]=292
-.[0][294]=293
-.[0][295]=294
-.[0][296]=295
-.[0][297]=296
-.[0][298]=297
-.[0][299]=298
-.[0][300]=299
-.[0][301]=300
-.[0][302]=301
-.[0][303]=302
-.[0][304]=303
-.[0][305]=304
-.[0][306]=305
-.[0][307]=306
-.[0][308]=307
-.[0][309]=308
-.[0][310]=309
-.[0][311]=310
-.[0][312]=311
-.[0][313]=312
-.[0][314]=313
-.[0][315]=314
-.[0][316]=315
-.[0][317]=316
-.[0][318]=317
-.[0][319]=318
-.[0][320]=319
-.[0][321]=320
-.[0][322]=321
-.[0][323]=322
-.[0][324]=323
-.[0][325]=324
-.[0][326]=325
-.[0][327]=326
-.[0][328]=327
-.[0][329]=328
-.[0][330]=329
-.[0][331]=330
-.[0][332]=331
-.[0][333]=332
-.[0][334]=333
-.[0][335]=334
-.[0][336]=335
-.[0][337]=336
-.[0][338]=337
-.[0][339]=338
-.[0][340]=339
-.[0][341]=340
-.[0][342]=341
-.[0][343]=342
-.[0][344]=343
-.[0][345]=344
-.[0][346]=345
-.[0][347]=346
-.[0][348]=347
-.[0][349]=348
-.[0][350]=349
-.[0][351]=350
-.[0][352]=351
-.[0][353]=352
-.[0][354]=353
-.[0][355]=354
-.[0][356]=355
-.[0][357]=356
-.[0][358]=357
-.[0][359]=358
-.[0][360]=359
-.[0][361]=360
-.[0][362]=361
-.[0][363]=362
-.[0][364]=363
-.[0][365]=364
-.[0][366]=365
-.[0][367]=366
-.[0][368]=367
-.[0][369]=368
-.[0][370]=369
-.[0][371]=370
-.[0][372]=371
-.[0][373]=372
-.[0][374]=373
-.[0][375]=374
-.[0][376]=375
-.[0][377]=376
-.[0][378]=377
-.[0][379]=378
-.[0][380]=379
-.[0][381]=380
-.[0][382]=381
-.[0][383]=382
-.[0][384]=383
-.[0][385]=384
-.[0][386]=385
-.[0][387]=386
-.[0][388]=387
-.[0][389]=388
-.[0][390]=389
-.[0][391]=390
-.[0][392]=391
-.[0][393]=392
-.[0][394]=393
-.[0][395]=394
-.[0][396]=395
-.[0][397]=396
-.[0][398]=397
-.[0][399]=398
-.[0][400]=399
-.[0][401]=400
-.[0][402]=401
-.[0][403]=402
-.[0][404]=403
-.[0][405]=404
-.[0][406]=405
-.[0][407]=406
-.[0][408]=407
-.[0][409]=408
-.[0][410]=409
-.[0][411]=410
-.[0][412]=411
-.[0][413]=412
-.[0][414]=413
-.[0][415]=414
-.[0][416]=415
-.[0][417]=416
-.[0][418]=417
-.[0][419]=418
-.[0][420]=419
-.[0][421]=420
-.[0][422]=421
-.[0][423]=422
-.[0][424]=423
-.[0][425]=424
-.[0][426]=425
-.[0][427]=426
-.[0][428]=427
-.[0][429]=428
-.[0][430]=429
-.[0][431]=430
-.[0][432]=431
-.[0][433]=432
-.[0][434]=433
-.[0][435]=434
-.[0][436]=435
-.[0][437]=436
-.[0][438]=437
-.[0][439]=438
-.[0][440]=439
-.[0][441]=440
-.[0][442]=441
-.[0][443]=442
-.[0][444]=443
-.[0][445]=444
-.[0][446]=445
-.[0][447]=446
-.[0][448]=447
-.[0][449]=448
-.[0][450]=449
-.[0][451]=450
-.[0][452]=451
-.[0][453]=452
-.[0][454]=453
-.[0][455]=454
-.[0][456]=455
-.[0][457]=456
-.[0][458]=457
-.[0][459]=458
-.[0][460]=459
-.[0][461]=460
-.[0][462]=461
-.[0][463]=462
-.[0][464]=463
-.[0][465]=464
-.[0][466]=465
-.[0][467]=466
-.[0][468]=467
-.[0][469]=468
-.[0][470]=469
-.[0][471]=470
-.[0][472]=471
-.[0][473]=472
-.[0][474]=473
-.[0][475]=474
-.[0][476]=475
-.[0][477]=476
-.[0][478]=477
-.[0][479]=478
-.[0][480]=479
-.[0][481]=480
-.[0][482]=481
-.[0][483]=482
-.[0][484]=483
-.[0][485]=484
-.[0][486]=485
-.[0][487]=486
-.[0][488]=487
-.[0][489]=488
-.[0][490]=489
-.[0][491]=490
-.[0][492]=491
-.[0][493]=492
-.[0][494]=493
-.[0][495]=494
-.[0][496]=495
-.[0][497]=496
-.[0][498]=497
-.[0][499]=498
-.[0][500]=499
-.[0][501]=500
-.[0][502]=501
-.[0][503]=502
-.[0][504]=503
-.[0][505]=504
-.[0][506]=505
-.[0][507]=506
-.[0][508]=507
-.[0][509]=508
-.[0][510]=509
-.[0][511]=510
-.[0][512]=511
-.[0][513]=512
-.[0][514]=513
-.[0][515]=514
-.[0][516]=515
-.[0][517]=516
-.[0][518]=517
-.[0][519]=518
-.[0][520]=519
-.[0][521]=520
-.[0][522]=521
-.[0][523]=522
-.[0][524]=523
-.[0][525]=524
-.[0][526]=525
-.[0][527]=526
-.[0][528]=527
-.[0][529]=528
-.[0][530]=529
-.[0][531]=530
-.[0][532]=531
-.[0][533]=532
-.[0][534]=533
-.[0][535]=534
-.[0][536]=535
-.[0][537]=536
-.[0][538]=537
-.[0][539]=538
-.[0][540]=539
-.[0][541]=540
-.[0][542]=541
-.[0][543]=542
-.[0][544]=543
-.[0][545]=544
-.[0][546]=545
-.[0][547]=546
-.[0][548]=547
-.[0][549]=548
-.[0][550]=549
-.[0][551]=550
-.[0][552]=551
-.[0][553]=552
-.[0][554]=553
-.[0][555]=554
-.[0][556]=555
-.[0][557]=556
-.[0][558]=557
-.[0][559]=558
-.[0][560]=559
-.[0][561]=560
-.[0][562]=561
-.[0][563]=562
-.[0][564]=563
-.[0][565]=564
-.[0][566]=565
-.[0][567]=566
-.[0][568]=567
-.[0][569]=568
-.[0][570]=569
-.[0][571]=570
-.[0][572]=571
-.[0][573]=572
-.[0][574]=573
-.[0][575]=574
-.[0][576]=575
-.[0][577]=576
-.[0][578]=577
-.[0][579]=578
-.[0][580]=579
-.[0][581]=580
-.[0][582]=581
-.[0][583]=582
-.[0][584]=583
-.[0][585]=584
-.[0][586]=585
-.[0][587]=586
-.[0][588]=587
-.[0][589]=588
-.[0][590]=589
-.[0][591]=590
-.[0][592]=591
-.[0][593]=592
-.[0][594]=593
-.[0][595]=594
-.[0][596]=595
-.[0][597]=596
-.[0][598]=597
-.[0][599]=598
-.[0][600]=599
-.[0][601]=600
-.[0][602]=601
-.[0][603]=602
-.[0][604]=603
-.[0][605]=604
-.[0][606]=605
-.[0][607]=606
-.[0][608]=607
-.[0][609]=608
-.[0][610]=609
-.[0][611]=610
-.[0][612]=611
-.[0][613]=612
-.[0][614]=613
-.[0][615]=614
-.[0][616]=615
-.[0][617]=616
-.[0][618]=617
-.[0][619]=618
-.[0][620]=619
-.[0][621]=620
-.[0][622]=621
-.[0][623]=622
-.[0][624]=623
-.[0][625]=624
-.[0][626]=625
-.[0][627]=626
-.[0][628]=627
-.[0][629]=628
-.[0][630]=629
-.[0][631]=630
-.[0][632]=631
-.[0][633]=632
-.[0][634]=633
-.[0][635]=634
-.[0][636]=635
-.[0][637]=636
-.[0][638]=637
-.[0][639]=638
-.[0][640]=639
-.[0][641]=640
-.[0][642]=641
-.[0][643]=642
-.[0][644]=643
-.[0][645]=644
-.[0][646]=645
-.[0][647]=646
-.[0][648]=647
-.[0][649]=648
-.[0][650]=649
-.[0][651]=650
-.[0][652]=651
-.[0][653]=652
-.[0][654]=653
-.[0][655]=654
-.[0][656]=655
-.[0][657]=656
-.[0][658]=657
-.[0][659]=658
-.[0][660]=659
-.[0][661]=660
-.[0][662]=661
-.[0][663]=662
-.[0][664]=663
-.[0][665]=664
-.[0][666]=665
-.[0][667]=666
-.[0][668]=667
-.[0][669]=668
-.[0][670]=669
-.[0][671]=670
-.[0][672]=671
-.[0][673]=672
-.[0][674]=673
-.[0][675]=674
-.[0][676]=675
-.[0][677]=676
-.[0][678]=677
-.[0][679]=678
-.[0][680]=679
-.[0][681]=680
-.[0][682]=681
-.[0][683]=682
-.[0][684]=683
-.[0][685]=684
-.[0][686]=685
-.[0][687]=686
-.[0][688]=687
-.[0][689]=688
-.[0][690]=689
-.[0][691]=690
-.[0][692]=691
-.[0][693]=692
-.[0][694]=693
-.[0][695]=694
-.[0][696]=695
-.[0][697]=696
-.[0][698]=697
-.[0][699]=698
-.[0][700]=699
-.[0][701]=700
-.[0][702]=701
-.[0][703]=702
-.[0][704]=703
-.[0][705]=704
-.[0][706]=705
-.[0][707]=706
-.[0][708]=707
-.[0][709]=708
-.[0][710]=709
-.[0][711]=710
-.[0][712]=711
-.[0][713]=712
-.[0][714]=713
-.[0][715]=714
-.[0][716]=715
-.[0][717]=716
-.[0][718]=717
-.[0][719]=718
-.[0][720]=719
-.[0][721]=720
-.[0][722]=721
-.[0][723]=722
-.[0][724]=723
-.[0][725]=724
-.[0][726]=725
-.[0][727]=726
-.[0][728]=727
-.[0][729]=728
-.[0][730]=729
-.[0][731]=730
-.[0][732]=731
-.[0][733]=732
-.[0][734]=733
-.[0][735]=734
-.[0][736]=735
-.[0][737]=736
-.[0][738]=737
-.[0][739]=738
-.[0][740]=739
-.[0][741]=740
-.[0][742]=741
-.[0][743]=742
-.[0][744]=743
-.[0][745]=744
-.[0][746]=745
-.[0][747]=746
-.[0][748]=747
-.[0][749]=748
-.[0][750]=749
-.[0][751]=750
-.[0][752]=751
-.[0][753]=752
-.[0][754]=753
-.[0][755]=754
-.[0][756]=755
-.[0][757]=756
-.[0][758]=757
-.[0][759]=758
-.[0][760]=759
-.[0][761]=760
-.[0][762]=761
-.[0][763]=762
-.[0][764]=763
-.[0][765]=764
-.[0][766]=765
-.[0][767]=766
-.[0][768]=767
-.[0][769]=768
-.[0][770]=769
-.[0][771]=770
-.[0][772]=771
-.[0][773]=772
-.[0][774]=773
-.[0][775]=774
-.[0][776]=775
-.[0][777]=776
-.[0][778]=777
-.[0][779]=778
-.[0][780]=779
-.[0][781]=780
-.[0][782]=781
-.[0][783]=782
-.[0][784]=783
-.[0][785]=784
-.[0][786]=785
-.[0][787]=786
-.[0][788]=787
-.[0][789]=788
-.[0][790]=789
-.[0][791]=790
-.[0][792]=791
-.[0][793]=792
-.[0][794]=793
-.[0][795]=794
-.[0][796]=795
-.[0][797]=796
-.[0][798]=797
-.[0][799]=798
-.[0][800]=799
-.[0][801]=800
-.[0][802]=801
-.[0][803]=802
-.[0][804]=803
-.[0][805]=804
-.[0][806]=805
-.[0][807]=806
-.[0][808]=807
-.[0][809]=808
-.[0][810]=809
-.[0][811]=810
-.[0][812]=811
-.[0][813]=812
-.[0][814]=813
-.[0][815]=814
-.[0][816]=815
-.[0][817]=816
-.[0][818]=817
-.[0][819]=818
-.[0][820]=819
-.[0][821]=820
-.[0][822]=821
-.[0][823]=822
-.[0][824]=823
-.[0][825]=824
-.[0][826]=825
-.[0][827]=826
-.[0][828]=827
-.[0][829]=828
-.[0][830]=829
-.[0][831]=830
-.[0][832]=831
-.[0][833]=832
-.[0][834]=833
-.[0][835]=834
-.[0][836]=835
-.[0][837]=836
-.[0][838]=837
-.[0][839]=838
-.[0][840]=839
-.[0][841]=840
-.[0][842]=841
-.[0][843]=842
-.[0][844]=843
-.[0][845]=844
-.[0][846]=845
-.[0][847]=846
-.[0][848]=847
-.[0][849]=848
-.[0][850]=849
-.[0][851]=850
-.[0][852]=851
-.[0][853]=852
-.[0][854]=853
-.[0][855]=854
-.[0][856]=855
-.[0][857]=856
-.[0][858]=857
-.[0][859]=858
-.[0][860]=859
-.[0][861]=860
-.[0][862]=861
-.[0][863]=862
-.[0][864]=863
-.[0][865]=864
-.[0][866]=865
-.[0][867]=866
-.[0][868]=867
-.[0][869]=868
-.[0][870]=869
-.[0][871]=870
-.[0][872]=871
-.[0][873]=872
-.[0][874]=873
-.[0][875]=874
-.[0][876]=875
-.[0][877]=876
-.[0][878]=877
-.[0][879]=878
-.[0][880]=879
-.[0][881]=880
-.[0][882]=881
-.[0][883]=882
-.[0][884]=883
-.[0][885]=884
-.[0][886]=885
-.[0][887]=886
-.[0][888]=887
-.[0][889]=888
-.[0][890]=889
-.[0][891]=890
-.[0][892]=891
-.[0][893]=892
-.[0][894]=893
-.[0][895]=894
-.[0][896]=895
-.[0][897]=896
-.[0][898]=897
-.[0][899]=898
-.[0][900]=899
-.[0][901]=900
-.[0][902]=901
-.[0][903]=902
-.[0][904]=903
-.[0][905]=904
-.[0][906]=905
-.[0][907]=906
-.[0][908]=907
-.[0][909]=908
-.[0][910]=909
-.[0][911]=910
-.[0][912]=911
-.[0][913]=912
-.[0][914]=913
-.[0][915]=914
-.[0][916]=915
-.[0][917]=916
-.[0][918]=917
-.[0][919]=918
-.[0][920]=919
-.[0][921]=920
-.[0][922]=921
-.[0][923]=922
-.[0][924]=923
-.[0][925]=924
-.[0][926]=925
-.[0][927]=926
-.[0][928]=927
-.[0][929]=928
-.[0][930]=929
-.[0][931]=930
-.[0][932]=931
-.[0][933]=932
-.[0][934]=933
-.[0][935]=934
-.[0][936]=935
-.[0][937]=936
-.[0][938]=937
-.[0][939]=938
-.[0][940]=939
-.[0][941]=940
-.[0][942]=941
-.[0][943]=942
-.[0][944]=943
-.[0][945]=944
-.[0][946]=945
-.[0][947]=946
-.[0][948]=947
-.[0][949]=948
-.[0][950]=949
-.[0][951]=950
-.[0][952]=951
-.[0][953]=952
-.[0][954]=953
-.[0][955]=954
-.[0][956]=955
-.[0][957]=956
-.[0][958]=957
-.[0][959]=958
-.[0][960]=959
-.[0][961]=960
-.[0][962]=961
-.[0][963]=962
-.[0][964]=963
-.[0][965]=964
-.[0][966]=965
-.[0][967]=966
-.[0][968]=967
-.[0][969]=968
-.[0][970]=969
-.[0][971]=970
-.[0][972]=971
-.[0][973]=972
-.[0][974]=973
-.[0][975]=974
-.[0][976]=975
-.[0][977]=976
-.[0][978]=977
-.[0][979]=978
-.[0][980]=979
-.[0][981]=980
-.[0][982]=981
-.[0][983]=982
-.[0][984]=983
-.[0][985]=984
-.[0][986]=985
-.[0][987]=986
-.[0][988]=987
-.[0][989]=988
-.[0][990]=989
-.[0][991]=990
-.[0][992]=991
-.[0][993]=992
-.[0][994]=993
-.[0][995]=994
-.[0][996]=995
-.[0][997]=996
-.[0][998]=997
-.[0][999]=998
-.[0][1000]=999
-.[0][1001]=1000
-.[0][1002]=1001
-.[0][1003]=1002
-.[0][1004]=1003
-.[0][1005]=1004
-.[0][1006]=1005
-.[0][1007]=1006
-.[0][1008]=1007
-.[0][1009]=1008
-.[0][1010]=1009
-.[0][1011]=1010
-.[0][1012]=1011
-.[0][1013]=1012
-.[0][1014]=1013
-.[0][1015]=1014
-.[0][1016]=1015
-.[0][1017]=1016
-.[0][1018]=1017
-.[0][1019]=1018
-.[0][1020]=1019
-.[0][1021]=1020
-.[0][1022]=1021
-.[0][1023]=1022
-.[0][1024]=1023
-.[0][1025]=1024
-.[0][1026]=1025
-.[0][1027]=1026
-.[0][1028]=1027
-.[0][1029]=1028
-.[0][1030]=1029
-.[0][1031]=1030
-.[0][1032]=1031
-.[0][1033]=1032
-.[0][1034]=1033
-.[0][1035]=1034
-.[0][1036]=1035
-.[0][1037]=1036
-.[0][1038]=1037
-.[0][1039]=1038
-.[0][1040]=1039
-.[0][1041]=1040
-.[0][1042]=1041
-.[0][1043]=1042
-.[0][1044]=1043
-.[0][1045]=1044
-.[0][1046]=1045
-.[0][1047]=1046
-.[0][1048]=1047
-.[0][1049]=1048
-.[0][1050]=1049
-.[0][1051]=1050
-.[0][1052]=1051
-.[0][1053]=1052
-.[0][1054]=1053
-.[0][1055]=1054
-.[0][1056]=1055
-.[0][1057]=1056
-.[0][1058]=1057
-.[0][1059]=1058
-.[0][1060]=1059
-.[0][1061]=1060
-.[0][1062]=1061
-.[0][1063]=1062
-.[0][1064]=1063
-.[0][1065]=1064
-.[0][1066]=1065
-.[0][1067]=1066
-.[0][1068]=1067
-.[0][1069]=1068
-.[0][1070]=1069
-.[0][1071]=1070
-.[0][1072]=1071
-.[0][1073]=1072
-.[0][1074]=1073
-.[0][1075]=1074
-.[0][1076]=1075
-.[0][1077]=1076
-.[0][1078]=1077
-.[0][1079]=1078
-.[0][1080]=1079
-.[0][1081]=1080
-.[0][1082]=1081
-.[0][1083]=1082
-.[0][1084]=1083
-.[0][1085]=1084
-.[0][1086]=1085
-.[0][1087]=1086
-.[0][1088]=1087
-.[0][1089]=1088
-.[0][1090]=1089
-.[0][1091]=1090
-.[0][1092]=1091
-.[0][1093]=1092
-.[0][1094]=1093
-.[0][1095]=1094
-.[0][1096]=1095
-.[0][1097]=1096
-.[0][1098]=1097
-.[0][1099]=1098
-.[0][1100]=1099
-.[0][1101]=1100
-.[0][1102]=1101
-.[0][1103]=1102
-.[0][1104]=1103
-.[0][1105]=1104
-.[0][1106]=1105
-.[0][1107]=1106
-.[0][1108]=1107
-.[0][1109]=1108
-.[0][1110]=1109
-.[0][1111]=1110
-.[0][1112]=1111
-.[0][1113]=1112
-.[0][1114]=1113
-.[0][1115]=1114
-.[0][1116]=1115
-.[0][1117]=1116
-.[0][1118]=1117
-.[0][1119]=1118
-.[0][1120]=1119
-.[0][1121]=1120
-.[0][1122]=1121
-.[0][1123]=1122
-.[0][1124]=1123
-.[0][1125]=1124
-.[0][1126]=1125
-.[0][1127]=1126
-.[0][1128]=1127
-.[0][1129]=1128
-.[0][1130]=1129
-.[0][1131]=1130
-.[0][1132]=1131
-.[0][1133]=1132
-.[0][1134]=1133
-.[0][1135]=1134
-.[0][1136]=1135
-.[0][1137]=1136
-.[0][1138]=1137
-.[0][1139]=1138
-.[0][1140]=1139
-.[0][1141]=1140
-.[0][1142]=1141
-.[0][1143]=1142
-.[0][1144]=1143
-.[0][1145]=1144
-.[0][1146]=1145
-.[0][1147]=1146
-.[0][1148]=1147
-.[0][1149]=1148
-.[0][1150]=1149
-.[0][1151]=1150
-.[0][1152]=1151
-.[0][1153]=1152
-.[0][1154]=1153
-.[0][1155]=1154
-.[0][1156]=1155
-.[0][1157]=1156
-.[0][1158]=1157
-.[0][1159]=1158
-.[0][1160]=1159
-.[0][1161]=1160
-.[0][1162]=1161
-.[0][1163]=1162
-.[0][1164]=1163
-.[0][1165]=1164
-.[0][1166]=1165
-.[0][1167]=1166
-.[0][1168]=1167
-.[0][1169]=1168
-.[0][1170]=1169
-.[0][1171]=1170
-.[0][1172]=1171
-.[0][1173]=1172
-.[0][1174]=1173
-.[0][1175]=1174
-.[0][1176]=1175
-.[0][1177]=1176
-.[0][1178]=1177
-.[0][1179]=1178
-.[0][1180]=1179
-.[0][1181]=1180
-.[0][1182]=1181
-.[0][1183]=1182
-.[0][1184]=1183
-.[0][1185]=1184
-.[0][1186]=1185
-.[0][1187]=1186
-.[0][1188]=1187
-.[0][1189]=1188
-.[0][1190]=1189
-.[0][1191]=1190
-.[0][1192]=1191
-.[0][1193]=1192
-.[0][1194]=1193
-.[0][1195]=1194
-.[0][1196]=1195
-.[0][1197]=1196
-.[0][1198]=1197
-.[0][1199]=1198
-.[0][1200]=1199
-.[0][1201]=1200
-.[0][1202]=1201
-.[0][1203]=1202
-.[0][1204]=1203
-.[0][1205]=1204
-.[0][1206]=1205
-.[0][1207]=1206
-.[0][1208]=1207
-.[0][1209]=1208
-.[0][1210]=1209
-.[0][1211]=1210
-.[0][1212]=1211
-.[0][1213]=1212
-.[0][1214]=1213
-.[0][1215]=1214
-.[0][1216]=1215
-.[0][1217]=1216
-.[0][1218]=1217
-.[0][1219]=1218
-.[0][1220]=1219
-.[0][1221]=1220
-.[0][1222]=1221
-.[0][1223]=1222
-.[0][1224]=1223
-.[0][1225]=1224
-.[0][1226]=1225
-.[0][1227]=1226
-.[0][1228]=1227
-.[0][1229]=1228
-.[0][1230]=1229
-.[0][1231]=1230
-.[0][1232]=1231
-.[0][1233]=1232
-.[0][1234]=1233
-.[0][1235]=1234
-.[0][1236]=1235
-.[0][1237]=1236
-.[0][1238]=1237
-.[0][1239]=1238
-.[0][1240]=1239
-.[0][1241]=1240
-.[0][1242]=1241
-.[0][1243]=1242
-.[0][1244]=1243
-.[0][1245]=1244
-.[0][1246]=1245
-.[0][1247]=1246
-.[0][1248]=1247
-.[0][1249]=1248
-.[0][1250]=1249
-.[0][1251]=1250
-.[0][1252]=1251
-.[0][1253]=1252
-.[0][1254]=1253
-.[0][1255]=1254
-.[0][1256]=1255
-.[0][1257]=1256
-.[0][1258]=1257
-.[0][1259]=1258
-.[0][1260]=1259
-.[0][1261]=1260
-.[0][1262]=1261
-.[0][1263]=1262
-.[0][1264]=1263
-.[0][1265]=1264
-.[0][1266]=1265
-.[0][1267]=1266
-.[0][1268]=1267
-.[0][1269]=1268
-.[0][1270]=1269
-.[0][1271]=1270
-.[0][1272]=1271
-.[0][1273]=1272
-.[0][1274]=1273
-.[0][1275]=1274
-.[0][1276]=1275
-.[0][1277]=1276
-.[0][1278]=1277
-.[0][1279]=1278
-.[0][1280]=1279
-.[0][1281]=1280
-.[0][1282]=1281
-.[0][1283]=1282
-.[0][1284]=1283
-.[0][1285]=1284
-.[0][1286]=1285
-.[0][1287]=1286
-.[0][1288]=1287
-.[0][1289]=1288
-.[0][1290]=1289
-.[0][1291]=1290
-.[0][1292]=1291
-.[0][1293]=1292
-.[0][1294]=1293
-.[0][1295]=1294
-.[0][1296]=1295
-.[0][1297]=1296
-.[0][1298]=1297
-.[0][1299]=1298
-.[0][1300]=1299
-.[0][1301]=1300
-.[0][1302]=1301
-.[0][1303]=1302
-.[0][1304]=1303
-.[0][1305]=1304
-.[0][1306]=1305
-.[0][1307]=1306
-.[0][1308]=1307
-.[0][1309]=1308
-.[0][1310]=1309
-.[0][1311]=1310
-.[0][1312]=1311
-.[0][1313]=1312
-.[0][1314]=1313
-.[0][1315]=1314
-.[0][1316]=1315
-.[0][1317]=1316
-.[0][1318]=1317
-.[0][1319]=1318
-.[0][1320]=1319
-.[0][1321]=1320
-.[0][1322]=1321
-.[0][1323]=1322
-.[0][1324]=1323
-.[0][1325]=1324
-.[0][1326]=1325
-.[0][1327]=1326
-.[0][1328]=1327
-.[0][1329]=1328
-.[0][1330]=1329
-.[0][1331]=1330
-.[0][1332]=1331
-.[0][1333]=1332
-.[0][1334]=1333
-.[0][1335]=1334
-.[0][1336]=1335
-.[0][1337]=1336
-.[0][1338]=1337
-.[0][1339]=1338
-.[0][1340]=1339
-.[0][1341]=1340
-.[0][1342]=1341
-.[0][1343]=1342
-.[0][1344]=1343
-.[0][1345]=1344
-.[0][1346]=1345
-.[0][1347]=1346
-.[0][1348]=1347
-.[0][1349]=1348
-.[0][1350]=1349
-.[0][1351]=1350
-.[0][1352]=1351
-.[0][1353]=1352
-.[0][1354]=1353
-.[0][1355]=1354
-.[0][1356]=1355
-.[0][1357]=1356
-.[0][1358]=1357
-.[0][1359]=1358
-.[0][1360]=1359
-.[0][1361]=1360
-.[0][1362]=1361
-.[0][1363]=1362
-.[0][1364]=1363
-.[0][1365]=1364
-.[0][1366]=1365
-.[0][1367]=1366
-.[0][1368]=1367
-.[0][1369]=1368
-.[0][1370]=1369
-.[0][1371]=1370
-.[0][1372]=1371
-.[0][1373]=1372
-.[0][1374]=1373
-.[0][1375]=1374
-.[0][1376]=1375
-.[0][1377]=1376
-.[0][1378]=1377
-.[0][1379]=1378
-.[0][1380]=1379
-.[0][1381]=1380
-.[0][1382]=1381
-.[0][1383]=1382
-.[0][1384]=1383
-.[0][1385]=1384
-.[0][1386]=1385
-.[0][1387]=1386
-.[0][1388]=1387
-.[0][1389]=1388
-.[0][1390]=1389
-.[0][1391]=1390
-.[0][1392]=1391
-.[0][1393]=1392
-.[0][1394]=1393
-.[0][1395]=1394
-.[0][1396]=1395
-.[0][1397]=1396
-.[0][1398]=1397
-.[0][1399]=1398
-.[0][1400]=1399
-.[0][1401]=1400
-.[0][1402]=1401
-.[0][1403]=1402
-.[0][1404]=1403
-.[0][1405]=1404
-.[0][1406]=1405
-.[0][1407]=1406
-.[0][1408]=1407
-.[0][1409]=1408
-.[0][1410]=1409
-.[0][1411]=1410
-.[0][1412]=1411
-.[0][1413]=1412
-.[0][1414]=1413
-.[0][1415]=1414
-.[0][1416]=1415
-.[0][1417]=1416
-.[0][1418]=1417
-.[0][1419]=1418
-.[0][1420]=1419
-.[0][1421]=1420
-.[0][1422]=1421
-.[0][1423]=1422
-.[0][1424]=1423
-.[0][1425]=1424
-.[0][1426]=1425
-.[0][1427]=1426
-.[0][1428]=1427
-.[0][1429]=1428
-.[0][1430]=1429
-.[0][1431]=1430
-.[0][1432]=1431
-.[0][1433]=1432
-.[0][1434]=1433
-.[0][1435]=1434
-.[0][1436]=1435
-.[0][1437]=1436
-.[0][1438]=1437
-.[0][1439]=1438
-.[0][1440]=1439
-.[0][1441]=1440
-.[0][1442]=1441
-.[0][1443]=1442
-.[0][1444]=1443
-.[0][1445]=1444
-.[0][1446]=1445
-.[0][1447]=1446
-.[0][1448]=1447
-.[0][1449]=1448
-.[0][1450]=1449
-.[0][1451]=1450
-.[0][1452]=1451
-.[0][1453]=1452
-.[0][1454]=1453
-.[0][1455]=1454
-.[0][1456]=1455
-.[0][1457]=1456
-.[0][1458]=1457
-.[0][1459]=1458
-.[0][1460]=1459
-.[0][1461]=1460
-.[0][1462]=1461
-.[0][1463]=1462
-.[0][1464]=1463
-.[0][1465]=1464
-.[0][1466]=1465
-.[0][1467]=1466
-.[0][1468]=1467
-.[0][1469]=1468
-.[0][1470]=1469
-.[0][1471]=1470
-.[0][1472]=1471
-.[0][1473]=1472
-.[0][1474]=1473
-.[0][1475]=1474
-.[0][1476]=1475
-.[0][1477]=1476
-.[0][1478]=1477
-.[0][1479]=1478
-.[0][1480]=1479
-.[0][1481]=1480
-.[0][1482]=1481
-.[0][1483]=1482
-.[0][1484]=1483
-.[0][1485]=1484
-.[0][1486]=1485
-.[0][1487]=1486
-.[0][1488]=1487
-.[0][1489]=1488
-.[0][1490]=1489
-.[0][1491]=1490
-.[0][1492]=1491
-.[0][1493]=1492
-.[0][1494]=1493
-.[0][1495]=1494
-.[0][1496]=1495
-.[0][1497]=1496
-.[0][1498]=1497
-.[0][1499]=1498
-.[0][1500]=1499
-.[0][1501]=1500
-.[0][1502]=1501
-.[0][1503]=1502
-.[0][1504]=1503
-.[0][1505]=1504
-.[0][1506]=1505
-.[0][1507]=1506
-.[0][1508]=1507
-.[0][1509]=1508
-.[0][1510]=1509
-.[0][1511]=1510
-.[0][1512]=1511
-.[0][1513]=1512
-.[0][1514]=1513
-.[0][1515]=1514
-.[0][1516]=1515
-.[0][1517]=1516
-.[0][1518]=1517
-.[0][1519]=1518
-.[0][1520]=1519
-.[0][1521]=1520
-.[0][1522]=1521
-.[0][1523]=1522
-.[0][1524]=1523
-.[0][1525]=1524
-.[0][1526]=1525
-.[0][1527]=1526
-.[0][1528]=1527
-.[0][1529]=1528
-.[0][1530]=1529
-.[0][1531]=1530
-.[0][1532]=1531
-.[0][1533]=1532
-.[0][1534]=1533
-.[0][1535]=1534
-.[0][1536]=1535
-.[0][1537]=1536
-.[0][1538]=1537
-.[0][1539]=1538
-.[0][1540]=1539
-.[0][1541]=1540
-.[0][1542]=1541
-.[0][1543]=1542
-.[0][1544]=1543
-.[0][1545]=1544
-.[0][1546]=1545
-.[0][1547]=1546
-.[0][1548]=1547
-.[0][1549]=1548
-.[0][1550]=1549
-.[0][1551]=1550
-.[0][1552]=1551
-.[0][1553]=1552
-.[0][1554]=1553
-.[0][1555]=1554
-.[0][1556]=1555
-.[0][1557]=1556
-.[0][1558]=1557
-.[0][1559]=1558
-.[0][1560]=1559
-.[0][1561]=1560
-.[0][1562]=1561
-.[0][1563]=1562
-.[0][1564]=1563
-.[0][1565]=1564
-.[0][1566]=1565
-.[0][1567]=1566
-.[0][1568]=1567
-.[0][1569]=1568
-.[0][1570]=1569
-.[0][1571]=1570
-.[0][1572]=1571
-.[0][1573]=1572
-.[0][1574]=1573
-.[0][1575]=1574
-.[0][1576]=1575
-.[0][1577]=1576
-.[0][1578]=1577
-.[0][1579]=1578
-.[0][1580]=1579
-.[0][1581]=1580
-.[0][1582]=1581
-.[0][1583]=1582
-.[0][1584]=1583
-.[0][1585]=1584
-.[0][1586]=1585
-.[0][1587]=1586
-.[0][1588]=1587
-.[0][1589]=1588
-.[0][1590]=1589
-.[0][1591]=1590
-.[0][1592]=1591
-.[0][1593]=1592
-.[0][1594]=1593
-.[0][1595]=1594
-.[0][1596]=1595
-.[0][1597]=1596
-.[0][1598]=1597
-.[0][1599]=1598
-.[0][1600]=1599
-.[0][1601]=1600
-.[0][1602]=1601
-.[0][1603]=1602
-.[0][1604]=1603
-.[0][1605]=1604
-.[0][1606]=1605
-.[0][1607]=1606
-.[0][1608]=1607
-.[0][1609]=1608
-.[0][1610]=1609
-.[0][1611]=1610
-.[0][1612]=1611
-.[0][1613]=1612
-.[0][1614]=1613
-.[0][1615]=1614
-.[0][1616]=1615
-.[0][1617]=1616
-.[0][1618]=1617
-.[0][1619]=1618
-.[0][1620]=1619
-.[0][1621]=1620
-.[0][1622]=1621
-.[0][1623]=1622
-.[0][1624]=1623
-.[0][1625]=1624
-.[0][1626]=1625
-.[0][1627]=1626
-.[0][1628]=1627
-.[0][1629]=1628
-.[0][1630]=1629
-.[0][1631]=1630
-.[0][1632]=1631
-.[0][1633]=1632
-.[0][1634]=1633
-.[0][1635]=1634
-.[0][1636]=1635
-.[0][1637]=1636
-.[0][1638]=1637
-.[0][1639]=1638
-.[0][1640]=1639
-.[0][1641]=1640
-.[0][1642]=1641
-.[0][1643]=1642
-.[0][1644]=1643
-.[0][1645]=1644
-.[0][1646]=1645
-.[0][1647]=1646
-.[0][1648]=1647
-.[0][1649]=1648
-.[0][1650]=1649
-.[0][1651]=1650
-.[0][1652]=1651
-.[0][1653]=1652
-.[0][1654]=1653
-.[0][1655]=1654
-.[0][1656]=1655
-.[0][1657]=1656
-.[0][1658]=1657
-.[0][1659]=1658
-.[0][1660]=1659
-.[0][1661]=1660
-.[0][1662]=1661
-.[0][1663]=1662
-.[0][1664]=1663
-.[0][1665]=1664
-.[0][1666]=1665
-.[0][1667]=1666
-.[0][1668]=1667
-.[0][1669]=1668
-.[0][1670]=1669
-.[0][1671]=1670
-.[0][1672]=1671
-.[0][1673]=1672
-.[0][1674]=1673
-.[0][1675]=1674
-.[0][1676]=1675
-.[0][1677]=1676
-.[0][1678]=1677
-.[0][1679]=1678
-.[0][1680]=1679
-.[0][1681]=1680
-.[0][1682]=1681
-.[0][1683]=1682
-.[0][1684]=1683
-.[0][1685]=1684
-.[0][1686]=1685
-.[0][1687]=1686
-.[0][1688]=1687
-.[0][1689]=1688
-.[0][1690]=1689
-.[0][1691]=1690
-.[0][1692]=1691
-.[0][1693]=1692
-.[0][1694]=1693
-.[0][1695]=1694
-.[0][1696]=1695
-.[0][1697]=1696
-.[0][1698]=1697
-.[0][1699]=1698
-.[0][1700]=1699
-.[0][1701]=1700
-.[0][1702]=1701
-.[0][1703]=1702
-.[0][1704]=1703
-.[0][1705]=1704
-.[0][1706]=1705
-.[0][1707]=1706
-.[0][1708]=1707
-.[0][1709]=1708
-.[0][1710]=1709
-.[0][1711]=1710
-.[0][1712]=1711
-.[0][1713]=1712
-.[0][1714]=1713
-.[0][1715]=1714
-.[0][1716]=1715
-.[0][1717]=1716
-.[0][1718]=1717
-.[0][1719]=1718
-.[0][1720]=1719
-.[0][1721]=1720
-.[0][1722]=1721
-.[0][1723]=1722
-.[0][1724]=1723
-.[0][1725]=1724
-.[0][1726]=1725
-.[0][1727]=1726
-.[0][1728]=1727
-.[0][1729]=1728
-.[0][1730]=1729
-.[0][1731]=1730
-.[0][1732]=1731
-.[0][1733]=1732
-.[0][1734]=1733
-.[0][1735]=1734
-.[0][1736]=1735
-.[0][1737]=1736
-.[0][1738]=1737
-.[0][1739]=1738
-.[0][1740]=1739
-.[0][1741]=1740
-.[0][1742]=1741
-.[0][1743]=1742
-.[0][1744]=1743
-.[0][1745]=1744
-.[0][1746]=1745
-.[0][1747]=1746
-.[0][1748]=1747
-.[0][1749]=1748
-.[0][1750]=1749
-.[0][1751]=1750
-.[0][1752]=1751
-.[0][1753]=1752
-.[0][1754]=1753
-.[0][1755]=1754
-.[0][1756]=1755
-.[0][1757]=1756
-.[0][1758]=1757
-.[0][1759]=1758
-.[0][1760]=1759
-.[0][1761]=1760
-.[0][1762]=1761
-.[0][1763]=1762
-.[0][1764]=1763
-.[0][1765]=1764
-.[0][1766]=1765
-.[0][1767]=1766
-.[0][1768]=1767
-.[0][1769]=1768
-.[0][1770]=1769
-.[0][1771]=1770
-.[0][1772]=1771
-.[0][1773]=1772
-.[0][1774]=1773
-.[0][1775]=1774
-.[0][1776]=1775
-.[0][1777]=1776
-.[0][1778]=1777
-.[0][1779]=1778
-.[0][1780]=1779
-.[0][1781]=1780
-.[0][1782]=1781
-.[0][1783]=1782
-.[0][1784]=1783
-.[0][1785]=1784
-.[0][1786]=1785
-.[0][1787]=1786
-.[0][1788]=1787
-.[0][1789]=1788
-.[0][1790]=1789
-.[0][1791]=1790
-.[0][1792]=1791
-.[0][1793]=1792
-.[0][1794]=1793
-.[0][1795]=1794
-.[0][1796]=1795
-.[0][1797]=1796
-.[0][1798]=1797
-.[0][1799]=1798
-.[0][1800]=1799
-.[0][1801]=1800
-.[0][1802]=1801
-.[0][1803]=1802
-.[0][1804]=1803
-.[0][1805]=1804
-.[0][1806]=1805
-.[0][1807]=1806
-.[0][1808]=1807
-.[0][1809]=1808
-.[0][1810]=1809
-.[0][1811]=1810
-.[0][1812]=1811
-.[0][1813]=1812
-.[0][1814]=1813
-.[0][1815]=1814
-.[0][1816]=1815
-.[0][1817]=1816
-.[0][1818]=1817
-.[0][1819]=1818
-.[0][1820]=1819
-.[0][1821]=1820
-.[0][1822]=1821
-.[0][1823]=1822
-.[0][1824]=1823
-.[0][1825]=1824
-.[0][1826]=1825
-.[0][1827]=1826
-.[0][1828]=1827
-.[0][1829]=1828
-.[0][1830]=1829
-.[0][1831]=1830
-.[0][1832]=1831
-.[0][1833]=1832
-.[0][1834]=1833
-.[0][1835]=1834
-.[0][1836]=1835
-.[0][1837]=1836
-.[0][1838]=1837
-.[0][1839]=1838
-.[0][1840]=1839
-.[0][1841]=1840
-.[0][1842]=1841
-.[0][1843]=1842
-.[0][1844]=1843
-.[0][1845]=1844
-.[0][1846]=1845
-.[0][1847]=1846
-.[0][1848]=1847
-.[0][1849]=1848
-.[0][1850]=1849
-.[0][1851]=1850
-.[0][1852]=1851
-.[0][1853]=1852
-.[0][1854]=1853
-.[0][1855]=1854
-.[0][1856]=1855
-.[0][1857]=1856
-.[0][1858]=1857
-.[0][1859]=1858
-.[0][1860]=1859
-.[0][1861]=1860
-.[0][1862]=1861
-.[0][1863]=1862
-.[0][1864]=1863
-.[0][1865]=1864
-.[0][1866]=1865
-.[0][1867]=1866
-.[0][1868]=1867
-.[0][1869]=1868
-.[0][1870]=1869
-.[0][1871]=1870
-.[0][1872]=1871
-.[0][1873]=1872
-.[0][1874]=1873
-.[0][1875]=1874
-.[0][1876]=1875
-.[0][1877]=1876
-.[0][1878]=1877
-.[0][1879]=1878
-.[0][1880]=1879
-.[0][1881]=1880
-.[0][1882]=1881
-.[0][1883]=1882
-.[0][1884]=1883
-.[0][1885]=1884
-.[0][1886]=1885
-.[0][1887]=1886
-.[0][1888]=1887
-.[0][1889]=1888
-.[0][1890]=1889
-.[0][1891]=1890
-.[0][1892]=1891
-.[0][1893]=1892
-.[0][1894]=1893
-.[0][1895]=1894
-.[0][1896]=1895
-.[0][1897]=1896
-.[0][1898]=1897
-.[0][1899]=1898
-.[0][1900]=1899
-.[0][1901]=1900
-.[0][1902]=1901
-.[0][1903]=1902
-.[0][1904]=1903
-.[0][1905]=1904
-.[0][1906]=1905
-.[0][1907]=1906
-.[0][1908]=1907
-.[0][1909]=1908
-.[0][1910]=1909
-.[0][1911]=1910
-.[0][1912]=1911
-.[0][1913]=1912
-.[0][1914]=1913
-.[0][1915]=1914
-.[0][1916]=1915
-.[0][1917]=1916
-.[0][1918]=1917
-.[0][1919]=1918
-.[0][1920]=1919
-.[0][1921]=1920
-.[0][1922]=1921
-.[0][1923]=1922
-.[0][1924]=1923
-.[0][1925]=1924
-.[0][1926]=1925
-.[0][1927]=1926
-.[0][1928]=1927
-.[0][1929]=1928
-.[0][1930]=1929
-.[0][1931]=1930
-.[0][1932]=1931
-.[0][1933]=1932
-.[0][1934]=1933
-.[0][1935]=1934
-.[0][1936]=1935
-.[0][1937]=1936
-.[0][1938]=1937
-.[0][1939]=1938
-.[0][1940]=1939
-.[0][1941]=1940
-.[0][1942]=1941
-.[0][1943]=1942
-.[0][1944]=1943
-.[0][1945]=1944
-.[0][1946]=1945
-.[0][1947]=1946
-.[0][1948]=1947
-.[0][1949]=1948
-.[0][1950]=1949
-.[0][1951]=1950
-.[0][1952]=1951
-.[0][1953]=1952
-.[0][1954]=1953
-.[0][1955]=1954
-.[0][1956]=1955
-.[0][1957]=1956
-.[0][1958]=1957
-.[0][1959]=1958
-.[0][1960]=1959
-.[0][1961]=1960
-.[0][1962]=1961
-.[0][1963]=1962
-.[0][1964]=1963
-.[0][1965]=1964
-.[0][1966]=1965
-.[0][1967]=1966
-.[0][1968]=1967
-.[0][1969]=1968
-.[0][1970]=1969
-.[0][1971]=1970
-.[0][1972]=1971
-.[0][1973]=1972
-.[0][1974]=1973
-.[0][1975]=1974
-.[0][1976]=1975
-.[0][1977]=1976
-.[0][1978]=1977
-.[0][1979]=1978
-.[0][1980]=1979
-.[0][1981]=1980
-.[0][1982]=1981
-.[0][1983]=1982
-.[0][1984]=1983
-.[0][1985]=1984
-.[0][1986]=1985
-.[0][1987]=1986
-.[0][1988]=1987
-.[0][1989]=1988
-.[0][1990]=1989
-.[0][1991]=1990
-.[0][1992]=1991
-.[0][1993]=1992
-.[0][1994]=1993
-.[0][1995]=1994
-.[0][1996]=1995
-.[0][1997]=1996
-.[0][1998]=1997
-.[0][1999]=1998
-.[0][2000]=1999
-.[0][2001]=2000
-.[0][2002]=2001
-.[0][2003]=2002
-.[0][2004]=2003
-.[0][2005]=2004
-.[0][2006]=2005
-.[0][2007]=2006
-.[0][2008]=2007
-.[0][2009]=2008
-.[0][2010]=2009
-.[0][2011]=2010
-.[0][2012]=2011
-.[0][2013]=2012
-.[0][2014]=2013
-.[0][2015]=2014
-.[0][2016]=2015
-.[0][2017]=2016
-.[0][2018]=2017
-.[0][2019]=2018
-.[0][2020]=2019
-.[0][2021]=2020
-.[0][2022]=2021
-.[0][2023]=2022
-.[0][2024]=2023
-.[0][2025]=2024
-.[0][2026]=2025
-.[0][2027]=2026
-.[0][2028]=2027
-.[0][2029]=2028
-.[0][2030]=2029
-.[0][2031]=2030
-.[0][2032]=2031
-.[0][2033]=2032
-.[0][2034]=2033
-.[0][2035]=2034
-.[0][2036]=2035
-.[0][2037]=2036
-.[0][2038]=2037
-.[0][2039]=2038
-.[0][2040]=2039
-.[0][2041]=2040
-.[0][2042]=2041
-.[0][2043]=2042
-.[0][2044]=2043
-.[0][2045]=2044
-.[0][2046]=2045
-.[0][2047]=2046
-.[0][2048]=2047
-.[0][2049]=2048
-.[0][2050]=2049
-.[0][2051]=2050
-.[0][2052]=2051
-.[0][2053]=2052
-.[0][2054]=2053
-.[0][2055]=2054
-.[0][2056]=2055
-.[0][2057]=2056
-.[0][2058]=2057
-.[0][2059]=2058
-.[0][2060]=2059
-.[0][2061]=2060
-.[0][2062]=2061
-.[0][2063]=2062
-.[0][2064]=2063
-.[0][2065]=2064
-.[0][2066]=2065
-.[0][2067]=2066
-.[0][2068]=2067
-.[0][2069]=2068
-.[0][2070]=2069
-.[0][2071]=2070
-.[0][2072]=2071
-.[0][2073]=2072
-.[0][2074]=2073
-.[0][2075]=2074
-.[0][2076]=2075
-.[0][2077]=2076
-.[0][2078]=2077
-.[0][2079]=2078
-.[0][2080]=2079
-.[0][2081]=2080
-.[0][2082]=2081
-.[0][2083]=2082
-.[0][2084]=2083
-.[0][2085]=2084
-.[0][2086]=2085
-.[0][2087]=2086
-.[0][2088]=2087
-.[0][2089]=2088
-.[0][2090]=2089
-.[0][2091]=2090
-.[0][2092]=2091
-.[0][2093]=2092
-.[0][2094]=2093
-.[0][2095]=2094
-.[0][2096]=2095
-.[0][2097]=2096
-.[0][2098]=2097
-.[0][2099]=2098
-.[0][2100]=2099
-.[0][2101]=2100
-.[0][2102]=2101
-.[0][2103]=2102
-.[0][2104]=2103
-.[0][2105]=2104
-.[0][2106]=2105
-.[0][2107]=2106
-.[0][2108]=2107
-.[0][2109]=2108
-.[0][2110]=2109
-.[0][2111]=2110
-.[0][2112]=2111
-.[0][2113]=2112
-.[0][2114]=2113
-.[0][2115]=2114
-.[0][2116]=2115
-.[0][2117]=2116
-.[0][2118]=2117
-.[0][2119]=2118
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.json
deleted file mode 100644
index e4ab4cd43..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_large_01.json
+++ /dev/null
@@ -1,2 +0,0 @@
-[["A",0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118]
-] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.expected
deleted file mode 100644
index 8e0634ef0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.expected
+++ /dev/null
@@ -1 +0,0 @@
-.={}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.json
deleted file mode 100644
index 69a88e3b6..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_01.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.expected
deleted file mode 100644
index 2c9de063e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.={}
-.count=1234
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.json
deleted file mode 100644
index bd157ec4e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_02.json
+++ /dev/null
@@ -1 +0,0 @@
-{ "count" : 1234 }
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.expected
deleted file mode 100644
index 235a28e3d..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-.={}
-.attribute="random"
-.count=1234
-.name="test"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.json
deleted file mode 100644
index 0947a44da..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_03.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "count" : 1234,
- "name" : "test",
- "attribute" : "random"
-}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.expected
deleted file mode 100644
index cf4d7c3e4..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.={}
-.=1234
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.json
deleted file mode 100644
index f1e364ae8..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_object_04.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "" : 1234
-}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.expected
deleted file mode 100644
index b5616a970..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-.={}
-.first=1
-.second=2
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.json
deleted file mode 100644
index 0291fff00..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_preserve_comment_01.json
+++ /dev/null
@@ -1,14 +0,0 @@
-/* A comment
- at the beginning of the file.
- */
-{
- "first" : 1, // comment after 'first' on the same line
-
-/* Comment before 'second'
- */
- "second" : 2
-}
-
-/* A comment at
- the end of the file.
- */
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.expected
deleted file mode 100644
index 57dee39e1..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=8589934592
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.json
deleted file mode 100644
index 5cb1bbf80..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_01.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// 2^33 => out of integer range, switch to double
-8589934592
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.expected
deleted file mode 100644
index 181592a3e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=-4294967295
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.json
deleted file mode 100644
index 45092efc9..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_02.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// -2^32 => out of signed integer range, switch to double
--4294967295
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.expected
deleted file mode 100644
index 181592a3e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=-4294967295
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.json
deleted file mode 100644
index 45092efc9..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_03.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// -2^32 => out of signed integer range, switch to double
--4294967295
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.expected
deleted file mode 100644
index 2f84bf152..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.=1.2345678
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.json
deleted file mode 100644
index 7e71794a9..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_04.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// 1.2345678
-12345678e-7
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.expected
deleted file mode 100644
index 168f6e827..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-.=1234567.8
-
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.json
deleted file mode 100644
index 950f6a78e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_05.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// 1234567.8
-0.12345678e7
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.expected
deleted file mode 100644
index 45906e315..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-.=-1.2345678
-
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.json
deleted file mode 100644
index dde191613..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_06.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// -1.2345678
--12345678e-7
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.expected
deleted file mode 100644
index f2922f94b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-.=-1234567.8
-
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.json
deleted file mode 100644
index dd43ba7ca..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_real_07.json
+++ /dev/null
@@ -1,3 +0,0 @@
-// -1234567.8
--0.12345678e7
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.expected
deleted file mode 100644
index 8fd37b1e0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.json
deleted file mode 100644
index c8c059ba5..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_01.json
+++ /dev/null
@@ -1 +0,0 @@
-"!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.expected
deleted file mode 100644
index 0443bc364..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.json
deleted file mode 100644
index f0fe56a65..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_02.json
+++ /dev/null
@@ -1 +0,0 @@
-"!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.expected
deleted file mode 100644
index 6ed627a85..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="http://jsoncpp.sourceforge.net/" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.json
deleted file mode 100644
index f0a220fce..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_03.json
+++ /dev/null
@@ -1 +0,0 @@
-"http:\/\/jsoncpp.sourceforge.net\/"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.expected
deleted file mode 100644
index 447f85a30..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="a"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.json
deleted file mode 100644
index 024114bc0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_01.json
+++ /dev/null
@@ -1 +0,0 @@
-"\u0061" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.expected
deleted file mode 100644
index c0b3b43ba..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="¢"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.json
deleted file mode 100644
index 4961024fa..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_02.json
+++ /dev/null
@@ -1 +0,0 @@
-"\u00A2" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.expected
deleted file mode 100644
index 7289743ec..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="€"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.json
deleted file mode 100644
index e7e1a9e13..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_03.json
+++ /dev/null
@@ -1 +0,0 @@
-"\u20AC" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.expected
deleted file mode 100644
index 868fbc330..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.expected
+++ /dev/null
@@ -1 +0,0 @@
-.="ð„ž"
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.json
deleted file mode 100644
index dae65c515..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_04.json
+++ /dev/null
@@ -1 +0,0 @@
-"\uD834\uDD1E" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.expected b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.expected
deleted file mode 100644
index 19b2c403b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-.="Zażółć gęślą jaźń"
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.json
deleted file mode 100644
index 877041094..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/data/test_string_unicode_05.json
+++ /dev/null
@@ -1 +0,0 @@
-"Zażółć gęślą jaźń" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/generate_expected.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/generate_expected.py
deleted file mode 100644
index 5b215c467..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/generate_expected.py
+++ /dev/null
@@ -1,11 +0,0 @@
-import glob
-import os.path
-for path in glob.glob( '*.json' ):
- text = file(path,'rt').read()
- target = os.path.splitext(path)[0] + '.expected'
- if os.path.exists( target ):
- print 'skipping:', target
- else:
- print 'creating:', target
- file(target,'wt').write(text)
-
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail1.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail1.json
deleted file mode 100644
index 6216b865f..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail1.json
+++ /dev/null
@@ -1 +0,0 @@
-"A JSON payload should be an object or array, not a string." \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail10.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail10.json
deleted file mode 100644
index 5d8c0047b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail10.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Extra value after close": true} "misplaced quoted value" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail11.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail11.json
deleted file mode 100644
index 76eb95b45..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail11.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Illegal expression": 1 + 2} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail12.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail12.json
deleted file mode 100644
index 77580a452..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail12.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Illegal invocation": alert()} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail13.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail13.json
deleted file mode 100644
index 379406b59..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail13.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Numbers cannot have leading zeroes": 013} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail14.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail14.json
deleted file mode 100644
index 0ed366b38..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail14.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Numbers cannot be hex": 0x14} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail15.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail15.json
deleted file mode 100644
index fc8376b60..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail15.json
+++ /dev/null
@@ -1 +0,0 @@
-["Illegal backslash escape: \x15"] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail16.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail16.json
deleted file mode 100644
index 3fe21d4b5..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail16.json
+++ /dev/null
@@ -1 +0,0 @@
-[\naked] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail17.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail17.json
deleted file mode 100644
index 62b9214ae..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail17.json
+++ /dev/null
@@ -1 +0,0 @@
-["Illegal backslash escape: \017"] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail18.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail18.json
deleted file mode 100644
index edac92716..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail18.json
+++ /dev/null
@@ -1 +0,0 @@
-[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail19.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail19.json
deleted file mode 100644
index 3b9c46fa9..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail19.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Missing colon" null} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail2.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail2.json
deleted file mode 100644
index 6b7c11e5a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail2.json
+++ /dev/null
@@ -1 +0,0 @@
-["Unclosed array" \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail20.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail20.json
deleted file mode 100644
index 27c1af3e7..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail20.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Double colon":: null} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail21.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail21.json
deleted file mode 100644
index 62474573b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail21.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Comma instead of colon", null} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail22.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail22.json
deleted file mode 100644
index a7752581b..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail22.json
+++ /dev/null
@@ -1 +0,0 @@
-["Colon instead of comma": false] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail23.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail23.json
deleted file mode 100644
index 494add1ca..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail23.json
+++ /dev/null
@@ -1 +0,0 @@
-["Bad value", truth] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail24.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail24.json
deleted file mode 100644
index caff239bf..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail24.json
+++ /dev/null
@@ -1 +0,0 @@
-['single quote'] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail25.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail25.json
deleted file mode 100644
index 8b7ad23e0..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail25.json
+++ /dev/null
@@ -1 +0,0 @@
-[" tab character in string "] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail26.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail26.json
deleted file mode 100644
index 845d26a6a..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail26.json
+++ /dev/null
@@ -1 +0,0 @@
-["tab\ character\ in\ string\ "] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail27.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail27.json
deleted file mode 100644
index 6b01a2ca4..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail27.json
+++ /dev/null
@@ -1,2 +0,0 @@
-["line
-break"] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail28.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail28.json
deleted file mode 100644
index 621a0101c..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail28.json
+++ /dev/null
@@ -1,2 +0,0 @@
-["line\
-break"] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail29.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail29.json
deleted file mode 100644
index 47ec421bb..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail29.json
+++ /dev/null
@@ -1 +0,0 @@
-[0e] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail3.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail3.json
deleted file mode 100644
index 168c81eb7..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail3.json
+++ /dev/null
@@ -1 +0,0 @@
-{unquoted_key: "keys must be quoted"} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail30.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail30.json
deleted file mode 100644
index 8ab0bc4b8..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail30.json
+++ /dev/null
@@ -1 +0,0 @@
-[0e+] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail31.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail31.json
deleted file mode 100644
index 1cce602b5..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail31.json
+++ /dev/null
@@ -1 +0,0 @@
-[0e+-1] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail32.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail32.json
deleted file mode 100644
index 45cba7396..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail32.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Comma instead if closing brace": true, \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail33.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail33.json
deleted file mode 100644
index ca5eb19dc..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail33.json
+++ /dev/null
@@ -1 +0,0 @@
-["mismatch"} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail4.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail4.json
deleted file mode 100644
index 9de168bf3..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail4.json
+++ /dev/null
@@ -1 +0,0 @@
-["extra comma",] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail5.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail5.json
deleted file mode 100644
index ddf3ce3d2..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail5.json
+++ /dev/null
@@ -1 +0,0 @@
-["double extra comma",,] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail6.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail6.json
deleted file mode 100644
index ed91580e1..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail6.json
+++ /dev/null
@@ -1 +0,0 @@
-[ , "<-- missing value"] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail7.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail7.json
deleted file mode 100644
index 8a96af3e4..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail7.json
+++ /dev/null
@@ -1 +0,0 @@
-["Comma after the close"], \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail8.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail8.json
deleted file mode 100644
index b28479c6e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail8.json
+++ /dev/null
@@ -1 +0,0 @@
-["Extra close"]] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail9.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail9.json
deleted file mode 100644
index 5815574f3..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/fail9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Extra comma": true,} \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass1.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass1.json
deleted file mode 100644
index 70e268543..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass1.json
+++ /dev/null
@@ -1,58 +0,0 @@
-[
- "JSON Test Pattern pass1",
- {"object with 1 member":["array with 1 element"]},
- {},
- [],
- -42,
- true,
- false,
- null,
- {
- "integer": 1234567890,
- "real": -9876.543210,
- "e": 0.123456789e-12,
- "E": 1.234567890E+34,
- "": 23456789012E66,
- "zero": 0,
- "one": 1,
- "space": " ",
- "quote": "\"",
- "backslash": "\\",
- "controls": "\b\f\n\r\t",
- "slash": "/ & \/",
- "alpha": "abcdefghijklmnopqrstuvwyz",
- "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
- "digit": "0123456789",
- "0123456789": "digit",
- "special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
- "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
- "true": true,
- "false": false,
- "null": null,
- "array":[ ],
- "object":{ },
- "address": "50 St. James Street",
- "url": "http://www.JSON.org/",
- "comment": "// /* <!-- --",
- "# -- --> */": " ",
- " s p a c e d " :[1,2 , 3
-
-,
-
-4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7],
- "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
- "quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
- "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"
-: "A key can be any string"
- },
- 0.5 ,98.6
-,
-99.44
-,
-
-1066,
-1e1,
-0.1e1,
-1e-1,
-1e00,2e+00,2e-00
-,"rosebud"] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass2.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass2.json
deleted file mode 100644
index d3c63c7ad..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass2.json
+++ /dev/null
@@ -1 +0,0 @@
-[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass3.json b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass3.json
deleted file mode 100644
index 4528d51f1..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/pass3.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "JSON Test Pattern pass3": {
- "The outermost value": "must be an object or array.",
- "In this test": "It is an object."
- }
-}
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/readme.txt b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/readme.txt
deleted file mode 100644
index 321d89d99..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/jsonchecker/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Test suite from http://json.org/JSON_checker/.
-
-If the JSON_checker is working correctly, it must accept all of the pass*.json files and reject all of the fail*.json files.
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/pyjsontestrunner.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/pyjsontestrunner.py
deleted file mode 100644
index 504f3db2e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/pyjsontestrunner.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# Simple implementation of a json test runner to run the test against json-py.
-
-import sys
-import os.path
-import json
-import types
-
-if len(sys.argv) != 2:
- print "Usage: %s input-json-file", sys.argv[0]
- sys.exit(3)
-
-input_path = sys.argv[1]
-base_path = os.path.splitext(input_path)[0]
-actual_path = base_path + '.actual'
-rewrite_path = base_path + '.rewrite'
-rewrite_actual_path = base_path + '.actual-rewrite'
-
-def valueTreeToString( fout, value, path = '.' ):
- ty = type(value)
- if ty is types.DictType:
- fout.write( '%s={}\n' % path )
- suffix = path[-1] != '.' and '.' or ''
- names = value.keys()
- names.sort()
- for name in names:
- valueTreeToString( fout, value[name], path + suffix + name )
- elif ty is types.ListType:
- fout.write( '%s=[]\n' % path )
- for index, childValue in zip( xrange(0,len(value)), value ):
- valueTreeToString( fout, childValue, path + '[%d]' % index )
- elif ty is types.StringType:
- fout.write( '%s="%s"\n' % (path,value) )
- elif ty is types.IntType:
- fout.write( '%s=%d\n' % (path,value) )
- elif ty is types.FloatType:
- fout.write( '%s=%.16g\n' % (path,value) )
- elif value is True:
- fout.write( '%s=true\n' % path )
- elif value is False:
- fout.write( '%s=false\n' % path )
- elif value is None:
- fout.write( '%s=null\n' % path )
- else:
- assert False and "Unexpected value type"
-
-def parseAndSaveValueTree( input, actual_path ):
- root = json.loads( input )
- fout = file( actual_path, 'wt' )
- valueTreeToString( fout, root )
- fout.close()
- return root
-
-def rewriteValueTree( value, rewrite_path ):
- rewrite = json.dumps( value )
- #rewrite = rewrite[1:-1] # Somehow the string is quoted ! jsonpy bug ?
- file( rewrite_path, 'wt').write( rewrite + '\n' )
- return rewrite
-
-input = file( input_path, 'rt' ).read()
-root = parseAndSaveValueTree( input, actual_path )
-rewrite = rewriteValueTree( json.write( root ), rewrite_path )
-rewrite_root = parseAndSaveValueTree( rewrite, rewrite_actual_path )
-
-sys.exit( 0 )
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/runjsontests.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/runjsontests.py
deleted file mode 100644
index ffe8bd51e..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/runjsontests.py
+++ /dev/null
@@ -1,134 +0,0 @@
-import sys
-import os
-import os.path
-from glob import glob
-import optparse
-
-VALGRIND_CMD = 'valgrind --tool=memcheck --leak-check=yes --undef-value-errors=yes '
-
-def compareOutputs( expected, actual, message ):
- expected = expected.strip().replace('\r','').split('\n')
- actual = actual.strip().replace('\r','').split('\n')
- diff_line = 0
- max_line_to_compare = min( len(expected), len(actual) )
- for index in xrange(0,max_line_to_compare):
- if expected[index].strip() != actual[index].strip():
- diff_line = index + 1
- break
- if diff_line == 0 and len(expected) != len(actual):
- diff_line = max_line_to_compare+1
- if diff_line == 0:
- return None
- def safeGetLine( lines, index ):
- index += -1
- if index >= len(lines):
- return ''
- return lines[index].strip()
- return """ Difference in %s at line %d:
- Expected: '%s'
- Actual: '%s'
-""" % (message, diff_line,
- safeGetLine(expected,diff_line),
- safeGetLine(actual,diff_line) )
-
-def safeReadFile( path ):
- try:
- return file( path, 'rt' ).read()
- except IOError, e:
- return '<File "%s" is missing: %s>' % (path,e)
-
-def runAllTests( jsontest_executable_path, input_dir = None,
- use_valgrind=False, with_json_checker=False ):
- if not input_dir:
- input_dir = os.path.join( os.getcwd(), 'data' )
- tests = glob( os.path.join( input_dir, '*.json' ) )
- if with_json_checker:
- test_jsonchecker = glob( os.path.join( input_dir, '../jsonchecker', '*.json' ) )
- else:
- test_jsonchecker = []
- failed_tests = []
- valgrind_path = use_valgrind and VALGRIND_CMD or ''
- for input_path in tests + test_jsonchecker:
- expect_failure = os.path.basename( input_path ).startswith( 'fail' )
- is_json_checker_test = (input_path in test_jsonchecker) or expect_failure
- print 'TESTING:', input_path,
- options = is_json_checker_test and '--json-checker' or ''
- pipe = os.popen( "%s%s %s %s" % (
- valgrind_path, jsontest_executable_path, options,
- input_path) )
- process_output = pipe.read()
- status = pipe.close()
- if is_json_checker_test:
- if expect_failure:
- if status is None:
- print 'FAILED'
- failed_tests.append( (input_path, 'Parsing should have failed:\n%s' %
- safeReadFile(input_path)) )
- else:
- print 'OK'
- else:
- if status is not None:
- print 'FAILED'
- failed_tests.append( (input_path, 'Parsing failed:\n' + process_output) )
- else:
- print 'OK'
- else:
- base_path = os.path.splitext(input_path)[0]
- actual_output = safeReadFile( base_path + '.actual' )
- actual_rewrite_output = safeReadFile( base_path + '.actual-rewrite' )
- file(base_path + '.process-output','wt').write( process_output )
- if status:
- print 'parsing failed'
- failed_tests.append( (input_path, 'Parsing failed:\n' + process_output) )
- else:
- expected_output_path = os.path.splitext(input_path)[0] + '.expected'
- expected_output = file( expected_output_path, 'rt' ).read()
- detail = ( compareOutputs( expected_output, actual_output, 'input' )
- or compareOutputs( expected_output, actual_rewrite_output, 'rewrite' ) )
- if detail:
- print 'FAILED'
- failed_tests.append( (input_path, detail) )
- else:
- print 'OK'
-
- if failed_tests:
- print
- print 'Failure details:'
- for failed_test in failed_tests:
- print '* Test', failed_test[0]
- print failed_test[1]
- print
- print 'Test results: %d passed, %d failed.' % (len(tests)-len(failed_tests),
- len(failed_tests) )
- return 1
- else:
- print 'All %d tests passed.' % len(tests)
- return 0
-
-def main():
- from optparse import OptionParser
- parser = OptionParser( usage="%prog [options] <path to jsontestrunner.exe> [test case directory]" )
- parser.add_option("--valgrind",
- action="store_true", dest="valgrind", default=False,
- help="run all the tests using valgrind to detect memory leaks")
- parser.add_option("-c", "--with-json-checker",
- action="store_true", dest="with_json_checker", default=False,
- help="run all the tests from the official JSONChecker test suite of json.org")
- parser.enable_interspersed_args()
- options, args = parser.parse_args()
-
- if len(args) < 1 or len(args) > 2:
- parser.error( 'Must provides at least path to jsontestrunner executable.' )
- sys.exit( 1 )
-
- jsontest_executable_path = os.path.normpath( os.path.abspath( args[0] ) )
- if len(args) > 1:
- input_path = os.path.normpath( os.path.abspath( args[1] ) )
- else:
- input_path = None
- status = runAllTests( jsontest_executable_path, input_path,
- use_valgrind=options.valgrind, with_json_checker=options.with_json_checker )
- sys.exit( status )
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/rununittests.py b/SDL_Core/src/thirdPartyLibs/jsoncpp/test/rununittests.py
deleted file mode 100644
index 366184cfb..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/test/rununittests.py
+++ /dev/null
@@ -1,73 +0,0 @@
-import sys
-import os
-import os.path
-import subprocess
-from glob import glob
-import optparse
-
-VALGRIND_CMD = 'valgrind --tool=memcheck --leak-check=yes --undef-value-errors=yes'
-
-class TestProxy(object):
- def __init__( self, test_exe_path, use_valgrind=False ):
- self.test_exe_path = os.path.normpath( os.path.abspath( test_exe_path ) )
- self.use_valgrind = use_valgrind
-
- def run( self, options ):
- if self.use_valgrind:
- cmd = VALGRIND_CMD.split()
- else:
- cmd = []
- cmd.extend( [self.test_exe_path, '--test-auto'] + options )
- process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
- stdout = process.communicate()[0]
- if process.returncode:
- return False, stdout
- return True, stdout
-
-def runAllTests( exe_path, use_valgrind=False ):
- test_proxy = TestProxy( exe_path, use_valgrind=use_valgrind )
- status, test_names = test_proxy.run( ['--list-tests'] )
- if not status:
- print >> sys.stderr, "Failed to obtain unit tests list:\n" + test_names
- return 1
- test_names = [name.strip() for name in test_names.strip().split('\n')]
- failures = []
- for name in test_names:
- print 'TESTING %s:' % name,
- succeed, result = test_proxy.run( ['--test', name] )
- if succeed:
- print 'OK'
- else:
- failures.append( (name, result) )
- print 'FAILED'
- failed_count = len(failures)
- pass_count = len(test_names) - failed_count
- if failed_count:
- print
- for name, result in failures:
- print result
- print '%d/%d tests passed (%d failure(s))' % (
- pass_count, len(test_names), failed_count)
- return 1
- else:
- print 'All %d tests passed' % len(test_names)
- return 0
-
-def main():
- from optparse import OptionParser
- parser = OptionParser( usage="%prog [options] <path to test_lib_json.exe>" )
- parser.add_option("--valgrind",
- action="store_true", dest="valgrind", default=False,
- help="run all the tests using valgrind to detect memory leaks")
- parser.enable_interspersed_args()
- options, args = parser.parse_args()
-
- if len(args) != 1:
- parser.error( 'Must provides at least path to test_lib_json executable.' )
- sys.exit( 1 )
-
- exit_code = runAllTests( args[0], use_valgrind=options.valgrind )
- sys.exit( exit_code )
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/src/thirdPartyLibs/jsoncpp/version b/SDL_Core/src/thirdPartyLibs/jsoncpp/version
deleted file mode 100644
index 673adfb9f..000000000
--- a/SDL_Core/src/thirdPartyLibs/jsoncpp/version
+++ /dev/null
@@ -1 +0,0 @@
-0.6.0-rc2 \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/CMakeLists.txt b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/CMakeLists.txt
deleted file mode 100644
index 760a9aad6..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-include_directories (
- ./libusb/os/
- ./libusb/
- ./
-)
-
-set (LIBUSB_SOURCES
- ./libusb/core.c
- ./libusb/descriptor.c
- ./libusb/hotplug.c
- ./libusb/io.c
- ./libusb/strerror.c
- ./libusb/sync.c
- ./libusb/os/linux_udev.c
- ./libusb/os/linux_netlink.c
- ./libusb/os/linux_usbfs.c
- ./libusb/os/poll_posix.c
- ./libusb/os/threads_posix.c
-)
-
-add_library("Libusb-1.0.16" ${LIBUSB_SOURCES})
-
-
-target_link_libraries("Libusb-1.0.16" udev) \ No newline at end of file
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/config.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/config.h
deleted file mode 100644
index 3c4543f2f..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/config.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Default visibility */
-#define DEFAULT_VISIBILITY __attribute__((visibility("default")))
-
-/* Start with debug message logging enabled */
-/* #undef ENABLE_DEBUG_LOGGING */
-
-/* Message logging */
-#define ENABLE_LOGGING 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `udev' library (-ludev). */
-#define HAVE_LIBUDEV 1
-
-/* Define to 1 if you have the <libudev.h> header file. */
-#define HAVE_LIBUDEV_H 1
-
-/* Define to 1 if you have the <linux/filter.h> header file. */
-/* #undef HAVE_LINUX_FILTER_H */
-
-/* Define to 1 if you have the <linux/netlink.h> header file. */
-/* #undef HAVE_LINUX_NETLINK_H */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <poll.h> header file. */
-#define HAVE_POLL_H 1
-
-/* Define to 1 if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if the system has the type `struct timespec'. */
-#define HAVE_STRUCT_TIMESPEC 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-/* #undef NO_MINUS_C_MINUS_O */
-
-/* Darwin backend */
-/* #undef OS_DARWIN */
-
-/* Linux backend */
-#define OS_LINUX 1
-
-/* OpenBSD/NetBSD backend */
-/* #undef OS_OPENBSD */
-
-/* Windows backend */
-/* #undef OS_WINDOWS */
-
-/* Name of package */
-#define PACKAGE "libusbx"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "libusbx-devel@lists.sourceforge.net"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libusbx"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libusbx 1.0.16"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libusbx"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "http://libusbx.org"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.16"
-
-/* type of second poll() argument */
-#define POLL_NFDS_TYPE nfds_t
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Use POSIX Threads */
-#define THREADS_POSIX 1
-
-/* timerfd headers available */
-#define USBI_TIMERFD_AVAILABLE 1
-
-/* Use udev for device enumeration/hotplug */
-#define USE_UDEV 1
-
-/* Version number of package */
-#define VERSION "1.0.16"
-
-/* Use GNU extensions */
-#define _GNU_SOURCE 1
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-core.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-core.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-core.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-darwin_usb.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-darwin_usb.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-darwin_usb.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-descriptor.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-descriptor.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-descriptor.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-hotplug.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-hotplug.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-hotplug.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-io.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-io.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-io.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_netlink.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_netlink.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_netlink.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_udev.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_udev.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_udev.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_usbfs.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_usbfs.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-linux_usbfs.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-openbsd_usb.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-openbsd_usb.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-openbsd_usb.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_posix.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_posix.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_posix.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_windows.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_windows.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-poll_windows.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-strerror.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-strerror.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-strerror.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-sync.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-sync.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-sync.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_posix.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_posix.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_posix.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_windows.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_windows.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-threads_windows.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-windows_usb.Plo b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-windows_usb.Plo
deleted file mode 100644
index 9ce06a81e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/.deps/libusb_1_0_la-windows_usb.Plo
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.am b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.am
deleted file mode 100644
index 7f9c1f909..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.am
+++ /dev/null
@@ -1,68 +0,0 @@
-all: libusb-1.0.la libusb-1.0.dll
-
-lib_LTLIBRARIES = libusb-1.0.la
-
-POSIX_POLL_SRC = os/poll_posix.c
-LINUX_USBFS_SRC = os/linux_usbfs.c
-DARWIN_USB_SRC = os/darwin_usb.c
-OPENBSD_USB_SRC = os/openbsd_usb.c
-WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc libusb-1.0.def
-WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h
-
-EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
- $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \
- $(POSIX_POLL_SRC) \
- os/threads_posix.c os/threads_windows.c \
- os/linux_udev.c os/linux_netlink.c
-
-if OS_LINUX
-
-if USE_UDEV
-OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \
- os/linux_udev.c
-else
-OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \
- os/linux_netlink.c
-endif
-
-endif
-
-if OS_DARWIN
-OS_SRC = $(DARWIN_USB_SRC) $(POSIX_POLL_SRC)
-AM_CFLAGS_EXT = -no-cpp-precomp
-endif
-
-if OS_OPENBSD
-OS_SRC = $(OPENBSD_USB_SRC) $(POSIX_POLL_SRC)
-endif
-
-if OS_WINDOWS
-OS_SRC = $(WINDOWS_USB_SRC)
-
-.rc.lo:
- $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
-
-libusb-1.0.rc: version.h version_nano.h
-endif
-
-libusb-1.0.dll: libusb-1.0.def
-if CREATE_IMPORT_LIB
-# Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
- $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a
-endif
-
-if THREADS_POSIX
-THREADS_SRC = os/threads_posix.h os/threads_posix.c
-else
-THREADS_SRC = os/threads_windows.h os/threads_windows.c
-endif
-
-libusb_1_0_la_CFLAGS = $(AM_CFLAGS)
-libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
-libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c strerror.c sync.c \
- os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h os/windows_common.h \
- hotplug.h hotplug.c $(THREADS_SRC) $(OS_SRC) \
- os/poll_posix.h os/poll_windows.h
-
-hdrdir = $(includedir)/libusb-1.0
-hdr_HEADERS = libusb.h
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.in b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.in
deleted file mode 100644
index 2461c45a8..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/Makefile.in
+++ /dev/null
@@ -1,860 +0,0 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
- case $${target_option-} in \
- ?) ;; \
- *) echo "am__make_running_with_option: internal error: invalid" \
- "target option '$${target_option-}' specified" >&2; \
- exit 1;; \
- esac; \
- has_opt=no; \
- sane_makeflags=$$MAKEFLAGS; \
- if $(am__is_gnu_make); then \
- sane_makeflags=$$MFLAGS; \
- else \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- bs=\\; \
- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
- esac; \
- fi; \
- skip_next=no; \
- strip_trailopt () \
- { \
- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
- }; \
- for flg in $$sane_makeflags; do \
- test $$skip_next = yes && { skip_next=no; continue; }; \
- case $$flg in \
- *=*|--*) continue;; \
- -*I) strip_trailopt 'I'; skip_next=yes;; \
- -*I?*) strip_trailopt 'I';; \
- -*O) strip_trailopt 'O'; skip_next=yes;; \
- -*O?*) strip_trailopt 'O';; \
- -*l) strip_trailopt 'l'; skip_next=yes;; \
- -*l?*) strip_trailopt 'l';; \
- -[dEDm]) skip_next=yes;; \
- -[JT]) skip_next=yes;; \
- esac; \
- case $$flg in \
- *$$target_option*) has_opt=yes; break;; \
- esac; \
- done; \
- test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = libusb
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/depcomp $(hdr_HEADERS)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/libusb/version.h $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(hdrdir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libusb_1_0_la_LIBADD =
-am__libusb_1_0_la_SOURCES_DIST = libusbi.h core.c descriptor.c io.c \
- strerror.c sync.c os/linux_usbfs.h os/darwin_usb.h \
- os/windows_usb.h os/windows_common.h hotplug.h hotplug.c \
- os/threads_windows.h os/threads_windows.c os/threads_posix.h \
- os/threads_posix.c os/darwin_usb.c os/poll_posix.c \
- os/linux_usbfs.c os/linux_netlink.c os/linux_udev.c \
- os/openbsd_usb.c os/poll_windows.c os/windows_usb.c \
- libusb-1.0.rc libusb-1.0.def os/poll_posix.h os/poll_windows.h
-@THREADS_POSIX_FALSE@am__objects_1 = libusb_1_0_la-threads_windows.lo
-@THREADS_POSIX_TRUE@am__objects_1 = libusb_1_0_la-threads_posix.lo
-am__objects_2 = libusb_1_0_la-darwin_usb.lo
-am__objects_3 = libusb_1_0_la-poll_posix.lo
-am__objects_4 = libusb_1_0_la-linux_usbfs.lo
-am__objects_5 = libusb_1_0_la-openbsd_usb.lo
-am__objects_6 = libusb_1_0_la-poll_windows.lo \
- libusb_1_0_la-windows_usb.lo libusb-1.0.lo
-@OS_DARWIN_FALSE@@OS_LINUX_FALSE@@OS_OPENBSD_FALSE@@OS_WINDOWS_TRUE@am__objects_7 = $(am__objects_6)
-@OS_DARWIN_FALSE@@OS_LINUX_FALSE@@OS_OPENBSD_TRUE@am__objects_7 = $(am__objects_5) \
-@OS_DARWIN_FALSE@@OS_LINUX_FALSE@@OS_OPENBSD_TRUE@ $(am__objects_3)
-@OS_DARWIN_FALSE@@OS_LINUX_TRUE@@USE_UDEV_FALSE@am__objects_7 = $(am__objects_4) \
-@OS_DARWIN_FALSE@@OS_LINUX_TRUE@@USE_UDEV_FALSE@ $(am__objects_3) \
-@OS_DARWIN_FALSE@@OS_LINUX_TRUE@@USE_UDEV_FALSE@ libusb_1_0_la-linux_netlink.lo
-@OS_DARWIN_FALSE@@OS_LINUX_TRUE@@USE_UDEV_TRUE@am__objects_7 = $(am__objects_4) \
-@OS_DARWIN_FALSE@@OS_LINUX_TRUE@@USE_UDEV_TRUE@ $(am__objects_3) \
-@OS_DARWIN_FALSE@@OS_LINUX_TRUE@@USE_UDEV_TRUE@ libusb_1_0_la-linux_udev.lo
-@OS_DARWIN_TRUE@am__objects_7 = $(am__objects_2) $(am__objects_3)
-am_libusb_1_0_la_OBJECTS = libusb_1_0_la-core.lo \
- libusb_1_0_la-descriptor.lo libusb_1_0_la-io.lo \
- libusb_1_0_la-strerror.lo libusb_1_0_la-sync.lo \
- libusb_1_0_la-hotplug.lo $(am__objects_1) $(am__objects_7)
-libusb_1_0_la_OBJECTS = $(am_libusb_1_0_la_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
-libusb_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libusb_1_0_la_CFLAGS) \
- $(CFLAGS) $(libusb_1_0_la_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-am__v_CC_1 =
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-am__v_CCLD_1 =
-SOURCES = $(libusb_1_0_la_SOURCES)
-DIST_SOURCES = $(am__libusb_1_0_la_SOURCES_DIST)
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(hdr_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates. Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
- BEGIN { nonempty = 0; } \
- { items[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique. This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
- list='$(am__tagged_files)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLDFLAGS = @LTLDFLAGS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OS_DARWIN = @OS_DARWIN@
-OS_LINUX = @OS_LINUX@
-OS_OPENBSD = @OS_OPENBSD@
-OS_WINDOWS = @OS_WINDOWS@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-RC = @RC@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-USE_UDEV = @USE_UDEV@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-lib_LTLIBRARIES = libusb-1.0.la
-POSIX_POLL_SRC = os/poll_posix.c
-LINUX_USBFS_SRC = os/linux_usbfs.c
-DARWIN_USB_SRC = os/darwin_usb.c
-OPENBSD_USB_SRC = os/openbsd_usb.c
-WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc libusb-1.0.def
-WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h
-EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
- $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \
- $(POSIX_POLL_SRC) \
- os/threads_posix.c os/threads_windows.c \
- os/linux_udev.c os/linux_netlink.c
-
-@OS_DARWIN_TRUE@OS_SRC = $(DARWIN_USB_SRC) $(POSIX_POLL_SRC)
-@OS_LINUX_TRUE@@USE_UDEV_FALSE@OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \
-@OS_LINUX_TRUE@@USE_UDEV_FALSE@ os/linux_netlink.c
-
-@OS_LINUX_TRUE@@USE_UDEV_TRUE@OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \
-@OS_LINUX_TRUE@@USE_UDEV_TRUE@ os/linux_udev.c
-
-@OS_OPENBSD_TRUE@OS_SRC = $(OPENBSD_USB_SRC) $(POSIX_POLL_SRC)
-@OS_WINDOWS_TRUE@OS_SRC = $(WINDOWS_USB_SRC)
-@OS_DARWIN_TRUE@AM_CFLAGS_EXT = -no-cpp-precomp
-@THREADS_POSIX_FALSE@THREADS_SRC = os/threads_windows.h os/threads_windows.c
-@THREADS_POSIX_TRUE@THREADS_SRC = os/threads_posix.h os/threads_posix.c
-libusb_1_0_la_CFLAGS = $(AM_CFLAGS)
-libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
-libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c strerror.c sync.c \
- os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h os/windows_common.h \
- hotplug.h hotplug.c $(THREADS_SRC) $(OS_SRC) \
- os/poll_posix.h os/poll_windows.h
-
-hdrdir = $(includedir)/libusb-1.0
-hdr_HEADERS = libusb.h
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj .rc
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libusb/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu libusb/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- }
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-
-libusb-1.0.la: $(libusb_1_0_la_OBJECTS) $(libusb_1_0_la_DEPENDENCIES) $(EXTRA_libusb_1_0_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libusb_1_0_la_LINK) -rpath $(libdir) $(libusb_1_0_la_OBJECTS) $(libusb_1_0_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-core.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-darwin_usb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-descriptor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-hotplug.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-io.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-linux_netlink.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-linux_udev.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-linux_usbfs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-openbsd_usb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-poll_posix.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-poll_windows.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-strerror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-sync.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-threads_posix.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-threads_windows.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libusb_1_0_la-windows_usb.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-libusb_1_0_la-core.lo: core.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-core.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-core.Tpo -c -o libusb_1_0_la-core.lo `test -f 'core.c' || echo '$(srcdir)/'`core.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-core.Tpo $(DEPDIR)/libusb_1_0_la-core.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='core.c' object='libusb_1_0_la-core.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-core.lo `test -f 'core.c' || echo '$(srcdir)/'`core.c
-
-libusb_1_0_la-descriptor.lo: descriptor.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-descriptor.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-descriptor.Tpo -c -o libusb_1_0_la-descriptor.lo `test -f 'descriptor.c' || echo '$(srcdir)/'`descriptor.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-descriptor.Tpo $(DEPDIR)/libusb_1_0_la-descriptor.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='descriptor.c' object='libusb_1_0_la-descriptor.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-descriptor.lo `test -f 'descriptor.c' || echo '$(srcdir)/'`descriptor.c
-
-libusb_1_0_la-io.lo: io.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-io.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-io.Tpo -c -o libusb_1_0_la-io.lo `test -f 'io.c' || echo '$(srcdir)/'`io.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-io.Tpo $(DEPDIR)/libusb_1_0_la-io.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io.c' object='libusb_1_0_la-io.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-io.lo `test -f 'io.c' || echo '$(srcdir)/'`io.c
-
-libusb_1_0_la-strerror.lo: strerror.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-strerror.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-strerror.Tpo -c -o libusb_1_0_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-strerror.Tpo $(DEPDIR)/libusb_1_0_la-strerror.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strerror.c' object='libusb_1_0_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c
-
-libusb_1_0_la-sync.lo: sync.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-sync.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-sync.Tpo -c -o libusb_1_0_la-sync.lo `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-sync.Tpo $(DEPDIR)/libusb_1_0_la-sync.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync.c' object='libusb_1_0_la-sync.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-sync.lo `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
-
-libusb_1_0_la-hotplug.lo: hotplug.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-hotplug.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-hotplug.Tpo -c -o libusb_1_0_la-hotplug.lo `test -f 'hotplug.c' || echo '$(srcdir)/'`hotplug.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-hotplug.Tpo $(DEPDIR)/libusb_1_0_la-hotplug.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hotplug.c' object='libusb_1_0_la-hotplug.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-hotplug.lo `test -f 'hotplug.c' || echo '$(srcdir)/'`hotplug.c
-
-libusb_1_0_la-threads_windows.lo: os/threads_windows.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-threads_windows.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-threads_windows.Tpo -c -o libusb_1_0_la-threads_windows.lo `test -f 'os/threads_windows.c' || echo '$(srcdir)/'`os/threads_windows.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-threads_windows.Tpo $(DEPDIR)/libusb_1_0_la-threads_windows.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/threads_windows.c' object='libusb_1_0_la-threads_windows.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-threads_windows.lo `test -f 'os/threads_windows.c' || echo '$(srcdir)/'`os/threads_windows.c
-
-libusb_1_0_la-threads_posix.lo: os/threads_posix.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-threads_posix.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-threads_posix.Tpo -c -o libusb_1_0_la-threads_posix.lo `test -f 'os/threads_posix.c' || echo '$(srcdir)/'`os/threads_posix.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-threads_posix.Tpo $(DEPDIR)/libusb_1_0_la-threads_posix.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/threads_posix.c' object='libusb_1_0_la-threads_posix.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-threads_posix.lo `test -f 'os/threads_posix.c' || echo '$(srcdir)/'`os/threads_posix.c
-
-libusb_1_0_la-darwin_usb.lo: os/darwin_usb.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-darwin_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-darwin_usb.Tpo -c -o libusb_1_0_la-darwin_usb.lo `test -f 'os/darwin_usb.c' || echo '$(srcdir)/'`os/darwin_usb.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-darwin_usb.Tpo $(DEPDIR)/libusb_1_0_la-darwin_usb.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/darwin_usb.c' object='libusb_1_0_la-darwin_usb.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-darwin_usb.lo `test -f 'os/darwin_usb.c' || echo '$(srcdir)/'`os/darwin_usb.c
-
-libusb_1_0_la-poll_posix.lo: os/poll_posix.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-poll_posix.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-poll_posix.Tpo -c -o libusb_1_0_la-poll_posix.lo `test -f 'os/poll_posix.c' || echo '$(srcdir)/'`os/poll_posix.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-poll_posix.Tpo $(DEPDIR)/libusb_1_0_la-poll_posix.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/poll_posix.c' object='libusb_1_0_la-poll_posix.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-poll_posix.lo `test -f 'os/poll_posix.c' || echo '$(srcdir)/'`os/poll_posix.c
-
-libusb_1_0_la-linux_usbfs.lo: os/linux_usbfs.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-linux_usbfs.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-linux_usbfs.Tpo -c -o libusb_1_0_la-linux_usbfs.lo `test -f 'os/linux_usbfs.c' || echo '$(srcdir)/'`os/linux_usbfs.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-linux_usbfs.Tpo $(DEPDIR)/libusb_1_0_la-linux_usbfs.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/linux_usbfs.c' object='libusb_1_0_la-linux_usbfs.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-linux_usbfs.lo `test -f 'os/linux_usbfs.c' || echo '$(srcdir)/'`os/linux_usbfs.c
-
-libusb_1_0_la-linux_netlink.lo: os/linux_netlink.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-linux_netlink.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-linux_netlink.Tpo -c -o libusb_1_0_la-linux_netlink.lo `test -f 'os/linux_netlink.c' || echo '$(srcdir)/'`os/linux_netlink.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-linux_netlink.Tpo $(DEPDIR)/libusb_1_0_la-linux_netlink.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/linux_netlink.c' object='libusb_1_0_la-linux_netlink.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-linux_netlink.lo `test -f 'os/linux_netlink.c' || echo '$(srcdir)/'`os/linux_netlink.c
-
-libusb_1_0_la-linux_udev.lo: os/linux_udev.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-linux_udev.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-linux_udev.Tpo -c -o libusb_1_0_la-linux_udev.lo `test -f 'os/linux_udev.c' || echo '$(srcdir)/'`os/linux_udev.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-linux_udev.Tpo $(DEPDIR)/libusb_1_0_la-linux_udev.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/linux_udev.c' object='libusb_1_0_la-linux_udev.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-linux_udev.lo `test -f 'os/linux_udev.c' || echo '$(srcdir)/'`os/linux_udev.c
-
-libusb_1_0_la-openbsd_usb.lo: os/openbsd_usb.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-openbsd_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-openbsd_usb.Tpo -c -o libusb_1_0_la-openbsd_usb.lo `test -f 'os/openbsd_usb.c' || echo '$(srcdir)/'`os/openbsd_usb.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-openbsd_usb.Tpo $(DEPDIR)/libusb_1_0_la-openbsd_usb.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/openbsd_usb.c' object='libusb_1_0_la-openbsd_usb.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-openbsd_usb.lo `test -f 'os/openbsd_usb.c' || echo '$(srcdir)/'`os/openbsd_usb.c
-
-libusb_1_0_la-poll_windows.lo: os/poll_windows.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-poll_windows.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-poll_windows.Tpo -c -o libusb_1_0_la-poll_windows.lo `test -f 'os/poll_windows.c' || echo '$(srcdir)/'`os/poll_windows.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-poll_windows.Tpo $(DEPDIR)/libusb_1_0_la-poll_windows.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/poll_windows.c' object='libusb_1_0_la-poll_windows.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-poll_windows.lo `test -f 'os/poll_windows.c' || echo '$(srcdir)/'`os/poll_windows.c
-
-libusb_1_0_la-windows_usb.lo: os/windows_usb.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -MT libusb_1_0_la-windows_usb.lo -MD -MP -MF $(DEPDIR)/libusb_1_0_la-windows_usb.Tpo -c -o libusb_1_0_la-windows_usb.lo `test -f 'os/windows_usb.c' || echo '$(srcdir)/'`os/windows_usb.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libusb_1_0_la-windows_usb.Tpo $(DEPDIR)/libusb_1_0_la-windows_usb.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='os/windows_usb.c' object='libusb_1_0_la-windows_usb.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libusb_1_0_la_CFLAGS) $(CFLAGS) -c -o libusb_1_0_la-windows_usb.lo `test -f 'os/windows_usb.c' || echo '$(srcdir)/'`os/windows_usb.c
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-hdrHEADERS: $(hdr_HEADERS)
- @$(NORMAL_INSTALL)
- @list='$(hdr_HEADERS)'; test -n "$(hdrdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(hdrdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(hdrdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(hdrdir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(hdrdir)" || exit $$?; \
- done
-
-uninstall-hdrHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(hdr_HEADERS)'; test -n "$(hdrdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(hdrdir)'; $(am__uninstall_files_from_dir)
-
-ID: $(am__tagged_files)
- $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- set x; \
- here=`pwd`; \
- $(am__define_uniq_tagged_files); \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- $(am__define_uniq_tagged_files); \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
- list='$(am__tagged_files)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(hdrdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-hdrHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-hdrHEADERS uninstall-libLTLIBRARIES
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-hdrHEADERS install-html \
- install-html-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-am uninstall uninstall-am uninstall-hdrHEADERS \
- uninstall-libLTLIBRARIES
-
-all: libusb-1.0.la libusb-1.0.dll
-
-@OS_WINDOWS_TRUE@.rc.lo:
-@OS_WINDOWS_TRUE@ $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
-
-@OS_WINDOWS_TRUE@libusb-1.0.rc: version.h version_nano.h
-
-libusb-1.0.dll: libusb-1.0.def
-# Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
-@CREATE_IMPORT_LIB_TRUE@ $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/core.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/core.c
deleted file mode 100644
index e29e8df25..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/core.c
+++ /dev/null
@@ -1,2228 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */
-/*
- * Core functions for libusbx
- * Copyright © 2012-2013 Nathan Hjelm <hjelmn@cs.unm.edu>
- * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#ifdef __ANDROID__
-#include <android/log.h>
-#endif
-
-#include "libusbi.h"
-#include "hotplug.h"
-
-#if defined(OS_LINUX)
-const struct usbi_os_backend * const usbi_backend = &linux_usbfs_backend;
-#elif defined(OS_DARWIN)
-const struct usbi_os_backend * const usbi_backend = &darwin_backend;
-#elif defined(OS_OPENBSD)
-const struct usbi_os_backend * const usbi_backend = &openbsd_backend;
-#elif defined(OS_WINDOWS)
-const struct usbi_os_backend * const usbi_backend = &windows_backend;
-#elif defined(OS_WINCE)
-const struct usbi_os_backend * const usbi_backend = &wince_backend;
-#else
-#error "Unsupported OS"
-#endif
-
-struct libusb_context *usbi_default_context = NULL;
-const struct libusb_version libusb_version_internal =
- { LIBUSB_MAJOR, LIBUSB_MINOR, LIBUSB_MICRO, LIBUSB_NANO,
- LIBUSB_RC, "http://libusbx.org" };
-static int default_context_refcnt = 0;
-static usbi_mutex_static_t default_context_lock = USBI_MUTEX_INITIALIZER;
-static struct timeval timestamp_origin = { 0, 0 };
-
-usbi_mutex_static_t active_contexts_lock = USBI_MUTEX_INITIALIZER;
-struct list_head active_contexts_list;
-
-/**
- * \mainpage libusbx-1.0 API Reference
- *
- * \section intro Introduction
- *
- * libusbx is an open source library that allows you to communicate with USB
- * devices from userspace. For more info, see the
- * <a href="http://libusbx.org">libusbx homepage</a>.
- *
- * This documentation is aimed at application developers wishing to
- * communicate with USB peripherals from their own software. After reviewing
- * this documentation, feedback and questions can be sent to the
- * <a href="http://mailing-list.libusbx.org">libusbx-devel mailing list</a>.
- *
- * This documentation assumes knowledge of how to operate USB devices from
- * a software standpoint (descriptors, configurations, interfaces, endpoints,
- * control/bulk/interrupt/isochronous transfers, etc). Full information
- * can be found in the <a href="http://www.usb.org/developers/docs/">USB 3.0
- * Specification</a> which is available for free download. You can probably
- * find less verbose introductions by searching the web.
- *
- * \section features Library features
- *
- * - All transfer types supported (control/bulk/interrupt/isochronous)
- * - 2 transfer interfaces:
- * -# Synchronous (simple)
- * -# Asynchronous (more complicated, but more powerful)
- * - Thread safe (although the asynchronous interface means that you
- * usually won't need to thread)
- * - Lightweight with lean API
- * - Compatible with libusb-0.1 through the libusb-compat-0.1 translation layer
- * - Hotplug support (on some platforms). See \ref hotplug.
- *
- * \section gettingstarted Getting Started
- *
- * To begin reading the API documentation, start with the Modules page which
- * links to the different categories of libusbx's functionality.
- *
- * One decision you will have to make is whether to use the synchronous
- * or the asynchronous data transfer interface. The \ref io documentation
- * provides some insight into this topic.
- *
- * Some example programs can be found in the libusbx source distribution under
- * the "examples" subdirectory. The libusbx homepage includes a list of
- * real-life project examples which use libusbx.
- *
- * \section errorhandling Error handling
- *
- * libusbx functions typically return 0 on success or a negative error code
- * on failure. These negative error codes relate to LIBUSB_ERROR constants
- * which are listed on the \ref misc "miscellaneous" documentation page.
- *
- * \section msglog Debug message logging
- *
- * libusbx uses stderr for all logging. By default, logging is set to NONE,
- * which means that no output will be produced. However, unless the library
- * has been compiled with logging disabled, then any application calls to
- * libusb_set_debug(), or the setting of the environmental variable
- * LIBUSB_DEBUG outside of the application, can result in logging being
- * produced. Your application should therefore not close stderr, but instead
- * direct it to the null device if its output is undesireable.
- *
- * The libusb_set_debug() function can be used to enable logging of certain
- * messages. Under standard configuration, libusbx doesn't really log much
- * so you are advised to use this function to enable all error/warning/
- * informational messages. It will help debug problems with your software.
- *
- * The logged messages are unstructured. There is no one-to-one correspondence
- * between messages being logged and success or failure return codes from
- * libusbx functions. There is no format to the messages, so you should not
- * try to capture or parse them. They are not and will not be localized.
- * These messages are not intended to being passed to your application user;
- * instead, you should interpret the error codes returned from libusbx functions
- * and provide appropriate notification to the user. The messages are simply
- * there to aid you as a programmer, and if you're confused because you're
- * getting a strange error code from a libusbx function, enabling message
- * logging may give you a suitable explanation.
- *
- * The LIBUSB_DEBUG environment variable can be used to enable message logging
- * at run-time. This environment variable should be set to a log level number,
- * which is interpreted the same as the libusb_set_debug() parameter. When this
- * environment variable is set, the message logging verbosity level is fixed
- * and libusb_set_debug() effectively does nothing.
- *
- * libusbx can be compiled without any logging functions, useful for embedded
- * systems. In this case, libusb_set_debug() and the LIBUSB_DEBUG environment
- * variable have no effects.
- *
- * libusbx can also be compiled with verbose debugging messages always. When
- * the library is compiled in this way, all messages of all verbosities are
- * always logged. libusb_set_debug() and the LIBUSB_DEBUG environment variable
- * have no effects.
- *
- * \section remarks Other remarks
- *
- * libusbx does have imperfections. The \ref caveats "caveats" page attempts
- * to document these.
- */
-
-/**
- * \page caveats Caveats
- *
- * \section devresets Device resets
- *
- * The libusb_reset_device() function allows you to reset a device. If your
- * program has to call such a function, it should obviously be aware that
- * the reset will cause device state to change (e.g. register values may be
- * reset).
- *
- * The problem is that any other program could reset the device your program
- * is working with, at any time. libusbx does not offer a mechanism to inform
- * you when this has happened, so if someone else resets your device it will
- * not be clear to your own program why the device state has changed.
- *
- * Ultimately, this is a limitation of writing drivers in userspace.
- * Separation from the USB stack in the underlying kernel makes it difficult
- * for the operating system to deliver such notifications to your program.
- * The Linux kernel USB stack allows such reset notifications to be delivered
- * to in-kernel USB drivers, but it is not clear how such notifications could
- * be delivered to second-class drivers that live in userspace.
- *
- * \section blockonly Blocking-only functionality
- *
- * The functionality listed below is only available through synchronous,
- * blocking functions. There are no asynchronous/non-blocking alternatives,
- * and no clear ways of implementing these.
- *
- * - Configuration activation (libusb_set_configuration())
- * - Interface/alternate setting activation (libusb_set_interface_alt_setting())
- * - Releasing of interfaces (libusb_release_interface())
- * - Clearing of halt/stall condition (libusb_clear_halt())
- * - Device resets (libusb_reset_device())
- *
- * \section configsel Configuration selection and handling
- *
- * When libusbx presents a device handle to an application, there is a chance
- * that the corresponding device may be in unconfigured state. For devices
- * with multiple configurations, there is also a chance that the configuration
- * currently selected is not the one that the application wants to use.
- *
- * The obvious solution is to add a call to libusb_set_configuration() early
- * on during your device initialization routines, but there are caveats to
- * be aware of:
- * -# If the device is already in the desired configuration, calling
- * libusb_set_configuration() using the same configuration value will cause
- * a lightweight device reset. This may not be desirable behaviour.
- * -# libusbx will be unable to change configuration if the device is in
- * another configuration and other programs or drivers have claimed
- * interfaces under that configuration.
- * -# In the case where the desired configuration is already active, libusbx
- * may not even be able to perform a lightweight device reset. For example,
- * take my USB keyboard with fingerprint reader: I'm interested in driving
- * the fingerprint reader interface through libusbx, but the kernel's
- * USB-HID driver will almost always have claimed the keyboard interface.
- * Because the kernel has claimed an interface, it is not even possible to
- * perform the lightweight device reset, so libusb_set_configuration() will
- * fail. (Luckily the device in question only has a single configuration.)
- *
- * One solution to some of the above problems is to consider the currently
- * active configuration. If the configuration we want is already active, then
- * we don't have to select any configuration:
-\code
-cfg = libusb_get_configuration(dev);
-if (cfg != desired)
- libusb_set_configuration(dev, desired);
-\endcode
- *
- * This is probably suitable for most scenarios, but is inherently racy:
- * another application or driver may change the selected configuration
- * <em>after</em> the libusb_get_configuration() call.
- *
- * Even in cases where libusb_set_configuration() succeeds, consider that other
- * applications or drivers may change configuration after your application
- * calls libusb_set_configuration().
- *
- * One possible way to lock your device into a specific configuration is as
- * follows:
- * -# Set the desired configuration (or use the logic above to realise that
- * it is already in the desired configuration)
- * -# Claim the interface that you wish to use
- * -# Check that the currently active configuration is the one that you want
- * to use.
- *
- * The above method works because once an interface is claimed, no application
- * or driver is able to select another configuration.
- *
- * \section earlycomp Early transfer completion
- *
- * NOTE: This section is currently Linux-centric. I am not sure if any of these
- * considerations apply to Darwin or other platforms.
- *
- * When a transfer completes early (i.e. when less data is received/sent in
- * any one packet than the transfer buffer allows for) then libusbx is designed
- * to terminate the transfer immediately, not transferring or receiving any
- * more data unless other transfers have been queued by the user.
- *
- * On legacy platforms, libusbx is unable to do this in all situations. After
- * the incomplete packet occurs, "surplus" data may be transferred. For recent
- * versions of libusbx, this information is kept (the data length of the
- * transfer is updated) and, for device-to-host transfers, any surplus data was
- * added to the buffer. Still, this is not a nice solution because it loses the
- * information about the end of the short packet, and the user probably wanted
- * that surplus data to arrive in the next logical transfer.
- *
- *
- * \section zlp Zero length packets
- *
- * - libusbx is able to send a packet of zero length to an endpoint simply by
- * submitting a transfer of zero length.
- * - The \ref libusb_transfer_flags::LIBUSB_TRANSFER_ADD_ZERO_PACKET
- * "LIBUSB_TRANSFER_ADD_ZERO_PACKET" flag is currently only supported on Linux.
- */
-
-/**
- * \page contexts Contexts
- *
- * It is possible that libusbx may be used simultaneously from two independent
- * libraries linked into the same executable. For example, if your application
- * has a plugin-like system which allows the user to dynamically load a range
- * of modules into your program, it is feasible that two independently
- * developed modules may both use libusbx.
- *
- * libusbx is written to allow for these multiple user scenarios. The two
- * "instances" of libusbx will not interfere: libusb_set_debug() calls
- * from one user will not affect the same settings for other users, other
- * users can continue using libusbx after one of them calls libusb_exit(), etc.
- *
- * This is made possible through libusbx's <em>context</em> concept. When you
- * call libusb_init(), you are (optionally) given a context. You can then pass
- * this context pointer back into future libusbx functions.
- *
- * In order to keep things simple for more simplistic applications, it is
- * legal to pass NULL to all functions requiring a context pointer (as long as
- * you're sure no other code will attempt to use libusbx from the same process).
- * When you pass NULL, the default context will be used. The default context
- * is created the first time a process calls libusb_init() when no other
- * context is alive. Contexts are destroyed during libusb_exit().
- *
- * The default context is reference-counted and can be shared. That means that
- * if libusb_init(NULL) is called twice within the same process, the two
- * users end up sharing the same context. The deinitialization and freeing of
- * the default context will only happen when the last user calls libusb_exit().
- * In other words, the default context is created and initialized when its
- * reference count goes from 0 to 1, and is deinitialized and destroyed when
- * its reference count goes from 1 to 0.
- *
- * You may be wondering why only a subset of libusbx functions require a
- * context pointer in their function definition. Internally, libusbx stores
- * context pointers in other objects (e.g. libusb_device instances) and hence
- * can infer the context from those objects.
- */
-
-/**
- * @defgroup lib Library initialization/deinitialization
- * This page details how to initialize and deinitialize libusbx. Initialization
- * must be performed before using any libusbx functionality, and similarly you
- * must not call any libusbx functions after deinitialization.
- */
-
-/**
- * @defgroup dev Device handling and enumeration
- * The functionality documented below is designed to help with the following
- * operations:
- * - Enumerating the USB devices currently attached to the system
- * - Choosing a device to operate from your software
- * - Opening and closing the chosen device
- *
- * \section nutshell In a nutshell...
- *
- * The description below really makes things sound more complicated than they
- * actually are. The following sequence of function calls will be suitable
- * for almost all scenarios and does not require you to have such a deep
- * understanding of the resource management issues:
- * \code
-// discover devices
-libusb_device **list;
-libusb_device *found = NULL;
-ssize_t cnt = libusb_get_device_list(NULL, &list);
-ssize_t i = 0;
-int err = 0;
-if (cnt < 0)
- error();
-
-for (i = 0; i < cnt; i++) {
- libusb_device *device = list[i];
- if (is_interesting(device)) {
- found = device;
- break;
- }
-}
-
-if (found) {
- libusb_device_handle *handle;
-
- err = libusb_open(found, &handle);
- if (err)
- error();
- // etc
-}
-
-libusb_free_device_list(list, 1);
-\endcode
- *
- * The two important points:
- * - You asked libusb_free_device_list() to unreference the devices (2nd
- * parameter)
- * - You opened the device before freeing the list and unreferencing the
- * devices
- *
- * If you ended up with a handle, you can now proceed to perform I/O on the
- * device.
- *
- * \section devshandles Devices and device handles
- * libusbx has a concept of a USB device, represented by the
- * \ref libusb_device opaque type. A device represents a USB device that
- * is currently or was previously connected to the system. Using a reference
- * to a device, you can determine certain information about the device (e.g.
- * you can read the descriptor data).
- *
- * The libusb_get_device_list() function can be used to obtain a list of
- * devices currently connected to the system. This is known as device
- * discovery.
- *
- * Just because you have a reference to a device does not mean it is
- * necessarily usable. The device may have been unplugged, you may not have
- * permission to operate such device, or another program or driver may be
- * using the device.
- *
- * When you've found a device that you'd like to operate, you must ask
- * libusbx to open the device using the libusb_open() function. Assuming
- * success, libusbx then returns you a <em>device handle</em>
- * (a \ref libusb_device_handle pointer). All "real" I/O operations then
- * operate on the handle rather than the original device pointer.
- *
- * \section devref Device discovery and reference counting
- *
- * Device discovery (i.e. calling libusb_get_device_list()) returns a
- * freshly-allocated list of devices. The list itself must be freed when
- * you are done with it. libusbx also needs to know when it is OK to free
- * the contents of the list - the devices themselves.
- *
- * To handle these issues, libusbx provides you with two separate items:
- * - A function to free the list itself
- * - A reference counting system for the devices inside
- *
- * New devices presented by the libusb_get_device_list() function all have a
- * reference count of 1. You can increase and decrease reference count using
- * libusb_ref_device() and libusb_unref_device(). A device is destroyed when
- * its reference count reaches 0.
- *
- * With the above information in mind, the process of opening a device can
- * be viewed as follows:
- * -# Discover devices using libusb_get_device_list().
- * -# Choose the device that you want to operate, and call libusb_open().
- * -# Unref all devices in the discovered device list.
- * -# Free the discovered device list.
- *
- * The order is important - you must not unreference the device before
- * attempting to open it, because unreferencing it may destroy the device.
- *
- * For convenience, the libusb_free_device_list() function includes a
- * parameter to optionally unreference all the devices in the list before
- * freeing the list itself. This combines steps 3 and 4 above.
- *
- * As an implementation detail, libusb_open() actually adds a reference to
- * the device in question. This is because the device remains available
- * through the handle via libusb_get_device(). The reference is deleted during
- * libusb_close().
- */
-
-/** @defgroup misc Miscellaneous */
-
-/* we traverse usbfs without knowing how many devices we are going to find.
- * so we create this discovered_devs model which is similar to a linked-list
- * which grows when required. it can be freed once discovery has completed,
- * eliminating the need for a list node in the libusb_device structure
- * itself. */
-#define DISCOVERED_DEVICES_SIZE_STEP 8
-
-static struct discovered_devs *discovered_devs_alloc(void)
-{
- struct discovered_devs *ret =
- malloc(sizeof(*ret) + (sizeof(void *) * DISCOVERED_DEVICES_SIZE_STEP));
-
- if (ret) {
- ret->len = 0;
- ret->capacity = DISCOVERED_DEVICES_SIZE_STEP;
- }
- return ret;
-}
-
-/* append a device to the discovered devices collection. may realloc itself,
- * returning new discdevs. returns NULL on realloc failure. */
-struct discovered_devs *discovered_devs_append(
- struct discovered_devs *discdevs, struct libusb_device *dev)
-{
- size_t len = discdevs->len;
- size_t capacity;
-
- /* if there is space, just append the device */
- if (len < discdevs->capacity) {
- discdevs->devices[len] = libusb_ref_device(dev);
- discdevs->len++;
- return discdevs;
- }
-
- /* exceeded capacity, need to grow */
- usbi_dbg("need to increase capacity");
- capacity = discdevs->capacity + DISCOVERED_DEVICES_SIZE_STEP;
- discdevs = usbi_reallocf(discdevs,
- sizeof(*discdevs) + (sizeof(void *) * capacity));
- if (discdevs) {
- discdevs->capacity = capacity;
- discdevs->devices[len] = libusb_ref_device(dev);
- discdevs->len++;
- }
-
- return discdevs;
-}
-
-static void discovered_devs_free(struct discovered_devs *discdevs)
-{
- size_t i;
-
- for (i = 0; i < discdevs->len; i++)
- libusb_unref_device(discdevs->devices[i]);
-
- free(discdevs);
-}
-
-/* Allocate a new device with a specific session ID. The returned device has
- * a reference count of 1. */
-struct libusb_device *usbi_alloc_device(struct libusb_context *ctx,
- unsigned long session_id)
-{
- size_t priv_size = usbi_backend->device_priv_size;
- struct libusb_device *dev = calloc(1, sizeof(*dev) + priv_size);
- int r;
-
- if (!dev)
- return NULL;
-
- r = usbi_mutex_init(&dev->lock, NULL);
- if (r) {
- free(dev);
- return NULL;
- }
-
- dev->ctx = ctx;
- dev->refcnt = 1;
- dev->session_data = session_id;
- dev->speed = LIBUSB_SPEED_UNKNOWN;
-
- if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- usbi_connect_device (dev);
- }
-
- return dev;
-}
-
-void usbi_connect_device(struct libusb_device *dev)
-{
- libusb_hotplug_message message;
- ssize_t ret;
-
- memset(&message, 0, sizeof(message));
- message.event = LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED;
- message.device = dev;
- dev->attached = 1;
-
- usbi_mutex_lock(&dev->ctx->usb_devs_lock);
- list_add(&dev->list, &dev->ctx->usb_devs);
- usbi_mutex_unlock(&dev->ctx->usb_devs_lock);
-
- /* Signal that an event has occurred for this device if we support hotplug AND
- * the hotplug pipe is ready. This prevents an event from getting raised during
- * initial enumeration. */
- if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) && dev->ctx->hotplug_pipe[1] > 0) {
- ret = usbi_write(dev->ctx->hotplug_pipe[1], &message, sizeof(message));
- if (sizeof (message) != ret) {
- usbi_err(DEVICE_CTX(dev), "error writing hotplug message");
- }
- }
-}
-
-void usbi_disconnect_device(struct libusb_device *dev)
-{
- libusb_hotplug_message message;
- struct libusb_context *ctx = dev->ctx;
- ssize_t ret;
-
- memset(&message, 0, sizeof(message));
- message.event = LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT;
- message.device = dev;
- usbi_mutex_lock(&dev->lock);
- dev->attached = 0;
- usbi_mutex_unlock(&dev->lock);
-
- /* Signal that an event has occurred for this device if we support hotplug AND
- * the hotplug pipe is ready. This prevents an event from getting raised during
- * initial enumeration. libusb_handle_events will take care of dereferencing the
- * device. */
- if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) && dev->ctx->hotplug_pipe[1] > 0) {
- ret = usbi_write(dev->ctx->hotplug_pipe[1], &message, sizeof(message));
- if (sizeof(message) != ret) {
- usbi_err(DEVICE_CTX(dev), "error writing hotplug message");
- }
- }
-
- usbi_mutex_lock(&ctx->usb_devs_lock);
- list_del(&dev->list);
- usbi_mutex_unlock(&ctx->usb_devs_lock);
-}
-
-/* Perform some final sanity checks on a newly discovered device. If this
- * function fails (negative return code), the device should not be added
- * to the discovered device list. */
-int usbi_sanitize_device(struct libusb_device *dev)
-{
- int r;
- uint8_t num_configurations;
-
- r = usbi_device_cache_descriptor(dev);
- if (r < 0)
- return r;
-
- num_configurations = dev->device_descriptor.bNumConfigurations;
- if (num_configurations > USB_MAXCONFIG) {
- usbi_err(DEVICE_CTX(dev), "too many configurations");
- return LIBUSB_ERROR_IO;
- } else if (0 == num_configurations)
- usbi_dbg("zero configurations, maybe an unauthorized device");
-
- dev->num_configurations = num_configurations;
- return 0;
-}
-
-/* Examine libusbx's internal list of known devices, looking for one with
- * a specific session ID. Returns the matching device if it was found, and
- * NULL otherwise. */
-struct libusb_device *usbi_get_device_by_session_id(struct libusb_context *ctx,
- unsigned long session_id)
-{
- struct libusb_device *dev;
- struct libusb_device *ret = NULL;
-
- usbi_mutex_lock(&ctx->usb_devs_lock);
- list_for_each_entry(dev, &ctx->usb_devs, list, struct libusb_device)
- if (dev->session_data == session_id) {
- ret = dev;
- break;
- }
- usbi_mutex_unlock(&ctx->usb_devs_lock);
-
- return ret;
-}
-
-/** @ingroup dev
- * Returns a list of USB devices currently attached to the system. This is
- * your entry point into finding a USB device to operate.
- *
- * You are expected to unreference all the devices when you are done with
- * them, and then free the list with libusb_free_device_list(). Note that
- * libusb_free_device_list() can unref all the devices for you. Be careful
- * not to unreference a device you are about to open until after you have
- * opened it.
- *
- * This return value of this function indicates the number of devices in
- * the resultant list. The list is actually one element larger, as it is
- * NULL-terminated.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param list output location for a list of devices. Must be later freed with
- * libusb_free_device_list().
- * \returns the number of devices in the outputted list, or any
- * \ref libusb_error according to errors encountered by the backend.
- */
-ssize_t API_EXPORTED libusb_get_device_list(libusb_context *ctx,
- libusb_device ***list)
-{
- struct discovered_devs *discdevs = discovered_devs_alloc();
- struct libusb_device **ret;
- int r = 0;
- ssize_t i, len;
- USBI_GET_CONTEXT(ctx);
- usbi_dbg("");
-
- if (!discdevs)
- return LIBUSB_ERROR_NO_MEM;
-
- if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- /* backend provides hotplug support */
- struct libusb_device *dev;
-
- if (usbi_backend->hotplug_poll)
- usbi_backend->hotplug_poll();
-
- usbi_mutex_lock(&ctx->usb_devs_lock);
- list_for_each_entry(dev, &ctx->usb_devs, list, struct libusb_device) {
- discdevs = discovered_devs_append(discdevs, dev);
-
- if (!discdevs) {
- r = LIBUSB_ERROR_NO_MEM;
- break;
- }
- }
- usbi_mutex_unlock(&ctx->usb_devs_lock);
- } else {
- /* backend does not provide hotplug support */
- r = usbi_backend->get_device_list(ctx, &discdevs);
- }
-
- if (r < 0) {
- len = r;
- goto out;
- }
-
- /* convert discovered_devs into a list */
- len = discdevs->len;
- ret = calloc(len + 1, sizeof(struct libusb_device *));
- if (!ret) {
- len = LIBUSB_ERROR_NO_MEM;
- goto out;
- }
-
- ret[len] = NULL;
- for (i = 0; i < len; i++) {
- struct libusb_device *dev = discdevs->devices[i];
- ret[i] = libusb_ref_device(dev);
- }
- *list = ret;
-
-out:
- discovered_devs_free(discdevs);
- return len;
-}
-
-/** \ingroup dev
- * Frees a list of devices previously discovered using
- * libusb_get_device_list(). If the unref_devices parameter is set, the
- * reference count of each device in the list is decremented by 1.
- * \param list the list to free
- * \param unref_devices whether to unref the devices in the list
- */
-void API_EXPORTED libusb_free_device_list(libusb_device **list,
- int unref_devices)
-{
- if (!list)
- return;
-
- if (unref_devices) {
- int i = 0;
- struct libusb_device *dev;
-
- while ((dev = list[i++]) != NULL)
- libusb_unref_device(dev);
- }
- free(list);
-}
-
-/** \ingroup dev
- * Get the number of the bus that a device is connected to.
- * \param dev a device
- * \returns the bus number
- */
-uint8_t API_EXPORTED libusb_get_bus_number(libusb_device *dev)
-{
- return dev->bus_number;
-}
-
-/** \ingroup dev
- * Get the number of the port that a device is connected to.
- * Unless the OS does something funky, or you are hot-plugging USB extension cards,
- * the port number returned by this call is usually guaranteed to be uniquely tied
- * to a physical port, meaning that different devices plugged on the same physical
- * port should return the same port number.
- *
- * But outside of this, there is no guarantee that the port number returned by this
- * call will remain the same, or even match the order in which ports have been
- * numbered by the HUB/HCD manufacturer.
- *
- * \param dev a device
- * \returns the port number (0 if not available)
- */
-uint8_t API_EXPORTED libusb_get_port_number(libusb_device *dev)
-{
- return dev->port_number;
-}
-
-/** \ingroup dev
- * Get the list of all port numbers from root for the specified device
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- * \param dev a device
- * \param port_numbers the array that should contain the port numbers
- * \param port_numbers_len the maximum length of the array. As per the USB 3.0
- * specs, the current maximum limit for the depth is 7.
- * \returns the number of elements filled
- * \returns LIBUSB_ERROR_OVERFLOW if the array is too small
- */
-int API_EXPORTED libusb_get_port_numbers(libusb_device *dev,
- uint8_t* port_numbers, int port_numbers_len)
-{
- int i = port_numbers_len;
-
- while(dev) {
- // HCDs can be listed as devices and would have port #0
- // TODO: see how the other backends want to implement HCDs as parents
- if (dev->port_number == 0)
- break;
- i--;
- if (i < 0) {
- usbi_warn(DEVICE_CTX(dev),
- "port numbers array too small");
- return LIBUSB_ERROR_OVERFLOW;
- }
- port_numbers[i] = dev->port_number;
- dev = dev->parent_dev;
- }
- memmove(port_numbers, &port_numbers[i], port_numbers_len - i);
- return port_numbers_len - i;
-}
-
-/** \ingroup dev
- * Deprecated please use libusb_get_port_numbers instead.
- */
-int API_EXPORTED libusb_get_port_path(libusb_context *ctx, libusb_device *dev,
- uint8_t* port_numbers, uint8_t port_numbers_len)
-{
- UNUSED(ctx);
-
- return libusb_get_port_numbers(dev, port_numbers, port_numbers_len);
-}
-
-/** \ingroup dev
- * Get the the parent from the specified device.
- * \param dev a device
- * \returns the device parent or NULL if not available
- * You should issue a \ref libusb_get_device_list() before calling this
- * function and make sure that you only access the parent before issuing
- * \ref libusb_free_device_list(). The reason is that libusbx currently does
- * not maintain a permanent list of device instances, and therefore can
- * only guarantee that parents are fully instantiated within a
- * libusb_get_device_list() - libusb_free_device_list() block.
- */
-DEFAULT_VISIBILITY
-libusb_device * LIBUSB_CALL libusb_get_parent(libusb_device *dev)
-{
- return dev->parent_dev;
-}
-
-/** \ingroup dev
- * Get the address of the device on the bus it is connected to.
- * \param dev a device
- * \returns the device address
- */
-uint8_t API_EXPORTED libusb_get_device_address(libusb_device *dev)
-{
- return dev->device_address;
-}
-
-/** \ingroup dev
- * Get the negotiated connection speed for a device.
- * \param dev a device
- * \returns a \ref libusb_speed code, where LIBUSB_SPEED_UNKNOWN means that
- * the OS doesn't know or doesn't support returning the negotiated speed.
- */
-int API_EXPORTED libusb_get_device_speed(libusb_device *dev)
-{
- return dev->speed;
-}
-
-static const struct libusb_endpoint_descriptor *find_endpoint(
- struct libusb_config_descriptor *config, unsigned char endpoint)
-{
- int iface_idx;
- for (iface_idx = 0; iface_idx < config->bNumInterfaces; iface_idx++) {
- const struct libusb_interface *iface = &config->interface[iface_idx];
- int altsetting_idx;
-
- for (altsetting_idx = 0; altsetting_idx < iface->num_altsetting;
- altsetting_idx++) {
- const struct libusb_interface_descriptor *altsetting
- = &iface->altsetting[altsetting_idx];
- int ep_idx;
-
- for (ep_idx = 0; ep_idx < altsetting->bNumEndpoints; ep_idx++) {
- const struct libusb_endpoint_descriptor *ep =
- &altsetting->endpoint[ep_idx];
- if (ep->bEndpointAddress == endpoint)
- return ep;
- }
- }
- }
- return NULL;
-}
-
-/** \ingroup dev
- * Convenience function to retrieve the wMaxPacketSize value for a particular
- * endpoint in the active device configuration.
- *
- * This function was originally intended to be of assistance when setting up
- * isochronous transfers, but a design mistake resulted in this function
- * instead. It simply returns the wMaxPacketSize value without considering
- * its contents. If you're dealing with isochronous transfers, you probably
- * want libusb_get_max_iso_packet_size() instead.
- *
- * \param dev a device
- * \param endpoint address of the endpoint in question
- * \returns the wMaxPacketSize value
- * \returns LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist
- * \returns LIBUSB_ERROR_OTHER on other failure
- */
-int API_EXPORTED libusb_get_max_packet_size(libusb_device *dev,
- unsigned char endpoint)
-{
- struct libusb_config_descriptor *config;
- const struct libusb_endpoint_descriptor *ep;
- int r;
-
- r = libusb_get_active_config_descriptor(dev, &config);
- if (r < 0) {
- usbi_err(DEVICE_CTX(dev),
- "could not retrieve active config descriptor");
- return LIBUSB_ERROR_OTHER;
- }
-
- ep = find_endpoint(config, endpoint);
- if (!ep)
- return LIBUSB_ERROR_NOT_FOUND;
-
- r = ep->wMaxPacketSize;
- libusb_free_config_descriptor(config);
- return r;
-}
-
-/** \ingroup dev
- * Calculate the maximum packet size which a specific endpoint is capable is
- * sending or receiving in the duration of 1 microframe
- *
- * Only the active configuration is examined. The calculation is based on the
- * wMaxPacketSize field in the endpoint descriptor as described in section
- * 9.6.6 in the USB 2.0 specifications.
- *
- * If acting on an isochronous or interrupt endpoint, this function will
- * multiply the value found in bits 0:10 by the number of transactions per
- * microframe (determined by bits 11:12). Otherwise, this function just
- * returns the numeric value found in bits 0:10.
- *
- * This function is useful for setting up isochronous transfers, for example
- * you might pass the return value from this function to
- * libusb_set_iso_packet_lengths() in order to set the length field of every
- * isochronous packet in a transfer.
- *
- * Since v1.0.3.
- *
- * \param dev a device
- * \param endpoint address of the endpoint in question
- * \returns the maximum packet size which can be sent/received on this endpoint
- * \returns LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist
- * \returns LIBUSB_ERROR_OTHER on other failure
- */
-int API_EXPORTED libusb_get_max_iso_packet_size(libusb_device *dev,
- unsigned char endpoint)
-{
- struct libusb_config_descriptor *config;
- const struct libusb_endpoint_descriptor *ep;
- enum libusb_transfer_type ep_type;
- uint16_t val;
- int r;
-
- r = libusb_get_active_config_descriptor(dev, &config);
- if (r < 0) {
- usbi_err(DEVICE_CTX(dev),
- "could not retrieve active config descriptor");
- return LIBUSB_ERROR_OTHER;
- }
-
- ep = find_endpoint(config, endpoint);
- if (!ep)
- return LIBUSB_ERROR_NOT_FOUND;
-
- val = ep->wMaxPacketSize;
- ep_type = (enum libusb_transfer_type) (ep->bmAttributes & 0x3);
- libusb_free_config_descriptor(config);
-
- r = val & 0x07ff;
- if (ep_type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS
- || ep_type == LIBUSB_TRANSFER_TYPE_INTERRUPT)
- r *= (1 + ((val >> 11) & 3));
- return r;
-}
-
-/** \ingroup dev
- * Increment the reference count of a device.
- * \param dev the device to reference
- * \returns the same device
- */
-DEFAULT_VISIBILITY
-libusb_device * LIBUSB_CALL libusb_ref_device(libusb_device *dev)
-{
- usbi_mutex_lock(&dev->lock);
- dev->refcnt++;
- usbi_mutex_unlock(&dev->lock);
- return dev;
-}
-
-/** \ingroup dev
- * Decrement the reference count of a device. If the decrement operation
- * causes the reference count to reach zero, the device shall be destroyed.
- * \param dev the device to unreference
- */
-void API_EXPORTED libusb_unref_device(libusb_device *dev)
-{
- int refcnt;
-
- if (!dev)
- return;
-
- usbi_mutex_lock(&dev->lock);
- refcnt = --dev->refcnt;
- usbi_mutex_unlock(&dev->lock);
-
- if (refcnt == 0) {
- usbi_dbg("destroy device %d.%d", dev->bus_number, dev->device_address);
-
- libusb_unref_device(dev->parent_dev);
-
- if (usbi_backend->destroy_device)
- usbi_backend->destroy_device(dev);
-
- if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- /* backend does not support hotplug */
- usbi_disconnect_device(dev);
- }
-
- usbi_mutex_destroy(&dev->lock);
- free(dev);
- }
-}
-
-/*
- * Interrupt the iteration of the event handling thread, so that it picks
- * up the new fd.
- */
-void usbi_fd_notification(struct libusb_context *ctx)
-{
- unsigned char dummy = 1;
- ssize_t r;
-
- if (ctx == NULL)
- return;
-
- /* record that we are messing with poll fds */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ctx->pollfd_modify++;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
-
- /* write some data on control pipe to interrupt event handlers */
- r = usbi_write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
- if (r <= 0) {
- usbi_warn(ctx, "internal signalling write failed");
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ctx->pollfd_modify--;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
- return;
- }
-
- /* take event handling lock */
- libusb_lock_events(ctx);
-
- /* read the dummy data */
- r = usbi_read(ctx->ctrl_pipe[0], &dummy, sizeof(dummy));
- if (r <= 0)
- usbi_warn(ctx, "internal signalling read failed");
-
- /* we're done with modifying poll fds */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ctx->pollfd_modify--;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
-
- /* Release event handling lock and wake up event waiters */
- libusb_unlock_events(ctx);
-}
-
-/** \ingroup dev
- * Open a device and obtain a device handle. A handle allows you to perform
- * I/O on the device in question.
- *
- * Internally, this function adds a reference to the device and makes it
- * available to you through libusb_get_device(). This reference is removed
- * during libusb_close().
- *
- * This is a non-blocking function; no requests are sent over the bus.
- *
- * \param dev the device to open
- * \param handle output location for the returned device handle pointer. Only
- * populated when the return code is 0.
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NO_MEM on memory allocation failure
- * \returns LIBUSB_ERROR_ACCESS if the user has insufficient permissions
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- */
-int API_EXPORTED libusb_open(libusb_device *dev,
- libusb_device_handle **handle)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev);
- struct libusb_device_handle *_handle;
- size_t priv_size = usbi_backend->device_handle_priv_size;
- int r;
- usbi_dbg("open %d.%d", dev->bus_number, dev->device_address);
-
- if (!dev->attached) {
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- _handle = malloc(sizeof(*_handle) + priv_size);
- if (!_handle)
- return LIBUSB_ERROR_NO_MEM;
-
- r = usbi_mutex_init(&_handle->lock, NULL);
- if (r) {
- free(_handle);
- return LIBUSB_ERROR_OTHER;
- }
-
- _handle->dev = libusb_ref_device(dev);
- _handle->auto_detach_kernel_driver = 0;
- _handle->claimed_interfaces = 0;
- memset(&_handle->os_priv, 0, priv_size);
-
- r = usbi_backend->open(_handle);
- if (r < 0) {
- usbi_dbg("open %d.%d returns %d", dev->bus_number, dev->device_address, r);
- libusb_unref_device(dev);
- usbi_mutex_destroy(&_handle->lock);
- free(_handle);
- return r;
- }
-
- usbi_mutex_lock(&ctx->open_devs_lock);
- list_add(&_handle->list, &ctx->open_devs);
- usbi_mutex_unlock(&ctx->open_devs_lock);
- *handle = _handle;
-
- /* At this point, we want to interrupt any existing event handlers so
- * that they realise the addition of the new device's poll fd. One
- * example when this is desirable is if the user is running a separate
- * dedicated libusbx events handling thread, which is running with a long
- * or infinite timeout. We want to interrupt that iteration of the loop,
- * so that it picks up the new fd, and then continues. */
- usbi_fd_notification(ctx);
-
- return 0;
-}
-
-/** \ingroup dev
- * Convenience function for finding a device with a particular
- * <tt>idVendor</tt>/<tt>idProduct</tt> combination. This function is intended
- * for those scenarios where you are using libusbx to knock up a quick test
- * application - it allows you to avoid calling libusb_get_device_list() and
- * worrying about traversing/freeing the list.
- *
- * This function has limitations and is hence not intended for use in real
- * applications: if multiple devices have the same IDs it will only
- * give you the first one, etc.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param vendor_id the idVendor value to search for
- * \param product_id the idProduct value to search for
- * \returns a handle for the first found device, or NULL on error or if the
- * device could not be found. */
-DEFAULT_VISIBILITY
-libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid(
- libusb_context *ctx, uint16_t vendor_id, uint16_t product_id)
-{
- struct libusb_device **devs;
- struct libusb_device *found = NULL;
- struct libusb_device *dev;
- struct libusb_device_handle *handle = NULL;
- size_t i = 0;
- int r;
-
- if (libusb_get_device_list(ctx, &devs) < 0)
- return NULL;
-
- while ((dev = devs[i++]) != NULL) {
- struct libusb_device_descriptor desc;
- r = libusb_get_device_descriptor(dev, &desc);
- if (r < 0)
- goto out;
- if (desc.idVendor == vendor_id && desc.idProduct == product_id) {
- found = dev;
- break;
- }
- }
-
- if (found) {
- r = libusb_open(found, &handle);
- if (r < 0)
- handle = NULL;
- }
-
-out:
- libusb_free_device_list(devs, 1);
- return handle;
-}
-
-static void do_close(struct libusb_context *ctx,
- struct libusb_device_handle *dev_handle)
-{
- struct usbi_transfer *itransfer;
- struct usbi_transfer *tmp;
-
- libusb_lock_events(ctx);
-
- /* remove any transfers in flight that are for this device */
- usbi_mutex_lock(&ctx->flying_transfers_lock);
-
- /* safe iteration because transfers may be being deleted */
- list_for_each_entry_safe(itransfer, tmp, &ctx->flying_transfers, list, struct usbi_transfer) {
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- if (transfer->dev_handle != dev_handle)
- continue;
-
- if (!(itransfer->flags & USBI_TRANSFER_DEVICE_DISAPPEARED)) {
- usbi_err(ctx, "Device handle closed while transfer was still being processed, but the device is still connected as far as we know");
-
- if (itransfer->flags & USBI_TRANSFER_CANCELLING)
- usbi_warn(ctx, "A cancellation for an in-flight transfer hasn't completed but closing the device handle");
- else
- usbi_err(ctx, "A cancellation hasn't even been scheduled on the transfer for which the device is closing");
- }
-
- /* remove from the list of in-flight transfers and make sure
- * we don't accidentally use the device handle in the future
- * (or that such accesses will be easily caught and identified as a crash)
- */
- usbi_mutex_lock(&itransfer->lock);
- list_del(&itransfer->list);
- transfer->dev_handle = NULL;
- usbi_mutex_unlock(&itransfer->lock);
-
- /* it is up to the user to free up the actual transfer struct. this is
- * just making sure that we don't attempt to process the transfer after
- * the device handle is invalid
- */
- usbi_dbg("Removed transfer %p from the in-flight list because device handle %p closed",
- transfer, dev_handle);
- }
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
-
- libusb_unlock_events(ctx);
-
- usbi_mutex_lock(&ctx->open_devs_lock);
- list_del(&dev_handle->list);
- usbi_mutex_unlock(&ctx->open_devs_lock);
-
- usbi_backend->close(dev_handle);
- libusb_unref_device(dev_handle->dev);
- usbi_mutex_destroy(&dev_handle->lock);
- free(dev_handle);
-}
-
-/** \ingroup dev
- * Close a device handle. Should be called on all open handles before your
- * application exits.
- *
- * Internally, this function destroys the reference that was added by
- * libusb_open() on the given device.
- *
- * This is a non-blocking function; no requests are sent over the bus.
- *
- * \param dev_handle the handle to close
- */
-void API_EXPORTED libusb_close(libusb_device_handle *dev_handle)
-{
- struct libusb_context *ctx;
- unsigned char dummy = 1;
- ssize_t r;
-
- if (!dev_handle)
- return;
- usbi_dbg("");
-
- ctx = HANDLE_CTX(dev_handle);
-
- /* Similarly to libusb_open(), we want to interrupt all event handlers
- * at this point. More importantly, we want to perform the actual close of
- * the device while holding the event handling lock (preventing any other
- * thread from doing event handling) because we will be removing a file
- * descriptor from the polling loop. */
-
- /* record that we are messing with poll fds */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ctx->pollfd_modify++;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
-
- /* write some data on control pipe to interrupt event handlers */
- r = usbi_write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
- if (r <= 0) {
- usbi_warn(ctx, "internal signalling write failed, closing anyway");
- do_close(ctx, dev_handle);
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ctx->pollfd_modify--;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
- return;
- }
-
- /* take event handling lock */
- libusb_lock_events(ctx);
-
- /* read the dummy data */
- r = usbi_read(ctx->ctrl_pipe[0], &dummy, sizeof(dummy));
- if (r <= 0)
- usbi_warn(ctx, "internal signalling read failed, closing anyway");
-
- /* Close the device */
- do_close(ctx, dev_handle);
-
- /* we're done with modifying poll fds */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ctx->pollfd_modify--;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
-
- /* Release event handling lock and wake up event waiters */
- libusb_unlock_events(ctx);
-}
-
-/** \ingroup dev
- * Get the underlying device for a handle. This function does not modify
- * the reference count of the returned device, so do not feel compelled to
- * unreference it when you are done.
- * \param dev_handle a device handle
- * \returns the underlying device
- */
-DEFAULT_VISIBILITY
-libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle)
-{
- return dev_handle->dev;
-}
-
-/** \ingroup dev
- * Determine the bConfigurationValue of the currently active configuration.
- *
- * You could formulate your own control request to obtain this information,
- * but this function has the advantage that it may be able to retrieve the
- * information from operating system caches (no I/O involved).
- *
- * If the OS does not cache this information, then this function will block
- * while a control transfer is submitted to retrieve the information.
- *
- * This function will return a value of 0 in the <tt>config</tt> output
- * parameter if the device is in unconfigured state.
- *
- * \param dev a device handle
- * \param config output location for the bConfigurationValue of the active
- * configuration (only valid for return code 0)
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- */
-int API_EXPORTED libusb_get_configuration(libusb_device_handle *dev,
- int *config)
-{
- int r = LIBUSB_ERROR_NOT_SUPPORTED;
-
- usbi_dbg("");
- if (usbi_backend->get_configuration)
- r = usbi_backend->get_configuration(dev, config);
-
- if (r == LIBUSB_ERROR_NOT_SUPPORTED) {
- uint8_t tmp = 0;
- usbi_dbg("falling back to control message");
- r = libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN,
- LIBUSB_REQUEST_GET_CONFIGURATION, 0, 0, &tmp, 1, 1000);
- if (r == 0) {
- usbi_err(HANDLE_CTX(dev), "zero bytes returned in ctrl transfer?");
- r = LIBUSB_ERROR_IO;
- } else if (r == 1) {
- r = 0;
- *config = tmp;
- } else {
- usbi_dbg("control failed, error %d", r);
- }
- }
-
- if (r == 0)
- usbi_dbg("active config %d", *config);
-
- return r;
-}
-
-/** \ingroup dev
- * Set the active configuration for a device.
- *
- * The operating system may or may not have already set an active
- * configuration on the device. It is up to your application to ensure the
- * correct configuration is selected before you attempt to claim interfaces
- * and perform other operations.
- *
- * If you call this function on a device already configured with the selected
- * configuration, then this function will act as a lightweight device reset:
- * it will issue a SET_CONFIGURATION request using the current configuration,
- * causing most USB-related device state to be reset (altsetting reset to zero,
- * endpoint halts cleared, toggles reset).
- *
- * You cannot change/reset configuration if your application has claimed
- * interfaces. It is advised to set the desired configuration before claiming
- * interfaces.
- *
- * Alternatively you can call libusb_release_interface() first. Note if you
- * do things this way you must ensure that auto_detach_kernel_driver for
- * <tt>dev</tt> is 0, otherwise the kernel driver will be re-attached when you
- * release the interface(s).
- *
- * You cannot change/reset configuration if other applications or drivers have
- * claimed interfaces.
- *
- * A configuration value of -1 will put the device in unconfigured state.
- * The USB specifications state that a configuration value of 0 does this,
- * however buggy devices exist which actually have a configuration 0.
- *
- * You should always use this function rather than formulating your own
- * SET_CONFIGURATION control request. This is because the underlying operating
- * system needs to know when such changes happen.
- *
- * This is a blocking function.
- *
- * \param dev a device handle
- * \param configuration the bConfigurationValue of the configuration you
- * wish to activate, or -1 if you wish to put the device in unconfigured state
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the requested configuration does not exist
- * \returns LIBUSB_ERROR_BUSY if interfaces are currently claimed
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- * \see libusb_set_auto_detach_kernel_driver()
- */
-int API_EXPORTED libusb_set_configuration(libusb_device_handle *dev,
- int configuration)
-{
- usbi_dbg("configuration %d", configuration);
- return usbi_backend->set_configuration(dev, configuration);
-}
-
-/** \ingroup dev
- * Claim an interface on a given device handle. You must claim the interface
- * you wish to use before you can perform I/O on any of its endpoints.
- *
- * It is legal to attempt to claim an already-claimed interface, in which
- * case libusbx just returns 0 without doing anything.
- *
- * If auto_detach_kernel_driver is set to 1 for <tt>dev</tt>, the kernel driver
- * will be detached if necessary, on failure the detach error is returned.
- *
- * Claiming of interfaces is a purely logical operation; it does not cause
- * any requests to be sent over the bus. Interface claiming is used to
- * instruct the underlying operating system that your application wishes
- * to take ownership of the interface.
- *
- * This is a non-blocking function.
- *
- * \param dev a device handle
- * \param interface_number the <tt>bInterfaceNumber</tt> of the interface you
- * wish to claim
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the requested interface does not exist
- * \returns LIBUSB_ERROR_BUSY if another program or driver has claimed the
- * interface
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns a LIBUSB_ERROR code on other failure
- * \see libusb_set_auto_detach_kernel_driver()
- */
-int API_EXPORTED libusb_claim_interface(libusb_device_handle *dev,
- int interface_number)
-{
- int r = 0;
-
- usbi_dbg("interface %d", interface_number);
- if (interface_number >= USB_MAXINTERFACES)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- if (!dev->dev->attached)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_mutex_lock(&dev->lock);
- if (dev->claimed_interfaces & (1 << interface_number))
- goto out;
-
- r = usbi_backend->claim_interface(dev, interface_number);
- if (r == 0)
- dev->claimed_interfaces |= 1 << interface_number;
-
-out:
- usbi_mutex_unlock(&dev->lock);
- return r;
-}
-
-/** \ingroup dev
- * Release an interface previously claimed with libusb_claim_interface(). You
- * should release all claimed interfaces before closing a device handle.
- *
- * This is a blocking function. A SET_INTERFACE control request will be sent
- * to the device, resetting interface state to the first alternate setting.
- *
- * If auto_detach_kernel_driver is set to 1 for <tt>dev</tt>, the kernel
- * driver will be re-attached after releasing the interface.
- *
- * \param dev a device handle
- * \param interface_number the <tt>bInterfaceNumber</tt> of the
- * previously-claimed interface
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the interface was not claimed
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- * \see libusb_set_auto_detach_kernel_driver()
- */
-int API_EXPORTED libusb_release_interface(libusb_device_handle *dev,
- int interface_number)
-{
- int r;
-
- usbi_dbg("interface %d", interface_number);
- if (interface_number >= USB_MAXINTERFACES)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- usbi_mutex_lock(&dev->lock);
- if (!(dev->claimed_interfaces & (1 << interface_number))) {
- r = LIBUSB_ERROR_NOT_FOUND;
- goto out;
- }
-
- r = usbi_backend->release_interface(dev, interface_number);
- if (r == 0)
- dev->claimed_interfaces &= ~(1 << interface_number);
-
-out:
- usbi_mutex_unlock(&dev->lock);
- return r;
-}
-
-/** \ingroup dev
- * Activate an alternate setting for an interface. The interface must have
- * been previously claimed with libusb_claim_interface().
- *
- * You should always use this function rather than formulating your own
- * SET_INTERFACE control request. This is because the underlying operating
- * system needs to know when such changes happen.
- *
- * This is a blocking function.
- *
- * \param dev a device handle
- * \param interface_number the <tt>bInterfaceNumber</tt> of the
- * previously-claimed interface
- * \param alternate_setting the <tt>bAlternateSetting</tt> of the alternate
- * setting to activate
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the interface was not claimed, or the
- * requested alternate setting does not exist
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- */
-int API_EXPORTED libusb_set_interface_alt_setting(libusb_device_handle *dev,
- int interface_number, int alternate_setting)
-{
- usbi_dbg("interface %d altsetting %d",
- interface_number, alternate_setting);
- if (interface_number >= USB_MAXINTERFACES)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- usbi_mutex_lock(&dev->lock);
- if (!dev->dev->attached) {
- usbi_mutex_unlock(&dev->lock);
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- if (!(dev->claimed_interfaces & (1 << interface_number))) {
- usbi_mutex_unlock(&dev->lock);
- return LIBUSB_ERROR_NOT_FOUND;
- }
- usbi_mutex_unlock(&dev->lock);
-
- return usbi_backend->set_interface_altsetting(dev, interface_number,
- alternate_setting);
-}
-
-/** \ingroup dev
- * Clear the halt/stall condition for an endpoint. Endpoints with halt status
- * are unable to receive or transmit data until the halt condition is stalled.
- *
- * You should cancel all pending transfers before attempting to clear the halt
- * condition.
- *
- * This is a blocking function.
- *
- * \param dev a device handle
- * \param endpoint the endpoint to clear halt status
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- */
-int API_EXPORTED libusb_clear_halt(libusb_device_handle *dev,
- unsigned char endpoint)
-{
- usbi_dbg("endpoint %x", endpoint);
- if (!dev->dev->attached)
- return LIBUSB_ERROR_NO_DEVICE;
-
- return usbi_backend->clear_halt(dev, endpoint);
-}
-
-/** \ingroup dev
- * Perform a USB port reset to reinitialize a device. The system will attempt
- * to restore the previous configuration and alternate settings after the
- * reset has completed.
- *
- * If the reset fails, the descriptors change, or the previous state cannot be
- * restored, the device will appear to be disconnected and reconnected. This
- * means that the device handle is no longer valid (you should close it) and
- * rediscover the device. A return code of LIBUSB_ERROR_NOT_FOUND indicates
- * when this is the case.
- *
- * This is a blocking function which usually incurs a noticeable delay.
- *
- * \param dev a handle of the device to reset
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if re-enumeration is required, or if the
- * device has been disconnected
- * \returns another LIBUSB_ERROR code on other failure
- */
-int API_EXPORTED libusb_reset_device(libusb_device_handle *dev)
-{
- usbi_dbg("");
- if (!dev->dev->attached)
- return LIBUSB_ERROR_NO_DEVICE;
-
- return usbi_backend->reset_device(dev);
-}
-
-/** \ingroup dev
- * Determine if a kernel driver is active on an interface. If a kernel driver
- * is active, you cannot claim the interface, and libusbx will be unable to
- * perform I/O.
- *
- * This functionality is not available on Windows.
- *
- * \param dev a device handle
- * \param interface_number the interface to check
- * \returns 0 if no kernel driver is active
- * \returns 1 if a kernel driver is active
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns LIBUSB_ERROR_NOT_SUPPORTED on platforms where the functionality
- * is not available
- * \returns another LIBUSB_ERROR code on other failure
- * \see libusb_detach_kernel_driver()
- */
-int API_EXPORTED libusb_kernel_driver_active(libusb_device_handle *dev,
- int interface_number)
-{
- usbi_dbg("interface %d", interface_number);
-
- if (!dev->dev->attached)
- return LIBUSB_ERROR_NO_DEVICE;
-
- if (usbi_backend->kernel_driver_active)
- return usbi_backend->kernel_driver_active(dev, interface_number);
- else
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-/** \ingroup dev
- * Detach a kernel driver from an interface. If successful, you will then be
- * able to claim the interface and perform I/O.
- *
- * This functionality is not available on Darwin or Windows.
- *
- * Note that libusbx itself also talks to the device through a special kernel
- * driver, if this driver is already attached to the device, this call will
- * not detach it and return LIBUSB_ERROR_NOT_FOUND.
- *
- * \param dev a device handle
- * \param interface_number the interface to detach the driver from
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if no kernel driver was active
- * \returns LIBUSB_ERROR_INVALID_PARAM if the interface does not exist
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns LIBUSB_ERROR_NOT_SUPPORTED on platforms where the functionality
- * is not available
- * \returns another LIBUSB_ERROR code on other failure
- * \see libusb_kernel_driver_active()
- */
-int API_EXPORTED libusb_detach_kernel_driver(libusb_device_handle *dev,
- int interface_number)
-{
- usbi_dbg("interface %d", interface_number);
-
- if (!dev->dev->attached)
- return LIBUSB_ERROR_NO_DEVICE;
-
- if (usbi_backend->detach_kernel_driver)
- return usbi_backend->detach_kernel_driver(dev, interface_number);
- else
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-/** \ingroup dev
- * Re-attach an interface's kernel driver, which was previously detached
- * using libusb_detach_kernel_driver(). This call is only effective on
- * Linux and returns LIBUSB_ERROR_NOT_SUPPORTED on all other platforms.
- *
- * This functionality is not available on Darwin or Windows.
- *
- * \param dev a device handle
- * \param interface_number the interface to attach the driver from
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if no kernel driver was active
- * \returns LIBUSB_ERROR_INVALID_PARAM if the interface does not exist
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns LIBUSB_ERROR_NOT_SUPPORTED on platforms where the functionality
- * is not available
- * \returns LIBUSB_ERROR_BUSY if the driver cannot be attached because the
- * interface is claimed by a program or driver
- * \returns another LIBUSB_ERROR code on other failure
- * \see libusb_kernel_driver_active()
- */
-int API_EXPORTED libusb_attach_kernel_driver(libusb_device_handle *dev,
- int interface_number)
-{
- usbi_dbg("interface %d", interface_number);
-
- if (!dev->dev->attached)
- return LIBUSB_ERROR_NO_DEVICE;
-
- if (usbi_backend->attach_kernel_driver)
- return usbi_backend->attach_kernel_driver(dev, interface_number);
- else
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-/** \ingroup dev
- * Enable/disable libusbx's automatic kernel driver detachment. When this is
- * enabled libusbx will automatically detach the kernel driver on an interface
- * when claiming the interface, and attach it when releasing the interface.
- *
- * Automatic kernel driver detachment is disabled on newly opened device
- * handles by default.
- *
- * On platforms which do not have LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER
- * this function will return LIBUSB_ERROR_NOT_SUPPORTED, and libusbx will
- * continue as if this function was never called.
- *
- * \param dev a device handle
- * \param enable whether to enable or disable auto kernel driver detachment
- *
- * \returns LIBUSB_SUCCESS on success
- * \returns LIBUSB_ERROR_NOT_SUPPORTED on platforms where the functionality
- * is not available
- * \see libusb_claim_interface()
- * \see libusb_release_interface()
- * \see libusb_set_configuration()
- */
-int API_EXPORTED libusb_set_auto_detach_kernel_driver(
- libusb_device_handle *dev, int enable)
-{
- if (!(usbi_backend->caps & USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER))
- return LIBUSB_ERROR_NOT_SUPPORTED;
-
- dev->auto_detach_kernel_driver = enable;
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup lib
- * Set log message verbosity.
- *
- * The default level is LIBUSB_LOG_LEVEL_NONE, which means no messages are ever
- * printed. If you choose to increase the message verbosity level, ensure
- * that your application does not close the stdout/stderr file descriptors.
- *
- * You are advised to use level LIBUSB_LOG_LEVEL_WARNING. libusbx is conservative
- * with its message logging and most of the time, will only log messages that
- * explain error conditions and other oddities. This will help you debug
- * your software.
- *
- * If the LIBUSB_DEBUG environment variable was set when libusbx was
- * initialized, this function does nothing: the message verbosity is fixed
- * to the value in the environment variable.
- *
- * If libusbx was compiled without any message logging, this function does
- * nothing: you'll never get any messages.
- *
- * If libusbx was compiled with verbose debug message logging, this function
- * does nothing: you'll always get messages from all levels.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param level debug level to set
- */
-void API_EXPORTED libusb_set_debug(libusb_context *ctx, int level)
-{
- USBI_GET_CONTEXT(ctx);
- if (!ctx->debug_fixed)
- ctx->debug = level;
-}
-
-/** \ingroup lib
- * Initialize libusb. This function must be called before calling any other
- * libusbx function.
- *
- * If you do not provide an output location for a context pointer, a default
- * context will be created. If there was already a default context, it will
- * be reused (and nothing will be initialized/reinitialized).
- *
- * \param context Optional output location for context pointer.
- * Only valid on return code 0.
- * \returns 0 on success, or a LIBUSB_ERROR code on failure
- * \see contexts
- */
-int API_EXPORTED libusb_init(libusb_context **context)
-{
- struct libusb_device *dev, *next;
- char *dbg = getenv("LIBUSB_DEBUG");
- struct libusb_context *ctx;
- static int first_init = 1;
- int r = 0;
-
- usbi_mutex_static_lock(&default_context_lock);
-
- if (!timestamp_origin.tv_sec) {
- usbi_gettimeofday(&timestamp_origin, NULL);
- }
-
- if (!context && usbi_default_context) {
- usbi_dbg("reusing default context");
- default_context_refcnt++;
- usbi_mutex_static_unlock(&default_context_lock);
- return 0;
- }
-
- ctx = calloc(1, sizeof(*ctx));
- if (!ctx) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err_unlock;
- }
-
-#ifdef ENABLE_DEBUG_LOGGING
- ctx->debug = LIBUSB_LOG_LEVEL_DEBUG;
-#endif
-
- if (dbg) {
- ctx->debug = atoi(dbg);
- if (ctx->debug)
- ctx->debug_fixed = 1;
- }
-
- /* default context should be initialized before calling usbi_dbg */
- if (!usbi_default_context) {
- usbi_default_context = ctx;
- default_context_refcnt++;
- usbi_dbg("created default context");
- }
-
- usbi_dbg("libusbx v%d.%d.%d.%d", libusb_version_internal.major, libusb_version_internal.minor,
- libusb_version_internal.micro, libusb_version_internal.nano);
-
- usbi_mutex_init(&ctx->usb_devs_lock, NULL);
- usbi_mutex_init(&ctx->open_devs_lock, NULL);
- usbi_mutex_init(&ctx->hotplug_cbs_lock, NULL);
- list_init(&ctx->usb_devs);
- list_init(&ctx->open_devs);
- list_init(&ctx->hotplug_cbs);
-
- usbi_mutex_static_lock(&active_contexts_lock);
- if (first_init) {
- first_init = 0;
- list_init (&active_contexts_list);
- }
- list_add (&ctx->list, &active_contexts_list);
- usbi_mutex_static_unlock(&active_contexts_lock);
-
- if (usbi_backend->init) {
- r = usbi_backend->init(ctx);
- if (r)
- goto err_free_ctx;
- }
-
- r = usbi_io_init(ctx);
- if (r < 0)
- goto err_backend_exit;
-
- usbi_mutex_static_unlock(&default_context_lock);
-
- if (context)
- *context = ctx;
-
- return 0;
-
-err_backend_exit:
- if (usbi_backend->exit)
- usbi_backend->exit();
-err_free_ctx:
- if (ctx == usbi_default_context)
- usbi_default_context = NULL;
-
- usbi_mutex_destroy(&ctx->open_devs_lock);
- usbi_mutex_destroy(&ctx->usb_devs_lock);
- usbi_mutex_destroy(&ctx->hotplug_cbs_lock);
-
- usbi_mutex_static_lock(&active_contexts_lock);
- list_del (&ctx->list);
- usbi_mutex_static_unlock(&active_contexts_lock);
-
- usbi_mutex_lock(&ctx->usb_devs_lock);
- list_for_each_entry_safe(dev, next, &ctx->usb_devs, list, struct libusb_device) {
- list_del(&dev->list);
- libusb_unref_device(dev);
- }
- usbi_mutex_unlock(&ctx->usb_devs_lock);
-
- free(ctx);
-err_unlock:
- usbi_mutex_static_unlock(&default_context_lock);
- return r;
-}
-
-/** \ingroup lib
- * Deinitialize libusb. Should be called after closing all open devices and
- * before your application terminates.
- * \param ctx the context to deinitialize, or NULL for the default context
- */
-void API_EXPORTED libusb_exit(struct libusb_context *ctx)
-{
- struct libusb_device *dev, *next;
-
- usbi_dbg("");
- USBI_GET_CONTEXT(ctx);
-
- /* if working with default context, only actually do the deinitialization
- * if we're the last user */
- usbi_mutex_static_lock(&default_context_lock);
- if (ctx == usbi_default_context) {
- if (--default_context_refcnt > 0) {
- usbi_dbg("not destroying default context");
- usbi_mutex_static_unlock(&default_context_lock);
- return;
- }
- usbi_dbg("destroying default context");
- usbi_default_context = NULL;
- }
- usbi_mutex_static_unlock(&default_context_lock);
-
- usbi_mutex_static_lock(&active_contexts_lock);
- list_del (&ctx->list);
- usbi_mutex_static_unlock(&active_contexts_lock);
-
- if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- usbi_hotplug_deregister_all(ctx);
- usbi_mutex_lock(&ctx->usb_devs_lock);
- list_for_each_entry_safe(dev, next, &ctx->usb_devs, list, struct libusb_device) {
- list_del(&dev->list);
- libusb_unref_device(dev);
- }
- usbi_mutex_unlock(&ctx->usb_devs_lock);
- }
-
- /* a few sanity checks. don't bother with locking because unless
- * there is an application bug, nobody will be accessing these. */
- if (!list_empty(&ctx->usb_devs))
- usbi_warn(ctx, "some libusb_devices were leaked");
- if (!list_empty(&ctx->open_devs))
- usbi_warn(ctx, "application left some devices open");
-
- usbi_io_exit(ctx);
- if (usbi_backend->exit)
- usbi_backend->exit();
-
- usbi_mutex_destroy(&ctx->open_devs_lock);
- usbi_mutex_destroy(&ctx->usb_devs_lock);
- usbi_mutex_destroy(&ctx->hotplug_cbs_lock);
- free(ctx);
-}
-
-/** \ingroup misc
- * Check at runtime if the loaded library has a given capability.
- * This call should be performed after \ref libusb_init(), to ensure the
- * backend has updated its capability set.
- *
- * \param capability the \ref libusb_capability to check for
- * \returns nonzero if the running library has the capability, 0 otherwise
- */
-int API_EXPORTED libusb_has_capability(uint32_t capability)
-{
- switch (capability) {
- case LIBUSB_CAP_HAS_CAPABILITY:
- return 1;
- case LIBUSB_CAP_HAS_HOTPLUG:
- return !(usbi_backend->get_device_list);
- case LIBUSB_CAP_HAS_HID_ACCESS:
- return (usbi_backend->caps & USBI_CAP_HAS_HID_ACCESS);
- case LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER:
- return (usbi_backend->caps & USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER);
- }
- return 0;
-}
-
-/* this is defined in libusbi.h if needed */
-#ifdef LIBUSB_GETTIMEOFDAY_WIN32
-/*
- * gettimeofday
- * Implementation according to:
- * The Open Group Base Specifications Issue 6
- * IEEE Std 1003.1, 2004 Edition
- */
-
-/*
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Contributed by:
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */
-#define _W32_FT_OFFSET (116444736000000000)
-
-int usbi_gettimeofday(struct timeval *tp, void *tzp)
-{
- union {
- unsigned __int64 ns100; /* Time since 1 Jan 1601, in 100ns units */
- FILETIME ft;
- } _now;
- UNUSED(tzp);
-
- if(tp) {
-#if defined(OS_WINCE)
- SYSTEMTIME st;
- GetSystemTime(&st);
- SystemTimeToFileTime(&st, &_now.ft);
-#else
- GetSystemTimeAsFileTime (&_now.ft);
-#endif
- tp->tv_usec=(long)((_now.ns100 / 10) % 1000000 );
- tp->tv_sec= (long)((_now.ns100 - _W32_FT_OFFSET) / 10000000);
- }
- /* Always return 0 as per Open Group Base Specifications Issue 6.
- Do not set errno on error. */
- return 0;
-}
-#endif
-
-static void usbi_log_str(struct libusb_context *ctx, const char * str)
-{
- UNUSED(ctx);
- fputs(str, stderr);
-}
-
-void usbi_log_v(struct libusb_context *ctx, enum libusb_log_level level,
- const char *function, const char *format, va_list args)
-{
- const char *prefix = "";
- char buf[USBI_MAX_LOG_LEN];
- struct timeval now;
- int global_debug, header_len, text_len;
- static int has_debug_header_been_displayed = 0;
-
-#ifdef ENABLE_DEBUG_LOGGING
- global_debug = 1;
- UNUSED(ctx);
-#else
- USBI_GET_CONTEXT(ctx);
- if (ctx == NULL)
- return;
- global_debug = (ctx->debug == LIBUSB_LOG_LEVEL_DEBUG);
- if (!ctx->debug)
- return;
- if (level == LIBUSB_LOG_LEVEL_WARNING && ctx->debug < LIBUSB_LOG_LEVEL_WARNING)
- return;
- if (level == LIBUSB_LOG_LEVEL_INFO && ctx->debug < LIBUSB_LOG_LEVEL_INFO)
- return;
- if (level == LIBUSB_LOG_LEVEL_DEBUG && ctx->debug < LIBUSB_LOG_LEVEL_DEBUG)
- return;
-#endif
-
-#ifdef __ANDROID__
- int prio;
- switch (level) {
- case LOG_LEVEL_INFO:
- prio = ANDROID_LOG_INFO;
- break;
- case LOG_LEVEL_WARNING:
- prio = ANDROID_LOG_WARN;
- break;
- case LOG_LEVEL_ERROR:
- prio = ANDROID_LOG_ERROR;
- break;
- case LOG_LEVEL_DEBUG:
- prio = ANDROID_LOG_DEBUG;
- break;
- default:
- prio = ANDROID_LOG_UNKNOWN;
- break;
- }
-
- __android_log_vprint(prio, "LibUsb", format, args);
-#else
- usbi_gettimeofday(&now, NULL);
- if ((global_debug) && (!has_debug_header_been_displayed)) {
- has_debug_header_been_displayed = 1;
- usbi_log_str(ctx, "[timestamp] [threadID] facility level [function call] <message>\n");
- usbi_log_str(ctx, "--------------------------------------------------------------------------------\n");
- }
- if (now.tv_usec < timestamp_origin.tv_usec) {
- now.tv_sec--;
- now.tv_usec += 1000000;
- }
- now.tv_sec -= timestamp_origin.tv_sec;
- now.tv_usec -= timestamp_origin.tv_usec;
-
- switch (level) {
- case LIBUSB_LOG_LEVEL_INFO:
- prefix = "info";
- break;
- case LIBUSB_LOG_LEVEL_WARNING:
- prefix = "warning";
- break;
- case LIBUSB_LOG_LEVEL_ERROR:
- prefix = "error";
- break;
- case LIBUSB_LOG_LEVEL_DEBUG:
- prefix = "debug";
- break;
- case LIBUSB_LOG_LEVEL_NONE:
- break;
- default:
- prefix = "unknown";
- break;
- }
-
- if (global_debug) {
- header_len = snprintf(buf, sizeof(buf),
- "[%2d.%06d] [%08x] libusbx: %s [%s] ",
- (int)now.tv_sec, (int)now.tv_usec, usbi_get_tid(), prefix, function);
- } else {
- header_len = snprintf(buf, sizeof(buf),
- "libusbx: %s [%s] ", prefix, function);
- }
-
- if (header_len < 0 || header_len >= sizeof(buf)) {
- /* Somehow snprintf failed to write to the buffer,
- * remove the header so something useful is output. */
- header_len = 0;
- }
- /* Make sure buffer is NUL terminated */
- buf[header_len] = '\0';
- text_len = vsnprintf(buf + header_len, sizeof(buf) - header_len,
- format, args);
- if (text_len < 0 || text_len + header_len >= sizeof(buf)) {
- /* Truncated log output. On some platforms a -1 return value means
- * that the output was truncated. */
- text_len = sizeof(buf) - header_len;
- }
- if (header_len + text_len + sizeof(USBI_LOG_LINE_END) >= sizeof(buf)) {
- /* Need to truncate the text slightly to fit on the terminator. */
- text_len -= (header_len + text_len + sizeof(USBI_LOG_LINE_END)) - sizeof(buf);
- }
- strcpy(buf + header_len + text_len, USBI_LOG_LINE_END);
-
- usbi_log_str(ctx, buf);
-#endif
-}
-
-void usbi_log(struct libusb_context *ctx, enum libusb_log_level level,
- const char *function, const char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- usbi_log_v(ctx, level, function, format, args);
- va_end (args);
-}
-
-/** \ingroup misc
- * Returns a constant NULL-terminated string with the ASCII name of a libusbx
- * error or transfer status code. The caller must not free() the returned
- * string.
- *
- * \param error_code The \ref libusb_error or libusb_transfer_status code to
- * return the name of.
- * \returns The error name, or the string **UNKNOWN** if the value of
- * error_code is not a known error / status code.
- */
-DEFAULT_VISIBILITY const char * LIBUSB_CALL libusb_error_name(int error_code)
-{
- switch (error_code) {
- case LIBUSB_ERROR_IO:
- return "LIBUSB_ERROR_IO";
- case LIBUSB_ERROR_INVALID_PARAM:
- return "LIBUSB_ERROR_INVALID_PARAM";
- case LIBUSB_ERROR_ACCESS:
- return "LIBUSB_ERROR_ACCESS";
- case LIBUSB_ERROR_NO_DEVICE:
- return "LIBUSB_ERROR_NO_DEVICE";
- case LIBUSB_ERROR_NOT_FOUND:
- return "LIBUSB_ERROR_NOT_FOUND";
- case LIBUSB_ERROR_BUSY:
- return "LIBUSB_ERROR_BUSY";
- case LIBUSB_ERROR_TIMEOUT:
- return "LIBUSB_ERROR_TIMEOUT";
- case LIBUSB_ERROR_OVERFLOW:
- return "LIBUSB_ERROR_OVERFLOW";
- case LIBUSB_ERROR_PIPE:
- return "LIBUSB_ERROR_PIPE";
- case LIBUSB_ERROR_INTERRUPTED:
- return "LIBUSB_ERROR_INTERRUPTED";
- case LIBUSB_ERROR_NO_MEM:
- return "LIBUSB_ERROR_NO_MEM";
- case LIBUSB_ERROR_NOT_SUPPORTED:
- return "LIBUSB_ERROR_NOT_SUPPORTED";
- case LIBUSB_ERROR_OTHER:
- return "LIBUSB_ERROR_OTHER";
-
- case LIBUSB_TRANSFER_ERROR:
- return "LIBUSB_TRANSFER_ERROR";
- case LIBUSB_TRANSFER_TIMED_OUT:
- return "LIBUSB_TRANSFER_TIMED_OUT";
- case LIBUSB_TRANSFER_CANCELLED:
- return "LIBUSB_TRANSFER_CANCELLED";
- case LIBUSB_TRANSFER_STALL:
- return "LIBUSB_TRANSFER_STALL";
- case LIBUSB_TRANSFER_NO_DEVICE:
- return "LIBUSB_TRANSFER_NO_DEVICE";
- case LIBUSB_TRANSFER_OVERFLOW:
- return "LIBUSB_TRANSFER_OVERFLOW";
-
- case 0:
- return "LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED";
- default:
- return "**UNKNOWN**";
- }
-}
-
-/** \ingroup misc
- * Returns a pointer to const struct libusb_version with the version
- * (major, minor, micro, nano and rc) of the running library.
- */
-DEFAULT_VISIBILITY
-const struct libusb_version * LIBUSB_CALL libusb_get_version(void)
-{
- return &libusb_version_internal;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/descriptor.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/descriptor.c
deleted file mode 100644
index ba6d1467d..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/descriptor.c
+++ /dev/null
@@ -1,1197 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */
-/*
- * USB descriptor handling functions for libusbx
- * Copyright © 2007 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <errno.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "libusbi.h"
-
-#define DESC_HEADER_LENGTH 2
-#define DEVICE_DESC_LENGTH 18
-#define CONFIG_DESC_LENGTH 9
-#define INTERFACE_DESC_LENGTH 9
-#define ENDPOINT_DESC_LENGTH 7
-#define ENDPOINT_AUDIO_DESC_LENGTH 9
-
-/** @defgroup desc USB descriptors
- * This page details how to examine the various standard USB descriptors
- * for detected devices
- */
-
-/* set host_endian if the w values are already in host endian format,
- * as opposed to bus endian. */
-int usbi_parse_descriptor(const unsigned char *source, const char *descriptor,
- void *dest, int host_endian)
-{
- const unsigned char *sp = source;
- unsigned char *dp = dest;
- uint16_t w;
- const char *cp;
- uint32_t d;
-
- for (cp = descriptor; *cp; cp++) {
- switch (*cp) {
- case 'b': /* 8-bit byte */
- *dp++ = *sp++;
- break;
- case 'w': /* 16-bit word, convert from little endian to CPU */
- dp += ((uintptr_t)dp & 1); /* Align to word boundary */
-
- if (host_endian) {
- memcpy(dp, sp, 2);
- } else {
- w = (sp[1] << 8) | sp[0];
- *((uint16_t *)dp) = w;
- }
- sp += 2;
- dp += 2;
- break;
- case 'd': /* 32-bit word, convert from little endian to CPU */
- dp += ((uintptr_t)dp & 1); /* Align to word boundary */
-
- if (host_endian) {
- memcpy(dp, sp, 4);
- } else {
- d = (sp[3] << 24) | (sp[2] << 16) |
- (sp[1] << 8) | sp[0];
- *((uint32_t *)dp) = d;
- }
- sp += 4;
- dp += 4;
- break;
- case 'u': /* 16 byte UUID */
- memcpy(dp, sp, 16);
- sp += 16;
- dp += 16;
- break;
- }
- }
-
- return (int) (sp - source);
-}
-
-static void clear_endpoint(struct libusb_endpoint_descriptor *endpoint)
-{
- if (endpoint->extra)
- free((unsigned char *) endpoint->extra);
-}
-
-static int parse_endpoint(struct libusb_context *ctx,
- struct libusb_endpoint_descriptor *endpoint, unsigned char *buffer,
- int size, int host_endian)
-{
- struct usb_descriptor_header header;
- unsigned char *extra;
- unsigned char *begin;
- int parsed = 0;
- int len;
-
- if (size < DESC_HEADER_LENGTH) {
- usbi_err(ctx, "short endpoint descriptor read %d/%d",
- size, DESC_HEADER_LENGTH);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(buffer, "bb", &header, 0);
- if (header.bDescriptorType != LIBUSB_DT_ENDPOINT) {
- usbi_err(ctx, "unexpected descriptor %x (expected %x)",
- header.bDescriptorType, LIBUSB_DT_ENDPOINT);
- return parsed;
- }
- if (header.bLength > size) {
- usbi_warn(ctx, "short endpoint descriptor read %d/%d",
- size, header.bLength);
- return parsed;
- }
- if (header.bLength >= ENDPOINT_AUDIO_DESC_LENGTH)
- usbi_parse_descriptor(buffer, "bbbbwbbb", endpoint, host_endian);
- else if (header.bLength >= ENDPOINT_DESC_LENGTH)
- usbi_parse_descriptor(buffer, "bbbbwb", endpoint, host_endian);
- else {
- usbi_err(ctx, "invalid endpoint bLength (%d)", header.bLength);
- return LIBUSB_ERROR_IO;
- }
-
- buffer += header.bLength;
- size -= header.bLength;
- parsed += header.bLength;
-
- /* Skip over the rest of the Class Specific or Vendor Specific */
- /* descriptors */
- begin = buffer;
- while (size >= DESC_HEADER_LENGTH) {
- usbi_parse_descriptor(buffer, "bb", &header, 0);
- if (header.bLength < DESC_HEADER_LENGTH) {
- usbi_err(ctx, "invalid extra ep desc len (%d)",
- header.bLength);
- return LIBUSB_ERROR_IO;
- } else if (header.bLength > size) {
- usbi_warn(ctx, "short extra ep desc read %d/%d",
- size, header.bLength);
- return parsed;
- }
-
- /* If we find another "proper" descriptor then we're done */
- if ((header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
- (header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
- (header.bDescriptorType == LIBUSB_DT_CONFIG) ||
- (header.bDescriptorType == LIBUSB_DT_DEVICE))
- break;
-
- usbi_dbg("skipping descriptor %x", header.bDescriptorType);
- buffer += header.bLength;
- size -= header.bLength;
- parsed += header.bLength;
- }
-
- /* Copy any unknown descriptors into a storage area for drivers */
- /* to later parse */
- len = (int)(buffer - begin);
- if (!len) {
- endpoint->extra = NULL;
- endpoint->extra_length = 0;
- return parsed;
- }
-
- extra = malloc(len);
- endpoint->extra = extra;
- if (!extra) {
- endpoint->extra_length = 0;
- return LIBUSB_ERROR_NO_MEM;
- }
-
- memcpy(extra, begin, len);
- endpoint->extra_length = len;
-
- return parsed;
-}
-
-static void clear_interface(struct libusb_interface *usb_interface)
-{
- int i;
- int j;
-
- if (usb_interface->altsetting) {
- for (i = 0; i < usb_interface->num_altsetting; i++) {
- struct libusb_interface_descriptor *ifp =
- (struct libusb_interface_descriptor *)
- usb_interface->altsetting + i;
- if (ifp->extra)
- free((void *) ifp->extra);
- if (ifp->endpoint) {
- for (j = 0; j < ifp->bNumEndpoints; j++)
- clear_endpoint((struct libusb_endpoint_descriptor *)
- ifp->endpoint + j);
- free((void *) ifp->endpoint);
- }
- }
- free((void *) usb_interface->altsetting);
- usb_interface->altsetting = NULL;
- }
-
-}
-
-static int parse_interface(libusb_context *ctx,
- struct libusb_interface *usb_interface, unsigned char *buffer, int size,
- int host_endian)
-{
- int i;
- int len;
- int r;
- int parsed = 0;
- int interface_number = -1;
- size_t tmp;
- struct usb_descriptor_header header;
- struct libusb_interface_descriptor *ifp;
- unsigned char *begin;
-
- usb_interface->num_altsetting = 0;
-
- while (size >= INTERFACE_DESC_LENGTH) {
- struct libusb_interface_descriptor *altsetting =
- (struct libusb_interface_descriptor *) usb_interface->altsetting;
- altsetting = usbi_reallocf(altsetting,
- sizeof(struct libusb_interface_descriptor) *
- (usb_interface->num_altsetting + 1));
- if (!altsetting) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err;
- }
- usb_interface->altsetting = altsetting;
-
- ifp = altsetting + usb_interface->num_altsetting;
- usbi_parse_descriptor(buffer, "bbbbbbbbb", ifp, 0);
- if (ifp->bDescriptorType != LIBUSB_DT_INTERFACE) {
- usbi_err(ctx, "unexpected descriptor %x (expected %x)",
- ifp->bDescriptorType, LIBUSB_DT_INTERFACE);
- return parsed;
- }
- if (ifp->bLength < INTERFACE_DESC_LENGTH) {
- usbi_err(ctx, "invalid interface bLength (%d)",
- ifp->bLength);
- r = LIBUSB_ERROR_IO;
- goto err;
- }
- if (ifp->bLength > size) {
- usbi_warn(ctx, "short intf descriptor read %d/%d",
- size, ifp->bLength);
- return parsed;
- }
- if (ifp->bNumEndpoints > USB_MAXENDPOINTS) {
- usbi_err(ctx, "too many endpoints (%d)", ifp->bNumEndpoints);
- r = LIBUSB_ERROR_IO;
- goto err;
- }
-
- usb_interface->num_altsetting++;
- ifp->extra = NULL;
- ifp->extra_length = 0;
- ifp->endpoint = NULL;
-
- if (interface_number == -1)
- interface_number = ifp->bInterfaceNumber;
-
- /* Skip over the interface */
- buffer += ifp->bLength;
- parsed += ifp->bLength;
- size -= ifp->bLength;
-
- begin = buffer;
-
- /* Skip over any interface, class or vendor descriptors */
- while (size >= DESC_HEADER_LENGTH) {
- usbi_parse_descriptor(buffer, "bb", &header, 0);
- if (header.bLength < DESC_HEADER_LENGTH) {
- usbi_err(ctx,
- "invalid extra intf desc len (%d)",
- header.bLength);
- r = LIBUSB_ERROR_IO;
- goto err;
- } else if (header.bLength > size) {
- usbi_warn(ctx,
- "short extra intf desc read %d/%d",
- size, header.bLength);
- return parsed;
- }
-
- /* If we find another "proper" descriptor then we're done */
- if ((header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
- (header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
- (header.bDescriptorType == LIBUSB_DT_CONFIG) ||
- (header.bDescriptorType == LIBUSB_DT_DEVICE))
- break;
-
- buffer += header.bLength;
- parsed += header.bLength;
- size -= header.bLength;
- }
-
- /* Copy any unknown descriptors into a storage area for */
- /* drivers to later parse */
- len = (int)(buffer - begin);
- if (len) {
- ifp->extra = malloc(len);
- if (!ifp->extra) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err;
- }
- memcpy((unsigned char *) ifp->extra, begin, len);
- ifp->extra_length = len;
- }
-
- if (ifp->bNumEndpoints > 0) {
- struct libusb_endpoint_descriptor *endpoint;
- tmp = ifp->bNumEndpoints * sizeof(struct libusb_endpoint_descriptor);
- endpoint = malloc(tmp);
- ifp->endpoint = endpoint;
- if (!endpoint) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err;
- }
-
- memset(endpoint, 0, tmp);
- for (i = 0; i < ifp->bNumEndpoints; i++) {
- r = parse_endpoint(ctx, endpoint + i, buffer, size,
- host_endian);
- if (r < 0)
- goto err;
- if (r == 0) {
- ifp->bNumEndpoints = (uint8_t)i;
- break;;
- }
-
- buffer += r;
- parsed += r;
- size -= r;
- }
- }
-
- /* We check to see if it's an alternate to this one */
- ifp = (struct libusb_interface_descriptor *) buffer;
- if (size < LIBUSB_DT_INTERFACE_SIZE ||
- ifp->bDescriptorType != LIBUSB_DT_INTERFACE ||
- ifp->bInterfaceNumber != interface_number)
- return parsed;
- }
-
- return parsed;
-err:
- clear_interface(usb_interface);
- return r;
-}
-
-static void clear_configuration(struct libusb_config_descriptor *config)
-{
- if (config->interface) {
- int i;
- for (i = 0; i < config->bNumInterfaces; i++)
- clear_interface((struct libusb_interface *)
- config->interface + i);
- free((void *) config->interface);
- }
- if (config->extra)
- free((void *) config->extra);
-}
-
-static int parse_configuration(struct libusb_context *ctx,
- struct libusb_config_descriptor *config, unsigned char *buffer,
- int size, int host_endian)
-{
- int i;
- int r;
- size_t tmp;
- struct usb_descriptor_header header;
- struct libusb_interface *usb_interface;
-
- if (size < LIBUSB_DT_CONFIG_SIZE) {
- usbi_err(ctx, "short config descriptor read %d/%d",
- size, LIBUSB_DT_CONFIG_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(buffer, "bbwbbbbb", config, host_endian);
- if (config->bDescriptorType != LIBUSB_DT_CONFIG) {
- usbi_err(ctx, "unexpected descriptor %x (expected %x)",
- config->bDescriptorType, LIBUSB_DT_CONFIG);
- return LIBUSB_ERROR_IO;
- }
- if (config->bLength < LIBUSB_DT_CONFIG_SIZE) {
- usbi_err(ctx, "invalid config bLength (%d)", config->bLength);
- return LIBUSB_ERROR_IO;
- }
- if (config->bLength > size) {
- usbi_err(ctx, "short config descriptor read %d/%d",
- size, config->bLength);
- return LIBUSB_ERROR_IO;
- }
- if (config->bNumInterfaces > USB_MAXINTERFACES) {
- usbi_err(ctx, "too many interfaces (%d)", config->bNumInterfaces);
- return LIBUSB_ERROR_IO;
- }
-
- tmp = config->bNumInterfaces * sizeof(struct libusb_interface);
- usb_interface = malloc(tmp);
- config->interface = usb_interface;
- if (!config->interface)
- return LIBUSB_ERROR_NO_MEM;
-
- memset(usb_interface, 0, tmp);
- buffer += config->bLength;
- size -= config->bLength;
-
- config->extra = NULL;
- config->extra_length = 0;
-
- for (i = 0; i < config->bNumInterfaces; i++) {
- int len;
- unsigned char *begin;
-
- /* Skip over the rest of the Class Specific or Vendor */
- /* Specific descriptors */
- begin = buffer;
- while (size >= DESC_HEADER_LENGTH) {
- usbi_parse_descriptor(buffer, "bb", &header, 0);
-
- if (header.bLength < DESC_HEADER_LENGTH) {
- usbi_err(ctx,
- "invalid extra config desc len (%d)",
- header.bLength);
- r = LIBUSB_ERROR_IO;
- goto err;
- } else if (header.bLength > size) {
- usbi_warn(ctx,
- "short extra config desc read %d/%d",
- size, header.bLength);
- config->bNumInterfaces = (uint8_t)i;
- return size;
- }
-
- /* If we find another "proper" descriptor then we're done */
- if ((header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
- (header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
- (header.bDescriptorType == LIBUSB_DT_CONFIG) ||
- (header.bDescriptorType == LIBUSB_DT_DEVICE))
- break;
-
- usbi_dbg("skipping descriptor 0x%x\n", header.bDescriptorType);
- buffer += header.bLength;
- size -= header.bLength;
- }
-
- /* Copy any unknown descriptors into a storage area for */
- /* drivers to later parse */
- len = (int)(buffer - begin);
- if (len) {
- /* FIXME: We should realloc and append here */
- if (!config->extra_length) {
- config->extra = malloc(len);
- if (!config->extra) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err;
- }
-
- memcpy((unsigned char *) config->extra, begin, len);
- config->extra_length = len;
- }
- }
-
- r = parse_interface(ctx, usb_interface + i, buffer, size, host_endian);
- if (r < 0)
- goto err;
- if (r == 0) {
- config->bNumInterfaces = (uint8_t)i;
- break;
- }
-
- buffer += r;
- size -= r;
- }
-
- return size;
-
-err:
- clear_configuration(config);
- return r;
-}
-
-static int raw_desc_to_config(struct libusb_context *ctx,
- unsigned char *buf, int size, int host_endian,
- struct libusb_config_descriptor **config)
-{
- struct libusb_config_descriptor *_config = malloc(sizeof(*_config));
- int r;
-
- if (!_config)
- return LIBUSB_ERROR_NO_MEM;
-
- r = parse_configuration(ctx, _config, buf, size, host_endian);
- if (r < 0) {
- usbi_err(ctx, "parse_configuration failed with error %d", r);
- free(_config);
- return r;
- } else if (r > 0) {
- usbi_warn(ctx, "still %d bytes of descriptor data left", r);
- }
-
- *config = _config;
- return LIBUSB_SUCCESS;
-}
-
-int usbi_device_cache_descriptor(libusb_device *dev)
-{
- int r, host_endian = 0;
-
- r = usbi_backend->get_device_descriptor(dev, (unsigned char *) &dev->device_descriptor,
- &host_endian);
- if (r < 0)
- return r;
-
- if (!host_endian) {
- dev->device_descriptor.bcdUSB = libusb_le16_to_cpu(dev->device_descriptor.bcdUSB);
- dev->device_descriptor.idVendor = libusb_le16_to_cpu(dev->device_descriptor.idVendor);
- dev->device_descriptor.idProduct = libusb_le16_to_cpu(dev->device_descriptor.idProduct);
- dev->device_descriptor.bcdDevice = libusb_le16_to_cpu(dev->device_descriptor.bcdDevice);
- }
-
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup desc
- * Get the USB device descriptor for a given device.
- *
- * This is a non-blocking function; the device descriptor is cached in memory.
- *
- * Note since libusbx-1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102, this
- * function always succeeds.
- *
- * \param dev the device
- * \param desc output location for the descriptor data
- * \returns 0 on success or a LIBUSB_ERROR code on failure
- */
-int API_EXPORTED libusb_get_device_descriptor(libusb_device *dev,
- struct libusb_device_descriptor *desc)
-{
- usbi_dbg("");
- memcpy((unsigned char *) desc, (unsigned char *) &dev->device_descriptor,
- sizeof (dev->device_descriptor));
- return 0;
-}
-
-/** \ingroup desc
- * Get the USB configuration descriptor for the currently active configuration.
- * This is a non-blocking function which does not involve any requests being
- * sent to the device.
- *
- * \param dev a device
- * \param config output location for the USB configuration descriptor. Only
- * valid if 0 was returned. Must be freed with libusb_free_config_descriptor()
- * after use.
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state
- * \returns another LIBUSB_ERROR code on error
- * \see libusb_get_config_descriptor
- */
-int API_EXPORTED libusb_get_active_config_descriptor(libusb_device *dev,
- struct libusb_config_descriptor **config)
-{
- struct libusb_config_descriptor _config;
- unsigned char tmp[LIBUSB_DT_CONFIG_SIZE];
- unsigned char *buf = NULL;
- int host_endian = 0;
- int r;
-
- r = usbi_backend->get_active_config_descriptor(dev, tmp,
- LIBUSB_DT_CONFIG_SIZE, &host_endian);
- if (r < 0)
- return r;
- if (r < LIBUSB_DT_CONFIG_SIZE) {
- usbi_err(dev->ctx, "short config descriptor read %d/%d",
- r, LIBUSB_DT_CONFIG_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(tmp, "bbw", &_config, host_endian);
- buf = malloc(_config.wTotalLength);
- if (!buf)
- return LIBUSB_ERROR_NO_MEM;
-
- r = usbi_backend->get_active_config_descriptor(dev, buf,
- _config.wTotalLength, &host_endian);
- if (r >= 0)
- r = raw_desc_to_config(dev->ctx, buf, r, host_endian, config);
-
- free(buf);
- return r;
-}
-
-/** \ingroup desc
- * Get a USB configuration descriptor based on its index.
- * This is a non-blocking function which does not involve any requests being
- * sent to the device.
- *
- * \param dev a device
- * \param config_index the index of the configuration you wish to retrieve
- * \param config output location for the USB configuration descriptor. Only
- * valid if 0 was returned. Must be freed with libusb_free_config_descriptor()
- * after use.
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
- * \returns another LIBUSB_ERROR code on error
- * \see libusb_get_active_config_descriptor()
- * \see libusb_get_config_descriptor_by_value()
- */
-int API_EXPORTED libusb_get_config_descriptor(libusb_device *dev,
- uint8_t config_index, struct libusb_config_descriptor **config)
-{
- struct libusb_config_descriptor _config;
- unsigned char tmp[LIBUSB_DT_CONFIG_SIZE];
- unsigned char *buf = NULL;
- int host_endian = 0;
- int r;
-
- usbi_dbg("index %d", config_index);
- if (config_index >= dev->num_configurations)
- return LIBUSB_ERROR_NOT_FOUND;
-
- r = usbi_backend->get_config_descriptor(dev, config_index, tmp,
- LIBUSB_DT_CONFIG_SIZE, &host_endian);
- if (r < 0)
- return r;
- if (r < LIBUSB_DT_CONFIG_SIZE) {
- usbi_err(dev->ctx, "short config descriptor read %d/%d",
- r, LIBUSB_DT_CONFIG_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(tmp, "bbw", &_config, host_endian);
- buf = malloc(_config.wTotalLength);
- if (!buf)
- return LIBUSB_ERROR_NO_MEM;
-
- r = usbi_backend->get_config_descriptor(dev, config_index, buf,
- _config.wTotalLength, &host_endian);
- if (r >= 0)
- r = raw_desc_to_config(dev->ctx, buf, r, host_endian, config);
-
- free(buf);
- return r;
-}
-
-/* iterate through all configurations, returning the index of the configuration
- * matching a specific bConfigurationValue in the idx output parameter, or -1
- * if the config was not found.
- * returns 0 or a LIBUSB_ERROR code
- */
-int usbi_get_config_index_by_value(struct libusb_device *dev,
- uint8_t bConfigurationValue, int *idx)
-{
- uint8_t i;
-
- usbi_dbg("value %d", bConfigurationValue);
- for (i = 0; i < dev->num_configurations; i++) {
- unsigned char tmp[6];
- int host_endian;
- int r = usbi_backend->get_config_descriptor(dev, i, tmp, sizeof(tmp),
- &host_endian);
- if (r < 0)
- return r;
- if (tmp[5] == bConfigurationValue) {
- *idx = i;
- return 0;
- }
- }
-
- *idx = -1;
- return 0;
-}
-
-/** \ingroup desc
- * Get a USB configuration descriptor with a specific bConfigurationValue.
- * This is a non-blocking function which does not involve any requests being
- * sent to the device.
- *
- * \param dev a device
- * \param bConfigurationValue the bConfigurationValue of the configuration you
- * wish to retrieve
- * \param config output location for the USB configuration descriptor. Only
- * valid if 0 was returned. Must be freed with libusb_free_config_descriptor()
- * after use.
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
- * \returns another LIBUSB_ERROR code on error
- * \see libusb_get_active_config_descriptor()
- * \see libusb_get_config_descriptor()
- */
-int API_EXPORTED libusb_get_config_descriptor_by_value(libusb_device *dev,
- uint8_t bConfigurationValue, struct libusb_config_descriptor **config)
-{
- int r, idx, host_endian;
- unsigned char *buf = NULL;
-
- if (usbi_backend->get_config_descriptor_by_value) {
- r = usbi_backend->get_config_descriptor_by_value(dev,
- bConfigurationValue, &buf, &host_endian);
- if (r < 0)
- return r;
- return raw_desc_to_config(dev->ctx, buf, r, host_endian, config);
- }
-
- r = usbi_get_config_index_by_value(dev, bConfigurationValue, &idx);
- if (r < 0)
- return r;
- else if (idx == -1)
- return LIBUSB_ERROR_NOT_FOUND;
- else
- return libusb_get_config_descriptor(dev, (uint8_t) idx, config);
-}
-
-/** \ingroup desc
- * Free a configuration descriptor obtained from
- * libusb_get_active_config_descriptor() or libusb_get_config_descriptor().
- * It is safe to call this function with a NULL config parameter, in which
- * case the function simply returns.
- *
- * \param config the configuration descriptor to free
- */
-void API_EXPORTED libusb_free_config_descriptor(
- struct libusb_config_descriptor *config)
-{
- if (!config)
- return;
-
- clear_configuration(config);
- free(config);
-}
-
-/** \ingroup desc
- * Get an endpoints superspeed endpoint companion descriptor (if any)
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param endpoint endpoint descriptor from which to get the superspeed
- * endpoint companion descriptor
- * \param ep_comp output location for the superspeed endpoint companion
- * descriptor. Only valid if 0 was returned. Must be freed with
- * libusb_free_ss_endpoint_companion_descriptor() after use.
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
- * \returns another LIBUSB_ERROR code on error
- */
-int API_EXPORTED libusb_get_ss_endpoint_companion_descriptor(
- struct libusb_context *ctx,
- const struct libusb_endpoint_descriptor *endpoint,
- struct libusb_ss_endpoint_companion_descriptor **ep_comp)
-{
- struct usb_descriptor_header header;
- int size = endpoint->extra_length;
- const unsigned char *buffer = endpoint->extra;
-
- *ep_comp = NULL;
-
- while (size >= DESC_HEADER_LENGTH) {
- usbi_parse_descriptor(buffer, "bb", &header, 0);
- if (header.bLength < 2 || header.bLength > size) {
- usbi_err(ctx, "invalid descriptor length %d",
- header.bLength);
- return LIBUSB_ERROR_IO;
- }
- if (header.bDescriptorType != LIBUSB_DT_SS_ENDPOINT_COMPANION) {
- buffer += header.bLength;
- size -= header.bLength;
- continue;
- }
- if (header.bLength < LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE) {
- usbi_err(ctx, "invalid ss-ep-comp-desc length %d",
- header.bLength);
- return LIBUSB_ERROR_IO;
- }
- *ep_comp = malloc(sizeof(**ep_comp));
- if (*ep_comp == NULL)
- return LIBUSB_ERROR_NO_MEM;
- usbi_parse_descriptor(buffer, "bbbbw", *ep_comp, 0);
- return LIBUSB_SUCCESS;
- }
- return LIBUSB_ERROR_NOT_FOUND;
-}
-
-/** \ingroup desc
- * Free a superspeed endpoint companion descriptor obtained from
- * libusb_get_ss_endpoint_companion_descriptor().
- * It is safe to call this function with a NULL ep_comp parameter, in which
- * case the function simply returns.
- *
- * \param ep_comp the superspeed endpoint companion descriptor to free
- */
-void API_EXPORTED libusb_free_ss_endpoint_companion_descriptor(
- struct libusb_ss_endpoint_companion_descriptor *ep_comp)
-{
- free(ep_comp);
-}
-
-static int parse_bos(struct libusb_context *ctx,
- struct libusb_bos_descriptor **bos,
- unsigned char *buffer, int size, int host_endian)
-{
- struct libusb_bos_descriptor bos_header, *_bos;
- struct libusb_bos_dev_capability_descriptor dev_cap;
- int i;
-
- if (size < LIBUSB_DT_BOS_SIZE) {
- usbi_err(ctx, "short bos descriptor read %d/%d",
- size, LIBUSB_DT_BOS_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(buffer, "bbwb", &bos_header, host_endian);
- if (bos_header.bDescriptorType != LIBUSB_DT_BOS) {
- usbi_err(ctx, "unexpected descriptor %x (expected %x)",
- bos_header.bDescriptorType, LIBUSB_DT_BOS);
- return LIBUSB_ERROR_IO;
- }
- if (bos_header.bLength < LIBUSB_DT_BOS_SIZE) {
- usbi_err(ctx, "invalid bos bLength (%d)", bos_header.bLength);
- return LIBUSB_ERROR_IO;
- }
- if (bos_header.bLength > size) {
- usbi_err(ctx, "short bos descriptor read %d/%d",
- size, bos_header.bLength);
- return LIBUSB_ERROR_IO;
- }
-
- _bos = calloc (1,
- sizeof(*_bos) + bos_header.bNumDeviceCaps * sizeof(void *));
- if (!_bos)
- return LIBUSB_ERROR_NO_MEM;
-
- usbi_parse_descriptor(buffer, "bbwb", _bos, host_endian);
- buffer += bos_header.bLength;
- size -= bos_header.bLength;
-
- /* Get the device capability descriptors */
- for (i = 0; i < bos_header.bNumDeviceCaps; i++) {
- if (size < LIBUSB_DT_DEVICE_CAPABILITY_SIZE) {
- usbi_warn(ctx, "short dev-cap descriptor read %d/%d",
- size, LIBUSB_DT_DEVICE_CAPABILITY_SIZE);
- break;
- }
- usbi_parse_descriptor(buffer, "bbb", &dev_cap, host_endian);
- if (dev_cap.bDescriptorType != LIBUSB_DT_DEVICE_CAPABILITY) {
- usbi_warn(ctx, "unexpected descriptor %x (expected %x)",
- dev_cap.bDescriptorType, LIBUSB_DT_DEVICE_CAPABILITY);
- break;
- }
- if (dev_cap.bLength < LIBUSB_DT_DEVICE_CAPABILITY_SIZE) {
- usbi_err(ctx, "invalid dev-cap bLength (%d)",
- dev_cap.bLength);
- libusb_free_bos_descriptor(_bos);
- return LIBUSB_ERROR_IO;
- }
- if (dev_cap.bLength > size) {
- usbi_warn(ctx, "short dev-cap descriptor read %d/%d",
- size, dev_cap.bLength);
- break;
- }
-
- _bos->dev_capability[i] = malloc(dev_cap.bLength);
- if (!_bos->dev_capability[i]) {
- libusb_free_bos_descriptor(_bos);
- return LIBUSB_ERROR_NO_MEM;
- }
- memcpy(_bos->dev_capability[i], buffer, dev_cap.bLength);
- buffer += dev_cap.bLength;
- size -= dev_cap.bLength;
- }
- _bos->bNumDeviceCaps = (uint8_t)i;
- *bos = _bos;
-
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup desc
- * Get a Binary Object Store (BOS) descriptor
- * This is a BLOCKING function, which will send requests to the device.
- *
- * \param handle the handle of an open libusb device
- * \param bos output location for the BOS descriptor. Only valid if 0 was returned.
- * Must be freed with \ref libusb_free_bos_descriptor() after use.
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the device doesn't have a BOS descriptor
- * \returns another LIBUSB_ERROR code on error
- */
-int API_EXPORTED libusb_get_bos_descriptor(libusb_device_handle *handle,
- struct libusb_bos_descriptor **bos)
-{
- struct libusb_bos_descriptor _bos;
- uint8_t bos_header[LIBUSB_DT_BOS_SIZE] = {0};
- unsigned char *bos_data = NULL;
- const int host_endian = 0;
- int r;
-
- /* Read the BOS. This generates 2 requests on the bus,
- * one for the header, and one for the full BOS */
- r = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, bos_header,
- LIBUSB_DT_BOS_SIZE);
- if (r < 0) {
- if (r != LIBUSB_ERROR_PIPE)
- usbi_err(handle->dev->ctx, "failed to read BOS (%d)", r);
- return r;
- }
- if (r < LIBUSB_DT_BOS_SIZE) {
- usbi_err(handle->dev->ctx, "short BOS read %d/%d",
- r, LIBUSB_DT_BOS_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(bos_header, "bbwb", &_bos, host_endian);
- usbi_dbg("found BOS descriptor: size %d bytes, %d capabilities",
- _bos.wTotalLength, _bos.bNumDeviceCaps);
- bos_data = calloc(_bos.wTotalLength, 1);
- if (bos_data == NULL)
- return LIBUSB_ERROR_NO_MEM;
-
- r = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, bos_data,
- _bos.wTotalLength);
- if (r >= 0)
- r = parse_bos(handle->dev->ctx, bos, bos_data, r, host_endian);
- else
- usbi_err(handle->dev->ctx, "failed to read BOS (%d)", r);
-
- free(bos_data);
- return r;
-}
-
-/** \ingroup desc
- * Free a BOS descriptor obtained from libusb_get_bos_descriptor().
- * It is safe to call this function with a NULL bos parameter, in which
- * case the function simply returns.
- *
- * \param bos the BOS descriptor to free
- */
-void API_EXPORTED libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos)
-{
- int i;
-
- if (!bos)
- return;
-
- for (i = 0; i < bos->bNumDeviceCaps; i++)
- free(bos->dev_capability[i]);
- free(bos);
-}
-
-/** \ingroup desc
- * Get an USB 2.0 Extension descriptor
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param dev_cap Device Capability descriptor with a bDevCapabilityType of
- * \ref libusb_capability_type::LIBUSB_BT_USB_2_0_EXTENSION
- * LIBUSB_BT_USB_2_0_EXTENSION
- * \param usb_2_0_extension output location for the USB 2.0 Extension
- * descriptor. Only valid if 0 was returned. Must be freed with
- * libusb_free_usb_2_0_extension_descriptor() after use.
- * \returns 0 on success
- * \returns a LIBUSB_ERROR code on error
- */
-int API_EXPORTED libusb_get_usb_2_0_extension_descriptor(
- struct libusb_context *ctx,
- struct libusb_bos_dev_capability_descriptor *dev_cap,
- struct libusb_usb_2_0_extension_descriptor **usb_2_0_extension)
-{
- struct libusb_usb_2_0_extension_descriptor *_usb_2_0_extension;
- const int host_endian = 0;
-
- if (dev_cap->bDevCapabilityType != LIBUSB_BT_USB_2_0_EXTENSION) {
- usbi_err(ctx, "unexpected bDevCapabilityType %x (expected %x)",
- dev_cap->bDevCapabilityType,
- LIBUSB_BT_USB_2_0_EXTENSION);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
- if (dev_cap->bLength < LIBUSB_BT_USB_2_0_EXTENSION_SIZE) {
- usbi_err(ctx, "short dev-cap descriptor read %d/%d",
- dev_cap->bLength, LIBUSB_BT_USB_2_0_EXTENSION_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- _usb_2_0_extension = malloc(sizeof(*_usb_2_0_extension));
- if (!_usb_2_0_extension)
- return LIBUSB_ERROR_NO_MEM;
-
- usbi_parse_descriptor((unsigned char *)dev_cap, "bbbd",
- _usb_2_0_extension, host_endian);
-
- *usb_2_0_extension = _usb_2_0_extension;
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup desc
- * Free a USB 2.0 Extension descriptor obtained from
- * libusb_get_usb_2_0_extension_descriptor().
- * It is safe to call this function with a NULL usb_2_0_extension parameter,
- * in which case the function simply returns.
- *
- * \param usb_2_0_extension the USB 2.0 Extension descriptor to free
- */
-void API_EXPORTED libusb_free_usb_2_0_extension_descriptor(
- struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension)
-{
- free(usb_2_0_extension);
-}
-
-/** \ingroup desc
- * Get a SuperSpeed USB Device Capability descriptor
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param dev_cap Device Capability descriptor with a bDevCapabilityType of
- * \ref libusb_capability_type::LIBUSB_BT_SS_USB_DEVICE_CAPABILITY
- * LIBUSB_BT_SS_USB_DEVICE_CAPABILITY
- * \param ss_usb_device_cap output location for the SuperSpeed USB Device
- * Capability descriptor. Only valid if 0 was returned. Must be freed with
- * libusb_free_ss_usb_device_capability_descriptor() after use.
- * \returns 0 on success
- * \returns a LIBUSB_ERROR code on error
- */
-int API_EXPORTED libusb_get_ss_usb_device_capability_descriptor(
- struct libusb_context *ctx,
- struct libusb_bos_dev_capability_descriptor *dev_cap,
- struct libusb_ss_usb_device_capability_descriptor **ss_usb_device_cap)
-{
- struct libusb_ss_usb_device_capability_descriptor *_ss_usb_device_cap;
- const int host_endian = 0;
-
- if (dev_cap->bDevCapabilityType != LIBUSB_BT_SS_USB_DEVICE_CAPABILITY) {
- usbi_err(ctx, "unexpected bDevCapabilityType %x (expected %x)",
- dev_cap->bDevCapabilityType,
- LIBUSB_BT_SS_USB_DEVICE_CAPABILITY);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
- if (dev_cap->bLength < LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE) {
- usbi_err(ctx, "short dev-cap descriptor read %d/%d",
- dev_cap->bLength, LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- _ss_usb_device_cap = malloc(sizeof(*_ss_usb_device_cap));
- if (!_ss_usb_device_cap)
- return LIBUSB_ERROR_NO_MEM;
-
- usbi_parse_descriptor((unsigned char *)dev_cap, "bbbbwbbw",
- _ss_usb_device_cap, host_endian);
-
- *ss_usb_device_cap = _ss_usb_device_cap;
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup desc
- * Free a SuperSpeed USB Device Capability descriptor obtained from
- * libusb_get_ss_usb_device_capability_descriptor().
- * It is safe to call this function with a NULL ss_usb_device_cap
- * parameter, in which case the function simply returns.
- *
- * \param ss_usb_device_cap the USB 2.0 Extension descriptor to free
- */
-void API_EXPORTED libusb_free_ss_usb_device_capability_descriptor(
- struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_cap)
-{
- free(ss_usb_device_cap);
-}
-
-/** \ingroup desc
- * Get a Container ID descriptor
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param dev_cap Device Capability descriptor with a bDevCapabilityType of
- * \ref libusb_capability_type::LIBUSB_BT_CONTAINER_ID
- * LIBUSB_BT_CONTAINER_ID
- * \param container_id output location for the Container ID descriptor.
- * Only valid if 0 was returned. Must be freed with
- * libusb_free_container_id_descriptor() after use.
- * \returns 0 on success
- * \returns a LIBUSB_ERROR code on error
- */
-int API_EXPORTED libusb_get_container_id_descriptor(struct libusb_context *ctx,
- struct libusb_bos_dev_capability_descriptor *dev_cap,
- struct libusb_container_id_descriptor **container_id)
-{
- struct libusb_container_id_descriptor *_container_id;
- const int host_endian = 0;
-
- if (dev_cap->bDevCapabilityType != LIBUSB_BT_CONTAINER_ID) {
- usbi_err(ctx, "unexpected bDevCapabilityType %x (expected %x)",
- dev_cap->bDevCapabilityType,
- LIBUSB_BT_CONTAINER_ID);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
- if (dev_cap->bLength < LIBUSB_BT_CONTAINER_ID_SIZE) {
- usbi_err(ctx, "short dev-cap descriptor read %d/%d",
- dev_cap->bLength, LIBUSB_BT_CONTAINER_ID_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- _container_id = malloc(sizeof(*_container_id));
- if (!_container_id)
- return LIBUSB_ERROR_NO_MEM;
-
- usbi_parse_descriptor((unsigned char *)dev_cap, "bbbbu",
- _container_id, host_endian);
-
- *container_id = _container_id;
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup desc
- * Free a Container ID descriptor obtained from
- * libusb_get_container_id_descriptor().
- * It is safe to call this function with a NULL container_id parameter,
- * in which case the function simply returns.
- *
- * \param container_id the USB 2.0 Extension descriptor to free
- */
-void API_EXPORTED libusb_free_container_id_descriptor(
- struct libusb_container_id_descriptor *container_id)
-{
- free(container_id);
-}
-
-/** \ingroup desc
- * Retrieve a string descriptor in C style ASCII.
- *
- * Wrapper around libusb_get_string_descriptor(). Uses the first language
- * supported by the device.
- *
- * \param dev a device handle
- * \param desc_index the index of the descriptor to retrieve
- * \param data output buffer for ASCII string descriptor
- * \param length size of data buffer
- * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
- */
-int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev,
- uint8_t desc_index, unsigned char *data, int length)
-{
- unsigned char tbuf[255]; /* Some devices choke on size > 255 */
- int r, si, di;
- uint16_t langid;
-
- /* Asking for the zero'th index is special - it returns a string
- * descriptor that contains all the language IDs supported by the
- * device. Typically there aren't many - often only one. Language
- * IDs are 16 bit numbers, and they start at the third byte in the
- * descriptor. There's also no point in trying to read descriptor 0
- * with this function. See USB 2.0 specification section 9.6.7 for
- * more information.
- */
-
- if (desc_index == 0)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- r = libusb_get_string_descriptor(dev, 0, 0, tbuf, sizeof(tbuf));
- if (r < 0)
- return r;
-
- if (r < 4)
- return LIBUSB_ERROR_IO;
-
- langid = tbuf[2] | (tbuf[3] << 8);
-
- r = libusb_get_string_descriptor(dev, desc_index, langid, tbuf,
- sizeof(tbuf));
- if (r < 0)
- return r;
-
- if (tbuf[1] != LIBUSB_DT_STRING)
- return LIBUSB_ERROR_IO;
-
- if (tbuf[0] > r)
- return LIBUSB_ERROR_IO;
-
- for (di = 0, si = 2; si < tbuf[0]; si += 2) {
- if (di >= (length - 1))
- break;
-
- if ((tbuf[si] & 0x80) || (tbuf[si + 1])) /* non-ASCII */
- data[di++] = '?';
- else
- data[di++] = tbuf[si];
- }
-
- data[di] = 0;
- return di;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.c
deleted file mode 100644
index 6b04342f0..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */
-/*
- * Hotplug functions for libusbx
- * Copyright © 2012-2013 Nathan Hjelm <hjelmn@mac.com>
- * Copyright © 2012-2013 Peter Stuge <peter@stuge.se>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <config.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <assert.h>
-
-#include "libusbi.h"
-#include "hotplug.h"
-
-/**
- * @defgroup hotplug Device hotplug event notification
- * This page details how to use the libusb hotplug interface, where available.
- *
- * Be mindful that not all platforms currently implement hotplug notification and
- * that you should first call on \ref libusb_has_capability() with parameter
- * \ref LIBUSB_CAP_HAS_HOTPLUG to confirm that hotplug support is available.
- *
- * \page hotplug Device hotplug event notification
- *
- * \section intro Introduction
- *
- * Version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102, has added support
- * for hotplug events on <b>some</b> platforms (you should test if your platform
- * supports hotplug notification by calling \ref libusb_has_capability() with
- * parameter \ref LIBUSB_CAP_HAS_HOTPLUG).
- *
- * This interface allows you to request notification for the arrival and departure
- * of matching USB devices.
- *
- * To receive hotplug notification you register a callback by calling
- * \ref libusb_hotplug_register_callback(). This function will optionally return
- * a handle that can be passed to \ref libusb_hotplug_deregister_callback().
- *
- * A callback function must return an int (0 or 1) indicating whether the callback is
- * expecting additional events. Returning 0 will rearm the callback and 1 will cause
- * the callback to be deregistered.
- *
- * Callbacks for a particular context are automatically deregistered by libusb_exit().
- *
- * As of 1.0.16 there are two supported hotplug events:
- * - LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: A device has arrived and is ready to use
- * - LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT: A device has left and is no longer available
- *
- * A hotplug event can listen for either or both of these events.
- *
- * Note: If you receive notification that a device has left and you have any
- * a libusb_device_handles for the device it is up to you to call libusb_close()
- * on each handle to free up any remaining resources associated with the device.
- * Once a device has left any libusb_device_handle associated with the device
- * are invalid and will remain so even if the device comes back.
- *
- * When handling a LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED event it is considered
- * safe to call any libusbx function that takes a libusb_device. On the other hand,
- * when handling a LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT event the only safe function
- * is libusb_get_device_descriptor().
- *
- * The following code provides an example of the usage of the hotplug interface:
-\code
-static int count = 0;
-
-int hotplug_callback(struct libusb_context *ctx, struct libusb_device *dev,
- libusb_hotplug_event event, void *user_data) {
- static libusb_device_handle *handle = NULL;
- struct libusb_device_descriptor desc;
- int rc;
-
- (void)libusb_get_device_descriptor(dev, &desc);
-
- if (LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED == event) {
- rc = libusb_open(dev, &handle);
- if (LIBUSB_SUCCESS != rc) {
- printf("Could not open USB device\n");
- }
- } else if (LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT == event) {
- if (handle) {
- libusb_close(handle);
- handle = NULL;
- }
- } else {
- printf("Unhandled event %d\n", event);
- }
- count++;
-
- return 0;
-}
-
-int main (void) {
- libusb_hotplug_callback_handle handle;
- int rc;
-
- libusb_init(NULL);
-
- rc = libusb_hotplug_register_callback(NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
- LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, 0, 0x045a, 0x5005,
- LIBUSB_HOTPLUG_MATCH_ANY, hotplug_callback, NULL,
- &handle);
- if (LIBUSB_SUCCESS != rc) {
- printf("Error creating a hotplug callback\n");
- libusb_exit(NULL);
- return EXIT_FAILURE;
- }
-
- while (count < 2) {
- usleep(10000);
- }
-
- libusb_hotplug_deregister_callback(handle);
- libusb_exit(NULL);
-
- return 0;
-}
-\endcode
- */
-
-static int usbi_hotplug_match_cb (struct libusb_context *ctx,
- struct libusb_device *dev, libusb_hotplug_event event,
- struct libusb_hotplug_callback *hotplug_cb)
-{
- /* Handle lazy deregistration of callback */
- if (hotplug_cb->needs_free) {
- /* Free callback */
- return 1;
- }
-
- if (!(hotplug_cb->events & event)) {
- return 0;
- }
-
- if (LIBUSB_HOTPLUG_MATCH_ANY != hotplug_cb->vendor_id &&
- hotplug_cb->vendor_id != dev->device_descriptor.idVendor) {
- return 0;
- }
-
- if (LIBUSB_HOTPLUG_MATCH_ANY != hotplug_cb->product_id &&
- hotplug_cb->product_id != dev->device_descriptor.idProduct) {
- return 0;
- }
-
- if (LIBUSB_HOTPLUG_MATCH_ANY != hotplug_cb->dev_class &&
- hotplug_cb->dev_class != dev->device_descriptor.bDeviceClass) {
- return 0;
- }
-
- return hotplug_cb->cb (ctx == usbi_default_context ? NULL : ctx,
- dev, event, hotplug_cb->user_data);
-}
-
-void usbi_hotplug_match(struct libusb_context *ctx, struct libusb_device *dev,
- libusb_hotplug_event event)
-{
- struct libusb_hotplug_callback *hotplug_cb, *next;
- int ret;
-
- usbi_mutex_lock(&ctx->hotplug_cbs_lock);
-
- list_for_each_entry_safe(hotplug_cb, next, &ctx->hotplug_cbs, list, struct libusb_hotplug_callback) {
- usbi_mutex_unlock(&ctx->hotplug_cbs_lock);
- ret = usbi_hotplug_match_cb (ctx, dev, event, hotplug_cb);
- usbi_mutex_lock(&ctx->hotplug_cbs_lock);
-
- if (ret) {
- list_del(&hotplug_cb->list);
- free(hotplug_cb);
- }
- }
-
- usbi_mutex_unlock(&ctx->hotplug_cbs_lock);
-
- /* loop through and disconnect all open handles for this device */
- if (LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT == event) {
- struct libusb_device_handle *handle;
-
- usbi_mutex_lock(&ctx->open_devs_lock);
- list_for_each_entry(handle, &ctx->open_devs, list, struct libusb_device_handle) {
- if (dev == handle->dev) {
- usbi_handle_disconnect (handle);
- }
- }
- usbi_mutex_unlock(&ctx->open_devs_lock);
- }
-}
-
-int API_EXPORTED libusb_hotplug_register_callback(libusb_context *ctx,
- libusb_hotplug_event events, libusb_hotplug_flag flags,
- int vendor_id, int product_id, int dev_class,
- libusb_hotplug_callback_fn cb_fn, void *user_data,
- libusb_hotplug_callback_handle *handle)
-{
- libusb_hotplug_callback *new_callback;
- static int handle_id = 1;
-
- /* check for hotplug support */
- if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- return LIBUSB_ERROR_NOT_SUPPORTED;
- }
-
- /* check for sane values */
- if ((LIBUSB_HOTPLUG_MATCH_ANY != vendor_id && (~0xffff & vendor_id)) ||
- (LIBUSB_HOTPLUG_MATCH_ANY != product_id && (~0xffff & product_id)) ||
- (LIBUSB_HOTPLUG_MATCH_ANY != dev_class && (~0xff & dev_class)) ||
- !cb_fn) {
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- USBI_GET_CONTEXT(ctx);
-
- new_callback = (libusb_hotplug_callback *)calloc(1, sizeof (*new_callback));
- if (!new_callback) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- new_callback->ctx = ctx;
- new_callback->vendor_id = vendor_id;
- new_callback->product_id = product_id;
- new_callback->dev_class = dev_class;
- new_callback->flags = flags;
- new_callback->events = events;
- new_callback->cb = cb_fn;
- new_callback->user_data = user_data;
- new_callback->needs_free = 0;
-
- usbi_mutex_lock(&ctx->hotplug_cbs_lock);
-
- /* protect the handle by the context hotplug lock. it doesn't matter if the same handle
- * is used for different contexts only that the handle is unique for this context */
- new_callback->handle = handle_id++;
-
- list_add(&new_callback->list, &ctx->hotplug_cbs);
-
- if (flags & LIBUSB_HOTPLUG_ENUMERATE) {
- struct libusb_device *dev;
-
- usbi_mutex_lock(&ctx->usb_devs_lock);
-
- list_for_each_entry(dev, &ctx->usb_devs, list, struct libusb_device) {
- (void) usbi_hotplug_match_cb (ctx, dev, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, new_callback);
- }
-
- usbi_mutex_unlock(&ctx->usb_devs_lock);
- }
-
- usbi_mutex_unlock(&ctx->hotplug_cbs_lock);
-
- if (handle) {
- *handle = new_callback->handle;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-void API_EXPORTED libusb_hotplug_deregister_callback (struct libusb_context *ctx,
- libusb_hotplug_callback_handle handle)
-{
- struct libusb_hotplug_callback *hotplug_cb;
- libusb_hotplug_message message;
- ssize_t ret;
-
- /* check for hotplug support */
- if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- return;
- }
-
- USBI_GET_CONTEXT(ctx);
-
- usbi_mutex_lock(&ctx->hotplug_cbs_lock);
- list_for_each_entry(hotplug_cb, &ctx->hotplug_cbs, list,
- struct libusb_hotplug_callback) {
- if (handle == hotplug_cb->handle) {
- /* Mark this callback for deregistration */
- hotplug_cb->needs_free = 1;
- }
- }
- usbi_mutex_unlock(&ctx->hotplug_cbs_lock);
-
- /* wakeup handle_events to do the actual free */
- memset(&message, 0, sizeof(message));
- ret = usbi_write(ctx->hotplug_pipe[1], &message, sizeof(message));
- if (sizeof(message) != ret) {
- usbi_err(ctx, "error writing hotplug message");
- }
-}
-
-void usbi_hotplug_deregister_all(struct libusb_context *ctx) {
- struct libusb_hotplug_callback *hotplug_cb, *next;
-
- usbi_mutex_lock(&ctx->hotplug_cbs_lock);
- list_for_each_entry_safe(hotplug_cb, next, &ctx->hotplug_cbs, list,
- struct libusb_hotplug_callback) {
- list_del(&hotplug_cb->list);
- free(hotplug_cb);
- }
-
- usbi_mutex_unlock(&ctx->hotplug_cbs_lock);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.h
deleted file mode 100644
index 614ddbcff..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/hotplug.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */
-/*
- * Hotplug support for libusbx
- * Copyright © 2012-2013 Nathan Hjelm <hjelmn@mac.com>
- * Copyright © 2012-2013 Peter Stuge <peter@stuge.se>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined(USBI_HOTPLUG_H)
-#define USBI_HOTPLUG_H
-
-#ifndef LIBUSBI_H
-#include "libusbi.h"
-#endif
-
-/** \ingroup hotplug
- * The hotplug callback structure. The user populates this structure with
- * libusb_hotplug_prepare_callback() and then calls libusb_hotplug_register_callback()
- * to receive notification of hotplug events.
- */
-struct libusb_hotplug_callback {
- /** Context this callback is associated with */
- struct libusb_context *ctx;
-
- /** Vendor ID to match or LIBUSB_HOTPLUG_MATCH_ANY */
- int vendor_id;
-
- /** Product ID to match or LIBUSB_HOTPLUG_MATCH_ANY */
- int product_id;
-
- /** Device class to match or LIBUSB_HOTPLUG_MATCH_ANY */
- int dev_class;
-
- /** Hotplug callback flags */
- libusb_hotplug_flag flags;
-
- /** Event(s) that will trigger this callback */
- libusb_hotplug_event events;
-
- /** Callback function to invoke for matching event/device */
- libusb_hotplug_callback_fn cb;
-
- /** Handle for this callback (used to match on deregister) */
- libusb_hotplug_callback_handle handle;
-
- /** User data that will be passed to the callback function */
- void *user_data;
-
- /** Callback is marked for deletion */
- int needs_free;
-
- /** List this callback is registered in (ctx->hotplug_cbs) */
- struct list_head list;
-};
-
-typedef struct libusb_hotplug_callback libusb_hotplug_callback;
-
-struct libusb_hotplug_message {
- libusb_hotplug_event event;
- struct libusb_device *device;
-};
-
-typedef struct libusb_hotplug_message libusb_hotplug_message;
-
-void usbi_hotplug_deregister_all(struct libusb_context *ctx);
-void usbi_hotplug_match(struct libusb_context *ctx, struct libusb_device *dev,
- libusb_hotplug_event event);
-
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/io.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/io.c
deleted file mode 100644
index 4368b9945..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/io.c
+++ /dev/null
@@ -1,2566 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */
-/*
- * I/O functions for libusbx
- * Copyright © 2007-2009 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include <errno.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef USBI_TIMERFD_AVAILABLE
-#include <sys/timerfd.h>
-#endif
-
-#include "libusbi.h"
-#include "hotplug.h"
-
-/**
- * \page io Synchronous and asynchronous device I/O
- *
- * \section intro Introduction
- *
- * If you're using libusbx in your application, you're probably wanting to
- * perform I/O with devices - you want to perform USB data transfers.
- *
- * libusbx offers two separate interfaces for device I/O. This page aims to
- * introduce the two in order to help you decide which one is more suitable
- * for your application. You can also choose to use both interfaces in your
- * application by considering each transfer on a case-by-case basis.
- *
- * Once you have read through the following discussion, you should consult the
- * detailed API documentation pages for the details:
- * - \ref syncio
- * - \ref asyncio
- *
- * \section theory Transfers at a logical level
- *
- * At a logical level, USB transfers typically happen in two parts. For
- * example, when reading data from a endpoint:
- * -# A request for data is sent to the device
- * -# Some time later, the incoming data is received by the host
- *
- * or when writing data to an endpoint:
- *
- * -# The data is sent to the device
- * -# Some time later, the host receives acknowledgement from the device that
- * the data has been transferred.
- *
- * There may be an indefinite delay between the two steps. Consider a
- * fictional USB input device with a button that the user can press. In order
- * to determine when the button is pressed, you would likely submit a request
- * to read data on a bulk or interrupt endpoint and wait for data to arrive.
- * Data will arrive when the button is pressed by the user, which is
- * potentially hours later.
- *
- * libusbx offers both a synchronous and an asynchronous interface to performing
- * USB transfers. The main difference is that the synchronous interface
- * combines both steps indicated above into a single function call, whereas
- * the asynchronous interface separates them.
- *
- * \section sync The synchronous interface
- *
- * The synchronous I/O interface allows you to perform a USB transfer with
- * a single function call. When the function call returns, the transfer has
- * completed and you can parse the results.
- *
- * If you have used the libusb-0.1 before, this I/O style will seem familar to
- * you. libusb-0.1 only offered a synchronous interface.
- *
- * In our input device example, to read button presses you might write code
- * in the following style:
-\code
-unsigned char data[4];
-int actual_length;
-int r = libusb_bulk_transfer(handle, LIBUSB_ENDPOINT_IN, data, sizeof(data), &actual_length, 0);
-if (r == 0 && actual_length == sizeof(data)) {
- // results of the transaction can now be found in the data buffer
- // parse them here and report button press
-} else {
- error();
-}
-\endcode
- *
- * The main advantage of this model is simplicity: you did everything with
- * a single simple function call.
- *
- * However, this interface has its limitations. Your application will sleep
- * inside libusb_bulk_transfer() until the transaction has completed. If it
- * takes the user 3 hours to press the button, your application will be
- * sleeping for that long. Execution will be tied up inside the library -
- * the entire thread will be useless for that duration.
- *
- * Another issue is that by tieing up the thread with that single transaction
- * there is no possibility of performing I/O with multiple endpoints and/or
- * multiple devices simultaneously, unless you resort to creating one thread
- * per transaction.
- *
- * Additionally, there is no opportunity to cancel the transfer after the
- * request has been submitted.
- *
- * For details on how to use the synchronous API, see the
- * \ref syncio "synchronous I/O API documentation" pages.
- *
- * \section async The asynchronous interface
- *
- * Asynchronous I/O is the most significant new feature in libusb-1.0.
- * Although it is a more complex interface, it solves all the issues detailed
- * above.
- *
- * Instead of providing which functions that block until the I/O has complete,
- * libusbx's asynchronous interface presents non-blocking functions which
- * begin a transfer and then return immediately. Your application passes a
- * callback function pointer to this non-blocking function, which libusbx will
- * call with the results of the transaction when it has completed.
- *
- * Transfers which have been submitted through the non-blocking functions
- * can be cancelled with a separate function call.
- *
- * The non-blocking nature of this interface allows you to be simultaneously
- * performing I/O to multiple endpoints on multiple devices, without having
- * to use threads.
- *
- * This added flexibility does come with some complications though:
- * - In the interest of being a lightweight library, libusbx does not create
- * threads and can only operate when your application is calling into it. Your
- * application must call into libusbx from it's main loop when events are ready
- * to be handled, or you must use some other scheme to allow libusbx to
- * undertake whatever work needs to be done.
- * - libusbx also needs to be called into at certain fixed points in time in
- * order to accurately handle transfer timeouts.
- * - Memory handling becomes more complex. You cannot use stack memory unless
- * the function with that stack is guaranteed not to return until the transfer
- * callback has finished executing.
- * - You generally lose some linearity from your code flow because submitting
- * the transfer request is done in a separate function from where the transfer
- * results are handled. This becomes particularly obvious when you want to
- * submit a second transfer based on the results of an earlier transfer.
- *
- * Internally, libusbx's synchronous interface is expressed in terms of function
- * calls to the asynchronous interface.
- *
- * For details on how to use the asynchronous API, see the
- * \ref asyncio "asynchronous I/O API" documentation pages.
- */
-
-
-/**
- * \page packetoverflow Packets and overflows
- *
- * \section packets Packet abstraction
- *
- * The USB specifications describe how data is transmitted in packets, with
- * constraints on packet size defined by endpoint descriptors. The host must
- * not send data payloads larger than the endpoint's maximum packet size.
- *
- * libusbx and the underlying OS abstract out the packet concept, allowing you
- * to request transfers of any size. Internally, the request will be divided
- * up into correctly-sized packets. You do not have to be concerned with
- * packet sizes, but there is one exception when considering overflows.
- *
- * \section overflow Bulk/interrupt transfer overflows
- *
- * When requesting data on a bulk endpoint, libusbx requires you to supply a
- * buffer and the maximum number of bytes of data that libusbx can put in that
- * buffer. However, the size of the buffer is not communicated to the device -
- * the device is just asked to send any amount of data.
- *
- * There is no problem if the device sends an amount of data that is less than
- * or equal to the buffer size. libusbx reports this condition to you through
- * the \ref libusb_transfer::actual_length "libusb_transfer.actual_length"
- * field.
- *
- * Problems may occur if the device attempts to send more data than can fit in
- * the buffer. libusbx reports LIBUSB_TRANSFER_OVERFLOW for this condition but
- * other behaviour is largely undefined: actual_length may or may not be
- * accurate, the chunk of data that can fit in the buffer (before overflow)
- * may or may not have been transferred.
- *
- * Overflows are nasty, but can be avoided. Even though you were told to
- * ignore packets above, think about the lower level details: each transfer is
- * split into packets (typically small, with a maximum size of 512 bytes).
- * Overflows can only happen if the final packet in an incoming data transfer
- * is smaller than the actual packet that the device wants to transfer.
- * Therefore, you will never see an overflow if your transfer buffer size is a
- * multiple of the endpoint's packet size: the final packet will either
- * fill up completely or will be only partially filled.
- */
-
-/**
- * @defgroup asyncio Asynchronous device I/O
- *
- * This page details libusbx's asynchronous (non-blocking) API for USB device
- * I/O. This interface is very powerful but is also quite complex - you will
- * need to read this page carefully to understand the necessary considerations
- * and issues surrounding use of this interface. Simplistic applications
- * may wish to consider the \ref syncio "synchronous I/O API" instead.
- *
- * The asynchronous interface is built around the idea of separating transfer
- * submission and handling of transfer completion (the synchronous model
- * combines both of these into one). There may be a long delay between
- * submission and completion, however the asynchronous submission function
- * is non-blocking so will return control to your application during that
- * potentially long delay.
- *
- * \section asyncabstraction Transfer abstraction
- *
- * For the asynchronous I/O, libusbx implements the concept of a generic
- * transfer entity for all types of I/O (control, bulk, interrupt,
- * isochronous). The generic transfer object must be treated slightly
- * differently depending on which type of I/O you are performing with it.
- *
- * This is represented by the public libusb_transfer structure type.
- *
- * \section asynctrf Asynchronous transfers
- *
- * We can view asynchronous I/O as a 5 step process:
- * -# <b>Allocation</b>: allocate a libusb_transfer
- * -# <b>Filling</b>: populate the libusb_transfer instance with information
- * about the transfer you wish to perform
- * -# <b>Submission</b>: ask libusbx to submit the transfer
- * -# <b>Completion handling</b>: examine transfer results in the
- * libusb_transfer structure
- * -# <b>Deallocation</b>: clean up resources
- *
- *
- * \subsection asyncalloc Allocation
- *
- * This step involves allocating memory for a USB transfer. This is the
- * generic transfer object mentioned above. At this stage, the transfer
- * is "blank" with no details about what type of I/O it will be used for.
- *
- * Allocation is done with the libusb_alloc_transfer() function. You must use
- * this function rather than allocating your own transfers.
- *
- * \subsection asyncfill Filling
- *
- * This step is where you take a previously allocated transfer and fill it
- * with information to determine the message type and direction, data buffer,
- * callback function, etc.
- *
- * You can either fill the required fields yourself or you can use the
- * helper functions: libusb_fill_control_transfer(), libusb_fill_bulk_transfer()
- * and libusb_fill_interrupt_transfer().
- *
- * \subsection asyncsubmit Submission
- *
- * When you have allocated a transfer and filled it, you can submit it using
- * libusb_submit_transfer(). This function returns immediately but can be
- * regarded as firing off the I/O request in the background.
- *
- * \subsection asynccomplete Completion handling
- *
- * After a transfer has been submitted, one of four things can happen to it:
- *
- * - The transfer completes (i.e. some data was transferred)
- * - The transfer has a timeout and the timeout expires before all data is
- * transferred
- * - The transfer fails due to an error
- * - The transfer is cancelled
- *
- * Each of these will cause the user-specified transfer callback function to
- * be invoked. It is up to the callback function to determine which of the
- * above actually happened and to act accordingly.
- *
- * The user-specified callback is passed a pointer to the libusb_transfer
- * structure which was used to setup and submit the transfer. At completion
- * time, libusbx has populated this structure with results of the transfer:
- * success or failure reason, number of bytes of data transferred, etc. See
- * the libusb_transfer structure documentation for more information.
- *
- * \subsection Deallocation
- *
- * When a transfer has completed (i.e. the callback function has been invoked),
- * you are advised to free the transfer (unless you wish to resubmit it, see
- * below). Transfers are deallocated with libusb_free_transfer().
- *
- * It is undefined behaviour to free a transfer which has not completed.
- *
- * \section asyncresubmit Resubmission
- *
- * You may be wondering why allocation, filling, and submission are all
- * separated above where they could reasonably be combined into a single
- * operation.
- *
- * The reason for separation is to allow you to resubmit transfers without
- * having to allocate new ones every time. This is especially useful for
- * common situations dealing with interrupt endpoints - you allocate one
- * transfer, fill and submit it, and when it returns with results you just
- * resubmit it for the next interrupt.
- *
- * \section asynccancel Cancellation
- *
- * Another advantage of using the asynchronous interface is that you have
- * the ability to cancel transfers which have not yet completed. This is
- * done by calling the libusb_cancel_transfer() function.
- *
- * libusb_cancel_transfer() is asynchronous/non-blocking in itself. When the
- * cancellation actually completes, the transfer's callback function will
- * be invoked, and the callback function should check the transfer status to
- * determine that it was cancelled.
- *
- * Freeing the transfer after it has been cancelled but before cancellation
- * has completed will result in undefined behaviour.
- *
- * When a transfer is cancelled, some of the data may have been transferred.
- * libusbx will communicate this to you in the transfer callback. Do not assume
- * that no data was transferred.
- *
- * \section bulk_overflows Overflows on device-to-host bulk/interrupt endpoints
- *
- * If your device does not have predictable transfer sizes (or it misbehaves),
- * your application may submit a request for data on an IN endpoint which is
- * smaller than the data that the device wishes to send. In some circumstances
- * this will cause an overflow, which is a nasty condition to deal with. See
- * the \ref packetoverflow page for discussion.
- *
- * \section asyncctrl Considerations for control transfers
- *
- * The <tt>libusb_transfer</tt> structure is generic and hence does not
- * include specific fields for the control-specific setup packet structure.
- *
- * In order to perform a control transfer, you must place the 8-byte setup
- * packet at the start of the data buffer. To simplify this, you could
- * cast the buffer pointer to type struct libusb_control_setup, or you can
- * use the helper function libusb_fill_control_setup().
- *
- * The wLength field placed in the setup packet must be the length you would
- * expect to be sent in the setup packet: the length of the payload that
- * follows (or the expected maximum number of bytes to receive). However,
- * the length field of the libusb_transfer object must be the length of
- * the data buffer - i.e. it should be wLength <em>plus</em> the size of
- * the setup packet (LIBUSB_CONTROL_SETUP_SIZE).
- *
- * If you use the helper functions, this is simplified for you:
- * -# Allocate a buffer of size LIBUSB_CONTROL_SETUP_SIZE plus the size of the
- * data you are sending/requesting.
- * -# Call libusb_fill_control_setup() on the data buffer, using the transfer
- * request size as the wLength value (i.e. do not include the extra space you
- * allocated for the control setup).
- * -# If this is a host-to-device transfer, place the data to be transferred
- * in the data buffer, starting at offset LIBUSB_CONTROL_SETUP_SIZE.
- * -# Call libusb_fill_control_transfer() to associate the data buffer with
- * the transfer (and to set the remaining details such as callback and timeout).
- * - Note that there is no parameter to set the length field of the transfer.
- * The length is automatically inferred from the wLength field of the setup
- * packet.
- * -# Submit the transfer.
- *
- * The multi-byte control setup fields (wValue, wIndex and wLength) must
- * be given in little-endian byte order (the endianness of the USB bus).
- * Endianness conversion is transparently handled by
- * libusb_fill_control_setup() which is documented to accept host-endian
- * values.
- *
- * Further considerations are needed when handling transfer completion in
- * your callback function:
- * - As you might expect, the setup packet will still be sitting at the start
- * of the data buffer.
- * - If this was a device-to-host transfer, the received data will be sitting
- * at offset LIBUSB_CONTROL_SETUP_SIZE into the buffer.
- * - The actual_length field of the transfer structure is relative to the
- * wLength of the setup packet, rather than the size of the data buffer. So,
- * if your wLength was 4, your transfer's <tt>length</tt> was 12, then you
- * should expect an <tt>actual_length</tt> of 4 to indicate that the data was
- * transferred in entirity.
- *
- * To simplify parsing of setup packets and obtaining the data from the
- * correct offset, you may wish to use the libusb_control_transfer_get_data()
- * and libusb_control_transfer_get_setup() functions within your transfer
- * callback.
- *
- * Even though control endpoints do not halt, a completed control transfer
- * may have a LIBUSB_TRANSFER_STALL status code. This indicates the control
- * request was not supported.
- *
- * \section asyncintr Considerations for interrupt transfers
- *
- * All interrupt transfers are performed using the polling interval presented
- * by the bInterval value of the endpoint descriptor.
- *
- * \section asynciso Considerations for isochronous transfers
- *
- * Isochronous transfers are more complicated than transfers to
- * non-isochronous endpoints.
- *
- * To perform I/O to an isochronous endpoint, allocate the transfer by calling
- * libusb_alloc_transfer() with an appropriate number of isochronous packets.
- *
- * During filling, set \ref libusb_transfer::type "type" to
- * \ref libusb_transfer_type::LIBUSB_TRANSFER_TYPE_ISOCHRONOUS
- * "LIBUSB_TRANSFER_TYPE_ISOCHRONOUS", and set
- * \ref libusb_transfer::num_iso_packets "num_iso_packets" to a value less than
- * or equal to the number of packets you requested during allocation.
- * libusb_alloc_transfer() does not set either of these fields for you, given
- * that you might not even use the transfer on an isochronous endpoint.
- *
- * Next, populate the length field for the first num_iso_packets entries in
- * the \ref libusb_transfer::iso_packet_desc "iso_packet_desc" array. Section
- * 5.6.3 of the USB2 specifications describe how the maximum isochronous
- * packet length is determined by the wMaxPacketSize field in the endpoint
- * descriptor.
- * Two functions can help you here:
- *
- * - libusb_get_max_iso_packet_size() is an easy way to determine the max
- * packet size for an isochronous endpoint. Note that the maximum packet
- * size is actually the maximum number of bytes that can be transmitted in
- * a single microframe, therefore this function multiplies the maximum number
- * of bytes per transaction by the number of transaction opportunities per
- * microframe.
- * - libusb_set_iso_packet_lengths() assigns the same length to all packets
- * within a transfer, which is usually what you want.
- *
- * For outgoing transfers, you'll obviously fill the buffer and populate the
- * packet descriptors in hope that all the data gets transferred. For incoming
- * transfers, you must ensure the buffer has sufficient capacity for
- * the situation where all packets transfer the full amount of requested data.
- *
- * Completion handling requires some extra consideration. The
- * \ref libusb_transfer::actual_length "actual_length" field of the transfer
- * is meaningless and should not be examined; instead you must refer to the
- * \ref libusb_iso_packet_descriptor::actual_length "actual_length" field of
- * each individual packet.
- *
- * The \ref libusb_transfer::status "status" field of the transfer is also a
- * little misleading:
- * - If the packets were submitted and the isochronous data microframes
- * completed normally, status will have value
- * \ref libusb_transfer_status::LIBUSB_TRANSFER_COMPLETED
- * "LIBUSB_TRANSFER_COMPLETED". Note that bus errors and software-incurred
- * delays are not counted as transfer errors; the transfer.status field may
- * indicate COMPLETED even if some or all of the packets failed. Refer to
- * the \ref libusb_iso_packet_descriptor::status "status" field of each
- * individual packet to determine packet failures.
- * - The status field will have value
- * \ref libusb_transfer_status::LIBUSB_TRANSFER_ERROR
- * "LIBUSB_TRANSFER_ERROR" only when serious errors were encountered.
- * - Other transfer status codes occur with normal behaviour.
- *
- * The data for each packet will be found at an offset into the buffer that
- * can be calculated as if each prior packet completed in full. The
- * libusb_get_iso_packet_buffer() and libusb_get_iso_packet_buffer_simple()
- * functions may help you here.
- *
- * \section asyncmem Memory caveats
- *
- * In most circumstances, it is not safe to use stack memory for transfer
- * buffers. This is because the function that fired off the asynchronous
- * transfer may return before libusbx has finished using the buffer, and when
- * the function returns it's stack gets destroyed. This is true for both
- * host-to-device and device-to-host transfers.
- *
- * The only case in which it is safe to use stack memory is where you can
- * guarantee that the function owning the stack space for the buffer does not
- * return until after the transfer's callback function has completed. In every
- * other case, you need to use heap memory instead.
- *
- * \section asyncflags Fine control
- *
- * Through using this asynchronous interface, you may find yourself repeating
- * a few simple operations many times. You can apply a bitwise OR of certain
- * flags to a transfer to simplify certain things:
- * - \ref libusb_transfer_flags::LIBUSB_TRANSFER_SHORT_NOT_OK
- * "LIBUSB_TRANSFER_SHORT_NOT_OK" results in transfers which transferred
- * less than the requested amount of data being marked with status
- * \ref libusb_transfer_status::LIBUSB_TRANSFER_ERROR "LIBUSB_TRANSFER_ERROR"
- * (they would normally be regarded as COMPLETED)
- * - \ref libusb_transfer_flags::LIBUSB_TRANSFER_FREE_BUFFER
- * "LIBUSB_TRANSFER_FREE_BUFFER" allows you to ask libusbx to free the transfer
- * buffer when freeing the transfer.
- * - \ref libusb_transfer_flags::LIBUSB_TRANSFER_FREE_TRANSFER
- * "LIBUSB_TRANSFER_FREE_TRANSFER" causes libusbx to automatically free the
- * transfer after the transfer callback returns.
- *
- * \section asyncevent Event handling
- *
- * An asynchronous model requires that libusbx perform work at various
- * points in time - namely processing the results of previously-submitted
- * transfers and invoking the user-supplied callback function.
- *
- * This gives rise to the libusb_handle_events() function which your
- * application must call into when libusbx has work do to. This gives libusbx
- * the opportunity to reap pending transfers, invoke callbacks, etc.
- *
- * There are 2 different approaches to dealing with libusb_handle_events:
- *
- * -# Repeatedly call libusb_handle_events() in blocking mode from a dedicated
- * thread.
- * -# Integrate libusbx with your application's main event loop. libusbx
- * exposes a set of file descriptors which allow you to do this.
- *
- * The first approach has the big advantage that it will also work on Windows
- * were libusbx' poll API for select / poll integration is not available. So
- * if you want to support Windows and use the async API, you must use this
- * approach, see the \ref eventthread "Using an event handling thread" section
- * below for details.
- *
- * If you prefer a single threaded approach with a single central event loop,
- * see the \ref poll "polling and timing" section for how to integrate libusbx
- * into your application's main event loop.
- *
- * \section eventthread Using an event handling thread
- *
- * Lets begin with stating the obvious: If you're going to use a separate
- * thread for libusbx event handling, your callback functions MUST be
- * threadsafe.
- *
- * Other then that doing event handling from a separate thread, is mostly
- * simple. You can use an event thread function as follows:
-\code
-void *event_thread_func(void *ctx)
-{
- while (event_thread_run)
- libusb_handle_events(ctx);
-
- return NULL;
-}
-\endcode
- *
- * There is one caveat though, stopping this thread requires setting the
- * event_thread_run variable to 0, and after that libusb_handle_events() needs
- * to return control to event_thread_func. But unless some event happens,
- * libusb_handle_events() will not return.
- *
- * There are 2 different ways of dealing with this, depending on if your
- * application uses libusbx' \ref hotplug "hotplug" support or not.
- *
- * Applications which do not use hotplug support, should not start the event
- * thread until after their first call to libusb_open(), and should stop the
- * thread when closing the last open device as follows:
-\code
-void my_close_handle(libusb_device_handle *handle)
-{
- if (open_devs == 1)
- event_thread_run = 0;
-
- libusb_close(handle); // This wakes up libusb_handle_events()
-
- if (open_devs == 1)
- pthread_join(event_thread);
-
- open_devs--;
-}
-\endcode
- *
- * Applications using hotplug support should start the thread at program init,
- * after having successfully called libusb_hotplug_register_callback(), and
- * should stop the thread at program exit as follows:
-\code
-void my_libusb_exit(void)
-{
- event_thread_run = 0;
- libusb_hotplug_deregister_callback(ctx, hotplug_cb_handle); // This wakes up libusb_handle_events()
- pthread_join(event_thread);
- libusb_exit(ctx);
-}
-\endcode
- */
-
-/**
- * @defgroup poll Polling and timing
- *
- * This page documents libusbx's functions for polling events and timing.
- * These functions are only necessary for users of the
- * \ref asyncio "asynchronous API". If you are only using the simpler
- * \ref syncio "synchronous API" then you do not need to ever call these
- * functions.
- *
- * The justification for the functionality described here has already been
- * discussed in the \ref asyncevent "event handling" section of the
- * asynchronous API documentation. In summary, libusbx does not create internal
- * threads for event processing and hence relies on your application calling
- * into libusbx at certain points in time so that pending events can be handled.
- *
- * Your main loop is probably already calling poll() or select() or a
- * variant on a set of file descriptors for other event sources (e.g. keyboard
- * button presses, mouse movements, network sockets, etc). You then add
- * libusbx's file descriptors to your poll()/select() calls, and when activity
- * is detected on such descriptors you know it is time to call
- * libusb_handle_events().
- *
- * There is one final event handling complication. libusbx supports
- * asynchronous transfers which time out after a specified time period.
- *
- * On some platforms a timerfd is used, so the timeout handling is just another
- * fd, on other platforms this requires that libusbx is called into at or after
- * the timeout to handle it. So, in addition to considering libusbx's file
- * descriptors in your main event loop, you must also consider that libusbx
- * sometimes needs to be called into at fixed points in time even when there
- * is no file descriptor activity, see \ref polltime details.
- *
- * In order to know precisely when libusbx needs to be called into, libusbx
- * offers you a set of pollable file descriptors and information about when
- * the next timeout expires.
- *
- * If you are using the asynchronous I/O API, you must take one of the two
- * following options, otherwise your I/O will not complete.
- *
- * \section pollsimple The simple option
- *
- * If your application revolves solely around libusbx and does not need to
- * handle other event sources, you can have a program structure as follows:
-\code
-// initialize libusbx
-// find and open device
-// maybe fire off some initial async I/O
-
-while (user_has_not_requested_exit)
- libusb_handle_events(ctx);
-
-// clean up and exit
-\endcode
- *
- * With such a simple main loop, you do not have to worry about managing
- * sets of file descriptors or handling timeouts. libusb_handle_events() will
- * handle those details internally.
- *
- * \section pollmain The more advanced option
- *
- * \note This functionality is currently only available on Unix-like platforms.
- * On Windows, libusb_get_pollfds() simply returns NULL. Applications which
- * want to support Windows are advised to use an \ref eventthread
- * "event handling thread" instead.
- *
- * In more advanced applications, you will already have a main loop which
- * is monitoring other event sources: network sockets, X11 events, mouse
- * movements, etc. Through exposing a set of file descriptors, libusbx is
- * designed to cleanly integrate into such main loops.
- *
- * In addition to polling file descriptors for the other event sources, you
- * take a set of file descriptors from libusbx and monitor those too. When you
- * detect activity on libusbx's file descriptors, you call
- * libusb_handle_events_timeout() in non-blocking mode.
- *
- * What's more, libusbx may also need to handle events at specific moments in
- * time. No file descriptor activity is generated at these times, so your
- * own application needs to be continually aware of when the next one of these
- * moments occurs (through calling libusb_get_next_timeout()), and then it
- * needs to call libusb_handle_events_timeout() in non-blocking mode when
- * these moments occur. This means that you need to adjust your
- * poll()/select() timeout accordingly.
- *
- * libusbx provides you with a set of file descriptors to poll and expects you
- * to poll all of them, treating them as a single entity. The meaning of each
- * file descriptor in the set is an internal implementation detail,
- * platform-dependent and may vary from release to release. Don't try and
- * interpret the meaning of the file descriptors, just do as libusbx indicates,
- * polling all of them at once.
- *
- * In pseudo-code, you want something that looks like:
-\code
-// initialise libusbx
-
-libusb_get_pollfds(ctx)
-while (user has not requested application exit) {
- libusb_get_next_timeout(ctx);
- poll(on libusbx file descriptors plus any other event sources of interest,
- using a timeout no larger than the value libusbx just suggested)
- if (poll() indicated activity on libusbx file descriptors)
- libusb_handle_events_timeout(ctx, &zero_tv);
- if (time has elapsed to or beyond the libusbx timeout)
- libusb_handle_events_timeout(ctx, &zero_tv);
- // handle events from other sources here
-}
-
-// clean up and exit
-\endcode
- *
- * \subsection polltime Notes on time-based events
- *
- * The above complication with having to track time and call into libusbx at
- * specific moments is a bit of a headache. For maximum compatibility, you do
- * need to write your main loop as above, but you may decide that you can
- * restrict the supported platforms of your application and get away with
- * a more simplistic scheme.
- *
- * These time-based event complications are \b not required on the following
- * platforms:
- * - Darwin
- * - Linux, provided that the following version requirements are satisfied:
- * - Linux v2.6.27 or newer, compiled with timerfd support
- * - glibc v2.9 or newer
- * - libusbx v1.0.5 or newer
- *
- * Under these configurations, libusb_get_next_timeout() will \em always return
- * 0, so your main loop can be simplified to:
-\code
-// initialise libusbx
-
-libusb_get_pollfds(ctx)
-while (user has not requested application exit) {
- poll(on libusbx file descriptors plus any other event sources of interest,
- using any timeout that you like)
- if (poll() indicated activity on libusbx file descriptors)
- libusb_handle_events_timeout(ctx, &zero_tv);
- // handle events from other sources here
-}
-
-// clean up and exit
-\endcode
- *
- * Do remember that if you simplify your main loop to the above, you will
- * lose compatibility with some platforms (including legacy Linux platforms,
- * and <em>any future platforms supported by libusbx which may have time-based
- * event requirements</em>). The resultant problems will likely appear as
- * strange bugs in your application.
- *
- * You can use the libusb_pollfds_handle_timeouts() function to do a runtime
- * check to see if it is safe to ignore the time-based event complications.
- * If your application has taken the shortcut of ignoring libusbx's next timeout
- * in your main loop, then you are advised to check the return value of
- * libusb_pollfds_handle_timeouts() during application startup, and to abort
- * if the platform does suffer from these timing complications.
- *
- * \subsection fdsetchange Changes in the file descriptor set
- *
- * The set of file descriptors that libusbx uses as event sources may change
- * during the life of your application. Rather than having to repeatedly
- * call libusb_get_pollfds(), you can set up notification functions for when
- * the file descriptor set changes using libusb_set_pollfd_notifiers().
- *
- * \subsection mtissues Multi-threaded considerations
- *
- * Unfortunately, the situation is complicated further when multiple threads
- * come into play. If two threads are monitoring the same file descriptors,
- * the fact that only one thread will be woken up when an event occurs causes
- * some headaches.
- *
- * The events lock, event waiters lock, and libusb_handle_events_locked()
- * entities are added to solve these problems. You do not need to be concerned
- * with these entities otherwise.
- *
- * See the extra documentation: \ref mtasync
- */
-
-/** \page mtasync Multi-threaded applications and asynchronous I/O
- *
- * libusbx is a thread-safe library, but extra considerations must be applied
- * to applications which interact with libusbx from multiple threads.
- *
- * The underlying issue that must be addressed is that all libusbx I/O
- * revolves around monitoring file descriptors through the poll()/select()
- * system calls. This is directly exposed at the
- * \ref asyncio "asynchronous interface" but it is important to note that the
- * \ref syncio "synchronous interface" is implemented on top of the
- * asynchonrous interface, therefore the same considerations apply.
- *
- * The issue is that if two or more threads are concurrently calling poll()
- * or select() on libusbx's file descriptors then only one of those threads
- * will be woken up when an event arrives. The others will be completely
- * oblivious that anything has happened.
- *
- * Consider the following pseudo-code, which submits an asynchronous transfer
- * then waits for its completion. This style is one way you could implement a
- * synchronous interface on top of the asynchronous interface (and libusbx
- * does something similar, albeit more advanced due to the complications
- * explained on this page).
- *
-\code
-void cb(struct libusb_transfer *transfer)
-{
- int *completed = transfer->user_data;
- *completed = 1;
-}
-
-void myfunc() {
- struct libusb_transfer *transfer;
- unsigned char buffer[LIBUSB_CONTROL_SETUP_SIZE];
- int completed = 0;
-
- transfer = libusb_alloc_transfer(0);
- libusb_fill_control_setup(buffer,
- LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT, 0x04, 0x01, 0, 0);
- libusb_fill_control_transfer(transfer, dev, buffer, cb, &completed, 1000);
- libusb_submit_transfer(transfer);
-
- while (!completed) {
- poll(libusbx file descriptors, 120*1000);
- if (poll indicates activity)
- libusb_handle_events_timeout(ctx, &zero_tv);
- }
- printf("completed!");
- // other code here
-}
-\endcode
- *
- * Here we are <em>serializing</em> completion of an asynchronous event
- * against a condition - the condition being completion of a specific transfer.
- * The poll() loop has a long timeout to minimize CPU usage during situations
- * when nothing is happening (it could reasonably be unlimited).
- *
- * If this is the only thread that is polling libusbx's file descriptors, there
- * is no problem: there is no danger that another thread will swallow up the
- * event that we are interested in. On the other hand, if there is another
- * thread polling the same descriptors, there is a chance that it will receive
- * the event that we were interested in. In this situation, <tt>myfunc()</tt>
- * will only realise that the transfer has completed on the next iteration of
- * the loop, <em>up to 120 seconds later.</em> Clearly a two-minute delay is
- * undesirable, and don't even think about using short timeouts to circumvent
- * this issue!
- *
- * The solution here is to ensure that no two threads are ever polling the
- * file descriptors at the same time. A naive implementation of this would
- * impact the capabilities of the library, so libusbx offers the scheme
- * documented below to ensure no loss of functionality.
- *
- * Before we go any further, it is worth mentioning that all libusb-wrapped
- * event handling procedures fully adhere to the scheme documented below.
- * This includes libusb_handle_events() and its variants, and all the
- * synchronous I/O functions - libusbx hides this headache from you.
- *
- * \section Using libusb_handle_events() from multiple threads
- *
- * Even when only using libusb_handle_events() and synchronous I/O functions,
- * you can still have a race condition. You might be tempted to solve the
- * above with libusb_handle_events() like so:
- *
-\code
- libusb_submit_transfer(transfer);
-
- while (!completed) {
- libusb_handle_events(ctx);
- }
- printf("completed!");
-\endcode
- *
- * This however has a race between the checking of completed and
- * libusb_handle_events() acquiring the events lock, so another thread
- * could have completed the transfer, resulting in this thread hanging
- * until either a timeout or another event occurs. See also commit
- * 6696512aade99bb15d6792af90ae329af270eba6 which fixes this in the
- * synchronous API implementation of libusb.
- *
- * Fixing this race requires checking the variable completed only after
- * taking the event lock, which defeats the concept of just calling
- * libusb_handle_events() without worrying about locking. This is why
- * libusb-1.0.9 introduces the new libusb_handle_events_timeout_completed()
- * and libusb_handle_events_completed() functions, which handles doing the
- * completion check for you after they have acquired the lock:
- *
-\code
- libusb_submit_transfer(transfer);
-
- while (!completed) {
- libusb_handle_events_completed(ctx, &completed);
- }
- printf("completed!");
-\endcode
- *
- * This nicely fixes the race in our example. Note that if all you want to
- * do is submit a single transfer and wait for its completion, then using
- * one of the synchronous I/O functions is much easier.
- *
- * \section eventlock The events lock
- *
- * The problem is when we consider the fact that libusbx exposes file
- * descriptors to allow for you to integrate asynchronous USB I/O into
- * existing main loops, effectively allowing you to do some work behind
- * libusbx's back. If you do take libusbx's file descriptors and pass them to
- * poll()/select() yourself, you need to be aware of the associated issues.
- *
- * The first concept to be introduced is the events lock. The events lock
- * is used to serialize threads that want to handle events, such that only
- * one thread is handling events at any one time.
- *
- * You must take the events lock before polling libusbx file descriptors,
- * using libusb_lock_events(). You must release the lock as soon as you have
- * aborted your poll()/select() loop, using libusb_unlock_events().
- *
- * \section threadwait Letting other threads do the work for you
- *
- * Although the events lock is a critical part of the solution, it is not
- * enough on it's own. You might wonder if the following is sufficient...
-\code
- libusb_lock_events(ctx);
- while (!completed) {
- poll(libusbx file descriptors, 120*1000);
- if (poll indicates activity)
- libusb_handle_events_timeout(ctx, &zero_tv);
- }
- libusb_unlock_events(ctx);
-\endcode
- * ...and the answer is that it is not. This is because the transfer in the
- * code shown above may take a long time (say 30 seconds) to complete, and
- * the lock is not released until the transfer is completed.
- *
- * Another thread with similar code that wants to do event handling may be
- * working with a transfer that completes after a few milliseconds. Despite
- * having such a quick completion time, the other thread cannot check that
- * status of its transfer until the code above has finished (30 seconds later)
- * due to contention on the lock.
- *
- * To solve this, libusbx offers you a mechanism to determine when another
- * thread is handling events. It also offers a mechanism to block your thread
- * until the event handling thread has completed an event (and this mechanism
- * does not involve polling of file descriptors).
- *
- * After determining that another thread is currently handling events, you
- * obtain the <em>event waiters</em> lock using libusb_lock_event_waiters().
- * You then re-check that some other thread is still handling events, and if
- * so, you call libusb_wait_for_event().
- *
- * libusb_wait_for_event() puts your application to sleep until an event
- * occurs, or until a thread releases the events lock. When either of these
- * things happen, your thread is woken up, and should re-check the condition
- * it was waiting on. It should also re-check that another thread is handling
- * events, and if not, it should start handling events itself.
- *
- * This looks like the following, as pseudo-code:
-\code
-retry:
-if (libusb_try_lock_events(ctx) == 0) {
- // we obtained the event lock: do our own event handling
- while (!completed) {
- if (!libusb_event_handling_ok(ctx)) {
- libusb_unlock_events(ctx);
- goto retry;
- }
- poll(libusbx file descriptors, 120*1000);
- if (poll indicates activity)
- libusb_handle_events_locked(ctx, 0);
- }
- libusb_unlock_events(ctx);
-} else {
- // another thread is doing event handling. wait for it to signal us that
- // an event has completed
- libusb_lock_event_waiters(ctx);
-
- while (!completed) {
- // now that we have the event waiters lock, double check that another
- // thread is still handling events for us. (it may have ceased handling
- // events in the time it took us to reach this point)
- if (!libusb_event_handler_active(ctx)) {
- // whoever was handling events is no longer doing so, try again
- libusb_unlock_event_waiters(ctx);
- goto retry;
- }
-
- libusb_wait_for_event(ctx, NULL);
- }
- libusb_unlock_event_waiters(ctx);
-}
-printf("completed!\n");
-\endcode
- *
- * A naive look at the above code may suggest that this can only support
- * one event waiter (hence a total of 2 competing threads, the other doing
- * event handling), because the event waiter seems to have taken the event
- * waiters lock while waiting for an event. However, the system does support
- * multiple event waiters, because libusb_wait_for_event() actually drops
- * the lock while waiting, and reaquires it before continuing.
- *
- * We have now implemented code which can dynamically handle situations where
- * nobody is handling events (so we should do it ourselves), and it can also
- * handle situations where another thread is doing event handling (so we can
- * piggyback onto them). It is also equipped to handle a combination of
- * the two, for example, another thread is doing event handling, but for
- * whatever reason it stops doing so before our condition is met, so we take
- * over the event handling.
- *
- * Four functions were introduced in the above pseudo-code. Their importance
- * should be apparent from the code shown above.
- * -# libusb_try_lock_events() is a non-blocking function which attempts
- * to acquire the events lock but returns a failure code if it is contended.
- * -# libusb_event_handling_ok() checks that libusbx is still happy for your
- * thread to be performing event handling. Sometimes, libusbx needs to
- * interrupt the event handler, and this is how you can check if you have
- * been interrupted. If this function returns 0, the correct behaviour is
- * for you to give up the event handling lock, and then to repeat the cycle.
- * The following libusb_try_lock_events() will fail, so you will become an
- * events waiter. For more information on this, read \ref fullstory below.
- * -# libusb_handle_events_locked() is a variant of
- * libusb_handle_events_timeout() that you can call while holding the
- * events lock. libusb_handle_events_timeout() itself implements similar
- * logic to the above, so be sure not to call it when you are
- * "working behind libusbx's back", as is the case here.
- * -# libusb_event_handler_active() determines if someone is currently
- * holding the events lock
- *
- * You might be wondering why there is no function to wake up all threads
- * blocked on libusb_wait_for_event(). This is because libusbx can do this
- * internally: it will wake up all such threads when someone calls
- * libusb_unlock_events() or when a transfer completes (at the point after its
- * callback has returned).
- *
- * \subsection fullstory The full story
- *
- * The above explanation should be enough to get you going, but if you're
- * really thinking through the issues then you may be left with some more
- * questions regarding libusbx's internals. If you're curious, read on, and if
- * not, skip to the next section to avoid confusing yourself!
- *
- * The immediate question that may spring to mind is: what if one thread
- * modifies the set of file descriptors that need to be polled while another
- * thread is doing event handling?
- *
- * There are 2 situations in which this may happen.
- * -# libusb_open() will add another file descriptor to the poll set,
- * therefore it is desirable to interrupt the event handler so that it
- * restarts, picking up the new descriptor.
- * -# libusb_close() will remove a file descriptor from the poll set. There
- * are all kinds of race conditions that could arise here, so it is
- * important that nobody is doing event handling at this time.
- *
- * libusbx handles these issues internally, so application developers do not
- * have to stop their event handlers while opening/closing devices. Here's how
- * it works, focusing on the libusb_close() situation first:
- *
- * -# During initialization, libusbx opens an internal pipe, and it adds the read
- * end of this pipe to the set of file descriptors to be polled.
- * -# During libusb_close(), libusbx writes some dummy data on this control pipe.
- * This immediately interrupts the event handler. libusbx also records
- * internally that it is trying to interrupt event handlers for this
- * high-priority event.
- * -# At this point, some of the functions described above start behaving
- * differently:
- * - libusb_event_handling_ok() starts returning 1, indicating that it is NOT
- * OK for event handling to continue.
- * - libusb_try_lock_events() starts returning 1, indicating that another
- * thread holds the event handling lock, even if the lock is uncontended.
- * - libusb_event_handler_active() starts returning 1, indicating that
- * another thread is doing event handling, even if that is not true.
- * -# The above changes in behaviour result in the event handler stopping and
- * giving up the events lock very quickly, giving the high-priority
- * libusb_close() operation a "free ride" to acquire the events lock. All
- * threads that are competing to do event handling become event waiters.
- * -# With the events lock held inside libusb_close(), libusbx can safely remove
- * a file descriptor from the poll set, in the safety of knowledge that
- * nobody is polling those descriptors or trying to access the poll set.
- * -# After obtaining the events lock, the close operation completes very
- * quickly (usually a matter of milliseconds) and then immediately releases
- * the events lock.
- * -# At the same time, the behaviour of libusb_event_handling_ok() and friends
- * reverts to the original, documented behaviour.
- * -# The release of the events lock causes the threads that are waiting for
- * events to be woken up and to start competing to become event handlers
- * again. One of them will succeed; it will then re-obtain the list of poll
- * descriptors, and USB I/O will then continue as normal.
- *
- * libusb_open() is similar, and is actually a more simplistic case. Upon a
- * call to libusb_open():
- *
- * -# The device is opened and a file descriptor is added to the poll set.
- * -# libusbx sends some dummy data on the control pipe, and records that it
- * is trying to modify the poll descriptor set.
- * -# The event handler is interrupted, and the same behaviour change as for
- * libusb_close() takes effect, causing all event handling threads to become
- * event waiters.
- * -# The libusb_open() implementation takes its free ride to the events lock.
- * -# Happy that it has successfully paused the events handler, libusb_open()
- * releases the events lock.
- * -# The event waiter threads are all woken up and compete to become event
- * handlers again. The one that succeeds will obtain the list of poll
- * descriptors again, which will include the addition of the new device.
- *
- * \subsection concl Closing remarks
- *
- * The above may seem a little complicated, but hopefully I have made it clear
- * why such complications are necessary. Also, do not forget that this only
- * applies to applications that take libusbx's file descriptors and integrate
- * them into their own polling loops.
- *
- * You may decide that it is OK for your multi-threaded application to ignore
- * some of the rules and locks detailed above, because you don't think that
- * two threads can ever be polling the descriptors at the same time. If that
- * is the case, then that's good news for you because you don't have to worry.
- * But be careful here; remember that the synchronous I/O functions do event
- * handling internally. If you have one thread doing event handling in a loop
- * (without implementing the rules and locking semantics documented above)
- * and another trying to send a synchronous USB transfer, you will end up with
- * two threads monitoring the same descriptors, and the above-described
- * undesirable behaviour occuring. The solution is for your polling thread to
- * play by the rules; the synchronous I/O functions do so, and this will result
- * in them getting along in perfect harmony.
- *
- * If you do have a dedicated thread doing event handling, it is perfectly
- * legal for it to take the event handling lock for long periods of time. Any
- * synchronous I/O functions you call from other threads will transparently
- * fall back to the "event waiters" mechanism detailed above. The only
- * consideration that your event handling thread must apply is the one related
- * to libusb_event_handling_ok(): you must call this before every poll(), and
- * give up the events lock if instructed.
- */
-
-int usbi_io_init(struct libusb_context *ctx)
-{
- int r;
-
- usbi_mutex_init(&ctx->flying_transfers_lock, NULL);
- usbi_mutex_init(&ctx->pollfds_lock, NULL);
- usbi_mutex_init(&ctx->pollfd_modify_lock, NULL);
- usbi_mutex_init_recursive(&ctx->events_lock, NULL);
- usbi_mutex_init(&ctx->event_waiters_lock, NULL);
- usbi_cond_init(&ctx->event_waiters_cond, NULL);
- list_init(&ctx->flying_transfers);
- list_init(&ctx->pollfds);
-
- /* FIXME should use an eventfd on kernels that support it */
- r = usbi_pipe(ctx->ctrl_pipe);
- if (r < 0) {
- r = LIBUSB_ERROR_OTHER;
- goto err;
- }
-
- r = usbi_add_pollfd(ctx, ctx->ctrl_pipe[0], POLLIN);
- if (r < 0)
- goto err_close_pipe;
-
- /* create hotplug pipe */
- r = usbi_pipe(ctx->hotplug_pipe);
- if (r < 0) {
- r = LIBUSB_ERROR_OTHER;
- goto err;
- }
-
- r = usbi_add_pollfd(ctx, ctx->hotplug_pipe[0], POLLIN);
- if (r < 0)
- goto err_close_hp_pipe;
-
-#ifdef USBI_TIMERFD_AVAILABLE
- ctx->timerfd = timerfd_create(usbi_backend->get_timerfd_clockid(),
- TFD_NONBLOCK);
- if (ctx->timerfd >= 0) {
- usbi_dbg("using timerfd for timeouts");
- r = usbi_add_pollfd(ctx, ctx->timerfd, POLLIN);
- if (r < 0) {
- usbi_remove_pollfd(ctx, ctx->ctrl_pipe[0]);
- close(ctx->timerfd);
- goto err_close_hp_pipe;
- }
- } else {
- usbi_dbg("timerfd not available (code %d error %d)", ctx->timerfd, errno);
- ctx->timerfd = -1;
- }
-#endif
-
- return 0;
-
-err_close_hp_pipe:
- usbi_close(ctx->hotplug_pipe[0]);
- usbi_close(ctx->hotplug_pipe[1]);
-err_close_pipe:
- usbi_close(ctx->ctrl_pipe[0]);
- usbi_close(ctx->ctrl_pipe[1]);
-err:
- usbi_mutex_destroy(&ctx->flying_transfers_lock);
- usbi_mutex_destroy(&ctx->pollfds_lock);
- usbi_mutex_destroy(&ctx->pollfd_modify_lock);
- usbi_mutex_destroy(&ctx->events_lock);
- usbi_mutex_destroy(&ctx->event_waiters_lock);
- usbi_cond_destroy(&ctx->event_waiters_cond);
- return r;
-}
-
-void usbi_io_exit(struct libusb_context *ctx)
-{
- usbi_remove_pollfd(ctx, ctx->ctrl_pipe[0]);
- usbi_close(ctx->ctrl_pipe[0]);
- usbi_close(ctx->ctrl_pipe[1]);
- usbi_remove_pollfd(ctx, ctx->hotplug_pipe[0]);
- usbi_close(ctx->hotplug_pipe[0]);
- usbi_close(ctx->hotplug_pipe[1]);
-#ifdef USBI_TIMERFD_AVAILABLE
- if (usbi_using_timerfd(ctx)) {
- usbi_remove_pollfd(ctx, ctx->timerfd);
- close(ctx->timerfd);
- }
-#endif
- usbi_mutex_destroy(&ctx->flying_transfers_lock);
- usbi_mutex_destroy(&ctx->pollfds_lock);
- usbi_mutex_destroy(&ctx->pollfd_modify_lock);
- usbi_mutex_destroy(&ctx->events_lock);
- usbi_mutex_destroy(&ctx->event_waiters_lock);
- usbi_cond_destroy(&ctx->event_waiters_cond);
-}
-
-static int calculate_timeout(struct usbi_transfer *transfer)
-{
- int r;
- struct timespec current_time;
- unsigned int timeout =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer)->timeout;
-
- if (!timeout)
- return 0;
-
- r = usbi_backend->clock_gettime(USBI_CLOCK_MONOTONIC, &current_time);
- if (r < 0) {
- usbi_err(ITRANSFER_CTX(transfer),
- "failed to read monotonic clock, errno=%d", errno);
- return r;
- }
-
- current_time.tv_sec += timeout / 1000;
- current_time.tv_nsec += (timeout % 1000) * 1000000;
-
- while (current_time.tv_nsec >= 1000000000) {
- current_time.tv_nsec -= 1000000000;
- current_time.tv_sec++;
- }
-
- TIMESPEC_TO_TIMEVAL(&transfer->timeout, &current_time);
- return 0;
-}
-
-/* add a transfer to the (timeout-sorted) active transfers list.
- * Callers of this function must hold the flying_transfers_lock.
- * This function *always* adds the transfer to the flying_transfers list,
- * it will return non 0 if it fails to update the timer, but even then the
- * transfer is added to the flying_transfers list. */
-static int add_to_flying_list(struct usbi_transfer *transfer)
-{
- struct usbi_transfer *cur;
- struct timeval *timeout = &transfer->timeout;
- struct libusb_context *ctx = ITRANSFER_CTX(transfer);
- int r = 0;
- int first = 1;
-
- /* if we have no other flying transfers, start the list with this one */
- if (list_empty(&ctx->flying_transfers)) {
- list_add(&transfer->list, &ctx->flying_transfers);
- goto out;
- }
-
- /* if we have infinite timeout, append to end of list */
- if (!timerisset(timeout)) {
- list_add_tail(&transfer->list, &ctx->flying_transfers);
- /* first is irrelevant in this case */
- goto out;
- }
-
- /* otherwise, find appropriate place in list */
- list_for_each_entry(cur, &ctx->flying_transfers, list, struct usbi_transfer) {
- /* find first timeout that occurs after the transfer in question */
- struct timeval *cur_tv = &cur->timeout;
-
- if (!timerisset(cur_tv) || (cur_tv->tv_sec > timeout->tv_sec) ||
- (cur_tv->tv_sec == timeout->tv_sec &&
- cur_tv->tv_usec > timeout->tv_usec)) {
- list_add_tail(&transfer->list, &cur->list);
- goto out;
- }
- first = 0;
- }
- /* first is 0 at this stage (list not empty) */
-
- /* otherwise we need to be inserted at the end */
- list_add_tail(&transfer->list, &ctx->flying_transfers);
-out:
-#ifdef USBI_TIMERFD_AVAILABLE
- if (first && usbi_using_timerfd(ctx) && timerisset(timeout)) {
- /* if this transfer has the lowest timeout of all active transfers,
- * rearm the timerfd with this transfer's timeout */
- const struct itimerspec it = { {0, 0},
- { timeout->tv_sec, timeout->tv_usec * 1000 } };
- usbi_dbg("arm timerfd for timeout in %dms (first in line)",
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer)->timeout);
- r = timerfd_settime(ctx->timerfd, TFD_TIMER_ABSTIME, &it, NULL);
- if (r < 0) {
- usbi_warn(ctx, "failed to arm first timerfd (errno %d)", errno);
- r = LIBUSB_ERROR_OTHER;
- }
- }
-#else
- UNUSED(first);
-#endif
-
- return r;
-}
-
-/** \ingroup asyncio
- * Allocate a libusbx transfer with a specified number of isochronous packet
- * descriptors. The returned transfer is pre-initialized for you. When the new
- * transfer is no longer needed, it should be freed with
- * libusb_free_transfer().
- *
- * Transfers intended for non-isochronous endpoints (e.g. control, bulk,
- * interrupt) should specify an iso_packets count of zero.
- *
- * For transfers intended for isochronous endpoints, specify an appropriate
- * number of packet descriptors to be allocated as part of the transfer.
- * The returned transfer is not specially initialized for isochronous I/O;
- * you are still required to set the
- * \ref libusb_transfer::num_iso_packets "num_iso_packets" and
- * \ref libusb_transfer::type "type" fields accordingly.
- *
- * It is safe to allocate a transfer with some isochronous packets and then
- * use it on a non-isochronous endpoint. If you do this, ensure that at time
- * of submission, num_iso_packets is 0 and that type is set appropriately.
- *
- * \param iso_packets number of isochronous packet descriptors to allocate
- * \returns a newly allocated transfer, or NULL on error
- */
-DEFAULT_VISIBILITY
-struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(
- int iso_packets)
-{
- size_t os_alloc_size = usbi_backend->transfer_priv_size
- + (usbi_backend->add_iso_packet_size * iso_packets);
- size_t alloc_size = sizeof(struct usbi_transfer)
- + sizeof(struct libusb_transfer)
- + (sizeof(struct libusb_iso_packet_descriptor) * iso_packets)
- + os_alloc_size;
- struct usbi_transfer *itransfer = calloc(1, alloc_size);
- if (!itransfer)
- return NULL;
-
- itransfer->num_iso_packets = iso_packets;
- usbi_mutex_init(&itransfer->lock, NULL);
- return USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-}
-
-/** \ingroup asyncio
- * Free a transfer structure. This should be called for all transfers
- * allocated with libusb_alloc_transfer().
- *
- * If the \ref libusb_transfer_flags::LIBUSB_TRANSFER_FREE_BUFFER
- * "LIBUSB_TRANSFER_FREE_BUFFER" flag is set and the transfer buffer is
- * non-NULL, this function will also free the transfer buffer using the
- * standard system memory allocator (e.g. free()).
- *
- * It is legal to call this function with a NULL transfer. In this case,
- * the function will simply return safely.
- *
- * It is not legal to free an active transfer (one which has been submitted
- * and has not yet completed).
- *
- * \param transfer the transfer to free
- */
-void API_EXPORTED libusb_free_transfer(struct libusb_transfer *transfer)
-{
- struct usbi_transfer *itransfer;
- if (!transfer)
- return;
-
- if (transfer->flags & LIBUSB_TRANSFER_FREE_BUFFER && transfer->buffer)
- free(transfer->buffer);
-
- itransfer = LIBUSB_TRANSFER_TO_USBI_TRANSFER(transfer);
- usbi_mutex_destroy(&itransfer->lock);
- free(itransfer);
-}
-
-#ifdef USBI_TIMERFD_AVAILABLE
-static int disarm_timerfd(struct libusb_context *ctx)
-{
- const struct itimerspec disarm_timer = { { 0, 0 }, { 0, 0 } };
- int r;
-
- usbi_dbg("");
- r = timerfd_settime(ctx->timerfd, 0, &disarm_timer, NULL);
- if (r < 0)
- return LIBUSB_ERROR_OTHER;
- else
- return 0;
-}
-
-/* iterates through the flying transfers, and rearms the timerfd based on the
- * next upcoming timeout.
- * must be called with flying_list locked.
- * returns 0 if there was no timeout to arm, 1 if the next timeout was armed,
- * or a LIBUSB_ERROR code on failure.
- */
-static int arm_timerfd_for_next_timeout(struct libusb_context *ctx)
-{
- struct usbi_transfer *transfer;
-
- list_for_each_entry(transfer, &ctx->flying_transfers, list, struct usbi_transfer) {
- struct timeval *cur_tv = &transfer->timeout;
-
- /* if we've reached transfers of infinite timeout, then we have no
- * arming to do */
- if (!timerisset(cur_tv))
- goto disarm;
-
- /* act on first transfer that is not already cancelled */
- if (!(transfer->flags & USBI_TRANSFER_TIMED_OUT)) {
- int r;
- const struct itimerspec it = { {0, 0},
- { cur_tv->tv_sec, cur_tv->tv_usec * 1000 } };
- usbi_dbg("next timeout originally %dms", USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer)->timeout);
- r = timerfd_settime(ctx->timerfd, TFD_TIMER_ABSTIME, &it, NULL);
- if (r < 0)
- return LIBUSB_ERROR_OTHER;
- return 1;
- }
- }
-
-disarm:
- return disarm_timerfd(ctx);
-}
-#else
-static int arm_timerfd_for_next_timeout(struct libusb_context *ctx)
-{
- (void)ctx;
- return 0;
-}
-#endif
-
-/** \ingroup asyncio
- * Submit a transfer. This function will fire off the USB transfer and then
- * return immediately.
- *
- * \param transfer the transfer to submit
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns LIBUSB_ERROR_BUSY if the transfer has already been submitted.
- * \returns LIBUSB_ERROR_NOT_SUPPORTED if the transfer flags are not supported
- * by the operating system.
- * \returns another LIBUSB_ERROR code on other failure
- */
-int API_EXPORTED libusb_submit_transfer(struct libusb_transfer *transfer)
-{
- struct libusb_context *ctx = TRANSFER_CTX(transfer);
- struct usbi_transfer *itransfer =
- LIBUSB_TRANSFER_TO_USBI_TRANSFER(transfer);
- int r;
- int updated_fds;
-
- usbi_mutex_lock(&itransfer->lock);
- itransfer->transferred = 0;
- itransfer->flags = 0;
- r = calculate_timeout(itransfer);
- if (r < 0) {
- r = LIBUSB_ERROR_OTHER;
- goto out;
- }
-
- usbi_mutex_lock(&ctx->flying_transfers_lock);
- r = add_to_flying_list(itransfer);
- if (r == LIBUSB_SUCCESS) {
- r = usbi_backend->submit_transfer(itransfer);
- }
- if (r != LIBUSB_SUCCESS) {
- list_del(&itransfer->list);
- arm_timerfd_for_next_timeout(ctx);
- }
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
-
-out:
- updated_fds = (itransfer->flags & USBI_TRANSFER_UPDATED_FDS);
- usbi_mutex_unlock(&itransfer->lock);
- if (updated_fds)
- usbi_fd_notification(ctx);
- return r;
-}
-
-/** \ingroup asyncio
- * Asynchronously cancel a previously submitted transfer.
- * This function returns immediately, but this does not indicate cancellation
- * is complete. Your callback function will be invoked at some later time
- * with a transfer status of
- * \ref libusb_transfer_status::LIBUSB_TRANSFER_CANCELLED
- * "LIBUSB_TRANSFER_CANCELLED."
- *
- * \param transfer the transfer to cancel
- * \returns 0 on success
- * \returns LIBUSB_ERROR_NOT_FOUND if the transfer is already complete or
- * cancelled.
- * \returns a LIBUSB_ERROR code on failure
- */
-int API_EXPORTED libusb_cancel_transfer(struct libusb_transfer *transfer)
-{
- struct usbi_transfer *itransfer =
- LIBUSB_TRANSFER_TO_USBI_TRANSFER(transfer);
- int r;
-
- usbi_dbg("");
- usbi_mutex_lock(&itransfer->lock);
- r = usbi_backend->cancel_transfer(itransfer);
- if (r < 0) {
- if (r != LIBUSB_ERROR_NOT_FOUND &&
- r != LIBUSB_ERROR_NO_DEVICE)
- usbi_err(TRANSFER_CTX(transfer),
- "cancel transfer failed error %d", r);
- else
- usbi_dbg("cancel transfer failed error %d", r);
-
- if (r == LIBUSB_ERROR_NO_DEVICE)
- itransfer->flags |= USBI_TRANSFER_DEVICE_DISAPPEARED;
- }
-
- itransfer->flags |= USBI_TRANSFER_CANCELLING;
-
- usbi_mutex_unlock(&itransfer->lock);
- return r;
-}
-
-/* Handle completion of a transfer (completion might be an error condition).
- * This will invoke the user-supplied callback function, which may end up
- * freeing the transfer. Therefore you cannot use the transfer structure
- * after calling this function, and you should free all backend-specific
- * data before calling it.
- * Do not call this function with the usbi_transfer lock held. User-specified
- * callback functions may attempt to directly resubmit the transfer, which
- * will attempt to take the lock. */
-int usbi_handle_transfer_completion(struct usbi_transfer *itransfer,
- enum libusb_transfer_status status)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = TRANSFER_CTX(transfer);
- uint8_t flags;
- int r = 0;
-
- /* FIXME: could be more intelligent with the timerfd here. we don't need
- * to disarm the timerfd if there was no timer running, and we only need
- * to rearm the timerfd if the transfer that expired was the one with
- * the shortest timeout. */
-
- usbi_mutex_lock(&ctx->flying_transfers_lock);
- list_del(&itransfer->list);
- if (usbi_using_timerfd(ctx))
- r = arm_timerfd_for_next_timeout(ctx);
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
- if (usbi_using_timerfd(ctx) && (r < 0))
- return r;
-
- if (status == LIBUSB_TRANSFER_COMPLETED
- && transfer->flags & LIBUSB_TRANSFER_SHORT_NOT_OK) {
- int rqlen = transfer->length;
- if (transfer->type == LIBUSB_TRANSFER_TYPE_CONTROL)
- rqlen -= LIBUSB_CONTROL_SETUP_SIZE;
- if (rqlen != itransfer->transferred) {
- usbi_dbg("interpreting short transfer as error");
- status = LIBUSB_TRANSFER_ERROR;
- }
- }
-
- flags = transfer->flags;
- transfer->status = status;
- transfer->actual_length = itransfer->transferred;
- usbi_dbg("transfer %p has callback %p", transfer, transfer->callback);
- if (transfer->callback)
- transfer->callback(transfer);
- /* transfer might have been freed by the above call, do not use from
- * this point. */
- if (flags & LIBUSB_TRANSFER_FREE_TRANSFER)
- libusb_free_transfer(transfer);
- usbi_mutex_lock(&ctx->event_waiters_lock);
- usbi_cond_broadcast(&ctx->event_waiters_cond);
- usbi_mutex_unlock(&ctx->event_waiters_lock);
- return 0;
-}
-
-/* Similar to usbi_handle_transfer_completion() but exclusively for transfers
- * that were asynchronously cancelled. The same concerns w.r.t. freeing of
- * transfers exist here.
- * Do not call this function with the usbi_transfer lock held. User-specified
- * callback functions may attempt to directly resubmit the transfer, which
- * will attempt to take the lock. */
-int usbi_handle_transfer_cancellation(struct usbi_transfer *transfer)
-{
- /* if the URB was cancelled due to timeout, report timeout to the user */
- if (transfer->flags & USBI_TRANSFER_TIMED_OUT) {
- usbi_dbg("detected timeout cancellation");
- return usbi_handle_transfer_completion(transfer, LIBUSB_TRANSFER_TIMED_OUT);
- }
-
- /* otherwise its a normal async cancel */
- return usbi_handle_transfer_completion(transfer, LIBUSB_TRANSFER_CANCELLED);
-}
-
-/** \ingroup poll
- * Attempt to acquire the event handling lock. This lock is used to ensure that
- * only one thread is monitoring libusbx event sources at any one time.
- *
- * You only need to use this lock if you are developing an application
- * which calls poll() or select() on libusbx's file descriptors directly.
- * If you stick to libusbx's event handling loop functions (e.g.
- * libusb_handle_events()) then you do not need to be concerned with this
- * locking.
- *
- * While holding this lock, you are trusted to actually be handling events.
- * If you are no longer handling events, you must call libusb_unlock_events()
- * as soon as possible.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \returns 0 if the lock was obtained successfully
- * \returns 1 if the lock was not obtained (i.e. another thread holds the lock)
- * \see \ref mtasync
- */
-int API_EXPORTED libusb_try_lock_events(libusb_context *ctx)
-{
- int r;
- unsigned int ru;
- USBI_GET_CONTEXT(ctx);
-
- /* is someone else waiting to modify poll fds? if so, don't let this thread
- * start event handling */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- ru = ctx->pollfd_modify;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
- if (ru) {
- usbi_dbg("someone else is modifying poll fds");
- return 1;
- }
-
- r = usbi_mutex_trylock(&ctx->events_lock);
- if (r)
- return 1;
-
- ctx->event_handler_active = 1;
- return 0;
-}
-
-/** \ingroup poll
- * Acquire the event handling lock, blocking until successful acquisition if
- * it is contended. This lock is used to ensure that only one thread is
- * monitoring libusbx event sources at any one time.
- *
- * You only need to use this lock if you are developing an application
- * which calls poll() or select() on libusbx's file descriptors directly.
- * If you stick to libusbx's event handling loop functions (e.g.
- * libusb_handle_events()) then you do not need to be concerned with this
- * locking.
- *
- * While holding this lock, you are trusted to actually be handling events.
- * If you are no longer handling events, you must call libusb_unlock_events()
- * as soon as possible.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \see \ref mtasync
- */
-void API_EXPORTED libusb_lock_events(libusb_context *ctx)
-{
- USBI_GET_CONTEXT(ctx);
- usbi_mutex_lock(&ctx->events_lock);
- ctx->event_handler_active = 1;
-}
-
-/** \ingroup poll
- * Release the lock previously acquired with libusb_try_lock_events() or
- * libusb_lock_events(). Releasing this lock will wake up any threads blocked
- * on libusb_wait_for_event().
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \see \ref mtasync
- */
-void API_EXPORTED libusb_unlock_events(libusb_context *ctx)
-{
- USBI_GET_CONTEXT(ctx);
- ctx->event_handler_active = 0;
- usbi_mutex_unlock(&ctx->events_lock);
-
- /* FIXME: perhaps we should be a bit more efficient by not broadcasting
- * the availability of the events lock when we are modifying pollfds
- * (check ctx->pollfd_modify)? */
- usbi_mutex_lock(&ctx->event_waiters_lock);
- usbi_cond_broadcast(&ctx->event_waiters_cond);
- usbi_mutex_unlock(&ctx->event_waiters_lock);
-}
-
-/** \ingroup poll
- * Determine if it is still OK for this thread to be doing event handling.
- *
- * Sometimes, libusbx needs to temporarily pause all event handlers, and this
- * is the function you should use before polling file descriptors to see if
- * this is the case.
- *
- * If this function instructs your thread to give up the events lock, you
- * should just continue the usual logic that is documented in \ref mtasync.
- * On the next iteration, your thread will fail to obtain the events lock,
- * and will hence become an event waiter.
- *
- * This function should be called while the events lock is held: you don't
- * need to worry about the results of this function if your thread is not
- * the current event handler.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \returns 1 if event handling can start or continue
- * \returns 0 if this thread must give up the events lock
- * \see \ref fullstory "Multi-threaded I/O: the full story"
- */
-int API_EXPORTED libusb_event_handling_ok(libusb_context *ctx)
-{
- unsigned int r;
- USBI_GET_CONTEXT(ctx);
-
- /* is someone else waiting to modify poll fds? if so, don't let this thread
- * continue event handling */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- r = ctx->pollfd_modify;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
- if (r) {
- usbi_dbg("someone else is modifying poll fds");
- return 0;
- }
-
- return 1;
-}
-
-
-/** \ingroup poll
- * Determine if an active thread is handling events (i.e. if anyone is holding
- * the event handling lock).
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \returns 1 if a thread is handling events
- * \returns 0 if there are no threads currently handling events
- * \see \ref mtasync
- */
-int API_EXPORTED libusb_event_handler_active(libusb_context *ctx)
-{
- unsigned int r;
- USBI_GET_CONTEXT(ctx);
-
- /* is someone else waiting to modify poll fds? if so, don't let this thread
- * start event handling -- indicate that event handling is happening */
- usbi_mutex_lock(&ctx->pollfd_modify_lock);
- r = ctx->pollfd_modify;
- usbi_mutex_unlock(&ctx->pollfd_modify_lock);
- if (r) {
- usbi_dbg("someone else is modifying poll fds");
- return 1;
- }
-
- return ctx->event_handler_active;
-}
-
-/** \ingroup poll
- * Acquire the event waiters lock. This lock is designed to be obtained under
- * the situation where you want to be aware when events are completed, but
- * some other thread is event handling so calling libusb_handle_events() is not
- * allowed.
- *
- * You then obtain this lock, re-check that another thread is still handling
- * events, then call libusb_wait_for_event().
- *
- * You only need to use this lock if you are developing an application
- * which calls poll() or select() on libusbx's file descriptors directly,
- * <b>and</b> may potentially be handling events from 2 threads simultaenously.
- * If you stick to libusbx's event handling loop functions (e.g.
- * libusb_handle_events()) then you do not need to be concerned with this
- * locking.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \see \ref mtasync
- */
-void API_EXPORTED libusb_lock_event_waiters(libusb_context *ctx)
-{
- USBI_GET_CONTEXT(ctx);
- usbi_mutex_lock(&ctx->event_waiters_lock);
-}
-
-/** \ingroup poll
- * Release the event waiters lock.
- * \param ctx the context to operate on, or NULL for the default context
- * \see \ref mtasync
- */
-void API_EXPORTED libusb_unlock_event_waiters(libusb_context *ctx)
-{
- USBI_GET_CONTEXT(ctx);
- usbi_mutex_unlock(&ctx->event_waiters_lock);
-}
-
-/** \ingroup poll
- * Wait for another thread to signal completion of an event. Must be called
- * with the event waiters lock held, see libusb_lock_event_waiters().
- *
- * This function will block until any of the following conditions are met:
- * -# The timeout expires
- * -# A transfer completes
- * -# A thread releases the event handling lock through libusb_unlock_events()
- *
- * Condition 1 is obvious. Condition 2 unblocks your thread <em>after</em>
- * the callback for the transfer has completed. Condition 3 is important
- * because it means that the thread that was previously handling events is no
- * longer doing so, so if any events are to complete, another thread needs to
- * step up and start event handling.
- *
- * This function releases the event waiters lock before putting your thread
- * to sleep, and reacquires the lock as it is being woken up.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param tv maximum timeout for this blocking function. A NULL value
- * indicates unlimited timeout.
- * \returns 0 after a transfer completes or another thread stops event handling
- * \returns 1 if the timeout expired
- * \see \ref mtasync
- */
-int API_EXPORTED libusb_wait_for_event(libusb_context *ctx, struct timeval *tv)
-{
- struct timespec timeout;
- int r;
-
- USBI_GET_CONTEXT(ctx);
- if (tv == NULL) {
- usbi_cond_wait(&ctx->event_waiters_cond, &ctx->event_waiters_lock);
- return 0;
- }
-
- r = usbi_backend->clock_gettime(USBI_CLOCK_REALTIME, &timeout);
- if (r < 0) {
- usbi_err(ctx, "failed to read realtime clock, error %d", errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- timeout.tv_sec += tv->tv_sec;
- timeout.tv_nsec += tv->tv_usec * 1000;
- while (timeout.tv_nsec >= 1000000000) {
- timeout.tv_nsec -= 1000000000;
- timeout.tv_sec++;
- }
-
- r = usbi_cond_timedwait(&ctx->event_waiters_cond,
- &ctx->event_waiters_lock, &timeout);
- return (r == ETIMEDOUT);
-}
-
-static void handle_timeout(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- int r;
-
- itransfer->flags |= USBI_TRANSFER_TIMED_OUT;
- r = libusb_cancel_transfer(transfer);
- if (r < 0)
- usbi_warn(TRANSFER_CTX(transfer),
- "async cancel failed %d errno=%d", r, errno);
-}
-
-static int handle_timeouts_locked(struct libusb_context *ctx)
-{
- int r;
- struct timespec systime_ts;
- struct timeval systime;
- struct usbi_transfer *transfer;
-
- if (list_empty(&ctx->flying_transfers))
- return 0;
-
- /* get current time */
- r = usbi_backend->clock_gettime(USBI_CLOCK_MONOTONIC, &systime_ts);
- if (r < 0)
- return r;
-
- TIMESPEC_TO_TIMEVAL(&systime, &systime_ts);
-
- /* iterate through flying transfers list, finding all transfers that
- * have expired timeouts */
- list_for_each_entry(transfer, &ctx->flying_transfers, list, struct usbi_transfer) {
- struct timeval *cur_tv = &transfer->timeout;
-
- /* if we've reached transfers of infinite timeout, we're all done */
- if (!timerisset(cur_tv))
- return 0;
-
- /* ignore timeouts we've already handled */
- if (transfer->flags & (USBI_TRANSFER_TIMED_OUT | USBI_TRANSFER_OS_HANDLES_TIMEOUT))
- continue;
-
- /* if transfer has non-expired timeout, nothing more to do */
- if ((cur_tv->tv_sec > systime.tv_sec) ||
- (cur_tv->tv_sec == systime.tv_sec &&
- cur_tv->tv_usec > systime.tv_usec))
- return 0;
-
- /* otherwise, we've got an expired timeout to handle */
- handle_timeout(transfer);
- }
- return 0;
-}
-
-static int handle_timeouts(struct libusb_context *ctx)
-{
- int r;
- USBI_GET_CONTEXT(ctx);
- usbi_mutex_lock(&ctx->flying_transfers_lock);
- r = handle_timeouts_locked(ctx);
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
- return r;
-}
-
-#ifdef USBI_TIMERFD_AVAILABLE
-static int handle_timerfd_trigger(struct libusb_context *ctx)
-{
- int r;
-
- usbi_mutex_lock(&ctx->flying_transfers_lock);
-
- /* process the timeout that just happened */
- r = handle_timeouts_locked(ctx);
- if (r < 0)
- goto out;
-
- /* arm for next timeout*/
- r = arm_timerfd_for_next_timeout(ctx);
-
-out:
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
- return r;
-}
-#endif
-
-/* do the actual event handling. assumes that no other thread is concurrently
- * doing the same thing. */
-static int handle_events(struct libusb_context *ctx, struct timeval *tv)
-{
- int r;
- struct usbi_pollfd *ipollfd;
- POLL_NFDS_TYPE nfds = 0;
- struct pollfd *fds = NULL;
- int i = -1;
- int timeout_ms;
-
- usbi_mutex_lock(&ctx->pollfds_lock);
- list_for_each_entry(ipollfd, &ctx->pollfds, list, struct usbi_pollfd)
- nfds++;
-
- /* TODO: malloc when number of fd's changes, not on every poll */
- if (nfds != 0)
- fds = malloc(sizeof(*fds) * nfds);
- if (!fds) {
- usbi_mutex_unlock(&ctx->pollfds_lock);
- return LIBUSB_ERROR_NO_MEM;
- }
-
- list_for_each_entry(ipollfd, &ctx->pollfds, list, struct usbi_pollfd) {
- struct libusb_pollfd *pollfd = &ipollfd->pollfd;
- int fd = pollfd->fd;
- i++;
- fds[i].fd = fd;
- fds[i].events = pollfd->events;
- fds[i].revents = 0;
- }
- usbi_mutex_unlock(&ctx->pollfds_lock);
-
- timeout_ms = (int)(tv->tv_sec * 1000) + (tv->tv_usec / 1000);
-
- /* round up to next millisecond */
- if (tv->tv_usec % 1000)
- timeout_ms++;
-
- usbi_dbg("poll() %d fds with timeout in %dms", nfds, timeout_ms);
- r = usbi_poll(fds, nfds, timeout_ms);
- usbi_dbg("poll() returned %d", r);
- if (r == 0) {
- free(fds);
- return handle_timeouts(ctx);
- } else if (r == -1 && errno == EINTR) {
- free(fds);
- return LIBUSB_ERROR_INTERRUPTED;
- } else if (r < 0) {
- free(fds);
- usbi_err(ctx, "poll failed %d err=%d\n", r, errno);
- return LIBUSB_ERROR_IO;
- }
-
- /* fd[0] is always the ctrl pipe */
- if (fds[0].revents) {
- /* another thread wanted to interrupt event handling, and it succeeded!
- * handle any other events that cropped up at the same time, and
- * simply return */
- usbi_dbg("caught a fish on the control pipe");
-
- if (r == 1) {
- r = 0;
- goto handled;
- } else {
- /* prevent OS backend from trying to handle events on ctrl pipe */
- fds[0].revents = 0;
- r--;
- }
- }
-
- /* fd[1] is always the hotplug pipe */
- if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) && fds[1].revents) {
- libusb_hotplug_message message;
- ssize_t ret;
-
- usbi_dbg("caught a fish on the hotplug pipe");
-
- /* read the message from the hotplug thread */
- ret = usbi_read(ctx->hotplug_pipe[0], &message, sizeof (message));
- if (ret < sizeof(message)) {
- usbi_err(ctx, "hotplug pipe read error %d < %d",
- ret, sizeof(message));
- r = LIBUSB_ERROR_OTHER;
- goto handled;
- }
-
- usbi_hotplug_match(ctx, message.device, message.event);
-
- /* the device left. dereference the device */
- if (LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT == message.event)
- libusb_unref_device(message.device);
-
- fds[1].revents = 0;
- if (1 == r--)
- goto handled;
- } /* else there shouldn't be anything on this pipe */
-
-#ifdef USBI_TIMERFD_AVAILABLE
- /* on timerfd configurations, fds[2] is the timerfd */
- if (usbi_using_timerfd(ctx) && fds[2].revents) {
- /* timerfd indicates that a timeout has expired */
- int ret;
- usbi_dbg("timerfd triggered");
-
- ret = handle_timerfd_trigger(ctx);
- if (ret < 0) {
- /* return error code */
- r = ret;
- goto handled;
- } else if (r == 1) {
- /* no more active file descriptors, nothing more to do */
- r = 0;
- goto handled;
- } else {
- /* more events pending...
- * prevent OS backend from trying to handle events on timerfd */
- fds[2].revents = 0;
- r--;
- }
- }
-#endif
-
- r = usbi_backend->handle_events(ctx, fds, nfds, r);
- if (r)
- usbi_err(ctx, "backend handle_events failed with error %d", r);
-
-handled:
- free(fds);
- return r;
-}
-
-/* returns the smallest of:
- * 1. timeout of next URB
- * 2. user-supplied timeout
- * returns 1 if there is an already-expired timeout, otherwise returns 0
- * and populates out
- */
-static int get_next_timeout(libusb_context *ctx, struct timeval *tv,
- struct timeval *out)
-{
- struct timeval timeout;
- int r = libusb_get_next_timeout(ctx, &timeout);
- if (r) {
- /* timeout already expired? */
- if (!timerisset(&timeout))
- return 1;
-
- /* choose the smallest of next URB timeout or user specified timeout */
- if (timercmp(&timeout, tv, <))
- *out = timeout;
- else
- *out = *tv;
- } else {
- *out = *tv;
- }
- return 0;
-}
-
-/** \ingroup poll
- * Handle any pending events.
- *
- * libusbx determines "pending events" by checking if any timeouts have expired
- * and by checking the set of file descriptors for activity.
- *
- * If a zero timeval is passed, this function will handle any already-pending
- * events and then immediately return in non-blocking style.
- *
- * If a non-zero timeval is passed and no events are currently pending, this
- * function will block waiting for events to handle up until the specified
- * timeout. If an event arrives or a signal is raised, this function will
- * return early.
- *
- * If the parameter completed is not NULL then <em>after obtaining the event
- * handling lock</em> this function will return immediately if the integer
- * pointed to is not 0. This allows for race free waiting for the completion
- * of a specific transfer.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param tv the maximum time to block waiting for events, or an all zero
- * timeval struct for non-blocking mode
- * \param completed pointer to completion integer to check, or NULL
- * \returns 0 on success, or a LIBUSB_ERROR code on failure
- * \see \ref mtasync
- */
-int API_EXPORTED libusb_handle_events_timeout_completed(libusb_context *ctx,
- struct timeval *tv, int *completed)
-{
- int r;
- struct timeval poll_timeout;
-
- USBI_GET_CONTEXT(ctx);
- r = get_next_timeout(ctx, tv, &poll_timeout);
- if (r) {
- /* timeout already expired */
- return handle_timeouts(ctx);
- }
-
-retry:
- if (libusb_try_lock_events(ctx) == 0) {
- if (completed == NULL || !*completed) {
- /* we obtained the event lock: do our own event handling */
- usbi_dbg("doing our own event handling");
- r = handle_events(ctx, &poll_timeout);
- }
- libusb_unlock_events(ctx);
- return r;
- }
-
- /* another thread is doing event handling. wait for thread events that
- * notify event completion. */
- libusb_lock_event_waiters(ctx);
-
- if (completed && *completed)
- goto already_done;
-
- if (!libusb_event_handler_active(ctx)) {
- /* we hit a race: whoever was event handling earlier finished in the
- * time it took us to reach this point. try the cycle again. */
- libusb_unlock_event_waiters(ctx);
- usbi_dbg("event handler was active but went away, retrying");
- goto retry;
- }
-
- usbi_dbg("another thread is doing event handling");
- r = libusb_wait_for_event(ctx, &poll_timeout);
-
-already_done:
- libusb_unlock_event_waiters(ctx);
-
- if (r < 0)
- return r;
- else if (r == 1)
- return handle_timeouts(ctx);
- else
- return 0;
-}
-
-/** \ingroup poll
- * Handle any pending events
- *
- * Like libusb_handle_events_timeout_completed(), but without the completed
- * parameter, calling this function is equivalent to calling
- * libusb_handle_events_timeout_completed() with a NULL completed parameter.
- *
- * This function is kept primarily for backwards compatibility.
- * All new code should call libusb_handle_events_completed() or
- * libusb_handle_events_timeout_completed() to avoid race conditions.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param tv the maximum time to block waiting for events, or an all zero
- * timeval struct for non-blocking mode
- * \returns 0 on success, or a LIBUSB_ERROR code on failure
- */
-int API_EXPORTED libusb_handle_events_timeout(libusb_context *ctx,
- struct timeval *tv)
-{
- return libusb_handle_events_timeout_completed(ctx, tv, NULL);
-}
-
-/** \ingroup poll
- * Handle any pending events in blocking mode. There is currently a timeout
- * hardcoded at 60 seconds but we plan to make it unlimited in future. For
- * finer control over whether this function is blocking or non-blocking, or
- * for control over the timeout, use libusb_handle_events_timeout_completed()
- * instead.
- *
- * This function is kept primarily for backwards compatibility.
- * All new code should call libusb_handle_events_completed() or
- * libusb_handle_events_timeout_completed() to avoid race conditions.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \returns 0 on success, or a LIBUSB_ERROR code on failure
- */
-int API_EXPORTED libusb_handle_events(libusb_context *ctx)
-{
- struct timeval tv;
- tv.tv_sec = 60;
- tv.tv_usec = 0;
- return libusb_handle_events_timeout_completed(ctx, &tv, NULL);
-}
-
-/** \ingroup poll
- * Handle any pending events in blocking mode.
- *
- * Like libusb_handle_events(), with the addition of a completed parameter
- * to allow for race free waiting for the completion of a specific transfer.
- *
- * See libusb_handle_events_timeout_completed() for details on the completed
- * parameter.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param completed pointer to completion integer to check, or NULL
- * \returns 0 on success, or a LIBUSB_ERROR code on failure
- * \see \ref mtasync
- */
-int API_EXPORTED libusb_handle_events_completed(libusb_context *ctx,
- int *completed)
-{
- struct timeval tv;
- tv.tv_sec = 60;
- tv.tv_usec = 0;
- return libusb_handle_events_timeout_completed(ctx, &tv, completed);
-}
-
-/** \ingroup poll
- * Handle any pending events by polling file descriptors, without checking if
- * any other threads are already doing so. Must be called with the event lock
- * held, see libusb_lock_events().
- *
- * This function is designed to be called under the situation where you have
- * taken the event lock and are calling poll()/select() directly on libusbx's
- * file descriptors (as opposed to using libusb_handle_events() or similar).
- * You detect events on libusbx's descriptors, so you then call this function
- * with a zero timeout value (while still holding the event lock).
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param tv the maximum time to block waiting for events, or zero for
- * non-blocking mode
- * \returns 0 on success, or a LIBUSB_ERROR code on failure
- * \see \ref mtasync
- */
-int API_EXPORTED libusb_handle_events_locked(libusb_context *ctx,
- struct timeval *tv)
-{
- int r;
- struct timeval poll_timeout;
-
- USBI_GET_CONTEXT(ctx);
- r = get_next_timeout(ctx, tv, &poll_timeout);
- if (r) {
- /* timeout already expired */
- return handle_timeouts(ctx);
- }
-
- return handle_events(ctx, &poll_timeout);
-}
-
-/** \ingroup poll
- * Determines whether your application must apply special timing considerations
- * when monitoring libusbx's file descriptors.
- *
- * This function is only useful for applications which retrieve and poll
- * libusbx's file descriptors in their own main loop (\ref pollmain).
- *
- * Ordinarily, libusbx's event handler needs to be called into at specific
- * moments in time (in addition to times when there is activity on the file
- * descriptor set). The usual approach is to use libusb_get_next_timeout()
- * to learn about when the next timeout occurs, and to adjust your
- * poll()/select() timeout accordingly so that you can make a call into the
- * library at that time.
- *
- * Some platforms supported by libusbx do not come with this baggage - any
- * events relevant to timing will be represented by activity on the file
- * descriptor set, and libusb_get_next_timeout() will always return 0.
- * This function allows you to detect whether you are running on such a
- * platform.
- *
- * Since v1.0.5.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \returns 0 if you must call into libusbx at times determined by
- * libusb_get_next_timeout(), or 1 if all timeout events are handled internally
- * or through regular activity on the file descriptors.
- * \see \ref pollmain "Polling libusbx file descriptors for event handling"
- */
-int API_EXPORTED libusb_pollfds_handle_timeouts(libusb_context *ctx)
-{
-#if defined(USBI_TIMERFD_AVAILABLE)
- USBI_GET_CONTEXT(ctx);
- return usbi_using_timerfd(ctx);
-#else
- (void)ctx;
- return 0;
-#endif
-}
-
-/** \ingroup poll
- * Determine the next internal timeout that libusbx needs to handle. You only
- * need to use this function if you are calling poll() or select() or similar
- * on libusbx's file descriptors yourself - you do not need to use it if you
- * are calling libusb_handle_events() or a variant directly.
- *
- * You should call this function in your main loop in order to determine how
- * long to wait for select() or poll() to return results. libusbx needs to be
- * called into at this timeout, so you should use it as an upper bound on
- * your select() or poll() call.
- *
- * When the timeout has expired, call into libusb_handle_events_timeout()
- * (perhaps in non-blocking mode) so that libusbx can handle the timeout.
- *
- * This function may return 1 (success) and an all-zero timeval. If this is
- * the case, it indicates that libusbx has a timeout that has already expired
- * so you should call libusb_handle_events_timeout() or similar immediately.
- * A return code of 0 indicates that there are no pending timeouts.
- *
- * On some platforms, this function will always returns 0 (no pending
- * timeouts). See \ref polltime.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param tv output location for a relative time against the current
- * clock in which libusbx must be called into in order to process timeout events
- * \returns 0 if there are no pending timeouts, 1 if a timeout was returned,
- * or LIBUSB_ERROR_OTHER on failure
- */
-int API_EXPORTED libusb_get_next_timeout(libusb_context *ctx,
- struct timeval *tv)
-{
- struct usbi_transfer *transfer;
- struct timespec cur_ts;
- struct timeval cur_tv;
- struct timeval *next_timeout;
- int r;
- int found = 0;
-
- USBI_GET_CONTEXT(ctx);
- if (usbi_using_timerfd(ctx))
- return 0;
-
- usbi_mutex_lock(&ctx->flying_transfers_lock);
- if (list_empty(&ctx->flying_transfers)) {
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
- usbi_dbg("no URBs, no timeout!");
- return 0;
- }
-
- /* find next transfer which hasn't already been processed as timed out */
- list_for_each_entry(transfer, &ctx->flying_transfers, list, struct usbi_transfer) {
- if (transfer->flags & (USBI_TRANSFER_TIMED_OUT | USBI_TRANSFER_OS_HANDLES_TIMEOUT))
- continue;
-
- /* no timeout for this transfer? */
- if (!timerisset(&transfer->timeout))
- continue;
-
- found = 1;
- break;
- }
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
-
- if (!found) {
- usbi_dbg("no URB with timeout or all handled by OS; no timeout!");
- return 0;
- }
-
- next_timeout = &transfer->timeout;
-
- r = usbi_backend->clock_gettime(USBI_CLOCK_MONOTONIC, &cur_ts);
- if (r < 0) {
- usbi_err(ctx, "failed to read monotonic clock, errno=%d", errno);
- return 0;
- }
- TIMESPEC_TO_TIMEVAL(&cur_tv, &cur_ts);
-
- if (!timercmp(&cur_tv, next_timeout, <)) {
- usbi_dbg("first timeout already expired");
- timerclear(tv);
- } else {
- timersub(next_timeout, &cur_tv, tv);
- usbi_dbg("next timeout in %d.%06ds", tv->tv_sec, tv->tv_usec);
- }
-
- return 1;
-}
-
-/** \ingroup poll
- * Register notification functions for file descriptor additions/removals.
- * These functions will be invoked for every new or removed file descriptor
- * that libusbx uses as an event source.
- *
- * To remove notifiers, pass NULL values for the function pointers.
- *
- * Note that file descriptors may have been added even before you register
- * these notifiers (e.g. at libusb_init() time).
- *
- * Additionally, note that the removal notifier may be called during
- * libusb_exit() (e.g. when it is closing file descriptors that were opened
- * and added to the poll set at libusb_init() time). If you don't want this,
- * remove the notifiers immediately before calling libusb_exit().
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \param added_cb pointer to function for addition notifications
- * \param removed_cb pointer to function for removal notifications
- * \param user_data User data to be passed back to callbacks (useful for
- * passing context information)
- */
-void API_EXPORTED libusb_set_pollfd_notifiers(libusb_context *ctx,
- libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb,
- void *user_data)
-{
- USBI_GET_CONTEXT(ctx);
- ctx->fd_added_cb = added_cb;
- ctx->fd_removed_cb = removed_cb;
- ctx->fd_cb_user_data = user_data;
-}
-
-/* Add a file descriptor to the list of file descriptors to be monitored.
- * events should be specified as a bitmask of events passed to poll(), e.g.
- * POLLIN and/or POLLOUT. */
-int usbi_add_pollfd(struct libusb_context *ctx, int fd, short events)
-{
- struct usbi_pollfd *ipollfd = malloc(sizeof(*ipollfd));
- if (!ipollfd)
- return LIBUSB_ERROR_NO_MEM;
-
- usbi_dbg("add fd %d events %d", fd, events);
- ipollfd->pollfd.fd = fd;
- ipollfd->pollfd.events = events;
- usbi_mutex_lock(&ctx->pollfds_lock);
- list_add_tail(&ipollfd->list, &ctx->pollfds);
- usbi_mutex_unlock(&ctx->pollfds_lock);
-
- if (ctx->fd_added_cb)
- ctx->fd_added_cb(fd, events, ctx->fd_cb_user_data);
- return 0;
-}
-
-/* Remove a file descriptor from the list of file descriptors to be polled. */
-void usbi_remove_pollfd(struct libusb_context *ctx, int fd)
-{
- struct usbi_pollfd *ipollfd;
- int found = 0;
-
- usbi_dbg("remove fd %d", fd);
- usbi_mutex_lock(&ctx->pollfds_lock);
- list_for_each_entry(ipollfd, &ctx->pollfds, list, struct usbi_pollfd)
- if (ipollfd->pollfd.fd == fd) {
- found = 1;
- break;
- }
-
- if (!found) {
- usbi_dbg("couldn't find fd %d to remove", fd);
- usbi_mutex_unlock(&ctx->pollfds_lock);
- return;
- }
-
- list_del(&ipollfd->list);
- usbi_mutex_unlock(&ctx->pollfds_lock);
- free(ipollfd);
- if (ctx->fd_removed_cb)
- ctx->fd_removed_cb(fd, ctx->fd_cb_user_data);
-}
-
-/** \ingroup poll
- * Retrieve a list of file descriptors that should be polled by your main loop
- * as libusbx event sources.
- *
- * The returned list is NULL-terminated and should be freed with free() when
- * done. The actual list contents must not be touched.
- *
- * As file descriptors are a Unix-specific concept, this function is not
- * available on Windows and will always return NULL.
- *
- * \param ctx the context to operate on, or NULL for the default context
- * \returns a NULL-terminated list of libusb_pollfd structures
- * \returns NULL on error
- * \returns NULL on platforms where the functionality is not available
- */
-DEFAULT_VISIBILITY
-const struct libusb_pollfd ** LIBUSB_CALL libusb_get_pollfds(
- libusb_context *ctx)
-{
-#ifndef OS_WINDOWS
- struct libusb_pollfd **ret = NULL;
- struct usbi_pollfd *ipollfd;
- size_t i = 0;
- size_t cnt = 0;
- USBI_GET_CONTEXT(ctx);
-
- usbi_mutex_lock(&ctx->pollfds_lock);
- list_for_each_entry(ipollfd, &ctx->pollfds, list, struct usbi_pollfd)
- cnt++;
-
- ret = calloc(cnt + 1, sizeof(struct libusb_pollfd *));
- if (!ret)
- goto out;
-
- list_for_each_entry(ipollfd, &ctx->pollfds, list, struct usbi_pollfd)
- ret[i++] = (struct libusb_pollfd *) ipollfd;
- ret[cnt] = NULL;
-
-out:
- usbi_mutex_unlock(&ctx->pollfds_lock);
- return (const struct libusb_pollfd **) ret;
-#else
- usbi_err(ctx, "external polling of libusbx's internal descriptors "\
- "is not yet supported on Windows platforms");
- return NULL;
-#endif
-}
-
-/* Backends may call this from handle_events to report disconnection of a
- * device. This function ensures transfers get cancelled appropriately.
- * Callers of this function must hold the events_lock.
- */
-void usbi_handle_disconnect(struct libusb_device_handle *handle)
-{
- struct usbi_transfer *cur;
- struct usbi_transfer *to_cancel;
-
- usbi_dbg("device %d.%d",
- handle->dev->bus_number, handle->dev->device_address);
-
- /* terminate all pending transfers with the LIBUSB_TRANSFER_NO_DEVICE
- * status code.
- *
- * this is a bit tricky because:
- * 1. we can't do transfer completion while holding flying_transfers_lock
- * because the completion handler may try to re-submit the transfer
- * 2. the transfers list can change underneath us - if we were to build a
- * list of transfers to complete (while holding lock), the situation
- * might be different by the time we come to free them
- *
- * so we resort to a loop-based approach as below
- *
- * This is safe because transfers are only removed from the
- * flying_transfer list by usbi_handle_transfer_completion and
- * libusb_close, both of which hold the events_lock while doing so,
- * so usbi_handle_disconnect cannot be running at the same time.
- *
- * Note that libusb_submit_transfer also removes the transfer from
- * the flying_transfer list on submission failure, but it keeps the
- * flying_transfer list locked between addition and removal, so
- * usbi_handle_disconnect never sees such transfers.
- */
-
- while (1) {
- usbi_mutex_lock(&HANDLE_CTX(handle)->flying_transfers_lock);
- to_cancel = NULL;
- list_for_each_entry(cur, &HANDLE_CTX(handle)->flying_transfers, list, struct usbi_transfer)
- if (USBI_TRANSFER_TO_LIBUSB_TRANSFER(cur)->dev_handle == handle) {
- to_cancel = cur;
- break;
- }
- usbi_mutex_unlock(&HANDLE_CTX(handle)->flying_transfers_lock);
-
- if (!to_cancel)
- break;
-
- usbi_dbg("cancelling transfer %p from disconnect",
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(to_cancel));
-
- usbi_backend->clear_transfer_priv(to_cancel);
- usbi_handle_transfer_completion(to_cancel, LIBUSB_TRANSFER_NO_DEVICE);
- }
-
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.def b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.def
deleted file mode 100644
index cb0e32ab9..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.def
+++ /dev/null
@@ -1,158 +0,0 @@
-LIBRARY "libusb-1.0.dll"
-EXPORTS
- libusb_alloc_transfer
- libusb_alloc_transfer@4 = libusb_alloc_transfer
- libusb_attach_kernel_driver
- libusb_attach_kernel_driver@8 = libusb_attach_kernel_driver
- libusb_bulk_transfer
- libusb_bulk_transfer@24 = libusb_bulk_transfer
- libusb_cancel_transfer
- libusb_cancel_transfer@4 = libusb_cancel_transfer
- libusb_claim_interface
- libusb_claim_interface@8 = libusb_claim_interface
- libusb_clear_halt
- libusb_clear_halt@8 = libusb_clear_halt
- libusb_close
- libusb_close@4 = libusb_close
- libusb_control_transfer
- libusb_control_transfer@32 = libusb_control_transfer
- libusb_detach_kernel_driver
- libusb_detach_kernel_driver@8 = libusb_detach_kernel_driver
- libusb_error_name
- libusb_error_name@4 = libusb_error_name
- libusb_event_handler_active
- libusb_event_handler_active@4 = libusb_event_handler_active
- libusb_event_handling_ok
- libusb_event_handling_ok@4 = libusb_event_handling_ok
- libusb_exit
- libusb_exit@4 = libusb_exit
- libusb_free_bos_descriptor
- libusb_free_bos_descriptor@4 = libusb_free_bos_descriptor
- libusb_free_config_descriptor
- libusb_free_config_descriptor@4 = libusb_free_config_descriptor
- libusb_free_container_id_descriptor
- libusb_free_container_id_descriptor@4 = libusb_free_container_id_descriptor
- libusb_free_device_list
- libusb_free_device_list@8 = libusb_free_device_list
- libusb_free_ss_endpoint_companion_descriptor
- libusb_free_ss_endpoint_companion_descriptor@4 = libusb_free_ss_endpoint_companion_descriptor
- libusb_free_ss_usb_device_capability_descriptor
- libusb_free_ss_usb_device_capability_descriptor@4 = libusb_free_ss_usb_device_capability_descriptor
- libusb_free_transfer
- libusb_free_transfer@4 = libusb_free_transfer
- libusb_free_usb_2_0_extension_descriptor
- libusb_free_usb_2_0_extension_descriptor@4 = libusb_free_usb_2_0_extension_descriptor
- libusb_get_active_config_descriptor
- libusb_get_active_config_descriptor@8 = libusb_get_active_config_descriptor
- libusb_get_bos_descriptor
- libusb_get_bos_descriptor@8 = libusb_get_bos_descriptor
- libusb_get_bus_number
- libusb_get_bus_number@4 = libusb_get_bus_number
- libusb_get_config_descriptor
- libusb_get_config_descriptor@12 = libusb_get_config_descriptor
- libusb_get_config_descriptor_by_value
- libusb_get_config_descriptor_by_value@12 = libusb_get_config_descriptor_by_value
- libusb_get_configuration
- libusb_get_configuration@8 = libusb_get_configuration
- libusb_get_container_id_descriptor
- libusb_get_container_id_descriptor@12 = libusb_get_container_id_descriptor
- libusb_get_device
- libusb_get_device@4 = libusb_get_device
- libusb_get_device_address
- libusb_get_device_address@4 = libusb_get_device_address
- libusb_get_device_descriptor
- libusb_get_device_descriptor@8 = libusb_get_device_descriptor
- libusb_get_device_list
- libusb_get_device_list@8 = libusb_get_device_list
- libusb_get_device_speed
- libusb_get_device_speed@4 = libusb_get_device_speed
- libusb_get_max_iso_packet_size
- libusb_get_max_iso_packet_size@8 = libusb_get_max_iso_packet_size
- libusb_get_max_packet_size
- libusb_get_max_packet_size@8 = libusb_get_max_packet_size
- libusb_get_next_timeout
- libusb_get_next_timeout@8 = libusb_get_next_timeout
- libusb_get_parent
- libusb_get_parent@4 = libusb_get_parent
- libusb_get_pollfds
- libusb_get_pollfds@4 = libusb_get_pollfds
- libusb_get_port_number
- libusb_get_port_number@4 = libusb_get_port_number
- libusb_get_port_numbers
- libusb_get_port_numbers@12 = libusb_get_port_numbers
- libusb_get_port_path
- libusb_get_port_path@16 = libusb_get_port_path
- libusb_get_ss_endpoint_companion_descriptor
- libusb_get_ss_endpoint_companion_descriptor@12 = libusb_get_ss_endpoint_companion_descriptor
- libusb_get_ss_usb_device_capability_descriptor
- libusb_get_ss_usb_device_capability_descriptor@12 = libusb_get_ss_usb_device_capability_descriptor
- libusb_get_string_descriptor_ascii
- libusb_get_string_descriptor_ascii@16 = libusb_get_string_descriptor_ascii
- libusb_get_usb_2_0_extension_descriptor
- libusb_get_usb_2_0_extension_descriptor@12 = libusb_get_usb_2_0_extension_descriptor
- libusb_get_version
- libusb_get_version@0 = libusb_get_version
- libusb_handle_events
- libusb_handle_events@4 = libusb_handle_events
- libusb_handle_events_completed
- libusb_handle_events_completed@8 = libusb_handle_events_completed
- libusb_handle_events_locked
- libusb_handle_events_locked@8 = libusb_handle_events_locked
- libusb_handle_events_timeout
- libusb_handle_events_timeout@8 = libusb_handle_events_timeout
- libusb_handle_events_timeout_completed
- libusb_handle_events_timeout_completed@12 = libusb_handle_events_timeout_completed
- libusb_has_capability
- libusb_has_capability@4 = libusb_has_capability
- libusb_hotplug_deregister_callback
- libusb_hotplug_deregister_callback@8 = libusb_hotplug_deregister_callback
- libusb_hotplug_register_callback
- libusb_hotplug_register_callback@36 = libusb_hotplug_register_callback
- libusb_init
- libusb_init@4 = libusb_init
- libusb_interrupt_transfer
- libusb_interrupt_transfer@24 = libusb_interrupt_transfer
- libusb_kernel_driver_active
- libusb_kernel_driver_active@8 = libusb_kernel_driver_active
- libusb_lock_event_waiters
- libusb_lock_event_waiters@4 = libusb_lock_event_waiters
- libusb_lock_events
- libusb_lock_events@4 = libusb_lock_events
- libusb_open
- libusb_open@8 = libusb_open
- libusb_open_device_with_vid_pid
- libusb_open_device_with_vid_pid@12 = libusb_open_device_with_vid_pid
- libusb_pollfds_handle_timeouts
- libusb_pollfds_handle_timeouts@4 = libusb_pollfds_handle_timeouts
- libusb_ref_device
- libusb_ref_device@4 = libusb_ref_device
- libusb_release_interface
- libusb_release_interface@8 = libusb_release_interface
- libusb_reset_device
- libusb_reset_device@4 = libusb_reset_device
- libusb_set_auto_detach_kernel_driver
- libusb_set_auto_detach_kernel_driver@8 = libusb_set_auto_detach_kernel_driver
- libusb_set_configuration
- libusb_set_configuration@8 = libusb_set_configuration
- libusb_set_debug
- libusb_set_debug@8 = libusb_set_debug
- libusb_set_interface_alt_setting
- libusb_set_interface_alt_setting@12 = libusb_set_interface_alt_setting
- libusb_set_pollfd_notifiers
- libusb_set_pollfd_notifiers@16 = libusb_set_pollfd_notifiers
- libusb_setlocale
- libusb_setlocale@4 = libusb_setlocale
- libusb_strerror
- libusb_strerror@4 = libusb_strerror
- libusb_submit_transfer
- libusb_submit_transfer@4 = libusb_submit_transfer
- libusb_try_lock_events
- libusb_try_lock_events@4 = libusb_try_lock_events
- libusb_unlock_event_waiters
- libusb_unlock_event_waiters@4 = libusb_unlock_event_waiters
- libusb_unlock_events
- libusb_unlock_events@4 = libusb_unlock_events
- libusb_unref_device
- libusb_unref_device@4 = libusb_unref_device
- libusb_wait_for_event
- libusb_wait_for_event@8 = libusb_wait_for_event
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.rc b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.rc
deleted file mode 100644
index ae49757cc..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb-1.0.rc
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * For Windows: input this file to the Resoure Compiler to produce a binary
- * .res file. This is then embedded in the resultant library (like any other
- * compilation object).
- * The information can then be queried using standard APIs and can also be
- * viewed with utilities such as Windows Explorer.
- */
-#ifndef _WIN32_WCE
-#include "winresrc.h"
-#endif
-
-#include "version.h"
-#ifndef LIBUSB_VERSIONSTRING
-#define LU_STR(s) #s
-#define LU_XSTR(s) LU_STR(s)
-#if LIBUSB_NANO > 0
-#define LIBUSB_VERSIONSTRING \
- LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \
- LU_XSTR(LIBUSB_MICRO) "." LU_XSTR(LIBUSB_NANO) LIBUSB_RC "\0"
-#else
-#define LIBUSB_VERSIONSTRING \
- LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \
- LU_XSTR(LIBUSB_MICRO) LIBUSB_RC "\0"
-#endif
-#endif
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
- PRODUCTVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "CompanyName", "libusbx.org\0"
- VALUE "FileDescription", "C library for writing portable USB drivers in userspace\0"
- VALUE "FileVersion", LIBUSB_VERSIONSTRING
- VALUE "InternalName", "libusb\0"
- VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0"
- VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0"
- VALUE "OriginalFilename", "libusb-1.0.dll\0"
- VALUE "PrivateBuild", "\0"
- VALUE "ProductName", "libusb-1.0\0"
- VALUE "ProductVersion", LIBUSB_VERSIONSTRING
- VALUE "SpecialBuild", "\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb.h
deleted file mode 100644
index e8e120162..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusb.h
+++ /dev/null
@@ -1,1941 +0,0 @@
-/*
- * Public libusbx header file
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2012 Pete Batard <pete@akeo.ie>
- * Copyright © 2012 Nathan Hjelm <hjelmn@cs.unm.edu>
- * For more information, please visit: http://libusbx.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LIBUSB_H
-#define LIBUSB_H
-
-#ifdef _MSC_VER
-/* on MS environments, the inline keyword is available in C++ only */
-#if !defined(__cplusplus)
-#define inline __inline
-#endif
-/* ssize_t is also not available (copy/paste from MinGW) */
-#ifndef _SSIZE_T_DEFINED
-#define _SSIZE_T_DEFINED
-#undef ssize_t
-#ifdef _WIN64
- typedef __int64 ssize_t;
-#else
- typedef int ssize_t;
-#endif /* _WIN64 */
-#endif /* _SSIZE_T_DEFINED */
-#endif /* _MSC_VER */
-
-/* stdint.h is not available on older MSVC */
-#if defined(_MSC_VER) && (_MSC_VER < 1600) && (!defined(_STDINT)) && (!defined(_STDINT_H))
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-#else
-#include <stdint.h>
-#endif
-
-#if !defined(_WIN32_WCE)
-#include <sys/types.h>
-#endif
-
-#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
-#include <sys/time.h>
-#endif
-
-#include <time.h>
-#include <limits.h>
-
-/* 'interface' might be defined as a macro on Windows, so we need to
- * undefine it so as not to break the current libusbx API, because
- * libusb_config_descriptor has an 'interface' member
- * As this can be problematic if you include windows.h after libusb.h
- * in your sources, we force windows.h to be included first. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-#include <windows.h>
-#if defined(interface)
-#undef interface
-#endif
-#if !defined(__CYGWIN__)
-#include <winsock.h>
-#endif
-#endif
-
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-#define LIBUSB_DEPRECATED_FOR(f) \
- __attribute__((deprecated("Use " #f " instead")))
-#else
-#define LIBUSB_DEPRECATED_FOR(f)
-#endif /* __GNUC__ */
-
-/** \def LIBUSB_CALL
- * \ingroup misc
- * libusbx's Windows calling convention.
- *
- * Under Windows, the selection of available compilers and configurations
- * means that, unlike other platforms, there is not <em>one true calling
- * convention</em> (calling convention: the manner in which parameters are
- * passed to funcions in the generated assembly code).
- *
- * Matching the Windows API itself, libusbx uses the WINAPI convention (which
- * translates to the <tt>stdcall</tt> convention) and guarantees that the
- * library is compiled in this way. The public header file also includes
- * appropriate annotations so that your own software will use the right
- * convention, even if another convention is being used by default within
- * your codebase.
- *
- * The one consideration that you must apply in your software is to mark
- * all functions which you use as libusbx callbacks with this LIBUSB_CALL
- * annotation, so that they too get compiled for the correct calling
- * convention.
- *
- * On non-Windows operating systems, this macro is defined as nothing. This
- * means that you can apply it to your code without worrying about
- * cross-platform compatibility.
- */
-/* LIBUSB_CALL must be defined on both definition and declaration of libusbx
- * functions. You'd think that declaration would be enough, but cygwin will
- * complain about conflicting types unless both are marked this way.
- * The placement of this macro is important too; it must appear after the
- * return type, before the function name. See internal documentation for
- * API_EXPORTED.
- */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-#define LIBUSB_CALL WINAPI
-#else
-#define LIBUSB_CALL
-#endif
-
-/** \def LIBUSBX_API_VERSION
- * \ingroup misc
- * libusbx's API version.
- *
- * Since version 1.0.13, to help with feature detection, libusbx defines
- * a LIBUSBX_API_VERSION macro that gets increased every time there is a
- * significant change to the API, such as the introduction of a new call,
- * the definition of a new macro/enum member, or any other element that
- * libusbx applications may want to detect at compilation time.
- *
- * The macro is typically used in an application as follows:
- * \code
- * #if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01001234)
- * // Use one of the newer features from the libusbx API
- * #endif
- * \endcode
- *
- * Another feature of LIBUSBX_API_VERSION is that it can be used to detect
- * whether you are compiling against the libusb or the libusbx library.
- *
- * Internally, LIBUSBX_API_VERSION is defined as follows:
- * (libusbx major << 24) | (libusbx minor << 16) | (16 bit incremental)
- */
-#define LIBUSBX_API_VERSION 0x01000102
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** \def libusb_cpu_to_le16
- * \ingroup misc
- * Convert a 16-bit value from host-endian to little-endian format. On
- * little endian systems, this function does nothing. On big endian systems,
- * the bytes are swapped.
- * \param x the host-endian value to convert
- * \returns the value in little-endian byte order
- */
-static inline uint16_t libusb_cpu_to_le16(const uint16_t x)
-{
- union {
- uint8_t b8[2];
- uint16_t b16;
- } _tmp;
- _tmp.b8[1] = (uint8_t) (x >> 8);
- _tmp.b8[0] = (uint8_t) (x & 0xff);
- return _tmp.b16;
-}
-
-/** \def libusb_le16_to_cpu
- * \ingroup misc
- * Convert a 16-bit value from little-endian to host-endian format. On
- * little endian systems, this function does nothing. On big endian systems,
- * the bytes are swapped.
- * \param x the little-endian value to convert
- * \returns the value in host-endian byte order
- */
-#define libusb_le16_to_cpu libusb_cpu_to_le16
-
-/* standard USB stuff */
-
-/** \ingroup desc
- * Device and/or Interface Class codes */
-enum libusb_class_code {
- /** In the context of a \ref libusb_device_descriptor "device descriptor",
- * this bDeviceClass value indicates that each interface specifies its
- * own class information and all interfaces operate independently.
- */
- LIBUSB_CLASS_PER_INTERFACE = 0,
-
- /** Audio class */
- LIBUSB_CLASS_AUDIO = 1,
-
- /** Communications class */
- LIBUSB_CLASS_COMM = 2,
-
- /** Human Interface Device class */
- LIBUSB_CLASS_HID = 3,
-
- /** Physical */
- LIBUSB_CLASS_PHYSICAL = 5,
-
- /** Printer class */
- LIBUSB_CLASS_PRINTER = 7,
-
- /** Image class */
- LIBUSB_CLASS_PTP = 6, /* legacy name from libusb-0.1 usb.h */
- LIBUSB_CLASS_IMAGE = 6,
-
- /** Mass storage class */
- LIBUSB_CLASS_MASS_STORAGE = 8,
-
- /** Hub class */
- LIBUSB_CLASS_HUB = 9,
-
- /** Data class */
- LIBUSB_CLASS_DATA = 10,
-
- /** Smart Card */
- LIBUSB_CLASS_SMART_CARD = 0x0b,
-
- /** Content Security */
- LIBUSB_CLASS_CONTENT_SECURITY = 0x0d,
-
- /** Video */
- LIBUSB_CLASS_VIDEO = 0x0e,
-
- /** Personal Healthcare */
- LIBUSB_CLASS_PERSONAL_HEALTHCARE = 0x0f,
-
- /** Diagnostic Device */
- LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc,
-
- /** Wireless class */
- LIBUSB_CLASS_WIRELESS = 0xe0,
-
- /** Application class */
- LIBUSB_CLASS_APPLICATION = 0xfe,
-
- /** Class is vendor-specific */
- LIBUSB_CLASS_VENDOR_SPEC = 0xff
-};
-
-/** \ingroup desc
- * Descriptor types as defined by the USB specification. */
-enum libusb_descriptor_type {
- /** Device descriptor. See libusb_device_descriptor. */
- LIBUSB_DT_DEVICE = 0x01,
-
- /** Configuration descriptor. See libusb_config_descriptor. */
- LIBUSB_DT_CONFIG = 0x02,
-
- /** String descriptor */
- LIBUSB_DT_STRING = 0x03,
-
- /** Interface descriptor. See libusb_interface_descriptor. */
- LIBUSB_DT_INTERFACE = 0x04,
-
- /** Endpoint descriptor. See libusb_endpoint_descriptor. */
- LIBUSB_DT_ENDPOINT = 0x05,
-
- /** BOS descriptor */
- LIBUSB_DT_BOS = 0x0f,
-
- /** Device Capability descriptor */
- LIBUSB_DT_DEVICE_CAPABILITY = 0x10,
-
- /** HID descriptor */
- LIBUSB_DT_HID = 0x21,
-
- /** HID report descriptor */
- LIBUSB_DT_REPORT = 0x22,
-
- /** Physical descriptor */
- LIBUSB_DT_PHYSICAL = 0x23,
-
- /** Hub descriptor */
- LIBUSB_DT_HUB = 0x29,
-
- /** SuperSpeed Hub descriptor */
- LIBUSB_DT_SUPERSPEED_HUB = 0x2a,
-
- /** SuperSpeed Endpoint Companion descriptor */
- LIBUSB_DT_SS_ENDPOINT_COMPANION = 0x30
-};
-
-/* Descriptor sizes per descriptor type */
-#define LIBUSB_DT_DEVICE_SIZE 18
-#define LIBUSB_DT_CONFIG_SIZE 9
-#define LIBUSB_DT_INTERFACE_SIZE 9
-#define LIBUSB_DT_ENDPOINT_SIZE 7
-#define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */
-#define LIBUSB_DT_HUB_NONVAR_SIZE 7
-#define LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE 6
-#define LIBUSB_DT_BOS_SIZE 5
-#define LIBUSB_DT_DEVICE_CAPABILITY_SIZE 3
-
-/* BOS descriptor sizes */
-#define LIBUSB_BT_USB_2_0_EXTENSION_SIZE 7
-#define LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE 10
-#define LIBUSB_BT_CONTAINER_ID_SIZE 20
-
-/* We unwrap the BOS => define its max size */
-#define LIBUSB_DT_BOS_MAX_SIZE ((LIBUSB_DT_BOS_SIZE) +\
- (LIBUSB_BT_USB_2_0_EXTENSION_SIZE) +\
- (LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE) +\
- (LIBUSB_BT_CONTAINER_ID_SIZE))
-
-#define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */
-#define LIBUSB_ENDPOINT_DIR_MASK 0x80
-
-/** \ingroup desc
- * Endpoint direction. Values for bit 7 of the
- * \ref libusb_endpoint_descriptor::bEndpointAddress "endpoint address" scheme.
- */
-enum libusb_endpoint_direction {
- /** In: device-to-host */
- LIBUSB_ENDPOINT_IN = 0x80,
-
- /** Out: host-to-device */
- LIBUSB_ENDPOINT_OUT = 0x00
-};
-
-#define LIBUSB_TRANSFER_TYPE_MASK 0x03 /* in bmAttributes */
-
-/** \ingroup desc
- * Endpoint transfer type. Values for bits 0:1 of the
- * \ref libusb_endpoint_descriptor::bmAttributes "endpoint attributes" field.
- */
-enum libusb_transfer_type {
- /** Control endpoint */
- LIBUSB_TRANSFER_TYPE_CONTROL = 0,
-
- /** Isochronous endpoint */
- LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1,
-
- /** Bulk endpoint */
- LIBUSB_TRANSFER_TYPE_BULK = 2,
-
- /** Interrupt endpoint */
- LIBUSB_TRANSFER_TYPE_INTERRUPT = 3
-};
-
-/** \ingroup misc
- * Standard requests, as defined in table 9-5 of the USB 3.0 specifications */
-enum libusb_standard_request {
- /** Request status of the specific recipient */
- LIBUSB_REQUEST_GET_STATUS = 0x00,
-
- /** Clear or disable a specific feature */
- LIBUSB_REQUEST_CLEAR_FEATURE = 0x01,
-
- /* 0x02 is reserved */
-
- /** Set or enable a specific feature */
- LIBUSB_REQUEST_SET_FEATURE = 0x03,
-
- /* 0x04 is reserved */
-
- /** Set device address for all future accesses */
- LIBUSB_REQUEST_SET_ADDRESS = 0x05,
-
- /** Get the specified descriptor */
- LIBUSB_REQUEST_GET_DESCRIPTOR = 0x06,
-
- /** Used to update existing descriptors or add new descriptors */
- LIBUSB_REQUEST_SET_DESCRIPTOR = 0x07,
-
- /** Get the current device configuration value */
- LIBUSB_REQUEST_GET_CONFIGURATION = 0x08,
-
- /** Set device configuration */
- LIBUSB_REQUEST_SET_CONFIGURATION = 0x09,
-
- /** Return the selected alternate setting for the specified interface */
- LIBUSB_REQUEST_GET_INTERFACE = 0x0A,
-
- /** Select an alternate interface for the specified interface */
- LIBUSB_REQUEST_SET_INTERFACE = 0x0B,
-
- /** Set then report an endpoint's synchronization frame */
- LIBUSB_REQUEST_SYNCH_FRAME = 0x0C,
-
- /** Sets both the U1 and U2 Exit Latency */
- LIBUSB_REQUEST_SET_SEL = 0x30,
-
- /** Delay from the time a host transmits a packet to the time it is
- * received by the device. */
- LIBUSB_SET_ISOCH_DELAY = 0x31,
-};
-
-/** \ingroup misc
- * Request type bits of the
- * \ref libusb_control_setup::bmRequestType "bmRequestType" field in control
- * transfers. */
-enum libusb_request_type {
- /** Standard */
- LIBUSB_REQUEST_TYPE_STANDARD = (0x00 << 5),
-
- /** Class */
- LIBUSB_REQUEST_TYPE_CLASS = (0x01 << 5),
-
- /** Vendor */
- LIBUSB_REQUEST_TYPE_VENDOR = (0x02 << 5),
-
- /** Reserved */
- LIBUSB_REQUEST_TYPE_RESERVED = (0x03 << 5)
-};
-
-/** \ingroup misc
- * Recipient bits of the
- * \ref libusb_control_setup::bmRequestType "bmRequestType" field in control
- * transfers. Values 4 through 31 are reserved. */
-enum libusb_request_recipient {
- /** Device */
- LIBUSB_RECIPIENT_DEVICE = 0x00,
-
- /** Interface */
- LIBUSB_RECIPIENT_INTERFACE = 0x01,
-
- /** Endpoint */
- LIBUSB_RECIPIENT_ENDPOINT = 0x02,
-
- /** Other */
- LIBUSB_RECIPIENT_OTHER = 0x03,
-};
-
-#define LIBUSB_ISO_SYNC_TYPE_MASK 0x0C
-
-/** \ingroup desc
- * Synchronization type for isochronous endpoints. Values for bits 2:3 of the
- * \ref libusb_endpoint_descriptor::bmAttributes "bmAttributes" field in
- * libusb_endpoint_descriptor.
- */
-enum libusb_iso_sync_type {
- /** No synchronization */
- LIBUSB_ISO_SYNC_TYPE_NONE = 0,
-
- /** Asynchronous */
- LIBUSB_ISO_SYNC_TYPE_ASYNC = 1,
-
- /** Adaptive */
- LIBUSB_ISO_SYNC_TYPE_ADAPTIVE = 2,
-
- /** Synchronous */
- LIBUSB_ISO_SYNC_TYPE_SYNC = 3
-};
-
-#define LIBUSB_ISO_USAGE_TYPE_MASK 0x30
-
-/** \ingroup desc
- * Usage type for isochronous endpoints. Values for bits 4:5 of the
- * \ref libusb_endpoint_descriptor::bmAttributes "bmAttributes" field in
- * libusb_endpoint_descriptor.
- */
-enum libusb_iso_usage_type {
- /** Data endpoint */
- LIBUSB_ISO_USAGE_TYPE_DATA = 0,
-
- /** Feedback endpoint */
- LIBUSB_ISO_USAGE_TYPE_FEEDBACK = 1,
-
- /** Implicit feedback Data endpoint */
- LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2,
-};
-
-/** \ingroup desc
- * A structure representing the standard USB device descriptor. This
- * descriptor is documented in section 9.6.1 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_device_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE LIBUSB_DT_DEVICE in this
- * context. */
- uint8_t bDescriptorType;
-
- /** USB specification release number in binary-coded decimal. A value of
- * 0x0200 indicates USB 2.0, 0x0110 indicates USB 1.1, etc. */
- uint16_t bcdUSB;
-
- /** USB-IF class code for the device. See \ref libusb_class_code. */
- uint8_t bDeviceClass;
-
- /** USB-IF subclass code for the device, qualified by the bDeviceClass
- * value */
- uint8_t bDeviceSubClass;
-
- /** USB-IF protocol code for the device, qualified by the bDeviceClass and
- * bDeviceSubClass values */
- uint8_t bDeviceProtocol;
-
- /** Maximum packet size for endpoint 0 */
- uint8_t bMaxPacketSize0;
-
- /** USB-IF vendor ID */
- uint16_t idVendor;
-
- /** USB-IF product ID */
- uint16_t idProduct;
-
- /** Device release number in binary-coded decimal */
- uint16_t bcdDevice;
-
- /** Index of string descriptor describing manufacturer */
- uint8_t iManufacturer;
-
- /** Index of string descriptor describing product */
- uint8_t iProduct;
-
- /** Index of string descriptor containing device serial number */
- uint8_t iSerialNumber;
-
- /** Number of possible configurations */
- uint8_t bNumConfigurations;
-};
-
-/** \ingroup desc
- * A structure representing the standard USB endpoint descriptor. This
- * descriptor is documented in section 9.6.6 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_endpoint_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_ENDPOINT LIBUSB_DT_ENDPOINT in
- * this context. */
- uint8_t bDescriptorType;
-
- /** The address of the endpoint described by this descriptor. Bits 0:3 are
- * the endpoint number. Bits 4:6 are reserved. Bit 7 indicates direction,
- * see \ref libusb_endpoint_direction.
- */
- uint8_t bEndpointAddress;
-
- /** Attributes which apply to the endpoint when it is configured using
- * the bConfigurationValue. Bits 0:1 determine the transfer type and
- * correspond to \ref libusb_transfer_type. Bits 2:3 are only used for
- * isochronous endpoints and correspond to \ref libusb_iso_sync_type.
- * Bits 4:5 are also only used for isochronous endpoints and correspond to
- * \ref libusb_iso_usage_type. Bits 6:7 are reserved.
- */
- uint8_t bmAttributes;
-
- /** Maximum packet size this endpoint is capable of sending/receiving. */
- uint16_t wMaxPacketSize;
-
- /** Interval for polling endpoint for data transfers. */
- uint8_t bInterval;
-
- /** For audio devices only: the rate at which synchronization feedback
- * is provided. */
- uint8_t bRefresh;
-
- /** For audio devices only: the address if the synch endpoint */
- uint8_t bSynchAddress;
-
- /** Extra descriptors. If libusbx encounters unknown endpoint descriptors,
- * it will store them here, should you wish to parse them. */
- const unsigned char *extra;
-
- /** Length of the extra descriptors, in bytes. */
- int extra_length;
-};
-
-/** \ingroup desc
- * A structure representing the standard USB interface descriptor. This
- * descriptor is documented in section 9.6.5 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_interface_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_INTERFACE LIBUSB_DT_INTERFACE
- * in this context. */
- uint8_t bDescriptorType;
-
- /** Number of this interface */
- uint8_t bInterfaceNumber;
-
- /** Value used to select this alternate setting for this interface */
- uint8_t bAlternateSetting;
-
- /** Number of endpoints used by this interface (excluding the control
- * endpoint). */
- uint8_t bNumEndpoints;
-
- /** USB-IF class code for this interface. See \ref libusb_class_code. */
- uint8_t bInterfaceClass;
-
- /** USB-IF subclass code for this interface, qualified by the
- * bInterfaceClass value */
- uint8_t bInterfaceSubClass;
-
- /** USB-IF protocol code for this interface, qualified by the
- * bInterfaceClass and bInterfaceSubClass values */
- uint8_t bInterfaceProtocol;
-
- /** Index of string descriptor describing this interface */
- uint8_t iInterface;
-
- /** Array of endpoint descriptors. This length of this array is determined
- * by the bNumEndpoints field. */
- const struct libusb_endpoint_descriptor *endpoint;
-
- /** Extra descriptors. If libusbx encounters unknown interface descriptors,
- * it will store them here, should you wish to parse them. */
- const unsigned char *extra;
-
- /** Length of the extra descriptors, in bytes. */
- int extra_length;
-};
-
-/** \ingroup desc
- * A collection of alternate settings for a particular USB interface.
- */
-struct libusb_interface {
- /** Array of interface descriptors. The length of this array is determined
- * by the num_altsetting field. */
- const struct libusb_interface_descriptor *altsetting;
-
- /** The number of alternate settings that belong to this interface */
- int num_altsetting;
-};
-
-/** \ingroup desc
- * A structure representing the standard USB configuration descriptor. This
- * descriptor is documented in section 9.6.3 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_config_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_CONFIG LIBUSB_DT_CONFIG
- * in this context. */
- uint8_t bDescriptorType;
-
- /** Total length of data returned for this configuration */
- uint16_t wTotalLength;
-
- /** Number of interfaces supported by this configuration */
- uint8_t bNumInterfaces;
-
- /** Identifier value for this configuration */
- uint8_t bConfigurationValue;
-
- /** Index of string descriptor describing this configuration */
- uint8_t iConfiguration;
-
- /** Configuration characteristics */
- uint8_t bmAttributes;
-
- /** Maximum power consumption of the USB device from this bus in this
- * configuration when the device is fully opreation. Expressed in units
- * of 2 mA. */
- uint8_t MaxPower;
-
- /** Array of interfaces supported by this configuration. The length of
- * this array is determined by the bNumInterfaces field. */
- const struct libusb_interface *interface;
-
- /** Extra descriptors. If libusbx encounters unknown configuration
- * descriptors, it will store them here, should you wish to parse them. */
- const unsigned char *extra;
-
- /** Length of the extra descriptors, in bytes. */
- int extra_length;
-};
-
-/** \ingroup desc
- * A structure representing the superspeed endpoint companion
- * descriptor. This descriptor is documented in section 9.6.7 of
- * the USB 3.0 specification. All multiple-byte fields are represented in
- * host-endian format.
- */
-struct libusb_ss_endpoint_companion_descriptor {
-
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_SS_ENDPOINT_COMPANION in
- * this context. */
- uint8_t bDescriptorType;
-
-
- /** The maximum number of packets the endpoint can send or
- * recieve as part of a burst. */
- uint8_t bMaxBurst;
-
- /** In bulk EP: bits 4:0 represents the maximum number of
- * streams the EP supports. In isochronous EP: bits 1:0
- * represents the Mult - a zero based value that determines
- * the maximum number of packets within a service interval */
- uint8_t bmAttributes;
-
- /** The total number of bytes this EP will transfer every
- * service interval. valid only for periodic EPs. */
- uint16_t wBytesPerInterval;
-};
-
-/** \ingroup desc
- * A generic representation of a BOS Device Capability descriptor. It is
- * advised to check bDevCapabilityType and call the matching
- * libusb_get_*_descriptor function to get a structure fully matching the type.
- */
-struct libusb_bos_dev_capability_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE_CAPABILITY
- * LIBUSB_DT_DEVICE_CAPABILITY in this context. */
- uint8_t bDescriptorType;
- /** Device Capability type */
- uint8_t bDevCapabilityType;
- /** Device Capability data (bLength - 3 bytes) */
- uint8_t dev_capability_data
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
- [] /* valid C99 code */
-#else
- [0] /* non-standard, but usually working code */
-#endif
- ;
-};
-
-/** \ingroup desc
- * A structure representing the Binary Device Object Store (BOS) descriptor.
- * This descriptor is documented in section 9.6.2 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_bos_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_BOS LIBUSB_DT_BOS
- * in this context. */
- uint8_t bDescriptorType;
-
- /** Length of this descriptor and all of its sub descriptors */
- uint16_t wTotalLength;
-
- /** The number of separate device capability descriptors in
- * the BOS */
- uint8_t bNumDeviceCaps;
-
- /** bNumDeviceCap Device Capability Descriptors */
- struct libusb_bos_dev_capability_descriptor *dev_capability
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
- [] /* valid C99 code */
-#else
- [0] /* non-standard, but usually working code */
-#endif
- ;
-};
-
-/** \ingroup desc
- * A structure representing the USB 2.0 Extension descriptor
- * This descriptor is documented in section 9.6.2.1 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_usb_2_0_extension_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE_CAPABILITY
- * LIBUSB_DT_DEVICE_CAPABILITY in this context. */
- uint8_t bDescriptorType;
-
- /** Capability type. Will have value
- * \ref libusb_capability_type::LIBUSB_BT_USB_2_0_EXTENSION
- * LIBUSB_BT_USB_2_0_EXTENSION in this context. */
- uint8_t bDevCapabilityType;
-
- /** Bitmap encoding of supported device level features.
- * A value of one in a bit location indicates a feature is
- * supported; a value of zero indicates it is not supported.
- * See \ref libusb_usb_2_0_extension_attributes. */
- uint32_t bmAttributes;
-};
-
-/** \ingroup desc
- * A structure representing the SuperSpeed USB Device Capability descriptor
- * This descriptor is documented in section 9.6.2.2 of the USB 3.0 specification.
- * All multiple-byte fields are represented in host-endian format.
- */
-struct libusb_ss_usb_device_capability_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE_CAPABILITY
- * LIBUSB_DT_DEVICE_CAPABILITY in this context. */
- uint8_t bDescriptorType;
-
- /** Capability type. Will have value
- * \ref libusb_capability_type::LIBUSB_BT_SS_USB_DEVICE_CAPABILITY
- * LIBUSB_BT_SS_USB_DEVICE_CAPABILITY in this context. */
- uint8_t bDevCapabilityType;
-
- /** Bitmap encoding of supported device level features.
- * A value of one in a bit location indicates a feature is
- * supported; a value of zero indicates it is not supported.
- * See \ref libusb_ss_usb_device_capability_attributes. */
- uint8_t bmAttributes;
-
- /** Bitmap encoding of the speed supported by this device when
- * operating in SuperSpeed mode. See \ref libusb_supported_speed. */
- uint16_t wSpeedSupported;
-
- /** The lowest speed at which all the functionality supported
- * by the device is available to the user. For example if the
- * device supports all its functionality when connected at
- * full speed and above then it sets this value to 1. */
- uint8_t bFunctionalitySupport;
-
- /** U1 Device Exit Latency. */
- uint8_t bU1DevExitLat;
-
- /** U2 Device Exit Latency. */
- uint16_t bU2DevExitLat;
-};
-
-/** \ingroup desc
- * A structure representing the Container ID descriptor.
- * This descriptor is documented in section 9.6.2.3 of the USB 3.0 specification.
- * All multiple-byte fields, except UUIDs, are represented in host-endian format.
- */
-struct libusb_container_id_descriptor {
- /** Size of this descriptor (in bytes) */
- uint8_t bLength;
-
- /** Descriptor type. Will have value
- * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE_CAPABILITY
- * LIBUSB_DT_DEVICE_CAPABILITY in this context. */
- uint8_t bDescriptorType;
-
- /** Capability type. Will have value
- * \ref libusb_capability_type::LIBUSB_BT_CONTAINER_ID
- * LIBUSB_BT_CONTAINER_ID in this context. */
- uint8_t bDevCapabilityType;
-
- /** Reserved field */
- uint8_t bReserved;
-
- /** 128 bit UUID */
- uint8_t ContainerID[16];
-};
-
-/** \ingroup asyncio
- * Setup packet for control transfers. */
-struct libusb_control_setup {
- /** Request type. Bits 0:4 determine recipient, see
- * \ref libusb_request_recipient. Bits 5:6 determine type, see
- * \ref libusb_request_type. Bit 7 determines data transfer direction, see
- * \ref libusb_endpoint_direction.
- */
- uint8_t bmRequestType;
-
- /** Request. If the type bits of bmRequestType are equal to
- * \ref libusb_request_type::LIBUSB_REQUEST_TYPE_STANDARD
- * "LIBUSB_REQUEST_TYPE_STANDARD" then this field refers to
- * \ref libusb_standard_request. For other cases, use of this field is
- * application-specific. */
- uint8_t bRequest;
-
- /** Value. Varies according to request */
- uint16_t wValue;
-
- /** Index. Varies according to request, typically used to pass an index
- * or offset */
- uint16_t wIndex;
-
- /** Number of bytes to transfer */
- uint16_t wLength;
-};
-
-#define LIBUSB_CONTROL_SETUP_SIZE (sizeof(struct libusb_control_setup))
-
-/* libusbx */
-
-struct libusb_context;
-struct libusb_device;
-struct libusb_device_handle;
-struct libusb_hotplug_callback;
-
-/** \ingroup lib
- * Structure providing the version of the libusbx runtime
- */
-struct libusb_version {
- /** Library major version. */
- const uint16_t major;
-
- /** Library minor version. */
- const uint16_t minor;
-
- /** Library micro version. */
- const uint16_t micro;
-
- /** Library nano version. */
- const uint16_t nano;
-
- /** Library release candidate suffix string, e.g. "-rc4". */
- const char *rc;
-
- /** For ABI compatibility only. */
- const char* describe;
-};
-
-/** \ingroup lib
- * Structure representing a libusbx session. The concept of individual libusbx
- * sessions allows for your program to use two libraries (or dynamically
- * load two modules) which both independently use libusb. This will prevent
- * interference between the individual libusbx users - for example
- * libusb_set_debug() will not affect the other user of the library, and
- * libusb_exit() will not destroy resources that the other user is still
- * using.
- *
- * Sessions are created by libusb_init() and destroyed through libusb_exit().
- * If your application is guaranteed to only ever include a single libusbx
- * user (i.e. you), you do not have to worry about contexts: pass NULL in
- * every function call where a context is required. The default context
- * will be used.
- *
- * For more information, see \ref contexts.
- */
-typedef struct libusb_context libusb_context;
-
-/** \ingroup dev
- * Structure representing a USB device detected on the system. This is an
- * opaque type for which you are only ever provided with a pointer, usually
- * originating from libusb_get_device_list().
- *
- * Certain operations can be performed on a device, but in order to do any
- * I/O you will have to first obtain a device handle using libusb_open().
- *
- * Devices are reference counted with libusb_ref_device() and
- * libusb_unref_device(), and are freed when the reference count reaches 0.
- * New devices presented by libusb_get_device_list() have a reference count of
- * 1, and libusb_free_device_list() can optionally decrease the reference count
- * on all devices in the list. libusb_open() adds another reference which is
- * later destroyed by libusb_close().
- */
-typedef struct libusb_device libusb_device;
-
-
-/** \ingroup dev
- * Structure representing a handle on a USB device. This is an opaque type for
- * which you are only ever provided with a pointer, usually originating from
- * libusb_open().
- *
- * A device handle is used to perform I/O and other operations. When finished
- * with a device handle, you should call libusb_close().
- */
-typedef struct libusb_device_handle libusb_device_handle;
-
-/** \ingroup dev
- * Speed codes. Indicates the speed at which the device is operating.
- */
-enum libusb_speed {
- /** The OS doesn't report or know the device speed. */
- LIBUSB_SPEED_UNKNOWN = 0,
-
- /** The device is operating at low speed (1.5MBit/s). */
- LIBUSB_SPEED_LOW = 1,
-
- /** The device is operating at full speed (12MBit/s). */
- LIBUSB_SPEED_FULL = 2,
-
- /** The device is operating at high speed (480MBit/s). */
- LIBUSB_SPEED_HIGH = 3,
-
- /** The device is operating at super speed (5000MBit/s). */
- LIBUSB_SPEED_SUPER = 4,
-};
-
-/** \ingroup dev
- * Supported speeds (wSpeedSupported) bitfield. Indicates what
- * speeds the device supports.
- */
-enum libusb_supported_speed {
- /** Low speed operation supported (1.5MBit/s). */
- LIBUSB_LOW_SPEED_OPERATION = 1,
-
- /** Full speed operation supported (12MBit/s). */
- LIBUSB_FULL_SPEED_OPERATION = 2,
-
- /** High speed operation supported (480MBit/s). */
- LIBUSB_HIGH_SPEED_OPERATION = 4,
-
- /** Superspeed operation supported (5000MBit/s). */
- LIBUSB_SUPER_SPEED_OPERATION = 8,
-};
-
-/** \ingroup dev
- * Masks for the bits of the
- * \ref libusb_usb_2_0_extension_descriptor::bmAttributes "bmAttributes" field
- * of the USB 2.0 Extension descriptor.
- */
-enum libusb_usb_2_0_extension_attributes {
- /** Supports Link Power Management (LPM) */
- LIBUSB_BM_LPM_SUPPORT = 2,
-};
-
-/** \ingroup dev
- * Masks for the bits of the
- * \ref libusb_ss_usb_device_capability_descriptor::bmAttributes "bmAttributes" field
- * field of the SuperSpeed USB Device Capability descriptor.
- */
-enum libusb_ss_usb_device_capability_attributes {
- /** Supports Latency Tolerance Messages (LTM) */
- LIBUSB_BM_LTM_SUPPORT = 2,
-};
-
-/** \ingroup dev
- * USB capability types
- */
-enum libusb_bos_type {
- /** Wireless USB device capability */
- LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY = 1,
-
- /** USB 2.0 extensions */
- LIBUSB_BT_USB_2_0_EXTENSION = 2,
-
- /** SuperSpeed USB device capability */
- LIBUSB_BT_SS_USB_DEVICE_CAPABILITY = 3,
-
- /** Container ID type */
- LIBUSB_BT_CONTAINER_ID = 4,
-};
-
-/** \ingroup misc
- * Error codes. Most libusbx functions return 0 on success or one of these
- * codes on failure.
- * You can call libusb_error_name() to retrieve a string representation of an
- * error code or libusb_strerror() to get an end-user suitable description of
- * an error code.
- */
-enum libusb_error {
- /** Success (no error) */
- LIBUSB_SUCCESS = 0,
-
- /** Input/output error */
- LIBUSB_ERROR_IO = -1,
-
- /** Invalid parameter */
- LIBUSB_ERROR_INVALID_PARAM = -2,
-
- /** Access denied (insufficient permissions) */
- LIBUSB_ERROR_ACCESS = -3,
-
- /** No such device (it may have been disconnected) */
- LIBUSB_ERROR_NO_DEVICE = -4,
-
- /** Entity not found */
- LIBUSB_ERROR_NOT_FOUND = -5,
-
- /** Resource busy */
- LIBUSB_ERROR_BUSY = -6,
-
- /** Operation timed out */
- LIBUSB_ERROR_TIMEOUT = -7,
-
- /** Overflow */
- LIBUSB_ERROR_OVERFLOW = -8,
-
- /** Pipe error */
- LIBUSB_ERROR_PIPE = -9,
-
- /** System call interrupted (perhaps due to signal) */
- LIBUSB_ERROR_INTERRUPTED = -10,
-
- /** Insufficient memory */
- LIBUSB_ERROR_NO_MEM = -11,
-
- /** Operation not supported or unimplemented on this platform */
- LIBUSB_ERROR_NOT_SUPPORTED = -12,
-
- /* NB: Remember to update LIBUSB_ERROR_COUNT below as well as the
- message strings in strerror.c when adding new error codes here. */
-
- /** Other error */
- LIBUSB_ERROR_OTHER = -99,
-};
-
-/* Total number of error codes in enum libusb_error */
-#define LIBUSB_ERROR_COUNT 14
-
-/** \ingroup asyncio
- * Transfer status codes */
-enum libusb_transfer_status {
- /** Transfer completed without error. Note that this does not indicate
- * that the entire amount of requested data was transferred. */
- LIBUSB_TRANSFER_COMPLETED,
-
- /** Transfer failed */
- LIBUSB_TRANSFER_ERROR,
-
- /** Transfer timed out */
- LIBUSB_TRANSFER_TIMED_OUT,
-
- /** Transfer was cancelled */
- LIBUSB_TRANSFER_CANCELLED,
-
- /** For bulk/interrupt endpoints: halt condition detected (endpoint
- * stalled). For control endpoints: control request not supported. */
- LIBUSB_TRANSFER_STALL,
-
- /** Device was disconnected */
- LIBUSB_TRANSFER_NO_DEVICE,
-
- /** Device sent more data than requested */
- LIBUSB_TRANSFER_OVERFLOW,
-
- /* NB! Remember to update libusb_error_name()
- when adding new status codes here. */
-};
-
-/** \ingroup asyncio
- * libusb_transfer.flags values */
-enum libusb_transfer_flags {
- /** Report short frames as errors */
- LIBUSB_TRANSFER_SHORT_NOT_OK = 1<<0,
-
- /** Automatically free() transfer buffer during libusb_free_transfer() */
- LIBUSB_TRANSFER_FREE_BUFFER = 1<<1,
-
- /** Automatically call libusb_free_transfer() after callback returns.
- * If this flag is set, it is illegal to call libusb_free_transfer()
- * from your transfer callback, as this will result in a double-free
- * when this flag is acted upon. */
- LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2,
-
- /** Terminate transfers that are a multiple of the endpoint's
- * wMaxPacketSize with an extra zero length packet. This is useful
- * when a device protocol mandates that each logical request is
- * terminated by an incomplete packet (i.e. the logical requests are
- * not separated by other means).
- *
- * This flag only affects host-to-device transfers to bulk and interrupt
- * endpoints. In other situations, it is ignored.
- *
- * This flag only affects transfers with a length that is a multiple of
- * the endpoint's wMaxPacketSize. On transfers of other lengths, this
- * flag has no effect. Therefore, if you are working with a device that
- * needs a ZLP whenever the end of the logical request falls on a packet
- * boundary, then it is sensible to set this flag on <em>every</em>
- * transfer (you do not have to worry about only setting it on transfers
- * that end on the boundary).
- *
- * This flag is currently only supported on Linux.
- * On other systems, libusb_submit_transfer() will return
- * LIBUSB_ERROR_NOT_SUPPORTED for every transfer where this flag is set.
- *
- * Available since libusb-1.0.9.
- */
- LIBUSB_TRANSFER_ADD_ZERO_PACKET = 1 << 3,
-};
-
-/** \ingroup asyncio
- * Isochronous packet descriptor. */
-struct libusb_iso_packet_descriptor {
- /** Length of data to request in this packet */
- unsigned int length;
-
- /** Amount of data that was actually transferred */
- unsigned int actual_length;
-
- /** Status code for this packet */
- enum libusb_transfer_status status;
-};
-
-struct libusb_transfer;
-
-/** \ingroup asyncio
- * Asynchronous transfer callback function type. When submitting asynchronous
- * transfers, you pass a pointer to a callback function of this type via the
- * \ref libusb_transfer::callback "callback" member of the libusb_transfer
- * structure. libusbx will call this function later, when the transfer has
- * completed or failed. See \ref asyncio for more information.
- * \param transfer The libusb_transfer struct the callback function is being
- * notified about.
- */
-typedef void (LIBUSB_CALL *libusb_transfer_cb_fn)(struct libusb_transfer *transfer);
-
-/** \ingroup asyncio
- * The generic USB transfer structure. The user populates this structure and
- * then submits it in order to request a transfer. After the transfer has
- * completed, the library populates the transfer with the results and passes
- * it back to the user.
- */
-struct libusb_transfer {
- /** Handle of the device that this transfer will be submitted to */
- libusb_device_handle *dev_handle;
-
- /** A bitwise OR combination of \ref libusb_transfer_flags. */
- uint8_t flags;
-
- /** Address of the endpoint where this transfer will be sent. */
- unsigned char endpoint;
-
- /** Type of the endpoint from \ref libusb_transfer_type */
- unsigned char type;
-
- /** Timeout for this transfer in millseconds. A value of 0 indicates no
- * timeout. */
- unsigned int timeout;
-
- /** The status of the transfer. Read-only, and only for use within
- * transfer callback function.
- *
- * If this is an isochronous transfer, this field may read COMPLETED even
- * if there were errors in the frames. Use the
- * \ref libusb_iso_packet_descriptor::status "status" field in each packet
- * to determine if errors occurred. */
- enum libusb_transfer_status status;
-
- /** Length of the data buffer */
- int length;
-
- /** Actual length of data that was transferred. Read-only, and only for
- * use within transfer callback function. Not valid for isochronous
- * endpoint transfers. */
- int actual_length;
-
- /** Callback function. This will be invoked when the transfer completes,
- * fails, or is cancelled. */
- libusb_transfer_cb_fn callback;
-
- /** User context data to pass to the callback function. */
- void *user_data;
-
- /** Data buffer */
- unsigned char *buffer;
-
- /** Number of isochronous packets. Only used for I/O with isochronous
- * endpoints. */
- int num_iso_packets;
-
- /** Isochronous packet descriptors, for isochronous transfers only. */
- struct libusb_iso_packet_descriptor iso_packet_desc
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
- [] /* valid C99 code */
-#else
- [0] /* non-standard, but usually working code */
-#endif
- ;
-};
-
-/** \ingroup misc
- * Capabilities supported by an instance of libusb on the current running
- * platform. Test if the loaded library supports a given capability by calling
- * \ref libusb_has_capability().
- */
-enum libusb_capability {
- /** The libusb_has_capability() API is available. */
- LIBUSB_CAP_HAS_CAPABILITY = 0x0000,
- /** Hotplug support is available on this platform. */
- LIBUSB_CAP_HAS_HOTPLUG = 0x0001,
- /** The library can access HID devices without requiring user intervention.
- * Note that before being able to actually access an HID device, you may
- * still have to call additional libusbx functions such as
- * \ref libusb_detach_kernel_driver(). */
- LIBUSB_CAP_HAS_HID_ACCESS = 0x0100,
- /** The library supports detaching of the default USB driver, using
- * \ref libusb_detach_kernel_driver(), if one is set by the OS kernel */
- LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER = 0x0101
-};
-
-/** \ingroup lib
- * Log message levels.
- * - LIBUSB_LOG_LEVEL_NONE (0) : no messages ever printed by the library (default)
- * - LIBUSB_LOG_LEVEL_ERROR (1) : error messages are printed to stderr
- * - LIBUSB_LOG_LEVEL_WARNING (2) : warning and error messages are printed to stderr
- * - LIBUSB_LOG_LEVEL_INFO (3) : informational messages are printed to stdout, warning
- * and error messages are printed to stderr
- * - LIBUSB_LOG_LEVEL_DEBUG (4) : debug and informational messages are printed to stdout,
- * warnings and errors to stderr
- */
-enum libusb_log_level {
- LIBUSB_LOG_LEVEL_NONE = 0,
- LIBUSB_LOG_LEVEL_ERROR,
- LIBUSB_LOG_LEVEL_WARNING,
- LIBUSB_LOG_LEVEL_INFO,
- LIBUSB_LOG_LEVEL_DEBUG,
-};
-
-int LIBUSB_CALL libusb_init(libusb_context **ctx);
-void LIBUSB_CALL libusb_exit(libusb_context *ctx);
-void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
-const struct libusb_version * LIBUSB_CALL libusb_get_version(void);
-int LIBUSB_CALL libusb_has_capability(uint32_t capability);
-const char * LIBUSB_CALL libusb_error_name(int errcode);
-int LIBUSB_CALL libusb_setlocale(const char *locale);
-const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode);
-
-ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx,
- libusb_device ***list);
-void LIBUSB_CALL libusb_free_device_list(libusb_device **list,
- int unref_devices);
-libusb_device * LIBUSB_CALL libusb_ref_device(libusb_device *dev);
-void LIBUSB_CALL libusb_unref_device(libusb_device *dev);
-
-int LIBUSB_CALL libusb_get_configuration(libusb_device_handle *dev,
- int *config);
-int LIBUSB_CALL libusb_get_device_descriptor(libusb_device *dev,
- struct libusb_device_descriptor *desc);
-int LIBUSB_CALL libusb_get_active_config_descriptor(libusb_device *dev,
- struct libusb_config_descriptor **config);
-int LIBUSB_CALL libusb_get_config_descriptor(libusb_device *dev,
- uint8_t config_index, struct libusb_config_descriptor **config);
-int LIBUSB_CALL libusb_get_config_descriptor_by_value(libusb_device *dev,
- uint8_t bConfigurationValue, struct libusb_config_descriptor **config);
-void LIBUSB_CALL libusb_free_config_descriptor(
- struct libusb_config_descriptor *config);
-int LIBUSB_CALL libusb_get_ss_endpoint_companion_descriptor(
- struct libusb_context *ctx,
- const struct libusb_endpoint_descriptor *endpoint,
- struct libusb_ss_endpoint_companion_descriptor **ep_comp);
-void LIBUSB_CALL libusb_free_ss_endpoint_companion_descriptor(
- struct libusb_ss_endpoint_companion_descriptor *ep_comp);
-int LIBUSB_CALL libusb_get_bos_descriptor(libusb_device_handle *handle,
- struct libusb_bos_descriptor **bos);
-void LIBUSB_CALL libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos);
-int LIBUSB_CALL libusb_get_usb_2_0_extension_descriptor(
- struct libusb_context *ctx,
- struct libusb_bos_dev_capability_descriptor *dev_cap,
- struct libusb_usb_2_0_extension_descriptor **usb_2_0_extension);
-void LIBUSB_CALL libusb_free_usb_2_0_extension_descriptor(
- struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension);
-int LIBUSB_CALL libusb_get_ss_usb_device_capability_descriptor(
- struct libusb_context *ctx,
- struct libusb_bos_dev_capability_descriptor *dev_cap,
- struct libusb_ss_usb_device_capability_descriptor **ss_usb_device_cap);
-void LIBUSB_CALL libusb_free_ss_usb_device_capability_descriptor(
- struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_cap);
-int LIBUSB_CALL libusb_get_container_id_descriptor(struct libusb_context *ctx,
- struct libusb_bos_dev_capability_descriptor *dev_cap,
- struct libusb_container_id_descriptor **container_id);
-void LIBUSB_CALL libusb_free_container_id_descriptor(
- struct libusb_container_id_descriptor *container_id);
-uint8_t LIBUSB_CALL libusb_get_bus_number(libusb_device *dev);
-uint8_t LIBUSB_CALL libusb_get_port_number(libusb_device *dev);
-int LIBUSB_CALL libusb_get_port_numbers(libusb_device *dev, uint8_t* port_numbers, int port_numbers_len);
-LIBUSB_DEPRECATED_FOR(libusb_get_port_numbers)
-int LIBUSB_CALL libusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t* path, uint8_t path_length);
-libusb_device * LIBUSB_CALL libusb_get_parent(libusb_device *dev);
-uint8_t LIBUSB_CALL libusb_get_device_address(libusb_device *dev);
-int LIBUSB_CALL libusb_get_device_speed(libusb_device *dev);
-int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev,
- unsigned char endpoint);
-int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev,
- unsigned char endpoint);
-
-int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **handle);
-void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle);
-libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle);
-
-int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev,
- int configuration);
-int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev,
- int interface_number);
-int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev,
- int interface_number);
-
-libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid(
- libusb_context *ctx, uint16_t vendor_id, uint16_t product_id);
-
-int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev,
- int interface_number, int alternate_setting);
-int LIBUSB_CALL libusb_clear_halt(libusb_device_handle *dev,
- unsigned char endpoint);
-int LIBUSB_CALL libusb_reset_device(libusb_device_handle *dev);
-
-int LIBUSB_CALL libusb_kernel_driver_active(libusb_device_handle *dev,
- int interface_number);
-int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev,
- int interface_number);
-int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev,
- int interface_number);
-int LIBUSB_CALL libusb_set_auto_detach_kernel_driver(
- libusb_device_handle *dev, int enable);
-
-/* async I/O */
-
-/** \ingroup asyncio
- * Get the data section of a control transfer. This convenience function is here
- * to remind you that the data does not start until 8 bytes into the actual
- * buffer, as the setup packet comes first.
- *
- * Calling this function only makes sense from a transfer callback function,
- * or situations where you have already allocated a suitably sized buffer at
- * transfer->buffer.
- *
- * \param transfer a transfer
- * \returns pointer to the first byte of the data section
- */
-static inline unsigned char *libusb_control_transfer_get_data(
- struct libusb_transfer *transfer)
-{
- return transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
-}
-
-/** \ingroup asyncio
- * Get the control setup packet of a control transfer. This convenience
- * function is here to remind you that the control setup occupies the first
- * 8 bytes of the transfer data buffer.
- *
- * Calling this function only makes sense from a transfer callback function,
- * or situations where you have already allocated a suitably sized buffer at
- * transfer->buffer.
- *
- * \param transfer a transfer
- * \returns a casted pointer to the start of the transfer data buffer
- */
-static inline struct libusb_control_setup *libusb_control_transfer_get_setup(
- struct libusb_transfer *transfer)
-{
- return (struct libusb_control_setup *) transfer->buffer;
-}
-
-/** \ingroup asyncio
- * Helper function to populate the setup packet (first 8 bytes of the data
- * buffer) for a control transfer. The wIndex, wValue and wLength values should
- * be given in host-endian byte order.
- *
- * \param buffer buffer to output the setup packet into
- * \param bmRequestType see the
- * \ref libusb_control_setup::bmRequestType "bmRequestType" field of
- * \ref libusb_control_setup
- * \param bRequest see the
- * \ref libusb_control_setup::bRequest "bRequest" field of
- * \ref libusb_control_setup
- * \param wValue see the
- * \ref libusb_control_setup::wValue "wValue" field of
- * \ref libusb_control_setup
- * \param wIndex see the
- * \ref libusb_control_setup::wIndex "wIndex" field of
- * \ref libusb_control_setup
- * \param wLength see the
- * \ref libusb_control_setup::wLength "wLength" field of
- * \ref libusb_control_setup
- */
-static inline void libusb_fill_control_setup(unsigned char *buffer,
- uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex,
- uint16_t wLength)
-{
- struct libusb_control_setup *setup = (struct libusb_control_setup *) buffer;
- setup->bmRequestType = bmRequestType;
- setup->bRequest = bRequest;
- setup->wValue = libusb_cpu_to_le16(wValue);
- setup->wIndex = libusb_cpu_to_le16(wIndex);
- setup->wLength = libusb_cpu_to_le16(wLength);
-}
-
-struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(int iso_packets);
-int LIBUSB_CALL libusb_submit_transfer(struct libusb_transfer *transfer);
-int LIBUSB_CALL libusb_cancel_transfer(struct libusb_transfer *transfer);
-void LIBUSB_CALL libusb_free_transfer(struct libusb_transfer *transfer);
-
-/** \ingroup asyncio
- * Helper function to populate the required \ref libusb_transfer fields
- * for a control transfer.
- *
- * If you pass a transfer buffer to this function, the first 8 bytes will
- * be interpreted as a control setup packet, and the wLength field will be
- * used to automatically populate the \ref libusb_transfer::length "length"
- * field of the transfer. Therefore the recommended approach is:
- * -# Allocate a suitably sized data buffer (including space for control setup)
- * -# Call libusb_fill_control_setup()
- * -# If this is a host-to-device transfer with a data stage, put the data
- * in place after the setup packet
- * -# Call this function
- * -# Call libusb_submit_transfer()
- *
- * It is also legal to pass a NULL buffer to this function, in which case this
- * function will not attempt to populate the length field. Remember that you
- * must then populate the buffer and length fields later.
- *
- * \param transfer the transfer to populate
- * \param dev_handle handle of the device that will handle the transfer
- * \param buffer data buffer. If provided, this function will interpret the
- * first 8 bytes as a setup packet and infer the transfer length from that.
- * \param callback callback function to be invoked on transfer completion
- * \param user_data user data to pass to callback function
- * \param timeout timeout for the transfer in milliseconds
- */
-static inline void libusb_fill_control_transfer(
- struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
- unsigned char *buffer, libusb_transfer_cb_fn callback, void *user_data,
- unsigned int timeout)
-{
- struct libusb_control_setup *setup = (struct libusb_control_setup *) buffer;
- transfer->dev_handle = dev_handle;
- transfer->endpoint = 0;
- transfer->type = LIBUSB_TRANSFER_TYPE_CONTROL;
- transfer->timeout = timeout;
- transfer->buffer = buffer;
- if (setup)
- transfer->length = (int) (LIBUSB_CONTROL_SETUP_SIZE
- + libusb_le16_to_cpu(setup->wLength));
- transfer->user_data = user_data;
- transfer->callback = callback;
-}
-
-/** \ingroup asyncio
- * Helper function to populate the required \ref libusb_transfer fields
- * for a bulk transfer.
- *
- * \param transfer the transfer to populate
- * \param dev_handle handle of the device that will handle the transfer
- * \param endpoint address of the endpoint where this transfer will be sent
- * \param buffer data buffer
- * \param length length of data buffer
- * \param callback callback function to be invoked on transfer completion
- * \param user_data user data to pass to callback function
- * \param timeout timeout for the transfer in milliseconds
- */
-static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer,
- libusb_device_handle *dev_handle, unsigned char endpoint,
- unsigned char *buffer, int length, libusb_transfer_cb_fn callback,
- void *user_data, unsigned int timeout)
-{
- transfer->dev_handle = dev_handle;
- transfer->endpoint = endpoint;
- transfer->type = LIBUSB_TRANSFER_TYPE_BULK;
- transfer->timeout = timeout;
- transfer->buffer = buffer;
- transfer->length = length;
- transfer->user_data = user_data;
- transfer->callback = callback;
-}
-
-/** \ingroup asyncio
- * Helper function to populate the required \ref libusb_transfer fields
- * for an interrupt transfer.
- *
- * \param transfer the transfer to populate
- * \param dev_handle handle of the device that will handle the transfer
- * \param endpoint address of the endpoint where this transfer will be sent
- * \param buffer data buffer
- * \param length length of data buffer
- * \param callback callback function to be invoked on transfer completion
- * \param user_data user data to pass to callback function
- * \param timeout timeout for the transfer in milliseconds
- */
-static inline void libusb_fill_interrupt_transfer(
- struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
- unsigned char endpoint, unsigned char *buffer, int length,
- libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout)
-{
- transfer->dev_handle = dev_handle;
- transfer->endpoint = endpoint;
- transfer->type = LIBUSB_TRANSFER_TYPE_INTERRUPT;
- transfer->timeout = timeout;
- transfer->buffer = buffer;
- transfer->length = length;
- transfer->user_data = user_data;
- transfer->callback = callback;
-}
-
-/** \ingroup asyncio
- * Helper function to populate the required \ref libusb_transfer fields
- * for an isochronous transfer.
- *
- * \param transfer the transfer to populate
- * \param dev_handle handle of the device that will handle the transfer
- * \param endpoint address of the endpoint where this transfer will be sent
- * \param buffer data buffer
- * \param length length of data buffer
- * \param num_iso_packets the number of isochronous packets
- * \param callback callback function to be invoked on transfer completion
- * \param user_data user data to pass to callback function
- * \param timeout timeout for the transfer in milliseconds
- */
-static inline void libusb_fill_iso_transfer(struct libusb_transfer *transfer,
- libusb_device_handle *dev_handle, unsigned char endpoint,
- unsigned char *buffer, int length, int num_iso_packets,
- libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout)
-{
- transfer->dev_handle = dev_handle;
- transfer->endpoint = endpoint;
- transfer->type = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS;
- transfer->timeout = timeout;
- transfer->buffer = buffer;
- transfer->length = length;
- transfer->num_iso_packets = num_iso_packets;
- transfer->user_data = user_data;
- transfer->callback = callback;
-}
-
-/** \ingroup asyncio
- * Convenience function to set the length of all packets in an isochronous
- * transfer, based on the num_iso_packets field in the transfer structure.
- *
- * \param transfer a transfer
- * \param length the length to set in each isochronous packet descriptor
- * \see libusb_get_max_packet_size()
- */
-static inline void libusb_set_iso_packet_lengths(
- struct libusb_transfer *transfer, unsigned int length)
-{
- int i;
- for (i = 0; i < transfer->num_iso_packets; i++)
- transfer->iso_packet_desc[i].length = length;
-}
-
-/** \ingroup asyncio
- * Convenience function to locate the position of an isochronous packet
- * within the buffer of an isochronous transfer.
- *
- * This is a thorough function which loops through all preceding packets,
- * accumulating their lengths to find the position of the specified packet.
- * Typically you will assign equal lengths to each packet in the transfer,
- * and hence the above method is sub-optimal. You may wish to use
- * libusb_get_iso_packet_buffer_simple() instead.
- *
- * \param transfer a transfer
- * \param packet the packet to return the address of
- * \returns the base address of the packet buffer inside the transfer buffer,
- * or NULL if the packet does not exist.
- * \see libusb_get_iso_packet_buffer_simple()
- */
-static inline unsigned char *libusb_get_iso_packet_buffer(
- struct libusb_transfer *transfer, unsigned int packet)
-{
- int i;
- size_t offset = 0;
- int _packet;
-
- /* oops..slight bug in the API. packet is an unsigned int, but we use
- * signed integers almost everywhere else. range-check and convert to
- * signed to avoid compiler warnings. FIXME for libusb-2. */
- if (packet > INT_MAX)
- return NULL;
- _packet = (int) packet;
-
- if (_packet >= transfer->num_iso_packets)
- return NULL;
-
- for (i = 0; i < _packet; i++)
- offset += transfer->iso_packet_desc[i].length;
-
- return transfer->buffer + offset;
-}
-
-/** \ingroup asyncio
- * Convenience function to locate the position of an isochronous packet
- * within the buffer of an isochronous transfer, for transfers where each
- * packet is of identical size.
- *
- * This function relies on the assumption that every packet within the transfer
- * is of identical size to the first packet. Calculating the location of
- * the packet buffer is then just a simple calculation:
- * <tt>buffer + (packet_size * packet)</tt>
- *
- * Do not use this function on transfers other than those that have identical
- * packet lengths for each packet.
- *
- * \param transfer a transfer
- * \param packet the packet to return the address of
- * \returns the base address of the packet buffer inside the transfer buffer,
- * or NULL if the packet does not exist.
- * \see libusb_get_iso_packet_buffer()
- */
-static inline unsigned char *libusb_get_iso_packet_buffer_simple(
- struct libusb_transfer *transfer, unsigned int packet)
-{
- int _packet;
-
- /* oops..slight bug in the API. packet is an unsigned int, but we use
- * signed integers almost everywhere else. range-check and convert to
- * signed to avoid compiler warnings. FIXME for libusb-2. */
- if (packet > INT_MAX)
- return NULL;
- _packet = (int) packet;
-
- if (_packet >= transfer->num_iso_packets)
- return NULL;
-
- return transfer->buffer + ((int) transfer->iso_packet_desc[0].length * _packet);
-}
-
-/* sync I/O */
-
-int LIBUSB_CALL libusb_control_transfer(libusb_device_handle *dev_handle,
- uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex,
- unsigned char *data, uint16_t wLength, unsigned int timeout);
-
-int LIBUSB_CALL libusb_bulk_transfer(libusb_device_handle *dev_handle,
- unsigned char endpoint, unsigned char *data, int length,
- int *actual_length, unsigned int timeout);
-
-int LIBUSB_CALL libusb_interrupt_transfer(libusb_device_handle *dev_handle,
- unsigned char endpoint, unsigned char *data, int length,
- int *actual_length, unsigned int timeout);
-
-/** \ingroup desc
- * Retrieve a descriptor from the default control pipe.
- * This is a convenience function which formulates the appropriate control
- * message to retrieve the descriptor.
- *
- * \param dev a device handle
- * \param desc_type the descriptor type, see \ref libusb_descriptor_type
- * \param desc_index the index of the descriptor to retrieve
- * \param data output buffer for descriptor
- * \param length size of data buffer
- * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
- */
-static inline int libusb_get_descriptor(libusb_device_handle *dev,
- uint8_t desc_type, uint8_t desc_index, unsigned char *data, int length)
-{
- return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN,
- LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t) ((desc_type << 8) | desc_index),
- 0, data, (uint16_t) length, 1000);
-}
-
-/** \ingroup desc
- * Retrieve a descriptor from a device.
- * This is a convenience function which formulates the appropriate control
- * message to retrieve the descriptor. The string returned is Unicode, as
- * detailed in the USB specifications.
- *
- * \param dev a device handle
- * \param desc_index the index of the descriptor to retrieve
- * \param langid the language ID for the string descriptor
- * \param data output buffer for descriptor
- * \param length size of data buffer
- * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
- * \see libusb_get_string_descriptor_ascii()
- */
-static inline int libusb_get_string_descriptor(libusb_device_handle *dev,
- uint8_t desc_index, uint16_t langid, unsigned char *data, int length)
-{
- return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN,
- LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index),
- langid, data, (uint16_t) length, 1000);
-}
-
-int LIBUSB_CALL libusb_get_string_descriptor_ascii(libusb_device_handle *dev,
- uint8_t desc_index, unsigned char *data, int length);
-
-/* polling and timeouts */
-
-int LIBUSB_CALL libusb_try_lock_events(libusb_context *ctx);
-void LIBUSB_CALL libusb_lock_events(libusb_context *ctx);
-void LIBUSB_CALL libusb_unlock_events(libusb_context *ctx);
-int LIBUSB_CALL libusb_event_handling_ok(libusb_context *ctx);
-int LIBUSB_CALL libusb_event_handler_active(libusb_context *ctx);
-void LIBUSB_CALL libusb_lock_event_waiters(libusb_context *ctx);
-void LIBUSB_CALL libusb_unlock_event_waiters(libusb_context *ctx);
-int LIBUSB_CALL libusb_wait_for_event(libusb_context *ctx, struct timeval *tv);
-
-int LIBUSB_CALL libusb_handle_events_timeout(libusb_context *ctx,
- struct timeval *tv);
-int LIBUSB_CALL libusb_handle_events_timeout_completed(libusb_context *ctx,
- struct timeval *tv, int *completed);
-int LIBUSB_CALL libusb_handle_events(libusb_context *ctx);
-int LIBUSB_CALL libusb_handle_events_completed(libusb_context *ctx, int *completed);
-int LIBUSB_CALL libusb_handle_events_locked(libusb_context *ctx,
- struct timeval *tv);
-int LIBUSB_CALL libusb_pollfds_handle_timeouts(libusb_context *ctx);
-int LIBUSB_CALL libusb_get_next_timeout(libusb_context *ctx,
- struct timeval *tv);
-
-/** \ingroup poll
- * File descriptor for polling
- */
-struct libusb_pollfd {
- /** Numeric file descriptor */
- int fd;
-
- /** Event flags to poll for from <poll.h>. POLLIN indicates that you
- * should monitor this file descriptor for becoming ready to read from,
- * and POLLOUT indicates that you should monitor this file descriptor for
- * nonblocking write readiness. */
- short events;
-};
-
-/** \ingroup poll
- * Callback function, invoked when a new file descriptor should be added
- * to the set of file descriptors monitored for events.
- * \param fd the new file descriptor
- * \param events events to monitor for, see \ref libusb_pollfd for a
- * description
- * \param user_data User data pointer specified in
- * libusb_set_pollfd_notifiers() call
- * \see libusb_set_pollfd_notifiers()
- */
-typedef void (LIBUSB_CALL *libusb_pollfd_added_cb)(int fd, short events,
- void *user_data);
-
-/** \ingroup poll
- * Callback function, invoked when a file descriptor should be removed from
- * the set of file descriptors being monitored for events. After returning
- * from this callback, do not use that file descriptor again.
- * \param fd the file descriptor to stop monitoring
- * \param user_data User data pointer specified in
- * libusb_set_pollfd_notifiers() call
- * \see libusb_set_pollfd_notifiers()
- */
-typedef void (LIBUSB_CALL *libusb_pollfd_removed_cb)(int fd, void *user_data);
-
-const struct libusb_pollfd ** LIBUSB_CALL libusb_get_pollfds(
- libusb_context *ctx);
-void LIBUSB_CALL libusb_set_pollfd_notifiers(libusb_context *ctx,
- libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb,
- void *user_data);
-
-/** \ingroup hotplug
- * Callback handle.
- *
- * Callbacks handles are generated by libusb_hotplug_register_callback()
- * and can be used to deregister callbacks. Callback handles are unique
- * per libusb_context and it is safe to call libusb_hotplug_deregister_callback()
- * on an already deregisted callback.
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- *
- * For more information, see \ref hotplug.
- */
-typedef int libusb_hotplug_callback_handle;
-
-/** \ingroup hotplug
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- *
- * Flags for hotplug events */
-typedef enum {
- /** Arm the callback and fire it for all matching currently attached devices. */
- LIBUSB_HOTPLUG_ENUMERATE = 1,
-} libusb_hotplug_flag;
-
-/** \ingroup hotplug
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- *
- * Hotplug events */
-typedef enum {
- /** A device has been plugged in and is ready to use */
- LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED = 0x01,
-
- /** A device has left and is no longer available.
- * It is the user's responsibility to call libusb_close on any handle associated with a disconnected device.
- * It is safe to call libusb_get_device_descriptor on a device that has left */
- LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT = 0x02,
-} libusb_hotplug_event;
-
-/** \ingroup hotplug
- * Wildcard matching for hotplug events */
-#define LIBUSB_HOTPLUG_MATCH_ANY -1
-
-/** \ingroup hotplug
- * Hotplug callback function type. When requesting hotplug event notifications,
- * you pass a pointer to a callback function of this type.
- *
- * This callback may be called by an internal event thread and as such it is
- * recommended the callback do minimal processing before returning.
- *
- * libusbx will call this function later, when a matching event had happened on
- * a matching device. See \ref hotplug for more information.
- *
- * It is safe to call either libusb_hotplug_register_callback() or
- * libusb_hotplug_deregister_callback() from within a callback function.
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- *
- * \param libusb_context context of this notification
- * \param device libusb_device this event occurred on
- * \param event event that occurred
- * \param user_data user data provided when this callback was registered
- * \returns bool whether this callback is finished processing events.
- * returning 1 will cause this callback to be deregistered
- */
-typedef int (LIBUSB_CALL *libusb_hotplug_callback_fn)(libusb_context *ctx,
- libusb_device *device,
- libusb_hotplug_event event,
- void *user_data);
-
-/** \ingroup hotplug
- * Register a hotplug callback function
- *
- * Register a callback with the libusb_context. The callback will fire
- * when a matching event occurs on a matching device. The callback is
- * armed until either it is deregistered with libusb_hotplug_deregister_callback()
- * or the supplied callback returns 1 to indicate it is finished processing events.
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- *
- * \param[in] ctx context to register this callback with
- * \param[in] events bitwise or of events that will trigger this callback. See \ref
- * libusb_hotplug_event
- * \param[in] flags hotplug callback flags. See \ref libusb_hotplug_flag
- * \param[in] vendor_id the vendor id to match or \ref LIBUSB_HOTPLUG_MATCH_ANY
- * \param[in] product_id the product id to match or \ref LIBUSB_HOTPLUG_MATCH_ANY
- * \param[in] dev_class the device class to match or \ref LIBUSB_HOTPLUG_MATCH_ANY
- * \param[in] cb_fn the function to be invoked on a matching event/device
- * \param[in] user_data user data to pass to the callback function
- * \param[out] handle pointer to store the handle of the allocated callback (can be NULL)
- * \returns LIBUSB_SUCCESS on success LIBUSB_ERROR code on failure
- */
-int LIBUSB_CALL libusb_hotplug_register_callback(libusb_context *ctx,
- libusb_hotplug_event events,
- libusb_hotplug_flag flags,
- int vendor_id, int product_id,
- int dev_class,
- libusb_hotplug_callback_fn cb_fn,
- void *user_data,
- libusb_hotplug_callback_handle *handle);
-
-/** \ingroup hotplug
- * Deregisters a hotplug callback.
- *
- * Deregister a callback from a libusb_context. This function is safe to call from within
- * a hotplug callback.
- *
- * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
- *
- * \param[in] ctx context this callback is registered with
- * \param[in] handle the handle of the callback to deregister
- */
-void LIBUSB_CALL libusb_hotplug_deregister_callback(libusb_context *ctx,
- libusb_hotplug_callback_handle handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusbi.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusbi.h
deleted file mode 100644
index 02efae300..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/libusbi.h
+++ /dev/null
@@ -1,1004 +0,0 @@
-/*
- * Internal header for libusbx
- * Copyright © 2007-2009 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LIBUSBI_H
-#define LIBUSBI_H
-
-#include "config.h"
-
-#include <stddef.h>
-#include <stdint.h>
-#include <time.h>
-#include <stdarg.h>
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#endif
-
-#ifdef HAVE_MISSING_H
-#include "missing.h"
-#endif
-#include "libusb.h"
-#include "version.h"
-
-/* Inside the libusbx code, mark all public functions as follows:
- * return_type API_EXPORTED function_name(params) { ... }
- * But if the function returns a pointer, mark it as follows:
- * DEFAULT_VISIBILITY return_type * LIBUSB_CALL function_name(params) { ... }
- * In the libusbx public header, mark all declarations as:
- * return_type LIBUSB_CALL function_name(params);
- */
-#define API_EXPORTED LIBUSB_CALL DEFAULT_VISIBILITY
-
-#define DEVICE_DESC_LENGTH 18
-
-#define USB_MAXENDPOINTS 32
-#define USB_MAXINTERFACES 32
-#define USB_MAXCONFIG 8
-
-/* Backend specific capabilities */
-#define USBI_CAP_HAS_HID_ACCESS 0x00010000
-#define USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER 0x00020000
-
-/* Maximum number of bytes in a log line */
-#define USBI_MAX_LOG_LEN 1024
-/* Terminator for log lines */
-#define USBI_LOG_LINE_END "\n"
-
-/* The following is used to silence warnings for unused variables */
-#define UNUSED(var) do { (void)(var); } while(0)
-
-#if !defined(ARRAYSIZE)
-#define ARRAYSIZE(array) (sizeof(array)/sizeof(array[0]))
-#endif
-
-struct list_head {
- struct list_head *prev, *next;
-};
-
-/* Get an entry from the list
- * ptr - the address of this list_head element in "type"
- * type - the data type that contains "member"
- * member - the list_head element in "type"
- */
-#define list_entry(ptr, type, member) \
- ((type *)((uintptr_t)(ptr) - (uintptr_t)offsetof(type, member)))
-
-/* Get each entry from a list
- * pos - A structure pointer has a "member" element
- * head - list head
- * member - the list_head element in "pos"
- * type - the type of the first parameter
- */
-#define list_for_each_entry(pos, head, member, type) \
- for (pos = list_entry((head)->next, type, member); \
- &pos->member != (head); \
- pos = list_entry(pos->member.next, type, member))
-
-#define list_for_each_entry_safe(pos, n, head, member, type) \
- for (pos = list_entry((head)->next, type, member), \
- n = list_entry(pos->member.next, type, member); \
- &pos->member != (head); \
- pos = n, n = list_entry(n->member.next, type, member))
-
-#define list_empty(entry) ((entry)->next == (entry))
-
-static inline void list_init(struct list_head *entry)
-{
- entry->prev = entry->next = entry;
-}
-
-static inline void list_add(struct list_head *entry, struct list_head *head)
-{
- entry->next = head->next;
- entry->prev = head;
-
- head->next->prev = entry;
- head->next = entry;
-}
-
-static inline void list_add_tail(struct list_head *entry,
- struct list_head *head)
-{
- entry->next = head;
- entry->prev = head->prev;
-
- head->prev->next = entry;
- head->prev = entry;
-}
-
-static inline void list_del(struct list_head *entry)
-{
- entry->next->prev = entry->prev;
- entry->prev->next = entry->next;
- entry->next = entry->prev = NULL;
-}
-
-static inline void *usbi_reallocf(void *ptr, size_t size)
-{
- void *ret = realloc(ptr, size);
- if (!ret)
- free(ptr);
- return ret;
-}
-
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *mptr = (ptr); \
- (type *)( (char *)mptr - offsetof(type,member) );})
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
-#define TIMESPEC_IS_SET(ts) ((ts)->tv_sec != 0 || (ts)->tv_nsec != 0)
-
-void usbi_log(struct libusb_context *ctx, enum libusb_log_level level,
- const char *function, const char *format, ...);
-
-void usbi_log_v(struct libusb_context *ctx, enum libusb_log_level level,
- const char *function, const char *format, va_list args);
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1400
-
-#ifdef ENABLE_LOGGING
-#define _usbi_log(ctx, level, ...) usbi_log(ctx, level, __FUNCTION__, __VA_ARGS__)
-#define usbi_dbg(...) _usbi_log(NULL, LIBUSB_LOG_LEVEL_DEBUG, __VA_ARGS__)
-#else
-#define _usbi_log(ctx, level, ...) do { (void)(ctx); } while(0)
-#define usbi_dbg(...) do {} while(0)
-#endif
-
-#define usbi_info(ctx, ...) _usbi_log(ctx, LIBUSB_LOG_LEVEL_INFO, __VA_ARGS__)
-#define usbi_warn(ctx, ...) _usbi_log(ctx, LIBUSB_LOG_LEVEL_WARNING, __VA_ARGS__)
-#define usbi_err(ctx, ...) _usbi_log(ctx, LIBUSB_LOG_LEVEL_ERROR, __VA_ARGS__)
-
-#else /* !defined(_MSC_VER) || _MSC_VER >= 1400 */
-
-#ifdef ENABLE_LOGGING
-#define LOG_BODY(ctxt, level) \
-{ \
- va_list args; \
- va_start (args, format); \
- usbi_log_v(ctxt, level, "", format, args); \
- va_end(args); \
-}
-#else
-#define LOG_BODY(ctxt, level) do { (void)(ctxt); } while(0)
-#endif
-
-static inline void usbi_info(struct libusb_context *ctx, const char *format,
- ...)
- LOG_BODY(ctx,LIBUSB_LOG_LEVEL_INFO)
-static inline void usbi_warn(struct libusb_context *ctx, const char *format,
- ...)
- LOG_BODY(ctx,LIBUSB_LOG_LEVEL_WARNING)
-static inline void usbi_err( struct libusb_context *ctx, const char *format,
- ...)
- LOG_BODY(ctx,LIBUSB_LOG_LEVEL_ERROR)
-
-static inline void usbi_dbg(const char *format, ...)
- LOG_BODY(NULL,LIBUSB_LOG_LEVEL_DEBUG)
-
-#endif /* !defined(_MSC_VER) || _MSC_VER >= 1400 */
-
-#define USBI_GET_CONTEXT(ctx) if (!(ctx)) (ctx) = usbi_default_context
-#define DEVICE_CTX(dev) ((dev)->ctx)
-#define HANDLE_CTX(handle) (DEVICE_CTX((handle)->dev))
-#define TRANSFER_CTX(transfer) (HANDLE_CTX((transfer)->dev_handle))
-#define ITRANSFER_CTX(transfer) \
- (TRANSFER_CTX(USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer)))
-
-#define IS_EPIN(ep) (0 != ((ep) & LIBUSB_ENDPOINT_IN))
-#define IS_EPOUT(ep) (!IS_EPIN(ep))
-#define IS_XFERIN(xfer) (0 != ((xfer)->endpoint & LIBUSB_ENDPOINT_IN))
-#define IS_XFEROUT(xfer) (!IS_XFERIN(xfer))
-
-/* Internal abstraction for thread synchronization */
-#if defined(THREADS_POSIX)
-#include "os/threads_posix.h"
-#elif defined(OS_WINDOWS) || defined(OS_WINCE)
-#include <os/threads_windows.h>
-#endif
-
-extern struct libusb_context *usbi_default_context;
-
-struct libusb_context {
- int debug;
- int debug_fixed;
-
- /* internal control pipe, used for interrupting event handling when
- * something needs to modify poll fds. */
- int ctrl_pipe[2];
-
- struct list_head usb_devs;
- usbi_mutex_t usb_devs_lock;
-
- /* A list of open handles. Backends are free to traverse this if required.
- */
- struct list_head open_devs;
- usbi_mutex_t open_devs_lock;
-
- /* A list of registered hotplug callbacks */
- struct list_head hotplug_cbs;
- usbi_mutex_t hotplug_cbs_lock;
- int hotplug_pipe[2];
-
- /* this is a list of in-flight transfer handles, sorted by timeout
- * expiration. URBs to timeout the soonest are placed at the beginning of
- * the list, URBs that will time out later are placed after, and urbs with
- * infinite timeout are always placed at the very end. */
- struct list_head flying_transfers;
- usbi_mutex_t flying_transfers_lock;
-
- /* list of poll fds */
- struct list_head pollfds;
- usbi_mutex_t pollfds_lock;
-
- /* a counter that is set when we want to interrupt event handling, in order
- * to modify the poll fd set. and a lock to protect it. */
- unsigned int pollfd_modify;
- usbi_mutex_t pollfd_modify_lock;
-
- /* user callbacks for pollfd changes */
- libusb_pollfd_added_cb fd_added_cb;
- libusb_pollfd_removed_cb fd_removed_cb;
- void *fd_cb_user_data;
-
- /* ensures that only one thread is handling events at any one time */
- usbi_mutex_t events_lock;
-
- /* used to see if there is an active thread doing event handling */
- int event_handler_active;
-
- /* used to wait for event completion in threads other than the one that is
- * event handling */
- usbi_mutex_t event_waiters_lock;
- usbi_cond_t event_waiters_cond;
-
-#ifdef USBI_TIMERFD_AVAILABLE
- /* used for timeout handling, if supported by OS.
- * this timerfd is maintained to trigger on the next pending timeout */
- int timerfd;
-#endif
-
- struct list_head list;
-};
-
-#ifdef USBI_TIMERFD_AVAILABLE
-#define usbi_using_timerfd(ctx) ((ctx)->timerfd >= 0)
-#else
-#define usbi_using_timerfd(ctx) (0)
-#endif
-
-struct libusb_device {
- /* lock protects refcnt, everything else is finalized at initialization
- * time */
- usbi_mutex_t lock;
- int refcnt;
-
- struct libusb_context *ctx;
-
- uint8_t bus_number;
- uint8_t port_number;
- struct libusb_device* parent_dev;
- uint8_t device_address;
- uint8_t num_configurations;
- enum libusb_speed speed;
-
- struct list_head list;
- unsigned long session_data;
-
- struct libusb_device_descriptor device_descriptor;
- int attached;
-
- unsigned char os_priv
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
- [] /* valid C99 code */
-#else
- [0] /* non-standard, but usually working code */
-#endif
- ;
-};
-
-struct libusb_device_handle {
- /* lock protects claimed_interfaces */
- usbi_mutex_t lock;
- unsigned long claimed_interfaces;
-
- struct list_head list;
- struct libusb_device *dev;
- int auto_detach_kernel_driver;
- unsigned char os_priv
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
- [] /* valid C99 code */
-#else
- [0] /* non-standard, but usually working code */
-#endif
- ;
-};
-
-enum {
- USBI_CLOCK_MONOTONIC,
- USBI_CLOCK_REALTIME
-};
-
-/* in-memory transfer layout:
- *
- * 1. struct usbi_transfer
- * 2. struct libusb_transfer (which includes iso packets) [variable size]
- * 3. os private data [variable size]
- *
- * from a libusb_transfer, you can get the usbi_transfer by rewinding the
- * appropriate number of bytes.
- * the usbi_transfer includes the number of allocated packets, so you can
- * determine the size of the transfer and hence the start and length of the
- * OS-private data.
- */
-
-struct usbi_transfer {
- int num_iso_packets;
- struct list_head list;
- struct timeval timeout;
- int transferred;
- uint8_t flags;
-
- /* this lock is held during libusb_submit_transfer() and
- * libusb_cancel_transfer() (allowing the OS backend to prevent duplicate
- * cancellation, submission-during-cancellation, etc). the OS backend
- * should also take this lock in the handle_events path, to prevent the user
- * cancelling the transfer from another thread while you are processing
- * its completion (presumably there would be races within your OS backend
- * if this were possible). */
- usbi_mutex_t lock;
-};
-
-enum usbi_transfer_flags {
- /* The transfer has timed out */
- USBI_TRANSFER_TIMED_OUT = 1 << 0,
-
- /* Set by backend submit_transfer() if the OS handles timeout */
- USBI_TRANSFER_OS_HANDLES_TIMEOUT = 1 << 1,
-
- /* Cancellation was requested via libusb_cancel_transfer() */
- USBI_TRANSFER_CANCELLING = 1 << 2,
-
- /* Operation on the transfer failed because the device disappeared */
- USBI_TRANSFER_DEVICE_DISAPPEARED = 1 << 3,
-
- /* Set by backend submit_transfer() if the fds in use have been updated */
- USBI_TRANSFER_UPDATED_FDS = 1 << 4,
-};
-
-#define USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer) \
- ((struct libusb_transfer *)(((unsigned char *)(transfer)) \
- + sizeof(struct usbi_transfer)))
-#define LIBUSB_TRANSFER_TO_USBI_TRANSFER(transfer) \
- ((struct usbi_transfer *)(((unsigned char *)(transfer)) \
- - sizeof(struct usbi_transfer)))
-
-static inline void *usbi_transfer_get_os_priv(struct usbi_transfer *transfer)
-{
- return ((unsigned char *)transfer) + sizeof(struct usbi_transfer)
- + sizeof(struct libusb_transfer)
- + (transfer->num_iso_packets
- * sizeof(struct libusb_iso_packet_descriptor));
-}
-
-/* bus structures */
-
-/* All standard descriptors have these 2 fields in common */
-struct usb_descriptor_header {
- uint8_t bLength;
- uint8_t bDescriptorType;
-};
-
-/* shared data and functions */
-
-int usbi_io_init(struct libusb_context *ctx);
-void usbi_io_exit(struct libusb_context *ctx);
-
-struct libusb_device *usbi_alloc_device(struct libusb_context *ctx,
- unsigned long session_id);
-struct libusb_device *usbi_get_device_by_session_id(struct libusb_context *ctx,
- unsigned long session_id);
-int usbi_sanitize_device(struct libusb_device *dev);
-void usbi_handle_disconnect(struct libusb_device_handle *handle);
-
-int usbi_handle_transfer_completion(struct usbi_transfer *itransfer,
- enum libusb_transfer_status status);
-int usbi_handle_transfer_cancellation(struct usbi_transfer *transfer);
-
-int usbi_parse_descriptor(const unsigned char *source, const char *descriptor,
- void *dest, int host_endian);
-int usbi_device_cache_descriptor(libusb_device *dev);
-int usbi_get_config_index_by_value(struct libusb_device *dev,
- uint8_t bConfigurationValue, int *idx);
-
-void usbi_connect_device (struct libusb_device *dev);
-void usbi_disconnect_device (struct libusb_device *dev);
-
-/* Internal abstraction for poll (needs struct usbi_transfer on Windows) */
-#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_OPENBSD)
-#include <unistd.h>
-#include "os/poll_posix.h"
-#elif defined(OS_WINDOWS) || defined(OS_WINCE)
-#include "os/poll_windows.h"
-#endif
-
-#if (defined(OS_WINDOWS) || defined(OS_WINCE)) && !defined(__GNUC__)
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-int usbi_gettimeofday(struct timeval *tp, void *tzp);
-#define LIBUSB_GETTIMEOFDAY_WIN32
-#define HAVE_USBI_GETTIMEOFDAY
-#else
-#ifdef HAVE_GETTIMEOFDAY
-#define usbi_gettimeofday(tv, tz) gettimeofday((tv), (tz))
-#define HAVE_USBI_GETTIMEOFDAY
-#endif
-#endif
-
-struct usbi_pollfd {
- /* must come first */
- struct libusb_pollfd pollfd;
-
- struct list_head list;
-};
-
-int usbi_add_pollfd(struct libusb_context *ctx, int fd, short events);
-void usbi_remove_pollfd(struct libusb_context *ctx, int fd);
-void usbi_fd_notification(struct libusb_context *ctx);
-
-/* device discovery */
-
-/* we traverse usbfs without knowing how many devices we are going to find.
- * so we create this discovered_devs model which is similar to a linked-list
- * which grows when required. it can be freed once discovery has completed,
- * eliminating the need for a list node in the libusb_device structure
- * itself. */
-struct discovered_devs {
- size_t len;
- size_t capacity;
- struct libusb_device *devices
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
- [] /* valid C99 code */
-#else
- [0] /* non-standard, but usually working code */
-#endif
- ;
-};
-
-struct discovered_devs *discovered_devs_append(
- struct discovered_devs *discdevs, struct libusb_device *dev);
-
-/* OS abstraction */
-
-/* This is the interface that OS backends need to implement.
- * All fields are mandatory, except ones explicitly noted as optional. */
-struct usbi_os_backend {
- /* A human-readable name for your backend, e.g. "Linux usbfs" */
- const char *name;
-
- /* Binary mask for backend specific capabilities */
- uint32_t caps;
-
- /* Perform initialization of your backend. You might use this function
- * to determine specific capabilities of the system, allocate required
- * data structures for later, etc.
- *
- * This function is called when a libusbx user initializes the library
- * prior to use.
- *
- * Return 0 on success, or a LIBUSB_ERROR code on failure.
- */
- int (*init)(struct libusb_context *ctx);
-
- /* Deinitialization. Optional. This function should destroy anything
- * that was set up by init.
- *
- * This function is called when the user deinitializes the library.
- */
- void (*exit)(void);
-
- /* Enumerate all the USB devices on the system, returning them in a list
- * of discovered devices.
- *
- * Your implementation should enumerate all devices on the system,
- * regardless of whether they have been seen before or not.
- *
- * When you have found a device, compute a session ID for it. The session
- * ID should uniquely represent that particular device for that particular
- * connection session since boot (i.e. if you disconnect and reconnect a
- * device immediately after, it should be assigned a different session ID).
- * If your OS cannot provide a unique session ID as described above,
- * presenting a session ID of (bus_number << 8 | device_address) should
- * be sufficient. Bus numbers and device addresses wrap and get reused,
- * but that is an unlikely case.
- *
- * After computing a session ID for a device, call
- * usbi_get_device_by_session_id(). This function checks if libusbx already
- * knows about the device, and if so, it provides you with a libusb_device
- * structure for it.
- *
- * If usbi_get_device_by_session_id() returns NULL, it is time to allocate
- * a new device structure for the device. Call usbi_alloc_device() to
- * obtain a new libusb_device structure with reference count 1. Populate
- * the bus_number and device_address attributes of the new device, and
- * perform any other internal backend initialization you need to do. At
- * this point, you should be ready to provide device descriptors and so
- * on through the get_*_descriptor functions. Finally, call
- * usbi_sanitize_device() to perform some final sanity checks on the
- * device. Assuming all of the above succeeded, we can now continue.
- * If any of the above failed, remember to unreference the device that
- * was returned by usbi_alloc_device().
- *
- * At this stage we have a populated libusb_device structure (either one
- * that was found earlier, or one that we have just allocated and
- * populated). This can now be added to the discovered devices list
- * using discovered_devs_append(). Note that discovered_devs_append()
- * may reallocate the list, returning a new location for it, and also
- * note that reallocation can fail. Your backend should handle these
- * error conditions appropriately.
- *
- * This function should not generate any bus I/O and should not block.
- * If I/O is required (e.g. reading the active configuration value), it is
- * OK to ignore these suggestions :)
- *
- * This function is executed when the user wishes to retrieve a list
- * of USB devices connected to the system.
- *
- * If the backend has hotplug support, this function is not used!
- *
- * Return 0 on success, or a LIBUSB_ERROR code on failure.
- */
- int (*get_device_list)(struct libusb_context *ctx,
- struct discovered_devs **discdevs);
-
- /* Apps which were written before hotplug support, may listen for
- * hotplug events on their own and call libusb_get_device_list on
- * device addition. In this case libusb_get_device_list will likely
- * return a list without the new device in there, as the hotplug
- * event thread will still be busy enumerating the device, which may
- * take a while, or may not even have seen the event yet.
- *
- * To avoid this libusb_get_device_list will call this optional
- * function for backends with hotplug support before copying
- * ctx->usb_devs to the user. In this function the backend should
- * ensure any pending hotplug events are fully processed before
- * returning.
- *
- * Optional, should be implemented by backends with hotplug support.
- */
- void (*hotplug_poll)(void);
-
- /* Open a device for I/O and other USB operations. The device handle
- * is preallocated for you, you can retrieve the device in question
- * through handle->dev.
- *
- * Your backend should allocate any internal resources required for I/O
- * and other operations so that those operations can happen (hopefully)
- * without hiccup. This is also a good place to inform libusbx that it
- * should monitor certain file descriptors related to this device -
- * see the usbi_add_pollfd() function.
- *
- * This function should not generate any bus I/O and should not block.
- *
- * This function is called when the user attempts to obtain a device
- * handle for a device.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_ACCESS if the user has insufficient permissions
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since
- * discovery
- * - another LIBUSB_ERROR code on other failure
- *
- * Do not worry about freeing the handle on failed open, the upper layers
- * do this for you.
- */
- int (*open)(struct libusb_device_handle *handle);
-
- /* Close a device such that the handle cannot be used again. Your backend
- * should destroy any resources that were allocated in the open path.
- * This may also be a good place to call usbi_remove_pollfd() to inform
- * libusbx of any file descriptors associated with this device that should
- * no longer be monitored.
- *
- * This function is called when the user closes a device handle.
- */
- void (*close)(struct libusb_device_handle *handle);
-
- /* Retrieve the device descriptor from a device.
- *
- * The descriptor should be retrieved from memory, NOT via bus I/O to the
- * device. This means that you may have to cache it in a private structure
- * during get_device_list enumeration. Alternatively, you may be able
- * to retrieve it from a kernel interface (some Linux setups can do this)
- * still without generating bus I/O.
- *
- * This function is expected to write DEVICE_DESC_LENGTH (18) bytes into
- * buffer, which is guaranteed to be big enough.
- *
- * This function is called when sanity-checking a device before adding
- * it to the list of discovered devices, and also when the user requests
- * to read the device descriptor.
- *
- * This function is expected to return the descriptor in bus-endian format
- * (LE). If it returns the multi-byte values in host-endian format,
- * set the host_endian output parameter to "1".
- *
- * Return 0 on success or a LIBUSB_ERROR code on failure.
- */
- int (*get_device_descriptor)(struct libusb_device *device,
- unsigned char *buffer, int *host_endian);
-
- /* Get the ACTIVE configuration descriptor for a device.
- *
- * The descriptor should be retrieved from memory, NOT via bus I/O to the
- * device. This means that you may have to cache it in a private structure
- * during get_device_list enumeration. You may also have to keep track
- * of which configuration is active when the user changes it.
- *
- * This function is expected to write len bytes of data into buffer, which
- * is guaranteed to be big enough. If you can only do a partial write,
- * return an error code.
- *
- * This function is expected to return the descriptor in bus-endian format
- * (LE). If it returns the multi-byte values in host-endian format,
- * set the host_endian output parameter to "1".
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state
- * - another LIBUSB_ERROR code on other failure
- */
- int (*get_active_config_descriptor)(struct libusb_device *device,
- unsigned char *buffer, size_t len, int *host_endian);
-
- /* Get a specific configuration descriptor for a device.
- *
- * The descriptor should be retrieved from memory, NOT via bus I/O to the
- * device. This means that you may have to cache it in a private structure
- * during get_device_list enumeration.
- *
- * The requested descriptor is expressed as a zero-based index (i.e. 0
- * indicates that we are requesting the first descriptor). The index does
- * not (necessarily) equal the bConfigurationValue of the configuration
- * being requested.
- *
- * This function is expected to write len bytes of data into buffer, which
- * is guaranteed to be big enough. If you can only do a partial write,
- * return an error code.
- *
- * This function is expected to return the descriptor in bus-endian format
- * (LE). If it returns the multi-byte values in host-endian format,
- * set the host_endian output parameter to "1".
- *
- * Return 0 on success or a LIBUSB_ERROR code on failure.
- */
- int (*get_config_descriptor)(struct libusb_device *device,
- uint8_t config_index, unsigned char *buffer, size_t len,
- int *host_endian);
-
- /* Like get_config_descriptor but then by bConfigurationValue instead
- * of by index.
- *
- * Optional, if not present the core will call get_config_descriptor
- * for all configs until it finds the desired bConfigurationValue.
- *
- * Returns a pointer to the raw-descriptor in *buffer, this memory
- * is valid as long as device is valid.
- *
- * Returns the length of the returned raw-descriptor on success,
- * or a LIBUSB_ERROR code on failure.
- */
- int (*get_config_descriptor_by_value)(struct libusb_device *device,
- uint8_t bConfigurationValue, unsigned char **buffer,
- int *host_endian);
-
- /* Get the bConfigurationValue for the active configuration for a device.
- * Optional. This should only be implemented if you can retrieve it from
- * cache (don't generate I/O).
- *
- * If you cannot retrieve this from cache, either do not implement this
- * function, or return LIBUSB_ERROR_NOT_SUPPORTED. This will cause
- * libusbx to retrieve the information through a standard control transfer.
- *
- * This function must be non-blocking.
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - LIBUSB_ERROR_NOT_SUPPORTED if the value cannot be retrieved without
- * blocking
- * - another LIBUSB_ERROR code on other failure.
- */
- int (*get_configuration)(struct libusb_device_handle *handle, int *config);
-
- /* Set the active configuration for a device.
- *
- * A configuration value of -1 should put the device in unconfigured state.
- *
- * This function can block.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if the configuration does not exist
- * - LIBUSB_ERROR_BUSY if interfaces are currently claimed (and hence
- * configuration cannot be changed)
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure.
- */
- int (*set_configuration)(struct libusb_device_handle *handle, int config);
-
- /* Claim an interface. When claimed, the application can then perform
- * I/O to an interface's endpoints.
- *
- * This function should not generate any bus I/O and should not block.
- * Interface claiming is a logical operation that simply ensures that
- * no other drivers/applications are using the interface, and after
- * claiming, no other drivers/applicatiosn can use the interface because
- * we now "own" it.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if the interface does not exist
- * - LIBUSB_ERROR_BUSY if the interface is in use by another driver/app
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*claim_interface)(struct libusb_device_handle *handle, int interface_number);
-
- /* Release a previously claimed interface.
- *
- * This function should also generate a SET_INTERFACE control request,
- * resetting the alternate setting of that interface to 0. It's OK for
- * this function to block as a result.
- *
- * You will only ever be asked to release an interface which was
- * successfully claimed earlier.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*release_interface)(struct libusb_device_handle *handle, int interface_number);
-
- /* Set the alternate setting for an interface.
- *
- * You will only ever be asked to set the alternate setting for an
- * interface which was successfully claimed earlier.
- *
- * It's OK for this function to block.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if the alternate setting does not exist
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*set_interface_altsetting)(struct libusb_device_handle *handle,
- int interface_number, int altsetting);
-
- /* Clear a halt/stall condition on an endpoint.
- *
- * It's OK for this function to block.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*clear_halt)(struct libusb_device_handle *handle,
- unsigned char endpoint);
-
- /* Perform a USB port reset to reinitialize a device.
- *
- * If possible, the handle should still be usable after the reset
- * completes, assuming that the device descriptors did not change during
- * reset and all previous interface state can be restored.
- *
- * If something changes, or you cannot easily locate/verify the resetted
- * device, return LIBUSB_ERROR_NOT_FOUND. This prompts the application
- * to close the old handle and re-enumerate the device.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if re-enumeration is required, or if the device
- * has been disconnected since it was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*reset_device)(struct libusb_device_handle *handle);
-
- /* Determine if a kernel driver is active on an interface. Optional.
- *
- * The presence of a kernel driver on an interface indicates that any
- * calls to claim_interface would fail with the LIBUSB_ERROR_BUSY code.
- *
- * Return:
- * - 0 if no driver is active
- * - 1 if a driver is active
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*kernel_driver_active)(struct libusb_device_handle *handle,
- int interface_number);
-
- /* Detach a kernel driver from an interface. Optional.
- *
- * After detaching a kernel driver, the interface should be available
- * for claim.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if no kernel driver was active
- * - LIBUSB_ERROR_INVALID_PARAM if the interface does not exist
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - another LIBUSB_ERROR code on other failure
- */
- int (*detach_kernel_driver)(struct libusb_device_handle *handle,
- int interface_number);
-
- /* Attach a kernel driver to an interface. Optional.
- *
- * Reattach a kernel driver to the device.
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NOT_FOUND if no kernel driver was active
- * - LIBUSB_ERROR_INVALID_PARAM if the interface does not exist
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected since it
- * was opened
- * - LIBUSB_ERROR_BUSY if a program or driver has claimed the interface,
- * preventing reattachment
- * - another LIBUSB_ERROR code on other failure
- */
- int (*attach_kernel_driver)(struct libusb_device_handle *handle,
- int interface_number);
-
- /* Destroy a device. Optional.
- *
- * This function is called when the last reference to a device is
- * destroyed. It should free any resources allocated in the get_device_list
- * path.
- */
- void (*destroy_device)(struct libusb_device *dev);
-
- /* Submit a transfer. Your implementation should take the transfer,
- * morph it into whatever form your platform requires, and submit it
- * asynchronously.
- *
- * This function must not block.
- *
- * This function gets called with the flying_transfers_lock locked!
- *
- * Return:
- * - 0 on success
- * - LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * - another LIBUSB_ERROR code on other failure
- */
- int (*submit_transfer)(struct usbi_transfer *itransfer);
-
- /* Cancel a previously submitted transfer.
- *
- * This function must not block. The transfer cancellation must complete
- * later, resulting in a call to usbi_handle_transfer_cancellation()
- * from the context of handle_events.
- */
- int (*cancel_transfer)(struct usbi_transfer *itransfer);
-
- /* Clear a transfer as if it has completed or cancelled, but do not
- * report any completion/cancellation to the library. You should free
- * all private data from the transfer as if you were just about to report
- * completion or cancellation.
- *
- * This function might seem a bit out of place. It is used when libusbx
- * detects a disconnected device - it calls this function for all pending
- * transfers before reporting completion (with the disconnect code) to
- * the user. Maybe we can improve upon this internal interface in future.
- */
- void (*clear_transfer_priv)(struct usbi_transfer *itransfer);
-
- /* Handle any pending events. This involves monitoring any active
- * transfers and processing their completion or cancellation.
- *
- * The function is passed an array of pollfd structures (size nfds)
- * as a result of the poll() system call. The num_ready parameter
- * indicates the number of file descriptors that have reported events
- * (i.e. the poll() return value). This should be enough information
- * for you to determine which actions need to be taken on the currently
- * active transfers.
- *
- * For any cancelled transfers, call usbi_handle_transfer_cancellation().
- * For completed transfers, call usbi_handle_transfer_completion().
- * For control/bulk/interrupt transfers, populate the "transferred"
- * element of the appropriate usbi_transfer structure before calling the
- * above functions. For isochronous transfers, populate the status and
- * transferred fields of the iso packet descriptors of the transfer.
- *
- * This function should also be able to detect disconnection of the
- * device, reporting that situation with usbi_handle_disconnect().
- *
- * When processing an event related to a transfer, you probably want to
- * take usbi_transfer.lock to prevent races. See the documentation for
- * the usbi_transfer structure.
- *
- * Return 0 on success, or a LIBUSB_ERROR code on failure.
- */
- int (*handle_events)(struct libusb_context *ctx,
- struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready);
-
- /* Get time from specified clock. At least two clocks must be implemented
- by the backend: USBI_CLOCK_REALTIME, and USBI_CLOCK_MONOTONIC.
-
- Description of clocks:
- USBI_CLOCK_REALTIME : clock returns time since system epoch.
- USBI_CLOCK_MONOTONIC: clock returns time since unspecified start
- time (usually boot).
- */
- int (*clock_gettime)(int clkid, struct timespec *tp);
-
-#ifdef USBI_TIMERFD_AVAILABLE
- /* clock ID of the clock that should be used for timerfd */
- clockid_t (*get_timerfd_clockid)(void);
-#endif
-
- /* Number of bytes to reserve for per-device private backend data.
- * This private data area is accessible through the "os_priv" field of
- * struct libusb_device. */
- size_t device_priv_size;
-
- /* Number of bytes to reserve for per-handle private backend data.
- * This private data area is accessible through the "os_priv" field of
- * struct libusb_device. */
- size_t device_handle_priv_size;
-
- /* Number of bytes to reserve for per-transfer private backend data.
- * This private data area is accessible by calling
- * usbi_transfer_get_os_priv() on the appropriate usbi_transfer instance.
- */
- size_t transfer_priv_size;
-
- /* Mumber of additional bytes for os_priv for each iso packet.
- * Can your backend use this? */
- /* FIXME: linux can't use this any more. if other OS's cannot either,
- * then remove this */
- size_t add_iso_packet_size;
-};
-
-extern const struct usbi_os_backend * const usbi_backend;
-
-extern const struct usbi_os_backend linux_usbfs_backend;
-extern const struct usbi_os_backend darwin_backend;
-extern const struct usbi_os_backend openbsd_backend;
-extern const struct usbi_os_backend windows_backend;
-extern const struct usbi_os_backend wince_backend;
-
-extern struct list_head active_contexts_list;
-extern usbi_mutex_static_t active_contexts_lock;
-
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.c
deleted file mode 100644
index a24558cb5..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.c
+++ /dev/null
@@ -1,1903 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode:nil -*- */
-/*
- * darwin backend for libusbx 1.0
- * Copyright © 2008-2013 Nathan Hjelm <hjelmn@users.sourceforge.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include <ctype.h>
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <libkern/OSAtomic.h>
-
-#include <mach/clock.h>
-#include <mach/clock_types.h>
-#include <mach/mach_host.h>
-#include <mach/mach_port.h>
-
-#include <AvailabilityMacros.h>
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- #include <objc/objc-auto.h>
-#endif
-
-#include "darwin_usb.h"
-
-/* async event thread */
-static pthread_mutex_t libusb_darwin_at_mutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t libusb_darwin_at_cond = PTHREAD_COND_INITIALIZER;
-
-static clock_serv_t clock_realtime;
-static clock_serv_t clock_monotonic;
-
-static CFRunLoopRef libusb_darwin_acfl = NULL; /* event cf loop */
-static volatile int32_t initCount = 0;
-
-static usbi_mutex_t darwin_cached_devices_lock = PTHREAD_MUTEX_INITIALIZER;
-static struct list_head darwin_cached_devices = {&darwin_cached_devices, &darwin_cached_devices};
-
-#define DARWIN_CACHED_DEVICE(a) ((struct darwin_cached_device *) (((struct darwin_device_priv *)((a)->os_priv))->dev))
-
-/* async event thread */
-static pthread_t libusb_darwin_at;
-
-static int darwin_get_config_descriptor(struct libusb_device *dev, uint8_t config_index, unsigned char *buffer, size_t len, int *host_endian);
-static int darwin_claim_interface(struct libusb_device_handle *dev_handle, int iface);
-static int darwin_release_interface(struct libusb_device_handle *dev_handle, int iface);
-static int darwin_reset_device(struct libusb_device_handle *dev_handle);
-static void darwin_async_io_callback (void *refcon, IOReturn result, void *arg0);
-
-static int darwin_scan_devices(struct libusb_context *ctx);
-static int process_new_device (struct libusb_context *ctx, io_service_t service);
-
-#if defined(ENABLE_LOGGING)
-static const char *darwin_error_str (int result) {
- switch (result) {
- case kIOReturnSuccess:
- return "no error";
- case kIOReturnNotOpen:
- return "device not opened for exclusive access";
- case kIOReturnNoDevice:
- return "no connection to an IOService";
- case kIOUSBNoAsyncPortErr:
- return "no async port has been opened for interface";
- case kIOReturnExclusiveAccess:
- return "another process has device opened for exclusive access";
- case kIOUSBPipeStalled:
- return "pipe is stalled";
- case kIOReturnError:
- return "could not establish a connection to the Darwin kernel";
- case kIOUSBTransactionTimeout:
- return "transaction timed out";
- case kIOReturnBadArgument:
- return "invalid argument";
- case kIOReturnAborted:
- return "transaction aborted";
- case kIOReturnNotResponding:
- return "device not responding";
- case kIOReturnOverrun:
- return "data overrun";
- case kIOReturnCannotWire:
- return "physical memory can not be wired down";
- case kIOReturnNoResources:
- return "out of resources";
- case kIOUSBHighSpeedSplitError:
- return "high speed split error";
- default:
- return "unknown error";
- }
-}
-#endif
-
-static int darwin_to_libusb (int result) {
- switch (result) {
- case kIOReturnUnderrun:
- case kIOReturnSuccess:
- return LIBUSB_SUCCESS;
- case kIOReturnNotOpen:
- case kIOReturnNoDevice:
- return LIBUSB_ERROR_NO_DEVICE;
- case kIOReturnExclusiveAccess:
- return LIBUSB_ERROR_ACCESS;
- case kIOUSBPipeStalled:
- return LIBUSB_ERROR_PIPE;
- case kIOReturnBadArgument:
- return LIBUSB_ERROR_INVALID_PARAM;
- case kIOUSBTransactionTimeout:
- return LIBUSB_ERROR_TIMEOUT;
- case kIOReturnNotResponding:
- case kIOReturnAborted:
- case kIOReturnError:
- case kIOUSBNoAsyncPortErr:
- default:
- return LIBUSB_ERROR_OTHER;
- }
-}
-
-/* this function must be called with the darwin_cached_devices_lock held */
-static void darwin_deref_cached_device(struct darwin_cached_device *cached_dev) {
- cached_dev->refcount--;
- /* free the device and remove it from the cache */
- if (0 == cached_dev->refcount) {
- list_del(&cached_dev->list);
-
- (*(cached_dev->device))->Release(cached_dev->device);
- free (cached_dev);
- }
-}
-
-static void darwin_ref_cached_device(struct darwin_cached_device *cached_dev) {
- cached_dev->refcount++;
-}
-
-static int ep_to_pipeRef(struct libusb_device_handle *dev_handle, uint8_t ep, uint8_t *pipep, uint8_t *ifcp) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
-
- /* current interface */
- struct darwin_interface *cInterface;
-
- int8_t i, iface;
-
- usbi_dbg ("converting ep address 0x%02x to pipeRef and interface", ep);
-
- for (iface = 0 ; iface < USB_MAXINTERFACES ; iface++) {
- cInterface = &priv->interfaces[iface];
-
- if (dev_handle->claimed_interfaces & (1 << iface)) {
- for (i = 0 ; i < cInterface->num_endpoints ; i++) {
- if (cInterface->endpoint_addrs[i] == ep) {
- *pipep = i + 1;
- *ifcp = iface;
- usbi_dbg ("pipe %d on interface %d matches", *pipep, *ifcp);
- return 0;
- }
- }
- }
- }
-
- /* No pipe found with the correct endpoint address */
- usbi_warn (HANDLE_CTX(dev_handle), "no pipeRef found with endpoint address 0x%02x.", ep);
-
- return -1;
-}
-
-static int usb_setup_device_iterator (io_iterator_t *deviceIterator, UInt32 location) {
- CFMutableDictionaryRef matchingDict = IOServiceMatching(kIOUSBDeviceClassName);
-
- if (!matchingDict)
- return kIOReturnError;
-
- if (location) {
- CFMutableDictionaryRef propertyMatchDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
-
- if (propertyMatchDict) {
- /* there are no unsigned CFNumber types so treat the value as signed. the os seems to do this
- internally (CFNumberType of locationID is 3) */
- CFTypeRef locationCF = CFNumberCreate (NULL, kCFNumberSInt32Type, &location);
-
- CFDictionarySetValue (propertyMatchDict, CFSTR(kUSBDevicePropertyLocationID), locationCF);
- /* release our reference to the CFNumber (CFDictionarySetValue retains it) */
- CFRelease (locationCF);
-
- CFDictionarySetValue (matchingDict, CFSTR(kIOPropertyMatchKey), propertyMatchDict);
- /* release out reference to the CFMutableDictionaryRef (CFDictionarySetValue retains it) */
- CFRelease (propertyMatchDict);
- }
- /* else we can still proceed as long as the caller accounts for the possibility of other devices in the iterator */
- }
-
- return IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, deviceIterator);
-}
-
-static int get_ioregistry_value_number (io_service_t service, CFStringRef property, CFNumberType type, void *p) {
- CFTypeRef cfNumber = IORegistryEntryCreateCFProperty (service, property, kCFAllocatorDefault, 0);
- int ret = 0;
-
- if (cfNumber) {
- if (CFGetTypeID(cfNumber) == CFNumberGetTypeID()) {
- ret = CFNumberGetValue(cfNumber, type, p);
- }
-
- CFRelease (cfNumber);
- }
-
- return ret;
-}
-
-static usb_device_t **darwin_device_from_service (io_service_t service)
-{
- io_cf_plugin_ref_t *plugInInterface = NULL;
- usb_device_t **device;
- kern_return_t result;
- SInt32 score;
-
- result = IOCreatePlugInInterfaceForService(service, kIOUSBDeviceUserClientTypeID,
- kIOCFPlugInInterfaceID, &plugInInterface,
- &score);
-
- if (kIOReturnSuccess != result || !plugInInterface) {
- usbi_dbg ("could not set up plugin for service: %s\n", darwin_error_str (result));
- return NULL;
- }
-
- (void)(*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(DeviceInterfaceID),
- (LPVOID)&device);
- /* Use release instead of IODestroyPlugInInterface to avoid stopping IOServices associated with this device */
- (*plugInInterface)->Release (plugInInterface);
-
- return device;
-}
-
-static void darwin_devices_attached (void *ptr, io_iterator_t add_devices) {
- struct libusb_context *ctx;
- io_service_t service;
-
- usbi_mutex_lock(&active_contexts_lock);
-
- while ((service = IOIteratorNext(add_devices))) {
- /* add this device to each active context's device list */
- list_for_each_entry(ctx, &active_contexts_list, list, struct libusb_context) {
- process_new_device (ctx, service);;
- }
-
- IOObjectRelease(service);
- }
-
- usbi_mutex_unlock(&active_contexts_lock);
-}
-
-static void darwin_devices_detached (void *ptr, io_iterator_t rem_devices) {
- struct libusb_device *dev = NULL;
- struct libusb_context *ctx;
-
- io_service_t device;
- UInt64 session;
- int ret;
-
- while ((device = IOIteratorNext (rem_devices)) != 0) {
- /* get the location from the i/o registry */
- ret = get_ioregistry_value_number (device, CFSTR("sessionID"), kCFNumberSInt64Type, &session);
- IOObjectRelease (device);
- if (!ret)
- continue;
-
- usbi_mutex_lock(&active_contexts_lock);
-
- list_for_each_entry(ctx, &active_contexts_list, list, struct libusb_context) {
- usbi_dbg ("notifying context %p of device disconnect", ctx);
-
- dev = usbi_get_device_by_session_id(ctx, session);
- if (dev) {
- /* signal the core that this device has been disconnected. the core will tear down this device
- when the reference count reaches 0 */
- usbi_disconnect_device(dev);
- }
- }
-
- usbi_mutex_unlock(&active_contexts_lock);
- }
-}
-
-static void darwin_clear_iterator (io_iterator_t iter) {
- io_service_t device;
-
- while ((device = IOIteratorNext (iter)) != 0)
- IOObjectRelease (device);
-}
-
-static void *darwin_event_thread_main (void *arg0) {
- IOReturn kresult;
- struct libusb_context *ctx = (struct libusb_context *)arg0;
- CFRunLoopRef runloop;
-
- /* Set this thread's name, so it can be seen in the debugger
- and crash reports. */
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- pthread_setname_np ("org.libusb.device-hotplug");
-
- /* Tell the Objective-C garbage collector about this thread.
- This is required because, unlike NSThreads, pthreads are
- not automatically registered. Although we don't use
- Objective-C, we use CoreFoundation, which does. */
- objc_registerThreadWithCollector();
-#endif
-
- /* hotplug (device arrival/removal) sources */
- CFRunLoopSourceRef libusb_notification_cfsource;
- io_notification_port_t libusb_notification_port;
- io_iterator_t libusb_rem_device_iterator;
- io_iterator_t libusb_add_device_iterator;
-
- usbi_dbg ("creating hotplug event source");
-
- runloop = CFRunLoopGetCurrent ();
- CFRetain (runloop);
-
- /* add the notification port to the run loop */
- libusb_notification_port = IONotificationPortCreate (kIOMasterPortDefault);
- libusb_notification_cfsource = IONotificationPortGetRunLoopSource (libusb_notification_port);
- CFRunLoopAddSource(runloop, libusb_notification_cfsource, kCFRunLoopDefaultMode);
-
- /* create notifications for removed devices */
- kresult = IOServiceAddMatchingNotification (libusb_notification_port, kIOTerminatedNotification,
- IOServiceMatching(kIOUSBDeviceClassName),
- (IOServiceMatchingCallback)darwin_devices_detached,
- (void *)ctx, &libusb_rem_device_iterator);
-
- if (kresult != kIOReturnSuccess) {
- usbi_err (ctx, "could not add hotplug event source: %s", darwin_error_str (kresult));
-
- pthread_exit (NULL);
- }
-
- /* create notifications for attached devices */
- kresult = IOServiceAddMatchingNotification(libusb_notification_port, kIOFirstMatchNotification,
- IOServiceMatching(kIOUSBDeviceClassName),
- (IOServiceMatchingCallback)darwin_devices_attached,
- (void *)ctx, &libusb_add_device_iterator);
-
- if (kresult != kIOReturnSuccess) {
- usbi_err (ctx, "could not add hotplug event source: %s", darwin_error_str (kresult));
-
- pthread_exit (NULL);
- }
-
- /* arm notifiers */
- darwin_clear_iterator (libusb_rem_device_iterator);
- darwin_clear_iterator (libusb_add_device_iterator);
-
- usbi_dbg ("darwin event thread ready to receive events");
-
- /* signal the main thread that the hotplug runloop has been created. */
- pthread_mutex_lock (&libusb_darwin_at_mutex);
- libusb_darwin_acfl = runloop;
- pthread_cond_signal (&libusb_darwin_at_cond);
- pthread_mutex_unlock (&libusb_darwin_at_mutex);
-
- /* run the runloop */
- CFRunLoopRun();
-
- usbi_dbg ("darwin event thread exiting");
-
- /* remove the notification cfsource */
- CFRunLoopRemoveSource(runloop, libusb_notification_cfsource, kCFRunLoopDefaultMode);
-
- /* delete notification port */
- IONotificationPortDestroy (libusb_notification_port);
-
- /* delete iterators */
- IOObjectRelease (libusb_rem_device_iterator);
- IOObjectRelease (libusb_add_device_iterator);
-
- CFRelease (runloop);
-
- libusb_darwin_acfl = NULL;
-
- pthread_exit (NULL);
-}
-
-static void _darwin_finalize(void) {
- struct darwin_cached_device *dev, *next;
-
- usbi_mutex_lock(&darwin_cached_devices_lock);
- list_for_each_entry_safe(dev, next, &darwin_cached_devices, list, struct darwin_cached_device) {
- darwin_deref_cached_device(dev);
- }
- usbi_mutex_unlock(&darwin_cached_devices_lock);
-}
-
-static int darwin_init(struct libusb_context *ctx) {
- host_name_port_t host_self;
- static int initted = 0;
- int rc;
-
- rc = darwin_scan_devices (ctx);
- if (LIBUSB_SUCCESS != rc) {
- return rc;
- }
-
- if (OSAtomicIncrement32Barrier(&initCount) == 1) {
- /* create the clocks that will be used */
-
- if (!initted) {
- initted = 1;
- atexit(_darwin_finalize);
- }
-
- host_self = mach_host_self();
- host_get_clock_service(host_self, CALENDAR_CLOCK, &clock_realtime);
- host_get_clock_service(host_self, SYSTEM_CLOCK, &clock_monotonic);
- mach_port_deallocate(mach_task_self(), host_self);
-
- pthread_create (&libusb_darwin_at, NULL, darwin_event_thread_main, (void *)ctx);
-
- pthread_mutex_lock (&libusb_darwin_at_mutex);
- while (!libusb_darwin_acfl)
- pthread_cond_wait (&libusb_darwin_at_cond, &libusb_darwin_at_mutex);
- pthread_mutex_unlock (&libusb_darwin_at_mutex);
- }
-
- return rc;
-}
-
-static void darwin_exit (void) {
- if (OSAtomicDecrement32Barrier(&initCount) == 0) {
- mach_port_deallocate(mach_task_self(), clock_realtime);
- mach_port_deallocate(mach_task_self(), clock_monotonic);
-
- /* stop the event runloop and wait for the thread to terminate. */
- CFRunLoopStop (libusb_darwin_acfl);
- pthread_join (libusb_darwin_at, NULL);
- }
-}
-
-static int darwin_get_device_descriptor(struct libusb_device *dev, unsigned char *buffer, int *host_endian) {
- struct darwin_cached_device *priv = DARWIN_CACHED_DEVICE(dev);
-
- /* return cached copy */
- memmove (buffer, &(priv->dev_descriptor), DEVICE_DESC_LENGTH);
-
- *host_endian = 0;
-
- return 0;
-}
-
-static int get_configuration_index (struct libusb_device *dev, int config_value) {
- struct darwin_cached_device *priv = DARWIN_CACHED_DEVICE(dev);
- UInt8 i, numConfig;
- IOUSBConfigurationDescriptorPtr desc;
- IOReturn kresult;
-
- /* is there a simpler way to determine the index? */
- kresult = (*(priv->device))->GetNumberOfConfigurations (priv->device, &numConfig);
- if (kresult != kIOReturnSuccess)
- return darwin_to_libusb (kresult);
-
- for (i = 0 ; i < numConfig ; i++) {
- (*(priv->device))->GetConfigurationDescriptorPtr (priv->device, i, &desc);
-
- if (desc->bConfigurationValue == config_value)
- return i;
- }
-
- /* configuration not found */
- return LIBUSB_ERROR_NOT_FOUND;
-}
-
-static int darwin_get_active_config_descriptor(struct libusb_device *dev, unsigned char *buffer, size_t len, int *host_endian) {
- struct darwin_cached_device *priv = DARWIN_CACHED_DEVICE(dev);
- int config_index;
-
- if (0 == priv->active_config)
- return LIBUSB_ERROR_NOT_FOUND;
-
- config_index = get_configuration_index (dev, priv->active_config);
- if (config_index < 0)
- return config_index;
-
- return darwin_get_config_descriptor (dev, config_index, buffer, len, host_endian);
-}
-
-static int darwin_get_config_descriptor(struct libusb_device *dev, uint8_t config_index, unsigned char *buffer, size_t len, int *host_endian) {
- struct darwin_cached_device *priv = DARWIN_CACHED_DEVICE(dev);
- IOUSBConfigurationDescriptorPtr desc;
- IOReturn kresult;
- int ret;
-
- if (!priv || !priv->device)
- return LIBUSB_ERROR_OTHER;
-
- kresult = (*priv->device)->GetConfigurationDescriptorPtr (priv->device, config_index, &desc);
- if (kresult == kIOReturnSuccess) {
- /* copy descriptor */
- if (libusb_le16_to_cpu(desc->wTotalLength) < len)
- len = libusb_le16_to_cpu(desc->wTotalLength);
-
- memmove (buffer, desc, len);
-
- /* GetConfigurationDescriptorPtr returns the descriptor in USB bus order */
- *host_endian = 0;
- }
-
- ret = darwin_to_libusb (kresult);
- if (ret != LIBUSB_SUCCESS)
- return ret;
-
- return len;
-}
-
-/* check whether the os has configured the device */
-static int darwin_check_configuration (struct libusb_context *ctx, struct darwin_cached_device *dev) {
- usb_device_t **darwin_device = dev->device;
-
- IOUSBConfigurationDescriptorPtr configDesc;
- IOUSBFindInterfaceRequest request;
- kern_return_t kresult;
- io_iterator_t interface_iterator;
- io_service_t firstInterface;
-
- if (dev->dev_descriptor.bNumConfigurations < 1) {
- usbi_err (ctx, "device has no configurations");
- return LIBUSB_ERROR_OTHER; /* no configurations at this speed so we can't use it */
- }
-
- /* find the first configuration */
- kresult = (*darwin_device)->GetConfigurationDescriptorPtr (darwin_device, 0, &configDesc);
- dev->first_config = (kIOReturnSuccess == kresult) ? configDesc->bConfigurationValue : 1;
-
- /* check if the device is already configured. there is probably a better way than iterating over the
- to accomplish this (the trick is we need to avoid a call to GetConfigurations since buggy devices
- might lock up on the device request) */
-
- /* Setup the Interface Request */
- request.bInterfaceClass = kIOUSBFindInterfaceDontCare;
- request.bInterfaceSubClass = kIOUSBFindInterfaceDontCare;
- request.bInterfaceProtocol = kIOUSBFindInterfaceDontCare;
- request.bAlternateSetting = kIOUSBFindInterfaceDontCare;
-
- kresult = (*(darwin_device))->CreateInterfaceIterator(darwin_device, &request, &interface_iterator);
- if (kresult)
- return darwin_to_libusb (kresult);
-
- /* iterate once */
- firstInterface = IOIteratorNext(interface_iterator);
-
- /* done with the interface iterator */
- IOObjectRelease(interface_iterator);
-
- if (firstInterface) {
- IOObjectRelease (firstInterface);
-
- /* device is configured */
- if (dev->dev_descriptor.bNumConfigurations == 1)
- /* to avoid problems with some devices get the configurations value from the configuration descriptor */
- dev->active_config = dev->first_config;
- else
- /* devices with more than one configuration should work with GetConfiguration */
- (*darwin_device)->GetConfiguration (darwin_device, &dev->active_config);
- } else
- /* not configured */
- dev->active_config = 0;
-
- usbi_dbg ("active config: %u, first config: %u", dev->active_config, dev->first_config);
-
- return 0;
-}
-
-static int darwin_request_descriptor (usb_device_t **device, UInt8 desc, UInt8 desc_index, void *buffer, size_t buffer_size) {
- IOUSBDevRequestTO req;
-
- memset (buffer, 0, buffer_size);
-
- /* Set up request for descriptor/ */
- req.bmRequestType = USBmakebmRequestType(kUSBIn, kUSBStandard, kUSBDevice);
- req.bRequest = kUSBRqGetDescriptor;
- req.wValue = desc << 8;
- req.wIndex = desc_index;
- req.wLength = buffer_size;
- req.pData = buffer;
- req.noDataTimeout = 20;
- req.completionTimeout = 100;
-
- return (*device)->DeviceRequestTO (device, &req);
-}
-
-static int darwin_cache_device_descriptor (struct libusb_context *ctx, struct darwin_cached_device *dev) {
- usb_device_t **device = dev->device;
- int retries = 1, delay = 30000;
- int unsuspended = 0, try_unsuspend = 1, try_reconfigure = 1;
- int is_open = 0;
- int ret = 0, ret2;
- UInt8 bDeviceClass;
- UInt16 idProduct, idVendor;
-
- dev->can_enumerate = 0;
-
- (*device)->GetDeviceClass (device, &bDeviceClass);
- (*device)->GetDeviceProduct (device, &idProduct);
- (*device)->GetDeviceVendor (device, &idVendor);
-
- /* According to Apple's documentation the device must be open for DeviceRequest but we may not be able to open some
- * devices and Apple's USB Prober doesn't bother to open the device before issuing a descriptor request. Still,
- * to follow the spec as closely as possible, try opening the device */
- is_open = ((*device)->USBDeviceOpenSeize(device) == kIOReturnSuccess);
-
- do {
- /**** retrieve device descriptor ****/
- ret = darwin_request_descriptor (device, kUSBDeviceDesc, 0, &dev->dev_descriptor, sizeof(dev->dev_descriptor));
-
- if (kIOReturnOverrun == ret && kUSBDeviceDesc == dev->dev_descriptor.bDescriptorType)
- /* received an overrun error but we still received a device descriptor */
- ret = kIOReturnSuccess;
-
- if (kIOUSBVendorIDAppleComputer == idVendor) {
- /* NTH: don't bother retrying or unsuspending Apple devices */
- break;
- }
-
- if (kIOReturnSuccess == ret && (0 == dev->dev_descriptor.bNumConfigurations ||
- 0 == dev->dev_descriptor.bcdUSB)) {
- /* work around for incorrectly configured devices */
- if (try_reconfigure && is_open) {
- usbi_dbg("descriptor appears to be invalid. resetting configuration before trying again...");
-
- /* set the first configuration */
- (*device)->SetConfiguration(device, 1);
-
- /* don't try to reconfigure again */
- try_reconfigure = 0;
- }
-
- ret = kIOUSBPipeStalled;
- }
-
- if (kIOReturnSuccess != ret && is_open && try_unsuspend) {
- /* device may be suspended. unsuspend it and try again */
-#if DeviceVersion >= 320
- UInt32 info = 0;
-
- /* IOUSBFamily 320+ provides a way to detect device suspension but earlier versions do not */
- (void)(*device)->GetUSBDeviceInformation (device, &info);
-
- /* note that the device was suspended */
- if (info & (1 << kUSBInformationDeviceIsSuspendedBit) || 0 == info)
- try_unsuspend = 1;
-#endif
-
- if (try_unsuspend) {
- /* try to unsuspend the device */
- ret2 = (*device)->USBDeviceSuspend (device, 0);
- if (kIOReturnSuccess != ret2) {
- /* prevent log spew from poorly behaving devices. this indicates the
- os actually had trouble communicating with the device */
- usbi_dbg("could not retrieve device descriptor. failed to unsuspend: %s",darwin_error_str(ret2));
- } else
- unsuspended = 1;
-
- try_unsuspend = 0;
- }
- }
-
- if (kIOReturnSuccess != ret) {
- usbi_dbg("kernel responded with code: 0x%08x. sleeping for %d ms before trying again", ret, delay/1000);
- /* sleep for a little while before trying again */
- usleep (delay);
- }
- } while (kIOReturnSuccess != ret && retries--);
-
- if (unsuspended)
- /* resuspend the device */
- (void)(*device)->USBDeviceSuspend (device, 1);
-
- if (is_open)
- (void) (*device)->USBDeviceClose (device);
-
- if (ret != kIOReturnSuccess) {
- /* a debug message was already printed out for this error */
- if (LIBUSB_CLASS_HUB == bDeviceClass)
- usbi_dbg ("could not retrieve device descriptor %.4x:%.4x: %s (%x). skipping device",
- idVendor, idProduct, darwin_error_str (ret), ret);
- else
- usbi_warn (ctx, "could not retrieve device descriptor %.4x:%.4x: %s (%x). skipping device",
- idVendor, idProduct, darwin_error_str (ret), ret);
- return -1;
- }
-
- /* catch buggy hubs (which appear to be virtual). Apple's own USB prober has problems with these devices. */
- if (libusb_le16_to_cpu (dev->dev_descriptor.idProduct) != idProduct) {
- /* not a valid device */
- usbi_warn (ctx, "idProduct from iokit (%04x) does not match idProduct in descriptor (%04x). skipping device",
- idProduct, libusb_le16_to_cpu (dev->dev_descriptor.idProduct));
- return -1;
- }
-
- usbi_dbg ("cached device descriptor:");
- usbi_dbg (" bDescriptorType: 0x%02x", dev->dev_descriptor.bDescriptorType);
- usbi_dbg (" bcdUSB: 0x%04x", dev->dev_descriptor.bcdUSB);
- usbi_dbg (" bDeviceClass: 0x%02x", dev->dev_descriptor.bDeviceClass);
- usbi_dbg (" bDeviceSubClass: 0x%02x", dev->dev_descriptor.bDeviceSubClass);
- usbi_dbg (" bDeviceProtocol: 0x%02x", dev->dev_descriptor.bDeviceProtocol);
- usbi_dbg (" bMaxPacketSize0: 0x%02x", dev->dev_descriptor.bMaxPacketSize0);
- usbi_dbg (" idVendor: 0x%04x", dev->dev_descriptor.idVendor);
- usbi_dbg (" idProduct: 0x%04x", dev->dev_descriptor.idProduct);
- usbi_dbg (" bcdDevice: 0x%04x", dev->dev_descriptor.bcdDevice);
- usbi_dbg (" iManufacturer: 0x%02x", dev->dev_descriptor.iManufacturer);
- usbi_dbg (" iProduct: 0x%02x", dev->dev_descriptor.iProduct);
- usbi_dbg (" iSerialNumber: 0x%02x", dev->dev_descriptor.iSerialNumber);
- usbi_dbg (" bNumConfigurations: 0x%02x", dev->dev_descriptor.bNumConfigurations);
-
- dev->can_enumerate = 1;
-
- return 0;
-}
-
-static int darwin_get_cached_device(struct libusb_context *ctx, io_service_t service,
- struct darwin_cached_device **cached_out) {
- struct darwin_cached_device *new_device;
- UInt64 sessionID, parent_sessionID;
- int ret = LIBUSB_SUCCESS;
- usb_device_t **device;
- io_service_t parent;
- kern_return_t result;
- UInt8 port = 0;
-
- *cached_out = NULL;
-
- /* get some info from the io registry */
- (void) get_ioregistry_value_number (service, CFSTR("sessionID"), kCFNumberSInt64Type, &sessionID);
- (void) get_ioregistry_value_number (service, CFSTR("PortNum"), kCFNumberSInt8Type, &port);
-
- usbi_dbg("finding cached device for sessionID 0x\n" PRIx64, sessionID);
-
- result = IORegistryEntryGetParentEntry (service, kIOUSBPlane, &parent);
-
- if (kIOReturnSuccess == result) {
- (void) get_ioregistry_value_number (parent, CFSTR("sessionID"), kCFNumberSInt64Type, &parent_sessionID);
- IOObjectRelease(parent);
- }
-
- usbi_mutex_lock(&darwin_cached_devices_lock);
- do {
- list_for_each_entry(new_device, &darwin_cached_devices, list, struct darwin_cached_device) {
- usbi_dbg("matching sessionID 0x%x against cached device with sessionID 0x%x", sessionID, new_device->session);
- if (new_device->session == sessionID) {
- usbi_dbg("using cached device for device");
- *cached_out = new_device;
- break;
- }
- }
-
- if (*cached_out)
- break;
-
- usbi_dbg("caching new device with sessionID 0x%x\n", sessionID);
-
- new_device = calloc (1, sizeof (*new_device));
- if (!new_device) {
- ret = LIBUSB_ERROR_NO_MEM;
- break;
- }
-
- device = darwin_device_from_service (service);
- if (!device) {
- ret = LIBUSB_ERROR_NO_DEVICE;
- free (new_device);
- new_device = NULL;
- break;
- }
-
- /* add this device to the cached device list */
- list_add(&new_device->list, &darwin_cached_devices);
-
- (*device)->GetDeviceAddress (device, (USBDeviceAddress *)&new_device->address);
-
- /* keep a reference to this device */
- darwin_ref_cached_device(new_device);
-
- new_device->device = device;
- new_device->session = sessionID;
- (*device)->GetLocationID (device, &new_device->location);
- new_device->port = port;
- new_device->parent_session = parent_sessionID;
-
- /* cache the device descriptor */
- ret = darwin_cache_device_descriptor(ctx, new_device);
- if (ret)
- break;
-
- if (new_device->can_enumerate) {
- snprintf(new_device->sys_path, 20, "%03i-%04x-%04x-%02x-%02x", new_device->address,
- new_device->dev_descriptor.idVendor, new_device->dev_descriptor.idProduct,
- new_device->dev_descriptor.bDeviceClass, new_device->dev_descriptor.bDeviceSubClass);
- }
- } while (0);
-
- usbi_mutex_unlock(&darwin_cached_devices_lock);
-
- /* keep track of devices regardless of if we successfully enumerate them to
- prevent them from being enumerated multiple times */
-
- *cached_out = new_device;
-
- return ret;
-}
-
-static int process_new_device (struct libusb_context *ctx, io_service_t service) {
- struct darwin_device_priv *priv;
- struct libusb_device *dev = NULL;
- struct darwin_cached_device *cached_device;
- UInt8 devSpeed;
- int ret = 0;
-
- do {
- ret = darwin_get_cached_device (ctx, service, &cached_device);
-
- if (ret < 0 || (cached_device && !cached_device->can_enumerate)) {
- return ret;
- }
-
- /* check current active configuration (and cache the first configuration value--
- which may be used by claim_interface) */
- ret = darwin_check_configuration (ctx, cached_device);
- if (ret)
- break;
-
- usbi_dbg ("allocating new device in context %p for with session 0x%08x",
- ctx, cached_device->session);
-
- dev = usbi_alloc_device(ctx, cached_device->session);
- if (!dev) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- priv = (struct darwin_device_priv *)dev->os_priv;
-
- priv->dev = cached_device;
- darwin_ref_cached_device (priv->dev);
-
- if (cached_device->parent_session > 0) {
- dev->parent_dev = usbi_get_device_by_session_id (ctx, cached_device->parent_session);
- } else {
- dev->parent_dev = NULL;
- }
- dev->port_number = cached_device->port;
- dev->bus_number = cached_device->location >> 24;
- dev->device_address = cached_device->address;
-
- /* need to add a reference to the parent device */
- if (dev->parent_dev) {
- libusb_ref_device(dev->parent_dev);
- }
-
- (*(priv->dev->device))->GetDeviceSpeed (priv->dev->device, &devSpeed);
-
- switch (devSpeed) {
- case kUSBDeviceSpeedLow: dev->speed = LIBUSB_SPEED_LOW; break;
- case kUSBDeviceSpeedFull: dev->speed = LIBUSB_SPEED_FULL; break;
- case kUSBDeviceSpeedHigh: dev->speed = LIBUSB_SPEED_HIGH; break;
-#if DeviceVersion >= 500
- case kUSBDeviceSpeedSuper: dev->speed = LIBUSB_SPEED_SUPER; break;
-#endif
- default:
- usbi_warn (ctx, "Got unknown device speed %d", devSpeed);
- }
-
- ret = usbi_sanitize_device (dev);
- if (ret < 0)
- break;
-
- usbi_dbg ("found device with address %d port = %d parent = %p at %p", dev->device_address,
- dev->port_number, (void *) dev->parent_dev, priv->dev->sys_path);
- } while (0);
-
- if (0 == ret) {
- usbi_connect_device (dev);
- } else {
- libusb_unref_device (dev);
- }
-
- return ret;
-}
-
-static int darwin_scan_devices(struct libusb_context *ctx) {
- io_iterator_t deviceIterator;
- io_service_t service;
- kern_return_t kresult;
-
- kresult = usb_setup_device_iterator (&deviceIterator, 0);
- if (kresult != kIOReturnSuccess)
- return darwin_to_libusb (kresult);
-
- while ((service = IOIteratorNext (deviceIterator))) {
- (void) process_new_device (ctx, service);
-
- IOObjectRelease(service);
- }
-
- IOObjectRelease(deviceIterator);
-
- return 0;
-}
-
-static int darwin_open (struct libusb_device_handle *dev_handle) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
- IOReturn kresult;
-
- if (0 == dpriv->open_count) {
- /* try to open the device */
- kresult = (*(dpriv->device))->USBDeviceOpenSeize (dpriv->device);
- if (kresult != kIOReturnSuccess) {
- usbi_warn (HANDLE_CTX (dev_handle), "USBDeviceOpen: %s", darwin_error_str(kresult));
-
- if (kIOReturnExclusiveAccess != kresult) {
- return darwin_to_libusb (kresult);
- }
-
- /* it is possible to perform some actions on a device that is not open so do not return an error */
- priv->is_open = 0;
- } else {
- priv->is_open = 1;
- }
-
- /* create async event source */
- kresult = (*(dpriv->device))->CreateDeviceAsyncEventSource (dpriv->device, &priv->cfSource);
- if (kresult != kIOReturnSuccess) {
- usbi_err (HANDLE_CTX (dev_handle), "CreateDeviceAsyncEventSource: %s", darwin_error_str(kresult));
-
- if (priv->is_open) {
- (*(dpriv->device))->USBDeviceClose (dpriv->device);
- }
-
- priv->is_open = 0;
-
- return darwin_to_libusb (kresult);
- }
-
- CFRetain (libusb_darwin_acfl);
-
- /* add the cfSource to the aync run loop */
- CFRunLoopAddSource(libusb_darwin_acfl, priv->cfSource, kCFRunLoopCommonModes);
- }
-
- /* device opened successfully */
- dpriv->open_count++;
-
- /* create a file descriptor for notifications */
- pipe (priv->fds);
-
- /* set the pipe to be non-blocking */
- fcntl (priv->fds[1], F_SETFD, O_NONBLOCK);
-
- usbi_add_pollfd(HANDLE_CTX(dev_handle), priv->fds[0], POLLIN);
-
- usbi_dbg ("device open for access");
-
- return 0;
-}
-
-static void darwin_close (struct libusb_device_handle *dev_handle) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
- IOReturn kresult;
- int i;
-
- if (dpriv->open_count == 0) {
- /* something is probably very wrong if this is the case */
- usbi_err (HANDLE_CTX (dev_handle), "Close called on a device that was not open!\n");
- return;
- }
-
- dpriv->open_count--;
-
- /* make sure all interfaces are released */
- for (i = 0 ; i < USB_MAXINTERFACES ; i++)
- if (dev_handle->claimed_interfaces & (1 << i))
- libusb_release_interface (dev_handle, i);
-
- if (0 == dpriv->open_count) {
- /* delete the device's async event source */
- if (priv->cfSource) {
- CFRunLoopRemoveSource (libusb_darwin_acfl, priv->cfSource, kCFRunLoopDefaultMode);
- CFRelease (priv->cfSource);
- priv->cfSource = NULL;
- CFRelease (libusb_darwin_acfl);
- }
-
- if (priv->is_open) {
- /* close the device */
- kresult = (*(dpriv->device))->USBDeviceClose(dpriv->device);
- if (kresult) {
- /* Log the fact that we had a problem closing the file, however failing a
- * close isn't really an error, so return success anyway */
- usbi_warn (HANDLE_CTX (dev_handle), "USBDeviceClose: %s", darwin_error_str(kresult));
- }
- }
- }
-
- /* file descriptors are maintained per-instance */
- usbi_remove_pollfd (HANDLE_CTX (dev_handle), priv->fds[0]);
- close (priv->fds[1]);
- close (priv->fds[0]);
-
- priv->fds[0] = priv->fds[1] = -1;
-}
-
-static int darwin_get_configuration(struct libusb_device_handle *dev_handle, int *config) {
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
-
- *config = (int) dpriv->active_config;
-
- return 0;
-}
-
-static int darwin_set_configuration(struct libusb_device_handle *dev_handle, int config) {
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
- IOReturn kresult;
- int i;
-
- /* Setting configuration will invalidate the interface, so we need
- to reclaim it. First, dispose of existing interfaces, if any. */
- for (i = 0 ; i < USB_MAXINTERFACES ; i++)
- if (dev_handle->claimed_interfaces & (1 << i))
- darwin_release_interface (dev_handle, i);
-
- kresult = (*(dpriv->device))->SetConfiguration (dpriv->device, config);
- if (kresult != kIOReturnSuccess)
- return darwin_to_libusb (kresult);
-
- /* Reclaim any interfaces. */
- for (i = 0 ; i < USB_MAXINTERFACES ; i++)
- if (dev_handle->claimed_interfaces & (1 << i))
- darwin_claim_interface (dev_handle, i);
-
- dpriv->active_config = config;
-
- return 0;
-}
-
-static int darwin_get_interface (usb_device_t **darwin_device, uint8_t ifc, io_service_t *usbInterfacep) {
- IOUSBFindInterfaceRequest request;
- kern_return_t kresult;
- io_iterator_t interface_iterator;
- UInt8 bInterfaceNumber;
- int ret;
-
- *usbInterfacep = IO_OBJECT_NULL;
-
- /* Setup the Interface Request */
- request.bInterfaceClass = kIOUSBFindInterfaceDontCare;
- request.bInterfaceSubClass = kIOUSBFindInterfaceDontCare;
- request.bInterfaceProtocol = kIOUSBFindInterfaceDontCare;
- request.bAlternateSetting = kIOUSBFindInterfaceDontCare;
-
- kresult = (*(darwin_device))->CreateInterfaceIterator(darwin_device, &request, &interface_iterator);
- if (kresult)
- return kresult;
-
- while ((*usbInterfacep = IOIteratorNext(interface_iterator))) {
- /* find the interface number */
- ret = get_ioregistry_value_number (*usbInterfacep, CFSTR("bInterfaceNumber"), kCFNumberSInt8Type,
- &bInterfaceNumber);
-
- if (ret && bInterfaceNumber == ifc) {
- break;
- }
-
- (void) IOObjectRelease (*usbInterfacep);
- }
-
- /* done with the interface iterator */
- IOObjectRelease(interface_iterator);
-
- return 0;
-}
-
-static int get_endpoints (struct libusb_device_handle *dev_handle, int iface) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
-
- /* current interface */
- struct darwin_interface *cInterface = &priv->interfaces[iface];
-
- kern_return_t kresult;
-
- u_int8_t numep, direction, number;
- u_int8_t dont_care1, dont_care3;
- u_int16_t dont_care2;
- int i;
-
- usbi_dbg ("building table of endpoints.");
-
- /* retrieve the total number of endpoints on this interface */
- kresult = (*(cInterface->interface))->GetNumEndpoints(cInterface->interface, &numep);
- if (kresult) {
- usbi_err (HANDLE_CTX (dev_handle), "can't get number of endpoints for interface: %s", darwin_error_str(kresult));
- return darwin_to_libusb (kresult);
- }
-
- /* iterate through pipe references */
- for (i = 1 ; i <= numep ; i++) {
- kresult = (*(cInterface->interface))->GetPipeProperties(cInterface->interface, i, &direction, &number, &dont_care1,
- &dont_care2, &dont_care3);
-
- if (kresult != kIOReturnSuccess) {
- usbi_err (HANDLE_CTX (dev_handle), "error getting pipe information for pipe %d: %s", i, darwin_error_str(kresult));
-
- return darwin_to_libusb (kresult);
- }
-
- usbi_dbg ("interface: %i pipe %i: dir: %i number: %i", iface, i, direction, number);
-
- cInterface->endpoint_addrs[i - 1] = ((direction << 7 & LIBUSB_ENDPOINT_DIR_MASK) | (number & LIBUSB_ENDPOINT_ADDRESS_MASK));
- }
-
- cInterface->num_endpoints = numep;
-
- return 0;
-}
-
-static int darwin_claim_interface(struct libusb_device_handle *dev_handle, int iface) {
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
- io_service_t usbInterface = IO_OBJECT_NULL;
- IOReturn kresult;
- IOCFPlugInInterface **plugInInterface = NULL;
- SInt32 score;
-
- /* current interface */
- struct darwin_interface *cInterface = &priv->interfaces[iface];
-
- kresult = darwin_get_interface (dpriv->device, iface, &usbInterface);
- if (kresult != kIOReturnSuccess)
- return darwin_to_libusb (kresult);
-
- /* make sure we have an interface */
- if (!usbInterface && dpriv->first_config != 0) {
- usbi_info (HANDLE_CTX (dev_handle), "no interface found; setting configuration: %d", dpriv->first_config);
-
- /* set the configuration */
- kresult = darwin_set_configuration (dev_handle, dpriv->first_config);
- if (kresult != LIBUSB_SUCCESS) {
- usbi_err (HANDLE_CTX (dev_handle), "could not set configuration");
- return kresult;
- }
-
- kresult = darwin_get_interface (dpriv->device, iface, &usbInterface);
- if (kresult) {
- usbi_err (HANDLE_CTX (dev_handle), "darwin_get_interface: %s", darwin_error_str(kresult));
- return darwin_to_libusb (kresult);
- }
- }
-
- if (!usbInterface) {
- usbi_err (HANDLE_CTX (dev_handle), "interface not found");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- /* get an interface to the device's interface */
- kresult = IOCreatePlugInInterfaceForService (usbInterface, kIOUSBInterfaceUserClientTypeID,
- kIOCFPlugInInterfaceID, &plugInInterface, &score);
-
- /* ignore release error */
- (void)IOObjectRelease (usbInterface);
-
- if (kresult) {
- usbi_err (HANDLE_CTX (dev_handle), "IOCreatePlugInInterfaceForService: %s", darwin_error_str(kresult));
- return darwin_to_libusb (kresult);
- }
-
- if (!plugInInterface) {
- usbi_err (HANDLE_CTX (dev_handle), "plugin interface not found");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- /* Do the actual claim */
- kresult = (*plugInInterface)->QueryInterface(plugInInterface,
- CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID),
- (LPVOID)&cInterface->interface);
- /* We no longer need the intermediate plug-in */
- /* Use release instead of IODestroyPlugInInterface to avoid stopping IOServices associated with this device */
- (*plugInInterface)->Release (plugInInterface);
- if (kresult || !cInterface->interface) {
- usbi_err (HANDLE_CTX (dev_handle), "QueryInterface: %s", darwin_error_str(kresult));
- return darwin_to_libusb (kresult);
- }
-
- /* claim the interface */
- kresult = (*(cInterface->interface))->USBInterfaceOpen(cInterface->interface);
- if (kresult) {
- usbi_err (HANDLE_CTX (dev_handle), "USBInterfaceOpen: %s", darwin_error_str(kresult));
- return darwin_to_libusb (kresult);
- }
-
- /* update list of endpoints */
- kresult = get_endpoints (dev_handle, iface);
- if (kresult) {
- /* this should not happen */
- darwin_release_interface (dev_handle, iface);
- usbi_err (HANDLE_CTX (dev_handle), "could not build endpoint table");
- return kresult;
- }
-
- cInterface->cfSource = NULL;
-
- /* create async event source */
- kresult = (*(cInterface->interface))->CreateInterfaceAsyncEventSource (cInterface->interface, &cInterface->cfSource);
- if (kresult != kIOReturnSuccess) {
- usbi_err (HANDLE_CTX (dev_handle), "could not create async event source");
-
- /* can't continue without an async event source */
- (void)darwin_release_interface (dev_handle, iface);
-
- return darwin_to_libusb (kresult);
- }
-
- /* add the cfSource to the async thread's run loop */
- CFRunLoopAddSource(libusb_darwin_acfl, cInterface->cfSource, kCFRunLoopDefaultMode);
-
- usbi_dbg ("interface opened");
-
- return 0;
-}
-
-static int darwin_release_interface(struct libusb_device_handle *dev_handle, int iface) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
- IOReturn kresult;
-
- /* current interface */
- struct darwin_interface *cInterface = &priv->interfaces[iface];
-
- /* Check to see if an interface is open */
- if (!cInterface->interface)
- return LIBUSB_SUCCESS;
-
- /* clean up endpoint data */
- cInterface->num_endpoints = 0;
-
- /* delete the interface's async event source */
- if (cInterface->cfSource) {
- CFRunLoopRemoveSource (libusb_darwin_acfl, cInterface->cfSource, kCFRunLoopDefaultMode);
- CFRelease (cInterface->cfSource);
- }
-
- kresult = (*(cInterface->interface))->USBInterfaceClose(cInterface->interface);
- if (kresult)
- usbi_warn (HANDLE_CTX (dev_handle), "USBInterfaceClose: %s", darwin_error_str(kresult));
-
- kresult = (*(cInterface->interface))->Release(cInterface->interface);
- if (kresult != kIOReturnSuccess)
- usbi_warn (HANDLE_CTX (dev_handle), "Release: %s", darwin_error_str(kresult));
-
- cInterface->interface = IO_OBJECT_NULL;
-
- return darwin_to_libusb (kresult);
-}
-
-static int darwin_set_interface_altsetting(struct libusb_device_handle *dev_handle, int iface, int altsetting) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
- IOReturn kresult;
-
- /* current interface */
- struct darwin_interface *cInterface = &priv->interfaces[iface];
-
- if (!cInterface->interface)
- return LIBUSB_ERROR_NO_DEVICE;
-
- kresult = (*(cInterface->interface))->SetAlternateInterface (cInterface->interface, altsetting);
- if (kresult != kIOReturnSuccess)
- darwin_reset_device (dev_handle);
-
- /* update list of endpoints */
- kresult = get_endpoints (dev_handle, iface);
- if (kresult) {
- /* this should not happen */
- darwin_release_interface (dev_handle, iface);
- usbi_err (HANDLE_CTX (dev_handle), "could not build endpoint table");
- return kresult;
- }
-
- return darwin_to_libusb (kresult);
-}
-
-static int darwin_clear_halt(struct libusb_device_handle *dev_handle, unsigned char endpoint) {
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)dev_handle->os_priv;
-
- /* current interface */
- struct darwin_interface *cInterface;
- uint8_t pipeRef, iface;
- IOReturn kresult;
-
- /* determine the interface/endpoint to use */
- if (ep_to_pipeRef (dev_handle, endpoint, &pipeRef, &iface) != 0) {
- usbi_err (HANDLE_CTX (dev_handle), "endpoint not found on any open interface");
-
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- cInterface = &priv->interfaces[iface];
-
- /* newer versions of darwin support clearing additional bits on the device's endpoint */
- kresult = (*(cInterface->interface))->ClearPipeStallBothEnds(cInterface->interface, pipeRef);
- if (kresult)
- usbi_warn (HANDLE_CTX (dev_handle), "ClearPipeStall: %s", darwin_error_str (kresult));
-
- return darwin_to_libusb (kresult);
-}
-
-static int darwin_reset_device(struct libusb_device_handle *dev_handle) {
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
- IOUSBDeviceDescriptor descriptor;
- IOUSBConfigurationDescriptorPtr cached_configuration;
- IOUSBConfigurationDescriptor configuration;
- bool reenumerate = false;
- IOReturn kresult;
- int i;
-
- kresult = (*(dpriv->device))->ResetDevice (dpriv->device);
- if (kresult) {
- usbi_err (HANDLE_CTX (dev_handle), "ResetDevice: %s", darwin_error_str (kresult));
- return darwin_to_libusb (kresult);
- }
-
- do {
- usbi_dbg ("darwin/reset_device: checking if device descriptor changed");
-
- /* ignore return code. if we can't get a descriptor it might be worthwhile re-enumerating anway */
- (void) darwin_request_descriptor (dpriv->device, kUSBDeviceDesc, 0, &descriptor, sizeof (descriptor));
-
- /* check if the device descriptor has changed */
- if (0 != memcmp (&dpriv->dev_descriptor, &descriptor, sizeof (descriptor))) {
- reenumerate = true;
- break;
- }
-
- /* check if any configuration descriptor has changed */
- for (i = 0 ; i < descriptor.bNumConfigurations ; ++i) {
- usbi_dbg ("darwin/reset_device: checking if configuration descriptor %d changed", i);
-
- (void) darwin_request_descriptor (dpriv->device, kUSBConfDesc, i, &configuration, sizeof (configuration));
- (*(dpriv->device))->GetConfigurationDescriptorPtr (dpriv->device, i, &cached_configuration);
-
- if (!cached_configuration || 0 != memcmp (cached_configuration, &configuration, sizeof (configuration))) {
- reenumerate = true;
- break;
- }
- }
- } while (0);
-
- if (reenumerate) {
- usbi_dbg ("darwin/reset_device: device requires reenumeration");
- (void) (*(dpriv->device))->USBDeviceReEnumerate (dpriv->device, 0);
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_dbg ("darwin/reset_device: device reset complete");
-
- return LIBUSB_SUCCESS;
-}
-
-static int darwin_kernel_driver_active(struct libusb_device_handle *dev_handle, int interface) {
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(dev_handle->dev);
- io_service_t usbInterface;
- CFTypeRef driver;
- IOReturn kresult;
-
- kresult = darwin_get_interface (dpriv->device, interface, &usbInterface);
- if (kresult) {
- usbi_err (HANDLE_CTX (dev_handle), "darwin_get_interface: %s", darwin_error_str(kresult));
-
- return darwin_to_libusb (kresult);
- }
-
- driver = IORegistryEntryCreateCFProperty (usbInterface, kIOBundleIdentifierKey, kCFAllocatorDefault, 0);
- IOObjectRelease (usbInterface);
-
- if (driver) {
- CFRelease (driver);
-
- return 1;
- }
-
- /* no driver */
- return 0;
-}
-
-/* attaching/detaching kernel drivers is not currently supported (maybe in the future?) */
-static int darwin_attach_kernel_driver (struct libusb_device_handle *dev_handle, int interface) {
- (void)dev_handle;
- (void)interface;
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-static int darwin_detach_kernel_driver (struct libusb_device_handle *dev_handle, int interface) {
- (void)dev_handle;
- (void)interface;
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-static void darwin_destroy_device(struct libusb_device *dev) {
- struct darwin_device_priv *dpriv = (struct darwin_device_priv *) dev->os_priv;
-
- if (dpriv->dev) {
- /* need to hold the lock in case this is the last reference to the device */
- usbi_mutex_lock(&darwin_cached_devices_lock);
- darwin_deref_cached_device (dpriv->dev);
- dpriv->dev = NULL;
- usbi_mutex_unlock(&darwin_cached_devices_lock);
- }
-}
-
-static int submit_bulk_transfer(struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)transfer->dev_handle->os_priv;
-
- IOReturn ret;
- uint8_t transferType;
- /* None of the values below are used in libusbx for bulk transfers */
- uint8_t direction, number, interval, pipeRef, iface;
- uint16_t maxPacketSize;
-
- struct darwin_interface *cInterface;
-
- if (ep_to_pipeRef (transfer->dev_handle, transfer->endpoint, &pipeRef, &iface) != 0) {
- usbi_err (TRANSFER_CTX (transfer), "endpoint not found on any open interface");
-
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- cInterface = &priv->interfaces[iface];
-
- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
- &transferType, &maxPacketSize, &interval);
-
- if (0 != (transfer->length % maxPacketSize)) {
- /* do not need a zero packet */
- transfer->flags &= ~LIBUSB_TRANSFER_ADD_ZERO_PACKET;
- }
-
- /* submit the request */
- /* timeouts are unavailable on interrupt endpoints */
- if (transferType == kUSBInterrupt) {
- if (IS_XFERIN(transfer))
- ret = (*(cInterface->interface))->ReadPipeAsync(cInterface->interface, pipeRef, transfer->buffer,
- transfer->length, darwin_async_io_callback, itransfer);
- else
- ret = (*(cInterface->interface))->WritePipeAsync(cInterface->interface, pipeRef, transfer->buffer,
- transfer->length, darwin_async_io_callback, itransfer);
- } else {
- itransfer->flags |= USBI_TRANSFER_OS_HANDLES_TIMEOUT;
-
- if (IS_XFERIN(transfer))
- ret = (*(cInterface->interface))->ReadPipeAsyncTO(cInterface->interface, pipeRef, transfer->buffer,
- transfer->length, transfer->timeout, transfer->timeout,
- darwin_async_io_callback, (void *)itransfer);
- else
- ret = (*(cInterface->interface))->WritePipeAsyncTO(cInterface->interface, pipeRef, transfer->buffer,
- transfer->length, transfer->timeout, transfer->timeout,
- darwin_async_io_callback, (void *)itransfer);
- }
-
- if (ret)
- usbi_err (TRANSFER_CTX (transfer), "bulk transfer failed (dir = %s): %s (code = 0x%08x)", IS_XFERIN(transfer) ? "In" : "Out",
- darwin_error_str(ret), ret);
-
- return darwin_to_libusb (ret);
-}
-
-static int submit_iso_transfer(struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)transfer->dev_handle->os_priv;
-
- IOReturn kresult;
- uint8_t direction, number, interval, pipeRef, iface, transferType;
- uint16_t maxPacketSize;
- UInt64 frame;
- AbsoluteTime atTime;
- int i;
-
- struct darwin_interface *cInterface;
-
- /* construct an array of IOUSBIsocFrames, reuse the old one if possible */
- if (tpriv->isoc_framelist && tpriv->num_iso_packets != transfer->num_iso_packets) {
- free(tpriv->isoc_framelist);
- tpriv->isoc_framelist = NULL;
- }
-
- if (!tpriv->isoc_framelist) {
- tpriv->num_iso_packets = transfer->num_iso_packets;
- tpriv->isoc_framelist = (IOUSBIsocFrame*) calloc (transfer->num_iso_packets, sizeof(IOUSBIsocFrame));
- if (!tpriv->isoc_framelist)
- return LIBUSB_ERROR_NO_MEM;
- }
-
- /* copy the frame list from the libusbx descriptor (the structures differ only is member order) */
- for (i = 0 ; i < transfer->num_iso_packets ; i++)
- tpriv->isoc_framelist[i].frReqCount = transfer->iso_packet_desc[i].length;
-
- /* determine the interface/endpoint to use */
- if (ep_to_pipeRef (transfer->dev_handle, transfer->endpoint, &pipeRef, &iface) != 0) {
- usbi_err (TRANSFER_CTX (transfer), "endpoint not found on any open interface");
-
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- cInterface = &priv->interfaces[iface];
-
- /* determine the properties of this endpoint and the speed of the device */
- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
- &transferType, &maxPacketSize, &interval);
-
- /* Last but not least we need the bus frame number */
- kresult = (*(cInterface->interface))->GetBusFrameNumber(cInterface->interface, &frame, &atTime);
- if (kresult) {
- usbi_err (TRANSFER_CTX (transfer), "failed to get bus frame number: %d", kresult);
- free(tpriv->isoc_framelist);
- tpriv->isoc_framelist = NULL;
-
- return darwin_to_libusb (kresult);
- }
-
- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
- &transferType, &maxPacketSize, &interval);
-
- /* schedule for a frame a little in the future */
- frame += 4;
-
- if (cInterface->frames[transfer->endpoint] && frame < cInterface->frames[transfer->endpoint])
- frame = cInterface->frames[transfer->endpoint];
-
- /* submit the request */
- if (IS_XFERIN(transfer))
- kresult = (*(cInterface->interface))->ReadIsochPipeAsync(cInterface->interface, pipeRef, transfer->buffer, frame,
- transfer->num_iso_packets, tpriv->isoc_framelist, darwin_async_io_callback,
- itransfer);
- else
- kresult = (*(cInterface->interface))->WriteIsochPipeAsync(cInterface->interface, pipeRef, transfer->buffer, frame,
- transfer->num_iso_packets, tpriv->isoc_framelist, darwin_async_io_callback,
- itransfer);
-
- if (LIBUSB_SPEED_FULL == transfer->dev_handle->dev->speed)
- /* Full speed */
- cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets * (1 << (interval - 1));
- else
- /* High/super speed */
- cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets * (1 << (interval - 1)) / 8;
-
- if (kresult != kIOReturnSuccess) {
- usbi_err (TRANSFER_CTX (transfer), "isochronous transfer failed (dir: %s): %s", IS_XFERIN(transfer) ? "In" : "Out",
- darwin_error_str(kresult));
- free (tpriv->isoc_framelist);
- tpriv->isoc_framelist = NULL;
- }
-
- return darwin_to_libusb (kresult);
-}
-
-static int submit_control_transfer(struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_control_setup *setup = (struct libusb_control_setup *) transfer->buffer;
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(transfer->dev_handle->dev);
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)transfer->dev_handle->os_priv;
- struct darwin_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
-
- IOReturn kresult;
-
- bzero(&tpriv->req, sizeof(tpriv->req));
-
- /* IOUSBDeviceInterface expects the request in cpu endianess */
- tpriv->req.bmRequestType = setup->bmRequestType;
- tpriv->req.bRequest = setup->bRequest;
- /* these values should be in bus order from libusb_fill_control_setup */
- tpriv->req.wValue = OSSwapLittleToHostInt16 (setup->wValue);
- tpriv->req.wIndex = OSSwapLittleToHostInt16 (setup->wIndex);
- tpriv->req.wLength = OSSwapLittleToHostInt16 (setup->wLength);
- /* data is stored after the libusbx control block */
- tpriv->req.pData = transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
- tpriv->req.completionTimeout = transfer->timeout;
- tpriv->req.noDataTimeout = transfer->timeout;
-
- itransfer->flags |= USBI_TRANSFER_OS_HANDLES_TIMEOUT;
-
- /* all transfers in libusb-1.0 are async */
-
- if (transfer->endpoint) {
- struct darwin_interface *cInterface;
- uint8_t pipeRef, iface;
-
- if (ep_to_pipeRef (transfer->dev_handle, transfer->endpoint, &pipeRef, &iface) != 0) {
- usbi_err (TRANSFER_CTX (transfer), "endpoint not found on any open interface");
-
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- cInterface = &priv->interfaces[iface];
-
- kresult = (*(cInterface->interface))->ControlRequestAsyncTO (cInterface->interface, pipeRef, &(tpriv->req), darwin_async_io_callback, itransfer);
- } else
- /* control request on endpoint 0 */
- kresult = (*(dpriv->device))->DeviceRequestAsyncTO(dpriv->device, &(tpriv->req), darwin_async_io_callback, itransfer);
-
- if (kresult != kIOReturnSuccess)
- usbi_err (TRANSFER_CTX (transfer), "control request failed: %s", darwin_error_str(kresult));
-
- return darwin_to_libusb (kresult);
-}
-
-static int darwin_submit_transfer(struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- return submit_control_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- return submit_bulk_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return submit_iso_transfer(itransfer);
- default:
- usbi_err (TRANSFER_CTX(transfer), "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-static int cancel_control_transfer(struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(transfer->dev_handle->dev);
- IOReturn kresult;
-
- usbi_warn (ITRANSFER_CTX (itransfer), "aborting all transactions control pipe");
-
- if (!dpriv->device)
- return LIBUSB_ERROR_NO_DEVICE;
-
- kresult = (*(dpriv->device))->USBDeviceAbortPipeZero (dpriv->device);
-
- return darwin_to_libusb (kresult);
-}
-
-static int darwin_abort_transfers (struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_cached_device *dpriv = DARWIN_CACHED_DEVICE(transfer->dev_handle->dev);
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)transfer->dev_handle->os_priv;
- struct darwin_interface *cInterface;
- uint8_t pipeRef, iface;
- IOReturn kresult;
-
- if (ep_to_pipeRef (transfer->dev_handle, transfer->endpoint, &pipeRef, &iface) != 0) {
- usbi_err (TRANSFER_CTX (transfer), "endpoint not found on any open interface");
-
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- cInterface = &priv->interfaces[iface];
-
- if (!dpriv->device)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_warn (ITRANSFER_CTX (itransfer), "aborting all transactions on interface %d pipe %d", iface, pipeRef);
-
- /* abort transactions */
- (*(cInterface->interface))->AbortPipe (cInterface->interface, pipeRef);
-
- usbi_dbg ("calling clear pipe stall to clear the data toggle bit");
-
- /* newer versions of darwin support clearing additional bits on the device's endpoint */
- kresult = (*(cInterface->interface))->ClearPipeStallBothEnds(cInterface->interface, pipeRef);
-
- return darwin_to_libusb (kresult);
-}
-
-static int darwin_cancel_transfer(struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- return cancel_control_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return darwin_abort_transfers (itransfer);
- default:
- usbi_err (TRANSFER_CTX(transfer), "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-static void darwin_clear_transfer_priv (struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
-
- if (transfer->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS && tpriv->isoc_framelist) {
- free (tpriv->isoc_framelist);
- tpriv->isoc_framelist = NULL;
- }
-}
-
-static void darwin_async_io_callback (void *refcon, IOReturn result, void *arg0) {
- struct usbi_transfer *itransfer = (struct usbi_transfer *)refcon;
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_device_handle_priv *priv = (struct darwin_device_handle_priv *)transfer->dev_handle->os_priv;
- struct darwin_msg_async_io_complete message = {.itransfer = itransfer, .result = result,
- .size = (UInt32) (uintptr_t) arg0};
-
- usbi_dbg ("an async io operation has completed");
-
- /* if requested write a zero packet */
- if (kIOReturnSuccess == result && IS_XFEROUT(transfer) && transfer->flags & LIBUSB_TRANSFER_ADD_ZERO_PACKET) {
- struct darwin_interface *cInterface;
- uint8_t iface, pipeRef;
-
- (void) ep_to_pipeRef (transfer->dev_handle, transfer->endpoint, &pipeRef, &iface);
- cInterface = &priv->interfaces[iface];
-
- (*(cInterface->interface))->WritePipe (cInterface->interface, pipeRef, transfer->buffer, 0);
- }
-
- /* send a completion message to the device's file descriptor */
- write (priv->fds[1], &message, sizeof (message));
-}
-
-static int darwin_transfer_status (struct usbi_transfer *itransfer, kern_return_t result) {
- if (itransfer->flags & USBI_TRANSFER_TIMED_OUT)
- result = kIOUSBTransactionTimeout;
-
- switch (result) {
- case kIOReturnUnderrun:
- case kIOReturnSuccess:
- return LIBUSB_TRANSFER_COMPLETED;
- case kIOReturnAborted:
- return LIBUSB_TRANSFER_CANCELLED;
- case kIOUSBPipeStalled:
- usbi_dbg ("transfer error: pipe is stalled");
- return LIBUSB_TRANSFER_STALL;
- case kIOReturnOverrun:
- usbi_warn (ITRANSFER_CTX (itransfer), "transfer error: data overrun");
- return LIBUSB_TRANSFER_OVERFLOW;
- case kIOUSBTransactionTimeout:
- usbi_warn (ITRANSFER_CTX (itransfer), "transfer error: timed out");
- itransfer->flags |= USBI_TRANSFER_TIMED_OUT;
- return LIBUSB_TRANSFER_TIMED_OUT;
- default:
- usbi_warn (ITRANSFER_CTX (itransfer), "transfer error: %s (value = 0x%08x)", darwin_error_str (result), result);
- return LIBUSB_TRANSFER_ERROR;
- }
-}
-
-static void darwin_handle_callback (struct usbi_transfer *itransfer, kern_return_t result, UInt32 io_size) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct darwin_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- int isIsoc = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS == transfer->type;
- int isBulk = LIBUSB_TRANSFER_TYPE_BULK == transfer->type;
- int isControl = LIBUSB_TRANSFER_TYPE_CONTROL == transfer->type;
- int isInterrupt = LIBUSB_TRANSFER_TYPE_INTERRUPT == transfer->type;
- int i;
-
- if (!isIsoc && !isBulk && !isControl && !isInterrupt) {
- usbi_err (TRANSFER_CTX(transfer), "unknown endpoint type %d", transfer->type);
- return;
- }
-
- usbi_dbg ("handling %s completion with kernel status %d",
- isControl ? "control" : isBulk ? "bulk" : isIsoc ? "isoc" : "interrupt", result);
-
- if (kIOReturnSuccess == result || kIOReturnUnderrun == result) {
- if (isIsoc && tpriv->isoc_framelist) {
- /* copy isochronous results back */
-
- for (i = 0; i < transfer->num_iso_packets ; i++) {
- struct libusb_iso_packet_descriptor *lib_desc = &transfer->iso_packet_desc[i];
- lib_desc->status = darwin_to_libusb (tpriv->isoc_framelist[i].frStatus);
- lib_desc->actual_length = tpriv->isoc_framelist[i].frActCount;
- }
- } else if (!isIsoc)
- itransfer->transferred += io_size;
- }
-
- /* it is ok to handle cancelled transfers without calling usbi_handle_transfer_cancellation (we catch timeout transfers) */
- usbi_handle_transfer_completion (itransfer, darwin_transfer_status (itransfer, result));
-}
-
-static int op_handle_events(struct libusb_context *ctx, struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready) {
- struct darwin_msg_async_io_complete message;
- POLL_NFDS_TYPE i = 0;
- ssize_t ret;
-
- usbi_mutex_lock(&ctx->open_devs_lock);
-
- for (i = 0; i < nfds && num_ready > 0; i++) {
- struct pollfd *pollfd = &fds[i];
-
- usbi_dbg ("checking fd %i with revents = %x", pollfd->fd, pollfd->revents);
-
- if (!pollfd->revents)
- continue;
-
- num_ready--;
-
- if (pollfd->revents & POLLERR) {
- /* this probably will never happen so ignore the error an move on. */
- continue;
- }
-
- /* there is only one type of message */
- ret = read (pollfd->fd, &message, sizeof (message));
- if (ret < (ssize_t) sizeof (message)) {
- usbi_dbg ("WARNING: short read on async io completion pipe\n");
- continue;
- }
-
- darwin_handle_callback (message.itransfer, message.result, message.size);
- }
-
- usbi_mutex_unlock(&ctx->open_devs_lock);
-
- return 0;
-}
-
-static int darwin_clock_gettime(int clk_id, struct timespec *tp) {
- mach_timespec_t sys_time;
- clock_serv_t clock_ref;
-
- switch (clk_id) {
- case USBI_CLOCK_REALTIME:
- /* CLOCK_REALTIME represents time since the epoch */
- clock_ref = clock_realtime;
- break;
- case USBI_CLOCK_MONOTONIC:
- /* use system boot time as reference for the monotonic clock */
- clock_ref = clock_monotonic;
- break;
- default:
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- clock_get_time (clock_ref, &sys_time);
-
- tp->tv_sec = sys_time.tv_sec;
- tp->tv_nsec = sys_time.tv_nsec;
-
- return 0;
-}
-
-const struct usbi_os_backend darwin_backend = {
- .name = "Darwin",
- .caps = 0,
- .init = darwin_init,
- .exit = darwin_exit,
- .get_device_list = NULL, /* not needed */
- .get_device_descriptor = darwin_get_device_descriptor,
- .get_active_config_descriptor = darwin_get_active_config_descriptor,
- .get_config_descriptor = darwin_get_config_descriptor,
-
- .open = darwin_open,
- .close = darwin_close,
- .get_configuration = darwin_get_configuration,
- .set_configuration = darwin_set_configuration,
- .claim_interface = darwin_claim_interface,
- .release_interface = darwin_release_interface,
-
- .set_interface_altsetting = darwin_set_interface_altsetting,
- .clear_halt = darwin_clear_halt,
- .reset_device = darwin_reset_device,
-
- .kernel_driver_active = darwin_kernel_driver_active,
- .detach_kernel_driver = darwin_detach_kernel_driver,
- .attach_kernel_driver = darwin_attach_kernel_driver,
-
- .destroy_device = darwin_destroy_device,
-
- .submit_transfer = darwin_submit_transfer,
- .cancel_transfer = darwin_cancel_transfer,
- .clear_transfer_priv = darwin_clear_transfer_priv,
-
- .handle_events = op_handle_events,
-
- .clock_gettime = darwin_clock_gettime,
-
- .device_priv_size = sizeof(struct darwin_device_priv),
- .device_handle_priv_size = sizeof(struct darwin_device_handle_priv),
- .transfer_priv_size = sizeof(struct darwin_transfer_priv),
- .add_iso_packet_size = 0,
-};
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.h
deleted file mode 100644
index 53b8542b1..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/darwin_usb.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * darwin backend for libusbx 1.0
- * Copyright © 2008-2013 Nathan Hjelm <hjelmn@users.sourceforge.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined(LIBUSB_DARWIN_H)
-#define LIBUSB_DARWIN_H
-
-#include "libusbi.h"
-
-#include <IOKit/IOTypes.h>
-#include <IOKit/IOCFBundle.h>
-#include <IOKit/usb/IOUSBLib.h>
-#include <IOKit/IOCFPlugIn.h>
-
-/* IOUSBInterfaceInferface */
-#if defined (kIOUSBInterfaceInterfaceID550)
-
-#define usb_interface_t IOUSBInterfaceInterface550
-#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID550
-#define InterfaceVersion 550
-
-#elif defined (kIOUSBInterfaceInterfaceID500)
-
-#define usb_interface_t IOUSBInterfaceInterface500
-#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID500
-#define InterfaceVersion 500
-
-#elif defined (kIOUSBInterfaceInterfaceID300)
-
-#define usb_interface_t IOUSBInterfaceInterface300
-#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID300
-#define InterfaceVersion 300
-
-#elif defined (kIOUSBInterfaceInterfaceID245)
-
-#define usb_interface_t IOUSBInterfaceInterface245
-#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID245
-#define InterfaceVersion 245
-
-#elif defined (kIOUSBInterfaceInterfaceID220)
-
-#define usb_interface_t IOUSBInterfaceInterface220
-#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID220
-#define InterfaceVersion 220
-
-#else
-
-#error "IOUSBFamily is too old. Please upgrade your OS"
-
-#endif
-
-/* IOUSBDeviceInterface */
-#if defined (kIOUSBDeviceInterfaceID500)
-
-#define usb_device_t IOUSBDeviceInterface500
-#define DeviceInterfaceID kIOUSBDeviceInterfaceID500
-#define DeviceVersion 500
-
-#elif defined (kIOUSBDeviceInterfaceID320)
-
-#define usb_device_t IOUSBDeviceInterface320
-#define DeviceInterfaceID kIOUSBDeviceInterfaceID320
-#define DeviceVersion 320
-
-#elif defined (kIOUSBDeviceInterfaceID300)
-
-#define usb_device_t IOUSBDeviceInterface300
-#define DeviceInterfaceID kIOUSBDeviceInterfaceID300
-#define DeviceVersion 300
-
-#elif defined (kIOUSBDeviceInterfaceID245)
-
-#define usb_device_t IOUSBDeviceInterface245
-#define DeviceInterfaceID kIOUSBDeviceInterfaceID245
-#define DeviceVersion 245
-
-#elif defined (kIOUSBDeviceInterfaceID220)
-#define usb_device_t IOUSBDeviceInterface197
-#define DeviceInterfaceID kIOUSBDeviceInterfaceID197
-#define DeviceVersion 197
-
-#else
-
-#error "IOUSBFamily is too old. Please upgrade your OS"
-
-#endif
-
-#if !defined(IO_OBJECT_NULL)
-#define IO_OBJECT_NULL ((io_object_t) 0)
-#endif
-
-typedef IOCFPlugInInterface *io_cf_plugin_ref_t;
-typedef IONotificationPortRef io_notification_port_t;
-
-/* private structures */
-struct darwin_cached_device {
- struct list_head list;
- IOUSBDeviceDescriptor dev_descriptor;
- UInt32 location;
- UInt64 parent_session;
- UInt64 session;
- UInt16 address;
- char sys_path[21];
- usb_device_t **device;
- int open_count;
- UInt8 first_config, active_config, port;
- int can_enumerate;
- int refcount;
-};
-
-struct darwin_device_priv {
- struct darwin_cached_device *dev;
-};
-
-struct darwin_device_handle_priv {
- int is_open;
- CFRunLoopSourceRef cfSource;
- int fds[2];
-
- struct darwin_interface {
- usb_interface_t **interface;
- uint8_t num_endpoints;
- CFRunLoopSourceRef cfSource;
- uint64_t frames[256];
- uint8_t endpoint_addrs[USB_MAXENDPOINTS];
- } interfaces[USB_MAXINTERFACES];
-};
-
-struct darwin_transfer_priv {
- /* Isoc */
- IOUSBIsocFrame *isoc_framelist;
- int num_iso_packets;
-
- /* Control */
- IOUSBDevRequestTO req;
-
- /* Bulk */
-};
-
-/* structure for signaling io completion */
-struct darwin_msg_async_io_complete {
- struct usbi_transfer *itransfer;
- IOReturn result;
- UInt32 size;
-};
-
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_netlink.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_netlink.c
deleted file mode 100644
index 3a68f69d9..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_netlink.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/* -*- Mode: C; c-basic-offset:8 ; indent-tabs-mode:t -*- */
-/*
- * Linux usbfs backend for libusb
- * Copyright (C) 2007-2009 Daniel Drake <dsd@gentoo.org>
- * Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com>
- * Copyright (c) 2013 Nathan Hjelm <hjelmn@mac.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-
-#include "libusb.h"
-#include "libusbi.h"
-#include "linux_usbfs.h"
-
-#include <linux/netlink.h>
-#include <linux/filter.h>
-
-#define KERNEL 1
-
-static int linux_netlink_socket = -1;
-static pthread_t libusb_linux_event_thread;
-
-static void *linux_netlink_event_thread_main(void *arg);
-
-struct sockaddr_nl snl = { .nl_family=AF_NETLINK, .nl_groups=KERNEL };
-
-int linux_netlink_start_event_monitor(void)
-{
- int ret;
-
- snl.nl_groups = KERNEL;
-
- linux_netlink_socket = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_KOBJECT_UEVENT);
- if (-1 == linux_netlink_socket) {
- return LIBUSB_ERROR_OTHER;
- }
-
- ret = bind(linux_netlink_socket, (struct sockaddr *) &snl, sizeof(snl));
- if (0 != ret) {
- return LIBUSB_ERROR_OTHER;
- }
-
- /* TODO -- add authentication */
- /* setsockopt(linux_netlink_socket, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)); */
-
- ret = pthread_create(&libusb_linux_event_thread, NULL, linux_netlink_event_thread_main, NULL);
- if (0 != ret) {
- return LIBUSB_ERROR_OTHER;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-int linux_netlink_stop_event_monitor(void)
-{
- int r;
-
- if (-1 == linux_netlink_socket) {
- /* already closed. nothing to do */
- return LIBUSB_SUCCESS;
- }
-
- r = close(linux_netlink_socket);
- if (0 > r) {
- usbi_err(NULL, "error closing netlink socket. %s", strerror(errno));
- return LIBUSB_ERROR_OTHER;
- }
-
- pthread_cancel(libusb_linux_event_thread);
-
- linux_netlink_socket = -1;
-
- return LIBUSB_SUCCESS;
-}
-
-static const char *netlink_message_parse (const char *buffer, size_t len, const char *key)
-{
- size_t keylen = strlen(key);
- size_t offset;
-
- for (offset = 0 ; offset < len && '\0' != buffer[offset] ; offset += strlen(buffer + offset) + 1) {
- if (0 == strncmp(buffer + offset, key, keylen) &&
- '=' == buffer[offset + keylen]) {
- return buffer + offset + keylen + 1;
- }
- }
-
- return NULL;
-}
-
-/* parse parts of netlink message common to both libudev and the kernel */
-static int linux_netlink_parse(char *buffer, size_t len, int *detached, const char **sys_name,
- uint8_t *busnum, uint8_t *devaddr) {
- const char *tmp;
- int i;
-
- errno = 0;
-
- *sys_name = NULL;
- *detached = 0;
- *busnum = 0;
- *devaddr = 0;
-
- tmp = netlink_message_parse((const char *) buffer, len, "ACTION");
- if (tmp == NULL)
- return -1;
- if (0 == strcmp(tmp, "remove")) {
- *detached = 1;
- } else if (0 != strcmp(tmp, "add")) {
- usbi_dbg("unknown device action %s", tmp);
- return -1;
- }
-
- /* check that this is a usb message */
- tmp = netlink_message_parse(buffer, len, "SUBSYSTEM");
- if (NULL == tmp || 0 != strcmp(tmp, "usb")) {
- /* not usb. ignore */
- return -1;
- }
-
- tmp = netlink_message_parse(buffer, len, "BUSNUM");
- if (NULL == tmp) {
- /* no bus number (likely a usb interface). ignore*/
- return -1;
- }
-
- *busnum = (uint8_t)(strtoul(tmp, NULL, 10) & 0xff);
- if (errno) {
- errno = 0;
- return -1;
- }
-
- tmp = netlink_message_parse(buffer, len, "DEVNUM");
- if (NULL == tmp) {
- return -1;
- }
-
- *devaddr = (uint8_t)(strtoul(tmp, NULL, 10) & 0xff);
- if (errno) {
- errno = 0;
- return -1;
- }
-
- tmp = netlink_message_parse(buffer, len, "DEVPATH");
- if (NULL == tmp) {
- return -1;
- }
-
- for (i = strlen(tmp) - 1 ; i ; --i) {
- if ('/' ==tmp[i]) {
- *sys_name = tmp + i + 1;
- break;
- }
- }
-
- /* found a usb device */
- return 0;
-}
-
-static int linux_netlink_read_message(void)
-{
- unsigned char buffer[1024];
- struct iovec iov = {.iov_base = buffer, .iov_len = sizeof(buffer)};
- struct msghdr meh = { .msg_iov=&iov, .msg_iovlen=1,
- .msg_name=&snl, .msg_namelen=sizeof(snl) };
- const char *sys_name = NULL;
- uint8_t busnum, devaddr;
- int detached, r;
- size_t len;
-
- /* read netlink message */
- memset(buffer, 0, sizeof(buffer));
- len = recvmsg(linux_netlink_socket, &meh, 0);
- if (len < 32) {
- if (errno != EAGAIN)
- usbi_dbg("error recieving message from netlink");
- return -1;
- }
-
- /* TODO -- authenticate this message is from the kernel or udevd */
-
- r = linux_netlink_parse(buffer, len, &detached, &sys_name,
- &busnum, &devaddr);
- if (r)
- return r;
-
- usbi_dbg("netlink hotplug found device busnum: %hhu, devaddr: %hhu, sys_name: %s, removed: %s",
- busnum, devaddr, sys_name, detached ? "yes" : "no");
-
- /* signal device is available (or not) to all contexts */
- if (detached)
- linux_hotplug_disconnected(busnum, devaddr, sys_name);
- else
- linux_hotplug_enumerate(busnum, devaddr, sys_name);
-
- return 0;
-}
-
-static void *linux_netlink_event_thread_main(void *arg)
-{
- struct pollfd fds = {.fd = linux_netlink_socket,
- .events = POLLIN};
-
- /* silence compiler warning */
- (void) arg;
-
- while (1 == poll(&fds, 1, -1)) {
- if (POLLIN != fds.revents) {
- break;
- }
-
- usbi_mutex_static_lock(&linux_hotplug_lock);
- linux_netlink_read_message();
- usbi_mutex_static_unlock(&linux_hotplug_lock);
- }
-
- return NULL;
-}
-
-void linux_netlink_hotplug_poll(void)
-{
- int r;
-
- usbi_mutex_static_lock(&linux_hotplug_lock);
- do {
- r = linux_netlink_read_message();
- } while (r == 0);
- usbi_mutex_static_unlock(&linux_hotplug_lock);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_udev.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_udev.c
deleted file mode 100644
index 5a2aadfd4..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_udev.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- Mode: C; c-basic-offset:8 ; indent-tabs-mode:t -*- */
-/*
- * Linux usbfs backend for libusb
- * Copyright (C) 2007-2009 Daniel Drake <dsd@gentoo.org>
- * Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com>
- * Copyright (c) 2012-2013 Nathan Hjelm <hjelmn@mac.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#include <assert.h>
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <libudev.h>
-
-#include "libusb.h"
-#include "libusbi.h"
-#include "linux_usbfs.h"
-
-/* udev context */
-static struct udev *udev_ctx = NULL;
-static int udev_monitor_fd = -1;
-static struct udev_monitor *udev_monitor = NULL;
-static pthread_t linux_event_thread;
-
-static void udev_hotplug_event(struct udev_device* udev_dev);
-static void *linux_udev_event_thread_main(void *arg);
-
-int linux_udev_start_event_monitor(void)
-{
- int r;
-
- assert(udev_ctx == NULL);
- udev_ctx = udev_new();
- if (!udev_ctx) {
- usbi_err(NULL, "could not create udev context");
- return LIBUSB_ERROR_OTHER;
- }
-
- udev_monitor = udev_monitor_new_from_netlink(udev_ctx, "udev");
- if (!udev_monitor) {
- usbi_err(NULL, "could not initialize udev monitor");
- goto err_free_ctx;
- }
-
- r = udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "usb", 0);
- if (r) {
- usbi_err(NULL, "could not initialize udev monitor filter for \"usb\" subsystem");
- goto err_free_monitor;
- }
-
- if (udev_monitor_enable_receiving(udev_monitor)) {
- usbi_err(NULL, "failed to enable the udev monitor");
- goto err_free_monitor;
- }
-
- udev_monitor_fd = udev_monitor_get_fd(udev_monitor);
-
- /* Some older versions of udev are not non-blocking by default,
- * so make sure this is set */
- r = fcntl(udev_monitor_fd, F_GETFL);
- if (r == -1) {
- usbi_err(NULL, "getting udev monitor fd flags (%d)", errno);
- goto err_free_monitor;
- }
- r = fcntl(udev_monitor_fd, F_SETFL, r | O_NONBLOCK);
- if (r) {
- usbi_err(NULL, "setting udev monitor fd flags (%d)", errno);
- goto err_free_monitor;
- }
-
- r = pthread_create(&linux_event_thread, NULL, linux_udev_event_thread_main, NULL);
- if (r) {
- usbi_err(NULL, "creating hotplug event thread (%d)", r);
- goto err_free_monitor;
- }
-
- return LIBUSB_SUCCESS;
-
-err_free_monitor:
- udev_monitor_unref(udev_monitor);
- udev_monitor = NULL;
- udev_monitor_fd = -1;
-err_free_ctx:
- udev_unref(udev_ctx);
- udev_ctx = NULL;
- return LIBUSB_ERROR_OTHER;
-}
-
-int linux_udev_stop_event_monitor(void)
-{
- assert(udev_ctx != NULL);
- assert(udev_monitor != NULL);
- assert(udev_monitor_fd != -1);
-
- /* Cancel the event thread. This is the only way to guarantee the
- thread exits since closing the monitor fd won't necessarily cause
- poll to return. */
- pthread_cancel(linux_event_thread);
- pthread_join(linux_event_thread, NULL);
-
- /* Release the udev monitor */
- udev_monitor_unref(udev_monitor);
- udev_monitor = NULL;
- udev_monitor_fd = -1;
-
- /* Clean up the udev context */
- udev_unref(udev_ctx);
- udev_ctx = NULL;
-
- return LIBUSB_SUCCESS;
-}
-
-static void *linux_udev_event_thread_main(void *arg)
-{
- struct udev_device* udev_dev;
- struct pollfd fds = {.fd = udev_monitor_fd,
- .events = POLLIN};
-
- usbi_dbg("udev event thread entering.");
-
- while (1 == poll(&fds, 1, -1)) {
- if (NULL == udev_monitor || POLLIN != fds.revents) {
- break;
- }
-
- usbi_mutex_static_lock(&linux_hotplug_lock);
- udev_dev = udev_monitor_receive_device(udev_monitor);
- if (udev_dev)
- udev_hotplug_event(udev_dev);
- usbi_mutex_static_unlock(&linux_hotplug_lock);
- }
-
- usbi_dbg("udev event thread exiting");
-
- return NULL;
-}
-
-static int udev_device_info(struct libusb_context *ctx, int detached,
- struct udev_device *udev_dev, uint8_t *busnum,
- uint8_t *devaddr, const char **sys_name) {
- const char *dev_node;
-
- dev_node = udev_device_get_devnode(udev_dev);
- if (!dev_node) {
- return LIBUSB_ERROR_OTHER;
- }
-
- *sys_name = udev_device_get_sysname(udev_dev);
- if (!*sys_name) {
- return LIBUSB_ERROR_OTHER;
- }
-
- return linux_get_device_address(ctx, detached, busnum, devaddr,
- dev_node, *sys_name);
-}
-
-static void udev_hotplug_event(struct udev_device* udev_dev)
-{
- const char* udev_action;
- const char* sys_name = NULL;
- uint8_t busnum = 0, devaddr = 0;
- int detached;
- int r;
-
- do {
- udev_action = udev_device_get_action(udev_dev);
- if (!udev_action) {
- break;
- }
-
- detached = !strncmp(udev_action, "remove", 6);
-
- r = udev_device_info(NULL, detached, udev_dev, &busnum, &devaddr, &sys_name);
- if (LIBUSB_SUCCESS != r) {
- break;
- }
-
- usbi_dbg("udev hotplug event. action: %s.", udev_action);
-
- if (strncmp(udev_action, "add", 3) == 0) {
- linux_hotplug_enumerate(busnum, devaddr, sys_name);
- } else if (detached) {
- linux_hotplug_disconnected(busnum, devaddr, sys_name);
- } else {
- usbi_err(NULL, "ignoring udev action %s", udev_action);
- }
- } while (0);
-
- udev_device_unref(udev_dev);
-}
-
-int linux_udev_scan_devices(struct libusb_context *ctx)
-{
- struct udev_enumerate *enumerator;
- struct udev_list_entry *devices, *entry;
- struct udev_device *udev_dev;
- const char *sys_name;
- int r;
-
- assert(udev_ctx != NULL);
-
- enumerator = udev_enumerate_new(udev_ctx);
- if (NULL == enumerator) {
- usbi_err(ctx, "error creating udev enumerator");
- return LIBUSB_ERROR_OTHER;
- }
-
- udev_enumerate_add_match_subsystem(enumerator, "usb");
- udev_enumerate_scan_devices(enumerator);
- devices = udev_enumerate_get_list_entry(enumerator);
-
- udev_list_entry_foreach(entry, devices) {
- const char *path = udev_list_entry_get_name(entry);
- uint8_t busnum = 0, devaddr = 0;
-
- udev_dev = udev_device_new_from_syspath(udev_ctx, path);
-
- r = udev_device_info(ctx, 0, udev_dev, &busnum, &devaddr, &sys_name);
- if (r) {
- udev_device_unref(udev_dev);
- continue;
- }
-
- linux_enumerate_device(ctx, busnum, devaddr, sys_name);
- udev_device_unref(udev_dev);
- }
-
- udev_enumerate_unref(enumerator);
-
- return LIBUSB_SUCCESS;
-}
-
-void linux_udev_hotplug_poll(void)
-{
- struct udev_device* udev_dev;
-
- usbi_mutex_static_lock(&linux_hotplug_lock);
- do {
- udev_dev = udev_monitor_receive_device(udev_monitor);
- if (udev_dev) {
- usbi_dbg("Handling hotplug event from hotplug_poll");
- udev_hotplug_event(udev_dev);
- }
- } while (udev_dev);
- usbi_mutex_static_unlock(&linux_hotplug_lock);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.c
deleted file mode 100644
index 09288af71..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.c
+++ /dev/null
@@ -1,2568 +0,0 @@
-/*
- * Linux usbfs backend for libusbx
- * Copyright © 2007-2009 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- * Copyright © 2013 Nathan Hjelm <hjelmn@mac.com>
- * Copyright © 2012-2013 Hans de Goede <hdegoede@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#include <assert.h>
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <unistd.h>
-
-#include "libusb.h"
-#include "libusbi.h"
-#include "linux_usbfs.h"
-
-/* sysfs vs usbfs:
- * opening a usbfs node causes the device to be resumed, so we attempt to
- * avoid this during enumeration.
- *
- * sysfs allows us to read the kernel's in-memory copies of device descriptors
- * and so forth, avoiding the need to open the device:
- * - The binary "descriptors" file contains all config descriptors since
- * 2.6.26, commit 217a9081d8e69026186067711131b77f0ce219ed
- * - The binary "descriptors" file was added in 2.6.23, commit
- * 69d42a78f935d19384d1f6e4f94b65bb162b36df, but it only contains the
- * active config descriptors
- * - The "busnum" file was added in 2.6.22, commit
- * 83f7d958eab2fbc6b159ee92bf1493924e1d0f72
- * - The "devnum" file has been present since pre-2.6.18
- * - the "bConfigurationValue" file has been present since pre-2.6.18
- *
- * If we have bConfigurationValue, busnum, and devnum, then we can determine
- * the active configuration without having to open the usbfs node in RDWR mode.
- * The busnum file is important as that is the only way we can relate sysfs
- * devices to usbfs nodes.
- *
- * If we also have all descriptors, we can obtain the device descriptor and
- * configuration without touching usbfs at all.
- */
-
-/* endianness for multi-byte fields:
- *
- * Descriptors exposed by usbfs have the multi-byte fields in the device
- * descriptor as host endian. Multi-byte fields in the other descriptors are
- * bus-endian. The kernel documentation says otherwise, but it is wrong.
- *
- * In sysfs all descriptors are bus-endian.
- */
-
-static const char *usbfs_path = NULL;
-
-/* use usbdev*.* device names in /dev instead of the usbfs bus directories */
-static int usbdev_names = 0;
-
-/* Linux 2.6.32 adds support for a bulk continuation URB flag. this basically
- * allows us to mark URBs as being part of a specific logical transfer when
- * we submit them to the kernel. then, on any error except a cancellation, all
- * URBs within that transfer will be cancelled and no more URBs will be
- * accepted for the transfer, meaning that no more data can creep in.
- *
- * The BULK_CONTINUATION flag must be set on all URBs within a bulk transfer
- * (in either direction) except the first.
- * For IN transfers, we must also set SHORT_NOT_OK on all URBs except the
- * last; it means that the kernel should treat a short reply as an error.
- * For OUT transfers, SHORT_NOT_OK must not be set. it isn't needed (OUT
- * transfers can't be short unless there's already some sort of error), and
- * setting this flag is disallowed (a kernel with USB debugging enabled will
- * reject such URBs).
- */
-static int supports_flag_bulk_continuation = -1;
-
-/* Linux 2.6.31 fixes support for the zero length packet URB flag. This
- * allows us to mark URBs that should be followed by a zero length data
- * packet, which can be required by device- or class-specific protocols.
- */
-static int supports_flag_zero_packet = -1;
-
-/* clock ID for monotonic clock, as not all clock sources are available on all
- * systems. appropriate choice made at initialization time. */
-static clockid_t monotonic_clkid = -1;
-
-/* Linux 2.6.22 (commit 83f7d958eab2fbc6b159ee92bf1493924e1d0f72) adds a busnum
- * to sysfs, so we can relate devices. This also implies that we can read
- * the active configuration through bConfigurationValue */
-static int sysfs_can_relate_devices = -1;
-
-/* Linux 2.6.26 (commit 217a9081d8e69026186067711131b77f0ce219ed) adds all
- * config descriptors (rather then just the active config) to the sysfs
- * descriptors file, so from then on we can use them. */
-static int sysfs_has_descriptors = -1;
-
-/* how many times have we initted (and not exited) ? */
-static volatile int init_count = 0;
-
-/* Serialize hotplug start/stop, scan-devices, event-thread, and poll */
-usbi_mutex_static_t linux_hotplug_lock = USBI_MUTEX_INITIALIZER;
-
-static int linux_start_event_monitor(void);
-static int linux_stop_event_monitor(void);
-static int linux_scan_devices(struct libusb_context *ctx);
-static int sysfs_scan_device(struct libusb_context *ctx, const char *devname);
-static int detach_kernel_driver_and_claim(struct libusb_device_handle *, int);
-
-#if !defined(USE_UDEV)
-static int linux_default_scan_devices (struct libusb_context *ctx);
-#endif
-
-struct linux_device_priv {
- char *sysfs_dir;
- unsigned char *descriptors;
- int descriptors_len;
- int active_config; /* cache val for !sysfs_can_relate_devices */
-};
-
-struct linux_device_handle_priv {
- int fd;
- uint32_t caps;
-};
-
-enum reap_action {
- NORMAL = 0,
- /* submission failed after the first URB, so await cancellation/completion
- * of all the others */
- SUBMIT_FAILED,
-
- /* cancelled by user or timeout */
- CANCELLED,
-
- /* completed multi-URB transfer in non-final URB */
- COMPLETED_EARLY,
-
- /* one or more urbs encountered a low-level error */
- ERROR,
-};
-
-struct linux_transfer_priv {
- union {
- struct usbfs_urb *urbs;
- struct usbfs_urb **iso_urbs;
- };
-
- enum reap_action reap_action;
- int num_urbs;
- int num_retired;
- enum libusb_transfer_status reap_status;
-
- /* next iso packet in user-supplied transfer to be populated */
- int iso_packet_offset;
-};
-
-static int _get_usbfs_fd(struct libusb_device *dev, mode_t mode, int silent)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev);
- char path[PATH_MAX];
- int fd;
-
- if (usbdev_names)
- snprintf(path, PATH_MAX, "%s/usbdev%d.%d",
- usbfs_path, dev->bus_number, dev->device_address);
- else
- snprintf(path, PATH_MAX, "%s/%03d/%03d",
- usbfs_path, dev->bus_number, dev->device_address);
-
- fd = open(path, mode);
- if (fd != -1)
- return fd; /* Success */
-
- if (!silent) {
- usbi_err(ctx, "libusbx couldn't open USB device %s: %s",
- path, strerror(errno));
- if (errno == EACCES && mode == O_RDWR)
- usbi_err(ctx, "libusbx requires write access to USB "
- "device nodes.");
- }
-
- if (errno == EACCES)
- return LIBUSB_ERROR_ACCESS;
- if (errno == ENOENT)
- return LIBUSB_ERROR_NO_DEVICE;
- return LIBUSB_ERROR_IO;
-}
-
-static struct linux_device_priv *_device_priv(struct libusb_device *dev)
-{
- return (struct linux_device_priv *) dev->os_priv;
-}
-
-static struct linux_device_handle_priv *_device_handle_priv(
- struct libusb_device_handle *handle)
-{
- return (struct linux_device_handle_priv *) handle->os_priv;
-}
-
-/* check dirent for a /dev/usbdev%d.%d name
- * optionally return bus/device on success */
-static int _is_usbdev_entry(struct dirent *entry, int *bus_p, int *dev_p)
-{
- int busnum, devnum;
-
- if (sscanf(entry->d_name, "usbdev%d.%d", &busnum, &devnum) != 2)
- return 0;
-
- usbi_dbg("found: %s", entry->d_name);
- if (bus_p != NULL)
- *bus_p = busnum;
- if (dev_p != NULL)
- *dev_p = devnum;
- return 1;
-}
-
-static int check_usb_vfs(const char *dirname)
-{
- DIR *dir;
- struct dirent *entry;
- int found = 0;
-
- dir = opendir(dirname);
- if (!dir)
- return 0;
-
- while ((entry = readdir(dir)) != NULL) {
- if (entry->d_name[0] == '.')
- continue;
-
- /* We assume if we find any files that it must be the right place */
- found = 1;
- break;
- }
-
- closedir(dir);
- return found;
-}
-
-static const char *find_usbfs_path(void)
-{
- const char *path = "/dev/bus/usb";
- const char *ret = NULL;
-
- if (check_usb_vfs(path)) {
- ret = path;
- } else {
- path = "/proc/bus/usb";
- if (check_usb_vfs(path))
- ret = path;
- }
-
- /* look for /dev/usbdev*.* if the normal places fail */
- if (ret == NULL) {
- struct dirent *entry;
- DIR *dir;
-
- path = "/dev";
- dir = opendir(path);
- if (dir != NULL) {
- while ((entry = readdir(dir)) != NULL) {
- if (_is_usbdev_entry(entry, NULL, NULL)) {
- /* found one; that's enough */
- ret = path;
- usbdev_names = 1;
- break;
- }
- }
- closedir(dir);
- }
- }
-
- if (ret != NULL)
- usbi_dbg("found usbfs at %s", ret);
-
- return ret;
-}
-
-/* the monotonic clock is not usable on all systems (e.g. embedded ones often
- * seem to lack it). fall back to REALTIME if we have to. */
-static clockid_t find_monotonic_clock(void)
-{
-#ifdef CLOCK_MONOTONIC
- struct timespec ts;
- int r;
-
- /* Linux 2.6.28 adds CLOCK_MONOTONIC_RAW but we don't use it
- * because it's not available through timerfd */
- r = clock_gettime(CLOCK_MONOTONIC, &ts);
- if (r == 0)
- return CLOCK_MONOTONIC;
- usbi_dbg("monotonic clock doesn't work, errno %d", errno);
-#endif
-
- return CLOCK_REALTIME;
-}
-
-static int kernel_version_ge(int major, int minor, int sublevel)
-{
- struct utsname uts;
- int atoms, kmajor, kminor, ksublevel;
-
- if (uname(&uts) < 0)
- return -1;
- atoms = sscanf(uts.release, "%d.%d.%d", &kmajor, &kminor, &ksublevel);
- if (atoms < 1)
- return -1;
-
- if (kmajor > major)
- return 1;
- if (kmajor < major)
- return 0;
-
- /* kmajor == major */
- if (atoms < 2)
- return 0 == minor && 0 == sublevel;
- if (kminor > minor)
- return 1;
- if (kminor < minor)
- return 0;
-
- /* kminor == minor */
- if (atoms < 3)
- return 0 == sublevel;
-
- return ksublevel >= sublevel;
-}
-
-static int op_init(struct libusb_context *ctx)
-{
- struct stat statbuf;
- int r;
-
- usbfs_path = find_usbfs_path();
- if (!usbfs_path) {
- usbi_err(ctx, "could not find usbfs");
- return LIBUSB_ERROR_OTHER;
- }
-
- if (monotonic_clkid == -1)
- monotonic_clkid = find_monotonic_clock();
-
- if (supports_flag_bulk_continuation == -1) {
- /* bulk continuation URB flag available from Linux 2.6.32 */
- supports_flag_bulk_continuation = kernel_version_ge(2,6,32);
- if (supports_flag_bulk_continuation == -1) {
- usbi_err(ctx, "error checking for bulk continuation support");
- return LIBUSB_ERROR_OTHER;
- }
- }
-
- if (supports_flag_bulk_continuation)
- usbi_dbg("bulk continuation flag supported");
-
- if (-1 == supports_flag_zero_packet) {
- /* zero length packet URB flag fixed since Linux 2.6.31 */
- supports_flag_zero_packet = kernel_version_ge(2,6,31);
- if (-1 == supports_flag_zero_packet) {
- usbi_err(ctx, "error checking for zero length packet support");
- return LIBUSB_ERROR_OTHER;
- }
- }
-
- if (supports_flag_zero_packet)
- usbi_dbg("zero length packet flag supported");
-
- if (-1 == sysfs_has_descriptors) {
- /* sysfs descriptors has all descriptors since Linux 2.6.26 */
- sysfs_has_descriptors = kernel_version_ge(2,6,26);
- if (-1 == sysfs_has_descriptors) {
- usbi_err(ctx, "error checking for sysfs descriptors");
- return LIBUSB_ERROR_OTHER;
- }
- }
-
- if (-1 == sysfs_can_relate_devices) {
- /* sysfs has busnum since Linux 2.6.22 */
- sysfs_can_relate_devices = kernel_version_ge(2,6,22);
- if (-1 == sysfs_can_relate_devices) {
- usbi_err(ctx, "error checking for sysfs busnum");
- return LIBUSB_ERROR_OTHER;
- }
- }
-
- if (sysfs_can_relate_devices || sysfs_has_descriptors) {
- r = stat(SYSFS_DEVICE_PATH, &statbuf);
- if (r != 0 || !S_ISDIR(statbuf.st_mode)) {
- usbi_warn(ctx, "sysfs not mounted");
- sysfs_can_relate_devices = 0;
- sysfs_has_descriptors = 0;
- }
- }
-
- if (sysfs_can_relate_devices)
- usbi_dbg("sysfs can relate devices");
-
- if (sysfs_has_descriptors)
- usbi_dbg("sysfs has complete descriptors");
-
- usbi_mutex_static_lock(&linux_hotplug_lock);
- r = LIBUSB_SUCCESS;
- if (init_count == 0) {
- /* start up hotplug event handler */
- r = linux_start_event_monitor();
- }
- if (r == LIBUSB_SUCCESS) {
- r = linux_scan_devices(ctx);
- if (r == LIBUSB_SUCCESS)
- init_count++;
- else if (init_count == 0)
- linux_stop_event_monitor();
- } else
- usbi_err(ctx, "error starting hotplug event monitor");
- usbi_mutex_static_unlock(&linux_hotplug_lock);
-
- return r;
-}
-
-static void op_exit(void)
-{
- usbi_mutex_static_lock(&linux_hotplug_lock);
- assert(init_count != 0);
- if (!--init_count) {
- /* tear down event handler */
- (void)linux_stop_event_monitor();
- }
- usbi_mutex_static_unlock(&linux_hotplug_lock);
-}
-
-static int linux_start_event_monitor(void)
-{
-#if defined(USE_UDEV)
- return linux_udev_start_event_monitor();
-#else
- return linux_netlink_start_event_monitor();
-#endif
-}
-
-static int linux_stop_event_monitor(void)
-{
-#if defined(USE_UDEV)
- return linux_udev_stop_event_monitor();
-#else
- return linux_netlink_stop_event_monitor();
-#endif
-}
-
-static int linux_scan_devices(struct libusb_context *ctx)
-{
-#if defined(USE_UDEV)
- return linux_udev_scan_devices(ctx);
-#else
- return linux_default_scan_devices(ctx);
-#endif
-}
-
-static void op_hotplug_poll(void)
-{
-#if defined(USE_UDEV)
- linux_udev_hotplug_poll();
-#else
- linux_netlink_hotplug_poll();
-#endif
-}
-
-static int _open_sysfs_attr(struct libusb_device *dev, const char *attr)
-{
- struct linux_device_priv *priv = _device_priv(dev);
- char filename[PATH_MAX];
- int fd;
-
- snprintf(filename, PATH_MAX, "%s/%s/%s",
- SYSFS_DEVICE_PATH, priv->sysfs_dir, attr);
- fd = open(filename, O_RDONLY);
- if (fd < 0) {
- usbi_err(DEVICE_CTX(dev),
- "open %s failed ret=%d errno=%d", filename, fd, errno);
- return LIBUSB_ERROR_IO;
- }
-
- return fd;
-}
-
-/* Note only suitable for attributes which always read >= 0, < 0 is error */
-static int __read_sysfs_attr(struct libusb_context *ctx,
- const char *devname, const char *attr)
-{
- char filename[PATH_MAX];
- FILE *f;
- int r, value;
-
- snprintf(filename, PATH_MAX, "%s/%s/%s", SYSFS_DEVICE_PATH,
- devname, attr);
- f = fopen(filename, "r");
- if (f == NULL) {
- if (errno == ENOENT) {
- /* File doesn't exist. Assume the device has been
- disconnected (see trac ticket #70). */
- return LIBUSB_ERROR_NO_DEVICE;
- }
- usbi_err(ctx, "open %s failed errno=%d", filename, errno);
- return LIBUSB_ERROR_IO;
- }
-
- r = fscanf(f, "%d", &value);
- fclose(f);
- if (r != 1) {
- usbi_err(ctx, "fscanf %s returned %d, errno=%d", attr, r, errno);
- return LIBUSB_ERROR_NO_DEVICE; /* For unplug race (trac #70) */
- }
- if (value < 0) {
- usbi_err(ctx, "%s contains a negative value", filename);
- return LIBUSB_ERROR_IO;
- }
-
- return value;
-}
-
-static int op_get_device_descriptor(struct libusb_device *dev,
- unsigned char *buffer, int *host_endian)
-{
- struct linux_device_priv *priv = _device_priv(dev);
-
- *host_endian = sysfs_has_descriptors ? 0 : 1;
- memcpy(buffer, priv->descriptors, DEVICE_DESC_LENGTH);
-
- return 0;
-}
-
-/* read the bConfigurationValue for a device */
-static int sysfs_get_active_config(struct libusb_device *dev, int *config)
-{
- char *endptr;
- char tmp[4] = {0, 0, 0, 0};
- long num;
- int fd;
- ssize_t r;
-
- fd = _open_sysfs_attr(dev, "bConfigurationValue");
- if (fd < 0)
- return fd;
-
- r = read(fd, tmp, sizeof(tmp));
- close(fd);
- if (r < 0) {
- usbi_err(DEVICE_CTX(dev),
- "read bConfigurationValue failed ret=%d errno=%d", r, errno);
- return LIBUSB_ERROR_IO;
- } else if (r == 0) {
- usbi_dbg("device unconfigured");
- *config = -1;
- return 0;
- }
-
- if (tmp[sizeof(tmp) - 1] != 0) {
- usbi_err(DEVICE_CTX(dev), "not null-terminated?");
- return LIBUSB_ERROR_IO;
- } else if (tmp[0] == 0) {
- usbi_err(DEVICE_CTX(dev), "no configuration value?");
- return LIBUSB_ERROR_IO;
- }
-
- num = strtol(tmp, &endptr, 10);
- if (endptr == tmp) {
- usbi_err(DEVICE_CTX(dev), "error converting '%s' to integer", tmp);
- return LIBUSB_ERROR_IO;
- }
-
- *config = (int) num;
- return 0;
-}
-
-int linux_get_device_address (struct libusb_context *ctx, int detached,
- uint8_t *busnum, uint8_t *devaddr,const char *dev_node,
- const char *sys_name)
-{
- usbi_dbg("getting address for device: %s detached: %d", sys_name, detached);
- /* can't use sysfs to read the bus and device number if the
- * device has been detached */
- if (!sysfs_can_relate_devices || detached || NULL == sys_name) {
- if (NULL == dev_node) {
- return LIBUSB_ERROR_OTHER;
- }
-
- /* will this work with all supported kernel versions? */
- if (!strncmp(dev_node, "/dev/bus/usb", 12)) {
- sscanf (dev_node, "/dev/bus/usb/%hhd/%hhd", busnum, devaddr);
- } else if (!strncmp(dev_node, "/proc/bus/usb", 13)) {
- sscanf (dev_node, "/proc/bus/usb/%hhd/%hhd", busnum, devaddr);
- }
-
- return LIBUSB_SUCCESS;
- }
-
- usbi_dbg("scan %s", sys_name);
-
- *busnum = __read_sysfs_attr(ctx, sys_name, "busnum");
- if (0 > *busnum)
- return *busnum;
-
- *devaddr = __read_sysfs_attr(ctx, sys_name, "devnum");
- if (0 > *devaddr)
- return *devaddr;
-
- usbi_dbg("bus=%d dev=%d", *busnum, *devaddr);
- if (*busnum > 255 || *devaddr > 255)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- return LIBUSB_SUCCESS;
-}
-
-/* Return offset of the next descriptor with the given type */
-static int seek_to_next_descriptor(struct libusb_context *ctx,
- uint8_t descriptor_type, unsigned char *buffer, int size)
-{
- struct usb_descriptor_header header;
- int i;
-
- for (i = 0; size >= 0; i += header.bLength, size -= header.bLength) {
- if (size == 0)
- return LIBUSB_ERROR_NOT_FOUND;
-
- if (size < 2) {
- usbi_err(ctx, "short descriptor read %d/2", size);
- return LIBUSB_ERROR_IO;
- }
- usbi_parse_descriptor(buffer + i, "bb", &header, 0);
-
- if (i && header.bDescriptorType == descriptor_type)
- return i;
- }
- usbi_err(ctx, "bLength overflow by %d bytes", -size);
- return LIBUSB_ERROR_IO;
-}
-
-/* Return offset to next config */
-static int seek_to_next_config(struct libusb_context *ctx,
- unsigned char *buffer, int size)
-{
- struct libusb_config_descriptor config;
-
- if (size == 0)
- return LIBUSB_ERROR_NOT_FOUND;
-
- if (size < LIBUSB_DT_CONFIG_SIZE) {
- usbi_err(ctx, "short descriptor read %d/%d",
- size, LIBUSB_DT_CONFIG_SIZE);
- return LIBUSB_ERROR_IO;
- }
-
- usbi_parse_descriptor(buffer, "bbwbbbbb", &config, 0);
- if (config.bDescriptorType != LIBUSB_DT_CONFIG) {
- usbi_err(ctx, "descriptor is not a config desc (type 0x%02x)",
- config.bDescriptorType);
- return LIBUSB_ERROR_IO;
- }
-
- /*
- * In usbfs the config descriptors are config.wTotalLength bytes apart,
- * with any short reads from the device appearing as holes in the file.
- *
- * In sysfs wTotalLength is ignored, instead the kernel returns a
- * config descriptor with verified bLength fields, with descriptors
- * with an invalid bLength removed.
- */
- if (sysfs_has_descriptors) {
- int next = seek_to_next_descriptor(ctx, LIBUSB_DT_CONFIG,
- buffer, size);
- if (next == LIBUSB_ERROR_NOT_FOUND)
- next = size;
- if (next < 0)
- return next;
-
- if (next != config.wTotalLength)
- usbi_warn(ctx, "config length mismatch wTotalLength "
- "%d real %d", config.wTotalLength, next);
- return next;
- } else {
- if (config.wTotalLength < LIBUSB_DT_CONFIG_SIZE) {
- usbi_err(ctx, "invalid wTotalLength %d",
- config.wTotalLength);
- return LIBUSB_ERROR_IO;
- } else if (config.wTotalLength > size) {
- usbi_warn(ctx, "short descriptor read %d/%d",
- size, config.wTotalLength);
- return size;
- } else
- return config.wTotalLength;
- }
-}
-
-static int op_get_config_descriptor_by_value(struct libusb_device *dev,
- uint8_t value, unsigned char **buffer, int *host_endian)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev);
- struct linux_device_priv *priv = _device_priv(dev);
- unsigned char *descriptors = priv->descriptors;
- int size = priv->descriptors_len;
- struct libusb_config_descriptor *config;
-
- *buffer = NULL;
- /* Unlike the device desc. config descs. are always in raw format */
- *host_endian = 0;
-
- /* Skip device header */
- descriptors += DEVICE_DESC_LENGTH;
- size -= DEVICE_DESC_LENGTH;
-
- /* Seek till the config is found, or till "EOF" */
- while (1) {
- int next = seek_to_next_config(ctx, descriptors, size);
- if (next < 0)
- return next;
- config = (struct libusb_config_descriptor *)descriptors;
- if (config->bConfigurationValue == value) {
- *buffer = descriptors;
- return next;
- }
- size -= next;
- descriptors += next;
- }
-}
-
-static int op_get_active_config_descriptor(struct libusb_device *dev,
- unsigned char *buffer, size_t len, int *host_endian)
-{
- int r, config;
- unsigned char *config_desc;
-
- if (sysfs_can_relate_devices) {
- r = sysfs_get_active_config(dev, &config);
- if (r < 0)
- return r;
- } else {
- /* Use cached bConfigurationValue */
- struct linux_device_priv *priv = _device_priv(dev);
- config = priv->active_config;
- }
- if (config == -1)
- return LIBUSB_ERROR_NOT_FOUND;
-
- r = op_get_config_descriptor_by_value(dev, config, &config_desc,
- host_endian);
- if (r < 0)
- return r;
-
- len = MIN(len, r);
- memcpy(buffer, config_desc, len);
- return len;
-}
-
-static int op_get_config_descriptor(struct libusb_device *dev,
- uint8_t config_index, unsigned char *buffer, size_t len, int *host_endian)
-{
- struct linux_device_priv *priv = _device_priv(dev);
- unsigned char *descriptors = priv->descriptors;
- int i, r, size = priv->descriptors_len;
-
- /* Unlike the device desc. config descs. are always in raw format */
- *host_endian = 0;
-
- /* Skip device header */
- descriptors += DEVICE_DESC_LENGTH;
- size -= DEVICE_DESC_LENGTH;
-
- /* Seek till the config is found, or till "EOF" */
- for (i = 0; ; i++) {
- r = seek_to_next_config(DEVICE_CTX(dev), descriptors, size);
- if (r < 0)
- return r;
- if (i == config_index)
- break;
- size -= r;
- descriptors += r;
- }
-
- len = MIN(len, r);
- memcpy(buffer, descriptors, len);
- return len;
-}
-
-/* send a control message to retrieve active configuration */
-static int usbfs_get_active_config(struct libusb_device *dev, int fd)
-{
- unsigned char active_config = 0;
- int r;
-
- struct usbfs_ctrltransfer ctrl = {
- .bmRequestType = LIBUSB_ENDPOINT_IN,
- .bRequest = LIBUSB_REQUEST_GET_CONFIGURATION,
- .wValue = 0,
- .wIndex = 0,
- .wLength = 1,
- .timeout = 1000,
- .data = &active_config
- };
-
- r = ioctl(fd, IOCTL_USBFS_CONTROL, &ctrl);
- if (r < 0) {
- if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- /* we hit this error path frequently with buggy devices :( */
- usbi_warn(DEVICE_CTX(dev),
- "get_configuration failed ret=%d errno=%d", r, errno);
- return LIBUSB_ERROR_IO;
- }
-
- return active_config;
-}
-
-static int initialize_device(struct libusb_device *dev, uint8_t busnum,
- uint8_t devaddr, const char *sysfs_dir)
-{
- struct linux_device_priv *priv = _device_priv(dev);
- struct libusb_context *ctx = DEVICE_CTX(dev);
- int descriptors_size = 512; /* Begin with a 1024 byte alloc */
- int fd, speed;
- ssize_t r;
-
- dev->bus_number = busnum;
- dev->device_address = devaddr;
-
- if (sysfs_dir) {
- priv->sysfs_dir = malloc(strlen(sysfs_dir) + 1);
- if (!priv->sysfs_dir)
- return LIBUSB_ERROR_NO_MEM;
- strcpy(priv->sysfs_dir, sysfs_dir);
-
- /* Note speed can contain 1.5, in this case __read_sysfs_attr
- will stop parsing at the '.' and return 1 */
- speed = __read_sysfs_attr(DEVICE_CTX(dev), sysfs_dir, "speed");
- if (speed >= 0) {
- switch (speed) {
- case 1: dev->speed = LIBUSB_SPEED_LOW; break;
- case 12: dev->speed = LIBUSB_SPEED_FULL; break;
- case 480: dev->speed = LIBUSB_SPEED_HIGH; break;
- case 5000: dev->speed = LIBUSB_SPEED_SUPER; break;
- default:
- usbi_warn(DEVICE_CTX(dev), "Unknown device speed: %d Mbps", speed);
- }
- }
- }
-
- /* cache descriptors in memory */
- if (sysfs_has_descriptors)
- fd = _open_sysfs_attr(dev, "descriptors");
- else
- fd = _get_usbfs_fd(dev, O_RDONLY, 0);
- if (fd < 0)
- return fd;
-
- do {
- descriptors_size *= 2;
- priv->descriptors = usbi_reallocf(priv->descriptors,
- descriptors_size);
- if (!priv->descriptors) {
- close(fd);
- return LIBUSB_ERROR_NO_MEM;
- }
- /* usbfs has holes in the file */
- if (!sysfs_has_descriptors) {
- memset(priv->descriptors + priv->descriptors_len,
- 0, descriptors_size - priv->descriptors_len);
- }
- r = read(fd, priv->descriptors + priv->descriptors_len,
- descriptors_size - priv->descriptors_len);
- if (r < 0) {
- usbi_err(ctx, "read descriptor failed ret=%d errno=%d",
- fd, errno);
- close(fd);
- return LIBUSB_ERROR_IO;
- }
- priv->descriptors_len += r;
- } while (priv->descriptors_len == descriptors_size);
-
- close(fd);
-
- if (priv->descriptors_len < DEVICE_DESC_LENGTH) {
- usbi_err(ctx, "short descriptor read (%d)",
- priv->descriptors_len);
- return LIBUSB_ERROR_IO;
- }
-
- if (sysfs_can_relate_devices)
- return LIBUSB_SUCCESS;
-
- /* cache active config */
- fd = _get_usbfs_fd(dev, O_RDWR, 1);
- if (fd < 0) {
- /* cannot send a control message to determine the active
- * config. just assume the first one is active. */
- usbi_warn(ctx, "Missing rw usbfs access; cannot determine "
- "active configuration descriptor");
- if (priv->descriptors_len >=
- (DEVICE_DESC_LENGTH + LIBUSB_DT_CONFIG_SIZE)) {
- struct libusb_config_descriptor config;
- usbi_parse_descriptor(
- priv->descriptors + DEVICE_DESC_LENGTH,
- "bbwbbbbb", &config, 0);
- priv->active_config = config.bConfigurationValue;
- } else
- priv->active_config = -1; /* No config dt */
-
- return LIBUSB_SUCCESS;
- }
-
- r = usbfs_get_active_config(dev, fd);
- if (r > 0) {
- priv->active_config = r;
- r = LIBUSB_SUCCESS;
- } else if (r == 0) {
- /* some buggy devices have a configuration 0, but we're
- * reaching into the corner of a corner case here, so let's
- * not support buggy devices in these circumstances.
- * stick to the specs: a configuration value of 0 means
- * unconfigured. */
- usbi_dbg("active cfg 0? assuming unconfigured device");
- priv->active_config = -1;
- r = LIBUSB_SUCCESS;
- } else if (r == LIBUSB_ERROR_IO) {
- /* buggy devices sometimes fail to report their active config.
- * assume unconfigured and continue the probing */
- usbi_warn(ctx, "couldn't query active configuration, assuming"
- " unconfigured");
- priv->active_config = -1;
- r = LIBUSB_SUCCESS;
- } /* else r < 0, just return the error code */
-
- close(fd);
- return r;
-}
-
-static int linux_get_parent_info(struct libusb_device *dev, const char *sysfs_dir)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev);
- struct libusb_device *it;
- char *parent_sysfs_dir, *tmp;
- int ret, add_parent = 1;
-
- /* XXX -- can we figure out the topology when using usbfs? */
- if (NULL == sysfs_dir || 0 == strncmp(sysfs_dir, "usb", 3)) {
- /* either using usbfs or finding the parent of a root hub */
- return LIBUSB_SUCCESS;
- }
-
- parent_sysfs_dir = strdup(sysfs_dir);
- if (NULL != (tmp = strrchr(parent_sysfs_dir, '.')) ||
- NULL != (tmp = strrchr(parent_sysfs_dir, '-'))) {
- dev->port_number = atoi(tmp + 1);
- *tmp = '\0';
- } else {
- usbi_warn(ctx, "Can not parse sysfs_dir: %s, no parent info",
- parent_sysfs_dir);
- free (parent_sysfs_dir);
- return LIBUSB_SUCCESS;
- }
-
- /* is the parent a root hub? */
- if (NULL == strchr(parent_sysfs_dir, '-')) {
- tmp = parent_sysfs_dir;
- ret = asprintf (&parent_sysfs_dir, "usb%s", tmp);
- free (tmp);
- if (0 > ret) {
- return LIBUSB_ERROR_NO_MEM;
- }
- }
-
-retry:
- /* find the parent in the context */
- usbi_mutex_lock(&ctx->usb_devs_lock);
- list_for_each_entry(it, &ctx->usb_devs, list, struct libusb_device) {
- struct linux_device_priv *priv = _device_priv(it);
- if (0 == strcmp (priv->sysfs_dir, parent_sysfs_dir)) {
- dev->parent_dev = libusb_ref_device(it);
- break;
- }
- }
- usbi_mutex_unlock(&ctx->usb_devs_lock);
-
- if (!dev->parent_dev && add_parent) {
- usbi_dbg("parent_dev %s not enumerated yet, enumerating now",
- parent_sysfs_dir);
- sysfs_scan_device(ctx, parent_sysfs_dir);
- add_parent = 0;
- goto retry;
- }
-
- usbi_dbg("Dev %p (%s) has parent %p (%s) port %d", dev, sysfs_dir,
- dev->parent_dev, parent_sysfs_dir, dev->port_number);
-
- free (parent_sysfs_dir);
-
- return LIBUSB_SUCCESS;
-}
-
-int linux_enumerate_device(struct libusb_context *ctx,
- uint8_t busnum, uint8_t devaddr, const char *sysfs_dir)
-{
- unsigned long session_id;
- struct libusb_device *dev;
- int r = 0;
-
- /* FIXME: session ID is not guaranteed unique as addresses can wrap and
- * will be reused. instead we should add a simple sysfs attribute with
- * a session ID. */
- session_id = busnum << 8 | devaddr;
- usbi_dbg("busnum %d devaddr %d session_id %ld", busnum, devaddr,
- session_id);
-
- if (usbi_get_device_by_session_id(ctx, session_id)) {
- /* device already exists in the context */
- usbi_dbg("session_id %ld already exists", session_id);
- return LIBUSB_SUCCESS;
- }
-
- usbi_dbg("allocating new device for %d/%d (session %ld)",
- busnum, devaddr, session_id);
- dev = usbi_alloc_device(ctx, session_id);
- if (!dev)
- return LIBUSB_ERROR_NO_MEM;
-
- r = initialize_device(dev, busnum, devaddr, sysfs_dir);
- if (r < 0)
- goto out;
- r = usbi_sanitize_device(dev);
- if (r < 0)
- goto out;
-
- r = linux_get_parent_info(dev, sysfs_dir);
- if (r < 0)
- goto out;
-out:
- if (r < 0)
- libusb_unref_device(dev);
- else
- usbi_connect_device(dev);
-
- return r;
-}
-
-void linux_hotplug_enumerate(uint8_t busnum, uint8_t devaddr, const char *sys_name)
-{
- struct libusb_context *ctx;
-
- usbi_mutex_static_lock(&active_contexts_lock);
- list_for_each_entry(ctx, &active_contexts_list, list, struct libusb_context) {
- linux_enumerate_device(ctx, busnum, devaddr, sys_name);
- }
- usbi_mutex_static_unlock(&active_contexts_lock);
-}
-
-void linux_hotplug_disconnected(uint8_t busnum, uint8_t devaddr, const char *sys_name)
-{
- struct libusb_context *ctx;
- struct libusb_device *dev;
- unsigned long session_id = busnum << 8 | devaddr;
-
- usbi_mutex_static_lock(&active_contexts_lock);
- list_for_each_entry(ctx, &active_contexts_list, list, struct libusb_context) {
- dev = usbi_get_device_by_session_id (ctx, session_id);
- if (NULL != dev) {
- usbi_disconnect_device (dev);
- } else {
- usbi_dbg("device not found for session %x", session_id);
- }
- }
- usbi_mutex_static_unlock(&active_contexts_lock);
-}
-
-#if !defined(USE_UDEV)
-/* open a bus directory and adds all discovered devices to the context */
-static int usbfs_scan_busdir(struct libusb_context *ctx, uint8_t busnum)
-{
- DIR *dir;
- char dirpath[PATH_MAX];
- struct dirent *entry;
- int r = LIBUSB_ERROR_IO;
-
- snprintf(dirpath, PATH_MAX, "%s/%03d", usbfs_path, busnum);
- usbi_dbg("%s", dirpath);
- dir = opendir(dirpath);
- if (!dir) {
- usbi_err(ctx, "opendir '%s' failed, errno=%d", dirpath, errno);
- /* FIXME: should handle valid race conditions like hub unplugged
- * during directory iteration - this is not an error */
- return r;
- }
-
- while ((entry = readdir(dir))) {
- int devaddr;
-
- if (entry->d_name[0] == '.')
- continue;
-
- devaddr = atoi(entry->d_name);
- if (devaddr == 0) {
- usbi_dbg("unknown dir entry %s", entry->d_name);
- continue;
- }
-
- if (linux_enumerate_device(ctx, busnum, (uint8_t) devaddr, NULL)) {
- usbi_dbg("failed to enumerate dir entry %s", entry->d_name);
- continue;
- }
-
- r = 0;
- }
-
- closedir(dir);
- return r;
-}
-
-static int usbfs_get_device_list(struct libusb_context *ctx)
-{
- struct dirent *entry;
- DIR *buses = opendir(usbfs_path);
- int r = 0;
-
- if (!buses) {
- usbi_err(ctx, "opendir buses failed errno=%d", errno);
- return LIBUSB_ERROR_IO;
- }
-
- while ((entry = readdir(buses))) {
- int busnum;
-
- if (entry->d_name[0] == '.')
- continue;
-
- if (usbdev_names) {
- int devaddr;
- if (!_is_usbdev_entry(entry, &busnum, &devaddr))
- continue;
-
- r = linux_enumerate_device(ctx, busnum, (uint8_t) devaddr, NULL);
- if (r < 0) {
- usbi_dbg("failed to enumerate dir entry %s", entry->d_name);
- continue;
- }
- } else {
- busnum = atoi(entry->d_name);
- if (busnum == 0) {
- usbi_dbg("unknown dir entry %s", entry->d_name);
- continue;
- }
-
- r = usbfs_scan_busdir(ctx, busnum);
- if (r < 0)
- break;
- }
- }
-
- closedir(buses);
- return r;
-
-}
-#endif
-
-static int sysfs_scan_device(struct libusb_context *ctx, const char *devname)
-{
- uint8_t busnum, devaddr;
- int ret;
-
- ret = linux_get_device_address (ctx, 0, &busnum, &devaddr, NULL, devname);
- if (LIBUSB_SUCCESS != ret) {
- return ret;
- }
-
- return linux_enumerate_device(ctx, busnum & 0xff, devaddr & 0xff,
- devname);
-}
-
-#if !defined(USE_UDEV)
-static int sysfs_get_device_list(struct libusb_context *ctx)
-{
- DIR *devices = opendir(SYSFS_DEVICE_PATH);
- struct dirent *entry;
- int r = LIBUSB_ERROR_IO;
-
- if (!devices) {
- usbi_err(ctx, "opendir devices failed errno=%d", errno);
- return r;
- }
-
- while ((entry = readdir(devices))) {
- if ((!isdigit(entry->d_name[0]) && strncmp(entry->d_name, "usb", 3))
- || strchr(entry->d_name, ':'))
- continue;
-
- if (sysfs_scan_device(ctx, entry->d_name)) {
- usbi_dbg("failed to enumerate dir entry %s", entry->d_name);
- continue;
- }
-
- r = 0;
- }
-
- closedir(devices);
- return r;
-}
-
-static int linux_default_scan_devices (struct libusb_context *ctx)
-{
- /* we can retrieve device list and descriptors from sysfs or usbfs.
- * sysfs is preferable, because if we use usbfs we end up resuming
- * any autosuspended USB devices. however, sysfs is not available
- * everywhere, so we need a usbfs fallback too.
- *
- * as described in the "sysfs vs usbfs" comment at the top of this
- * file, sometimes we have sysfs but not enough information to
- * relate sysfs devices to usbfs nodes. op_init() determines the
- * adequacy of sysfs and sets sysfs_can_relate_devices.
- */
- if (sysfs_can_relate_devices != 0)
- return sysfs_get_device_list(ctx);
- else
- return usbfs_get_device_list(ctx);
-}
-#endif
-
-static int op_open(struct libusb_device_handle *handle)
-{
- struct linux_device_handle_priv *hpriv = _device_handle_priv(handle);
- int r;
-
- hpriv->fd = _get_usbfs_fd(handle->dev, O_RDWR, 0);
- if (hpriv->fd < 0)
- return hpriv->fd;
-
- r = ioctl(hpriv->fd, IOCTL_USBFS_GET_CAPABILITIES, &hpriv->caps);
- if (r < 0) {
- if (errno == ENOTTY)
- usbi_dbg("getcap not available");
- else
- usbi_err(HANDLE_CTX(handle), "getcap failed (%d)", errno);
- hpriv->caps = 0;
- if (supports_flag_zero_packet)
- hpriv->caps |= USBFS_CAP_ZERO_PACKET;
- if (supports_flag_bulk_continuation)
- hpriv->caps |= USBFS_CAP_BULK_CONTINUATION;
- }
-
- return usbi_add_pollfd(HANDLE_CTX(handle), hpriv->fd, POLLOUT);
-}
-
-static void op_close(struct libusb_device_handle *dev_handle)
-{
- int fd = _device_handle_priv(dev_handle)->fd;
- usbi_remove_pollfd(HANDLE_CTX(dev_handle), fd);
- close(fd);
-}
-
-static int op_get_configuration(struct libusb_device_handle *handle,
- int *config)
-{
- int r;
-
- if (sysfs_can_relate_devices) {
- r = sysfs_get_active_config(handle->dev, config);
- } else {
- r = usbfs_get_active_config(handle->dev,
- _device_handle_priv(handle)->fd);
- }
- if (r < 0)
- return r;
-
- if (*config == -1) {
- usbi_err(HANDLE_CTX(handle), "device unconfigured");
- *config = 0;
- }
-
- return 0;
-}
-
-static int op_set_configuration(struct libusb_device_handle *handle, int config)
-{
- struct linux_device_priv *priv = _device_priv(handle->dev);
- int fd = _device_handle_priv(handle)->fd;
- int r = ioctl(fd, IOCTL_USBFS_SETCONFIG, &config);
- if (r) {
- if (errno == EINVAL)
- return LIBUSB_ERROR_NOT_FOUND;
- else if (errno == EBUSY)
- return LIBUSB_ERROR_BUSY;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle), "failed, error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- /* update our cached active config descriptor */
- priv->active_config = config;
-
- return LIBUSB_SUCCESS;
-}
-
-static int claim_interface(struct libusb_device_handle *handle, int iface)
-{
- int fd = _device_handle_priv(handle)->fd;
- int r = ioctl(fd, IOCTL_USBFS_CLAIMINTF, &iface);
- if (r) {
- if (errno == ENOENT)
- return LIBUSB_ERROR_NOT_FOUND;
- else if (errno == EBUSY)
- return LIBUSB_ERROR_BUSY;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle),
- "claim interface failed, error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
- return 0;
-}
-
-static int release_interface(struct libusb_device_handle *handle, int iface)
-{
- int fd = _device_handle_priv(handle)->fd;
- int r = ioctl(fd, IOCTL_USBFS_RELEASEINTF, &iface);
- if (r) {
- if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle),
- "release interface failed, error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
- return 0;
-}
-
-static int op_set_interface(struct libusb_device_handle *handle, int iface,
- int altsetting)
-{
- int fd = _device_handle_priv(handle)->fd;
- struct usbfs_setinterface setintf;
- int r;
-
- setintf.interface = iface;
- setintf.altsetting = altsetting;
- r = ioctl(fd, IOCTL_USBFS_SETINTF, &setintf);
- if (r) {
- if (errno == EINVAL)
- return LIBUSB_ERROR_NOT_FOUND;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle),
- "setintf failed error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- return 0;
-}
-
-static int op_clear_halt(struct libusb_device_handle *handle,
- unsigned char endpoint)
-{
- int fd = _device_handle_priv(handle)->fd;
- unsigned int _endpoint = endpoint;
- int r = ioctl(fd, IOCTL_USBFS_CLEAR_HALT, &_endpoint);
- if (r) {
- if (errno == ENOENT)
- return LIBUSB_ERROR_NOT_FOUND;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle),
- "clear_halt failed error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- return 0;
-}
-
-static int op_reset_device(struct libusb_device_handle *handle)
-{
- int fd = _device_handle_priv(handle)->fd;
- int i, r, ret = 0;
-
- /* Doing a device reset will cause the usbfs driver to get unbound
- from any interfaces it is bound to. By voluntarily unbinding
- the usbfs driver ourself, we stop the kernel from rebinding
- the interface after reset (which would end up with the interface
- getting bound to the in kernel driver if any). */
- for (i = 0; i < USB_MAXINTERFACES; i++) {
- if (handle->claimed_interfaces & (1L << i)) {
- release_interface(handle, i);
- }
- }
-
- usbi_mutex_lock(&handle->lock);
- r = ioctl(fd, IOCTL_USBFS_RESET, NULL);
- if (r) {
- if (errno == ENODEV) {
- ret = LIBUSB_ERROR_NOT_FOUND;
- goto out;
- }
-
- usbi_err(HANDLE_CTX(handle),
- "reset failed error %d errno %d", r, errno);
- ret = LIBUSB_ERROR_OTHER;
- goto out;
- }
-
- /* And re-claim any interfaces which were claimed before the reset */
- for (i = 0; i < USB_MAXINTERFACES; i++) {
- if (handle->claimed_interfaces & (1L << i)) {
- /*
- * A driver may have completed modprobing during
- * IOCTL_USBFS_RESET, and bound itself as soon as
- * IOCTL_USBFS_RESET released the device lock
- */
- r = detach_kernel_driver_and_claim(handle, i);
- if (r) {
- usbi_warn(HANDLE_CTX(handle),
- "failed to re-claim interface %d after reset: %s",
- i, libusb_error_name(r));
- handle->claimed_interfaces &= ~(1L << i);
- ret = LIBUSB_ERROR_NOT_FOUND;
- }
- }
- }
-out:
- usbi_mutex_unlock(&handle->lock);
- return ret;
-}
-
-static int op_kernel_driver_active(struct libusb_device_handle *handle,
- int interface)
-{
- int fd = _device_handle_priv(handle)->fd;
- struct usbfs_getdriver getdrv;
- int r;
-
- getdrv.interface = interface;
- r = ioctl(fd, IOCTL_USBFS_GETDRIVER, &getdrv);
- if (r) {
- if (errno == ENODATA)
- return 0;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle),
- "get driver failed error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- return (strcmp(getdrv.driver, "usbfs") == 0) ? 0 : 1;
-}
-
-static int op_detach_kernel_driver(struct libusb_device_handle *handle,
- int interface)
-{
- int fd = _device_handle_priv(handle)->fd;
- struct usbfs_ioctl command;
- struct usbfs_getdriver getdrv;
- int r;
-
- command.ifno = interface;
- command.ioctl_code = IOCTL_USBFS_DISCONNECT;
- command.data = NULL;
-
- getdrv.interface = interface;
- r = ioctl(fd, IOCTL_USBFS_GETDRIVER, &getdrv);
- if (r == 0 && strcmp(getdrv.driver, "usbfs") == 0)
- return LIBUSB_ERROR_NOT_FOUND;
-
- r = ioctl(fd, IOCTL_USBFS_IOCTL, &command);
- if (r) {
- if (errno == ENODATA)
- return LIBUSB_ERROR_NOT_FOUND;
- else if (errno == EINVAL)
- return LIBUSB_ERROR_INVALID_PARAM;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle),
- "detach failed error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- return 0;
-}
-
-static int op_attach_kernel_driver(struct libusb_device_handle *handle,
- int interface)
-{
- int fd = _device_handle_priv(handle)->fd;
- struct usbfs_ioctl command;
- int r;
-
- command.ifno = interface;
- command.ioctl_code = IOCTL_USBFS_CONNECT;
- command.data = NULL;
-
- r = ioctl(fd, IOCTL_USBFS_IOCTL, &command);
- if (r < 0) {
- if (errno == ENODATA)
- return LIBUSB_ERROR_NOT_FOUND;
- else if (errno == EINVAL)
- return LIBUSB_ERROR_INVALID_PARAM;
- else if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
- else if (errno == EBUSY)
- return LIBUSB_ERROR_BUSY;
-
- usbi_err(HANDLE_CTX(handle),
- "attach failed error %d errno %d", r, errno);
- return LIBUSB_ERROR_OTHER;
- } else if (r == 0) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- return 0;
-}
-
-static int detach_kernel_driver_and_claim(struct libusb_device_handle *handle,
- int interface)
-{
- struct usbfs_disconnect_claim dc;
- int r, fd = _device_handle_priv(handle)->fd;
-
- dc.interface = interface;
- strcpy(dc.driver, "usbfs");
- dc.flags = USBFS_DISCONNECT_CLAIM_EXCEPT_DRIVER;
- r = ioctl(fd, IOCTL_USBFS_DISCONNECT_CLAIM, &dc);
- if (r == 0 || (r != 0 && errno != ENOTTY)) {
- if (r == 0)
- return 0;
-
- switch (errno) {
- case EBUSY:
- return LIBUSB_ERROR_BUSY;
- case EINVAL:
- return LIBUSB_ERROR_INVALID_PARAM;
- case ENODEV:
- return LIBUSB_ERROR_NO_DEVICE;
- }
- usbi_err(HANDLE_CTX(handle),
- "disconnect-and-claim failed errno %d", errno);
- return LIBUSB_ERROR_OTHER;
- }
-
- /* Fallback code for kernels which don't support the
- disconnect-and-claim ioctl */
- r = op_detach_kernel_driver(handle, interface);
- if (r != 0 && r != LIBUSB_ERROR_NOT_FOUND)
- return r;
-
- return claim_interface(handle, interface);
-}
-
-static int op_claim_interface(struct libusb_device_handle *handle, int iface)
-{
- if (handle->auto_detach_kernel_driver)
- return detach_kernel_driver_and_claim(handle, iface);
- else
- return claim_interface(handle, iface);
-}
-
-static int op_release_interface(struct libusb_device_handle *handle, int iface)
-{
- int r;
-
- r = release_interface(handle, iface);
- if (r)
- return r;
-
- if (handle->auto_detach_kernel_driver)
- op_attach_kernel_driver(handle, iface);
-
- return 0;
-}
-
-static void op_destroy_device(struct libusb_device *dev)
-{
- struct linux_device_priv *priv = _device_priv(dev);
- if (priv->descriptors)
- free(priv->descriptors);
- if (priv->sysfs_dir)
- free(priv->sysfs_dir);
-}
-
-/* URBs are discarded in reverse order of submission to avoid races. */
-static int discard_urbs(struct usbi_transfer *itransfer, int first, int last_plus_one)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct linux_transfer_priv *tpriv =
- usbi_transfer_get_os_priv(itransfer);
- struct linux_device_handle_priv *dpriv =
- _device_handle_priv(transfer->dev_handle);
- int i, ret = 0;
- struct usbfs_urb *urb;
-
- for (i = last_plus_one - 1; i >= first; i--) {
- if (LIBUSB_TRANSFER_TYPE_ISOCHRONOUS == transfer->type)
- urb = tpriv->iso_urbs[i];
- else
- urb = &tpriv->urbs[i];
-
- if (0 == ioctl(dpriv->fd, IOCTL_USBFS_DISCARDURB, urb))
- continue;
-
- if (EINVAL == errno) {
- usbi_dbg("URB not found --> assuming ready to be reaped");
- if (i == (last_plus_one - 1))
- ret = LIBUSB_ERROR_NOT_FOUND;
- } else if (ENODEV == errno) {
- usbi_dbg("Device not found for URB --> assuming ready to be reaped");
- ret = LIBUSB_ERROR_NO_DEVICE;
- } else {
- usbi_warn(TRANSFER_CTX(transfer),
- "unrecognised discard errno %d", errno);
- ret = LIBUSB_ERROR_OTHER;
- }
- }
- return ret;
-}
-
-static void free_iso_urbs(struct linux_transfer_priv *tpriv)
-{
- int i;
- for (i = 0; i < tpriv->num_urbs; i++) {
- struct usbfs_urb *urb = tpriv->iso_urbs[i];
- if (!urb)
- break;
- free(urb);
- }
-
- free(tpriv->iso_urbs);
- tpriv->iso_urbs = NULL;
-}
-
-static int submit_bulk_transfer(struct usbi_transfer *itransfer,
- unsigned char urb_type)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- struct linux_device_handle_priv *dpriv =
- _device_handle_priv(transfer->dev_handle);
- struct usbfs_urb *urbs;
- int is_out = (transfer->endpoint & LIBUSB_ENDPOINT_DIR_MASK)
- == LIBUSB_ENDPOINT_OUT;
- int bulk_buffer_len, use_bulk_continuation;
- int r;
- int i;
- size_t alloc_size;
-
- if (tpriv->urbs)
- return LIBUSB_ERROR_BUSY;
-
- if (is_out && (transfer->flags & LIBUSB_TRANSFER_ADD_ZERO_PACKET) &&
- !(dpriv->caps & USBFS_CAP_ZERO_PACKET))
- return LIBUSB_ERROR_NOT_SUPPORTED;
-
- /*
- * Older versions of usbfs place a 16kb limit on bulk URBs. We work
- * around this by splitting large transfers into 16k blocks, and then
- * submit all urbs at once. it would be simpler to submit one urb at
- * a time, but there is a big performance gain doing it this way.
- *
- * Newer versions lift the 16k limit (USBFS_CAP_NO_PACKET_SIZE_LIM),
- * using arbritary large transfers can still be a bad idea though, as
- * the kernel needs to allocate physical contiguous memory for this,
- * which may fail for large buffers.
- *
- * The kernel solves this problem by splitting the transfer into
- * blocks itself when the host-controller is scatter-gather capable
- * (USBFS_CAP_BULK_SCATTER_GATHER), which most controllers are.
- *
- * Last, there is the issue of short-transfers when splitting, for
- * short split-transfers to work reliable USBFS_CAP_BULK_CONTINUATION
- * is needed, but this is not always available.
- */
- if (dpriv->caps & USBFS_CAP_BULK_SCATTER_GATHER) {
- /* Good! Just submit everything in one go */
- bulk_buffer_len = transfer->length ? transfer->length : 1;
- use_bulk_continuation = 0;
- } else if (dpriv->caps & USBFS_CAP_BULK_CONTINUATION) {
- /* Split the transfers and use bulk-continuation to
- avoid issues with short-transfers */
- bulk_buffer_len = MAX_BULK_BUFFER_LENGTH;
- use_bulk_continuation = 1;
- } else if (dpriv->caps & USBFS_CAP_NO_PACKET_SIZE_LIM) {
- /* Don't split, assume the kernel can alloc the buffer
- (otherwise the submit will fail with -ENOMEM) */
- bulk_buffer_len = transfer->length ? transfer->length : 1;
- use_bulk_continuation = 0;
- } else {
- /* Bad, splitting without bulk-continuation, short transfers
- which end before the last urb will not work reliable! */
- /* Note we don't warn here as this is "normal" on kernels <
- 2.6.32 and not a problem for most applications */
- bulk_buffer_len = MAX_BULK_BUFFER_LENGTH;
- use_bulk_continuation = 0;
- }
-
- int num_urbs = transfer->length / bulk_buffer_len;
- int last_urb_partial = 0;
-
- if (transfer->length == 0) {
- num_urbs = 1;
- } else if ((transfer->length % bulk_buffer_len) > 0) {
- last_urb_partial = 1;
- num_urbs++;
- }
- usbi_dbg("need %d urbs for new transfer with length %d", num_urbs,
- transfer->length);
- alloc_size = num_urbs * sizeof(struct usbfs_urb);
- urbs = calloc(1, alloc_size);
- if (!urbs)
- return LIBUSB_ERROR_NO_MEM;
- tpriv->urbs = urbs;
- tpriv->num_urbs = num_urbs;
- tpriv->num_retired = 0;
- tpriv->reap_action = NORMAL;
- tpriv->reap_status = LIBUSB_TRANSFER_COMPLETED;
-
- for (i = 0; i < num_urbs; i++) {
- struct usbfs_urb *urb = &urbs[i];
- urb->usercontext = itransfer;
- urb->type = urb_type;
- urb->endpoint = transfer->endpoint;
- urb->buffer = transfer->buffer + (i * bulk_buffer_len);
- /* don't set the short not ok flag for the last URB */
- if (use_bulk_continuation && !is_out && (i < num_urbs - 1))
- urb->flags = USBFS_URB_SHORT_NOT_OK;
- if (i == num_urbs - 1 && last_urb_partial)
- urb->buffer_length = transfer->length % bulk_buffer_len;
- else if (transfer->length == 0)
- urb->buffer_length = 0;
- else
- urb->buffer_length = bulk_buffer_len;
-
- if (i > 0 && use_bulk_continuation)
- urb->flags |= USBFS_URB_BULK_CONTINUATION;
-
- /* we have already checked that the flag is supported */
- if (is_out && i == num_urbs - 1 &&
- transfer->flags & LIBUSB_TRANSFER_ADD_ZERO_PACKET)
- urb->flags |= USBFS_URB_ZERO_PACKET;
-
- r = ioctl(dpriv->fd, IOCTL_USBFS_SUBMITURB, urb);
- if (r < 0) {
- if (errno == ENODEV) {
- r = LIBUSB_ERROR_NO_DEVICE;
- } else {
- usbi_err(TRANSFER_CTX(transfer),
- "submiturb failed error %d errno=%d", r, errno);
- r = LIBUSB_ERROR_IO;
- }
-
- /* if the first URB submission fails, we can simply free up and
- * return failure immediately. */
- if (i == 0) {
- usbi_dbg("first URB failed, easy peasy");
- free(urbs);
- tpriv->urbs = NULL;
- return r;
- }
-
- /* if it's not the first URB that failed, the situation is a bit
- * tricky. we may need to discard all previous URBs. there are
- * complications:
- * - discarding is asynchronous - discarded urbs will be reaped
- * later. the user must not have freed the transfer when the
- * discarded URBs are reaped, otherwise libusbx will be using
- * freed memory.
- * - the earlier URBs may have completed successfully and we do
- * not want to throw away any data.
- * - this URB failing may be no error; EREMOTEIO means that
- * this transfer simply didn't need all the URBs we submitted
- * so, we report that the transfer was submitted successfully and
- * in case of error we discard all previous URBs. later when
- * the final reap completes we can report error to the user,
- * or success if an earlier URB was completed successfully.
- */
- tpriv->reap_action = EREMOTEIO == errno ? COMPLETED_EARLY : SUBMIT_FAILED;
-
- /* The URBs we haven't submitted yet we count as already
- * retired. */
- tpriv->num_retired += num_urbs - i;
-
- /* If we completed short then don't try to discard. */
- if (COMPLETED_EARLY == tpriv->reap_action)
- return 0;
-
- discard_urbs(itransfer, 0, i);
-
- usbi_dbg("reporting successful submission but waiting for %d "
- "discards before reporting error", i);
- return 0;
- }
- }
-
- return 0;
-}
-
-static int submit_iso_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- struct linux_device_handle_priv *dpriv =
- _device_handle_priv(transfer->dev_handle);
- struct usbfs_urb **urbs;
- size_t alloc_size;
- int num_packets = transfer->num_iso_packets;
- int i;
- int this_urb_len = 0;
- int num_urbs = 1;
- int packet_offset = 0;
- unsigned int packet_len;
- unsigned char *urb_buffer = transfer->buffer;
-
- if (tpriv->iso_urbs)
- return LIBUSB_ERROR_BUSY;
-
- /* usbfs places a 32kb limit on iso URBs. we divide up larger requests
- * into smaller units to meet such restriction, then fire off all the
- * units at once. it would be simpler if we just fired one unit at a time,
- * but there is a big performance gain through doing it this way.
- *
- * Newer kernels lift the 32k limit (USBFS_CAP_NO_PACKET_SIZE_LIM),
- * using arbritary large transfers is still be a bad idea though, as
- * the kernel needs to allocate physical contiguous memory for this,
- * which may fail for large buffers.
- */
-
- /* calculate how many URBs we need */
- for (i = 0; i < num_packets; i++) {
- unsigned int space_remaining = MAX_ISO_BUFFER_LENGTH - this_urb_len;
- packet_len = transfer->iso_packet_desc[i].length;
-
- if (packet_len > space_remaining) {
- num_urbs++;
- this_urb_len = packet_len;
- } else {
- this_urb_len += packet_len;
- }
- }
- usbi_dbg("need %d 32k URBs for transfer", num_urbs);
-
- alloc_size = num_urbs * sizeof(*urbs);
- urbs = calloc(1, alloc_size);
- if (!urbs)
- return LIBUSB_ERROR_NO_MEM;
-
- tpriv->iso_urbs = urbs;
- tpriv->num_urbs = num_urbs;
- tpriv->num_retired = 0;
- tpriv->reap_action = NORMAL;
- tpriv->iso_packet_offset = 0;
-
- /* allocate + initialize each URB with the correct number of packets */
- for (i = 0; i < num_urbs; i++) {
- struct usbfs_urb *urb;
- unsigned int space_remaining_in_urb = MAX_ISO_BUFFER_LENGTH;
- int urb_packet_offset = 0;
- unsigned char *urb_buffer_orig = urb_buffer;
- int j;
- int k;
-
- /* swallow up all the packets we can fit into this URB */
- while (packet_offset < transfer->num_iso_packets) {
- packet_len = transfer->iso_packet_desc[packet_offset].length;
- if (packet_len <= space_remaining_in_urb) {
- /* throw it in */
- urb_packet_offset++;
- packet_offset++;
- space_remaining_in_urb -= packet_len;
- urb_buffer += packet_len;
- } else {
- /* it can't fit, save it for the next URB */
- break;
- }
- }
-
- alloc_size = sizeof(*urb)
- + (urb_packet_offset * sizeof(struct usbfs_iso_packet_desc));
- urb = calloc(1, alloc_size);
- if (!urb) {
- free_iso_urbs(tpriv);
- return LIBUSB_ERROR_NO_MEM;
- }
- urbs[i] = urb;
-
- /* populate packet lengths */
- for (j = 0, k = packet_offset - urb_packet_offset;
- k < packet_offset; k++, j++) {
- packet_len = transfer->iso_packet_desc[k].length;
- urb->iso_frame_desc[j].length = packet_len;
- }
-
- urb->usercontext = itransfer;
- urb->type = USBFS_URB_TYPE_ISO;
- /* FIXME: interface for non-ASAP data? */
- urb->flags = USBFS_URB_ISO_ASAP;
- urb->endpoint = transfer->endpoint;
- urb->number_of_packets = urb_packet_offset;
- urb->buffer = urb_buffer_orig;
- }
-
- /* submit URBs */
- for (i = 0; i < num_urbs; i++) {
- int r = ioctl(dpriv->fd, IOCTL_USBFS_SUBMITURB, urbs[i]);
- if (r < 0) {
- if (errno == ENODEV) {
- r = LIBUSB_ERROR_NO_DEVICE;
- } else {
- usbi_err(TRANSFER_CTX(transfer),
- "submiturb failed error %d errno=%d", r, errno);
- r = LIBUSB_ERROR_IO;
- }
-
- /* if the first URB submission fails, we can simply free up and
- * return failure immediately. */
- if (i == 0) {
- usbi_dbg("first URB failed, easy peasy");
- free_iso_urbs(tpriv);
- return r;
- }
-
- /* if it's not the first URB that failed, the situation is a bit
- * tricky. we must discard all previous URBs. there are
- * complications:
- * - discarding is asynchronous - discarded urbs will be reaped
- * later. the user must not have freed the transfer when the
- * discarded URBs are reaped, otherwise libusbx will be using
- * freed memory.
- * - the earlier URBs may have completed successfully and we do
- * not want to throw away any data.
- * so, in this case we discard all the previous URBs BUT we report
- * that the transfer was submitted successfully. then later when
- * the final discard completes we can report error to the user.
- */
- tpriv->reap_action = SUBMIT_FAILED;
-
- /* The URBs we haven't submitted yet we count as already
- * retired. */
- tpriv->num_retired = num_urbs - i;
- discard_urbs(itransfer, 0, i);
-
- usbi_dbg("reporting successful submission but waiting for %d "
- "discards before reporting error", i);
- return 0;
- }
- }
-
- return 0;
-}
-
-static int submit_control_transfer(struct usbi_transfer *itransfer)
-{
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct linux_device_handle_priv *dpriv =
- _device_handle_priv(transfer->dev_handle);
- struct usbfs_urb *urb;
- int r;
-
- if (tpriv->urbs)
- return LIBUSB_ERROR_BUSY;
-
- if (transfer->length - LIBUSB_CONTROL_SETUP_SIZE > MAX_CTRL_BUFFER_LENGTH)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- urb = calloc(1, sizeof(struct usbfs_urb));
- if (!urb)
- return LIBUSB_ERROR_NO_MEM;
- tpriv->urbs = urb;
- tpriv->num_urbs = 1;
- tpriv->reap_action = NORMAL;
-
- urb->usercontext = itransfer;
- urb->type = USBFS_URB_TYPE_CONTROL;
- urb->endpoint = transfer->endpoint;
- urb->buffer = transfer->buffer;
- urb->buffer_length = transfer->length;
-
- r = ioctl(dpriv->fd, IOCTL_USBFS_SUBMITURB, urb);
- if (r < 0) {
- free(urb);
- tpriv->urbs = NULL;
- if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(TRANSFER_CTX(transfer),
- "submiturb failed error %d errno=%d", r, errno);
- return LIBUSB_ERROR_IO;
- }
- return 0;
-}
-
-static int op_submit_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- return submit_control_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_BULK:
- return submit_bulk_transfer(itransfer, USBFS_URB_TYPE_BULK);
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- return submit_bulk_transfer(itransfer, USBFS_URB_TYPE_INTERRUPT);
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return submit_iso_transfer(itransfer);
- default:
- usbi_err(TRANSFER_CTX(transfer),
- "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-static int op_cancel_transfer(struct usbi_transfer *itransfer)
-{
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_BULK:
- if (tpriv->reap_action == ERROR)
- break;
- /* else, fall through */
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- tpriv->reap_action = CANCELLED;
- break;
- default:
- usbi_err(TRANSFER_CTX(transfer),
- "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- if (!tpriv->urbs)
- return LIBUSB_ERROR_NOT_FOUND;
-
- return discard_urbs(itransfer, 0, tpriv->num_urbs);
-}
-
-static void op_clear_transfer_priv(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
-
- /* urbs can be freed also in submit_transfer so lock mutex first */
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- usbi_mutex_lock(&itransfer->lock);
- if (tpriv->urbs)
- free(tpriv->urbs);
- tpriv->urbs = NULL;
- usbi_mutex_unlock(&itransfer->lock);
- break;
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- usbi_mutex_lock(&itransfer->lock);
- if (tpriv->iso_urbs)
- free_iso_urbs(tpriv);
- usbi_mutex_unlock(&itransfer->lock);
- break;
- default:
- usbi_err(TRANSFER_CTX(transfer),
- "unknown endpoint type %d", transfer->type);
- }
-}
-
-static int handle_bulk_completion(struct usbi_transfer *itransfer,
- struct usbfs_urb *urb)
-{
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- int urb_idx = urb - tpriv->urbs;
-
- usbi_mutex_lock(&itransfer->lock);
- usbi_dbg("handling completion status %d of bulk urb %d/%d", urb->status,
- urb_idx + 1, tpriv->num_urbs);
-
- tpriv->num_retired++;
-
- if (tpriv->reap_action != NORMAL) {
- /* cancelled, submit_fail, or completed early */
- usbi_dbg("abnormal reap: urb status %d", urb->status);
-
- /* even though we're in the process of cancelling, it's possible that
- * we may receive some data in these URBs that we don't want to lose.
- * examples:
- * 1. while the kernel is cancelling all the packets that make up an
- * URB, a few of them might complete. so we get back a successful
- * cancellation *and* some data.
- * 2. we receive a short URB which marks the early completion condition,
- * so we start cancelling the remaining URBs. however, we're too
- * slow and another URB completes (or at least completes partially).
- * (this can't happen since we always use BULK_CONTINUATION.)
- *
- * When this happens, our objectives are not to lose any "surplus" data,
- * and also to stick it at the end of the previously-received data
- * (closing any holes), so that libusbx reports the total amount of
- * transferred data and presents it in a contiguous chunk.
- */
- if (urb->actual_length > 0) {
- unsigned char *target = transfer->buffer + itransfer->transferred;
- usbi_dbg("received %d bytes of surplus data", urb->actual_length);
- if (urb->buffer != target) {
- usbi_dbg("moving surplus data from offset %d to offset %d",
- (unsigned char *) urb->buffer - transfer->buffer,
- target - transfer->buffer);
- memmove(target, urb->buffer, urb->actual_length);
- }
- itransfer->transferred += urb->actual_length;
- }
-
- if (tpriv->num_retired == tpriv->num_urbs) {
- usbi_dbg("abnormal reap: last URB handled, reporting");
- if (tpriv->reap_action != COMPLETED_EARLY &&
- tpriv->reap_status == LIBUSB_TRANSFER_COMPLETED)
- tpriv->reap_status = LIBUSB_TRANSFER_ERROR;
- goto completed;
- }
- goto out_unlock;
- }
-
- itransfer->transferred += urb->actual_length;
-
- /* Many of these errors can occur on *any* urb of a multi-urb
- * transfer. When they do, we tear down the rest of the transfer.
- */
- switch (urb->status) {
- case 0:
- break;
- case -EREMOTEIO: /* short transfer */
- break;
- case -ENOENT: /* cancelled */
- case -ECONNRESET:
- break;
- case -ENODEV:
- case -ESHUTDOWN:
- usbi_dbg("device removed");
- tpriv->reap_status = LIBUSB_TRANSFER_NO_DEVICE;
- goto cancel_remaining;
- case -EPIPE:
- usbi_dbg("detected endpoint stall");
- if (tpriv->reap_status == LIBUSB_TRANSFER_COMPLETED)
- tpriv->reap_status = LIBUSB_TRANSFER_STALL;
- goto cancel_remaining;
- case -EOVERFLOW:
- /* overflow can only ever occur in the last urb */
- usbi_dbg("overflow, actual_length=%d", urb->actual_length);
- if (tpriv->reap_status == LIBUSB_TRANSFER_COMPLETED)
- tpriv->reap_status = LIBUSB_TRANSFER_OVERFLOW;
- goto completed;
- case -ETIME:
- case -EPROTO:
- case -EILSEQ:
- case -ECOMM:
- case -ENOSR:
- usbi_dbg("low level error %d", urb->status);
- tpriv->reap_action = ERROR;
- goto cancel_remaining;
- default:
- usbi_warn(ITRANSFER_CTX(itransfer),
- "unrecognised urb status %d", urb->status);
- tpriv->reap_action = ERROR;
- goto cancel_remaining;
- }
-
- /* if we're the last urb or we got less data than requested then we're
- * done */
- if (urb_idx == tpriv->num_urbs - 1) {
- usbi_dbg("last URB in transfer --> complete!");
- goto completed;
- } else if (urb->actual_length < urb->buffer_length) {
- usbi_dbg("short transfer %d/%d --> complete!",
- urb->actual_length, urb->buffer_length);
- if (tpriv->reap_action == NORMAL)
- tpriv->reap_action = COMPLETED_EARLY;
- } else
- goto out_unlock;
-
-cancel_remaining:
- if (ERROR == tpriv->reap_action && LIBUSB_TRANSFER_COMPLETED == tpriv->reap_status)
- tpriv->reap_status = LIBUSB_TRANSFER_ERROR;
-
- if (tpriv->num_retired == tpriv->num_urbs) /* nothing to cancel */
- goto completed;
-
- /* cancel remaining urbs and wait for their completion before
- * reporting results */
- discard_urbs(itransfer, urb_idx + 1, tpriv->num_urbs);
-
-out_unlock:
- usbi_mutex_unlock(&itransfer->lock);
- return 0;
-
-completed:
- free(tpriv->urbs);
- tpriv->urbs = NULL;
- usbi_mutex_unlock(&itransfer->lock);
- return CANCELLED == tpriv->reap_action ?
- usbi_handle_transfer_cancellation(itransfer) :
- usbi_handle_transfer_completion(itransfer, tpriv->reap_status);
-}
-
-static int handle_iso_completion(struct usbi_transfer *itransfer,
- struct usbfs_urb *urb)
-{
- struct libusb_transfer *transfer =
- USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- int num_urbs = tpriv->num_urbs;
- int urb_idx = 0;
- int i;
- enum libusb_transfer_status status = LIBUSB_TRANSFER_COMPLETED;
-
- usbi_mutex_lock(&itransfer->lock);
- for (i = 0; i < num_urbs; i++) {
- if (urb == tpriv->iso_urbs[i]) {
- urb_idx = i + 1;
- break;
- }
- }
- if (urb_idx == 0) {
- usbi_err(TRANSFER_CTX(transfer), "could not locate urb!");
- usbi_mutex_unlock(&itransfer->lock);
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_dbg("handling completion status %d of iso urb %d/%d", urb->status,
- urb_idx, num_urbs);
-
- /* copy isochronous results back in */
-
- for (i = 0; i < urb->number_of_packets; i++) {
- struct usbfs_iso_packet_desc *urb_desc = &urb->iso_frame_desc[i];
- struct libusb_iso_packet_descriptor *lib_desc =
- &transfer->iso_packet_desc[tpriv->iso_packet_offset++];
- lib_desc->status = LIBUSB_TRANSFER_COMPLETED;
- switch (urb_desc->status) {
- case 0:
- break;
- case -ENOENT: /* cancelled */
- case -ECONNRESET:
- break;
- case -ENODEV:
- case -ESHUTDOWN:
- usbi_dbg("device removed");
- lib_desc->status = LIBUSB_TRANSFER_NO_DEVICE;
- break;
- case -EPIPE:
- usbi_dbg("detected endpoint stall");
- lib_desc->status = LIBUSB_TRANSFER_STALL;
- break;
- case -EOVERFLOW:
- usbi_dbg("overflow error");
- lib_desc->status = LIBUSB_TRANSFER_OVERFLOW;
- break;
- case -ETIME:
- case -EPROTO:
- case -EILSEQ:
- case -ECOMM:
- case -ENOSR:
- case -EXDEV:
- usbi_dbg("low-level USB error %d", urb_desc->status);
- lib_desc->status = LIBUSB_TRANSFER_ERROR;
- break;
- default:
- usbi_warn(TRANSFER_CTX(transfer),
- "unrecognised urb status %d", urb_desc->status);
- lib_desc->status = LIBUSB_TRANSFER_ERROR;
- break;
- }
- lib_desc->actual_length = urb_desc->actual_length;
- }
-
- tpriv->num_retired++;
-
- if (tpriv->reap_action != NORMAL) { /* cancelled or submit_fail */
- usbi_dbg("CANCEL: urb status %d", urb->status);
-
- if (tpriv->num_retired == num_urbs) {
- usbi_dbg("CANCEL: last URB handled, reporting");
- free_iso_urbs(tpriv);
- if (tpriv->reap_action == CANCELLED) {
- usbi_mutex_unlock(&itransfer->lock);
- return usbi_handle_transfer_cancellation(itransfer);
- } else {
- usbi_mutex_unlock(&itransfer->lock);
- return usbi_handle_transfer_completion(itransfer,
- LIBUSB_TRANSFER_ERROR);
- }
- }
- goto out;
- }
-
- switch (urb->status) {
- case 0:
- break;
- case -ENOENT: /* cancelled */
- case -ECONNRESET:
- break;
- case -ESHUTDOWN:
- usbi_dbg("device removed");
- status = LIBUSB_TRANSFER_NO_DEVICE;
- break;
- default:
- usbi_warn(TRANSFER_CTX(transfer),
- "unrecognised urb status %d", urb->status);
- status = LIBUSB_TRANSFER_ERROR;
- break;
- }
-
- /* if we're the last urb then we're done */
- if (urb_idx == num_urbs) {
- usbi_dbg("last URB in transfer --> complete!");
- free_iso_urbs(tpriv);
- usbi_mutex_unlock(&itransfer->lock);
- return usbi_handle_transfer_completion(itransfer, status);
- }
-
-out:
- usbi_mutex_unlock(&itransfer->lock);
- return 0;
-}
-
-static int handle_control_completion(struct usbi_transfer *itransfer,
- struct usbfs_urb *urb)
-{
- struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer);
- int status;
-
- usbi_mutex_lock(&itransfer->lock);
- usbi_dbg("handling completion status %d", urb->status);
-
- itransfer->transferred += urb->actual_length;
-
- if (tpriv->reap_action == CANCELLED) {
- if (urb->status != 0 && urb->status != -ENOENT)
- usbi_warn(ITRANSFER_CTX(itransfer),
- "cancel: unrecognised urb status %d", urb->status);
- free(tpriv->urbs);
- tpriv->urbs = NULL;
- usbi_mutex_unlock(&itransfer->lock);
- return usbi_handle_transfer_cancellation(itransfer);
- }
-
- switch (urb->status) {
- case 0:
- status = LIBUSB_TRANSFER_COMPLETED;
- break;
- case -ENOENT: /* cancelled */
- status = LIBUSB_TRANSFER_CANCELLED;
- break;
- case -ENODEV:
- case -ESHUTDOWN:
- usbi_dbg("device removed");
- status = LIBUSB_TRANSFER_NO_DEVICE;
- break;
- case -EPIPE:
- usbi_dbg("unsupported control request");
- status = LIBUSB_TRANSFER_STALL;
- break;
- case -EOVERFLOW:
- usbi_dbg("control overflow error");
- status = LIBUSB_TRANSFER_OVERFLOW;
- break;
- case -ETIME:
- case -EPROTO:
- case -EILSEQ:
- case -ECOMM:
- case -ENOSR:
- usbi_dbg("low-level bus error occurred");
- status = LIBUSB_TRANSFER_ERROR;
- break;
- default:
- usbi_warn(ITRANSFER_CTX(itransfer),
- "unrecognised urb status %d", urb->status);
- status = LIBUSB_TRANSFER_ERROR;
- break;
- }
-
- free(tpriv->urbs);
- tpriv->urbs = NULL;
- usbi_mutex_unlock(&itransfer->lock);
- return usbi_handle_transfer_completion(itransfer, status);
-}
-
-static int reap_for_handle(struct libusb_device_handle *handle)
-{
- struct linux_device_handle_priv *hpriv = _device_handle_priv(handle);
- int r;
- struct usbfs_urb *urb;
- struct usbi_transfer *itransfer;
- struct libusb_transfer *transfer;
-
- r = ioctl(hpriv->fd, IOCTL_USBFS_REAPURBNDELAY, &urb);
- if (r == -1 && errno == EAGAIN)
- return 1;
- if (r < 0) {
- if (errno == ENODEV)
- return LIBUSB_ERROR_NO_DEVICE;
-
- usbi_err(HANDLE_CTX(handle), "reap failed error %d errno=%d",
- r, errno);
- return LIBUSB_ERROR_IO;
- }
-
- itransfer = urb->usercontext;
- transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- usbi_dbg("urb type=%d status=%d transferred=%d", urb->type, urb->status,
- urb->actual_length);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return handle_iso_completion(itransfer, urb);
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- return handle_bulk_completion(itransfer, urb);
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- return handle_control_completion(itransfer, urb);
- default:
- usbi_err(HANDLE_CTX(handle), "unrecognised endpoint type %x",
- transfer->type);
- return LIBUSB_ERROR_OTHER;
- }
-}
-
-static int op_handle_events(struct libusb_context *ctx,
- struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready)
-{
- int r;
- unsigned int i = 0;
-
- usbi_mutex_lock(&ctx->open_devs_lock);
- for (i = 0; i < nfds && num_ready > 0; i++) {
- struct pollfd *pollfd = &fds[i];
- struct libusb_device_handle *handle;
- struct linux_device_handle_priv *hpriv = NULL;
-
- if (!pollfd->revents)
- continue;
-
- num_ready--;
- list_for_each_entry(handle, &ctx->open_devs, list, struct libusb_device_handle) {
- hpriv = _device_handle_priv(handle);
- if (hpriv->fd == pollfd->fd)
- break;
- }
-
- if (pollfd->revents & POLLERR) {
- usbi_remove_pollfd(HANDLE_CTX(handle), hpriv->fd);
- usbi_handle_disconnect(handle);
- continue;
- }
-
- do {
- r = reap_for_handle(handle);
- } while (r == 0);
- if (r == 1 || r == LIBUSB_ERROR_NO_DEVICE)
- continue;
- else if (r < 0)
- goto out;
- }
-
- r = 0;
-out:
- usbi_mutex_unlock(&ctx->open_devs_lock);
- return r;
-}
-
-static int op_clock_gettime(int clk_id, struct timespec *tp)
-{
- switch (clk_id) {
- case USBI_CLOCK_MONOTONIC:
- return clock_gettime(monotonic_clkid, tp);
- case USBI_CLOCK_REALTIME:
- return clock_gettime(CLOCK_REALTIME, tp);
- default:
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-#ifdef USBI_TIMERFD_AVAILABLE
-static clockid_t op_get_timerfd_clockid(void)
-{
- return monotonic_clkid;
-
-}
-#endif
-
-const struct usbi_os_backend linux_usbfs_backend = {
- .name = "Linux usbfs",
- .caps = USBI_CAP_HAS_HID_ACCESS|USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER,
- .init = op_init,
- .exit = op_exit,
- .get_device_list = NULL,
- .hotplug_poll = op_hotplug_poll,
- .get_device_descriptor = op_get_device_descriptor,
- .get_active_config_descriptor = op_get_active_config_descriptor,
- .get_config_descriptor = op_get_config_descriptor,
- .get_config_descriptor_by_value = op_get_config_descriptor_by_value,
-
- .open = op_open,
- .close = op_close,
- .get_configuration = op_get_configuration,
- .set_configuration = op_set_configuration,
- .claim_interface = op_claim_interface,
- .release_interface = op_release_interface,
-
- .set_interface_altsetting = op_set_interface,
- .clear_halt = op_clear_halt,
- .reset_device = op_reset_device,
-
- .kernel_driver_active = op_kernel_driver_active,
- .detach_kernel_driver = op_detach_kernel_driver,
- .attach_kernel_driver = op_attach_kernel_driver,
-
- .destroy_device = op_destroy_device,
-
- .submit_transfer = op_submit_transfer,
- .cancel_transfer = op_cancel_transfer,
- .clear_transfer_priv = op_clear_transfer_priv,
-
- .handle_events = op_handle_events,
-
- .clock_gettime = op_clock_gettime,
-
-#ifdef USBI_TIMERFD_AVAILABLE
- .get_timerfd_clockid = op_get_timerfd_clockid,
-#endif
-
- .device_priv_size = sizeof(struct linux_device_priv),
- .device_handle_priv_size = sizeof(struct linux_device_handle_priv),
- .transfer_priv_size = sizeof(struct linux_transfer_priv),
- .add_iso_packet_size = 0,
-};
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.h
deleted file mode 100644
index 499bab78e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/linux_usbfs.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * usbfs header structures
- * Copyright © 2007 Daniel Drake <dsd@gentoo.org>
- * Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LIBUSB_USBFS_H
-#define LIBUSB_USBFS_H
-
-#include <linux/types.h>
-
-#define SYSFS_DEVICE_PATH "/sys/bus/usb/devices"
-
-struct usbfs_ctrltransfer {
- /* keep in sync with usbdevice_fs.h:usbdevfs_ctrltransfer */
- uint8_t bmRequestType;
- uint8_t bRequest;
- uint16_t wValue;
- uint16_t wIndex;
- uint16_t wLength;
-
- uint32_t timeout; /* in milliseconds */
-
- /* pointer to data */
- void *data;
-};
-
-struct usbfs_bulktransfer {
- /* keep in sync with usbdevice_fs.h:usbdevfs_bulktransfer */
- unsigned int ep;
- unsigned int len;
- unsigned int timeout; /* in milliseconds */
-
- /* pointer to data */
- void *data;
-};
-
-struct usbfs_setinterface {
- /* keep in sync with usbdevice_fs.h:usbdevfs_setinterface */
- unsigned int interface;
- unsigned int altsetting;
-};
-
-#define USBFS_MAXDRIVERNAME 255
-
-struct usbfs_getdriver {
- unsigned int interface;
- char driver[USBFS_MAXDRIVERNAME + 1];
-};
-
-#define USBFS_URB_SHORT_NOT_OK 0x01
-#define USBFS_URB_ISO_ASAP 0x02
-#define USBFS_URB_BULK_CONTINUATION 0x04
-#define USBFS_URB_QUEUE_BULK 0x10
-#define USBFS_URB_ZERO_PACKET 0x40
-
-enum usbfs_urb_type {
- USBFS_URB_TYPE_ISO = 0,
- USBFS_URB_TYPE_INTERRUPT = 1,
- USBFS_URB_TYPE_CONTROL = 2,
- USBFS_URB_TYPE_BULK = 3,
-};
-
-struct usbfs_iso_packet_desc {
- unsigned int length;
- unsigned int actual_length;
- unsigned int status;
-};
-
-#define MAX_ISO_BUFFER_LENGTH 32768
-#define MAX_BULK_BUFFER_LENGTH 16384
-#define MAX_CTRL_BUFFER_LENGTH 4096
-
-struct usbfs_urb {
- unsigned char type;
- unsigned char endpoint;
- int status;
- unsigned int flags;
- void *buffer;
- int buffer_length;
- int actual_length;
- int start_frame;
- int number_of_packets;
- int error_count;
- unsigned int signr;
- void *usercontext;
- struct usbfs_iso_packet_desc iso_frame_desc[0];
-};
-
-struct usbfs_connectinfo {
- unsigned int devnum;
- unsigned char slow;
-};
-
-struct usbfs_ioctl {
- int ifno; /* interface 0..N ; negative numbers reserved */
- int ioctl_code; /* MUST encode size + direction of data so the
- * macros in <asm/ioctl.h> give correct values */
- void *data; /* param buffer (in, or out) */
-};
-
-struct usbfs_hub_portinfo {
- unsigned char numports;
- unsigned char port[127]; /* port to device num mapping */
-};
-
-#define USBFS_CAP_ZERO_PACKET 0x01
-#define USBFS_CAP_BULK_CONTINUATION 0x02
-#define USBFS_CAP_NO_PACKET_SIZE_LIM 0x04
-#define USBFS_CAP_BULK_SCATTER_GATHER 0x08
-
-#define USBFS_DISCONNECT_CLAIM_IF_DRIVER 0x01
-#define USBFS_DISCONNECT_CLAIM_EXCEPT_DRIVER 0x02
-
-struct usbfs_disconnect_claim {
- unsigned int interface;
- unsigned int flags;
- char driver[USBFS_MAXDRIVERNAME + 1];
-};
-
-#define IOCTL_USBFS_CONTROL _IOWR('U', 0, struct usbfs_ctrltransfer)
-#define IOCTL_USBFS_BULK _IOWR('U', 2, struct usbfs_bulktransfer)
-#define IOCTL_USBFS_RESETEP _IOR('U', 3, unsigned int)
-#define IOCTL_USBFS_SETINTF _IOR('U', 4, struct usbfs_setinterface)
-#define IOCTL_USBFS_SETCONFIG _IOR('U', 5, unsigned int)
-#define IOCTL_USBFS_GETDRIVER _IOW('U', 8, struct usbfs_getdriver)
-#define IOCTL_USBFS_SUBMITURB _IOR('U', 10, struct usbfs_urb)
-#define IOCTL_USBFS_DISCARDURB _IO('U', 11)
-#define IOCTL_USBFS_REAPURB _IOW('U', 12, void *)
-#define IOCTL_USBFS_REAPURBNDELAY _IOW('U', 13, void *)
-#define IOCTL_USBFS_CLAIMINTF _IOR('U', 15, unsigned int)
-#define IOCTL_USBFS_RELEASEINTF _IOR('U', 16, unsigned int)
-#define IOCTL_USBFS_CONNECTINFO _IOW('U', 17, struct usbfs_connectinfo)
-#define IOCTL_USBFS_IOCTL _IOWR('U', 18, struct usbfs_ioctl)
-#define IOCTL_USBFS_HUB_PORTINFO _IOR('U', 19, struct usbfs_hub_portinfo)
-#define IOCTL_USBFS_RESET _IO('U', 20)
-#define IOCTL_USBFS_CLEAR_HALT _IOR('U', 21, unsigned int)
-#define IOCTL_USBFS_DISCONNECT _IO('U', 22)
-#define IOCTL_USBFS_CONNECT _IO('U', 23)
-#define IOCTL_USBFS_CLAIM_PORT _IOR('U', 24, unsigned int)
-#define IOCTL_USBFS_RELEASE_PORT _IOR('U', 25, unsigned int)
-#define IOCTL_USBFS_GET_CAPABILITIES _IOR('U', 26, __u32)
-#define IOCTL_USBFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbfs_disconnect_claim)
-
-extern usbi_mutex_static_t linux_hotplug_lock;
-
-#if defined(HAVE_LIBUDEV)
-int linux_udev_start_event_monitor(void);
-int linux_udev_stop_event_monitor(void);
-int linux_udev_scan_devices(struct libusb_context *ctx);
-void linux_udev_hotplug_poll(void);
-#else
-int linux_netlink_start_event_monitor(void);
-int linux_netlink_stop_event_monitor(void);
-void linux_netlink_hotplug_poll(void);
-#endif
-
-void linux_hotplug_enumerate(uint8_t busnum, uint8_t devaddr, const char *sys_name);
-void linux_hotplug_disconnected(uint8_t busnum, uint8_t devaddr, const char *sys_name);
-
-int linux_get_device_address (struct libusb_context *ctx, int detached,
- uint8_t *busnum, uint8_t *devaddr, const char *dev_node,
- const char *sys_name);
-int linux_enumerate_device(struct libusb_context *ctx,
- uint8_t busnum, uint8_t devaddr, const char *sysfs_dir);
-
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/openbsd_usb.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/openbsd_usb.c
deleted file mode 100644
index f4fd4543a..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/openbsd_usb.c
+++ /dev/null
@@ -1,734 +0,0 @@
-/*
- * Copyright © 2011 Martin Pieuchot <mpi@openbsd.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <sys/time.h>
-#include <sys/types.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <dev/usb/usb.h>
-
-#include "libusb.h"
-#include "libusbi.h"
-
-struct device_priv {
- char devnode[16];
- int fd;
-
- unsigned char *cdesc; /* active config descriptor */
- usb_device_descriptor_t ddesc; /* usb device descriptor */
-};
-
-struct handle_priv {
- int pipe[2]; /* for event notification */
- int endpoints[USB_MAX_ENDPOINTS];
-};
-
-/*
- * Backend functions
- */
-static int obsd_get_device_list(struct libusb_context *,
- struct discovered_devs **);
-static int obsd_open(struct libusb_device_handle *);
-static void obsd_close(struct libusb_device_handle *);
-
-static int obsd_get_device_descriptor(struct libusb_device *, unsigned char *,
- int *);
-static int obsd_get_active_config_descriptor(struct libusb_device *,
- unsigned char *, size_t, int *);
-static int obsd_get_config_descriptor(struct libusb_device *, uint8_t,
- unsigned char *, size_t, int *);
-
-static int obsd_get_configuration(struct libusb_device_handle *, int *);
-static int obsd_set_configuration(struct libusb_device_handle *, int);
-
-static int obsd_claim_interface(struct libusb_device_handle *, int);
-static int obsd_release_interface(struct libusb_device_handle *, int);
-
-static int obsd_set_interface_altsetting(struct libusb_device_handle *, int,
- int);
-static int obsd_clear_halt(struct libusb_device_handle *, unsigned char);
-static int obsd_reset_device(struct libusb_device_handle *);
-static void obsd_destroy_device(struct libusb_device *);
-
-static int obsd_submit_transfer(struct usbi_transfer *);
-static int obsd_cancel_transfer(struct usbi_transfer *);
-static void obsd_clear_transfer_priv(struct usbi_transfer *);
-static int obsd_handle_events(struct libusb_context *ctx, struct pollfd *,
- nfds_t, int);
-static int obsd_clock_gettime(int, struct timespec *);
-
-/*
- * Private functions
- */
-static int _errno_to_libusb(int);
-static int _cache_active_config_descriptor(struct libusb_device *, int);
-static int _sync_control_transfer(struct usbi_transfer *);
-static int _sync_gen_transfer(struct usbi_transfer *);
-static int _access_endpoint(struct libusb_transfer *);
-
-const struct usbi_os_backend openbsd_backend = {
- "Synchronous OpenBSD backend",
- 0,
- NULL, /* init() */
- NULL, /* exit() */
- obsd_get_device_list,
- NULL, /* hotplug_poll */
- obsd_open,
- obsd_close,
-
- obsd_get_device_descriptor,
- obsd_get_active_config_descriptor,
- obsd_get_config_descriptor,
- NULL, /* get_config_descriptor_by_value() */
-
- obsd_get_configuration,
- obsd_set_configuration,
-
- obsd_claim_interface,
- obsd_release_interface,
-
- obsd_set_interface_altsetting,
- obsd_clear_halt,
- obsd_reset_device,
-
- NULL, /* kernel_driver_active() */
- NULL, /* detach_kernel_driver() */
- NULL, /* attach_kernel_driver() */
-
- obsd_destroy_device,
-
- obsd_submit_transfer,
- obsd_cancel_transfer,
- obsd_clear_transfer_priv,
-
- obsd_handle_events,
-
- obsd_clock_gettime,
- sizeof(struct device_priv),
- sizeof(struct handle_priv),
- 0, /* transfer_priv_size */
- 0, /* add_iso_packet_size */
-};
-
-int
-obsd_get_device_list(struct libusb_context * ctx,
- struct discovered_devs **discdevs)
-{
- struct libusb_device *dev;
- struct device_priv *dpriv;
- struct usb_device_info di;
- unsigned long session_id;
- char devnode[16];
- int fd, err, i;
-
- usbi_dbg("");
-
- /* Only ugen(4) is supported */
- for (i = 0; i < USB_MAX_DEVICES; i++) {
- /* Control endpoint is always .00 */
- snprintf(devnode, sizeof(devnode), "/dev/ugen%d.00", i);
-
- if ((fd = open(devnode, O_RDONLY)) < 0) {
- if (errno != ENOENT && errno != ENXIO)
- usbi_err(ctx, "could not open %s", devnode);
- continue;
- }
-
- if (ioctl(fd, USB_GET_DEVICEINFO, &di) < 0)
- continue;
-
- session_id = (di.udi_bus << 8 | di.udi_addr);
- dev = usbi_get_device_by_session_id(ctx, session_id);
-
- if (dev) {
- dev = libusb_ref_device(dev);
- } else {
- dev = usbi_alloc_device(ctx, session_id);
- if (dev == NULL)
- return (LIBUSB_ERROR_NO_MEM);
-
- dev->bus_number = di.udi_bus;
- dev->device_address = di.udi_addr;
- dev->speed = di.udi_speed;
-
- dpriv = (struct device_priv *)dev->os_priv;
- strlcpy(dpriv->devnode, devnode, sizeof(devnode));
- dpriv->fd = -1;
-
- if (ioctl(fd, USB_GET_DEVICE_DESC, &dpriv->ddesc) < 0) {
- err = errno;
- goto error;
- }
-
- dpriv->cdesc = NULL;
- if (_cache_active_config_descriptor(dev, fd)) {
- err = errno;
- goto error;
- }
-
- if ((err = usbi_sanitize_device(dev)))
- goto error;
- }
- close(fd);
-
- if (discovered_devs_append(*discdevs, dev) == NULL)
- return (LIBUSB_ERROR_NO_MEM);
-
- libusb_unref_device(dev);
- }
-
- return (LIBUSB_SUCCESS);
-
-error:
- close(fd);
- libusb_unref_device(dev);
- return _errno_to_libusb(err);
-}
-
-int
-obsd_open(struct libusb_device_handle *handle)
-{
- struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
- struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
-
- dpriv->fd = open(dpriv->devnode, O_RDWR);
- if (dpriv->fd < 0) {
- dpriv->fd = open(dpriv->devnode, O_RDONLY);
- if (dpriv->fd < 0)
- return _errno_to_libusb(errno);
- }
-
- usbi_dbg("open %s: fd %d", dpriv->devnode, dpriv->fd);
-
- if (pipe(hpriv->pipe) < 0)
- return _errno_to_libusb(errno);
-
- return usbi_add_pollfd(HANDLE_CTX(handle), hpriv->pipe[0], POLLIN);
-}
-
-void
-obsd_close(struct libusb_device_handle *handle)
-{
- struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
- struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
-
- usbi_dbg("close: fd %d", dpriv->fd);
-
- close(dpriv->fd);
- dpriv->fd = -1;
-
- usbi_remove_pollfd(HANDLE_CTX(handle), hpriv->pipe[0]);
-
- close(hpriv->pipe[0]);
- close(hpriv->pipe[1]);
-}
-
-int
-obsd_get_device_descriptor(struct libusb_device *dev, unsigned char *buf,
- int *host_endian)
-{
- struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
-
- usbi_dbg("");
-
- memcpy(buf, &dpriv->ddesc, DEVICE_DESC_LENGTH);
-
- *host_endian = 0;
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_get_active_config_descriptor(struct libusb_device *dev,
- unsigned char *buf, size_t len, int *host_endian)
-{
- struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
- usb_config_descriptor_t *ucd;
-
- ucd = (usb_config_descriptor_t *) dpriv->cdesc;
- len = MIN(len, UGETW(ucd->wTotalLength));
-
- usbi_dbg("len %d", len);
-
- memcpy(buf, dpriv->cdesc, len);
-
- *host_endian = 0;
-
- return len;
-}
-
-int
-obsd_get_config_descriptor(struct libusb_device *dev, uint8_t idx,
- unsigned char *buf, size_t len, int *host_endian)
-{
- struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
- struct usb_full_desc ufd;
- int fd, err;
-
- usbi_dbg("index %d, len %d", idx, len);
-
- /* A config descriptor may be requested before opening the device */
- if (dpriv->fd >= 0) {
- fd = dpriv->fd;
- } else {
- fd = open(dpriv->devnode, O_RDONLY);
- if (fd < 0)
- return _errno_to_libusb(errno);
- }
-
- ufd.ufd_config_index = idx;
- ufd.ufd_size = len;
- ufd.ufd_data = buf;
-
- if ((ioctl(fd, USB_GET_FULL_DESC, &ufd)) < 0) {
- err = errno;
- if (dpriv->fd < 0)
- close(fd);
- return _errno_to_libusb(err);
- }
-
- if (dpriv->fd < 0)
- close(fd);
-
- *host_endian = 0;
-
- return len;
-}
-
-int
-obsd_get_configuration(struct libusb_device_handle *handle, int *config)
-{
- struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
-
- usbi_dbg("");
-
- if (ioctl(dpriv->fd, USB_GET_CONFIG, config) < 0)
- return _errno_to_libusb(errno);
-
- usbi_dbg("configuration %d", *config);
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_set_configuration(struct libusb_device_handle *handle, int config)
-{
- struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
-
- usbi_dbg("configuration %d", config);
-
- if (ioctl(dpriv->fd, USB_SET_CONFIG, &config) < 0)
- return _errno_to_libusb(errno);
-
- return _cache_active_config_descriptor(handle->dev, dpriv->fd);
-}
-
-int
-obsd_claim_interface(struct libusb_device_handle *handle, int iface)
-{
- struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
- int i;
-
- for (i = 0; i < USB_MAX_ENDPOINTS; i++)
- hpriv->endpoints[i] = -1;
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_release_interface(struct libusb_device_handle *handle, int iface)
-{
- struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv;
- int i;
-
- for (i = 0; i < USB_MAX_ENDPOINTS; i++)
- if (hpriv->endpoints[i] >= 0)
- close(hpriv->endpoints[i]);
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_set_interface_altsetting(struct libusb_device_handle *handle, int iface,
- int altsetting)
-{
- struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
- struct usb_alt_interface intf;
-
- usbi_dbg("iface %d, setting %d", iface, altsetting);
-
- memset(&intf, 0, sizeof(intf));
-
- intf.uai_interface_index = iface;
- intf.uai_alt_no = altsetting;
-
- if (ioctl(dpriv->fd, USB_SET_ALTINTERFACE, &intf) < 0)
- return _errno_to_libusb(errno);
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_clear_halt(struct libusb_device_handle *handle, unsigned char endpoint)
-{
- struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv;
- struct usb_ctl_request req;
-
- usbi_dbg("");
-
- req.ucr_request.bmRequestType = UT_WRITE_ENDPOINT;
- req.ucr_request.bRequest = UR_CLEAR_FEATURE;
- USETW(req.ucr_request.wValue, UF_ENDPOINT_HALT);
- USETW(req.ucr_request.wIndex, endpoint);
- USETW(req.ucr_request.wLength, 0);
-
- if (ioctl(dpriv->fd, USB_DO_REQUEST, &req) < 0)
- return _errno_to_libusb(errno);
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_reset_device(struct libusb_device_handle *handle)
-{
- usbi_dbg("");
-
- return (LIBUSB_ERROR_NOT_SUPPORTED);
-}
-
-void
-obsd_destroy_device(struct libusb_device *dev)
-{
- struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
-
- usbi_dbg("");
-
- free(dpriv->cdesc);
-}
-
-int
-obsd_submit_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer;
- struct handle_priv *hpriv;
- int err = 0;
-
- usbi_dbg("");
-
- transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- hpriv = (struct handle_priv *)transfer->dev_handle->os_priv;
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- err = _sync_control_transfer(itransfer);
- break;
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- if (IS_XFEROUT(transfer)) {
- /* Isochronous write is not supported */
- err = LIBUSB_ERROR_NOT_SUPPORTED;
- break;
- }
- err = _sync_gen_transfer(itransfer);
- break;
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- if (IS_XFEROUT(transfer) &&
- transfer->flags & LIBUSB_TRANSFER_ADD_ZERO_PACKET) {
- err = LIBUSB_ERROR_NOT_SUPPORTED;
- break;
- }
- err = _sync_gen_transfer(itransfer);
- break;
- }
-
- if (err)
- return (err);
-
- if (write(hpriv->pipe[1], &itransfer, sizeof(itransfer)) < 0)
- return _errno_to_libusb(errno);
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_cancel_transfer(struct usbi_transfer *itransfer)
-{
- usbi_dbg("");
-
- return (LIBUSB_ERROR_NOT_SUPPORTED);
-}
-
-void
-obsd_clear_transfer_priv(struct usbi_transfer *itransfer)
-{
- usbi_dbg("");
-
- /* Nothing to do */
-}
-
-int
-obsd_handle_events(struct libusb_context *ctx, struct pollfd *fds, nfds_t nfds,
- int num_ready)
-{
- struct libusb_device_handle *handle;
- struct handle_priv *hpriv = NULL;
- struct usbi_transfer *itransfer;
- struct pollfd *pollfd;
- int i, err = 0;
-
- usbi_dbg("");
-
- pthread_mutex_lock(&ctx->open_devs_lock);
- for (i = 0; i < nfds && num_ready > 0; i++) {
- pollfd = &fds[i];
-
- if (!pollfd->revents)
- continue;
-
- hpriv = NULL;
- num_ready--;
- list_for_each_entry(handle, &ctx->open_devs, list,
- struct libusb_device_handle) {
- hpriv = (struct handle_priv *)handle->os_priv;
-
- if (hpriv->pipe[0] == pollfd->fd)
- break;
-
- hpriv = NULL;
- }
-
- if (NULL == hpriv) {
- usbi_dbg("fd %d is not an event pipe!", pollfd->fd);
- err = ENOENT;
- break;
- }
-
- if (pollfd->revents & POLLERR) {
- usbi_remove_pollfd(HANDLE_CTX(handle), hpriv->pipe[0]);
- usbi_handle_disconnect(handle);
- continue;
- }
-
- if (read(hpriv->pipe[0], &itransfer, sizeof(itransfer)) < 0) {
- err = errno;
- break;
- }
-
- if ((err = usbi_handle_transfer_completion(itransfer,
- LIBUSB_TRANSFER_COMPLETED)))
- break;
- }
- pthread_mutex_unlock(&ctx->open_devs_lock);
-
- if (err)
- return _errno_to_libusb(err);
-
- return (LIBUSB_SUCCESS);
-}
-
-int
-obsd_clock_gettime(int clkid, struct timespec *tp)
-{
- usbi_dbg("clock %d", clkid);
-
- if (clkid == USBI_CLOCK_REALTIME)
- return clock_gettime(CLOCK_REALTIME, tp);
-
- if (clkid == USBI_CLOCK_MONOTONIC)
- return clock_gettime(CLOCK_MONOTONIC, tp);
-
- return (LIBUSB_ERROR_INVALID_PARAM);
-}
-
-int
-_errno_to_libusb(int err)
-{
- switch (err) {
- case EIO:
- return (LIBUSB_ERROR_IO);
- case EACCES:
- return (LIBUSB_ERROR_ACCESS);
- case ENOENT:
- return (LIBUSB_ERROR_NO_DEVICE);
- case ENOMEM:
- return (LIBUSB_ERROR_NO_MEM);
- }
-
- usbi_dbg("error: %s", strerror(err));
-
- return (LIBUSB_ERROR_OTHER);
-}
-
-int
-_cache_active_config_descriptor(struct libusb_device *dev, int fd)
-{
- struct device_priv *dpriv = (struct device_priv *)dev->os_priv;
- struct usb_config_desc ucd;
- struct usb_full_desc ufd;
- unsigned char* buf;
- int len;
-
- usbi_dbg("fd %d", fd);
-
- ucd.ucd_config_index = USB_CURRENT_CONFIG_INDEX;
-
- if ((ioctl(fd, USB_GET_CONFIG_DESC, &ucd)) < 0)
- return _errno_to_libusb(errno);
-
- usbi_dbg("active bLength %d", ucd.ucd_desc.bLength);
-
- len = UGETW(ucd.ucd_desc.wTotalLength);
- buf = malloc(len);
- if (buf == NULL)
- return (LIBUSB_ERROR_NO_MEM);
-
- ufd.ufd_config_index = ucd.ucd_config_index;
- ufd.ufd_size = len;
- ufd.ufd_data = buf;
-
- usbi_dbg("index %d, len %d", ufd.ufd_config_index, len);
-
- if ((ioctl(fd, USB_GET_FULL_DESC, &ufd)) < 0) {
- free(buf);
- return _errno_to_libusb(errno);
- }
-
- if (dpriv->cdesc)
- free(dpriv->cdesc);
- dpriv->cdesc = buf;
-
- return (0);
-}
-
-int
-_sync_control_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer;
- struct libusb_control_setup *setup;
- struct device_priv *dpriv;
- struct usb_ctl_request req;
-
- transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- dpriv = (struct device_priv *)transfer->dev_handle->dev->os_priv;
- setup = (struct libusb_control_setup *)transfer->buffer;
-
- usbi_dbg("type %d request %d value %d index %d length %d timeout %d",
- setup->bmRequestType, setup->bRequest,
- libusb_le16_to_cpu(setup->wValue),
- libusb_le16_to_cpu(setup->wIndex),
- libusb_le16_to_cpu(setup->wLength), transfer->timeout);
-
- req.ucr_request.bmRequestType = setup->bmRequestType;
- req.ucr_request.bRequest = setup->bRequest;
- /* Don't use USETW, libusbx already deals with the endianness */
- (*(uint16_t *)req.ucr_request.wValue) = setup->wValue;
- (*(uint16_t *)req.ucr_request.wIndex) = setup->wIndex;
- (*(uint16_t *)req.ucr_request.wLength) = setup->wLength;
- req.ucr_data = transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
-
- if ((transfer->flags & LIBUSB_TRANSFER_SHORT_NOT_OK) == 0)
- req.ucr_flags = USBD_SHORT_XFER_OK;
-
- if ((ioctl(dpriv->fd, USB_SET_TIMEOUT, &transfer->timeout)) < 0)
- return _errno_to_libusb(errno);
-
- if ((ioctl(dpriv->fd, USB_DO_REQUEST, &req)) < 0)
- return _errno_to_libusb(errno);
-
- itransfer->transferred = req.ucr_actlen;
-
- usbi_dbg("transferred %d", itransfer->transferred);
-
- return (0);
-}
-
-int
-_access_endpoint(struct libusb_transfer *transfer)
-{
- struct handle_priv *hpriv;
- struct device_priv *dpriv;
- char *s, devnode[16];
- int fd, endpt;
- mode_t mode;
-
- hpriv = (struct handle_priv *)transfer->dev_handle->os_priv;
- dpriv = (struct device_priv *)transfer->dev_handle->dev->os_priv;
-
- endpt = UE_GET_ADDR(transfer->endpoint);
- mode = IS_XFERIN(transfer) ? O_RDONLY : O_WRONLY;
-
- usbi_dbg("endpoint %d mode %d", endpt, mode);
-
- if (hpriv->endpoints[endpt] < 0) {
- /* Pick the right node given the control one */
- strlcpy(devnode, dpriv->devnode, sizeof(devnode));
- s = strchr(devnode, '.');
- snprintf(s, 4, ".%02d", endpt);
-
- /* We may need to read/write to the same endpoint later. */
- if (((fd = open(devnode, O_RDWR)) < 0) && (errno == ENXIO))
- if ((fd = open(devnode, mode)) < 0)
- return (-1);
-
- hpriv->endpoints[endpt] = fd;
- }
-
- return (hpriv->endpoints[endpt]);
-}
-
-int
-_sync_gen_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer;
- int fd, nr = 1;
-
- transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- /*
- * Bulk, Interrupt or Isochronous transfer depends on the
- * endpoint and thus the node to open.
- */
- if ((fd = _access_endpoint(transfer)) < 0)
- return _errno_to_libusb(errno);
-
- if ((ioctl(fd, USB_SET_TIMEOUT, &transfer->timeout)) < 0)
- return _errno_to_libusb(errno);
-
- if (IS_XFERIN(transfer)) {
- if ((transfer->flags & LIBUSB_TRANSFER_SHORT_NOT_OK) == 0)
- if ((ioctl(fd, USB_SET_SHORT_XFER, &nr)) < 0)
- return _errno_to_libusb(errno);
-
- nr = read(fd, transfer->buffer, transfer->length);
- } else {
- nr = write(fd, transfer->buffer, transfer->length);
- }
-
- if (nr < 0)
- return _errno_to_libusb(errno);
-
- itransfer->transferred = nr;
-
- return (0);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.c
deleted file mode 100644
index eeaf5dce4..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * poll_posix: poll compatibility wrapper for POSIX systems
- * Copyright © 2013 RealVNC Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "libusbi.h"
-
-int usbi_pipe(int pipefd[2])
-{
- int ret = pipe(pipefd);
- if (ret != 0) {
- return ret;
- }
- ret = fcntl(pipefd[1], F_GETFL);
- if (ret == -1) {
- usbi_dbg("Failed to get pipe fd flags: %d", errno);
- goto err_close_pipe;
- }
- ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK);
- if (ret != 0) {
- usbi_dbg("Failed to set non-blocking on new pipe: %d", errno);
- goto err_close_pipe;
- }
-
- return 0;
-
-err_close_pipe:
- usbi_close(pipefd[0]);
- usbi_close(pipefd[1]);
- return ret;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.h
deleted file mode 100644
index 5b4b2c905..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_posix.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef LIBUSB_POLL_POSIX_H
-#define LIBUSB_POLL_POSIX_H
-
-#define usbi_write write
-#define usbi_read read
-#define usbi_close close
-#define usbi_poll poll
-
-int usbi_pipe(int pipefd[2]);
-
-#endif /* LIBUSB_POLL_POSIX_H */
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.c
deleted file mode 100644
index 7ed19ba32..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.c
+++ /dev/null
@@ -1,726 +0,0 @@
-/*
- * poll_windows: poll compatibility wrapper for Windows
- * Copyright © 2012-2013 RealVNC Ltd.
- * Copyright © 2009-2010 Pete Batard <pete@akeo.ie>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of poll implementation from libusb-win32, by Stephan Meyer et al.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-/*
- * poll() and pipe() Windows compatibility layer for libusbx 1.0
- *
- * The way this layer works is by using OVERLAPPED with async I/O transfers, as
- * OVERLAPPED have an associated event which is flagged for I/O completion.
- *
- * For USB pollable async I/O, you would typically:
- * - obtain a Windows HANDLE to a file or device that has been opened in
- * OVERLAPPED mode
- * - call usbi_create_fd with this handle to obtain a custom fd.
- * Note that if you need simultaneous R/W access, you need to call create_fd
- * twice, once in RW_READ and once in RW_WRITE mode to obtain 2 separate
- * pollable fds
- * - leave the core functions call the poll routine and flag POLLIN/POLLOUT
- *
- * The pipe pollable synchronous I/O works using the overlapped event associated
- * with a fake pipe. The read/write functions are only meant to be used in that
- * context.
- */
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "libusbi.h"
-
-// Uncomment to debug the polling layer
-//#define DEBUG_POLL_WINDOWS
-#if defined(DEBUG_POLL_WINDOWS)
-#define poll_dbg usbi_dbg
-#else
-// MSVC++ < 2005 cannot use a variadic argument and non MSVC
-// compilers produce warnings if parenthesis are ommitted.
-#if defined(_MSC_VER) && (_MSC_VER < 1400)
-#define poll_dbg
-#else
-#define poll_dbg(...)
-#endif
-#endif
-
-#if defined(_PREFAST_)
-#pragma warning(disable:28719)
-#endif
-
-#define CHECK_INIT_POLLING do {if(!is_polling_set) init_polling();} while(0)
-
-// public fd data
-const struct winfd INVALID_WINFD = {-1, INVALID_HANDLE_VALUE, NULL, NULL, NULL, RW_NONE};
-struct winfd poll_fd[MAX_FDS];
-// internal fd data
-struct {
- CRITICAL_SECTION mutex; // lock for fds
- // Additional variables for XP CancelIoEx partial emulation
- HANDLE original_handle;
- DWORD thread_id;
-} _poll_fd[MAX_FDS];
-
-// globals
-BOOLEAN is_polling_set = FALSE;
-LONG pipe_number = 0;
-static volatile LONG compat_spinlock = 0;
-
-#if !defined(_WIN32_WCE)
-// CancelIoEx, available on Vista and later only, provides the ability to cancel
-// a single transfer (OVERLAPPED) when used. As it may not be part of any of the
-// platform headers, we hook into the Kernel32 system DLL directly to seek it.
-static BOOL (__stdcall *pCancelIoEx)(HANDLE, LPOVERLAPPED) = NULL;
-#define Use_Duplicate_Handles (pCancelIoEx == NULL)
-
-static inline void setup_cancel_io(void)
-{
- HMODULE hKernel32 = GetModuleHandleA("KERNEL32");
- if (hKernel32 != NULL) {
- pCancelIoEx = (BOOL (__stdcall *)(HANDLE,LPOVERLAPPED))
- GetProcAddress(hKernel32, "CancelIoEx");
- }
- usbi_dbg("Will use CancelIo%s for I/O cancellation",
- Use_Duplicate_Handles?"":"Ex");
-}
-
-static inline BOOL cancel_io(int _index)
-{
- if ((_index < 0) || (_index >= MAX_FDS)) {
- return FALSE;
- }
-
- if ( (poll_fd[_index].fd < 0) || (poll_fd[_index].handle == INVALID_HANDLE_VALUE)
- || (poll_fd[_index].handle == 0) || (poll_fd[_index].overlapped == NULL) ) {
- return TRUE;
- }
- if (poll_fd[_index].itransfer && poll_fd[_index].cancel_fn) {
- // Cancel outstanding transfer via the specific callback
- (*poll_fd[_index].cancel_fn)(poll_fd[_index].itransfer);
- return TRUE;
- }
- if (pCancelIoEx != NULL) {
- return (*pCancelIoEx)(poll_fd[_index].handle, poll_fd[_index].overlapped);
- }
- if (_poll_fd[_index].thread_id == GetCurrentThreadId()) {
- return CancelIo(poll_fd[_index].handle);
- }
- usbi_warn(NULL, "Unable to cancel I/O that was started from another thread");
- return FALSE;
-}
-#else
-#define Use_Duplicate_Handles FALSE
-
-static __inline void setup_cancel_io()
-{
- // No setup needed on WinCE
-}
-
-static __inline BOOL cancel_io(int _index)
-{
- if ((_index < 0) || (_index >= MAX_FDS)) {
- return FALSE;
- }
- if ( (poll_fd[_index].fd < 0) || (poll_fd[_index].handle == INVALID_HANDLE_VALUE)
- || (poll_fd[_index].handle == 0) || (poll_fd[_index].overlapped == NULL) ) {
- return TRUE;
- }
- if (poll_fd[_index].itransfer && poll_fd[_index].cancel_fn) {
- // Cancel outstanding transfer via the specific callback
- (*poll_fd[_index].cancel_fn)(poll_fd[_index].itransfer);
- }
- return TRUE;
-}
-#endif
-
-// Init
-void init_polling(void)
-{
- int i;
-
- while (InterlockedExchange((LONG *)&compat_spinlock, 1) == 1) {
- SleepEx(0, TRUE);
- }
- if (!is_polling_set) {
- setup_cancel_io();
- for (i=0; i<MAX_FDS; i++) {
- poll_fd[i] = INVALID_WINFD;
- _poll_fd[i].original_handle = INVALID_HANDLE_VALUE;
- _poll_fd[i].thread_id = 0;
- InitializeCriticalSection(&_poll_fd[i].mutex);
- }
- is_polling_set = TRUE;
- }
- InterlockedExchange((LONG *)&compat_spinlock, 0);
-}
-
-// Internal function to retrieve the table index (and lock the fd mutex)
-static int _fd_to_index_and_lock(int fd)
-{
- int i;
-
- if (fd < 0)
- return -1;
-
- for (i=0; i<MAX_FDS; i++) {
- if (poll_fd[i].fd == fd) {
- EnterCriticalSection(&_poll_fd[i].mutex);
- // fd might have changed before we got to critical
- if (poll_fd[i].fd != fd) {
- LeaveCriticalSection(&_poll_fd[i].mutex);
- continue;
- }
- return i;
- }
- }
- return -1;
-}
-
-static OVERLAPPED *create_overlapped(void)
-{
- OVERLAPPED *overlapped = (OVERLAPPED*) calloc(1, sizeof(OVERLAPPED));
- if (overlapped == NULL) {
- return NULL;
- }
- overlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- if(overlapped->hEvent == NULL) {
- free (overlapped);
- return NULL;
- }
- return overlapped;
-}
-
-static void free_overlapped(OVERLAPPED *overlapped)
-{
- if (overlapped == NULL)
- return;
-
- if ( (overlapped->hEvent != 0)
- && (overlapped->hEvent != INVALID_HANDLE_VALUE) ) {
- CloseHandle(overlapped->hEvent);
- }
- free(overlapped);
-}
-
-void exit_polling(void)
-{
- int i;
-
- while (InterlockedExchange((LONG *)&compat_spinlock, 1) == 1) {
- SleepEx(0, TRUE);
- }
- if (is_polling_set) {
- is_polling_set = FALSE;
-
- for (i=0; i<MAX_FDS; i++) {
- // Cancel any async I/O (handle can be invalid)
- cancel_io(i);
- // If anything was pending on that I/O, it should be
- // terminating, and we should be able to access the fd
- // mutex lock before too long
- EnterCriticalSection(&_poll_fd[i].mutex);
- free_overlapped(poll_fd[i].overlapped);
- if (Use_Duplicate_Handles) {
- // Close duplicate handle
- if (_poll_fd[i].original_handle != INVALID_HANDLE_VALUE) {
- CloseHandle(poll_fd[i].handle);
- }
- }
- poll_fd[i] = INVALID_WINFD;
- LeaveCriticalSection(&_poll_fd[i].mutex);
- DeleteCriticalSection(&_poll_fd[i].mutex);
- }
- }
- InterlockedExchange((LONG *)&compat_spinlock, 0);
-}
-
-/*
- * Create a fake pipe.
- * As libusbx only uses pipes for signaling, all we need from a pipe is an
- * event. To that extent, we create a single wfd and overlapped as a means
- * to access that event.
- */
-int usbi_pipe(int filedes[2])
-{
- int i;
- OVERLAPPED* overlapped;
-
- CHECK_INIT_POLLING;
-
- overlapped = create_overlapped();
-
- if (overlapped == NULL) {
- return -1;
- }
- // The overlapped must have status pending for signaling to work in poll
- overlapped->Internal = STATUS_PENDING;
- overlapped->InternalHigh = 0;
-
- for (i=0; i<MAX_FDS; i++) {
- if (poll_fd[i].fd < 0) {
- EnterCriticalSection(&_poll_fd[i].mutex);
- // fd might have been allocated before we got to critical
- if (poll_fd[i].fd >= 0) {
- LeaveCriticalSection(&_poll_fd[i].mutex);
- continue;
- }
-
- // Use index as the unique fd number
- poll_fd[i].fd = i;
- // Read end of the "pipe"
- filedes[0] = poll_fd[i].fd;
- // We can use the same handle for both ends
- filedes[1] = filedes[0];
-
- poll_fd[i].handle = DUMMY_HANDLE;
- poll_fd[i].overlapped = overlapped;
- // There's no polling on the write end, so we just use READ for our needs
- poll_fd[i].rw = RW_READ;
- _poll_fd[i].original_handle = INVALID_HANDLE_VALUE;
- LeaveCriticalSection(&_poll_fd[i].mutex);
- return 0;
- }
- }
- free_overlapped(overlapped);
- return -1;
-}
-
-/*
- * Create both an fd and an OVERLAPPED from an open Windows handle, so that
- * it can be used with our polling function
- * The handle MUST support overlapped transfers (usually requires CreateFile
- * with FILE_FLAG_OVERLAPPED)
- * Return a pollable file descriptor struct, or INVALID_WINFD on error
- *
- * Note that the fd returned by this function is a per-transfer fd, rather
- * than a per-session fd and cannot be used for anything else but our
- * custom functions (the fd itself points to the NUL: device)
- * if you plan to do R/W on the same handle, you MUST create 2 fds: one for
- * read and one for write. Using a single R/W fd is unsupported and will
- * produce unexpected results
- */
-struct winfd usbi_create_fd(HANDLE handle, int access_mode, struct usbi_transfer *itransfer, cancel_transfer *cancel_fn)
-{
- int i;
- struct winfd wfd = INVALID_WINFD;
- OVERLAPPED* overlapped = NULL;
-
- CHECK_INIT_POLLING;
-
- if ((handle == 0) || (handle == INVALID_HANDLE_VALUE)) {
- return INVALID_WINFD;
- }
-
- wfd.itransfer = itransfer;
- wfd.cancel_fn = cancel_fn;
-
- if ((access_mode != RW_READ) && (access_mode != RW_WRITE)) {
- usbi_warn(NULL, "only one of RW_READ or RW_WRITE are supported.\n"
- "If you want to poll for R/W simultaneously, create multiple fds from the same handle.");
- return INVALID_WINFD;
- }
- if (access_mode == RW_READ) {
- wfd.rw = RW_READ;
- } else {
- wfd.rw = RW_WRITE;
- }
-
- overlapped = create_overlapped();
- if(overlapped == NULL) {
- return INVALID_WINFD;
- }
-
- for (i=0; i<MAX_FDS; i++) {
- if (poll_fd[i].fd < 0) {
- EnterCriticalSection(&_poll_fd[i].mutex);
- // fd might have been removed before we got to critical
- if (poll_fd[i].fd >= 0) {
- LeaveCriticalSection(&_poll_fd[i].mutex);
- continue;
- }
- // Use index as the unique fd number
- wfd.fd = i;
- // Attempt to emulate some of the CancelIoEx behaviour on platforms
- // that don't have it
- if (Use_Duplicate_Handles) {
- _poll_fd[i].thread_id = GetCurrentThreadId();
- if (!DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(),
- &wfd.handle, 0, TRUE, DUPLICATE_SAME_ACCESS)) {
- usbi_dbg("could not duplicate handle for CancelIo - using original one");
- wfd.handle = handle;
- // Make sure we won't close the original handle on fd deletion then
- _poll_fd[i].original_handle = INVALID_HANDLE_VALUE;
- } else {
- _poll_fd[i].original_handle = handle;
- }
- } else {
- wfd.handle = handle;
- }
- wfd.overlapped = overlapped;
- memcpy(&poll_fd[i], &wfd, sizeof(struct winfd));
- LeaveCriticalSection(&_poll_fd[i].mutex);
- return wfd;
- }
- }
- free_overlapped(overlapped);
- return INVALID_WINFD;
-}
-
-static void _free_index(int _index)
-{
- // Cancel any async IO (Don't care about the validity of our handles for this)
- cancel_io(_index);
- // close the duplicate handle (if we have an actual duplicate)
- if (Use_Duplicate_Handles) {
- if (_poll_fd[_index].original_handle != INVALID_HANDLE_VALUE) {
- CloseHandle(poll_fd[_index].handle);
- }
- _poll_fd[_index].original_handle = INVALID_HANDLE_VALUE;
- _poll_fd[_index].thread_id = 0;
- }
- free_overlapped(poll_fd[_index].overlapped);
- poll_fd[_index] = INVALID_WINFD;
-}
-
-/*
- * Release a pollable file descriptor.
- *
- * Note that the associated Windows handle is not closed by this call
- */
-void usbi_free_fd(struct winfd *wfd)
-{
- int _index;
-
- CHECK_INIT_POLLING;
-
- _index = _fd_to_index_and_lock(wfd->fd);
- if (_index < 0) {
- return;
- }
- _free_index(_index);
- *wfd = INVALID_WINFD;
- LeaveCriticalSection(&_poll_fd[_index].mutex);
-}
-
-/*
- * The functions below perform various conversions between fd, handle and OVERLAPPED
- */
-struct winfd fd_to_winfd(int fd)
-{
- int i;
- struct winfd wfd;
-
- CHECK_INIT_POLLING;
-
- if (fd <= 0)
- return INVALID_WINFD;
-
- for (i=0; i<MAX_FDS; i++) {
- if (poll_fd[i].fd == fd) {
- EnterCriticalSection(&_poll_fd[i].mutex);
- // fd might have been deleted before we got to critical
- if (poll_fd[i].fd != fd) {
- LeaveCriticalSection(&_poll_fd[i].mutex);
- continue;
- }
- memcpy(&wfd, &poll_fd[i], sizeof(struct winfd));
- LeaveCriticalSection(&_poll_fd[i].mutex);
- return wfd;
- }
- }
- return INVALID_WINFD;
-}
-
-struct winfd handle_to_winfd(HANDLE handle)
-{
- int i;
- struct winfd wfd;
-
- CHECK_INIT_POLLING;
-
- if ((handle == 0) || (handle == INVALID_HANDLE_VALUE))
- return INVALID_WINFD;
-
- for (i=0; i<MAX_FDS; i++) {
- if (poll_fd[i].handle == handle) {
- EnterCriticalSection(&_poll_fd[i].mutex);
- // fd might have been deleted before we got to critical
- if (poll_fd[i].handle != handle) {
- LeaveCriticalSection(&_poll_fd[i].mutex);
- continue;
- }
- memcpy(&wfd, &poll_fd[i], sizeof(struct winfd));
- LeaveCriticalSection(&_poll_fd[i].mutex);
- return wfd;
- }
- }
- return INVALID_WINFD;
-}
-
-struct winfd overlapped_to_winfd(OVERLAPPED* overlapped)
-{
- int i;
- struct winfd wfd;
-
- CHECK_INIT_POLLING;
-
- if (overlapped == NULL)
- return INVALID_WINFD;
-
- for (i=0; i<MAX_FDS; i++) {
- if (poll_fd[i].overlapped == overlapped) {
- EnterCriticalSection(&_poll_fd[i].mutex);
- // fd might have been deleted before we got to critical
- if (poll_fd[i].overlapped != overlapped) {
- LeaveCriticalSection(&_poll_fd[i].mutex);
- continue;
- }
- memcpy(&wfd, &poll_fd[i], sizeof(struct winfd));
- LeaveCriticalSection(&_poll_fd[i].mutex);
- return wfd;
- }
- }
- return INVALID_WINFD;
-}
-
-/*
- * POSIX poll equivalent, using Windows OVERLAPPED
- * Currently, this function only accepts one of POLLIN or POLLOUT per fd
- * (but you can create multiple fds from the same handle for read and write)
- */
-int usbi_poll(struct pollfd *fds, unsigned int nfds, int timeout)
-{
- unsigned i;
- int _index, object_index, triggered;
- HANDLE *handles_to_wait_on;
- int *handle_to_index;
- DWORD nb_handles_to_wait_on = 0;
- DWORD ret;
-
- CHECK_INIT_POLLING;
-
- triggered = 0;
- handles_to_wait_on = (HANDLE*) calloc(nfds+1, sizeof(HANDLE)); // +1 for fd_update
- handle_to_index = (int*) calloc(nfds, sizeof(int));
- if ((handles_to_wait_on == NULL) || (handle_to_index == NULL)) {
- errno = ENOMEM;
- triggered = -1;
- goto poll_exit;
- }
-
- for (i = 0; i < nfds; ++i) {
- fds[i].revents = 0;
-
- // Only one of POLLIN or POLLOUT can be selected with this version of poll (not both)
- if ((fds[i].events & ~POLLIN) && (!(fds[i].events & POLLOUT))) {
- fds[i].revents |= POLLERR;
- errno = EACCES;
- usbi_warn(NULL, "unsupported set of events");
- triggered = -1;
- goto poll_exit;
- }
-
- _index = _fd_to_index_and_lock(fds[i].fd);
- poll_dbg("fd[%d]=%d: (overlapped=%p) got events %04X", i, poll_fd[_index].fd, poll_fd[_index].overlapped, fds[i].events);
-
- if ( (_index < 0) || (poll_fd[_index].handle == INVALID_HANDLE_VALUE)
- || (poll_fd[_index].handle == 0) || (poll_fd[_index].overlapped == NULL)) {
- fds[i].revents |= POLLNVAL | POLLERR;
- errno = EBADF;
- if (_index >= 0) {
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- }
- usbi_warn(NULL, "invalid fd");
- triggered = -1;
- goto poll_exit;
- }
-
- // IN or OUT must match our fd direction
- if ((fds[i].events & POLLIN) && (poll_fd[_index].rw != RW_READ)) {
- fds[i].revents |= POLLNVAL | POLLERR;
- errno = EBADF;
- usbi_warn(NULL, "attempted POLLIN on fd without READ access");
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- triggered = -1;
- goto poll_exit;
- }
-
- if ((fds[i].events & POLLOUT) && (poll_fd[_index].rw != RW_WRITE)) {
- fds[i].revents |= POLLNVAL | POLLERR;
- errno = EBADF;
- usbi_warn(NULL, "attempted POLLOUT on fd without WRITE access");
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- triggered = -1;
- goto poll_exit;
- }
-
- // The following macro only works if overlapped I/O was reported pending
- if ( (HasOverlappedIoCompleted(poll_fd[_index].overlapped))
- || (HasOverlappedIoCompletedSync(poll_fd[_index].overlapped)) ) {
- poll_dbg(" completed");
- // checks above should ensure this works:
- fds[i].revents = fds[i].events;
- triggered++;
- } else {
- handles_to_wait_on[nb_handles_to_wait_on] = poll_fd[_index].overlapped->hEvent;
- handle_to_index[nb_handles_to_wait_on] = i;
- nb_handles_to_wait_on++;
- }
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- }
-
- // If nothing was triggered, wait on all fds that require it
- if ((timeout != 0) && (triggered == 0) && (nb_handles_to_wait_on != 0)) {
- if (timeout < 0) {
- poll_dbg("starting infinite wait for %d handles...", (int)nb_handles_to_wait_on);
- } else {
- poll_dbg("starting %d ms wait for %d handles...", timeout, (int)nb_handles_to_wait_on);
- }
- ret = WaitForMultipleObjects(nb_handles_to_wait_on, handles_to_wait_on,
- FALSE, (timeout<0)?INFINITE:(DWORD)timeout);
- object_index = ret-WAIT_OBJECT_0;
- if ((object_index >= 0) && ((DWORD)object_index < nb_handles_to_wait_on)) {
- poll_dbg(" completed after wait");
- i = handle_to_index[object_index];
- _index = _fd_to_index_and_lock(fds[i].fd);
- fds[i].revents = fds[i].events;
- triggered++;
- if (_index >= 0) {
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- }
- } else if (ret == WAIT_TIMEOUT) {
- poll_dbg(" timed out");
- triggered = 0; // 0 = timeout
- } else {
- errno = EIO;
- triggered = -1; // error
- }
- }
-
-poll_exit:
- if (handles_to_wait_on != NULL) {
- free(handles_to_wait_on);
- }
- if (handle_to_index != NULL) {
- free(handle_to_index);
- }
- return triggered;
-}
-
-/*
- * close a fake pipe fd
- */
-int usbi_close(int fd)
-{
- int _index;
- int r = -1;
-
- CHECK_INIT_POLLING;
-
- _index = _fd_to_index_and_lock(fd);
-
- if (_index < 0) {
- errno = EBADF;
- } else {
- free_overlapped(poll_fd[_index].overlapped);
- poll_fd[_index] = INVALID_WINFD;
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- }
- return r;
-}
-
-/*
- * synchronous write for fake "pipe" signaling
- */
-ssize_t usbi_write(int fd, const void *buf, size_t count)
-{
- int _index;
- UNUSED(buf);
-
- CHECK_INIT_POLLING;
-
- if (count != sizeof(unsigned char)) {
- usbi_err(NULL, "this function should only used for signaling");
- return -1;
- }
-
- _index = _fd_to_index_and_lock(fd);
-
- if ( (_index < 0) || (poll_fd[_index].overlapped == NULL) ) {
- errno = EBADF;
- if (_index >= 0) {
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- }
- return -1;
- }
-
- poll_dbg("set pipe event (fd = %d, thread = %08X)", _index, GetCurrentThreadId());
- SetEvent(poll_fd[_index].overlapped->hEvent);
- poll_fd[_index].overlapped->Internal = STATUS_WAIT_0;
- // If two threads write on the pipe at the same time, we need to
- // process two separate reads => use the overlapped as a counter
- poll_fd[_index].overlapped->InternalHigh++;
-
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- return sizeof(unsigned char);
-}
-
-/*
- * synchronous read for fake "pipe" signaling
- */
-ssize_t usbi_read(int fd, void *buf, size_t count)
-{
- int _index;
- ssize_t r = -1;
- UNUSED(buf);
-
- CHECK_INIT_POLLING;
-
- if (count != sizeof(unsigned char)) {
- usbi_err(NULL, "this function should only used for signaling");
- return -1;
- }
-
- _index = _fd_to_index_and_lock(fd);
-
- if (_index < 0) {
- errno = EBADF;
- return -1;
- }
-
- if (WaitForSingleObject(poll_fd[_index].overlapped->hEvent, INFINITE) != WAIT_OBJECT_0) {
- usbi_warn(NULL, "waiting for event failed: %d", (int)GetLastError());
- errno = EIO;
- goto out;
- }
-
- poll_dbg("clr pipe event (fd = %d, thread = %08X)", _index, GetCurrentThreadId());
- poll_fd[_index].overlapped->InternalHigh--;
- // Don't reset unless we don't have any more events to process
- if (poll_fd[_index].overlapped->InternalHigh <= 0) {
- ResetEvent(poll_fd[_index].overlapped->hEvent);
- poll_fd[_index].overlapped->Internal = STATUS_PENDING;
- }
-
- r = sizeof(unsigned char);
-
-out:
- LeaveCriticalSection(&_poll_fd[_index].mutex);
- return r;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.h
deleted file mode 100644
index deed20644..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/poll_windows.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Windows compat: POSIX compatibility wrapper
- * Copyright © 2012-2013 RealVNC Ltd.
- * Copyright © 2009-2010 Pete Batard <pete@akeo.ie>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of poll implementation from libusb-win32, by Stephan Meyer et al.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-#pragma once
-
-#if defined(_MSC_VER)
-// disable /W4 MSVC warnings that are benign
-#pragma warning(disable:4127) // conditional expression is constant
-#endif
-
-// Handle synchronous completion through the overlapped structure
-#if !defined(STATUS_REPARSE) // reuse the REPARSE status code
-#define STATUS_REPARSE ((LONG)0x00000104L)
-#endif
-#define STATUS_COMPLETED_SYNCHRONOUSLY STATUS_REPARSE
-#if defined(_WIN32_WCE)
-// WinCE doesn't have a HasOverlappedIoCompleted() macro, so attempt to emulate it
-#define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal) != STATUS_PENDING)
-#endif
-#define HasOverlappedIoCompletedSync(lpOverlapped) (((DWORD)(lpOverlapped)->Internal) == STATUS_COMPLETED_SYNCHRONOUSLY)
-
-#define DUMMY_HANDLE ((HANDLE)(LONG_PTR)-2)
-
-enum windows_version {
- WINDOWS_UNSUPPORTED,
- WINDOWS_CE,
- WINDOWS_XP,
- WINDOWS_2003, // also includes XP 64
- WINDOWS_VISTA_AND_LATER,
-};
-extern enum windows_version windows_version;
-
-#define MAX_FDS 256
-
-#define POLLIN 0x0001 /* There is data to read */
-#define POLLPRI 0x0002 /* There is urgent data to read */
-#define POLLOUT 0x0004 /* Writing now will not block */
-#define POLLERR 0x0008 /* Error condition */
-#define POLLHUP 0x0010 /* Hung up */
-#define POLLNVAL 0x0020 /* Invalid request: fd not open */
-
-struct pollfd {
- int fd; /* file descriptor */
- short events; /* requested events */
- short revents; /* returned events */
-};
-
-// access modes
-enum rw_type {
- RW_NONE,
- RW_READ,
- RW_WRITE,
-};
-
-// fd struct that can be used for polling on Windows
-typedef int cancel_transfer(struct usbi_transfer *itransfer);
-
-struct winfd {
- int fd; // what's exposed to libusb core
- HANDLE handle; // what we need to attach overlapped to the I/O op, so we can poll it
- OVERLAPPED* overlapped; // what will report our I/O status
- struct usbi_transfer *itransfer; // Associated transfer, or NULL if completed
- cancel_transfer *cancel_fn; // Function pointer to cancel transfer API
- enum rw_type rw; // I/O transfer direction: read *XOR* write (NOT BOTH)
-};
-extern const struct winfd INVALID_WINFD;
-
-int usbi_pipe(int pipefd[2]);
-int usbi_poll(struct pollfd *fds, unsigned int nfds, int timeout);
-ssize_t usbi_write(int fd, const void *buf, size_t count);
-ssize_t usbi_read(int fd, void *buf, size_t count);
-int usbi_close(int fd);
-
-void init_polling(void);
-void exit_polling(void);
-struct winfd usbi_create_fd(HANDLE handle, int access_mode,
- struct usbi_transfer *transfer, cancel_transfer *cancel_fn);
-void usbi_free_fd(struct winfd* winfd);
-struct winfd fd_to_winfd(int fd);
-struct winfd handle_to_winfd(HANDLE handle);
-struct winfd overlapped_to_winfd(OVERLAPPED* overlapped);
-
-/*
- * Timeval operations
- */
-#if defined(DDKBUILD)
-#include <winsock.h> // defines timeval functions on DDK
-#endif
-
-#if !defined(TIMESPEC_TO_TIMEVAL)
-#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
- (tv)->tv_sec = (long)(ts)->tv_sec; \
- (tv)->tv_usec = (long)(ts)->tv_nsec / 1000; \
-}
-#endif
-#if !defined(timersub)
-#define timersub(a, b, result) \
-do { \
- (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
- (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
- if ((result)->tv_usec < 0) { \
- --(result)->tv_sec; \
- (result)->tv_usec += 1000000; \
- } \
-} while (0)
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.c
deleted file mode 100644
index 9769f5836..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * libusbx synchronization using POSIX Threads
- *
- * Copyright © 2011 Vitali Lovich <vlovich@aliph.com>
- * Copyright © 2011 Peter Stuge <peter@stuge.se>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if defined(__linux__) || defined(__OpenBSD__)
-# if defined(__linux__)
-# define _GNU_SOURCE
-# else
-# define _BSD_SOURCE
-# endif
-# include <unistd.h>
-# include <sys/syscall.h>
-#elif defined(__APPLE__)
-# include <mach/mach.h>
-#elif defined(__CYGWIN__)
-# include <windows.h>
-#endif
-
-#include "threads_posix.h"
-
-int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
-{
- int err;
- pthread_mutexattr_t stack_attr;
- if (!attr) {
- attr = &stack_attr;
- err = pthread_mutexattr_init(&stack_attr);
- if (err != 0)
- return err;
- }
-
- /* mutexattr_settype requires _GNU_SOURCE or _XOPEN_SOURCE >= 500 on Linux */
- err = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
- if (err != 0)
- goto finish;
-
- err = pthread_mutex_init(mutex, attr);
-
-finish:
- if (attr == &stack_attr)
- pthread_mutexattr_destroy(&stack_attr);
-
- return err;
-}
-
-int usbi_get_tid(void)
-{
- int ret = -1;
-#if defined(__linux__)
- ret = syscall(SYS_gettid);
-#elif defined(__OpenBSD__)
- /* The following only works with OpenBSD > 5.1 as it requires
- real thread support. For 5.1 and earlier, -1 is returned. */
- ret = syscall(SYS_getthrid);
-#elif defined(__APPLE__)
- ret = mach_thread_self();
- mach_port_deallocate(mach_task_self(), ret);
-#elif defined(__CYGWIN__)
- ret = GetCurrentThreadId();
-#endif
-/* TODO: NetBSD thread ID support */
- return ret;
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.h
deleted file mode 100644
index 0b6a71a55..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_posix.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * libusbx synchronization using POSIX Threads
- *
- * Copyright © 2010 Peter Stuge <peter@stuge.se>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LIBUSB_THREADS_POSIX_H
-#define LIBUSB_THREADS_POSIX_H
-
-#include <pthread.h>
-
-#define usbi_mutex_static_t pthread_mutex_t
-#define USBI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-#define usbi_mutex_static_lock pthread_mutex_lock
-#define usbi_mutex_static_unlock pthread_mutex_unlock
-
-#define usbi_mutex_t pthread_mutex_t
-#define usbi_mutex_init pthread_mutex_init
-#define usbi_mutex_lock pthread_mutex_lock
-#define usbi_mutex_unlock pthread_mutex_unlock
-#define usbi_mutex_trylock pthread_mutex_trylock
-#define usbi_mutex_destroy pthread_mutex_destroy
-
-#define usbi_cond_t pthread_cond_t
-#define usbi_cond_init pthread_cond_init
-#define usbi_cond_wait pthread_cond_wait
-#define usbi_cond_timedwait pthread_cond_timedwait
-#define usbi_cond_broadcast pthread_cond_broadcast
-#define usbi_cond_destroy pthread_cond_destroy
-#define usbi_cond_signal pthread_cond_signal
-
-extern int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr);
-
-int usbi_get_tid(void);
-
-#endif /* LIBUSB_THREADS_POSIX_H */
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.c
deleted file mode 100644
index cad27e9ea..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * libusbx synchronization on Microsoft Windows
- *
- * Copyright © 2010 Michael Plante <michael.plante@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <config.h>
-#include <objbase.h>
-#include <errno.h>
-#include <stdarg.h>
-
-#include "libusbi.h"
-
-extern const uint64_t epoch_time;
-
-int usbi_mutex_init(usbi_mutex_t *mutex,
- const usbi_mutexattr_t *attr) {
- UNUSED(attr);
- if(! mutex) return ((errno=EINVAL));
- *mutex = CreateMutex(NULL, FALSE, NULL);
- if(!*mutex) return ((errno=ENOMEM));
- return 0;
-}
-int usbi_mutex_destroy(usbi_mutex_t *mutex) {
- // It is not clear if CloseHandle failure is due to failure to unlock.
- // If so, this should be errno=EBUSY.
- if(!mutex || !CloseHandle(*mutex)) return ((errno=EINVAL));
- *mutex = NULL;
- return 0;
-}
-int usbi_mutex_trylock(usbi_mutex_t *mutex) {
- DWORD result;
- if(!mutex) return ((errno=EINVAL));
- result = WaitForSingleObject(*mutex, 0);
- if(result == WAIT_OBJECT_0 || result == WAIT_ABANDONED)
- return 0; // acquired (ToDo: check that abandoned is ok)
- if(result == WAIT_TIMEOUT)
- return ((errno=EBUSY));
- return ((errno=EINVAL)); // don't know how this would happen
- // so don't know proper errno
-}
-int usbi_mutex_lock(usbi_mutex_t *mutex) {
- DWORD result;
- if(!mutex) return ((errno=EINVAL));
- result = WaitForSingleObject(*mutex, INFINITE);
- if(result == WAIT_OBJECT_0 || result == WAIT_ABANDONED)
- return 0; // acquired (ToDo: check that abandoned is ok)
- return ((errno=EINVAL)); // don't know how this would happen
- // so don't know proper errno
-}
-int usbi_mutex_unlock(usbi_mutex_t *mutex) {
- if(!mutex) return ((errno=EINVAL));
- if(!ReleaseMutex(*mutex)) return ((errno=EPERM ));
- return 0;
-}
-
-int usbi_mutex_static_lock(usbi_mutex_static_t *mutex) {
- if(!mutex) return ((errno=EINVAL));
- while (InterlockedExchange((LONG *)mutex, 1) == 1) {
- SleepEx(0, TRUE);
- }
- return 0;
-}
-int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex) {
- if(!mutex) return ((errno=EINVAL));
- *mutex = 0;
- return 0;
-}
-
-int usbi_cond_init(usbi_cond_t *cond,
- const usbi_condattr_t *attr) {
- UNUSED(attr);
- if(!cond) return ((errno=EINVAL));
- list_init(&cond->waiters );
- list_init(&cond->not_waiting);
- return 0;
-}
-int usbi_cond_destroy(usbi_cond_t *cond) {
- // This assumes no one is using this anymore. The check MAY NOT BE safe.
- struct usbi_cond_perthread *pos, *next_pos = NULL;
- if(!cond) return ((errno=EINVAL));
- if(!list_empty(&cond->waiters)) return ((errno=EBUSY )); // (!see above!)
- list_for_each_entry_safe(pos, next_pos, &cond->not_waiting, list, struct usbi_cond_perthread) {
- CloseHandle(pos->event);
- list_del(&pos->list);
- free(pos);
- }
-
- return 0;
-}
-
-int usbi_cond_broadcast(usbi_cond_t *cond) {
- // Assumes mutex is locked; this is not in keeping with POSIX spec, but
- // libusb does this anyway, so we simplify by not adding more sync
- // primitives to the CV definition!
- int fail = 0;
- struct usbi_cond_perthread *pos;
- if(!cond) return ((errno=EINVAL));
- list_for_each_entry(pos, &cond->waiters, list, struct usbi_cond_perthread) {
- if(!SetEvent(pos->event))
- fail = 1;
- }
- // The wait function will remove its respective item from the list.
- return fail ? ((errno=EINVAL)) : 0;
-}
-int usbi_cond_signal(usbi_cond_t *cond) {
- // Assumes mutex is locked; this is not in keeping with POSIX spec, but
- // libusb does this anyway, so we simplify by not adding more sync
- // primitives to the CV definition!
- struct usbi_cond_perthread *pos;
- if(!cond) return ((errno=EINVAL));
- if(list_empty(&cond->waiters)) return 0; // no one to wakeup.
- pos = list_entry(&cond->waiters.next, struct usbi_cond_perthread, list);
- // The wait function will remove its respective item from the list.
- return SetEvent(pos->event) ? 0 : ((errno=EINVAL));
-}
-__inline static int usbi_cond_intwait(usbi_cond_t *cond,
- usbi_mutex_t *mutex,
- DWORD timeout_ms) {
- struct usbi_cond_perthread *pos;
- int found = 0, r;
- DWORD r2,tid = GetCurrentThreadId();
- if(!cond || !mutex) return ((errno=EINVAL));
- list_for_each_entry(pos, &cond->not_waiting, list, struct usbi_cond_perthread) {
- if(tid == pos->tid) {
- found = 1;
- break;
- }
- }
- if(!found) {
- pos = (struct usbi_cond_perthread*) calloc(1, sizeof(struct usbi_cond_perthread));
- if(!pos) return ((errno=ENOMEM)); // This errno is not POSIX-allowed.
- pos->tid = tid;
- pos->event = CreateEvent(NULL, FALSE, FALSE, NULL); // auto-reset.
- if(!pos->event) {
- free(pos);
- return ((errno=ENOMEM));
- }
- list_add(&pos->list, &cond->not_waiting);
- }
-
- list_del(&pos->list); // remove from not_waiting list.
- list_add(&pos->list, &cond->waiters);
-
- r = usbi_mutex_unlock(mutex);
- if(r) return r;
- r2 = WaitForSingleObject(pos->event, timeout_ms);
- r = usbi_mutex_lock(mutex);
- if(r) return r;
-
- list_del(&pos->list);
- list_add(&pos->list, &cond->not_waiting);
-
- if(r2 == WAIT_TIMEOUT) return ((errno=ETIMEDOUT));
-
- return 0;
-}
-// N.B.: usbi_cond_*wait() can also return ENOMEM, even though pthread_cond_*wait cannot!
-int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex) {
- return usbi_cond_intwait(cond, mutex, INFINITE);
-}
-int usbi_cond_timedwait(usbi_cond_t *cond,
- usbi_mutex_t *mutex,
- const struct timespec *abstime) {
- FILETIME filetime;
- ULARGE_INTEGER rtime;
- struct timeval targ_time, cur_time, delta_time;
- struct timespec cur_time_ns;
- DWORD millis;
-
- // GetSystemTimeAsFileTime() is not available on CE
- SYSTEMTIME st;
- GetSystemTime(&st);
- SystemTimeToFileTime(&st, &filetime);
- rtime.LowPart = filetime.dwLowDateTime;
- rtime.HighPart = filetime.dwHighDateTime;
- rtime.QuadPart -= epoch_time;
- cur_time_ns.tv_sec = (long)(rtime.QuadPart / 10000000);
- cur_time_ns.tv_nsec = (long)((rtime.QuadPart % 10000000)*100);
- TIMESPEC_TO_TIMEVAL(&cur_time, &cur_time_ns);
-
- TIMESPEC_TO_TIMEVAL(&targ_time, abstime);
- timersub(&targ_time, &cur_time, &delta_time);
- if(delta_time.tv_sec < 0) // abstime already passed?
- millis = 0;
- else {
- millis = delta_time.tv_usec/1000;
- millis += delta_time.tv_sec *1000;
- if (delta_time.tv_usec % 1000) // round up to next millisecond
- millis++;
- }
-
- return usbi_cond_intwait(cond, mutex, millis);
-}
-
-int usbi_get_tid(void) {
- return GetCurrentThreadId();
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.h
deleted file mode 100644
index df8a0eeb0..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/threads_windows.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * libusbx synchronization on Microsoft Windows
- *
- * Copyright © 2010 Michael Plante <michael.plante@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LIBUSB_THREADS_WINDOWS_H
-#define LIBUSB_THREADS_WINDOWS_H
-
-#define usbi_mutex_static_t volatile LONG
-#define USBI_MUTEX_INITIALIZER 0
-
-#define usbi_mutex_t HANDLE
-
-struct usbi_cond_perthread {
- struct list_head list;
- DWORD tid;
- HANDLE event;
-};
-struct usbi_cond_t_ {
- // Every time a thread touches the CV, it winds up in one of these lists.
- // It stays there until the CV is destroyed, even if the thread
- // terminates.
- struct list_head waiters;
- struct list_head not_waiting;
-};
-typedef struct usbi_cond_t_ usbi_cond_t;
-
-// We *were* getting timespec from pthread.h:
-#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
-#define HAVE_STRUCT_TIMESPEC 1
-#define _TIMESPEC_DEFINED 1
-struct timespec {
- long tv_sec;
- long tv_nsec;
-};
-#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
-
-// We *were* getting ETIMEDOUT from pthread.h:
-#ifndef ETIMEDOUT
-# define ETIMEDOUT 10060 /* This is the value in winsock.h. */
-#endif
-
-#define usbi_mutexattr_t void
-#define usbi_condattr_t void
-
-// all Windows mutexes are recursive
-#define usbi_mutex_init_recursive(mutex, attr) usbi_mutex_init((mutex), (attr))
-
-int usbi_mutex_static_lock(usbi_mutex_static_t *mutex);
-int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex);
-
-
-int usbi_mutex_init(usbi_mutex_t *mutex,
- const usbi_mutexattr_t *attr);
-int usbi_mutex_lock(usbi_mutex_t *mutex);
-int usbi_mutex_unlock(usbi_mutex_t *mutex);
-int usbi_mutex_trylock(usbi_mutex_t *mutex);
-int usbi_mutex_destroy(usbi_mutex_t *mutex);
-
-int usbi_cond_init(usbi_cond_t *cond,
- const usbi_condattr_t *attr);
-int usbi_cond_destroy(usbi_cond_t *cond);
-int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex);
-int usbi_cond_timedwait(usbi_cond_t *cond,
- usbi_mutex_t *mutex,
- const struct timespec *abstime);
-int usbi_cond_broadcast(usbi_cond_t *cond);
-int usbi_cond_signal(usbi_cond_t *cond);
-
-int usbi_get_tid(void);
-
-#endif /* LIBUSB_THREADS_WINDOWS_H */
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.c
deleted file mode 100644
index e4a66331e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.c
+++ /dev/null
@@ -1,1015 +0,0 @@
-/*
- * Windows CE backend for libusbx 1.0
- * Copyright © 2011-2013 RealVNC Ltd.
- * Large portions taken from Windows backend, which is
- * Copyright © 2009-2010 Pete Batard <pbatard@gmail.com>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
- * Major code testing contribution by Xiaofan Chen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <libusbi.h>
-
-#include <stdint.h>
-#include <errno.h>
-#include <inttypes.h>
-
-#include "wince_usb.h"
-
-// Forward declares
-static int wince_clock_gettime(int clk_id, struct timespec *tp);
-unsigned __stdcall wince_clock_gettime_threaded(void* param);
-
-// Global variables
-uint64_t hires_frequency, hires_ticks_to_ps;
-int errno;
-const uint64_t epoch_time = UINT64_C(116444736000000000); // 1970.01.01 00:00:000 in MS Filetime
-enum windows_version windows_version = WINDOWS_CE;
-static int concurrent_usage = -1;
-// Timer thread
-// NB: index 0 is for monotonic and 1 is for the thread exit event
-HANDLE timer_thread = NULL;
-HANDLE timer_mutex = NULL;
-struct timespec timer_tp;
-volatile LONG request_count[2] = {0, 1}; // last one must be > 0
-HANDLE timer_request[2] = { NULL, NULL };
-HANDLE timer_response = NULL;
-HANDLE driver_handle = INVALID_HANDLE_VALUE;
-
-/*
- * Converts a windows error to human readable string
- * uses retval as errorcode, or, if 0, use GetLastError()
- */
-#if defined(ENABLE_LOGGING)
-static char* windows_error_str(uint32_t retval)
-{
- static TCHAR wErr_string[ERR_BUFFER_SIZE];
- static char err_string[ERR_BUFFER_SIZE];
-
- DWORD size;
- size_t i;
- uint32_t error_code, format_error;
-
- error_code = retval?retval:GetLastError();
-
- safe_stprintf(wErr_string, ERR_BUFFER_SIZE, _T("[%d] "), error_code);
-
- size = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &wErr_string[safe_tcslen(wErr_string)],
- ERR_BUFFER_SIZE - (DWORD)safe_tcslen(wErr_string), NULL);
- if (size == 0) {
- format_error = GetLastError();
- if (format_error)
- safe_stprintf(wErr_string, ERR_BUFFER_SIZE,
- _T("Windows error code %u (FormatMessage error code %u)"), error_code, format_error);
- else
- safe_stprintf(wErr_string, ERR_BUFFER_SIZE, _T("Unknown error code %u"), error_code);
- } else {
- // Remove CR/LF terminators
- for (i=safe_tcslen(wErr_string)-1; ((wErr_string[i]==0x0A) || (wErr_string[i]==0x0D)); i--) {
- wErr_string[i] = 0;
- }
- }
- if (WideCharToMultiByte(CP_ACP, 0, wErr_string, -1, err_string, ERR_BUFFER_SIZE, NULL, NULL) < 0)
- {
- strcpy(err_string, "Unable to convert error string");
- }
- return err_string;
-}
-#endif
-
-static struct wince_device_priv *_device_priv(struct libusb_device *dev)
-{
- return (struct wince_device_priv *) dev->os_priv;
-}
-
-// ceusbkwrapper to libusb error code mapping
-static int translate_driver_error(int error)
-{
- switch (error) {
- case ERROR_INVALID_PARAMETER:
- return LIBUSB_ERROR_INVALID_PARAM;
- case ERROR_CALL_NOT_IMPLEMENTED:
- case ERROR_NOT_SUPPORTED:
- return LIBUSB_ERROR_NOT_SUPPORTED;
- case ERROR_NOT_ENOUGH_MEMORY:
- return LIBUSB_ERROR_NO_MEM;
- case ERROR_INVALID_HANDLE:
- return LIBUSB_ERROR_NO_DEVICE;
- case ERROR_BUSY:
- return LIBUSB_ERROR_BUSY;
-
- // Error codes that are either unexpected, or have
- // no suitable LIBUSB_ERROR equivilant.
- case ERROR_CANCELLED:
- case ERROR_INTERNAL_ERROR:
- default:
- return LIBUSB_ERROR_OTHER;
- }
-}
-
-static int init_dllimports()
-{
- DLL_LOAD(ceusbkwrapper.dll, UkwOpenDriver, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwGetDeviceList, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwReleaseDeviceList, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwGetDeviceAddress, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwGetDeviceDescriptor, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwGetConfigDescriptor, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwCloseDriver, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwCancelTransfer, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwIssueControlTransfer, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwClaimInterface, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwReleaseInterface, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwSetInterfaceAlternateSetting, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwClearHaltHost, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwClearHaltDevice, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwGetConfig, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwSetConfig, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwResetDevice, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwKernelDriverActive, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwAttachKernelDriver, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwDetachKernelDriver, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwIssueBulkTransfer, TRUE);
- DLL_LOAD(ceusbkwrapper.dll, UkwIsPipeHalted, TRUE);
- return LIBUSB_SUCCESS;
-}
-
-static int init_device(struct libusb_device *dev, UKW_DEVICE drv_dev,
- unsigned char bus_addr, unsigned char dev_addr)
-{
- struct wince_device_priv *priv = _device_priv(dev);
- int r = LIBUSB_SUCCESS;
-
- dev->bus_number = bus_addr;
- dev->device_address = dev_addr;
- priv->dev = drv_dev;
-
- if (!UkwGetDeviceDescriptor(priv->dev, &(priv->desc))) {
- r = translate_driver_error(GetLastError());
- }
- return r;
-}
-
-// Internal API functions
-static int wince_init(struct libusb_context *ctx)
-{
- int i, r = LIBUSB_ERROR_OTHER;
- HANDLE semaphore;
- TCHAR sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
-
- _stprintf(sem_name, _T("libusb_init%08X"), (unsigned int)GetCurrentProcessId()&0xFFFFFFFF);
- semaphore = CreateSemaphore(NULL, 1, 1, sem_name);
- if (semaphore == NULL) {
- usbi_err(ctx, "could not create semaphore: %s", windows_error_str(0));
- return LIBUSB_ERROR_NO_MEM;
- }
-
- // A successful wait brings our semaphore count to 0 (unsignaled)
- // => any concurent wait stalls until the semaphore's release
- if (WaitForSingleObject(semaphore, INFINITE) != WAIT_OBJECT_0) {
- usbi_err(ctx, "failure to access semaphore: %s", windows_error_str(0));
- CloseHandle(semaphore);
- return LIBUSB_ERROR_NO_MEM;
- }
-
- // NB: concurrent usage supposes that init calls are equally balanced with
- // exit calls. If init is called more than exit, we will not exit properly
- if ( ++concurrent_usage == 0 ) { // First init?
- // Initialize pollable file descriptors
- init_polling();
-
- // Load DLL imports
- if (init_dllimports() != LIBUSB_SUCCESS) {
- usbi_err(ctx, "could not resolve DLL functions");
- r = LIBUSB_ERROR_NOT_SUPPORTED;
- goto init_exit;
- }
-
- // try to open a handle to the driver
- driver_handle = UkwOpenDriver();
- if (driver_handle == INVALID_HANDLE_VALUE) {
- usbi_err(ctx, "could not connect to driver");
- r = LIBUSB_ERROR_NOT_SUPPORTED;
- goto init_exit;
- }
-
- // Windows CE doesn't have a way of specifying thread affinity, so this code
- // just has to hope QueryPerformanceCounter doesn't report different values when
- // running on different cores.
- r = LIBUSB_ERROR_NO_MEM;
- for (i = 0; i < 2; i++) {
- timer_request[i] = CreateEvent(NULL, TRUE, FALSE, NULL);
- if (timer_request[i] == NULL) {
- usbi_err(ctx, "could not create timer request event %d - aborting", i);
- goto init_exit;
- }
- }
- timer_response = CreateSemaphore(NULL, 0, MAX_TIMER_SEMAPHORES, NULL);
- if (timer_response == NULL) {
- usbi_err(ctx, "could not create timer response semaphore - aborting");
- goto init_exit;
- }
- timer_mutex = CreateMutex(NULL, FALSE, NULL);
- if (timer_mutex == NULL) {
- usbi_err(ctx, "could not create timer mutex - aborting");
- goto init_exit;
- }
- timer_thread = CreateThread(NULL, 0, wince_clock_gettime_threaded, NULL, 0, NULL);
- if (timer_thread == NULL) {
- usbi_err(ctx, "Unable to create timer thread - aborting");
- goto init_exit;
- }
- }
- // At this stage, either we went through full init successfully, or didn't need to
- r = LIBUSB_SUCCESS;
-
-init_exit: // Holds semaphore here.
- if (!concurrent_usage && r != LIBUSB_SUCCESS) { // First init failed?
- if (driver_handle != INVALID_HANDLE_VALUE) {
- UkwCloseDriver(driver_handle);
- driver_handle = INVALID_HANDLE_VALUE;
- }
- if (timer_thread) {
- SetEvent(timer_request[1]); // actually the signal to quit the thread.
- if (WAIT_OBJECT_0 != WaitForSingleObject(timer_thread, INFINITE)) {
- usbi_warn(ctx, "could not wait for timer thread to quit");
- TerminateThread(timer_thread, 1); // shouldn't happen, but we're destroying
- // all objects it might have held anyway.
- }
- CloseHandle(timer_thread);
- timer_thread = NULL;
- }
- for (i = 0; i < 2; i++) {
- if (timer_request[i]) {
- CloseHandle(timer_request[i]);
- timer_request[i] = NULL;
- }
- }
- if (timer_response) {
- CloseHandle(timer_response);
- timer_response = NULL;
- }
- if (timer_mutex) {
- CloseHandle(timer_mutex);
- timer_mutex = NULL;
- }
- }
-
- if (r != LIBUSB_SUCCESS)
- --concurrent_usage; // Not expected to call libusb_exit if we failed.
-
- ReleaseSemaphore(semaphore, 1, NULL); // increase count back to 1
- CloseHandle(semaphore);
- return r;
-}
-
-static void wince_exit(void)
-{
- int i;
- HANDLE semaphore;
- TCHAR sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
-
- _stprintf(sem_name, _T("libusb_init%08X"), (unsigned int)GetCurrentProcessId()&0xFFFFFFFF);
- semaphore = CreateSemaphore(NULL, 1, 1, sem_name);
- if (semaphore == NULL) {
- return;
- }
-
- // A successful wait brings our semaphore count to 0 (unsignaled)
- // => any concurent wait stalls until the semaphore release
- if (WaitForSingleObject(semaphore, INFINITE) != WAIT_OBJECT_0) {
- CloseHandle(semaphore);
- return;
- }
-
- // Only works if exits and inits are balanced exactly
- if (--concurrent_usage < 0) { // Last exit
- exit_polling();
-
- if (timer_thread) {
- SetEvent(timer_request[1]); // actually the signal to quit the thread.
- if (WAIT_OBJECT_0 != WaitForSingleObject(timer_thread, INFINITE)) {
- usbi_dbg("could not wait for timer thread to quit");
- TerminateThread(timer_thread, 1);
- }
- CloseHandle(timer_thread);
- timer_thread = NULL;
- }
- for (i = 0; i < 2; i++) {
- if (timer_request[i]) {
- CloseHandle(timer_request[i]);
- timer_request[i] = NULL;
- }
- }
- if (timer_response) {
- CloseHandle(timer_response);
- timer_response = NULL;
- }
- if (timer_mutex) {
- CloseHandle(timer_mutex);
- timer_mutex = NULL;
- }
- if (driver_handle != INVALID_HANDLE_VALUE) {
- UkwCloseDriver(driver_handle);
- driver_handle = INVALID_HANDLE_VALUE;
- }
- }
-
- ReleaseSemaphore(semaphore, 1, NULL); // increase count back to 1
- CloseHandle(semaphore);
-}
-
-static int wince_get_device_list(
- struct libusb_context *ctx,
- struct discovered_devs **discdevs)
-{
- UKW_DEVICE devices[MAX_DEVICE_COUNT];
- struct discovered_devs * new_devices = *discdevs;
- DWORD count = 0, i;
- struct libusb_device *dev = NULL;
- unsigned char bus_addr, dev_addr;
- unsigned long session_id;
- BOOL success;
- DWORD release_list_offset = 0;
- int r = LIBUSB_SUCCESS;
-
- success = UkwGetDeviceList(driver_handle, devices, MAX_DEVICE_COUNT, &count);
- if (!success) {
- int libusbErr = translate_driver_error(GetLastError());
- usbi_err(ctx, "could not get devices: %s", windows_error_str(0));
- return libusbErr;
- }
- for(i = 0; i < count; ++i) {
- release_list_offset = i;
- success = UkwGetDeviceAddress(devices[i], &bus_addr, &dev_addr, &session_id);
- if (!success) {
- r = translate_driver_error(GetLastError());
- usbi_err(ctx, "could not get device address for %d: %s", i, windows_error_str(0));
- goto err_out;
- }
- dev = usbi_get_device_by_session_id(ctx, session_id);
- if (dev) {
- usbi_dbg("using existing device for %d/%d (session %ld)",
- bus_addr, dev_addr, session_id);
- libusb_ref_device(dev);
- // Release just this element in the device list (as we already hold a
- // reference to it).
- UkwReleaseDeviceList(driver_handle, &devices[i], 1);
- release_list_offset++;
- } else {
- usbi_dbg("allocating new device for %d/%d (session %ld)",
- bus_addr, dev_addr, session_id);
- dev = usbi_alloc_device(ctx, session_id);
- if (!dev) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err_out;
- }
- r = init_device(dev, devices[i], bus_addr, dev_addr);
- if (r < 0)
- goto err_out;
- r = usbi_sanitize_device(dev);
- if (r < 0)
- goto err_out;
- }
- new_devices = discovered_devs_append(new_devices, dev);
- if (!discdevs) {
- r = LIBUSB_ERROR_NO_MEM;
- goto err_out;
- }
- safe_unref_device(dev);
- }
- *discdevs = new_devices;
- return r;
-err_out:
- *discdevs = new_devices;
- safe_unref_device(dev);
- // Release the remainder of the unprocessed device list.
- // The devices added to new_devices already will still be passed up to libusb,
- // which can dispose of them at its leisure.
- UkwReleaseDeviceList(driver_handle, &devices[release_list_offset], count - release_list_offset);
- return r;
-}
-
-static int wince_open(struct libusb_device_handle *handle)
-{
- // Nothing to do to open devices as a handle to it has
- // been retrieved by wince_get_device_list
- return LIBUSB_SUCCESS;
-}
-
-static void wince_close(struct libusb_device_handle *handle)
-{
- // Nothing to do as wince_open does nothing.
-}
-
-static int wince_get_device_descriptor(
- struct libusb_device *device,
- unsigned char *buffer, int *host_endian)
-{
- struct wince_device_priv *priv = _device_priv(device);
-
- *host_endian = 1;
- memcpy(buffer, &priv->desc, DEVICE_DESC_LENGTH);
- return LIBUSB_SUCCESS;
-}
-
-static int wince_get_active_config_descriptor(
- struct libusb_device *device,
- unsigned char *buffer, size_t len, int *host_endian)
-{
- struct wince_device_priv *priv = _device_priv(device);
- DWORD actualSize = len;
- *host_endian = 0;
- if (!UkwGetConfigDescriptor(priv->dev, UKW_ACTIVE_CONFIGURATION, buffer, len, &actualSize)) {
- return translate_driver_error(GetLastError());
- }
- return actualSize;
-}
-
-static int wince_get_config_descriptor(
- struct libusb_device *device,
- uint8_t config_index,
- unsigned char *buffer, size_t len, int *host_endian)
-{
- struct wince_device_priv *priv = _device_priv(device);
- DWORD actualSize = len;
- *host_endian = 0;
- if (!UkwGetConfigDescriptor(priv->dev, config_index, buffer, len, &actualSize)) {
- return translate_driver_error(GetLastError());
- }
- return actualSize;
-}
-
-static int wince_get_configuration(
- struct libusb_device_handle *handle,
- int *config)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- UCHAR cv = 0;
- if (!UkwGetConfig(priv->dev, &cv)) {
- return translate_driver_error(GetLastError());
- }
- (*config) = cv;
- return LIBUSB_SUCCESS;
-}
-
-static int wince_set_configuration(
- struct libusb_device_handle *handle,
- int config)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- // Setting configuration 0 places the device in Address state.
- // This should correspond to the "unconfigured state" required by
- // libusb when the specified configuration is -1.
- UCHAR cv = (config < 0) ? 0 : config;
- if (!UkwSetConfig(priv->dev, cv)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_claim_interface(
- struct libusb_device_handle *handle,
- int interface_number)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwClaimInterface(priv->dev, interface_number)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_release_interface(
- struct libusb_device_handle *handle,
- int interface_number)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwSetInterfaceAlternateSetting(priv->dev, interface_number, 0)) {
- return translate_driver_error(GetLastError());
- }
- if (!UkwReleaseInterface(priv->dev, interface_number)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_set_interface_altsetting(
- struct libusb_device_handle *handle,
- int interface_number, int altsetting)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwSetInterfaceAlternateSetting(priv->dev, interface_number, altsetting)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_clear_halt(
- struct libusb_device_handle *handle,
- unsigned char endpoint)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwClearHaltHost(priv->dev, endpoint)) {
- return translate_driver_error(GetLastError());
- }
- if (!UkwClearHaltDevice(priv->dev, endpoint)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_reset_device(
- struct libusb_device_handle *handle)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwResetDevice(priv->dev)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_kernel_driver_active(
- struct libusb_device_handle *handle,
- int interface_number)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- BOOL result = FALSE;
- if (!UkwKernelDriverActive(priv->dev, interface_number, &result)) {
- return translate_driver_error(GetLastError());
- }
- return result ? 1 : 0;
-}
-
-static int wince_detach_kernel_driver(
- struct libusb_device_handle *handle,
- int interface_number)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwDetachKernelDriver(priv->dev, interface_number)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_attach_kernel_driver(
- struct libusb_device_handle *handle,
- int interface_number)
-{
- struct wince_device_priv *priv = _device_priv(handle->dev);
- if (!UkwAttachKernelDriver(priv->dev, interface_number)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static void wince_destroy_device(
- struct libusb_device *dev)
-{
- struct wince_device_priv *priv = _device_priv(dev);
- UkwReleaseDeviceList(driver_handle, &priv->dev, 1);
-}
-
-static void wince_clear_transfer_priv(
- struct usbi_transfer *itransfer)
-{
- struct wince_transfer_priv *transfer_priv = (struct wince_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct winfd wfd = fd_to_winfd(transfer_priv->pollable_fd.fd);
- // No need to cancel transfer as it is either complete or abandoned
- wfd.itransfer = NULL;
- CloseHandle(wfd.handle);
- usbi_free_fd(&transfer_priv->pollable_fd);
-}
-
-static int wince_cancel_transfer(
- struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct wince_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- struct wince_transfer_priv *transfer_priv = (struct wince_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
-
- if (!UkwCancelTransfer(priv->dev, transfer_priv->pollable_fd.overlapped, UKW_TF_NO_WAIT)) {
- return translate_driver_error(GetLastError());
- }
- return LIBUSB_SUCCESS;
-}
-
-static int wince_submit_control_or_bulk_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct wince_transfer_priv *transfer_priv = (struct wince_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct wince_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- BOOL direction_in, ret;
- struct winfd wfd;
- DWORD flags;
- HANDLE eventHandle;
- PUKW_CONTROL_HEADER setup = NULL;
- const BOOL control_transfer = transfer->type == LIBUSB_TRANSFER_TYPE_CONTROL;
-
- transfer_priv->pollable_fd = INVALID_WINFD;
- if (control_transfer) {
- setup = (PUKW_CONTROL_HEADER) transfer->buffer;
- direction_in = setup->bmRequestType & LIBUSB_ENDPOINT_IN;
- } else {
- direction_in = transfer->endpoint & LIBUSB_ENDPOINT_IN;
- }
- flags = direction_in ? UKW_TF_IN_TRANSFER : UKW_TF_OUT_TRANSFER;
- flags |= UKW_TF_SHORT_TRANSFER_OK;
-
- eventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (eventHandle == NULL) {
- usbi_err(ctx, "Failed to create event for async transfer");
- return LIBUSB_ERROR_NO_MEM;
- }
-
- wfd = usbi_create_fd(eventHandle, direction_in ? RW_READ : RW_WRITE, itransfer, &wince_cancel_transfer);
- if (wfd.fd < 0) {
- CloseHandle(eventHandle);
- return LIBUSB_ERROR_NO_MEM;
- }
-
- transfer_priv->pollable_fd = wfd;
- if (control_transfer) {
- // Split out control setup header and data buffer
- DWORD bufLen = transfer->length - sizeof(UKW_CONTROL_HEADER);
- PVOID buf = (PVOID) &transfer->buffer[sizeof(UKW_CONTROL_HEADER)];
-
- ret = UkwIssueControlTransfer(priv->dev, flags, setup, buf, bufLen, &transfer->actual_length, wfd.overlapped);
- } else {
- ret = UkwIssueBulkTransfer(priv->dev, flags, transfer->endpoint, transfer->buffer,
- transfer->length, &transfer->actual_length, wfd.overlapped);
- }
- if (!ret) {
- int libusbErr = translate_driver_error(GetLastError());
- usbi_err(ctx, "UkwIssue%sTransfer failed: error %d",
- control_transfer ? "Control" : "Bulk", GetLastError());
- wince_clear_transfer_priv(itransfer);
- return libusbErr;
- }
- usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd, direction_in ? POLLIN : POLLOUT);
- itransfer->flags |= USBI_TRANSFER_UPDATED_FDS;
-
- return LIBUSB_SUCCESS;
-}
-
-static int wince_submit_iso_transfer(struct usbi_transfer *itransfer)
-{
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-static int wince_submit_transfer(
- struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- return wince_submit_control_or_bulk_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return wince_submit_iso_transfer(itransfer);
- default:
- usbi_err(TRANSFER_CTX(transfer), "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-static void wince_transfer_callback(struct usbi_transfer *itransfer, uint32_t io_result, uint32_t io_size)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct wince_transfer_priv *transfer_priv = (struct wince_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct wince_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int status;
-
- usbi_dbg("handling I/O completion with errcode %d", io_result);
-
- if (io_result == ERROR_NOT_SUPPORTED &&
- transfer->type != LIBUSB_TRANSFER_TYPE_CONTROL) {
- /* For functional stalls, the WinCE USB layer (and therefore the USB Kernel Wrapper
- * Driver) will report USB_ERROR_STALL/ERROR_NOT_SUPPORTED in situations where the
- * endpoint isn't actually stalled.
- *
- * One example of this is that some devices will occasionally fail to reply to an IN
- * token. The WinCE USB layer carries on with the transaction until it is completed
- * (or cancelled) but then completes it with USB_ERROR_STALL.
- *
- * This code therefore needs to confirm that there really is a stall error, by both
- * checking the pipe status and requesting the endpoint status from the device.
- */
- BOOL halted = FALSE;
- usbi_dbg("checking I/O completion with errcode ERROR_NOT_SUPPORTED is really a stall");
- if (UkwIsPipeHalted(priv->dev, transfer->endpoint, &halted)) {
- /* Pipe status retrieved, so now request endpoint status by sending a GET_STATUS
- * control request to the device. This is done synchronously, which is a bit
- * naughty, but this is a special corner case.
- */
- WORD wStatus = 0;
- DWORD written = 0;
- UKW_CONTROL_HEADER ctrlHeader;
- ctrlHeader.bmRequestType = LIBUSB_REQUEST_TYPE_STANDARD |
- LIBUSB_ENDPOINT_IN | LIBUSB_RECIPIENT_ENDPOINT;
- ctrlHeader.bRequest = LIBUSB_REQUEST_GET_STATUS;
- ctrlHeader.wValue = 0;
- ctrlHeader.wIndex = transfer->endpoint;
- ctrlHeader.wLength = sizeof(wStatus);
- if (UkwIssueControlTransfer(priv->dev,
- UKW_TF_IN_TRANSFER | UKW_TF_SEND_TO_ENDPOINT,
- &ctrlHeader, &wStatus, sizeof(wStatus), &written, NULL)) {
- if (written == sizeof(wStatus) &&
- (wStatus & STATUS_HALT_FLAG) == 0) {
- if (!halted || UkwClearHaltHost(priv->dev, transfer->endpoint)) {
- usbi_dbg("Endpoint doesn't appear to be stalled, overriding error with success");
- io_result = ERROR_SUCCESS;
- } else {
- usbi_dbg("Endpoint doesn't appear to be stalled, but the host is halted, changing error");
- io_result = ERROR_IO_DEVICE;
- }
- }
- }
- }
- }
-
- switch(io_result) {
- case ERROR_SUCCESS:
- itransfer->transferred += io_size;
- status = LIBUSB_TRANSFER_COMPLETED;
- break;
- case ERROR_CANCELLED:
- usbi_dbg("detected transfer cancel");
- status = LIBUSB_TRANSFER_CANCELLED;
- break;
- case ERROR_NOT_SUPPORTED:
- case ERROR_GEN_FAILURE:
- usbi_dbg("detected endpoint stall");
- status = LIBUSB_TRANSFER_STALL;
- break;
- case ERROR_SEM_TIMEOUT:
- usbi_dbg("detected semaphore timeout");
- status = LIBUSB_TRANSFER_TIMED_OUT;
- break;
- case ERROR_OPERATION_ABORTED:
- if (itransfer->flags & USBI_TRANSFER_TIMED_OUT) {
- usbi_dbg("detected timeout");
- status = LIBUSB_TRANSFER_TIMED_OUT;
- } else {
- usbi_dbg("detected operation aborted");
- status = LIBUSB_TRANSFER_CANCELLED;
- }
- break;
- default:
- usbi_err(ITRANSFER_CTX(itransfer), "detected I/O error: %s", windows_error_str(io_result));
- status = LIBUSB_TRANSFER_ERROR;
- break;
- }
- wince_clear_transfer_priv(itransfer);
- if (status == LIBUSB_TRANSFER_CANCELLED) {
- usbi_handle_transfer_cancellation(itransfer);
- } else {
- usbi_handle_transfer_completion(itransfer, (enum libusb_transfer_status)status);
- }
-}
-
-static void wince_handle_callback (struct usbi_transfer *itransfer, uint32_t io_result, uint32_t io_size)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- wince_transfer_callback (itransfer, io_result, io_size);
- break;
- default:
- usbi_err(ITRANSFER_CTX(itransfer), "unknown endpoint type %d", transfer->type);
- }
-}
-
-static int wince_handle_events(
- struct libusb_context *ctx,
- struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready)
-{
- struct wince_transfer_priv* transfer_priv = NULL;
- POLL_NFDS_TYPE i = 0;
- BOOL found = FALSE;
- struct usbi_transfer *transfer;
- DWORD io_size, io_result;
-
- usbi_mutex_lock(&ctx->open_devs_lock);
- for (i = 0; i < nfds && num_ready > 0; i++) {
-
- usbi_dbg("checking fd %d with revents = %04x", fds[i].fd, fds[i].revents);
-
- if (!fds[i].revents) {
- continue;
- }
-
- num_ready--;
-
- // Because a Windows OVERLAPPED is used for poll emulation,
- // a pollable fd is created and stored with each transfer
- usbi_mutex_lock(&ctx->flying_transfers_lock);
- list_for_each_entry(transfer, &ctx->flying_transfers, list, struct usbi_transfer) {
- transfer_priv = usbi_transfer_get_os_priv(transfer);
- if (transfer_priv->pollable_fd.fd == fds[i].fd) {
- found = TRUE;
- break;
- }
- }
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
-
- if (found && HasOverlappedIoCompleted(transfer_priv->pollable_fd.overlapped)) {
- io_result = (DWORD)transfer_priv->pollable_fd.overlapped->Internal;
- io_size = (DWORD)transfer_priv->pollable_fd.overlapped->InternalHigh;
- usbi_remove_pollfd(ctx, transfer_priv->pollable_fd.fd);
- // let handle_callback free the event using the transfer wfd
- // If you don't use the transfer wfd, you run a risk of trying to free a
- // newly allocated wfd that took the place of the one from the transfer.
- wince_handle_callback(transfer, io_result, io_size);
- } else if (found) {
- usbi_err(ctx, "matching transfer for fd %x has not completed", fds[i]);
- return LIBUSB_ERROR_OTHER;
- } else {
- usbi_err(ctx, "could not find a matching transfer for fd %x", fds[i]);
- return LIBUSB_ERROR_NOT_FOUND;
- }
- }
-
- usbi_mutex_unlock(&ctx->open_devs_lock);
- return LIBUSB_SUCCESS;
-}
-
-/*
- * Monotonic and real time functions
- */
-unsigned __stdcall wince_clock_gettime_threaded(void* param)
-{
- LARGE_INTEGER hires_counter, li_frequency;
- LONG nb_responses;
- int timer_index;
-
- // Init - find out if we have access to a monotonic (hires) timer
- if (!QueryPerformanceFrequency(&li_frequency)) {
- usbi_dbg("no hires timer available on this platform");
- hires_frequency = 0;
- hires_ticks_to_ps = UINT64_C(0);
- } else {
- hires_frequency = li_frequency.QuadPart;
- // The hires frequency can go as high as 4 GHz, so we'll use a conversion
- // to picoseconds to compute the tv_nsecs part in clock_gettime
- hires_ticks_to_ps = UINT64_C(1000000000000) / hires_frequency;
- usbi_dbg("hires timer available (Frequency: %"PRIu64" Hz)", hires_frequency);
- }
-
- // Main loop - wait for requests
- while (1) {
- timer_index = WaitForMultipleObjects(2, timer_request, FALSE, INFINITE) - WAIT_OBJECT_0;
- if ( (timer_index != 0) && (timer_index != 1) ) {
- usbi_dbg("failure to wait on requests: %s", windows_error_str(0));
- continue;
- }
- if (request_count[timer_index] == 0) {
- // Request already handled
- ResetEvent(timer_request[timer_index]);
- // There's still a possiblity that a thread sends a request between the
- // time we test request_count[] == 0 and we reset the event, in which case
- // the request would be ignored. The simple solution to that is to test
- // request_count again and process requests if non zero.
- if (request_count[timer_index] == 0)
- continue;
- }
- switch (timer_index) {
- case 0:
- WaitForSingleObject(timer_mutex, INFINITE);
- // Requests to this thread are for hires always
- if (QueryPerformanceCounter(&hires_counter) != 0) {
- timer_tp.tv_sec = (long)(hires_counter.QuadPart / hires_frequency);
- timer_tp.tv_nsec = (long)(((hires_counter.QuadPart % hires_frequency)/1000) * hires_ticks_to_ps);
- } else {
- // Fallback to real-time if we can't get monotonic value
- // Note that real-time clock does not wait on the mutex or this thread.
- wince_clock_gettime(USBI_CLOCK_REALTIME, &timer_tp);
- }
- ReleaseMutex(timer_mutex);
-
- nb_responses = InterlockedExchange((LONG*)&request_count[0], 0);
- if ( (nb_responses)
- && (ReleaseSemaphore(timer_response, nb_responses, NULL) == 0) ) {
- usbi_dbg("unable to release timer semaphore %d: %s", windows_error_str(0));
- }
- continue;
- case 1: // time to quit
- usbi_dbg("timer thread quitting");
- return 0;
- }
- }
- usbi_dbg("ERROR: broken timer thread");
- return 1;
-}
-
-static int wince_clock_gettime(int clk_id, struct timespec *tp)
-{
- FILETIME filetime;
- ULARGE_INTEGER rtime;
- DWORD r;
- SYSTEMTIME st;
- switch(clk_id) {
- case USBI_CLOCK_MONOTONIC:
- if (hires_frequency != 0) {
- while (1) {
- InterlockedIncrement((LONG*)&request_count[0]);
- SetEvent(timer_request[0]);
- r = WaitForSingleObject(timer_response, TIMER_REQUEST_RETRY_MS);
- switch(r) {
- case WAIT_OBJECT_0:
- WaitForSingleObject(timer_mutex, INFINITE);
- *tp = timer_tp;
- ReleaseMutex(timer_mutex);
- return LIBUSB_SUCCESS;
- case WAIT_TIMEOUT:
- usbi_dbg("could not obtain a timer value within reasonable timeframe - too much load?");
- break; // Retry until successful
- default:
- usbi_dbg("WaitForSingleObject failed: %s", windows_error_str(0));
- return LIBUSB_ERROR_OTHER;
- }
- }
- }
- // Fall through and return real-time if monotonic was not detected @ timer init
- case USBI_CLOCK_REALTIME:
- // We follow http://msdn.microsoft.com/en-us/library/ms724928%28VS.85%29.aspx
- // with a predef epoch_time to have an epoch that starts at 1970.01.01 00:00
- // Note however that our resolution is bounded by the Windows system time
- // functions and is at best of the order of 1 ms (or, usually, worse)
- GetSystemTime(&st);
- SystemTimeToFileTime(&st, &filetime);
- rtime.LowPart = filetime.dwLowDateTime;
- rtime.HighPart = filetime.dwHighDateTime;
- rtime.QuadPart -= epoch_time;
- tp->tv_sec = (long)(rtime.QuadPart / 10000000);
- tp->tv_nsec = (long)((rtime.QuadPart % 10000000)*100);
- return LIBUSB_SUCCESS;
- default:
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-const struct usbi_os_backend wince_backend = {
- "Windows CE",
- 0,
- wince_init,
- wince_exit,
-
- wince_get_device_list,
- NULL, /* hotplug_poll */
- wince_open,
- wince_close,
-
- wince_get_device_descriptor,
- wince_get_active_config_descriptor,
- wince_get_config_descriptor,
- NULL, /* get_config_descriptor_by_value() */
-
- wince_get_configuration,
- wince_set_configuration,
- wince_claim_interface,
- wince_release_interface,
-
- wince_set_interface_altsetting,
- wince_clear_halt,
- wince_reset_device,
-
- wince_kernel_driver_active,
- wince_detach_kernel_driver,
- wince_attach_kernel_driver,
-
- wince_destroy_device,
-
- wince_submit_transfer,
- wince_cancel_transfer,
- wince_clear_transfer_priv,
-
- wince_handle_events,
-
- wince_clock_gettime,
- sizeof(struct wince_device_priv),
- sizeof(struct wince_device_handle_priv),
- sizeof(struct wince_transfer_priv),
- 0,
-};
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.h
deleted file mode 100644
index 3db9693a1..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/wince_usb.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Windows CE backend for libusbx 1.0
- * Copyright © 2011-2013 RealVNC Ltd.
- * Portions taken from Windows backend, which is
- * Copyright © 2009-2010 Pete Batard <pbatard@gmail.com>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
- * Major code testing contribution by Xiaofan Chen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#pragma once
-
-#include "windows_common.h"
-
-#include <windows.h>
-#include "poll_windows.h"
-
-#define MAX_DEVICE_COUNT 256
-
-// This is a modified dump of the types in the ceusbkwrapper.h library header
-// with functions transformed into extern pointers.
-//
-// This backend dynamically loads ceusbkwrapper.dll and doesn't include
-// ceusbkwrapper.h directly to simplify the build process. The kernel
-// side wrapper driver is built using the platform image build tools,
-// which makes it difficult to reference directly from the libusbx build
-// system.
-struct UKW_DEVICE_PRIV;
-typedef struct UKW_DEVICE_PRIV *UKW_DEVICE;
-typedef UKW_DEVICE *PUKW_DEVICE, *LPUKW_DEVICE;
-
-typedef struct {
- UINT8 bLength;
- UINT8 bDescriptorType;
- UINT16 bcdUSB;
- UINT8 bDeviceClass;
- UINT8 bDeviceSubClass;
- UINT8 bDeviceProtocol;
- UINT8 bMaxPacketSize0;
- UINT16 idVendor;
- UINT16 idProduct;
- UINT16 bcdDevice;
- UINT8 iManufacturer;
- UINT8 iProduct;
- UINT8 iSerialNumber;
- UINT8 bNumConfigurations;
-} UKW_DEVICE_DESCRIPTOR, *PUKW_DEVICE_DESCRIPTOR, *LPUKW_DEVICE_DESCRIPTOR;
-
-typedef struct {
- UINT8 bmRequestType;
- UINT8 bRequest;
- UINT16 wValue;
- UINT16 wIndex;
- UINT16 wLength;
-} UKW_CONTROL_HEADER, *PUKW_CONTROL_HEADER, *LPUKW_CONTROL_HEADER;
-
-// Collection of flags which can be used when issuing transfer requests
-/* Indicates that the transfer direction is 'in' */
-#define UKW_TF_IN_TRANSFER 0x00000001
-/* Indicates that the transfer direction is 'out' */
-#define UKW_TF_OUT_TRANSFER 0x00000000
-/* Specifies that the transfer should complete as soon as possible,
- * even if no OVERLAPPED structure has been provided. */
-#define UKW_TF_NO_WAIT 0x00000100
-/* Indicates that transfers shorter than the buffer are ok */
-#define UKW_TF_SHORT_TRANSFER_OK 0x00000200
-#define UKW_TF_SEND_TO_DEVICE 0x00010000
-#define UKW_TF_SEND_TO_INTERFACE 0x00020000
-#define UKW_TF_SEND_TO_ENDPOINT 0x00040000
-/* Don't block when waiting for memory allocations */
-#define UKW_TF_DONT_BLOCK_FOR_MEM 0x00080000
-
-/* Value to use when dealing with configuration values, such as UkwGetConfigDescriptor,
- * to specify the currently active configuration for the device. */
-#define UKW_ACTIVE_CONFIGURATION -1
-
-DLL_DECLARE(WINAPI, HANDLE, UkwOpenDriver, ());
-DLL_DECLARE(WINAPI, BOOL, UkwGetDeviceList, (HANDLE, LPUKW_DEVICE, DWORD, LPDWORD));
-DLL_DECLARE(WINAPI, void, UkwReleaseDeviceList, (HANDLE, LPUKW_DEVICE, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwGetDeviceAddress, (UKW_DEVICE, unsigned char*, unsigned char*, unsigned long*));
-DLL_DECLARE(WINAPI, BOOL, UkwGetDeviceDescriptor, (UKW_DEVICE, LPUKW_DEVICE_DESCRIPTOR));
-DLL_DECLARE(WINAPI, BOOL, UkwGetConfigDescriptor, (UKW_DEVICE, DWORD, LPVOID, DWORD, LPDWORD));
-DLL_DECLARE(WINAPI, void, UkwCloseDriver, (HANDLE));
-DLL_DECLARE(WINAPI, BOOL, UkwCancelTransfer, (UKW_DEVICE, LPOVERLAPPED, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwIssueControlTransfer, (UKW_DEVICE, DWORD, LPUKW_CONTROL_HEADER, LPVOID, DWORD, LPDWORD, LPOVERLAPPED));
-DLL_DECLARE(WINAPI, BOOL, UkwClaimInterface, (UKW_DEVICE, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwReleaseInterface, (UKW_DEVICE, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwSetInterfaceAlternateSetting, (UKW_DEVICE, DWORD, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwClearHaltHost, (UKW_DEVICE, UCHAR));
-DLL_DECLARE(WINAPI, BOOL, UkwClearHaltDevice, (UKW_DEVICE, UCHAR));
-DLL_DECLARE(WINAPI, BOOL, UkwGetConfig, (UKW_DEVICE, PUCHAR));
-DLL_DECLARE(WINAPI, BOOL, UkwSetConfig, (UKW_DEVICE, UCHAR));
-DLL_DECLARE(WINAPI, BOOL, UkwResetDevice, (UKW_DEVICE));
-DLL_DECLARE(WINAPI, BOOL, UkwKernelDriverActive, (UKW_DEVICE, DWORD, PBOOL));
-DLL_DECLARE(WINAPI, BOOL, UkwAttachKernelDriver, (UKW_DEVICE, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwDetachKernelDriver, (UKW_DEVICE, DWORD));
-DLL_DECLARE(WINAPI, BOOL, UkwIssueBulkTransfer, (UKW_DEVICE, DWORD, UCHAR, LPVOID, DWORD, LPDWORD, LPOVERLAPPED));
-DLL_DECLARE(WINAPI, BOOL, UkwIsPipeHalted, (UKW_DEVICE, UCHAR, LPBOOL));
-
-// Used to determine if an endpoint status really is halted on a failed transfer.
-#define STATUS_HALT_FLAG 0x1
-
-struct wince_device_priv {
- UKW_DEVICE dev;
- UKW_DEVICE_DESCRIPTOR desc;
-};
-
-struct wince_device_handle_priv {
- // This member isn't used, but only exists to avoid an empty structure
- // for private data for the device handle.
- int reserved;
-};
-
-struct wince_transfer_priv {
- struct winfd pollable_fd;
- uint8_t interface_number;
-};
-
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_common.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_common.h
deleted file mode 100644
index 1da72bd9f..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_common.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Windows backend common header for libusbx 1.0
- *
- * This file brings together header code common between
- * the desktop Windows and Windows CE backends.
- * Copyright © 2012-2013 RealVNC Ltd.
- * Copyright © 2009-2012 Pete Batard <pete@akeo.ie>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
- * Major code testing contribution by Xiaofan Chen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#pragma once
-
-// Windows API default is uppercase - ugh!
-#if !defined(bool)
-#define bool BOOL
-#endif
-#if !defined(true)
-#define true TRUE
-#endif
-#if !defined(false)
-#define false FALSE
-#endif
-
-#define safe_free(p) do {if (p != NULL) {free((void*)p); p = NULL;}} while(0)
-#define safe_closehandle(h) do {if (h != INVALID_HANDLE_VALUE) {CloseHandle(h); h = INVALID_HANDLE_VALUE;}} while(0)
-#define safe_min(a, b) min((size_t)(a), (size_t)(b))
-#define safe_strcp(dst, dst_max, src, count) do {memcpy(dst, src, safe_min(count, dst_max)); \
- ((char*)dst)[safe_min(count, dst_max)-1] = 0;} while(0)
-#define safe_strcpy(dst, dst_max, src) safe_strcp(dst, dst_max, src, safe_strlen(src)+1)
-#define safe_strncat(dst, dst_max, src, count) strncat(dst, src, safe_min(count, dst_max - safe_strlen(dst) - 1))
-#define safe_strcat(dst, dst_max, src) safe_strncat(dst, dst_max, src, safe_strlen(src)+1)
-#define safe_strcmp(str1, str2) strcmp(((str1==NULL)?"<NULL>":str1), ((str2==NULL)?"<NULL>":str2))
-#define safe_stricmp(str1, str2) _stricmp(((str1==NULL)?"<NULL>":str1), ((str2==NULL)?"<NULL>":str2))
-#define safe_strncmp(str1, str2, count) strncmp(((str1==NULL)?"<NULL>":str1), ((str2==NULL)?"<NULL>":str2), count)
-#define safe_strlen(str) ((str==NULL)?0:strlen(str))
-#define safe_sprintf(dst, count, ...) do {_snprintf(dst, count, __VA_ARGS__); (dst)[(count)-1] = 0; } while(0)
-#define safe_stprintf _sntprintf
-#define safe_tcslen(str) ((str==NULL)?0:_tcslen(str))
-#define safe_unref_device(dev) do {if (dev != NULL) {libusb_unref_device(dev); dev = NULL;}} while(0)
-#define wchar_to_utf8_ms(wstr, str, strlen) WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, strlen, NULL, NULL)
-#ifndef ARRAYSIZE
-#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
-#endif
-
-#define ERR_BUFFER_SIZE 256
-#define TIMER_REQUEST_RETRY_MS 100
-#define MAX_TIMER_SEMAPHORES 128
-
-
-/*
- * API macros - from libusb-win32 1.x
- */
-#define DLL_DECLARE_PREFIXNAME(api, ret, prefixname, name, args) \
- typedef ret (api * __dll_##name##_t)args; \
- static __dll_##name##_t prefixname = NULL
-
-#ifndef _WIN32_WCE
-#define DLL_STRINGIFY(dll) #dll
-#define DLL_GET_MODULE_HANDLE(dll) GetModuleHandleA(DLL_STRINGIFY(dll))
-#define DLL_LOAD_LIBRARY(dll) LoadLibraryA(DLL_STRINGIFY(dll))
-#else
-#define DLL_STRINGIFY(dll) L#dll
-#define DLL_GET_MODULE_HANDLE(dll) GetModuleHandle(DLL_STRINGIFY(dll))
-#define DLL_LOAD_LIBRARY(dll) LoadLibrary(DLL_STRINGIFY(dll))
-#endif
-
-#define DLL_LOAD_PREFIXNAME(dll, prefixname, name, ret_on_failure) \
- do { \
- HMODULE h = DLL_GET_MODULE_HANDLE(dll); \
- if (!h) \
- h = DLL_LOAD_LIBRARY(dll); \
- if (!h) { \
- if (ret_on_failure) { return LIBUSB_ERROR_NOT_FOUND; } \
- else { break; } \
- } \
- prefixname = (__dll_##name##_t)GetProcAddress(h, \
- DLL_STRINGIFY(name)); \
- if (prefixname) break; \
- prefixname = (__dll_##name##_t)GetProcAddress(h, \
- DLL_STRINGIFY(name) DLL_STRINGIFY(A)); \
- if (prefixname) break; \
- prefixname = (__dll_##name##_t)GetProcAddress(h, \
- DLL_STRINGIFY(name) DLL_STRINGIFY(W)); \
- if (prefixname) break; \
- if(ret_on_failure) \
- return LIBUSB_ERROR_NOT_FOUND; \
- } while(0)
-
-#define DLL_DECLARE(api, ret, name, args) DLL_DECLARE_PREFIXNAME(api, ret, name, name, args)
-#define DLL_LOAD(dll, name, ret_on_failure) DLL_LOAD_PREFIXNAME(dll, name, name, ret_on_failure)
-#define DLL_DECLARE_PREFIXED(api, ret, prefix, name, args) DLL_DECLARE_PREFIXNAME(api, ret, prefix##name, name, args)
-#define DLL_LOAD_PREFIXED(dll, prefix, name, ret_on_failure) DLL_LOAD_PREFIXNAME(dll, prefix##name, name, ret_on_failure)
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.c
deleted file mode 100644
index 63357b1a2..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.c
+++ /dev/null
@@ -1,4393 +0,0 @@
-/*
- * windows backend for libusbx 1.0
- * Copyright © 2009-2012 Pete Batard <pete@akeo.ie>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
- * HID Reports IOCTLs inspired from HIDAPI by Alan Ott, Signal 11 Software
- * Hash table functions adapted from glibc, by Ulrich Drepper et al.
- * Major code testing contribution by Xiaofan Chen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <config.h>
-#include <windows.h>
-#include <setupapi.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <process.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <objbase.h>
-#include <winioctl.h>
-
-#include "libusbi.h"
-#include "poll_windows.h"
-#include "windows_usb.h"
-
-// The 2 macros below are used in conjunction with safe loops.
-#define LOOP_CHECK(fcall) { r=fcall; if (r != LIBUSB_SUCCESS) continue; }
-#define LOOP_BREAK(err) { r=err; continue; }
-
-// Helper prototypes
-static int windows_get_active_config_descriptor(struct libusb_device *dev, unsigned char *buffer, size_t len, int *host_endian);
-static int windows_clock_gettime(int clk_id, struct timespec *tp);
-unsigned __stdcall windows_clock_gettime_threaded(void* param);
-// Common calls
-static int common_configure_endpoints(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-
-// WinUSB-like API prototypes
-static int winusbx_init(int sub_api, struct libusb_context *ctx);
-static int winusbx_exit(int sub_api);
-static int winusbx_open(int sub_api, struct libusb_device_handle *dev_handle);
-static void winusbx_close(int sub_api, struct libusb_device_handle *dev_handle);
-static int winusbx_configure_endpoints(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int winusbx_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting);
-static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int winusbx_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint);
-static int winusbx_abort_transfers(int sub_api, struct usbi_transfer *itransfer);
-static int winusbx_abort_control(int sub_api, struct usbi_transfer *itransfer);
-static int winusbx_reset_device(int sub_api, struct libusb_device_handle *dev_handle);
-static int winusbx_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size);
-// HID API prototypes
-static int hid_init(int sub_api, struct libusb_context *ctx);
-static int hid_exit(int sub_api);
-static int hid_open(int sub_api, struct libusb_device_handle *dev_handle);
-static void hid_close(int sub_api, struct libusb_device_handle *dev_handle);
-static int hid_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int hid_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int hid_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting);
-static int hid_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int hid_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int hid_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint);
-static int hid_abort_transfers(int sub_api, struct usbi_transfer *itransfer);
-static int hid_reset_device(int sub_api, struct libusb_device_handle *dev_handle);
-static int hid_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size);
-// Composite API prototypes
-static int composite_init(int sub_api, struct libusb_context *ctx);
-static int composite_exit(int sub_api);
-static int composite_open(int sub_api, struct libusb_device_handle *dev_handle);
-static void composite_close(int sub_api, struct libusb_device_handle *dev_handle);
-static int composite_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int composite_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting);
-static int composite_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface);
-static int composite_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int composite_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int composite_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer);
-static int composite_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint);
-static int composite_abort_transfers(int sub_api, struct usbi_transfer *itransfer);
-static int composite_abort_control(int sub_api, struct usbi_transfer *itransfer);
-static int composite_reset_device(int sub_api, struct libusb_device_handle *dev_handle);
-static int composite_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size);
-
-
-// Global variables
-uint64_t hires_frequency, hires_ticks_to_ps;
-const uint64_t epoch_time = UINT64_C(116444736000000000); // 1970.01.01 00:00:000 in MS Filetime
-enum windows_version windows_version = WINDOWS_UNSUPPORTED;
-// Concurrency
-static int concurrent_usage = -1;
-usbi_mutex_t autoclaim_lock;
-// Timer thread
-// NB: index 0 is for monotonic and 1 is for the thread exit event
-HANDLE timer_thread = NULL;
-HANDLE timer_mutex = NULL;
-struct timespec timer_tp;
-volatile LONG request_count[2] = {0, 1}; // last one must be > 0
-HANDLE timer_request[2] = { NULL, NULL };
-HANDLE timer_response = NULL;
-// API globals
-#define CHECK_WINUSBX_AVAILABLE(sub_api) do { if (sub_api == SUB_API_NOTSET) sub_api = priv->sub_api; \
- if (!WinUSBX[sub_api].initialized) return LIBUSB_ERROR_ACCESS; } while(0)
-static struct winusb_interface WinUSBX[SUB_API_MAX];
-const char* sub_api_name[SUB_API_MAX] = WINUSBX_DRV_NAMES;
-bool api_hid_available = false;
-#define CHECK_HID_AVAILABLE do { if (!api_hid_available) return LIBUSB_ERROR_ACCESS; } while (0)
-
-static inline BOOLEAN guid_eq(const GUID *guid1, const GUID *guid2) {
- if ((guid1 != NULL) && (guid2 != NULL)) {
- return (memcmp(guid1, guid2, sizeof(GUID)) == 0);
- }
- return false;
-}
-
-#if defined(ENABLE_LOGGING)
-static char* guid_to_string(const GUID* guid)
-{
- static char guid_string[MAX_GUID_STRING_LENGTH];
-
- if (guid == NULL) return NULL;
- sprintf(guid_string, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
- (unsigned int)guid->Data1, guid->Data2, guid->Data3,
- guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
- guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
- return guid_string;
-}
-#endif
-
-/*
- * Converts a windows error to human readable string
- * uses retval as errorcode, or, if 0, use GetLastError()
- */
-#if defined(ENABLE_LOGGING)
-static char *windows_error_str(uint32_t retval)
-{
-static char err_string[ERR_BUFFER_SIZE];
-
- DWORD size;
- ssize_t i;
- uint32_t error_code, format_error;
-
- error_code = retval?retval:GetLastError();
-
- safe_sprintf(err_string, ERR_BUFFER_SIZE, "[%u] ", error_code);
-
- size = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &err_string[safe_strlen(err_string)],
- ERR_BUFFER_SIZE - (DWORD)safe_strlen(err_string), NULL);
- if (size == 0) {
- format_error = GetLastError();
- if (format_error)
- safe_sprintf(err_string, ERR_BUFFER_SIZE,
- "Windows error code %u (FormatMessage error code %u)", error_code, format_error);
- else
- safe_sprintf(err_string, ERR_BUFFER_SIZE, "Unknown error code %u", error_code);
- } else {
- // Remove CR/LF terminators
- for (i=safe_strlen(err_string)-1; (i>=0) && ((err_string[i]==0x0A) || (err_string[i]==0x0D)); i--) {
- err_string[i] = 0;
- }
- }
- return err_string;
-}
-#endif
-
-/*
- * Sanitize Microsoft's paths: convert to uppercase, add prefix and fix backslashes.
- * Return an allocated sanitized string or NULL on error.
- */
-static char* sanitize_path(const char* path)
-{
- const char root_prefix[] = "\\\\.\\";
- size_t j, size, root_size;
- char* ret_path = NULL;
- size_t add_root = 0;
-
- if (path == NULL)
- return NULL;
-
- size = safe_strlen(path)+1;
- root_size = sizeof(root_prefix)-1;
-
- // Microsoft indiscriminatly uses '\\?\', '\\.\', '##?#" or "##.#" for root prefixes.
- if (!((size > 3) && (((path[0] == '\\') && (path[1] == '\\') && (path[3] == '\\')) ||
- ((path[0] == '#') && (path[1] == '#') && (path[3] == '#'))))) {
- add_root = root_size;
- size += add_root;
- }
-
- if ((ret_path = (char*) calloc(size, 1)) == NULL)
- return NULL;
-
- safe_strcpy(&ret_path[add_root], size-add_root, path);
-
- // Ensure consistancy with root prefix
- for (j=0; j<root_size; j++)
- ret_path[j] = root_prefix[j];
-
- // Same goes for '\' and '#' after the root prefix. Ensure '#' is used
- for(j=root_size; j<size; j++) {
- ret_path[j] = (char)toupper((int)ret_path[j]); // Fix case too
- if (ret_path[j] == '\\')
- ret_path[j] = '#';
- }
-
- return ret_path;
-}
-
-/*
- * Cfgmgr32, OLE32 and SetupAPI DLL functions
- */
-static int init_dlls(void)
-{
- DLL_LOAD(Cfgmgr32.dll, CM_Get_Parent, TRUE);
- DLL_LOAD(Cfgmgr32.dll, CM_Get_Child, TRUE);
- DLL_LOAD(Cfgmgr32.dll, CM_Get_Sibling, TRUE);
- DLL_LOAD(Cfgmgr32.dll, CM_Get_Device_IDA, TRUE);
- // Prefixed to avoid conflict with header files
- DLL_LOAD_PREFIXED(OLE32.dll, p, CLSIDFromString, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiGetClassDevsA, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiEnumDeviceInfo, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiEnumDeviceInterfaces, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiGetDeviceInterfaceDetailA, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiDestroyDeviceInfoList, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiOpenDevRegKey, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiGetDeviceRegistryPropertyA, TRUE);
- DLL_LOAD_PREFIXED(SetupAPI.dll, p, SetupDiOpenDeviceInterfaceRegKey, TRUE);
- DLL_LOAD_PREFIXED(AdvAPI32.dll, p, RegQueryValueExW, TRUE);
- DLL_LOAD_PREFIXED(AdvAPI32.dll, p, RegCloseKey, TRUE);
- return LIBUSB_SUCCESS;
-}
-
-/*
- * enumerate interfaces for the whole USB class
- *
- * Parameters:
- * dev_info: a pointer to a dev_info list
- * dev_info_data: a pointer to an SP_DEVINFO_DATA to be filled (or NULL if not needed)
- * usb_class: the generic USB class for which to retrieve interface details
- * index: zero based index of the interface in the device info list
- *
- * Note: it is the responsibility of the caller to free the DEVICE_INTERFACE_DETAIL_DATA
- * structure returned and call this function repeatedly using the same guid (with an
- * incremented index starting at zero) until all interfaces have been returned.
- */
-static bool get_devinfo_data(struct libusb_context *ctx,
- HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, const char* usb_class, unsigned _index)
-{
- if (_index <= 0) {
- *dev_info = pSetupDiGetClassDevsA(NULL, usb_class, NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES);
- if (*dev_info == INVALID_HANDLE_VALUE) {
- return false;
- }
- }
-
- dev_info_data->cbSize = sizeof(SP_DEVINFO_DATA);
- if (!pSetupDiEnumDeviceInfo(*dev_info, _index, dev_info_data)) {
- if (GetLastError() != ERROR_NO_MORE_ITEMS) {
- usbi_err(ctx, "Could not obtain device info data for index %u: %s",
- _index, windows_error_str(0));
- }
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return false;
- }
- return true;
-}
-
-/*
- * enumerate interfaces for a specific GUID
- *
- * Parameters:
- * dev_info: a pointer to a dev_info list
- * dev_info_data: a pointer to an SP_DEVINFO_DATA to be filled (or NULL if not needed)
- * guid: the GUID for which to retrieve interface details
- * index: zero based index of the interface in the device info list
- *
- * Note: it is the responsibility of the caller to free the DEVICE_INTERFACE_DETAIL_DATA
- * structure returned and call this function repeatedly using the same guid (with an
- * incremented index starting at zero) until all interfaces have been returned.
- */
-static SP_DEVICE_INTERFACE_DETAIL_DATA_A *get_interface_details(struct libusb_context *ctx,
- HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, const GUID* guid, unsigned _index)
-{
- SP_DEVICE_INTERFACE_DATA dev_interface_data;
- SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
- DWORD size;
-
- if (_index <= 0) {
- *dev_info = pSetupDiGetClassDevsA(guid, NULL, NULL, DIGCF_PRESENT|DIGCF_DEVICEINTERFACE);
- }
-
- if (dev_info_data != NULL) {
- dev_info_data->cbSize = sizeof(SP_DEVINFO_DATA);
- if (!pSetupDiEnumDeviceInfo(*dev_info, _index, dev_info_data)) {
- if (GetLastError() != ERROR_NO_MORE_ITEMS) {
- usbi_err(ctx, "Could not obtain device info data for index %u: %s",
- _index, windows_error_str(0));
- }
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return NULL;
- }
- }
-
- dev_interface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
- if (!pSetupDiEnumDeviceInterfaces(*dev_info, NULL, guid, _index, &dev_interface_data)) {
- if (GetLastError() != ERROR_NO_MORE_ITEMS) {
- usbi_err(ctx, "Could not obtain interface data for index %u: %s",
- _index, windows_error_str(0));
- }
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return NULL;
- }
-
- // Read interface data (dummy + actual) to access the device path
- if (!pSetupDiGetDeviceInterfaceDetailA(*dev_info, &dev_interface_data, NULL, 0, &size, NULL)) {
- // The dummy call should fail with ERROR_INSUFFICIENT_BUFFER
- if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
- usbi_err(ctx, "could not access interface data (dummy) for index %u: %s",
- _index, windows_error_str(0));
- goto err_exit;
- }
- } else {
- usbi_err(ctx, "program assertion failed - http://msdn.microsoft.com/en-us/library/ms792901.aspx is wrong.");
- goto err_exit;
- }
-
- if ((dev_interface_details = (SP_DEVICE_INTERFACE_DETAIL_DATA_A*) calloc(size, 1)) == NULL) {
- usbi_err(ctx, "could not allocate interface data for index %u.", _index);
- goto err_exit;
- }
-
- dev_interface_details->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A);
- if (!pSetupDiGetDeviceInterfaceDetailA(*dev_info, &dev_interface_data,
- dev_interface_details, size, &size, NULL)) {
- usbi_err(ctx, "could not access interface data (actual) for index %u: %s",
- _index, windows_error_str(0));
- }
-
- return dev_interface_details;
-
-err_exit:
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return NULL;
-}
-
-/* For libusb0 filter */
-static SP_DEVICE_INTERFACE_DETAIL_DATA_A *get_interface_details_filter(struct libusb_context *ctx,
- HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, const GUID* guid, unsigned _index, char* filter_path){
- SP_DEVICE_INTERFACE_DATA dev_interface_data;
- SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
- DWORD size;
- if (_index <= 0) {
- *dev_info = pSetupDiGetClassDevsA(guid, NULL, NULL, DIGCF_PRESENT|DIGCF_DEVICEINTERFACE);
- }
- if (dev_info_data != NULL) {
- dev_info_data->cbSize = sizeof(SP_DEVINFO_DATA);
- if (!pSetupDiEnumDeviceInfo(*dev_info, _index, dev_info_data)) {
- if (GetLastError() != ERROR_NO_MORE_ITEMS) {
- usbi_err(ctx, "Could not obtain device info data for index %u: %s",
- _index, windows_error_str(0));
- }
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return NULL;
- }
- }
- dev_interface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
- if (!pSetupDiEnumDeviceInterfaces(*dev_info, NULL, guid, _index, &dev_interface_data)) {
- if (GetLastError() != ERROR_NO_MORE_ITEMS) {
- usbi_err(ctx, "Could not obtain interface data for index %u: %s",
- _index, windows_error_str(0));
- }
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return NULL;
- }
- // Read interface data (dummy + actual) to access the device path
- if (!pSetupDiGetDeviceInterfaceDetailA(*dev_info, &dev_interface_data, NULL, 0, &size, NULL)) {
- // The dummy call should fail with ERROR_INSUFFICIENT_BUFFER
- if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
- usbi_err(ctx, "could not access interface data (dummy) for index %u: %s",
- _index, windows_error_str(0));
- goto err_exit;
- }
- } else {
- usbi_err(ctx, "program assertion failed - http://msdn.microsoft.com/en-us/library/ms792901.aspx is wrong.");
- goto err_exit;
- }
- if ((dev_interface_details = malloc(size)) == NULL) {
- usbi_err(ctx, "could not allocate interface data for index %u.", _index);
- goto err_exit;
- }
- dev_interface_details->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A);
- if (!pSetupDiGetDeviceInterfaceDetailA(*dev_info, &dev_interface_data,
- dev_interface_details, size, &size, NULL)) {
- usbi_err(ctx, "could not access interface data (actual) for index %u: %s",
- _index, windows_error_str(0));
- }
- // [trobinso] lookup the libusb0 symbolic index.
- if (dev_interface_details) {
- HKEY hkey_device_interface=pSetupDiOpenDeviceInterfaceRegKey(*dev_info,&dev_interface_data,0,KEY_READ);
- if (hkey_device_interface != INVALID_HANDLE_VALUE) {
- DWORD libusb0_symboliclink_index=0;
- DWORD value_length=sizeof(DWORD);
- DWORD value_type=0;
- LONG status;
- status = pRegQueryValueExW(hkey_device_interface, L"LUsb0", NULL, &value_type,
- (LPBYTE) &libusb0_symboliclink_index, &value_length);
- if (status == ERROR_SUCCESS) {
- if (libusb0_symboliclink_index < 256) {
- // libusb0.sys is connected to this device instance.
- // If the the device interface guid is {F9F3FF14-AE21-48A0-8A25-8011A7A931D9} then it's a filter.
- safe_sprintf(filter_path, sizeof("\\\\.\\libusb0-0000"), "\\\\.\\libusb0-%04d", libusb0_symboliclink_index);
- usbi_dbg("assigned libusb0 symbolic link %s", filter_path);
- } else {
- // libusb0.sys was connected to this device instance at one time; but not anymore.
- }
- }
- pRegCloseKey(hkey_device_interface);
- }
- }
- return dev_interface_details;
-err_exit:
- pSetupDiDestroyDeviceInfoList(*dev_info);
- *dev_info = INVALID_HANDLE_VALUE;
- return NULL;}
-
-/* Hash table functions - modified From glibc 2.3.2:
- [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
- [Knuth] The Art of Computer Programming, part 3 (6.4) */
-typedef struct htab_entry {
- unsigned long used;
- char* str;
-} htab_entry;
-htab_entry* htab_table = NULL;
-usbi_mutex_t htab_write_mutex = NULL;
-unsigned long htab_size, htab_filled;
-
-/* For the used double hash method the table size has to be a prime. To
- correct the user given table size we need a prime test. This trivial
- algorithm is adequate because the code is called only during init and
- the number is likely to be small */
-static int isprime(unsigned long number)
-{
- // no even number will be passed
- unsigned int divider = 3;
-
- while((divider * divider < number) && (number % divider != 0))
- divider += 2;
-
- return (number % divider != 0);
-}
-
-/* Before using the hash table we must allocate memory for it.
- We allocate one element more as the found prime number says.
- This is done for more effective indexing as explained in the
- comment for the hash function. */
-static int htab_create(struct libusb_context *ctx, unsigned long nel)
-{
- if (htab_table != NULL) {
- usbi_err(ctx, "hash table already allocated");
- }
-
- // Create a mutex
- usbi_mutex_init(&htab_write_mutex, NULL);
-
- // Change nel to the first prime number not smaller as nel.
- nel |= 1;
- while(!isprime(nel))
- nel += 2;
-
- htab_size = nel;
- usbi_dbg("using %d entries hash table", nel);
- htab_filled = 0;
-
- // allocate memory and zero out.
- htab_table = (htab_entry*) calloc(htab_size + 1, sizeof(htab_entry));
- if (htab_table == NULL) {
- usbi_err(ctx, "could not allocate space for hash table");
- return 0;
- }
-
- return 1;
-}
-
-/* After using the hash table it has to be destroyed. */
-static void htab_destroy(void)
-{
- size_t i;
- if (htab_table == NULL) {
- return;
- }
-
- for (i=0; i<htab_size; i++) {
- if (htab_table[i].used) {
- safe_free(htab_table[i].str);
- }
- }
- usbi_mutex_destroy(&htab_write_mutex);
- safe_free(htab_table);
-}
-
-/* This is the search function. It uses double hashing with open addressing.
- We use an trick to speed up the lookup. The table is created with one
- more element available. This enables us to use the index zero special.
- This index will never be used because we store the first hash index in
- the field used where zero means not used. Every other value means used.
- The used field can be used as a first fast comparison for equality of
- the stored and the parameter value. This helps to prevent unnecessary
- expensive calls of strcmp. */
-static unsigned long htab_hash(char* str)
-{
- unsigned long hval, hval2;
- unsigned long idx;
- unsigned long r = 5381;
- int c;
- char* sz = str;
-
- if (str == NULL)
- return 0;
-
- // Compute main hash value (algorithm suggested by Nokia)
- while ((c = *sz++) != 0)
- r = ((r << 5) + r) + c;
- if (r == 0)
- ++r;
-
- // compute table hash: simply take the modulus
- hval = r % htab_size;
- if (hval == 0)
- ++hval;
-
- // Try the first index
- idx = hval;
-
- if (htab_table[idx].used) {
- if ( (htab_table[idx].used == hval)
- && (safe_strcmp(str, htab_table[idx].str) == 0) ) {
- // existing hash
- return idx;
- }
- usbi_dbg("hash collision ('%s' vs '%s')", str, htab_table[idx].str);
-
- // Second hash function, as suggested in [Knuth]
- hval2 = 1 + hval % (htab_size - 2);
-
- do {
- // Because size is prime this guarantees to step through all available indexes
- if (idx <= hval2) {
- idx = htab_size + idx - hval2;
- } else {
- idx -= hval2;
- }
-
- // If we visited all entries leave the loop unsuccessfully
- if (idx == hval) {
- break;
- }
-
- // If entry is found use it.
- if ( (htab_table[idx].used == hval)
- && (safe_strcmp(str, htab_table[idx].str) == 0) ) {
- return idx;
- }
- }
- while (htab_table[idx].used);
- }
-
- // Not found => New entry
-
- // If the table is full return an error
- if (htab_filled >= htab_size) {
- usbi_err(NULL, "hash table is full (%d entries)", htab_size);
- return 0;
- }
-
- // Concurrent threads might be storing the same entry at the same time
- // (eg. "simultaneous" enums from different threads) => use a mutex
- usbi_mutex_lock(&htab_write_mutex);
- // Just free any previously allocated string (which should be the same as
- // new one). The possibility of concurrent threads storing a collision
- // string (same hash, different string) at the same time is extremely low
- safe_free(htab_table[idx].str);
- htab_table[idx].used = hval;
- htab_table[idx].str = (char*) malloc(safe_strlen(str)+1);
- if (htab_table[idx].str == NULL) {
- usbi_err(NULL, "could not duplicate string for hash table");
- usbi_mutex_unlock(&htab_write_mutex);
- return 0;
- }
- memcpy(htab_table[idx].str, str, safe_strlen(str)+1);
- ++htab_filled;
- usbi_mutex_unlock(&htab_write_mutex);
-
- return idx;
-}
-
-/*
- * Returns the session ID of a device's nth level ancestor
- * If there's no device at the nth level, return 0
- */
-static unsigned long get_ancestor_session_id(DWORD devinst, unsigned level)
-{
- DWORD parent_devinst;
- unsigned long session_id = 0;
- char* sanitized_path = NULL;
- char path[MAX_PATH_LENGTH];
- unsigned i;
-
- if (level < 1) return 0;
- for (i = 0; i<level; i++) {
- if (CM_Get_Parent(&parent_devinst, devinst, 0) != CR_SUCCESS) {
- return 0;
- }
- devinst = parent_devinst;
- }
- if (CM_Get_Device_IDA(devinst, path, MAX_PATH_LENGTH, 0) != CR_SUCCESS) {
- return 0;
- }
- // TODO: (post hotplug): try without sanitizing
- sanitized_path = sanitize_path(path);
- if (sanitized_path == NULL) {
- return 0;
- }
- session_id = htab_hash(sanitized_path);
- safe_free(sanitized_path);
- return session_id;
-}
-
-/*
- * Populate the endpoints addresses of the device_priv interface helper structs
- */
-static int windows_assign_endpoints(struct libusb_device_handle *dev_handle, int iface, int altsetting)
-{
- int i, r;
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- struct libusb_config_descriptor *conf_desc;
- const struct libusb_interface_descriptor *if_desc;
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
-
- r = libusb_get_config_descriptor(dev_handle->dev, 0, &conf_desc);
- if (r != LIBUSB_SUCCESS) {
- usbi_warn(ctx, "could not read config descriptor: error %d", r);
- return r;
- }
-
- if_desc = &conf_desc->interface[iface].altsetting[altsetting];
- safe_free(priv->usb_interface[iface].endpoint);
-
- if (if_desc->bNumEndpoints == 0) {
- usbi_dbg("no endpoints found for interface %d", iface);
- return LIBUSB_SUCCESS;
- }
-
- priv->usb_interface[iface].endpoint = (uint8_t*) malloc(if_desc->bNumEndpoints);
- if (priv->usb_interface[iface].endpoint == NULL) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- priv->usb_interface[iface].nb_endpoints = if_desc->bNumEndpoints;
- for (i=0; i<if_desc->bNumEndpoints; i++) {
- priv->usb_interface[iface].endpoint[i] = if_desc->endpoint[i].bEndpointAddress;
- usbi_dbg("(re)assigned endpoint %02X to interface %d", priv->usb_interface[iface].endpoint[i], iface);
- }
- libusb_free_config_descriptor(conf_desc);
-
- // Extra init may be required to configure endpoints
- return priv->apib->configure_endpoints(SUB_API_NOTSET, dev_handle, iface);
-}
-
-// Lookup for a match in the list of API driver names
-// return -1 if not found, driver match number otherwise
-static int get_sub_api(char* driver, int api){
- int i;
- const char sep_str[2] = {LIST_SEPARATOR, 0};
- char *tok, *tmp_str;
- size_t len = safe_strlen(driver);
-
- if (len == 0) return SUB_API_NOTSET;
- tmp_str = (char*) calloc(len+1, 1);
- if (tmp_str == NULL) return SUB_API_NOTSET;
- memcpy(tmp_str, driver, len+1);
- tok = strtok(tmp_str, sep_str);
- while (tok != NULL) {
- for (i=0; i<usb_api_backend[api].nb_driver_names; i++) {
- if (safe_stricmp(tok, usb_api_backend[api].driver_name_list[i]) == 0) {
- free(tmp_str);
- return i;
- }
- }
- tok = strtok(NULL, sep_str);
- }
- free (tmp_str);
- return SUB_API_NOTSET;
-}
-
-/*
- * auto-claiming and auto-release helper functions
- */
-static int auto_claim(struct libusb_transfer *transfer, int *interface_number, int api_type)
-{
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(
- transfer->dev_handle);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int current_interface = *interface_number;
- int r = LIBUSB_SUCCESS;
-
- switch(api_type) {
- case USB_API_WINUSBX:
- case USB_API_HID:
- break;
- default:
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- usbi_mutex_lock(&autoclaim_lock);
- if (current_interface < 0) // No serviceable interface was found
- {
- for (current_interface=0; current_interface<USB_MAXINTERFACES; current_interface++) {
- // Must claim an interface of the same API type
- if ( (priv->usb_interface[current_interface].apib->id == api_type)
- && (libusb_claim_interface(transfer->dev_handle, current_interface) == LIBUSB_SUCCESS) ) {
- usbi_dbg("auto-claimed interface %d for control request", current_interface);
- if (handle_priv->autoclaim_count[current_interface] != 0) {
- usbi_warn(ctx, "program assertion failed - autoclaim_count was nonzero");
- }
- handle_priv->autoclaim_count[current_interface]++;
- break;
- }
- }
- if (current_interface == USB_MAXINTERFACES) {
- usbi_err(ctx, "could not auto-claim any interface");
- r = LIBUSB_ERROR_NOT_FOUND;
- }
- } else {
- // If we have a valid interface that was autoclaimed, we must increment
- // its autoclaim count so that we can prevent an early release.
- if (handle_priv->autoclaim_count[current_interface] != 0) {
- handle_priv->autoclaim_count[current_interface]++;
- }
- }
- usbi_mutex_unlock(&autoclaim_lock);
-
- *interface_number = current_interface;
- return r;
-
-}
-
-static void auto_release(struct usbi_transfer *itransfer)
-{
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- libusb_device_handle *dev_handle = transfer->dev_handle;
- struct windows_device_handle_priv* handle_priv = _device_handle_priv(dev_handle);
- int r;
-
- usbi_mutex_lock(&autoclaim_lock);
- if (handle_priv->autoclaim_count[transfer_priv->interface_number] > 0) {
- handle_priv->autoclaim_count[transfer_priv->interface_number]--;
- if (handle_priv->autoclaim_count[transfer_priv->interface_number] == 0) {
- r = libusb_release_interface(dev_handle, transfer_priv->interface_number);
- if (r == LIBUSB_SUCCESS) {
- usbi_dbg("auto-released interface %d", transfer_priv->interface_number);
- } else {
- usbi_dbg("failed to auto-release interface %d (%s)",
- transfer_priv->interface_number, libusb_error_name((enum libusb_error)r));
- }
- }
- }
- usbi_mutex_unlock(&autoclaim_lock);
-}
-
-/*
- * init: libusbx backend init function
- *
- * This function enumerates the HCDs (Host Controller Drivers) and populates our private HCD list
- * In our implementation, we equate Windows' "HCD" to libusbx's "bus". Note that bus is zero indexed.
- * HCDs are not expected to change after init (might not hold true for hot pluggable USB PCI card?)
- */
-static int windows_init(struct libusb_context *ctx)
-{
- int i, r = LIBUSB_ERROR_OTHER;
- OSVERSIONINFO os_version;
- HANDLE semaphore;
- char sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
-
- sprintf(sem_name, "libusb_init%08X", (unsigned int)GetCurrentProcessId()&0xFFFFFFFF);
- semaphore = CreateSemaphoreA(NULL, 1, 1, sem_name);
- if (semaphore == NULL) {
- usbi_err(ctx, "could not create semaphore: %s", windows_error_str(0));
- return LIBUSB_ERROR_NO_MEM;
- }
-
- // A successful wait brings our semaphore count to 0 (unsignaled)
- // => any concurent wait stalls until the semaphore's release
- if (WaitForSingleObject(semaphore, INFINITE) != WAIT_OBJECT_0) {
- usbi_err(ctx, "failure to access semaphore: %s", windows_error_str(0));
- CloseHandle(semaphore);
- return LIBUSB_ERROR_NO_MEM;
- }
-
- // NB: concurrent usage supposes that init calls are equally balanced with
- // exit calls. If init is called more than exit, we will not exit properly
- if ( ++concurrent_usage == 0 ) { // First init?
- // Detect OS version
- memset(&os_version, 0, sizeof(OSVERSIONINFO));
- os_version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- windows_version = WINDOWS_UNSUPPORTED;
- if ((GetVersionEx(&os_version) != 0) && (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT)) {
- if ((os_version.dwMajorVersion == 5) && (os_version.dwMinorVersion == 1)) {
- windows_version = WINDOWS_XP;
- } else if ((os_version.dwMajorVersion == 5) && (os_version.dwMinorVersion == 2)) {
- windows_version = WINDOWS_2003; // also includes XP 64
- } else if (os_version.dwMajorVersion >= 6) {
- windows_version = WINDOWS_VISTA_AND_LATER;
- }
- }
- if (windows_version == WINDOWS_UNSUPPORTED) {
- usbi_err(ctx, "This version of Windows is NOT supported");
- r = LIBUSB_ERROR_NOT_SUPPORTED;
- goto init_exit;
- }
-
- // We need a lock for proper auto-release
- usbi_mutex_init(&autoclaim_lock, NULL);
-
- // Initialize pollable file descriptors
- init_polling();
-
- // Load DLL imports
- if (init_dlls() != LIBUSB_SUCCESS) {
- usbi_err(ctx, "could not resolve DLL functions");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- // Initialize the low level APIs (we don't care about errors at this stage)
- for (i=0; i<USB_API_MAX; i++) {
- usb_api_backend[i].init(SUB_API_NOTSET, ctx);
- }
-
- // Because QueryPerformanceCounter might report different values when
- // running on different cores, we create a separate thread for the timer
- // calls, which we glue to the first core always to prevent timing discrepancies.
- r = LIBUSB_ERROR_NO_MEM;
- for (i = 0; i < 2; i++) {
- timer_request[i] = CreateEvent(NULL, TRUE, FALSE, NULL);
- if (timer_request[i] == NULL) {
- usbi_err(ctx, "could not create timer request event %d - aborting", i);
- goto init_exit;
- }
- }
- timer_response = CreateSemaphore(NULL, 0, MAX_TIMER_SEMAPHORES, NULL);
- if (timer_response == NULL) {
- usbi_err(ctx, "could not create timer response semaphore - aborting");
- goto init_exit;
- }
- timer_mutex = CreateMutex(NULL, FALSE, NULL);
- if (timer_mutex == NULL) {
- usbi_err(ctx, "could not create timer mutex - aborting");
- goto init_exit;
- }
- timer_thread = (HANDLE)_beginthreadex(NULL, 0, windows_clock_gettime_threaded, NULL, 0, NULL);
- if (timer_thread == NULL) {
- usbi_err(ctx, "Unable to create timer thread - aborting");
- goto init_exit;
- }
- SetThreadAffinityMask(timer_thread, 0);
-
- // Create a hash table to store session ids. Second parameter is better if prime
- htab_create(ctx, HTAB_SIZE);
- }
- // At this stage, either we went through full init successfully, or didn't need to
- r = LIBUSB_SUCCESS;
-
-init_exit: // Holds semaphore here.
- if (!concurrent_usage && r != LIBUSB_SUCCESS) { // First init failed?
- if (timer_thread) {
- SetEvent(timer_request[1]); // actually the signal to quit the thread.
- if (WAIT_OBJECT_0 != WaitForSingleObject(timer_thread, INFINITE)) {
- usbi_warn(ctx, "could not wait for timer thread to quit");
- TerminateThread(timer_thread, 1); // shouldn't happen, but we're destroying
- // all objects it might have held anyway.
- }
- CloseHandle(timer_thread);
- timer_thread = NULL;
- }
- for (i = 0; i < 2; i++) {
- if (timer_request[i]) {
- CloseHandle(timer_request[i]);
- timer_request[i] = NULL;
- }
- }
- if (timer_response) {
- CloseHandle(timer_response);
- timer_response = NULL;
- }
- if (timer_mutex) {
- CloseHandle(timer_mutex);
- timer_mutex = NULL;
- }
- htab_destroy();
- }
-
- if (r != LIBUSB_SUCCESS)
- --concurrent_usage; // Not expected to call libusb_exit if we failed.
-
- ReleaseSemaphore(semaphore, 1, NULL); // increase count back to 1
- CloseHandle(semaphore);
- return r;
-}
-
-/*
- * HCD (root) hubs need to have their device descriptor manually populated
- *
- * Note that, like Microsoft does in the device manager, we populate the
- * Vendor and Device ID for HCD hubs with the ones from the PCI HCD device.
- */
-static int force_hcd_device_descriptor(struct libusb_device *dev)
-{
- struct windows_device_priv *parent_priv, *priv = _device_priv(dev);
- struct libusb_context *ctx = DEVICE_CTX(dev);
- int vid, pid;
-
- dev->num_configurations = 1;
- priv->dev_descriptor.bLength = sizeof(USB_DEVICE_DESCRIPTOR);
- priv->dev_descriptor.bDescriptorType = USB_DEVICE_DESCRIPTOR_TYPE;
- priv->dev_descriptor.bNumConfigurations = 1;
- priv->active_config = 1;
-
- if (priv->parent_dev == NULL) {
- usbi_err(ctx, "program assertion failed - HCD hub has no parent");
- return LIBUSB_ERROR_NO_DEVICE;
- }
- parent_priv = _device_priv(priv->parent_dev);
- if (sscanf(parent_priv->path, "\\\\.\\PCI#VEN_%04x&DEV_%04x%*s", &vid, &pid) == 2) {
- priv->dev_descriptor.idVendor = (uint16_t)vid;
- priv->dev_descriptor.idProduct = (uint16_t)pid;
- } else {
- usbi_warn(ctx, "could not infer VID/PID of HCD hub from '%s'", parent_priv->path);
- priv->dev_descriptor.idVendor = 0x1d6b; // Linux Foundation root hub
- priv->dev_descriptor.idProduct = 1;
- }
- return LIBUSB_SUCCESS;
-}
-
-/*
- * fetch and cache all the config descriptors through I/O
- */
-static int cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handle, char* device_id)
-{
- DWORD size, ret_size;
- struct libusb_context *ctx = DEVICE_CTX(dev);
- struct windows_device_priv *priv = _device_priv(dev);
- int r;
- uint8_t i;
-
- USB_CONFIGURATION_DESCRIPTOR_SHORT cd_buf_short; // dummy request
- PUSB_DESCRIPTOR_REQUEST cd_buf_actual = NULL; // actual request
- PUSB_CONFIGURATION_DESCRIPTOR cd_data = NULL;
-
- if (dev->num_configurations == 0)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- priv->config_descriptor = (unsigned char**) calloc(dev->num_configurations, sizeof(unsigned char*));
- if (priv->config_descriptor == NULL)
- return LIBUSB_ERROR_NO_MEM;
- for (i=0; i<dev->num_configurations; i++)
- priv->config_descriptor[i] = NULL;
-
- for (i=0, r=LIBUSB_SUCCESS; ; i++)
- {
- // safe loop: release all dynamic resources
- safe_free(cd_buf_actual);
-
- // safe loop: end of loop condition
- if ((i >= dev->num_configurations) || (r != LIBUSB_SUCCESS))
- break;
-
- size = sizeof(USB_CONFIGURATION_DESCRIPTOR_SHORT);
- memset(&cd_buf_short, 0, size);
-
- cd_buf_short.req.ConnectionIndex = (ULONG)priv->port;
- cd_buf_short.req.SetupPacket.bmRequest = LIBUSB_ENDPOINT_IN;
- cd_buf_short.req.SetupPacket.bRequest = USB_REQUEST_GET_DESCRIPTOR;
- cd_buf_short.req.SetupPacket.wValue = (USB_CONFIGURATION_DESCRIPTOR_TYPE << 8) | i;
- cd_buf_short.req.SetupPacket.wIndex = i;
- cd_buf_short.req.SetupPacket.wLength = (USHORT)(size - sizeof(USB_DESCRIPTOR_REQUEST));
-
- // Dummy call to get the required data size. Initial failures are reported as info rather
- // than error as they can occur for non-penalizing situations, such as with some hubs.
- if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, &cd_buf_short, size,
- &cd_buf_short, size, &ret_size, NULL)) {
- usbi_info(ctx, "could not access configuration descriptor (dummy) for '%s': %s", device_id, windows_error_str(0));
- LOOP_BREAK(LIBUSB_ERROR_IO);
- }
-
- if ((ret_size != size) || (cd_buf_short.data.wTotalLength < sizeof(USB_CONFIGURATION_DESCRIPTOR))) {
- usbi_info(ctx, "unexpected configuration descriptor size (dummy) for '%s'.", device_id);
- LOOP_BREAK(LIBUSB_ERROR_IO);
- }
-
- size = sizeof(USB_DESCRIPTOR_REQUEST) + cd_buf_short.data.wTotalLength;
- if ((cd_buf_actual = (PUSB_DESCRIPTOR_REQUEST) calloc(1, size)) == NULL) {
- usbi_err(ctx, "could not allocate configuration descriptor buffer for '%s'.", device_id);
- LOOP_BREAK(LIBUSB_ERROR_NO_MEM);
- }
- memset(cd_buf_actual, 0, size);
-
- // Actual call
- cd_buf_actual->ConnectionIndex = (ULONG)priv->port;
- cd_buf_actual->SetupPacket.bmRequest = LIBUSB_ENDPOINT_IN;
- cd_buf_actual->SetupPacket.bRequest = USB_REQUEST_GET_DESCRIPTOR;
- cd_buf_actual->SetupPacket.wValue = (USB_CONFIGURATION_DESCRIPTOR_TYPE << 8) | i;
- cd_buf_actual->SetupPacket.wIndex = i;
- cd_buf_actual->SetupPacket.wLength = (USHORT)(size - sizeof(USB_DESCRIPTOR_REQUEST));
-
- if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, cd_buf_actual, size,
- cd_buf_actual, size, &ret_size, NULL)) {
- usbi_err(ctx, "could not access configuration descriptor (actual) for '%s': %s", device_id, windows_error_str(0));
- LOOP_BREAK(LIBUSB_ERROR_IO);
- }
-
- cd_data = (PUSB_CONFIGURATION_DESCRIPTOR)((UCHAR*)cd_buf_actual+sizeof(USB_DESCRIPTOR_REQUEST));
-
- if ((size != ret_size) || (cd_data->wTotalLength != cd_buf_short.data.wTotalLength)) {
- usbi_err(ctx, "unexpected configuration descriptor size (actual) for '%s'.", device_id);
- LOOP_BREAK(LIBUSB_ERROR_IO);
- }
-
- if (cd_data->bDescriptorType != USB_CONFIGURATION_DESCRIPTOR_TYPE) {
- usbi_err(ctx, "not a configuration descriptor for '%s'", device_id);
- LOOP_BREAK(LIBUSB_ERROR_IO);
- }
-
- usbi_dbg("cached config descriptor %d (bConfigurationValue=%d, %d bytes)",
- i, cd_data->bConfigurationValue, cd_data->wTotalLength);
-
- // Cache the descriptor
- priv->config_descriptor[i] = (unsigned char*) malloc(cd_data->wTotalLength);
- if (priv->config_descriptor[i] == NULL)
- return LIBUSB_ERROR_NO_MEM;
- memcpy(priv->config_descriptor[i], cd_data, cd_data->wTotalLength);
- }
- return LIBUSB_SUCCESS;
-}
-
-/*
- * Populate a libusbx device structure
- */
-static int init_device(struct libusb_device* dev, struct libusb_device* parent_dev,
- uint8_t port_number, char* device_id, DWORD devinst)
-{
- HANDLE handle;
- DWORD size;
- USB_NODE_CONNECTION_INFORMATION_EX conn_info;
- struct windows_device_priv *priv, *parent_priv;
- struct libusb_context *ctx = DEVICE_CTX(dev);
- struct libusb_device* tmp_dev;
- unsigned i;
-
- if ((dev == NULL) || (parent_dev == NULL)) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
- priv = _device_priv(dev);
- parent_priv = _device_priv(parent_dev);
- if (parent_priv->apib->id != USB_API_HUB) {
- usbi_warn(ctx, "parent for device '%s' is not a hub", device_id);
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- // It is possible for the parent hub not to have been initialized yet
- // If that's the case, lookup the ancestors to set the bus number
- if (parent_dev->bus_number == 0) {
- for (i=2; ; i++) {
- tmp_dev = usbi_get_device_by_session_id(ctx, get_ancestor_session_id(devinst, i));
- if (tmp_dev == NULL) break;
- if (tmp_dev->bus_number != 0) {
- usbi_dbg("got bus number from ancestor #%d", i);
- parent_dev->bus_number = tmp_dev->bus_number;
- break;
- }
- }
- }
- if (parent_dev->bus_number == 0) {
- usbi_err(ctx, "program assertion failed: unable to find ancestor bus number for '%s'", device_id);
- return LIBUSB_ERROR_NOT_FOUND;
- }
- dev->bus_number = parent_dev->bus_number;
- priv->port = port_number;
- dev->port_number = port_number;
- priv->depth = parent_priv->depth + 1;
- priv->parent_dev = parent_dev;
- dev->parent_dev = libusb_ref_device(parent_dev);
-
- // If the device address is already set, we can stop here
- if (dev->device_address != 0) {
- return LIBUSB_SUCCESS;
- }
- memset(&conn_info, 0, sizeof(conn_info));
- if (priv->depth != 0) { // Not a HCD hub
- handle = CreateFileA(parent_priv->path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED, NULL);
- if (handle == INVALID_HANDLE_VALUE) {
- usbi_warn(ctx, "could not open hub %s: %s", parent_priv->path, windows_error_str(0));
- return LIBUSB_ERROR_ACCESS;
- }
- size = sizeof(conn_info);
- conn_info.ConnectionIndex = (ULONG)port_number;
- if (!DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, &conn_info, size,
- &conn_info, size, &size, NULL)) {
- usbi_warn(ctx, "could not get node connection information for device '%s': %s",
- device_id, windows_error_str(0));
- safe_closehandle(handle);
- return LIBUSB_ERROR_NO_DEVICE;
- }
- if (conn_info.ConnectionStatus == NoDeviceConnected) {
- usbi_err(ctx, "device '%s' is no longer connected!", device_id);
- safe_closehandle(handle);
- return LIBUSB_ERROR_NO_DEVICE;
- }
- memcpy(&priv->dev_descriptor, &(conn_info.DeviceDescriptor), sizeof(USB_DEVICE_DESCRIPTOR));
- dev->num_configurations = priv->dev_descriptor.bNumConfigurations;
- priv->active_config = conn_info.CurrentConfigurationValue;
- usbi_dbg("found %d configurations (active conf: %d)", dev->num_configurations, priv->active_config);
- // If we can't read the config descriptors, just set the number of confs to zero
- if (cache_config_descriptors(dev, handle, device_id) != LIBUSB_SUCCESS) {
- dev->num_configurations = 0;
- priv->dev_descriptor.bNumConfigurations = 0;
- }
- safe_closehandle(handle);
-
- if (conn_info.DeviceAddress > UINT8_MAX) {
- usbi_err(ctx, "program assertion failed: device address overflow");
- }
- dev->device_address = (uint8_t)conn_info.DeviceAddress + 1;
- if (dev->device_address == 1) {
- usbi_err(ctx, "program assertion failed: device address collision with root hub");
- }
- switch (conn_info.Speed) {
- case 0: dev->speed = LIBUSB_SPEED_LOW; break;
- case 1: dev->speed = LIBUSB_SPEED_FULL; break;
- case 2: dev->speed = LIBUSB_SPEED_HIGH; break;
- case 3: dev->speed = LIBUSB_SPEED_SUPER; break;
- default:
- usbi_warn(ctx, "Got unknown device speed %d", conn_info.Speed);
- break;
- }
- } else {
- dev->device_address = 1; // root hubs are set to use device number 1
- force_hcd_device_descriptor(dev);
- }
-
- usbi_sanitize_device(dev);
-
- usbi_dbg("(bus: %d, addr: %d, depth: %d, port: %d): '%s'",
- dev->bus_number, dev->device_address, priv->depth, priv->port, device_id);
-
- return LIBUSB_SUCCESS;
-}
-
-// Returns the api type, or 0 if not found/unsupported
-static void get_api_type(struct libusb_context *ctx, HDEVINFO *dev_info,
- SP_DEVINFO_DATA *dev_info_data, int *api, int *sub_api)
-{
- // Precedence for filter drivers vs driver is in the order of this array
- struct driver_lookup lookup[3] = {
- {"\0\0", SPDRP_SERVICE, "driver"},
- {"\0\0", SPDRP_UPPERFILTERS, "upper filter driver"},
- {"\0\0", SPDRP_LOWERFILTERS, "lower filter driver"}
- };
- DWORD size, reg_type;
- unsigned k, l;
- int i, j;
-
- *api = USB_API_UNSUPPORTED;
- *sub_api = SUB_API_NOTSET;
- // Check the service & filter names to know the API we should use
- for (k=0; k<3; k++) {
- if (pSetupDiGetDeviceRegistryPropertyA(*dev_info, dev_info_data, lookup[k].reg_prop,
- &reg_type, (BYTE*)lookup[k].list, MAX_KEY_LENGTH, &size)) {
- // Turn the REG_SZ SPDRP_SERVICE into REG_MULTI_SZ
- if (lookup[k].reg_prop == SPDRP_SERVICE) {
- // our buffers are MAX_KEY_LENGTH+1 so we can overflow if needed
- lookup[k].list[safe_strlen(lookup[k].list)+1] = 0;
- }
- // MULTI_SZ is a pain to work with. Turn it into something much more manageable
- // NB: none of the driver names we check against contain LIST_SEPARATOR,
- // (currently ';'), so even if an unsuported one does, it's not an issue
- for (l=0; (lookup[k].list[l] != 0) || (lookup[k].list[l+1] != 0); l++) {
- if (lookup[k].list[l] == 0) {
- lookup[k].list[l] = LIST_SEPARATOR;
- }
- }
- usbi_dbg("%s(s): %s", lookup[k].designation, lookup[k].list);
- } else {
- if (GetLastError() != ERROR_INVALID_DATA) {
- usbi_dbg("could not access %s: %s", lookup[k].designation, windows_error_str(0));
- }
- lookup[k].list[0] = 0;
- }
- }
-
- for (i=1; i<USB_API_MAX; i++) {
- for (k=0; k<3; k++) {
- j = get_sub_api(lookup[k].list, i);
- if (j >= 0) {
- usbi_dbg("matched %s name against %s API",
- lookup[k].designation, (i!=USB_API_WINUSBX)?usb_api_backend[i].designation:sub_api_name[j]);
- *api = i;
- *sub_api = j;
- return;
- }
- }
- }
-}
-
-static int set_composite_interface(struct libusb_context* ctx, struct libusb_device* dev,
- char* dev_interface_path, char* device_id, int api, int sub_api)
-{
- unsigned i;
- struct windows_device_priv *priv = _device_priv(dev);
- int interface_number;
-
- if (priv->apib->id != USB_API_COMPOSITE) {
- usbi_err(ctx, "program assertion failed: '%s' is not composite", device_id);
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- // Because MI_## are not necessarily in sequential order (some composite
- // devices will have only MI_00 & MI_03 for instance), we retrieve the actual
- // interface number from the path's MI value
- interface_number = 0;
- for (i=0; device_id[i] != 0; ) {
- if ( (device_id[i++] == 'M') && (device_id[i++] == 'I')
- && (device_id[i++] == '_') ) {
- interface_number = (device_id[i++] - '0')*10;
- interface_number += device_id[i] - '0';
- break;
- }
- }
-
- if (device_id[i] == 0) {
- usbi_warn(ctx, "failure to read interface number for %s. Using default value %d",
- device_id, interface_number);
- }
-
- if (priv->usb_interface[interface_number].path != NULL) {
- if (api == USB_API_HID) {
- // HID devices can have multiple collections (COL##) for each MI_## interface
- usbi_dbg("interface[%d] already set - ignoring HID collection: %s",
- interface_number, device_id);
- return LIBUSB_ERROR_ACCESS;
- }
- // In other cases, just use the latest data
- safe_free(priv->usb_interface[interface_number].path);
- }
-
- usbi_dbg("interface[%d] = %s", interface_number, dev_interface_path);
- priv->usb_interface[interface_number].path = dev_interface_path;
- priv->usb_interface[interface_number].apib = &usb_api_backend[api];
- priv->usb_interface[interface_number].sub_api = sub_api;
- if ((api == USB_API_HID) && (priv->hid == NULL)) {
- priv->hid = (struct hid_device_priv*) calloc(1, sizeof(struct hid_device_priv));
- if (priv->hid == NULL)
- return LIBUSB_ERROR_NO_MEM;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-static int set_hid_interface(struct libusb_context* ctx, struct libusb_device* dev,
- char* dev_interface_path)
-{
- int i;
- struct windows_device_priv *priv = _device_priv(dev);
-
- if (priv->hid == NULL) {
- usbi_err(ctx, "program assertion failed: parent is not HID");
- return LIBUSB_ERROR_NO_DEVICE;
- }
- if (priv->hid->nb_interfaces == USB_MAXINTERFACES) {
- usbi_err(ctx, "program assertion failed: max USB interfaces reached for HID device");
- return LIBUSB_ERROR_NO_DEVICE;
- }
- for (i=0; i<priv->hid->nb_interfaces; i++) {
- if (safe_strcmp(priv->usb_interface[i].path, dev_interface_path) == 0) {
- usbi_dbg("interface[%d] already set to %s", i, dev_interface_path);
- return LIBUSB_SUCCESS;
- }
- }
-
- priv->usb_interface[priv->hid->nb_interfaces].path = dev_interface_path;
- priv->usb_interface[priv->hid->nb_interfaces].apib = &usb_api_backend[USB_API_HID];
- usbi_dbg("interface[%d] = %s", priv->hid->nb_interfaces, dev_interface_path);
- priv->hid->nb_interfaces++;
- return LIBUSB_SUCCESS;
-}
-
-/*
- * get_device_list: libusbx backend device enumeration function
- */
-static int windows_get_device_list(struct libusb_context *ctx, struct discovered_devs **_discdevs)
-{
- struct discovered_devs *discdevs;
- HDEVINFO dev_info = { 0 };
- const char* usb_class[] = {"USB", "NUSB3", "IUSB3"};
- SP_DEVINFO_DATA dev_info_data = { 0 };
- SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
- GUID hid_guid;
-#define MAX_ENUM_GUIDS 64
- const GUID* guid[MAX_ENUM_GUIDS];
-#define HCD_PASS 0
-#define HUB_PASS 1
-#define GEN_PASS 2
-#define DEV_PASS 3
-#define HID_PASS 4
- int r = LIBUSB_SUCCESS;
- int api, sub_api;
- size_t class_index = 0;
- unsigned int nb_guids, pass, i, j, ancestor;
- char path[MAX_PATH_LENGTH];
- char strbuf[MAX_PATH_LENGTH];
- struct libusb_device *dev, *parent_dev;
- struct windows_device_priv *priv, *parent_priv;
- char* dev_interface_path = NULL;
- char* dev_id_path = NULL;
- unsigned long session_id;
- DWORD size, reg_type, port_nr, install_state;
- HKEY key;
- WCHAR guid_string_w[MAX_GUID_STRING_LENGTH];
- GUID* if_guid;
- LONG s;
- // Keep a list of newly allocated devs to unref
- libusb_device** unref_list;
- unsigned int unref_size = 64;
- unsigned int unref_cur = 0;
-
- // PASS 1 : (re)enumerate HCDs (allows for HCD hotplug)
- // PASS 2 : (re)enumerate HUBS
- // PASS 3 : (re)enumerate generic USB devices (including driverless)
- // and list additional USB device interface GUIDs to explore
- // PASS 4 : (re)enumerate master USB devices that have a device interface
- // PASS 5+: (re)enumerate device interfaced GUIDs (including HID) and
- // set the device interfaces.
-
- // Init the GUID table
- guid[HCD_PASS] = &GUID_DEVINTERFACE_USB_HOST_CONTROLLER;
- guid[HUB_PASS] = &GUID_DEVINTERFACE_USB_HUB;
- guid[GEN_PASS] = NULL;
- guid[DEV_PASS] = &GUID_DEVINTERFACE_USB_DEVICE;
- HidD_GetHidGuid(&hid_guid);
- guid[HID_PASS] = &hid_guid;
- nb_guids = HID_PASS+1;
-
- unref_list = (libusb_device**) calloc(unref_size, sizeof(libusb_device*));
- if (unref_list == NULL) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- for (pass = 0; ((pass < nb_guids) && (r == LIBUSB_SUCCESS)); pass++) {
-//#define ENUM_DEBUG
-#ifdef ENUM_DEBUG
- const char *passname[] = { "HCD", "HUB", "GEN", "DEV", "HID", "EXT" };
- usbi_dbg("\n#### PROCESSING %ss %s", passname[(pass<=HID_PASS)?pass:HID_PASS+1],
- (pass!=GEN_PASS)?guid_to_string(guid[pass]):"");
-#endif
- for (i = 0; ; i++) {
- // safe loop: free up any (unprotected) dynamic resource
- // NB: this is always executed before breaking the loop
- safe_free(dev_interface_details);
- safe_free(dev_interface_path);
- safe_free(dev_id_path);
- priv = parent_priv = NULL;
- dev = parent_dev = NULL;
-
- // Safe loop: end of loop conditions
- if (r != LIBUSB_SUCCESS) {
- break;
- }
- if ((pass == HCD_PASS) && (i == UINT8_MAX)) {
- usbi_warn(ctx, "program assertion failed - found more than %d buses, skipping the rest.", UINT8_MAX);
- break;
- }
- if (pass != GEN_PASS) {
- // Except for GEN, all passes deal with device interfaces
- dev_interface_details = get_interface_details(ctx, &dev_info, &dev_info_data, guid[pass], i);
- if (dev_interface_details == NULL) {
- break;
- } else {
- dev_interface_path = sanitize_path(dev_interface_details->DevicePath);
- if (dev_interface_path == NULL) {
- usbi_warn(ctx, "could not sanitize device interface path for '%s'", dev_interface_details->DevicePath);
- continue;
- }
- }
- } else {
- // Workaround for a Nec/Renesas USB 3.0 driver bug where root hubs are
- // being listed under the "NUSB3" PnP Symbolic Name rather than "USB".
- // The Intel USB 3.0 driver behaves similar, but uses "IUSB3"
- for (; class_index < ARRAYSIZE(usb_class); class_index++) {
- if (get_devinfo_data(ctx, &dev_info, &dev_info_data, usb_class[class_index], i))
- break;
- i = 0;
- }
- if (class_index >= ARRAYSIZE(usb_class))
- break;
- }
-
- // Read the Device ID path. This is what we'll use as UID
- // Note that if the device is plugged in a different port or hub, the Device ID changes
- if (CM_Get_Device_IDA(dev_info_data.DevInst, path, sizeof(path), 0) != CR_SUCCESS) {
- usbi_warn(ctx, "could not read the device id path for devinst %X, skipping",
- dev_info_data.DevInst);
- continue;
- }
- dev_id_path = sanitize_path(path);
- if (dev_id_path == NULL) {
- usbi_warn(ctx, "could not sanitize device id path for devinst %X, skipping",
- dev_info_data.DevInst);
- continue;
- }
-#ifdef ENUM_DEBUG
- usbi_dbg("PRO: %s", dev_id_path);
-#endif
-
- // The SPDRP_ADDRESS for USB devices is the device port number on the hub
- port_nr = 0;
- if ((pass >= HUB_PASS) && (pass <= GEN_PASS)) {
- if ( (!pSetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_ADDRESS,
- &reg_type, (BYTE*)&port_nr, 4, &size))
- || (size != 4) ) {
- usbi_warn(ctx, "could not retrieve port number for device '%s', skipping: %s",
- dev_id_path, windows_error_str(0));
- continue;
- }
- }
-
- // Set API to use or get additional data from generic pass
- api = USB_API_UNSUPPORTED;
- sub_api = SUB_API_NOTSET;
- switch (pass) {
- case HCD_PASS:
- break;
- case GEN_PASS:
- // We use the GEN pass to detect driverless devices...
- size = sizeof(strbuf);
- if (!pSetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_DRIVER,
- &reg_type, (BYTE*)strbuf, size, &size)) {
- usbi_info(ctx, "The following device has no driver: '%s'", dev_id_path);
- usbi_info(ctx, "libusbx will not be able to access it.");
- }
- // ...and to add the additional device interface GUIDs
- key = pSetupDiOpenDevRegKey(dev_info, &dev_info_data, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ);
- if (key != INVALID_HANDLE_VALUE) {
- size = sizeof(guid_string_w);
- s = pRegQueryValueExW(key, L"DeviceInterfaceGUIDs", NULL, &reg_type,
- (BYTE*)guid_string_w, &size);
- pRegCloseKey(key);
- if (s == ERROR_SUCCESS) {
- if (nb_guids >= MAX_ENUM_GUIDS) {
- // If this assert is ever reported, grow a GUID table dynamically
- usbi_err(ctx, "program assertion failed: too many GUIDs");
- LOOP_BREAK(LIBUSB_ERROR_OVERFLOW);
- }
- if_guid = (GUID*) calloc(1, sizeof(GUID));
- pCLSIDFromString(guid_string_w, if_guid);
- guid[nb_guids++] = if_guid;
- usbi_dbg("extra GUID: %s", guid_to_string(if_guid));
- }
- }
- break;
- case HID_PASS:
- api = USB_API_HID;
- break;
- default:
- // Get the API type (after checking that the driver installation is OK)
- if ( (!pSetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_INSTALL_STATE,
- &reg_type, (BYTE*)&install_state, 4, &size))
- || (size != 4) ){
- usbi_warn(ctx, "could not detect installation state of driver for '%s': %s",
- dev_id_path, windows_error_str(0));
- } else if (install_state != 0) {
- usbi_warn(ctx, "driver for device '%s' is reporting an issue (code: %d) - skipping",
- dev_id_path, install_state);
- continue;
- }
- get_api_type(ctx, &dev_info, &dev_info_data, &api, &sub_api);
- break;
- }
-
- // Find parent device (for the passes that need it)
- switch (pass) {
- case HCD_PASS:
- case DEV_PASS:
- case HUB_PASS:
- break;
- default:
- // Go through the ancestors until we see a face we recognize
- parent_dev = NULL;
- for (ancestor = 1; parent_dev == NULL; ancestor++) {
- session_id = get_ancestor_session_id(dev_info_data.DevInst, ancestor);
- if (session_id == 0) {
- break;
- }
- parent_dev = usbi_get_device_by_session_id(ctx, session_id);
- }
- if (parent_dev == NULL) {
- usbi_dbg("unlisted ancestor for '%s' (non USB HID, newly connected, etc.) - ignoring", dev_id_path);
- continue;
- }
- parent_priv = _device_priv(parent_dev);
- // virtual USB devices are also listed during GEN - don't process these yet
- if ( (pass == GEN_PASS) && (parent_priv->apib->id != USB_API_HUB) ) {
- continue;
- }
- break;
- }
-
- // Create new or match existing device, using the (hashed) device_id as session id
- if (pass <= DEV_PASS) { // For subsequent passes, we'll lookup the parent
- // These are the passes that create "new" devices
- session_id = htab_hash(dev_id_path);
- dev = usbi_get_device_by_session_id(ctx, session_id);
- if (dev == NULL) {
- if (pass == DEV_PASS) {
- // This can occur if the OS only reports a newly plugged device after we started enum
- usbi_warn(ctx, "'%s' was only detected in late pass (newly connected device?)"
- " - ignoring", dev_id_path);
- continue;
- }
- usbi_dbg("allocating new device for session [%X]", session_id);
- if ((dev = usbi_alloc_device(ctx, session_id)) == NULL) {
- LOOP_BREAK(LIBUSB_ERROR_NO_MEM);
- }
- windows_device_priv_init(dev);
- // Keep track of devices that need unref
- unref_list[unref_cur++] = dev;
- if (unref_cur >= unref_size) {
- unref_size += 64;
- unref_list = usbi_reallocf(unref_list, unref_size*sizeof(libusb_device*));
- if (unref_list == NULL) {
- usbi_err(ctx, "could not realloc list for unref - aborting.");
- LOOP_BREAK(LIBUSB_ERROR_NO_MEM);
- }
- }
- } else {
- usbi_dbg("found existing device for session [%X] (%d.%d)",
- session_id, dev->bus_number, dev->device_address);
- }
- priv = _device_priv(dev);
- }
-
- // Setup device
- switch (pass) {
- case HCD_PASS:
- dev->bus_number = (uint8_t)(i + 1); // bus 0 is reserved for disconnected
- dev->device_address = 0;
- dev->num_configurations = 0;
- priv->apib = &usb_api_backend[USB_API_HUB];
- priv->sub_api = SUB_API_NOTSET;
- priv->depth = UINT8_MAX; // Overflow to 0 for HCD Hubs
- priv->path = dev_interface_path; dev_interface_path = NULL;
- break;
- case HUB_PASS:
- case DEV_PASS:
- // If the device has already been setup, don't do it again
- if (priv->path != NULL)
- break;
- // Take care of API initialization
- priv->path = dev_interface_path; dev_interface_path = NULL;
- priv->apib = &usb_api_backend[api];
- priv->sub_api = sub_api;
- switch(api) {
- case USB_API_COMPOSITE:
- case USB_API_HUB:
- break;
- case USB_API_HID:
- priv->hid = calloc(1, sizeof(struct hid_device_priv));
- if (priv->hid == NULL) {
- LOOP_BREAK(LIBUSB_ERROR_NO_MEM);
- }
- priv->hid->nb_interfaces = 0;
- break;
- default:
- // For other devices, the first interface is the same as the device
- priv->usb_interface[0].path = (char*) calloc(safe_strlen(priv->path)+1, 1);
- if (priv->usb_interface[0].path != NULL) {
- safe_strcpy(priv->usb_interface[0].path, safe_strlen(priv->path)+1, priv->path);
- } else {
- usbi_warn(ctx, "could not duplicate interface path '%s'", priv->path);
- }
- // The following is needed if we want API calls to work for both simple
- // and composite devices.
- for(j=0; j<USB_MAXINTERFACES; j++) {
- priv->usb_interface[j].apib = &usb_api_backend[api];
- }
- break;
- }
- break;
- case GEN_PASS:
- r = init_device(dev, parent_dev, (uint8_t)port_nr, dev_id_path, dev_info_data.DevInst);
- if (r == LIBUSB_SUCCESS) {
- // Append device to the list of discovered devices
- discdevs = discovered_devs_append(*_discdevs, dev);
- if (!discdevs) {
- LOOP_BREAK(LIBUSB_ERROR_NO_MEM);
- }
- *_discdevs = discdevs;
- } else if (r == LIBUSB_ERROR_NO_DEVICE) {
- // This can occur if the device was disconnected but Windows hasn't
- // refreshed its enumeration yet - in that case, we ignore the device
- r = LIBUSB_SUCCESS;
- }
- break;
- default: // HID_PASS and later
- if (parent_priv->apib->id == USB_API_HID) {
- usbi_dbg("setting HID interface for [%lX]:", parent_dev->session_data);
- r = set_hid_interface(ctx, parent_dev, dev_interface_path);
- if (r != LIBUSB_SUCCESS) LOOP_BREAK(r);
- dev_interface_path = NULL;
- } else if (parent_priv->apib->id == USB_API_COMPOSITE) {
- usbi_dbg("setting composite interface for [%lX]:", parent_dev->session_data);
- switch (set_composite_interface(ctx, parent_dev, dev_interface_path, dev_id_path, api, sub_api)) {
- case LIBUSB_SUCCESS:
- dev_interface_path = NULL;
- break;
- case LIBUSB_ERROR_ACCESS:
- // interface has already been set => make sure dev_interface_path is freed then
- break;
- default:
- LOOP_BREAK(r);
- break;
- }
- }
- break;
- }
- }
- }
-
- // Free any additional GUIDs
- for (pass = HID_PASS+1; pass < nb_guids; pass++) {
- safe_free(guid[pass]);
- }
-
- // Unref newly allocated devs
- for (i=0; i<unref_cur; i++) {
- safe_unref_device(unref_list[i]);
- }
- safe_free(unref_list);
-
- return r;
-}
-
-/*
- * exit: libusbx backend deinitialization function
- */
-static void windows_exit(void)
-{
- int i;
- HANDLE semaphore;
- char sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
-
- sprintf(sem_name, "libusb_init%08X", (unsigned int)GetCurrentProcessId()&0xFFFFFFFF);
- semaphore = CreateSemaphoreA(NULL, 1, 1, sem_name);
- if (semaphore == NULL) {
- return;
- }
-
- // A successful wait brings our semaphore count to 0 (unsignaled)
- // => any concurent wait stalls until the semaphore release
- if (WaitForSingleObject(semaphore, INFINITE) != WAIT_OBJECT_0) {
- CloseHandle(semaphore);
- return;
- }
-
- // Only works if exits and inits are balanced exactly
- if (--concurrent_usage < 0) { // Last exit
- for (i=0; i<USB_API_MAX; i++) {
- usb_api_backend[i].exit(SUB_API_NOTSET);
- }
- exit_polling();
-
- if (timer_thread) {
- SetEvent(timer_request[1]); // actually the signal to quit the thread.
- if (WAIT_OBJECT_0 != WaitForSingleObject(timer_thread, INFINITE)) {
- usbi_dbg("could not wait for timer thread to quit");
- TerminateThread(timer_thread, 1);
- }
- CloseHandle(timer_thread);
- timer_thread = NULL;
- }
- for (i = 0; i < 2; i++) {
- if (timer_request[i]) {
- CloseHandle(timer_request[i]);
- timer_request[i] = NULL;
- }
- }
- if (timer_response) {
- CloseHandle(timer_response);
- timer_response = NULL;
- }
- if (timer_mutex) {
- CloseHandle(timer_mutex);
- timer_mutex = NULL;
- }
- htab_destroy();
- }
-
- ReleaseSemaphore(semaphore, 1, NULL); // increase count back to 1
- CloseHandle(semaphore);
-}
-
-static int windows_get_device_descriptor(struct libusb_device *dev, unsigned char *buffer, int *host_endian)
-{
- struct windows_device_priv *priv = _device_priv(dev);
-
- memcpy(buffer, &(priv->dev_descriptor), DEVICE_DESC_LENGTH);
- *host_endian = 0;
-
- return LIBUSB_SUCCESS;
-}
-
-static int windows_get_config_descriptor(struct libusb_device *dev, uint8_t config_index, unsigned char *buffer, size_t len, int *host_endian)
-{
- struct windows_device_priv *priv = _device_priv(dev);
- PUSB_CONFIGURATION_DESCRIPTOR config_header;
- size_t size;
-
- // config index is zero based
- if (config_index >= dev->num_configurations)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- if ((priv->config_descriptor == NULL) || (priv->config_descriptor[config_index] == NULL))
- return LIBUSB_ERROR_NOT_FOUND;
-
- config_header = (PUSB_CONFIGURATION_DESCRIPTOR)priv->config_descriptor[config_index];
-
- size = min(config_header->wTotalLength, len);
- memcpy(buffer, priv->config_descriptor[config_index], size);
- *host_endian = 0;
-
- return size;
-}
-
-/*
- * return the cached copy of the active config descriptor
- */
-static int windows_get_active_config_descriptor(struct libusb_device *dev, unsigned char *buffer, size_t len, int *host_endian)
-{
- struct windows_device_priv *priv = _device_priv(dev);
-
- if (priv->active_config == 0)
- return LIBUSB_ERROR_NOT_FOUND;
-
- // config index is zero based
- return windows_get_config_descriptor(dev, (uint8_t)(priv->active_config-1), buffer, len, host_endian);
-}
-
-static int windows_open(struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
-
- if (priv->apib == NULL) {
- usbi_err(ctx, "program assertion failed - device is not initialized");
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- return priv->apib->open(SUB_API_NOTSET, dev_handle);
-}
-
-static void windows_close(struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- priv->apib->close(SUB_API_NOTSET, dev_handle);
-}
-
-static int windows_get_configuration(struct libusb_device_handle *dev_handle, int *config)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- if (priv->active_config == 0) {
- *config = 0;
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- *config = priv->active_config;
- return LIBUSB_SUCCESS;
-}
-
-/*
- * from http://msdn.microsoft.com/en-us/library/ms793522.aspx: "The port driver
- * does not currently expose a service that allows higher-level drivers to set
- * the configuration."
- */
-static int windows_set_configuration(struct libusb_device_handle *dev_handle, int config)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- int r = LIBUSB_SUCCESS;
-
- if (config >= USB_MAXCONFIG)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- r = libusb_control_transfer(dev_handle, LIBUSB_ENDPOINT_OUT |
- LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_DEVICE,
- LIBUSB_REQUEST_SET_CONFIGURATION, (uint16_t)config,
- 0, NULL, 0, 1000);
-
- if (r == LIBUSB_SUCCESS) {
- priv->active_config = (uint8_t)config;
- }
- return r;
-}
-
-static int windows_claim_interface(struct libusb_device_handle *dev_handle, int iface)
-{
- int r = LIBUSB_SUCCESS;
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- if (iface >= USB_MAXINTERFACES)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- safe_free(priv->usb_interface[iface].endpoint);
- priv->usb_interface[iface].nb_endpoints= 0;
-
- r = priv->apib->claim_interface(SUB_API_NOTSET, dev_handle, iface);
-
- if (r == LIBUSB_SUCCESS) {
- r = windows_assign_endpoints(dev_handle, iface, 0);
- }
-
- return r;
-}
-
-static int windows_set_interface_altsetting(struct libusb_device_handle *dev_handle, int iface, int altsetting)
-{
- int r = LIBUSB_SUCCESS;
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- safe_free(priv->usb_interface[iface].endpoint);
- priv->usb_interface[iface].nb_endpoints= 0;
-
- r = priv->apib->set_interface_altsetting(SUB_API_NOTSET, dev_handle, iface, altsetting);
-
- if (r == LIBUSB_SUCCESS) {
- r = windows_assign_endpoints(dev_handle, iface, altsetting);
- }
-
- return r;
-}
-
-static int windows_release_interface(struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- return priv->apib->release_interface(SUB_API_NOTSET, dev_handle, iface);
-}
-
-static int windows_clear_halt(struct libusb_device_handle *dev_handle, unsigned char endpoint)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- return priv->apib->clear_halt(SUB_API_NOTSET, dev_handle, endpoint);
-}
-
-static int windows_reset_device(struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- return priv->apib->reset_device(SUB_API_NOTSET, dev_handle);
-}
-
-// The 3 functions below are unlikely to ever get supported on Windows
-static int windows_kernel_driver_active(struct libusb_device_handle *dev_handle, int iface)
-{
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-static int windows_attach_kernel_driver(struct libusb_device_handle *dev_handle, int iface)
-{
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-static int windows_detach_kernel_driver(struct libusb_device_handle *dev_handle, int iface)
-{
- return LIBUSB_ERROR_NOT_SUPPORTED;
-}
-
-static void windows_destroy_device(struct libusb_device *dev)
-{
- windows_device_priv_release(dev);
-}
-
-static void windows_clear_transfer_priv(struct usbi_transfer *itransfer)
-{
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
-
- usbi_free_fd(&transfer_priv->pollable_fd);
- safe_free(transfer_priv->hid_buffer);
- // When auto claim is in use, attempt to release the auto-claimed interface
- auto_release(itransfer);
-}
-
-static int submit_bulk_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int r;
-
- r = priv->apib->submit_bulk_transfer(SUB_API_NOTSET, itransfer);
- if (r != LIBUSB_SUCCESS) {
- return r;
- }
-
- usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd,
- (short)(IS_XFERIN(transfer) ? POLLIN : POLLOUT));
-
- itransfer->flags |= USBI_TRANSFER_UPDATED_FDS;
- return LIBUSB_SUCCESS;
-}
-
-static int submit_iso_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int r;
-
- r = priv->apib->submit_iso_transfer(SUB_API_NOTSET, itransfer);
- if (r != LIBUSB_SUCCESS) {
- return r;
- }
-
- usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd,
- (short)(IS_XFERIN(transfer) ? POLLIN : POLLOUT));
-
- itransfer->flags |= USBI_TRANSFER_UPDATED_FDS;
- return LIBUSB_SUCCESS;
-}
-
-static int submit_control_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int r;
-
- r = priv->apib->submit_control_transfer(SUB_API_NOTSET, itransfer);
- if (r != LIBUSB_SUCCESS) {
- return r;
- }
-
- usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd, POLLIN);
-
- itransfer->flags |= USBI_TRANSFER_UPDATED_FDS;
- return LIBUSB_SUCCESS;
-
-}
-
-static int windows_submit_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- return submit_control_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- if (IS_XFEROUT(transfer) &&
- transfer->flags & LIBUSB_TRANSFER_ADD_ZERO_PACKET)
- return LIBUSB_ERROR_NOT_SUPPORTED;
- return submit_bulk_transfer(itransfer);
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return submit_iso_transfer(itransfer);
- default:
- usbi_err(TRANSFER_CTX(transfer), "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-static int windows_abort_control(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
-
- return priv->apib->abort_control(SUB_API_NOTSET, itransfer);
-}
-
-static int windows_abort_transfers(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
-
- return priv->apib->abort_transfers(SUB_API_NOTSET, itransfer);
-}
-
-static int windows_cancel_transfer(struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- return windows_abort_control(itransfer);
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- return windows_abort_transfers(itransfer);
- default:
- usbi_err(ITRANSFER_CTX(itransfer), "unknown endpoint type %d", transfer->type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-static void windows_transfer_callback(struct usbi_transfer *itransfer, uint32_t io_result, uint32_t io_size)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int status, istatus;
-
- usbi_dbg("handling I/O completion with errcode %d, size %d", io_result, io_size);
-
- switch(io_result) {
- case NO_ERROR:
- status = priv->apib->copy_transfer_data(SUB_API_NOTSET, itransfer, io_size);
- break;
- case ERROR_GEN_FAILURE:
- usbi_dbg("detected endpoint stall");
- status = LIBUSB_TRANSFER_STALL;
- break;
- case ERROR_SEM_TIMEOUT:
- usbi_dbg("detected semaphore timeout");
- status = LIBUSB_TRANSFER_TIMED_OUT;
- break;
- case ERROR_OPERATION_ABORTED:
- istatus = priv->apib->copy_transfer_data(SUB_API_NOTSET, itransfer, io_size);
- if (istatus != LIBUSB_TRANSFER_COMPLETED) {
- usbi_dbg("Failed to copy partial data in aborted operation: %d", istatus);
- }
- if (itransfer->flags & USBI_TRANSFER_TIMED_OUT) {
- usbi_dbg("detected timeout");
- status = LIBUSB_TRANSFER_TIMED_OUT;
- } else {
- usbi_dbg("detected operation aborted");
- status = LIBUSB_TRANSFER_CANCELLED;
- }
- break;
- default:
- usbi_err(ITRANSFER_CTX(itransfer), "detected I/O error %d: %s", io_result, windows_error_str(0));
- status = LIBUSB_TRANSFER_ERROR;
- break;
- }
- windows_clear_transfer_priv(itransfer); // Cancel polling
- usbi_handle_transfer_completion(itransfer, (enum libusb_transfer_status)status);
-}
-
-static void windows_handle_callback (struct usbi_transfer *itransfer, uint32_t io_result, uint32_t io_size)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
-
- switch (transfer->type) {
- case LIBUSB_TRANSFER_TYPE_CONTROL:
- case LIBUSB_TRANSFER_TYPE_BULK:
- case LIBUSB_TRANSFER_TYPE_INTERRUPT:
- case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
- windows_transfer_callback (itransfer, io_result, io_size);
- break;
- default:
- usbi_err(ITRANSFER_CTX(itransfer), "unknown endpoint type %d", transfer->type);
- }
-}
-
-static int windows_handle_events(struct libusb_context *ctx, struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready)
-{
- struct windows_transfer_priv* transfer_priv = NULL;
- POLL_NFDS_TYPE i = 0;
- bool found = false;
- struct usbi_transfer *transfer;
- DWORD io_size, io_result;
-
- usbi_mutex_lock(&ctx->open_devs_lock);
- for (i = 0; i < nfds && num_ready > 0; i++) {
-
- usbi_dbg("checking fd %d with revents = %04x", fds[i].fd, fds[i].revents);
-
- if (!fds[i].revents) {
- continue;
- }
-
- num_ready--;
-
- // Because a Windows OVERLAPPED is used for poll emulation,
- // a pollable fd is created and stored with each transfer
- usbi_mutex_lock(&ctx->flying_transfers_lock);
- list_for_each_entry(transfer, &ctx->flying_transfers, list, struct usbi_transfer) {
- transfer_priv = usbi_transfer_get_os_priv(transfer);
- if (transfer_priv->pollable_fd.fd == fds[i].fd) {
- found = true;
- break;
- }
- }
- usbi_mutex_unlock(&ctx->flying_transfers_lock);
-
- if (found) {
- // Handle async requests that completed synchronously first
- if (HasOverlappedIoCompletedSync(transfer_priv->pollable_fd.overlapped)) {
- io_result = NO_ERROR;
- io_size = (DWORD)transfer_priv->pollable_fd.overlapped->InternalHigh;
- // Regular async overlapped
- } else if (GetOverlappedResult(transfer_priv->pollable_fd.handle,
- transfer_priv->pollable_fd.overlapped, &io_size, false)) {
- io_result = NO_ERROR;
- } else {
- io_result = GetLastError();
- }
- usbi_remove_pollfd(ctx, transfer_priv->pollable_fd.fd);
- // let handle_callback free the event using the transfer wfd
- // If you don't use the transfer wfd, you run a risk of trying to free a
- // newly allocated wfd that took the place of the one from the transfer.
- windows_handle_callback(transfer, io_result, io_size);
- } else {
- usbi_err(ctx, "could not find a matching transfer for fd %x", fds[i]);
- return LIBUSB_ERROR_NOT_FOUND;
- }
- }
-
- usbi_mutex_unlock(&ctx->open_devs_lock);
- return LIBUSB_SUCCESS;
-}
-
-/*
- * Monotonic and real time functions
- */
-unsigned __stdcall windows_clock_gettime_threaded(void* param)
-{
- LARGE_INTEGER hires_counter, li_frequency;
- LONG nb_responses;
- int timer_index;
-
- // Init - find out if we have access to a monotonic (hires) timer
- if (!QueryPerformanceFrequency(&li_frequency)) {
- usbi_dbg("no hires timer available on this platform");
- hires_frequency = 0;
- hires_ticks_to_ps = UINT64_C(0);
- } else {
- hires_frequency = li_frequency.QuadPart;
- // The hires frequency can go as high as 4 GHz, so we'll use a conversion
- // to picoseconds to compute the tv_nsecs part in clock_gettime
- hires_ticks_to_ps = UINT64_C(1000000000000) / hires_frequency;
- usbi_dbg("hires timer available (Frequency: %"PRIu64" Hz)", hires_frequency);
- }
-
- // Main loop - wait for requests
- while (1) {
- timer_index = WaitForMultipleObjects(2, timer_request, FALSE, INFINITE) - WAIT_OBJECT_0;
- if ( (timer_index != 0) && (timer_index != 1) ) {
- usbi_dbg("failure to wait on requests: %s", windows_error_str(0));
- continue;
- }
- if (request_count[timer_index] == 0) {
- // Request already handled
- ResetEvent(timer_request[timer_index]);
- // There's still a possiblity that a thread sends a request between the
- // time we test request_count[] == 0 and we reset the event, in which case
- // the request would be ignored. The simple solution to that is to test
- // request_count again and process requests if non zero.
- if (request_count[timer_index] == 0)
- continue;
- }
- switch (timer_index) {
- case 0:
- WaitForSingleObject(timer_mutex, INFINITE);
- // Requests to this thread are for hires always
- if (QueryPerformanceCounter(&hires_counter) != 0) {
- timer_tp.tv_sec = (long)(hires_counter.QuadPart / hires_frequency);
- timer_tp.tv_nsec = (long)(((hires_counter.QuadPart % hires_frequency)/1000) * hires_ticks_to_ps);
- } else {
- // Fallback to real-time if we can't get monotonic value
- // Note that real-time clock does not wait on the mutex or this thread.
- windows_clock_gettime(USBI_CLOCK_REALTIME, &timer_tp);
- }
- ReleaseMutex(timer_mutex);
-
- nb_responses = InterlockedExchange((LONG*)&request_count[0], 0);
- if ( (nb_responses)
- && (ReleaseSemaphore(timer_response, nb_responses, NULL) == 0) ) {
- usbi_dbg("unable to release timer semaphore %d: %s", windows_error_str(0));
- }
- continue;
- case 1: // time to quit
- usbi_dbg("timer thread quitting");
- return 0;
- }
- }
-}
-
-static int windows_clock_gettime(int clk_id, struct timespec *tp)
-{
- FILETIME filetime;
- ULARGE_INTEGER rtime;
- DWORD r;
- switch(clk_id) {
- case USBI_CLOCK_MONOTONIC:
- if (hires_frequency != 0) {
- while (1) {
- InterlockedIncrement((LONG*)&request_count[0]);
- SetEvent(timer_request[0]);
- r = WaitForSingleObject(timer_response, TIMER_REQUEST_RETRY_MS);
- switch(r) {
- case WAIT_OBJECT_0:
- WaitForSingleObject(timer_mutex, INFINITE);
- *tp = timer_tp;
- ReleaseMutex(timer_mutex);
- return LIBUSB_SUCCESS;
- case WAIT_TIMEOUT:
- usbi_dbg("could not obtain a timer value within reasonable timeframe - too much load?");
- break; // Retry until successful
- default:
- usbi_dbg("WaitForSingleObject failed: %s", windows_error_str(0));
- return LIBUSB_ERROR_OTHER;
- }
- }
- }
- // Fall through and return real-time if monotonic was not detected @ timer init
- case USBI_CLOCK_REALTIME:
- // We follow http://msdn.microsoft.com/en-us/library/ms724928%28VS.85%29.aspx
- // with a predef epoch_time to have an epoch that starts at 1970.01.01 00:00
- // Note however that our resolution is bounded by the Windows system time
- // functions and is at best of the order of 1 ms (or, usually, worse)
- GetSystemTimeAsFileTime(&filetime);
- rtime.LowPart = filetime.dwLowDateTime;
- rtime.HighPart = filetime.dwHighDateTime;
- rtime.QuadPart -= epoch_time;
- tp->tv_sec = (long)(rtime.QuadPart / 10000000);
- tp->tv_nsec = (long)((rtime.QuadPart % 10000000)*100);
- return LIBUSB_SUCCESS;
- default:
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-}
-
-
-// NB: MSVC6 does not support named initializers.
-const struct usbi_os_backend windows_backend = {
- "Windows",
- USBI_CAP_HAS_HID_ACCESS,
- windows_init,
- windows_exit,
-
- windows_get_device_list,
- NULL, /* hotplug_poll */
- windows_open,
- windows_close,
-
- windows_get_device_descriptor,
- windows_get_active_config_descriptor,
- windows_get_config_descriptor,
- NULL, /* get_config_descriptor_by_value() */
-
- windows_get_configuration,
- windows_set_configuration,
- windows_claim_interface,
- windows_release_interface,
-
- windows_set_interface_altsetting,
- windows_clear_halt,
- windows_reset_device,
-
- windows_kernel_driver_active,
- windows_detach_kernel_driver,
- windows_attach_kernel_driver,
-
- windows_destroy_device,
-
- windows_submit_transfer,
- windows_cancel_transfer,
- windows_clear_transfer_priv,
-
- windows_handle_events,
-
- windows_clock_gettime,
-#if defined(USBI_TIMERFD_AVAILABLE)
- NULL,
-#endif
- sizeof(struct windows_device_priv),
- sizeof(struct windows_device_handle_priv),
- sizeof(struct windows_transfer_priv),
- 0,
-};
-
-
-/*
- * USB API backends
- */
-static int unsupported_init(int sub_api, struct libusb_context *ctx) {
- return LIBUSB_SUCCESS;
-}
-static int unsupported_exit(int sub_api) {
- return LIBUSB_SUCCESS;
-}
-static int unsupported_open(int sub_api, struct libusb_device_handle *dev_handle) {
- PRINT_UNSUPPORTED_API(open);
-}
-static void unsupported_close(int sub_api, struct libusb_device_handle *dev_handle) {
- usbi_dbg("unsupported API call for 'close'");
-}
-static int unsupported_configure_endpoints(int sub_api, struct libusb_device_handle *dev_handle, int iface) {
- PRINT_UNSUPPORTED_API(configure_endpoints);
-}
-static int unsupported_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface) {
- PRINT_UNSUPPORTED_API(claim_interface);
-}
-static int unsupported_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting) {
- PRINT_UNSUPPORTED_API(set_interface_altsetting);
-}
-static int unsupported_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface) {
- PRINT_UNSUPPORTED_API(release_interface);
-}
-static int unsupported_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint) {
- PRINT_UNSUPPORTED_API(clear_halt);
-}
-static int unsupported_reset_device(int sub_api, struct libusb_device_handle *dev_handle) {
- PRINT_UNSUPPORTED_API(reset_device);
-}
-static int unsupported_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer) {
- PRINT_UNSUPPORTED_API(submit_bulk_transfer);
-}
-static int unsupported_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer) {
- PRINT_UNSUPPORTED_API(submit_iso_transfer);
-}
-static int unsupported_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer) {
- PRINT_UNSUPPORTED_API(submit_control_transfer);
-}
-static int unsupported_abort_control(int sub_api, struct usbi_transfer *itransfer) {
- PRINT_UNSUPPORTED_API(abort_control);
-}
-static int unsupported_abort_transfers(int sub_api, struct usbi_transfer *itransfer) {
- PRINT_UNSUPPORTED_API(abort_transfers);
-}
-static int unsupported_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size) {
- PRINT_UNSUPPORTED_API(copy_transfer_data);
-}
-static int common_configure_endpoints(int sub_api, struct libusb_device_handle *dev_handle, int iface) {
- return LIBUSB_SUCCESS;
-}
-// These names must be uppercase
-const char* hub_driver_names[] = {"USBHUB", "USBHUB3", "NUSB3HUB", "RUSB3HUB", "FLXHCIH", "TIHUB3", "ETRONHUB3", "VIAHUB3", "ASMTHUB3", "IUSB3HUB"};
-const char* composite_driver_names[] = {"USBCCGP"};
-const char* winusbx_driver_names[] = WINUSBX_DRV_NAMES;
-const char* hid_driver_names[] = {"HIDUSB", "MOUHID", "KBDHID"};
-const struct windows_usb_api_backend usb_api_backend[USB_API_MAX] = {
- {
- USB_API_UNSUPPORTED,
- "Unsupported API",
- NULL,
- 0,
- unsupported_init,
- unsupported_exit,
- unsupported_open,
- unsupported_close,
- unsupported_configure_endpoints,
- unsupported_claim_interface,
- unsupported_set_interface_altsetting,
- unsupported_release_interface,
- unsupported_clear_halt,
- unsupported_reset_device,
- unsupported_submit_bulk_transfer,
- unsupported_submit_iso_transfer,
- unsupported_submit_control_transfer,
- unsupported_abort_control,
- unsupported_abort_transfers,
- unsupported_copy_transfer_data,
- }, {
- USB_API_HUB,
- "HUB API",
- hub_driver_names,
- ARRAYSIZE(hub_driver_names),
- unsupported_init,
- unsupported_exit,
- unsupported_open,
- unsupported_close,
- unsupported_configure_endpoints,
- unsupported_claim_interface,
- unsupported_set_interface_altsetting,
- unsupported_release_interface,
- unsupported_clear_halt,
- unsupported_reset_device,
- unsupported_submit_bulk_transfer,
- unsupported_submit_iso_transfer,
- unsupported_submit_control_transfer,
- unsupported_abort_control,
- unsupported_abort_transfers,
- unsupported_copy_transfer_data,
- }, {
- USB_API_COMPOSITE,
- "Composite API",
- composite_driver_names,
- ARRAYSIZE(composite_driver_names),
- composite_init,
- composite_exit,
- composite_open,
- composite_close,
- common_configure_endpoints,
- composite_claim_interface,
- composite_set_interface_altsetting,
- composite_release_interface,
- composite_clear_halt,
- composite_reset_device,
- composite_submit_bulk_transfer,
- composite_submit_iso_transfer,
- composite_submit_control_transfer,
- composite_abort_control,
- composite_abort_transfers,
- composite_copy_transfer_data,
- }, {
- USB_API_WINUSBX,
- "WinUSB-like APIs",
- winusbx_driver_names,
- ARRAYSIZE(winusbx_driver_names),
- winusbx_init,
- winusbx_exit,
- winusbx_open,
- winusbx_close,
- winusbx_configure_endpoints,
- winusbx_claim_interface,
- winusbx_set_interface_altsetting,
- winusbx_release_interface,
- winusbx_clear_halt,
- winusbx_reset_device,
- winusbx_submit_bulk_transfer,
- unsupported_submit_iso_transfer,
- winusbx_submit_control_transfer,
- winusbx_abort_control,
- winusbx_abort_transfers,
- winusbx_copy_transfer_data,
- }, {
- USB_API_HID,
- "HID API",
- hid_driver_names,
- ARRAYSIZE(hid_driver_names),
- hid_init,
- hid_exit,
- hid_open,
- hid_close,
- common_configure_endpoints,
- hid_claim_interface,
- hid_set_interface_altsetting,
- hid_release_interface,
- hid_clear_halt,
- hid_reset_device,
- hid_submit_bulk_transfer,
- unsupported_submit_iso_transfer,
- hid_submit_control_transfer,
- hid_abort_transfers,
- hid_abort_transfers,
- hid_copy_transfer_data,
- },
-};
-
-
-/*
- * WinUSB-like (WinUSB, libusb0/libusbK through libusbk DLL) API functions
- */
-#define WinUSBX_Set(fn) do { if (native_winusb) WinUSBX[i].fn = (WinUsb_##fn##_t) GetProcAddress(h, "WinUsb_" #fn); \
- else pLibK_GetProcAddress((PVOID*)&WinUSBX[i].fn, i, KUSB_FNID_##fn); } while (0)
-
-static int winusbx_init(int sub_api, struct libusb_context *ctx)
-{
- HMODULE h = NULL;
- bool native_winusb = false;
- int i;
- KLIB_VERSION LibK_Version;
- LibK_GetProcAddress_t pLibK_GetProcAddress = NULL;
- LibK_GetVersion_t pLibK_GetVersion = NULL;
-
- h = GetModuleHandleA("libusbK");
- if (h == NULL) {
- h = LoadLibraryA("libusbK");
- }
- if (h == NULL) {
- usbi_info(ctx, "libusbK DLL is not available, will use native WinUSB");
- h = GetModuleHandleA("WinUSB");
- if (h == NULL) {
- h = LoadLibraryA("WinUSB");
- } if (h == NULL) {
- usbi_warn(ctx, "WinUSB DLL is not available either,\n"
- "you will not be able to access devices outside of enumeration");
- return LIBUSB_ERROR_NOT_FOUND;
- }
- } else {
- usbi_dbg("using libusbK DLL for universal access");
- pLibK_GetVersion = (LibK_GetVersion_t) GetProcAddress(h, "LibK_GetVersion");
- if (pLibK_GetVersion != NULL) {
- pLibK_GetVersion(&LibK_Version);
- usbi_dbg("libusbK version: %d.%d.%d.%d", LibK_Version.Major, LibK_Version.Minor,
- LibK_Version.Micro, LibK_Version.Nano);
- }
- pLibK_GetProcAddress = (LibK_GetProcAddress_t) GetProcAddress(h, "LibK_GetProcAddress");
- if (pLibK_GetProcAddress == NULL) {
- usbi_err(ctx, "LibK_GetProcAddress() not found in libusbK DLL");
- return LIBUSB_ERROR_NOT_FOUND;
- }
- }
- native_winusb = (pLibK_GetProcAddress == NULL);
- for (i=SUB_API_LIBUSBK; i<SUB_API_MAX; i++) {
- WinUSBX_Set(AbortPipe);
- WinUSBX_Set(ControlTransfer);
- WinUSBX_Set(FlushPipe);
- WinUSBX_Set(Free);
- WinUSBX_Set(GetAssociatedInterface);
- WinUSBX_Set(GetCurrentAlternateSetting);
- WinUSBX_Set(GetDescriptor);
- WinUSBX_Set(GetOverlappedResult);
- WinUSBX_Set(GetPipePolicy);
- WinUSBX_Set(GetPowerPolicy);
- WinUSBX_Set(Initialize);
- WinUSBX_Set(QueryDeviceInformation);
- WinUSBX_Set(QueryInterfaceSettings);
- WinUSBX_Set(QueryPipe);
- WinUSBX_Set(ReadPipe);
- WinUSBX_Set(ResetPipe);
- WinUSBX_Set(SetCurrentAlternateSetting);
- WinUSBX_Set(SetPipePolicy);
- WinUSBX_Set(SetPowerPolicy);
- WinUSBX_Set(WritePipe);
- if (!native_winusb) {
- WinUSBX_Set(ResetDevice);
- }
- if (WinUSBX[i].Initialize != NULL) {
- WinUSBX[i].initialized = true;
- usbi_dbg("initalized sub API %s", sub_api_name[i]);
- } else {
- usbi_warn(ctx, "Failed to initalize sub API %s", sub_api_name[i]);
- WinUSBX[i].initialized = false;
- }
- }
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_exit(int sub_api)
-{
- return LIBUSB_SUCCESS;
-}
-
-// NB: open and close must ensure that they only handle interface of
-// the right API type, as these functions can be called wholesale from
-// composite_open(), with interfaces belonging to different APIs
-static int winusbx_open(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
-
- HANDLE file_handle;
- int i;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- // WinUSB requires a seperate handle for each interface
- for (i = 0; i < USB_MAXINTERFACES; i++) {
- if ( (priv->usb_interface[i].path != NULL)
- && (priv->usb_interface[i].apib->id == USB_API_WINUSBX) ) {
- file_handle = CreateFileA(priv->usb_interface[i].path, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
- if (file_handle == INVALID_HANDLE_VALUE) {
- usbi_err(ctx, "could not open device %s (interface %d): %s", priv->usb_interface[i].path, i, windows_error_str(0));
- switch(GetLastError()) {
- case ERROR_FILE_NOT_FOUND: // The device was disconnected
- return LIBUSB_ERROR_NO_DEVICE;
- case ERROR_ACCESS_DENIED:
- return LIBUSB_ERROR_ACCESS;
- default:
- return LIBUSB_ERROR_IO;
- }
- }
- handle_priv->interface_handle[i].dev_handle = file_handle;
- }
- }
-
- return LIBUSB_SUCCESS;
-}
-
-static void winusbx_close(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- HANDLE file_handle;
- int i;
-
- if (sub_api == SUB_API_NOTSET)
- sub_api = priv->sub_api;
- if (!WinUSBX[sub_api].initialized)
- return;
-
- for (i = 0; i < USB_MAXINTERFACES; i++) {
- if (priv->usb_interface[i].apib->id == USB_API_WINUSBX) {
- file_handle = handle_priv->interface_handle[i].dev_handle;
- if ( (file_handle != 0) && (file_handle != INVALID_HANDLE_VALUE)) {
- CloseHandle(file_handle);
- }
- }
- }
-}
-
-static int winusbx_configure_endpoints(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- HANDLE winusb_handle = handle_priv->interface_handle[iface].api_handle;
- UCHAR policy;
- ULONG timeout = 0;
- uint8_t endpoint_address;
- int i;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- // With handle and enpoints set (in parent), we can setup the default pipe properties
- // see http://download.microsoft.com/download/D/1/D/D1DD7745-426B-4CC3-A269-ABBBE427C0EF/DVC-T705_DDC08.pptx
- for (i=-1; i<priv->usb_interface[iface].nb_endpoints; i++) {
- endpoint_address =(i==-1)?0:priv->usb_interface[iface].endpoint[i];
- if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
- PIPE_TRANSFER_TIMEOUT, sizeof(ULONG), &timeout)) {
- usbi_dbg("failed to set PIPE_TRANSFER_TIMEOUT for control endpoint %02X", endpoint_address);
- }
- if ((i == -1) || (sub_api == SUB_API_LIBUSB0)) {
- continue; // Other policies don't apply to control endpoint or libusb0
- }
- policy = false;
- if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
- SHORT_PACKET_TERMINATE, sizeof(UCHAR), &policy)) {
- usbi_dbg("failed to disable SHORT_PACKET_TERMINATE for endpoint %02X", endpoint_address);
- }
- if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
- IGNORE_SHORT_PACKETS, sizeof(UCHAR), &policy)) {
- usbi_dbg("failed to disable IGNORE_SHORT_PACKETS for endpoint %02X", endpoint_address);
- }
- policy = true;
- /* ALLOW_PARTIAL_READS must be enabled due to likely libusbK bug. See:
- https://sourceforge.net/mailarchive/message.php?msg_id=29736015 */
- if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
- ALLOW_PARTIAL_READS, sizeof(UCHAR), &policy)) {
- usbi_dbg("failed to enable ALLOW_PARTIAL_READS for endpoint %02X", endpoint_address);
- }
- if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
- AUTO_CLEAR_STALL, sizeof(UCHAR), &policy)) {
- usbi_dbg("failed to enable AUTO_CLEAR_STALL for endpoint %02X", endpoint_address);
- }
- }
-
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- bool is_using_usbccgp = (priv->apib->id == USB_API_COMPOSITE);
- HANDLE file_handle, winusb_handle;
- DWORD err;
- int i;
- SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
- HDEVINFO dev_info = INVALID_HANDLE_VALUE;
- SP_DEVINFO_DATA dev_info_data;
- char* dev_path_no_guid = NULL;
- char filter_path[] = "\\\\.\\libusb0-0000";
- bool found_filter = false;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- // If the device is composite, but using the default Windows composite parent driver (usbccgp)
- // or if it's the first WinUSB-like interface, we get a handle through Initialize().
- if ((is_using_usbccgp) || (iface == 0)) {
- // composite device (independent interfaces) or interface 0
- file_handle = handle_priv->interface_handle[iface].dev_handle;
- if ((file_handle == 0) || (file_handle == INVALID_HANDLE_VALUE)) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- if (!WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
- handle_priv->interface_handle[iface].api_handle = INVALID_HANDLE_VALUE;
- err = GetLastError();
- switch(err) {
- case ERROR_BAD_COMMAND:
- // The device was disconnected
- usbi_err(ctx, "could not access interface %d: %s", iface, windows_error_str(0));
- return LIBUSB_ERROR_NO_DEVICE;
- default:
- // it may be that we're using the libusb0 filter driver.
- // TODO: can we move this whole business into the K/0 DLL?
- for (i = 0; ; i++) {
- safe_free(dev_interface_details);
- safe_free(dev_path_no_guid);
- dev_interface_details = get_interface_details_filter(ctx, &dev_info, &dev_info_data, &GUID_DEVINTERFACE_LIBUSB0_FILTER, i, filter_path);
- if ((found_filter) || (dev_interface_details == NULL)) {
- break;
- }
- // ignore GUID part
- dev_path_no_guid = sanitize_path(strtok(dev_interface_details->DevicePath, "{"));
- if (safe_strncmp(dev_path_no_guid, priv->usb_interface[iface].path, safe_strlen(dev_path_no_guid)) == 0) {
- file_handle = CreateFileA(filter_path, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
- if (file_handle == INVALID_HANDLE_VALUE) {
- usbi_err(ctx, "could not open device %s: %s", filter_path, windows_error_str(0));
- } else {
- WinUSBX[sub_api].Free(winusb_handle);
- if (!WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
- continue;
- }
- found_filter = true;
- break;
- }
- }
- }
- if (!found_filter) {
- usbi_err(ctx, "could not access interface %d: %s", iface, windows_error_str(err));
- return LIBUSB_ERROR_ACCESS;
- }
- }
- }
- handle_priv->interface_handle[iface].api_handle = winusb_handle;
- } else {
- // For all other interfaces, use GetAssociatedInterface()
- winusb_handle = handle_priv->interface_handle[0].api_handle;
- // It is a requirement for multiple interface devices on Windows that, to you
- // must first claim the first interface before you claim the others
- if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) {
- file_handle = handle_priv->interface_handle[0].dev_handle;
- if (WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
- handle_priv->interface_handle[0].api_handle = winusb_handle;
- usbi_warn(ctx, "auto-claimed interface 0 (required to claim %d with WinUSB)", iface);
- } else {
- usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB): %s", iface, windows_error_str(0));
- return LIBUSB_ERROR_ACCESS;
- }
- }
- if (!WinUSBX[sub_api].GetAssociatedInterface(winusb_handle, (UCHAR)(iface-1),
- &handle_priv->interface_handle[iface].api_handle)) {
- handle_priv->interface_handle[iface].api_handle = INVALID_HANDLE_VALUE;
- switch(GetLastError()) {
- case ERROR_NO_MORE_ITEMS: // invalid iface
- return LIBUSB_ERROR_NOT_FOUND;
- case ERROR_BAD_COMMAND: // The device was disconnected
- return LIBUSB_ERROR_NO_DEVICE;
- case ERROR_ALREADY_EXISTS: // already claimed
- return LIBUSB_ERROR_BUSY;
- default:
- usbi_err(ctx, "could not claim interface %d: %s", iface, windows_error_str(0));
- return LIBUSB_ERROR_ACCESS;
- }
- }
- }
- usbi_dbg("claimed interface %d", iface);
- handle_priv->active_interface = iface;
-
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- HANDLE winusb_handle;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- winusb_handle = handle_priv->interface_handle[iface].api_handle;
- if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- WinUSBX[sub_api].Free(winusb_handle);
- handle_priv->interface_handle[iface].api_handle = INVALID_HANDLE_VALUE;
-
- return LIBUSB_SUCCESS;
-}
-
-/*
- * Return the first valid interface (of the same API type), for control transfers
- */
-static int get_valid_interface(struct libusb_device_handle *dev_handle, int api_id)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- int i;
-
- if ((api_id < USB_API_WINUSBX) || (api_id > USB_API_HID)) {
- usbi_dbg("unsupported API ID");
- return -1;
- }
-
- for (i=0; i<USB_MAXINTERFACES; i++) {
- if ( (handle_priv->interface_handle[i].dev_handle != 0)
- && (handle_priv->interface_handle[i].dev_handle != INVALID_HANDLE_VALUE)
- && (handle_priv->interface_handle[i].api_handle != 0)
- && (handle_priv->interface_handle[i].api_handle != INVALID_HANDLE_VALUE)
- && (priv->usb_interface[i].apib->id == api_id) ) {
- return i;
- }
- }
- return -1;
-}
-
-/*
- * Lookup interface by endpoint address. -1 if not found
- */
-static int interface_by_endpoint(struct windows_device_priv *priv,
- struct windows_device_handle_priv *handle_priv, uint8_t endpoint_address)
-{
- int i, j;
- for (i=0; i<USB_MAXINTERFACES; i++) {
- if (handle_priv->interface_handle[i].api_handle == INVALID_HANDLE_VALUE)
- continue;
- if (handle_priv->interface_handle[i].api_handle == 0)
- continue;
- if (priv->usb_interface[i].endpoint == NULL)
- continue;
- for (j=0; j<priv->usb_interface[i].nb_endpoints; j++) {
- if (priv->usb_interface[i].endpoint[j] == endpoint_address) {
- return i;
- }
- }
- }
- return -1;
-}
-
-static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(
- transfer->dev_handle);
- WINUSB_SETUP_PACKET *setup = (WINUSB_SETUP_PACKET *) transfer->buffer;
- ULONG size;
- HANDLE winusb_handle;
- int current_interface;
- struct winfd wfd;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- transfer_priv->pollable_fd = INVALID_WINFD;
- size = transfer->length - LIBUSB_CONTROL_SETUP_SIZE;
-
- if (size > MAX_CTRL_BUFFER_LENGTH)
- return LIBUSB_ERROR_INVALID_PARAM;
-
- current_interface = get_valid_interface(transfer->dev_handle, USB_API_WINUSBX);
- if (current_interface < 0) {
- if (auto_claim(transfer, &current_interface, USB_API_WINUSBX) != LIBUSB_SUCCESS) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
- }
-
- usbi_dbg("will use interface %d", current_interface);
- winusb_handle = handle_priv->interface_handle[current_interface].api_handle;
-
- wfd = usbi_create_fd(winusb_handle, RW_READ, NULL, NULL);
- // Always use the handle returned from usbi_create_fd (wfd.handle)
- if (wfd.fd < 0) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- // Sending of set configuration control requests from WinUSB creates issues
- if ( ((setup->request_type & (0x03 << 5)) == LIBUSB_REQUEST_TYPE_STANDARD)
- && (setup->request == LIBUSB_REQUEST_SET_CONFIGURATION) ) {
- if (setup->value != priv->active_config) {
- usbi_warn(ctx, "cannot set configuration other than the default one");
- usbi_free_fd(&wfd);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
- wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY;
- wfd.overlapped->InternalHigh = 0;
- } else {
- if (!WinUSBX[sub_api].ControlTransfer(wfd.handle, *setup, transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE, size, NULL, wfd.overlapped)) {
- if(GetLastError() != ERROR_IO_PENDING) {
- usbi_warn(ctx, "ControlTransfer failed: %s", windows_error_str(0));
- usbi_free_fd(&wfd);
- return LIBUSB_ERROR_IO;
- }
- } else {
- wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY;
- wfd.overlapped->InternalHigh = (DWORD)size;
- }
- }
-
- // Use priv_transfer to store data needed for async polling
- transfer_priv->pollable_fd = wfd;
- transfer_priv->interface_number = (uint8_t)current_interface;
-
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- HANDLE winusb_handle;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- if (altsetting > 255) {
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- winusb_handle = handle_priv->interface_handle[iface].api_handle;
- if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) {
- usbi_err(ctx, "interface must be claimed first");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- if (!WinUSBX[sub_api].SetCurrentAlternateSetting(winusb_handle, (UCHAR)altsetting)) {
- usbi_err(ctx, "SetCurrentAlternateSetting failed: %s", windows_error_str(0));
- return LIBUSB_ERROR_IO;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- HANDLE winusb_handle;
- bool ret;
- int current_interface;
- struct winfd wfd;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- transfer_priv->pollable_fd = INVALID_WINFD;
-
- current_interface = interface_by_endpoint(priv, handle_priv, transfer->endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cancelling transfer");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_dbg("matched endpoint %02X with interface %d", transfer->endpoint, current_interface);
-
- winusb_handle = handle_priv->interface_handle[current_interface].api_handle;
-
- wfd = usbi_create_fd(winusb_handle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL);
- // Always use the handle returned from usbi_create_fd (wfd.handle)
- if (wfd.fd < 0) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- if (IS_XFERIN(transfer)) {
- usbi_dbg("reading %d bytes", transfer->length);
- ret = WinUSBX[sub_api].ReadPipe(wfd.handle, transfer->endpoint, transfer->buffer, transfer->length, NULL, wfd.overlapped);
- } else {
- usbi_dbg("writing %d bytes", transfer->length);
- ret = WinUSBX[sub_api].WritePipe(wfd.handle, transfer->endpoint, transfer->buffer, transfer->length, NULL, wfd.overlapped);
- }
- if (!ret) {
- if(GetLastError() != ERROR_IO_PENDING) {
- usbi_err(ctx, "ReadPipe/WritePipe failed: %s", windows_error_str(0));
- usbi_free_fd(&wfd);
- return LIBUSB_ERROR_IO;
- }
- } else {
- wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY;
- wfd.overlapped->InternalHigh = (DWORD)transfer->length;
- }
-
- transfer_priv->pollable_fd = wfd;
- transfer_priv->interface_number = (uint8_t)current_interface;
-
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- HANDLE winusb_handle;
- int current_interface;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- current_interface = interface_by_endpoint(priv, handle_priv, endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cannot clear");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_dbg("matched endpoint %02X with interface %d", endpoint, current_interface);
- winusb_handle = handle_priv->interface_handle[current_interface].api_handle;
-
- if (!WinUSBX[sub_api].ResetPipe(winusb_handle, endpoint)) {
- usbi_err(ctx, "ResetPipe failed: %s", windows_error_str(0));
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-/*
- * from http://www.winvistatips.com/winusb-bugchecks-t335323.html (confirmed
- * through testing as well):
- * "You can not call WinUsb_AbortPipe on control pipe. You can possibly cancel
- * the control transfer using CancelIo"
- */
-static int winusbx_abort_control(int sub_api, struct usbi_transfer *itransfer)
-{
- // Cancelling of the I/O is done in the parent
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_abort_transfers(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- HANDLE winusb_handle;
- int current_interface;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- current_interface = transfer_priv->interface_number;
- if ((current_interface < 0) || (current_interface >= USB_MAXINTERFACES)) {
- usbi_err(ctx, "program assertion failed: invalid interface_number");
- return LIBUSB_ERROR_NOT_FOUND;
- }
- usbi_dbg("will use interface %d", current_interface);
-
- winusb_handle = handle_priv->interface_handle[current_interface].api_handle;
-
- if (!WinUSBX[sub_api].AbortPipe(winusb_handle, transfer->endpoint)) {
- usbi_err(ctx, "AbortPipe failed: %s", windows_error_str(0));
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-/*
- * from the "How to Use WinUSB to Communicate with a USB Device" Microsoft white paper
- * (http://www.microsoft.com/whdc/connect/usb/winusb_howto.mspx):
- * "WinUSB does not support host-initiated reset port and cycle port operations" and
- * IOCTL_INTERNAL_USB_CYCLE_PORT is only available in kernel mode and the
- * IOCTL_USB_HUB_CYCLE_PORT ioctl was removed from Vista => the best we can do is
- * cycle the pipes (and even then, the control pipe can not be reset using WinUSB)
- */
-// TODO: (post hotplug): see if we can force eject the device and redetect it (reuse hotplug?)
-static int winusbx_reset_device(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- struct winfd wfd;
- HANDLE winusb_handle;
- int i, j;
-
- CHECK_WINUSBX_AVAILABLE(sub_api);
-
- // Reset any available pipe (except control)
- for (i=0; i<USB_MAXINTERFACES; i++) {
- winusb_handle = handle_priv->interface_handle[i].api_handle;
- for (wfd = handle_to_winfd(winusb_handle); wfd.fd > 0;)
- {
- // Cancel any pollable I/O
- usbi_remove_pollfd(ctx, wfd.fd);
- usbi_free_fd(&wfd);
- wfd = handle_to_winfd(winusb_handle);
- }
-
- if ( (winusb_handle != 0) && (winusb_handle != INVALID_HANDLE_VALUE)) {
- for (j=0; j<priv->usb_interface[i].nb_endpoints; j++) {
- usbi_dbg("resetting ep %02X", priv->usb_interface[i].endpoint[j]);
- if (!WinUSBX[sub_api].AbortPipe(winusb_handle, priv->usb_interface[i].endpoint[j])) {
- usbi_err(ctx, "AbortPipe (pipe address %02X) failed: %s",
- priv->usb_interface[i].endpoint[j], windows_error_str(0));
- }
- // FlushPipe seems to fail on OUT pipes
- if (IS_EPIN(priv->usb_interface[i].endpoint[j])
- && (!WinUSBX[sub_api].FlushPipe(winusb_handle, priv->usb_interface[i].endpoint[j])) ) {
- usbi_err(ctx, "FlushPipe (pipe address %02X) failed: %s",
- priv->usb_interface[i].endpoint[j], windows_error_str(0));
- }
- if (!WinUSBX[sub_api].ResetPipe(winusb_handle, priv->usb_interface[i].endpoint[j])) {
- usbi_err(ctx, "ResetPipe (pipe address %02X) failed: %s",
- priv->usb_interface[i].endpoint[j], windows_error_str(0));
- }
- }
- }
- }
-
- // libusbK & libusb0 have the ability to issue an actual device reset
- if (WinUSBX[sub_api].ResetDevice != NULL) {
- winusb_handle = handle_priv->interface_handle[0].api_handle;
- if ( (winusb_handle != 0) && (winusb_handle != INVALID_HANDLE_VALUE)) {
- WinUSBX[sub_api].ResetDevice(winusb_handle);
- }
- }
- return LIBUSB_SUCCESS;
-}
-
-static int winusbx_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size)
-{
- itransfer->transferred += io_size;
- return LIBUSB_TRANSFER_COMPLETED;
-}
-
-/*
- * Internal HID Support functions (from libusb-win32)
- * Note that functions that complete data transfer synchronously must return
- * LIBUSB_COMPLETED instead of LIBUSB_SUCCESS
- */
-static int _hid_get_hid_descriptor(struct hid_device_priv* dev, void *data, size_t *size);
-static int _hid_get_report_descriptor(struct hid_device_priv* dev, void *data, size_t *size);
-
-static int _hid_wcslen(WCHAR *str)
-{
- int i = 0;
- while (str[i] && (str[i] != 0x409)) {
- i++;
- }
- return i;
-}
-
-static int _hid_get_device_descriptor(struct hid_device_priv* dev, void *data, size_t *size)
-{
- struct libusb_device_descriptor d;
-
- d.bLength = LIBUSB_DT_DEVICE_SIZE;
- d.bDescriptorType = LIBUSB_DT_DEVICE;
- d.bcdUSB = 0x0200; /* 2.00 */
- d.bDeviceClass = 0;
- d.bDeviceSubClass = 0;
- d.bDeviceProtocol = 0;
- d.bMaxPacketSize0 = 64; /* fix this! */
- d.idVendor = (uint16_t)dev->vid;
- d.idProduct = (uint16_t)dev->pid;
- d.bcdDevice = 0x0100;
- d.iManufacturer = dev->string_index[0];
- d.iProduct = dev->string_index[1];
- d.iSerialNumber = dev->string_index[2];
- d.bNumConfigurations = 1;
-
- if (*size > LIBUSB_DT_DEVICE_SIZE)
- *size = LIBUSB_DT_DEVICE_SIZE;
- memcpy(data, &d, *size);
- return LIBUSB_COMPLETED;
-}
-
-static int _hid_get_config_descriptor(struct hid_device_priv* dev, void *data, size_t *size)
-{
- char num_endpoints = 0;
- size_t config_total_len = 0;
- char tmp[HID_MAX_CONFIG_DESC_SIZE];
- struct libusb_config_descriptor *cd;
- struct libusb_interface_descriptor *id;
- struct libusb_hid_descriptor *hd;
- struct libusb_endpoint_descriptor *ed;
- size_t tmp_size;
-
- if (dev->input_report_size)
- num_endpoints++;
- if (dev->output_report_size)
- num_endpoints++;
-
- config_total_len = LIBUSB_DT_CONFIG_SIZE + LIBUSB_DT_INTERFACE_SIZE
- + LIBUSB_DT_HID_SIZE + num_endpoints * LIBUSB_DT_ENDPOINT_SIZE;
-
-
- cd = (struct libusb_config_descriptor *)tmp;
- id = (struct libusb_interface_descriptor *)(tmp + LIBUSB_DT_CONFIG_SIZE);
- hd = (struct libusb_hid_descriptor *)(tmp + LIBUSB_DT_CONFIG_SIZE
- + LIBUSB_DT_INTERFACE_SIZE);
- ed = (struct libusb_endpoint_descriptor *)(tmp + LIBUSB_DT_CONFIG_SIZE
- + LIBUSB_DT_INTERFACE_SIZE
- + LIBUSB_DT_HID_SIZE);
-
- cd->bLength = LIBUSB_DT_CONFIG_SIZE;
- cd->bDescriptorType = LIBUSB_DT_CONFIG;
- cd->wTotalLength = (uint16_t) config_total_len;
- cd->bNumInterfaces = 1;
- cd->bConfigurationValue = 1;
- cd->iConfiguration = 0;
- cd->bmAttributes = 1 << 7; /* bus powered */
- cd->MaxPower = 50;
-
- id->bLength = LIBUSB_DT_INTERFACE_SIZE;
- id->bDescriptorType = LIBUSB_DT_INTERFACE;
- id->bInterfaceNumber = 0;
- id->bAlternateSetting = 0;
- id->bNumEndpoints = num_endpoints;
- id->bInterfaceClass = 3;
- id->bInterfaceSubClass = 0;
- id->bInterfaceProtocol = 0;
- id->iInterface = 0;
-
- tmp_size = LIBUSB_DT_HID_SIZE;
- _hid_get_hid_descriptor(dev, hd, &tmp_size);
-
- if (dev->input_report_size) {
- ed->bLength = LIBUSB_DT_ENDPOINT_SIZE;
- ed->bDescriptorType = LIBUSB_DT_ENDPOINT;
- ed->bEndpointAddress = HID_IN_EP;
- ed->bmAttributes = 3;
- ed->wMaxPacketSize = dev->input_report_size - 1;
- ed->bInterval = 10;
- ed = (struct libusb_endpoint_descriptor *)((char*)ed + LIBUSB_DT_ENDPOINT_SIZE);
- }
-
- if (dev->output_report_size) {
- ed->bLength = LIBUSB_DT_ENDPOINT_SIZE;
- ed->bDescriptorType = LIBUSB_DT_ENDPOINT;
- ed->bEndpointAddress = HID_OUT_EP;
- ed->bmAttributes = 3;
- ed->wMaxPacketSize = dev->output_report_size - 1;
- ed->bInterval = 10;
- }
-
- if (*size > config_total_len)
- *size = config_total_len;
- memcpy(data, tmp, *size);
- return LIBUSB_COMPLETED;
-}
-
-static int _hid_get_string_descriptor(struct hid_device_priv* dev, int _index,
- void *data, size_t *size)
-{
- void *tmp = NULL;
- size_t tmp_size = 0;
- int i;
-
- /* language ID, EN-US */
- char string_langid[] = {
- 0x09,
- 0x04
- };
-
- if ((*size < 2) || (*size > 255)) {
- return LIBUSB_ERROR_OVERFLOW;
- }
-
- if (_index == 0) {
- tmp = string_langid;
- tmp_size = sizeof(string_langid)+2;
- } else {
- for (i=0; i<3; i++) {
- if (_index == (dev->string_index[i])) {
- tmp = dev->string[i];
- tmp_size = (_hid_wcslen(dev->string[i])+1) * sizeof(WCHAR);
- break;
- }
- }
- if (i == 3) { // not found
- return LIBUSB_ERROR_INVALID_PARAM;
- }
- }
-
- if(!tmp_size) {
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- if (tmp_size < *size) {
- *size = tmp_size;
- }
- // 2 byte header
- ((uint8_t*)data)[0] = (uint8_t)*size;
- ((uint8_t*)data)[1] = LIBUSB_DT_STRING;
- memcpy((uint8_t*)data+2, tmp, *size-2);
- return LIBUSB_COMPLETED;
-}
-
-static int _hid_get_hid_descriptor(struct hid_device_priv* dev, void *data, size_t *size)
-{
- struct libusb_hid_descriptor d;
- uint8_t tmp[MAX_HID_DESCRIPTOR_SIZE];
- size_t report_len = MAX_HID_DESCRIPTOR_SIZE;
-
- _hid_get_report_descriptor(dev, tmp, &report_len);
-
- d.bLength = LIBUSB_DT_HID_SIZE;
- d.bDescriptorType = LIBUSB_DT_HID;
- d.bcdHID = 0x0110; /* 1.10 */
- d.bCountryCode = 0;
- d.bNumDescriptors = 1;
- d.bClassDescriptorType = LIBUSB_DT_REPORT;
- d.wClassDescriptorLength = (uint16_t)report_len;
-
- if (*size > LIBUSB_DT_HID_SIZE)
- *size = LIBUSB_DT_HID_SIZE;
- memcpy(data, &d, *size);
- return LIBUSB_COMPLETED;
-}
-
-static int _hid_get_report_descriptor(struct hid_device_priv* dev, void *data, size_t *size)
-{
- uint8_t d[MAX_HID_DESCRIPTOR_SIZE];
- size_t i = 0;
-
- /* usage page (0xFFA0 == vendor defined) */
- d[i++] = 0x06; d[i++] = 0xA0; d[i++] = 0xFF;
- /* usage (vendor defined) */
- d[i++] = 0x09; d[i++] = 0x01;
- /* start collection (application) */
- d[i++] = 0xA1; d[i++] = 0x01;
- /* input report */
- if (dev->input_report_size) {
- /* usage (vendor defined) */
- d[i++] = 0x09; d[i++] = 0x01;
- /* logical minimum (0) */
- d[i++] = 0x15; d[i++] = 0x00;
- /* logical maximum (255) */
- d[i++] = 0x25; d[i++] = 0xFF;
- /* report size (8 bits) */
- d[i++] = 0x75; d[i++] = 0x08;
- /* report count */
- d[i++] = 0x95; d[i++] = (uint8_t)dev->input_report_size - 1;
- /* input (data, variable, absolute) */
- d[i++] = 0x81; d[i++] = 0x00;
- }
- /* output report */
- if (dev->output_report_size) {
- /* usage (vendor defined) */
- d[i++] = 0x09; d[i++] = 0x02;
- /* logical minimum (0) */
- d[i++] = 0x15; d[i++] = 0x00;
- /* logical maximum (255) */
- d[i++] = 0x25; d[i++] = 0xFF;
- /* report size (8 bits) */
- d[i++] = 0x75; d[i++] = 0x08;
- /* report count */
- d[i++] = 0x95; d[i++] = (uint8_t)dev->output_report_size - 1;
- /* output (data, variable, absolute) */
- d[i++] = 0x91; d[i++] = 0x00;
- }
- /* feature report */
- if (dev->feature_report_size) {
- /* usage (vendor defined) */
- d[i++] = 0x09; d[i++] = 0x03;
- /* logical minimum (0) */
- d[i++] = 0x15; d[i++] = 0x00;
- /* logical maximum (255) */
- d[i++] = 0x25; d[i++] = 0xFF;
- /* report size (8 bits) */
- d[i++] = 0x75; d[i++] = 0x08;
- /* report count */
- d[i++] = 0x95; d[i++] = (uint8_t)dev->feature_report_size - 1;
- /* feature (data, variable, absolute) */
- d[i++] = 0xb2; d[i++] = 0x02; d[i++] = 0x01;
- }
-
- /* end collection */
- d[i++] = 0xC0;
-
- if (*size > i)
- *size = i;
- memcpy(data, d, *size);
- return LIBUSB_COMPLETED;
-}
-
-static int _hid_get_descriptor(struct hid_device_priv* dev, HANDLE hid_handle, int recipient,
- int type, int _index, void *data, size_t *size)
-{
- switch(type) {
- case LIBUSB_DT_DEVICE:
- usbi_dbg("LIBUSB_DT_DEVICE");
- return _hid_get_device_descriptor(dev, data, size);
- case LIBUSB_DT_CONFIG:
- usbi_dbg("LIBUSB_DT_CONFIG");
- if (!_index)
- return _hid_get_config_descriptor(dev, data, size);
- return LIBUSB_ERROR_INVALID_PARAM;
- case LIBUSB_DT_STRING:
- usbi_dbg("LIBUSB_DT_STRING");
- return _hid_get_string_descriptor(dev, _index, data, size);
- case LIBUSB_DT_HID:
- usbi_dbg("LIBUSB_DT_HID");
- if (!_index)
- return _hid_get_hid_descriptor(dev, data, size);
- return LIBUSB_ERROR_INVALID_PARAM;
- case LIBUSB_DT_REPORT:
- usbi_dbg("LIBUSB_DT_REPORT");
- if (!_index)
- return _hid_get_report_descriptor(dev, data, size);
- return LIBUSB_ERROR_INVALID_PARAM;
- case LIBUSB_DT_PHYSICAL:
- usbi_dbg("LIBUSB_DT_PHYSICAL");
- if (HidD_GetPhysicalDescriptor(hid_handle, data, (ULONG)*size))
- return LIBUSB_COMPLETED;
- return LIBUSB_ERROR_OTHER;
- }
- usbi_dbg("unsupported");
- return LIBUSB_ERROR_INVALID_PARAM;
-}
-
-static int _hid_get_report(struct hid_device_priv* dev, HANDLE hid_handle, int id, void *data,
- struct windows_transfer_priv *tp, size_t *size, OVERLAPPED* overlapped,
- int report_type)
-{
- uint8_t *buf;
- DWORD ioctl_code, read_size, expected_size = (DWORD)*size;
- int r = LIBUSB_SUCCESS;
-
- if (tp->hid_buffer != NULL) {
- usbi_dbg("program assertion failed: hid_buffer is not NULL");
- }
-
- if ((*size == 0) || (*size > MAX_HID_REPORT_SIZE)) {
- usbi_dbg("invalid size (%d)", *size);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- switch (report_type) {
- case HID_REPORT_TYPE_INPUT:
- ioctl_code = IOCTL_HID_GET_INPUT_REPORT;
- break;
- case HID_REPORT_TYPE_FEATURE:
- ioctl_code = IOCTL_HID_GET_FEATURE;
- break;
- default:
- usbi_dbg("unknown HID report type %d", report_type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- // Add a trailing byte to detect overflows
- buf = (uint8_t*)calloc(expected_size+1, 1);
- if (buf == NULL) {
- return LIBUSB_ERROR_NO_MEM;
- }
- buf[0] = (uint8_t)id; // Must be set always
- usbi_dbg("report ID: 0x%02X", buf[0]);
-
- tp->hid_expected_size = expected_size;
- read_size = expected_size;
-
- // NB: The size returned by DeviceIoControl doesn't include report IDs when not in use (0)
- if (!DeviceIoControl(hid_handle, ioctl_code, buf, expected_size+1,
- buf, expected_size+1, &read_size, overlapped)) {
- if (GetLastError() != ERROR_IO_PENDING) {
- usbi_dbg("Failed to Read HID Report: %s", windows_error_str(0));
- safe_free(buf);
- return LIBUSB_ERROR_IO;
- }
- // Asynchronous wait
- tp->hid_buffer = buf;
- tp->hid_dest = (uint8_t*)data; // copy dest, as not necessarily the start of the transfer buffer
- return LIBUSB_SUCCESS;
- }
-
- // Transfer completed synchronously => copy and discard extra buffer
- if (read_size == 0) {
- usbi_warn(NULL, "program assertion failed - read completed synchronously, but no data was read");
- *size = 0;
- } else {
- if (buf[0] != id) {
- usbi_warn(NULL, "mismatched report ID (data is %02X, parameter is %02X)", buf[0], id);
- }
- if ((size_t)read_size > expected_size) {
- r = LIBUSB_ERROR_OVERFLOW;
- usbi_dbg("OVERFLOW!");
- } else {
- r = LIBUSB_COMPLETED;
- }
-
- *size = MIN((size_t)read_size, *size);
- if (id == 0) {
- // Discard report ID
- memcpy(data, buf+1, *size);
- } else {
- memcpy(data, buf, *size);
- }
- }
- safe_free(buf);
- return r;
-}
-
-static int _hid_set_report(struct hid_device_priv* dev, HANDLE hid_handle, int id, void *data,
- struct windows_transfer_priv *tp, size_t *size, OVERLAPPED* overlapped,
- int report_type)
-{
- uint8_t *buf = NULL;
- DWORD ioctl_code, write_size= (DWORD)*size;
-
- if (tp->hid_buffer != NULL) {
- usbi_dbg("program assertion failed: hid_buffer is not NULL");
- }
-
- if ((*size == 0) || (*size > MAX_HID_REPORT_SIZE)) {
- usbi_dbg("invalid size (%d)", *size);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- switch (report_type) {
- case HID_REPORT_TYPE_OUTPUT:
- ioctl_code = IOCTL_HID_SET_OUTPUT_REPORT;
- break;
- case HID_REPORT_TYPE_FEATURE:
- ioctl_code = IOCTL_HID_SET_FEATURE;
- break;
- default:
- usbi_dbg("unknown HID report type %d", report_type);
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- usbi_dbg("report ID: 0x%02X", id);
- // When report IDs are not used (i.e. when id == 0), we must add
- // a null report ID. Otherwise, we just use original data buffer
- if (id == 0) {
- write_size++;
- }
- buf = (uint8_t*) malloc(write_size);
- if (buf == NULL) {
- return LIBUSB_ERROR_NO_MEM;
- }
- if (id == 0) {
- buf[0] = 0;
- memcpy(buf + 1, data, *size);
- } else {
- // This seems like a waste, but if we don't duplicate the
- // data, we'll get issues when freeing hid_buffer
- memcpy(buf, data, *size);
- if (buf[0] != id) {
- usbi_warn(NULL, "mismatched report ID (data is %02X, parameter is %02X)", buf[0], id);
- }
- }
-
- // NB: The size returned by DeviceIoControl doesn't include report IDs when not in use (0)
- if (!DeviceIoControl(hid_handle, ioctl_code, buf, write_size,
- buf, write_size, &write_size, overlapped)) {
- if (GetLastError() != ERROR_IO_PENDING) {
- usbi_dbg("Failed to Write HID Output Report: %s", windows_error_str(0));
- safe_free(buf);
- return LIBUSB_ERROR_IO;
- }
- tp->hid_buffer = buf;
- tp->hid_dest = NULL;
- return LIBUSB_SUCCESS;
- }
-
- // Transfer completed synchronously
- *size = write_size;
- if (write_size == 0) {
- usbi_dbg("program assertion failed - write completed synchronously, but no data was written");
- }
- safe_free(buf);
- return LIBUSB_COMPLETED;
-}
-
-static int _hid_class_request(struct hid_device_priv* dev, HANDLE hid_handle, int request_type,
- int request, int value, int _index, void *data, struct windows_transfer_priv *tp,
- size_t *size, OVERLAPPED* overlapped)
-{
- int report_type = (value >> 8) & 0xFF;
- int report_id = value & 0xFF;
-
- if ( (LIBUSB_REQ_RECIPIENT(request_type) != LIBUSB_RECIPIENT_INTERFACE)
- && (LIBUSB_REQ_RECIPIENT(request_type) != LIBUSB_RECIPIENT_DEVICE) )
- return LIBUSB_ERROR_INVALID_PARAM;
-
- if (LIBUSB_REQ_OUT(request_type) && request == HID_REQ_SET_REPORT)
- return _hid_set_report(dev, hid_handle, report_id, data, tp, size, overlapped, report_type);
-
- if (LIBUSB_REQ_IN(request_type) && request == HID_REQ_GET_REPORT)
- return _hid_get_report(dev, hid_handle, report_id, data, tp, size, overlapped, report_type);
-
- return LIBUSB_ERROR_INVALID_PARAM;
-}
-
-
-/*
- * HID API functions
- */
-static int hid_init(int sub_api, struct libusb_context *ctx)
-{
- DLL_LOAD(hid.dll, HidD_GetAttributes, TRUE);
- DLL_LOAD(hid.dll, HidD_GetHidGuid, TRUE);
- DLL_LOAD(hid.dll, HidD_GetPreparsedData, TRUE);
- DLL_LOAD(hid.dll, HidD_FreePreparsedData, TRUE);
- DLL_LOAD(hid.dll, HidD_GetManufacturerString, TRUE);
- DLL_LOAD(hid.dll, HidD_GetProductString, TRUE);
- DLL_LOAD(hid.dll, HidD_GetSerialNumberString, TRUE);
- DLL_LOAD(hid.dll, HidP_GetCaps, TRUE);
- DLL_LOAD(hid.dll, HidD_SetNumInputBuffers, TRUE);
- DLL_LOAD(hid.dll, HidD_SetFeature, TRUE);
- DLL_LOAD(hid.dll, HidD_GetFeature, TRUE);
- DLL_LOAD(hid.dll, HidD_GetPhysicalDescriptor, TRUE);
- DLL_LOAD(hid.dll, HidD_GetInputReport, FALSE);
- DLL_LOAD(hid.dll, HidD_SetOutputReport, FALSE);
- DLL_LOAD(hid.dll, HidD_FlushQueue, TRUE);
- DLL_LOAD(hid.dll, HidP_GetValueCaps, TRUE);
-
- api_hid_available = true;
- return LIBUSB_SUCCESS;
-}
-
-static int hid_exit(int sub_api)
-{
- return LIBUSB_SUCCESS;
-}
-
-// NB: open and close must ensure that they only handle interface of
-// the right API type, as these functions can be called wholesale from
-// composite_open(), with interfaces belonging to different APIs
-static int hid_open(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
-
- HIDD_ATTRIBUTES hid_attributes;
- PHIDP_PREPARSED_DATA preparsed_data = NULL;
- HIDP_CAPS capabilities;
- HIDP_VALUE_CAPS *value_caps;
-
- HANDLE hid_handle = INVALID_HANDLE_VALUE;
- int i, j;
- // report IDs handling
- ULONG size[3];
- const char* type[3] = {"input", "output", "feature"};
- int nb_ids[2]; // zero and nonzero report IDs
-
- CHECK_HID_AVAILABLE;
- if (priv->hid == NULL) {
- usbi_err(ctx, "program assertion failed - private HID structure is unitialized");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- for (i = 0; i < USB_MAXINTERFACES; i++) {
- if ( (priv->usb_interface[i].path != NULL)
- && (priv->usb_interface[i].apib->id == USB_API_HID) ) {
- hid_handle = CreateFileA(priv->usb_interface[i].path, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
- /*
- * http://www.lvr.com/hidfaq.htm: Why do I receive "Access denied" when attempting to access my HID?
- * "Windows 2000 and later have exclusive read/write access to HIDs that are configured as a system
- * keyboards or mice. An application can obtain a handle to a system keyboard or mouse by not
- * requesting READ or WRITE access with CreateFile. Applications can then use HidD_SetFeature and
- * HidD_GetFeature (if the device supports Feature reports)."
- */
- if (hid_handle == INVALID_HANDLE_VALUE) {
- usbi_warn(ctx, "could not open HID device in R/W mode (keyboard or mouse?) - trying without");
- hid_handle = CreateFileA(priv->usb_interface[i].path, 0, FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
- if (hid_handle == INVALID_HANDLE_VALUE) {
- usbi_err(ctx, "could not open device %s (interface %d): %s", priv->path, i, windows_error_str(0));
- switch(GetLastError()) {
- case ERROR_FILE_NOT_FOUND: // The device was disconnected
- return LIBUSB_ERROR_NO_DEVICE;
- case ERROR_ACCESS_DENIED:
- return LIBUSB_ERROR_ACCESS;
- default:
- return LIBUSB_ERROR_IO;
- }
- }
- priv->usb_interface[i].restricted_functionality = true;
- }
- handle_priv->interface_handle[i].api_handle = hid_handle;
- }
- }
-
- hid_attributes.Size = sizeof(hid_attributes);
- do {
- if (!HidD_GetAttributes(hid_handle, &hid_attributes)) {
- usbi_err(ctx, "could not gain access to HID top collection (HidD_GetAttributes)");
- break;
- }
-
- priv->hid->vid = hid_attributes.VendorID;
- priv->hid->pid = hid_attributes.ProductID;
-
- // Set the maximum available input buffer size
- for (i=32; HidD_SetNumInputBuffers(hid_handle, i); i*=2);
- usbi_dbg("set maximum input buffer size to %d", i/2);
-
- // Get the maximum input and output report size
- if (!HidD_GetPreparsedData(hid_handle, &preparsed_data) || !preparsed_data) {
- usbi_err(ctx, "could not read HID preparsed data (HidD_GetPreparsedData)");
- break;
- }
- if (HidP_GetCaps(preparsed_data, &capabilities) != HIDP_STATUS_SUCCESS) {
- usbi_err(ctx, "could not parse HID capabilities (HidP_GetCaps)");
- break;
- }
-
- // Find out if interrupt will need report IDs
- size[0] = capabilities.NumberInputValueCaps;
- size[1] = capabilities.NumberOutputValueCaps;
- size[2] = capabilities.NumberFeatureValueCaps;
- for (j=HidP_Input; j<=HidP_Feature; j++) {
- usbi_dbg("%d HID %s report value(s) found", size[j], type[j]);
- priv->hid->uses_report_ids[j] = false;
- if (size[j] > 0) {
- value_caps = (HIDP_VALUE_CAPS*) calloc(size[j], sizeof(HIDP_VALUE_CAPS));
- if ( (value_caps != NULL)
- && (HidP_GetValueCaps((HIDP_REPORT_TYPE)j, value_caps, &size[j], preparsed_data) == HIDP_STATUS_SUCCESS)
- && (size[j] >= 1) ) {
- nb_ids[0] = 0;
- nb_ids[1] = 0;
- for (i=0; i<(int)size[j]; i++) {
- usbi_dbg(" Report ID: 0x%02X", value_caps[i].ReportID);
- if (value_caps[i].ReportID != 0) {
- nb_ids[1]++;
- } else {
- nb_ids[0]++;
- }
- }
- if (nb_ids[1] != 0) {
- if (nb_ids[0] != 0) {
- usbi_warn(ctx, "program assertion failed: zero and nonzero report IDs used for %s",
- type[j]);
- }
- priv->hid->uses_report_ids[j] = true;
- }
- } else {
- usbi_warn(ctx, " could not process %s report IDs", type[j]);
- }
- safe_free(value_caps);
- }
- }
-
- // Set the report sizes
- priv->hid->input_report_size = capabilities.InputReportByteLength;
- priv->hid->output_report_size = capabilities.OutputReportByteLength;
- priv->hid->feature_report_size = capabilities.FeatureReportByteLength;
-
- // Fetch string descriptors
- priv->hid->string_index[0] = priv->dev_descriptor.iManufacturer;
- if (priv->hid->string_index[0] != 0) {
- HidD_GetManufacturerString(hid_handle, priv->hid->string[0],
- sizeof(priv->hid->string[0]));
- } else {
- priv->hid->string[0][0] = 0;
- }
- priv->hid->string_index[1] = priv->dev_descriptor.iProduct;
- if (priv->hid->string_index[1] != 0) {
- HidD_GetProductString(hid_handle, priv->hid->string[1],
- sizeof(priv->hid->string[1]));
- } else {
- priv->hid->string[1][0] = 0;
- }
- priv->hid->string_index[2] = priv->dev_descriptor.iSerialNumber;
- if (priv->hid->string_index[2] != 0) {
- HidD_GetSerialNumberString(hid_handle, priv->hid->string[2],
- sizeof(priv->hid->string[2]));
- } else {
- priv->hid->string[2][0] = 0;
- }
- } while(0);
-
- if (preparsed_data) {
- HidD_FreePreparsedData(preparsed_data);
- }
-
- return LIBUSB_SUCCESS;
-}
-
-static void hid_close(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- HANDLE file_handle;
- int i;
-
- if (!api_hid_available)
- return;
-
- for (i = 0; i < USB_MAXINTERFACES; i++) {
- if (priv->usb_interface[i].apib->id == USB_API_HID) {
- file_handle = handle_priv->interface_handle[i].api_handle;
- if ( (file_handle != 0) && (file_handle != INVALID_HANDLE_VALUE)) {
- CloseHandle(file_handle);
- }
- }
- }
-}
-
-static int hid_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- CHECK_HID_AVAILABLE;
-
- // NB: Disconnection detection is not possible in this function
- if (priv->usb_interface[iface].path == NULL) {
- return LIBUSB_ERROR_NOT_FOUND; // invalid iface
- }
-
- // We use dev_handle as a flag for interface claimed
- if (handle_priv->interface_handle[iface].dev_handle == INTERFACE_CLAIMED) {
- return LIBUSB_ERROR_BUSY; // already claimed
- }
-
- handle_priv->interface_handle[iface].dev_handle = INTERFACE_CLAIMED;
-
- usbi_dbg("claimed interface %d", iface);
- handle_priv->active_interface = iface;
-
- return LIBUSB_SUCCESS;
-}
-
-static int hid_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
-
- CHECK_HID_AVAILABLE;
-
- if (priv->usb_interface[iface].path == NULL) {
- return LIBUSB_ERROR_NOT_FOUND; // invalid iface
- }
-
- if (handle_priv->interface_handle[iface].dev_handle != INTERFACE_CLAIMED) {
- return LIBUSB_ERROR_NOT_FOUND; // invalid iface
- }
-
- handle_priv->interface_handle[iface].dev_handle = INVALID_HANDLE_VALUE;
-
- return LIBUSB_SUCCESS;
-}
-
-static int hid_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
-
- CHECK_HID_AVAILABLE;
-
- if (altsetting > 255) {
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- if (altsetting != 0) {
- usbi_err(ctx, "set interface altsetting not supported for altsetting >0");
- return LIBUSB_ERROR_NOT_SUPPORTED;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-static int hid_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- WINUSB_SETUP_PACKET *setup = (WINUSB_SETUP_PACKET *) transfer->buffer;
- HANDLE hid_handle;
- struct winfd wfd;
- int current_interface, config;
- size_t size;
- int r = LIBUSB_ERROR_INVALID_PARAM;
-
- CHECK_HID_AVAILABLE;
-
- transfer_priv->pollable_fd = INVALID_WINFD;
- safe_free(transfer_priv->hid_buffer);
- transfer_priv->hid_dest = NULL;
- size = transfer->length - LIBUSB_CONTROL_SETUP_SIZE;
-
- if (size > MAX_CTRL_BUFFER_LENGTH) {
- return LIBUSB_ERROR_INVALID_PARAM;
- }
-
- current_interface = get_valid_interface(transfer->dev_handle, USB_API_HID);
- if (current_interface < 0) {
- if (auto_claim(transfer, &current_interface, USB_API_HID) != LIBUSB_SUCCESS) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
- }
-
- usbi_dbg("will use interface %d", current_interface);
- hid_handle = handle_priv->interface_handle[current_interface].api_handle;
- // Always use the handle returned from usbi_create_fd (wfd.handle)
- wfd = usbi_create_fd(hid_handle, RW_READ, NULL, NULL);
- if (wfd.fd < 0) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- switch(LIBUSB_REQ_TYPE(setup->request_type)) {
- case LIBUSB_REQUEST_TYPE_STANDARD:
- switch(setup->request) {
- case LIBUSB_REQUEST_GET_DESCRIPTOR:
- r = _hid_get_descriptor(priv->hid, wfd.handle, LIBUSB_REQ_RECIPIENT(setup->request_type),
- (setup->value >> 8) & 0xFF, setup->value & 0xFF, transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE, &size);
- break;
- case LIBUSB_REQUEST_GET_CONFIGURATION:
- r = windows_get_configuration(transfer->dev_handle, &config);
- if (r == LIBUSB_SUCCESS) {
- size = 1;
- ((uint8_t*)transfer->buffer)[LIBUSB_CONTROL_SETUP_SIZE] = (uint8_t)config;
- r = LIBUSB_COMPLETED;
- }
- break;
- case LIBUSB_REQUEST_SET_CONFIGURATION:
- if (setup->value == priv->active_config) {
- r = LIBUSB_COMPLETED;
- } else {
- usbi_warn(ctx, "cannot set configuration other than the default one");
- r = LIBUSB_ERROR_INVALID_PARAM;
- }
- break;
- case LIBUSB_REQUEST_GET_INTERFACE:
- size = 1;
- ((uint8_t*)transfer->buffer)[LIBUSB_CONTROL_SETUP_SIZE] = 0;
- r = LIBUSB_COMPLETED;
- break;
- case LIBUSB_REQUEST_SET_INTERFACE:
- r = hid_set_interface_altsetting(0, transfer->dev_handle, setup->index, setup->value);
- if (r == LIBUSB_SUCCESS) {
- r = LIBUSB_COMPLETED;
- }
- break;
- default:
- usbi_warn(ctx, "unsupported HID control request");
- r = LIBUSB_ERROR_INVALID_PARAM;
- break;
- }
- break;
- case LIBUSB_REQUEST_TYPE_CLASS:
- r =_hid_class_request(priv->hid, wfd.handle, setup->request_type, setup->request, setup->value,
- setup->index, transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE, transfer_priv,
- &size, wfd.overlapped);
- break;
- default:
- usbi_warn(ctx, "unsupported HID control request");
- r = LIBUSB_ERROR_INVALID_PARAM;
- break;
- }
-
- if (r == LIBUSB_COMPLETED) {
- // Force request to be completed synchronously. Transferred size has been set by previous call
- wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY;
- // http://msdn.microsoft.com/en-us/library/ms684342%28VS.85%29.aspx
- // set InternalHigh to the number of bytes transferred
- wfd.overlapped->InternalHigh = (DWORD)size;
- r = LIBUSB_SUCCESS;
- }
-
- if (r == LIBUSB_SUCCESS) {
- // Use priv_transfer to store data needed for async polling
- transfer_priv->pollable_fd = wfd;
- transfer_priv->interface_number = (uint8_t)current_interface;
- } else {
- usbi_free_fd(&wfd);
- }
-
- return r;
-}
-
-static int hid_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- struct winfd wfd;
- HANDLE hid_handle;
- bool direction_in, ret;
- int current_interface, length;
- DWORD size;
- int r = LIBUSB_SUCCESS;
-
- CHECK_HID_AVAILABLE;
-
- transfer_priv->pollable_fd = INVALID_WINFD;
- transfer_priv->hid_dest = NULL;
- safe_free(transfer_priv->hid_buffer);
-
- current_interface = interface_by_endpoint(priv, handle_priv, transfer->endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cancelling transfer");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_dbg("matched endpoint %02X with interface %d", transfer->endpoint, current_interface);
-
- hid_handle = handle_priv->interface_handle[current_interface].api_handle;
- direction_in = transfer->endpoint & LIBUSB_ENDPOINT_IN;
-
- wfd = usbi_create_fd(hid_handle, direction_in?RW_READ:RW_WRITE, NULL, NULL);
- // Always use the handle returned from usbi_create_fd (wfd.handle)
- if (wfd.fd < 0) {
- return LIBUSB_ERROR_NO_MEM;
- }
-
- // If report IDs are not in use, an extra prefix byte must be added
- if ( ((direction_in) && (!priv->hid->uses_report_ids[0]))
- || ((!direction_in) && (!priv->hid->uses_report_ids[1])) ) {
- length = transfer->length+1;
- } else {
- length = transfer->length;
- }
- // Add a trailing byte to detect overflows on input
- transfer_priv->hid_buffer = (uint8_t*)calloc(length+1, 1);
- if (transfer_priv->hid_buffer == NULL) {
- return LIBUSB_ERROR_NO_MEM;
- }
- transfer_priv->hid_expected_size = length;
-
- if (direction_in) {
- transfer_priv->hid_dest = transfer->buffer;
- usbi_dbg("reading %d bytes (report ID: 0x00)", length);
- ret = ReadFile(wfd.handle, transfer_priv->hid_buffer, length+1, &size, wfd.overlapped);
- } else {
- if (!priv->hid->uses_report_ids[1]) {
- memcpy(transfer_priv->hid_buffer+1, transfer->buffer, transfer->length);
- } else {
- // We could actually do without the calloc and memcpy in this case
- memcpy(transfer_priv->hid_buffer, transfer->buffer, transfer->length);
- }
- usbi_dbg("writing %d bytes (report ID: 0x%02X)", length, transfer_priv->hid_buffer[0]);
- ret = WriteFile(wfd.handle, transfer_priv->hid_buffer, length, &size, wfd.overlapped);
- }
- if (!ret) {
- if (GetLastError() != ERROR_IO_PENDING) {
- usbi_err(ctx, "HID transfer failed: %s", windows_error_str(0));
- usbi_free_fd(&wfd);
- safe_free(transfer_priv->hid_buffer);
- return LIBUSB_ERROR_IO;
- }
- } else {
- // Only write operations that completed synchronously need to free up
- // hid_buffer. For reads, copy_transfer_data() handles that process.
- if (!direction_in) {
- safe_free(transfer_priv->hid_buffer);
- }
- if (size == 0) {
- usbi_err(ctx, "program assertion failed - no data was transferred");
- size = 1;
- }
- if (size > (size_t)length) {
- usbi_err(ctx, "OVERFLOW!");
- r = LIBUSB_ERROR_OVERFLOW;
- }
- wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY;
- wfd.overlapped->InternalHigh = size;
- }
-
- transfer_priv->pollable_fd = wfd;
- transfer_priv->interface_number = (uint8_t)current_interface;
-
- return r;
-}
-
-static int hid_abort_transfers(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- HANDLE hid_handle;
- int current_interface;
-
- CHECK_HID_AVAILABLE;
-
- current_interface = transfer_priv->interface_number;
- hid_handle = handle_priv->interface_handle[current_interface].api_handle;
- CancelIo(hid_handle);
-
- return LIBUSB_SUCCESS;
-}
-
-static int hid_reset_device(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- HANDLE hid_handle;
- int current_interface;
-
- CHECK_HID_AVAILABLE;
-
- // Flushing the queues on all interfaces is the best we can achieve
- for (current_interface = 0; current_interface < USB_MAXINTERFACES; current_interface++) {
- hid_handle = handle_priv->interface_handle[current_interface].api_handle;
- if ((hid_handle != 0) && (hid_handle != INVALID_HANDLE_VALUE)) {
- HidD_FlushQueue(hid_handle);
- }
- }
- return LIBUSB_SUCCESS;
-}
-
-static int hid_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- HANDLE hid_handle;
- int current_interface;
-
- CHECK_HID_AVAILABLE;
-
- current_interface = interface_by_endpoint(priv, handle_priv, endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cannot clear");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_dbg("matched endpoint %02X with interface %d", endpoint, current_interface);
- hid_handle = handle_priv->interface_handle[current_interface].api_handle;
-
- // No endpoint selection with Microsoft's implementation, so we try to flush the
- // whole interface. Should be OK for most case scenarios
- if (!HidD_FlushQueue(hid_handle)) {
- usbi_err(ctx, "Flushing of HID queue failed: %s", windows_error_str(0));
- // Device was probably disconnected
- return LIBUSB_ERROR_NO_DEVICE;
- }
-
- return LIBUSB_SUCCESS;
-}
-
-// This extra function is only needed for HID
-static int hid_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_transfer_priv *transfer_priv = usbi_transfer_get_os_priv(itransfer);
- int r = LIBUSB_TRANSFER_COMPLETED;
- uint32_t corrected_size = io_size;
-
- if (transfer_priv->hid_buffer != NULL) {
- // If we have a valid hid_buffer, it means the transfer was async
- if (transfer_priv->hid_dest != NULL) { // Data readout
- // First, check for overflow
- if (corrected_size > transfer_priv->hid_expected_size) {
- usbi_err(ctx, "OVERFLOW!");
- corrected_size = (uint32_t)transfer_priv->hid_expected_size;
- r = LIBUSB_TRANSFER_OVERFLOW;
- }
-
- if (transfer_priv->hid_buffer[0] == 0) {
- // Discard the 1 byte report ID prefix
- corrected_size--;
- memcpy(transfer_priv->hid_dest, transfer_priv->hid_buffer+1, corrected_size);
- } else {
- memcpy(transfer_priv->hid_dest, transfer_priv->hid_buffer, corrected_size);
- }
- transfer_priv->hid_dest = NULL;
- }
- // For write, we just need to free the hid buffer
- safe_free(transfer_priv->hid_buffer);
- }
- itransfer->transferred += corrected_size;
- return r;
-}
-
-
-/*
- * Composite API functions
- */
-static int composite_init(int sub_api, struct libusb_context *ctx)
-{
- return LIBUSB_SUCCESS;
-}
-
-static int composite_exit(int sub_api)
-{
- return LIBUSB_SUCCESS;
-}
-
-static int composite_open(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- int r = LIBUSB_ERROR_NOT_FOUND;
- uint8_t i;
- // SUB_API_MAX+1 as the SUB_API_MAX pos is used to indicate availability of HID
- bool available[SUB_API_MAX+1] = {0};
-
- for (i=0; i<USB_MAXINTERFACES; i++) {
- switch (priv->usb_interface[i].apib->id) {
- case USB_API_WINUSBX:
- if (priv->usb_interface[i].sub_api != SUB_API_NOTSET)
- available[priv->usb_interface[i].sub_api] = true;
- break;
- case USB_API_HID:
- available[SUB_API_MAX] = true;
- break;
- default:
- break;
- }
- }
-
- for (i=0; i<SUB_API_MAX; i++) { // WinUSB-like drivers
- if (available[i]) {
- r = usb_api_backend[USB_API_WINUSBX].open(i, dev_handle);
- if (r != LIBUSB_SUCCESS) {
- return r;
- }
- }
- }
- if (available[SUB_API_MAX]) { // HID driver
- r = hid_open(SUB_API_NOTSET, dev_handle);
- }
- return r;
-}
-
-static void composite_close(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- uint8_t i;
- bool available[SUB_API_MAX];
-
- for (i = 0; i<SUB_API_MAX; i++) {
- available[i] = false;
- }
-
- for (i=0; i<USB_MAXINTERFACES; i++) {
- if ( (priv->usb_interface[i].apib->id == USB_API_WINUSBX)
- && (priv->usb_interface[i].sub_api != SUB_API_NOTSET) ) {
- available[priv->usb_interface[i].sub_api] = true;
- }
- }
-
- for (i=0; i<SUB_API_MAX; i++) {
- if (available[i]) {
- usb_api_backend[USB_API_WINUSBX].close(i, dev_handle);
- }
- }
-}
-
-static int composite_claim_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- return priv->usb_interface[iface].apib->
- claim_interface(priv->usb_interface[iface].sub_api, dev_handle, iface);
-}
-
-static int composite_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- return priv->usb_interface[iface].apib->
- set_interface_altsetting(priv->usb_interface[iface].sub_api, dev_handle, iface, altsetting);
-}
-
-static int composite_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- return priv->usb_interface[iface].apib->
- release_interface(priv->usb_interface[iface].sub_api, dev_handle, iface);
-}
-
-static int composite_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int i, pass;
-
- // Interface shouldn't matter for control, but it does in practice, with Windows'
- // restrictions with regards to accessing HID keyboards and mice. Try a 2 pass approach
- for (pass = 0; pass < 2; pass++) {
- for (i=0; i<USB_MAXINTERFACES; i++) {
- if (priv->usb_interface[i].path != NULL) {
- if ((pass == 0) && (priv->usb_interface[i].restricted_functionality)) {
- usbi_dbg("trying to skip restricted interface #%d (HID keyboard or mouse?)", i);
- continue;
- }
- usbi_dbg("using interface %d", i);
- return priv->usb_interface[i].apib->submit_control_transfer(priv->usb_interface[i].sub_api, itransfer);
- }
- }
- }
-
- usbi_err(ctx, "no libusbx supported interfaces to complete request");
- return LIBUSB_ERROR_NOT_FOUND;
-}
-
-static int composite_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int current_interface;
-
- current_interface = interface_by_endpoint(priv, handle_priv, transfer->endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cancelling transfer");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- return priv->usb_interface[current_interface].apib->
- submit_bulk_transfer(priv->usb_interface[current_interface].sub_api, itransfer);}
-
-static int composite_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer) {
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
- int current_interface;
-
- current_interface = interface_by_endpoint(priv, handle_priv, transfer->endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cancelling transfer");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- return priv->usb_interface[current_interface].apib->
- submit_iso_transfer(priv->usb_interface[current_interface].sub_api, itransfer);}
-
-static int composite_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint)
-{
- struct libusb_context *ctx = DEVICE_CTX(dev_handle->dev);
- struct windows_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- int current_interface;
-
- current_interface = interface_by_endpoint(priv, handle_priv, endpoint);
- if (current_interface < 0) {
- usbi_err(ctx, "unable to match endpoint to an open interface - cannot clear");
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- return priv->usb_interface[current_interface].apib->
- clear_halt(priv->usb_interface[current_interface].sub_api, dev_handle, endpoint);}
-
-static int composite_abort_control(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_transfer_priv *transfer_priv = usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
-
- return priv->usb_interface[transfer_priv->interface_number].apib->
- abort_control(priv->usb_interface[transfer_priv->interface_number].sub_api, itransfer);}
-
-static int composite_abort_transfers(int sub_api, struct usbi_transfer *itransfer)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_transfer_priv *transfer_priv = usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
-
- return priv->usb_interface[transfer_priv->interface_number].apib->
- abort_transfers(priv->usb_interface[transfer_priv->interface_number].sub_api, itransfer);}
-
-static int composite_reset_device(int sub_api, struct libusb_device_handle *dev_handle)
-{
- struct windows_device_priv *priv = _device_priv(dev_handle->dev);
- int r;
- uint8_t i;
- bool available[SUB_API_MAX];
- for (i = 0; i<SUB_API_MAX; i++) {
- available[i] = false;
- }
- for (i=0; i<USB_MAXINTERFACES; i++) {
- if ( (priv->usb_interface[i].apib->id == USB_API_WINUSBX)
- && (priv->usb_interface[i].sub_api != SUB_API_NOTSET) ) {
- available[priv->usb_interface[i].sub_api] = true;
- }
- }
- for (i=0; i<SUB_API_MAX; i++) {
- if (available[i]) {
- r = usb_api_backend[USB_API_WINUSBX].reset_device(i, dev_handle);
- if (r != LIBUSB_SUCCESS) {
- return r;
- }
- }
- }
- return LIBUSB_SUCCESS;
-}
-
-static int composite_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size)
-{
- struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
- struct windows_transfer_priv *transfer_priv = usbi_transfer_get_os_priv(itransfer);
- struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev);
-
- return priv->usb_interface[transfer_priv->interface_number].apib->
- copy_transfer_data(priv->usb_interface[transfer_priv->interface_number].sub_api, itransfer, io_size);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.h
deleted file mode 100644
index 5d67a562e..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/os/windows_usb.h
+++ /dev/null
@@ -1,918 +0,0 @@
-/*
- * Windows backend for libusbx 1.0
- * Copyright © 2009-2012 Pete Batard <pete@akeo.ie>
- * With contributions from Michael Plante, Orin Eman et al.
- * Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
- * Major code testing contribution by Xiaofan Chen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#pragma once
-
-#include "windows_common.h"
-
-#if defined(_MSC_VER)
-// disable /W4 MSVC warnings that are benign
-#pragma warning(disable:4127) // conditional expression is constant
-#pragma warning(disable:4100) // unreferenced formal parameter
-#pragma warning(disable:4214) // bit field types other than int
-#pragma warning(disable:4201) // nameless struct/union
-#endif
-
-// Missing from MSVC6 setupapi.h
-#if !defined(SPDRP_ADDRESS)
-#define SPDRP_ADDRESS 28
-#endif
-#if !defined(SPDRP_INSTALL_STATE)
-#define SPDRP_INSTALL_STATE 34
-#endif
-
-#if defined(__CYGWIN__ )
-#define _stricmp stricmp
-// cygwin produces a warning unless these prototypes are defined
-extern int _snprintf(char *buffer, size_t count, const char *format, ...);
-extern char *_strdup(const char *strSource);
-// _beginthreadex is MSVCRT => unavailable for cygwin. Fallback to using CreateThread
-#define _beginthreadex(a, b, c, d, e, f) CreateThread(a, b, (LPTHREAD_START_ROUTINE)c, d, e, f)
-#endif
-
-#define MAX_CTRL_BUFFER_LENGTH 4096
-#define MAX_USB_DEVICES 256
-#define MAX_USB_STRING_LENGTH 128
-#define MAX_HID_REPORT_SIZE 1024
-#define MAX_HID_DESCRIPTOR_SIZE 256
-#define MAX_GUID_STRING_LENGTH 40
-#define MAX_PATH_LENGTH 128
-#define MAX_KEY_LENGTH 256
-#define LIST_SEPARATOR ';'
-#define HTAB_SIZE 1021
-
-// Handle code for HID interface that have been claimed ("dibs")
-#define INTERFACE_CLAIMED ((HANDLE)(intptr_t)0xD1B5)
-// Additional return code for HID operations that completed synchronously
-#define LIBUSB_COMPLETED (LIBUSB_SUCCESS + 1)
-
-// http://msdn.microsoft.com/en-us/library/ff545978.aspx
-// http://msdn.microsoft.com/en-us/library/ff545972.aspx
-// http://msdn.microsoft.com/en-us/library/ff545982.aspx
-#if !defined(GUID_DEVINTERFACE_USB_HOST_CONTROLLER)
-const GUID GUID_DEVINTERFACE_USB_HOST_CONTROLLER = { 0x3ABF6F2D, 0x71C4, 0x462A, {0x8A, 0x92, 0x1E, 0x68, 0x61, 0xE6, 0xAF, 0x27} };
-#endif
-#if !defined(GUID_DEVINTERFACE_USB_DEVICE)
-const GUID GUID_DEVINTERFACE_USB_DEVICE = { 0xA5DCBF10, 0x6530, 0x11D2, {0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED} };
-#endif
-#if !defined(GUID_DEVINTERFACE_USB_HUB)
-const GUID GUID_DEVINTERFACE_USB_HUB = { 0xF18A0E88, 0xC30C, 0x11D0, {0x88, 0x15, 0x00, 0xA0, 0xC9, 0x06, 0xBE, 0xD8} };
-#endif
-#if !defined(GUID_DEVINTERFACE_LIBUSB0_FILTER)
-const GUID GUID_DEVINTERFACE_LIBUSB0_FILTER = { 0xF9F3FF14, 0xAE21, 0x48A0, {0x8A, 0x25, 0x80, 0x11, 0xA7, 0xA9, 0x31, 0xD9} };
-#endif
-
-
-/*
- * Multiple USB API backend support
- */
-#define USB_API_UNSUPPORTED 0
-#define USB_API_HUB 1
-#define USB_API_COMPOSITE 2
-#define USB_API_WINUSBX 3
-#define USB_API_HID 4
-#define USB_API_MAX 5
-// The following is used to indicate if the HID or composite extra props have already been set.
-#define USB_API_SET (1<<USB_API_MAX)
-
-// Sub-APIs for WinUSB-like driver APIs (WinUSB, libusbK, libusb-win32 through the libusbK DLL)
-// Must have the same values as the KUSB_DRVID enum from libusbk.h
-#define SUB_API_NOTSET -1
-#define SUB_API_LIBUSBK 0
-#define SUB_API_LIBUSB0 1
-#define SUB_API_WINUSB 2
-#define SUB_API_MAX 3
-
-#define WINUSBX_DRV_NAMES { "libusbK", "libusb0", "WinUSB"}
-
-struct windows_usb_api_backend {
- const uint8_t id;
- const char* designation;
- const char **driver_name_list; // Driver name, without .sys, e.g. "usbccgp"
- const uint8_t nb_driver_names;
- int (*init)(int sub_api, struct libusb_context *ctx);
- int (*exit)(int sub_api);
- int (*open)(int sub_api, struct libusb_device_handle *dev_handle);
- void (*close)(int sub_api, struct libusb_device_handle *dev_handle);
- int (*configure_endpoints)(int sub_api, struct libusb_device_handle *dev_handle, int iface);
- int (*claim_interface)(int sub_api, struct libusb_device_handle *dev_handle, int iface);
- int (*set_interface_altsetting)(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting);
- int (*release_interface)(int sub_api, struct libusb_device_handle *dev_handle, int iface);
- int (*clear_halt)(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint);
- int (*reset_device)(int sub_api, struct libusb_device_handle *dev_handle);
- int (*submit_bulk_transfer)(int sub_api, struct usbi_transfer *itransfer);
- int (*submit_iso_transfer)(int sub_api, struct usbi_transfer *itransfer);
- int (*submit_control_transfer)(int sub_api, struct usbi_transfer *itransfer);
- int (*abort_control)(int sub_api, struct usbi_transfer *itransfer);
- int (*abort_transfers)(int sub_api, struct usbi_transfer *itransfer);
- int (*copy_transfer_data)(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size);
-};
-
-extern const struct windows_usb_api_backend usb_api_backend[USB_API_MAX];
-
-#define PRINT_UNSUPPORTED_API(fname) \
- usbi_dbg("unsupported API call for '" \
- #fname "' (unrecognized device driver)"); \
- return LIBUSB_ERROR_NOT_SUPPORTED;
-
-/*
- * private structures definition
- * with inline pseudo constructors/destructors
- */
-
-// TODO (v2+): move hid desc to libusb.h?
-struct libusb_hid_descriptor {
- uint8_t bLength;
- uint8_t bDescriptorType;
- uint16_t bcdHID;
- uint8_t bCountryCode;
- uint8_t bNumDescriptors;
- uint8_t bClassDescriptorType;
- uint16_t wClassDescriptorLength;
-};
-#define LIBUSB_DT_HID_SIZE 9
-#define HID_MAX_CONFIG_DESC_SIZE (LIBUSB_DT_CONFIG_SIZE + LIBUSB_DT_INTERFACE_SIZE \
- + LIBUSB_DT_HID_SIZE + 2 * LIBUSB_DT_ENDPOINT_SIZE)
-#define HID_MAX_REPORT_SIZE 1024
-#define HID_IN_EP 0x81
-#define HID_OUT_EP 0x02
-#define LIBUSB_REQ_RECIPIENT(request_type) ((request_type) & 0x1F)
-#define LIBUSB_REQ_TYPE(request_type) ((request_type) & (0x03 << 5))
-#define LIBUSB_REQ_IN(request_type) ((request_type) & LIBUSB_ENDPOINT_IN)
-#define LIBUSB_REQ_OUT(request_type) (!LIBUSB_REQ_IN(request_type))
-
-// The following are used for HID reports IOCTLs
-#define HID_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_NEITHER, FILE_ANY_ACCESS)
-#define HID_BUFFER_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define HID_IN_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_IN_DIRECT, FILE_ANY_ACCESS)
-#define HID_OUT_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_HID_GET_FEATURE HID_OUT_CTL_CODE(100)
-#define IOCTL_HID_GET_INPUT_REPORT HID_OUT_CTL_CODE(104)
-#define IOCTL_HID_SET_FEATURE HID_IN_CTL_CODE(100)
-#define IOCTL_HID_SET_OUTPUT_REPORT HID_IN_CTL_CODE(101)
-
-enum libusb_hid_request_type {
- HID_REQ_GET_REPORT = 0x01,
- HID_REQ_GET_IDLE = 0x02,
- HID_REQ_GET_PROTOCOL = 0x03,
- HID_REQ_SET_REPORT = 0x09,
- HID_REQ_SET_IDLE = 0x0A,
- HID_REQ_SET_PROTOCOL = 0x0B
-};
-
-enum libusb_hid_report_type {
- HID_REPORT_TYPE_INPUT = 0x01,
- HID_REPORT_TYPE_OUTPUT = 0x02,
- HID_REPORT_TYPE_FEATURE = 0x03
-};
-
-struct hid_device_priv {
- uint16_t vid;
- uint16_t pid;
- uint8_t config;
- uint8_t nb_interfaces;
- bool uses_report_ids[3]; // input, ouptput, feature
- uint16_t input_report_size;
- uint16_t output_report_size;
- uint16_t feature_report_size;
- WCHAR string[3][MAX_USB_STRING_LENGTH];
- uint8_t string_index[3]; // man, prod, ser
-};
-
-typedef struct libusb_device_descriptor USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
-struct windows_device_priv {
- uint8_t depth; // distance to HCD
- uint8_t port; // port number on the hub
- uint8_t active_config;
- struct libusb_device *parent_dev; // access to parent is required for usermode ops
- struct windows_usb_api_backend const *apib;
- char *path; // device interface path
- int sub_api; // for WinUSB-like APIs
- struct {
- char *path; // each interface needs a device interface path,
- struct windows_usb_api_backend const *apib; // an API backend (multiple drivers support),
- int sub_api;
- int8_t nb_endpoints; // and a set of endpoint addresses (USB_MAXENDPOINTS)
- uint8_t *endpoint;
- bool restricted_functionality; // indicates if the interface functionality is restricted
- // by Windows (eg. HID keyboards or mice cannot do R/W)
- } usb_interface[USB_MAXINTERFACES];
- struct hid_device_priv *hid;
- USB_DEVICE_DESCRIPTOR dev_descriptor;
- unsigned char **config_descriptor; // list of pointers to the cached config descriptors
-};
-
-static inline struct windows_device_priv *_device_priv(struct libusb_device *dev) {
- return (struct windows_device_priv *)dev->os_priv;
-}
-
-static inline void windows_device_priv_init(libusb_device* dev) {
- struct windows_device_priv* p = _device_priv(dev);
- int i;
- p->depth = 0;
- p->port = 0;
- p->parent_dev = NULL;
- p->path = NULL;
- p->apib = &usb_api_backend[USB_API_UNSUPPORTED];
- p->sub_api = SUB_API_NOTSET;
- p->hid = NULL;
- p->active_config = 0;
- p->config_descriptor = NULL;
- memset(&(p->dev_descriptor), 0, sizeof(USB_DEVICE_DESCRIPTOR));
- for (i=0; i<USB_MAXINTERFACES; i++) {
- p->usb_interface[i].path = NULL;
- p->usb_interface[i].apib = &usb_api_backend[USB_API_UNSUPPORTED];
- p->usb_interface[i].sub_api = SUB_API_NOTSET;
- p->usb_interface[i].nb_endpoints = 0;
- p->usb_interface[i].endpoint = NULL;
- p->usb_interface[i].restricted_functionality = false;
- }
-}
-
-static inline void windows_device_priv_release(libusb_device* dev) {
- struct windows_device_priv* p = _device_priv(dev);
- int i;
- safe_free(p->path);
- if ((dev->num_configurations > 0) && (p->config_descriptor != NULL)) {
- for (i=0; i < dev->num_configurations; i++)
- safe_free(p->config_descriptor[i]);
- }
- safe_free(p->config_descriptor);
- safe_free(p->hid);
- for (i=0; i<USB_MAXINTERFACES; i++) {
- safe_free(p->usb_interface[i].path);
- safe_free(p->usb_interface[i].endpoint);
- }
-}
-
-struct interface_handle_t {
- HANDLE dev_handle; // WinUSB needs an extra handle for the file
- HANDLE api_handle; // used by the API to communicate with the device
-};
-
-struct windows_device_handle_priv {
- int active_interface;
- struct interface_handle_t interface_handle[USB_MAXINTERFACES];
- int autoclaim_count[USB_MAXINTERFACES]; // For auto-release
-};
-
-static inline struct windows_device_handle_priv *_device_handle_priv(
- struct libusb_device_handle *handle)
-{
- return (struct windows_device_handle_priv *) handle->os_priv;
-}
-
-// used for async polling functions
-struct windows_transfer_priv {
- struct winfd pollable_fd;
- uint8_t interface_number;
- uint8_t *hid_buffer; // 1 byte extended data buffer, required for HID
- uint8_t *hid_dest; // transfer buffer destination, required for HID
- size_t hid_expected_size;
-};
-
-// used to match a device driver (including filter drivers) against a supported API
-struct driver_lookup {
- char list[MAX_KEY_LENGTH+1];// REG_MULTI_SZ list of services (driver) names
- const DWORD reg_prop; // SPDRP registry key to use to retreive list
- const char* designation; // internal designation (for debug output)
-};
-
-/* OLE32 dependency */
-DLL_DECLARE_PREFIXED(WINAPI, HRESULT, p, CLSIDFromString, (LPCOLESTR, LPCLSID));
-
-/* SetupAPI dependencies */
-DLL_DECLARE_PREFIXED(WINAPI, HDEVINFO, p, SetupDiGetClassDevsA, (const GUID*, PCSTR, HWND, DWORD));
-DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiEnumDeviceInfo, (HDEVINFO, DWORD, PSP_DEVINFO_DATA));
-DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiEnumDeviceInterfaces, (HDEVINFO, PSP_DEVINFO_DATA,
- const GUID*, DWORD, PSP_DEVICE_INTERFACE_DATA));
-DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiGetDeviceInterfaceDetailA, (HDEVINFO, PSP_DEVICE_INTERFACE_DATA,
- PSP_DEVICE_INTERFACE_DETAIL_DATA_A, DWORD, PDWORD, PSP_DEVINFO_DATA));
-DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiDestroyDeviceInfoList, (HDEVINFO));
-DLL_DECLARE_PREFIXED(WINAPI, HKEY, p, SetupDiOpenDevRegKey, (HDEVINFO, PSP_DEVINFO_DATA, DWORD, DWORD, DWORD, REGSAM));
-DLL_DECLARE_PREFIXED(WINAPI, BOOL, p, SetupDiGetDeviceRegistryPropertyA, (HDEVINFO,
- PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD));
-DLL_DECLARE_PREFIXED(WINAPI, HKEY, p, SetupDiOpenDeviceInterfaceRegKey, (HDEVINFO, PSP_DEVICE_INTERFACE_DATA, DWORD, DWORD));
-DLL_DECLARE_PREFIXED(WINAPI, LONG, p, RegQueryValueExW, (HKEY, LPCWSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD));
-DLL_DECLARE_PREFIXED(WINAPI, LONG, p, RegCloseKey, (HKEY));
-
-/*
- * Windows DDK API definitions. Most of it copied from MinGW's includes
- */
-typedef DWORD DEVNODE, DEVINST;
-typedef DEVNODE *PDEVNODE, *PDEVINST;
-typedef DWORD RETURN_TYPE;
-typedef RETURN_TYPE CONFIGRET;
-
-#define CR_SUCCESS 0x00000000
-#define CR_NO_SUCH_DEVNODE 0x0000000D
-
-#define USB_DEVICE_DESCRIPTOR_TYPE LIBUSB_DT_DEVICE
-#define USB_CONFIGURATION_DESCRIPTOR_TYPE LIBUSB_DT_CONFIG
-#define USB_STRING_DESCRIPTOR_TYPE LIBUSB_DT_STRING
-#define USB_INTERFACE_DESCRIPTOR_TYPE LIBUSB_DT_INTERFACE
-#define USB_ENDPOINT_DESCRIPTOR_TYPE LIBUSB_DT_ENDPOINT
-
-#define USB_REQUEST_GET_STATUS LIBUSB_REQUEST_GET_STATUS
-#define USB_REQUEST_CLEAR_FEATURE LIBUSB_REQUEST_CLEAR_FEATURE
-#define USB_REQUEST_SET_FEATURE LIBUSB_REQUEST_SET_FEATURE
-#define USB_REQUEST_SET_ADDRESS LIBUSB_REQUEST_SET_ADDRESS
-#define USB_REQUEST_GET_DESCRIPTOR LIBUSB_REQUEST_GET_DESCRIPTOR
-#define USB_REQUEST_SET_DESCRIPTOR LIBUSB_REQUEST_SET_DESCRIPTOR
-#define USB_REQUEST_GET_CONFIGURATION LIBUSB_REQUEST_GET_CONFIGURATION
-#define USB_REQUEST_SET_CONFIGURATION LIBUSB_REQUEST_SET_CONFIGURATION
-#define USB_REQUEST_GET_INTERFACE LIBUSB_REQUEST_GET_INTERFACE
-#define USB_REQUEST_SET_INTERFACE LIBUSB_REQUEST_SET_INTERFACE
-#define USB_REQUEST_SYNC_FRAME LIBUSB_REQUEST_SYNCH_FRAME
-
-#define USB_GET_NODE_INFORMATION 258
-#define USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION 260
-#define USB_GET_NODE_CONNECTION_NAME 261
-#define USB_GET_HUB_CAPABILITIES 271
-#if !defined(USB_GET_NODE_CONNECTION_INFORMATION_EX)
-#define USB_GET_NODE_CONNECTION_INFORMATION_EX 274
-#endif
-#if !defined(USB_GET_HUB_CAPABILITIES_EX)
-#define USB_GET_HUB_CAPABILITIES_EX 276
-#endif
-
-#ifndef METHOD_BUFFERED
-#define METHOD_BUFFERED 0
-#endif
-#ifndef FILE_ANY_ACCESS
-#define FILE_ANY_ACCESS 0x00000000
-#endif
-#ifndef FILE_DEVICE_UNKNOWN
-#define FILE_DEVICE_UNKNOWN 0x00000022
-#endif
-#ifndef FILE_DEVICE_USB
-#define FILE_DEVICE_USB FILE_DEVICE_UNKNOWN
-#endif
-
-#ifndef CTL_CODE
-#define CTL_CODE(DeviceType, Function, Method, Access)( \
- ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
-#endif
-
-typedef enum USB_CONNECTION_STATUS {
- NoDeviceConnected,
- DeviceConnected,
- DeviceFailedEnumeration,
- DeviceGeneralFailure,
- DeviceCausedOvercurrent,
- DeviceNotEnoughPower,
- DeviceNotEnoughBandwidth,
- DeviceHubNestedTooDeeply,
- DeviceInLegacyHub
-} USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;
-
-typedef enum USB_HUB_NODE {
- UsbHub,
- UsbMIParent
-} USB_HUB_NODE;
-
-/* Cfgmgr32.dll interface */
-DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Parent, (PDEVINST, DEVINST, ULONG));
-DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Child, (PDEVINST, DEVINST, ULONG));
-DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Sibling, (PDEVINST, DEVINST, ULONG));
-DLL_DECLARE(WINAPI, CONFIGRET, CM_Get_Device_IDA, (DEVINST, PCHAR, ULONG, ULONG));
-
-#define IOCTL_USB_GET_HUB_CAPABILITIES_EX \
- CTL_CODE( FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES_EX, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_HUB_CAPABILITIES \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_ROOT_HUB_NAME \
- CTL_CODE(FILE_DEVICE_USB, HCD_GET_ROOT_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_INFORMATION \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION_EX, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_ATTRIBUTES, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_NAME \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-// Most of the structures below need to be packed
-#pragma pack(push, 1)
-
-typedef struct USB_INTERFACE_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bInterfaceNumber;
- UCHAR bAlternateSetting;
- UCHAR bNumEndpoints;
- UCHAR bInterfaceClass;
- UCHAR bInterfaceSubClass;
- UCHAR bInterfaceProtocol;
- UCHAR iInterface;
-} USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
-
-typedef struct USB_CONFIGURATION_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- USHORT wTotalLength;
- UCHAR bNumInterfaces;
- UCHAR bConfigurationValue;
- UCHAR iConfiguration;
- UCHAR bmAttributes;
- UCHAR MaxPower;
-} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
-
-typedef struct USB_CONFIGURATION_DESCRIPTOR_SHORT {
- struct {
- ULONG ConnectionIndex;
- struct {
- UCHAR bmRequest;
- UCHAR bRequest;
- USHORT wValue;
- USHORT wIndex;
- USHORT wLength;
- } SetupPacket;
- } req;
- USB_CONFIGURATION_DESCRIPTOR data;
-} USB_CONFIGURATION_DESCRIPTOR_SHORT;
-
-typedef struct USB_ENDPOINT_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bEndpointAddress;
- UCHAR bmAttributes;
- USHORT wMaxPacketSize;
- UCHAR bInterval;
-} USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
-
-typedef struct USB_DESCRIPTOR_REQUEST {
- ULONG ConnectionIndex;
- struct {
- UCHAR bmRequest;
- UCHAR bRequest;
- USHORT wValue;
- USHORT wIndex;
- USHORT wLength;
- } SetupPacket;
-// UCHAR Data[0];
-} USB_DESCRIPTOR_REQUEST, *PUSB_DESCRIPTOR_REQUEST;
-
-typedef struct USB_HUB_DESCRIPTOR {
- UCHAR bDescriptorLength;
- UCHAR bDescriptorType;
- UCHAR bNumberOfPorts;
- USHORT wHubCharacteristics;
- UCHAR bPowerOnToPowerGood;
- UCHAR bHubControlCurrent;
- UCHAR bRemoveAndPowerMask[64];
-} USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
-
-typedef struct USB_ROOT_HUB_NAME {
- ULONG ActualLength;
- WCHAR RootHubName[1];
-} USB_ROOT_HUB_NAME, *PUSB_ROOT_HUB_NAME;
-
-typedef struct USB_ROOT_HUB_NAME_FIXED {
- ULONG ActualLength;
- WCHAR RootHubName[MAX_PATH_LENGTH];
-} USB_ROOT_HUB_NAME_FIXED;
-
-typedef struct USB_NODE_CONNECTION_NAME {
- ULONG ConnectionIndex;
- ULONG ActualLength;
- WCHAR NodeName[1];
-} USB_NODE_CONNECTION_NAME, *PUSB_NODE_CONNECTION_NAME;
-
-typedef struct USB_NODE_CONNECTION_NAME_FIXED {
- ULONG ConnectionIndex;
- ULONG ActualLength;
- WCHAR NodeName[MAX_PATH_LENGTH];
-} USB_NODE_CONNECTION_NAME_FIXED;
-
-typedef struct USB_HUB_NAME_FIXED {
- union {
- USB_ROOT_HUB_NAME_FIXED root;
- USB_NODE_CONNECTION_NAME_FIXED node;
- } u;
-} USB_HUB_NAME_FIXED;
-
-typedef struct USB_HUB_INFORMATION {
- USB_HUB_DESCRIPTOR HubDescriptor;
- BOOLEAN HubIsBusPowered;
-} USB_HUB_INFORMATION, *PUSB_HUB_INFORMATION;
-
-typedef struct USB_MI_PARENT_INFORMATION {
- ULONG NumberOfInterfaces;
-} USB_MI_PARENT_INFORMATION, *PUSB_MI_PARENT_INFORMATION;
-
-typedef struct USB_NODE_INFORMATION {
- USB_HUB_NODE NodeType;
- union {
- USB_HUB_INFORMATION HubInformation;
- USB_MI_PARENT_INFORMATION MiParentInformation;
- } u;
-} USB_NODE_INFORMATION, *PUSB_NODE_INFORMATION;
-
-typedef struct USB_PIPE_INFO {
- USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
- ULONG ScheduleOffset;
-} USB_PIPE_INFO, *PUSB_PIPE_INFO;
-
-typedef struct USB_NODE_CONNECTION_INFORMATION_EX {
- ULONG ConnectionIndex;
- USB_DEVICE_DESCRIPTOR DeviceDescriptor;
- UCHAR CurrentConfigurationValue;
- UCHAR Speed;
- BOOLEAN DeviceIsHub;
- USHORT DeviceAddress;
- ULONG NumberOfOpenPipes;
- USB_CONNECTION_STATUS ConnectionStatus;
-// USB_PIPE_INFO PipeList[0];
-} USB_NODE_CONNECTION_INFORMATION_EX, *PUSB_NODE_CONNECTION_INFORMATION_EX;
-
-typedef struct USB_HUB_CAP_FLAGS {
- ULONG HubIsHighSpeedCapable:1;
- ULONG HubIsHighSpeed:1;
- ULONG HubIsMultiTtCapable:1;
- ULONG HubIsMultiTt:1;
- ULONG HubIsRoot:1;
- ULONG HubIsArmedWakeOnConnect:1;
- ULONG ReservedMBZ:26;
-} USB_HUB_CAP_FLAGS, *PUSB_HUB_CAP_FLAGS;
-
-typedef struct USB_HUB_CAPABILITIES {
- ULONG HubIs2xCapable : 1;
-} USB_HUB_CAPABILITIES, *PUSB_HUB_CAPABILITIES;
-
-typedef struct USB_HUB_CAPABILITIES_EX {
- USB_HUB_CAP_FLAGS CapabilityFlags;
-} USB_HUB_CAPABILITIES_EX, *PUSB_HUB_CAPABILITIES_EX;
-
-#pragma pack(pop)
-
-/* winusb.dll interface */
-
-#define SHORT_PACKET_TERMINATE 0x01
-#define AUTO_CLEAR_STALL 0x02
-#define PIPE_TRANSFER_TIMEOUT 0x03
-#define IGNORE_SHORT_PACKETS 0x04
-#define ALLOW_PARTIAL_READS 0x05
-#define AUTO_FLUSH 0x06
-#define RAW_IO 0x07
-#define MAXIMUM_TRANSFER_SIZE 0x08
-#define AUTO_SUSPEND 0x81
-#define SUSPEND_DELAY 0x83
-#define DEVICE_SPEED 0x01
-#define LowSpeed 0x01
-#define FullSpeed 0x02
-#define HighSpeed 0x03
-
-typedef enum USBD_PIPE_TYPE {
- UsbdPipeTypeControl,
- UsbdPipeTypeIsochronous,
- UsbdPipeTypeBulk,
- UsbdPipeTypeInterrupt
-} USBD_PIPE_TYPE;
-
-typedef struct {
- USBD_PIPE_TYPE PipeType;
- UCHAR PipeId;
- USHORT MaximumPacketSize;
- UCHAR Interval;
-} WINUSB_PIPE_INFORMATION, *PWINUSB_PIPE_INFORMATION;
-
-#pragma pack(1)
-typedef struct {
- UCHAR request_type;
- UCHAR request;
- USHORT value;
- USHORT index;
- USHORT length;
-} WINUSB_SETUP_PACKET, *PWINUSB_SETUP_PACKET;
-#pragma pack()
-
-typedef void *WINUSB_INTERFACE_HANDLE, *PWINUSB_INTERFACE_HANDLE;
-
-typedef BOOL (WINAPI *WinUsb_AbortPipe_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID
-);
-typedef BOOL (WINAPI *WinUsb_ControlTransfer_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- WINUSB_SETUP_PACKET SetupPacket,
- PUCHAR Buffer,
- ULONG BufferLength,
- PULONG LengthTransferred,
- LPOVERLAPPED Overlapped
-);
-typedef BOOL (WINAPI *WinUsb_FlushPipe_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID
-);
-typedef BOOL (WINAPI *WinUsb_Free_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle
-);
-typedef BOOL (WINAPI *WinUsb_GetAssociatedInterface_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR AssociatedInterfaceIndex,
- PWINUSB_INTERFACE_HANDLE AssociatedInterfaceHandle
-);
-typedef BOOL (WINAPI *WinUsb_GetCurrentAlternateSetting_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- PUCHAR AlternateSetting
-);
-typedef BOOL (WINAPI *WinUsb_GetDescriptor_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR DescriptorType,
- UCHAR Index,
- USHORT LanguageID,
- PUCHAR Buffer,
- ULONG BufferLength,
- PULONG LengthTransferred
-);
-typedef BOOL (WINAPI *WinUsb_GetOverlappedResult_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- LPOVERLAPPED lpOverlapped,
- LPDWORD lpNumberOfBytesTransferred,
- BOOL bWait
-);
-typedef BOOL (WINAPI *WinUsb_GetPipePolicy_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID,
- ULONG PolicyType,
- PULONG ValueLength,
- PVOID Value
-);
-typedef BOOL (WINAPI *WinUsb_GetPowerPolicy_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- ULONG PolicyType,
- PULONG ValueLength,
- PVOID Value
-);
-typedef BOOL (WINAPI *WinUsb_Initialize_t)(
- HANDLE DeviceHandle,
- PWINUSB_INTERFACE_HANDLE InterfaceHandle
-);
-typedef BOOL (WINAPI *WinUsb_QueryDeviceInformation_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- ULONG InformationType,
- PULONG BufferLength,
- PVOID Buffer
-);
-typedef BOOL (WINAPI *WinUsb_QueryInterfaceSettings_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR AlternateSettingNumber,
- PUSB_INTERFACE_DESCRIPTOR UsbAltInterfaceDescriptor
-);
-typedef BOOL (WINAPI *WinUsb_QueryPipe_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR AlternateInterfaceNumber,
- UCHAR PipeIndex,
- PWINUSB_PIPE_INFORMATION PipeInformation
-);
-typedef BOOL (WINAPI *WinUsb_ReadPipe_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID,
- PUCHAR Buffer,
- ULONG BufferLength,
- PULONG LengthTransferred,
- LPOVERLAPPED Overlapped
-);
-typedef BOOL (WINAPI *WinUsb_ResetPipe_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID
-);
-typedef BOOL (WINAPI *WinUsb_SetCurrentAlternateSetting_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR AlternateSetting
-);
-typedef BOOL (WINAPI *WinUsb_SetPipePolicy_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID,
- ULONG PolicyType,
- ULONG ValueLength,
- PVOID Value
-);
-typedef BOOL (WINAPI *WinUsb_SetPowerPolicy_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- ULONG PolicyType,
- ULONG ValueLength,
- PVOID Value
-);
-typedef BOOL (WINAPI *WinUsb_WritePipe_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle,
- UCHAR PipeID,
- PUCHAR Buffer,
- ULONG BufferLength,
- PULONG LengthTransferred,
- LPOVERLAPPED Overlapped
-);
-typedef BOOL (WINAPI *WinUsb_ResetDevice_t)(
- WINUSB_INTERFACE_HANDLE InterfaceHandle
-);
-
-/* /!\ These must match the ones from the official libusbk.h */
-typedef enum _KUSB_FNID
-{
- KUSB_FNID_Init,
- KUSB_FNID_Free,
- KUSB_FNID_ClaimInterface,
- KUSB_FNID_ReleaseInterface,
- KUSB_FNID_SetAltInterface,
- KUSB_FNID_GetAltInterface,
- KUSB_FNID_GetDescriptor,
- KUSB_FNID_ControlTransfer,
- KUSB_FNID_SetPowerPolicy,
- KUSB_FNID_GetPowerPolicy,
- KUSB_FNID_SetConfiguration,
- KUSB_FNID_GetConfiguration,
- KUSB_FNID_ResetDevice,
- KUSB_FNID_Initialize,
- KUSB_FNID_SelectInterface,
- KUSB_FNID_GetAssociatedInterface,
- KUSB_FNID_Clone,
- KUSB_FNID_QueryInterfaceSettings,
- KUSB_FNID_QueryDeviceInformation,
- KUSB_FNID_SetCurrentAlternateSetting,
- KUSB_FNID_GetCurrentAlternateSetting,
- KUSB_FNID_QueryPipe,
- KUSB_FNID_SetPipePolicy,
- KUSB_FNID_GetPipePolicy,
- KUSB_FNID_ReadPipe,
- KUSB_FNID_WritePipe,
- KUSB_FNID_ResetPipe,
- KUSB_FNID_AbortPipe,
- KUSB_FNID_FlushPipe,
- KUSB_FNID_IsoReadPipe,
- KUSB_FNID_IsoWritePipe,
- KUSB_FNID_GetCurrentFrameNumber,
- KUSB_FNID_GetOverlappedResult,
- KUSB_FNID_GetProperty,
- KUSB_FNID_COUNT,
-} KUSB_FNID;
-
-typedef struct _KLIB_VERSION {
- INT Major;
- INT Minor;
- INT Micro;
- INT Nano;
-} KLIB_VERSION;
-typedef KLIB_VERSION* PKLIB_VERSION;
-
-typedef BOOL (WINAPI *LibK_GetProcAddress_t)(
- PVOID* ProcAddress,
- ULONG DriverID,
- ULONG FunctionID
-);
-
-typedef VOID (WINAPI *LibK_GetVersion_t)(
- PKLIB_VERSION Version
-);
-
-struct winusb_interface {
- bool initialized;
- WinUsb_AbortPipe_t AbortPipe;
- WinUsb_ControlTransfer_t ControlTransfer;
- WinUsb_FlushPipe_t FlushPipe;
- WinUsb_Free_t Free;
- WinUsb_GetAssociatedInterface_t GetAssociatedInterface;
- WinUsb_GetCurrentAlternateSetting_t GetCurrentAlternateSetting;
- WinUsb_GetDescriptor_t GetDescriptor;
- WinUsb_GetOverlappedResult_t GetOverlappedResult;
- WinUsb_GetPipePolicy_t GetPipePolicy;
- WinUsb_GetPowerPolicy_t GetPowerPolicy;
- WinUsb_Initialize_t Initialize;
- WinUsb_QueryDeviceInformation_t QueryDeviceInformation;
- WinUsb_QueryInterfaceSettings_t QueryInterfaceSettings;
- WinUsb_QueryPipe_t QueryPipe;
- WinUsb_ReadPipe_t ReadPipe;
- WinUsb_ResetPipe_t ResetPipe;
- WinUsb_SetCurrentAlternateSetting_t SetCurrentAlternateSetting;
- WinUsb_SetPipePolicy_t SetPipePolicy;
- WinUsb_SetPowerPolicy_t SetPowerPolicy;
- WinUsb_WritePipe_t WritePipe;
- WinUsb_ResetDevice_t ResetDevice;
-};
-
-/* hid.dll interface */
-
-#define HIDP_STATUS_SUCCESS 0x110000
-typedef void* PHIDP_PREPARSED_DATA;
-
-#pragma pack(1)
-typedef struct {
- ULONG Size;
- USHORT VendorID;
- USHORT ProductID;
- USHORT VersionNumber;
-} HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES;
-#pragma pack()
-
-typedef USHORT USAGE;
-typedef struct {
- USAGE Usage;
- USAGE UsagePage;
- USHORT InputReportByteLength;
- USHORT OutputReportByteLength;
- USHORT FeatureReportByteLength;
- USHORT Reserved[17];
- USHORT NumberLinkCollectionNodes;
- USHORT NumberInputButtonCaps;
- USHORT NumberInputValueCaps;
- USHORT NumberInputDataIndices;
- USHORT NumberOutputButtonCaps;
- USHORT NumberOutputValueCaps;
- USHORT NumberOutputDataIndices;
- USHORT NumberFeatureButtonCaps;
- USHORT NumberFeatureValueCaps;
- USHORT NumberFeatureDataIndices;
-} HIDP_CAPS, *PHIDP_CAPS;
-
-typedef enum _HIDP_REPORT_TYPE {
- HidP_Input,
- HidP_Output,
- HidP_Feature
-} HIDP_REPORT_TYPE;
-
-typedef struct _HIDP_VALUE_CAPS {
- USAGE UsagePage;
- UCHAR ReportID;
- BOOLEAN IsAlias;
- USHORT BitField;
- USHORT LinkCollection;
- USAGE LinkUsage;
- USAGE LinkUsagePage;
- BOOLEAN IsRange;
- BOOLEAN IsStringRange;
- BOOLEAN IsDesignatorRange;
- BOOLEAN IsAbsolute;
- BOOLEAN HasNull;
- UCHAR Reserved;
- USHORT BitSize;
- USHORT ReportCount;
- USHORT Reserved2[5];
- ULONG UnitsExp;
- ULONG Units;
- LONG LogicalMin, LogicalMax;
- LONG PhysicalMin, PhysicalMax;
- union {
- struct {
- USAGE UsageMin, UsageMax;
- USHORT StringMin, StringMax;
- USHORT DesignatorMin, DesignatorMax;
- USHORT DataIndexMin, DataIndexMax;
- } Range;
- struct {
- USAGE Usage, Reserved1;
- USHORT StringIndex, Reserved2;
- USHORT DesignatorIndex, Reserved3;
- USHORT DataIndex, Reserved4;
- } NotRange;
- } u;
-} HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS;
-
-DLL_DECLARE(WINAPI, BOOL, HidD_GetAttributes, (HANDLE, PHIDD_ATTRIBUTES));
-DLL_DECLARE(WINAPI, VOID, HidD_GetHidGuid, (LPGUID));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetPreparsedData, (HANDLE, PHIDP_PREPARSED_DATA *));
-DLL_DECLARE(WINAPI, BOOL, HidD_FreePreparsedData, (PHIDP_PREPARSED_DATA));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetManufacturerString, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetProductString, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetSerialNumberString, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, LONG, HidP_GetCaps, (PHIDP_PREPARSED_DATA, PHIDP_CAPS));
-DLL_DECLARE(WINAPI, BOOL, HidD_SetNumInputBuffers, (HANDLE, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_SetFeature, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetFeature, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetPhysicalDescriptor, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_GetInputReport, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_SetOutputReport, (HANDLE, PVOID, ULONG));
-DLL_DECLARE(WINAPI, BOOL, HidD_FlushQueue, (HANDLE));
-DLL_DECLARE(WINAPI, BOOL, HidP_GetValueCaps, (HIDP_REPORT_TYPE, PHIDP_VALUE_CAPS, PULONG, PHIDP_PREPARSED_DATA));
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/strerror.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/strerror.c
deleted file mode 100644
index a3c3afa3f..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/strerror.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * libusb strerror code
- * Copyright © 2013 Hans de Goede <hdegoede@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-#include "config.h"
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "libusb.h"
-#include "libusbi.h"
-
-#if defined(_MSC_VER)
-#define strncasecmp _strnicmp
-#endif
-
-static size_t usbi_locale = 0;
-
-/** \ingroup misc
- * How to add a new \ref libusb_strerror() translation:
- * <ol>
- * <li> Download the latest \c strerror.c from:<br>
- * https://raw.github.com/libusbx/libusbx/master/libusb/sterror.c </li>
- * <li> Open the file in an UTF-8 capable editor </li>
- * <li> Add the 2 letter <a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO 639-1</a>
- * code for your locale at the end of \c usbi_locale_supported[]<br>
- * Eg. for Chinese, you would add "zh" so that:
- * \code... usbi_locale_supported[] = { "en", "nl", "fr" };\endcode
- * becomes:
- * \code... usbi_locale_supported[] = { "en", "nl", "fr", "zh" };\endcode </li>
- * <li> Copy the <tt>{ / * English (en) * / ... }</tt> section and add it at the end of \c usbi_localized_errors<br>
- * Eg. for Chinese, the last section of \c usbi_localized_errors could look like:
- * \code
- * }, { / * Chinese (zh) * /
- * "Success",
- * ...
- * "Other error",
- * }
- * };\endcode </li>
- * <li> Translate each of the English messages from the section you copied into your language </li>
- * <li> Save the file (in UTF-8 format) and send it to \c libusbx-devel@lists.sourceforge.net </li>
- * </ol>
- */
-
-static const char* usbi_locale_supported[] = { "en", "nl", "fr" };
-static const char* usbi_localized_errors[ARRAYSIZE(usbi_locale_supported)][LIBUSB_ERROR_COUNT] = {
- { /* English (en) */
- "Success",
- "Input/Output Error",
- "Invalid parameter",
- "Access denied (insufficient permissions)",
- "No such device (it may have been disconnected)",
- "Entity not found",
- "Resource busy",
- "Operation timed out",
- "Overflow",
- "Pipe error",
- "System call interrupted (perhaps due to signal)",
- "Insufficient memory",
- "Operation not supported or unimplemented on this platform",
- "Other error",
- }, { /* Dutch (nl) */
- "Gelukt",
- "Invoer-/uitvoerfout",
- "Ongeldig argument",
- "Toegang geweigerd (onvoldoende toegangsrechten)",
- "Apparaat bestaat niet (verbinding met apparaat verbroken?)",
- "Niet gevonden",
- "Apparaat of hulpbron is bezig",
- "Bewerking verlopen",
- "Waarde is te groot",
- "Gebroken pijp",
- "Onderbroken systeemaanroep",
- "Onvoldoende geheugen beschikbaar",
- "Bewerking wordt niet ondersteund",
- "Andere fout",
- }, { /* French (fr) */
- "Succès",
- "Erreur d'entrée/sortie",
- "Paramètre invalide",
- "Accès refusé (permissions insuffisantes)",
- "Périphérique introuvable (peut-être déconnecté)",
- "Elément introuvable",
- "Resource déjà occupée",
- "Operation expirée",
- "Débordement",
- "Erreur de pipe",
- "Appel système abandonné (peut-être à cause d’un signal)",
- "Mémoire insuffisante",
- "Opération non supportée or non implémentée sur cette plateforme",
- "Autre erreur"
- }
-};
-
-/** \ingroup misc
- * Set the language, and only the language, not the encoding! used for
- * translatable libusb messages.
- *
- * This takes a locale string in the default setlocale format: lang[-region]
- * or lang[_country_region][.codeset]. Only the lang part of the string is
- * used, and only 2 letter ISO 639-1 codes are accepted for it, such as "de".
- * The optional region, country_region or codeset parts are ignored. This
- * means that functions which return translatable strings will NOT honor the
- * specified encoding.
- * All strings returned are encoded as UTF-8 strings.
- *
- * If libusb_setlocale() is not called, all messages will be in English.
- *
- * The following functions return translatable strings: libusb_strerror().
- * Note that the libusb log messages controlled through libusb_set_debug()
- * are not translated, they are always in English.
- *
- * For POSIX UTF-8 environments if you want libusb to follow the standard
- * locale settings, call libusb_setlocale(setlocale(LC_MESSAGES, NULL)),
- * after your app has done its locale setup.
- *
- * \param locale locale-string in the form of lang[_country_region][.codeset]
- * or lang[-region], where lang is a 2 letter ISO 639-1 code
- * \returns LIBUSB_SUCCESS on success
- * \returns LIBUSB_ERROR_INVALID_PARAM if the locale doesn't meet the requirements
- * \returns LIBUSB_ERROR_NOT_FOUND if the requested language is not supported
- * \returns a LIBUSB_ERROR code on other errors
- */
-
-int API_EXPORTED libusb_setlocale(const char *locale)
-{
- size_t i;
-
- if ( (locale == NULL) || (strlen(locale) < 2)
- || ((strlen(locale) > 2) && (locale[2] != '-') && (locale[2] != '_') && (locale[2] != '.')) )
- return LIBUSB_ERROR_INVALID_PARAM;
-
- for (i=0; i<ARRAYSIZE(usbi_locale_supported); i++) {
- if (strncasecmp(usbi_locale_supported[i], locale, 2) == 0)
- break;
- }
- if (i >= ARRAYSIZE(usbi_locale_supported)) {
- return LIBUSB_ERROR_NOT_FOUND;
- }
-
- usbi_locale = i;
-
- return LIBUSB_SUCCESS;
-}
-
-/** \ingroup misc
- * Returns a constant string with a short description of the given error code,
- * this description is intended for displaying to the end user and will be in
- * the language set by libusb_setlocale().
- *
- * The returned string is encoded in UTF-8.
- *
- * The messages always start with a capital letter and end without any dot.
- * The caller must not free() the returned string.
- *
- * \param errcode the error code whose description is desired
- * \returns a short description of the error code in UTF-8 encoding
- */
-DEFAULT_VISIBILITY const char* LIBUSB_CALL libusb_strerror(enum libusb_error errcode)
-{
- int errcode_index = -errcode;
-
- if ((errcode_index < 0) || (errcode_index >= LIBUSB_ERROR_COUNT)) {
- /* "Other Error", which should always be our last message, is returned */
- errcode_index = LIBUSB_ERROR_COUNT - 1;
- }
-
- return usbi_localized_errors[usbi_locale][errcode_index];
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/sync.c b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/sync.c
deleted file mode 100644
index 42e486db3..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/sync.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Synchronous I/O functions for libusbx
- * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include <errno.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "libusbi.h"
-
-/**
- * @defgroup syncio Synchronous device I/O
- *
- * This page documents libusbx's synchronous (blocking) API for USB device I/O.
- * This interface is easy to use but has some limitations. More advanced users
- * may wish to consider using the \ref asyncio "asynchronous I/O API" instead.
- */
-
-static void LIBUSB_CALL sync_transfer_cb(struct libusb_transfer *transfer)
-{
- int *completed = transfer->user_data;
- *completed = 1;
- usbi_dbg("actual_length=%d", transfer->actual_length);
- /* caller interprets result and frees transfer */
-}
-
-static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
-{
- int r, *completed = transfer->user_data;
- struct libusb_context *ctx = HANDLE_CTX(transfer->dev_handle);
-
- while (!*completed) {
- r = libusb_handle_events_completed(ctx, completed);
- if (r < 0) {
- if (r == LIBUSB_ERROR_INTERRUPTED)
- continue;
- usbi_err(ctx, "libusb_handle_events failed: %s, cancelling transfer and retrying",
- libusb_error_name(r));
- libusb_cancel_transfer(transfer);
- continue;
- }
- }
-}
-
-/** \ingroup syncio
- * Perform a USB control transfer.
- *
- * The direction of the transfer is inferred from the bmRequestType field of
- * the setup packet.
- *
- * The wValue, wIndex and wLength fields values should be given in host-endian
- * byte order.
- *
- * \param dev_handle a handle for the device to communicate with
- * \param bmRequestType the request type field for the setup packet
- * \param bRequest the request field for the setup packet
- * \param wValue the value field for the setup packet
- * \param wIndex the index field for the setup packet
- * \param data a suitably-sized data buffer for either input or output
- * (depending on direction bits within bmRequestType)
- * \param wLength the length field for the setup packet. The data buffer should
- * be at least this size.
- * \param timeout timeout (in millseconds) that this function should wait
- * before giving up due to no response being received. For an unlimited
- * timeout, use value 0.
- * \returns on success, the number of bytes actually transferred
- * \returns LIBUSB_ERROR_TIMEOUT if the transfer timed out
- * \returns LIBUSB_ERROR_PIPE if the control request was not supported by the
- * device
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failures
- */
-int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle,
- uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex,
- unsigned char *data, uint16_t wLength, unsigned int timeout)
-{
- struct libusb_transfer *transfer = libusb_alloc_transfer(0);
- unsigned char *buffer;
- int completed = 0;
- int r;
-
- if (!transfer)
- return LIBUSB_ERROR_NO_MEM;
-
- buffer = (unsigned char*) malloc(LIBUSB_CONTROL_SETUP_SIZE + wLength);
- if (!buffer) {
- libusb_free_transfer(transfer);
- return LIBUSB_ERROR_NO_MEM;
- }
-
- libusb_fill_control_setup(buffer, bmRequestType, bRequest, wValue, wIndex,
- wLength);
- if ((bmRequestType & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_OUT)
- memcpy(buffer + LIBUSB_CONTROL_SETUP_SIZE, data, wLength);
-
- libusb_fill_control_transfer(transfer, dev_handle, buffer,
- sync_transfer_cb, &completed, timeout);
- transfer->flags = LIBUSB_TRANSFER_FREE_BUFFER;
- r = libusb_submit_transfer(transfer);
- if (r < 0) {
- libusb_free_transfer(transfer);
- return r;
- }
-
- sync_transfer_wait_for_completion(transfer);
-
- if ((bmRequestType & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_IN)
- memcpy(data, libusb_control_transfer_get_data(transfer),
- transfer->actual_length);
-
- switch (transfer->status) {
- case LIBUSB_TRANSFER_COMPLETED:
- r = transfer->actual_length;
- break;
- case LIBUSB_TRANSFER_TIMED_OUT:
- r = LIBUSB_ERROR_TIMEOUT;
- break;
- case LIBUSB_TRANSFER_STALL:
- r = LIBUSB_ERROR_PIPE;
- break;
- case LIBUSB_TRANSFER_NO_DEVICE:
- r = LIBUSB_ERROR_NO_DEVICE;
- break;
- case LIBUSB_TRANSFER_OVERFLOW:
- r = LIBUSB_ERROR_OVERFLOW;
- break;
- case LIBUSB_TRANSFER_ERROR:
- case LIBUSB_TRANSFER_CANCELLED:
- r = LIBUSB_ERROR_IO;
- break;
- default:
- usbi_warn(HANDLE_CTX(dev_handle),
- "unrecognised status code %d", transfer->status);
- r = LIBUSB_ERROR_OTHER;
- }
-
- libusb_free_transfer(transfer);
- return r;
-}
-
-static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
- unsigned char endpoint, unsigned char *buffer, int length,
- int *transferred, unsigned int timeout, unsigned char type)
-{
- struct libusb_transfer *transfer = libusb_alloc_transfer(0);
- int completed = 0;
- int r;
-
- if (!transfer)
- return LIBUSB_ERROR_NO_MEM;
-
- libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length,
- sync_transfer_cb, &completed, timeout);
- transfer->type = type;
-
- r = libusb_submit_transfer(transfer);
- if (r < 0) {
- libusb_free_transfer(transfer);
- return r;
- }
-
- sync_transfer_wait_for_completion(transfer);
-
- *transferred = transfer->actual_length;
- switch (transfer->status) {
- case LIBUSB_TRANSFER_COMPLETED:
- r = 0;
- break;
- case LIBUSB_TRANSFER_TIMED_OUT:
- r = LIBUSB_ERROR_TIMEOUT;
- break;
- case LIBUSB_TRANSFER_STALL:
- r = LIBUSB_ERROR_PIPE;
- break;
- case LIBUSB_TRANSFER_OVERFLOW:
- r = LIBUSB_ERROR_OVERFLOW;
- break;
- case LIBUSB_TRANSFER_NO_DEVICE:
- r = LIBUSB_ERROR_NO_DEVICE;
- break;
- case LIBUSB_TRANSFER_ERROR:
- case LIBUSB_TRANSFER_CANCELLED:
- r = LIBUSB_ERROR_IO;
- break;
- default:
- usbi_warn(HANDLE_CTX(dev_handle),
- "unrecognised status code %d", transfer->status);
- r = LIBUSB_ERROR_OTHER;
- }
-
- libusb_free_transfer(transfer);
- return r;
-}
-
-/** \ingroup syncio
- * Perform a USB bulk transfer. The direction of the transfer is inferred from
- * the direction bits of the endpoint address.
- *
- * For bulk reads, the <tt>length</tt> field indicates the maximum length of
- * data you are expecting to receive. If less data arrives than expected,
- * this function will return that data, so be sure to check the
- * <tt>transferred</tt> output parameter.
- *
- * You should also check the <tt>transferred</tt> parameter for bulk writes.
- * Not all of the data may have been written.
- *
- * Also check <tt>transferred</tt> when dealing with a timeout error code.
- * libusbx may have to split your transfer into a number of chunks to satisfy
- * underlying O/S requirements, meaning that the timeout may expire after
- * the first few chunks have completed. libusbx is careful not to lose any data
- * that may have been transferred; do not assume that timeout conditions
- * indicate a complete lack of I/O.
- *
- * \param dev_handle a handle for the device to communicate with
- * \param endpoint the address of a valid endpoint to communicate with
- * \param data a suitably-sized data buffer for either input or output
- * (depending on endpoint)
- * \param length for bulk writes, the number of bytes from data to be sent. for
- * bulk reads, the maximum number of bytes to receive into the data buffer.
- * \param transferred output location for the number of bytes actually
- * transferred.
- * \param timeout timeout (in millseconds) that this function should wait
- * before giving up due to no response being received. For an unlimited
- * timeout, use value 0.
- *
- * \returns 0 on success (and populates <tt>transferred</tt>)
- * \returns LIBUSB_ERROR_TIMEOUT if the transfer timed out (and populates
- * <tt>transferred</tt>)
- * \returns LIBUSB_ERROR_PIPE if the endpoint halted
- * \returns LIBUSB_ERROR_OVERFLOW if the device offered more data, see
- * \ref packetoverflow
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other failures
- */
-int API_EXPORTED libusb_bulk_transfer(struct libusb_device_handle *dev_handle,
- unsigned char endpoint, unsigned char *data, int length, int *transferred,
- unsigned int timeout)
-{
- return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
- transferred, timeout, LIBUSB_TRANSFER_TYPE_BULK);
-}
-
-/** \ingroup syncio
- * Perform a USB interrupt transfer. The direction of the transfer is inferred
- * from the direction bits of the endpoint address.
- *
- * For interrupt reads, the <tt>length</tt> field indicates the maximum length
- * of data you are expecting to receive. If less data arrives than expected,
- * this function will return that data, so be sure to check the
- * <tt>transferred</tt> output parameter.
- *
- * You should also check the <tt>transferred</tt> parameter for interrupt
- * writes. Not all of the data may have been written.
- *
- * Also check <tt>transferred</tt> when dealing with a timeout error code.
- * libusbx may have to split your transfer into a number of chunks to satisfy
- * underlying O/S requirements, meaning that the timeout may expire after
- * the first few chunks have completed. libusbx is careful not to lose any data
- * that may have been transferred; do not assume that timeout conditions
- * indicate a complete lack of I/O.
- *
- * The default endpoint bInterval value is used as the polling interval.
- *
- * \param dev_handle a handle for the device to communicate with
- * \param endpoint the address of a valid endpoint to communicate with
- * \param data a suitably-sized data buffer for either input or output
- * (depending on endpoint)
- * \param length for bulk writes, the number of bytes from data to be sent. for
- * bulk reads, the maximum number of bytes to receive into the data buffer.
- * \param transferred output location for the number of bytes actually
- * transferred.
- * \param timeout timeout (in millseconds) that this function should wait
- * before giving up due to no response being received. For an unlimited
- * timeout, use value 0.
- *
- * \returns 0 on success (and populates <tt>transferred</tt>)
- * \returns LIBUSB_ERROR_TIMEOUT if the transfer timed out
- * \returns LIBUSB_ERROR_PIPE if the endpoint halted
- * \returns LIBUSB_ERROR_OVERFLOW if the device offered more data, see
- * \ref packetoverflow
- * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
- * \returns another LIBUSB_ERROR code on other error
- */
-int API_EXPORTED libusb_interrupt_transfer(
- struct libusb_device_handle *dev_handle, unsigned char endpoint,
- unsigned char *data, int length, int *transferred, unsigned int timeout)
-{
- return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
- transferred, timeout, LIBUSB_TRANSFER_TYPE_INTERRUPT);
-}
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version.h
deleted file mode 100644
index cf37de97a..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */
-#include "version_nano.h"
-#ifndef LIBUSB_MAJOR
-#define LIBUSB_MAJOR 1
-#endif
-#ifndef LIBUSB_MINOR
-#define LIBUSB_MINOR 0
-#endif
-#ifndef LIBUSB_MICRO
-#define LIBUSB_MICRO 16
-#endif
-#ifndef LIBUSB_NANO
-#define LIBUSB_NANO 0
-#endif
-/* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
-#ifndef LIBUSB_RC
-#define LIBUSB_RC ""
-#endif
diff --git a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version_nano.h b/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version_nano.h
deleted file mode 100644
index 525cd7d52..000000000
--- a/SDL_Core/src/thirdPartyLibs/libusbx-1.0.16/libusb/version_nano.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LIBUSB_NANO 10774
diff --git a/SDL_Core/tools/CMakeLists.txt b/SDL_Core/tools/CMakeLists.txt
deleted file mode 100644
index 2834dce38..000000000
--- a/SDL_Core/tools/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-cmake_minimum_required(VERSION 2.8.3)
-
-include(ExternalProject)
-
-set(intergen_SOURCES "${CMAKE_CURRENT_LIST_DIR}/intergen")
-set(intergen_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/intergen")
-set(intergen_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/intergen")
-set(intergen_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${intergen_INSTALL_DIR})
-
-ExternalProject_Add(intergen
- SOURCE_DIR ${intergen_SOURCES}
- PREFIX ${intergen_PREFIX}
- INSTALL_DIR ${intergen_INSTALL_DIR}
- CMAKE_ARGS ${intergen_CMAKE_ARGS})
-
-# This will force intergen make call every time core is built
-# When intergen source didn't change no files are updated
-# It is required to automatically rebuild interfaces if intergen was changed
-ExternalProject_Add_Step(intergen forcebuild
- COMMAND ${CMAKE_COMMAND} -E echo "Force intergen build"
- DEPENDEES update DEPENDERS build
- ALWAYS 1)
diff --git a/SDL_Core/tools/InterfaceGenerator/.gitignore b/SDL_Core/tools/InterfaceGenerator/.gitignore
deleted file mode 100644
index 0e6b1c99b..000000000
--- a/SDL_Core/tools/InterfaceGenerator/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.pyc
-generator/*.pyc
-generator/generators/*.pyc
-generator/parsers/*.pyc
-
-test/*.pyc
-test/generator/*.pyc
-test/generator/generators/*.pyc
-test/generator/parsers/*.pyc \ No newline at end of file
diff --git a/SDL_Core/tools/InterfaceGenerator/Generator.py b/SDL_Core/tools/InterfaceGenerator/Generator.py
deleted file mode 100755
index 5b5894bc0..000000000
--- a/SDL_Core/tools/InterfaceGenerator/Generator.py
+++ /dev/null
@@ -1,116 +0,0 @@
-"""
-Generator application that generates c++ interfaces code from xml description
-
-usage: Generator.py [-h] --parser-type {sdlrpcv2}
- source-xml namespace output-dir
-
-SmartSchema interface generator
-
-positional arguments:
- source-xml
- namespace
- output-dir
-
-optional arguments:
- -h, --help show this help message and exit
- --parser-type {sdlrpcv2}
-"""
-
-import os.path
-import argparse
-import errno
-import sys
-
-import generator.parsers.SDLRPCV1
-import generator.parsers.SDLRPCV2
-import generator.parsers.JSONRPC
-import generator.generators.SmartFactorySDLRPC
-import generator.generators.SmartFactoryJSONRPC
-
-from generator.parsers.RPCBase import ParseError
-from generator.generators.SmartFactoryBase import GenerateError
-
-SUPPORTED_FORMATS = {
- "sdlrpcv1": (generator.parsers.SDLRPCV1.Parser,
- generator.generators.SmartFactorySDLRPC.CodeGenerator),
- "sdlrpcv2": (generator.parsers.SDLRPCV2.Parser,
- generator.generators.SmartFactorySDLRPC.CodeGenerator),
- "jsonrpc": (generator.parsers.JSONRPC.Parser,
- generator.generators.SmartFactoryJSONRPC.CodeGenerator)
-}
-
-
-def _create_parser():
- """Create parser for parsing command-line arguments.
-
- Returns an instance of argparse.ArgumentParser
-
- """
-
- parser = argparse.ArgumentParser(
- description="SmartSchema interface generator"
- )
- parser.add_argument("source-xml")
- parser.add_argument("namespace")
- parser.add_argument("output-dir")
- parser.add_argument("--parser-type",
- choices=SUPPORTED_FORMATS.keys(),
- required=True)
- return parser
-
-
-def _handle_fatal_error(error):
- """Handle fatal error during parsing or code generation.
-
- Keyword arguments:
- error -- base exception to handle.
-
- """
-
- print(error.message)
- print
- sys.exit(errno.EINVAL)
-
-
-def main():
- """Main function of the generator that does actual work."""
-
- args = vars(_create_parser().parse_args())
-
- src_xml = args["source-xml"]
- src_xml_name = os.path.splitext(os.path.basename(src_xml))[0]
- namespace = args["namespace"]
- output_dir = args["output-dir"]
- parser_type = args["parser_type"]
-
- print("""
-Generating interface source code with following parameters:
- Source xml : {0}
- Namespace : {1}
- Output directory: {2}
- Parser type : {3}
-""".format(src_xml, namespace, output_dir, parser_type))
-
- # Select required parser and code generator
- parser = SUPPORTED_FORMATS[parser_type][0]()
- code_generator = SUPPORTED_FORMATS[parser_type][1]()
-
- # Convert incoming xml to internal model
- try:
- interface = parser.parse(args["source-xml"])
- except ParseError as error:
- _handle_fatal_error(error)
-
- # Generate SmartFactory source code from internal model
- try:
- code_generator.generate(interface,
- src_xml_name,
- namespace,
- output_dir)
- except GenerateError as error:
- _handle_fatal_error(error)
-
- print("Done.")
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/Model.py b/SDL_Core/tools/InterfaceGenerator/generator/Model.py
deleted file mode 100755
index 1e158c004..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/Model.py
+++ /dev/null
@@ -1,312 +0,0 @@
-"""Interface model.
-
-Interface model is represented by Interface class.
-Parser must provide an instance of this model as a result of parsing
-interface definition file.
-Generator must take an instance of this model as input for generating
-output files.
-"""
-
-# In this module there are classes that are used as data container
-# pylint: disable=R0903
-
-import collections
-
-
-class Boolean(object):
-
- """Boolean type."""
-
- pass
-
-
-class Integer(object):
-
- """Integer type.
-
- Instance variables:
- min_value -- minimum allowed value
- max_value -- maximum allowed value
-
- """
-
- def __init__(self, min_value=None, max_value=None):
- self.min_value = min_value
- self.max_value = max_value
-
-
-class Double(object):
-
- """Floating-point type.
-
- Instance variables:
- min_value -- minimum allowed value
- max_value -- maximum allowed value
-
- """
-
- def __init__(self, min_value=None, max_value=None):
- self.min_value = min_value
- self.max_value = max_value
-
-
-class String(object):
-
- """String type.
-
- Instance variables:
- min_length -- minimum string length
- max_length -- maximum string length
-
- """
-
- def __init__(self, min_length=None, max_length=None):
- self.min_length = min_length
- self.max_length = max_length
-
-
-class Array(object):
-
- """Array type.
-
- Instance variables:
- min_size -- minimum array size
- max_size -- maximum array size
- element_type -- type of array element
-
- """
-
- def __init__(self, min_size=None, max_size=None, element_type=None):
- self.min_size = min_size
- self.max_size = max_size
- self.element_type = element_type
-
-
-class Issue(object):
-
- """Issue.
-
- Instance variables:
- creator -- issue creator
- value -- issue text
-
- """
-
- def __init__(self, creator=None, value=None):
- self.creator = creator
- self.value = value
-
-
-class InterfaceItemBase(object):
-
- """Base class for interface item.
-
- Instance variables:
- name -- item name
- description -- list of string description elements
- design_description -- list of string design description elements
- issues -- list of issues
- todos -- list of string todo elements
- platform -- optional platform (string or None)
- scope -- optional scope: internal, partner or none (none by defaul, means public)
-
- """
-
- def __init__(self, name, description=None, design_description=None,
- issues=None, todos=None, platform=None, scope=None):
- self.name = name
- self.description = description if description is not None else []
- self.design_description = \
- design_description if design_description is not None else []
- self.issues = issues if issues is not None else []
- self.todos = todos if todos is not None else []
- self.platform = platform
- self.scope = scope
-
-
-class EnumElement(InterfaceItemBase):
-
- """Element of enumeration.
-
- Instance variables:
- internal_name -- internal name of an element must be used by a
- generator if it is provided (not None)
- value -- optional element value
-
- """
-
- def __init__(self, name, description=None, design_description=None,
- issues=None, todos=None, platform=None, internal_name=None,
- value=None):
- super(EnumElement, self).__init__(
- name, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform)
- self.internal_name = internal_name
- self.value = value
-
- @property
- def primary_name(self):
- """Primary name of the EnumElement.
-
- Return the 'internal_name' property if presented or 'name' property
- otherwise.
-
- """
- return self.name if self.internal_name is None else self.internal_name
-
-
-class Enum(InterfaceItemBase):
-
- """Enumeration.
-
- Instance variables:
- internal_scope -- optional internal scope
- elements -- enumeration elements
-
- """
-
- def __init__(self, name, description=None, design_description=None,
- issues=None, todos=None, platform=None, internal_scope=None,
- elements=None, scope=None):
- super(Enum, self).__init__(
- name, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform, scope=scope)
-
- self.internal_scope = internal_scope
- self.elements = \
- elements if elements is not None else collections.OrderedDict()
-
-
-class EnumSubset(InterfaceItemBase):
-
- """Enumeration subset.
-
- Instance variables:
- enum -- enumeration
- allowed_elements -- dictionary of elements of enumeration
- which are allowed in this subset
-
- """
-
- def __init__(self, name, enum, description=None, design_description=None,
- issues=None, todos=None, platform=None,
- allowed_elements=None):
- super(EnumSubset, self).__init__(
- name, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform)
-
- self.enum = enum
- self.allowed_elements = \
- allowed_elements if allowed_elements is not None else {}
-
-
-class Param(InterfaceItemBase):
-
- """Parameter.
-
- Instance variables:
- is_mandatory -- boolean value indicating whether
- this parameter is mandatory
- param_type -- parameter type
-
- """
-
- def __init__(self, name, param_type, description=None,
- design_description=None, issues=None, todos=None,
- platform=None, is_mandatory=True, scope=None):
- super(Param, self).__init__(
- name, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform, scope=scope)
-
- self.is_mandatory = is_mandatory
- self.param_type = param_type
-
-
-class FunctionParam(Param):
-
- """Function parameter.
-
- Instance variables:
- default_value -- optional default value of this parameter
-
- """
-
- def __init__(self, name, param_type, description=None,
- design_description=None, issues=None, todos=None,
- platform=None, is_mandatory=True, default_value=None, scope=None):
- super(FunctionParam, self).__init__(
- name, param_type=param_type, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform, is_mandatory=is_mandatory, scope=scope)
-
- self.default_value = default_value
-
-
-class Struct(InterfaceItemBase):
-
- """Structure.
-
- Instance variables:
- members -- dictionary of structure members (instances of Param class)
-
- """
-
- def __init__(self, name, description=None, design_description=None,
- issues=None, todos=None, platform=None, members=None, scope=None):
- super(Struct, self).__init__(
- name, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform, scope=scope)
-
- self.members = \
- members if members is not None else collections.OrderedDict()
-
-
-class Function(InterfaceItemBase):
-
- """Function.
-
- Instance variables:
- function_id -- function identifier (EnumElement from Enum "FunctionID")
- message_type -- message type (EnumElement from Enum "messageType")
- params -- function parameters
-
- """
-
- def __init__(self, name, function_id, message_type, description=None,
- design_description=None, issues=None, todos=None,
- platform=None, params=None, scope=None):
- super(Function, self).__init__(
- name, description=description,
- design_description=design_description, issues=issues, todos=todos,
- platform=platform, scope=scope)
-
- self.function_id = function_id
- self.message_type = message_type
- self.params = \
- params if params is not None else collections.OrderedDict()
-
-
-class Interface(object):
-
- """Interface.
-
- Instance variables:
- enums -- dictionary of enumerations
- structs -- dictionary of structures
- functions -- dictionary of functions
- params -- dictionary of interface parameters (name, version, etc.)
-
- """
-
- def __init__(self, enums=None, structs=None, functions=None, params=None):
- self.enums = enums if enums is not None else collections.OrderedDict()
- self.structs = \
- structs if structs is not None else collections.OrderedDict()
- self.functions = \
- functions if functions is not None else collections.OrderedDict()
- self.params = params if params is not None else {}
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/__init__.py b/SDL_Core/tools/InterfaceGenerator/generator/__init__.py
deleted file mode 100755
index 380e81d9a..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""Top-level application package.
-"""
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py b/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
deleted file mode 100755
index eff5b1d32..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
+++ /dev/null
@@ -1,1664 +0,0 @@
-"""SmartFactory code generator base.
-
-Base of code generator for SmartFactory that provides SmartSchema object in
-accordance with given internal model.
-
-"""
-# pylint: disable=W0402
-# pylint: disable=C0302
-import codecs
-import collections
-import os
-import string
-import uuid
-
-from generator import Model
-
-
-class GenerateError(Exception):
-
- """Generate error.
-
- This exception is raised when SmartFactory generator is unable to create
- output from given model.
-
- """
-
- pass
-
-
-class CodeGenerator(object):
-
- """Base SmartFactory generator.
-
- This class provides service which allows to generate pair of *.h and
- *.cc files by given interface model.
-
- """
-
- def __init__(self):
- """Construct new object."""
-
- self._generated_structs = []
- self._structs_add_code = u""
-
- def generate(self, interface, filename, namespace, destination_dir):
- """Generate SmartFactory source files.
-
- Generates source code files at destination directory in
- accordance with given model in specified namespace.
-
- Keyword arguments:
- interface -- model of the interface to generate source code for.
- filename -- name of initial XML file.
- namespace -- name of destination namespace.
- destination_dir -- directory to create source files.
-
- """
-
- namespace = unicode(namespace)
-
- if interface is None:
- raise GenerateError("Given interface is None.")
-
- self._generated_structs = []
- self._structs_add_code = ""
-
- if "messageType" in interface.enums:
- interface.enums["messageType"] = self._preprocess_message_type(
- interface.enums["messageType"])
-
- if not os.path.exists(destination_dir):
- os.makedirs(destination_dir)
-
- namespace_open = u""
- namespace_close = u""
-
- if namespace:
- parts = namespace.split(u"::")
- for part in parts:
- namespace_open = u"".join(
- [namespace_open,
- self._namespace_open_template.substitute(name=part)])
- namespace_close = u"".join(
- [namespace_close,
- "}} // {0}\n".format(part)])
-
- class_name = unicode(os.path.splitext(filename)[0])
- guard = u"__CSMARTFACTORY_{0}_{1}_H__".format(
- class_name.upper(),
- unicode(uuid.uuid1().hex.capitalize()))
- header_file_name = u"".join("{0}.h".format(class_name))
-
- with codecs.open(os.path.join(destination_dir, header_file_name),
- encoding="utf-8",
- mode="w") as f_h:
- f_h.write(self._h_file_tempalte.substitute(
- class_name=class_name,
- guard=guard,
- namespace_open=namespace_open,
- enums_content=self._gen_enums(
- interface.enums.values(),
- interface.structs.values()),
- namespace_close=namespace_close))
-
- self._gen_struct_schema_items(interface.structs.values())
-
- function_id_items = u""
- if "FunctionID" in interface.enums:
- function_id = interface.enums["FunctionID"]
- function_id_items = u"\n".join(
- [self._impl_code_loc_decl_enum_insert_template.substitute(
- var_name="function_id_items",
- enum=function_id.name,
- value=x.primary_name)
- for x in function_id.elements.values()])
-
- message_type_items = u""
- if "messageType" in interface.enums:
- message_type = interface.enums["messageType"]
- message_type_items = u"\n".join(
- [self._impl_code_loc_decl_enum_insert_template.substitute(
- var_name="message_type_items",
- enum=message_type.name,
- value=x.primary_name)
- for x in message_type.elements.values()])
-
- header_file_name = "".join("{0}_schema.h".format(class_name))
- guard = u"__CSMARTFACTORY_{0}_{1}_HPP__".format(
- class_name.upper(),
- unicode(uuid.uuid1().hex.capitalize()))
- with codecs.open(os.path.join(destination_dir, header_file_name),
- encoding="utf-8",
- mode="w") as f_h:
- f_h.write(self._hpp_schema_file_tempalte.substitute(
- class_name=class_name,
- guard=guard,
- header_file_name=unicode("".join("{0}.h".format(class_name))),
- namespace_open=namespace_open,
- class_content=self._gen_h_class(
- class_name,
- interface.params,
- interface.functions.values(),
- interface.structs.values()),
- namespace_close=namespace_close))
-
- with codecs.open(os.path.join(destination_dir,
- u"".join("{0}_schema.cc".format(class_name))),
- encoding="utf-8", mode="w") as f_s:
- f_s.write(self._cc_file_template.substitute(
- header_file_name=unicode(header_file_name),
- namespace=namespace,
- class_name=class_name,
- function_id_items=self._indent_code(function_id_items, 1),
- message_type_items=self._indent_code(message_type_items, 1),
- struct_schema_items=self._structs_add_code,
- pre_function_schemas=self._gen_pre_function_schemas(
- interface.functions.values()),
- function_schemas=self._gen_function_schemas(
- interface.functions.values()),
- init_function_impls=self._gen_function_impls(
- interface.functions.values(),
- namespace,
- class_name),
- init_structs_impls=self._gen_sturct_impls(
- interface.structs.values(),
- namespace,
- class_name),
- enum_string_coversions=self._gen_enum_to_str_converters(
- interface.enums.values(),
- namespace)))
-
- def _preprocess_message_type(self, message_type):
- """Preprocess message_type enum.
-
- In base class this method is unimplemented and will cause runtime
- exception. This method must be overridden by the subclasses to
- return message_type enum after preprocessing.
-
- Keyword arguments:
- message_type -- message_type enum to preprocess.
-
- """
-
- raise GenerateError("Unexpected call to the unimplemented function.")
-
- def _gen_enum_to_str_converters(self, enums, namespace):
- """Generate enum to string converters.
-
- Generates part of source code with specific enum to string value
- converting functions.
-
- Keyword arguments:
- enums -- list of enums to generate string converting functions.
- namespace -- namespace to address enums.
-
- Returns:
- String value with enum to string converting functions.
-
- """
-
- if enums is None:
- raise GenerateError("Enums is None")
-
- return u"\n".join([self._enum_to_str_converter_template.substitute(
- namespace=namespace,
- enum=x.name,
- mapping=self._indent_code(self._gen_enum_to_str_mapping(
- x, namespace), 2)) for x in enums])
-
- def _gen_enum_to_str_mapping(self, enum, namespace):
- """Generate enum to string mapping code.
-
- Generates part of source code with specific enum to string value
- mapping.
-
- Keyword arguments:
- enums -- enum to generate string mapping.
- namespace -- namespace to address enum.
-
- Returns:
- String value with enum to string mapping source code.
-
- """
-
- return u"\n".join([self._enum_to_str_mapping_template.substitute(
- namespace=namespace,
- enum_name=enum.name,
- enum_value=x.primary_name,
- string=x.name) for x in enum.elements.values()])
-
- def _gen_h_class(self, class_name, params, functions, structs):
- """Generate source code of class for header file.
-
- Generates source code of class that should be used in the
- header file.
-
- Keyword arguments:
- class_name -- name of the class to generate.
- params -- class parameters.
- functions -- list of functions to generate methods for.
- structs -- structures to generate methods for.
-
- Returns:
- String with complete *.h file source code.
-
- """
-
- return self._class_h_template.substitute(
- comment=self._gen_class_comment(class_name, params),
- class_name=class_name,
- init_function_decls=self._gen_function_decls(functions),
- init_struct_decls=self._gen_structs_decls(structs))
-
- def _gen_structs_decls(self, structs):
- """Generate method prototypes for structs for header file.
-
- Generates method prototypes for structs that should be used in the
- header file.
-
- Keyword arguments:
- structs -- list of structs to generate methods for.
-
- Returns:
- String with structs init methods declarations source code.
-
- """
-
- if structs is None:
- raise GenerateError("Structs is None")
-
- return u"\n".join([self._indent_code(
- self._gen_struct_decl(x), 1) for x in structs])
-
- def _gen_struct_decl(self, struct):
- """Generate method prototype for struct for header file.
-
- Generates method prototype for struct that should be used in the
- header file.
-
- Keyword arguments:
- struct -- struct to generate method for.
-
- Returns:
- String with struct inin method declaration source code.
-
- """
-
- return self._struct_decl_template.substitute(
- comment=self._gen_comment(struct),
- struct_name=struct.name)
-
- def _gen_function_decls(self, functions):
- """Generate method prototypes for functions for header file.
-
- Generates method prototypes for functions that should be used in the
- header file.
-
- Keyword arguments:
- functions -- list of functions to generate methods for.
-
- Returns:
- String with function init methods declarations source code.
-
- """
-
- if functions is None:
- raise GenerateError("Functions is None")
-
- return u"\n".join([self._indent_code(
- self._gen_function_decl(x), 1) for x in functions])
-
- def _gen_function_decl(self, function):
- """Generate method prototype for function for header file.
-
- Generates method prototype for function that should be used in the
- header file.
-
- Keyword arguments:
- function -- function to generate method for.
-
- Returns:
- String with function declaration source code.
-
- """
-
- return self._function_decl_template.substitute(
- comment=self._gen_comment(function),
- function_id=function.function_id.primary_name,
- message_type=function.message_type.primary_name)
-
- def _gen_struct_schema_items(self, structs):
- """Generate struct schema items initialization code for source file.
-
- Generates struct schema items initialization code that should be used
- in the source file.
-
- Keyword arguments:
- structs -- list of structs to generate code for.
-
- Returns:
- String with struct schema items initialization source code.
-
- """
-
- if structs is None:
- raise GenerateError("Structs is None")
-
- for struct in structs:
- self._process_struct(struct)
-
- def _process_struct(self, struct):
- """Process struct recursively to provide correct initialization.
-
- This method create source code for cc file that guarantees that
- structures are initialized in right order (to resolve all
- dependencies).
-
- Keyword arguments:
- struct -- struct to process.
-
- """
-
- if struct.name in self._generated_structs:
- return
-
- for member in struct.members.values():
- self._process_struct_member(member)
-
- self._structs_add_code = u"\n".join(
- [self._structs_add_code, self._indent_code(
- self._gen_struct_schema_item(struct), 1)])
- self._generated_structs.append(struct.name)
-
- def _process_struct_member(self, member):
- """Process struct member recursively to provide correct initialization.
-
- This method ensures that nested structs (if any) are generated.
-
- Keyword arguments:
- member -- struct member to process.
-
- """
-
- if type(member.param_type) is Model.Struct:
- self._ensure_struct_generated(member.param_type)
-
- def _ensure_struct_generated(self, struct):
- """Ensure that struct is already generated.
-
- If struct is already created this method returns otherwise it
- runs generation of struct to resolve dependency.
-
- Keyword arguments:
- struct -- struct to ensure existence.
-
- """
-
- if struct.name in self._generated_structs:
- return
-
- self._process_struct(struct)
-
- def _gen_struct_schema_item(self, struct):
- """Generate struct schema item initialization code for source file.
-
- Generates struct schema item initialization code that should be used
- in the source file.
-
- Keyword arguments:
- struct -- struct to generate code for.
-
- Returns:
- String with struct schema item initialization source code.
-
- """
-
- return self._struct_schema_item_template.substitute(name=struct.name)
-
- def _gen_pre_function_schemas(self, functions):
- """Generate specific code that goes before schema initialization.
-
- In base class this function is unimplemented and it will raise an
- runtime exception. Subclasses must implement this function in order
- to provide format-specific code that goes before schema initialization.
-
- Keyword arguments:
- functions -- list of functions to generate code for.
-
- """
-
- raise GenerateError("Unexpected call to the unimplemented function.")
-
- def _gen_function_schemas(self, functions):
- """Generate functions initialization code for source file.
-
- Generates functions schema initialization code that should be used
- in the source file.
-
- Keyword arguments:
- functions -- list of functions to generate code for.
-
- Returns:
- String with functions schema initialization source code.
-
- """
-
- if functions is None:
- raise GenerateError("Functions is None")
-
- return u"".join([self._indent_code(
- self._gen_function_schema(x), 1)
- for x in functions])
-
- def _gen_function_schema(self, function):
- """Generate function initialization code for source file.
-
- Generates function schema initialization code that should be used
- in the source file.
-
- Keyword arguments:
- function -- function to generate method for.
-
- Returns:
- String with function schema initialization source code.
-
- """
-
- return self._function_schema_template.substitute(
- function_id=function.function_id.primary_name,
- message_type=function.message_type.primary_name)
-
- def _gen_sturct_impls(self, structs, namespace, class_name):
- """Generate structs implementation for source file.
-
- Generates implementation code of methods that provide schema items for
- structs. This code should be used in the source file.
-
- Keyword arguments:
- structs -- list of structs to generate methods for.
- namespace -- name of destination namespace.
- class_name -- name of the parent class.
-
- Returns:
- String with structs implementation source code.
-
- """
-
- if structs is None:
- raise GenerateError("Structs is None")
-
- return u"\n".join([self._gen_struct_impl(
- x, namespace, class_name) for x in structs])
-
- def _gen_struct_impl(self, struct, namespace, class_name):
- """Generate struct implementation for source file.
-
- Generates implementation code of method that provide schema item for
- struct. This code should be used in the source file.
-
- Keyword arguments:
- struct -- struct to generate method for.
- namespace -- name of destination namespace.
- class_name -- name of the parent class.
-
- Returns:
- String with structs implementation source code.
-
- """
-
- processed_enums = []
- return self._struct_impl_template.substitute(
- namespace=namespace,
- class_name=class_name,
- struct_name=struct.name,
- code=self._indent_code(
- self._struct_impl_code_tempate.substitute(
- schema_loc_decl=self._gen_schema_loc_decls(
- struct.members.values(), processed_enums),
- schema_items_decl=self._gen_schema_items_decls(
- struct.members.values()),
- schema_item_fill=self._gen_schema_items_fill(
- struct.members.values())),
- 1))
-
- def _gen_schema_loc_decls(self, members, processed_enums):
- """Generate local declarations of variables for schema.
-
- This method generates full set of required variables for
- enums and enum subsets.
-
- Keyword arguments:
- members -- struct/function members/params.
- processed_enums -- list of already processed enums.
-
- Returns:
- String with local declarations source code.
-
- """
-
- result = u""
- for member in members:
- if type(member.param_type) is Model.Enum and \
- member.param_type.name not in processed_enums:
- local_var = self._gen_schema_loc_emum_var_name(
- member.param_type)
- result = u"\n".join(
- [u"".join(
- [result, self._impl_code_loc_decl_enum_template.
- substitute(
- type=member.param_type.name,
- var_name=local_var)]),
- u"\n".join(
- [self._impl_code_loc_decl_enum_insert_template.
- substitute(
- var_name=local_var,
- enum=member.param_type.name,
- value=x.primary_name)
- for x in member.param_type.elements.values()])])
- processed_enums.append(member.param_type.name)
- result = u"".join([result, u"\n\n"]) if result else u""
- elif type(member.param_type) is Model.EnumSubset:
- local_var = self._gen_schema_loc_emum_s_var_name(member.name)
- result = u"\n".join(
- [u"".join(
- [result, self._impl_code_loc_decl_enum_template.
- substitute(
- type=member.param_type.enum.name,
- var_name=local_var)]),
- u"\n".join(
- [self._impl_code_loc_decl_enum_insert_template.
- substitute(
- var_name=local_var,
- enum=member.param_type.enum.name,
- value=x.primary_name)
- for x in member.param_type.
- allowed_elements.values()])])
- result = u"".join([result, u"\n\n"]) if result else u""
- elif type(member.param_type) is Model.Array:
- result = u"".join(
- [result, self._gen_schema_loc_decls(
- [Model.Param(name=member.param_type.element_type.name
- if type(member.param_type.element_type) is
- Model.EnumSubset else "",
- param_type=member.param_type.element_type)],
- processed_enums)])
-
- return result
-
- def _gen_schema_items_decls(self, members):
- """Generate schema items declarations.
-
- Generates declaration and initialization of schema items
- which is uses as struct members/function parameters.
-
- Keyword arguments:
- members -- list of struct members/function parameters.
-
- Returns:
- String with schema items declaration source code.
-
- """
-
- result = u"\n\n".join(
- [self._gen_schema_item_decl(x) for x in members])
-
- return u"".join([result, u"\n\n"]) if result else u""
-
- def _gen_schema_item_decl(self, member):
- """Generate schema item declaration.
-
- Generates declaration and initialization of schema item
- which is uses as struct member/function parameter.
-
- Keyword arguments:
- member -- struct member/function parameter.
-
- Returns:
- String with schema item declaration source code.
-
- """
-
- return self._impl_code_item_decl_temlate.substitute(
- comment=self._gen_comment(member, False),
- var_name=self._gen_schema_item_var_name(member),
- item_decl=self._gen_schema_item_decl_code(
- member.param_type,
- member.name,
- member.default_value if type(member)
- is Model.FunctionParam else None))
-
- def _gen_schema_item_decl_code(self, param, member_name, default_value):
-
- """Generate schema item initialization code.
-
- Generates type-specific code that initializes schema item
-
- Keyword arguments:
- param -- value of parameter type.
- mamber_name -- name of struct member/function parameter.
- default_value -- default value (used only for function parameters).
-
- Returns:
- String with schema item initialization source code.
-
- """
-
- code = u""
- if type(param) is Model.Boolean:
- code = self._impl_code_bool_item_template.substitute(
- params=self._gen_schema_item_param_values(
- [[u"bool", None if default_value is None
- else u"true" if default_value is True else u"false"]]))
- elif type(param) is Model.Integer:
- code = self._impl_code_integer_item_template.substitute(
- type=u"int",
- params=self._gen_schema_item_param_values(
- [[u"int", param.min_value],
- [u"int", param.max_value],
- [u"int", default_value]]))
- elif type(param) is Model.Double:
- code = self._impl_code_integer_item_template.substitute(
- type=u"double",
- params=self._gen_schema_item_param_values(
- [[u"double", param.min_value],
- [u"double", param.max_value],
- [u"double", default_value]]))
- elif type(param) is Model.String:
- code = self._impl_code_string_item_template.substitute(
- params=self._gen_schema_item_param_values(
- [[u"size_t", param.min_length],
- [u"size_t", param.max_length],
- [u"std::string", u"".join(
- [u'"', default_value, u'"']) if default_value
- is not None else u""]]))
- elif type(param) is Model.Array:
- code = self._impl_code_array_item_template.substitute(
- params=u"".join(
- [u"".join(
- [self._gen_schema_item_decl_code(
- param.element_type,
- param.element_type.name if type(param.element_type)
- is Model.EnumSubset else u"",
- None),
- u", "]),
- self._gen_schema_item_param_values(
- [[u"size_t", param.min_size],
- [u"size_t", param.max_size]])]))
- elif type(param) is Model.Struct:
- code = self._impl_code_struct_item_template.substitute(
- name=param.name)
- elif type(param) is Model.Enum:
- code = self._impl_code_enum_item_template.substitute(
- type=param.name,
- params=u"".join(
- [self._gen_schema_loc_emum_var_name(param),
- u", ",
- self._gen_schema_item_param_values(
- [[u"".join([param.name, u"::eType"]),
- u"".join([param.name, u"::",
- default_value.primary_name]) if
- default_value is not None else None]])]))
- elif type(param) is Model.EnumSubset:
- code = self._impl_code_enum_item_template.substitute(
- type=param.enum.name,
- params=u"".join(
- [self._gen_schema_loc_emum_s_var_name(member_name),
- u", ",
- self._gen_schema_item_param_values(
- [[u"".join([param.enum.name, u"::eType"]),
- default_value.primary_name if default_value
- is not None else None]])]))
- else:
- raise GenerateError("Unexpected type of parameter: " +
- str(type(param)))
- return code
-
- def _gen_schema_item_param_values(self, params):
- """Generate values of schema item initialization parameters.
-
- Generates part of code which is used as schema item initialization
- parameters.
-
- Keyword arguments:
- params -- list of tuples which maps parameter type to parameter value.
-
- Returns:
- String with schema item initialization parameters source code.
-
- """
-
- result = u""
- for param in params:
- value = self._impl_code_item_param_value_template.substitute(
- type=param[0],
- value=str(param[1] if param[1] is not None else ""))
- result = u"".join([result, u"".join(
- [u", ", value])
- if result else value])
-
- return result
-
- def _gen_schema_items_fill(self, members):
- """Generate schema items fill code.
-
- Generates source code that fills new schema with items.
-
- Keyword arguments:
- members -- list of struct members/function parameters to process.
-
- Returns:
- String with function schema items fill code.
-
- """
-
- result = u"\n".join(
- [self._gen_schema_item_fill(x) for x in members])
-
- return u"".join([result, u"\n\n"]) if result else u""
-
- def _gen_schema_params_fill(self, message_type_name):
- """Generate schema params fill code.
-
- In the base class this method is not implemented (raises exception).
- This method must be implemented by the subclasses to specify format
- specific PARAMS for the function.
-
- Keyword arguments:
- message_type_name -- Name of the messageType enum element.
-
- Returns:
- String with function schema params fill code.
-
- """
-
- raise GenerateError("Unexpected call to the unimplemented function.")
-
- def _gen_schema_item_fill(self, member):
- """Generate schema item fill code.
-
- Generates source code that fills new schema with item.
-
- Keyword arguments:
- member -- struct member/function parameter to process.
-
- Returns:
- String with schema item fill code.
-
- """
-
- return self._impl_code_item_fill_template.substitute(
- name=member.name,
- var_name=self._gen_schema_item_var_name(member),
- is_mandatory=u"true" if member.is_mandatory is True else u"false")
-
- @staticmethod
- def _gen_schema_item_var_name(member):
- """Generate schema item variable name.
-
- Generates variable name for local declarations.
-
- Keyword arguments:
- member -- struct member/function parameter to process.
-
- Returns:
- String with schema item variable name.
-
- """
-
- return u"".join([member.name, u"_SchemaItem"])
-
- @staticmethod
- def _gen_schema_loc_emum_var_name(param_type):
- """Generate name of enum local variable.
-
- Generates name of local variable that defines allowed enum elements.
-
- Keyword arguments:
- param_type -- parameter type object.
-
- Returns:
- String with name of enum local variable.
-
- """
-
- return u"".join([param_type.name, u"_all_enum_values"])
-
- @staticmethod
- def _gen_schema_loc_emum_s_var_name(member_name):
- """Generate name of enum subset local variable.
-
- Generates name of local variable that defines allowed enum
- subset elements.
-
- Keyword arguments:
- param_type -- parameter type object.
-
- Returns:
- String with name of enum subset local variable.
-
- """
-
- return u"".join([member_name, "_allowed_enum_subset_values"])
-
- def _gen_function_impls(self, functions, namespace, class_name):
- """Generate functions implementation for source file.
-
- Generates implementation code of methods that provide schema for
- functions. This code should be used in the source file.
-
- Keyword arguments:
- functions -- list of functions to generate methods for.
- namespace -- name of destination namespace.
- class_name -- name of the parent class.
-
- Returns:
- String with functions implementation source code.
-
- """
-
- if functions is None:
- raise GenerateError("Functions is None")
-
- return u"\n".join([self._gen_function_impl(
- x, namespace, class_name) for x in functions])
-
- def _gen_function_impl(self, function, namespace, class_name):
- """Generate function implementation for source file.
-
- Generates implementation code of method that provides schema for
- function. This code should be used in the source file.
-
- Keyword arguments:
- function -- function to generate method for.
- namespace -- name of destination namespace.
- class_name -- name of the parent class.
-
- Returns:
- String with function implementation source code.
-
- """
-
- processed_enums = []
- return self._function_impl_template.substitute(
- namespace=namespace,
- class_name=class_name,
- function_id=function.function_id.primary_name,
- message_type=function.message_type.primary_name,
- code=self._indent_code(
- self._function_impl_code_tempate.substitute(
- schema_loc_decl=self._gen_schema_loc_decls(
- function.params.values(), processed_enums),
- schema_items_decl=self._gen_schema_items_decls(
- function.params.values()),
- schema_item_fill=self._gen_schema_items_fill(
- function.params.values()),
- schema_params_fill=self._gen_schema_params_fill(
- function.message_type.name)),
- 1))
-
- def _gen_enums(self, enums, structs):
- """Generate enums for header file.
-
- Generates declaration of enumerations for the header file.
-
- Keyword arguments:
- enums -- list of enums to generate.
-
- Returns:
- String with enums declaration source code.
-
- """
-
- if enums is None:
- raise GenerateError("Enums is None")
-
- if structs is None:
- raise GenerateError("Structs is None")
-
- if structs:
- struct_id_enum_elements = collections.OrderedDict()
- for struct in structs:
- struct_id_enum_elements[struct.name] = Model.EnumElement(
- name=struct.name)
- return u"\n".join(
- [self._gen_enum(
- Model.Enum(name="StructIdentifiers",
- elements=struct_id_enum_elements)),
- u"\n".join([self._gen_enum(x) for x in enums])])
-
- return u"\n".join([self._gen_enum(x) for x in enums])
-
- def _gen_enum(self, enum):
- """Generate enum for header file.
-
- Generates declaration of enumeration for the header file.
-
- Keyword arguments:
- enum -- enum to generate.
-
- Returns:
- String with enum declaration source code.
-
- """
-
- enum_elements = enum.elements.values()
- enum_elements.insert(0, Model.EnumElement(
- name=u"INVALID_ENUM",
- description=None,
- design_description=None,
- issues=None,
- todos=None,
- platform=None,
- internal_name=None,
- value=u"-1"))
- return self._enum_template.substitute(
- comment=self._gen_comment(enum),
- name=enum.name,
- enum_items=self._indent_code(self._gen_enum_elements(
- enum_elements), 1))
-
- def _gen_enum_elements(self, enum_elements):
- """Generate enum elements for header file.
-
- Generates declaration of enumeration elements for the header file.
-
- Keyword arguments:
- enum_elements -- list of enum elements to generate.
-
- Returns:
- String with enum elements declaration source code.
-
- """
-
- return u",\n\n".join([self._gen_enum_element(x)
- for x in enum_elements])
-
- def _gen_enum_element(self, enum_element):
- """Generate enum element for header file.
-
- Generates declaration of enumeration element for the header file.
-
- Keyword arguments:
- enum_element -- enum element to generate.
-
- Returns:
- String with enum element declaration source code.
-
- """
-
- if enum_element.value is not None:
- return self._enum_element_with_value_template.substitute(
- comment=self._gen_comment(enum_element),
- name=enum_element.primary_name,
- value=enum_element.value)
- else:
- return self._enum_element_with_no_value_template.substitute(
- comment=self._gen_comment(enum_element),
- name=enum_element.primary_name)
-
- def _gen_class_comment(self, class_name, params):
- """Generate doxygen comment to the class for header file.
-
- Generates doxygen comment for the class that should be used in
- the header file.
-
- Keyword arguments:
- class_name -- name of the class.
- params -- class parameters.
-
- Returns:
- String with generated doxygen class comment.
-
- """
-
- return self._class_comment_template.substitute(
- class_name=class_name,
- class_params=u"".join(
- [u" * {0} - {1}\n".format(x[0],
- x[1]) for x in params.items()])
- if params else u" * none\n")
-
- def _gen_comment(self, interface_item_base, use_doxygen=True):
- """Generate doxygen comment for iterface_item_base for header file.
-
- Generates doxygen comment for any iterface_item_base for the header
- file.
-
- Keyword arguments:
- interface_item_base -- object to generate doxygen comment for.
- use_doxygen -- Flag that indicates does function uses doxygen or not.
-
- Returns:
- String with generated doxygen comment.
-
- """
-
- brief_type_title = None
- interface_item_base_classname = interface_item_base.__class__.__name__
- if interface_item_base_classname in self._model_types_briefs:
- brief_type_title = \
- self._model_types_briefs[interface_item_base_classname]
- else:
- raise GenerateError("Unable to create comment for unknown type " +
- interface_item_base_classname)
-
- name = interface_item_base.primary_name if \
- type(interface_item_base) is Model.EnumElement else \
- interface_item_base.name
- brief_description = (u" * @brief {0}{1}.\n" if use_doxygen is
- True else u"// {0}{1}.\n").format(
- brief_type_title,
- name)
-
- description = u"".join([(u" * {0}\n" if use_doxygen
- is True else u"// {0}\n").format(x)
- for x in self._normalize_multiline_comments(
- interface_item_base.description)])
- if description is not u"":
- description = u"".join([u" *\n" if use_doxygen
- is True else u"//\n", description])
-
- design_description = u"".join([(u" * {0}\n" if use_doxygen is
- True else u"// {0}\n").format(x)
- for x in
- self._normalize_multiline_comments(
- interface_item_base.
- design_description)])
- if design_description is not u"":
- design_description = u"".join([u" *\n" if use_doxygen is
- True else "//\n",
- design_description])
-
- issues = u"".join([(u" * @note {0}\n" if use_doxygen is
- True else u"// Note: {0}\n").format(x)
- for x in self._normalize_multiline_comments(
- [x.value for x in interface_item_base.issues])])
- if issues is not u"":
- issues = u"".join([u" *\n" if use_doxygen is
- True else u"//\n", issues])
-
- todos = u"".join([(u" * @todo {0}\n" if use_doxygen is
- True else u"// ToDo: {0}\n").format(x)
- for x in self._normalize_multiline_comments(
- interface_item_base.todos)])
- if todos is not u"":
- todos = u"".join([u" *\n" if use_doxygen is
- True else u"//\n", todos])
-
- returns = u""
- if type(interface_item_base) is Model.Function:
- returns = u"".join([u" *\n", self._function_return_comment])
-
- template = self._comment_doxygen_template if use_doxygen is \
- True else self._comment_cc_template
-
- return template.substitute(
- brief_description=brief_description,
- description=description,
- design_description=design_description,
- issues=issues,
- todos=todos,
- returns=returns)
-
- def _indent_code(self, code, indent_level):
- """Indent given source code.
-
- Indents given source code right by given indentation level.
-
- Keyword arguments:
- code -- given source code.
- indent_level -- desired indentation level.
-
- Returns:
- String with processed code.
-
- """
-
- code_lines = code.split("\n")
- return u"".join(
- [u"{0}{1}\n".format(
- self._indent_template * indent_level,
- x) if x is not u"" else u"\n" for x in code_lines])
-
- @staticmethod
- def _normalize_multiline_comments(initial_strings):
- """Normalize multiline comments.
-
- Makes multiline comment clean of any line breaks creating additional
- strings for the comment.
-
- Keyword arguments:
- initial_strings -- initial list of strings to process.
-
- Returns:
- New list of the strings (with contains no strings with line breaks).
-
- """
-
- result = []
- for initial_string in initial_strings:
- result = result + initial_string.splitlines()
- return result
-
- _model_types_briefs = dict(
- {u"EnumElement": u"",
- u"Enum": u"Enumeration ",
- u"Function": u"Method that generates schema for function ",
- u"Struct": u"Method that generates schema item for structure ",
- u"Param": u"Struct member ",
- u"FunctionParam": u"Function parameter "})
-
- _h_file_tempalte = string.Template(
- u'''/**\n'''
- u''' * @file ${class_name}.h\n'''
- u''' * @brief Generated class ${class_name} header file.\n'''
- u''' *\n'''
- u''' * This class is a part of SmartObjects solution. It provides\n'''
- u''' * factory functionallity which allows client to use '''
- u'''SmartSchemas\n'''
- u''' * in accordance with definitions from ${class_name}.xml file\n'''
- u''' */\n'''
- u'''// Copyright (c) 2013, Ford Motor Company\n'''
- u'''// All rights reserved.\n'''
- u'''//\n'''
- u'''// Redistribution and use in source and binary forms, '''
- u'''with or without\n'''
- u'''// modification, are permitted provided that the following '''
- u'''conditions are met:\n'''
- u'''//\n'''
- u'''// Redistributions of source code must retain the above '''
- u'''copyright notice, this\n'''
- u'''// list of conditions and the following disclaimer.\n'''
- u'''//\n'''
- u'''// Redistributions in binary form must reproduce '''
- u'''the above copyright notice,\n'''
- u'''// this list of conditions and the following\n'''
- u'''// disclaimer in the documentation and/or other materials '''
- u'''provided with the\n'''
- u'''// distribution.\n'''
- u'''//\n'''
- u'''// Neither the name of the Ford Motor Company nor the names '''
- u'''of its contributors\n'''
- u'''// may be used to endorse or promote products derived '''
- u'''from this software\n'''
- u'''// without specific prior written permission.\n'''
- u'''//\n'''
- u'''// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND '''
- u'''CONTRIBUTORS "AS IS"\n'''
- u'''// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT '''
- u'''LIMITED TO, THE\n'''
- u'''// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR '''
- u'''A PARTICULAR PURPOSE\n'''
- u'''// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER '''
- u'''OR CONTRIBUTORS BE\n'''
- u'''// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, '''
- u'''EXEMPLARY, OR\n'''
- u'''// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, '''
- u'''PROCUREMENT OF\n'''
- u'''// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; '''
- u'''OR BUSINESS\n'''
- u'''// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, '''
- u'''WHETHER IN\n'''
- u'''// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE '''
- u'''OR OTHERWISE)\n'''
- u'''// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF '''
- u'''ADVISED OF THE\n'''
- u'''// POSSIBILITY OF SUCH DAMAGE.\n\n'''
- u'''#ifndef $guard\n'''
- u'''#define $guard\n'''
- u'''\n'''
- u'''$namespace_open'''
- u'''$enums_content'''
- u'''$namespace_close'''
- u'''#endif //$guard\n'''
- u'''\n\n''')
-
- _hpp_schema_file_tempalte = string.Template(
- u'''/**\n'''
- u''' * @file ${class_name}.hpp\n'''
- u''' * @brief Generated class ${class_name} header file.\n'''
- u''' *\n'''
- u''' * This class is a part of SmartObjects solution. It provides\n'''
- u''' * factory functionallity which allows client to use '''
- u'''SmartSchemas\n'''
- u''' * in accordance with definitions from ${class_name}.xml file\n'''
- u''' */\n'''
- u'''// Copyright (c) 2013, Ford Motor Company\n'''
- u'''// All rights reserved.\n'''
- u'''//\n'''
- u'''// Redistribution and use in source and binary forms, '''
- u'''with or without\n'''
- u'''// modification, are permitted provided that the following '''
- u'''conditions are met:\n'''
- u'''//\n'''
- u'''// Redistributions of source code must retain the above '''
- u'''copyright notice, this\n'''
- u'''// list of conditions and the following disclaimer.\n'''
- u'''//\n'''
- u'''// Redistributions in binary form must reproduce '''
- u'''the above copyright notice,\n'''
- u'''// this list of conditions and the following\n'''
- u'''// disclaimer in the documentation and/or other materials '''
- u'''provided with the\n'''
- u'''// distribution.\n'''
- u'''//\n'''
- u'''// Neither the name of the Ford Motor Company nor the names '''
- u'''of its contributors\n'''
- u'''// may be used to endorse or promote products derived '''
- u'''from this software\n'''
- u'''// without specific prior written permission.\n'''
- u'''//\n'''
- u'''// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND '''
- u'''CONTRIBUTORS "AS IS"\n'''
- u'''// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT '''
- u'''LIMITED TO, THE\n'''
- u'''// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR '''
- u'''A PARTICULAR PURPOSE\n'''
- u'''// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER '''
- u'''OR CONTRIBUTORS BE\n'''
- u'''// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, '''
- u'''EXEMPLARY, OR\n'''
- u'''// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, '''
- u'''PROCUREMENT OF\n'''
- u'''// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; '''
- u'''OR BUSINESS\n'''
- u'''// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, '''
- u'''WHETHER IN\n'''
- u'''// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE '''
- u'''OR OTHERWISE)\n'''
- u'''// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF '''
- u'''ADVISED OF THE\n'''
- u'''// POSSIBILITY OF SUCH DAMAGE.\n\n'''
- u'''#ifndef $guard\n'''
- u'''#define $guard\n'''
- u'''\n'''
- u'''#include "formatters/CSmartFactory.hpp"\n'''
- u'''#include "smart_objects/smart_schema.h"\n'''
- u'''#include "smart_objects/schema_item.h"\n'''
- u'''#include "utils/shared_ptr.h"\n'''
- u'''#include "$header_file_name"\n'''
- u'''\n'''
- u'''$namespace_open'''
- u'''\n\n'''
- u'''$class_content'''
- u'''\n\n'''
- u'''$namespace_close'''
- u'''\n'''
- u'''#endif //$guard\n'''
- u'''\n''')
-
- _namespace_open_template = string.Template(
- u'''namespace $name {\n''')
-
- _cc_file_template = string.Template(
- u'''/**\n'''
- u''' * @file ${class_name}.cc\n'''
- u''' * @brief Generated class ${class_name} source file.\n'''
- u''' *\n'''
- u''' * This class is a part of SmartObjects solution. It provides\n'''
- u''' * factory functionallity which allows client to use '''
- u'''SmartSchemas\n'''
- u''' * in accordance with definitions from ${class_name}.xml file\n'''
- u''' */\n'''
- u'''// Copyright (c) 2013, Ford Motor Company\n'''
- u'''// All rights reserved.\n'''
- u'''//\n'''
- u'''// Redistribution and use in source and binary forms, '''
- u'''with or without\n'''
- u'''// modification, are permitted provided that the following '''
- u'''conditions are met:\n'''
- u'''//\n'''
- u'''// Redistributions of source code must retain the above '''
- u'''copyright notice, this\n'''
- u'''// list of conditions and the following disclaimer.\n'''
- u'''//\n'''
- u'''// Redistributions in binary form must reproduce '''
- u'''the above copyright notice,\n'''
- u'''// this list of conditions and the following\n'''
- u'''// disclaimer in the documentation and/or other materials '''
- u'''provided with the\n'''
- u'''// distribution.\n'''
- u'''//\n'''
- u'''// Neither the name of the Ford Motor Company nor the names '''
- u'''of its contributors\n'''
- u'''// may be used to endorse or promote products derived '''
- u'''from this software\n'''
- u'''// without specific prior written permission.\n'''
- u'''//\n'''
- u'''// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND '''
- u'''CONTRIBUTORS "AS IS"\n'''
- u'''// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT '''
- u'''LIMITED TO, THE\n'''
- u'''// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR '''
- u''''A PARTICULAR PURPOSE\n'''
- u'''// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER '''
- u'''OR CONTRIBUTORS BE\n'''
- u'''// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, '''
- u'''EXEMPLARY, OR\n'''
- u'''// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, '''
- u'''PROCUREMENT OF\n'''
- u'''// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; '''
- u'''OR BUSINESS\n'''
- u'''// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, '''
- u'''WHETHER IN\n'''
- u'''// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE '''
- u'''OR OTHERWISE)\n'''
- u'''// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF '''
- u'''ADVISED OF THE\n'''
- u'''// POSSIBILITY OF SUCH DAMAGE.\n\n'''
- u'''#include <map>\n'''
- u'''#include <set>\n'''
- u'''\n'''
- u'''#include "$header_file_name"\n'''
- u'''#include "smart_objects/always_true_schema_item.h"\n'''
- u'''#include "smart_objects/always_false_schema_item.h"\n'''
- u'''#include "smart_objects/array_schema_item.h"\n'''
- u'''#include "smart_objects/bool_schema_item.h"\n'''
- u'''#include "smart_objects/object_schema_item.h"\n'''
- u'''#include "smart_objects/string_schema_item.h"\n'''
- u'''#include "smart_objects/enum_schema_item.h"\n'''
- u'''#include "smart_objects/number_schema_item.h"\n'''
- u'''#include "smart_objects/schema_item_parameter.h"\n'''
- u'''\n'''
- u'''using namespace NsSmartDeviceLink::NsSmartObjects;\n'''
- u'''\n'''
- u'''$namespace::$class_name::$class_name()\n'''
- u''' : NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::eType, '''
- u'''messageType::eType, StructIdentifiers::eType>() {\n'''
- u''' TStructsSchemaItems struct_schema_items;\n'''
- u''' InitStructSchemes(struct_schema_items);\n'''
- u'''\n'''
- u''' std::set<FunctionID::eType> function_id_items;\n'''
- u'''${function_id_items}'''
- u'''\n'''
- u''' std::set<messageType::eType> message_type_items;\n'''
- u'''${message_type_items}'''
- u'''\n'''
- u''' InitFunctionSchemes(struct_schema_items, function_id_items, '''
- u'''message_type_items);\n'''
- u'''}\n'''
- u'''\n'''
- u'''utils::SharedPtr<ISchemaItem> $namespace::$class_name::'''
- u'''ProvideObjectSchemaItemForStruct(\n'''
- u''' const TStructsSchemaItems &struct_schema_items,\n'''
- u''' const StructIdentifiers::eType struct_id) {\n'''
- u''' const TStructsSchemaItems::const_iterator it = '''
- u'''struct_schema_items.find(struct_id);\n'''
- u''' if (it != struct_schema_items.end()) {\n'''
- u''' return it->second;\n'''
- u''' }\n'''
- u'''\n'''
- u''' return NsSmartDeviceLink::NsSmartObjects::'''
- u'''CAlwaysFalseSchemaItem::create();\n'''
- u'''}\n'''
- u'''\n'''
- u'''void $namespace::$class_name::InitStructSchemes(\n'''
- u''' TStructsSchemaItems &struct_schema_items) {'''
- u'''$struct_schema_items'''
- u'''}\n'''
- u'''\n'''
- u'''void $namespace::$class_name::InitFunctionSchemes(\n'''
- u''' const TStructsSchemaItems &struct_schema_items,\n'''
- u''' const std::set<FunctionID::eType> &function_id_items,\n'''
- u''' const std::set<messageType::eType> &message_type_items) {\n'''
- u'''$pre_function_schemas'''
- u'''$function_schemas'''
- u'''}\n'''
- u'''\n'''
- u'''//------------- Functions schemes initialization -------------\n'''
- u'''\n'''
- u'''$init_function_impls'''
- u'''\n'''
- u'''//----------- Structs schema items initialization ------------\n'''
- u'''\n'''
- u'''$init_structs_impls'''
- u'''\n'''
- u'''//-------------- String to value enum mapping ----------------\n'''
- u'''\n'''
- u'''namespace NsSmartDeviceLink {\n'''
- u'''namespace NsSmartObjects {\n'''
- u'''\n'''
- u'''$enum_string_coversions'''
- u'''\n'''
- u'''} // NsSmartObjects\n'''
- u'''} // NsSmartDeviceLink\n'''
- u'''\n''')
-
- _enum_to_str_converter_template = string.Template(
- u'''template <>\n'''
- u'''const std::map<${namespace}::${enum}::eType, '''
- u'''std::string> &TEnumSchemaItem<${namespace}::${enum}::eType>::'''
- u'''getEnumElementsStringRepresentation() {\n'''
- u''' static std::map<${namespace}::${enum}::eType, '''
- u'''std::string> enum_string_representation {\n'''
- u'''\n'''
- u'''${mapping}'''
- u'''\n'''
- u''' };\n'''
- u'''\n'''
- u''' return enum_string_representation;\n'''
- u'''}\n''')
-
- _enum_to_str_mapping_template = string.Template(
- u'''{${namespace}::'''
- u'''${enum_name}::${enum_value}, "${string}"},''')
-
- _struct_schema_item_template = string.Template(
- u'''utils::SharedPtr<ISchemaItem> struct_schema_item_${name} = '''
- u'''InitStructSchemaItem_${name}(struct_schema_items);\n'''
- u'''struct_schema_items.insert(std::make_pair('''
- u'''StructIdentifiers::${name}, struct_schema_item_${name}));\n'''
- u'''structs_schemes_.insert(std::make_pair('''
- u'''StructIdentifiers::${name}, CSmartSchema('''
- u'''struct_schema_item_${name})));''')
-
- _function_schema_template = string.Template(
- u'''functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::'''
- u'''NsJSONHandler::'''
- u'''SmartSchemaKey<FunctionID::eType, messageType::eType>'''
- u'''(FunctionID::$function_id, messageType::$message_type), '''
- u'''InitFunction_${function_id}_${message_type}('''
- u'''struct_schema_items, function_id_items, message_type_items)));''')
-
- _struct_impl_template = string.Template(
- u'''utils::SharedPtr<ISchemaItem> $namespace::$class_name::'''
- u'''InitStructSchemaItem_${struct_name}(\n'''
- u''' const TStructsSchemaItems &struct_schema_items) {\n'''
- u'''$code'''
- u'''}\n''')
-
- _struct_impl_code_tempate = string.Template(
- u'''${schema_loc_decl}'''
- u'''${schema_items_decl}'''
- u'''std::map<std::string, CObjectSchemaItem::SMember> '''
- u'''schema_members;\n\n'''
- u'''${schema_item_fill}'''
- u'''return CObjectSchemaItem::create(schema_members);''')
-
- _impl_code_loc_decl_enum_template = string.Template(
- u'''std::set<${type}::eType> ${var_name};''')
-
- _impl_code_loc_decl_enum_insert_template = string.Template(
- u'''${var_name}.insert(${enum}::${value});''')
-
- _impl_code_item_decl_temlate = string.Template(
- u'''${comment}'''
- u'''utils::SharedPtr<ISchemaItem> ${var_name} = ${item_decl};''')
-
- _impl_code_integer_item_template = string.Template(
- u'''TNumberSchemaItem<${type}>::create(${params})''')
-
- _impl_code_bool_item_template = string.Template(
- u'''CBoolSchemaItem::create(${params})''')
-
- _impl_code_string_item_template = string.Template(
- u'''CStringSchemaItem::create(${params})''')
-
- _impl_code_array_item_template = string.Template(
- u'''CArraySchemaItem::create(${params})''')
-
- _impl_code_struct_item_template = string.Template(
- u'''ProvideObjectSchemaItemForStruct(struct_schema_items, '''
- u'''StructIdentifiers::${name})''')
-
- _impl_code_enum_item_template = string.Template(
- u'''TEnumSchemaItem<${type}::eType>::create(${params})''')
-
- _impl_code_item_param_value_template = string.Template(
- u'''TSchemaItemParameter<$type>($value)''')
-
- _impl_code_item_fill_template = string.Template(
- u'''schema_members["${name}"] = CObjectSchemaItem::'''
- u'''SMember(${var_name}, ${is_mandatory});''')
-
- _function_impl_template = string.Template(
- u'''CSmartSchema $namespace::$class_name::'''
- u'''InitFunction_${function_id}_${message_type}(\n'''
- u''' const TStructsSchemaItems &struct_schema_items,\n'''
- u''' const std::set<FunctionID::eType> &function_id_items,\n'''
- u''' const std::set<messageType::eType> &message_type_items) {\n'''
- u'''$code'''
- u'''}\n''')
-
- _function_impl_code_tempate = string.Template(
- u'''${schema_loc_decl}'''
- u'''${schema_items_decl}'''
- u'''std::map<std::string, CObjectSchemaItem::SMember> '''
- u'''schema_members;\n\n'''
- u'''${schema_item_fill}'''
- u'''std::map<std::string, CObjectSchemaItem::SMember> '''
- u'''params_members;\n'''
- u'''${schema_params_fill}'''
- u'''\n'''
- u'''std::map<std::string, CObjectSchemaItem::SMember> '''
- u'''root_members_map;\n'''
- u'''root_members_map[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_MSG_PARAMS] = '''
- u'''CObjectSchemaItem::SMember(CObjectSchemaItem::'''
- u'''create(schema_members), true);\n'''
- u'''root_members_map[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_PARAMS] = '''
- u'''CObjectSchemaItem::SMember(CObjectSchemaItem::'''
- u'''create(params_members), true);\n\n'''
- u'''return CSmartSchema(CObjectSchemaItem::'''
- u'''create(root_members_map));''')
-
- _class_h_template = string.Template(
- u'''$comment\n'''
- u'''class $class_name : public NsSmartDeviceLink::NsJSONHandler::'''
- u'''CSmartFactory<FunctionID::eType, messageType::eType, '''
- u'''StructIdentifiers::eType> {\n'''
- u''' public:\n'''
- u''' /**\n'''
- u''' * @brief Constructor.\n'''
- u''' */\n'''
- u''' $class_name();\n'''
- u'''\n'''
- u''' protected:\n'''
- u''' /**\n'''
- u''' * @brief Type that maps of struct IDs to schema items.\n'''
- u''' */\n'''
- u''' typedef std::map<const StructIdentifiers::eType, '''
- u'''utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::'''
- u'''ISchemaItem> > TStructsSchemaItems;\n'''
- u'''\n'''
- u''' /**\n'''
- u''' * @brief Helper that allows to make reference to struct\n'''
- u''' *\n'''
- u''' * @param struct_schema_items Struct schema items.\n'''
- u''' * @param struct_id ID of structure to provide.\n'''
- u''' *\n'''
- u''' * @return utils::SharedPtr of strucute\n'''
- u''' */\n'''
- u''' static '''
- u'''utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> '''
- u'''ProvideObjectSchemaItemForStruct(\n'''
- u''' const TStructsSchemaItems &struct_schema_items,\n'''
- u''' const StructIdentifiers::eType struct_id);\n'''
- u'''\n'''
- u''' /**\n'''
- u''' * @brief Initializes all struct schemes.\n'''
- u''' */\n'''
- u''' void InitStructSchemes('''
- u'''TStructsSchemaItems &struct_schema_items);\n'''
- u'''\n'''
- u''' /**\n'''
- u''' * @brief Initializes all function schemes.\n'''
- u''' *\n'''
- u''' * @param struct_schema_items Struct schema items.\n'''
- u''' * @param function_id_items Set of all elements '''
- u'''of FunctionID enum.\n'''
- u''' * @param message_type_items Set of all elements '''
- u'''of messageType enum.\n'''
- u''' */\n'''
- u''' void InitFunctionSchemes(\n'''
- u''' const TStructsSchemaItems &struct_schema_items,\n'''
- u''' const std::set<FunctionID::eType> &function_id_items,\n'''
- u''' const std::set<messageType::eType> '''
- u'''&message_type_items);\n'''
- u'''\n'''
- u'''$init_function_decls'''
- u'''\n'''
- u'''$init_struct_decls'''
- u'''};''')
-
- _function_return_comment = u''' * @return NsSmartDeviceLink::''' \
- u'''NsSmartObjects::CSmartSchema\n'''
-
- _function_decl_template = string.Template(
- u'''$comment\n'''
- u'''static NsSmartDeviceLink::NsSmartObjects::CSmartSchema '''
- u'''InitFunction_${function_id}_${message_type}(\n'''
- u''' const TStructsSchemaItems &struct_schema_items,\n'''
- u''' const std::set<FunctionID::eType> &function_id_items,\n'''
- u''' const std::set<messageType::eType> &message_type_items);''')
-
- _struct_decl_template = string.Template(
- u'''$comment\n'''
- u'''static '''
- u'''utils::SharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> '''
- u'''InitStructSchemaItem_${struct_name}(\n'''
- u''' const TStructsSchemaItems &struct_schema_items);''')
-
- _class_comment_template = string.Template(
- u'''/**\n'''
- u''' * @brief Class $class_name.\n'''
- u''' *\n'''
- u''' * Params:\n'''
- u'''$class_params'''
- u''' */''')
-
- _comment_doxygen_template = string.Template(
- u'''/**\n'''
- u'''$brief_description'''
- u'''$description'''
- u'''$design_description'''
- u'''$issues'''
- u'''$todos'''
- u'''$returns */''')
-
- _comment_cc_template = string.Template(
- u'''$brief_description'''
- u'''$description'''
- u'''$design_description'''
- u'''$issues'''
- u'''$todos'''
- u'''$returns''')
-
- _enum_template = string.Template(
- u'''namespace $name {\n'''
- u'''$comment\n'''
- u'''enum eType {\n'''
- u'''$enum_items};\n'''
- u'''} // $name\n''')
-
- _enum_element_with_value_template = string.Template(
- u'''$comment\n'''
- u'''$name = $value''')
-
- _enum_element_with_no_value_template = string.Template(
- u'''$comment\n'''
- u'''$name''')
-
- _indent_template = u" "
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py b/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py
deleted file mode 100755
index c90043e20..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py
+++ /dev/null
@@ -1,166 +0,0 @@
-"""SmartFactory code generator for JSONRPC format.
-
-Defines JSONRPC format specific code generation rules.
-
-"""
-import string
-
-from generator.generators import SmartFactoryBase
-from generator import Model
-
-
-class CodeGenerator(SmartFactoryBase.CodeGenerator):
-
- """JSONRPC SmartFactory generator.
-
- Defines special cases that affects base code generation to make JSONRPC
- format-friendly code.
-
- """
-
- def __init__(self):
- """Construct new object."""
-
- SmartFactoryBase.CodeGenerator.__init__(self)
-
- def _gen_pre_function_schemas(self, functions):
- """Generate specific code that goes before schema initialization.
-
- JSON RPC generator generates code that adds specific schema for the
- error_response and adds this schema for every available response.
-
- Keyword arguments:
- functions -- list of functions to generate code for.
-
- Returns:
- Source code with error_response schema initialization and adding to the
- base SmartFactory..
-
- """
-
- code = u""
- for function in functions:
- if unicode(function.message_type.primary_name) == u"response":
- code = u"".join(
- [code, self._error_response_insert_template.substitute(
- function_id=function.function_id.primary_name)])
-
- if code:
- return self._indent_code(
- u"".join([self._error_response_schema_template, code]), 1)
-
- return u""
-
- def _preprocess_message_type(self, message_type):
- """Preprocess message_type enum.
-
- JSON RPC generator needs to add new message_type "error_response" in
- case if at least one response available.
-
- Keyword arguments:
- message_type -- message_type enum to preprocess.
-
- Returns:
- Preprocessed message_type enum.
-
- """
-
- if "response" in message_type.elements:
- message_type.elements[u"error_response"] = Model.EnumElement(
- name=u"error_response")
-
- return message_type
-
- def _gen_schema_params_fill(self, message_type_name):
- """Generate schema params fill code.
-
- Provides constant set of params for the function in accordance to the
- JSONRPC format.
-
- Keyword arguments:
- message_type_name -- Name of the messageType enum element.
-
- Returns:
- String with function schema params fill code.
-
- """
-
- return u"".join(
- [self._base_params,
- self._correlation_id_param
- if unicode(message_type_name) != u"notification" else u"",
- self._additional_response_params
- if unicode(message_type_name) == u"response" else u""])
-
- _error_response_insert_template = string.Template(
- u'''functions_schemes_.insert(std::make_pair('''
- u'''NsSmartDeviceLink::NsJSONHandler::'''
- u'''SmartSchemaKey<FunctionID::eType, messageType::eType>('''
- u'''FunctionID::${function_id}, messageType::error_response), '''
- u'''error_response_schema));\n''')
-
- _error_response_schema_template = (
- u'''std::map<std::string, CObjectSchemaItem::SMember> '''
- u'''params_members;\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember('''
- u'''TEnumSchemaItem<FunctionID::eType>::create('''
- u'''function_id_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember('''
- u'''TEnumSchemaItem<messageType::eType>::create('''
- u'''message_type_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember('''
- u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember('''
- u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember('''
- u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::kCode] = CObjectSchemaItem::SMember('''
- u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::kMessage] = CObjectSchemaItem::SMember('''
- u'''CStringSchemaItem::create(), true);\n'''
- u'''\n'''
- u'''std::map<std::string, '''
- u'''CObjectSchemaItem::SMember> root_members_map;\n'''
- u'''root_members_map[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_PARAMS] = CObjectSchemaItem::SMember('''
- u'''CObjectSchemaItem::create(params_members), true);\n'''
- u'''\n'''
- u'''CSmartSchema error_response_schema('''
- u'''CObjectSchemaItem::create(root_members_map));\n'''
- u'''\n''')
-
- _base_params = (
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_FUNCTION_ID] = CObjectSchemaItem::'''
- u'''SMember(TEnumSchemaItem<FunctionID::eType>::'''
- u'''create(function_id_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_MESSAGE_TYPE] = CObjectSchemaItem::'''
- u'''SMember(TEnumSchemaItem<messageType::eType>::'''
- u'''create(message_type_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::'''
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::'''
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
- )
-
- _correlation_id_param = (
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::S_CORRELATION_ID] = CObjectSchemaItem::'''
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
- )
-
- _additional_response_params = (
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
- u'''strings::kCode] = CObjectSchemaItem::'''
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
- )
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py b/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py
deleted file mode 100755
index b3fb61f4a..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-"""SmartFactory code generator for SDLRPC format.
-
-Defines SDLRPC format specific code generation rules.
-
-"""
-from generator.generators import SmartFactoryBase
-
-
-class CodeGenerator(SmartFactoryBase.CodeGenerator):
-
- """SDLRPC SmartFactory generator.
-
- Defines special cases that affects base code generation to make SDLRPC
- format-friendly code.
-
- """
-
- def __init__(self):
- """Construct new object."""
-
- SmartFactoryBase.CodeGenerator.__init__(self)
-
- def _gen_pre_function_schemas(self, functions):
- """Generate specific code that goes before schema initialization.
-
- In SDL RPC generator there is no need to generate any code before
- schemas initialization.
-
- Keyword arguments:
- functions -- list of functions to generate code for.
-
- Returns:
- Empty string.
-
- """
-
- return u""
-
- def _preprocess_message_type(self, message_type):
- """Preprocess message_type enum.
-
- In SDL RPC generator there is no need to preprocess message_type
- enum values.
-
- Keyword arguments:
- message_type -- message_type enum to preprocess.
-
- Returns:
- Initial message_type enum without any modifications.
-
- """
-
- return message_type
-
- def _gen_schema_params_fill(self, message_type_name):
- """Generate schema params fill code.
-
- Provides constant set of params for the function in accordance to the
- SDLRPC format (both v1 and v2).
-
- Keyword arguments:
- message_type_name -- Name of the messageType enum element.
-
- Returns:
- String with function schema params fill code.
-
- """
-
- base_params = \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
- u'''strings::S_FUNCTION_ID] = CObjectSchemaItem::''' \
- u'''SMember(TEnumSchemaItem<FunctionID::eType>::''' \
- u'''create(function_id_items), true);\n''' \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
- u'''strings::S_MESSAGE_TYPE] = CObjectSchemaItem::''' \
- u'''SMember(TEnumSchemaItem<messageType::eType>::''' \
- u'''create(message_type_items), true);\n''' \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
- u'''strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::''' \
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n''' \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
- u'''strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::''' \
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
-
- correlation_id_param = \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
- u'''strings::S_CORRELATION_ID] = CObjectSchemaItem::''' \
- u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
-
- return u"".join([base_params, correlation_id_param
- if unicode(message_type_name) !=
- u"notification" else u""])
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/generators/__init__.py b/SDL_Core/tools/InterfaceGenerator/generator/generators/__init__.py
deleted file mode 100755
index 57e528dc8..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/generators/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-"""Package that contains generators from internal model representation to
-different formats.
-"""
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/parsers/JSONRPC.py b/SDL_Core/tools/InterfaceGenerator/generator/parsers/JSONRPC.py
deleted file mode 100755
index 092f41ec1..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/parsers/JSONRPC.py
+++ /dev/null
@@ -1,89 +0,0 @@
-"""JSON RPC parser.
-
-Contains parser for JSON RPC XML format.
-
-"""
-
-from generator.parsers import RPCBase
-
-
-class Parser(RPCBase.Parser):
-
- """JSON RPC parser."""
-
- def __init__(self):
- """Constructor."""
- super(Parser, self).__init__()
- self._interface_name = None
-
- def _parse_root(self, root):
- """Parse root XML element.
-
- This implementation parses root as interfaces element with multiple
- interfaces in it.
-
- Keyword arguments:
- root -- root element.
-
- """
-
- self._params = root.attrib
- self._interface_name = None
-
- for element in root:
- if element.tag != "interface":
- raise RPCBase.ParseError("Subelement '" + element.tag +
- "' is unexpected in interfaces")
-
- if "name" not in element.attrib:
- raise RPCBase.ParseError(
- "Name is not specified for interface")
-
- self._interface_name = element.attrib["name"]
- self._parse_interface(element, self._interface_name + "_")
-
- def _provide_enum_element_for_function(self, enum_name, element_name):
- """Provide enum element for functions.
-
- This implementation replaces the underscore separating interface and
- function name with dot and sets it as name of enum element leaving
- the name with underscore as internal_name. For enums other than
- FunctionID the base implementation is called.
-
- Returns EnumElement.
-
- """
-
- name = element_name
- internal_name = None
-
- if "FunctionID" == enum_name:
- prefix_length = len(self._interface_name) + 1
- if element_name[:prefix_length] != self._interface_name + '_':
- raise RPCBase.ParseError(
- "Unexpected prefix for function id '" +
- element_name + "'")
- name = self._interface_name + "." + element_name[prefix_length:]
- internal_name = element_name
-
- element = super(Parser, self)._provide_enum_element_for_function(
- enum_name,
- name)
-
- if internal_name is not None:
- element.internal_name = internal_name
-
- return element
-
- def _check_function_param_name(self, function_param_name):
- """Check function param name.
-
- This method is called to check whether the newly parsed function
- parameter name conflicts with some predefined name.
- """
-
- if function_param_name in ['method', 'code']:
- raise RPCBase.ParseError(
- "'" + function_param_name +
- "' is a predefined name and can't be used" +
- " as a function parameter name")
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/parsers/RPCBase.py b/SDL_Core/tools/InterfaceGenerator/generator/parsers/RPCBase.py
deleted file mode 100755
index 7713895e4..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/parsers/RPCBase.py
+++ /dev/null
@@ -1,745 +0,0 @@
-"""RPC XML base parser.
-
-Contains base parser for SDLRPC v1/v2 and JSON RPC XML format.
-
-"""
-
-import collections
-import xml.etree.ElementTree
-
-from generator import Model
-
-
-class ParseError(Exception):
-
- """Parse error.
-
- This exception is raised when XML contains errors and can't be parsed.
-
- """
-
- pass
-
-
-class Parser(object):
-
- """RPC XML Parser base.
-
- This class must not be used directly. One of its subclasses must be used
- instead.
-
- """
-
- def __init__(self):
- """Constructor."""
- self._types = {}
- self._enums = collections.OrderedDict()
- self._structs = collections.OrderedDict()
- self._functions = collections.OrderedDict()
- self._params = {}
-
- def parse(self, filename):
- """Parse XML.
-
- Returns an instance of generator.Model.Interface containing parsed
- interface or raises ParseError if input XML contains errors
- and can't be parsed.
-
- Keyword arguments:
- filename -- name of input XML file.
-
- """
-
- tree = xml.etree.ElementTree.parse(filename)
- root = tree.getroot()
-
- self._enums = self._initialize_enums()
- self._structs = collections.OrderedDict()
- self._functions = collections.OrderedDict()
- self._params = {}
-
- self._types = dict(self._enums.items())
-
- self._parse_root(root)
-
- return Model.Interface(enums=self._enums, structs=self._structs,
- functions=self._functions, params=self._params)
-
- def _initialize_enums(self):
- """Initialize enums.
-
- The default implementation returns an OrderedDict with two empty
- enums: "FunctionID" and "messageType". Required for formats where
- these enums must be generated automatically according to the declared
- in the XML functions.
-
- These enums are filled during the parsing of the functions.
-
- """
- return collections.OrderedDict(
- [("FunctionID", Model.Enum(name="FunctionID")),
- ("messageType", Model.Enum(name="messageType"))])
-
- def _check_enum_name(self, enum):
- """Check enum name.
-
- This method is called to check whether the newly parsed enum's name
- conflicts with some predefined enum.
-
- This implementation raises an error if enum name is one of the
- predefined enums "FunctionID" or "messageType" which must not be
- declared explicitly in the XML.
-
- """
- if enum.name in ["FunctionID", "messageType"]:
- raise ParseError(
- "Enum '" + enum.name +
- "' is generated automatically in SDLRPCV1 and"
- " must not be declared in xml file")
-
- def _check_function_param_name(self, function_param_name):
- """Check function param name.
-
- This method is called to check whether the newly parsed function
- parameter name conflicts with some predefined name.
-
- This implementation doesn't check anything because there is no
- predefined names in base RPC XML.
- """
-
- pass
-
- def _parse_root(self, root):
- """Parse root XML element.
-
- Default implementation parses root as interface element without a
- prefix.
-
- Keyword arguments:
- root -- root element.
-
- """
-
- self._parse_interface(root, "")
-
- def _parse_interface(self, interface, prefix):
- """Parse interface element.
-
- Keyword arguments:
- interface -- interface element.
- prefix -- string prefix for all types of the interface.
-
- """
- if interface.tag != "interface":
- raise ParseError("Invalid interface tag: " + interface.tag)
-
- params, subelements, attrib = self._parse_base_item(interface, "")
-
- for param in ["description", "design_description", "todos"]:
- if 0 != len(params[param]):
- attrib[param] = "\n".join(params[param])
-
- if 0 != len(params["issues"]):
- attrib["issues"] = "\n".join(i.value for i in params["issues"])
-
- self._params = dict(
- self._params.items() +
- [(prefix + p[0], p[1]) for p in attrib.items()])
-
- for element in subelements:
- if element.tag == "enum":
- enum = self._parse_enum(element, prefix)
- self._check_enum_name(enum)
- self._add_item(self._enums, enum)
- self._add_type(enum)
- elif element.tag == "struct":
- struct = self._parse_struct(element, prefix)
- self._add_item(self._structs, struct)
- self._add_type(struct)
- elif element.tag == "function":
- function = self._parse_function(element, prefix)
- self._add_item(self._functions, function,
- (function.function_id, function.message_type))
- else:
- raise ParseError("Unexpected element: " + element.tag)
-
- @staticmethod
- def _add_item(items, item, key=None):
- """Add new item in the items dictionary with given key.
-
- Performs additional check for presence in the dictionary and throws
- ParseError exception if key already exist.
-
- """
- if key is None:
- key = item.name
-
- if key in items:
- raise ParseError(type(item).__name__ + " '" + str(key) +
- "' is declared more than once")
- items[key] = item
-
- def _add_type(self, _type):
- """Add new type in the internal types dictionary.
-
- Performs additional check for presence type with same name in the
- dictionary and throws ParseError exception if key already exist.
-
- """
- if _type.name in self._types:
- raise ParseError("Type '" + _type.name +
- "' is declared as both struct and enum")
-
- self._types[_type.name] = _type
-
- def _parse_enum(self, element, prefix):
- """Parse element as enumeration.
-
- Returns an instance of generator.Model.Enum
-
- """
- params, subelements, attributes = \
- self._parse_base_item(element, prefix)
-
- internal_scope = None
- scope = None
- for attribute in attributes:
- if attribute == "internal_scope":
- internal_scope = attributes[attribute]
- elif attribute == "scope":
- scope = attributes[attribute]
- else:
- raise ParseError("Unexpected attribute '" + attribute +
- "' in enum '" + params["name"] + "'")
- params["internal_scope"] = internal_scope
- params["scope"] = scope
-
- elements = collections.OrderedDict()
- for subelement in subelements:
- if subelement.tag == "element":
- self._add_item(elements, self._parse_enum_element(subelement))
- else:
- raise ParseError("Unexpected element '" + subelement.tag +
- "' in enum '" + params["name"] + "'")
- params["elements"] = elements
-
- # Magic usage is correct
- # pylint: disable=W0142
- return Model.Enum(**params)
-
- def _parse_struct(self, element, prefix):
- """Parse element as structure.
-
- Returns an instance of generator.Model.Struct
-
- """
- params, subelements, attrib = self._parse_base_item(element, prefix)
-
- scope = None
- for attribute in attrib:
- if attribute == "scope":
- scope = attrib[attribute]
- else:
- raise ParseError("Unexpected attribute '" + attribute +
- "' in struct '" + params["name"] + "'")
- params["scope"] = scope
-
- members = collections.OrderedDict()
- for subelement in subelements:
- if subelement.tag == "param":
- self._add_item(members, self._parse_param(subelement, prefix))
- else:
- raise ParseError("Unexpected subelement '" + subelement.name +
- "' in struct '" + params["name"] + "'")
- params["members"] = members
-
- # Magic usage is correct
- # pylint: disable=W0142
- return Model.Struct(**params)
-
- def _parse_function(self, element, prefix):
- """Parse element as function.
-
- Returns an instance of generator.Model.Function
-
- """
- params, subelements, attributes = \
- self._parse_base_item(element, prefix)
-
- function_id, message_type = self._parse_function_id_type(
- params["name"],
- attributes)
-
- scope = None
- for attribute in attributes:
- if attribute == "scope":
- scope = attributes[attribute]
- else:
- raise ParseError("Unexpected attribute '" + attribute +
- "' in function '" + params["name"] + "'")
-
- params["function_id"] = function_id
- params["message_type"] = message_type
- params["scope"] = scope
-
- function_params = collections.OrderedDict()
- for subelement in subelements:
- if subelement.tag == "param":
- function_param = self._parse_function_param(subelement,
- prefix)
- self._check_function_param_name(function_param.name)
- if function_param.name in function_params:
- raise ParseError("Parameter '" + function_param.name +
- "' is specified more than once" +
- " for function '" + params["name"] + "'")
- function_params[function_param.name] = function_param
- else:
- raise ParseError("Unexpected subelement '" + subelement.tag +
- "' in function '" + params["name"] + "'")
- params["params"] = function_params
-
- # Magic usage is correct
- # pylint: disable=W0142
- return Model.Function(**params)
-
- def _parse_function_id_type(self, function_name, attrib):
- """Parse function id and message type according to XML format.
-
- This implementation takes function name as function id and extracts
- attribute "messagetype" as message type and searches them in enums
- "FunctionID" and "messageType" adding the missing elements if
- necessary.
-
- Returns function id and message type as an instances of EnumElement.
-
- """
- if "messagetype" not in attrib:
- raise ParseError("No messagetype specified for function '" +
- function_name + "'")
-
- function_id = self._provide_enum_element_for_function(
- "FunctionID",
- function_name)
-
- message_type = self._provide_enum_element_for_function(
- "messageType",
- self._extract_attrib(attrib, "messagetype"))
-
- return function_id, message_type
-
- def _provide_enum_element_for_function(self, enum_name, element_name):
- """Provide enum element for functions.
-
- Search an element in an enum and add it if it is missing.
-
- Returns EnumElement.
-
- """
- if enum_name not in self._types:
- raise ParseError("Enum '" + enum_name +
- "' is not initialized")
-
- enum = self._types[enum_name]
-
- if not isinstance(enum, Model.Enum):
- raise ParseError("'" + enum_name + "' is not an enum")
-
- if element_name not in enum.elements:
- enum.elements[element_name] = Model.EnumElement(name=element_name)
-
- return enum.elements[element_name]
-
- def _parse_base_item(self, element, prefix):
- """Parse element as base item.
-
- Returns an params, sub-elements and attributes of the element
-
- """
- params = {}
-
- description = []
- design_description = []
- issues = []
- todos = []
- subelements = []
-
- if "name" not in element.attrib:
- raise ParseError("Name is not specified for " + element.tag)
-
- params["name"] = prefix + element.attrib["name"]
- attrib = dict(element.attrib.items())
- del attrib["name"]
-
- params["platform"] = self._extract_attrib(attrib, "platform")
-
- for subelement in element:
- if subelement.tag == "description":
- description.append(self._parse_simple_element(subelement))
- elif subelement.tag == "designdescription":
- design_description.append(
- self._parse_simple_element(subelement))
- elif subelement.tag == "todo":
- todos.append(self._parse_simple_element(subelement))
- elif subelement.tag == "issue":
- issues.append(self._parse_issue(subelement))
- else:
- subelements.append(subelement)
-
- params["description"] = description
- params["design_description"] = design_description
- params["issues"] = issues
- params["todos"] = todos
-
- return params, subelements, attrib
-
- @staticmethod
- def _parse_simple_element(element):
- """Parse element as simple element and returns it's text.
-
- Element is simple when it contains no subelements and attributes.
-
- Returns element text if present or empty string if not
-
- """
- if len(element) != 0:
- raise ParseError("Unexpected subelements in '" +
- element.tag + "'")
- if len(element.attrib) != 0:
- raise ParseError("Unexpected attributes in '" +
- element.tag + "'")
- return element.text if element.text is not None else ""
-
- @staticmethod
- def _parse_issue(element):
- """Parse element as issue.
-
- Issue must not contain subelements and attributes.
-
- Returns an instance of generator.Model.Issue
-
- """
- if len(element) != 0:
- raise ParseError("Unexpected subelements in issue")
- if "creator" not in element.attrib:
- raise ParseError("No creator in issue")
- if len(element.attrib) != 1:
- raise ParseError("Unexpected attributes in issue")
-
- return Model.Issue(
- creator=element.attrib["creator"],
- value=element.text if element.text is not None else "")
-
- def _parse_enum_element(self, element):
- """Parse element as element of enumeration.
-
- Returns an instance of generator.Model.EnumElement
-
- """
- params, subelements, attributes = self._parse_base_item(element, "")
-
- if len(subelements) != 0:
- raise ParseError("Unexpected subelements in enum element")
-
- self._ignore_attribute(attributes, "hexvalue")
- self._ignore_attribute(attributes, "scope")
- self._ignore_attribute(attributes, "rootscreen")
-
- internal_name = None
- value = None
- for attribute in attributes:
- if attribute == "internal_name":
- internal_name = attributes[attribute]
- elif attribute == "value":
- try:
- value = int(attributes[attribute])
- except:
- raise ParseError("Invalid value for enum element: '" +
- attributes[attribute] + "'")
- else:
- raise ParseError("Unexpected attribute '" +
- attribute + "' in enum element")
- params["internal_name"] = internal_name
- params["value"] = value
-
- # Magic usage is correct
- # pylint: disable=W0142
- return Model.EnumElement(**params)
-
- def _parse_param(self, element, prefix):
- """Parse element as structure parameter.
-
- Returns an instance of generator.Model.Param
-
- """
- params, subelements, attrib = \
- self._parse_param_base_item(element, prefix)
-
- if len(attrib) != 0:
- raise ParseError("""Unknown attribute(s) {0} in param {1}
- """.format(attrib, params["name"]))
-
- if len(subelements) != 0:
- raise ParseError("Unknown subelements in param '" +
- params["name"] + "'")
-
- # Magic usage is correct
- # pylint: disable=W0142
- return Model.Param(**params)
-
- def _parse_function_param(self, element, prefix):
- """Parse element as function parameter.
-
- Returns an instance of generator.Model.FunctionParam
-
- """
- params, subelements, attrib = \
- self._parse_param_base_item(element, prefix)
-
- default_value = None
- default_value_string = self._extract_attrib(attrib, "defvalue")
- if default_value_string is not None:
- param_type = params["param_type"]
- if type(param_type) is Model.Boolean:
- default_value = \
- self._get_bool_from_string(default_value_string)
- elif type(param_type) is Model.Integer:
- try:
- default_value = int(default_value_string)
- except:
- raise ParseError("Invalid value for integer: '" +
- default_value_string + "'")
- elif type(param_type) is Model.Double:
- try:
- default_value = float(default_value_string)
- except:
- raise ParseError("Invalid value for float: '" +
- default_value_string + "'")
- elif type(param_type) is Model.String:
- default_value = default_value_string
- elif type(param_type) is Model.Enum or \
- type(param_type) is Model.EnumSubset:
- if type(param_type) is Model.EnumSubset:
- allowed_elements = param_type.allowed_elements
- else:
- allowed_elements = param_type.elements
- if default_value_string not in allowed_elements:
- raise ParseError("Default value '" + default_value_string +
- "' for parameter '" + params["name"] +
- "' is not a member of " +
- type(param_type).__name__ +
- "'" + params["name"] + "'")
- default_value = allowed_elements[default_value_string]
- else:
- raise ParseError("Default value specified for " +
- type(param_type).__name__)
- params["default_value"] = default_value
-
- if len(attrib) != 0:
- raise ParseError("Unexpected attributes in parameter '" +
- params["name"] + "'")
-
- if len(subelements) != 0:
- raise ParseError("Unexpected subelements in parameter '" +
- params["name"] + "'")
-
- # Magic usage is correct
- # pylint: disable=W0142
- return Model.FunctionParam(**params)
-
- def _parse_param_base_item(self, element, prefix):
- """Parse base param items.
-
- Returns params, other subelements and attributes.
-
- """
- params, subelements, attrib = self._parse_base_item(element, "")
-
- params["is_mandatory"] = self._extract_optional_bool_attrib(
- attrib, "mandatory", True)
-
- scope = self._extract_attrib(attrib, "scope")
- if scope is not None:
- params["scope"] = scope
- self._ignore_attribute(attrib, "defvalue")
-
- param_type = None
- type_name = self._extract_attrib(attrib, "type")
- if type_name is None:
- raise ParseError("Type is not specified for parameter '" +
- params["name"] + "'")
- if type_name == "Boolean":
- param_type = Model.Boolean()
- elif type_name == "Integer" or \
- type_name == "Float":
- min_value = self._extract_optional_number_attrib(
- attrib, "minvalue", int if type_name == "Integer" else float)
- max_value = self._extract_optional_number_attrib(
- attrib, "maxvalue", int if type_name == "Integer" else float)
-
- param_type = \
- (Model.Integer if type_name == "Integer" else Model.Double)(
- min_value=min_value,
- max_value=max_value)
- elif type_name == "String":
- min_length = self._extract_optional_number_attrib(
- attrib, "minlength")
- # if minlength is not defined default value is 1
- if min_length is None:
- min_length = 1
- max_length = self._extract_optional_number_attrib(
- attrib, "maxlength")
- param_type = Model.String(min_length=min_length, max_length=max_length)
- else:
- if 1 == type_name.count("."):
- custom_type_name = type_name.replace(".", "_")
- else:
- custom_type_name = prefix + type_name
-
- if custom_type_name in self._types:
- param_type = self._types[custom_type_name]
- else:
- raise ParseError("Unknown type '" + type_name + "'")
-
- if self._extract_optional_bool_attrib(attrib, "array", False):
- min_size = self._extract_optional_number_attrib(attrib,
- "minsize")
- max_size = self._extract_optional_number_attrib(attrib,
- "maxsize")
- param_type = Model.Array(element_type=param_type,
- min_size=min_size,
- max_size=max_size)
-
- base_type = \
- param_type.element_type if isinstance(param_type, Model.Array) \
- else param_type
-
- other_subelements = []
- for subelement in subelements:
- if subelement.tag == "element":
- if type(base_type) is not Model.Enum and \
- type(base_type) is not Model.EnumSubset:
- raise ParseError("Elements specified for parameter '" +
- params["name"] + "' of type " +
- type(base_type).__name__)
- if type(base_type) is Model.Enum:
- base_type = Model.EnumSubset(
- name=params["name"],
- enum=base_type,
- description=params["description"],
- design_description=params["design_description"],
- issues=params["issues"],
- todos=params["todos"],
- allowed_elements={})
- if "name" not in subelement.attrib:
- raise ParseError(
- "Element name is not specified for parameter '" +
- params["name"] + "'")
- element_name = subelement.attrib["name"]
- if len(subelement.attrib) != 1:
- raise ParseError("Unexpected attributes for element '" +
- element_name + "' of parameter '" +
- params["name"])
- if len(subelement.getchildren()) != 0:
- raise ParseError("Unexpected subelements for element '" +
- element_name + "' of parameter '" +
- params["name"])
- if element_name in base_type.allowed_elements:
- raise ParseError("Element '" + element_name +
- "' is specified more than once for" +
- " parameter '" + params["name"] + "'")
- if element_name not in base_type.enum.elements:
- raise ParseError("Element '" + element_name +
- "' is not a member of enum '" +
- base_type.enum.name + "'")
- base_type.allowed_elements[element_name] = \
- base_type.enum.elements[element_name]
- else:
- other_subelements.append(subelement)
-
- if isinstance(param_type, Model.Array):
- param_type.element_type = base_type
- else:
- param_type = base_type
-
- params["param_type"] = param_type
-
- return params, other_subelements, attrib
-
- def _extract_optional_bool_attrib(self, attrib, name, default):
- """Extract boolean attribute with given name.
-
- Returns value of the attribute.
-
- """
- value = self._extract_attrib(attrib, name)
-
- if value is None:
- value = default
- else:
- value = self._get_bool_from_string(value)
-
- return value
-
- def _extract_optional_number_attrib(self, attrib, name, _type=int):
- """Extract number attribute with given name.
-
- Returns value of the attribute.
-
- """
- value = self._extract_attrib(attrib, name)
-
- if value is not None:
- try:
- value = _type(value)
- except:
- raise ParseError("Invlaid value for " + _type.__name__ +
- ": '" + value + "'")
-
- return value
-
- @staticmethod
- def _extract_attrib(attrib, name):
- """Extract attribute with given name.
-
- Returns value of the attribute.
-
- """
- value = None
-
- if name in attrib:
- value = attrib[name]
- del attrib[name]
-
- return value
-
- @staticmethod
- def _get_bool_from_string(bool_string):
- """Convert string representation of boolean to real bool value.
-
- Returns converted value.
-
- """
- value = None
-
- if bool_string in ['0', 'false']:
- value = False
- elif bool_string in ['1', 'true']:
- value = True
- else:
- raise ParseError("Invalid value for bool: '" +
- bool_string + "'")
-
- return value
-
- def _ignore_attribute(self, attrib, name):
- """To be called when attribute is meaningless in terms
- of code generation but it's presence is not issue.
-
- Removes this attribute from attribute list.
-
- """
- if name in attrib:
- del attrib[name]
- print ("Ignoring attribute '" +
- name + "'")
- return True
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV1.py b/SDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV1.py
deleted file mode 100755
index 52158ee93..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV1.py
+++ /dev/null
@@ -1,14 +0,0 @@
-"""SDLRPCV1 parser.
-
-Contains parser for SDLRPCV1 XML format.
-
-"""
-
-from generator.parsers import RPCBase
-
-
-class Parser(RPCBase.Parser):
-
- """SDLRPCV1 parser."""
-
- pass
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV2.py b/SDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV2.py
deleted file mode 100755
index 3d67c6e4c..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/parsers/SDLRPCV2.py
+++ /dev/null
@@ -1,88 +0,0 @@
-"""SDLRPCV2 parser.
-
-Contains parser for SDLRPCV2 XML format.
-
-"""
-
-import collections
-
-from generator import Model
-from generator.parsers import RPCBase
-
-
-class Parser(RPCBase.Parser):
-
- """SDLRPCV2 parser."""
-
- def _initialize_enums(self):
- """Initialize enums.
-
- This implementation returns empty OrderedDict because in SDLRPCV2
- all enums must be declared explicitly in the XML file.
-
- """
- return collections.OrderedDict()
-
- def _check_enum_name(self, enum):
- """Check enum name.
-
- This method is called to check whether the newly parsed enum's name
- conflicts with some predefined enum.
- As SDLRPCV2 has no predefined enums this implementation does nothing.
-
- """
- pass
-
- def _parse_function_id_type(self, function_name, attrib):
- """Parse function id and message type according to XML format.
-
- This implementation extracts attribute "FunctionID" as function id
- and messagetype as message type and searches them in enums
- "FunctionID" and "messageType". If at least one of them (or the entire
- enum) is missing it raises an error.
-
- Returns function id and message type as an instances of EnumElement.
-
- """
- if "functionID" not in attrib:
- raise RPCBase.ParseError(
- "No functionID specified for function '" +
- function_name + "'")
-
- if "messagetype" not in attrib:
- raise RPCBase.ParseError(
- "No messagetype specified for function '" +
- function_name + "'")
-
- function_id = self._get_enum_element_for_function(
- "FunctionID",
- self._extract_attrib(attrib, "functionID"))
- message_type = self._get_enum_element_for_function(
- "messageType",
- self._extract_attrib(attrib, "messagetype"))
-
- return function_id, message_type
-
- def _get_enum_element_for_function(self, enum_name, element_name):
- """Get enum element with given name from given enumeration.
-
- Returns an instance of generator.Model.EnumElement.
-
- """
- if enum_name not in self._types:
- raise RPCBase.ParseError(
- "Enumeration '" + enum_name +
- "' must be declared before any function")
-
- enum = self._types[enum_name]
-
- if type(enum) is not Model.Enum:
- raise RPCBase.ParseError("'" + enum_name +
- "' is not an enumeration")
-
- if element_name not in enum.elements:
- raise RPCBase.ParseError(
- "'" + element_name +
- "' is not a member of enum '" + enum_name + "'")
-
- return enum.elements[element_name]
diff --git a/SDL_Core/tools/InterfaceGenerator/generator/parsers/__init__.py b/SDL_Core/tools/InterfaceGenerator/generator/parsers/__init__.py
deleted file mode 100755
index 7005503b0..000000000
--- a/SDL_Core/tools/InterfaceGenerator/generator/parsers/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-"""Package that contains parsers from different formats to internal model
-representation.
-"""
diff --git a/SDL_Core/tools/InterfaceGenerator/pylint.cfg b/SDL_Core/tools/InterfaceGenerator/pylint.cfg
deleted file mode 100644
index 44e23eb1b..000000000
--- a/SDL_Core/tools/InterfaceGenerator/pylint.cfg
+++ /dev/null
@@ -1,264 +0,0 @@
-[MASTER]
-
-# Specify a configuration file.
-#rcfile=
-
-# Python code to execute, usually for sys.path manipulation such as
-# pygtk.require().
-#init-hook=
-
-# Profiled execution.
-profile=no
-
-# Add files or directories to the blacklist. They should be base names, not
-# paths.
-ignore=CVS
-
-# Pickle collected data for later comparisons.
-persistent=yes
-
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
-
-
-[MESSAGES CONTROL]
-
-# Enable the message, report, category or checker with the given id(s). You can
-# either give multiple identifier separated by comma (,) or put this option
-# multiple time. See also the "--disable" option for examples.
-#enable=
-
-# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifiers separated by comma (,) or put this
-# option multiple times (only on the command line, not in the configuration
-# file where it should appear only once).You can also use "--disable=all" to
-# disable everything first and then reenable specific checks. For example, if
-# you want to run only the similarities checker, you can use "--disable=all
-# --enable=similarities". If you want to run only the classes checker, but have
-# no Warning level messages displayed, use"--disable=all --enable=classes
-# --disable=W"
-#disable=
-
-
-[REPORTS]
-
-# Set the output format. Available formats are text, parseable, colorized, msvs
-# (visual studio) and html. You can also give a reporter class, eg
-# mypackage.mymodule.MyReporterClass.
-output-format=colorized
-
-# Include message's id in output
-include-ids=yes
-
-# Include symbolic ids of messages in output
-symbols=no
-
-# Put messages in a separate file for each module / package specified on the
-# command line instead of printing them on stdout. Reports (if any) will be
-# written in a file name "pylint_global.[txt|html]".
-files-output=no
-
-# Tells whether to display a full report or only the messages
-reports=no
-
-# Python expression which should return a note less than 10 (10 is the highest
-# note). You have access to the variables errors warning, statement which
-# respectively contain the number of errors / warnings messages and the total
-# number of statements analyzed. This is used by the global evaluation report
-# (RP0004).
-evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-# Add a comment according to your evaluation note. This is used by the global
-# evaluation report (RP0004).
-comment=no
-
-
-[BASIC]
-
-# Required attributes for module, separated by a comma
-required-attributes=
-
-# List of builtins function names that should not be used, separated by a comma
-bad-functions=map,filter,apply,input
-
-# Regular expression which should only match correct module names
-module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
-# Regular expression which should only match correct module level names
-const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-
-# Regular expression which should only match correct class names
-class-rgx=[A-Z_][a-zA-Z0-9]+$
-
-# Regular expression which should only match correct function names
-function-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct method names
-method-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct argument names
-argument-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct variable names
-variable-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct list comprehension /
-# generator expression variable names
-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-
-# Good variable names which should always be accepted, separated by a comma
-good-names=i,j,k,ex,Run,_
-
-# Bad variable names which should always be refused, separated by a comma
-bad-names=foo,bar,baz,toto,tutu,tata
-
-# Regular expression which should only match functions or classes name which do
-# not require a docstring
-no-docstring-rgx=__.*__
-
-
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-notes=FIXME,XXX,TODO
-
-
-[SIMILARITIES]
-
-# Minimum lines number of a similarity.
-min-similarity-lines=4
-
-# Ignore comments when computing similarities.
-ignore-comments=no
-
-# Ignore docstrings when computing similarities.
-ignore-docstrings=no
-
-# Ignore imports when computing similarities.
-ignore-imports=no
-
-
-[TYPECHECK]
-
-# Tells whether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-ignore-mixin-members=yes
-
-# List of classes names for which member attributes should not be checked
-# (useful for classes with attributes dynamically set).
-ignored-classes=SQLObject
-
-# When zope mode is activated, add a predefined set of Zope acquired attributes
-# to generated-members.
-zope=no
-
-# List of members which are set dynamically and missed by pylint inference
-# system, and so shouldn't trigger E0201 when accessed. Python regular
-# expressions are accepted.
-generated-members=REQUEST,acl_users,aq_parent
-
-
-[VARIABLES]
-
-# Tells whether we should check for unused import in __init__ files.
-init-import=no
-
-# A regular expression matching the beginning of the name of dummy variables
-# (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
-
-
-[FORMAT]
-
-# Maximum number of characters on a single line.
-max-line-length=80
-
-# Maximum number of lines in a module
-max-module-lines=1000
-
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string=' '
-
-
-[IMPORTS]
-
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
-
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report RP0402 must not be disabled)
-import-graph=
-
-# Create a graph of external dependencies in the given file (report RP0402 must
-# not be disabled)
-ext-import-graph=
-
-# Create a graph of internal dependencies in the given file (report RP0402 must
-# not be disabled)
-int-import-graph=
-
-
-[CLASSES]
-
-# List of interface methods to ignore, separated by a comma. This is used for
-# instance to not check methods defines in Zope's Interface base class.
-ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
-
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,__new__,setUp
-
-# List of valid names for the first argument in a class method.
-valid-classmethod-first-arg=cls
-
-# List of valid names for the first argument in a metaclass class method.
-valid-metaclass-classmethod-first-arg=mcs
-
-
-[DESIGN]
-
-# Maximum number of arguments for function / method
-max-args=10
-
-# Argument names that match this expression will be ignored. Default to name
-# with leading underscore
-ignored-argument-names=_.*
-
-# Maximum number of locals for function / method body
-max-locals=15
-
-# Maximum number of return / yield for function / method body
-max-returns=6
-
-# Maximum number of branch for function / method body
-max-branchs=12
-
-# Maximum number of statements in function / method body
-max-statements=50
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=7
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=1
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20
-
-
-[EXCEPTIONS]
-
-# Exceptions that will emit a warning when being caught. Defaults to
-# "Exception"
-overgeneral-exceptions=Exception
diff --git a/SDL_Core/tools/InterfaceGenerator/requirements.txt b/SDL_Core/tools/InterfaceGenerator/requirements.txt
deleted file mode 100644
index af21f6cb9..000000000
--- a/SDL_Core/tools/InterfaceGenerator/requirements.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-flake8
-pep8-naming
-pep257
-mccabe
-pylint
-mock \ No newline at end of file
diff --git a/SDL_Core/tools/InterfaceGenerator/runAllTests.sh b/SDL_Core/tools/InterfaceGenerator/runAllTests.sh
deleted file mode 100755
index ab5b7c82c..000000000
--- a/SDL_Core/tools/InterfaceGenerator/runAllTests.sh
+++ /dev/null
@@ -1 +0,0 @@
-python -m unittest discover -b \ No newline at end of file
diff --git a/SDL_Core/tools/InterfaceGenerator/test/__init__.py b/SDL_Core/tools/InterfaceGenerator/test/__init__.py
deleted file mode 100755
index e69de29bb..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/__init__.py
+++ /dev/null
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/__init__.py b/SDL_Core/tools/InterfaceGenerator/test/generator/__init__.py
deleted file mode 100755
index e69de29bb..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/__init__.py
+++ /dev/null
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/__init__.py b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/__init__.py
deleted file mode 100755
index e69de29bb..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/__init__.py
+++ /dev/null
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryBase.py b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryBase.py
deleted file mode 100755
index aea91f4a4..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryBase.py
+++ /dev/null
@@ -1,283 +0,0 @@
-"""Test for SmartFactory generator base.
-
-Verifies common helper functions and produced source code.
-
-"""
-import collections
-import unittest
-
-from generator.generators import SmartFactoryBase
-from generator import Model
-
-
-EXPECTED_RESULT_FULL_COMMENT = u"""/**
- * @brief Enumeration Test Name.
- *
- * Description Line1
- * Description Line2
- *
- * Design Line1
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- *
- * @todo Do1
- * @todo Do2
- */"""
-
-EXPECTED_RESULT_ENUM_ELEMENT1 = u"""/**
- * @brief InternalName.
- */
-InternalName = 10"""
-
-EXPECTED_RESULT_ENUM_ELEMENT2 = u"""/**
- * @brief NO_VALUE_ELEMENT.
- *
- * Description Line1
- * Description Line2
- *
- * Design Line1
- */
-NO_VALUE_ELEMENT"""
-
-EXPECTED_RESULT_ENUM_ELEMENTS1 = u"""/**
- * @brief name1.
- *
- * Design Line1
- *
- * @todo Do1
- * @todo Do2
- */
-name1 = 1,
-
-/**
- * @brief internal_name2.
- *
- * Description Line1
- * Description Line2
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
-internal_name2"""
-
-EXPECTED_RESULT_ENUM1 = u"""namespace Enum1 {
-/**
- * @brief Enumeration Enum1.
- *
- * @todo Do1
- * @todo Do2
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief name1.
- *
- * Design Line1
- *
- * @todo Do1
- * @todo Do2
- */
- name1 = 1,
-
- /**
- * @brief internal_name2.
- *
- * Description Line1
- * Description Line2
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- internal_name2
-};
-} // Enum1
-"""
-
-EXPECTED_RESULT_ENUM2 = u"""namespace E2 {
-/**
- * @brief Enumeration E2.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief val_1.
- */
- val_1,
-
- /**
- * @brief val_2.
- */
- val_2 = 100,
-
- /**
- * @brief val_3.
- */
- val_3
-};
-} // E2
-"""
-
-DESCRIPTION = [u"Description Line1", u"Description Line2"]
-
-DESIGN_DESCRIPTION = [u"Design Line1"]
-
-ISSUES = [Model.Issue(value=u"Issue1"),
- Model.Issue(value=u"Issue2"),
- Model.Issue(value=u"Issue3")]
-
-TODOS = [u"Do1", u"Do2"]
-
-
-class Test(unittest.TestCase):
-
- """Test for SmartFactory base generator.
-
- This class holds set of test cases for the SmartFactory base generator.
-
- """
-
- def test_gen_comment(self):
- """Test generation of the source code comments.
-
- Verifies correct generation of the code comments.
-
- """
- generator = SmartFactoryBase.CodeGenerator()
-
- enum = Model.Enum(name=u"Test Name",
- description=DESCRIPTION,
- design_description=DESIGN_DESCRIPTION,
- issues=ISSUES,
- todos=TODOS)
- self.assertEqual(generator._gen_comment(enum),
- EXPECTED_RESULT_FULL_COMMENT,
- "Full comment for enum is invalid")
-
- def test_gen_enum_element(self):
- """Test generation of the single enum element.
-
- Verifies correct generation of the single enum element.
-
- """
- generator = SmartFactoryBase.CodeGenerator()
-
- enum_element1 = Model.EnumElement(name=u"Element1",
- internal_name=u"InternalName",
- value=u"10")
-
- self.assertEqual(
- generator._gen_enum_element(enum_element1),
- EXPECTED_RESULT_ENUM_ELEMENT1,
- "Short commented enum element with internal name is invalid")
-
- enum_element2 = Model.EnumElement(
- name=u"NO_VALUE_ELEMENT",
- description=DESCRIPTION,
- design_description=DESIGN_DESCRIPTION)
- self.assertEqual(generator._gen_enum_element(enum_element2),
- EXPECTED_RESULT_ENUM_ELEMENT2,
- "Enum element with no value is invalid")
-
- def test_gen_enum_elements(self):
- """Test generation of the enum elements.
-
- Verifies correct generation of the enum elements.
-
- """
- generator = SmartFactoryBase.CodeGenerator()
-
- elements = [Model.EnumElement(name=u"name1",
- design_description=DESIGN_DESCRIPTION,
- todos=TODOS,
- value=u"1"),
- Model.EnumElement(name=u"name2",
- description=DESCRIPTION,
- issues=ISSUES,
- internal_name=u"internal_name2")]
- self.assertEqual(generator._gen_enum_elements(elements),
- EXPECTED_RESULT_ENUM_ELEMENTS1,
- "Simple enum elements are invalid")
-
- def test_gen_enum(self):
- """Test generation of the enum.
-
- Verifies correct generation of the enum.
-
- """
- generator = SmartFactoryBase.CodeGenerator()
-
- elements1 = collections.OrderedDict()
- elements1[u"name1"] = Model.EnumElement(
- name=u"name1",
- design_description=DESIGN_DESCRIPTION,
- todos=TODOS,
- value=u"1")
- elements1[u"name2"] = Model.EnumElement(
- name=u"name2",
- description=DESCRIPTION,
- issues=ISSUES,
- internal_name=u"internal_name2")
-
- enum1 = Model.Enum(name=u"Enum1",
- todos=TODOS,
- elements=elements1)
-
- self.assertEqual(generator._gen_enum(enum1),
- EXPECTED_RESULT_ENUM1,
- "Simple enum is invalid")
-
- elements2 = collections.OrderedDict()
- elements2[u"xxx"] = Model.EnumElement(name=u"xxx",
- internal_name=u"val_1")
- elements2[u"yyy"] = Model.EnumElement(name=u"yyy",
- internal_name=u"val_2",
- value=u"100")
- elements2[u"zzz"] = Model.EnumElement(name=u"val_3")
-
- enum2 = Model.Enum(name=u"E2",
- elements=elements2)
- self.assertEqual(generator._gen_enum(enum2),
- EXPECTED_RESULT_ENUM2,
- "Long enum is invalid")
-
- self.assertEqual(generator._gen_enums([enum1, enum2],
- collections.OrderedDict()),
- u"{0}\n{1}".format(EXPECTED_RESULT_ENUM1,
- EXPECTED_RESULT_ENUM2),
- "Generated enums are invalid")
-
- def test_normalize_multiline_comments(self):
- """Test normalization of the multiline comments.
-
- Verifies correct normalization of the multiline comments.
-
- """
- generator = SmartFactoryBase.CodeGenerator()
-
- self.assertEqual(generator._normalize_multiline_comments([]), [])
-
- self.assertEqual(generator._normalize_multiline_comments(["aaa",
- "bbb",
- "ccc ccc",
- "ddd\tddd"]),
- ["aaa", "bbb", "ccc ccc", "ddd\tddd"])
- self.assertEqual(generator._normalize_multiline_comments(["aaa\n1",
- "bbb\r\n2",
- "ccc\r3",
- "aaa aaa"]),
- ["aaa", "1", "bbb", "2", "ccc", "3", "aaa aaa"])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py
deleted file mode 100755
index b21e32003..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py
+++ /dev/null
@@ -1,482 +0,0 @@
-"""Test for JSONRPC SmartFactory generator.
-
-Verifies format specific functions and produced source code.
-
-"""
-import collections
-import codecs
-import os
-import unittest
-import uuid
-
-from mock import MagicMock
-from mock import call
-
-from generator.generators import SmartFactoryJSONRPC
-from generator import Model
-
-
-EXPECTED_RESULT_REQUEST = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<FunctionID::eType>::create("""
- u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<messageType::eType>::create("""
- u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
-)
-
-EXPECTED_RESULT_RESPONSE = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<FunctionID::eType>::create("""
- u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<messageType::eType>::create("""
- u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::kCode] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
-)
-
-EXPECTED_RESULT_NOTIFICATION = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<FunctionID::eType>::create("""
- u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<messageType::eType>::create("""
- u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
-)
-
-EXPECTED_PRE_FUNCTION_CODE = (
- u""" std::map<std::string, CObjectSchemaItem::SMember> """
- u"""params_members;\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<FunctionID::eType>::create("""
- u"""function_id_items), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<messageType::eType>::create("""
- u"""message_type_items), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler"""
- u"""::strings::kCode] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::kMessage] = CObjectSchemaItem::SMember("""
- u"""CStringSchemaItem::create(), true);\n"""
- u"""\n"""
- u""" std::map<std::string, CObjectSchemaItem::SMember> """
- u"""root_members_map;\n"""
- u""" root_members_map[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PARAMS] = CObjectSchemaItem::SMember("""
- u"""CObjectSchemaItem::create(params_members), true);\n"""
- u"""\n"""
- u""" CSmartSchema error_response_schema(CObjectSchemaItem::create("""
- u"""root_members_map));\n"""
- u"""\n"""
- u""" functions_schemes_.insert(std::make_pair("""
- u"""NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<"""
- u"""FunctionID::eType, messageType::eType>("""
- u"""FunctionID::request, messageType::error_response)"""
- u""", error_response_schema));\n"""
- u"""\n"""
-)
-
-DESCRIPTION = [u"Description Line1", u"Description Line2"]
-
-DESIGN_DESCRIPTION = [u"Design Line1"]
-
-ISSUES = [Model.Issue(value=u"Issue1"),
- Model.Issue(value=u"Issue2"),
- Model.Issue(value=u"Issue3")]
-
-TODOS = [u"Do1", u"Do2"]
-
-
-class Test(unittest.TestCase):
-
- """Test for JSONRPC SmartFactory generator.
-
- This class holds set of test cases for the JSONRPC SmartFactory generator.
-
- """
-
- def test_gen_schema_params_fill(self):
- """Test feature that allows to create format specific PARAMS.
-
- Verifies JSONRPC implementation of the _gen_schema_params_fill
- method.
-
- """
- generator = SmartFactoryJSONRPC.CodeGenerator()
-
- self.assertEqual(generator._gen_schema_params_fill("request"),
- EXPECTED_RESULT_REQUEST,
- "Invalid code generation for request")
-
- self.assertEqual(generator._gen_schema_params_fill(u"request"),
- EXPECTED_RESULT_REQUEST,
- "Invalid code generation for request")
-
- self.assertEqual(generator._gen_schema_params_fill("response"),
- EXPECTED_RESULT_RESPONSE,
- "Invalid code generation for response")
-
- self.assertEqual(generator._gen_schema_params_fill(u"response"),
- EXPECTED_RESULT_RESPONSE,
- "Invalid code generation for response")
-
- self.assertEqual(generator._gen_schema_params_fill("notification"),
- EXPECTED_RESULT_NOTIFICATION,
- "Invalid code generation for notification")
-
- self.assertEqual(generator._gen_schema_params_fill(u"notification"),
- EXPECTED_RESULT_NOTIFICATION,
- "Invalid code generation for notification")
-
- def test_preprocess_message_type(self):
- """Test preprocessing of the message_type enum.
-
- Verifies JSONPRC implementation of the _preprocess_message_type
- function.
-
- """
-
- generator = SmartFactoryJSONRPC.CodeGenerator()
-
- message_type_elements = collections.OrderedDict()
- message_type_elements[u"request"] = Model.EnumElement(name=u"request")
- message_type_elements[u"response"] = Model.EnumElement(
- name=u"response")
- message_type_elements[u"notification"] = Model.EnumElement(
- name=u"notification")
-
- message_type = Model.Enum(name=u"messageType",
- elements=message_type_elements)
-
- result_enum = generator._preprocess_message_type(message_type)
-
- self.assertIn("error_response", result_enum.elements)
- self.assertEqual("error_response",
- result_enum.elements["error_response"].primary_name)
-
- message_type_elements = collections.OrderedDict()
- message_type_elements[u"request"] = Model.EnumElement(name=u"request")
- message_type_elements[u"notification"] = Model.EnumElement(
- name=u"notification")
-
- message_type = Model.Enum(name=u"messageType",
- elements=message_type_elements)
-
- result_enum = generator._preprocess_message_type(message_type)
-
- self.assertNotIn("error_response", result_enum.elements)
-
- def test_gen_pre_function_schemas(self):
- """Test code that goes before schema initialization.
-
- Verifies JSONPRC implementation of the _gen_pre_function_schemas
- function.
-
- """
-
- generator = SmartFactoryJSONRPC.CodeGenerator()
-
- self.assertEqual(u"",
- generator._gen_pre_function_schemas([]),
- "Invalid code for empty functions list")
-
- message_type_elements = collections.OrderedDict()
- message_type_elements[u"request"] = Model.EnumElement(name=u"request")
- message_type_elements[u"response"] = Model.EnumElement(
- name=u"response")
- message_type_elements[u"notification"] = Model.EnumElement(
- name=u"notification")
-
- message_type = Model.Enum(name=u"messageType",
- elements=message_type_elements)
-
- function1 = Model.Function(
- "func1", function_id=message_type.elements[u"request"],
- message_type=message_type.elements[u"request"])
-
- self.assertEqual(u"",
- generator._gen_pre_function_schemas([function1]),
- "Invalid code for empty functions list")
-
- function2 = Model.Function(
- "func2", function_id=message_type.elements[u"request"],
- message_type=message_type.elements[u"response"])
-
- self.assertEqual(EXPECTED_PRE_FUNCTION_CODE,
- generator._gen_pre_function_schemas([function2]),
- "Invalid code for single response function")
-
- self.assertEqual(EXPECTED_PRE_FUNCTION_CODE,
- generator._gen_pre_function_schemas([function1,
- function2]),
- "Invalid code for mixed function list")
-
- def test_full_generation(self):
- """Test full generation using JSONRPC SmartSchema generator.
-
- Creates output files which is captured by the mock and compare them
- with sample files with correct code. This test requires valid
- test_expected_jsonrpc.h and test_expected_jsonrpc.cc in the same
- directory as this module.
-
- """
-
- expected_h_file_content = open("test_expected_jsonrpc.h", "r").read()
- expected_cc_file_content = open("test_expected_jsonrpc.cc", "r").read()
-
- generator = SmartFactoryJSONRPC.CodeGenerator()
-
- message_type_elements = collections.OrderedDict()
- message_type_elements[u"request"] = Model.EnumElement(name=u"request")
- message_type_elements[u"response"] = Model.EnumElement(
- name=u"response")
- message_type_elements[u"notification"] = Model.EnumElement(
- name=u"notification")
-
- message_type = Model.Enum(name=u"messageType",
- elements=message_type_elements)
-
- elements1 = collections.OrderedDict()
- elements1[u"name1"] = Model.EnumElement(
- name=u"name1",
- design_description=DESIGN_DESCRIPTION,
- todos=TODOS,
- value=u"1")
- elements1[u"name2"] = Model.EnumElement(
- name="name2",
- description=DESCRIPTION,
- issues=ISSUES,
- internal_name=u"internal_name2")
-
- enum1 = Model.Enum(name=u"Enum1",
- todos=TODOS,
- elements=elements1)
-
- elements2 = collections.OrderedDict()
- elements2[u"xxx"] = Model.EnumElement(name=u"xxx",
- internal_name=u"val_1")
- elements2[u"yyy"] = Model.EnumElement(name=u"yyy",
- internal_name=u"val_2",
- value=u"100")
- elements2[u"zzz"] = Model.EnumElement(name=u"val_3")
-
- enum2 = Model.Enum(name=u"E2",
- elements=elements2)
-
- elements3 = collections.OrderedDict()
- elements3["1"] = Model.EnumElement(name="xxx",
- internal_name="_1")
- elements3["2"] = Model.EnumElement(name="xxx",
- internal_name="_2")
- elements3["3"] = Model.EnumElement(name="xxx",
- internal_name="_3")
- enum3 = Model.Enum(name="Enum_new2",
- elements=elements3)
-
- elements4 = collections.OrderedDict()
- elements4["name1"] = Model.EnumElement(name="xxx",
- internal_name="_11")
- elements4["name2"] = Model.EnumElement(name="xxx",
- internal_name="_22")
- enum4 = Model.Enum(name="Enum_new4",
- elements=elements4)
-
- enums = collections.OrderedDict()
- enums["Enum1"] = enum1
- enums["Enum2"] = enum2
- enums["Enum3"] = enum3
- enums["Enum4"] = enum4
- enums["messageType"] = message_type
-
- params1 = collections.OrderedDict()
- params1["1"] = Model.FunctionParam(
- name="param1",
- design_description=DESIGN_DESCRIPTION,
- description=DESCRIPTION,
- issues=ISSUES,
- todos=TODOS,
- param_type=enum4,
- default_value=elements4["name1"])
- params1["2"] = Model.FunctionParam(
- name="param2",
- param_type=Model.EnumSubset(
- name="sub1",
- enum=enum1,
- allowed_elements={"e1": elements1["name1"]}),
- default_value=elements1["name1"])
-
- functions = collections.OrderedDict()
- functions["Function1"] = Model.Function(
- name="Function1",
- function_id=elements1["name1"],
- message_type=message_type_elements["request"],
- params=params1)
- functions["Function2"] = Model.Function(
- name="Function2",
- function_id=elements2["xxx"],
- message_type=message_type_elements["response"])
- functions["Function3"] = Model.Function(
- name="Function2",
- function_id=elements2["yyy"],
- message_type=message_type_elements["notification"])
-
- members1 = collections.OrderedDict()
- members1["m1"] = Model.Param(name="intParam",
- param_type=Model.Integer(max_value=2))
- members1["m11"] = Model.Param(name="doubleParam",
- param_type=Model.Double(min_value=0.333),
- is_mandatory=False)
- members1["m222"] = Model.Param(name="boolParam",
- param_type=Model.Boolean())
- members1["m2"] = Model.Param(name="structParam",
- param_type=Model.Struct(name="Struct2"))
- members1["aaa"] = Model.Param(name="enumParam",
- param_type=enum1)
- members1["bbb"] = Model.Param(name="enumParam1",
- param_type=enum1)
- members1["xxx"] = Model.Param(
- name="enumSubset1",
- param_type=Model.EnumSubset(
- name="sub",
- enum=enum1,
- allowed_elements={"e1": elements1["name1"]}),
- is_mandatory=False)
- members1["1"] = Model.Param(
- name="arrayOfInt",
- param_type=Model.Array(min_size=0,
- max_size=20,
- element_type=Model.Boolean()),
- is_mandatory=False)
- members1["2"] = Model.Param(
- name="arrayOfEnum1",
- param_type=Model.Array(min_size=0,
- max_size=20,
- element_type=enum1),
- is_mandatory=False)
- members1["3"] = Model.Param(
- name="arrayOfEnum3",
- param_type=Model.Array(min_size=10,
- max_size=40,
- element_type=enum3),
- is_mandatory=True)
- members1["4"] = Model.Param(
- name="arrayOfEnum4",
- param_type=Model.Array(
- min_size=10,
- max_size=41,
- element_type=Model.EnumSubset(
- name="sub1",
- enum=enum1,
- allowed_elements={"e1": elements1["name1"]})))
- members1["5"] = Model.Param(
- name="arrayOfEnum5",
- param_type=Model.Array(
- min_size=10,
- max_size=42,
- element_type=Model.EnumSubset(
- name="sub2",
- enum=enum1,
- allowed_elements={"e1": elements1["name2"]})))
- members1["6"] = Model.Param(
- name="arrayOfEnum6",
- param_type=Model.Array(
- min_size=10,
- max_size=43,
- element_type=Model.EnumSubset(
- name="sub3",
- enum=enum4,
- allowed_elements={"e1": elements4["name2"]})))
-
- structs = collections.OrderedDict()
- structs["Struct1"] = Model.Struct(
- name="Struct1",
- design_description=DESIGN_DESCRIPTION,
- issues=ISSUES,
- members=members1)
- structs["Struct2"] = Model.Struct(name="Struct2",
- issues=ISSUES)
-
- interface = Model.Interface(enums=enums,
- structs=structs,
- functions=functions,
- params={"param1": "value1",
- "param2": "value2"})
-
- os.path.exists = MagicMock(return_value=True)
- uuid.uuid1 = MagicMock(
- return_value=uuid.UUID("12345678123456781234567812345678"))
- codecs.open = MagicMock()
-
- generator.generate(interface=interface,
- filename="Test.xml",
- namespace="XXX::YYY::ZZZ",
- destination_dir="/some/test/dir")
-
- os.path.exists.assert_has_calls([call('/some/test/dir')])
-
- open_result = codecs.open
- mock_calls = open_result.mock_calls
-
- self.assertEqual(mock_calls[0],
- call('/some/test/dir/Test.h',
- mode='w',
- encoding='utf-8'),
- "Invalid header file creation")
-
- self.assertEqual(mock_calls[4],
- call('/some/test/dir/Test.cc',
- mode='w',
- encoding='utf-8'),
- "Invalid source file creation")
-
- self.assertEqual(str(mock_calls[2])[27:-2].replace("\\n", "\n"),
- expected_h_file_content,
- "Invalid header file content")
-
- self.assertEqual(str(mock_calls[6])[27:-2].replace("\\n", "\n"),
- expected_cc_file_content,
- "Invalid source file content")
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py
deleted file mode 100755
index 111ffb3cb..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py
+++ /dev/null
@@ -1,325 +0,0 @@
-"""Test for SDLRPC SmartFactory generator.
-
-Verifies format specific functions and produced source code.
-
-"""
-import collections
-import codecs
-import os
-import unittest
-import uuid
-
-from mock import MagicMock
-from mock import call
-
-from generator.generators import SmartFactorySDLRPC
-from generator import Model
-
-
-EXPECTED_NOTIFICATION_RESULT = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<FunctionID::eType>::create("""
- u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
- u"""TEnumSchemaItem<messageType::eType>::create("""
- u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n""")
-
-EXPECTED_REQ_RESP_RESULT = "".join([EXPECTED_NOTIFICATION_RESULT, (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
- u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
- u"""TNumberSchemaItem<int>::create(), true);\n""")])
-
-DESCRIPTION = [u"Description Line1", u"Description Line2"]
-
-DESIGN_DESCRIPTION = [u"Design Line1"]
-
-ISSUES = [Model.Issue(value=u"Issue1"),
- Model.Issue(value=u"Issue2"),
- Model.Issue(value=u"Issue3")]
-
-TODOS = [u"Do1", u"Do2"]
-
-
-class Test(unittest.TestCase):
-
- """Test for SLDRPC SmartFactory generator.
-
- This class holds set of test cases for the SDLRPC SmartFactory generator.
-
- """
-
- def test_gen_schema_params_fill(self):
- """Test feature that allows to create format specific PARAMS.
-
- Verifies SDLRPC implementation of the _gen_schema_params_fill
- method.
-
- """
-
- generator = SmartFactorySDLRPC.CodeGenerator()
-
- self.assertEqual(generator._gen_schema_params_fill("request"),
- EXPECTED_REQ_RESP_RESULT,
- "Invalid code generation for request")
-
- self.assertEqual(generator._gen_schema_params_fill(u"request"),
- EXPECTED_REQ_RESP_RESULT,
- "Invalid code generation for request")
-
- self.assertEqual(generator._gen_schema_params_fill("response"),
- EXPECTED_REQ_RESP_RESULT,
- "Invalid code generation for response")
-
- self.assertEqual(generator._gen_schema_params_fill(u"response"),
- EXPECTED_REQ_RESP_RESULT,
- "Invalid code generation for response")
-
- self.assertEqual(generator._gen_schema_params_fill("notification"),
- EXPECTED_NOTIFICATION_RESULT,
- "Invalid code generation for notification")
-
- self.assertEqual(generator._gen_schema_params_fill(u"notification"),
- EXPECTED_NOTIFICATION_RESULT,
- "Invalid code generation for notification")
-
- self.assertEqual(generator._gen_schema_params_fill("some text"),
- EXPECTED_REQ_RESP_RESULT,
- "Invalid code generation")
-
- self.assertEqual(generator._gen_schema_params_fill(u"some text"),
- EXPECTED_REQ_RESP_RESULT,
- "Invalid code generation")
-
- def test_full_generation(self):
- """Test full generation using SDLPRC SmartSchema generator.
-
- Creates output files which is captured by the mock and compare them
- with sample files with correct code. This test requires valid
- test_expected_sdlrpc.h and test_expected_sdlrpc.cc in the same as
- this module.
-
- """
-
- expected_h_file_content = open("test_expected_sdlrpc.h", "r").read()
- expected_cc_file_content = open("test_expected_sdlrpc.cc", "r").read()
-
- generator = SmartFactorySDLRPC.CodeGenerator()
-
- message_type_elements = collections.OrderedDict()
- message_type_elements[u"request"] = Model.EnumElement(name=u"request")
- message_type_elements[u"response"] = Model.EnumElement(
- name=u"response")
- message_type_elements[u"notification"] = Model.EnumElement(
- name=u"notification")
-
- message_type = Model.Enum(name=u"messageType",
- elements=message_type_elements)
-
- elements1 = collections.OrderedDict()
- elements1[u"name1"] = Model.EnumElement(
- name=u"name1",
- design_description=DESIGN_DESCRIPTION,
- todos=TODOS,
- value=u"1")
- elements1[u"name2"] = Model.EnumElement(
- name="name2",
- description=DESCRIPTION,
- issues=ISSUES,
- internal_name=u"internal_name2")
-
- enum1 = Model.Enum(name=u"Enum1",
- todos=TODOS,
- elements=elements1)
-
- elements2 = collections.OrderedDict()
- elements2[u"xxx"] = Model.EnumElement(name=u"xxx",
- internal_name=u"val_1")
- elements2[u"yyy"] = Model.EnumElement(name=u"yyy",
- internal_name=u"val_2",
- value=u"100")
- elements2[u"zzz"] = Model.EnumElement(name=u"val_3")
-
- enum2 = Model.Enum(name=u"E2",
- elements=elements2)
-
- elements3 = collections.OrderedDict()
- elements3["1"] = Model.EnumElement(name="xxx",
- internal_name="_1")
- elements3["2"] = Model.EnumElement(name="xxx",
- internal_name="_2")
- elements3["3"] = Model.EnumElement(name="xxx",
- internal_name="_3")
- enum3 = Model.Enum(name="Enum_new2",
- elements=elements3)
-
- elements4 = collections.OrderedDict()
- elements4["name1"] = Model.EnumElement(name="xxx",
- internal_name="_11")
- elements4["name2"] = Model.EnumElement(name="xxx",
- internal_name="_22")
- enum4 = Model.Enum(name="Enum_new4",
- elements=elements4)
-
- enums = collections.OrderedDict()
- enums["Enum1"] = enum1
- enums["Enum2"] = enum2
- enums["Enum3"] = enum3
- enums["Enum4"] = enum4
- enums["messageType"] = message_type
-
- params1 = collections.OrderedDict()
- params1["1"] = Model.FunctionParam(
- name="param1",
- design_description=DESIGN_DESCRIPTION,
- description=DESCRIPTION,
- issues=ISSUES,
- todos=TODOS,
- param_type=enum4,
- default_value=elements4["name1"])
- params1["2"] = Model.FunctionParam(
- name="param2",
- param_type=Model.EnumSubset(
- name="sub1",
- enum=enum1,
- allowed_elements={"e1": elements1["name1"]}),
- default_value=elements1["name1"])
-
- functions = collections.OrderedDict()
- functions["Function1"] = Model.Function(
- name="Function1",
- function_id=elements1["name1"],
- message_type=message_type_elements["request"],
- params=params1)
- functions["Function2"] = Model.Function(
- name="Function2",
- function_id=elements2["xxx"],
- message_type=message_type_elements["response"])
- functions["Function3"] = Model.Function(
- name="Function2",
- function_id=elements2["yyy"],
- message_type=message_type_elements["notification"])
-
- members1 = collections.OrderedDict()
- members1["m1"] = Model.Param(name="intParam",
- param_type=Model.Integer(max_value=2))
- members1["m11"] = Model.Param(name="doubleParam",
- param_type=Model.Double(min_value=0.333),
- is_mandatory=False)
- members1["m222"] = Model.Param(name="boolParam",
- param_type=Model.Boolean())
- members1["m2"] = Model.Param(name="structParam",
- param_type=Model.Struct(name="Struct2"))
- members1["aaa"] = Model.Param(name="enumParam",
- param_type=enum1)
- members1["bbb"] = Model.Param(name="enumParam1",
- param_type=enum1)
- members1["xxx"] = Model.Param(
- name="enumSubset1",
- param_type=Model.EnumSubset(
- name="sub",
- enum=enum1,
- allowed_elements={"e1": elements1["name1"]}),
- is_mandatory=False)
- members1["1"] = Model.Param(
- name="arrayOfInt",
- param_type=Model.Array(min_size=0,
- max_size=20,
- element_type=Model.Boolean()),
- is_mandatory=False)
- members1["2"] = Model.Param(
- name="arrayOfEnum1",
- param_type=Model.Array(min_size=0,
- max_size=20,
- element_type=enum1),
- is_mandatory=False)
- members1["3"] = Model.Param(
- name="arrayOfEnum3",
- param_type=Model.Array(min_size=10,
- max_size=40,
- element_type=enum3),
- is_mandatory=True)
- members1["4"] = Model.Param(
- name="arrayOfEnum4",
- param_type=Model.Array(
- min_size=10,
- max_size=41,
- element_type=Model.EnumSubset(
- name="sub1",
- enum=enum1,
- allowed_elements={"e1": elements1["name1"]})))
- members1["5"] = Model.Param(
- name="arrayOfEnum5",
- param_type=Model.Array(
- min_size=10,
- max_size=42,
- element_type=Model.EnumSubset(
- name="sub2",
- enum=enum1,
- allowed_elements={"e1": elements1["name2"]})))
- members1["6"] = Model.Param(
- name="arrayOfEnum6",
- param_type=Model.Array(
- min_size=10,
- max_size=43,
- element_type=Model.EnumSubset(
- name="sub3",
- enum=enum4,
- allowed_elements={"e1": elements4["name2"]})))
-
- structs = collections.OrderedDict()
- structs["Struct1"] = Model.Struct(
- name="Struct1",
- design_description=DESIGN_DESCRIPTION,
- issues=ISSUES,
- members=members1)
- structs["Struct2"] = Model.Struct(name="Struct2",
- issues=ISSUES)
-
- interface = Model.Interface(enums=enums,
- structs=structs,
- functions=functions,
- params={"param1": "value1",
- "param2": "value2"})
-
- os.path.exists = MagicMock(return_value=True)
- uuid.uuid1 = MagicMock(
- return_value=uuid.UUID("12345678123456781234567812345678"))
- codecs.open = MagicMock()
-
- generator.generate(interface=interface,
- filename="Test.xml",
- namespace="XXX::YYY::ZZZ",
- destination_dir="/some/test/dir")
-
- os.path.exists.assert_has_calls([call('/some/test/dir')])
-
- open_result = codecs.open
- mock_calls = open_result.mock_calls
-
- self.assertEqual(mock_calls[0],
- call('/some/test/dir/Test.h',
- mode='w',
- encoding='utf-8'),
- "Invalid header file creation")
-
- self.assertEqual(mock_calls[4],
- call('/some/test/dir/Test.cc',
- mode='w',
- encoding='utf-8'),
- "Invalid source file creation")
-
- self.assertEqual(str(mock_calls[2])[27:-2].replace("\\n", "\n"),
- expected_h_file_content,
- "Invalid header file content")
-
- self.assertEqual(str(mock_calls[6])[27:-2].replace("\\n", "\n"),
- expected_cc_file_content,
- "Invalid source file content")
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc
deleted file mode 100644
index 458c27543..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc
+++ /dev/null
@@ -1,385 +0,0 @@
-/**
- * @file Test.cc
- * @brief Generated class Test source file.
- *
- * This class is a part of SmartObjects solution. It provides
- * factory functionallity which allows client to use SmartSchemas
- * in accordance with definitions from Test.xml file
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include <map>
-#include <set>
-
-#include "Test.h"
-#include "SmartObjects/CAlwaysTrueSchemaItem.hpp"
-#include "SmartObjects/CAlwaysFalseSchemaItem.hpp"
-#include "SmartObjects/CArraySchemaItem.hpp"
-#include "SmartObjects/CBoolSchemaItem.hpp"
-#include "SmartObjects/CObjectSchemaItem.hpp"
-#include "SmartObjects/CStringSchemaItem.hpp"
-#include "SmartObjects/TEnumSchemaItem.hpp"
-#include "SmartObjects/TNumberSchemaItem.hpp"
-#include "SmartObjects/TSchemaItemParameter.hpp"
-
-using namespace NsSmartDeviceLink::NsSmartObjects;
-
-XXX::YYY::ZZZ::Test::Test()
- : CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType>() {
- TStructsSchemaItems struct_schema_items;
- InitStructSchemes(struct_schema_items);
-
- std::set<FunctionID::eType> function_id_items;
-
-
- std::set<messageType::eType> message_type_items;
- message_type_items.insert(messageType::request);
- message_type_items.insert(messageType::response);
- message_type_items.insert(messageType::notification);
- message_type_items.insert(messageType::error_response);
-
- InitFunctionSchemes(struct_schema_items, function_id_items, message_type_items);
-}
-
-TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::ProvideObjectSchemaItemForStruct(
- const TStructsSchemaItems &struct_schema_items,
- const StructIdentifiers::eType struct_id) {
- const TStructsSchemaItems::const_iterator it = struct_schema_items.find(struct_id);
- if (it != struct_schema_items.end()) {
- return it->second;
- }
-
- return NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem::create();
-}
-
-void XXX::YYY::ZZZ::Test::InitStructSchemes(
- TStructsSchemaItems &struct_schema_items) {
- TSharedPtr<ISchemaItem> struct_schema_item_Struct2 = InitStructSchemaItem_Struct2(struct_schema_items);
- struct_schema_items.insert(std::make_pair(StructIdentifiers::Struct2, struct_schema_item_Struct2));
- structs_schemes_.insert(std::make_pair(StructIdentifiers::Struct2, CSmartSchema(struct_schema_item_Struct2)));
-
- TSharedPtr<ISchemaItem> struct_schema_item_Struct1 = InitStructSchemaItem_Struct1(struct_schema_items);
- struct_schema_items.insert(std::make_pair(StructIdentifiers::Struct1, struct_schema_item_Struct1));
- structs_schemes_.insert(std::make_pair(StructIdentifiers::Struct1, CSmartSchema(struct_schema_item_Struct1)));
-}
-
-void XXX::YYY::ZZZ::Test::InitFunctionSchemes(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::kCode] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::kMessage] = CObjectSchemaItem::SMember(CStringSchemaItem::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- CSmartSchema error_response_schema(CObjectSchemaItem::create(root_members_map));
-
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::error_response), error_response_schema));
-
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::name1, messageType::request), InitFunction_name1_request(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::response), InitFunction_val_1_response(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_2, messageType::notification), InitFunction_val_2_notification(struct_schema_items, function_id_items, message_type_items)));
-}
-
-//------------- Functions schemes initialization -------------
-
-CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_name1_request(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::set<Enum_new4::eType> Enum_new4_all_enum_values;
- Enum_new4_all_enum_values.insert(Enum_new4::_11);
- Enum_new4_all_enum_values.insert(Enum_new4::_22);
-
- std::set<Enum1::eType> param2_allowed_enum_subset_values;
- param2_allowed_enum_subset_values.insert(Enum1::name1);
-
- // Function parameter param1.
- //
- // Description Line1
- // Description Line2
- //
- // Design Line1
- //
- // Note: Issue1
- // Note: Issue2
- // Note: Issue3
- //
- // ToDo: Do1
- // ToDo: Do2
- TSharedPtr<ISchemaItem> param1_SchemaItem = TEnumSchemaItem<Enum_new4::eType>::create(Enum_new4_all_enum_values, TSchemaItemParameter<Enum_new4::eType>(Enum_new4::_11));
-
- // Function parameter param2.
- TSharedPtr<ISchemaItem> param2_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(param2_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>(name1));
-
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- schema_members["param1"] = CObjectSchemaItem::SMember(param1_SchemaItem, true);
- schema_members["param2"] = CObjectSchemaItem::SMember(param2_SchemaItem, true);
-
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- return CSmartSchema(CObjectSchemaItem::create(root_members_map));
-}
-
-CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_1_response(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::kCode] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- return CSmartSchema(CObjectSchemaItem::create(root_members_map));
-}
-
-CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_2_notification(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- return CSmartSchema(CObjectSchemaItem::create(root_members_map));
-}
-
-//----------- Structs schema items initialization ------------
-
-TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::InitStructSchemaItem_Struct1(
- const TStructsSchemaItems &struct_schema_items) {
- std::set<Enum1::eType> Enum1_all_enum_values;
- Enum1_all_enum_values.insert(Enum1::name1);
- Enum1_all_enum_values.insert(Enum1::internal_name2);
-
- std::set<Enum1::eType> enumSubset1_allowed_enum_subset_values;
- enumSubset1_allowed_enum_subset_values.insert(Enum1::name1);
-
- std::set<Enum_new2::eType> Enum_new2_all_enum_values;
- Enum_new2_all_enum_values.insert(Enum_new2::_1);
- Enum_new2_all_enum_values.insert(Enum_new2::_2);
- Enum_new2_all_enum_values.insert(Enum_new2::_3);
-
- std::set<Enum1::eType> sub1_allowed_enum_subset_values;
- sub1_allowed_enum_subset_values.insert(Enum1::name1);
-
- std::set<Enum1::eType> sub2_allowed_enum_subset_values;
- sub2_allowed_enum_subset_values.insert(Enum1::internal_name2);
-
- std::set<Enum_new4::eType> sub3_allowed_enum_subset_values;
- sub3_allowed_enum_subset_values.insert(Enum_new4::_22);
-
- // Struct member intParam.
- TSharedPtr<ISchemaItem> intParam_SchemaItem = TNumberSchemaItem<int>::create(TSchemaItemParameter<int>(), TSchemaItemParameter<int>(2), TSchemaItemParameter<int>());
-
- // Struct member doubleParam.
- TSharedPtr<ISchemaItem> doubleParam_SchemaItem = TNumberSchemaItem<double>::create(TSchemaItemParameter<double>(0.333), TSchemaItemParameter<double>(), TSchemaItemParameter<double>());
-
- // Struct member boolParam.
- TSharedPtr<ISchemaItem> boolParam_SchemaItem = CBoolSchemaItem::create(TSchemaItemParameter<bool>());
-
- // Struct member structParam.
- TSharedPtr<ISchemaItem> structParam_SchemaItem = ProvideObjectSchemaItemForStruct(struct_schema_items, StructIdentifiers::Struct2);
-
- // Struct member enumParam.
- TSharedPtr<ISchemaItem> enumParam_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(Enum1_all_enum_values, TSchemaItemParameter<Enum1::eType>());
-
- // Struct member enumParam1.
- TSharedPtr<ISchemaItem> enumParam1_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(Enum1_all_enum_values, TSchemaItemParameter<Enum1::eType>());
-
- // Struct member enumSubset1.
- TSharedPtr<ISchemaItem> enumSubset1_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(enumSubset1_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>());
-
- // Struct member arrayOfInt.
- TSharedPtr<ISchemaItem> arrayOfInt_SchemaItem = CArraySchemaItem::create(CBoolSchemaItem::create(TSchemaItemParameter<bool>()), TSchemaItemParameter<size_t>(0), TSchemaItemParameter<size_t>(20));
-
- // Struct member arrayOfEnum1.
- TSharedPtr<ISchemaItem> arrayOfEnum1_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum1::eType>::create(Enum1_all_enum_values, TSchemaItemParameter<Enum1::eType>()), TSchemaItemParameter<size_t>(0), TSchemaItemParameter<size_t>(20));
-
- // Struct member arrayOfEnum3.
- TSharedPtr<ISchemaItem> arrayOfEnum3_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum_new2::eType>::create(Enum_new2_all_enum_values, TSchemaItemParameter<Enum_new2::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(40));
-
- // Struct member arrayOfEnum4.
- TSharedPtr<ISchemaItem> arrayOfEnum4_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum1::eType>::create(sub1_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(41));
-
- // Struct member arrayOfEnum5.
- TSharedPtr<ISchemaItem> arrayOfEnum5_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum1::eType>::create(sub2_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(42));
-
- // Struct member arrayOfEnum6.
- TSharedPtr<ISchemaItem> arrayOfEnum6_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum_new4::eType>::create(sub3_allowed_enum_subset_values, TSchemaItemParameter<Enum_new4::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(43));
-
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- schema_members["intParam"] = CObjectSchemaItem::SMember(intParam_SchemaItem, true);
- schema_members["doubleParam"] = CObjectSchemaItem::SMember(doubleParam_SchemaItem, false);
- schema_members["boolParam"] = CObjectSchemaItem::SMember(boolParam_SchemaItem, true);
- schema_members["structParam"] = CObjectSchemaItem::SMember(structParam_SchemaItem, true);
- schema_members["enumParam"] = CObjectSchemaItem::SMember(enumParam_SchemaItem, true);
- schema_members["enumParam1"] = CObjectSchemaItem::SMember(enumParam1_SchemaItem, true);
- schema_members["enumSubset1"] = CObjectSchemaItem::SMember(enumSubset1_SchemaItem, false);
- schema_members["arrayOfInt"] = CObjectSchemaItem::SMember(arrayOfInt_SchemaItem, false);
- schema_members["arrayOfEnum1"] = CObjectSchemaItem::SMember(arrayOfEnum1_SchemaItem, false);
- schema_members["arrayOfEnum3"] = CObjectSchemaItem::SMember(arrayOfEnum3_SchemaItem, true);
- schema_members["arrayOfEnum4"] = CObjectSchemaItem::SMember(arrayOfEnum4_SchemaItem, true);
- schema_members["arrayOfEnum5"] = CObjectSchemaItem::SMember(arrayOfEnum5_SchemaItem, true);
- schema_members["arrayOfEnum6"] = CObjectSchemaItem::SMember(arrayOfEnum6_SchemaItem, true);
-
- return CObjectSchemaItem::create(schema_members);
-}
-
-TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::InitStructSchemaItem_Struct2(
- const TStructsSchemaItems &struct_schema_items) {
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- return CObjectSchemaItem::create(schema_members);
-}
-
-//-------------- String to value enum mapping ----------------
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-template <>
-const std::map<XXX::YYY::ZZZ::Enum1::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum1::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::Enum1::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum1::name1, "name1"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum1::internal_name2, "name2"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::E2::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::E2::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::E2::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::E2::val_1, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::E2::val_2, "yyy"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::E2::val_3, "val_3"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::Enum_new2::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum_new2::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::Enum_new2::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new2::_1, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new2::_2, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new2::_3, "xxx"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::Enum_new4::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum_new4::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::Enum_new4::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new4::_11, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new4::_22, "xxx"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::messageType::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::messageType::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::messageType::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::request, "request"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::response, "response"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::notification, "notification"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::error_response, "error_response"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-} // NsSmartObjects
-} // NsSmartDeviceLink
-
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h
deleted file mode 100644
index b26560348..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * @file Test.h
- * @brief Generated class Test header file.
- *
- * This class is a part of SmartObjects solution. It provides
- * factory functionallity which allows client to use SmartSchemas
- * in accordance with definitions from Test.xml file
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef __CSMARTFACTORY_TEST_12345678123456781234567812345678_H__
-#define __CSMARTFACTORY_TEST_12345678123456781234567812345678_H__
-
-#include "JSONHandler/CSmartFactory.hpp"
-#include "SmartObjects/CSmartSchema.hpp"
-#include "SmartObjects/ISchemaItem.hpp"
-#include "SmartObjects/TSharedPtr.hpp"
-
-namespace XXX {
-namespace YYY {
-namespace ZZZ {
-
-namespace StructIdentifiers {
-/**
- * @brief Enumeration StructIdentifiers.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief Struct1.
- */
- Struct1,
-
- /**
- * @brief Struct2.
- */
- Struct2
-};
-} // StructIdentifiers
-
-namespace Enum1 {
-/**
- * @brief Enumeration Enum1.
- *
- * @todo Do1
- * @todo Do2
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief name1.
- *
- * Design Line1
- *
- * @todo Do1
- * @todo Do2
- */
- name1 = 1,
-
- /**
- * @brief internal_name2.
- *
- * Description Line1
- * Description Line2
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- internal_name2
-};
-} // Enum1
-
-namespace E2 {
-/**
- * @brief Enumeration E2.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief val_1.
- */
- val_1,
-
- /**
- * @brief val_2.
- */
- val_2 = 100,
-
- /**
- * @brief val_3.
- */
- val_3
-};
-} // E2
-
-namespace Enum_new2 {
-/**
- * @brief Enumeration Enum_new2.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief _1.
- */
- _1,
-
- /**
- * @brief _2.
- */
- _2,
-
- /**
- * @brief _3.
- */
- _3
-};
-} // Enum_new2
-
-namespace Enum_new4 {
-/**
- * @brief Enumeration Enum_new4.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief _11.
- */
- _11,
-
- /**
- * @brief _22.
- */
- _22
-};
-} // Enum_new4
-
-namespace messageType {
-/**
- * @brief Enumeration messageType.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief request.
- */
- request,
-
- /**
- * @brief response.
- */
- response,
-
- /**
- * @brief notification.
- */
- notification,
-
- /**
- * @brief error_response.
- */
- error_response
-};
-} // messageType
-
-
-/**
- * @brief Class Test.
- *
- * Params:
- * param2 - value2
- * param1 - value1
- */
-class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType> {
- public:
- /**
- * @brief Constructor.
- */
- Test();
-
- protected:
- /**
- * @brief Type that maps of struct IDs to schema items.
- */
- typedef std::map<const StructIdentifiers::eType, NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> > TStructsSchemaItems;
-
- /**
- * @brief Helper that allows to make reference to struct
- *
- * @param struct_schema_items Struct schema items.
- * @param struct_id ID of structure to provide.
- *
- * @return TSharedPtr of strucute
- */
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> ProvideObjectSchemaItemForStruct(
- const TStructsSchemaItems &struct_schema_items,
- const StructIdentifiers::eType struct_id);
-
- /**
- * @brief Initializes all struct schemes.
- */
- void InitStructSchemes(TStructsSchemaItems &struct_schema_items);
-
- /**
- * @brief Initializes all function schemes.
- *
- * @param struct_schema_items Struct schema items.
- * @param function_id_items Set of all elements of FunctionID enum.
- * @param message_type_items Set of all elements of messageType enum.
- */
- void InitFunctionSchemes(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema for function Function1.
- *
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_name1_request(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema for function Function2.
- *
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_1_response(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema for function Function2.
- *
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_2_notification(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema item for structure Struct1.
- *
- * Design Line1
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct1(
- const TStructsSchemaItems &struct_schema_items);
-
- /**
- * @brief Method that generates schema item for structure Struct2.
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct2(
- const TStructsSchemaItems &struct_schema_items);
-};
-
-} // XXX
-} // YYY
-} // ZZZ
-
-#endif //__CSMARTFACTORY_TEST_12345678123456781234567812345678_H__
-
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc
deleted file mode 100644
index 53e5b7f78..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc
+++ /dev/null
@@ -1,366 +0,0 @@
-/**
- * @file Test.cc
- * @brief Generated class Test source file.
- *
- * This class is a part of SmartObjects solution. It provides
- * factory functionallity which allows client to use SmartSchemas
- * in accordance with definitions from Test.xml file
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include <map>
-#include <set>
-
-#include "Test.h"
-#include "SmartObjects/CAlwaysTrueSchemaItem.hpp"
-#include "SmartObjects/CAlwaysFalseSchemaItem.hpp"
-#include "SmartObjects/CArraySchemaItem.hpp"
-#include "SmartObjects/CBoolSchemaItem.hpp"
-#include "SmartObjects/CObjectSchemaItem.hpp"
-#include "SmartObjects/CStringSchemaItem.hpp"
-#include "SmartObjects/TEnumSchemaItem.hpp"
-#include "SmartObjects/TNumberSchemaItem.hpp"
-#include "SmartObjects/TSchemaItemParameter.hpp"
-
-using namespace NsSmartDeviceLink::NsSmartObjects;
-
-XXX::YYY::ZZZ::Test::Test()
- : CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType>() {
- TStructsSchemaItems struct_schema_items;
- InitStructSchemes(struct_schema_items);
-
- std::set<FunctionID::eType> function_id_items;
-
-
- std::set<messageType::eType> message_type_items;
- message_type_items.insert(messageType::request);
- message_type_items.insert(messageType::response);
- message_type_items.insert(messageType::notification);
-
- InitFunctionSchemes(struct_schema_items, function_id_items, message_type_items);
-}
-
-TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::ProvideObjectSchemaItemForStruct(
- const TStructsSchemaItems &struct_schema_items,
- const StructIdentifiers::eType struct_id) {
- const TStructsSchemaItems::const_iterator it = struct_schema_items.find(struct_id);
- if (it != struct_schema_items.end()) {
- return it->second;
- }
-
- return NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem::create();
-}
-
-void XXX::YYY::ZZZ::Test::InitStructSchemes(
- TStructsSchemaItems &struct_schema_items) {
- TSharedPtr<ISchemaItem> struct_schema_item_Struct2 = InitStructSchemaItem_Struct2(struct_schema_items);
- struct_schema_items.insert(std::make_pair(StructIdentifiers::Struct2, struct_schema_item_Struct2));
- structs_schemes_.insert(std::make_pair(StructIdentifiers::Struct2, CSmartSchema(struct_schema_item_Struct2)));
-
- TSharedPtr<ISchemaItem> struct_schema_item_Struct1 = InitStructSchemaItem_Struct1(struct_schema_items);
- struct_schema_items.insert(std::make_pair(StructIdentifiers::Struct1, struct_schema_item_Struct1));
- structs_schemes_.insert(std::make_pair(StructIdentifiers::Struct1, CSmartSchema(struct_schema_item_Struct1)));
-}
-
-void XXX::YYY::ZZZ::Test::InitFunctionSchemes(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::name1, messageType::request), InitFunction_name1_request(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::response), InitFunction_val_1_response(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_2, messageType::notification), InitFunction_val_2_notification(struct_schema_items, function_id_items, message_type_items)));
-}
-
-//------------- Functions schemes initialization -------------
-
-CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_name1_request(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::set<Enum_new4::eType> Enum_new4_all_enum_values;
- Enum_new4_all_enum_values.insert(Enum_new4::_11);
- Enum_new4_all_enum_values.insert(Enum_new4::_22);
-
- std::set<Enum1::eType> param2_allowed_enum_subset_values;
- param2_allowed_enum_subset_values.insert(Enum1::name1);
-
- // Function parameter param1.
- //
- // Description Line1
- // Description Line2
- //
- // Design Line1
- //
- // Note: Issue1
- // Note: Issue2
- // Note: Issue3
- //
- // ToDo: Do1
- // ToDo: Do2
- TSharedPtr<ISchemaItem> param1_SchemaItem = TEnumSchemaItem<Enum_new4::eType>::create(Enum_new4_all_enum_values, TSchemaItemParameter<Enum_new4::eType>(Enum_new4::_11));
-
- // Function parameter param2.
- TSharedPtr<ISchemaItem> param2_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(param2_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>(name1));
-
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- schema_members["param1"] = CObjectSchemaItem::SMember(param1_SchemaItem, true);
- schema_members["param2"] = CObjectSchemaItem::SMember(param2_SchemaItem, true);
-
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- return CSmartSchema(CObjectSchemaItem::create(root_members_map));
-}
-
-CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_1_response(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- return CSmartSchema(CObjectSchemaItem::create(root_members_map));
-}
-
-CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_2_notification(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items) {
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
-
- return CSmartSchema(CObjectSchemaItem::create(root_members_map));
-}
-
-//----------- Structs schema items initialization ------------
-
-TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::InitStructSchemaItem_Struct1(
- const TStructsSchemaItems &struct_schema_items) {
- std::set<Enum1::eType> Enum1_all_enum_values;
- Enum1_all_enum_values.insert(Enum1::name1);
- Enum1_all_enum_values.insert(Enum1::internal_name2);
-
- std::set<Enum1::eType> enumSubset1_allowed_enum_subset_values;
- enumSubset1_allowed_enum_subset_values.insert(Enum1::name1);
-
- std::set<Enum_new2::eType> Enum_new2_all_enum_values;
- Enum_new2_all_enum_values.insert(Enum_new2::_1);
- Enum_new2_all_enum_values.insert(Enum_new2::_2);
- Enum_new2_all_enum_values.insert(Enum_new2::_3);
-
- std::set<Enum1::eType> sub1_allowed_enum_subset_values;
- sub1_allowed_enum_subset_values.insert(Enum1::name1);
-
- std::set<Enum1::eType> sub2_allowed_enum_subset_values;
- sub2_allowed_enum_subset_values.insert(Enum1::internal_name2);
-
- std::set<Enum_new4::eType> sub3_allowed_enum_subset_values;
- sub3_allowed_enum_subset_values.insert(Enum_new4::_22);
-
- // Struct member intParam.
- TSharedPtr<ISchemaItem> intParam_SchemaItem = TNumberSchemaItem<int>::create(TSchemaItemParameter<int>(), TSchemaItemParameter<int>(2), TSchemaItemParameter<int>());
-
- // Struct member doubleParam.
- TSharedPtr<ISchemaItem> doubleParam_SchemaItem = TNumberSchemaItem<double>::create(TSchemaItemParameter<double>(0.333), TSchemaItemParameter<double>(), TSchemaItemParameter<double>());
-
- // Struct member boolParam.
- TSharedPtr<ISchemaItem> boolParam_SchemaItem = CBoolSchemaItem::create(TSchemaItemParameter<bool>());
-
- // Struct member structParam.
- TSharedPtr<ISchemaItem> structParam_SchemaItem = ProvideObjectSchemaItemForStruct(struct_schema_items, StructIdentifiers::Struct2);
-
- // Struct member enumParam.
- TSharedPtr<ISchemaItem> enumParam_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(Enum1_all_enum_values, TSchemaItemParameter<Enum1::eType>());
-
- // Struct member enumParam1.
- TSharedPtr<ISchemaItem> enumParam1_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(Enum1_all_enum_values, TSchemaItemParameter<Enum1::eType>());
-
- // Struct member enumSubset1.
- TSharedPtr<ISchemaItem> enumSubset1_SchemaItem = TEnumSchemaItem<Enum1::eType>::create(enumSubset1_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>());
-
- // Struct member arrayOfInt.
- TSharedPtr<ISchemaItem> arrayOfInt_SchemaItem = CArraySchemaItem::create(CBoolSchemaItem::create(TSchemaItemParameter<bool>()), TSchemaItemParameter<size_t>(0), TSchemaItemParameter<size_t>(20));
-
- // Struct member arrayOfEnum1.
- TSharedPtr<ISchemaItem> arrayOfEnum1_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum1::eType>::create(Enum1_all_enum_values, TSchemaItemParameter<Enum1::eType>()), TSchemaItemParameter<size_t>(0), TSchemaItemParameter<size_t>(20));
-
- // Struct member arrayOfEnum3.
- TSharedPtr<ISchemaItem> arrayOfEnum3_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum_new2::eType>::create(Enum_new2_all_enum_values, TSchemaItemParameter<Enum_new2::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(40));
-
- // Struct member arrayOfEnum4.
- TSharedPtr<ISchemaItem> arrayOfEnum4_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum1::eType>::create(sub1_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(41));
-
- // Struct member arrayOfEnum5.
- TSharedPtr<ISchemaItem> arrayOfEnum5_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum1::eType>::create(sub2_allowed_enum_subset_values, TSchemaItemParameter<Enum1::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(42));
-
- // Struct member arrayOfEnum6.
- TSharedPtr<ISchemaItem> arrayOfEnum6_SchemaItem = CArraySchemaItem::create(TEnumSchemaItem<Enum_new4::eType>::create(sub3_allowed_enum_subset_values, TSchemaItemParameter<Enum_new4::eType>()), TSchemaItemParameter<size_t>(10), TSchemaItemParameter<size_t>(43));
-
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- schema_members["intParam"] = CObjectSchemaItem::SMember(intParam_SchemaItem, true);
- schema_members["doubleParam"] = CObjectSchemaItem::SMember(doubleParam_SchemaItem, false);
- schema_members["boolParam"] = CObjectSchemaItem::SMember(boolParam_SchemaItem, true);
- schema_members["structParam"] = CObjectSchemaItem::SMember(structParam_SchemaItem, true);
- schema_members["enumParam"] = CObjectSchemaItem::SMember(enumParam_SchemaItem, true);
- schema_members["enumParam1"] = CObjectSchemaItem::SMember(enumParam1_SchemaItem, true);
- schema_members["enumSubset1"] = CObjectSchemaItem::SMember(enumSubset1_SchemaItem, false);
- schema_members["arrayOfInt"] = CObjectSchemaItem::SMember(arrayOfInt_SchemaItem, false);
- schema_members["arrayOfEnum1"] = CObjectSchemaItem::SMember(arrayOfEnum1_SchemaItem, false);
- schema_members["arrayOfEnum3"] = CObjectSchemaItem::SMember(arrayOfEnum3_SchemaItem, true);
- schema_members["arrayOfEnum4"] = CObjectSchemaItem::SMember(arrayOfEnum4_SchemaItem, true);
- schema_members["arrayOfEnum5"] = CObjectSchemaItem::SMember(arrayOfEnum5_SchemaItem, true);
- schema_members["arrayOfEnum6"] = CObjectSchemaItem::SMember(arrayOfEnum6_SchemaItem, true);
-
- return CObjectSchemaItem::create(schema_members);
-}
-
-TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::InitStructSchemaItem_Struct2(
- const TStructsSchemaItems &struct_schema_items) {
- std::map<std::string, CObjectSchemaItem::SMember> schema_members;
-
- return CObjectSchemaItem::create(schema_members);
-}
-
-//-------------- String to value enum mapping ----------------
-
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-
-template <>
-const std::map<XXX::YYY::ZZZ::Enum1::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum1::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::Enum1::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum1::name1, "name1"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum1::internal_name2, "name2"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::E2::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::E2::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::E2::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::E2::val_1, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::E2::val_2, "yyy"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::E2::val_3, "val_3"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::Enum_new2::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum_new2::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::Enum_new2::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new2::_1, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new2::_2, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new2::_3, "xxx"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::Enum_new4::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum_new4::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::Enum_new4::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new4::_11, "xxx"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::Enum_new4::_22, "xxx"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-template <>
-const std::map<XXX::YYY::ZZZ::messageType::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::messageType::eType>::getEnumElementsStringRepresentation() {
- static bool is_initialized = false;
- static std::map<XXX::YYY::ZZZ::messageType::eType, std::string> enum_string_representation;
-
- if (false == is_initialized) {
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::request, "request"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::response, "response"));
- enum_string_representation.insert(std::make_pair(XXX::YYY::ZZZ::messageType::notification, "notification"));
-
- is_initialized = true;
- }
-
- return enum_string_representation;
-}
-
-} // NsSmartObjects
-} // NsSmartDeviceLink
-
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h b/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h
deleted file mode 100644
index 826ea55ce..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/**
- * @file Test.h
- * @brief Generated class Test header file.
- *
- * This class is a part of SmartObjects solution. It provides
- * factory functionallity which allows client to use SmartSchemas
- * in accordance with definitions from Test.xml file
- */
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef __CSMARTFACTORY_TEST_12345678123456781234567812345678_H__
-#define __CSMARTFACTORY_TEST_12345678123456781234567812345678_H__
-
-#include "JSONHandler/CSmartFactory.hpp"
-#include "SmartObjects/CSmartSchema.hpp"
-#include "SmartObjects/ISchemaItem.hpp"
-#include "SmartObjects/TSharedPtr.hpp"
-
-namespace XXX {
-namespace YYY {
-namespace ZZZ {
-
-namespace StructIdentifiers {
-/**
- * @brief Enumeration StructIdentifiers.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief Struct1.
- */
- Struct1,
-
- /**
- * @brief Struct2.
- */
- Struct2
-};
-} // StructIdentifiers
-
-namespace Enum1 {
-/**
- * @brief Enumeration Enum1.
- *
- * @todo Do1
- * @todo Do2
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief name1.
- *
- * Design Line1
- *
- * @todo Do1
- * @todo Do2
- */
- name1 = 1,
-
- /**
- * @brief internal_name2.
- *
- * Description Line1
- * Description Line2
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- internal_name2
-};
-} // Enum1
-
-namespace E2 {
-/**
- * @brief Enumeration E2.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief val_1.
- */
- val_1,
-
- /**
- * @brief val_2.
- */
- val_2 = 100,
-
- /**
- * @brief val_3.
- */
- val_3
-};
-} // E2
-
-namespace Enum_new2 {
-/**
- * @brief Enumeration Enum_new2.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief _1.
- */
- _1,
-
- /**
- * @brief _2.
- */
- _2,
-
- /**
- * @brief _3.
- */
- _3
-};
-} // Enum_new2
-
-namespace Enum_new4 {
-/**
- * @brief Enumeration Enum_new4.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief _11.
- */
- _11,
-
- /**
- * @brief _22.
- */
- _22
-};
-} // Enum_new4
-
-namespace messageType {
-/**
- * @brief Enumeration messageType.
- */
-enum eType {
- /**
- * @brief INVALID_ENUM.
- */
- INVALID_ENUM = -1,
-
- /**
- * @brief request.
- */
- request,
-
- /**
- * @brief response.
- */
- response,
-
- /**
- * @brief notification.
- */
- notification
-};
-} // messageType
-
-
-/**
- * @brief Class Test.
- *
- * Params:
- * param2 - value2
- * param1 - value1
- */
-class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType> {
- public:
- /**
- * @brief Constructor.
- */
- Test();
-
- protected:
- /**
- * @brief Type that maps of struct IDs to schema items.
- */
- typedef std::map<const StructIdentifiers::eType, NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> > TStructsSchemaItems;
-
- /**
- * @brief Helper that allows to make reference to struct
- *
- * @param struct_schema_items Struct schema items.
- * @param struct_id ID of structure to provide.
- *
- * @return TSharedPtr of strucute
- */
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> ProvideObjectSchemaItemForStruct(
- const TStructsSchemaItems &struct_schema_items,
- const StructIdentifiers::eType struct_id);
-
- /**
- * @brief Initializes all struct schemes.
- */
- void InitStructSchemes(TStructsSchemaItems &struct_schema_items);
-
- /**
- * @brief Initializes all function schemes.
- *
- * @param struct_schema_items Struct schema items.
- * @param function_id_items Set of all elements of FunctionID enum.
- * @param message_type_items Set of all elements of messageType enum.
- */
- void InitFunctionSchemes(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema for function Function1.
- *
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_name1_request(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema for function Function2.
- *
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_1_response(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema for function Function2.
- *
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
- */
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_2_notification(
- const TStructsSchemaItems &struct_schema_items,
- const std::set<FunctionID::eType> &function_id_items,
- const std::set<messageType::eType> &message_type_items);
-
- /**
- * @brief Method that generates schema item for structure Struct1.
- *
- * Design Line1
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct1(
- const TStructsSchemaItems &struct_schema_items);
-
- /**
- * @brief Method that generates schema item for structure Struct2.
- *
- * @note Issue1
- * @note Issue2
- * @note Issue3
- */
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct2(
- const TStructsSchemaItems &struct_schema_items);
-};
-
-} // XXX
-} // YYY
-} // ZZZ
-
-#endif //__CSMARTFACTORY_TEST_12345678123456781234567812345678_H__
-
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/__init__.py b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/__init__.py
deleted file mode 100755
index e69de29bb..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/__init__.py
+++ /dev/null
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_JSONRPC.py b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_JSONRPC.py
deleted file mode 100755
index f2fecdb90..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_JSONRPC.py
+++ /dev/null
@@ -1,595 +0,0 @@
-"""JSONRPC XML parser unit test."""
-import os
-import unittest
-
-import generator.Model
-import generator.parsers.JSONRPC
-
-
-class TestJSONRPCVParser(unittest.TestCase):
-
- """Test for JSONRPC xml parser."""
-
- class _Issue:
- def __init__(self, creator, value):
- self.creator = creator
- self.value = value
-
- def __eq__(self, other):
- return self.creator == other.creator and self.value == other.value
-
- def setUp(self):
- """Test initialization."""
- self.valid_xml_name = os.path.dirname(os.path.realpath(__file__)) + \
- "/valid_JSONRPC.xml"
- self.parser = generator.parsers.JSONRPC.Parser()
-
- def test_valid_xml(self):
- """Test parsing of valid xml."""
- interface = self.parser.parse(self.valid_xml_name)
-
- self.assertEqual(9, len(interface.params))
- self.assertDictEqual({"attr1": "v1",
- "attr2": "v2",
- "interface1_attribute1": "value1",
- "interface1_attribute2": "value2",
- "interface1_issues": "Issue1\nIssue2",
- "interface1_design_description": "dd",
- "interface2_attribute": "value",
- "interface2_description":
- "Description of interface2",
- "interface2_todos": "i2 todo"},
- interface.params)
-
- # Enumerations
-
- self.assertEqual(5, len(interface.enums))
-
- # Enumeration "FunctionID"
-
- self.assertIn("FunctionID", interface.enums)
- enum = interface.enums["FunctionID"]
- self.verify_base_item(item=enum,
- name="FunctionID")
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("interface1.Function1", enum.elements)
- element = enum.elements["interface1.Function1"]
- self.verify_base_item(
- item=element,
- name="interface1.Function1")
- self.assertEqual("interface1_Function1", element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("interface1.Function2", enum.elements)
- element = enum.elements["interface1.Function2"]
- self.verify_base_item(
- item=element,
- name="interface1.Function2")
- self.assertEqual("interface1_Function2", element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("interface2.Function1", enum.elements)
- element = enum.elements["interface2.Function1"]
- self.verify_base_item(
- item=element,
- name="interface2.Function1")
- self.assertEqual("interface2_Function1", element.internal_name)
- self.assertIsNone(element.value)
-
- # Enumeration "messageType"
-
- self.assertIn("messageType", interface.enums)
- enum = interface.enums["messageType"]
- self.verify_base_item(
- item=enum,
- name="messageType")
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("request", enum.elements)
- element = enum.elements["request"]
- self.verify_base_item(item=element,
- name="request")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("response", enum.elements)
- element = enum.elements["response"]
- self.verify_base_item(item=element, name="response")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("notification", enum.elements)
- element = enum.elements["notification"]
- self.verify_base_item(item=element, name="notification")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Enumeration "interface1_enum1"
-
- self.assertIn("interface1_enum1", interface.enums)
- enum = interface.enums["interface1_enum1"]
- self.verify_base_item(item=enum, name="interface1_enum1",
- platform="enum1 platform")
- self.assertEqual("scope", enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("element1", enum.elements)
- element = enum.elements["element1"]
- self.verify_base_item(item=element, name="element1")
- self.assertIsNone(element.internal_name)
- self.assertEqual(10, element.value)
-
- self.assertIn("element2", enum.elements)
- element = enum.elements["element2"]
- self.verify_base_item(item=element, name="element2")
- self.assertEqual("element2_internal", element.internal_name)
- self.assertEqual(11, element.value)
-
- self.assertIn("element3", enum.elements)
- element = enum.elements["element3"]
- self.verify_base_item(
- item=element,
- name="element3",
- design_description=["Element design description"],
- platform="element3 platform")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Enumeration "interface2_enum1"
-
- self.assertIn("interface2_enum1", interface.enums)
- enum = interface.enums["interface2_enum1"]
- self.verify_base_item(item=enum, name="interface2_enum1",
- description=["Interface2 enum1 description"])
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(2, len(enum.elements))
-
- self.assertIn("e1", enum.elements)
- element = enum.elements["e1"]
- self.verify_base_item(item=element, name="e1")
- self.assertEqual("int_e1", element.internal_name)
- self.assertEqual(0, element.value)
-
- self.assertIn("e2", enum.elements)
- element = enum.elements["e2"]
- self.verify_base_item(item=element, name="e2")
- self.assertEqual("int_e2", element.internal_name)
- self.assertEqual(10, element.value)
-
- # Enumeration "interface2_enum2"
-
- self.assertIn("interface2_enum2", interface.enums)
- enum = interface.enums["interface2_enum2"]
- self.verify_base_item(item=enum, name="interface2_enum2",
- platform="e2 platform")
- self.assertEqual("e2 scope", enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("element1", enum.elements)
- element = enum.elements["element1"]
- self.verify_base_item(item=element, name="element1")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("element2", enum.elements)
- element = enum.elements["element2"]
- self.verify_base_item(item=element, name="element2")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("element3", enum.elements)
- element = enum.elements["element3"]
- self.verify_base_item(item=element, name="element3")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Structures
-
- self.assertEqual(3, len(interface.structs))
-
- # Structure "interface1_struct1"
-
- self.assertIn("interface1_struct1", interface.structs)
- struct = interface.structs["interface1_struct1"]
- self.verify_base_item(
- item=struct,
- name="interface1_struct1",
- description=["Struct description"],
- issues=[TestJSONRPCVParser._Issue(creator="creator1",
- value="Issue1"),
- TestJSONRPCVParser._Issue(creator="creator2",
- value="Issue2")])
-
- self.assertEqual(4, len(struct.members))
-
- self.assertIn("member1", struct.members)
- member = struct.members["member1"]
- self.verify_base_item(
- item=member,
- name="member1",
- description=["Param1 description"])
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Integer)
- self.assertIsNone(member.param_type.min_value)
- self.assertIsNone(member.param_type.max_value)
-
- self.assertIn("member2", struct.members)
- member = struct.members["member2"]
- self.verify_base_item(item=member, name="member2",
- platform="member2 platform")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Boolean)
-
- self.assertIn("member3", struct.members)
- member = struct.members["member3"]
- self.verify_base_item(item=member, name="member3")
- self.assertEqual(False, member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Double)
- self.assertIsNone(member.param_type.min_value)
- self.assertAlmostEqual(20.5, member.param_type.max_value)
-
- self.assertIn("member4", struct.members)
- member = struct.members["member4"]
- self.verify_base_item(item=member, name="member4")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertIsNone(member.param_type.min_size)
- self.assertIsNone(member.param_type.max_size)
- self.assertIsInstance(member.param_type.element_type,
- generator.Model.Integer)
- self.assertEqual(11, member.param_type.element_type.min_value)
- self.assertEqual(100, member.param_type.element_type.max_value)
-
- # Structure "interface1_struct2"
-
- self.assertIn("interface1_struct2", interface.structs)
- struct = interface.structs["interface1_struct2"]
- self.verify_base_item(item=struct,
- name="interface1_struct2",
- description=["Description of struct2"],
- platform="struct2 platform")
-
- self.assertEqual(4, len(struct.members))
-
- self.assertIn("m1", struct.members)
- member = struct.members["m1"]
- self.verify_base_item(item=member, name="m1")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.String)
- self.assertIsNone(member.param_type.max_length)
-
- self.assertIn("m2", struct.members)
- member = struct.members["m2"]
- self.verify_base_item(item=member, name="m2")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertEqual(1, member.param_type.min_size)
- self.assertEqual(50, member.param_type.max_size)
- self.assertIsInstance(member.param_type.element_type,
- generator.Model.String)
- self.assertEqual(100, member.param_type.element_type.max_length)
-
- self.assertIn("m3", struct.members)
- member = struct.members["m3"]
- self.verify_base_item(item=member, name="m3")
- self.assertTrue(member.is_mandatory)
- self.assertIs(member.param_type, interface.enums["interface1_enum1"])
-
- self.assertIn("m4", struct.members)
- member = struct.members["m4"]
- self.verify_base_item(item=member, name="m4")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertIsNone(member.param_type.min_size)
- self.assertEqual(10, member.param_type.max_size)
- self.assertIs(member.param_type.element_type,
- interface.structs["interface1_struct1"])
-
- # Structure "interface2_struct1"
-
- self.assertIn("interface2_struct1", interface.structs)
- struct = interface.structs["interface2_struct1"]
- self.verify_base_item(item=struct, name="interface2_struct1")
-
- self.assertEqual(3, len(struct.members))
-
- self.assertIn("m_1", struct.members)
- member = struct.members["m_1"]
- self.verify_base_item(item=member, name="m_1")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertEqual(1, member.param_type.min_size)
- self.assertEqual(10, member.param_type.max_size)
- self.assertIs(member.param_type.element_type,
- interface.enums["interface2_enum1"])
-
- self.assertIn("m_2", struct.members)
- member = struct.members["m_2"]
- self.verify_base_item(item=member, name="m_2")
- self.assertTrue(member.is_mandatory)
- self.assertIs(member.param_type, interface.enums["interface2_enum2"])
-
- self.assertIn("m_3", struct.members)
- member = struct.members["m_3"]
- self.verify_base_item(item=member, name="m_3")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.String)
- self.assertEqual(20, member.param_type.max_length)
-
- # Functions
-
- self.assertEqual(5, len(interface.functions))
-
- # Function request "interface1_Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["interface1.Function1"],
- interface.enums["messageType"].elements["request"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["interface1.Function1"],
- interface.enums["messageType"].elements["request"])]
- self.verify_base_item(
- item=function,
- name="interface1_Function1",
- description=["Description of request Function1"],
- todos=["Function1 request todo"])
- self.assertIs(
- function.function_id,
- interface.enums["FunctionID"].elements["interface1.Function1"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["request"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("param1", function.params)
- param = function.params["param1"]
- self.verify_base_item(
- item=param,
- name="param1",
- issues=[TestJSONRPCVParser._Issue(creator="", value="")])
- self.assertEqual(False, param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.String)
- self.assertIsNone(param.param_type.max_length)
- self.assertEqual("String default value", param.default_value)
-
- self.assertIn("param2", function.params)
- param = function.params["param2"]
- self.verify_base_item(
- item=param,
- name="param2",
- description=["Param2 description", ""],
- todos=["Param2 todo"],
- platform="param2 platform")
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Integer)
- self.assertIsNone(param.param_type.min_value)
- self.assertIsNone(param.param_type.max_value)
- self.assertIsNone(param.default_value)
-
- self.assertIn("param3", function.params)
- param = function.params["param3"]
- self.verify_base_item(item=param, name="param3")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type,
- interface.structs["interface1_struct1"])
- self.assertIsNone(param.default_value)
-
- # Function response "interface1_Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["interface1.Function1"],
- interface.enums["messageType"].elements["response"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["interface1.Function1"],
- interface.enums["messageType"].elements["response"])]
- self.verify_base_item(
- item=function,
- name="interface1_Function1",
- issues=[TestJSONRPCVParser._Issue(creator="c1", value=""),
- TestJSONRPCVParser._Issue(creator="c2", value="")],
- platform="")
- self.assertIs(
- function.function_id,
- interface.enums["FunctionID"].elements["interface1.Function1"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["response"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("p1", function.params)
- param = function.params["p1"]
- self.verify_base_item(item=param, name="p1")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["interface1_enum1"])
- self.assertIsNone(param.default_value)
-
- self.assertIn("p2", function.params)
- param = function.params["p2"]
- self.verify_base_item(item=param, name="p2")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["interface1_enum1"])
- self.assertIs(
- param.default_value,
- interface.enums["interface1_enum1"].elements["element2"])
-
- self.assertIn("p3", function.params)
- param = function.params["p3"]
- self.verify_base_item(item=param, name="p3", design_description=[""])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Boolean)
- self.assertEqual(False, param.default_value)
-
- # Function notification "interface1_Function2"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["interface1.Function2"],
- interface.enums["messageType"].elements["notification"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["interface1.Function2"],
- interface.enums["messageType"].elements["notification"])]
- self.verify_base_item(item=function,
- name="interface1_Function2",
- description=["Function2 description"],
- platform="function2 platform")
- self.assertIs(
- function.function_id,
- interface.enums["FunctionID"].elements["interface1.Function2"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["notification"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("n1", function.params)
- param = function.params["n1"]
- self.verify_base_item(item=param, name="n1", todos=["n1 todo"])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.EnumSubset)
- self.assertIs(param.param_type.enum,
- interface.enums["interface1_enum1"])
- self.assertDictEqual(
- {"element2":
- interface.enums["interface1_enum1"].elements["element2"],
- "element3":
- interface.enums["interface1_enum1"].elements["element3"]},
- param.param_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("n2", function.params)
- param = function.params["n2"]
- self.verify_base_item(item=param, name="n2", todos=["n2 todo"])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Array)
- self.assertEqual(1, param.param_type.min_size)
- self.assertEqual(100, param.param_type.max_size)
- self.assertIsInstance(param.param_type.element_type,
- generator.Model.EnumSubset)
- self.assertIs(param.param_type.element_type.enum,
- interface.enums["interface1_enum1"])
- self.assertDictEqual(
- {"element1":
- interface.enums["interface1_enum1"].elements["element1"],
- "element3":
- interface.enums["interface1_enum1"].elements["element3"]},
- param.param_type.element_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("n3", function.params)
- param = function.params["n3"]
- self.verify_base_item(item=param, name="n3")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type,
- interface.structs["interface1_struct2"])
- self.assertIsNone(param.default_value)
-
- # Function request "interface2_Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["interface2.Function1"],
- interface.enums["messageType"].elements["request"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["interface2.Function1"],
- interface.enums["messageType"].elements["request"])]
- self.verify_base_item(item=function, name="interface2_Function1")
- self.assertIs(
- function.function_id,
- interface.enums["FunctionID"].elements["interface2.Function1"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["request"])
-
- self.assertEqual(2, len(function.params))
-
- self.assertIn("param1", function.params)
- param = function.params["param1"]
- self.verify_base_item(item=param, name="param1")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["interface2_enum1"])
- self.assertIsNone(param.default_value)
-
- self.assertIn("param2", function.params)
- param = function.params["param2"]
- self.verify_base_item(item=param, name="param2")
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Array)
- self.assertEqual(5, param.param_type.min_size)
- self.assertEqual(25, param.param_type.max_size)
- self.assertIs(param.param_type.element_type,
- interface.structs["interface2_struct1"])
- self.assertIsNone(param.default_value)
-
- # Function notification "interface2_Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["interface2.Function1"],
- interface.enums["messageType"].elements["notification"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["interface2.Function1"],
- interface.enums["messageType"].elements["notification"])]
- self.verify_base_item(
- item=function,
- name="interface2_Function1",
- issues=[
- TestJSONRPCVParser._Issue(creator="c", value="Issue text")],
- platform="platform")
- self.assertIs(
- function.function_id,
- interface.enums["FunctionID"].elements["interface2.Function1"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["notification"])
-
- self.assertEqual(2, len(function.params))
-
- self.assertIn("param", function.params)
- param = function.params["param"]
- self.verify_base_item(item=param, name="param")
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.EnumSubset)
- self.assertIs(param.param_type.enum,
- interface.enums["interface2_enum2"])
- self.assertDictEqual(
- {"element2":
- interface.enums["interface2_enum2"].elements["element2"],
- "element3":
- interface.enums["interface2_enum2"].elements["element3"]},
- param.param_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("i1", function.params)
- param = function.params["i1"]
- self.verify_base_item(item=param, name="i1")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type,
- interface.structs["interface1_struct2"])
- self.assertIsNone(param.default_value)
-
- def verify_base_item(self, item, name, description=None,
- design_description=None, issues=None, todos=None,
- platform=None):
- """Verify base interface item variables."""
- self.assertEqual(name, item.name)
- self.assertSequenceEqual(self.get_list(description), item.description)
- self.assertSequenceEqual(self.get_list(design_description),
- item.design_description)
- self.assertSequenceEqual(self.get_list(issues), item.issues)
- self.assertSequenceEqual(self.get_list(todos), item.todos)
- self.assertEqual(platform, item.platform)
-
- @staticmethod
- def get_list(list=None):
- """Return provided list or empty list if None is provided."""
- return list if list is not None else []
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV1.py b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV1.py
deleted file mode 100755
index 1464658ff..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV1.py
+++ /dev/null
@@ -1,404 +0,0 @@
-"""SDLRPCV1 XML parser unit test."""
-import os
-import unittest
-
-import generator.Model
-import generator.parsers.SDLRPCV1
-
-
-class TestSDLRPCV1Parser(unittest.TestCase):
-
- """Test for SDLRPCV1 xml parser."""
-
- class _Issue:
- def __init__(self, creator, value):
- self.creator = creator
- self.value = value
-
- def __eq__(self, other):
- return self.creator == other.creator and self.value == other.value
-
- def setUp(self):
- """Test initialization."""
- self.valid_xml_name = os.path.dirname(os.path.realpath(__file__)) + \
- "/valid_SDLRPCV1.xml"
- self.parser = generator.parsers.SDLRPCV1.Parser()
-
- def test_valid_xml(self):
- """Test parsing of valid xml."""
- interface = self.parser.parse(self.valid_xml_name)
-
- self.assertEqual(2, len(interface.params))
- self.assertDictEqual({"attribute1": "value1", "attribute2": "value2"},
- interface.params)
-
- # Enumerations
-
- self.assertEqual(3, len(interface.enums))
-
- # Enumeration "FunctionID"
-
- self.assertIn("FunctionID", interface.enums)
- enum = interface.enums["FunctionID"]
- self.verify_base_item(item=enum,
- name="FunctionID")
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(2, len(enum.elements))
-
- self.assertIn("Function1", enum.elements)
- element = enum.elements["Function1"]
- self.verify_base_item(
- item=element,
- name="Function1")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("Function2", enum.elements)
- element = enum.elements["Function2"]
- self.verify_base_item(
- item=element,
- name="Function2")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Enumeration "messageType"
-
- self.assertIn("messageType", interface.enums)
- enum = interface.enums["messageType"]
- self.verify_base_item(
- item=enum,
- name="messageType")
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("request", enum.elements)
- element = enum.elements["request"]
- self.verify_base_item(item=element,
- name="request")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("response", enum.elements)
- element = enum.elements["response"]
- self.verify_base_item(item=element, name="response")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- self.assertIn("notification", enum.elements)
- element = enum.elements["notification"]
- self.verify_base_item(item=element, name="notification")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Enumeration "enum1"
-
- self.assertIn("enum1", interface.enums)
- enum = interface.enums["enum1"]
- self.verify_base_item(item=enum, name="enum1",
- platform="enum1 platform")
- self.assertEqual("scope", enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("element1", enum.elements)
- element = enum.elements["element1"]
- self.verify_base_item(item=element, name="element1")
- self.assertIsNone(element.internal_name)
- self.assertEqual(10, element.value)
-
- self.assertIn("element2", enum.elements)
- element = enum.elements["element2"]
- self.verify_base_item(item=element, name="element2")
- self.assertEqual("element2_internal", element.internal_name)
- self.assertEqual(11, element.value)
-
- self.assertIn("element3", enum.elements)
- element = enum.elements["element3"]
- self.verify_base_item(
- item=element,
- name="element3",
- design_description=["Element design description"],
- platform="element3 platform")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Structures
-
- self.assertEqual(2, len(interface.structs))
-
- # Structure "struct1"
-
- self.assertIn("struct1", interface.structs)
- struct = interface.structs["struct1"]
- self.verify_base_item(
- item=struct,
- name="struct1",
- description=["Struct description"],
- issues=[TestSDLRPCV1Parser._Issue(creator="creator1",
- value="Issue1"),
- TestSDLRPCV1Parser._Issue(creator="creator2",
- value="Issue2")])
-
- self.assertEqual(4, len(struct.members))
-
- self.assertIn("member1", struct.members)
- member = struct.members["member1"]
- self.verify_base_item(
- item=member,
- name="member1",
- description=["Param1 description"])
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Integer)
- self.assertIsNone(member.param_type.min_value)
- self.assertIsNone(member.param_type.max_value)
-
- self.assertIn("member2", struct.members)
- member = struct.members["member2"]
- self.verify_base_item(item=member, name="member2",
- platform="member2 platform")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Boolean)
-
- self.assertIn("member3", struct.members)
- member = struct.members["member3"]
- self.verify_base_item(item=member, name="member3")
- self.assertEqual(False, member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Double)
- self.assertIsNone(member.param_type.min_value)
- self.assertAlmostEqual(20.5, member.param_type.max_value)
-
- self.assertIn("member4", struct.members)
- member = struct.members["member4"]
- self.verify_base_item(item=member, name="member4")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertIsNone(member.param_type.min_size)
- self.assertIsNone(member.param_type.max_size)
- self.assertIsInstance(member.param_type.element_type,
- generator.Model.Integer)
- self.assertEqual(11, member.param_type.element_type.min_value)
- self.assertEqual(100, member.param_type.element_type.max_value)
-
- # Structure "struct2"
-
- self.assertIn("struct2", interface.structs)
- struct = interface.structs["struct2"]
- self.verify_base_item(item=struct,
- name="struct2",
- description=["Description of struct2"],
- platform="struct2 platform")
-
- self.assertEqual(4, len(struct.members))
-
- self.assertIn("m1", struct.members)
- member = struct.members["m1"]
- self.verify_base_item(item=member, name="m1")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.String)
- self.assertIsNone(member.param_type.max_length)
-
- self.assertIn("m2", struct.members)
- member = struct.members["m2"]
- self.verify_base_item(item=member, name="m2")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertEqual(1, member.param_type.min_size)
- self.assertEqual(50, member.param_type.max_size)
- self.assertIsInstance(member.param_type.element_type,
- generator.Model.String)
- self.assertEqual(100, member.param_type.element_type.max_length)
-
- self.assertIn("m3", struct.members)
- member = struct.members["m3"]
- self.verify_base_item(item=member, name="m3")
- self.assertTrue(member.is_mandatory)
- self.assertIs(member.param_type, interface.enums["enum1"])
-
- self.assertIn("m4", struct.members)
- member = struct.members["m4"]
- self.verify_base_item(item=member, name="m4")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertIsNone(member.param_type.min_size)
- self.assertEqual(10, member.param_type.max_size)
- self.assertIs(member.param_type.element_type,
- interface.structs["struct1"])
-
- # Functions
-
- self.assertEqual(3, len(interface.functions))
-
- # Function request "Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["Function1"],
- interface.enums["messageType"].elements["request"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["Function1"],
- interface.enums["messageType"].elements["request"])]
- self.verify_base_item(
- item=function,
- name="Function1",
- description=["Description of request Function1"],
- todos=["Function1 request todo"])
- self.assertIs(function.function_id,
- interface.enums["FunctionID"].elements["Function1"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["request"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("param1", function.params)
- param = function.params["param1"]
- self.verify_base_item(
- item=param,
- name="param1",
- issues=[TestSDLRPCV1Parser._Issue(creator="", value="")])
- self.assertEqual(False, param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.String)
- self.assertIsNone(param.param_type.max_length)
- self.assertEqual("String default value", param.default_value)
-
- self.assertIn("param2", function.params)
- param = function.params["param2"]
- self.verify_base_item(
- item=param,
- name="param2",
- description=["Param2 description", ""],
- todos=["Param2 todo"],
- platform="param2 platform")
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Integer)
- self.assertIsNone(param.param_type.min_value)
- self.assertIsNone(param.param_type.max_value)
- self.assertIsNone(param.default_value)
-
- self.assertIn("param3", function.params)
- param = function.params["param3"]
- self.verify_base_item(item=param, name="param3")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type, interface.structs["struct1"])
- self.assertIsNone(param.default_value)
-
- # Function response "Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["Function1"],
- interface.enums["messageType"].elements["response"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["Function1"],
- interface.enums["messageType"].elements["response"])]
- self.verify_base_item(
- item=function,
- name="Function1",
- issues=[TestSDLRPCV1Parser._Issue(creator="c1", value=""),
- TestSDLRPCV1Parser._Issue(creator="c2", value="")],
- platform="")
- self.assertIs(function.function_id,
- interface.enums["FunctionID"].elements["Function1"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["response"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("p1", function.params)
- param = function.params["p1"]
- self.verify_base_item(item=param, name="p1")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["enum1"])
- self.assertIsNone(param.default_value)
-
- self.assertIn("p2", function.params)
- param = function.params["p2"]
- self.verify_base_item(item=param, name="p2")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["enum1"])
- self.assertIs(param.default_value,
- interface.enums["enum1"].elements["element2"])
-
- self.assertIn("p3", function.params)
- param = function.params["p3"]
- self.verify_base_item(item=param, name="p3", design_description=[""])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Boolean)
- self.assertEqual(False, param.default_value)
-
- # Function notification "Function2"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["Function2"],
- interface.enums["messageType"].elements["notification"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["Function2"],
- interface.enums["messageType"].elements["notification"])]
- self.verify_base_item(item=function,
- name="Function2",
- description=["Function2 description"],
- platform="function2 platform")
- self.assertIs(function.function_id,
- interface.enums["FunctionID"].elements["Function2"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["notification"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("n1", function.params)
- param = function.params["n1"]
- self.verify_base_item(item=param, name="n1", todos=["n1 todo"])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.EnumSubset)
- self.assertIs(param.param_type.enum, interface.enums["enum1"])
- self.assertDictEqual(
- {"element2": interface.enums["enum1"].elements["element2"],
- "element3": interface.enums["enum1"].elements["element3"]},
- param.param_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("n2", function.params)
- param = function.params["n2"]
- self.verify_base_item(item=param, name="n2", todos=["n2 todo"])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Array)
- self.assertEqual(1, param.param_type.min_size)
- self.assertEqual(100, param.param_type.max_size)
- self.assertIsInstance(param.param_type.element_type,
- generator.Model.EnumSubset)
- self.assertIs(param.param_type.element_type.enum,
- interface.enums["enum1"])
- self.assertDictEqual(
- {"element1": interface.enums["enum1"].elements["element1"],
- "element3": interface.enums["enum1"].elements["element3"]},
- param.param_type.element_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("n3", function.params)
- param = function.params["n3"]
- self.verify_base_item(item=param, name="n3")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type, interface.structs["struct2"])
- self.assertIsNone(param.default_value)
-
- def verify_base_item(self, item, name, description=None,
- design_description=None, issues=None, todos=None,
- platform=None):
- """Verify base interface item variables."""
- self.assertEqual(name, item.name)
- self.assertSequenceEqual(self.get_list(description), item.description)
- self.assertSequenceEqual(self.get_list(design_description),
- item.design_description)
- self.assertSequenceEqual(self.get_list(issues), item.issues)
- self.assertSequenceEqual(self.get_list(todos), item.todos)
- self.assertEqual(platform, item.platform)
-
- @staticmethod
- def get_list(list=None):
- """Return provided list or empty list if None is provided."""
- return list if list is not None else []
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV2.py b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV2.py
deleted file mode 100755
index c37962cfe..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV2.py
+++ /dev/null
@@ -1,417 +0,0 @@
-"""SDLRPCV2 XML parser unit test."""
-import os
-import unittest
-
-import generator.Model
-import generator.parsers.SDLRPCV2
-
-
-class TestSDLRPCV2Parser(unittest.TestCase):
-
- """Test for SDLRPCV2 xml parser."""
-
- class _Issue:
- def __init__(self, creator, value):
- self.creator = creator
- self.value = value
-
- def __eq__(self, other):
- return self.creator == other.creator and self.value == other.value
-
- def setUp(self):
- """Test initialization."""
- self.valid_xml_name = os.path.dirname(os.path.realpath(__file__)) + \
- "/valid_SDLRPCV2.xml"
- self.parser = generator.parsers.SDLRPCV2.Parser()
-
- def test_valid_xml(self):
- """Test parsing of valid xml."""
- interface = self.parser.parse(self.valid_xml_name)
-
- self.assertEqual(2, len(interface.params))
- self.assertDictEqual({"attribute1": "value1", "attribute2": "value2"},
- interface.params)
-
- # Enumerations
-
- self.assertEqual(3, len(interface.enums))
-
- # Enumeration "FunctionID"
-
- self.assertIn("FunctionID", interface.enums)
- enum = interface.enums["FunctionID"]
- self.verify_base_item(item=enum,
- name="FunctionID",
- description=["Description string 1",
- "Description string 2"],
- todos=['Function id todo'])
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(2, len(enum.elements))
-
- self.assertIn("Function1_id", enum.elements)
- element = enum.elements["Function1_id"]
- self.verify_base_item(
- item=element,
- name="Function1_id",
- design_description=["Function1 element design description"])
- self.assertIsNone(element.internal_name)
- self.assertEqual(10, element.value)
-
- self.assertIn("Function2_id", enum.elements)
- element = enum.elements["Function2_id"]
- self.verify_base_item(
- item=element,
- name="Function2_id")
- self.assertEqual("Function2_internal", element.internal_name)
- self.assertIsNone(element.value)
-
- # Enumeration "messageType"
-
- self.assertIn("messageType", interface.enums)
- enum = interface.enums["messageType"]
- self.verify_base_item(
- item=enum,
- name="messageType",
- design_description=["messageType design description",
- "messageType design description 2"],
- issues=[TestSDLRPCV2Parser._Issue(
- creator="messageType issue creator",
- value="Issue text")])
- self.assertIsNone(enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("request", enum.elements)
- element = enum.elements["request"]
- self.verify_base_item(item=element,
- name="request",
- todos=["request todo 1", "request todo 2"],
- issues=[TestSDLRPCV2Parser._Issue(
- creator="issue creator",
- value="request issue")])
- self.assertIsNone(element.internal_name)
- self.assertEqual(0, element.value)
-
- self.assertIn("response", enum.elements)
- element = enum.elements["response"]
- self.verify_base_item(item=element, name="response")
- self.assertIsNone(element.internal_name)
- self.assertEqual(1, element.value)
-
- self.assertIn("notification", enum.elements)
- element = enum.elements["notification"]
- self.verify_base_item(item=element, name="notification")
- self.assertIsNone(element.internal_name)
- self.assertEqual(2, element.value)
-
- # Enumeration "enum1"
-
- self.assertIn("enum1", interface.enums)
- enum = interface.enums["enum1"]
- self.verify_base_item(item=enum, name="enum1",
- platform="enum1 platform")
- self.assertEqual("scope", enum.internal_scope)
-
- self.assertEqual(3, len(enum.elements))
-
- self.assertIn("element1", enum.elements)
- element = enum.elements["element1"]
- self.verify_base_item(item=element, name="element1")
- self.assertIsNone(element.internal_name)
- self.assertEqual(10, element.value)
-
- self.assertIn("element2", enum.elements)
- element = enum.elements["element2"]
- self.verify_base_item(item=element, name="element2")
- self.assertEqual("element2_internal", element.internal_name)
- self.assertEqual(11, element.value)
-
- self.assertIn("element3", enum.elements)
- element = enum.elements["element3"]
- self.verify_base_item(
- item=element,
- name="element3",
- design_description=["Element design description"],
- platform="element3 platform")
- self.assertIsNone(element.internal_name)
- self.assertIsNone(element.value)
-
- # Structures
-
- self.assertEqual(2, len(interface.structs))
-
- # Structure "struct1"
-
- self.assertIn("struct1", interface.structs)
- struct = interface.structs["struct1"]
- self.verify_base_item(
- item=struct,
- name="struct1",
- description=["Struct description"],
- issues=[TestSDLRPCV2Parser._Issue(creator="creator1",
- value="Issue1"),
- TestSDLRPCV2Parser._Issue(creator="creator2",
- value="Issue2")])
-
- self.assertEqual(4, len(struct.members))
-
- self.assertIn("member1", struct.members)
- member = struct.members["member1"]
- self.verify_base_item(
- item=member,
- name="member1",
- description=["Param1 description"])
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Integer)
- self.assertIsNone(member.param_type.min_value)
- self.assertIsNone(member.param_type.max_value)
-
- self.assertIn("member2", struct.members)
- member = struct.members["member2"]
- self.verify_base_item(item=member, name="member2",
- platform="member2 platform")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Boolean)
-
- self.assertIn("member3", struct.members)
- member = struct.members["member3"]
- self.verify_base_item(item=member, name="member3")
- self.assertEqual(False, member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Double)
- self.assertIsNone(member.param_type.min_value)
- self.assertAlmostEqual(20.5, member.param_type.max_value)
-
- self.assertIn("member4", struct.members)
- member = struct.members["member4"]
- self.verify_base_item(item=member, name="member4")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertIsNone(member.param_type.min_size)
- self.assertIsNone(member.param_type.max_size)
- self.assertIsInstance(member.param_type.element_type,
- generator.Model.Integer)
- self.assertEqual(11, member.param_type.element_type.min_value)
- self.assertEqual(100, member.param_type.element_type.max_value)
-
- # Structure "struct2"
-
- self.assertIn("struct2", interface.structs)
- struct = interface.structs["struct2"]
- self.verify_base_item(item=struct,
- name="struct2",
- description=["Description of struct2"],
- platform="struct2 platform")
-
- self.assertEqual(4, len(struct.members))
-
- self.assertIn("m1", struct.members)
- member = struct.members["m1"]
- self.verify_base_item(item=member, name="m1")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.String)
- self.assertIsNone(member.param_type.max_length)
-
- self.assertIn("m2", struct.members)
- member = struct.members["m2"]
- self.verify_base_item(item=member, name="m2")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertEqual(1, member.param_type.min_size)
- self.assertEqual(50, member.param_type.max_size)
- self.assertIsInstance(member.param_type.element_type,
- generator.Model.String)
- self.assertEqual(100, member.param_type.element_type.max_length)
-
- self.assertIn("m3", struct.members)
- member = struct.members["m3"]
- self.verify_base_item(item=member, name="m3")
- self.assertTrue(member.is_mandatory)
- self.assertIs(member.param_type, interface.enums["enum1"])
-
- self.assertIn("m4", struct.members)
- member = struct.members["m4"]
- self.verify_base_item(item=member, name="m4")
- self.assertTrue(member.is_mandatory)
- self.assertIsInstance(member.param_type, generator.Model.Array)
- self.assertIsNone(member.param_type.min_size)
- self.assertEqual(10, member.param_type.max_size)
- self.assertIs(member.param_type.element_type,
- interface.structs["struct1"])
-
- # Functions
-
- self.assertEqual(3, len(interface.functions))
-
- # Function request "Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["Function1_id"],
- interface.enums["messageType"].elements["request"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["Function1_id"],
- interface.enums["messageType"].elements["request"])]
- self.verify_base_item(
- item=function,
- name="Function1",
- description=["Description of request Function1"],
- todos=["Function1 request todo"])
- self.assertIs(function.function_id,
- interface.enums["FunctionID"].elements["Function1_id"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["request"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("param1", function.params)
- param = function.params["param1"]
- self.verify_base_item(
- item=param,
- name="param1",
- issues=[TestSDLRPCV2Parser._Issue(creator="", value="")])
- self.assertEqual(False, param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.String)
- self.assertIsNone(param.param_type.max_length)
- self.assertEqual("String default value", param.default_value)
-
- self.assertIn("param2", function.params)
- param = function.params["param2"]
- self.verify_base_item(
- item=param,
- name="param2",
- description=["Param2 description", ""],
- todos=["Param2 todo"],
- platform="param2 platform")
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Integer)
- self.assertIsNone(param.param_type.min_value)
- self.assertIsNone(param.param_type.max_value)
- self.assertIsNone(param.default_value)
-
- self.assertIn("param3", function.params)
- param = function.params["param3"]
- self.verify_base_item(item=param, name="param3")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type, interface.structs["struct1"])
- self.assertIsNone(param.default_value)
-
- # Function response "Function1"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["Function1_id"],
- interface.enums["messageType"].elements["response"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["Function1_id"],
- interface.enums["messageType"].elements["response"])]
- self.verify_base_item(
- item=function,
- name="Function1",
- issues=[TestSDLRPCV2Parser._Issue(creator="c1", value=""),
- TestSDLRPCV2Parser._Issue(creator="c2", value="")],
- platform="")
- self.assertIs(function.function_id,
- interface.enums["FunctionID"].elements["Function1_id"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["response"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("p1", function.params)
- param = function.params["p1"]
- self.verify_base_item(item=param, name="p1")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["enum1"])
- self.assertIsNone(param.default_value)
-
- self.assertIn("p2", function.params)
- param = function.params["p2"]
- self.verify_base_item(item=param, name="p2")
- self.assertTrue(param.is_mandatory)
- self.assertIs(param.param_type, interface.enums["enum1"])
- self.assertIs(param.default_value,
- interface.enums["enum1"].elements["element2"])
-
- self.assertIn("p3", function.params)
- param = function.params["p3"]
- self.verify_base_item(item=param, name="p3", design_description=[""])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Boolean)
- self.assertEqual(False, param.default_value)
-
- # Function notification "Function2"
-
- self.assertIn(
- (interface.enums["FunctionID"].elements["Function2_id"],
- interface.enums["messageType"].elements["notification"]),
- interface.functions)
- function = interface.functions[
- (interface.enums["FunctionID"].elements["Function2_id"],
- interface.enums["messageType"].elements["notification"])]
- self.verify_base_item(item=function,
- name="Function2",
- description=["Function2 description"],
- platform="function2 platform")
- self.assertIs(function.function_id,
- interface.enums["FunctionID"].elements["Function2_id"])
- self.assertIs(function.message_type,
- interface.enums["messageType"].elements["notification"])
-
- self.assertEqual(3, len(function.params))
-
- self.assertIn("n1", function.params)
- param = function.params["n1"]
- self.verify_base_item(item=param, name="n1", todos=["n1 todo"])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.EnumSubset)
- self.assertIs(param.param_type.enum, interface.enums["enum1"])
- self.assertDictEqual(
- {"element2": interface.enums["enum1"].elements["element2"],
- "element3": interface.enums["enum1"].elements["element3"]},
- param.param_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("n2", function.params)
- param = function.params["n2"]
- self.verify_base_item(item=param, name="n2", todos=["n2 todo"])
- self.assertTrue(param.is_mandatory)
- self.assertIsInstance(param.param_type, generator.Model.Array)
- self.assertEqual(1, param.param_type.min_size)
- self.assertEqual(100, param.param_type.max_size)
- self.assertIsInstance(param.param_type.element_type,
- generator.Model.EnumSubset)
- self.assertIs(param.param_type.element_type.enum,
- interface.enums["enum1"])
- self.assertDictEqual(
- {"element1": interface.enums["enum1"].elements["element1"],
- "element3": interface.enums["enum1"].elements["element3"]},
- param.param_type.element_type.allowed_elements)
- self.assertIsNone(param.default_value)
-
- self.assertIn("n3", function.params)
- param = function.params["n3"]
- self.verify_base_item(item=param, name="n3")
- self.assertEqual(False, param.is_mandatory)
- self.assertIs(param.param_type, interface.structs["struct2"])
- self.assertIsNone(param.default_value)
-
- def verify_base_item(self, item, name, description=None,
- design_description=None, issues=None, todos=None,
- platform=None):
- """Verify base interface item variables."""
- self.assertEqual(name, item.name)
- self.assertSequenceEqual(self.get_list(description), item.description)
- self.assertSequenceEqual(self.get_list(design_description),
- item.design_description)
- self.assertSequenceEqual(self.get_list(issues), item.issues)
- self.assertSequenceEqual(self.get_list(todos), item.todos)
- self.assertEqual(platform, item.platform)
-
- @staticmethod
- def get_list(list=None):
- """Return provided list or empty list if None is provided."""
- return list if list is not None else []
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_JSONRPC.xml b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_JSONRPC.xml
deleted file mode 100644
index a754e5714..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_JSONRPC.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
-<interfaces attr1="v1" attr2="v2">
- <interface name="interface1" attribute1="value1" attribute2="value2">
- <struct name="struct1">
- <param name="member1" type="Integer">
- <description>Param1 description</description>
- </param>
- <issue creator="creator1">Issue1</issue>
- <param name="member2" type="Boolean" mandatory="true" platform="member2 platform"/>
- <param name="member3" type="Float" maxvalue="20.5" mandatory="false"/>
- <description>Struct description</description>
- <issue creator="creator2">Issue2</issue>
- <param name="member4" type="Integer" minvalue="11" maxvalue="100" array="true"/>
- </struct>
- <issue creator="c">Issue1</issue>
- <function name="Function1" messagetype="request">
- <description>Description of request Function1</description>
- <param name="param1" type="String" mandatory="false" defvalue="String default value">
- <issue creator=""/>
- </param>
- <param name="param2" type="Integer" platform="param2 platform">
- <description>Param2 description</description>
- <todo>Param2 todo</todo>
- <description/>
- </param>
- <todo>Function1 request todo</todo>
- <param name="param3" type="struct1" mandatory="false"/>
- </function>
- <enum name="enum1" internal_scope="scope" platform="enum1 platform">
- <element name="element1" value="10"/>
- <element name="element2" internal_name="element2_internal" value="11"/>
- <element name="element3" platform="element3 platform">
- <designdescription>Element design description</designdescription>
- </element>
- </enum>
- <designdescription>dd</designdescription>
- <issue creator="c">Issue2</issue>
- <function name="Function1" messagetype="response" platform="">
- <param name="p1" type="enum1"/>
- <issue creator="c1"/>
- <issue creator="c2"></issue>
- <param name="p2" type="enum1" defvalue="element2"/>
- <param name="p3" type="Boolean" defvalue="false">
- <designdescription/>
- </param>
- </function>
- <struct name="struct2" platform="struct2 platform">
- <description>Description of struct2</description>
- <param name="m1" type="String"/>
- <param name="m2" type="String" maxlength="100" array="true" minsize="1" maxsize="50"/>
- <param name="m3" type="enum1"/>
- <param name="m4" type="struct1" array="true" maxsize="10"/>
- </struct>
- <function name="Function2" messagetype="notification" platform="function2 platform">
- <description>Function2 description</description>
- <param name="n1" type="enum1">
- <element name="element2"/>
- <element name="element3"/>
- <todo>n1 todo</todo>
- </param>
- <param name="n2" type="enum1" array="true" minsize="1" maxsize="100">
- <element name="element3"/>
- <todo>n2 todo</todo>
- <element name="element1"/>
- </param>
- <param name="n3" type="struct2" mandatory="false"/>
- </function>
- </interface>
- <interface name="interface2" attribute="value">
- <description>Description of interface2</description>
- <enum name="enum1">
- <description>Interface2 enum1 description</description>
- <element name="e1" internal_name="int_e1" value="0"/>
- <element name="e2" internal_name="int_e2" value="10"/>
- </enum>
- <enum name="enum2" internal_scope="e2 scope" platform="e2 platform">
- <element name="element1"/>
- <element name="element2"/>
- <element name="element3"/>
- </enum>
- <struct name="struct1">
- <param name="m_1" type="enum1" minsize="1" maxsize="10" array="true"/>
- <param name="m_2" type="enum2"/>
- <param name="m_3" type="String" maxlength="20"/>
- </struct>
- <function name="Function1" messagetype="request">
- <param name="param1" type="enum1" mandatory="false"/>
- <param name="param2" type="struct1" array="true" minsize="5" maxsize="25"/>
- </function>
- <todo>i2 todo</todo>
- <function name="Function1" messagetype="notification" platform="platform">
- <issue creator="c">Issue text</issue>
- <param name="param" type="enum2">
- <element name="element2"/>
- <element name="element3"/>
- </param>
- <param name="i1" type="interface1.struct2"/>
- </function>
- </interface>
-</interfaces> \ No newline at end of file
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV1.xml b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV1.xml
deleted file mode 100644
index 37ebf39d3..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV1.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<interface name="test_interface" attribute1="value1" attribute2="value2">
- <struct name="struct1">
- <param name="member1" type="Integer">
- <description>Param1 description</description>
- </param>
- <issue creator="creator1">Issue1</issue>
- <param name="member2" type="Boolean" mandatory="true" platform="member2 platform"/>
- <param name="member3" type="Float" maxvalue="20.5" mandatory="false"/>
- <description>Struct description</description>
- <issue creator="creator2">Issue2</issue>
- <param name="member4" type="Integer" minvalue="11" maxvalue="100" array="true"/>
- </struct>
- <function name="Function1" messagetype="request">
- <description>Description of request Function1</description>
- <param name="param1" type="String" mandatory="false" defvalue="String default value">
- <issue creator=""/>
- </param>
- <param name="param2" type="Integer" platform="param2 platform">
- <description>Param2 description</description>
- <todo>Param2 todo</todo>
- <description/>
- </param>
- <todo>Function1 request todo</todo>
- <param name="param3" type="struct1" mandatory="false"/>
- </function>
- <enum name="enum1" internal_scope="scope" platform="enum1 platform">
- <element name="element1" value="10"/>
- <element name="element2" internal_name="element2_internal" value="11"/>
- <element name="element3" platform="element3 platform">
- <designdescription>Element design description</designdescription>
- </element>
- </enum>
- <function name="Function1" messagetype="response" platform="">
- <param name="p1" type="enum1"/>
- <issue creator="c1"/>
- <issue creator="c2"></issue>
- <param name="p2" type="enum1" defvalue="element2"/>
- <param name="p3" type="Boolean" defvalue="false">
- <designdescription/>
- </param>
- </function>
- <struct name="struct2" platform="struct2 platform">
- <description>Description of struct2</description>
- <param name="m1" type="String"/>
- <param name="m2" type="String" maxlength="100" array="true" minsize="1" maxsize="50"/>
- <param name="m3" type="enum1"/>
- <param name="m4" type="struct1" array="true" maxsize="10"/>
- </struct>
- <function name="Function2" messagetype="notification" platform="function2 platform">
- <description>Function2 description</description>
- <param name="n1" type="enum1">
- <element name="element2"/>
- <element name="element3"/>
- <todo>n1 todo</todo>
- </param>
- <param name="n2" type="enum1" array="true" minsize="1" maxsize="100">
- <element name="element3"/>
- <todo>n2 todo</todo>
- <element name="element1"/>
- </param>
- <param name="n3" type="struct2" mandatory="false"/>
- </function>
-</interface>
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV2.xml b/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV2.xml
deleted file mode 100644
index cdc5f1ae8..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/parsers/valid_SDLRPCV2.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<interface name="test_interface" attribute1="value1" attribute2="value2">
- <enum name="FunctionID">
- <description>Description string 1</description>
- <element name="Function1_id" value="10">
- <designdescription>Function1 element design description</designdescription>
- </element>
- <description>Description string 2</description>
- <todo>Function id todo</todo>
- <element name="Function2_id" internal_name="Function2_internal"/>
- </enum>
- <enum name="messageType">
- <element name="request" value="0">
- <todo>request todo 1</todo>
- <issue creator="issue creator">request issue</issue>
- <todo>request todo 2</todo>
- </element>
- <designdescription>messageType design description</designdescription>
- <issue creator="messageType issue creator">Issue text</issue>
- <element name="response" value="1"/>
- <element name="notification" value="2"/>
- <designdescription>messageType design description 2</designdescription>
- </enum>
- <struct name="struct1">
- <param name="member1" type="Integer">
- <description>Param1 description</description>
- </param>
- <issue creator="creator1">Issue1</issue>
- <param name="member2" type="Boolean" mandatory="true" platform="member2 platform"/>
- <param name="member3" type="Float" maxvalue="20.5" mandatory="false"/>
- <description>Struct description</description>
- <issue creator="creator2">Issue2</issue>
- <param name="member4" type="Integer" minvalue="11" maxvalue="100" array="true"/>
- </struct>
- <function name="Function1" functionID="Function1_id" messagetype="request">
- <description>Description of request Function1</description>
- <param name="param1" type="String" mandatory="false" defvalue="String default value">
- <issue creator=""/>
- </param>
- <param name="param2" type="Integer" platform="param2 platform">
- <description>Param2 description</description>
- <todo>Param2 todo</todo>
- <description/>
- </param>
- <todo>Function1 request todo</todo>
- <param name="param3" type="struct1" mandatory="false"/>
- </function>
- <enum name="enum1" internal_scope="scope" platform="enum1 platform">
- <element name="element1" value="10"/>
- <element name="element2" internal_name="element2_internal" value="11"/>
- <element name="element3" platform="element3 platform">
- <designdescription>Element design description</designdescription>
- </element>
- </enum>
- <function name="Function1" functionID="Function1_id" messagetype="response" platform="">
- <param name="p1" type="enum1"/>
- <issue creator="c1"/>
- <issue creator="c2"></issue>
- <param name="p2" type="enum1" defvalue="element2"/>
- <param name="p3" type="Boolean" defvalue="false">
- <designdescription/>
- </param>
- </function>
- <struct name="struct2" platform="struct2 platform">
- <description>Description of struct2</description>
- <param name="m1" type="String"/>
- <param name="m2" type="String" maxlength="100" array="true" minsize="1" maxsize="50"/>
- <param name="m3" type="enum1"/>
- <param name="m4" type="struct1" array="true" maxsize="10"/>
- </struct>
- <function name="Function2" functionID="Function2_id" messagetype="notification" platform="function2 platform">
- <description>Function2 description</description>
- <param name="n1" type="enum1">
- <element name="element2"/>
- <element name="element3"/>
- <todo>n1 todo</todo>
- </param>
- <param name="n2" type="enum1" array="true" minsize="1" maxsize="100">
- <element name="element3"/>
- <todo>n2 todo</todo>
- <element name="element1"/>
- </param>
- <param name="n3" type="struct2" mandatory="false"/>
- </function>
-</interface>
diff --git a/SDL_Core/tools/InterfaceGenerator/test/generator/test_Model.py b/SDL_Core/tools/InterfaceGenerator/test/generator/test_Model.py
deleted file mode 100755
index 55f6a5470..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/generator/test_Model.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""Interface model unit test"""
-import unittest
-
-import generator.Model
-
-
-class TestInterfaceModel(unittest.TestCase):
-
- """Test for interface model."""
-
- def test_enum_element_primary_name(self):
- """Test property primary_name of EnumElement."""
- element = generator.Model.EnumElement(name="name1")
- self.assertEqual("name1", element.primary_name)
-
- element = generator.Model.EnumElement(name="name2",
- internal_name="internal_name1")
- self.assertEqual("internal_name1", element.primary_name)
-
- element.internal_name = None
- self.assertEqual("name2", element.primary_name)
-
- element.internal_name = "internal_name2"
- self.assertEqual("internal_name2", element.primary_name)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/SDL_Core/tools/InterfaceGenerator/test/test_CodeFormatAndQuality.py b/SDL_Core/tools/InterfaceGenerator/test/test_CodeFormatAndQuality.py
deleted file mode 100755
index 3ce56e0fa..000000000
--- a/SDL_Core/tools/InterfaceGenerator/test/test_CodeFormatAndQuality.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import subprocess
-import unittest
-import flake8.main
-import pep257
-import os.path
-import fnmatch
-import os
-import pylint.lint
-import sys
-
-class TestCodeFormatAndQuality(unittest.TestCase):
-
- def setUp(self):
- self.projectRootDir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
- projectTestsDir = os.path.join(self.projectRootDir, "test")
- self.filesToAnalyze = []
- for root, dirnames, filenames in os.walk(self.projectRootDir):
- if root.startswith(projectTestsDir):
- continue # Currently we skipping test files
- for filename in fnmatch.filter(filenames, '*.py'):
- fullFileName = os.path.join(root, filename)
- relativeFileName = os.path.relpath(fullFileName, self.projectRootDir)
- self.filesToAnalyze.append(relativeFileName)
-
- def test_pep8_conformance(self):
- maxCyclomaticComplexity = 10
- errors = 0
- for file in self.filesToAnalyze:
- errors = errors + flake8.main.check_file(file, None, maxCyclomaticComplexity)
-
- self.assertEqual(errors, 0, "Found code style errors or warnings.")
-
- def test_pep257_conformance(self):
- errors = []
-
- for filePath in self.filesToAnalyze:
- print("Processing file: {0}".format(filePath))
- result = pep257.check_files([filePath])
- if result:
- errors.extend(result)
- for error in result:
- print(error)
- print
- self.assertEqual(len(errors), 0, "Found Docstring Conventions violations.")
-
- def test_pylint_conformance(self):
- print
- self.assertEqual(0,
- subprocess.call(
- ["pylint",
- '--rcfile=pylint.cfg',
- 'generator',
- 'Generator.py']
- ), "Found Pylint violations")
- return
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/SDL_Core/tools/OtrosLogViewer/README.txt b/SDL_Core/tools/OtrosLogViewer/README.txt
deleted file mode 100644
index c508da639..000000000
--- a/SDL_Core/tools/OtrosLogViewer/README.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-1. Install log4cxx library using the following command:
-
- sudo apt-get install liblog4cxx10 liblog4cxx10-dev
-
-2. Replace 'log4cplus' statement with 'log4j' in your log4cplus.properties file.
-
-3. Define the SocketHubAppender the way it is shown below:
-
- log4j.appender.SOCKET=org.apache.log4j.net.SocketHubAppender
- log4j.appender.SOCKET.port=4555
- log4j.appender.SOCKET.locationInfo=true
-
-4. Configure your logger using the following instruction in your C++ code:
-
- log4cxx::PropertyConfigurator::configure("log4cxx.properties");
-
-5. See the example of instantiating new logger below:
-
- log4cxx::LoggerPtr ProtocolHandlerImpl::logger_ =
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger( "ProtocolHandler"));
-
-6. The main macros for C++ code are:
-
- LOG4CXX_DEBUG, LOG4CXX_INFO, LOG4CXX_WARN, LOG4CXX_ERROR, LOG4CXX_FATAL
-
-and have the same signatures as corresponding macros in log4cplus logging library. For more specific macros see documentation on http://logging.apache.org/log4cxx/ .
-
-7. Run olv-2013-01-24/olv.bat on Windows or olv-2013-01-24/olv.sh on Linux. For viewing logs in OtrosLogViewer go to File -> Connect to Log4j socket hub, enter ip-address and port number.
-
-
-
-
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/classpath.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/classpath.txt
deleted file mode 100644
index 26235b56c..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/classpath.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-./lib/jsyntaxpane-0.9.5-b29.jar
-./lib/VFSJFileChooser-0.0.3m1.jar
-./lib/commons-vfs-2.0-SNAPSHOT.jar
-./lib/webdavclient4j-vfs-0.92.jar
-./lib/commons-vfs-sandbox-2.0-SNAPSHOT.jar
-./lib/webdavclient4j-jca-0.92.jar
-./lib/jcifs-1.3.14.jar
-./lib/jakarta-oro-2.0.8.jar
-./lib/commons-net-ftp-2.0.jar
-./lib/commons-net-2.0.jar
-./lib/webdavclient4j-cmd-0.92.jar
-./lib/webdavclient4j-core-0.92.jar
-./lib/Common-libs.jar
-./lib/OtrosStarter.jar
-./lib/OtrosLogViewer-app-2012-09-13.jar
-./lib/commons-logging-1.1.1.jar
-./lib/commons-beanutils-1.8.3.jar
-./lib/commons-beanutils-bean-collections-1.8.3.jar
-./lib/commons-beanutils-core-1.8.3.jar
-./lib/commons-collections-3.2.1.jar
-./lib/commons-codec-1.6.jar
-./lib/commons-compress-1.3.jar
-./lib/commons-lang-2.6.jar
-./lib/commons-configuration-1.8.jar
-./lib/commons-digester-2.1.jar
-./lib/commons-httpclient-3.1.jar
-./lib/commons-io-2.1.jar
-./lib/jsr305-1.3.9.jar
-./lib/guava-11.0.2.jar
-./lib/jcommander-1.23.jar
-./lib/jsch-0.1.46.jar
-./lib/jzlib-1.1.1.jar
-./lib/log4j-1.2.16.jar
-./lib/miglayout-core-4.2.jar
-./lib/miglayout-swing-4.2.jar
-./lib/filters-2.0.235.jar
-./lib/swing-worker-1.1.jar
-./lib/swingx-1.6.1.jar
-./lib/swingx-core-1.6.2-2.jar
-./lib/trident-7.1.jar
-./lib/looks-2.2.2.jar \ No newline at end of file
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/apache-commons/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/apache-commons/LICENSE.txt
deleted file mode 100644
index 75b52484e..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/apache-commons/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/forms/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/forms/LICENSE.txt
deleted file mode 100644
index 697f7b27e..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/forms/LICENSE.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-
- JGoodies Looks Demo Binary Software License Agreement
- =====================================================
-
-Copyright (c) 2002-2009 JGoodies Karsten Lentzsch. All rights reserved.
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will JGoodies Karsten Lentzsch be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software, to copy it
-and redistribute it freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented;
- you must not claim that you wrote the software.
-
- 2. You may not modify or create derivative works of this software,
- or reverse engineer, or decompile binary portions of it,
- or otherwise attempt to derive the source code from such portions.
-
- 3. You may not sell, rent, loan or otherwise encumber
- this software in whole or in part, to any third party.
-
- 4. This notice may not be removed or altered from redistributions.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jakarta-oro/LICENSE b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jakarta-oro/LICENSE
deleted file mode 100644
index e61dd247a..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jakarta-oro/LICENSE
+++ /dev/null
@@ -1,56 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
- * must not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
- * name, without prior written permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon software originally written
- * by Daniel F. Savarese. We appreciate his contributions.
- */
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jcifs/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jcifs/LICENSE.txt
deleted file mode 100644
index c4be8701e..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jcifs/LICENSE.txt
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jsch/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jsch/LICENSE.txt
deleted file mode 100644
index 2a5daa868..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/jsch/LICENSE.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-JSch 0.0.* was released under the GNU LGPL license. Later, we have switched
-over to a BSD-style license.
-
-------------------------------------------------------------------------------
-Copyright (c) 2002-2010 Atsuhiko Yamanaka, JCraft,Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the distribution.
-
- 3. The names of the authors may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
-INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/log4j/LICENSE b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/log4j/LICENSE
deleted file mode 100644
index 6279e5206..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/log4j/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 1999-2005 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/looks/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/looks/LICENSE.txt
deleted file mode 100644
index 697f7b27e..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/looks/LICENSE.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-
- JGoodies Looks Demo Binary Software License Agreement
- =====================================================
-
-Copyright (c) 2002-2009 JGoodies Karsten Lentzsch. All rights reserved.
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will JGoodies Karsten Lentzsch be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software, to copy it
-and redistribute it freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented;
- you must not claim that you wrote the software.
-
- 2. You may not modify or create derivative works of this software,
- or reverse engineer, or decompile binary portions of it,
- or otherwise attempt to derive the source code from such portions.
-
- 3. You may not sell, rent, loan or otherwise encumber
- this software in whole or in part, to any third party.
-
- 4. This notice may not be removed or altered from redistributions.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/miglayout/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/miglayout/LICENSE.txt
deleted file mode 100644
index 2a5daa868..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/miglayout/LICENSE.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-JSch 0.0.* was released under the GNU LGPL license. Later, we have switched
-over to a BSD-style license.
-
-------------------------------------------------------------------------------
-Copyright (c) 2002-2010 Atsuhiko Yamanaka, JCraft,Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the distribution.
-
- 3. The names of the authors may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
-INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/vfsjfliechooser/LICENSE.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/vfsjfliechooser/LICENSE.txt
deleted file mode 100644
index 75b52484e..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/license/vfsjfliechooser/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/logging.properties b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/logging.properties
deleted file mode 100644
index 06d04f201..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/logging.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#-Djava.util.logging.config.file=logging.properties
-
-handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
-pl.otros.logview.level=FINE
-
-# Handlers
-# -----------------------------------------
-
-# --- ConsoleHandler ---
-# Override of global logging level
-java.util.logging.ConsoleHandler.level=SEVERE
-java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
-
-
-# --- FileHandler ---
-# Override of global logging level
-java.util.logging.FileHandler.level=ALL
-
-# Naming style for the output file:
-# (The output file is placed in the directory
-# defined by the "user.home" System property.)
-java.util.logging.FileHandler.pattern=olv%u.log
-
-# Limiting size of output file in bytes:
-java.util.logging.FileHandler.limit=45000000
-
-# Number of output files to cycle through, by appending an
-# integer to the base file name:
-java.util.logging.FileHandler.count=1
-
-# Style of output (Simple or XML):
-java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
-
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.bat b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.bat
deleted file mode 100644
index c84a682d4..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-echo off
-REM *******************************************************************************
-REM Copyright 2011 Krzysztof Otrebski
-REM
-REM Licensed under the Apache License, Version 2.0 (the "License");
-REM you may not use this file except in compliance with the License.
-REM You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ******************************************************************************
-
-cd %~dp0%
-olv.bat -batch %*
-
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.sh b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.sh
deleted file mode 100755
index ea243d5e5..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv-batch.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
- ###############################################################################
- # Copyright 2011 Krzysztof Otrebski
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ###############################################################################
-
-
-CURRENTDIR=`dirname $0`
-cd $CURRENTDIR
-
-./olv.sh -batch $@
-
-
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.bat b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.bat
deleted file mode 100644
index 8336d2e60..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.bat
+++ /dev/null
@@ -1,42 +0,0 @@
-echo off
-REM *******************************************************************************
-REM Copyright 2011 Krzysztof Otrebski
-REM
-REM Licensed under the Apache License, Version 2.0 (the "License");
-REM you may not use this file except in compliance with the License.
-REM You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ******************************************************************************
-
-cd %~dp0%
-set MEMORY=-Xmx1024m
-set LOG_PROPERTIES=-Djava.util.logging.config.file=logging.properties
-rem set SFTP_KEY=-Dvfs.Identities=
-if "%1"=="-batch" goto batchMode
-
-if exist "%JAVA_HOME%\bin\javaw.exe" (
- set LOCAL_JAVA="%JAVA_HOME%\bin\javaw.exe"
-) else (
- set LOCAL_JAVA=javaw.exe
-)
-start "OtrosLogViewer" /B %LOCAL_JAVA% %LOG_PROPERTIES% %MEMORY% %SFTP_KEY% -jar lib\OtrosStarter.jar %* 1>olv.out.txt 2>olv.err.txt
-goto finish
-
-:batchMode
-if exist "%JAVA_HOME%\bin\java.exe" (
- set LOCAL_JAVA="%JAVA_HOME%\bin\java.exe"
-) else (
- set LOCAL_JAVA=java.exe
-)
-echo on
-%LOCAL_JAVA% %LOG_PROPERTIES% %MEMORY% %SFTP_KEY% -jar lib\OtrosStarter.jar %*
-
-
-:finish \ No newline at end of file
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.sh b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.sh
deleted file mode 100755
index 6a57ec3e1..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/olv.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
- ###############################################################################
- # Copyright 2011 Krzysztof Otrebski
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ###############################################################################
-
-# based on http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
-CURRENTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-#cd $CURRENTDIR
-
-MEMORY=-Xmx1024m
-LOG_PROPERTIES=-Djava.util.logging.config.file=logging.properties
-#SFTP_KEY=-Dvfs.Identities=
-
-if [ -n "$JAVA_HOME" ]
-then
- JAVA="$JAVA_HOME/bin/java"
-else
- JAVA=java
-fi
-
-
-if [ "-batch" = "$1" ]
-then
- $JAVA $LOG_PROPERTIES $MEMORY $SFTP_KEY -jar "$CURRENTDIR/lib/OtrosStarter.jar" $@
-else
- # we need to be sure we are writing to a directory where we have write access, /tmp is one of them but app directory is clearly not
- $JAVA $LOG_PROPERTIES $MEMORY $SFTP_KEY -jar "$CURRENTDIR/lib/OtrosStarter.jar" $@ > /tmp/olv.log 2>&1
-fi
-
-
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/forDeveloperTests.txt b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/forDeveloperTests.txt
deleted file mode 100644
index 6a9c89917..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/forDeveloperTests.txt
+++ /dev/null
@@ -1 +0,0 @@
-this is for developer tests \ No newline at end of file
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/log4j-1.pattern b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/log4j-1.pattern
deleted file mode 100644
index aa113c3f2..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/log4j-1.pattern
+++ /dev/null
@@ -1,5 +0,0 @@
-type=log4j
-pattern=TIMESTAMP LEVEL [THREAD] MESSAGE
-dateFormat=yyyy-MM-dd HH:mm:ss,SSS
-name="Lo4j-pattern: "%d{ISO8601} %-5p [%t] %m%n [UTF-8]"
-charset=UTF-8 \ No newline at end of file
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/selenium.pattern b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/selenium.pattern
deleted file mode 100644
index f836c483f..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/logimporters/selenium.pattern
+++ /dev/null
@@ -1,4 +0,0 @@
-type=log4j
-pattern=TIMESTAMP LEVEL [THREAD] CLASS - MESSAGE
-dateFormat=HH:mm:ss.SSS
-name=Selenium server logs (log4j) \ No newline at end of file
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-regex.marker b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-regex.marker
deleted file mode 100644
index ec453caa9..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-regex.marker
+++ /dev/null
@@ -1,16 +0,0 @@
-#File genereated using GUI editor
-#Tue Feb 08 22:56:15 CET 2011
-test2=sadf return
-precondition=return
-test1=afds return 4 sd
-name=Regex marker example
-include=true
-groups=Example
-condition=.*return\\s[1-9]\\d*.*
-file=example-regex.marker
-color=Brown
-ignoreCase=true
-type=regex
-description=Regex marker example
-preconditionInclude=true
-test3=retrun -9
diff --git a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-string.marker b/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-string.marker
deleted file mode 100644
index fffc8732a..000000000
--- a/SDL_Core/tools/OtrosLogViewer/olv-2012-09-13/plugins/markers/example-string.marker
+++ /dev/null
@@ -1,14 +0,0 @@
-#File genereated using GUI editor
-#Thu Mar 31 16:33:47 CEST 2011
-test2=aareturnasdff
-test1=something return 4;\t
-name=String matcher example1
-include=true
-groups=Example
-condition=return
-file=example-string.marker
-color=Brown
-ignoreCase=true
-type=string
-description=String matcher example
-test3=sdfdfffaff
diff --git a/SDL_Core/tools/coding-style/cpplint.py b/SDL_Core/tools/coding-style/cpplint.py
deleted file mode 100755
index 4d15272b3..000000000
--- a/SDL_Core/tools/coding-style/cpplint.py
+++ /dev/null
@@ -1,4023 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Here are some issues that I've had people identify in my code during reviews,
-# that I think are possible to flag automatically in a lint tool. If these were
-# caught by lint, it would save time both for myself and that of my reviewers.
-# Most likely, some of these are beyond the scope of the current lint framework,
-# but I think it is valuable to retain these wish-list items even if they cannot
-# be immediately implemented.
-#
-# Suggestions
-# -----------
-# - Check for no 'explicit' for multi-arg ctor
-# - Check for boolean assign RHS in parens
-# - Check for ctor initializer-list colon position and spacing
-# - Check that if there's a ctor, there should be a dtor
-# - Check accessors that return non-pointer member variables are
-# declared const
-# - Check accessors that return non-const pointer member vars are
-# *not* declared const
-# - Check for using public includes for testing
-# - Check for spaces between brackets in one-line inline method
-# - Check for no assert()
-# - Check for spaces surrounding operators
-# - Check for 0 in pointer context (should be NULL)
-# - Check for 0 in char context (should be '\0')
-# - Check for camel-case method name conventions for methods
-# that are not simple inline getters and setters
-# - Do not indent namespace contents
-# - Avoid inlining non-trivial constructors in header files
-# - Check for old-school (void) cast for call-sites of functions
-# ignored return value
-# - Check gUnit usage of anonymous namespace
-# - Check for class declaration order (typedefs, consts, enums,
-# ctor(s?), dtor, friend declarations, methods, member vars)
-#
-
-"""Does google-lint on c++ files.
-
-The goal of this script is to identify places in the code that *may*
-be in non-compliance with google style. It does not attempt to fix
-up these problems -- the point is to educate. It does also not
-attempt to find all problems, or to ensure that everything it does
-find is legitimately a problem.
-
-In particular, we can get very confused by /* and // inside strings!
-We do a small hack, which is to ignore //'s with "'s after them on the
-same line, but it is far from perfect (in either direction).
-"""
-
-import codecs
-import copy
-import getopt
-import math # for log
-import os
-import re
-import sre_compile
-import string
-import sys
-import unicodedata
-
-
-_USAGE = """
-Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...]
- [--counting=total|toplevel|detailed]
- <file> [file] ...
-
- The style guidelines this tries to follow are those in
- http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
-
- Every problem is given a confidence score from 1-5, with 5 meaning we are
- certain of the problem, and 1 meaning it could be a legitimate construct.
- This will miss some errors, and is not a substitute for a code review.
-
- To suppress false-positive errors of a certain category, add a
- 'NOLINT(category)' comment to the line. NOLINT or NOLINT(*)
- suppresses errors of all categories on that line.
-
- The files passed in will be linted; at least one file must be provided.
- Linted extensions are .cc, .cpp, and .h. Other file types will be ignored.
-
- Flags:
-
- output=vs7
- By default, the output is formatted to ease emacs parsing. Visual Studio
- compatible output (vs7) may also be used. Other formats are unsupported.
-
- verbose=#
- Specify a number 0-5 to restrict errors to certain verbosity levels.
-
- filter=-x,+y,...
- Specify a comma-separated list of category-filters to apply: only
- error messages whose category names pass the filters will be printed.
- (Category names are printed with the message and look like
- "[whitespace/indent]".) Filters are evaluated left to right.
- "-FOO" and "FOO" means "do not print categories that start with FOO".
- "+FOO" means "do print categories that start with FOO".
-
- Examples: --filter=-whitespace,+whitespace/braces
- --filter=whitespace,runtime/printf,+runtime/printf_format
- --filter=-,+build/include_what_you_use
-
- To see a list of all the categories used in cpplint, pass no arg:
- --filter=
-
- counting=total|toplevel|detailed
- The total number of errors found is always printed. If
- 'toplevel' is provided, then the count of errors in each of
- the top-level categories like 'build' and 'whitespace' will
- also be printed. If 'detailed' is provided, then a count
- is provided for each category like 'build/class'.
-
- root=subdir
- The root directory used for deriving header guard CPP variable.
- By default, the header guard CPP variable is calculated as the relative
- path to the directory that contains .git, .hg, or .svn. When this flag
- is specified, the relative path is calculated from the specified
- directory. If the specified directory does not exist, this flag is
- ignored.
-
- Examples:
- Assuing that src/.git exists, the header guard CPP variables for
- src/chrome/browser/ui/browser.h are:
-
- No flag => CHROME_BROWSER_UI_BROWSER_H_
- --root=chrome => BROWSER_UI_BROWSER_H_
- --root=chrome/browser => UI_BROWSER_H_
-"""
-
-# We categorize each error message we print. Here are the categories.
-# We want an explicit list so we can list them all in cpplint --filter=.
-# If you add a new error message with a new category, add it to the list
-# here! cpplint_unittest.py should tell you if you forget to do this.
-# \ used for clearer layout -- pylint: disable-msg=C6013
-_ERROR_CATEGORIES = [
- 'build/class',
- 'build/deprecated',
- 'build/endif_comment',
- 'build/explicit_make_pair',
- 'build/forward_decl',
- 'build/header_guard',
- 'build/include',
- 'build/include_alpha',
- 'build/include_order',
- 'build/include_what_you_use',
- 'build/namespaces',
- 'build/printf_format',
- 'build/storage_class',
- 'legal/copyright',
- 'readability/alt_tokens',
- 'readability/braces',
- 'readability/casting',
- 'readability/check',
- 'readability/constructors',
- 'readability/fn_size',
- 'readability/function',
- 'readability/multiline_comment',
- 'readability/multiline_string',
- 'readability/namespace',
- 'readability/nolint',
- 'readability/streams',
- 'readability/todo',
- 'readability/utf8',
- 'runtime/arrays',
- 'runtime/casting',
- 'runtime/explicit',
- 'runtime/int',
- 'runtime/init',
- 'runtime/invalid_increment',
- 'runtime/member_string_references',
- 'runtime/memset',
- 'runtime/operator',
- 'runtime/printf',
- 'runtime/printf_format',
- 'runtime/references',
- 'runtime/rtti',
- 'runtime/sizeof',
- 'runtime/string',
- 'runtime/threadsafe_fn',
- 'whitespace/blank_line',
- 'whitespace/braces',
- 'whitespace/comma',
- 'whitespace/comments',
- 'whitespace/empty_loop_body',
- 'whitespace/end_of_line',
- 'whitespace/ending_newline',
- 'whitespace/forcolon',
- 'whitespace/indent',
- 'whitespace/labels',
- 'whitespace/line_length',
- 'whitespace/newline',
- 'whitespace/operators',
- 'whitespace/parens',
- 'whitespace/semicolon',
- 'whitespace/tab',
- 'whitespace/todo'
- ]
-
-# The default state of the category filter. This is overrided by the --filter=
-# flag. By default all errors are on, so only add here categories that should be
-# off by default (i.e., categories that must be enabled by the --filter= flags).
-# All entries here should start with a '-' or '+', as in the --filter= flag.
-_DEFAULT_FILTERS = ['-build/include_alpha']
-
-# We used to check for high-bit characters, but after much discussion we
-# decided those were OK, as long as they were in UTF-8 and didn't represent
-# hard-coded international strings, which belong in a separate i18n file.
-
-# Headers that we consider STL headers.
-_STL_HEADERS = frozenset([
- 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception',
- 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set',
- 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'new',
- 'pair.h', 'pthread_alloc', 'queue', 'set', 'set.h', 'sstream', 'stack',
- 'stl_alloc.h', 'stl_relops.h', 'type_traits.h',
- 'utility', 'vector', 'vector.h',
- ])
-
-
-# Non-STL C++ system headers.
-_CPP_HEADERS = frozenset([
- 'algo.h', 'builtinbuf.h', 'bvector.h', 'cassert', 'cctype',
- 'cerrno', 'cfloat', 'ciso646', 'climits', 'clocale', 'cmath',
- 'complex', 'complex.h', 'csetjmp', 'csignal', 'cstdarg', 'cstddef',
- 'cstdio', 'cstdlib', 'cstring', 'ctime', 'cwchar', 'cwctype',
- 'defalloc.h', 'deque.h', 'editbuf.h', 'exception', 'fstream',
- 'fstream.h', 'hashtable.h', 'heap.h', 'indstream.h', 'iomanip',
- 'iomanip.h', 'ios', 'iosfwd', 'iostream', 'iostream.h', 'istream',
- 'istream.h', 'iterator.h', 'limits', 'map.h', 'multimap.h', 'multiset.h',
- 'numeric', 'ostream', 'ostream.h', 'parsestream.h', 'pfstream.h',
- 'PlotFile.h', 'procbuf.h', 'pthread_alloc.h', 'rope', 'rope.h',
- 'ropeimpl.h', 'SFile.h', 'slist', 'slist.h', 'stack.h', 'stdexcept',
- 'stdiostream.h', 'streambuf.h', 'stream.h', 'strfile.h', 'string',
- 'strstream', 'strstream.h', 'tempbuf.h', 'tree.h', 'typeinfo', 'valarray',
- ])
-
-
-# Assertion macros. These are defined in base/logging.h and
-# testing/base/gunit.h. Note that the _M versions need to come first
-# for substring matching to work.
-_CHECK_MACROS = [
- 'DCHECK', 'CHECK',
- 'EXPECT_TRUE_M', 'EXPECT_TRUE',
- 'ASSERT_TRUE_M', 'ASSERT_TRUE',
- 'EXPECT_FALSE_M', 'EXPECT_FALSE',
- 'ASSERT_FALSE_M', 'ASSERT_FALSE',
- ]
-
-# Replacement macros for CHECK/DCHECK/EXPECT_TRUE/EXPECT_FALSE
-_CHECK_REPLACEMENT = dict([(m, {}) for m in _CHECK_MACROS])
-
-for op, replacement in [('==', 'EQ'), ('!=', 'NE'),
- ('>=', 'GE'), ('>', 'GT'),
- ('<=', 'LE'), ('<', 'LT')]:
- _CHECK_REPLACEMENT['DCHECK'][op] = 'DCHECK_%s' % replacement
- _CHECK_REPLACEMENT['CHECK'][op] = 'CHECK_%s' % replacement
- _CHECK_REPLACEMENT['EXPECT_TRUE'][op] = 'EXPECT_%s' % replacement
- _CHECK_REPLACEMENT['ASSERT_TRUE'][op] = 'ASSERT_%s' % replacement
- _CHECK_REPLACEMENT['EXPECT_TRUE_M'][op] = 'EXPECT_%s_M' % replacement
- _CHECK_REPLACEMENT['ASSERT_TRUE_M'][op] = 'ASSERT_%s_M' % replacement
-
-for op, inv_replacement in [('==', 'NE'), ('!=', 'EQ'),
- ('>=', 'LT'), ('>', 'LE'),
- ('<=', 'GT'), ('<', 'GE')]:
- _CHECK_REPLACEMENT['EXPECT_FALSE'][op] = 'EXPECT_%s' % inv_replacement
- _CHECK_REPLACEMENT['ASSERT_FALSE'][op] = 'ASSERT_%s' % inv_replacement
- _CHECK_REPLACEMENT['EXPECT_FALSE_M'][op] = 'EXPECT_%s_M' % inv_replacement
- _CHECK_REPLACEMENT['ASSERT_FALSE_M'][op] = 'ASSERT_%s_M' % inv_replacement
-
-# Alternative tokens and their replacements. For full list, see section 2.5
-# Alternative tokens [lex.digraph] in the C++ standard.
-#
-# Digraphs (such as '%:') are not included here since it's a mess to
-# match those on a word boundary.
-_ALT_TOKEN_REPLACEMENT = {
- 'and': '&&',
- 'bitor': '|',
- 'or': '||',
- 'xor': '^',
- 'compl': '~',
- 'bitand': '&',
- 'and_eq': '&=',
- 'or_eq': '|=',
- 'xor_eq': '^=',
- 'not': '!',
- 'not_eq': '!='
- }
-
-# Compile regular expression that matches all the above keywords. The "[ =()]"
-# bit is meant to avoid matching these keywords outside of boolean expressions.
-#
-# False positives include C-style multi-line comments (http://go/nsiut )
-# and multi-line strings (http://go/beujw ), but those have always been
-# troublesome for cpplint.
-_ALT_TOKEN_REPLACEMENT_PATTERN = re.compile(
- r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)')
-
-
-# These constants define types of headers for use with
-# _IncludeState.CheckNextIncludeOrder().
-_C_SYS_HEADER = 1
-_CPP_SYS_HEADER = 2
-_LIKELY_MY_HEADER = 3
-_POSSIBLE_MY_HEADER = 4
-_OTHER_HEADER = 5
-
-# These constants define the current inline assembly state
-_NO_ASM = 0 # Outside of inline assembly block
-_INSIDE_ASM = 1 # Inside inline assembly block
-_END_ASM = 2 # Last line of inline assembly block
-_BLOCK_ASM = 3 # The whole block is an inline assembly block
-
-# Match start of assembly blocks
-_MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)'
- r'(?:\s+(volatile|__volatile__))?'
- r'\s*[{(]')
-
-
-_regexp_compile_cache = {}
-
-# Finds occurrences of NOLINT or NOLINT(...).
-_RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?')
-
-# {str, set(int)}: a map from error categories to sets of linenumbers
-# on which those errors are expected and should be suppressed.
-_error_suppressions = {}
-
-# The root directory used for deriving header guard CPP variable.
-# This is set by --root flag.
-_root = None
-
-def ParseNolintSuppressions(filename, raw_line, linenum, error):
- """Updates the global list of error-suppressions.
-
- Parses any NOLINT comments on the current line, updating the global
- error_suppressions store. Reports an error if the NOLINT comment
- was malformed.
-
- Args:
- filename: str, the name of the input file.
- raw_line: str, the line of input text, with comments.
- linenum: int, the number of the current line.
- error: function, an error handler.
- """
- # FIXME(adonovan): "NOLINT(" is misparsed as NOLINT(*).
- matched = _RE_SUPPRESSION.search(raw_line)
- if matched:
- category = matched.group(1)
- if category in (None, '(*)'): # => "suppress all"
- _error_suppressions.setdefault(None, set()).add(linenum)
- else:
- if category.startswith('(') and category.endswith(')'):
- category = category[1:-1]
- if category in _ERROR_CATEGORIES:
- _error_suppressions.setdefault(category, set()).add(linenum)
- else:
- error(filename, linenum, 'readability/nolint', 5,
- 'Unknown NOLINT error category: %s' % category)
-
-
-def ResetNolintSuppressions():
- "Resets the set of NOLINT suppressions to empty."
- _error_suppressions.clear()
-
-
-def IsErrorSuppressedByNolint(category, linenum):
- """Returns true if the specified error category is suppressed on this line.
-
- Consults the global error_suppressions map populated by
- ParseNolintSuppressions/ResetNolintSuppressions.
-
- Args:
- category: str, the category of the error.
- linenum: int, the current line number.
- Returns:
- bool, True iff the error should be suppressed due to a NOLINT comment.
- """
- return (linenum in _error_suppressions.get(category, set()) or
- linenum in _error_suppressions.get(None, set()))
-
-def Match(pattern, s):
- """Matches the string with the pattern, caching the compiled regexp."""
- # The regexp compilation caching is inlined in both Match and Search for
- # performance reasons; factoring it out into a separate function turns out
- # to be noticeably expensive.
- if not pattern in _regexp_compile_cache:
- _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
- return _regexp_compile_cache[pattern].match(s)
-
-
-def Search(pattern, s):
- """Searches the string for the pattern, caching the compiled regexp."""
- if not pattern in _regexp_compile_cache:
- _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
- return _regexp_compile_cache[pattern].search(s)
-
-
-class _IncludeState(dict):
- """Tracks line numbers for includes, and the order in which includes appear.
-
- As a dict, an _IncludeState object serves as a mapping between include
- filename and line number on which that file was included.
-
- Call CheckNextIncludeOrder() once for each header in the file, passing
- in the type constants defined above. Calls in an illegal order will
- raise an _IncludeError with an appropriate error message.
-
- """
- # self._section will move monotonically through this set. If it ever
- # needs to move backwards, CheckNextIncludeOrder will raise an error.
- _INITIAL_SECTION = 0
- _MY_H_SECTION = 1
- _C_SECTION = 2
- _CPP_SECTION = 3
- _OTHER_H_SECTION = 4
-
- _TYPE_NAMES = {
- _C_SYS_HEADER: 'C system header',
- _CPP_SYS_HEADER: 'C++ system header',
- _LIKELY_MY_HEADER: 'header this file implements',
- _POSSIBLE_MY_HEADER: 'header this file may implement',
- _OTHER_HEADER: 'other header',
- }
- _SECTION_NAMES = {
- _INITIAL_SECTION: "... nothing. (This can't be an error.)",
- _MY_H_SECTION: 'a header this file implements',
- _C_SECTION: 'C system header',
- _CPP_SECTION: 'C++ system header',
- _OTHER_H_SECTION: 'other header',
- }
-
- def __init__(self):
- dict.__init__(self)
- # The name of the current section.
- self._section = self._INITIAL_SECTION
- # The path of last found header.
- self._last_header = ''
-
- def CanonicalizeAlphabeticalOrder(self, header_path):
- """Returns a path canonicalized for alphabetical comparison.
-
- - replaces "-" with "_" so they both cmp the same.
- - removes '-inl' since we don't require them to be after the main header.
- - lowercase everything, just in case.
-
- Args:
- header_path: Path to be canonicalized.
-
- Returns:
- Canonicalized path.
- """
- return header_path.replace('-inl.h', '.h').replace('-', '_').lower()
-
- def IsInAlphabeticalOrder(self, header_path):
- """Check if a header is in alphabetical order with the previous header.
-
- Args:
- header_path: Header to be checked.
-
- Returns:
- Returns true if the header is in alphabetical order.
- """
- canonical_header = self.CanonicalizeAlphabeticalOrder(header_path)
- if self._last_header > canonical_header:
- return False
- self._last_header = canonical_header
- return True
-
- def CheckNextIncludeOrder(self, header_type):
- """Returns a non-empty error message if the next header is out of order.
-
- This function also updates the internal state to be ready to check
- the next include.
-
- Args:
- header_type: One of the _XXX_HEADER constants defined above.
-
- Returns:
- The empty string if the header is in the right order, or an
- error message describing what's wrong.
-
- """
- error_message = ('Found %s after %s' %
- (self._TYPE_NAMES[header_type],
- self._SECTION_NAMES[self._section]))
-
- last_section = self._section
-
- if header_type == _C_SYS_HEADER:
- if self._section <= self._C_SECTION:
- self._section = self._C_SECTION
- else:
- self._last_header = ''
- return error_message
- elif header_type == _CPP_SYS_HEADER:
- if self._section <= self._CPP_SECTION:
- self._section = self._CPP_SECTION
- else:
- self._last_header = ''
- return error_message
- elif header_type == _LIKELY_MY_HEADER:
- if self._section <= self._MY_H_SECTION:
- self._section = self._MY_H_SECTION
- else:
- self._section = self._OTHER_H_SECTION
- elif header_type == _POSSIBLE_MY_HEADER:
- if self._section <= self._MY_H_SECTION:
- self._section = self._MY_H_SECTION
- else:
- # This will always be the fallback because we're not sure
- # enough that the header is associated with this file.
- self._section = self._OTHER_H_SECTION
- else:
- assert header_type == _OTHER_HEADER
- self._section = self._OTHER_H_SECTION
-
- if last_section != self._section:
- self._last_header = ''
-
- return ''
-
-
-class _CppLintState(object):
- """Maintains module-wide state.."""
-
- def __init__(self):
- self.verbose_level = 1 # global setting.
- self.error_count = 0 # global count of reported errors
- # filters to apply when emitting error messages
- self.filters = _DEFAULT_FILTERS[:]
- self.counting = 'total' # In what way are we counting errors?
- self.errors_by_category = {} # string to int dict storing error counts
-
- # output format:
- # "emacs" - format that emacs can parse (default)
- # "vs7" - format that Microsoft Visual Studio 7 can parse
- self.output_format = 'emacs'
-
- def SetOutputFormat(self, output_format):
- """Sets the output format for errors."""
- self.output_format = output_format
-
- def SetVerboseLevel(self, level):
- """Sets the module's verbosity, and returns the previous setting."""
- last_verbose_level = self.verbose_level
- self.verbose_level = level
- return last_verbose_level
-
- def SetCountingStyle(self, counting_style):
- """Sets the module's counting options."""
- self.counting = counting_style
-
- def SetFilters(self, filters):
- """Sets the error-message filters.
-
- These filters are applied when deciding whether to emit a given
- error message.
-
- Args:
- filters: A string of comma-separated filters (eg "+whitespace/indent").
- Each filter should start with + or -; else we die.
-
- Raises:
- ValueError: The comma-separated filters did not all start with '+' or '-'.
- E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter"
- """
- # Default filters always have less priority than the flag ones.
- self.filters = _DEFAULT_FILTERS[:]
- for filt in filters.split(','):
- clean_filt = filt.strip()
- if clean_filt:
- self.filters.append(clean_filt)
- for filt in self.filters:
- if not (filt.startswith('+') or filt.startswith('-')):
- raise ValueError('Every filter in --filters must start with + or -'
- ' (%s does not)' % filt)
-
- def ResetErrorCounts(self):
- """Sets the module's error statistic back to zero."""
- self.error_count = 0
- self.errors_by_category = {}
-
- def IncrementErrorCount(self, category):
- """Bumps the module's error statistic."""
- self.error_count += 1
- if self.counting in ('toplevel', 'detailed'):
- if self.counting != 'detailed':
- category = category.split('/')[0]
- if category not in self.errors_by_category:
- self.errors_by_category[category] = 0
- self.errors_by_category[category] += 1
-
- def PrintErrorCounts(self):
- """Print a summary of errors by category, and the total."""
- for category, count in self.errors_by_category.iteritems():
- sys.stderr.write('Category \'%s\' errors found: %d\n' %
- (category, count))
- sys.stderr.write('Total errors found: %d\n' % self.error_count)
-
-_cpplint_state = _CppLintState()
-
-
-def _OutputFormat():
- """Gets the module's output format."""
- return _cpplint_state.output_format
-
-
-def _SetOutputFormat(output_format):
- """Sets the module's output format."""
- _cpplint_state.SetOutputFormat(output_format)
-
-
-def _VerboseLevel():
- """Returns the module's verbosity setting."""
- return _cpplint_state.verbose_level
-
-
-def _SetVerboseLevel(level):
- """Sets the module's verbosity, and returns the previous setting."""
- return _cpplint_state.SetVerboseLevel(level)
-
-
-def _SetCountingStyle(level):
- """Sets the module's counting options."""
- _cpplint_state.SetCountingStyle(level)
-
-
-def _Filters():
- """Returns the module's list of output filters, as a list."""
- return _cpplint_state.filters
-
-
-def _SetFilters(filters):
- """Sets the module's error-message filters.
-
- These filters are applied when deciding whether to emit a given
- error message.
-
- Args:
- filters: A string of comma-separated filters (eg "whitespace/indent").
- Each filter should start with + or -; else we die.
- """
- _cpplint_state.SetFilters(filters)
-
-
-class _FunctionState(object):
- """Tracks current function name and the number of lines in its body."""
-
- _NORMAL_TRIGGER = 250 # for --v=0, 500 for --v=1, etc.
- _TEST_TRIGGER = 400 # about 50% more than _NORMAL_TRIGGER.
-
- def __init__(self):
- self.in_a_function = False
- self.lines_in_function = 0
- self.current_function = ''
-
- def Begin(self, function_name):
- """Start analyzing function body.
-
- Args:
- function_name: The name of the function being tracked.
- """
- self.in_a_function = True
- self.lines_in_function = 0
- self.current_function = function_name
-
- def Count(self):
- """Count line in current function body."""
- if self.in_a_function:
- self.lines_in_function += 1
-
- def Check(self, error, filename, linenum):
- """Report if too many lines in function body.
-
- Args:
- error: The function to call with any errors found.
- filename: The name of the current file.
- linenum: The number of the line to check.
- """
- if Match(r'T(EST|est)', self.current_function):
- base_trigger = self._TEST_TRIGGER
- else:
- base_trigger = self._NORMAL_TRIGGER
- trigger = base_trigger * 2**_VerboseLevel()
-
- if self.lines_in_function > trigger:
- error_level = int(math.log(self.lines_in_function / base_trigger, 2))
- # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ...
- if error_level > 5:
- error_level = 5
- error(filename, linenum, 'readability/fn_size', error_level,
- 'Small and focused functions are preferred:'
- ' %s has %d non-comment lines'
- ' (error triggered by exceeding %d lines).' % (
- self.current_function, self.lines_in_function, trigger))
-
- def End(self):
- """Stop analyzing function body."""
- self.in_a_function = False
-
-
-class _IncludeError(Exception):
- """Indicates a problem with the include order in a file."""
- pass
-
-
-class FileInfo:
- """Provides utility functions for filenames.
-
- FileInfo provides easy access to the components of a file's path
- relative to the project root.
- """
-
- def __init__(self, filename):
- self._filename = filename
-
- def FullName(self):
- """Make Windows paths like Unix."""
- return os.path.abspath(self._filename).replace('\\', '/')
-
- def RepositoryName(self):
- """FullName after removing the local path to the repository.
-
- If we have a real absolute path name here we can try to do something smart:
- detecting the root of the checkout and truncating /path/to/checkout from
- the name so that we get header guards that don't include things like
- "C:\Documents and Settings\..." or "/home/username/..." in them and thus
- people on different computers who have checked the source out to different
- locations won't see bogus errors.
- """
- fullname = self.FullName()
-
- if os.path.exists(fullname):
- project_dir = os.path.dirname(fullname)
-
- if os.path.exists(os.path.join(project_dir, ".svn")):
- # If there's a .svn file in the current directory, we recursively look
- # up the directory tree for the top of the SVN checkout
- root_dir = project_dir
- one_up_dir = os.path.dirname(root_dir)
- while os.path.exists(os.path.join(one_up_dir, ".svn")):
- root_dir = os.path.dirname(root_dir)
- one_up_dir = os.path.dirname(one_up_dir)
-
- prefix = os.path.commonprefix([root_dir, project_dir])
- return fullname[len(prefix) + 1:]
-
- # Not SVN <= 1.6? Try to find a git, hg, or svn top level directory by
- # searching up from the current path.
- root_dir = os.path.dirname(fullname)
- while (root_dir != os.path.dirname(root_dir) and
- not os.path.exists(os.path.join(root_dir, ".git")) and
- not os.path.exists(os.path.join(root_dir, ".hg")) and
- not os.path.exists(os.path.join(root_dir, ".svn"))):
- root_dir = os.path.dirname(root_dir)
-
- if (os.path.exists(os.path.join(root_dir, ".git")) or
- os.path.exists(os.path.join(root_dir, ".hg")) or
- os.path.exists(os.path.join(root_dir, ".svn"))):
- prefix = os.path.commonprefix([root_dir, project_dir])
- return fullname[len(prefix) + 1:]
-
- # Don't know what to do; header guard warnings may be wrong...
- return fullname
-
- def Split(self):
- """Splits the file into the directory, basename, and extension.
-
- For 'chrome/browser/browser.cc', Split() would
- return ('chrome/browser', 'browser', '.cc')
-
- Returns:
- A tuple of (directory, basename, extension).
- """
-
- googlename = self.RepositoryName()
- project, rest = os.path.split(googlename)
- return (project,) + os.path.splitext(rest)
-
- def BaseName(self):
- """File base name - text after the final slash, before the final period."""
- return self.Split()[1]
-
- def Extension(self):
- """File extension - text following the final period."""
- return self.Split()[2]
-
- def NoExtension(self):
- """File has no source file extension."""
- return '/'.join(self.Split()[0:2])
-
- def IsSource(self):
- """File has a source file extension."""
- return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
-
-
-def _ShouldPrintError(category, confidence, linenum):
- """If confidence >= verbose, category passes filter and is not suppressed."""
-
- # There are three ways we might decide not to print an error message:
- # a "NOLINT(category)" comment appears in the source,
- # the verbosity level isn't high enough, or the filters filter it out.
- if IsErrorSuppressedByNolint(category, linenum):
- return False
- if confidence < _cpplint_state.verbose_level:
- return False
-
- is_filtered = False
- for one_filter in _Filters():
- if one_filter.startswith('-'):
- if category.startswith(one_filter[1:]):
- is_filtered = True
- elif one_filter.startswith('+'):
- if category.startswith(one_filter[1:]):
- is_filtered = False
- else:
- assert False # should have been checked for in SetFilter.
- if is_filtered:
- return False
-
- return True
-
-
-def Error(filename, linenum, category, confidence, message):
- """Logs the fact we've found a lint error.
-
- We log where the error was found, and also our confidence in the error,
- that is, how certain we are this is a legitimate style regression, and
- not a misidentification or a use that's sometimes justified.
-
- False positives can be suppressed by the use of
- "cpplint(category)" comments on the offending line. These are
- parsed into _error_suppressions.
-
- Args:
- filename: The name of the file containing the error.
- linenum: The number of the line containing the error.
- category: A string used to describe the "category" this bug
- falls under: "whitespace", say, or "runtime". Categories
- may have a hierarchy separated by slashes: "whitespace/indent".
- confidence: A number from 1-5 representing a confidence score for
- the error, with 5 meaning that we are certain of the problem,
- and 1 meaning that it could be a legitimate construct.
- message: The error message.
- """
- if _ShouldPrintError(category, confidence, linenum):
- _cpplint_state.IncrementErrorCount(category)
- if _cpplint_state.output_format == 'vs7':
- sys.stderr.write('%s(%s): %s [%s] [%d]\n' % (
- filename, linenum, message, category, confidence))
- elif _cpplint_state.output_format == 'eclipse':
- sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % (
- filename, linenum, message, category, confidence))
- else:
- sys.stderr.write('%s:%s: %s [%s] [%d]\n' % (
- filename, linenum, message, category, confidence))
-
-
-# Matches standard C++ escape esequences per 2.13.2.3 of the C++ standard.
-_RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
- r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)')
-# Matches strings. Escape codes should already be removed by ESCAPES.
-_RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"')
-# Matches characters. Escape codes should already be removed by ESCAPES.
-_RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'")
-# Matches multi-line C++ comments.
-# This RE is a little bit more complicated than one might expect, because we
-# have to take care of space removals tools so we can handle comments inside
-# statements better.
-# The current rule is: We only clear spaces from both sides when we're at the
-# end of the line. Otherwise, we try to remove spaces from the right side,
-# if this doesn't work we try on left side but only if there's a non-character
-# on the right.
-_RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile(
- r"""(\s*/\*.*\*/\s*$|
- /\*.*\*/\s+|
- \s+/\*.*\*/(?=\W)|
- /\*.*\*/)""", re.VERBOSE)
-
-
-def IsCppString(line):
- """Does line terminate so, that the next symbol is in string constant.
-
- This function does not consider single-line nor multi-line comments.
-
- Args:
- line: is a partial line of code starting from the 0..n.
-
- Returns:
- True, if next character appended to 'line' is inside a
- string constant.
- """
-
- line = line.replace(r'\\', 'XX') # after this, \\" does not match to \"
- return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1
-
-
-def FindNextMultiLineCommentStart(lines, lineix):
- """Find the beginning marker for a multiline comment."""
- while lineix < len(lines):
- if lines[lineix].strip().startswith('/*'):
- # Only return this marker if the comment goes beyond this line
- if lines[lineix].strip().find('*/', 2) < 0:
- return lineix
- lineix += 1
- return len(lines)
-
-
-def FindNextMultiLineCommentEnd(lines, lineix):
- """We are inside a comment, find the end marker."""
- while lineix < len(lines):
- if lines[lineix].strip().endswith('*/'):
- return lineix
- lineix += 1
- return len(lines)
-
-
-def RemoveMultiLineCommentsFromRange(lines, begin, end):
- """Clears a range of lines for multi-line comments."""
- # Having // dummy comments makes the lines non-empty, so we will not get
- # unnecessary blank line warnings later in the code.
- for i in range(begin, end):
- lines[i] = '// dummy'
-
-
-def RemoveMultiLineComments(filename, lines, error):
- """Removes multiline (c-style) comments from lines."""
- lineix = 0
- while lineix < len(lines):
- lineix_begin = FindNextMultiLineCommentStart(lines, lineix)
- if lineix_begin >= len(lines):
- return
- lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin)
- if lineix_end >= len(lines):
- error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
- 'Could not find end of multi-line comment')
- return
- RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1)
- lineix = lineix_end + 1
-
-
-def CleanseComments(line):
- """Removes //-comments and single-line C-style /* */ comments.
-
- Args:
- line: A line of C++ source.
-
- Returns:
- The line with single-line comments removed.
- """
- commentpos = line.find('//')
- if commentpos != -1 and not IsCppString(line[:commentpos]):
- line = line[:commentpos].rstrip()
- # get rid of /* ... */
- return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line)
-
-
-class CleansedLines(object):
- """Holds 3 copies of all lines with different preprocessing applied to them.
-
- 1) elided member contains lines without strings and comments,
- 2) lines member contains lines without comments, and
- 3) raw_lines member contains all the lines without processing.
- All these three members are of <type 'list'>, and of the same length.
- """
-
- def __init__(self, lines):
- self.elided = []
- self.lines = []
- self.raw_lines = lines
- self.num_lines = len(lines)
- for linenum in range(len(lines)):
- self.lines.append(CleanseComments(lines[linenum]))
- elided = self._CollapseStrings(lines[linenum])
- self.elided.append(CleanseComments(elided))
-
- def NumLines(self):
- """Returns the number of lines represented."""
- return self.num_lines
-
- @staticmethod
- def _CollapseStrings(elided):
- """Collapses strings and chars on a line to simple "" or '' blocks.
-
- We nix strings first so we're not fooled by text like '"http://"'
-
- Args:
- elided: The line being processed.
-
- Returns:
- The line with collapsed strings.
- """
- if not _RE_PATTERN_INCLUDE.match(elided):
- # Remove escaped characters first to make quote/single quote collapsing
- # basic. Things that look like escaped characters shouldn't occur
- # outside of strings and chars.
- elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub('', elided)
- elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub("''", elided)
- elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub('""', elided)
- return elided
-
-
-def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar):
- """Find the position just after the matching endchar.
-
- Args:
- line: a CleansedLines line.
- startpos: start searching at this position.
- depth: nesting level at startpos.
- startchar: expression opening character.
- endchar: expression closing character.
-
- Returns:
- Index just after endchar.
- """
- for i in xrange(startpos, len(line)):
- if line[i] == startchar:
- depth += 1
- elif line[i] == endchar:
- depth -= 1
- if depth == 0:
- return i + 1
- return -1
-
-
-def CloseExpression(clean_lines, linenum, pos):
- """If input points to ( or { or [, finds the position that closes it.
-
- If lines[linenum][pos] points to a '(' or '{' or '[', finds the
- linenum/pos that correspond to the closing of the expression.
-
- Args:
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- pos: A position on the line.
-
- Returns:
- A tuple (line, linenum, pos) pointer *past* the closing brace, or
- (line, len(lines), -1) if we never find a close. Note we ignore
- strings and comments when matching; and the line we return is the
- 'cleansed' line at linenum.
- """
-
- line = clean_lines.elided[linenum]
- startchar = line[pos]
- if startchar not in '({[':
- return (line, clean_lines.NumLines(), -1)
- if startchar == '(': endchar = ')'
- if startchar == '[': endchar = ']'
- if startchar == '{': endchar = '}'
-
- # Check first line
- end_pos = FindEndOfExpressionInLine(line, pos, 0, startchar, endchar)
- if end_pos > -1:
- return (line, linenum, end_pos)
- tail = line[pos:]
- num_open = tail.count(startchar) - tail.count(endchar)
- while linenum < clean_lines.NumLines() - 1:
- linenum += 1
- line = clean_lines.elided[linenum]
- delta = line.count(startchar) - line.count(endchar)
- if num_open + delta <= 0:
- return (line, linenum,
- FindEndOfExpressionInLine(line, 0, num_open, startchar, endchar))
- num_open += delta
-
- # Did not find endchar before end of file, give up
- return (line, clean_lines.NumLines(), -1)
-
-def CheckForCopyright(filename, lines, error):
- """Logs an error if no Copyright message appears at the top of the file."""
-
- # We'll say it should occur by line 10. Don't forget there's a
- # dummy line at the front.
- for line in xrange(1, min(len(lines), 11)):
- if re.search(r'Copyright', lines[line], re.I): break
- else: # means no copyright line was found
- error(filename, 0, 'legal/copyright', 5,
- 'No copyright message found. '
- 'You should have a line: "Copyright [year] <Copyright Owner>"')
-
-
-def GetHeaderGuardCPPVariable(filename):
- """Returns the CPP variable that should be used as a header guard.
-
- Args:
- filename: The name of a C++ header file.
-
- Returns:
- The CPP variable that should be used as a header guard in the
- named file.
-
- """
-
- # Restores original filename in case that cpplint is invoked from Emacs's
- # flymake.
- filename = re.sub(r'_flymake\.h$', '.h', filename)
- filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
-
- fileinfo = FileInfo(filename)
- file_path_from_root = fileinfo.RepositoryName()
- if _root:
- file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root)
- return re.sub(r'[-./\s]', '_', file_path_from_root).upper() + '_'
-
-
-def CheckForHeaderGuard(filename, lines, error):
- """Checks that the file contains a header guard.
-
- Logs an error if no #ifndef header guard is present. For other
- headers, checks that the full pathname is used.
-
- Args:
- filename: The name of the C++ header file.
- lines: An array of strings, each representing a line of the file.
- error: The function to call with any errors found.
- """
-
- cppvar = GetHeaderGuardCPPVariable(filename)
-
- ifndef = None
- ifndef_linenum = 0
- define = None
- endif = None
- endif_linenum = 0
- for linenum, line in enumerate(lines):
- linesplit = line.split()
- if len(linesplit) >= 2:
- # find the first occurrence of #ifndef and #define, save arg
- if not ifndef and linesplit[0] == '#ifndef':
- # set ifndef to the header guard presented on the #ifndef line.
- ifndef = linesplit[1]
- ifndef_linenum = linenum
- if not define and linesplit[0] == '#define':
- define = linesplit[1]
- # find the last occurrence of #endif, save entire line
- if line.startswith('#endif'):
- endif = line
- endif_linenum = linenum
-
- if not ifndef:
- error(filename, 0, 'build/header_guard', 5,
- 'No #ifndef header guard found, suggested CPP variable is: %s' %
- cppvar)
- return
-
- if not define:
- error(filename, 0, 'build/header_guard', 5,
- 'No #define header guard found, suggested CPP variable is: %s' %
- cppvar)
- return
-
- # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__
- # for backward compatibility.
- if ifndef != cppvar:
- error_level = 0
- if ifndef != cppvar + '_':
- error_level = 5
-
- ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum,
- error)
- error(filename, ifndef_linenum, 'build/header_guard', error_level,
- '#ifndef header guard has wrong style, please use: %s' % cppvar)
-
- if define != ifndef:
- error(filename, 0, 'build/header_guard', 5,
- '#ifndef and #define don\'t match, suggested CPP variable is: %s' %
- cppvar)
- return
-
- if endif != ('#endif // %s' % cppvar):
- error_level = 0
- if endif != ('#endif // %s' % (cppvar + '_')):
- error_level = 5
-
- ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum,
- error)
- error(filename, endif_linenum, 'build/header_guard', error_level,
- '#endif line should be "#endif // %s"' % cppvar)
-
-
-def CheckForUnicodeReplacementCharacters(filename, lines, error):
- """Logs an error for each line containing Unicode replacement characters.
-
- These indicate that either the file contained invalid UTF-8 (likely)
- or Unicode replacement characters (which it shouldn't). Note that
- it's possible for this to throw off line numbering if the invalid
- UTF-8 occurred adjacent to a newline.
-
- Args:
- filename: The name of the current file.
- lines: An array of strings, each representing a line of the file.
- error: The function to call with any errors found.
- """
- for linenum, line in enumerate(lines):
- if u'\ufffd' in line:
- error(filename, linenum, 'readability/utf8', 5,
- 'Line contains invalid UTF-8 (or Unicode replacement character).')
-
-
-def CheckForNewlineAtEOF(filename, lines, error):
- """Logs an error if there is no newline char at the end of the file.
-
- Args:
- filename: The name of the current file.
- lines: An array of strings, each representing a line of the file.
- error: The function to call with any errors found.
- """
-
- # The array lines() was created by adding two newlines to the
- # original file (go figure), then splitting on \n.
- # To verify that the file ends in \n, we just have to make sure the
- # last-but-two element of lines() exists and is empty.
- if len(lines) < 3 or lines[-2]:
- error(filename, len(lines) - 2, 'whitespace/ending_newline', 5,
- 'Could not find a newline character at the end of the file.')
-
-
-def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error):
- """Logs an error if we see /* ... */ or "..." that extend past one line.
-
- /* ... */ comments are legit inside macros, for one line.
- Otherwise, we prefer // comments, so it's ok to warn about the
- other. Likewise, it's ok for strings to extend across multiple
- lines, as long as a line continuation character (backslash)
- terminates each line. Although not currently prohibited by the C++
- style guide, it's ugly and unnecessary. We don't do well with either
- in this lint program, so we warn about both.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- line = clean_lines.elided[linenum]
-
- # Remove all \\ (escaped backslashes) from the line. They are OK, and the
- # second (escaped) slash may trigger later \" detection erroneously.
- line = line.replace('\\\\', '')
-
- if line.count('/*') > line.count('*/'):
- error(filename, linenum, 'readability/multiline_comment', 5,
- 'Complex multi-line /*...*/-style comment found. '
- 'Lint may give bogus warnings. '
- 'Consider replacing these with //-style comments, '
- 'with #if 0...#endif, '
- 'or with more clearly structured multi-line comments.')
-
- if (line.count('"') - line.count('\\"')) % 2:
- error(filename, linenum, 'readability/multiline_string', 5,
- 'Multi-line string ("...") found. This lint script doesn\'t '
- 'do well with such strings, and may give bogus warnings. They\'re '
- 'ugly and unnecessary, and you should use concatenation instead".')
-
-
-threading_list = (
- ('asctime(', 'asctime_r('),
- ('ctime(', 'ctime_r('),
- ('getgrgid(', 'getgrgid_r('),
- ('getgrnam(', 'getgrnam_r('),
- ('getlogin(', 'getlogin_r('),
- ('getpwnam(', 'getpwnam_r('),
- ('getpwuid(', 'getpwuid_r('),
- ('gmtime(', 'gmtime_r('),
- ('localtime(', 'localtime_r('),
- ('rand(', 'rand_r('),
- ('readdir(', 'readdir_r('),
- ('strtok(', 'strtok_r('),
- ('ttyname(', 'ttyname_r('),
- )
-
-
-def CheckPosixThreading(filename, clean_lines, linenum, error):
- """Checks for calls to thread-unsafe functions.
-
- Much code has been originally written without consideration of
- multi-threading. Also, engineers are relying on their old experience;
- they have learned posix before threading extensions were added. These
- tests guide the engineers to use thread-safe functions (when using
- posix directly).
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- line = clean_lines.elided[linenum]
- for single_thread_function, multithread_safe_function in threading_list:
- ix = line.find(single_thread_function)
- # Comparisons made explicit for clarity -- pylint: disable-msg=C6403
- if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and
- line[ix - 1] not in ('_', '.', '>'))):
- error(filename, linenum, 'runtime/threadsafe_fn', 2,
- 'Consider using ' + multithread_safe_function +
- '...) instead of ' + single_thread_function +
- '...) for improved thread safety.')
-
-
-# Matches invalid increment: *count++, which moves pointer instead of
-# incrementing a value.
-_RE_PATTERN_INVALID_INCREMENT = re.compile(
- r'^\s*\*\w+(\+\+|--);')
-
-
-def CheckInvalidIncrement(filename, clean_lines, linenum, error):
- """Checks for invalid increment *count++.
-
- For example following function:
- void increment_counter(int* count) {
- *count++;
- }
- is invalid, because it effectively does count++, moving pointer, and should
- be replaced with ++*count, (*count)++ or *count += 1.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- line = clean_lines.elided[linenum]
- if _RE_PATTERN_INVALID_INCREMENT.match(line):
- error(filename, linenum, 'runtime/invalid_increment', 5,
- 'Changing pointer instead of value (or unused value of operator*).')
-
-
-class _BlockInfo(object):
- """Stores information about a generic block of code."""
-
- def __init__(self, seen_open_brace):
- self.seen_open_brace = seen_open_brace
- self.open_parentheses = 0
- self.inline_asm = _NO_ASM
-
- def CheckBegin(self, filename, clean_lines, linenum, error):
- """Run checks that applies to text up to the opening brace.
-
- This is mostly for checking the text after the class identifier
- and the "{", usually where the base class is specified. For other
- blocks, there isn't much to check, so we always pass.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- pass
-
- def CheckEnd(self, filename, clean_lines, linenum, error):
- """Run checks that applies to text after the closing brace.
-
- This is mostly used for checking end of namespace comments.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- pass
-
-
-class _ClassInfo(_BlockInfo):
- """Stores information about a class."""
-
- def __init__(self, name, class_or_struct, clean_lines, linenum):
- _BlockInfo.__init__(self, False)
- self.name = name
- self.starting_linenum = linenum
- self.is_derived = False
- if class_or_struct == 'struct':
- self.access = 'public'
- else:
- self.access = 'private'
-
- # Try to find the end of the class. This will be confused by things like:
- # class A {
- # } *x = { ...
- #
- # But it's still good enough for CheckSectionSpacing.
- self.last_line = 0
- depth = 0
- for i in range(linenum, clean_lines.NumLines()):
- line = clean_lines.elided[i]
- depth += line.count('{') - line.count('}')
- if not depth:
- self.last_line = i
- break
-
- def CheckBegin(self, filename, clean_lines, linenum, error):
- # Look for a bare ':'
- if Search('(^|[^:]):($|[^:])', clean_lines.elided[linenum]):
- self.is_derived = True
-
-
-class _NamespaceInfo(_BlockInfo):
- """Stores information about a namespace."""
-
- def __init__(self, name, linenum):
- _BlockInfo.__init__(self, False)
- self.name = name or ''
- self.starting_linenum = linenum
-
- def CheckEnd(self, filename, clean_lines, linenum, error):
- """Check end of namespace comments."""
- line = clean_lines.raw_lines[linenum]
-
- # Check how many lines is enclosed in this namespace. Don't issue
- # warning for missing namespace comments if there aren't enough
- # lines. However, do apply checks if there is already an end of
- # namespace comment and it's incorrect.
- #
- # TODO(unknown): We always want to check end of namespace comments
- # if a namespace is large, but sometimes we also want to apply the
- # check if a short namespace contained nontrivial things (something
- # other than forward declarations). There is currently no logic on
- # deciding what these nontrivial things are, so this check is
- # triggered by namespace size only, which works most of the time.
- if (linenum - self.starting_linenum < 10
- and not Match(r'};*\s*(//|/\*).*\bnamespace\b', line)):
- return
-
- # Look for matching comment at end of namespace.
- #
- # Note that we accept C style "/* */" comments for terminating
- # namespaces, so that code that terminate namespaces inside
- # preprocessor macros can be cpplint clean. Example: http://go/nxpiz
- #
- # We also accept stuff like "// end of namespace <name>." with the
- # period at the end.
- #
- # Besides these, we don't accept anything else, otherwise we might
- # get false negatives when existing comment is a substring of the
- # expected namespace. Example: http://go/ldkdc, http://cl/23548205
- if self.name:
- # Named namespace
- if not Match((r'};*\s*(//|/\*).*\bnamespace\s+' + re.escape(self.name) +
- r'[\*/\.\\\s]*$'),
- line):
- error(filename, linenum, 'readability/namespace', 5,
- 'Namespace should be terminated with "// namespace %s"' %
- self.name)
- else:
- # Anonymous namespace
- if not Match(r'};*\s*(//|/\*).*\bnamespace[\*/\.\\\s]*$', line):
- error(filename, linenum, 'readability/namespace', 5,
- 'Namespace should be terminated with "// namespace"')
-
-
-class _PreprocessorInfo(object):
- """Stores checkpoints of nesting stacks when #if/#else is seen."""
-
- def __init__(self, stack_before_if):
- # The entire nesting stack before #if
- self.stack_before_if = stack_before_if
-
- # The entire nesting stack up to #else
- self.stack_before_else = []
-
- # Whether we have already seen #else or #elif
- self.seen_else = False
-
-
-class _NestingState(object):
- """Holds states related to parsing braces."""
-
- def __init__(self):
- # Stack for tracking all braces. An object is pushed whenever we
- # see a "{", and popped when we see a "}". Only 3 types of
- # objects are possible:
- # - _ClassInfo: a class or struct.
- # - _NamespaceInfo: a namespace.
- # - _BlockInfo: some other type of block.
- self.stack = []
-
- # Stack of _PreprocessorInfo objects.
- self.pp_stack = []
-
- def SeenOpenBrace(self):
- """Check if we have seen the opening brace for the innermost block.
-
- Returns:
- True if we have seen the opening brace, False if the innermost
- block is still expecting an opening brace.
- """
- return (not self.stack) or self.stack[-1].seen_open_brace
-
- def InNamespaceBody(self):
- """Check if we are currently one level inside a namespace body.
-
- Returns:
- True if top of the stack is a namespace block, False otherwise.
- """
- return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
-
- def UpdatePreprocessor(self, line):
- """Update preprocessor stack.
-
- We need to handle preprocessors due to classes like this:
- #ifdef SWIG
- struct ResultDetailsPageElementExtensionPoint {
- #else
- struct ResultDetailsPageElementExtensionPoint : public Extension {
- #endif
- (see http://go/qwddn for original example)
-
- We make the following assumptions (good enough for most files):
- - Preprocessor condition evaluates to true from #if up to first
- #else/#elif/#endif.
-
- - Preprocessor condition evaluates to false from #else/#elif up
- to #endif. We still perform lint checks on these lines, but
- these do not affect nesting stack.
-
- Args:
- line: current line to check.
- """
- if Match(r'^\s*#\s*(if|ifdef|ifndef)\b', line):
- # Beginning of #if block, save the nesting stack here. The saved
- # stack will allow us to restore the parsing state in the #else case.
- self.pp_stack.append(_PreprocessorInfo(copy.deepcopy(self.stack)))
- elif Match(r'^\s*#\s*(else|elif)\b', line):
- # Beginning of #else block
- if self.pp_stack:
- if not self.pp_stack[-1].seen_else:
- # This is the first #else or #elif block. Remember the
- # whole nesting stack up to this point. This is what we
- # keep after the #endif.
- self.pp_stack[-1].seen_else = True
- self.pp_stack[-1].stack_before_else = copy.deepcopy(self.stack)
-
- # Restore the stack to how it was before the #if
- self.stack = copy.deepcopy(self.pp_stack[-1].stack_before_if)
- else:
- # TODO(unknown): unexpected #else, issue warning?
- pass
- elif Match(r'^\s*#\s*endif\b', line):
- # End of #if or #else blocks.
- if self.pp_stack:
- # If we saw an #else, we will need to restore the nesting
- # stack to its former state before the #else, otherwise we
- # will just continue from where we left off.
- if self.pp_stack[-1].seen_else:
- # Here we can just use a shallow copy since we are the last
- # reference to it.
- self.stack = self.pp_stack[-1].stack_before_else
- # Drop the corresponding #if
- self.pp_stack.pop()
- else:
- # TODO(unknown): unexpected #endif, issue warning?
- pass
-
- def Update(self, filename, clean_lines, linenum, error):
- """Update nesting state with current line.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- line = clean_lines.elided[linenum]
-
- # Update pp_stack first
- self.UpdatePreprocessor(line)
-
- # Count parentheses. This is to avoid adding struct arguments to
- # the nesting stack.
- if self.stack:
- inner_block = self.stack[-1]
- depth_change = line.count('(') - line.count(')')
- inner_block.open_parentheses += depth_change
-
- # Also check if we are starting or ending an inline assembly block.
- if inner_block.inline_asm in (_NO_ASM, _END_ASM):
- if (depth_change != 0 and
- inner_block.open_parentheses == 1 and
- _MATCH_ASM.match(line)):
- # Enter assembly block
- inner_block.inline_asm = _INSIDE_ASM
- else:
- # Not entering assembly block. If previous line was _END_ASM,
- # we will now shift to _NO_ASM state.
- inner_block.inline_asm = _NO_ASM
- elif (inner_block.inline_asm == _INSIDE_ASM and
- inner_block.open_parentheses == 0):
- # Exit assembly block
- inner_block.inline_asm = _END_ASM
-
- # Consume namespace declaration at the beginning of the line. Do
- # this in a loop so that we catch same line declarations like this:
- # namespace proto2 { namespace bridge { class MessageSet; } }
- while True:
- # Match start of namespace. The "\b\s*" below catches namespace
- # declarations even if it weren't followed by a whitespace, this
- # is so that we don't confuse our namespace checker. The
- # missing spaces will be flagged by CheckSpacing.
- namespace_decl_match = Match(r'^\s*namespace\b\s*([:\w]+)?(.*)$', line)
- if not namespace_decl_match:
- break
-
- new_namespace = _NamespaceInfo(namespace_decl_match.group(1), linenum)
- self.stack.append(new_namespace)
-
- line = namespace_decl_match.group(2)
- if line.find('{') != -1:
- new_namespace.seen_open_brace = True
- line = line[line.find('{') + 1:]
-
- # Look for a class declaration in whatever is left of the line
- # after parsing namespaces. The regexp accounts for decorated classes
- # such as in:
- # class LOCKABLE API Object {
- # };
- #
- # Templates with class arguments may confuse the parser, for example:
- # template <class T
- # class Comparator = less<T>,
- # class Vector = vector<T> >
- # class HeapQueue {
- #
- # Because this parser has no nesting state about templates, by the
- # time it saw "class Comparator", it may think that it's a new class.
- # Nested templates have a similar problem:
- # template <
- # typename ExportedType,
- # typename TupleType,
- # template <typename, typename> class ImplTemplate>
- #
- # To avoid these cases, we ignore classes that are followed by '=' or '>'
- class_decl_match = Match(
- r'\s*(template\s*<[\w\s<>,:]*>\s*)?'
- '(class|struct)\s+([A-Z_]+\s+)*(\w+(?:::\w+)*)'
- '(([^=>]|<[^<>]*>)*)$', line)
- if (class_decl_match and
- (not self.stack or self.stack[-1].open_parentheses == 0)):
- self.stack.append(_ClassInfo(
- class_decl_match.group(4), class_decl_match.group(2),
- clean_lines, linenum))
- line = class_decl_match.group(5)
-
- # If we have not yet seen the opening brace for the innermost block,
- # run checks here.
- if not self.SeenOpenBrace():
- self.stack[-1].CheckBegin(filename, clean_lines, linenum, error)
-
- # Update access control if we are inside a class/struct
- if self.stack and isinstance(self.stack[-1], _ClassInfo):
- access_match = Match(r'\s*(public|private|protected)\s*:', line)
- if access_match:
- self.stack[-1].access = access_match.group(1)
-
- # Consume braces or semicolons from what's left of the line
- while True:
- # Match first brace, semicolon, or closed parenthesis.
- matched = Match(r'^[^{;)}]*([{;)}])(.*)$', line)
- if not matched:
- break
-
- token = matched.group(1)
- if token == '{':
- # If namespace or class hasn't seen a opening brace yet, mark
- # namespace/class head as complete. Push a new block onto the
- # stack otherwise.
- if not self.SeenOpenBrace():
- self.stack[-1].seen_open_brace = True
- else:
- self.stack.append(_BlockInfo(True))
- if _MATCH_ASM.match(line):
- self.stack[-1].inline_asm = _BLOCK_ASM
- elif token == ';' or token == ')':
- # If we haven't seen an opening brace yet, but we already saw
- # a semicolon, this is probably a forward declaration. Pop
- # the stack for these.
- #
- # Similarly, if we haven't seen an opening brace yet, but we
- # already saw a closing parenthesis, then these are probably
- # function arguments with extra "class" or "struct" keywords.
- # Also pop these stack for these.
- if not self.SeenOpenBrace():
- self.stack.pop()
- else: # token == '}'
- # Perform end of block checks and pop the stack.
- if self.stack:
- self.stack[-1].CheckEnd(filename, clean_lines, linenum, error)
- self.stack.pop()
- line = matched.group(2)
-
- def InnermostClass(self):
- """Get class info on the top of the stack.
-
- Returns:
- A _ClassInfo object if we are inside a class, or None otherwise.
- """
- for i in range(len(self.stack), 0, -1):
- classinfo = self.stack[i - 1]
- if isinstance(classinfo, _ClassInfo):
- return classinfo
- return None
-
- def CheckClassFinished(self, filename, error):
- """Checks that all classes have been completely parsed.
-
- Call this when all lines in a file have been processed.
- Args:
- filename: The name of the current file.
- error: The function to call with any errors found.
- """
- # Note: This test can result in false positives if #ifdef constructs
- # get in the way of brace matching. See the testBuildClass test in
- # cpplint_unittest.py for an example of this.
- for obj in self.stack:
- if isinstance(obj, _ClassInfo):
- error(filename, obj.starting_linenum, 'build/class', 5,
- 'Failed to find complete declaration of class %s' %
- obj.name)
-
-
-def CheckForNonStandardConstructs(filename, clean_lines, linenum,
- nesting_state, error):
- """Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
-
- Complain about several constructs which gcc-2 accepts, but which are
- not standard C++. Warning about these in lint is one way to ease the
- transition to new compilers.
- - put storage class first (e.g. "static const" instead of "const static").
- - "%lld" instead of %qd" in printf-type functions.
- - "%1$d" is non-standard in printf-type functions.
- - "\%" is an undefined character escape sequence.
- - text after #endif is not allowed.
- - invalid inner-style forward declaration.
- - >? and <? operators, and their >?= and <?= cousins.
-
- Additionally, check for constructor/destructor style violations and reference
- members, as it is very convenient to do so while checking for
- gcc-2 compliance.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- nesting_state: A _NestingState instance which maintains information about
- the current stack of nested blocks being parsed.
- error: A callable to which errors are reported, which takes 4 arguments:
- filename, line number, error level, and message
- """
-
- # Remove comments from the line, but leave in strings for now.
- line = clean_lines.lines[linenum]
-
- if Search(r'printf\s*\(.*".*%[-+ ]?\d*q', line):
- error(filename, linenum, 'runtime/printf_format', 3,
- '%q in format strings is deprecated. Use %ll instead.')
-
- if Search(r'printf\s*\(.*".*%\d+\$', line):
- error(filename, linenum, 'runtime/printf_format', 2,
- '%N$ formats are unconventional. Try rewriting to avoid them.')
-
- # Remove escaped backslashes before looking for undefined escapes.
- line = line.replace('\\\\', '')
-
- if Search(r'("|\').*\\(%|\[|\(|{)', line):
- error(filename, linenum, 'build/printf_format', 3,
- '%, [, (, and { are undefined character escapes. Unescape them.')
-
- # For the rest, work with both comments and strings removed.
- line = clean_lines.elided[linenum]
-
- if Search(r'\b(const|volatile|void|char|short|int|long'
- r'|float|double|signed|unsigned'
- r'|schar|u?int8|u?int16|u?int32|u?int64)'
- r'\s+(register|static|extern|typedef)\b',
- line):
- error(filename, linenum, 'build/storage_class', 5,
- 'Storage class (static, extern, typedef, etc) should be first.')
-
- if Match(r'\s*#\s*endif\s*[^/\s]+', line):
- error(filename, linenum, 'build/endif_comment', 5,
- 'Uncommented text after #endif is non-standard. Use a comment.')
-
- if Match(r'\s*class\s+(\w+\s*::\s*)+\w+\s*;', line):
- error(filename, linenum, 'build/forward_decl', 5,
- 'Inner-style forward declarations are invalid. Remove this line.')
-
- if Search(r'(\w+|[+-]?\d+(\.\d*)?)\s*(<|>)\?=?\s*(\w+|[+-]?\d+)(\.\d*)?',
- line):
- error(filename, linenum, 'build/deprecated', 3,
- '>? and <? (max and min) operators are non-standard and deprecated.')
-
- if Search(r'^\s*const\s*string\s*&\s*\w+\s*;', line):
- # TODO(unknown): Could it be expanded safely to arbitrary references,
- # without triggering too many false positives? The first
- # attempt triggered 5 warnings for mostly benign code in the regtest, hence
- # the restriction.
- # Here's the original regexp, for the reference:
- # type_name = r'\w+((\s*::\s*\w+)|(\s*<\s*\w+?\s*>))?'
- # r'\s*const\s*' + type_name + '\s*&\s*\w+\s*;'
- error(filename, linenum, 'runtime/member_string_references', 2,
- 'const string& members are dangerous. It is much better to use '
- 'alternatives, such as pointers or simple constants.')
-
- # Everything else in this function operates on class declarations.
- # Return early if the top of the nesting stack is not a class, or if
- # the class head is not completed yet.
- classinfo = nesting_state.InnermostClass()
- if not classinfo or not classinfo.seen_open_brace:
- return
-
- # The class may have been declared with namespace or classname qualifiers.
- # The constructor and destructor will not have those qualifiers.
- base_classname = classinfo.name.split('::')[-1]
-
- # Look for single-argument constructors that aren't marked explicit.
- # Technically a valid construct, but against style.
- args = Match(r'\s+(?:inline\s+)?%s\s*\(([^,()]+)\)'
- % re.escape(base_classname),
- line)
- if (args and
- args.group(1) != 'void' and
- not Match(r'(const\s+)?%s\s*(?:<\w+>\s*)?&' % re.escape(base_classname),
- args.group(1).strip())):
- error(filename, linenum, 'runtime/explicit', 5,
- 'Single-argument constructors should be marked explicit.')
-
-
-def CheckSpacingForFunctionCall(filename, line, linenum, error):
- """Checks for the correctness of various spacing around function calls.
-
- Args:
- filename: The name of the current file.
- line: The text of the line to check.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
-
- # Since function calls often occur inside if/for/while/switch
- # expressions - which have their own, more liberal conventions - we
- # first see if we should be looking inside such an expression for a
- # function call, to which we can apply more strict standards.
- fncall = line # if there's no control flow construct, look at whole line
- for pattern in (r'\bif\s*\((.*)\)\s*{',
- r'\bfor\s*\((.*)\)\s*{',
- r'\bwhile\s*\((.*)\)\s*[{;]',
- r'\bswitch\s*\((.*)\)\s*{'):
- match = Search(pattern, line)
- if match:
- fncall = match.group(1) # look inside the parens for function calls
- break
-
- # Except in if/for/while/switch, there should never be space
- # immediately inside parens (eg "f( 3, 4 )"). We make an exception
- # for nested parens ( (a+b) + c ). Likewise, there should never be
- # a space before a ( when it's a function argument. I assume it's a
- # function argument when the char before the whitespace is legal in
- # a function name (alnum + _) and we're not starting a macro. Also ignore
- # pointers and references to arrays and functions coz they're too tricky:
- # we use a very simple way to recognize these:
- # " (something)(maybe-something)" or
- # " (something)(maybe-something," or
- # " (something)[something]"
- # Note that we assume the contents of [] to be short enough that
- # they'll never need to wrap.
- if ( # Ignore control structures.
- not Search(r'\b(if|for|while|switch|return|delete)\b', fncall) and
- # Ignore pointers/references to functions.
- not Search(r' \([^)]+\)\([^)]*(\)|,$)', fncall) and
- # Ignore pointers/references to arrays.
- not Search(r' \([^)]+\)\[[^\]]+\]', fncall)):
- if Search(r'\w\s*\(\s(?!\s*\\$)', fncall): # a ( used for a fn call
- error(filename, linenum, 'whitespace/parens', 4,
- 'Extra space after ( in function call')
- elif Search(r'\(\s+(?!(\s*\\)|\()', fncall):
- error(filename, linenum, 'whitespace/parens', 2,
- 'Extra space after (')
- if (Search(r'\w\s+\(', fncall) and
- not Search(r'#\s*define|typedef', fncall) and
- not Search(r'\w\s+\((\w+::)?\*\w+\)\(', fncall)):
- error(filename, linenum, 'whitespace/parens', 4,
- 'Extra space before ( in function call')
- # If the ) is followed only by a newline or a { + newline, assume it's
- # part of a control statement (if/while/etc), and don't complain
- if Search(r'[^)]\s+\)\s*[^{\s]', fncall):
- # If the closing parenthesis is preceded by only whitespaces,
- # try to give a more descriptive error message.
- if Search(r'^\s+\)', fncall):
- error(filename, linenum, 'whitespace/parens', 2,
- 'Closing ) should be moved to the previous line')
- else:
- error(filename, linenum, 'whitespace/parens', 2,
- 'Extra space before )')
-
-
-def IsBlankLine(line):
- """Returns true if the given line is blank.
-
- We consider a line to be blank if the line is empty or consists of
- only white spaces.
-
- Args:
- line: A line of a string.
-
- Returns:
- True, if the given line is blank.
- """
- return not line or line.isspace()
-
-
-def CheckForFunctionLengths(filename, clean_lines, linenum,
- function_state, error):
- """Reports for long function bodies.
-
- For an overview why this is done, see:
- http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Write_Short_Functions
-
- Uses a simplistic algorithm assuming other style guidelines
- (especially spacing) are followed.
- Only checks unindented functions, so class members are unchecked.
- Trivial bodies are unchecked, so constructors with huge initializer lists
- may be missed.
- Blank/comment lines are not counted so as to avoid encouraging the removal
- of vertical space and comments just to get through a lint check.
- NOLINT *on the last line of a function* disables this check.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- function_state: Current function name and lines in body so far.
- error: The function to call with any errors found.
- """
- lines = clean_lines.lines
- line = lines[linenum]
- raw = clean_lines.raw_lines
- raw_line = raw[linenum]
- joined_line = ''
-
- starting_func = False
- regexp = r'(\w(\w|::|\*|\&|\s)*)\(' # decls * & space::name( ...
- match_result = Match(regexp, line)
- if match_result:
- # If the name is all caps and underscores, figure it's a macro and
- # ignore it, unless it's TEST or TEST_F.
- function_name = match_result.group(1).split()[-1]
- if function_name == 'TEST' or function_name == 'TEST_F' or (
- not Match(r'[A-Z_]+$', function_name)):
- starting_func = True
-
- if starting_func:
- body_found = False
- for start_linenum in xrange(linenum, clean_lines.NumLines()):
- start_line = lines[start_linenum]
- joined_line += ' ' + start_line.lstrip()
- if Search(r'(;|})', start_line): # Declarations and trivial functions
- body_found = True
- break # ... ignore
- elif Search(r'{', start_line):
- body_found = True
- function = Search(r'((\w|:)*)\(', line).group(1)
- if Match(r'TEST', function): # Handle TEST... macros
- parameter_regexp = Search(r'(\(.*\))', joined_line)
- if parameter_regexp: # Ignore bad syntax
- function += parameter_regexp.group(1)
- else:
- function += '()'
- function_state.Begin(function)
- break
- if not body_found:
- # No body for the function (or evidence of a non-function) was found.
- error(filename, linenum, 'readability/fn_size', 5,
- 'Lint failed to find start of function body.')
- elif Match(r'^\}\s*$', line): # function end
- function_state.Check(error, filename, linenum)
- function_state.End()
- elif not Match(r'^\s*$', line):
- function_state.Count() # Count non-blank/non-comment lines.
-
-
-_RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?')
-
-
-def CheckComment(comment, filename, linenum, error):
- """Checks for common mistakes in TODO comments.
-
- Args:
- comment: The text of the comment from the line in question.
- filename: The name of the current file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- match = _RE_PATTERN_TODO.match(comment)
- if match:
- # One whitespace is correct; zero whitespace is handled elsewhere.
- leading_whitespace = match.group(1)
- if len(leading_whitespace) > 1:
- error(filename, linenum, 'whitespace/todo', 2,
- 'Too many spaces before TODO')
-
- username = match.group(2)
- if not username:
- error(filename, linenum, 'readability/todo', 2,
- 'Missing username in TODO; it should look like '
- '"// TODO(my_username): Stuff."')
-
- middle_whitespace = match.group(3)
- # Comparisons made explicit for correctness -- pylint: disable-msg=C6403
- if middle_whitespace != ' ' and middle_whitespace != '':
- error(filename, linenum, 'whitespace/todo', 2,
- 'TODO(my_username) should be followed by a space')
-
-def CheckAccess(filename, clean_lines, linenum, nesting_state, error):
- """Checks for improper use of DISALLOW* macros.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- nesting_state: A _NestingState instance which maintains information about
- the current stack of nested blocks being parsed.
- error: The function to call with any errors found.
- """
- line = clean_lines.elided[linenum] # get rid of comments and strings
-
- matched = Match((r'\s*(DISALLOW_COPY_AND_ASSIGN|'
- r'DISALLOW_EVIL_CONSTRUCTORS|'
- r'DISALLOW_IMPLICIT_CONSTRUCTORS)'), line)
- if not matched:
- return
- if nesting_state.stack and isinstance(nesting_state.stack[-1], _ClassInfo):
- if nesting_state.stack[-1].access != 'private':
- error(filename, linenum, 'readability/constructors', 3,
- '%s must be in the private: section' % matched.group(1))
-
- else:
- # Found DISALLOW* macro outside a class declaration, or perhaps it
- # was used inside a function when it should have been part of the
- # class declaration. We could issue a warning here, but it
- # probably resulted in a compiler error already.
- pass
-
-
-def FindNextMatchingAngleBracket(clean_lines, linenum, init_suffix):
- """Find the corresponding > to close a template.
-
- Args:
- clean_lines: A CleansedLines instance containing the file.
- linenum: Current line number.
- init_suffix: Remainder of the current line after the initial <.
-
- Returns:
- True if a matching bracket exists.
- """
- line = init_suffix
- nesting_stack = ['<']
- while True:
- # Find the next operator that can tell us whether < is used as an
- # opening bracket or as a less-than operator. We only want to
- # warn on the latter case.
- #
- # We could also check all other operators and terminate the search
- # early, e.g. if we got something like this "a<b+c", the "<" is
- # most likely a less-than operator, but then we will get false
- # positives for default arguments (e.g. http://go/prccd) and
- # other template expressions (e.g. http://go/oxcjq).
- match = Search(r'^[^<>(),;\[\]]*([<>(),;\[\]])(.*)$', line)
- if match:
- # Found an operator, update nesting stack
- operator = match.group(1)
- line = match.group(2)
-
- if nesting_stack[-1] == '<':
- # Expecting closing angle bracket
- if operator in ('<', '(', '['):
- nesting_stack.append(operator)
- elif operator == '>':
- nesting_stack.pop()
- if not nesting_stack:
- # Found matching angle bracket
- return True
- elif operator == ',':
- # Got a comma after a bracket, this is most likely a template
- # argument. We have not seen a closing angle bracket yet, but
- # it's probably a few lines later if we look for it, so just
- # return early here.
- return True
- else:
- # Got some other operator.
- return False
-
- else:
- # Expecting closing parenthesis or closing bracket
- if operator in ('<', '(', '['):
- nesting_stack.append(operator)
- elif operator in (')', ']'):
- # We don't bother checking for matching () or []. If we got
- # something like (] or [), it would have been a syntax error.
- nesting_stack.pop()
-
- else:
- # Scan the next line
- linenum += 1
- if linenum >= len(clean_lines.elided):
- break
- line = clean_lines.elided[linenum]
-
- # Exhausted all remaining lines and still no matching angle bracket.
- # Most likely the input was incomplete, otherwise we should have
- # seen a semicolon and returned early.
- return True
-
-
-def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix):
- """Find the corresponding < that started a template.
-
- Args:
- clean_lines: A CleansedLines instance containing the file.
- linenum: Current line number.
- init_prefix: Part of the current line before the initial >.
-
- Returns:
- True if a matching bracket exists.
- """
- line = init_prefix
- nesting_stack = ['>']
- while True:
- # Find the previous operator
- match = Search(r'^(.*)([<>(),;\[\]])[^<>(),;\[\]]*$', line)
- if match:
- # Found an operator, update nesting stack
- operator = match.group(2)
- line = match.group(1)
-
- if nesting_stack[-1] == '>':
- # Expecting opening angle bracket
- if operator in ('>', ')', ']'):
- nesting_stack.append(operator)
- elif operator == '<':
- nesting_stack.pop()
- if not nesting_stack:
- # Found matching angle bracket
- return True
- elif operator == ',':
- # Got a comma before a bracket, this is most likely a
- # template argument. The opening angle bracket is probably
- # there if we look for it, so just return early here.
- return True
- else:
- # Got some other operator.
- return False
-
- else:
- # Expecting opening parenthesis or opening bracket
- if operator in ('>', ')', ']'):
- nesting_stack.append(operator)
- elif operator in ('(', '['):
- nesting_stack.pop()
-
- else:
- # Scan the previous line
- linenum -= 1
- if linenum < 0:
- break
- line = clean_lines.elided[linenum]
-
- # Exhausted all earlier lines and still no matching angle bracket.
- return False
-
-
-def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
- """Checks for the correctness of various spacing issues in the code.
-
- Things we check for: spaces around operators, spaces after
- if/for/while/switch, no spaces around parens in function calls, two
- spaces between code and comment, don't start a block with a blank
- line, don't end a function with a blank line, don't add a blank line
- after public/protected/private, don't have too many blank lines in a row.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- nesting_state: A _NestingState instance which maintains information about
- the current stack of nested blocks being parsed.
- error: The function to call with any errors found.
- """
-
- raw = clean_lines.raw_lines
- line = raw[linenum]
-
- # Before nixing comments, check if the line is blank for no good
- # reason. This includes the first line after a block is opened, and
- # blank lines at the end of a function (ie, right before a line like '}'
- #
- # Skip all the blank line checks if we are immediately inside a
- # namespace body. In other words, don't issue blank line warnings
- # for this block:
- # namespace {
- #
- # }
- #
- # A warning about missing end of namespace comments will be issued instead.
- if IsBlankLine(line) and not nesting_state.InNamespaceBody():
- elided = clean_lines.elided
- prev_line = elided[linenum - 1]
- prevbrace = prev_line.rfind('{')
- # TODO(unknown): Don't complain if line before blank line, and line after,
- # both start with alnums and are indented the same amount.
- # This ignores whitespace at the start of a namespace block
- # because those are not usually indented.
- if prevbrace != -1 and prev_line[prevbrace:].find('}') == -1:
- # OK, we have a blank line at the start of a code block. Before we
- # complain, we check if it is an exception to the rule: The previous
- # non-empty line has the parameters of a function header that are indented
- # 4 spaces (because they did not fit in a 80 column line when placed on
- # the same line as the function name). We also check for the case where
- # the previous line is indented 6 spaces, which may happen when the
- # initializers of a constructor do not fit into a 80 column line.
- exception = False
- if Match(r' {6}\w', prev_line): # Initializer list?
- # We are looking for the opening column of initializer list, which
- # should be indented 4 spaces to cause 6 space indentation afterwards.
- search_position = linenum-2
- while (search_position >= 0
- and Match(r' {6}\w', elided[search_position])):
- search_position -= 1
- exception = (search_position >= 0
- and elided[search_position][:5] == ' :')
- else:
- # Search for the function arguments or an initializer list. We use a
- # simple heuristic here: If the line is indented 4 spaces; and we have a
- # closing paren, without the opening paren, followed by an opening brace
- # or colon (for initializer lists) we assume that it is the last line of
- # a function header. If we have a colon indented 4 spaces, it is an
- # initializer list.
- exception = (Match(r' {4}\w[^\(]*\)\s*(const\s*)?(\{\s*$|:)',
- prev_line)
- or Match(r' {4}:', prev_line))
-
- if not exception:
- error(filename, linenum, 'whitespace/blank_line', 2,
- 'Blank line at the start of a code block. Is this needed?')
- # Ignore blank lines at the end of a block in a long if-else
- # chain, like this:
- # if (condition1) {
- # // Something followed by a blank line
- #
- # } else if (condition2) {
- # // Something else
- # }
- if linenum + 1 < clean_lines.NumLines():
- next_line = raw[linenum + 1]
- if (next_line
- and Match(r'\s*}', next_line)
- and next_line.find('} else ') == -1):
- error(filename, linenum, 'whitespace/blank_line', 3,
- 'Blank line at the end of a code block. Is this needed?')
-
- matched = Match(r'\s*(public|protected|private):', prev_line)
- if matched:
- error(filename, linenum, 'whitespace/blank_line', 3,
- 'Do not leave a blank line after "%s:"' % matched.group(1))
-
- # Next, we complain if there's a comment too near the text
- commentpos = line.find('//')
- if commentpos != -1:
- # Check if the // may be in quotes. If so, ignore it
- # Comparisons made explicit for clarity -- pylint: disable-msg=C6403
- if (line.count('"', 0, commentpos) -
- line.count('\\"', 0, commentpos)) % 2 == 0: # not in quotes
- # Allow one space for new scopes, two spaces otherwise:
- if (not Match(r'^\s*{ //', line) and
- ((commentpos >= 1 and
- line[commentpos-1] not in string.whitespace) or
- (commentpos >= 2 and
- line[commentpos-2] not in string.whitespace))):
- error(filename, linenum, 'whitespace/comments', 2,
- 'At least two spaces is best between code and comments')
- # There should always be a space between the // and the comment
- commentend = commentpos + 2
- if commentend < len(line) and not line[commentend] == ' ':
- # but some lines are exceptions -- e.g. if they're big
- # comment delimiters like:
- # //----------------------------------------------------------
- # or are an empty C++ style Doxygen comment, like:
- # ///
- # or they begin with multiple slashes followed by a space:
- # //////// Header comment
- match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or
- Search(r'^/$', line[commentend:]) or
- Search(r'^/+ ', line[commentend:]))
- if not match:
- error(filename, linenum, 'whitespace/comments', 4,
- 'Should have a space between // and comment')
- CheckComment(line[commentpos:], filename, linenum, error)
-
- line = clean_lines.elided[linenum] # get rid of comments and strings
-
- # Don't try to do spacing checks for operator methods
- line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line)
-
- # We allow no-spaces around = within an if: "if ( (a=Foo()) == 0 )".
- # Otherwise not. Note we only check for non-spaces on *both* sides;
- # sometimes people put non-spaces on one side when aligning ='s among
- # many lines (not that this is behavior that I approve of...)
- if Search(r'[\w.]=[\w.]', line) and not Search(r'\b(if|while) ', line):
- error(filename, linenum, 'whitespace/operators', 4,
- 'Missing spaces around =')
-
- # It's ok not to have spaces around binary operators like + - * /, but if
- # there's too little whitespace, we get concerned. It's hard to tell,
- # though, so we punt on this one for now. TODO.
-
- # You should always have whitespace around binary operators.
- #
- # Check <= and >= first to avoid false positives with < and >, then
- # check non-include lines for spacing around < and >.
- match = Search(r'[^<>=!\s](==|!=|<=|>=)[^<>=!\s]', line)
- if match:
- error(filename, linenum, 'whitespace/operators', 3,
- 'Missing spaces around %s' % match.group(1))
- # We allow no-spaces around << when used like this: 10<<20, but
- # not otherwise (particularly, not when used as streams)
- match = Search(r'(\S)(?:L|UL|ULL|l|ul|ull)?<<(\S)', line)
- if match and not (match.group(1).isdigit() and match.group(2).isdigit()):
- error(filename, linenum, 'whitespace/operators', 3,
- 'Missing spaces around <<')
- elif not Match(r'#.*include', line):
- # Avoid false positives on ->
- reduced_line = line.replace('->', '')
-
- # Look for < that is not surrounded by spaces. This is only
- # triggered if both sides are missing spaces, even though
- # technically should should flag if at least one side is missing a
- # space. This is done to avoid some false positives with shifts.
- match = Search(r'[^\s<]<([^\s=<].*)', reduced_line)
- if (match and
- not FindNextMatchingAngleBracket(clean_lines, linenum, match.group(1))):
- error(filename, linenum, 'whitespace/operators', 3,
- 'Missing spaces around <')
-
- # Look for > that is not surrounded by spaces. Similar to the
- # above, we only trigger if both sides are missing spaces to avoid
- # false positives with shifts.
- match = Search(r'^(.*[^\s>])>[^\s=>]', reduced_line)
- if (match and
- not FindPreviousMatchingAngleBracket(clean_lines, linenum,
- match.group(1))):
- error(filename, linenum, 'whitespace/operators', 3,
- 'Missing spaces around >')
-
- # We allow no-spaces around >> for almost anything. This is because
- # C++11 allows ">>" to close nested templates, which accounts for
- # most cases when ">>" is not followed by a space.
- #
- # We still warn on ">>" followed by alpha character, because that is
- # likely due to ">>" being used for right shifts, e.g.:
- # value >> alpha
- #
- # When ">>" is used to close templates, the alphanumeric letter that
- # follows would be part of an identifier, and there should still be
- # a space separating the template type and the identifier.
- # type<type<type>> alpha
- match = Search(r'>>[a-zA-Z_]', line)
- if match:
- error(filename, linenum, 'whitespace/operators', 3,
- 'Missing spaces around >>')
-
- # There shouldn't be space around unary operators
- match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
- if match:
- error(filename, linenum, 'whitespace/operators', 4,
- 'Extra space for operator %s' % match.group(1))
-
- # A pet peeve of mine: no spaces after an if, while, switch, or for
- match = Search(r' (if\(|for\(|while\(|switch\()', line)
- if match:
- error(filename, linenum, 'whitespace/parens', 5,
- 'Missing space before ( in %s' % match.group(1))
-
- # For if/for/while/switch, the left and right parens should be
- # consistent about how many spaces are inside the parens, and
- # there should either be zero or one spaces inside the parens.
- # We don't want: "if ( foo)" or "if ( foo )".
- # Exception: "for ( ; foo; bar)" and "for (foo; bar; )" are allowed.
- match = Search(r'\b(if|for|while|switch)\s*'
- r'\(([ ]*)(.).*[^ ]+([ ]*)\)\s*{\s*$',
- line)
- if match:
- if len(match.group(2)) != len(match.group(4)):
- if not (match.group(3) == ';' and
- len(match.group(2)) == 1 + len(match.group(4)) or
- not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)):
- error(filename, linenum, 'whitespace/parens', 5,
- 'Mismatching spaces inside () in %s' % match.group(1))
- if not len(match.group(2)) in [0, 1]:
- error(filename, linenum, 'whitespace/parens', 5,
- 'Should have zero or one spaces inside ( and ) in %s' %
- match.group(1))
-
- # You should always have a space after a comma (either as fn arg or operator)
- if Search(r',[^\s]', line):
- error(filename, linenum, 'whitespace/comma', 3,
- 'Missing space after ,')
-
- # You should always have a space after a semicolon
- # except for few corner cases
- # TODO(unknown): clarify if 'if (1) { return 1;}' is requires one more
- # space after ;
- if Search(r';[^\s};\\)/]', line):
- error(filename, linenum, 'whitespace/semicolon', 3,
- 'Missing space after ;')
-
- # Next we will look for issues with function calls.
- CheckSpacingForFunctionCall(filename, line, linenum, error)
-
- # Except after an opening paren, or after another opening brace (in case of
- # an initializer list, for instance), you should have spaces before your
- # braces. And since you should never have braces at the beginning of a line,
- # this is an easy test.
- if Search(r'[^ ({]{', line):
- error(filename, linenum, 'whitespace/braces', 5,
- 'Missing space before {')
-
- # Make sure '} else {' has spaces.
- if Search(r'}else', line):
- error(filename, linenum, 'whitespace/braces', 5,
- 'Missing space before else')
-
- # You shouldn't have spaces before your brackets, except maybe after
- # 'delete []' or 'new char * []'.
- if Search(r'\w\s+\[', line) and not Search(r'delete\s+\[', line):
- error(filename, linenum, 'whitespace/braces', 5,
- 'Extra space before [')
-
- # You shouldn't have a space before a semicolon at the end of the line.
- # There's a special case for "for" since the style guide allows space before
- # the semicolon there.
- if Search(r':\s*;\s*$', line):
- error(filename, linenum, 'whitespace/semicolon', 5,
- 'Semicolon defining empty statement. Use {} instead.')
- elif Search(r'^\s*;\s*$', line):
- error(filename, linenum, 'whitespace/semicolon', 5,
- 'Line contains only semicolon. If this should be an empty statement, '
- 'use {} instead.')
- elif (Search(r'\s+;\s*$', line) and
- not Search(r'\bfor\b', line)):
- error(filename, linenum, 'whitespace/semicolon', 5,
- 'Extra space before last semicolon. If this should be an empty '
- 'statement, use {} instead.')
-
- # In range-based for, we wanted spaces before and after the colon, but
- # not around "::" tokens that might appear.
- if (Search('for *\(.*[^:]:[^: ]', line) or
- Search('for *\(.*[^: ]:[^:]', line)):
- error(filename, linenum, 'whitespace/forcolon', 2,
- 'Missing space around colon in range-based for loop')
-
-
-def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error):
- """Checks for additional blank line issues related to sections.
-
- Currently the only thing checked here is blank line before protected/private.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- class_info: A _ClassInfo objects.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- # Skip checks if the class is small, where small means 25 lines or less.
- # 25 lines seems like a good cutoff since that's the usual height of
- # terminals, and any class that can't fit in one screen can't really
- # be considered "small".
- #
- # Also skip checks if we are on the first line. This accounts for
- # classes that look like
- # class Foo { public: ... };
- #
- # If we didn't find the end of the class, last_line would be zero,
- # and the check will be skipped by the first condition.
- if (class_info.last_line - class_info.starting_linenum <= 24 or
- linenum <= class_info.starting_linenum):
- return
-
- matched = Match(r'\s*(public|protected|private):', clean_lines.lines[linenum])
- if matched:
- # Issue warning if the line before public/protected/private was
- # not a blank line, but don't do this if the previous line contains
- # "class" or "struct". This can happen two ways:
- # - We are at the beginning of the class.
- # - We are forward-declaring an inner class that is semantically
- # private, but needed to be public for implementation reasons.
- # Also ignores cases where the previous line ends with a backslash as can be
- # common when defining classes in C macros.
- prev_line = clean_lines.lines[linenum - 1]
- if (not IsBlankLine(prev_line) and
- not Search(r'\b(class|struct)\b', prev_line) and
- not Search(r'\\$', prev_line)):
- # Try a bit harder to find the beginning of the class. This is to
- # account for multi-line base-specifier lists, e.g.:
- # class Derived
- # : public Base {
- end_class_head = class_info.starting_linenum
- for i in range(class_info.starting_linenum, linenum):
- if Search(r'\{\s*$', clean_lines.lines[i]):
- end_class_head = i
- break
- if end_class_head < linenum - 1:
- error(filename, linenum, 'whitespace/blank_line', 3,
- '"%s:" should be preceded by a blank line' % matched.group(1))
-
-
-def GetPreviousNonBlankLine(clean_lines, linenum):
- """Return the most recent non-blank line and its line number.
-
- Args:
- clean_lines: A CleansedLines instance containing the file contents.
- linenum: The number of the line to check.
-
- Returns:
- A tuple with two elements. The first element is the contents of the last
- non-blank line before the current line, or the empty string if this is the
- first non-blank line. The second is the line number of that line, or -1
- if this is the first non-blank line.
- """
-
- prevlinenum = linenum - 1
- while prevlinenum >= 0:
- prevline = clean_lines.elided[prevlinenum]
- if not IsBlankLine(prevline): # if not a blank line...
- return (prevline, prevlinenum)
- prevlinenum -= 1
- return ('', -1)
-
-
-def CheckBraces(filename, clean_lines, linenum, error):
- """Looks for misplaced braces (e.g. at the end of line).
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
-
- line = clean_lines.elided[linenum] # get rid of comments and strings
-
- if Match(r'\s*{\s*$', line):
- # We allow an open brace to start a line in the case where someone
- # is using braces in a block to explicitly create a new scope,
- # which is commonly used to control the lifetime of
- # stack-allocated variables. We don't detect this perfectly: we
- # just don't complain if the last non-whitespace character on the
- # previous non-blank line is ';', ':', '{', or '}', or if the previous
- # line starts a preprocessor block.
- prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
- if (not Search(r'[;:}{]\s*$', prevline) and
- not Match(r'\s*#', prevline)):
- error(filename, linenum, 'whitespace/braces', 4,
- '{ should almost always be at the end of the previous line')
-
- # An else clause should be on the same line as the preceding closing brace.
- if Match(r'\s*else\s*', line):
- prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
- if Match(r'\s*}\s*$', prevline):
- error(filename, linenum, 'whitespace/newline', 4,
- 'An else should appear on the same line as the preceding }')
-
- # If braces come on one side of an else, they should be on both.
- # However, we have to worry about "else if" that spans multiple lines!
- if Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line):
- if Search(r'}\s*else if([^{]*)$', line): # could be multi-line if
- # find the ( after the if
- pos = line.find('else if')
- pos = line.find('(', pos)
- if pos > 0:
- (endline, _, endpos) = CloseExpression(clean_lines, linenum, pos)
- if endline[endpos:].find('{') == -1: # must be brace after if
- error(filename, linenum, 'readability/braces', 5,
- 'If an else has a brace on one side, it should have it on both')
- else: # common case: else not followed by a multi-line if
- error(filename, linenum, 'readability/braces', 5,
- 'If an else has a brace on one side, it should have it on both')
-
- # Likewise, an else should never have the else clause on the same line
- if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line):
- error(filename, linenum, 'whitespace/newline', 4,
- 'Else clause should never be on same line as else (use 2 lines)')
-
- # In the same way, a do/while should never be on one line
- if Match(r'\s*do [^\s{]', line):
- error(filename, linenum, 'whitespace/newline', 4,
- 'do/while clauses should not be on a single line')
-
- # Braces shouldn't be followed by a ; unless they're defining a struct
- # or initializing an array.
- # We can't tell in general, but we can for some common cases.
- prevlinenum = linenum
- while True:
- (prevline, prevlinenum) = GetPreviousNonBlankLine(clean_lines, prevlinenum)
- if Match(r'\s+{.*}\s*;', line) and not prevline.count(';'):
- line = prevline + line
- else:
- break
- if (Search(r'{.*}\s*;', line) and
- line.count('{') == line.count('}') and
- not Search(r'struct|class|enum|\s*=\s*{', line)):
- error(filename, linenum, 'readability/braces', 4,
- "You don't need a ; after a }")
-
-
-def CheckEmptyLoopBody(filename, clean_lines, linenum, error):
- """Loop for empty loop body with only a single semicolon.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
-
- # Search for loop keywords at the beginning of the line. Because only
- # whitespaces are allowed before the keywords, this will also ignore most
- # do-while-loops, since those lines should start with closing brace.
- line = clean_lines.elided[linenum]
- if Match(r'\s*(for|while)\s*\(', line):
- # Find the end of the conditional expression
- (end_line, end_linenum, end_pos) = CloseExpression(
- clean_lines, linenum, line.find('('))
-
- # Output warning if what follows the condition expression is a semicolon.
- # No warning for all other cases, including whitespace or newline, since we
- # have a separate check for semicolons preceded by whitespace.
- if end_pos >= 0 and Match(r';', end_line[end_pos:]):
- error(filename, end_linenum, 'whitespace/empty_loop_body', 5,
- 'Empty loop bodies should use {} or continue')
-
-
-def ReplaceableCheck(operator, macro, line):
- """Determine whether a basic CHECK can be replaced with a more specific one.
-
- For example suggest using CHECK_EQ instead of CHECK(a == b) and
- similarly for CHECK_GE, CHECK_GT, CHECK_LE, CHECK_LT, CHECK_NE.
-
- Args:
- operator: The C++ operator used in the CHECK.
- macro: The CHECK or EXPECT macro being called.
- line: The current source line.
-
- Returns:
- True if the CHECK can be replaced with a more specific one.
- """
-
- # This matches decimal and hex integers, strings, and chars (in that order).
- match_constant = r'([-+]?(\d+|0[xX][0-9a-fA-F]+)[lLuU]{0,3}|".*"|\'.*\')'
-
- # Expression to match two sides of the operator with something that
- # looks like a literal, since CHECK(x == iterator) won't compile.
- # This means we can't catch all the cases where a more specific
- # CHECK is possible, but it's less annoying than dealing with
- # extraneous warnings.
- match_this = (r'\s*' + macro + r'\((\s*' +
- match_constant + r'\s*' + operator + r'[^<>].*|'
- r'.*[^<>]' + operator + r'\s*' + match_constant +
- r'\s*\))')
-
- # Don't complain about CHECK(x == NULL) or similar because
- # CHECK_EQ(x, NULL) won't compile (requires a cast).
- # Also, don't complain about more complex boolean expressions
- # involving && or || such as CHECK(a == b || c == d).
- return Match(match_this, line) and not Search(r'NULL|&&|\|\|', line)
-
-
-def CheckCheck(filename, clean_lines, linenum, error):
- """Checks the use of CHECK and EXPECT macros.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
-
- # Decide the set of replacement macros that should be suggested
- raw_lines = clean_lines.raw_lines
- current_macro = ''
- for macro in _CHECK_MACROS:
- if raw_lines[linenum].find(macro) >= 0:
- current_macro = macro
- break
- if not current_macro:
- # Don't waste time here if line doesn't contain 'CHECK' or 'EXPECT'
- return
-
- line = clean_lines.elided[linenum] # get rid of comments and strings
-
- # Encourage replacing plain CHECKs with CHECK_EQ/CHECK_NE/etc.
- for operator in ['==', '!=', '>=', '>', '<=', '<']:
- if ReplaceableCheck(operator, current_macro, line):
- error(filename, linenum, 'readability/check', 2,
- 'Consider using %s instead of %s(a %s b)' % (
- _CHECK_REPLACEMENT[current_macro][operator],
- current_macro, operator))
- break
-
-
-def CheckAltTokens(filename, clean_lines, linenum, error):
- """Check alternative keywords being used in boolean expressions.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- line = clean_lines.elided[linenum]
-
- # Avoid preprocessor lines
- if Match(r'^\s*#', line):
- return
-
- # Last ditch effort to avoid multi-line comments. This will not help
- # if the comment started before the current line or ended after the
- # current line, but it catches most of the false positives. At least,
- # it provides a way to workaround this warning for people who use
- # multi-line comments in preprocessor macros.
- #
- # TODO(unknown): remove this once cpplint has better support for
- # multi-line comments.
- if line.find('/*') >= 0 or line.find('*/') >= 0:
- return
-
- for match in _ALT_TOKEN_REPLACEMENT_PATTERN.finditer(line):
- error(filename, linenum, 'readability/alt_tokens', 2,
- 'Use operator %s instead of %s' % (
- _ALT_TOKEN_REPLACEMENT[match.group(1)], match.group(1)))
-
-
-def GetLineWidth(line):
- """Determines the width of the line in column positions.
-
- Args:
- line: A string, which may be a Unicode string.
-
- Returns:
- The width of the line in column positions, accounting for Unicode
- combining characters and wide characters.
- """
- if isinstance(line, unicode):
- width = 0
- for uc in unicodedata.normalize('NFC', line):
- if unicodedata.east_asian_width(uc) in ('W', 'F'):
- width += 2
- elif not unicodedata.combining(uc):
- width += 1
- return width
- else:
- return len(line)
-
-
-def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state,
- error):
- """Checks rules from the 'C++ style rules' section of cppguide.html.
-
- Most of these rules are hard to test (naming, comment style), but we
- do what we can. In particular we check for 2-space indents, line lengths,
- tab usage, spaces inside code, etc.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- file_extension: The extension (without the dot) of the filename.
- nesting_state: A _NestingState instance which maintains information about
- the current stack of nested blocks being parsed.
- error: The function to call with any errors found.
- """
-
- raw_lines = clean_lines.raw_lines
- line = raw_lines[linenum]
-
- if line.find('\t') != -1:
- error(filename, linenum, 'whitespace/tab', 1,
- 'Tab found; better to use spaces')
-
- # One or three blank spaces at the beginning of the line is weird; it's
- # hard to reconcile that with 2-space indents.
- # NOTE: here are the conditions rob pike used for his tests. Mine aren't
- # as sophisticated, but it may be worth becoming so: RLENGTH==initial_spaces
- # if(RLENGTH > 20) complain = 0;
- # if(match($0, " +(error|private|public|protected):")) complain = 0;
- # if(match(prev, "&& *$")) complain = 0;
- # if(match(prev, "\\|\\| *$")) complain = 0;
- # if(match(prev, "[\",=><] *$")) complain = 0;
- # if(match($0, " <<")) complain = 0;
- # if(match(prev, " +for \\(")) complain = 0;
- # if(prevodd && match(prevprev, " +for \\(")) complain = 0;
- initial_spaces = 0
- cleansed_line = clean_lines.elided[linenum]
- while initial_spaces < len(line) and line[initial_spaces] == ' ':
- initial_spaces += 1
- if line and line[-1].isspace():
- error(filename, linenum, 'whitespace/end_of_line', 4,
- 'Line ends in whitespace. Consider deleting these extra spaces.')
- # There are certain situations we allow one space, notably for labels
- elif ((initial_spaces == 1 or initial_spaces == 3) and
- not Match(r'\s*\w+\s*:\s*$', cleansed_line)):
- error(filename, linenum, 'whitespace/indent', 3,
- 'Weird number of spaces at line-start. '
- 'Are you using a 2-space indent?')
- # Labels should always be indented at least one space.
- elif not initial_spaces and line[:2] != '//' and Search(r'[^:]:\s*$',
- line):
- error(filename, linenum, 'whitespace/labels', 4,
- 'Labels should always be indented at least one space. '
- 'If this is a member-initializer list in a constructor or '
- 'the base class list in a class definition, the colon should '
- 'be on the following line.')
-
-
- # Check if the line is a header guard.
- is_header_guard = False
- if file_extension == 'h':
- cppvar = GetHeaderGuardCPPVariable(filename)
- if (line.startswith('#ifndef %s' % cppvar) or
- line.startswith('#define %s' % cppvar) or
- line.startswith('#endif // %s' % cppvar)):
- is_header_guard = True
- # #include lines and header guards can be long, since there's no clean way to
- # split them.
- #
- # URLs can be long too. It's possible to split these, but it makes them
- # harder to cut&paste.
- #
- # The "$Id:...$" comment may also get very long without it being the
- # developers fault.
- if (not line.startswith('#include') and not is_header_guard and
- not Match(r'^\s*//.*http(s?)://\S*$', line) and
- not Match(r'^// \$Id:.*#[0-9]+ \$$', line)):
- line_width = GetLineWidth(line)
- if line_width > 100:
- error(filename, linenum, 'whitespace/line_length', 4,
- 'Lines should very rarely be longer than 100 characters')
- elif line_width > 80:
- error(filename, linenum, 'whitespace/line_length', 2,
- 'Lines should be <= 80 characters long')
-
- if (cleansed_line.count(';') > 1 and
- # for loops are allowed two ;'s (and may run over two lines).
- cleansed_line.find('for') == -1 and
- (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or
- GetPreviousNonBlankLine(clean_lines, linenum)[0].find(';') != -1) and
- # It's ok to have many commands in a switch case that fits in 1 line
- not ((cleansed_line.find('case ') != -1 or
- cleansed_line.find('default:') != -1) and
- cleansed_line.find('break;') != -1)):
- error(filename, linenum, 'whitespace/newline', 0,
- 'More than one command on the same line')
-
- # Some more style checks
- CheckBraces(filename, clean_lines, linenum, error)
- CheckEmptyLoopBody(filename, clean_lines, linenum, error)
- CheckAccess(filename, clean_lines, linenum, nesting_state, error)
- CheckSpacing(filename, clean_lines, linenum, nesting_state, error)
- CheckCheck(filename, clean_lines, linenum, error)
- CheckAltTokens(filename, clean_lines, linenum, error)
- classinfo = nesting_state.InnermostClass()
- if classinfo:
- CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error)
-
-
-_RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"')
-_RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$')
-# Matches the first component of a filename delimited by -s and _s. That is:
-# _RE_FIRST_COMPONENT.match('foo').group(0) == 'foo'
-# _RE_FIRST_COMPONENT.match('foo.cc').group(0) == 'foo'
-# _RE_FIRST_COMPONENT.match('foo-bar_baz.cc').group(0) == 'foo'
-# _RE_FIRST_COMPONENT.match('foo_bar-baz.cc').group(0) == 'foo'
-_RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+')
-
-
-def _DropCommonSuffixes(filename):
- """Drops common suffixes like _test.cc or -inl.h from filename.
-
- For example:
- >>> _DropCommonSuffixes('foo/foo-inl.h')
- 'foo/foo'
- >>> _DropCommonSuffixes('foo/bar/foo.cc')
- 'foo/bar/foo'
- >>> _DropCommonSuffixes('foo/foo_internal.h')
- 'foo/foo'
- >>> _DropCommonSuffixes('foo/foo_unusualinternal.h')
- 'foo/foo_unusualinternal'
-
- Args:
- filename: The input filename.
-
- Returns:
- The filename with the common suffix removed.
- """
- for suffix in ('test.cc', 'regtest.cc', 'unittest.cc',
- 'inl.h', 'impl.h', 'internal.h'):
- if (filename.endswith(suffix) and len(filename) > len(suffix) and
- filename[-len(suffix) - 1] in ('-', '_')):
- return filename[:-len(suffix) - 1]
- return os.path.splitext(filename)[0]
-
-
-def _IsTestFilename(filename):
- """Determines if the given filename has a suffix that identifies it as a test.
-
- Args:
- filename: The input filename.
-
- Returns:
- True if 'filename' looks like a test, False otherwise.
- """
- if (filename.endswith('_test.cc') or
- filename.endswith('_unittest.cc') or
- filename.endswith('_regtest.cc')):
- return True
- else:
- return False
-
-
-def _ClassifyInclude(fileinfo, include, is_system):
- """Figures out what kind of header 'include' is.
-
- Args:
- fileinfo: The current file cpplint is running over. A FileInfo instance.
- include: The path to a #included file.
- is_system: True if the #include used <> rather than "".
-
- Returns:
- One of the _XXX_HEADER constants.
-
- For example:
- >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'stdio.h', True)
- _C_SYS_HEADER
- >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'string', True)
- _CPP_SYS_HEADER
- >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', False)
- _LIKELY_MY_HEADER
- >>> _ClassifyInclude(FileInfo('foo/foo_unknown_extension.cc'),
- ... 'bar/foo_other_ext.h', False)
- _POSSIBLE_MY_HEADER
- >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/bar.h', False)
- _OTHER_HEADER
- """
- # This is a list of all standard c++ header files, except
- # those already checked for above.
- is_stl_h = include in _STL_HEADERS
- is_cpp_h = is_stl_h or include in _CPP_HEADERS
-
- if is_system:
- if is_cpp_h:
- return _CPP_SYS_HEADER
- else:
- return _C_SYS_HEADER
-
- # If the target file and the include we're checking share a
- # basename when we drop common extensions, and the include
- # lives in . , then it's likely to be owned by the target file.
- target_dir, target_base = (
- os.path.split(_DropCommonSuffixes(fileinfo.RepositoryName())))
- include_dir, include_base = os.path.split(_DropCommonSuffixes(include))
- if target_base == include_base and (
- include_dir == target_dir or
- include_dir == os.path.normpath(target_dir + '/../public')):
- return _LIKELY_MY_HEADER
-
- # If the target and include share some initial basename
- # component, it's possible the target is implementing the
- # include, so it's allowed to be first, but we'll never
- # complain if it's not there.
- target_first_component = _RE_FIRST_COMPONENT.match(target_base)
- include_first_component = _RE_FIRST_COMPONENT.match(include_base)
- if (target_first_component and include_first_component and
- target_first_component.group(0) ==
- include_first_component.group(0)):
- return _POSSIBLE_MY_HEADER
-
- return _OTHER_HEADER
-
-
-
-def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
- """Check rules that are applicable to #include lines.
-
- Strings on #include lines are NOT removed from elided line, to make
- certain tasks easier. However, to prevent false positives, checks
- applicable to #include lines in CheckLanguage must be put here.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- include_state: An _IncludeState instance in which the headers are inserted.
- error: The function to call with any errors found.
- """
- fileinfo = FileInfo(filename)
-
- line = clean_lines.lines[linenum]
-
- # "include" should use the new style "foo/bar.h" instead of just "bar.h"
- if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line):
- error(filename, linenum, 'build/include', 4,
- 'Include the directory when naming .h files')
-
- # we shouldn't include a file more than once. actually, there are a
- # handful of instances where doing so is okay, but in general it's
- # not.
- match = _RE_PATTERN_INCLUDE.search(line)
- if match:
- include = match.group(2)
- is_system = (match.group(1) == '<')
- if include in include_state:
- error(filename, linenum, 'build/include', 4,
- '"%s" already included at %s:%s' %
- (include, filename, include_state[include]))
- else:
- include_state[include] = linenum
-
- # We want to ensure that headers appear in the right order:
- # 1) for foo.cc, foo.h (preferred location)
- # 2) c system files
- # 3) cpp system files
- # 4) for foo.cc, foo.h (deprecated location)
- # 5) other google headers
- #
- # We classify each include statement as one of those 5 types
- # using a number of techniques. The include_state object keeps
- # track of the highest type seen, and complains if we see a
- # lower type after that.
- error_message = include_state.CheckNextIncludeOrder(
- _ClassifyInclude(fileinfo, include, is_system))
- if error_message:
- error(filename, linenum, 'build/include_order', 4,
- '%s. Should be: %s.h, c system, c++ system, other.' %
- (error_message, fileinfo.BaseName()))
- if not include_state.IsInAlphabeticalOrder(include):
- error(filename, linenum, 'build/include_alpha', 4,
- 'Include "%s" not in alphabetical order' % include)
-
- # Look for any of the stream classes that are part of standard C++.
- match = _RE_PATTERN_INCLUDE.match(line)
- if match:
- include = match.group(2)
- if Match(r'(f|ind|io|i|o|parse|pf|stdio|str|)?stream$', include):
- # Many unit tests use cout, so we exempt them.
- if not _IsTestFilename(filename):
- error(filename, linenum, 'readability/streams', 3,
- 'Streams are highly discouraged.')
-
-
-def _GetTextInside(text, start_pattern):
- """Retrieves all the text between matching open and close parentheses.
-
- Given a string of lines and a regular expression string, retrieve all the text
- following the expression and between opening punctuation symbols like
- (, [, or {, and the matching close-punctuation symbol. This properly nested
- occurrences of the punctuations, so for the text like
- printf(a(), b(c()));
- a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'.
- start_pattern must match string having an open punctuation symbol at the end.
-
- Args:
- text: The lines to extract text. Its comments and strings must be elided.
- It can be single line and can span multiple lines.
- start_pattern: The regexp string indicating where to start extracting
- the text.
- Returns:
- The extracted text.
- None if either the opening string or ending punctuation could not be found.
- """
- # TODO(sugawarayu): Audit cpplint.py to see what places could be profitably
- # rewritten to use _GetTextInside (and use inferior regexp matching today).
-
- # Give opening punctuations to get the matching close-punctuations.
- matching_punctuation = {'(': ')', '{': '}', '[': ']'}
- closing_punctuation = set(matching_punctuation.itervalues())
-
- # Find the position to start extracting text.
- match = re.search(start_pattern, text, re.M)
- if not match: # start_pattern not found in text.
- return None
- start_position = match.end(0)
-
- assert start_position > 0, (
- 'start_pattern must ends with an opening punctuation.')
- assert text[start_position - 1] in matching_punctuation, (
- 'start_pattern must ends with an opening punctuation.')
- # Stack of closing punctuations we expect to have in text after position.
- punctuation_stack = [matching_punctuation[text[start_position - 1]]]
- position = start_position
- while punctuation_stack and position < len(text):
- if text[position] == punctuation_stack[-1]:
- punctuation_stack.pop()
- elif text[position] in closing_punctuation:
- # A closing punctuation without matching opening punctuations.
- return None
- elif text[position] in matching_punctuation:
- punctuation_stack.append(matching_punctuation[text[position]])
- position += 1
- if punctuation_stack:
- # Opening punctuations left without matching close-punctuations.
- return None
- # punctuations match.
- return text[start_position:position - 1]
-
-
-def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state,
- error):
- """Checks rules from the 'C++ language rules' section of cppguide.html.
-
- Some of these rules are hard to test (function overloading, using
- uint32 inappropriately), but we do the best we can.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- file_extension: The extension (without the dot) of the filename.
- include_state: An _IncludeState instance in which the headers are inserted.
- error: The function to call with any errors found.
- """
- # If the line is empty or consists of entirely a comment, no need to
- # check it.
- line = clean_lines.elided[linenum]
- if not line:
- return
-
- match = _RE_PATTERN_INCLUDE.search(line)
- if match:
- CheckIncludeLine(filename, clean_lines, linenum, include_state, error)
- return
-
- # Create an extended_line, which is the concatenation of the current and
- # next lines, for more effective checking of code that may span more than one
- # line.
- if linenum + 1 < clean_lines.NumLines():
- extended_line = line + clean_lines.elided[linenum + 1]
- else:
- extended_line = line
-
- # Make Windows paths like Unix.
- fullname = os.path.abspath(filename).replace('\\', '/')
-
- # TODO(unknown): figure out if they're using default arguments in fn proto.
-
- # Check for non-const references in functions. This is tricky because &
- # is also used to take the address of something. We allow <> for templates,
- # (ignoring whatever is between the braces) and : for classes.
- # These are complicated re's. They try to capture the following:
- # paren (for fn-prototype start), typename, &, varname. For the const
- # version, we're willing for const to be before typename or after
- # Don't check the implementation on same line.
- fnline = line.split('{', 1)[0]
- if (len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) >
- len(re.findall(r'\([^()]*\bconst\s+(?:typename\s+)?(?:struct\s+)?'
- r'(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) +
- len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+\s+const(\s?&|&\s?)[\w]+',
- fnline))):
-
- # We allow non-const references in a few standard places, like functions
- # called "swap()" or iostream operators like "<<" or ">>". We also filter
- # out for loops, which lint otherwise mistakenly thinks are functions.
- if not Search(
- r'(for|swap|Swap|operator[<>][<>])\s*\(\s*'
- r'(?:(?:typename\s*)?[\w:]|<.*>)+\s*&',
- fnline):
- error(filename, linenum, 'runtime/references', 2,
- 'Is this a non-const reference? '
- 'If so, make const or use a pointer.')
-
- # Check to see if they're using an conversion function cast.
- # I just try to capture the most common basic types, though there are more.
- # Parameterless conversion functions, such as bool(), are allowed as they are
- # probably a member operator declaration or default constructor.
- match = Search(
- r'(\bnew\s+)?\b' # Grab 'new' operator, if it's there
- r'(int|float|double|bool|char|int32|uint32|int64|uint64)\([^)]', line)
- if match:
- # gMock methods are defined using some variant of MOCK_METHODx(name, type)
- # where type may be float(), int(string), etc. Without context they are
- # virtually indistinguishable from int(x) casts. Likewise, gMock's
- # MockCallback takes a template parameter of the form return_type(arg_type),
- # which looks much like the cast we're trying to detect.
- if (match.group(1) is None and # If new operator, then this isn't a cast
- not (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or
- Match(r'^\s*MockCallback<.*>', line))):
- # Try a bit harder to catch gmock lines: the only place where
- # something looks like an old-style cast is where we declare the
- # return type of the mocked method, and the only time when we
- # are missing context is if MOCK_METHOD was split across
- # multiple lines (for example http://go/hrfhr ), so we only need
- # to check the previous line for MOCK_METHOD.
- if (linenum == 0 or
- not Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(\S+,\s*$',
- clean_lines.elided[linenum - 1])):
- error(filename, linenum, 'readability/casting', 4,
- 'Using deprecated casting style. '
- 'Use static_cast<%s>(...) instead' %
- match.group(2))
-
- CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
- 'static_cast',
- r'\((int|float|double|bool|char|u?int(16|32|64))\)', error)
-
- # This doesn't catch all cases. Consider (const char * const)"hello".
- #
- # (char *) "foo" should always be a const_cast (reinterpret_cast won't
- # compile).
- if CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
- 'const_cast', r'\((char\s?\*+\s?)\)\s*"', error):
- pass
- else:
- # Check pointer casts for other than string constants
- CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum],
- 'reinterpret_cast', r'\((\w+\s?\*+\s?)\)', error)
-
- # In addition, we look for people taking the address of a cast. This
- # is dangerous -- casts can assign to temporaries, so the pointer doesn't
- # point where you think.
- if Search(
- r'(&\([^)]+\)[\w(])|(&(static|dynamic|reinterpret)_cast\b)', line):
- error(filename, linenum, 'runtime/casting', 4,
- ('Are you taking an address of a cast? '
- 'This is dangerous: could be a temp var. '
- 'Take the address before doing the cast, rather than after'))
-
- # Check for people declaring static/global STL strings at the top level.
- # This is dangerous because the C++ language does not guarantee that
- # globals with constructors are initialized before the first access.
- match = Match(
- r'((?:|static +)(?:|const +))string +([a-zA-Z0-9_:]+)\b(.*)',
- line)
- # Make sure it's not a function.
- # Function template specialization looks like: "string foo<Type>(...".
- # Class template definitions look like: "string Foo<Type>::Method(...".
- if match and not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)?\s*\(([^"]|$)',
- match.group(3)):
- error(filename, linenum, 'runtime/string', 4,
- 'For a static/global string constant, use a C style string instead: '
- '"%schar %s[]".' %
- (match.group(1), match.group(2)))
-
- # Check that we're not using RTTI outside of testing code.
- if Search(r'\bdynamic_cast<', line) and not _IsTestFilename(filename):
- error(filename, linenum, 'runtime/rtti', 5,
- 'Do not use dynamic_cast<>. If you need to cast within a class '
- "hierarchy, use static_cast<> to upcast. Google doesn't support "
- 'RTTI.')
-
- if Search(r'\b([A-Za-z0-9_]*_)\(\1\)', line):
- error(filename, linenum, 'runtime/init', 4,
- 'You seem to be initializing a member variable with itself.')
-
- if file_extension == 'h':
- # TODO(unknown): check that 1-arg constructors are explicit.
- # How to tell it's a constructor?
- # (handled in CheckForNonStandardConstructs for now)
- # TODO(unknown): check that classes have DISALLOW_EVIL_CONSTRUCTORS
- # (level 1 error)
- pass
-
- # Check if people are using the verboten C basic types. The only exception
- # we regularly allow is "unsigned short port" for port.
- if Search(r'\bshort port\b', line):
- if not Search(r'\bunsigned short port\b', line):
- error(filename, linenum, 'runtime/int', 4,
- 'Use "unsigned short" for ports, not "short"')
- else:
- match = Search(r'\b(short|long(?! +double)|long long)\b', line)
- if match:
- error(filename, linenum, 'runtime/int', 4,
- 'Use int16/int64/etc, rather than the C type %s' % match.group(1))
-
- # When snprintf is used, the second argument shouldn't be a literal.
- match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
- if match and match.group(2) != '0':
- # If 2nd arg is zero, snprintf is used to calculate size.
- error(filename, linenum, 'runtime/printf', 3,
- 'If you can, use sizeof(%s) instead of %s as the 2nd arg '
- 'to snprintf.' % (match.group(1), match.group(2)))
-
- # Check if some verboten C functions are being used.
- if Search(r'\bsprintf\b', line):
- error(filename, linenum, 'runtime/printf', 5,
- 'Never use sprintf. Use snprintf instead.')
- match = Search(r'\b(strcpy|strcat)\b', line)
- if match:
- error(filename, linenum, 'runtime/printf', 4,
- 'Almost always, snprintf is better than %s' % match.group(1))
-
- if Search(r'\bsscanf\b', line):
- error(filename, linenum, 'runtime/printf', 1,
- 'sscanf can be ok, but is slow and can overflow buffers.')
-
- # Check if some verboten operator overloading is going on
- # TODO(unknown): catch out-of-line unary operator&:
- # class X {};
- # int operator&(const X& x) { return 42; } // unary operator&
- # The trick is it's hard to tell apart from binary operator&:
- # class Y { int operator&(const Y& x) { return 23; } }; // binary operator&
- if Search(r'\boperator\s*&\s*\(\s*\)', line):
- error(filename, linenum, 'runtime/operator', 4,
- 'Unary operator& is dangerous. Do not use it.')
-
- # Check for suspicious usage of "if" like
- # } if (a == b) {
- if Search(r'\}\s*if\s*\(', line):
- error(filename, linenum, 'readability/braces', 4,
- 'Did you mean "else if"? If not, start a new line for "if".')
-
- # Check for potential format string bugs like printf(foo).
- # We constrain the pattern not to pick things like DocidForPrintf(foo).
- # Not perfect but it can catch printf(foo.c_str()) and printf(foo->c_str())
- # TODO(sugawarayu): Catch the following case. Need to change the calling
- # convention of the whole function to process multiple line to handle it.
- # printf(
- # boy_this_is_a_really_long_variable_that_cannot_fit_on_the_prev_line);
- printf_args = _GetTextInside(line, r'(?i)\b(string)?printf\s*\(')
- if printf_args:
- match = Match(r'([\w.\->()]+)$', printf_args)
- if match and match.group(1) != '__VA_ARGS__':
- function_name = re.search(r'\b((?:string)?printf)\s*\(',
- line, re.I).group(1)
- error(filename, linenum, 'runtime/printf', 4,
- 'Potential format string bug. Do %s("%%s", %s) instead.'
- % (function_name, match.group(1)))
-
- # Check for potential memset bugs like memset(buf, sizeof(buf), 0).
- match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
- if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)):
- error(filename, linenum, 'runtime/memset', 4,
- 'Did you mean "memset(%s, 0, %s)"?'
- % (match.group(1), match.group(2)))
-
- if Search(r'\busing namespace\b', line):
- error(filename, linenum, 'build/namespaces', 5,
- 'Do not use namespace using-directives. '
- 'Use using-declarations instead.')
-
- # Detect variable-length arrays.
- match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line)
- if (match and match.group(2) != 'return' and match.group(2) != 'delete' and
- match.group(3).find(']') == -1):
- # Split the size using space and arithmetic operators as delimiters.
- # If any of the resulting tokens are not compile time constants then
- # report the error.
- tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3))
- is_const = True
- skip_next = False
- for tok in tokens:
- if skip_next:
- skip_next = False
- continue
-
- if Search(r'sizeof\(.+\)', tok): continue
- if Search(r'arraysize\(\w+\)', tok): continue
-
- tok = tok.lstrip('(')
- tok = tok.rstrip(')')
- if not tok: continue
- if Match(r'\d+', tok): continue
- if Match(r'0[xX][0-9a-fA-F]+', tok): continue
- if Match(r'k[A-Z0-9]\w*', tok): continue
- if Match(r'(.+::)?k[A-Z0-9]\w*', tok): continue
- if Match(r'(.+::)?[A-Z][A-Z0-9_]*', tok): continue
- # A catch all for tricky sizeof cases, including 'sizeof expression',
- # 'sizeof(*type)', 'sizeof(const type)', 'sizeof(struct StructName)'
- # requires skipping the next token because we split on ' ' and '*'.
- if tok.startswith('sizeof'):
- skip_next = True
- continue
- is_const = False
- break
- if not is_const:
- error(filename, linenum, 'runtime/arrays', 1,
- 'Do not use variable-length arrays. Use an appropriately named '
- "('k' followed by CamelCase) compile-time constant for the size.")
-
- # If DISALLOW_EVIL_CONSTRUCTORS, DISALLOW_COPY_AND_ASSIGN, or
- # DISALLOW_IMPLICIT_CONSTRUCTORS is present, then it should be the last thing
- # in the class declaration.
- match = Match(
- (r'\s*'
- r'(DISALLOW_(EVIL_CONSTRUCTORS|COPY_AND_ASSIGN|IMPLICIT_CONSTRUCTORS))'
- r'\(.*\);$'),
- line)
- if match and linenum + 1 < clean_lines.NumLines():
- next_line = clean_lines.elided[linenum + 1]
- # We allow some, but not all, declarations of variables to be present
- # in the statement that defines the class. The [\w\*,\s]* fragment of
- # the regular expression below allows users to declare instances of
- # the class or pointers to instances, but not less common types such
- # as function pointers or arrays. It's a tradeoff between allowing
- # reasonable code and avoiding trying to parse more C++ using regexps.
- if not Search(r'^\s*}[\w\*,\s]*;', next_line):
- error(filename, linenum, 'readability/constructors', 3,
- match.group(1) + ' should be the last thing in the class')
-
- # Check for use of unnamed namespaces in header files. Registration
- # macros are typically OK, so we allow use of "namespace {" on lines
- # that end with backslashes.
- if (file_extension == 'h'
- and Search(r'\bnamespace\s*{', line)
- and line[-1] != '\\'):
- error(filename, linenum, 'build/namespaces', 4,
- 'Do not use unnamed namespaces in header files. See '
- 'http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces'
- ' for more information.')
-
-
-def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern,
- error):
- """Checks for a C-style cast by looking for the pattern.
-
- This also handles sizeof(type) warnings, due to similarity of content.
-
- Args:
- filename: The name of the current file.
- linenum: The number of the line to check.
- line: The line of code to check.
- raw_line: The raw line of code to check, with comments.
- cast_type: The string for the C++ cast to recommend. This is either
- reinterpret_cast, static_cast, or const_cast, depending.
- pattern: The regular expression used to find C-style casts.
- error: The function to call with any errors found.
-
- Returns:
- True if an error was emitted.
- False otherwise.
- """
- match = Search(pattern, line)
- if not match:
- return False
-
- # e.g., sizeof(int)
- sizeof_match = Match(r'.*sizeof\s*$', line[0:match.start(1) - 1])
- if sizeof_match:
- error(filename, linenum, 'runtime/sizeof', 1,
- 'Using sizeof(type). Use sizeof(varname) instead if possible')
- return True
-
- # operator++(int) and operator--(int)
- if (line[0:match.start(1) - 1].endswith(' operator++') or
- line[0:match.start(1) - 1].endswith(' operator--')):
- return False
-
- remainder = line[match.end(0):]
-
- # The close paren is for function pointers as arguments to a function.
- # eg, void foo(void (*bar)(int));
- # The semicolon check is a more basic function check; also possibly a
- # function pointer typedef.
- # eg, void foo(int); or void foo(int) const;
- # The equals check is for function pointer assignment.
- # eg, void *(*foo)(int) = ...
- # The > is for MockCallback<...> ...
- #
- # Right now, this will only catch cases where there's a single argument, and
- # it's unnamed. It should probably be expanded to check for multiple
- # arguments with some unnamed.
- function_match = Match(r'\s*(\)|=|(const)?\s*(;|\{|throw\(\)|>))', remainder)
- if function_match:
- if (not function_match.group(3) or
- function_match.group(3) == ';' or
- ('MockCallback<' not in raw_line and
- '/*' not in raw_line)):
- error(filename, linenum, 'readability/function', 3,
- 'All parameters should be named in a function')
- return True
-
- # At this point, all that should be left is actual casts.
- error(filename, linenum, 'readability/casting', 4,
- 'Using C-style cast. Use %s<%s>(...) instead' %
- (cast_type, match.group(1)))
-
- return True
-
-
-_HEADERS_CONTAINING_TEMPLATES = (
- ('<deque>', ('deque',)),
- ('<functional>', ('unary_function', 'binary_function',
- 'plus', 'minus', 'multiplies', 'divides', 'modulus',
- 'negate',
- 'equal_to', 'not_equal_to', 'greater', 'less',
- 'greater_equal', 'less_equal',
- 'logical_and', 'logical_or', 'logical_not',
- 'unary_negate', 'not1', 'binary_negate', 'not2',
- 'bind1st', 'bind2nd',
- 'pointer_to_unary_function',
- 'pointer_to_binary_function',
- 'ptr_fun',
- 'mem_fun_t', 'mem_fun', 'mem_fun1_t', 'mem_fun1_ref_t',
- 'mem_fun_ref_t',
- 'const_mem_fun_t', 'const_mem_fun1_t',
- 'const_mem_fun_ref_t', 'const_mem_fun1_ref_t',
- 'mem_fun_ref',
- )),
- ('<limits>', ('numeric_limits',)),
- ('<list>', ('list',)),
- ('<map>', ('map', 'multimap',)),
- ('<memory>', ('allocator',)),
- ('<queue>', ('queue', 'priority_queue',)),
- ('<set>', ('set', 'multiset',)),
- ('<stack>', ('stack',)),
- ('<string>', ('char_traits', 'basic_string',)),
- ('<utility>', ('pair',)),
- ('<vector>', ('vector',)),
-
- # gcc extensions.
- # Note: std::hash is their hash, ::hash is our hash
- ('<hash_map>', ('hash_map', 'hash_multimap',)),
- ('<hash_set>', ('hash_set', 'hash_multiset',)),
- ('<slist>', ('slist',)),
- )
-
-_RE_PATTERN_STRING = re.compile(r'\bstring\b')
-
-_re_pattern_algorithm_header = []
-for _template in ('copy', 'max', 'min', 'min_element', 'sort', 'swap',
- 'transform'):
- # Match max<type>(..., ...), max(..., ...), but not foo->max, foo.max or
- # type::max().
- _re_pattern_algorithm_header.append(
- (re.compile(r'[^>.]\b' + _template + r'(<.*?>)?\([^\)]'),
- _template,
- '<algorithm>'))
-
-_re_pattern_templates = []
-for _header, _templates in _HEADERS_CONTAINING_TEMPLATES:
- for _template in _templates:
- _re_pattern_templates.append(
- (re.compile(r'(\<|\b)' + _template + r'\s*\<'),
- _template + '<>',
- _header))
-
-
-def FilesBelongToSameModule(filename_cc, filename_h):
- """Check if these two filenames belong to the same module.
-
- The concept of a 'module' here is a as follows:
- foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the
- same 'module' if they are in the same directory.
- some/path/public/xyzzy and some/path/internal/xyzzy are also considered
- to belong to the same module here.
-
- If the filename_cc contains a longer path than the filename_h, for example,
- '/absolute/path/to/base/sysinfo.cc', and this file would include
- 'base/sysinfo.h', this function also produces the prefix needed to open the
- header. This is used by the caller of this function to more robustly open the
- header file. We don't have access to the real include paths in this context,
- so we need this guesswork here.
-
- Known bugs: tools/base/bar.cc and base/bar.h belong to the same module
- according to this implementation. Because of this, this function gives
- some false positives. This should be sufficiently rare in practice.
-
- Args:
- filename_cc: is the path for the .cc file
- filename_h: is the path for the header path
-
- Returns:
- Tuple with a bool and a string:
- bool: True if filename_cc and filename_h belong to the same module.
- string: the additional prefix needed to open the header file.
- """
-
- if not filename_cc.endswith('.cc'):
- return (False, '')
- filename_cc = filename_cc[:-len('.cc')]
- if filename_cc.endswith('_unittest'):
- filename_cc = filename_cc[:-len('_unittest')]
- elif filename_cc.endswith('_test'):
- filename_cc = filename_cc[:-len('_test')]
- filename_cc = filename_cc.replace('/public/', '/')
- filename_cc = filename_cc.replace('/internal/', '/')
-
- if not filename_h.endswith('.h'):
- return (False, '')
- filename_h = filename_h[:-len('.h')]
- if filename_h.endswith('-inl'):
- filename_h = filename_h[:-len('-inl')]
- filename_h = filename_h.replace('/public/', '/')
- filename_h = filename_h.replace('/internal/', '/')
-
- files_belong_to_same_module = filename_cc.endswith(filename_h)
- common_path = ''
- if files_belong_to_same_module:
- common_path = filename_cc[:-len(filename_h)]
- return files_belong_to_same_module, common_path
-
-
-def UpdateIncludeState(filename, include_state, io=codecs):
- """Fill up the include_state with new includes found from the file.
-
- Args:
- filename: the name of the header to read.
- include_state: an _IncludeState instance in which the headers are inserted.
- io: The io factory to use to read the file. Provided for testability.
-
- Returns:
- True if a header was succesfully added. False otherwise.
- """
- headerfile = None
- try:
- headerfile = io.open(filename, 'r', 'utf8', 'replace')
- except IOError:
- return False
- linenum = 0
- for line in headerfile:
- linenum += 1
- clean_line = CleanseComments(line)
- match = _RE_PATTERN_INCLUDE.search(clean_line)
- if match:
- include = match.group(2)
- # The value formatting is cute, but not really used right now.
- # What matters here is that the key is in include_state.
- include_state.setdefault(include, '%s:%d' % (filename, linenum))
- return True
-
-
-def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error,
- io=codecs):
- """Reports for missing stl includes.
-
- This function will output warnings to make sure you are including the headers
- necessary for the stl containers and functions that you use. We only give one
- reason to include a header. For example, if you use both equal_to<> and
- less<> in a .h file, only one (the latter in the file) of these will be
- reported as a reason to include the <functional>.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- include_state: An _IncludeState instance.
- error: The function to call with any errors found.
- io: The IO factory to use to read the header file. Provided for unittest
- injection.
- """
- required = {} # A map of header name to linenumber and the template entity.
- # Example of required: { '<functional>': (1219, 'less<>') }
-
- for linenum in xrange(clean_lines.NumLines()):
- line = clean_lines.elided[linenum]
- if not line or line[0] == '#':
- continue
-
- # String is special -- it is a non-templatized type in STL.
- matched = _RE_PATTERN_STRING.search(line)
- if matched:
- # Don't warn about strings in non-STL namespaces:
- # (We check only the first match per line; good enough.)
- prefix = line[:matched.start()]
- if prefix.endswith('std::') or not prefix.endswith('::'):
- required['<string>'] = (linenum, 'string')
-
- for pattern, template, header in _re_pattern_algorithm_header:
- if pattern.search(line):
- required[header] = (linenum, template)
-
- # The following function is just a speed up, no semantics are changed.
- if not '<' in line: # Reduces the cpu time usage by skipping lines.
- continue
-
- for pattern, template, header in _re_pattern_templates:
- if pattern.search(line):
- required[header] = (linenum, template)
-
- # The policy is that if you #include something in foo.h you don't need to
- # include it again in foo.cc. Here, we will look at possible includes.
- # Let's copy the include_state so it is only messed up within this function.
- include_state = include_state.copy()
-
- # Did we find the header for this file (if any) and succesfully load it?
- header_found = False
-
- # Use the absolute path so that matching works properly.
- abs_filename = FileInfo(filename).FullName()
-
- # For Emacs's flymake.
- # If cpplint is invoked from Emacs's flymake, a temporary file is generated
- # by flymake and that file name might end with '_flymake.cc'. In that case,
- # restore original file name here so that the corresponding header file can be
- # found.
- # e.g. If the file name is 'foo_flymake.cc', we should search for 'foo.h'
- # instead of 'foo_flymake.h'
- abs_filename = re.sub(r'_flymake\.cc$', '.cc', abs_filename)
-
- # include_state is modified during iteration, so we iterate over a copy of
- # the keys.
- header_keys = include_state.keys()
- for header in header_keys:
- (same_module, common_path) = FilesBelongToSameModule(abs_filename, header)
- fullpath = common_path + header
- if same_module and UpdateIncludeState(fullpath, include_state, io):
- header_found = True
-
- # If we can't find the header file for a .cc, assume it's because we don't
- # know where to look. In that case we'll give up as we're not sure they
- # didn't include it in the .h file.
- # TODO(unknown): Do a better job of finding .h files so we are confident that
- # not having the .h file means there isn't one.
- if filename.endswith('.cc') and not header_found:
- return
-
- # All the lines have been processed, report the errors found.
- for required_header_unstripped in required:
- template = required[required_header_unstripped][1]
- if required_header_unstripped.strip('<>"') not in include_state:
- error(filename, required[required_header_unstripped][0],
- 'build/include_what_you_use', 4,
- 'Add #include ' + required_header_unstripped + ' for ' + template)
-
-
-_RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<')
-
-
-def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error):
- """Check that make_pair's template arguments are deduced.
-
- G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are
- specified explicitly, and such use isn't intended in any case.
-
- Args:
- filename: The name of the current file.
- clean_lines: A CleansedLines instance containing the file.
- linenum: The number of the line to check.
- error: The function to call with any errors found.
- """
- raw = clean_lines.raw_lines
- line = raw[linenum]
- match = _RE_PATTERN_EXPLICIT_MAKEPAIR.search(line)
- if match:
- error(filename, linenum, 'build/explicit_make_pair',
- 4, # 4 = high confidence
- 'For C++11-compatibility, omit template arguments from make_pair'
- ' OR use pair directly OR if appropriate, construct a pair directly')
-
-
-def ProcessLine(filename, file_extension, clean_lines, line,
- include_state, function_state, nesting_state, error,
- extra_check_functions=[]):
- """Processes a single line in the file.
-
- Args:
- filename: Filename of the file that is being processed.
- file_extension: The extension (dot not included) of the file.
- clean_lines: An array of strings, each representing a line of the file,
- with comments stripped.
- line: Number of line being processed.
- include_state: An _IncludeState instance in which the headers are inserted.
- function_state: A _FunctionState instance which counts function lines, etc.
- nesting_state: A _NestingState instance which maintains information about
- the current stack of nested blocks being parsed.
- error: A callable to which errors are reported, which takes 4 arguments:
- filename, line number, error level, and message
- extra_check_functions: An array of additional check functions that will be
- run on each source line. Each function takes 4
- arguments: filename, clean_lines, line, error
- """
- raw_lines = clean_lines.raw_lines
- ParseNolintSuppressions(filename, raw_lines[line], line, error)
- nesting_state.Update(filename, clean_lines, line, error)
- if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM:
- return
- CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
- CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
- CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error)
- CheckLanguage(filename, clean_lines, line, file_extension, include_state,
- error)
- CheckForNonStandardConstructs(filename, clean_lines, line,
- nesting_state, error)
- CheckPosixThreading(filename, clean_lines, line, error)
- CheckInvalidIncrement(filename, clean_lines, line, error)
- CheckMakePairUsesDeduction(filename, clean_lines, line, error)
- for check_fn in extra_check_functions:
- check_fn(filename, clean_lines, line, error)
-
-def ProcessFileData(filename, file_extension, lines, error,
- extra_check_functions=[]):
- """Performs lint checks and reports any errors to the given error function.
-
- Args:
- filename: Filename of the file that is being processed.
- file_extension: The extension (dot not included) of the file.
- lines: An array of strings, each representing a line of the file, with the
- last element being empty if the file is terminated with a newline.
- error: A callable to which errors are reported, which takes 4 arguments:
- filename, line number, error level, and message
- extra_check_functions: An array of additional check functions that will be
- run on each source line. Each function takes 4
- arguments: filename, clean_lines, line, error
- """
- lines = (['// marker so line numbers and indices both start at 1'] + lines +
- ['// marker so line numbers end in a known way'])
-
- include_state = _IncludeState()
- function_state = _FunctionState()
- nesting_state = _NestingState()
-
- ResetNolintSuppressions()
-
- CheckForCopyright(filename, lines, error)
-
- if file_extension == 'h':
- CheckForHeaderGuard(filename, lines, error)
-
- RemoveMultiLineComments(filename, lines, error)
- clean_lines = CleansedLines(lines)
- for line in xrange(clean_lines.NumLines()):
- ProcessLine(filename, file_extension, clean_lines, line,
- include_state, function_state, nesting_state, error,
- extra_check_functions)
- nesting_state.CheckClassFinished(filename, error)
-
- CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error)
-
- # We check here rather than inside ProcessLine so that we see raw
- # lines rather than "cleaned" lines.
- CheckForUnicodeReplacementCharacters(filename, lines, error)
-
- CheckForNewlineAtEOF(filename, lines, error)
-
-def ProcessFile(filename, vlevel, extra_check_functions=[]):
- """Does google-lint on a single file.
-
- Args:
- filename: The name of the file to parse.
-
- vlevel: The level of errors to report. Every error of confidence
- >= verbose_level will be reported. 0 is a good default.
-
- extra_check_functions: An array of additional check functions that will be
- run on each source line. Each function takes 4
- arguments: filename, clean_lines, line, error
- """
-
- _SetVerboseLevel(vlevel)
-
- try:
- # Support the UNIX convention of using "-" for stdin. Note that
- # we are not opening the file with universal newline support
- # (which codecs doesn't support anyway), so the resulting lines do
- # contain trailing '\r' characters if we are reading a file that
- # has CRLF endings.
- # If after the split a trailing '\r' is present, it is removed
- # below. If it is not expected to be present (i.e. os.linesep !=
- # '\r\n' as in Windows), a warning is issued below if this file
- # is processed.
-
- if filename == '-':
- lines = codecs.StreamReaderWriter(sys.stdin,
- codecs.getreader('utf8'),
- codecs.getwriter('utf8'),
- 'replace').read().split('\n')
- else:
- lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
-
- carriage_return_found = False
- # Remove trailing '\r'.
- for linenum in range(len(lines)):
- if lines[linenum].endswith('\r'):
- lines[linenum] = lines[linenum].rstrip('\r')
- carriage_return_found = True
-
- except IOError:
- sys.stderr.write(
- "Skipping input '%s': Can't open for reading\n" % filename)
- return
-
- # Note, if no dot is found, this will give the entire filename as the ext.
- file_extension = filename[filename.rfind('.') + 1:]
-
- # When reading from stdin, the extension is unknown, so no cpplint tests
- # should rely on the extension.
- if (filename != '-' and file_extension != 'cc' and file_extension != 'h'
- and file_extension != 'cpp'):
- sys.stderr.write('Ignoring %s; not a .cc or .h file\n' % filename)
- else:
- ProcessFileData(filename, file_extension, lines, Error,
- extra_check_functions)
- if carriage_return_found and os.linesep != '\r\n':
- # Use 0 for linenum since outputting only one error for potentially
- # several lines.
- Error(filename, 0, 'whitespace/newline', 1,
- 'One or more unexpected \\r (^M) found;'
- 'better to use only a \\n')
-
- sys.stderr.write('Done processing %s\n' % filename)
-
-
-def PrintUsage(message):
- """Prints a brief usage string and exits, optionally with an error message.
-
- Args:
- message: The optional error message.
- """
- sys.stderr.write(_USAGE)
- if message:
- sys.exit('\nFATAL ERROR: ' + message)
- else:
- sys.exit(1)
-
-
-def PrintCategories():
- """Prints a list of all the error-categories used by error messages.
-
- These are the categories used to filter messages via --filter.
- """
- sys.stderr.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES))
- sys.exit(0)
-
-
-def ParseArguments(args):
- """Parses the command line arguments.
-
- This may set the output format and verbosity level as side-effects.
-
- Args:
- args: The command line arguments:
-
- Returns:
- The list of filenames to lint.
- """
- try:
- (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=',
- 'counting=',
- 'filter=',
- 'root='])
- except getopt.GetoptError:
- PrintUsage('Invalid arguments.')
-
- verbosity = _VerboseLevel()
- output_format = _OutputFormat()
- filters = ''
- counting_style = ''
-
- for (opt, val) in opts:
- if opt == '--help':
- PrintUsage(None)
- elif opt == '--output':
- if not val in ('emacs', 'vs7', 'eclipse'):
- PrintUsage('The only allowed output formats are emacs, vs7 and eclipse.')
- output_format = val
- elif opt == '--verbose':
- verbosity = int(val)
- elif opt == '--filter':
- filters = val
- if not filters:
- PrintCategories()
- elif opt == '--counting':
- if val not in ('total', 'toplevel', 'detailed'):
- PrintUsage('Valid counting options are total, toplevel, and detailed')
- counting_style = val
- elif opt == '--root':
- global _root
- _root = val
-
- if not filenames:
- PrintUsage('No files were specified.')
-
- _SetOutputFormat(output_format)
- _SetVerboseLevel(verbosity)
- _SetFilters(filters)
- _SetCountingStyle(counting_style)
-
- return filenames
-
-
-def main():
- filenames = ParseArguments(sys.argv[1:])
-
- # Change stderr to write with replacement characters so we don't die
- # if we try to print something containing non-ASCII characters.
- sys.stderr = codecs.StreamReaderWriter(sys.stderr,
- codecs.getreader('utf8'),
- codecs.getwriter('utf8'),
- 'replace')
-
- _cpplint_state.ResetErrorCounts()
- for filename in filenames:
- ProcessFile(filename, _cpplint_state.verbose_level)
- _cpplint_state.PrintErrorCounts()
-
- sys.exit(_cpplint_state.error_count > 0)
-
-
-if __name__ == '__main__':
- main()
diff --git a/SDL_Core/tools/coding-style/old-branch-nagger.sh b/SDL_Core/tools/coding-style/old-branch-nagger.sh
deleted file mode 100755
index 1eed89e1d..000000000
--- a/SDL_Core/tools/coding-style/old-branch-nagger.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# All the branches excluding release branches and virtual HEAD branch
-ALL_BRANCHES=`git branch -r | grep -v '\(origin/master$\|HEAD\|origin/release\)'`
-
-# Branch names, access dates and last committer names
-# The format is "<unix-date> <oldness-text> <author> <branch-name>"
-# Sorted by date, freshes branches first
-BRANCH_COMMITS=$(for branch in $ALL_BRANCHES;do echo -e $(git log -1 --format="%at\t%ar\t%aE\t" $branch)$branch; done | sort -rn)
-
-# List of all branch owners
-BRANCH_OWNERS=$(echo "$BRANCH_COMMITS"|cut -f3|sort|uniq)
-
-# 2 weeks here
-TIME_THRESHOLD=$((60 * 60 * 24 * 7 * 2))
-DATE_THRESHOLD=$(( $(date +%s) - $TIME_THRESHOLD ))
-
-FLAGS=${1:-""}
-
-for OWNER in $BRANCH_OWNERS; do
- # Oldness and names of branches which belong to $OWNER and that are more than 2 weeks old
- OLD_BRANCHES=$(echo "$BRANCH_COMMITS"|grep $OWNER|awk -F'\t' 'int($1) < '$DATE_THRESHOLD' {print $2 " " $4}')
- if [ -n "$OLD_BRANCHES" ];
- then
- if [[ $FLAGS == "-m" ]]; then
- SENDER="mail -s Your_branches_may_be_old $OWNER"
- else
- SENDER="cat"
- fi
- $SENDER <<EOF
-Dear $OWNER, here are your branches you DID NOT update for more than two weeks,
-please merge them to develop and/or remove:
-$OLD_BRANCHES
-
-EOF
- fi
-done
-
diff --git a/SDL_Core/tools/intergen/CMakeLists.txt b/SDL_Core/tools/intergen/CMakeLists.txt
deleted file mode 100644
index b7fc7ed02..000000000
--- a/SDL_Core/tools/intergen/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project(intergen)
-
-if (${UNIX})
- add_definitions(-DOS_POSIX)
-endif(${UNIX})
-
-add_subdirectory(third_party/pugixml/scripts)
-add_subdirectory(utils)
-add_subdirectory(model)
-add_subdirectory(cppgen)
-add_subdirectory(tool)
diff --git a/SDL_Core/tools/intergen/GenerateInterfaceLibrary.cmake b/SDL_Core/tools/intergen/GenerateInterfaceLibrary.cmake
deleted file mode 100644
index 65312ee3c..000000000
--- a/SDL_Core/tools/intergen/GenerateInterfaceLibrary.cmake
+++ /dev/null
@@ -1,54 +0,0 @@
-set(INTERGEN_CMD ${CMAKE_BINARY_DIR}/tools/intergen/bin/intergen)
-set(GENERATED_LIB_DEPENDENCIES rpc_base jsoncpp)
-set(GENERATED_LIB_HEADER_DEPENDENCIES
- ${CMAKE_SOURCE_DIR}/src/components/rpc_base/include
- ${CMAKE_SOURCE_DIR}/src/thirdPartyLibs/jsoncpp/include
-)
-
-# Generates interface library from given xml file and builds it
-# in CMAKE_CURRENT_BINARY_DIR
-# |xml_file_name| contains path to xml spec files
-# |generated_interface_names| should contain list of generated interfaces
-# if |AUTO_FUNC_IDS| is added to argument list, intergen is called with "-a"
-# flag telling intergen to generate function ids automatically
-# from xml_file (intergen creates separate directory for every interface).
-# Their names are written lowercase_underscored_style.
-macro (GenerateInterfaceLibrary xml_file_name generated_interface_names)
- set(options AUTO_FUNC_IDS)
- cmake_parse_arguments(GenerateInterfaceLibrary "${options}" "" "" ${ARGN})
- if (GenerateInterfaceLibrary_AUTO_FUNC_IDS)
- set(intergen_flags "-a")
- endif()
-
- foreach(interface_name ${generated_interface_names})
- set(HEADERS
- ${interface_name}/enums.h
- ${interface_name}/types.h
- ${interface_name}/functions.h
- ${interface_name}/interface.h
- )
- set(SOURCES
- ${interface_name}/enums.cc
- ${interface_name}/types.cc
- ${interface_name}/functions.cc
- ${interface_name}/validation.cc
- ${interface_name}/interface.cc
- )
- add_custom_command( OUTPUT ${HEADERS} ${SOURCES}
- COMMAND ${INTERGEN_CMD} -f ${CMAKE_CURRENT_SOURCE_DIR}/${xml_file_name} -i ${interface_name} ${intergen_flags}
- DEPENDS ${INTERGEN_CMD} ${xml_file_name}
- COMMENT "Generating interface ${interface_name} from ${xml_file_name}"
- VERBATIM
- )
- include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${GENERATED_LIB_HEADER_DEPENDENCIES}
- )
- add_library(${interface_name} ${SOURCES})
-
- # |previous_interface| ensures that interface libraries are built in the same order
- # as they defined in |generated_interface_names|
- target_link_libraries(${interface_name} ${GENERATED_LIB_DEPENDENCIES} ${previous_interface})
- set(previous_interface ${interface_name})
- endforeach(interface_name)
-endmacro(GenerateInterfaceLibrary xml_file_name generated_interface_names)
diff --git a/SDL_Core/tools/intergen/cppgen/CMakeLists.txt b/SDL_Core/tools/intergen/cppgen/CMakeLists.txt
deleted file mode 100644
index 5168466e8..000000000
--- a/SDL_Core/tools/intergen/cppgen/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-include_directories(
- include
- ${intergen_SOURCE_DIR}/model/include
- ${intergen_SOURCE_DIR}/utils/include
-)
-
-set (SOURCES
- src/cppgen/comment.cc
- src/cppgen/cpp_api_code_generator.cc
- src/cppgen/cpp_class.cc
- src/cppgen/cpp_file.cc
- src/cppgen/cpp_function.cc
- src/cppgen/cpp_interface_code_generator.cc
- src/cppgen/declaration_generator.cc
- src/cppgen/definition_generator.cc
- src/cppgen/enum_from_json_value_function.cc
- src/cppgen/enum_to_json_value_function.cc
- src/cppgen/function_id_method.cc
- src/cppgen/generator_preferences.cc
- src/cppgen/handler_interface.cc
- src/cppgen/is_valid_enum_function.cc
- src/cppgen/literal_generator.cc
- src/cppgen/message_factory_function.cc
- src/cppgen/message_handle_with_method.cc
- src/cppgen/message_interface.cc
- src/cppgen/module_manager.cc
- src/cppgen/namespace.cc
- src/cppgen/naming_convention.cc
- src/cppgen/struct_type_constructor.cc
- src/cppgen/struct_type_from_json_method.cc
- src/cppgen/struct_type_is_initialized_method.cc
- src/cppgen/struct_type_is_valid_method.cc
- src/cppgen/type_name_code_generator.cc
-)
-
-set (HEADERS
- include/cppgen/comment.h
- include/cppgen/cpp_api_code_generator.h
- include/cppgen/cpp_class.h
- include/cppgen/cpp_file.h
- include/cppgen/cpp_function.h
- include/cppgen/cpp_interface_code_generator.h
- include/cppgen/declaration_generator.h
- include/cppgen/definition_generator.h
- include/cppgen/enum_from_json_value_function.h
- include/cppgen/enum_to_json_value_function.h
- include/cppgen/function_id_method.h
- include/cppgen/generator_preferences.h
- include/cppgen/handler_interface.h
- include/cppgen/is_valid_enum_function.h
- include/cppgen/literal_generator.h
- include/cppgen/message_factory_function.h
- include/cppgen/message_handle_with_method.h
- include/cppgen/message_interface.h
- include/cppgen/module_manager.h
- include/cppgen/namespace.h
- include/cppgen/naming_convention.h
- include/cppgen/struct_type_constructor.h
- include/cppgen/struct_type_from_json_method.h
- include/cppgen/struct_type_is_initialized_method.h
- include/cppgen/struct_type_is_valid_method.h
- include/cppgen/type_name_code_generator.h
-)
-
-add_library(intergen_cppgen ${HEADERS} ${SOURCES})
-target_link_libraries(intergen_cppgen intergen_model intergen_utils)
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/comment.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/comment.h
deleted file mode 100644
index f4fdfb45e..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/comment.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef COMMENT_H_
-#define COMMENT_H_
-
-#include <iosfwd>
-
-#include "utils/common_types.h"
-
-namespace codegen {
-
-// Class that represents C++ comment that can easily be output to
-// ostream,
-// comment text is wrapped with C++ comment marks (//) or /star automatically
-class Comment {
- public:
- // Create comment object from Description collected from xml
- explicit Comment(const Description& description);
- // Create single-line comment from string
- explicit Comment(const std::string& text);
- ~Comment();
- private:
- Description description_;
- friend std::ostream& operator<<(std::ostream& os, const Comment& comment);
-};
-
-std::ostream& operator<<(std::ostream& os, const Comment& comment);
-
-} // namespace codegen
-
-#endif /* COMMENT_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_api_code_generator.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_api_code_generator.h
deleted file mode 100644
index 5deeacc77..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_api_code_generator.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CPP_API_CODE_GENERATOR_H_
-#define CPP_API_CODE_GENERATOR_H_
-
-#include <set>
-#include <string>
-
-#include "cppgen/generator_preferences.h"
-
-namespace codegen {
-class API;
-class Interface;
-
-/*
- * Main C++ code generator class, takes parsed API object and produces
- * header and implementation files for that code
- */
-class CppApiCodeGenerator {
- public:
- CppApiCodeGenerator(const API* api);
- ~CppApiCodeGenerator();
- // Generate code for requested interfaces. Interface name id taken from
- // Interface::name field converting it to a lower_case_identifier
- std::set<std::string> Generate(const std::set<std::string>&
- required_interfaces);
- private:
- // Produces code for single interface
- bool GenerateInterface(const Interface* interface);
- private:
- const API* api_;
-};
-
-} // namespace codegen
-
-#endif /* CPP_API_CODE_GENERATOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_class.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_class.h
deleted file mode 100644
index 5f2ff4193..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_class.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CODEGEN_CPP_CLASS_H
-#define CODEGEN_CPP_CLASS_H
-
-#include <iosfwd>
-#include <string>
-#include <vector>
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-/*
- * Class helper abstract class for C++ classes generation
- * Must be inherited by a concrete class that provides
- * class information by implementing pure virtual methods
- */
-class CppClass {
- public:
- // Types
- class Method;
- class Superclass;
- typedef std::vector<const Method*> MethodsList;
- typedef std::vector<Superclass> SuperclassList;
- // Member and inheritance access types specifier
- enum AccessSpec {
- kPublic, kProtected, kPrivate
- };
- public:
- // Methods
- // Creates class named |name|
- CppClass(const std::string& name);
- ~CppClass();
- // Add superclass to classess parent's list
- void Add(const Superclass& superclass);
- // Output class declaration code to |os|
- void Declare(std::ostream* os);
- // Output class member's definition code to |os|
- void Define(std::ostream* os);
- // Class name
- std::string name() const;
-protected:
- // Methods
- // To be defined by a concrete class, to provide
- // Class member methods list
- virtual const MethodsList& methods() = 0;
-private:
- // Helper method that gives method list filtered by
- // |access_spec|
- MethodsList functions(AccessSpec access_spec);
- // Fields
- std::string name_;
- SuperclassList superclasses_;
-};
-
-/*
- * Helper class produces code for class method
- */
-class CppClass::Method: public CppFunction {
- public:
- Method(const CppClass* cls, AccessSpec access, const std::string& name,
- const std::string& return_type_name, int qualifiers = 0);
- AccessSpec access_specifier() const;
-
-private:
- AccessSpec access_specifier_;
-};
-
-/*
- * Helper class that is used to specify class's parrents
- */
-class CppClass::Superclass {
-public:
- Superclass(const std::string& name, AccessSpec inheritance_type);
- const std::string& name() const;
- AccessSpec inheritance_type() const;
-
-private:
- std::string name_;
- AccessSpec inheritance_type_;
-};
-
-} // namespace codegen
-
-#endif // CODEGEN_CPP_CLASS_H
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_file.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_file.h
deleted file mode 100644
index 07857ccf4..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_file.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CPP_FILE_H_
-#define CPP_FILE_H_
-
-#include <iosfwd>
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-
-#include "cppgen/namespace.h"
-#include "model/function.h"
-#include "utils/common_types.h"
-
-namespace codegen {
-class Type;
-
-/*
- * Class representing C++ source file (generic) which contains C++ declarations
- * and definitions placed in namespaces
- * Can represent header or source file which basically differ in whether
- * file's contents is wrapped with include guards
- */
-class CppFile {
- public:
- // Types
- class Header;
- public:
- // Methods
- // Creates C++ file with name |file_name| that is part of module
- // |module_name|.
- // If |write_guards| is true, file contents is wrapped with include guards
- // Module name is used to generate header guards and as a directory to
- // write file into.
- CppFile(const std::string& file_name, const std::string& module_name, bool write_guards);
- ~CppFile();
- const std::string& file_name() const;
- // Adds header to file's include list
- void Include(const Header& header);
- // Automatically adds header where given type is defined
- void IncludeType(const Type& type);
- // Returns predefined namespaces for entities of different type
- Namespace& global_namespace();
- Namespace& types_ns();
- Namespace& requests_ns();
- Namespace& responses_ns();
- Namespace& notifications_ns();
- Namespace& NamespaceByMessageType(FunctionMessage::MessageType type);
-
- // Generates code file named module_name/file_name and saves all namespaces
- // into it.
- void Write(std::ostream* os);
-
- private:
- Namespace& module_namespace();
- // Methods
- private:
- bool write_guards_;
- std::string file_name_;
- std::string module_name_;
- // Fields
- std::stringstream contents_;
- std::set<Header> headers_;
- Namespace global_namespace_;
-};
-
-/*
- * Class representing single header that is to be included into current one
- */
-class CppFile::Header {
- public:
- // Methods
-
- // Creates include directive with |name|.
- // If |local| is true, name will be included in quotes, else
- // it is included in <>
- Header(const std::string& name, bool local);
- bool is_local() const;
- const std::string& name() const;
- bool operator<(const Header& that) const;
-
- private:
- // Fields
- std::string name_;
- bool local_;
-};
-
-} // namespace codegen
-
-#endif /* CPP_FILE_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_function.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_function.h
deleted file mode 100644
index 4aaecd75c..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_function.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CPP_FUNCTION_H_
-#define CPP_FUNCTION_H_
-
-#include <iosfwd>
-#include <string>
-#include <vector>
-
-namespace codegen {
-
-/*
- * Class representing single generated C++ function or method
- * Has methods to output that function declaration or definition to
- * ostream
- */
-class CppFunction {
- public:
- // Types and constants
- struct Parameter;
- struct OptionalParameter;
- struct Initializer;
- // C++ Function qualifiers
- static const int kVirtual = 1 << 0;
- static const int kStatic = 1 << 1;
- static const int kExplicit = 1 << 2;
- static const int kConst = 1 << 3;
- static const int kVolatile = 1 << 4;
- static const int kAbstract = 1 << 5;
- public:
- // Methods
- // Creates a C++ function that belongs to |class_name|
- // (should be empty for free functions), has a |name| and returns
- // value of |return_type_name|. Might have combination of optional
- // |qualifiers| (kVirtual | kConst, etc.)
- CppFunction(const std::string& class_name, const std::string& name,
- const std::string& return_type_name, int qualifiers = 0);
- virtual ~CppFunction();
- // Adds a (mandatory) parameter to a function, parameters are declared in the
- // same order they were added
- void Add(const Parameter& parameter);
- // Adds an optional parameter. Optional parameters are declared
- // after mandatory parameters in the order they were added
- void Add(const OptionalParameter& parameter);
- // Adds initializer statement, used by constructors
- void Add(const Initializer& initializer);
- // Outputs function declaration to ostream |os|, if
- // |in_class| is true, declaration will have all the
- // qualifiers present and class name omitted
- // following C++ rules of method declaration
- void Declare(std::ostream* os, bool in_class) const;
- // Outputs function definition (signature and body) to ostream |os|.
- // if |in_class| is true, declaration will have all the
- // qualifiers present and class name omitted
- // following C++ rules of method declaration
- void Define(std::ostream* os, bool in_class) const;
- // Returns true if generated function has at least one parameter that is not
- // optional e.g. can not be called without parameters.
- bool has_mandatory_parameters() const;
- private:
- // Outputs function prototype to |os|.
- // if |in_class| is true, declaration will have all the
- // qualifiers present and class name omitted
- // following C++ rules of method declaration
- // If |default_values| is true, output values for optional
- // parameters (these should be written when function is declared).
- void WriteFunctionPrototype(std::ostream* os, bool in_class,
- bool default_values) const;
- // Outputs constructor initializer list
- void WriteInitializerList(std::ostream* os) const;
- protected:
- // A method to be defined by derived classes that outputs function code
- virtual void DefineBody(std::ostream* os) const;
- int qualifiers_;
- std::string class_name_;
- std::string name_;
- std::string return_type_name_;
- std::vector<Parameter> parameters_;
- std::vector<OptionalParameter> optional_params_;
- std::vector<Initializer> initializers_;
-};
-
-/*
- * Represents single function parameter
- */
-struct CppFunction::Parameter {
- // Every parameter has name and type, which are passed as
- // |name| and |type_name|
- Parameter(const std::string& name, const std::string& type_name);
- ~Parameter();
- std::string name;
- std::string type_name;
-};
-
-/*
- * Represents single optional parameter function can accept
- * it is different from usual parameter as it has default value
- */
-struct CppFunction::OptionalParameter : CppFunction::Parameter {
- // Every optional parameter has name and type, which are passed as
- // |name| and |type_name|. Default initializer expression is passed as
- // |default_value| parameter.
- OptionalParameter(const std::string& name, const std::string& type_name,
- const std::string& default_value);
- ~OptionalParameter();
- std::string default_value;
-};
-
-/*
- * Represents initializer entry for constructor initializer list.
- * Every entry consists of |field_name| to be initialized and it's
- * |initializer| expression.
- */
-struct CppFunction::Initializer {
- Initializer(const std::string& field_name, const std::string& initializer);
- ~Initializer();
- std::string field_name;
- std::string initializer;
-};
-
-/*
- * Constructor is a specialized C++ function that only needs type_name
- * to be defined. Parameters (if any) can be added later.
- */
-class CppStructConstructor: public CppFunction {
- public:
- // Generates a constructor for type named |type_name|.
- CppStructConstructor(const std::string& type_name);
- ~CppStructConstructor();
-};
-
-/*
- * Destructor is a specialized C++ function that only needs type_name
- * to be defined.
- */
-class CppStructDestructor: public CppFunction {
- public:
- CppStructDestructor(const std::string& type_name, bool abstract = false);
- ~CppStructDestructor();
-};
-
-} // namespace codegen
-
-#endif /* CPP_FUNCTION_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_interface_code_generator.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_interface_code_generator.h
deleted file mode 100644
index 40bba8559..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/cpp_interface_code_generator.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CPP_INTERFACE_CODE_GENERATOR_H_
-#define CPP_INTERFACE_CODE_GENERATOR_H_
-
-#include "cppgen/declaration_generator.h"
-#include "cppgen/definition_generator.h"
-
-namespace codegen {
-class Interface;
-class ModuleManager;
-class GeneratorPreferences;
-
-/*
- * Generates code for all the entities of single interface
- */
-class CppInterfaceCodeGenerator {
- public:
- // Creates code generator for |interface|, using
- // |module_manager| to find where to output the code
- CppInterfaceCodeGenerator(const Interface* interface,
- ModuleManager* module_manager);
- ~CppInterfaceCodeGenerator();
- // Generate all the interface code
- void GenerateCode();
- private:
- // Generate code for different interface entities
- void GenerateEnums();
- void GenerateStructs();
- void GenerateTypedefs();
- void GenerateFunctions();
- void GenerateResponses();
- void GenerateNotifications();
- void GenerateHandlerInterfaces();
- void GenerateMessageBaseClasses();
- void GenerateMessageFactories();
-private:
- // Fields
- const Interface* interface_;
- ModuleManager* module_manager_;
- DeclarationGenerator declaration_generator_;
- DefinitionGenerator definition_generator_;
-};
-
-} // namespace codegen
-
-#endif /* CPP_INTERFACE_CODE_GENERATOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/declaration_generator.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/declaration_generator.h
deleted file mode 100644
index f0ee17054..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/declaration_generator.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DECLARATION_GENERATOR_H_
-#define DECLARATION_GENERATOR_H_
-
-#include "model/composite_type.h"
-#include "model/constant.h"
-#include "model/function.h"
-
-namespace codegen {
-class CppFile;
-class Namespace;
-class GeneratorPreferences;
-class ModuleManager;
-
-/*
- * Generates declaration code of different entities that is to be
- * put into header file
- */
-class DeclarationGenerator {
- public:
- // Methods
- DeclarationGenerator(ModuleManager* module_manager);
- ~DeclarationGenerator();
-
- // Methods that generate code for different code model entities
- void GenerateCodeForEnum(const Enum* enm);
- void GenerateCodeForStruct(const Struct* strct);
- void GenerateCodeForTypedef(const Typedef* tdef);
- void GenerateCodeForFunction(const Function& function);
- void GenerateCodeForResponse(const Response& response);
- void GenerateCodeForNotification(const Notification& notification);
- private:
- // Methods
- void GenerateCodeForRequest(const Request& response, CppFile* header_file);
- void GenerateCodeForEnumConstant(const Enum::Constant& enm,
- CppFile* header_file,
- bool skip_coma);
- void GenerateCodeForStructField(const Struct& strct,
- const Struct::Field& field,
- CppFile* header_file,
- Namespace* name_space);
- void GenerateCodeForStructFields(const Struct& strct,
- CppFile* header_file,
- Namespace* name_space);
- private:
- // Fields
- ModuleManager* module_manager_;
-};
-
-/*
- * This class is used to add forward declaration of specific type
- * to file's namespace
- */
-class TypeForwardDeclarator : public TypeCodeGenerator {
- public:
- // Creates objec and automatically forward declares |type| in namespace
- // |ns|
- TypeForwardDeclarator(Namespace* ns, const Type* type);
- private:
- // TypeCodeGenerator interface
-
- // Only structs can be forward declared but they can be part of array declaration
- // All other types don't need forward declaration
- virtual void GenerateCodeForArray(const Array* array);
- virtual void GenerateCodeForMap(const Map* map);
- virtual void GenerateCodeForStruct(const Struct* strct);
- private:
- // Fields
- Namespace* ns_;
-};
-
-} // namespace codegen
-
-#endif /* DECLARATION_GENERATOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/definition_generator.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/definition_generator.h
deleted file mode 100644
index cce5d3209..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/definition_generator.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DEFINITION_GENERATOR_H_
-#define DEFINITION_GENERATOR_H_
-
-#include "model/builtin_type.h"
-#include "model/function.h"
-
-namespace codegen {
-class CppFile;
-class Namespace;
-class GeneratorPreferences;
-class ModuleManager;
-
-/*
- * Generates definition code of different entities that is to be
- * put into implementation (.cc) file
- */
-
-class DefinitionGenerator {
- public:
- DefinitionGenerator(ModuleManager* module_manager);
- ~DefinitionGenerator();
-
- void GenerateCodeForEnum(const Enum* enm);
- void GenerateCodeForStruct(const Struct* strct);
- void GenerateCodeForFunction(const Function& function);
- void GenerateCodeForResponse(const Response& response);
- void GenerateCodeForNotification(const Notification& notification);
- private:
- // Methods
- void GenerateCodeForRequest(const Request& request, CppFile* source_file);
-private:
- // Fields
- ModuleManager* module_manager_;
-};
-
-} // namespace codegen
-
-#endif /* DEFINITION_GENERATOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/enum_from_json_value_function.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/enum_from_json_value_function.h
deleted file mode 100644
index a71cc47f6..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/enum_from_json_value_function.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ENUM_FROM_STRING_FUNCTION_H_
-#define ENUM_FROM_STRING_FUNCTION_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Enum;
-
-/*
- * Generates function that translates given string value to JSON value.
- * Enum constants are serialized/deserialized as strings having value from
- * predefined set.
- */
-class EnumFromJsonValueFunction : public CppFunction {
- public:
- EnumFromJsonValueFunction(const Enum* enm);
- ~EnumFromJsonValueFunction();
- virtual void DefineBody(std::ostream* os) const;
- private:
- const Enum* enm_;
-};
-
-} // namespace codegen
-
-#endif /* ENUM_FROM_STRING_FUNCTION_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/enum_to_json_value_function.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/enum_to_json_value_function.h
deleted file mode 100644
index ce8e39be5..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/enum_to_json_value_function.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ENUM_TO_JSON_VALUE_FUNCTION_H_
-#define ENUM_TO_JSON_VALUE_FUNCTION_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Enum;
-
-/*
- * Generates function that maps enum values to their string representations.
- */
-class EnumToJsonValueFunction : public CppFunction {
- public:
- EnumToJsonValueFunction(const Enum* enm);
- ~EnumToJsonValueFunction();
- virtual void DefineBody(std::ostream* os) const;
- private:
- const Enum* enm_;
-};
-} // namespace codegen
-
-#endif // ENUM_TO_JSON_VALUE_FUNCTION_H_
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/function_id_method.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/function_id_method.h
deleted file mode 100644
index 109d46791..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/function_id_method.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FUNCTION_ID_METHOD_H_
-#define FUNCTION_ID_METHOD_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class FunctionMessage;
-
-/*
- * Generates function_id() virtual method that is to be declared/defined
- * in every API message struct.
- */
-class FunctionIdMethod : public CppFunction {
- public:
- FunctionIdMethod(const FunctionMessage* func);
- ~FunctionIdMethod();
- private:
- // Methods
- // CppFunction interface
- virtual void DefineBody(std::ostream* os) const;
- private:
- // Fields
- const FunctionMessage* func_;
-};
-
-/*
- * Generates function_string_id() virtual method that is to be declared/defined
- * in every API message struct.
- */
-class FunctionStringIdMethod : public CppFunction {
- public:
- FunctionStringIdMethod(const FunctionMessage* func);
- ~FunctionStringIdMethod();
- private:
- // Methods
- // CppFunction interface
- virtual void DefineBody(std::ostream* os) const;
- private:
- // Fields
- const FunctionMessage* func_;
-};
-
-} // namespace codegen
-
-#endif /* FUNCTION_ID_METHOD_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/generator_preferences.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/generator_preferences.h
deleted file mode 100644
index 4ea2664c3..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/generator_preferences.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef GENERATOR_PREFERENCES_H_
-#define GENERATOR_PREFERENCES_H_
-
-#include <string>
-
-#include "model/constant.h"
-
-namespace codegen {
-
-/*
- * Text entity names to be used in generated code
- */
-namespace func_names {
-extern const char* kAdditionalValidation;
-}
-
-} // namespace codegen
-
-#endif /* GENERATOR_PREFERENCES_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/handler_interface.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/handler_interface.h
deleted file mode 100644
index a7b5a7c92..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/handler_interface.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HANDLER_INTERFACE_H
-#define HANDLER_INTERFACE_H
-
-#include "cppgen/cpp_class.h"
-
-#include "model/function.h"
-#include "utils/stl_utils.h"
-
-namespace codegen {
-class CppFile;
-class Namespace;
-
-/*
- * Class is used to declare message handler interfaces for specific messages of
- * given type for given interface
- */
-class HandlerInterface: public CppClass {
-public:
- // Methods
- // Creates HandlerInterface object that is used to produce declaration of
- // Handler interface. This interface defines handler methods for messages of
- // given |type| defined in given rpc |interface|.
- // Interface declaration requires message types to be forward-declared, these
- // declarations are placed into given |header_file|.
- HandlerInterface(FunctionMessage::MessageType type,
- const Interface* interface,
- CppFile* header_file);
-protected:
- // Methods
- // CppClass interface
- virtual const MethodsList& methods();
-
-private:
- // Types
- typedef std::vector<const FunctionMessage*> FunctionMessages;
-private:
- // Methods
- // Collects all the messages that are to be handled and defines
- // Handler methods for them. Also declares virtual destructor.
- void CollectMethods();
- // Helper method that actually generates handler functions
- void AddFunctionMessageHandlers(const FunctionMessages& function_messages);
-private:
- // Fields
- FunctionMessage::MessageType type_;
- const Interface* interface_;
- CppFile* header_file_;
- MethodsList methods_;
- utils::StdContainerDeleter<MethodsList> methods_deleter_;
-};
-
-} // namespace codegen
-
-#endif // HANDLER_INTERFACE_H
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/is_valid_enum_function.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/is_valid_enum_function.h
deleted file mode 100644
index b62332e1e..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/is_valid_enum_function.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IS_VALID_ENUM_FUNCTION_H_
-#define IS_VALID_ENUM_FUNCTION_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Enum;
-
-/*
- * Generates function that tells whether the value of particular enum is
- * valid one (belongs to enum values set).
- */
-class IsValidEnumFunction : public CppFunction {
- public:
- IsValidEnumFunction(const Enum* enm);
- ~IsValidEnumFunction();
- private:
- virtual void DefineBody(std::ostream* os) const;
- const Enum* enm_;
-};
-
-} // namespace codegen
-
-#endif /* IS_VALID_ENUM_FUNCTION_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/literal_generator.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/literal_generator.h
deleted file mode 100644
index c0818f1b1..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/literal_generator.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LITERAL_GENERATOR_H_
-#define LITERAL_GENERATOR_H_
-
-#include <string>
-
-#include "model/constant.h"
-
-namespace codegen {
-
-/*
- * This class generates string literal representing value of a given constant
- * depending on constant type.
- */
-class LiteralGenerator : ConstantCodeGenerator {
- public:
- // Literal for |constant| is automatically generated on construction and
- // can be accessd with result method
- LiteralGenerator(const Constant& constant);
- ~LiteralGenerator();
- // Returns a string value representing given constant
- std::string result() const;
- private:
- // ConstantCodeGenerator interface
- virtual void GenerateCodeForBooleanConstant(const Boolean::Constant* boolean);
- virtual void GenerateCodeForIntegerConstant(const Integer::Constant* integer);
- virtual void GenerateCodeForFloatConstant(const Float::Constant* flt);
- virtual void GenerateCodeForEnumConstant(const Enum::Constant* enm);
- private:
- std::string result_;
-};
-
-} // namespace codegen
-
-#endif /* LITERAL_GENERATOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/message_factory_function.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/message_factory_function.h
deleted file mode 100644
index 937759372..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/message_factory_function.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CODEGEN_MESSAGE_FACTORY_FUNCTION_H
-#define CODEGEN_MESSAGE_FACTORY_FUNCTION_H
-
-#include "cppgen/cpp_function.h"
-#include "model/function.h"
-
-namespace codegen {
-class Interface;
-
-/*
- * This class is used to produce interface-specific,
- * Message-type specific message factory function that is
- * to be used to produce message from Json::Value object
- */
-class MessageFactoryFunction: public CppFunction {
- public:
- // Methods
- // Creates function code generation object that produces
- // declaration and definition of a factory for messages of type
- // |factory_type| that belong to given |interface|
- MessageFactoryFunction(const Interface* interface,
- FunctionMessage::MessageType factory_type);
- private:
- // Types
- typedef std::vector<const FunctionMessage*> MessageList;
- private:
- // Methods
- virtual void DefineBody(std::ostream* os) const;
- void DefineCases(std::ostream* os,
- const MessageList& functions) const;
- private:
- // Fields
- const Interface* interface_;
- FunctionMessage::MessageType factory_type_;
-};
-
-} // namespace codegen
-
-#endif // CODEGEN_MESSAGE_FACTORY_FUNCTION_H
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/message_handle_with_method.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/message_handle_with_method.h
deleted file mode 100644
index 6546a38ce..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/message_handle_with_method.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CODEGEN_MESSAGE_HANDLE_WITH_METHOD_H
-#define CODEGEN_MESSAGE_HANDLE_WITH_METHOD_H
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-
-/*
- * Generates declaration and definiton of HandleWith method
- * that is required in every structure representing a message.
- * This method takes Message Handler implementation and calls
- * Appropriate function on it to handle current message.
- * (see Visitor pattern).
- */
-class MessageHandleWithMethod: public CppFunction {
-public:
- MessageHandleWithMethod(const std::string& class_name);
-
-protected:
- // CppFunction methods
- virtual void DefineBody(std::ostream* os) const;
-private:
- // Fields
- std::string class_name_;
-};
-
-} // namespace codegen
-
-#endif // CODEGEN_MESSAGE_HANDLE_WITH_METHOD_H
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/message_interface.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/message_interface.h
deleted file mode 100644
index ab309c8d8..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/message_interface.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CODEGEN_MESSAGE_INTERFACE_H
-#define CODEGEN_MESSAGE_INTERFACE_H
-
-#include "cppgen/cpp_class.h"
-#include "model/function.h"
-
-namespace codegen {
-class Interface;
-class MessageInterface;
-
-/*
- * Helper class that is used to produce code for
- * interface() method for interface-specific.
- * message base class.
- */
-class InterfaceStringIdMethod: public CppClass::Method {
- public:
- InterfaceStringIdMethod(
- const MessageInterface* message_interface,
- const Interface* interface);
- protected:
- // CppFunction interface
- void DefineBody(std::ostream* os) const;
- private:
- const Interface* interface_;
-};
-
-/*
- * Helper class that is used to produce declaration and
- * definition of interface-specific message base class
- * for messages of given type
- */
-class MessageInterface: public CppClass {
- public:
- MessageInterface(const Interface* interface,
- FunctionMessage::MessageType message_type);
- private:
- // Methods
- // CppClass interface
- virtual const MethodsList& methods();
- private:
- // Fields
- Method handle_with_method_;
- InterfaceStringIdMethod interface_string_id_method_;
- std::vector<const Method*> methods_;
-};
-
-} // namespace codegen
-
-#endif // CODEGEN_MESSAGE_INTERFACE_H
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/module_manager.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/module_manager.h
deleted file mode 100644
index d6f1ad6d2..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/module_manager.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MODULE_MANAGER_H_
-#define MODULE_MANAGER_H_
-
-#include <vector>
-
-#include "cppgen/cpp_file.h"
-#include "model/composite_type.h"
-#include "model/function.h"
-
-namespace codegen {
-class Namespace;
-
-/*
- * Manages all the source files generated for given interface.
- * Every interface is a separate module.
- * Also manages namespaces used to store generated code.
- */
-class ModuleManager {
- public:
- ModuleManager(const std::string& name);
- ~ModuleManager();
-
- /*
- * Methods that are used to find header file for entity that is being
- * generated
- */
- CppFile& HeaderForInterface();
- CppFile& HeaderForEnum(const Enum& enm);
- CppFile& HeaderForStruct(const Struct& strct);
- CppFile& HeaderForTypedef(const Typedef& tdef);
- CppFile& HeaderForFunction(const Function& function);
- CppFile& HeaderForResponse(const Response& request);
- CppFile& HeaderForNotification(const Notification& notification);
-
- /*
- * Methods that are used to find implementation file for entity that
- * is being generated
- */
- CppFile& SourceForInterface();
- CppFile& SourceForEnum(const Enum& enm);
- CppFile& SourceForStruct(const Struct& strct);
- CppFile& SourceForFunction(const Function& function);
- CppFile& SourceForResponse(const Response& request);
- CppFile& SourceForNotification(const Notification& notification);
- CppFile& SourceForValidator();
-
- /*
- * Creates and writes all the generated code to appropriate files
- */
- bool Write();
-private:
- std::string module_name_;
- CppFile enums_header_;
- CppFile enums_source_;
- CppFile structs_header_;
- CppFile structs_source_;
- CppFile functions_header_;
- CppFile functions_source_;
- CppFile interface_header_;
- CppFile interface_source_;
- CppFile additional_validation_source_;
-};
-
-} // namespace codegen
-
-#endif /* MODULE_MANAGER_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/namespace.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/namespace.h
deleted file mode 100644
index 29207313a..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/namespace.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef NAMESPACE_H_
-#define NAMESPACE_H_
-
-#include <map>
-#include <set>
-#include <sstream>
-#include <string>
-
-namespace codegen {
-
-/*
- * Represents single C++ namespace where all the declarations and definitions live.
- * Automatically generates all the namespace scope declarations,
- * type forward declarations and 'using' type import directives.
- */
-class Namespace {
- public:
- // Types
- class ForwardDeclaration;
- class ImportedName;
- public:
- // Methods
- // Constructs unnamed (anonymous) namespace
- Namespace();
- // Constructs named namespace
- explicit Namespace(const std::string& name);
- Namespace(const Namespace& that);
- ~Namespace();
- // Creates (if absent) nested namespace with |name|
- // and provides access to it.
- Namespace& nested(const std::string& name);
- // Namespace ostream, used to write actual code into namespace
- std::ostream& os();
- // Add type described with |type_name| forward declaration
- // to the top of namespace block
- void ForwardDeclare(const ForwardDeclaration& type_name);
- // Add import directive for thing described with |name| to the top
- // of the current namespace block.
- void ImportName(const ImportedName& name);
- // Write this namespace and all it's nested namespaces to the given ostream.
- void Write(std::ostream* os);
- // Name (relative) of this namespace
- const std::string& name() const;
-
- private:
- // Methods
- // Tells whether this namespace or any of it's nested namspaces
- // has non-empty list of forward declarations or using directives
- bool HasForwardDeclarations();
- // Tells whether this namespace or any of it's nested namspaces
- // has any contents
- bool HasContents();
- // Output nested namespaces's list of forward declarations and
- // 'using' import directives followed by this namespace's list of
- // forward declarations and import directives
- void WriteForwardDeclarations(std::ostream* os);
- // Writes all nested namespaces' contents followed by this namespace contents
- void WriteContents(std::ostream* os);
- // Writes namespace begin declaratoin
- void BeginNamespace(std::ostream* os);
- // Writes namespace end declaration
- void EndNamespace(std::ostream* os);
- private:
- // Types
- bool global_;
- std::string name_;
- std::set<ImportedName> imported_names_;
- std::set<ForwardDeclaration> forward_declarations_;
- std::map<std::string, Namespace> nested_;
- std::stringstream contents_;
-};
-
-/*
- * Represents namespace forward declaration item
- */
-class Namespace::ForwardDeclaration {
- public:
- // Only classes and structs can be forward-declared
- enum Type {
- kClass,
- kStruct
- };
- public:
- // Constructs forward declaration item of |type| and |name|
- ForwardDeclaration(Type type, const std::string& name);
- // Forward declarations are sorted in alphabetical order of their names
- bool operator<(const ForwardDeclaration& that) const;
- const std::string& name() const;
- Type type() const;
-
- private:
- Type type_;
- std::string name_;
-
-};
-
-/*
- * Represents single namespace import item
- */
-class Namespace::ImportedName {
- public:
- // Imports a |name| into current namespace. |name| must specify fully
- // qualified name including namespace name from which it is imported.
- // If |single_name| is false, the whole namespace is imported
- ImportedName(std::string name, bool single_name);
- // Imports are sorted by their type (single name or whole namespace)
- // then by name alphabetically
- bool operator<(const ImportedName& that) const;
- const std::string& name() const;
- bool is_single_name() const;
-
- private:
- bool single_name_;
- std::string name_;
-};
-
-
-} // namespace codegen
-
-#endif /* NAMESPACE_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/naming_convention.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/naming_convention.h
deleted file mode 100644
index b2dc2f976..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/naming_convention.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef NAMING_CONVENTION_H_
-#define NAMING_CONVENTION_H_
-
-#include <string>
-#include <vector>
-
-namespace codegen {
-class Interface;
-
-/*
- * Helper class that constructs word list from a sentence or
- * single-word identifier written in UPPER_CASE, lower_case,
- * camelCase or UpperCamelCase and provides conversion between these
- * identifier naming conventions.
- */
-class WordList {
- public:
- WordList();
- ~WordList();
- // Guess identifier naming convention and construct WordList from it
- static WordList FromUnknown(const std::string& identifier);
- // Split identifier as UPPER_CASE_ONE, also used to split
- // lower_case_identifiers
- static WordList FromUnderscoreSeparated(const std::string& identifier);
- // Split identifier as camelCase identifier or upperCamelCase
- static WordList FromCamelCase(const std::string& identifier);
- // Concatenates |that| word list to this one producing single word list
- WordList& operator+=(const WordList& that);
- // Converts word list to one of the supported identifier naming conventions
- std::string ToUpperCase() const;
- std::string ToCamelCase() const;
- std::string ToLowerCase() const;
- std::string ToUpperCamelCase() const;
- // Produces lower-case abbreviaton of a given WordList
- std::string Abbreviate() const;
-
- private:
- // Normalizes word list: all words are converted to lower case,
- // spaces are trimmed
- void Normalize();
- std::vector<std::string> words_;
-};
-
-// Capitalizes given string
-std::string Capitalize(const std::string& str);
-
-// Translate interface name to lower case
-std::string LowercaseIntefaceName(const Interface& interface);
-
-std::string UpperCamelCaseInterfaceName(const Interface& interface);
-
-// Produces namespace name for |interface|.
-// Currently it just lower_case_interface_name
-std::string InterfaceNamespaceName(const Interface& interface);
-
-} // namespace codegen
-
-#endif /* NAMING_CONVENTION_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_constructor.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_constructor.h
deleted file mode 100644
index f9665be97..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_constructor.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef STRUCT_TYPE_CONSTRUCTOR_H_
-#define STRUCT_TYPE_CONSTRUCTOR_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Struct;
-
-/*
- * Generates code of struct default constructor without parameters
- */
-class StructTypeDefaultConstructor : public CppStructConstructor {
- public:
- StructTypeDefaultConstructor(const Struct* strct);
- ~StructTypeDefaultConstructor();
- private:
-};
-
-/*
- * Generates code of struct mandatory constructor.
- * Mandatory constructor is a constructor that requires values for all
- * mandatory fields to be passed as parameters.
- */
-class StructTypeMandatoryConstructor : public CppStructConstructor {
- public:
- StructTypeMandatoryConstructor(const Struct* strct);
- ~StructTypeMandatoryConstructor();
- private:
- // CppFunction pure virtual methods implementation
- virtual void DefineBody(std::ostream* os) const;
-};
-
-} // namespace codegen
-
-#endif /* STRUCT_TYPE_CONSTRUCTOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_from_json_method.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_from_json_method.h
deleted file mode 100644
index 4cd0e188d..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_from_json_method.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef STRUCT_TYPE_FROM_JSON_METHOD_H_
-#define STRUCT_TYPE_FROM_JSON_METHOD_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Struct;
-
-/*
- * Generates struct constructor that assigns fields values taking them from
- * parsed json tree
- */
-class StructTypeFromJsonConstructor : public CppStructConstructor {
- public:
- StructTypeFromJsonConstructor(const Struct* strct);
- ~StructTypeFromJsonConstructor();
- private:
- // CppFunction pure virtual methods implementation
- virtual void DefineBody(std::ostream* os) const;
- private:
- const Struct* strct_;
-};
-
-/*
- * Generates struct method that serializes the struct fields into json tree.
- */
-class StructTypeToJsonMethod : public CppFunction {
- public:
- StructTypeToJsonMethod(const Struct* strct);
- ~StructTypeToJsonMethod();
- private:
- // CppFunction pure virtual methods implementation
- virtual void DefineBody(std::ostream* os) const;
- private:
- const Struct* strct_;
-};
-} // namespace codegen
-
-#endif /* STRUCT_TYPE_FROM_JSON_METHOD_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_initialized_method.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_initialized_method.h
deleted file mode 100644
index 631e880c1..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_initialized_method.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef STRUCT_TYPE_IS_INITIALIZED_METHOD_H_
-#define STRUCT_TYPE_IS_INITIALIZED_METHOD_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Struct;
-
-/*
- * Generates struct method that is used to tell whether at least
- * one of struct fields have been initialized
- */
-class StructTypeIsInitializedMethod : public CppFunction {
- public:
- StructTypeIsInitializedMethod(const Struct* strct);
- ~StructTypeIsInitializedMethod();
- private:
- // CppFunction pure virtual methods implementation
- virtual void DefineBody(std::ostream* os) const;
- const Struct* strct_;
-};
-
-} // namespace codegen
-
-#endif /* STRUCT_TYPE_IS_INITIALIZED_METHOD_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_valid_method.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_valid_method.h
deleted file mode 100644
index 284f7ba45..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/struct_type_is_valid_method.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef STRUCT_TYPE_IS_VALID_METHOD_H_
-#define STRUCT_TYPE_IS_VALID_METHOD_H_
-
-#include "cppgen/cpp_function.h"
-
-namespace codegen {
-class Struct;
-
-/*
- * Generates a method that is used to tell whether all the
- * struct fields have valid values
- */
-class StructTypeIsValidMethod : public CppFunction {
- public:
- StructTypeIsValidMethod(const Struct* strct);
- ~StructTypeIsValidMethod();
- private:
- // CppFunction pure virtual methods implementation
- virtual void DefineBody(std::ostream* os) const;
- const Struct* strct_;
-};
-
-/*
- * Generates empty struct method stub that is to be edited by
- * generated code user to implement additional validation that could not be
- * defined in API XML specification
- */
-class StructTypeAdditionalValidationMethod : public CppFunction {
- public:
- StructTypeAdditionalValidationMethod(const Struct* strct);
- ~StructTypeAdditionalValidationMethod();
- private:
- // CppFunction pure virtual methods implementation
- virtual void DefineBody(std::ostream* os) const;
- const Struct* strct_;
-};
-
-} // namespace codegen
-
-#endif /* STRUCT_TYPE_IS_VALID_METHOD_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/include/cppgen/type_name_code_generator.h b/SDL_Core/tools/intergen/cppgen/include/cppgen/type_name_code_generator.h
deleted file mode 100644
index eb92dc88a..000000000
--- a/SDL_Core/tools/intergen/cppgen/include/cppgen/type_name_code_generator.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TYPE_NAME_CODE_GENERATOR_H_
-#define TYPE_NAME_CODE_GENERATOR_H_
-
-#include "model/type.h"
-
-#include <sstream>
-
-namespace codegen {
-class Interface;
-class Type;
-
-/*
- * These visitor classes are used to generate C++ type name for given
- * model types.
- */
-
-/*
- * Generates primitive or STL type name for given model type.
- * Used to generate struct constructor parameters.
- */
-class TypeNameGenerator: public TypeCodeGenerator {
- public:
- // Generates primitive type name for |type|.
- // |interface| specifies the interface where code is currently
- // being generated. Depending on that relative or fully qualified
- // type names are generated.
- // Generates type name can be accessed with result() method.
- TypeNameGenerator(const Interface* interface,
- const Type* type);
- ~TypeNameGenerator();
- // Generated type name
- std::string result() const;
- private:
- virtual void GenerateCodeForBoolean(const Boolean* boolean);
- virtual void GenerateCodeForInteger(const Integer* integer);
- virtual void GenerateCodeForFloat(const Float* flt);
- virtual void GenerateCodeForString(const String* string);
- virtual void GenerateCodeForEnum(const Enum* enm);
- virtual void GenerateCodeForArray(const Array* array);
- virtual void GenerateCodeForMap(const Map* map);
- virtual void GenerateCodeForStruct(const Struct* strct);
- virtual void GenerateCodeForTypedef(const Typedef* tdef);
- private:
- const Interface* interface_;
- bool prefer_reference_type_;
- std::stringstream os_;
-};
-
-/*
- * Generates type name from rpc_base template library.
- * Used to define struct fields.
- */
-class RpcTypeNameGenerator: public TypeCodeGenerator {
- public:
- // Types
- // Availability class to wrap type into
- enum Availability {
- kUnspecified,
- kMandatory,
- kOptional
- };
- public:
- // Generates name of type that is able to validate given primitive value
- // |interface| specifies the interface where code is currently
- // being generated. Depending on that relative or fully qualified
- // type names are generated.
- // Depending on |availability| option optionally wraps declaration into
- // Mandatory or Optional template
- RpcTypeNameGenerator(const Interface* interface,
- const Type* type,
- Availability availability);
- ~RpcTypeNameGenerator();
- // Generated type name
- std::string result() const;
- private:
- // TypeCodeGenerator methods
- virtual void GenerateCodeForBoolean(const Boolean* boolean);
- virtual void GenerateCodeForInteger(const Integer* integer);
- virtual void GenerateCodeForFloat(const Float* flt);
- virtual void GenerateCodeForString(const String* string);
- virtual void GenerateCodeForEnum(const Enum* enm);
- virtual void GenerateCodeForArray(const Array* array);
- virtual void GenerateCodeForMap(const Map* map);
- virtual void GenerateCodeForStruct(const Struct* strct);
- virtual void GenerateCodeForTypedef(const Typedef* tdef);
- private:
- // Wraps type declaration with "Mandatory" or "Optional" templates
- // returns true if type name was wrapped (and thus fully generated).
- bool MaybeWrapWithAvailabilitySpecifier(const Type* type);
-private:
- const Interface* interface_;
- bool skip_availaiblity_specifier_;
- bool mandatory_;
- std::stringstream os_;
-};
-
-/*
- * Not a real code generator but helper class that is used to collect
- * properties of composite types
- */
-class TypeProperties: public TypeCodeGenerator {
-public:
- TypeProperties(const Type* type);
- // Tells whether type is map, array or typedef alias of map or array
- bool is_container() const;
-
-private:
- // TypeCodeGenerator methods
- virtual void GenerateCodeForBoolean(const Boolean* boolean);
- virtual void GenerateCodeForInteger(const Integer* integer);
- virtual void GenerateCodeForFloat(const Float* flt);
- virtual void GenerateCodeForString(const String* string);
- virtual void GenerateCodeForEnum(const Enum* enm);
- virtual void GenerateCodeForArray(const Array* array);
- virtual void GenerateCodeForMap(const Map* map);
- virtual void GenerateCodeForStruct(const Struct* strct);
- virtual void GenerateCodeForTypedef(const Typedef* tdef);
-private:
- bool container_;
-};
-
-} // namespace codegen
-
-#endif /* TYPE_NAME_CODE_GENERATOR_H_ */
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/comment.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/comment.cc
deleted file mode 100644
index f6bf2ef93..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/comment.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/comment.h"
-
-#include <iostream>
-#include <ostream>
-#include <sstream>
-
-#include "utils/string_utils.h"
-
-using std::endl;
-using std::string;
-using std::stringstream;
-
-namespace codegen {
-
-Comment::Comment(const Description& description) {
- for (Description::const_iterator i = description.begin();
- i != description.end(); ++i) {
- stringstream str(*i);
- string line;
- while (std::getline(str, line)) {
- line = trim(line);
- if (!line.empty()) {
- description_.push_back(line);
- }
- }
- }
-}
-
-Comment::Comment(const std::string& text) {
- description_.push_back(text);
-}
-
-Comment::~Comment() {
-}
-
-} // namespace codegen
-
-std::ostream& codegen::operator <<(std::ostream& os, const Comment& comment) {
- if (!comment.description_.empty()) {
- if (comment.description_.size() == 1) {
- os << "// " << comment.description_.front();
- } else {
- os << "/* ";
- for (Description::const_iterator i = comment.description_.begin(), end =
- comment.description_.end(); i != end; ++i) {
- os << *i << " ";
- }
- os << "*/";
- }
- }
- return os;
-}
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_api_code_generator.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_api_code_generator.cc
deleted file mode 100644
index 3a4ccd022..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_api_code_generator.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/cpp_api_code_generator.h"
-
-#include <iostream>
-
-#include "cppgen/cpp_file.h"
-#include "cppgen/cpp_interface_code_generator.h"
-#include "cppgen/module_manager.h"
-#include "cppgen/naming_convention.h"
-#include "model/api.h"
-#include "model/interface.h"
-
-using std::cout;
-
-namespace codegen {
-
-CppApiCodeGenerator::CppApiCodeGenerator(const API* api)
- : api_(api) {
-}
-
-CppApiCodeGenerator::~CppApiCodeGenerator() {
-}
-
-std::set<std::string> codegen::CppApiCodeGenerator::Generate(
- const std::set<std::string>& required_interfaces) {
- std::set<std::string> problematic_interafces = required_interfaces;
- const std::vector<Interface*>& interfaces = api_->interfaces();
- for (std::vector<Interface*>::const_iterator i = interfaces.begin(), end =
- interfaces.end(); i != end; ++i) {
- const Interface* intf = *i;
- std::string interface_name = LowercaseIntefaceName(*intf);
- if (!required_interfaces.empty()) {
- // If interface list provided, skip unneeded interfaces
- if (required_interfaces.count(interface_name) == 0) {
- continue;
- }
- }
-
- if (GenerateInterface(intf)) {
- // Mark this interface as sucessfully generated
- problematic_interafces.erase(interface_name);
- }
- }
- return problematic_interafces;
-}
-
-bool CppApiCodeGenerator::GenerateInterface(const Interface* interface) {
- ModuleManager mgr(LowercaseIntefaceName(*interface));
- CppInterfaceCodeGenerator interface_generator(interface, &mgr);
- interface_generator.GenerateCode();
- return mgr.Write();
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_class.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_class.cc
deleted file mode 100644
index d2fd9fa4f..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_class.cc
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/cpp_class.h"
-
-#include <algorithm>
-
-#include "cppgen/cpp_function.h"
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-
-using std::endl;
-using std::ostream;
-using std::string;
-using typesafe_format::strmfmt;
-
-
-namespace codegen {
-
-namespace {
-
-// Produces C++ literals for given access specifier
-const char* AccessSpecName(CppClass::AccessSpec access) {
- switch (access) {
- case CppClass::kPublic:
- return "public";
- case CppClass::kPrivate:
- return "private";
- case CppClass::kProtected:
- return "protected";
- default:
- assert(!"Invalid access specifier");
- return "";
- }
-}
-
-/*
- * Helper class that automatically declares section inside
- * C++ class declaration and manages indentation
- */
-class Section {
- struct SectionDeclarer {
- SectionDeclarer(const char* name, ostream* os) {
- *os << " " << name << ":" << endl;
- }
- };
- public:
- Section(const char* name, ostream* os)
- : declarer_(name, os),
- indent_(*os) {
- }
- private:
- SectionDeclarer declarer_;
- Indent indent_;
-};
-
-void DeclareMethods(const CppClass::MethodsList& method_list,
- ostream* os, bool in_class) {
- for (CppClass::MethodsList::const_iterator i = method_list.begin(),
- end = method_list.end(); i != end; ++i) {
- const CppClass::Method* method = *i;
- method->Declare(os, in_class);
- }
-}
-
-void DefineMethods(const CppClass::MethodsList& method_list,
- ostream* os) {
- for (CppClass::MethodsList::const_iterator i = method_list.begin(),
- end = method_list.end(); i != end; ++i) {
- const CppClass::Method* method = *i;
- method->Define(os, false);
- }
-}
-
-} // namespace
-
-CppClass::CppClass(const string& name)
- : name_(name) {
-}
-
-CppClass::~CppClass() {
-}
-
-void CppClass::Add(const CppClass::Superclass& superclass) {
- superclasses_.push_back(superclass);
-}
-
-void CppClass::Declare(ostream* os) {
- strmfmt(*os, "class {0}{1} ",
- name_, superclasses_.empty() ? "" : ":");
- for (SuperclassList::const_iterator i = superclasses_.begin(),
- end = superclasses_.end(); i != end; ++i) {
- strmfmt(*os, "{0} {1}",
- AccessSpecName(i->inheritance_type()),
- i->name());
- }
- *os << " {\n";
- MethodsList public_methods = functions(kPublic);
- if (!public_methods.empty()) {
- Section pub("public", os);
- DeclareMethods(public_methods, os, true);
- }
- MethodsList protected_methods = functions(kProtected);
- if (!protected_methods.empty()) {
- Section prot("protected", os);
- DeclareMethods(protected_methods, os, true);
- }
- MethodsList private_methods = functions(kPrivate);
- if (!private_methods.empty()) {
- Section priv("private", os);
- DeclareMethods(private_methods, os, true);
- }
- *os << "};\n";
-}
-
-void CppClass::Define(std::ostream* os) {
- DefineMethods(functions(kPublic), os);
- DefineMethods(functions(kProtected), os);
- DefineMethods(functions(kPrivate), os);
-}
-
-std::string CppClass::name() const {
- return name_;
-}
-
-CppClass::MethodsList CppClass::functions(
- CppClass::AccessSpec access_spec) {
- std::vector<const CppClass::Method*> specific_methods;
- const std::vector<const CppClass::Method*>& all_methods = methods();
- for (MethodsList::const_iterator i = all_methods.begin(),
- end = all_methods.end(); i != end; ++i) {
- const Method* method = *i;
- if (method->access_specifier() == access_spec) {
- specific_methods.push_back(method);
- }
- }
- return specific_methods;
-}
-
-CppClass::Method::Method(const CppClass* cls, AccessSpec access,
- const std::string& name,
- const std::string& return_type_name,
- int qualifiers)
- : CppFunction(cls->name(), name, return_type_name, qualifiers),
- access_specifier_(access){
-}
-
-CppClass::AccessSpec CppClass::Method::access_specifier() const {
- return access_specifier_;
-}
-
-CppClass::Superclass::Superclass(const std::string& name,
- AccessSpec inheritance_type)
- : name_(name),
- inheritance_type_(inheritance_type) {
-
-}
-CppClass::AccessSpec CppClass::Superclass::inheritance_type() const {
- return inheritance_type_;
-}
-
-const std::string& CppClass::Superclass::name() const {
- return name_;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_file.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_file.cc
deleted file mode 100644
index 509265445..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_file.cc
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/cpp_file.h"
-
-#include <cassert>
-#include <ostream>
-
-#include "cppgen/naming_convention.h"
-#include "model/interface.h"
-#include "model/type.h"
-#include "utils/safeformat.h"
-
-using std::ostream;
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-namespace {
-const char* kAutoGeneratedComment = "// This file is generated, do not edit";
-
-// This class is used to find and automatically include appropriate
-// header file where given type is defined
-class IncludeTypeHelper: public TypeCodeGenerator {
- public:
- // Constructs include helper and immediately includes
- // appropriate header file for passed |type|
- // into |cpp_file|
- IncludeTypeHelper(CppFile* cpp_file, const Type* type);
- private:
- // Methods
- // Returns interface name where given |type| is defined
- // Accepts Enum, Struct or Typedef types.
- template<class T>
- std::string GetTypeInterfaceName(const T* type);
- // TypeCodeGenerator interface
- virtual void GenerateCodeForArray(const Array* array);
- virtual void GenerateCodeForMap(const Map* map);
- virtual void GenerateCodeForEnum(const Enum* enm);
- virtual void GenerateCodeForStruct(const Struct* strct);
- virtual void GenerateCodeForTypedef(const Typedef* tdef);
- private:
- // Fields
- CppFile* cpp_file_;
-};
-
-IncludeTypeHelper::IncludeTypeHelper(CppFile* cpp_file, const Type* type)
- : cpp_file_(cpp_file) {
- type->Apply(this);
-}
-
-template<class T>
-std::string IncludeTypeHelper::GetTypeInterfaceName(const T* type) {
- return LowercaseIntefaceName(type->interface());
-}
-
-void IncludeTypeHelper::GenerateCodeForArray(const Array* array) {
- array->type()->Apply(this);
-}
-
-void IncludeTypeHelper::GenerateCodeForMap(const Map* map) {
- map->type()->Apply(this);
-}
-
-void IncludeTypeHelper::GenerateCodeForEnum(const Enum *enm) {
- cpp_file_->Include(CppFile::Header(
- GetTypeInterfaceName(enm) + "/enums.h",
- true));
-}
-
-void IncludeTypeHelper::GenerateCodeForStruct(const Struct* strct) {
- cpp_file_->Include(CppFile::Header(
- GetTypeInterfaceName(strct) + "/types.h",
- true));
-}
-
-void IncludeTypeHelper::GenerateCodeForTypedef(const Typedef* tdef) {
- cpp_file_->Include(CppFile::Header(
- GetTypeInterfaceName(tdef) + "/types.h",
- true));
-}
-
-}
-
-CppFile::CppFile(const std::string& file_name, const std::string& module_name,
- bool write_guards)
- : write_guards_(write_guards),
- file_name_(file_name),
- module_name_(module_name) {
-}
-
-CppFile::~CppFile() {
-}
-
-const std::string& CppFile::file_name() const {
- return file_name_;
-}
-
-void CppFile::Include(const Header& header) {
- headers_.insert(header);
-}
-
-void CppFile::IncludeType(const Type& type) {
- IncludeTypeHelper(this, &type);
-}
-
-void CppFile::Write(std::ostream* os) {
- std::string guard_name =
- WordList::FromUnknown(module_name_+"_"+file_name_).ToUpperCase() + "_";
- *os << kAutoGeneratedComment << endl;
- if (write_guards_) {
- *os << "#ifndef " << guard_name << endl;
- *os << "#define " << guard_name << endl;
- }
- for (std::set<Header>::iterator i = headers_.begin(), end = headers_.end();
- i != end; ++i) {
- if (i->is_local()) {
- strmfmt(*os, "#include \"{0}\"", i->name()) << endl;
- } else {
- strmfmt(*os, "#include <{0}>", i->name()) << endl;
- }
- }
- global_namespace_.Write(os);
- if (write_guards_) {
- *os << "#endif // " << guard_name << endl;
- }
-}
-
-bool CppFile::Header::is_local() const {
- return local_;
-}
-
-const std::string& CppFile::Header::name() const {
- return name_;
-}
-
-CppFile::Header::Header(const std::string& name, bool local)
- : name_(name),
- local_(local) {
-}
-
-bool CppFile::Header::operator <(const Header& that) const {
- if (this->local_ != that.local_) {
- return int(this->local_) < int(that.local_);
- }
- return this->name_ < that.name_;
-}
-
-Namespace& CppFile::global_namespace() {
- return global_namespace_;
-}
-
-Namespace& CppFile::module_namespace() {
- return
- module_name_.empty() ?
- global_namespace() : global_namespace().nested("rpc").nested(module_name_);
-}
-
-Namespace& CppFile::types_ns() {
- return module_namespace();
-}
-
-Namespace& CppFile::requests_ns() {
- return module_namespace().nested("request");
-}
-
-Namespace& CppFile::responses_ns() {
- return module_namespace().nested("response");
-}
-
-Namespace& CppFile::notifications_ns() {
- return module_namespace().nested("notification");
-}
-
-Namespace& CppFile::NamespaceByMessageType(FunctionMessage::MessageType type) {
- switch(type) {
- case FunctionMessage::kRequest:
- return requests_ns();
- case FunctionMessage::kResponse:
- return responses_ns();
- case FunctionMessage::kNotification:
- return notifications_ns();
- default:
- assert(!"Invalid message type");
- return global_namespace();
- }
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_function.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_function.cc
deleted file mode 100644
index 67364a257..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_function.cc
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/cpp_function.h"
-
-#include <cassert>
-#include <ostream>
-
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-
-using std::endl;
-using std::ostream;
-using std::string;
-using std::vector;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-CppFunction::CppFunction(const string& class_name, const string& name,
- const string& return_type_name, int qualifiers)
- : qualifiers_(qualifiers),
- class_name_(class_name),
- name_(name),
- return_type_name_(return_type_name) {
- assert(!((qualifiers & kVirtual) && (qualifiers & kStatic)));
-}
-
-CppFunction::~CppFunction() {
-}
-
-CppFunction::Parameter::Parameter(const string& name, const string& type_name)
- : name(name),
- type_name(type_name) {
-}
-
-CppFunction::Parameter::~Parameter() {
-}
-
-CppFunction::OptionalParameter::OptionalParameter(
- const std::string& name, const std::string& type_name,
- const std::string& default_value)
- : Parameter(name, type_name),
- default_value(default_value) {
-}
-
-CppFunction::OptionalParameter::~OptionalParameter() {
-}
-
-codegen::CppFunction::Initializer::Initializer(const std::string& field_name,
- const std::string& initializer)
- : field_name(field_name),
- initializer(initializer) {
-}
-
-codegen::CppFunction::Initializer::~Initializer() {
-}
-
-void CppFunction::Add(const Parameter& parameter) {
- parameters_.push_back(parameter);
-}
-
-void CppFunction::Add(const OptionalParameter& parameter) {
- optional_params_.push_back(parameter);
-}
-
-void CppFunction::Declare(ostream* os, bool in_class) const {
- WriteFunctionPrototype(os, in_class, true);
- if (qualifiers_ & kAbstract) {
- *os << " = 0";
- }
- *os << ";" << endl;
-}
-
-void CppFunction::Define(ostream* os, bool in_class) const {
- // No definitions for abstract functions
- if (qualifiers_ & kAbstract)
- return;
- WriteFunctionPrototype(os, in_class, false);
- if (!initializers_.empty()) {
- *os << endl;
- WriteInitializerList(os);
- }
- *os << " {" << endl;
- {
- Indent indent(*os);
- DefineBody(os);
- }
- *os << "}" << endl;
-}
-
-void CppFunction::Add(const Initializer& initializer) {
- initializers_.push_back(initializer);
-}
-
-bool CppFunction::has_mandatory_parameters() const {
- return !parameters_.empty();
-}
-
-void CppFunction::WriteInitializerList(std::ostream* os) const {
- bool first = true;
- Indent indent1(*os), indent2(*os);
- for (std::vector<Initializer>::const_iterator i = initializers_.begin(), end =
- initializers_.end(); i != end; ++i) {
- bool last = i == end - 1;
- *os << (first ? ": " : " ");
- strmfmt(*os, "{0}({1})", i->field_name, i->initializer);
- if (!last) {
- *os << "," << endl;
- }
- first = false;
- }
-}
-
-void CppFunction::DefineBody(std::ostream *os) const {
-}
-
-void CppFunction::WriteFunctionPrototype(ostream* os, bool in_class,
- bool default_values) const {
- if (in_class && (qualifiers_ & kExplicit)) {
- if (parameters_.size() == 1) {
- *os << "explicit ";
- }
- } else if (in_class && (qualifiers_ & kStatic)) {
- *os << "static ";
- } else if (in_class && (qualifiers_ & kVirtual)) {
- *os << "virtual ";
- }
- if (!return_type_name_.empty()) {
- *os << return_type_name_ << " ";
- }
- if (!in_class && !class_name_.empty()) {
- *os << class_name_ << "::";
- }
- *os << name_ << "(";
- bool separate = false;
- for (vector<Parameter>::const_iterator i = parameters_.begin();
- i != parameters_.end(); ++i) {
- if (separate) {
- *os << ", ";
- }
- *os << i->type_name << " " << i->name;
- separate = true;
- }
- for (vector<OptionalParameter>::const_iterator i = optional_params_.begin();
- i != optional_params_.end(); ++i) {
- if (separate) {
- *os << ", ";
- }
- *os << i->type_name << " " << i->name;
- if (default_values) {
- *os << " = " << i->default_value;
- }
- separate = true;
- }
- *os << ")";
- if (qualifiers_ & kConst) {
- *os << " const";
- }
- if (qualifiers_ & kVolatile) {
- *os << " volatile";
- }
-}
-
-CppStructConstructor::CppStructConstructor(const std::string& type_name)
- : CppFunction(type_name, type_name, "", kExplicit) {
-}
-
-CppStructConstructor::~CppStructConstructor() {
-}
-
-CppStructDestructor::CppStructDestructor(const std::string& type_name,
- bool abstract)
- : CppFunction(type_name, "~" + type_name, "", abstract ? kAbstract : 0) {
-}
-
-CppStructDestructor::~CppStructDestructor() {
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc
deleted file mode 100644
index 88b0aca1c..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/cpp_interface_code_generator.h"
-
-#include "cppgen/handler_interface.h"
-#include "cppgen/message_interface.h"
-#include "cppgen/message_factory_function.h"
-#include "cppgen/module_manager.h"
-#include "model/interface.h"
-#include "model/type_registry.h"
-
-namespace codegen {
-
-CppInterfaceCodeGenerator::CppInterfaceCodeGenerator(
- const Interface* interface,
- ModuleManager* module_manager)
- : interface_(interface),
- module_manager_(module_manager),
- declaration_generator_(module_manager_),
- definition_generator_(module_manager_) {
-}
-
-CppInterfaceCodeGenerator::~CppInterfaceCodeGenerator() {
-}
-
-void CppInterfaceCodeGenerator::GenerateCode() {
- GenerateEnums();
- GenerateTypedefs();
- GenerateStructs();
- bool type_only_interface =
- interface_->function_id_enum()->constants().empty();
- if (!type_only_interface) {
- GenerateFunctions();
- GenerateResponses();
- GenerateNotifications();
- GenerateHandlerInterfaces();
- GenerateMessageBaseClasses();
- GenerateMessageFactories();
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateEnums() {
- const Interface::EnumList& enums = interface_->enums();
- for (Interface::EnumList::const_iterator i = enums.begin(), end = enums.end();
- i != end; ++i) {
- const Enum* e = *i;
- declaration_generator_.GenerateCodeForEnum(e);
- definition_generator_.GenerateCodeForEnum(e);
- }
-
- const Enum* func_id_enum = interface_->function_id_enum();
- // Not all interfaces declare functions, avoid empty enum generation
- if (!func_id_enum->constants().empty()) {
- declaration_generator_.GenerateCodeForEnum(func_id_enum);
- definition_generator_.GenerateCodeForEnum(func_id_enum);
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateStructs() {
- const Interface::StructList& structs = interface_->structs();
- for (Interface::StructList::const_iterator i = structs.begin(), end = structs
- .end(); i != end; ++i) {
- const Struct* s = *i;
- declaration_generator_.GenerateCodeForStruct(s);
- definition_generator_.GenerateCodeForStruct(s);
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateTypedefs() {
- const Interface::TypedefList& typedefs = interface_->typedefs();
- for (Interface::TypedefList::const_iterator i = typedefs.begin(), end =
- typedefs.end(); i != end; ++i) {
- const Typedef* tdef = *i;
- declaration_generator_.GenerateCodeForTypedef(tdef);
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateFunctions() {
- const Interface::FunctionsList& functions = interface_->functions();
- for (Interface::FunctionsList::const_iterator i = functions.begin(), end =
- functions.end(); i != end; ++i) {
- const Function& function = *i;
- declaration_generator_.GenerateCodeForFunction(function);
- definition_generator_.GenerateCodeForFunction(function);
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateResponses() {
- const Interface::ResponseList& responses = interface_->generic_responses();
- for (Interface::ResponseList::const_iterator i = responses.begin(), end =
- responses.end(); i != end; ++i) {
- const Response& response = **i;
- declaration_generator_.GenerateCodeForResponse(response);
- definition_generator_.GenerateCodeForResponse(response);
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateNotifications() {
- const Interface::NotificationList& notifications =
- interface_->notifications();
- for (Interface::NotificationList::const_iterator i = notifications.begin(),
- end = notifications.end(); i != end; ++i) {
- const Notification& notification = **i;
- declaration_generator_.GenerateCodeForNotification(notification);
- definition_generator_.GenerateCodeForNotification(notification);
- }
-}
-
-void CppInterfaceCodeGenerator::GenerateHandlerInterfaces() {
- CppFile& handler_header = module_manager_->HeaderForInterface();
- CppFile& handler_source = module_manager_->SourceForInterface();
- HandlerInterface notif_handler(
- FunctionMessage::kNotification, interface_, &handler_header);
- notif_handler.Declare(&handler_header.notifications_ns().os());
- notif_handler.Define(&handler_source.notifications_ns().os());
-
- HandlerInterface req_handler(
- FunctionMessage::kRequest, interface_, &handler_header);
- req_handler.Declare(&handler_header.requests_ns().os());
- req_handler.Define(&handler_source.requests_ns().os());
-
- HandlerInterface resp_handler(
- FunctionMessage::kResponse, interface_, &handler_header);
- resp_handler.Declare(&handler_header.responses_ns().os());
- resp_handler.Define(&handler_source.responses_ns().os());
-}
-
-void CppInterfaceCodeGenerator::GenerateMessageBaseClasses() {
- CppFile& message_base_header = module_manager_->HeaderForInterface();
- CppFile& message_base_source = module_manager_->SourceForInterface();
- MessageInterface notif_message(interface_, FunctionMessage::kNotification);
- notif_message.Declare(&message_base_header.notifications_ns().os());
- notif_message.Define(&message_base_source.notifications_ns().os());
-
- MessageInterface request_message(interface_, FunctionMessage::kRequest);
- request_message.Declare(&message_base_header.requests_ns().os());
- request_message.Define(&message_base_source.requests_ns().os());
-
- MessageInterface response_message(interface_, FunctionMessage::kResponse);
- response_message.Declare(&message_base_header.responses_ns().os());
- response_message.Define(&message_base_source.responses_ns().os());
-}
-
-void CppInterfaceCodeGenerator::GenerateMessageFactories() {
- CppFile& factories_header = module_manager_->HeaderForInterface();
- CppFile& factories_source = module_manager_->SourceForInterface();
-
- MessageFactoryFunction request_factory(interface_,
- FunctionMessage::kRequest);
- request_factory.Declare(&factories_header.requests_ns().os(), true);
- request_factory.Define(&factories_source.requests_ns().os(), true);
- MessageFactoryFunction response_factory(interface_,
- FunctionMessage::kResponse);
- response_factory.Declare(&factories_header.responses_ns().os(), true);
- response_factory.Define(&factories_source.responses_ns().os(), true);
- MessageFactoryFunction notification_factory(
- interface_,
- FunctionMessage::kNotification);
- notification_factory.Declare(&factories_header.notifications_ns().os(),
- true);
- notification_factory.Define(&factories_source.notifications_ns().os(), true);
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/declaration_generator.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/declaration_generator.cc
deleted file mode 100644
index eb52b3590..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/declaration_generator.cc
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/declaration_generator.h"
-
-#include <ostream>
-#include <memory>
-
-#include "cppgen/comment.h"
-#include "cppgen/cpp_file.h"
-#include "cppgen/enum_from_json_value_function.h"
-#include "cppgen/enum_to_json_value_function.h"
-#include "cppgen/function_id_method.h"
-#include "cppgen/generator_preferences.h"
-#include "cppgen/is_valid_enum_function.h"
-#include "cppgen/literal_generator.h"
-#include "cppgen/message_handle_with_method.h"
-#include "cppgen/module_manager.h"
-#include "cppgen/struct_type_constructor.h"
-#include "cppgen/struct_type_from_json_method.h"
-#include "cppgen/struct_type_is_initialized_method.h"
-#include "cppgen/struct_type_is_valid_method.h"
-#include "cppgen/type_name_code_generator.h"
-#include "model/composite_type.h"
-#include "model/constant.h"
-#include "model/function.h"
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-
-using std::endl;
-using std::ostream;
-using std::string;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-namespace {
-
-class Section {
- struct SectionDeclarer {
- SectionDeclarer(const char* name, ostream* os) {
- *os << " " << name << ":" << endl;
- }
- };
- public:
- Section(const char* name, ostream* os)
- : declarer_(name, os),
- indent_(*os) {
- }
- private:
- SectionDeclarer declarer_;
- Indent indent_;
-};
-
-void DeclareStructureBegin(ostream& o, const string& name,
- const string& base_type, const Comment& comment) {
- o << comment << endl;
- strmfmt(o, "struct {0}{1} {",
- name,
- base_type.empty() ? "" : " : " + base_type) << endl;
-}
-
-}
-
-DeclarationGenerator::DeclarationGenerator(ModuleManager* module_manager)
- : module_manager_(module_manager) {
-}
-
-DeclarationGenerator::~DeclarationGenerator() {
-}
-
-void DeclarationGenerator::GenerateCodeForEnum(const Enum* enm) {
- CppFile& header_file = module_manager_->HeaderForEnum(*enm);
- ostream& o = header_file.types_ns().os();
- o << Comment(enm->description()) << endl;
- o << "enum " << enm->name() << " {" << endl;
- const Enum::ConstantsList& constants = enm->constants();
- {
- Indent indent(o);
- for (Enum::ConstantsList::const_iterator i = constants.begin(), end =
- constants.end(); i != end; ++i) {
- const Enum::Constant& enum_constant = *i;
- GenerateCodeForEnumConstant(enum_constant, &header_file, false);
- }
- }
- o << "};" << endl;
- IsValidEnumFunction(enm).Declare(&o, false);
- EnumToJsonValueFunction(enm).Declare(&o, false);
- EnumFromJsonValueFunction(enm).Declare(&o, false);
- o << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForStruct(const Struct* strct) {
- CppFile& header_file = module_manager_->HeaderForStruct(*strct);
- header_file.global_namespace().nested("Json").ForwardDeclare(
- Namespace::ForwardDeclaration(Namespace::ForwardDeclaration::kClass, "Value"));
- ostream& o = header_file.types_ns().os();
- DeclareStructureBegin(o, strct->name(), "",
- Comment(strct->description()));
- {
- Section pub("public", &o);
- GenerateCodeForStructFields(*strct, &header_file, &header_file.types_ns());
- }
- {
- Section pub("public", &o);
- StructTypeDefaultConstructor(strct).Declare(&o, true);
- StructTypeMandatoryConstructor mandatory_constructor(strct);
- StructTypeFromJsonConstructor(strct).Declare(&o , true);
- if (mandatory_constructor.has_mandatory_parameters()) {
- mandatory_constructor.Declare(&o, true);
- }
- CppStructDestructor(strct->name()).Declare(&o, true);
- StructTypeIsValidMethod(strct).Declare(&o, true);
- StructTypeIsInitializedMethod(strct).Declare(&o, true);
- StructTypeToJsonMethod(strct).Declare(&o , true);
- }
- {
- Section priv("private", &o);
- StructTypeAdditionalValidationMethod(strct).Declare(&o, true);
-
- }
- o << "};" << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForTypedef(const Typedef* tdef) {
- CppFile& header_file = module_manager_->HeaderForTypedef(*tdef);
- Namespace& types_ns = header_file.types_ns();
- TypeForwardDeclarator(&types_ns, tdef->type());
- types_ns.os() << Comment(tdef->description()) << '\n';
- strmfmt(types_ns.os(), "typedef {0} {1};",
- RpcTypeNameGenerator(&tdef->interface(),
- tdef->type(),
- RpcTypeNameGenerator::kUnspecified).result(),
- tdef->name())
- << '\n';
-}
-
-void DeclarationGenerator::GenerateCodeForEnumConstant(
- const Enum::Constant& enm, CppFile* header_file, bool skip_coma) {
- ostream& o = header_file->types_ns().os();
- o << LiteralGenerator(enm).result();
- if (enm.is_value_explicit()) {
- o << " = " << enm.value();
- }
- if (!skip_coma) {
- o << ",";
- }
- o << " " << Comment(enm.description()) << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForStructField(
- const Struct& strct,
- const Struct::Field& field,
- CppFile* header_file,
- Namespace* name_space) {
- ostream& o = name_space->os();
- RpcTypeNameGenerator::Availability availability =
- field.default_value() || field.is_mandatory() ?
- RpcTypeNameGenerator::kMandatory : RpcTypeNameGenerator::kOptional;
- header_file->IncludeType(*field.type());
- o << RpcTypeNameGenerator(&strct.interface(),
- field.type(),
- availability).result();
- o << " " << field.name() << ";";
- if (!field.description().empty()) {
- o << " " << Comment(field.description());
- }
- o << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForFunction(const Function& function) {
- CppFile& header_file = module_manager_->HeaderForFunction(function);
-
- GenerateCodeForRequest(function.request(), &header_file);
- GenerateCodeForResponse(function.response());
-}
-
-void DeclarationGenerator::GenerateCodeForRequest(const Request& request,
- CppFile* header_file) {
- header_file->global_namespace().nested("Json").ForwardDeclare(
- Namespace::ForwardDeclaration(Namespace::ForwardDeclaration::kClass, "Value"));
- Namespace& requests_ns = header_file->requests_ns();
- ostream& o = requests_ns.os();
- DeclareStructureBegin(o, request.name(), "Request",
- Comment(request.description()));
- {
- Section pub("public", &o);
- strmfmt(o, "typedef {0}::{1} ResponseType;",
- header_file->responses_ns().name(), request.name()) << endl;
- GenerateCodeForStructFields(request,
- header_file,
- &header_file->requests_ns());
- }
- {
- Section pub("public", &o);
- StructTypeDefaultConstructor(&request).Declare(&o, true);
- StructTypeMandatoryConstructor mandatory_constructor(&request);
- StructTypeFromJsonConstructor(&request).Declare(&o , true);
- if (mandatory_constructor.has_mandatory_parameters()) {
- mandatory_constructor.Declare(&o, true);
- }
- CppStructDestructor(request.name()).Declare(&o, true);
- StructTypeIsValidMethod(&request).Declare(&o, true);
- StructTypeIsInitializedMethod(&request).Declare(&o, true);
- StructTypeToJsonMethod(&request).Declare(&o , true);
- MessageHandleWithMethod(request.name()).Declare(&o, true);
- FunctionIdMethod(&request).Define(&o, true);
- FunctionStringIdMethod(&request).Define(&o, true);
- }
- {
- Section priv("private", &o);
- StructTypeAdditionalValidationMethod(&request).Declare(&o, true);
- }
-
- o << "};" << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForResponse(const Response& response) {
- CppFile& header_file = module_manager_->HeaderForResponse(response);
- header_file.global_namespace().nested("Json").ForwardDeclare(
- Namespace::ForwardDeclaration(Namespace::ForwardDeclaration::kClass, "Value"));
- Namespace& responses_ns = header_file.responses_ns();
- ostream& o = responses_ns.os();
- DeclareStructureBegin(o, response.name(), "Response",
- Comment(response.description()));
- {
- Section pub("public", &o);
- GenerateCodeForStructFields(response,
- &header_file,
- &header_file.responses_ns());
- }
- {
- Section pub("public", &o);
- StructTypeDefaultConstructor(&response).Declare(&o, true);
- StructTypeMandatoryConstructor mandatory_constructor(&response);
- StructTypeFromJsonConstructor(&response).Declare(&o, true);
- if (mandatory_constructor.has_mandatory_parameters()) {
- mandatory_constructor.Declare(&o, true);
- }
- CppStructDestructor(response.name()).Declare(&o, true);
- StructTypeIsValidMethod(&response).Declare(&o, true);
- StructTypeIsInitializedMethod(&response).Declare(&o, true);
- StructTypeToJsonMethod(&response).Declare(&o , true);
- MessageHandleWithMethod(response.name()).Declare(&o, true);
- FunctionIdMethod(&response).Define(&o, true);
- FunctionStringIdMethod(&response).Define(&o, true);
- }
- {
- Section priv("private", &o);
- StructTypeAdditionalValidationMethod(&response).Declare(&o, true);
- }
-
- o << "};" << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForNotification(
- const Notification& notification) {
- CppFile& header_file = module_manager_->HeaderForNotification(notification);
- header_file.global_namespace().nested("Json").ForwardDeclare(
- Namespace::ForwardDeclaration(Namespace::ForwardDeclaration::kClass, "Value"));
- Namespace& notifications_ns = header_file.notifications_ns();
- ostream& o = notifications_ns.os();
- DeclareStructureBegin(o, notification.name(), "Notification",
- Comment(notification.description()));
- {
- Section pub("public", &o);
- GenerateCodeForStructFields(notification,
- &header_file,
- &header_file.notifications_ns());
- }
- {
- Section pub("public", &o);
- StructTypeDefaultConstructor(&notification).Declare(&o, true);
- StructTypeMandatoryConstructor mandatory_constructor(&notification);
- StructTypeFromJsonConstructor(&notification).Declare(&o , true);
- if (mandatory_constructor.has_mandatory_parameters()) {
- mandatory_constructor.Declare(&o, true);
- }
- CppStructDestructor(notification.name()).Declare(&o, true);
- StructTypeIsValidMethod(&notification).Declare(&o, true);
- StructTypeIsInitializedMethod(&notification).Declare(&o, true);
- StructTypeToJsonMethod(&notification).Declare(&o , true);
- MessageHandleWithMethod(notification.name()).Declare(&o, true);
- FunctionIdMethod(&notification).Define(&o, true);
- FunctionStringIdMethod(&notification).Define(&o, true);
- }
- {
- Section priv("private", &o);
- StructTypeAdditionalValidationMethod(&notification).Declare(&o, true);
- }
-
- o << "};" << endl;
-}
-
-void DeclarationGenerator::GenerateCodeForStructFields(
- const Struct& strct,
- CppFile* header_file,
- Namespace* name_space) {
- const FunctionMessage::ParametersList& params = strct.fields();
- for (FunctionMessage::ParametersList::const_iterator i = params.begin(), end =
- params.end(); i != end; ++i) {
- const FunctionMessage::Parameter& param = *i;
- GenerateCodeForStructField(strct, param, header_file, name_space);
- }
-}
-
-TypeForwardDeclarator::TypeForwardDeclarator(Namespace* ns, const Type* type)
- : ns_(ns) {
- assert(ns_);
- type->Apply(this);
-}
-
-void TypeForwardDeclarator::GenerateCodeForArray(const Array* array) {
- array->type()->Apply(this);
-}
-
-void TypeForwardDeclarator::GenerateCodeForMap(const Map* map) {
- map->type()->Apply(this);
-}
-
-void TypeForwardDeclarator::GenerateCodeForStruct(const Struct* strct) {
- ns_->ForwardDeclare(
- Namespace::ForwardDeclaration(Namespace::ForwardDeclaration::kStruct,
- strct->name()));
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/definition_generator.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/definition_generator.cc
deleted file mode 100644
index f8557350f..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/definition_generator.cc
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/definition_generator.h"
-
-#include "cppgen/comment.h"
-#include "cppgen/enum_from_json_value_function.h"
-#include "cppgen/enum_to_json_value_function.h"
-#include "cppgen/is_valid_enum_function.h"
-#include "cppgen/message_handle_with_method.h"
-#include "cppgen/module_manager.h"
-#include "cppgen/struct_type_constructor.h"
-#include "cppgen/struct_type_from_json_method.h"
-#include "cppgen/struct_type_is_initialized_method.h"
-#include "cppgen/struct_type_is_valid_method.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using std::endl;
-using std::ostream;
-using typesafe_format::format;
-
-namespace codegen {
-
-DefinitionGenerator::DefinitionGenerator(ModuleManager* module_manager)
- : module_manager_(module_manager) {
-}
-
-DefinitionGenerator::~DefinitionGenerator() {
-}
-
-void DefinitionGenerator::GenerateCodeForEnum(const Enum* enm) {
- CppFile& source_file = module_manager_->SourceForEnum(*enm);
- ostream& o = source_file.types_ns().os();
- IsValidEnumFunction(enm).Define(&o, false);
- EnumToJsonValueFunction(enm).Define(&o, false);
- EnumFromJsonValueFunction(enm).Define(&o, false);
- o << endl;
-}
-
-void DefinitionGenerator::GenerateCodeForStruct(const Struct* strct) {
- CppFile& source_file = module_manager_->SourceForStruct(*strct);
- ostream& o = source_file.types_ns().os();
- o << Comment(format("{0} methods", strct->name())) << endl;
- StructTypeDefaultConstructor(strct).Define(&o, false);
- StructTypeMandatoryConstructor mandatory_constructor(strct);
- if (mandatory_constructor.has_mandatory_parameters()){
- mandatory_constructor.Define(&o, false);
- }
- CppStructDestructor(strct->name()).Define(&o, false);
- StructTypeIsValidMethod(strct).Define(&o, false);
- StructTypeIsInitializedMethod(strct).Define(&o, false);
- StructTypeFromJsonConstructor(strct).Define(&o , false);
- StructTypeToJsonMethod(strct).Define(&o , false);
- o << endl;
-
- Namespace& val_ns = module_manager_->SourceForValidator().types_ns();
- StructTypeAdditionalValidationMethod(strct).Define(&val_ns.os(), false);
-}
-
-void DefinitionGenerator::GenerateCodeForFunction(const Function& function) {
- CppFile& source_file = module_manager_->SourceForFunction(function);
- GenerateCodeForRequest(function.request(), &source_file);
- GenerateCodeForResponse(function.response());
-}
-
-void DefinitionGenerator::GenerateCodeForResponse(const Response& response) {
- CppFile& source_file = module_manager_->SourceForResponse(response);
- ostream& o = source_file.responses_ns().os();
- o << Comment(format("{0} response methods", response.name())) << endl;
- StructTypeDefaultConstructor(&response).Define(&o, false);
- StructTypeMandatoryConstructor mandatory_constructor(&response);
- if (mandatory_constructor.has_mandatory_parameters()){
- mandatory_constructor.Define(&o, false);
- }
- CppStructDestructor(response.name()).Define(&o, false);
- StructTypeIsValidMethod(&response).Define(&o, false);
- StructTypeIsInitializedMethod(&response).Define(&o, false);
- StructTypeFromJsonConstructor(&response).Define(&o , false);
- StructTypeToJsonMethod(&response).Define(&o , false);
- MessageHandleWithMethod(response.name()).Define(&o, false);
- o << endl;
-
- Namespace& val_ns = module_manager_->SourceForValidator().responses_ns();
- StructTypeAdditionalValidationMethod(&response).Define(&val_ns.os(), false);
-}
-
-void DefinitionGenerator::GenerateCodeForNotification(
- const Notification& notification) {
- CppFile& source_file = module_manager_->SourceForNotification(notification);
- ostream& o = source_file.notifications_ns().os();
- o << Comment(format("{0} notification methods", notification.name())) << endl;
- StructTypeDefaultConstructor(&notification).Define(&o, false);
- StructTypeMandatoryConstructor mandatory_constructor(&notification);
- if (mandatory_constructor.has_mandatory_parameters()){
- mandatory_constructor.Define(&o, false);
- }
- CppStructDestructor(notification.name()).Define(&o, false);
- StructTypeIsValidMethod(&notification).Define(&o, false);
- StructTypeIsInitializedMethod(&notification).Define(&o, false);
- StructTypeFromJsonConstructor(&notification).Define(&o , false);
- StructTypeToJsonMethod(&notification).Define(&o , false);
- MessageHandleWithMethod(notification.name()).Define(&o, false);
- o << endl;
-
- Namespace& val_ns = module_manager_->SourceForValidator().notifications_ns();
- StructTypeAdditionalValidationMethod(&notification).Define(&val_ns.os(),
- false);
-}
-
-void DefinitionGenerator::GenerateCodeForRequest(const Request& request,
- CppFile* source_file) {
- ostream& o = source_file->requests_ns().os();
- o << Comment(format("{0} request methods", request.name())) << endl;
- StructTypeDefaultConstructor(&request).Define(&o, false);
- StructTypeMandatoryConstructor mandatory_constructor(&request);
- if (mandatory_constructor.has_mandatory_parameters()){
- mandatory_constructor.Define(&o, false);
- }
- CppStructDestructor(request.name()).Define(&o, false);
- StructTypeIsValidMethod(&request).Define(&o, false);
- StructTypeIsInitializedMethod(&request).Define(&o, false);
- StructTypeFromJsonConstructor(&request).Define(&o , false);
- StructTypeToJsonMethod(&request).Define(&o , false);
- MessageHandleWithMethod(request.name()).Define(&o, false);
- o << endl;
-
- Namespace& val_ns = module_manager_->SourceForValidator().requests_ns();
- StructTypeAdditionalValidationMethod(&request).Define(&val_ns.os(), false);
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/enum_from_json_value_function.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/enum_from_json_value_function.cc
deleted file mode 100644
index c76253711..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/enum_from_json_value_function.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/enum_from_json_value_function.h"
-
-#include <ostream>
-
-#include "cppgen/generator_preferences.h"
-#include "cppgen/literal_generator.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-EnumFromJsonValueFunction::EnumFromJsonValueFunction(
- const Enum* enm)
- : CppFunction("", "EnumFromJsonString", "bool"),
- enm_(enm) {
- Add(Parameter("literal", "const std::string&"));
- Add(Parameter("*result", enm->name()));
-}
-
-EnumFromJsonValueFunction::~EnumFromJsonValueFunction() {
-}
-
-void EnumFromJsonValueFunction::DefineBody(std::ostream* os) const {
- const Enum::ConstantsList& consts = enm_->constants();
- if (!consts.empty()) {
- const char* if_statement = "if (\"{0}\" == {1}) {";
- for (Enum::ConstantsList::const_iterator i = consts.begin();
- i != consts.end(); ++i) {
- const Enum::Constant& c = *i;
- strmfmt(*os, if_statement, c.name(), parameters_[0].name) << endl;
- {
- Indent indent(*os);
- strmfmt(*os, "{0} = {1};", parameters_[1].name,
- LiteralGenerator(c).result()) << '\n';
- *os << "return true;" << '\n';
- }
- if_statement = "} else if (\"{0}\" == {1}) {";
- }
- }
- *os << "} else {" << endl;
- {
- Indent indent(*os);
- *os << "return false;" << '\n';
- }
- *os << "}" << endl;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/enum_to_json_value_function.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/enum_to_json_value_function.cc
deleted file mode 100644
index ac88b5b96..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/enum_to_json_value_function.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/enum_to_json_value_function.h"
-
-#include <ostream>
-
-#include "cppgen/generator_preferences.h"
-#include "cppgen/literal_generator.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-EnumToJsonValueFunction::EnumToJsonValueFunction(const Enum* enm)
- : CppFunction("", "EnumToJsonString", "const char*"),
- enm_(enm) {
- Add(Parameter("val", enm->name()));
-}
-
-EnumToJsonValueFunction::~EnumToJsonValueFunction() {
-}
-
-void EnumToJsonValueFunction::DefineBody(std::ostream* os) const {
- strmfmt(*os, "switch({0}) {", parameters_[0].name) << endl;
- {
- Indent indent(*os);
- const Enum::ConstantsList& consts = enm_->constants();
- for (Enum::ConstantsList::const_iterator i = consts.begin();
- i != consts.end(); ++i) {
- const Enum::Constant& c = *i;
- strmfmt(*os, "case {0}: return \"{1}\";", LiteralGenerator(c).result(),
- c.name()) << endl;
- }
- *os << "default: return \"\";" << endl;
- }
- *os << "}" << endl;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/function_id_method.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/function_id_method.cc
deleted file mode 100644
index 2ada8b723..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/function_id_method.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/function_id_method.h"
-
-#include <cassert>
-#include <ostream>
-#include "model/interface.h"
-#include "model/function.h"
-#include "utils/safeformat.h"
-#include "cppgen/literal_generator.h"
-
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-FunctionIdMethod::FunctionIdMethod(const FunctionMessage* func)
- : CppFunction(func->name(),
- "function_id",
- "int32_t", kConst),
- func_(func) {
- assert(func);
-}
-
-FunctionIdMethod::~FunctionIdMethod() {
-}
-
-void FunctionIdMethod::DefineBody(std::ostream* os) const {
- const Enum::Constant* id = func_->id();
- strmfmt(*os, "return {0};", LiteralGenerator(*id).result()) << endl;
-}
-
-FunctionStringIdMethod::FunctionStringIdMethod(const FunctionMessage* func)
- : CppFunction(func->name(),
- "function_string_id",
- "const char*",
- kConst),
- func_(func) {
- assert(func);
-}
-
-FunctionStringIdMethod::~FunctionStringIdMethod() {
-}
-
-void FunctionStringIdMethod::DefineBody(std::ostream* os) const {
- const Enum::Constant* id = func_->id();
- strmfmt(*os, "return \"{0}\";" ,
- id->name()) << endl;
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/generator_preferences.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/generator_preferences.cc
deleted file mode 100644
index 1bfd515f0..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/generator_preferences.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/generator_preferences.h"
-
-#include <algorithm>
-
-#include "cppgen/naming_convention.h"
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-
-using typesafe_format::format;
-
-namespace codegen {
-
-namespace func_names {
-const char* kAdditionalValidation = "Validate";
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/handler_interface.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/handler_interface.cc
deleted file mode 100644
index 57b41523f..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/handler_interface.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/handler_interface.h"
-
-#include <cassert>
-#include <memory>
-
-#include "cppgen/cpp_file.h"
-#include "cppgen/naming_convention.h"
-#include "model/interface.h"
-
-namespace codegen {
-
-HandlerInterface::HandlerInterface(FunctionMessage::MessageType type,
- const Interface* interface,
- CppFile* header_file)
- : CppClass("Handler"),
- type_(type),
- interface_(interface),
- header_file_(header_file),
- methods_deleter_(&methods_) {
- assert(interface);
- CollectMethods();
-}
-
-const CppClass::MethodsList& HandlerInterface::methods(){
- return methods_;
-}
-
-void HandlerInterface::CollectMethods() {
- switch(type_) {
- case FunctionMessage::kNotification: {
- AddFunctionMessageHandlers(interface_->notifications());
- break;
- }
- case FunctionMessage::kRequest: {
- const Interface::FunctionsList& functions =
- interface_->functions();
- AddFunctionMessageHandlers(interface_->all_requests());
- break;
- }
- case FunctionMessage::kResponse: {
- AddFunctionMessageHandlers(interface_->all_responses());
- break;
- }
- default: {
- assert(!"Unexpected function message type");
- }
- }
- std::auto_ptr<CppClass::Method> destructor(
- new CppClass::Method(this, CppClass::kPublic,
- "~"+name(), "",
- CppFunction::kVirtual));
- methods_.push_back(destructor.get());
- destructor.release();
-}
-
-void HandlerInterface::AddFunctionMessageHandlers(
- const FunctionMessages& function_messages) {
- for (FunctionMessages::const_iterator i = function_messages.begin(),
- end = function_messages.end(); i != end; ++i) {
- const FunctionMessage* func_msg = *i;
- Namespace& message_ns = header_file_->NamespaceByMessageType(type_);
- message_ns.ForwardDeclare(Namespace::ForwardDeclaration(
- Namespace::ForwardDeclaration::kStruct,
- func_msg->name()));
- std::auto_ptr<CppClass::Method> method(
- new CppClass::Method(
- this, CppClass::kPublic, "Handle" + func_msg->name(),
- "void", CppFunction::kVirtual | CppFunction::kAbstract));
- method->Add(CppClass::Method::Parameter(
- "params", "const " + func_msg->name() + "&"));
- methods_.push_back(method.get());
- method.release();
- }
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/is_valid_enum_function.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/is_valid_enum_function.cc
deleted file mode 100644
index 3ebb9d3bc..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/is_valid_enum_function.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/is_valid_enum_function.h"
-
-#include <ostream>
-
-#include "cppgen/generator_preferences.h"
-#include "cppgen/literal_generator.h"
-#include "model/composite_type.h"
-#include "model/constant.h"
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-IsValidEnumFunction::IsValidEnumFunction(const Enum* enm)
- : CppFunction("", "IsValidEnum", "bool"),
- enm_(enm) {
- Add(Parameter("val", enm->name()));
-}
-
-IsValidEnumFunction::~IsValidEnumFunction() {
-}
-
-void IsValidEnumFunction::DefineBody(std::ostream* os) const {
- strmfmt(*os, "switch({0}) {", parameters_[0].name) << endl;
- {
- Indent indent(*os);
- const Enum::ConstantsList& consts = enm_->constants();
- for (Enum::ConstantsList::const_iterator i = consts.begin();
- i != consts.end(); ++i) {
- const Enum::Constant& c = *i;
- strmfmt(*os, "case {0}: return true;", LiteralGenerator(c).result()) << endl;
- }
- *os << "default: return false;" << endl;
- }
- *os << "}" << endl;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/literal_generator.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/literal_generator.cc
deleted file mode 100644
index 71c542ac6..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/literal_generator.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/literal_generator.h"
-
-#include "cppgen/naming_convention.h"
-
-namespace codegen {
-
-LiteralGenerator::LiteralGenerator(const Constant& constant) {
- constant.Apply(this);
-}
-
-LiteralGenerator::~LiteralGenerator() {
-}
-
-std::string LiteralGenerator::result() const {
- return result_;
-}
-
-void LiteralGenerator::GenerateCodeForBooleanConstant(
- const Boolean::Constant* boolean) {
- result_ = boolean->value() ? "true" : "false";
-}
-
-void LiteralGenerator::GenerateCodeForIntegerConstant(
- const Integer::Constant* integer) {
- result_ = NumberToString(integer->value());
-}
-
-void LiteralGenerator::GenerateCodeForFloatConstant(
- const Float::Constant* flt) {
- result_ = NumberToString(flt->value());
-}
-
-void LiteralGenerator::GenerateCodeForEnumConstant(const Enum::Constant* enm) {
- std::string type_name = enm->type()->name();
- if (Enum::kFunctionIdEnumName == type_name) {
- result_ = "k" + enm->name();
- } else {
- std::string constant_name = enm->name();
- std::replace(constant_name.begin(), constant_name.end(), '-', '_');
- result_ = to_upper(
- WordList::FromCamelCase(type_name).Abbreviate() + "_" + constant_name);
- }
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/message_factory_function.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/message_factory_function.cc
deleted file mode 100644
index f34c9f0b3..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/message_factory_function.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/message_factory_function.h"
-
-#include "cppgen/literal_generator.h"
-#include "cppgen/naming_convention.h"
-#include "model/interface.h"
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-
-using typesafe_format::format;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-MessageFactoryFunction::MessageFactoryFunction(
- const Interface* interface,
- FunctionMessage::MessageType factory_type)
- : CppFunction("",
- "NewFromJson",
- Capitalize(
- FunctionMessage::MessageTypeToString(
- factory_type)) + "*"),
- interface_(interface),
- factory_type_(factory_type) {
- Add(MessageFactoryFunction::Parameter("json", "const Json::Value&"));
- Add(MessageFactoryFunction::Parameter("function_id", "FunctionID"));
-}
-
-void MessageFactoryFunction::DefineBody(std::ostream* os) const {
- *os << "switch (function_id) {\n";
- {
- Indent indent(*os);
- switch(factory_type_) {
- case FunctionMessage::kRequest: {
- DefineCases(os, interface_->all_requests());
- break;
- }
- case FunctionMessage::kResponse: {
- DefineCases(os, interface_->all_responses());
- break;
- }
- case FunctionMessage::kNotification: {
- DefineCases(os, interface_->notifications());
- break;
- }
- }
- }
- *os << "}\n";
-}
-
-void MessageFactoryFunction::DefineCases(
- std::ostream* os,
- const MessageList& functions) const {
- for (MessageList::const_iterator i = functions.begin(),
- end = functions.end(); i != end; ++i) {
- const FunctionMessage* message = *i;
- strmfmt(*os, "case {0}: return new {1}(json);\n",
- LiteralGenerator(*message->id()).result(),
- message->name());
- }
- *os << "default: return NULL;\n";
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/message_handle_with_method.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/message_handle_with_method.cc
deleted file mode 100644
index 897356439..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/message_handle_with_method.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <ostream>
-
-#include "cppgen/message_handle_with_method.h"
-#include "utils/safeformat.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-MessageHandleWithMethod::MessageHandleWithMethod(const std::string& class_name)
- : CppFunction(class_name, "HandleWith", "void", kVirtual),
- class_name_(class_name){
- Add(Parameter("handler", "Handler*"));
-}
-
-void MessageHandleWithMethod::DefineBody(std::ostream* os) const {
- strmfmt(*os, "return handler->Handle{0}(*this);",
- class_name_) << '\n';
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/message_interface.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/message_interface.cc
deleted file mode 100644
index 96705cb21..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/message_interface.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/message_interface.h"
-
-#include "cppgen/naming_convention.h"
-#include "model/interface.h"
-#include "utils/safeformat.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-InterfaceStringIdMethod::InterfaceStringIdMethod(
- const MessageInterface* message_interface,
- const Interface* interface)
- : CppClass::Method(message_interface, CppClass::kPublic,
- "interface_string_id", "const char*", kConst),
- interface_(interface) {
-}
-
-void InterfaceStringIdMethod::DefineBody(std::ostream* os) const {
- strmfmt(*os, "return \"{0}\";\n", interface_->name());
-}
-
-MessageInterface::MessageInterface(const Interface* interface,
- FunctionMessage::MessageType message_type)
- : CppClass(Capitalize(FunctionMessage::MessageTypeToString(message_type))),
- handle_with_method_(this, kPublic,
- "HandleWith", "void",
- Method::kVirtual|Method::kAbstract),
- interface_string_id_method_(this, interface){
- Add(Superclass("rpc::" + name() + "Base", kPublic));
- handle_with_method_.Add(Method::Parameter(
- "handler", "Handler*"));
- methods_.push_back(&handle_with_method_);
- methods_.push_back(&interface_string_id_method_);
-}
-
-const CppClass::MethodsList& MessageInterface::methods() {
- return methods_;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/module_manager.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/module_manager.cc
deleted file mode 100644
index c99175d06..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/module_manager.cc
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/module_manager.h"
-
-#include <errno.h>
-#include <fstream>
-
-#ifdef OS_POSIX
-#include <sys/stat.h>
-#include <sys/types.h>
-
-namespace {
-bool CreateDirectory(const std::string& name) {
- int result = mkdir(name.c_str(), 0777) == 0;
- if (0 == result) {
- return true;
- } else if (EEXIST == result || EPERM == result) {
- struct stat s;
- result = stat(name.c_str(), &s);
- if (result != 0) {
- return false;
- }
- return (S_ISDIR(s.st_mode));
- }
- return false;
-}
-
-} // namespace
-
-#else
-#error Please provide create directory function for your platform
-#endif
-
-
-namespace codegen {
-
-ModuleManager::ModuleManager(const std::string& name)
- : module_name_(name),
- enums_header_(module_name_ + "/enums.h", module_name_, true),
- enums_source_(module_name_ + "/enums.cc", module_name_, false),
- structs_header_(module_name_ + "/types.h", module_name_, true),
- structs_source_(module_name_ + "/types.cc", module_name_, false),
- functions_header_(module_name_ + "/functions.h", module_name_, true),
- functions_source_(module_name_ + "/functions.cc", module_name_, false),
- interface_header_(module_name_ + "/interface.h", module_name_, true),
- interface_source_(module_name_ + "/interface.cc", module_name_, false),
- additional_validation_source_(module_name_ + "/validation.cc", module_name_, false){
- structs_header_.Include(CppFile::Header("rpc_base/rpc_message.h", true));
- structs_header_.Include(CppFile::Header(enums_header_.file_name(), true));
- functions_header_.Include(CppFile::Header(enums_header_.file_name(), true));
- functions_header_.Include(CppFile::Header(structs_header_.file_name(), true));
- functions_header_.Include(CppFile::Header(interface_header_.file_name(), true));
- interface_header_.Include(CppFile::Header("rpc_base/rpc_message.h", true));
- interface_header_.Include(CppFile::Header(enums_header_.file_name(), true));
- enums_header_.Include(CppFile::Header("string", false));
- enums_source_.Include(CppFile::Header(enums_header_.file_name(), true));
- structs_source_.Include(CppFile::Header(structs_header_.file_name(), true));
- structs_source_.Include(
- CppFile::Header("rpc_base/rpc_base_json_inl.h", true));
- functions_source_.Include(CppFile::Header(functions_header_.file_name(),
- true));
- functions_source_.Include(
- CppFile::Header("rpc_base/rpc_base_json_inl.h", true));
-
- interface_source_.Include((CppFile::Header(interface_header_.file_name(),
- true)));
- interface_source_.Include(CppFile::Header(functions_header_.file_name(),
- true));
-
- additional_validation_source_.Include(
- CppFile::Header(structs_header_.file_name(), true));
- additional_validation_source_.Include(
- CppFile::Header(functions_header_.file_name(), true));
-}
-
-ModuleManager::~ModuleManager() {
-}
-
-CppFile& ModuleManager::HeaderForInterface() {
- return interface_header_;
-}
-
-CppFile& ModuleManager::HeaderForEnum(const Enum& enm) {
- return enums_header_;
-}
-
-CppFile& ModuleManager::HeaderForStruct(const Struct& strct) {
- return structs_header_;
-}
-
-CppFile& ModuleManager::HeaderForTypedef(const Typedef& tdef) {
- return structs_header_;
-}
-
-CppFile& ModuleManager::HeaderForFunction(const Function& function) {
- return functions_header_;
-}
-
-CppFile& ModuleManager::HeaderForResponse(const Response& request) {
- return functions_header_;
-}
-
-CppFile& ModuleManager::HeaderForNotification(
- const Notification& notification) {
- return functions_header_;
-}
-
-CppFile& ModuleManager::SourceForInterface() {
- return interface_source_;
-}
-
-CppFile& ModuleManager::SourceForEnum(const Enum& enm) {
- return enums_source_;
-}
-
-CppFile& ModuleManager::SourceForStruct(const Struct& strct) {
- return structs_source_;
-}
-
-CppFile& ModuleManager::SourceForFunction(const Function& function) {
- return functions_source_;
-}
-
-CppFile& ModuleManager::SourceForResponse(const Response& request) {
- return functions_source_;
-}
-
-CppFile& ModuleManager::SourceForNotification(
- const Notification& notification) {
- return functions_source_;
-}
-
-CppFile& ModuleManager::SourceForValidator() {
- return additional_validation_source_;
-}
-
-bool ModuleManager::Write() {
- if (!CreateDirectory(module_name_)) {
- return false;
- }
- CppFile* files[] = { &enums_header_, &enums_source_,
- &structs_header_, &structs_source_,
- &functions_header_, &functions_source_,
- &interface_header_, &interface_source_,
- &additional_validation_source_ };
- for (size_t i = 0; i != sizeof(files)/sizeof(files[0]); ++i) {
- CppFile* file = files[i];
- std::ofstream stream(file->file_name().c_str());
- file->Write(&stream);
- if (!stream) {
- return false;
- }
- }
- return true;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/namespace.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/namespace.cc
deleted file mode 100644
index f02657358..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/namespace.cc
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/namespace.h"
-
-#include "cppgen/comment.h"
-#include "utils/safeformat.h"
-
-using std::endl;
-using std::make_pair;
-using std::map;
-using std::set;
-using std::string;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-Namespace::Namespace()
- : global_(true) {
-}
-
-Namespace::Namespace(const std::string& name)
- : global_(false),
- name_(name) {
-}
-
-Namespace::~Namespace() {
-}
-
-Namespace::Namespace(const Namespace& that)
- : global_(that.global_),
- name_(that.name_),
- nested_(that.nested_),
- contents_(that.contents_.str()) {
-}
-
-const std::string& Namespace::name() const {
- return name_;
-}
-
-Namespace& codegen::Namespace::nested(const std::string& name) {
- map<string, Namespace>::iterator res = nested_.find(name);
- if (res == nested_.end()) {
- return nested_.insert(make_pair(name, Namespace(name))).first->second;
- } else {
- return res->second;
- }
-}
-
-std::ostream& Namespace::os() {
- return contents_;
-}
-
-void Namespace::ForwardDeclare(const ForwardDeclaration& type_name) {
- forward_declarations_.insert(type_name);
-}
-
-void Namespace::Write(std::ostream* os) {
- WriteForwardDeclarations(os);
- *os << endl;
- WriteContents(os);
-}
-
-void Namespace::WriteForwardDeclarations(std::ostream* os) {
- if (HasForwardDeclarations()) {
- BeginNamespace(os);
- for (map<string, Namespace>::iterator i = nested_.begin(), end =
- nested_.end(); i != end; ++i) {
- i->second.WriteForwardDeclarations(os);
- }
- for (set<ImportedName>::iterator i = imported_names_.begin(), end =
- imported_names_.end(); i != end; ++i) {
- *os << (i->is_single_name() ? "using " : "using namespace ") << i->name()
- << ";" << endl;
- }
- for (set<ForwardDeclaration>::iterator i = forward_declarations_.begin(), end =
- forward_declarations_.end(); i != end; ++i) {
- const char* metatype = i->type() == ForwardDeclaration::kClass ? "class" : "struct";
- const string& type_name = i->name();
- strmfmt(*os, "{0} {1};", metatype, type_name) << '\n';
- }
- EndNamespace(os);
- }
-}
-
-void Namespace::WriteContents(std::ostream* os) {
- if (HasContents()) {
- BeginNamespace(os);
- for (map<string, Namespace>::iterator i = nested_.begin(), end =
- nested_.end(); i != end; ++i) {
- i->second.WriteContents(os);
- }
- *os << contents_.str();
- EndNamespace(os);
- }
-}
-
-bool Namespace::HasForwardDeclarations() {
- if (!forward_declarations_.empty() || !imported_names_.empty()) {
- return true;
- }
- for (map<string, Namespace>::iterator i = nested_.begin(), end =
- nested_.end(); i != end; ++i) {
- if (i->second.HasForwardDeclarations()) {
- return true;
- }
- }
- return false;
-}
-
-bool Namespace::HasContents() {
- if (contents_.rdbuf()->in_avail()) {
- return true;
- }
- for (map<string, Namespace>::iterator i = nested_.begin(), end =
- nested_.end(); i != end; ++i) {
- if (i->second.HasContents()) {
- return true;
- }
- }
- return false;
-}
-
-void Namespace::BeginNamespace(std::ostream* os) {
- if (!global_) {
- *os << "namespace";
- if (!name_.empty()) {
- *os << " " << name_;
- }
- *os << " {" << endl;
- }
-}
-
-void Namespace::ImportName(const ImportedName& name) {
- imported_names_.insert(name);
-}
-
-void Namespace::EndNamespace(std::ostream* os) {
- if (!global_) {
- *os << "} " << Comment("namespace " + name_);
- }
- *os << endl;
-}
-
-Namespace::ForwardDeclaration::ForwardDeclaration(Type type,
- const std::string& name)
- : type_(type),
- name_(name) {
-}
-
-bool Namespace::ForwardDeclaration::operator <(
- const ForwardDeclaration& that) const {
- return this->name_ < that.name_;
-}
-
-const std::string& Namespace::ForwardDeclaration::name() const {
- return name_;
-}
-
-Namespace::ForwardDeclaration::Type Namespace::ForwardDeclaration::type() const {
- return type_;
-}
-
-Namespace::ImportedName::ImportedName(std::string name, bool single_name)
- : single_name_(single_name),
- name_(name) {
-}
-
-bool Namespace::ImportedName::operator <(const ImportedName& that) const {
- if (single_name_ == that.single_name_)
- return int(single_name_) < int(that.single_name_);
- return name_ < that.name_;
-}
-
-const std::string& Namespace::ImportedName::name() const {
- return name_;
-}
-
-bool Namespace::ImportedName::is_single_name() const {
- return single_name_;
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/naming_convention.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/naming_convention.cc
deleted file mode 100644
index 757cf7d04..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/naming_convention.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/naming_convention.h"
-
-#include <algorithm>
-#include <cctype>
-#include <memory>
-
-#include "model/interface.h"
-#include "utils/string_utils.h"
-
-using std::string;
-using std::vector;
-
-namespace codegen {
-
-namespace {
-
-bool IsAllUpper(const string& id) {
- for (string::const_iterator i = id.begin(); i != id.end(); ++i) {
- if (std::isalpha(*i) && std::islower(*i)) {
- return false;
- }
- }
- return true;
-}
-
-bool IsAllLower(const string& id) {
- for (string::const_iterator i = id.begin(); i != id.end(); ++i) {
- if (std::isalpha(*i) && std::isupper(*i)) {
- return false;
- }
- }
- return true;
-}
-
-}
-
-WordList::WordList() {
-}
-
-WordList::~WordList() {
-}
-
-WordList WordList::FromUnknown(const string& identifier) {
- if (IsAllUpper(identifier)) {
- return FromUnderscoreSeparated(identifier);
- } else if (IsAllLower(identifier)) {
- return FromUnderscoreSeparated(identifier);
- } else {
- return FromCamelCase(identifier);
- }
-}
-
-WordList WordList::FromUnderscoreSeparated(const string& id) {
- WordList res;
- string::const_iterator word_begin = id.begin();
- bool know_word_begin = true;
- for (string::const_iterator i = id.begin() + 1; i != id.end(); ++i) {
- if (std::isalnum(*i)) {
- if (!know_word_begin) {
- word_begin = i;
- know_word_begin = true;
- } else {
- }
- } else { // not isalnum
- if (know_word_begin) {
- res.words_.push_back(string(word_begin, i));
- know_word_begin = false;
- } else {
- }
- }
- }
- res.words_.push_back(string(word_begin, id.end()));
- res.Normalize();
- return res;
-}
-
-WordList WordList::FromCamelCase(const string& id) {
- WordList res;
- string::const_iterator word_begin = id.begin();
- bool last_upper = true;
- bool multiple_upper = false;
- for (string::const_iterator i = id.begin() + 1; i != id.end(); ++i) {
- if (std::isupper(*i)) {
- if (last_upper) {
- multiple_upper = true;
- } else {
- res.words_.push_back(string(word_begin, i));
- word_begin = i;
- last_upper = true;
- multiple_upper = false;
- }
- } else { // not isupper
- if (multiple_upper) {
- res.words_.push_back(string(word_begin, i - 1));
- word_begin = i - 1;
- last_upper = false;
- multiple_upper = false;
- } else {
- last_upper = false;
- }
- }
- }
- res.words_.push_back(string(word_begin, id.end()));
- res.Normalize();
- return res;
-}
-
-WordList& WordList::operator +=(const WordList& that) {
- words_.insert(words_.end(), that.words_.begin(), that.words_.end());
- return *this;
-}
-
-string WordList::ToUpperCase() const {
- string res;
- if (!words_.empty())
- res = to_upper(words_.front());
- for (vector<string>::const_iterator i = words_.begin() + 1; i != words_.end();
- ++i) {
- res += "_" + to_upper(*i);
- }
- return res;
-}
-
-string WordList::ToCamelCase() const {
- string res;
- if (!words_.empty())
- res = words_.front();
- for (vector<string>::const_iterator i = words_.begin() + 1; i != words_.end();
- ++i) {
- string word = *i;
- word[0] = std::toupper(word[0]);
- res += word;
- }
- return res;
-}
-
-string WordList::ToLowerCase() const {
- string res;
- if (!words_.empty())
- res = words_.front();
- for (vector<string>::const_iterator i = words_.begin() + 1; i != words_.end();
- ++i) {
- res += "_" + *i;
- }
- return res;
-}
-
-string WordList::ToUpperCamelCase() const {
- string res;
- for (vector<string>::const_iterator i = words_.begin(); i != words_.end();
- ++i) {
- string word = *i;
- word[0] = std::toupper(word[0]);
- res += word;
- }
- return res;
-}
-
-void WordList::Normalize() {
- for (vector<string>::iterator i = words_.begin(); i != words_.end(); ++i) {
- *i = to_lower(*i);
- trim(*i);
- }
-}
-
-string WordList::Abbreviate() const {
- string res;
- for (vector<string>::const_iterator i = words_.begin(); i != words_.end(); ++i) {
- res += (*i)[0];
- }
- return res;
-}
-
-std::string LowercaseIntefaceName(const Interface& interface) {
- return WordList::FromUnknown(interface.name()).ToLowerCase();
-}
-
-std::string UpperCamelCaseInterfaceName(const Interface& interface) {
- return WordList::FromUnknown(interface.name()).ToUpperCamelCase();
-}
-
-std::string InterfaceNamespaceName(const Interface& interface) {
- return LowercaseIntefaceName(interface);
-}
-
-std::string Capitalize(const std::string& str) {
- string res = str;
- res[0] = std::toupper(res[0]);
- return res;
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_constructor.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_constructor.cc
deleted file mode 100644
index 60d7420b3..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_constructor.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/struct_type_constructor.h"
-
-#include <string>
-
-#include "cppgen/literal_generator.h"
-#include "cppgen/type_name_code_generator.h"
-#include "model/composite_type.h"
-#include "model/constant.h"
-
-using std::string;
-
-namespace codegen {
-
-StructTypeDefaultConstructor::StructTypeDefaultConstructor(const Struct* strct)
- : CppStructConstructor(strct->name()) {
-}
-
-StructTypeDefaultConstructor::~StructTypeDefaultConstructor() {
-}
-
-StructTypeMandatoryConstructor::StructTypeMandatoryConstructor(
- const Struct* strct)
- : CppStructConstructor(strct->name()) {
- const Struct::FieldsList& fields = strct->fields();
- for (Struct::FieldsList::const_iterator i = fields.begin(), end =
- fields.end(); i != end; ++i) {
- const Struct::Field& field = *i;
- if (field.default_value() || field.is_mandatory()) {
- Add(Parameter(field.name(),
- TypeNameGenerator(
- &strct->interface(),
- field.type()).result()));
- Add(Initializer(field.name(), field.name()));
- }
- }
-}
-
-StructTypeMandatoryConstructor::~StructTypeMandatoryConstructor() {
-}
-
-void StructTypeMandatoryConstructor::DefineBody(std::ostream* os) const {
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_from_json_method.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_from_json_method.cc
deleted file mode 100644
index a28513a45..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_from_json_method.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/struct_type_from_json_method.h"
-
-
-#include "cppgen/literal_generator.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-StructTypeFromJsonConstructor::StructTypeFromJsonConstructor(const Struct* strct)
- : CppStructConstructor(strct->name()),
- strct_(strct) {
- Add(Parameter("value", "const Json::Value&"));
- const Struct::FieldsList& fields = strct_->fields();
- for (Struct::FieldsList::const_iterator i = fields.begin(), end =
- fields.end(); i != end; ++i) {
- std::string initializer = "value[\"" + i->name() + "\"]";
- if (i->default_value()) {
- std::string def_value = LiteralGenerator(*i->default_value()).result();
- initializer += (", " + def_value);
- }
- Add(Initializer(i->name(), initializer));
- }
-}
-
-StructTypeFromJsonConstructor::~StructTypeFromJsonConstructor() {
-}
-
-void StructTypeFromJsonConstructor::DefineBody(std::ostream* os) const {
-}
-
-StructTypeToJsonMethod::StructTypeToJsonMethod(const Struct* strct)
- : CppFunction(strct->name(), "ToJsonValue", "Json::Value", kConst),
- strct_(strct) {
-}
-
-StructTypeToJsonMethod::~StructTypeToJsonMethod() {
-}
-
-void StructTypeToJsonMethod::DefineBody(std::ostream* os) const {
- *os << "Json::Value result__(Json::objectValue);" << '\n';
- const Struct::FieldsList& fields = strct_->fields();
- for (Struct::FieldsList::const_iterator i = fields.begin(), end =
- fields.end(); i != end; ++i) {
- const Struct::Field& field = *i;
- strmfmt(*os, "CompositeType::WriteJsonField(\"{0}\", {0}, &result__);",
- field.name())
- << '\n';
- }
- *os << "return result__;" << '\n';
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_initialized_method.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_initialized_method.cc
deleted file mode 100644
index 4ca5cd5d7..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_initialized_method.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/struct_type_is_initialized_method.h"
-
-#include <ostream>
-
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-StructTypeIsInitializedMethod::StructTypeIsInitializedMethod(
- const Struct* strct)
- : CppFunction(strct->name(), "is_initialized", "bool", kConst),
- strct_(strct) {
-}
-
-StructTypeIsInitializedMethod::~StructTypeIsInitializedMethod() {
-}
-
-void StructTypeIsInitializedMethod::DefineBody(std::ostream* os) const {
- const Struct::FieldsList& fields = strct_->fields();
- *os << "return" << '\n';
- Indent indent1(*os), indent2(*os);
- for (size_t i = 0; i != fields.size(); ++i) {
- const Struct::Field& field = fields[i];
- strmfmt(*os, "{0}.is_initialized() || ", field.name());
- if ((i % 2) == 1) {
- *os << endl;
- }
- }
- *os << "false;" << endl;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_valid_method.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_valid_method.cc
deleted file mode 100644
index 67722c2ee..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/struct_type_is_valid_method.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/struct_type_is_valid_method.h"
-
-#include <ostream>
-
-#include "cppgen/generator_preferences.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-StructTypeIsValidMethod::StructTypeIsValidMethod(const Struct* strct)
- : CppFunction(strct->name(), "is_valid", "bool", kConst),
- strct_(strct) {
-}
-
-StructTypeIsValidMethod::~StructTypeIsValidMethod() {
-}
-
-void StructTypeIsValidMethod::DefineBody(std::ostream* os) const {
- const Struct::FieldsList& fields = strct_->fields();
- *os << "return" << '\n';
- Indent indent1(*os), indent2(*os);
- for (size_t i = 0; i != fields.size(); ++i) {
- const Struct::Field& field = fields[i];
- strmfmt(*os, "{0}.is_valid() && ", field.name());
- if ((i % 2) == 1) {
- *os << '\n';
- }
- }
- *os << func_names::kAdditionalValidation << "();" << endl;
-}
-
-StructTypeAdditionalValidationMethod::StructTypeAdditionalValidationMethod(
- const Struct* strct)
- : CppFunction(strct->name(), func_names::kAdditionalValidation, "bool",
- kConst),
- strct_(strct) {
-
-}
-
-StructTypeAdditionalValidationMethod::~StructTypeAdditionalValidationMethod() {
-}
-
-void StructTypeAdditionalValidationMethod::DefineBody(std::ostream* os) const {
- *os << "return true;" << endl;
-}
-
-}
-// namespace codegen
diff --git a/SDL_Core/tools/intergen/cppgen/src/cppgen/type_name_code_generator.cc b/SDL_Core/tools/intergen/cppgen/src/cppgen/type_name_code_generator.cc
deleted file mode 100644
index 570b34271..000000000
--- a/SDL_Core/tools/intergen/cppgen/src/cppgen/type_name_code_generator.cc
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "cppgen/type_name_code_generator.h"
-
-#include <algorithm>
-#include <cassert>
-#include <limits>
-
-#include "cppgen/naming_convention.h"
-#include "model/builtin_type.h"
-#include "model/composite_type.h"
-#include "utils/safeformat.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-namespace {
-template <class T>
-std::string TypeNamespacePrefix(const Interface* current_interface,
- const T* type) {
- std::string ns;
- const Interface& type_interface = type->interface();
- if (&type_interface != current_interface) {
- ns = InterfaceNamespaceName(type_interface) + "::";
- }
- return ns;
-}
-}
-
-namespace {
-const char* StdIntTypeFromRagne(const Integer::Range& range) {
- if (range.min() < 0) {
- Integer::Range int8_t_range(-128, 127);
- Integer::Range int16_t_range(-32768, 32767);
- Integer::Range int32_t_range(-2147483648, 2147483647);
- if (int8_t_range.Includes(range)) {
- return "int8_t";
- } else if (int16_t_range.Includes(range)) {
- return "int16_t";
- } else if (int32_t_range.Includes(range)) {
- return "int32_t";
- }
- } else {
- Integer::Range uint8_t_range(0, 255);
- Integer::Range uint16_t_range(0, 65535);
- Integer::Range uint32_t_range(0, 4294967295);
- if (uint8_t_range.Includes(range)) {
- return "uint8_t";
- } else if (uint16_t_range.Includes(range)) {
- return "uint16_t";
- } else if (uint32_t_range.Includes(range)) {
- return "uint32_t";
- }
- }
- return "int64_t";
-}
-} // namespace
-
-TypeNameGenerator::TypeNameGenerator(const Interface* interface,
- const Type* type)
- : interface_(interface),
- prefer_reference_type_(true) {
- type->Apply(this);
-}
-
-TypeNameGenerator::~TypeNameGenerator() {
-}
-
-std::string TypeNameGenerator::result() const {
- return os_.str();
-}
-
-void TypeNameGenerator::GenerateCodeForBoolean(const Boolean* boolean) {
- os_ << "bool";
-}
-
-void TypeNameGenerator::GenerateCodeForInteger(const Integer* integer) {
- os_ << StdIntTypeFromRagne(integer->range());
-}
-
-void TypeNameGenerator::GenerateCodeForFloat(const Float* flt) {
- os_ << "double";
-}
-
-void TypeNameGenerator::GenerateCodeForString(const String* string) {
- os_ << (prefer_reference_type_ ? "const std::string&" : "std::string");
-}
-
-void TypeNameGenerator::GenerateCodeForEnum(const Enum* enm) {
- os_ << TypeNamespacePrefix(interface_, enm) << enm->name();
-}
-
-void TypeNameGenerator::GenerateCodeForArray(const Array* array) {
- const char* vect_decl_begin =
- prefer_reference_type_ ? "const std::vector<" : "std::vector<";
- const char* vect_decl_end = prefer_reference_type_ ? ">&" : ">";
- // Vector can not contain references
- prefer_reference_type_ = false;
- os_ << vect_decl_begin;
- array->type()->Apply(this);
- os_ << vect_decl_end;
-}
-
-void TypeNameGenerator::GenerateCodeForMap(const Map* map) {
- const char* map_decl_begin =
- prefer_reference_type_ ?
- "const std::map<std::string, " : "std::map<std::string, ";
- const char* map_decl_end = prefer_reference_type_ ? ">&" : ">";
- // Map can not contain references too
- prefer_reference_type_ = false;
- os_ << map_decl_begin;
- map->type()->Apply(this);
- os_ << map_decl_end;
-}
-
-void TypeNameGenerator::GenerateCodeForStruct(const Struct* strct) {
- const char* struct_decl_begin = prefer_reference_type_ ? "const " : "";
- const char* struct_decl_end = prefer_reference_type_ ? "&" : "";
- os_ << struct_decl_begin
- << TypeNamespacePrefix(interface_, strct) << strct->name()
- << struct_decl_end;
-}
-
-void TypeNameGenerator::GenerateCodeForTypedef(const Typedef* tdef) {
- const char* typedef_decl_begin = prefer_reference_type_ ? "const " : "";
- const char* typedef_decl_end = prefer_reference_type_ ? "&" : "";
- os_ << typedef_decl_begin
- << TypeNamespacePrefix(interface_, tdef) << tdef->name()
- << typedef_decl_end;
-}
-
-RpcTypeNameGenerator::RpcTypeNameGenerator(const Interface* interface,
- const Type* type,
- Availability availability)
- : interface_(interface),
- skip_availaiblity_specifier_(availability == kUnspecified),
- mandatory_(availability == kMandatory) {
- if (!skip_availaiblity_specifier_) {
- // Arrays, map and typedefs of arrays and maps doesn't need to be marked as
- // optional or mandatory because their minimal size indicates whether
- // container contents is optional
- skip_availaiblity_specifier_ = TypeProperties(type).is_container();
- }
- type->Apply(this);
-}
-
-RpcTypeNameGenerator::~RpcTypeNameGenerator() {
-}
-
-std::string RpcTypeNameGenerator::result() const {
- return os_.str();
-}
-
-void RpcTypeNameGenerator::GenerateCodeForBoolean(const Boolean* boolean) {
- if (MaybeWrapWithAvailabilitySpecifier(boolean)) {
- } else {
- os_ << "Boolean";
- }
-}
-
-void RpcTypeNameGenerator::GenerateCodeForInteger(const Integer* integer) {
- if (!MaybeWrapWithAvailabilitySpecifier(integer)) {
- const char* int_type = StdIntTypeFromRagne(integer->range());
- strmfmt(os_, "Integer<{0}, {1}, {2}>", int_type, integer->range().min(),
- integer->range().max());
- }
-}
-
-void RpcTypeNameGenerator::GenerateCodeForFloat(const Float* flt) {
- if (!MaybeWrapWithAvailabilitySpecifier(flt)) {
- const Fraction& minval = flt->range().min_fract();
- const Fraction& maxval = flt->range().max_fract();
- strmfmt(os_, "Float<{0}, {1}", minval.numer(), maxval.numer());
- if (minval.denumer() == 1 && maxval.denumer() == 1) {
- os_ << ">";
- } else {
- strmfmt(os_, ", {0}, {1}>", minval.denumer(), maxval.denumer());
- }
- }
-}
-
-void RpcTypeNameGenerator::GenerateCodeForString(const String* string) {
- if (!MaybeWrapWithAvailabilitySpecifier(string)) {
- strmfmt(os_, "String<{0}, {1}>", string->length_range().min(),
- string->length_range().max());
- }
-}
-
-void RpcTypeNameGenerator::GenerateCodeForEnum(const Enum* enm) {
- if (!MaybeWrapWithAvailabilitySpecifier(enm)) {
- strmfmt(os_, "Enum<{0}>", TypeNamespacePrefix(interface_, enm) + enm->name());
- }
-}
-
-void RpcTypeNameGenerator::GenerateCodeForArray(const Array* array) {
- os_ << "Array < ";
- array->type()->Apply(this);
- strmfmt(os_, ", {0}, {1} >", array->range().min(), array->range().max());
-}
-
-void RpcTypeNameGenerator::GenerateCodeForMap(const Map* map) {
- os_ << "Map < ";
- map->type()->Apply(this);
- strmfmt(os_, ", {0}, {1} >", map->range().min(), map->range().max());
-}
-
-void RpcTypeNameGenerator::GenerateCodeForStruct(const Struct* strct) {
- if (!MaybeWrapWithAvailabilitySpecifier(strct)) {
- os_ << TypeNamespacePrefix(interface_, strct) + strct->name();
- }
-}
-
-void RpcTypeNameGenerator::GenerateCodeForTypedef(const Typedef* tdef) {
- if (!MaybeWrapWithAvailabilitySpecifier(tdef)) {
- os_ << TypeNamespacePrefix(interface_, tdef) + tdef->name();
- }
-}
-
-bool RpcTypeNameGenerator::MaybeWrapWithAvailabilitySpecifier(const Type* type) {
- if (skip_availaiblity_specifier_) {
- return false;
- } else {
- skip_availaiblity_specifier_ = true;
- os_ << (mandatory_ ? "Mandatory< " : "Optional < ");
- type->Apply(this);
- os_ << " >";
- return true;
- }
-}
-
-TypeProperties::TypeProperties(const Type* type)
- : container_(false) {
- type->Apply(this);
-}
-
-bool TypeProperties::is_container() const {
- return container_;
-}
-
-void TypeProperties::GenerateCodeForBoolean(const Boolean* boolean) {
-}
-
-void TypeProperties::GenerateCodeForInteger(const Integer* integer) {
-}
-
-void TypeProperties::GenerateCodeForFloat(const Float* flt) {
-}
-
-void TypeProperties::GenerateCodeForString(const String* string) {
-}
-
-void TypeProperties::GenerateCodeForEnum(const Enum* enm) {
-}
-
-void TypeProperties::GenerateCodeForArray(const Array* array) {
- container_ = true;
-}
-
-void TypeProperties::GenerateCodeForMap(const Map* map) {
- container_ = true;
-}
-
-void TypeProperties::GenerateCodeForStruct(const Struct* strct) {
-}
-
-void TypeProperties::GenerateCodeForTypedef(const Typedef* tdef) {
- tdef->type()->Apply(this);
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/CMakeLists.txt b/SDL_Core/tools/intergen/model/CMakeLists.txt
deleted file mode 100644
index e69c12921..000000000
--- a/SDL_Core/tools/intergen/model/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-include_directories(
- include
- ${pugixml_SOURCE_DIR}/../src
- ${intergen_SOURCE_DIR}/utils/include
-)
-
-set (SOURCES
- src/model/api.cc
- src/model/builtin_type.cc
- src/model/builtin_type_registry.cc
- src/model/composite_type.cc
- src/model/constant.cc
- src/model/function.cc
- src/model/interface.cc
- src/model/model_filter.cc
- src/model/scope.cc
- src/model/type.cc
- src/model/type_registry.cc
-)
-
-set (HEADERS
- include/model/api.h
- include/model/builtin_type.h
- include/model/builtin_type_registry.h
- include/model/composite_type.h
- include/model/constant.h
- include/model/constants_creator.h
- include/model/function.h
- include/model/interface.h
- include/model/model_filter.h
- include/model/scope.h
- include/model/type.h
- include/model/type_registry.h
-)
-
-add_library(intergen_model ${HEADERS} ${SOURCES})
-target_link_libraries(intergen_model intergen_utils pugixml)
diff --git a/SDL_Core/tools/intergen/model/include/model/api.h b/SDL_Core/tools/intergen/model/include/model/api.h
deleted file mode 100644
index 6deb18d1d..000000000
--- a/SDL_Core/tools/intergen/model/include/model/api.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef API_H_
-#define API_H_
-#include <vector>
-#include <map>
-
-#include "model/builtin_type_registry.h"
-#include "model/interface.h"
-#include "utils/macro.h"
-#include "utils/stl_utils.h"
-
-namespace pugi {
-class xml_document;
-} // namespace pugi
-
-namespace codegen {
-class ModelFilter;
-
-/*
- * Represents single parsed XML file that defines an API
- */
-class API {
- public:
- // Constructs object that represents whole API that contain
- // all the defined interfaces.
- // |model_filter| provied information on which entites to exclude
- // from API. If |auto_generate_func_ids| is true FunctionID enum
- // is generated automatically.
- API(const ModelFilter* model_filter, bool auto_generate_func_ids);
- // Follows parsed |xmldoc| collecting and validating API definitions
- // Returns false and prints to cerr on error
- bool init(const pugi::xml_document& xmldoc);
- ~API();
- // List of all interfaces collected from xml document
- const std::vector<Interface*>& interfaces() const;
- // Get interface by name
- // returns NULL if there is no interface with given name
- const Interface* InterfaceByName(const std::string& name) const;
- private:
- // Types
- typedef std::map<std::string, size_t> InterfacesIndex;
- private:
- // Methods
- bool AddInterfaces(const pugi::xml_node& xmldoc);
- private:
- // Fields
- const ModelFilter* model_filter_;
- bool auto_generate_func_ids_;
- BuiltinTypeRegistry builtin_type_registry_;
- std::vector<Interface*> interfaces_;
- utils::StdContainerDeleter<std::vector<Interface*> > interfaces_deleter_;
- InterfacesIndex interfaces_index_;
- DISALLOW_COPY_AND_ASSIGN(API);
-};
-
-} // namespace codegen
-
-#endif /* API_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/builtin_type.h b/SDL_Core/tools/intergen/model/include/model/builtin_type.h
deleted file mode 100644
index a9951a253..000000000
--- a/SDL_Core/tools/intergen/model/include/model/builtin_type.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BUILTIN_TYPE_H_
-#define BUILTIN_TYPE_H_
-
-#include <stdint.h>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "model/constants_creator.h"
-#include "model/type.h"
-#include "utils/common_types.h"
-
-namespace codegen {
-
-/*
- * Boolean type
- */
-class Boolean : public Type, public ConstantsCreator {
- public:
- // Types
- class Constant;
- public:
- // Methods
- Boolean();
- ~Boolean();
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
- // codegen::SupportsLiterals methods
- virtual const codegen::Constant* ConstantFor(
- const std::string& literal) const;
-
- public:
- // Complete inner class declarations
-
- private:
- // Fields
- std::vector<Constant> constants_;
-};
-
-/*
- * Integer type
- */
-class Integer : public Type, public ConstantsCreator {
- public:
- // Types
- typedef BasicRange<int64_t> Range;
- class Constant;
- public:
- // Methods
- Integer(const Range& range);
- ~Integer();
- const Range& range() const;
- bool operator<(const Integer& that) const;
-
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
- // codegen::SupportsLiterals methods
- virtual const codegen::Constant* ConstantFor(
- const std::string& literal) const;
- private:
- // Fields
- Range range_;
- mutable std::set<Constant> constants_;
-};
-
-/*
- * Float type
- */
-class Float : public Type, public ConstantsCreator {
- public:
- // Types
- typedef BasicRange<double> Range;
- class Constant;
- public:
- // Methods
- Float(const Range& range);
- ~Float();
- const Range& range() const;
- bool operator<(const Float& that) const;
-
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
- // codegen::SupportsLiterals methods
- virtual const codegen::Constant* ConstantFor(
- const std::string& literal) const;
- private:
- // Fields
- Range range_;
- mutable std::set<Constant> constants_;
-};
-
-/*
- * String type
- */
-class String : public Type {
- public:
- // Types
- typedef BasicRange<int64_t> Range;
-public:
- // Methods
- String(const Range& range);
- bool operator<(const String& that) const;
- const Range& length_range() const;
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
-
-private:
- // Fields
- Range length_range_;
-};
-
-} // namespace codegen
-
-#endif /* BUILTIN_TYPE_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/builtin_type_registry.h b/SDL_Core/tools/intergen/model/include/model/builtin_type_registry.h
deleted file mode 100644
index 1730984cc..000000000
--- a/SDL_Core/tools/intergen/model/include/model/builtin_type_registry.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BUILTIN_TYPE_REGISTRY_H_
-#define BUILTIN_TYPE_REGISTRY_H_
-
-#include <stdint.h>
-#include <set>
-#include <string>
-
-#include "model/builtin_type.h"
-#include "model/type.h"
-
-namespace pugi {
-class xml_node;
-} // namespace pugi
-
-namespace codegen {
-
-/*
- * Factory and owner of all built-in types graph.
- * Types have restrictions which are considered to be part of type
- * (not part of struct field / function parameter definition)
- */
-class BuiltinTypeRegistry {
- public:
- // List of all built-in types managed by this type registry
- enum BuiltInType {
- kBoolean,
- kString,
- kInteger,
- kFloat,
- kNotABuiltInType
- };
- BuiltinTypeRegistry();
- ~BuiltinTypeRegistry();
- // Checks whether |type_name| is a built-in type name and returns
- // appropriate BuiltInType value.
- // Returns kNotABuiltInType if |type_name| contains unknown type name.
- BuiltInType BuiltInTypeByName(const std::string& type_name);
- // Creates type object based on it's |type_id| and type-dependent
- // xml |params| and stores it into |type|.
- // If |params| doesn't contain all required parameters,
- // |type| is left untouched and false is returned.
- bool GetType(BuiltInType type_id, const pugi::xml_node& params,
- const Type** type);
- private:
- // Caching factories for supported types
- const Boolean* GetBoolean();
- const Integer* GetInteger(const Integer::Range& range);
- const Float* GetFloat(const Float::Range& range);
- const String* GetString(const String::Range& length_range);
- private:
- Boolean boolean_;
- std::set<Integer> integers_;
- std::set<Float> floats_;
- std::set<String> strings_;
-};
-
-} // namespace codegen
-
-#endif /* BUILTIN_TYPE_REGISTRY_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/composite_type.h b/SDL_Core/tools/intergen/model/include/model/composite_type.h
deleted file mode 100644
index e26a39455..000000000
--- a/SDL_Core/tools/intergen/model/include/model/composite_type.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef COMPOSITE_TYPE_H_
-#define COMPOSITE_TYPE_H_
-
-#include <stdint.h>
-#include <map>
-#include <string>
-#include <list>
-
-#include "model/constants_creator.h"
-#include "model/scope.h"
-#include "model/type.h"
-#include "utils/common_types.h"
-#include "utils/macro.h"
-
-
-namespace codegen {
-class Interface;
-
-class Array : public Type {
- public:
- // Types
- typedef BasicRange<int64_t> Range;
- public:
- // Methods
- Array(const Type* type, const Range& range);
- ~Array();
- const Type* type() const;
- const Range& range() const;
- bool operator<(const Array& that) const;
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
-
- private:
- // Fields
- const Type* type_;
- Range range_;
-};
-
-class Map : public Type {
- public:
- // Types
- typedef BasicRange<int64_t> Range;
- public:
- // Methods
- Map(const Type* type, const Range& range);
- ~Map();
- const Type* type() const;
- const Range& range() const;
- bool operator<(const Map& that) const;
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
-
- private:
- // Fields
- const Type* type_;
- Range range_;
-};
-
-class Enum : public Type, public ConstantsCreator {
- public:
- // Types
- class Constant;
- typedef std::list<Enum::Constant> ConstantsList;
- typedef std::map<std::string, Constant*> ConstantsByName;
-public:
- // Constants
- // Name of enum that enlists IDs of all interface functions
- static const char* kFunctionIdEnumName;
- public:
- // Methods
- Enum(const Interface* interface,
- const std::string& name,
- Scope scope,
- InternalScope internal_scope,
- const Description& description);
- ~Enum();
- const Interface& interface() const;
- const std::string& name() const;
- const ConstantsList& constants() const;
- const ConstantsByName& constants_by_name() const;
- const Scope& scope() const;
- const InternalScope& internal_scope() const;
- const Description& description() const;
-
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
- // codegen::ConstantsCreator methods
- virtual const codegen::Constant* ConstantFor(
- const std::string& literal) const;
- bool AddConstant(const std::string& name, Scope scope,
- const std::string& internal_name,
- const Description& description,
- const std::string& design_description);
- bool AddConstant(const std::string& name, const int64_t value, Scope scope,
- const std::string& internal_name,
- const Description& description,
- const std::string& design_description);
- private:
- // Fields
- const Interface* interface_;
- std::string name_;
- ConstantsList constants_;
- Scope scope_;
- InternalScope internal_scope_;
- Description description_;
-
- ConstantsByName constants_by_name_;
- int64_t last_constant_value_;
- DISALLOW_COPY_AND_ASSIGN(Enum);
-};
-
-/*
- * Struct type
- */
-class Struct : public Type {
- public:
- // Types
- class Field;
- typedef std::vector<Field> FieldsList;
- public:
- // Methods
- Struct(const Interface* interface,
- const std::string& name, Scope scope,
- const Description& description);
- ~Struct();
- const Interface& interface() const;
- const std::string& name() const;
- const Description& description() const;
- const FieldsList& fields() const;
- const Scope& scope() const;
- bool AddField(const Type* type, const std::string& name, bool mandatory,
- Scope scope, const Constant* default_value,
- const Description& description, Platform platform);
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
-
- private:
- // Fields
- const Interface* interface_;
- std::string name_;
- Scope scope_;
- Description description_;
- FieldsList fields_;
- DISALLOW_COPY_AND_ASSIGN(Struct);
-};
-
-class Struct::Field {
- public:
- // Methods
- const Type* type() const;
- const std::string& name() const;
- bool is_mandatory() const;
- const Constant* default_value() const;
- const Scope& scope() const;
- const Description& description() const;
-
- private:
- // Methods
- Field(const Type* type, const std::string& name, bool mandatory, Scope scope,
- const Constant* default_value, const Description& description, Platform platform);
- private:
- // Fields
- const Type* type_;
- std::string name_;
- bool mandatory_;
- const Constant* default_value_;
- Scope scope_;
- Description description_;
- Platform platform_;
- friend class Struct;
-};
-
-/*
- * Typedef type
- */
-
-class Typedef : public Type {
- public:
- Typedef(const Interface* interface,
- const std::string& name,
- const Type* type,
- const Description& description);
-
- // codegen::Type methods
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const;
- virtual const ConstantsCreator* SupportsConstants() const;
- const Description& description() const;
- const Interface& interface() const;
- const std::string& name() const;
- const Type* type() const;
-
- private:
- const Interface* interface_;
- std::string name_;
- const Type* type_;
- Description description_;
-};
-
-} // namespace codegen
-
-#endif /* COMPOSITE_TYPE_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/constant.h b/SDL_Core/tools/intergen/model/include/model/constant.h
deleted file mode 100644
index b3659905c..000000000
--- a/SDL_Core/tools/intergen/model/include/model/constant.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CONSTANT_H_
-#define CONSTANT_H_
-
-#include <string>
-
-#include "model/builtin_type.h"
-#include "model/composite_type.h"
-#include "utils/common_types.h"
-
-namespace codegen {
-class Type;
-class ConstantCodeGenerator;
-
-class Constant {
- public:
- virtual const Type* type() const = 0;
- virtual void Apply(ConstantCodeGenerator* generator) const = 0;
- virtual ~Constant();
-};
-
-class Boolean::Constant : public codegen::Constant {
- public:
- ~Constant();
- bool value() const;
- bool is_valid() const;
- bool operator==(const Boolean::Constant& that) const;
- // codegen::Constant methods
- virtual const Boolean* type() const;
- virtual void Apply(ConstantCodeGenerator* generator) const;
- private:
- // Methods
- Constant(const Boolean* type, const std::string& literal);
-
- private:
- const Boolean* type_;
- bool value_;
- bool valid_;
- friend class Boolean;
-};
-
-class Integer::Constant : public codegen::Constant {
- public:
- ~Constant();
- // Methods
- int64_t value() const;
- bool is_valid() const;
- bool operator<(const Constant& that) const;
- // codegen::Constant methods
- virtual const Integer* type() const;
- virtual void Apply(ConstantCodeGenerator* generator) const;
-
- private:
- // Methods
- Constant(const Integer* type, const std::string& literal);
-
- private:
- // Fields
- const Integer* type_;
- int64_t value_;
- bool valid_;
- friend class Integer;
-};
-
-class Float::Constant : public codegen::Constant {
- public:
- ~Constant();
- // Methods
- double value() const;
- bool is_valid() const;
- bool operator<(const Constant& that) const;
- // codegen::Constant methods
- virtual const Float* type() const;
- virtual void Apply(ConstantCodeGenerator* generator) const;
-
- private:
- // Methods
- Constant(const Float* type, const std::string& literal);
-
- private:
- // Fields
- const Float* type_;
- double value_;
- bool valid_;
- friend class Float;
-};
-
-class Enum::Constant : public codegen::Constant {
- public:
- // Methods
- ~Constant();
- const std::string& name() const;
- int64_t value() const;
- bool is_value_explicit() const;
- const Scope& scope() const;
- const std::string& internal_name() const;
- const Description& description() const;
- const std::string& design_description() const;
-
- // codegen::Constant methods
- virtual const Enum* type() const;
- virtual void Apply(ConstantCodeGenerator* generator) const;
-
- private:
- // Methods
- Constant(Enum* enm, const std::string& name, const int64_t value,
- bool value_explicit, Scope scope, const std::string& internal_name,
- const Description& description, const std::string& design_description);
- private:
- // Fields
- Enum* type_;
- std::string name_;
- int64_t value_;
- bool value_explicit_;
- Scope scope_;
- std::string internal_name_;
- Description description_;
- std::string design_description_;
- friend class Enum;
-};
-
-class ConstantCodeGenerator {
- public:
- virtual void GenerateCodeForBooleanConstant(const Boolean::Constant* boolean);
- virtual void GenerateCodeForIntegerConstant(const Integer::Constant* integer);
- virtual void GenerateCodeForFloatConstant(const Float::Constant* flt);
- virtual void GenerateCodeForEnumConstant(const Enum::Constant* enm);
- virtual ~ConstantCodeGenerator();
-};
-
-} // namespace codegen
-
-#endif /* CONSTANT_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/constants_creator.h b/SDL_Core/tools/intergen/model/include/model/constants_creator.h
deleted file mode 100644
index 963598418..000000000
--- a/SDL_Core/tools/intergen/model/include/model/constants_creator.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CONSTANTS_CREATOR_H_
-#define CONSTANTS_CREATOR_H_
-
-#include <string>
-
-namespace codegen {
-class Constant;
-
-/*
- * Interface for all Types that can have values represented as string literals.
- */
-class ConstantsCreator {
- public:
- // Creates Constant value from given string literal.
- // Exact Constant type and literal parsing rules must be defined by Type
- // Implementing this interface
- // Shall return NULL if literal does not represent valid value.
- virtual const Constant* ConstantFor(const std::string& literal) const = 0;
- virtual ~ConstantsCreator();
-};
-
-} // namespace codegen
-
-#endif /* CONSTANTS_CREATOR_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/function.h b/SDL_Core/tools/intergen/model/include/model/function.h
deleted file mode 100644
index bbe32a076..000000000
--- a/SDL_Core/tools/intergen/model/include/model/function.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FUNCTION_H_
-#define FUNCTION_H_
-#include <map>
-#include <string>
-
-#include "model/constant.h"
-#include "model/scope.h"
-#include "model/type.h"
-#include "utils/common_types.h"
-#include "utils/macro.h"
-#include "utils/stl_utils.h"
-
-namespace codegen {
-class Interface;
-
-/*
- * Class representing single RPC message and it's parameters,
- * can be request, response or notification.
- * Message parameters are passed as structures so message is based
- * on it's implementation
- */
-class FunctionMessage: public Struct {
- public:
- // Types
- enum MessageType {
- kRequest,
- kResponse,
- kNotification,
- kUnknownMessageType
- };
- // Procudes string given MessageType to be used in class names
- static const char* MessageTypeToString(MessageType message_type);
-
- // Message parameters are passed as structs so every parameter
- // is a struct field
- typedef Field Parameter;
- typedef FieldsList ParametersList;
- public:
- // Methods
-
- // Returns message type named by string literal.
- // Return kUnknownMessageType if literal names unknown message type
- static MessageType MessageTypeFromLiteral(const std::string& literal);
- // Creates Function message and associates it with given |interface|
- FunctionMessage(const Interface* interface, const std::string& name,
- const Enum::Constant* id, MessageType message_type,
- const Description& description, Scope scope);
- ~FunctionMessage();
- // Returns function ID which is one of the "FunctionID" enum constants
- const Enum::Constant* id() const;
- // List of function parameters
- const ParametersList& parameters() const;
- // Constructs message parameter and stores it
- bool AddParameter(const std::string& name, const Type* type,
- const Constant* default_value, bool is_mandatory,
- const Description& description, Scope scope,
- Platform platform);
- const Interface* interface() const;
-
-private:
- const Interface* interface_;
- const Enum::Constant* id_;
- MessageType message_type_;
- DISALLOW_COPY_AND_ASSIGN(FunctionMessage);
-};
-
-typedef FunctionMessage Request;
-typedef FunctionMessage Response;
-typedef FunctionMessage Notification;
-
-/*
- * A container that bounds a request type to it's corresponding response
- * type
- */
-class Function {
- public:
- Function(const Request* request, const Response* response);
-
- const Request& request() const {
- return *request_;
- }
-
- const Response& response() const {
- return *response_;
- }
-
- private:
- const Request* request_;
- const Response* response_;
-};
-
-} // namespace codegen
-
-#endif /* FUNCTION_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/interface.h b/SDL_Core/tools/intergen/model/include/model/interface.h
deleted file mode 100644
index c1a2f5ad5..000000000
--- a/SDL_Core/tools/intergen/model/include/model/interface.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef INTERFACE_H_
-#define INTERFACE_H_
-
-#include <vector>
-#include <memory>
-
-#include "model/function.h"
-#include "model/composite_type.h"
-#include "model/type_registry.h"
-#include "utils/stl_utils.h"
-
-namespace pugi {
-class xml_node;
-} // namespace pugi
-
-namespace codegen {
-class API;
-class BuiltinTypeRegistry;
-class Interface;
-class ModelFilter;
-
-/*
- * An interface found in XML document. Holds a registry of all the
- * structs, enums and functions found in interface definition
- */
-class Interface {
- public:
- // Types
- typedef std::map<std::string, FunctionMessage*> MessagesMap;
- typedef std::vector<Function> FunctionsList;
- typedef std::vector<const Request*> RequestList;
- typedef std::vector<const Response*> ResponseList;
- typedef std::vector<const Notification*> NotificationList;
- typedef TypeRegistry::EnumList EnumList;
- typedef TypeRegistry::StructList StructList;
- typedef TypeRegistry::TypedefList TypedefList;
- public:
- // Methods
- Interface(const API* api,
- bool auto_generate_function_ids,
- BuiltinTypeRegistry* builtin_type_registry,
- const ModelFilter* model_filter);
- ~Interface();
- // API this interface belongs to
- const API& api() const;
- // Name of the interface
- const std::string& name() const;
- // List of all functions (requests and appropriate responses) in the interface
- const FunctionsList& functions() const;
- // List of all requests in the interface
- RequestList all_requests() const;
- // List of all the responses (including generic) in the interface
- ResponseList all_responses() const;
- // List of all the notifications in the interface
- const NotificationList& notifications() const;
- // List of generic responses that are not connected to particular request
- const ResponseList& generic_responses() const;
- // List of all the enums defined in the interface (exept FunctionID special purpose enum)
- const EnumList& enums() const;
- // List of all structs defined in the interface
- const StructList& structs() const;
- // List of all typedefs defined in the interface
- const TypedefList& typedefs() const;
- // Special-purpose enum that assigns numerical ID's for all API messages
- const Enum* function_id_enum() const;
-
- // Follows parsed |xml| document validating and constructin type tree
- bool init(const pugi::xml_node& xml);
-
- // Finds a type with |name| defined in this interface
- const Type* GetNamedType(const std::string& name) const;
-
- private:
- // Methods
- // Finds (or creates, depending on generation prefs) function id
- // enum constant given |function_id|
- const Enum::Constant* GetFunctionIdEnumConstant(
- const std::string& function_id);
- // Find and add all the functions from the given |xml_interafce|
- bool AddFunctions(const pugi::xml_node& xml_interface);
- // Validate and add single function message
- bool AddFunctionMessage(MessagesMap* list,
- FunctionMessage::MessageType message_type,
- const pugi::xml_node& xml_message);
- // Validate and add all the function message parameters
- bool AddFunctionMessageParameters(FunctionMessage* function_message,
- const pugi::xml_node& xml_message);
- bool SeparateFunctionMessages();
- private:
- // Fields
- std::string name_;
- const API* api_;
- BuiltinTypeRegistry* builtin_type_registry_;
- const ModelFilter* model_filter_;
- bool auto_generate_function_ids_;
- Enum function_ids_enum_;
- TypeRegistry type_registry_;
- MessagesMap requests_;
- utils::StdMapDeleter<MessagesMap> requests_deleter_;
- MessagesMap responses_;
- utils::StdMapDeleter<MessagesMap> responses_deleter_;
- MessagesMap notifications_;
- utils::StdMapDeleter<MessagesMap> notifications_deleter_;
- FunctionsList functions_list_;
- ResponseList generic_responses_list_;
- NotificationList notifications_list_;
- private:
- DISALLOW_COPY_AND_ASSIGN(Interface);
-};
-
-} // namespace codegen
-
-#endif /* INTERFACE_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/model_filter.h b/SDL_Core/tools/intergen/model/include/model/model_filter.h
deleted file mode 100644
index e0e4f1f6c..000000000
--- a/SDL_Core/tools/intergen/model/include/model/model_filter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MODEL_FILTER_H
-#define MODEL_FILTER_H
-
-#include <set>
-
-#include "model/scope.h"
-
-namespace codegen {
-
-/*
- * Class represents modifications that should be done to parsed model while
- * building it from xml
- */
-class ModelFilter {
-public:
- // Creates filter that skips all entities marked with scope
- ModelFilter(const std::set<std::string>& filtered_scope_names);
- // Tells whether entity with this scope should be skipped
- bool ShouldFilterScope(const Scope& scope) const;
-private:
- const std::set<Scope> filtered_scopes_;
-};
-
-} // namespace codegen
-
-#endif // MODEL_FILTER_H
diff --git a/SDL_Core/tools/intergen/model/include/model/scope.h b/SDL_Core/tools/intergen/model/include/model/scope.h
deleted file mode 100644
index 92dbbd5d5..000000000
--- a/SDL_Core/tools/intergen/model/include/model/scope.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* Copyright (c) 2014, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SCOPE_H_
-#define SCOPE_H_
-#include <string>
-#include <iosfwd>
-
-namespace codegen {
-
-// Here are defined types for different scope qualifier found in XML specification
-// It is not yet clear what they are and how to use them so they are just strings
-typedef std::string Scope;
-typedef std::string InternalScope;
-typedef std::string Platform;
-
-Scope ScopeFromLiteral(const std::string& literal);
-InternalScope InternalScopeFromLiteral(const std::string& literal);
-Platform PlatformFromLiteral(const std::string& literal);
-
-} // namespace codegen
-
-#endif /* SCOPE_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/type.h b/SDL_Core/tools/intergen/model/include/model/type.h
deleted file mode 100644
index b66390715..000000000
--- a/SDL_Core/tools/intergen/model/include/model/type.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TYPE_H_
-#define TYPE_H_
-
-
-namespace codegen {
-
-class Boolean;
-class Integer;
-class Float;
-class String;
-class Enum;
-class Array;
-class Map;
-class Struct;
-class Typedef;
-
-class ConstantsCreator;
-
-/*
- * An interface for Type visitor that is used to generate code
- * for one of the types (built-in or composite)
- * An object implementing TypeCodeGenerator should be applied to
- * the abstract Type, which in turn calls one of the methods below
- * methods depending on it's exact type.
- */
-class TypeCodeGenerator {
- public:
- // Called to generate code for exact type
- virtual void GenerateCodeForBoolean(const Boolean* boolean);
- virtual void GenerateCodeForInteger(const Integer* integer);
- virtual void GenerateCodeForFloat(const Float* flt);
- virtual void GenerateCodeForString(const String* string);
- virtual void GenerateCodeForEnum(const Enum* enm);
- virtual void GenerateCodeForArray(const Array* array);
- virtual void GenerateCodeForMap(const Map* map);
- virtual void GenerateCodeForStruct(const Struct* strct);
- virtual void GenerateCodeForTypedef(const Typedef* tdef);
- virtual ~TypeCodeGenerator();
-};
-
-/*
- * An interface for all the types that can be defined by XML interface specification.
- */
-class Type {
- public:
- // Accepts |code_generator| visitor calling one of it's methods
- // (depending on exact type) with this object
- virtual TypeCodeGenerator* Apply(TypeCodeGenerator* code_generator) const = 0;
- // Get factory that creates constants from given string literals
- // Returns NULL if type values can not be represented with string literals
- virtual const ConstantsCreator* SupportsConstants() const = 0;
- virtual ~Type();
-};
-
-
-} // namespace codegen
-
-#endif /* TYPE_H_ */
diff --git a/SDL_Core/tools/intergen/model/include/model/type_registry.h b/SDL_Core/tools/intergen/model/include/model/type_registry.h
deleted file mode 100644
index b02886a37..000000000
--- a/SDL_Core/tools/intergen/model/include/model/type_registry.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TYPE_REGISTRY_H_
-#define TYPE_REGISTRY_H_
-
-#include <map>
-#include <set>
-#include <string>
-#include <list>
-
-#include "model/composite_type.h"
-#include "model/type.h"
-#include "utils/macro.h"
-#include "utils/stl_utils.h"
-
-namespace pugi {
-class xml_node;
-} // namespace pugi
-
-namespace codegen {
-class BuiltinTypeRegistry;
-class ModelFilter;
-
-/*
- * Type registry is a container holding definitions of all the structs and
- * enums found in a single interface xml document element.
- */
-class TypeRegistry {
- public:
- // Types
- typedef std::list<Enum*> EnumList;
- typedef std::map<std::string, const Enum*> EnumByName;
- typedef std::list<Struct*> StructList;
- typedef std::map<std::string, const Struct*> StructByName;
- typedef std::list<Typedef*> TypedefList;
- typedef std::map<std::string, const Typedef*> TypedefByName;
- public:
- // Methods
- TypeRegistry(const Interface* interface,
- BuiltinTypeRegistry* builtin_type_registry,
- Enum* function_ids_enum,
- const ModelFilter* model_filter,
- bool create_function_id_enum);
- ~TypeRegistry();
- // Follows given xml_node collectin all the struct and enum definitons
- // Returns false and prints to cerr if invalid type definition was found
- bool init(const pugi::xml_node& xml);
- // Finds (or creates) Type object corresponding to type name and parameters
- // found in |params|.
- // Returns false if unknown type or invalid params were found
- bool GetCompositeType(const pugi::xml_node& params, const Type** type);
- // Finds type delcare in this interface with given name.
- // Type can be enum, struct or typedef
- // Returns NULL no type with such name registered
- const Type* GetType(const std::string& name) const;
-
- // Returns list of all enums keeping order of definitions in xml
- const EnumList& enums() const;
- // Returns list of all structs keeping order of definitions in xml
- const StructList& structs() const;
-
- // Returns list of all typedefs keeping order of definitions in xml
- const TypedefList& typedefs() const;
-
- // Tells if param which properties are passed in |param| is mandatory
- static bool IsMandatoryParam(const pugi::xml_node& param);
-
- private:
- // methods
- bool AddEnums(const pugi::xml_node& xml);
- bool AddStructsAndTypedefs(const pugi::xml_node& xml);
- bool AddEnum(const pugi::xml_node& xml_enum);
- bool AddStruct(const pugi::xml_node& xml_struct);
- bool AddTypedef(const pugi::xml_node& xml_typedef);
- bool AddEnumConstants(Enum* enm, const pugi::xml_node& xml_enum);
- bool AddStructureFields(Struct* strct, const pugi::xml_node& xml_struct);
- // Create container (map or array) |type| object based on xml |params|
- // if |get_array| is true array is created, otherwise map is created
- // Returns false and prints to cerr on error
- bool GetContainer(const pugi::xml_node& params, const Type** type,
- bool get_array);
- bool GetNonArray(const pugi::xml_node& params, const Type** type);
- bool GetEnum(const std::string& name, const Type** type) const;
- bool GetStruct(const std::string& name, const Type** type) const;
- bool GetTypedef(const std::string& name, const Type** type) const;
- bool GetExternalType(const std::string& full_type_name,
- const Type** type) const;
- bool IsRegisteredEnum(const std::string& enum_name) const;
- bool IsRegisteredStruct(const std::string& struct_name) const;
- bool IsRegisteredTypedef(const std::string& typedef_name) const;
- bool IsExternalType(const std::string& full_type_name) const;
- private:
- // fields
- const Interface* interface_;
- BuiltinTypeRegistry* builtin_type_registry_;
- Enum* function_ids_enum_;
- const ModelFilter* model_filter_;
- std::set<Array> arrays_;
- std::set<Map> maps_;
- EnumList enums_;
- utils::StdContainerDeleter<EnumList> enums_deleter_;
- EnumByName enum_by_name_;
- StructList structs_;
- utils::StdContainerDeleter<StructList> structs_deleter_;
- StructByName struct_by_name_;
- TypedefList typedefs_;
- utils::StdContainerDeleter<TypedefList> typedefs_deleter_;
- TypedefByName typedef_by_name_;
- private:
- DISALLOW_COPY_AND_ASSIGN(TypeRegistry);
-};
-
-} // namespace codegen
-
-#endif /* TYPE_REGISTRY_H_ */
diff --git a/SDL_Core/tools/intergen/model/src/model/api.cc b/SDL_Core/tools/intergen/model/src/model/api.cc
deleted file mode 100644
index 8fa3987fa..000000000
--- a/SDL_Core/tools/intergen/model/src/model/api.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/api.h"
-
-#include <cassert>
-#include <iostream>
-
-#include "model/constant.h"
-#include "pugixml.hpp"
-
-namespace codegen {
-
-API::API(const ModelFilter* model_filter, bool auto_generate_func_ids)
- : model_filter_(model_filter),
- auto_generate_func_ids_(auto_generate_func_ids),
- interfaces_deleter_(&interfaces_) {
- assert(model_filter_);
-}
-
-bool API::init(const pugi::xml_document& xmldoc) {
- // Search for interfaces defined directly in given root document
- if (!AddInterfaces(xmldoc)) {
- return false;
- }
- // Then search for interfaces defined in <interfaces> elements
- for (pugi::xml_node i = xmldoc.child("interfaces"); i;
- i = i.next_sibling("interfaces")) {
- if (!AddInterfaces(i)) {
- return false;
- }
- }
- return true;
-}
-
-API::~API() {
-}
-
-const std::vector<Interface*>& API::interfaces() const {
- return interfaces_;
-}
-
-const Interface* API::InterfaceByName(const std::string& name) const {
- InterfacesIndex::const_iterator i = interfaces_index_.find(name);
- if (i != interfaces_index_.end()) {
- size_t interface_id = i->second;
- assert(interface_id < interfaces_.size());
- return interfaces_[interface_id];
- }
- return NULL;
-}
-
-bool API::AddInterfaces(const pugi::xml_node& xmldoc) {
- for (pugi::xml_node i = xmldoc.child("interface"); i;
- i = i.next_sibling("interface")) {
- Interface* interface = new Interface(this,
- auto_generate_func_ids_,
- &builtin_type_registry_,
- model_filter_);
- interfaces_.push_back(interface);
- if (!interface->init(i)) {
- return false;
- }
- bool inserted = interfaces_index_.insert(
- std::make_pair(
- interface->name(),
- interfaces_.size() - 1)
- ).second;
- if (!inserted) {
- std::cerr << "Duplicate interface: " << interface->name() << '\n';
- return false;
- }
- }
- return true;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/builtin_type.cc b/SDL_Core/tools/intergen/model/src/model/builtin_type.cc
deleted file mode 100644
index b551bb76f..000000000
--- a/SDL_Core/tools/intergen/model/src/model/builtin_type.cc
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/builtin_type.h"
-
-#include "model/constant.h"
-
-namespace codegen {
-
-/*
- * Boolean type
- */
-Boolean::Boolean() {
- constants_.push_back(Constant(this, "false"));
- constants_.push_back(Constant(this, "true"));
-}
-
-Boolean::~Boolean() {
-}
-
-TypeCodeGenerator* Boolean::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForBoolean(this);
- return code_generator;
-}
-
-const ConstantsCreator* Boolean::SupportsConstants() const {
- return this;
-}
-
-const codegen::Constant* Boolean::ConstantFor(
- const std::string& literal) const {
- Boolean::Constant constant(this, literal);
- if (constant.is_valid()) {
- return constant == constants_[0] ? &constants_[0] : &constants_[1];
- } else {
- return NULL;
- }
-}
-
-Integer::Integer(const Range& range)
- : range_(range) {
-}
-
-Integer::~Integer() {
-}
-
-const Integer::Range& Integer::range() const {
- return range_;
-}
-
-bool Integer::operator <(const Integer& that) const {
- if (range_.min() != that.range_.min())
- return range_.min() < that.range_.min();
- return range_.max() < that.range_.max();
-}
-
-TypeCodeGenerator* Integer::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForInteger(this);
- return code_generator;
-}
-
-const ConstantsCreator* Integer::SupportsConstants() const {
- return this;
-}
-
-const Constant* Integer::ConstantFor(const std::string& literal) const {
- Integer::Constant constant(this, literal);
- if (constant.is_valid()) {
- return &*constants_.insert(constant).first;
- } else {
- return NULL;
- }
-}
-
-Float::Float(const Range& range)
- : range_(range) {
-}
-
-Float::~Float() {
-}
-
-const Float::Range& Float::range() const {
- return range_;
-}
-
-bool Float::operator <(const Float& that) const {
- if (range_.min() != that.range_.min())
- return range_.min() < that.range_.min();
- return range_.max() < that.range_.max();
-}
-
-TypeCodeGenerator* Float::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForFloat(this);
- return code_generator;
-}
-
-const ConstantsCreator* Float::SupportsConstants() const {
- return this;
-}
-
-const Constant* Float::ConstantFor(const std::string& literal) const {
- Float::Constant constant(this, literal);
- if (constant.is_valid()) {
- return &*constants_.insert(constant).first;
- } else {
- return NULL;
- }
-}
-
-String::String(const Range& range)
- : length_range_(range) {
-}
-
-bool String::operator <(const String& that) const {
- if (length_range_.min() != that.length_range_.min())
- return length_range_.min() < that.length_range_.min();
- return length_range_.max() < that.length_range_.max();
-}
-
-const String::Range& String::length_range() const {
- return length_range_;
-}
-
-TypeCodeGenerator* String::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForString(this);
- return code_generator;
-}
-
-const ConstantsCreator* String::SupportsConstants() const {
- return NULL;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/builtin_type_registry.cc b/SDL_Core/tools/intergen/model/src/model/builtin_type_registry.cc
deleted file mode 100644
index 2c5460352..000000000
--- a/SDL_Core/tools/intergen/model/src/model/builtin_type_registry.cc
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/builtin_type_registry.h"
-
-#include <stdint.h>
-#include <iostream>
-#include <map>
-#include <utility>
-
-#include "pugixml.hpp"
-#include "model/constant.h"
-#include "utils/string_utils.h"
-
-namespace codegen {
-
-BuiltinTypeRegistry::BuiltinTypeRegistry() {
-}
-
-BuiltinTypeRegistry::~BuiltinTypeRegistry() {
-}
-
-const Boolean* BuiltinTypeRegistry::GetBoolean() {
- return &boolean_;
-}
-
-const Integer* BuiltinTypeRegistry::GetInteger(const Integer::Range& range) {
- Integer integer(range);
- return &*integers_.insert(integer).first;
-}
-
-const Float* BuiltinTypeRegistry::GetFloat(const Float::Range& range) {
- Float flt(range);
- return &*floats_.insert(flt).first;
-}
-
-const String* BuiltinTypeRegistry::GetString(const String::Range& length_range) {
- String string(length_range);
- return &*strings_.insert(string).first;
-}
-
-BuiltinTypeRegistry::BuiltInType BuiltinTypeRegistry::BuiltInTypeByName(
- const std::string& type_name) {
- if (type_name == "Boolean") {
- return kBoolean;
- } else if (type_name == "Integer") {
- return kInteger;
- } else if (type_name == "String") {
- return kString;
- } else if (type_name == "Float") {
- return kFloat;
- } else {
- return kNotABuiltInType;
- }
-}
-
-bool BuiltinTypeRegistry::GetType(BuiltInType type_id,
- const pugi::xml_node& params,
- const Type** type) {
- switch (type_id) {
- case kBoolean: {
- *type = GetBoolean();
- return true;
- }
- case kString: {
- std::string min_length_str = params.attribute("minlength").as_string("1");
- std::string max_length_str = params.attribute("maxlength").as_string("0");
- int64_t min_length, max_length;
- if (StringToNumber(min_length_str, &min_length)
- && StringToNumber(max_length_str, &max_length)) {
- *type = GetString(String::Range(min_length, max_length));
- return true;
- } else {
- std::cerr << "Incorrect length value provided for string: "
- << max_length_str << std::endl;
- *type = NULL;
- return false;
- }
- }
- case kInteger: {
- std::string min_val_str = params.attribute("minvalue").as_string("0"),
- max_val_str = params.attribute("maxvalue").as_string("0");
- int64_t min_val, max_val;
- if (StringToNumber(min_val_str, &min_val) && StringToNumber(max_val_str, &max_val)) {
- *type = GetInteger(Integer::Range(min_val, max_val));
- return true;
- } else {
- std::cerr << "Incorrect range for integer provided: " << min_val_str
- << ", " << max_val_str << std::endl;
- return false;
- }
- }
- case kFloat: {
- std::string min_val_str = params.attribute("minvalue").as_string("0"),
- max_val_str = params.attribute("maxvalue").as_string("0");
- double min_val, max_val;
- if (StringToNumber(min_val_str, &min_val) && StringToNumber(max_val_str, &max_val)) {
- *type = GetFloat(Float::Range(min_val, max_val));
- return true;
- } else {
- std::cerr << "Incorrect range for float provided: " << min_val_str
- << ", " << max_val_str << std::endl;
- return false;
- }
- }
- default: {
- std::cerr << "Unknown built-in type";
- *type = NULL;
- return false;
- }
- }
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/model/src/model/composite_type.cc b/SDL_Core/tools/intergen/model/src/model/composite_type.cc
deleted file mode 100644
index ced54efd3..000000000
--- a/SDL_Core/tools/intergen/model/src/model/composite_type.cc
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/composite_type.h"
-
-#include <cassert>
-#include <iostream>
-#include <utility>
-
-#include "model/constant.h"
-#include "utils/safeformat.h"
-#include "utils/common_types.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-/*
- * Array type
- */
-Array::Array(const Type* type, const Range& range)
- : type_(type),
- range_(range) {
-}
-
-Array::~Array() {
-}
-
-const Type* Array::type() const {
- return type_;
-}
-
-const Array::Range& Array::range() const {
- return range_;
-}
-
-bool Array::operator <(const Array& that) const {
- if (type_ != that.type_) {
- return size_t(type_) < size_t(that.type_);
- }
- if (range_.min() == that.range_.min())
- return range_.min() < that.range_.min();
- return range_.max() < that.range_.max();
-}
-
-TypeCodeGenerator* Array::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForArray(this);
- return code_generator;
-}
-
-const ConstantsCreator* Array::SupportsConstants() const {
- return NULL;
-}
-
-/*
- * Map type
- */
-Map::Map(const Type* type, const Range& range)
- : type_(type),
- range_(range) {
-}
-
-Map::~Map() {
-}
-
-const Type* Map::type() const {
- return type_;
-}
-
-const Map::Range& Map::range() const {
- return range_;
-}
-
-bool Map::operator <(const Map& that) const {
- if (type_ != that.type_) {
- return size_t(type_) < size_t(that.type_);
- }
- if (range_.min() == that.range_.min())
- return range_.min() < that.range_.min();
- return range_.max() < that.range_.max();
-}
-
-TypeCodeGenerator* Map::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForMap(this);
- return code_generator;
-}
-
-const ConstantsCreator* Map::SupportsConstants() const {
- return NULL;
-}
-
-/*
- * Enum type
- */
-
-// static
-const char* Enum::kFunctionIdEnumName = "FunctionID";
-
-Enum::Enum(const Interface* interface,
- const std::string& name,
- Scope scope,
- InternalScope internal_scope,
- const Description& description)
- : interface_(interface),
- name_(name),
- scope_(scope),
- internal_scope_(internal_scope),
- description_(description),
- last_constant_value_(-1) {
- assert(interface);
-}
-
-Enum::~Enum() {
-}
-
-const Interface& Enum::interface() const {
- return *interface_;
-}
-
-const std::string& Enum::name() const {
- return name_;
-}
-
-const Enum::ConstantsList& Enum::constants() const {
- return constants_;
-}
-
-const Enum::ConstantsByName& Enum::constants_by_name() const {
- return constants_by_name_;
-}
-
-const Scope& Enum::scope() const {
- return scope_;
-}
-
-const InternalScope& Enum::internal_scope() const {
- return internal_scope_;
-}
-
-const Description& Enum::description() const {
- return description_;
-}
-
-TypeCodeGenerator* Enum::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForEnum(this);
- return code_generator;
-}
-
-const ConstantsCreator* Enum::SupportsConstants() const {
- return this;
-}
-
-const codegen::Constant* Enum::ConstantFor(const std::string& literal) const {
- ConstantsByName::const_iterator i = constants_by_name_.find(literal);
- if (i != constants_by_name_.end())
- return i->second;
- else {
- return NULL;
- }
-}
-
-bool Enum::AddConstant(const std::string& name, Scope scope,
- const std::string& internal_name,
- const Description& description,
- const std::string& design_description) {
- if (ConstantFor(name) != NULL) {
- strmfmt(std::cerr, "Constant {0} already defined in enum {1}\n", name,
- name_);
- return false;
- }
- constants_.push_back(
- Constant(this, name, last_constant_value_ + 1, false, scope, internal_name,
- description, design_description));
- constants_by_name_[name] = &constants_.back();
- ++last_constant_value_;
- return true;
-}
-
-bool Enum::AddConstant(const std::string& name, const int64_t value,
- Scope scope, const std::string& internal_name,
- const Description& description,
- const std::string& design_description) {
- if (ConstantFor(name) != NULL) {
- strmfmt(std::cerr, "Constant {0} already defined in enum {1}\n", name,
- name_);
- return false;
- }
- constants_.push_back(
- Constant(this, name, value, true, scope, internal_name, description,
- design_description));
- constants_by_name_[name] = &constants_.back();
- last_constant_value_ = value;
- return true;
-}
-
-
-/*
- * Struct type
- */
-Struct::Struct(const Interface* interface,
- const std::string& name,
- Scope scope,
- const Description& description)
- : interface_(interface),
- name_(name),
- scope_(scope),
- description_(description) {
- assert(interface_);
-}
-
-Struct::~Struct() {
-}
-
-const std::string& Struct::Field::name() const {
- return name_;
-}
-
-bool Struct::Field::is_mandatory() const {
- return mandatory_;
-}
-
-const Description& Struct::description() const {
- return description_;
-}
-
-const Struct::FieldsList& Struct::fields() const {
- return fields_;
-}
-
-const Scope& Struct::scope() const {
- return scope_;
-}
-
-bool Struct::AddField(const Type* type, const std::string& name, bool mandatory,
- Scope scope, const Constant* default_value,
- const Description& description, Platform platform) {
- fields_.push_back(
- Field(type, name, mandatory, scope, default_value, description, platform));
- return true;
-}
-
-TypeCodeGenerator* Struct::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForStruct(this);
- return code_generator;
-}
-
-const ConstantsCreator* Struct::SupportsConstants() const {
- return NULL;
-}
-
-const Type* Struct::Field::type() const {
- return type_;
-}
-
-const Interface& Struct::interface() const {
- return *interface_;
-}
-
-const std::string& Struct::name() const {
- return name_;
-}
-
-const Constant* Struct::Field::default_value() const {
- return default_value_;
-}
-
-const Scope& Struct::Field::scope() const {
- return scope_;
-}
-
-const Description& Struct::Field::description() const {
- return description_;
-}
-
-Struct::Field::Field(const Type* type, const std::string& name, bool mandatory,
- Scope scope, const Constant* default_value,
- const Description& description, Platform platform)
- : type_(type),
- name_(name),
- mandatory_(mandatory),
- default_value_(default_value),
- scope_(scope),
- description_(description),
- platform_(platform){
-}
-
-Typedef::Typedef(const Interface* interface,
- const std::string& name,
- const Type* type,
- const Description& description)
- : interface_(interface),
- name_(name),
- type_(type),
- description_(description) {
- assert(interface_);
-}
-
-const Description& Typedef::description() const {
- return description_;
-}
-
-
-const Interface& Typedef::interface() const {
- return *interface_;
-}
-
-const std::string& Typedef::name() const {
- return name_;
-}
-
-const Type* Typedef::type() const {
- return type_;
-}
-
-TypeCodeGenerator* Typedef::Apply(TypeCodeGenerator* code_generator) const {
- code_generator->GenerateCodeForTypedef(this);
- return code_generator;
-}
-
-const ConstantsCreator* Typedef::SupportsConstants() const {
- return NULL;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/constant.cc b/SDL_Core/tools/intergen/model/src/model/constant.cc
deleted file mode 100644
index 8320718ad..000000000
--- a/SDL_Core/tools/intergen/model/src/model/constant.cc
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/constant.h"
-
-#include "utils/string_utils.h"
-
-namespace codegen {
-
-Constant::~Constant() {
-}
-
-ConstantsCreator::~ConstantsCreator() {
-}
-
-Boolean::Constant::~Constant() {
-}
-
-bool Boolean::Constant::value() const {
- return value_;
-}
-
-bool Boolean::Constant::is_valid() const {
- return valid_;
-}
-
-bool Boolean::Constant::operator ==(const Boolean::Constant& that) const {
- return type_ == that.type_ && value_ == that.value_;
-}
-
-const Boolean* Boolean::Constant::type() const {
- return type_;
-}
-
-void Boolean::Constant::Apply(ConstantCodeGenerator* generator) const {
- generator->GenerateCodeForBooleanConstant(this);
-}
-
-Boolean::Constant::Constant(const Boolean* type, const std::string& literal)
- : type_(type),
- value_(literal == "true" ? true : false),
- valid_(literal == "true" || literal == "false") {
-}
-
-Integer::Constant::~Constant() {
-}
-
-int64_t Integer::Constant::value() const {
- return value_;
-}
-
-bool Integer::Constant::is_valid() const {
- return valid_;
-}
-
-bool Integer::Constant::operator <(const Integer::Constant& that) const {
- if (valid_ != that.valid_) {
- return int(valid_) < int(that.valid_);
- }
- if (type_ != that.type_) {
- return type_ < that.type_;
- }
- return value_ < that.value_;
-}
-
-const Integer* Integer::Constant::type() const {
- return type_;
-}
-
-void Integer::Constant::Apply(ConstantCodeGenerator* generator) const {
- generator->GenerateCodeForIntegerConstant(this);
-}
-
-Integer::Constant::Constant(const Integer* type, const std::string& literal)
- : type_(type),
- value_(0) {
- valid_ = StringToNumber(literal, &value_) && type_->range().Includes(value_);
-}
-
-Float::Constant::~Constant() {
-}
-
-double Float::Constant::value() const {
- return value_;
-}
-
-bool Float::Constant::is_valid() const {
- return valid_;
-}
-
-bool Float::Constant::operator <(const Float::Constant& that) const {
- if (valid_ != that.valid_) {
- return int(valid_) < int(that.valid_);
- }
- if (type_ != that.type_) {
- return type_ < that.type_;
- }
- return value_ < that.value_;
-}
-
-const Float* Float::Constant::type() const {
- return type_;
-}
-
-void Float::Constant::Apply(ConstantCodeGenerator* generator) const {
- generator->GenerateCodeForFloatConstant(this);
-}
-
-Float::Constant::Constant(const Float* type, const std::string& literal)
- : type_(type),
- value_(0) {
- valid_ = StringToNumber(literal, &value_) && type_->range().Includes(value_);
-}
-
-Enum::Constant::~Constant() {
-}
-
-const std::string& Enum::Constant::name() const {
- return name_;
-}
-
-int64_t Enum::Constant::value() const {
- return value_;
-}
-
-bool Enum::Constant::is_value_explicit() const {
- return value_explicit_;
-}
-
-const Scope& Enum::Constant::scope() const {
- return scope_;
-}
-
-const std::string& Enum::Constant::internal_name() const {
- return internal_name_;
-}
-
-const Description& Enum::Constant::description() const {
- return description_;
-}
-
-const std::string& Enum::Constant::design_description() const {
- return design_description_;
-}
-
-const Enum* Enum::Constant::type() const {
- return type_;
-}
-
-void Enum::Constant::Apply(ConstantCodeGenerator* generator) const {
- generator->GenerateCodeForEnumConstant(this);
-}
-
-Enum::Constant::Constant(Enum* enm, const std::string& name,
- const int64_t value, bool value_explicit, Scope scope,
- const std::string& internal_name,
- const Description& description,
- const std::string& design_description)
- : type_(enm),
- name_(name),
- value_(value),
- value_explicit_(value_explicit),
- scope_(scope),
- internal_name_(internal_name),
- description_(description),
- design_description_(design_description) {
-
-}
-
-void ConstantCodeGenerator::GenerateCodeForBooleanConstant(
- const Boolean::Constant* boolean) {
-}
-
-void ConstantCodeGenerator::GenerateCodeForIntegerConstant(
- const Integer::Constant* integer) {
-}
-
-void ConstantCodeGenerator::GenerateCodeForFloatConstant(
- const Float::Constant* flt) {
-}
-
-void ConstantCodeGenerator::GenerateCodeForEnumConstant(
- const Enum::Constant* enm) {
-}
-
-ConstantCodeGenerator::~ConstantCodeGenerator() {
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/model/src/model/function.cc b/SDL_Core/tools/intergen/model/src/model/function.cc
deleted file mode 100644
index 1826b10c4..000000000
--- a/SDL_Core/tools/intergen/model/src/model/function.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/function.h"
-
-#include <cassert>
-#include <iostream>
-
-#include "utils/safeformat.h"
-
-using std::cerr;
-using std::endl;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-// static
-const char* FunctionMessage::MessageTypeToString(
- FunctionMessage::MessageType message_type) {
- switch (message_type) {
- case FunctionMessage::kRequest:
- return "request";
- case FunctionMessage::kResponse:
- return "response";
- case FunctionMessage::kNotification:
- return "notification";
- default:
- return "";
- }
-}
-
-// static
-FunctionMessage::MessageType FunctionMessage::MessageTypeFromLiteral(
- const std::string& literal) {
- if (literal == "request") {
- return kRequest;
- } else if (literal == "response") {
- return kResponse;
- } else if (literal == "notification") {
- return kNotification;
- } else {
- return kUnknownMessageType;
- }
-}
-
-FunctionMessage::FunctionMessage(const Interface* interface,
- const std::string& name,
- const Enum::Constant* id,
- MessageType message_type,
- const Description& description, Scope scope)
- : Struct(interface, name, scope, description),
- interface_(interface),
- id_(id),
- message_type_(message_type) {
-}
-
-FunctionMessage::~FunctionMessage() {
-}
-
-const Enum::Constant* FunctionMessage::id() const {
- return id_;
-}
-
-const FunctionMessage::ParametersList& FunctionMessage::parameters() const {
- return fields();
-}
-
-bool FunctionMessage::AddParameter(const std::string& param_name, const Type* type,
- const Constant* default_value,
- bool is_mandatory,
- const Description& description, Scope scope,
- Platform platformn) {
- return AddField(type, param_name, is_mandatory, scope, default_value, description, platformn);
-}
-const Interface* FunctionMessage::interface() const {
- return interface_;
-}
-
-Function::Function(const Request* request, const Response* response)
- : request_(request),
- response_(response) {
- assert(request_);
- assert(response_);
-}
-
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/interface.cc b/SDL_Core/tools/intergen/model/src/model/interface.cc
deleted file mode 100644
index af1bae2c5..000000000
--- a/SDL_Core/tools/intergen/model/src/model/interface.cc
+++ /dev/null
@@ -1,352 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/interface.h"
-
-#include <algorithm>
-#include <cassert>
-#include <iostream>
-
-#include "model/constant.h"
-#include "model/model_filter.h"
-#include "model/scope.h"
-#include "pugixml.hpp"
-#include "utils/safeformat.h"
-#include "utils/stl_utils.h"
-#include "utils/xml_utils.h"
-
-using std::cerr;
-using std::endl;
-using std::make_pair;
-using std::pair;
-using std::set;
-using std::string;
-using typesafe_format::format;
-using typesafe_format::strmfmt;
-
-namespace codegen {
-class ModelFilter;
-
-namespace {
-
-// standard algorithm helper to access request() member of a function
-const FunctionMessage* FunctionRequest(const Function& function) {
- return &function.request();
-}
-
-// standard algorithm helper to access response() member of a function
-const FunctionMessage* FunctionResponse(const Function& function) {
- return &function.response();
-}
-
-} // namespace
-
-Interface::Interface(const API* api,
- bool auto_generate_function_ids,
- BuiltinTypeRegistry* builtin_type_registry,
- const ModelFilter* model_filter)
- : api_(api),
- builtin_type_registry_(builtin_type_registry),
- model_filter_(model_filter),
- auto_generate_function_ids_(auto_generate_function_ids),
- function_ids_enum_(this,
- Enum::kFunctionIdEnumName,
- Scope(),
- InternalScope(),
- Description()),
- type_registry_(this,
- builtin_type_registry_,
- &function_ids_enum_,
- model_filter,
- auto_generate_function_ids_),
- requests_deleter_(&requests_),
- responses_deleter_(&responses_),
- notifications_deleter_(&notifications_) {
- assert(api_);
- assert(builtin_type_registry_);
- assert(model_filter_);
-}
-
-Interface::~Interface() {
-}
-
-bool Interface::init(const pugi::xml_node& xml) {
- name_ = xml.attribute("name").value();
- if (name_.empty()) {
- std::cerr << "Interface must have 'name' attribute specified" << '\n';
- return false;
- }
- if (!type_registry_.init(xml) || !AddFunctions(xml))
- return false;
- return true;
-}
-
-const Type* Interface::GetNamedType(const std::string& name) const {
- return type_registry_.GetType(name);
-}
-
-const API& Interface::api() const {
- return *api_;
-}
-
-const std::string& Interface::name() const {
- return name_;
-}
-
-const Interface::FunctionsList& Interface::functions() const {
- return functions_list_;
-}
-
-Interface::RequestList Interface::all_requests() const {
- RequestList requests(functions_list_.size());
- std::transform(functions_list_.begin(), functions_list_.end(),
- requests.begin(), std::ptr_fun(&FunctionRequest));
- return requests;
-}
-
-Interface::ResponseList Interface::all_responses() const {
- ResponseList responses(
- functions_list_.size() + generic_responses_list_.size());
- ResponseList::iterator response_iter =
- std::transform(functions_list_.begin(), functions_list_.end(),
- responses.begin(), std::ptr_fun(&FunctionResponse));
- response_iter =
- std::copy(generic_responses_list_.begin(), generic_responses_list_.end(),
- response_iter);
- assert(response_iter == responses.end());
- return responses;
-}
-
-const Interface::NotificationList& Interface::notifications() const {
- return notifications_list_;
-}
-
-const Interface::ResponseList& Interface::generic_responses() const {
- return generic_responses_list_;
-}
-
-const Interface::EnumList& Interface::enums() const {
- return type_registry_.enums();
-}
-
-const Interface::StructList& Interface::structs() const {
- return type_registry_.structs();
-}
-
-const Interface::TypedefList& Interface::typedefs() const {
- return type_registry_.typedefs();
-}
-
-const Enum* Interface::function_id_enum() const {
- return &function_ids_enum_;
-}
-
-const Enum::Constant* Interface::GetFunctionIdEnumConstant(
- const std::string& function_id) {
- Enum* func_id_enum = &function_ids_enum_;
-
- const Constant* func_id = func_id_enum->ConstantFor(function_id);
- if (!func_id && auto_generate_function_ids_) {
- bool added = func_id_enum->AddConstant(function_id, Scope(), "", Description(), "");
- assert(added);
- func_id = func_id_enum->ConstantFor(function_id);
- }
- return static_cast<const Enum::Constant*>(func_id);
-}
-
-bool Interface::AddFunctions(const pugi::xml_node& xml_interface) {
- for (pugi::xml_node i = xml_interface.child("function"); i; i =
- i.next_sibling("function")) {
- std::string message_type_str = i.attribute("messagetype").value();
- FunctionMessage::MessageType message_type =
- FunctionMessage::MessageTypeFromLiteral(message_type_str);
- MessagesMap* map_for_message = NULL;
- switch (message_type) {
- case FunctionMessage::kRequest: {
- map_for_message = &requests_;
- break;
- }
- case FunctionMessage::kResponse: {
- map_for_message = &responses_;
- break;
- }
- case FunctionMessage::kNotification: {
- map_for_message = &notifications_;
- break;
- }
- default: {
- std::cerr << "Invalid message type: " << message_type_str << std::endl;
- return false;
- }
- }
- if (!AddFunctionMessage(map_for_message, message_type, i)) {
- return false;
- }
- }
- return SeparateFunctionMessages();
-}
-
-bool Interface::AddFunctionMessage(MessagesMap* list,
- FunctionMessage::MessageType message_type,
- const pugi::xml_node& xml_message) {
- Scope scope = ScopeFromLiteral(xml_message.attribute("scope").value());
- if (model_filter_->ShouldFilterScope(scope)) {
- return true;
- }
- std::string name = xml_message.attribute("name").value();
- if (name.empty()) {
- std::cerr << "Message with empty function name found\n";
- return false;
- }
-
- std::string func_id_str;
- if (auto_generate_function_ids_) {
- if (!xml_message.attribute("functionID").empty()) {
- strmfmt(std::cerr,
- "Auto generation of function IDs is requested "
- "but function {0} has funcitionID specified",
- name) << '\n';
- return false;
- }
- func_id_str = name;
- } else {
- func_id_str = xml_message.attribute("functionID").value();
- if (func_id_str.empty()) {
- std::cerr << "Message with empty functionID found\n";
- return false;
- }
- }
- const Enum::Constant* func_id = GetFunctionIdEnumConstant(func_id_str);
- if (!func_id) {
- std::cerr << "Function " << name << " has invalid functionID: "
- << func_id_str << std::endl;
- return false;
- }
- Description description = CollectDescription(xml_message);
- pair<MessagesMap::iterator, bool> res = list->insert(
- make_pair(
- name,
- new FunctionMessage(this, name, func_id, message_type, description,
- scope)));
- if (!res.second) {
- strmfmt(cerr, "Duplicate function message {0} of type {1}", name,
- message_type) << endl;
- return false;
- }
- if (!AddFunctionMessageParameters(res.first->second, xml_message)) {
- std::cerr << "While parsing function " << name << '\n';
- return false;
- }
- return true;
-}
-
-bool Interface::AddFunctionMessageParameters(
- FunctionMessage* function_message, const pugi::xml_node& xml_message) {
- for (pugi::xml_node i = xml_message.child("param"); i;
- i = i.next_sibling("param")) {
- Scope scope = ScopeFromLiteral(i.attribute("scope").value());
- if (model_filter_->ShouldFilterScope(scope)) {
- continue;
- }
- std::string name = i.attribute("name").value();
- if (name.empty()) {
- strmfmt(cerr, "Function message {0}, has parameter with empty name",
- function_message->name()) << endl;
- return false;
- }
- const Type* type = NULL;
- if (!type_registry_.GetCompositeType(i, &type)) {
- std::cerr << "While parsing function parameter " << name << '\n';
- return false;
- }
- const Constant* default_value = NULL;
- std::string default_value_literal = i.attribute("defvalue").value();
- if (!default_value_literal.empty()) {
- const ConstantsCreator* const_creator = type->SupportsConstants();
- if (!const_creator) {
- strmfmt(cerr, "Can not use {0} as a default value",
- default_value_literal) << endl;
- return false;
- }
- default_value = const_creator->ConstantFor(default_value_literal);
- if (!default_value) {
- strmfmt(cerr, "Incorrect default value: {0}",
- default_value_literal) << '\n';
- return false;
- }
- }
- bool is_mandatory = TypeRegistry::IsMandatoryParam(i);
- Description description = CollectDescription(i);
- Platform platform = PlatformFromLiteral(i.attribute("platform").value());
- if (!function_message->AddParameter(name, type, default_value, is_mandatory,
- description, scope, platform)) {
- return false;
- }
- }
- return true;
-}
-
-bool Interface::SeparateFunctionMessages() {
- set<string> requests = utils::MapKeys(requests_);
- set<string> response_names = utils::MapKeys(responses_);
- // Generic responses are responses that do not have matching request
- set<string> responses;
- std::set_difference(response_names.begin(), response_names.end(),
- requests.begin(), requests.end(),
- std::inserter(responses, responses.begin()));
- for (set<string>::iterator i = requests.begin(), end = requests.end();
- i != end; ++i) {
- const string& name = *i;
- assert(requests_.find(name) != requests_.end());
- const FunctionMessage* request = requests_.find(name)->second;
- MessagesMap::iterator have_response = responses_.find(name);
- if (have_response == responses_.end()) {
- strmfmt(cerr, "Request {0} doesn't have matching response", name);
- return false;
- }
- const FunctionMessage* response = have_response->second;
- functions_list_.push_back(Function(request, response));
- }
- for (set<string>::iterator i = responses.begin(), end = responses.end();
- i != end; ++i) {
- const std::string& name = *i;
- assert(responses_.find(name) != responses_.end());
- generic_responses_list_.push_back(responses_.find(name)->second);
- }
- for (MessagesMap::iterator i = notifications_.begin(), end = notifications_
- .end(); i != end; ++i) {
- notifications_list_.push_back(i->second);
- }
- return true;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/model_filter.cc b/SDL_Core/tools/intergen/model/src/model/model_filter.cc
deleted file mode 100644
index b6674c1e2..000000000
--- a/SDL_Core/tools/intergen/model/src/model/model_filter.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/model_filter.h"
-
-namespace codegen {
-
-ModelFilter::ModelFilter(const std::set<std::string>& filtered_scope_names)
- : filtered_scopes_(filtered_scope_names) {
-}
-
-bool ModelFilter::ShouldFilterScope(const Scope& scope) const {
- return filtered_scopes_.count(scope) != 0;
-}
-
-
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/scope.cc b/SDL_Core/tools/intergen/model/src/model/scope.cc
deleted file mode 100644
index a57b9a0db..000000000
--- a/SDL_Core/tools/intergen/model/src/model/scope.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/scope.h"
-
-#include <iostream>
-
-namespace codegen {
-
-Scope ScopeFromLiteral(const std::string& literal) {
- return literal;
-}
-
-InternalScope InternalScopeFromLiteral(const std::string& literal) {
- return literal;
-}
-
-Platform PlatformFromLiteral(const std::string& literal) {
- return literal;
-}
-
-} // namespace codegen
diff --git a/SDL_Core/tools/intergen/model/src/model/type.cc b/SDL_Core/tools/intergen/model/src/model/type.cc
deleted file mode 100644
index 909736ff2..000000000
--- a/SDL_Core/tools/intergen/model/src/model/type.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/type.h"
-
-namespace codegen {
-
-// Abstract interface destructor
-TypeCodeGenerator::~TypeCodeGenerator() {
-}
-
-// Abstract interface destructor
-Type::~Type() {
-}
-
-// Default no-op code generator
-void TypeCodeGenerator::GenerateCodeForBoolean(const Boolean* boolean) {
-}
-
-void TypeCodeGenerator::GenerateCodeForInteger(const Integer* integer) {
-}
-
-void TypeCodeGenerator::GenerateCodeForFloat(const Float* flt) {
-}
-
-void TypeCodeGenerator::GenerateCodeForString(const String* string) {
-}
-
-void TypeCodeGenerator::GenerateCodeForEnum(const Enum* enm) {
-}
-
-void TypeCodeGenerator::GenerateCodeForArray(const Array* array) {
-}
-
-void TypeCodeGenerator::GenerateCodeForMap(const Map* map) {
-}
-
-void TypeCodeGenerator::GenerateCodeForStruct(const Struct* strct) {
-}
-
-void TypeCodeGenerator::GenerateCodeForTypedef(const Typedef* tdef) {
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/model/src/model/type_registry.cc b/SDL_Core/tools/intergen/model/src/model/type_registry.cc
deleted file mode 100644
index 90d300089..000000000
--- a/SDL_Core/tools/intergen/model/src/model/type_registry.cc
+++ /dev/null
@@ -1,420 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "model/type_registry.h"
-
-#include <iostream>
-#include <utility>
-
-#include "model/api.h"
-#include "model/builtin_type_registry.h"
-#include "model/constant.h"
-#include "model/interface.h"
-#include "model/model_filter.h"
-#include "model/scope.h"
-#include "pugixml.hpp"
-#include "utils/safeformat.h"
-#include "utils/string_utils.h"
-#include "utils/xml_utils.h"
-
-using typesafe_format::strmfmt;
-
-namespace codegen {
-
-TypeRegistry::TypeRegistry(const Interface* interface,
- BuiltinTypeRegistry* builtin_type_registry,
- Enum* function_ids_enum,
- const ModelFilter* model_filter,
- bool create_function_id_enum)
- : interface_(interface),
- builtin_type_registry_(builtin_type_registry),
- function_ids_enum_(function_ids_enum),
- model_filter_(model_filter),
- enums_deleter_(&enums_),
- structs_deleter_(&structs_),
- typedefs_deleter_(&typedefs_) {
- assert(builtin_type_registry_);
- assert(function_ids_enum_);
- assert(model_filter_);
-}
-
-TypeRegistry::~TypeRegistry() {
-}
-
-bool TypeRegistry::init(const pugi::xml_node& xml) {
- if (!AddEnums(xml) || !AddStructsAndTypedefs(xml)) {
- return false;
- }
- return true;
-}
-
-bool TypeRegistry::GetCompositeType(const pugi::xml_node& params, const Type** type) {
- pugi::xml_attribute array = params.attribute("array");
- pugi::xml_attribute map = params.attribute("map");
- if (array && map) {
- strmfmt(std::cerr, "Entity {0} has both map and array attributes specified",
- params.attribute("name").as_string(""));
- return false;
- }
- if (map && map.as_bool(false)) {
- return GetContainer(params, type, false);
- } else if (array && array.as_bool(false)) {
- return GetContainer(params, type, true);
- } else {
- return GetNonArray(params, type);
- }
-}
-
-const Type* TypeRegistry::GetType(const std::string& name) const {
- const Type* type = NULL;
- if (IsRegisteredEnum(name)
- && GetEnum(name, &type)) {
- return type;
- } else if (IsRegisteredStruct(name)
- && GetStruct(name, &type)) {
- return type;
- } else if (IsRegisteredTypedef(name)
- && GetTypedef(name, &type)) {
- return type;
- }
- return NULL;
-}
-
-const TypeRegistry::EnumList& TypeRegistry::enums() const {
- return enums_;
-}
-
-const TypeRegistry::StructList& TypeRegistry::structs() const {
- return structs_;
-}
-
-const TypeRegistry::TypedefList& TypeRegistry::typedefs() const {
- return typedefs_;
-}
-
-// static
-bool TypeRegistry::IsMandatoryParam(const pugi::xml_node& param) {
- bool mandatory = param.attribute("mandatory").as_bool("true");
- if (param.attribute("array").as_bool(false)) {
- mandatory = param.attribute("minsize").as_int(0) > 0;
- }
- return mandatory;
-}
-
-bool TypeRegistry::AddEnums(const pugi::xml_node& xml) {
- for (pugi::xml_node i = xml.child("enum"); i; i = i.next_sibling("enum")) {
- if (!AddEnum(i)) {
- return false;
- }
- }
- return true;
-}
-
-bool TypeRegistry::AddStructsAndTypedefs(const pugi::xml_node& xml) {
- for (pugi::xml_node i = xml.first_child(); i;
- i = i.next_sibling()) {
- if (std::string("struct") == i.name()) {
- if (!AddStruct(i)) {
- return false;
- }
- } else if (std::string("typedef") == i.name()) {
- if (!AddTypedef(i)) {
- return false;
- }
- }
- }
- return true;
-}
-
-bool TypeRegistry::AddEnum(const pugi::xml_node& xml_enum) {
- Scope scope = ScopeFromLiteral(xml_enum.attribute("scope").value());
- if (model_filter_->ShouldFilterScope(scope)) {
- return true;
- }
- std::string name = xml_enum.attribute("name").value();
- InternalScope internal_scope = InternalScopeFromLiteral(
- xml_enum.attribute("internal_scope").value());
- Description description = CollectDescription(xml_enum);
- if (IsRegisteredEnum(name)) {
- std::cerr << "Duplicate enum: " << name << std::endl;
- return false;
- }
- Enum* this_enum = NULL;
- if (name == Enum::kFunctionIdEnumName) {
- this_enum = function_ids_enum_;
- } else {
- enums_.push_back(new Enum(interface_, name, scope, internal_scope, description));
- this_enum = enums_.back();
- enum_by_name_[name] = this_enum;
- }
- if (!AddEnumConstants(this_enum, xml_enum)) {
- return false;
- }
- return true;
-}
-
-bool TypeRegistry::AddStruct(const pugi::xml_node& xml_struct) {
- Scope scope = ScopeFromLiteral(xml_struct.attribute("scope").value());
- if (model_filter_->ShouldFilterScope(scope)) {
- return true;
- }
- std::string name = xml_struct.attribute("name").value();
- Description description = CollectDescription(xml_struct);
- if (IsRegisteredStruct(name)) {
- std::cerr << "Duplicate structure: " << name << std::endl;
- return false;
- }
- structs_.push_back(new Struct(interface_, name, scope, description));
- struct_by_name_[name] = structs_.back();
- if (!AddStructureFields(structs_.back(), xml_struct)) {
- return false;
- }
- return true;
-}
-
-bool TypeRegistry::AddTypedef(const pugi::xml_node& xml_typedef) {
- std::string name = xml_typedef.attribute("name").value();
- if (name.empty()) {
- std::cerr << "Typedef with empty name found" << std::endl;
- return false;
- }
- const Type* type = NULL;
- if (!GetCompositeType(xml_typedef, &type)) {
- std::cerr<< "While parsing typedef " << name << '\n';
- return false;
- }
- Description description = CollectDescription(xml_typedef);
- if (IsRegisteredTypedef(name)) {
- std::cerr << "Duplicate typedef: " << name << std::endl;
- return false;
- }
- typedefs_.push_back(new Typedef(interface_, name, type, description));
- typedef_by_name_[name] = typedefs_.back();
-
- return true;
-}
-
-bool TypeRegistry::GetContainer(const pugi::xml_node& params, const Type** type,
- bool get_array) {
- const Type* element_type = NULL;
- if (GetNonArray(params, &element_type)) {
- assert(element_type);
- std::string minsize_str = params.attribute("minsize").as_string("0");
- std::string maxsize_str = params.attribute("maxsize").as_string("0");
- int64_t minsize, maxsize;
- if (StringToNumber(minsize_str, &minsize)
- && StringToNumber(maxsize_str, &maxsize)) {
- if (get_array) {
- *type = &*arrays_.insert(
- Array(element_type, Array::Range(minsize, maxsize))).first;
- } else {
- *type = &*maps_.insert(Map(element_type, Map::Range(minsize, maxsize)))
- .first;
- }
- return true;
- } else {
- std::cerr << "Incorrect array size range: " << minsize_str << ", "
- << maxsize_str << std::endl;
- }
- }
- return false;
-}
-
-bool TypeRegistry::GetNonArray(const pugi::xml_node& params,
- const Type** type) {
- pugi::xml_attribute type_name = params.attribute("type");
- if (type_name) {
- std::string type_name_str = type_name.value();
- BuiltinTypeRegistry::BuiltInType builtin_type = builtin_type_registry_
- ->BuiltInTypeByName(type_name_str);
- if (BuiltinTypeRegistry::kNotABuiltInType != builtin_type) {
- return builtin_type_registry_->GetType(builtin_type, params, type);
- } else if (IsExternalType(type_name_str)) {
- return GetExternalType(type_name_str, type);
- } else if (*type = GetType(type_name_str)) {
- return true;
- } else {
- std::cerr << "Unregistered type: " << type_name_str << std::endl;
- return false;
- }
- } else {
- std::cerr << "Absent type name" << std::endl;
- return false;
- }
-}
-
-bool TypeRegistry::GetEnum(const std::string& name, const Type** type) const {
- EnumByName::const_iterator i = enum_by_name_.find(name);
- if (i != enum_by_name_.end()) {
- *type = i->second;
- return true;
- } else {
- std::cerr << "Unregistered enum " << name << std::endl;
- return false;
- }
-}
-
-bool TypeRegistry::GetStruct(const std::string& name, const Type** type) const {
- StructByName::const_iterator i = struct_by_name_.find(name);
- if (i != struct_by_name_.end()) {
- *type = i->second;
- return true;
- } else {
- std::cerr << "Unregistered struct " << name << std::endl;
- return false;
- }
-}
-
-bool TypeRegistry::GetTypedef(const std::string& name, const Type** type) const {
- TypedefByName::const_iterator i = typedef_by_name_.find(name);
- if (i != typedef_by_name_.end()) {
- *type = i->second;
- return true;
- } else {
- std::cerr<< "Unregistered typedef " << name << std::endl;
- return false;
- }
-}
-
-bool TypeRegistry::GetExternalType(const std::string& full_type_name,
- const Type** type) const {
- size_t dotpos = full_type_name.find('.');
- if (dotpos == full_type_name.npos) {
- std::cerr << full_type_name << " is not valid fully qualified type name" << '\n';
- return false;
- }
- std::string interface_name = full_type_name.substr(0, dotpos);
- std::string type_name = full_type_name.substr(dotpos + 1);
- const API& api = interface_->api();
- const Interface* that_interface =
- interface_name == interface_->name() ?
- interface_ : api.InterfaceByName(interface_name);
- if (!that_interface) {
- std::cerr << "Unknown interface " << interface_name << '\n';
- return false;
- }
- const Type* found_type = that_interface->GetNamedType(type_name);
- if (!found_type) {
- strmfmt(std::cerr, "Unknown type {0} in interface {1}",
- type_name, interface_name) << '\n';
- return false;
- }
- *type = found_type;
- return true;
-}
-
-bool TypeRegistry::IsRegisteredEnum(const std::string& enum_name) const {
- return enum_by_name_.find(enum_name) != enum_by_name_.end();
-}
-
-bool TypeRegistry::IsRegisteredStruct(const std::string& struct_name) const {
- return struct_by_name_.find(struct_name) != struct_by_name_.end();
-}
-
-bool TypeRegistry::IsExternalType(const std::string& full_type_name) const {
- return full_type_name.find('.') != full_type_name.npos;
-}
-
-bool TypeRegistry::AddEnumConstants(Enum* enm, const pugi::xml_node& xml_enum) {
- for (pugi::xml_node i = xml_enum.child("element"); i;
- i = i.next_sibling("element")) {
- Scope scope = ScopeFromLiteral(i.attribute("scope").value());
- if (model_filter_->ShouldFilterScope(scope)) {
- continue;
- }
- std::string name = i.attribute("name").value();
- std::string internal_name = i.attribute("internal_name").value();
- Description description = CollectDescription(i);
- std::string design_description = i.child_value("designdescription");
- pugi::xml_attribute xml_value = i.attribute("value");
- if (xml_value) {
- int64_t val;
- if (!StringToNumber(xml_value.value(), &val)) {
- std::cerr << "Non-numeric value of enum constant " << name << std::endl;
- }
- if (!enm->AddConstant(name, val, scope, internal_name, description,
- design_description)) {
- return false;
- }
- } else {
- if (!enm->AddConstant(name, scope, internal_name, description,
- design_description)) {
- return false;
- }
- }
- }
- return true;
-}
-
-bool TypeRegistry::AddStructureFields(Struct* strct,
- const pugi::xml_node& xml_struct) {
- for (pugi::xml_node i = xml_struct.child("param"); i;
- i = i.next_sibling("param")) {
- Scope scope = ScopeFromLiteral(i.attribute("scope").value());
- if (model_filter_->ShouldFilterScope(scope)) {
- continue;
- }
- std::string type_name = i.attribute("type").value();
- const Type* type = NULL;
- if (!GetCompositeType(i, &type)) {
- std::cerr << "While parsing struct " << strct->name()
- << std::endl;
- return false;
- }
- std::string name = i.attribute("name").value();
- std::string defvalue = i.attribute("defvalue").value();
- bool mandatory = IsMandatoryParam(i);
- const Constant* defvalue_constant = NULL;
- if (!defvalue.empty()) {
- const ConstantsCreator* const_creator = type->SupportsConstants();
- if (!const_creator) {
- std::cerr << "Default value can not be provided for " << type_name
- << std::endl;
- return false;
- } else {
- defvalue_constant = const_creator->ConstantFor(defvalue);
- }
- }
- Description description = CollectDescription(i);
- Platform platform = PlatformFromLiteral(i.attribute("platform").value());
- strct->AddField(type, name, mandatory, scope, defvalue_constant,
- description, platform);
- }
- return true;
-}
-
-bool TypeRegistry::IsRegisteredTypedef(const std::string& typedef_name) const {
- return typedef_by_name_.find(typedef_name) != typedef_by_name_.end();
-}
-
-} // namespace codegen
-
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/contrib/foreach.hpp b/SDL_Core/tools/intergen/third_party/pugixml/contrib/foreach.hpp
deleted file mode 100644
index 319807771..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/contrib/foreach.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Boost.Foreach support for pugixml classes.
- * This file is provided to the public domain.
- * Written by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
- */
-
-#ifndef HEADER_PUGIXML_FOREACH_HPP
-#define HEADER_PUGIXML_FOREACH_HPP
-
-#include "pugixml.hpp"
-
-/*
- * These types add support for BOOST_FOREACH macro to xml_node and xml_document classes (child iteration only).
- * Example usage:
- * BOOST_FOREACH(xml_node n, doc) {}
- */
-
-namespace boost
-{
- template <typename> struct range_mutable_iterator;
- template <typename> struct range_const_iterator;
-
- template<> struct range_mutable_iterator<pugi::xml_node>
- {
- typedef pugi::xml_node::iterator type;
- };
-
- template<> struct range_const_iterator<pugi::xml_node>
- {
- typedef pugi::xml_node::iterator type;
- };
-
- template<> struct range_mutable_iterator<pugi::xml_document>
- {
- typedef pugi::xml_document::iterator type;
- };
-
- template<> struct range_const_iterator<pugi::xml_document>
- {
- typedef pugi::xml_document::iterator type;
- };
-}
-
-/*
- * These types add support for BOOST_FOREACH macro to xml_node and xml_document classes (child/attribute iteration).
- * Example usage:
- * BOOST_FOREACH(xml_node n, children(doc)) {}
- * BOOST_FOREACH(xml_node n, attributes(doc)) {}
- */
-
-namespace pugi
-{
- inline xml_object_range<xml_node_iterator> children(const pugi::xml_node& node)
- {
- return node.children();
- }
-
- inline xml_object_range<xml_attribute_iterator> attributes(const pugi::xml_node& node)
- {
- return node.attributes();
- }
-}
-
-#endif
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/caution.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/caution.png
deleted file mode 100644
index 5adc3779c..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/caution.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree.png
deleted file mode 100644
index 2e28ce8d0..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree_thumb.png
deleted file mode 100644
index 8b0ba85b0..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/dom_tree_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/home.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/home.png
deleted file mode 100644
index 124a56b79..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/home.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/next.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/next.png
deleted file mode 100644
index fbb2fdc5b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/next.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/note.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/note.png
deleted file mode 100644
index e960b3956..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/note.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/prev.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/prev.png
deleted file mode 100644
index ceadadaa8..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/prev.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/up.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/up.png
deleted file mode 100644
index 23e4aec4f..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/up.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1.png
deleted file mode 100644
index 6da6366af..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1_thumb.png
deleted file mode 100644
index 86882e010..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link1_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2.png
deleted file mode 100644
index 9f75a4f77..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2_thumb.png
deleted file mode 100644
index 64954d556..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_link2_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1.png
deleted file mode 100644
index ddbb93cb7..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1_thumb.png
deleted file mode 100644
index 96df958c9..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch1_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2.png
deleted file mode 100644
index 7f15ebc18..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2_thumb.png
deleted file mode 100644
index 9d443b1dc..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch2_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3.png
deleted file mode 100644
index 3bb450cf7..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3_thumb.png
deleted file mode 100644
index 60fa8f80d..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch3_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4.png
deleted file mode 100644
index c9fe63da7..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4_thumb.png
deleted file mode 100644
index 3b6e53c0b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2005_pch4_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1.png
deleted file mode 100644
index 5d32bf643..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1_thumb.png
deleted file mode 100644
index 223b429b7..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link1_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2.png
deleted file mode 100644
index b6446a29a..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2_thumb.png b/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2_thumb.png
deleted file mode 100644
index 34d9dd951..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/images/vs2010_link2_thumb.png
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual.html
deleted file mode 100644
index 8f3089bb2..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>pugixml 1.2</title>
-<link rel="stylesheet" href="pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="manual.html" title="pugixml 1.2">
-<link rel="next" href="manual/install.html" title="Installation">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <b>Overview</b> |
- <a href="manual/install.html">Installation</a> |
- Document:
- <a href="manual/dom.html">Object model</a> &middot; <a href="manual/loading.html">Loading</a> &middot; <a href="manual/access.html">Accessing</a> &middot; <a href="manual/modify.html">Modifying</a> &middot; <a href="manual/saving.html">Saving</a> |
- <a href="manual/xpath.html">XPath</a> |
- <a href="manual/apiref.html">API Reference</a> |
- <a href="manual/toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav"><a accesskey="n" href="manual/install.html"><img src="images/next.png" alt="Next"></a></div></td>
-</tr></table>
-<hr>
-<div class="book"><div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.overview"></a><a class="link" href="manual.html#manual.overview" title="Overview"> Overview</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="manual.html#manual.overview.introduction"> Introduction</a></span></dt>
-<dt><span class="section"><a href="manual.html#manual.overview.feedback"> Feedback</a></span></dt>
-<dt><span class="section"><a href="manual.html#manual.overview.thanks"> Acknowledgments</a></span></dt>
-<dt><span class="section"><a href="manual.html#manual.overview.license"> License</a></span></dt>
-</dl></div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.overview.introduction"></a><a class="link" href="manual.html#manual.overview.introduction" title="Introduction"> Introduction</a>
-</h3></div></div></div>
-<p>
- <a href="http://pugixml.org/" target="_top">pugixml</a> is a light-weight C++ XML
- processing library. It consists of a DOM-like interface with rich traversal/modification
- capabilities, an extremely fast XML parser which constructs the DOM tree
- from an XML file/buffer, and an <a class="link" href="manual/xpath.html" title="XPath">XPath 1.0 implementation</a>
- for complex data-driven tree queries. Full Unicode support is also available,
- with <a class="link" href="manual/dom.html#manual.dom.unicode" title="Unicode interface">two Unicode interface variants</a>
- and conversions between different Unicode encodings (which happen automatically
- during parsing/saving). The library is <a class="link" href="manual/install.html#manual.install.portability" title="Portability">extremely
- portable</a> and easy to integrate and use. pugixml is developed and maintained
- since 2006 and has many users. All code is distributed under the <a class="link" href="manual.html#manual.overview.license" title="License">MIT
- license</a>, making it completely free to use in both open-source and
- proprietary applications.
- </p>
-<p>
- pugixml enables very fast, convenient and memory-efficient XML document processing.
- However, since pugixml has a DOM parser, it can't process XML documents that
- do not fit in memory; also the parser is a non-validating one, so if you
- need DTD or XML Schema validation, the library is not for you.
- </p>
-<p>
- This is the complete manual for pugixml, which describes all features of
- the library in detail. If you want to start writing code as quickly as possible,
- you are advised to <a href="quickstart.html" target="_top">read the quick start guide
- first</a>.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- No documentation is perfect, neither is this one. If you encounter a description
- that is unclear, please file an issue as described in <a class="xref" href="manual.html#manual.overview.feedback" title="Feedback"> Feedback</a>.
- Also if you can spare the time for a full proof-reading, including spelling
- and grammar, that would be great! Please <a class="link" href="manual.html#email">send me
- an e-mail</a>; as a token of appreciation, your name will be included
- into the <a class="link" href="manual.html#manual.overview.thanks" title="Acknowledgments">corresponding section</a>
- of this documentation.
- </p></td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.overview.feedback"></a><a class="link" href="manual.html#manual.overview.feedback" title="Feedback"> Feedback</a>
-</h3></div></div></div>
-<p>
- If you believe you've found a bug in pugixml (bugs include compilation problems
- (errors/warnings), crashes, performance degradation and incorrect behavior),
- please file an issue via <a href="http://code.google.com/p/pugixml/issues/entry" target="_top">issue
- submission form</a>. Be sure to include the relevant information so that
- the bug can be reproduced: the version of pugixml, compiler version and target
- architecture, the code that uses pugixml and exhibits the bug, etc.
- </p>
-<p>
- Feature requests can be reported the same way as bugs, so if you're missing
- some functionality in pugixml or if the API is rough in some places and you
- can suggest an improvement, <a href="http://code.google.com/p/pugixml/issues/entry?template=Feature%20request" target="_top">file
- an issue</a>. However please note that there are many factors when considering
- API changes (compatibility with previous versions, API redundancy, etc.),
- so generally features that can be implemented via a small function without
- pugixml modification are not accepted. However, all rules have exceptions.
- </p>
-<p>
- If you have a contribution to pugixml, such as build script for some build
- system/IDE, or a well-designed set of helper functions, or a binding to some
- language other than C++, please <a href="http://code.google.com/p/pugixml/issues/entry?template=Feature%20request" target="_top">file
- an issue</a>. You can include the relevant patches as issue attachments.
- Your contribution has to be distributed under the terms of a license that's
- compatible with pugixml license; i.e. GPL/LGPL licensed code is not accepted.
- </p>
-<a name="email"></a><p>
- If filing an issue is not possible due to privacy or other concerns, you
- can contact pugixml author by e-mail directly: <a href="mailto:arseny.kapoulkine@gmail.com" target="_top">arseny.kapoulkine@gmail.com</a>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.overview.thanks"></a><a class="link" href="manual.html#manual.overview.thanks" title="Acknowledgments"> Acknowledgments</a>
-</h3></div></div></div>
-<p>
- pugixml could not be developed without the help from many people; some of
- them are listed in this section. If you've played a part in pugixml development
- and you can not find yourself on this list, I'm truly sorry; please <a class="link" href="manual.html#email">send me an e-mail</a> so I can fix this.
- </p>
-<p>
- Thanks to <span class="bold"><strong>Kristen Wegner</strong></span> for pugxml parser,
- which was used as a basis for pugixml.
- </p>
-<p>
- Thanks to <span class="bold"><strong>Neville Franks</strong></span> for contributions
- to pugxml parser.
- </p>
-<p>
- Thanks to <span class="bold"><strong>Artyom Palvelev</strong></span> for suggesting
- a lazy gap contraction approach.
- </p>
-<p>
- Thanks to <span class="bold"><strong>Vyacheslav Egorov</strong></span> for documentation
- proofreading.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.overview.license"></a><a class="link" href="manual.html#manual.overview.license" title="License"> License</a>
-</h3></div></div></div>
-<p>
- The pugixml library is distributed under the MIT license:
- </p>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- Copyright (c) 2006-2012 Arseny Kapoulkine
- </p>
-<p>
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the Software
- is furnished to do so, subject to the following conditions:
- </p>
-<p>
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- </p>
-<p>
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- </p>
-</blockquote></div>
-<p>
- This means that you can freely use pugixml in your applications, both open-source
- and proprietary. If you use pugixml in a product, it is sufficient to add
- an acknowledgment like this to the product distribution:
- </p>
-<div class="blockquote"><blockquote class="blockquote"><p>
- This software is based on pugixml library (http://pugixml.org).<br>
-pugixml
- is Copyright (C) 2006-2012 Arseny Kapoulkine.
- </p></blockquote></div>
-</div>
-</div></div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: April 30, 2012 at 15:36:33 GMT</small></p></td>
-<td align="right"><div class="copyright-footer"></div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <b>Overview</b> |
- <a href="manual/install.html">Installation</a> |
- Document:
- <a href="manual/dom.html">Object model</a> &middot; <a href="manual/loading.html">Loading</a> &middot; <a href="manual/access.html">Accessing</a> &middot; <a href="manual/modify.html">Modifying</a> &middot; <a href="manual/saving.html">Saving</a> |
- <a href="manual/xpath.html">XPath</a> |
- <a href="manual/apiref.html">API Reference</a> |
- <a href="manual/toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav"><a accesskey="n" href="manual/install.html"><img src="images/next.png" alt="Next"></a></div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/access.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/access.html
deleted file mode 100644
index c6abd052d..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/access.html
+++ /dev/null
@@ -1,892 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Accessing document data</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="loading.html" title="Loading document">
-<link rel="next" href="modify.html" title="Modifying document data">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <b>Accessing</b> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="loading.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="modify.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.access"></a><a class="link" href="access.html" title="Accessing document data"> Accessing document data</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="access.html#manual.access.basic"> Basic traversal functions</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.nodedata"> Getting node data</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.attrdata"> Getting attribute data</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.contents"> Contents-based traversal functions</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.rangefor"> Range-based for-loop support</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.iterators"> Traversing node/attribute lists
- via iterators</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.walker"> Recursive traversal with xml_tree_walker</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.predicate"> Searching for nodes/attributes
- with predicates</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.text"> Working with text contents</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.misc"> Miscellaneous functions</a></span></dt>
-</dl></div>
-<p>
- pugixml features an extensive interface for getting various types of data from
- the document and for traversing the document. This section provides documentation
- for all such functions that do not modify the tree except for XPath-related
- functions; see <a class="xref" href="xpath.html" title="XPath"> XPath</a> for XPath reference. As discussed in <a class="xref" href="dom.html#manual.dom.cpp" title="C++ interface"> C++ interface</a>,
- there are two types of handles to tree data - <a class="link" href="dom.html#xml_node">xml_node</a>
- and <a class="link" href="dom.html#xml_attribute">xml_attribute</a>. The handles have special
- null (empty) values which propagate through various functions and thus are
- useful for writing more concise code; see <a class="link" href="dom.html#node_null">this description</a>
- for details. The documentation in this section will explicitly state the results
- of all function in case of null inputs.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.basic"></a><a class="link" href="access.html#manual.access.basic" title="Basic traversal functions"> Basic traversal functions</a>
-</h3></div></div></div>
-<a name="xml_node::parent"></a><a name="xml_node::first_child"></a><a name="xml_node::last_child"></a><a name="xml_node::next_sibling"></a><a name="xml_node::previous_sibling"></a><a name="xml_node::first_attribute"></a><a name="xml_node::last_attribute"></a><a name="xml_attribute::next_attribute"></a><a name="xml_attribute::previous_attribute"></a><p>
- The internal representation of the document is a tree, where each node has
- a list of child nodes (the order of children corresponds to their order in
- the XML representation), and additionally element nodes have a list of attributes,
- which is also ordered. Several functions are provided in order to let you
- get from one node in the tree to the other. These functions roughly correspond
- to the internal representation, and thus are usually building blocks for
- other methods of traversing (i.e. XPath traversals are based on these functions).
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">parent</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">first_child</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">last_child</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">next_sibling</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">previous_sibling</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">first_attribute</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">last_attribute</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">next_attribute</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">previous_attribute</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">parent</span></code> function returns the
- node's parent; all non-null nodes except the document have non-null parent.
- <code class="computeroutput"><span class="identifier">first_child</span></code> and <code class="computeroutput"><span class="identifier">last_child</span></code> return the first and last child
- of the node, respectively; note that only document nodes and element nodes
- can have non-empty child node list. If node has no children, both functions
- return null nodes. <code class="computeroutput"><span class="identifier">next_sibling</span></code>
- and <code class="computeroutput"><span class="identifier">previous_sibling</span></code> return
- the node that's immediately to the right/left of this node in the children
- list, respectively - for example, in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">/&gt;&lt;</span><span class="identifier">b</span><span class="special">/&gt;&lt;</span><span class="identifier">c</span><span class="special">/&gt;</span></code>,
- calling <code class="computeroutput"><span class="identifier">next_sibling</span></code> for
- a handle that points to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">b</span><span class="special">/&gt;</span></code>
- results in a handle pointing to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">c</span><span class="special">/&gt;</span></code>,
- and calling <code class="computeroutput"><span class="identifier">previous_sibling</span></code>
- results in handle pointing to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">/&gt;</span></code>.
- If node does not have next/previous sibling (this happens if it is the last/first
- node in the list, respectively), the functions return null nodes. <code class="computeroutput"><span class="identifier">first_attribute</span></code>, <code class="computeroutput"><span class="identifier">last_attribute</span></code>,
- <code class="computeroutput"><span class="identifier">next_attribute</span></code> and <code class="computeroutput"><span class="identifier">previous_attribute</span></code> functions behave similarly
- to the corresponding child node functions and allow to iterate through attribute
- list in the same way.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Because of memory consumption reasons, attributes do not have a link to
- their parent nodes. Thus there is no <code class="computeroutput"><span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">parent</span><span class="special">()</span></code> function.
- </p></td></tr>
-</table></div>
-<p>
- Calling any of the functions above on the null handle results in a null handle
- - i.e. <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">().</span><span class="identifier">next_sibling</span><span class="special">()</span></code>
- returns the second child of <code class="computeroutput"><span class="identifier">node</span></code>,
- and null handle if <code class="computeroutput"><span class="identifier">node</span></code> is
- null, has no children at all or if it has only one child node.
- </p>
-<p>
- With these functions, you can iterate through all child nodes and display
- all attributes like this (<a href="../samples/traverse_base.cpp" target="_top">samples/traverse_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">();</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">())</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool:"</span><span class="special">;</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">attr</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">first_attribute</span><span class="special">();</span> <span class="identifier">attr</span><span class="special">;</span> <span class="identifier">attr</span> <span class="special">=</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">next_attribute</span><span class="special">())</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.nodedata"></a><a class="link" href="access.html#manual.access.nodedata" title="Getting node data"> Getting node data</a>
-</h3></div></div></div>
-<a name="xml_node::name"></a><a name="xml_node::value"></a><p>
- Apart from structural information (parent, child nodes, attributes), nodes
- can have name and value, both of which are strings. Depending on node type,
- name or value may be absent. <a class="link" href="dom.html#node_document">node_document</a>
- nodes do not have a name or value, <a class="link" href="dom.html#node_element">node_element</a>
- and <a class="link" href="dom.html#node_declaration">node_declaration</a> nodes always
- have a name but never have a value, <a class="link" href="dom.html#node_pcdata">node_pcdata</a>,
- <a class="link" href="dom.html#node_cdata">node_cdata</a>, <a class="link" href="dom.html#node_comment">node_comment</a>
- and <a class="link" href="dom.html#node_doctype">node_doctype</a> nodes never have a name
- but always have a value (it may be empty though), <a class="link" href="dom.html#node_pi">node_pi</a>
- nodes always have a name and a value (again, value may be empty). In order
- to get node's name or value, you can use the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">name</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">value</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- In case node does not have a name or value or if the node handle is null,
- both functions return empty strings - they never return null pointers.
- </p>
-<a name="xml_node::child_value"></a><p>
- It is common to store data as text contents of some node - i.e. <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;&lt;</span><span class="identifier">description</span><span class="special">&gt;</span><span class="identifier">This</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">node</span><span class="special">&lt;/</span><span class="identifier">description</span><span class="special">&gt;&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>.
- In this case, <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">description</span><span class="special">&gt;</span></code> node does not have a value, but instead
- has a child of type <a class="link" href="dom.html#node_pcdata">node_pcdata</a> with value
- <code class="computeroutput"><span class="string">"This is a node"</span></code>. pugixml
- provides several helper functions to parse such data:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">child_value</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">child_value</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_text</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">text</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">child_value</span><span class="special">()</span></code>
- returns the value of the first child with type <a class="link" href="dom.html#node_pcdata">node_pcdata</a>
- or <a class="link" href="dom.html#node_cdata">node_cdata</a>; <code class="computeroutput"><span class="identifier">child_value</span><span class="special">(</span><span class="identifier">name</span><span class="special">)</span></code>
- is a simple wrapper for <code class="computeroutput"><span class="identifier">child</span><span class="special">(</span><span class="identifier">name</span><span class="special">).</span><span class="identifier">child_value</span><span class="special">()</span></code>.
- For the above example, calling <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"description"</span><span class="special">)</span></code> and <code class="computeroutput"><span class="identifier">description</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">()</span></code> will both produce string <code class="computeroutput"><span class="string">"This is a node"</span></code>. If there is no
- child with relevant type, or if the handle is null, <code class="computeroutput"><span class="identifier">child_value</span></code>
- functions return empty string.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">text</span><span class="special">()</span></code>
- returns a special object that can be used for working with PCDATA contents
- in more complex cases than just retrieving the value; it is described in
- <a class="xref" href="access.html#manual.access.text" title="Working with text contents"> Working with text contents</a> sections.
- </p>
-<p>
- There is an example of using some of these functions <a class="link" href="access.html#code_traverse_base_data">at
- the end of the next section</a>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.attrdata"></a><a class="link" href="access.html#manual.access.attrdata" title="Getting attribute data"> Getting attribute data</a>
-</h3></div></div></div>
-<a name="xml_attribute::name"></a><a name="xml_attribute::value"></a><p>
- All attributes have name and value, both of which are strings (value may
- be empty). There are two corresponding accessors, like for <code class="computeroutput"><span class="identifier">xml_node</span></code>:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">name</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">value</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- In case the attribute handle is null, both functions return empty strings
- - they never return null pointers.
- </p>
-<a name="xml_attribute::as_string"></a><p>
- If you need a non-empty string if the attribute handle is null (for example,
- you need to get the option value from XML attribute, but if it is not specified,
- you need it to default to <code class="computeroutput"><span class="string">"sorted"</span></code>
- instead of <code class="computeroutput"><span class="string">""</span></code>), you
- can use <code class="computeroutput"><span class="identifier">as_string</span></code> accessor:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">as_string</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">def</span> <span class="special">=</span> <span class="string">""</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- It returns <code class="computeroutput"><span class="identifier">def</span></code> argument if
- the attribute handle is null. If you do not specify the argument, the function
- is equivalent to <code class="computeroutput"><span class="identifier">value</span><span class="special">()</span></code>.
- </p>
-<a name="xml_attribute::as_int"></a><a name="xml_attribute::as_uint"></a><a name="xml_attribute::as_double"></a><a name="xml_attribute::as_float"></a><a name="xml_attribute::as_bool"></a><p>
- In many cases attribute values have types that are not strings - i.e. an
- attribute may always contain values that should be treated as integers, despite
- the fact that they are represented as strings in XML. pugixml provides several
- accessors that convert attribute value to some other type:
- </p>
-<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">as_int</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">as_uint</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">double</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">as_double</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">float</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">as_float</span><span class="special">(</span><span class="keyword">float</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">as_bool</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">def</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">as_int</span></code>, <code class="computeroutput"><span class="identifier">as_uint</span></code>,
- <code class="computeroutput"><span class="identifier">as_double</span></code> and <code class="computeroutput"><span class="identifier">as_float</span></code> convert attribute values to numbers.
- If attribute handle is null or attribute value is empty, <code class="computeroutput"><span class="identifier">def</span></code>
- argument is returned (which is 0 by default). Otherwise, all leading whitespace
- characters are truncated, and the remaining string is parsed as a decimal
- number (<code class="computeroutput"><span class="identifier">as_int</span></code> or <code class="computeroutput"><span class="identifier">as_uint</span></code>) or as a floating point number
- in either decimal or scientific form (<code class="computeroutput"><span class="identifier">as_double</span></code>
- or <code class="computeroutput"><span class="identifier">as_float</span></code>). Any extra characters
- are silently discarded, i.e. <code class="computeroutput"><span class="identifier">as_int</span></code>
- will return <code class="computeroutput"><span class="number">1</span></code> for string <code class="computeroutput"><span class="string">"1abc"</span></code>.
- </p>
-<p>
- In case the input string contains a number that is out of the target numeric
- range, the result is undefined.
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Number conversion functions depend on current C locale as set with <code class="computeroutput"><span class="identifier">setlocale</span></code>, so may return unexpected results
- if the locale is different from <code class="computeroutput"><span class="string">"C"</span></code>.
- </p></td></tr>
-</table></div>
-<p>
- <code class="computeroutput"><span class="identifier">as_bool</span></code> converts attribute
- value to boolean as follows: if attribute handle is null, <code class="computeroutput"><span class="identifier">def</span></code>
- argument is returned (which is <code class="computeroutput"><span class="keyword">false</span></code>
- by default). If attribute value is empty, <code class="computeroutput"><span class="keyword">false</span></code>
- is returned. Otherwise, <code class="computeroutput"><span class="keyword">true</span></code>
- is returned if the first character is one of <code class="computeroutput"><span class="char">'1'</span><span class="special">,</span> <span class="char">'t'</span><span class="special">,</span>
- <span class="char">'T'</span><span class="special">,</span> <span class="char">'y'</span><span class="special">,</span> <span class="char">'Y'</span></code>.
- This means that strings like <code class="computeroutput"><span class="string">"true"</span></code>
- and <code class="computeroutput"><span class="string">"yes"</span></code> are recognized
- as <code class="computeroutput"><span class="keyword">true</span></code>, while strings like
- <code class="computeroutput"><span class="string">"false"</span></code> and <code class="computeroutput"><span class="string">"no"</span></code> are recognized as <code class="computeroutput"><span class="keyword">false</span></code>. For more complex matching you'll have
- to write your own function.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- There are no portable 64-bit types in C++, so there is no corresponding
- conversion function. If your platform has a 64-bit integer, you can easily
- write a conversion function yourself.
- </p></td></tr>
-</table></div>
-<a name="code_traverse_base_data"></a><p>
- This is an example of using these functions, along with node data retrieval
- ones (<a href="../samples/traverse_base.cpp" target="_top">samples/traverse_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">);</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">": AllowRemote "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"AllowRemote"</span><span class="special">).</span><span class="identifier">as_bool</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", Timeout "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Timeout"</span><span class="special">).</span><span class="identifier">as_int</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", Description '"</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"Description"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"'\n"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.contents"></a><a class="link" href="access.html#manual.access.contents" title="Contents-based traversal functions"> Contents-based traversal functions</a>
-</h3></div></div></div>
-<a name="xml_node::child"></a><a name="xml_node::attribute"></a><a name="xml_node::next_sibling_name"></a><a name="xml_node::previous_sibling_name"></a><p>
- Since a lot of document traversal consists of finding the node/attribute
- with the correct name, there are special functions for that purpose:
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">child</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">next_sibling</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">previous_sibling</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">child</span></code> and <code class="computeroutput"><span class="identifier">attribute</span></code>
- return the first child/attribute with the specified name; <code class="computeroutput"><span class="identifier">next_sibling</span></code>
- and <code class="computeroutput"><span class="identifier">previous_sibling</span></code> return
- the first sibling in the corresponding direction with the specified name.
- All string comparisons are case-sensitive. In case the node handle is null
- or there is no node/attribute with the specified name, null handle is returned.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">child</span></code> and <code class="computeroutput"><span class="identifier">next_sibling</span></code>
- functions can be used together to loop through all child nodes with the desired
- name like this:
- </p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">);</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-</pre>
-<a name="xml_node::find_child_by_attribute"></a><p>
- Occasionally the needed node is specified not by the unique name but instead
- by the value of some attribute; for example, it is common to have node collections
- with each node having a unique id: <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">group</span><span class="special">&gt;&lt;</span><span class="identifier">item</span> <span class="identifier">id</span><span class="special">=</span><span class="string">"1"</span><span class="special">/&gt;</span> <span class="special">&lt;</span><span class="identifier">item</span> <span class="identifier">id</span><span class="special">=</span><span class="string">"2"</span><span class="special">/&gt;&lt;/</span><span class="identifier">group</span><span class="special">&gt;</span></code>. There are two functions for finding
- child nodes based on the attribute values:
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">find_child_by_attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">attr_name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">attr_value</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">find_child_by_attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">attr_name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">attr_value</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- The three-argument function returns the first child node with the specified
- name which has an attribute with the specified name/value; the two-argument
- function skips the name test for the node, which can be useful for searching
- in heterogeneous collections. If the node handle is null or if no node is
- found, null handle is returned. All string comparisons are case-sensitive.
- </p>
-<p>
- In all of the above functions, all arguments have to be valid strings; passing
- null pointers results in undefined behavior.
- </p>
-<p>
- This is an example of using these functions (<a href="../samples/traverse_base.cpp" target="_top">samples/traverse_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool for *.dae generation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">find_child_by_attribute</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">,</span> <span class="string">"OutputFileMasks"</span><span class="special">,</span> <span class="string">"*.dae"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
-
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">);</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.rangefor"></a><a class="link" href="access.html#manual.access.rangefor" title="Range-based for-loop support"> Range-based for-loop support</a>
-</h3></div></div></div>
-<a name="xml_node::children"></a><a name="xml_node::attributes"></a><p>
- If your C++ compiler supports range-based for-loop (this is a C++11 feature,
- at the time of writing it's supported by Microsoft Visual Studio 11 Beta,
- GCC 4.6 and Clang 3.0), you can use it to enumerate nodes/attributes. Additional
- helpers are provided to support this; note that they are also compatible
- with <a href="http://www.boost.org/libs/foreach/" target="_top">Boost Foreach</a>,
- and possibly other pre-C++11 foreach facilities.
- </p>
-<pre class="programlisting"><span class="emphasis"><em>implementation-defined type</em></span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">children</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="emphasis"><em>implementation-defined type</em></span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">children</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="emphasis"><em>implementation-defined type</em></span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">attributes</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">children</span></code> function allows
- you to enumerate all child nodes; <code class="computeroutput"><span class="identifier">children</span></code>
- function with <code class="computeroutput"><span class="identifier">name</span></code> argument
- allows you to enumerate all child nodes with a specific name; <code class="computeroutput"><span class="identifier">attributes</span></code> function allows you to enumerate
- all attributes of the node. Note that you can also use node object itself
- in a range-based for construct, which is equivalent to using <code class="computeroutput"><span class="identifier">children</span><span class="special">()</span></code>.
- </p>
-<p>
- This is an example of using these functions (<a href="../samples/traverse_rangefor.cpp" target="_top">samples/traverse_rangefor.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span><span class="special">:</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">children</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool:"</span><span class="special">;</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">attr</span><span class="special">:</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attributes</span><span class="special">())</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">child</span><span class="special">:</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">children</span><span class="special">())</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", child "</span> <span class="special">&lt;&lt;</span> <span class="identifier">child</span><span class="special">.</span><span class="identifier">name</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.iterators"></a><a class="link" href="access.html#manual.access.iterators" title="Traversing node/attribute lists via iterators"> Traversing node/attribute lists
- via iterators</a>
-</h3></div></div></div>
-<a name="xml_node_iterator"></a><a name="xml_attribute_iterator"></a><a name="xml_node::begin"></a><a name="xml_node::end"></a><a name="xml_node::attributes_begin"></a><a name="xml_node::attributes_end"></a><p>
- Child node lists and attribute lists are simply double-linked lists; while
- you can use <code class="computeroutput"><span class="identifier">previous_sibling</span></code>/<code class="computeroutput"><span class="identifier">next_sibling</span></code> and other such functions for
- iteration, pugixml additionally provides node and attribute iterators, so
- that you can treat nodes as containers of other nodes or attributes:
- </p>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">xml_node_iterator</span><span class="special">;</span>
-<span class="keyword">class</span> <span class="identifier">xml_attribute_iterator</span><span class="special">;</span>
-
-<span class="keyword">typedef</span> <span class="identifier">xml_node_iterator</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">;</span>
-<span class="identifier">iterator</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">iterator</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
-<span class="keyword">typedef</span> <span class="identifier">xml_attribute_iterator</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">attribute_iterator</span><span class="special">;</span>
-<span class="identifier">attribute_iterator</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">attributes_begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">attribute_iterator</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">attributes_end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">begin</span></code> and <code class="computeroutput"><span class="identifier">attributes_begin</span></code>
- return iterators that point to the first node/attribute, respectively; <code class="computeroutput"><span class="identifier">end</span></code> and <code class="computeroutput"><span class="identifier">attributes_end</span></code>
- return past-the-end iterator for node/attribute list, respectively - this
- iterator can't be dereferenced, but decrementing it results in an iterator
- pointing to the last element in the list (except for empty lists, where decrementing
- past-the-end iterator results in undefined behavior). Past-the-end iterator
- is commonly used as a termination value for iteration loops (see sample below).
- If you want to get an iterator that points to an existing handle, you can
- construct the iterator with the handle as a single constructor argument,
- like so: <code class="computeroutput"><span class="identifier">xml_node_iterator</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span></code>.
- For <code class="computeroutput"><span class="identifier">xml_attribute_iterator</span></code>,
- you'll have to provide both an attribute and its parent node.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">begin</span></code> and <code class="computeroutput"><span class="identifier">end</span></code>
- return equal iterators if called on null node; such iterators can't be dereferenced.
- <code class="computeroutput"><span class="identifier">attributes_begin</span></code> and <code class="computeroutput"><span class="identifier">attributes_end</span></code> behave the same way. For
- correct iterator usage this means that child node/attribute collections of
- null nodes appear to be empty.
- </p>
-<p>
- Both types of iterators have bidirectional iterator semantics (i.e. they
- can be incremented and decremented, but efficient random access is not supported)
- and support all usual iterator operations - comparison, dereference, etc.
- The iterators are invalidated if the node/attribute objects they're pointing
- to are removed from the tree; adding nodes/attributes does not invalidate
- any iterators.
- </p>
-<p>
- Here is an example of using iterators for document traversal (<a href="../samples/traverse_iter.cpp" target="_top">samples/traverse_iter.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node_iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">it</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool:"</span><span class="special">;</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute_iterator</span> <span class="identifier">ait</span> <span class="special">=</span> <span class="identifier">it</span><span class="special">-&gt;</span><span class="identifier">attributes_begin</span><span class="special">();</span> <span class="identifier">ait</span> <span class="special">!=</span> <span class="identifier">it</span><span class="special">-&gt;</span><span class="identifier">attributes_end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">ait</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">ait</span><span class="special">-&gt;</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">ait</span><span class="special">-&gt;</span><span class="identifier">value</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Node and attribute iterators are somewhere in the middle between const
- and non-const iterators. While dereference operation yields a non-constant
- reference to the object, so that you can use it for tree modification operations,
- modifying this reference by assignment - i.e. passing iterators to a function
- like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">sort</span></code> - will not give expected results,
- as assignment modifies local handle that's stored in the iterator.
- </p></td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.walker"></a><a class="link" href="access.html#manual.access.walker" title="Recursive traversal with xml_tree_walker"> Recursive traversal with xml_tree_walker</a>
-</h3></div></div></div>
-<a name="xml_tree_walker"></a><p>
- The methods described above allow traversal of immediate children of some
- node; if you want to do a deep tree traversal, you'll have to do it via a
- recursive function or some equivalent method. However, pugixml provides a
- helper for depth-first traversal of a subtree. In order to use it, you have
- to implement <code class="computeroutput"><span class="identifier">xml_tree_walker</span></code>
- interface and to call <code class="computeroutput"><span class="identifier">traverse</span></code>
- function:
- </p>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">xml_tree_walker</span>
-<span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
- <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">for_each</span><span class="special">(</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
- <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-
- <span class="keyword">int</span> <span class="identifier">depth</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
-
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">traverse</span><span class="special">(</span><span class="identifier">xml_tree_walker</span><span class="special">&amp;</span> <span class="identifier">walker</span><span class="special">);</span>
-</pre>
-<a name="xml_tree_walker::begin"></a><a name="xml_tree_walker::for_each"></a><a name="xml_tree_walker::end"></a><a name="xml_node::traverse"></a><p>
- The traversal is launched by calling <code class="computeroutput"><span class="identifier">traverse</span></code>
- function on traversal root and proceeds as follows:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- First, <code class="computeroutput"><span class="identifier">begin</span></code> function
- is called with traversal root as its argument.
- </li>
-<li class="listitem">
- Then, <code class="computeroutput"><span class="identifier">for_each</span></code> function
- is called for all nodes in the traversal subtree in depth first order,
- excluding the traversal root. Node is passed as an argument.
- </li>
-<li class="listitem">
- Finally, <code class="computeroutput"><span class="identifier">end</span></code> function
- is called with traversal root as its argument.
- </li>
-</ul></div>
-<p>
- If <code class="computeroutput"><span class="identifier">begin</span></code>, <code class="computeroutput"><span class="identifier">end</span></code>
- or any of the <code class="computeroutput"><span class="identifier">for_each</span></code> calls
- return <code class="computeroutput"><span class="keyword">false</span></code>, the traversal
- is terminated and <code class="computeroutput"><span class="keyword">false</span></code> is returned
- as the traversal result; otherwise, the traversal results in <code class="computeroutput"><span class="keyword">true</span></code>. Note that you don't have to override
- <code class="computeroutput"><span class="identifier">begin</span></code> or <code class="computeroutput"><span class="identifier">end</span></code>
- functions; their default implementations return <code class="computeroutput"><span class="keyword">true</span></code>.
- </p>
-<a name="xml_tree_walker::depth"></a><p>
- You can get the node's depth relative to the traversal root at any point
- by calling <code class="computeroutput"><span class="identifier">depth</span></code> function.
- It returns <code class="computeroutput"><span class="special">-</span><span class="number">1</span></code>
- if called from <code class="computeroutput"><span class="identifier">begin</span></code>/<code class="computeroutput"><span class="identifier">end</span></code>, and returns 0-based depth if called
- from <code class="computeroutput"><span class="identifier">for_each</span></code> - depth is
- 0 for all children of the traversal root, 1 for all grandchildren and so
- on.
- </p>
-<p>
- This is an example of traversing tree hierarchy with xml_tree_walker (<a href="../samples/traverse_walker.cpp" target="_top">samples/traverse_walker.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">simple_walker</span><span class="special">:</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_tree_walker</span>
-<span class="special">{</span>
- <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">for_each</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">depth</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span> <span class="comment">// indentation
-</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">node_types</span><span class="special">[</span><span class="identifier">node</span><span class="special">.</span><span class="identifier">type</span><span class="special">()]</span> <span class="special">&lt;&lt;</span> <span class="string">": name='"</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"', value='"</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"'\n"</span><span class="special">;</span>
-
- <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span> <span class="comment">// continue traversal
-</span> <span class="special">}</span>
-<span class="special">};</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">simple_walker</span> <span class="identifier">walker</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">traverse</span><span class="special">(</span><span class="identifier">walker</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.predicate"></a><a class="link" href="access.html#manual.access.predicate" title="Searching for nodes/attributes with predicates"> Searching for nodes/attributes
- with predicates</a>
-</h3></div></div></div>
-<a name="xml_node::find_attribute"></a><a name="xml_node::find_child"></a><a name="xml_node::find_node"></a><p>
- While there are existing functions for getting a node/attribute with known
- contents, they are often not sufficient for simple queries. As an alternative
- for manual iteration through nodes/attributes until the needed one is found,
- you can make a predicate and call one of <code class="computeroutput"><span class="identifier">find_</span></code>
- functions:
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span> <span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">find_attribute</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span> <span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">find_child</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span> <span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">find_node</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- The predicate should be either a plain function or a function object which
- accepts one argument of type <code class="computeroutput"><span class="identifier">xml_attribute</span></code>
- (for <code class="computeroutput"><span class="identifier">find_attribute</span></code>) or
- <code class="computeroutput"><span class="identifier">xml_node</span></code> (for <code class="computeroutput"><span class="identifier">find_child</span></code> and <code class="computeroutput"><span class="identifier">find_node</span></code>),
- and returns <code class="computeroutput"><span class="keyword">bool</span></code>. The predicate
- is never called with null handle as an argument.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">find_attribute</span></code> function iterates
- through all attributes of the specified node, and returns the first attribute
- for which the predicate returned <code class="computeroutput"><span class="keyword">true</span></code>.
- If the predicate returned <code class="computeroutput"><span class="keyword">false</span></code>
- for all attributes or if there were no attributes (including the case where
- the node is null), null attribute is returned.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">find_child</span></code> function iterates
- through all child nodes of the specified node, and returns the first node
- for which the predicate returned <code class="computeroutput"><span class="keyword">true</span></code>.
- If the predicate returned <code class="computeroutput"><span class="keyword">false</span></code>
- for all nodes or if there were no child nodes (including the case where the
- node is null), null node is returned.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">find_node</span></code> function performs
- a depth-first traversal through the subtree of the specified node (excluding
- the node itself), and returns the first node for which the predicate returned
- <code class="computeroutput"><span class="keyword">true</span></code>. If the predicate returned
- <code class="computeroutput"><span class="keyword">false</span></code> for all nodes or if subtree
- was empty, null node is returned.
- </p>
-<p>
- This is an example of using predicate-based functions (<a href="../samples/traverse_predicate.cpp" target="_top">samples/traverse_predicate.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">small_timeout</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Timeout"</span><span class="special">).</span><span class="identifier">as_int</span><span class="special">()</span> <span class="special">&lt;</span> <span class="number">20</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="keyword">struct</span> <span class="identifier">allow_remote_predicate</span>
-<span class="special">{</span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">attr</span><span class="special">)</span> <span class="keyword">const</span>
- <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">strcmp</span><span class="special">(</span><span class="identifier">attr</span><span class="special">.</span><span class="identifier">name</span><span class="special">(),</span> <span class="string">"AllowRemote"</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span><span class="special">;</span>
- <span class="special">}</span>
-
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span><span class="special">)</span> <span class="keyword">const</span>
- <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"AllowRemote"</span><span class="special">).</span><span class="identifier">as_bool</span><span class="special">();</span>
- <span class="special">}</span>
-<span class="special">};</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// Find child via predicate (looks for direct children only)
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">find_child</span><span class="special">(</span><span class="identifier">allow_remote_predicate</span><span class="special">()).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// Find node via predicate (looks for all descendants in depth-first order)
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">find_node</span><span class="special">(</span><span class="identifier">allow_remote_predicate</span><span class="special">()).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// Find attribute via predicate
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">find_attribute</span><span class="special">(</span><span class="identifier">allow_remote_predicate</span><span class="special">()).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// We can use simple functions instead of function objects
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">find_child</span><span class="special">(</span><span class="identifier">small_timeout</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.text"></a><a class="link" href="access.html#manual.access.text" title="Working with text contents"> Working with text contents</a>
-</h3></div></div></div>
-<a name="xml_text"></a><p>
- It is common to store data as text contents of some node - i.e. <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;&lt;</span><span class="identifier">description</span><span class="special">&gt;</span><span class="identifier">This</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">node</span><span class="special">&lt;/</span><span class="identifier">description</span><span class="special">&gt;&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>.
- In this case, <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">description</span><span class="special">&gt;</span></code> node does not have a value, but instead
- has a child of type <a class="link" href="dom.html#node_pcdata">node_pcdata</a> with value
- <code class="computeroutput"><span class="string">"This is a node"</span></code>. pugixml
- provides a special class, <code class="computeroutput"><span class="identifier">xml_text</span></code>,
- to work with such data. Working with text objects to modify data is described
- in <a class="link" href="modify.html#manual.modify.text" title="Working with text contents">the documentation for modifying document
- data</a>; this section describes the access interface of <code class="computeroutput"><span class="identifier">xml_text</span></code>.
- </p>
-<a name="xml_node::text"></a><p>
- You can get the text object from a node by using <code class="computeroutput"><span class="identifier">text</span><span class="special">()</span></code> method:
- </p>
-<pre class="programlisting"><span class="identifier">xml_text</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">text</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- If the node has a type <code class="computeroutput"><span class="identifier">node_pcdata</span></code>
- or <code class="computeroutput"><span class="identifier">node_cdata</span></code>, then the node
- itself is used to return data; otherwise, a first child node of type <code class="computeroutput"><span class="identifier">node_pcdata</span></code> or <code class="computeroutput"><span class="identifier">node_cdata</span></code>
- is used.
- </p>
-<a name="xml_text::empty"></a><a name="xml_text::unspecified_bool_type"></a><p>
- You can check if the text object is bound to a valid PCDATA/CDATA node by
- using it as a boolean value, i.e. <code class="computeroutput"><span class="keyword">if</span>
- <span class="special">(</span><span class="identifier">text</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span></code> or <code class="computeroutput"><span class="keyword">if</span>
- <span class="special">(!</span><span class="identifier">text</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span></code>. Alternatively you can check it
- by using the <code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code>
- method:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<a name="xml_text::get"></a><p>
- Given a text object, you can get the contents (i.e. the value of PCDATA/CDATA
- node) by using the following function:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- In case text object is empty, the function returns an empty string - it never
- returns a null pointer.
- </p>
-<a name="xml_text::as_string"></a><a name="xml_text::as_int"></a><a name="xml_text::as_uint"></a><a name="xml_text::as_double"></a><a name="xml_text::as_float"></a><a name="xml_text::as_bool"></a><p>
- If you need a non-empty string if the text object is empty, or if the text
- contents is actually a number or a boolean that is stored as a string, you
- can use the following accessors:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">as_string</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">def</span> <span class="special">=</span> <span class="string">""</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">int</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">as_int</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">as_uint</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">double</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">as_double</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">float</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">as_float</span><span class="special">(</span><span class="keyword">float</span> <span class="identifier">def</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">as_bool</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">def</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- All of the above functions have the same semantics as similar <code class="computeroutput"><span class="identifier">xml_attribute</span></code> members: they return the
- default argument if the text object is empty, they convert the text contents
- to a target type using the same rules and restrictions. You can <a class="link" href="access.html#xml_attribute::as_int">refer
- to documentation for the attribute functions</a> for details.
- </p>
-<a name="xml_text::data"></a><p>
- <code class="computeroutput"><span class="identifier">xml_text</span></code> is essentially a
- helper class that operates on <code class="computeroutput"><span class="identifier">xml_node</span></code>
- values. It is bound to a node of type <a class="link" href="dom.html#node_pcdata">node_pcdata</a>
- or <a class="link" href="dom.html#node_cdata">node_cdata</a>. You can use the following
- function to retrieve this node:
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Essentially, assuming <code class="computeroutput"><span class="identifier">text</span></code>
- is an <code class="computeroutput"><span class="identifier">xml_text</span></code> object, calling
- <code class="computeroutput"><span class="identifier">text</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span></code> is
- equivalent to calling <code class="computeroutput"><span class="identifier">text</span><span class="special">.</span><span class="identifier">data</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span></code>.
- </p>
-<p>
- This is an example of using <code class="computeroutput"><span class="identifier">xml_text</span></code>
- object (<a href="../samples/text.cpp" target="_top">samples/text.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Project name: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">project</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"name"</span><span class="special">).</span><span class="identifier">text</span><span class="special">().</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Project version: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">project</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"version"</span><span class="special">).</span><span class="identifier">text</span><span class="special">().</span><span class="identifier">as_double</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Project visibility: "</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">project</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"public"</span><span class="special">).</span><span class="identifier">text</span><span class="special">().</span><span class="identifier">as_bool</span><span class="special">(/*</span> <span class="identifier">def</span><span class="special">=</span> <span class="special">*/</span> <span class="keyword">true</span><span class="special">)</span> <span class="special">?</span> <span class="string">"public"</span> <span class="special">:</span> <span class="string">"private"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Project description: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">project</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"description"</span><span class="special">).</span><span class="identifier">text</span><span class="special">().</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.access.misc"></a><a class="link" href="access.html#manual.access.misc" title="Miscellaneous functions"> Miscellaneous functions</a>
-</h3></div></div></div>
-<a name="xml_node::root"></a><p>
- If you need to get the document root of some node, you can use the following
- function:
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">root</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- This function returns the node with type <a class="link" href="dom.html#node_document">node_document</a>,
- which is the root node of the document the node belongs to (unless the node
- is null, in which case null node is returned).
- </p>
-<a name="xml_node::path"></a><a name="xml_node::first_element_by_path"></a><p>
- While pugixml supports complex XPath expressions, sometimes a simple path
- handling facility is needed. There are two functions, for getting node path
- and for converting path to a node:
- </p>
-<pre class="programlisting"><span class="identifier">string_t</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">path</span><span class="special">(</span><span class="identifier">char_t</span> <span class="identifier">delimiter</span> <span class="special">=</span> <span class="char">'/'</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">first_element_by_path</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span> <span class="identifier">char_t</span> <span class="identifier">delimiter</span> <span class="special">=</span> <span class="char">'/'</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Node paths consist of node names, separated with a delimiter (which is <code class="computeroutput"><span class="special">/</span></code> by default); also paths can contain self
- (<code class="computeroutput"><span class="special">.</span></code>) and parent (<code class="computeroutput"><span class="special">..</span></code>) pseudo-names, so that this is a valid
- path: <code class="computeroutput"><span class="string">"../../foo/./bar"</span></code>.
- <code class="computeroutput"><span class="identifier">path</span></code> returns the path to
- the node from the document root, <code class="computeroutput"><span class="identifier">first_element_by_path</span></code>
- looks for a node represented by a given path; a path can be an absolute one
- (absolute paths start with the delimiter), in which case the rest of the
- path is treated as document root relative, and relative to the given node.
- For example, in the following document: <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">&gt;&lt;</span><span class="identifier">b</span><span class="special">&gt;&lt;</span><span class="identifier">c</span><span class="special">/&gt;&lt;/</span><span class="identifier">b</span><span class="special">&gt;&lt;/</span><span class="identifier">a</span><span class="special">&gt;</span></code>,
- node <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">c</span><span class="special">/&gt;</span></code> has path <code class="computeroutput"><span class="string">"a/b/c"</span></code>;
- calling <code class="computeroutput"><span class="identifier">first_element_by_path</span></code>
- for document with path <code class="computeroutput"><span class="string">"a/b"</span></code>
- results in node <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">b</span><span class="special">/&gt;</span></code>; calling <code class="computeroutput"><span class="identifier">first_element_by_path</span></code>
- for node <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">/&gt;</span></code> with path <code class="computeroutput"><span class="string">"../a/./b/../."</span></code>
- results in node <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">/&gt;</span></code>; calling <code class="computeroutput"><span class="identifier">first_element_by_path</span></code>
- with path <code class="computeroutput"><span class="string">"/a"</span></code> results
- in node <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">/&gt;</span></code> for any node.
- </p>
-<p>
- In case path component is ambiguous (if there are two nodes with given name),
- the first one is selected; paths are not guaranteed to uniquely identify
- nodes in a document. If any component of a path is not found, the result
- of <code class="computeroutput"><span class="identifier">first_element_by_path</span></code>
- is null node; also <code class="computeroutput"><span class="identifier">first_element_by_path</span></code>
- returns null node for null nodes, in which case the path does not matter.
- <code class="computeroutput"><span class="identifier">path</span></code> returns an empty string
- for null nodes.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- <code class="computeroutput"><span class="identifier">path</span></code> function returns the
- result as STL string, and thus is not available if <a class="link" href="install.html#PUGIXML_NO_STL">PUGIXML_NO_STL</a>
- is defined.
- </p></td></tr>
-</table></div>
-<a name="xml_node::offset_debug"></a><p>
- pugixml does not record row/column information for nodes upon parsing for
- efficiency reasons. However, if the node has not changed in a significant
- way since parsing (the name/value are not changed, and the node itself is
- the original one, i.e. it was not deleted from the tree and re-added later),
- it is possible to get the offset from the beginning of XML buffer:
- </p>
-<pre class="programlisting"><span class="identifier">ptrdiff_t</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">offset_debug</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- If the offset is not available (this happens if the node is null, was not
- originally parsed from a stream, or has changed in a significant way), the
- function returns -1. Otherwise it returns the offset to node's data from
- the beginning of XML buffer in <a class="link" href="dom.html#char_t">pugi::char_t</a>
- units. For more information on parsing offsets, see <a class="link" href="loading.html#xml_parse_result::offset">parsing
- error handling documentation</a>.
- </p>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <b>Accessing</b> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="loading.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="modify.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/apiref.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/apiref.html
deleted file mode 100644
index cf1a13743..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/apiref.html
+++ /dev/null
@@ -1,1554 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>API Reference</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="changes.html" title="Changelog">
-<link rel="next" href="toc.html" title="Table of Contents">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <b>API Reference</b> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="changes.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="toc.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.apiref"></a><a class="link" href="apiref.html" title="API Reference"> API Reference</a>
-</h2></div></div></div>
-<p>
- This is the reference for all macros, types, enumerations, classes and functions
- in pugixml. Each symbol is a link that leads to the relevant section of the
- manual.
- </p>
-<p>
- Macros:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_WCHAR_MODE">PUGIXML_WCHAR_MODE</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_NO_XPATH">PUGIXML_NO_XPATH</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_NO_STL">PUGIXML_NO_STL</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_NO_EXCEPTIONS">PUGIXML_NO_EXCEPTIONS</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_API">PUGIXML_API</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_CLASS">PUGIXML_CLASS</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_FUNCTION">PUGIXML_FUNCTION</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_MEMORY_PAGE_SIZE">PUGIXML_MEMORY_PAGE_SIZE</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_MEMORY_OUTPUT_STACK">PUGIXML_MEMORY_OUTPUT_STACK</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_MEMORY_XPATH_PAGE_SIZE">PUGIXML_MEMORY_XPATH_PAGE_SIZE</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="preprocessor">#define</span> </code><a class="link" href="install.html#PUGIXML_HEADER_ONLY">PUGIXML_HEADER_ONLY</a>
- </li>
-</ul></div>
-<p>
- Types:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> </code><span class="emphasis"><em>configuration-defined
- type</em></span><code class="computeroutput"> </code><a class="link" href="dom.html#char_t">char_t</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> </code><span class="emphasis"><em>configuration-defined
- type</em></span><code class="computeroutput"> </code><a class="link" href="dom.html#string_t">string_t</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> <span class="keyword">void</span><span class="special">*</span> <span class="special">(*</span></code><a class="link" href="dom.html#allocation_function">allocation_function</a><code class="computeroutput"><span class="special">)(</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> <span class="keyword">void</span>
- <span class="special">(*</span></code><a class="link" href="dom.html#deallocation_function">deallocation_function</a><code class="computeroutput"><span class="special">)(</span><span class="keyword">void</span><span class="special">*</span>
- <span class="identifier">ptr</span><span class="special">);</span></code>
- </li>
-</ul></div>
-<p>
- Enumerations:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">enum</span> </code><a class="link" href="dom.html#xml_node_type">xml_node_type</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="dom.html#node_null">node_null</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_document">node_document</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_element">node_element</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_pcdata">node_pcdata</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_cdata">node_cdata</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_comment">node_comment</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_pi">node_pi</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_declaration">node_declaration</a>
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_doctype">node_doctype</a> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">enum</span> </code><a class="link" href="loading.html#xml_parse_status">xml_parse_status</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="loading.html#status_ok">status_ok</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_file_not_found">status_file_not_found</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_io_error">status_io_error</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_out_of_memory">status_out_of_memory</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_internal_error">status_internal_error</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_unrecognized_tag">status_unrecognized_tag</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_pi">status_bad_pi</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_comment">status_bad_comment</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_cdata">status_bad_cdata</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_doctype">status_bad_doctype</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_pcdata">status_bad_pcdata</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_start_element">status_bad_start_element</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_attribute">status_bad_attribute</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_bad_end_element">status_bad_end_element</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#status_end_element_mismatch">status_end_element_mismatch</a>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">enum</span> </code><a class="link" href="loading.html#xml_encoding">xml_encoding</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="loading.html#encoding_auto">encoding_auto</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf8">encoding_utf8</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf16_le">encoding_utf16_le</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf16_be">encoding_utf16_be</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf16">encoding_utf16</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf32_le">encoding_utf32_le</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf32_be">encoding_utf32_be</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_utf32">encoding_utf32</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_wchar">encoding_wchar</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#encoding_latin1">encoding_latin1</a> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">enum</span> </code><a class="link" href="xpath.html#xpath_value_type">xpath_value_type</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_type_none">xpath_type_none</a>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_type_node_set">xpath_type_node_set</a>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_type_number">xpath_type_number</a>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_type_string">xpath_type_string</a>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_type_boolean">xpath_type_boolean</a>
- </li>
-</ul></div>
- </li>
-</ul></div>
-<p>
- Constants:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Formatting options bit flags:
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="saving.html#format_default">format_default</a>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#format_indent">format_indent</a>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#format_no_declaration">format_no_declaration</a>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#format_no_escapes">format_no_escapes</a>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#format_raw">format_raw</a>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#format_save_file_text">format_save_file_text</a>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#format_write_bom">format_write_bom</a> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- Parsing options bit flags:
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="loading.html#parse_cdata">parse_cdata</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_comments">parse_comments</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_declaration">parse_declaration</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_default">parse_default</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_doctype">parse_doctype</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_eol">parse_eol</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_escapes">parse_escapes</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_full">parse_full</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_minimal">parse_minimal</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_pi">parse_pi</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_ws_pcdata">parse_ws_pcdata</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_ws_pcdata_single">parse_ws_pcdata_single</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_wconv_attribute">parse_wconv_attribute</a>
- </li>
-<li class="listitem">
- <a class="link" href="loading.html#parse_wnorm_attribute">parse_wnorm_attribute</a>
- </li>
-</ul></div>
- </li>
-</ul></div>
-<p>
- Classes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="dom.html#xml_attribute">xml_attribute</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="dom.html#xml_attribute::ctor">xml_attribute</a><code class="computeroutput"><span class="special">();</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::empty">empty</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="dom.html#xml_attribute::unspecified_bool_type">unspecified_bool_type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::comparison">operator==</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::comparison">operator!=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::comparison">operator&lt;</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::comparison">operator&gt;</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::comparison">operator&lt;=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_attribute::comparison">operator&gt;=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">size_t</span> </code><a class="link" href="dom.html#xml_attribute::hash_value">hash_value</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="access.html#xml_attribute::next_attribute">next_attribute</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="access.html#xml_attribute::previous_attribute">previous_attribute</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_attribute::name">name</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_attribute::value">value</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_attribute::as_string">as_string</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">def</span> <span class="special">=</span>
- <span class="string">""</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">int</span> </code><a class="link" href="access.html#xml_attribute::as_int">as_int</a><code class="computeroutput"><span class="special">(</span><span class="keyword">int</span> <span class="identifier">def</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
- </code><a class="link" href="access.html#xml_attribute::as_uint">as_uint</a><code class="computeroutput"><span class="special">(</span><span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">def</span>
- <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">double</span> </code><a class="link" href="access.html#xml_attribute::as_double">as_double</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">def</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">float</span> </code><a class="link" href="access.html#xml_attribute::as_float">as_float</a><code class="computeroutput"><span class="special">(</span><span class="keyword">float</span> <span class="identifier">def</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="access.html#xml_attribute::as_bool">as_bool</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">def</span> <span class="special">=</span>
- <span class="keyword">false</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_attribute::set_name">set_name</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_attribute::set_value">set_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_attribute::set_value">set_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_attribute::set_value">set_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_attribute::set_value">set_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_attribute::set_value">set_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_attribute::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_attribute::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_attribute::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_attribute::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_attribute::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="dom.html#xml_node">xml_node</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="dom.html#xml_node::ctor">xml_node</a><code class="computeroutput"><span class="special">();</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::empty">empty</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="dom.html#xml_node::unspecified_bool_type">unspecified_bool_type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::comparison">operator==</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::comparison">operator!=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::comparison">operator&lt;</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::comparison">operator&gt;</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::comparison">operator&lt;=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="dom.html#xml_node::comparison">operator&gt;=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">r</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">size_t</span> </code><a class="link" href="dom.html#xml_node::hash_value">hash_value</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node_type</span> </code><a class="link" href="dom.html#xml_node::type">type</a><code class="computeroutput"><span class="special">()</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_node::name">name</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_node::value">value</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::parent">parent</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::first_child">first_child</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::last_child">last_child</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::next_sibling">next_sibling</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::previous_sibling">previous_sibling</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="access.html#xml_node::first_attribute">first_attribute</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="access.html#xml_node::last_attribute">last_attribute</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <span class="emphasis"><em>implementation-defined type</em></span> <a class="link" href="access.html#xml_node::children">children</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <span class="emphasis"><em>implementation-defined type</em></span> <a class="link" href="access.html#xml_node::children">children</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <span class="emphasis"><em>implementation-defined type</em></span> <a class="link" href="access.html#xml_node::attributes">attributes</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::child">child</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="access.html#xml_node::attribute">attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::next_sibling_name">next_sibling</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::previous_sibling_name">previous_sibling</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::find_child_by_attribute">find_child_by_attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">attr_name</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">attr_value</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::find_child_by_attribute">find_child_by_attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">attr_name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">attr_value</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_node::child_value">child_value</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_node::child_value">child_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_text</span> </code><a class="link" href="access.html#xml_node::text">text</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> <span class="identifier">xml_node_iterator</span>
- </code><a class="link" href="access.html#xml_node_iterator">iterator</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">iterator</span> </code><a class="link" href="access.html#xml_node::begin">begin</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">iterator</span> </code><a class="link" href="access.html#xml_node::end">end</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> <span class="identifier">xml_attribute_iterator</span>
- </code><a class="link" href="access.html#xml_attribute_iterator">attribute_iterator</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">attribute_iterator</span> </code><a class="link" href="access.html#xml_node::attributes_begin">attributes_begin</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">attribute_iterator</span> </code><a class="link" href="access.html#xml_node::attributes_end">attributes_end</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="access.html#xml_node::traverse">traverse</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_tree_walker</span><span class="special">&amp;</span> <span class="identifier">walker</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span> <span class="identifier">xml_attribute</span>
- </code><a class="link" href="access.html#xml_node::find_attribute">find_attribute</a><code class="computeroutput"><span class="special">(</span><span class="identifier">Predicate</span>
- <span class="identifier">pred</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span> <span class="identifier">xml_node</span>
- </code><a class="link" href="access.html#xml_node::find_child">find_child</a><code class="computeroutput"><span class="special">(</span><span class="identifier">Predicate</span>
- <span class="identifier">pred</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span> <span class="identifier">xml_node</span>
- </code><a class="link" href="access.html#xml_node::find_node">find_node</a><code class="computeroutput"><span class="special">(</span><span class="identifier">Predicate</span>
- <span class="identifier">pred</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">string_t</span> </code><a class="link" href="access.html#xml_node::path">path</a><code class="computeroutput"><span class="special">(</span><span class="identifier">char_t</span>
- <span class="identifier">delimiter</span> <span class="special">=</span>
- <span class="char">'/'</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::first_element_by_path">xml_node::first_element_by_path</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">path</span><span class="special">,</span>
- <span class="identifier">char_t</span> <span class="identifier">delimiter</span>
- <span class="special">=</span> <span class="char">'/'</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_node::root">root</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">ptrdiff_t</span> </code><a class="link" href="access.html#xml_node::offset_debug">offset_debug</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_node::set_name">set_name</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_node::set_value">set_value</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::append_attribute">append_attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::prepend_attribute">prepend_attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::insert_attribute_after">insert_attribute_after</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::insert_attribute_before">insert_attribute_before</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::append_child">append_child</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node_type</span>
- <span class="identifier">type</span> <span class="special">=</span>
- <span class="identifier">node_element</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::prepend_child">prepend_child</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node_type</span>
- <span class="identifier">type</span> <span class="special">=</span>
- <span class="identifier">node_element</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::insert_child_after">insert_child_after</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node_type</span>
- <span class="identifier">type</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::insert_child_before">insert_child_before</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node_type</span>
- <span class="identifier">type</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::append_child">append_child</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::prepend_child">prepend_child</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::insert_child_after">insert_child_after</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::insert_child_before">insert_child_before</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::append_copy">append_copy</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::prepend_copy">prepend_copy</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::insert_copy_after">insert_copy_after</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="modify.html#xml_node::insert_copy_before">insert_copy_before</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::append_copy">append_copy</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::prepend_copy">prepend_copy</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::insert_copy_after">insert_copy_after</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="modify.html#xml_node::insert_copy_before">insert_copy_before</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_node::remove_attribute">remove_attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span>
- <span class="identifier">a</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_node::remove_attribute">remove_attribute</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_node::remove_child">remove_child</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_node::remove_child">remove_child</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="saving.html#xml_node::print">print</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_writer</span><span class="special">&amp;</span> <span class="identifier">writer</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">indent</span> <span class="special">=</span>
- <span class="string">"\t"</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">flags</span> <span class="special">=</span>
- <span class="identifier">format_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">depth</span>
- <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="saving.html#xml_node::print_stream">print</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">indent</span> <span class="special">=</span>
- <span class="string">"\t"</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">flags</span> <span class="special">=</span>
- <span class="identifier">format_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">depth</span>
- <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="saving.html#xml_node::print_stream">print</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">indent</span> <span class="special">=</span>
- <span class="string">"\t"</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">flags</span> <span class="special">=</span>
- <span class="identifier">format_default</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">depth</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_node</span> </code><a class="link" href="xpath.html#xml_node::select_single_node">select_single_node</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">query</span><span class="special">,</span>
- <span class="identifier">xpath_variable_set</span><span class="special">*</span>
- <span class="identifier">variables</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_node</span> </code><a class="link" href="xpath.html#xml_node::select_single_node_precomp">select_single_node</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_query</span><span class="special">&amp;</span>
- <span class="identifier">query</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_node_set</span> </code><a class="link" href="xpath.html#xml_node::select_nodes">select_nodes</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">query</span><span class="special">,</span>
- <span class="identifier">xpath_variable_set</span><span class="special">*</span>
- <span class="identifier">variables</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_node_set</span> </code><a class="link" href="xpath.html#xml_node::select_nodes_precomp">select_nodes</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_query</span><span class="special">&amp;</span>
- <span class="identifier">query</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="dom.html#xml_document">xml_document</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="dom.html#xml_document::ctor">xml_document</a><code class="computeroutput"><span class="special">();</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="special">~</span></code><a class="link" href="dom.html#xml_document::dtor">xml_document</a><code class="computeroutput"><span class="special">();</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="dom.html#xml_document::reset">reset</a><code class="computeroutput"><span class="special">();</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="dom.html#xml_document::reset">reset</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_document</span><span class="special">&amp;</span>
- <span class="identifier">proto</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_stream">load</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span>
- <span class="identifier">stream</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">options</span> <span class="special">=</span>
- <span class="identifier">parse_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_stream">load</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wistream</span><span class="special">&amp;</span>
- <span class="identifier">stream</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">options</span> <span class="special">=</span>
- <span class="identifier">parse_default</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_string">load</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">options</span>
- <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_file">load_file</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">options</span>
- <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span>
- <span class="identifier">encoding</span> <span class="special">=</span>
- <span class="identifier">encoding_auto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_file_wide">load_file</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span>
- <span class="identifier">path</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">options</span> <span class="special">=</span>
- <span class="identifier">parse_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_buffer">load_buffer</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span>
- <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">options</span>
- <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span>
- <span class="identifier">encoding</span> <span class="special">=</span>
- <span class="identifier">encoding_auto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_buffer_inplace">load_buffer_inplace</a><code class="computeroutput"><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="identifier">size_t</span>
- <span class="identifier">size</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">options</span> <span class="special">=</span>
- <span class="identifier">parse_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_result</span> </code><a class="link" href="loading.html#xml_document::load_buffer_inplace_own">load_buffer_inplace_own</a><code class="computeroutput"><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="identifier">size_t</span>
- <span class="identifier">size</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">options</span> <span class="special">=</span>
- <span class="identifier">parse_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="saving.html#xml_document::save_file">save_file</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span>
- <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">flags</span>
- <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span>
- <span class="identifier">encoding</span> <span class="special">=</span>
- <span class="identifier">encoding_auto</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="saving.html#xml_document::save_file_wide">save_file</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span>
- <span class="identifier">path</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span>
- <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">flags</span>
- <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span>
- <span class="identifier">encoding</span> <span class="special">=</span>
- <span class="identifier">encoding_auto</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="saving.html#xml_document::save_stream">save</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">indent</span> <span class="special">=</span>
- <span class="string">"\t"</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">flags</span> <span class="special">=</span>
- <span class="identifier">format_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="saving.html#xml_document::save_stream">save</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wostream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">indent</span> <span class="special">=</span>
- <span class="string">"\t"</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">flags</span> <span class="special">=</span>
- <span class="identifier">format_default</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="saving.html#xml_document::save">save</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_writer</span><span class="special">&amp;</span> <span class="identifier">writer</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">indent</span> <span class="special">=</span>
- <span class="string">"\t"</span><span class="special">,</span>
- <span class="keyword">unsigned</span> <span class="keyword">int</span>
- <span class="identifier">flags</span> <span class="special">=</span>
- <span class="identifier">format_default</span><span class="special">,</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span>
- <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="dom.html#xml_document::document_element">document_element</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">struct</span> </code><a class="link" href="loading.html#xml_parse_result">xml_parse_result</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_parse_status</span> </code><a class="link" href="loading.html#xml_parse_result::status">status</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">ptrdiff_t</span> </code><a class="link" href="loading.html#xml_parse_result::offset">offset</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_encoding</span> </code><a class="link" href="loading.html#xml_parse_result::encoding">encoding</a><code class="computeroutput"><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="loading.html#xml_parse_result::bool">bool</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> </code><a class="link" href="loading.html#xml_parse_result::description">description</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="access.html#xml_node_iterator">xml_node_iterator</a>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="access.html#xml_attribute_iterator">xml_attribute_iterator</a>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="access.html#xml_tree_walker">xml_tree_walker</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">virtual</span> <span class="keyword">bool</span>
- </code><a class="link" href="access.html#xml_tree_walker::begin">begin</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">virtual</span> <span class="keyword">bool</span>
- </code><a class="link" href="access.html#xml_tree_walker::for_each">for_each</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">virtual</span> <span class="keyword">bool</span>
- </code><a class="link" href="access.html#xml_tree_walker::end">end</a><code class="computeroutput"><span class="special">(</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">int</span> </code><a class="link" href="access.html#xml_tree_walker::depth">depth</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="access.html#xml_text">xml_text</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="access.html#xml_text::empty">empty</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="access.html#xml_text::unspecified_bool_type">xml_text::unspecified_bool_type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_text::get">xml_text::get</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="access.html#xml_text::as_string">as_string</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">def</span> <span class="special">=</span>
- <span class="string">""</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">int</span> </code><a class="link" href="access.html#xml_text::as_int">as_int</a><code class="computeroutput"><span class="special">(</span><span class="keyword">int</span> <span class="identifier">def</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
- </code><a class="link" href="access.html#xml_text::as_uint">as_uint</a><code class="computeroutput"><span class="special">(</span><span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">def</span>
- <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">double</span> </code><a class="link" href="access.html#xml_text::as_double">as_double</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">def</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">float</span> </code><a class="link" href="access.html#xml_text::as_float">as_float</a><code class="computeroutput"><span class="special">(</span><span class="keyword">float</span> <span class="identifier">def</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="access.html#xml_text::as_bool">as_bool</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">def</span> <span class="special">=</span>
- <span class="keyword">false</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_text::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_text::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_text::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_text::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="modify.html#xml_text::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_text</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_text::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_text</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_text::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_text</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_text::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">unsigned</span>
- <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_text</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_text::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">rhs</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_text</span><span class="special">&amp;</span>
- </code><a class="link" href="modify.html#xml_text::assign">operator=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="access.html#xml_text::data">data</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="saving.html#xml_writer">xml_writer</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem">
- <code class="computeroutput"><span class="keyword">virtual</span> <span class="keyword">void</span>
- </code><a class="link" href="saving.html#xml_writer::write">write</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">data</span><span class="special">,</span>
- <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span></code>
- <br><br>
-
- </li></ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="saving.html#xml_writer_file">xml_writer_file</a><code class="computeroutput"><span class="special">:</span> <span class="keyword">public</span> <span class="identifier">xml_writer</span></code>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem">
- <a class="link" href="saving.html#xml_writer_file">xml_writer_file</a><code class="computeroutput"><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">file</span><span class="special">);</span></code> <br><br>
-
- </li></ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="saving.html#xml_writer_stream">xml_writer_stream</a><code class="computeroutput"><span class="special">:</span> <span class="keyword">public</span> <span class="identifier">xml_writer</span></code>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="saving.html#xml_writer_stream">xml_writer_stream</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <a class="link" href="saving.html#xml_writer_stream">xml_writer_stream</a><code class="computeroutput"><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wostream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">);</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">struct</span> </code><a class="link" href="xpath.html#xpath_parse_result">xpath_parse_result</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> </code><a class="link" href="xpath.html#xpath_parse_result::error">error</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">ptrdiff_t</span> </code><a class="link" href="xpath.html#xpath_parse_result::offset">offset</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="xpath.html#xpath_parse_result::bool">bool</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> </code><a class="link" href="xpath.html#xpath_parse_result::description">description</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="xpath.html#xpath_query">xpath_query</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">explicit</span> </code><a class="link" href="xpath.html#xpath_query::ctor">xpath_query</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">query</span><span class="special">,</span>
- <span class="identifier">xpath_variable_set</span><span class="special">*</span>
- <span class="identifier">variables</span> <span class="special">=</span>
- <span class="number">0</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_query::evaluate_boolean">evaluate_boolean</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">double</span> </code><a class="link" href="xpath.html#xpath_query::evaluate_number">evaluate_number</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">string_t</span> </code><a class="link" href="xpath.html#xpath_query::evaluate_string">evaluate_string</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">size_t</span> </code><a class="link" href="xpath.html#xpath_query::evaluate_string_buffer">evaluate_string</a><code class="computeroutput"><span class="special">(</span><span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">size_t</span>
- <span class="identifier">capacity</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_node_set</span> </code><a class="link" href="xpath.html#xpath_query::evaluate_node_set">evaluate_node_set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_value_type</span> </code><a class="link" href="xpath.html#xpath_query::return_type">return_type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">xpath_parse_result</span><span class="special">&amp;</span> </code><a class="link" href="xpath.html#xpath_query::result">result</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="xpath.html#xpath_query::unspecified_bool_type">unspecified_bool_type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="xpath.html#xpath_exception">xpath_exception</a><code class="computeroutput"><span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">exception</span></code>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">virtual</span> <span class="keyword">const</span>
- <span class="keyword">char</span><span class="special">*</span>
- </code><a class="link" href="xpath.html#xpath_exception::what">what</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span>
- <span class="keyword">throw</span><span class="special">();</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">xpath_parse_result</span><span class="special">&amp;</span> </code><a class="link" href="xpath.html#xpath_exception::result">result</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="xpath.html#xpath_node">xpath_node</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_node::ctor">xpath_node</a><code class="computeroutput"><span class="special">();</span></code>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_node::ctor">xpath_node</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_node::ctor">xpath_node</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attribute</span><span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">xml_node</span><span class="special">&amp;</span>
- <span class="identifier">parent</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="xpath.html#xpath_node::node">node</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_attribute</span> </code><a class="link" href="xpath.html#xpath_node::attribute">attribute</a><code class="computeroutput"><span class="special">()</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xml_node</span> </code><a class="link" href="xpath.html#xpath_node::parent">parent</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">operator</span> </code><a class="link" href="xpath.html#xpath_node::unspecified_bool_type">unspecified_bool_type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_node::comparison">operator==</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_node::comparison">operator!=</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span>
- <span class="identifier">n</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="xpath.html#xpath_node_set">xpath_node_set</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_node_set::ctor">xpath_node_set</a><code class="computeroutput"><span class="special">();</span></code>
- </li>
-<li class="listitem">
- <a class="link" href="xpath.html#xpath_node_set::ctor">xpath_node_set</a><code class="computeroutput"><span class="special">(</span><span class="identifier">const_iterator</span>
- <span class="identifier">begin</span><span class="special">,</span>
- <span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">,</span> <span class="identifier">type_t</span>
- <span class="identifier">type</span> <span class="special">=</span>
- <span class="identifier">type_unsorted</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">typedef</span> <span class="keyword">const</span>
- <span class="identifier">xpath_node</span><span class="special">*</span>
- </code><a class="link" href="xpath.html#xpath_node_set::const_iterator">const_iterator</a><code class="computeroutput"><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">const_iterator</span> </code><a class="link" href="xpath.html#xpath_node_set::begin">begin</a><code class="computeroutput"><span class="special">()</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">const_iterator</span> </code><a class="link" href="xpath.html#xpath_node_set::end">end</a><code class="computeroutput"><span class="special">()</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> </code><a class="link" href="xpath.html#xpath_node_set::index">operator[]</a><code class="computeroutput"><span class="special">(</span><span class="identifier">size_t</span>
- <span class="identifier">index</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">size_t</span> </code><a class="link" href="xpath.html#xpath_node_set::size">size</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_node_set::empty">empty</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_node</span> </code><a class="link" href="xpath.html#xpath_node_set::first">first</a><code class="computeroutput"><span class="special">()</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">enum</span> <span class="identifier">type_t</span>
- <span class="special">{</span></code><a class="link" href="xpath.html#xpath_node_set::type_unsorted">type_unsorted</a>,
- <a class="link" href="xpath.html#xpath_node_set::type_sorted">type_sorted</a>,
- <a class="link" href="xpath.html#xpath_node_set::type_sorted_reverse">type_sorted_reverse</a><code class="computeroutput"><span class="special">};</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">type_t</span> </code><a class="link" href="xpath.html#xpath_node_set::type">type</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="xpath.html#xpath_node_set::sort">sort</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">reverse</span> <span class="special">=</span>
- <span class="keyword">false</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="xpath.html#xpath_variable">xpath_variable</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="xpath.html#xpath_variable::name">name</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_value_type</span> </code><a class="link" href="xpath.html#xpath_variable::type">type</a><code class="computeroutput"><span class="special">()</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable::get_boolean">get_boolean</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">double</span> </code><a class="link" href="xpath.html#xpath_variable::get_number">get_number</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> </code><a class="link" href="xpath.html#xpath_variable::get_string">get_string</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">xpath_node_set</span><span class="special">&amp;</span> </code><a class="link" href="xpath.html#xpath_variable::get_node_set">get_node_set</a><code class="computeroutput"><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">value</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">double</span>
- <span class="identifier">value</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">value</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node_set</span><span class="special">&amp;</span>
- <span class="identifier">value</span><span class="special">);</span></code>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">class</span> </code><a class="link" href="xpath.html#xpath_variable_set">xpath_variable_set</a>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_variable</span><span class="special">*</span>
- </code><a class="link" href="xpath.html#xpath_variable_set::add">add</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="identifier">xpath_value_type</span> <span class="identifier">type</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable_set::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">bool</span> <span class="identifier">value</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable_set::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">double</span> <span class="identifier">value</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable_set::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">value</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">bool</span> </code><a class="link" href="xpath.html#xpath_variable_set::set">set</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">xpath_node_set</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">);</span></code> <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">xpath_variable</span><span class="special">*</span>
- </code><a class="link" href="xpath.html#xpath_variable_set::get">get</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">xpath_variable</span><span class="special">*</span> </code><a class="link" href="xpath.html#xpath_variable_set::get">get</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span>
- <span class="identifier">name</span><span class="special">)</span>
- <span class="keyword">const</span><span class="special">;</span></code>
- <br><br>
-
- </li>
-</ul></div>
- </li>
-</ul></div>
-<p>
- Functions:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> </code><a class="link" href="dom.html#as_utf8">as_utf8</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">str</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> </code><a class="link" href="dom.html#as_utf8">as_utf8</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span><span class="special">&amp;</span>
- <span class="identifier">str</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> </code><a class="link" href="dom.html#as_wide">as_wide</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">str</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> </code><a class="link" href="dom.html#as_wide">as_wide</a><code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span>
- <span class="identifier">str</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="keyword">void</span> </code><a class="link" href="dom.html#set_memory_management_functions">set_memory_management_functions</a><code class="computeroutput"><span class="special">(</span><span class="identifier">allocation_function</span>
- <span class="identifier">allocate</span><span class="special">,</span>
- <span class="identifier">deallocation_function</span> <span class="identifier">deallocate</span><span class="special">);</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">allocation_function</span> </code><a class="link" href="dom.html#get_memory_allocation_function">get_memory_allocation_function</a><code class="computeroutput"><span class="special">();</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">deallocation_function</span> </code><a class="link" href="dom.html#get_memory_deallocation_function">get_memory_deallocation_function</a><code class="computeroutput"><span class="special">();</span></code>
- </li>
-</ul></div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <b>API Reference</b> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="changes.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="toc.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/changes.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/changes.html
deleted file mode 100644
index d119532b3..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/changes.html
+++ /dev/null
@@ -1,879 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Changelog</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="xpath.html" title="XPath">
-<link rel="next" href="apiref.html" title="API Reference">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="xpath.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="apiref.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.changes"></a><a class="link" href="changes.html" title="Changelog"> Changelog</a>
-</h2></div></div></div>
-<a name="manual.changes.1_05_2012___version_1_2"></a><h6>
- <a class="link" href="changes.html#manual.changes.1_05_2012___version_1_2">1.05.2012 - version
- 1.2</a>
- </h6>
-<p>
- Major release, featuring header-only mode, various interface enhancements (i.e.
- PCDATA manipulation and C++11 iteration), many other features and compatibility
- improvements.
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- New features:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Added xml_text helper class for working with PCDATA/CDATA contents
- of an element node
- </li>
-<li class="listitem">
- Added optional header-only mode (controlled by PUGIXML_HEADER_ONLY
- define)
- </li>
-<li class="listitem">
- Added xml_node::children() and xml_node::attributes() for C++11 ranged
- for loop or BOOST_FOREACH
- </li>
-<li class="listitem">
- Added support for Latin-1 (ISO-8859-1) encoding conversion during
- loading and saving
- </li>
-<li class="listitem">
- Added custom default values for xml_attribute::as_* (they are returned if the attribute
- does not exist)
- </li>
-<li class="listitem">
- Added parse_ws_pcdata_single flag for preserving whitespace-only
- PCDATA in case it's the only child
- </li>
-<li class="listitem">
- Added format_save_file_text for xml_document::save_file to open files
- as text instead of binary (changes newlines on Windows)
- </li>
-<li class="listitem">
- Added format_no_escapes flag to disable special symbol escaping (complements
- ~parse_escapes)
- </li>
-<li class="listitem">
- Added support for loading document from streams that do not support
- seeking
- </li>
-<li class="listitem">
- Added PUGIXML_MEMORY_* constants for tweaking allocation behavior (useful for embedded
- systems)
- </li>
-<li class="listitem">
- Added PUGIXML_VERSION preprocessor define
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Compatibility improvements:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Parser does not require setjmp support (improves compatibility with
- some embedded platforms, enables clr:pure compilation)
- </li>
-<li class="listitem">
- STL forward declarations are no longer used (fixes SunCC/RWSTL compilation,
- fixes clang compilation in C++11 mode)
- </li>
-<li class="listitem">
- Fixed AirPlay SDK, Android, Windows Mobile (WinCE) and C++/CLI compilation
- </li>
-<li class="listitem">
- Fixed several compilation warnings for various GCC versions, Intel
- C++ compiler and Clang
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed unsafe bool conversion to avoid problems on C++/CLI
- </li>
-<li class="listitem">
- Iterator dereference operator is const now (fixes Boost filter_iterator
- support)
- </li>
-<li class="listitem">
- xml_document::save_file now checks for file I/O errors during saving
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.1_11_2010___version_1_0"></a><h6>
- <a class="link" href="changes.html#manual.changes.1_11_2010___version_1_0">1.11.2010 - version
- 1.0</a>
- </h6>
-<p>
- Major release, featuring many XPath enhancements, wide character filename support,
- miscellaneous performance improvements, bug fixes and more.
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- XPath:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- XPath implementation is moved to pugixml.cpp (which is the only source
- file now); use PUGIXML_NO_XPATH if you want to disable XPath to reduce
- code size
- </li>
-<li class="listitem">
- XPath is now supported without exceptions (PUGIXML_NO_EXCEPTIONS);
- the error handling mechanism depends on the presence of exception
- support
- </li>
-<li class="listitem">
- XPath is now supported without STL (PUGIXML_NO_STL)
- </li>
-<li class="listitem">
- Introduced variable support
- </li>
-<li class="listitem">
- Introduced new xpath_query::evaluate_string, which works without
- STL
- </li>
-<li class="listitem">
- Introduced new xpath_node_set constructor (from an iterator range)
- </li>
-<li class="listitem">
- Evaluation function now accept attribute context nodes
- </li>
-<li class="listitem">
- All internal allocations use custom allocation functions
- </li>
-<li class="listitem">
- Improved error reporting; now a last parsed offset is returned together
- with the parsing error
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed memory leak for loading from streams with stream exceptions
- turned on
- </li>
-<li class="listitem">
- Fixed custom deallocation function calling with null pointer in one
- case
- </li>
-<li class="listitem">
- Fixed missing attributes for iterator category functions; all functions/classes
- can now be DLL-exported
- </li>
-<li class="listitem">
- Worked around Digital Mars compiler bug, which lead to minor read
- overfetches in several functions
- </li>
-<li class="listitem">
- load_file now works with 2+ Gb files in MSVC/MinGW
- </li>
-<li class="listitem">
- XPath: fixed memory leaks for incorrect queries
- </li>
-<li class="listitem">
- XPath: fixed xpath_node() attribute constructor with empty attribute
- argument
- </li>
-<li class="listitem">
- XPath: fixed lang() function for non-ASCII arguments
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Specification changes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- CDATA nodes containing ]]&gt; are printed as several nodes; while
- this changes the internal structure, this is the only way to escape
- CDATA contents
- </li>
-<li class="listitem">
- Memory allocation errors during parsing now preserve last parsed
- offset (to give an idea about parsing progress)
- </li>
-<li class="listitem">
- If an element node has the only child, and it is of CDATA type, then
- the extra indentation is omitted (previously this behavior only held
- for PCDATA children)
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Additional functionality:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Added xml_parse_result default constructor
- </li>
-<li class="listitem">
- Added xml_document::load_file and xml_document::save_file with wide
- character paths
- </li>
-<li class="listitem">
- Added as_utf8 and as_wide overloads for std::wstring/std::string
- arguments
- </li>
-<li class="listitem">
- Added DOCTYPE node type (node_doctype) and a special parse flag,
- parse_doctype, to add such nodes to the document during parsing
- </li>
-<li class="listitem">
- Added parse_full parse flag mask, which extends parse_default with
- all node type parsing flags except parse_ws_pcdata
- </li>
-<li class="listitem">
- Added xml_node::hash_value() and xml_attribute::hash_value() functions
- for use in hash-based containers
- </li>
-<li class="listitem">
- Added internal_object() and additional constructor for both xml_node
- and xml_attribute for easier marshalling (useful for language bindings)
- </li>
-<li class="listitem">
- Added xml_document::document_element() function
- </li>
-<li class="listitem">
- Added xml_node::prepend_attribute, xml_node::prepend_child and xml_node::prepend_copy
- functions
- </li>
-<li class="listitem">
- Added xml_node::append_child, xml_node::prepend_child, xml_node::insert_child_before
- and xml_node::insert_child_after overloads for element nodes (with
- name instead of type)
- </li>
-<li class="listitem">
- Added xml_document::reset() function
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Performance improvements:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- xml_node::root() and xml_node::offset_debug() are now O(1) instead
- of O(logN)
- </li>
-<li class="listitem">
- Minor parsing optimizations
- </li>
-<li class="listitem">
- Minor memory optimization for strings in DOM tree (set_name/set_value)
- </li>
-<li class="listitem">
- Memory optimization for string memory reclaiming in DOM tree (set_name/set_value
- now reallocate the buffer if memory waste is too big)
- </li>
-<li class="listitem">
- XPath: optimized document order sorting
- </li>
-<li class="listitem">
- XPath: optimized child/attribute axis step
- </li>
-<li class="listitem">
- XPath: optimized number-to-string conversions in MSVC
- </li>
-<li class="listitem">
- XPath: optimized concat for many arguments
- </li>
-<li class="listitem">
- XPath: optimized evaluation allocation mechanism: constant and document
- strings are not heap-allocated
- </li>
-<li class="listitem">
- XPath: optimized evaluation allocation mechanism: all temporaries'
- allocations use fast stack-like allocator
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Compatibility:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Removed wildcard functions (xml_node::child_w, xml_node::attribute_w,
- etc.)
- </li>
-<li class="listitem">
- Removed xml_node::all_elements_by_name
- </li>
-<li class="listitem">
- Removed xpath_type_t enumeration; use xpath_value_type instead
- </li>
-<li class="listitem">
- Removed format_write_bom_utf8 enumeration; use format_write_bom instead
- </li>
-<li class="listitem">
- Removed xml_document::precompute_document_order, xml_attribute::document_order
- and xml_node::document_order functions; document order sort optimization
- is now automatic
- </li>
-<li class="listitem">
- Removed xml_document::parse functions and transfer_ownership struct;
- use xml_document::load_buffer_inplace and xml_document::load_buffer_inplace_own
- instead
- </li>
-<li class="listitem">
- Removed as_utf16 function; use as_wide instead
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.1_07_2010___version_0_9"></a><h6>
- <a class="link" href="changes.html#manual.changes.1_07_2010___version_0_9">1.07.2010 - version
- 0.9</a>
- </h6>
-<p>
- Major release, featuring extended and improved Unicode support, miscellaneous
- performance improvements, bug fixes and more.
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Major Unicode improvements:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Introduced encoding support (automatic/manual encoding detection
- on load, manual encoding selection on save, conversion from/to UTF8,
- UTF16 LE/BE, UTF32 LE/BE)
- </li>
-<li class="listitem">
- Introduced wchar_t mode (you can set PUGIXML_WCHAR_MODE define to
- switch pugixml internal encoding from UTF8 to wchar_t; all functions
- are switched to their Unicode variants)
- </li>
-<li class="listitem">
- Load/save functions now support wide streams
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed document corruption on failed parsing bug
- </li>
-<li class="listitem">
- XPath string &lt;-&gt; number conversion improvements (increased
- precision, fixed crash for huge numbers)
- </li>
-<li class="listitem">
- Improved DOCTYPE parsing: now parser recognizes all well-formed DOCTYPE
- declarations
- </li>
-<li class="listitem">
- Fixed xml_attribute::as_uint() for large numbers (i.e. 2^32-1)
- </li>
-<li class="listitem">
- Fixed xml_node::first_element_by_path for path components that are
- prefixes of node names, but are not exactly equal to them.
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Specification changes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- parse() API changed to load_buffer/load_buffer_inplace/load_buffer_inplace_own;
- load_buffer APIs do not require zero-terminated strings.
- </li>
-<li class="listitem">
- Renamed as_utf16 to as_wide
- </li>
-<li class="listitem">
- Changed xml_node::offset_debug return type and xml_parse_result::offset
- type to ptrdiff_t
- </li>
-<li class="listitem">
- Nodes/attributes with empty names are now printed as :anonymous
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Performance improvements:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Optimized document parsing and saving
- </li>
-<li class="listitem">
- Changed internal memory management: internal allocator is used for
- both metadata and name/value data; allocated pages are deleted if
- all allocations from them are deleted
- </li>
-<li class="listitem">
- Optimized memory consumption: sizeof(xml_node_struct) reduced from
- 40 bytes to 32 bytes on x86
- </li>
-<li class="listitem">
- Optimized debug mode parsing/saving by order of magnitude
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Miscellaneous:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- All STL includes except &lt;exception&gt; in pugixml.hpp are replaced
- with forward declarations
- </li>
-<li class="listitem">
- xml_node::remove_child and xml_node::remove_attribute now return
- the operation result
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Compatibility:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- parse() and as_utf16 are left for compatibility (these functions
- are deprecated and will be removed in version 1.0)
- </li>
-<li class="listitem">
- Wildcard functions, document_order/precompute_document_order functions,
- all_elements_by_name function and format_write_bom_utf8 flag are
- deprecated and will be removed in version 1.0
- </li>
-<li class="listitem">
- xpath_type_t enumeration was renamed to xpath_value_type; xpath_type_t
- is deprecated and will be removed in version 1.0
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.8_11_2009___version_0_5"></a><h6>
- <a class="link" href="changes.html#manual.changes.8_11_2009___version_0_5">8.11.2009 - version
- 0.5</a>
- </h6>
-<p>
- Major bugfix release. Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- XPath bugfixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed translate(), lang() and concat() functions (infinite loops/crashes)
- </li>
-<li class="listitem">
- Fixed compilation of queries with empty literal strings ("")
- </li>
-<li class="listitem">
- Fixed axis tests: they never add empty nodes/attributes to the resulting
- node set now
- </li>
-<li class="listitem">
- Fixed string-value evaluation for node-set (the result excluded some
- text descendants)
- </li>
-<li class="listitem">
- Fixed self:: axis (it behaved like ancestor-or-self::)
- </li>
-<li class="listitem">
- Fixed following:: and preceding:: axes (they included descendent
- and ancestor nodes, respectively)
- </li>
-<li class="listitem">
- Minor fix for namespace-uri() function (namespace declaration scope
- includes the parent element of namespace declaration attribute)
- </li>
-<li class="listitem">
- Some incorrect queries are no longer parsed now (i.e. foo: *)
- </li>
-<li class="listitem">
- Fixed text()/etc. node test parsing bug (i.e. foo[text()] failed
- to compile)
- </li>
-<li class="listitem">
- Fixed root step (/) - it now selects empty node set if query is evaluated
- on empty node
- </li>
-<li class="listitem">
- Fixed string to number conversion ("123 " converted to
- NaN, "123 .456" converted to 123.456 - now the results
- are 123 and NaN, respectively)
- </li>
-<li class="listitem">
- Node set copying now preserves sorted type; leads to better performance
- on some queries
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Miscellaneous bugfixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed xml_node::offset_debug for PI nodes
- </li>
-<li class="listitem">
- Added empty attribute checks to xml_node::remove_attribute
- </li>
-<li class="listitem">
- Fixed node_pi and node_declaration copying
- </li>
-<li class="listitem">
- Const-correctness fixes
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Specification changes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- xpath_node::select_nodes() and related functions now throw exception
- if expression return type is not node set (instead of assertion)
- </li>
-<li class="listitem">
- xml_node::traverse() now sets depth to -1 for both begin() and end()
- callbacks (was 0 at begin() and -1 at end())
- </li>
-<li class="listitem">
- In case of non-raw node printing a newline is output after PCDATA
- inside nodes if the PCDATA has siblings
- </li>
-<li class="listitem">
- UTF8 -&gt; wchar_t conversion now considers 5-byte UTF8-like sequences
- as invalid
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- New features:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Added xpath_node_set::operator[] for index-based iteration
- </li>
-<li class="listitem">
- Added xpath_query::return_type()
- </li>
-<li class="listitem">
- Added getter accessors for memory-management functions
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.17_09_2009___version_0_42"></a><h6>
- <a class="link" href="changes.html#manual.changes.17_09_2009___version_0_42">17.09.2009 - version
- 0.42</a>
- </h6>
-<p>
- Maintenance release. Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed deallocation in case of custom allocation functions or if delete[]
- / free are incompatible
- </li>
-<li class="listitem">
- XPath parser fixed for incorrect queries (i.e. incorrect XPath queries
- should now always fail to compile)
- </li>
-<li class="listitem">
- Const-correctness fixes for find_child_by_attribute
- </li>
-<li class="listitem">
- Improved compatibility (miscellaneous warning fixes, fixed cstring
- include dependency for GCC)
- </li>
-<li class="listitem">
- Fixed iterator begin/end and print function to work correctly for
- empty nodes
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- New features:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Added PUGIXML_API/PUGIXML_CLASS/PUGIXML_FUNCTION configuration macros
- to control class/function attributes
- </li>
-<li class="listitem">
- Added xml_attribute::set_value overloads for different types
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.8_02_2009___version_0_41"></a><h6>
- <a class="link" href="changes.html#manual.changes.8_02_2009___version_0_41">8.02.2009 - version
- 0.41</a>
- </h6>
-<p>
- Maintenance release. Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
- Fixed bug with node printing (occasionally some content was not written
- to output stream)
- </li></ol></div>
- </li></ul></div>
-<a name="manual.changes.18_01_2009___version_0_4"></a><h6>
- <a class="link" href="changes.html#manual.changes.18_01_2009___version_0_4">18.01.2009 - version
- 0.4</a>
- </h6>
-<p>
- Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Documentation fix in samples for parse() with manual lifetime control
- </li>
-<li class="listitem">
- Fixed document order sorting in XPath (it caused wrong order of nodes
- after xpath_node_set::sort and wrong results of some XPath queries)
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Node printing changes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Single quotes are no longer escaped when printing nodes
- </li>
-<li class="listitem">
- Symbols in second half of ASCII table are no longer escaped when
- printing nodes; because of this, format_utf8 flag is deleted as it's
- no longer needed and format_write_bom is renamed to format_write_bom_utf8.
- </li>
-<li class="listitem">
- Reworked node printing - now it works via xml_writer interface; implementations
- for FILE* and std::ostream are available. As a side-effect, xml_document::save_file
- now works without STL.
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- New features:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Added unsigned integer support for attributes (xml_attribute::as_uint,
- xml_attribute::operator=)
- </li>
-<li class="listitem">
- Now document declaration (&lt;?xml ...?&gt;) is parsed as node with
- type node_declaration when parse_declaration flag is specified (access
- to encoding/version is performed as if they were attributes, i.e.
- doc.child("xml").attribute("version").as_float());
- corresponding flags for node printing were also added
- </li>
-<li class="listitem">
- Added support for custom memory management (see set_memory_management_functions
- for details)
- </li>
-<li class="listitem">
- Implemented node/attribute copying (see xml_node::insert_copy_* and
- xml_node::append_copy for details)
- </li>
-<li class="listitem">
- Added find_child_by_attribute and find_child_by_attribute_w to simplify
- parsing code in some cases (i.e. COLLADA files)
- </li>
-<li class="listitem">
- Added file offset information querying for debugging purposes (now
- you're able to determine exact location of any xml_node in parsed
- file, see xml_node::offset_debug for details)
- </li>
-<li class="listitem">
- Improved error handling for parsing - now load(), load_file() and
- parse() return xml_parse_result, which contains error code and last
- parsed offset; this does not break old interface as xml_parse_result
- can be implicitly casted to bool.
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.31_10_2007___version_0_34"></a><h6>
- <a class="link" href="changes.html#manual.changes.31_10_2007___version_0_34">31.10.2007 - version
- 0.34</a>
- </h6>
-<p>
- Maintenance release. Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed bug with loading from text-mode iostreams
- </li>
-<li class="listitem">
- Fixed leak when transfer_ownership is true and parsing is failing
- </li>
-<li class="listitem">
- Fixed bug in saving (\r and \n are now escaped in attribute values)
- </li>
-<li class="listitem">
- Renamed free() to destroy() - some macro conflicts were reported
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- New features:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Improved compatibility (supported Digital Mars C++, MSVC 6, CodeWarrior
- 8, PGI C++, Comeau, supported PS3 and XBox360)
- </li>
-<li class="listitem">
- PUGIXML_NO_EXCEPTION flag for platforms without exception handling
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.21_02_2007___version_0_3"></a><h6>
- <a class="link" href="changes.html#manual.changes.21_02_2007___version_0_3">21.02.2007 - version
- 0.3</a>
- </h6>
-<p>
- Refactored, reworked and improved version. Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Interface:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Added XPath
- </li>
-<li class="listitem">
- Added tree modification functions
- </li>
-<li class="listitem">
- Added no STL compilation mode
- </li>
-<li class="listitem">
- Added saving document to file
- </li>
-<li class="listitem">
- Refactored parsing flags
- </li>
-<li class="listitem">
- Removed xml_parser class in favor of xml_document
- </li>
-<li class="listitem">
- Added transfer ownership parsing mode
- </li>
-<li class="listitem">
- Modified the way xml_tree_walker works
- </li>
-<li class="listitem">
- Iterators are now non-constant
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- Implementation:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Support of several compilers and platforms
- </li>
-<li class="listitem">
- Refactored and sped up parsing core
- </li>
-<li class="listitem">
- Improved standard compliancy
- </li>
-<li class="listitem">
- Added XPath implementation
- </li>
-<li class="listitem">
- Fixed several bugs
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.6_11_2006___version_0_2"></a><h6>
- <a class="link" href="changes.html#manual.changes.6_11_2006___version_0_2">6.11.2006 - version
- 0.2</a>
- </h6>
-<p>
- First public release. Changes:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Bug fixes:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Fixed child_value() (for empty nodes)
- </li>
-<li class="listitem">
- Fixed xml_parser_impl warning at W4
- </li>
-</ol></div>
- </li>
-<li class="listitem">
- New features:
- <div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- Introduced child_value(name) and child_value_w(name)
- </li>
-<li class="listitem">
- parse_eol_pcdata and parse_eol_attribute flags + parse_minimal optimizations
- </li>
-<li class="listitem">
- Optimizations of strconv_t
- </li>
-</ol></div>
- </li>
-</ul></div>
-<a name="manual.changes.15_07_2006___version_0_1"></a><h6>
- <a class="link" href="changes.html#manual.changes.15_07_2006___version_0_1">15.07.2006 - version
- 0.1</a>
- </h6>
-<p>
- First private release for testing purposes
- </p>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="xpath.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="apiref.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/dom.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/dom.html
deleted file mode 100644
index 22d8d835a..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/dom.html
+++ /dev/null
@@ -1,732 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Document object model</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="install.html" title="Installation">
-<link rel="next" href="loading.html" title="Loading document">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <b>Object model</b> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="install.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="loading.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.dom"></a><a class="link" href="dom.html" title="Document object model"> Document object model</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="dom.html#manual.dom.tree"> Tree structure</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.cpp"> C++ interface</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.unicode"> Unicode interface</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.thread"> Thread-safety guarantees</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.exception"> Exception guarantees</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.memory"> Memory management</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="dom.html#manual.dom.memory.custom"> Custom memory allocation/deallocation
- functions</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.memory.tuning"> Memory consumption tuning</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.memory.internals"> Document memory management
- internals</a></span></dt>
-</dl></dd>
-</dl></div>
-<p>
- pugixml stores XML data in DOM-like way: the entire XML document (both document
- structure and element data) is stored in memory as a tree. The tree can be
- loaded from a character stream (file, string, C++ I/O stream), then traversed
- with the special API or XPath expressions. The whole tree is mutable: both
- node structure and node/attribute data can be changed at any time. Finally,
- the result of document transformations can be saved to a character stream (file,
- C++ I/O stream or custom transport).
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.dom.tree"></a><a class="link" href="dom.html#manual.dom.tree" title="Tree structure"> Tree structure</a>
-</h3></div></div></div>
-<p>
- The XML document is represented with a tree data structure. The root of the
- tree is the document itself, which corresponds to C++ type <a class="link" href="dom.html#xml_document">xml_document</a>.
- Document has one or more child nodes, which correspond to C++ type <a class="link" href="dom.html#xml_node">xml_node</a>. Nodes have different types; depending
- on a type, a node can have a collection of child nodes, a collection of attributes,
- which correspond to C++ type <a class="link" href="dom.html#xml_attribute">xml_attribute</a>,
- and some additional data (i.e. name).
- </p>
-<a name="xml_node_type"></a><p>
- The tree nodes can be of one of the following types (which together form
- the enumeration <code class="computeroutput"><span class="identifier">xml_node_type</span></code>):
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Document node (<a name="node_document"></a><code class="literal">node_document</code>) - this
- is the root of the tree, which consists of several child nodes. This
- node corresponds to <a class="link" href="dom.html#xml_document">xml_document</a>
- class; note that <a class="link" href="dom.html#xml_document">xml_document</a> is
- a sub-class of <a class="link" href="dom.html#xml_node">xml_node</a>, so the entire
- node interface is also available. However, document node is special in
- several ways, which are covered below. There can be only one document
- node in the tree; document node does not have any XML representation.
- <br><br>
-
- </li>
-<li class="listitem">
- Element/tag node (<a name="node_element"></a><code class="literal">node_element</code>) - this
- is the most common type of node, which represents XML elements. Element
- nodes have a name, a collection of attributes and a collection of child
- nodes (both of which may be empty). The attribute is a simple name/value
- pair. The example XML representation of element nodes is as follows:
- </li>
-</ul></div>
-<pre class="programlisting"><span class="special">&lt;</span><span class="identifier">node</span> <span class="identifier">attr</span><span class="special">=</span><span class="string">"value"</span><span class="special">&gt;&lt;</span><span class="identifier">child</span><span class="special">/&gt;&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- There are two element nodes here: one has name <code class="computeroutput"><span class="string">"node"</span></code>,
- single attribute <code class="computeroutput"><span class="string">"attr"</span></code>
- and single child <code class="computeroutput"><span class="string">"child"</span></code>,
- another has name <code class="computeroutput"><span class="string">"child"</span></code>
- and does not have any attributes or child nodes.
- </p></blockquote></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Plain character data nodes (<a name="node_pcdata"></a><code class="literal">node_pcdata</code>)
- represent plain text in XML. PCDATA nodes have a value, but do not have
- a name or children/attributes. Note that <span class="bold"><strong>plain
- character data is not a part of the element node but instead has its
- own node</strong></span>; an element node can have several child PCDATA nodes.
- The example XML representation of text nodes is as follows:
- </li></ul></div>
-<pre class="programlisting"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span> <span class="identifier">text1</span> <span class="special">&lt;</span><span class="identifier">child</span><span class="special">/&gt;</span> <span class="identifier">text2</span> <span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- Here <code class="computeroutput"><span class="string">"node"</span></code> element
- has three children, two of which are PCDATA nodes with values <code class="computeroutput"><span class="string">" text1 "</span></code> and <code class="computeroutput"><span class="string">"
- text2 "</span></code>.
- </p></blockquote></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Character data nodes (<a name="node_cdata"></a><code class="literal">node_cdata</code>) represent
- text in XML that is quoted in a special way. CDATA nodes do not differ
- from PCDATA nodes except in XML representation - the above text example
- looks like this with CDATA:
- </li></ul></div>
-<pre class="programlisting"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span> <span class="special">&lt;![</span><span class="identifier">CDATA</span><span class="special">[[</span><span class="identifier">text1</span><span class="special">]]&gt;</span> <span class="special">&lt;</span><span class="identifier">child</span><span class="special">/&gt;</span> <span class="special">&lt;![</span><span class="identifier">CDATA</span><span class="special">[[</span><span class="identifier">text2</span><span class="special">]]&gt;</span> <span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- CDATA nodes make it easy to include non-escaped &lt;, &amp; and &gt; characters
- in plain text. CDATA value can not contain the character sequence ]]&gt;,
- since it is used to determine the end of node contents.
- </p></blockquote></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Comment nodes (<a name="node_comment"></a><code class="literal">node_comment</code>) represent
- comments in XML. Comment nodes have a value, but do not have a name or
- children/attributes. The example XML representation of a comment node
- is as follows:
- </li></ul></div>
-<pre class="programlisting"><span class="special">&lt;!--</span> <span class="identifier">comment</span> <span class="identifier">text</span> <span class="special">--&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- Here the comment node has value <code class="computeroutput"><span class="string">"comment
- text"</span></code>. By default comment nodes are treated as non-essential
- part of XML markup and are not loaded during XML parsing. You can override
- this behavior with <a class="link" href="loading.html#parse_comments">parse_comments</a>
- flag.
- </p></blockquote></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Processing instruction node (<a name="node_pi"></a><code class="literal">node_pi</code>) represent
- processing instructions (PI) in XML. PI nodes have a name and an optional
- value, but do not have children/attributes. The example XML representation
- of a PI node is as follows:
- </li></ul></div>
-<pre class="programlisting"><span class="special">&lt;?</span><span class="identifier">name</span> <span class="identifier">value</span><span class="special">?&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- Here the name (also called PI target) is <code class="computeroutput"><span class="string">"name"</span></code>,
- and the value is <code class="computeroutput"><span class="string">"value"</span></code>.
- By default PI nodes are treated as non-essential part of XML markup and
- are not loaded during XML parsing. You can override this behavior with
- <a class="link" href="loading.html#parse_pi">parse_pi</a> flag.
- </p></blockquote></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Declaration node (<a name="node_declaration"></a><code class="literal">node_declaration</code>)
- represents document declarations in XML. Declaration nodes have a name
- (<code class="computeroutput"><span class="string">"xml"</span></code>) and an
- optional collection of attributes, but do not have value or children.
- There can be only one declaration node in a document; moreover, it should
- be the topmost node (its parent should be the document). The example
- XML representation of a declaration node is as follows:
- </li></ul></div>
-<pre class="programlisting"><span class="special">&lt;?</span><span class="identifier">xml</span> <span class="identifier">version</span><span class="special">=</span><span class="string">"1.0"</span><span class="special">?&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- Here the node has name <code class="computeroutput"><span class="string">"xml"</span></code>
- and a single attribute with name <code class="computeroutput"><span class="string">"version"</span></code>
- and value <code class="computeroutput"><span class="string">"1.0"</span></code>.
- By default declaration nodes are treated as non-essential part of XML markup
- and are not loaded during XML parsing. You can override this behavior with
- <a class="link" href="loading.html#parse_declaration">parse_declaration</a> flag. Also,
- by default a dummy declaration is output when XML document is saved unless
- there is already a declaration in the document; you can disable this with
- <a class="link" href="saving.html#format_no_declaration">format_no_declaration</a> flag.
- </p></blockquote></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- Document type declaration node (<a name="node_doctype"></a><code class="literal">node_doctype</code>)
- represents document type declarations in XML. Document type declaration
- nodes have a value, which corresponds to the entire document type contents;
- no additional nodes are created for inner elements like <code class="computeroutput"><span class="special">&lt;!</span><span class="identifier">ENTITY</span><span class="special">&gt;</span></code>. There can be only one document type
- declaration node in a document; moreover, it should be the topmost node
- (its parent should be the document). The example XML representation of
- a document type declaration node is as follows:
- </li></ul></div>
-<pre class="programlisting"><span class="special">&lt;!</span><span class="identifier">DOCTYPE</span> <span class="identifier">greeting</span> <span class="special">[</span> <span class="special">&lt;!</span><span class="identifier">ELEMENT</span> <span class="identifier">greeting</span> <span class="special">(</span><span class="preprocessor">#PCDATA</span><span class="special">)&gt;</span> <span class="special">]&gt;</span>
-</pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- Here the node has value <code class="computeroutput"><span class="string">"greeting [ &lt;!ELEMENT
- greeting (#PCDATA)&gt; ]"</span></code>. By default document type
- declaration nodes are treated as non-essential part of XML markup and are
- not loaded during XML parsing. You can override this behavior with <a class="link" href="loading.html#parse_doctype">parse_doctype</a> flag.
- </p></blockquote></div>
-<p>
- Finally, here is a complete example of XML document and the corresponding
- tree representation (<a href="../samples/tree.xml" target="_top">samples/tree.xml</a>):
- </p>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<tbody><tr>
-<td>
- <p>
-
-</p>
-<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">&lt;?</span><span class="identifier">xml</span> <span class="identifier">version</span><span class="special">=</span><span class="string">"1.0"</span><span class="special">?&gt;</span>
-<span class="special">&lt;</span><span class="identifier">mesh</span> <span class="identifier">name</span><span class="special">=</span><span class="string">"mesh_root"</span><span class="special">&gt;</span>
- <span class="special">&lt;!--</span> <span class="identifier">here</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">mesh</span> <span class="identifier">node</span> <span class="special">--&gt;</span>
- <span class="identifier">some</span> <span class="identifier">text</span>
- <span class="special">&lt;![</span><span class="identifier">CDATA</span><span class="special">[</span><span class="identifier">someothertext</span><span class="special">]]&gt;</span>
- <span class="identifier">some</span> <span class="identifier">more</span> <span class="identifier">text</span>
- <span class="special">&lt;</span><span class="identifier">node</span> <span class="identifier">attr1</span><span class="special">=</span><span class="string">"value1"</span> <span class="identifier">attr2</span><span class="special">=</span><span class="string">"value2"</span> <span class="special">/&gt;</span>
- <span class="special">&lt;</span><span class="identifier">node</span> <span class="identifier">attr1</span><span class="special">=</span><span class="string">"value2"</span><span class="special">&gt;</span>
- <span class="special">&lt;</span><span class="identifier">innernode</span><span class="special">/&gt;</span>
- <span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span>
-<span class="special">&lt;/</span><span class="identifier">mesh</span><span class="special">&gt;</span>
-<span class="special">&lt;?</span><span class="identifier">include</span> <span class="identifier">somedata</span><span class="special">?&gt;</span>
-</pre>
-<p>
- </p>
- </td>
-<td>
- <p>
- <a href="../images/dom_tree.png" target="_top"><span class="inlinemediaobject"><img src="../images/dom_tree_thumb.png" alt="dom_tree_thumb"></span></a>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.dom.cpp"></a><a class="link" href="dom.html#manual.dom.cpp" title="C++ interface"> C++ interface</a>
-</h3></div></div></div>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- All pugixml classes and functions are located in the <code class="computeroutput"><span class="identifier">pugi</span></code>
- namespace; you have to either use explicit name qualification (i.e. <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span></code>), or to gain access to relevant
- symbols via <code class="computeroutput"><span class="keyword">using</span></code> directive
- (i.e. <code class="computeroutput"><span class="keyword">using</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span><span class="special">;</span></code> or <code class="computeroutput"><span class="keyword">using</span>
- <span class="keyword">namespace</span> <span class="identifier">pugi</span><span class="special">;</span></code>). The namespace will be omitted from all
- declarations in this documentation hereafter; all code examples will use
- fully qualified names.
- </p></td></tr>
-</table></div>
-<p>
- Despite the fact that there are several node types, there are only three
- C++ classes representing the tree (<code class="computeroutput"><span class="identifier">xml_document</span></code>,
- <code class="computeroutput"><span class="identifier">xml_node</span></code>, <code class="computeroutput"><span class="identifier">xml_attribute</span></code>);
- some operations on <code class="computeroutput"><span class="identifier">xml_node</span></code>
- are only valid for certain node types. The classes are described below.
- </p>
-<a name="xml_document"></a><a name="xml_document::document_element"></a><p>
- <code class="computeroutput"><span class="identifier">xml_document</span></code> is the owner
- of the entire document structure; it is a non-copyable class. The interface
- of <code class="computeroutput"><span class="identifier">xml_document</span></code> consists
- of loading functions (see <a class="xref" href="loading.html" title="Loading document"> Loading document</a>), saving functions (see <a class="xref" href="saving.html" title="Saving document"> Saving document</a>)
- and the entire interface of <code class="computeroutput"><span class="identifier">xml_node</span></code>,
- which allows for document inspection and/or modification. Note that while
- <code class="computeroutput"><span class="identifier">xml_document</span></code> is a sub-class
- of <code class="computeroutput"><span class="identifier">xml_node</span></code>, <code class="computeroutput"><span class="identifier">xml_node</span></code> is not a polymorphic type; the
- inheritance is present only to simplify usage. Alternatively you can use
- the <code class="computeroutput"><span class="identifier">document_element</span></code> function
- to get the element node that's the immediate child of the document.
- </p>
-<a name="xml_document::ctor"></a><a name="xml_document::dtor"></a><a name="xml_document::reset"></a><p>
- Default constructor of <code class="computeroutput"><span class="identifier">xml_document</span></code>
- initializes the document to the tree with only a root node (document node).
- You can then populate it with data using either tree modification functions
- or loading functions; all loading functions destroy the previous tree with
- all occupied memory, which puts existing node/attribute handles for this
- document to invalid state. If you want to destroy the previous tree, you
- can use the <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">reset</span></code>
- function; it destroys the tree and replaces it with either an empty one or
- a copy of the specified document. Destructor of <code class="computeroutput"><span class="identifier">xml_document</span></code>
- also destroys the tree, thus the lifetime of the document object should exceed
- the lifetimes of any node/attribute handles that point to the tree.
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- While technically node/attribute handles can be alive when the tree they're
- referring to is destroyed, calling any member function for these handles
- results in undefined behavior. Thus it is recommended to make sure that
- the document is destroyed only after all references to its nodes/attributes
- are destroyed.
- </p></td></tr>
-</table></div>
-<a name="xml_node"></a><a name="xml_node::type"></a><p>
- <code class="computeroutput"><span class="identifier">xml_node</span></code> is the handle to
- document node; it can point to any node in the document, including the document
- node itself. There is a common interface for nodes of all types; the actual
- <a class="link" href="dom.html#xml_node_type">node type</a> can be queried via the <code class="computeroutput"><span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">type</span><span class="special">()</span></code>
- method. Note that <code class="computeroutput"><span class="identifier">xml_node</span></code>
- is only a handle to the actual node, not the node itself - you can have several
- <code class="computeroutput"><span class="identifier">xml_node</span></code> handles pointing
- to the same underlying object. Destroying <code class="computeroutput"><span class="identifier">xml_node</span></code>
- handle does not destroy the node and does not remove it from the tree. The
- size of <code class="computeroutput"><span class="identifier">xml_node</span></code> is equal
- to that of a pointer, so it is nothing more than a lightweight wrapper around
- a pointer; you can safely pass or return <code class="computeroutput"><span class="identifier">xml_node</span></code>
- objects by value without additional overhead.
- </p>
-<a name="node_null"></a><p>
- There is a special value of <code class="computeroutput"><span class="identifier">xml_node</span></code>
- type, known as null node or empty node (such nodes have type <code class="computeroutput"><span class="identifier">node_null</span></code>). It does not correspond to any
- node in any document, and thus resembles null pointer. However, all operations
- are defined on empty nodes; generally the operations don't do anything and
- return empty nodes/attributes or empty strings as their result (see documentation
- for specific functions for more detailed information). This is useful for
- chaining calls; i.e. you can get the grandparent of a node like so: <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">parent</span><span class="special">().</span><span class="identifier">parent</span><span class="special">()</span></code>; if a node is a null node or it does not
- have a parent, the first <code class="computeroutput"><span class="identifier">parent</span><span class="special">()</span></code> call returns null node; the second <code class="computeroutput"><span class="identifier">parent</span><span class="special">()</span></code>
- call then also returns null node, which makes error handling easier.
- </p>
-<a name="xml_attribute"></a><p>
- <code class="computeroutput"><span class="identifier">xml_attribute</span></code> is the handle
- to an XML attribute; it has the same semantics as <code class="computeroutput"><span class="identifier">xml_node</span></code>,
- i.e. there can be several <code class="computeroutput"><span class="identifier">xml_attribute</span></code>
- handles pointing to the same underlying object and there is a special null
- attribute value, which propagates to function results.
- </p>
-<a name="xml_attribute::ctor"></a><a name="xml_node::ctor"></a><p>
- Both <code class="computeroutput"><span class="identifier">xml_node</span></code> and <code class="computeroutput"><span class="identifier">xml_attribute</span></code> have the default constructor
- which initializes them to null objects.
- </p>
-<a name="xml_attribute::comparison"></a><a name="xml_node::comparison"></a><p>
- <code class="computeroutput"><span class="identifier">xml_node</span></code> and <code class="computeroutput"><span class="identifier">xml_attribute</span></code> try to behave like pointers,
- that is, they can be compared with other objects of the same type, making
- it possible to use them as keys in associative containers. All handles to
- the same underlying object are equal, and any two handles to different underlying
- objects are not equal. Null handles only compare as equal to themselves.
- The result of relational comparison can not be reliably determined from the
- order of nodes in file or in any other way. Do not use relational comparison
- operators except for search optimization (i.e. associative container keys).
- </p>
-<a name="xml_attribute::hash_value"></a><a name="xml_node::hash_value"></a><p>
- If you want to use <code class="computeroutput"><span class="identifier">xml_node</span></code>
- or <code class="computeroutput"><span class="identifier">xml_attribute</span></code> objects
- as keys in hash-based associative containers, you can use the <code class="computeroutput"><span class="identifier">hash_value</span></code> member functions. They return
- the hash values that are guaranteed to be the same for all handles to the
- same underlying object. The hash value for null handles is 0.
- </p>
-<a name="xml_attribute::unspecified_bool_type"></a><a name="xml_node::unspecified_bool_type"></a><a name="xml_attribute::empty"></a><a name="xml_node::empty"></a><p>
- Finally handles can be implicitly cast to boolean-like objects, so that you
- can test if the node/attribute is empty with the following code: <code class="computeroutput"><span class="keyword">if</span> <span class="special">(</span><span class="identifier">node</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span></code> or <code class="computeroutput"><span class="keyword">if</span>
- <span class="special">(!</span><span class="identifier">node</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span> <span class="keyword">else</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span></code>.
- Alternatively you can check if a given <code class="computeroutput"><span class="identifier">xml_node</span></code>/<code class="computeroutput"><span class="identifier">xml_attribute</span></code> handle is null by calling
- the following methods:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Nodes and attributes do not exist without a document tree, so you can't create
- them without adding them to some document. Once underlying node/attribute
- objects are destroyed, the handles to those objects become invalid. While
- this means that destruction of the entire tree invalidates all node/attribute
- handles, it also means that destroying a subtree (by calling <a class="link" href="modify.html#xml_node::remove_child">xml_node::remove_child</a>)
- or removing an attribute invalidates the corresponding handles. There is
- no way to check handle validity; you have to ensure correctness through external
- mechanisms.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.dom.unicode"></a><a class="link" href="dom.html#manual.dom.unicode" title="Unicode interface"> Unicode interface</a>
-</h3></div></div></div>
-<p>
- There are two choices of interface and internal representation when configuring
- pugixml: you can either choose the UTF-8 (also called char) interface or
- UTF-16/32 (also called wchar_t) one. The choice is controlled via <a class="link" href="install.html#PUGIXML_WCHAR_MODE">PUGIXML_WCHAR_MODE</a>
- define; you can set it via <code class="filename">pugiconfig.hpp</code> or via preprocessor options, as
- discussed in <a class="xref" href="install.html#manual.install.building.config" title="Additional configuration options"> Additional configuration
- options</a>. If this define is set, the wchar_t
- interface is used; otherwise (by default) the char interface is used. The
- exact wide character encoding is assumed to be either UTF-16 or UTF-32 and
- is determined based on the size of <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- type.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- If the size of <code class="computeroutput"><span class="keyword">wchar_t</span></code> is
- 2, pugixml assumes UTF-16 encoding instead of UCS-2, which means that some
- characters are represented as two code points.
- </p></td></tr>
-</table></div>
-<p>
- All tree functions that work with strings work with either C-style null terminated
- strings or STL strings of the selected character type. For example, node
- name accessors look like this in char mode:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">name</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">set_name</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">value</span><span class="special">);</span>
-</pre>
-<p>
- and like this in wchar_t mode:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">name</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">set_name</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">value</span><span class="special">);</span>
-</pre>
-<a name="char_t"></a><a name="string_t"></a><p>
- There is a special type, <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">char_t</span></code>,
- that is defined as the character type and depends on the library configuration;
- it will be also used in the documentation hereafter. There is also a type
- <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">string_t</span></code>, which is defined as the STL string
- of the character type; it corresponds to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
- in char mode and to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span></code> in wchar_t mode.
- </p>
-<p>
- In addition to the interface, the internal implementation changes to store
- XML data as <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">char_t</span></code>; this means that these two modes
- have different memory usage characteristics. The conversion to <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">char_t</span></code> upon document loading and from
- <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">char_t</span></code> upon document saving happen automatically,
- which also carries minor performance penalty. The general advice however
- is to select the character mode based on usage scenario, i.e. if UTF-8 is
- inconvenient to process and most of your XML data is non-ASCII, wchar_t mode
- is probably a better choice.
- </p>
-<a name="as_utf8"></a><a name="as_wide"></a><p>
- There are cases when you'll have to convert string data between UTF-8 and
- wchar_t encodings; the following helper functions are provided for such purposes:
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">as_utf8</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">str</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> <span class="identifier">as_wide</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">str</span><span class="special">);</span>
-</pre>
-<p>
- Both functions accept a null-terminated string as an argument <code class="computeroutput"><span class="identifier">str</span></code>, and return the converted string.
- <code class="computeroutput"><span class="identifier">as_utf8</span></code> performs conversion
- from UTF-16/32 to UTF-8; <code class="computeroutput"><span class="identifier">as_wide</span></code>
- performs conversion from UTF-8 to UTF-16/32. Invalid UTF sequences are silently
- discarded upon conversion. <code class="computeroutput"><span class="identifier">str</span></code>
- has to be a valid string; passing null pointer results in undefined behavior.
- There are also two overloads with the same semantics which accept a string
- as an argument:
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">as_utf8</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span><span class="special">&amp;</span> <span class="identifier">str</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> <span class="identifier">as_wide</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">str</span><span class="special">);</span>
-</pre>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top">
-<p>
- Most examples in this documentation assume char interface and therefore
- will not compile with <a class="link" href="install.html#PUGIXML_WCHAR_MODE">PUGIXML_WCHAR_MODE</a>.
- This is done to simplify the documentation; usually the only changes you'll
- have to make is to pass <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- string literals, i.e. instead of
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span>
- <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"bookstore"</span><span class="special">).</span><span class="identifier">find_child_by_attribute</span><span class="special">(</span><span class="string">"book"</span><span class="special">,</span> <span class="string">"id"</span><span class="special">,</span> <span class="string">"12345"</span><span class="special">);</span></code>
- </p>
-<p>
- you'll have to do
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span>
- <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="identifier">L</span><span class="string">"bookstore"</span><span class="special">).</span><span class="identifier">find_child_by_attribute</span><span class="special">(</span><span class="identifier">L</span><span class="string">"book"</span><span class="special">,</span> <span class="identifier">L</span><span class="string">"id"</span><span class="special">,</span> <span class="identifier">L</span><span class="string">"12345"</span><span class="special">);</span></code>
- </p>
-</td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.dom.thread"></a><a class="link" href="dom.html#manual.dom.thread" title="Thread-safety guarantees"> Thread-safety guarantees</a>
-</h3></div></div></div>
-<p>
- Almost all functions in pugixml have the following thread-safety guarantees:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- it is safe to call free (non-member) functions from multiple threads
- </li>
-<li class="listitem">
- it is safe to perform concurrent read-only accesses to the same tree
- (all constant member functions do not modify the tree)
- </li>
-<li class="listitem">
- it is safe to perform concurrent read/write accesses, if there is only
- one read or write access to the single tree at a time
- </li>
-</ul></div>
-<p>
- Concurrent modification and traversing of a single tree requires synchronization,
- for example via reader-writer lock. Modification includes altering document
- structure and altering individual node/attribute data, i.e. changing names/values.
- </p>
-<p>
- The only exception is <a class="link" href="dom.html#set_memory_management_functions">set_memory_management_functions</a>;
- it modifies global variables and as such is not thread-safe. Its usage policy
- has more restrictions, see <a class="xref" href="dom.html#manual.dom.memory.custom" title="Custom memory allocation/deallocation functions"> Custom memory allocation/deallocation
- functions</a>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.dom.exception"></a><a class="link" href="dom.html#manual.dom.exception" title="Exception guarantees"> Exception guarantees</a>
-</h3></div></div></div>
-<p>
- With the exception of XPath, pugixml itself does not throw any exceptions.
- Additionally, most pugixml functions have a no-throw exception guarantee.
- </p>
-<p>
- This is not applicable to functions that operate on STL strings or IOstreams;
- such functions have either strong guarantee (functions that operate on strings)
- or basic guarantee (functions that operate on streams). Also functions that
- call user-defined callbacks (i.e. <a class="link" href="access.html#xml_node::traverse">xml_node::traverse</a>
- or <a class="link" href="access.html#xml_node::find_node">xml_node::find_node</a>) do not
- provide any exception guarantees beyond the ones provided by the callback.
- </p>
-<p>
- If exception handling is not disabled with <a class="link" href="install.html#PUGIXML_NO_EXCEPTIONS">PUGIXML_NO_EXCEPTIONS</a>
- define, XPath functions may throw <a class="link" href="xpath.html#xpath_exception">xpath_exception</a>
- on parsing errors; also, XPath functions may throw <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code>
- in low memory conditions. Still, XPath functions provide strong exception
- guarantee.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.dom.memory"></a><a class="link" href="dom.html#manual.dom.memory" title="Memory management"> Memory management</a>
-</h3></div></div></div>
-<p>
- pugixml requests the memory needed for document storage in big chunks, and
- allocates document data inside those chunks. This section discusses replacing
- functions used for chunk allocation and internal memory management implementation.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.dom.memory.custom"></a><a class="link" href="dom.html#manual.dom.memory.custom" title="Custom memory allocation/deallocation functions"> Custom memory allocation/deallocation
- functions</a>
-</h4></div></div></div>
-<a name="allocation_function"></a><a name="deallocation_function"></a><p>
- All memory for tree structure, tree data and XPath objects is allocated
- via globally specified functions, which default to malloc/free. You can
- set your own allocation functions with set_memory_management function.
- The function interfaces are the same as that of malloc/free:
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">void</span><span class="special">*</span> <span class="special">(*</span><span class="identifier">allocation_function</span><span class="special">)(</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">);</span>
-<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="special">(*</span><span class="identifier">deallocation_function</span><span class="special">)(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">ptr</span><span class="special">);</span>
-</pre>
-<a name="set_memory_management_functions"></a><a name="get_memory_allocation_function"></a><a name="get_memory_deallocation_function"></a><p>
- You can use the following accessor functions to change or get current memory
- management functions:
- </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">set_memory_management_functions</span><span class="special">(</span><span class="identifier">allocation_function</span> <span class="identifier">allocate</span><span class="special">,</span> <span class="identifier">deallocation_function</span> <span class="identifier">deallocate</span><span class="special">);</span>
-<span class="identifier">allocation_function</span> <span class="identifier">get_memory_allocation_function</span><span class="special">();</span>
-<span class="identifier">deallocation_function</span> <span class="identifier">get_memory_deallocation_function</span><span class="special">();</span>
-</pre>
-<p>
- Allocation function is called with the size (in bytes) as an argument and
- should return a pointer to a memory block with alignment that is suitable
- for storage of primitive types (usually a maximum of <code class="computeroutput"><span class="keyword">void</span><span class="special">*</span></code> and <code class="computeroutput"><span class="keyword">double</span></code>
- types alignment is sufficient) and size that is greater than or equal to
- the requested one. If the allocation fails, the function has to return
- null pointer (throwing an exception from allocation function results in
- undefined behavior).
- </p>
-<p>
- Deallocation function is called with the pointer that was returned by some
- call to allocation function; it is never called with a null pointer. If
- memory management functions are not thread-safe, library thread safety
- is not guaranteed.
- </p>
-<p>
- This is a simple example of custom memory management (<a href="../samples/custom_memory_management.cpp" target="_top">samples/custom_memory_management.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">void</span><span class="special">*</span> <span class="identifier">custom_allocate</span><span class="special">(</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">return</span> <span class="keyword">new</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">nothrow</span><span class="special">)</span> <span class="keyword">char</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
-<span class="special">}</span>
-
-<span class="keyword">void</span> <span class="identifier">custom_deallocate</span><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">ptr</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">delete</span><span class="special">[]</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">*&gt;(</span><span class="identifier">ptr</span><span class="special">);</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">set_memory_management_functions</span><span class="special">(</span><span class="identifier">custom_allocate</span><span class="special">,</span> <span class="identifier">custom_deallocate</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
- When setting new memory management functions, care must be taken to make
- sure that there are no live pugixml objects. Otherwise when the objects
- are destroyed, the new deallocation function will be called with the memory
- obtained by the old allocation function, resulting in undefined behavior.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.dom.memory.tuning"></a><a class="link" href="dom.html#manual.dom.memory.tuning" title="Memory consumption tuning"> Memory consumption tuning</a>
-</h4></div></div></div>
-<p>
- There are several important buffering optimizations in pugixml that rely
- on predefined constants. These constants have default values that were
- tuned for common usage patterns; for some applications, changing these
- constants might improve memory consumption or increase performance. Changing
- these constants is not recommended unless their default values result in
- visible problems.
- </p>
-<p>
- These constants can be tuned via configuration defines, as discussed in
- <a class="xref" href="install.html#manual.install.building.config" title="Additional configuration options"> Additional configuration
- options</a>; it is recommended to set them in <code class="filename">pugiconfig.hpp</code>.
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">PUGIXML_MEMORY_PAGE_SIZE</span></code>
- controls the page size for document memory allocation. Memory for node/attribute
- objects is allocated in pages of the specified size. The default size
- is 32 Kb; for some applications the size is too large (i.e. embedded
- systems with little heap space or applications that keep lots of XML
- documents in memory). A minimum size of 1 Kb is recommended. <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">PUGIXML_MEMORY_OUTPUT_STACK</span></code>
- controls the cumulative stack space required to output the node. Any
- output operation (i.e. saving a subtree to file) uses an internal buffering
- scheme for performance reasons. The default size is 10 Kb; if you're
- using node output from threads with little stack space, decreasing
- this value can prevent stack overflows. A minimum size of 1 Kb is recommended.
- <br><br>
-
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">PUGIXML_MEMORY_XPATH_PAGE_SIZE</span></code>
- controls the page size for XPath memory allocation. Memory for XPath
- query objects as well as internal memory for XPath evaluation is allocated
- in pages of the specified size. The default size is 4 Kb; if you have
- a lot of resident XPath query objects, you might need to decrease the
- size to improve memory consumption. A minimum size of 256 bytes is
- recommended.
- </li>
-</ul></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.dom.memory.internals"></a><a class="link" href="dom.html#manual.dom.memory.internals" title="Document memory management internals"> Document memory management
- internals</a>
-</h4></div></div></div>
-<p>
- Constructing a document object using the default constructor does not result
- in any allocations; document node is stored inside the <a class="link" href="dom.html#xml_document">xml_document</a>
- object.
- </p>
-<p>
- When the document is loaded from file/buffer, unless an inplace loading
- function is used (see <a class="xref" href="loading.html#manual.loading.memory" title="Loading document from memory"> Loading document from memory</a>), a complete copy of character
- stream is made; all names/values of nodes and attributes are allocated
- in this buffer. This buffer is allocated via a single large allocation
- and is only freed when document memory is reclaimed (i.e. if the <a class="link" href="dom.html#xml_document">xml_document</a> object is destroyed or if another
- document is loaded in the same object). Also when loading from file or
- stream, an additional large allocation may be performed if encoding conversion
- is required; a temporary buffer is allocated, and it is freed before load
- function returns.
- </p>
-<p>
- All additional memory, such as memory for document structure (node/attribute
- objects) and memory for node/attribute names/values is allocated in pages
- on the order of 32 kilobytes; actual objects are allocated inside the pages
- using a memory management scheme optimized for fast allocation/deallocation
- of many small objects. Because of the scheme specifics, the pages are only
- destroyed if all objects inside them are destroyed; also, generally destroying
- an object does not mean that subsequent object creation will reuse the
- same memory. This means that it is possible to devise a usage scheme which
- will lead to higher memory usage than expected; one example is adding a
- lot of nodes, and them removing all even numbered ones; not a single page
- is reclaimed in the process. However this is an example specifically crafted
- to produce unsatisfying behavior; in all practical usage scenarios the
- memory consumption is less than that of a general-purpose allocator because
- allocation meta-data is very small in size.
- </p>
-</div>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <b>Object model</b> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="install.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="loading.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/install.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/install.html
deleted file mode 100644
index df7b322c8..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/install.html
+++ /dev/null
@@ -1,498 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Installation</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="../manual.html" title="pugixml 1.2">
-<link rel="next" href="dom.html" title="Document object model">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <b>Installation</b> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="../manual.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="dom.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.install"></a><a class="link" href="install.html" title="Installation"> Installation</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="install.html#manual.install.getting"> Getting pugixml</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="install.html#manual.install.getting.source"> Source distributions</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.getting.subversion"> Subversion repository</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="install.html#manual.install.building"> Building pugixml</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="install.html#manual.install.building.embed"> Building pugixml as
- a part of another static library/executable</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.static"> Building pugixml as
- a standalone static library</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.shared"> Building pugixml as
- a standalone shared library</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.header"> Using pugixml in header-only
- mode</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.config"> Additional configuration
- options</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="install.html#manual.install.portability"> Portability</a></span></dt>
-</dl></div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.install.getting"></a><a class="link" href="install.html#manual.install.getting" title="Getting pugixml"> Getting pugixml</a>
-</h3></div></div></div>
-<p>
- pugixml is distributed in source form. You can either download a source distribution
- or checkout the Subversion repository.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.getting.source"></a><a class="link" href="install.html#manual.install.getting.source" title="Source distributions"> Source distributions</a>
-</h4></div></div></div>
-<p>
- You can download the latest source distribution via one of the following
- links:
- </p>
-<pre class="programlisting"><a href="http://pugixml.googlecode.com/files/pugixml-1.2.zip" target="_top">http://pugixml.googlecode.com/files/pugixml-1.2.zip</a>
-<a href="http://pugixml.googlecode.com/files/pugixml-1.2.tar.gz" target="_top">http://pugixml.googlecode.com/files/pugixml-1.2.tar.gz</a>
-</pre>
-<p>
- The distribution contains library source, documentation (the manual you're
- reading now and the quick start guide) and some code examples. After downloading
- the distribution, install pugixml by extracting all files from the compressed
- archive. The files have different line endings depending on the archive
- format - <code class="filename">.zip</code> archive has Windows line endings, <code class="filename">.tar.gz</code> archive has Unix
- line endings. Otherwise the files in both archives are identical.
- </p>
-<p>
- If you need an older version, you can download it from the <a href="http://code.google.com/p/pugixml/downloads/list" target="_top">version
- archive</a>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.getting.subversion"></a><a class="link" href="install.html#manual.install.getting.subversion" title="Subversion repository"> Subversion repository</a>
-</h4></div></div></div>
-<p>
- The Subversion repository is located at <a href="http://pugixml.googlecode.com/svn/" target="_top">http://pugixml.googlecode.com/svn/</a>.
- There is a Subversion tag "release-{version}" for each version;
- also there is the "latest" tag, which always points to the latest
- stable release.
- </p>
-<p>
- For example, to checkout the current version, you can use this command:
- </p>
-<pre class="programlisting">svn checkout http://pugixml.googlecode.com/svn/tags/release-1.2 pugixml</pre>
-<p>
- To checkout the latest version, you can use this command:
- </p>
-<pre class="programlisting">svn checkout http://pugixml.googlecode.com/svn/tags/latest pugixml</pre>
-<p>
- The repository contains library source, documentation, code examples and
- full unit test suite.
- </p>
-<p>
- Use latest version tag if you want to automatically get new versions via
- <code class="literal">svn update</code>. Use other tags if you want to switch to
- new versions only explicitly (for example, using <code class="literal">svn switch</code>
- command). Also please note that Subversion trunk contains the work-in-progress
- version of the code; while this means that you can get new features and
- bug fixes from trunk without waiting for a new release, this also means
- that occasionally the code can be broken in some configurations.
- </p>
-</div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.install.building"></a><a class="link" href="install.html#manual.install.building" title="Building pugixml"> Building pugixml</a>
-</h3></div></div></div>
-<p>
- pugixml is distributed in source form without any pre-built binaries; you
- have to build them yourself.
- </p>
-<p>
- The complete pugixml source consists of three files - one source file, <code class="filename">pugixml.cpp</code>,
- and two header files, <code class="filename">pugixml.hpp</code> and <code class="filename">pugiconfig.hpp</code>. <code class="filename">pugixml.hpp</code> is the primary
- header which you need to include in order to use pugixml classes/functions;
- <code class="filename">pugiconfig.hpp</code> is a supplementary configuration file (see <a class="xref" href="install.html#manual.install.building.config" title="Additional configuration options"> Additional configuration
- options</a>).
- The rest of this guide assumes that <code class="filename">pugixml.hpp</code> is either in the current directory
- or in one of include directories of your projects, so that <code class="computeroutput"><span class="preprocessor">#include</span> <span class="string">"pugixml.hpp"</span></code>
- can find the header; however you can also use relative path (i.e. <code class="computeroutput"><span class="preprocessor">#include</span> <span class="string">"../libs/pugixml/src/pugixml.hpp"</span></code>)
- or include directory-relative path (i.e. <code class="computeroutput"><span class="preprocessor">#include</span>
- <span class="special">&lt;</span><span class="identifier">xml</span><span class="special">/</span><span class="identifier">thirdparty</span><span class="special">/</span><span class="identifier">pugixml</span><span class="special">/</span><span class="identifier">src</span><span class="special">/</span><span class="identifier">pugixml</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>).
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.building.embed"></a><a class="link" href="install.html#manual.install.building.embed" title="Building pugixml as a part of another static library/executable"> Building pugixml as
- a part of another static library/executable</a>
-</h4></div></div></div>
-<p>
- The easiest way to build pugixml is to compile the source file, <code class="filename">pugixml.cpp</code>,
- along with the existing library/executable. This process depends on the
- method of building your application; for example, if you're using Microsoft
- Visual Studio<sup>[<a name="trademarks" href="#ftn.trademarks" class="footnote">1</a>]</sup>, Apple Xcode, Code::Blocks or any other IDE, just add <code class="filename">pugixml.cpp</code> to
- one of your projects.
- </p>
-<p>
- If you're using Microsoft Visual Studio and the project has precompiled
- headers turned on, you'll see the following error messages:
- </p>
-<pre class="programlisting">pugixml.cpp(3477) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?</pre>
-<p>
- The correct way to resolve this is to disable precompiled headers for <code class="filename">pugixml.cpp</code>;
- you have to set "Create/Use Precompiled Header" option (Properties
- dialog -&gt; C/C++ -&gt; Precompiled Headers -&gt; Create/Use Precompiled
- Header) to "Not Using Precompiled Headers". You'll have to do
- it for all project configurations/platforms (you can select Configuration
- "All Configurations" and Platform "All Platforms" before
- editing the option):
- </p>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td>
- <p>
- <a href="../images/vs2005_pch1.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2005_pch1_thumb.png" alt="vs2005_pch1_thumb"></span></a> <span class="inlinemediaobject"><img src="../images/next.png" alt="next"></span> <a href="../images/vs2005_pch2.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2005_pch2_thumb.png" alt="vs2005_pch2_thumb"></span></a> <span class="inlinemediaobject"><img src="../images/next.png" alt="next"></span> <a href="../images/vs2005_pch3.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2005_pch3_thumb.png" alt="vs2005_pch3_thumb"></span></a> <span class="inlinemediaobject"><img src="../images/next.png" alt="next"></span> <a href="../images/vs2005_pch4.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2005_pch4_thumb.png" alt="vs2005_pch4_thumb"></span></a>
- </p>
- </td></tr></tbody>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.building.static"></a><a class="link" href="install.html#manual.install.building.static" title="Building pugixml as a standalone static library"> Building pugixml as
- a standalone static library</a>
-</h4></div></div></div>
-<p>
- It's possible to compile pugixml as a standalone static library. This process
- depends on the method of building your application; pugixml distribution
- comes with project files for several popular IDEs/build systems. There
- are project files for Apple XCode3, Code::Blocks, Codelite, Microsoft Visual
- Studio 2005, 2008, 2010, and configuration scripts for CMake and premake4.
- You're welcome to submit project files/build scripts for other software;
- see <a class="xref" href="../manual.html#manual.overview.feedback" title="Feedback"> Feedback</a>.
- </p>
-<p>
- There are two projects for each version of Microsoft Visual Studio: one
- for dynamically linked CRT, which has a name like <code class="filename">pugixml_vs2008.vcproj</code>,
- and another one for statically linked CRT, which has a name like <code class="filename">pugixml_vs2008_static.vcproj</code>.
- You should select the version that matches the CRT used in your application;
- the default option for new projects created by Microsoft Visual Studio
- is dynamically linked CRT, so unless you changed the defaults, you should
- use the version with dynamic CRT (i.e. <code class="filename">pugixml_vs2008.vcproj</code> for Microsoft
- Visual Studio 2008).
- </p>
-<p>
- In addition to adding pugixml project to your workspace, you'll have to
- make sure that your application links with pugixml library. If you're using
- Microsoft Visual Studio 2005/2008, you can add a dependency from your application
- project to pugixml one. If you're using Microsoft Visual Studio 2010, you'll
- have to add a reference to your application project instead. For other
- IDEs/systems, consult the relevant documentation.
- </p>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Microsoft Visual Studio 2005/2008
- </p>
- </th>
-<th>
- <p>
- Microsoft Visual Studio 2010
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <a href="../images/vs2005_link1.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2005_link1_thumb.png" alt="vs2005_link1_thumb"></span></a> <span class="inlinemediaobject"><img src="../images/next.png" alt="next"></span> <a href="../images/vs2005_link2.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2005_link2_thumb.png" alt="vs2005_link2_thumb"></span></a>
- </p>
- </td>
-<td>
- <p>
- <a href="../images/vs2010_link1.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2010_link1_thumb.png" alt="vs2010_link1_thumb"></span></a> <span class="inlinemediaobject"><img src="../images/next.png" alt="next"></span> <a href="../images/vs2010_link2.png" target="_top"><span class="inlinemediaobject"><img src="../images/vs2010_link2_thumb.png" alt="vs2010_link2_thumb"></span></a>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.building.shared"></a><a class="link" href="install.html#manual.install.building.shared" title="Building pugixml as a standalone shared library"> Building pugixml as
- a standalone shared library</a>
-</h4></div></div></div>
-<p>
- It's possible to compile pugixml as a standalone shared library. The process
- is usually similar to the static library approach; however, no preconfigured
- projects/scripts are included into pugixml distribution, so you'll have
- to do it yourself. Generally, if you're using GCC-based toolchain, the
- process does not differ from building any other library as DLL (adding
- -shared to compilation flags should suffice); if you're using MSVC-based
- toolchain, you'll have to explicitly mark exported symbols with a declspec
- attribute. You can do it by defining <a class="link" href="install.html#PUGIXML_API">PUGIXML_API</a>
- macro, i.e. via <code class="filename">pugiconfig.hpp</code>:
- </p>
-<pre class="programlisting"><span class="preprocessor">#ifdef</span> <span class="identifier">_DLL</span>
-<span class="preprocessor">#define</span> <span class="identifier">PUGIXML_API</span> <span class="identifier">__declspec</span><span class="special">(</span><span class="identifier">dllexport</span><span class="special">)</span>
-<span class="preprocessor">#else</span>
-<span class="preprocessor">#define</span> <span class="identifier">PUGIXML_API</span> <span class="identifier">__declspec</span><span class="special">(</span><span class="identifier">dllimport</span><span class="special">)</span>
-<span class="preprocessor">#endif</span>
-</pre>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- If you're using STL-related functions, you should use the shared runtime
- library to ensure that a single heap is used for STL allocations in your
- application and in pugixml; in MSVC, this means selecting the 'Multithreaded
- DLL' or 'Multithreaded Debug DLL' to 'Runtime library' property (/MD
- or /MDd linker switch). You should also make sure that your runtime library
- choice is consistent between different projects.
- </p></td></tr>
-</table></div>
-</div>
-<a name="PUGIXML_HEADER_ONLY"></a><div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.building.header"></a><a class="link" href="install.html#manual.install.building.header" title="Using pugixml in header-only mode"> Using pugixml in header-only
- mode</a>
-</h4></div></div></div>
-<p>
- It's possible to use pugixml in header-only mode. This means that all source
- code for pugixml will be included in every translation unit that includes
- <code class="filename">pugixml.hpp</code>. This is how most of Boost and STL libraries work.
- </p>
-<p>
- Note that there are advantages and drawbacks of this approach. Header mode
- may improve tree traversal/modification performance (because many simple
- functions will be inlined), if your compiler toolchain does not support
- link-time optimization, or if you have it turned off (with link-time optimization
- the performance should be similar to non-header mode). However, since compiler
- now has to compile pugixml source once for each translation unit that includes
- it, compilation times may increase noticeably. If you want to use pugixml
- in header mode but do not need XPath support, you can consider disabling
- it by using <a class="link" href="install.html#PUGIXML_NO_XPATH">PUGIXML_NO_XPATH</a> define
- to improve compilation time.
- </p>
-<p>
- Enabling header-only mode is a two-step process:
- </p>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- You have to define <code class="computeroutput"><span class="identifier">PUGIXML_HEADER_ONLY</span></code>
- </li>
-<li class="listitem">
- You have to include <code class="filename">pugixml.cpp</code> whenever you include pugixml.hpp
- </li>
-</ol></div>
-<p>
- Both of these are best done via <code class="filename">pugiconfig.hpp</code> like this:
- </p>
-<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">PUGIXML_HEADER_ONLY</span>
-<span class="preprocessor">#include</span> <span class="string">"pugixml.cpp"</span>
-</pre>
-<p>
- Note that it is safe to compile <code class="filename">pugixml.cpp</code> if <code class="computeroutput"><span class="identifier">PUGIXML_HEADER_ONLY</span></code>
- is defined - so if you want to i.e. use header-only mode only in Release
- configuration, you can include pugixml.cpp in your project (see <a class="xref" href="install.html#manual.install.building.embed" title="Building pugixml as a part of another static library/executable"> Building pugixml as
- a part of another static library/executable</a>),
- and conditionally enable header-only mode in <code class="filename">pugiconfig.hpp</code>, i.e.:
- </p>
-<pre class="programlisting"><span class="preprocessor">#ifndef</span> <span class="identifier">_DEBUG</span>
- <span class="preprocessor">#define</span> <span class="identifier">PUGIXML_HEADER_ONLY</span>
- <span class="preprocessor">#include</span> <span class="string">"pugixml.cpp"</span>
-<span class="preprocessor">#endif</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="manual.install.building.config"></a><a class="link" href="install.html#manual.install.building.config" title="Additional configuration options"> Additional configuration
- options</a>
-</h4></div></div></div>
-<p>
- pugixml uses several defines to control the compilation process. There
- are two ways to define them: either put the needed definitions to <code class="filename">pugiconfig.hpp</code> (it
- has some examples that are commented out) or provide them via compiler
- command-line. Consistency is important: the definitions should match in
- all source files that include <code class="filename">pugixml.hpp</code> (including pugixml sources) throughout
- the application. Adding defines to <code class="filename">pugiconfig.hpp</code> lets you guarantee this,
- unless your macro definition is wrapped in preprocessor <code class="computeroutput"><span class="preprocessor">#if</span></code>/<code class="computeroutput"><span class="preprocessor">#ifdef</span></code> directive and this directive
- is not consistent. <code class="filename">pugiconfig.hpp</code> will never contain anything but comments,
- which means that when upgrading to a new version, you can safely leave
- your modified version intact.
- </p>
-<p>
- <a name="PUGIXML_WCHAR_MODE"></a><code class="literal">PUGIXML_WCHAR_MODE</code> define toggles
- between UTF-8 style interface (the in-memory text encoding is assumed to
- be UTF-8, most functions use <code class="computeroutput"><span class="keyword">char</span></code>
- as character type) and UTF-16/32 style interface (the in-memory text encoding
- is assumed to be UTF-16/32, depending on <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- size, most functions use <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- as character type). See <a class="xref" href="dom.html#manual.dom.unicode" title="Unicode interface"> Unicode interface</a> for more details.
- </p>
-<p>
- <a name="PUGIXML_NO_XPATH"></a><code class="literal">PUGIXML_NO_XPATH</code> define disables XPath.
- Both XPath interfaces and XPath implementation are excluded from compilation.
- This option is provided in case you do not need XPath functionality and
- need to save code space.
- </p>
-<p>
- <a name="PUGIXML_NO_STL"></a><code class="literal">PUGIXML_NO_STL</code> define disables use of
- STL in pugixml. The functions that operate on STL types are no longer present
- (i.e. load/save via iostream) if this macro is defined. This option is
- provided in case your target platform does not have a standard-compliant
- STL implementation.
- </p>
-<p>
- <a name="PUGIXML_NO_EXCEPTIONS"></a><code class="literal">PUGIXML_NO_EXCEPTIONS</code> define disables
- use of exceptions in pugixml. This option is provided in case your target
- platform does not have exception handling capabilities.
- </p>
-<p>
- <a name="PUGIXML_API"></a><code class="literal">PUGIXML_API</code>, <a name="PUGIXML_CLASS"></a><code class="literal">PUGIXML_CLASS</code>
- and <a name="PUGIXML_FUNCTION"></a><code class="literal">PUGIXML_FUNCTION</code> defines let you
- specify custom attributes (i.e. declspec or calling conventions) for pugixml
- classes and non-member functions. In absence of <code class="computeroutput"><span class="identifier">PUGIXML_CLASS</span></code>
- or <code class="computeroutput"><span class="identifier">PUGIXML_FUNCTION</span></code> definitions,
- <code class="computeroutput"><span class="identifier">PUGIXML_API</span></code> definition
- is used instead. For example, to specify fixed calling convention, you
- can define <code class="computeroutput"><span class="identifier">PUGIXML_FUNCTION</span></code>
- to i.e. <code class="computeroutput"><span class="identifier">__fastcall</span></code>. Another
- example is DLL import/export attributes in MSVC (see <a class="xref" href="install.html#manual.install.building.shared" title="Building pugixml as a standalone shared library"> Building pugixml as
- a standalone shared library</a>).
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- In that example <code class="computeroutput"><span class="identifier">PUGIXML_API</span></code>
- is inconsistent between several source files; this is an exception to
- the consistency rule.
- </p></td></tr>
-</table></div>
-<p>
- <a name="PUGIXML_MEMORY_PAGE_SIZE"></a><code class="literal">PUGIXML_MEMORY_PAGE_SIZE</code>, <a name="PUGIXML_MEMORY_OUTPUT_STACK"></a><code class="literal">PUGIXML_MEMORY_OUTPUT_STACK</code>
- and <a name="PUGIXML_MEMORY_XPATH_PAGE_SIZE"></a><code class="literal">PUGIXML_MEMORY_XPATH_PAGE_SIZE</code>
- can be used to customize certain important sizes to optimize memory usage
- for the application-specific patterns. For details see <a class="xref" href="dom.html#manual.dom.memory.tuning" title="Memory consumption tuning"> Memory consumption tuning</a>.
- </p>
-</div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.install.portability"></a><a class="link" href="install.html#manual.install.portability" title="Portability"> Portability</a>
-</h3></div></div></div>
-<p>
- pugixml is written in standard-compliant C++ with some compiler-specific
- workarounds where appropriate. pugixml is compatible with the upcoming C++0x
- standard (verified using GCC 4.5). Each version is tested with a unit test
- suite (with code coverage about 99%) on the following platforms:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Microsoft Windows:
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- Borland C++ Compiler 5.82
- </li>
-<li class="listitem">
- Digital Mars C++ Compiler 8.51
- </li>
-<li class="listitem">
- Intel C++ Compiler 8.0, 9.0 x86/x64, 10.0 x86/x64, 11.0 x86/x64
- </li>
-<li class="listitem">
- Metrowerks CodeWarrior 8.0
- </li>
-<li class="listitem">
- Microsoft Visual C++ 6.0, 7.0 (2002), 7.1 (2003), 8.0 (2005) x86/x64,
- 9.0 (2008) x86/x64, 10.0 (2010) x86/x64, 11.0 x86/x64/ARM and some
- CLR versions
- </li>
-<li class="listitem">
- MinGW (GCC) 3.4, 4.4, 4.5, 4.6 x64
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- Linux (GCC 4.4.3 x86/x64)
- </li>
-<li class="listitem">
- FreeBSD (GCC 4.2.1 x86/x64)
- </li>
-<li class="listitem">
- Apple MacOSX (GCC 4.0.1 x86/x64/PowerPC)
- </li>
-<li class="listitem">
- Sun Solaris (sunCC x86/x64)
- </li>
-<li class="listitem">
- Microsoft Xbox 360
- </li>
-<li class="listitem">
- Nintendo Wii (Metrowerks CodeWarrior 4.1)
- </li>
-<li class="listitem">
- Sony Playstation Portable (GCC 3.4.2)
- </li>
-<li class="listitem">
- Sony Playstation 3 (GCC 4.1.1, SNC 310.1)
- </li>
-<li class="listitem">
- Various portable platforms (Android NDK, BlackBerry NDK, Samsung bada,
- Windows CE)
- </li>
-</ul></div>
-</div>
-<div class="footnotes">
-<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.trademarks" href="#trademarks" class="para">1</a>] </sup>All trademarks used are properties of their respective
- owners.</p></div>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <b>Installation</b> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="../manual.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="dom.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/loading.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/loading.html
deleted file mode 100644
index a26b62c1b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/loading.html
+++ /dev/null
@@ -1,873 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Loading document</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="dom.html" title="Document object model">
-<link rel="next" href="access.html" title="Accessing document data">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <b>Loading</b> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="dom.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="access.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.loading"></a><a class="link" href="loading.html" title="Loading document"> Loading document</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="loading.html#manual.loading.file"> Loading document from file</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.memory"> Loading document from memory</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.stream"> Loading document from C++ IOstreams</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.errors"> Handling parsing errors</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.options"> Parsing options</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.encoding"> Encodings</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.w3c"> Conformance to W3C specification</a></span></dt>
-</dl></div>
-<p>
- pugixml provides several functions for loading XML data from various places
- - files, C++ iostreams, memory buffers. All functions use an extremely fast
- non-validating parser. This parser is not fully W3C conformant - it can load
- any valid XML document, but does not perform some well-formedness checks. While
- considerable effort is made to reject invalid XML documents, some validation
- is not performed for performance reasons. Also some XML transformations (i.e.
- EOL handling or attribute value normalization) can impact parsing speed and
- thus can be disabled. However for vast majority of XML documents there is no
- performance difference between different parsing options. Parsing options also
- control whether certain XML nodes are parsed; see <a class="xref" href="loading.html#manual.loading.options" title="Parsing options"> Parsing options</a> for
- more information.
- </p>
-<p>
- XML data is always converted to internal character format (see <a class="xref" href="dom.html#manual.dom.unicode" title="Unicode interface"> Unicode interface</a>)
- before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16
- (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally
- supported since it's a strict subset of UTF-16) and handles all encoding conversions
- automatically. Unless explicit encoding is specified, loading functions perform
- automatic encoding detection based on first few characters of XML data, so
- in almost all cases you do not have to specify document encoding. Encoding
- conversion is described in more detail in <a class="xref" href="loading.html#manual.loading.encoding" title="Encodings"> Encodings</a>.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.file"></a><a class="link" href="loading.html#manual.loading.file" title="Loading document from file"> Loading document from file</a>
-</h3></div></div></div>
-<a name="xml_document::load_file"></a><a name="xml_document::load_file_wide"></a><p>
- The most common source of XML data is files; pugixml provides dedicated functions
- for loading an XML document from file:
- </p>
-<pre class="programlisting"><span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load_file</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span>
-<span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load_file</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span>
-</pre>
-<p>
- These functions accept the file path as its first argument, and also two
- optional arguments, which specify parsing options (see <a class="xref" href="loading.html#manual.loading.options" title="Parsing options"> Parsing options</a>)
- and input data encoding (see <a class="xref" href="loading.html#manual.loading.encoding" title="Encodings"> Encodings</a>). The path has the target
- operating system format, so it can be a relative or absolute one, it should
- have the delimiters of the target system, it should have the exact case if
- the target file system is case-sensitive, etc.
- </p>
-<p>
- File path is passed to the system file opening function as is in case of
- the first function (which accepts <code class="computeroutput"><span class="keyword">const</span>
- <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span></code>); the second function either uses
- a special file opening function if it is provided by the runtime library
- or converts the path to UTF-8 and uses the system file opening function.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">load_file</span></code> destroys the existing
- document tree and then tries to load the new tree from the specified file.
- The result of the operation is returned in an <a class="link" href="loading.html#xml_parse_result">xml_parse_result</a>
- object; this object contains the operation status and the related information
- (i.e. last successfully parsed position in the input file, if parsing fails).
- See <a class="xref" href="loading.html#manual.loading.errors" title="Handling parsing errors"> Handling parsing errors</a> for error handling details.
- </p>
-<p>
- This is an example of loading XML document from file (<a href="../samples/load_file.cpp" target="_top">samples/load_file.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_file</span><span class="special">(</span><span class="string">"tree.xml"</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Load result: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">description</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">", mesh name: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"mesh"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.memory"></a><a class="link" href="loading.html#manual.loading.memory" title="Loading document from memory"> Loading document from memory</a>
-</h3></div></div></div>
-<a name="xml_document::load_buffer"></a><a name="xml_document::load_buffer_inplace"></a><a name="xml_document::load_buffer_inplace_own"></a><p>
- Sometimes XML data should be loaded from some other source than a file, i.e.
- HTTP URL; also you may want to load XML data from file using non-standard
- functions, i.e. to use your virtual file system facilities or to load XML
- from gzip-compressed files. All these scenarios require loading document
- from memory. First you should prepare a contiguous memory block with all
- XML data; then you have to invoke one of buffer loading functions. These
- functions will handle the necessary encoding conversions, if any, and then
- will parse the data into the corresponding XML tree. There are several buffer
- loading functions, which differ in the behavior and thus in performance/memory
- usage:
- </p>
-<pre class="programlisting"><span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load_buffer</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span>
-<span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load_buffer_inplace</span><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span>
-<span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load_buffer_inplace_own</span><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span>
-</pre>
-<p>
- All functions accept the buffer which is represented by a pointer to XML
- data, <code class="computeroutput"><span class="identifier">contents</span></code>, and data
- size in bytes. Also there are two optional arguments, which specify parsing
- options (see <a class="xref" href="loading.html#manual.loading.options" title="Parsing options"> Parsing options</a>) and input data encoding (see <a class="xref" href="loading.html#manual.loading.encoding" title="Encodings"> Encodings</a>).
- The buffer does not have to be zero-terminated.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">load_buffer</span></code> function works
- with immutable buffer - it does not ever modify the buffer. Because of this
- restriction it has to create a private buffer and copy XML data to it before
- parsing (applying encoding conversions if necessary). This copy operation
- carries a performance penalty, so inplace functions are provided - <code class="computeroutput"><span class="identifier">load_buffer_inplace</span></code> and <code class="computeroutput"><span class="identifier">load_buffer_inplace_own</span></code>
- store the document data in the buffer, modifying it in the process. In order
- for the document to stay valid, you have to make sure that the buffer's lifetime
- exceeds that of the tree if you're using inplace functions. In addition to
- that, <code class="computeroutput"><span class="identifier">load_buffer_inplace</span></code>
- does not assume ownership of the buffer, so you'll have to destroy it yourself;
- <code class="computeroutput"><span class="identifier">load_buffer_inplace_own</span></code> assumes
- ownership of the buffer and destroys it once it is not needed. This means
- that if you're using <code class="computeroutput"><span class="identifier">load_buffer_inplace_own</span></code>,
- you have to allocate memory with pugixml allocation function (you can get
- it via <a class="link" href="dom.html#get_memory_allocation_function">get_memory_allocation_function</a>).
- </p>
-<p>
- The best way from the performance/memory point of view is to load document
- using <code class="computeroutput"><span class="identifier">load_buffer_inplace_own</span></code>;
- this function has maximum control of the buffer with XML data so it is able
- to avoid redundant copies and reduce peak memory usage while parsing. This
- is the recommended function if you have to load the document from memory
- and performance is critical.
- </p>
-<a name="xml_document::load_string"></a><p>
- There is also a simple helper function for cases when you want to load the
- XML document from null-terminated character string:
- </p>
-<pre class="programlisting"><span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">contents</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">);</span>
-</pre>
-<p>
- It is equivalent to calling <code class="computeroutput"><span class="identifier">load_buffer</span></code>
- with <code class="computeroutput"><span class="identifier">size</span></code> being either <code class="computeroutput"><span class="identifier">strlen</span><span class="special">(</span><span class="identifier">contents</span><span class="special">)</span></code>
- or <code class="computeroutput"><span class="identifier">wcslen</span><span class="special">(</span><span class="identifier">contents</span><span class="special">)</span> <span class="special">*</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span></code>,
- depending on the character type. This function assumes native encoding for
- input data, so it does not do any encoding conversion. In general, this function
- is fine for loading small documents from string literals, but has more overhead
- and less functionality than the buffer loading functions.
- </p>
-<p>
- This is an example of loading XML document from memory using different functions
- (<a href="../samples/load_memory.cpp" target="_top">samples/load_memory.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span> <span class="identifier">source</span><span class="special">[]</span> <span class="special">=</span> <span class="string">"&lt;mesh name='sphere'&gt;&lt;bounds&gt;0 0 1 1&lt;/bounds&gt;&lt;/mesh&gt;"</span><span class="special">;</span>
-<span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">source</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// You can use load_buffer to load document from immutable memory block:
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_buffer</span><span class="special">(</span><span class="identifier">source</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document
-</span><span class="keyword">char</span><span class="special">*</span> <span class="identifier">buffer</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">char</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
-<span class="identifier">memcpy</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">source</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-
-<span class="comment">// The block can be allocated by any method; the block is modified during parsing
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_buffer_inplace</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-
-<span class="comment">// You have to destroy the block yourself after the document is no longer used
-</span><span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">buffer</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// You can use load_buffer_inplace_own to load document from mutable memory block and to pass the ownership of this block
-</span><span class="comment">// The block has to be allocated via pugixml allocation function - using i.e. operator new here is incorrect
-</span><span class="keyword">char</span><span class="special">*</span> <span class="identifier">buffer</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">*&gt;(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">get_memory_allocation_function</span><span class="special">()(</span><span class="identifier">size</span><span class="special">));</span>
-<span class="identifier">memcpy</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">source</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-
-<span class="comment">// The block will be deleted by the document
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_buffer_inplace_own</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// You can use load to load document from null-terminated strings, for example literals:
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="string">"&lt;mesh name='sphere'&gt;&lt;bounds&gt;0 0 1 1&lt;/bounds&gt;&lt;/mesh&gt;"</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.stream"></a><a class="link" href="loading.html#manual.loading.stream" title="Loading document from C++ IOstreams"> Loading document from C++ IOstreams</a>
-</h3></div></div></div>
-<a name="xml_document::load_stream"></a><p>
- To enhance interoperability, pugixml provides functions for loading document
- from any object which implements C++ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span></code>
- interface. This allows you to load documents from any standard C++ stream
- (i.e. file stream) or any third-party compliant implementation (i.e. Boost
- Iostreams). There are two functions, one works with narrow character streams,
- another handles wide character ones:
- </p>
-<pre class="programlisting"><span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">);</span>
-<span class="identifier">xml_parse_result</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wistream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">options</span> <span class="special">=</span> <span class="identifier">parse_default</span><span class="special">);</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">load</span></code> with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span></code>
- argument loads the document from stream from the current read position to
- the end, treating the stream contents as a byte stream of the specified encoding
- (with encoding autodetection as necessary). Thus calling <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load</span></code>
- on an opened <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ifstream</span></code> object is equivalent to calling
- <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load_file</span></code>.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">load</span></code> with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstream</span></code>
- argument treats the stream contents as a wide character stream (encoding
- is always <a class="link" href="loading.html#encoding_wchar">encoding_wchar</a>). Because
- of this, using <code class="computeroutput"><span class="identifier">load</span></code> with
- wide character streams requires careful (usually platform-specific) stream
- setup (i.e. using the <code class="computeroutput"><span class="identifier">imbue</span></code>
- function). Generally use of wide streams is discouraged, however it provides
- you the ability to load documents from non-Unicode encodings, i.e. you can
- load Shift-JIS encoded data if you set the correct locale.
- </p>
-<p>
- This is a simple example of loading XML document from file using streams
- (<a href="../samples/load_stream.cpp" target="_top">samples/load_stream.cpp</a>); read
- the sample code for more complex examples involving wide streams and locales:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ifstream</span> <span class="identifier">stream</span><span class="special">(</span><span class="string">"weekly-utf-8.xml"</span><span class="special">);</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">stream</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.errors"></a><a class="link" href="loading.html#manual.loading.errors" title="Handling parsing errors"> Handling parsing errors</a>
-</h3></div></div></div>
-<a name="xml_parse_result"></a><p>
- All document loading functions return the parsing result via <code class="computeroutput"><span class="identifier">xml_parse_result</span></code> object. It contains parsing
- status, the offset of last successfully parsed character from the beginning
- of the source stream, and the encoding of the source stream:
- </p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xml_parse_result</span>
-<span class="special">{</span>
- <span class="identifier">xml_parse_status</span> <span class="identifier">status</span><span class="special">;</span>
- <span class="identifier">ptrdiff_t</span> <span class="identifier">offset</span><span class="special">;</span>
- <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span><span class="special">;</span>
-
- <span class="keyword">operator</span> <span class="keyword">bool</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">description</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<a name="xml_parse_status"></a><a name="xml_parse_result::status"></a><p>
- Parsing status is represented as the <code class="computeroutput"><span class="identifier">xml_parse_status</span></code>
- enumeration and can be one of the following:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="status_ok"></a><code class="literal">status_ok</code> means that no error was encountered
- during parsing; the source stream represents the valid XML document which
- was fully parsed and converted to a tree. <br><br>
-
- </li>
-<li class="listitem">
- <a name="status_file_not_found"></a><code class="literal">status_file_not_found</code> is only
- returned by <code class="computeroutput"><span class="identifier">load_file</span></code>
- function and means that file could not be opened.
- </li>
-<li class="listitem">
- <a name="status_io_error"></a><code class="literal">status_io_error</code> is returned by <code class="computeroutput"><span class="identifier">load_file</span></code> function and by <code class="computeroutput"><span class="identifier">load</span></code> functions with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span></code>/<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstream</span></code> arguments; it means that some
- I/O error has occurred during reading the file/stream.
- </li>
-<li class="listitem">
- <a name="status_out_of_memory"></a><code class="literal">status_out_of_memory</code> means that
- there was not enough memory during some allocation; any allocation failure
- during parsing results in this error.
- </li>
-<li class="listitem">
- <a name="status_internal_error"></a><code class="literal">status_internal_error</code> means that
- something went horribly wrong; currently this error does not occur <br><br>
-
- </li>
-<li class="listitem">
- <a name="status_unrecognized_tag"></a><code class="literal">status_unrecognized_tag</code> means
- that parsing stopped due to a tag with either an empty name or a name
- which starts with incorrect character, such as <code class="literal">#</code>.
- </li>
-<li class="listitem">
- <a name="status_bad_pi"></a><code class="literal">status_bad_pi</code> means that parsing stopped
- due to incorrect document declaration/processing instruction
- </li>
-<li class="listitem">
- <a name="status_bad_comment"></a><code class="literal">status_bad_comment</code>, <a name="status_bad_cdata"></a><code class="literal">status_bad_cdata</code>,
- <a name="status_bad_doctype"></a><code class="literal">status_bad_doctype</code> and <a name="status_bad_pcdata"></a><code class="literal">status_bad_pcdata</code>
- mean that parsing stopped due to the invalid construct of the respective
- type
- </li>
-<li class="listitem">
- <a name="status_bad_start_element"></a><code class="literal">status_bad_start_element</code> means
- that parsing stopped because starting tag either had no closing <code class="computeroutput"><span class="special">&gt;</span></code> symbol or contained some incorrect
- symbol
- </li>
-<li class="listitem">
- <a name="status_bad_attribute"></a><code class="literal">status_bad_attribute</code> means that
- parsing stopped because there was an incorrect attribute, such as an
- attribute without value or with value that is not quoted (note that
- <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span>
- <span class="identifier">attr</span><span class="special">=</span><span class="number">1</span><span class="special">&gt;</span></code> is
- incorrect in XML)
- </li>
-<li class="listitem">
- <a name="status_bad_end_element"></a><code class="literal">status_bad_end_element</code> means
- that parsing stopped because ending tag had incorrect syntax (i.e. extra
- non-whitespace symbols between tag name and <code class="computeroutput"><span class="special">&gt;</span></code>)
- </li>
-<li class="listitem">
- <a name="status_end_element_mismatch"></a><code class="literal">status_end_element_mismatch</code>
- means that parsing stopped because the closing tag did not match the
- opening one (i.e. <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;&lt;/</span><span class="identifier">nedo</span><span class="special">&gt;</span></code>) or because some tag was not closed
- at all
- </li>
-</ul></div>
-<a name="xml_parse_result::description"></a><p>
- <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code>
- member function can be used to convert parsing status to a string; the returned
- message is always in English, so you'll have to write your own function if
- you need a localized string. However please note that the exact messages
- returned by <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code>
- function may change from version to version, so any complex status handling
- should be based on <code class="computeroutput"><span class="identifier">status</span></code>
- value. Note that <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code> returns a <code class="computeroutput"><span class="keyword">char</span></code>
- string even in <code class="computeroutput"><span class="identifier">PUGIXML_WCHAR_MODE</span></code>;
- you'll have to call <a class="link" href="dom.html#as_wide">as_wide</a> to get the <code class="computeroutput"><span class="keyword">wchar_t</span></code> string.
- </p>
-<p>
- If parsing failed because the source data was not a valid XML, the resulting
- tree is not destroyed - despite the fact that load function returns error,
- you can use the part of the tree that was successfully parsed. Obviously,
- the last element may have an unexpected name/value; for example, if the attribute
- value does not end with the necessary quotation mark, like in <code class="literal">&lt;node
- attr="value&gt;some data&lt;/node&gt;</code> example, the value of
- attribute <code class="computeroutput"><span class="identifier">attr</span></code> will contain
- the string <code class="computeroutput"><span class="identifier">value</span><span class="special">&gt;</span><span class="identifier">some</span> <span class="identifier">data</span><span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>.
- </p>
-<a name="xml_parse_result::offset"></a><p>
- In addition to the status code, parsing result has an <code class="computeroutput"><span class="identifier">offset</span></code>
- member, which contains the offset of last successfully parsed character if
- parsing failed because of an error in source data; otherwise <code class="computeroutput"><span class="identifier">offset</span></code> is 0. For parsing efficiency reasons,
- pugixml does not track the current line during parsing; this offset is in
- units of <a class="link" href="dom.html#char_t">pugi::char_t</a> (bytes for character
- mode, wide characters for wide character mode). Many text editors support
- 'Go To Position' feature - you can use it to locate the exact error position.
- Alternatively, if you're loading the document from memory, you can display
- the error chunk along with the error description (see the example code below).
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Offset is calculated in the XML buffer in native encoding; if encoding
- conversion is performed during parsing, offset can not be used to reliably
- track the error position.
- </p></td></tr>
-</table></div>
-<a name="xml_parse_result::encoding"></a><p>
- Parsing result also has an <code class="computeroutput"><span class="identifier">encoding</span></code>
- member, which can be used to check that the source data encoding was correctly
- guessed. It is equal to the exact encoding used during parsing (i.e. with
- the exact endianness); see <a class="xref" href="loading.html#manual.loading.encoding" title="Encodings"> Encodings</a> for more information.
- </p>
-<a name="xml_parse_result::bool"></a><p>
- Parsing result object can be implicitly converted to <code class="computeroutput"><span class="keyword">bool</span></code>;
- if you do not want to handle parsing errors thoroughly, you can just check
- the return value of load functions as if it was a <code class="computeroutput"><span class="keyword">bool</span></code>:
- <code class="computeroutput"><span class="keyword">if</span> <span class="special">(</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_file</span><span class="special">(</span><span class="string">"file.xml"</span><span class="special">))</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span> <span class="keyword">else</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span></code>.
- </p>
-<p>
- This is an example of handling loading errors (<a href="../samples/load_error_handling.cpp" target="_top">samples/load_error_handling.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">source</span><span class="special">);</span>
-
-<span class="keyword">if</span> <span class="special">(</span><span class="identifier">result</span><span class="special">)</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"XML ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">source</span> <span class="special">&lt;&lt;</span> <span class="string">"] parsed without errors, attr value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"attr"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n\n"</span><span class="special">;</span>
-<span class="keyword">else</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"XML ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">source</span> <span class="special">&lt;&lt;</span> <span class="string">"] parsed with errors, attr value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"attr"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error description: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">description</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error offset: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">offset</span> <span class="special">&lt;&lt;</span> <span class="string">" (error at [..."</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">source</span> <span class="special">+</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">offset</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n\n"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.options"></a><a class="link" href="loading.html#manual.loading.options" title="Parsing options"> Parsing options</a>
-</h3></div></div></div>
-<p>
- All document loading functions accept the optional parameter <code class="computeroutput"><span class="identifier">options</span></code>. This is a bitmask that customizes
- the parsing process: you can select the node types that are parsed and various
- transformations that are performed with the XML text. Disabling certain transformations
- can improve parsing performance for some documents; however, the code for
- all transformations is very well optimized, and thus the majority of documents
- won't get any performance benefit. As a rule of thumb, only modify parsing
- flags if you want to get some nodes in the document that are excluded by
- default (i.e. declaration or comment nodes).
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- You should use the usual bitwise arithmetics to manipulate the bitmask:
- to enable a flag, use <code class="computeroutput"><span class="identifier">mask</span> <span class="special">|</span> <span class="identifier">flag</span></code>;
- to disable a flag, use <code class="computeroutput"><span class="identifier">mask</span> <span class="special">&amp;</span> <span class="special">~</span><span class="identifier">flag</span></code>.
- </p></td></tr>
-</table></div>
-<p>
- These flags control the resulting tree contents:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="parse_declaration"></a><code class="literal">parse_declaration</code> determines if XML
- document declaration (node with type <a class="link" href="dom.html#node_declaration">node_declaration</a>)
- is to be put in DOM tree. If this flag is off, it is not put in the tree,
- but is still parsed and checked for correctness. This flag is <span class="bold"><strong>off</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_doctype"></a><code class="literal">parse_doctype</code> determines if XML document
- type declaration (node with type <a class="link" href="dom.html#node_doctype">node_doctype</a>)
- is to be put in DOM tree. If this flag is off, it is not put in the tree,
- but is still parsed and checked for correctness. This flag is <span class="bold"><strong>off</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_pi"></a><code class="literal">parse_pi</code> determines if processing instructions
- (nodes with type <a class="link" href="dom.html#node_pi">node_pi</a>) are to be put
- in DOM tree. If this flag is off, they are not put in the tree, but are
- still parsed and checked for correctness. Note that <code class="computeroutput"><span class="special">&lt;?</span><span class="identifier">xml</span> <span class="special">...?&gt;</span></code>
- (document declaration) is not considered to be a PI. This flag is <span class="bold"><strong>off</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_comments"></a><code class="literal">parse_comments</code> determines if comments
- (nodes with type <a class="link" href="dom.html#node_comment">node_comment</a>) are
- to be put in DOM tree. If this flag is off, they are not put in the tree,
- but are still parsed and checked for correctness. This flag is <span class="bold"><strong>off</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_cdata"></a><code class="literal">parse_cdata</code> determines if CDATA sections
- (nodes with type <a class="link" href="dom.html#node_cdata">node_cdata</a>) are to
- be put in DOM tree. If this flag is off, they are not put in the tree,
- but are still parsed and checked for correctness. This flag is <span class="bold"><strong>on</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_ws_pcdata"></a><code class="literal">parse_ws_pcdata</code> determines if PCDATA
- nodes (nodes with type <a class="link" href="dom.html#node_pcdata">node_pcdata</a>)
- that consist only of whitespace characters are to be put in DOM tree.
- Often whitespace-only data is not significant for the application, and
- the cost of allocating and storing such nodes (both memory and speed-wise)
- can be significant. For example, after parsing XML string <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span> <span class="special">&lt;</span><span class="identifier">a</span><span class="special">/&gt;</span> <span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>, <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span></code>
- element will have three children when <code class="computeroutput"><span class="identifier">parse_ws_pcdata</span></code>
- is set (child with type <a class="link" href="dom.html#node_pcdata">node_pcdata</a>
- and value <code class="computeroutput"><span class="string">" "</span></code>,
- child with type <a class="link" href="dom.html#node_element">node_element</a> and
- name <code class="computeroutput"><span class="string">"a"</span></code>, and another
- child with type <a class="link" href="dom.html#node_pcdata">node_pcdata</a> and value
- <code class="computeroutput"><span class="string">" "</span></code>), and only
- one child when <code class="computeroutput"><span class="identifier">parse_ws_pcdata</span></code>
- is not set. This flag is <span class="bold"><strong>off</strong></span> by default.
- <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_ws_pcdata_single"></a><code class="literal">parse_ws_pcdata_single</code> determines
- if whitespace-only PCDATA nodes that have no sibling nodes are to be
- put in DOM tree. In some cases application needs to parse the whitespace-only
- contents of nodes, i.e. <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span>
- <span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>, but is not interested in whitespace
- markup elsewhere. It is possible to use <a class="link" href="loading.html#parse_ws_pcdata">parse_ws_pcdata</a>
- flag in this case, but it results in excessive allocations and complicates
- document processing in some cases; this flag is intended to avoid that.
- As an example, after parsing XML string <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span>
- <span class="special">&lt;</span><span class="identifier">a</span><span class="special">&gt;</span> <span class="special">&lt;/</span><span class="identifier">a</span><span class="special">&gt;</span> <span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code> with <code class="computeroutput"><span class="identifier">parse_ws_pcdata_single</span></code>
- flag set, <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span></code> element will have one child <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">&gt;</span></code>, and <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">a</span><span class="special">&gt;</span></code>
- element will have one child with type <a class="link" href="dom.html#node_pcdata">node_pcdata</a>
- and value <code class="computeroutput"><span class="string">" "</span></code>.
- This flag has no effect if <a class="link" href="loading.html#parse_ws_pcdata">parse_ws_pcdata</a>
- is enabled. This flag is <span class="bold"><strong>off</strong></span> by default.
- </li>
-</ul></div>
-<p>
- These flags control the transformation of tree element contents:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="parse_escapes"></a><code class="literal">parse_escapes</code> determines if character
- and entity references are to be expanded during the parsing process.
- Character references have the form <code class="literal">&amp;#...;</code> or
- <code class="literal">&amp;#x...;</code> (<code class="literal">...</code> is Unicode numeric
- representation of character in either decimal (<code class="literal">&amp;#...;</code>)
- or hexadecimal (<code class="literal">&amp;#x...;</code>) form), entity references
- are <code class="literal">&amp;lt;</code>, <code class="literal">&amp;gt;</code>, <code class="literal">&amp;amp;</code>,
- <code class="literal">&amp;apos;</code> and <code class="literal">&amp;quot;</code> (note
- that as pugixml does not handle DTD, the only allowed entities are predefined
- ones). If character/entity reference can not be expanded, it is left
- as is, so you can do additional processing later. Reference expansion
- is performed on attribute values and PCDATA content. This flag is <span class="bold"><strong>on</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_eol"></a><code class="literal">parse_eol</code> determines if EOL handling (that
- is, replacing sequences <code class="computeroutput"><span class="number">0x0d</span> <span class="number">0x0a</span></code> by a single <code class="computeroutput"><span class="number">0x0a</span></code>
- character, and replacing all standalone <code class="computeroutput"><span class="number">0x0d</span></code>
- characters by <code class="computeroutput"><span class="number">0x0a</span></code>) is to
- be performed on input data (that is, comments contents, PCDATA/CDATA
- contents and attribute values). This flag is <span class="bold"><strong>on</strong></span>
- by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_wconv_attribute"></a><code class="literal">parse_wconv_attribute</code> determines
- if attribute value normalization should be performed for all attributes.
- This means, that whitespace characters (new line, tab and space) are
- replaced with space (<code class="computeroutput"><span class="char">' '</span></code>).
- New line characters are always treated as if <a class="link" href="loading.html#parse_eol">parse_eol</a>
- is set, i.e. <code class="computeroutput"><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">n</span></code>
- is converted to a single space. This flag is <span class="bold"><strong>on</strong></span>
- by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_wnorm_attribute"></a><code class="literal">parse_wnorm_attribute</code> determines
- if extended attribute value normalization should be performed for all
- attributes. This means, that after attribute values are normalized as
- if <a class="link" href="loading.html#parse_wconv_attribute">parse_wconv_attribute</a>
- was set, leading and trailing space characters are removed, and all sequences
- of space characters are replaced by a single space character. <a class="link" href="loading.html#parse_wconv_attribute">parse_wconv_attribute</a>
- has no effect if this flag is on. This flag is <span class="bold"><strong>off</strong></span>
- by default.
- </li>
-</ul></div>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- <code class="computeroutput"><span class="identifier">parse_wconv_attribute</span></code> option
- performs transformations that are required by W3C specification for attributes
- that are declared as <code class="literal">CDATA</code>; <a class="link" href="loading.html#parse_wnorm_attribute">parse_wnorm_attribute</a>
- performs transformations required for <code class="literal">NMTOKENS</code> attributes.
- In the absence of document type declaration all attributes should behave
- as if they are declared as <code class="literal">CDATA</code>, thus <a class="link" href="loading.html#parse_wconv_attribute">parse_wconv_attribute</a>
- is the default option.
- </p></td></tr>
-</table></div>
-<p>
- Additionally there are three predefined option masks:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="parse_minimal"></a><code class="literal">parse_minimal</code> has all options turned
- off. This option mask means that pugixml does not add declaration nodes,
- document type declaration nodes, PI nodes, CDATA sections and comments
- to the resulting tree and does not perform any conversion for input data,
- so theoretically it is the fastest mode. However, as mentioned above,
- in practice <a class="link" href="loading.html#parse_default">parse_default</a> is usually
- equally fast. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_default"></a><code class="literal">parse_default</code> is the default set of flags,
- i.e. it has all options set to their default values. It includes parsing
- CDATA sections (comments/PIs are not parsed), performing character and
- entity reference expansion, replacing whitespace characters with spaces
- in attribute values and performing EOL handling. Note, that PCDATA sections
- consisting only of whitespace characters are not parsed (by default)
- for performance reasons. <br><br>
-
- </li>
-<li class="listitem">
- <a name="parse_full"></a><code class="literal">parse_full</code> is the set of flags which adds
- nodes of all types to the resulting tree and performs default conversions
- for input data. It includes parsing CDATA sections, comments, PI nodes,
- document declaration node and document type declaration node, performing
- character and entity reference expansion, replacing whitespace characters
- with spaces in attribute values and performing EOL handling. Note, that
- PCDATA sections consisting only of whitespace characters are not parsed
- in this mode.
- </li>
-</ul></div>
-<p>
- This is an example of using different parsing options (<a href="../samples/load_options.cpp" target="_top">samples/load_options.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">source</span> <span class="special">=</span> <span class="string">"&lt;!--comment--&gt;&lt;node&gt;&amp;lt;&lt;/node&gt;"</span><span class="special">;</span>
-
-<span class="comment">// Parsing with default options; note that comment node is not added to the tree, and entity reference &amp;lt; is expanded
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">source</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"First node value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"], node child value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"node"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n"</span><span class="special">;</span>
-
-<span class="comment">// Parsing with additional parse_comments option; comment node is now added to the tree
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">source</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_default</span> <span class="special">|</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_comments</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"First node value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"], node child value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"node"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n"</span><span class="special">;</span>
-
-<span class="comment">// Parsing with additional parse_comments option and without the (default) parse_escapes option; &amp;lt; is not expanded
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">source</span><span class="special">,</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_default</span> <span class="special">|</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_comments</span><span class="special">)</span> <span class="special">&amp;</span> <span class="special">~</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_escapes</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"First node value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"], node child value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"node"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n"</span><span class="special">;</span>
-
-<span class="comment">// Parsing with minimal option mask; comment node is not added to the tree, and &amp;lt; is not expanded
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">source</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_minimal</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"First node value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"], node child value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"node"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n"</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.encoding"></a><a class="link" href="loading.html#manual.loading.encoding" title="Encodings"> Encodings</a>
-</h3></div></div></div>
-<a name="xml_encoding"></a><p>
- pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little
- endian), UTF-32 (big and little endian); UCS-2 is naturally supported since
- it's a strict subset of UTF-16) and handles all encoding conversions. Most
- loading functions accept the optional parameter <code class="computeroutput"><span class="identifier">encoding</span></code>.
- This is a value of enumeration type <code class="computeroutput"><span class="identifier">xml_encoding</span></code>,
- that can have the following values:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="encoding_auto"></a><code class="literal">encoding_auto</code> means that pugixml will
- try to guess the encoding based on source XML data. The algorithm is
- a modified version of the one presented in Appendix F.1 of XML recommendation;
- it tries to match the first few bytes of input data with the following
- patterns in strict order: <br><br>
- <div class="itemizedlist"><ul class="itemizedlist" type="circle">
-<li class="listitem">
- If first four bytes match UTF-32 BOM (Byte Order Mark), encoding
- is assumed to be UTF-32 with the endianness equal to that of BOM;
- </li>
-<li class="listitem">
- If first two bytes match UTF-16 BOM, encoding is assumed to be
- UTF-16 with the endianness equal to that of BOM;
- </li>
-<li class="listitem">
- If first three bytes match UTF-8 BOM, encoding is assumed to be
- UTF-8;
- </li>
-<li class="listitem">
- If first four bytes match UTF-32 representation of <code class="literal">&lt;</code>,
- encoding is assumed to be UTF-32 with the corresponding endianness;
- </li>
-<li class="listitem">
- If first four bytes match UTF-16 representation of <code class="literal">&lt;?</code>,
- encoding is assumed to be UTF-16 with the corresponding endianness;
- </li>
-<li class="listitem">
- If first two bytes match UTF-16 representation of <code class="literal">&lt;</code>,
- encoding is assumed to be UTF-16 with the corresponding endianness
- (this guess may yield incorrect result, but it's better than UTF-8);
- </li>
-<li class="listitem">
- Otherwise encoding is assumed to be UTF-8. <br><br>
-
- </li>
-</ul></div>
- </li>
-<li class="listitem">
- <a name="encoding_utf8"></a><code class="literal">encoding_utf8</code> corresponds to UTF-8 encoding
- as defined in the Unicode standard; UTF-8 sequences with length equal
- to 5 or 6 are not standard and are rejected.
- </li>
-<li class="listitem">
- <a name="encoding_utf16_le"></a><code class="literal">encoding_utf16_le</code> corresponds to
- little-endian UTF-16 encoding as defined in the Unicode standard; surrogate
- pairs are supported.
- </li>
-<li class="listitem">
- <a name="encoding_utf16_be"></a><code class="literal">encoding_utf16_be</code> corresponds to
- big-endian UTF-16 encoding as defined in the Unicode standard; surrogate
- pairs are supported.
- </li>
-<li class="listitem">
- <a name="encoding_utf16"></a><code class="literal">encoding_utf16</code> corresponds to UTF-16
- encoding as defined in the Unicode standard; the endianness is assumed
- to be that of the target platform.
- </li>
-<li class="listitem">
- <a name="encoding_utf32_le"></a><code class="literal">encoding_utf32_le</code> corresponds to
- little-endian UTF-32 encoding as defined in the Unicode standard.
- </li>
-<li class="listitem">
- <a name="encoding_utf32_be"></a><code class="literal">encoding_utf32_be</code> corresponds to
- big-endian UTF-32 encoding as defined in the Unicode standard.
- </li>
-<li class="listitem">
- <a name="encoding_utf32"></a><code class="literal">encoding_utf32</code> corresponds to UTF-32
- encoding as defined in the Unicode standard; the endianness is assumed
- to be that of the target platform.
- </li>
-<li class="listitem">
- <a name="encoding_wchar"></a><code class="literal">encoding_wchar</code> corresponds to the encoding
- of <code class="computeroutput"><span class="keyword">wchar_t</span></code> type; it has
- the same meaning as either <code class="computeroutput"><span class="identifier">encoding_utf16</span></code>
- or <code class="computeroutput"><span class="identifier">encoding_utf32</span></code>, depending
- on <code class="computeroutput"><span class="keyword">wchar_t</span></code> size.
- </li>
-<li class="listitem">
- <a name="encoding_latin1"></a><code class="literal">encoding_latin1</code> corresponds to ISO-8859-1
- encoding (also known as Latin-1).
- </li>
-</ul></div>
-<p>
- The algorithm used for <code class="computeroutput"><span class="identifier">encoding_auto</span></code>
- correctly detects any supported Unicode encoding for all well-formed XML
- documents (since they start with document declaration) and for all other
- XML documents that start with <code class="literal">&lt;</code>; if your XML document
- does not start with <code class="literal">&lt;</code> and has encoding that is different
- from UTF-8, use the specific encoding.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- The current behavior for Unicode conversion is to skip all invalid UTF
- sequences during conversion. This behavior should not be relied upon; moreover,
- in case no encoding conversion is performed, the invalid sequences are
- not removed, so you'll get them as is in node/attribute contents.
- </p></td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.loading.w3c"></a><a class="link" href="loading.html#manual.loading.w3c" title="Conformance to W3C specification"> Conformance to W3C specification</a>
-</h3></div></div></div>
-<p>
- pugixml is not fully W3C conformant - it can load any valid XML document,
- but does not perform some well-formedness checks. While considerable effort
- is made to reject invalid XML documents, some validation is not performed
- because of performance reasons.
- </p>
-<p>
- There is only one non-conformant behavior when dealing with valid XML documents:
- pugixml does not use information supplied in document type declaration for
- parsing. This means that entities declared in DOCTYPE are not expanded, and
- all attribute/PCDATA values are always processed in a uniform way that depends
- only on parsing options.
- </p>
-<p>
- As for rejecting invalid XML documents, there are a number of incompatibilities
- with W3C specification, including:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Multiple attributes of the same node can have equal names.
- </li>
-<li class="listitem">
- All non-ASCII characters are treated in the same way as symbols of English
- alphabet, so some invalid tag names are not rejected.
- </li>
-<li class="listitem">
- Attribute values which contain <code class="literal">&lt;</code> are not rejected.
- </li>
-<li class="listitem">
- Invalid entity/character references are not rejected and are instead
- left as is.
- </li>
-<li class="listitem">
- Comment values can contain <code class="literal">--</code>.
- </li>
-<li class="listitem">
- XML data is not required to begin with document declaration; additionally,
- document declaration can appear after comments and other nodes.
- </li>
-<li class="listitem">
- Invalid document type declarations are silently ignored in some cases.
- </li>
-</ul></div>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <b>Loading</b> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="dom.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="access.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/modify.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/modify.html
deleted file mode 100644
index f2f778520..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/modify.html
+++ /dev/null
@@ -1,632 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Modifying document data</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="access.html" title="Accessing document data">
-<link rel="next" href="saving.html" title="Saving document">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <b>Modifying</b> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="access.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="saving.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.modify"></a><a class="link" href="modify.html" title="Modifying document data"> Modifying document data</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="modify.html#manual.modify.nodedata"> Setting node data</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.attrdata"> Setting attribute data</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.add"> Adding nodes/attributes</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.remove"> Removing nodes/attributes</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.text"> Working with text contents</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.clone"> Cloning nodes/attributes</a></span></dt>
-</dl></div>
-<p>
- The document in pugixml is fully mutable: you can completely change the document
- structure and modify the data of nodes/attributes. This section provides documentation
- for the relevant functions. All functions take care of memory management and
- structural integrity themselves, so they always result in structurally valid
- tree - however, it is possible to create an invalid XML tree (for example,
- by adding two attributes with the same name or by setting attribute/node name
- to empty/invalid string). Tree modification is optimized for performance and
- for memory consumption, so if you have enough memory you can create documents
- from scratch with pugixml and later save them to file/stream instead of relying
- on error-prone manual text writing and without too much overhead.
- </p>
-<p>
- All member functions that change node/attribute data or structure are non-constant
- and thus can not be called on constant handles. However, you can easily convert
- constant handle to non-constant one by simple assignment: <code class="computeroutput"><span class="keyword">void</span>
- <span class="identifier">foo</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span>
- <span class="special">{</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">nc</span> <span class="special">=</span> <span class="identifier">n</span><span class="special">;</span> <span class="special">}</span></code>, so const-correctness
- here mainly provides additional documentation.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.modify.nodedata"></a><a class="link" href="modify.html#manual.modify.nodedata" title="Setting node data"> Setting node data</a>
-</h3></div></div></div>
-<a name="xml_node::set_name"></a><a name="xml_node::set_value"></a><p>
- As discussed before, nodes can have name and value, both of which are strings.
- Depending on node type, name or value may be absent. <a class="link" href="dom.html#node_document">node_document</a>
- nodes do not have a name or value, <a class="link" href="dom.html#node_element">node_element</a>
- and <a class="link" href="dom.html#node_declaration">node_declaration</a> nodes always
- have a name but never have a value, <a class="link" href="dom.html#node_pcdata">node_pcdata</a>,
- <a class="link" href="dom.html#node_cdata">node_cdata</a>, <a class="link" href="dom.html#node_comment">node_comment</a>
- and <a class="link" href="dom.html#node_doctype">node_doctype</a> nodes never have a name
- but always have a value (it may be empty though), <a class="link" href="dom.html#node_pi">node_pi</a>
- nodes always have a name and a value (again, value may be empty). In order
- to set node's name or value, you can use the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">set_name</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">set_value</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- Both functions try to set the name/value to the specified string, and return
- the operation result. The operation fails if the node can not have name or
- value (for instance, when trying to call <code class="computeroutput"><span class="identifier">set_name</span></code>
- on a <a class="link" href="dom.html#node_pcdata">node_pcdata</a> node), if the node handle
- is null, or if there is insufficient memory to handle the request. The provided
- string is copied into document managed memory and can be destroyed after
- the function returns (for example, you can safely pass stack-allocated buffers
- to these functions). The name/value content is not verified, so take care
- to use only valid XML names, or the document may become malformed.
- </p>
-<p>
- There is no equivalent of <a class="link" href="access.html#xml_node::child_value">child_value</a>
- function for modifying text children of the node.
- </p>
-<p>
- This is an example of setting node name and value (<a href="../samples/modify_base.cpp" target="_top">samples/modify_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">);</span>
-
-<span class="comment">// change node name
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="string">"notnode"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", new node name: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// change comment text
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"useless comment"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", new comment text: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// we can't change value of the element or name of the comment
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"1"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">", "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">set_name</span><span class="special">(</span><span class="string">"2"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.modify.attrdata"></a><a class="link" href="modify.html#manual.modify.attrdata" title="Setting attribute data"> Setting attribute data</a>
-</h3></div></div></div>
-<a name="xml_attribute::set_name"></a><a name="xml_attribute::set_value"></a><p>
- All attributes have name and value, both of which are strings (value may
- be empty). You can set them with the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">set_name</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">set_value</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- Both functions try to set the name/value to the specified string, and return
- the operation result. The operation fails if the attribute handle is null,
- or if there is insufficient memory to handle the request. The provided string
- is copied into document managed memory and can be destroyed after the function
- returns (for example, you can safely pass stack-allocated buffers to these
- functions). The name/value content is not verified, so take care to use only
- valid XML names, or the document may become malformed.
- </p>
-<p>
- In addition to string functions, several functions are provided for handling
- attributes with numbers and booleans as values:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">set_value</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">set_value</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">set_value</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="identifier">set_value</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- The above functions convert the argument to string and then call the base
- <code class="computeroutput"><span class="identifier">set_value</span></code> function. Integers
- are converted to a decimal form, floating-point numbers are converted to
- either decimal or scientific form, depending on the number magnitude, boolean
- values are converted to either <code class="computeroutput"><span class="string">"true"</span></code>
- or <code class="computeroutput"><span class="string">"false"</span></code>.
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Number conversion functions depend on current C locale as set with <code class="computeroutput"><span class="identifier">setlocale</span></code>, so may generate unexpected
- results if the locale is different from <code class="computeroutput"><span class="string">"C"</span></code>.
- </p></td></tr>
-</table></div>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- There are no portable 64-bit types in C++, so there is no corresponding
- <code class="computeroutput"><span class="identifier">set_value</span></code> function. If
- your platform has a 64-bit integer, you can easily write such a function
- yourself.
- </p></td></tr>
-</table></div>
-<a name="xml_attribute::assign"></a><p>
- For convenience, all <code class="computeroutput"><span class="identifier">set_value</span></code>
- functions have the corresponding assignment operators:
- </p>
-<pre class="programlisting"><span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">double</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">xml_attribute</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- These operators simply call the right <code class="computeroutput"><span class="identifier">set_value</span></code>
- function and return the attribute they're called on; the return value of
- <code class="computeroutput"><span class="identifier">set_value</span></code> is ignored, so
- errors are ignored.
- </p>
-<p>
- This is an example of setting attribute name and value (<a href="../samples/modify_base.cpp" target="_top">samples/modify_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">attr</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"id"</span><span class="special">);</span>
-
-<span class="comment">// change attribute name/value
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="string">"key"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">", "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"345"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", new attribute: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// we can use numbers or booleans
-</span><span class="identifier">attr</span><span class="special">.</span><span class="identifier">set_value</span><span class="special">(</span><span class="number">1.234</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"new attribute value: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// we can also use assignment operators for more concise code
-</span><span class="identifier">attr</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"final attribute value: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.modify.add"></a><a class="link" href="modify.html#manual.modify.add" title="Adding nodes/attributes"> Adding nodes/attributes</a>
-</h3></div></div></div>
-<a name="xml_node::prepend_attribute"></a><a name="xml_node::append_attribute"></a><a name="xml_node::insert_attribute_after"></a><a name="xml_node::insert_attribute_before"></a><a name="xml_node::prepend_child"></a><a name="xml_node::append_child"></a><a name="xml_node::insert_child_after"></a><a name="xml_node::insert_child_before"></a><p>
- Nodes and attributes do not exist without a document tree, so you can't create
- them without adding them to some document. A node or attribute can be created
- at the end of node/attribute list or before/after some other node:
- </p>
-<pre class="programlisting"><span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">prepend_attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_attribute_after</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_attribute_before</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span>
-
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">append_child</span><span class="special">(</span><span class="identifier">xml_node_type</span> <span class="identifier">type</span> <span class="special">=</span> <span class="identifier">node_element</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">prepend_child</span><span class="special">(</span><span class="identifier">xml_node_type</span> <span class="identifier">type</span> <span class="special">=</span> <span class="identifier">node_element</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_child_after</span><span class="special">(</span><span class="identifier">xml_node_type</span> <span class="identifier">type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_child_before</span><span class="special">(</span><span class="identifier">xml_node_type</span> <span class="identifier">type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">append_child</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">prepend_child</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_child_after</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_child_before</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">append_attribute</span></code> and <code class="computeroutput"><span class="identifier">append_child</span></code> create a new node/attribute
- at the end of the corresponding list of the node the method is called on;
- <code class="computeroutput"><span class="identifier">prepend_attribute</span></code> and <code class="computeroutput"><span class="identifier">prepend_child</span></code> create a new node/attribute
- at the beginning of the list; <code class="computeroutput"><span class="identifier">insert_attribute_after</span></code>,
- <code class="computeroutput"><span class="identifier">insert_attribute_before</span></code>,
- <code class="computeroutput"><span class="identifier">insert_child_after</span></code> and <code class="computeroutput"><span class="identifier">insert_attribute_before</span></code> add the node/attribute
- before or after the specified node/attribute.
- </p>
-<p>
- Attribute functions create an attribute with the specified name; you can
- specify the empty name and change the name later if you want to. Node functions
- with the <code class="computeroutput"><span class="identifier">type</span></code> argument create
- the node with the specified type; since node type can't be changed, you have
- to know the desired type beforehand. Also note that not all types can be
- added as children; see below for clarification. Node functions with the
- <code class="computeroutput"><span class="identifier">name</span></code> argument create the
- element node (<a class="link" href="dom.html#node_element">node_element</a>) with the
- specified name.
- </p>
-<p>
- All functions return the handle to the created object on success, and null
- handle on failure. There are several reasons for failure:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Adding fails if the target node is null;
- </li>
-<li class="listitem">
- Only <a class="link" href="dom.html#node_element">node_element</a> nodes can contain
- attributes, so attribute adding fails if node is not an element;
- </li>
-<li class="listitem">
- Only <a class="link" href="dom.html#node_document">node_document</a> and <a class="link" href="dom.html#node_element">node_element</a>
- nodes can contain children, so child node adding fails if the target
- node is not an element or a document;
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_document">node_document</a> and <a class="link" href="dom.html#node_null">node_null</a>
- nodes can not be inserted as children, so passing <a class="link" href="dom.html#node_document">node_document</a>
- or <a class="link" href="dom.html#node_null">node_null</a> value as <code class="computeroutput"><span class="identifier">type</span></code> results in operation failure;
- </li>
-<li class="listitem">
- <a class="link" href="dom.html#node_declaration">node_declaration</a> nodes can only
- be added as children of the document node; attempt to insert declaration
- node as a child of an element node fails;
- </li>
-<li class="listitem">
- Adding node/attribute results in memory allocation, which may fail;
- </li>
-<li class="listitem">
- Insertion functions fail if the specified node or attribute is null or
- is not in the target node's children/attribute list.
- </li>
-</ul></div>
-<p>
- Even if the operation fails, the document remains in consistent state, but
- the requested node/attribute is not added.
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- attribute() and child() functions do not add attributes or nodes to the
- tree, so code like <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"id"</span><span class="special">)</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span></code> will not do anything if <code class="computeroutput"><span class="identifier">node</span></code> does not have an attribute with
- name <code class="computeroutput"><span class="string">"id"</span></code>. Make sure
- you're operating with existing attributes/nodes by adding them if necessary.
- </p></td></tr>
-</table></div>
-<p>
- This is an example of adding new attributes/nodes to the document (<a href="../samples/modify_add.cpp" target="_top">samples/modify_add.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// add node with some name
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="string">"node"</span><span class="special">);</span>
-
-<span class="comment">// add description node with text child
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">descr</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="string">"description"</span><span class="special">);</span>
-<span class="identifier">descr</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">node_pcdata</span><span class="special">).</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"Simple node"</span><span class="special">);</span>
-
-<span class="comment">// add param node before the description
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">param</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">insert_child_before</span><span class="special">(</span><span class="string">"param"</span><span class="special">,</span> <span class="identifier">descr</span><span class="special">);</span>
-
-<span class="comment">// add attributes to param node
-</span><span class="identifier">param</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">)</span> <span class="special">=</span> <span class="string">"version"</span><span class="special">;</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"value"</span><span class="special">)</span> <span class="special">=</span> <span class="number">1.1</span><span class="special">;</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">insert_attribute_after</span><span class="special">(</span><span class="string">"type"</span><span class="special">,</span> <span class="identifier">param</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">))</span> <span class="special">=</span> <span class="string">"float"</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.modify.remove"></a><a class="link" href="modify.html#manual.modify.remove" title="Removing nodes/attributes"> Removing nodes/attributes</a>
-</h3></div></div></div>
-<a name="xml_node::remove_attribute"></a><a name="xml_node::remove_child"></a><p>
- If you do not want your document to contain some node or attribute, you can
- remove it with one of the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">remove_attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">a</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">remove_child</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">);</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">remove_attribute</span></code> removes
- the attribute from the attribute list of the node, and returns the operation
- result. <code class="computeroutput"><span class="identifier">remove_child</span></code> removes
- the child node with the entire subtree (including all descendant nodes and
- attributes) from the document, and returns the operation result. Removing
- fails if one of the following is true:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- The node the function is called on is null;
- </li>
-<li class="listitem">
- The attribute/node to be removed is null;
- </li>
-<li class="listitem">
- The attribute/node to be removed is not in the node's attribute/child
- list.
- </li>
-</ul></div>
-<p>
- Removing the attribute or node invalidates all handles to the same underlying
- object, and also invalidates all iterators pointing to the same object. Removing
- node also invalidates all past-the-end iterators to its attribute or child
- node list. Be careful to ensure that all such handles and iterators either
- do not exist or are not used after the attribute/node is removed.
- </p>
-<p>
- If you want to remove the attribute or child node by its name, two additional
- helper functions are available:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">remove_attribute</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">remove_child</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-</pre>
-<p>
- These functions look for the first attribute or child with the specified
- name, and then remove it, returning the result. If there is no attribute
- or child with such name, the function returns <code class="computeroutput"><span class="keyword">false</span></code>;
- if there are two nodes with the given name, only the first node is deleted.
- If you want to delete all nodes with the specified name, you can use code
- like this: <code class="computeroutput"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">node</span><span class="special">.</span><span class="identifier">remove_child</span><span class="special">(</span><span class="string">"tool"</span><span class="special">))</span> <span class="special">;</span></code>.
- </p>
-<p>
- This is an example of removing attributes/nodes from the document (<a href="../samples/modify_remove.cpp" target="_top">samples/modify_remove.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// remove description node with the whole subtree
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">);</span>
-<span class="identifier">node</span><span class="special">.</span><span class="identifier">remove_child</span><span class="special">(</span><span class="string">"description"</span><span class="special">);</span>
-
-<span class="comment">// remove id attribute
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">param</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"param"</span><span class="special">);</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">remove_attribute</span><span class="special">(</span><span class="string">"value"</span><span class="special">);</span>
-
-<span class="comment">// we can also remove nodes/attributes by handles
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">id</span> <span class="special">=</span> <span class="identifier">param</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">);</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">remove_attribute</span><span class="special">(</span><span class="identifier">id</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.modify.text"></a><a class="link" href="modify.html#manual.modify.text" title="Working with text contents"> Working with text contents</a>
-</h3></div></div></div>
-<p>
- pugixml provides a special class, <code class="computeroutput"><span class="identifier">xml_text</span></code>,
- to work with text contents stored as a value of some node, i.e. <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;&lt;</span><span class="identifier">description</span><span class="special">&gt;</span><span class="identifier">This</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">node</span><span class="special">&lt;/</span><span class="identifier">description</span><span class="special">&gt;&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>.
- Working with text objects to retrieve data is described in <a class="link" href="access.html#manual.access.text" title="Working with text contents">the
- documentation for accessing document data</a>; this section describes
- the modification interface of <code class="computeroutput"><span class="identifier">xml_text</span></code>.
- </p>
-<a name="xml_text::set"></a><p>
- Once you have an <code class="computeroutput"><span class="identifier">xml_text</span></code>
- object, you can set the text contents using the following function:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- This function tries to set the contents to the specified string, and returns
- the operation result. The operation fails if the text object was retrieved
- from a node that can not have a value and is not an element node (i.e. it
- is a <a class="link" href="dom.html#node_declaration">node_declaration</a> node), if the
- text object is empty, or if there is insufficient memory to handle the request.
- The provided string is copied into document managed memory and can be destroyed
- after the function returns (for example, you can safely pass stack-allocated
- buffers to this function). Note that if the text object was retrieved from
- an element node, this function creates the PCDATA child node if necessary
- (i.e. if the element node does not have a PCDATA/CDATA child already).
- </p>
-<a name="xml_text::set_value"></a><p>
- In addition to a string function, several functions are provided for handling
- text with numbers and booleans as contents:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- The above functions convert the argument to string and then call the base
- <code class="computeroutput"><span class="identifier">set</span></code> function. These functions
- have the same semantics as similar <code class="computeroutput"><span class="identifier">xml_attribute</span></code>
- functions. You can <a class="link" href="modify.html#xml_attribute::set_value">refer to documentation
- for the attribute functions</a> for details.
- </p>
-<a name="xml_text::assign"></a><p>
- For convenience, all <code class="computeroutput"><span class="identifier">set</span></code>
- functions have the corresponding assignment operators:
- </p>
-<pre class="programlisting"><span class="identifier">xml_text</span><span class="special">&amp;</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_text</span><span class="special">&amp;</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_text</span><span class="special">&amp;</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_text</span><span class="special">&amp;</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">double</span> <span class="identifier">rhs</span><span class="special">);</span>
-<span class="identifier">xml_text</span><span class="special">&amp;</span> <span class="identifier">xml_text</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">bool</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
-<p>
- These operators simply call the right <code class="computeroutput"><span class="identifier">set</span></code>
- function and return the attribute they're called on; the return value of
- <code class="computeroutput"><span class="identifier">set</span></code> is ignored, so errors
- are ignored.
- </p>
-<p>
- This is an example of using <code class="computeroutput"><span class="identifier">xml_text</span></code>
- object to modify text contents (<a href="../samples/text.cpp" target="_top">samples/text.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// change project version
-</span><span class="identifier">project</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"version"</span><span class="special">).</span><span class="identifier">text</span><span class="special">()</span> <span class="special">=</span> <span class="number">1.2</span><span class="special">;</span>
-
-<span class="comment">// add description element and set the contents
-</span><span class="comment">// note that we do not have to explicitly add the node_pcdata child
-</span><span class="identifier">project</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="string">"description"</span><span class="special">).</span><span class="identifier">text</span><span class="special">().</span><span class="identifier">set</span><span class="special">(</span><span class="string">"a test project"</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.modify.clone"></a><a class="link" href="modify.html#manual.modify.clone" title="Cloning nodes/attributes"> Cloning nodes/attributes</a>
-</h3></div></div></div>
-<a name="xml_node::prepend_copy"></a><a name="xml_node::append_copy"></a><a name="xml_node::insert_copy_after"></a><a name="xml_node::insert_copy_before"></a><p>
- With the help of previously described functions, it is possible to create
- trees with any contents and structure, including cloning the existing data.
- However since this is an often needed operation, pugixml provides built-in
- node/attribute cloning facilities. Since nodes and attributes do not exist
- without a document tree, you can't create a standalone copy - you have to
- immediately insert it somewhere in the tree. For this, you can use one of
- the following functions:
- </p>
-<pre class="programlisting"><span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">append_copy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">prepend_copy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_copy_after</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_copy_before</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_attribute</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">);</span>
-
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">append_copy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">prepend_copy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_copy_after</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-<span class="identifier">xml_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">insert_copy_before</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">proto</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
-</pre>
-<p>
- These functions mirror the structure of <code class="computeroutput"><span class="identifier">append_child</span></code>,
- <code class="computeroutput"><span class="identifier">prepend_child</span></code>, <code class="computeroutput"><span class="identifier">insert_child_before</span></code> and related functions
- - they take the handle to the prototype object, which is to be cloned, insert
- a new attribute/node at the appropriate place, and then copy the attribute
- data or the whole node subtree to the new object. The functions return the
- handle to the resulting duplicate object, or null handle on failure.
- </p>
-<p>
- The attribute is copied along with the name and value; the node is copied
- along with its type, name and value; additionally attribute list and all
- children are recursively cloned, resulting in the deep subtree clone. The
- prototype object can be a part of the same document, or a part of any other
- document.
- </p>
-<p>
- The failure conditions resemble those of <code class="computeroutput"><span class="identifier">append_child</span></code>,
- <code class="computeroutput"><span class="identifier">insert_child_before</span></code> and related
- functions, <a class="link" href="modify.html#xml_node::append_child">consult their documentation
- for more information</a>. There are additional caveats specific to cloning
- functions:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Cloning null handles results in operation failure;
- </li>
-<li class="listitem">
- Node cloning starts with insertion of the node of the same type as that
- of the prototype; for this reason, cloning functions can not be directly
- used to clone entire documents, since <a class="link" href="dom.html#node_document">node_document</a>
- is not a valid insertion type. The example below provides a workaround.
- </li>
-<li class="listitem">
- It is possible to copy a subtree as a child of some node inside this
- subtree, i.e. <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">append_copy</span><span class="special">(</span><span class="identifier">node</span><span class="special">.</span><span class="identifier">parent</span><span class="special">().</span><span class="identifier">parent</span><span class="special">());</span></code>.
- This is a valid operation, and it results in a clone of the subtree in
- the state before cloning started, i.e. no infinite recursion takes place.
- </li>
-</ul></div>
-<p>
- This is an example with one possible implementation of include tags in XML
- (<a href="../samples/include.cpp" target="_top">samples/include.cpp</a>). It illustrates
- node cloning and usage of other document modification functions:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">load_preprocess</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span><span class="special">&amp;</span> <span class="identifier">doc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span><span class="special">);</span>
-
-<span class="keyword">bool</span> <span class="identifier">preprocess</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">child</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">();</span> <span class="identifier">child</span><span class="special">;</span> <span class="special">)</span>
- <span class="special">{</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">child</span><span class="special">.</span><span class="identifier">type</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">node_pi</span> <span class="special">&amp;&amp;</span> <span class="identifier">strcmp</span><span class="special">(</span><span class="identifier">child</span><span class="special">.</span><span class="identifier">name</span><span class="special">(),</span> <span class="string">"include"</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">include</span> <span class="special">=</span> <span class="identifier">child</span><span class="special">;</span>
-
- <span class="comment">// load new preprocessed document (note: ideally this should handle relative paths)
-</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span> <span class="special">=</span> <span class="identifier">include</span><span class="special">.</span><span class="identifier">value</span><span class="special">();</span>
-
- <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
- <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">load_preprocess</span><span class="special">(</span><span class="identifier">doc</span><span class="special">,</span> <span class="identifier">path</span><span class="special">))</span> <span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span>
-
- <span class="comment">// insert the comment marker above include directive
-</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">insert_child_before</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">node_comment</span><span class="special">,</span> <span class="identifier">include</span><span class="special">).</span><span class="identifier">set_value</span><span class="special">(</span><span class="identifier">path</span><span class="special">);</span>
-
- <span class="comment">// copy the document above the include directive (this retains the original order!)
-</span> <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">ic</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">first_child</span><span class="special">();</span> <span class="identifier">ic</span><span class="special">;</span> <span class="identifier">ic</span> <span class="special">=</span> <span class="identifier">ic</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">())</span>
- <span class="special">{</span>
- <span class="identifier">node</span><span class="special">.</span><span class="identifier">insert_copy_before</span><span class="special">(</span><span class="identifier">ic</span><span class="special">,</span> <span class="identifier">include</span><span class="special">);</span>
- <span class="special">}</span>
-
- <span class="comment">// remove the include node and move to the next child
-</span> <span class="identifier">child</span> <span class="special">=</span> <span class="identifier">child</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">();</span>
-
- <span class="identifier">node</span><span class="special">.</span><span class="identifier">remove_child</span><span class="special">(</span><span class="identifier">include</span><span class="special">);</span>
- <span class="special">}</span>
- <span class="keyword">else</span>
- <span class="special">{</span>
- <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">preprocess</span><span class="special">(</span><span class="identifier">child</span><span class="special">))</span> <span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span>
-
- <span class="identifier">child</span> <span class="special">=</span> <span class="identifier">child</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">();</span>
- <span class="special">}</span>
- <span class="special">}</span>
-
- <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="keyword">bool</span> <span class="identifier">load_preprocess</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span><span class="special">&amp;</span> <span class="identifier">doc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_file</span><span class="special">(</span><span class="identifier">path</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_default</span> <span class="special">|</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">parse_pi</span><span class="special">);</span> <span class="comment">// for &lt;?include?&gt;
-</span>
- <span class="keyword">return</span> <span class="identifier">result</span> <span class="special">?</span> <span class="identifier">preprocess</span><span class="special">(</span><span class="identifier">doc</span><span class="special">)</span> <span class="special">:</span> <span class="keyword">false</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <b>Modifying</b> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="access.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="saving.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/saving.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/saving.html
deleted file mode 100644
index d0b2e02f7..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/saving.html
+++ /dev/null
@@ -1,543 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Saving document</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="modify.html" title="Modifying document data">
-<link rel="next" href="xpath.html" title="XPath">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <b>Saving</b> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="modify.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="xpath.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.saving"></a><a class="link" href="saving.html" title="Saving document"> Saving document</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="saving.html#manual.saving.file"> Saving document to a file</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.stream"> Saving document to C++ IOstreams</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.writer"> Saving document via writer interface</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.subtree"> Saving a single subtree</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.options"> Output options</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.encoding"> Encodings</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.declaration"> Customizing document declaration</a></span></dt>
-</dl></div>
-<p>
- Often after creating a new document or loading the existing one and processing
- it, it is necessary to save the result back to file. Also it is occasionally
- useful to output the whole document or a subtree to some stream; use cases
- include debug printing, serialization via network or other text-oriented medium,
- etc. pugixml provides several functions to output any subtree of the document
- to a file, stream or another generic transport interface; these functions allow
- to customize the output format (see <a class="xref" href="saving.html#manual.saving.options" title="Output options"> Output options</a>), and also perform
- necessary encoding conversions (see <a class="xref" href="saving.html#manual.saving.encoding" title="Encodings"> Encodings</a>). This section documents
- the relevant functionality.
- </p>
-<p>
- Before writing to the destination the node/attribute data is properly formatted
- according to the node type; all special XML symbols, such as &lt; and &amp;,
- are properly escaped (unless <a class="link" href="saving.html#format_no_escapes">format_no_escapes</a>
- flag is set). In order to guard against forgotten node/attribute names, empty
- node/attribute names are printed as <code class="computeroutput"><span class="string">":anonymous"</span></code>.
- For well-formed output, make sure all node and attribute names are set to meaningful
- values.
- </p>
-<p>
- CDATA sections with values that contain <code class="computeroutput"><span class="string">"]]&gt;"</span></code>
- are split into several sections as follows: section with value <code class="computeroutput"><span class="string">"pre]]&gt;post"</span></code> is written as <code class="computeroutput"><span class="special">&lt;![</span><span class="identifier">CDATA</span><span class="special">[</span><span class="identifier">pre</span><span class="special">]]]]&gt;&lt;![</span><span class="identifier">CDATA</span><span class="special">[&gt;</span><span class="identifier">post</span><span class="special">]]&gt;</span></code>.
- While this alters the structure of the document (if you load the document after
- saving it, there will be two CDATA sections instead of one), this is the only
- way to escape CDATA contents.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.file"></a><a class="link" href="saving.html#manual.saving.file" title="Saving document to a file"> Saving document to a file</a>
-</h3></div></div></div>
-<a name="xml_document::save_file"></a><a name="xml_document::save_file_wide"></a><p>
- If you want to save the whole document to a file, you can use one of the
- following functions:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save_file</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save_file</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">path</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- These functions accept file path as its first argument, and also three optional
- arguments, which specify indentation and other output options (see <a class="xref" href="saving.html#manual.saving.options" title="Output options"> Output options</a>)
- and output data encoding (see <a class="xref" href="saving.html#manual.saving.encoding" title="Encodings"> Encodings</a>). The path has the target
- operating system format, so it can be a relative or absolute one, it should
- have the delimiters of the target system, it should have the exact case if
- the target file system is case-sensitive, etc.
- </p>
-<p>
- File path is passed to the system file opening function as is in case of
- the first function (which accepts <code class="computeroutput"><span class="keyword">const</span>
- <span class="keyword">char</span><span class="special">*</span> <span class="identifier">path</span></code>); the second function either uses
- a special file opening function if it is provided by the runtime library
- or converts the path to UTF-8 and uses the system file opening function.
- </p>
-<a name="xml_writer_file"></a><p>
- <code class="computeroutput"><span class="identifier">save_file</span></code> opens the target
- file for writing, outputs the requested header (by default a document declaration
- is output, unless the document already has one), and then saves the document
- contents. If the file could not be opened, the function returns <code class="computeroutput"><span class="keyword">false</span></code>. Calling <code class="computeroutput"><span class="identifier">save_file</span></code>
- is equivalent to creating an <code class="computeroutput"><span class="identifier">xml_writer_file</span></code>
- object with <code class="computeroutput"><span class="identifier">FILE</span><span class="special">*</span></code>
- handle as the only constructor argument and then calling <code class="computeroutput"><span class="identifier">save</span></code>;
- see <a class="xref" href="saving.html#manual.saving.writer" title="Saving document via writer interface"> Saving document via writer interface</a> for writer interface details.
- </p>
-<p>
- This is a simple example of saving XML document to file (<a href="../samples/save_file.cpp" target="_top">samples/save_file.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// save document to file
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Saving result: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">save_file</span><span class="special">(</span><span class="string">"save_file_output.xml"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.stream"></a><a class="link" href="saving.html#manual.saving.stream" title="Saving document to C++ IOstreams"> Saving document to C++ IOstreams</a>
-</h3></div></div></div>
-<a name="xml_document::save_stream"></a><p>
- To enhance interoperability pugixml provides functions for saving document
- to any object which implements C++ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>
- interface. This allows you to save documents to any standard C++ stream (i.e.
- file stream) or any third-party compliant implementation (i.e. Boost Iostreams).
- Most notably, this allows for easy debug output, since you can use <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span></code>
- stream as saving target. There are two functions, one works with narrow character
- streams, another handles wide character ones:
- </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">void</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wostream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">save</span></code> with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>
- argument saves the document to the stream in the same way as <code class="computeroutput"><span class="identifier">save_file</span></code> (i.e. with requested header and
- with encoding conversions). On the other hand, <code class="computeroutput"><span class="identifier">save</span></code>
- with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstream</span></code> argument saves the document to
- the wide stream with <a class="link" href="loading.html#encoding_wchar">encoding_wchar</a>
- encoding. Because of this, using <code class="computeroutput"><span class="identifier">save</span></code>
- with wide character streams requires careful (usually platform-specific)
- stream setup (i.e. using the <code class="computeroutput"><span class="identifier">imbue</span></code>
- function). Generally use of wide streams is discouraged, however it provides
- you with the ability to save documents to non-Unicode encodings, i.e. you
- can save Shift-JIS encoded data if you set the correct locale.
- </p>
-<a name="xml_writer_stream"></a><p>
- Calling <code class="computeroutput"><span class="identifier">save</span></code> with stream
- target is equivalent to creating an <code class="computeroutput"><span class="identifier">xml_writer_stream</span></code>
- object with stream as the only constructor argument and then calling <code class="computeroutput"><span class="identifier">save</span></code>; see <a class="xref" href="saving.html#manual.saving.writer" title="Saving document via writer interface"> Saving document via writer interface</a> for writer
- interface details.
- </p>
-<p>
- This is a simple example of saving XML document to standard output (<a href="../samples/save_stream.cpp" target="_top">samples/save_stream.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// save document to standard output
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Document:\n"</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.writer"></a><a class="link" href="saving.html#manual.saving.writer" title="Saving document via writer interface"> Saving document via writer interface</a>
-</h3></div></div></div>
-<a name="xml_document::save"></a><a name="xml_writer"></a><a name="xml_writer::write"></a><p>
- All of the above saving functions are implemented in terms of writer interface.
- This is a simple interface with a single function, which is called several
- times during output process with chunks of document data as input:
- </p>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">xml_writer</span>
-<span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">write</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">data</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
-<span class="special">};</span>
-
-<span class="keyword">void</span> <span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">xml_writer</span><span class="special">&amp;</span> <span class="identifier">writer</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- In order to output the document via some custom transport, for example sockets,
- you should create an object which implements <code class="computeroutput"><span class="identifier">xml_writer</span></code>
- interface and pass it to <code class="computeroutput"><span class="identifier">save</span></code>
- function. <code class="computeroutput"><span class="identifier">xml_writer</span><span class="special">::</span><span class="identifier">write</span></code> function is called with a buffer
- as an input, where <code class="computeroutput"><span class="identifier">data</span></code> points
- to buffer start, and <code class="computeroutput"><span class="identifier">size</span></code>
- is equal to the buffer size in bytes. <code class="computeroutput"><span class="identifier">write</span></code>
- implementation must write the buffer to the transport; it can not save the
- passed buffer pointer, as the buffer contents will change after <code class="computeroutput"><span class="identifier">write</span></code> returns. The buffer contains the
- chunk of document data in the desired encoding.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">write</span></code> function is called
- with relatively large blocks (size is usually several kilobytes, except for
- the last block that may be small), so there is often no need for additional
- buffering in the implementation.
- </p>
-<p>
- This is a simple example of custom writer for saving document data to STL
- string (<a href="../samples/save_custom_writer.cpp" target="_top">samples/save_custom_writer.cpp</a>);
- read the sample code for more complex examples:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xml_string_writer</span><span class="special">:</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_writer</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result</span><span class="special">;</span>
-
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">write</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">data</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">result</span> <span class="special">+=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;(</span><span class="identifier">data</span><span class="special">),</span> <span class="identifier">size</span><span class="special">);</span>
- <span class="special">}</span>
-<span class="special">};</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.subtree"></a><a class="link" href="saving.html#manual.saving.subtree" title="Saving a single subtree"> Saving a single subtree</a>
-</h3></div></div></div>
-<a name="xml_node::print"></a><a name="xml_node::print_stream"></a><p>
- While the previously described functions save the whole document to the destination,
- it is easy to save a single subtree. The following functions are provided:
- </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">depth</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">void</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wostream</span><span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">depth</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">void</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">xml_writer</span><span class="special">&amp;</span> <span class="identifier">writer</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">indent</span> <span class="special">=</span> <span class="string">"\t"</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">,</span> <span class="identifier">xml_encoding</span> <span class="identifier">encoding</span> <span class="special">=</span> <span class="identifier">encoding_auto</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">depth</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- These functions have the same arguments with the same meaning as the corresponding
- <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span></code> functions, and allow you to save the
- subtree to either a C++ IOstream or to any object that implements <code class="computeroutput"><span class="identifier">xml_writer</span></code> interface.
- </p>
-<p>
- Saving a subtree differs from saving the whole document: the process behaves
- as if <a class="link" href="saving.html#format_write_bom">format_write_bom</a> is off, and
- <a class="link" href="saving.html#format_no_declaration">format_no_declaration</a> is on,
- even if actual values of the flags are different. This means that BOM is
- not written to the destination, and document declaration is only written
- if it is the node itself or is one of node's children. Note that this also
- holds if you're saving a document; this example (<a href="../samples/save_subtree.cpp" target="_top">samples/save_subtree.cpp</a>)
- illustrates the difference:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// get a test document
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="string">"&lt;foo bar='baz'&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;"</span><span class="special">);</span>
-
-<span class="comment">// print document to standard output (prints &lt;?xml version="1.0"?&gt;&lt;foo bar="baz"&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;)
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">""</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_raw</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// print document to standard output as a regular node (prints &lt;foo bar="baz"&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;)
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">""</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_raw</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// print a subtree to standard output (prints &lt;call&gt;hey&lt;/call&gt;)
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"foo"</span><span class="special">).</span><span class="identifier">child</span><span class="special">(</span><span class="string">"call"</span><span class="special">).</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">""</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_raw</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.options"></a><a class="link" href="saving.html#manual.saving.options" title="Output options"> Output options</a>
-</h3></div></div></div>
-<p>
- All saving functions accept the optional parameter <code class="computeroutput"><span class="identifier">flags</span></code>.
- This is a bitmask that customizes the output format; you can select the way
- the document nodes are printed and select the needed additional information
- that is output before the document contents.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- You should use the usual bitwise arithmetics to manipulate the bitmask:
- to enable a flag, use <code class="computeroutput"><span class="identifier">mask</span> <span class="special">|</span> <span class="identifier">flag</span></code>;
- to disable a flag, use <code class="computeroutput"><span class="identifier">mask</span> <span class="special">&amp;</span> <span class="special">~</span><span class="identifier">flag</span></code>.
- </p></td></tr>
-</table></div>
-<p>
- These flags control the resulting tree contents:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="format_indent"></a><code class="literal">format_indent</code> determines if all nodes
- should be indented with the indentation string (this is an additional
- parameter for all saving functions, and is <code class="computeroutput"><span class="string">"\t"</span></code>
- by default). If this flag is on, before every node the indentation string
- is output several times, where the amount of indentation depends on the
- node's depth relative to the output subtree. This flag has no effect
- if <a class="link" href="saving.html#format_raw">format_raw</a> is enabled. This flag
- is <span class="bold"><strong>on</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="format_raw"></a><code class="literal">format_raw</code> switches between formatted and
- raw output. If this flag is on, the nodes are not indented in any way,
- and also no newlines that are not part of document text are printed.
- Raw mode can be used for serialization where the result is not intended
- to be read by humans; also it can be useful if the document was parsed
- with <a class="link" href="loading.html#parse_ws_pcdata">parse_ws_pcdata</a> flag, to
- preserve the original document formatting as much as possible. This flag
- is <span class="bold"><strong>off</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="format_no_escapes"></a><code class="literal">format_no_escapes</code> disables output
- escaping for attribute values and PCDATA contents. If this flag is on,
- special symbols (', &amp;, &lt;, &gt;) and all non-printable characters
- (those with codepoint values less than 32) are converted to XML escape
- sequences (i.e. &amp;amp;) during output. If this flag is off, no text
- processing is performed; therefore, output XML can be malformed if output
- contents contains invalid symbols (i.e. having a stray &lt; in the PCDATA
- will make the output malformed). This flag is <span class="bold"><strong>on</strong></span>
- by default.
- </li>
-</ul></div>
-<p>
- These flags control the additional output information:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- <a name="format_no_declaration"></a><code class="literal">format_no_declaration</code> disables
- default node declaration output. By default, if the document is saved
- via <code class="computeroutput"><span class="identifier">save</span></code> or <code class="computeroutput"><span class="identifier">save_file</span></code> function, and it does not
- have any document declaration, a default declaration is output before
- the document contents. Enabling this flag disables this declaration.
- This flag has no effect in <code class="computeroutput"><span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">print</span></code>
- functions: they never output the default declaration. This flag is <span class="bold"><strong>off</strong></span> by default. <br><br>
-
- </li>
-<li class="listitem">
- <a name="format_write_bom"></a><code class="literal">format_write_bom</code> enables Byte Order
- Mark (BOM) output. By default, no BOM is output, so in case of non UTF-8
- encodings the resulting document's encoding may not be recognized by
- some parsers and text editors, if they do not implement sophisticated
- encoding detection. Enabling this flag adds an encoding-specific BOM
- to the output. This flag has no effect in <code class="computeroutput"><span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">print</span></code>
- functions: they never output the BOM. This flag is <span class="bold"><strong>off</strong></span>
- by default.
- </li>
-<li class="listitem">
- <a name="format_save_file_text"></a><code class="literal">format_save_file_text</code> changes
- the file mode when using <code class="computeroutput"><span class="identifier">save_file</span></code>
- function. By default, file is opened in binary mode, which means that
- the output file will contain platform-independent newline \n (ASCII 10).
- If this flag is on, file is opened in text mode, which on some systems
- changes the newline format (i.e. on Windows you can use this flag to
- output XML documents with \r\n (ASCII 13 10) newlines. This flag is
- <span class="bold"><strong>off</strong></span> by default.
- </li>
-</ul></div>
-<p>
- Additionally, there is one predefined option mask:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
- <a name="format_default"></a><code class="literal">format_default</code> is the default set of
- flags, i.e. it has all options set to their default values. It sets formatted
- output with indentation, without BOM and with default node declaration,
- if necessary.
- </li></ul></div>
-<p>
- This is an example that shows the outputs of different output options (<a href="../samples/save_options.cpp" target="_top">samples/save_options.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// get a test document
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="string">"&lt;foo bar='baz'&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;"</span><span class="special">);</span>
-
-<span class="comment">// default options; prints
-</span><span class="comment">// &lt;?xml version="1.0"?&gt;
-</span><span class="comment">// &lt;foo bar="baz"&gt;
-</span><span class="comment">// &lt;call&gt;hey&lt;/call&gt;
-</span><span class="comment">// &lt;/foo&gt;
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// default options with custom indentation string; prints
-</span><span class="comment">// &lt;?xml version="1.0"?&gt;
-</span><span class="comment">// &lt;foo bar="baz"&gt;
-</span><span class="comment">// --&lt;call&gt;hey&lt;/call&gt;
-</span><span class="comment">// &lt;/foo&gt;
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">"--"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// default options without indentation; prints
-</span><span class="comment">// &lt;?xml version="1.0"?&gt;
-</span><span class="comment">// &lt;foo bar="baz"&gt;
-</span><span class="comment">// &lt;call&gt;hey&lt;/call&gt;
-</span><span class="comment">// &lt;/foo&gt;
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">"\t"</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_default</span> <span class="special">&amp;</span> <span class="special">~</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_indent</span><span class="special">);</span> <span class="comment">// can also pass "" instead of indentation string for the same effect
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// raw output; prints
-</span><span class="comment">// &lt;?xml version="1.0"?&gt;&lt;foo bar="baz"&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">"\t"</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_raw</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// raw output without declaration; prints
-</span><span class="comment">// &lt;foo bar="baz"&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">"\t"</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_raw</span> <span class="special">|</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">format_no_declaration</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.encoding"></a><a class="link" href="saving.html#manual.saving.encoding" title="Encodings"> Encodings</a>
-</h3></div></div></div>
-<p>
- pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little
- endian), UTF-32 (big and little endian); UCS-2 is naturally supported since
- it's a strict subset of UTF-16) and handles all encoding conversions during
- output. The output encoding is set via the <code class="computeroutput"><span class="identifier">encoding</span></code>
- parameter of saving functions, which is of type <code class="computeroutput"><span class="identifier">xml_encoding</span></code>.
- The possible values for the encoding are documented in <a class="xref" href="loading.html#manual.loading.encoding" title="Encodings"> Encodings</a>;
- the only flag that has a different meaning is <code class="computeroutput"><span class="identifier">encoding_auto</span></code>.
- </p>
-<p>
- While all other flags set the exact encoding, <code class="computeroutput"><span class="identifier">encoding_auto</span></code>
- is meant for automatic encoding detection. The automatic detection does not
- make sense for output encoding, since there is usually nothing to infer the
- actual encoding from, so here <code class="computeroutput"><span class="identifier">encoding_auto</span></code>
- means UTF-8 encoding, which is the most popular encoding for XML data storage.
- This is also the default value of output encoding; specify another value
- if you do not want UTF-8 encoded output.
- </p>
-<p>
- Also note that wide stream saving functions do not have <code class="computeroutput"><span class="identifier">encoding</span></code>
- argument and always assume <a class="link" href="loading.html#encoding_wchar">encoding_wchar</a>
- encoding.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- The current behavior for Unicode conversion is to skip all invalid UTF
- sequences during conversion. This behavior should not be relied upon; if
- your node/attribute names do not contain any valid UTF sequences, they
- may be output as if they are empty, which will result in malformed XML
- document.
- </p></td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.saving.declaration"></a><a class="link" href="saving.html#manual.saving.declaration" title="Customizing document declaration"> Customizing document declaration</a>
-</h3></div></div></div>
-<p>
- When you are saving the document using <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span><span class="special">()</span></code> or <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save_file</span><span class="special">()</span></code>, a default XML document declaration is
- output, if <code class="computeroutput"><span class="identifier">format_no_declaration</span></code>
- is not specified and if the document does not have a declaration node. However,
- the default declaration is not customizable. If you want to customize the
- declaration output, you need to create the declaration node yourself.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- By default the declaration node is not added to the document during parsing.
- If you just need to preserve the original declaration node, you have to
- add the flag <a class="link" href="loading.html#parse_declaration">parse_declaration</a>
- to the parsing flags; the resulting document will contain the original
- declaration node, which will be output during saving.
- </p></td></tr>
-</table></div>
-<p>
- Declaration node is a node with type <a class="link" href="dom.html#node_declaration">node_declaration</a>;
- it behaves like an element node in that it has attributes with values (but
- it does not have child nodes). Therefore setting custom version, encoding
- or standalone declaration involves adding attributes and setting attribute
- values.
- </p>
-<p>
- This is an example that shows how to create a custom declaration node (<a href="../samples/save_declaration.cpp" target="_top">samples/save_declaration.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// get a test document
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="string">"&lt;foo bar='baz'&gt;&lt;call&gt;hey&lt;/call&gt;&lt;/foo&gt;"</span><span class="special">);</span>
-
-<span class="comment">// add a custom declaration node
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">decl</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">prepend_child</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">node_declaration</span><span class="special">);</span>
-<span class="identifier">decl</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"version"</span><span class="special">)</span> <span class="special">=</span> <span class="string">"1.0"</span><span class="special">;</span>
-<span class="identifier">decl</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"encoding"</span><span class="special">)</span> <span class="special">=</span> <span class="string">"UTF-8"</span><span class="special">;</span>
-<span class="identifier">decl</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"standalone"</span><span class="special">)</span> <span class="special">=</span> <span class="string">"no"</span><span class="special">;</span>
-
-<span class="comment">// &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
-</span><span class="comment">// &lt;foo bar="baz"&gt;
-</span><span class="comment">// &lt;call&gt;hey&lt;/call&gt;
-</span><span class="comment">// &lt;/foo&gt;
-</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <b>Saving</b> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="modify.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="xpath.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/toc.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/toc.html
deleted file mode 100644
index d9fe5f876..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/toc.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Table of Contents</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="apiref.html" title="API Reference">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <b>Table of Contents</b>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="apiref.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.toc"></a><a class="link" href="toc.html" title="Table of Contents"> Table of Contents</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="../manual.html#manual.overview"> Overview</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="../manual.html#manual.overview.introduction"> Introduction</a></span></dt>
-<dt><span class="section"><a href="../manual.html#manual.overview.feedback"> Feedback</a></span></dt>
-<dt><span class="section"><a href="../manual.html#manual.overview.thanks"> Acknowledgments</a></span></dt>
-<dt><span class="section"><a href="../manual.html#manual.overview.license"> License</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="install.html"> Installation</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="install.html#manual.install.getting"> Getting pugixml</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="install.html#manual.install.getting.source"> Source distributions</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.getting.subversion"> Subversion repository</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="install.html#manual.install.building"> Building pugixml</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="install.html#manual.install.building.embed"> Building pugixml as
- a part of another static library/executable</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.static"> Building pugixml as
- a standalone static library</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.shared"> Building pugixml as
- a standalone shared library</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.header"> Using pugixml in header-only
- mode</a></span></dt>
-<dt><span class="section"><a href="install.html#manual.install.building.config"> Additional configuration
- options</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="install.html#manual.install.portability"> Portability</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="dom.html"> Document object model</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="dom.html#manual.dom.tree"> Tree structure</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.cpp"> C++ interface</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.unicode"> Unicode interface</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.thread"> Thread-safety guarantees</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.exception"> Exception guarantees</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.memory"> Memory management</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="dom.html#manual.dom.memory.custom"> Custom memory allocation/deallocation
- functions</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.memory.tuning"> Memory consumption tuning</a></span></dt>
-<dt><span class="section"><a href="dom.html#manual.dom.memory.internals"> Document memory management
- internals</a></span></dt>
-</dl></dd>
-</dl></dd>
-<dt><span class="section"><a href="loading.html"> Loading document</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="loading.html#manual.loading.file"> Loading document from file</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.memory"> Loading document from memory</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.stream"> Loading document from C++ IOstreams</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.errors"> Handling parsing errors</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.options"> Parsing options</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.encoding"> Encodings</a></span></dt>
-<dt><span class="section"><a href="loading.html#manual.loading.w3c"> Conformance to W3C specification</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="access.html"> Accessing document data</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="access.html#manual.access.basic"> Basic traversal functions</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.nodedata"> Getting node data</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.attrdata"> Getting attribute data</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.contents"> Contents-based traversal functions</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.rangefor"> Range-based for-loop support</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.iterators"> Traversing node/attribute lists
- via iterators</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.walker"> Recursive traversal with xml_tree_walker</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.predicate"> Searching for nodes/attributes
- with predicates</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.text"> Working with text contents</a></span></dt>
-<dt><span class="section"><a href="access.html#manual.access.misc"> Miscellaneous functions</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="modify.html"> Modifying document data</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="modify.html#manual.modify.nodedata"> Setting node data</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.attrdata"> Setting attribute data</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.add"> Adding nodes/attributes</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.remove"> Removing nodes/attributes</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.text"> Working with text contents</a></span></dt>
-<dt><span class="section"><a href="modify.html#manual.modify.clone"> Cloning nodes/attributes</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="saving.html"> Saving document</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="saving.html#manual.saving.file"> Saving document to a file</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.stream"> Saving document to C++ IOstreams</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.writer"> Saving document via writer interface</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.subtree"> Saving a single subtree</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.options"> Output options</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.encoding"> Encodings</a></span></dt>
-<dt><span class="section"><a href="saving.html#manual.saving.declaration"> Customizing document declaration</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="xpath.html"> XPath</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="xpath.html#manual.xpath.types"> XPath types</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.select"> Selecting nodes via XPath expression</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.query"> Using query objects</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.variables"> Using variables</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.errors"> Error handling</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.w3c"> Conformance to W3C specification</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="changes.html"> Changelog</a></span></dt>
-<dt><span class="section"><a href="apiref.html"> API Reference</a></span></dt>
-<dt><span class="section"><a href="toc.html"> Table of Contents</a></span></dt>
-</dl></div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <a href="xpath.html">XPath</a> |
- <a href="apiref.html">API Reference</a> |
- <b>Table of Contents</b>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="apiref.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/xpath.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/xpath.html
deleted file mode 100644
index bb37f6470..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/manual/xpath.html
+++ /dev/null
@@ -1,746 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>XPath</title>
-<link rel="stylesheet" href="../pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../manual.html" title="pugixml 1.2">
-<link rel="up" href="../manual.html" title="pugixml 1.2">
-<link rel="prev" href="saving.html" title="Saving document">
-<link rel="next" href="changes.html" title="Changelog">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <b>XPath</b> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="saving.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="changes.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-<hr>
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="manual.xpath"></a><a class="link" href="xpath.html" title="XPath"> XPath</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="xpath.html#manual.xpath.types"> XPath types</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.select"> Selecting nodes via XPath expression</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.query"> Using query objects</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.variables"> Using variables</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.errors"> Error handling</a></span></dt>
-<dt><span class="section"><a href="xpath.html#manual.xpath.w3c"> Conformance to W3C specification</a></span></dt>
-</dl></div>
-<p>
- If the task at hand is to select a subset of document nodes that match some
- criteria, it is possible to code a function using the existing traversal functionality
- for any practical criteria. However, often either a data-driven approach is
- desirable, in case the criteria are not predefined and come from a file, or
- it is inconvenient to use traversal interfaces and a higher-level DSL is required.
- There is a standard language for XML processing, XPath, that can be useful
- for these cases. pugixml implements an almost complete subset of XPath 1.0.
- Because of differences in document object model and some performance implications,
- there are minor violations of the official specifications, which can be found
- in <a class="xref" href="xpath.html#manual.xpath.w3c" title="Conformance to W3C specification"> Conformance to W3C specification</a>. The rest of this section describes the interface for XPath
- functionality. Please note that if you wish to learn to use XPath language,
- you have to look for other tutorials or manuals; for example, you can read
- <a href="http://www.w3schools.com/xpath/" target="_top">W3Schools XPath tutorial</a>,
- <a href="http://www.tizag.com/xmlTutorial/xpathtutorial.php" target="_top">XPath tutorial
- at tizag.com</a>, and <a href="http://www.w3.org/TR/xpath/" target="_top">the XPath
- 1.0 specification</a>.
- </p>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.xpath.types"></a><a class="link" href="xpath.html#manual.xpath.types" title="XPath types"> XPath types</a>
-</h3></div></div></div>
-<a name="xpath_value_type"></a><a name="xpath_type_number"></a><a name="xpath_type_string"></a><a name="xpath_type_boolean"></a><a name="xpath_type_node_set"></a><a name="xpath_type_none"></a><p>
- Each XPath expression can have one of the following types: boolean, number,
- string or node set. Boolean type corresponds to <code class="computeroutput"><span class="keyword">bool</span></code>
- type, number type corresponds to <code class="computeroutput"><span class="keyword">double</span></code>
- type, string type corresponds to either <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
- or <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span></code>, depending on whether <a class="link" href="dom.html#manual.dom.unicode" title="Unicode interface">wide
- character interface is enabled</a>, and node set corresponds to <a class="link" href="xpath.html#xpath_node_set">xpath_node_set</a> type. There is an enumeration,
- <code class="computeroutput"><span class="identifier">xpath_value_type</span></code>, which can
- take the values <code class="computeroutput"><span class="identifier">xpath_type_boolean</span></code>,
- <code class="computeroutput"><span class="identifier">xpath_type_number</span></code>, <code class="computeroutput"><span class="identifier">xpath_type_string</span></code> or <code class="computeroutput"><span class="identifier">xpath_type_node_set</span></code>,
- accordingly.
- </p>
-<a name="xpath_node"></a><a name="xpath_node::node"></a><a name="xpath_node::attribute"></a><a name="xpath_node::parent"></a><p>
- Because an XPath node can be either a node or an attribute, there is a special
- type, <code class="computeroutput"><span class="identifier">xpath_node</span></code>, which is
- a discriminated union of these types. A value of this type contains two node
- handles, one of <code class="computeroutput"><span class="identifier">xml_node</span></code>
- type, and another one of <code class="computeroutput"><span class="identifier">xml_attribute</span></code>
- type; at most one of them can be non-null. The accessors to get these handles
- are available:
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xpath_node</span><span class="special">::</span><span class="identifier">node</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xml_attribute</span> <span class="identifier">xpath_node</span><span class="special">::</span><span class="identifier">attribute</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- XPath nodes can be null, in which case both accessors return null handles.
- </p>
-<p>
- Note that as per XPath specification, each XPath node has a parent, which
- can be retrieved via this function:
- </p>
-<pre class="programlisting"><span class="identifier">xml_node</span> <span class="identifier">xpath_node</span><span class="special">::</span><span class="identifier">parent</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">parent</span></code> function returns the
- node's parent if the XPath node corresponds to <code class="computeroutput"><span class="identifier">xml_node</span></code>
- handle (equivalent to <code class="computeroutput"><span class="identifier">node</span><span class="special">().</span><span class="identifier">parent</span><span class="special">()</span></code>), or the node to which the attribute belongs
- to, if the XPath node corresponds to <code class="computeroutput"><span class="identifier">xml_attribute</span></code>
- handle. For null nodes, <code class="computeroutput"><span class="identifier">parent</span></code>
- returns null handle.
- </p>
-<a name="xpath_node::unspecified_bool_type"></a><a name="xpath_node::comparison"></a><p>
- Like node and attribute handles, XPath node handles can be implicitly cast
- to boolean-like object to check if it is a null node, and also can be compared
- for equality with each other.
- </p>
-<a name="xpath_node::ctor"></a><p>
- You can also create XPath nodes with one of the three constructors: the default
- constructor, the constructor that takes node argument, and the constructor
- that takes attribute and node arguments (in which case the attribute must
- belong to the attribute list of the node). The constructor from <code class="computeroutput"><span class="identifier">xml_node</span></code> is implicit, so you can usually
- pass <code class="computeroutput"><span class="identifier">xml_node</span></code> to functions
- that expect <code class="computeroutput"><span class="identifier">xpath_node</span></code>. Apart
- from that you usually don't need to create your own XPath node objects, since
- they are returned to you via selection functions.
- </p>
-<a name="xpath_node_set"></a><p>
- XPath expressions operate not on single nodes, but instead on node sets.
- A node set is a collection of nodes, which can be optionally ordered in either
- a forward document order or a reverse one. Document order is defined in XPath
- specification; an XPath node is before another node in document order if
- it appears before it in XML representation of the corresponding document.
- </p>
-<a name="xpath_node_set::const_iterator"></a><a name="xpath_node_set::begin"></a><a name="xpath_node_set::end"></a><p>
- Node sets are represented by <code class="computeroutput"><span class="identifier">xpath_node_set</span></code>
- object, which has an interface that resembles one of sequential random-access
- containers. It has an iterator type along with usual begin/past-the-end iterator
- accessors:
- </p>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">*</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">const_iterator</span><span class="special">;</span>
-<span class="identifier">const_iterator</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">const_iterator</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<a name="xpath_node_set::index"></a><a name="xpath_node_set::size"></a><a name="xpath_node_set::empty"></a><p>
- And it also can be iterated via indices, just like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="keyword">operator</span><span class="special">[](</span><span class="identifier">size_t</span> <span class="identifier">index</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">size_t</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">size</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- All of the above operations have the same semantics as that of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>:
- the iterators are random-access, all of the above operations are constant
- time, and accessing the element at index that is greater or equal than the
- set size results in undefined behavior. You can use both iterator-based and
- index-based access for iteration, however the iterator-based one can be faster.
- </p>
-<a name="xpath_node_set::type"></a><a name="xpath_node_set::type_unsorted"></a><a name="xpath_node_set::type_sorted"></a><a name="xpath_node_set::type_sorted_reverse"></a><a name="xpath_node_set::sort"></a><p>
- The order of iteration depends on the order of nodes inside the set; the
- order can be queried via the following function:
- </p>
-<pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">type_t</span> <span class="special">{</span><span class="identifier">type_unsorted</span><span class="special">,</span> <span class="identifier">type_sorted</span><span class="special">,</span> <span class="identifier">type_sorted_reverse</span><span class="special">};</span>
-<span class="identifier">type_t</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">type</span></code> function returns the
- current order of nodes; <code class="computeroutput"><span class="identifier">type_sorted</span></code>
- means that the nodes are in forward document order, <code class="computeroutput"><span class="identifier">type_sorted_reverse</span></code>
- means that the nodes are in reverse document order, and <code class="computeroutput"><span class="identifier">type_unsorted</span></code>
- means that neither order is guaranteed (nodes can accidentally be in a sorted
- order even if <code class="computeroutput"><span class="identifier">type</span><span class="special">()</span></code>
- returns <code class="computeroutput"><span class="identifier">type_unsorted</span></code>). If
- you require a specific order of iteration, you can change it via <code class="computeroutput"><span class="identifier">sort</span></code> function:
- </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">reverse</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">);</span>
-</pre>
-<p>
- Calling <code class="computeroutput"><span class="identifier">sort</span></code> sorts the nodes
- in either forward or reverse document order, depending on the argument; after
- this call <code class="computeroutput"><span class="identifier">type</span><span class="special">()</span></code>
- will return <code class="computeroutput"><span class="identifier">type_sorted</span></code> or
- <code class="computeroutput"><span class="identifier">type_sorted_reverse</span></code>.
- </p>
-<a name="xpath_node_set::first"></a><p>
- Often the actual iteration is not needed; instead, only the first element
- in document order is required. For this, a special accessor is provided:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_node</span> <span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">first</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- This function returns the first node in forward document order from the set,
- or null node if the set is empty. Note that while the result of the node
- does not depend on the order of nodes in the set (i.e. on the result of
- <code class="computeroutput"><span class="identifier">type</span><span class="special">()</span></code>),
- the complexity does - if the set is sorted, the complexity is constant, otherwise
- it is linear in the number of elements or worse.
- </p>
-<a name="xpath_node_set::ctor"></a><p>
- While in the majority of cases the node set is returned by XPath functions,
- sometimes there is a need to manually construct a node set. For such cases,
- a constructor is provided which takes an iterator range (<code class="computeroutput"><span class="identifier">const_iterator</span></code>
- is a typedef for <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">*</span></code>), and an optional type:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">xpath_node_set</span><span class="special">(</span><span class="identifier">const_iterator</span> <span class="identifier">begin</span><span class="special">,</span> <span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">,</span> <span class="identifier">type_t</span> <span class="identifier">type</span> <span class="special">=</span> <span class="identifier">type_unsorted</span><span class="special">);</span>
-</pre>
-<p>
- The constructor copies the specified range and sets the specified type. The
- objects in the range are not checked in any way; you'll have to ensure that
- the range contains no duplicates, and that the objects are sorted according
- to the <code class="computeroutput"><span class="identifier">type</span></code> parameter. Otherwise
- XPath operations with this set may produce unexpected results.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.xpath.select"></a><a class="link" href="xpath.html#manual.xpath.select" title="Selecting nodes via XPath expression"> Selecting nodes via XPath expression</a>
-</h3></div></div></div>
-<a name="xml_node::select_single_node"></a><a name="xml_node::select_nodes"></a><p>
- If you want to select nodes that match some XPath expression, you can do
- it with the following functions:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">select_single_node</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">query</span><span class="special">,</span> <span class="identifier">xpath_variable_set</span><span class="special">*</span> <span class="identifier">variables</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xpath_node_set</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">query</span><span class="special">,</span> <span class="identifier">xpath_variable_set</span><span class="special">*</span> <span class="identifier">variables</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- <code class="computeroutput"><span class="identifier">select_nodes</span></code> function compiles
- the expression and then executes it with the node as a context node, and
- returns the resulting node set. <code class="computeroutput"><span class="identifier">select_single_node</span></code>
- returns only the first node in document order from the result, and is equivalent
- to calling <code class="computeroutput"><span class="identifier">select_nodes</span><span class="special">(</span><span class="identifier">query</span><span class="special">).</span><span class="identifier">first</span><span class="special">()</span></code>.
- If the XPath expression does not match anything, or the node handle is null,
- <code class="computeroutput"><span class="identifier">select_nodes</span></code> returns an empty
- set, and <code class="computeroutput"><span class="identifier">select_single_node</span></code>
- returns null XPath node.
- </p>
-<p>
- If exception handling is not disabled, both functions throw <a class="link" href="xpath.html#xpath_exception">xpath_exception</a>
- if the query can not be compiled or if it returns a value with type other
- than node set; see <a class="xref" href="xpath.html#manual.xpath.errors" title="Error handling"> Error handling</a> for details.
- </p>
-<a name="xml_node::select_single_node_precomp"></a><a name="xml_node::select_nodes_precomp"></a><p>
- While compiling expressions is fast, the compilation time can introduce a
- significant overhead if the same expression is used many times on small subtrees.
- If you're doing many similar queries, consider compiling them into query
- objects (see <a class="xref" href="xpath.html#manual.xpath.query" title="Using query objects"> Using query objects</a> for further reference). Once you get a compiled
- query object, you can pass it to select functions instead of an expression
- string:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">select_single_node</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_query</span><span class="special">&amp;</span> <span class="identifier">query</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xpath_node_set</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_query</span><span class="special">&amp;</span> <span class="identifier">query</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- If exception handling is not disabled, both functions throw <a class="link" href="xpath.html#xpath_exception">xpath_exception</a>
- if the query returns a value with type other than node set.
- </p>
-<p>
- This is an example of selecting nodes using XPath expressions (<a href="../samples/xpath_select.cpp" target="_top">samples/xpath_select.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span> <span class="identifier">tools</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']"</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tools:"</span><span class="special">;</span>
-
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">it</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="special">*</span><span class="identifier">it</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">();</span>
-<span class="special">}</span>
-
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node</span> <span class="identifier">build_tool</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_single_node</span><span class="special">(</span><span class="string">"//Tool[contains(Description, 'build system')]"</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nBuild tool: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">build_tool</span><span class="special">.</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.xpath.query"></a><a class="link" href="xpath.html#manual.xpath.query" title="Using query objects"> Using query objects</a>
-</h3></div></div></div>
-<a name="xpath_query"></a><p>
- When you call <code class="computeroutput"><span class="identifier">select_nodes</span></code>
- with an expression string as an argument, a query object is created behind
- the scenes. A query object represents a compiled XPath expression. Query
- objects can be needed in the following circumstances:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- You can precompile expressions to query objects to save compilation time
- if it becomes an issue;
- </li>
-<li class="listitem">
- You can use query objects to evaluate XPath expressions which result
- in booleans, numbers or strings;
- </li>
-<li class="listitem">
- You can get the type of expression value via query object.
- </li>
-</ul></div>
-<p>
- Query objects correspond to <code class="computeroutput"><span class="identifier">xpath_query</span></code>
- type. They are immutable and non-copyable: they are bound to the expression
- at creation time and can not be cloned. If you want to put query objects
- in a container, allocate them on heap via <code class="computeroutput"><span class="keyword">new</span></code>
- operator and store pointers to <code class="computeroutput"><span class="identifier">xpath_query</span></code>
- in the container.
- </p>
-<a name="xpath_query::ctor"></a><p>
- You can create a query object with the constructor that takes XPath expression
- as an argument:
- </p>
-<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">xpath_query</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">query</span><span class="special">,</span> <span class="identifier">xpath_variable_set</span><span class="special">*</span> <span class="identifier">variables</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
-</pre>
-<a name="xpath_query::return_type"></a><p>
- The expression is compiled and the compiled representation is stored in the
- new query object. If compilation fails, <a class="link" href="xpath.html#xpath_exception">xpath_exception</a>
- is thrown if exception handling is not disabled (see <a class="xref" href="xpath.html#manual.xpath.errors" title="Error handling"> Error handling</a> for
- details). After the query is created, you can query the type of the evaluation
- result using the following function:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_value_type</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">return_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<a name="xpath_query::evaluate_boolean"></a><a name="xpath_query::evaluate_number"></a><a name="xpath_query::evaluate_string"></a><a name="xpath_query::evaluate_node_set"></a><p>
- You can evaluate the query using one of the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">evaluate_boolean</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">double</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">evaluate_number</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">string_t</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">evaluate_string</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xpath_node_set</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">evaluate_node_set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- All functions take the context node as an argument, compute the expression
- and return the result, converted to the requested type. According to XPath
- specification, value of any type can be converted to boolean, number or string
- value, but no type other than node set can be converted to node set. Because
- of this, <code class="computeroutput"><span class="identifier">evaluate_boolean</span></code>,
- <code class="computeroutput"><span class="identifier">evaluate_number</span></code> and <code class="computeroutput"><span class="identifier">evaluate_string</span></code> always return a result,
- but <code class="computeroutput"><span class="identifier">evaluate_node_set</span></code> results
- in an error if the return type is not node set (see <a class="xref" href="xpath.html#manual.xpath.errors" title="Error handling"> Error handling</a>).
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Calling <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"query"</span><span class="special">)</span></code>
- is equivalent to calling <code class="computeroutput"><span class="identifier">xpath_query</span><span class="special">(</span><span class="string">"query"</span><span class="special">).</span><span class="identifier">evaluate_node_set</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span></code>.
- </p></td></tr>
-</table></div>
-<a name="xpath_query::evaluate_string_buffer"></a><p>
- Note that <code class="computeroutput"><span class="identifier">evaluate_string</span></code>
- function returns the STL string; as such, it's not available in <a class="link" href="install.html#PUGIXML_NO_STL">PUGIXML_NO_STL</a>
- mode and also usually allocates memory. There is another string evaluation
- function:
- </p>
-<pre class="programlisting"><span class="identifier">size_t</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">evaluate_string</span><span class="special">(</span><span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">capacity</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xpath_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- This function evaluates the string, and then writes the result to <code class="computeroutput"><span class="identifier">buffer</span></code> (but at most <code class="computeroutput"><span class="identifier">capacity</span></code>
- characters); then it returns the full size of the result in characters, including
- the terminating zero. If <code class="computeroutput"><span class="identifier">capacity</span></code>
- is not 0, the resulting buffer is always zero-terminated. You can use this
- function as follows:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- First call the function with <code class="computeroutput"><span class="identifier">buffer</span>
- <span class="special">=</span> <span class="number">0</span></code>
- and <code class="computeroutput"><span class="identifier">capacity</span> <span class="special">=</span>
- <span class="number">0</span></code>; then allocate the returned amount
- of characters, and call the function again, passing the allocated storage
- and the amount of characters;
- </li>
-<li class="listitem">
- First call the function with small buffer and buffer capacity; then,
- if the result is larger than the capacity, the output has been trimmed,
- so allocate a larger buffer and call the function again.
- </li>
-</ul></div>
-<p>
- This is an example of using query objects (<a href="../samples/xpath_query.cpp" target="_top">samples/xpath_query.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// Select nodes via compiled query
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_query</span> <span class="identifier">query_remote_tools</span><span class="special">(</span><span class="string">"/Profile/Tools/Tool[@AllowRemote='true']"</span><span class="special">);</span>
-
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span> <span class="identifier">tools</span> <span class="special">=</span> <span class="identifier">query_remote_tools</span><span class="special">.</span><span class="identifier">evaluate_node_set</span><span class="special">(</span><span class="identifier">doc</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Remote tool: "</span><span class="special">;</span>
-<span class="identifier">tools</span><span class="special">[</span><span class="number">2</span><span class="special">].</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-
-<span class="comment">// Evaluate numbers via compiled query
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_query</span> <span class="identifier">query_timeouts</span><span class="special">(</span><span class="string">"sum(//Tool/@Timeout)"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">query_timeouts</span><span class="special">.</span><span class="identifier">evaluate_number</span><span class="special">(</span><span class="identifier">doc</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// Evaluate strings via compiled query for different context nodes
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_query</span> <span class="identifier">query_name_valid</span><span class="special">(</span><span class="string">"string-length(substring-before(@Filename, '_')) &gt; 0 and @OutputFileMasks"</span><span class="special">);</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_query</span> <span class="identifier">query_name</span><span class="special">(</span><span class="string">"concat(substring-before(@Filename, '_'), ' produces ', @OutputFileMasks)"</span><span class="special">);</span>
-
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">first_element_by_path</span><span class="special">(</span><span class="string">"Profile/Tools/Tool"</span><span class="special">);</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">())</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">query_name</span><span class="special">.</span><span class="identifier">evaluate_string</span><span class="special">(</span><span class="identifier">tool</span><span class="special">);</span>
-
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">query_name_valid</span><span class="special">.</span><span class="identifier">evaluate_boolean</span><span class="special">(</span><span class="identifier">tool</span><span class="special">))</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">s</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.xpath.variables"></a><a class="link" href="xpath.html#manual.xpath.variables" title="Using variables"> Using variables</a>
-</h3></div></div></div>
-<p>
- XPath queries may contain references to variables; this is useful if you
- want to use queries that depend on some dynamic parameter without manually
- preparing the complete query string, or if you want to reuse the same query
- object for similar queries.
- </p>
-<p>
- Variable references have the form <code class="computeroutput"><span class="identifier">$name</span></code>; in order to use them, you have to provide
- a variable set, which includes all variables present in the query with correct
- types. This set is passed to <code class="computeroutput"><span class="identifier">xpath_query</span></code>
- constructor or to <code class="computeroutput"><span class="identifier">select_nodes</span></code>/<code class="computeroutput"><span class="identifier">select_single_node</span></code> functions:
- </p>
-<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">xpath_query</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">query</span><span class="special">,</span> <span class="identifier">xpath_variable_set</span><span class="special">*</span> <span class="identifier">variables</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
-<span class="identifier">xpath_node</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">select_single_node</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">query</span><span class="special">,</span> <span class="identifier">xpath_variable_set</span><span class="special">*</span> <span class="identifier">variables</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xpath_node_set</span> <span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">query</span><span class="special">,</span> <span class="identifier">xpath_variable_set</span><span class="special">*</span> <span class="identifier">variables</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- If you're using query objects, you can change the variable values before
- <code class="computeroutput"><span class="identifier">evaluate</span></code>/<code class="computeroutput"><span class="identifier">select</span></code>
- calls to change the query behavior.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- The variable set pointer is stored in the query object; you have to ensure
- that the lifetime of the set exceeds that of query object.
- </p></td></tr>
-</table></div>
-<a name="xpath_variable_set"></a><p>
- Variable sets correspond to <code class="computeroutput"><span class="identifier">xpath_variable_set</span></code>
- type, which is essentially a variable container.
- </p>
-<a name="xpath_variable_set::add"></a><p>
- You can add new variables with the following function:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_variable</span><span class="special">*</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">xpath_value_type</span> <span class="identifier">type</span><span class="special">);</span>
-</pre>
-<p>
- The function tries to add a new variable with the specified name and type;
- if the variable with such name does not exist in the set, the function adds
- a new variable and returns the variable handle; if there is already a variable
- with the specified name, the function returns the variable handle if variable
- has the specified type. Otherwise the function returns null pointer; it also
- returns null pointer on allocation failure.
- </p>
-<p>
- New variables are assigned the default value which depends on the type:
- <code class="computeroutput"><span class="number">0</span></code> for numbers, <code class="computeroutput"><span class="keyword">false</span></code> for booleans, empty string for strings
- and empty set for node sets.
- </p>
-<a name="xpath_variable_set::get"></a><p>
- You can get the existing variables with the following functions:
- </p>
-<pre class="programlisting"><span class="identifier">xpath_variable</span><span class="special">*</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">);</span>
-<span class="keyword">const</span> <span class="identifier">xpath_variable</span><span class="special">*</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- The functions return the variable handle, or null pointer if the variable
- with the specified name is not found.
- </p>
-<a name="xpath_variable_set::set"></a><p>
- Additionally, there are the helper functions for setting the variable value
- by name; they try to add the variable with the corresponding type, if it
- does not exist, and to set the value. If the variable with the same name
- but with different type is already present, they return <code class="computeroutput"><span class="keyword">false</span></code>;
- they also return <code class="computeroutput"><span class="keyword">false</span></code> on allocation
- failure. Note that these functions do not perform any type conversions.
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">value</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">value</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">value</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_variable_set</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">name</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">xpath_node_set</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">);</span>
-</pre>
-<p>
- The variable values are copied to the internal variable storage, so you can
- modify or destroy them after the functions return.
- </p>
-<a name="xpath_variable"></a><p>
- If setting variables by name is not efficient enough, or if you have to inspect
- variable information or get variable values, you can use variable handles.
- A variable corresponds to the <code class="computeroutput"><span class="identifier">xpath_variable</span></code>
- type, and a variable handle is simply a pointer to <code class="computeroutput"><span class="identifier">xpath_variable</span></code>.
- </p>
-<a name="xpath_variable::type"></a><a name="xpath_variable::name"></a><p>
- In order to get variable information, you can use one of the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">name</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="identifier">xpath_value_type</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Note that each variable has a distinct type which is specified upon variable
- creation and can not be changed later.
- </p>
-<a name="xpath_variable::get_boolean"></a><a name="xpath_variable::get_number"></a><a name="xpath_variable::get_string"></a><a name="xpath_variable::get_node_set"></a><p>
- In order to get variable value, you should use one of the following functions,
- depending on the variable type:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">get_boolean</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">double</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">get_number</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">get_string</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="keyword">const</span> <span class="identifier">xpath_node_set</span><span class="special">&amp;</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">get_node_set</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- These functions return the value of the variable. Note that no type conversions
- are performed; if the type mismatch occurs, a dummy value is returned (<code class="computeroutput"><span class="keyword">false</span></code> for booleans, <code class="computeroutput"><span class="identifier">NaN</span></code>
- for numbers, empty string for strings and empty set for node sets).
- </p>
-<a name="xpath_variable::set"></a><p>
- In order to set variable value, you should use one of the following functions,
- depending on the variable type:
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">value</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">value</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_t</span><span class="special">*</span> <span class="identifier">value</span><span class="special">);</span>
-<span class="keyword">bool</span> <span class="identifier">xpath_variable</span><span class="special">::</span><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">xpath_node_set</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">);</span>
-</pre>
-<p>
- These functions modify the variable value. Note that no type conversions
- are performed; if the type mismatch occurs, the functions return <code class="computeroutput"><span class="keyword">false</span></code>; they also return <code class="computeroutput"><span class="keyword">false</span></code>
- on allocation failure. The variable values are copied to the internal variable
- storage, so you can modify or destroy them after the functions return.
- </p>
-<p>
- This is an example of using variables in XPath queries (<a href="../samples/xpath_variables.cpp" target="_top">samples/xpath_variables.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// Select nodes via compiled query
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_variable_set</span> <span class="identifier">vars</span><span class="special">;</span>
-<span class="identifier">vars</span><span class="special">.</span><span class="identifier">add</span><span class="special">(</span><span class="string">"remote"</span><span class="special">,</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_type_boolean</span><span class="special">);</span>
-
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_query</span> <span class="identifier">query_remote_tools</span><span class="special">(</span><span class="string">"/Profile/Tools/Tool[@AllowRemote = string($remote)]"</span><span class="special">,</span> <span class="special">&amp;</span><span class="identifier">vars</span><span class="special">);</span>
-
-<span class="identifier">vars</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="string">"remote"</span><span class="special">,</span> <span class="keyword">true</span><span class="special">);</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span> <span class="identifier">tools_remote</span> <span class="special">=</span> <span class="identifier">query_remote_tools</span><span class="special">.</span><span class="identifier">evaluate_node_set</span><span class="special">(</span><span class="identifier">doc</span><span class="special">);</span>
-
-<span class="identifier">vars</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="string">"remote"</span><span class="special">,</span> <span class="keyword">false</span><span class="special">);</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span> <span class="identifier">tools_local</span> <span class="special">=</span> <span class="identifier">query_remote_tools</span><span class="special">.</span><span class="identifier">evaluate_node_set</span><span class="special">(</span><span class="identifier">doc</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Remote tool: "</span><span class="special">;</span>
-<span class="identifier">tools_remote</span><span class="special">[</span><span class="number">2</span><span class="special">].</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Local tool: "</span><span class="special">;</span>
-<span class="identifier">tools_local</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-
-<span class="comment">// You can pass the context directly to select_nodes/select_single_node
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span> <span class="identifier">tools_local_imm</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"/Profile/Tools/Tool[@AllowRemote = string($remote)]"</span><span class="special">,</span> <span class="special">&amp;</span><span class="identifier">vars</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Local tool imm: "</span><span class="special">;</span>
-<span class="identifier">tools_local_imm</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">print</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.xpath.errors"></a><a class="link" href="xpath.html#manual.xpath.errors" title="Error handling"> Error handling</a>
-</h3></div></div></div>
-<p>
- There are two different mechanisms for error handling in XPath implementation;
- the mechanism used depends on whether exception support is disabled (this
- is controlled with <a class="link" href="install.html#PUGIXML_NO_EXCEPTIONS">PUGIXML_NO_EXCEPTIONS</a>
- define).
- </p>
-<a name="xpath_exception"></a><a name="xpath_exception::result"></a><a name="xpath_exception::what"></a><p>
- By default, XPath functions throw <code class="computeroutput"><span class="identifier">xpath_exception</span></code>
- object in case of errors; additionally, in the event any memory allocation
- fails, an <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code> exception is thrown. Also <code class="computeroutput"><span class="identifier">xpath_exception</span></code> is thrown if the query
- is evaluated to a node set, but the return type is not node set. If the query
- constructor succeeds (i.e. no exception is thrown), the query object is valid.
- Otherwise you can get the error details via one of the following functions:
- </p>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">xpath_exception</span><span class="special">::</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="keyword">throw</span><span class="special">();</span>
-<span class="keyword">const</span> <span class="identifier">xpath_parse_result</span><span class="special">&amp;</span> <span class="identifier">xpath_exception</span><span class="special">::</span><span class="identifier">result</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<a name="xpath_query::unspecified_bool_type"></a><a name="xpath_query::result"></a><p>
- If exceptions are disabled, then in the event of parsing failure the query
- is initialized to invalid state; you can test if the query object is valid
- by using it in a boolean expression: <code class="computeroutput"><span class="keyword">if</span>
- <span class="special">(</span><span class="identifier">query</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span></code>. Additionally, you can get parsing
- result via the result() accessor:
- </p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">xpath_parse_result</span><span class="special">&amp;</span> <span class="identifier">xpath_query</span><span class="special">::</span><span class="identifier">result</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Without exceptions, evaluating invalid query results in <code class="computeroutput"><span class="keyword">false</span></code>,
- empty string, NaN or an empty node set, depending on the type; evaluating
- a query as a node set results in an empty node set if the return type is
- not node set.
- </p>
-<a name="xpath_parse_result"></a><p>
- The information about parsing result is returned via <code class="computeroutput"><span class="identifier">xpath_parse_result</span></code>
- object. It contains parsing status and the offset of last successfully parsed
- character from the beginning of the source stream:
- </p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xpath_parse_result</span>
-<span class="special">{</span>
- <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">error</span><span class="special">;</span>
- <span class="identifier">ptrdiff_t</span> <span class="identifier">offset</span><span class="special">;</span>
-
- <span class="keyword">operator</span> <span class="keyword">bool</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">description</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-<a name="xpath_parse_result::error"></a><p>
- Parsing result is represented as the error message; it is either a null pointer,
- in case there is no error, or the error message in the form of ASCII zero-terminated
- string.
- </p>
-<a name="xpath_parse_result::description"></a><p>
- <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code>
- member function can be used to get the error message; it never returns the
- null pointer, so you can safely use <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code> even if query parsing succeeded. Note that
- <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code>
- returns a <code class="computeroutput"><span class="keyword">char</span></code> string even in
- <code class="computeroutput"><span class="identifier">PUGIXML_WCHAR_MODE</span></code>; you'll
- have to call <a class="link" href="dom.html#as_wide">as_wide</a> to get the <code class="computeroutput"><span class="keyword">wchar_t</span></code> string.
- </p>
-<a name="xpath_parse_result::offset"></a><p>
- In addition to the error message, parsing result has an <code class="computeroutput"><span class="identifier">offset</span></code>
- member, which contains the offset of last successfully parsed character.
- This offset is in units of <a class="link" href="dom.html#char_t">pugi::char_t</a> (bytes
- for character mode, wide characters for wide character mode).
- </p>
-<a name="xpath_parse_result::bool"></a><p>
- Parsing result object can be implicitly converted to <code class="computeroutput"><span class="keyword">bool</span></code>
- like this: <code class="computeroutput"><span class="keyword">if</span> <span class="special">(</span><span class="identifier">result</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span>
- <span class="keyword">else</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span></code>.
- </p>
-<p>
- This is an example of XPath error handling (<a href="../samples/xpath_error.cpp" target="_top">samples/xpath_error.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// Exception is thrown for incorrect query syntax
-</span><span class="keyword">try</span>
-<span class="special">{</span>
- <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"//nodes[#true()]"</span><span class="special">);</span>
-<span class="special">}</span>
-<span class="keyword">catch</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_exception</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Select failed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="comment">// Exception is thrown for incorrect query semantics
-</span><span class="keyword">try</span>
-<span class="special">{</span>
- <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"(123)/next"</span><span class="special">);</span>
-<span class="special">}</span>
-<span class="keyword">catch</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_exception</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Select failed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-
-<span class="comment">// Exception is thrown for query with incorrect return type
-</span><span class="keyword">try</span>
-<span class="special">{</span>
- <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"123"</span><span class="special">);</span>
-<span class="special">}</span>
-<span class="keyword">catch</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_exception</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Select failed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="manual.xpath.w3c"></a><a class="link" href="xpath.html#manual.xpath.w3c" title="Conformance to W3C specification"> Conformance to W3C specification</a>
-</h3></div></div></div>
-<p>
- Because of the differences in document object models, performance considerations
- and implementation complexity, pugixml does not provide a fully conformant
- XPath 1.0 implementation. This is the current list of incompatibilities:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Consecutive text nodes sharing the same parent are not merged, i.e. in
- <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;</span><span class="identifier">text1</span>
- <span class="special">&lt;![</span><span class="identifier">CDATA</span><span class="special">[</span><span class="identifier">data</span><span class="special">]]&gt;</span> <span class="identifier">text2</span><span class="special">&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code> node should have one text node children,
- but instead has three.
- </li>
-<li class="listitem">
- Since the document type declaration is not used for parsing, <code class="computeroutput"><span class="identifier">id</span><span class="special">()</span></code>
- function always returns an empty node set.
- </li>
-<li class="listitem">
- Namespace nodes are not supported (affects namespace:: axis).
- </li>
-<li class="listitem">
- Name tests are performed on QNames in XML document instead of expanded
- names; for <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">foo</span>
- <span class="identifier">xmlns</span><span class="special">:</span><span class="identifier">ns1</span><span class="special">=</span><span class="char">'uri'</span> <span class="identifier">xmlns</span><span class="special">:</span><span class="identifier">ns2</span><span class="special">=</span><span class="char">'uri'</span><span class="special">&gt;&lt;</span><span class="identifier">ns1</span><span class="special">:</span><span class="identifier">child</span><span class="special">/&gt;&lt;</span><span class="identifier">ns2</span><span class="special">:</span><span class="identifier">child</span><span class="special">/&gt;&lt;/</span><span class="identifier">foo</span><span class="special">&gt;</span></code>,
- query <code class="computeroutput"><span class="identifier">foo</span><span class="special">/</span><span class="identifier">ns1</span><span class="special">:*</span></code>
- will return only the first child, not both of them. Compliant XPath implementations
- can return both nodes if the user provides appropriate namespace declarations.
- </li>
-<li class="listitem">
- String functions consider a character to be either a single <code class="computeroutput"><span class="keyword">char</span></code> value or a single <code class="computeroutput"><span class="keyword">wchar_t</span></code>
- value, depending on the library configuration; this means that some string
- functions are not fully Unicode-aware. This affects <code class="computeroutput"><span class="identifier">substring</span><span class="special">()</span></code>, <code class="computeroutput"><span class="identifier">string</span><span class="special">-</span><span class="identifier">length</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">translate</span><span class="special">()</span></code> functions.
- </li>
-</ul></div>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Arseny Kapoulkine<p>
- Distributed under the MIT License
- </p>
-</div></td>
-</tr></table>
-<hr>
-<table width="100%"><tr>
-<td>
-<a href="http://pugixml.org/">pugixml 1.2</a> manual |
- <a href="../manual.html">Overview</a> |
- <a href="install.html">Installation</a> |
- Document:
- <a href="dom.html">Object model</a> &middot; <a href="loading.html">Loading</a> &middot; <a href="access.html">Accessing</a> &middot; <a href="modify.html">Modifying</a> &middot; <a href="saving.html">Saving</a> |
- <b>XPath</b> |
- <a href="apiref.html">API Reference</a> |
- <a href="toc.html">Table of Contents</a>
-</td>
-<td width="*" align="right"><div class="spirit-nav">
-<a accesskey="p" href="saving.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../manual.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../manual.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="changes.html"><img src="../images/next.png" alt="Next"></a>
-</div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/pugixml.css b/SDL_Core/tools/intergen/third_party/pugixml/docs/pugixml.css
deleted file mode 100644
index 0a72f7814..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/pugixml.css
+++ /dev/null
@@ -1,598 +0,0 @@
-/*=============================================================================
- Copyright (c) 2004 Joel de Guzman
- http://spirit.sourceforge.net/
-
- Distributed under the Boost Software License, Version 1.0. (See accompany-
- ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-
-/*=============================================================================
- Body defaults
-=============================================================================*/
-
- body
- {
- margin: 1em;
- font-family: sans-serif;
- }
-
-/*=============================================================================
- Paragraphs
-=============================================================================*/
-
- p
- {
- text-align: left;
- font-size: 10pt;
- line-height: 1.15;
- }
-
-/*=============================================================================
- Program listings
-=============================================================================*/
-
- /* Code on paragraphs */
- p tt.computeroutput
- {
- font-size: 9pt;
- }
-
- pre.synopsis
- {
- font-size: 90%;
- margin: 1pc 4% 0pc 4%;
- padding: 0.5pc 0.5pc 0.5pc 0.5pc;
- }
-
- .programlisting,
- .screen
- {
- font-size: 9pt;
- display: block;
- margin: 1pc 4% 0pc 4%;
- padding: 0.5pc 0.5pc 0.5pc 0.5pc;
- }
-
- /* Program listings in tables don't get borders */
- td .programlisting,
- td .screen
- {
- margin: 0pc 0pc 0pc 0pc;
- padding: 0pc 0pc 0pc 0pc;
- }
-
-/*=============================================================================
- Headings
-=============================================================================*/
-
- h1, h2, h3, h4, h5, h6
- {
- text-align: left;
- margin: 1em 0em 0.5em 0em;
- font-weight: bold;
- }
-
- h1 { font: 140% }
- h2 { font: bold 140% }
- h3 { font: bold 130% }
- h4 { font: bold 120% }
- h5 { font: italic 110% }
- h6 { font: italic 100% }
-
- /* Top page titles */
- title,
- h1.title,
- h2.title
- h3.title,
- h4.title,
- h5.title,
- h6.title,
- .refentrytitle
- {
- font-weight: bold;
- margin-bottom: 1pc;
- }
-
- h1.title { font-size: 140% }
- h2.title { font-size: 140% }
- h3.title { font-size: 130% }
- h4.title { font-size: 120% }
- h5.title { font-size: 110% }
- h6.title { font-size: 100% }
-
- .section h1
- {
- margin: 0em 0em 0.5em 0em;
- font-size: 140%;
- }
-
- .section h2 { font-size: 140% }
- .section h3 { font-size: 130% }
- .section h4 { font-size: 120% }
- .section h5 { font-size: 110% }
- .section h6 { font-size: 100% }
-
- /* Code on titles */
- h1 tt.computeroutput { font-size: 140% }
- h2 tt.computeroutput { font-size: 140% }
- h3 tt.computeroutput { font-size: 130% }
- h4 tt.computeroutput { font-size: 130% }
- h5 tt.computeroutput { font-size: 130% }
- h6 tt.computeroutput { font-size: 130% }
-
-
-/*=============================================================================
- Author
-=============================================================================*/
-
- h3.author
- {
- font-size: 100%
- }
-
-/*=============================================================================
- Lists
-=============================================================================*/
-
- li
- {
- font-size: 10pt;
- line-height: 1.3;
- }
-
- /* Unordered lists */
- ul
- {
- text-align: left;
- }
-
- /* Ordered lists */
- ol
- {
- text-align: left;
- }
-
-/*=============================================================================
- Links
-=============================================================================*/
-
- a
- {
- text-decoration: none; /* no underline */
- }
-
- a:hover
- {
- text-decoration: underline;
- }
-
-/*=============================================================================
- Spirit style navigation
-=============================================================================*/
-
- .spirit-nav
- {
- text-align: right;
- }
-
- .spirit-nav a
- {
- color: white;
- padding-left: 0.5em;
- }
-
- .spirit-nav img
- {
- border-width: 0px;
- }
-
-/*=============================================================================
- Copyright footer
-=============================================================================*/
- .copyright-footer
- {
- text-align: right;
- font-size: 70%;
- }
-
- .copyright-footer p
- {
- text-align: right;
- font-size: 80%;
- }
-
-/*=============================================================================
- Table of contents
-=============================================================================*/
-
- .toc
- {
- margin: 1pc 4% 0pc 4%;
- padding: 0.1pc 1pc 0.1pc 1pc;
- font-size: 80%;
- line-height: 1.15;
- }
-
- .boost-toc
- {
- float: right;
- padding: 0.5pc;
- }
-
- /* Code on toc */
- .toc .computeroutput { font-size: 120% }
-
-/*=============================================================================
- Tables
-=============================================================================*/
-
- .table-title,
- div.table p.title
- {
- margin-left: 4%;
- padding-right: 0.5em;
- padding-left: 0.5em;
- }
-
- .informaltable table,
- .table table
- {
- width: 92%;
- margin-left: 4%;
- margin-right: 4%;
- }
-
- div.informaltable table,
- div.table table
- {
- padding: 4px;
- }
-
- /* Table Cells */
- div.informaltable table tr td,
- div.table table tr td
- {
- padding: 0.5em;
- text-align: left;
- font-size: 9pt;
- }
-
- div.informaltable table tr th,
- div.table table tr th
- {
- padding: 0.5em 0.5em 0.5em 0.5em;
- border: 1pt solid white;
- font-size: 80%;
- }
-
- table.simplelist
- {
- width: auto !important;
- margin: 0em !important;
- padding: 0em !important;
- border: none !important;
- }
- table.simplelist td
- {
- margin: 0em !important;
- padding: 0em !important;
- text-align: left !important;
- font-size: 9pt !important;
- border: none !important;
- }
-
-/*=============================================================================
- Blurbs
-=============================================================================*/
-
- div.note,
- div.tip,
- div.important,
- div.caution,
- div.warning,
- p.blurb
- {
- font-size: 9pt; /* A little bit smaller than the main text */
- line-height: 1.2;
- display: block;
- margin: 1pc 4% 0pc 4%;
- padding: 0.5pc 0.5pc 0.5pc 0.5pc;
- }
-
- p.blurb img
- {
- padding: 1pt;
- }
-
-/*=============================================================================
- Variable Lists
-=============================================================================*/
-
- div.variablelist
- {
- margin: 1em 0;
- }
-
- /* Make the terms in definition lists bold */
- div.variablelist dl dt,
- span.term
- {
- font-weight: bold;
- font-size: 10pt;
- }
-
- div.variablelist table tbody tr td
- {
- text-align: left;
- vertical-align: top;
- padding: 0em 2em 0em 0em;
- font-size: 10pt;
- margin: 0em 0em 0.5em 0em;
- line-height: 1;
- }
-
- div.variablelist dl dt
- {
- margin-bottom: 0.2em;
- }
-
- div.variablelist dl dd
- {
- margin: 0em 0em 0.5em 2em;
- font-size: 10pt;
- }
-
- div.variablelist table tbody tr td p,
- div.variablelist dl dd p
- {
- margin: 0em 0em 0.5em 0em;
- line-height: 1;
- }
-
-/*=============================================================================
- Misc
-=============================================================================*/
-
- /* Title of books and articles in bibliographies */
- span.title
- {
- font-style: italic;
- }
-
- span.underline
- {
- text-decoration: underline;
- }
-
- span.strikethrough
- {
- text-decoration: line-through;
- }
-
- /* Copyright, Legal Notice */
- div div.legalnotice p
- {
- text-align: left
- }
-
-/*=============================================================================
- Colors
-=============================================================================*/
-
- @media screen
- {
- body {
- background-color: #FFFFFF;
- color: #000000;
- }
-
- /* Links */
- a
- {
- color: #005a9c;
- }
-
- a:visited
- {
- color: #9c5a9c;
- }
-
- h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
- h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
- h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
- {
- text-decoration: none; /* no underline */
- color: #000000;
- }
-
- /* Syntax Highlighting */
- .keyword { color: #0000AA; }
- .identifier { color: #000000; }
- .special { color: #707070; }
- .preprocessor { color: #402080; }
- .char { color: teal; }
- .comment { color: #800000; }
- .string { color: teal; }
- .number { color: teal; }
- .white_bkd { background-color: #FFFFFF; }
- .dk_grey_bkd { background-color: #999999; }
-
- /* Copyright, Legal Notice */
- .copyright
- {
- color: #666666;
- font-size: small;
- }
-
- div div.legalnotice p
- {
- color: #666666;
- }
-
- /* Program listing */
- pre.synopsis
- {
- border: 1px solid #DCDCDC;
- }
-
- .programlisting,
- .screen
- {
- border: 1px solid #DCDCDC;
- }
-
- td .programlisting,
- td .screen
- {
- border: 0px solid #DCDCDC;
- }
-
- /* Blurbs */
- div.note,
- div.tip,
- div.important,
- div.caution,
- div.warning,
- p.blurb
- {
- border: 1px solid #DCDCDC;
- }
-
- /* Table of contents */
- .toc
- {
- border: 1px solid #DCDCDC;
- }
-
- /* Tables */
- div.informaltable table tr td,
- div.table table tr td
- {
- border: 1px solid #DCDCDC;
- }
-
- div.informaltable table tr th,
- div.table table tr th
- {
- background-color: #F0F0F0;
- border: 1px solid #DCDCDC;
- }
-
- .copyright-footer
- {
- color: #8F8F8F;
- }
-
- /* Misc */
- span.highlight
- {
- color: #00A000;
- }
- }
-
- @media print
- {
- /* Links */
- a
- {
- color: black;
- }
-
- a:visited
- {
- color: black;
- }
-
- .spirit-nav
- {
- display: none;
- }
-
- /* Program listing */
- pre.synopsis
- {
- border: 1px solid gray;
- }
-
- .programlisting,
- .screen
- {
- border: 1px solid gray;
- }
-
- td .programlisting,
- td .screen
- {
- border: 0px solid #DCDCDC;
- }
-
- /* Table of contents */
- .toc
- {
- border: 1px solid gray;
- }
-
- .informaltable table,
- .table table
- {
- border: 1px solid gray;
- border-collapse: collapse;
- }
-
- /* Tables */
- div.informaltable table tr td,
- div.table table tr td
- {
- border: 1px solid gray;
- }
-
- div.informaltable table tr th,
- div.table table tr th
- {
- border: 1px solid gray;
- }
-
- table.simplelist tr td
- {
- border: none !important;
- }
-
- /* Misc */
- span.highlight
- {
- font-weight: bold;
- }
- }
-
-/*=============================================================================
- Images
-=============================================================================*/
-
- span.inlinemediaobject img
- {
- vertical-align: middle;
- }
-
-/*==============================================================================
- Super and Subscript: style so that line spacing isn't effected, see
- http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
-==============================================================================*/
-
-sup,
-sub {
- height: 0;
- line-height: 1;
- vertical-align: baseline;
- _vertical-align: bottom;
- position: relative;
-
-}
-
-sup {
- bottom: 1ex;
-}
-
-sub {
- top: .5ex;
-}
-
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/quickstart.html b/SDL_Core/tools/intergen/third_party/pugixml/docs/quickstart.html
deleted file mode 100644
index 6afd25dd9..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/quickstart.html
+++ /dev/null
@@ -1,879 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>pugixml 1.2</title>
-<link rel="stylesheet" href="pugixml.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="quickstart.html" title="pugixml 1.2">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<div class="article">
-<div class="section">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="quickstart.main"></a><a class="link" href="quickstart.html#quickstart.main" title="pugixml 1.2 quick start guide"> pugixml 1.2 quick start guide</a>
-</h2></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.introduction"> Introduction</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.install"> Installation</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.dom"> Document object model</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.loading"> Loading document</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.access"> Accessing document data</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.modify"> Modifying document data</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.saving"> Saving document</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.feedback"> Feedback</a></span></dt>
-<dt><span class="section"><a href="quickstart.html#quickstart.main.license"> License</a></span></dt>
-</dl></div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.introduction"></a><a class="link" href="quickstart.html#quickstart.main.introduction" title="Introduction"> Introduction</a>
-</h3></div></div></div>
-<p>
- <a href="http://pugixml.org/" target="_top">pugixml</a> is a light-weight C++ XML
- processing library. It consists of a DOM-like interface with rich traversal/modification
- capabilities, an extremely fast XML parser which constructs the DOM tree
- from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven
- tree queries. Full Unicode support is also available, with Unicode interface
- variants and conversions between different Unicode encodings (which happen
- automatically during parsing/saving). The library is extremely portable and
- easy to integrate and use. pugixml is developed and maintained since 2006
- and has many users. All code is distributed under the <a class="link" href="quickstart.html#quickstart.main.license" title="License">MIT
- license</a>, making it completely free to use in both open-source and
- proprietary applications.
- </p>
-<p>
- pugixml enables very fast, convenient and memory-efficient XML document processing.
- However, since pugixml has a DOM parser, it can't process XML documents that
- do not fit in memory; also the parser is a non-validating one, so if you
- need DTD/Schema validation, the library is not for you.
- </p>
-<p>
- This is the quick start guide for pugixml, which purpose is to enable you
- to start using the library quickly. Many important library features are either
- not described at all or only mentioned briefly; for more complete information
- you <a href="manual.html" target="_top">should read the complete manual</a>.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- No documentation is perfect, neither is this one. If you encounter a description
- that is unclear, please file an issue as described in <a class="xref" href="quickstart.html#quickstart.main.feedback" title="Feedback"> Feedback</a>. Also if
- you can spare the time for a full proof-reading, including spelling and
- grammar, that would be great! Please <a class="link" href="quickstart.html#email">send me an e-mail</a>;
- as a token of appreciation, your name will be included into the corresponding
- section of the manual.
- </p></td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.install"></a><a class="link" href="quickstart.html#quickstart.main.install" title="Installation"> Installation</a>
-</h3></div></div></div>
-<p>
- pugixml is distributed in source form. You can download a source distribution
- via one of the following links:
- </p>
-<pre class="programlisting"><a href="http://pugixml.googlecode.com/files/pugixml-1.2.zip" target="_top">http://pugixml.googlecode.com/files/pugixml-1.2.zip</a>
-<a href="http://pugixml.googlecode.com/files/pugixml-1.2.tar.gz" target="_top">http://pugixml.googlecode.com/files/pugixml-1.2.tar.gz</a>
-</pre>
-<p>
- The distribution contains library source, documentation (the guide you're
- reading now and the manual) and some code examples. After downloading the
- distribution, install pugixml by extracting all files from the compressed
- archive. The files have different line endings depending on the archive format
- - <code class="filename">.zip</code> archive has Windows line endings, <code class="filename">.tar.gz</code> archive has Unix line endings.
- Otherwise the files in both archives are identical.
- </p>
-<p>
- The complete pugixml source consists of three files - one source file, <code class="filename">pugixml.cpp</code>,
- and two header files, <code class="filename">pugixml.hpp</code> and <code class="filename">pugiconfig.hpp</code>. <code class="filename">pugixml.hpp</code> is the primary
- header which you need to include in order to use pugixml classes/functions.
- The rest of this guide assumes that <code class="filename">pugixml.hpp</code> is either in the current directory
- or in one of include directories of your projects, so that <code class="computeroutput"><span class="preprocessor">#include</span> <span class="string">"pugixml.hpp"</span></code>
- can find the header; however you can also use relative path (i.e. <code class="computeroutput"><span class="preprocessor">#include</span> <span class="string">"../libs/pugixml/src/pugixml.hpp"</span></code>)
- or include directory-relative path (i.e. <code class="computeroutput"><span class="preprocessor">#include</span>
- <span class="special">&lt;</span><span class="identifier">xml</span><span class="special">/</span><span class="identifier">thirdparty</span><span class="special">/</span><span class="identifier">pugixml</span><span class="special">/</span><span class="identifier">src</span><span class="special">/</span><span class="identifier">pugixml</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>).
- </p>
-<p>
- The easiest way to build pugixml is to compile the source file, <code class="filename">pugixml.cpp</code>,
- along with the existing library/executable. This process depends on the method
- of building your application; for example, if you're using Microsoft Visual
- Studio<sup>[<a name="trademarks" href="#ftn.trademarks" class="footnote">1</a>]</sup>,
- Apple Xcode, Code::Blocks or any other IDE, just add <code class="filename">pugixml.cpp</code> to one of
- your projects. There are other building methods available, including building
- pugixml as a standalone static/shared library; <a href="manual/install.html#manual.install.building" target="_top">read
- the manual</a> for further information.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.dom"></a><a class="link" href="quickstart.html#quickstart.main.dom" title="Document object model"> Document object model</a>
-</h3></div></div></div>
-<p>
- pugixml stores XML data in DOM-like way: the entire XML document (both document
- structure and element data) is stored in memory as a tree. The tree can be
- loaded from character stream (file, string, C++ I/O stream), then traversed
- via special API or XPath expressions. The whole tree is mutable: both node
- structure and node/attribute data can be changed at any time. Finally, the
- result of document transformations can be saved to a character stream (file,
- C++ I/O stream or custom transport).
- </p>
-<p>
- The root of the tree is the document itself, which corresponds to C++ type
- <code class="computeroutput"><span class="identifier">xml_document</span></code>. Document has
- one or more child nodes, which correspond to C++ type <code class="computeroutput"><span class="identifier">xml_node</span></code>.
- Nodes have different types; depending on a type, a node can have a collection
- of child nodes, a collection of attributes, which correspond to C++ type
- <code class="computeroutput"><span class="identifier">xml_attribute</span></code>, and some additional
- data (i.e. name).
- </p>
-<p>
- The most common node types are:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- Document node (<code class="computeroutput"><span class="identifier">node_document</span></code>)
- - this is the root of the tree, which consists of several child nodes.
- This node corresponds to <code class="computeroutput"><span class="identifier">xml_document</span></code>
- class; note that <code class="computeroutput"><span class="identifier">xml_document</span></code>
- is a sub-class of <code class="computeroutput"><span class="identifier">xml_node</span></code>,
- so the entire node interface is also available.
- </li>
-<li class="listitem">
- Element/tag node (<code class="computeroutput"><span class="identifier">node_element</span></code>)
- - this is the most common type of node, which represents XML elements.
- Element nodes have a name, a collection of attributes and a collection
- of child nodes (both of which may be empty). The attribute is a simple
- name/value pair.
- </li>
-<li class="listitem">
- Plain character data nodes (<code class="computeroutput"><span class="identifier">node_pcdata</span></code>)
- represent plain text in XML. PCDATA nodes have a value, but do not have
- name or children/attributes. Note that <span class="bold"><strong>plain character
- data is not a part of the element node but instead has its own node</strong></span>;
- for example, an element node can have several child PCDATA nodes.
- </li>
-</ul></div>
-<p>
- Despite the fact that there are several node types, there are only three
- C++ types representing the tree (<code class="computeroutput"><span class="identifier">xml_document</span></code>,
- <code class="computeroutput"><span class="identifier">xml_node</span></code>, <code class="computeroutput"><span class="identifier">xml_attribute</span></code>);
- some operations on <code class="computeroutput"><span class="identifier">xml_node</span></code>
- are only valid for certain node types. They are described below.
- </p>
-<div class="note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- All pugixml classes and functions are located in <code class="computeroutput"><span class="identifier">pugi</span></code>
- namespace; you have to either use explicit name qualification (i.e. <code class="computeroutput"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span></code>), or to gain access to relevant
- symbols via <code class="computeroutput"><span class="keyword">using</span></code> directive
- (i.e. <code class="computeroutput"><span class="keyword">using</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span><span class="special">;</span></code> or <code class="computeroutput"><span class="keyword">using</span>
- <span class="keyword">namespace</span> <span class="identifier">pugi</span><span class="special">;</span></code>).
- </p></td></tr>
-</table></div>
-<p>
- <code class="computeroutput"><span class="identifier">xml_document</span></code> is the owner
- of the entire document structure; destroying the document destroys the whole
- tree. The interface of <code class="computeroutput"><span class="identifier">xml_document</span></code>
- consists of loading functions, saving functions and the entire interface
- of <code class="computeroutput"><span class="identifier">xml_node</span></code>, which allows
- for document inspection and/or modification. Note that while <code class="computeroutput"><span class="identifier">xml_document</span></code> is a sub-class of <code class="computeroutput"><span class="identifier">xml_node</span></code>, <code class="computeroutput"><span class="identifier">xml_node</span></code>
- is not a polymorphic type; the inheritance is present only to simplify usage.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">xml_node</span></code> is the handle to
- document node; it can point to any node in the document, including document
- itself. There is a common interface for nodes of all types. Note that <code class="computeroutput"><span class="identifier">xml_node</span></code> is only a handle to the actual
- node, not the node itself - you can have several <code class="computeroutput"><span class="identifier">xml_node</span></code>
- handles pointing to the same underlying object. Destroying <code class="computeroutput"><span class="identifier">xml_node</span></code> handle does not destroy the node
- and does not remove it from the tree.
- </p>
-<p>
- There is a special value of <code class="computeroutput"><span class="identifier">xml_node</span></code>
- type, known as null node or empty node. It does not correspond to any node
- in any document, and thus resembles null pointer. However, all operations
- are defined on empty nodes; generally the operations don't do anything and
- return empty nodes/attributes or empty strings as their result. This is useful
- for chaining calls; i.e. you can get the grandparent of a node like so:
- <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">parent</span><span class="special">().</span><span class="identifier">parent</span><span class="special">()</span></code>;
- if a node is a null node or it does not have a parent, the first <code class="computeroutput"><span class="identifier">parent</span><span class="special">()</span></code>
- call returns null node; the second <code class="computeroutput"><span class="identifier">parent</span><span class="special">()</span></code> call then also returns null node, so you
- don't have to check for errors twice. You can test if a handle is null via
- implicit boolean cast: <code class="computeroutput"><span class="keyword">if</span> <span class="special">(</span><span class="identifier">node</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span></code>
- or <code class="computeroutput"><span class="keyword">if</span> <span class="special">(!</span><span class="identifier">node</span><span class="special">)</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span></code>.
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">xml_attribute</span></code> is the handle
- to an XML attribute; it has the same semantics as <code class="computeroutput"><span class="identifier">xml_node</span></code>,
- i.e. there can be several <code class="computeroutput"><span class="identifier">xml_attribute</span></code>
- handles pointing to the same underlying object and there is a special null
- attribute value, which propagates to function results.
- </p>
-<p>
- There are two choices of interface and internal representation when configuring
- pugixml: you can either choose the UTF-8 (also called char) interface or
- UTF-16/32 (also called wchar_t) one. The choice is controlled via <code class="computeroutput"><span class="identifier">PUGIXML_WCHAR_MODE</span></code> define; you can set
- it via <code class="filename">pugiconfig.hpp</code> or via preprocessor options. All tree functions that
- work with strings work with either C-style null terminated strings or STL
- strings of the selected character type. <a href="manual/dom.html#manual.dom.unicode" target="_top">Read
- the manual</a> for additional information on Unicode interface.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.loading"></a><a class="link" href="quickstart.html#quickstart.main.loading" title="Loading document"> Loading document</a>
-</h3></div></div></div>
-<p>
- pugixml provides several functions for loading XML data from various places
- - files, C++ iostreams, memory buffers. All functions use an extremely fast
- non-validating parser. This parser is not fully W3C conformant - it can load
- any valid XML document, but does not perform some well-formedness checks.
- While considerable effort is made to reject invalid XML documents, some validation
- is not performed because of performance reasons. XML data is always converted
- to internal character format before parsing. pugixml supports all popular
- Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and
- little endian); UCS-2 is naturally supported since it's a strict subset of
- UTF-16) and handles all encoding conversions automatically.
- </p>
-<p>
- The most common source of XML data is files; pugixml provides a separate
- function for loading XML document from file. This function accepts file path
- as its first argument, and also two optional arguments, which specify parsing
- options and input data encoding, which are described in the manual.
- </p>
-<p>
- This is an example of loading XML document from file (<a href="samples/load_file.cpp" target="_top">samples/load_file.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_file</span><span class="special">(</span><span class="string">"tree.xml"</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Load result: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">description</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">", mesh name: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"mesh"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
- <code class="computeroutput"><span class="identifier">load_file</span></code>, as well as other
- loading functions, destroys the existing document tree and then tries to
- load the new tree from the specified file. The result of the operation is
- returned in an <code class="computeroutput"><span class="identifier">xml_parse_result</span></code>
- object; this object contains the operation status, and the related information
- (i.e. last successfully parsed position in the input file, if parsing fails).
- </p>
-<p>
- Parsing result object can be implicitly converted to <code class="computeroutput"><span class="keyword">bool</span></code>;
- if you do not want to handle parsing errors thoroughly, you can just check
- the return value of load functions as if it was a <code class="computeroutput"><span class="keyword">bool</span></code>:
- <code class="computeroutput"><span class="keyword">if</span> <span class="special">(</span><span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_file</span><span class="special">(</span><span class="string">"file.xml"</span><span class="special">))</span> <span class="special">{</span> <span class="special">...</span>
- <span class="special">}</span> <span class="keyword">else</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span></code>.
- Otherwise you can use the <code class="computeroutput"><span class="identifier">status</span></code>
- member to get parsing status, or the <code class="computeroutput"><span class="identifier">description</span><span class="special">()</span></code> member function to get the status in a
- string form.
- </p>
-<p>
- This is an example of handling loading errors (<a href="samples/load_error_handling.cpp" target="_top">samples/load_error_handling.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_document</span> <span class="identifier">doc</span><span class="special">;</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">source</span><span class="special">);</span>
-
-<span class="keyword">if</span> <span class="special">(</span><span class="identifier">result</span><span class="special">)</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"XML ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">source</span> <span class="special">&lt;&lt;</span> <span class="string">"] parsed without errors, attr value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"attr"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n\n"</span><span class="special">;</span>
-<span class="keyword">else</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"XML ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">source</span> <span class="special">&lt;&lt;</span> <span class="string">"] parsed with errors, attr value: ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"attr"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error description: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">description</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error offset: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">offset</span> <span class="special">&lt;&lt;</span> <span class="string">" (error at [..."</span> <span class="special">&lt;&lt;</span> <span class="special">(</span><span class="identifier">source</span> <span class="special">+</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">offset</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"]\n\n"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<p>
- Sometimes XML data should be loaded from some other source than file, i.e.
- HTTP URL; also you may want to load XML data from file using non-standard
- functions, i.e. to use your virtual file system facilities or to load XML
- from gzip-compressed files. These scenarios either require loading document
- from memory, in which case you should prepare a contiguous memory block with
- all XML data and to pass it to one of buffer loading functions, or loading
- document from C++ IOstream, in which case you should provide an object which
- implements <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream</span></code> or <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wistream</span></code>
- interface.
- </p>
-<p>
- There are different functions for loading document from memory; they treat
- the passed buffer as either an immutable one (<code class="computeroutput"><span class="identifier">load_buffer</span></code>),
- a mutable buffer which is owned by the caller (<code class="computeroutput"><span class="identifier">load_buffer_inplace</span></code>),
- or a mutable buffer which ownership belongs to pugixml (<code class="computeroutput"><span class="identifier">load_buffer_inplace_own</span></code>).
- There is also a simple helper function, <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">load</span></code>,
- for cases when you want to load the XML document from null-terminated character
- string.
- </p>
-<p>
- This is an example of loading XML document from memory using one of these
- functions (<a href="samples/load_memory.cpp" target="_top">samples/load_memory.cpp</a>);
- read the sample code for more examples:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span> <span class="identifier">source</span><span class="special">[]</span> <span class="special">=</span> <span class="string">"&lt;mesh name='sphere'&gt;&lt;bounds&gt;0 0 1 1&lt;/bounds&gt;&lt;/mesh&gt;"</span><span class="special">;</span>
-<span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">source</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document
-</span><span class="keyword">char</span><span class="special">*</span> <span class="identifier">buffer</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">char</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
-<span class="identifier">memcpy</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">source</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-
-<span class="comment">// The block can be allocated by any method; the block is modified during parsing
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load_buffer_inplace</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="identifier">size</span><span class="special">);</span>
-
-<span class="comment">// You have to destroy the block yourself after the document is no longer used
-</span><span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">buffer</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
- This is a simple example of loading XML document from file using streams
- (<a href="samples/load_stream.cpp" target="_top">samples/load_stream.cpp</a>); read
- the sample code for more complex examples involving wide streams and locales:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ifstream</span> <span class="identifier">stream</span><span class="special">(</span><span class="string">"weekly-utf-8.xml"</span><span class="special">);</span>
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_parse_result</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">load</span><span class="special">(</span><span class="identifier">stream</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.access"></a><a class="link" href="quickstart.html#quickstart.main.access" title="Accessing document data"> Accessing document data</a>
-</h3></div></div></div>
-<p>
- pugixml features an extensive interface for getting various types of data
- from the document and for traversing the document. You can use various accessors
- to get node/attribute data, you can traverse the child node/attribute lists
- via accessors or iterators, you can do depth-first traversals with <code class="computeroutput"><span class="identifier">xml_tree_walker</span></code> objects, and you can use
- XPath for complex data-driven queries.
- </p>
-<p>
- You can get node or attribute name via <code class="computeroutput"><span class="identifier">name</span><span class="special">()</span></code> accessor, and value via <code class="computeroutput"><span class="identifier">value</span><span class="special">()</span></code> accessor. Note that both functions never
- return null pointers - they either return a string with the relevant content,
- or an empty string if name/value is absent or if the handle is null. Also
- there are two notable things for reading values:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- It is common to store data as text contents of some node - i.e. <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">node</span><span class="special">&gt;&lt;</span><span class="identifier">description</span><span class="special">&gt;</span><span class="identifier">This</span>
- <span class="identifier">is</span> <span class="identifier">a</span>
- <span class="identifier">node</span><span class="special">&lt;/</span><span class="identifier">description</span><span class="special">&gt;&lt;/</span><span class="identifier">node</span><span class="special">&gt;</span></code>.
- In this case, <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">description</span><span class="special">&gt;</span></code> node does not have a value, but instead
- has a child of type <code class="computeroutput"><span class="identifier">node_pcdata</span></code>
- with value <code class="computeroutput"><span class="string">"This is a node"</span></code>.
- pugixml provides <code class="computeroutput"><span class="identifier">child_value</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">text</span><span class="special">()</span></code> helper functions to parse such data.
- </li>
-<li class="listitem">
- In many cases attribute values have types that are not strings - i.e.
- an attribute may always contain values that should be treated as integers,
- despite the fact that they are represented as strings in XML. pugixml
- provides several accessors that convert attribute value to some other
- type.
- </li>
-</ul></div>
-<p>
- This is an example of using these functions (<a href="samples/traverse_base.cpp" target="_top">samples/traverse_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">);</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">": AllowRemote "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"AllowRemote"</span><span class="special">).</span><span class="identifier">as_bool</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", Timeout "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Timeout"</span><span class="special">).</span><span class="identifier">as_int</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", Description '"</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">child_value</span><span class="special">(</span><span class="string">"Description"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">"'\n"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<p>
- Since a lot of document traversal consists of finding the node/attribute
- with the correct name, there are special functions for that purpose. For
- example, <code class="computeroutput"><span class="identifier">child</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">)</span></code>
- returns the first node which has the name <code class="computeroutput"><span class="string">"Tool"</span></code>,
- or null handle if there is no such node. This is an example of using such
- functions (<a href="samples/traverse_base.cpp" target="_top">samples/traverse_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool for *.dae generation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">find_child_by_attribute</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">,</span> <span class="string">"OutputFileMasks"</span><span class="special">,</span> <span class="string">"*.dae"</span><span class="special">).</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
-
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">);</span> <span class="identifier">tool</span><span class="special">;</span> <span class="identifier">tool</span> <span class="special">=</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">next_sibling</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool "</span> <span class="special">&lt;&lt;</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<p>
- Child node lists and attribute lists are simply double-linked lists; while
- you can use <code class="computeroutput"><span class="identifier">previous_sibling</span></code>/<code class="computeroutput"><span class="identifier">next_sibling</span></code> and other such functions for
- iteration, pugixml additionally provides node and attribute iterators, so
- that you can treat nodes as containers of other nodes or attributes. All
- iterators are bidirectional and support all usual iterator operations. The
- iterators are invalidated if the node/attribute objects they're pointing
- to are removed from the tree; adding nodes/attributes does not invalidate
- any iterators.
- </p>
-<p>
- Here is an example of using iterators for document traversal (<a href="samples/traverse_iter.cpp" target="_top">samples/traverse_iter.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node_iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">it</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool:"</span><span class="special">;</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute_iterator</span> <span class="identifier">ait</span> <span class="special">=</span> <span class="identifier">it</span><span class="special">-&gt;</span><span class="identifier">attributes_begin</span><span class="special">();</span> <span class="identifier">ait</span> <span class="special">!=</span> <span class="identifier">it</span><span class="special">-&gt;</span><span class="identifier">attributes_end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">ait</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">ait</span><span class="special">-&gt;</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">ait</span><span class="special">-&gt;</span><span class="identifier">value</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<p>
- If your C++ compiler supports range-based for-loop (this is a C++11 feature,
- at the time of writing it's supported by Microsoft Visual Studio 11 Beta,
- GCC 4.6 and Clang 3.0), you can use it to enumerate nodes/attributes. Additional
- helpers are provided to support this; note that they are also compatible
- with <a href="http://www.boost.org/libs/foreach/" target="_top">Boost Foreach</a>,
- and possibly other pre-C++11 foreach facilities.
- </p>
-<p>
- Here is an example of using C++11 range-based for loop for document traversal
- (<a href="samples/traverse_rangefor.cpp" target="_top">samples/traverse_rangefor.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">tool</span><span class="special">:</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">children</span><span class="special">(</span><span class="string">"Tool"</span><span class="special">))</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tool:"</span><span class="special">;</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">attr</span><span class="special">:</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">attributes</span><span class="special">())</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">child</span><span class="special">:</span> <span class="identifier">tool</span><span class="special">.</span><span class="identifier">children</span><span class="special">())</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", child "</span> <span class="special">&lt;&lt;</span> <span class="identifier">child</span><span class="special">.</span><span class="identifier">name</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
-<p>
- </p>
-<p>
- The methods described above allow traversal of immediate children of some
- node; if you want to do a deep tree traversal, you'll have to do it via a
- recursive function or some equivalent method. However, pugixml provides a
- helper for depth-first traversal of a subtree. In order to use it, you have
- to implement <code class="computeroutput"><span class="identifier">xml_tree_walker</span></code>
- interface and to call <code class="computeroutput"><span class="identifier">traverse</span></code>
- function.
- </p>
-<p>
- This is an example of traversing tree hierarchy with xml_tree_walker (<a href="samples/traverse_walker.cpp" target="_top">samples/traverse_walker.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">simple_walker</span><span class="special">:</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_tree_walker</span>
-<span class="special">{</span>
- <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">for_each</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">depth</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span> <span class="comment">// indentation
-</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">node_types</span><span class="special">[</span><span class="identifier">node</span><span class="special">.</span><span class="identifier">type</span><span class="special">()]</span> <span class="special">&lt;&lt;</span> <span class="string">": name='"</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"', value='"</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"'\n"</span><span class="special">;</span>
-
- <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span> <span class="comment">// continue traversal
-</span> <span class="special">}</span>
-<span class="special">};</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">simple_walker</span> <span class="identifier">walker</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">traverse</span><span class="special">(</span><span class="identifier">walker</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
- Finally, for complex queries often a higher-level DSL is needed. pugixml
- provides an implementation of XPath 1.0 language for such queries. The complete
- description of XPath usage can be found in the manual, but here are some
- examples:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span> <span class="identifier">tools</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_nodes</span><span class="special">(</span><span class="string">"/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']"</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Tools:"</span><span class="special">;</span>
-
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node_set</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">tools</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">it</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="special">*</span><span class="identifier">it</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">();</span>
-<span class="special">}</span>
-
-<span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xpath_node</span> <span class="identifier">build_tool</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">select_single_node</span><span class="special">(</span><span class="string">"//Tool[contains(Description, 'build system')]"</span><span class="special">);</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nBuild tool: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">build_tool</span><span class="special">.</span><span class="identifier">node</span><span class="special">().</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"Filename"</span><span class="special">).</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- XPath functions throw <code class="computeroutput"><span class="identifier">xpath_exception</span></code>
- objects on error; the sample above does not catch these exceptions.
- </p></td></tr>
-</table></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.modify"></a><a class="link" href="quickstart.html#quickstart.main.modify" title="Modifying document data"> Modifying document data</a>
-</h3></div></div></div>
-<p>
- The document in pugixml is fully mutable: you can completely change the document
- structure and modify the data of nodes/attributes. All functions take care
- of memory management and structural integrity themselves, so they always
- result in structurally valid tree - however, it is possible to create an
- invalid XML tree (for example, by adding two attributes with the same name
- or by setting attribute/node name to empty/invalid string). Tree modification
- is optimized for performance and for memory consumption, so if you have enough
- memory you can create documents from scratch with pugixml and later save
- them to file/stream instead of relying on error-prone manual text writing
- and without too much overhead.
- </p>
-<p>
- All member functions that change node/attribute data or structure are non-constant
- and thus can not be called on constant handles. However, you can easily convert
- constant handle to non-constant one by simple assignment: <code class="computeroutput"><span class="keyword">void</span>
- <span class="identifier">foo</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span><span class="special">&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">nc</span> <span class="special">=</span> <span class="identifier">n</span><span class="special">;</span> <span class="special">}</span></code>, so const-correctness
- here mainly provides additional documentation.
- </p>
-<p>
- As discussed before, nodes can have name and value, both of which are strings.
- Depending on node type, name or value may be absent. You can use <code class="computeroutput"><span class="identifier">set_name</span></code> and <code class="computeroutput"><span class="identifier">set_value</span></code>
- member functions to set them. Similar functions are available for attributes;
- however, the <code class="computeroutput"><span class="identifier">set_value</span></code> function
- is overloaded for some other types except strings, like floating-point numbers.
- Also, attribute value can be set using an assignment operator. This is an
- example of setting node/attribute name and value (<a href="samples/modify_base.cpp" target="_top">samples/modify_base.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">);</span>
-
-<span class="comment">// change node name
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="string">"notnode"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", new node name: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// change comment text
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"useless comment"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", new comment text: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// we can't change value of the element or name of the comment
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"1"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">", "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">last_child</span><span class="special">().</span><span class="identifier">set_name</span><span class="special">(</span><span class="string">"2"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">attr</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"id"</span><span class="special">);</span>
-
-<span class="comment">// change attribute name/value
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="string">"key"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="string">", "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"345"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">", new attribute: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"="</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// we can use numbers or booleans
-</span><span class="identifier">attr</span><span class="special">.</span><span class="identifier">set_value</span><span class="special">(</span><span class="number">1.234</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"new attribute value: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// we can also use assignment operators for more concise code
-</span><span class="identifier">attr</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"final attribute value: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">attr</span><span class="special">.</span><span class="identifier">value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
- Nodes and attributes do not exist without a document tree, so you can't create
- them without adding them to some document. A node or attribute can be created
- at the end of node/attribute list or before/after some other node. All insertion
- functions return the handle to newly created object on success, and null
- handle on failure. Even if the operation fails (for example, if you're trying
- to add a child node to PCDATA node), the document remains in consistent state,
- but the requested node/attribute is not added.
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- attribute() and child() functions do not add attributes or nodes to the
- tree, so code like <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"id"</span><span class="special">)</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span></code> will not do anything if <code class="computeroutput"><span class="identifier">node</span></code> does not have an attribute with
- name <code class="computeroutput"><span class="string">"id"</span></code>. Make sure
- you're operating with existing attributes/nodes by adding them if necessary.
- </p></td></tr>
-</table></div>
-<p>
- This is an example of adding new attributes/nodes to the document (<a href="samples/modify_add.cpp" target="_top">samples/modify_add.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// add node with some name
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="string">"node"</span><span class="special">);</span>
-
-<span class="comment">// add description node with text child
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">descr</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="string">"description"</span><span class="special">);</span>
-<span class="identifier">descr</span><span class="special">.</span><span class="identifier">append_child</span><span class="special">(</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">node_pcdata</span><span class="special">).</span><span class="identifier">set_value</span><span class="special">(</span><span class="string">"Simple node"</span><span class="special">);</span>
-
-<span class="comment">// add param node before the description
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">param</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">insert_child_before</span><span class="special">(</span><span class="string">"param"</span><span class="special">,</span> <span class="identifier">descr</span><span class="special">);</span>
-
-<span class="comment">// add attributes to param node
-</span><span class="identifier">param</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">)</span> <span class="special">=</span> <span class="string">"version"</span><span class="special">;</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">append_attribute</span><span class="special">(</span><span class="string">"value"</span><span class="special">)</span> <span class="special">=</span> <span class="number">1.1</span><span class="special">;</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">insert_attribute_after</span><span class="special">(</span><span class="string">"type"</span><span class="special">,</span> <span class="identifier">param</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">))</span> <span class="special">=</span> <span class="string">"float"</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
- If you do not want your document to contain some node or attribute, you can
- remove it with <code class="computeroutput"><span class="identifier">remove_attribute</span></code>
- and <code class="computeroutput"><span class="identifier">remove_child</span></code> functions.
- Removing the attribute or node invalidates all handles to the same underlying
- object, and also invalidates all iterators pointing to the same object. Removing
- node also invalidates all past-the-end iterators to its attribute or child
- node list. Be careful to ensure that all such handles and iterators either
- do not exist or are not used after the attribute/node is removed.
- </p>
-<p>
- This is an example of removing attributes/nodes from the document (<a href="samples/modify_remove.cpp" target="_top">samples/modify_remove.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// remove description node with the whole subtree
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">node</span> <span class="special">=</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"node"</span><span class="special">);</span>
-<span class="identifier">node</span><span class="special">.</span><span class="identifier">remove_child</span><span class="special">(</span><span class="string">"description"</span><span class="special">);</span>
-
-<span class="comment">// remove id attribute
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_node</span> <span class="identifier">param</span> <span class="special">=</span> <span class="identifier">node</span><span class="special">.</span><span class="identifier">child</span><span class="special">(</span><span class="string">"param"</span><span class="special">);</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">remove_attribute</span><span class="special">(</span><span class="string">"value"</span><span class="special">);</span>
-
-<span class="comment">// we can also remove nodes/attributes by handles
-</span><span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_attribute</span> <span class="identifier">id</span> <span class="special">=</span> <span class="identifier">param</span><span class="special">.</span><span class="identifier">attribute</span><span class="special">(</span><span class="string">"name"</span><span class="special">);</span>
-<span class="identifier">param</span><span class="special">.</span><span class="identifier">remove_attribute</span><span class="special">(</span><span class="identifier">id</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.saving"></a><a class="link" href="quickstart.html#quickstart.main.saving" title="Saving document"> Saving document</a>
-</h3></div></div></div>
-<p>
- Often after creating a new document or loading the existing one and processing
- it, it is necessary to save the result back to file. Also it is occasionally
- useful to output the whole document or a subtree to some stream; use cases
- include debug printing, serialization via network or other text-oriented
- medium, etc. pugixml provides several functions to output any subtree of
- the document to a file, stream or another generic transport interface; these
- functions allow to customize the output format, and also perform necessary
- encoding conversions.
- </p>
-<p>
- Before writing to the destination the node/attribute data is properly formatted
- according to the node type; all special XML symbols, such as &lt; and &amp;,
- are properly escaped. In order to guard against forgotten node/attribute
- names, empty node/attribute names are printed as <code class="computeroutput"><span class="string">":anonymous"</span></code>.
- For well-formed output, make sure all node and attribute names are set to
- meaningful values.
- </p>
-<p>
- If you want to save the whole document to a file, you can use the <code class="computeroutput"><span class="identifier">save_file</span></code> function, which returns <code class="computeroutput"><span class="keyword">true</span></code> on success. This is a simple example
- of saving XML document to file (<a href="samples/save_file.cpp" target="_top">samples/save_file.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// save document to file
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Saving result: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">doc</span><span class="special">.</span><span class="identifier">save_file</span><span class="special">(</span><span class="string">"save_file_output.xml"</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<p>
- To enhance interoperability pugixml provides functions for saving document
- to any object which implements C++ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>
- interface. This allows you to save documents to any standard C++ stream (i.e.
- file stream) or any third-party compliant implementation (i.e. Boost Iostreams).
- Most notably, this allows for easy debug output, since you can use <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span></code>
- stream as saving target. There are two functions, one works with narrow character
- streams, another handles wide character ones.
- </p>
-<p>
- This is a simple example of saving XML document to standard output (<a href="samples/save_stream.cpp" target="_top">samples/save_stream.cpp</a>):
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="comment">// save document to standard output
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Document:\n"</span><span class="special">;</span>
-<span class="identifier">doc</span><span class="special">.</span><span class="identifier">save</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
- All of the above saving functions are implemented in terms of writer interface.
- This is a simple interface with a single function, which is called several
- times during output process with chunks of document data as input. In order
- to output the document via some custom transport, for example sockets, you
- should create an object which implements <code class="computeroutput"><span class="identifier">xml_writer_file</span></code>
- interface and pass it to <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span></code>
- function.
- </p>
-<p>
- This is a simple example of custom writer for saving document data to STL
- string (<a href="samples/save_custom_writer.cpp" target="_top">samples/save_custom_writer.cpp</a>);
- read the sample code for more complex examples:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xml_string_writer</span><span class="special">:</span> <span class="identifier">pugi</span><span class="special">::</span><span class="identifier">xml_writer</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result</span><span class="special">;</span>
-
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">write</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">data</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">result</span> <span class="special">+=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*&gt;(</span><span class="identifier">data</span><span class="special">),</span> <span class="identifier">size</span><span class="special">);</span>
- <span class="special">}</span>
-<span class="special">};</span>
-</pre>
-<p>
- </p>
-<p>
- While the previously described functions save the whole document to the destination,
- it is easy to save a single subtree. Instead of calling <code class="computeroutput"><span class="identifier">xml_document</span><span class="special">::</span><span class="identifier">save</span></code>,
- just call <code class="computeroutput"><span class="identifier">xml_node</span><span class="special">::</span><span class="identifier">print</span></code> function on the target node. You
- can save node contents to C++ IOstream object or custom writer in this way.
- Saving a subtree slightly differs from saving the whole document; <a href="manual/saving.html#manual.saving.subtree" target="_top">read the manual</a> for
- more information.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.feedback"></a><a class="link" href="quickstart.html#quickstart.main.feedback" title="Feedback"> Feedback</a>
-</h3></div></div></div>
-<p>
- If you believe you've found a bug in pugixml, please file an issue via <a href="http://code.google.com/p/pugixml/issues/entry" target="_top">issue submission form</a>.
- Be sure to include the relevant information so that the bug can be reproduced:
- the version of pugixml, compiler version and target architecture, the code
- that uses pugixml and exhibits the bug, etc. Feature requests and contributions
- can be filed as issues, too.
- </p>
-<a name="email"></a><p>
- If filing an issue is not possible due to privacy or other concerns, you
- can contact pugixml author by e-mail directly: <a href="mailto:arseny.kapoulkine@gmail.com" target="_top">arseny.kapoulkine@gmail.com</a>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="quickstart.main.license"></a><a class="link" href="quickstart.html#quickstart.main.license" title="License"> License</a>
-</h3></div></div></div>
-<p>
- The pugixml library is distributed under the MIT license:
- </p>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- Copyright (c) 2006-2012 Arseny Kapoulkine
- </p>
-<p>
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the Software
- is furnished to do so, subject to the following conditions:
- </p>
-<p>
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- </p>
-<p>
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- </p>
-</blockquote></div>
-<p>
- This means that you can freely use pugixml in your applications, both open-source
- and proprietary. If you use pugixml in a product, it is sufficient to add
- an acknowledgment like this to the product distribution:
- </p>
-<div class="blockquote"><blockquote class="blockquote"><p>
- This software is based on pugixml library (http://pugixml.org).<br>
-pugixml
- is Copyright (C) 2006-2012 Arseny Kapoulkine.
- </p></blockquote></div>
-</div>
-</div>
-<div class="footnotes">
-<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.trademarks" href="#trademarks" class="para">1</a>] </sup>All trademarks used are properties of their respective owners.</p></div>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: April 30, 2012 at 03:25:55 GMT</small></p></td>
-<td align="right"><div class="copyright-footer"></div></td>
-</tr></table>
-</body>
-</html>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/character.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/character.xml
deleted file mode 100644
index 078e0bf80..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/character.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<network>
- <animation clip="idle" flags="loop" />
- <animation clip="run" flags="loop" />
- <animation clip="attack" />
-
- <?include transitions.xml?>
-</network>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/custom_memory_management.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/custom_memory_management.cpp
deleted file mode 100644
index 92ccb7112..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/custom_memory_management.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "pugixml.hpp"
-
-#include <new>
-
-//[code_custom_memory_management_decl
-void* custom_allocate(size_t size)
-{
- return new (std::nothrow) char[size];
-}
-
-void custom_deallocate(void* ptr)
-{
- delete[] static_cast<char*>(ptr);
-}
-//]
-
-int main()
-{
-//[code_custom_memory_management_call
- pugi::set_memory_management_functions(custom_allocate, custom_deallocate);
-//]
-
- pugi::xml_document doc;
- doc.load("<node/>");
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/include.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/include.cpp
deleted file mode 100644
index fa615a451..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/include.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "pugixml.hpp"
-
-#include <string.h>
-#include <iostream>
-
-//[code_include
-bool load_preprocess(pugi::xml_document& doc, const char* path);
-
-bool preprocess(pugi::xml_node node)
-{
- for (pugi::xml_node child = node.first_child(); child; )
- {
- if (child.type() == pugi::node_pi && strcmp(child.name(), "include") == 0)
- {
- pugi::xml_node include = child;
-
- // load new preprocessed document (note: ideally this should handle relative paths)
- const char* path = include.value();
-
- pugi::xml_document doc;
- if (!load_preprocess(doc, path)) return false;
-
- // insert the comment marker above include directive
- node.insert_child_before(pugi::node_comment, include).set_value(path);
-
- // copy the document above the include directive (this retains the original order!)
- for (pugi::xml_node ic = doc.first_child(); ic; ic = ic.next_sibling())
- {
- node.insert_copy_before(ic, include);
- }
-
- // remove the include node and move to the next child
- child = child.next_sibling();
-
- node.remove_child(include);
- }
- else
- {
- if (!preprocess(child)) return false;
-
- child = child.next_sibling();
- }
- }
-
- return true;
-}
-
-bool load_preprocess(pugi::xml_document& doc, const char* path)
-{
- pugi::xml_parse_result result = doc.load_file(path, pugi::parse_default | pugi::parse_pi); // for <?include?>
-
- return result ? preprocess(doc) : false;
-}
-//]
-
-int main()
-{
- pugi::xml_document doc;
- if (!load_preprocess(doc, "character.xml")) return -1;
-
- doc.print(std::cout);
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_error_handling.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_error_handling.cpp
deleted file mode 100644
index 18dd331d4..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_error_handling.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-void check_xml(const char* source)
-{
-//[code_load_error_handling
- pugi::xml_document doc;
- pugi::xml_parse_result result = doc.load(source);
-
- if (result)
- std::cout << "XML [" << source << "] parsed without errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n\n";
- else
- {
- std::cout << "XML [" << source << "] parsed with errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n";
- std::cout << "Error description: " << result.description() << "\n";
- std::cout << "Error offset: " << result.offset << " (error at [..." << (source + result.offset) << "]\n\n";
- }
-//]
-}
-
-int main()
-{
- check_xml("<node attr='value'><child>text</child></node>");
- check_xml("<node attr='value'><child>text</chil></node>");
- check_xml("<node attr='value'><child>text</child>");
- check_xml("<node attr='value\"><child>text</child></node>");
- check_xml("<node attr='value'><#tag /></node>");
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_file.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_file.cpp
deleted file mode 100644
index f7b06c95d..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_file.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
-//[code_load_file
- pugi::xml_document doc;
-
- pugi::xml_parse_result result = doc.load_file("tree.xml");
-
- std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
-//]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_memory.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_memory.cpp
deleted file mode 100644
index 365fb64c3..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_memory.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
-//[code_load_memory_decl
- const char source[] = "<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>";
- size_t size = sizeof(source);
-//]
-
- pugi::xml_document doc;
-
- {
- //[code_load_memory_buffer
- // You can use load_buffer to load document from immutable memory block:
- pugi::xml_parse_result result = doc.load_buffer(source, size);
- //]
-
- std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
- }
-
- {
- //[code_load_memory_buffer_inplace
- // You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document
- char* buffer = new char[size];
- memcpy(buffer, source, size);
-
- // The block can be allocated by any method; the block is modified during parsing
- pugi::xml_parse_result result = doc.load_buffer_inplace(buffer, size);
-
- //<-
- std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
- //->
- // You have to destroy the block yourself after the document is no longer used
- delete[] buffer;
- //]
- }
-
- {
- //[code_load_memory_buffer_inplace_own
- // You can use load_buffer_inplace_own to load document from mutable memory block and to pass the ownership of this block
- // The block has to be allocated via pugixml allocation function - using i.e. operator new here is incorrect
- char* buffer = static_cast<char*>(pugi::get_memory_allocation_function()(size));
- memcpy(buffer, source, size);
-
- // The block will be deleted by the document
- pugi::xml_parse_result result = doc.load_buffer_inplace_own(buffer, size);
- //]
-
- std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
- }
-
- {
- //[code_load_memory_string
- // You can use load to load document from null-terminated strings, for example literals:
- pugi::xml_parse_result result = doc.load("<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>");
- //]
-
- std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
- }
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_options.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_options.cpp
deleted file mode 100644
index 04b4b4655..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_options.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
-
-//[code_load_options
- const char* source = "<!--comment--><node>&lt;</node>";
-
- // Parsing with default options; note that comment node is not added to the tree, and entity reference &lt; is expanded
- doc.load(source);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
-
- // Parsing with additional parse_comments option; comment node is now added to the tree
- doc.load(source, pugi::parse_default | pugi::parse_comments);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
-
- // Parsing with additional parse_comments option and without the (default) parse_escapes option; &lt; is not expanded
- doc.load(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
-
- // Parsing with minimal option mask; comment node is not added to the tree, and &lt; is not expanded
- doc.load(source, pugi::parse_minimal);
- std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
-//]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_stream.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_stream.cpp
deleted file mode 100644
index 05cfb7f8d..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/load_stream.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-#include "pugixml.hpp"
-
-#include <fstream>
-#include <iomanip>
-#include <iostream>
-
-void print_doc(const char* message, const pugi::xml_document& doc, const pugi::xml_parse_result& result)
-{
- std::cout
- << message
- << "\t: load result '" << result.description() << "'"
- << ", first character of root name: U+" << std::hex << std::uppercase << std::setw(4) << std::setfill('0') << pugi::as_wide(doc.first_child().name())[0]
- << ", year: " << doc.first_child().first_child().first_child().child_value()
- << std::endl;
-}
-
-bool try_imbue(std::wistream& stream, const char* name)
-{
- try
- {
- stream.imbue(std::locale(name));
-
- return true;
- }
- catch (const std::exception&)
- {
- return false;
- }
-}
-
-int main()
-{
- pugi::xml_document doc;
-
- {
- //[code_load_stream
- std::ifstream stream("weekly-utf-8.xml");
- pugi::xml_parse_result result = doc.load(stream);
- //]
-
- // first character of root name: U+9031, year: 1997
- print_doc("UTF8 file from narrow stream", doc, result);
- }
-
- {
- std::ifstream stream("weekly-utf-16.xml");
- pugi::xml_parse_result result = doc.load(stream);
-
- // first character of root name: U+9031, year: 1997
- print_doc("UTF16 file from narrow stream", doc, result);
- }
-
- {
- // Since wide streams are treated as UTF-16/32 ones, you can't load the UTF-8 file from a wide stream
- // directly if you have localized characters; you'll have to provide a UTF8 locale (there is no
- // standard one; you can use utf8_codecvt_facet from Boost or codecvt_utf8 from C++0x)
- std::wifstream stream("weekly-utf-8.xml");
-
- if (try_imbue(stream, "en_US.UTF-8")) // try Linux encoding
- {
- pugi::xml_parse_result result = doc.load(stream);
-
- // first character of root name: U+00E9, year: 1997
- print_doc("UTF8 file from wide stream", doc, result);
- }
- else
- {
- std::cout << "UTF-8 locale is not available\n";
- }
- }
-
- {
- // Since wide streams are treated as UTF-16/32 ones, you can't load the UTF-16 file from a wide stream without
- // using custom codecvt; you can use codecvt_utf16 from C++0x
- }
-
- {
- // Since encoding names are non-standard, you can't load the Shift-JIS (or any other non-ASCII) file
- // from a wide stream portably
- std::wifstream stream("weekly-shift_jis.xml");
-
- if (try_imbue(stream, ".932") || // try Microsoft encoding
- try_imbue(stream, "ja_JP.SJIS")) // try Linux encoding; run "localedef -i ja_JP -c -f SHIFT_JIS /usr/lib/locale/ja_JP.SJIS" to get it
- {
- pugi::xml_parse_result result = doc.load(stream);
-
- // first character of root name: U+9031, year: 1997
- print_doc("Shift-JIS file from wide stream", doc, result);
- }
- else
- {
- std::cout << "Shift-JIS locale is not available\n";
- }
- }
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_add.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_add.cpp
deleted file mode 100644
index 04ab4450a..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_add.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
-
- //[code_modify_add
- // add node with some name
- pugi::xml_node node = doc.append_child("node");
-
- // add description node with text child
- pugi::xml_node descr = node.append_child("description");
- descr.append_child(pugi::node_pcdata).set_value("Simple node");
-
- // add param node before the description
- pugi::xml_node param = node.insert_child_before("param", descr);
-
- // add attributes to param node
- param.append_attribute("name") = "version";
- param.append_attribute("value") = 1.1;
- param.insert_attribute_after("type", param.attribute("name")) = "float";
- //]
-
- doc.print(std::cout);
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_base.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_base.cpp
deleted file mode 100644
index 7d0959a0a..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_base.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "pugixml.hpp"
-
-#include <string.h>
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load("<node id='123'>text</node><!-- comment -->", pugi::parse_default | pugi::parse_comments)) return -1;
-
- //[code_modify_base_node
- pugi::xml_node node = doc.child("node");
-
- // change node name
- std::cout << node.set_name("notnode");
- std::cout << ", new node name: " << node.name() << std::endl;
-
- // change comment text
- std::cout << doc.last_child().set_value("useless comment");
- std::cout << ", new comment text: " << doc.last_child().value() << std::endl;
-
- // we can't change value of the element or name of the comment
- std::cout << node.set_value("1") << ", " << doc.last_child().set_name("2") << std::endl;
- //]
-
- //[code_modify_base_attr
- pugi::xml_attribute attr = node.attribute("id");
-
- // change attribute name/value
- std::cout << attr.set_name("key") << ", " << attr.set_value("345");
- std::cout << ", new attribute: " << attr.name() << "=" << attr.value() << std::endl;
-
- // we can use numbers or booleans
- attr.set_value(1.234);
- std::cout << "new attribute value: " << attr.value() << std::endl;
-
- // we can also use assignment operators for more concise code
- attr = true;
- std::cout << "final attribute value: " << attr.value() << std::endl;
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_remove.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_remove.cpp
deleted file mode 100644
index 28c2f6bc9..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/modify_remove.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load("<node><description>Simple node</description><param name='id' value='123'/></node>")) return -1;
-
- //[code_modify_remove
- // remove description node with the whole subtree
- pugi::xml_node node = doc.child("node");
- node.remove_child("description");
-
- // remove id attribute
- pugi::xml_node param = node.child("param");
- param.remove_attribute("value");
-
- // we can also remove nodes/attributes by handles
- pugi::xml_attribute id = param.attribute("name");
- param.remove_attribute(id);
- //]
-
- doc.print(std::cout);
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_custom_writer.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_custom_writer.cpp
deleted file mode 100644
index defcb33ff..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_custom_writer.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-#include "pugixml.hpp"
-
-#include <string>
-
-#include <stdio.h>
-
-//[code_save_custom_writer
-struct xml_string_writer: pugi::xml_writer
-{
- std::string result;
-
- virtual void write(const void* data, size_t size)
- {
- result += std::string(static_cast<const char*>(data), size);
- }
-};
-//]
-
-struct xml_memory_writer: pugi::xml_writer
-{
- char* buffer;
- size_t capacity;
-
- size_t result;
-
- xml_memory_writer(): buffer(0), capacity(0), result(0)
- {
- }
-
- xml_memory_writer(char* buffer, size_t capacity): buffer(buffer), capacity(capacity), result(0)
- {
- }
-
- size_t written_size() const
- {
- return result < capacity ? result : capacity;
- }
-
- virtual void write(const void* data, size_t size)
- {
- if (result < capacity)
- {
- size_t chunk = (capacity - result < size) ? capacity - result : size;
-
- memcpy(buffer + result, data, chunk);
- }
-
- result += size;
- }
-};
-
-std::string node_to_string(pugi::xml_node node)
-{
- xml_string_writer writer;
- node.print(writer);
-
- return writer.result;
-}
-
-char* node_to_buffer(pugi::xml_node node, char* buffer, size_t size)
-{
- if (size == 0) return buffer;
-
- // leave one character for null terminator
- xml_memory_writer writer(buffer, size - 1);
- node.print(writer);
-
- // null terminate
- buffer[writer.written_size()] = 0;
-
- return buffer;
-}
-
-char* node_to_buffer_heap(pugi::xml_node node)
-{
- // first pass: get required memory size
- xml_memory_writer counter;
- node.print(counter);
-
- // allocate necessary size (+1 for null termination)
- char* buffer = new char[counter.result + 1];
-
- // second pass: actual printing
- xml_memory_writer writer(buffer, counter.result);
- node.print(writer);
-
- // null terminate
- buffer[writer.written_size()] = 0;
-
- return buffer;
-}
-
-int main()
-{
- // get a test document
- pugi::xml_document doc;
- doc.load("<foo bar='baz'>hey</foo>");
-
- // get contents as std::string (single pass)
- printf("contents: [%s]\n", node_to_string(doc).c_str());
-
- // get contents into fixed-size buffer (single pass)
- char large_buf[128];
- printf("contents: [%s]\n", node_to_buffer(doc, large_buf, sizeof(large_buf)));
-
- // get contents into fixed-size buffer (single pass, shows truncating behavior)
- char small_buf[22];
- printf("contents: [%s]\n", node_to_buffer(doc, small_buf, sizeof(small_buf)));
-
- // get contents into heap-allocated buffer (two passes)
- char* heap_buf = node_to_buffer_heap(doc);
- printf("contents: [%s]\n", heap_buf);
- delete[] heap_buf;
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_declaration.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_declaration.cpp
deleted file mode 100644
index aaed9b57b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_declaration.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- //[code_save_declaration
- // get a test document
- pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
-
- // add a custom declaration node
- pugi::xml_node decl = doc.prepend_child(pugi::node_declaration);
- decl.append_attribute("version") = "1.0";
- decl.append_attribute("encoding") = "UTF-8";
- decl.append_attribute("standalone") = "no";
-
- // <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- // <foo bar="baz">
- // <call>hey</call>
- // </foo>
- doc.save(std::cout);
- std::cout << std::endl;
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_file.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_file.cpp
deleted file mode 100644
index 30c1aa17c..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_file.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- // get a test document
- pugi::xml_document doc;
- doc.load("<foo bar='baz'>hey</foo>");
-
- //[code_save_file
- // save document to file
- std::cout << "Saving result: " << doc.save_file("save_file_output.xml") << std::endl;
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_options.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_options.cpp
deleted file mode 100644
index 6a49f6668..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_options.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- //[code_save_options
- // get a test document
- pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
-
- // default options; prints
- // <?xml version="1.0"?>
- // <foo bar="baz">
- // <call>hey</call>
- // </foo>
- doc.save(std::cout);
- std::cout << std::endl;
-
- // default options with custom indentation string; prints
- // <?xml version="1.0"?>
- // <foo bar="baz">
- // --<call>hey</call>
- // </foo>
- doc.save(std::cout, "--");
- std::cout << std::endl;
-
- // default options without indentation; prints
- // <?xml version="1.0"?>
- // <foo bar="baz">
- // <call>hey</call>
- // </foo>
- doc.save(std::cout, "\t", pugi::format_default & ~pugi::format_indent); // can also pass "" instead of indentation string for the same effect
- std::cout << std::endl;
-
- // raw output; prints
- // <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo>
- doc.save(std::cout, "\t", pugi::format_raw);
- std::cout << std::endl << std::endl;
-
- // raw output without declaration; prints
- // <foo bar="baz"><call>hey</call></foo>
- doc.save(std::cout, "\t", pugi::format_raw | pugi::format_no_declaration);
- std::cout << std::endl;
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_stream.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_stream.cpp
deleted file mode 100644
index d01965d2b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_stream.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- // get a test document
- pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
-
- //[code_save_stream
- // save document to standard output
- std::cout << "Document:\n";
- doc.save(std::cout);
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_subtree.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_subtree.cpp
deleted file mode 100644
index 0091b3d8a..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/save_subtree.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- //[code_save_subtree
- // get a test document
- pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
-
- // print document to standard output (prints <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo>)
- doc.save(std::cout, "", pugi::format_raw);
- std::cout << std::endl;
-
- // print document to standard output as a regular node (prints <foo bar="baz"><call>hey</call></foo>)
- doc.print(std::cout, "", pugi::format_raw);
- std::cout << std::endl;
-
- // print a subtree to standard output (prints <call>hey</call>)
- doc.child("foo").child("call").print(std::cout, "", pugi::format_raw);
- std::cout << std::endl;
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/text.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/text.cpp
deleted file mode 100644
index 7e0370945..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/text.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
-
- // get a test document
- doc.load("<project><name>test</name><version>1.1</version><public>yes</public></project>");
-
- pugi::xml_node project = doc.child("project");
-
- //[code_text_access
- std::cout << "Project name: " << project.child("name").text().get() << std::endl;
- std::cout << "Project version: " << project.child("version").text().as_double() << std::endl;
- std::cout << "Project visibility: " << (project.child("public").text().as_bool(/* def= */ true) ? "public" : "private") << std::endl;
- std::cout << "Project description: " << project.child("description").text().get() << std::endl;
- //]
-
- std::cout << std::endl;
-
- //[code_text_modify
- // change project version
- project.child("version").text() = 1.2;
-
- // add description element and set the contents
- // note that we do not have to explicitly add the node_pcdata child
- project.append_child("description").text().set("a test project");
- //]
-
- doc.save(std::cout);
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/transitions.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/transitions.xml
deleted file mode 100644
index a195ef8e5..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/transitions.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<transition source="idle" target="run">
- <event name="key_up|key_shift" />
-</transition>
-<transition source="run" target="attack">
- <event name="key_ctrl" />
- <condition expr="weapon != null" />
-</transition>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_base.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_base.cpp
deleted file mode 100644
index d59c8b0cf..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_base.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "pugixml.hpp"
-
-#include <string.h>
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
- pugi::xml_node tools = doc.child("Profile").child("Tools");
-
- //[code_traverse_base_basic
- for (pugi::xml_node tool = tools.first_child(); tool; tool = tool.next_sibling())
- {
- std::cout << "Tool:";
-
- for (pugi::xml_attribute attr = tool.first_attribute(); attr; attr = attr.next_attribute())
- {
- std::cout << " " << attr.name() << "=" << attr.value();
- }
-
- std::cout << std::endl;
- }
- //]
-
- std::cout << std::endl;
-
- //[code_traverse_base_data
- for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool"))
- {
- std::cout << "Tool " << tool.attribute("Filename").value();
- std::cout << ": AllowRemote " << tool.attribute("AllowRemote").as_bool();
- std::cout << ", Timeout " << tool.attribute("Timeout").as_int();
- std::cout << ", Description '" << tool.child_value("Description") << "'\n";
- }
- //]
-
- std::cout << std::endl;
-
- //[code_traverse_base_contents
- std::cout << "Tool for *.dae generation: " << tools.find_child_by_attribute("Tool", "OutputFileMasks", "*.dae").attribute("Filename").value() << "\n";
-
- for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool"))
- {
- std::cout << "Tool " << tool.attribute("Filename").value() << "\n";
- }
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_iter.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_iter.cpp
deleted file mode 100644
index 90e0dc62c..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_iter.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
- pugi::xml_node tools = doc.child("Profile").child("Tools");
-
- //[code_traverse_iter
- for (pugi::xml_node_iterator it = tools.begin(); it != tools.end(); ++it)
- {
- std::cout << "Tool:";
-
- for (pugi::xml_attribute_iterator ait = it->attributes_begin(); ait != it->attributes_end(); ++ait)
- {
- std::cout << " " << ait->name() << "=" << ait->value();
- }
-
- std::cout << std::endl;
- }
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_predicate.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_predicate.cpp
deleted file mode 100644
index 9d8ded07b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_predicate.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include "pugixml.hpp"
-
-#include <string.h>
-#include <iostream>
-
-//[code_traverse_predicate_decl
-bool small_timeout(pugi::xml_node node)
-{
- return node.attribute("Timeout").as_int() < 20;
-}
-
-struct allow_remote_predicate
-{
- bool operator()(pugi::xml_attribute attr) const
- {
- return strcmp(attr.name(), "AllowRemote") == 0;
- }
-
- bool operator()(pugi::xml_node node) const
- {
- return node.attribute("AllowRemote").as_bool();
- }
-};
-//]
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
- pugi::xml_node tools = doc.child("Profile").child("Tools");
-
- //[code_traverse_predicate_find
- // Find child via predicate (looks for direct children only)
- std::cout << tools.find_child(allow_remote_predicate()).attribute("Filename").value() << std::endl;
-
- // Find node via predicate (looks for all descendants in depth-first order)
- std::cout << doc.find_node(allow_remote_predicate()).attribute("Filename").value() << std::endl;
-
- // Find attribute via predicate
- std::cout << tools.last_child().find_attribute(allow_remote_predicate()).value() << std::endl;
-
- // We can use simple functions instead of function objects
- std::cout << tools.find_child(small_timeout).attribute("Filename").value() << std::endl;
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_rangefor.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_rangefor.cpp
deleted file mode 100644
index a284b9ef8..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_rangefor.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
- pugi::xml_node tools = doc.child("Profile").child("Tools");
-
- //[code_traverse_rangefor
- for (pugi::xml_node tool: tools.children("Tool"))
- {
- std::cout << "Tool:";
-
- for (pugi::xml_attribute attr: tool.attributes())
- {
- std::cout << " " << attr.name() << "=" << attr.value();
- }
-
- for (pugi::xml_node child: tool.children())
- {
- std::cout << ", child " << child.name();
- }
-
- std::cout << std::endl;
- }
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_walker.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_walker.cpp
deleted file mode 100644
index cb999027b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/traverse_walker.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-const char* node_types[] =
-{
- "null", "document", "element", "pcdata", "cdata", "comment", "pi", "declaration"
-};
-
-//[code_traverse_walker_impl
-struct simple_walker: pugi::xml_tree_walker
-{
- virtual bool for_each(pugi::xml_node& node)
- {
- for (int i = 0; i < depth(); ++i) std::cout << " "; // indentation
-
- std::cout << node_types[node.type()] << ": name='" << node.name() << "', value='" << node.value() << "'\n";
-
- return true; // continue traversal
- }
-};
-//]
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("tree.xml")) return -1;
-
- //[code_traverse_walker_traverse
- simple_walker walker;
- doc.traverse(walker);
- //]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/tree.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/tree.xml
deleted file mode 100644
index b33267afa..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/tree.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<mesh name="mesh_root">
- <!-- here is a mesh node -->
- some text
- <![CDATA[someothertext]]>
- some more text
- <node attr1="value1" attr2="value2" />
- <node attr1="value2">
- <innernode/>
- </node>
-</mesh>
-<?include somedata?>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-shift_jis.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-shift_jis.xml
deleted file mode 100644
index 097e37421..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-shift_jis.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="Shift_JIS"?>
-<!DOCTYPE T•ñ SYSTEM "weekly-shift_jis.dtd">
-<!-- T•ñƒTƒ“ƒvƒ‹ -->
-<T•ñ>
- <”NŒŽT>
- <”N“x>1997</”N“x>
- <ŒŽ“x>1</ŒŽ“x>
- <T>1</T>
- </”NŒŽT>
-
- <Ž–¼>
- <Ž>ŽR“c</Ž>
- <–¼>‘¾˜Y</–¼>
- </Ž–¼>
-
- <‹Æ–±•ñƒŠƒXƒg>
- <‹Æ–±•ñ>
- <‹Æ–±–¼>XMLƒGƒfƒBƒ^[‚Ìì¬</‹Æ–±–¼>
- <‹Æ–±ƒR[ƒh>X3355-23</‹Æ–±ƒR[ƒh>
- <H”ŠÇ—>
- <Œ©Ï‚à‚èH”>1600</Œ©Ï‚à‚èH”>
- <ŽÀÑH”>320</ŽÀÑH”>
- <“–ŒŽŒ©Ï‚à‚èH”>160</“–ŒŽŒ©Ï‚à‚èH”>
- <“–ŒŽŽÀÑH”>24</“–ŒŽŽÀÑH”>
- </H”ŠÇ—>
- <—\’耖ڃŠƒXƒg>
- <—\’耖Ú>
- <P>XMLƒGƒfƒBƒ^[‚ÌŠî–{Žd—l‚Ìì¬</P>
- </—\’耖Ú>
- </—\’耖ڃŠƒXƒg>
- <ŽÀŽ{Ž–€ƒŠƒXƒg>
- <ŽÀŽ{Ž–€>
- <P>XMLƒGƒfƒBƒ^[‚ÌŠî–{Žd—l‚Ìì¬</P>
- </ŽÀŽ{Ž–€>
- <ŽÀŽ{Ž–€>
- <P>‹£‡‘¼ŽÐ»•i‚Ì‹@”\’²¸</P>
- </ŽÀŽ{Ž–€>
- </ŽÀŽ{Ž–€ƒŠƒXƒg>
- <ã’·‚Ö‚Ì—v¿Ž–€ƒŠƒXƒg>
- <ã’·‚Ö‚Ì—v¿Ž–€>
- <P>“Á‚É‚È‚µ</P>
- </ã’·‚Ö‚Ì—v¿Ž–€>
- </ã’·‚Ö‚Ì—v¿Ž–€ƒŠƒXƒg>
- <–â‘è“_‘Îô>
- <P>XML‚Ƃ͉½‚©‚í‚©‚ç‚È‚¢B</P>
- </–â‘è“_‘Îô>
- </‹Æ–±•ñ>
-
- <‹Æ–±•ñ>
- <‹Æ–±–¼>ŒŸõƒGƒ“ƒWƒ“‚ÌŠJ”­</‹Æ–±–¼>
- <‹Æ–±ƒR[ƒh>S8821-76</‹Æ–±ƒR[ƒh>
- <H”ŠÇ—>
- <Œ©Ï‚à‚èH”>120</Œ©Ï‚à‚èH”>
- <ŽÀÑH”>6</ŽÀÑH”>
- <“–ŒŽŒ©Ï‚à‚èH”>32</“–ŒŽŒ©Ï‚à‚èH”>
- <“–ŒŽŽÀÑH”>2</“–ŒŽŽÀÑH”>
- </H”ŠÇ—>
- <—\’耖ڃŠƒXƒg>
- <—\’耖Ú>
- <P><A href="http://www.goo.ne.jp">goo</A>‚Ì‹@”\‚𒲂ׂĂ݂é</P>
- </—\’耖Ú>
- </—\’耖ڃŠƒXƒg>
- <ŽÀŽ{Ž–€ƒŠƒXƒg>
- <ŽÀŽ{Ž–€>
- <P>X‚ÉA‚Ç‚¤‚¢‚¤ŒŸõƒGƒ“ƒWƒ“‚ª‚ ‚é‚©’²¸‚·‚é</P>
- </ŽÀŽ{Ž–€>
- </ŽÀŽ{Ž–€ƒŠƒXƒg>
- <ã’·‚Ö‚Ì—v¿Ž–€ƒŠƒXƒg>
- <ã’·‚Ö‚Ì—v¿Ž–€>
- <P>ŠJ”­‚ð‚·‚é‚Ì‚Í‚ß‚ñ‚Ç‚¤‚È‚Ì‚ÅAYahoo!‚𔃎û‚µ‚ĉº‚³‚¢B</P>
- </ã’·‚Ö‚Ì—v¿Ž–€>
- </ã’·‚Ö‚Ì—v¿Ž–€ƒŠƒXƒg>
- <–â‘è“_‘Îô>
- <P>ŒŸõƒGƒ“ƒWƒ“‚ŎԂ𑖂点‚邱‚Æ‚ª‚Å‚«‚È‚¢Bi—v’²¸j</P>
- </–â‘è“_‘Îô>
- </‹Æ–±•ñ>
- </‹Æ–±•ñƒŠƒXƒg>
-</T•ñ>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-16.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-16.xml
deleted file mode 100644
index 6c8622aa4..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-16.xml
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-8.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-8.xml
deleted file mode 100644
index d55474e5e..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/weekly-utf-8.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd">
-<!-- 週報サンプル -->
-<週報>
- <年月週>
- <年度>1997</年度>
- <月度>1</月度>
- <週>1</週>
- </年月週>
-
- <æ°å>
- <æ°>山田</æ°>
- <å>太郎</å>
- </æ°å>
-
- <業務報告リスト>
- <業務報告>
- <業務å>XMLエディターã®ä½œæˆ</業務å>
- <業務コード>X3355-23</業務コード>
- <工数管ç†>
- <見ç©ã‚‚り工数>1600</見ç©ã‚‚り工数>
- <実績工数>320</実績工数>
- <当月見ç©ã‚‚り工数>160</当月見ç©ã‚‚り工数>
- <当月実績工数>24</当月実績工数>
- </工数管ç†>
- <予定項目リスト>
- <予定項目>
- <P>XMLエディターã®åŸºæœ¬ä»•æ§˜ã®ä½œæˆ</P>
- </予定項目>
- </予定項目リスト>
- <実施事項リスト>
- <実施事項>
- <P>XMLエディターã®åŸºæœ¬ä»•æ§˜ã®ä½œæˆ</P>
- </実施事項>
- <実施事項>
- <P>競åˆä»–社製å“ã®æ©Ÿèƒ½èª¿æŸ»</P>
- </実施事項>
- </実施事項リスト>
- <上長ã¸ã®è¦è«‹äº‹é …リスト>
- <上長ã¸ã®è¦è«‹äº‹é …>
- <P>特ã«ãªã—</P>
- </上長ã¸ã®è¦è«‹äº‹é …>
- </上長ã¸ã®è¦è«‹äº‹é …リスト>
- <å•é¡Œç‚¹å¯¾ç­–>
- <P>XMLã¨ã¯ä½•ã‹ã‚ã‹ã‚‰ãªã„。</P>
- </å•é¡Œç‚¹å¯¾ç­–>
- </業務報告>
-
- <業務報告>
- <業務å>検索エンジンã®é–‹ç™º</業務å>
- <業務コード>S8821-76</業務コード>
- <工数管ç†>
- <見ç©ã‚‚り工数>120</見ç©ã‚‚り工数>
- <実績工数>6</実績工数>
- <当月見ç©ã‚‚り工数>32</当月見ç©ã‚‚り工数>
- <当月実績工数>2</当月実績工数>
- </工数管ç†>
- <予定項目リスト>
- <予定項目>
- <P><A href="http://www.goo.ne.jp">goo</A>ã®æ©Ÿèƒ½ã‚’調ã¹ã¦ã¿ã‚‹</P>
- </予定項目>
- </予定項目リスト>
- <実施事項リスト>
- <実施事項>
- <P>æ›´ã«ã€ã©ã†ã„ã†æ¤œç´¢ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚ã‚‹ã‹èª¿æŸ»ã™ã‚‹</P>
- </実施事項>
- </実施事項リスト>
- <上長ã¸ã®è¦è«‹äº‹é …リスト>
- <上長ã¸ã®è¦è«‹äº‹é …>
- <P>開発をã™ã‚‹ã®ã¯ã‚ã‚“ã©ã†ãªã®ã§ã€Yahoo!ã‚’è²·åŽã—ã¦ä¸‹ã•ã„。</P>
- </上長ã¸ã®è¦è«‹äº‹é …>
- </上長ã¸ã®è¦è«‹äº‹é …リスト>
- <å•é¡Œç‚¹å¯¾ç­–>
- <P>検索エンジンã§è»Šã‚’走らã›ã‚‹ã“ã¨ãŒã§ããªã„。(è¦èª¿æŸ»ï¼‰</P>
- </å•é¡Œç‚¹å¯¾ç­–>
- </業務報告>
- </業務報告リスト>
-</週報>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xgconsole.xml b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xgconsole.xml
deleted file mode 100644
index b2bf5a2de..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xgconsole.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<Profile FormatVersion="1">
- <Tools>
- <Tool Filename="jam" AllowIntercept="true">
- <Description>Jamplus build system</Description>
- </Tool>
- <Tool Filename="mayabatch.exe" AllowRemote="true" OutputFileMasks="*.dae" DeriveCaptionFrom="lastparam" Timeout="40" />
- <Tool Filename="meshbuilder_*.exe" AllowRemote="false" OutputFileMasks="*.mesh" DeriveCaptionFrom="lastparam" Timeout="10" />
- <Tool Filename="texbuilder_*.exe" AllowRemote="true" OutputFileMasks="*.tex" DeriveCaptionFrom="lastparam" />
- <Tool Filename="shaderbuilder_*.exe" AllowRemote="true" DeriveCaptionFrom="lastparam" />
- </Tools>
-</Profile>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_error.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_error.cpp
deleted file mode 100644
index 6cb6f4fe1..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_error.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
-//[code_xpath_error
- // Exception is thrown for incorrect query syntax
- try
- {
- doc.select_nodes("//nodes[#true()]");
- }
- catch (const pugi::xpath_exception& e)
- {
- std::cout << "Select failed: " << e.what() << std::endl;
- }
-
- // Exception is thrown for incorrect query semantics
- try
- {
- doc.select_nodes("(123)/next");
- }
- catch (const pugi::xpath_exception& e)
- {
- std::cout << "Select failed: " << e.what() << std::endl;
- }
-
- // Exception is thrown for query with incorrect return type
- try
- {
- doc.select_nodes("123");
- }
- catch (const pugi::xpath_exception& e)
- {
- std::cout << "Select failed: " << e.what() << std::endl;
- }
-//]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_query.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_query.cpp
deleted file mode 100644
index c622a9c08..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_query.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-#include <string>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
-//[code_xpath_query
- // Select nodes via compiled query
- pugi::xpath_query query_remote_tools("/Profile/Tools/Tool[@AllowRemote='true']");
-
- pugi::xpath_node_set tools = query_remote_tools.evaluate_node_set(doc);
- std::cout << "Remote tool: ";
- tools[2].node().print(std::cout);
-
- // Evaluate numbers via compiled query
- pugi::xpath_query query_timeouts("sum(//Tool/@Timeout)");
- std::cout << query_timeouts.evaluate_number(doc) << std::endl;
-
- // Evaluate strings via compiled query for different context nodes
- pugi::xpath_query query_name_valid("string-length(substring-before(@Filename, '_')) > 0 and @OutputFileMasks");
- pugi::xpath_query query_name("concat(substring-before(@Filename, '_'), ' produces ', @OutputFileMasks)");
-
- for (pugi::xml_node tool = doc.first_element_by_path("Profile/Tools/Tool"); tool; tool = tool.next_sibling())
- {
- std::string s = query_name.evaluate_string(tool);
-
- if (query_name_valid.evaluate_boolean(tool)) std::cout << s << std::endl;
- }
-//]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_select.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_select.cpp
deleted file mode 100644
index c098bd17b..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_select.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
-//[code_xpath_select
- pugi::xpath_node_set tools = doc.select_nodes("/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']");
-
- std::cout << "Tools:";
-
- for (pugi::xpath_node_set::const_iterator it = tools.begin(); it != tools.end(); ++it)
- {
- pugi::xpath_node node = *it;
- std::cout << " " << node.node().attribute("Filename").value();
- }
-
- pugi::xpath_node build_tool = doc.select_single_node("//Tool[contains(Description, 'build system')]");
-
- std::cout << "\nBuild tool: " << build_tool.node().attribute("Filename").value() << "\n";
-//]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_variables.cpp b/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_variables.cpp
deleted file mode 100644
index c6e9c510a..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/docs/samples/xpath_variables.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "pugixml.hpp"
-
-#include <iostream>
-#include <string>
-
-int main()
-{
- pugi::xml_document doc;
- if (!doc.load_file("xgconsole.xml")) return -1;
-
-//[code_xpath_variables
- // Select nodes via compiled query
- pugi::xpath_variable_set vars;
- vars.add("remote", pugi::xpath_type_boolean);
-
- pugi::xpath_query query_remote_tools("/Profile/Tools/Tool[@AllowRemote = string($remote)]", &vars);
-
- vars.set("remote", true);
- pugi::xpath_node_set tools_remote = query_remote_tools.evaluate_node_set(doc);
-
- vars.set("remote", false);
- pugi::xpath_node_set tools_local = query_remote_tools.evaluate_node_set(doc);
-
- std::cout << "Remote tool: ";
- tools_remote[2].node().print(std::cout);
-
- std::cout << "Local tool: ";
- tools_local[0].node().print(std::cout);
-
- // You can pass the context directly to select_nodes/select_single_node
- pugi::xpath_node_set tools_local_imm = doc.select_nodes("/Profile/Tools/Tool[@AllowRemote = string($remote)]", &vars);
-
- std::cout << "Local tool imm: ";
- tools_local_imm[0].node().print(std::cout);
-//]
-}
-
-// vim:et
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/readme.txt b/SDL_Core/tools/intergen/third_party/pugixml/readme.txt
deleted file mode 100644
index aa3353d46..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/readme.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-pugixml 1.2 - an XML processing library
-
-Copyright (C) 2006-2012, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
-Report bugs and download new versions at http://pugixml.org/
-
-This is the distribution of pugixml, which is a C++ XML processing library,
-which consists of a DOM-like interface with rich traversal/modification
-capabilities, an extremely fast XML parser which constructs the DOM tree from
-an XML file/buffer, and an XPath 1.0 implementation for complex data-driven
-tree queries. Full Unicode support is also available, with Unicode interface
-variants and conversions between different Unicode encodings (which happen
-automatically during parsing/saving).
-
-The distribution contains the following folders:
-
- contrib/ - various contributions to pugixml
-
- docs/ - documentation
- docs/samples - pugixml usage examples
- docs/quickstart.html - quick start guide
- docs/manual.html - complete manual
-
- scripts/ - project files for IDE/build systems
-
- src/ - header and source files
-
- readme.txt - this file.
-
-This library is distributed under the MIT License:
-
-Copyright (c) 2006-2012 Arseny Kapoulkine
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/CMakeLists.txt b/SDL_Core/tools/intergen/third_party/pugixml/scripts/CMakeLists.txt
deleted file mode 100644
index c17596703..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-project(pugixml)
-
-cmake_minimum_required(VERSION 2.6)
-set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared instead of static library")
-
-set(HEADERS ../src/pugixml.hpp ../src/pugiconfig.hpp)
-set(SOURCES ${HEADERS} ../src/pugixml.cpp)
-
-if(BUILD_SHARED_LIBS)
- add_library(pugixml SHARED ${SOURCES})
-else()
- add_library(pugixml STATIC ${SOURCES})
-endif()
-
-set_target_properties(pugixml PROPERTIES VERSION 1.2 SOVERSION 1.2)
-
-install(TARGETS pugixml LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
-install(FILES ${HEADERS} DESTINATION include)
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/premake4.lua b/SDL_Core/tools/intergen/third_party/pugixml/scripts/premake4.lua
deleted file mode 100644
index f1b89a0a2..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/premake4.lua
+++ /dev/null
@@ -1,92 +0,0 @@
--- Reset RNG seed to get consistent results across runs (i.e. XCode)
-math.randomseed(12345)
-
-local static = _ARGS[1] == 'static'
-local action = premake.action.current()
-
-if string.startswith(_ACTION, "vs") then
- if action then
- -- Disable solution generation
- function action.onsolution(sln)
- sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
- end
-
- -- Rename output file
- function action.onproject(prj)
- local name = "%%_" .. _ACTION .. (static and "_static" or "")
-
- if static then
- for k, v in pairs(prj.project.__configs) do
- v.objectsdir = v.objectsdir .. "Static"
- end
- end
-
- if _ACTION == "vs2010" then
- premake.generate(prj, name .. ".vcxproj", premake.vs2010_vcxproj)
- else
- premake.generate(prj, name .. ".vcproj", premake.vs200x_vcproj)
- end
- end
- end
-elseif _ACTION == "codeblocks" then
- action.onsolution = nil
-
- function action.onproject(prj)
- premake.generate(prj, "%%_" .. _ACTION .. ".cbp", premake.codeblocks_cbp)
- end
-elseif _ACTION == "codelite" then
- action.onsolution = nil
-
- function action.onproject(prj)
- premake.generate(prj, "%%_" .. _ACTION .. ".project", premake.codelite_project)
- end
-end
-
-solution "pugixml"
- objdir(_ACTION)
- targetdir(_ACTION)
-
-if string.startswith(_ACTION, "vs") then
- if _ACTION ~= "vs2002" and _ACTION ~= "vs2003" then
- platforms { "x32", "x64" }
-
- configuration "x32" targetdir(_ACTION .. "/x32")
- configuration "x64" targetdir(_ACTION .. "/x64")
- end
-
- configurations { "Debug", "Release" }
-
- if static then
- configuration "Debug" targetsuffix "sd"
- configuration "Release" targetsuffix "s"
- else
- configuration "Debug" targetsuffix "d"
- end
-else
- if _ACTION == "xcode3" then
- platforms "universal"
- end
-
- configurations { "Debug", "Release" }
-
- configuration "Debug" targetsuffix "d"
-end
-
-project "pugixml"
- kind "StaticLib"
- language "C++"
- files { "../src/pugixml.hpp", "../src/pugiconfig.hpp", "../src/pugixml.cpp" }
- flags { "NoPCH", "NoMinimalRebuild", "NoEditAndContinue", "Symbols" }
- uuid "89A1E353-E2DC-495C-B403-742BE206ACED"
-
-configuration "Debug"
- defines { "_DEBUG" }
-
-configuration "Release"
- defines { "NDEBUG" }
- flags { "Optimize" }
-
-if static then
- configuration "*"
- flags { "StaticRuntime" }
-end
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml.xcodeproj/project.pbxproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml.xcodeproj/project.pbxproj
deleted file mode 100644
index 7d56bafd2..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 45;
- objects = {
-
-/* Begin PBXBuildFile section */
- 0424128F67AB5C730232235E /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47481C4F0E03673E0E780637 /* pugixml.cpp */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 0B66463C5F896E6449051D38 /* pugiconfig.hpp */ = {isa = PBXFileReference; lastKnownFileType = text; name = "pugiconfig.hpp"; path = "pugiconfig.hpp"; sourceTree = "<group>"; };
- 47481C4F0E03673E0E780637 /* pugixml.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "pugixml.cpp"; path = "pugixml.cpp"; sourceTree = "<group>"; };
- 6C911F0460FC44CD3B1B5624 /* pugixml.hpp */ = {isa = PBXFileReference; lastKnownFileType = text; name = "pugixml.hpp"; path = "pugixml.hpp"; sourceTree = "<group>"; };
- 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libpugixmld.a"; path = "libpugixmld.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 2BA00212518037166623673F /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 19E0517F3CF26ED63AE23641 /* pugixml */ = {
- isa = PBXGroup;
- children = (
- 578963B4309E714F05E01D71 /* src */,
- 219F66186DDF392149043810 /* Products */,
- );
- name = "pugixml";
- sourceTree = "<group>";
- };
- 578963B4309E714F05E01D71 /* src */ = {
- isa = PBXGroup;
- children = (
- 0B66463C5F896E6449051D38 /* pugiconfig.hpp */,
- 47481C4F0E03673E0E780637 /* pugixml.cpp */,
- 6C911F0460FC44CD3B1B5624 /* pugixml.hpp */,
- );
- name = "src";
- path = ../src;
- sourceTree = "<group>";
- };
- 219F66186DDF392149043810 /* Products */ = {
- isa = PBXGroup;
- children = (
- 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */,
- );
- name = "Products";
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 6B55152571905B6C3A6F39D0 /* pugixml */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 73BF376C14AA1ECC0AC517ED /* Build configuration list for PBXNativeTarget "pugixml" */;
- buildPhases = (
- 6CA66B9B6252229A36E8733C /* Resources */,
- 287808486FBF545206A47CC1 /* Sources */,
- 2BA00212518037166623673F /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "pugixml";
- productName = "pugixml";
- productReference = 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */;
- productType = "com.apple.product-type.library.static";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 08FB7793FE84155DC02AAC07 /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "pugixml" */;
- compatibilityVersion = "Xcode 3.1";
- hasScannedForEncodings = 1;
- mainGroup = 19E0517F3CF26ED63AE23641 /* pugixml */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 6B55152571905B6C3A6F39D0 /* libpugixmld.a */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 6CA66B9B6252229A36E8733C /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 287808486FBF545206A47CC1 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 0424128F67AB5C730232235E /* pugixml.cpp in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 4FDB54E4253E36FC55CE27E8 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CONFIGURATION_BUILD_DIR = xcode3;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_MODEL_TUNING = G5;
- INSTALL_PATH = /usr/local/lib;
- PRODUCT_NAME = "pugixmld";
- };
- name = "Debug";
- };
- 0A4C28F553990E0405306C15 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CONFIGURATION_BUILD_DIR = xcode3;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_MODEL_TUNING = G5;
- INSTALL_PATH = /usr/local/lib;
- PRODUCT_NAME = "pugixml";
- };
- name = "Release";
- };
- 65DB0F6D27EA20852B6E3BB4 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
- CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
- COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "_DEBUG",
- );
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- OBJROOT = "xcode3/Universal/Debug";
- ONLY_ACTIVE_ARCH = NO;
- PREBINDING = NO;
- SYMROOT = "xcode3";
- };
- name = "Debug";
- };
- 5314084032B57C1A11945858 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
- CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
- COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_OPTIMIZATION_LEVEL = s;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "NDEBUG",
- );
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- OBJROOT = "xcode3/Universal/Release";
- ONLY_ACTIVE_ARCH = NO;
- PREBINDING = NO;
- SYMROOT = "xcode3";
- };
- name = "Release";
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 73BF376C14AA1ECC0AC517ED /* Build configuration list for PBXNativeTarget "libpugixmld.a" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FDB54E4253E36FC55CE27E8 /* Debug */,
- 0A4C28F553990E0405306C15 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = "Debug";
- };
- 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "pugixml" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 65DB0F6D27EA20852B6E3BB4 /* Debug */,
- 5314084032B57C1A11945858 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = "Debug";
- };
-/* End XCConfigurationList section */
-
- };
- rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
-}
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_airplay.mkf b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_airplay.mkf
deleted file mode 100644
index 477f54a9d..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_airplay.mkf
+++ /dev/null
@@ -1,13 +0,0 @@
-includepaths
-{
-"../src"
-}
-
-files
-{
-("../src")
-pugiconfig.hpp
-pugixml.cpp
-pugixml.hpp
-}
-
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codeblocks.cbp b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codeblocks.cbp
deleted file mode 100644
index e18ccfca5..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codeblocks.cbp
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
- <FileVersion major="1" minor="6" />
- <Project>
- <Option title="pugixml" />
- <Option pch_mode="2" />
- <Option compiler="gcc" />
- <Build>
- <Target title="Debug">
- <Option output="codeblocks/libpugixmld.a" prefix_auto="0" extension_auto="0" />
- <Option object_output="codeblocks/Debug" />
- <Option type="2" />
- <Option compiler="gcc" />
- <Compiler>
- <Add option="-g" />
- <Add option="-D_DEBUG" />
- </Compiler>
- <Linker>
- </Linker>
- </Target>
- <Target title="Release">
- <Option output="codeblocks/libpugixml.a" prefix_auto="0" extension_auto="0" />
- <Option object_output="codeblocks/Release" />
- <Option type="2" />
- <Option compiler="gcc" />
- <Compiler>
- <Add option="-g" />
- <Add option="-O2" />
- <Add option="-DNDEBUG" />
- </Compiler>
- <Linker>
- </Linker>
- </Target>
- </Build>
- <Unit filename="../src/pugixml.hpp">
- </Unit>
- <Unit filename="../src/pugiconfig.hpp">
- </Unit>
- <Unit filename="../src/pugixml.cpp">
- </Unit>
- <Extensions />
- </Project>
-</CodeBlocks_project_file>
-
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codelite.project b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codelite.project
deleted file mode 100644
index 637a81da5..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_codelite.project
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<CodeLite_Project Name="pugixml">
- <VirtualDirectory Name="src">
- <File Name="../src/pugixml.hpp"/>
- <File Name="../src/pugiconfig.hpp"/>
- <File Name="../src/pugixml.cpp"/>
- </VirtualDirectory>
- <Settings Type="Static Library">
- <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Static Library">
- <General OutputFile="codelite/libpugixmld.a" IntermediateDirectory="codelite/Debug" Command="./libpugixmld.a" CommandArguments="" WorkingDirectory="codelite" PauseExecWhenProcTerminates="yes"/>
- <Compiler Required="yes" Options="-g">
- <Preprocessor Value="_DEBUG"/>
- </Compiler>
- <Linker Required="yes" Options="">
- </Linker>
- <ResourceCompiler Required="no" Options=""/>
- <CustomBuild Enabled="no">
- <CleanCommand></CleanCommand>
- <BuildCommand></BuildCommand>
- <SingleFileCommand></SingleFileCommand>
- <MakefileGenerationCommand></MakefileGenerationCommand>
- <ThirdPartyToolName>None</ThirdPartyToolName>
- <WorkingDirectory></WorkingDirectory>
- </CustomBuild>
- <AdditionalRules>
- <CustomPostBuild></CustomPostBuild>
- <CustomPreBuild></CustomPreBuild>
- </AdditionalRules>
- </Configuration>
- <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Static Library">
- <General OutputFile="codelite/libpugixml.a" IntermediateDirectory="codelite/Release" Command="./libpugixml.a" CommandArguments="" WorkingDirectory="codelite" PauseExecWhenProcTerminates="yes"/>
- <Compiler Required="yes" Options="-g;-O2">
- <Preprocessor Value="NDEBUG"/>
- </Compiler>
- <Linker Required="yes" Options="">
- </Linker>
- <ResourceCompiler Required="no" Options=""/>
- <CustomBuild Enabled="no">
- <CleanCommand></CleanCommand>
- <BuildCommand></BuildCommand>
- <SingleFileCommand></SingleFileCommand>
- <MakefileGenerationCommand></MakefileGenerationCommand>
- <ThirdPartyToolName>None</ThirdPartyToolName>
- <WorkingDirectory></WorkingDirectory>
- </CustomBuild>
- <AdditionalRules>
- <CustomPostBuild></CustomPostBuild>
- <CustomPreBuild></CustomPreBuild>
- </AdditionalRules>
- </Configuration>
- </Settings>
- <Dependencies name="Debug">
- </Dependencies>
- <Dependencies name="Release">
- </Dependencies>
-</CodeLite_Project>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005.vcproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005.vcproj
deleted file mode 100644
index b60f5af8f..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005.vcproj
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="pugixml"
- ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
- RootNamespace="pugixml"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="vs2005\x32"
- IntermediateDirectory="vs2005\x32\Debug"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmld.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="vs2005\x64"
- IntermediateDirectory="vs2005\x64\Debug"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmld.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="vs2005\x32"
- IntermediateDirectory="vs2005\x32\Release"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixml.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="vs2005\x64"
- IntermediateDirectory="vs2005\x64\Release"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixml.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="src"
- Filter=""
- >
- <File
- RelativePath="..\src\pugixml.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugiconfig.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugixml.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005_static.vcproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005_static.vcproj
deleted file mode 100644
index 065e0eb4f..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2005_static.vcproj
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="pugixml"
- ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
- RootNamespace="pugixml"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="vs2005\x32"
- IntermediateDirectory="vs2005\x32\DebugStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmlsd.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="vs2005\x64"
- IntermediateDirectory="vs2005\x64\DebugStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmlsd.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="vs2005\x32"
- IntermediateDirectory="vs2005\x32\ReleaseStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmls.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="vs2005\x64"
- IntermediateDirectory="vs2005\x64\ReleaseStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmls.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="src"
- Filter=""
- >
- <File
- RelativePath="..\src\pugixml.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugiconfig.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugixml.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008.vcproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008.vcproj
deleted file mode 100644
index 72186182d..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008.vcproj
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="pugixml"
- ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
- RootNamespace="pugixml"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="vs2008\x32"
- IntermediateDirectory="vs2008\x32\Debug"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmld.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="vs2008\x64"
- IntermediateDirectory="vs2008\x64\Debug"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmld.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="vs2008\x32"
- IntermediateDirectory="vs2008\x32\Release"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixml.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="vs2008\x64"
- IntermediateDirectory="vs2008\x64\Release"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixml.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="src"
- Filter=""
- >
- <File
- RelativePath="..\src\pugixml.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugiconfig.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugixml.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008_static.vcproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008_static.vcproj
deleted file mode 100644
index a00e9d1f6..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2008_static.vcproj
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="pugixml"
- ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
- RootNamespace="pugixml"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="vs2008\x32"
- IntermediateDirectory="vs2008\x32\DebugStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmlsd.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="vs2008\x64"
- IntermediateDirectory="vs2008\x64\DebugStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmlsd.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="vs2008\x32"
- IntermediateDirectory="vs2008\x32\ReleaseStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmls.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="vs2008\x64"
- IntermediateDirectory="vs2008\x64\ReleaseStatic"
- ConfigurationType="4"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions="NDEBUG"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\pugixmls.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="src"
- Filter=""
- >
- <File
- RelativePath="..\src\pugixml.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugiconfig.hpp"
- >
- </File>
- <File
- RelativePath="..\src\pugixml.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010.vcxproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010.vcxproj
deleted file mode 100644
index c29b4c576..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010.vcxproj
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid>
- <RootNamespace>pugixml</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <UseDebugLibraries>true</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <UseDebugLibraries>true</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <UseDebugLibraries>false</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <UseDebugLibraries>false</UseDebugLibraries>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\Debug\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixmld</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\Debug\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixmld</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\Release\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\Release\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixmld.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDataBaseFileName>$(OutDir)pugixmld.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixmld.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDataBaseFileName>$(OutDir)pugixmld.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixml.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixml.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\src\pugixml.hpp" />
- <ClInclude Include="..\src\pugiconfig.hpp" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\src\pugixml.cpp">
- </ClCompile>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010_static.vcxproj b/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010_static.vcxproj
deleted file mode 100644
index c1e133ce9..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/scripts/pugixml_vs2010_static.vcxproj
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid>
- <RootNamespace>pugixml</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <UseDebugLibraries>true</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <UseDebugLibraries>true</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <UseDebugLibraries>false</UseDebugLibraries>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <UseDebugLibraries>false</UseDebugLibraries>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\DebugStatic\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixmlsd</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\DebugStatic\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixmlsd</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\ReleaseStatic\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixmls</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\ReleaseStatic\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixmls</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixmlsd.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDataBaseFileName>$(OutDir)pugixmlsd.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixmlsd.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDataBaseFileName>$(OutDir)pugixmlsd.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixmls.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <ProgramDataBaseFileName>$(OutDir)pugixmls.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)pugixmls.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <ProgramDataBaseFileName>$(OutDir)pugixmls.pdb</ProgramDataBaseFileName>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\src\pugixml.hpp" />
- <ClInclude Include="..\src\pugiconfig.hpp" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\src\pugixml.cpp">
- </ClCompile>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/src/pugiconfig.hpp b/SDL_Core/tools/intergen/third_party/pugixml/src/pugiconfig.hpp
deleted file mode 100644
index c2196715c..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/src/pugiconfig.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * pugixml parser - version 1.2
- * --------------------------------------------------------
- * Copyright (C) 2006-2012, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
- * Report bugs and download new versions at http://pugixml.org/
- *
- * This library is distributed under the MIT License. See notice at the end
- * of this file.
- *
- * This work is based on the pugxml parser, which is:
- * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
- */
-
-#ifndef HEADER_PUGICONFIG_HPP
-#define HEADER_PUGICONFIG_HPP
-
-// Uncomment this to enable wchar_t mode
-// #define PUGIXML_WCHAR_MODE
-
-// Uncomment this to disable XPath
-// #define PUGIXML_NO_XPATH
-
-// Uncomment this to disable STL
-// #define PUGIXML_NO_STL
-
-// Uncomment this to disable exceptions
-// #define PUGIXML_NO_EXCEPTIONS
-
-// Set this to control attributes for public classes/functions, i.e.:
-// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL
-// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL
-// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall
-// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead
-
-// Uncomment this to switch to header-only version
-// #define PUGIXML_HEADER_ONLY
-// #include "pugixml.cpp"
-
-// Tune these constants to adjust memory-related behavior
-// #define PUGIXML_MEMORY_PAGE_SIZE 32768
-// #define PUGIXML_MEMORY_OUTPUT_STACK 10240
-// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096
-
-#endif
-
-/**
- * Copyright (c) 2006-2012 Arseny Kapoulkine
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.cpp b/SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.cpp
deleted file mode 100644
index 4035ab1cf..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.cpp
+++ /dev/null
@@ -1,10250 +0,0 @@
-/**
- * pugixml parser - version 1.2
- * --------------------------------------------------------
- * Copyright (C) 2006-2012, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
- * Report bugs and download new versions at http://pugixml.org/
- *
- * This library is distributed under the MIT License. See notice at the end
- * of this file.
- *
- * This work is based on the pugxml parser, which is:
- * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
- */
-
-#ifndef SOURCE_PUGIXML_CPP
-#define SOURCE_PUGIXML_CPP
-
-#include "pugixml.hpp"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <wchar.h>
-
-#ifndef PUGIXML_NO_XPATH
-# include <math.h>
-# include <float.h>
-# ifdef PUGIXML_NO_EXCEPTIONS
-# include <setjmp.h>
-# endif
-#endif
-
-#ifndef PUGIXML_NO_STL
-# include <istream>
-# include <ostream>
-# include <string>
-#endif
-
-// For placement new
-#include <new>
-
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4127) // conditional expression is constant
-# pragma warning(disable: 4324) // structure was padded due to __declspec(align())
-# pragma warning(disable: 4611) // interaction between '_setjmp' and C++ object destruction is non-portable
-# pragma warning(disable: 4702) // unreachable code
-# pragma warning(disable: 4996) // this function or variable may be unsafe
-# pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged
-#endif
-
-#ifdef __INTEL_COMPILER
-# pragma warning(disable: 177) // function was declared but never referenced
-# pragma warning(disable: 279) // controlling expression is constant
-# pragma warning(disable: 1478 1786) // function was declared "deprecated"
-# pragma warning(disable: 1684) // conversion from pointer to same-sized integral type
-#endif
-
-#if defined(__BORLANDC__) && defined(PUGIXML_HEADER_ONLY)
-# pragma warn -8080 // symbol is declared but never used; disabling this inside push/pop bracket does not make the warning go away
-#endif
-
-#ifdef __BORLANDC__
-# pragma option push
-# pragma warn -8008 // condition is always false
-# pragma warn -8066 // unreachable code
-#endif
-
-#ifdef __SNC__
-// Using diag_push/diag_pop does not disable the warnings inside templates due to a compiler bug
-# pragma diag_suppress=178 // function was declared but never referenced
-# pragma diag_suppress=237 // controlling expression is constant
-#endif
-
-// Inlining controls
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-# define PUGI__NO_INLINE __declspec(noinline)
-#elif defined(__GNUC__)
-# define PUGI__NO_INLINE __attribute__((noinline))
-#else
-# define PUGI__NO_INLINE
-#endif
-
-// Simple static assertion
-#define PUGI__STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; }
-
-// Digital Mars C++ bug workaround for passing char loaded from memory via stack
-#ifdef __DMC__
-# define PUGI__DMC_VOLATILE volatile
-#else
-# define PUGI__DMC_VOLATILE
-#endif
-
-// Borland C++ bug workaround for not defining ::memcpy depending on header include order (can't always use std::memcpy because some compilers don't have it at all)
-#if defined(__BORLANDC__) && !defined(__MEM_H_USING_LIST)
-using std::memcpy;
-using std::memmove;
-#endif
-
-// In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features
-#if defined(_MSC_VER) && !defined(__S3E__)
-# define PUGI__MSVC_CRT_VERSION _MSC_VER
-#endif
-
-#ifdef PUGIXML_HEADER_ONLY
-# define PUGI__NS_BEGIN namespace pugi { namespace impl {
-# define PUGI__NS_END } }
-# define PUGI__FN inline
-# define PUGI__FN_NO_INLINE inline
-#else
-# if defined(_MSC_VER) && _MSC_VER < 1300 // MSVC6 seems to have an amusing bug with anonymous namespaces inside namespaces
-# define PUGI__NS_BEGIN namespace pugi { namespace impl {
-# define PUGI__NS_END } }
-# else
-# define PUGI__NS_BEGIN namespace pugi { namespace impl { namespace {
-# define PUGI__NS_END } } }
-# endif
-# define PUGI__FN
-# define PUGI__FN_NO_INLINE PUGI__NO_INLINE
-#endif
-
-// uintptr_t
-#if !defined(_MSC_VER) || _MSC_VER >= 1600
-# include <stdint.h>
-#else
-# ifndef _UINTPTR_T_DEFINED
-// No native uintptr_t in MSVC6 and in some WinCE versions
-typedef size_t uintptr_t;
-#define _UINTPTR_T_DEFINED
-# endif
-PUGI__NS_BEGIN
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int16 uint16_t;
- typedef unsigned __int32 uint32_t;
-PUGI__NS_END
-#endif
-
-// Memory allocation
-PUGI__NS_BEGIN
- PUGI__FN void* default_allocate(size_t size)
- {
- return malloc(size);
- }
-
- PUGI__FN void default_deallocate(void* ptr)
- {
- free(ptr);
- }
-
- template <typename T>
- struct xml_memory_management_function_storage
- {
- static allocation_function allocate;
- static deallocation_function deallocate;
- };
-
- template <typename T> allocation_function xml_memory_management_function_storage<T>::allocate = default_allocate;
- template <typename T> deallocation_function xml_memory_management_function_storage<T>::deallocate = default_deallocate;
-
- typedef xml_memory_management_function_storage<int> xml_memory;
-PUGI__NS_END
-
-// String utilities
-PUGI__NS_BEGIN
- // Get string length
- PUGI__FN size_t strlength(const char_t* s)
- {
- assert(s);
-
- #ifdef PUGIXML_WCHAR_MODE
- return wcslen(s);
- #else
- return strlen(s);
- #endif
- }
-
- // Compare two strings
- PUGI__FN bool strequal(const char_t* src, const char_t* dst)
- {
- assert(src && dst);
-
- #ifdef PUGIXML_WCHAR_MODE
- return wcscmp(src, dst) == 0;
- #else
- return strcmp(src, dst) == 0;
- #endif
- }
-
- // Compare lhs with [rhs_begin, rhs_end)
- PUGI__FN bool strequalrange(const char_t* lhs, const char_t* rhs, size_t count)
- {
- for (size_t i = 0; i < count; ++i)
- if (lhs[i] != rhs[i])
- return false;
-
- return lhs[count] == 0;
- }
-
-#ifdef PUGIXML_WCHAR_MODE
- // Convert string to wide string, assuming all symbols are ASCII
- PUGI__FN void widen_ascii(wchar_t* dest, const char* source)
- {
- for (const char* i = source; *i; ++i) *dest++ = *i;
- *dest = 0;
- }
-#endif
-PUGI__NS_END
-
-#if !defined(PUGIXML_NO_STL) || !defined(PUGIXML_NO_XPATH)
-// auto_ptr-like buffer holder for exception recovery
-PUGI__NS_BEGIN
- struct buffer_holder
- {
- void* data;
- void (*deleter)(void*);
-
- buffer_holder(void* data_, void (*deleter_)(void*)): data(data_), deleter(deleter_)
- {
- }
-
- ~buffer_holder()
- {
- if (data) deleter(data);
- }
-
- void* release()
- {
- void* result = data;
- data = 0;
- return result;
- }
- };
-PUGI__NS_END
-#endif
-
-PUGI__NS_BEGIN
- static const size_t xml_memory_page_size =
- #ifdef PUGIXML_MEMORY_PAGE_SIZE
- PUGIXML_MEMORY_PAGE_SIZE
- #else
- 32768
- #endif
- ;
-
- static const uintptr_t xml_memory_page_alignment = 32;
- static const uintptr_t xml_memory_page_pointer_mask = ~(xml_memory_page_alignment - 1);
- static const uintptr_t xml_memory_page_name_allocated_mask = 16;
- static const uintptr_t xml_memory_page_value_allocated_mask = 8;
- static const uintptr_t xml_memory_page_type_mask = 7;
-
- struct xml_allocator;
-
- struct xml_memory_page
- {
- static xml_memory_page* construct(void* memory)
- {
- if (!memory) return 0; //$ redundant, left for performance
-
- xml_memory_page* result = static_cast<xml_memory_page*>(memory);
-
- result->allocator = 0;
- result->memory = 0;
- result->prev = 0;
- result->next = 0;
- result->busy_size = 0;
- result->freed_size = 0;
-
- return result;
- }
-
- xml_allocator* allocator;
-
- void* memory;
-
- xml_memory_page* prev;
- xml_memory_page* next;
-
- size_t busy_size;
- size_t freed_size;
-
- char data[1];
- };
-
- struct xml_memory_string_header
- {
- uint16_t page_offset; // offset from page->data
- uint16_t full_size; // 0 if string occupies whole page
- };
-
- struct xml_allocator
- {
- xml_allocator(xml_memory_page* root): _root(root), _busy_size(root->busy_size)
- {
- }
-
- xml_memory_page* allocate_page(size_t data_size)
- {
- size_t size = offsetof(xml_memory_page, data) + data_size;
-
- // allocate block with some alignment, leaving memory for worst-case padding
- void* memory = xml_memory::allocate(size + xml_memory_page_alignment);
- if (!memory) return 0;
-
- // align upwards to page boundary
- void* page_memory = reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(memory) + (xml_memory_page_alignment - 1)) & ~(xml_memory_page_alignment - 1));
-
- // prepare page structure
- xml_memory_page* page = xml_memory_page::construct(page_memory);
-
- page->memory = memory;
- page->allocator = _root->allocator;
-
- return page;
- }
-
- static void deallocate_page(xml_memory_page* page)
- {
- xml_memory::deallocate(page->memory);
- }
-
- void* allocate_memory_oob(size_t size, xml_memory_page*& out_page);
-
- void* allocate_memory(size_t size, xml_memory_page*& out_page)
- {
- if (_busy_size + size > xml_memory_page_size) return allocate_memory_oob(size, out_page);
-
- void* buf = _root->data + _busy_size;
-
- _busy_size += size;
-
- out_page = _root;
-
- return buf;
- }
-
- void deallocate_memory(void* ptr, size_t size, xml_memory_page* page)
- {
- if (page == _root) page->busy_size = _busy_size;
-
- assert(ptr >= page->data && ptr < page->data + page->busy_size);
- (void)!ptr;
-
- page->freed_size += size;
- assert(page->freed_size <= page->busy_size);
-
- if (page->freed_size == page->busy_size)
- {
- if (page->next == 0)
- {
- assert(_root == page);
-
- // top page freed, just reset sizes
- page->busy_size = page->freed_size = 0;
- _busy_size = 0;
- }
- else
- {
- assert(_root != page);
- assert(page->prev);
-
- // remove from the list
- page->prev->next = page->next;
- page->next->prev = page->prev;
-
- // deallocate
- deallocate_page(page);
- }
- }
- }
-
- char_t* allocate_string(size_t length)
- {
- // allocate memory for string and header block
- size_t size = sizeof(xml_memory_string_header) + length * sizeof(char_t);
-
- // round size up to pointer alignment boundary
- size_t full_size = (size + (sizeof(void*) - 1)) & ~(sizeof(void*) - 1);
-
- xml_memory_page* page;
- xml_memory_string_header* header = static_cast<xml_memory_string_header*>(allocate_memory(full_size, page));
-
- if (!header) return 0;
-
- // setup header
- ptrdiff_t page_offset = reinterpret_cast<char*>(header) - page->data;
-
- assert(page_offset >= 0 && page_offset < (1 << 16));
- header->page_offset = static_cast<uint16_t>(page_offset);
-
- // full_size == 0 for large strings that occupy the whole page
- assert(full_size < (1 << 16) || (page->busy_size == full_size && page_offset == 0));
- header->full_size = static_cast<uint16_t>(full_size < (1 << 16) ? full_size : 0);
-
- // round-trip through void* to avoid 'cast increases required alignment of target type' warning
- // header is guaranteed a pointer-sized alignment, which should be enough for char_t
- return static_cast<char_t*>(static_cast<void*>(header + 1));
- }
-
- void deallocate_string(char_t* string)
- {
- // this function casts pointers through void* to avoid 'cast increases required alignment of target type' warnings
- // we're guaranteed the proper (pointer-sized) alignment on the input string if it was allocated via allocate_string
-
- // get header
- xml_memory_string_header* header = static_cast<xml_memory_string_header*>(static_cast<void*>(string)) - 1;
-
- // deallocate
- size_t page_offset = offsetof(xml_memory_page, data) + header->page_offset;
- xml_memory_page* page = reinterpret_cast<xml_memory_page*>(static_cast<void*>(reinterpret_cast<char*>(header) - page_offset));
-
- // if full_size == 0 then this string occupies the whole page
- size_t full_size = header->full_size == 0 ? page->busy_size : header->full_size;
-
- deallocate_memory(header, full_size, page);
- }
-
- xml_memory_page* _root;
- size_t _busy_size;
- };
-
- PUGI__FN_NO_INLINE void* xml_allocator::allocate_memory_oob(size_t size, xml_memory_page*& out_page)
- {
- const size_t large_allocation_threshold = xml_memory_page_size / 4;
-
- xml_memory_page* page = allocate_page(size <= large_allocation_threshold ? xml_memory_page_size : size);
- out_page = page;
-
- if (!page) return 0;
-
- if (size <= large_allocation_threshold)
- {
- _root->busy_size = _busy_size;
-
- // insert page at the end of linked list
- page->prev = _root;
- _root->next = page;
- _root = page;
-
- _busy_size = size;
- }
- else
- {
- // insert page before the end of linked list, so that it is deleted as soon as possible
- // the last page is not deleted even if it's empty (see deallocate_memory)
- assert(_root->prev);
-
- page->prev = _root->prev;
- page->next = _root;
-
- _root->prev->next = page;
- _root->prev = page;
- }
-
- // allocate inside page
- page->busy_size = size;
-
- return page->data;
- }
-PUGI__NS_END
-
-namespace pugi
-{
- /// A 'name=value' XML attribute structure.
- struct xml_attribute_struct
- {
- /// Default ctor
- xml_attribute_struct(impl::xml_memory_page* page): header(reinterpret_cast<uintptr_t>(page)), name(0), value(0), prev_attribute_c(0), next_attribute(0)
- {
- }
-
- uintptr_t header;
-
- char_t* name; ///< Pointer to attribute name.
- char_t* value; ///< Pointer to attribute value.
-
- xml_attribute_struct* prev_attribute_c; ///< Previous attribute (cyclic list)
- xml_attribute_struct* next_attribute; ///< Next attribute
- };
-
- /// An XML document tree node.
- struct xml_node_struct
- {
- /// Default ctor
- /// \param type - node type
- xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast<uintptr_t>(page) | (type - 1)), parent(0), name(0), value(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0)
- {
- }
-
- uintptr_t header;
-
- xml_node_struct* parent; ///< Pointer to parent
-
- char_t* name; ///< Pointer to element name.
- char_t* value; ///< Pointer to any associated string data.
-
- xml_node_struct* first_child; ///< First child
-
- xml_node_struct* prev_sibling_c; ///< Left brother (cyclic list)
- xml_node_struct* next_sibling; ///< Right brother
-
- xml_attribute_struct* first_attribute; ///< First attribute
- };
-}
-
-PUGI__NS_BEGIN
- struct xml_document_struct: public xml_node_struct, public xml_allocator
- {
- xml_document_struct(xml_memory_page* page): xml_node_struct(page, node_document), xml_allocator(page), buffer(0)
- {
- }
-
- const char_t* buffer;
- };
-
- inline xml_allocator& get_allocator(const xml_node_struct* node)
- {
- assert(node);
-
- return *reinterpret_cast<xml_memory_page*>(node->header & xml_memory_page_pointer_mask)->allocator;
- }
-PUGI__NS_END
-
-// Low-level DOM operations
-PUGI__NS_BEGIN
- inline xml_attribute_struct* allocate_attribute(xml_allocator& alloc)
- {
- xml_memory_page* page;
- void* memory = alloc.allocate_memory(sizeof(xml_attribute_struct), page);
-
- return new (memory) xml_attribute_struct(page);
- }
-
- inline xml_node_struct* allocate_node(xml_allocator& alloc, xml_node_type type)
- {
- xml_memory_page* page;
- void* memory = alloc.allocate_memory(sizeof(xml_node_struct), page);
-
- return new (memory) xml_node_struct(page, type);
- }
-
- inline void destroy_attribute(xml_attribute_struct* a, xml_allocator& alloc)
- {
- uintptr_t header = a->header;
-
- if (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(a->name);
- if (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(a->value);
-
- alloc.deallocate_memory(a, sizeof(xml_attribute_struct), reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask));
- }
-
- inline void destroy_node(xml_node_struct* n, xml_allocator& alloc)
- {
- uintptr_t header = n->header;
-
- if (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(n->name);
- if (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(n->value);
-
- for (xml_attribute_struct* attr = n->first_attribute; attr; )
- {
- xml_attribute_struct* next = attr->next_attribute;
-
- destroy_attribute(attr, alloc);
-
- attr = next;
- }
-
- for (xml_node_struct* child = n->first_child; child; )
- {
- xml_node_struct* next = child->next_sibling;
-
- destroy_node(child, alloc);
-
- child = next;
- }
-
- alloc.deallocate_memory(n, sizeof(xml_node_struct), reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask));
- }
-
- PUGI__FN_NO_INLINE xml_node_struct* append_node(xml_node_struct* node, xml_allocator& alloc, xml_node_type type = node_element)
- {
- xml_node_struct* child = allocate_node(alloc, type);
- if (!child) return 0;
-
- child->parent = node;
-
- xml_node_struct* first_child = node->first_child;
-
- if (first_child)
- {
- xml_node_struct* last_child = first_child->prev_sibling_c;
-
- last_child->next_sibling = child;
- child->prev_sibling_c = last_child;
- first_child->prev_sibling_c = child;
- }
- else
- {
- node->first_child = child;
- child->prev_sibling_c = child;
- }
-
- return child;
- }
-
- PUGI__FN_NO_INLINE xml_attribute_struct* append_attribute_ll(xml_node_struct* node, xml_allocator& alloc)
- {
- xml_attribute_struct* a = allocate_attribute(alloc);
- if (!a) return 0;
-
- xml_attribute_struct* first_attribute = node->first_attribute;
-
- if (first_attribute)
- {
- xml_attribute_struct* last_attribute = first_attribute->prev_attribute_c;
-
- last_attribute->next_attribute = a;
- a->prev_attribute_c = last_attribute;
- first_attribute->prev_attribute_c = a;
- }
- else
- {
- node->first_attribute = a;
- a->prev_attribute_c = a;
- }
-
- return a;
- }
-PUGI__NS_END
-
-// Helper classes for code generation
-PUGI__NS_BEGIN
- struct opt_false
- {
- enum { value = 0 };
- };
-
- struct opt_true
- {
- enum { value = 1 };
- };
-PUGI__NS_END
-
-// Unicode utilities
-PUGI__NS_BEGIN
- inline uint16_t endian_swap(uint16_t value)
- {
- return static_cast<uint16_t>(((value & 0xff) << 8) | (value >> 8));
- }
-
- inline uint32_t endian_swap(uint32_t value)
- {
- return ((value & 0xff) << 24) | ((value & 0xff00) << 8) | ((value & 0xff0000) >> 8) | (value >> 24);
- }
-
- struct utf8_counter
- {
- typedef size_t value_type;
-
- static value_type low(value_type result, uint32_t ch)
- {
- // U+0000..U+007F
- if (ch < 0x80) return result + 1;
- // U+0080..U+07FF
- else if (ch < 0x800) return result + 2;
- // U+0800..U+FFFF
- else return result + 3;
- }
-
- static value_type high(value_type result, uint32_t)
- {
- // U+10000..U+10FFFF
- return result + 4;
- }
- };
-
- struct utf8_writer
- {
- typedef uint8_t* value_type;
-
- static value_type low(value_type result, uint32_t ch)
- {
- // U+0000..U+007F
- if (ch < 0x80)
- {
- *result = static_cast<uint8_t>(ch);
- return result + 1;
- }
- // U+0080..U+07FF
- else if (ch < 0x800)
- {
- result[0] = static_cast<uint8_t>(0xC0 | (ch >> 6));
- result[1] = static_cast<uint8_t>(0x80 | (ch & 0x3F));
- return result + 2;
- }
- // U+0800..U+FFFF
- else
- {
- result[0] = static_cast<uint8_t>(0xE0 | (ch >> 12));
- result[1] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));
- result[2] = static_cast<uint8_t>(0x80 | (ch & 0x3F));
- return result + 3;
- }
- }
-
- static value_type high(value_type result, uint32_t ch)
- {
- // U+10000..U+10FFFF
- result[0] = static_cast<uint8_t>(0xF0 | (ch >> 18));
- result[1] = static_cast<uint8_t>(0x80 | ((ch >> 12) & 0x3F));
- result[2] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));
- result[3] = static_cast<uint8_t>(0x80 | (ch & 0x3F));
- return result + 4;
- }
-
- static value_type any(value_type result, uint32_t ch)
- {
- return (ch < 0x10000) ? low(result, ch) : high(result, ch);
- }
- };
-
- struct utf16_counter
- {
- typedef size_t value_type;
-
- static value_type low(value_type result, uint32_t)
- {
- return result + 1;
- }
-
- static value_type high(value_type result, uint32_t)
- {
- return result + 2;
- }
- };
-
- struct utf16_writer
- {
- typedef uint16_t* value_type;
-
- static value_type low(value_type result, uint32_t ch)
- {
- *result = static_cast<uint16_t>(ch);
-
- return result + 1;
- }
-
- static value_type high(value_type result, uint32_t ch)
- {
- uint32_t msh = static_cast<uint32_t>(ch - 0x10000) >> 10;
- uint32_t lsh = static_cast<uint32_t>(ch - 0x10000) & 0x3ff;
-
- result[0] = static_cast<uint16_t>(0xD800 + msh);
- result[1] = static_cast<uint16_t>(0xDC00 + lsh);
-
- return result + 2;
- }
-
- static value_type any(value_type result, uint32_t ch)
- {
- return (ch < 0x10000) ? low(result, ch) : high(result, ch);
- }
- };
-
- struct utf32_counter
- {
- typedef size_t value_type;
-
- static value_type low(value_type result, uint32_t)
- {
- return result + 1;
- }
-
- static value_type high(value_type result, uint32_t)
- {
- return result + 1;
- }
- };
-
- struct utf32_writer
- {
- typedef uint32_t* value_type;
-
- static value_type low(value_type result, uint32_t ch)
- {
- *result = ch;
-
- return result + 1;
- }
-
- static value_type high(value_type result, uint32_t ch)
- {
- *result = ch;
-
- return result + 1;
- }
-
- static value_type any(value_type result, uint32_t ch)
- {
- *result = ch;
-
- return result + 1;
- }
- };
-
- struct latin1_writer
- {
- typedef uint8_t* value_type;
-
- static value_type low(value_type result, uint32_t ch)
- {
- *result = static_cast<uint8_t>(ch > 255 ? '?' : ch);
-
- return result + 1;
- }
-
- static value_type high(value_type result, uint32_t ch)
- {
- (void)ch;
-
- *result = '?';
-
- return result + 1;
- }
- };
-
- template <size_t size> struct wchar_selector;
-
- template <> struct wchar_selector<2>
- {
- typedef uint16_t type;
- typedef utf16_counter counter;
- typedef utf16_writer writer;
- };
-
- template <> struct wchar_selector<4>
- {
- typedef uint32_t type;
- typedef utf32_counter counter;
- typedef utf32_writer writer;
- };
-
- typedef wchar_selector<sizeof(wchar_t)>::counter wchar_counter;
- typedef wchar_selector<sizeof(wchar_t)>::writer wchar_writer;
-
- template <typename Traits, typename opt_swap = opt_false> struct utf_decoder
- {
- static inline typename Traits::value_type decode_utf8_block(const uint8_t* data, size_t size, typename Traits::value_type result)
- {
- const uint8_t utf8_byte_mask = 0x3f;
-
- while (size)
- {
- uint8_t lead = *data;
-
- // 0xxxxxxx -> U+0000..U+007F
- if (lead < 0x80)
- {
- result = Traits::low(result, lead);
- data += 1;
- size -= 1;
-
- // process aligned single-byte (ascii) blocks
- if ((reinterpret_cast<uintptr_t>(data) & 3) == 0)
- {
- // round-trip through void* to silence 'cast increases required alignment of target type' warnings
- while (size >= 4 && (*static_cast<const uint32_t*>(static_cast<const void*>(data)) & 0x80808080) == 0)
- {
- result = Traits::low(result, data[0]);
- result = Traits::low(result, data[1]);
- result = Traits::low(result, data[2]);
- result = Traits::low(result, data[3]);
- data += 4;
- size -= 4;
- }
- }
- }
- // 110xxxxx -> U+0080..U+07FF
- else if (static_cast<unsigned int>(lead - 0xC0) < 0x20 && size >= 2 && (data[1] & 0xc0) == 0x80)
- {
- result = Traits::low(result, ((lead & ~0xC0) << 6) | (data[1] & utf8_byte_mask));
- data += 2;
- size -= 2;
- }
- // 1110xxxx -> U+0800-U+FFFF
- else if (static_cast<unsigned int>(lead - 0xE0) < 0x10 && size >= 3 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80)
- {
- result = Traits::low(result, ((lead & ~0xE0) << 12) | ((data[1] & utf8_byte_mask) << 6) | (data[2] & utf8_byte_mask));
- data += 3;
- size -= 3;
- }
- // 11110xxx -> U+10000..U+10FFFF
- else if (static_cast<unsigned int>(lead - 0xF0) < 0x08 && size >= 4 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80 && (data[3] & 0xc0) == 0x80)
- {
- result = Traits::high(result, ((lead & ~0xF0) << 18) | ((data[1] & utf8_byte_mask) << 12) | ((data[2] & utf8_byte_mask) << 6) | (data[3] & utf8_byte_mask));
- data += 4;
- size -= 4;
- }
- // 10xxxxxx or 11111xxx -> invalid
- else
- {
- data += 1;
- size -= 1;
- }
- }
-
- return result;
- }
-
- static inline typename Traits::value_type decode_utf16_block(const uint16_t* data, size_t size, typename Traits::value_type result)
- {
- const uint16_t* end = data + size;
-
- while (data < end)
- {
- uint16_t lead = opt_swap::value ? endian_swap(*data) : *data;
-
- // U+0000..U+D7FF
- if (lead < 0xD800)
- {
- result = Traits::low(result, lead);
- data += 1;
- }
- // U+E000..U+FFFF
- else if (static_cast<unsigned int>(lead - 0xE000) < 0x2000)
- {
- result = Traits::low(result, lead);
- data += 1;
- }
- // surrogate pair lead
- else if (static_cast<unsigned int>(lead - 0xD800) < 0x400 && data + 1 < end)
- {
- uint16_t next = opt_swap::value ? endian_swap(data[1]) : data[1];
-
- if (static_cast<unsigned int>(next - 0xDC00) < 0x400)
- {
- result = Traits::high(result, 0x10000 + ((lead & 0x3ff) << 10) + (next & 0x3ff));
- data += 2;
- }
- else
- {
- data += 1;
- }
- }
- else
- {
- data += 1;
- }
- }
-
- return result;
- }
-
- static inline typename Traits::value_type decode_utf32_block(const uint32_t* data, size_t size, typename Traits::value_type result)
- {
- const uint32_t* end = data + size;
-
- while (data < end)
- {
- uint32_t lead = opt_swap::value ? endian_swap(*data) : *data;
-
- // U+0000..U+FFFF
- if (lead < 0x10000)
- {
- result = Traits::low(result, lead);
- data += 1;
- }
- // U+10000..U+10FFFF
- else
- {
- result = Traits::high(result, lead);
- data += 1;
- }
- }
-
- return result;
- }
-
- static inline typename Traits::value_type decode_latin1_block(const uint8_t* data, size_t size, typename Traits::value_type result)
- {
- for (size_t i = 0; i < size; ++i)
- {
- result = Traits::low(result, data[i]);
- }
-
- return result;
- }
-
- static inline typename Traits::value_type decode_wchar_block_impl(const uint16_t* data, size_t size, typename Traits::value_type result)
- {
- return decode_utf16_block(data, size, result);
- }
-
- static inline typename Traits::value_type decode_wchar_block_impl(const uint32_t* data, size_t size, typename Traits::value_type result)
- {
- return decode_utf32_block(data, size, result);
- }
-
- static inline typename Traits::value_type decode_wchar_block(const wchar_t* data, size_t size, typename Traits::value_type result)
- {
- return decode_wchar_block_impl(reinterpret_cast<const wchar_selector<sizeof(wchar_t)>::type*>(data), size, result);
- }
- };
-
- template <typename T> PUGI__FN void convert_utf_endian_swap(T* result, const T* data, size_t length)
- {
- for (size_t i = 0; i < length; ++i) result[i] = endian_swap(data[i]);
- }
-
-#ifdef PUGIXML_WCHAR_MODE
- PUGI__FN void convert_wchar_endian_swap(wchar_t* result, const wchar_t* data, size_t length)
- {
- for (size_t i = 0; i < length; ++i) result[i] = static_cast<wchar_t>(endian_swap(static_cast<wchar_selector<sizeof(wchar_t)>::type>(data[i])));
- }
-#endif
-PUGI__NS_END
-
-PUGI__NS_BEGIN
- enum chartype_t
- {
- ct_parse_pcdata = 1, // \0, &, \r, <
- ct_parse_attr = 2, // \0, &, \r, ', "
- ct_parse_attr_ws = 4, // \0, &, \r, ', ", \n, tab
- ct_space = 8, // \r, \n, space, tab
- ct_parse_cdata = 16, // \0, ], >, \r
- ct_parse_comment = 32, // \0, -, >, \r
- ct_symbol = 64, // Any symbol > 127, a-z, A-Z, 0-9, _, :, -, .
- ct_start_symbol = 128 // Any symbol > 127, a-z, A-Z, _, :
- };
-
- static const unsigned char chartype_table[256] =
- {
- 55, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 63, 0, 0, // 0-15
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31
- 8, 0, 6, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 96, 64, 0, // 32-47
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192, 0, 1, 0, 48, 0, // 48-63
- 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 64-79
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0, 0, 16, 0, 192, // 80-95
- 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 96-111
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0, 0, 0, 0, 0, // 112-127
-
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 128+
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192
- };
-
- enum chartypex_t
- {
- ctx_special_pcdata = 1, // Any symbol >= 0 and < 32 (except \t, \r, \n), &, <, >
- ctx_special_attr = 2, // Any symbol >= 0 and < 32 (except \t), &, <, >, "
- ctx_start_symbol = 4, // Any symbol > 127, a-z, A-Z, _
- ctx_digit = 8, // 0-9
- ctx_symbol = 16 // Any symbol > 127, a-z, A-Z, 0-9, _, -, .
- };
-
- static const unsigned char chartypex_table[256] =
- {
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 2, 3, 3, 2, 3, 3, // 0-15
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 16-31
- 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 16, 16, 0, // 32-47
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 3, 0, 3, 0, // 48-63
-
- 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 64-79
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 20, // 80-95
- 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 96-111
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, // 112-127
-
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 128+
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
- };
-
-#ifdef PUGIXML_WCHAR_MODE
- #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) ((static_cast<unsigned int>(c) < 128 ? table[static_cast<unsigned int>(c)] : table[128]) & (ct))
-#else
- #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) (table[static_cast<unsigned char>(c)] & (ct))
-#endif
-
- #define PUGI__IS_CHARTYPE(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartype_table)
- #define PUGI__IS_CHARTYPEX(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartypex_table)
-
- PUGI__FN bool is_little_endian()
- {
- unsigned int ui = 1;
-
- return *reinterpret_cast<unsigned char*>(&ui) == 1;
- }
-
- PUGI__FN xml_encoding get_wchar_encoding()
- {
- PUGI__STATIC_ASSERT(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4);
-
- if (sizeof(wchar_t) == 2)
- return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
- else
- return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
- }
-
- PUGI__FN xml_encoding guess_buffer_encoding(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
- {
- // look for BOM in first few bytes
- if (d0 == 0 && d1 == 0 && d2 == 0xfe && d3 == 0xff) return encoding_utf32_be;
- if (d0 == 0xff && d1 == 0xfe && d2 == 0 && d3 == 0) return encoding_utf32_le;
- if (d0 == 0xfe && d1 == 0xff) return encoding_utf16_be;
- if (d0 == 0xff && d1 == 0xfe) return encoding_utf16_le;
- if (d0 == 0xef && d1 == 0xbb && d2 == 0xbf) return encoding_utf8;
-
- // look for <, <? or <?xm in various encodings
- if (d0 == 0 && d1 == 0 && d2 == 0 && d3 == 0x3c) return encoding_utf32_be;
- if (d0 == 0x3c && d1 == 0 && d2 == 0 && d3 == 0) return encoding_utf32_le;
- if (d0 == 0 && d1 == 0x3c && d2 == 0 && d3 == 0x3f) return encoding_utf16_be;
- if (d0 == 0x3c && d1 == 0 && d2 == 0x3f && d3 == 0) return encoding_utf16_le;
- if (d0 == 0x3c && d1 == 0x3f && d2 == 0x78 && d3 == 0x6d) return encoding_utf8;
-
- // look for utf16 < followed by node name (this may fail, but is better than utf8 since it's zero terminated so early)
- if (d0 == 0 && d1 == 0x3c) return encoding_utf16_be;
- if (d0 == 0x3c && d1 == 0) return encoding_utf16_le;
-
- // no known BOM detected, assume utf8
- return encoding_utf8;
- }
-
- PUGI__FN xml_encoding get_buffer_encoding(xml_encoding encoding, const void* contents, size_t size)
- {
- // replace wchar encoding with utf implementation
- if (encoding == encoding_wchar) return get_wchar_encoding();
-
- // replace utf16 encoding with utf16 with specific endianness
- if (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
-
- // replace utf32 encoding with utf32 with specific endianness
- if (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
-
- // only do autodetection if no explicit encoding is requested
- if (encoding != encoding_auto) return encoding;
-
- // skip encoding autodetection if input buffer is too small
- if (size < 4) return encoding_utf8;
-
- // try to guess encoding (based on XML specification, Appendix F.1)
- const uint8_t* data = static_cast<const uint8_t*>(contents);
-
- PUGI__DMC_VOLATILE uint8_t d0 = data[0], d1 = data[1], d2 = data[2], d3 = data[3];
-
- return guess_buffer_encoding(d0, d1, d2, d3);
- }
-
- PUGI__FN bool get_mutable_buffer(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)
- {
- if (is_mutable)
- {
- out_buffer = static_cast<char_t*>(const_cast<void*>(contents));
- }
- else
- {
- void* buffer = xml_memory::allocate(size > 0 ? size : 1);
- if (!buffer) return false;
-
- memcpy(buffer, contents, size);
-
- out_buffer = static_cast<char_t*>(buffer);
- }
-
- out_length = size / sizeof(char_t);
-
- return true;
- }
-
-#ifdef PUGIXML_WCHAR_MODE
- PUGI__FN bool need_endian_swap_utf(xml_encoding le, xml_encoding re)
- {
- return (le == encoding_utf16_be && re == encoding_utf16_le) || (le == encoding_utf16_le && re == encoding_utf16_be) ||
- (le == encoding_utf32_be && re == encoding_utf32_le) || (le == encoding_utf32_le && re == encoding_utf32_be);
- }
-
- PUGI__FN bool convert_buffer_endian_swap(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)
- {
- const char_t* data = static_cast<const char_t*>(contents);
-
- if (is_mutable)
- {
- out_buffer = const_cast<char_t*>(data);
- }
- else
- {
- out_buffer = static_cast<char_t*>(xml_memory::allocate(size > 0 ? size : 1));
- if (!out_buffer) return false;
- }
-
- out_length = size / sizeof(char_t);
-
- convert_wchar_endian_swap(out_buffer, data, out_length);
-
- return true;
- }
-
- PUGI__FN bool convert_buffer_utf8(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size)
- {
- const uint8_t* data = static_cast<const uint8_t*>(contents);
-
- // first pass: get length in wchar_t units
- out_length = utf_decoder<wchar_counter>::decode_utf8_block(data, size, 0);
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // second pass: convert utf8 input to wchar_t
- wchar_writer::value_type out_begin = reinterpret_cast<wchar_writer::value_type>(out_buffer);
- wchar_writer::value_type out_end = utf_decoder<wchar_writer>::decode_utf8_block(data, size, out_begin);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- template <typename opt_swap> PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)
- {
- const uint16_t* data = static_cast<const uint16_t*>(contents);
- size_t length = size / sizeof(uint16_t);
-
- // first pass: get length in wchar_t units
- out_length = utf_decoder<wchar_counter, opt_swap>::decode_utf16_block(data, length, 0);
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // second pass: convert utf16 input to wchar_t
- wchar_writer::value_type out_begin = reinterpret_cast<wchar_writer::value_type>(out_buffer);
- wchar_writer::value_type out_end = utf_decoder<wchar_writer, opt_swap>::decode_utf16_block(data, length, out_begin);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- template <typename opt_swap> PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)
- {
- const uint32_t* data = static_cast<const uint32_t*>(contents);
- size_t length = size / sizeof(uint32_t);
-
- // first pass: get length in wchar_t units
- out_length = utf_decoder<wchar_counter, opt_swap>::decode_utf32_block(data, length, 0);
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // second pass: convert utf32 input to wchar_t
- wchar_writer::value_type out_begin = reinterpret_cast<wchar_writer::value_type>(out_buffer);
- wchar_writer::value_type out_end = utf_decoder<wchar_writer, opt_swap>::decode_utf32_block(data, length, out_begin);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- PUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size)
- {
- const uint8_t* data = static_cast<const uint8_t*>(contents);
-
- // get length in wchar_t units
- out_length = size;
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // convert latin1 input to wchar_t
- wchar_writer::value_type out_begin = reinterpret_cast<wchar_writer::value_type>(out_buffer);
- wchar_writer::value_type out_end = utf_decoder<wchar_writer>::decode_latin1_block(data, size, out_begin);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- PUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable)
- {
- // get native encoding
- xml_encoding wchar_encoding = get_wchar_encoding();
-
- // fast path: no conversion required
- if (encoding == wchar_encoding) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);
-
- // only endian-swapping is required
- if (need_endian_swap_utf(encoding, wchar_encoding)) return convert_buffer_endian_swap(out_buffer, out_length, contents, size, is_mutable);
-
- // source encoding is utf8
- if (encoding == encoding_utf8) return convert_buffer_utf8(out_buffer, out_length, contents, size);
-
- // source encoding is utf16
- if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)
- {
- xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
-
- return (native_encoding == encoding) ?
- convert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) :
- convert_buffer_utf16(out_buffer, out_length, contents, size, opt_true());
- }
-
- // source encoding is utf32
- if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)
- {
- xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
-
- return (native_encoding == encoding) ?
- convert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) :
- convert_buffer_utf32(out_buffer, out_length, contents, size, opt_true());
- }
-
- // source encoding is latin1
- if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size);
-
- assert(!"Invalid encoding");
- return false;
- }
-#else
- template <typename opt_swap> PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)
- {
- const uint16_t* data = static_cast<const uint16_t*>(contents);
- size_t length = size / sizeof(uint16_t);
-
- // first pass: get length in utf8 units
- out_length = utf_decoder<utf8_counter, opt_swap>::decode_utf16_block(data, length, 0);
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // second pass: convert utf16 input to utf8
- uint8_t* out_begin = reinterpret_cast<uint8_t*>(out_buffer);
- uint8_t* out_end = utf_decoder<utf8_writer, opt_swap>::decode_utf16_block(data, length, out_begin);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- template <typename opt_swap> PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap)
- {
- const uint32_t* data = static_cast<const uint32_t*>(contents);
- size_t length = size / sizeof(uint32_t);
-
- // first pass: get length in utf8 units
- out_length = utf_decoder<utf8_counter, opt_swap>::decode_utf32_block(data, length, 0);
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // second pass: convert utf32 input to utf8
- uint8_t* out_begin = reinterpret_cast<uint8_t*>(out_buffer);
- uint8_t* out_end = utf_decoder<utf8_writer, opt_swap>::decode_utf32_block(data, length, out_begin);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- PUGI__FN size_t get_latin1_7bit_prefix_length(const uint8_t* data, size_t size)
- {
- for (size_t i = 0; i < size; ++i)
- if (data[i] > 127)
- return i;
-
- return size;
- }
-
- PUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)
- {
- const uint8_t* data = static_cast<const uint8_t*>(contents);
-
- // get size of prefix that does not need utf8 conversion
- size_t prefix_length = get_latin1_7bit_prefix_length(data, size);
- assert(prefix_length <= size);
-
- const uint8_t* postfix = data + prefix_length;
- size_t postfix_length = size - prefix_length;
-
- // if no conversion is needed, just return the original buffer
- if (postfix_length == 0) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);
-
- // first pass: get length in utf8 units
- out_length = prefix_length + utf_decoder<utf8_counter>::decode_latin1_block(postfix, postfix_length, 0);
-
- // allocate buffer of suitable length
- out_buffer = static_cast<char_t*>(xml_memory::allocate((out_length > 0 ? out_length : 1) * sizeof(char_t)));
- if (!out_buffer) return false;
-
- // second pass: convert latin1 input to utf8
- memcpy(out_buffer, data, prefix_length);
-
- uint8_t* out_begin = reinterpret_cast<uint8_t*>(out_buffer);
- uint8_t* out_end = utf_decoder<utf8_writer>::decode_latin1_block(postfix, postfix_length, out_begin + prefix_length);
-
- assert(out_end == out_begin + out_length);
- (void)!out_end;
-
- return true;
- }
-
- PUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable)
- {
- // fast path: no conversion required
- if (encoding == encoding_utf8) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable);
-
- // source encoding is utf16
- if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)
- {
- xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
-
- return (native_encoding == encoding) ?
- convert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) :
- convert_buffer_utf16(out_buffer, out_length, contents, size, opt_true());
- }
-
- // source encoding is utf32
- if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)
- {
- xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
-
- return (native_encoding == encoding) ?
- convert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) :
- convert_buffer_utf32(out_buffer, out_length, contents, size, opt_true());
- }
-
- // source encoding is latin1
- if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable);
-
- assert(!"Invalid encoding");
- return false;
- }
-#endif
-
- PUGI__FN size_t as_utf8_begin(const wchar_t* str, size_t length)
- {
- // get length in utf8 characters
- return utf_decoder<utf8_counter>::decode_wchar_block(str, length, 0);
- }
-
- PUGI__FN void as_utf8_end(char* buffer, size_t size, const wchar_t* str, size_t length)
- {
- // convert to utf8
- uint8_t* begin = reinterpret_cast<uint8_t*>(buffer);
- uint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(str, length, begin);
-
- assert(begin + size == end);
- (void)!end;
-
- // zero-terminate
- buffer[size] = 0;
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length)
- {
- // first pass: get length in utf8 characters
- size_t size = as_utf8_begin(str, length);
-
- // allocate resulting string
- std::string result;
- result.resize(size);
-
- // second pass: convert to utf8
- if (size > 0) as_utf8_end(&result[0], size, str, length);
-
- return result;
- }
-
- PUGI__FN std::basic_string<wchar_t> as_wide_impl(const char* str, size_t size)
- {
- const uint8_t* data = reinterpret_cast<const uint8_t*>(str);
-
- // first pass: get length in wchar_t units
- size_t length = utf_decoder<wchar_counter>::decode_utf8_block(data, size, 0);
-
- // allocate resulting string
- std::basic_string<wchar_t> result;
- result.resize(length);
-
- // second pass: convert to wchar_t
- if (length > 0)
- {
- wchar_writer::value_type begin = reinterpret_cast<wchar_writer::value_type>(&result[0]);
- wchar_writer::value_type end = utf_decoder<wchar_writer>::decode_utf8_block(data, size, begin);
-
- assert(begin + length == end);
- (void)!end;
- }
-
- return result;
- }
-#endif
-
- inline bool strcpy_insitu_allow(size_t length, uintptr_t allocated, char_t* target)
- {
- assert(target);
- size_t target_length = strlength(target);
-
- // always reuse document buffer memory if possible
- if (!allocated) return target_length >= length;
-
- // reuse heap memory if waste is not too great
- const size_t reuse_threshold = 32;
-
- return target_length >= length && (target_length < reuse_threshold || target_length - length < target_length / 2);
- }
-
- PUGI__FN bool strcpy_insitu(char_t*& dest, uintptr_t& header, uintptr_t header_mask, const char_t* source)
- {
- size_t source_length = strlength(source);
-
- if (source_length == 0)
- {
- // empty string and null pointer are equivalent, so just deallocate old memory
- xml_allocator* alloc = reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask)->allocator;
-
- if (header & header_mask) alloc->deallocate_string(dest);
-
- // mark the string as not allocated
- dest = 0;
- header &= ~header_mask;
-
- return true;
- }
- else if (dest && strcpy_insitu_allow(source_length, header & header_mask, dest))
- {
- // we can reuse old buffer, so just copy the new data (including zero terminator)
- memcpy(dest, source, (source_length + 1) * sizeof(char_t));
-
- return true;
- }
- else
- {
- xml_allocator* alloc = reinterpret_cast<xml_memory_page*>(header & xml_memory_page_pointer_mask)->allocator;
-
- // allocate new buffer
- char_t* buf = alloc->allocate_string(source_length + 1);
- if (!buf) return false;
-
- // copy the string (including zero terminator)
- memcpy(buf, source, (source_length + 1) * sizeof(char_t));
-
- // deallocate old buffer (*after* the above to protect against overlapping memory and/or allocation failures)
- if (header & header_mask) alloc->deallocate_string(dest);
-
- // the string is now allocated, so set the flag
- dest = buf;
- header |= header_mask;
-
- return true;
- }
- }
-
- struct gap
- {
- char_t* end;
- size_t size;
-
- gap(): end(0), size(0)
- {
- }
-
- // Push new gap, move s count bytes further (skipping the gap).
- // Collapse previous gap.
- void push(char_t*& s, size_t count)
- {
- if (end) // there was a gap already; collapse it
- {
- // Move [old_gap_end, new_gap_start) to [old_gap_start, ...)
- assert(s >= end);
- memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
- }
-
- s += count; // end of current gap
-
- // "merge" two gaps
- end = s;
- size += count;
- }
-
- // Collapse all gaps, return past-the-end pointer
- char_t* flush(char_t* s)
- {
- if (end)
- {
- // Move [old_gap_end, current_pos) to [old_gap_start, ...)
- assert(s >= end);
- memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
-
- return s - size;
- }
- else return s;
- }
- };
-
- PUGI__FN char_t* strconv_escape(char_t* s, gap& g)
- {
- char_t* stre = s + 1;
-
- switch (*stre)
- {
- case '#': // &#...
- {
- unsigned int ucsc = 0;
-
- if (stre[1] == 'x') // &#x... (hex code)
- {
- stre += 2;
-
- char_t ch = *stre;
-
- if (ch == ';') return stre;
-
- for (;;)
- {
- if (static_cast<unsigned int>(ch - '0') <= 9)
- ucsc = 16 * ucsc + (ch - '0');
- else if (static_cast<unsigned int>((ch | ' ') - 'a') <= 5)
- ucsc = 16 * ucsc + ((ch | ' ') - 'a' + 10);
- else if (ch == ';')
- break;
- else // cancel
- return stre;
-
- ch = *++stre;
- }
-
- ++stre;
- }
- else // &#... (dec code)
- {
- char_t ch = *++stre;
-
- if (ch == ';') return stre;
-
- for (;;)
- {
- if (static_cast<unsigned int>(ch - '0') <= 9)
- ucsc = 10 * ucsc + (ch - '0');
- else if (ch == ';')
- break;
- else // cancel
- return stre;
-
- ch = *++stre;
- }
-
- ++stre;
- }
-
- #ifdef PUGIXML_WCHAR_MODE
- s = reinterpret_cast<char_t*>(wchar_writer::any(reinterpret_cast<wchar_writer::value_type>(s), ucsc));
- #else
- s = reinterpret_cast<char_t*>(utf8_writer::any(reinterpret_cast<uint8_t*>(s), ucsc));
- #endif
-
- g.push(s, stre - s);
- return stre;
- }
-
- case 'a': // &a
- {
- ++stre;
-
- if (*stre == 'm') // &am
- {
- if (*++stre == 'p' && *++stre == ';') // &amp;
- {
- *s++ = '&';
- ++stre;
-
- g.push(s, stre - s);
- return stre;
- }
- }
- else if (*stre == 'p') // &ap
- {
- if (*++stre == 'o' && *++stre == 's' && *++stre == ';') // &apos;
- {
- *s++ = '\'';
- ++stre;
-
- g.push(s, stre - s);
- return stre;
- }
- }
- break;
- }
-
- case 'g': // &g
- {
- if (*++stre == 't' && *++stre == ';') // &gt;
- {
- *s++ = '>';
- ++stre;
-
- g.push(s, stre - s);
- return stre;
- }
- break;
- }
-
- case 'l': // &l
- {
- if (*++stre == 't' && *++stre == ';') // &lt;
- {
- *s++ = '<';
- ++stre;
-
- g.push(s, stre - s);
- return stre;
- }
- break;
- }
-
- case 'q': // &q
- {
- if (*++stre == 'u' && *++stre == 'o' && *++stre == 't' && *++stre == ';') // &quot;
- {
- *s++ = '"';
- ++stre;
-
- g.push(s, stre - s);
- return stre;
- }
- break;
- }
-
- default:
- break;
- }
-
- return stre;
- }
-
- // Utility macro for last character handling
- #define ENDSWITH(c, e) ((c) == (e) || ((c) == 0 && endch == (e)))
-
- PUGI__FN char_t* strconv_comment(char_t* s, char_t endch)
- {
- gap g;
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_comment)) ++s;
-
- if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
- {
- *s++ = '\n'; // replace first one with 0x0a
-
- if (*s == '\n') g.push(s, 1);
- }
- else if (s[0] == '-' && s[1] == '-' && ENDSWITH(s[2], '>')) // comment ends here
- {
- *g.flush(s) = 0;
-
- return s + (s[2] == '>' ? 3 : 2);
- }
- else if (*s == 0)
- {
- return 0;
- }
- else ++s;
- }
- }
-
- PUGI__FN char_t* strconv_cdata(char_t* s, char_t endch)
- {
- gap g;
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_cdata)) ++s;
-
- if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
- {
- *s++ = '\n'; // replace first one with 0x0a
-
- if (*s == '\n') g.push(s, 1);
- }
- else if (s[0] == ']' && s[1] == ']' && ENDSWITH(s[2], '>')) // CDATA ends here
- {
- *g.flush(s) = 0;
-
- return s + 1;
- }
- else if (*s == 0)
- {
- return 0;
- }
- else ++s;
- }
- }
-
- typedef char_t* (*strconv_pcdata_t)(char_t*);
-
- template <typename opt_eol, typename opt_escape> struct strconv_pcdata_impl
- {
- static char_t* parse(char_t* s)
- {
- gap g;
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_pcdata)) ++s;
-
- if (*s == '<') // PCDATA ends here
- {
- *g.flush(s) = 0;
-
- return s + 1;
- }
- else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
- {
- *s++ = '\n'; // replace first one with 0x0a
-
- if (*s == '\n') g.push(s, 1);
- }
- else if (opt_escape::value && *s == '&')
- {
- s = strconv_escape(s, g);
- }
- else if (*s == 0)
- {
- return s;
- }
- else ++s;
- }
- }
- };
-
- PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)
- {
- PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20);
-
- switch ((optmask >> 4) & 3) // get bitmask for flags (eol escapes)
- {
- case 0: return strconv_pcdata_impl<opt_false, opt_false>::parse;
- case 1: return strconv_pcdata_impl<opt_false, opt_true>::parse;
- case 2: return strconv_pcdata_impl<opt_true, opt_false>::parse;
- case 3: return strconv_pcdata_impl<opt_true, opt_true>::parse;
- default: return 0; // should not get here
- }
- }
-
- typedef char_t* (*strconv_attribute_t)(char_t*, char_t);
-
- template <typename opt_escape> struct strconv_attribute_impl
- {
- static char_t* parse_wnorm(char_t* s, char_t end_quote)
- {
- gap g;
-
- // trim leading whitespaces
- if (PUGI__IS_CHARTYPE(*s, ct_space))
- {
- char_t* str = s;
-
- do ++str;
- while (PUGI__IS_CHARTYPE(*str, ct_space));
-
- g.push(s, str - s);
- }
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws | ct_space)) ++s;
-
- if (*s == end_quote)
- {
- char_t* str = g.flush(s);
-
- do *str-- = 0;
- while (PUGI__IS_CHARTYPE(*str, ct_space));
-
- return s + 1;
- }
- else if (PUGI__IS_CHARTYPE(*s, ct_space))
- {
- *s++ = ' ';
-
- if (PUGI__IS_CHARTYPE(*s, ct_space))
- {
- char_t* str = s + 1;
- while (PUGI__IS_CHARTYPE(*str, ct_space)) ++str;
-
- g.push(s, str - s);
- }
- }
- else if (opt_escape::value && *s == '&')
- {
- s = strconv_escape(s, g);
- }
- else if (!*s)
- {
- return 0;
- }
- else ++s;
- }
- }
-
- static char_t* parse_wconv(char_t* s, char_t end_quote)
- {
- gap g;
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws)) ++s;
-
- if (*s == end_quote)
- {
- *g.flush(s) = 0;
-
- return s + 1;
- }
- else if (PUGI__IS_CHARTYPE(*s, ct_space))
- {
- if (*s == '\r')
- {
- *s++ = ' ';
-
- if (*s == '\n') g.push(s, 1);
- }
- else *s++ = ' ';
- }
- else if (opt_escape::value && *s == '&')
- {
- s = strconv_escape(s, g);
- }
- else if (!*s)
- {
- return 0;
- }
- else ++s;
- }
- }
-
- static char_t* parse_eol(char_t* s, char_t end_quote)
- {
- gap g;
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr)) ++s;
-
- if (*s == end_quote)
- {
- *g.flush(s) = 0;
-
- return s + 1;
- }
- else if (*s == '\r')
- {
- *s++ = '\n';
-
- if (*s == '\n') g.push(s, 1);
- }
- else if (opt_escape::value && *s == '&')
- {
- s = strconv_escape(s, g);
- }
- else if (!*s)
- {
- return 0;
- }
- else ++s;
- }
- }
-
- static char_t* parse_simple(char_t* s, char_t end_quote)
- {
- gap g;
-
- while (true)
- {
- while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr)) ++s;
-
- if (*s == end_quote)
- {
- *g.flush(s) = 0;
-
- return s + 1;
- }
- else if (opt_escape::value && *s == '&')
- {
- s = strconv_escape(s, g);
- }
- else if (!*s)
- {
- return 0;
- }
- else ++s;
- }
- }
- };
-
- PUGI__FN strconv_attribute_t get_strconv_attribute(unsigned int optmask)
- {
- PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_wconv_attribute == 0x40 && parse_wnorm_attribute == 0x80);
-
- switch ((optmask >> 4) & 15) // get bitmask for flags (wconv wnorm eol escapes)
- {
- case 0: return strconv_attribute_impl<opt_false>::parse_simple;
- case 1: return strconv_attribute_impl<opt_true>::parse_simple;
- case 2: return strconv_attribute_impl<opt_false>::parse_eol;
- case 3: return strconv_attribute_impl<opt_true>::parse_eol;
- case 4: return strconv_attribute_impl<opt_false>::parse_wconv;
- case 5: return strconv_attribute_impl<opt_true>::parse_wconv;
- case 6: return strconv_attribute_impl<opt_false>::parse_wconv;
- case 7: return strconv_attribute_impl<opt_true>::parse_wconv;
- case 8: return strconv_attribute_impl<opt_false>::parse_wnorm;
- case 9: return strconv_attribute_impl<opt_true>::parse_wnorm;
- case 10: return strconv_attribute_impl<opt_false>::parse_wnorm;
- case 11: return strconv_attribute_impl<opt_true>::parse_wnorm;
- case 12: return strconv_attribute_impl<opt_false>::parse_wnorm;
- case 13: return strconv_attribute_impl<opt_true>::parse_wnorm;
- case 14: return strconv_attribute_impl<opt_false>::parse_wnorm;
- case 15: return strconv_attribute_impl<opt_true>::parse_wnorm;
- default: return 0; // should not get here
- }
- }
-
- inline xml_parse_result make_parse_result(xml_parse_status status, ptrdiff_t offset = 0)
- {
- xml_parse_result result;
- result.status = status;
- result.offset = offset;
-
- return result;
- }
-
- struct xml_parser
- {
- xml_allocator alloc;
- char_t* error_offset;
- xml_parse_status error_status;
-
- // Parser utilities.
- #define PUGI__SKIPWS() { while (PUGI__IS_CHARTYPE(*s, ct_space)) ++s; }
- #define PUGI__OPTSET(OPT) ( optmsk & (OPT) )
- #define PUGI__PUSHNODE(TYPE) { cursor = append_node(cursor, alloc, TYPE); if (!cursor) PUGI__THROW_ERROR(status_out_of_memory, s); }
- #define PUGI__POPNODE() { cursor = cursor->parent; }
- #define PUGI__SCANFOR(X) { while (*s != 0 && !(X)) ++s; }
- #define PUGI__SCANWHILE(X) { while ((X)) ++s; }
- #define PUGI__ENDSEG() { ch = *s; *s = 0; ++s; }
- #define PUGI__THROW_ERROR(err, m) return error_offset = m, error_status = err, static_cast<char_t*>(0)
- #define PUGI__CHECK_ERROR(err, m) { if (*s == 0) PUGI__THROW_ERROR(err, m); }
-
- xml_parser(const xml_allocator& alloc_): alloc(alloc_), error_offset(0), error_status(status_ok)
- {
- }
-
- // DOCTYPE consists of nested sections of the following possible types:
- // <!-- ... -->, <? ... ?>, "...", '...'
- // <![...]]>
- // <!...>
- // First group can not contain nested groups
- // Second group can contain nested groups of the same type
- // Third group can contain all other groups
- char_t* parse_doctype_primitive(char_t* s)
- {
- if (*s == '"' || *s == '\'')
- {
- // quoted string
- char_t ch = *s++;
- PUGI__SCANFOR(*s == ch);
- if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);
-
- s++;
- }
- else if (s[0] == '<' && s[1] == '?')
- {
- // <? ... ?>
- s += 2;
- PUGI__SCANFOR(s[0] == '?' && s[1] == '>'); // no need for ENDSWITH because ?> can't terminate proper doctype
- if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);
-
- s += 2;
- }
- else if (s[0] == '<' && s[1] == '!' && s[2] == '-' && s[3] == '-')
- {
- s += 4;
- PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && s[2] == '>'); // no need for ENDSWITH because --> can't terminate proper doctype
- if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);
-
- s += 4;
- }
- else PUGI__THROW_ERROR(status_bad_doctype, s);
-
- return s;
- }
-
- char_t* parse_doctype_ignore(char_t* s)
- {
- assert(s[0] == '<' && s[1] == '!' && s[2] == '[');
- s++;
-
- while (*s)
- {
- if (s[0] == '<' && s[1] == '!' && s[2] == '[')
- {
- // nested ignore section
- s = parse_doctype_ignore(s);
- if (!s) return s;
- }
- else if (s[0] == ']' && s[1] == ']' && s[2] == '>')
- {
- // ignore section end
- s += 3;
-
- return s;
- }
- else s++;
- }
-
- PUGI__THROW_ERROR(status_bad_doctype, s);
- }
-
- char_t* parse_doctype_group(char_t* s, char_t endch, bool toplevel)
- {
- assert(s[0] == '<' && s[1] == '!');
- s++;
-
- while (*s)
- {
- if (s[0] == '<' && s[1] == '!' && s[2] != '-')
- {
- if (s[2] == '[')
- {
- // ignore
- s = parse_doctype_ignore(s);
- if (!s) return s;
- }
- else
- {
- // some control group
- s = parse_doctype_group(s, endch, false);
- if (!s) return s;
- }
- }
- else if (s[0] == '<' || s[0] == '"' || s[0] == '\'')
- {
- // unknown tag (forbidden), or some primitive group
- s = parse_doctype_primitive(s);
- if (!s) return s;
- }
- else if (*s == '>')
- {
- s++;
-
- return s;
- }
- else s++;
- }
-
- if (!toplevel || endch != '>') PUGI__THROW_ERROR(status_bad_doctype, s);
-
- return s;
- }
-
- char_t* parse_exclamation(char_t* s, xml_node_struct* cursor, unsigned int optmsk, char_t endch)
- {
- // parse node contents, starting with exclamation mark
- ++s;
-
- if (*s == '-') // '<!-...'
- {
- ++s;
-
- if (*s == '-') // '<!--...'
- {
- ++s;
-
- if (PUGI__OPTSET(parse_comments))
- {
- PUGI__PUSHNODE(node_comment); // Append a new node on the tree.
- cursor->value = s; // Save the offset.
- }
-
- if (PUGI__OPTSET(parse_eol) && PUGI__OPTSET(parse_comments))
- {
- s = strconv_comment(s, endch);
-
- if (!s) PUGI__THROW_ERROR(status_bad_comment, cursor->value);
- }
- else
- {
- // Scan for terminating '-->'.
- PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && ENDSWITH(s[2], '>'));
- PUGI__CHECK_ERROR(status_bad_comment, s);
-
- if (PUGI__OPTSET(parse_comments))
- *s = 0; // Zero-terminate this segment at the first terminating '-'.
-
- s += (s[2] == '>' ? 3 : 2); // Step over the '\0->'.
- }
- }
- else PUGI__THROW_ERROR(status_bad_comment, s);
- }
- else if (*s == '[')
- {
- // '<![CDATA[...'
- if (*++s=='C' && *++s=='D' && *++s=='A' && *++s=='T' && *++s=='A' && *++s == '[')
- {
- ++s;
-
- if (PUGI__OPTSET(parse_cdata))
- {
- PUGI__PUSHNODE(node_cdata); // Append a new node on the tree.
- cursor->value = s; // Save the offset.
-
- if (PUGI__OPTSET(parse_eol))
- {
- s = strconv_cdata(s, endch);
-
- if (!s) PUGI__THROW_ERROR(status_bad_cdata, cursor->value);
- }
- else
- {
- // Scan for terminating ']]>'.
- PUGI__SCANFOR(s[0] == ']' && s[1] == ']' && ENDSWITH(s[2], '>'));
- PUGI__CHECK_ERROR(status_bad_cdata, s);
-
- *s++ = 0; // Zero-terminate this segment.
- }
- }
- else // Flagged for discard, but we still have to scan for the terminator.
- {
- // Scan for terminating ']]>'.
- PUGI__SCANFOR(s[0] == ']' && s[1] == ']' && ENDSWITH(s[2], '>'));
- PUGI__CHECK_ERROR(status_bad_cdata, s);
-
- ++s;
- }
-
- s += (s[1] == '>' ? 2 : 1); // Step over the last ']>'.
- }
- else PUGI__THROW_ERROR(status_bad_cdata, s);
- }
- else if (s[0] == 'D' && s[1] == 'O' && s[2] == 'C' && s[3] == 'T' && s[4] == 'Y' && s[5] == 'P' && ENDSWITH(s[6], 'E'))
- {
- s -= 2;
-
- if (cursor->parent) PUGI__THROW_ERROR(status_bad_doctype, s);
-
- char_t* mark = s + 9;
-
- s = parse_doctype_group(s, endch, true);
- if (!s) return s;
-
- if (PUGI__OPTSET(parse_doctype))
- {
- while (PUGI__IS_CHARTYPE(*mark, ct_space)) ++mark;
-
- PUGI__PUSHNODE(node_doctype);
-
- cursor->value = mark;
-
- assert((s[0] == 0 && endch == '>') || s[-1] == '>');
- s[*s == 0 ? 0 : -1] = 0;
-
- PUGI__POPNODE();
- }
- }
- else if (*s == 0 && endch == '-') PUGI__THROW_ERROR(status_bad_comment, s);
- else if (*s == 0 && endch == '[') PUGI__THROW_ERROR(status_bad_cdata, s);
- else PUGI__THROW_ERROR(status_unrecognized_tag, s);
-
- return s;
- }
-
- char_t* parse_question(char_t* s, xml_node_struct*& ref_cursor, unsigned int optmsk, char_t endch)
- {
- // load into registers
- xml_node_struct* cursor = ref_cursor;
- char_t ch = 0;
-
- // parse node contents, starting with question mark
- ++s;
-
- // read PI target
- char_t* target = s;
-
- if (!PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_pi, s);
-
- PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol));
- PUGI__CHECK_ERROR(status_bad_pi, s);
-
- // determine node type; stricmp / strcasecmp is not portable
- bool declaration = (target[0] | ' ') == 'x' && (target[1] | ' ') == 'm' && (target[2] | ' ') == 'l' && target + 3 == s;
-
- if (declaration ? PUGI__OPTSET(parse_declaration) : PUGI__OPTSET(parse_pi))
- {
- if (declaration)
- {
- // disallow non top-level declarations
- if (cursor->parent) PUGI__THROW_ERROR(status_bad_pi, s);
-
- PUGI__PUSHNODE(node_declaration);
- }
- else
- {
- PUGI__PUSHNODE(node_pi);
- }
-
- cursor->name = target;
-
- PUGI__ENDSEG();
-
- // parse value/attributes
- if (ch == '?')
- {
- // empty node
- if (!ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_pi, s);
- s += (*s == '>');
-
- PUGI__POPNODE();
- }
- else if (PUGI__IS_CHARTYPE(ch, ct_space))
- {
- PUGI__SKIPWS();
-
- // scan for tag end
- char_t* value = s;
-
- PUGI__SCANFOR(s[0] == '?' && ENDSWITH(s[1], '>'));
- PUGI__CHECK_ERROR(status_bad_pi, s);
-
- if (declaration)
- {
- // replace ending ? with / so that 'element' terminates properly
- *s = '/';
-
- // we exit from this function with cursor at node_declaration, which is a signal to parse() to go to LOC_ATTRIBUTES
- s = value;
- }
- else
- {
- // store value and step over >
- cursor->value = value;
- PUGI__POPNODE();
-
- PUGI__ENDSEG();
-
- s += (*s == '>');
- }
- }
- else PUGI__THROW_ERROR(status_bad_pi, s);
- }
- else
- {
- // scan for tag end
- PUGI__SCANFOR(s[0] == '?' && ENDSWITH(s[1], '>'));
- PUGI__CHECK_ERROR(status_bad_pi, s);
-
- s += (s[1] == '>' ? 2 : 1);
- }
-
- // store from registers
- ref_cursor = cursor;
-
- return s;
- }
-
- char_t* parse(char_t* s, xml_node_struct* xmldoc, unsigned int optmsk, char_t endch)
- {
- strconv_attribute_t strconv_attribute = get_strconv_attribute(optmsk);
- strconv_pcdata_t strconv_pcdata = get_strconv_pcdata(optmsk);
-
- char_t ch = 0;
- xml_node_struct* cursor = xmldoc;
- char_t* mark = s;
-
- while (*s != 0)
- {
- if (*s == '<')
- {
- ++s;
-
- LOC_TAG:
- if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // '<#...'
- {
- PUGI__PUSHNODE(node_element); // Append a new node to the tree.
-
- cursor->name = s;
-
- PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol)); // Scan for a terminator.
- PUGI__ENDSEG(); // Save char in 'ch', terminate & step over.
-
- if (ch == '>')
- {
- // end of tag
- }
- else if (PUGI__IS_CHARTYPE(ch, ct_space))
- {
- LOC_ATTRIBUTES:
- while (true)
- {
- PUGI__SKIPWS(); // Eat any whitespace.
-
- if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // <... #...
- {
- xml_attribute_struct* a = append_attribute_ll(cursor, alloc); // Make space for this attribute.
- if (!a) PUGI__THROW_ERROR(status_out_of_memory, s);
-
- a->name = s; // Save the offset.
-
- PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol)); // Scan for a terminator.
- PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance
-
- PUGI__ENDSEG(); // Save char in 'ch', terminate & step over.
- PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance
-
- if (PUGI__IS_CHARTYPE(ch, ct_space))
- {
- PUGI__SKIPWS(); // Eat any whitespace.
- PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance
-
- ch = *s;
- ++s;
- }
-
- if (ch == '=') // '<... #=...'
- {
- PUGI__SKIPWS(); // Eat any whitespace.
-
- if (*s == '"' || *s == '\'') // '<... #="...'
- {
- ch = *s; // Save quote char to avoid breaking on "''" -or- '""'.
- ++s; // Step over the quote.
- a->value = s; // Save the offset.
-
- s = strconv_attribute(s, ch);
-
- if (!s) PUGI__THROW_ERROR(status_bad_attribute, a->value);
-
- // After this line the loop continues from the start;
- // Whitespaces, / and > are ok, symbols and EOF are wrong,
- // everything else will be detected
- if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_attribute, s);
- }
- else PUGI__THROW_ERROR(status_bad_attribute, s);
- }
- else PUGI__THROW_ERROR(status_bad_attribute, s);
- }
- else if (*s == '/')
- {
- ++s;
-
- if (*s == '>')
- {
- PUGI__POPNODE();
- s++;
- break;
- }
- else if (*s == 0 && endch == '>')
- {
- PUGI__POPNODE();
- break;
- }
- else PUGI__THROW_ERROR(status_bad_start_element, s);
- }
- else if (*s == '>')
- {
- ++s;
-
- break;
- }
- else if (*s == 0 && endch == '>')
- {
- break;
- }
- else PUGI__THROW_ERROR(status_bad_start_element, s);
- }
-
- // !!!
- }
- else if (ch == '/') // '<#.../'
- {
- if (!ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_start_element, s);
-
- PUGI__POPNODE(); // Pop.
-
- s += (*s == '>');
- }
- else if (ch == 0)
- {
- // we stepped over null terminator, backtrack & handle closing tag
- --s;
-
- if (endch != '>') PUGI__THROW_ERROR(status_bad_start_element, s);
- }
- else PUGI__THROW_ERROR(status_bad_start_element, s);
- }
- else if (*s == '/')
- {
- ++s;
-
- char_t* name = cursor->name;
- if (!name) PUGI__THROW_ERROR(status_end_element_mismatch, s);
-
- while (PUGI__IS_CHARTYPE(*s, ct_symbol))
- {
- if (*s++ != *name++) PUGI__THROW_ERROR(status_end_element_mismatch, s);
- }
-
- if (*name)
- {
- if (*s == 0 && name[0] == endch && name[1] == 0) PUGI__THROW_ERROR(status_bad_end_element, s);
- else PUGI__THROW_ERROR(status_end_element_mismatch, s);
- }
-
- PUGI__POPNODE(); // Pop.
-
- PUGI__SKIPWS();
-
- if (*s == 0)
- {
- if (endch != '>') PUGI__THROW_ERROR(status_bad_end_element, s);
- }
- else
- {
- if (*s != '>') PUGI__THROW_ERROR(status_bad_end_element, s);
- ++s;
- }
- }
- else if (*s == '?') // '<?...'
- {
- s = parse_question(s, cursor, optmsk, endch);
- if (!s) return s;
-
- assert(cursor);
- if ((cursor->header & xml_memory_page_type_mask) + 1 == node_declaration) goto LOC_ATTRIBUTES;
- }
- else if (*s == '!') // '<!...'
- {
- s = parse_exclamation(s, cursor, optmsk, endch);
- if (!s) return s;
- }
- else if (*s == 0 && endch == '?') PUGI__THROW_ERROR(status_bad_pi, s);
- else PUGI__THROW_ERROR(status_unrecognized_tag, s);
- }
- else
- {
- mark = s; // Save this offset while searching for a terminator.
-
- PUGI__SKIPWS(); // Eat whitespace if no genuine PCDATA here.
-
- if (*s == '<')
- {
- // We skipped some whitespace characters because otherwise we would take the tag branch instead of PCDATA one
- assert(mark != s);
-
- if (!PUGI__OPTSET(parse_ws_pcdata | parse_ws_pcdata_single))
- {
- continue;
- }
- else if (PUGI__OPTSET(parse_ws_pcdata_single))
- {
- if (s[1] != '/' || cursor->first_child) continue;
- }
- }
-
- s = mark;
-
- if (cursor->parent)
- {
- PUGI__PUSHNODE(node_pcdata); // Append a new node on the tree.
- cursor->value = s; // Save the offset.
-
- s = strconv_pcdata(s);
-
- PUGI__POPNODE(); // Pop since this is a standalone.
-
- if (!*s) break;
- }
- else
- {
- PUGI__SCANFOR(*s == '<'); // '...<'
- if (!*s) break;
-
- ++s;
- }
-
- // We're after '<'
- goto LOC_TAG;
- }
- }
-
- // check that last tag is closed
- if (cursor != xmldoc) PUGI__THROW_ERROR(status_end_element_mismatch, s);
-
- return s;
- }
-
- static xml_parse_result parse(char_t* buffer, size_t length, xml_node_struct* root, unsigned int optmsk)
- {
- xml_document_struct* xmldoc = static_cast<xml_document_struct*>(root);
-
- // store buffer for offset_debug
- xmldoc->buffer = buffer;
-
- // early-out for empty documents
- if (length == 0) return make_parse_result(status_ok);
-
- // create parser on stack
- xml_parser parser(*xmldoc);
-
- // save last character and make buffer zero-terminated (speeds up parsing)
- char_t endch = buffer[length - 1];
- buffer[length - 1] = 0;
-
- // perform actual parsing
- parser.parse(buffer, xmldoc, optmsk, endch);
-
- xml_parse_result result = make_parse_result(parser.error_status, parser.error_offset ? parser.error_offset - buffer : 0);
- assert(result.offset >= 0 && static_cast<size_t>(result.offset) <= length);
-
- // update allocator state
- *static_cast<xml_allocator*>(xmldoc) = parser.alloc;
-
- // since we removed last character, we have to handle the only possible false positive
- if (result && endch == '<')
- {
- // there's no possible well-formed document with < at the end
- return make_parse_result(status_unrecognized_tag, length);
- }
-
- return result;
- }
- };
-
- // Output facilities
- PUGI__FN xml_encoding get_write_native_encoding()
- {
- #ifdef PUGIXML_WCHAR_MODE
- return get_wchar_encoding();
- #else
- return encoding_utf8;
- #endif
- }
-
- PUGI__FN xml_encoding get_write_encoding(xml_encoding encoding)
- {
- // replace wchar encoding with utf implementation
- if (encoding == encoding_wchar) return get_wchar_encoding();
-
- // replace utf16 encoding with utf16 with specific endianness
- if (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
-
- // replace utf32 encoding with utf32 with specific endianness
- if (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
-
- // only do autodetection if no explicit encoding is requested
- if (encoding != encoding_auto) return encoding;
-
- // assume utf8 encoding
- return encoding_utf8;
- }
-
-#ifdef PUGIXML_WCHAR_MODE
- PUGI__FN size_t get_valid_length(const char_t* data, size_t length)
- {
- assert(length > 0);
-
- // discard last character if it's the lead of a surrogate pair
- return (sizeof(wchar_t) == 2 && static_cast<unsigned int>(static_cast<uint16_t>(data[length - 1]) - 0xD800) < 0x400) ? length - 1 : length;
- }
-
- PUGI__FN size_t convert_buffer(char_t* r_char, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding)
- {
- // only endian-swapping is required
- if (need_endian_swap_utf(encoding, get_wchar_encoding()))
- {
- convert_wchar_endian_swap(r_char, data, length);
-
- return length * sizeof(char_t);
- }
-
- // convert to utf8
- if (encoding == encoding_utf8)
- {
- uint8_t* dest = r_u8;
- uint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(data, length, dest);
-
- return static_cast<size_t>(end - dest);
- }
-
- // convert to utf16
- if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)
- {
- uint16_t* dest = r_u16;
-
- // convert to native utf16
- uint16_t* end = utf_decoder<utf16_writer>::decode_wchar_block(data, length, dest);
-
- // swap if necessary
- xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
-
- if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));
-
- return static_cast<size_t>(end - dest) * sizeof(uint16_t);
- }
-
- // convert to utf32
- if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)
- {
- uint32_t* dest = r_u32;
-
- // convert to native utf32
- uint32_t* end = utf_decoder<utf32_writer>::decode_wchar_block(data, length, dest);
-
- // swap if necessary
- xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
-
- if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));
-
- return static_cast<size_t>(end - dest) * sizeof(uint32_t);
- }
-
- // convert to latin1
- if (encoding == encoding_latin1)
- {
- uint8_t* dest = r_u8;
- uint8_t* end = utf_decoder<latin1_writer>::decode_wchar_block(data, length, dest);
-
- return static_cast<size_t>(end - dest);
- }
-
- assert(!"Invalid encoding");
- return 0;
- }
-#else
- PUGI__FN size_t get_valid_length(const char_t* data, size_t length)
- {
- assert(length > 4);
-
- for (size_t i = 1; i <= 4; ++i)
- {
- uint8_t ch = static_cast<uint8_t>(data[length - i]);
-
- // either a standalone character or a leading one
- if ((ch & 0xc0) != 0x80) return length - i;
- }
-
- // there are four non-leading characters at the end, sequence tail is broken so might as well process the whole chunk
- return length;
- }
-
- PUGI__FN size_t convert_buffer(char_t* /* r_char */, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding)
- {
- if (encoding == encoding_utf16_be || encoding == encoding_utf16_le)
- {
- uint16_t* dest = r_u16;
-
- // convert to native utf16
- uint16_t* end = utf_decoder<utf16_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);
-
- // swap if necessary
- xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be;
-
- if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));
-
- return static_cast<size_t>(end - dest) * sizeof(uint16_t);
- }
-
- if (encoding == encoding_utf32_be || encoding == encoding_utf32_le)
- {
- uint32_t* dest = r_u32;
-
- // convert to native utf32
- uint32_t* end = utf_decoder<utf32_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);
-
- // swap if necessary
- xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be;
-
- if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast<size_t>(end - dest));
-
- return static_cast<size_t>(end - dest) * sizeof(uint32_t);
- }
-
- if (encoding == encoding_latin1)
- {
- uint8_t* dest = r_u8;
- uint8_t* end = utf_decoder<latin1_writer>::decode_utf8_block(reinterpret_cast<const uint8_t*>(data), length, dest);
-
- return static_cast<size_t>(end - dest);
- }
-
- assert(!"Invalid encoding");
- return 0;
- }
-#endif
-
- class xml_buffered_writer
- {
- xml_buffered_writer(const xml_buffered_writer&);
- xml_buffered_writer& operator=(const xml_buffered_writer&);
-
- public:
- xml_buffered_writer(xml_writer& writer_, xml_encoding user_encoding): writer(writer_), bufsize(0), encoding(get_write_encoding(user_encoding))
- {
- PUGI__STATIC_ASSERT(bufcapacity >= 8);
- }
-
- ~xml_buffered_writer()
- {
- flush();
- }
-
- void flush()
- {
- flush(buffer, bufsize);
- bufsize = 0;
- }
-
- void flush(const char_t* data, size_t size)
- {
- if (size == 0) return;
-
- // fast path, just write data
- if (encoding == get_write_native_encoding())
- writer.write(data, size * sizeof(char_t));
- else
- {
- // convert chunk
- size_t result = convert_buffer(scratch.data_char, scratch.data_u8, scratch.data_u16, scratch.data_u32, data, size, encoding);
- assert(result <= sizeof(scratch));
-
- // write data
- writer.write(scratch.data_u8, result);
- }
- }
-
- void write(const char_t* data, size_t length)
- {
- if (bufsize + length > bufcapacity)
- {
- // flush the remaining buffer contents
- flush();
-
- // handle large chunks
- if (length > bufcapacity)
- {
- if (encoding == get_write_native_encoding())
- {
- // fast path, can just write data chunk
- writer.write(data, length * sizeof(char_t));
- return;
- }
-
- // need to convert in suitable chunks
- while (length > bufcapacity)
- {
- // get chunk size by selecting such number of characters that are guaranteed to fit into scratch buffer
- // and form a complete codepoint sequence (i.e. discard start of last codepoint if necessary)
- size_t chunk_size = get_valid_length(data, bufcapacity);
-
- // convert chunk and write
- flush(data, chunk_size);
-
- // iterate
- data += chunk_size;
- length -= chunk_size;
- }
-
- // small tail is copied below
- bufsize = 0;
- }
- }
-
- memcpy(buffer + bufsize, data, length * sizeof(char_t));
- bufsize += length;
- }
-
- void write(const char_t* data)
- {
- write(data, strlength(data));
- }
-
- void write(char_t d0)
- {
- if (bufsize + 1 > bufcapacity) flush();
-
- buffer[bufsize + 0] = d0;
- bufsize += 1;
- }
-
- void write(char_t d0, char_t d1)
- {
- if (bufsize + 2 > bufcapacity) flush();
-
- buffer[bufsize + 0] = d0;
- buffer[bufsize + 1] = d1;
- bufsize += 2;
- }
-
- void write(char_t d0, char_t d1, char_t d2)
- {
- if (bufsize + 3 > bufcapacity) flush();
-
- buffer[bufsize + 0] = d0;
- buffer[bufsize + 1] = d1;
- buffer[bufsize + 2] = d2;
- bufsize += 3;
- }
-
- void write(char_t d0, char_t d1, char_t d2, char_t d3)
- {
- if (bufsize + 4 > bufcapacity) flush();
-
- buffer[bufsize + 0] = d0;
- buffer[bufsize + 1] = d1;
- buffer[bufsize + 2] = d2;
- buffer[bufsize + 3] = d3;
- bufsize += 4;
- }
-
- void write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4)
- {
- if (bufsize + 5 > bufcapacity) flush();
-
- buffer[bufsize + 0] = d0;
- buffer[bufsize + 1] = d1;
- buffer[bufsize + 2] = d2;
- buffer[bufsize + 3] = d3;
- buffer[bufsize + 4] = d4;
- bufsize += 5;
- }
-
- void write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4, char_t d5)
- {
- if (bufsize + 6 > bufcapacity) flush();
-
- buffer[bufsize + 0] = d0;
- buffer[bufsize + 1] = d1;
- buffer[bufsize + 2] = d2;
- buffer[bufsize + 3] = d3;
- buffer[bufsize + 4] = d4;
- buffer[bufsize + 5] = d5;
- bufsize += 6;
- }
-
- // utf8 maximum expansion: x4 (-> utf32)
- // utf16 maximum expansion: x2 (-> utf32)
- // utf32 maximum expansion: x1
- enum
- {
- bufcapacitybytes =
- #ifdef PUGIXML_MEMORY_OUTPUT_STACK
- PUGIXML_MEMORY_OUTPUT_STACK
- #else
- 10240
- #endif
- ,
- bufcapacity = bufcapacitybytes / (sizeof(char_t) + 4)
- };
-
- char_t buffer[bufcapacity];
-
- union
- {
- uint8_t data_u8[4 * bufcapacity];
- uint16_t data_u16[2 * bufcapacity];
- uint32_t data_u32[bufcapacity];
- char_t data_char[bufcapacity];
- } scratch;
-
- xml_writer& writer;
- size_t bufsize;
- xml_encoding encoding;
- };
-
- PUGI__FN void text_output_escaped(xml_buffered_writer& writer, const char_t* s, chartypex_t type)
- {
- while (*s)
- {
- const char_t* prev = s;
-
- // While *s is a usual symbol
- while (!PUGI__IS_CHARTYPEX(*s, type)) ++s;
-
- writer.write(prev, static_cast<size_t>(s - prev));
-
- switch (*s)
- {
- case 0: break;
- case '&':
- writer.write('&', 'a', 'm', 'p', ';');
- ++s;
- break;
- case '<':
- writer.write('&', 'l', 't', ';');
- ++s;
- break;
- case '>':
- writer.write('&', 'g', 't', ';');
- ++s;
- break;
- case '"':
- writer.write('&', 'q', 'u', 'o', 't', ';');
- ++s;
- break;
- default: // s is not a usual symbol
- {
- unsigned int ch = static_cast<unsigned int>(*s++);
- assert(ch < 32);
-
- writer.write('&', '#', static_cast<char_t>((ch / 10) + '0'), static_cast<char_t>((ch % 10) + '0'), ';');
- }
- }
- }
- }
-
- PUGI__FN void text_output(xml_buffered_writer& writer, const char_t* s, chartypex_t type, unsigned int flags)
- {
- if (flags & format_no_escapes)
- writer.write(s);
- else
- text_output_escaped(writer, s, type);
- }
-
- PUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s)
- {
- do
- {
- writer.write('<', '!', '[', 'C', 'D');
- writer.write('A', 'T', 'A', '[');
-
- const char_t* prev = s;
-
- // look for ]]> sequence - we can't output it as is since it terminates CDATA
- while (*s && !(s[0] == ']' && s[1] == ']' && s[2] == '>')) ++s;
-
- // skip ]] if we stopped at ]]>, > will go to the next CDATA section
- if (*s) s += 2;
-
- writer.write(prev, static_cast<size_t>(s - prev));
-
- writer.write(']', ']', '>');
- }
- while (*s);
- }
-
- PUGI__FN void node_output_attributes(xml_buffered_writer& writer, const xml_node& node, unsigned int flags)
- {
- const char_t* default_name = PUGIXML_TEXT(":anonymous");
-
- for (xml_attribute a = node.first_attribute(); a; a = a.next_attribute())
- {
- writer.write(' ');
- writer.write(a.name()[0] ? a.name() : default_name);
- writer.write('=', '"');
-
- text_output(writer, a.value(), ctx_special_attr, flags);
-
- writer.write('"');
- }
- }
-
- PUGI__FN void node_output(xml_buffered_writer& writer, const xml_node& node, const char_t* indent, unsigned int flags, unsigned int depth)
- {
- const char_t* default_name = PUGIXML_TEXT(":anonymous");
-
- if ((flags & format_indent) != 0 && (flags & format_raw) == 0)
- for (unsigned int i = 0; i < depth; ++i) writer.write(indent);
-
- switch (node.type())
- {
- case node_document:
- {
- for (xml_node n = node.first_child(); n; n = n.next_sibling())
- node_output(writer, n, indent, flags, depth);
- break;
- }
-
- case node_element:
- {
- const char_t* name = node.name()[0] ? node.name() : default_name;
-
- writer.write('<');
- writer.write(name);
-
- node_output_attributes(writer, node, flags);
-
- if (flags & format_raw)
- {
- if (!node.first_child())
- writer.write(' ', '/', '>');
- else
- {
- writer.write('>');
-
- for (xml_node n = node.first_child(); n; n = n.next_sibling())
- node_output(writer, n, indent, flags, depth + 1);
-
- writer.write('<', '/');
- writer.write(name);
- writer.write('>');
- }
- }
- else if (!node.first_child())
- writer.write(' ', '/', '>', '\n');
- else if (node.first_child() == node.last_child() && (node.first_child().type() == node_pcdata || node.first_child().type() == node_cdata))
- {
- writer.write('>');
-
- if (node.first_child().type() == node_pcdata)
- text_output(writer, node.first_child().value(), ctx_special_pcdata, flags);
- else
- text_output_cdata(writer, node.first_child().value());
-
- writer.write('<', '/');
- writer.write(name);
- writer.write('>', '\n');
- }
- else
- {
- writer.write('>', '\n');
-
- for (xml_node n = node.first_child(); n; n = n.next_sibling())
- node_output(writer, n, indent, flags, depth + 1);
-
- if ((flags & format_indent) != 0 && (flags & format_raw) == 0)
- for (unsigned int i = 0; i < depth; ++i) writer.write(indent);
-
- writer.write('<', '/');
- writer.write(name);
- writer.write('>', '\n');
- }
-
- break;
- }
-
- case node_pcdata:
- text_output(writer, node.value(), ctx_special_pcdata, flags);
- if ((flags & format_raw) == 0) writer.write('\n');
- break;
-
- case node_cdata:
- text_output_cdata(writer, node.value());
- if ((flags & format_raw) == 0) writer.write('\n');
- break;
-
- case node_comment:
- writer.write('<', '!', '-', '-');
- writer.write(node.value());
- writer.write('-', '-', '>');
- if ((flags & format_raw) == 0) writer.write('\n');
- break;
-
- case node_pi:
- case node_declaration:
- writer.write('<', '?');
- writer.write(node.name()[0] ? node.name() : default_name);
-
- if (node.type() == node_declaration)
- {
- node_output_attributes(writer, node, flags);
- }
- else if (node.value()[0])
- {
- writer.write(' ');
- writer.write(node.value());
- }
-
- writer.write('?', '>');
- if ((flags & format_raw) == 0) writer.write('\n');
- break;
-
- case node_doctype:
- writer.write('<', '!', 'D', 'O', 'C');
- writer.write('T', 'Y', 'P', 'E');
-
- if (node.value()[0])
- {
- writer.write(' ');
- writer.write(node.value());
- }
-
- writer.write('>');
- if ((flags & format_raw) == 0) writer.write('\n');
- break;
-
- default:
- assert(!"Invalid node type");
- }
- }
-
- inline bool has_declaration(const xml_node& node)
- {
- for (xml_node child = node.first_child(); child; child = child.next_sibling())
- {
- xml_node_type type = child.type();
-
- if (type == node_declaration) return true;
- if (type == node_element) return false;
- }
-
- return false;
- }
-
- inline bool allow_insert_child(xml_node_type parent, xml_node_type child)
- {
- if (parent != node_document && parent != node_element) return false;
- if (child == node_document || child == node_null) return false;
- if (parent != node_document && (child == node_declaration || child == node_doctype)) return false;
-
- return true;
- }
-
- PUGI__FN void recursive_copy_skip(xml_node& dest, const xml_node& source, const xml_node& skip)
- {
- assert(dest.type() == source.type());
-
- switch (source.type())
- {
- case node_element:
- {
- dest.set_name(source.name());
-
- for (xml_attribute a = source.first_attribute(); a; a = a.next_attribute())
- dest.append_attribute(a.name()).set_value(a.value());
-
- for (xml_node c = source.first_child(); c; c = c.next_sibling())
- {
- if (c == skip) continue;
-
- xml_node cc = dest.append_child(c.type());
- assert(cc);
-
- recursive_copy_skip(cc, c, skip);
- }
-
- break;
- }
-
- case node_pcdata:
- case node_cdata:
- case node_comment:
- case node_doctype:
- dest.set_value(source.value());
- break;
-
- case node_pi:
- dest.set_name(source.name());
- dest.set_value(source.value());
- break;
-
- case node_declaration:
- {
- dest.set_name(source.name());
-
- for (xml_attribute a = source.first_attribute(); a; a = a.next_attribute())
- dest.append_attribute(a.name()).set_value(a.value());
-
- break;
- }
-
- default:
- assert(!"Invalid node type");
- }
- }
-
- inline bool is_text_node(xml_node_struct* node)
- {
- xml_node_type type = static_cast<xml_node_type>((node->header & impl::xml_memory_page_type_mask) + 1);
-
- return type == node_pcdata || type == node_cdata;
- }
-
- // get value with conversion functions
- PUGI__FN int get_value_int(const char_t* value, int def)
- {
- if (!value) return def;
-
- #ifdef PUGIXML_WCHAR_MODE
- return static_cast<int>(wcstol(value, 0, 10));
- #else
- return static_cast<int>(strtol(value, 0, 10));
- #endif
- }
-
- PUGI__FN unsigned int get_value_uint(const char_t* value, unsigned int def)
- {
- if (!value) return def;
-
- #ifdef PUGIXML_WCHAR_MODE
- return static_cast<unsigned int>(wcstoul(value, 0, 10));
- #else
- return static_cast<unsigned int>(strtoul(value, 0, 10));
- #endif
- }
-
- PUGI__FN double get_value_double(const char_t* value, double def)
- {
- if (!value) return def;
-
- #ifdef PUGIXML_WCHAR_MODE
- return wcstod(value, 0);
- #else
- return strtod(value, 0);
- #endif
- }
-
- PUGI__FN float get_value_float(const char_t* value, float def)
- {
- if (!value) return def;
-
- #ifdef PUGIXML_WCHAR_MODE
- return static_cast<float>(wcstod(value, 0));
- #else
- return static_cast<float>(strtod(value, 0));
- #endif
- }
-
- PUGI__FN bool get_value_bool(const char_t* value, bool def)
- {
- if (!value) return def;
-
- // only look at first char
- char_t first = *value;
-
- // 1*, t* (true), T* (True), y* (yes), Y* (YES)
- return (first == '1' || first == 't' || first == 'T' || first == 'y' || first == 'Y');
- }
-
- // set value with conversion functions
- PUGI__FN bool set_value_buffer(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char (&buf)[128])
- {
- #ifdef PUGIXML_WCHAR_MODE
- char_t wbuf[128];
- impl::widen_ascii(wbuf, buf);
-
- return strcpy_insitu(dest, header, header_mask, wbuf);
- #else
- return strcpy_insitu(dest, header, header_mask, buf);
- #endif
- }
-
- PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, int value)
- {
- char buf[128];
- sprintf(buf, "%d", value);
-
- return set_value_buffer(dest, header, header_mask, buf);
- }
-
- PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned int value)
- {
- char buf[128];
- sprintf(buf, "%u", value);
-
- return set_value_buffer(dest, header, header_mask, buf);
- }
-
- PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, double value)
- {
- char buf[128];
- sprintf(buf, "%g", value);
-
- return set_value_buffer(dest, header, header_mask, buf);
- }
-
- PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, bool value)
- {
- return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false"));
- }
-
- // we need to get length of entire file to load it in memory; the only (relatively) sane way to do it is via seek/tell trick
- PUGI__FN xml_parse_status get_file_size(FILE* file, size_t& out_result)
- {
- #if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)
- // there are 64-bit versions of fseek/ftell, let's use them
- typedef __int64 length_type;
-
- _fseeki64(file, 0, SEEK_END);
- length_type length = _ftelli64(file);
- _fseeki64(file, 0, SEEK_SET);
- #elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) && !defined(__STRICT_ANSI__)
- // there are 64-bit versions of fseek/ftell, let's use them
- typedef off64_t length_type;
-
- fseeko64(file, 0, SEEK_END);
- length_type length = ftello64(file);
- fseeko64(file, 0, SEEK_SET);
- #else
- // if this is a 32-bit OS, long is enough; if this is a unix system, long is 64-bit, which is enough; otherwise we can't do anything anyway.
- typedef long length_type;
-
- fseek(file, 0, SEEK_END);
- length_type length = ftell(file);
- fseek(file, 0, SEEK_SET);
- #endif
-
- // check for I/O errors
- if (length < 0) return status_io_error;
-
- // check for overflow
- size_t result = static_cast<size_t>(length);
-
- if (static_cast<length_type>(result) != length) return status_out_of_memory;
-
- // finalize
- out_result = result;
-
- return status_ok;
- }
-
- PUGI__FN xml_parse_result load_file_impl(xml_document& doc, FILE* file, unsigned int options, xml_encoding encoding)
- {
- if (!file) return make_parse_result(status_file_not_found);
-
- // get file size (can result in I/O errors)
- size_t size = 0;
- xml_parse_status size_status = get_file_size(file, size);
-
- if (size_status != status_ok)
- {
- fclose(file);
- return make_parse_result(size_status);
- }
-
- // allocate buffer for the whole file
- char* contents = static_cast<char*>(xml_memory::allocate(size > 0 ? size : 1));
-
- if (!contents)
- {
- fclose(file);
- return make_parse_result(status_out_of_memory);
- }
-
- // read file in memory
- size_t read_size = fread(contents, 1, size, file);
- fclose(file);
-
- if (read_size != size)
- {
- xml_memory::deallocate(contents);
- return make_parse_result(status_io_error);
- }
-
- return doc.load_buffer_inplace_own(contents, size, options, encoding);
- }
-
-#ifndef PUGIXML_NO_STL
- template <typename T> struct xml_stream_chunk
- {
- static xml_stream_chunk* create()
- {
- void* memory = xml_memory::allocate(sizeof(xml_stream_chunk));
-
- return new (memory) xml_stream_chunk();
- }
-
- static void destroy(void* ptr)
- {
- xml_stream_chunk* chunk = static_cast<xml_stream_chunk*>(ptr);
-
- // free chunk chain
- while (chunk)
- {
- xml_stream_chunk* next = chunk->next;
- xml_memory::deallocate(chunk);
- chunk = next;
- }
- }
-
- xml_stream_chunk(): next(0), size(0)
- {
- }
-
- xml_stream_chunk* next;
- size_t size;
-
- T data[xml_memory_page_size / sizeof(T)];
- };
-
- template <typename T> PUGI__FN xml_parse_status load_stream_data_noseek(std::basic_istream<T>& stream, void** out_buffer, size_t* out_size)
- {
- buffer_holder chunks(0, xml_stream_chunk<T>::destroy);
-
- // read file to a chunk list
- size_t total = 0;
- xml_stream_chunk<T>* last = 0;
-
- while (!stream.eof())
- {
- // allocate new chunk
- xml_stream_chunk<T>* chunk = xml_stream_chunk<T>::create();
- if (!chunk) return status_out_of_memory;
-
- // append chunk to list
- if (last) last = last->next = chunk;
- else chunks.data = last = chunk;
-
- // read data to chunk
- stream.read(chunk->data, static_cast<std::streamsize>(sizeof(chunk->data) / sizeof(T)));
- chunk->size = static_cast<size_t>(stream.gcount()) * sizeof(T);
-
- // read may set failbit | eofbit in case gcount() is less than read length, so check for other I/O errors
- if (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error;
-
- // guard against huge files (chunk size is small enough to make this overflow check work)
- if (total + chunk->size < total) return status_out_of_memory;
- total += chunk->size;
- }
-
- // copy chunk list to a contiguous buffer
- char* buffer = static_cast<char*>(xml_memory::allocate(total));
- if (!buffer) return status_out_of_memory;
-
- char* write = buffer;
-
- for (xml_stream_chunk<T>* chunk = static_cast<xml_stream_chunk<T>*>(chunks.data); chunk; chunk = chunk->next)
- {
- assert(write + chunk->size <= buffer + total);
- memcpy(write, chunk->data, chunk->size);
- write += chunk->size;
- }
-
- assert(write == buffer + total);
-
- // return buffer
- *out_buffer = buffer;
- *out_size = total;
-
- return status_ok;
- }
-
- template <typename T> PUGI__FN xml_parse_status load_stream_data_seek(std::basic_istream<T>& stream, void** out_buffer, size_t* out_size)
- {
- // get length of remaining data in stream
- typename std::basic_istream<T>::pos_type pos = stream.tellg();
- stream.seekg(0, std::ios::end);
- std::streamoff length = stream.tellg() - pos;
- stream.seekg(pos);
-
- if (stream.fail() || pos < 0) return status_io_error;
-
- // guard against huge files
- size_t read_length = static_cast<size_t>(length);
-
- if (static_cast<std::streamsize>(read_length) != length || length < 0) return status_out_of_memory;
-
- // read stream data into memory (guard against stream exceptions with buffer holder)
- buffer_holder buffer(xml_memory::allocate((read_length > 0 ? read_length : 1) * sizeof(T)), xml_memory::deallocate);
- if (!buffer.data) return status_out_of_memory;
-
- stream.read(static_cast<T*>(buffer.data), static_cast<std::streamsize>(read_length));
-
- // read may set failbit | eofbit in case gcount() is less than read_length (i.e. line ending conversion), so check for other I/O errors
- if (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error;
-
- // return buffer
- size_t actual_length = static_cast<size_t>(stream.gcount());
- assert(actual_length <= read_length);
-
- *out_buffer = buffer.release();
- *out_size = actual_length * sizeof(T);
-
- return status_ok;
- }
-
- template <typename T> PUGI__FN xml_parse_result load_stream_impl(xml_document& doc, std::basic_istream<T>& stream, unsigned int options, xml_encoding encoding)
- {
- void* buffer = 0;
- size_t size = 0;
-
- // load stream to memory (using seek-based implementation if possible, since it's faster and takes less memory)
- xml_parse_status status = (stream.tellg() < 0) ? load_stream_data_noseek(stream, &buffer, &size) : load_stream_data_seek(stream, &buffer, &size);
- if (status != status_ok) return make_parse_result(status);
-
- return doc.load_buffer_inplace_own(buffer, size, options, encoding);
- }
-#endif
-
-#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__STRICT_ANSI__))
- PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
- {
- return _wfopen(path, mode);
- }
-#else
- PUGI__FN char* convert_path_heap(const wchar_t* str)
- {
- assert(str);
-
- // first pass: get length in utf8 characters
- size_t length = wcslen(str);
- size_t size = as_utf8_begin(str, length);
-
- // allocate resulting string
- char* result = static_cast<char*>(xml_memory::allocate(size + 1));
- if (!result) return 0;
-
- // second pass: convert to utf8
- as_utf8_end(result, size, str, length);
-
- return result;
- }
-
- PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
- {
- // there is no standard function to open wide paths, so our best bet is to try utf8 path
- char* path_utf8 = convert_path_heap(path);
- if (!path_utf8) return 0;
-
- // convert mode to ASCII (we mirror _wfopen interface)
- char mode_ascii[4] = {0};
- for (size_t i = 0; mode[i]; ++i) mode_ascii[i] = static_cast<char>(mode[i]);
-
- // try to open the utf8 path
- FILE* result = fopen(path_utf8, mode_ascii);
-
- // free dummy buffer
- xml_memory::deallocate(path_utf8);
-
- return result;
- }
-#endif
-
- PUGI__FN bool save_file_impl(const xml_document& doc, FILE* file, const char_t* indent, unsigned int flags, xml_encoding encoding)
- {
- if (!file) return false;
-
- xml_writer_file writer(file);
- doc.save(writer, indent, flags, encoding);
-
- int result = ferror(file);
-
- fclose(file);
-
- return result == 0;
- }
-PUGI__NS_END
-
-namespace pugi
-{
- PUGI__FN xml_writer_file::xml_writer_file(void* file_): file(file_)
- {
- }
-
- PUGI__FN void xml_writer_file::write(const void* data, size_t size)
- {
- size_t result = fwrite(data, 1, size, static_cast<FILE*>(file));
- (void)!result; // unfortunately we can't do proper error handling here
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream): narrow_stream(&stream), wide_stream(0)
- {
- }
-
- PUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream): narrow_stream(0), wide_stream(&stream)
- {
- }
-
- PUGI__FN void xml_writer_stream::write(const void* data, size_t size)
- {
- if (narrow_stream)
- {
- assert(!wide_stream);
- narrow_stream->write(reinterpret_cast<const char*>(data), static_cast<std::streamsize>(size));
- }
- else
- {
- assert(wide_stream);
- assert(size % sizeof(wchar_t) == 0);
-
- wide_stream->write(reinterpret_cast<const wchar_t*>(data), static_cast<std::streamsize>(size / sizeof(wchar_t)));
- }
- }
-#endif
-
- PUGI__FN xml_tree_walker::xml_tree_walker(): _depth(0)
- {
- }
-
- PUGI__FN xml_tree_walker::~xml_tree_walker()
- {
- }
-
- PUGI__FN int xml_tree_walker::depth() const
- {
- return _depth;
- }
-
- PUGI__FN bool xml_tree_walker::begin(xml_node&)
- {
- return true;
- }
-
- PUGI__FN bool xml_tree_walker::end(xml_node&)
- {
- return true;
- }
-
- PUGI__FN xml_attribute::xml_attribute(): _attr(0)
- {
- }
-
- PUGI__FN xml_attribute::xml_attribute(xml_attribute_struct* attr): _attr(attr)
- {
- }
-
- PUGI__FN static void unspecified_bool_xml_attribute(xml_attribute***)
- {
- }
-
- PUGI__FN xml_attribute::operator xml_attribute::unspecified_bool_type() const
- {
- return _attr ? unspecified_bool_xml_attribute : 0;
- }
-
- PUGI__FN bool xml_attribute::operator!() const
- {
- return !_attr;
- }
-
- PUGI__FN bool xml_attribute::operator==(const xml_attribute& r) const
- {
- return (_attr == r._attr);
- }
-
- PUGI__FN bool xml_attribute::operator!=(const xml_attribute& r) const
- {
- return (_attr != r._attr);
- }
-
- PUGI__FN bool xml_attribute::operator<(const xml_attribute& r) const
- {
- return (_attr < r._attr);
- }
-
- PUGI__FN bool xml_attribute::operator>(const xml_attribute& r) const
- {
- return (_attr > r._attr);
- }
-
- PUGI__FN bool xml_attribute::operator<=(const xml_attribute& r) const
- {
- return (_attr <= r._attr);
- }
-
- PUGI__FN bool xml_attribute::operator>=(const xml_attribute& r) const
- {
- return (_attr >= r._attr);
- }
-
- PUGI__FN xml_attribute xml_attribute::next_attribute() const
- {
- return _attr ? xml_attribute(_attr->next_attribute) : xml_attribute();
- }
-
- PUGI__FN xml_attribute xml_attribute::previous_attribute() const
- {
- return _attr && _attr->prev_attribute_c->next_attribute ? xml_attribute(_attr->prev_attribute_c) : xml_attribute();
- }
-
- PUGI__FN const char_t* xml_attribute::as_string(const char_t* def) const
- {
- return (_attr && _attr->value) ? _attr->value : def;
- }
-
- PUGI__FN int xml_attribute::as_int(int def) const
- {
- return impl::get_value_int(_attr ? _attr->value : 0, def);
- }
-
- PUGI__FN unsigned int xml_attribute::as_uint(unsigned int def) const
- {
- return impl::get_value_uint(_attr ? _attr->value : 0, def);
- }
-
- PUGI__FN double xml_attribute::as_double(double def) const
- {
- return impl::get_value_double(_attr ? _attr->value : 0, def);
- }
-
- PUGI__FN float xml_attribute::as_float(float def) const
- {
- return impl::get_value_float(_attr ? _attr->value : 0, def);
- }
-
- PUGI__FN bool xml_attribute::as_bool(bool def) const
- {
- return impl::get_value_bool(_attr ? _attr->value : 0, def);
- }
-
- PUGI__FN bool xml_attribute::empty() const
- {
- return !_attr;
- }
-
- PUGI__FN const char_t* xml_attribute::name() const
- {
- return (_attr && _attr->name) ? _attr->name : PUGIXML_TEXT("");
- }
-
- PUGI__FN const char_t* xml_attribute::value() const
- {
- return (_attr && _attr->value) ? _attr->value : PUGIXML_TEXT("");
- }
-
- PUGI__FN size_t xml_attribute::hash_value() const
- {
- return static_cast<size_t>(reinterpret_cast<uintptr_t>(_attr) / sizeof(xml_attribute_struct));
- }
-
- PUGI__FN xml_attribute_struct* xml_attribute::internal_object() const
- {
- return _attr;
- }
-
- PUGI__FN xml_attribute& xml_attribute::operator=(const char_t* rhs)
- {
- set_value(rhs);
- return *this;
- }
-
- PUGI__FN xml_attribute& xml_attribute::operator=(int rhs)
- {
- set_value(rhs);
- return *this;
- }
-
- PUGI__FN xml_attribute& xml_attribute::operator=(unsigned int rhs)
- {
- set_value(rhs);
- return *this;
- }
-
- PUGI__FN xml_attribute& xml_attribute::operator=(double rhs)
- {
- set_value(rhs);
- return *this;
- }
-
- PUGI__FN xml_attribute& xml_attribute::operator=(bool rhs)
- {
- set_value(rhs);
- return *this;
- }
-
- PUGI__FN bool xml_attribute::set_name(const char_t* rhs)
- {
- if (!_attr) return false;
-
- return impl::strcpy_insitu(_attr->name, _attr->header, impl::xml_memory_page_name_allocated_mask, rhs);
- }
-
- PUGI__FN bool xml_attribute::set_value(const char_t* rhs)
- {
- if (!_attr) return false;
-
- return impl::strcpy_insitu(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
- }
-
- PUGI__FN bool xml_attribute::set_value(int rhs)
- {
- if (!_attr) return false;
-
- return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
- }
-
- PUGI__FN bool xml_attribute::set_value(unsigned int rhs)
- {
- if (!_attr) return false;
-
- return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
- }
-
- PUGI__FN bool xml_attribute::set_value(double rhs)
- {
- if (!_attr) return false;
-
- return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
- }
-
- PUGI__FN bool xml_attribute::set_value(bool rhs)
- {
- if (!_attr) return false;
-
- return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
- }
-
-#ifdef __BORLANDC__
- PUGI__FN bool operator&&(const xml_attribute& lhs, bool rhs)
- {
- return (bool)lhs && rhs;
- }
-
- PUGI__FN bool operator||(const xml_attribute& lhs, bool rhs)
- {
- return (bool)lhs || rhs;
- }
-#endif
-
- PUGI__FN xml_node::xml_node(): _root(0)
- {
- }
-
- PUGI__FN xml_node::xml_node(xml_node_struct* p): _root(p)
- {
- }
-
- PUGI__FN static void unspecified_bool_xml_node(xml_node***)
- {
- }
-
- PUGI__FN xml_node::operator xml_node::unspecified_bool_type() const
- {
- return _root ? unspecified_bool_xml_node : 0;
- }
-
- PUGI__FN bool xml_node::operator!() const
- {
- return !_root;
- }
-
- PUGI__FN xml_node::iterator xml_node::begin() const
- {
- return iterator(_root ? _root->first_child : 0, _root);
- }
-
- PUGI__FN xml_node::iterator xml_node::end() const
- {
- return iterator(0, _root);
- }
-
- PUGI__FN xml_node::attribute_iterator xml_node::attributes_begin() const
- {
- return attribute_iterator(_root ? _root->first_attribute : 0, _root);
- }
-
- PUGI__FN xml_node::attribute_iterator xml_node::attributes_end() const
- {
- return attribute_iterator(0, _root);
- }
-
- PUGI__FN xml_object_range<xml_node_iterator> xml_node::children() const
- {
- return xml_object_range<xml_node_iterator>(begin(), end());
- }
-
- PUGI__FN xml_object_range<xml_named_node_iterator> xml_node::children(const char_t* name_) const
- {
- return xml_object_range<xml_named_node_iterator>(xml_named_node_iterator(child(name_), name_), xml_named_node_iterator());
- }
-
- PUGI__FN xml_object_range<xml_attribute_iterator> xml_node::attributes() const
- {
- return xml_object_range<xml_attribute_iterator>(attributes_begin(), attributes_end());
- }
-
- PUGI__FN bool xml_node::operator==(const xml_node& r) const
- {
- return (_root == r._root);
- }
-
- PUGI__FN bool xml_node::operator!=(const xml_node& r) const
- {
- return (_root != r._root);
- }
-
- PUGI__FN bool xml_node::operator<(const xml_node& r) const
- {
- return (_root < r._root);
- }
-
- PUGI__FN bool xml_node::operator>(const xml_node& r) const
- {
- return (_root > r._root);
- }
-
- PUGI__FN bool xml_node::operator<=(const xml_node& r) const
- {
- return (_root <= r._root);
- }
-
- PUGI__FN bool xml_node::operator>=(const xml_node& r) const
- {
- return (_root >= r._root);
- }
-
- PUGI__FN bool xml_node::empty() const
- {
- return !_root;
- }
-
- PUGI__FN const char_t* xml_node::name() const
- {
- return (_root && _root->name) ? _root->name : PUGIXML_TEXT("");
- }
-
- PUGI__FN xml_node_type xml_node::type() const
- {
- return _root ? static_cast<xml_node_type>((_root->header & impl::xml_memory_page_type_mask) + 1) : node_null;
- }
-
- PUGI__FN const char_t* xml_node::value() const
- {
- return (_root && _root->value) ? _root->value : PUGIXML_TEXT("");
- }
-
- PUGI__FN xml_node xml_node::child(const char_t* name_) const
- {
- if (!_root) return xml_node();
-
- for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
- if (i->name && impl::strequal(name_, i->name)) return xml_node(i);
-
- return xml_node();
- }
-
- PUGI__FN xml_attribute xml_node::attribute(const char_t* name_) const
- {
- if (!_root) return xml_attribute();
-
- for (xml_attribute_struct* i = _root->first_attribute; i; i = i->next_attribute)
- if (i->name && impl::strequal(name_, i->name))
- return xml_attribute(i);
-
- return xml_attribute();
- }
-
- PUGI__FN xml_node xml_node::next_sibling(const char_t* name_) const
- {
- if (!_root) return xml_node();
-
- for (xml_node_struct* i = _root->next_sibling; i; i = i->next_sibling)
- if (i->name && impl::strequal(name_, i->name)) return xml_node(i);
-
- return xml_node();
- }
-
- PUGI__FN xml_node xml_node::next_sibling() const
- {
- if (!_root) return xml_node();
-
- if (_root->next_sibling) return xml_node(_root->next_sibling);
- else return xml_node();
- }
-
- PUGI__FN xml_node xml_node::previous_sibling(const char_t* name_) const
- {
- if (!_root) return xml_node();
-
- for (xml_node_struct* i = _root->prev_sibling_c; i->next_sibling; i = i->prev_sibling_c)
- if (i->name && impl::strequal(name_, i->name)) return xml_node(i);
-
- return xml_node();
- }
-
- PUGI__FN xml_node xml_node::previous_sibling() const
- {
- if (!_root) return xml_node();
-
- if (_root->prev_sibling_c->next_sibling) return xml_node(_root->prev_sibling_c);
- else return xml_node();
- }
-
- PUGI__FN xml_node xml_node::parent() const
- {
- return _root ? xml_node(_root->parent) : xml_node();
- }
-
- PUGI__FN xml_node xml_node::root() const
- {
- if (!_root) return xml_node();
-
- impl::xml_memory_page* page = reinterpret_cast<impl::xml_memory_page*>(_root->header & impl::xml_memory_page_pointer_mask);
-
- return xml_node(static_cast<impl::xml_document_struct*>(page->allocator));
- }
-
- PUGI__FN xml_text xml_node::text() const
- {
- return xml_text(_root);
- }
-
- PUGI__FN const char_t* xml_node::child_value() const
- {
- if (!_root) return PUGIXML_TEXT("");
-
- for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
- if (i->value && impl::is_text_node(i))
- return i->value;
-
- return PUGIXML_TEXT("");
- }
-
- PUGI__FN const char_t* xml_node::child_value(const char_t* name_) const
- {
- return child(name_).child_value();
- }
-
- PUGI__FN xml_attribute xml_node::first_attribute() const
- {
- return _root ? xml_attribute(_root->first_attribute) : xml_attribute();
- }
-
- PUGI__FN xml_attribute xml_node::last_attribute() const
- {
- return _root && _root->first_attribute ? xml_attribute(_root->first_attribute->prev_attribute_c) : xml_attribute();
- }
-
- PUGI__FN xml_node xml_node::first_child() const
- {
- return _root ? xml_node(_root->first_child) : xml_node();
- }
-
- PUGI__FN xml_node xml_node::last_child() const
- {
- return _root && _root->first_child ? xml_node(_root->first_child->prev_sibling_c) : xml_node();
- }
-
- PUGI__FN bool xml_node::set_name(const char_t* rhs)
- {
- switch (type())
- {
- case node_pi:
- case node_declaration:
- case node_element:
- return impl::strcpy_insitu(_root->name, _root->header, impl::xml_memory_page_name_allocated_mask, rhs);
-
- default:
- return false;
- }
- }
-
- PUGI__FN bool xml_node::set_value(const char_t* rhs)
- {
- switch (type())
- {
- case node_pi:
- case node_cdata:
- case node_pcdata:
- case node_comment:
- case node_doctype:
- return impl::strcpy_insitu(_root->value, _root->header, impl::xml_memory_page_value_allocated_mask, rhs);
-
- default:
- return false;
- }
- }
-
- PUGI__FN xml_attribute xml_node::append_attribute(const char_t* name_)
- {
- if (type() != node_element && type() != node_declaration) return xml_attribute();
-
- xml_attribute a(impl::append_attribute_ll(_root, impl::get_allocator(_root)));
- a.set_name(name_);
-
- return a;
- }
-
- PUGI__FN xml_attribute xml_node::prepend_attribute(const char_t* name_)
- {
- if (type() != node_element && type() != node_declaration) return xml_attribute();
-
- xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));
- if (!a) return xml_attribute();
-
- a.set_name(name_);
-
- xml_attribute_struct* head = _root->first_attribute;
-
- if (head)
- {
- a._attr->prev_attribute_c = head->prev_attribute_c;
- head->prev_attribute_c = a._attr;
- }
- else
- a._attr->prev_attribute_c = a._attr;
-
- a._attr->next_attribute = head;
- _root->first_attribute = a._attr;
-
- return a;
- }
-
- PUGI__FN xml_attribute xml_node::insert_attribute_before(const char_t* name_, const xml_attribute& attr)
- {
- if ((type() != node_element && type() != node_declaration) || attr.empty()) return xml_attribute();
-
- // check that attribute belongs to *this
- xml_attribute_struct* cur = attr._attr;
-
- while (cur->prev_attribute_c->next_attribute) cur = cur->prev_attribute_c;
-
- if (cur != _root->first_attribute) return xml_attribute();
-
- xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));
- if (!a) return xml_attribute();
-
- a.set_name(name_);
-
- if (attr._attr->prev_attribute_c->next_attribute)
- attr._attr->prev_attribute_c->next_attribute = a._attr;
- else
- _root->first_attribute = a._attr;
-
- a._attr->prev_attribute_c = attr._attr->prev_attribute_c;
- a._attr->next_attribute = attr._attr;
- attr._attr->prev_attribute_c = a._attr;
-
- return a;
- }
-
- PUGI__FN xml_attribute xml_node::insert_attribute_after(const char_t* name_, const xml_attribute& attr)
- {
- if ((type() != node_element && type() != node_declaration) || attr.empty()) return xml_attribute();
-
- // check that attribute belongs to *this
- xml_attribute_struct* cur = attr._attr;
-
- while (cur->prev_attribute_c->next_attribute) cur = cur->prev_attribute_c;
-
- if (cur != _root->first_attribute) return xml_attribute();
-
- xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root)));
- if (!a) return xml_attribute();
-
- a.set_name(name_);
-
- if (attr._attr->next_attribute)
- attr._attr->next_attribute->prev_attribute_c = a._attr;
- else
- _root->first_attribute->prev_attribute_c = a._attr;
-
- a._attr->next_attribute = attr._attr->next_attribute;
- a._attr->prev_attribute_c = attr._attr;
- attr._attr->next_attribute = a._attr;
-
- return a;
- }
-
- PUGI__FN xml_attribute xml_node::append_copy(const xml_attribute& proto)
- {
- if (!proto) return xml_attribute();
-
- xml_attribute result = append_attribute(proto.name());
- result.set_value(proto.value());
-
- return result;
- }
-
- PUGI__FN xml_attribute xml_node::prepend_copy(const xml_attribute& proto)
- {
- if (!proto) return xml_attribute();
-
- xml_attribute result = prepend_attribute(proto.name());
- result.set_value(proto.value());
-
- return result;
- }
-
- PUGI__FN xml_attribute xml_node::insert_copy_after(const xml_attribute& proto, const xml_attribute& attr)
- {
- if (!proto) return xml_attribute();
-
- xml_attribute result = insert_attribute_after(proto.name(), attr);
- result.set_value(proto.value());
-
- return result;
- }
-
- PUGI__FN xml_attribute xml_node::insert_copy_before(const xml_attribute& proto, const xml_attribute& attr)
- {
- if (!proto) return xml_attribute();
-
- xml_attribute result = insert_attribute_before(proto.name(), attr);
- result.set_value(proto.value());
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::append_child(xml_node_type type_)
- {
- if (!impl::allow_insert_child(this->type(), type_)) return xml_node();
-
- xml_node n(impl::append_node(_root, impl::get_allocator(_root), type_));
-
- if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml"));
-
- return n;
- }
-
- PUGI__FN xml_node xml_node::prepend_child(xml_node_type type_)
- {
- if (!impl::allow_insert_child(this->type(), type_)) return xml_node();
-
- xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));
- if (!n) return xml_node();
-
- n._root->parent = _root;
-
- xml_node_struct* head = _root->first_child;
-
- if (head)
- {
- n._root->prev_sibling_c = head->prev_sibling_c;
- head->prev_sibling_c = n._root;
- }
- else
- n._root->prev_sibling_c = n._root;
-
- n._root->next_sibling = head;
- _root->first_child = n._root;
-
- if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml"));
-
- return n;
- }
-
- PUGI__FN xml_node xml_node::insert_child_before(xml_node_type type_, const xml_node& node)
- {
- if (!impl::allow_insert_child(this->type(), type_)) return xml_node();
- if (!node._root || node._root->parent != _root) return xml_node();
-
- xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));
- if (!n) return xml_node();
-
- n._root->parent = _root;
-
- if (node._root->prev_sibling_c->next_sibling)
- node._root->prev_sibling_c->next_sibling = n._root;
- else
- _root->first_child = n._root;
-
- n._root->prev_sibling_c = node._root->prev_sibling_c;
- n._root->next_sibling = node._root;
- node._root->prev_sibling_c = n._root;
-
- if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml"));
-
- return n;
- }
-
- PUGI__FN xml_node xml_node::insert_child_after(xml_node_type type_, const xml_node& node)
- {
- if (!impl::allow_insert_child(this->type(), type_)) return xml_node();
- if (!node._root || node._root->parent != _root) return xml_node();
-
- xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));
- if (!n) return xml_node();
-
- n._root->parent = _root;
-
- if (node._root->next_sibling)
- node._root->next_sibling->prev_sibling_c = n._root;
- else
- _root->first_child->prev_sibling_c = n._root;
-
- n._root->next_sibling = node._root->next_sibling;
- n._root->prev_sibling_c = node._root;
- node._root->next_sibling = n._root;
-
- if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml"));
-
- return n;
- }
-
- PUGI__FN xml_node xml_node::append_child(const char_t* name_)
- {
- xml_node result = append_child(node_element);
-
- result.set_name(name_);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::prepend_child(const char_t* name_)
- {
- xml_node result = prepend_child(node_element);
-
- result.set_name(name_);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::insert_child_after(const char_t* name_, const xml_node& node)
- {
- xml_node result = insert_child_after(node_element, node);
-
- result.set_name(name_);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::insert_child_before(const char_t* name_, const xml_node& node)
- {
- xml_node result = insert_child_before(node_element, node);
-
- result.set_name(name_);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::append_copy(const xml_node& proto)
- {
- xml_node result = append_child(proto.type());
-
- if (result) impl::recursive_copy_skip(result, proto, result);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::prepend_copy(const xml_node& proto)
- {
- xml_node result = prepend_child(proto.type());
-
- if (result) impl::recursive_copy_skip(result, proto, result);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::insert_copy_after(const xml_node& proto, const xml_node& node)
- {
- xml_node result = insert_child_after(proto.type(), node);
-
- if (result) impl::recursive_copy_skip(result, proto, result);
-
- return result;
- }
-
- PUGI__FN xml_node xml_node::insert_copy_before(const xml_node& proto, const xml_node& node)
- {
- xml_node result = insert_child_before(proto.type(), node);
-
- if (result) impl::recursive_copy_skip(result, proto, result);
-
- return result;
- }
-
- PUGI__FN bool xml_node::remove_attribute(const char_t* name_)
- {
- return remove_attribute(attribute(name_));
- }
-
- PUGI__FN bool xml_node::remove_attribute(const xml_attribute& a)
- {
- if (!_root || !a._attr) return false;
-
- // check that attribute belongs to *this
- xml_attribute_struct* attr = a._attr;
-
- while (attr->prev_attribute_c->next_attribute) attr = attr->prev_attribute_c;
-
- if (attr != _root->first_attribute) return false;
-
- if (a._attr->next_attribute) a._attr->next_attribute->prev_attribute_c = a._attr->prev_attribute_c;
- else if (_root->first_attribute) _root->first_attribute->prev_attribute_c = a._attr->prev_attribute_c;
-
- if (a._attr->prev_attribute_c->next_attribute) a._attr->prev_attribute_c->next_attribute = a._attr->next_attribute;
- else _root->first_attribute = a._attr->next_attribute;
-
- impl::destroy_attribute(a._attr, impl::get_allocator(_root));
-
- return true;
- }
-
- PUGI__FN bool xml_node::remove_child(const char_t* name_)
- {
- return remove_child(child(name_));
- }
-
- PUGI__FN bool xml_node::remove_child(const xml_node& n)
- {
- if (!_root || !n._root || n._root->parent != _root) return false;
-
- if (n._root->next_sibling) n._root->next_sibling->prev_sibling_c = n._root->prev_sibling_c;
- else if (_root->first_child) _root->first_child->prev_sibling_c = n._root->prev_sibling_c;
-
- if (n._root->prev_sibling_c->next_sibling) n._root->prev_sibling_c->next_sibling = n._root->next_sibling;
- else _root->first_child = n._root->next_sibling;
-
- impl::destroy_node(n._root, impl::get_allocator(_root));
-
- return true;
- }
-
- PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* name_, const char_t* attr_name, const char_t* attr_value) const
- {
- if (!_root) return xml_node();
-
- for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
- if (i->name && impl::strequal(name_, i->name))
- {
- for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute)
- if (impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value))
- return xml_node(i);
- }
-
- return xml_node();
- }
-
- PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const
- {
- if (!_root) return xml_node();
-
- for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
- for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute)
- if (impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value))
- return xml_node(i);
-
- return xml_node();
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN string_t xml_node::path(char_t delimiter) const
- {
- xml_node cursor = *this; // Make a copy.
-
- string_t result = cursor.name();
-
- while (cursor.parent())
- {
- cursor = cursor.parent();
-
- string_t temp = cursor.name();
- temp += delimiter;
- temp += result;
- result.swap(temp);
- }
-
- return result;
- }
-#endif
-
- PUGI__FN xml_node xml_node::first_element_by_path(const char_t* path_, char_t delimiter) const
- {
- xml_node found = *this; // Current search context.
-
- if (!_root || !path_ || !path_[0]) return found;
-
- if (path_[0] == delimiter)
- {
- // Absolute path; e.g. '/foo/bar'
- found = found.root();
- ++path_;
- }
-
- const char_t* path_segment = path_;
-
- while (*path_segment == delimiter) ++path_segment;
-
- const char_t* path_segment_end = path_segment;
-
- while (*path_segment_end && *path_segment_end != delimiter) ++path_segment_end;
-
- if (path_segment == path_segment_end) return found;
-
- const char_t* next_segment = path_segment_end;
-
- while (*next_segment == delimiter) ++next_segment;
-
- if (*path_segment == '.' && path_segment + 1 == path_segment_end)
- return found.first_element_by_path(next_segment, delimiter);
- else if (*path_segment == '.' && *(path_segment+1) == '.' && path_segment + 2 == path_segment_end)
- return found.parent().first_element_by_path(next_segment, delimiter);
- else
- {
- for (xml_node_struct* j = found._root->first_child; j; j = j->next_sibling)
- {
- if (j->name && impl::strequalrange(j->name, path_segment, static_cast<size_t>(path_segment_end - path_segment)))
- {
- xml_node subsearch = xml_node(j).first_element_by_path(next_segment, delimiter);
-
- if (subsearch) return subsearch;
- }
- }
-
- return xml_node();
- }
- }
-
- PUGI__FN bool xml_node::traverse(xml_tree_walker& walker)
- {
- walker._depth = -1;
-
- xml_node arg_begin = *this;
- if (!walker.begin(arg_begin)) return false;
-
- xml_node cur = first_child();
-
- if (cur)
- {
- ++walker._depth;
-
- do
- {
- xml_node arg_for_each = cur;
- if (!walker.for_each(arg_for_each))
- return false;
-
- if (cur.first_child())
- {
- ++walker._depth;
- cur = cur.first_child();
- }
- else if (cur.next_sibling())
- cur = cur.next_sibling();
- else
- {
- // Borland C++ workaround
- while (!cur.next_sibling() && cur != *this && !cur.parent().empty())
- {
- --walker._depth;
- cur = cur.parent();
- }
-
- if (cur != *this)
- cur = cur.next_sibling();
- }
- }
- while (cur && cur != *this);
- }
-
- assert(walker._depth == -1);
-
- xml_node arg_end = *this;
- return walker.end(arg_end);
- }
-
- PUGI__FN size_t xml_node::hash_value() const
- {
- return static_cast<size_t>(reinterpret_cast<uintptr_t>(_root) / sizeof(xml_node_struct));
- }
-
- PUGI__FN xml_node_struct* xml_node::internal_object() const
- {
- return _root;
- }
-
- PUGI__FN void xml_node::print(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const
- {
- if (!_root) return;
-
- impl::xml_buffered_writer buffered_writer(writer, encoding);
-
- impl::node_output(buffered_writer, *this, indent, flags, depth);
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN void xml_node::print(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const
- {
- xml_writer_stream writer(stream);
-
- print(writer, indent, flags, encoding, depth);
- }
-
- PUGI__FN void xml_node::print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent, unsigned int flags, unsigned int depth) const
- {
- xml_writer_stream writer(stream);
-
- print(writer, indent, flags, encoding_wchar, depth);
- }
-#endif
-
- PUGI__FN ptrdiff_t xml_node::offset_debug() const
- {
- xml_node_struct* r = root()._root;
-
- if (!r) return -1;
-
- const char_t* buffer = static_cast<impl::xml_document_struct*>(r)->buffer;
-
- if (!buffer) return -1;
-
- switch (type())
- {
- case node_document:
- return 0;
-
- case node_element:
- case node_declaration:
- case node_pi:
- return (_root->header & impl::xml_memory_page_name_allocated_mask) ? -1 : _root->name - buffer;
-
- case node_pcdata:
- case node_cdata:
- case node_comment:
- case node_doctype:
- return (_root->header & impl::xml_memory_page_value_allocated_mask) ? -1 : _root->value - buffer;
-
- default:
- return -1;
- }
- }
-
-#ifdef __BORLANDC__
- PUGI__FN bool operator&&(const xml_node& lhs, bool rhs)
- {
- return (bool)lhs && rhs;
- }
-
- PUGI__FN bool operator||(const xml_node& lhs, bool rhs)
- {
- return (bool)lhs || rhs;
- }
-#endif
-
- PUGI__FN xml_text::xml_text(xml_node_struct* root): _root(root)
- {
- }
-
- PUGI__FN xml_node_struct* xml_text::_data() const
- {
- if (!_root || impl::is_text_node(_root)) return _root;
-
- for (xml_node_struct* node = _root->first_child; node; node = node->next_sibling)
- if (impl::is_text_node(node))
- return node;
-
- return 0;
- }
-
- PUGI__FN xml_node_struct* xml_text::_data_new()
- {
- xml_node_struct* d = _data();
- if (d) return d;
-
- return xml_node(_root).append_child(node_pcdata).internal_object();
- }
-
- PUGI__FN xml_text::xml_text(): _root(0)
- {
- }
-
- PUGI__FN static void unspecified_bool_xml_text(xml_text***)
- {
- }
-
- PUGI__FN xml_text::operator xml_text::unspecified_bool_type() const
- {
- return _data() ? unspecified_bool_xml_text : 0;
- }
-
- PUGI__FN bool xml_text::operator!() const
- {
- return !_data();
- }
-
- PUGI__FN bool xml_text::empty() const
- {
- return _data() == 0;
- }
-
- PUGI__FN const char_t* xml_text::get() const
- {
- xml_node_struct* d = _data();
-
- return (d && d->value) ? d->value : PUGIXML_TEXT("");
- }
-
- PUGI__FN const char_t* xml_text::as_string(const char_t* def) const
- {
- xml_node_struct* d = _data();
-
- return (d && d->value) ? d->value : def;
- }
-
- PUGI__FN int xml_text::as_int(int def) const
- {
- xml_node_struct* d = _data();
-
- return impl::get_value_int(d ? d->value : 0, def);
- }
-
- PUGI__FN unsigned int xml_text::as_uint(unsigned int def) const
- {
- xml_node_struct* d = _data();
-
- return impl::get_value_uint(d ? d->value : 0, def);
- }
-
- PUGI__FN double xml_text::as_double(double def) const
- {
- xml_node_struct* d = _data();
-
- return impl::get_value_double(d ? d->value : 0, def);
- }
-
- PUGI__FN float xml_text::as_float(float def) const
- {
- xml_node_struct* d = _data();
-
- return impl::get_value_float(d ? d->value : 0, def);
- }
-
- PUGI__FN bool xml_text::as_bool(bool def) const
- {
- xml_node_struct* d = _data();
-
- return impl::get_value_bool(d ? d->value : 0, def);
- }
-
- PUGI__FN bool xml_text::set(const char_t* rhs)
- {
- xml_node_struct* dn = _data_new();
-
- return dn ? impl::strcpy_insitu(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;
- }
-
- PUGI__FN bool xml_text::set(int rhs)
- {
- xml_node_struct* dn = _data_new();
-
- return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;
- }
-
- PUGI__FN bool xml_text::set(unsigned int rhs)
- {
- xml_node_struct* dn = _data_new();
-
- return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;
- }
-
- PUGI__FN bool xml_text::set(double rhs)
- {
- xml_node_struct* dn = _data_new();
-
- return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;
- }
-
- PUGI__FN bool xml_text::set(bool rhs)
- {
- xml_node_struct* dn = _data_new();
-
- return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false;
- }
-
- PUGI__FN xml_text& xml_text::operator=(const char_t* rhs)
- {
- set(rhs);
- return *this;
- }
-
- PUGI__FN xml_text& xml_text::operator=(int rhs)
- {
- set(rhs);
- return *this;
- }
-
- PUGI__FN xml_text& xml_text::operator=(unsigned int rhs)
- {
- set(rhs);
- return *this;
- }
-
- PUGI__FN xml_text& xml_text::operator=(double rhs)
- {
- set(rhs);
- return *this;
- }
-
- PUGI__FN xml_text& xml_text::operator=(bool rhs)
- {
- set(rhs);
- return *this;
- }
-
- PUGI__FN xml_node xml_text::data() const
- {
- return xml_node(_data());
- }
-
-#ifdef __BORLANDC__
- PUGI__FN bool operator&&(const xml_text& lhs, bool rhs)
- {
- return (bool)lhs && rhs;
- }
-
- PUGI__FN bool operator||(const xml_text& lhs, bool rhs)
- {
- return (bool)lhs || rhs;
- }
-#endif
-
- PUGI__FN xml_node_iterator::xml_node_iterator()
- {
- }
-
- PUGI__FN xml_node_iterator::xml_node_iterator(const xml_node& node): _wrap(node), _parent(node.parent())
- {
- }
-
- PUGI__FN xml_node_iterator::xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent)
- {
- }
-
- PUGI__FN bool xml_node_iterator::operator==(const xml_node_iterator& rhs) const
- {
- return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;
- }
-
- PUGI__FN bool xml_node_iterator::operator!=(const xml_node_iterator& rhs) const
- {
- return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;
- }
-
- PUGI__FN xml_node& xml_node_iterator::operator*() const
- {
- assert(_wrap._root);
- return _wrap;
- }
-
- PUGI__FN xml_node* xml_node_iterator::operator->() const
- {
- assert(_wrap._root);
- return const_cast<xml_node*>(&_wrap); // BCC32 workaround
- }
-
- PUGI__FN const xml_node_iterator& xml_node_iterator::operator++()
- {
- assert(_wrap._root);
- _wrap._root = _wrap._root->next_sibling;
- return *this;
- }
-
- PUGI__FN xml_node_iterator xml_node_iterator::operator++(int)
- {
- xml_node_iterator temp = *this;
- ++*this;
- return temp;
- }
-
- PUGI__FN const xml_node_iterator& xml_node_iterator::operator--()
- {
- _wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();
- return *this;
- }
-
- PUGI__FN xml_node_iterator xml_node_iterator::operator--(int)
- {
- xml_node_iterator temp = *this;
- --*this;
- return temp;
- }
-
- PUGI__FN xml_attribute_iterator::xml_attribute_iterator()
- {
- }
-
- PUGI__FN xml_attribute_iterator::xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent): _wrap(attr), _parent(parent)
- {
- }
-
- PUGI__FN xml_attribute_iterator::xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent)
- {
- }
-
- PUGI__FN bool xml_attribute_iterator::operator==(const xml_attribute_iterator& rhs) const
- {
- return _wrap._attr == rhs._wrap._attr && _parent._root == rhs._parent._root;
- }
-
- PUGI__FN bool xml_attribute_iterator::operator!=(const xml_attribute_iterator& rhs) const
- {
- return _wrap._attr != rhs._wrap._attr || _parent._root != rhs._parent._root;
- }
-
- PUGI__FN xml_attribute& xml_attribute_iterator::operator*() const
- {
- assert(_wrap._attr);
- return _wrap;
- }
-
- PUGI__FN xml_attribute* xml_attribute_iterator::operator->() const
- {
- assert(_wrap._attr);
- return const_cast<xml_attribute*>(&_wrap); // BCC32 workaround
- }
-
- PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator++()
- {
- assert(_wrap._attr);
- _wrap._attr = _wrap._attr->next_attribute;
- return *this;
- }
-
- PUGI__FN xml_attribute_iterator xml_attribute_iterator::operator++(int)
- {
- xml_attribute_iterator temp = *this;
- ++*this;
- return temp;
- }
-
- PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator--()
- {
- _wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute();
- return *this;
- }
-
- PUGI__FN xml_attribute_iterator xml_attribute_iterator::operator--(int)
- {
- xml_attribute_iterator temp = *this;
- --*this;
- return temp;
- }
-
- PUGI__FN xml_named_node_iterator::xml_named_node_iterator(): _name(0)
- {
- }
-
- PUGI__FN xml_named_node_iterator::xml_named_node_iterator(const xml_node& node, const char_t* name): _node(node), _name(name)
- {
- }
-
- PUGI__FN bool xml_named_node_iterator::operator==(const xml_named_node_iterator& rhs) const
- {
- return _node == rhs._node;
- }
-
- PUGI__FN bool xml_named_node_iterator::operator!=(const xml_named_node_iterator& rhs) const
- {
- return _node != rhs._node;
- }
-
- PUGI__FN xml_node& xml_named_node_iterator::operator*() const
- {
- assert(_node._root);
- return _node;
- }
-
- PUGI__FN xml_node* xml_named_node_iterator::operator->() const
- {
- assert(_node._root);
- return const_cast<xml_node*>(&_node); // BCC32 workaround
- }
-
- PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator++()
- {
- assert(_node._root);
- _node = _node.next_sibling(_name);
- return *this;
- }
-
- PUGI__FN xml_named_node_iterator xml_named_node_iterator::operator++(int)
- {
- xml_named_node_iterator temp = *this;
- ++*this;
- return temp;
- }
-
- PUGI__FN xml_parse_result::xml_parse_result(): status(status_internal_error), offset(0), encoding(encoding_auto)
- {
- }
-
- PUGI__FN xml_parse_result::operator bool() const
- {
- return status == status_ok;
- }
-
- PUGI__FN const char* xml_parse_result::description() const
- {
- switch (status)
- {
- case status_ok: return "No error";
-
- case status_file_not_found: return "File was not found";
- case status_io_error: return "Error reading from file/stream";
- case status_out_of_memory: return "Could not allocate memory";
- case status_internal_error: return "Internal error occurred";
-
- case status_unrecognized_tag: return "Could not determine tag type";
-
- case status_bad_pi: return "Error parsing document declaration/processing instruction";
- case status_bad_comment: return "Error parsing comment";
- case status_bad_cdata: return "Error parsing CDATA section";
- case status_bad_doctype: return "Error parsing document type declaration";
- case status_bad_pcdata: return "Error parsing PCDATA section";
- case status_bad_start_element: return "Error parsing start element tag";
- case status_bad_attribute: return "Error parsing element attribute";
- case status_bad_end_element: return "Error parsing end element tag";
- case status_end_element_mismatch: return "Start-end tags mismatch";
-
- default: return "Unknown error";
- }
- }
-
- PUGI__FN xml_document::xml_document(): _buffer(0)
- {
- create();
- }
-
- PUGI__FN xml_document::~xml_document()
- {
- destroy();
- }
-
- PUGI__FN void xml_document::reset()
- {
- destroy();
- create();
- }
-
- PUGI__FN void xml_document::reset(const xml_document& proto)
- {
- reset();
-
- for (xml_node cur = proto.first_child(); cur; cur = cur.next_sibling())
- append_copy(cur);
- }
-
- PUGI__FN void xml_document::create()
- {
- // initialize sentinel page
- PUGI__STATIC_ASSERT(offsetof(impl::xml_memory_page, data) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment <= sizeof(_memory));
-
- // align upwards to page boundary
- void* page_memory = reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1));
-
- // prepare page structure
- impl::xml_memory_page* page = impl::xml_memory_page::construct(page_memory);
-
- page->busy_size = impl::xml_memory_page_size;
-
- // allocate new root
- _root = new (page->data) impl::xml_document_struct(page);
- _root->prev_sibling_c = _root;
-
- // setup sentinel page
- page->allocator = static_cast<impl::xml_document_struct*>(_root);
- }
-
- PUGI__FN void xml_document::destroy()
- {
- // destroy static storage
- if (_buffer)
- {
- impl::xml_memory::deallocate(_buffer);
- _buffer = 0;
- }
-
- // destroy dynamic storage, leave sentinel page (it's in static memory)
- if (_root)
- {
- impl::xml_memory_page* root_page = reinterpret_cast<impl::xml_memory_page*>(_root->header & impl::xml_memory_page_pointer_mask);
- assert(root_page && !root_page->prev && !root_page->memory);
-
- // destroy all pages
- for (impl::xml_memory_page* page = root_page->next; page; )
- {
- impl::xml_memory_page* next = page->next;
-
- impl::xml_allocator::deallocate_page(page);
-
- page = next;
- }
-
- // cleanup root page
- root_page->allocator = 0;
- root_page->next = 0;
- root_page->busy_size = root_page->freed_size = 0;
-
- _root = 0;
- }
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN xml_parse_result xml_document::load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options, xml_encoding encoding)
- {
- reset();
-
- return impl::load_stream_impl(*this, stream, options, encoding);
- }
-
- PUGI__FN xml_parse_result xml_document::load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options)
- {
- reset();
-
- return impl::load_stream_impl(*this, stream, options, encoding_wchar);
- }
-#endif
-
- PUGI__FN xml_parse_result xml_document::load(const char_t* contents, unsigned int options)
- {
- // Force native encoding (skip autodetection)
- #ifdef PUGIXML_WCHAR_MODE
- xml_encoding encoding = encoding_wchar;
- #else
- xml_encoding encoding = encoding_utf8;
- #endif
-
- return load_buffer(contents, impl::strlength(contents) * sizeof(char_t), options, encoding);
- }
-
- PUGI__FN xml_parse_result xml_document::load_file(const char* path_, unsigned int options, xml_encoding encoding)
- {
- reset();
-
- FILE* file = fopen(path_, "rb");
-
- return impl::load_file_impl(*this, file, options, encoding);
- }
-
- PUGI__FN xml_parse_result xml_document::load_file(const wchar_t* path_, unsigned int options, xml_encoding encoding)
- {
- reset();
-
- FILE* file = impl::open_file_wide(path_, L"rb");
-
- return impl::load_file_impl(*this, file, options, encoding);
- }
-
- PUGI__FN xml_parse_result xml_document::load_buffer_impl(void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own)
- {
- reset();
-
- // check input buffer
- assert(contents || size == 0);
-
- // get actual encoding
- xml_encoding buffer_encoding = impl::get_buffer_encoding(encoding, contents, size);
-
- // get private buffer
- char_t* buffer = 0;
- size_t length = 0;
-
- if (!impl::convert_buffer(buffer, length, buffer_encoding, contents, size, is_mutable)) return impl::make_parse_result(status_out_of_memory);
-
- // delete original buffer if we performed a conversion
- if (own && buffer != contents && contents) impl::xml_memory::deallocate(contents);
-
- // parse
- xml_parse_result res = impl::xml_parser::parse(buffer, length, _root, options);
-
- // remember encoding
- res.encoding = buffer_encoding;
-
- // grab onto buffer if it's our buffer, user is responsible for deallocating contens himself
- if (own || buffer != contents) _buffer = buffer;
-
- return res;
- }
-
- PUGI__FN xml_parse_result xml_document::load_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding)
- {
- return load_buffer_impl(const_cast<void*>(contents), size, options, encoding, false, false);
- }
-
- PUGI__FN xml_parse_result xml_document::load_buffer_inplace(void* contents, size_t size, unsigned int options, xml_encoding encoding)
- {
- return load_buffer_impl(contents, size, options, encoding, true, false);
- }
-
- PUGI__FN xml_parse_result xml_document::load_buffer_inplace_own(void* contents, size_t size, unsigned int options, xml_encoding encoding)
- {
- return load_buffer_impl(contents, size, options, encoding, true, true);
- }
-
- PUGI__FN void xml_document::save(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding) const
- {
- impl::xml_buffered_writer buffered_writer(writer, encoding);
-
- if ((flags & format_write_bom) && encoding != encoding_latin1)
- {
- // BOM always represents the codepoint U+FEFF, so just write it in native encoding
- #ifdef PUGIXML_WCHAR_MODE
- unsigned int bom = 0xfeff;
- buffered_writer.write(static_cast<wchar_t>(bom));
- #else
- buffered_writer.write('\xef', '\xbb', '\xbf');
- #endif
- }
-
- if (!(flags & format_no_declaration) && !impl::has_declaration(*this))
- {
- buffered_writer.write(PUGIXML_TEXT("<?xml version=\"1.0\""));
- if (encoding == encoding_latin1) buffered_writer.write(PUGIXML_TEXT(" encoding=\"ISO-8859-1\""));
- buffered_writer.write('?', '>');
- if (!(flags & format_raw)) buffered_writer.write('\n');
- }
-
- impl::node_output(buffered_writer, *this, indent, flags, 0);
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN void xml_document::save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding) const
- {
- xml_writer_stream writer(stream);
-
- save(writer, indent, flags, encoding);
- }
-
- PUGI__FN void xml_document::save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent, unsigned int flags) const
- {
- xml_writer_stream writer(stream);
-
- save(writer, indent, flags, encoding_wchar);
- }
-#endif
-
- PUGI__FN bool xml_document::save_file(const char* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const
- {
- FILE* file = fopen(path_, (flags & format_save_file_text) ? "w" : "wb");
- return impl::save_file_impl(*this, file, indent, flags, encoding);
- }
-
- PUGI__FN bool xml_document::save_file(const wchar_t* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const
- {
- FILE* file = impl::open_file_wide(path_, (flags & format_save_file_text) ? L"w" : L"wb");
- return impl::save_file_impl(*this, file, indent, flags, encoding);
- }
-
- PUGI__FN xml_node xml_document::document_element() const
- {
- for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
- if ((i->header & impl::xml_memory_page_type_mask) + 1 == node_element)
- return xml_node(i);
-
- return xml_node();
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const wchar_t* str)
- {
- assert(str);
-
- return impl::as_utf8_impl(str, wcslen(str));
- }
-
- PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t>& str)
- {
- return impl::as_utf8_impl(str.c_str(), str.size());
- }
-
- PUGI__FN std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const char* str)
- {
- assert(str);
-
- return impl::as_wide_impl(str, strlen(str));
- }
-
- PUGI__FN std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const std::string& str)
- {
- return impl::as_wide_impl(str.c_str(), str.size());
- }
-#endif
-
- PUGI__FN void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
- {
- impl::xml_memory::allocate = allocate;
- impl::xml_memory::deallocate = deallocate;
- }
-
- PUGI__FN allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
- {
- return impl::xml_memory::allocate;
- }
-
- PUGI__FN deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
- {
- return impl::xml_memory::deallocate;
- }
-}
-
-#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
-namespace std
-{
- // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)
- PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_node_iterator&)
- {
- return std::bidirectional_iterator_tag();
- }
-
- PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_attribute_iterator&)
- {
- return std::bidirectional_iterator_tag();
- }
-
- PUGI__FN std::forward_iterator_tag _Iter_cat(const pugi::xml_named_node_iterator&)
- {
- return std::forward_iterator_tag();
- }
-}
-#endif
-
-#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
-namespace std
-{
- // Workarounds for (non-standard) iterator category detection
- PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_node_iterator&)
- {
- return std::bidirectional_iterator_tag();
- }
-
- PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_attribute_iterator&)
- {
- return std::bidirectional_iterator_tag();
- }
-
- PUGI__FN std::forward_iterator_tag __iterator_category(const pugi::xml_named_node_iterator&)
- {
- return std::forward_iterator_tag();
- }
-}
-#endif
-
-#ifndef PUGIXML_NO_XPATH
-
-// STL replacements
-PUGI__NS_BEGIN
- struct equal_to
- {
- template <typename T> bool operator()(const T& lhs, const T& rhs) const
- {
- return lhs == rhs;
- }
- };
-
- struct not_equal_to
- {
- template <typename T> bool operator()(const T& lhs, const T& rhs) const
- {
- return lhs != rhs;
- }
- };
-
- struct less
- {
- template <typename T> bool operator()(const T& lhs, const T& rhs) const
- {
- return lhs < rhs;
- }
- };
-
- struct less_equal
- {
- template <typename T> bool operator()(const T& lhs, const T& rhs) const
- {
- return lhs <= rhs;
- }
- };
-
- template <typename T> void swap(T& lhs, T& rhs)
- {
- T temp = lhs;
- lhs = rhs;
- rhs = temp;
- }
-
- template <typename I, typename Pred> I min_element(I begin, I end, const Pred& pred)
- {
- I result = begin;
-
- for (I it = begin + 1; it != end; ++it)
- if (pred(*it, *result))
- result = it;
-
- return result;
- }
-
- template <typename I> void reverse(I begin, I end)
- {
- while (begin + 1 < end) swap(*begin++, *--end);
- }
-
- template <typename I> I unique(I begin, I end)
- {
- // fast skip head
- while (begin + 1 < end && *begin != *(begin + 1)) begin++;
-
- if (begin == end) return begin;
-
- // last written element
- I write = begin++;
-
- // merge unique elements
- while (begin != end)
- {
- if (*begin != *write)
- *++write = *begin++;
- else
- begin++;
- }
-
- // past-the-end (write points to live element)
- return write + 1;
- }
-
- template <typename I> void copy_backwards(I begin, I end, I target)
- {
- while (begin != end) *--target = *--end;
- }
-
- template <typename I, typename Pred, typename T> void insertion_sort(I begin, I end, const Pred& pred, T*)
- {
- assert(begin != end);
-
- for (I it = begin + 1; it != end; ++it)
- {
- T val = *it;
-
- if (pred(val, *begin))
- {
- // move to front
- copy_backwards(begin, it, it + 1);
- *begin = val;
- }
- else
- {
- I hole = it;
-
- // move hole backwards
- while (pred(val, *(hole - 1)))
- {
- *hole = *(hole - 1);
- hole--;
- }
-
- // fill hole with element
- *hole = val;
- }
- }
- }
-
- // std variant for elements with ==
- template <typename I, typename Pred> void partition(I begin, I middle, I end, const Pred& pred, I* out_eqbeg, I* out_eqend)
- {
- I eqbeg = middle, eqend = middle + 1;
-
- // expand equal range
- while (eqbeg != begin && *(eqbeg - 1) == *eqbeg) --eqbeg;
- while (eqend != end && *eqend == *eqbeg) ++eqend;
-
- // process outer elements
- I ltend = eqbeg, gtbeg = eqend;
-
- for (;;)
- {
- // find the element from the right side that belongs to the left one
- for (; gtbeg != end; ++gtbeg)
- if (!pred(*eqbeg, *gtbeg))
- {
- if (*gtbeg == *eqbeg) swap(*gtbeg, *eqend++);
- else break;
- }
-
- // find the element from the left side that belongs to the right one
- for (; ltend != begin; --ltend)
- if (!pred(*(ltend - 1), *eqbeg))
- {
- if (*eqbeg == *(ltend - 1)) swap(*(ltend - 1), *--eqbeg);
- else break;
- }
-
- // scanned all elements
- if (gtbeg == end && ltend == begin)
- {
- *out_eqbeg = eqbeg;
- *out_eqend = eqend;
- return;
- }
-
- // make room for elements by moving equal area
- if (gtbeg == end)
- {
- if (--ltend != --eqbeg) swap(*ltend, *eqbeg);
- swap(*eqbeg, *--eqend);
- }
- else if (ltend == begin)
- {
- if (eqend != gtbeg) swap(*eqbeg, *eqend);
- ++eqend;
- swap(*gtbeg++, *eqbeg++);
- }
- else swap(*gtbeg++, *--ltend);
- }
- }
-
- template <typename I, typename Pred> void median3(I first, I middle, I last, const Pred& pred)
- {
- if (pred(*middle, *first)) swap(*middle, *first);
- if (pred(*last, *middle)) swap(*last, *middle);
- if (pred(*middle, *first)) swap(*middle, *first);
- }
-
- template <typename I, typename Pred> void median(I first, I middle, I last, const Pred& pred)
- {
- if (last - first <= 40)
- {
- // median of three for small chunks
- median3(first, middle, last, pred);
- }
- else
- {
- // median of nine
- size_t step = (last - first + 1) / 8;
-
- median3(first, first + step, first + 2 * step, pred);
- median3(middle - step, middle, middle + step, pred);
- median3(last - 2 * step, last - step, last, pred);
- median3(first + step, middle, last - step, pred);
- }
- }
-
- template <typename I, typename Pred> void sort(I begin, I end, const Pred& pred)
- {
- // sort large chunks
- while (end - begin > 32)
- {
- // find median element
- I middle = begin + (end - begin) / 2;
- median(begin, middle, end - 1, pred);
-
- // partition in three chunks (< = >)
- I eqbeg, eqend;
- partition(begin, middle, end, pred, &eqbeg, &eqend);
-
- // loop on larger half
- if (eqbeg - begin > end - eqend)
- {
- sort(eqend, end, pred);
- end = eqbeg;
- }
- else
- {
- sort(begin, eqbeg, pred);
- begin = eqend;
- }
- }
-
- // insertion sort small chunk
- if (begin != end) insertion_sort(begin, end, pred, &*begin);
- }
-PUGI__NS_END
-
-// Allocator used for AST and evaluation stacks
-PUGI__NS_BEGIN
- struct xpath_memory_block
- {
- xpath_memory_block* next;
-
- char data[
- #ifdef PUGIXML_MEMORY_XPATH_PAGE_SIZE
- PUGIXML_MEMORY_XPATH_PAGE_SIZE
- #else
- 4096
- #endif
- ];
- };
-
- class xpath_allocator
- {
- xpath_memory_block* _root;
- size_t _root_size;
-
- public:
- #ifdef PUGIXML_NO_EXCEPTIONS
- jmp_buf* error_handler;
- #endif
-
- xpath_allocator(xpath_memory_block* root, size_t root_size = 0): _root(root), _root_size(root_size)
- {
- #ifdef PUGIXML_NO_EXCEPTIONS
- error_handler = 0;
- #endif
- }
-
- void* allocate_nothrow(size_t size)
- {
- const size_t block_capacity = sizeof(_root->data);
-
- // align size so that we're able to store pointers in subsequent blocks
- size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
-
- if (_root_size + size <= block_capacity)
- {
- void* buf = _root->data + _root_size;
- _root_size += size;
- return buf;
- }
- else
- {
- size_t block_data_size = (size > block_capacity) ? size : block_capacity;
- size_t block_size = block_data_size + offsetof(xpath_memory_block, data);
-
- xpath_memory_block* block = static_cast<xpath_memory_block*>(xml_memory::allocate(block_size));
- if (!block) return 0;
-
- block->next = _root;
-
- _root = block;
- _root_size = size;
-
- return block->data;
- }
- }
-
- void* allocate(size_t size)
- {
- void* result = allocate_nothrow(size);
-
- if (!result)
- {
- #ifdef PUGIXML_NO_EXCEPTIONS
- assert(error_handler);
- longjmp(*error_handler, 1);
- #else
- throw std::bad_alloc();
- #endif
- }
-
- return result;
- }
-
- void* reallocate(void* ptr, size_t old_size, size_t new_size)
- {
- // align size so that we're able to store pointers in subsequent blocks
- old_size = (old_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
- new_size = (new_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
-
- // we can only reallocate the last object
- assert(ptr == 0 || static_cast<char*>(ptr) + old_size == _root->data + _root_size);
-
- // adjust root size so that we have not allocated the object at all
- bool only_object = (_root_size == old_size);
-
- if (ptr) _root_size -= old_size;
-
- // allocate a new version (this will obviously reuse the memory if possible)
- void* result = allocate(new_size);
- assert(result);
-
- // we have a new block
- if (result != ptr && ptr)
- {
- // copy old data
- assert(new_size > old_size);
- memcpy(result, ptr, old_size);
-
- // free the previous page if it had no other objects
- if (only_object)
- {
- assert(_root->data == result);
- assert(_root->next);
-
- xpath_memory_block* next = _root->next->next;
-
- if (next)
- {
- // deallocate the whole page, unless it was the first one
- xml_memory::deallocate(_root->next);
- _root->next = next;
- }
- }
- }
-
- return result;
- }
-
- void revert(const xpath_allocator& state)
- {
- // free all new pages
- xpath_memory_block* cur = _root;
-
- while (cur != state._root)
- {
- xpath_memory_block* next = cur->next;
-
- xml_memory::deallocate(cur);
-
- cur = next;
- }
-
- // restore state
- _root = state._root;
- _root_size = state._root_size;
- }
-
- void release()
- {
- xpath_memory_block* cur = _root;
- assert(cur);
-
- while (cur->next)
- {
- xpath_memory_block* next = cur->next;
-
- xml_memory::deallocate(cur);
-
- cur = next;
- }
- }
- };
-
- struct xpath_allocator_capture
- {
- xpath_allocator_capture(xpath_allocator* alloc): _target(alloc), _state(*alloc)
- {
- }
-
- ~xpath_allocator_capture()
- {
- _target->revert(_state);
- }
-
- xpath_allocator* _target;
- xpath_allocator _state;
- };
-
- struct xpath_stack
- {
- xpath_allocator* result;
- xpath_allocator* temp;
- };
-
- struct xpath_stack_data
- {
- xpath_memory_block blocks[2];
- xpath_allocator result;
- xpath_allocator temp;
- xpath_stack stack;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- jmp_buf error_handler;
- #endif
-
- xpath_stack_data(): result(blocks + 0), temp(blocks + 1)
- {
- blocks[0].next = blocks[1].next = 0;
-
- stack.result = &result;
- stack.temp = &temp;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- result.error_handler = temp.error_handler = &error_handler;
- #endif
- }
-
- ~xpath_stack_data()
- {
- result.release();
- temp.release();
- }
- };
-PUGI__NS_END
-
-// String class
-PUGI__NS_BEGIN
- class xpath_string
- {
- const char_t* _buffer;
- bool _uses_heap;
-
- static char_t* duplicate_string(const char_t* string, size_t length, xpath_allocator* alloc)
- {
- char_t* result = static_cast<char_t*>(alloc->allocate((length + 1) * sizeof(char_t)));
- assert(result);
-
- memcpy(result, string, length * sizeof(char_t));
- result[length] = 0;
-
- return result;
- }
-
- static char_t* duplicate_string(const char_t* string, xpath_allocator* alloc)
- {
- return duplicate_string(string, strlength(string), alloc);
- }
-
- public:
- xpath_string(): _buffer(PUGIXML_TEXT("")), _uses_heap(false)
- {
- }
-
- explicit xpath_string(const char_t* str, xpath_allocator* alloc)
- {
- bool empty_ = (*str == 0);
-
- _buffer = empty_ ? PUGIXML_TEXT("") : duplicate_string(str, alloc);
- _uses_heap = !empty_;
- }
-
- explicit xpath_string(const char_t* str, bool use_heap): _buffer(str), _uses_heap(use_heap)
- {
- }
-
- xpath_string(const char_t* begin, const char_t* end, xpath_allocator* alloc)
- {
- assert(begin <= end);
-
- bool empty_ = (begin == end);
-
- _buffer = empty_ ? PUGIXML_TEXT("") : duplicate_string(begin, static_cast<size_t>(end - begin), alloc);
- _uses_heap = !empty_;
- }
-
- void append(const xpath_string& o, xpath_allocator* alloc)
- {
- // skip empty sources
- if (!*o._buffer) return;
-
- // fast append for constant empty target and constant source
- if (!*_buffer && !_uses_heap && !o._uses_heap)
- {
- _buffer = o._buffer;
- }
- else
- {
- // need to make heap copy
- size_t target_length = strlength(_buffer);
- size_t source_length = strlength(o._buffer);
- size_t result_length = target_length + source_length;
-
- // allocate new buffer
- char_t* result = static_cast<char_t*>(alloc->reallocate(_uses_heap ? const_cast<char_t*>(_buffer) : 0, (target_length + 1) * sizeof(char_t), (result_length + 1) * sizeof(char_t)));
- assert(result);
-
- // append first string to the new buffer in case there was no reallocation
- if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t));
-
- // append second string to the new buffer
- memcpy(result + target_length, o._buffer, source_length * sizeof(char_t));
- result[result_length] = 0;
-
- // finalize
- _buffer = result;
- _uses_heap = true;
- }
- }
-
- const char_t* c_str() const
- {
- return _buffer;
- }
-
- size_t length() const
- {
- return strlength(_buffer);
- }
-
- char_t* data(xpath_allocator* alloc)
- {
- // make private heap copy
- if (!_uses_heap)
- {
- _buffer = duplicate_string(_buffer, alloc);
- _uses_heap = true;
- }
-
- return const_cast<char_t*>(_buffer);
- }
-
- bool empty() const
- {
- return *_buffer == 0;
- }
-
- bool operator==(const xpath_string& o) const
- {
- return strequal(_buffer, o._buffer);
- }
-
- bool operator!=(const xpath_string& o) const
- {
- return !strequal(_buffer, o._buffer);
- }
-
- bool uses_heap() const
- {
- return _uses_heap;
- }
- };
-
- PUGI__FN xpath_string xpath_string_const(const char_t* str)
- {
- return xpath_string(str, false);
- }
-PUGI__NS_END
-
-PUGI__NS_BEGIN
- PUGI__FN bool starts_with(const char_t* string, const char_t* pattern)
- {
- while (*pattern && *string == *pattern)
- {
- string++;
- pattern++;
- }
-
- return *pattern == 0;
- }
-
- PUGI__FN const char_t* find_char(const char_t* s, char_t c)
- {
- #ifdef PUGIXML_WCHAR_MODE
- return wcschr(s, c);
- #else
- return strchr(s, c);
- #endif
- }
-
- PUGI__FN const char_t* find_substring(const char_t* s, const char_t* p)
- {
- #ifdef PUGIXML_WCHAR_MODE
- // MSVC6 wcsstr bug workaround (if s is empty it always returns 0)
- return (*p == 0) ? s : wcsstr(s, p);
- #else
- return strstr(s, p);
- #endif
- }
-
- // Converts symbol to lower case, if it is an ASCII one
- PUGI__FN char_t tolower_ascii(char_t ch)
- {
- return static_cast<unsigned int>(ch - 'A') < 26 ? static_cast<char_t>(ch | ' ') : ch;
- }
-
- PUGI__FN xpath_string string_value(const xpath_node& na, xpath_allocator* alloc)
- {
- if (na.attribute())
- return xpath_string_const(na.attribute().value());
- else
- {
- const xml_node& n = na.node();
-
- switch (n.type())
- {
- case node_pcdata:
- case node_cdata:
- case node_comment:
- case node_pi:
- return xpath_string_const(n.value());
-
- case node_document:
- case node_element:
- {
- xpath_string result;
-
- xml_node cur = n.first_child();
-
- while (cur && cur != n)
- {
- if (cur.type() == node_pcdata || cur.type() == node_cdata)
- result.append(xpath_string_const(cur.value()), alloc);
-
- if (cur.first_child())
- cur = cur.first_child();
- else if (cur.next_sibling())
- cur = cur.next_sibling();
- else
- {
- while (!cur.next_sibling() && cur != n)
- cur = cur.parent();
-
- if (cur != n) cur = cur.next_sibling();
- }
- }
-
- return result;
- }
-
- default:
- return xpath_string();
- }
- }
- }
-
- PUGI__FN unsigned int node_height(xml_node n)
- {
- unsigned int result = 0;
-
- while (n)
- {
- ++result;
- n = n.parent();
- }
-
- return result;
- }
-
- PUGI__FN bool node_is_before(xml_node ln, unsigned int lh, xml_node rn, unsigned int rh)
- {
- // normalize heights
- for (unsigned int i = rh; i < lh; i++) ln = ln.parent();
- for (unsigned int j = lh; j < rh; j++) rn = rn.parent();
-
- // one node is the ancestor of the other
- if (ln == rn) return lh < rh;
-
- // find common ancestor
- while (ln.parent() != rn.parent())
- {
- ln = ln.parent();
- rn = rn.parent();
- }
-
- // there is no common ancestor (the shared parent is null), nodes are from different documents
- if (!ln.parent()) return ln < rn;
-
- // determine sibling order
- for (; ln; ln = ln.next_sibling())
- if (ln == rn)
- return true;
-
- return false;
- }
-
- PUGI__FN bool node_is_ancestor(xml_node parent, xml_node node)
- {
- while (node && node != parent) node = node.parent();
-
- return parent && node == parent;
- }
-
- PUGI__FN const void* document_order(const xpath_node& xnode)
- {
- xml_node_struct* node = xnode.node().internal_object();
-
- if (node)
- {
- if (node->name && (node->header & xml_memory_page_name_allocated_mask) == 0) return node->name;
- if (node->value && (node->header & xml_memory_page_value_allocated_mask) == 0) return node->value;
- return 0;
- }
-
- xml_attribute_struct* attr = xnode.attribute().internal_object();
-
- if (attr)
- {
- if ((attr->header & xml_memory_page_name_allocated_mask) == 0) return attr->name;
- if ((attr->header & xml_memory_page_value_allocated_mask) == 0) return attr->value;
- return 0;
- }
-
- return 0;
- }
-
- struct document_order_comparator
- {
- bool operator()(const xpath_node& lhs, const xpath_node& rhs) const
- {
- // optimized document order based check
- const void* lo = document_order(lhs);
- const void* ro = document_order(rhs);
-
- if (lo && ro) return lo < ro;
-
- // slow comparison
- xml_node ln = lhs.node(), rn = rhs.node();
-
- // compare attributes
- if (lhs.attribute() && rhs.attribute())
- {
- // shared parent
- if (lhs.parent() == rhs.parent())
- {
- // determine sibling order
- for (xml_attribute a = lhs.attribute(); a; a = a.next_attribute())
- if (a == rhs.attribute())
- return true;
-
- return false;
- }
-
- // compare attribute parents
- ln = lhs.parent();
- rn = rhs.parent();
- }
- else if (lhs.attribute())
- {
- // attributes go after the parent element
- if (lhs.parent() == rhs.node()) return false;
-
- ln = lhs.parent();
- }
- else if (rhs.attribute())
- {
- // attributes go after the parent element
- if (rhs.parent() == lhs.node()) return true;
-
- rn = rhs.parent();
- }
-
- if (ln == rn) return false;
-
- unsigned int lh = node_height(ln);
- unsigned int rh = node_height(rn);
-
- return node_is_before(ln, lh, rn, rh);
- }
- };
-
- struct duplicate_comparator
- {
- bool operator()(const xpath_node& lhs, const xpath_node& rhs) const
- {
- if (lhs.attribute()) return rhs.attribute() ? lhs.attribute() < rhs.attribute() : true;
- else return rhs.attribute() ? false : lhs.node() < rhs.node();
- }
- };
-
- PUGI__FN double gen_nan()
- {
- #if defined(__STDC_IEC_559__) || ((FLT_RADIX - 0 == 2) && (FLT_MAX_EXP - 0 == 128) && (FLT_MANT_DIG - 0 == 24))
- union { float f; uint32_t i; } u[sizeof(float) == sizeof(uint32_t) ? 1 : -1];
- u[0].i = 0x7fc00000;
- return u[0].f;
- #else
- // fallback
- const volatile double zero = 0.0;
- return zero / zero;
- #endif
- }
-
- PUGI__FN bool is_nan(double value)
- {
- #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__)
- return !!_isnan(value);
- #elif defined(fpclassify) && defined(FP_NAN)
- return fpclassify(value) == FP_NAN;
- #else
- // fallback
- const volatile double v = value;
- return v != v;
- #endif
- }
-
- PUGI__FN const char_t* convert_number_to_string_special(double value)
- {
- #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__)
- if (_finite(value)) return (value == 0) ? PUGIXML_TEXT("0") : 0;
- if (_isnan(value)) return PUGIXML_TEXT("NaN");
- return value > 0 ? PUGIXML_TEXT("Infinity") : PUGIXML_TEXT("-Infinity");
- #elif defined(fpclassify) && defined(FP_NAN) && defined(FP_INFINITE) && defined(FP_ZERO)
- switch (fpclassify(value))
- {
- case FP_NAN:
- return PUGIXML_TEXT("NaN");
-
- case FP_INFINITE:
- return value > 0 ? PUGIXML_TEXT("Infinity") : PUGIXML_TEXT("-Infinity");
-
- case FP_ZERO:
- return PUGIXML_TEXT("0");
-
- default:
- return 0;
- }
- #else
- // fallback
- const volatile double v = value;
-
- if (v == 0) return PUGIXML_TEXT("0");
- if (v != v) return PUGIXML_TEXT("NaN");
- if (v * 2 == v) return value > 0 ? PUGIXML_TEXT("Infinity") : PUGIXML_TEXT("-Infinity");
- return 0;
- #endif
- }
-
- PUGI__FN bool convert_number_to_boolean(double value)
- {
- return (value != 0 && !is_nan(value));
- }
-
- PUGI__FN void truncate_zeros(char* begin, char* end)
- {
- while (begin != end && end[-1] == '0') end--;
-
- *end = 0;
- }
-
- // gets mantissa digits in the form of 0.xxxxx with 0. implied and the exponent
-#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)
- PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent)
- {
- // get base values
- int sign, exponent;
- _ecvt_s(buffer, buffer_size, value, DBL_DIG + 1, &exponent, &sign);
-
- // truncate redundant zeros
- truncate_zeros(buffer, buffer + strlen(buffer));
-
- // fill results
- *out_mantissa = buffer;
- *out_exponent = exponent;
- }
-#else
- PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent)
- {
- // get a scientific notation value with IEEE DBL_DIG decimals
- sprintf(buffer, "%.*e", DBL_DIG, value);
- assert(strlen(buffer) < buffer_size);
- (void)!buffer_size;
-
- // get the exponent (possibly negative)
- char* exponent_string = strchr(buffer, 'e');
- assert(exponent_string);
-
- int exponent = atoi(exponent_string + 1);
-
- // extract mantissa string: skip sign
- char* mantissa = buffer[0] == '-' ? buffer + 1 : buffer;
- assert(mantissa[0] != '0' && mantissa[1] == '.');
-
- // divide mantissa by 10 to eliminate integer part
- mantissa[1] = mantissa[0];
- mantissa++;
- exponent++;
-
- // remove extra mantissa digits and zero-terminate mantissa
- truncate_zeros(mantissa, exponent_string);
-
- // fill results
- *out_mantissa = mantissa;
- *out_exponent = exponent;
- }
-#endif
-
- PUGI__FN xpath_string convert_number_to_string(double value, xpath_allocator* alloc)
- {
- // try special number conversion
- const char_t* special = convert_number_to_string_special(value);
- if (special) return xpath_string_const(special);
-
- // get mantissa + exponent form
- char mantissa_buffer[64];
-
- char* mantissa;
- int exponent;
- convert_number_to_mantissa_exponent(value, mantissa_buffer, sizeof(mantissa_buffer), &mantissa, &exponent);
-
- // make the number!
- char_t result[512];
- char_t* s = result;
-
- // sign
- if (value < 0) *s++ = '-';
-
- // integer part
- if (exponent <= 0)
- {
- *s++ = '0';
- }
- else
- {
- while (exponent > 0)
- {
- assert(*mantissa == 0 || static_cast<unsigned int>(*mantissa - '0') <= 9);
- *s++ = *mantissa ? *mantissa++ : '0';
- exponent--;
- }
- }
-
- // fractional part
- if (*mantissa)
- {
- // decimal point
- *s++ = '.';
-
- // extra zeroes from negative exponent
- while (exponent < 0)
- {
- *s++ = '0';
- exponent++;
- }
-
- // extra mantissa digits
- while (*mantissa)
- {
- assert(static_cast<unsigned int>(*mantissa - '0') <= 9);
- *s++ = *mantissa++;
- }
- }
-
- // zero-terminate
- assert(s < result + sizeof(result) / sizeof(result[0]));
- *s = 0;
-
- return xpath_string(result, alloc);
- }
-
- PUGI__FN bool check_string_to_number_format(const char_t* string)
- {
- // parse leading whitespace
- while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;
-
- // parse sign
- if (*string == '-') ++string;
-
- if (!*string) return false;
-
- // if there is no integer part, there should be a decimal part with at least one digit
- if (!PUGI__IS_CHARTYPEX(string[0], ctx_digit) && (string[0] != '.' || !PUGI__IS_CHARTYPEX(string[1], ctx_digit))) return false;
-
- // parse integer part
- while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;
-
- // parse decimal part
- if (*string == '.')
- {
- ++string;
-
- while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;
- }
-
- // parse trailing whitespace
- while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;
-
- return *string == 0;
- }
-
- PUGI__FN double convert_string_to_number(const char_t* string)
- {
- // check string format
- if (!check_string_to_number_format(string)) return gen_nan();
-
- // parse string
- #ifdef PUGIXML_WCHAR_MODE
- return wcstod(string, 0);
- #else
- return atof(string);
- #endif
- }
-
- PUGI__FN bool convert_string_to_number(const char_t* begin, const char_t* end, double* out_result)
- {
- char_t buffer[32];
-
- size_t length = static_cast<size_t>(end - begin);
- char_t* scratch = buffer;
-
- if (length >= sizeof(buffer) / sizeof(buffer[0]))
- {
- // need to make dummy on-heap copy
- scratch = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));
- if (!scratch) return false;
- }
-
- // copy string to zero-terminated buffer and perform conversion
- memcpy(scratch, begin, length * sizeof(char_t));
- scratch[length] = 0;
-
- *out_result = convert_string_to_number(scratch);
-
- // free dummy buffer
- if (scratch != buffer) xml_memory::deallocate(scratch);
-
- return true;
- }
-
- PUGI__FN double round_nearest(double value)
- {
- return floor(value + 0.5);
- }
-
- PUGI__FN double round_nearest_nzero(double value)
- {
- // same as round_nearest, but returns -0 for [-0.5, -0]
- // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0)
- return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5);
- }
-
- PUGI__FN const char_t* qualified_name(const xpath_node& node)
- {
- return node.attribute() ? node.attribute().name() : node.node().name();
- }
-
- PUGI__FN const char_t* local_name(const xpath_node& node)
- {
- const char_t* name = qualified_name(node);
- const char_t* p = find_char(name, ':');
-
- return p ? p + 1 : name;
- }
-
- struct namespace_uri_predicate
- {
- const char_t* prefix;
- size_t prefix_length;
-
- namespace_uri_predicate(const char_t* name)
- {
- const char_t* pos = find_char(name, ':');
-
- prefix = pos ? name : 0;
- prefix_length = pos ? static_cast<size_t>(pos - name) : 0;
- }
-
- bool operator()(const xml_attribute& a) const
- {
- const char_t* name = a.name();
-
- if (!starts_with(name, PUGIXML_TEXT("xmlns"))) return false;
-
- return prefix ? name[5] == ':' && strequalrange(name + 6, prefix, prefix_length) : name[5] == 0;
- }
- };
-
- PUGI__FN const char_t* namespace_uri(const xml_node& node)
- {
- namespace_uri_predicate pred = node.name();
-
- xml_node p = node;
-
- while (p)
- {
- xml_attribute a = p.find_attribute(pred);
-
- if (a) return a.value();
-
- p = p.parent();
- }
-
- return PUGIXML_TEXT("");
- }
-
- PUGI__FN const char_t* namespace_uri(const xml_attribute& attr, const xml_node& parent)
- {
- namespace_uri_predicate pred = attr.name();
-
- // Default namespace does not apply to attributes
- if (!pred.prefix) return PUGIXML_TEXT("");
-
- xml_node p = parent;
-
- while (p)
- {
- xml_attribute a = p.find_attribute(pred);
-
- if (a) return a.value();
-
- p = p.parent();
- }
-
- return PUGIXML_TEXT("");
- }
-
- PUGI__FN const char_t* namespace_uri(const xpath_node& node)
- {
- return node.attribute() ? namespace_uri(node.attribute(), node.parent()) : namespace_uri(node.node());
- }
-
- PUGI__FN void normalize_space(char_t* buffer)
- {
- char_t* write = buffer;
-
- for (char_t* it = buffer; *it; )
- {
- char_t ch = *it++;
-
- if (PUGI__IS_CHARTYPE(ch, ct_space))
- {
- // replace whitespace sequence with single space
- while (PUGI__IS_CHARTYPE(*it, ct_space)) it++;
-
- // avoid leading spaces
- if (write != buffer) *write++ = ' ';
- }
- else *write++ = ch;
- }
-
- // remove trailing space
- if (write != buffer && PUGI__IS_CHARTYPE(write[-1], ct_space)) write--;
-
- // zero-terminate
- *write = 0;
- }
-
- PUGI__FN void translate(char_t* buffer, const char_t* from, const char_t* to)
- {
- size_t to_length = strlength(to);
-
- char_t* write = buffer;
-
- while (*buffer)
- {
- PUGI__DMC_VOLATILE char_t ch = *buffer++;
-
- const char_t* pos = find_char(from, ch);
-
- if (!pos)
- *write++ = ch; // do not process
- else if (static_cast<size_t>(pos - from) < to_length)
- *write++ = to[pos - from]; // replace
- }
-
- // zero-terminate
- *write = 0;
- }
-
- struct xpath_variable_boolean: xpath_variable
- {
- xpath_variable_boolean(): value(false)
- {
- }
-
- bool value;
- char_t name[1];
- };
-
- struct xpath_variable_number: xpath_variable
- {
- xpath_variable_number(): value(0)
- {
- }
-
- double value;
- char_t name[1];
- };
-
- struct xpath_variable_string: xpath_variable
- {
- xpath_variable_string(): value(0)
- {
- }
-
- ~xpath_variable_string()
- {
- if (value) xml_memory::deallocate(value);
- }
-
- char_t* value;
- char_t name[1];
- };
-
- struct xpath_variable_node_set: xpath_variable
- {
- xpath_node_set value;
- char_t name[1];
- };
-
- static const xpath_node_set dummy_node_set;
-
- PUGI__FN unsigned int hash_string(const char_t* str)
- {
- // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time)
- unsigned int result = 0;
-
- while (*str)
- {
- result += static_cast<unsigned int>(*str++);
- result += result << 10;
- result ^= result >> 6;
- }
-
- result += result << 3;
- result ^= result >> 11;
- result += result << 15;
-
- return result;
- }
-
- template <typename T> PUGI__FN T* new_xpath_variable(const char_t* name)
- {
- size_t length = strlength(name);
- if (length == 0) return 0; // empty variable names are invalid
-
- // $$ we can't use offsetof(T, name) because T is non-POD, so we just allocate additional length characters
- void* memory = xml_memory::allocate(sizeof(T) + length * sizeof(char_t));
- if (!memory) return 0;
-
- T* result = new (memory) T();
-
- memcpy(result->name, name, (length + 1) * sizeof(char_t));
-
- return result;
- }
-
- PUGI__FN xpath_variable* new_xpath_variable(xpath_value_type type, const char_t* name)
- {
- switch (type)
- {
- case xpath_type_node_set:
- return new_xpath_variable<xpath_variable_node_set>(name);
-
- case xpath_type_number:
- return new_xpath_variable<xpath_variable_number>(name);
-
- case xpath_type_string:
- return new_xpath_variable<xpath_variable_string>(name);
-
- case xpath_type_boolean:
- return new_xpath_variable<xpath_variable_boolean>(name);
-
- default:
- return 0;
- }
- }
-
- template <typename T> PUGI__FN void delete_xpath_variable(T* var)
- {
- var->~T();
- xml_memory::deallocate(var);
- }
-
- PUGI__FN void delete_xpath_variable(xpath_value_type type, xpath_variable* var)
- {
- switch (type)
- {
- case xpath_type_node_set:
- delete_xpath_variable(static_cast<xpath_variable_node_set*>(var));
- break;
-
- case xpath_type_number:
- delete_xpath_variable(static_cast<xpath_variable_number*>(var));
- break;
-
- case xpath_type_string:
- delete_xpath_variable(static_cast<xpath_variable_string*>(var));
- break;
-
- case xpath_type_boolean:
- delete_xpath_variable(static_cast<xpath_variable_boolean*>(var));
- break;
-
- default:
- assert(!"Invalid variable type");
- }
- }
-
- PUGI__FN xpath_variable* get_variable(xpath_variable_set* set, const char_t* begin, const char_t* end)
- {
- char_t buffer[32];
-
- size_t length = static_cast<size_t>(end - begin);
- char_t* scratch = buffer;
-
- if (length >= sizeof(buffer) / sizeof(buffer[0]))
- {
- // need to make dummy on-heap copy
- scratch = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));
- if (!scratch) return 0;
- }
-
- // copy string to zero-terminated buffer and perform lookup
- memcpy(scratch, begin, length * sizeof(char_t));
- scratch[length] = 0;
-
- xpath_variable* result = set->get(scratch);
-
- // free dummy buffer
- if (scratch != buffer) xml_memory::deallocate(scratch);
-
- return result;
- }
-PUGI__NS_END
-
-// Internal node set class
-PUGI__NS_BEGIN
- PUGI__FN xpath_node_set::type_t xpath_sort(xpath_node* begin, xpath_node* end, xpath_node_set::type_t type, bool rev)
- {
- xpath_node_set::type_t order = rev ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted;
-
- if (type == xpath_node_set::type_unsorted)
- {
- sort(begin, end, document_order_comparator());
-
- type = xpath_node_set::type_sorted;
- }
-
- if (type != order) reverse(begin, end);
-
- return order;
- }
-
- PUGI__FN xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type)
- {
- if (begin == end) return xpath_node();
-
- switch (type)
- {
- case xpath_node_set::type_sorted:
- return *begin;
-
- case xpath_node_set::type_sorted_reverse:
- return *(end - 1);
-
- case xpath_node_set::type_unsorted:
- return *min_element(begin, end, document_order_comparator());
-
- default:
- assert(!"Invalid node set type");
- return xpath_node();
- }
- }
-
- class xpath_node_set_raw
- {
- xpath_node_set::type_t _type;
-
- xpath_node* _begin;
- xpath_node* _end;
- xpath_node* _eos;
-
- public:
- xpath_node_set_raw(): _type(xpath_node_set::type_unsorted), _begin(0), _end(0), _eos(0)
- {
- }
-
- xpath_node* begin() const
- {
- return _begin;
- }
-
- xpath_node* end() const
- {
- return _end;
- }
-
- bool empty() const
- {
- return _begin == _end;
- }
-
- size_t size() const
- {
- return static_cast<size_t>(_end - _begin);
- }
-
- xpath_node first() const
- {
- return xpath_first(_begin, _end, _type);
- }
-
- void push_back(const xpath_node& node, xpath_allocator* alloc)
- {
- if (_end == _eos)
- {
- size_t capacity = static_cast<size_t>(_eos - _begin);
-
- // get new capacity (1.5x rule)
- size_t new_capacity = capacity + capacity / 2 + 1;
-
- // reallocate the old array or allocate a new one
- xpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), new_capacity * sizeof(xpath_node)));
- assert(data);
-
- // finalize
- _begin = data;
- _end = data + capacity;
- _eos = data + new_capacity;
- }
-
- *_end++ = node;
- }
-
- void append(const xpath_node* begin_, const xpath_node* end_, xpath_allocator* alloc)
- {
- size_t size_ = static_cast<size_t>(_end - _begin);
- size_t capacity = static_cast<size_t>(_eos - _begin);
- size_t count = static_cast<size_t>(end_ - begin_);
-
- if (size_ + count > capacity)
- {
- // reallocate the old array or allocate a new one
- xpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), (size_ + count) * sizeof(xpath_node)));
- assert(data);
-
- // finalize
- _begin = data;
- _end = data + size_;
- _eos = data + size_ + count;
- }
-
- memcpy(_end, begin_, count * sizeof(xpath_node));
- _end += count;
- }
-
- void sort_do()
- {
- _type = xpath_sort(_begin, _end, _type, false);
- }
-
- void truncate(xpath_node* pos)
- {
- assert(_begin <= pos && pos <= _end);
-
- _end = pos;
- }
-
- void remove_duplicates()
- {
- if (_type == xpath_node_set::type_unsorted)
- sort(_begin, _end, duplicate_comparator());
-
- _end = unique(_begin, _end);
- }
-
- xpath_node_set::type_t type() const
- {
- return _type;
- }
-
- void set_type(xpath_node_set::type_t value)
- {
- _type = value;
- }
- };
-PUGI__NS_END
-
-PUGI__NS_BEGIN
- struct xpath_context
- {
- xpath_node n;
- size_t position, size;
-
- xpath_context(const xpath_node& n_, size_t position_, size_t size_): n(n_), position(position_), size(size_)
- {
- }
- };
-
- enum lexeme_t
- {
- lex_none = 0,
- lex_equal,
- lex_not_equal,
- lex_less,
- lex_greater,
- lex_less_or_equal,
- lex_greater_or_equal,
- lex_plus,
- lex_minus,
- lex_multiply,
- lex_union,
- lex_var_ref,
- lex_open_brace,
- lex_close_brace,
- lex_quoted_string,
- lex_number,
- lex_slash,
- lex_double_slash,
- lex_open_square_brace,
- lex_close_square_brace,
- lex_string,
- lex_comma,
- lex_axis_attribute,
- lex_dot,
- lex_double_dot,
- lex_double_colon,
- lex_eof
- };
-
- struct xpath_lexer_string
- {
- const char_t* begin;
- const char_t* end;
-
- xpath_lexer_string(): begin(0), end(0)
- {
- }
-
- bool operator==(const char_t* other) const
- {
- size_t length = static_cast<size_t>(end - begin);
-
- return strequalrange(other, begin, length);
- }
- };
-
- class xpath_lexer
- {
- const char_t* _cur;
- const char_t* _cur_lexeme_pos;
- xpath_lexer_string _cur_lexeme_contents;
-
- lexeme_t _cur_lexeme;
-
- public:
- explicit xpath_lexer(const char_t* query): _cur(query)
- {
- next();
- }
-
- const char_t* state() const
- {
- return _cur;
- }
-
- void next()
- {
- const char_t* cur = _cur;
-
- while (PUGI__IS_CHARTYPE(*cur, ct_space)) ++cur;
-
- // save lexeme position for error reporting
- _cur_lexeme_pos = cur;
-
- switch (*cur)
- {
- case 0:
- _cur_lexeme = lex_eof;
- break;
-
- case '>':
- if (*(cur+1) == '=')
- {
- cur += 2;
- _cur_lexeme = lex_greater_or_equal;
- }
- else
- {
- cur += 1;
- _cur_lexeme = lex_greater;
- }
- break;
-
- case '<':
- if (*(cur+1) == '=')
- {
- cur += 2;
- _cur_lexeme = lex_less_or_equal;
- }
- else
- {
- cur += 1;
- _cur_lexeme = lex_less;
- }
- break;
-
- case '!':
- if (*(cur+1) == '=')
- {
- cur += 2;
- _cur_lexeme = lex_not_equal;
- }
- else
- {
- _cur_lexeme = lex_none;
- }
- break;
-
- case '=':
- cur += 1;
- _cur_lexeme = lex_equal;
-
- break;
-
- case '+':
- cur += 1;
- _cur_lexeme = lex_plus;
-
- break;
-
- case '-':
- cur += 1;
- _cur_lexeme = lex_minus;
-
- break;
-
- case '*':
- cur += 1;
- _cur_lexeme = lex_multiply;
-
- break;
-
- case '|':
- cur += 1;
- _cur_lexeme = lex_union;
-
- break;
-
- case '$':
- cur += 1;
-
- if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol))
- {
- _cur_lexeme_contents.begin = cur;
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;
-
- if (cur[0] == ':' && PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // qname
- {
- cur++; // :
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;
- }
-
- _cur_lexeme_contents.end = cur;
-
- _cur_lexeme = lex_var_ref;
- }
- else
- {
- _cur_lexeme = lex_none;
- }
-
- break;
-
- case '(':
- cur += 1;
- _cur_lexeme = lex_open_brace;
-
- break;
-
- case ')':
- cur += 1;
- _cur_lexeme = lex_close_brace;
-
- break;
-
- case '[':
- cur += 1;
- _cur_lexeme = lex_open_square_brace;
-
- break;
-
- case ']':
- cur += 1;
- _cur_lexeme = lex_close_square_brace;
-
- break;
-
- case ',':
- cur += 1;
- _cur_lexeme = lex_comma;
-
- break;
-
- case '/':
- if (*(cur+1) == '/')
- {
- cur += 2;
- _cur_lexeme = lex_double_slash;
- }
- else
- {
- cur += 1;
- _cur_lexeme = lex_slash;
- }
- break;
-
- case '.':
- if (*(cur+1) == '.')
- {
- cur += 2;
- _cur_lexeme = lex_double_dot;
- }
- else if (PUGI__IS_CHARTYPEX(*(cur+1), ctx_digit))
- {
- _cur_lexeme_contents.begin = cur; // .
-
- ++cur;
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;
-
- _cur_lexeme_contents.end = cur;
-
- _cur_lexeme = lex_number;
- }
- else
- {
- cur += 1;
- _cur_lexeme = lex_dot;
- }
- break;
-
- case '@':
- cur += 1;
- _cur_lexeme = lex_axis_attribute;
-
- break;
-
- case '"':
- case '\'':
- {
- char_t terminator = *cur;
-
- ++cur;
-
- _cur_lexeme_contents.begin = cur;
- while (*cur && *cur != terminator) cur++;
- _cur_lexeme_contents.end = cur;
-
- if (!*cur)
- _cur_lexeme = lex_none;
- else
- {
- cur += 1;
- _cur_lexeme = lex_quoted_string;
- }
-
- break;
- }
-
- case ':':
- if (*(cur+1) == ':')
- {
- cur += 2;
- _cur_lexeme = lex_double_colon;
- }
- else
- {
- _cur_lexeme = lex_none;
- }
- break;
-
- default:
- if (PUGI__IS_CHARTYPEX(*cur, ctx_digit))
- {
- _cur_lexeme_contents.begin = cur;
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;
-
- if (*cur == '.')
- {
- cur++;
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++;
- }
-
- _cur_lexeme_contents.end = cur;
-
- _cur_lexeme = lex_number;
- }
- else if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol))
- {
- _cur_lexeme_contents.begin = cur;
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;
-
- if (cur[0] == ':')
- {
- if (cur[1] == '*') // namespace test ncname:*
- {
- cur += 2; // :*
- }
- else if (PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // namespace test qname
- {
- cur++; // :
-
- while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++;
- }
- }
-
- _cur_lexeme_contents.end = cur;
-
- _cur_lexeme = lex_string;
- }
- else
- {
- _cur_lexeme = lex_none;
- }
- }
-
- _cur = cur;
- }
-
- lexeme_t current() const
- {
- return _cur_lexeme;
- }
-
- const char_t* current_pos() const
- {
- return _cur_lexeme_pos;
- }
-
- const xpath_lexer_string& contents() const
- {
- assert(_cur_lexeme == lex_var_ref || _cur_lexeme == lex_number || _cur_lexeme == lex_string || _cur_lexeme == lex_quoted_string);
-
- return _cur_lexeme_contents;
- }
- };
-
- enum ast_type_t
- {
- ast_op_or, // left or right
- ast_op_and, // left and right
- ast_op_equal, // left = right
- ast_op_not_equal, // left != right
- ast_op_less, // left < right
- ast_op_greater, // left > right
- ast_op_less_or_equal, // left <= right
- ast_op_greater_or_equal, // left >= right
- ast_op_add, // left + right
- ast_op_subtract, // left - right
- ast_op_multiply, // left * right
- ast_op_divide, // left / right
- ast_op_mod, // left % right
- ast_op_negate, // left - right
- ast_op_union, // left | right
- ast_predicate, // apply predicate to set; next points to next predicate
- ast_filter, // select * from left where right
- ast_filter_posinv, // select * from left where right; proximity position invariant
- ast_string_constant, // string constant
- ast_number_constant, // number constant
- ast_variable, // variable
- ast_func_last, // last()
- ast_func_position, // position()
- ast_func_count, // count(left)
- ast_func_id, // id(left)
- ast_func_local_name_0, // local-name()
- ast_func_local_name_1, // local-name(left)
- ast_func_namespace_uri_0, // namespace-uri()
- ast_func_namespace_uri_1, // namespace-uri(left)
- ast_func_name_0, // name()
- ast_func_name_1, // name(left)
- ast_func_string_0, // string()
- ast_func_string_1, // string(left)
- ast_func_concat, // concat(left, right, siblings)
- ast_func_starts_with, // starts_with(left, right)
- ast_func_contains, // contains(left, right)
- ast_func_substring_before, // substring-before(left, right)
- ast_func_substring_after, // substring-after(left, right)
- ast_func_substring_2, // substring(left, right)
- ast_func_substring_3, // substring(left, right, third)
- ast_func_string_length_0, // string-length()
- ast_func_string_length_1, // string-length(left)
- ast_func_normalize_space_0, // normalize-space()
- ast_func_normalize_space_1, // normalize-space(left)
- ast_func_translate, // translate(left, right, third)
- ast_func_boolean, // boolean(left)
- ast_func_not, // not(left)
- ast_func_true, // true()
- ast_func_false, // false()
- ast_func_lang, // lang(left)
- ast_func_number_0, // number()
- ast_func_number_1, // number(left)
- ast_func_sum, // sum(left)
- ast_func_floor, // floor(left)
- ast_func_ceiling, // ceiling(left)
- ast_func_round, // round(left)
- ast_step, // process set left with step
- ast_step_root // select root node
- };
-
- enum axis_t
- {
- axis_ancestor,
- axis_ancestor_or_self,
- axis_attribute,
- axis_child,
- axis_descendant,
- axis_descendant_or_self,
- axis_following,
- axis_following_sibling,
- axis_namespace,
- axis_parent,
- axis_preceding,
- axis_preceding_sibling,
- axis_self
- };
-
- enum nodetest_t
- {
- nodetest_none,
- nodetest_name,
- nodetest_type_node,
- nodetest_type_comment,
- nodetest_type_pi,
- nodetest_type_text,
- nodetest_pi,
- nodetest_all,
- nodetest_all_in_namespace
- };
-
- template <axis_t N> struct axis_to_type
- {
- static const axis_t axis;
- };
-
- template <axis_t N> const axis_t axis_to_type<N>::axis = N;
-
- class xpath_ast_node
- {
- private:
- // node type
- char _type;
- char _rettype;
-
- // for ast_step / ast_predicate
- char _axis;
- char _test;
-
- // tree node structure
- xpath_ast_node* _left;
- xpath_ast_node* _right;
- xpath_ast_node* _next;
-
- union
- {
- // value for ast_string_constant
- const char_t* string;
- // value for ast_number_constant
- double number;
- // variable for ast_variable
- xpath_variable* variable;
- // node test for ast_step (node name/namespace/node type/pi target)
- const char_t* nodetest;
- } _data;
-
- xpath_ast_node(const xpath_ast_node&);
- xpath_ast_node& operator=(const xpath_ast_node&);
-
- template <class Comp> static bool compare_eq(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp)
- {
- xpath_value_type lt = lhs->rettype(), rt = rhs->rettype();
-
- if (lt != xpath_type_node_set && rt != xpath_type_node_set)
- {
- if (lt == xpath_type_boolean || rt == xpath_type_boolean)
- return comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack));
- else if (lt == xpath_type_number || rt == xpath_type_number)
- return comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack));
- else if (lt == xpath_type_string || rt == xpath_type_string)
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_string ls = lhs->eval_string(c, stack);
- xpath_string rs = rhs->eval_string(c, stack);
-
- return comp(ls, rs);
- }
- }
- else if (lt == xpath_type_node_set && rt == xpath_type_node_set)
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_node_set_raw ls = lhs->eval_node_set(c, stack);
- xpath_node_set_raw rs = rhs->eval_node_set(c, stack);
-
- for (const xpath_node* li = ls.begin(); li != ls.end(); ++li)
- for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)
- {
- xpath_allocator_capture cri(stack.result);
-
- if (comp(string_value(*li, stack.result), string_value(*ri, stack.result)))
- return true;
- }
-
- return false;
- }
- else
- {
- if (lt == xpath_type_node_set)
- {
- swap(lhs, rhs);
- swap(lt, rt);
- }
-
- if (lt == xpath_type_boolean)
- return comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack));
- else if (lt == xpath_type_number)
- {
- xpath_allocator_capture cr(stack.result);
-
- double l = lhs->eval_number(c, stack);
- xpath_node_set_raw rs = rhs->eval_node_set(c, stack);
-
- for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)
- {
- xpath_allocator_capture cri(stack.result);
-
- if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))
- return true;
- }
-
- return false;
- }
- else if (lt == xpath_type_string)
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_string l = lhs->eval_string(c, stack);
- xpath_node_set_raw rs = rhs->eval_node_set(c, stack);
-
- for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)
- {
- xpath_allocator_capture cri(stack.result);
-
- if (comp(l, string_value(*ri, stack.result)))
- return true;
- }
-
- return false;
- }
- }
-
- assert(!"Wrong types");
- return false;
- }
-
- template <class Comp> static bool compare_rel(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp)
- {
- xpath_value_type lt = lhs->rettype(), rt = rhs->rettype();
-
- if (lt != xpath_type_node_set && rt != xpath_type_node_set)
- return comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack));
- else if (lt == xpath_type_node_set && rt == xpath_type_node_set)
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_node_set_raw ls = lhs->eval_node_set(c, stack);
- xpath_node_set_raw rs = rhs->eval_node_set(c, stack);
-
- for (const xpath_node* li = ls.begin(); li != ls.end(); ++li)
- {
- xpath_allocator_capture cri(stack.result);
-
- double l = convert_string_to_number(string_value(*li, stack.result).c_str());
-
- for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)
- {
- xpath_allocator_capture crii(stack.result);
-
- if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))
- return true;
- }
- }
-
- return false;
- }
- else if (lt != xpath_type_node_set && rt == xpath_type_node_set)
- {
- xpath_allocator_capture cr(stack.result);
-
- double l = lhs->eval_number(c, stack);
- xpath_node_set_raw rs = rhs->eval_node_set(c, stack);
-
- for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri)
- {
- xpath_allocator_capture cri(stack.result);
-
- if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str())))
- return true;
- }
-
- return false;
- }
- else if (lt == xpath_type_node_set && rt != xpath_type_node_set)
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_node_set_raw ls = lhs->eval_node_set(c, stack);
- double r = rhs->eval_number(c, stack);
-
- for (const xpath_node* li = ls.begin(); li != ls.end(); ++li)
- {
- xpath_allocator_capture cri(stack.result);
-
- if (comp(convert_string_to_number(string_value(*li, stack.result).c_str()), r))
- return true;
- }
-
- return false;
- }
- else
- {
- assert(!"Wrong types");
- return false;
- }
- }
-
- void apply_predicate(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack)
- {
- assert(ns.size() >= first);
-
- size_t i = 1;
- size_t size = ns.size() - first;
-
- xpath_node* last = ns.begin() + first;
-
- // remove_if... or well, sort of
- for (xpath_node* it = last; it != ns.end(); ++it, ++i)
- {
- xpath_context c(*it, i, size);
-
- if (expr->rettype() == xpath_type_number)
- {
- if (expr->eval_number(c, stack) == i)
- *last++ = *it;
- }
- else if (expr->eval_boolean(c, stack))
- *last++ = *it;
- }
-
- ns.truncate(last);
- }
-
- void apply_predicates(xpath_node_set_raw& ns, size_t first, const xpath_stack& stack)
- {
- if (ns.size() == first) return;
-
- for (xpath_ast_node* pred = _right; pred; pred = pred->_next)
- {
- apply_predicate(ns, first, pred->_left, stack);
- }
- }
-
- void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc)
- {
- if (!a) return;
-
- const char_t* name = a.name();
-
- // There are no attribute nodes corresponding to attributes that declare namespaces
- // That is, "xmlns:..." or "xmlns"
- if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':')) return;
-
- switch (_test)
- {
- case nodetest_name:
- if (strequal(name, _data.nodetest)) ns.push_back(xpath_node(a, parent), alloc);
- break;
-
- case nodetest_type_node:
- case nodetest_all:
- ns.push_back(xpath_node(a, parent), alloc);
- break;
-
- case nodetest_all_in_namespace:
- if (starts_with(name, _data.nodetest))
- ns.push_back(xpath_node(a, parent), alloc);
- break;
-
- default:
- ;
- }
- }
-
- void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc)
- {
- if (!n) return;
-
- switch (_test)
- {
- case nodetest_name:
- if (n.type() == node_element && strequal(n.name(), _data.nodetest)) ns.push_back(n, alloc);
- break;
-
- case nodetest_type_node:
- ns.push_back(n, alloc);
- break;
-
- case nodetest_type_comment:
- if (n.type() == node_comment)
- ns.push_back(n, alloc);
- break;
-
- case nodetest_type_text:
- if (n.type() == node_pcdata || n.type() == node_cdata)
- ns.push_back(n, alloc);
- break;
-
- case nodetest_type_pi:
- if (n.type() == node_pi)
- ns.push_back(n, alloc);
- break;
-
- case nodetest_pi:
- if (n.type() == node_pi && strequal(n.name(), _data.nodetest))
- ns.push_back(n, alloc);
- break;
-
- case nodetest_all:
- if (n.type() == node_element)
- ns.push_back(n, alloc);
- break;
-
- case nodetest_all_in_namespace:
- if (n.type() == node_element && starts_with(n.name(), _data.nodetest))
- ns.push_back(n, alloc);
- break;
-
- default:
- assert(!"Unknown axis");
- }
- }
-
- template <class T> void step_fill(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc, T)
- {
- const axis_t axis = T::axis;
-
- switch (axis)
- {
- case axis_attribute:
- {
- for (xml_attribute a = n.first_attribute(); a; a = a.next_attribute())
- step_push(ns, a, n, alloc);
-
- break;
- }
-
- case axis_child:
- {
- for (xml_node c = n.first_child(); c; c = c.next_sibling())
- step_push(ns, c, alloc);
-
- break;
- }
-
- case axis_descendant:
- case axis_descendant_or_self:
- {
- if (axis == axis_descendant_or_self)
- step_push(ns, n, alloc);
-
- xml_node cur = n.first_child();
-
- while (cur && cur != n)
- {
- step_push(ns, cur, alloc);
-
- if (cur.first_child())
- cur = cur.first_child();
- else if (cur.next_sibling())
- cur = cur.next_sibling();
- else
- {
- while (!cur.next_sibling() && cur != n)
- cur = cur.parent();
-
- if (cur != n) cur = cur.next_sibling();
- }
- }
-
- break;
- }
-
- case axis_following_sibling:
- {
- for (xml_node c = n.next_sibling(); c; c = c.next_sibling())
- step_push(ns, c, alloc);
-
- break;
- }
-
- case axis_preceding_sibling:
- {
- for (xml_node c = n.previous_sibling(); c; c = c.previous_sibling())
- step_push(ns, c, alloc);
-
- break;
- }
-
- case axis_following:
- {
- xml_node cur = n;
-
- // exit from this node so that we don't include descendants
- while (cur && !cur.next_sibling()) cur = cur.parent();
- cur = cur.next_sibling();
-
- for (;;)
- {
- step_push(ns, cur, alloc);
-
- if (cur.first_child())
- cur = cur.first_child();
- else if (cur.next_sibling())
- cur = cur.next_sibling();
- else
- {
- while (cur && !cur.next_sibling()) cur = cur.parent();
- cur = cur.next_sibling();
-
- if (!cur) break;
- }
- }
-
- break;
- }
-
- case axis_preceding:
- {
- xml_node cur = n;
-
- while (cur && !cur.previous_sibling()) cur = cur.parent();
- cur = cur.previous_sibling();
-
- for (;;)
- {
- if (cur.last_child())
- cur = cur.last_child();
- else
- {
- // leaf node, can't be ancestor
- step_push(ns, cur, alloc);
-
- if (cur.previous_sibling())
- cur = cur.previous_sibling();
- else
- {
- do
- {
- cur = cur.parent();
- if (!cur) break;
-
- if (!node_is_ancestor(cur, n)) step_push(ns, cur, alloc);
- }
- while (!cur.previous_sibling());
-
- cur = cur.previous_sibling();
-
- if (!cur) break;
- }
- }
- }
-
- break;
- }
-
- case axis_ancestor:
- case axis_ancestor_or_self:
- {
- if (axis == axis_ancestor_or_self)
- step_push(ns, n, alloc);
-
- xml_node cur = n.parent();
-
- while (cur)
- {
- step_push(ns, cur, alloc);
-
- cur = cur.parent();
- }
-
- break;
- }
-
- case axis_self:
- {
- step_push(ns, n, alloc);
-
- break;
- }
-
- case axis_parent:
- {
- if (n.parent()) step_push(ns, n.parent(), alloc);
-
- break;
- }
-
- default:
- assert(!"Unimplemented axis");
- }
- }
-
- template <class T> void step_fill(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& p, xpath_allocator* alloc, T v)
- {
- const axis_t axis = T::axis;
-
- switch (axis)
- {
- case axis_ancestor:
- case axis_ancestor_or_self:
- {
- if (axis == axis_ancestor_or_self && _test == nodetest_type_node) // reject attributes based on principal node type test
- step_push(ns, a, p, alloc);
-
- xml_node cur = p;
-
- while (cur)
- {
- step_push(ns, cur, alloc);
-
- cur = cur.parent();
- }
-
- break;
- }
-
- case axis_descendant_or_self:
- case axis_self:
- {
- if (_test == nodetest_type_node) // reject attributes based on principal node type test
- step_push(ns, a, p, alloc);
-
- break;
- }
-
- case axis_following:
- {
- xml_node cur = p;
-
- for (;;)
- {
- if (cur.first_child())
- cur = cur.first_child();
- else if (cur.next_sibling())
- cur = cur.next_sibling();
- else
- {
- while (cur && !cur.next_sibling()) cur = cur.parent();
- cur = cur.next_sibling();
-
- if (!cur) break;
- }
-
- step_push(ns, cur, alloc);
- }
-
- break;
- }
-
- case axis_parent:
- {
- step_push(ns, p, alloc);
-
- break;
- }
-
- case axis_preceding:
- {
- // preceding:: axis does not include attribute nodes and attribute ancestors (they are the same as parent's ancestors), so we can reuse node preceding
- step_fill(ns, p, alloc, v);
- break;
- }
-
- default:
- assert(!"Unimplemented axis");
- }
- }
-
- template <class T> xpath_node_set_raw step_do(const xpath_context& c, const xpath_stack& stack, T v)
- {
- const axis_t axis = T::axis;
- bool attributes = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_descendant_or_self || axis == axis_following || axis == axis_parent || axis == axis_preceding || axis == axis_self);
-
- xpath_node_set_raw ns;
- ns.set_type((axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_preceding || axis == axis_preceding_sibling) ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted);
-
- if (_left)
- {
- xpath_node_set_raw s = _left->eval_node_set(c, stack);
-
- // self axis preserves the original order
- if (axis == axis_self) ns.set_type(s.type());
-
- for (const xpath_node* it = s.begin(); it != s.end(); ++it)
- {
- size_t size = ns.size();
-
- // in general, all axes generate elements in a particular order, but there is no order guarantee if axis is applied to two nodes
- if (axis != axis_self && size != 0) ns.set_type(xpath_node_set::type_unsorted);
-
- if (it->node())
- step_fill(ns, it->node(), stack.result, v);
- else if (attributes)
- step_fill(ns, it->attribute(), it->parent(), stack.result, v);
-
- apply_predicates(ns, size, stack);
- }
- }
- else
- {
- if (c.n.node())
- step_fill(ns, c.n.node(), stack.result, v);
- else if (attributes)
- step_fill(ns, c.n.attribute(), c.n.parent(), stack.result, v);
-
- apply_predicates(ns, 0, stack);
- }
-
- // child, attribute and self axes always generate unique set of nodes
- // for other axis, if the set stayed sorted, it stayed unique because the traversal algorithms do not visit the same node twice
- if (axis != axis_child && axis != axis_attribute && axis != axis_self && ns.type() == xpath_node_set::type_unsorted)
- ns.remove_duplicates();
-
- return ns;
- }
-
- public:
- xpath_ast_node(ast_type_t type, xpath_value_type rettype_, const char_t* value):
- _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)
- {
- assert(type == ast_string_constant);
- _data.string = value;
- }
-
- xpath_ast_node(ast_type_t type, xpath_value_type rettype_, double value):
- _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)
- {
- assert(type == ast_number_constant);
- _data.number = value;
- }
-
- xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_variable* value):
- _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0)
- {
- assert(type == ast_variable);
- _data.variable = value;
- }
-
- xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_ast_node* left = 0, xpath_ast_node* right = 0):
- _type(static_cast<char>(type)), _rettype(static_cast<char>(rettype_)), _axis(0), _test(0), _left(left), _right(right), _next(0)
- {
- }
-
- xpath_ast_node(ast_type_t type, xpath_ast_node* left, axis_t axis, nodetest_t test, const char_t* contents):
- _type(static_cast<char>(type)), _rettype(xpath_type_node_set), _axis(static_cast<char>(axis)), _test(static_cast<char>(test)), _left(left), _right(0), _next(0)
- {
- _data.nodetest = contents;
- }
-
- void set_next(xpath_ast_node* value)
- {
- _next = value;
- }
-
- void set_right(xpath_ast_node* value)
- {
- _right = value;
- }
-
- bool eval_boolean(const xpath_context& c, const xpath_stack& stack)
- {
- switch (_type)
- {
- case ast_op_or:
- return _left->eval_boolean(c, stack) || _right->eval_boolean(c, stack);
-
- case ast_op_and:
- return _left->eval_boolean(c, stack) && _right->eval_boolean(c, stack);
-
- case ast_op_equal:
- return compare_eq(_left, _right, c, stack, equal_to());
-
- case ast_op_not_equal:
- return compare_eq(_left, _right, c, stack, not_equal_to());
-
- case ast_op_less:
- return compare_rel(_left, _right, c, stack, less());
-
- case ast_op_greater:
- return compare_rel(_right, _left, c, stack, less());
-
- case ast_op_less_or_equal:
- return compare_rel(_left, _right, c, stack, less_equal());
-
- case ast_op_greater_or_equal:
- return compare_rel(_right, _left, c, stack, less_equal());
-
- case ast_func_starts_with:
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_string lr = _left->eval_string(c, stack);
- xpath_string rr = _right->eval_string(c, stack);
-
- return starts_with(lr.c_str(), rr.c_str());
- }
-
- case ast_func_contains:
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_string lr = _left->eval_string(c, stack);
- xpath_string rr = _right->eval_string(c, stack);
-
- return find_substring(lr.c_str(), rr.c_str()) != 0;
- }
-
- case ast_func_boolean:
- return _left->eval_boolean(c, stack);
-
- case ast_func_not:
- return !_left->eval_boolean(c, stack);
-
- case ast_func_true:
- return true;
-
- case ast_func_false:
- return false;
-
- case ast_func_lang:
- {
- if (c.n.attribute()) return false;
-
- xpath_allocator_capture cr(stack.result);
-
- xpath_string lang = _left->eval_string(c, stack);
-
- for (xml_node n = c.n.node(); n; n = n.parent())
- {
- xml_attribute a = n.attribute(PUGIXML_TEXT("xml:lang"));
-
- if (a)
- {
- const char_t* value = a.value();
-
- // strnicmp / strncasecmp is not portable
- for (const char_t* lit = lang.c_str(); *lit; ++lit)
- {
- if (tolower_ascii(*lit) != tolower_ascii(*value)) return false;
- ++value;
- }
-
- return *value == 0 || *value == '-';
- }
- }
-
- return false;
- }
-
- case ast_variable:
- {
- assert(_rettype == _data.variable->type());
-
- if (_rettype == xpath_type_boolean)
- return _data.variable->get_boolean();
-
- // fallthrough to type conversion
- }
-
- default:
- {
- switch (_rettype)
- {
- case xpath_type_number:
- return convert_number_to_boolean(eval_number(c, stack));
-
- case xpath_type_string:
- {
- xpath_allocator_capture cr(stack.result);
-
- return !eval_string(c, stack).empty();
- }
-
- case xpath_type_node_set:
- {
- xpath_allocator_capture cr(stack.result);
-
- return !eval_node_set(c, stack).empty();
- }
-
- default:
- assert(!"Wrong expression for return type boolean");
- return false;
- }
- }
- }
- }
-
- double eval_number(const xpath_context& c, const xpath_stack& stack)
- {
- switch (_type)
- {
- case ast_op_add:
- return _left->eval_number(c, stack) + _right->eval_number(c, stack);
-
- case ast_op_subtract:
- return _left->eval_number(c, stack) - _right->eval_number(c, stack);
-
- case ast_op_multiply:
- return _left->eval_number(c, stack) * _right->eval_number(c, stack);
-
- case ast_op_divide:
- return _left->eval_number(c, stack) / _right->eval_number(c, stack);
-
- case ast_op_mod:
- return fmod(_left->eval_number(c, stack), _right->eval_number(c, stack));
-
- case ast_op_negate:
- return -_left->eval_number(c, stack);
-
- case ast_number_constant:
- return _data.number;
-
- case ast_func_last:
- return static_cast<double>(c.size);
-
- case ast_func_position:
- return static_cast<double>(c.position);
-
- case ast_func_count:
- {
- xpath_allocator_capture cr(stack.result);
-
- return static_cast<double>(_left->eval_node_set(c, stack).size());
- }
-
- case ast_func_string_length_0:
- {
- xpath_allocator_capture cr(stack.result);
-
- return static_cast<double>(string_value(c.n, stack.result).length());
- }
-
- case ast_func_string_length_1:
- {
- xpath_allocator_capture cr(stack.result);
-
- return static_cast<double>(_left->eval_string(c, stack).length());
- }
-
- case ast_func_number_0:
- {
- xpath_allocator_capture cr(stack.result);
-
- return convert_string_to_number(string_value(c.n, stack.result).c_str());
- }
-
- case ast_func_number_1:
- return _left->eval_number(c, stack);
-
- case ast_func_sum:
- {
- xpath_allocator_capture cr(stack.result);
-
- double r = 0;
-
- xpath_node_set_raw ns = _left->eval_node_set(c, stack);
-
- for (const xpath_node* it = ns.begin(); it != ns.end(); ++it)
- {
- xpath_allocator_capture cri(stack.result);
-
- r += convert_string_to_number(string_value(*it, stack.result).c_str());
- }
-
- return r;
- }
-
- case ast_func_floor:
- {
- double r = _left->eval_number(c, stack);
-
- return r == r ? floor(r) : r;
- }
-
- case ast_func_ceiling:
- {
- double r = _left->eval_number(c, stack);
-
- return r == r ? ceil(r) : r;
- }
-
- case ast_func_round:
- return round_nearest_nzero(_left->eval_number(c, stack));
-
- case ast_variable:
- {
- assert(_rettype == _data.variable->type());
-
- if (_rettype == xpath_type_number)
- return _data.variable->get_number();
-
- // fallthrough to type conversion
- }
-
- default:
- {
- switch (_rettype)
- {
- case xpath_type_boolean:
- return eval_boolean(c, stack) ? 1 : 0;
-
- case xpath_type_string:
- {
- xpath_allocator_capture cr(stack.result);
-
- return convert_string_to_number(eval_string(c, stack).c_str());
- }
-
- case xpath_type_node_set:
- {
- xpath_allocator_capture cr(stack.result);
-
- return convert_string_to_number(eval_string(c, stack).c_str());
- }
-
- default:
- assert(!"Wrong expression for return type number");
- return 0;
- }
-
- }
- }
- }
-
- xpath_string eval_string_concat(const xpath_context& c, const xpath_stack& stack)
- {
- assert(_type == ast_func_concat);
-
- xpath_allocator_capture ct(stack.temp);
-
- // count the string number
- size_t count = 1;
- for (xpath_ast_node* nc = _right; nc; nc = nc->_next) count++;
-
- // gather all strings
- xpath_string static_buffer[4];
- xpath_string* buffer = static_buffer;
-
- // allocate on-heap for large concats
- if (count > sizeof(static_buffer) / sizeof(static_buffer[0]))
- {
- buffer = static_cast<xpath_string*>(stack.temp->allocate(count * sizeof(xpath_string)));
- assert(buffer);
- }
-
- // evaluate all strings to temporary stack
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- buffer[0] = _left->eval_string(c, swapped_stack);
-
- size_t pos = 1;
- for (xpath_ast_node* n = _right; n; n = n->_next, ++pos) buffer[pos] = n->eval_string(c, swapped_stack);
- assert(pos == count);
-
- // get total length
- size_t length = 0;
- for (size_t i = 0; i < count; ++i) length += buffer[i].length();
-
- // create final string
- char_t* result = static_cast<char_t*>(stack.result->allocate((length + 1) * sizeof(char_t)));
- assert(result);
-
- char_t* ri = result;
-
- for (size_t j = 0; j < count; ++j)
- for (const char_t* bi = buffer[j].c_str(); *bi; ++bi)
- *ri++ = *bi;
-
- *ri = 0;
-
- return xpath_string(result, true);
- }
-
- xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)
- {
- switch (_type)
- {
- case ast_string_constant:
- return xpath_string_const(_data.string);
-
- case ast_func_local_name_0:
- {
- xpath_node na = c.n;
-
- return xpath_string_const(local_name(na));
- }
-
- case ast_func_local_name_1:
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_node_set_raw ns = _left->eval_node_set(c, stack);
- xpath_node na = ns.first();
-
- return xpath_string_const(local_name(na));
- }
-
- case ast_func_name_0:
- {
- xpath_node na = c.n;
-
- return xpath_string_const(qualified_name(na));
- }
-
- case ast_func_name_1:
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_node_set_raw ns = _left->eval_node_set(c, stack);
- xpath_node na = ns.first();
-
- return xpath_string_const(qualified_name(na));
- }
-
- case ast_func_namespace_uri_0:
- {
- xpath_node na = c.n;
-
- return xpath_string_const(namespace_uri(na));
- }
-
- case ast_func_namespace_uri_1:
- {
- xpath_allocator_capture cr(stack.result);
-
- xpath_node_set_raw ns = _left->eval_node_set(c, stack);
- xpath_node na = ns.first();
-
- return xpath_string_const(namespace_uri(na));
- }
-
- case ast_func_string_0:
- return string_value(c.n, stack.result);
-
- case ast_func_string_1:
- return _left->eval_string(c, stack);
-
- case ast_func_concat:
- return eval_string_concat(c, stack);
-
- case ast_func_substring_before:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_string s = _left->eval_string(c, swapped_stack);
- xpath_string p = _right->eval_string(c, swapped_stack);
-
- const char_t* pos = find_substring(s.c_str(), p.c_str());
-
- return pos ? xpath_string(s.c_str(), pos, stack.result) : xpath_string();
- }
-
- case ast_func_substring_after:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_string s = _left->eval_string(c, swapped_stack);
- xpath_string p = _right->eval_string(c, swapped_stack);
-
- const char_t* pos = find_substring(s.c_str(), p.c_str());
- if (!pos) return xpath_string();
-
- const char_t* result = pos + p.length();
-
- return s.uses_heap() ? xpath_string(result, stack.result) : xpath_string_const(result);
- }
-
- case ast_func_substring_2:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_string s = _left->eval_string(c, swapped_stack);
- size_t s_length = s.length();
-
- double first = round_nearest(_right->eval_number(c, stack));
-
- if (is_nan(first)) return xpath_string(); // NaN
- else if (first >= s_length + 1) return xpath_string();
-
- size_t pos = first < 1 ? 1 : static_cast<size_t>(first);
- assert(1 <= pos && pos <= s_length + 1);
-
- const char_t* rbegin = s.c_str() + (pos - 1);
-
- return s.uses_heap() ? xpath_string(rbegin, stack.result) : xpath_string_const(rbegin);
- }
-
- case ast_func_substring_3:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_string s = _left->eval_string(c, swapped_stack);
- size_t s_length = s.length();
-
- double first = round_nearest(_right->eval_number(c, stack));
- double last = first + round_nearest(_right->_next->eval_number(c, stack));
-
- if (is_nan(first) || is_nan(last)) return xpath_string();
- else if (first >= s_length + 1) return xpath_string();
- else if (first >= last) return xpath_string();
- else if (last < 1) return xpath_string();
-
- size_t pos = first < 1 ? 1 : static_cast<size_t>(first);
- size_t end = last >= s_length + 1 ? s_length + 1 : static_cast<size_t>(last);
-
- assert(1 <= pos && pos <= end && end <= s_length + 1);
- const char_t* rbegin = s.c_str() + (pos - 1);
- const char_t* rend = s.c_str() + (end - 1);
-
- return (end == s_length + 1 && !s.uses_heap()) ? xpath_string_const(rbegin) : xpath_string(rbegin, rend, stack.result);
- }
-
- case ast_func_normalize_space_0:
- {
- xpath_string s = string_value(c.n, stack.result);
-
- normalize_space(s.data(stack.result));
-
- return s;
- }
-
- case ast_func_normalize_space_1:
- {
- xpath_string s = _left->eval_string(c, stack);
-
- normalize_space(s.data(stack.result));
-
- return s;
- }
-
- case ast_func_translate:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_string s = _left->eval_string(c, stack);
- xpath_string from = _right->eval_string(c, swapped_stack);
- xpath_string to = _right->_next->eval_string(c, swapped_stack);
-
- translate(s.data(stack.result), from.c_str(), to.c_str());
-
- return s;
- }
-
- case ast_variable:
- {
- assert(_rettype == _data.variable->type());
-
- if (_rettype == xpath_type_string)
- return xpath_string_const(_data.variable->get_string());
-
- // fallthrough to type conversion
- }
-
- default:
- {
- switch (_rettype)
- {
- case xpath_type_boolean:
- return xpath_string_const(eval_boolean(c, stack) ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false"));
-
- case xpath_type_number:
- return convert_number_to_string(eval_number(c, stack), stack.result);
-
- case xpath_type_node_set:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_node_set_raw ns = eval_node_set(c, swapped_stack);
- return ns.empty() ? xpath_string() : string_value(ns.first(), stack.result);
- }
-
- default:
- assert(!"Wrong expression for return type string");
- return xpath_string();
- }
- }
- }
- }
-
- xpath_node_set_raw eval_node_set(const xpath_context& c, const xpath_stack& stack)
- {
- switch (_type)
- {
- case ast_op_union:
- {
- xpath_allocator_capture cr(stack.temp);
-
- xpath_stack swapped_stack = {stack.temp, stack.result};
-
- xpath_node_set_raw ls = _left->eval_node_set(c, swapped_stack);
- xpath_node_set_raw rs = _right->eval_node_set(c, stack);
-
- // we can optimize merging two sorted sets, but this is a very rare operation, so don't bother
- rs.set_type(xpath_node_set::type_unsorted);
-
- rs.append(ls.begin(), ls.end(), stack.result);
- rs.remove_duplicates();
-
- return rs;
- }
-
- case ast_filter:
- case ast_filter_posinv:
- {
- xpath_node_set_raw set = _left->eval_node_set(c, stack);
-
- // either expression is a number or it contains position() call; sort by document order
- if (_type == ast_filter) set.sort_do();
-
- apply_predicate(set, 0, _right, stack);
-
- return set;
- }
-
- case ast_func_id:
- return xpath_node_set_raw();
-
- case ast_step:
- {
- switch (_axis)
- {
- case axis_ancestor:
- return step_do(c, stack, axis_to_type<axis_ancestor>());
-
- case axis_ancestor_or_self:
- return step_do(c, stack, axis_to_type<axis_ancestor_or_self>());
-
- case axis_attribute:
- return step_do(c, stack, axis_to_type<axis_attribute>());
-
- case axis_child:
- return step_do(c, stack, axis_to_type<axis_child>());
-
- case axis_descendant:
- return step_do(c, stack, axis_to_type<axis_descendant>());
-
- case axis_descendant_or_self:
- return step_do(c, stack, axis_to_type<axis_descendant_or_self>());
-
- case axis_following:
- return step_do(c, stack, axis_to_type<axis_following>());
-
- case axis_following_sibling:
- return step_do(c, stack, axis_to_type<axis_following_sibling>());
-
- case axis_namespace:
- // namespaced axis is not supported
- return xpath_node_set_raw();
-
- case axis_parent:
- return step_do(c, stack, axis_to_type<axis_parent>());
-
- case axis_preceding:
- return step_do(c, stack, axis_to_type<axis_preceding>());
-
- case axis_preceding_sibling:
- return step_do(c, stack, axis_to_type<axis_preceding_sibling>());
-
- case axis_self:
- return step_do(c, stack, axis_to_type<axis_self>());
-
- default:
- assert(!"Unknown axis");
- return xpath_node_set_raw();
- }
- }
-
- case ast_step_root:
- {
- assert(!_right); // root step can't have any predicates
-
- xpath_node_set_raw ns;
-
- ns.set_type(xpath_node_set::type_sorted);
-
- if (c.n.node()) ns.push_back(c.n.node().root(), stack.result);
- else if (c.n.attribute()) ns.push_back(c.n.parent().root(), stack.result);
-
- return ns;
- }
-
- case ast_variable:
- {
- assert(_rettype == _data.variable->type());
-
- if (_rettype == xpath_type_node_set)
- {
- const xpath_node_set& s = _data.variable->get_node_set();
-
- xpath_node_set_raw ns;
-
- ns.set_type(s.type());
- ns.append(s.begin(), s.end(), stack.result);
-
- return ns;
- }
-
- // fallthrough to type conversion
- }
-
- default:
- assert(!"Wrong expression for return type node set");
- return xpath_node_set_raw();
- }
- }
-
- bool is_posinv()
- {
- switch (_type)
- {
- case ast_func_position:
- return false;
-
- case ast_string_constant:
- case ast_number_constant:
- case ast_variable:
- return true;
-
- case ast_step:
- case ast_step_root:
- return true;
-
- case ast_predicate:
- case ast_filter:
- case ast_filter_posinv:
- return true;
-
- default:
- if (_left && !_left->is_posinv()) return false;
-
- for (xpath_ast_node* n = _right; n; n = n->_next)
- if (!n->is_posinv()) return false;
-
- return true;
- }
- }
-
- xpath_value_type rettype() const
- {
- return static_cast<xpath_value_type>(_rettype);
- }
- };
-
- struct xpath_parser
- {
- xpath_allocator* _alloc;
- xpath_lexer _lexer;
-
- const char_t* _query;
- xpath_variable_set* _variables;
-
- xpath_parse_result* _result;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- jmp_buf _error_handler;
- #endif
-
- void throw_error(const char* message)
- {
- _result->error = message;
- _result->offset = _lexer.current_pos() - _query;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- longjmp(_error_handler, 1);
- #else
- throw xpath_exception(*_result);
- #endif
- }
-
- void throw_error_oom()
- {
- #ifdef PUGIXML_NO_EXCEPTIONS
- throw_error("Out of memory");
- #else
- throw std::bad_alloc();
- #endif
- }
-
- void* alloc_node()
- {
- void* result = _alloc->allocate_nothrow(sizeof(xpath_ast_node));
-
- if (!result) throw_error_oom();
-
- return result;
- }
-
- const char_t* alloc_string(const xpath_lexer_string& value)
- {
- if (value.begin)
- {
- size_t length = static_cast<size_t>(value.end - value.begin);
-
- char_t* c = static_cast<char_t*>(_alloc->allocate_nothrow((length + 1) * sizeof(char_t)));
- if (!c) throw_error_oom();
-
- memcpy(c, value.begin, length * sizeof(char_t));
- c[length] = 0;
-
- return c;
- }
- else return 0;
- }
-
- xpath_ast_node* parse_function_helper(ast_type_t type0, ast_type_t type1, size_t argc, xpath_ast_node* args[2])
- {
- assert(argc <= 1);
-
- if (argc == 1 && args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set");
-
- return new (alloc_node()) xpath_ast_node(argc == 0 ? type0 : type1, xpath_type_string, args[0]);
- }
-
- xpath_ast_node* parse_function(const xpath_lexer_string& name, size_t argc, xpath_ast_node* args[2])
- {
- switch (name.begin[0])
- {
- case 'b':
- if (name == PUGIXML_TEXT("boolean") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_boolean, xpath_type_boolean, args[0]);
-
- break;
-
- case 'c':
- if (name == PUGIXML_TEXT("count") && argc == 1)
- {
- if (args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set");
- return new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]);
- }
- else if (name == PUGIXML_TEXT("contains") && argc == 2)
- return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("concat") && argc >= 2)
- return new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("ceiling") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_ceiling, xpath_type_number, args[0]);
-
- break;
-
- case 'f':
- if (name == PUGIXML_TEXT("false") && argc == 0)
- return new (alloc_node()) xpath_ast_node(ast_func_false, xpath_type_boolean);
- else if (name == PUGIXML_TEXT("floor") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_floor, xpath_type_number, args[0]);
-
- break;
-
- case 'i':
- if (name == PUGIXML_TEXT("id") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_id, xpath_type_node_set, args[0]);
-
- break;
-
- case 'l':
- if (name == PUGIXML_TEXT("last") && argc == 0)
- return new (alloc_node()) xpath_ast_node(ast_func_last, xpath_type_number);
- else if (name == PUGIXML_TEXT("lang") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_lang, xpath_type_boolean, args[0]);
- else if (name == PUGIXML_TEXT("local-name") && argc <= 1)
- return parse_function_helper(ast_func_local_name_0, ast_func_local_name_1, argc, args);
-
- break;
-
- case 'n':
- if (name == PUGIXML_TEXT("name") && argc <= 1)
- return parse_function_helper(ast_func_name_0, ast_func_name_1, argc, args);
- else if (name == PUGIXML_TEXT("namespace-uri") && argc <= 1)
- return parse_function_helper(ast_func_namespace_uri_0, ast_func_namespace_uri_1, argc, args);
- else if (name == PUGIXML_TEXT("normalize-space") && argc <= 1)
- return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_normalize_space_0 : ast_func_normalize_space_1, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("not") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_not, xpath_type_boolean, args[0]);
- else if (name == PUGIXML_TEXT("number") && argc <= 1)
- return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_number_0 : ast_func_number_1, xpath_type_number, args[0]);
-
- break;
-
- case 'p':
- if (name == PUGIXML_TEXT("position") && argc == 0)
- return new (alloc_node()) xpath_ast_node(ast_func_position, xpath_type_number);
-
- break;
-
- case 'r':
- if (name == PUGIXML_TEXT("round") && argc == 1)
- return new (alloc_node()) xpath_ast_node(ast_func_round, xpath_type_number, args[0]);
-
- break;
-
- case 's':
- if (name == PUGIXML_TEXT("string") && argc <= 1)
- return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]);
- else if (name == PUGIXML_TEXT("string-length") && argc <= 1)
- return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_string, args[0]);
- else if (name == PUGIXML_TEXT("starts-with") && argc == 2)
- return new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]);
- else if (name == PUGIXML_TEXT("substring-before") && argc == 2)
- return new (alloc_node()) xpath_ast_node(ast_func_substring_before, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("substring-after") && argc == 2)
- return new (alloc_node()) xpath_ast_node(ast_func_substring_after, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("substring") && (argc == 2 || argc == 3))
- return new (alloc_node()) xpath_ast_node(argc == 2 ? ast_func_substring_2 : ast_func_substring_3, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("sum") && argc == 1)
- {
- if (args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set");
- return new (alloc_node()) xpath_ast_node(ast_func_sum, xpath_type_number, args[0]);
- }
-
- break;
-
- case 't':
- if (name == PUGIXML_TEXT("translate") && argc == 3)
- return new (alloc_node()) xpath_ast_node(ast_func_translate, xpath_type_string, args[0], args[1]);
- else if (name == PUGIXML_TEXT("true") && argc == 0)
- return new (alloc_node()) xpath_ast_node(ast_func_true, xpath_type_boolean);
-
- break;
-
- default:
- break;
- }
-
- throw_error("Unrecognized function or wrong parameter count");
-
- return 0;
- }
-
- axis_t parse_axis_name(const xpath_lexer_string& name, bool& specified)
- {
- specified = true;
-
- switch (name.begin[0])
- {
- case 'a':
- if (name == PUGIXML_TEXT("ancestor"))
- return axis_ancestor;
- else if (name == PUGIXML_TEXT("ancestor-or-self"))
- return axis_ancestor_or_self;
- else if (name == PUGIXML_TEXT("attribute"))
- return axis_attribute;
-
- break;
-
- case 'c':
- if (name == PUGIXML_TEXT("child"))
- return axis_child;
-
- break;
-
- case 'd':
- if (name == PUGIXML_TEXT("descendant"))
- return axis_descendant;
- else if (name == PUGIXML_TEXT("descendant-or-self"))
- return axis_descendant_or_self;
-
- break;
-
- case 'f':
- if (name == PUGIXML_TEXT("following"))
- return axis_following;
- else if (name == PUGIXML_TEXT("following-sibling"))
- return axis_following_sibling;
-
- break;
-
- case 'n':
- if (name == PUGIXML_TEXT("namespace"))
- return axis_namespace;
-
- break;
-
- case 'p':
- if (name == PUGIXML_TEXT("parent"))
- return axis_parent;
- else if (name == PUGIXML_TEXT("preceding"))
- return axis_preceding;
- else if (name == PUGIXML_TEXT("preceding-sibling"))
- return axis_preceding_sibling;
-
- break;
-
- case 's':
- if (name == PUGIXML_TEXT("self"))
- return axis_self;
-
- break;
-
- default:
- break;
- }
-
- specified = false;
- return axis_child;
- }
-
- nodetest_t parse_node_test_type(const xpath_lexer_string& name)
- {
- switch (name.begin[0])
- {
- case 'c':
- if (name == PUGIXML_TEXT("comment"))
- return nodetest_type_comment;
-
- break;
-
- case 'n':
- if (name == PUGIXML_TEXT("node"))
- return nodetest_type_node;
-
- break;
-
- case 'p':
- if (name == PUGIXML_TEXT("processing-instruction"))
- return nodetest_type_pi;
-
- break;
-
- case 't':
- if (name == PUGIXML_TEXT("text"))
- return nodetest_type_text;
-
- break;
-
- default:
- break;
- }
-
- return nodetest_none;
- }
-
- // PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall
- xpath_ast_node* parse_primary_expression()
- {
- switch (_lexer.current())
- {
- case lex_var_ref:
- {
- xpath_lexer_string name = _lexer.contents();
-
- if (!_variables)
- throw_error("Unknown variable: variable set is not provided");
-
- xpath_variable* var = get_variable(_variables, name.begin, name.end);
-
- if (!var)
- throw_error("Unknown variable: variable set does not contain the given name");
-
- _lexer.next();
-
- return new (alloc_node()) xpath_ast_node(ast_variable, var->type(), var);
- }
-
- case lex_open_brace:
- {
- _lexer.next();
-
- xpath_ast_node* n = parse_expression();
-
- if (_lexer.current() != lex_close_brace)
- throw_error("Unmatched braces");
-
- _lexer.next();
-
- return n;
- }
-
- case lex_quoted_string:
- {
- const char_t* value = alloc_string(_lexer.contents());
-
- xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_string_constant, xpath_type_string, value);
- _lexer.next();
-
- return n;
- }
-
- case lex_number:
- {
- double value = 0;
-
- if (!convert_string_to_number(_lexer.contents().begin, _lexer.contents().end, &value))
- throw_error_oom();
-
- xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_number_constant, xpath_type_number, value);
- _lexer.next();
-
- return n;
- }
-
- case lex_string:
- {
- xpath_ast_node* args[2] = {0};
- size_t argc = 0;
-
- xpath_lexer_string function = _lexer.contents();
- _lexer.next();
-
- xpath_ast_node* last_arg = 0;
-
- if (_lexer.current() != lex_open_brace)
- throw_error("Unrecognized function call");
- _lexer.next();
-
- if (_lexer.current() != lex_close_brace)
- args[argc++] = parse_expression();
-
- while (_lexer.current() != lex_close_brace)
- {
- if (_lexer.current() != lex_comma)
- throw_error("No comma between function arguments");
- _lexer.next();
-
- xpath_ast_node* n = parse_expression();
-
- if (argc < 2) args[argc] = n;
- else last_arg->set_next(n);
-
- argc++;
- last_arg = n;
- }
-
- _lexer.next();
-
- return parse_function(function, argc, args);
- }
-
- default:
- throw_error("Unrecognizable primary expression");
-
- return 0;
- }
- }
-
- // FilterExpr ::= PrimaryExpr | FilterExpr Predicate
- // Predicate ::= '[' PredicateExpr ']'
- // PredicateExpr ::= Expr
- xpath_ast_node* parse_filter_expression()
- {
- xpath_ast_node* n = parse_primary_expression();
-
- while (_lexer.current() == lex_open_square_brace)
- {
- _lexer.next();
-
- xpath_ast_node* expr = parse_expression();
-
- if (n->rettype() != xpath_type_node_set) throw_error("Predicate has to be applied to node set");
-
- bool posinv = expr->rettype() != xpath_type_number && expr->is_posinv();
-
- n = new (alloc_node()) xpath_ast_node(posinv ? ast_filter_posinv : ast_filter, xpath_type_node_set, n, expr);
-
- if (_lexer.current() != lex_close_square_brace)
- throw_error("Unmatched square brace");
-
- _lexer.next();
- }
-
- return n;
- }
-
- // Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep
- // AxisSpecifier ::= AxisName '::' | '@'?
- // NodeTest ::= NameTest | NodeType '(' ')' | 'processing-instruction' '(' Literal ')'
- // NameTest ::= '*' | NCName ':' '*' | QName
- // AbbreviatedStep ::= '.' | '..'
- xpath_ast_node* parse_step(xpath_ast_node* set)
- {
- if (set && set->rettype() != xpath_type_node_set)
- throw_error("Step has to be applied to node set");
-
- bool axis_specified = false;
- axis_t axis = axis_child; // implied child axis
-
- if (_lexer.current() == lex_axis_attribute)
- {
- axis = axis_attribute;
- axis_specified = true;
-
- _lexer.next();
- }
- else if (_lexer.current() == lex_dot)
- {
- _lexer.next();
-
- return new (alloc_node()) xpath_ast_node(ast_step, set, axis_self, nodetest_type_node, 0);
- }
- else if (_lexer.current() == lex_double_dot)
- {
- _lexer.next();
-
- return new (alloc_node()) xpath_ast_node(ast_step, set, axis_parent, nodetest_type_node, 0);
- }
-
- nodetest_t nt_type = nodetest_none;
- xpath_lexer_string nt_name;
-
- if (_lexer.current() == lex_string)
- {
- // node name test
- nt_name = _lexer.contents();
- _lexer.next();
-
- // was it an axis name?
- if (_lexer.current() == lex_double_colon)
- {
- // parse axis name
- if (axis_specified) throw_error("Two axis specifiers in one step");
-
- axis = parse_axis_name(nt_name, axis_specified);
-
- if (!axis_specified) throw_error("Unknown axis");
-
- // read actual node test
- _lexer.next();
-
- if (_lexer.current() == lex_multiply)
- {
- nt_type = nodetest_all;
- nt_name = xpath_lexer_string();
- _lexer.next();
- }
- else if (_lexer.current() == lex_string)
- {
- nt_name = _lexer.contents();
- _lexer.next();
- }
- else throw_error("Unrecognized node test");
- }
-
- if (nt_type == nodetest_none)
- {
- // node type test or processing-instruction
- if (_lexer.current() == lex_open_brace)
- {
- _lexer.next();
-
- if (_lexer.current() == lex_close_brace)
- {
- _lexer.next();
-
- nt_type = parse_node_test_type(nt_name);
-
- if (nt_type == nodetest_none) throw_error("Unrecognized node type");
-
- nt_name = xpath_lexer_string();
- }
- else if (nt_name == PUGIXML_TEXT("processing-instruction"))
- {
- if (_lexer.current() != lex_quoted_string)
- throw_error("Only literals are allowed as arguments to processing-instruction()");
-
- nt_type = nodetest_pi;
- nt_name = _lexer.contents();
- _lexer.next();
-
- if (_lexer.current() != lex_close_brace)
- throw_error("Unmatched brace near processing-instruction()");
- _lexer.next();
- }
- else
- throw_error("Unmatched brace near node type test");
-
- }
- // QName or NCName:*
- else
- {
- if (nt_name.end - nt_name.begin > 2 && nt_name.end[-2] == ':' && nt_name.end[-1] == '*') // NCName:*
- {
- nt_name.end--; // erase *
-
- nt_type = nodetest_all_in_namespace;
- }
- else nt_type = nodetest_name;
- }
- }
- }
- else if (_lexer.current() == lex_multiply)
- {
- nt_type = nodetest_all;
- _lexer.next();
- }
- else throw_error("Unrecognized node test");
-
- xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step, set, axis, nt_type, alloc_string(nt_name));
-
- xpath_ast_node* last = 0;
-
- while (_lexer.current() == lex_open_square_brace)
- {
- _lexer.next();
-
- xpath_ast_node* expr = parse_expression();
-
- xpath_ast_node* pred = new (alloc_node()) xpath_ast_node(ast_predicate, xpath_type_node_set, expr);
-
- if (_lexer.current() != lex_close_square_brace)
- throw_error("Unmatched square brace");
- _lexer.next();
-
- if (last) last->set_next(pred);
- else n->set_right(pred);
-
- last = pred;
- }
-
- return n;
- }
-
- // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step
- xpath_ast_node* parse_relative_location_path(xpath_ast_node* set)
- {
- xpath_ast_node* n = parse_step(set);
-
- while (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)
- {
- lexeme_t l = _lexer.current();
- _lexer.next();
-
- if (l == lex_double_slash)
- n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);
-
- n = parse_step(n);
- }
-
- return n;
- }
-
- // LocationPath ::= RelativeLocationPath | AbsoluteLocationPath
- // AbsoluteLocationPath ::= '/' RelativeLocationPath? | '//' RelativeLocationPath
- xpath_ast_node* parse_location_path()
- {
- if (_lexer.current() == lex_slash)
- {
- _lexer.next();
-
- xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set);
-
- // relative location path can start from axis_attribute, dot, double_dot, multiply and string lexemes; any other lexeme means standalone root path
- lexeme_t l = _lexer.current();
-
- if (l == lex_string || l == lex_axis_attribute || l == lex_dot || l == lex_double_dot || l == lex_multiply)
- return parse_relative_location_path(n);
- else
- return n;
- }
- else if (_lexer.current() == lex_double_slash)
- {
- _lexer.next();
-
- xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set);
- n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);
-
- return parse_relative_location_path(n);
- }
-
- // else clause moved outside of if because of bogus warning 'control may reach end of non-void function being inlined' in gcc 4.0.1
- return parse_relative_location_path(0);
- }
-
- // PathExpr ::= LocationPath
- // | FilterExpr
- // | FilterExpr '/' RelativeLocationPath
- // | FilterExpr '//' RelativeLocationPath
- xpath_ast_node* parse_path_expression()
- {
- // Clarification.
- // PathExpr begins with either LocationPath or FilterExpr.
- // FilterExpr begins with PrimaryExpr
- // PrimaryExpr begins with '$' in case of it being a variable reference,
- // '(' in case of it being an expression, string literal, number constant or
- // function call.
-
- if (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace ||
- _lexer.current() == lex_quoted_string || _lexer.current() == lex_number ||
- _lexer.current() == lex_string)
- {
- if (_lexer.current() == lex_string)
- {
- // This is either a function call, or not - if not, we shall proceed with location path
- const char_t* state = _lexer.state();
-
- while (PUGI__IS_CHARTYPE(*state, ct_space)) ++state;
-
- if (*state != '(') return parse_location_path();
-
- // This looks like a function call; however this still can be a node-test. Check it.
- if (parse_node_test_type(_lexer.contents()) != nodetest_none) return parse_location_path();
- }
-
- xpath_ast_node* n = parse_filter_expression();
-
- if (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)
- {
- lexeme_t l = _lexer.current();
- _lexer.next();
-
- if (l == lex_double_slash)
- {
- if (n->rettype() != xpath_type_node_set) throw_error("Step has to be applied to node set");
-
- n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);
- }
-
- // select from location path
- return parse_relative_location_path(n);
- }
-
- return n;
- }
- else return parse_location_path();
- }
-
- // UnionExpr ::= PathExpr | UnionExpr '|' PathExpr
- xpath_ast_node* parse_union_expression()
- {
- xpath_ast_node* n = parse_path_expression();
-
- while (_lexer.current() == lex_union)
- {
- _lexer.next();
-
- xpath_ast_node* expr = parse_union_expression();
-
- if (n->rettype() != xpath_type_node_set || expr->rettype() != xpath_type_node_set)
- throw_error("Union operator has to be applied to node sets");
-
- n = new (alloc_node()) xpath_ast_node(ast_op_union, xpath_type_node_set, n, expr);
- }
-
- return n;
- }
-
- // UnaryExpr ::= UnionExpr | '-' UnaryExpr
- xpath_ast_node* parse_unary_expression()
- {
- if (_lexer.current() == lex_minus)
- {
- _lexer.next();
-
- xpath_ast_node* expr = parse_unary_expression();
-
- return new (alloc_node()) xpath_ast_node(ast_op_negate, xpath_type_number, expr);
- }
- else return parse_union_expression();
- }
-
- // MultiplicativeExpr ::= UnaryExpr
- // | MultiplicativeExpr '*' UnaryExpr
- // | MultiplicativeExpr 'div' UnaryExpr
- // | MultiplicativeExpr 'mod' UnaryExpr
- xpath_ast_node* parse_multiplicative_expression()
- {
- xpath_ast_node* n = parse_unary_expression();
-
- while (_lexer.current() == lex_multiply || (_lexer.current() == lex_string &&
- (_lexer.contents() == PUGIXML_TEXT("mod") || _lexer.contents() == PUGIXML_TEXT("div"))))
- {
- ast_type_t op = _lexer.current() == lex_multiply ? ast_op_multiply :
- _lexer.contents().begin[0] == 'd' ? ast_op_divide : ast_op_mod;
- _lexer.next();
-
- xpath_ast_node* expr = parse_unary_expression();
-
- n = new (alloc_node()) xpath_ast_node(op, xpath_type_number, n, expr);
- }
-
- return n;
- }
-
- // AdditiveExpr ::= MultiplicativeExpr
- // | AdditiveExpr '+' MultiplicativeExpr
- // | AdditiveExpr '-' MultiplicativeExpr
- xpath_ast_node* parse_additive_expression()
- {
- xpath_ast_node* n = parse_multiplicative_expression();
-
- while (_lexer.current() == lex_plus || _lexer.current() == lex_minus)
- {
- lexeme_t l = _lexer.current();
-
- _lexer.next();
-
- xpath_ast_node* expr = parse_multiplicative_expression();
-
- n = new (alloc_node()) xpath_ast_node(l == lex_plus ? ast_op_add : ast_op_subtract, xpath_type_number, n, expr);
- }
-
- return n;
- }
-
- // RelationalExpr ::= AdditiveExpr
- // | RelationalExpr '<' AdditiveExpr
- // | RelationalExpr '>' AdditiveExpr
- // | RelationalExpr '<=' AdditiveExpr
- // | RelationalExpr '>=' AdditiveExpr
- xpath_ast_node* parse_relational_expression()
- {
- xpath_ast_node* n = parse_additive_expression();
-
- while (_lexer.current() == lex_less || _lexer.current() == lex_less_or_equal ||
- _lexer.current() == lex_greater || _lexer.current() == lex_greater_or_equal)
- {
- lexeme_t l = _lexer.current();
- _lexer.next();
-
- xpath_ast_node* expr = parse_additive_expression();
-
- n = new (alloc_node()) xpath_ast_node(l == lex_less ? ast_op_less : l == lex_greater ? ast_op_greater :
- l == lex_less_or_equal ? ast_op_less_or_equal : ast_op_greater_or_equal, xpath_type_boolean, n, expr);
- }
-
- return n;
- }
-
- // EqualityExpr ::= RelationalExpr
- // | EqualityExpr '=' RelationalExpr
- // | EqualityExpr '!=' RelationalExpr
- xpath_ast_node* parse_equality_expression()
- {
- xpath_ast_node* n = parse_relational_expression();
-
- while (_lexer.current() == lex_equal || _lexer.current() == lex_not_equal)
- {
- lexeme_t l = _lexer.current();
-
- _lexer.next();
-
- xpath_ast_node* expr = parse_relational_expression();
-
- n = new (alloc_node()) xpath_ast_node(l == lex_equal ? ast_op_equal : ast_op_not_equal, xpath_type_boolean, n, expr);
- }
-
- return n;
- }
-
- // AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr
- xpath_ast_node* parse_and_expression()
- {
- xpath_ast_node* n = parse_equality_expression();
-
- while (_lexer.current() == lex_string && _lexer.contents() == PUGIXML_TEXT("and"))
- {
- _lexer.next();
-
- xpath_ast_node* expr = parse_equality_expression();
-
- n = new (alloc_node()) xpath_ast_node(ast_op_and, xpath_type_boolean, n, expr);
- }
-
- return n;
- }
-
- // OrExpr ::= AndExpr | OrExpr 'or' AndExpr
- xpath_ast_node* parse_or_expression()
- {
- xpath_ast_node* n = parse_and_expression();
-
- while (_lexer.current() == lex_string && _lexer.contents() == PUGIXML_TEXT("or"))
- {
- _lexer.next();
-
- xpath_ast_node* expr = parse_and_expression();
-
- n = new (alloc_node()) xpath_ast_node(ast_op_or, xpath_type_boolean, n, expr);
- }
-
- return n;
- }
-
- // Expr ::= OrExpr
- xpath_ast_node* parse_expression()
- {
- return parse_or_expression();
- }
-
- xpath_parser(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result): _alloc(alloc), _lexer(query), _query(query), _variables(variables), _result(result)
- {
- }
-
- xpath_ast_node* parse()
- {
- xpath_ast_node* result = parse_expression();
-
- if (_lexer.current() != lex_eof)
- {
- // there are still unparsed tokens left, error
- throw_error("Incorrect query");
- }
-
- return result;
- }
-
- static xpath_ast_node* parse(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result)
- {
- xpath_parser parser(query, variables, alloc, result);
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- int error = setjmp(parser._error_handler);
-
- return (error == 0) ? parser.parse() : 0;
- #else
- return parser.parse();
- #endif
- }
- };
-
- struct xpath_query_impl
- {
- static xpath_query_impl* create()
- {
- void* memory = xml_memory::allocate(sizeof(xpath_query_impl));
-
- return new (memory) xpath_query_impl();
- }
-
- static void destroy(void* ptr)
- {
- if (!ptr) return;
-
- // free all allocated pages
- static_cast<xpath_query_impl*>(ptr)->alloc.release();
-
- // free allocator memory (with the first page)
- xml_memory::deallocate(ptr);
- }
-
- xpath_query_impl(): root(0), alloc(&block)
- {
- block.next = 0;
- }
-
- xpath_ast_node* root;
- xpath_allocator alloc;
- xpath_memory_block block;
- };
-
- PUGI__FN xpath_string evaluate_string_impl(xpath_query_impl* impl, const xpath_node& n, xpath_stack_data& sd)
- {
- if (!impl) return xpath_string();
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- if (setjmp(sd.error_handler)) return xpath_string();
- #endif
-
- xpath_context c(n, 1, 1);
-
- return impl->root->eval_string(c, sd.stack);
- }
-PUGI__NS_END
-
-namespace pugi
-{
-#ifndef PUGIXML_NO_EXCEPTIONS
- PUGI__FN xpath_exception::xpath_exception(const xpath_parse_result& result_): _result(result_)
- {
- assert(_result.error);
- }
-
- PUGI__FN const char* xpath_exception::what() const throw()
- {
- return _result.error;
- }
-
- PUGI__FN const xpath_parse_result& xpath_exception::result() const
- {
- return _result;
- }
-#endif
-
- PUGI__FN xpath_node::xpath_node()
- {
- }
-
- PUGI__FN xpath_node::xpath_node(const xml_node& node_): _node(node_)
- {
- }
-
- PUGI__FN xpath_node::xpath_node(const xml_attribute& attribute_, const xml_node& parent_): _node(attribute_ ? parent_ : xml_node()), _attribute(attribute_)
- {
- }
-
- PUGI__FN xml_node xpath_node::node() const
- {
- return _attribute ? xml_node() : _node;
- }
-
- PUGI__FN xml_attribute xpath_node::attribute() const
- {
- return _attribute;
- }
-
- PUGI__FN xml_node xpath_node::parent() const
- {
- return _attribute ? _node : _node.parent();
- }
-
- PUGI__FN static void unspecified_bool_xpath_node(xpath_node***)
- {
- }
-
- PUGI__FN xpath_node::operator xpath_node::unspecified_bool_type() const
- {
- return (_node || _attribute) ? unspecified_bool_xpath_node : 0;
- }
-
- PUGI__FN bool xpath_node::operator!() const
- {
- return !(_node || _attribute);
- }
-
- PUGI__FN bool xpath_node::operator==(const xpath_node& n) const
- {
- return _node == n._node && _attribute == n._attribute;
- }
-
- PUGI__FN bool xpath_node::operator!=(const xpath_node& n) const
- {
- return _node != n._node || _attribute != n._attribute;
- }
-
-#ifdef __BORLANDC__
- PUGI__FN bool operator&&(const xpath_node& lhs, bool rhs)
- {
- return (bool)lhs && rhs;
- }
-
- PUGI__FN bool operator||(const xpath_node& lhs, bool rhs)
- {
- return (bool)lhs || rhs;
- }
-#endif
-
- PUGI__FN void xpath_node_set::_assign(const_iterator begin_, const_iterator end_)
- {
- assert(begin_ <= end_);
-
- size_t size_ = static_cast<size_t>(end_ - begin_);
-
- if (size_ <= 1)
- {
- // deallocate old buffer
- if (_begin != &_storage) impl::xml_memory::deallocate(_begin);
-
- // use internal buffer
- if (begin_ != end_) _storage = *begin_;
-
- _begin = &_storage;
- _end = &_storage + size_;
- }
- else
- {
- // make heap copy
- xpath_node* storage = static_cast<xpath_node*>(impl::xml_memory::allocate(size_ * sizeof(xpath_node)));
-
- if (!storage)
- {
- #ifdef PUGIXML_NO_EXCEPTIONS
- return;
- #else
- throw std::bad_alloc();
- #endif
- }
-
- memcpy(storage, begin_, size_ * sizeof(xpath_node));
-
- // deallocate old buffer
- if (_begin != &_storage) impl::xml_memory::deallocate(_begin);
-
- // finalize
- _begin = storage;
- _end = storage + size_;
- }
- }
-
- PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage)
- {
- }
-
- PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_), _begin(&_storage), _end(&_storage)
- {
- _assign(begin_, end_);
- }
-
- PUGI__FN xpath_node_set::~xpath_node_set()
- {
- if (_begin != &_storage) impl::xml_memory::deallocate(_begin);
- }
-
- PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(ns._type), _begin(&_storage), _end(&_storage)
- {
- _assign(ns._begin, ns._end);
- }
-
- PUGI__FN xpath_node_set& xpath_node_set::operator=(const xpath_node_set& ns)
- {
- if (this == &ns) return *this;
-
- _type = ns._type;
- _assign(ns._begin, ns._end);
-
- return *this;
- }
-
- PUGI__FN xpath_node_set::type_t xpath_node_set::type() const
- {
- return _type;
- }
-
- PUGI__FN size_t xpath_node_set::size() const
- {
- return _end - _begin;
- }
-
- PUGI__FN bool xpath_node_set::empty() const
- {
- return _begin == _end;
- }
-
- PUGI__FN const xpath_node& xpath_node_set::operator[](size_t index) const
- {
- assert(index < size());
- return _begin[index];
- }
-
- PUGI__FN xpath_node_set::const_iterator xpath_node_set::begin() const
- {
- return _begin;
- }
-
- PUGI__FN xpath_node_set::const_iterator xpath_node_set::end() const
- {
- return _end;
- }
-
- PUGI__FN void xpath_node_set::sort(bool reverse)
- {
- _type = impl::xpath_sort(_begin, _end, _type, reverse);
- }
-
- PUGI__FN xpath_node xpath_node_set::first() const
- {
- return impl::xpath_first(_begin, _end, _type);
- }
-
- PUGI__FN xpath_parse_result::xpath_parse_result(): error("Internal error"), offset(0)
- {
- }
-
- PUGI__FN xpath_parse_result::operator bool() const
- {
- return error == 0;
- }
-
- PUGI__FN const char* xpath_parse_result::description() const
- {
- return error ? error : "No error";
- }
-
- PUGI__FN xpath_variable::xpath_variable()
- {
- }
-
- PUGI__FN const char_t* xpath_variable::name() const
- {
- switch (_type)
- {
- case xpath_type_node_set:
- return static_cast<const impl::xpath_variable_node_set*>(this)->name;
-
- case xpath_type_number:
- return static_cast<const impl::xpath_variable_number*>(this)->name;
-
- case xpath_type_string:
- return static_cast<const impl::xpath_variable_string*>(this)->name;
-
- case xpath_type_boolean:
- return static_cast<const impl::xpath_variable_boolean*>(this)->name;
-
- default:
- assert(!"Invalid variable type");
- return 0;
- }
- }
-
- PUGI__FN xpath_value_type xpath_variable::type() const
- {
- return _type;
- }
-
- PUGI__FN bool xpath_variable::get_boolean() const
- {
- return (_type == xpath_type_boolean) ? static_cast<const impl::xpath_variable_boolean*>(this)->value : false;
- }
-
- PUGI__FN double xpath_variable::get_number() const
- {
- return (_type == xpath_type_number) ? static_cast<const impl::xpath_variable_number*>(this)->value : impl::gen_nan();
- }
-
- PUGI__FN const char_t* xpath_variable::get_string() const
- {
- const char_t* value = (_type == xpath_type_string) ? static_cast<const impl::xpath_variable_string*>(this)->value : 0;
- return value ? value : PUGIXML_TEXT("");
- }
-
- PUGI__FN const xpath_node_set& xpath_variable::get_node_set() const
- {
- return (_type == xpath_type_node_set) ? static_cast<const impl::xpath_variable_node_set*>(this)->value : impl::dummy_node_set;
- }
-
- PUGI__FN bool xpath_variable::set(bool value)
- {
- if (_type != xpath_type_boolean) return false;
-
- static_cast<impl::xpath_variable_boolean*>(this)->value = value;
- return true;
- }
-
- PUGI__FN bool xpath_variable::set(double value)
- {
- if (_type != xpath_type_number) return false;
-
- static_cast<impl::xpath_variable_number*>(this)->value = value;
- return true;
- }
-
- PUGI__FN bool xpath_variable::set(const char_t* value)
- {
- if (_type != xpath_type_string) return false;
-
- impl::xpath_variable_string* var = static_cast<impl::xpath_variable_string*>(this);
-
- // duplicate string
- size_t size = (impl::strlength(value) + 1) * sizeof(char_t);
-
- char_t* copy = static_cast<char_t*>(impl::xml_memory::allocate(size));
- if (!copy) return false;
-
- memcpy(copy, value, size);
-
- // replace old string
- if (var->value) impl::xml_memory::deallocate(var->value);
- var->value = copy;
-
- return true;
- }
-
- PUGI__FN bool xpath_variable::set(const xpath_node_set& value)
- {
- if (_type != xpath_type_node_set) return false;
-
- static_cast<impl::xpath_variable_node_set*>(this)->value = value;
- return true;
- }
-
- PUGI__FN xpath_variable_set::xpath_variable_set()
- {
- for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) _data[i] = 0;
- }
-
- PUGI__FN xpath_variable_set::~xpath_variable_set()
- {
- for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i)
- {
- xpath_variable* var = _data[i];
-
- while (var)
- {
- xpath_variable* next = var->_next;
-
- impl::delete_xpath_variable(var->_type, var);
-
- var = next;
- }
- }
- }
-
- PUGI__FN xpath_variable* xpath_variable_set::find(const char_t* name) const
- {
- const size_t hash_size = sizeof(_data) / sizeof(_data[0]);
- size_t hash = impl::hash_string(name) % hash_size;
-
- // look for existing variable
- for (xpath_variable* var = _data[hash]; var; var = var->_next)
- if (impl::strequal(var->name(), name))
- return var;
-
- return 0;
- }
-
- PUGI__FN xpath_variable* xpath_variable_set::add(const char_t* name, xpath_value_type type)
- {
- const size_t hash_size = sizeof(_data) / sizeof(_data[0]);
- size_t hash = impl::hash_string(name) % hash_size;
-
- // look for existing variable
- for (xpath_variable* var = _data[hash]; var; var = var->_next)
- if (impl::strequal(var->name(), name))
- return var->type() == type ? var : 0;
-
- // add new variable
- xpath_variable* result = impl::new_xpath_variable(type, name);
-
- if (result)
- {
- result->_type = type;
- result->_next = _data[hash];
-
- _data[hash] = result;
- }
-
- return result;
- }
-
- PUGI__FN bool xpath_variable_set::set(const char_t* name, bool value)
- {
- xpath_variable* var = add(name, xpath_type_boolean);
- return var ? var->set(value) : false;
- }
-
- PUGI__FN bool xpath_variable_set::set(const char_t* name, double value)
- {
- xpath_variable* var = add(name, xpath_type_number);
- return var ? var->set(value) : false;
- }
-
- PUGI__FN bool xpath_variable_set::set(const char_t* name, const char_t* value)
- {
- xpath_variable* var = add(name, xpath_type_string);
- return var ? var->set(value) : false;
- }
-
- PUGI__FN bool xpath_variable_set::set(const char_t* name, const xpath_node_set& value)
- {
- xpath_variable* var = add(name, xpath_type_node_set);
- return var ? var->set(value) : false;
- }
-
- PUGI__FN xpath_variable* xpath_variable_set::get(const char_t* name)
- {
- return find(name);
- }
-
- PUGI__FN const xpath_variable* xpath_variable_set::get(const char_t* name) const
- {
- return find(name);
- }
-
- PUGI__FN xpath_query::xpath_query(const char_t* query, xpath_variable_set* variables): _impl(0)
- {
- impl::xpath_query_impl* qimpl = impl::xpath_query_impl::create();
-
- if (!qimpl)
- {
- #ifdef PUGIXML_NO_EXCEPTIONS
- _result.error = "Out of memory";
- #else
- throw std::bad_alloc();
- #endif
- }
- else
- {
- impl::buffer_holder impl_holder(qimpl, impl::xpath_query_impl::destroy);
-
- qimpl->root = impl::xpath_parser::parse(query, variables, &qimpl->alloc, &_result);
-
- if (qimpl->root)
- {
- _impl = static_cast<impl::xpath_query_impl*>(impl_holder.release());
- _result.error = 0;
- }
- }
- }
-
- PUGI__FN xpath_query::~xpath_query()
- {
- impl::xpath_query_impl::destroy(_impl);
- }
-
- PUGI__FN xpath_value_type xpath_query::return_type() const
- {
- if (!_impl) return xpath_type_none;
-
- return static_cast<impl::xpath_query_impl*>(_impl)->root->rettype();
- }
-
- PUGI__FN bool xpath_query::evaluate_boolean(const xpath_node& n) const
- {
- if (!_impl) return false;
-
- impl::xpath_context c(n, 1, 1);
- impl::xpath_stack_data sd;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- if (setjmp(sd.error_handler)) return false;
- #endif
-
- return static_cast<impl::xpath_query_impl*>(_impl)->root->eval_boolean(c, sd.stack);
- }
-
- PUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const
- {
- if (!_impl) return impl::gen_nan();
-
- impl::xpath_context c(n, 1, 1);
- impl::xpath_stack_data sd;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- if (setjmp(sd.error_handler)) return impl::gen_nan();
- #endif
-
- return static_cast<impl::xpath_query_impl*>(_impl)->root->eval_number(c, sd.stack);
- }
-
-#ifndef PUGIXML_NO_STL
- PUGI__FN string_t xpath_query::evaluate_string(const xpath_node& n) const
- {
- impl::xpath_stack_data sd;
-
- return impl::evaluate_string_impl(static_cast<impl::xpath_query_impl*>(_impl), n, sd).c_str();
- }
-#endif
-
- PUGI__FN size_t xpath_query::evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const
- {
- impl::xpath_stack_data sd;
-
- impl::xpath_string r = impl::evaluate_string_impl(static_cast<impl::xpath_query_impl*>(_impl), n, sd);
-
- size_t full_size = r.length() + 1;
-
- if (capacity > 0)
- {
- size_t size = (full_size < capacity) ? full_size : capacity;
- assert(size > 0);
-
- memcpy(buffer, r.c_str(), (size - 1) * sizeof(char_t));
- buffer[size - 1] = 0;
- }
-
- return full_size;
- }
-
- PUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const
- {
- if (!_impl) return xpath_node_set();
-
- impl::xpath_ast_node* root = static_cast<impl::xpath_query_impl*>(_impl)->root;
-
- if (root->rettype() != xpath_type_node_set)
- {
- #ifdef PUGIXML_NO_EXCEPTIONS
- return xpath_node_set();
- #else
- xpath_parse_result res;
- res.error = "Expression does not evaluate to node set";
-
- throw xpath_exception(res);
- #endif
- }
-
- impl::xpath_context c(n, 1, 1);
- impl::xpath_stack_data sd;
-
- #ifdef PUGIXML_NO_EXCEPTIONS
- if (setjmp(sd.error_handler)) return xpath_node_set();
- #endif
-
- impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack);
-
- return xpath_node_set(r.begin(), r.end(), r.type());
- }
-
- PUGI__FN const xpath_parse_result& xpath_query::result() const
- {
- return _result;
- }
-
- PUGI__FN static void unspecified_bool_xpath_query(xpath_query***)
- {
- }
-
- PUGI__FN xpath_query::operator xpath_query::unspecified_bool_type() const
- {
- return _impl ? unspecified_bool_xpath_query : 0;
- }
-
- PUGI__FN bool xpath_query::operator!() const
- {
- return !_impl;
- }
-
- PUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const
- {
- xpath_query q(query, variables);
- return select_single_node(q);
- }
-
- PUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const
- {
- xpath_node_set s = query.evaluate_node_set(*this);
- return s.empty() ? xpath_node() : s.first();
- }
-
- PUGI__FN xpath_node_set xml_node::select_nodes(const char_t* query, xpath_variable_set* variables) const
- {
- xpath_query q(query, variables);
- return select_nodes(q);
- }
-
- PUGI__FN xpath_node_set xml_node::select_nodes(const xpath_query& query) const
- {
- return query.evaluate_node_set(*this);
- }
-}
-
-#endif
-
-#ifdef __BORLANDC__
-# pragma option pop
-#endif
-
-// Intel C++ does not properly keep warning state for function templates,
-// so popping warning state at the end of translation unit leads to warnings in the middle.
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
-# pragma warning(pop)
-#endif
-
-// Undefine all local macros (makes sure we're not leaking macros in header-only mode)
-#undef PUGI__NO_INLINE
-#undef PUGI__STATIC_ASSERT
-#undef PUGI__DMC_VOLATILE
-#undef PUGI__MSVC_CRT_VERSION
-#undef PUGI__NS_BEGIN
-#undef PUGI__NS_END
-#undef PUGI__FN
-#undef PUGI__FN_NO_INLINE
-#undef PUGI__IS_CHARTYPE_IMPL
-#undef PUGI__IS_CHARTYPE
-#undef PUGI__IS_CHARTYPEX
-#undef PUGI__SKIPWS
-#undef PUGI__OPTSET
-#undef PUGI__PUSHNODE
-#undef PUGI__POPNODE
-#undef PUGI__SCANFOR
-#undef PUGI__SCANWHILE
-#undef PUGI__ENDSEG
-#undef PUGI__THROW_ERROR
-#undef PUGI__CHECK_ERROR
-
-#endif
-
-/**
- * Copyright (c) 2006-2012 Arseny Kapoulkine
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
diff --git a/SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.hpp b/SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.hpp
deleted file mode 100644
index 77b4dcf47..000000000
--- a/SDL_Core/tools/intergen/third_party/pugixml/src/pugixml.hpp
+++ /dev/null
@@ -1,1265 +0,0 @@
-/**
- * pugixml parser - version 1.2
- * --------------------------------------------------------
- * Copyright (C) 2006-2012, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
- * Report bugs and download new versions at http://pugixml.org/
- *
- * This library is distributed under the MIT License. See notice at the end
- * of this file.
- *
- * This work is based on the pugxml parser, which is:
- * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
- */
-
-#ifndef PUGIXML_VERSION
-// Define version macro; evaluates to major * 100 + minor so that it's safe to use in less-than comparisons
-# define PUGIXML_VERSION 120
-#endif
-
-// Include user configuration file (this can define various configuration macros)
-#include "pugiconfig.hpp"
-
-#ifndef HEADER_PUGIXML_HPP
-#define HEADER_PUGIXML_HPP
-
-// Include stddef.h for size_t and ptrdiff_t
-#include <stddef.h>
-
-// Include exception header for XPath
-#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
-# include <exception>
-#endif
-
-// Include STL headers
-#ifndef PUGIXML_NO_STL
-# include <iterator>
-# include <iosfwd>
-# include <string>
-#endif
-
-// Macro for deprecated features
-#ifndef PUGIXML_DEPRECATED
-# if defined(__GNUC__)
-# define PUGIXML_DEPRECATED __attribute__((deprecated))
-# elif defined(_MSC_VER) && _MSC_VER >= 1300
-# define PUGIXML_DEPRECATED __declspec(deprecated)
-# else
-# define PUGIXML_DEPRECATED
-# endif
-#endif
-
-// If no API is defined, assume default
-#ifndef PUGIXML_API
-# define PUGIXML_API
-#endif
-
-// If no API for classes is defined, assume default
-#ifndef PUGIXML_CLASS
-# define PUGIXML_CLASS PUGIXML_API
-#endif
-
-// If no API for functions is defined, assume default
-#ifndef PUGIXML_FUNCTION
-# define PUGIXML_FUNCTION PUGIXML_API
-#endif
-
-// Character interface macros
-#ifdef PUGIXML_WCHAR_MODE
-# define PUGIXML_TEXT(t) L ## t
-# define PUGIXML_CHAR wchar_t
-#else
-# define PUGIXML_TEXT(t) t
-# define PUGIXML_CHAR char
-#endif
-
-namespace pugi
-{
- // Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE
- typedef PUGIXML_CHAR char_t;
-
-#ifndef PUGIXML_NO_STL
- // String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE
- typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > string_t;
-#endif
-}
-
-// The PugiXML namespace
-namespace pugi
-{
- // Tree node types
- enum xml_node_type
- {
- node_null, // Empty (null) node handle
- node_document, // A document tree's absolute root
- node_element, // Element tag, i.e. '<node/>'
- node_pcdata, // Plain character data, i.e. 'text'
- node_cdata, // Character data, i.e. '<![CDATA[text]]>'
- node_comment, // Comment tag, i.e. '<!-- text -->'
- node_pi, // Processing instruction, i.e. '<?name?>'
- node_declaration, // Document declaration, i.e. '<?xml version="1.0"?>'
- node_doctype // Document type declaration, i.e. '<!DOCTYPE doc>'
- };
-
- // Parsing options
-
- // Minimal parsing mode (equivalent to turning all other flags off).
- // Only elements and PCDATA sections are added to the DOM tree, no text conversions are performed.
- const unsigned int parse_minimal = 0x0000;
-
- // This flag determines if processing instructions (node_pi) are added to the DOM tree. This flag is off by default.
- const unsigned int parse_pi = 0x0001;
-
- // This flag determines if comments (node_comment) are added to the DOM tree. This flag is off by default.
- const unsigned int parse_comments = 0x0002;
-
- // This flag determines if CDATA sections (node_cdata) are added to the DOM tree. This flag is on by default.
- const unsigned int parse_cdata = 0x0004;
-
- // This flag determines if plain character data (node_pcdata) that consist only of whitespace are added to the DOM tree.
- // This flag is off by default; turning it on usually results in slower parsing and more memory consumption.
- const unsigned int parse_ws_pcdata = 0x0008;
-
- // This flag determines if character and entity references are expanded during parsing. This flag is on by default.
- const unsigned int parse_escapes = 0x0010;
-
- // This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default.
- const unsigned int parse_eol = 0x0020;
-
- // This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default.
- const unsigned int parse_wconv_attribute = 0x0040;
-
- // This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default.
- const unsigned int parse_wnorm_attribute = 0x0080;
-
- // This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default.
- const unsigned int parse_declaration = 0x0100;
-
- // This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default.
- const unsigned int parse_doctype = 0x0200;
-
- // This flag determines if plain character data (node_pcdata) that is the only child of the parent node and that consists only
- // of whitespace is added to the DOM tree.
- // This flag is off by default; turning it on may result in slower parsing and more memory consumption.
- const unsigned int parse_ws_pcdata_single = 0x0400;
-
- // The default parsing mode.
- // Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded,
- // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.
- const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol;
-
- // The full parsing mode.
- // Nodes of all types are added to the DOM tree, character/reference entities are expanded,
- // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.
- const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype;
-
- // These flags determine the encoding of input data for XML document
- enum xml_encoding
- {
- encoding_auto, // Auto-detect input encoding using BOM or < / <? detection; use UTF8 if BOM is not found
- encoding_utf8, // UTF8 encoding
- encoding_utf16_le, // Little-endian UTF16
- encoding_utf16_be, // Big-endian UTF16
- encoding_utf16, // UTF16 with native endianness
- encoding_utf32_le, // Little-endian UTF32
- encoding_utf32_be, // Big-endian UTF32
- encoding_utf32, // UTF32 with native endianness
- encoding_wchar, // The same encoding wchar_t has (either UTF16 or UTF32)
- encoding_latin1
- };
-
- // Formatting flags
-
- // Indent the nodes that are written to output stream with as many indentation strings as deep the node is in DOM tree. This flag is on by default.
- const unsigned int format_indent = 0x01;
-
- // Write encoding-specific BOM to the output stream. This flag is off by default.
- const unsigned int format_write_bom = 0x02;
-
- // Use raw output mode (no indentation and no line breaks are written). This flag is off by default.
- const unsigned int format_raw = 0x04;
-
- // Omit default XML declaration even if there is no declaration in the document. This flag is off by default.
- const unsigned int format_no_declaration = 0x08;
-
- // Don't escape attribute values and PCDATA contents. This flag is off by default.
- const unsigned int format_no_escapes = 0x10;
-
- // Open file using text mode in xml_document::save_file. This enables special character (i.e. new-line) conversions on some systems. This flag is off by default.
- const unsigned int format_save_file_text = 0x20;
-
- // The default set of formatting flags.
- // Nodes are indented depending on their depth in DOM tree, a default declaration is output if document has none.
- const unsigned int format_default = format_indent;
-
- // Forward declarations
- struct xml_attribute_struct;
- struct xml_node_struct;
-
- class xml_node_iterator;
- class xml_attribute_iterator;
- class xml_named_node_iterator;
-
- class xml_tree_walker;
-
- class xml_node;
-
- class xml_text;
-
- #ifndef PUGIXML_NO_XPATH
- class xpath_node;
- class xpath_node_set;
- class xpath_query;
- class xpath_variable_set;
- #endif
-
- // Range-based for loop support
- template <typename It> class xml_object_range
- {
- public:
- typedef It const_iterator;
-
- xml_object_range(It b, It e): _begin(b), _end(e)
- {
- }
-
- It begin() const { return _begin; }
- It end() const { return _end; }
-
- private:
- It _begin, _end;
- };
-
- // Writer interface for node printing (see xml_node::print)
- class PUGIXML_CLASS xml_writer
- {
- public:
- virtual ~xml_writer() {}
-
- // Write memory chunk into stream/file/whatever
- virtual void write(const void* data, size_t size) = 0;
- };
-
- // xml_writer implementation for FILE*
- class PUGIXML_CLASS xml_writer_file: public xml_writer
- {
- public:
- // Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio
- xml_writer_file(void* file);
-
- virtual void write(const void* data, size_t size);
-
- private:
- void* file;
- };
-
- #ifndef PUGIXML_NO_STL
- // xml_writer implementation for streams
- class PUGIXML_CLASS xml_writer_stream: public xml_writer
- {
- public:
- // Construct writer from an output stream object
- xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);
- xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);
-
- virtual void write(const void* data, size_t size);
-
- private:
- std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
- std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;
- };
- #endif
-
- // A light-weight handle for manipulating attributes in DOM tree
- class PUGIXML_CLASS xml_attribute
- {
- friend class xml_attribute_iterator;
- friend class xml_node;
-
- private:
- xml_attribute_struct* _attr;
-
- typedef void (*unspecified_bool_type)(xml_attribute***);
-
- public:
- // Default constructor. Constructs an empty attribute.
- xml_attribute();
-
- // Constructs attribute from internal pointer
- explicit xml_attribute(xml_attribute_struct* attr);
-
- // Safe bool conversion operator
- operator unspecified_bool_type() const;
-
- // Borland C++ workaround
- bool operator!() const;
-
- // Comparison operators (compares wrapped attribute pointers)
- bool operator==(const xml_attribute& r) const;
- bool operator!=(const xml_attribute& r) const;
- bool operator<(const xml_attribute& r) const;
- bool operator>(const xml_attribute& r) const;
- bool operator<=(const xml_attribute& r) const;
- bool operator>=(const xml_attribute& r) const;
-
- // Check if attribute is empty
- bool empty() const;
-
- // Get attribute name/value, or "" if attribute is empty
- const char_t* name() const;
- const char_t* value() const;
-
- // Get attribute value, or the default value if attribute is empty
- const char_t* as_string(const char_t* def = PUGIXML_TEXT("")) const;
-
- // Get attribute value as a number, or the default value if conversion did not succeed or attribute is empty
- int as_int(int def = 0) const;
- unsigned int as_uint(unsigned int def = 0) const;
- double as_double(double def = 0) const;
- float as_float(float def = 0) const;
-
- // Get attribute value as bool (returns true if first character is in '1tTyY' set), or the default value if attribute is empty
- bool as_bool(bool def = false) const;
-
- // Set attribute name/value (returns false if attribute is empty or there is not enough memory)
- bool set_name(const char_t* rhs);
- bool set_value(const char_t* rhs);
-
- // Set attribute value with type conversion (numbers are converted to strings, boolean is converted to "true"/"false")
- bool set_value(int rhs);
- bool set_value(unsigned int rhs);
- bool set_value(double rhs);
- bool set_value(bool rhs);
-
- // Set attribute value (equivalent to set_value without error checking)
- xml_attribute& operator=(const char_t* rhs);
- xml_attribute& operator=(int rhs);
- xml_attribute& operator=(unsigned int rhs);
- xml_attribute& operator=(double rhs);
- xml_attribute& operator=(bool rhs);
-
- // Get next/previous attribute in the attribute list of the parent node
- xml_attribute next_attribute() const;
- xml_attribute previous_attribute() const;
-
- // Get hash value (unique for handles to the same object)
- size_t hash_value() const;
-
- // Get internal pointer
- xml_attribute_struct* internal_object() const;
- };
-
-#ifdef __BORLANDC__
- // Borland C++ workaround
- bool PUGIXML_FUNCTION operator&&(const xml_attribute& lhs, bool rhs);
- bool PUGIXML_FUNCTION operator||(const xml_attribute& lhs, bool rhs);
-#endif
-
- // A light-weight handle for manipulating nodes in DOM tree
- class PUGIXML_CLASS xml_node
- {
- friend class xml_attribute_iterator;
- friend class xml_node_iterator;
- friend class xml_named_node_iterator;
-
- protected:
- xml_node_struct* _root;
-
- typedef void (*unspecified_bool_type)(xml_node***);
-
- public:
- // Default constructor. Constructs an empty node.
- xml_node();
-
- // Constructs node from internal pointer
- explicit xml_node(xml_node_struct* p);
-
- // Safe bool conversion operator
- operator unspecified_bool_type() const;
-
- // Borland C++ workaround
- bool operator!() const;
-
- // Comparison operators (compares wrapped node pointers)
- bool operator==(const xml_node& r) const;
- bool operator!=(const xml_node& r) const;
- bool operator<(const xml_node& r) const;
- bool operator>(const xml_node& r) const;
- bool operator<=(const xml_node& r) const;
- bool operator>=(const xml_node& r) const;
-
- // Check if node is empty.
- bool empty() const;
-
- // Get node type
- xml_node_type type() const;
-
- // Get node name/value, or "" if node is empty or it has no name/value
- const char_t* name() const;
- const char_t* value() const;
-
- // Get attribute list
- xml_attribute first_attribute() const;
- xml_attribute last_attribute() const;
-
- // Get children list
- xml_node first_child() const;
- xml_node last_child() const;
-
- // Get next/previous sibling in the children list of the parent node
- xml_node next_sibling() const;
- xml_node previous_sibling() const;
-
- // Get parent node
- xml_node parent() const;
-
- // Get root of DOM tree this node belongs to
- xml_node root() const;
-
- // Get text object for the current node
- xml_text text() const;
-
- // Get child, attribute or next/previous sibling with the specified name
- xml_node child(const char_t* name) const;
- xml_attribute attribute(const char_t* name) const;
- xml_node next_sibling(const char_t* name) const;
- xml_node previous_sibling(const char_t* name) const;
-
- // Get child value of current node; that is, value of the first child node of type PCDATA/CDATA
- const char_t* child_value() const;
-
- // Get child value of child with specified name. Equivalent to child(name).child_value().
- const char_t* child_value(const char_t* name) const;
-
- // Set node name/value (returns false if node is empty, there is not enough memory, or node can not have name/value)
- bool set_name(const char_t* rhs);
- bool set_value(const char_t* rhs);
-
- // Add attribute with specified name. Returns added attribute, or empty attribute on errors.
- xml_attribute append_attribute(const char_t* name);
- xml_attribute prepend_attribute(const char_t* name);
- xml_attribute insert_attribute_after(const char_t* name, const xml_attribute& attr);
- xml_attribute insert_attribute_before(const char_t* name, const xml_attribute& attr);
-
- // Add a copy of the specified attribute. Returns added attribute, or empty attribute on errors.
- xml_attribute append_copy(const xml_attribute& proto);
- xml_attribute prepend_copy(const xml_attribute& proto);
- xml_attribute insert_copy_after(const xml_attribute& proto, const xml_attribute& attr);
- xml_attribute insert_copy_before(const xml_attribute& proto, const xml_attribute& attr);
-
- // Add child node with specified type. Returns added node, or empty node on errors.
- xml_node append_child(xml_node_type type = node_element);
- xml_node prepend_child(xml_node_type type = node_element);
- xml_node insert_child_after(xml_node_type type, const xml_node& node);
- xml_node insert_child_before(xml_node_type type, const xml_node& node);
-
- // Add child element with specified name. Returns added node, or empty node on errors.
- xml_node append_child(const char_t* name);
- xml_node prepend_child(const char_t* name);
- xml_node insert_child_after(const char_t* name, const xml_node& node);
- xml_node insert_child_before(const char_t* name, const xml_node& node);
-
- // Add a copy of the specified node as a child. Returns added node, or empty node on errors.
- xml_node append_copy(const xml_node& proto);
- xml_node prepend_copy(const xml_node& proto);
- xml_node insert_copy_after(const xml_node& proto, const xml_node& node);
- xml_node insert_copy_before(const xml_node& proto, const xml_node& node);
-
- // Remove specified attribute
- bool remove_attribute(const xml_attribute& a);
- bool remove_attribute(const char_t* name);
-
- // Remove specified child
- bool remove_child(const xml_node& n);
- bool remove_child(const char_t* name);
-
- // Find attribute using predicate. Returns first attribute for which predicate returned true.
- template <typename Predicate> xml_attribute find_attribute(Predicate pred) const
- {
- if (!_root) return xml_attribute();
-
- for (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute())
- if (pred(attrib))
- return attrib;
-
- return xml_attribute();
- }
-
- // Find child node using predicate. Returns first child for which predicate returned true.
- template <typename Predicate> xml_node find_child(Predicate pred) const
- {
- if (!_root) return xml_node();
-
- for (xml_node node = first_child(); node; node = node.next_sibling())
- if (pred(node))
- return node;
-
- return xml_node();
- }
-
- // Find node from subtree using predicate. Returns first node from subtree (depth-first), for which predicate returned true.
- template <typename Predicate> xml_node find_node(Predicate pred) const
- {
- if (!_root) return xml_node();
-
- xml_node cur = first_child();
-
- while (cur._root && cur._root != _root)
- {
- if (pred(cur)) return cur;
-
- if (cur.first_child()) cur = cur.first_child();
- else if (cur.next_sibling()) cur = cur.next_sibling();
- else
- {
- while (!cur.next_sibling() && cur._root != _root) cur = cur.parent();
-
- if (cur._root != _root) cur = cur.next_sibling();
- }
- }
-
- return xml_node();
- }
-
- // Find child node by attribute name/value
- xml_node find_child_by_attribute(const char_t* name, const char_t* attr_name, const char_t* attr_value) const;
- xml_node find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const;
-
- #ifndef PUGIXML_NO_STL
- // Get the absolute node path from root as a text string.
- string_t path(char_t delimiter = '/') const;
- #endif
-
- // Search for a node by path consisting of node names and . or .. elements.
- xml_node first_element_by_path(const char_t* path, char_t delimiter = '/') const;
-
- // Recursively traverse subtree with xml_tree_walker
- bool traverse(xml_tree_walker& walker);
-
- #ifndef PUGIXML_NO_XPATH
- // Select single node by evaluating XPath query. Returns first node from the resulting node set.
- xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;
- xpath_node select_single_node(const xpath_query& query) const;
-
- // Select node set by evaluating XPath query
- xpath_node_set select_nodes(const char_t* query, xpath_variable_set* variables = 0) const;
- xpath_node_set select_nodes(const xpath_query& query) const;
- #endif
-
- // Print subtree using a writer object
- void print(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;
-
- #ifndef PUGIXML_NO_STL
- // Print subtree to stream
- void print(std::basic_ostream<char, std::char_traits<char> >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;
- void print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, unsigned int depth = 0) const;
- #endif
-
- // Child nodes iterators
- typedef xml_node_iterator iterator;
-
- iterator begin() const;
- iterator end() const;
-
- // Attribute iterators
- typedef xml_attribute_iterator attribute_iterator;
-
- attribute_iterator attributes_begin() const;
- attribute_iterator attributes_end() const;
-
- // Range-based for support
- xml_object_range<xml_node_iterator> children() const;
- xml_object_range<xml_named_node_iterator> children(const char_t* name) const;
- xml_object_range<xml_attribute_iterator> attributes() const;
-
- // Get node offset in parsed file/string (in char_t units) for debugging purposes
- ptrdiff_t offset_debug() const;
-
- // Get hash value (unique for handles to the same object)
- size_t hash_value() const;
-
- // Get internal pointer
- xml_node_struct* internal_object() const;
- };
-
-#ifdef __BORLANDC__
- // Borland C++ workaround
- bool PUGIXML_FUNCTION operator&&(const xml_node& lhs, bool rhs);
- bool PUGIXML_FUNCTION operator||(const xml_node& lhs, bool rhs);
-#endif
-
- // A helper for working with text inside PCDATA nodes
- class PUGIXML_CLASS xml_text
- {
- friend class xml_node;
-
- xml_node_struct* _root;
-
- typedef void (*unspecified_bool_type)(xml_text***);
-
- explicit xml_text(xml_node_struct* root);
-
- xml_node_struct* _data_new();
- xml_node_struct* _data() const;
-
- public:
- // Default constructor. Constructs an empty object.
- xml_text();
-
- // Safe bool conversion operator
- operator unspecified_bool_type() const;
-
- // Borland C++ workaround
- bool operator!() const;
-
- // Check if text object is empty
- bool empty() const;
-
- // Get text, or "" if object is empty
- const char_t* get() const;
-
- // Get text, or the default value if object is empty
- const char_t* as_string(const char_t* def = PUGIXML_TEXT("")) const;
-
- // Get text as a number, or the default value if conversion did not succeed or object is empty
- int as_int(int def = 0) const;
- unsigned int as_uint(unsigned int def = 0) const;
- double as_double(double def = 0) const;
- float as_float(float def = 0) const;
-
- // Get text as bool (returns true if first character is in '1tTyY' set), or the default value if object is empty
- bool as_bool(bool def = false) const;
-
- // Set text (returns false if object is empty or there is not enough memory)
- bool set(const char_t* rhs);
-
- // Set text with type conversion (numbers are converted to strings, boolean is converted to "true"/"false")
- bool set(int rhs);
- bool set(unsigned int rhs);
- bool set(double rhs);
- bool set(bool rhs);
-
- // Set text (equivalent to set without error checking)
- xml_text& operator=(const char_t* rhs);
- xml_text& operator=(int rhs);
- xml_text& operator=(unsigned int rhs);
- xml_text& operator=(double rhs);
- xml_text& operator=(bool rhs);
-
- // Get the data node (node_pcdata or node_cdata) for this object
- xml_node data() const;
- };
-
-#ifdef __BORLANDC__
- // Borland C++ workaround
- bool PUGIXML_FUNCTION operator&&(const xml_text& lhs, bool rhs);
- bool PUGIXML_FUNCTION operator||(const xml_text& lhs, bool rhs);
-#endif
-
- // Child node iterator (a bidirectional iterator over a collection of xml_node)
- class PUGIXML_CLASS xml_node_iterator
- {
- friend class xml_node;
-
- private:
- mutable xml_node _wrap;
- xml_node _parent;
-
- xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent);
-
- public:
- // Iterator traits
- typedef ptrdiff_t difference_type;
- typedef xml_node value_type;
- typedef xml_node* pointer;
- typedef xml_node& reference;
-
- #ifndef PUGIXML_NO_STL
- typedef std::bidirectional_iterator_tag iterator_category;
- #endif
-
- // Default constructor
- xml_node_iterator();
-
- // Construct an iterator which points to the specified node
- xml_node_iterator(const xml_node& node);
-
- // Iterator operators
- bool operator==(const xml_node_iterator& rhs) const;
- bool operator!=(const xml_node_iterator& rhs) const;
-
- xml_node& operator*() const;
- xml_node* operator->() const;
-
- const xml_node_iterator& operator++();
- xml_node_iterator operator++(int);
-
- const xml_node_iterator& operator--();
- xml_node_iterator operator--(int);
- };
-
- // Attribute iterator (a bidirectional iterator over a collection of xml_attribute)
- class PUGIXML_CLASS xml_attribute_iterator
- {
- friend class xml_node;
-
- private:
- mutable xml_attribute _wrap;
- xml_node _parent;
-
- xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent);
-
- public:
- // Iterator traits
- typedef ptrdiff_t difference_type;
- typedef xml_attribute value_type;
- typedef xml_attribute* pointer;
- typedef xml_attribute& reference;
-
- #ifndef PUGIXML_NO_STL
- typedef std::bidirectional_iterator_tag iterator_category;
- #endif
-
- // Default constructor
- xml_attribute_iterator();
-
- // Construct an iterator which points to the specified attribute
- xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent);
-
- // Iterator operators
- bool operator==(const xml_attribute_iterator& rhs) const;
- bool operator!=(const xml_attribute_iterator& rhs) const;
-
- xml_attribute& operator*() const;
- xml_attribute* operator->() const;
-
- const xml_attribute_iterator& operator++();
- xml_attribute_iterator operator++(int);
-
- const xml_attribute_iterator& operator--();
- xml_attribute_iterator operator--(int);
- };
-
- // Named node range helper
- class xml_named_node_iterator
- {
- public:
- // Iterator traits
- typedef ptrdiff_t difference_type;
- typedef xml_node value_type;
- typedef xml_node* pointer;
- typedef xml_node& reference;
-
- #ifndef PUGIXML_NO_STL
- typedef std::forward_iterator_tag iterator_category;
- #endif
-
- // Default constructor
- xml_named_node_iterator();
-
- // Construct an iterator which points to the specified node
- xml_named_node_iterator(const xml_node& node, const char_t* name);
-
- // Iterator operators
- bool operator==(const xml_named_node_iterator& rhs) const;
- bool operator!=(const xml_named_node_iterator& rhs) const;
-
- xml_node& operator*() const;
- xml_node* operator->() const;
-
- const xml_named_node_iterator& operator++();
- xml_named_node_iterator operator++(int);
-
- private:
- mutable xml_node _node;
- const char_t* _name;
- };
-
- // Abstract tree walker class (see xml_node::traverse)
- class PUGIXML_CLASS xml_tree_walker
- {
- friend class xml_node;
-
- private:
- int _depth;
-
- protected:
- // Get current traversal depth
- int depth() const;
-
- public:
- xml_tree_walker();
- virtual ~xml_tree_walker();
-
- // Callback that is called when traversal begins
- virtual bool begin(xml_node& node);
-
- // Callback that is called for each node traversed
- virtual bool for_each(xml_node& node) = 0;
-
- // Callback that is called when traversal ends
- virtual bool end(xml_node& node);
- };
-
- // Parsing status, returned as part of xml_parse_result object
- enum xml_parse_status
- {
- status_ok = 0, // No error
-
- status_file_not_found, // File was not found during load_file()
- status_io_error, // Error reading from file/stream
- status_out_of_memory, // Could not allocate memory
- status_internal_error, // Internal error occurred
-
- status_unrecognized_tag, // Parser could not determine tag type
-
- status_bad_pi, // Parsing error occurred while parsing document declaration/processing instruction
- status_bad_comment, // Parsing error occurred while parsing comment
- status_bad_cdata, // Parsing error occurred while parsing CDATA section
- status_bad_doctype, // Parsing error occurred while parsing document type declaration
- status_bad_pcdata, // Parsing error occurred while parsing PCDATA section
- status_bad_start_element, // Parsing error occurred while parsing start element tag
- status_bad_attribute, // Parsing error occurred while parsing element attribute
- status_bad_end_element, // Parsing error occurred while parsing end element tag
- status_end_element_mismatch // There was a mismatch of start-end tags (closing tag had incorrect name, some tag was not closed or there was an excessive closing tag)
- };
-
- // Parsing result
- struct PUGIXML_CLASS xml_parse_result
- {
- // Parsing status (see xml_parse_status)
- xml_parse_status status;
-
- // Last parsed offset (in char_t units from start of input data)
- ptrdiff_t offset;
-
- // Source document encoding
- xml_encoding encoding;
-
- // Default constructor, initializes object to failed state
- xml_parse_result();
-
- // Cast to bool operator
- operator bool() const;
-
- // Get error description
- const char* description() const;
- };
-
- // Document class (DOM tree root)
- class PUGIXML_CLASS xml_document: public xml_node
- {
- private:
- char_t* _buffer;
-
- char _memory[192];
-
- // Non-copyable semantics
- xml_document(const xml_document&);
- const xml_document& operator=(const xml_document&);
-
- void create();
- void destroy();
-
- xml_parse_result load_buffer_impl(void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own);
-
- public:
- // Default constructor, makes empty document
- xml_document();
-
- // Destructor, invalidates all node/attribute handles to this document
- ~xml_document();
-
- // Removes all nodes, leaving the empty document
- void reset();
-
- // Removes all nodes, then copies the entire contents of the specified document
- void reset(const xml_document& proto);
-
- #ifndef PUGIXML_NO_STL
- // Load document from stream.
- xml_parse_result load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
- xml_parse_result load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options = parse_default);
- #endif
-
- // Load document from zero-terminated string. No encoding conversions are applied.
- xml_parse_result load(const char_t* contents, unsigned int options = parse_default);
-
- // Load document from file
- xml_parse_result load_file(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
- xml_parse_result load_file(const wchar_t* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
-
- // Load document from buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns.
- xml_parse_result load_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
-
- // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).
- // You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once document is destroyed.
- xml_parse_result load_buffer_inplace(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
-
- // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).
- // You should allocate the buffer with pugixml allocation function; document will free the buffer when it is no longer needed (you can't use it anymore).
- xml_parse_result load_buffer_inplace_own(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
-
- // Save XML document to writer (semantics is slightly different from xml_node::print, see documentation for details).
- void save(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
-
- #ifndef PUGIXML_NO_STL
- // Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details).
- void save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
- void save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default) const;
- #endif
-
- // Save XML to file
- bool save_file(const char* path, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
- bool save_file(const wchar_t* path, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
-
- // Get document element
- xml_node document_element() const;
- };
-
-#ifndef PUGIXML_NO_XPATH
- // XPath query return type
- enum xpath_value_type
- {
- xpath_type_none, // Unknown type (query failed to compile)
- xpath_type_node_set, // Node set (xpath_node_set)
- xpath_type_number, // Number
- xpath_type_string, // String
- xpath_type_boolean // Boolean
- };
-
- // XPath parsing result
- struct PUGIXML_CLASS xpath_parse_result
- {
- // Error message (0 if no error)
- const char* error;
-
- // Last parsed offset (in char_t units from string start)
- ptrdiff_t offset;
-
- // Default constructor, initializes object to failed state
- xpath_parse_result();
-
- // Cast to bool operator
- operator bool() const;
-
- // Get error description
- const char* description() const;
- };
-
- // A single XPath variable
- class PUGIXML_CLASS xpath_variable
- {
- friend class xpath_variable_set;
-
- protected:
- xpath_value_type _type;
- xpath_variable* _next;
-
- xpath_variable();
-
- // Non-copyable semantics
- xpath_variable(const xpath_variable&);
- xpath_variable& operator=(const xpath_variable&);
-
- public:
- // Get variable name
- const char_t* name() const;
-
- // Get variable type
- xpath_value_type type() const;
-
- // Get variable value; no type conversion is performed, default value (false, NaN, empty string, empty node set) is returned on type mismatch error
- bool get_boolean() const;
- double get_number() const;
- const char_t* get_string() const;
- const xpath_node_set& get_node_set() const;
-
- // Set variable value; no type conversion is performed, false is returned on type mismatch error
- bool set(bool value);
- bool set(double value);
- bool set(const char_t* value);
- bool set(const xpath_node_set& value);
- };
-
- // A set of XPath variables
- class PUGIXML_CLASS xpath_variable_set
- {
- private:
- xpath_variable* _data[64];
-
- // Non-copyable semantics
- xpath_variable_set(const xpath_variable_set&);
- xpath_variable_set& operator=(const xpath_variable_set&);
-
- xpath_variable* find(const char_t* name) const;
-
- public:
- // Default constructor/destructor
- xpath_variable_set();
- ~xpath_variable_set();
-
- // Add a new variable or get the existing one, if the types match
- xpath_variable* add(const char_t* name, xpath_value_type type);
-
- // Set value of an existing variable; no type conversion is performed, false is returned if there is no such variable or if types mismatch
- bool set(const char_t* name, bool value);
- bool set(const char_t* name, double value);
- bool set(const char_t* name, const char_t* value);
- bool set(const char_t* name, const xpath_node_set& value);
-
- // Get existing variable by name
- xpath_variable* get(const char_t* name);
- const xpath_variable* get(const char_t* name) const;
- };
-
- // A compiled XPath query object
- class PUGIXML_CLASS xpath_query
- {
- private:
- void* _impl;
- xpath_parse_result _result;
-
- typedef void (*unspecified_bool_type)(xpath_query***);
-
- // Non-copyable semantics
- xpath_query(const xpath_query&);
- xpath_query& operator=(const xpath_query&);
-
- public:
- // Construct a compiled object from XPath expression.
- // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on compilation errors.
- explicit xpath_query(const char_t* query, xpath_variable_set* variables = 0);
-
- // Destructor
- ~xpath_query();
-
- // Get query expression return type
- xpath_value_type return_type() const;
-
- // Evaluate expression as boolean value in the specified context; performs type conversion if necessary.
- // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
- bool evaluate_boolean(const xpath_node& n) const;
-
- // Evaluate expression as double value in the specified context; performs type conversion if necessary.
- // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
- double evaluate_number(const xpath_node& n) const;
-
- #ifndef PUGIXML_NO_STL
- // Evaluate expression as string value in the specified context; performs type conversion if necessary.
- // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
- string_t evaluate_string(const xpath_node& n) const;
- #endif
-
- // Evaluate expression as string value in the specified context; performs type conversion if necessary.
- // At most capacity characters are written to the destination buffer, full result size is returned (includes terminating zero).
- // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
- // If PUGIXML_NO_EXCEPTIONS is defined, returns empty set instead.
- size_t evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const;
-
- // Evaluate expression as node set in the specified context.
- // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.
- // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node set instead.
- xpath_node_set evaluate_node_set(const xpath_node& n) const;
-
- // Get parsing result (used to get compilation errors in PUGIXML_NO_EXCEPTIONS mode)
- const xpath_parse_result& result() const;
-
- // Safe bool conversion operator
- operator unspecified_bool_type() const;
-
- // Borland C++ workaround
- bool operator!() const;
- };
-
- #ifndef PUGIXML_NO_EXCEPTIONS
- // XPath exception class
- class PUGIXML_CLASS xpath_exception: public std::exception
- {
- private:
- xpath_parse_result _result;
-
- public:
- // Construct exception from parse result
- explicit xpath_exception(const xpath_parse_result& result);
-
- // Get error message
- virtual const char* what() const throw();
-
- // Get parse result
- const xpath_parse_result& result() const;
- };
- #endif
-
- // XPath node class (either xml_node or xml_attribute)
- class PUGIXML_CLASS xpath_node
- {
- private:
- xml_node _node;
- xml_attribute _attribute;
-
- typedef void (*unspecified_bool_type)(xpath_node***);
-
- public:
- // Default constructor; constructs empty XPath node
- xpath_node();
-
- // Construct XPath node from XML node/attribute
- xpath_node(const xml_node& node);
- xpath_node(const xml_attribute& attribute, const xml_node& parent);
-
- // Get node/attribute, if any
- xml_node node() const;
- xml_attribute attribute() const;
-
- // Get parent of contained node/attribute
- xml_node parent() const;
-
- // Safe bool conversion operator
- operator unspecified_bool_type() const;
-
- // Borland C++ workaround
- bool operator!() const;
-
- // Comparison operators
- bool operator==(const xpath_node& n) const;
- bool operator!=(const xpath_node& n) const;
- };
-
-#ifdef __BORLANDC__
- // Borland C++ workaround
- bool PUGIXML_FUNCTION operator&&(const xpath_node& lhs, bool rhs);
- bool PUGIXML_FUNCTION operator||(const xpath_node& lhs, bool rhs);
-#endif
-
- // A fixed-size collection of XPath nodes
- class PUGIXML_CLASS xpath_node_set
- {
- public:
- // Collection type
- enum type_t
- {
- type_unsorted, // Not ordered
- type_sorted, // Sorted by document order (ascending)
- type_sorted_reverse // Sorted by document order (descending)
- };
-
- // Constant iterator type
- typedef const xpath_node* const_iterator;
-
- // Default constructor. Constructs empty set.
- xpath_node_set();
-
- // Constructs a set from iterator range; data is not checked for duplicates and is not sorted according to provided type, so be careful
- xpath_node_set(const_iterator begin, const_iterator end, type_t type = type_unsorted);
-
- // Destructor
- ~xpath_node_set();
-
- // Copy constructor/assignment operator
- xpath_node_set(const xpath_node_set& ns);
- xpath_node_set& operator=(const xpath_node_set& ns);
-
- // Get collection type
- type_t type() const;
-
- // Get collection size
- size_t size() const;
-
- // Indexing operator
- const xpath_node& operator[](size_t index) const;
-
- // Collection iterators
- const_iterator begin() const;
- const_iterator end() const;
-
- // Sort the collection in ascending/descending order by document order
- void sort(bool reverse = false);
-
- // Get first node in the collection by document order
- xpath_node first() const;
-
- // Check if collection is empty
- bool empty() const;
-
- private:
- type_t _type;
-
- xpath_node _storage;
-
- xpath_node* _begin;
- xpath_node* _end;
-
- void _assign(const_iterator begin, const_iterator end);
- };
-#endif
-
-#ifndef PUGIXML_NO_STL
- // Convert wide string to UTF8
- std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const wchar_t* str);
- std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);
-
- // Convert UTF8 to wide string
- std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const char* str);
- std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);
-#endif
-
- // Memory allocation function interface; returns pointer to allocated memory or NULL on failure
- typedef void* (*allocation_function)(size_t size);
-
- // Memory deallocation function interface
- typedef void (*deallocation_function)(void* ptr);
-
- // Override default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions.
- void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate);
-
- // Get current memory management functions
- allocation_function PUGIXML_FUNCTION get_memory_allocation_function();
- deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function();
-}
-
-#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
-namespace std
-{
- // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)
- std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_node_iterator&);
- std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_attribute_iterator&);
- std::forward_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_named_node_iterator&);
-}
-#endif
-
-#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
-namespace std
-{
- // Workarounds for (non-standard) iterator category detection
- std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_node_iterator&);
- std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_attribute_iterator&);
- std::forward_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_named_node_iterator&);
-}
-#endif
-
-#endif
-
-/**
- * Copyright (c) 2006-2012 Arseny Kapoulkine
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
diff --git a/SDL_Core/tools/intergen/tool/CMakeLists.txt b/SDL_Core/tools/intergen/tool/CMakeLists.txt
deleted file mode 100644
index 775988a14..000000000
--- a/SDL_Core/tools/intergen/tool/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-include_directories(
- ${pugixml_SOURCE_DIR}/../src
- ${intergen_SOURCE_DIR}/cppgen/include
- ${intergen_SOURCE_DIR}/model/include
- ${intergen_SOURCE_DIR}/utils/include
-)
-
-add_executable(intergen intergen.cc)
-target_link_libraries(intergen intergen_cppgen intergen_model intergen_utils pugixml)
-install(TARGETS intergen RUNTIME DESTINATION bin)
diff --git a/SDL_Core/tools/intergen/tool/intergen.cc b/SDL_Core/tools/intergen/tool/intergen.cc
deleted file mode 100644
index 06d93fcf0..000000000
--- a/SDL_Core/tools/intergen/tool/intergen.cc
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <algorithm>
-#include <iostream>
-#include <iterator>
-
-#include "getopt.h"
-
-#include "cppgen/cpp_api_code_generator.h"
-#include "model/api.h"
-#include "model/model_filter.h"
-#include "pugixml.hpp"
-#include "utils/safeformat.h"
-
-using std::cout;
-using std::cerr;
-
-/*
- * Parsed command line options
- */
-struct Options {
- char* interface_xml;
- bool auto_generate_function_ids;
- std::set<std::string> requested_interfaces;
- std::set<std::string> excluded_scopes;
- Options()
- : interface_xml(NULL),
- auto_generate_function_ids(false) {
- }
-};
-
-void Usage() {
- cout << "Interface generator\n"
- << "Usage: intergen -f <xml_file> <options>\n"
- << "Options are:\n"
- << " -f <xml_file> Specifies interface definition input xml file\n"
- << " -i <interface_name> Specifies interface name from given xml file.\n"
- << " Must be given as a lower_case_identifier.\n"
- << " Option can occur multiple times to select\n"
- << " multiple interfaces.\n"
- << " -s <scope_name> Excludes entities marked with given scope from\n"
- << " generated code. Can occur multiple times.\n"
- << " -a Automatically generates function ID enum.\n";
-}
-
-int main(int argc, char* argv[]) {
- if (argc == 1) {
- Usage();
- return EXIT_FAILURE;
- }
- Options options;
- const char* opts = "af:i:s:";
- for (int opt = getopt(argc, argv, opts); opt != -1;
- opt = getopt(argc, argv, opts)) {
- switch (opt) {
- case 'i': {
- options.requested_interfaces.insert(optarg);
- break;
- }
- case 'f': {
- if (options.interface_xml == NULL) {
- options.interface_xml = optarg;
- } else {
- cerr << "Option 'f' specified multiple times" << '\n';
- }
- break;
- }
- case 's': {
- options.excluded_scopes.insert(optarg);
- break;
- }
- case 'a': {
- options.auto_generate_function_ids = true;
- break;
- }
- default: {
- cerr << "Invalid option: '" << opt << "'" << '\n';
- return EXIT_FAILURE;
- }
- }
- }
-
- if (options.interface_xml == NULL) {
- cerr << "Interface definition file must be specified" << '\n';
- return EXIT_FAILURE;
- }
- pugi::xml_document doc;
- pugi::xml_parse_result result = doc.load_file(options.interface_xml);
- if (result) {
- codegen::ModelFilter model_filter(options.excluded_scopes);
- codegen::API api(&model_filter, options.auto_generate_function_ids);
- if (api.init(doc)) {
- codegen::CppApiCodeGenerator cpp_code_generator(&api);
- std::set<std::string> bad = cpp_code_generator.Generate(
- options.requested_interfaces);
- if (bad.empty()) {
- return EXIT_SUCCESS;
- } else {
- cerr << "Failed to generate interfaces: " << '\n';
- std::copy(bad.begin(), bad.end(),
- std::ostream_iterator<std::string>(cerr, "\n"));
- cerr << '\n';
- }
- } else {
- cerr << "Failed to process xml" << '\n';
- }
- } else {
- std::cerr << "Failed to load xml file " << options.interface_xml << ": "
- << result.description() << '\n';
- }
- return EXIT_FAILURE;
-}
diff --git a/SDL_Core/tools/intergen/utils/CMakeLists.txt b/SDL_Core/tools/intergen/utils/CMakeLists.txt
deleted file mode 100644
index 8e2ccbd67..000000000
--- a/SDL_Core/tools/intergen/utils/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-include_directories(
- include
- ${pugixml_SOURCE_DIR}/../src
-)
-
-set (HEADERS
- include/utils/common_types.h
- include/utils/macro.h
- include/utils/safeformat.h
- include/utils/stl_utils.h
- include/utils/string_utils.h
- include/utils/xml_utils.h
-)
-
-set (SOURCES
- src/utils/common_types.cc
- src/utils/safeformat.cc
- src/utils/xml_utils.cc
-)
-
-add_library(intergen_utils ${HEADERS} ${SOURCES})
-target_link_libraries(intergen_utils pugixml)
diff --git a/SDL_Core/tools/intergen/utils/include/utils/common_types.h b/SDL_Core/tools/intergen/utils/include/utils/common_types.h
deleted file mode 100644
index 384e94f38..000000000
--- a/SDL_Core/tools/intergen/utils/include/utils/common_types.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef COMMON_TYPES_H_
-#define COMMON_TYPES_H_
-
-#include <string>
-#include <vector>
-
-#include "utils/string_utils.h"
-
-namespace codegen {
-/*
- * Entity description, a set of text strings.
- */
-typedef std::vector<std::string> Description;
-
-/*
- * Natural fraction class
- */
-class Fraction {
- public:
- // Constructs fraction with value of 0/1
- Fraction();
- // Constructs fraction from given values
- Fraction(int64_t numer, int64_t denumer);
- // Parses string |literal| containing float point string definition, result is stored in
- // |fraction| parameter.
- // If |literal| can not be parsed, returns false.
- static bool FromFloatPointString(const std::string& literal, Fraction* fraction);
- // Field accessors
- int64_t numer() const;
- int64_t denumer() const;
-
- private:
- int64_t numer_;
- int64_t denumer_;
-
-};
-
-/*
- * Template class representing generic range with lower
- * and upper bounds (min and max).
- * Allows value or another range to be tested for inclusion.
- * Range boundaries are always included in tests.
- */
-template<typename T>
-class BasicRange {
- public:
- typedef T value_type;
- // Create a range with specified bounds
- BasicRange(value_type min, value_type max)
- : min_(min),
- max_(max) {
- Fraction::FromFloatPointString(NumberToString(min_), &min_fract_);
- Fraction::FromFloatPointString(NumberToString(max_), &max_fract_);
- }
- // Constructs the range from given string representations of value.
- // Used to avoid converting fractional boundaries to floating point
- // Representation.
- BasicRange(const std::string& min_str, const std::string& max_str)
- : min_(0),
- max_(0) {
- bool valid_min = StringToNumber(min(), &min_)
- && Fraction::FromFloatPointString(min(), &min_fract_);
- bool valid_max = StringToNumber(max(), &max_)
- && Fraction::FromFloatPointString(max(), &max_fract_);
- assert(valid_min && valid_max);
- }
- // Tells if |value| belongs to current range (boundaries are included)
- bool Includes(value_type value) const {
- return min_ <= value && value <= max_;
- }
-
- // Tells if another range completely belongs to current range
- // (boundaries are included)
- bool Includes(const BasicRange& that) {
- return min() <= that.min() && max() >= that.max();
- }
-
- // Field access methods
- value_type min() const {
- return min_;
- }
- value_type max() const {
- return max_;
- }
- const Fraction& min_fract() const {
- return min_fract_;
- }
- const Fraction& max_fract() const {
- return max_fract_;
- }
- private:
- value_type min_;
- value_type max_;
- Fraction min_fract_;
- Fraction max_fract_;
-};
-
-} // namespace codegen
-
-#endif /* COMMON_TYPES_H_ */
diff --git a/SDL_Core/tools/intergen/utils/include/utils/macro.h b/SDL_Core/tools/intergen/utils/include/utils/macro.h
deleted file mode 100644
index 328f24932..000000000
--- a/SDL_Core/tools/intergen/utils/include/utils/macro.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MACRO_H_
-#define MACRO_H_
-
-/*
- * Copy prevention helper macro
- */
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
-/*
- * C++11 optional override support macro
- */
-#define OVERRIDE
-
-#endif /* MACRO_H_ */
diff --git a/SDL_Core/tools/intergen/utils/include/utils/safeformat.h b/SDL_Core/tools/intergen/utils/include/utils/safeformat.h
deleted file mode 100644
index a8f5d09d6..000000000
--- a/SDL_Core/tools/intergen/utils/include/utils/safeformat.h
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
-* Typesafe printf-like wrapper around std streams
-* by Igor Kozyrenko, 2013
-*/
-
-#include <cstring>
-#include <cwchar>
-#include <ostream>
-#include <sstream>
-
-namespace typesafe_format {
-namespace impl {
-
-// Pointer avoidance magic
-template<class T> struct no_pointers { enum { allowed = 1 }; };
-template<> struct no_pointers<char*> { enum { allowed = 1 }; };
-template<> struct no_pointers<const char*> { enum { allowed = 1 }; };
-template<> struct no_pointers<wchar_t*> { enum { allowed = 1 }; };
-template<> struct no_pointers<const wchar_t*>{ enum { allowed = 1 }; };
-template<class T> struct no_pointers<T*> { enum { allowed = 0 }; };
-
-// Static assert helper
-template<bool b> struct my_static_assert {};
-template<> struct my_static_assert<true> { enum { here }; };
-
-template <typename CT>
-struct Streamable {
- virtual void OutputToStream(std::basic_ostream<CT>& stream) const = 0;
- virtual ~Streamable() {}
-};
-
-template <typename CT, typename T>
-struct StreamableValue: public Streamable<CT> {
- StreamableValue(const T& val): val_(val) {
- // You can wrap pointer with typesafe_format::ptr to pass this check
- (void)my_static_assert<no_pointers<T>::allowed>::here;
- }
- void OutputToStream(std::basic_ostream<CT>& stream) const {
- stream<<val_;
- }
-private:
- const T& val_;
-};
-
-inline size_t len(const char* str) { return std::strlen(str); }
-inline size_t len(const wchar_t* str) { return std::wcslen(str); }
-
-void format_params(const char* fmt, size_t fmt_length, std::ostream& os,
- const Streamable<char>* params[], size_t params_count);
-void format_params(const wchar_t* fmt, size_t fmt_length, std::wostream& os,
- const Streamable<wchar_t>* params[], size_t params_count);
-} // namespace impl
-
-// Wrapper class to pass anti-pointer protection
-struct ptr {
- explicit ptr(void* ptr): ptr_(ptr) {}
-private:
- void* ptr_;
- template <typename CT>
- friend std::basic_ostream<CT>& operator<<(std::basic_ostream<CT>&,
- const ptr&);
-};
-template <typename CT>
-inline std::basic_ostream<CT>& operator<<(std::basic_ostream<CT>& os,
- const ptr& ptr) {
- return os<<ptr.ptr_;
-}
-
-// stream format overloads
-template <typename CT>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length) {
- return os.write(fmt, fmt_length);
-}
-
-template <typename CT,
- typename T0>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0) {
- impl::StreamableValue<CT, T0> s0(p0);
- const impl::Streamable<CT>* params[] =
- {&s0};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- impl::StreamableValue<CT, T4> s4(p4);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3, &s4};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- impl::StreamableValue<CT, T4> s4(p4);
- impl::StreamableValue<CT, T5> s5(p5);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3, &s4, &s5};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- impl::StreamableValue<CT, T4> s4(p4);
- impl::StreamableValue<CT, T5> s5(p5);
- impl::StreamableValue<CT, T6> s6(p6);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3, &s4, &s5, &s6};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- impl::StreamableValue<CT, T4> s4(p4);
- impl::StreamableValue<CT, T5> s5(p5);
- impl::StreamableValue<CT, T6> s6(p6);
- impl::StreamableValue<CT, T7> s7(p7);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3, &s4, &s5, &s6, &s7};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- impl::StreamableValue<CT, T4> s4(p4);
- impl::StreamableValue<CT, T5> s5(p5);
- impl::StreamableValue<CT, T6> s6(p6);
- impl::StreamableValue<CT, T7> s7(p7);
- impl::StreamableValue<CT, T8> s8(p8);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3, &s4, &s5, &s6, &s7, &s8};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9>
-std::basic_ostream<CT>& strmfmtl(
- std::basic_ostream<CT>& os, const CT* fmt, size_t fmt_length,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8, const T9& p9) {
- impl::StreamableValue<CT, T0> s0(p0);
- impl::StreamableValue<CT, T1> s1(p1);
- impl::StreamableValue<CT, T2> s2(p2);
- impl::StreamableValue<CT, T3> s3(p3);
- impl::StreamableValue<CT, T4> s4(p4);
- impl::StreamableValue<CT, T5> s5(p5);
- impl::StreamableValue<CT, T6> s6(p6);
- impl::StreamableValue<CT, T7> s7(p7);
- impl::StreamableValue<CT, T8> s8(p8);
- impl::StreamableValue<CT, T9> s9(p9);
- const impl::Streamable<CT>* params[] =
- {&s0, &s1, &s2, &s3, &s4, &s5, &s6, &s7, &s8, &s9};
- impl::format_params(fmt, fmt_length, os,
- params, sizeof params/sizeof params[0]);
- return os;
-}
-
-/*
- * Stream format overloads
- * */
-template <typename CT>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt) {
- return strmfmtl(os, fmt, impl::len(fmt));
-}
-
-template <typename CT,
- typename T0>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt, const T0& p0) {
- return strmfmtl(os, fmt, impl::len(fmt), p0);
-}
-
-template <typename CT,
- typename T0, typename T1>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3, p4);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6, p7);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6, p7, p8);
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9>
-std::basic_ostream<CT>& strmfmt(
- std::basic_ostream<CT>& os, const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8, const T9& p9) {
- return strmfmtl(os, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
-}
-
-/*
-*
-* Char array format overloads
-*
-*/
-template <typename CT,
- typename T0>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3, p4);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6, p7);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6, p7, p8);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9>
-std::basic_string<CT> format(const CT* fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8, const T9& p9) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt, impl::len(fmt), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
- return stream.str();
-}
-
-/*
-*
-* STL string overloads
-*
-*/
-template <typename CT,
- typename T0>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3, p4);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3, p4, p5);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3, p4, p5, p6);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3, p4, p5, p6, p7);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3, p4, p5, p6, p7, p8);
- return stream.str();
-}
-
-template <typename CT,
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9>
-std::basic_string<CT> format(const std::basic_string<CT> fmt,
- const T0& p0, const T1& p1, const T2& p2, const T3& p3, const T4& p4,
- const T5& p5, const T6& p6, const T7& p7, const T8& p8, const T9& p9) {
- std::basic_stringstream<CT> stream;
- strmfmtl(stream, fmt.c_str(), fmt.size(),
- p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
- return stream.str();
-}
-
-} // namespace typesafe_format
diff --git a/SDL_Core/tools/intergen/utils/include/utils/stl_utils.h b/SDL_Core/tools/intergen/utils/include/utils/stl_utils.h
deleted file mode 100644
index 0b3718947..000000000
--- a/SDL_Core/tools/intergen/utils/include/utils/stl_utils.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef STL_UTILS_H_
-#define STL_UTILS_H_
-
-/*
- * Common helper functions that work with STL types
- */
-
-#include <cassert>
-#include <map>
-#include <set>
-
-namespace utils {
-
-/*
- * Collects all the keys from given map |m|
- */
-template<typename K, typename V>
-std::set<K> MapKeys(const std::map<K, V> m) {
- std::set<K> keys;
- for (typename std::map<K, V>::const_iterator i = m.begin(), end = m.end();
- i != end; ++i) {
- keys.insert(i->first);
- }
- return keys;
-}
-
-/*
- * Automatcally deletes all the values |cont| elements are pointing to.
- */
-template<typename T>
-class StdContainerDeleter {
- public:
- explicit StdContainerDeleter(T* cont)
- : cont_(cont) {
- }
- ~StdContainerDeleter() {
- for (typename T::iterator i = cont_->begin(), end = cont_->end(); i != end;
- ++i) {
- delete *i;
- }
- }
- private:
- T* cont_;
-};
-
-/*
- * Automatcally deletes all map values |cont| elements are pointing to.
- */
-template<typename T>
- class StdMapDeleter {
-public:
- explicit StdMapDeleter(T* cont)
- : cont_(cont) {
- }
- ~StdMapDeleter() {
- for (typename T::iterator i = cont_->begin(), end = cont_->end(); i != end;
- ++i) {
- delete i->second;
- }
- }
-private:
- T* cont_;
-};
-
-
-
-}
-
-#endif /* STL_UTILS_H_ */
diff --git a/SDL_Core/tools/intergen/utils/include/utils/string_utils.h b/SDL_Core/tools/intergen/utils/include/utils/string_utils.h
deleted file mode 100644
index 78c1b87aa..000000000
--- a/SDL_Core/tools/intergen/utils/include/utils/string_utils.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef STRING_UTILS_H_
-#define STRING_UTILS_H_
-
-#include <stdint.h>
-#include <algorithm>
-#include <cassert>
-#include <cctype>
-#include <functional>
-#include <ostream>
-#include <sstream>
-#include <string>
-
-/*
- * Commonly used string processing functions
- */
-
-/*
- * Stream indentation helper class. Hooks the stream that is
- * passed to it's constructor processing all the input to that stream
- * and issuing indentation spaces when newline symbol is put to the stream.
- * Unhooks from stream on destruction.
- */
-class Indent: private std::streambuf {
-public:
- /*
- * Constructs indentation 'sentry' object hooking on |dest| stream.
- * |ident_size| is the indentation width (spaces).
- */
- explicit Indent(std::ostream& dest, size_t ident_size = 2)
- : dest_buf_(dest.rdbuf()),
- new_line_started_(true),
- ident_(ident_size, ' '),
- owner_(&dest) {
- owner_->rdbuf(this);
- }
- ~Indent() {
- owner_->rdbuf( dest_buf_ );
- }
-private:
- virtual int overflow( int ch ) {
- if ( new_line_started_ && ch != '\n' ) {
- dest_buf_->sputn(ident_.data(), ident_.size());
- }
- new_line_started_ = ch == '\n';
- return dest_buf_->sputc(ch);
- }
-private:
- std::streambuf* dest_buf_;
- bool new_line_started_;
- std::string ident_;
- std::ostream* owner_;
-};
-
-/*
- * String to numerical (int, double) conversion function.
- * Checks wether |str_val| contains a number and converts
- * it to |out_val|.
- * Returns false on failure.
- */
-template<typename T>
-bool StringToNumber(const std::string& str_val, T* out_val) {
- assert(out_val);
- std::stringstream stream(str_val);
- stream>>(*out_val);
- return bool(stream);
-}
-
-/*
- * Number to string conversion function.
- */
-template<typename T>
-inline std::string NumberToString(T number) {
- std::stringstream stream;
- std::string result;
- stream<<number;
- stream>>result;
- return result;
-}
-
-/*
- * In-place string trimming function, trims spaces at string beginning
- */
-inline std::string& ltrim(std::string &s) {
- s.erase(
- s.begin(),
- std::find_if(s.begin(), s.end(),
- std::not1(std::ptr_fun<int, int>(std::isspace))));
- return s;
-}
-
-/*
- * In-place string trimming function, trims spaces at string end
- */
-inline std::string& rtrim(std::string &s) {
- s.erase(
- std::find_if(s.rbegin(), s.rend(),
- std::not1(std::ptr_fun<int, int>(std::isspace))).base(),
- s.end());
- return s;
-}
-
-/*
- * In-place string trimming function, trims spaces around text
- */
-inline std::string& trim(std::string &s) {
- return ltrim(rtrim(s));
-}
-
-/*
- * Converts ASCII string to lowercase
- */
-inline std::string to_lower(std::string str) {
- for (std::string::iterator i = str.begin(); i != str.end(); ++i) {
- *i = std::tolower(*i);
- }
- return str;
-}
-
-/*
- * Converts ASCII string to uppercase
- */
-inline std::string to_upper(std::string str) {
- for (std::string::iterator i = str.begin(); i != str.end(); ++i) {
- *i = std::toupper(*i);
- }
- return str;
-}
-
-#endif /* STRING_UTILS_H_ */
diff --git a/SDL_Core/tools/intergen/utils/include/utils/xml_utils.h b/SDL_Core/tools/intergen/utils/include/utils/xml_utils.h
deleted file mode 100644
index 6c5c3ed3b..000000000
--- a/SDL_Core/tools/intergen/utils/include/utils/xml_utils.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef XML_UTILS_H_
-#define XML_UTILS_H_
-
-/*
- * This file contains commonly used XML functions
- */
-
-#include "utils/common_types.h"
-
-namespace pugi {
-class xml_node;
-}
-
-namespace codegen {
-
-// Extract all the non-empty description sub-nodes and collect them in
-// Description object
-Description CollectDescription(const pugi::xml_node& node);
-
-} // namespace codegen
-
-#endif /* XML_UTILS_H_ */
diff --git a/SDL_Core/tools/intergen/utils/src/utils/common_types.cc b/SDL_Core/tools/intergen/utils/src/utils/common_types.cc
deleted file mode 100644
index 535ce5a74..000000000
--- a/SDL_Core/tools/intergen/utils/src/utils/common_types.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
-* Copyright (c) 2014, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "utils/common_types.h"
-
-#include <cmath>
-
-namespace codegen {
-
-using std::string;
-
-Fraction::Fraction()
- : numer_(0),
- denumer_(1) {
-}
-
-Fraction::Fraction(int64_t numer, int64_t denumer)
-: numer_(numer), denumer_(denumer) {
-}
-
-// static
-bool Fraction::FromFloatPointString(const std::string& literal, Fraction* fraction) {
- size_t dot_position = literal.find('.');
- string wholes_str = literal.substr(0, dot_position);
- string decs_str;
- if (dot_position != literal.npos) {
- decs_str = literal.substr(dot_position + 1);
- }
- int64_t numer_val = 0;
- if (StringToNumber(wholes_str + decs_str, &numer_val)) {
- int64_t denumer_val = pow(10, decs_str.size());
- *fraction = Fraction(numer_val, denumer_val);
- return true;
- }
- return false;
-}
-
-int64_t Fraction::numer() const {
- return numer_;
-}
-
-int64_t Fraction::denumer() const {
- return denumer_;
-}
-
-} // namespace codegen
-
-
diff --git a/SDL_Core/tools/intergen/utils/src/utils/safeformat.cc b/SDL_Core/tools/intergen/utils/src/utils/safeformat.cc
deleted file mode 100644
index 0db0bebe6..000000000
--- a/SDL_Core/tools/intergen/utils/src/utils/safeformat.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-* Typesafe printf-like wrapper around std streams
-* by Igor Kozyrenko, 2013
-*/
-
-#include "utils/safeformat.h"
-
-#include <sstream>
-#include <algorithm>
-#include <iterator>
-
-namespace typesafe_format {
-namespace impl {
-
-const char kPlaceholderPrefix = '{';
-const char kPlaceholderSuffix = '}';
-
-struct Placeholder {
- bool escaped;
- size_t escaped_prefixes;
- size_t number;
- size_t length;
-};
-
-void missing_parameter(std::ostream& os, size_t param_number) {
- os<<"{Parameter "<<param_number<<" is missing}";
-}
-
-void missing_parameter(std::wostream& os, size_t param_number) {
- os<<L"{Parameter "<<param_number<<L" is missing}";
-}
-
-template <typename CT>
-const CT* find_placeholder_tmpl(const CT* text, const CT* end,
- Placeholder& ph) {
- const CT* prefix_begin = text;
- bool done = false;
- do {
- prefix_begin = std::find(prefix_begin, end, kPlaceholderPrefix);
- // there must be at least two symbols after prefix
- if (std::distance(prefix_begin, end) > 2) {
- const CT* prefix_end = prefix_begin + 1;
- // count prefix escapes if any
- while(*prefix_end == kPlaceholderPrefix &&
- std::distance(prefix_end, end) > 2)
- ++prefix_end;
- size_t prefixes = std::distance(prefix_begin, prefix_end);
- size_t prefix_number = *prefix_end - '0';
- const CT* suffix = prefix_end + 1;
- if (prefix_number < 10 && // it is in range of valid placeholders
- *suffix == kPlaceholderSuffix) {
- ph.escaped = prefixes % 2 == 0;
- ph.escaped_prefixes = prefixes / 2;
- ph.number = prefix_number;
- ph.length = (suffix - prefix_begin) + 1;
- done = true;
- } else {
- prefix_begin = suffix; // continue from the symbol after number
- }
- } else { // prefix_begin is not at least last but two
- prefix_begin = end;
- done = true;
- }
- } while (!done);
- return prefix_begin;
-}
-
-template <typename CT>
-void format_params_tmpl(const CT* fmt, size_t fmt_length,
- std::basic_ostream<CT>& os,
- const Streamable<CT>* params[], size_t params_count) {
- const CT* text = fmt;
- const CT* end = fmt + fmt_length;
- Placeholder placeholder;
- for (const CT* ph_pos = find_placeholder_tmpl(text, end, placeholder);
- ph_pos != end;
- ph_pos = find_placeholder_tmpl(text, end, placeholder)) {
- os.write(text, ph_pos - text);
- for (size_t i = 0; i != placeholder.escaped_prefixes; ++i)
- os.put(kPlaceholderPrefix);
- if (placeholder.escaped) {
- os<<placeholder.number<<kPlaceholderSuffix;
- } else {
- if (placeholder.number < params_count)
- params[placeholder.number]->OutputToStream(os);
- else {
- missing_parameter(os, placeholder.number);
- }
- }
- text = ph_pos + placeholder.length;
- }
- os.write(text, end - text);
-}
-
-void format_params(const char* fmt, size_t fmt_length, std::ostream& os,
- const Streamable<char>* params[], size_t params_count) {
- format_params_tmpl(fmt, fmt_length, os, params, params_count);
-}
-void format_params(const wchar_t* fmt, size_t fmt_length, std::wostream& os,
- const Streamable<wchar_t>* params[], size_t params_count) {
- format_params_tmpl(fmt, fmt_length, os, params, params_count);
-}
-
-
-
-} // namespace impl
-} // namespace typesafe_format
diff --git a/SDL_Core/tools/intergen/utils/src/utils/xml_utils.cc b/SDL_Core/tools/intergen/utils/src/utils/xml_utils.cc
deleted file mode 100644
index a66fbce90..000000000
--- a/SDL_Core/tools/intergen/utils/src/utils/xml_utils.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include "utils/xml_utils.h"
-
-#include "pugixml.hpp"
-#include "utils/string_utils.h"
-
-namespace codegen {
-
-Description CollectDescription(const pugi::xml_node& node) {
- Description description;
- for (pugi::xml_node i = node.child("description"); i;
- i = i.next_sibling("description")) {
- std::string description_string = i.child_value();
- trim(description_string);
- if (!description_string.empty()) {
- description.push_back(description_string);
- }
- }
- return description;
-}
-
-} // namespace codegen